@askrjs/askr 0.0.91 → 0.0.92

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 (80) hide show
  1. package/dist/{access-Dpfoi4cA.js → access-DSkccuEI.js} +5 -2
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/index.js +3 -3
  4. package/dist/{activity-dKH6nlpj.js → activity-DodHdC0L.js} +7 -5
  5. package/dist/{activity-CF2_JvJs.d.ts → activity-DxUcygE5.d.ts} +1 -1
  6. package/dist/benchmark.d.ts +1 -1
  7. package/dist/benchmark.js +8 -8
  8. package/dist/boot/index.d.ts +3 -4
  9. package/dist/boot/index.js +1 -1
  10. package/dist/{boot-D3zVVWuN.js → boot-D71bjP4r.js} +27 -21
  11. package/dist/{cleanup-c837KVij.js → cleanup-DAAhJjx5.js} +8 -5
  12. package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-CJCfu5ed.js} +3 -3
  13. package/dist/{component-internal-C4uwwUaK.js → component-internal-DlAkCgBE.js} +5 -5
  14. package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
  15. package/dist/components/index.d.ts +2 -2
  16. package/dist/components/index.js +1 -1
  17. package/dist/control/index.d.ts +1 -1
  18. package/dist/control/index.js +1 -1
  19. package/dist/{control-CsGs2bLS.d.ts → control-CdzY49Q2.d.ts} +1 -1
  20. package/dist/{control-CON10J1p.js → control-Dv540XtV.js} +4 -4
  21. package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-ByMbWv8s.js} +1 -1
  22. package/dist/data/index.d.ts +1 -2
  23. package/dist/data/index.js +3 -3
  24. package/dist/{data-Bh_3OETq.js → data-DcikEH9N.js} +12 -12
  25. package/dist/{data-runtime-wbooGyu7.js → data-runtime-oIdQWnPW.js} +1 -1
  26. package/dist/{deferred-D6nZaIPs.js → deferred-B6CafO5u.js} +5 -5
  27. package/dist/{effect-lnxQIpJG.js → effect-BdZcHblj.js} +73 -14
  28. package/dist/{fastlane-CrfB3QG0.js → fastlane-B2s24fWt.js} +22 -3
  29. package/dist/{for-internal-Bsm0B8GZ.js → for-internal-T1C7jd7x.js} +6 -6
  30. package/dist/foundations/icon/index.d.ts +1 -2
  31. package/dist/foundations/index.d.ts +2 -2
  32. package/dist/foundations/index.js +1 -1
  33. package/dist/foundations/state/index.d.ts +1 -1
  34. package/dist/foundations/state/index.js +1 -1
  35. package/dist/foundations/structures/index.d.ts +2 -2
  36. package/dist/foundations/structures/index.js +1 -1
  37. package/dist/fx/index.js +2 -2
  38. package/dist/{types-iAmDSV6o.d.ts → index-2bk8nldG.d.ts} +63 -1
  39. package/dist/index-DA3g8lm8.d.ts +955 -0
  40. package/dist/{index-Cf2ANwPL.d.ts → index-oswRaMn6.d.ts} +2 -3
  41. package/dist/index.d.ts +4 -7
  42. package/dist/index.js +31 -16
  43. package/dist/jsx-dev-runtime.d.ts +2 -3
  44. package/dist/jsx-runtime-C_0v1pMN.d.ts +2 -0
  45. package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cfb2umb4.d.ts} +2 -3
  46. package/dist/jsx-runtime.d.ts +2 -2
  47. package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-Cyfd07rf.js} +2 -2
  48. package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-CQ8fsc94.js} +2 -2
  49. package/dist/{manifest-fBb2ynKL.js → manifest-Dv0bO6kg.js} +1 -1
  50. package/dist/{navigate-CnQMXze1.js → navigate-BbWj-QU-.js} +12 -10
  51. package/dist/{navigate-BO7M2iUG.d.ts → navigate-CZHPEUC4.d.ts} +1 -1
  52. package/dist/{query-registry-B4LpVtlT.js → query-registry-qm13pEdK.js} +1 -1
  53. package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
  54. package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
  55. package/dist/{resolution-C9A31xQi.js → resolution-B21kmOkp.js} +5 -5
  56. package/dist/{resource-operation-whZDJAYv.js → resource-operation-CaAttQqz.js} +5 -5
  57. package/dist/resources/index.d.ts +2 -2
  58. package/dist/resources/index.js +6 -6
  59. package/dist/{route-matching-xlgdQXg_.js → route-matching-Bo6UqG-5.js} +13 -4
  60. package/dist/router/index.d.ts +4 -6
  61. package/dist/router/index.js +7 -7
  62. package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
  63. package/dist/ssg/index.d.ts +1 -2
  64. package/dist/ssg/index.js +6 -6
  65. package/dist/ssr/index.d.ts +3 -5
  66. package/dist/ssr/index.js +1 -1
  67. package/dist/{ssr-DNJUPmMq.js → ssr-CaZfvQWn.js} +11 -11
  68. package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
  69. package/dist/{structures-m-cphWI-.js → structures-DKjkAmM5.js} +5 -5
  70. package/dist/testing/index.d.ts +2 -3
  71. package/dist/testing/index.js +6 -6
  72. package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
  73. package/dist/{verify-hydration-D8938Fw2.js → verify-hydration-CcF-HJil.js} +1 -1
  74. package/package.json +1 -1
  75. package/dist/control-D-FIa-n-.d.ts +0 -451
  76. package/dist/index-BU17hud9.d.ts +0 -52
  77. package/dist/index-CPlPDbEY.d.ts +0 -64
  78. package/dist/index-Izwp_ESC.d.ts +0 -458
  79. package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
  80. package/dist/types-CsPtBGWb.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-DzJEbYGE.js";
