vitral 0.9.0 → 0.10.0

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 (76) hide show
  1. package/dist/angular.d.ts +2 -2
  2. package/dist/angular.js +7 -5
  3. package/dist/auto.js +7 -5
  4. package/dist/{capture-TT5WBLJ6.js → capture-A6JQNNQY.js} +1 -0
  5. package/dist/{channel-2YPYGX3J.js → channel-2DUQQPPA.js} +1 -0
  6. package/dist/chunk-4E33RZMM.js +18 -0
  7. package/dist/{chunk-P5JSFGPI.js → chunk-5OM6KOCP.js} +19 -1
  8. package/dist/{chunk-ZRAGLT3I.js → chunk-CFJC4GRB.js} +4 -4
  9. package/dist/{chunk-6T25WKNK.js → chunk-EVVYV5ED.js} +41 -18
  10. package/dist/{chunk-JKNTXBZH.js → chunk-FOEXP52G.js} +8 -5
  11. package/dist/chunk-MGG5BW3U.js +10 -0
  12. package/dist/chunk-MLKGABMK.js +9 -0
  13. package/dist/{chunk-PQXS2UDM.js → chunk-QINOFHG6.js} +1 -1
  14. package/dist/{dedupe-PZCSKL3L.js → chunk-R3HUMHNL.js} +15 -16
  15. package/dist/{chunk-KU6HF2EW.js → chunk-SC2KF7GJ.js} +2 -2
  16. package/dist/{sri-TBZ6PYYY.js → chunk-VK6W7KHM.js} +17 -4
  17. package/dist/{chunk-NTXMEZIZ.js → chunk-VTGHPX4J.js} +5 -5
  18. package/dist/{chunk-ZJ4IM2PZ.js → chunk-WAU6OKK3.js} +2 -2
  19. package/dist/cli.js +2 -1
  20. package/dist/{contract-OMHCH6LI.js → contract-IXM52LVW.js} +2 -1
  21. package/dist/dedupe-SRAPOK3V.js +13 -0
  22. package/dist/devtools.js +1 -0
  23. package/dist/dict.js +1 -0
  24. package/dist/edge.d.ts +1 -1
  25. package/dist/edge.js +1 -0
  26. package/dist/element.d.ts +2 -2
  27. package/dist/element.js +7 -5
  28. package/dist/embed.js +2 -2
  29. package/dist/{events-Cieg_far.d.ts → events-CWdYSrkz.d.ts} +1 -1
  30. package/dist/{expose-V5ASGX4E.js → expose-BA4HSXDP.js} +5 -3
  31. package/dist/federation.d.ts +1 -1
  32. package/dist/federation.js +2 -0
  33. package/dist/{hydrate-6NE4MYOD.js → hydrate-IVQNHOP3.js} +6 -4
  34. package/dist/iframe.js +8 -6
  35. package/dist/index.d.ts +5 -5
  36. package/dist/index.js +5 -3
  37. package/dist/{loader-BIXjuvvp.d.ts → loader-CLRMRRFv.d.ts} +1 -1
  38. package/dist/next-config.d.ts +34 -2
  39. package/dist/next-config.js +68 -4
  40. package/dist/next-host.d.ts +3 -3
  41. package/dist/next-host.js +35 -8
  42. package/dist/next.d.ts +1 -1
  43. package/dist/next.js +1 -0
  44. package/dist/otel.js +2 -0
  45. package/dist/{overrides-NP754HY7.js → overrides-5BGODLCO.js} +1 -0
  46. package/dist/{portals-AK5XA2M5.js → portals-RLXKPXBZ.js} +2 -0
  47. package/dist/preact.d.ts +4 -4
  48. package/dist/preact.js +6 -4
  49. package/dist/prefetch.js +5 -3
  50. package/dist/react-server.d.ts +1 -1
  51. package/dist/react-server.js +1 -0
  52. package/dist/react.d.ts +4 -4
  53. package/dist/react.js +7 -5
  54. package/dist/{reframe-3ZN5CHEG.js → reframe-ZOQPW552.js} +8 -6
  55. package/dist/routes.d.ts +2 -2
  56. package/dist/routes.js +6 -4
  57. package/dist/sentry.js +2 -0
  58. package/dist/{shadow-S4SKHTA7.js → shadow-PZGQKUA4.js} +2 -1
  59. package/dist/single-spa.d.ts +1 -1
  60. package/dist/single-spa.js +2 -0
  61. package/dist/{slot-Dhczjs1E.d.ts → slot-DRYmGvvV.d.ts} +1 -1
  62. package/dist/solid.d.ts +3 -3
  63. package/dist/solid.js +6 -4
  64. package/dist/sri-LQBLQMG5.js +14 -0
  65. package/dist/{stale-HFTCJASS.js → stale-XV4LNHDX.js} +2 -0
  66. package/dist/svelte.d.ts +4 -4
  67. package/dist/svelte.js +6 -4
  68. package/dist/sw.js +2 -0
  69. package/dist/testing.d.ts +1 -1
  70. package/dist/testing.js +5 -3
  71. package/dist/{types-wsKR1gfx.d.ts → types-g8WEVD_b.d.ts} +2 -0
  72. package/dist/vitals.js +1 -0
  73. package/dist/vite.js +10 -4
  74. package/dist/vue.d.ts +3 -3
  75. package/dist/vue.js +6 -4
  76. package/package.json +15 -15
