vitral 0.9.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) 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-ZRAGLT3I.js → chunk-CFJC4GRB.js} +4 -4
  8. package/dist/{chunk-6T25WKNK.js → chunk-EVVYV5ED.js} +41 -18
  9. package/dist/{chunk-JKNTXBZH.js → chunk-FOEXP52G.js} +8 -5
  10. package/dist/chunk-MGG5BW3U.js +10 -0
  11. package/dist/chunk-MLKGABMK.js +9 -0
  12. package/dist/{chunk-PQXS2UDM.js → chunk-QINOFHG6.js} +1 -1
  13. package/dist/{dedupe-PZCSKL3L.js → chunk-R3HUMHNL.js} +15 -16
  14. package/dist/{chunk-KU6HF2EW.js → chunk-SC2KF7GJ.js} +2 -2
  15. package/dist/{chunk-P5JSFGPI.js → chunk-SOENZNXO.js} +70 -9
  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 +36 -2
  39. package/dist/next-config.js +71 -4
  40. package/dist/next-host.d.ts +3 -3
  41. package/dist/next-host.js +48 -9
  42. package/dist/next.js +1 -0
  43. package/dist/otel.js +2 -0
  44. package/dist/{overrides-NP754HY7.js → overrides-5BGODLCO.js} +1 -0
  45. package/dist/{portals-AK5XA2M5.js → portals-RLXKPXBZ.js} +2 -0
  46. package/dist/preact.d.ts +4 -4
  47. package/dist/preact.js +6 -4
  48. package/dist/prefetch.js +5 -3
  49. package/dist/react-server.d.ts +1 -1
  50. package/dist/react-server.js +1 -0
  51. package/dist/react.d.ts +4 -4
  52. package/dist/react.js +7 -5
  53. package/dist/{reframe-3ZN5CHEG.js → reframe-ZOQPW552.js} +8 -6
  54. package/dist/routes.d.ts +2 -2
  55. package/dist/routes.js +6 -4
  56. package/dist/sentry.js +2 -0
  57. package/dist/{shadow-S4SKHTA7.js → shadow-PZGQKUA4.js} +2 -1
  58. package/dist/single-spa.d.ts +1 -1
  59. package/dist/single-spa.js +2 -0
  60. package/dist/{slot-Dhczjs1E.d.ts → slot-DRYmGvvV.d.ts} +1 -1
  61. package/dist/solid.d.ts +3 -3
  62. package/dist/solid.js +6 -4
  63. package/dist/sri-LQBLQMG5.js +14 -0
  64. package/dist/{stale-HFTCJASS.js → stale-XV4LNHDX.js} +2 -0
  65. package/dist/svelte.d.ts +4 -4
  66. package/dist/svelte.js +6 -4
  67. package/dist/sw.js +2 -0
  68. package/dist/testing.d.ts +1 -1
  69. package/dist/testing.js +5 -3
  70. package/dist/{types-wsKR1gfx.d.ts → types-g8WEVD_b.d.ts} +2 -0
  71. package/dist/vitals.js +1 -0
  72. package/dist/vite.js +10 -4
  73. package/dist/vue.d.ts +2 -2
  74. package/dist/vue.js +6 -4
  75. package/package.json +15 -15
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-SOENZNXO.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
 
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitral",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "Micro-frontends de qualquer framework numa página só, sem configuração de build no host. React, Next, Vue, Nuxt, Angular, Svelte, Solid, Preact, Lit e JS puro.",
5
5
  "keywords": [
6
6
  "micro-frontend",
@@ -269,7 +269,7 @@
269
269
  "./hydrate-*",
270
270
  "./portals-*"
271
271
  ],
272
- "limit": "4.83 kB"
272
+ "limit": "5.02 kB"
273
273
  },
274
274
  {
275
275
  "name": "núcleo",
@@ -289,17 +289,17 @@
289
289
  "./hydrate-*",
290
290
  "./portals-*"
291
291
  ],
