vitral 0.13.2 → 0.14.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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/angular.d.ts +2 -2
  3. package/dist/angular.js +11 -10
  4. package/dist/auto.js +16 -10
  5. package/dist/{capture-2I5IQ2C2.js → capture-5TUYE67Q.js} +3 -2
  6. package/dist/{channel-BHOVSU5X.js → channel-LW7J2VLA.js} +7 -4
  7. package/dist/{chunk-UCFOXMOR.js → chunk-24GEJNHQ.js} +6 -3
  8. package/dist/{chunk-LITYI5X7.js → chunk-3VYMK53Z.js} +4 -4
  9. package/dist/{chunk-YDO7SPF4.js → chunk-6EFYG6N7.js} +4 -4
  10. package/dist/{chunk-DSOK3BNO.js → chunk-7VQLAFIO.js} +45 -14
  11. package/dist/{chunk-6XXPGS5Q.js → chunk-GAVXPS5X.js} +33 -24
  12. package/dist/{chunk-GB3J6I2T.js → chunk-JRZ7FNAE.js} +10 -8
  13. package/dist/{chunk-B7LKO4HS.js → chunk-KA2SH4FH.js} +7 -4
  14. package/dist/chunk-M7AYWO4W.js +13 -0
  15. package/dist/{chunk-VDVVEGAO.js → chunk-NDB5GJMS.js} +9 -6
  16. package/dist/{chunk-54CBIZES.js → chunk-P2RSLXEB.js} +16 -4
  17. package/dist/{chunk-OKXLOMAG.js → chunk-PHVXXDWT.js} +1 -1
  18. package/dist/{chunk-5JNG3OG5.js → chunk-QIGE3XYA.js} +2 -2
  19. package/dist/{chunk-EQZOJU3B.js → chunk-RKYDVK2P.js} +1 -1
  20. package/dist/{chunk-BQGVAXFM.js → chunk-U4QBQQQJ.js} +7 -3
  21. package/dist/{chunk-F5USJIBT.js → chunk-UMSDTGTI.js} +16 -12
  22. package/dist/{chunk-GNPFWISJ.js → chunk-VKY4TKRT.js} +13 -2
  23. package/dist/{chunk-SQ46TAP4.js → chunk-YF7HTZMX.js} +8 -5
  24. package/dist/cli.js +5 -5
  25. package/dist/contract-YNLXHJL7.js +97 -0
  26. package/dist/devtools.js +2 -2
  27. package/dist/edge.d.ts +1 -1
  28. package/dist/element.d.ts +2 -2
  29. package/dist/element.js +11 -10
  30. package/dist/embed.js +2 -2
  31. package/dist/{events-XXC4si92.d.ts → events-C7OtGkNT.d.ts} +1 -1
  32. package/dist/expose-ZDAACD24.js +19 -0
  33. package/dist/federation.d.ts +1 -1
  34. package/dist/{hydrate-QPVDJHM7.js → hydrate-GRYEYDGZ.js} +13 -10
  35. package/dist/{i18n-TMQBOCPP.js → i18n-S5XJHITJ.js} +6 -5
  36. package/dist/i18n.d.ts +1 -10
  37. package/dist/i18n.js +6 -5
  38. package/dist/iframe.js +15 -12
  39. package/dist/index.d.ts +14 -6
  40. package/dist/index.js +11 -8
  41. package/dist/{loader-vj8m2GQU.d.ts → loader-BWTfd89w.d.ts} +1 -1
  42. package/dist/next-config.d.ts +1 -1
  43. package/dist/next-host.d.ts +3 -3
  44. package/dist/next-host.js +14 -13
  45. package/dist/next-server.d.ts +1 -1
  46. package/dist/next.d.ts +1 -1
  47. package/dist/next.js +2 -2
  48. package/dist/{overrides-5BGODLCO.js → overrides-VDR33GS7.js} +2 -2
  49. package/dist/preact.d.ts +4 -4
  50. package/dist/preact.js +12 -10
  51. package/dist/prefetch.js +8 -7
  52. package/dist/react-server.d.ts +1 -1
  53. package/dist/react.d.ts +4 -4
  54. package/dist/react.js +11 -10
  55. package/dist/{reframe-IV36WJRO.js → reframe-SQLGQC6U.js} +19 -16
  56. package/dist/routes.d.ts +2 -2
  57. package/dist/routes.js +10 -9
  58. package/dist/{shadow-ABRO7JNY.js → shadow-H3CCEKCL.js} +5 -4
  59. package/dist/single-spa.d.ts +1 -1
  60. package/dist/{slot-CxhuVuka.d.ts → slot-BNPG3hc0.d.ts} +1 -1
  61. package/dist/snapshot.js +1 -1
  62. package/dist/solid.d.ts +3 -3
  63. package/dist/solid.js +14 -11
  64. package/dist/sri-XXWEYDFN.js +18 -0
  65. package/dist/svelte.d.ts +4 -4
  66. package/dist/svelte.js +10 -9
  67. package/dist/sw.d.ts +1 -1
  68. package/dist/testing.d.ts +1 -1
  69. package/dist/testing.js +9 -8
  70. package/dist/{types-cSsvpvgE.d.ts → types-L-qRmgLw.d.ts} +29 -2
  71. package/dist/vitals.js +3 -2
  72. package/dist/vite.js +1 -0
  73. package/dist/vue.d.ts +5 -5
  74. package/dist/vue.js +12 -10
  75. package/package.json +21 -21
  76. package/dist/contract-3JY7SOGQ.js +0 -18
  77. package/dist/expose-4CIS6AKL.js +0 -18
  78. package/dist/sri-Z5U32IR2.js +0 -17
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>, "src" | "loading" | "width" | "height"> & {
122
122
  src: string | StaticImage;
123
123
  alt: string;
124
124
  width?: number | string;
package/dist/next.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  navigate
4
- } from "./chunk-EQZOJU3B.js";
5
- import "./chunk-GNPFWISJ.js";
4
+ } from "./chunk-RKYDVK2P.js";
5
+ import "./chunk-VKY4TKRT.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
 
