vitral 0.1.0 → 0.3.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 (63) hide show
  1. package/README.md +250 -217
  2. package/dist/angular.d.ts +16 -4
  3. package/dist/angular.js +26 -5
  4. package/dist/auto.d.ts +2 -0
  5. package/dist/auto.js +13 -0
  6. package/dist/capture-JYFERAPL.js +42 -0
  7. package/dist/chunk-3YXI3G34.js +181 -0
  8. package/dist/chunk-AH7KNMBW.js +20 -0
  9. package/dist/chunk-AKNNHQ2H.js +45 -0
  10. package/dist/chunk-DXORSF4X.js +42 -0
  11. package/dist/chunk-GNHCZRQP.js +79 -0
  12. package/dist/chunk-GNPFWISJ.js +80 -0
  13. package/dist/chunk-I3VSKSAZ.js +634 -0
  14. package/dist/chunk-IHTUM6LT.js +152 -0
  15. package/dist/chunk-SDB5AZEI.js +51 -0
  16. package/dist/chunk-TD4S3IHA.js +201 -0
  17. package/dist/chunk-ZAC6QQI6.js +64 -0
  18. package/dist/cli.d.ts +1 -0
  19. package/dist/cli.js +138 -0
  20. package/dist/contract-46EZFQPQ.js +17 -0
  21. package/dist/dedupe-S7BHQMOZ.js +82 -0
  22. package/dist/devtools.d.ts +12 -0
  23. package/dist/devtools.js +86 -0
  24. package/dist/element.d.ts +60 -2
  25. package/dist/element.js +10 -2
  26. package/dist/errors-kjBv6IH_.d.ts +17 -0
  27. package/dist/events-D5gs7rff.d.ts +6 -0
  28. package/dist/expose-JUOUN5N5.js +15 -0
  29. package/dist/host-slot-Cz6EiGsB.d.ts +6 -0
  30. package/dist/iframe.d.ts +28 -0
  31. package/dist/iframe.js +239 -0
  32. package/dist/index.d.ts +144 -147
  33. package/dist/index.js +40 -10
  34. package/dist/navigate-BRG1WJUM.d.ts +9 -0
  35. package/dist/otel.d.ts +44 -0
  36. package/dist/otel.js +27 -0
  37. package/dist/overrides-NZAIUGK5.js +15 -0
  38. package/dist/preact.d.ts +30 -7
  39. package/dist/preact.js +38 -9
  40. package/dist/react.d.ts +46 -7
  41. package/dist/react.js +97 -42
  42. package/dist/routes.d.ts +56 -0
  43. package/dist/routes.js +144 -0
  44. package/dist/sentry.d.ts +25 -0
  45. package/dist/sentry.js +11 -0
  46. package/dist/shadow-6HELCHCJ.js +98 -0
  47. package/dist/slot-DqXTwGbs.d.ts +36 -0
  48. package/dist/solid.d.ts +29 -6
  49. package/dist/solid.js +32 -8
  50. package/dist/sri-JMX6JLQP.js +116 -0
  51. package/dist/state-BDdCwc21.d.ts +4 -0
  52. package/dist/svelte.d.ts +19 -3
  53. package/dist/svelte.js +11 -4
  54. package/dist/testing.d.ts +3 -2
  55. package/dist/testing.js +9 -3
  56. package/dist/types-Czvm-siZ.d.ts +327 -0
  57. package/dist/vite.d.ts +66 -4
  58. package/dist/vite.js +1044 -25
  59. package/dist/vue.d.ts +86 -7
  60. package/dist/vue.js +74 -46
  61. package/package.json +181 -11
  62. package/dist/chunk-IZK6ITIJ.js +0 -96
  63. package/dist/chunk-TTL52BF2.js +0 -547
package/dist/vue.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as vue from 'vue';
2
- import { PropType, App, ShallowRef, Component } from 'vue';
3
- import { Props, Isolation, RemoteContext, RemoteModule } from './index.js';
4
- export { events } from './index.js';
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-Czvm-siZ.js';
4
+ export { e as events } from './events-D5gs7rff.js';
5
+ import { L as Loading, P as Prefetch } from './host-slot-Cz6EiGsB.js';
6
+ import './errors-kjBv6IH_.js';
5
7
 
