@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/dist/vue/server.js
CHANGED
|
@@ -837,6 +837,8 @@ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" :
|
|
|
837
837
|
const pathColor = options.framework ? getFrameworkColor(options.framework) : colors2.white;
|
|
838
838
|
message += ` ${pathColor}${formatPath(options.path)}${colors2.reset}`;
|
|
839
839
|
}
|
|
840
|
+
if (options?.detail)
|
|
841
|
+
message += ` ${options.detail}`;
|
|
840
842
|
if (options?.duration !== undefined) {
|
|
841
843
|
message += ` ${colors2.dim}(${options.duration}ms)${colors2.reset}`;
|
|
842
844
|
}
|
|
@@ -868,6 +870,16 @@ var colors2, frameworkColors, logTag = () => isDevelopmentRuntime() ? "[hmr]" :
|
|
|
868
870
|
log(message);
|
|
869
871
|
}, logPageBuild = (path, framework, duration) => {
|
|
870
872
|
log("page build", { duration, framework, path });
|
|
873
|
+
}, logRoutesUpdate = (path, framework, added, removed) => {
|
|
874
|
+
const changes = [
|
|
875
|
+
...added.map((route) => `${colors2.green}+${route}${colors2.reset}`),
|
|
876
|
+
...removed.map((route) => `${colors2.red}-${route}${colors2.reset}`)
|
|
877
|
+
];
|
|
878
|
+
log("routes update", {
|
|
879
|
+
detail: changes.length > 0 ? changes.join(" ") : undefined,
|
|
880
|
+
framework,
|
|
881
|
+
path
|
|
882
|
+
});
|
|
871
883
|
}, logScriptUpdate = (path, framework, duration) => {
|
|
872
884
|
log("script update", { duration, framework, path });
|
|
873
885
|
}, logServerReload = () => {
|
|
@@ -904,7 +916,7 @@ var init_logger = __esm(() => {
|
|
|
904
916
|
});
|
|
905
917
|
|
|
906
918
|
// src/core/islandManifest.ts
|
|
907
|
-
var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
|
|
919
|
+
var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", REACT_PAGE_ROOT_EVENT = "absolute:react-page-root", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
|
|
908
920
|
const entries = {};
|
|
909
921
|
let found = false;
|
|
910
922
|
for (const [key, value] of Object.entries(manifest)) {
|
|
@@ -978,13 +990,15 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
978
990
|
return "";
|
|
979
991
|
const renderedKeys = collectRenderedIslandStyleKeys(html);
|
|
980
992
|
return getIslandStyleManifestEntries(manifest).filter(([key]) => renderedKeys.has(key)).filter(([, href]) => !html.includes(`href="${href}"`)).map(([key, href]) => `<link rel="stylesheet" href="${href}" data-island-style="${key}"${nonceAttr()}>`).join("");
|
|
981
|
-
}, buildIslandsHeadMarkup = (manifest, html) => {
|
|
993
|
+
}, REACT_HOOK_STAND_IN, buildIslandsHeadMarkup = (manifest, html, host) => {
|
|
982
994
|
const styleLinks = buildIslandStyleLinks(manifest, html);
|
|
983
995
|
const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
|
|
984
|
-
const
|
|
996
|
+
const hostAssignment = host ? `;window.__ABS_ISLAND_HOST__ = ${JSON.stringify(host)}` : "";
|
|
997
|
+
const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}${hostAssignment}</script>`;
|
|
998
|
+
const reactHookScript = isProductionRuntime() ? "" : `<script${nonceAttr()}>${REACT_HOOK_STAND_IN}</script>`;
|
|
985
999
|
const bootstrapPath = getIslandBootstrapPath(manifest);
|
|
986
1000
|
const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
|
|
987
|
-
return `${styleLinks}${manifestScript}${islandStateScript}${bootstrapScript}`;
|
|
1001
|
+
return `${styleLinks}${manifestScript}${islandStateScript}${reactHookScript}${bootstrapScript}`;
|
|
988
1002
|
}, injectHeadMarkup = (html, markup) => {
|
|
989
1003
|
const closingHeadIndex = html.indexOf("</head>");
|
|
990
1004
|
if (closingHeadIndex >= 0) {
|
|
@@ -1171,7 +1185,7 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
|
|
|
1171
1185
|
const manifest = globalThis.__absoluteManifest;
|
|
1172
1186
|
if (!manifest)
|
|
1173
1187
|
return stream;
|
|
1174
|
-
const markup = buildIslandsHeadMarkup(manifest);
|
|
1188
|
+
const markup = buildIslandsHeadMarkup(manifest, undefined, options?.host);
|
|
1175
1189
|
if (options?.hasIslands === true) {
|
|
1176
1190
|
warnIfBootstrapMissing(manifest);
|
|
1177
1191
|
return pipeStreamWithHeadInjection(stream, markup);
|
|
@@ -1197,6 +1211,7 @@ var init_islandPageContext = __esm(() => {
|
|
|
1197
1211
|
"vue",
|
|
1198
1212
|
"angular"
|
|
1199
1213
|
];
|
|
1214
|
+
REACT_HOOK_STAND_IN = "if(!window.__REACT_DEVTOOLS_GLOBAL_HOOK__){var n=0;" + "window.__REACT_DEVTOOLS_GLOBAL_HOOK__={renderers:new Map(),supportsFiber:true," + "inject:function(r){n+=1;this.renderers.set(n,r);return n}," + "onScheduleFiberRoot:function(){},onCommitFiberRoot:function(){},onCommitFiberUnmount:function(){}}}";
|
|
1200
1215
|
});
|
|
1201
1216
|
|
|
1202
1217
|
// src/core/devRouteRegistrationCallsite.ts
|
|
@@ -3363,5 +3378,5 @@ export {
|
|
|
3363
3378
|
handleVuePageRequest
|
|
3364
3379
|
};
|
|
3365
3380
|
|
|
3366
|
-
//# debugId=
|
|
3381
|
+
//# debugId=105DF08B81BC052164756E2164756E21
|
|
3367
3382
|
//# sourceMappingURL=server.js.map
|