package/dist/next-host.js CHANGED
@@ -1,23 +1,36 @@
1
1
  "use client";
2
+ import {
3
+ dedupe_exports
4
+ } from "./chunk-R3HUMHNL.js";
5
+ import {
6
+ sri_exports
7
+ } from "./chunk-VK6W7KHM.js";
2
8
  import {
3
9
  Remote,
4
10
  preload
5
- } from "./chunk-JKNTXBZH.js";
11
+ } from "./chunk-FOEXP52G.js";
6
12
  import "./chunk-B2MPYF4M.js";
7
- import "./chunk-ZJ4IM2PZ.js";
8
- import "./chunk-NTXMEZIZ.js";
13
+ import "./chunk-UYOPJ4XQ.js";
14
+ import "./chunk-4E33RZMM.js";
15
+ import "./chunk-WAU6OKK3.js";
16
+ import "./chunk-VTGHPX4J.js";
9
17
  import "./chunk-EQZOJU3B.js";
10
18
  import {
11
19
  configure
12
- } from "./chunk-6T25WKNK.js";
13
- import "./chunk-KU6HF2EW.js";
20
+ } from "./chunk-EVVYV5ED.js";
21
+ import {
22
+ bundled
23
+ } from "./chunk-MGG5BW3U.js";
24
+ import "./chunk-SC2KF7GJ.js";
14
25
  import "./chunk-TW7KYJQ6.js";
15
26
  import "./chunk-463H6B56.js";
16
27
  import "./chunk-GNPFWISJ.js";
28
+ import "./chunk-MLKGABMK.js";
17
29
 
18
30
  // src/next-host.tsx
31
+ import Head from "next/head";
19
32
  import Router, { useRouter } from "next/router";
20
- import { createElement, useEffect, useMemo } from "react";
33
+ import { createElement, Fragment, useEffect, useMemo } from "react";
21
34
  import { remotes, shared } from "vitral-next-host-config";
22
35
  var under = (path, prefix) => path === prefix || path.startsWith(prefix + "/");
