remote-components 0.4.11 → 0.4.13

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.
Files changed (73) hide show
  1. package/dist/{chunk-3PR3SWYZ.js → chunk-3DR4Z24C.js} +24 -2
  2. package/dist/chunk-3DR4Z24C.js.map +1 -0
  3. package/dist/{chunk-VFK4HGZT.js → chunk-5BBEO4SE.js} +14 -5
  4. package/dist/chunk-5BBEO4SE.js.map +1 -0
  5. package/dist/{chunk-GR5FN73U.js → chunk-CBEDRGC7.js} +3 -3
  6. package/dist/{chunk-RHRDUJ3K.js → chunk-CLB2ATH2.js} +82 -4
  7. package/dist/chunk-CLB2ATH2.js.map +1 -0
  8. package/dist/{chunk-M6ACTSVB.js → chunk-IE7FXNFJ.js} +2 -2
  9. package/dist/{chunk-XWRB6CEA.cjs → chunk-KMG54QXV.cjs} +3 -3
  10. package/dist/{chunk-PCHSF5LH.cjs → chunk-KP544TQH.cjs} +35 -26
  11. package/dist/chunk-KP544TQH.cjs.map +1 -0
  12. package/dist/{chunk-HZP4FWPG.cjs → chunk-OI37BBBU.cjs} +25 -25
  13. package/dist/{chunk-RZ224NSH.cjs → chunk-OVD7BRLD.cjs} +18 -18
  14. package/dist/{chunk-6PZEDIAK.cjs → chunk-OZCVXVKU.cjs} +24 -2
  15. package/dist/chunk-OZCVXVKU.cjs.map +1 -0
  16. package/dist/{chunk-OSSMJQFE.cjs → chunk-W7RJUCZQ.cjs} +97 -19
  17. package/dist/chunk-W7RJUCZQ.cjs.map +1 -0
  18. package/dist/{chunk-N6AJM72A.js → chunk-XEO3XD67.js} +8 -8
  19. package/dist/config/nextjs.cjs +10 -10
  20. package/dist/config/nextjs.js +7 -7
  21. package/dist/config/tailwind.cjs +53 -0
  22. package/dist/config/tailwind.cjs.map +1 -0
  23. package/dist/config/tailwind.d.ts +21 -0
  24. package/dist/config/tailwind.js +53 -0
  25. package/dist/config/tailwind.js.map +1 -0
  26. package/dist/host/html.cjs +20 -20
  27. package/dist/host/html.js +8 -8
  28. package/dist/host/nextjs/app/client-only.cjs +12 -12
  29. package/dist/host/nextjs/app/client-only.js +7 -7
  30. package/dist/host/react.cjs +8 -8
  31. package/dist/host/react.js +7 -7
  32. package/dist/internal/host/nextjs/app-client.cjs +7 -3
  33. package/dist/internal/host/nextjs/app-client.cjs.map +1 -1
  34. package/dist/internal/host/nextjs/app-client.js +7 -3
  35. package/dist/internal/host/nextjs/app-client.js.map +1 -1
  36. package/dist/internal/host/shared/provider.cjs +10 -1
  37. package/dist/internal/host/shared/provider.cjs.map +1 -1
  38. package/dist/internal/host/shared/provider.js +10 -1
  39. package/dist/internal/host/shared/provider.js.map +1 -1
  40. package/dist/internal/host/shared/remote-image-loader.cjs +23 -1
  41. package/dist/internal/host/shared/remote-image-loader.cjs.map +1 -1
  42. package/dist/internal/host/shared/remote-image-loader.js +23 -1
  43. package/dist/internal/host/shared/remote-image-loader.js.map +1 -1
  44. package/dist/internal/runtime/turbopack/shared-modules.cjs +2 -2
  45. package/dist/internal/runtime/turbopack/shared-modules.cjs.map +1 -1
  46. package/dist/internal/runtime/turbopack/shared-modules.js +2 -2
  47. package/dist/internal/runtime/turbopack/shared-modules.js.map +1 -1
  48. package/dist/remote/react/utils/portal.cjs +58 -0
  49. package/dist/remote/react/utils/portal.cjs.map +1 -0
  50. package/dist/remote/react/utils/portal.d.ts +12 -0
  51. package/dist/remote/react/utils/portal.js +58 -0
  52. package/dist/remote/react/utils/portal.js.map +1 -0
  53. package/dist/{turbopack-UMJ7SLJL.cjs → turbopack-5WAY6QIC.cjs} +11 -11
  54. package/dist/{turbopack-6BSS3SYN.js → turbopack-Z744H3T4.js} +4 -4
  55. package/dist/{webpack-65BVWX2U.cjs → webpack-3GSL5AZJ.cjs} +11 -11
  56. package/dist/{webpack-4QYGIVE6.js → webpack-IQKPPBGH.js} +4 -4
  57. package/package.json +18 -1
  58. package/dist/chunk-3PR3SWYZ.js.map +0 -1
  59. package/dist/chunk-6PZEDIAK.cjs.map +0 -1
  60. package/dist/chunk-OSSMJQFE.cjs.map +0 -1
  61. package/dist/chunk-PCHSF5LH.cjs.map +0 -1
  62. package/dist/chunk-RHRDUJ3K.js.map +0 -1
  63. package/dist/chunk-VFK4HGZT.js.map +0 -1
  64. /package/dist/{chunk-GR5FN73U.js.map → chunk-CBEDRGC7.js.map} +0 -0
  65. /package/dist/{chunk-M6ACTSVB.js.map → chunk-IE7FXNFJ.js.map} +0 -0
  66. /package/dist/{chunk-XWRB6CEA.cjs.map → chunk-KMG54QXV.cjs.map} +0 -0
  67. /package/dist/{chunk-HZP4FWPG.cjs.map → chunk-OI37BBBU.cjs.map} +0 -0
  68. /package/dist/{chunk-RZ224NSH.cjs.map → chunk-OVD7BRLD.cjs.map} +0 -0
  69. /package/dist/{chunk-N6AJM72A.js.map → chunk-XEO3XD67.js.map} +0 -0
  70. /package/dist/{turbopack-UMJ7SLJL.cjs.map → turbopack-5WAY6QIC.cjs.map} +0 -0
  71. /package/dist/{turbopack-6BSS3SYN.js.map → turbopack-Z744H3T4.js.map} +0 -0
  72. /package/dist/{webpack-65BVWX2U.cjs.map → webpack-3GSL5AZJ.cjs.map} +0 -0
  73. /package/dist/{webpack-4QYGIVE6.js.map → webpack-IQKPPBGH.js.map} +0 -0
