vitral 0.2.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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/angular.d.ts +3 -2
  3. package/dist/angular.js +7 -6
  4. package/dist/auto.js +7 -6
  5. package/dist/capture-JYFERAPL.js +42 -0
  6. package/dist/{chunk-6Y3VMWHH.js → chunk-3YXI3G34.js} +3 -3
  7. package/dist/{chunk-S5MZT5IT.js → chunk-AH7KNMBW.js} +1 -1
  8. package/dist/chunk-AKNNHQ2H.js +45 -0
  9. package/dist/{chunk-PX7PBCCT.js → chunk-GNHCZRQP.js} +7 -17
  10. package/dist/{chunk-NCONW6WS.js → chunk-I3VSKSAZ.js} +58 -30
  11. package/dist/{chunk-UTYAX6MU.js → chunk-IHTUM6LT.js} +2 -2
  12. package/dist/{chunk-HP6QWU6K.js → chunk-SDB5AZEI.js} +2 -2
  13. package/dist/{chunk-2XF5BKV3.js → chunk-TD4S3IHA.js} +23 -12
  14. package/dist/chunk-ZAC6QQI6.js +64 -0
  15. package/dist/cli.js +59 -9
  16. package/dist/contract-46EZFQPQ.js +17 -0
  17. package/dist/{dedupe-IWFIXRWG.js → dedupe-S7BHQMOZ.js} +4 -3
  18. package/dist/element.d.ts +3 -3
  19. package/dist/element.js +7 -6
  20. package/dist/{errors-KKB8FGCz.d.ts → errors-kjBv6IH_.d.ts} +7 -1
  21. package/dist/{events-DUdjhfps.d.ts → events-D5gs7rff.d.ts} +1 -1
  22. package/dist/expose-JUOUN5N5.js +15 -0
  23. package/dist/iframe.d.ts +1 -1
  24. package/dist/iframe.js +13 -10
  25. package/dist/index.d.ts +23 -21
  26. package/dist/index.js +5 -4
  27. package/dist/otel.d.ts +44 -0
  28. package/dist/otel.js +27 -0
  29. package/dist/preact.d.ts +5 -5
  30. package/dist/preact.js +6 -5
  31. package/dist/react.d.ts +12 -4
  32. package/dist/react.js +11 -6
  33. package/dist/routes.d.ts +3 -3
  34. package/dist/routes.js +5 -4
  35. package/dist/sentry.d.ts +25 -0
  36. package/dist/sentry.js +11 -0
  37. package/dist/{shadow-MYRJQLLY.js → shadow-6HELCHCJ.js} +37 -11
  38. package/dist/{slot-pB276oPt.d.ts → slot-DqXTwGbs.d.ts} +2 -2
  39. package/dist/solid.d.ts +4 -4
  40. package/dist/solid.js +6 -5
  41. package/dist/{sri-BVKZNX5Q.js → sri-JMX6JLQP.js} +6 -4
  42. package/dist/svelte.d.ts +5 -5
  43. package/dist/svelte.js +6 -5
  44. package/dist/testing.d.ts +2 -1
  45. package/dist/testing.js +5 -4
  46. package/dist/{types-BV-hUrms.d.ts → types-Czvm-siZ.d.ts} +63 -1
  47. package/dist/vite.d.ts +8 -0
  48. package/dist/vite.js +364 -35
  49. package/dist/vue.d.ts +10 -3
  50. package/dist/vue.js +10 -5
  51. package/package.json +54 -20
  52. package/dist/chunk-SFL6LTP3.js +0 -56
  53. package/dist/expose-53BEJB34.js +0 -14
package/package.json CHANGED
@@ -1,23 +1,33 @@
1
1
  {
2
2
  "name": "vitral",
3
- "version": "0.2.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": {
@@ -101,6 +111,14 @@
101
111
  "./testing": {
102
112
  "types": "./dist/testing.d.ts",
103
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"
104
122
  }
105
123
  },
106
124
  "publishConfig": {
@@ -194,9 +212,11 @@
194
212
  "./overrides-*",
195
213
  "./sri-*",
196
214
  "./dedupe-*",
197
- "./expose-*"
215
+ "./contract-*",
216
+ "./expose-*",
217
+ "./capture-*"
198
218
  ],
199
- "limit": "4.3 kB"
219
+ "limit": "4.6 kB"
200
220
  },
201
221
  {
202
222
  "name": "núcleo",
@@ -206,9 +226,11 @@
206
226
  "./shadow-*",
207
227
  "./sri-*",
208
228
  "./dedupe-*",
209
- "./expose-*"
229
+ "./contract-*",
230
+ "./expose-*",
231
+ "./capture-*"
210
232
  ],
211
- "limit": "5.4 kB"
233
+ "limit": "5.73 kB"
212
234
  },
213
235
  {
214
236
  "name": "SRI e dedupe (sob demanda, com as dependências)",
@@ -218,7 +240,7 @@
218
240
  {
219
241
  "name": "dedupe (sob demanda, para hosts que oferecem dependências)",
220
242
  "path": "dist/dedupe-*.js",
221
- "limit": "0.65 kB"
243
+ "limit": "0.67 kB"
222
244
  },
223
245
  {
224
246
  "name": "host mínimo + store",
@@ -229,9 +251,11 @@
229
251
  "./overrides-*",
230
252
  "./sri-*",
231
253
  "./dedupe-*",
232
- "./expose-*"
254
+ "./contract-*",
255
+ "./expose-*",
256
+ "./capture-*"
233
257
  ],
234
- "limit": "5 kB"
258
+ "limit": "5.29 kB"
235
259
  },
