remote-components 0.4.9 → 0.4.10
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/{chunk-6NUHDFSH.js → chunk-3PR3SWYZ.js} +2 -2
- package/dist/{chunk-6NUHDFSH.js.map → chunk-3PR3SWYZ.js.map} +1 -1
- package/dist/{chunk-SELGX4Y2.cjs → chunk-6PZEDIAK.cjs} +2 -2
- package/dist/{chunk-SELGX4Y2.cjs.map → chunk-6PZEDIAK.cjs.map} +1 -1
- package/dist/{chunk-X6SKTJ5N.js → chunk-GR5FN73U.js} +3 -3
- package/dist/{chunk-EZG36EB4.cjs → chunk-HZP4FWPG.cjs} +22 -22
- package/dist/{chunk-ZJW3GQTP.js → chunk-M6ACTSVB.js} +2 -2
- package/dist/{chunk-4XWEMPKO.js → chunk-N6AJM72A.js} +5 -5
- package/dist/{chunk-XPMI4K3U.cjs → chunk-OSSMJQFE.cjs} +19 -19
- package/dist/{chunk-6NAV4SCF.cjs → chunk-PCHSF5LH.cjs} +23 -23
- package/dist/{chunk-T6E2WPAB.js → chunk-RHRDUJ3K.js} +3 -3
- package/dist/{chunk-J42V6HSP.cjs → chunk-RZ224NSH.cjs} +18 -18
- package/dist/{chunk-JYGC7T6L.js → chunk-VFK4HGZT.js} +2 -2
- package/dist/{chunk-VB64GQX7.cjs → chunk-XWRB6CEA.cjs} +3 -3
- package/dist/config/nextjs.cjs +5 -5
- package/dist/config/nextjs.js +1 -1
- package/dist/host/html.cjs +19 -19
- package/dist/host/html.js +7 -7
- package/dist/host/nextjs/app/client-only.cjs +11 -11
- package/dist/host/nextjs/app/client-only.js +6 -6
- package/dist/host/nextjs/pages/client-only.cjs +42 -24
- package/dist/host/nextjs/pages/client-only.cjs.map +1 -1
- package/dist/host/nextjs/pages/client-only.d.ts +1 -1
- package/dist/host/nextjs/pages/client-only.js +42 -24
- package/dist/host/nextjs/pages/client-only.js.map +1 -1
- package/dist/host/react.cjs +7 -7
- package/dist/host/react.js +6 -6
- package/dist/internal/host/shared/shared-module-resolver.cjs +1 -1
- package/dist/internal/host/shared/shared-module-resolver.cjs.map +1 -1
- package/dist/internal/host/shared/shared-module-resolver.d.ts +4 -3
- package/dist/internal/host/shared/shared-module-resolver.js +1 -1
- package/dist/internal/host/shared/shared-module-resolver.js.map +1 -1
- package/dist/{turbopack-WAERWSWW.js → turbopack-6BSS3SYN.js} +5 -5
- package/dist/turbopack-6BSS3SYN.js.map +1 -0
- package/dist/{turbopack-6BXAJGS5.cjs → turbopack-UMJ7SLJL.cjs} +12 -12
- package/dist/{turbopack-6BXAJGS5.cjs.map → turbopack-UMJ7SLJL.cjs.map} +1 -1
- package/dist/{webpack-ZYOBNVFE.js → webpack-4QYGIVE6.js} +7 -5
- package/dist/webpack-4QYGIVE6.js.map +1 -0
- package/dist/{webpack-VTSF2B2G.cjs → webpack-65BVWX2U.cjs} +13 -11
- package/dist/{webpack-ZYOBNVFE.js.map → webpack-65BVWX2U.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/turbopack-WAERWSWW.js.map +0 -1
- package/dist/webpack-VTSF2B2G.cjs.map +0 -1
- /package/dist/{chunk-X6SKTJ5N.js.map → chunk-GR5FN73U.js.map} +0 -0
- /package/dist/{chunk-EZG36EB4.cjs.map → chunk-HZP4FWPG.cjs.map} +0 -0
- /package/dist/{chunk-ZJW3GQTP.js.map → chunk-M6ACTSVB.js.map} +0 -0
- /package/dist/{chunk-4XWEMPKO.js.map → chunk-N6AJM72A.js.map} +0 -0
- /package/dist/{chunk-XPMI4K3U.cjs.map → chunk-OSSMJQFE.cjs.map} +0 -0
- /package/dist/{chunk-6NAV4SCF.cjs.map → chunk-PCHSF5LH.cjs.map} +0 -0
- /package/dist/{chunk-T6E2WPAB.js.map → chunk-RHRDUJ3K.js.map} +0 -0
- /package/dist/{chunk-J42V6HSP.cjs.map → chunk-RZ224NSH.cjs.map} +0 -0
- /package/dist/{chunk-JYGC7T6L.js.map → chunk-VFK4HGZT.js.map} +0 -0
- /package/dist/{chunk-VB64GQX7.cjs.map → chunk-XWRB6CEA.cjs.map} +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkHZP4FWPGcjs = require('./chunk-HZP4FWPG.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunk3AX5WLZDcjs = require('./chunk-3AX5WLZD.cjs');
|
|
@@ -21,7 +21,7 @@ var _chunkN3SQTOSEcjs = require('./chunk-N3SQTOSE.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk6PZEDIAKcjs = require('./chunk-6PZEDIAK.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _chunkZ2SLBFQLcjs = require('./chunk-Z2SLBFQL.cjs');
|
|
@@ -92,7 +92,7 @@ function setAttributesFromProps(el, props) {
|
|
|
92
92
|
function useResolveClientUrl(prop, urlHref) {
|
|
93
93
|
const { resolveClientUrl: contextValue } = _context.useRemoteComponentsContext.call(void 0, );
|
|
94
94
|
const raw = _nullishCoalesce(prop, () => ( contextValue));
|
|
95
|
-
return _react.useMemo.call(void 0, () =>
|
|
95
|
+
return _react.useMemo.call(void 0, () => _chunkHZP4FWPGcjs.bindResolveClientUrl.call(void 0, raw, urlHref), [raw, urlHref]);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// src/host/react/hooks/use-shadow-root.ts
|
|
@@ -154,7 +154,7 @@ function getRemoteComponentHtml(html) {
|
|
|
154
154
|
return ssrRemoteComponentContainer.innerHTML;
|
|
155
155
|
}
|
|
156
156
|
const remoteComponentContainer = temp.querySelectorAll(
|
|
157
|
-
`div[data-bundle][data-route][data-runtime][id^="${
|
|
157
|
+
`div[data-bundle][data-route][data-runtime][id^="${_chunk6PZEDIAKcjs.DEFAULT_COMPONENT_NAME}"],div[data-bundle][data-route],div#__next,remote-component:not([src])`
|
|
158
158
|
);
|
|
159
159
|
if (remoteComponentContainer.length > 0) {
|
|
160
160
|
return `${Array.from(temp.querySelectorAll("link,script")).map((link) => link.outerHTML).join("")}${Array.from(remoteComponentContainer).map((container) => container.outerHTML).join("")}`;
|
|
@@ -179,7 +179,7 @@ function ConsumeRemoteComponent({
|
|
|
179
179
|
mode = "open",
|
|
180
180
|
reset,
|
|
181
181
|
credentials: credentialsProp,
|
|
182
|
-
name: nameProp =
|
|
182
|
+
name: nameProp = _chunk6PZEDIAKcjs.DEFAULT_COMPONENT_NAME,
|
|
183
183
|
shared: sharedProp,
|
|
184
184
|
children,
|
|
185
185
|
onBeforeLoad,
|
|
@@ -195,22 +195,22 @@ function ConsumeRemoteComponent({
|
|
|
195
195
|
const credentials = _nullishCoalesce(_nullishCoalesce(credentialsProp, () => ( contextCredentials)), () => ( "same-origin"));
|
|
196
196
|
const shared = _nullishCoalesce(_nullishCoalesce(sharedProp, () => ( contextShared)), () => ( {}));
|
|
197
197
|
const emitter = _react.useMemo.call(void 0,
|
|
198
|
-
() =>
|
|
198
|
+
() => _chunkHZP4FWPGcjs.makeReactEmitter.call(void 0, { onBeforeLoad, onLoad, onError, onChange }),
|
|
199
199
|
[onBeforeLoad, onLoad, onError, onChange]
|
|
200
200
|
);
|
|
201
201
|
const name = _react.useMemo.call(void 0,
|
|
202
|
-
() =>
|
|
202
|
+
() => _chunkHZP4FWPGcjs.resolveNameFromSrc.call(void 0, src, nameProp),
|
|
203
203
|
[src, nameProp]
|
|
204
204
|
);
|
|
205
205
|
const [data, setData] = _react.useState.call(void 0,
|
|
206
206
|
null
|
|
207
207
|
);
|
|
208
|
-
const url = _react.useMemo.call(void 0, () =>
|
|
208
|
+
const url = _react.useMemo.call(void 0, () => _chunkHZP4FWPGcjs.getClientOrServerUrl.call(void 0, src, DUMMY_FALLBACK), [src]);
|
|
209
209
|
const resolveClientUrl = useResolveClientUrl(resolveClientUrlProp, url.href);
|
|
210
210
|
const id = url.origin === (typeof location !== "undefined" ? location.origin : DUMMY_FALLBACK) ? url.pathname : url.href;
|
|
211
|
-
const keySuffix = `${
|
|
211
|
+
const keySuffix = `${_chunk6PZEDIAKcjs.escapeString.call(void 0, id)}_${_chunk6PZEDIAKcjs.escapeString.call(void 0,
|
|
212
212
|
_nullishCoalesce(_optionalChain([data, 'optionalAccess', _5 => _5.name]), () => ( name))
|
|
213
|
-
)}_${
|
|
213
|
+
)}_${_chunk6PZEDIAKcjs.escapeString.call(void 0, instanceId)}`;
|
|
214
214
|
const [remoteComponent, setRemoteComponent] = _react.useState.call(void 0, null);
|
|
215
215
|
const { shadowRoot, shadowRootContainerRef } = useShadowRoot({
|
|
216
216
|
isolate,
|
|
@@ -236,7 +236,7 @@ function ConsumeRemoteComponent({
|
|
|
236
236
|
return elements;
|
|
237
237
|
})() : []
|
|
238
238
|
);
|
|
239
|
-
const hostStateRef = _react.useRef.call(void 0,
|
|
239
|
+
const hostStateRef = _react.useRef.call(void 0, _chunkHZP4FWPGcjs.createHostState.call(void 0, ));
|
|
240
240
|
const componentHydrationHtml = _react.useRef.call(void 0, null);
|
|
241
241
|
const prevRemoteComponentContainerRef = _react.useRef.call(void 0, null);
|
|
242
242
|
const unmountRef = _react.useRef.call(void 0, null);
|
|
@@ -302,7 +302,7 @@ function ConsumeRemoteComponent({
|
|
|
302
302
|
_nullishCoalesce(_optionalChain([resolveClientUrl, 'optionalCall', _29 => _29(url.href)]), () => ( url.href)),
|
|
303
303
|
location.href
|
|
304
304
|
);
|
|
305
|
-
const res = await
|
|
305
|
+
const res = await _chunkHZP4FWPGcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
|
|
306
306
|
onRequest,
|
|
307
307
|
onResponse,
|
|
308
308
|
abortController: hostStateRef.current.abortController
|
|
@@ -321,7 +321,7 @@ function ConsumeRemoteComponent({
|
|
|
321
321
|
const userShared = await shared;
|
|
322
322
|
if (signal.aborted)
|
|
323
323
|
return;
|
|
324
|
-
const prepared =
|
|
324
|
+
const prepared = _chunkHZP4FWPGcjs.preparePipeline.call(void 0, {
|
|
325
325
|
html,
|
|
326
326
|
name,
|
|
327
327
|
url,
|
|
@@ -362,7 +362,7 @@ function ConsumeRemoteComponent({
|
|
|
362
362
|
href: new URL(_nullishCoalesce(link.getAttribute("href"), () => ( link.href)), url).href,
|
|
363
363
|
...link.getAttributeNames().reduce((acc, key) => {
|
|
364
364
|
if (key !== "href") {
|
|
365
|
-
acc[_nullishCoalesce(
|
|
365
|
+
acc[_nullishCoalesce(_chunk6PZEDIAKcjs.attrToProp[key], () => ( key))] = _nullishCoalesce(link.getAttribute(key), () => ( ""));
|
|
366
366
|
}
|
|
367
367
|
return acc;
|
|
368
368
|
}, {})
|
|
@@ -424,7 +424,7 @@ function ConsumeRemoteComponent({
|
|
|
424
424
|
});
|
|
425
425
|
self.__next_s = prevNextScripts;
|
|
426
426
|
}
|
|
427
|
-
const rscName = rsc ? `__remote_component_rsc_${
|
|
427
|
+
const rscName = rsc ? `__remote_component_rsc_${_chunk6PZEDIAKcjs.escapeString.call(void 0, id)}_${_chunk6PZEDIAKcjs.escapeString.call(void 0,
|
|
428
428
|
remoteName
|
|
429
429
|
)}` : void 0;
|
|
430
430
|
if (rsc) {
|
|
@@ -497,7 +497,7 @@ function ConsumeRemoteComponent({
|
|
|
497
497
|
}
|
|
498
498
|
hostStateRef.current.stage = "loaded";
|
|
499
499
|
} else {
|
|
500
|
-
const result = await
|
|
500
|
+
const result = await _chunkHZP4FWPGcjs.loadPrepared.call(void 0, {
|
|
501
501
|
prepared,
|
|
502
502
|
url,
|
|
503
503
|
signal,
|
|
@@ -566,8 +566,8 @@ function ConsumeRemoteComponent({
|
|
|
566
566
|
const metadataJson = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "script", { "data-remote-component": true, type: "application/json", children: JSON.stringify({
|
|
567
567
|
name: _optionalChain([data, 'optionalAccess', _33 => _33.name]) || name,
|
|
568
568
|
bundle: _optionalChain([data, 'optionalAccess', _34 => _34.bundle]) || "default",
|
|
569
|
-
route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) ||
|
|
570
|
-
runtime: hostStateRef.current.prevIsRemoteComponent ?
|
|
569
|
+
route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) || _chunk6PZEDIAKcjs.DEFAULT_ROUTE,
|
|
570
|
+
runtime: hostStateRef.current.prevIsRemoteComponent ? _chunk6PZEDIAKcjs.RUNTIME_SCRIPT : _optionalChain([data, 'optionalAccess', _36 => _36.runtime]) || _chunk6PZEDIAKcjs.RUNTIME_WEBPACK
|
|
571
571
|
}) });
|
|
572
572
|
const resetStyle = reset ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { "data-remote-components-reset": "react", children: `:host { all: initial; }` }) : null;
|
|
573
573
|
const linksToRender = _optionalChain([data, 'optionalAccess', _37 => _37.links, 'optionalAccess', _38 => _38.map, 'call', _39 => _39((link) => /* @__PURE__ */ _react.createElement.call(void 0,
|
|
@@ -679,4 +679,4 @@ function ConsumeRemoteComponent({
|
|
|
679
679
|
|
|
680
680
|
|
|
681
681
|
exports.useRemoteNavigate = useRemoteNavigate; exports.ConsumeRemoteComponent = ConsumeRemoteComponent;
|
|
682
|
-
//# sourceMappingURL=chunk-
|
|
682
|
+
//# sourceMappingURL=chunk-OSSMJQFE.cjs.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk6PZEDIAKcjs = require('./chunk-6PZEDIAK.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkZ2SLBFQLcjs = require('./chunk-Z2SLBFQL.cjs');
|
|
@@ -72,14 +72,14 @@ async function buildSharedProviderPlan({
|
|
|
72
72
|
additionalEntries = [],
|
|
73
73
|
onMissing
|
|
74
74
|
}) {
|
|
75
|
-
const sharedModulePlan =
|
|
75
|
+
const sharedModulePlan = _chunk6PZEDIAKcjs.createSharedModulePlan.call(void 0, {
|
|
76
76
|
bundle,
|
|
77
77
|
hostShared,
|
|
78
78
|
remoteShared,
|
|
79
79
|
scope,
|
|
80
80
|
callerTag
|
|
81
81
|
});
|
|
82
|
-
const resolved = await
|
|
82
|
+
const resolved = await _chunk6PZEDIAKcjs.resolveSharedModulePlan.call(void 0, sharedModulePlan);
|
|
83
83
|
const entriesByIdAndSpecifier = /* @__PURE__ */ new Map();
|
|
84
84
|
const addEntry = (entry) => {
|
|
85
85
|
entriesByIdAndSpecifier.set(`${entry.id}\0${entry.specifier}`, entry);
|
|
@@ -94,7 +94,7 @@ async function buildSharedProviderPlan({
|
|
|
94
94
|
}
|
|
95
95
|
for (const entry of sharedModulePlan.entries) {
|
|
96
96
|
if (entry.status !== "resolved") {
|
|
97
|
-
if (onMissing && !(sharedModulePlan.protocol ===
|
|
97
|
+
if (onMissing && !(sharedModulePlan.protocol === _chunk6PZEDIAKcjs.SHARED_MODULE_MANIFEST_PROTOCOL && entry.required)) {
|
|
98
98
|
onMissing(entry);
|
|
99
99
|
}
|
|
100
100
|
continue;
|
|
@@ -182,7 +182,7 @@ async function buildWebpackResolve(hostShared, remoteShared, bundle, reactModule
|
|
|
182
182
|
remoteShared,
|
|
183
183
|
callerTag,
|
|
184
184
|
normalizeId: normalizeWebpackSharedId,
|
|
185
|
-
additionalEntries: Object.entries(
|
|
185
|
+
additionalEntries: Object.entries(_chunk6PZEDIAKcjs.CORE_REACT_SHARED_MODULE_IDS).map(
|
|
186
186
|
([specifier, id]) => ({
|
|
187
187
|
id,
|
|
188
188
|
specifier,
|
|
@@ -218,7 +218,7 @@ function applyWebpackSharedProviderModules(bundle, entries) {
|
|
|
218
218
|
`applyWebpackSharedProviderModules called for bundle: "${bundle}"`
|
|
219
219
|
);
|
|
220
220
|
const self = globalThis;
|
|
221
|
-
const scope =
|
|
221
|
+
const scope = _chunk6PZEDIAKcjs.getScope.call(void 0, bundle);
|
|
222
222
|
const webpackBundle = _nullishCoalesce(_optionalChain([scope, 'optionalAccess', _4 => _4.webpackRequire]), () => ( _optionalChain([self, 'access', _5 => _5.__remote_webpack_require__, 'optionalAccess', _6 => _6[bundle]])));
|
|
223
223
|
if (!webpackBundle) {
|
|
224
224
|
throw new (0, _chunkBBXVML3Dcjs.RemoteComponentsError)(
|
|
@@ -278,12 +278,12 @@ function applySharedModules(bundle, resolve) {
|
|
|
278
278
|
`Shared modules to resolve: ${Object.keys(resolve)}`
|
|
279
279
|
);
|
|
280
280
|
const metadata = resolve[WEBPACK_SHARED_RESOLVE_METADATA];
|
|
281
|
-
if (_optionalChain([metadata, 'optionalAccess', _12 => _12.protocol]) ===
|
|
281
|
+
if (_optionalChain([metadata, 'optionalAccess', _12 => _12.protocol]) === _chunk6PZEDIAKcjs.SHARED_MODULE_MANIFEST_PROTOCOL) {
|
|
282
282
|
applyWebpackSharedProviderModules(bundle, metadata.entries);
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
const self = globalThis;
|
|
286
|
-
const scope =
|
|
286
|
+
const scope = _chunk6PZEDIAKcjs.getScope.call(void 0, bundle);
|
|
287
287
|
const webpackBundle = _nullishCoalesce(_optionalChain([scope, 'optionalAccess', _13 => _13.webpackRequire]), () => ( _optionalChain([self, 'access', _14 => _14.__remote_webpack_require__, 'optionalAccess', _15 => _15[bundle]])));
|
|
288
288
|
if (webpackBundle) {
|
|
289
289
|
const modulePaths = Object.keys(
|
|
@@ -374,12 +374,12 @@ function loadChunkWithScope(scope, chunkId) {
|
|
|
374
374
|
);
|
|
375
375
|
const self = globalThis;
|
|
376
376
|
const ns = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, );
|
|
377
|
-
const { bundle, path, prefix } =
|
|
377
|
+
const { bundle, path, prefix } = _chunk6PZEDIAKcjs.parseRemoteId.call(void 0, chunkId);
|
|
378
378
|
const remoteRuntime = _optionalChain([self, 'access', _25 => _25.__remote_webpack_require__, 'optionalAccess', _26 => _26[_nullishCoalesce(bundle, () => ( "default"))]]) ? _optionalChain([self, 'access', _27 => _27.__remote_webpack_require__, 'access', _28 => _28[_nullishCoalesce(bundle, () => ( "default"))], 'optionalAccess', _29 => _29.type]) || "webpack" : scope.runtime;
|
|
379
|
-
if (remoteRuntime ===
|
|
379
|
+
if (remoteRuntime === _chunk6PZEDIAKcjs.RUNTIME_WEBPACK) {
|
|
380
380
|
return Promise.resolve(void 0);
|
|
381
381
|
}
|
|
382
|
-
const rawPath = path ?
|
|
382
|
+
const rawPath = path ? _chunk6PZEDIAKcjs.collapseDoubleSlashes.call(void 0, `${prefix}${path}`) : "/";
|
|
383
383
|
const url = new URL(rawPath, scope.url).href;
|
|
384
384
|
if (url.endsWith(".css")) {
|
|
385
385
|
return;
|
|
@@ -432,9 +432,9 @@ function loadChunkWithScope(scope, chunkId) {
|
|
|
432
432
|
function createChunkDispatcher() {
|
|
433
433
|
return function __chunk_dispatcher__(chunkId, scriptBundle) {
|
|
434
434
|
_chunkBBXVML3Dcjs.logDebug.call(void 0, "ChunkDispatcher", `Dispatching chunk: "${chunkId}"`);
|
|
435
|
-
const { bundle } =
|
|
435
|
+
const { bundle } = _chunk6PZEDIAKcjs.parseRemoteId.call(void 0, chunkId);
|
|
436
436
|
const bundleName = bundle || scriptBundle || "default";
|
|
437
|
-
const scope =
|
|
437
|
+
const scope = _chunk6PZEDIAKcjs.getScope.call(void 0, bundleName);
|
|
438
438
|
_chunkBBXVML3Dcjs.logDebug.call(void 0,
|
|
439
439
|
"ChunkDispatcher",
|
|
440
440
|
`Scope resolution: bundle="${bundleName}", scope=${_nullishCoalesce(_optionalChain([scope, 'optionalAccess', _32 => _32.scopedName]), () => ( "null"))}`
|
|
@@ -541,7 +541,7 @@ async function handleTurbopackChunk(code, scope, url, renameTurbopackGlobal) {
|
|
|
541
541
|
const baseUrl = url.slice(0, url.indexOf("/_next"));
|
|
542
542
|
const chunkLoadResult = loadChunkWithScope(
|
|
543
543
|
scope,
|
|
544
|
-
|
|
544
|
+
_chunk6PZEDIAKcjs.formatRemoteId.call(void 0, scope, `${baseUrl}/_next/${id}`)
|
|
545
545
|
);
|
|
546
546
|
if (chunkLoadResult) {
|
|
547
547
|
loadChunkPromises.push(chunkLoadResult);
|
|
@@ -593,7 +593,7 @@ function requireModule(scope, moduleId, fullId) {
|
|
|
593
593
|
return handleTurbopackModule(
|
|
594
594
|
scope,
|
|
595
595
|
idStr,
|
|
596
|
-
_nullishCoalesce(fullId, () => (
|
|
596
|
+
_nullishCoalesce(fullId, () => ( _chunk6PZEDIAKcjs.formatRemoteId.call(void 0, scope, idStr)))
|
|
597
597
|
);
|
|
598
598
|
}
|
|
599
599
|
function handleTurbopackModule(scope, moduleId, id) {
|
|
@@ -666,7 +666,7 @@ function findModuleInit(modules, moduleId) {
|
|
|
666
666
|
return void 0;
|
|
667
667
|
}
|
|
668
668
|
function createTurbopackContext(scope, exports, moduleExports, modules, moduleInit, id) {
|
|
669
|
-
const scopedRequire = (moduleId) => requireModule(scope, moduleId,
|
|
669
|
+
const scopedRequire = (moduleId) => requireModule(scope, moduleId, _chunk6PZEDIAKcjs.formatRemoteId.call(void 0, scope, String(moduleId)));
|
|
670
670
|
return {
|
|
671
671
|
// HMR not implemented for Remote Components
|
|
672
672
|
k: {
|
|
@@ -838,7 +838,7 @@ function createTurbopackContext(scope, exports, moduleExports, modules, moduleIn
|
|
|
838
838
|
const nextIndex = scriptSrc.indexOf("/_next");
|
|
839
839
|
const baseUrl = nextIndex !== -1 ? scriptSrc.slice(0, nextIndex) : "";
|
|
840
840
|
const chunkUrl = `${baseUrl}/_next/${url}`;
|
|
841
|
-
return loadChunkWithScope(scope,
|
|
841
|
+
return loadChunkWithScope(scope, _chunk6PZEDIAKcjs.formatRemoteId.call(void 0, scope, chunkUrl));
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
throw new Error(
|
|
@@ -917,7 +917,7 @@ async function initializeSharedModules(scope, hostShared = {}, remoteShared = {}
|
|
|
917
917
|
const moduleExports = handleTurbopackModule(
|
|
918
918
|
scope,
|
|
919
919
|
sharedModuleId,
|
|
920
|
-
|
|
920
|
+
_chunk6PZEDIAKcjs.formatRemoteId.call(void 0, scope, String(sharedModuleInitializerId))
|
|
921
921
|
);
|
|
922
922
|
const loaderCandidate = typeof moduleExports === "function" ? moduleExports : _optionalChain([moduleExports, 'optionalAccess', _38 => _38.default]);
|
|
923
923
|
if (typeof loaderCandidate === "function") {
|
|
@@ -1066,13 +1066,13 @@ function installSharedModules(scope, hostShared, sharedModuleIds, missingMessage
|
|
|
1066
1066
|
);
|
|
1067
1067
|
}
|
|
1068
1068
|
function preferSharedManifest(sharedModuleIds, remoteShared) {
|
|
1069
|
-
if (!
|
|
1069
|
+
if (!_chunk6PZEDIAKcjs.isSharedModuleManifest.call(void 0, remoteShared))
|
|
1070
1070
|
return sharedModuleIds;
|
|
1071
1071
|
const extractedIdBySpecifier = new Map(
|
|
1072
1072
|
Object.entries(sharedModuleIds).map(([id, specifier]) => [specifier, id])
|
|
1073
1073
|
);
|
|
1074
1074
|
return {
|
|
1075
|
-
protocol:
|
|
1075
|
+
protocol: _chunk6PZEDIAKcjs.SHARED_MODULE_MANIFEST_PROTOCOL,
|
|
1076
1076
|
requirements: remoteShared.requirements.map((requirement) => {
|
|
1077
1077
|
return {
|
|
1078
1078
|
...requirement,
|
|
@@ -1082,7 +1082,7 @@ function preferSharedManifest(sharedModuleIds, remoteShared) {
|
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
1084
|
function normalizeRemoteSharedForTurbopackFallback(remoteShared) {
|
|
1085
|
-
if (
|
|
1085
|
+
if (_chunk6PZEDIAKcjs.isSharedModuleManifest.call(void 0, remoteShared)) {
|
|
1086
1086
|
return {
|
|
1087
1087
|
...remoteShared,
|
|
1088
1088
|
requirements: remoteShared.requirements.map((requirement) => ({
|
|
@@ -1129,7 +1129,7 @@ function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
|
|
|
1129
1129
|
ns.pageComponentCache ??= {};
|
|
1130
1130
|
const cacheKey = `${bundle}:${route}`;
|
|
1131
1131
|
const remoteRequire = _optionalChain([self, 'access', _45 => _45.__remote_webpack_require__, 'optionalAccess', _46 => _46[bundle]]);
|
|
1132
|
-
const turbopackScope = _optionalChain([remoteRequire, 'optionalAccess', _47 => _47.type]) === "turbopack" ?
|
|
1132
|
+
const turbopackScope = _optionalChain([remoteRequire, 'optionalAccess', _47 => _47.type]) === "turbopack" ? _chunk6PZEDIAKcjs.getScope.call(void 0, bundle) : void 0;
|
|
1133
1133
|
const applyBundleCss = () => {
|
|
1134
1134
|
const elements = _nullishCoalesce(ns.cssCache[bundle], () => ( []));
|
|
1135
1135
|
if (styleContainer) {
|
|
@@ -1347,4 +1347,4 @@ function findPreviousModuleId(entries, factoryIndex) {
|
|
|
1347
1347
|
|
|
1348
1348
|
|
|
1349
1349
|
exports.buildWebpackResolve = buildWebpackResolve; exports.applySharedModules = applySharedModules; exports.loadChunkWithScope = loadChunkWithScope; exports.createChunkDispatcher = createChunkDispatcher; exports.initializeSharedModules = initializeSharedModules; exports.requireModule = requireModule; exports.nextClientPagesLoader = nextClientPagesLoader;
|
|
1350
|
-
//# sourceMappingURL=chunk-
|
|
1350
|
+
//# sourceMappingURL=chunk-PCHSF5LH.cjs.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
makeReactEmitter,
|
|
8
8
|
preparePipeline,
|
|
9
9
|
resolveNameFromSrc
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N6AJM72A.js";
|
|
11
11
|
import {
|
|
12
12
|
loadStaticRemoteComponent
|
|
13
13
|
} from "./chunk-LEKG4YWI.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
RUNTIME_WEBPACK,
|
|
22
22
|
attrToProp,
|
|
23
23
|
escapeString
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3PR3SWYZ.js";
|
|
25
25
|
import {
|
|
26
26
|
getNamespace
|
|
27
27
|
} from "./chunk-D5GNZB6O.js";
|
|
@@ -679,4 +679,4 @@ export {
|
|
|
679
679
|
useRemoteNavigate,
|
|
680
680
|
ConsumeRemoteComponent
|
|
681
681
|
};
|
|
682
|
-
//# sourceMappingURL=chunk-
|
|
682
|
+
//# sourceMappingURL=chunk-RHRDUJ3K.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkPCHSF5LHcjs = require('./chunk-PCHSF5LH.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ var _chunk6NAV4SCFcjs = require('./chunk-6NAV4SCF.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk6PZEDIAKcjs = require('./chunk-6PZEDIAK.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _chunkZ2SLBFQLcjs = require('./chunk-Z2SLBFQL.cjs');
|
|
@@ -25,25 +25,25 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
25
25
|
const self = globalThis;
|
|
26
26
|
const ns = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, );
|
|
27
27
|
const bundleName = _nullishCoalesce(bundle, () => ( "default"));
|
|
28
|
-
const existingScope =
|
|
28
|
+
const existingScope = _chunk6PZEDIAKcjs.getScope.call(void 0, bundleName);
|
|
29
29
|
if (existingScope && existingScope.url.origin === url.origin) {
|
|
30
30
|
_chunkBBXVML3Dcjs.logDebug.call(void 0,
|
|
31
31
|
"WebpackRuntime",
|
|
32
32
|
`Reusing scope "${existingScope.scopedName}" (turbopackModules=${existingScope.turbopackModules.length})`
|
|
33
33
|
);
|
|
34
34
|
existingScope.resolveClientUrl = resolveClientUrl;
|
|
35
|
-
if (runtime ===
|
|
35
|
+
if (runtime === _chunk6PZEDIAKcjs.RUNTIME_TURBOPACK) {
|
|
36
36
|
await Promise.allSettled(
|
|
37
37
|
scripts.map(
|
|
38
|
-
(script) => script.src ?
|
|
38
|
+
(script) => script.src ? _chunkPCHSF5LHcjs.loadChunkWithScope.call(void 0, existingScope, script.src) : Promise.resolve(void 0)
|
|
39
39
|
)
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
return existingScope;
|
|
43
43
|
}
|
|
44
|
-
const scope =
|
|
45
|
-
|
|
46
|
-
if (runtime ===
|
|
44
|
+
const scope = _chunk6PZEDIAKcjs.createScope.call(void 0, bundleName, url, runtime, resolveClientUrl);
|
|
45
|
+
_chunk6PZEDIAKcjs.registerScope.call(void 0, scope);
|
|
46
|
+
if (runtime === _chunk6PZEDIAKcjs.RUNTIME_WEBPACK && _optionalChain([self, 'access', _ => _.__remote_webpack_require__, 'optionalAccess', _2 => _2[bundleName]])) {
|
|
47
47
|
scope.webpackRequire = self.__remote_webpack_require__[bundleName];
|
|
48
48
|
}
|
|
49
49
|
ns.bundleUrls[bundleName] = url;
|
|
@@ -57,12 +57,12 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
57
57
|
self.__original_webpack_chunk_load__ = self.__webpack_chunk_load__;
|
|
58
58
|
self.__original_webpack_require__ = self.__webpack_require__;
|
|
59
59
|
}
|
|
60
|
-
self.__webpack_chunk_load__ =
|
|
60
|
+
self.__webpack_chunk_load__ = _chunkPCHSF5LHcjs.createChunkDispatcher.call(void 0, );
|
|
61
61
|
self.__webpack_require__ = createModuleDispatcher(runtime);
|
|
62
62
|
ns.dispatcherRuntime = runtime;
|
|
63
63
|
self.__webpack_require_type__ = runtime;
|
|
64
64
|
}
|
|
65
|
-
if (runtime ===
|
|
65
|
+
if (runtime === _chunk6PZEDIAKcjs.RUNTIME_TURBOPACK && typeof self.__webpack_require__ === "function") {
|
|
66
66
|
self.__remote_webpack_require__ ??= {};
|
|
67
67
|
self.__remote_webpack_require__[bundleName] = self.__webpack_require__;
|
|
68
68
|
self.__remote_webpack_require__[bundleName].type = "turbopack";
|
|
@@ -70,11 +70,11 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
70
70
|
if (_optionalChain([self, 'access', _3 => _3.__remote_webpack_require__, 'optionalAccess', _4 => _4[bundleName]]) && scope.scopedName !== bundleName) {
|
|
71
71
|
self.__remote_webpack_require__[scope.scopedName] = self.__remote_webpack_require__[bundleName];
|
|
72
72
|
}
|
|
73
|
-
if (runtime ===
|
|
73
|
+
if (runtime === _chunk6PZEDIAKcjs.RUNTIME_TURBOPACK) {
|
|
74
74
|
const results = await Promise.allSettled(
|
|
75
75
|
scripts.map((script) => {
|
|
76
76
|
if (script.src) {
|
|
77
|
-
return
|
|
77
|
+
return _chunkPCHSF5LHcjs.loadChunkWithScope.call(void 0, scope, script.src);
|
|
78
78
|
}
|
|
79
79
|
return Promise.resolve(void 0);
|
|
80
80
|
})
|
|
@@ -93,7 +93,7 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
93
93
|
function createModuleDispatcher(runtime) {
|
|
94
94
|
return (id) => {
|
|
95
95
|
const self = globalThis;
|
|
96
|
-
const { bundle, id: moduleId } = _nullishCoalesce(_optionalChain([id, 'access', _5 => _5.match, 'call', _6 => _6(
|
|
96
|
+
const { bundle, id: moduleId } = _nullishCoalesce(_optionalChain([id, 'access', _5 => _5.match, 'call', _6 => _6(_chunk6PZEDIAKcjs.REMOTE_COMPONENT_REGEX), 'optionalAccess', _7 => _7.groups]), () => ( {
|
|
97
97
|
bundle: "default",
|
|
98
98
|
id
|
|
99
99
|
}));
|
|
@@ -104,15 +104,15 @@ function createModuleDispatcher(runtime) {
|
|
|
104
104
|
`Resolving "${id}" (bundle: "${bundleName}", runtime: "${remoteRuntime}")`
|
|
105
105
|
);
|
|
106
106
|
try {
|
|
107
|
-
if (remoteRuntime ===
|
|
108
|
-
const scope2 =
|
|
107
|
+
if (remoteRuntime === _chunk6PZEDIAKcjs.RUNTIME_WEBPACK && bundle && moduleId) {
|
|
108
|
+
const scope2 = _chunk6PZEDIAKcjs.getScope.call(void 0, bundle);
|
|
109
109
|
if (_optionalChain([scope2, 'optionalAccess', _13 => _13.webpackRequire]))
|
|
110
110
|
return scope2.webpackRequire(moduleId);
|
|
111
111
|
return _optionalChain([self, 'access', _14 => _14.__remote_webpack_require__, 'optionalAccess', _15 => _15[bundle], 'optionalCall', _16 => _16(moduleId)]);
|
|
112
112
|
}
|
|
113
|
-
const scope =
|
|
113
|
+
const scope = _chunk6PZEDIAKcjs.getScope.call(void 0, bundleName);
|
|
114
114
|
if (scope) {
|
|
115
|
-
return
|
|
115
|
+
return _chunkPCHSF5LHcjs.requireModule.call(void 0, scope, _nullishCoalesce(moduleId, () => ( id)), id);
|
|
116
116
|
}
|
|
117
117
|
throw new Error(
|
|
118
118
|
`Module "${id}" not found \u2014 no scope for bundle "${bundleName}".`
|
|
@@ -149,4 +149,4 @@ function createModuleDispatcher(runtime) {
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
exports.setupRemoteScope = setupRemoteScope;
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
152
|
+
//# sourceMappingURL=chunk-RZ224NSH.cjs.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isSharedModuleManifest,
|
|
10
10
|
parseRemoteId,
|
|
11
11
|
resolveSharedModulePlan
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3PR3SWYZ.js";
|
|
13
13
|
import {
|
|
14
14
|
getNamespace
|
|
15
15
|
} from "./chunk-D5GNZB6O.js";
|
|
@@ -1347,4 +1347,4 @@ export {
|
|
|
1347
1347
|
requireModule,
|
|
1348
1348
|
nextClientPagesLoader
|
|
1349
1349
|
};
|
|
1350
|
-
//# sourceMappingURL=chunk-
|
|
1350
|
+
//# sourceMappingURL=chunk-VFK4HGZT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6PZEDIAKcjs = require('./chunk-6PZEDIAK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ async function loadScripts(scripts, resolveClientUrl) {
|
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
const newSrc = new URL(
|
|
19
19
|
// remove the remote component bundle name identifier from the script src
|
|
20
|
-
script.src.replace(
|
|
20
|
+
script.src.replace(_chunk6PZEDIAKcjs.NEXT_BUNDLE_PATH_RE, "/_next/"),
|
|
21
21
|
location.origin
|
|
22
22
|
).href;
|
|
23
23
|
const rawResolved = _nullishCoalesce(_optionalChain([resolveClientUrl, 'optionalCall', _ => _(newSrc)]), () => ( newSrc));
|
|
@@ -55,4 +55,4 @@ async function loadScripts(scripts, resolveClientUrl) {
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
exports.loadScripts = loadScripts;
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-XWRB6CEA.cjs.map
|
package/dist/config/nextjs.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk6PZEDIAKcjs = require('../chunk-6PZEDIAK.cjs');
|
|
6
6
|
require('../chunk-Z2SLBFQL.cjs');
|
|
7
7
|
require('../chunk-5KTAEO52.cjs');
|
|
8
8
|
|
|
@@ -155,7 +155,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
|
|
|
155
155
|
".remote-components/shared/pages-host.tsx"
|
|
156
156
|
);
|
|
157
157
|
const appShared = /* @__PURE__ */ new Set([
|
|
158
|
-
...
|
|
158
|
+
..._chunk6PZEDIAKcjs.CORE_REACT_SHARED_KEYS,
|
|
159
159
|
"next/navigation",
|
|
160
160
|
"next/dist/client/components/navigation",
|
|
161
161
|
"next/link",
|
|
@@ -169,7 +169,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
|
|
|
169
169
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.shared]), () => ( []))
|
|
170
170
|
]);
|
|
171
171
|
const pagesShared = /* @__PURE__ */ new Set([
|
|
172
|
-
...
|
|
172
|
+
..._chunk6PZEDIAKcjs.CORE_REACT_SHARED_KEYS,
|
|
173
173
|
"next/router",
|
|
174
174
|
"next/link",
|
|
175
175
|
"next/dist/shared/lib/image-loader",
|
|
@@ -177,7 +177,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
|
|
|
177
177
|
"next/form",
|
|
178
178
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _2 => _2.shared]), () => ( []))
|
|
179
179
|
]);
|
|
180
|
-
const vendorShared = { ...
|
|
180
|
+
const vendorShared = { ..._chunk6PZEDIAKcjs.VENDOR_SHARED };
|
|
181
181
|
const resolve = _enhancedresolve2.default.create.sync({
|
|
182
182
|
conditionNames: ["browser", "import", "module", "require"],
|
|
183
183
|
..._fs.existsSync.call(void 0, _path.join.call(void 0, process.cwd(), "tsconfig.json")) ? {
|
|
@@ -248,7 +248,7 @@ ${sharedManifest ? `export const sharedManifest = ${sharedManifest};
|
|
|
248
248
|
).join(",\n");
|
|
249
249
|
return generateSharedModule({
|
|
250
250
|
sharedEntries,
|
|
251
|
-
sharedManifest: `{ protocol: '${
|
|
251
|
+
sharedManifest: `{ protocol: '${_chunk6PZEDIAKcjs.SHARED_MODULE_MANIFEST_PROTOCOL}', requirements: [
|
|
252
252
|
${requirements}
|
|
253
253
|
] }`
|
|
254
254
|
});
|