remote-components 0.4.12 → 0.4.14
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-CLO56ON2.js → chunk-EIEIT5PG.js} +82 -4
- package/dist/chunk-EIEIT5PG.js.map +1 -0
- package/dist/{chunk-BEGVH64U.js → chunk-GG32LZD3.js} +2 -2
- package/dist/{chunk-SULMNRMJ.cjs → chunk-JKDPK6L5.cjs} +23 -23
- package/dist/{chunk-XWRB6CEA.cjs → chunk-MAVMKFFL.cjs} +3 -3
- package/dist/{chunk-RZGFQTX6.js → chunk-PNKSHWZ3.js} +8 -8
- package/dist/{chunk-HXCW3WDT.cjs → chunk-T2JJIQUJ.cjs} +25 -25
- package/dist/{chunk-TGE3K3TR.cjs → chunk-TIS6PXSQ.cjs} +18 -18
- package/dist/{chunk-YSJ4FKGI.cjs → chunk-WCZKEWRM.cjs} +97 -19
- package/dist/chunk-WCZKEWRM.cjs.map +1 -0
- package/dist/{chunk-3PR3SWYZ.js → chunk-WWHNG5YP.js} +38 -3
- package/dist/chunk-WWHNG5YP.js.map +1 -0
- package/dist/{chunk-M6ACTSVB.js → chunk-XLGLCKZZ.js} +2 -2
- package/dist/{chunk-24LEEDHP.js → chunk-YKCU7RFM.js} +3 -3
- package/dist/{chunk-6PZEDIAK.cjs → chunk-ZPJ5J24T.cjs} +47 -12
- package/dist/chunk-ZPJ5J24T.cjs.map +1 -0
- package/dist/config/nextjs.cjs +10 -10
- package/dist/config/nextjs.js +7 -7
- package/dist/config/tailwind.cjs +53 -0
- package/dist/config/tailwind.cjs.map +1 -0
- package/dist/config/tailwind.d.ts +21 -0
- package/dist/config/tailwind.js +53 -0
- package/dist/config/tailwind.js.map +1 -0
- package/dist/host/html.cjs +20 -20
- package/dist/host/html.js +8 -8
- package/dist/host/nextjs/app/client-only.cjs +21 -12
- package/dist/host/nextjs/app/client-only.cjs.map +1 -1
- package/dist/host/nextjs/app/client-only.js +18 -9
- package/dist/host/nextjs/app/client-only.js.map +1 -1
- package/dist/host/nextjs/app.cjs +2 -0
- package/dist/host/nextjs/app.cjs.map +1 -1
- package/dist/host/nextjs/app.js +2 -0
- package/dist/host/nextjs/app.js.map +1 -1
- package/dist/host/nextjs/pages.cjs +14 -7
- package/dist/host/nextjs/pages.cjs.map +1 -1
- package/dist/host/nextjs/pages.d.ts +2 -0
- package/dist/host/nextjs/pages.js +14 -7
- package/dist/host/nextjs/pages.js.map +1 -1
- package/dist/host/react.cjs +8 -8
- package/dist/host/react.js +7 -7
- package/dist/internal/host/nextjs/app-client.cjs +15 -6
- package/dist/internal/host/nextjs/app-client.cjs.map +1 -1
- package/dist/internal/host/nextjs/app-client.d.ts +3 -2
- package/dist/internal/host/nextjs/app-client.js +15 -6
- package/dist/internal/host/nextjs/app-client.js.map +1 -1
- package/dist/internal/host/nextjs/dom-flight.cjs +1 -0
- package/dist/internal/host/nextjs/dom-flight.cjs.map +1 -1
- package/dist/internal/host/nextjs/dom-flight.d.ts +1 -0
- package/dist/internal/host/nextjs/dom-flight.js +1 -0
- package/dist/internal/host/nextjs/dom-flight.js.map +1 -1
- package/dist/internal/host/nextjs/image-shared.cjs +11 -2
- package/dist/internal/host/nextjs/image-shared.cjs.map +1 -1
- package/dist/internal/host/nextjs/image-shared.d.ts +3 -1
- package/dist/internal/host/nextjs/image-shared.js +11 -2
- package/dist/internal/host/nextjs/image-shared.js.map +1 -1
- package/dist/internal/host/server/fetch-remote-component.cjs +58 -3
- package/dist/internal/host/server/fetch-remote-component.cjs.map +1 -1
- package/dist/internal/host/server/fetch-remote-component.d.ts +1 -0
- package/dist/internal/host/server/fetch-remote-component.js +61 -3
- package/dist/internal/host/server/fetch-remote-component.js.map +1 -1
- package/dist/internal/host/server/types.cjs.map +1 -1
- package/dist/internal/host/server/types.d.ts +2 -0
- package/dist/internal/host/shared/next-image-deployment-id.cjs +50 -0
- package/dist/internal/host/shared/next-image-deployment-id.cjs.map +1 -0
- package/dist/internal/host/shared/next-image-deployment-id.d.ts +14 -0
- package/dist/internal/host/shared/next-image-deployment-id.js +25 -0
- package/dist/internal/host/shared/next-image-deployment-id.js.map +1 -0
- package/dist/internal/host/shared/pipeline.d.ts +2 -1
- package/dist/internal/host/shared/remote-image-loader.cjs +16 -2
- package/dist/internal/host/shared/remote-image-loader.cjs.map +1 -1
- package/dist/internal/host/shared/remote-image-loader.d.ts +2 -1
- package/dist/internal/host/shared/remote-image-loader.js +19 -2
- package/dist/internal/host/shared/remote-image-loader.js.map +1 -1
- package/dist/internal/runtime/html/parse-remote-html.d.ts +1 -0
- package/dist/internal/runtime/loaders/component-loader.d.ts +2 -1
- package/dist/remote/react/utils/portal.cjs +58 -0
- package/dist/remote/react/utils/portal.cjs.map +1 -0
- package/dist/remote/react/utils/portal.d.ts +12 -0
- package/dist/remote/react/utils/portal.js +58 -0
- package/dist/remote/react/utils/portal.js.map +1 -0
- package/dist/{server-handoff-9e905049.d.ts → server-handoff-006f9cb5.d.ts} +2 -0
- package/dist/{turbopack-43N2UJNN.js → turbopack-HK7DVYUG.js} +4 -4
- package/dist/{turbopack-5VGMYUL4.cjs → turbopack-YZOIO55D.cjs} +11 -11
- package/dist/{webpack-LXE2UWTA.js → webpack-2HP73JL7.js} +4 -4
- package/dist/{webpack-FSN5UBA2.cjs → webpack-W2MODB73.cjs} +11 -11
- package/package.json +18 -1
- package/dist/chunk-3PR3SWYZ.js.map +0 -1
- package/dist/chunk-6PZEDIAK.cjs.map +0 -1
- package/dist/chunk-CLO56ON2.js.map +0 -1
- package/dist/chunk-YSJ4FKGI.cjs.map +0 -1
- /package/dist/{chunk-BEGVH64U.js.map → chunk-GG32LZD3.js.map} +0 -0
- /package/dist/{chunk-SULMNRMJ.cjs.map → chunk-JKDPK6L5.cjs.map} +0 -0
- /package/dist/{chunk-XWRB6CEA.cjs.map → chunk-MAVMKFFL.cjs.map} +0 -0
- /package/dist/{chunk-RZGFQTX6.js.map → chunk-PNKSHWZ3.js.map} +0 -0
- /package/dist/{chunk-HXCW3WDT.cjs.map → chunk-T2JJIQUJ.cjs.map} +0 -0
- /package/dist/{chunk-TGE3K3TR.cjs.map → chunk-TIS6PXSQ.cjs.map} +0 -0
- /package/dist/{chunk-M6ACTSVB.js.map → chunk-XLGLCKZZ.js.map} +0 -0
- /package/dist/{chunk-24LEEDHP.js.map → chunk-YKCU7RFM.js.map} +0 -0
- /package/dist/{turbopack-43N2UJNN.js.map → turbopack-HK7DVYUG.js.map} +0 -0
- /package/dist/{turbopack-5VGMYUL4.cjs.map → turbopack-YZOIO55D.cjs.map} +0 -0
- /package/dist/{webpack-LXE2UWTA.js.map → webpack-2HP73JL7.js.map} +0 -0
- /package/dist/{webpack-FSN5UBA2.cjs.map → webpack-W2MODB73.cjs.map} +0 -0
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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 _chunkTCFLEBQMcjs = require('./chunk-TCFLEBQM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMAVMKFFLcjs = require('./chunk-MAVMKFFL.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
var _chunkTIS6PXSQcjs = require('./chunk-TIS6PXSQ.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
var _chunkSULMNRMJcjs = require('./chunk-SULMNRMJ.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkJKDPK6L5cjs = require('./chunk-JKDPK6L5.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
var _chunk3AX5WLZDcjs = require('./chunk-3AX5WLZD.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
@@ -24,17 +25,16 @@ var _chunk3AX5WLZDcjs = require('./chunk-3AX5WLZD.cjs');
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
var _chunk6PZEDIAKcjs = require('./chunk-6PZEDIAK.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
var _chunkZPJ5J24Tcjs = require('./chunk-ZPJ5J24T.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
var _chunkBBXVML3Dcjs = require('./chunk-BBXVML3D.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkBBXVML3Dcjs = require('./chunk-BBXVML3D.cjs');
|
|
38
38
|
|
|
39
39
|
// src/host/server/fetch-with-hooks.ts
|
|
40
40
|
async function fetchWithWarning(url, init) {
|
|
@@ -288,12 +288,12 @@ function toComponentType(value) {
|
|
|
288
288
|
return value && isComponentType(value) ? value : "unknown";
|
|
289
289
|
}
|
|
290
290
|
function buildMetadata(attrs, url) {
|
|
291
|
-
const id = attrs.id ||
|
|
292
|
-
const bundle = attrs.bundle || process.env.NEXT_PUBLIC_MFE_CURRENT_APPLICATION ||
|
|
291
|
+
const id = attrs.id || _chunkZPJ5J24Tcjs.DEFAULT_COMPONENT_NAME;
|
|
292
|
+
const bundle = attrs.bundle || process.env.NEXT_PUBLIC_MFE_CURRENT_APPLICATION || _chunkZPJ5J24Tcjs.DEFAULT_BUNDLE_NAME;
|
|
293
293
|
return {
|
|
294
294
|
name: attrs.name || id.replace(/_ssr$/, ""),
|
|
295
295
|
bundle,
|
|
296
|
-
route: attrs.route || url.pathname ||
|
|
296
|
+
route: attrs.route || url.pathname || _chunkZPJ5J24Tcjs.DEFAULT_ROUTE,
|
|
297
297
|
runtime: toRuntime(attrs.runtime),
|
|
298
298
|
id,
|
|
299
299
|
type: toComponentType(attrs.type)
|
|
@@ -338,7 +338,7 @@ function extractRemoteShared(doc, name, nextData) {
|
|
|
338
338
|
function validateComponentFound(component, rsc, nextData, isRemoteComponent, url, name) {
|
|
339
339
|
if (!component || !(rsc || nextData || isRemoteComponent)) {
|
|
340
340
|
throw new (0, _chunkBBXVML3Dcjs.RemoteComponentsError)(
|
|
341
|
-
`Remote Component not found on ${url}.${name !==
|
|
341
|
+
`Remote Component not found on ${url}.${name !== _chunkZPJ5J24Tcjs.DEFAULT_COMPONENT_NAME ? ` The name for the <RemoteComponent> is "${name}". Check <RemoteComponent> usage.` : ""} Did you forget to wrap the content in <RemoteComponent>?`
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
@@ -369,7 +369,7 @@ function parseRemoteComponentDocument(doc, name, url) {
|
|
|
369
369
|
name: resolvedName,
|
|
370
370
|
bundle: _optionalChain([component, 'optionalAccess', _40 => _40.getAttribute, 'call', _41 => _41(DATA_BUNDLE)]) || _optionalChain([nextData, 'optionalAccess', _42 => _42.props, 'access', _43 => _43.__REMOTE_COMPONENT__, 'optionalAccess', _44 => _44.bundle]),
|
|
371
371
|
route: _nullishCoalesce(_optionalChain([component, 'optionalAccess', _45 => _45.getAttribute, 'call', _46 => _46(DATA_ROUTE)]), () => ( _optionalChain([nextData, 'optionalAccess', _47 => _47.page]))),
|
|
372
|
-
runtime: _nullishCoalesce(_nullishCoalesce(_optionalChain([component, 'optionalAccess', _48 => _48.getAttribute, 'call', _49 => _49(DATA_RUNTIME)]), () => ( _optionalChain([nextData, 'optionalAccess', _50 => _50.props, 'access', _51 => _51.__REMOTE_COMPONENT__, 'optionalAccess', _52 => _52.runtime]))), () => (
|
|
372
|
+
runtime: _nullishCoalesce(_nullishCoalesce(_optionalChain([component, 'optionalAccess', _48 => _48.getAttribute, 'call', _49 => _49(DATA_RUNTIME)]), () => ( _optionalChain([nextData, 'optionalAccess', _50 => _50.props, 'access', _51 => _51.__REMOTE_COMPONENT__, 'optionalAccess', _52 => _52.runtime]))), () => ( _chunkZPJ5J24Tcjs.RUNTIME_SCRIPT)),
|
|
373
373
|
id: _optionalChain([component, 'optionalAccess', _53 => _53.getAttribute, 'call', _54 => _54("id")]),
|
|
374
374
|
type: _optionalChain([component, 'optionalAccess', _55 => _55.getAttribute, 'call', _56 => _56(DATA_TYPE)])
|
|
375
375
|
},
|
|
@@ -439,7 +439,7 @@ async function loadRemoteComponent({
|
|
|
439
439
|
self.__DISABLE_WEBPACK_EXEC__ = {};
|
|
440
440
|
}
|
|
441
441
|
self.__DISABLE_WEBPACK_EXEC__[bundle] = true;
|
|
442
|
-
await
|
|
442
|
+
await _chunkMAVMKFFLcjs.loadScripts.call(void 0, scripts, resolveClientUrl);
|
|
443
443
|
}
|
|
444
444
|
const hostShared = await shared;
|
|
445
445
|
_chunkBBXVML3Dcjs.logDebug.call(void 0,
|
|
@@ -454,7 +454,7 @@ async function loadRemoteComponent({
|
|
|
454
454
|
"ComponentLoader",
|
|
455
455
|
`Remote shared modules requested: ${JSON.stringify(remoteShared)}`
|
|
456
456
|
);
|
|
457
|
-
const scope = await
|
|
457
|
+
const scope = await _chunkTIS6PXSQcjs.setupRemoteScope.call(void 0,
|
|
458
458
|
runtime,
|
|
459
459
|
scripts,
|
|
460
460
|
url,
|
|
@@ -462,14 +462,14 @@ async function loadRemoteComponent({
|
|
|
462
462
|
resolveClientUrl
|
|
463
463
|
);
|
|
464
464
|
if (runtime === "turbopack") {
|
|
465
|
-
await
|
|
465
|
+
await _chunkJKDPK6L5cjs.initializeSharedModules.call(void 0,
|
|
466
466
|
scope,
|
|
467
|
-
|
|
467
|
+
_chunkZPJ5J24Tcjs.buildCoreShared.call(void 0, hostShared),
|
|
468
468
|
remoteShared
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
471
|
if (bundle && runtime === "webpack") {
|
|
472
|
-
const resolve = await
|
|
472
|
+
const resolve = await _chunkJKDPK6L5cjs.buildWebpackResolve.call(void 0,
|
|
473
473
|
hostShared,
|
|
474
474
|
remoteShared,
|
|
475
475
|
bundle,
|
|
@@ -482,7 +482,7 @@ async function loadRemoteComponent({
|
|
|
482
482
|
},
|
|
483
483
|
"ComponentLoader"
|
|
484
484
|
);
|
|
485
|
-
|
|
485
|
+
_chunkJKDPK6L5cjs.applySharedModules.call(void 0, bundle, resolve);
|
|
486
486
|
} else if (bundle && runtime === "turbopack") {
|
|
487
487
|
} else {
|
|
488
488
|
_chunkBBXVML3Dcjs.logWarn.call(void 0,
|
|
@@ -524,7 +524,7 @@ async function loadRSCComponent(rscName, data) {
|
|
|
524
524
|
return { component };
|
|
525
525
|
}
|
|
526
526
|
function loadNextPagesComponent(bundle, route, nextData, name, container) {
|
|
527
|
-
const { Component, App } =
|
|
527
|
+
const { Component, App } = _chunkJKDPK6L5cjs.nextClientPagesLoader.call(void 0, bundle, route, container);
|
|
528
528
|
if (!Component) {
|
|
529
529
|
throw new (0, _chunkBBXVML3Dcjs.RemoteComponentsError)(
|
|
530
530
|
`Remote Component "${name}" is trying to load the component for route "${route}" but it is not available.`
|
|
@@ -540,7 +540,7 @@ function preparePipeline(input) {
|
|
|
540
540
|
const doc = parser.parseFromString(input.html, "text/html");
|
|
541
541
|
const parsed = parseRemoteComponentDocument(doc, input.name, input.url);
|
|
542
542
|
const remoteShared = _nullishCoalesce(input.remoteShared, () => ( parsed.remoteShared));
|
|
543
|
-
const missingSharedModulesMessage =
|
|
543
|
+
const missingSharedModulesMessage = _chunkZPJ5J24Tcjs.getMissingSharedModulesMessage.call(void 0, remoteShared);
|
|
544
544
|
if (missingSharedModulesMessage) {
|
|
545
545
|
throw new (0, _chunkBBXVML3Dcjs.RemoteComponentsError)(missingSharedModulesMessage);
|
|
546
546
|
}
|
|
@@ -580,12 +580,12 @@ async function loadPrepared(input) {
|
|
|
580
580
|
function buildScriptDescriptors(scripts, url) {
|
|
581
581
|
return scripts.map((script) => {
|
|
582
582
|
const scriptSrc = script.getAttribute("data-src") || script.getAttribute("src") || script.src;
|
|
583
|
-
const { prefix, id: path } = _nullishCoalesce(_optionalChain([
|
|
583
|
+
const { prefix, id: path } = _nullishCoalesce(_optionalChain([_chunkZPJ5J24Tcjs.REMOTE_COMPONENT_REGEX, 'access', _57 => _57.exec, 'call', _58 => _58(scriptSrc), 'optionalAccess', _59 => _59.groups]), () => ( {
|
|
584
584
|
prefix: void 0,
|
|
585
585
|
id: scriptSrc
|
|
586
586
|
}));
|
|
587
587
|
return {
|
|
588
|
-
src: new URL(
|
|
588
|
+
src: new URL(_chunkZPJ5J24Tcjs.collapseDoubleSlashes.call(void 0, `${_nullishCoalesce(prefix, () => ( ""))}${path}`), url).href
|
|
589
589
|
};
|
|
590
590
|
});
|
|
591
591
|
}
|
|
@@ -618,7 +618,7 @@ async function loadDynamicPath(input) {
|
|
|
618
618
|
resolveClientUrl,
|
|
619
619
|
container
|
|
620
620
|
} = input;
|
|
621
|
-
const rscName = _nullishCoalesce(input.rscName, () => ( (parsed.rsc ? `__remote_component_rsc_${
|
|
621
|
+
const rscName = _nullishCoalesce(input.rscName, () => ( (parsed.rsc ? `__remote_component_rsc_${_chunkZPJ5J24Tcjs.escapeString.call(void 0, url.href)}_${_chunkZPJ5J24Tcjs.escapeString.call(void 0, parsed.name)}` : void 0)));
|
|
622
622
|
const rscData = parsed.rsc ? (parsed.rsc.textContent || "").split("\n").filter(Boolean) : [];
|
|
623
623
|
const result = await loadRemoteComponent({
|
|
624
624
|
url,
|
|
@@ -630,7 +630,7 @@ async function loadDynamicPath(input) {
|
|
|
630
630
|
data: rscData,
|
|
631
631
|
nextData: parsed.nextData,
|
|
632
632
|
scripts: scriptDescriptors,
|
|
633
|
-
shared:
|
|
633
|
+
shared: _chunkZPJ5J24Tcjs.buildHostShared.call(void 0, shared, resolveClientUrl),
|
|
634
634
|
remoteShared: parsed.remoteShared,
|
|
635
635
|
container,
|
|
636
636
|
resolveClientUrl
|
|
@@ -709,4 +709,4 @@ function bindResolveClientUrl(prop, remoteSrc) {
|
|
|
709
709
|
|
|
710
710
|
|
|
711
711
|
exports.fetchWithHooks = fetchWithHooks; exports.getClientOrServerUrl = getClientOrServerUrl; exports.makeReactEmitter = makeReactEmitter; exports.makeEventEmitter = makeEventEmitter; exports.createRSCStream = createRSCStream; exports.preparePipeline = preparePipeline; exports.loadPrepared = loadPrepared; exports.createHostState = createHostState; exports.resolveNameFromSrc = resolveNameFromSrc; exports.bindResolveClientUrl = bindResolveClientUrl;
|
|
712
|
-
//# sourceMappingURL=chunk-
|
|
712
|
+
//# sourceMappingURL=chunk-T2JJIQUJ.cjs.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkJKDPK6L5cjs = require('./chunk-JKDPK6L5.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ var _chunkSULMNRMJcjs = require('./chunk-SULMNRMJ.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkZPJ5J24Tcjs = require('./chunk-ZPJ5J24T.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 = _chunkZPJ5J24Tcjs.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 === _chunkZPJ5J24Tcjs.RUNTIME_TURBOPACK) {
|
|
36
36
|
await Promise.allSettled(
|
|
37
37
|
scripts.map(
|
|
38
|
-
(script) => script.src ?
|
|
38
|
+
(script) => script.src ? _chunkJKDPK6L5cjs.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 = _chunkZPJ5J24Tcjs.createScope.call(void 0, bundleName, url, runtime, resolveClientUrl);
|
|
45
|
+
_chunkZPJ5J24Tcjs.registerScope.call(void 0, scope);
|
|
46
|
+
if (runtime === _chunkZPJ5J24Tcjs.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__ = _chunkJKDPK6L5cjs.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 === _chunkZPJ5J24Tcjs.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 === _chunkZPJ5J24Tcjs.RUNTIME_TURBOPACK) {
|
|
74
74
|
const results = await Promise.allSettled(
|
|
75
75
|
scripts.map((script) => {
|
|
76
76
|
if (script.src) {
|
|
77
|
-
return
|
|
77
|
+
return _chunkJKDPK6L5cjs.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(_chunkZPJ5J24Tcjs.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 === _chunkZPJ5J24Tcjs.RUNTIME_WEBPACK && bundle && moduleId) {
|
|
108
|
+
const scope2 = _chunkZPJ5J24Tcjs.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 = _chunkZPJ5J24Tcjs.getScope.call(void 0, bundleName);
|
|
114
114
|
if (scope) {
|
|
115
|
-
return
|
|
115
|
+
return _chunkJKDPK6L5cjs.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-TIS6PXSQ.cjs.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkT2JJIQUJcjs = require('./chunk-T2JJIQUJ.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 _chunkZPJ5J24Tcjs = require('./chunk-ZPJ5J24T.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, () => _chunkT2JJIQUJcjs.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^="${_chunkZPJ5J24Tcjs.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 = _chunkZPJ5J24Tcjs.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
|
+
() => _chunkT2JJIQUJcjs.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
|
+
() => _chunkT2JJIQUJcjs.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, () => _chunkT2JJIQUJcjs.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 = `${_chunkZPJ5J24Tcjs.escapeString.call(void 0, id)}_${_chunkZPJ5J24Tcjs.escapeString.call(void 0,
|
|
212
212
|
_nullishCoalesce(_optionalChain([data, 'optionalAccess', _5 => _5.name]), () => ( name))
|
|
213
|
-
)}_${
|
|
213
|
+
)}_${_chunkZPJ5J24Tcjs.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,
|
|
@@ -222,6 +222,10 @@ function ConsumeRemoteComponent({
|
|
|
222
222
|
`[data-remote-component-id="shadowroot_${keySuffix}"]`
|
|
223
223
|
), 'optionalAccess', _8 => _8.shadowRoot, 'optionalAccess', _9 => _9.innerHTML]), () => ( _optionalChain([document, 'access', _10 => _10.getElementById, 'call', _11 => _11(`__REMOTE_COMPONENT${name}`), 'optionalAccess', _12 => _12.innerHTML]))), () => ( _optionalChain([document, 'access', _13 => _13.querySelector, 'call', _14 => _14(`div[data-bundle][data-route][id^="${name}"]`), 'optionalAccess', _15 => _15.innerHTML]))), () => ( _optionalChain([document, 'access', _16 => _16.querySelector, 'call', _17 => _17("div[data-bundle][data-route]"), 'optionalAccess', _18 => _18.innerHTML]))) : null
|
|
224
224
|
);
|
|
225
|
+
const initialSsrContentRef = _react.useRef.call(void 0, htmlRef.current != null);
|
|
226
|
+
const [stylesReady, setStylesReady] = _react.useState.call(void 0,
|
|
227
|
+
() => !(typeof document !== "undefined" && isolate !== false && Boolean(src) && !initialSsrContentRef.current)
|
|
228
|
+
);
|
|
225
229
|
const endTemplateRef = _react.useRef.call(void 0, null);
|
|
226
230
|
const childrenRef = _react.useRef.call(void 0,
|
|
227
231
|
typeof document !== "undefined" ? (() => {
|
|
@@ -236,7 +240,7 @@ function ConsumeRemoteComponent({
|
|
|
236
240
|
return elements;
|
|
237
241
|
})() : []
|
|
238
242
|
);
|
|
239
|
-
const hostStateRef = _react.useRef.call(void 0,
|
|
243
|
+
const hostStateRef = _react.useRef.call(void 0, _chunkT2JJIQUJcjs.createHostState.call(void 0, ));
|
|
240
244
|
const componentHydrationHtml = _react.useRef.call(void 0, null);
|
|
241
245
|
const prevRemoteComponentContainerRef = _react.useRef.call(void 0, null);
|
|
242
246
|
const unmountRef = _react.useRef.call(void 0, null);
|
|
@@ -276,6 +280,59 @@ function ConsumeRemoteComponent({
|
|
|
276
280
|
}
|
|
277
281
|
}
|
|
278
282
|
}, [shadowRoot, remoteComponent, name]);
|
|
283
|
+
_react.useLayoutEffect.call(void 0, () => {
|
|
284
|
+
const currentSrc = src ? typeof src === "string" ? src : src.href : null;
|
|
285
|
+
if (stylesReady || initialSsrContentRef.current || !shadowRoot || !data || data.src !== currentSrc) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const expectedStylesheets = (_nullishCoalesce(data.links, () => ( []))).filter(
|
|
289
|
+
(link) => link.rel === "stylesheet"
|
|
290
|
+
);
|
|
291
|
+
if (expectedStylesheets.length === 0) {
|
|
292
|
+
setStylesReady(true);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const expectedHrefs = new Set(
|
|
296
|
+
expectedStylesheets.map((link) => new URL(link.href, url).href)
|
|
297
|
+
);
|
|
298
|
+
const links = Array.from(
|
|
299
|
+
shadowRoot.querySelectorAll('link[rel="stylesheet"]')
|
|
300
|
+
).filter((link) => expectedHrefs.has(link.href));
|
|
301
|
+
if (links.length < expectedHrefs.size) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (links.length === 0) {
|
|
305
|
+
setStylesReady(true);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
let pending = links.length;
|
|
309
|
+
let settled = false;
|
|
310
|
+
const onSettled = () => {
|
|
311
|
+
pending -= 1;
|
|
312
|
+
if (!settled && pending <= 0) {
|
|
313
|
+
settled = true;
|
|
314
|
+
setStylesReady(true);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
const cleanups = links.map((link) => {
|
|
318
|
+
if (link.sheet) {
|
|
319
|
+
onSettled();
|
|
320
|
+
return () => {
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
link.addEventListener("load", onSettled, { once: true });
|
|
324
|
+
link.addEventListener("error", onSettled, { once: true });
|
|
325
|
+
return () => {
|
|
326
|
+
link.removeEventListener("load", onSettled);
|
|
327
|
+
link.removeEventListener("error", onSettled);
|
|
328
|
+
};
|
|
329
|
+
});
|
|
330
|
+
return () => {
|
|
331
|
+
for (const cleanup of cleanups) {
|
|
332
|
+
cleanup();
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}, [shadowRoot, data, stylesReady, src, url]);
|
|
279
336
|
_react.useEffect.call(void 0, () => {
|
|
280
337
|
if (src && src !== hostStateRef.current.prevSrc) {
|
|
281
338
|
const previousSrc = hostStateRef.current.prevSrc;
|
|
@@ -289,6 +346,9 @@ function ConsumeRemoteComponent({
|
|
|
289
346
|
const { signal } = hostStateRef.current.abortController;
|
|
290
347
|
emitter.beforeLoad(src);
|
|
291
348
|
hostStateRef.current.stage = "loading";
|
|
349
|
+
if (isolate !== false && !initialSsrContentRef.current) {
|
|
350
|
+
setStylesReady(false);
|
|
351
|
+
}
|
|
292
352
|
_react.startTransition.call(void 0, async () => {
|
|
293
353
|
try {
|
|
294
354
|
let html = getRemoteComponentHtml(
|
|
@@ -302,7 +362,7 @@ function ConsumeRemoteComponent({
|
|
|
302
362
|
_nullishCoalesce(_optionalChain([resolveClientUrl, 'optionalCall', _29 => _29(url.href)]), () => ( url.href)),
|
|
303
363
|
location.href
|
|
304
364
|
);
|
|
305
|
-
const res = await
|
|
365
|
+
const res = await _chunkT2JJIQUJcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
|
|
306
366
|
onRequest,
|
|
307
367
|
onResponse,
|
|
308
368
|
abortController: hostStateRef.current.abortController
|
|
@@ -321,7 +381,7 @@ function ConsumeRemoteComponent({
|
|
|
321
381
|
const userShared = await shared;
|
|
322
382
|
if (signal.aborted)
|
|
323
383
|
return;
|
|
324
|
-
const prepared =
|
|
384
|
+
const prepared = _chunkT2JJIQUJcjs.preparePipeline.call(void 0, {
|
|
325
385
|
html,
|
|
326
386
|
name,
|
|
327
387
|
url,
|
|
@@ -362,11 +422,25 @@ function ConsumeRemoteComponent({
|
|
|
362
422
|
href: new URL(_nullishCoalesce(link.getAttribute("href"), () => ( link.href)), url).href,
|
|
363
423
|
...link.getAttributeNames().reduce((acc, key) => {
|
|
364
424
|
if (key !== "href") {
|
|
365
|
-
acc[_nullishCoalesce(
|
|
425
|
+
acc[_nullishCoalesce(_chunkZPJ5J24Tcjs.attrToProp[key], () => ( key))] = _nullishCoalesce(link.getAttribute(key), () => ( ""));
|
|
366
426
|
}
|
|
367
427
|
return acc;
|
|
368
428
|
}, {})
|
|
369
429
|
}));
|
|
430
|
+
const stylesheetLinks = Array.from(linkElements).filter(
|
|
431
|
+
(link) => link.getAttribute("rel") === "stylesheet"
|
|
432
|
+
);
|
|
433
|
+
if (typeof _reactdom.preload === "function") {
|
|
434
|
+
for (const link of stylesheetLinks) {
|
|
435
|
+
_reactdom.preload.call(void 0,
|
|
436
|
+
new URL(_nullishCoalesce(link.getAttribute("href"), () => ( link.href)), url).href,
|
|
437
|
+
{
|
|
438
|
+
as: "style",
|
|
439
|
+
fetchPriority: "high"
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
370
444
|
const inlineScripts = (isRemoteComponent ? component : doc).querySelectorAll(
|
|
371
445
|
"script:not([src]):not([data-src]):not([id*='_rsc']):not([id='__NEXT_DATA__']):not([id='__REMOTE_NEXT_DATA__'])"
|
|
372
446
|
);
|
|
@@ -424,7 +498,7 @@ function ConsumeRemoteComponent({
|
|
|
424
498
|
});
|
|
425
499
|
self.__next_s = prevNextScripts;
|
|
426
500
|
}
|
|
427
|
-
const rscName = rsc ? `__remote_component_rsc_${
|
|
501
|
+
const rscName = rsc ? `__remote_component_rsc_${_chunkZPJ5J24Tcjs.escapeString.call(void 0, id)}_${_chunkZPJ5J24Tcjs.escapeString.call(void 0,
|
|
428
502
|
remoteName
|
|
429
503
|
)}` : void 0;
|
|
430
504
|
if (rsc) {
|
|
@@ -495,9 +569,10 @@ function ConsumeRemoteComponent({
|
|
|
495
569
|
);
|
|
496
570
|
emitter.load(src);
|
|
497
571
|
}
|
|
572
|
+
setStylesReady(true);
|
|
498
573
|
hostStateRef.current.stage = "loaded";
|
|
499
574
|
} else {
|
|
500
|
-
const result = await
|
|
575
|
+
const result = await _chunkT2JJIQUJcjs.loadPrepared.call(void 0, {
|
|
501
576
|
prepared,
|
|
502
577
|
url,
|
|
503
578
|
signal,
|
|
@@ -566,8 +641,8 @@ function ConsumeRemoteComponent({
|
|
|
566
641
|
const metadataJson = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "script", { "data-remote-component": true, type: "application/json", children: JSON.stringify({
|
|
567
642
|
name: _optionalChain([data, 'optionalAccess', _33 => _33.name]) || name,
|
|
568
643
|
bundle: _optionalChain([data, 'optionalAccess', _34 => _34.bundle]) || "default",
|
|
569
|
-
route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) ||
|
|
570
|
-
runtime: hostStateRef.current.prevIsRemoteComponent ?
|
|
644
|
+
route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) || _chunkZPJ5J24Tcjs.DEFAULT_ROUTE,
|
|
645
|
+
runtime: hostStateRef.current.prevIsRemoteComponent ? _chunkZPJ5J24Tcjs.RUNTIME_SCRIPT : _optionalChain([data, 'optionalAccess', _36 => _36.runtime]) || _chunkZPJ5J24Tcjs.RUNTIME_WEBPACK
|
|
571
646
|
}) });
|
|
572
647
|
const resetStyle = reset ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { "data-remote-components-reset": "react", children: `:host { all: initial; }` }) : null;
|
|
573
648
|
const linksToRender = _optionalChain([data, 'optionalAccess', _37 => _37.links, 'optionalAccess', _38 => _38.map, 'call', _39 => _39((link) => /* @__PURE__ */ _react.createElement.call(void 0,
|
|
@@ -616,14 +691,17 @@ function ConsumeRemoteComponent({
|
|
|
616
691
|
if (shadowRemoteComponentHtml) {
|
|
617
692
|
shadowRemoteComponentHtml.remove();
|
|
618
693
|
}
|
|
694
|
+
const hideForStyles = !initialSsrContentRef.current && !stylesReady;
|
|
619
695
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
620
696
|
metadataJson,
|
|
697
|
+
hideForStyles ? children : null,
|
|
621
698
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
622
699
|
"div",
|
|
623
700
|
{
|
|
624
701
|
"data-remote-component-id": `shadowroot_${keySuffix}`,
|
|
625
702
|
id: `shadowroot_${_nullishCoalesce(_optionalChain([data, 'optionalAccess', _44 => _44.name]), () => ( name))}`,
|
|
626
703
|
ref: shadowRootContainerRef,
|
|
704
|
+
style: hideForStyles ? { display: "none" } : void 0,
|
|
627
705
|
children: [
|
|
628
706
|
typeof document === "undefined" ? (
|
|
629
707
|
// eslint-disable-next-line react/no-unknown-property
|
|
@@ -679,4 +757,4 @@ function ConsumeRemoteComponent({
|
|
|
679
757
|
|
|
680
758
|
|
|
681
759
|
exports.useRemoteNavigate = useRemoteNavigate; exports.ConsumeRemoteComponent = ConsumeRemoteComponent;
|
|
682
|
-
//# sourceMappingURL=chunk-
|
|
760
|
+
//# sourceMappingURL=chunk-WCZKEWRM.cjs.map
|