@teambit/react-router 0.0.1157 → 0.0.1159
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/{preview-1694488626516.js → preview-1694624356552.js} +2 -2
- package/dist/react-router.composition.js +1 -1
- package/dist/react-router.composition.js.map +1 -1
- package/dist/react-router.ui.runtime.js +13 -20
- package/dist/react-router.ui.runtime.js.map +1 -1
- package/dist/route-context.js +1 -1
- package/dist/route-context.js.map +1 -1
- package/package.json +5 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@0.0.1159/dist/react-router.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_react-router@0.0.1159/dist/react-router.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,6 +11,7 @@ function _react() {
|
|
|
12
11
|
};
|
|
13
12
|
return data;
|
|
14
13
|
}
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
16
16
|
style: {
|
|
17
17
|
height: '100%',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["react-router.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/react-router.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA0D,CAAE,CACxF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
require("core-js/modules/es.array.iterator.js");
|
|
5
|
-
require("core-js/modules/es.promise.js");
|
|
6
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
6
|
exports.ReactRouterUI = void 0;
|
|
11
|
-
function _defineProperty2() {
|
|
12
|
-
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
_defineProperty2 = function () {
|
|
14
|
-
return data;
|
|
15
|
-
};
|
|
16
|
-
return data;
|
|
17
|
-
}
|
|
18
7
|
function _react() {
|
|
19
8
|
const data = _interopRequireDefault(require("react"));
|
|
20
9
|
_react = function () {
|
|
@@ -64,6 +53,10 @@ function _LocationHooks() {
|
|
|
64
53
|
};
|
|
65
54
|
return data;
|
|
66
55
|
}
|
|
56
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
57
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
58
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
59
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
67
60
|
class ReactRouterUI {
|
|
68
61
|
constructor(
|
|
69
62
|
/**
|
|
@@ -76,11 +69,11 @@ class ReactRouterUI {
|
|
|
76
69
|
routeChangeListener) {
|
|
77
70
|
this.routeSlot = routeSlot;
|
|
78
71
|
this.routeChangeListener = routeChangeListener;
|
|
79
|
-
(
|
|
72
|
+
_defineProperty(this, "routingMode", _routingMethod().Routing.url);
|
|
80
73
|
/**
|
|
81
74
|
* change browser location
|
|
82
75
|
*/
|
|
83
|
-
(
|
|
76
|
+
_defineProperty(this, "navigateTo", (path, action) => {
|
|
84
77
|
var _this$navigate, _this$navigate2;
|
|
85
78
|
const state = typeof path !== 'string' ? path.state : undefined;
|
|
86
79
|
switch (action) {
|
|
@@ -100,12 +93,12 @@ class ReactRouterUI {
|
|
|
100
93
|
});
|
|
101
94
|
}
|
|
102
95
|
});
|
|
103
|
-
(
|
|
104
|
-
(
|
|
96
|
+
_defineProperty(this, "navigate", undefined);
|
|
97
|
+
_defineProperty(this, "handleLocationChange", (location, action) => {
|
|
105
98
|
const listeners = this.routeChangeListener.values();
|
|
106
99
|
listeners.forEach(listener => listener(location, action));
|
|
107
100
|
});
|
|
108
|
-
(
|
|
101
|
+
_defineProperty(this, "RoutingContext", ({
|
|
109
102
|
children,
|
|
110
103
|
renderCtx
|
|
111
104
|
}) => {
|
|
@@ -118,7 +111,7 @@ class ReactRouterUI {
|
|
|
118
111
|
onNavigatorChange: nav => this.navigate = nav
|
|
119
112
|
}));
|
|
120
113
|
});
|
|
121
|
-
(
|
|
114
|
+
_defineProperty(this, "ServerRouting", ({
|
|
122
115
|
children,
|
|
123
116
|
renderCtx
|
|
124
117
|
}) => {
|
|
@@ -131,7 +124,7 @@ class ReactRouterUI {
|
|
|
131
124
|
onNavigatorChange: nav => this.navigate = nav
|
|
132
125
|
}));
|
|
133
126
|
});
|
|
134
|
-
(
|
|
127
|
+
_defineProperty(this, "renderPlugin", {
|
|
135
128
|
browserInit: () => {
|
|
136
129
|
const initialLocation = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
137
130
|
return {
|
|
@@ -185,8 +178,8 @@ class ReactRouterUI {
|
|
|
185
178
|
}
|
|
186
179
|
}
|
|
187
180
|
exports.ReactRouterUI = ReactRouterUI;
|
|
188
|
-
(
|
|
189
|
-
(
|
|
181
|
+
_defineProperty(ReactRouterUI, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
182
|
+
_defineProperty(ReactRouterUI, "runtime", _ui().UIRuntime);
|
|
190
183
|
_reactRouter().ReactRouterAspect.addRuntime(ReactRouterUI);
|
|
191
184
|
|
|
192
185
|
//# sourceMappingURL=react-router.ui.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","_harmony","_ui","_reactRouter","_routeContext","_routingMethod","_LocationHooks","ReactRouterUI","constructor","routeSlot","routeChangeListener","_defineProperty2","default","Routing","url","path","action","_this$navigate","_this$navigate2","state","undefined","navigate","call","replace","location","listeners","values","forEach","listener","children","renderCtx","createElement","RouteContext","reactRouterUi","routing","routingMode","initialLocation","LocationHooks","onLocationChange","handleLocationChange","onNavigatorChange","nav","static","browserInit","window","pathname","search","hash","serverInit","browser","reactClientContext","RoutingContext","reactServerContext","ServerRouting","renderRoutes","routes","RootRoute","rootRoutes","setRoutingMode","register","route","registerListener","provider","deps","config","routeChangeSlot","exports","Slot","withType","UIRuntime","ReactRouterAspect","addRuntime"],"sources":["react-router.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { NavigateFunction } from 'react-router-dom';\nimport type { Location, NavigationType, RouteProps } from 'react-router-dom';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport type { SSR } from '@teambit/ui';\nimport { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\n\nimport { ReactRouterAspect } from './react-router.aspect';\nimport { RouteContext, RootRoute } from './route-context';\nimport { Routing } from './routing-method';\nimport { LocationHooks } from './LocationHooks';\n\nexport type LocationListener = (location: Location, action: NavigationType) => void;\ntype RouteChangeSlot = SlotRegistry<LocationListener>;\ntype RenderContext = { initialLocation?: string };\n\nexport class ReactRouterUI {\n private routingMode = Routing.url;\n\n constructor(\n /**\n * route slot.\n */\n private routeSlot: RouteSlot,\n /**\n *\n */\n private routeChangeListener: RouteChangeSlot\n ) {}\n\n /**\n * render all slot routes.\n */\n renderRoutes(routes: RouteProps[]) {\n return <RootRoute routeSlot={this.routeSlot} rootRoutes={routes} />;\n }\n\n /** decides how navigation is stored and applied.\n * Url - updates the `window.location.pathname`.\n * Hash - updates `window.location.hash`.\n * InMemory - store state internally and don't update the browser.\n */\n setRoutingMode(routing: Routing) {\n this.routingMode = routing;\n }\n\n /**\n * register a new route.\n */\n register(route: RouteProps) {\n this.routeSlot.register(route);\n return this;\n }\n\n registerListener(listener: LocationListener) {\n this.routeChangeListener.register(listener);\n }\n\n /**\n * change browser location\n */\n navigateTo = (\n /** destination */\n path: Location | string,\n /** history action to execute (pop / push / replace) */\n action?: NavigationType\n ) => {\n const state = typeof path !== 'string' ? path.state : undefined;\n\n switch (action) {\n case 'POP':\n return; // TBD;\n case 'REPLACE':\n this.navigate?.(path, { replace: true, state });\n return;\n case 'PUSH':\n default:\n this.navigate?.(path, { state });\n }\n };\n\n private navigate?: NavigateFunction = undefined;\n\n private handleLocationChange = (location: Location, action: NavigationType) => {\n const listeners = this.routeChangeListener.values();\n listeners.forEach((listener) => listener(location, action));\n };\n\n private RoutingContext = ({ children, renderCtx }: { children: ReactNode; renderCtx?: RenderContext }) => {\n return (\n <RouteContext reactRouterUi={this} routing={this.routingMode} location={renderCtx?.initialLocation}>\n {children}\n <LocationHooks\n onLocationChange={this.handleLocationChange}\n onNavigatorChange={(nav) => (this.navigate = nav)}\n />\n </RouteContext>\n );\n };\n\n private ServerRouting = ({ children, renderCtx }: { children: ReactNode; renderCtx?: RenderContext }) => {\n return (\n <RouteContext reactRouterUi={this} routing={Routing.static} location={renderCtx?.initialLocation}>\n {children}\n <LocationHooks\n onLocationChange={this.handleLocationChange}\n onNavigatorChange={(nav) => (this.navigate = nav)}\n />\n </RouteContext>\n );\n };\n\n public renderPlugin: SSR.RenderPlugin<RenderContext> = {\n browserInit: () => {\n const initialLocation = `${window.location.pathname}${window.location.search}${window.location.hash}`;\n return { initialLocation };\n },\n serverInit: ({ browser }) => {\n const initialLocation = browser?.location.url;\n return { initialLocation };\n },\n reactClientContext: this.RoutingContext,\n reactServerContext: this.ServerRouting,\n };\n\n static slots = [Slot.withType<RouteProps>(), Slot.withType<LocationListener>()];\n static runtime = UIRuntime;\n\n static async provider(deps, config, [routeSlot, routeChangeSlot]: [RouteSlot, RouteChangeSlot]) {\n return new ReactRouterUI(routeSlot, routeChangeSlot);\n }\n}\n\nReactRouterAspect.addRuntime(ReactRouterUI);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,eAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,cAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,eAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,cAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMO,MAAMS,aAAa,CAAC;EAGzBC,WAAWA;EACT;AACJ;AACA;EACYC,SAAoB;EAC5B;AACJ;AACA;EACYC,mBAAoC,EAC5C;IAAA,K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_react","data","_interopRequireDefault","require","_harmony","_ui","_reactRouter","_routeContext","_routingMethod","_LocationHooks","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ReactRouterUI","constructor","routeSlot","routeChangeListener","Routing","url","path","action","_this$navigate","_this$navigate2","state","navigate","replace","location","listeners","values","forEach","listener","children","renderCtx","createElement","RouteContext","reactRouterUi","routing","routingMode","initialLocation","LocationHooks","onLocationChange","handleLocationChange","onNavigatorChange","nav","static","browserInit","window","pathname","search","hash","serverInit","browser","reactClientContext","RoutingContext","reactServerContext","ServerRouting","renderRoutes","routes","RootRoute","rootRoutes","setRoutingMode","register","route","registerListener","provider","deps","config","routeChangeSlot","exports","Slot","withType","UIRuntime","ReactRouterAspect","addRuntime"],"sources":["react-router.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { NavigateFunction } from 'react-router-dom';\nimport type { Location, NavigationType, RouteProps } from 'react-router-dom';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport type { SSR } from '@teambit/ui';\nimport { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\n\nimport { ReactRouterAspect } from './react-router.aspect';\nimport { RouteContext, RootRoute } from './route-context';\nimport { Routing } from './routing-method';\nimport { LocationHooks } from './LocationHooks';\n\nexport type LocationListener = (location: Location, action: NavigationType) => void;\ntype RouteChangeSlot = SlotRegistry<LocationListener>;\ntype RenderContext = { initialLocation?: string };\n\nexport class ReactRouterUI {\n private routingMode = Routing.url;\n\n constructor(\n /**\n * route slot.\n */\n private routeSlot: RouteSlot,\n /**\n *\n */\n private routeChangeListener: RouteChangeSlot\n ) {}\n\n /**\n * render all slot routes.\n */\n renderRoutes(routes: RouteProps[]) {\n return <RootRoute routeSlot={this.routeSlot} rootRoutes={routes} />;\n }\n\n /** decides how navigation is stored and applied.\n * Url - updates the `window.location.pathname`.\n * Hash - updates `window.location.hash`.\n * InMemory - store state internally and don't update the browser.\n */\n setRoutingMode(routing: Routing) {\n this.routingMode = routing;\n }\n\n /**\n * register a new route.\n */\n register(route: RouteProps) {\n this.routeSlot.register(route);\n return this;\n }\n\n registerListener(listener: LocationListener) {\n this.routeChangeListener.register(listener);\n }\n\n /**\n * change browser location\n */\n navigateTo = (\n /** destination */\n path: Location | string,\n /** history action to execute (pop / push / replace) */\n action?: NavigationType\n ) => {\n const state = typeof path !== 'string' ? path.state : undefined;\n\n switch (action) {\n case 'POP':\n return; // TBD;\n case 'REPLACE':\n this.navigate?.(path, { replace: true, state });\n return;\n case 'PUSH':\n default:\n this.navigate?.(path, { state });\n }\n };\n\n private navigate?: NavigateFunction = undefined;\n\n private handleLocationChange = (location: Location, action: NavigationType) => {\n const listeners = this.routeChangeListener.values();\n listeners.forEach((listener) => listener(location, action));\n };\n\n private RoutingContext = ({ children, renderCtx }: { children: ReactNode; renderCtx?: RenderContext }) => {\n return (\n <RouteContext reactRouterUi={this} routing={this.routingMode} location={renderCtx?.initialLocation}>\n {children}\n <LocationHooks\n onLocationChange={this.handleLocationChange}\n onNavigatorChange={(nav) => (this.navigate = nav)}\n />\n </RouteContext>\n );\n };\n\n private ServerRouting = ({ children, renderCtx }: { children: ReactNode; renderCtx?: RenderContext }) => {\n return (\n <RouteContext reactRouterUi={this} routing={Routing.static} location={renderCtx?.initialLocation}>\n {children}\n <LocationHooks\n onLocationChange={this.handleLocationChange}\n onNavigatorChange={(nav) => (this.navigate = nav)}\n />\n </RouteContext>\n );\n };\n\n public renderPlugin: SSR.RenderPlugin<RenderContext> = {\n browserInit: () => {\n const initialLocation = `${window.location.pathname}${window.location.search}${window.location.hash}`;\n return { initialLocation };\n },\n serverInit: ({ browser }) => {\n const initialLocation = browser?.location.url;\n return { initialLocation };\n },\n reactClientContext: this.RoutingContext,\n reactServerContext: this.ServerRouting,\n };\n\n static slots = [Slot.withType<RouteProps>(), Slot.withType<LocationListener>()];\n static runtime = UIRuntime;\n\n static async provider(deps, config, [routeSlot, routeChangeSlot]: [RouteSlot, RouteChangeSlot]) {\n return new ReactRouterUI(routeSlot, routeChangeSlot);\n }\n}\n\nReactRouterAspect.addRuntime(ReactRouterUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,eAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,cAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,eAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,cAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAA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B,QAAQA,CAACC,KAAiB,EAAE;IAC1B,IAAI,CAAC/C,SAAS,CAAC8C,QAAQ,CAACC,KAAK,CAAC;IAC9B,OAAO,IAAI;EACb;EAEAC,gBAAgBA,CAACjC,QAA0B,EAAE;IAC3C,IAAI,CAACd,mBAAmB,CAAC6C,QAAQ,CAAC/B,QAAQ,CAAC;EAC7C;EAwEA,aAAakC,QAAQA,CAACC,IAAI,EAAEC,MAAM,EAAE,CAACnD,SAAS,EAAEoD,eAAe,CAA+B,EAAE;IAC9F,OAAO,IAAItD,aAAa,CAACE,SAAS,EAAEoD,eAAe,CAAC;EACtD;AACF;AAACC,OAAA,CAAAvD,aAAA,GAAAA,aAAA;AAAAtB,eAAA,CAnHYsB,aAAa,WA6GT,CAACwD,eAAI,CAACC,QAAQ,CAAa,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAmB,CAAC,CAAC;AAAA/E,eAAA,CA7GpEsB,aAAa,aA8GP0D,eAAS;AAO5BC,gCAAiB,CAACC,UAAU,CAAC5D,aAAa,CAAC"}
|
package/dist/route-context.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -55,6 +54,7 @@ function _routingMethod() {
|
|
|
55
54
|
};
|
|
56
55
|
return data;
|
|
57
56
|
}
|
|
57
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
58
58
|
/**
|
|
59
59
|
* Setup context needed for routing.
|
|
60
60
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","_reactRouterDom","_server","_uiFoundationUiReactRouter","_baseReactNavigation","_uiFoundationUiNavigation","_routingMethod","RouteContext","routing","Routing","url","children","location","
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_reactRouterDom","_server","_uiFoundationUiReactRouter","_baseReactNavigation","_uiFoundationUiNavigation","_routingMethod","obj","__esModule","default","RouteContext","routing","Routing","url","children","location","createElement","Router","type","NavigationProvider","implementation","reactRouterAdapter","RootRoute","rootRoutes","routeSlot","SlotRouter","slot","static","StaticRouter","inMemory","MemoryRouter","initialEntries","initialIndex","hash","HashRouter","BrowserRouter"],"sources":["route-context.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { BrowserRouter, MemoryRouter, HashRouter, RouteProps } from 'react-router-dom';\nimport { StaticRouter } from 'react-router-dom/server';\nimport { RouteSlot, SlotRouter } from '@teambit/ui-foundation.ui.react-router.slot-router';\nimport { NavigationProvider } from '@teambit/base-react.navigation.link';\nimport { reactRouterAdapter } from '@teambit/ui-foundation.ui.navigation.react-router-adapter';\nimport { ReactRouterUI } from './react-router.ui.runtime';\nimport { Routing } from './routing-method';\n\ntype RouterContextProps = {\n reactRouterUi: ReactRouterUI;\n routing?: Routing;\n children: ReactNode;\n location?: string;\n};\n\ntype RootRouteProps = {\n rootRoutes: RouteProps[];\n routeSlot: RouteSlot;\n};\n\n/**\n * Setup context needed for routing.\n */\nexport function RouteContext({ routing = Routing.url, children, location }: RouterContextProps) {\n return (\n <Router type={routing} location={location}>\n <NavigationProvider implementation={reactRouterAdapter}>{children}</NavigationProvider>\n </Router>\n );\n}\n\nexport function RootRoute({ rootRoutes, routeSlot }: RootRouteProps) {\n return <SlotRouter slot={routeSlot} rootRoutes={rootRoutes} />;\n}\n\n/** provides the router engine (browser, inMemory, etc) */\nfunction Router({ type, children, location }: { type: Routing; children: ReactNode; location?: string }) {\n switch (type) {\n case Routing.static:\n return <StaticRouter location={location || '/'}>{children}</StaticRouter>;\n case Routing.inMemory:\n return (\n <MemoryRouter initialEntries={[location || '/']} initialIndex={1}>\n {children}\n </MemoryRouter>\n );\n case Routing.hash:\n // @ts-ignore - https://github.com/teambit/bit/issues/5746\n return <HashRouter>{children}</HashRouter>;\n case Routing.url:\n default:\n // @ts-ignore - https://github.com/teambit/bit/issues/5746\n return <BrowserRouter>{children}</BrowserRouter>;\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,2BAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,0BAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,qBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,oBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,0BAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,yBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,eAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,cAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,SAAAC,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAc3C;AACA;AACA;AACO,SAASG,YAAYA,CAAC;EAAEC,OAAO,GAAGC,wBAAO,CAACC,GAAG;E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B,CAAC;EACpD;AACF"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react-router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1159",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/ui-foundation/react-router",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.ui-foundation",
|
|
8
8
|
"name": "react-router",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1159"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"core-js": "^3.0.0",
|
|
13
|
-
"@babel/runtime": "7.20.0",
|
|
14
12
|
"@teambit/base-react.navigation.link": "2.0.27",
|
|
15
13
|
"@teambit/harmony": "0.4.6",
|
|
16
14
|
"@teambit/ui-foundation.ui.navigation.react-router-adapter": "6.1.1",
|
|
17
|
-
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.
|
|
18
|
-
"@teambit/ui": "0.0.
|
|
15
|
+
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.502",
|
|
16
|
+
"@teambit/ui": "0.0.1159"
|
|
19
17
|
},
|
|
20
18
|
"devDependencies": {
|
|
21
19
|
"@types/react": "^17.0.8",
|
|
@@ -27,7 +25,7 @@
|
|
|
27
25
|
},
|
|
28
26
|
"peerDependencies": {
|
|
29
27
|
"react-router-dom": "^6.0.0",
|
|
30
|
-
"@teambit/legacy": "1.0.
|
|
28
|
+
"@teambit/legacy": "1.0.558",
|
|
31
29
|
"react": "^16.8.0 || ^17.0.0",
|
|
32
30
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
33
31
|
},
|