@absolutejs/absolute 0.20.0-beta.174 → 0.20.0-beta.175
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 +60 -0
- package/dist/angular/browser.js +13 -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 +67 -8
- package/dist/angular/index.js.map +10 -8
- package/dist/angular/server.js +67 -8
- package/dist/angular/server.js.map +10 -8
- package/dist/build.js +312 -119
- package/dist/build.js.map +20 -18
- package/dist/cli/{compile-n6fs2vmx.js → compile-w2z6c9vt.js} +1 -1
- package/dist/cli/{dev-6h1f0mzq.js → dev-8br5mr7t.js} +16 -2
- package/dist/cli/{index-mqevg32w.js → index-6522t968.js} +21 -2
- package/dist/cli/{index-bhyd3ejc.js → index-7z1hh3fg.js} +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{islands-vk05sj6v.js → islands-bx67g15t.js} +4 -4
- package/dist/cli/{mobile-62b6j3j7.js → mobile-we5q51ey.js} +2 -2
- package/dist/cli/{start-jh6kyp92.js → start-srs11bm8.js} +2 -2
- package/dist/client/chunks/index-4j1snyh2.js +18 -0
- package/dist/client/chunks/index-4j1snyh2.js.map +10 -0
- package/dist/client/chunks/{index-6b66nzyf.js → index-a3rpg5kw.js} +6 -16
- package/dist/client/chunks/{index-6b66nzyf.js.map → index-a3rpg5kw.js.map} +3 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js → islands-mfjmdwnb.js} +11 -4
- package/dist/client/chunks/{islands-s2ta5ajb.js.map → islands-mfjmdwnb.js.map} +3 -3
- package/dist/client/chunks/{react-dcvkaba2.js → react-sprprqzs.js} +20 -4
- package/dist/client/chunks/react-sprprqzs.js.map +10 -0
- package/dist/client/chunks/svelte-6ewphsvj.js +30 -0
- package/dist/client/chunks/svelte-6ewphsvj.js.map +10 -0
- package/dist/client/chunks/{vue-a84fzp3v.js → vue-db6ppn1f.js} +14 -4
- package/dist/client/chunks/vue-db6ppn1f.js.map +10 -0
- package/dist/client/index.js +65 -8
- package/dist/client/index.js.map +4 -4
- package/dist/client/navigation.js +5 -3
- package/dist/client/navigation.js.map +2 -2
- package/dist/client/prefetch.js +1 -1
- package/dist/dev/client/handlers/islands.ts +85 -0
- package/dist/dev/client/hmrClient.ts +6 -0
- package/dist/index.js +448 -242
- package/dist/index.js.map +21 -19
- package/dist/islands/index.js +57 -10
- package/dist/islands/index.js.map +9 -7
- package/dist/react/browser.js +15 -4
- package/dist/react/browser.js.map +5 -5
- package/dist/react/components/client.js +506 -0
- package/dist/react/components/index.js +14 -15
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/components/server/index.js +728 -0
- package/dist/react/hooks/index.js +14 -15
- package/dist/react/hooks/index.js.map +4 -4
- package/dist/react/index.js +66 -6
- package/dist/react/index.js.map +11 -9
- package/dist/react/router/browser.js +7 -8
- package/dist/react/router/browser.js.map +4 -4
- package/dist/react/router/index.js +7 -8
- package/dist/react/router/index.js.map +4 -4
- package/dist/react/server.js +14 -1
- package/dist/react/server.js.map +4 -4
- package/dist/src/build/buildReactServerComponents.d.ts +4 -0
- package/dist/src/build/islandEntries.d.ts +5 -0
- package/dist/src/client/hydrators/react.d.ts +7 -0
- package/dist/src/client/hydrators/svelte.d.ts +3 -0
- package/dist/src/client/hydrators/vue.d.ts +3 -0
- package/dist/src/client/preserveIslandMarkup.d.ts +5 -0
- package/dist/src/core/islandServerGeneration.d.ts +3 -0
- package/dist/src/react/components/client.d.ts +4 -0
- package/dist/src/react/components/server/index.d.ts +8 -0
- package/dist/src/react/serverComponents/constants.d.ts +2 -1
- package/dist/svelte/index.js +66 -6
- package/dist/svelte/index.js.map +10 -8
- package/dist/svelte/server.js +38 -3
- package/dist/svelte/server.js.map +6 -5
- package/dist/types/build.d.ts +3 -2
- package/dist/types/globals.d.ts +15 -0
- package/dist/vue/browser.js +26 -16
- package/dist/vue/browser.js.map +5 -5
- package/dist/vue/index.js +65 -21
- package/dist/vue/index.js.map +10 -9
- package/package.json +1 -1
- package/dist/client/chunks/react-dcvkaba2.js.map +0 -10
- package/dist/client/chunks/svelte-4yfa5bxa.js +0 -17
- package/dist/client/chunks/svelte-4yfa5bxa.js.map +0 -10
- package/dist/client/chunks/vue-a84fzp3v.js.map +0 -10
package/dist/svelte/server.js
CHANGED
|
@@ -1155,10 +1155,25 @@ var init_lazyModule = __esm(() => {
|
|
|
1155
1155
|
LAZY_RESOLVED_KEY = Symbol.for("absolutejs.svelte.lazy-resolved");
|
|
1156
1156
|
});
|
|
1157
1157
|
|
|
1158
|
+
// src/core/islandServerGeneration.ts
|
|
1159
|
+
var readGeneration = () => globalThis.__absoluteIslandServerGeneration ?? 0, bumpIslandServerGeneration = () => {
|
|
1160
|
+
globalThis.__absoluteIslandServerGeneration = readGeneration() + 1;
|
|
1161
|
+
}, createIslandGenerationGuard = (reset) => {
|
|
1162
|
+
let seen = readGeneration();
|
|
1163
|
+
return () => {
|
|
1164
|
+
const current = readGeneration();
|
|
1165
|
+
if (current === seen)
|
|
1166
|
+
return current;
|
|
1167
|
+
seen = current;
|
|
1168
|
+
reset();
|
|
1169
|
+
return current;
|
|
1170
|
+
};
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1158
1173
|
// src/core/svelteServerModule.ts
|
|
1159
1174
|
import { mkdir, readdir } from "fs/promises";
|
|
1160
1175
|
import { basename, dirname as dirname2, extname as extname2, join as join3, relative as relative2, resolve as resolve3 } from "path";
|
|
1161
|
-
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
1176
|
+
var serverCacheRoot, compiledModuleCache, originalSourcePathCache, syncIslandGeneration, transpiler, ensureRelativeImportPath = (from, target) => {
|
|
1162
1177
|
const importPath = relative2(dirname2(from), target).replace(/\\/g, "/");
|
|
1163
1178
|
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
1164
1179
|
}, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
|
|
@@ -1225,7 +1240,9 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
1225
1240
|
}, getCachedModulePath = (sourcePath) => {
|
|
1226
1241
|
const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
1227
1242
|
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
1228
|
-
|
|
1243
|
+
const generation = syncIslandGeneration();
|
|
1244
|
+
const generationSuffix = generation > 0 ? `.g${generation}` : "";
|
|
1245
|
+
return join3(serverCacheRoot, `${normalizedSourcePath}${generationSuffix}.server.js`);
|
|
1229
1246
|
}, resolveSvelteImport = async (spec, from) => {
|
|
1230
1247
|
if (!spec.startsWith(".") && !spec.startsWith("/")) {
|
|
1231
1248
|
const resolved = resolvePackageImport(spec);
|
|
@@ -1257,6 +1274,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
|
|
|
1257
1274
|
}
|
|
1258
1275
|
await Bun.write(path, content);
|
|
1259
1276
|
}, compileSvelteServerModule = async (sourcePath) => {
|
|
1277
|
+
syncIslandGeneration();
|
|
1260
1278
|
const cachedModulePath = compiledModuleCache.get(sourcePath);
|
|
1261
1279
|
if (cachedModulePath) {
|
|
1262
1280
|
return cachedModulePath;
|
|
@@ -1339,6 +1357,10 @@ var init_svelteServerModule = __esm(() => {
|
|
|
1339
1357
|
serverCacheRoot = join3(process.cwd(), ".absolutejs", "islands", "svelte");
|
|
1340
1358
|
compiledModuleCache = new Map;
|
|
1341
1359
|
originalSourcePathCache = new Map;
|
|
1360
|
+
syncIslandGeneration = createIslandGenerationGuard(() => {
|
|
1361
|
+
compiledModuleCache.clear();
|
|
1362
|
+
originalSourcePathCache.clear();
|
|
1363
|
+
});
|
|
1342
1364
|
transpiler = new Bun.Transpiler({
|
|
1343
1365
|
loader: "ts",
|
|
1344
1366
|
target: "browser"
|
|
@@ -3645,6 +3667,17 @@ var defineFileRouteWith = (framework, route, render) => {
|
|
|
3645
3667
|
|
|
3646
3668
|
// src/core/lookup.ts
|
|
3647
3669
|
init_requestContext();
|
|
3670
|
+
var DOUBLED_RSC_SUFFIX = "RSCRSC";
|
|
3671
|
+
var warnedDoubledRscKeys = new Set;
|
|
3672
|
+
var warnDoubledRscKey = (source, name, assetPath) => {
|
|
3673
|
+
if (!name.endsWith(DOUBLED_RSC_SUFFIX))
|
|
3674
|
+
return;
|
|
3675
|
+
const current = name.slice(0, -"RSC".length);
|
|
3676
|
+
if (source[current] !== assetPath || warnedDoubledRscKeys.has(name))
|
|
3677
|
+
return;
|
|
3678
|
+
warnedDoubledRscKeys.add(name);
|
|
3679
|
+
console.warn(`[asset] key "${name}" is deprecated: React Server Components pages whose file name ends in RSC no longer get the suffix twice. Use asset(manifest, '${current}').`);
|
|
3680
|
+
};
|
|
3648
3681
|
var asset = (source, name) => {
|
|
3649
3682
|
const assetPath = source[name];
|
|
3650
3683
|
if (assetPath === undefined) {
|
|
@@ -3658,6 +3691,8 @@ var asset = (source, name) => {
|
|
|
3658
3691
|
console.warn(`[asset] key "${name}" not found in manifest (dev mode \u2014 skipping)`);
|
|
3659
3692
|
return "";
|
|
3660
3693
|
}
|
|
3694
|
+
if (!isProductionRuntime())
|
|
3695
|
+
warnDoubledRscKey(source, name, assetPath);
|
|
3661
3696
|
return assetPath;
|
|
3662
3697
|
};
|
|
3663
3698
|
|
|
@@ -4215,5 +4250,5 @@ export {
|
|
|
4215
4250
|
svelteFileRoute
|
|
4216
4251
|
};
|
|
4217
4252
|
|
|
4218
|
-
//# debugId=
|
|
4253
|
+
//# debugId=20CAA04A1EAF2FEF64756E2164756E21
|
|
4219
4254
|
//# sourceMappingURL=server.js.map
|