@askrjs/askr 0.0.65 → 0.0.67

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 (72) hide show
  1. package/dist/actions/index.d.ts +1 -1
  2. package/dist/actions/index.js +1 -1
  3. package/dist/{authoring-CXMPffwN.js → authoring-uaJ556aG.js} +2 -2
  4. package/dist/benchmark.d.ts +1 -0
  5. package/dist/benchmark.js +7 -7
  6. package/dist/boot/index.d.ts +7 -6
  7. package/dist/boot/index.js +1 -1
  8. package/dist/{boot-OnYuVVfg.js → boot-DjTa12LD.js} +15 -13
  9. package/dist/{cleanup-B6KovDZZ.js → cleanup-B0kFA4Fv.js} +3 -2
  10. package/dist/component-cleanup-1ZFoLLHt.js +141 -0
  11. package/dist/{component-internal-CbALfPGD.js → component-internal-CPjM4n8M.js} +23 -3
  12. package/dist/components/index.d.ts +1 -2
  13. package/dist/control/index.d.ts +1 -1
  14. package/dist/control/index.js +1 -1
  15. package/dist/{control-B5xu8v4m.d.ts → control-BjYBlytA.d.ts} +0 -1
  16. package/dist/{control-KVP6LMEQ.js → control-CA45Yvvu.js} +3 -3
  17. package/dist/{control-CMzFPMjr.d.ts → control-DO-iBEtV.d.ts} +0 -1
  18. package/dist/{csp-nonce-C-8E85El.js → csp-nonce-HGZ0vbqT.js} +1 -1
  19. package/dist/data/index.js +1 -1
  20. package/dist/{data-DvYo_dHd.js → data-DHt_zO1G.js} +2 -2
  21. package/dist/{deferred-B71c2eio.js → deferred-zHtUheIQ.js} +29 -27
  22. package/dist/{effect-D_4zf_wy.js → effect-CFUzIpqX.js} +1 -1
  23. package/dist/fastlane-BTcFCMnm.js +147 -0
  24. package/dist/{for-internal-B2rBq6yB.js → for-internal-BtK9Htl0.js} +4 -3
  25. package/dist/foundations/icon/index.d.ts +3 -21
  26. package/dist/foundations/index.d.ts +1 -1
  27. package/dist/foundations/index.js +1 -1
  28. package/dist/foundations/interactions/index.d.ts +31 -26
  29. package/dist/foundations/state/index.d.ts +1 -2
  30. package/dist/foundations/state/index.js +1 -1
  31. package/dist/foundations/structures/index.d.ts +1 -1
  32. package/dist/foundations/structures/index.js +1 -1
  33. package/dist/fx/index.d.ts +0 -1
  34. package/dist/{index-NKPpdRh9.d.ts → index-BFnTM1a8.d.ts} +2 -1
  35. package/dist/{index-Bjm0__Rr.d.ts → index-DSClfSoC.d.ts} +3 -7
  36. package/dist/{index-Byqjltu2.d.ts → index-Dh6ZF9yW.d.ts} +1 -2
  37. package/dist/{index-PgRn5wmg.d.ts → index-DjusBb1I.d.ts} +45 -5
  38. package/dist/index.d.ts +4 -4
  39. package/dist/index.js +8 -8
  40. package/dist/jsx-dev-runtime.d.ts +2 -1
  41. package/dist/jsx-runtime-X2SX2y8V.d.ts +2 -0
  42. package/dist/{jsx-runtime-iTU73uwP.d.ts → jsx-runtime-aYZ8zb4q.d.ts} +2 -1
  43. package/dist/jsx-runtime.d.ts +1 -1
  44. package/dist/{component-lifecycle-DEMPihoZ.js → lifecycle-batch-COgl8jMS.js} +3 -160
  45. package/dist/{lifecycle-operations-Dj5lK1K7.js → lifecycle-operations-SlPEK68H.js} +1 -1
  46. package/dist/{navigate-DTZ2SM8_.js → navigate-CJySBpA9.js} +12 -56
  47. package/dist/navigate-CV-RDqYP.d.ts +20 -0
  48. package/dist/{portal-D2tPWNrC.js → portal-D7TC986A.js} +3 -2
  49. package/dist/{fastlane-C8PYPotF.js → readable-BYSoWJSv.js} +2 -146
  50. package/dist/{renderer-aUD-acDe.js → renderer-Dwkk68c5.js} +25 -12
  51. package/dist/{resource-operation-Dz2Nxi1q.js → resource-operation-BJiLoLYZ.js} +3 -3
  52. package/dist/resources/index.d.ts +0 -1
  53. package/dist/resources/index.js +2 -2
  54. package/dist/{route-matching-C93To416.js → route-matching-DLBWDeXX.js} +2 -4
  55. package/dist/router/index.d.ts +21 -16
  56. package/dist/router/index.js +45 -3
  57. package/dist/{router-eRoaj11J.d.ts → router-C0XQA62W.d.ts} +8 -5
  58. package/dist/{selector-pApF_lGd.js → selector-DueeR6Oz.js} +1 -1
  59. package/dist/ssg/index.d.ts +22 -11
  60. package/dist/ssg/index.js +3 -3
  61. package/dist/ssr/index.d.ts +6 -5
  62. package/dist/ssr/index.js +1 -1
  63. package/dist/{ssr-C0hzqhY8.js → ssr-vE-KUgDV.js} +13 -21
  64. package/dist/{state-Cc5HumQ0.js → state-CVuQVjvK.js} +2 -1
  65. package/dist/testing/index.d.ts +1 -2
  66. package/dist/testing/index.js +2 -2
  67. package/dist/types-DEhT-Nrv.d.ts +63 -0
  68. package/dist/{verify-hydration-BdKE9Hi8.js → verify-hydration-ChyEiBAn.js} +1 -1
  69. package/package.json +1 -1
  70. package/dist/jsx-runtime-BVVgDSdq.d.ts +0 -1
  71. package/dist/navigate-BVDCzOuB.d.ts +0 -34
  72. package/dist/types-4k3RFEaC.d.ts +0 -19