292
- "limit": "5.78 kB"
292
+ "limit": "5.96 kB"
293
293
  },
294
294
  {
295
295
  "name": "SRI e dedupe (sob demanda, com as dependências)",
296
296
  "path": "dist/sri-*.js",
297
- "limit": "2.76 kB"
297
+ "limit": "2.96 kB"
298
298
  },
299
299
  {
300
300
  "name": "dedupe (sob demanda, para hosts que oferecem dependências)",
301
301
  "path": "dist/dedupe-*.js",
302
- "limit": "690 B"
302
+ "limit": "760 B"
303
303
  },
304
304
  {
305
305
  "name": "overrides (sob demanda)",
@@ -312,7 +312,7 @@
312
312
  "ignore": [
313
313
  "./chunk-*"
314
314
  ],
315
- "limit": "1.02 kB"
315
+ "limit": "1.03 kB"
316
316
  },
317
317
  {
318
318
  "name": "host mínimo + store",
@@ -332,7 +332,7 @@
332
332
  "./hydrate-*",
333
333
  "./portals-*"
334
334
  ],
335
- "limit": "5.53 kB"
335
+ "limit": "5.71 kB"
336
336
  },
337
337
  {
338
338
  "name": "host mínimo + store + persist + syncTabs",
@@ -352,7 +352,7 @@
352
352
  "./hydrate-*",
353
353
  "./portals-*"
354
354
  ],
355
- "limit": "5.76 kB"
355
+ "limit": "5.94 kB"
356
356
  },
357
357
  {
358
358
  "name": "reframe: JS em iframe oculto, DOM no Shadow DOM (sob demanda, além do núcleo e do Shadow DOM)",
@@ -399,7 +399,7 @@
399
399
  "./hydrate-*",
400
400
  "./portals-*"
401
401
  ],
402
- "limit": "6.33 kB"
402
+ "limit": "6.51 kB"
403
403
  },
404
404
  {
405
405
  "name": "vue",
@@ -420,7 +420,7 @@
420
420
  "./hydrate-*",
421
421
  "./portals-*"
422
422
  ],
423
- "limit": "6.12 kB"
423
+ "limit": "6.31 kB"
424
424
  },
425
425
  {
426
426
  "name": "element",
@@ -440,7 +440,7 @@
440
440
  "./hydrate-*",
441
441
  "./portals-*"
442
442
  ],
443
- "limit": "6.49 kB"
443
+ "limit": "6.66 kB"
444
444
  },
445
445
  {
446
446
  "name": "devtools",
@@ -451,7 +451,7 @@
451
451
  {
452
452
  "name": "auto",
453
453
  "path": "dist/auto.js",
454
- "limit": "6.67 kB",
454
+ "limit": "6.84 kB",
455
455
  "ignore": [
456
456
  "./shadow-*",
457
457
  "./reframe-*",
@@ -471,7 +471,7 @@
471
471
  "name": "routes",
472
472
  "path": "dist/routes.js",
473
473
  "import": "{ routes }",
474
- "limit": "9.59 kB",
474
+ "limit": "9.88 kB",
475
475
  "ignore": [
476
476
  "./overrides-*",
477
477
  "./stale-*",
@@ -497,7 +497,7 @@
497
497
  "name": "prefetch",
498
498
  "path": "dist/prefetch.js",
499
499
  "import": "{ prefetch }",
500
- "limit": "3.28 kB",
500
+ "limit": "3.29 kB",
501
501
  "ignore": [
502
502
  "./shadow-*",
503
503
  "./overrides-*",
@@ -527,7 +527,7 @@
527
527
  {
528
528
  "name": "embed (loader de sites de terceiros, arquivo único com Shadow DOM, SRI e canal)",
529
529
  "path": "dist/embed.js",
530
- "limit": "12.59 kB"
530
+ "limit": "12.81 kB"
531
531
  },
532
532
  {
533
533
  "name": "vitals (Web Vitals por remote)",