vitral 0.11.5 → 0.12.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.
- package/dist/angular.js +7 -7
- package/dist/auto.js +7 -7
- package/dist/{channel-ABGK26Q5.js → channel-BHOVSU5X.js} +1 -1
- package/dist/{chunk-AL6MLNVY.js → chunk-52D6ZT4A.js} +16 -9
- package/dist/{chunk-6JH2I65O.js → chunk-I7IFR65H.js} +6 -6
- package/dist/{chunk-2SAI6S2H.js → chunk-JKTZODC5.js} +2 -2
- package/dist/{chunk-MICF64AZ.js → chunk-QGAEXUP5.js} +1 -1
- package/dist/{chunk-I3CDUKHO.js → chunk-RGYVSS3X.js} +11 -6
- package/dist/{chunk-SVYL6UCB.js → chunk-UFETTKDP.js} +4 -4
- package/dist/{chunk-SPSAXBPR.js → chunk-VDNFRNOG.js} +25 -8
- package/dist/{chunk-GGMM56TM.js → chunk-VDVVEGAO.js} +7 -0
- package/dist/{chunk-IKCEA3YN.js → chunk-YDO7SPF4.js} +3 -3
- package/dist/{chunk-NQ6ZTGQZ.js → chunk-YKLWMIEH.js} +1 -1
- package/dist/cli.js +22 -3
- package/dist/element.js +7 -7
- package/dist/embed.js +2 -2
- package/dist/{expose-2S3TCXSP.js → expose-KL6TA472.js} +5 -5
- package/dist/{hydrate-FJHHLW5G.js → hydrate-LS3MLFGN.js} +6 -6
- package/dist/iframe.js +6 -6
- package/dist/index.js +5 -5
- package/dist/next-host.d.ts +16 -3
- package/dist/next-host.js +30 -23
- package/dist/preact.d.ts +1 -0
- package/dist/preact.js +7 -7
- package/dist/prefetch.js +5 -5
- package/dist/react.d.ts +5 -1
- package/dist/react.js +7 -7
- package/dist/{reframe-HIYA2TIU.js → reframe-AD2UEPIO.js} +6 -6
- package/dist/{route-4KQITYD4.js → route-CEMWXHJI.js} +19 -1
- package/dist/routes.js +6 -6
- package/dist/{shadow-7ZV4JEO6.js → shadow-ABRO7JNY.js} +2 -2
- package/dist/solid.d.ts +2 -1
- package/dist/solid.js +18 -7
- package/dist/{sri-AMQOKKWR.js → sri-Z5U32IR2.js} +3 -3
- package/dist/svelte.js +6 -6
- package/dist/sw.d.ts +21 -19
- package/dist/sw.js +20 -9
- package/dist/testing.js +5 -5
- package/dist/vite.js +35 -0
- package/dist/vue.js +7 -7
- package/package.json +14 -14
package/dist/routes.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-OVVGVPIV.js";
|
|
4
4
|
import {
|
|
5
5
|
createSlot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I7IFR65H.js";
|
|
7
7
|
import {
|
|
8
8
|
warmSsr
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-52D6ZT4A.js";
|
|
10
|
+
import "./chunk-QGAEXUP5.js";
|
|
11
|
+
import "./chunk-YDO7SPF4.js";
|
|
12
|
+
import "./chunk-VDVVEGAO.js";
|
|
13
13
|
import "./chunk-BQGVAXFM.js";
|
|
14
14
|
import "./chunk-JWDDXX5O.js";
|
|
15
15
|
import "./chunk-2Z4OH3BP.js";
|
|
@@ -122,7 +122,7 @@ var VitralOutletElement = class extends Base {
|
|
|
122
122
|
if (ssr?.getAttribute("data-vitral-slot") === name) {
|
|
123
123
|
this.#status("loading", null);
|
|
124
124
|
warmSsr(ssr);
|
|
125
|
-
import("./hydrate-
|
|
125
|
+
import("./hydrate-LS3MLFGN.js").then((m) => {
|
|
126
126
|
if (this.#route === name && !this.#slot) this.#slot = m.hydrateSlot(this, ssr, { ...options, props: this.#props });
|
|
127
127
|
else ssr.remove();
|
|
128
128
|
});
|
package/dist/solid.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ interface RemoteProps<P extends Props = Props> {
|
|
|
22
22
|
props?: P;
|
|
23
23
|
isolate?: Isolation;
|
|
24
24
|
fallback?: JSX.Element;
|
|
25
|
-
|
|
25
|
+
/** Mostrado se o remote falhar. Sem ela, uma mensagem curta com "Tentar de novo"; `null` não mostra nada. */
|
|
26
|
+
error?: ((error: RemoteError, retry: () => void) => JSX.Element) | null;
|
|
26
27
|
class?: string;
|
|
27
28
|
/** `'lazy'`: monta perto de aparecer na tela; `'idle'`: com o navegador ocioso. */
|
|
28
29
|
loading?: Loading;
|
package/dist/solid.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostSlot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JKTZODC5.js";
|
|
4
4
|
import {
|
|
5
5
|
defineRemote,
|
|
6
6
|
memoSelect,
|
|
7
7
|
same,
|
|
8
8
|
shared
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-I7IFR65H.js";
|
|
10
|
+
import "./chunk-52D6ZT4A.js";
|
|
11
|
+
import "./chunk-QGAEXUP5.js";
|
|
12
|
+
import "./chunk-YDO7SPF4.js";
|
|
13
|
+
import "./chunk-VDVVEGAO.js";
|
|
14
14
|
import "./chunk-BQGVAXFM.js";
|
|
15
15
|
import "./chunk-JWDDXX5O.js";
|
|
16
16
|
import "./chunk-2Z4OH3BP.js";
|
|
@@ -70,10 +70,21 @@ function Remote(p) {
|
|
|
70
70
|
const retry = () => slot?.retry();
|
|
71
71
|
return [
|
|
72
72
|
() => status() === "loading" ? p.fallback : null,
|
|
73
|
-
() => status() === "error" && error()
|
|
73
|
+
() => status() === "error" && error() ? p.error ? p.error(error(), retry) : p.error === null ? null : defaultError(retry) : null,
|
|
74
74
|
(host.appendChild(target), host)
|
|
75
75
|
];
|
|
76
76
|
}
|
|
77
|
+
function defaultError(retry) {
|
|
78
|
+
const box = document.createElement("div");
|
|
79
|
+
box.setAttribute("role", "alert");
|
|
80
|
+
box.setAttribute("data-vitral-default", "error");
|
|
81
|
+
const button = document.createElement("button");
|
|
82
|
+
button.type = "button";
|
|
83
|
+
button.textContent = "Tentar de novo";
|
|
84
|
+
button.onclick = retry;
|
|
85
|
+
box.append("N\xE3o foi poss\xEDvel carregar. ", button);
|
|
86
|
+
return box;
|
|
87
|
+
}
|
|
77
88
|
function useShared(key, select = same) {
|
|
78
89
|
const handle = shared(key);
|
|
79
90
|
const pick = memoSelect();
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
importVerified,
|
|
3
3
|
signature,
|
|
4
4
|
verified
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VDNFRNOG.js";
|
|
6
6
|
import "./chunk-UCFOXMOR.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-QGAEXUP5.js";
|
|
8
|
+
import "./chunk-VDVVEGAO.js";
|
|
9
9
|
import "./chunk-BQGVAXFM.js";
|
|
10
10
|
import "./chunk-JWDDXX5O.js";
|
|
11
11
|
import "./chunk-GNPFWISJ.js";
|
package/dist/svelte.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostSlot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JKTZODC5.js";
|
|
4
4
|
import {
|
|
5
5
|
defineRemote
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-I7IFR65H.js";
|
|
7
|
+
import "./chunk-52D6ZT4A.js";
|
|
8
|
+
import "./chunk-QGAEXUP5.js";
|
|
9
|
+
import "./chunk-YDO7SPF4.js";
|
|
10
|
+
import "./chunk-VDVVEGAO.js";
|
|
11
11
|
import "./chunk-BQGVAXFM.js";
|
|
12
12
|
import "./chunk-JWDDXX5O.js";
|
|
13
13
|
import "./chunk-2Z4OH3BP.js";
|
package/dist/sw.d.ts
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { d as RemoteManifest } from './types-DJautV-K.js';
|
|
2
2
|
import './errors-kjBv6IH_.js';
|
|
3
3
|
|
|
4
|
+
interface FilesOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Versão de cada grupo de `dedupe` que o host oferece (`{ react: '19.2.0' }`):
|
|
7
|
+
* a cópia própria do remote para esses grupos fica de fora.
|
|
8
|
+
*/
|
|
9
|
+
offered?: Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Inclui o arquivo único quando o manifesto tem build dividido. Padrão:
|
|
12
|
+
* false. O arquivo único só é usado em navegadores sem import map nem
|
|
13
|
+
* modulepreload com integrity, e depois de uma falha.
|
|
14
|
+
*/
|
|
15
|
+
single?: boolean;
|
|
16
|
+
}
|
|
4
17
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* // sw.js do host
|
|
9
|
-
* import { remoteFiles } from 'vitral/sw'
|
|
10
|
-
* self.addEventListener('install', (e) => e.waitUntil(
|
|
11
|
-
* remoteFiles('/conta/vitral.json').then((urls) => caches.open('remotes').then((c) => c.addAll(urls))),
|
|
12
|
-
* ))
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* URLs absolutas do manifesto e de tudo que ele lista: arquivo único, CSS,
|
|
17
|
-
* build dividido (inclusive os `import()` das rotas), cópias de `dedupe` e os
|
|
18
|
-
* módulos de teste do SRI.
|
|
18
|
+
* URLs absolutas do manifesto e do que a página usa: CSS, build dividido
|
|
19
|
+
* (inclusive os `import()` das rotas), cópias de `dedupe` que o host não
|
|
20
|
+
* oferece e os módulos de teste do SRI. Sem build dividido, o arquivo único.
|
|
19
21
|
*/
|
|
20
|
-
declare function remoteFiles(manifestUrl: string, init?: RequestInit): Promise<string[]>;
|
|
22
|
+
declare function remoteFiles(manifestUrl: string, init?: RequestInit & FilesOptions): Promise<string[]>;
|
|
21
23
|
/** O mesmo que `remoteFiles`, para um manifesto já lido. */
|
|
22
|
-
declare function filesOf(m: RemoteManifest, manifestUrl: string): string[];
|
|
23
|
-
interface RemoteWorkerOptions {
|
|
24
|
+
declare function filesOf(m: RemoteManifest, manifestUrl: string, o?: FilesOptions): string[];
|
|
25
|
+
interface RemoteWorkerOptions extends FilesOptions {
|
|
24
26
|
/** URLs dos `vitral.json` dos remotes. */
|
|
25
27
|
manifests: string[];
|
|
26
28
|
/** Nome do cache. Padrão `vitral-remotes`. */
|
|
@@ -35,7 +37,7 @@ interface Scope {
|
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* Service worker do host para os remotes. No `install`, baixa o manifesto e
|
|
38
|
-
*
|
|
40
|
+
* os arquivos que a página usa de cada remote (`filesOf`) para o CacheStorage: o Chrome gera o cache
|
|
39
41
|
* de código completo para scripts gravados durante o `install`, e a volta à
|
|
40
42
|
* página compila menos. Onde há Static Routing API (Chrome 123+), os arquivos
|
|
41
43
|
* com hash vão direto ao cache, sem acordar o service worker; nos outros
|
|
@@ -52,4 +54,4 @@ interface Scope {
|
|
|
52
54
|
*/
|
|
53
55
|
declare function remoteWorker(self: Scope, o: RemoteWorkerOptions): void;
|
|
54
56
|
|
|
55
|
-
export { type RemoteWorkerOptions, filesOf, remoteFiles, remoteWorker };
|
|
57
|
+
export { type FilesOptions, type RemoteWorkerOptions, filesOf, remoteFiles, remoteWorker };
|
package/dist/sw.js
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
satisfies
|
|
3
|
+
} from "./chunk-4E33RZMM.js";
|
|
1
4
|
import "./chunk-MLKGABMK.js";
|
|
2
5
|
|
|
3
6
|
// src/sw.ts
|
|
4
7
|
async function remoteFiles(manifestUrl, init) {
|
|
5
8
|
const base = new URL(manifestUrl, globalThis.location?.href);
|
|
6
|
-
const
|
|
9
|
+
const { offered, single, ...req } = init ?? {};
|
|
10
|
+
const res = await fetch(base, { cache: "no-cache", ...req });
|
|
7
11
|
if (!res.ok) throw new Error(`vitral: ${base.href} respondeu ${res.status}`);
|
|
8
|
-
return filesOf(await res.json(), base.href);
|
|
12
|
+
return filesOf(await res.json(), base.href, { offered, single });
|
|
9
13
|
}
|
|
10
|
-
function filesOf(m, manifestUrl) {
|
|
14
|
+
function filesOf(m, manifestUrl, o = {}) {
|
|
11
15
|
const base = new URL(manifestUrl, globalThis.location?.href);
|
|
16
|
+
const s = m.split;
|
|
17
|
+
const dir = s ? s.entry.slice(0, s.entry.lastIndexOf("/") + 1) : "";
|
|
18
|
+
const served = (d) => !!o.offered?.[d.name] && satisfies(o.offered[d.name], d.range);
|
|
19
|
+
const own = new Set((m.dedupe ?? []).filter(served).flatMap((d) => [d.file, ...d.chunks ?? []]));
|
|
20
|
+
for (const f of s ? [s.entry, ...s.chunks ?? [], ...s.lazy ?? []] : []) own.delete(f);
|
|
21
|
+
const all = !s || o.single;
|
|
12
22
|
const files = [
|
|
13
|
-
m.entry,
|
|
23
|
+
...all ? [m.entry] : [],
|
|
14
24
|
...m.css ?? [],
|
|
15
25
|
...m.shadow?.css ?? [],
|
|
16
26
|
...m.shadow?.global ?? [],
|
|
17
|
-
|
|
18
|
-
...m.
|
|
27
|
+
// Sem o arquivo único, só o JS do build dividido (o resto é do arquivo único).
|
|
28
|
+
...Object.keys(m.files ?? {}).filter((f) => all || !/\.m?js$/.test(f) || f.startsWith(dir)),
|
|
29
|
+
...s ? [s.entry, ...s.chunks ?? [], ...s.lazy ?? []] : [],
|
|
19
30
|
...(m.dedupe ?? []).flatMap((d) => [d.file, ...d.chunks ?? []]),
|
|
20
31
|
...m.probe ?? []
|
|
21
32
|
];
|
|
22
|
-
return [base.href, ...new Set(files.filter(
|
|
33
|
+
return [base.href, ...new Set(files.filter((f) => f && !own.has(f)).map((f) => new URL(f, base).href))];
|
|
23
34
|
}
|
|
24
35
|
var hashed = (u, manifests) => !manifests.has(u) && /\.(js|mjs|css|wasm)$/.test(new URL(u).pathname);
|
|
25
36
|
function remoteWorker(self, o) {
|
|
@@ -35,10 +46,10 @@ function remoteWorker(self, o) {
|
|
|
35
46
|
const res = await fetch(m, { cache: "no-cache" });
|
|
36
47
|
if (!res.ok) return [];
|
|
37
48
|
await c.put(m, res.clone());
|
|
38
|
-
return filesOf(await res.json(), m);
|
|
49
|
+
return filesOf(await res.json(), m, o);
|
|
39
50
|
};
|
|
40
51
|
for (const m of manifests) {
|
|
41
|
-
const urls = known?.[0] === m ? filesOf(known[1], m) : await read(m).catch(() => []);
|
|
52
|
+
const urls = known?.[0] === m ? filesOf(known[1], m, o) : await read(m).catch(() => []);
|
|
42
53
|
for (const u of urls) keep.add(u);
|
|
43
54
|
const missing = [];
|
|
44
55
|
for (const u of urls) if (hashed(u, manifests) && !await c.match(u)) missing.push(u);
|
package/dist/testing.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
harness,
|
|
5
5
|
verify
|
|
6
6
|
} from "./chunk-DAESKNQ6.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-I7IFR65H.js";
|
|
8
8
|
import {
|
|
9
9
|
register
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-52D6ZT4A.js";
|
|
11
|
+
import "./chunk-QGAEXUP5.js";
|
|
12
|
+
import "./chunk-YDO7SPF4.js";
|
|
13
|
+
import "./chunk-VDVVEGAO.js";
|
|
14
14
|
import "./chunk-BQGVAXFM.js";
|
|
15
15
|
import "./chunk-JWDDXX5O.js";
|
|
16
16
|
import "./chunk-2Z4OH3BP.js";
|
package/dist/vite.js
CHANGED
|
@@ -89,6 +89,33 @@ function outputs(rolldown, hints = false) {
|
|
|
89
89
|
];
|
|
90
90
|
}
|
|
91
91
|
var compileHint = (chunk) => chunk.isEntry || !chunk.isDynamicEntry || chunk.name?.startsWith("_vitral") ? "//# allFunctionsCalledOnLoad" : "";
|
|
92
|
+
var CHUNKING = ["manualChunks", "advancedChunks", "codeSplitting", "inlineDynamicImports", "experimentalMinChunkSize"];
|
|
93
|
+
function userOutputs(list) {
|
|
94
|
+
if (!Array.isArray(list)) return;
|
|
95
|
+
const ours = (o) => o.format === "es" && ("codeSplitting" in o || "inlineDynamicImports" in o || String(o.entryFileNames ?? "").startsWith(SPLIT));
|
|
96
|
+
const user = list.filter((o) => !ours(o));
|
|
97
|
+
if (!user.length) return;
|
|
98
|
+
const [single, split] = list.filter(ours);
|
|
99
|
+
const given = Object.assign({}, ...user);
|
|
100
|
+
const common = Object.fromEntries(Object.entries(given).filter(([k]) => !CHUNKING.includes(k)));
|
|
101
|
+
const chunking = Object.fromEntries(Object.entries(given).filter(([k]) => CHUNKING.includes(k) && !(k === "codeSplitting" && given[k] === false) && k !== "inlineDynamicImports"));
|
|
102
|
+
return [{ ...common, ...single }, { ...common, ...chunking, ...split }];
|
|
103
|
+
}
|
|
104
|
+
function ownApart(user) {
|
|
105
|
+
let app;
|
|
106
|
+
return (id, meta) => {
|
|
107
|
+
if (!app) {
|
|
108
|
+
app = /* @__PURE__ */ new Set();
|
|
109
|
+
const boot = "\0" + BOOT;
|
|
110
|
+
const stack = [boot];
|
|
111
|
+
while (stack.length) {
|
|
112
|
+
const m = meta.getModuleInfo(stack.pop());
|
|
113
|
+
for (const d of [...m?.importedIds ?? [], ...m?.dynamicallyImportedIds ?? []]) if (!d.startsWith("\0vitral-own:") && !app.has(d)) app.add(d), stack.push(d);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return app.has(id) ? user(id, meta) : void 0;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
92
119
|
var isSplit = (bundle) => Object.values(bundle).some((f) => f.type === "chunk" && f.isEntry && f.fileName.startsWith(SPLIT));
|
|
93
120
|
var helper = (load = "import", base = "import.meta.url") => `function __vitralImport(u,d){var p=globalThis[Symbol.for("vitral")],s=p&&p.sri,a=d.concat(u).map(function(x){return new URL(x,${base}).href});return Promise.all(s?a.map(function(h){return new Promise(function(ok,no){if(!s[h])return no(new Error("vitral: arquivo sem integrity: "+h));var l=document.createElement("link");l.rel="modulepreload";l.crossOrigin="anonymous";l.integrity=s[h];l.href=h;l.onload=ok;l.onerror=function(){no(new Error("vitral: integrity n\xE3o confere: "+h))};document.head.appendChild(l)})}):[]).then(function(){return ${load}(a[a.length-1])})}`;
|
|
94
121
|
function collect(outDir, bundle) {
|
|
@@ -1084,6 +1111,14 @@ function vitral(options = {}) {
|
|
|
1084
1111
|
},
|
|
1085
1112
|
configResolved(c) {
|
|
1086
1113
|
root = c.root;
|
|
1114
|
+
for (const key of ["rollupOptions", "rolldownOptions"]) {
|
|
1115
|
+
const o = c.build[key];
|
|
1116
|
+
const fixed = !mcp && o && userOutputs(o.output);
|
|
1117
|
+
if (!fixed) continue;
|
|
1118
|
+
const user = fixed[1].manualChunks;
|
|
1119
|
+
if (dedupe && typeof user === "function") fixed[1].manualChunks = ownApart(user);
|
|
1120
|
+
o.output = fixed;
|
|
1121
|
+
}
|
|
1087
1122
|
framework = detectAdapter(c.plugins);
|
|
1088
1123
|
adapter = options.adapter || framework;
|
|
1089
1124
|
serve = c.command === "serve";
|
package/dist/vue.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostSlot,
|
|
3
3
|
timings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JKTZODC5.js";
|
|
5
5
|
import {
|
|
6
6
|
defineRemote,
|
|
7
7
|
memoSelect,
|
|
8
8
|
same,
|
|
9
9
|
shared
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-I7IFR65H.js";
|
|
11
|
+
import "./chunk-52D6ZT4A.js";
|
|
12
|
+
import "./chunk-QGAEXUP5.js";
|
|
13
|
+
import "./chunk-YDO7SPF4.js";
|
|
14
14
|
import {
|
|
15
15
|
absolute
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VDVVEGAO.js";
|
|
17
17
|
import "./chunk-BQGVAXFM.js";
|
|
18
18
|
import "./chunk-JWDDXX5O.js";
|
|
19
19
|
import "./chunk-2Z4OH3BP.js";
|
|
@@ -142,7 +142,7 @@ var VitralRemote = /* @__PURE__ */ defineComponent({
|
|
|
142
142
|
const retry = () => slot?.retry();
|
|
143
143
|
return () => h("div", { "data-vitral": p.name ?? p.src, "data-vitral-status": status.value }, [
|
|
144
144
|
status.value === "loading" ? slots.fallback?.() : null,
|
|
145
|
-
status.value === "error" ? slots.error
|
|
145
|
+
status.value === "error" ? slots.error ? slots.error({ error: error.value, retry }) : h("div", { role: "alert", "data-vitral-default": "error" }, ["N\xE3o foi poss\xEDvel carregar. ", h("button", { type: "button", onClick: retry }, "Tentar de novo")]) : null,
|
|
146
146
|
// O Vue nunca coloca filhos neste div: ele pertence ao remote.
|
|
147
147
|
h("div", { ref: target })
|
|
148
148
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitral",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Micro-frontends com qualquer framework, sem configurar build no host. React, Next.js, Vue, Nuxt, Angular, Svelte e outros na mesma página.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"micro-frontend",
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"./channel-*",
|
|
285
285
|
"./hydrate-*"
|
|
286
286
|
],
|
|
287
|
-
"limit": "5.
|
|
287
|
+
"limit": "5.2 kB"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
"name": "núcleo",
|
|
@@ -303,12 +303,12 @@
|
|
|
303
303
|
"./channel-*",
|
|
304
304
|
"./hydrate-*"
|
|
305
305
|
],
|
|
306
|
-
"limit": "6.
|
|
306
|
+
"limit": "6.19 kB"
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"name": "SRI e dedupe (sob demanda, com as dependências)",
|
|
310
310
|
"path": "dist/sri-*.js",
|
|
311
|
-
"limit": "3.
|
|
311
|
+
"limit": "3.37 kB"
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
314
|
"name": "dedupe (sob demanda, para hosts que oferecem dependências)",
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
"./channel-*",
|
|
346
346
|
"./hydrate-*"
|
|
347
347
|
],
|
|
348
|
-
"limit": "5.
|
|
348
|
+
"limit": "5.88 kB"
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
351
|
"name": "host mínimo + store + persist + syncTabs",
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
"./channel-*",
|
|
365
365
|
"./hydrate-*"
|
|
366
366
|
],
|
|
367
|
-
"limit": "6.
|
|
367
|
+
"limit": "6.1 kB"
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
"name": "reframe: JS em iframe oculto, DOM no Shadow DOM (sob demanda, além do núcleo e do Shadow DOM)",
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
"./channel-*",
|
|
411
411
|
"./hydrate-*"
|
|
412
412
|
],
|
|
413
|
-
"limit": "7.
|
|
413
|
+
"limit": "7.3 kB"
|
|
414
414
|
},
|
|
415
415
|
{
|
|
416
416
|
"name": "vue",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"./channel-*",
|
|
431
431
|
"./hydrate-*"
|
|
432
432
|
],
|
|
433
|
-
"limit": "6.
|
|
433
|
+
"limit": "6.66 kB"
|
|
434
434
|
},
|
|
435
435
|
{
|
|
436
436
|
"name": "element",
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
"./channel-*",
|
|
450
450
|
"./hydrate-*"
|
|
451
451
|
],
|
|
452
|
-
"limit": "
|
|
452
|
+
"limit": "7.03 kB"
|
|
453
453
|
},
|
|
454
454
|
{
|
|
455
455
|
"name": "devtools",
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
{
|
|
461
461
|
"name": "auto",
|
|
462
462
|
"path": "dist/auto.js",
|
|
463
|
-
"limit": "7.
|
|
463
|
+
"limit": "7.2 kB",
|
|
464
464
|
"ignore": [
|
|
465
465
|
"./shadow-*",
|
|
466
466
|
"./reframe-*",
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
"name": "routes",
|
|
480
480
|
"path": "dist/routes.js",
|
|
481
481
|
"import": "{ routes }",
|
|
482
|
-
"limit": "10.
|
|
482
|
+
"limit": "10.44 kB",
|
|
483
483
|
"ignore": [
|
|
484
484
|
"./overrides-*",
|
|
485
485
|
"./stale-*",
|
|
@@ -504,7 +504,7 @@
|
|
|
504
504
|
"name": "prefetch",
|
|
505
505
|
"path": "dist/prefetch.js",
|
|
506
506
|
"import": "{ prefetch }",
|
|
507
|
-
"limit": "4.
|
|
507
|
+
"limit": "4.2 kB",
|
|
508
508
|
"ignore": [
|
|
509
509
|
"./shadow-*",
|
|
510
510
|
"./overrides-*",
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
"name": "iframe",
|
|
522
522
|
"path": "dist/iframe.js",
|
|
523
523
|
"import": "{ enableIframe }",
|
|
524
|
-
"limit": "6.
|
|
524
|
+
"limit": "6.16 kB",
|
|
525
525
|
"ignore": [
|
|
526
526
|
"./overrides-*",
|
|
527
527
|
"./stale-*",
|
|
@@ -533,7 +533,7 @@
|
|
|
533
533
|
{
|
|
534
534
|
"name": "embed (loader de sites de terceiros, arquivo único com Shadow DOM, SRI e canal)",
|
|
535
535
|
"path": "dist/embed.js",
|
|
536
|
-
"limit": "13.
|
|
536
|
+
"limit": "13.5 kB"
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
"name": "snapshot (última tela na visita de volta)",
|