236
260
  {
237
261
  "name": "host mínimo + store + persist + syncTabs",
@@ -242,9 +266,11 @@
242
266
  "./overrides-*",
243
267
  "./sri-*",
244
268
  "./dedupe-*",
245
- "./expose-*"
269
+ "./contract-*",
270
+ "./expose-*",
271
+ "./capture-*"
246
272
  ],
247
- "limit": "5.2 kB"
273
+ "limit": "5.51 kB"
248
274
  },
249
275
  {
250
276
  "name": "estilos do Shadow DOM (além do núcleo)",
@@ -252,7 +278,7 @@
252
278
  "ignore": [
253
279
  "./chunk-*"
254
280
  ],
255
- "limit": "1 kB"
281
+ "limit": "1.22 kB"
256
282
  },
257
283
  {
258
284
  "name": "react",
@@ -264,7 +290,9 @@
264
290
  "./shadow-*",
265
291
  "./sri-*",
266
292
  "./dedupe-*",
267
- "./expose-*"
293
+ "./contract-*",
294
+ "./expose-*",
295
+ "./capture-*"
268
296
  ],
269
297
  "limit": "6.2 kB"
270
298
  },
@@ -277,9 +305,11 @@
277
305
  "./shadow-*",
278
306
  "./sri-*",
279
307
  "./dedupe-*",
280
- "./expose-*"
308
+ "./contract-*",
309
+ "./expose-*",
310
+ "./capture-*"
281
311
  ],
282
- "limit": "6 kB"
312
+ "limit": "6.08 kB"
283
313
  },
284
314
  {
285
315
  "name": "element",
@@ -289,9 +319,11 @@
289
319
  "./shadow-*",
290
320
  "./sri-*",
291
321
  "./dedupe-*",
292
- "./expose-*"
322
+ "./contract-*",
323
+ "./expose-*",
324
+ "./capture-*"
293
325
  ],
294
- "limit": "6.1 kB"
326
+ "limit": "6.32 kB"
295
327
  },
296
328
  {
297
329
  "name": "devtools",
@@ -302,20 +334,22 @@
302
334
  {
303
335
  "name": "auto",
304
336
  "path": "dist/auto.js",
305
- "limit": "6 kB",
337
+ "limit": "6.07 kB",
306
338
  "ignore": [
307
339
  "./shadow-*",
308
340
  "./overrides-*",
309
341
  "./sri-*",
310
342
  "./dedupe-*",
311
- "./expose-*"
343
+ "./contract-*",
344
+ "./expose-*",
345
+ "./capture-*"
312
346
  ]
313
347
  },
314
348
  {
315
349
  "name": "routes",
316
350
  "path": "dist/routes.js",
317
351
  "import": "{ routes }",
318
- "limit": "7.9 kB"
352
+ "limit": "8.67 kB"
319
353
  },
320
354
  {
321
355
  "name": "iframe",
@@ -1,56 +0,0 @@
1
- import {
2
- addLink
3
- } from "./chunk-PX7PBCCT.js";
4
- import {
5
- protocol
6
- } from "./chunk-GNPFWISJ.js";
7
-
8
- // src/core/css.ts
9
- var loadedCss = /* @__PURE__ */ new WeakMap();
10
- var cssText = /* @__PURE__ */ new Map();
11
- var noop = () => {
12
- };
13
- var adopts = () => typeof CSSStyleSheet !== "undefined" && "replaceSync" in CSSStyleSheet.prototype;
14
- function fetchCssText(href, integrity, priority) {
15
- let p = cssText.get(href);
16
- if (!p) {
17
- p = fetch(href, { credentials: "omit", integrity, priority }).then((r) => r.ok ? r.text() : "").catch(() => "");
18
- cssText.set(href, p);
19
- }
20
- return p;
21
- }
22
- function prefetchCss(urls, shadow, sri = {}, priority = "auto") {
23
- for (const href of urls) {
24
- if (shadow && adopts()) void fetchCssText(href, sri[href], priority);
25
- else if (!document.querySelector(`link[href="${href}"]`)) addLink("preload", href, { as: "style", integrity: sri[href] ?? "", fetchPriority: priority });
26
- }
27
- }
28
- function injectStyles(urls, root, el, styles, sri = {}) {
29
- return root ? import("./shadow-MYRJQLLY.js").then((m) => m.attachStyles(root, el, urls, protocol().settings().styles, styles, sri)) : injectCss(urls, null, sri).then(() => noop);
30
- }
31
- function injectCss(urls, root, sri = {}) {
32
- const owner = root ?? document;
33
- let seen = loadedCss.get(owner);
34
- if (!seen) loadedCss.set(owner, seen = /* @__PURE__ */ new Map());
35
- const parent = root ?? document.head;
36
- return Promise.all(
37
- urls.map((href) => {
38
- let p = seen.get(href);
39
- if (!p) {
40
- p = new Promise((resolve) => {
41
- const link = addLink("stylesheet", href, { integrity: sri[href] ?? "" }, parent);
42
- link.onload = link.onerror = () => resolve();
43
- });
44
- seen.set(href, p);
45
- }
46
- return p;
47
- })
48
- );
49
- }
50
-
51
- export {
52
- fetchCssText,
53
- prefetchCss,
54
- injectStyles,
55
- injectCss
56
- };
@@ -1,14 +0,0 @@
1
- import {
2
- resolveModule,
3
- resolveTarget,
4
- splitName
5
- } from "./chunk-HP6QWU6K.js";
6
- import "./chunk-2XF5BKV3.js";
7
- import "./chunk-SFL6LTP3.js";
8
- import "./chunk-PX7PBCCT.js";
9
- import "./chunk-GNPFWISJ.js";
10
- export {
11
- resolveModule,
12
- resolveTarget,
13
- splitName
14
- };