8
8
  // src/next.tsx
@@ -10,8 +10,8 @@ import {
10
10
  resolveOverride,
11
11
  storeOverride,
12
12
  storedOverrides
13
- } from "./chunk-54CBIZES.js";
14
- import "./chunk-GNPFWISJ.js";
13
+ } from "./chunk-P2RSLXEB.js";
14
+ import "./chunk-VKY4TKRT.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  OVERRIDES_KEY,
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-cSsvpvgE.js';
4
- export { R as RemoteContext } from './types-cSsvpvgE.js';
3
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-L-qRmgLw.js';
4
+ export { R as RemoteContext } from './types-L-qRmgLw.js';
5
5
  import { R as RemoteError } from './errors-kjBv6IH_.js';
6
- import { S as SlotStatus } from './slot-CxhuVuka.js';
7
- export { e as events } from './events-XXC4si92.js';
6
+ import { S as SlotStatus } from './slot-BNPG3hc0.js';
7
+ export { e as events } from './events-C7OtGkNT.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,25 +1,27 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-5JNG3OG5.js";
3
+ } from "./chunk-QIGE3XYA.js";
4
4
  import {
5
5
  defineRemote,
6
6
  memoSelect,
7
+ messages,
7
8
  same,
8
9
  shared
9
- } from "./chunk-DSOK3BNO.js";
10
- import "./chunk-6XXPGS5Q.js";
11
- import "./chunk-OKXLOMAG.js";
12
- import "./chunk-YDO7SPF4.js";
13
- import "./chunk-VDVVEGAO.js";
14
- import "./chunk-BQGVAXFM.js";
10
+ } from "./chunk-7VQLAFIO.js";
11
+ import "./chunk-GAVXPS5X.js";
12
+ import "./chunk-PHVXXDWT.js";
13
+ import "./chunk-6EFYG6N7.js";
14
+ import "./chunk-NDB5GJMS.js";
15
+ import "./chunk-U4QBQQQJ.js";
16
+ import "./chunk-M7AYWO4W.js";
15
17
  import "./chunk-JWDDXX5O.js";
16
18
  import "./chunk-2Z4OH3BP.js";
17
19
  import "./chunk-4E33RZMM.js";
18
20
  import {
19
21
  events,
20
22
  navigate
21
- } from "./chunk-EQZOJU3B.js";
22
- import "./chunk-GNPFWISJ.js";
23
+ } from "./chunk-RKYDVK2P.js";
24
+ import "./chunk-VKY4TKRT.js";
23
25
  import "./chunk-MLKGABMK.js";
24
26
 
25
27
  // src/preact.ts