@@ -2,21 +2,21 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk6PZEDIAKcjs = require('../chunk-6PZEDIAK.cjs');
6
- require('../chunk-Z2SLBFQL.cjs');
7
- require('../chunk-5KTAEO52.cjs');
8
5
 
6
+ var _chunkN5VQR2PWcjs = require('../chunk-N5VQR2PW.cjs');
9
7
 
10
8
 
11
9
 
12
- var _chunkBBXVML3Dcjs = require('../chunk-BBXVML3D.cjs');
13
- require('../chunk-KE7QPAQ4.cjs');
14
10
 
11
+ var _chunkOZCVXVKUcjs = require('../chunk-OZCVXVKU.cjs');
12
+ require('../chunk-Z2SLBFQL.cjs');
13
+ require('../chunk-5KTAEO52.cjs');
15
14
 
16
15
 
17
16
 
18
17
 
19
- var _chunkN5VQR2PWcjs = require('../chunk-N5VQR2PW.cjs');
18
+ var _chunkBBXVML3Dcjs = require('../chunk-BBXVML3D.cjs');
19
+ require('../chunk-KE7QPAQ4.cjs');
20
20
  require('../chunk-SHFJ5OQA.cjs');
21
21
 
22
22
  // src/config/nextjs/index.ts
@@ -155,7 +155,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
155
155
  ".remote-components/shared/pages-host.tsx"
156
156
  );
157
157
  const appShared = /* @__PURE__ */ new Set([
158
- ..._chunk6PZEDIAKcjs.CORE_REACT_SHARED_KEYS,
158
+ ..._chunkOZCVXVKUcjs.CORE_REACT_SHARED_KEYS,
159
159
  "next/navigation",
160
160
  "next/dist/client/components/navigation",
161
161
  "next/link",
@@ -169,7 +169,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
169
169
  ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.shared]), () => ( []))
170
170
  ]);
171
171
  const pagesShared = /* @__PURE__ */ new Set([
172
- ..._chunk6PZEDIAKcjs.CORE_REACT_SHARED_KEYS,
172
+ ..._chunkOZCVXVKUcjs.CORE_REACT_SHARED_KEYS,
173
173
  "next/router",
174
174
  "next/link",
175
175
  "next/dist/shared/lib/image-loader",
@@ -177,7 +177,7 @@ function withRemoteComponentsConfig(nextConfig, options) {
177
177
  "next/form",
178
178
  ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _2 => _2.shared]), () => ( []))
179
179
  ]);
