@bleedingdev/modern-js-plugin-tanstack 3.5.0-ultramodern.9 → 3.5.0-ultramodern.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli/artifacts.js +157 -0
- package/dist/cjs/cli/index.js +8 -79
- package/dist/cjs/cli/tanstackTypes/canonicalRoutes.js +113 -0
- package/dist/cjs/cli/tanstackTypes/shared.js +123 -0
- package/dist/cjs/cli/tanstackTypes/source.js +255 -0
- package/dist/cjs/cli/tanstackTypes.js +4 -350
- package/dist/cjs/runtime/blockingSubscribe.js +57 -0
- package/dist/cjs/runtime/{pluginCore.js → clientBasepath.js} +12 -19
- package/dist/cjs/runtime/clientHydration.js +118 -0
- package/dist/cjs/runtime/dataMutation.js +11 -176
- package/dist/cjs/runtime/formData.js +116 -0
- package/dist/cjs/runtime/loaderBridge.js +7 -11
- package/dist/cjs/runtime/plugin.js +21 -125
- package/dist/cjs/runtime/plugin.node.js +45 -125
- package/dist/cjs/runtime/pluginShared.js +87 -0
- package/dist/cjs/runtime/prefetchLink.js +15 -2
- package/dist/cjs/runtime/register.js +3 -16
- package/dist/cjs/runtime/routeTree/components.js +102 -0
- package/dist/cjs/runtime/routeTree/construction.js +152 -0
- package/dist/cjs/runtime/routeTree/index.js +47 -0
- package/dist/cjs/runtime/routeTree/loaders.js +158 -0
- package/dist/cjs/runtime/routeTree/paths.js +57 -0
- package/dist/cjs/runtime/routeTree/staticData.js +63 -0
- package/dist/cjs/runtime/routeTree/tanstackRoutes.js +57 -0
- package/dist/cjs/runtime/routeTree/types.js +18 -0
- package/dist/cjs/runtime/routeTree.js +7 -320
- package/dist/cjs/runtime/router.js +15 -2
- package/dist/cjs/runtime/rsc/CompositeComponent.js +18 -13
- package/dist/cjs/runtime/rsc/ReplayableStream.js +0 -4
- package/dist/cjs/runtime/rsc/RscNodeRenderer.js +5 -16
- package/dist/cjs/runtime/rsc/client.js +8 -25
- package/dist/cjs/runtime/rsc/flightSerialization.js +132 -0
- package/dist/cjs/runtime/rsc/payloadErrors.js +99 -0
- package/dist/cjs/runtime/rsc/payloadFetch.js +105 -0
- package/dist/cjs/runtime/rsc/payloadRouter.js +21 -142
- package/dist/cjs/runtime/rsc/payloadRoutes.js +94 -0
- package/dist/cjs/runtime/rsc/payloadStorage.js +58 -0
- package/dist/cjs/runtime/rsc/server.js +14 -18
- package/dist/cjs/runtime/rsc/shared.js +68 -0
- package/dist/cjs/runtime/rsc/slotUsageSanitizer.js +1 -0
- package/dist/cjs/runtime/rsc/treeGetter.js +72 -0
- package/dist/cjs/runtime/shared/isAbsoluteUrl.js +47 -0
- package/dist/cjs/runtime/ssrManagedTags.js +103 -0
- package/dist/cjs/runtime/ssrPreload.js +89 -0
- package/dist/cjs/runtime/ssrTypes.js +18 -0
- package/dist/cjs/runtime/state.js +1 -1
- package/dist/cjs/runtime/submitAction.js +161 -0
- package/dist/cjs/runtime/utils.js +49 -86
- package/dist/esm/cli/artifacts.mjs +103 -0
- package/dist/esm/cli/index.mjs +8 -82
- package/dist/esm/cli/tanstackTypes/canonicalRoutes.mjs +75 -0
- package/dist/esm/cli/tanstackTypes/shared.mjs +61 -0
- package/dist/esm/cli/tanstackTypes/source.mjs +207 -0
- package/dist/esm/cli/tanstackTypes.mjs +2 -339
- package/dist/esm/runtime/blockingSubscribe.mjs +19 -0
- package/dist/esm/runtime/clientBasepath.mjs +10 -0
- package/dist/esm/runtime/clientHydration.mjs +71 -0
- package/dist/esm/runtime/dataMutation.mjs +2 -167
- package/dist/esm/runtime/formData.mjs +63 -0
- package/dist/esm/runtime/loaderBridge.mjs +5 -9
- package/dist/esm/runtime/plugin.mjs +14 -118
- package/dist/esm/runtime/plugin.node.mjs +41 -121
- package/dist/esm/runtime/pluginShared.mjs +40 -0
- package/dist/esm/runtime/prefetchLink.mjs +18 -5
- package/dist/esm/runtime/register.mjs +1 -14
- package/dist/esm/runtime/routeTree/components.mjs +55 -0
- package/dist/esm/runtime/routeTree/construction.mjs +111 -0
- package/dist/esm/runtime/routeTree/index.mjs +2 -0
- package/dist/esm/runtime/routeTree/loaders.mjs +117 -0
- package/dist/esm/runtime/routeTree/paths.mjs +16 -0
- package/dist/esm/runtime/routeTree/staticData.mjs +22 -0
- package/dist/esm/runtime/routeTree/tanstackRoutes.mjs +13 -0
- package/dist/esm/runtime/routeTree/types.mjs +0 -0
- package/dist/esm/runtime/routeTree.mjs +1 -318
- package/dist/esm/runtime/router.mjs +16 -2
- package/dist/esm/runtime/rsc/CompositeComponent.mjs +18 -13
- package/dist/esm/runtime/rsc/ReplayableStream.mjs +1 -1
- package/dist/esm/runtime/rsc/RscNodeRenderer.mjs +4 -15
- package/dist/esm/runtime/rsc/client.mjs +6 -26
- package/dist/esm/runtime/rsc/flightSerialization.mjs +88 -0
- package/dist/esm/runtime/rsc/payloadErrors.mjs +49 -0
- package/dist/esm/runtime/rsc/payloadFetch.mjs +55 -0
- package/dist/esm/runtime/rsc/payloadRouter.mjs +12 -133
- package/dist/esm/runtime/rsc/payloadRoutes.mjs +50 -0
- package/dist/esm/runtime/rsc/payloadStorage.mjs +14 -0
- package/dist/esm/runtime/rsc/server.mjs +17 -21
- package/dist/esm/runtime/rsc/shared.mjs +21 -0
- package/dist/esm/runtime/rsc/slotUsageSanitizer.mjs +1 -0
- package/dist/esm/runtime/rsc/treeGetter.mjs +34 -0
- package/dist/esm/runtime/shared/isAbsoluteUrl.mjs +9 -0
- package/dist/esm/runtime/ssrManagedTags.mjs +53 -0
- package/dist/esm/runtime/ssrPreload.mjs +51 -0
- package/dist/esm/runtime/ssrTypes.mjs +0 -0
- package/dist/esm/runtime/state.mjs +1 -1
- package/dist/esm/runtime/submitAction.mjs +120 -0
- package/dist/esm/runtime/utils.mjs +47 -75
- package/dist/esm-node/cli/artifacts.mjs +104 -0
- package/dist/esm-node/cli/index.mjs +8 -82
- package/dist/esm-node/cli/tanstackTypes/canonicalRoutes.mjs +76 -0
- package/dist/esm-node/cli/tanstackTypes/shared.mjs +62 -0
- package/dist/esm-node/cli/tanstackTypes/source.mjs +208 -0
- package/dist/esm-node/cli/tanstackTypes.mjs +2 -339
- package/dist/esm-node/runtime/blockingSubscribe.mjs +20 -0
- package/dist/esm-node/runtime/clientBasepath.mjs +11 -0
- package/dist/esm-node/runtime/clientHydration.mjs +72 -0
- package/dist/esm-node/runtime/dataMutation.mjs +2 -167
- package/dist/esm-node/runtime/formData.mjs +64 -0
- package/dist/esm-node/runtime/loaderBridge.mjs +5 -9
- package/dist/esm-node/runtime/plugin.mjs +14 -118
- package/dist/esm-node/runtime/plugin.node.mjs +41 -121
- package/dist/esm-node/runtime/pluginShared.mjs +41 -0
- package/dist/esm-node/runtime/prefetchLink.mjs +18 -5
- package/dist/esm-node/runtime/register.mjs +1 -14
- package/dist/esm-node/runtime/routeTree/components.mjs +56 -0
- package/dist/esm-node/runtime/routeTree/construction.mjs +112 -0
- package/dist/esm-node/runtime/routeTree/index.mjs +3 -0
- package/dist/esm-node/runtime/routeTree/loaders.mjs +118 -0
- package/dist/esm-node/runtime/routeTree/paths.mjs +17 -0
- package/dist/esm-node/runtime/routeTree/staticData.mjs +23 -0
- package/dist/esm-node/runtime/routeTree/tanstackRoutes.mjs +14 -0
- package/dist/esm-node/runtime/routeTree/types.mjs +1 -0
- package/dist/esm-node/runtime/routeTree.mjs +1 -318
- package/dist/esm-node/runtime/router.mjs +16 -2
- package/dist/esm-node/runtime/rsc/CompositeComponent.mjs +18 -13
- package/dist/esm-node/runtime/rsc/ReplayableStream.mjs +1 -1
- package/dist/esm-node/runtime/rsc/RscNodeRenderer.mjs +4 -15
- package/dist/esm-node/runtime/rsc/client.mjs +6 -26
- package/dist/esm-node/runtime/rsc/flightSerialization.mjs +89 -0
- package/dist/esm-node/runtime/rsc/payloadErrors.mjs +50 -0
- package/dist/esm-node/runtime/rsc/payloadFetch.mjs +56 -0
- package/dist/esm-node/runtime/rsc/payloadRouter.mjs +12 -133
- package/dist/esm-node/runtime/rsc/payloadRoutes.mjs +51 -0
- package/dist/esm-node/runtime/rsc/payloadStorage.mjs +15 -0
- package/dist/esm-node/runtime/rsc/server.mjs +17 -21
- package/dist/esm-node/runtime/rsc/shared.mjs +22 -0
- package/dist/esm-node/runtime/rsc/slotUsageSanitizer.mjs +1 -0
- package/dist/esm-node/runtime/rsc/treeGetter.mjs +35 -0
- package/dist/esm-node/runtime/shared/isAbsoluteUrl.mjs +10 -0
- package/dist/esm-node/runtime/ssrManagedTags.mjs +54 -0
- package/dist/esm-node/runtime/ssrPreload.mjs +52 -0
- package/dist/esm-node/runtime/ssrTypes.mjs +1 -0
- package/dist/esm-node/runtime/state.mjs +1 -1
- package/dist/esm-node/runtime/submitAction.mjs +121 -0
- package/dist/esm-node/runtime/utils.mjs +47 -75
- package/dist/types/cli/artifacts.d.ts +33 -0
- package/dist/types/cli/index.d.ts +2 -22
- package/dist/types/cli/tanstackTypes/canonicalRoutes.d.ts +22 -0
- package/dist/types/cli/tanstackTypes/shared.d.ts +20 -0
- package/dist/types/cli/tanstackTypes/source.d.ts +12 -0
- package/dist/types/cli/tanstackTypes.d.ts +3 -31
- package/dist/types/runtime/blockingSubscribe.d.ts +1 -0
- package/dist/types/runtime/clientBasepath.d.ts +1 -0
- package/dist/types/runtime/clientHydration.d.ts +10 -0
- package/dist/types/runtime/dataMutation.d.ts +3 -12
- package/dist/types/runtime/formData.d.ts +24 -0
- package/dist/types/runtime/loaderBridge.d.ts +2 -1
- package/dist/types/runtime/plugin.d.ts +1 -1
- package/dist/types/runtime/plugin.node.d.ts +1 -1
- package/dist/types/runtime/pluginShared.d.ts +38 -0
- package/dist/types/runtime/register.d.ts +10 -9
- package/dist/types/runtime/routeTree/components.d.ts +7 -0
- package/dist/types/runtime/routeTree/construction.d.ts +5 -0
- package/dist/types/runtime/routeTree/index.d.ts +2 -0
- package/dist/types/runtime/routeTree/loaders.d.ts +4 -0
- package/dist/types/runtime/routeTree/paths.d.ts +3 -0
- package/dist/types/runtime/routeTree/staticData.d.ts +19 -0
- package/dist/types/runtime/routeTree/tanstackRoutes.d.ts +4 -0
- package/dist/types/runtime/routeTree/types.d.ts +76 -0
- package/dist/types/runtime/routeTree.d.ts +1 -9
- package/dist/types/runtime/router.d.ts +6 -7
- package/dist/types/runtime/rsc/CompositeComponent.d.ts +1 -2
- package/dist/types/runtime/rsc/ReplayableStream.d.ts +3 -2
- package/dist/types/runtime/rsc/RscNodeRenderer.d.ts +2 -3
- package/dist/types/runtime/rsc/SlotContext.d.ts +2 -1
- package/dist/types/runtime/rsc/client.d.ts +2 -0
- package/dist/types/runtime/rsc/flightSerialization.d.ts +3 -0
- package/dist/types/runtime/rsc/payloadErrors.d.ts +6 -0
- package/dist/types/runtime/rsc/payloadFetch.d.ts +8 -0
- package/dist/types/runtime/rsc/payloadRouter.d.ts +2 -10
- package/dist/types/runtime/rsc/payloadRoutes.d.ts +40 -0
- package/dist/types/runtime/rsc/payloadStorage.d.ts +5 -0
- package/dist/types/runtime/rsc/shared.d.ts +18 -0
- package/dist/types/runtime/rsc/treeGetter.d.ts +1 -0
- package/dist/types/runtime/shared/isAbsoluteUrl.d.ts +1 -0
- package/dist/types/runtime/ssrManagedTags.d.ts +7 -0
- package/dist/types/runtime/ssrPreload.d.ts +2 -0
- package/dist/types/runtime/ssrTypes.d.ts +44 -0
- package/dist/types/runtime/state.d.ts +1 -1
- package/dist/types/runtime/submitAction.d.ts +14 -0
- package/dist/types/runtime/types.d.ts +4 -10
- package/dist/types/runtime/utils.d.ts +4 -24
- package/package.json +37 -17
- package/rstest.config.mts +23 -0
- package/src/cli/artifacts.ts +255 -0
- package/src/cli/index.ts +7 -185
- package/src/cli/tanstackTypes/canonicalRoutes.ts +157 -0
- package/src/cli/tanstackTypes/shared.ts +113 -0
- package/src/cli/tanstackTypes/source.ts +414 -0
- package/src/cli/tanstackTypes.ts +4 -647
- package/src/runtime/blockingSubscribe.ts +48 -0
- package/src/runtime/clientBasepath.ts +12 -0
- package/src/runtime/clientHydration.ts +149 -0
- package/src/runtime/dataMutation.tsx +9 -306
- package/src/runtime/formData.ts +153 -0
- package/src/runtime/loaderBridge.ts +11 -12
- package/src/runtime/plugin.node.tsx +76 -291
- package/src/runtime/plugin.tsx +21 -257
- package/src/runtime/pluginShared.ts +112 -0
- package/src/runtime/prefetchLink.tsx +78 -15
- package/src/runtime/register.ts +10 -42
- package/src/runtime/routeTree/components.ts +130 -0
- package/src/runtime/routeTree/construction.ts +238 -0
- package/src/runtime/routeTree/index.ts +7 -0
- package/src/runtime/routeTree/loaders.ts +232 -0
- package/src/runtime/routeTree/paths.ts +36 -0
- package/src/runtime/routeTree/staticData.ts +66 -0
- package/src/runtime/routeTree/tanstackRoutes.ts +36 -0
- package/src/runtime/routeTree/types.ts +87 -0
- package/src/runtime/routeTree.ts +5 -750
- package/src/runtime/router.ts +35 -7
- package/src/runtime/rsc/CompositeComponent.tsx +29 -20
- package/src/runtime/rsc/ReplayableStream.ts +2 -2
- package/src/runtime/rsc/RscNodeRenderer.tsx +9 -27
- package/src/runtime/rsc/SlotContext.tsx +1 -1
- package/src/runtime/rsc/client.tsx +12 -40
- package/src/runtime/rsc/flightSerialization.ts +158 -0
- package/src/runtime/rsc/payloadErrors.ts +73 -0
- package/src/runtime/rsc/payloadFetch.ts +92 -0
- package/src/runtime/rsc/payloadRouter.ts +29 -234
- package/src/runtime/rsc/payloadRoutes.ts +122 -0
- package/src/runtime/rsc/payloadStorage.ts +35 -0
- package/src/runtime/rsc/server.tsx +20 -29
- package/src/runtime/rsc/shared.ts +70 -0
- package/src/runtime/rsc/slotUsageSanitizer.ts +4 -0
- package/src/runtime/rsc/treeGetter.tsx +52 -0
- package/src/runtime/shared/isAbsoluteUrl.ts +8 -0
- package/src/runtime/ssrManagedTags.ts +107 -0
- package/src/runtime/ssrPreload.ts +125 -0
- package/src/runtime/ssrTypes.ts +51 -0
- package/src/runtime/state.ts +9 -3
- package/src/runtime/submitAction.ts +201 -0
- package/src/runtime/types.ts +4 -18
- package/src/runtime/utils.tsx +76 -110
- package/src/types/react-server-dom-rspack.d.ts +56 -0
- package/tests/castRatchet.test.ts +85 -0
- package/tests/realm-isolation.test.ts +114 -0
- package/tests/router/cli.test.ts +7 -0
- package/tests/router/clientHydration.test.tsx +61 -0
- package/tests/router/dataMutation.test.tsx +59 -0
- package/tests/router/fixtures/legacyRuntimeRouter.ts +10 -0
- package/tests/router/fixtures/router-gen.golden.txt +71 -0
- package/tests/router/fixtures/router-gen.oxlint.json +5 -0
- package/tests/router/flightSerialization.roundtrip.test.tsx +137 -0
- package/tests/router/generateRouteArtifacts.test.ts +106 -0
- package/tests/router/hooks.test.ts +14 -0
- package/tests/router/loaderBridge.test.ts +21 -0
- package/tests/router/prefetchLink.test.tsx +106 -59
- package/tests/router/prefetchLinkPreload.test.tsx +85 -0
- package/tests/router/register.test.ts +1 -39
- package/tests/router/routeTree.test.ts +51 -11
- package/tests/router/routerCompatibility.test.ts +245 -0
- package/tests/router/rsc.test.tsx +189 -0
- package/tests/router/rscPayloadRouterMatrix.test.ts +197 -0
- package/tests/router/slotUsageSanitizer.test.ts +23 -0
- package/tests/router/ssrPreload.test.ts +30 -0
- package/tests/router/tanstackTypes.test.ts +298 -1
- package/dist/esm/runtime/pluginCore.mjs +0 -14
- package/dist/esm-node/runtime/pluginCore.mjs +0 -15
- package/dist/types/runtime/pluginCore.d.ts +0 -21
- package/src/runtime/pluginCore.ts +0 -48
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
pickRouteModuleComponent: ()=>pickRouteModuleComponent,
|
|
32
|
+
toErrorComponent: ()=>toErrorComponent,
|
|
33
|
+
toPendingComponent: ()=>toPendingComponent,
|
|
34
|
+
toRouteComponent: ()=>toRouteComponent
|
|
35
|
+
});
|
|
36
|
+
const external_react_namespaceObject = require("react");
|
|
37
|
+
function pickRouteModuleComponent(routeModule, seen = new Set()) {
|
|
38
|
+
if ('function' == typeof routeModule || routeModule && 'object' == typeof routeModule && '$$typeof' in routeModule) return routeModule;
|
|
39
|
+
if (!routeModule || 'object' != typeof routeModule) return;
|
|
40
|
+
if (seen.has(routeModule)) return;
|
|
41
|
+
seen.add(routeModule);
|
|
42
|
+
const module = routeModule;
|
|
43
|
+
for (const candidate of [
|
|
44
|
+
module.default,
|
|
45
|
+
module.Component
|
|
46
|
+
]){
|
|
47
|
+
const component = pickRouteModuleComponent(candidate, seen);
|
|
48
|
+
if (component) return component;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function createServerLazyImportComponent(lazyImport, fallbackComponent) {
|
|
52
|
+
if ("u" > typeof document) return fallbackComponent;
|
|
53
|
+
let resolvedComponent;
|
|
54
|
+
let pendingLoad;
|
|
55
|
+
const load = async ()=>{
|
|
56
|
+
if (resolvedComponent) return resolvedComponent;
|
|
57
|
+
const routeModule = await lazyImport();
|
|
58
|
+
const component = pickRouteModuleComponent(routeModule);
|
|
59
|
+
if (component) resolvedComponent = component;
|
|
60
|
+
return resolvedComponent;
|
|
61
|
+
};
|
|
62
|
+
const Component = (props)=>{
|
|
63
|
+
if (resolvedComponent) return (0, external_react_namespaceObject.createElement)(resolvedComponent, props);
|
|
64
|
+
pendingLoad ||= load();
|
|
65
|
+
throw pendingLoad;
|
|
66
|
+
};
|
|
67
|
+
Component.load = load;
|
|
68
|
+
Component.preload = load;
|
|
69
|
+
return Component;
|
|
70
|
+
}
|
|
71
|
+
function toRouteComponent(routeObject, options = {}) {
|
|
72
|
+
const route = routeObject;
|
|
73
|
+
const lazyImport = 'function' == typeof route.lazyImport ? route.lazyImport : void 0;
|
|
74
|
+
const routeComponent = route.Component || route.component;
|
|
75
|
+
const fallbackComponent = routeComponent ? routeComponent : route.element ? ()=>route.element : void 0;
|
|
76
|
+
if (lazyImport && fallbackComponent) return createServerLazyImportComponent(lazyImport, fallbackComponent);
|
|
77
|
+
if (routeComponent) return routeComponent;
|
|
78
|
+
const element = route.element;
|
|
79
|
+
if (element) return ()=>element;
|
|
80
|
+
}
|
|
81
|
+
function toErrorComponent(routeObject) {
|
|
82
|
+
const route = routeObject;
|
|
83
|
+
if (route.ErrorBoundary) return route.ErrorBoundary;
|
|
84
|
+
if (route.errorElement) return ()=>route.errorElement;
|
|
85
|
+
}
|
|
86
|
+
function toPendingComponent(routeObject) {
|
|
87
|
+
const route = routeObject;
|
|
88
|
+
return route.HydrateFallback || route.pendingComponent || void 0;
|
|
89
|
+
}
|
|
90
|
+
exports.pickRouteModuleComponent = __webpack_exports__.pickRouteModuleComponent;
|
|
91
|
+
exports.toErrorComponent = __webpack_exports__.toErrorComponent;
|
|
92
|
+
exports.toPendingComponent = __webpack_exports__.toPendingComponent;
|
|
93
|
+
exports.toRouteComponent = __webpack_exports__.toRouteComponent;
|
|
94
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
95
|
+
"pickRouteModuleComponent",
|
|
96
|
+
"toErrorComponent",
|
|
97
|
+
"toPendingComponent",
|
|
98
|
+
"toRouteComponent"
|
|
99
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
100
|
+
Object.defineProperty(exports, '__esModule', {
|
|
101
|
+
value: true
|
|
102
|
+
});
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createRouteTreeFromRouteObjects: ()=>createRouteTreeFromRouteObjects,
|
|
32
|
+
getModernRouteIdsFromMatches: ()=>getModernRouteIdsFromMatches
|
|
33
|
+
});
|
|
34
|
+
const context_namespaceObject = require("@modern-js/runtime/context");
|
|
35
|
+
const react_router_namespaceObject = require("@tanstack/react-router");
|
|
36
|
+
const external_outlet_js_namespaceObject = require("../outlet.js");
|
|
37
|
+
const external_components_js_namespaceObject = require("./components.js");
|
|
38
|
+
const external_loaders_js_namespaceObject = require("./loaders.js");
|
|
39
|
+
const external_paths_js_namespaceObject = require("./paths.js");
|
|
40
|
+
const external_staticData_js_namespaceObject = require("./staticData.js");
|
|
41
|
+
const external_tanstackRoutes_js_namespaceObject = require("./tanstackRoutes.js");
|
|
42
|
+
function createRouteFromRouteObject(opts) {
|
|
43
|
+
const { options = {}, parent, pathlessFallbackId = 'pathless', routeObject } = opts;
|
|
44
|
+
const modernRouteObject = routeObject;
|
|
45
|
+
const revalidationState = {};
|
|
46
|
+
const shouldRevalidate = modernRouteObject.shouldRevalidate;
|
|
47
|
+
const shouldReload = (0, external_loaders_js_namespaceObject.createModernShouldReload)(shouldRevalidate, revalidationState);
|
|
48
|
+
const stableFallbackId = routeObject.id || modernRouteObject.file || pathlessFallbackId;
|
|
49
|
+
const component = (0, external_components_js_namespaceObject.toRouteComponent)(routeObject, options);
|
|
50
|
+
const base = {
|
|
51
|
+
getParentRoute: ()=>parent,
|
|
52
|
+
component,
|
|
53
|
+
pendingComponent: (0, external_components_js_namespaceObject.toPendingComponent)(routeObject),
|
|
54
|
+
errorComponent: (0, external_components_js_namespaceObject.toErrorComponent)(routeObject),
|
|
55
|
+
validateSearch: modernRouteObject.validateSearch,
|
|
56
|
+
loaderDeps: modernRouteObject.loaderDeps,
|
|
57
|
+
staticData: (0, external_staticData_js_namespaceObject.createRouteStaticData)({
|
|
58
|
+
modernRouteId: routeObject.id,
|
|
59
|
+
modernRouteAction: modernRouteObject.action,
|
|
60
|
+
modernRouteHandle: (0, external_staticData_js_namespaceObject.mergeModernRouteHandle)(modernRouteObject),
|
|
61
|
+
modernRouteHasAction: modernRouteObject.hasAction || Boolean(modernRouteObject.action),
|
|
62
|
+
modernRouteHasClientLoader: modernRouteObject.hasClientLoader || void 0 !== modernRouteObject.clientData,
|
|
63
|
+
modernRouteHasLoader: modernRouteObject.hasLoader || 'function' == typeof modernRouteObject.loader,
|
|
64
|
+
modernRouteIsClientComponent: modernRouteObject.isClientComponent,
|
|
65
|
+
modernRouteLoader: modernRouteObject.loader,
|
|
66
|
+
modernRouteShouldRevalidate: shouldRevalidate
|
|
67
|
+
}),
|
|
68
|
+
loader: (0, external_loaders_js_namespaceObject.wrapRouteObjectLoader)(routeObject, revalidationState, options)
|
|
69
|
+
};
|
|
70
|
+
if (modernRouteObject.inValidSSRRoute) base.ssr = false;
|
|
71
|
+
if (shouldReload) base.shouldReload = shouldReload;
|
|
72
|
+
if ((0, external_paths_js_namespaceObject.isRouteObjectPathlessLayout)(routeObject)) base.id = stableFallbackId;
|
|
73
|
+
else base.path = routeObject.index ? '/' : (0, external_paths_js_namespaceObject.toTanstackPath)(routeObject.path || '');
|
|
74
|
+
const route = (0, external_tanstackRoutes_js_namespaceObject.createTanstackRoute)(base);
|
|
75
|
+
(0, external_tanstackRoutes_js_namespaceObject.wrapRouteComponentWithModernContext)(route, component, routeObject.id);
|
|
76
|
+
const children = routeObject.children;
|
|
77
|
+
if (children && children.length > 0) {
|
|
78
|
+
const childRoutes = children.map((child, index)=>createRouteFromRouteObject({
|
|
79
|
+
options,
|
|
80
|
+
parent: route,
|
|
81
|
+
pathlessFallbackId: `pathless-${index}`,
|
|
82
|
+
routeObject: child
|
|
83
|
+
}));
|
|
84
|
+
route.addChildren(childRoutes);
|
|
85
|
+
}
|
|
86
|
+
return route;
|
|
87
|
+
}
|
|
88
|
+
function getRootLikeRouteObject(routes) {
|
|
89
|
+
return routes.find((route)=>'/' === route.path && !route.index);
|
|
90
|
+
}
|
|
91
|
+
function createRouteTreeFromRouteObjects(routes, options = {}) {
|
|
92
|
+
const rootLikeRoute = getRootLikeRouteObject(routes);
|
|
93
|
+
const rootRevalidationState = {};
|
|
94
|
+
const rootShouldRevalidate = rootLikeRoute?.shouldRevalidate;
|
|
95
|
+
const rootShouldReload = (0, external_loaders_js_namespaceObject.createModernShouldReload)(rootShouldRevalidate, rootRevalidationState);
|
|
96
|
+
const rootComponent = rootLikeRoute ? (0, external_components_js_namespaceObject.toRouteComponent)(rootLikeRoute) : void 0;
|
|
97
|
+
const rootRouteOptions = {
|
|
98
|
+
component: rootComponent,
|
|
99
|
+
pendingComponent: rootLikeRoute ? (0, external_components_js_namespaceObject.toPendingComponent)(rootLikeRoute) : void 0,
|
|
100
|
+
errorComponent: rootLikeRoute ? (0, external_components_js_namespaceObject.toErrorComponent)(rootLikeRoute) : void 0,
|
|
101
|
+
validateSearch: rootLikeRoute?.validateSearch,
|
|
102
|
+
loaderDeps: rootLikeRoute?.loaderDeps,
|
|
103
|
+
notFoundComponent: context_namespaceObject.DefaultNotFound,
|
|
104
|
+
staticData: (0, external_staticData_js_namespaceObject.createRouteStaticData)({
|
|
105
|
+
modernRouteId: rootLikeRoute?.id,
|
|
106
|
+
modernRouteAction: rootLikeRoute?.action,
|
|
107
|
+
modernRouteHandle: rootLikeRoute ? (0, external_staticData_js_namespaceObject.mergeModernRouteHandle)(rootLikeRoute) : void 0,
|
|
108
|
+
modernRouteHasAction: rootLikeRoute?.hasAction || Boolean(rootLikeRoute?.action),
|
|
109
|
+
modernRouteHasClientLoader: rootLikeRoute?.hasClientLoader || void 0 !== rootLikeRoute?.clientData,
|
|
110
|
+
modernRouteHasLoader: rootLikeRoute?.hasLoader || 'function' == typeof rootLikeRoute?.loader,
|
|
111
|
+
modernRouteIsClientComponent: rootLikeRoute?.isClientComponent,
|
|
112
|
+
modernRouteLoader: rootLikeRoute?.loader,
|
|
113
|
+
modernRouteShouldRevalidate: rootShouldRevalidate
|
|
114
|
+
}),
|
|
115
|
+
loader: rootLikeRoute ? (0, external_loaders_js_namespaceObject.wrapRouteObjectLoader)(rootLikeRoute, rootRevalidationState, options) : void 0
|
|
116
|
+
};
|
|
117
|
+
if (rootShouldReload) rootRouteOptions.shouldReload = rootShouldReload;
|
|
118
|
+
if (rootLikeRoute?.inValidSSRRoute) rootRouteOptions.ssr = false;
|
|
119
|
+
const rootRoute = (0, external_tanstackRoutes_js_namespaceObject.createTanstackRootRoute)(rootRouteOptions);
|
|
120
|
+
if (rootComponent) rootRoute.options.component = (0, external_outlet_js_namespaceObject.withModernRouteMatchContext)(rootComponent, react_router_namespaceObject.rootRouteId);
|
|
121
|
+
const topLevel = rootLikeRoute ? [
|
|
122
|
+
...rootLikeRoute.children || [],
|
|
123
|
+
...routes.filter((route)=>route !== rootLikeRoute)
|
|
124
|
+
] : routes;
|
|
125
|
+
const childRoutes = topLevel.map((routeObject, index)=>createRouteFromRouteObject({
|
|
126
|
+
options,
|
|
127
|
+
parent: rootRoute,
|
|
128
|
+
pathlessFallbackId: `pathless-${index}`,
|
|
129
|
+
routeObject
|
|
130
|
+
}));
|
|
131
|
+
rootRoute.addChildren(childRoutes);
|
|
132
|
+
return rootRoute;
|
|
133
|
+
}
|
|
134
|
+
function getModernRouteIdsFromMatches(router) {
|
|
135
|
+
const matches = router.state.matches || [];
|
|
136
|
+
const routesById = router.routesById;
|
|
137
|
+
const ids = matches.map((match)=>{
|
|
138
|
+
const normalizedMatch = match;
|
|
139
|
+
const routeId = 'string' == typeof normalizedMatch.routeId ? normalizedMatch.routeId : void 0;
|
|
140
|
+
return normalizedMatch.route?.options?.staticData?.modernRouteId ?? (routeId ? routesById?.[routeId]?.options?.staticData?.modernRouteId : void 0);
|
|
141
|
+
}).filter((id)=>'string' == typeof id);
|
|
142
|
+
return Array.from(new Set(ids));
|
|
143
|
+
}
|
|
144
|
+
exports.createRouteTreeFromRouteObjects = __webpack_exports__.createRouteTreeFromRouteObjects;
|
|
145
|
+
exports.getModernRouteIdsFromMatches = __webpack_exports__.getModernRouteIdsFromMatches;
|
|
146
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
147
|
+
"createRouteTreeFromRouteObjects",
|
|
148
|
+
"getModernRouteIdsFromMatches"
|
|
149
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
150
|
+
Object.defineProperty(exports, '__esModule', {
|
|
151
|
+
value: true
|
|
152
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createRouteTreeFromRouteObjects: ()=>external_construction_js_namespaceObject.createRouteTreeFromRouteObjects,
|
|
32
|
+
getModernRouteIdsFromMatches: ()=>external_construction_js_namespaceObject.getModernRouteIdsFromMatches,
|
|
33
|
+
pickRouteModuleComponent: ()=>external_components_js_namespaceObject.pickRouteModuleComponent
|
|
34
|
+
});
|
|
35
|
+
const external_components_js_namespaceObject = require("./components.js");
|
|
36
|
+
const external_construction_js_namespaceObject = require("./construction.js");
|
|
37
|
+
exports.createRouteTreeFromRouteObjects = __webpack_exports__.createRouteTreeFromRouteObjects;
|
|
38
|
+
exports.getModernRouteIdsFromMatches = __webpack_exports__.getModernRouteIdsFromMatches;
|
|
39
|
+
exports.pickRouteModuleComponent = __webpack_exports__.pickRouteModuleComponent;
|
|
40
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
41
|
+
"createRouteTreeFromRouteObjects",
|
|
42
|
+
"getModernRouteIdsFromMatches",
|
|
43
|
+
"pickRouteModuleComponent"
|
|
44
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
45
|
+
Object.defineProperty(exports, '__esModule', {
|
|
46
|
+
value: true
|
|
47
|
+
});
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createModernShouldReload: ()=>createModernShouldReload,
|
|
32
|
+
wrapRouteObjectLoader: ()=>wrapRouteObjectLoader
|
|
33
|
+
});
|
|
34
|
+
const react_router_namespaceObject = require("@tanstack/react-router");
|
|
35
|
+
const external_loaderBridge_js_namespaceObject = require("../loaderBridge.js");
|
|
36
|
+
const payloadRouter_js_namespaceObject = require("../rsc/payloadRouter.js");
|
|
37
|
+
function isModernDeferredData(value) {
|
|
38
|
+
if (!value || 'object' != typeof value) return false;
|
|
39
|
+
const deferred = value;
|
|
40
|
+
return true === deferred.__modern_deferred && Boolean(deferred.data) && 'object' == typeof deferred.data && !Array.isArray(deferred.data);
|
|
41
|
+
}
|
|
42
|
+
function normalizeModernLoaderResult(result) {
|
|
43
|
+
return isModernDeferredData(result) ? result.data : result;
|
|
44
|
+
}
|
|
45
|
+
function normalizeModernLoaderResponse(result) {
|
|
46
|
+
if ((0, external_loaderBridge_js_namespaceObject.isResponse)(result)) {
|
|
47
|
+
if ((0, external_loaderBridge_js_namespaceObject.isRedirectResponse)(result)) {
|
|
48
|
+
const location = result.headers.get('Location') || '/';
|
|
49
|
+
(0, external_loaderBridge_js_namespaceObject.throwTanstackRedirect)(location);
|
|
50
|
+
}
|
|
51
|
+
if (404 === result.status) throw (0, react_router_namespaceObject.notFound)();
|
|
52
|
+
}
|
|
53
|
+
return normalizeModernLoaderResult(result);
|
|
54
|
+
}
|
|
55
|
+
function createModernRequest(input, signal) {
|
|
56
|
+
return new Request(input, {
|
|
57
|
+
signal
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function getModernUrlFromLoaderContext(ctx) {
|
|
61
|
+
const href = 'string' == typeof ctx?.location ? ctx.location : ctx?.location?.publicHref || ctx?.location?.href || ctx?.location?.url?.href || '/';
|
|
62
|
+
const baseRequest = ctx?.context?.request instanceof Request ? ctx.context.request : void 0;
|
|
63
|
+
const baseUrl = baseRequest?.url || ("u" > typeof window ? window.origin : 'http://localhost');
|
|
64
|
+
return new URL(href || '/', baseUrl);
|
|
65
|
+
}
|
|
66
|
+
function rememberRouteLocation(state, ctx) {
|
|
67
|
+
state.currentUrl = getModernUrlFromLoaderContext(ctx);
|
|
68
|
+
state.currentParams = ctx?.params || {};
|
|
69
|
+
}
|
|
70
|
+
function createModernShouldReload(shouldRevalidate, state) {
|
|
71
|
+
if ('function' != typeof shouldRevalidate) return;
|
|
72
|
+
const revalidate = shouldRevalidate;
|
|
73
|
+
return (ctx)=>{
|
|
74
|
+
const nextUrl = getModernUrlFromLoaderContext(ctx);
|
|
75
|
+
const nextParams = ctx?.params || {};
|
|
76
|
+
const result = revalidate({
|
|
77
|
+
currentUrl: state.currentUrl || nextUrl,
|
|
78
|
+
currentParams: state.currentParams || nextParams,
|
|
79
|
+
nextUrl,
|
|
80
|
+
nextParams,
|
|
81
|
+
defaultShouldRevalidate: void 0
|
|
82
|
+
});
|
|
83
|
+
state.currentUrl = nextUrl;
|
|
84
|
+
state.currentParams = nextParams;
|
|
85
|
+
return 'boolean' == typeof result ? result : void 0;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function isRouteObjectSplatRoute(route) {
|
|
89
|
+
return 'string' == typeof route.path && route.path.includes('*');
|
|
90
|
+
}
|
|
91
|
+
function mapParamsForRouteObjectLoader({ route, params }) {
|
|
92
|
+
if (isRouteObjectSplatRoute(route)) {
|
|
93
|
+
const { _splat, ...rest } = params;
|
|
94
|
+
if (void 0 !== _splat) return {
|
|
95
|
+
...rest,
|
|
96
|
+
'*': _splat
|
|
97
|
+
};
|
|
98
|
+
return rest;
|
|
99
|
+
}
|
|
100
|
+
return params;
|
|
101
|
+
}
|
|
102
|
+
function wrapRouteObjectLoader(route, revalidationState, options = {}) {
|
|
103
|
+
const modernRoute = route;
|
|
104
|
+
const routeLoader = modernRoute.loader;
|
|
105
|
+
if ('function' != typeof routeLoader) return;
|
|
106
|
+
return async (ctx)=>{
|
|
107
|
+
try {
|
|
108
|
+
if (revalidationState) rememberRouteLocation(revalidationState, ctx);
|
|
109
|
+
if ('function' == typeof modernRoute.lazyImport) try {
|
|
110
|
+
await modernRoute.lazyImport();
|
|
111
|
+
} catch {}
|
|
112
|
+
const signal = ctx?.abortController?.signal || ctx?.signal || new AbortController().signal;
|
|
113
|
+
const baseRequest = ctx?.context?.request instanceof Request ? ctx.context.request : void 0;
|
|
114
|
+
const href = 'string' == typeof ctx?.location ? ctx.location : ctx?.location?.publicHref || ctx?.location?.href || ctx?.location?.url?.href || '';
|
|
115
|
+
const request = void 0 !== baseRequest ? new Request(baseRequest, {
|
|
116
|
+
signal
|
|
117
|
+
}) : createModernRequest(href, signal);
|
|
118
|
+
const params = mapParamsForRouteObjectLoader({
|
|
119
|
+
route,
|
|
120
|
+
params: ctx.params || {}
|
|
121
|
+
});
|
|
122
|
+
const loadModernData = async ()=>{
|
|
123
|
+
const result = await routeLoader({
|
|
124
|
+
request,
|
|
125
|
+
params,
|
|
126
|
+
context: ctx?.context?.requestContext
|
|
127
|
+
});
|
|
128
|
+
return normalizeModernLoaderResponse(result);
|
|
129
|
+
};
|
|
130
|
+
if (options.rscPayloadRouter && (0, payloadRouter_js_namespaceObject.isTanstackRscPayloadNavigationEnabled)()) return (0, payloadRouter_js_namespaceObject.loadTanstackRscRouteData)({
|
|
131
|
+
hasClientLoader: modernRoute.hasClientLoader || void 0 !== modernRoute.clientData,
|
|
132
|
+
loadClientData: loadModernData,
|
|
133
|
+
request,
|
|
134
|
+
routeId: ctx.route?.id
|
|
135
|
+
});
|
|
136
|
+
return loadModernData();
|
|
137
|
+
} catch (err) {
|
|
138
|
+
if ((0, external_loaderBridge_js_namespaceObject.isResponse)(err)) {
|
|
139
|
+
if ((0, external_loaderBridge_js_namespaceObject.isTanstackRedirect)(err)) throw err;
|
|
140
|
+
if ((0, external_loaderBridge_js_namespaceObject.isRedirectResponse)(err)) {
|
|
141
|
+
const location = err.headers.get('Location') || '/';
|
|
142
|
+
(0, external_loaderBridge_js_namespaceObject.throwTanstackRedirect)(location);
|
|
143
|
+
}
|
|
144
|
+
if (404 === err.status) throw (0, react_router_namespaceObject.notFound)();
|
|
145
|
+
}
|
|
146
|
+
throw err;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
exports.createModernShouldReload = __webpack_exports__.createModernShouldReload;
|
|
151
|
+
exports.wrapRouteObjectLoader = __webpack_exports__.wrapRouteObjectLoader;
|
|
152
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
153
|
+
"createModernShouldReload",
|
|
154
|
+
"wrapRouteObjectLoader"
|
|
155
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
156
|
+
Object.defineProperty(exports, '__esModule', {
|
|
157
|
+
value: true
|
|
158
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
function toTanstackPath(pathname) {
|
|
31
|
+
return pathname.split('/').map((segment)=>{
|
|
32
|
+
if (!segment) return segment;
|
|
33
|
+
if ('*' === segment) return '$';
|
|
34
|
+
if (segment.startsWith(':')) {
|
|
35
|
+
const name = segment.slice(1);
|
|
36
|
+
if (name.endsWith('?')) return `{-$${name.slice(0, -1)}}`;
|
|
37
|
+
return `$${name}`;
|
|
38
|
+
}
|
|
39
|
+
return segment;
|
|
40
|
+
}).join('/');
|
|
41
|
+
}
|
|
42
|
+
function isRouteObjectPathlessLayout(route) {
|
|
43
|
+
return !route.path && !route.index;
|
|
44
|
+
}
|
|
45
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
46
|
+
isRouteObjectPathlessLayout: ()=>isRouteObjectPathlessLayout,
|
|
47
|
+
toTanstackPath: ()=>toTanstackPath
|
|
48
|
+
});
|
|
49
|
+
exports.isRouteObjectPathlessLayout = __webpack_exports__.isRouteObjectPathlessLayout;
|
|
50
|
+
exports.toTanstackPath = __webpack_exports__.toTanstackPath;
|
|
51
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
52
|
+
"isRouteObjectPathlessLayout",
|
|
53
|
+
"toTanstackPath"
|
|
54
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
55
|
+
Object.defineProperty(exports, '__esModule', {
|
|
56
|
+
value: true
|
|
57
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
function mergeModernRouteHandle(route) {
|
|
31
|
+
const config = route.config;
|
|
32
|
+
const handle = {
|
|
33
|
+
...route.handle,
|
|
34
|
+
...config && 'object' == typeof config ? config.handle : {}
|
|
35
|
+
};
|
|
36
|
+
return Object.keys(handle).length > 0 ? handle : void 0;
|
|
37
|
+
}
|
|
38
|
+
function createRouteStaticData(opts) {
|
|
39
|
+
const staticData = {};
|
|
40
|
+
if (opts.modernRouteId) staticData.modernRouteId = opts.modernRouteId;
|
|
41
|
+
if (opts.modernRouteAction) staticData.modernRouteAction = opts.modernRouteAction;
|
|
42
|
+
if (opts.modernRouteHandle) staticData.modernRouteHandle = opts.modernRouteHandle;
|
|
43
|
+
if (opts.modernRouteHasAction) staticData.modernRouteHasAction = true;
|
|
44
|
+
if (opts.modernRouteHasClientLoader) staticData.modernRouteHasClientLoader = true;
|
|
45
|
+
if (opts.modernRouteHasLoader) staticData.modernRouteHasLoader = true;
|
|
46
|
+
if (opts.modernRouteIsClientComponent) staticData.modernRouteIsClientComponent = true;
|
|
47
|
+
if (opts.modernRouteLoader) staticData.modernRouteLoader = opts.modernRouteLoader;
|
|
48
|
+
if (opts.modernRouteShouldRevalidate) staticData.modernRouteShouldRevalidate = opts.modernRouteShouldRevalidate;
|
|
49
|
+
return Object.keys(staticData).length > 0 ? staticData : void 0;
|
|
50
|
+
}
|
|
51
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
52
|
+
createRouteStaticData: ()=>createRouteStaticData,
|
|
53
|
+
mergeModernRouteHandle: ()=>mergeModernRouteHandle
|
|
54
|
+
});
|
|
55
|
+
exports.createRouteStaticData = __webpack_exports__.createRouteStaticData;
|
|
56
|
+
exports.mergeModernRouteHandle = __webpack_exports__.mergeModernRouteHandle;
|
|
57
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
58
|
+
"createRouteStaticData",
|
|
59
|
+
"mergeModernRouteHandle"
|
|
60
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
61
|
+
Object.defineProperty(exports, '__esModule', {
|
|
62
|
+
value: true
|
|
63
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createTanstackRootRoute: ()=>createTanstackRootRoute,
|
|
32
|
+
createTanstackRoute: ()=>createTanstackRoute,
|
|
33
|
+
wrapRouteComponentWithModernContext: ()=>wrapRouteComponentWithModernContext
|
|
34
|
+
});
|
|
35
|
+
const react_router_namespaceObject = require("@tanstack/react-router");
|
|
36
|
+
const external_outlet_js_namespaceObject = require("../outlet.js");
|
|
37
|
+
function createTanstackRoute(options) {
|
|
38
|
+
return (0, react_router_namespaceObject.createRoute)(options);
|
|
39
|
+
}
|
|
40
|
+
function createTanstackRootRoute(options) {
|
|
41
|
+
return (0, react_router_namespaceObject.createRootRoute)(options);
|
|
42
|
+
}
|
|
43
|
+
function wrapRouteComponentWithModernContext(route, component, routeId) {
|
|
44
|
+
const routeMatchId = routeId || route.id;
|
|
45
|
+
if (component && routeMatchId) route.options.component = (0, external_outlet_js_namespaceObject.withModernRouteMatchContext)(component, routeMatchId);
|
|
46
|
+
}
|
|
47
|
+
exports.createTanstackRootRoute = __webpack_exports__.createTanstackRootRoute;
|
|
48
|
+
exports.createTanstackRoute = __webpack_exports__.createTanstackRoute;
|
|
49
|
+
exports.wrapRouteComponentWithModernContext = __webpack_exports__.wrapRouteComponentWithModernContext;
|
|
50
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
|
+
"createTanstackRootRoute",
|
|
52
|
+
"createTanstackRoute",
|
|
53
|
+
"wrapRouteComponentWithModernContext"
|
|
54
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
55
|
+
Object.defineProperty(exports, '__esModule', {
|
|
56
|
+
value: true
|
|
57
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|