@@ -47,7 +49,7 @@ function Remote({ name, src, props, isolate, fallback = null, error = null, load
47
49
  const retry = () => slot.current?.retry();
48
50
  return h("div", { "data-vitral": name ?? src, "data-vitral-status": state.status, class: rest.class }, [
49
51
  state.status === "loading" ? fallback : null,
50
- state.status === "error" && state.error ? error === void 0 ? h("div", { role: "alert", "data-vitral-default": "error" }, ["N\xE3o foi poss\xEDvel carregar. ", h("button", { type: "button", onClick: retry }, "Tentar de novo")]) : typeof error === "function" ? error(state.error, retry) : error : null,
52
+ state.status === "error" && state.error ? error === void 0 ? h("div", { role: "alert", "data-vitral-default": "error" }, [messages().error + " ", h("button", { type: "button", onClick: retry }, messages().retry)]) : typeof error === "function" ? error(state.error, retry) : error : null,
51
53
  // O Preact nunca coloca filhos neste div: ele pertence ao remote.
52
54
  h("div", { ref })
53
55
  ]);
package/dist/prefetch.js CHANGED
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  policy,
3
3
  resolveEntry
4
- } from "./chunk-6XXPGS5Q.js";
5
- import "./chunk-OKXLOMAG.js";
6
- import "./chunk-YDO7SPF4.js";
4
+ } from "./chunk-GAVXPS5X.js";
5
+ import "./chunk-PHVXXDWT.js";
6
+ import "./chunk-6EFYG6N7.js";
7
7
  import {
8
8
  addLink
9
- } from "./chunk-VDVVEGAO.js";
10
- import "./chunk-BQGVAXFM.js";
9
+ } from "./chunk-NDB5GJMS.js";
10
+ import "./chunk-U4QBQQQJ.js";
11
+ import "./chunk-M7AYWO4W.js";
11
12
  import "./chunk-JWDDXX5O.js";
12
13
  import {
13
14
  protocol
14
- } from "./chunk-GNPFWISJ.js";
15
+ } from "./chunk-VKY4TKRT.js";
15
16
  import "./chunk-MLKGABMK.js";
16
17
 
17
18
  // src/core/markov.ts
@@ -222,7 +223,7 @@ function modulepreload(href) {
222
223
  }