180
- const vendorShared = { ..._chunk6PZEDIAKcjs.VENDOR_SHARED };
180
+ const vendorShared = { ..._chunkOZCVXVKUcjs.VENDOR_SHARED };
181
181
  const resolve = _enhancedresolve2.default.create.sync({
182
182
  conditionNames: ["browser", "import", "module", "require"],
183
183
  ..._fs.existsSync.call(void 0, _path.join.call(void 0, process.cwd(), "tsconfig.json")) ? {
@@ -248,7 +248,7 @@ ${sharedManifest ? `export const sharedManifest = ${sharedManifest};
248
248
  ).join(",\n");
249
249
  return generateSharedModule({
250
250
  sharedEntries,
251
- sharedManifest: `{ protocol: '${_chunk6PZEDIAKcjs.SHARED_MODULE_MANIFEST_PROTOCOL}', requirements: [
251
+ sharedManifest: `{ protocol: '${_chunkOZCVXVKUcjs.SHARED_MODULE_MANIFEST_PROTOCOL}', requirements: [
252
252
  ${requirements}
253
253
  ] }`
254
254
  });
@@ -1,8 +1,14 @@
1
+ import {
2
+ ConditionalExecPlugin,
3
+ ModuleIdEmbedPlugin,
4
+ PatchRequirePlugin,
5
+ RemoteWebpackRequirePlugin
6
+ } from "../chunk-CTUJSWCM.js";
1
7
  import {
2
8
  CORE_REACT_SHARED_KEYS,
3
9
  SHARED_MODULE_MANIFEST_PROTOCOL,
4
10
  VENDOR_SHARED
5
- } from "../chunk-3PR3SWYZ.js";
11
+ } from "../chunk-3DR4Z24C.js";
6
12
  import "../chunk-D5GNZB6O.js";
7
13
  import "../chunk-STIJO4AG.js";
8
14
  import {
@@ -11,12 +17,6 @@ import {
11
17
  logWarn
12
18
  } from "../chunk-ULXU6XWH.js";
13
19
  import "../chunk-X6YKUJKH.js";
14
- import {
15
- ConditionalExecPlugin,
16
- ModuleIdEmbedPlugin,
17
- PatchRequirePlugin,
18
- RemoteWebpackRequirePlugin
19
- } from "../chunk-CTUJSWCM.js";
20
20
  import "../chunk-ENYGL5CO.js";
21
21
 
22
22
  // src/config/nextjs/index.ts
@@ -0,0 +1,53 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/config/tailwind/index.ts
2
+ var DEFAULT_SELECTORS = [
3
+ ":host",
4
+ ":host *",
5
+ ":host *::before",
6
+ ":host *::after",
7
+ ":host *::backdrop",
8
+ ":host *::file-selector-button"
9
+ ];
10
+ function remoteComponentsTailwindShadowDom(options = {}) {
11
+ return {
12
+ postcssPlugin: "remote-components-tailwind-shadow-dom",
13
+ Once(root) {
14
+ const declarations = /* @__PURE__ */ new Map();
15
+ root.walkAtRules("property", (atRule) => {
16
+ const propertyName = atRule.params.trim();
17
+ if (!propertyName.startsWith("--tw-")) {
18
+ return;
19
+ }
20
+ atRule.walkDecls("initial-value", (declaration) => {
21
+ declarations.set(propertyName, declaration.value);
22
+ });
23
+ });
24
+ if (declarations.size === 0) {
25
+ return;
26
+ }
27
+ root.append({
28
+ type: "atrule",
29
+ name: "layer",
30
+ params: "properties",
31
+ raws: {},
32
+ nodes: [
33
+ {
34
+ type: "rule",
35
+ raws: {},
36
+ selector: (_nullishCoalesce(options.selectors, () => ( DEFAULT_SELECTORS))).join(",\n"),
37
+ nodes: Array.from(declarations, ([prop, value]) => ({
38
+ type: "decl",
39
+ raws: {},
40
+ prop,
41
+ value
42
+ }))
43
+ }
44
+ ]
45
+ });
46
+ }
47
+ };
48
+ }
49
+ remoteComponentsTailwindShadowDom.postcss = true;
50
+
51
+
52
+ exports.remoteComponentsTailwindShadowDom = remoteComponentsTailwindShadowDom;
53
+ //# sourceMappingURL=tailwind.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/config/tailwind/index.ts"],"names":[],"mappings":";AAsBA,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,kCACd,UAAoD,CAAC,GACrD;AACA,SAAO;AAAA,IACL,eAAe;AAAA,IACf,KAAK,MAAmB;AACtB,YAAM,eAAe,oBAAI,IAAoB;AAE7C,WAAK,YAAY,YAAY,CAAC,WAAW;AACvC,cAAM,eAAe,OAAO,OAAO,KAAK;AAExC,YAAI,CAAC,aAAa,WAAW,OAAO,GAAG;AACrC;AAAA,QACF;AAEA,eAAO,UAAU,iBAAiB,CAAC,gBAAgB;AACjD,uBAAa,IAAI,cAAc,YAAY,KAAK;AAAA,QAClD,CAAC;AAAA,MACH,CAAC;AAED,UAAI,aAAa,SAAS,GAAG;AAC3B;AAAA,MACF;AAEA,WAAK,OAAO;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,MAAM,CAAC;AAAA,QACP,OAAO;AAAA,UACL;AAAA,YACE,MAAM;AAAA,YACN,MAAM,CAAC;AAAA,YACP,WAAW,QAAQ,aAAa,mBAAmB,KAAK,KAAK;AAAA,YAC7D,OAAO,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,cAClD,MAAM;AAAA,cACN,MAAM,CAAC;AAAA,cACP;AAAA,cACA;AAAA,YACF,EAAE;AAAA,UACJ;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAGE,kCAGA,UAAU","sourcesContent":["export interface RemoteComponentsTailwindShadowDomOptions {\n selectors?: string[];\n}\n\ninterface PostCssDeclaration {\n prop: string;\n value: string;\n}\n\ninterface PostCssAtRule {\n params: string;\n walkDecls(\n name: string,\n callback: (declaration: PostCssDeclaration) => void,\n ): void;\n}\n\ninterface PostCssRoot {\n walkAtRules(name: string, callback: (atRule: PostCssAtRule) => void): void;\n append(node: unknown): void;\n}\n\nconst DEFAULT_SELECTORS = [\n ':host',\n ':host *',\n ':host *::before',\n ':host *::after',\n ':host *::backdrop',\n ':host *::file-selector-button',\n];\n\nexport function remoteComponentsTailwindShadowDom(\n options: RemoteComponentsTailwindShadowDomOptions = {},\n) {\n return {\n postcssPlugin: 'remote-components-tailwind-shadow-dom',\n Once(root: PostCssRoot) {\n const declarations = new Map<string, string>();\n\n root.walkAtRules('property', (atRule) => {\n const propertyName = atRule.params.trim();\n\n if (!propertyName.startsWith('--tw-')) {\n return;\n }\n\n atRule.walkDecls('initial-value', (declaration) => {\n declarations.set(propertyName, declaration.value);\n });\n });\n\n if (declarations.size === 0) {\n return;\n }\n\n root.append({\n type: 'atrule',\n name: 'layer',\n params: 'properties',\n raws: {},\n nodes: [\n {\n type: 'rule',\n raws: {},\n selector: (options.selectors ?? DEFAULT_SELECTORS).join(',\\n'),\n nodes: Array.from(declarations, ([prop, value]) => ({\n type: 'decl',\n raws: {},\n prop,\n value,\n })),\n },\n ],\n });\n },\n };\n}\n\n(\n remoteComponentsTailwindShadowDom as typeof remoteComponentsTailwindShadowDom & {\n postcss?: boolean;\n }\n).postcss = true;\n"]}
@@ -0,0 +1,21 @@
1
+ interface RemoteComponentsTailwindShadowDomOptions {
2
+ selectors?: string[];
3
+ }
4
+ interface PostCssDeclaration {
5
+ prop: string;
6
+ value: string;
7
+ }
8
+ interface PostCssAtRule {
9
+ params: string;
10
+ walkDecls(name: string, callback: (declaration: PostCssDeclaration) => void): void;
11
+ }
12
+ interface PostCssRoot {
13
+ walkAtRules(name: string, callback: (atRule: PostCssAtRule) => void): void;
14
+ append(node: unknown): void;
15
+ }
16
+ declare function remoteComponentsTailwindShadowDom(options?: RemoteComponentsTailwindShadowDomOptions): {
17
+ postcssPlugin: string;
18
+ Once(root: PostCssRoot): void;
19
+ };
20
+
21
+ export { RemoteComponentsTailwindShadowDomOptions, remoteComponentsTailwindShadowDom };
@@ -0,0 +1,53 @@
1
+ // src/config/tailwind/index.ts
2
+ var DEFAULT_SELECTORS = [
3
+ ":host",
4
+ ":host *",
5
+ ":host *::before",
6
+ ":host *::after",
7
+ ":host *::backdrop",
8
+ ":host *::file-selector-button"
9
+ ];
10
+ function remoteComponentsTailwindShadowDom(options = {}) {
11
+ return {
12
+ postcssPlugin: "remote-components-tailwind-shadow-dom",
13
+ Once(root) {
14
+ const declarations = /* @__PURE__ */ new Map();
15
+ root.walkAtRules("property", (atRule) => {
16
+ const propertyName = atRule.params.trim();
17
+ if (!propertyName.startsWith("--tw-")) {
18
+ return;
19
+ }
20
+ atRule.walkDecls("initial-value", (declaration) => {
21
+ declarations.set(propertyName, declaration.value);
22
+ });
23
+ });
24
+ if (declarations.size === 0) {
25
+ return;
26
+ }
27
+ root.append({
28
+ type: "atrule",
29
+ name: "layer",
30
+ params: "properties",
31
+ raws: {},
32
+ nodes: [
33
+ {
34
+ type: "rule",
35
+ raws: {},
36
+ selector: (options.selectors ?? DEFAULT_SELECTORS).join(",\n"),
37
+ nodes: Array.from(declarations, ([prop, value]) => ({
38
+ type: "decl",
39
+ raws: {},
40
+ prop,
41
+ value
42
+ }))
43
+ }
44
+ ]
45
+ });
46
+ }
47
+ };
48
+ }
49
+ remoteComponentsTailwindShadowDom.postcss = true;
50
+ export {
51
+ remoteComponentsTailwindShadowDom
52
+ };
53
+ //# sourceMappingURL=tailwind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/config/tailwind/index.ts"],"sourcesContent":["export interface RemoteComponentsTailwindShadowDomOptions {\n selectors?: string[];\n}\n\ninterface PostCssDeclaration {\n prop: string;\n value: string;\n}\n\ninterface PostCssAtRule {\n params: string;\n walkDecls(\n name: string,\n callback: (declaration: PostCssDeclaration) => void,\n ): void;\n}\n\ninterface PostCssRoot {\n walkAtRules(name: string, callback: (atRule: PostCssAtRule) => void): void;\n append(node: unknown): void;\n}\n\nconst DEFAULT_SELECTORS = [\n ':host',\n ':host *',\n ':host *::before',\n ':host *::after',\n ':host *::backdrop',\n ':host *::file-selector-button',\n];\n\nexport function remoteComponentsTailwindShadowDom(\n options: RemoteComponentsTailwindShadowDomOptions = {},\n) {\n return {\n postcssPlugin: 'remote-components-tailwind-shadow-dom',\n Once(root: PostCssRoot) {\n const declarations = new Map<string, string>();\n\n root.walkAtRules('property', (atRule) => {\n const propertyName = atRule.params.trim();\n\n if (!propertyName.startsWith('--tw-')) {\n return;\n }\n\n atRule.walkDecls('initial-value', (declaration) => {\n declarations.set(propertyName, declaration.value);\n });\n });\n\n if (declarations.size === 0) {\n return;\n }\n\n root.append({\n type: 'atrule',\n name: 'layer',\n params: 'properties',\n raws: {},\n nodes: [\n {\n type: 'rule',\n raws: {},\n selector: (options.selectors ?? DEFAULT_SELECTORS).join(',\\n'),\n nodes: Array.from(declarations, ([prop, value]) => ({\n type: 'decl',\n raws: {},\n prop,\n value,\n })),\n },\n ],\n });\n },\n };\n}\n\n(\n remoteComponentsTailwindShadowDom as typeof remoteComponentsTailwindShadowDom & {\n postcss?: boolean;\n }\n).postcss = true;\n"],"mappings":";AAsBA,IAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,kCACd,UAAoD,CAAC,GACrD;AACA,SAAO;AAAA,IACL,eAAe;AAAA,IACf,KAAK,MAAmB;AACtB,YAAM,eAAe,oBAAI,IAAoB;AAE7C,WAAK,YAAY,YAAY,CAAC,WAAW;AACvC,cAAM,eAAe,OAAO,OAAO,KAAK;AAExC,YAAI,CAAC,aAAa,WAAW,OAAO,GAAG;AACrC;AAAA,QACF;AAEA,eAAO,UAAU,iBAAiB,CAAC,gBAAgB;AACjD,uBAAa,IAAI,cAAc,YAAY,KAAK;AAAA,QAClD,CAAC;AAAA,MACH,CAAC;AAED,UAAI,aAAa,SAAS,GAAG;AAC3B;AAAA,MACF;AAEA,WAAK,OAAO;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,MAAM,CAAC;AAAA,QACP,OAAO;AAAA,UACL;AAAA,YACE,MAAM;AAAA,YACN,MAAM,CAAC;AAAA,YACP,WAAW,QAAQ,aAAa,mBAAmB,KAAK,KAAK;AAAA,YAC7D,OAAO,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,cAClD,MAAM;AAAA,cACN,MAAM,CAAC;AAAA,cACP;AAAA,cACA;AAAA,YACF,EAAE;AAAA,UACJ;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAGE,kCAGA,UAAU;","names":[]}
@@ -7,16 +7,17 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkHZP4FWPGcjs = require('../chunk-HZP4FWPG.cjs');
11
- require('../chunk-XWRB6CEA.cjs');
12
- require('../chunk-RZ224NSH.cjs');
13
- require('../chunk-PCHSF5LH.cjs');
10
+ var _chunkOI37BBBUcjs = require('../chunk-OI37BBBU.cjs');
11
+ require('../chunk-TCFLEBQM.cjs');
12
+ require('../chunk-KMG54QXV.cjs');
13
+ require('../chunk-OVD7BRLD.cjs');
14
+ require('../chunk-KP544TQH.cjs');
14
15
  require('../chunk-3AX5WLZD.cjs');
15
16
 
16
17
 
17
18
 
18
19
 
19
- var _chunk6PZEDIAKcjs = require('../chunk-6PZEDIAK.cjs');
20
+ var _chunkOZCVXVKUcjs = require('../chunk-OZCVXVKU.cjs');
20
21
 
21
22
 
22
23
  var _chunkZ2SLBFQLcjs = require('../chunk-Z2SLBFQL.cjs');
@@ -28,7 +29,6 @@ require('../chunk-5KTAEO52.cjs');
28
29
 
29
30
  var _chunkBBXVML3Dcjs = require('../chunk-BBXVML3D.cjs');
30
31
  require('../chunk-KE7QPAQ4.cjs');
31
- require('../chunk-TCFLEBQM.cjs');
32
32
  require('../chunk-SHFJ5OQA.cjs');
33
33
 
34
34
  // src/host/html/index.tsx
@@ -125,10 +125,10 @@ async function getRuntime(type, url, bundle, shared, remoteShared, resolveClient
125
125
  };
126
126
  }
127
127
  if (type === "webpack") {
128
- const { webpackRuntime } = await Promise.resolve().then(() => _interopRequireWildcard(require("../webpack-65BVWX2U.cjs")));
128
+ const { webpackRuntime } = await Promise.resolve().then(() => _interopRequireWildcard(require("../webpack-3GSL5AZJ.cjs")));
129
129
  return webpackRuntime(bundle, shared, remoteShared, resolveClientUrl);
130
130
  } else if (type === "turbopack") {
131
- const { turbopackRuntime } = await Promise.resolve().then(() => _interopRequireWildcard(require("../turbopack-UMJ7SLJL.cjs")));
131
+ const { turbopackRuntime } = await Promise.resolve().then(() => _interopRequireWildcard(require("../turbopack-5WAY6QIC.cjs")));
132
132
  return turbopackRuntime(
133
133
  url,
134
134
  bundle,
@@ -149,15 +149,15 @@ async function getRuntime(type, url, bundle, shared, remoteShared, resolveClient
149
149
  var _jsxruntime = require('react/jsx-runtime');
150
150
  if (typeof HTMLElement !== "undefined") {
151
151
  class RemoteComponent extends HTMLElement {constructor(...args) { super(...args); RemoteComponent.prototype.__init.call(this);RemoteComponent.prototype.__init2.call(this);RemoteComponent.prototype.__init3.call(this);RemoteComponent.prototype.__init4.call(this);RemoteComponent.prototype.__init5.call(this);RemoteComponent.prototype.__init6.call(this);RemoteComponent.prototype.__init7.call(this); }
152
- __init() {this.name = _chunk6PZEDIAKcjs.DEFAULT_COMPONENT_NAME}
153
- __init2() {this.bundle = _chunk6PZEDIAKcjs.DEFAULT_BUNDLE_NAME}
152
+ __init() {this.name = _chunkOZCVXVKUcjs.DEFAULT_COMPONENT_NAME}
153
+ __init2() {this.bundle = _chunkOZCVXVKUcjs.DEFAULT_BUNDLE_NAME}
154
154
 
155
155
  __init3() {this.__next = null}
156
156
  __init4() {this.fouc = null}
157
- __init5() {this.hostState = _chunkHZP4FWPGcjs.createHostState.call(void 0, )}
157
+ __init5() {this.hostState = _chunkOI37BBBUcjs.createHostState.call(void 0, )}
158
158
  __init6() {this.root = null}
159
159
 
160
- __init7() {this.emitter = _chunkHZP4FWPGcjs.makeEventEmitter.call(void 0, this)}
160
+ __init7() {this.emitter = _chunkOI37BBBUcjs.makeEventEmitter.call(void 0, this)}
161
161
 
162
162
 
163
163
 
@@ -279,10 +279,10 @@ if (typeof HTMLElement !== "undefined") {
279
279
  let url = null;
280
280
  let html = this.innerHTML;
281
281
  if (src) {
282
- url = _chunkHZP4FWPGcjs.getClientOrServerUrl.call(void 0, src, window.location.href);
283
- this.name = _chunkHZP4FWPGcjs.resolveNameFromSrc.call(void 0, src, this.name);
282
+ url = _chunkOI37BBBUcjs.getClientOrServerUrl.call(void 0, src, window.location.href);
283
+ this.name = _chunkOI37BBBUcjs.resolveNameFromSrc.call(void 0, src, this.name);
284
284
  }
285
- const resolveClientUrl = url ? _chunkHZP4FWPGcjs.bindResolveClientUrl.call(void 0, this.resolveClientUrl, url.href) : void 0;
285
+ const resolveClientUrl = url ? _chunkOI37BBBUcjs.bindResolveClientUrl.call(void 0, this.resolveClientUrl, url.href) : void 0;
286
286
  if (!remoteComponentChild && url) {
287
287
  const fetchInit = {
288
288
  credentials: this.credentials || "same-origin"
@@ -293,7 +293,7 @@ if (typeof HTMLElement !== "undefined") {
293
293
  );
294
294
  let res;
295
295
  try {
296
- res = await _chunkHZP4FWPGcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
296
+ res = await _chunkOI37BBBUcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
297
297
  onRequest: this.onRequest,
298
298
  onResponse: this.onResponse,
299
299
  abortController: this.hostState.abortController
@@ -320,7 +320,7 @@ if (typeof HTMLElement !== "undefined") {
320
320
  }
321
321
  }
322
322
  const effectiveUrl = _nullishCoalesce(url, () => ( new URL(window.location.href)));
323
- const { doc, parsed } = _chunkHZP4FWPGcjs.preparePipeline.call(void 0, {
323
+ const { doc, parsed } = _chunkOI37BBBUcjs.preparePipeline.call(void 0, {
324
324
  html,
325
325
  name: this.name,
326
326
  url: effectiveUrl,
@@ -569,9 +569,9 @@ if (typeof HTMLElement !== "undefined") {
569
569
  };
570
570
  if (rsc) {
571
571
  _optionalChain([rsc, 'access', _65 => _65.parentElement, 'optionalAccess', _66 => _66.removeChild, 'call', _67 => _67(rsc)]);
572
- const rscName = `__remote_component_rsc_${_chunk6PZEDIAKcjs.escapeString.call(void 0,
572
+ const rscName = `__remote_component_rsc_${_chunkOZCVXVKUcjs.escapeString.call(void 0,
573
573
  url.href
574
- )}_${_chunk6PZEDIAKcjs.escapeString.call(void 0, this.name)}`;
574
+ )}_${_chunkOZCVXVKUcjs.escapeString.call(void 0, this.name)}`;
575
575
  const rscClone = document.createElement("script");
576
576
  rscClone.id = `${rscName}_rsc`;
577
577
  rscClone.textContent = _nullishCoalesce(_optionalChain([rsc, 'access', _68 => _68.textContent, 'optionalAccess', _69 => _69.replace, 'call', _70 => _70(
@@ -584,7 +584,7 @@ if (typeof HTMLElement !== "undefined") {
584
584
  name,
585
585
  initial
586
586
  }) => {
587
- const stream = _chunkHZP4FWPGcjs.createRSCStream.call(void 0,
587
+ const stream = _chunkOI37BBBUcjs.createRSCStream.call(void 0,
588
588
  rscName,
589
589
  _nullishCoalesce(self[rscName], () => ( [`0:[null]
590
590
  `]))
package/dist/host/html.js CHANGED
@@ -7,16 +7,17 @@ import {
7
7
  makeEventEmitter,
8
8
  preparePipeline,
9
9
  resolveNameFromSrc
10
- } from "../chunk-N6AJM72A.js";
11
- import "../chunk-M6ACTSVB.js";
12
- import "../chunk-GR5FN73U.js";
13
- import "../chunk-VFK4HGZT.js";
10
+ } from "../chunk-XEO3XD67.js";
11
+ import "../chunk-GAXJTFBV.js";
12
+ import "../chunk-IE7FXNFJ.js";
13
+ import "../chunk-CBEDRGC7.js";
14
+ import "../chunk-5BBEO4SE.js";
14
15
  import "../chunk-LEKG4YWI.js";
15
16
  import {
16
17
  DEFAULT_BUNDLE_NAME,
17
18
  DEFAULT_COMPONENT_NAME,
18
19
  escapeString
19
- } from "../chunk-3PR3SWYZ.js";
20
+ } from "../chunk-3DR4Z24C.js";
20
21
  import {
21
22
  getNamespace
22
23
  } from "../chunk-D5GNZB6O.js";
@@ -28,7 +29,6 @@ import {
28
29
  logError
29
30
  } from "../chunk-ULXU6XWH.js";
30
31
  import "../chunk-X6YKUJKH.js";
31
- import "../chunk-GAXJTFBV.js";
32
32
  import "../chunk-ENYGL5CO.js";
33
33
 
34
34
  // src/host/html/index.tsx
@@ -125,10 +125,10 @@ async function getRuntime(type, url, bundle, shared, remoteShared, resolveClient
125
125
  };
126
126
  }
127
127
  if (type === "webpack") {
128
- const { webpackRuntime } = await import("../webpack-4QYGIVE6.js");
128
+ const { webpackRuntime } = await import("../webpack-IQKPPBGH.js");
129
129
  return webpackRuntime(bundle, shared, remoteShared, resolveClientUrl);
130
130
  } else if (type === "turbopack") {
131
- const { turbopackRuntime } = await import("../turbopack-6BSS3SYN.js");
131
+ const { turbopackRuntime } = await import("../turbopack-Z744H3T4.js");
132
132
  return turbopackRuntime(
133
133
  url,
134
134
  bundle,
@@ -1,26 +1,26 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunkOSSMJQFEcjs = require('../../../chunk-OSSMJQFE.cjs');
4
+ var _chunkW7RJUCZQcjs = require('../../../chunk-W7RJUCZQ.cjs');
5
5
 
6
6
 
7
- var _chunkHZP4FWPGcjs = require('../../../chunk-HZP4FWPG.cjs');
8
- require('../../../chunk-XWRB6CEA.cjs');
9
- require('../../../chunk-RZ224NSH.cjs');
10
- require('../../../chunk-PCHSF5LH.cjs');
7
+ var _chunkOI37BBBUcjs = require('../../../chunk-OI37BBBU.cjs');
8
+ require('../../../chunk-TCFLEBQM.cjs');
9
+ require('../../../chunk-KMG54QXV.cjs');
10
+ require('../../../chunk-OVD7BRLD.cjs');
11
+ require('../../../chunk-KP544TQH.cjs');
11
12
  require('../../../chunk-3AX5WLZD.cjs');
12
13
  require('../../../chunk-N3SQTOSE.cjs');
13
14
 
14
15
 
15
16
 
16
- var _chunk6PZEDIAKcjs = require('../../../chunk-6PZEDIAK.cjs');
17
+ var _chunkOZCVXVKUcjs = require('../../../chunk-OZCVXVKU.cjs');
17
18
  require('../../../chunk-Z2SLBFQL.cjs');
18
19
  require('../../../chunk-5KTAEO52.cjs');
19
20
 
20
21
 
21
22
  var _chunkBBXVML3Dcjs = require('../../../chunk-BBXVML3D.cjs');
22
23
  require('../../../chunk-KE7QPAQ4.cjs');
23
- require('../../../chunk-TCFLEBQM.cjs');
24
24
  require('../../../chunk-SHFJ5OQA.cjs');
25
25
 
26
26
  // src/host/nextjs/app-client-only.tsx
@@ -31,8 +31,8 @@ var _react = require('react');
31
31
  function resolveForBundle(unbound, bundle) {
32
32
  if (!unbound)
33
33
  return void 0;
34
- const remoteSrc = _nullishCoalesce(_optionalChain([_chunk6PZEDIAKcjs.getScope.call(void 0, bundle), 'optionalAccess', _2 => _2.url, 'access', _3 => _3.href]), () => ( ""));
35
- return _chunkHZP4FWPGcjs.bindResolveClientUrl.call(void 0, unbound, remoteSrc);
34
+ const remoteSrc = _nullishCoalesce(_optionalChain([_chunkOZCVXVKUcjs.getScope.call(void 0, bundle), 'optionalAccess', _2 => _2.url, 'access', _3 => _3.href]), () => ( ""));
35
+ return _chunkOI37BBBUcjs.bindResolveClientUrl.call(void 0, unbound, remoteSrc);
36
36
  }
37
37
  function createImageLoaderSharedEntries({
38
38
  bound,
@@ -41,13 +41,13 @@ function createImageLoaderSharedEntries({
41
41
  const loaderEntry = (bundle) => {
42
42
  const resolveClientUrl = _nullishCoalesce(bound, () => ( resolveForBundle(unbound, bundle)));
43
43
  return Promise.resolve({
44
- default: _chunk6PZEDIAKcjs.createRemoteImageLoader.call(void 0, bundle, resolveClientUrl),
44
+ default: _chunkOZCVXVKUcjs.createRemoteImageLoader.call(void 0, bundle, resolveClientUrl),
45
45
  __esModule: true
46
46
  });
47
47
  };
48
48
  const imageEntry = async (bundle) => {
49
49
  const resolveClientUrl = _nullishCoalesce(bound, () => ( resolveForBundle(unbound, bundle)));
50
- const rawLoader = _chunk6PZEDIAKcjs.createRemoteImageLoader.call(void 0, bundle, resolveClientUrl);
50
+ const rawLoader = _chunkOZCVXVKUcjs.createRemoteImageLoader.call(void 0, bundle, resolveClientUrl);
51
51
  const remoteLoader = Object.assign(
52
52
  (p) => rawLoader({ ...p, config: { path: "/_next/image" } }),
53
53
  { __next_img_default: true }
@@ -191,7 +191,7 @@ function ConsumeRemoteComponent2(props) {
191
191
  return _nullishCoalesce(props.children, () => ( null));
192
192
  }
193
193
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
194
- _chunkOSSMJQFEcjs.ConsumeRemoteComponent,
194
+ _chunkW7RJUCZQcjs.ConsumeRemoteComponent,
195
195
  {
196
196
  ...props,
197
197
  shared: sharedModules(props.shared, props.resolveClientUrl)
@@ -1,26 +1,26 @@
1
1
  "use client";
2
2
  import {
3
3
  ConsumeRemoteComponent
4
- } from "../../../chunk-RHRDUJ3K.js";
4
+ } from "../../../chunk-CLB2ATH2.js";
5
5
  import {
6
6
  bindResolveClientUrl
7
- } from "../../../chunk-N6AJM72A.js";
8
- import "../../../chunk-M6ACTSVB.js";
9
- import "../../../chunk-GR5FN73U.js";
10
- import "../../../chunk-VFK4HGZT.js";
7
+ } from "../../../chunk-XEO3XD67.js";
8
+ import "../../../chunk-GAXJTFBV.js";
9
+ import "../../../chunk-IE7FXNFJ.js";
10
+ import "../../../chunk-CBEDRGC7.js";
11
+ import "../../../chunk-5BBEO4SE.js";
11
12
  import "../../../chunk-LEKG4YWI.js";
12
13
  import "../../../chunk-RHGEBXPL.js";
13
14
  import {
14
15
  createRemoteImageLoader,
15
16
  getScope
16
- } from "../../../chunk-3PR3SWYZ.js";
17
+ } from "../../../chunk-3DR4Z24C.js";
17
18
  import "../../../chunk-D5GNZB6O.js";
18
19
  import "../../../chunk-STIJO4AG.js";
19
20
  import {
20
21
  logWarn
21
22
  } from "../../../chunk-ULXU6XWH.js";
22
23
  import "../../../chunk-X6YKUJKH.js";
23
- import "../../../chunk-GAXJTFBV.js";
24
24
  import "../../../chunk-ENYGL5CO.js";
25
25
 
26
26
  // src/host/nextjs/app-client-only.tsx
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkOSSMJQFEcjs = require('../chunk-OSSMJQFE.cjs');
5
- require('../chunk-HZP4FWPG.cjs');
6
- require('../chunk-XWRB6CEA.cjs');
7
- require('../chunk-RZ224NSH.cjs');
8
- require('../chunk-PCHSF5LH.cjs');
4
+ var _chunkW7RJUCZQcjs = require('../chunk-W7RJUCZQ.cjs');
5
+ require('../chunk-OI37BBBU.cjs');
6
+ require('../chunk-TCFLEBQM.cjs');
7
+ require('../chunk-KMG54QXV.cjs');
8
+ require('../chunk-OVD7BRLD.cjs');
9
+ require('../chunk-KP544TQH.cjs');
9
10
  require('../chunk-3AX5WLZD.cjs');
10
11
  require('../chunk-N3SQTOSE.cjs');
11
- require('../chunk-6PZEDIAK.cjs');
12
+ require('../chunk-OZCVXVKU.cjs');
12
13
  require('../chunk-Z2SLBFQL.cjs');
13
14
  require('../chunk-5KTAEO52.cjs');
14
15
  require('../chunk-BBXVML3D.cjs');
15
16
  require('../chunk-KE7QPAQ4.cjs');
16
- require('../chunk-TCFLEBQM.cjs');
17
17
  require('../chunk-SHFJ5OQA.cjs');
18
18
 
19
19
 
20
20
 
21
- exports.ConsumeRemoteComponent = _chunkOSSMJQFEcjs.ConsumeRemoteComponent; exports.useRemoteNavigate = _chunkOSSMJQFEcjs.useRemoteNavigate;
21
+ exports.ConsumeRemoteComponent = _chunkW7RJUCZQcjs.ConsumeRemoteComponent; exports.useRemoteNavigate = _chunkW7RJUCZQcjs.useRemoteNavigate;
22
22
  //# sourceMappingURL=react.cjs.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  ConsumeRemoteComponent,
3
3
  useRemoteNavigate
4
- } from "../chunk-RHRDUJ3K.js";
5
- import "../chunk-N6AJM72A.js";
6
- import "../chunk-M6ACTSVB.js";
7
- import "../chunk-GR5FN73U.js";
8
- import "../chunk-VFK4HGZT.js";
4
+ } from "../chunk-CLB2ATH2.js";
5
+ import "../chunk-XEO3XD67.js";
6
+ import "../chunk-GAXJTFBV.js";
7
+ import "../chunk-IE7FXNFJ.js";
8
+ import "../chunk-CBEDRGC7.js";
9
+ import "../chunk-5BBEO4SE.js";
9
10
  import "../chunk-LEKG4YWI.js";
10
11
  import "../chunk-RHGEBXPL.js";
11
- import "../chunk-3PR3SWYZ.js";
12
+ import "../chunk-3DR4Z24C.js";
12
13
  import "../chunk-D5GNZB6O.js";
13
14
  import "../chunk-STIJO4AG.js";
14
15
  import "../chunk-ULXU6XWH.js";
15
16
  import "../chunk-X6YKUJKH.js";
16
- import "../chunk-GAXJTFBV.js";
17
17
  import "../chunk-ENYGL5CO.js";
18
18
  export {
19
19
  ConsumeRemoteComponent,
@@ -182,6 +182,13 @@ function ConsumeRemoteComponentClient({
182
182
  });
183
183
  }
184
184
  }, [component, children]);
185
+ (0, import_react.useEffect)(() => {
186
+ return () => {
187
+ hostStateRef.current.abortController?.abort();
188
+ hostStateRef.current.abortController = void 0;
189
+ hostStateRef.current.stage = "idle";
190
+ };
191
+ }, []);
185
192
  (0, import_react.useEffect)(() => {
186
193
  (0, import_react.startTransition)(async () => {
187
194
  try {
@@ -266,9 +273,6 @@ function ConsumeRemoteComponentClient({
266
273
  setComponent(error);
267
274
  }
268
275
  });
269
- return () => {
270
- hostStateRef.current.abortController?.abort();
271
- };
272
276
  }, [
273
277
  component,
274
278
  name,