23
36
  function remoteFor(path) {
@@ -27,6 +40,8 @@ var configured = false;
27
40
  function setup() {
28
41
  if (configured || typeof window === "undefined") return;
29
42
  configured = true;
43
+ bundled.sri = sri_exports;
44
+ bundled.dedupe = dedupe_exports;
30
45
  configure({
31
46
  remotes: Object.fromEntries(Object.entries(remotes).map(([name, r]) => [name, { url: r.url, ...r.integrity === false && { integrity: false } }])),
32
47
  dedupe: shared
@@ -88,14 +103,26 @@ function VitralNext() {
88
103
  }
89
104
  var push = (url, options) => void Router.push(url, void 0, options);
90
105
  var replace = (url, options) => void Router.replace(url, void 0, options);
106
+ function hints(name, shadow) {
107
+ const h = remotes[name]?.hints;
108
+ if (!h) return null;
109
+ const link = (as, [href, integrity]) => createElement("link", { key: `vitral:${href}`, rel: "preload", as, href, crossOrigin: "anonymous", ...integrity && { integrity } });
110
+ return createElement(
111
+ Head,
112
+ null,
113
+ link("fetch", [h.manifest]),
114
+ ...shadow ? [] : h.css.map((c) => link("style", c)),
115
+ ...h.js.map((j) => link("script", j))
116
+ );
117
+ }
91
118
  function NextRemote({ name, props, fallback = null, ...rest }) {
92
119
  setup();
93
120
  const router = useRouter();
94
121
  const r = remotes[name];
95
122
  const host = useMemo(() => ({ asPath: router.asPath, basePath: r?.basePath, routes: r?.routes, push, replace, events: Router.events }), [router.asPath, r]);
96
123
  const all = useMemo(() => ({ ...props, __next: host }), [props, host]);
97
- if (!router.isReady) return fallback;
98
- return createElement(Remote, { ...rest, name, fallback, props: all });
124
+ const links = useMemo(() => hints(name, rest.isolate === "shadow"), [name, rest.isolate]);
125
+ return createElement(Fragment, null, links, router.isReady ? createElement(Remote, { ...rest, name, fallback, props: all }) : fallback);
99
126
  }
100
127
  export {
101
128
  NextRemote,
package/dist/next.d.ts CHANGED
@@ -118,7 +118,7 @@ type ImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'width' | 'h
118
118
  }) => string;
119
119
  onLoadingComplete?: (img: HTMLImageElement) => void;
120
120
  };
121
- declare const Image: react.ForwardRefExoticComponent<Omit<ImgHTMLAttributes<HTMLImageElement>, "loading" | "src" | "width" | "height"> & {
121
+ declare const Image: react.ForwardRefExoticComponent<Omit<ImgHTMLAttributes<HTMLImageElement>, "height" | "width" | "loading" | "src"> & {
122
122
  src: string | StaticImage;
123
123
  alt: string;
124
124
  width?: number | string;
package/dist/next.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  navigate
4
4
  } from "./chunk-EQZOJU3B.js";
5
5
  import "./chunk-GNPFWISJ.js";
6
+ import "./chunk-MLKGABMK.js";
6
7
 
7
8
  // src/next.tsx
8
9
  import {
package/dist/otel.js CHANGED
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/otel.ts
2
4
  function otelOnError({ trace, tracer }) {
3
5
  return (error) => {
@@ -12,6 +12,7 @@ import {
12
12
  storedOverrides
13
13
  } from "./chunk-54CBIZES.js";
14
14
  import "./chunk-GNPFWISJ.js";
15
+ import "./chunk-MLKGABMK.js";
15
16
  export {
16
17
  OVERRIDES_KEY,
17
18
  activeOverrides,
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/core/portals.ts
2
4
  function scopePortals(root, scope) {
3
5
  const owner = (node) => {
package/dist/preact.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as preact from 'preact';
2
2
  import { VNode, ComponentType } from 'preact';
3
- import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-wsKR1gfx.js';
4
- export { R as RemoteContext } from './types-wsKR1gfx.js';
3
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-g8WEVD_b.js';
4
+ export { R as RemoteContext } from './types-g8WEVD_b.js';
5
5
  import { R as RemoteError } from './errors-kjBv6IH_.js';
6
- import { S as SlotStatus } from './slot-Dhczjs1E.js';
7
- export { e as events } from './events-Cieg_far.js';
6
+ import { S as SlotStatus } from './slot-DRYmGvvV.js';
7
+ export { e as events } from './events-CWdYSrkz.js';
8
8
  export { n as navigate } from './navigate-BRG1WJUM.js';
9
9
  import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
10
10
 
package/dist/preact.js CHANGED
@@ -1,21 +1,23 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-ZJ4IM2PZ.js";
3
+ } from "./chunk-WAU6OKK3.js";
4
4
  import {
5
5
  defineRemote,
6
6
  memoSelect,
7
7
  same,
8
8
  shared
9
- } from "./chunk-NTXMEZIZ.js";
9
+ } from "./chunk-VTGHPX4J.js";
10
10
  import {
11
11
  events,
12
12
  navigate
13
13
  } from "./chunk-EQZOJU3B.js";
14
- import "./chunk-6T25WKNK.js";
15
- import "./chunk-KU6HF2EW.js";
14
+ import "./chunk-EVVYV5ED.js";
15
+ import "./chunk-MGG5BW3U.js";
16
+ import "./chunk-SC2KF7GJ.js";
16
17
  import "./chunk-TW7KYJQ6.js";
17
18
  import "./chunk-463H6B56.js";
18
19
  import "./chunk-GNPFWISJ.js";
20
+ import "./chunk-MLKGABMK.js";
19
21
 
20
22
  // src/preact.ts
21
23
  import { h, render } from "preact";
package/dist/prefetch.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  resolveEntry
3
- } from "./chunk-6T25WKNK.js";
4
- import "./chunk-KU6HF2EW.js";
3
+ } from "./chunk-EVVYV5ED.js";
4
+ import "./chunk-MGG5BW3U.js";
5
+ import "./chunk-SC2KF7GJ.js";
5
6
  import {
6
7
  addLink
7
8
  } from "./chunk-TW7KYJQ6.js";
@@ -9,6 +10,7 @@ import "./chunk-463H6B56.js";
9
10
  import {
10
11
  protocol
11
12
  } from "./chunk-GNPFWISJ.js";
13
+ import "./chunk-MLKGABMK.js";
12
14
 
13
15
  // src/core/markov.ts
14
16
  var LIMITS = { routes: 50, next: 10, remotes: 8, total: 1e3, key: 200 };
@@ -151,7 +153,7 @@ function modulepreload(href) {
151
153
  }
152
154
  async function verifiedOnly(r) {
153
155
  const b = r.split ?? { entry: r.entry, chunks: [], sri: { [r.entry]: r.integrity }, priority: "low" };
154
- const { verified } = await import("./sri-TBZ6PYYY.js");
156
+ const { verified } = await import("./sri-LQBLQMG5.js");
155
157
  const url = await verified(b);
156
158
  if (!url) await Promise.all([...b.chunks, b.entry].map(heat));
157
159
  else if (!document.querySelector(`link[rel=modulepreload][href="${CSS.escape(url)}"]`)) await heat(url);
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from 'react';
2
- import { P as Props } from './types-wsKR1gfx.js';
2
+ import { P as Props } from './types-g8WEVD_b.js';
3
3
  import './errors-kjBv6IH_.js';
4
4
 
5
5
  /**
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  RemoteTree
3
3
  } from "./chunk-B2MPYF4M.js";
4
+ import "./chunk-MLKGABMK.js";
4
5
 
5
6
  // src/react-server.tsx
6
7
  import { renderToString } from "react-dom/server";
package/dist/react.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { ReactNode, ComponentType } from 'react';
2
2
  import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
3
3
  import * as JSXRuntime from 'react/jsx-runtime';
4
- import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared, R as RemoteContext } from './types-wsKR1gfx.js';
5
- export { E as EventBus } from './types-wsKR1gfx.js';
6
- import { P as PreloadOptions } from './loader-BIXjuvvp.js';
7
- export { e as events } from './events-Cieg_far.js';
4
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared, R as RemoteContext } from './types-g8WEVD_b.js';
5
+ export { E as EventBus } from './types-g8WEVD_b.js';
6
+ import { P as PreloadOptions } from './loader-CLRMRRFv.js';
7
+ export { e as events } from './events-CWdYSrkz.js';
8
8
  import './errors-kjBv6IH_.js';
9
9
 
10
10
  /**
package/dist/react.js CHANGED
@@ -8,18 +8,20 @@ import {
8
8
  usePortalContainer,
9
9
  useShared,
10
10
  useVitral
11
- } from "./chunk-JKNTXBZH.js";
11
+ } from "./chunk-FOEXP52G.js";
12
12
  import "./chunk-B2MPYF4M.js";
13
- import "./chunk-ZJ4IM2PZ.js";
14
- import "./chunk-NTXMEZIZ.js";
13
+ import "./chunk-WAU6OKK3.js";
14
+ import "./chunk-VTGHPX4J.js";
15
15
  import {
16
16
  events
17
17
  } from "./chunk-EQZOJU3B.js";
18
- import "./chunk-6T25WKNK.js";
19
- import "./chunk-KU6HF2EW.js";
18
+ import "./chunk-EVVYV5ED.js";
19
+ import "./chunk-MGG5BW3U.js";
20
+ import "./chunk-SC2KF7GJ.js";
20
21
  import "./chunk-TW7KYJQ6.js";
21
22
  import "./chunk-463H6B56.js";
22
23
  import "./chunk-GNPFWISJ.js";
24
+ import "./chunk-MLKGABMK.js";
23
25
  export {
24
26
  Remote,
25
27
  events,
@@ -1,15 +1,16 @@
1
+ import {
2
+ splitName
3
+ } from "./chunk-QINOFHG6.js";
1
4
  import {
2
5
  verifyIntegrity
3
6
  } from "./chunk-UYOPJ4XQ.js";
4
- import {
5
- splitName
6
- } from "./chunk-PQXS2UDM.js";
7
7
  import {
8
8
  resolveEntry
9
- } from "./chunk-6T25WKNK.js";
9
+ } from "./chunk-EVVYV5ED.js";
10
+ import "./chunk-MGG5BW3U.js";
10
11
  import {
11
12
  prefetchCss
12
- } from "./chunk-KU6HF2EW.js";
13
+ } from "./chunk-SC2KF7GJ.js";
13
14
  import {
14
15
  fetchBytes,
15
16
  metric,
@@ -24,6 +25,7 @@ import {
24
25
  import {
25
26
  protocol
26
27
  } from "./chunk-GNPFWISJ.js";
28
+ import "./chunk-MLKGABMK.js";
27
29
 
28
30
  // src/core/reframe.ts
29
31
  var REFRAME_SCRIPT = "window.__vitral=function(u){return import(u)}";
@@ -60,7 +62,7 @@ async function load(name, _isolate, priority) {
60
62
  return b;
61
63
  });
62
64
  const url = bytes ? URL.createObjectURL(new Blob([bytes], { type: "text/javascript" })) : r.entry;
63
- const { registryFor } = await import("./shadow-S4SKHTA7.js");
65
+ const { registryFor } = await import("./shadow-PZGQKUA4.js");
64
66
  realm = createRealm(r.name ?? name, registryFor(r.name ?? name));
65
67
  let ns;
66
68
  try {
package/dist/routes.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { R as Routes, a as RouteMatch } from './match-CMBM_jLW.js';
2
- import { P as Props } from './types-wsKR1gfx.js';
3
- import { S as SlotStatus } from './slot-Dhczjs1E.js';
2
+ import { P as Props } from './types-g8WEVD_b.js';
3
+ import { S as SlotStatus } from './slot-DRYmGvvV.js';
4
4
  import './errors-kjBv6IH_.js';
5
5
 
6
6
  interface RoutesOptions {
package/dist/routes.js CHANGED
@@ -3,17 +3,19 @@ import {
3
3
  } from "./chunk-OVVGVPIV.js";
4
4
  import {
5
5
  createSlot
6
- } from "./chunk-NTXMEZIZ.js";
6
+ } from "./chunk-VTGHPX4J.js";
7
7
  import {
8
8
  navigate
9
9
  } from "./chunk-EQZOJU3B.js";
10
10
  import {
11
11
  warmSsr
12
- } from "./chunk-6T25WKNK.js";
13
- import "./chunk-KU6HF2EW.js";
12
+ } from "./chunk-EVVYV5ED.js";
13
+ import "./chunk-MGG5BW3U.js";
14
+ import "./chunk-SC2KF7GJ.js";
14
15
  import "./chunk-TW7KYJQ6.js";
15
16
  import "./chunk-463H6B56.js";
16
17
  import "./chunk-GNPFWISJ.js";
18
+ import "./chunk-MLKGABMK.js";
17
19
 
18
20
  // src/routes.ts
19
21
  var table = {};
@@ -117,7 +119,7 @@ var VitralOutletElement = class extends Base {
117
119
  if (ssr?.getAttribute("data-vitral-slot") === name) {
118
120
  this.#status("loading", null);
119
121
  warmSsr(ssr);
120
- import("./hydrate-6NE4MYOD.js").then((m) => {
122
+ import("./hydrate-IVQNHOP3.js").then((m) => {
121
123
  if (this.#route === name && !this.#slot) this.#slot = m.hydrateSlot(this, ssr, { ...options, props: this.#props });
122
124
  else ssr.remove();
123
125
  });
package/dist/sentry.js CHANGED
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/sentry.ts
2
4
  function sentryOnError(sentry) {
3
5
  return (error) => {
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  fetchCssText,
3
3
  injectCss
4
- } from "./chunk-KU6HF2EW.js";
4
+ } from "./chunk-SC2KF7GJ.js";
5
5
  import "./chunk-TW7KYJQ6.js";
6
6
  import "./chunk-463H6B56.js";
7
7
  import "./chunk-GNPFWISJ.js";
8
+ import "./chunk-MLKGABMK.js";
8
9
 
9
10
  // src/core/shadow.ts
10
11
  var sheets = /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- import { P as Props, a as RemoteModule } from './types-wsKR1gfx.js';
1
+ import { P as Props, a as RemoteModule } from './types-g8WEVD_b.js';
2
2
  import './errors-kjBv6IH_.js';
3
3
 
4
4
  /**
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/single-spa.ts
2
4
  async function run(fns, props) {
3
5
  for (const fn of [fns ?? []].flat()) await fn(props);
@@ -1,5 +1,5 @@
1
1
  import { R as RemoteError } from './errors-kjBv6IH_.js';
2
- import { P as Props, I as Isolation, d as StyleOptions } from './types-wsKR1gfx.js';
2
+ import { P as Props, I as Isolation, d as StyleOptions } from './types-g8WEVD_b.js';
3
3
 
4
4
  type SlotStatus = 'loading' | 'ready' | 'error';
5
5
  interface SlotOptions<P extends Props = Props> {
package/dist/solid.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { JSX, Component, Accessor } from 'solid-js';
2
- import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-wsKR1gfx.js';
3
- export { R as RemoteContext } from './types-wsKR1gfx.js';
2
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-g8WEVD_b.js';
3
+ export { R as RemoteContext } from './types-g8WEVD_b.js';
4
4
  import { R as RemoteError } from './errors-kjBv6IH_.js';
5
- export { e as events } from './events-Cieg_far.js';
5
+ export { e as events } from './events-CWdYSrkz.js';
6
6
  export { n as navigate } from './navigate-BRG1WJUM.js';
7
7
  import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
8
8
 
package/dist/solid.js CHANGED
@@ -1,21 +1,23 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-ZJ4IM2PZ.js";
3
+ } from "./chunk-WAU6OKK3.js";
4
4
  import {
5
5
  defineRemote,
6
6
  memoSelect,
7
7
  same,
8
8
  shared
9
- } from "./chunk-NTXMEZIZ.js";
9
+ } from "./chunk-VTGHPX4J.js";
10
10
  import {
11
11
  events,
12
12
  navigate
13
13
  } from "./chunk-EQZOJU3B.js";
14
- import "./chunk-6T25WKNK.js";
15
- import "./chunk-KU6HF2EW.js";
14
+ import "./chunk-EVVYV5ED.js";
15
+ import "./chunk-MGG5BW3U.js";
16
+ import "./chunk-SC2KF7GJ.js";
16
17
  import "./chunk-TW7KYJQ6.js";
17
18
  import "./chunk-463H6B56.js";
18
19
  import "./chunk-GNPFWISJ.js";
20
+ import "./chunk-MLKGABMK.js";
19
21
 
20
22
  // src/solid.ts
21
23
  import { createComponent, createEffect, createSignal, getOwner, mergeProps, on, onCleanup, onMount } from "solid-js";
@@ -0,0 +1,14 @@
1
+ import {
2
+ importVerified,
3
+ verified
4
+ } from "./chunk-VK6W7KHM.js";
5
+ import "./chunk-UYOPJ4XQ.js";
6
+ import "./chunk-MGG5BW3U.js";
7
+ import "./chunk-TW7KYJQ6.js";
8
+ import "./chunk-463H6B56.js";
9
+ import "./chunk-GNPFWISJ.js";
10
+ import "./chunk-MLKGABMK.js";
11
+ export {
12
+ importVerified,
13
+ verified
14
+ };
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/core/stale.ts
2
4
  function stale(url, fresh, maxStale) {
3
5
  const key = "vitral:manifest:" + url;
package/dist/svelte.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Component } from 'svelte';
2
- import { P as Props, I as Isolation, a as RemoteModule } from './types-wsKR1gfx.js';
3
- export { R as RemoteContext } from './types-wsKR1gfx.js';
2
+ import { P as Props, I as Isolation, a as RemoteModule } from './types-g8WEVD_b.js';
3
+ export { R as RemoteContext } from './types-g8WEVD_b.js';
4
4
  import { R as RemoteError } from './errors-kjBv6IH_.js';
5
- import { S as SlotStatus } from './slot-Dhczjs1E.js';
6
- export { e as events } from './events-Cieg_far.js';
5
+ import { S as SlotStatus } from './slot-DRYmGvvV.js';
6
+ export { e as events } from './events-CWdYSrkz.js';
7
7
  export { n as navigate } from './navigate-BRG1WJUM.js';
8
8
  import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
9
9
 
package/dist/svelte.js CHANGED
@@ -1,18 +1,20 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-ZJ4IM2PZ.js";
3
+ } from "./chunk-WAU6OKK3.js";
4
4
  import {
5
5
  defineRemote
6
- } from "./chunk-NTXMEZIZ.js";
6
+ } from "./chunk-VTGHPX4J.js";
7
7
  import {
8
8
  events,
9
9
  navigate
10
10
  } from "./chunk-EQZOJU3B.js";
11
- import "./chunk-6T25WKNK.js";
12
- import "./chunk-KU6HF2EW.js";
11
+ import "./chunk-EVVYV5ED.js";
12
+ import "./chunk-MGG5BW3U.js";
13
+ import "./chunk-SC2KF7GJ.js";
13
14
  import "./chunk-TW7KYJQ6.js";
14
15
  import "./chunk-463H6B56.js";
15
16
  import "./chunk-GNPFWISJ.js";
17
+ import "./chunk-MLKGABMK.js";
16
18
 
17
19
  // src/svelte.ts
18
20
  import { createClassComponent } from "svelte/legacy";
package/dist/sw.js CHANGED
@@ -1,3 +1,5 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
1
3
  // src/sw.ts
2
4
  async function remoteFiles(manifestUrl, init) {
3
5
  const base = new URL(manifestUrl, globalThis.location?.href);
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as Props, R as RemoteContext, a as RemoteModule } from './types-wsKR1gfx.js';
1
+ import { P as Props, R as RemoteContext, a as RemoteModule } from './types-g8WEVD_b.js';
2
2
  export { r as resetVitral } from './state-BDdCwc21.js';
3
3
  import './errors-kjBv6IH_.js';
4
4
 
package/dist/testing.js CHANGED
@@ -4,18 +4,20 @@ import {
4
4
  harness,
5
5
  verify
6
6
  } from "./chunk-DAESKNQ6.js";
7
- import "./chunk-NTXMEZIZ.js";
7
+ import "./chunk-VTGHPX4J.js";
8
8
  import "./chunk-EQZOJU3B.js";
9
9
  import {
10
10
  register
11
- } from "./chunk-6T25WKNK.js";
12
- import "./chunk-KU6HF2EW.js";
11
+ } from "./chunk-EVVYV5ED.js";
12
+ import "./chunk-MGG5BW3U.js";
13
+ import "./chunk-SC2KF7GJ.js";
13
14
  import "./chunk-TW7KYJQ6.js";
14
15
  import "./chunk-463H6B56.js";
15
16
  import {
16
17
  protocol,
17
18
  resetProtocol
18
19
  } from "./chunk-GNPFWISJ.js";
20
+ import "./chunk-MLKGABMK.js";
19
21
 
20
22
  // src/recorder.ts
21
23
  function record(options = {}) {
@@ -421,6 +421,8 @@ interface RemoteManifest {
421
421
  version: string;
422
422
  file: string;
423
423
  chunks?: string[];
424
+ /** Nomes que o remote lê de cada especificador do grupo (o host pode oferecer só esses). */
425
+ uses?: Record<string, string[]>;
424
426
  }[];
425
427
  /** O que o remote declara para o host conferir antes de montar. */
426
428
  contract?: RemoteContract;
package/dist/vitals.js CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  mounted
3
3
  } from "./chunk-463H6B56.js";
4
4
  import "./chunk-GNPFWISJ.js";
5
+ import "./chunk-MLKGABMK.js";
5
6
 
6
7
  // src/vitals.ts
7
8
  var LIMITS = {
package/dist/vite.js CHANGED
@@ -2,12 +2,14 @@ import {
2
2
  BOOT,
3
3
  dedupeHooks,
4
4
  dedupeIds,
5
- groups
6
- } from "./chunk-P5JSFGPI.js";
5
+ groups,
6
+ usedNames
7
+ } from "./chunk-5OM6KOCP.js";
7
8
  import {
8
9
  extractProps,
9
10
  typesFile
10
11
  } from "./chunk-PY7P5BF4.js";
12
+ import "./chunk-MLKGABMK.js";
11
13
 
12
14
  // src/vite.ts
13
15
  import { createHash as createHash3 } from "crypto";
@@ -94,7 +96,8 @@ function collect(outDir, bundle) {
94
96
  for (const d of [...byName.get(n)?.imports ?? [], ...live.get(n)]) if (byName.has(d) && !ownFiles.has(d) && !app.has(d)) app.add(d), stack.push(d);
95
97
  }
96
98
  const lazy = [...app].filter((n) => n !== entry && !soon.has(n));
97
- return { entry, chunks: [...soon], files: [...used], own, lazy };
99
+ const uses = usedNames([...app, entry].flatMap((n) => Object.entries(byName.get(n)?.modules ?? {})));
100
+ return { entry, chunks: [...soon], files: [...used], own, lazy, uses };
98
101
  }
99
102
  function rewrite(file, c, byName, deps) {
100
103
  const targets = c.dynamicImports.filter((d) => byName.has(d));
@@ -127,7 +130,10 @@ ${helper()}${code.slice(at)}`;
127
130
  function withSplit(m, outDir, s, groups2 = []) {
128
131
  const files = {};
129
132
  for (const f of [m.entry, ...m.css ?? [], ...m.shadow?.css ?? [], ...m.shadow?.global ?? [], ...s?.files ?? []]) files[f] = sri(join(outDir, f));
130
- const dedupe = groups2.filter((g) => s?.own[g.name]).map(({ name, range, version }) => ({ name, range, version, ...s.own[name] }));
133
+ const dedupe = groups2.filter((g) => s?.own[g.name]).map(({ name, range, version, keys }) => {
134
+ const uses = Object.fromEntries(keys.filter((k) => s.uses[k]).map((k) => [k, s.uses[k]]));
135
+ return { name, range, version, ...s.own[name], uses };
136
+ });
131
137
  if (s) for (const [file, code] of PROBES) writeFileSync(join(outDir, file), code);
132
138
  return { ...m, files, ...s && { split: { entry: s.entry, chunks: s.chunks, ...s.lazy.length && { lazy: s.lazy } }, probe: PROBES.map(([f]) => f) }, ...dedupe.length && { dedupe } };
133
139
  }
package/dist/vue.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType, App, ShallowRef, WritableComputedRef, ComputedRef, Component } from 'vue';
3
- import { P as Props, I as Isolation, R as RemoteContext, S as Shared, a as RemoteModule } from './types-wsKR1gfx.js';
4
- export { e as events } from './events-Cieg_far.js';
3
+ import { P as Props, I as Isolation, R as RemoteContext, S as Shared, a as RemoteModule } from './types-g8WEVD_b.js';
4
+ export { e as events } from './events-CWdYSrkz.js';
5
5
  import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
6
6
  import './errors-kjBv6IH_.js';
7
7
 
@@ -127,8 +127,8 @@ declare const VitralRemote: vue.DefineComponent<vue.ExtractPropTypes<{
127
127
  onError?: ((...args: any[]) => any) | undefined;
128
128
  onReady?: ((...args: any[]) => any) | undefined;
129
129
  }>, {
130
- isolate: Isolation;
131
130
  name: string;
131
+ isolate: Isolation;
132
132
  priority: RequestPriority;
133
133
  loading: Loading;
134
134
  src: string;
package/dist/vue.js CHANGED
@@ -1,23 +1,25 @@
1
1
  import {
2
2
  hostSlot,
3
3
  timings
4
- } from "./chunk-ZJ4IM2PZ.js";
4
+ } from "./chunk-WAU6OKK3.js";
5
5
  import {
6
6
  defineRemote,
7
7
  memoSelect,
8
8
  same,
9
9
  shared
10
- } from "./chunk-NTXMEZIZ.js";
10
+ } from "./chunk-VTGHPX4J.js";
11
11
  import {
12
12
  events
13
13
  } from "./chunk-EQZOJU3B.js";
14
- import "./chunk-6T25WKNK.js";
15
- import "./chunk-KU6HF2EW.js";
14
+ import "./chunk-EVVYV5ED.js";
15
+ import "./chunk-MGG5BW3U.js";
16
+ import "./chunk-SC2KF7GJ.js";
16
17
  import {
17
18
  absolute
18
19
  } from "./chunk-TW7KYJQ6.js";
19
20
  import "./chunk-463H6B56.js";
20
21
  import "./chunk-GNPFWISJ.js";
22
+ import "./chunk-MLKGABMK.js";
21
23
 
22
24
  // src/vue.ts
23
25
  import {