@absolutejs/absolute 0.19.0-beta.823 → 0.19.0-beta.824
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-DKTQIb/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-DKTQIb/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-DKTQIb/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
@@ -23,13 +23,21 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const id = registry.nextRouteId();
|
|
26
|
-
|
|
26
|
+
const registrationOrder = Number(id.slice(1));
|
|
27
27
|
|
|
28
28
|
const fullPattern = $derived(joinBasepath(registry.basepath, path));
|
|
29
29
|
const compiled = $derived(compilePattern(fullPattern));
|
|
30
30
|
|
|
31
|
+
// Register synchronously at script-body time so SSR (which doesn't
|
|
32
|
+
// run $effect) sees the registration. The `pattern` field will reflect
|
|
33
|
+
// the current $derived value at registration; we update it in $effect
|
|
34
|
+
// on the client to track path/basepath changes.
|
|
35
|
+
registry.register(id, {
|
|
36
|
+
pattern: compiled,
|
|
37
|
+
registrationOrder
|
|
38
|
+
});
|
|
39
|
+
|
|
31
40
|
$effect(() => {
|
|
32
|
-
registrationOrder = Number(id.slice(1));
|
|
33
41
|
registry.register(id, {
|
|
34
42
|
pattern: compiled,
|
|
35
43
|
registrationOrder
|
|
@@ -38,14 +46,10 @@
|
|
|
38
46
|
|
|
39
47
|
onDestroy(() => registry.deregister(id));
|
|
40
48
|
|
|
49
|
+
const match = $derived(matchPattern<Path>(compiled, page.url.pathname));
|
|
41
50
|
const isWinner = $derived(registry.isWinner(id));
|
|
42
|
-
const match = $derived(
|
|
43
|
-
isWinner
|
|
44
|
-
? matchPattern<Path>(compiled, page.url.pathname)
|
|
45
|
-
: { matched: false as const }
|
|
46
|
-
);
|
|
47
51
|
</script>
|
|
48
52
|
|
|
49
|
-
{#if match.matched}
|
|
53
|
+
{#if isWinner && match.matched}
|
|
50
54
|
{@render content(match.params)}
|
|
51
55
|
{/if}
|
package/package.json
CHANGED