223
224
  async function verifiedOnly(r) {
224
225
  const b = r.split ?? { entry: r.entry, chunks: [], sri: { [r.entry]: r.integrity }, priority: "low" };
225
- const { verified } = await import("./sri-Z5U32IR2.js");
226
+ const { verified } = await import("./sri-XXWEYDFN.js");
226
227
  const url = await verified(b);
227
228
  if (!url) await Promise.all([...b.chunks, b.entry].map(heat));
228
229
  else if (!document.querySelector(`link[rel=modulepreload][href="${CSS.escape(url)}"]`)) await heat(url);
@@ -1,6 +1,6 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { S as ServerRendered } from './ssr-markup-BCPpGmss.js';
3
- import { P as Props } from './types-cSsvpvgE.js';
3
+ import { P as Props } from './types-L-qRmgLw.js';
4
4
  import './errors-kjBv6IH_.js';
5
5
 
6
6
  /**
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-cSsvpvgE.js';
5
- export { E as EventBus } from './types-cSsvpvgE.js';
6
- import { P as PreloadOptions } from './loader-vj8m2GQU.js';
7
- export { e as events } from './events-XXC4si92.js';
4
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared, R as RemoteContext } from './types-L-qRmgLw.js';
5
+ export { E as EventBus } from './types-L-qRmgLw.js';
6
+ import { P as PreloadOptions } from './loader-BWTfd89w.js';
7
+ export { e as events } from './events-C7OtGkNT.js';
8
8
  import './errors-kjBv6IH_.js';
9
9
 
10
10
  /**
package/dist/react.js CHANGED
@@ -9,22 +9,23 @@ import {
9
9
  usePortalContainer,
10
10
  useShared,
11
11
  useVitral
12
- } from "./chunk-F5USJIBT.js";
12
+ } from "./chunk-UMSDTGTI.js";
13
13
  import "./chunk-KCF46XOX.js";
14
- import "./chunk-5JNG3OG5.js";
15
- import "./chunk-DSOK3BNO.js";
16
- import "./chunk-6XXPGS5Q.js";
17
- import "./chunk-OKXLOMAG.js";
18
- import "./chunk-YDO7SPF4.js";
19
- import "./chunk-VDVVEGAO.js";
20
- import "./chunk-BQGVAXFM.js";
14
+ import "./chunk-QIGE3XYA.js";
15
+ import "./chunk-7VQLAFIO.js";
16
+ import "./chunk-GAVXPS5X.js";
17
+ import "./chunk-PHVXXDWT.js";
18
+ import "./chunk-6EFYG6N7.js";
19
+ import "./chunk-NDB5GJMS.js";
20
+ import "./chunk-U4QBQQQJ.js";
21
+ import "./chunk-M7AYWO4W.js";
21
22
  import "./chunk-JWDDXX5O.js";
22
23
  import "./chunk-2Z4OH3BP.js";
23
24
  import "./chunk-4E33RZMM.js";
24
25
  import {
25
26
  events
26
- } from "./chunk-EQZOJU3B.js";
27
- import "./chunk-GNPFWISJ.js";
27
+ } from "./chunk-RKYDVK2P.js";
28
+ import "./chunk-VKY4TKRT.js";
28
29
  import "./chunk-MLKGABMK.js";
29
30
  export {
30
31
  Remote,
@@ -1,31 +1,34 @@
1
1
  import {
2
2
  splitName
3
- } from "./chunk-SQ46TAP4.js";
3
+ } from "./chunk-YF7HTZMX.js";
4
4
  import {
5
5
  verifyIntegrity
6
- } from "./chunk-UCFOXMOR.js";
6
+ } from "./chunk-24GEJNHQ.js";
7
7
  import {
8
8
  resolveEntry
9
- } from "./chunk-6XXPGS5Q.js";
10
- import "./chunk-OKXLOMAG.js";
9
+ } from "./chunk-GAVXPS5X.js";
10
+ import "./chunk-PHVXXDWT.js";
11
11
  import {
12
12
  prefetchCss
13
- } from "./chunk-YDO7SPF4.js";
13
+ } from "./chunk-6EFYG6N7.js";
14
14
  import {
15
15
  fetchBytes,
16
16
  metric,
17
17
  withRetry,
18
18
  withTimeout
19
- } from "./chunk-VDVVEGAO.js";
19
+ } from "./chunk-NDB5GJMS.js";
20
20
  import {
21
21
  RemoteError,
22
22
  isRemoteError,
23
23
  report
24
- } from "./chunk-BQGVAXFM.js";
24
+ } from "./chunk-U4QBQQQJ.js";
25
+ import {
26
+ tr
27
+ } from "./chunk-M7AYWO4W.js";
25
28
  import "./chunk-JWDDXX5O.js";
26
29
  import {
27
30
  protocol
28
- } from "./chunk-GNPFWISJ.js";
31
+ } from "./chunk-VKY4TKRT.js";
29
32
  import "./chunk-MLKGABMK.js";
30
33
 
31
34
  // src/core/reframe.ts
@@ -48,8 +51,8 @@ async function load(name, _isolate, priority) {
48
51
  let realm;
49
52
  try {
50
53
  const entry = p.entry(remote);
51
- if (!entry) throw new RemoteError("NOT_REGISTERED", name, "remote n\xE3o registrado. Use configure({ remotes }).");
52
- if (!entry.url) throw new RemoteError("MOUNT_FAILED", name, "remote local (module) n\xE3o roda com isolate: 'reframe': registre a URL dele");
54
+ if (!entry) throw new RemoteError("NOT_REGISTERED", name, tr("remote n\xE3o registrado. Use configure({ remotes }).", "remote not registered. Use configure({ remotes })."));
55
+ if (!entry.url) throw new RemoteError("MOUNT_FAILED", name, tr("remote local (module) n\xE3o roda com isolate: 'reframe': registre a URL dele", "a local remote (module) cannot run with isolate: 'reframe': register its URL"));
53
56
  let t = performance.now();
54
57
  const { integrity, ...r } = await resolveEntry(remote, entry, priority);
55
58
  delete r.split;
@@ -63,23 +66,23 @@ async function load(name, _isolate, priority) {
63
66
  return b;
64
67
  });
65
68
  const url = bytes ? URL.createObjectURL(new Blob([bytes], { type: "text/javascript" })) : r.entry;
66
- const { registryFor } = await import("./shadow-ABRO7JNY.js");
69
+ const { registryFor } = await import("./shadow-H3CCEKCL.js");
67
70
  realm = createRealm(r.name ?? name, registryFor(r.name ?? name));
68
71
  let ns;
69
72
  try {
70
73
  ns = await withTimeout(timeout, name, realm.load(url));
71
74
  } catch (e) {
72
- throw isRemoteError(e) ? e : new RemoteError("LOAD_FAILED", name, `falha ao importar ${r.entry}`, e);
75
+ throw isRemoteError(e) ? e : new RemoteError("LOAD_FAILED", name, tr(`falha ao importar ${r.entry}`, `failed to import ${r.entry}`), e);
73
76
  } finally {
74
77
  if (bytes) URL.revokeObjectURL(url);
75
78
  }
76
79
  if (key) {
77
80
  const part = ns?.exposes?.[key];
78
- if (!part) throw new RemoteError("NOT_EXPOSED", name, `${remote} n\xE3o exp\xF5e ${key}`);
81
+ if (!part) throw new RemoteError("NOT_EXPOSED", name, tr(`${remote} n\xE3o exp\xF5e ${key}`, `${remote} does not expose ${key}`));
79
82
  ns = typeof part === "function" ? await part() : part;
80
83
  }
81
84
  const mod = ns?.default ?? ns;
82
- if (typeof mod?.mount != "function") throw new RemoteError("INVALID_MODULE", name, "o m\xF3dulo n\xE3o exporta mount()");
85
+ if (typeof mod?.mount != "function") throw new RemoteError("INVALID_MODULE", name, tr("o m\xF3dulo n\xE3o exporta mount()", "the module does not export mount()"));
83
86
  metric(name, "js", t);
84
87
  const own = realm;
85
88
  return { ...r, module: { mount: (el, props, ctx) => own.mount(mod, el, props, ctx) } };
@@ -89,7 +92,7 @@ async function load(name, _isolate, priority) {
89
92
  }
90
93
  }
91
94
  function noFrames(_target, name) {
92
- return Promise.reject(new RemoteError("MOUNT_FAILED", name, 'isolate="iframe" precisa de enableIframe(), de vitral/iframe'));
95
+ return Promise.reject(new RemoteError("MOUNT_FAILED", name, tr('isolate="iframe" precisa de enableIframe(), de vitral/iframe', 'isolate="iframe" needs enableIframe(), from vitral/iframe')));
93
96
  }
94
97
  function createRealm(name, registry) {
95
98
  const host = document;
@@ -216,7 +219,7 @@ function createRealm(name, registry) {
216
219
  };
217
220
  return {
218
221
  load: (url) => {
219
- if (!load2) throw new RemoteError("LOAD_FAILED", name, "a CSP bloqueou o script do iframe do isolate: 'reframe' (libere o hash de REFRAME_SCRIPT ou use nonce)");
222
+ if (!load2) throw new RemoteError("LOAD_FAILED", name, tr("a CSP bloqueou o script do iframe do isolate: 'reframe' (libere o hash de REFRAME_SCRIPT ou use nonce)", "the CSP blocked the iframe script of isolate: 'reframe' (allow the REFRAME_SCRIPT hash or use a nonce)"));
220
223
  return load2(url);
221
224
  },
222
225
  async mount(mod, el, props, c) {
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-cSsvpvgE.js';
3
- import { S as SlotStatus } from './slot-CxhuVuka.js';
2
+ import { P as Props } from './types-L-qRmgLw.js';
3
+ import { S as SlotStatus } from './slot-BNPG3hc0.js';
4
4
  import './errors-kjBv6IH_.js';
5
5
 
6
6
  interface RoutesOptions {
package/dist/routes.js CHANGED
@@ -3,21 +3,22 @@ import {
3
3
  } from "./chunk-OVVGVPIV.js";
4
4
  import {
5
5
  createSlot
6
- } from "./chunk-DSOK3BNO.js";
6
+ } from "./chunk-7VQLAFIO.js";
7
7
  import {
8
8
  warmSsr
9
- } from "./chunk-6XXPGS5Q.js";
10
- import "./chunk-OKXLOMAG.js";
11
- import "./chunk-YDO7SPF4.js";
12
- import "./chunk-VDVVEGAO.js";
13
- import "./chunk-BQGVAXFM.js";
9
+ } from "./chunk-GAVXPS5X.js";
10
+ import "./chunk-PHVXXDWT.js";
11
+ import "./chunk-6EFYG6N7.js";
12
+ import "./chunk-NDB5GJMS.js";
13
+ import "./chunk-U4QBQQQJ.js";
14
+ import "./chunk-M7AYWO4W.js";
14
15
  import "./chunk-JWDDXX5O.js";
15
16
  import "./chunk-2Z4OH3BP.js";
16
17
  import "./chunk-4E33RZMM.js";
17
18
  import {
18
19
  navigate
19
- } from "./chunk-EQZOJU3B.js";
20
- import "./chunk-GNPFWISJ.js";
20
+ } from "./chunk-RKYDVK2P.js";
21
+ import "./chunk-VKY4TKRT.js";
21
22
  import "./chunk-MLKGABMK.js";
22
23
 
23
24
  // src/routes.ts
@@ -122,7 +123,7 @@ var VitralOutletElement = class extends Base {
122
123
  if (ssr?.getAttribute("data-vitral-slot") === name) {
123
124
  this.#status("loading", null);
124
125
  warmSsr(ssr);
125
- import("./hydrate-QPVDJHM7.js").then((m) => {
126
+ import("./hydrate-GRYEYDGZ.js").then((m) => {
126
127
  if (this.#route === name && !this.#slot) this.#slot = m.hydrateSlot(this, ssr, { ...options, props: this.#props });
127
128
  else ssr.remove();
128
129
  });
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  fetchCssText,
3
3
  injectCss
4
- } from "./chunk-YDO7SPF4.js";
5
- import "./chunk-VDVVEGAO.js";
6
- import "./chunk-BQGVAXFM.js";
4
+ } from "./chunk-6EFYG6N7.js";
5
+ import "./chunk-NDB5GJMS.js";
6
+ import "./chunk-U4QBQQQJ.js";
7
+ import "./chunk-M7AYWO4W.js";
7
8
  import "./chunk-JWDDXX5O.js";
8
- import "./chunk-GNPFWISJ.js";
9
+ import "./chunk-VKY4TKRT.js";
9
10
  import "./chunk-MLKGABMK.js";
10
11
 
11
12
  // src/core/shadow.ts
@@ -1,4 +1,4 @@
1
- import { P as Props, a as RemoteModule } from './types-cSsvpvgE.js';
1
+ import { P as Props, a as RemoteModule } from './types-L-qRmgLw.js';
2
2
  import './errors-kjBv6IH_.js';
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { R as RemoteError } from './errors-kjBv6IH_.js';
2
- import { P as Props, I as Isolation, e as StyleOptions } from './types-cSsvpvgE.js';
2
+ import { P as Props, I as Isolation, e as StyleOptions } from './types-L-qRmgLw.js';
3
3
 
4
4
  type SlotStatus = 'loading' | 'ready' | 'error';
5
5
  interface SlotOptions<P extends Props = Props> {
package/dist/snapshot.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-JWDDXX5O.js";
4
4
  import {
5
5
  protocol
6
- } from "./chunk-GNPFWISJ.js";
6
+ } from "./chunk-VKY4TKRT.js";
7
7
  import "./chunk-MLKGABMK.js";
8
8
 
9
9
  // src/core/snapshot.ts
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-cSsvpvgE.js';
3
- export { R as RemoteContext } from './types-cSsvpvgE.js';
2
+ import { P as Props, I as Isolation, C as CheckedProps, a as RemoteModule, S as Shared } from './types-L-qRmgLw.js';
3
+ export { R as RemoteContext } from './types-L-qRmgLw.js';
4
4
  import { R as RemoteError } from './errors-kjBv6IH_.js';
5
- export { e as events } from './events-XXC4si92.js';
5
+ export { e as events } from './events-C7OtGkNT.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,25 +1,27 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-5JNG3OG5.js";
3
+ } from "./chunk-QIGE3XYA.js";
4
4
  import {
5
5
  defineRemote,
6
6
  memoSelect,
7
+ messages,
7
8
  same,
8
9
  shared
9
- } from "./chunk-DSOK3BNO.js";
10
- import "./chunk-6XXPGS5Q.js";
11
- import "./chunk-OKXLOMAG.js";
12
- import "./chunk-YDO7SPF4.js";
13
- import "./chunk-VDVVEGAO.js";
14
- import "./chunk-BQGVAXFM.js";
10
+ } from "./chunk-7VQLAFIO.js";
11
+ import "./chunk-GAVXPS5X.js";
12
+ import "./chunk-PHVXXDWT.js";
13
+ import "./chunk-6EFYG6N7.js";
14
+ import "./chunk-NDB5GJMS.js";
15
+ import "./chunk-U4QBQQQJ.js";
16
+ import "./chunk-M7AYWO4W.js";
15
17
  import "./chunk-JWDDXX5O.js";
16
18
  import "./chunk-2Z4OH3BP.js";
17
19
  import "./chunk-4E33RZMM.js";
18
20
  import {
19
21
  events,
20
22
  navigate
21
- } from "./chunk-EQZOJU3B.js";
22
- import "./chunk-GNPFWISJ.js";
23
+ } from "./chunk-RKYDVK2P.js";
24
+ import "./chunk-VKY4TKRT.js";
23
25
  import "./chunk-MLKGABMK.js";
24
26
 
25
27
  // src/solid.ts
@@ -80,9 +82,10 @@ function defaultError(retry) {
80
82
  box.setAttribute("data-vitral-default", "error");
81
83
  const button = document.createElement("button");
82
84
  button.type = "button";
83
- button.textContent = "Tentar de novo";
85
+ const m = messages();
86
+ button.textContent = m.retry;
84
87
  button.onclick = retry;
85
- box.append("N\xE3o foi poss\xEDvel carregar. ", button);
88
+ box.append(m.error + " ", button);
86
89
  return box;
87
90
  }
88
91
  function useShared(key, select = same) {
@@ -0,0 +1,18 @@
1
+ import {
2
+ importVerified,
3
+ signature,
4
+ verified
5
+ } from "./chunk-3VYMK53Z.js";
6
+ import "./chunk-24GEJNHQ.js";
7
+ import "./chunk-PHVXXDWT.js";
8
+ import "./chunk-NDB5GJMS.js";
9
+ import "./chunk-U4QBQQQJ.js";
10
+ import "./chunk-M7AYWO4W.js";
11
+ import "./chunk-JWDDXX5O.js";
12
+ import "./chunk-VKY4TKRT.js";
13
+ import "./chunk-MLKGABMK.js";
14
+ export {
15
+ importVerified,
16
+ signature,
17
+ verified
18
+ };
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-cSsvpvgE.js';
3
- export { R as RemoteContext } from './types-cSsvpvgE.js';
2
+ import { P as Props, I as Isolation, a as RemoteModule } from './types-L-qRmgLw.js';
3
+ export { R as RemoteContext } from './types-L-qRmgLw.js';
4
4
  import { R as RemoteError } from './errors-kjBv6IH_.js';
5
- import { S as SlotStatus } from './slot-CxhuVuka.js';
6
- export { e as events } from './events-XXC4si92.js';
5
+ import { S as SlotStatus } from './slot-BNPG3hc0.js';
6
+ export { e as events } from './events-C7OtGkNT.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,22 +1,23 @@
1
1
  import {
2
2
  hostSlot
3
- } from "./chunk-5JNG3OG5.js";
3
+ } from "./chunk-QIGE3XYA.js";
4
4
  import {
5
5
  defineRemote
6
- } from "./chunk-DSOK3BNO.js";
7
- import "./chunk-6XXPGS5Q.js";
8
- import "./chunk-OKXLOMAG.js";
9
- import "./chunk-YDO7SPF4.js";
10
- import "./chunk-VDVVEGAO.js";
11
- import "./chunk-BQGVAXFM.js";
6
+ } from "./chunk-7VQLAFIO.js";
7
+ import "./chunk-GAVXPS5X.js";
8
+ import "./chunk-PHVXXDWT.js";
9
+ import "./chunk-6EFYG6N7.js";
10
+ import "./chunk-NDB5GJMS.js";
11
+ import "./chunk-U4QBQQQJ.js";
12
+ import "./chunk-M7AYWO4W.js";
12
13
  import "./chunk-JWDDXX5O.js";
13
14
  import "./chunk-2Z4OH3BP.js";
14
15
  import "./chunk-4E33RZMM.js";
15
16
  import {
16
17
  events,
17
18
  navigate
18
- } from "./chunk-EQZOJU3B.js";
19
- import "./chunk-GNPFWISJ.js";
19
+ } from "./chunk-RKYDVK2P.js";
20
+ import "./chunk-VKY4TKRT.js";
20
21
  import "./chunk-MLKGABMK.js";
21
22
 
22
23
  // src/svelte.ts
package/dist/sw.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as RemoteManifest } from './types-cSsvpvgE.js';
1
+ import { d as RemoteManifest } from './types-L-qRmgLw.js';
2
2
  import './errors-kjBv6IH_.js';
3
3
 
4
4
  interface FilesOptions {
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as Props, R as RemoteContext, a as RemoteModule } from './types-cSsvpvgE.js';
1
+ import { P as Props, R as RemoteContext, a as RemoteModule } from './types-L-qRmgLw.js';
2
2
  export { r as resetVitral } from './state-B1FJi8I9.js';
3
3
  import './errors-kjBv6IH_.js';
4
4
 
package/dist/testing.js CHANGED
@@ -4,22 +4,23 @@ import {
4
4
  harness,
5
5
  verify
6
6
  } from "./chunk-DAESKNQ6.js";
7
- import "./chunk-DSOK3BNO.js";
7
+ import "./chunk-7VQLAFIO.js";
8
8
  import {
9
9
  register
10
- } from "./chunk-6XXPGS5Q.js";
11
- import "./chunk-OKXLOMAG.js";
12
- import "./chunk-YDO7SPF4.js";
13
- import "./chunk-VDVVEGAO.js";
14
- import "./chunk-BQGVAXFM.js";
10
+ } from "./chunk-GAVXPS5X.js";
11
+ import "./chunk-PHVXXDWT.js";
12
+ import "./chunk-6EFYG6N7.js";
13
+ import "./chunk-NDB5GJMS.js";
14
+ import "./chunk-U4QBQQQJ.js";
15
+ import "./chunk-M7AYWO4W.js";
15
16
  import "./chunk-JWDDXX5O.js";
16
17
  import "./chunk-2Z4OH3BP.js";
17
18
  import "./chunk-4E33RZMM.js";
18
- import "./chunk-EQZOJU3B.js";
19
+ import "./chunk-RKYDVK2P.js";
19
20
  import {
20
21
  protocol,
21
22
  resetProtocol
22
- } from "./chunk-GNPFWISJ.js";
23
+ } from "./chunk-VKY4TKRT.js";
23
24
  import "./chunk-MLKGABMK.js";
24
25
 
25
26
  // src/recorder.ts
@@ -1,5 +1,17 @@
1
1
  import { R as RemoteError } from './errors-kjBv6IH_.js';
2
2
 
3
+ /** Textos da interface padrão (carregando e erro), em `configure({ messages })`. */
4
+ interface Messages {
5
+ /** Enquanto o remote baixa. */
6
+ loading: string;
7
+ /** Quando o remote falha. */
8
+ error: string;
9
+ /** Botão para tentar de novo. */
10
+ retry: string;
11
+ }
12
+ /** Textos da interface padrão, com os de `configure({ messages })` por cima. */
13
+ declare const messages: () => Messages;
14
+
3
15
  /** A cópia de outro remote que um remote usa no lugar da própria. */
4
16
  interface PlannedCopy {
5
17
  /** Faixa e versão da cópia própria que esta substitui (`^1.0.0@1.2.0`): outro deploy do remote não usa o plano. */
@@ -226,6 +238,11 @@ interface RemoteModule<P extends Props = Props> {
226
238
  interface RemoteEntry {
227
239
  /** URL do módulo JS do remote, ou do `vitral.json` gerado pelo plugin. */
228
240
  url?: string;
241
+ /**
242
+ * Interno: URL que veio de dados (`src` em atributo, `registerSrc(…, false)`).
243
+ * A origem dela não entra na allowlist padrão.
244
+ */
245
+ untrusted?: boolean;
229
246
  /**
230
247
  * Remote local, sem rede: o próprio módulo ou uma função que o importa
231
248
  * (ex.: `() => import('./carrinho')`). Útil em monorepos e testes.
@@ -351,7 +368,9 @@ interface VitralConfig {
351
368
  remotes?: Record<string, string | RemoteEntry> | string;
352
369
  /**
353
370
  * Origens de onde é permitido carregar código. Padrão: a própria origem da
354
- * página mais as origens das URLs registradas. Use `['*']` para liberar tudo.
371
+ * página mais as origens das URLs registradas pelo código do host
372
+ * (`configure`, `register`, `src` de componente). O `src` em atributo do
373
+ * `<vitral-remote>` não libera a própria origem. Use `['*']` para liberar tudo.
355
374
  */
356
375
  allowedOrigins?: string[];
357
376
  /** Tempo máximo para baixar um remote, em ms. Padrão 15000. */
@@ -366,6 +385,14 @@ interface VitralConfig {
366
385
  * desligado (sempre revalida).
367
386
  */
368
387
  maxStale?: number;
388
+ /**
389
+ * Língua dos textos da lib (carregando, erro, mensagens de `RemoteError` e
390
+ * link da documentação do erro). Só `'pt'` e `'en'`. Padrão: o `lang` do
391
+ * `<html>`, depois a língua do navegador; fora `pt`, inglês.
392
+ */
393
+ language?: string;
394
+ /** Troca os textos do carregando e do erro padrão (ex.: `{ retry: 'Recarregar' }`). */
395
+ messages?: Partial<Messages>;
369
396
  /** Isolamento padrão para todos os remotes. Padrão `'none'`. */
370
397
  isolate?: Isolation;
371
398
  /**
@@ -579,4 +606,4 @@ interface EventBus {
579
606
  last<T = unknown>(type: string): T | undefined;
580
607
  }
581
608
 
582
- export { policy as A, provide as B, type CheckedProps as C, type DedupePlan as D, type EventBus as E, shared as F, signals as G, type Handler as H, type Isolation as I, signalsFrom as J, type MountedRemote as M, type Props as P, type RemoteContext as R, type Shared as S, type VitralConfig as V, type RemoteModule as a, type SharedModules as b, type RemoteEntry as c, type RemoteManifest as d, type StyleOptions as e, type I18nHost as f, type SharedValue as g, type Channel as h, type ChannelContext as i, type DevOverrides as j, type McpAppBridge as k, type PlannedCopy as l, type Policy as m, type PropsOf as n, type ProvideOptions as o, type ProvidedValue as p, type RemoteContract as q, type RemoteMetric as r, type Remotes as s, type RollbackInfo as t, type SharedApi as u, type SharedType as v, type Signals as w, batch as x, choose as y, planDedupe as z };
609
+ export { messages as A, planDedupe as B, type CheckedProps as C, type DedupePlan as D, type EventBus as E, policy as F, provide as G, type Handler as H, type Isolation as I, shared as J, signals as K, signalsFrom as L, type MountedRemote as M, type Props as P, type RemoteContext as R, type Shared as S, type VitralConfig as V, type RemoteModule as a, type SharedModules as b, type RemoteEntry as c, type RemoteManifest as d, type StyleOptions as e, type I18nHost as f, type SharedValue as g, type Channel as h, type ChannelContext as i, type DevOverrides as j, type McpAppBridge as k, type Messages as l, type PlannedCopy as m, type Policy as n, type PropsOf as o, type ProvideOptions as p, type ProvidedValue as q, type RemoteContract as r, type RemoteMetric as s, type Remotes as t, type RollbackInfo as u, type SharedApi as v, type SharedType as w, type Signals as x, batch as y, choose as z };
package/dist/vitals.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  mounted
3
- } from "./chunk-BQGVAXFM.js";
3
+ } from "./chunk-U4QBQQQJ.js";
4
+ import "./chunk-M7AYWO4W.js";
4
5
  import "./chunk-JWDDXX5O.js";
5
- import "./chunk-GNPFWISJ.js";
6
+ import "./chunk-VKY4TKRT.js";
6
7
  import "./chunk-MLKGABMK.js";
7
8
 
8
9
  // src/vitals.ts