@absolutejs/absolute 0.20.0-beta.179 → 0.20.0-beta.180
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/CHANGELOG.md +23 -0
- package/changelog.json +45 -0
- package/dist/angular/browser.js +2 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +21 -6
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +21 -6
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +5357 -4945
- package/dist/build.js.map +27 -24
- package/dist/cli/build-fntmf42w.js +495 -0
- package/dist/cli/{buildDepVendor-qvsh6dsj.js → buildDepVendor-qnwfct22.js} +5 -3
- package/dist/cli/buildReactServerComponents-fq6mw10d.js +13 -0
- package/dist/cli/{compile-p5yv6ecp.js → compile-54rb8szn.js} +94 -125
- package/dist/cli/config/server.js +10 -5
- package/dist/cli/{dev-2hbcsvkp.js → dev-6s6g5tnk.js} +13 -14
- package/dist/cli/{expoProject-1qtw97js.js → expoProject-acgfaj3f.js} +2 -1
- package/dist/cli/generatedDir-239r7csr.js +9 -0
- package/dist/cli/{index-cksezef8.js → index-0gd30trc.js} +105 -851
- package/dist/cli/index-2wvysvjc.js +40 -0
- package/dist/cli/index-42xjh6gg.js +282 -0
- package/dist/cli/{index-qw98g1p6.js → index-47e8fwha.js} +4 -1
- package/dist/cli/index-65kqn88a.js +8 -0
- package/dist/cli/{index-2bxfhs32.js → index-6f448d7m.js} +0 -26
- package/dist/cli/index-972xxwgj.js +16 -0
- package/dist/cli/index-aqe25w4h.js +39 -0
- package/dist/cli/index-assqancr.js +51 -0
- package/dist/cli/{index-2shf4aya.js → index-c8rcfe5a.js} +4 -6
- package/dist/cli/index-cba1cemz.js +8 -0
- package/dist/cli/{index-3ff5ztt3.js → index-djkrb7pc.js} +1 -7
- package/dist/cli/index-dkfwkpc8.js +138 -0
- package/dist/cli/{index-92g14j47.js → index-dw44xa4x.js} +2 -1
- package/dist/cli/index-evsnq0n2.js +17 -0
- package/dist/cli/index-fxwf3n2v.js +224 -0
- package/dist/cli/{index-zyd80s3h.js → index-js2hksgv.js} +21 -295
- package/dist/cli/{index-bp60baze.js → index-jyap0bhv.js} +1 -1
- package/dist/cli/{index-9dzdbbfc.js → index-kx2d067c.js} +8 -6
- package/dist/cli/index-pb31zan6.js +9 -0
- package/dist/cli/index-sq0478b0.js +281 -0
- package/dist/cli/index-va274tsf.js +7 -0
- package/dist/cli/{index-yd672jyq.js → index-w6xsk8cv.js} +4 -1
- package/dist/cli/index-w79snsxv.js +461 -0
- package/dist/cli/index-x1vvn549.js +835 -0
- package/dist/cli/index-xf9sfr8a.js +243 -0
- package/dist/cli/index-ycqdxy55.js +754 -0
- package/dist/cli/index-z74cqxz0.js +131 -0
- package/dist/cli/index.js +10 -9
- package/dist/cli/{islands-6zgb7501.js → islands-17tfx8jf.js} +6 -17
- package/dist/cli/{ls-0hfx323m.js → ls-0wr74w0b.js} +10 -58
- package/dist/cli/{mobile-93vaawcz.js → mobile-hpqpy61f.js} +11 -8
- package/dist/cli/{prerender-010z771p.js → prerender-w65xp6h8.js} +2 -1
- package/dist/cli/{rewriteImports-z6629aww.js → rewriteImports-np2d2kvc.js} +4 -11
- package/dist/cli/rewriteImportsPlugin-c6hcb3x6.js +12 -0
- package/dist/cli/{start-asxb79rc.js → start-mbn2zgs2.js} +6 -4
- package/dist/cli/staticAnalyzeSpaRoutes-2nev05m1.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-6vgzp0rs.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-f85q9dqk.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-yakmg22g.js +7 -0
- package/dist/cli/{typecheck-m2j4tkdk.js → typecheck-488txsfc.js} +92 -18
- package/dist/cli/vueCompiler-8bzdmf08.js +7 -0
- package/dist/client/chunks/{react-khr6ewhr.js → react-g8r290b8.js} +37 -2
- package/dist/client/chunks/react-g8r290b8.js.map +10 -0
- package/dist/client/chunks/vue-zcpmka32.js +85 -0
- package/dist/client/chunks/vue-zcpmka32.js.map +10 -0
- package/dist/client/index.js +58 -10
- package/dist/client/index.js.map +4 -4
- package/dist/dev/client/handlers/vue.ts +116 -0
- package/dist/index.js +2472 -2058
- package/dist/index.js.map +26 -23
- package/dist/islands/browser.js +2 -2
- package/dist/islands/browser.js.map +3 -3
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +2 -2
- package/dist/react/browser.js.map +3 -3
- package/dist/react/index.js +42 -11
- package/dist/react/index.js.map +10 -10
- package/dist/react/server.js +42 -11
- package/dist/react/server.js.map +10 -10
- package/dist/src/angular/ssrRender.d.ts +2 -2
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/build/generateManifest.d.ts +15 -0
- package/dist/src/build/manifestKeys.d.ts +22 -0
- package/dist/src/cli/add/dependencies.d.ts +1 -1
- package/dist/src/cli/scripts/typecheck.d.ts +11 -0
- package/dist/src/client/hydrators/react.d.ts +10 -0
- package/dist/src/client/hydrators/vue.d.ts +13 -0
- package/dist/src/client/islandRuntime.d.ts +1 -1
- package/dist/src/core/islandManifest.d.ts +4 -0
- package/dist/src/core/islandPageContext.d.ts +8 -2
- package/dist/src/core/lookup.d.ts +16 -1
- package/dist/src/dev/importCost/instrument.d.ts +1 -1
- package/dist/src/dev/manifestKeysRefresher.d.ts +6 -0
- package/dist/src/dev/spaRouteRefresh.d.ts +13 -0
- package/dist/src/mobile/androidConformance.d.ts +1 -1
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +5 -0
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/src/vue/components/Image.d.ts +4 -4
- package/dist/src/vue/components/StreamSlot.d.ts +1 -1
- package/dist/src/vue/components/SuspenseSlot.d.ts +2 -2
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +4 -0
- package/dist/svelte/browser.js +2 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +25 -9
- package/dist/svelte/index.js.map +8 -8
- package/dist/svelte/server.js +25 -9
- package/dist/svelte/server.js.map +8 -8
- package/dist/types/globals.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/island.d.ts +1 -1
- package/dist/types/manifest.d.ts +25 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +21 -6
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +21 -6
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
- package/dist/client/chunks/react-khr6ewhr.js.map +0 -10
- package/dist/client/chunks/vue-db6ppn1f.js +0 -32
- package/dist/client/chunks/vue-db6ppn1f.js.map +0 -10
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/client/hydrators/react.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { type ComponentType, createElement, type ReactNode } from 'react';\nimport {\n\tcreateRoot,\n\thydrateRoot,\n\ttype Root as ReactRoot\n} from 'react-dom/client';\nimport { flushSync } from 'react-dom';\nimport { prepareBrowserTranslationHydration } from '../browserTranslation';\n\nconst reactIslandRoots = new WeakMap<HTMLElement, ReactRoot>();\n\nconst isPropsRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\n// The island marker is rendered by the host page's React tree as a\n// `dangerouslySetInnerHTML` boundary, so the host root tags it with internal\n// fiber expandos (`__reactFiber$…`, `__reactProps$…`). React refuses to create\n// a second root on a node it already manages that also sets\n// dangerouslySetInnerHTML (\"Cannot use a ref … as a container … if that element\n// also sets dangerouslySetInnerHTML\"). Detaching those expandos hands ownership\n// of the marker (and its opaque SSR children) to the island root before it\n// hydrates. The host root never recurses into the boundary, so it has no fibers\n// for the children and won't reconcile this subtree again.\nconst HOST_REACT_EXPANDO_PREFIXES = [\n\t'__reactFiber$',\n\t'__reactProps$',\n\t'__reactContainer$',\n\t'__reactEvents$',\n\t'__reactListeners$',\n\t'__reactHandles$'\n];\n\nconst detachFromHostReactRoot = (element: HTMLElement) => {\n\tfor (const key of Object.keys(element)) {\n\t\tconst isHostExpando = HOST_REACT_EXPANDO_PREFIXES.some((prefix) =>\n\t\t\tkey.startsWith(prefix)\n\t\t);\n\t\tif (!isHostExpando) continue;\n\t\tReflect.deleteProperty(element, key);\n\t}\n};\n\nexport const hydrateReactIsland = (\n\tcomponent: ComponentType<Record<string, unknown>>,\n\telement: HTMLElement,\n\tprops: unknown\n) => {\n\tconst existingRoot = reactIslandRoots.get(element);\n\tif (existingRoot) {\n\t\texistingRoot.render(\n\t\t\tisPropsRecord(props)\n\t\t\t\t? createElement(component, props)\n\t\t\t\t: createElement(component)\n\t\t);\n\n\t\treturn;\n\t}\n\n\tdetachFromHostReactRoot(element);\n\tconst restoreTranslation = prepareBrowserTranslationHydration(element);\n\tconst hydrate = (elementToHydrate: ReactNode) => {\n\t\tlet root: ReactRoot | undefined;\n\t\tconst startHydration = () => {\n\t\t\troot = hydrateRoot(element, elementToHydrate);\n\t\t};\n\t\ttry {\n\t\t\tif (restoreTranslation.hasTranslation) flushSync(startHydration);\n\t\t\telse startHydration();\n\t\t} finally {\n\t\t\trestoreTranslation();\n\t\t}\n\t\tif (root !== undefined) reactIslandRoots.set(element, root);\n\t};\n\n\tif (!isPropsRecord(props)) {\n\t\thydrate(createElement(component));\n\n\t\treturn;\n\t}\n\n\thydrate(createElement(component, props));\n};\nexport const isReactComponent = (\n\tvalue: unknown\n): value is ComponentType<Record<string, unknown>> =>\n\ttypeof value === 'function';\n\n/** Dev HMR: replace a hydrated island with a fresh root rendering the\n * rebuilt component. Its local state starts over; island stores keep\n * theirs. A new root rather than `render()` on the old one: the host page\n * may have re-rendered the marker since, re-attaching its own React props\n * to it, and the old root's tree would then be reconciled against nodes\n * React no longer considers its own. */\nexport const remountReactIsland = (\n\tcomponent: ComponentType<Record<string, unknown>>,\n\telement: HTMLElement,\n\tprops: unknown\n) => {\n\ttry {\n\t\treactIslandRoots.get(element)?.unmount();\n\t} catch {\n\t\t// The old tree's nodes may already be gone; the marker is cleared\n\t\t// below either way.\n\t}\n\telement.replaceChildren();\n\tdetachFromHostReactRoot(element);\n\tconst root = createRoot(element);\n\t// Commit now, while the marker carries none of the host root's\n\t// expandos (see detachFromHostReactRoot): a host re-render in between\n\t// re-attaches them and React rejects the marker as a container.\n\tflushSync(() => {\n\t\troot.render(\n\t\t\tisPropsRecord(props)\n\t\t\t\t? createElement(component, props)\n\t\t\t\t: createElement(component)\n\t\t);\n\t});\n\treactIslandRoots.set(element, root);\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;AAAA;AACA;AAAA;AAAA;AAAA;AAKA;AAGA,IAAM,mBAAmB,IAAI;AAE7B,IAAM,gBAAgB,CAAC,UACtB,OAAO,UAAU,YAAY,UAAU;AAWxC,IAAM,8BAA8B;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,0BAA0B,CAAC,YAAyB;AAAA,EACzD,WAAW,OAAO,OAAO,KAAK,OAAO,GAAG;AAAA,IACvC,MAAM,gBAAgB,4BAA4B,KAAK,CAAC,WACvD,IAAI,WAAW,MAAM,CACtB;AAAA,IACA,IAAI,CAAC;AAAA,MAAe;AAAA,IACpB,QAAQ,eAAe,SAAS,GAAG;AAAA,EACpC;AAAA;AAGM,IAAM,qBAAqB,CACjC,WACA,SACA,UACI;AAAA,EACJ,MAAM,eAAe,iBAAiB,IAAI,OAAO;AAAA,EACjD,IAAI,cAAc;AAAA,IACjB,aAAa,OACZ,cAAc,KAAK,IAChB,cAAc,WAAW,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Apps = new WeakMap;
|
|
4
|
-
var isPropsRecord = (value) => typeof value === "object" && value !== null;
|
|
5
|
-
var hydrateVueIsland = (component, element, props) => {
|
|
6
|
-
if (vueIslandApps.has(element)) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const app = createSSRApp({
|
|
10
|
-
render: () => h(component, isPropsRecord(props) ? props : undefined)
|
|
11
|
-
});
|
|
12
|
-
app.mount(element);
|
|
13
|
-
vueIslandApps.set(element, app);
|
|
14
|
-
};
|
|
15
|
-
var isVueComponent = (value) => typeof value === "function" || isPropsRecord(value);
|
|
16
|
-
var remountVueIsland = (component, element, props) => {
|
|
17
|
-
vueIslandApps.get(element)?.unmount();
|
|
18
|
-
element.replaceChildren();
|
|
19
|
-
const app = createApp({
|
|
20
|
-
render: () => h(component, isPropsRecord(props) ? props : undefined)
|
|
21
|
-
});
|
|
22
|
-
app.mount(element);
|
|
23
|
-
vueIslandApps.set(element, app);
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
hydrateVueIsland,
|
|
27
|
-
isVueComponent,
|
|
28
|
-
remountVueIsland
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//# debugId=E472E1F9DB7F66A864756E2164756E21
|
|
32
|
-
//# sourceMappingURL=vue-db6ppn1f.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/client/hydrators/vue.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { createApp, createSSRApp, h, type App as VueApp } from 'vue';\n\nconst vueIslandApps = new WeakMap<HTMLElement, VueApp>();\n\nconst isPropsRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nexport const hydrateVueIsland = (\n\tcomponent: import('vue').Component<Record<string, unknown>>,\n\telement: HTMLElement,\n\tprops: unknown\n) => {\n\tif (vueIslandApps.has(element)) {\n\t\treturn;\n\t}\n\n\tconst app = createSSRApp({\n\t\trender: () => h(component, isPropsRecord(props) ? props : undefined)\n\t});\n\tapp.mount(element);\n\tvueIslandApps.set(element, app);\n};\nexport const isVueComponent = (\n\tvalue: unknown\n): value is import('vue').Component<Record<string, unknown>> =>\n\ttypeof value === 'function' || isPropsRecord(value);\n\n/** Dev HMR: replace a hydrated island with a fresh mount of the rebuilt\n * component. Its local state starts over; island stores keep theirs. */\nexport const remountVueIsland = (\n\tcomponent: import('vue').Component<Record<string, unknown>>,\n\telement: HTMLElement,\n\tprops: unknown\n) => {\n\tvueIslandApps.get(element)?.unmount();\n\telement.replaceChildren();\n\tconst app = createApp({\n\t\trender: () => h(component, isPropsRecord(props) ? props : undefined)\n\t});\n\tapp.mount(element);\n\tvueIslandApps.set(element, app);\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AAAA;AAEA,IAAM,gBAAgB,IAAI;AAE1B,IAAM,gBAAgB,CAAC,UACtB,OAAO,UAAU,YAAY,UAAU;AAEjC,IAAM,mBAAmB,CAC/B,WACA,SACA,UACI;AAAA,EACJ,IAAI,cAAc,IAAI,OAAO,GAAG;AAAA,IAC/B;AAAA,EACD;AAAA,EAEA,MAAM,MAAM,aAAa;AAAA,IACxB,QAAQ,MAAM,EAAE,WAAW,cAAc,KAAK,IAAI,QAAQ,SAAS;AAAA,EACpE,CAAC;AAAA,EACD,IAAI,MAAM,OAAO;AAAA,EACjB,cAAc,IAAI,SAAS,GAAG;AAAA;AAExB,IAAM,iBAAiB,CAC7B,UAEA,OAAO,UAAU,cAAc,cAAc,KAAK;AAI5C,IAAM,mBAAmB,CAC/B,WACA,SACA,UACI;AAAA,EACJ,cAAc,IAAI,OAAO,GAAG,QAAQ;AAAA,EACpC,QAAQ,gBAAgB;AAAA,EACxB,MAAM,MAAM,UAAU;AAAA,IACrB,QAAQ,MAAM,EAAE,WAAW,cAAc,KAAK,IAAI,QAAQ,SAAS;AAAA,EACpE,CAAC;AAAA,EACD,IAAI,MAAM,OAAO;AAAA,EACjB,cAAc,IAAI,SAAS,GAAG;AAAA;",
|
|
8
|
-
"debugId": "E472E1F9DB7F66A864756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|