1
+ import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-4I3yEMkb.js";
2
2
  //#region src/common/env.ts
3
3
  function normalizeEnv(source) {
4
4
  if (!source) return {};
@@ -482,6 +482,9 @@ function runRuntimeHandlerScope(fn, flushMode = "defer") {
482
482
  function runRuntimeWithSyncProgress(fn) {
483
483
  return getRuntimeScheduler().runWithSyncProgress(fn);
484
484
  }
485
+ function isRuntimeSchedulerExecuting() {
486
+ return getRuntimeScheduler().isExecuting();
487
+ }
485
488
  function getRuntimeFlushVersion() {
486
489
  return getRuntimeScheduler().getFlushVersion();
487
490
  }
@@ -495,4 +498,4 @@ function markRuntimeReactivePropsDirtySource(source) {
495
498
  getRuntimeRenderer().markReactivePropsDirtySource(source);
496
499
  }
497
500
  //#endregion
498
- export { incrementPerfMetric as _, getRuntimeFlushVersion as a, isDevelopmentEnvironment as b, runRuntimeHandlerScope as c, AskrRuntime as d, configureRuntimeRenderer as f, addPerfDuration as g, scheduleEventHandler as h, getDefaultRuntimeInstance as i, runRuntimeWithSyncProgress as l, getDefaultRuntime as m, enqueueRuntimeTask as n, getRuntimeRenderer as o, createRuntime as p, flushRuntimeScheduler as r, markRuntimeReactivePropsDirtySource as s, enqueueRuntimeLane as t, setRuntimeBulkCommitProbe as u, logger as v, isProductionEnvironment as x, getRuntimeEnv as y };
501
+ export { isProductionEnvironment as S, addPerfDuration as _, getRuntimeFlushVersion as a, getRuntimeEnv as b, markRuntimeReactivePropsDirtySource as c, setRuntimeBulkCommitProbe as d, AskrRuntime as f, scheduleEventHandler as g, getDefaultRuntime as h, getDefaultRuntimeInstance as i, runRuntimeHandlerScope as l, createRuntime as m, enqueueRuntimeTask as n, getRuntimeRenderer as o, configureRuntimeRenderer as p, flushRuntimeScheduler as r, isRuntimeSchedulerExecuting as s, enqueueRuntimeLane as t, runRuntimeWithSyncProgress as u, incrementPerfMetric as v, isDevelopmentEnvironment as x, logger as y };
@@ -1,2 +1,2 @@
1
- import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-Izwp_ESC.js";
1
+ import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-DA3g8lm8.js";
2
2
  export { ActionDescriptor, ActionForm, ActionStatus, ActionValidationError, action, defineAction };
@@ -1,8 +1,8 @@
1
- import { d as getCurrentAppRenderRuntime } from "../component-scope-DzJEbYGE.js";
1
+ import { d as getCurrentAppRenderRuntime } from "../component-scope-4I3yEMkb.js";
2
2
  import { r as getCurrentRenderData } from "../render-context-B7ohlh6t.js";
3
- import { t as state } from "../state-DCjONcHK.js";
3
+ import { t as state } from "../state-XPZYUzHL.js";
4
4
  import { jsx, jsxs } from "../jsx-runtime.js";
5
- import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-wbooGyu7.js";
5
+ import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-oIdQWnPW.js";
6
6
  //#region src/actions/runtime.ts
7
7
  const emptyFramework = Object.freeze({});
8
8
  /** @internal Read Askr-owned state from the current application root. */
@@ -1,9 +1,9 @@
1
- import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
2
- import { a as registerCommitOperation } from "./component-internal-C4uwwUaK.js";
3
- import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
1
+ import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
2
+ import { a as registerCommitOperation } from "./component-internal-DlAkCgBE.js";
3
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
4
4
  import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
5
5
  import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
6
- import { b as getActiveRoutes, c as removeRouteBasePath, d as deepFreeze, f as makeQuery, n as computeMatchesFromRoutes, p as parseLocation, y as getActiveRouteBasePath } from "./route-matching-xlgdQXg_.js";
6
+ import { b as getActiveRoutes, c as removeRouteBasePath, d as deepFreeze, f as makeQuery, n as computeMatchesFromRoutes, p as parseLocation, y as getActiveRouteBasePath } from "./route-matching-Bo6UqG-5.js";
7
7
  //#region src/common/app-render-runtime.ts
8
8
  const stagedRouteLocations = /* @__PURE__ */ new WeakMap();
9
9
  function createAppRenderRuntime(input = {}) {
@@ -11,7 +11,9 @@ function createAppRenderRuntime(input = {}) {
11
11
  framework: Object.freeze({ ...input.framework }),
12
12
  route: input.route,
13
13
  hasRoute: input.hasRoute ?? false,
14
- dataRuntime: input.dataRuntime
14
+ dataRuntime: input.dataRuntime,
15
+ routeRegistry: input.routeRegistry,
16
+ routeAuth: input.routeAuth
15
17
  };
16
18
  }
17
19
  function stageAppRenderRouteLocation(runtime, href) {
@@ -1,4 +1,4 @@
1
- import { L as RouteParams, Z as RouteSnapshot } from "./index-Izwp_ESC.js";
1
+ import { bt as RouteSnapshot, ot as RouteParams } from "./index-DA3g8lm8.js";
2
2
  //#region src/router/activity.d.ts
3
3
  interface RouteChangeOptions {
4
4
  immediate?: boolean;
@@ -1,4 +1,4 @@
1
- import "./jsx-runtime-BqhMEuT4.js";
1
+ import "./jsx-runtime-C_0v1pMN.js";
2
2
  //#region src/bench/components/benchmark-row.d.ts
3
3
  interface BenchmarkRowData {
4
4
  id: number;
package/dist/benchmark.js CHANGED
@@ -1,10 +1,10 @@
1
- import { r as flushRuntimeScheduler } from "./access-Dpfoi4cA.js";
2
- import { t as installRendererBridge } from "./renderer-y2DL627q.js";
3
- import { t as state } from "./state-DCjONcHK.js";
4
- import { t as selector } from "./selector-BLNkRZ2i.js";
5
- import { i as For } from "./control-CON10J1p.js";
1
+ import { r as flushRuntimeScheduler } from "./access-DSkccuEI.js";
2
+ import { t as installRendererBridge } from "./renderer-C6jz9nIN.js";
3
+ import { t as state } from "./state-XPZYUzHL.js";
4
+ import { t as selector } from "./selector-BLWwI55m.js";
5
+ import { i as For } from "./control-Dv540XtV.js";
6
6
  import { jsx, jsxs } from "./jsx-runtime.js";
7
- import { t as createIsland } from "./boot-D3zVVWuN.js";
7
+ import { t as createIsland } from "./boot-D71bjP4r.js";
8
8
  //#region src/bench/components/benchmark-row.tsx
9
9
  function BenchmarkRow({ item, isSelected, onSelect, onRemove }) {
10
10
  return /* @__PURE__ */ jsxs("tr", {
@@ -63,8 +63,8 @@ function BenchmarkTable({ rows, isSelected, onSelect, onRemove }) {
63
63
  installRendererBridge();
64
64
  const benchmarkMetadata = {
65
65
  packageName: "@askrjs/askr",
66
- packageVersion: "0.0.91",
67
- buildLabel: "0.0.91-local"
66
+ packageVersion: "0.0.92",
67
+ buildLabel: "0.0.92-local"
68
68
  };
69
69
  function getBenchmarkMetadata() {
70
70
  return { ...benchmarkMetadata };
@@ -1,7 +1,6 @@
1
- import { l as ComponentFunction } from "../control-D-FIa-n-.js";
2
- import { t as DataRuntime } from "../types-iAmDSV6o.js";
3
- import { W as RouteRegistry, w as RouteAuthOptions } from "../index-Izwp_ESC.js";
4
- import { a as ScrollRestorationOptions } from "../navigate-BO7M2iUG.js";
1
+ import { pt as RouteRegistry, q as RouteAuthOptions, wt as ComponentFunction } from "../index-DA3g8lm8.js";
2
+ import { v as DataRuntime } from "../index-2bk8nldG.js";
3
+ import { a as ScrollRestorationOptions } from "../navigate-CZHPEUC4.js";
5
4
  //#region src/boot/types.d.ts
6
5
  type IslandConfig = {
7
6
  root: Element | string;
@@ -1,2 +1,2 @@
1
- import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-D3zVVWuN.js";
1
+ import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-D71bjP4r.js";
2
2
  export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
@@ -1,19 +1,19 @@
1
- import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
1
+ import { S as isProductionEnvironment, r as flushRuntimeScheduler, x as isDevelopmentEnvironment, y as logger } from "./access-DSkccuEI.js";
2
2
  import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
3
- import { n as createComponentInstance, r as executeComponent } from "./component-internal-C4uwwUaK.js";
4
- import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
5
- import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
6
- import { a as setStaticChildSlotsCacheEnabled, c as endHydrationDirectListenerMode, d as discardHydrationListenerTransaction, i as registerDeferredHydrationBoundary, l as beginHydrationListenerTransaction, n as activateHydrationBoundary$1, o as withIntrinsicHydrationAdoption, r as clearDeferredHydrationBoundaries, s as beginHydrationDirectListenerMode, t as installRendererBridge, u as commitHydrationListenerTransaction } from "./renderer-y2DL627q.js";
7
- import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-c837KVij.js";
8
- import { r as assertExecutionModel, t as _applyManifest } from "./manifest-fBb2ynKL.js";
3
+ import { n as createComponentInstance, r as executeComponent } from "./component-internal-DlAkCgBE.js";
4
+ import { t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
5
+ import { p as isPromiseLike } from "./lifecycle-batch-Cyfd07rf.js";
6
+ import { a as setStaticChildSlotsCacheEnabled, c as endHydrationDirectListenerMode, d as discardHydrationListenerTransaction, i as registerDeferredHydrationBoundary, l as beginHydrationListenerTransaction, n as activateHydrationBoundary$1, o as withIntrinsicHydrationAdoption, r as clearDeferredHydrationBoundaries, s as beginHydrationDirectListenerMode, t as installRendererBridge, u as commitHydrationListenerTransaction } from "./renderer-C6jz9nIN.js";
7
+ import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-DAAhJjx5.js";
8
+ import { r as assertExecutionModel, t as _applyManifest } from "./manifest-Dv0bO6kg.js";
9
9
  import { d as stopHydrationRenderPhase, l as startHydrationRenderPhase, y as pageRenderEnvelope } from "./render-context-B7ohlh6t.js";
10
- import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-DH0TrDij.js";
11
- import { i as getDefaultDataRuntime } from "./data-runtime-wbooGyu7.js";
12
- import { a as hydrateDataRuntime } from "./query-registry-B4LpVtlT.js";
13
- import { I as lockRouteRegistration, P as hasRegisteredRoutes, _ as clearRouteState, m as _setActiveRouteAuthOptions } from "./route-matching-xlgdQXg_.js";
14
- import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-C9A31xQi.js";
15
- import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-dKH6nlpj.js";
16
- import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-CnQMXze1.js";
10
+ import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-ByMbWv8s.js";
11
+ import { i as getDefaultDataRuntime } from "./data-runtime-oIdQWnPW.js";
12
+ import { a as hydrateDataRuntime } from "./query-registry-qm13pEdK.js";
13
+ import { I as lockRouteRegistration, P as hasRegisteredRoutes, _ as clearRouteState, m as _setActiveRouteAuthOptions } from "./route-matching-Bo6UqG-5.js";
14
+ import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-B21kmOkp.js";
15
+ import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-DodHdC0L.js";
16
+ import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-BbWj-QU-.js";
17
17
  import { n as disposeRegisteredDefaultPortalScope, r as getDefaultPortalHost } from "./default-portal-runtime-DvMvWJVp.js";
18
18
  import "./ssr-DSHd_Q9K.js";
19
19
  //#region src/boot/hydration.ts
@@ -497,11 +497,15 @@ async function createSPA(config) {
497
497
  if (isProductionEnvironment()) lockRouteRegistration();
498
498
  const { path, href: currentUrl, resolved } = await resolveInitialRoute(routeAuth, { registry: config.registry });
499
499
  setServerLocation(currentUrl);
500
- const appRuntime = createAppRenderRuntime(resolved?.kind === "render" && hasRouteRenderData(resolved) ? {
501
- route: getRouteRenderData(resolved),
502
- hasRoute: true,
503
- dataRuntime: config.dataRuntime ?? getDefaultDataRuntime()
504
- } : { dataRuntime: config.dataRuntime ?? getDefaultDataRuntime() });
500
+ const appRuntime = createAppRenderRuntime({
501
+ ...resolved?.kind === "render" && hasRouteRenderData(resolved) ? {
502
+ route: getRouteRenderData(resolved),
503
+ hasRoute: true
504
+ } : {},
505
+ dataRuntime: config.dataRuntime ?? getDefaultDataRuntime(),
506
+ routeRegistry: config.registry,
507
+ routeAuth
508
+ });
505
509
  if (!resolved) {
506
510
  mountOrUpdate(rootElement, () => ({
507
511
  type: "div",
@@ -573,7 +577,9 @@ async function hydrateSPA(config) {
573
577
  runtime: createAppRenderRuntime({
574
578
  framework: hydrationRenderData?.framework,
575
579
  route: hydrationRenderData?.route,
576
- hasRoute: hydrationRenderData !== null
580
+ hasRoute: hydrationRenderData !== null,
581
+ routeRegistry: config.registry,
582
+ routeAuth
577
583
  })
578
584
  };
579
585
  _setActiveRouteAuthOptions(routeAuth);
@@ -598,7 +604,7 @@ async function hydrateSPA(config) {
598
604
  cspNonce: config.cspNonce
599
605
  }));
600
606
  if (shouldVerifyHydrationMarkup(config)) {
601
- const { verifyHydrationSyncForUrl } = await import("./verify-hydration-D8938Fw2.js");
607
+ const { verifyHydrationSyncForUrl } = await import("./verify-hydration-CcF-HJil.js");
602
608
  if (!verifyHydrationSyncForUrl({
603
609
  root: rootElement,
604
610
  url: currentUrl,
@@ -1,7 +1,8 @@
1
- import { c as runRuntimeHandlerScope, v as logger } from "./access-Dpfoi4cA.js";
2
- import "./fastlane-CrfB3QG0.js";
3
- import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
4
- import { u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
1
+ import { l as runRuntimeHandlerScope, y as logger } from "./access-DSkccuEI.js";
2
+ import "./fastlane-B2s24fWt.js";
3
+ import { T as withAppRenderRuntime, d as getCurrentAppRenderRuntime } from "./component-scope-4I3yEMkb.js";
4
+ import { t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
5
+ import { u as registerLifecycleTransaction } from "./lifecycle-batch-Cyfd07rf.js";
5
6
  //#region src/runtime/events.ts
6
7
  /**
7
8
  * Event delegation system for Askr
@@ -141,7 +142,7 @@ function attachDelegatedListener(container, element, eventName, handler, origina
141
142
  if (eventName === "focus" || eventName === "blur" || eventName === "scroll") dispatchPath.reverse();
142
143
  for (const { node, entry } of dispatchPath) {
143
144
  try {
144
- entry.handler(createDelegatedEventFacade(e, node));
145
+ withAppRenderRuntime(entry.appRuntime, () => entry.handler(createDelegatedEventFacade(e, node)));
145
146
  } catch (error) {
146
147
  logger.error("[Askr] Delegated event error:", error);
147
148
  }
@@ -164,6 +165,7 @@ function attachDelegatedListener(container, element, eventName, handler, origina
164
165
  setDelegatedHandlerForElement(element, {
165
166
  handler,
166
167
  original: originalHandler,
168
+ appRuntime: getCurrentAppRenderRuntime(),
167
169
  container,
168
170
  eventName,
169
171
  options
@@ -212,6 +214,7 @@ function updateDelegatedListener(element, eventName, handler, originalHandler, o
212
214
  }
213
215
  existing.handler = handler;
214
216
  existing.original = originalHandler;
217
+ existing.appRuntime = getCurrentAppRenderRuntime();
215
218
  existing.options = options;
216
219
  return true;
217
220
  }
@@ -1,6 +1,6 @@
1
- import { b as isDevelopmentEnvironment, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
2
- import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-DzJEbYGE.js";
3
- import { n as cleanupReadableSubscriptions, t as cleanupReadableSubscriptionSources } from "./readable-B5NtV7V0.js";
1
+ import { S as isProductionEnvironment, x as isDevelopmentEnvironment, y as logger } from "./access-DSkccuEI.js";
2
+ import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-4I3yEMkb.js";
3
+ import { n as cleanupReadableSubscriptions, t as cleanupReadableSubscriptionSources } from "./readable-B99wh5Z_.js";
4
4
  //#region src/runtime/state-diagnostics.ts
5
5
  /**
6
6
  * Report state cells that were never read during a component's completed
@@ -1,10 +1,10 @@
1
1
  import { a as markTransparentComponentResult, i as markEagerControlPrimitive } from "./control-C-ApnFs1.js";
2
- import { b as isDevelopmentEnvironment, n as enqueueRuntimeTask, o as getRuntimeRenderer, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
3
- import { r as tryRuntimeFastLaneSync, t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
4
- import { C as restoreRenderScopedComponent, S as restoreInlineRenderTracking, _ as getSignalForInstance, b as restoreDomCommitScope, c as enterDomCommitScope, f as getCurrentComponentInstance, l as enterRenderScopedComponent, m as getCurrentPortalScope, n as captureInlineComponentScope, o as clearRenderTracking, p as getCurrentInstance, r as captureInlineRenderTracking, s as enterComponentExecutionScope, t as beginRenderTracking, u as exitComponentExecutionScope, v as resetRenderState, x as restoreInlineComponentScope } from "./component-scope-DzJEbYGE.js";
2
+ import { S as isProductionEnvironment, n as enqueueRuntimeTask, o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-DSkccuEI.js";
3
+ import { i as tryRuntimeFastLaneSync, n as isBulkCommitActive } from "./fastlane-B2s24fWt.js";
4
+ import { C as restoreRenderScopedComponent, S as restoreInlineRenderTracking, _ as getSignalForInstance, b as restoreDomCommitScope, c as enterDomCommitScope, f as getCurrentComponentInstance, l as enterRenderScopedComponent, m as getCurrentPortalScope, n as captureInlineComponentScope, o as clearRenderTracking, p as getCurrentInstance, r as captureInlineRenderTracking, s as enterComponentExecutionScope, t as beginRenderTracking, u as exitComponentExecutionScope, v as resetRenderState, x as restoreInlineComponentScope } from "./component-scope-4I3yEMkb.js";
5
5
  import { r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
6
- import { i as finalizeReadableSubscriptions } from "./readable-B5NtV7V0.js";
7
- import { a as enqueueLifecycleCommitForInstance, d as discardCommitOperations, f as executeCommittedLifecycleOperations, n as captureInlineRenderSnapshot$1, o as finalizeInlineReadSubscriptions, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Dfpid9-A.js";
6
+ import { i as finalizeReadableSubscriptions } from "./readable-B99wh5Z_.js";
7
+ import { a as enqueueLifecycleCommitForInstance, d as discardCommitOperations, f as executeCommittedLifecycleOperations, n as captureInlineRenderSnapshot$1, o as finalizeInlineReadSubscriptions, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Cyfd07rf.js";
8
8
  //#region src/runtime/context.ts
9
9
  const TransparentContextScopeComponent = markTransparentComponentResult(ContextScopeComponent);
10
10
  let nextScopeIdentityKey = 0;
@@ -1,6 +1,7 @@
1
1
  //#region src/runtime/component-scope.ts
2
2
  let currentInstance = null;
3
3
  let currentPortalScope = null;
4
+ let scopedAppRenderRuntime;
4
5
  let stateIndex = 0;
5
6
  let globalRenderCounter = 0;
6
7
  let renderScopedDepth = 0;
@@ -48,6 +49,17 @@ function getCurrentAppRenderRuntime() {
48
49
  if (instance._appRenderRuntime) return instance._appRenderRuntime;
49
50
  instance = instance.parentInstance;
50
51
  }
52
+ return scopedAppRenderRuntime;
53
+ }
54
+ /** @internal Preserve root ownership without exposing component hook scope. */
55
+ function withAppRenderRuntime(runtime, fn) {
56
+ const previous = scopedAppRenderRuntime;
57
+ scopedAppRenderRuntime = runtime;
58
+ try {
59
+ return fn();
60
+ } finally {
61
+ scopedAppRenderRuntime = previous;
62
+ }
51
63
  }
52
64
  function setCurrentComponentInstance(instance) {
53
65
  currentInstance = instance;
@@ -180,4 +192,4 @@ function getCurrentStateIndex() {
180
192
  return stateIndex;
181
193
  }
182
194
  //#endregion
183
- export { restoreRenderScopedComponent as C, restoreInlineRenderTracking as S, getSignalForInstance as _, clearCurrentComponentScope as a, restoreDomCommitScope as b, enterDomCommitScope as c, getCurrentAppRenderRuntime as d, getCurrentComponentInstance as f, getSignal as g, getCurrentStateIndex as h, claimHookIndex as i, enterRenderScopedComponent as l, getCurrentPortalScope as m, captureInlineComponentScope as n, clearRenderTracking as o, getCurrentInstance as p, captureInlineRenderTracking as r, enterComponentExecutionScope as s, beginRenderTracking as t, exitComponentExecutionScope as u, resetRenderState as v, setCurrentComponentInstance as w, restoreInlineComponentScope as x, restoreCurrentComponentScope as y };
195
+ export { restoreRenderScopedComponent as C, restoreInlineRenderTracking as S, withAppRenderRuntime as T, getSignalForInstance as _, clearCurrentComponentScope as a, restoreDomCommitScope as b, enterDomCommitScope as c, getCurrentAppRenderRuntime as d, getCurrentComponentInstance as f, getSignal as g, getCurrentStateIndex as h, claimHookIndex as i, enterRenderScopedComponent as l, getCurrentPortalScope as m, captureInlineComponentScope as n, clearRenderTracking as o, getCurrentInstance as p, captureInlineRenderTracking as r, enterComponentExecutionScope as s, beginRenderTracking as t, exitComponentExecutionScope as u, resetRenderState as v, setCurrentComponentInstance as w, restoreInlineComponentScope as x, restoreCurrentComponentScope as y };
@@ -1,5 +1,5 @@
1
- import { d as VNode } from "../control-D-FIa-n-.js";
2
- import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
1
+ import { Et as VNode } from "../index-DA3g8lm8.js";
2
+ import { r as JSXElement, s as Props } from "../types-BA9FJtfR.js";
3
3
  //#region src/common/error-boundary.d.ts
4
4
  type ErrorBoundaryContent = VNode | readonly VNode[];
5
5
  type ErrorBoundaryFallbackValue = ErrorBoundaryContent | Node;
@@ -1,5 +1,5 @@
1
1
  import { t as __ERROR_BOUNDARY__ } from "../vnode-D24p6IW2.js";
2
- import { f as getCurrentComponentInstance } from "../component-scope-DzJEbYGE.js";
2
+ import { f as getCurrentComponentInstance } from "../component-scope-4I3yEMkb.js";
3
3
  import { t as ELEMENT_TYPE } from "../jsx-C3IECePB.js";
4
4
  //#region src/components/error-boundary.tsx
5
5
  function ensureBoundaryState(instance, resetKey) {
@@ -1,2 +1,2 @@
1
- import { a as Show, c as ForProps, i as MatchProps, n as CaseProps, o as ShowProps, r as Match, s as For, t as Case } from "../index-BU17hud9.js";
1
+ import { _ as MatchProps, b as For, g as Match, h as CaseProps, m as Case, v as Show, x as ForProps, y as ShowProps } from "../index-DA3g8lm8.js";
2
2
  export { Case, type CaseProps, For, type ForProps, Match, type MatchProps, Show, type ShowProps };
@@ -1,2 +1,2 @@
1
- import { i as For, n as Match, r as Show, t as Case } from "../control-CON10J1p.js";
1
+ import { i as For, n as Match, r as Show, t as Case } from "../control-Dv540XtV.js";
2
2
  export { Case, For, Match, Show };
@@ -1,4 +1,4 @@
1
- import { s as Props } from "./jsx-BYXe_Nnk.js";
1
+ import { s as Props } from "./types-BA9FJtfR.js";
2
2
  //#region src/common/control.d.ts
3
3
  declare const EAGER_CONTROL_PRIMITIVE: unique symbol;
4
4
  type EagerControlPrimitive<P extends Props = Props> = ((props: P) => unknown) & {
@@ -1,9 +1,9 @@
1
1
  import { i as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
2
- import { b as isDevelopmentEnvironment } from "./access-Dpfoi4cA.js";
2
+ import { x as isDevelopmentEnvironment } from "./access-DSkccuEI.js";
3
3
  import { n as Fragment } from "./jsx-C3IECePB.js";
4
- import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-Bsm0B8GZ.js";
5
- import { t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
6
- import { t as state } from "./state-DCjONcHK.js";
4
+ import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-T1C7jd7x.js";
5
+ import { t as createFineGrainedEffect } from "./effect-BdZcHblj.js";
6
+ import { t as state } from "./state-XPZYUzHL.js";
7
7
  //#region src/control/shared.ts
8
8
  function normalizeBoundaryChild(value) {
9
9
  if (Array.isArray(value)) {
@@ -1,4 +1,4 @@
1
- import { _ as readScope, d as defineScope } from "./component-internal-C4uwwUaK.js";
1
+ import { _ as readScope, d as defineScope } from "./component-internal-DlAkCgBE.js";
2
2
  //#region src/common/url.ts
3
3
  const SAFE_URL_SCHEMES = /* @__PURE__ */ new Set([
4
4
  "http",
@@ -1,3 +1,2 @@
1
- import { a as Mutation, c as QueryConsistency, f as QueryPrefetchContext, h as ServerQueryHandler, i as InvalidateOptions, l as QueryDefinition, m as QueryStaleReason, n as DataRuntimeOptions, o as MutationOptions, p as QueryScope, r as InvalidateOnIntervalOptions, s as Query, t as DataRuntime, u as QueryKeyPart } from "../types-iAmDSV6o.js";
2
- import { a as defineServerQueries, c as prefetchQuery, d as invalidateOnInterval, f as queryScope, g as createMutation, h as createQuery, i as defineQuery, l as serveQuery, m as getDefaultDataRuntime, n as ServerQueryRegistry, o as dehydrateDataRuntime, p as createDataRuntime, r as createQueryPrefetchContext, s as hydrateDataRuntime, t as ServerQueryEntry, u as invalidate } from "../index-CPlPDbEY.js";
1
+ import { A as QueryStaleReason, C as MutationOptions, D as QueryKeyPart, E as QueryDefinition, O as QueryPrefetchContext, S as Mutation, T as QueryConsistency, a as defineServerQueries, b as InvalidateOnIntervalOptions, c as prefetchQuery, d as invalidateOnInterval, f as queryScope, g as createMutation, h as createQuery, i as defineQuery, j as ServerQueryHandler, k as QueryScope, l as serveQuery, m as getDefaultDataRuntime, n as ServerQueryRegistry, o as dehydrateDataRuntime, p as createDataRuntime, r as createQueryPrefetchContext, s as hydrateDataRuntime, t as ServerQueryEntry, u as invalidate, v as DataRuntime, w as Query, x as InvalidateOptions, y as DataRuntimeOptions } from "../index-2bk8nldG.js";
3
2
  export { type DataRuntime, type DataRuntimeOptions, type InvalidateOnIntervalOptions, type InvalidateOptions, type Mutation, type MutationOptions, type Query, type QueryConsistency, type QueryDefinition, type QueryKeyPart, type QueryPrefetchContext, type QueryScope, type QueryStaleReason, type ServerQueryEntry, type ServerQueryHandler, type ServerQueryRegistry, createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
@@ -1,4 +1,4 @@
1
- import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-wbooGyu7.js";
2
- import { c as queryScope, n as createMutation, o as invalidate, s as invalidateOnInterval, t as createQuery } from "../data-Bh_3OETq.js";
3
- import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-B4LpVtlT.js";
1
+ import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-oIdQWnPW.js";
2
+ import { c as queryScope, n as createMutation, o as invalidate, s as invalidateOnInterval, t as createQuery } from "../data-DcikEH9N.js";
3
+ import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-qm13pEdK.js";
4
4
  export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
@@ -1,9 +1,9 @@
1
- import { n as enqueueRuntimeTask, v as logger } from "./access-Dpfoi4cA.js";
2
- import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
3
- import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
1
+ import { n as enqueueRuntimeTask, y as logger } from "./access-DSkccuEI.js";
2
+ import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-4I3yEMkb.js";
3
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
4
4
  import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
5
- import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-CMK1AN2C.js";
6
- import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-wbooGyu7.js";
5
+ import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-CQ8fsc94.js";
6
+ import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-oIdQWnPW.js";
7
7
  //#region src/data/query-key.ts
8
8
  function serializeQueryKeyNumber(part) {
9
9
  if (Number.isNaN(part)) return "NaN";
@@ -339,12 +339,12 @@ var QueryCell = class {
339
339
  }
340
340
  ensureStarted() {
341
341
  if (this.destroyed || this.state.data !== null || this.pendingRefresh || this.startQueued || this.options.skipInitialFetch) return;
342
- this.queueStart("initial");
342
+ this.queueStart();
343
343
  }
344
344
  refresh() {
345
345
  if (this.destroyed) return Promise.resolve();
346
346
  if (this.pendingRefresh) return this.pendingRefresh;
347
- this.queueStart("manual");
347
+ this.queueStart();
348
348
  return this.pendingRefresh ?? Promise.resolve();
349
349
  }
350
350
  invalidate() {
@@ -353,7 +353,7 @@ var QueryCell = class {
353
353
  this.controller?.abort();
354
354
  this.finishPendingRefresh(this.pendingRefreshToken);
355
355
  }
356
- this.queueStart("invalidate");
356
+ this.queueStart();
357
357
  }
358
358
  markPendingWrite() {
359
359
  if (this.destroyed) return;
@@ -367,7 +367,7 @@ var QueryCell = class {
367
367
  staleReason: null
368
368
  });
369
369
  }
370
- queueStart(reason) {
370
+ queueStart() {
371
371
  if (this.destroyed) return;
372
372
  this.startQueued = true;
373
373
  const token = ++this.pendingRefreshToken;
@@ -379,7 +379,7 @@ var QueryCell = class {
379
379
  this.finishPendingRefresh(token);
380
380
  return;
381
381
  }
382
- this.start(reason).finally(() => {
382
+ this.start().finally(() => {
383
383
  this.finishPendingRefresh(token);
384
384
  });
385
385
  });
@@ -400,7 +400,7 @@ var QueryCell = class {
400
400
  };
401
401
  notifySource(this.source);
402
402
  }
403
- async start(reason) {
403
+ async start() {
404
404
  if (this.destroyed) return;
405
405
  this.generation += 1;
406
406
  const generation = this.generation;
@@ -412,7 +412,7 @@ var QueryCell = class {
412
412
  loading: !hasData,
413
413
  refreshing: hasData,
414
414
  stale: hasData,
415
- consistency: reason === "pending-write" ? "pending-write" : hasData ? "refreshing" : "fresh",
415
+ consistency: hasData ? "refreshing" : "fresh",
416
416
  error: null,
417
417
  staleReason: null
418
418
  });
@@ -1,4 +1,4 @@
1
- import { d as getCurrentAppRenderRuntime } from "./component-scope-DzJEbYGE.js";
1
+ import { d as getCurrentAppRenderRuntime } from "./component-scope-4I3yEMkb.js";
2
2
  import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
3
3
  //#region src/data/invalidation-listeners.ts
4
4
  const invalidationListeners = /* @__PURE__ */ new Set();
@@ -1,9 +1,9 @@
1
- import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
2
- import { i as getExecutionModel } from "./manifest-fBb2ynKL.js";
1
+ import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
2
+ import { i as getExecutionModel } from "./manifest-Dv0bO6kg.js";
3
3
  import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-B7ohlh6t.js";
4
- import { t as resource } from "./resource-operation-whZDJAYv.js";
5
- import { A as getDefaultRouteBasePath, C as getCurrentInheritedPolicies, D as getCurrentPathPrefix, E as getCurrentPageScope, F as insertRecordSorted, H as computeRank, L as pushRegistrationScope, N as hasActivePageScope, O as getCurrentScopeKind, S as getCurrentInheritedMeta, T as getCurrentPageChain, U as normalizeRouteSegmentName, W as parseSegments, g as assertRouteRegistrationUnlocked, h as addRouteToStores, w as getCurrentLayoutChain, x as getCurrentInheritedAuthRequirements } from "./route-matching-xlgdQXg_.js";
6
- import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-C9A31xQi.js";
4
+ import { t as resource } from "./resource-operation-CaAttQqz.js";
5
+ import { A as getDefaultRouteBasePath, C as getCurrentInheritedPolicies, D as getCurrentPathPrefix, E as getCurrentPageScope, F as insertRecordSorted, H as computeRank, L as pushRegistrationScope, N as hasActivePageScope, O as getCurrentScopeKind, S as getCurrentInheritedMeta, T as getCurrentPageChain, U as normalizeRouteSegmentName, W as parseSegments, g as assertRouteRegistrationUnlocked, h as addRouteToStores, w as getCurrentLayoutChain, x as getCurrentInheritedAuthRequirements } from "./route-matching-Bo6UqG-5.js";
6
+ import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-B21kmOkp.js";
7
7
  import { allOf } from "@askrjs/auth";
8
8
  //#region src/router/access.ts
9
9
  function compileNodePolicies(node) {