@@ -1,143 +1,5 @@
1
- import { b as isDevelopmentEnvironment, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
2
- import { a as cleanupReadableSubscriptions, c as finalizeReadableSubscriptionsFromSnapshot, i as cleanupReadableSubscriptionSources, t as isBulkCommitActive } from "./fastlane-C8PYPotF.js";
3
- import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-CC3cojX9.js";
4
- //#region src/runtime/state-diagnostics.ts
5
- /**
6
- * Report state cells that were never read during a component's completed
7
- * lifetime. A branch that has not rendered yet is not evidence that its state
8
- * is unused, so this diagnostic belongs at unmount rather than every commit.
9
- */
10
- function warnUnusedStateReads(instance) {
11
- if (isProductionEnvironment() || !instance.mounted) return;
12
- const stateValues = instance.stateValues;
13
- if (!stateValues) return;
14
- for (let i = 0; i < stateValues.length; i++) {
15
- const state = stateValues[i];
16
- const diagnosticEligible = state?._unusedStateDiagnosticEligible;
17
- const hasCommittedUsage = (state?._readers?.size ?? 0) > 0 || (state?._derivedSubscribers?.size ?? 0) > 0;
18
- if (state && diagnosticEligible !== false && !state._hasEverBeenRead && !hasCommittedUsage) {
19
- const warnings = instance.devWarningsEmitted ??= /* @__PURE__ */ new Set();
20
- const key = `unused-state:${i}`;
21
- if (warnings.has(key)) continue;
22
- warnings.add(key);
23
- try {
24
- const name = instance.fn?.name || "<anonymous>";
25
- logger.warn(`[askr] Unused state variable detected in ${name} at index ${i}. State should be read during render or removed.`);
26
- } catch {
27
- logger.warn("[askr] Unused state variable detected. State should be read during render or removed.");
28
- }
29
- }
30
- }
31
- }
32
- //#endregion
33
- //#region src/runtime/component-cleanup.ts
34
- /**
35
- * Component cleanup and owned child-scope bookkeeping.
36
- */
37
- /**
38
- * Dispose an inactive ownership generation without swapping it back onto the
39
- * component instance that now represents a different live route.
40
- */
41
- function cleanupComponentGeneration(instance, generation) {
42
- const savedScope = clearCurrentComponentScope();
43
- try {
44
- const cleanupErrors = instance.cleanupStrict ? [] : void 0;
45
- const recordCleanupError = (message, err) => {
46
- if (cleanupErrors) cleanupErrors.push(err);
47
- else if (isDevelopmentEnvironment()) logger.warn(message, err);
48
- };
49
- const ownedChildScopes = generation.ownedChildScopes;
50
- if (ownedChildScopes && ownedChildScopes.size > 0) {
51
- for (const scope of ownedChildScopes) try {
52
- scope.dispose();
53
- } catch (err) {
54
- recordCleanupError("[Askr] child scope cleanup threw:", err);
55
- }
56
- ownedChildScopes.clear();
57
- }
58
- try {
59
- cleanupReadableSubscriptionSources(instance, generation.readSources, generation.ownershipGeneration);
60
- } catch (err) {
61
- recordCleanupError("[Askr] readable subscription cleanup threw:", err);
62
- }
63
- const cleanupFns = generation.cleanupFns;
64
- generation.cleanupFns = void 0;
65
- if (cleanupFns) for (const cleanup of cleanupFns) try {
66
- cleanup();
67
- } catch (err) {
68
- recordCleanupError("[Askr] cleanup function threw:", err);
69
- }
70
- try {
71
- if (generation.abortController && !generation.abortController.signal.aborted) generation.abortController.abort();
72
- } catch (err) {
73
- recordCleanupError("[Askr] abort controller cleanup threw:", err);
74
- }
75
- generation.abortController = null;
76
- if (cleanupErrors && cleanupErrors.length > 0) throw new AggregateError(cleanupErrors, `Cleanup failed for component ${instance.id}`);
77
- } finally {
78
- restoreCurrentComponentScope(savedScope);
79
- }
80
- }
81
- /**
82
- * Clean up component resources on unmount or route changes.
83
- */
84
- function cleanupComponent(instance) {
85
- const savedScope = clearCurrentComponentScope();
86
- try {
87
- warnUnusedStateReads(instance);
88
- const cleanupErrors = instance.cleanupStrict ? [] : void 0;
89
- const recordCleanupError = (message, err) => {
90
- if (cleanupErrors) cleanupErrors.push(err);
91
- else if (isDevelopmentEnvironment()) logger.warn(message, err);
92
- };
93
- const ownedChildScopes = instance._ownedChildScopes;
94
- if (ownedChildScopes && ownedChildScopes.size > 0) {
95
- instance._ownedChildScopes = /* @__PURE__ */ new Set();
96
- for (const scope of ownedChildScopes) try {
97
- scope.dispose();
98
- } catch (err) {
99
- recordCleanupError("[Askr] child scope cleanup threw:", err);
100
- }
101
- }
102
- const cleanupFns = instance.cleanupFns;
103
- instance.cleanupFns = void 0;
104
- if (cleanupFns) for (const cleanup of cleanupFns) try {
105
- cleanup();
106
- } catch (err) {
107
- recordCleanupError("[Askr] cleanup function threw:", err);
108
- }
109
- try {
110
- cleanupReadableSubscriptions(instance);
111
- } catch (err) {
112
- recordCleanupError("[Askr] readable subscription cleanup threw:", err);
113
- }
114
- try {
115
- if (instance.abortController && !instance.abortController.signal.aborted) instance.abortController.abort();
116
- } catch (err) {
117
- recordCleanupError("[Askr] abort controller cleanup threw:", err);
118
- }
119
- instance.abortController = null;
120
- instance.lifecycleGeneration++;
121
- instance.evaluationGeneration++;
122
- instance.mountOperations = void 0;
123
- instance.commitOperations = void 0;
124
- instance.lifecycleSlots = void 0;
125
- instance.hasPendingUpdate = false;
126
- instance.notifyUpdate = null;
127
- instance._placeholder = void 0;
128
- instance.mounted = false;
129
- if (cleanupErrors && cleanupErrors.length > 0) throw new AggregateError(cleanupErrors, `Cleanup failed for component ${instance.id}`);
130
- } finally {
131
- restoreCurrentComponentScope(savedScope);
132
- }
133
- }
134
- function registerOwnedChildScope(instance, scope) {
135
- (instance._ownedChildScopes ??= /* @__PURE__ */ new Set()).add(scope);
136
- }
137
- function unregisterOwnedChildScope(instance, scope) {
138
- instance._ownedChildScopes?.delete(scope);
139
- }
140
- //#endregion
1
+ import { v as logger } from "./access-ePqdQqkV.js";
2
+ import { a as finalizeReadableSubscriptionsFromSnapshot } from "./readable-BYSoWJSv.js";
141
3
  //#region src/common/promise.ts
142
4
  function isPromiseLike(value) {
143
5
  return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
@@ -367,23 +229,4 @@ function discardLifecycleCommitBatch(batch) {
367
229
  }
368
230
  }
369
231
  //#endregion
370
- //#region src/runtime/component-lifecycle.ts
371
- function registerCommitOperationForInstance(instance, operation) {
372
- if (instance) {
373
- if (isBulkCommitActive()) {
374
- if (isDevelopmentEnvironment()) throw new Error("registerCommitOperation called during bulk commit fast-lane");
375
- return;
376
- }
377
- (instance.commitOperations ??= []).push(operation);
378
- }
379
- }
380
- function commitLifecycleForInstance(instance, wasFirstMount) {
381
- if ((instance.mountOperations?.length ?? 0) === 0 && (instance.commitOperations?.length ?? 0) === 0) return;
382
- if (enqueueLifecycleCommitForInstance(instance, wasFirstMount)) return;
383
- executeCommittedLifecycleOperations(instance, wasFirstMount);
384
- }
385
- function commitRenderedComponent(instance) {
386
- if (instance.mounted && (instance.commitOperations?.length ?? 0) > 0) commitLifecycleForInstance(instance, false);
387
- }
388
- //#endregion
389
- export { registerOwnedChildScope as _, captureInlineRenderSnapshot as a, finalizeInlineReadSubscriptions as c, registerLifecycleRollback as d, registerLifecycleTransaction as f, cleanupComponentGeneration as g, cleanupComponent as h, beginLifecycleCommitBatch as i, flushLifecycleCommitBatch as l, isPromiseLike as m, commitRenderedComponent as n, discardLifecycleCommitBatch as o, discardCommitOperations as p, registerCommitOperationForInstance as r, drainLifecycleCommitErrors as s, commitLifecycleForInstance as t, getCurrentLifecycleCommitBatch as u, unregisterOwnedChildScope as v };
232
+ export { enqueueLifecycleCommitForInstance as a, getCurrentLifecycleCommitBatch as c, discardCommitOperations as d, executeCommittedLifecycleOperations as f, drainLifecycleCommitErrors as i, registerLifecycleRollback as l, captureInlineRenderSnapshot as n, finalizeInlineReadSubscriptions as o, isPromiseLike as p, discardLifecycleCommitBatch as r, flushLifecycleCommitBatch as s, beginLifecycleCommitBatch as t, registerLifecycleTransaction as u };
@@ -1,4 +1,4 @@
1
- import { a as registerCommitOperation } from "./component-internal-CbALfPGD.js";
1
+ import { a as registerCommitOperation } from "./component-internal-CPjM4n8M.js";
2
2
  import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-CC3cojX9.js";
3
3
  import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
4
4
  //#region src/runtime/lifecycle-operations.ts
@@ -1,16 +1,17 @@
1
1
  import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
2
- import { f as notifyReadableReaders, i as cleanupReadableSubscriptionSources, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
3
2
  import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
4
- import { r as executeComponent } from "./component-internal-CbALfPGD.js";
3
+ import { r as executeComponent } from "./component-internal-CPjM4n8M.js";
4
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, t as cleanupReadableSubscriptionSources, u as recordReadableRead } from "./readable-BYSoWJSv.js";
5
5
  import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-CC3cojX9.js";
6
- import { g as cleanupComponentGeneration, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, s as drainLifecycleCommitErrors } from "./component-lifecycle-DEMPihoZ.js";
7
- import { _ as teardownNodeSubtree } from "./cleanup-B6KovDZZ.js";
8
- import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-B71c2eio.js";
6
+ import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-1ZFoLLHt.js";
7
+ import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-COgl8jMS.js";
8
+ import { _ as teardownNodeSubtree } from "./cleanup-B0kFA4Fv.js";
9
+ import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-zHtUheIQ.js";
9
10
  import { n as getActiveRenderContext } from "./render-context-Clw3rFiO.js";
10
11
  import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
11
- import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-D2tPWNrC.js";
12
- import { t as CspNonceScope } from "./csp-nonce-C-8E85El.js";
13
- import { c as deepFreeze, g as getActiveRoutes, j as lockRouteRegistration, l as makeQuery, n as computeMatchesFromRoutes, r as computeRouteActivityMatches, u as parseLocation } from "./route-matching-C93To416.js";
12
+ import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-D7TC986A.js";
13
+ import { t as CspNonceScope } from "./csp-nonce-HGZ0vbqT.js";
14
+ import { c as deepFreeze, g as getActiveRoutes, j as lockRouteRegistration, l as makeQuery, n as computeMatchesFromRoutes, r as computeRouteActivityMatches, u as parseLocation } from "./route-matching-DLBWDeXX.js";
14
15
  //#region src/common/app-render-runtime.ts
15
16
  const stagedRouteLocations = /* @__PURE__ */ new WeakMap();
16
17
  function createAppRenderRuntime(input = {}) {
@@ -150,10 +151,7 @@ function collectRouteActivityMatches(pathname, apps = registeredApps) {
150
151
  const matches = [];
151
152
  const seenPaths = /* @__PURE__ */ new Set();
152
153
  for (const app of apps) {
153
- const appMatches = computeRouteActivityMatches(pathname, {
154
- manifest: app.registry.manifest,
155
- routes: app.registry.routes
156
- });
154
+ const appMatches = computeRouteActivityMatches(pathname, { registry: app.registry });
157
155
  for (const match of appMatches) {
158
156
  if (seenPaths.has(match.path)) continue;
159
157
  seenPaths.add(match.path);
@@ -794,7 +792,7 @@ function rerenderResolvedRoute(instance, pathname, href) {
794
792
  }
795
793
  function resolveAppRouteRequest(app, pathname, href, signal) {
796
794
  return resolveRouteRequest(href, {
797
- manifest: app.registry.manifest,
795
+ registry: app.registry,
798
796
  auth: app.auth,
799
797
  signal
800
798
  });
@@ -1075,48 +1073,6 @@ function applyPopStateNavigationTargets(requestId, previousHref, previousState,
1075
1073
  }
1076
1074
  }
1077
1075
  //#endregion
1078
- //#region src/router/route-query.ts
1079
- function getRouteQueryHistoryMode(options) {
1080
- if (options.history) return options.history;
1081
- return options.replace === false ? "push" : "replace";
1082
- }
1083
- function setRouteQueryValue(searchParams, key, value) {
1084
- searchParams.delete(key);
1085
- if (Array.isArray(value)) {
1086
- for (const entry of value) {
1087
- if (entry === null || entry === void 0) continue;
1088
- searchParams.append(key, String(entry));
1089
- }
1090
- return;
1091
- }
1092
- if (value === null || value === void 0) return;
1093
- searchParams.set(key, String(value));
1094
- }
1095
- function applyRouteQueryUpdates(searchParams, updates) {
1096
- if (typeof updates === "function") {
1097
- updates(searchParams);
1098
- return;
1099
- }
1100
- for (const [key, value] of Object.entries(updates)) setRouteQueryValue(searchParams, key, value);
1101
- }
1102
- function updateRouteQuery(updates, options = {}) {
1103
- if (typeof window === "undefined") return;
1104
- const url = parseTargetUrl(getWindowHref$1());
1105
- applyRouteQueryUpdates(url.searchParams, updates);
1106
- const href = `${url.pathname}${url.search}${url.hash}`;
1107
- if (href === getWindowHref$1()) return;
1108
- const historyMode = getRouteQueryHistoryMode(options);
1109
- if (historyMode === "push") saveScrollPosition(getCurrentHref());
1110
- const state = window.history.state && typeof window.history.state === "object" ? window.history.state : {};
1111
- window.history[historyMode === "replace" ? "replaceState" : "pushState"]({
1112
- ...state,
1113
- path: href
1114
- }, "", href);
1115
- setCurrentRouteLocation(url.pathname, href);
1116
- for (const app of getRegisteredAppsSnapshot()) syncAppRegistrationLocation(app, url.pathname, href);
1117
- syncRegisteredRouteSnapshot();
1118
- }
1119
- //#endregion
1120
1076
  //#region src/router/navigate.ts
1121
1077
  /**
1122
1078
  * Client-side navigation with History API
@@ -1183,4 +1139,4 @@ function initializeNavigation() {
1183
1139
  window.addEventListener("popstate", handlePopState);
1184
1140
  }
1185
1141
  //#endregion
1186
- export { resolveRouteMeta as a, registerAppInstance as c, setServerLocation as d, createAppRenderRuntime as f, reconcileRouteMeta as i, unregisterAppInstance as l, navigate as n, serializeRouteMeta as o, updateRouteQuery as r, configureScrollRestoration as s, initializeNavigation as t, currentRoute as u };
1142
+ export { currentRoute as _, serializeRouteMeta as a, getCurrentHref as c, parseTargetUrl as d, registerAppInstance as f, unregisterAppInstance as g, syncRegisteredRouteSnapshot as h, resolveRouteMeta as i, getRegisteredAppsSnapshot as l, syncAppRegistrationLocation as m, navigate as n, configureScrollRestoration as o, setCurrentRouteLocation as p, reconcileRouteMeta as r, saveScrollPosition as s, initializeNavigation as t, getWindowHref$1 as u, setServerLocation as v, createAppRenderRuntime as y };
@@ -0,0 +1,20 @@
1
+ import "./router-C0XQA62W.js";
2
+ //#region src/router/navigation-scroll.d.ts
3
+ type NavigationScrollBehavior = 'top' | 'preserve';
4
+ type HistoryScrollBehavior = 'restore' | 'top' | 'preserve';
5
+ type ScrollRestorationOptions = {
6
+ navigation?: NavigationScrollBehavior;
7
+ history?: HistoryScrollBehavior;
8
+ };
9
+ //#endregion
10
+ //#region src/router/navigation-targets.d.ts
11
+ type NavigateOptions = {
12
+ history?: 'push' | 'replace';
13
+ replace?: boolean;
14
+ scroll?: NavigationScrollBehavior;
15
+ };
16
+ //#endregion
17
+ //#region src/router/navigate.d.ts
18
+ declare function navigate(path: string, options?: NavigateOptions): void;
19
+ //#endregion
20
+ export { ScrollRestorationOptions as a, NavigationScrollBehavior as i, NavigateOptions as n, HistoryScrollBehavior as r, navigate as t };
@@ -1,7 +1,8 @@
1
1
  import { o as getRuntimeRenderer } from "./access-ePqdQqkV.js";
2
- import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
2
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BYSoWJSv.js";
3
3
  import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-CC3cojX9.js";
4
- import { f as registerLifecycleTransaction, h as cleanupComponent, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-DEMPihoZ.js";
4
+ import { t as cleanupComponent } from "./component-cleanup-1ZFoLLHt.js";
5
+ import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-COgl8jMS.js";
5
6
  //#region src/runtime/portal.ts
6
7
  function createPortalSlot() {
7
8
  let currentValue;
@@ -1,17 +1,5 @@
1
- import { b as isDevelopmentEnvironment, l as runRuntimeWithSyncProgress, n as enqueueRuntimeTask, o as getRuntimeRenderer, s as markRuntimeReactivePropsDirtySource, u as setRuntimeBulkCommitProbe } from "./access-ePqdQqkV.js";
2
- import { n as Fragment } from "./jsx-CUpRxrLH.js";
1
+ import { n as enqueueRuntimeTask, s as markRuntimeReactivePropsDirtySource } from "./access-ePqdQqkV.js";
3
2
  import { p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
4
- //#region src/runtime/dev-namespace.ts
5
- /**
6
- * Set a value in the dev namespace (no-op in production).
7
- */
8
- const setDevValue = () => {};
9
- /**
10
- * Increment a counter in the dev namespace (no-op in production).
11
- * Safely handles non-number values by resetting to 1.
12
- */
13
- const incDevCounter = () => {};
14
- //#endregion
15
3
  //#region src/runtime/readable.ts
16
4
  const DEVELOPMENT_BUILD_ENABLED = false;
17
5
  function markReadableUsage(source) {
@@ -208,136 +196,4 @@ function notifyReadableReaders(source, skipInstance, skipOwnedBy) {
208
196
  return didScheduleUpdate;
209
197
  }
210
198
  //#endregion
211
- //#region src/runtime/fastlane.ts
212
- let _bulkCommitActive = false;
213
- let _appliedParents = null;
214
- function enterBulkCommit() {
215
- _bulkCommitActive = true;
216
- _appliedParents = /* @__PURE__ */ new WeakSet();
217
- }
218
- function exitBulkCommit() {
219
- _bulkCommitActive = false;
220
- _appliedParents = null;
221
- }
222
- function isBulkCommitActive() {
223
- return _bulkCommitActive;
224
- }
225
- function markFastPathApplied(parent) {
226
- if (!_appliedParents) return;
227
- try {
228
- _appliedParents.add(parent);
229
- } catch (e) {}
230
- }
231
- function finalizeReadSubscriptions(instance) {
232
- finalizeReadableSubscriptions(instance);
233
- }
234
- /**
235
- * Attempt to execute a runtime fast-lane for a single component's synchronous
236
- * render result. Returns true if the fast-lane was used and commit was done.
237
- *
238
- * Preconditions (checked conservatively):
239
- * - The render result is an intrinsic element root with keyed children
240
- * - The renderer's fast-path heuristics indicate to use the fast-path
241
- * - No mount operations are pending on the component instance
242
- * - No child vnodes are component functions (avoid async/component mounts)
243
- */
244
- function unwrapFragmentForFastPath(vnode) {
245
- if (!vnode || typeof vnode !== "object" || !("type" in vnode)) return vnode;
246
- const v = vnode;
247
- if (typeof v.type === "symbol" && (v.type === Fragment || String(v.type) === "Symbol(askr.fragment)")) {
248
- const children = v.props?.children ?? v.children;
249
- if (Array.isArray(children) && children.length > 0) {
250
- for (const child of children) if (child && typeof child === "object" && "type" in child) {
251
- if (typeof child.type === "string") return child;
252
- }
253
- }
254
- }
255
- return vnode;
256
- }
257
- function classifyUpdate(instance, result) {
258
- const unwrappedResult = unwrapFragmentForFastPath(result);
259
- if (!unwrappedResult || typeof unwrappedResult !== "object" || !("type" in unwrappedResult)) return {
260
- useFastPath: false,
261
- reason: "not-vnode"
262
- };
263
- const vnode = unwrappedResult;
264
- if (vnode == null || typeof vnode.type !== "string") return {
265
- useFastPath: false,
266
- reason: "not-intrinsic"
267
- };
268
- const parent = instance.target;
269
- if (!parent) return {
270
- useFastPath: false,
271
- reason: "no-root"
272
- };
273
- const firstChild = parent.children[0];
274
- if (!firstChild) return {
275
- useFastPath: false,
276
- reason: "no-first-child"
277
- };
278
- if (firstChild.tagName.toLowerCase() !== String(vnode.type).toLowerCase()) return {
279
- useFastPath: false,
280
- reason: "root-tag-mismatch"
281
- };
282
- const children = vnode.props?.children ?? vnode.children;
283
- if (!Array.isArray(children)) return {
284
- useFastPath: false,
285
- reason: "no-children-array"
286
- };
287
- for (const c of children) if (typeof c === "object" && c !== null && "type" in c && typeof c.type === "function") return {
288
- useFastPath: false,
289
- reason: "component-child-present"
290
- };
291
- if ((instance.mountOperations?.length ?? 0) > 0) return {
292
- useFastPath: false,
293
- reason: "pending-mounts"
294
- };
295
- if ((instance.commitOperations?.length ?? 0) > 0) return {
296
- useFastPath: false,
297
- reason: "pending-lifecycle-commits"
298
- };
299
- const renderer = getRuntimeRenderer();
300
- try {
301
- renderer.populateKeyMapForElement(firstChild);
302
- } catch {}
303
- const oldKeyMap = renderer.getKeyMapForElement(firstChild);
304
- const decision = renderer.isKeyedReorderFastPathEligible(firstChild, children, oldKeyMap);
305
- if (!decision.useFastPath || decision.totalKeyed < 128) return {
306
- ...decision,
307
- useFastPath: false,
308
- reason: "renderer-declined"
309
- };
310
- return {
311
- ...decision,
312
- useFastPath: true
313
- };
314
- }
315
- function commitReorderOnly(instance, result) {
316
- const renderer = getRuntimeRenderer();
317
- enterBulkCommit();
318
- try {
319
- runRuntimeWithSyncProgress(() => {
320
- renderer.evaluate(result, instance.target);
321
- try {
322
- finalizeReadSubscriptions(instance);
323
- } catch (e) {
324
- if (isDevelopmentEnvironment()) throw e;
325
- }
326
- });
327
- return true;
328
- } finally {
329
- exitBulkCommit();
330
- }
331
- }
332
- function tryRuntimeFastLaneSync(instance, result) {
333
- if (!classifyUpdate(instance, result).useFastPath) return false;
334
- try {
335
- return commitReorderOnly(instance, result);
336
- } catch (err) {
337
- if (isDevelopmentEnvironment()) throw err;
338
- return false;
339
- }
340
- }
341
- setRuntimeBulkCommitProbe(isBulkCommitActive);
342
- //#endregion
343
- export { withFineGrainedReadTracking as _, cleanupReadableSubscriptions as a, finalizeReadableSubscriptionsFromSnapshot as c, markReadableUsage as d, notifyReadableReaders as f, withDerivedReadTracking as g, syncDerivedDependencySubscriptions as h, cleanupReadableSubscriptionSources as i, markReactivePropsDirtySource as l, shouldCoalesceFineGrainedItemReads as m, markFastPathApplied as n, clearDerivedDependencySubscriptions as o, recordReadableRead as p, tryRuntimeFastLaneSync as r, finalizeReadableSubscriptions as s, isBulkCommitActive as t, markReadableDerivedSubscribersDirty as u, incDevCounter as v, setDevValue as y };
199
+ export { finalizeReadableSubscriptionsFromSnapshot as a, markReadableUsage as c, shouldCoalesceFineGrainedItemReads as d, syncDerivedDependencySubscriptions as f, finalizeReadableSubscriptions as i, notifyReadableReaders as l, withFineGrainedReadTracking as m, cleanupReadableSubscriptions as n, markReactivePropsDirtySource as o, withDerivedReadTracking as p, clearDerivedDependencySubscriptions as r, markReadableDerivedSubscribersDirty as s, cleanupReadableSubscriptionSources as t, recordReadableRead as u };
@@ -1,16 +1,17 @@
1
1
  import { t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
2
2
  import { n as _isDOMElement, t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
3
3
  import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as configureRuntimeRenderer, i as getDefaultRuntimeInstance, n as enqueueRuntimeTask, v as logger, y as getRuntimeEnv } from "./access-ePqdQqkV.js";
4
- import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-C8PYPotF.js";
4
+ import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-BTcFCMnm.js";
5
5
  import { n as Fragment, r as STATIC_CHILDREN } from "./jsx-CUpRxrLH.js";
6
- import { f as getVNodeContextFrame, g as withContext, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as markVNodeTreeWithContextFrame, t as captureInlineRenderSnapshot, u as getCurrentContextFrame } from "./component-internal-CbALfPGD.js";
6
+ import { _ as withContext, d as getCurrentContextFrame, i as mountInstanceInline, m as markVNodeTreeWithContextFrame, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot } from "./component-internal-CPjM4n8M.js";
7
7
  import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
8
- import { d as registerLifecycleRollback, f as registerLifecycleTransaction, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-DEMPihoZ.js";
9
- import { _ as createChildScope, a as registerForStateTransaction, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as disposeChildScope, y as rerenderChildScope } from "./for-internal-B2rBq6yB.js";
10
- import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-D_4zf_wy.js";
11
- import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-B6KovDZZ.js";
8
+ import { t as cleanupComponent } from "./component-cleanup-1ZFoLLHt.js";
9
+ import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-COgl8jMS.js";
10
+ import { _ as createChildScope, a as registerForStateTransaction, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as disposeChildScope, y as rerenderChildScope } from "./for-internal-BtK9Htl0.js";
11
+ import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-CFUzIpqX.js";
12
+ import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-B0kFA4Fv.js";
12
13
  import { t as getPublicAttributeName } from "./attr-names-CjhzmHOn.js";
13
- import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-C-8E85El.js";
14
+ import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-HGZ0vbqT.js";
14
15
  //#region src/runtime/error-boundary.ts
15
16
  function createBoundaryReset(instance) {
16
17
  return () => {
@@ -3179,16 +3180,19 @@ function discardHydrationListenerTransaction(transaction) {
3179
3180
  transaction.stages[index].rollback();
3180
3181
  } catch {}
3181
3182
  }
3183
+ function getCurrentHydrationListenerTransaction() {
3184
+ return currentTransaction?.active ? currentTransaction : null;
3185
+ }
3182
3186
  //#endregion
3183
3187
  //#region src/renderer/prop-bindings.ts
3184
3188
  const reactivePropRegistry = /* @__PURE__ */ new Set();
3185
- function addTrackedListener(el, eventName, handler, capture = false, fresh = false) {
3186
- const useDelegation = !capture && isEventDelegationEnabled() && isDelegatedEvent(eventName);
3189
+ function addTrackedListener(el, eventName, handler, capture = false, fresh = false, forceDirect = false) {
3190
+ const useDelegation = !forceDirect && !capture && isEventDelegationEnabled() && isDelegatedEvent(eventName);
3187
3191
  const listenerKey = getEventListenerKey(eventName, capture);
3188
- if (stageHydrationListener({
3189
- kind: useDelegation ? "delegated" : "direct",
3192
+ if (!forceDirect && stageHydrationListener({
3193
+ kind: "direct",
3190
3194
  eventName,
3191
- publish: () => addTrackedListener(el, eventName, handler, capture, fresh),
3195
+ publish: () => addTrackedListener(el, eventName, handler, capture, fresh, true),
3192
3196
  rollback: () => removeTrackedListener(el, eventName, capture)
3193
3197
  })) return;
3194
3198
  if (useDelegation) {
@@ -3387,6 +3391,15 @@ function syncElementPropBindings(el, domVNode, props, usesReactiveChildren) {
3387
3391
  if (eventProp && listenerKey) {
3388
3392
  const eventName = eventProp.eventName;
3389
3393
  const eventCapture = eventProp.capture;
3394
+ if (getCurrentHydrationListenerTransaction() && !existingListeners?.has(listenerKey) && !getDelegatedHandlerForElement(el, eventName)) {
3395
+ stageHydrationListener({
3396
+ kind: "direct",
3397
+ eventName,
3398
+ publish: () => addTrackedListener(el, eventName, value, eventCapture, false, true),
3399
+ rollback: () => removeTrackedListener(el, eventName, eventCapture)
3400
+ });
3401
+ continue;
3402
+ }
3390
3403
  const useDelegation = !eventCapture && isEventDelegationEnabled() && isDelegatedEvent(eventName);
3391
3404
  if (useDelegation) (desiredDelegatedEventNames ??= /* @__PURE__ */ new Set()).add(eventName);
3392
3405
  if (useDelegation) {
@@ -1,10 +1,10 @@
1
1
  import { t as enqueueRuntimeLane, v as logger } from "./access-ePqdQqkV.js";
2
- import { h as withAsyncResourceContext, u as getCurrentContextFrame } from "./component-internal-CbALfPGD.js";
2
+ import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, g as withAsyncResourceContext } from "./component-internal-CPjM4n8M.js";
3
3
  import { f as getCurrentComponentInstance } from "./component-scope-CC3cojX9.js";
4
- import { m as isPromiseLike, r as registerCommitOperationForInstance } from "./component-lifecycle-DEMPihoZ.js";
4
+ import { p as isPromiseLike } from "./lifecycle-batch-COgl8jMS.js";
5
5
  import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
6
6
  import { i as getNextRenderKey, l as throwSSRDataMissing, n as getActiveRenderContext, r as getCurrentRenderData, u as SSRDataMissingError } from "./render-context-Clw3rFiO.js";
7
- import { t as state } from "./state-Cc5HumQ0.js";
7
+ import { t as state } from "./state-CVuQVjvK.js";
8
8
  //#region src/runtime/resource-cell.ts
9
9
  /**
10
10
  * Pure, component-agnostic ResourceCell state machine.
@@ -1,5 +1,4 @@
1
1
  import { t as getSignal } from "../component-scope-CvPba6O6.js";
2
-
3
2
  //#region src/runtime/resource-operation.d.ts
4
3
  interface ResourceResult<T> {
5
4
  value: T | null;
@@ -1,4 +1,4 @@
1
1
  import { g as getSignal } from "../component-scope-CC3cojX9.js";
2
- import { t as resource } from "../resource-operation-Dz2Nxi1q.js";
3
- import { a as stream, c as windowFocused, i as routeActive, n as documentVisible, o as task, r as on, s as timer, t as capture } from "../lifecycle-operations-Dj5lK1K7.js";
2
+ import { t as resource } from "../resource-operation-BJiLoLYZ.js";
3
+ import { a as stream, c as windowFocused, i as routeActive, n as documentVisible, o as task, r as on, s as timer, t as capture } from "../lifecycle-operations-SlPEK68H.js";
4
4
  export { capture, documentVisible, getSignal, on, resource, routeActive, stream, task, timer, windowFocused };
@@ -477,10 +477,8 @@ function computeMatchesFromRouteRecords(pathname, routeRecords) {
477
477
  namespace: bestMatch.record.options.namespace
478
478
  }];
479
479
  }
480
- function computeRouteActivityMatches(pathname, options = {}) {
481
- if (options.manifest) return computeMatchesFromRouteRecords(pathname, options.manifest.records);
482
- if (options.routes) return computeMatchesFromRoutes(pathname, options.routes);
483
- return computeMatchesFromRoutes(pathname, getActiveRoutes());
480
+ function computeRouteActivityMatches(pathname, options) {
481
+ return computeMatchesFromRouteRecords(pathname, options.registry.manifest.records);
484
482
  }
485
483
  function resolveRoute(pathname) {
486
484
  const normalized = pathname.endsWith("/") && pathname !== "/" ? pathname.slice(0, -1) : pathname;