Changeset 0c6b92a for imaps-frontend/node_modules/react-router-dom/dist/react-router-dom.development.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/react-router-dom/dist/react-router-dom.development.js
rd565449 r0c6b92a 1 1 /** 2 * React Router DOM v6.2 6.02 * React Router DOM v6.28.0 3 3 * 4 4 * Copyright (c) Remix Software Inc. … … 11 11 import * as React from 'react'; 12 12 import * as ReactDOM from 'react-dom'; 13 import { UNSAFE_mapRouteProperties, UNSAFE_ DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker } from 'react-router';13 import { UNSAFE_mapRouteProperties, UNSAFE_logV6DeprecationWarnings, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker } from 'react-router'; 14 14 export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router'; 15 15 import { stripBasename, UNSAFE_warning, createRouter, createBrowserHistory, createHashHistory, UNSAFE_ErrorResponseImpl, UNSAFE_invariant, joinPaths, IDLE_FETCHER, matchPath } from '@remix-run/router'; … … 238 238 routes, 239 239 mapRouteProperties: UNSAFE_mapRouteProperties, 240 unstable_dataStrategy: opts?.unstable_dataStrategy,241 unstable_patchRoutesOnMiss: opts?.unstable_patchRoutesOnMiss,240 dataStrategy: opts?.dataStrategy, 241 patchRoutesOnNavigation: opts?.patchRoutesOnNavigation, 242 242 window: opts?.window 243 243 }).initialize(); … … 256 256 routes, 257 257 mapRouteProperties: UNSAFE_mapRouteProperties, 258 unstable_dataStrategy: opts?.unstable_dataStrategy,259 unstable_patchRoutesOnMiss: opts?.unstable_patchRoutesOnMiss,258 dataStrategy: opts?.dataStrategy, 259 patchRoutesOnNavigation: opts?.patchRoutesOnNavigation, 260 260 window: opts?.window 261 261 }).initialize(); … … 431 431 let setState = React.useCallback((newState, { 432 432 deletedFetchers, 433 unstable_flushSync: flushSync,434 unstable_viewTransitionOpts: viewTransitionOpts433 flushSync: flushSync, 434 viewTransitionOpts: viewTransitionOpts 435 435 }) => { 436 436 deletedFetchers.forEach(key => fetcherData.current.delete(key)); … … 601 601 v7_relativeSplatPath: router.future.v7_relativeSplatPath 602 602 }), [router.future.v7_relativeSplatPath]); 603 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future, router.future), [future, router.future]); 603 604 604 605 // The fragment and {null} here are important! We need them to keep React 18's … … 666 667 }, [setStateImpl, v7_startTransition]); 667 668 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 669 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 668 670 return /*#__PURE__*/React.createElement(Router, { 669 671 basename: basename, … … 704 706 }, [setStateImpl, v7_startTransition]); 705 707 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 708 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 706 709 return /*#__PURE__*/React.createElement(Router, { 707 710 basename: basename, … … 736 739 }, [setStateImpl, v7_startTransition]); 737 740 React.useLayoutEffect(() => history.listen(setState), [history, setState]); 741 React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]); 738 742 return /*#__PURE__*/React.createElement(Router, { 739 743 basename: basename, … … 763 767 to, 764 768 preventScrollReset, 765 unstable_viewTransition,769 viewTransition, 766 770 ...rest 767 771 }, ref) { … … 806 810 preventScrollReset, 807 811 relative, 808 unstable_viewTransition812 viewTransition 809 813 }); 810 814 function handleClick(event) { … … 838 842 style: styleProp, 839 843 to, 840 unstable_viewTransition,844 viewTransition, 841 845 children, 842 846 ...rest … … 854 858 // Conditional usage is OK here because the usage of a data router is static 855 859 // eslint-disable-next-line react-hooks/rules-of-hooks 856 useViewTransitionState(path) && unstable_viewTransition === true;860 useViewTransitionState(path) && viewTransition === true; 857 861 let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname; 858 862 let locationPathname = location.pathname; … … 899 903 style: style, 900 904 to: to, 901 unstable_viewTransition: unstable_viewTransition905 viewTransition: viewTransition 902 906 }), typeof children === "function" ? children(renderProps) : children); 903 907 }); … … 935 939 relative, 936 940 preventScrollReset, 937 unstable_viewTransition,941 viewTransition, 938 942 ...props 939 943 }, forwardedRef) => { … … 957 961 relative, 958 962 preventScrollReset, 959 unstable_viewTransition963 viewTransition 960 964 }); 961 965 }; … … 1007 1011 }(DataRouterStateHook || {}); // Internal hooks 1008 1012 function getDataRouterConsoleError(hookName) { 1009 return `${hookName} must be used within a data router. See https://reactrouter.com/ routers/picking-a-router.`;1013 return `${hookName} must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.`; 1010 1014 } 1011 1015 function useDataRouterContext(hookName) { … … 1033 1037 preventScrollReset, 1034 1038 relative, 1035 unstable_viewTransition1039 viewTransition 1036 1040 } = {}) { 1037 1041 let navigate = useNavigate(); … … 1052 1056 preventScrollReset, 1053 1057 relative, 1054 unstable_viewTransition1058 viewTransition 1055 1059 }); 1056 1060 } 1057 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);1061 }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]); 1058 1062 } 1059 1063 … … 1126 1130 formMethod: options.method || method, 1127 1131 formEncType: options.encType || encType, 1128 unstable_flushSync: options.unstable_flushSync1132 flushSync: options.flushSync 1129 1133 }); 1130 1134 } else { … … 1138 1142 state: options.state, 1139 1143 fromRouteId: currentRouteId, 1140 unstable_flushSync: options.unstable_flushSync,1141 unstable_viewTransition: options.unstable_viewTransition1144 flushSync: options.flushSync, 1145 viewTransition: options.viewTransition 1142 1146 }); 1143 1147 } … … 1177 1181 // on match.route.index below 1178 1182 let params = new URLSearchParams(path.search); 1179 if (params.has("index") && params.get("index") === "") { 1183 let indexValues = params.getAll("index"); 1184 let hasNakedIndexParam = indexValues.some(v => v === ""); 1185 if (hasNakedIndexParam) { 1180 1186 params.delete("index"); 1181 path.search = params.toString() ? `?${params.toString()}` : ""; 1187 indexValues.filter(v => v).forEach(v => params.append("index", v)); 1188 let qs = params.toString(); 1189 path.search = qs ? `?${qs}` : ""; 1182 1190 } 1183 1191 } … … 1484 1492 function useViewTransitionState(to, opts = {}) { 1485 1493 let vtContext = React.useContext(ViewTransitionContext); 1486 !(vtContext != null) ? UNSAFE_invariant(false, "`u nstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : void 0;1494 !(vtContext != null) ? UNSAFE_invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : void 0; 1487 1495 let { 1488 1496 basename … … 1501 1509 // an indicated transition apply. I.e., on the list view you have: 1502 1510 // 1503 // <NavLink to="/details/1" unstable_viewTransition>1511 // <NavLink to="/details/1" viewTransition> 1504 1512 // 1505 1513 // If you click the breadcrumb back to the list view: 1506 1514 // 1507 // <NavLink to="/list" unstable_viewTransition>1515 // <NavLink to="/list" viewTransition> 1508 1516 // 1509 1517 // We should apply the transition because it's indicated as active going … … 1515 1523 //#endregion 1516 1524 1517 export { BrowserRouter, Form, HashRouter, Link, NavLink, RouterProvider, ScrollRestoration, FetchersContext as UNSAFE_FetchersContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, usePrompt as unstable_usePrompt, use ViewTransitionState as unstable_useViewTransitionState, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit};1525 export { BrowserRouter, Form, HashRouter, Link, NavLink, RouterProvider, ScrollRestoration, FetchersContext as UNSAFE_FetchersContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, usePrompt as unstable_usePrompt, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit, useViewTransitionState }; 1518 1526 //# sourceMappingURL=react-router-dom.development.js.map
Note:
See TracChangeset
for help on using the changeset viewer.