remote-components 0.3.7 → 0.4.1
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-LCXO7BUY.cjs → chunk-42TVDI3G.cjs} +5 -4
- package/dist/chunk-42TVDI3G.cjs.map +1 -0
- package/dist/{chunk-AWWWK2ZY.cjs → chunk-4O3EOST4.cjs} +32 -20
- package/dist/chunk-4O3EOST4.cjs.map +1 -0
- package/dist/chunk-5KTAEO52.cjs +28 -0
- package/dist/chunk-5KTAEO52.cjs.map +1 -0
- package/dist/{chunk-SZFCBE54.js → chunk-AKOMV2UF.js} +4 -3
- package/dist/chunk-AKOMV2UF.js.map +1 -0
- package/dist/{chunk-NZAB7REE.js → chunk-CC3WOSDO.js} +5 -5
- package/dist/{chunk-T64P7BAG.cjs → chunk-JJTCFQHE.cjs} +3 -3
- package/dist/{chunk-I47KE3EC.cjs → chunk-KVQI55BZ.cjs} +21 -21
- package/dist/{chunk-GBFUPMMI.js → chunk-LOYJP2V2.js} +25 -13
- package/dist/chunk-LOYJP2V2.js.map +1 -0
- package/dist/{chunk-52BJ7VFA.js → chunk-MKO52FRO.js} +2 -2
- package/dist/{chunk-RJW3EZJP.cjs → chunk-MQ2BBSL4.cjs} +24 -24
- package/dist/chunk-MQ2BBSL4.cjs.map +1 -0
- package/dist/{chunk-QKB74MLO.js → chunk-MTMDXJLM.js} +3 -3
- package/dist/chunk-MTMDXJLM.js.map +1 -0
- package/dist/chunk-N3SQTOSE.cjs +25 -0
- package/dist/chunk-N3SQTOSE.cjs.map +1 -0
- package/dist/chunk-RHGEBXPL.js +25 -0
- package/dist/chunk-RHGEBXPL.js.map +1 -0
- package/dist/{chunk-X6W464D6.cjs → chunk-RLI4YTBJ.cjs} +17 -1
- package/dist/chunk-RLI4YTBJ.cjs.map +1 -0
- package/dist/{chunk-SJM7AAGU.js → chunk-SAGYPGIQ.js} +17 -1
- package/dist/chunk-SAGYPGIQ.js.map +1 -0
- package/dist/chunk-STIJO4AG.js +28 -0
- package/dist/chunk-STIJO4AG.js.map +1 -0
- package/dist/config/nextjs.cjs +6 -5
- package/dist/config/nextjs.cjs.map +1 -1
- package/dist/config/nextjs.js +3 -2
- package/dist/config/nextjs.js.map +1 -1
- package/dist/host/html.cjs +21 -20
- package/dist/host/html.cjs.map +1 -1
- package/dist/host/html.js +9 -8
- package/dist/host/html.js.map +1 -1
- package/dist/host/navigation.cjs +8 -0
- package/dist/host/navigation.cjs.map +1 -0
- package/dist/host/navigation.d.ts +30 -0
- package/dist/host/navigation.js +8 -0
- package/dist/host/navigation.js.map +1 -0
- package/dist/host/nextjs/app/client-only.cjs +14 -12
- package/dist/host/nextjs/app/client-only.cjs.map +1 -1
- package/dist/host/nextjs/app/client-only.d.ts +2 -1
- package/dist/host/nextjs/app/client-only.js +9 -7
- package/dist/host/nextjs/app/client-only.js.map +1 -1
- package/dist/host/react.cjs +12 -8
- package/dist/host/react.d.ts +2 -1
- package/dist/host/react.js +13 -9
- package/dist/{index-4c65355c.d.ts → index-d2ce8a3f.d.ts} +22 -2
- package/dist/internal/host/shared/navigate-event.cjs +51 -0
- package/dist/internal/host/shared/navigate-event.cjs.map +1 -0
- package/dist/internal/host/shared/navigate-event.d.ts +21 -0
- package/dist/internal/host/shared/navigate-event.js +26 -0
- package/dist/internal/host/shared/navigate-event.js.map +1 -0
- package/dist/internal/host/shared/polyfill.cjs +14 -0
- package/dist/internal/host/shared/polyfill.cjs.map +1 -1
- package/dist/internal/host/shared/polyfill.js +16 -0
- package/dist/internal/host/shared/polyfill.js.map +1 -1
- package/dist/internal/runtime/loaders/script-loader.cjs +2 -1
- package/dist/internal/runtime/loaders/script-loader.cjs.map +1 -1
- package/dist/internal/runtime/loaders/script-loader.js +2 -1
- package/dist/internal/runtime/loaders/script-loader.js.map +1 -1
- package/dist/internal/runtime/turbopack/chunk-loader.cjs +1 -1
- package/dist/internal/runtime/turbopack/chunk-loader.cjs.map +1 -1
- package/dist/internal/runtime/turbopack/chunk-loader.js +1 -1
- package/dist/internal/runtime/turbopack/chunk-loader.js.map +1 -1
- package/dist/navigate-event-baee0b63.d.ts +14 -0
- package/dist/{turbopack-5LW6V6IT.js → turbopack-5N44NVPT.js} +5 -4
- package/dist/{turbopack-5LW6V6IT.js.map → turbopack-5N44NVPT.js.map} +1 -1
- package/dist/{turbopack-KRKECGY2.cjs → turbopack-EPXGK4EV.cjs} +12 -11
- package/dist/turbopack-EPXGK4EV.cjs.map +1 -0
- package/dist/{webpack-NPZNXRNL.js → webpack-KSDNIXMS.js} +5 -4
- package/dist/{webpack-NPZNXRNL.js.map → webpack-KSDNIXMS.js.map} +1 -1
- package/dist/{webpack-TTZDARNY.cjs → webpack-SIFRCBIN.cjs} +12 -11
- package/dist/webpack-SIFRCBIN.cjs.map +1 -0
- package/package.json +9 -1
- package/dist/chunk-AWWWK2ZY.cjs.map +0 -1
- package/dist/chunk-GBFUPMMI.js.map +0 -1
- package/dist/chunk-LCXO7BUY.cjs.map +0 -1
- package/dist/chunk-QKB74MLO.js.map +0 -1
- package/dist/chunk-RJW3EZJP.cjs.map +0 -1
- package/dist/chunk-SJM7AAGU.js.map +0 -1
- package/dist/chunk-SZFCBE54.js.map +0 -1
- package/dist/chunk-X6W464D6.cjs.map +0 -1
- package/dist/turbopack-KRKECGY2.cjs.map +0 -1
- package/dist/webpack-TTZDARNY.cjs.map +0 -1
- /package/dist/{chunk-NZAB7REE.js.map → chunk-CC3WOSDO.js.map} +0 -0
- /package/dist/{chunk-T64P7BAG.cjs.map → chunk-JJTCFQHE.cjs.map} +0 -0
- /package/dist/{chunk-I47KE3EC.cjs.map → chunk-KVQI55BZ.cjs.map} +0 -0
- /package/dist/{chunk-52BJ7VFA.js.map → chunk-MKO52FRO.js.map} +0 -0
|
@@ -7,10 +7,13 @@ import {
|
|
|
7
7
|
makeReactEmitter,
|
|
8
8
|
preparePipeline,
|
|
9
9
|
resolveNameFromSrc
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CC3WOSDO.js";
|
|
11
11
|
import {
|
|
12
12
|
loadStaticRemoteComponent
|
|
13
13
|
} from "./chunk-LQ7VQ74E.js";
|
|
14
|
+
import {
|
|
15
|
+
onRemoteNavigate
|
|
16
|
+
} from "./chunk-RHGEBXPL.js";
|
|
14
17
|
import {
|
|
15
18
|
DEFAULT_COMPONENT_NAME,
|
|
16
19
|
DEFAULT_ROUTE,
|
|
@@ -18,7 +21,7 @@ import {
|
|
|
18
21
|
RUNTIME_WEBPACK,
|
|
19
22
|
attrToProp,
|
|
20
23
|
escapeString
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SAGYPGIQ.js";
|
|
22
25
|
import {
|
|
23
26
|
getNamespace
|
|
24
27
|
} from "./chunk-D5GNZB6O.js";
|
|
@@ -31,11 +34,11 @@ import {
|
|
|
31
34
|
// src/host/react/index.tsx
|
|
32
35
|
import {
|
|
33
36
|
startTransition,
|
|
34
|
-
useEffect,
|
|
37
|
+
useEffect as useEffect2,
|
|
35
38
|
useId,
|
|
36
39
|
useLayoutEffect as useLayoutEffect2,
|
|
37
40
|
useMemo as useMemo2,
|
|
38
|
-
useRef as
|
|
41
|
+
useRef as useRef3,
|
|
39
42
|
useState as useState2
|
|
40
43
|
} from "react";
|
|
41
44
|
import { createPortal } from "react-dom";
|
|
@@ -159,6 +162,14 @@ function getRemoteComponentHtml(html) {
|
|
|
159
162
|
return "";
|
|
160
163
|
}
|
|
161
164
|
|
|
165
|
+
// src/host/react/hooks/use-remote-navigate.ts
|
|
166
|
+
import { useEffect, useRef as useRef2 } from "react";
|
|
167
|
+
function useRemoteNavigate(callback) {
|
|
168
|
+
const callbackRef = useRef2(callback);
|
|
169
|
+
callbackRef.current = callback;
|
|
170
|
+
useEffect(() => onRemoteNavigate((event) => callbackRef.current(event)), []);
|
|
171
|
+
}
|
|
172
|
+
|
|
162
173
|
// src/host/react/index.tsx
|
|
163
174
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
164
175
|
import { createElement } from "react";
|
|
@@ -206,13 +217,13 @@ function ConsumeRemoteComponent({
|
|
|
206
217
|
mode,
|
|
207
218
|
keySuffix
|
|
208
219
|
});
|
|
209
|
-
const htmlRef =
|
|
220
|
+
const htmlRef = useRef3(
|
|
210
221
|
typeof document !== "undefined" ? document.querySelector(
|
|
211
222
|
`[data-remote-component-id="shadowroot_${keySuffix}"]`
|
|
212
223
|
)?.shadowRoot?.innerHTML ?? document.getElementById(`__REMOTE_COMPONENT${name}`)?.innerHTML ?? document.querySelector(`div[data-bundle][data-route][id^="${name}"]`)?.innerHTML ?? document.querySelector("div[data-bundle][data-route]")?.innerHTML : null
|
|
213
224
|
);
|
|
214
|
-
const endTemplateRef =
|
|
215
|
-
const childrenRef =
|
|
225
|
+
const endTemplateRef = useRef3(null);
|
|
226
|
+
const childrenRef = useRef3(
|
|
216
227
|
typeof document !== "undefined" ? (() => {
|
|
217
228
|
let el = document.querySelector(`template[id="${name}_start"]`);
|
|
218
229
|
const elements = [];
|
|
@@ -225,10 +236,10 @@ function ConsumeRemoteComponent({
|
|
|
225
236
|
return elements;
|
|
226
237
|
})() : []
|
|
227
238
|
);
|
|
228
|
-
const hostStateRef =
|
|
229
|
-
const componentHydrationHtml =
|
|
230
|
-
const prevRemoteComponentContainerRef =
|
|
231
|
-
const unmountRef =
|
|
239
|
+
const hostStateRef = useRef3(createHostState());
|
|
240
|
+
const componentHydrationHtml = useRef3(null);
|
|
241
|
+
const prevRemoteComponentContainerRef = useRef3(null);
|
|
242
|
+
const unmountRef = useRef3(null);
|
|
232
243
|
useLayoutEffect2(() => {
|
|
233
244
|
return () => {
|
|
234
245
|
delete getNamespace().shadowRoots[keySuffix];
|
|
@@ -265,7 +276,7 @@ function ConsumeRemoteComponent({
|
|
|
265
276
|
}
|
|
266
277
|
}
|
|
267
278
|
}, [shadowRoot, remoteComponent, name]);
|
|
268
|
-
|
|
279
|
+
useEffect2(() => {
|
|
269
280
|
if (src && src !== hostStateRef.current.prevSrc) {
|
|
270
281
|
const previousSrc = hostStateRef.current.prevSrc;
|
|
271
282
|
const previousName = hostStateRef.current.prevName;
|
|
@@ -665,6 +676,7 @@ function ConsumeRemoteComponent({
|
|
|
665
676
|
}
|
|
666
677
|
|
|
667
678
|
export {
|
|
679
|
+
useRemoteNavigate,
|
|
668
680
|
ConsumeRemoteComponent
|
|
669
681
|
};
|
|
670
|
-
//# sourceMappingURL=chunk-
|
|
682
|
+
//# sourceMappingURL=chunk-LOYJP2V2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/host/react/index.tsx","../src/runtime/html/set-attributes-from-props.ts","../src/host/react/hooks/use-resolve-client-url.ts","../src/host/react/hooks/use-shadow-root.ts","../src/host/react/utils/extract-remote-html.ts","../src/host/react/hooks/use-remote-navigate.ts"],"sourcesContent":["import {\n startTransition,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useRemoteComponentsContext } from '#internal/host/react/context';\nimport { fetchWithHooks } from '#internal/host/server/fetch-with-hooks';\nimport { getClientOrServerUrl } from '#internal/host/server/get-client-or-server-url';\nimport type { ConsumeRemoteComponentConfig } from '#internal/host/shared/config';\nimport { makeReactEmitter } from '#internal/host/shared/lifecycle';\nimport { loadPrepared, preparePipeline } from '#internal/host/shared/pipeline';\nimport type { ConsumeServerData } from '#internal/host/shared/server-handoff';\nimport { createHostState } from '#internal/host/shared/state';\nimport { resolveNameFromSrc } from '#internal/host/utils/resolve-name-from-src';\nimport {\n DEFAULT_COMPONENT_NAME,\n DEFAULT_ROUTE,\n RUNTIME_SCRIPT,\n RUNTIME_WEBPACK,\n} from '#internal/runtime/constants';\nimport { setAttributesFromProps } from '#internal/runtime/html/set-attributes-from-props';\nimport { loadStaticRemoteComponent } from '#internal/runtime/loaders/static-loader';\nimport { getNamespace } from '#internal/runtime/namespace';\nimport { attrToProp, escapeString } from '#internal/utils';\nimport { isAbortError } from '#internal/utils/abort';\nimport {\n errorFromFailedFetch,\n RemoteComponentsError,\n} from '#internal/utils/error';\nimport type { MountOrUnmountFunction } from '#remote-components/runtime/types';\nimport { useResolveClientUrl } from './hooks/use-resolve-client-url';\nimport { useShadowRoot } from './hooks/use-shadow-root';\nimport {\n DUMMY_FALLBACK,\n getRemoteComponentHtml,\n} from './utils/extract-remote-html';\n\n/**\n * Props for the React remote component host.\n *\n * Extends {@link ConsumeRemoteComponentConfig} with `children` for loading\n * fallback content.\n *\n * To react to navigations originating from embedded remote components, set up\n * a single top-level subscription with `onRemoteNavigate` from\n * `remote-components/host/navigation` and route the event to your host's\n * router.\n */\nexport interface ConsumeRemoteComponentProps\n extends ConsumeRemoteComponentConfig {\n /** Loading fallback content displayed while the remote component is being fetched. */\n children?: React.ReactNode;\n}\n\n/**\n * ConsumeRemoteComponent is a React component that fetches and renders a remote component.\n * It supports SSR and can isolate the remote component in a shadow DOM.\n *\n * @param props - The properties for the remote component.\n * @returns A React component that renders the remote component.\n *\n * @example\n *\n * Use the `<ConsumeRemoteComponent>` in your React application to consume a remote component from a remote application:\n *\n * ```tsx\n * import { ConsumeRemoteComponent } from 'remote-components/host/react';\n *\n * export default function App() {\n * return (\n * <>\n * <h1>Welcome to My App</h1>\n * <p>This page consumes a remote component from another application.</p>\n * <ConsumeRemoteComponent src=\"/nextjs-app-remote/components/header\" />\n * </>\n * );\n * }\n * ```\n *\n * To share modules, you can provide a shared module map with references to the shared modules:\n *\n * ```tsx\n * <ConsumeRemoteComponent\n * src=\"/nextjs-app-remote/components/header\"\n * shared={{\n * '@/components/provider': () => import('@/components/host-provider')\n * }}\n * />\n * ```\n */\nexport function ConsumeRemoteComponent({\n src,\n isolate,\n mode = 'open',\n reset,\n credentials: credentialsProp,\n name: nameProp = DEFAULT_COMPONENT_NAME,\n shared: sharedProp,\n children,\n onBeforeLoad,\n onLoad,\n onError,\n onChange,\n onRequest,\n onResponse,\n resolveClientUrl: resolveClientUrlProp,\n}: ConsumeRemoteComponentProps) {\n const instanceId = useId();\n\n const { credentials: contextCredentials, shared: contextShared } =\n useRemoteComponentsContext();\n const credentials = credentialsProp ?? contextCredentials ?? 'same-origin';\n const shared = sharedProp ?? contextShared ?? {};\n const emitter = useMemo(\n () => makeReactEmitter({ onBeforeLoad, onLoad, onError, onChange }),\n [onBeforeLoad, onLoad, onError, onChange],\n );\n\n const name = useMemo(\n () => resolveNameFromSrc(src, nameProp),\n [src, nameProp],\n );\n\n const [data, setData] = useState<Omit<ConsumeServerData, 'children'> | null>(\n null,\n );\n\n const url = useMemo(() => getClientOrServerUrl(src, DUMMY_FALLBACK), [src]);\n\n const resolveClientUrl = useResolveClientUrl(resolveClientUrlProp, url.href);\n\n // for relative src paths, use just the pathname as the unique id.\n // for static urls, use the full url as the unique id as the path may not be unique.\n // this id needs to be the same for server and client side rendering.\n // note that if this needs to be more unique, can pass through the bundle as an id prop and ammend it to this id.\n const id =\n url.origin ===\n (typeof location !== 'undefined' ? location.origin : DUMMY_FALLBACK)\n ? url.pathname\n : url.href;\n\n //instanceId prevents multiple components with the same src from sharing a shadow root\n const keySuffix = `${escapeString(id)}_${escapeString(\n data?.name ?? name,\n )}_${escapeString(instanceId)}`;\n\n const [remoteComponent, setRemoteComponent] = useState<\n React.ReactNode | Error\n >(null);\n\n const { shadowRoot, shadowRootContainerRef } = useShadowRoot({\n isolate,\n mode,\n keySuffix,\n });\n\n const htmlRef = useRef<string | null>(\n typeof document !== 'undefined'\n ? (document.querySelector(\n `[data-remote-component-id=\"shadowroot_${keySuffix}\"]`,\n )?.shadowRoot?.innerHTML ??\n document.getElementById(`__REMOTE_COMPONENT${name}`)?.innerHTML ??\n document.querySelector(`div[data-bundle][data-route][id^=\"${name}\"]`)\n ?.innerHTML ??\n document.querySelector('div[data-bundle][data-route]')?.innerHTML)\n : null,\n );\n const endTemplateRef = useRef<HTMLTemplateElement | null>(null);\n // collect initial content that needs to be removed after remote component renders\n const childrenRef = useRef(\n typeof document !== 'undefined'\n ? (() => {\n let el = document.querySelector(`template[id=\"${name}_start\"]`);\n const elements = [];\n while (el && el.id !== `${name}_end`) {\n if (\n el.id !== `${name}_start` &&\n !el.getAttribute('data-remote-component')\n ) {\n elements.push(el);\n }\n el = el.nextElementSibling as HTMLTemplateElement | null;\n }\n return elements;\n })()\n : [],\n );\n const hostStateRef = useRef(createHostState());\n const componentHydrationHtml = useRef<string | null>(null);\n const prevRemoteComponentContainerRef = useRef<HTMLDivElement | null>(null);\n const unmountRef = useRef<Set<MountOrUnmountFunction> | null>(null);\n\n // Clean up the shadow root cache on unmount to prevent memory leaks\n useLayoutEffect(() => {\n return () => {\n delete getNamespace().shadowRoots[keySuffix];\n };\n }, [keySuffix]);\n\n useLayoutEffect(() => {\n // Clear initial content after remote component renders\n if (childrenRef.current.length > 0 && remoteComponent) {\n childrenRef.current.forEach((el) => {\n el.remove();\n });\n childrenRef.current = [];\n }\n }, [remoteComponent]);\n\n useLayoutEffect(() => {\n if (shadowRoot && remoteComponent) {\n const resetStyles = shadowRoot.querySelectorAll(\n 'style[data-remote-components-reset]',\n );\n // ensure we only have one reset style in the shadow root\n if (resetStyles.length > 1) {\n resetStyles.forEach((style, index) => {\n if (\n index > 0 &&\n style.getAttribute('data-remote-components-reset') !== 'react'\n ) {\n style.remove();\n }\n });\n }\n\n // clear the html ref after hydration\n htmlRef.current = null;\n\n // clear all nodes except links and styles until the start marker\n // the marker gets only rendered on hydration\n let el: ChildNode | null = shadowRoot.childNodes[0] ?? null;\n while (el && (!('id' in el) || el.id !== `${name}_start`)) {\n const nextEl = el.nextSibling;\n if (el.nodeName !== 'LINK' && el.nodeName !== 'STYLE') {\n el.parentNode?.removeChild(el);\n }\n el = nextEl;\n }\n }\n }, [shadowRoot, remoteComponent, name]);\n\n useEffect(() => {\n if (src && src !== hostStateRef.current.prevSrc) {\n const previousSrc = hostStateRef.current.prevSrc;\n const previousName = hostStateRef.current.prevName;\n hostStateRef.current.prevSrc = src;\n\n if (previousSrc !== null) {\n htmlRef.current = null;\n }\n\n // Abort any in-progress load so the latest src always wins.\n hostStateRef.current.abortController?.abort();\n hostStateRef.current.abortController = new AbortController();\n const { signal } = hostStateRef.current.abortController;\n\n emitter.beforeLoad(src);\n hostStateRef.current.stage = 'loading';\n\n startTransition(async () => {\n try {\n let html = getRemoteComponentHtml(\n htmlRef.current ??\n (endTemplateRef.current?.previousElementSibling?.tagName === 'div'\n ? endTemplateRef.current.previousElementSibling.innerHTML\n : ''),\n );\n\n if (!html && src) {\n // fetch the remote component\n const fetchInit = {\n credentials,\n } as RequestInit;\n\n const resolvedUrl = new URL(\n resolveClientUrl?.(url.href) ?? url.href,\n location.href,\n );\n const res = await fetchWithHooks(resolvedUrl, fetchInit, {\n onRequest,\n onResponse,\n abortController: hostStateRef.current.abortController,\n });\n\n if (!res || !res.ok) {\n throw await errorFromFailedFetch(url.href, resolvedUrl, res);\n }\n\n // get the full HTML content as a string\n const remoteHtml = await res.text();\n if (signal.aborted) return;\n htmlRef.current = remoteHtml;\n html = getRemoteComponentHtml(remoteHtml);\n }\n\n if (signal.aborted) return;\n\n const userShared = await shared;\n if (signal.aborted) return;\n\n const prepared = preparePipeline({\n html,\n name,\n url,\n shared: userShared,\n resolveClientUrl,\n });\n const { doc, parsed } = prepared;\n const {\n component,\n name: remoteName,\n isRemoteComponent,\n metadata,\n rsc,\n remoteShared,\n links: linkElements,\n } = parsed;\n\n if (hostStateRef.current.prevIsRemoteComponent) {\n if (shadowRoot) {\n shadowRoot.innerHTML = '';\n }\n const prevUrl = hostStateRef.current.prevUrl;\n if (prevUrl && getNamespace().unmountFns[prevUrl.href]) {\n const unmountPromises = Promise.all(\n Array.from(unmountRef.current ?? []).map(async (unmount) =>\n unmount(\n shadowRoot ?? prevRemoteComponentContainerRef.current,\n ),\n ),\n );\n unmountRef.current = null;\n await unmountPromises;\n }\n }\n hostStateRef.current.prevIsRemoteComponent = isRemoteComponent;\n hostStateRef.current.prevUrl = url;\n hostStateRef.current.prevName = remoteName;\n\n const links = linkElements.map((link) => ({\n href: new URL(link.getAttribute('href') ?? link.href, url).href,\n ...link\n .getAttributeNames()\n .reduce<Record<string, string>>((acc, key) => {\n if (key !== 'href') {\n acc[attrToProp[key] ?? key] = link.getAttribute(key) ?? '';\n }\n return acc;\n }, {}),\n }));\n\n // handle inline scripts in the remote component\n const inlineScripts = (\n isRemoteComponent ? component : doc\n ).querySelectorAll(\n \"script:not([src]):not([data-src]):not([id*='_rsc']):not([id='__NEXT_DATA__']):not([id='__REMOTE_NEXT_DATA__'])\",\n );\n\n if (!isRemoteComponent) {\n // Next.js Script support\n const self = globalThis as typeof globalThis & {\n __next_s: [string, Record<string, string>][];\n };\n const prevNextScripts = self.__next_s;\n const nextScripts = [] as [string, Record<string, string>][];\n // eslint-disable-next-line camelcase\n self.__next_s = nextScripts;\n\n // TODO: needs to be cancellable with a singular listener for the abort signal https://linear.app/vercel/issue/MFES-1253/handle-abortcontroller-clean-up-scenarios\n await Promise.all(\n Array.from(inlineScripts)\n .filter(\n (script) =>\n !(\n script.id.endsWith('_shared') &&\n script.getAttribute('type') === 'application/json' &&\n typeof script.getAttribute(\n 'data-remote-components-shared',\n ) === 'string'\n ),\n )\n .map((script) => {\n return new Promise((resolve) => {\n // only handle inline scripts with content, but not Next.js RSC scripts\n if (\n script.textContent &&\n !script.textContent.includes('self.__next_f=') &&\n !script.textContent.includes('self.__next_f.push')\n ) {\n // if script is inline javascript, then execute using blob\n if (\n !script.getAttribute('type') ||\n script.getAttribute('type') === 'text/javascript' ||\n script.getAttribute('type') === 'application/javascript'\n ) {\n const newScript = document.createElement('script');\n\n // scripts loaded from external sources needs this workaround\n const blob = new Blob([script.textContent], {\n type: 'application/javascript',\n });\n const blobUrl = URL.createObjectURL(blob);\n\n newScript.onload = () => {\n resolve(undefined);\n // script executed and safe to remove\n URL.revokeObjectURL(blobUrl);\n newScript.remove();\n };\n // on error we still want to resolve to not block the remote component loading\n newScript.onerror = () => {\n URL.revokeObjectURL(blobUrl);\n newScript.remove();\n resolve(undefined);\n };\n\n newScript.src = blobUrl;\n // TODO: needs to be cancellable https://linear.app/vercel/issue/MFES-1253/handle-abortcontroller-clean-up-scenarios\n document.body.appendChild(newScript);\n } else {\n resolve(undefined);\n document.body.appendChild(script);\n }\n } else {\n resolve(undefined);\n }\n });\n }),\n );\n // process the remote component Next.js Script container\n nextScripts.forEach(([scriptSrc, props]) => {\n const script = document.createElement('script');\n // when we have a script src, apply it (inline scripts have `0` as src)\n if (scriptSrc) {\n script.src = scriptSrc;\n }\n // apply Script props\n if (typeof props.children === 'string') {\n script.textContent = props.children;\n }\n setAttributesFromProps(script, props);\n document.head.appendChild(script);\n });\n // restore previous Next.js Script container\n // eslint-disable-next-line camelcase\n self.__next_s = prevNextScripts;\n }\n\n const rscName = rsc\n ? `__remote_component_rsc_${escapeString(id)}_${escapeString(\n remoteName,\n )}`\n : undefined;\n if (rsc) {\n rsc.textContent =\n rsc.textContent?.replace(\n new RegExp(`self\\\\[\"${remoteName}\"\\\\]`, 'g'),\n `self[\"${rscName}\"]`,\n ) ?? '';\n document.body.appendChild(rsc);\n }\n\n const newData = {\n ...metadata,\n links,\n remoteShared,\n src: typeof src === 'string' ? src : src.href,\n serverUrl: url.href,\n data: rsc\n ? (rsc.textContent || '').split('\\n').filter(Boolean)\n : [],\n };\n\n componentHydrationHtml.current = `${Array.from(\n doc.querySelectorAll('link,style'),\n )\n .map((link) => link.outerHTML)\n .join('')}${\n reset\n ? `<style data-remote-components-reset=\"\">:host { all: initial; }</style>`\n : ''\n }${component.innerHTML}`;\n\n if (isRemoteComponent) {\n // Only call onChange when not on first load (matching HTML implementation)\n if (previousSrc !== undefined) {\n emitter.change({\n previousSrc: previousSrc ?? null,\n nextSrc: src,\n previousName,\n nextName: remoteName,\n });\n }\n setData(newData);\n if (shadowRoot) {\n const shadowRootHtml = reset\n ? `<style data-remote-components-reset=\"\">:host { all: initial; }</style>${component.innerHTML}`\n : component.innerHTML;\n shadowRoot.innerHTML = shadowRootHtml;\n htmlRef.current = null;\n setRemoteComponent(null);\n const { mount, unmount } = await loadStaticRemoteComponent(\n Array.from(shadowRoot.querySelectorAll('script')),\n url,\n resolveClientUrl,\n );\n unmountRef.current = unmount;\n await Promise.all(\n Array.from(mount).map((mountFn) => mountFn(shadowRoot)),\n );\n emitter.load(src);\n } else if (isolate === false) {\n setRemoteComponent(\n // TODO: remove wrapper div by converting HTML to RSC or React tree\n <div\n dangerouslySetInnerHTML={{ __html: component.innerHTML }}\n ref={prevRemoteComponentContainerRef}\n />,\n );\n htmlRef.current = null;\n const { mount, unmount } = await loadStaticRemoteComponent(\n Array.from(component.querySelectorAll('script')),\n url,\n resolveClientUrl,\n );\n unmountRef.current = unmount;\n await Promise.all(\n Array.from(mount).map((mountFn) =>\n mountFn(prevRemoteComponentContainerRef.current),\n ),\n );\n emitter.load(src);\n }\n hostStateRef.current.stage = 'loaded';\n } else {\n const result = await loadPrepared({\n prepared,\n url,\n signal,\n shared: userShared,\n resolveClientUrl,\n container: shadowRoot,\n rscName,\n });\n if (rsc) {\n rsc.remove();\n }\n\n setData(newData);\n // Only call onChange when not on first load (matching HTML implementation)\n if (previousSrc !== undefined) {\n emitter.change({\n previousSrc: previousSrc ?? null,\n nextSrc: src,\n previousName,\n nextName: remoteName,\n });\n }\n if (result.status === 'aborted') {\n return;\n }\n if (result.status === 'error') {\n hostStateRef.current.stage = 'error';\n setRemoteComponent(result.error);\n emitter.error(result.error);\n } else if (result.status === 'loaded') {\n hostStateRef.current.stage = 'loaded';\n setRemoteComponent(result.component);\n emitter.load(src);\n }\n }\n } catch (error) {\n // AbortError is expected when loading is cancelled - exit cleanly\n if (isAbortError(error)) {\n hostStateRef.current.stage = 'idle';\n return;\n }\n hostStateRef.current.stage = 'error';\n setRemoteComponent(error as Error);\n emitter.error(error);\n }\n });\n }\n }, [\n url,\n src,\n isolate,\n credentials,\n name,\n shared,\n shadowRoot,\n reset,\n id,\n emitter.beforeLoad,\n emitter.load,\n emitter.error,\n emitter.change,\n onRequest,\n onResponse,\n resolveClientUrl,\n ]);\n\n if (remoteComponent instanceof Error) {\n throw remoteComponent;\n }\n\n const metadataJson = (\n <script data-remote-component type=\"application/json\">\n {JSON.stringify({\n name: data?.name || name,\n bundle: data?.bundle || 'default',\n route: data?.route || DEFAULT_ROUTE,\n runtime: hostStateRef.current.prevIsRemoteComponent\n ? RUNTIME_SCRIPT\n : data?.runtime || RUNTIME_WEBPACK,\n })}\n </script>\n );\n const resetStyle = reset ? (\n <style data-remote-components-reset=\"react\">{`:host { all: initial; }`}</style>\n ) : null;\n const linksToRender: React.ReactNode[] | null =\n data?.links?.map((link) => (\n <link\n {...link}\n href={new URL(link.href as string, url).href}\n key={JSON.stringify(link)}\n />\n )) || null;\n const componentToRender = (\n <>\n {resetStyle}\n {linksToRender}\n {remoteComponent ?? children}\n </>\n );\n\n if (componentHydrationHtml.current && shadowRoot && !shadowRoot.innerHTML) {\n shadowRoot.innerHTML = componentHydrationHtml.current;\n componentHydrationHtml.current = null;\n\n if (hostStateRef.current.prevIsRemoteComponent) {\n // ensure we load static resources when hydrating a remote component in shadow DOM\n loadStaticRemoteComponent(\n Array.from(shadowRoot.querySelectorAll('script')),\n url,\n resolveClientUrl,\n )\n .then(({ mount }) => {\n return Promise.all(\n Array.from(mount).map((mountFn) => mountFn(shadowRoot)),\n );\n })\n .then(() => {\n if (src) {\n emitter.load(src);\n }\n })\n .catch((e) => {\n const error = new RemoteComponentsError(\n `Error mounting remote component from \"${url.href}\"`,\n {\n cause: e,\n },\n );\n setRemoteComponent(error);\n emitter.error(error);\n });\n }\n }\n\n if (isolate !== false) {\n const shadowRemoteComponentHtml =\n shadowRoot?.querySelector(`#__REMOTE_COMPONENT${name}`) ??\n shadowRoot?.querySelector('div[data-bundle][data-route]');\n if (shadowRemoteComponentHtml) {\n shadowRemoteComponentHtml.remove();\n }\n\n return (\n <>\n {metadataJson}\n <div\n data-remote-component-id={`shadowroot_${keySuffix}`}\n id={`shadowroot_${data?.name ?? name}`}\n ref={shadowRootContainerRef}\n >\n {typeof document === 'undefined' ? (\n // eslint-disable-next-line react/no-unknown-property\n <template shadowrootmode={mode}>\n {typeof document === 'undefined' ? (\n <div\n dangerouslySetInnerHTML={{\n __html: `<img\n alt=\"\" decoding=\"async\" style=\"display:none\"\n src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==\"\n onload=\"(function(el){\n // Capture the shadow root during SSR hydration so the client-side\n // useShadowRoot hook can find it.\n const root = el.getRootNode();\n globalThis.__remote_components_shadowroot_${keySuffix}=root;\n el.parentElement.remove();\n })(this)\"\n />`,\n }}\n />\n ) : null}\n {resetStyle}\n {linksToRender}\n {children}\n </template>\n ) : null}\n {shadowRoot && remoteComponent\n ? createPortal(\n <>\n <template id={`${name}_start`} />\n {resetStyle}\n {linksToRender}\n {remoteComponent}\n <template id={`${name}_end`} ref={endTemplateRef} />\n </>,\n shadowRoot,\n )\n : null}\n </div>\n </>\n );\n }\n htmlRef.current = null;\n\n // render start/end markers for the remote component\n return (\n <>\n <template id={`${name}_start`} />\n {metadataJson}\n {componentToRender}\n <template id={`${name}_end`} ref={endTemplateRef} />\n </>\n );\n}\n\nexport type {\n HookOptions,\n OnRequestHook,\n OnResponseHook,\n} from '#internal/host/shared/fetch-interceptors';\nexport type { RemoteNavigateEvent } from '#internal/host/shared/navigate-event';\nexport { useRemoteNavigate } from './hooks/use-remote-navigate';\n","// extracted from Next.js source at https://github.com/vercel/next.js/blob/canary/packages/next/src/client/set-attributes-from-props.ts\n\nconst DOMAttributeNames: Record<string, string> = {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv',\n noModule: 'noModule',\n};\n\nconst ignoreProps = [\n 'onLoad',\n 'onReady',\n 'dangerouslySetInnerHTML',\n 'children',\n 'onError',\n 'strategy',\n 'stylesheets',\n];\n\nfunction isBooleanScriptAttribute(\n attr: string,\n): attr is 'async' | 'defer' | 'noModule' {\n return ['async', 'defer', 'noModule'].includes(attr);\n}\n\nexport function setAttributesFromProps(el: HTMLElement, props: object) {\n for (const [p, value] of Object.entries(props)) {\n if (!Object.hasOwn(props, p)) continue;\n if (ignoreProps.includes(p)) continue;\n\n // we don't render undefined props to the DOM\n if (value === undefined) {\n continue;\n }\n\n const attr = DOMAttributeNames[p] || p.toLowerCase();\n\n if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) {\n // Correctly assign boolean script attributes\n // https://github.com/vercel/next.js/pull/20748\n (el as HTMLScriptElement)[attr] = Boolean(value);\n } else {\n el.setAttribute(attr, String(value));\n }\n\n // Remove falsy non-zero boolean attributes so they are correctly interpreted\n // (e.g. if we set them to false, this coerces to the string \"false\", which the browser interprets as true)\n if (\n value === false ||\n (el.tagName === 'SCRIPT' &&\n isBooleanScriptAttribute(attr) &&\n (!value || value === 'false'))\n ) {\n // Call setAttribute before, as we need to set and unset the attribute to override force async:\n // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async\n el.setAttribute(attr, '');\n el.removeAttribute(attr);\n }\n }\n}\n","import { useMemo } from 'react';\nimport { useRemoteComponentsContext } from '#internal/host/react/context';\nimport { bindResolveClientUrl } from '#internal/runtime/url/default-resolve-client-url';\nimport type { ResolveClientUrl } from '#internal/runtime/url/resolve-client-url';\n\nexport function useResolveClientUrl(\n prop: ResolveClientUrl | undefined,\n urlHref: string,\n) {\n const { resolveClientUrl: contextValue } = useRemoteComponentsContext();\n const raw = prop ?? contextValue;\n return useMemo(() => bindResolveClientUrl(raw, urlHref), [raw, urlHref]);\n}\n","import { useLayoutEffect, useRef, useState } from 'react';\nimport { getNamespace } from '#internal/runtime/namespace';\n\ninterface UseShadowRootOptions {\n /** Whether CSS isolation is enabled */\n isolate: boolean | undefined;\n /** Shadow DOM mode */\n mode: 'open' | 'closed';\n /** Unique key suffix for identifying this shadow root */\n keySuffix: string;\n}\n\ninterface UseShadowRootResult {\n /** The shadow root element, or null if not isolated */\n shadowRoot: ShadowRoot | null;\n /** Ref to attach to the shadow host container element */\n shadowRootContainerRef: React.RefObject<HTMLDivElement | null>;\n}\n\n/**\n * Manages shadow root lifecycle for CSS isolation.\n *\n * Handles:\n * - Initial shadow root discovery from SSR or declarative shadow DOM\n * - Creating shadow root as fallback for browsers without declarative shadow DOM support\n * - Cleanup when isolation is disabled\n * - Re-attachment when isolation is re-enabled\n */\nexport function useShadowRoot({\n isolate,\n mode,\n keySuffix,\n}: UseShadowRootOptions): UseShadowRootResult {\n const shadowRootContainerRef = useRef<HTMLDivElement | null>(null);\n\n const [shadowRoot, setShadowRoot] = useState<ShadowRoot | null>(() => {\n const shadowRoots = getNamespace().shadowRoots;\n const ssrShadowRoot =\n typeof document !== 'undefined'\n ? (document.querySelector(\n `[data-remote-component-id=\"shadowroot_${keySuffix}\"]`,\n )?.shadowRoot ??\n shadowRoots[keySuffix] ??\n null)\n : null;\n // Clear the reference after reading it\n shadowRoots[keySuffix] = null;\n return ssrShadowRoot;\n });\n\n useLayoutEffect(() => {\n const shadowRoots = getNamespace().shadowRoots;\n if (\n isolate !== false &&\n typeof document !== 'undefined' &&\n (!shadowRoot || !shadowRoot.isConnected)\n ) {\n let shadowRootElement: ShadowRoot | null = null;\n const element = document.querySelector(\n `[data-remote-component-id=\"shadowroot_${keySuffix}\"]`,\n );\n shadowRootElement = shadowRoots[keySuffix] ?? element?.shadowRoot ?? null;\n\n if (!shadowRootElement && element) {\n // Create a shadow root if it doesn't exist.\n // This is a fallback for browsers that don't support declarative shadow DOM.\n try {\n shadowRootElement = element.attachShadow({ mode });\n shadowRoots[keySuffix] = shadowRootElement;\n } catch {\n // Do nothing if attachShadow fails because of existing shadow root\n }\n }\n\n if (shadowRootElement) {\n // Remove all nodes from the shadow root except links (preserves stylesheets)\n shadowRootElement.querySelectorAll('*:not(link)').forEach((node) => {\n node.remove();\n });\n setShadowRoot(shadowRootElement);\n }\n } else if (isolate === false && shadowRoot) {\n shadowRoots[keySuffix] = null;\n setShadowRoot(null);\n }\n }, [isolate, shadowRoot, mode, keySuffix]);\n\n return { shadowRoot, shadowRootContainerRef };\n}\n","import { DEFAULT_COMPONENT_NAME } from '#internal/runtime/constants';\n\n/**\n * Dummy URL used as a fallback base for URL parsing when no real base URL is available.\n * This is used during SSR or when location is not defined.\n */\nexport const DUMMY_FALLBACK = 'http://remote-components-dummy-fallback';\n\n/**\n * Extracts the relevant HTML content from a remote component response.\n *\n * Handles multiple remote component formats:\n * - Next.js Pages Router SSR wrapper (`div[id^=\"__REMOTE_COMPONENT\"]`)\n * - App Router remote components (`div[data-bundle][data-route]`)\n * - Next.js pages (`div#__next`)\n * - Web component format (`remote-component:not([src])`)\n *\n * @param html - Raw HTML string from the remote component response\n * @returns Extracted HTML content with links and scripts, or empty string if not found\n */\nexport function getRemoteComponentHtml(html: string): string {\n if (typeof document === 'undefined') return html;\n\n const parser = new DOMParser();\n const temp = parser.parseFromString(html, 'text/html');\n\n // Used by the Next.js Pages Router remote as a wrapper\n const ssrRemoteComponentContainer = temp.querySelector(\n 'div[id^=\"__REMOTE_COMPONENT\"]',\n );\n if (ssrRemoteComponentContainer) {\n return ssrRemoteComponentContainer.innerHTML;\n }\n\n // Remote component content from various sources\n const remoteComponentContainer = temp.querySelectorAll(\n `div[data-bundle][data-route][data-runtime][id^=\"${DEFAULT_COMPONENT_NAME}\"],div[data-bundle][data-route],div#__next,remote-component:not([src])`,\n );\n if (remoteComponentContainer.length > 0) {\n return `${Array.from(temp.querySelectorAll('link,script'))\n .map((link) => link.outerHTML)\n .join('')}${Array.from(remoteComponentContainer)\n .map((container) => container.outerHTML)\n .join('')}`;\n }\n\n return '';\n}\n","import { useEffect, useRef } from 'react';\nimport { onRemoteNavigate } from '#internal/host/navigation';\nimport type { RemoteNavigateEvent } from '#internal/host/shared/navigate-event';\n\n/**\n * Subscribe to remote component navigations. The callback is captured in a ref\n * so the listener is registered once — no `useCallback` or dep array needed.\n *\n * @example React Router\n * ```tsx\n * const navigate = useNavigate();\n * // Always replace — the polyfill already pushed/replaced the browser history entry.\n * useRemoteNavigate((e) => navigate(e.pathname + e.search, { replace: true }));\n * ```\n */\nexport function useRemoteNavigate(\n callback: (event: RemoteNavigateEvent) => void,\n): void {\n const callbackRef = useRef(callback);\n // Written during render (not in an effect) — the standard useCallbackRef\n // pattern. Safe under concurrent rendering: navigation events are user-driven\n // and can't fire mid-render.\n callbackRef.current = callback;\n useEffect(() => onRemoteNavigate((event) => callbackRef.current(event)), []);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA,aAAAA;AAAA,EACA;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,OACK;AACP,SAAS,oBAAoB;AAC7B,SAAS,8BAAAC,mCAAkC;;;ACR3C,IAAM,oBAA4C;AAAA,EAChD,eAAe;AAAA,EACf,WAAW;AAAA,EACX,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AACZ;AAEA,IAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,SAAS,yBACP,MACwC;AACxC,SAAO,CAAC,SAAS,SAAS,UAAU,EAAE,SAAS,IAAI;AACrD;AAEO,SAAS,uBAAuB,IAAiB,OAAe;AACrE,aAAW,CAAC,GAAG,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC9C,QAAI,CAAC,OAAO,OAAO,OAAO,CAAC;AAAG;AAC9B,QAAI,YAAY,SAAS,CAAC;AAAG;AAG7B,QAAI,UAAU,QAAW;AACvB;AAAA,IACF;AAEA,UAAM,OAAO,kBAAkB,CAAC,KAAK,EAAE,YAAY;AAEnD,QAAI,GAAG,YAAY,YAAY,yBAAyB,IAAI,GAAG;AAG7D,MAAC,GAAyB,IAAI,IAAI,QAAQ,KAAK;AAAA,IACjD,OAAO;AACL,SAAG,aAAa,M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,cAAc,MAAM,QAAQ;AAAA,UAChC,KAAK;AAAA,UAEJ;AAAA,mBAAO,aAAa;AAAA;AAAA,cAEnB,qBAAC,cAAS,gBAAgB,MACvB;AAAA,uBAAO,aAAa,cACnB;AAAA,kBAAC;AAAA;AAAA,oBACC,yBAAyB;AAAA,sBACvB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oDAOwB;AAAA;AAAA;AAAA;AAAA,oBAIlC;AAAA;AAAA,gBACF,IACE;AAAA,gBACH;AAAA,gBACA;AAAA,gBACA;AAAA,iBACH;AAAA,gBACE;AAAA,YACH,cAAc,kBACX;AAAA,cACE,iCACE;AAAA,oCAAC,cAAS,IAAI,GAAG,cAAc;AAAA,gBAC9B;AAAA,gBACA;AAAA,gBACA;AAAA,gBACD,oBAAC,cAAS,IAAI,GAAG,YAAY,KAAK,gBAAgB;AAAA,iBACpD;AAAA,cACA;AAAA,YACF,IACA;AAAA;AAAA;AAAA,MACN;AAAA,OACF;AAAA,EAEJ;AACA,UAAQ,UAAU;AAGlB,SACE,iCACE;AAAA,wBAAC,cAAS,IAAI,GAAG,cAAc;AAAA,IAC9B;AAAA,IACA;AAAA,IACD,oBAAC,cAAS,IAAI,GAAG,YAAY,KAAK,gBAAgB;AAAA,KACpD;AAEJ;","names":["useEffect","useLayoutEffect","useMemo","useRef","useState","useRemoteComponentsContext","useRef","useRef","useRemoteComponentsContext","useMemo","useState","useRef","useLayoutEffect","useEffect"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getScope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SAGYPGIQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getNamespace
|
|
6
6
|
} from "./chunk-D5GNZB6O.js";
|
|
@@ -199,4 +199,4 @@ export {
|
|
|
199
199
|
applySharedModules,
|
|
200
200
|
nextClientPagesLoader
|
|
201
201
|
};
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-MKO52FRO.js.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkRLI4YTBJcjs = require('./chunk-RLI4YTBJ.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkZ2SLBFQLcjs = require('./chunk-Z2SLBFQL.cjs');
|
|
@@ -56,12 +56,12 @@ function loadChunkWithScope(scope, chunkId) {
|
|
|
56
56
|
);
|
|
57
57
|
const self = globalThis;
|
|
58
58
|
const ns = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, );
|
|
59
|
-
const { bundle, path, prefix } =
|
|
59
|
+
const { bundle, path, prefix } = _chunkRLI4YTBJcjs.parseRemoteId.call(void 0, chunkId);
|
|
60
60
|
const remoteRuntime = _optionalChain([self, 'access', _5 => _5.__remote_webpack_require__, 'optionalAccess', _6 => _6[_nullishCoalesce(bundle, () => ( "default"))]]) ? _optionalChain([self, 'access', _7 => _7.__remote_webpack_require__, 'access', _8 => _8[_nullishCoalesce(bundle, () => ( "default"))], 'optionalAccess', _9 => _9.type]) || "webpack" : scope.runtime;
|
|
61
|
-
if (remoteRuntime ===
|
|
61
|
+
if (remoteRuntime === _chunkRLI4YTBJcjs.RUNTIME_WEBPACK) {
|
|
62
62
|
return Promise.resolve(void 0);
|
|
63
63
|
}
|
|
64
|
-
const rawPath = path ?
|
|
64
|
+
const rawPath = path ? _chunkRLI4YTBJcjs.collapseDoubleSlashes.call(void 0, `${prefix}${path}`) : "/";
|
|
65
65
|
const url = new URL(rawPath, scope.url).href;
|
|
66
66
|
if (url.endsWith(".css")) {
|
|
67
67
|
return;
|
|
@@ -95,9 +95,9 @@ function loadChunkWithScope(scope, chunkId) {
|
|
|
95
95
|
function createChunkDispatcher() {
|
|
96
96
|
return function __chunk_dispatcher__(chunkId, scriptBundle) {
|
|
97
97
|
_chunkRUWR74XQcjs.logDebug.call(void 0, "ChunkDispatcher", `Dispatching chunk: "${chunkId}"`);
|
|
98
|
-
const { bundle } =
|
|
98
|
+
const { bundle } = _chunkRLI4YTBJcjs.parseRemoteId.call(void 0, chunkId);
|
|
99
99
|
const bundleName = bundle || scriptBundle || "default";
|
|
100
|
-
const scope =
|
|
100
|
+
const scope = _chunkRLI4YTBJcjs.getScope.call(void 0, bundleName);
|
|
101
101
|
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
102
102
|
"ChunkDispatcher",
|
|
103
103
|
`Scope resolution: bundle="${bundleName}", scope=${_nullishCoalesce(_optionalChain([scope, 'optionalAccess', _12 => _12.scopedName]), () => ( "null"))}`
|
|
@@ -131,7 +131,7 @@ async function handleTurbopackChunk(code, scope, url) {
|
|
|
131
131
|
).replace(
|
|
132
132
|
/TURBOPACK_NEXT_CHUNK_URLS/g,
|
|
133
133
|
`TURBOPACK_NEXT_CHUNK_URLS_${globalKey}`
|
|
134
|
-
).replace(
|
|
134
|
+
).replace(/TURBOPACK_CHUNK_LISTS/g, `TURBOPACK_CHUNK_LISTS_${globalKey}`).replace(
|
|
135
135
|
/TURBOPACK_CHUNK_UPDATE_LISTENERS/g,
|
|
136
136
|
`TURBOPACK_CHUNK_UPDATE_LISTENERS_${globalKey}`
|
|
137
137
|
).replace(/__next_require__/g, `__${globalKey}_next_require__`).replace(
|
|
@@ -207,7 +207,7 @@ async function handleTurbopackChunk(code, scope, url) {
|
|
|
207
207
|
const baseUrl = url.slice(0, url.indexOf("/_next"));
|
|
208
208
|
const chunkLoadResult = loadChunkWithScope(
|
|
209
209
|
scope,
|
|
210
|
-
|
|
210
|
+
_chunkRLI4YTBJcjs.formatRemoteId.call(void 0, scope, `${baseUrl}/_next/${id}`)
|
|
211
211
|
);
|
|
212
212
|
if (chunkLoadResult) {
|
|
213
213
|
loadChunkPromises.push(chunkLoadResult);
|
|
@@ -231,7 +231,7 @@ function requireModule(scope, moduleId, fullId) {
|
|
|
231
231
|
return handleTurbopackModule(
|
|
232
232
|
scope,
|
|
233
233
|
idStr,
|
|
234
|
-
_nullishCoalesce(fullId, () => (
|
|
234
|
+
_nullishCoalesce(fullId, () => ( _chunkRLI4YTBJcjs.formatRemoteId.call(void 0, scope, idStr)))
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
function handleTurbopackModule(scope, moduleId, id) {
|
|
@@ -301,7 +301,7 @@ function findModuleInit(modules, moduleId) {
|
|
|
301
301
|
return void 0;
|
|
302
302
|
}
|
|
303
303
|
function createTurbopackContext(scope, exports, moduleExports, modules, moduleInit, id) {
|
|
304
|
-
const scopedRequire = (moduleId) => requireModule(scope, moduleId,
|
|
304
|
+
const scopedRequire = (moduleId) => requireModule(scope, moduleId, _chunkRLI4YTBJcjs.formatRemoteId.call(void 0, scope, String(moduleId)));
|
|
305
305
|
return {
|
|
306
306
|
// HMR not implemented for Remote Components
|
|
307
307
|
k: {
|
|
@@ -430,7 +430,7 @@ function createTurbopackContext(scope, exports, moduleExports, modules, moduleIn
|
|
|
430
430
|
const nextIndex = scriptSrc.indexOf("/_next");
|
|
431
431
|
const baseUrl = nextIndex !== -1 ? scriptSrc.slice(0, nextIndex) : "";
|
|
432
432
|
const chunkUrl = `${baseUrl}/_next/${url}`;
|
|
433
|
-
return loadChunkWithScope(scope,
|
|
433
|
+
return loadChunkWithScope(scope, _chunkRLI4YTBJcjs.formatRemoteId.call(void 0, scope, chunkUrl));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
throw new Error(
|
|
@@ -486,7 +486,7 @@ async function initializeSharedModules(scope, hostShared = {}, remoteShared = {}
|
|
|
486
486
|
const { default: sharedModuleInitializerInstance } = handleTurbopackModule(
|
|
487
487
|
scope,
|
|
488
488
|
sharedModuleId,
|
|
489
|
-
|
|
489
|
+
_chunkRLI4YTBJcjs.formatRemoteId.call(void 0, scope, String(sharedModuleInitializerId))
|
|
490
490
|
);
|
|
491
491
|
sharedModuleInitializer = sharedModuleInitializerInstance;
|
|
492
492
|
}
|
|
@@ -582,14 +582,14 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
582
582
|
const self = globalThis;
|
|
583
583
|
const ns = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, );
|
|
584
584
|
const bundleName = _nullishCoalesce(bundle, () => ( "default"));
|
|
585
|
-
const existingScope =
|
|
585
|
+
const existingScope = _chunkRLI4YTBJcjs.getScope.call(void 0, bundleName);
|
|
586
586
|
if (existingScope && existingScope.url.origin === url.origin) {
|
|
587
587
|
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
588
588
|
"WebpackRuntime",
|
|
589
589
|
`Reusing scope "${existingScope.scopedName}" (turbopackModules=${existingScope.turbopackModules.length})`
|
|
590
590
|
);
|
|
591
591
|
existingScope.resolveClientUrl = resolveClientUrl;
|
|
592
|
-
if (runtime ===
|
|
592
|
+
if (runtime === _chunkRLI4YTBJcjs.RUNTIME_TURBOPACK) {
|
|
593
593
|
await Promise.allSettled(
|
|
594
594
|
scripts.map(
|
|
595
595
|
(script) => script.src ? loadChunkWithScope(existingScope, script.src) : Promise.resolve(void 0)
|
|
@@ -598,9 +598,9 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
598
598
|
}
|
|
599
599
|
return existingScope;
|
|
600
600
|
}
|
|
601
|
-
const scope =
|
|
602
|
-
|
|
603
|
-
if (runtime ===
|
|
601
|
+
const scope = _chunkRLI4YTBJcjs.createScope.call(void 0, bundleName, url, runtime, resolveClientUrl);
|
|
602
|
+
_chunkRLI4YTBJcjs.registerScope.call(void 0, scope);
|
|
603
|
+
if (runtime === _chunkRLI4YTBJcjs.RUNTIME_WEBPACK && _optionalChain([self, 'access', _17 => _17.__remote_webpack_require__, 'optionalAccess', _18 => _18[bundleName]])) {
|
|
604
604
|
scope.webpackRequire = self.__remote_webpack_require__[bundleName];
|
|
605
605
|
}
|
|
606
606
|
ns.bundleUrls[bundleName] = url;
|
|
@@ -618,7 +618,7 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
618
618
|
self.__webpack_require__ = createModuleDispatcher(runtime);
|
|
619
619
|
ns.dispatcherRuntime = runtime;
|
|
620
620
|
self.__webpack_require_type__ = runtime;
|
|
621
|
-
if (self.__remote_webpack_require__ && runtime ===
|
|
621
|
+
if (self.__remote_webpack_require__ && runtime === _chunkRLI4YTBJcjs.RUNTIME_TURBOPACK) {
|
|
622
622
|
self.__remote_webpack_require__[bundleName] = self.__webpack_require__;
|
|
623
623
|
self.__remote_webpack_require__[bundleName].type = "turbopack";
|
|
624
624
|
}
|
|
@@ -626,7 +626,7 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
626
626
|
if (_optionalChain([self, 'access', _19 => _19.__remote_webpack_require__, 'optionalAccess', _20 => _20[bundleName]]) && scope.scopedName !== bundleName) {
|
|
627
627
|
self.__remote_webpack_require__[scope.scopedName] = self.__remote_webpack_require__[bundleName];
|
|
628
628
|
}
|
|
629
|
-
if (runtime ===
|
|
629
|
+
if (runtime === _chunkRLI4YTBJcjs.RUNTIME_TURBOPACK) {
|
|
630
630
|
const results = await Promise.allSettled(
|
|
631
631
|
scripts.map((script) => {
|
|
632
632
|
if (script.src) {
|
|
@@ -649,7 +649,7 @@ async function setupRemoteScope(runtime, scripts = [], url = new URL(location.hr
|
|
|
649
649
|
function createModuleDispatcher(runtime) {
|
|
650
650
|
return (id) => {
|
|
651
651
|
const self = globalThis;
|
|
652
|
-
const { bundle, id: moduleId } = _nullishCoalesce(_optionalChain([id, 'access', _21 => _21.match, 'call', _22 => _22(
|
|
652
|
+
const { bundle, id: moduleId } = _nullishCoalesce(_optionalChain([id, 'access', _21 => _21.match, 'call', _22 => _22(_chunkRLI4YTBJcjs.REMOTE_COMPONENT_REGEX), 'optionalAccess', _23 => _23.groups]), () => ( {
|
|
653
653
|
bundle: "default",
|
|
654
654
|
id
|
|
655
655
|
}));
|
|
@@ -660,13 +660,13 @@ function createModuleDispatcher(runtime) {
|
|
|
660
660
|
`Resolving "${id}" (bundle: "${bundleName}", runtime: "${remoteRuntime}")`
|
|
661
661
|
);
|
|
662
662
|
try {
|
|
663
|
-
if (remoteRuntime ===
|
|
664
|
-
const scope2 =
|
|
663
|
+
if (remoteRuntime === _chunkRLI4YTBJcjs.RUNTIME_WEBPACK && bundle && moduleId) {
|
|
664
|
+
const scope2 = _chunkRLI4YTBJcjs.getScope.call(void 0, bundle);
|
|
665
665
|
if (_optionalChain([scope2, 'optionalAccess', _29 => _29.webpackRequire]))
|
|
666
666
|
return scope2.webpackRequire(moduleId);
|
|
667
667
|
return _optionalChain([self, 'access', _30 => _30.__remote_webpack_require__, 'optionalAccess', _31 => _31[bundle], 'optionalCall', _32 => _32(moduleId)]);
|
|
668
668
|
}
|
|
669
|
-
const scope =
|
|
669
|
+
const scope = _chunkRLI4YTBJcjs.getScope.call(void 0, bundleName);
|
|
670
670
|
if (scope) {
|
|
671
671
|
return requireModule(scope, _nullishCoalesce(moduleId, () => ( id)), id);
|
|
672
672
|
}
|
|
@@ -706,4 +706,4 @@ function createModuleDispatcher(runtime) {
|
|
|
706
706
|
|
|
707
707
|
|
|
708
708
|
exports.initializeSharedModules = initializeSharedModules; exports.setupRemoteScope = setupRemoteScope;
|
|
709
|
-
//# sourceMappingURL=chunk-
|
|
709
|
+
//# sourceMappingURL=chunk-MQ2BBSL4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/runtime/turbopack/patterns.ts","../src/runtime/turbopack/chunk-loader.ts","../src/runtime/turbopack/module.ts","../src/runtime/turbopack/shared-modules.ts","../src/runtime/turbopack/remote-scope-setup.ts"],"names":["scope"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,oBAAoB;AAG1B,SAAS,YAAY,OAAuB;AAC1C,MAAI,MAAM,WAAW,GAAG,KAAK,MAAM,SAAS,GAAG,GAAG;AAChD,WAAO,MAAM,MAAM,GAAG,EAAE;AAAA,EAC1B;AACA,SAAO;AACT;AAM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AM,IAAI;AAAA,UACR,WAAW,6CAA6C;AAAA,UACxD,EAAE,OAAO,yBAAyB,QAAQ,gBAAgB,OAAU;AAAA,QACtE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF","sourcesContent":["/**\n * Regex patterns for parsing Turbopack's minified and development code.\n *\n * Turbopack outputs different variable names in dev vs production builds:\n * - Development: __turbopack_context__, parentImport, chunk, self\n * - Minified: e, t, etc.\n *\n * Module IDs are numeric in Next.js 16+ (e.g. `984803`) but full string paths in\n * Next.js 15.x dev mode (e.g. `\"[project]/.../react/index.js [app-client] (ecmascript)\"`).\n * ID-capturing patterns match `\"quoted string\"|digits` via the shared\n * `MODULE_ID_PATTERN` fragment. Use `extractGroup()` to both match and strip quotes\n * in one step.\n */\n\n/** Reusable fragment that matches a turbopack module ID: quoted string or numeric. */\nconst MODULE_ID_PATTERN = '\"[^\"]+\"|[0-9]+';\n\n/** Strips surrounding double-quotes from a captured regex value. */\nfunction stripQuotes(value: string): string {\n if (value.startsWith('\"') && value.endsWith('\"')) {\n return value.slice(1, -1);\n }\n return value;\n}\n\n/**\n * Runs a regex against `input` and returns the named capture group with\n * quotes stripped, or `undefined` if there's no match.\n */\nexport function extractGroup(\n re: RegExp,\n input: string,\n group: string,\n): string | undefined {\n const raw = re.exec(input)?.groups?.[group];\n return raw ? stripQuotes(raw) : undefined;\n}\n\n/**\n * Matches: self.TURBOPACK_REMOTE_SHARED or e.TURBOPACK_REMOTE_SHARED\n *\n * @example\n * // Development:\n * \"self.TURBOPACK_REMOTE_SHARED=await __turbopack_context__.A(984803)\"\n *\n * // Minified:\n * \"e.TURBOPACK_REMOTE_SHARED=await e.A(984803)\"\n */\nexport const REMOTE_SHARED_MARKER_RE =\n /(?:self|[a-z])\\.TURBOPACK_REMOTE_SHARED/;\n\n/**\n * Extracts the module ID from a TURBOPACK_REMOTE_SHARED assignment.\n *\n * Captures:\n * - `sharedModuleId`: The module ID (may be quoted for string paths).\n *\n * @example\n * // Next.js 16:\n * \"self.TURBOPACK_REMOTE_SHARED=await __turbopack_context__.A(984803)\"\n * // -> sharedModuleId = \"984803\"\n *\n * // Next.js 15.x (string IDs, spaces around `=`):\n * 'self.TURBOPACK_REMOTE_SHARED = await __turbopack_context__.A(\"[project]/...app-remote.tsx [app-client] (ecmascript, async loader)\")'\n * // -> sharedModuleId = \"[project]/...app-remote.tsx [app-client] (ecmascript, async loader)\"\n *\n * // Minified:\n * \"t.TURBOPACK_REMOTE_SHARED=await e.A(123456)\"\n * // -> sharedModuleId = \"123456\"\n */\nexport const REMOTE_SHARED_ASSIGNMENT_RE = new RegExp(\n `\\\\.TURBOPACK_REMOTE_SHARED\\\\s*=\\\\s*await (?:__turbopack_context__|[a-z])\\\\.A\\\\((?<sharedModuleId>${MODULE_ID_PATTERN})\\\\)`,\n);\n\n/**\n * Matches async module loader calls: ctx.A(moduleId)\n *\n * Captures:\n * - `asyncSharedModuleId`: The module ID (may be quoted).\n *\n * @example\n * // Next.js 16:\n * \"() => __turbopack_context__.A(460400)\"\n * // -> asyncSharedModuleId = \"460400\"\n *\n * // Next.js 15.x:\n * '() => __turbopack_context__.A(\"[project]/.../react/index.js [app-client] (ecmascript, async loader)\")'\n * // -> asyncSharedModuleId = \"[project]/.../react/index.js [app-client] (ecmascript, async loader)\"\n *\n * // Minified:\n * \"() => e.A(460400)\"\n * // -> asyncSharedModuleId = \"460400\"\n */\nexport const ASYNC_MODULE_LOADER_RE = new RegExp(\n `(?:__turbopack_context__|[a-z])\\\\.A\\\\((?<asyncSharedModuleId>${MODULE_ID_PATTERN})\\\\)`,\n);\n\n/**\n * Extracts the final module ID from an async module `.v()` callback.\n * The callback always ends by calling its argument (parentImport / single-letter\n * variable) with the real module ID. This matches that final call regardless of\n * surrounding structure (whitespace, `return` statements, block vs expression bodies).\n *\n * Handles both Promise.resolve (no extra chunks) and Promise.all (with chunks).\n *\n * Captures:\n * - `sharedModuleId`: The module ID (may be quoted).\n *\n * @example\n * // Next.js 16 minified (Promise.resolve):\n * \"e=>{e.v(e=>Promise.resolve().then(()=>e(633334)))}\"\n * // -> sharedModuleId = \"633334\"\n *\n * // Next.js 16 minified (Promise.all):\n * \"e=>{e.v(t=>Promise.all([\\\"chunk.js\\\"].map(t=>e.l(t))).then(()=>t(633334)))}\"\n * // -> sharedModuleId = \"633334\"\n *\n * // Next.js 15.x development (multi-line):\n * '(__turbopack_context__) => {\\n__turbopack_context__.v((parentImport) => {\\n return Promise.resolve().then(() => {\\n return parentImport(\"[project]/.../react/index.js [app-client] (ecmascript)\");\\n });\\n});\\n}'\n * // -> sharedModuleId = \"[project]/.../react/index.js [app-client] (ecmascript)\"\n */\nexport const ASYNC_MODULE_CALLBACK_RE = new RegExp(\n `(?:parentImport|[a-z])\\\\((?<sharedModuleId>${MODULE_ID_PATTERN})\\\\)`,\n);\n\n/**\n * Detects Turbopack runtime global usage in a chunk.\n *\n * Matches either dot-notation or bracket-notation access off `globalThis` or `self`:\n * - globalThis.TURBOPACK / self.TURBOPACK\n * - globalThis[\"TURBOPACK\"] / self['TURBOPACK'] (whitespace tolerated)\n */\nexport const TURBOPACK_GLOBAL_RE =\n /(?:globalThis|self)\\s*(?:\\.TURBOPACK|\\[\\s*[\"']TURBOPACK[\"']\\s*\\])/;\n","import { RUNTIME_WEBPACK } from '#internal/runtime/constants';\nimport { getNamespace } from '#internal/runtime/namespace';\nimport { collapseDoubleSlashes } from '#internal/runtime/patterns';\nimport type { GlobalScope } from '#internal/runtime/types';\nimport { isProxiedUrl } from '#internal/runtime/url/protected-rc-fallback';\nimport {\n failedProxiedAssetError,\n RemoteComponentsError,\n} from '#internal/utils/error';\nimport {\n logDebug,\n logWarn,\n warnCrossOriginFetchError,\n} from '#internal/utils/logger';\nimport { TURBOPACK_GLOBAL_RE } from './patterns';\nimport {\n formatRemoteId,\n getScope,\n parseRemoteId,\n type RemoteScope,\n} from './remote-scope';\n\n/**\n * Loads a chunk using a specific scope. All state (base URL, proxy callback,\n * TURBOPACK global key) comes from the scope — no global lookups needed.\n *\n * This is the primary chunk loader called directly from:\n * - setupRemoteScope (initial chunks)\n * - TurbopackContext.l (module-level chunk loading)\n * - handleTurbopackChunk (CHUNK_LIST additional chunks)\n *\n * The global chunk dedup cache is keyed by absolute URL, so different origins\n * naturally get separate cache entries even when sharing a bundle name.\n */\nexport function loadChunkWithScope(\n scope: RemoteScope,\n chunkId: string,\n): Promise<unknown> | undefined {\n logDebug(\n 'ChunkLoader',\n `loadChunkWithScope: \"${chunkId}\" (scope: \"${scope.scopedName}\")`,\n );\n const self = globalThis as GlobalScope;\n const ns = getNamespace();\n\n const { bundle, path, prefix } = parseRemoteId(chunkId);\n\n // Skip webpack runtime chunks\n const remoteRuntime = self.__remote_webpack_require__?.[bundle ?? 'default']\n ? self.__remote_webpack_require__[bundle ?? 'default']?.type || 'webpack'\n : scope.runtime;\n if (remoteRuntime === RUNTIME_WEBPACK) {\n return Promise.resolve(undefined);\n }\n\n const rawPath = path ? collapseDoubleSlashes(`${prefix}${path}`) : '/';\n const url = new URL(rawPath, scope.url).href;\n\n if (url.endsWith('.css')) {\n return;\n }\n\n if (ns.chunkCache[url]) {\n logDebug('ChunkLoader', `Cache hit for \"${chunkId}\" (url=\"${url}\")`);\n return ns.chunkCache[url];\n }\n\n const resolvedUrl = scope.resolveClientUrl?.(url) ?? url;\n if (resolvedUrl !== url) {\n logDebug('ChunkLoader', `Proxied chunk URL: \"${url}\" → \"${resolvedUrl}\"`);\n }\n\n ns.chunkCache[url] = new Promise((resolve, reject) => {\n fetch(resolvedUrl)\n .then((res) => res.text())\n .then((code) => {\n const hasTurbopack = TURBOPACK_GLOBAL_RE.test(code);\n if (hasTurbopack) {\n return handleTurbopackChunk(code, scope, url);\n }\n // Chunk doesn't contain Turbopack globals — nothing to process\n })\n .then(resolve)\n .catch((error) => {\n const isProxied = isProxiedUrl(resolvedUrl);\n if (isProxied) {\n reject(failedProxiedAssetError('chunk', url, resolvedUrl));\n } else {\n warnCrossOriginFetchError('ChunkLoader', url);\n reject(error);\n }\n });\n });\n\n return ns.chunkCache[url];\n}\n\n/**\n * Creates the global `__webpack_chunk_load__` dispatcher.\n * This is a thin wrapper called only by external code (React's RSC runtime).\n * It parses the chunkId, resolves the correct scope, and delegates to\n * `loadChunkWithScope`.\n */\nexport function createChunkDispatcher(): (\n chunkId: string,\n scriptBundle?: string,\n) => Promise<unknown> | undefined {\n return function __chunk_dispatcher__(chunkId: string, scriptBundle?: string) {\n logDebug('ChunkDispatcher', `Dispatching chunk: \"${chunkId}\"`);\n\n const { bundle } = parseRemoteId(chunkId);\n const bundleName = bundle || scriptBundle || 'default';\n\n // Works with both the scoped name (Next.js hosts with server-side\n // rewriting) and the plain bundle name (static/HTML hosts).\n const scope = getScope(bundleName);\n\n logDebug(\n 'ChunkDispatcher',\n `Scope resolution: bundle=\"${bundleName}\", scope=${scope?.scopedName ?? 'null'}`,\n );\n\n if (!scope) {\n logWarn('ChunkDispatcher', `No scope found for bundle \"${bundleName}\"`);\n return Promise.resolve(undefined);\n }\n\n return loadChunkWithScope(scope, chunkId);\n };\n}\n\n/**\n * Handles Turbopack chunk loading by transforming the chunk code to isolate\n * global variables per bundle and dynamically loading the transformed script.\n * Receives scope directly — no global state lookups needed.\n */\nasync function handleTurbopackChunk(\n code: string,\n scope: RemoteScope,\n url: string,\n): Promise<void> {\n // skip this chunk as it is not needed for remote components\n if (/importScripts\\(\\.\\.\\.self.TURBOPACK_NEXT_CHUNK_URLS/.test(code)) {\n const preloadLinks = document.querySelectorAll(\n `link[rel=\"preload\"][href=\"${new URL(url).pathname}\"]`,\n );\n preloadLinks.forEach((preloadLink) => preloadLink.remove());\n return;\n }\n\n const self = globalThis as GlobalScope;\n const { globalKey } = scope;\n\n // replace global variables with scope-specific ones to prevent collisions\n // between multiple remote component bundles\n const transformedCode = code\n .replace(\n /globalThis\\[\\s*[\"']TURBOPACK[\"']\\s*\\]/g,\n `globalThis[\"TURBOPACK_${globalKey}\"]`,\n )\n .replace(\n /self\\[\\s*[\"']TURBOPACK[\"']\\s*\\]/g,\n `self[\"TURBOPACK_${globalKey}\"]`,\n )\n .replace(/globalThis\\.TURBOPACK/g, `globalThis.TURBOPACK_${globalKey}`)\n .replace(/self\\.TURBOPACK(?!_)/g, `self.TURBOPACK_${globalKey}`)\n .replace(\n /TURBOPACK_WORKER_LOCATION/g,\n `TURBOPACK_WORKER_LOCATION_${globalKey}`,\n )\n .replace(\n /TURBOPACK_NEXT_CHUNK_URLS/g,\n `TURBOPACK_NEXT_CHUNK_URLS_${globalKey}`,\n )\n .replace(/TURBOPACK_CHUNK_LISTS/g, `TURBOPACK_CHUNK_LISTS_${globalKey}`)\n .replace(\n /TURBOPACK_CHUNK_UPDATE_LISTENERS/g,\n `TURBOPACK_CHUNK_UPDATE_LISTENERS_${globalKey}`,\n )\n .replace(/__next_require__/g, `__${globalKey}_next_require__`)\n .replace(\n /\\/\\/# sourceMappingURL=(?<name>.+)(?<optional>\\._)?\\.js\\.map/g,\n `//# sourceMappingURL=${new URL('.', new URL(url, scope.url)).href}$1$2.js.map`,\n );\n\n // Initialize TURBOPACK bundle as a real Array with a push interceptor.\n // Must be a true Array instance so Next.js 15.x turbopack runtimes whose\n // module-system IIFE guards with `Array.isArray(globalThis.TURBOPACK)`\n // don't bail out after we rewrite the global name.\n //\n // The interceptor captures module entries into scope.turbopackModules —\n // a flat array we control. We use Object.defineProperty to intercept\n // when the turbopack runtime replaces the global with a deferred-loading\n // dispatcher (canary builds), wrapping the replacement's push too.\n //\n // The scope is reused across loads of different components from the same\n // remote (see setupRemoteScope), so subsequent loads accumulate into\n // the same turbopackModules array. Chunk cache deduplication means\n // handleTurbopackChunk only runs once per unique chunk URL — all captured\n // modules remain available for any component that needs them.\n if (!self[`TURBOPACK_${globalKey}`]) {\n const wrapPush = <T extends { push?: (...args: unknown[]) => unknown }>(\n target: T,\n ): T => {\n const originalPush = target.push;\n if (typeof originalPush !== 'function') return target;\n target.push = (...items: unknown[]) => {\n for (const item of items) {\n if (Array.isArray(item)) {\n for (const entry of item) {\n scope.turbopackModules.push(entry);\n }\n } else {\n scope.turbopackModules.push(item);\n }\n }\n return originalPush.apply(target, items);\n };\n return target;\n };\n\n const globalProp = `TURBOPACK_${globalKey}`;\n let currentValue: unknown = wrapPush([] as unknown[]);\n Object.defineProperty(self, globalProp, {\n get() {\n return currentValue;\n },\n set(newValue: unknown) {\n // When the turbopack runtime replaces the array with a dispatcher,\n // wrap the new object's push so we keep capturing module entries.\n if (newValue && typeof newValue === 'object') {\n wrapPush(newValue as { push?: (...args: unknown[]) => unknown });\n }\n currentValue = newValue;\n },\n configurable: true,\n enumerable: true,\n });\n }\n\n // load the script dynamically using a Blob URL\n await new Promise<void>((scriptResolve, scriptReject) => {\n const blob = new Blob([transformedCode], {\n type: 'application/javascript; charset=UTF-8',\n });\n const scriptUrl = URL.createObjectURL(blob);\n const script = document.createElement('script');\n script.setAttribute('data-turbopack-src', url);\n script.src = scriptUrl;\n script.async = true;\n script.onload = () => {\n URL.revokeObjectURL(scriptUrl);\n scriptResolve(undefined);\n script.remove();\n };\n script.onerror = () => {\n URL.revokeObjectURL(scriptUrl);\n scriptReject(\n new RemoteComponentsError(\n `Failed to load <script src=\"${script.src}\"> for Remote Component. Check the URL is correct.`,\n ),\n );\n script.remove();\n };\n document.head.appendChild(script);\n });\n\n // process any additional chunks that were registered during script execution\n // These CHUNK_LIST chunks load directly via scope — no global dispatch needed.\n const chunkLists = self[`TURBOPACK_${globalKey}_CHUNK_LISTS`] as\n | { chunks: string[] }[]\n | undefined;\n const loadChunkPromises: (Promise<unknown> | undefined)[] = [];\n while (chunkLists?.length) {\n const { chunks } = chunkLists.shift() ?? { chunks: [] };\n if (chunks.length > 0) {\n for (const id of chunks) {\n const baseUrl = url.slice(0, url.indexOf('/_next'));\n const chunkLoadResult = loadChunkWithScope(\n scope,\n formatRemoteId(scope, `${baseUrl}/_next/${id}`),\n );\n if (chunkLoadResult) {\n loadChunkPromises.push(chunkLoadResult);\n }\n }\n }\n }\n if (loadChunkPromises.length > 0) {\n await Promise.all(loadChunkPromises);\n }\n}\n","import { logError } from '#internal/utils/logger';\nimport { loadChunkWithScope } from './chunk-loader';\nimport { formatRemoteId, type RemoteScope } from './remote-scope';\nimport { getSharedModule, getTurbopackModules } from './shared-modules';\n\n/**\n * Function signature for Turbopack module initializers.\n * These functions are generated by Turbopack and initialize module exports.\n */\nexport type TurbopackModuleInit = (\n turbopackContext: TurbopackContext,\n module: { exports: Record<string, unknown> },\n exports: Record<string, unknown>,\n) => void;\n\n/**\n * The context object passed to Turbopack module initializers.\n * This provides the runtime API that modules use for imports, exports, and HMR.\n */\ninterface TurbopackContext {\n /** HMR (Hot Module Replacement) - not implemented for remote components */\n k: {\n register(): void;\n registerExports(): void;\n signature(): (fn: unknown) => unknown;\n };\n /** ESM exports setup */\n s: (\n bindings:\n | Record<string, () => unknown>\n | [...([string, () => unknown] | [string, number, () => unknown])],\n esmId?: string | number,\n ) => void;\n /** Import module */\n i: (importId: string | number) => Record<string, unknown> | undefined;\n /** Require module */\n r: (requireId: string) => unknown;\n /** Value exports */\n v: (value: unknown) => void;\n /** Async module initializer */\n a: (\n mod: (\n handleDeps: unknown,\n setResult: (value: unknown) => void,\n ) => Promise<void>,\n ) => Promise<void>;\n /** Async module loader */\n A: (Aid: string) => Promise<unknown>;\n /**\n * Dynamic import tracking. Called in production chunks after ctx.s() to\n * register async/dynamic module relationships. e.g. t.j(importedMod, 58790)\n */\n j: (module: unknown, esmId?: string | number) => void;\n /** Chunk loader */\n l: (url: string) => Promise<unknown> | undefined;\n /** Global object for this bundle */\n g: unknown;\n /** Module object */\n m: { exports: Record<string, unknown> };\n /** Exports object */\n e: Record<string, unknown>;\n}\n\n/**\n * Turbopack pushes chunks as flat arrays in one of two shapes:\n *\n * Module chunk (common case):\n * [scriptElement, id1, factory1, id2, factory2, ...]\n * - index 0: the script Element (document.currentScript) or undefined\n * - alternating pairs: numeric ID (prod) or path string (dev), then factory function\n *\n * Runtime manifest (bootstrapper only, no module factories):\n * [scriptElement, { otherChunks: [...], runtimeModuleIds: [...] }]\n *\n * Newer Next.js canary versions may also store modules as a plain object\n * { [moduleId]: factory } rather than as an array.\n */\ntype BundleModules =\n | (\n | Element\n | string\n | number\n | TurbopackModuleInit\n | Record<string, TurbopackModuleInit>\n | null\n | undefined\n )[]\n | Record<string, TurbopackModuleInit>\n | undefined;\n\n/**\n * Resolves a module within a scope: checks shared modules first, then\n * falls back to Turbopack module resolution. This is the scope-local\n * equivalent of the global __webpack_require__ dispatcher.\n */\nexport function requireModule(\n scope: RemoteScope,\n moduleId: string | number,\n fullId?: string,\n): unknown {\n const idStr = String(moduleId);\n\n // moduleCache is checked first inside handleTurbopackModule too, but\n // checking here avoids the shared-module lookup on every re-entry.\n if (scope.moduleCache[idStr]) return scope.moduleCache[idStr];\n\n // Shared modules are NOT cached in moduleCache because ctx.s() also\n // uses moduleCache for esmId lookups. Caching the host's frozen module\n // object here would cause ctx.s() to attempt Object.defineProperty on\n // it, failing with \"Cannot redefine property\" for non-configurable\n // exports. Keeping shared modules in their own map avoids the collision.\n const sharedModule = getSharedModule(scope, moduleId);\n if (sharedModule) return sharedModule;\n\n return handleTurbopackModule(\n scope,\n idStr,\n fullId ?? formatRemoteId(scope, idStr),\n );\n}\n\n/**\n * Handles Turbopack module resolution and execution.\n * Finds a module in the Turbopack bundle, executes its initializer with a\n * custom runtime context, and returns the module exports.\n */\nexport function handleTurbopackModule(\n scope: RemoteScope,\n moduleId: string,\n id: string,\n): unknown {\n // Cache check must come before module init lookup. Module initializers\n // re-enter handleTurbopackModule for their own imports, so without this\n // guard circular dependencies would infinite-loop.\n if (scope.moduleCache[moduleId]) {\n return scope.moduleCache[moduleId];\n }\n\n const modules = getTurbopackModules(scope) as BundleModules;\n\n // Log only if bundle is completely missing (critical error)\n if (!modules) {\n logError(\n 'TurbopackModule',\n `TURBOPACK_${scope.globalKey} is undefined (scope: \"${scope.scopedName}\")`,\n );\n }\n\n const moduleInit = findModuleInit(modules, moduleId);\n const exports = {} as Record<string, unknown>;\n const moduleExports = { exports };\n\n if (typeof moduleInit !== 'function') {\n throw new Error(\n `Module ${id} not found in bundle ${scope.name} with id ${moduleId}`,\n );\n }\n\n // store a reference to the module exports in the cache before execution\n // to handle circular dependencies\n scope.moduleCache[moduleId] = moduleExports.exports;\n\n // execute the module initializer with our custom Turbopack context\n moduleInit(\n createTurbopackContext(\n scope,\n exports,\n moduleExports,\n modules,\n moduleInit,\n id,\n ),\n moduleExports,\n exports,\n );\n\n // update the cache with the final exports (may have changed during execution)\n if (scope.moduleCache[moduleId] !== moduleExports.exports) {\n scope.moduleCache[moduleId] = moduleExports.exports;\n }\n\n return moduleExports.exports;\n}\n\n/**\n * Finds the module initializer function for a given ID in the Turbopack bundle.\n * Handles all bundle shapes: flat array, object map, nested arrays, and\n * embedded object entries within arrays. Performs exact match first, then\n * falls back to startsWith for dev-mode IDs with appended qualifiers.\n */\nexport function findModuleInit(\n modules: BundleModules | unknown[] | undefined,\n moduleId: string,\n): TurbopackModuleInit | undefined {\n if (!modules || typeof modules !== 'object') return;\n\n // Object format: { [id]: factory } (newer Next.js canary builds)\n if (!Array.isArray(modules)) {\n const key =\n moduleId in modules\n ? moduleId\n : Object.keys(modules).find((k) => k.startsWith(moduleId));\n return key !== undefined ? modules[key] : undefined;\n }\n\n const flat = modules.flat();\n\n // Two-pass ID search: exact match first to avoid prefix false positives.\n // The startsWith fallback handles dev-mode IDs with appended qualifiers\n // such as \"[project]/path.tsx [app-client] (ecmascript, async loader)\".\n let idx = flat.findIndex((e) => String(e) === String(moduleId));\n if (idx < 0) {\n idx = flat.findIndex(\n (e) => typeof e === 'string' && e.startsWith(moduleId),\n );\n }\n if (idx >= 0) {\n // Factory is the first function entry that follows the module ID\n return flat\n .slice(idx + 1)\n .find((e): e is TurbopackModuleInit => typeof e === 'function');\n }\n\n // Embedded object map: entries of the form { [moduleId]: factory }\n for (const entry of flat) {\n if (!entry || typeof entry !== 'object') continue;\n const obj = entry as Record<string, TurbopackModuleInit>;\n if (moduleId in obj) return obj[moduleId];\n const prefixKey = Object.keys(obj).find((k) => k.startsWith(moduleId));\n if (prefixKey) return obj[prefixKey];\n }\n return undefined;\n}\n\n/**\n * Creates the Turbopack context object that provides the runtime API for modules.\n * All context methods close over the scope directly — no global dispatch needed\n * for internal module-to-module calls.\n */\nfunction createTurbopackContext(\n scope: RemoteScope,\n exports: Record<string, unknown>,\n moduleExports: { exports: Record<string, unknown> },\n modules: BundleModules,\n moduleInit: TurbopackModuleInit,\n id: string,\n): TurbopackContext {\n /** Scope-local require: shared modules → turbopack module resolution. */\n const scopedRequire = (moduleId: string | number): unknown =>\n requireModule(scope, moduleId, formatRemoteId(scope, String(moduleId)));\n\n return {\n // HMR not implemented for Remote Components\n k: {\n register() {\n // omit\n },\n registerExports() {\n // omit\n },\n signature() {\n return (fn: unknown) => fn;\n },\n },\n\n // ESM exports setup\n s(\n bindings:\n | Record<string, () => unknown>\n | [...([string, () => unknown] | [string, number, () => unknown])],\n esmId?: string | number,\n ) {\n let mod = exports;\n if (typeof esmId === 'string' || typeof esmId === 'number') {\n if (!scope.moduleCache[esmId]) {\n scope.moduleCache[esmId] = {} as Record<string, unknown>;\n }\n mod = scope.moduleCache[esmId] as Record<string, unknown>;\n }\n\n Object.defineProperty(mod, '__esModule', { value: true });\n if (Array.isArray(bindings)) {\n let i = 0;\n while (i < bindings.length) {\n const propName = bindings[i++] as string;\n const tagOrFunc = bindings[i++];\n if (typeof tagOrFunc === 'number') {\n Object.defineProperty(mod, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n });\n } else {\n const getterFn = tagOrFunc as () => unknown;\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => unknown;\n Object.defineProperty(mod, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n });\n } else {\n Object.defineProperty(mod, propName, {\n get: getterFn,\n enumerable: true,\n });\n }\n }\n }\n }\n },\n\n // import — resolves directly via scope, no global dispatch\n i(importId: string | number) {\n let mod: Record<string, unknown> | undefined;\n if (typeof importId === 'string') {\n // parse export syntax if present (e.g., \"module <export foo as bar>\")\n const { exportSource, exportName } =\n /\\s+<export (?<exportSource>.*?) as (?<exportName>.*?)>$/.exec(\n importId,\n )?.groups ?? {};\n const normalizedId = importId.replace(\n /\\s+<export(?<specifier>.*)>$/,\n '',\n );\n mod = scopedRequire(normalizedId) as\n | Record<string, unknown>\n | undefined;\n // map the requested export to the module exports\n if (\n mod &&\n exportSource &&\n exportName &&\n (exportSource === '*' || typeof mod[exportSource] !== 'undefined') &&\n typeof mod[exportName] === 'undefined'\n ) {\n if (exportSource === '*') {\n mod[exportName] = mod;\n } else {\n mod[exportName] = mod[exportSource];\n }\n }\n } else {\n mod = scopedRequire(importId) as Record<string, unknown> | undefined;\n }\n\n if (typeof mod !== 'object' || mod === null) {\n mod = { default: mod };\n } else if (\n !('default' in mod) &&\n // ES module namespace objects have a null prototype, so calling\n // mod.toString() directly throws. Use Object.prototype.toString\n // to safely detect them.\n Object.prototype.toString.call(mod) !== '[object Module]'\n ) {\n try {\n mod.default = mod;\n } catch {\n // ignore if mod is not extensible\n }\n }\n return mod;\n },\n\n // require — resolves directly via scope\n r(requireId: string) {\n return scopedRequire(requireId);\n },\n\n // value exports\n v(value: unknown) {\n if (typeof value === 'function') {\n exports.default = value((vid: string | number) => scopedRequire(vid));\n } else {\n moduleExports.exports = value as Record<string, unknown>;\n }\n },\n\n // async module initializer\n async a(\n mod: (\n handleDeps: unknown,\n setResult: (value: unknown) => void,\n ) => Promise<void>,\n ) {\n let result;\n await mod(\n () => {\n // not implemented\n },\n (value) => (result = value),\n );\n exports.default = result;\n },\n\n // async module loader — resolves directly via scope\n async A(Aid: string) {\n const mod = scopedRequire(Aid) as {\n default: (\n parentImport: (parentId: string) => unknown,\n ) => Promise<unknown>;\n };\n return mod.default((parentId: string) => scopedRequire(parentId));\n },\n\n // dynamic import tracking — no-op for remote components\n j() {\n // omit\n },\n\n // chunk loader — loads directly via scope, no global dispatch\n l(url: string) {\n // find the script tag that loaded the current module to determine base URL\n const flatModules = Array.isArray(modules) ? modules : [];\n const moduleInitIndex = flatModules.indexOf(moduleInit);\n if (moduleInitIndex !== -1) {\n const scriptIndex = flatModules\n .slice(0, moduleInitIndex)\n .findLastIndex((bundleEntry) => bundleEntry instanceof Element);\n if (scriptIndex !== -1) {\n const script = flatModules[scriptIndex] as HTMLScriptElement;\n const scriptSrc = script.getAttribute('data-turbopack-src') || '';\n const nextIndex = scriptSrc.indexOf('/_next');\n const baseUrl = nextIndex !== -1 ? scriptSrc.slice(0, nextIndex) : '';\n const chunkUrl = `${baseUrl}/_next/${url}`;\n return loadChunkWithScope(scope, formatRemoteId(scope, chunkUrl));\n }\n }\n throw new Error(\n `Failed to load Turbopack chunk \"${url}\" for module \"${id}\". Check the URL is correct.`,\n );\n },\n\n // globalThis substitute shared across all modules in this scope\n g: scope.moduleGlobal,\n m: moduleExports,\n e: exports,\n };\n}\n","import type { GlobalScope } from '#internal/runtime/types';\nimport { logDebug, logError, logWarn } from '#internal/utils/logger';\nimport { findModuleInit, handleTurbopackModule } from './module';\nimport {\n ASYNC_MODULE_CALLBACK_RE,\n ASYNC_MODULE_LOADER_RE,\n extractGroup,\n REMOTE_SHARED_ASSIGNMENT_RE,\n REMOTE_SHARED_MARKER_RE,\n} from './patterns';\nimport { formatRemoteId, type RemoteScope } from './remote-scope';\n\nconst DEDUPLICATION_WARNING =\n 'This module will not be deduplicated — the remote may load its own copy, ' +\n 'which can cause duplicate instance errors (e.g. invalid hook calls if React is loaded twice).';\n\n/**\n * Returns the flat module list for a scope.\n *\n * The primary source is `scope.turbopackModules` — a flat array populated by\n * the push interceptor in handleTurbopackChunk. This is immune to the\n * turbopack runtime replacing the TURBOPACK global (canary builds swap the\n * array for a deferred-loading dispatcher object).\n *\n * Falls back to reading the global for pre-populated bundles where the push\n * interceptor was never installed.\n */\nexport function getTurbopackModules(scope: RemoteScope): unknown[] | undefined {\n if (scope.turbopackModules.length > 0) {\n return scope.turbopackModules;\n }\n\n // Fallback: read the global for pre-populated bundles or legacy setups.\n const self = globalThis as GlobalScope;\n const raw = self[`TURBOPACK_${scope.globalKey}`];\n if (!raw) return undefined;\n\n if (Array.isArray(raw)) {\n return (raw as unknown[]).flat();\n }\n return Object.entries(raw as Record<string, unknown>).flat();\n}\n\n/**\n * Initializes shared modules between the host application and remote components.\n * This enables sharing of common dependencies like React to avoid duplicate instances.\n *\n * The function works by:\n * 1. Looking for a shared module initializer in the Turbopack bundle\n * 2. Extracting module IDs from the initializer\n * 3. Loading the corresponding host modules and mapping them to the remote's expected IDs\n */\nexport async function initializeSharedModules(\n scope: RemoteScope,\n hostShared: Record<string, (bundle?: string) => Promise<unknown>> = {},\n remoteShared: Record<string, string> = {},\n // biome-ignore lint/suspicious/noConfusingVoidType: Runtime is undefined but in TS land service it is void\n): Promise<void[]> {\n const allModules = getTurbopackModules(scope);\n\n logDebug(\n 'SharedModules',\n `initializeSharedModules: scope=\"${scope.scopedName}\", ` +\n `allModules=${allModules ? allModules.length : 'null'}, ` +\n `hostShared=[${Object.keys(hostShared).join(', ')}], ` +\n `remoteShared=${JSON.stringify(remoteShared)}`,\n );\n\n let sharedModuleInitializer: Promise<{\n shared: Record<string, string | (() => Promise<unknown>)>;\n }> | null = null;\n\n // find the shared module initializer in the Turbopack bundle\n if (allModules) {\n // find the shared module initializer module id by looking for\n // a function that contains the TURBOPACK_REMOTE_SHARED pattern\n const sharedModuleInitializerIndex = allModules.findIndex((idOrFunc) => {\n if (typeof idOrFunc !== 'function') {\n return false;\n }\n const funcCode = idOrFunc.toString();\n return REMOTE_SHARED_MARKER_RE.test(funcCode);\n });\n\n // if found, extract the shared module initializer\n // first element in the array is always the source script element\n if (sharedModuleInitializerIndex > 0) {\n const sharedModuleInitializerCode = (\n allModules[sharedModuleInitializerIndex] as () => unknown\n ).toString();\n const sharedModuleInitializerId = allModules[\n sharedModuleInitializerIndex - 1\n ] as string | number;\n // extract the shared module id from the function code\n const sharedModuleId = extractGroup(\n REMOTE_SHARED_ASSIGNMENT_RE,\n sharedModuleInitializerCode,\n 'sharedModuleId',\n );\n // load the shared module initializer using the extracted module id\n if (sharedModuleId) {\n const { default: sharedModuleInitializerInstance } =\n handleTurbopackModule(\n scope,\n sharedModuleId,\n formatRemoteId(scope, String(sharedModuleInitializerId)),\n ) as {\n default: Promise<{\n shared: Record<string, string | (() => Promise<unknown>)>;\n }>;\n };\n sharedModuleInitializer = sharedModuleInitializerInstance;\n }\n }\n\n // if we have a shared module initializer, load the shared modules from the host application\n if (sharedModuleInitializer) {\n const { shared } = await sharedModuleInitializer;\n // map shared module ids to their initializer functions\n const sharedModuleIds = extractSharedModuleIds(shared, scope);\n logDebug(\n 'SharedModules',\n `Resolved shared modules for scope=\"${scope.scopedName}\": ${JSON.stringify(sharedModuleIds)}`,\n );\n\n // load shared modules from the host application\n return Promise.all(\n Object.entries(sharedModuleIds).map(async ([id, module]) => {\n if (hostShared[module]) {\n scope.sharedModules[id] = await hostShared[module](scope.name);\n } else {\n logError(\n 'SharedModules',\n `Host shared module \"${module}\" not found for ID ${id}. ${DEDUPLICATION_WARNING}`,\n );\n }\n }),\n );\n }\n\n logWarn(\n 'SharedModules',\n `No shared module initializer found in bundle for scope=\"${scope.scopedName}\" — falling back to remoteShared mapping`,\n );\n } else {\n logWarn(\n 'SharedModules',\n `No TURBOPACK modules found for scope=\"${scope.scopedName}\" (TURBOPACK_${scope.globalKey} is empty)`,\n );\n }\n\n // fallback: ensure that the shared modules are initialized using remoteShared mapping\n return Promise.all(\n Object.entries(remoteShared).map(async ([id, module]) => {\n if (hostShared[module]) {\n const normalizedId = id.replace('[app-ssr]', '[app-client]');\n scope.sharedModules[normalizedId] = await hostShared[module](\n scope.name,\n );\n } else {\n logError(\n 'SharedModules',\n `Shared module \"${module}\" not found for \"${scope.name}\". ${DEDUPLICATION_WARNING}`,\n );\n }\n }),\n );\n}\n\n/**\n * Extracts shared module IDs from the shared module initializer functions.\n * This parses the minified Turbopack code to find the module ID mappings.\n */\nfunction extractSharedModuleIds(\n shared: Record<string, string | (() => Promise<unknown>)>,\n scope: RemoteScope,\n): Record<string, string> {\n return Object.entries(shared)\n .filter(([, value]) => typeof value === 'function')\n .reduce<Record<string, string>>((acc, [key, value]) => {\n const asyncSharedModuleId = extractGroup(\n ASYNC_MODULE_LOADER_RE,\n value.toString(),\n 'asyncSharedModuleId',\n );\n\n if (asyncSharedModuleId) {\n const asyncSharedModule = findModuleInit(\n getTurbopackModules(scope),\n asyncSharedModuleId,\n );\n if (asyncSharedModule) {\n const sharedModuleId = extractGroup(\n ASYNC_MODULE_CALLBACK_RE,\n asyncSharedModule.toString(),\n 'sharedModuleId',\n );\n // map the shared module id to the actual module name\n acc[sharedModuleId ?? asyncSharedModuleId] = key.replace(\n '__remote_shared_module_',\n '',\n );\n }\n }\n return acc;\n }, {});\n}\n\n/**\n * Returns a shared module for the given scope and module ID.\n * Shared modules are common dependencies like React that are provided by the host.\n */\nexport function getSharedModule(\n scope: RemoteScope,\n id: string | number,\n): unknown {\n const idStr = String(id);\n\n // Exact match first (covers both string and numeric IDs)\n if (scope.sharedModules[idStr] !== undefined) {\n return scope.sharedModules[idStr];\n }\n\n // Fallback: the id may be a bundle-prefixed string like \"[bundle] /react/index.js\"\n // that contains the shared module key as a suffix. Only match when the key\n // appears as a complete suffix segment to avoid \"react\" matching \"react-dom\".\n for (const [key, value] of Object.entries(scope.sharedModules)) {\n if (typeof value !== 'undefined' && idStr !== key && idStr.endsWith(key)) {\n return value;\n }\n }\n\n return null;\n}\n","import type { InternalResolveClientUrl } from '#internal/host/server/types';\nimport {\n RUNTIME_TURBOPACK,\n RUNTIME_WEBPACK,\n type Runtime,\n} from '#internal/runtime/constants';\nimport { getNamespace } from '#internal/runtime/namespace';\nimport { REMOTE_COMPONENT_REGEX } from '#internal/runtime/patterns';\nimport type { GlobalScope } from '#internal/runtime/types';\nimport { RemoteComponentsError } from '#internal/utils/error';\nimport { logDebug, logWarn } from '#internal/utils/logger';\nimport { createChunkDispatcher, loadChunkWithScope } from './chunk-loader';\nimport { requireModule } from './module';\nimport {\n createScope,\n getScope,\n type RemoteScope,\n registerScope,\n} from './remote-scope';\n\n/**\n * Sets up the bundler runtime environment for remote components.\n *\n * Creates a RemoteScope that encapsulates all per-remote state (base URL,\n * proxy callback, module cache, shared modules) and registers it in the\n * global scope registry. Global dispatchers (__webpack_require__,\n * __webpack_chunk_load__) are set once and route to the correct scope.\n *\n * Shared module initialization is NOT performed here — callers must invoke\n * `initializeSharedModules` separately after this function returns. This\n * separation ensures shared modules are initialized after turbopack chunks\n * are loaded (so the primary bundle-introspection path is used), avoiding\n * the fallback that keys shared modules by file path instead of numeric ID.\n *\n * @returns The scope (newly created or reused) for the bundle.\n */\nexport async function setupRemoteScope(\n runtime: Runtime,\n scripts: { src: string | null }[] = [],\n url: URL = new URL(location.href),\n bundle?: string,\n resolveClientUrl?: InternalResolveClientUrl,\n): Promise<RemoteScope> {\n const self = globalThis as GlobalScope;\n const ns = getNamespace();\n const bundleName = bundle ?? 'default';\n\n // When the same remote loads a second component (e.g. switching from basic\n // to styled), reuse the existing scope. The chunk cache is keyed by URL and\n // returns cached promises without re-running handleTurbopackChunk, so\n // turbopackModules, moduleCache, and sharedModules from the first load are\n // all still valid. Only resolveClientUrl may have changed.\n //\n // Origin-only comparison is sufficient because bundleName already identifies\n // a specific remote — different paths on the same origin would be a different\n // bundle with a different name, so getScope() wouldn't return a match.\n const existingScope = getScope(bundleName);\n if (existingScope && existingScope.url.origin === url.origin) {\n logDebug(\n 'WebpackRuntime',\n `Reusing scope \"${existingScope.scopedName}\" (turbopackModules=${existingScope.turbopackModules.length})`,\n );\n existingScope.resolveClientUrl = resolveClientUrl;\n\n // Still load scripts — chunk cache deduplicates already-loaded chunks,\n // and a different component may reference additional chunks.\n if (runtime === RUNTIME_TURBOPACK) {\n await Promise.allSettled(\n scripts.map((script) =>\n script.src\n ? loadChunkWithScope(existingScope, script.src)\n : Promise.resolve(undefined),\n ),\n );\n }\n return existingScope;\n }\n\n const scope = createScope(bundleName, url, runtime, resolveClientUrl);\n registerScope(scope);\n\n // For webpack remotes the remote's own scripts have already loaded (via\n // loadScripts in component-loader) and populated __remote_webpack_require__\n // under the plain bundle name. Capture the reference on the scope so\n // downstream code (applySharedModules, module dispatcher) can use it\n // without reaching into the global.\n if (\n runtime === RUNTIME_WEBPACK &&\n self.__remote_webpack_require__?.[bundleName]\n ) {\n scope.webpackRequire = self.__remote_webpack_require__[bundleName];\n }\n\n ns.bundleUrls[bundleName] = url;\n // Also register under scopedName so webpack hosts (patch-require.ts) can\n // resolve cross-origin remotes whose bundle identifiers were rewritten.\n if (scope.scopedName !== bundleName) {\n ns.bundleUrls[scope.scopedName] = url;\n }\n self.__webpack_get_script_filename__ = () => null;\n\n const willCreateDispatchers =\n typeof self.__webpack_require__ !== 'function' ||\n ns.dispatcherRuntime !== 'turbopack';\n\n if (willCreateDispatchers) {\n // preserve original webpack functions for fallback\n if (\n !self.__original_webpack_require__ &&\n !self.__original_webpack_chunk_load__\n ) {\n self.__original_webpack_chunk_load__ = self.__webpack_chunk_load__;\n self.__original_webpack_require__ = self.__webpack_require__;\n }\n\n self.__webpack_chunk_load__ = createChunkDispatcher();\n self.__webpack_require__ = createModuleDispatcher(runtime);\n // Write-through needed: dispatcherRuntime is a primitive string,\n // so the legacy global can't be aliased by reference in getNamespace().\n ns.dispatcherRuntime = runtime;\n self.__webpack_require_type__ = runtime;\n\n // @legacy(v0.3.4) — __remote_webpack_require__ write-through for turbopack remotes.\n // Needed by PatchRequirePlugin which reads this global at runtime.\n // Remove once PatchRequirePlugin reads from scope.\n if (self.__remote_webpack_require__ && runtime === RUNTIME_TURBOPACK) {\n self.__remote_webpack_require__[bundleName] =\n self.__webpack_require__ as (remoteId: string | number) => unknown;\n self.__remote_webpack_require__[bundleName].type = 'turbopack';\n }\n }\n\n // @legacy(v0.3.4) — __remote_webpack_require__ scoped-name alias.\n // Ensures PatchRequirePlugin can find webpack remotes under rewritten\n // bundle identifiers. Remove once PatchRequirePlugin reads from scope.\n if (\n self.__remote_webpack_require__?.[bundleName] &&\n scope.scopedName !== bundleName\n ) {\n self.__remote_webpack_require__[scope.scopedName] =\n self.__remote_webpack_require__[bundleName];\n }\n\n // load all initial chunks directly via scope — no global dispatch needed\n if (runtime === RUNTIME_TURBOPACK) {\n const results = await Promise.allSettled(\n scripts.map((script) => {\n if (script.src) {\n return loadChunkWithScope(scope, script.src);\n }\n return Promise.resolve(undefined);\n }),\n );\n\n for (const result of results) {\n if (result.status === 'rejected') {\n logWarn(\n 'WebpackRuntime',\n `Initial chunk load failed: ${String(result.reason)}`,\n );\n }\n }\n }\n\n return scope;\n}\n\n/**\n * Creates the global module dispatcher for __webpack_require__.\n * Called by external code (React's RSC runtime) that doesn't have access to\n * a scope. Parses the module ID to find the correct scope and delegates\n * to scope-local module resolution.\n */\nfunction createModuleDispatcher(runtime: Runtime): (id: string) => unknown {\n return (id: string) => {\n const self = globalThis as GlobalScope;\n const { bundle, id: moduleId } = id.match(REMOTE_COMPONENT_REGEX)\n ?.groups ?? {\n bundle: 'default',\n id,\n };\n const bundleName = bundle ?? 'default';\n const remoteRuntime = self.__remote_webpack_require__?.[bundleName]\n ? self.__remote_webpack_require__[bundleName]?.type || 'webpack'\n : runtime;\n\n logDebug(\n 'ModuleDispatcher',\n `Resolving \"${id}\" (bundle: \"${bundleName}\", runtime: \"${remoteRuntime}\")`,\n );\n\n try {\n // for webpack remotes, prefer scope-based dispatch then fall back to global\n if (remoteRuntime === RUNTIME_WEBPACK && bundle && moduleId) {\n const scope = getScope(bundle);\n if (scope?.webpackRequire) return scope.webpackRequire(moduleId);\n // @legacy(v0.3.4) — global fallback for hosts that populated\n // __remote_webpack_require__ without calling setupWebpackRuntime.\n return self.__remote_webpack_require__?.[bundle]?.(moduleId);\n }\n\n // Look up scope by parsed bundle name. Works with both the scoped\n // name (Next.js hosts with server-side rewriting) and the plain\n // bundle name (static/HTML hosts with unrewritten chunks).\n const scope = getScope(bundleName);\n if (scope) {\n return requireModule(scope, moduleId ?? id, id);\n }\n\n throw new Error(\n `Module \"${id}\" not found — no scope for bundle \"${bundleName}\".`,\n );\n } catch (requireError) {\n logWarn(\n 'ModuleDispatcher',\n `Module require failed: ${String(requireError)}`,\n );\n if (typeof self.__original_webpack_require__ !== 'function') {\n throw new RemoteComponentsError(\n `Module \"${id}\" not found in remote component bundle \"${bundleName}\".`,\n {\n cause: requireError instanceof Error ? requireError : undefined,\n },\n );\n }\n try {\n logDebug(\n 'ModuleDispatcher',\n 'Falling back to original webpack require',\n );\n return self.__original_webpack_require__(id);\n } catch (originalError) {\n throw new RemoteComponentsError(\n `Module \"${id}\" not found in remote component bundle \"${bundleName}\".`,\n { cause: originalError instanceof Error ? originalError : undefined },\n );\n }\n }\n };\n}\n"]}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getScope,
|
|
9
9
|
parseRemoteId,
|
|
10
10
|
registerScope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SAGYPGIQ.js";
|
|
12
12
|
import {
|
|
13
13
|
getNamespace
|
|
14
14
|
} from "./chunk-D5GNZB6O.js";
|
|
@@ -131,7 +131,7 @@ async function handleTurbopackChunk(code, scope, url) {
|
|
|
131
131
|
).replace(
|
|
132
132
|
/TURBOPACK_NEXT_CHUNK_URLS/g,
|
|
133
133
|
`TURBOPACK_NEXT_CHUNK_URLS_${globalKey}`
|
|
134
|
-
).replace(
|
|
134
|
+
).replace(/TURBOPACK_CHUNK_LISTS/g, `TURBOPACK_CHUNK_LISTS_${globalKey}`).replace(
|
|
135
135
|
/TURBOPACK_CHUNK_UPDATE_LISTENERS/g,
|
|
136
136
|
`TURBOPACK_CHUNK_UPDATE_LISTENERS_${globalKey}`
|
|
137
137
|
).replace(/__next_require__/g, `__${globalKey}_next_require__`).replace(
|
|
@@ -706,4 +706,4 @@ export {
|
|
|
706
706
|
initializeSharedModules,
|
|
707
707
|
setupRemoteScope
|
|
708
708
|
};
|
|
709
|
-
//# sourceMappingURL=chunk-
|
|
709
|
+
//# sourceMappingURL=chunk-MTMDXJLM.js.map
|