6
8
  interface VueRemoteOptions {
7
9
  /** Instale plugins (router, pinia, i18n…) no app do remote. */
@@ -11,10 +13,29 @@ interface VueRemoteOptions {
11
13
  declare function vueRemote<P extends Props>(component: Component, options?: VueRemoteOptions): RemoteModule<P>;
12
14
  /** Dentro de um remote: dá acesso ao contexto (nome, eventos, baseUrl). */
13
15
  declare function useVitral(): RemoteContext | null;
16
+ /**
17
+ * Dentro de um remote: onde renderizar portais. No Shadow DOM é um elemento
18
+ * dentro do shadow root (com os estilos do remote); senão, `'body'`. Use em
19
+ * `<Teleport :to="portal">`.
20
+ */
21
+ declare function usePortalContainer(): HTMLElement | 'body';
14
22
  /** Assina um evento do barramento global enquanto o componente existir. */
15
23
  declare function useEvent<T = unknown>(type: string, handler: (payload: T) => void): void;
16
24
  /** Ref com o último valor emitido em `type`. */
17
25
  declare function useEventValue<T = unknown>(type: string): ShallowRef<T | undefined>;
26
+ /**
27
+ * Ref de uma chave compartilhada (`provide`/`shared`). Sem seletor, a ref
28
+ * também escreve (`usuario.value = …` chama `set`, e `v-model` funciona). Com
29
+ * seletor, é só leitura e só muda quando o resultado muda (`Object.is`). A
30
+ * assinatura acaba junto com o componente (ou o `effectScope`).
31
+ *
32
+ * const usuario = useShared('usuario')
33
+ * const nome = useShared('usuario', (u) => u?.nome)
34
+ */
35
+ declare function useShared<K extends keyof Shared>(key: K): WritableComputedRef<Shared[K] | undefined>;
36
+ declare function useShared<K extends keyof Shared, S>(key: K, select: (value: Shared[K] | undefined) => S): ComputedRef<S>;
37
+ declare function useShared<T = unknown>(key: string): WritableComputedRef<T | undefined>;
38
+ declare function useShared<T, S>(key: string, select: (value: T | undefined) => S): ComputedRef<S>;
18
39
 
19
40
  /**
20
41
  * Renderiza um remote. No servidor (Nuxt SSR) renderiza só o slot `fallback`;
@@ -23,9 +44,15 @@ declare function useEventValue<T = unknown>(type: string): ShallowRef<T | undefi
23
44
  * Slots: `fallback` (carregando) e `error` ({ error, retry }).
24
45
  */
25
46
  declare const VitralRemote: vue.DefineComponent<vue.ExtractPropTypes<{
47
+ /** Nome registrado. Com `src`, o nome sob o qual a URL é registrada. */
26
48
  name: {
27
49
  type: StringConstructor;
28
- required: true;
50
+ default: undefined;
51
+ };
52
+ /** URL do `vitral.json`. Dispensa `configure()`. */
53
+ src: {
54
+ type: StringConstructor;
55
+ default: undefined;
29
56
  };
30
57
  props: {
31
58
  type: PropType<Props>;
@@ -35,12 +62,38 @@ declare const VitralRemote: vue.DefineComponent<vue.ExtractPropTypes<{
35
62
  type: PropType<Isolation>;
36
63
  default: undefined;
37
64
  };
65
+ /** `'lazy'`: monta perto de aparecer na tela; `'idle'`: com o navegador ocioso. */
66
+ loading: {
67
+ type: PropType<Loading>;
68
+ default: undefined;
69
+ };
70
+ /** Baixa antes de montar: `'hover'`, `'visible'` ou `'idle'`. */
71
+ prefetch: {
72
+ type: PropType<Prefetch>;
73
+ default: undefined;
74
+ };
75
+ /** `'high'` para o remote que aparece logo ao abrir a página. */
76
+ priority: {
77
+ type: PropType<RequestPriority>;
78
+ default: undefined;
79
+ };
80
+ /** Ao sair da página, guarda o remote montado (LRU, padrão 5) e na volta só atualiza as props. */
81
+ keepAlive: {
82
+ type: (NumberConstructor | BooleanConstructor)[];
83
+ default: boolean;
84
+ };
38
85
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
39
86
  [key: string]: any;
40
87
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("error" | "ready")[], "error" | "ready", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
88
+ /** Nome registrado. Com `src`, o nome sob o qual a URL é registrada. */
41
89
  name: {
42
90
  type: StringConstructor;
43
- required: true;
91
+ default: undefined;
92
+ };
93
+ /** URL do `vitral.json`. Dispensa `configure()`. */
94
+ src: {
95
+ type: StringConstructor;
96
+ default: undefined;
44
97
  };
45
98
  props: {
46
99
  type: PropType<Props>;
@@ -50,12 +103,38 @@ declare const VitralRemote: vue.DefineComponent<vue.ExtractPropTypes<{
50
103
  type: PropType<Isolation>;
51
104
  default: undefined;
52
105
  };
106
+ /** `'lazy'`: monta perto de aparecer na tela; `'idle'`: com o navegador ocioso. */
107
+ loading: {
108
+ type: PropType<Loading>;
109
+ default: undefined;
110
+ };
111
+ /** Baixa antes de montar: `'hover'`, `'visible'` ou `'idle'`. */
112
+ prefetch: {
113
+ type: PropType<Prefetch>;
114
+ default: undefined;
115
+ };
116
+ /** `'high'` para o remote que aparece logo ao abrir a página. */
117
+ priority: {
118
+ type: PropType<RequestPriority>;
119
+ default: undefined;
120
+ };
121
+ /** Ao sair da página, guarda o remote montado (LRU, padrão 5) e na volta só atualiza as props. */
122
+ keepAlive: {
123
+ type: (NumberConstructor | BooleanConstructor)[];
124
+ default: boolean;
125
+ };
53
126
  }>> & Readonly<{
54
127
  onError?: ((...args: any[]) => any) | undefined;
55
128
  onReady?: ((...args: any[]) => any) | undefined;
56
129
  }>, {
57
- props: Props;
58
130
  isolate: Isolation;
131
+ name: string;
132
+ priority: RequestPriority;
133
+ loading: Loading;
134
+ src: string;
135
+ props: Props;
136
+ prefetch: Prefetch;
137
+ keepAlive: number | boolean;
59
138
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
60
139
 
61
- export { VitralRemote, type VueRemoteOptions, useEvent, useEventValue, useVitral, vueRemote };
140
+ export { VitralRemote, type VueRemoteOptions, useEvent, useEventValue, usePortalContainer, useShared, useVitral, vueRemote };
package/dist/vue.js CHANGED
@@ -1,17 +1,33 @@
1
+ import {
2
+ hostSlot,
3
+ timings
4
+ } from "./chunk-IHTUM6LT.js";
1
5
  import {
2
6
  defineRemote,
3
7
  events,
4
- mountRemote
5
- } from "./chunk-TTL52BF2.js";
8
+ memoSelect,
9
+ same,
10
+ shared
11
+ } from "./chunk-I3VSKSAZ.js";
12
+ import "./chunk-TD4S3IHA.js";
13
+ import "./chunk-ZAC6QQI6.js";
14
+ import {
15
+ absolute
16
+ } from "./chunk-GNHCZRQP.js";
17
+ import "./chunk-AKNNHQ2H.js";
18
+ import "./chunk-GNPFWISJ.js";
6
19
 
7
20
  // src/vue.ts
8
21
  import {
22
+ computed,
9
23
  createApp,
10
24
  defineComponent,
25
+ getCurrentScope,
11
26
  h,
12
27
  inject,
13
28
  onBeforeUnmount,
14
29
  onMounted,
30
+ onScopeDispose,
15
31
  ref,
16
32
  shallowReactive,
17
33
  shallowRef,
@@ -40,6 +56,9 @@ function vueRemote(component, options = {}) {
40
56
  function useVitral() {
41
57
  return inject(VitralKey, null);
42
58
  }
59
+ function usePortalContainer() {
60
+ return useVitral()?.portalContainer ?? "body";
61
+ }
43
62
  function useEvent(type, handler) {
44
63
  let off;
45
64
  onMounted(() => off = events.on(type, handler));
@@ -50,68 +69,75 @@ function useEventValue(type) {
50
69
  useEvent(type, (v) => value.value = v);
51
70
  return value;
52
71
  }
72
+ function useShared(key, select) {
73
+ const handle = shared(key);
74
+ const pick = memoSelect();
75
+ const state = shallowRef();
76
+ const off = handle.subscribe((v) => state.value = pick(v, select ?? same));
77
+ if (getCurrentScope()) onScopeDispose(off);
78
+ return select ? computed(() => state.value) : computed({ get: () => state.value, set: handle.set });
79
+ }
53
80
  var VitralRemote = defineComponent({
54
81
  name: "VitralRemote",
55
82
  props: {
56
- name: { type: String, required: true },
83
+ /** Nome registrado. Com `src`, o nome sob o qual a URL é registrada. */
84
+ name: { type: String, default: void 0 },
85
+ /** URL do `vitral.json`. Dispensa `configure()`. */
86
+ src: { type: String, default: void 0 },
57
87
  props: { type: Object, default: () => ({}) },
58
- isolate: { type: String, default: void 0 }
88
+ isolate: { type: String, default: void 0 },
89
+ /** `'lazy'`: monta perto de aparecer na tela; `'idle'`: com o navegador ocioso. */
90
+ loading: { type: String, default: void 0 },
91
+ /** Baixa antes de montar: `'hover'`, `'visible'` ou `'idle'`. */
92
+ prefetch: { type: String, default: void 0 },
93
+ /** `'high'` para o remote que aparece logo ao abrir a página. */
94
+ priority: { type: String, default: void 0 },
95
+ /** Ao sair da página, guarda o remote montado (LRU, padrão 5) e na volta só atualiza as props. */
96
+ keepAlive: { type: [Boolean, Number], default: false }
59
97
  },
60
98
  emits: ["error", "ready"],
61
99
  setup(p, { slots, emit }) {
62
- const slot = ref(null);
100
+ const target = ref(null);
63
101
  const status = ref("loading");
64
102
  const error = shallowRef(null);
65
- const attempt = ref(0);
66
- let handle = null;
67
- let token = 0;
68
- function fail(e, my) {
69
- if (my !== token) return;
70
- error.value = e;
71
- status.value = "error";
72
- emit("error", e);
73
- if (!slots.error) console.error(e);
74
- }
75
- async function mount() {
76
- const my = ++token;
77
- handle?.unmount();
78
- handle = null;
79
- status.value = "loading";
80
- try {
81
- const onError = (e) => fail(e, my);
82
- const initial = p.props;
83
- const h2 = await mountRemote(slot.value, p.name, { ...initial }, { isolate: p.isolate, onError });
84
- if (my !== token) return h2.unmount();
85
- handle = h2;
86
- if (p.props !== initial) h2.update?.({ ...p.props });
87
- status.value = "ready";
88
- emit("ready");
89
- } catch (e) {
90
- fail(e, my);
91
- }
92
- }
93
- onMounted(mount);
94
- watch(() => [p.name, p.isolate, attempt.value], mount, { flush: "post" });
103
+ let slot = null;
104
+ onMounted(() => {
105
+ slot = hostSlot(target.value, {
106
+ name: p.name,
107
+ src: p.src,
108
+ props: { ...p.props },
109
+ isolate: p.isolate,
110
+ loading: p.loading,
111
+ prefetch: p.prefetch,
112
+ priority: p.priority,
113
+ keepAlive: p.keepAlive,
114
+ onStatus(s, e) {
115
+ status.value = s;
116
+ error.value = e;
117
+ if (s === "ready") emit("ready", timings(p.name || absolute(p.src ?? "")));
118
+ if (e) {
119
+ emit("error", e);
120
+ if (!slots.error) console.error(e);
121
+ }
122
+ }
123
+ });
124
+ });
125
+ watch(() => [p.name, p.src, p.isolate], ([name, src, isolate]) => slot?.set({ name, src, isolate }), { flush: "post" });
95
126
  watch(
96
127
  () => p.props,
97
- (next) => handle?.update?.({ ...next }),
128
+ (next) => slot?.update({ ...next }),
98
129
  { deep: true }
99
130
  );
100
131
  onBeforeUnmount(() => {
101
- token++;
102
- handle?.unmount();
103
- handle = null;
132
+ slot?.destroy();
133
+ slot = null;
104
134
  });
105
- const retry = () => attempt.value++;
106
- return () => h("div", { "data-vitral": p.name, "data-vitral-status": status.value }, [
135
+ const retry = () => slot?.retry();
136
+ return () => h("div", { "data-vitral": p.name ?? p.src, "data-vitral-status": status.value }, [
107
137
  status.value === "loading" ? slots.fallback?.() : null,
108
138
  status.value === "error" ? slots.error?.({ error: error.value, retry }) : null,
109
139
  // O Vue nunca coloca filhos neste div: ele pertence ao remote.
110
- h("div", {
111
- key: `${p.name}:${p.isolate}:${attempt.value}`,
112
- ref: slot,
113
- style: status.value === "error" ? "display:none" : void 0
114
- })
140
+ h("div", { ref: target })
115
141
  ]);
116
142
  }
117
143
  });
@@ -120,6 +146,8 @@ export {
120
146
  events,
121
147
  useEvent,
122
148
  useEventValue,
149
+ usePortalContainer,
150
+ useShared,
123
151
  useVitral,
124
152
  vueRemote
125
153
  };
package/package.json CHANGED
@@ -1,23 +1,33 @@
1
1
  {
2
2
  "name": "vitral",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Micro-frontends sem burocracia: um contrato mount/unmount, carregamento em runtime e adaptadores para React, Next, Vue, Nuxt, Angular, Svelte, Solid, Preact, Lit e JS/TS puro.",
5
5
  "keywords": [
6
6
  "micro-frontend",
7
+ "micro-frontends",
8
+ "microfrontend",
7
9
  "microfrontends",
10
+ "mfe",
8
11
  "module-federation",
9
12
  "single-spa",
13
+ "vite",
14
+ "vite-plugin",
15
+ "runtime",
16
+ "shadow-dom",
10
17
  "react",
11
18
  "nextjs",
12
19
  "vue",
13
20
  "nuxt",
14
21
  "angular",
15
22
  "svelte",
23
+ "sveltekit",
16
24
  "solid",
25
+ "solidjs",
17
26
  "preact",
27
+ "astro",
18
28
  "lit",
19
29
  "web-components",
20
- "vite"
30
+ "typescript"
21
31
  ],
22
32
  "homepage": "https://github.com/joaogabriel15/vitral#readme",
23
33
  "bugs": {
@@ -31,9 +41,14 @@
31
41
  "license": "MIT",
32
42
  "author": "João (https://github.com/joaogabriel15)",
33
43
  "type": "module",
34
- "sideEffects": false,
44
+ "bin": {
45
+ "vitral": "./dist/cli.js"
46
+ },
47
+ "sideEffects": [
48
+ "./dist/auto.js"
49
+ ],
35
50
  "engines": {
36
- "node": ">=18"
51
+ "node": ">=20.19"
37
52
  },
38
53
  "files": [
39
54
  "dist",
@@ -45,10 +60,26 @@
45
60
  "types": "./dist/index.d.ts",
46
61
  "import": "./dist/index.js"
47
62
  },
63
+ "./auto": {
64
+ "types": "./dist/auto.d.ts",
65
+ "import": "./dist/auto.js"
66
+ },
67
+ "./devtools": {
68
+ "types": "./dist/devtools.d.ts",
69
+ "import": "./dist/devtools.js"
70
+ },
48
71
  "./element": {
49
72
  "types": "./dist/element.d.ts",
50
73
  "import": "./dist/element.js"
51
74
  },
75
+ "./routes": {
76
+ "types": "./dist/routes.d.ts",
77
+ "import": "./dist/routes.js"
78
+ },
79
+ "./iframe": {
80
+ "types": "./dist/iframe.d.ts",
81
+ "import": "./dist/iframe.js"
82
+ },
52
83
  "./react": {
53
84
  "types": "./dist/react.d.ts",
54
85
  "import": "./dist/react.js"
@@ -80,6 +111,14 @@
80
111
  "./testing": {
81
112
  "types": "./dist/testing.d.ts",
82
113
  "import": "./dist/testing.js"
114
+ },
115
+ "./sentry": {
116
+ "types": "./dist/sentry.d.ts",
117
+ "import": "./dist/sentry.js"
118
+ },
119
+ "./otel": {
120
+ "types": "./dist/otel.d.ts",
121
+ "import": "./dist/otel.js"
83
122
  }
84
123
  },
85
124
  "publishConfig": {
@@ -97,6 +136,7 @@
97
136
  "react-dom": ">=18",
98
137
  "solid-js": ">=1.8",
99
138
  "svelte": ">=5",
139
+ "typescript": ">=5",
100
140
  "vite": ">=5",
101
141
  "vue": ">=3.3"
102
142
  },
@@ -127,6 +167,9 @@
127
167
  },
128
168
  "vite": {
129
169
  "optional": true
170
+ },
171
+ "typescript": {
172
+ "optional": true
130
173
  }
131
174
  },
132
175
  "devDependencies": {
@@ -137,10 +180,12 @@
137
180
  "@arethetypeswrong/cli": "^0.18.5",
138
181
  "@size-limit/preset-small-lib": "^11.2.0",
139
182
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
183
+ "@tailwindcss/vite": "^4.3.3",
140
184
  "@testing-library/dom": "^10.4.2",
141
185
  "@types/node": "^22.20.5",
142
186
  "@types/react": "^19.0.0",
143
187
  "@types/react-dom": "^19.0.0",
188
+ "@vitest/coverage-v8": "4.1.11",
144
189
  "happy-dom": "^20.0.0",
145
190
  "preact": "^10.29.8",
146
191
  "publint": "^0.3.25",
@@ -150,6 +195,7 @@
150
195
  "size-limit": "^11.2.0",
151
196
  "solid-js": "^1.9.17",
152
197
  "svelte": "^5.57.2",
198
+ "tailwindcss": "^4.3.3",
153
199
  "tsup": "^8.5.0",
154
200
  "typescript": "~5.9.0",
155
201
  "vite": "^8.0.0",
@@ -157,10 +203,82 @@
157
203
  "vue": "^3.5.0"
158
204
  },
159
205
  "size-limit": [
206
+ {
207
+ "name": "host mínimo",
208
+ "path": "dist/index.js",
209
+ "import": "{ configure, createSlot }",
210
+ "ignore": [
211
+ "./shadow-*",
212
+ "./overrides-*",
213
+ "./sri-*",
214
+ "./dedupe-*",
215
+ "./contract-*",
216
+ "./expose-*",
217
+ "./capture-*"
218
+ ],
219
+ "limit": "4.6 kB"
220
+ },
160
221
  {
161
222
  "name": "núcleo",
162
223
  "path": "dist/index.js",
163
- "limit": "5 kB"
224
+ "import": "{ RemoteError, __reset, component, configure, createEventBus, createSlot, defineRemote, events, html, loadRemote, mountRemote, navigate, preload, register, render, unsafeHTML }",
225
+ "ignore": [
226
+ "./shadow-*",
227
+ "./sri-*",
228
+ "./dedupe-*",
229
+ "./contract-*",
230
+ "./expose-*",
231
+ "./capture-*"
232
+ ],
233
+ "limit": "5.73 kB"
234
+ },
235
+ {
236
+ "name": "SRI e dedupe (sob demanda, com as dependências)",
237
+ "path": "dist/sri-*.js",
238
+ "limit": "2.4 kB"
239
+ },
240
+ {
241
+ "name": "dedupe (sob demanda, para hosts que oferecem dependências)",
242
+ "path": "dist/dedupe-*.js",
243
+ "limit": "0.67 kB"
244
+ },
245
+ {
246
+ "name": "host mínimo + store",
247
+ "path": "dist/index.js",
248
+ "import": "{ configure, createSlot, provide, shared, batch }",
249
+ "ignore": [
250
+ "./shadow-*",
251
+ "./overrides-*",
252
+ "./sri-*",
253
+ "./dedupe-*",
254
+ "./contract-*",
255
+ "./expose-*",
256
+ "./capture-*"
257
+ ],
258
+ "limit": "5.29 kB"
259
+ },
260
+ {
261
+ "name": "host mínimo + store + persist + syncTabs",
262
+ "path": "dist/index.js",
263
+ "import": "{ configure, createSlot, provide, shared, batch, persist, syncTabs }",
264
+ "ignore": [
265
+ "./shadow-*",
266
+ "./overrides-*",
267
+ "./sri-*",
268
+ "./dedupe-*",
269
+ "./contract-*",
270
+ "./expose-*",
271
+ "./capture-*"
272
+ ],
273
+ "limit": "5.51 kB"
274
+ },
275
+ {
276
+ "name": "estilos do Shadow DOM (além do núcleo)",
277
+ "path": "dist/shadow-*.js",
278
+ "ignore": [
279
+ "./chunk-*"
280
+ ],
281
+ "limit": "1.22 kB"
164
282
  },
165
283
  {
166
284
  "name": "react",
@@ -168,30 +286,82 @@
168
286
  "import": "{ Remote, reactRemote }",
169
287
  "ignore": [
170
288
  "react",
171
- "react-dom"
289
+ "react-dom",
290
+ "./shadow-*",
291
+ "./sri-*",
292
+ "./dedupe-*",
293
+ "./contract-*",
294
+ "./expose-*",
295
+ "./capture-*"
172
296
  ],
173
- "limit": "6 kB"
297
+ "limit": "6.2 kB"
174
298
  },
175
299
  {
176
300
  "name": "vue",
177
301
  "path": "dist/vue.js",
178
302
  "import": "{ VitralRemote, vueRemote }",
179
303
  "ignore": [
180
- "vue"
304
+ "vue",
305
+ "./shadow-*",
306
+ "./sri-*",
307
+ "./dedupe-*",
308
+ "./contract-*",
309
+ "./expose-*",
310
+ "./capture-*"
181
311
  ],
182
- "limit": "6 kB"
312
+ "limit": "6.08 kB"
183
313
  },
184
314
  {
185
315
  "name": "element",
186
316
  "path": "dist/element.js",
187
317
  "import": "{ defineVitralElement }",
318
+ "ignore": [
319
+ "./shadow-*",
320
+ "./sri-*",
321
+ "./dedupe-*",
322
+ "./contract-*",
323
+ "./expose-*",
324
+ "./capture-*"
325
+ ],
326
+ "limit": "6.32 kB"
327
+ },
328
+ {
329
+ "name": "devtools",
330
+ "path": "dist/devtools.js",
331
+ "import": "{ devtools }",
332
+ "limit": "2 kB"
333
+ },
334
+ {
335
+ "name": "auto",
336
+ "path": "dist/auto.js",
337
+ "limit": "6.07 kB",
338
+ "ignore": [
339
+ "./shadow-*",
340
+ "./overrides-*",
341
+ "./sri-*",
342
+ "./dedupe-*",
343
+ "./contract-*",
344
+ "./expose-*",
345
+ "./capture-*"
346
+ ]
347
+ },
348
+ {
349
+ "name": "routes",
350
+ "path": "dist/routes.js",
351
+ "import": "{ routes }",
352
+ "limit": "8.67 kB"
353
+ },
354
+ {
355
+ "name": "iframe",
356
+ "path": "dist/iframe.js",
357
+ "import": "{ enableIframe }",
188
358
  "limit": "6 kB"
189
359
  }
190
360
  ],
191
361
  "scripts": {
192
362
  "build": "tsup",
193
- "test": "vitest run",
194
- "typecheck": "tsc --noEmit",
363
+ "test": "vitest run --coverage",
364
+ "typecheck": "tsc --noEmit && tsc -p test/types",
195
365
  "lint:pkg": "publint --strict && attw --pack --profile esm-only",
196
366
  "size": "size-limit"
197
367
  }