@askrjs/askr 0.0.66 → 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 (70) hide show
  1. package/dist/actions/index.d.ts +1 -1
  2. package/dist/actions/index.js +1 -1
  3. package/dist/{authoring-Di8MInO-.js → authoring-uaJ556aG.js} +1 -1
  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-B4UZumvB.js → boot-DjTa12LD.js} +10 -9
  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-Eh9bCVGH.js → deferred-zHtUheIQ.js} +4 -4
  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-QMRcR581.js → navigate-CJySBpA9.js} +9 -50
  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/router/index.d.ts +20 -15
  55. package/dist/router/index.js +45 -3
  56. package/dist/{router-4EhVGcma.d.ts → router-C0XQA62W.d.ts} +3 -4
  57. package/dist/{selector-pApF_lGd.js → selector-DueeR6Oz.js} +1 -1
  58. package/dist/ssg/index.d.ts +22 -11
  59. package/dist/ssg/index.js +3 -3
  60. package/dist/ssr/index.d.ts +6 -5
  61. package/dist/ssr/index.js +1 -1
  62. package/dist/{ssr-Y8Pq8riM.js → ssr-vE-KUgDV.js} +8 -7
  63. package/dist/{state-Cc5HumQ0.js → state-CVuQVjvK.js} +2 -1
  64. package/dist/testing/index.d.ts +1 -2
  65. package/dist/types-DEhT-Nrv.d.ts +63 -0
  66. package/dist/{verify-hydration-BcZXRU-q.js → verify-hydration-ChyEiBAn.js} +1 -1
  67. package/package.json +1 -1
  68. package/dist/jsx-runtime-BVVgDSdq.d.ts +0 -1
  69. package/dist/navigate-BVDCzOuB.d.ts +0 -34
  70. package/dist/types-4k3RFEaC.d.ts +0 -19
@@ -1,3 +1,3 @@
1
1
  import { r as JSXElement } from "../jsx-Dvr2SGRG.js";
2
- import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-PgRn5wmg.js";
2
+ import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-DjusBb1I.js";
3
3
  export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
@@ -1,3 +1,3 @@
1
- import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-D2tPWNrC.js";
1
+ import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-D7TC986A.js";
2
2
  import { a as layout, i as Slot, r as Presence } from "../structures-DUB3HchX.js";
3
3
  export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
@@ -1,6 +1,5 @@
1
1
  import { t as Ref } from "../../compose-ref-Cizq72-x.js";
2
2
  import { d as KeyboardLikeEvent, f as PointerLikeEvent, l as DefaultPreventable, p as PropagationStoppable } from "../../index-BnU0NPwM.js";
3
-
4
3
  //#region src/foundations/interactions/pressable.d.ts
5
4
  /**
6
5
  * pressable
@@ -52,11 +51,7 @@ interface PressableResult {
52
51
  onKeyUp?: (e: KeyboardLikeEvent) => void;
53
52
  'aria-disabled'?: 'true';
54
53
  }
55
- declare function pressable({
56
- disabled,
57
- onPress,
58
- isNativeButton
59
- }: PressableOptions): PressableResult;
54
+ declare function pressable({ disabled, onPress, isNativeButton }: PressableOptions): PressableResult;
60
55
  //#endregion
61
56
  //#region src/foundations/interactions/dismissable.d.ts
62
57
  /**
@@ -117,11 +112,7 @@ interface DismissableOptions {
117
112
  */
118
113
  onDismiss?: (trigger: 'escape' | 'outside') => void;
119
114
  }
120
- declare function dismissable({
121
- node,
122
- disabled,
123
- onDismiss
124
- }: DismissableOptions): {
115
+ declare function dismissable({ node, disabled, onDismiss }: DismissableOptions): {
125
116
  onKeyDown: (e: KeyboardLikeEvent) => void;
126
117
  onPointerDownCapture: (e: PointerLikeEvent) => void;
127
118
  };
@@ -141,10 +132,7 @@ interface FocusableResult {
141
132
  tabIndex?: number;
142
133
  'aria-disabled'?: 'true';
143
134
  }
144
- declare function focusable({
145
- disabled,
146
- tabIndex
147
- }: FocusableOptions): FocusableResult;
135
+ declare function focusable({ disabled, tabIndex }: FocusableOptions): FocusableResult;
148
136
  //#endregion
149
137
  //#region src/foundations/interactions/hoverable.d.ts
150
138
  /**
@@ -162,11 +150,7 @@ interface HoverableResult {
162
150
  onPointerEnter?: (e: HoverEvent) => void;
163
151
  onPointerLeave?: (e: HoverEvent) => void;
164
152
  }
165
- declare function hoverable({
166
- disabled,
167
- onEnter,
168
- onLeave
169
- }: HoverableOptions): HoverableResult;
153
+ declare function hoverable({ disabled, onEnter, onLeave }: HoverableOptions): HoverableResult;
170
154
  //#endregion
171
155
  //#region src/foundations/interactions/roving-focus.d.ts
172
156
  type Orientation = 'horizontal' | 'vertical' | 'both';
@@ -215,6 +199,32 @@ interface RovingFocusResult {
215
199
  };
216
200
  }
217
201
  declare function rovingFocus(options: RovingFocusOptions): RovingFocusResult;
202
+ /**
203
+ * USAGE EXAMPLE:
204
+ *
205
+ * function Menu() {
206
+ * const [focusIndex, setFocusIndex] = state(0);
207
+ * const items = ['File', 'Edit', 'View'];
208
+ *
209
+ * const navigation = rovingFocus({
210
+ * currentIndex: focusIndex(),
211
+ * itemCount: items.length,
212
+ * orientation: 'horizontal',
213
+ * loop: true,
214
+ * onNavigate: setFocusIndex,
215
+ * });
216
+ *
217
+ * return (
218
+ * <div {...navigation.container}>
219
+ * {items.map((label, index) => (
220
+ * <button {...navigation.item(index)}>
221
+ * {label}
222
+ * </button>
223
+ * ))}
224
+ * </div>
225
+ * );
226
+ * }
227
+ */
218
228
  //#endregion
219
229
  //#region src/foundations/interactions/interaction-policy.d.ts
220
230
  interface InteractionPolicyInput {
@@ -231,12 +241,7 @@ interface InteractionPolicyInput {
231
241
  * THE interaction policy. Components MUST use this, NEVER implement
232
242
  * interaction logic directly.
233
243
  */
234
- declare function applyInteractionPolicy({
235
- isNative,
236
- disabled,
237
- onPress,
238
- ref
239
- }: InteractionPolicyInput): {
244
+ declare function applyInteractionPolicy({ isNative, disabled, onPress, ref }: InteractionPolicyInput): {
240
245
  disabled: true | undefined;
241
246
  onClick: (e: Event) => void;
242
247
  ref: Ref<unknown>;
@@ -1,5 +1,4 @@
1
- import { m as State } from "../../control-CMzFPMjr.js";
2
-
1
+ import { m as State } from "../../control-DO-iBEtV.js";
3
2
  //#region src/foundations/state/controllable.d.ts
4
3
  declare function isControlled<T>(value: T | undefined): value is T;
5
4
  declare function resolveControllable<T>(value: T | undefined, defaultValue: T): {
@@ -1,4 +1,4 @@
1
- import { t as state } from "../../state-Cc5HumQ0.js";
1
+ import { t as state } from "../../state-CVuQVjvK.js";
2
2
  //#region src/foundations/state/controllable.ts
3
3
  /**
4
4
  * controllable
@@ -1,3 +1,3 @@
1
1
  import { r as JSXElement } from "../../jsx-Dvr2SGRG.js";
2
- import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-PgRn5wmg.js";
2
+ import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-DjusBb1I.js";
3
3
  export { type Collection, type CollectionItem, DefaultPortal, type JSXElement, type Layer, type LayerManager, type LayerOptions, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, createCollection, createLayer, definePortal, layout };
@@ -1,3 +1,3 @@
1
- import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-D2tPWNrC.js";
1
+ import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-D7TC986A.js";
2
2
  import { a as layout, i as Slot, n as createCollection, r as Presence, t as createLayer } from "../../structures-DUB3HchX.js";
3
3
  export { DefaultPortal, Portal, Presence, Slot, createCollection, createLayer, definePortal, layout };
@@ -1,5 +1,4 @@
1
1
  import { n as scheduleEventHandler } from "../scheduler-CmLO4Dfm.js";
2
-
3
2
  //#region src/fx/timing.d.ts
4
3
  /**
5
4
  * Timing utilities — pure helpers for common async patterns
@@ -1,5 +1,6 @@
1
- import { i as Scope, n as ReadableSource, r as ComponentInstance } from "./control-CMzFPMjr.js";
1
+ import { i as Scope, n as ReadableSource, r as ComponentInstance } from "./control-DO-iBEtV.js";
2
2
  import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
3
+ import "./jsx-runtime-X2SX2y8V.js";
3
4
  //#region src/runtime/runtime.d.ts
4
5
  interface RuntimeKeyedReorderDecision {
5
6
  useFastPath: boolean;
@@ -1,7 +1,7 @@
1
- import { c as RenderableChild, g as StateTuple } from "./control-CMzFPMjr.js";
1
+ import { c as RenderableChild, g as StateTuple } from "./control-DO-iBEtV.js";
2
2
  import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
3
+ import "./index-BFnTM1a8.js";
3
4
  import { ObjectSchema } from "@askrjs/schema";
4
-
5
5
  //#region src/actions/index.d.ts
6
6
  interface ActionDescriptor<TInput extends Record<string, unknown> = Record<string, unknown>> {
7
7
  readonly id: string;
@@ -14,11 +14,7 @@ declare function defineAction<TInput extends Record<string, unknown>>(options: {
14
14
  readonly invalidates?: readonly string[];
15
15
  }): ActionDescriptor<TInput>;
16
16
  /** A native form bound to a declared action; it is not a synthetic event API. */
17
- declare function ActionForm<TInput extends Record<string, unknown>>({
18
- action,
19
- children,
20
- ...props
21
- }: {
17
+ declare function ActionForm<TInput extends Record<string, unknown>>({ action, children, ...props }: {
22
18
  readonly action: ActionDescriptor<TInput>;
23
19
  readonly children?: RenderableChild;
24
20
  readonly [key: string]: unknown;
@@ -1,6 +1,5 @@
1
- import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-CMzFPMjr.js";
1
+ import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-DO-iBEtV.js";
2
2
  import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
3
-
4
3
  //#region src/control/shared.d.ts
5
4
  type BoundaryChild = RenderableChild;
6
5
  //#endregion
@@ -1,5 +1,6 @@
1
- import { c as RenderableChild } from "./control-CMzFPMjr.js";
1
+ import { c as RenderableChild } from "./control-DO-iBEtV.js";
2
2
  import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
3
+ import "./types-DEhT-Nrv.js";
3
4
  //#region src/runtime/portal.d.ts
4
5
  interface Portal<T extends RenderableChild = RenderableChild> {
5
6
  (): unknown;
@@ -102,10 +103,7 @@ interface PresenceProps {
102
103
  * children are removed immediately. Animation must be layered above
103
104
  * this primitive.
104
105
  */
105
- declare function Presence({
106
- present,
107
- children
108
- }: PresenceProps): JSXElement | null;
106
+ declare function Presence({ present, children }: PresenceProps): JSXElement | null;
109
107
  //#endregion
110
108
  //#region src/foundations/structures/collection.d.ts
111
109
  /**
@@ -156,6 +154,24 @@ interface Collection<TNode, TMetadata = unknown> {
156
154
  size(): number;
157
155
  }
158
156
  declare function createCollection<TNode, TMetadata = unknown>(): Collection<TNode, TMetadata>;
157
+ /**
158
+ * USAGE EXAMPLE:
159
+ *
160
+ * // Create a collection for menu items
161
+ * const menuItems = createCollection<HTMLElement, { disabled: boolean }>();
162
+ *
163
+ * // Register items
164
+ * const unregister1 = menuItems.register(element1, { disabled: false });
165
+ * const unregister2 = menuItems.register(element2, { disabled: true });
166
+ *
167
+ * // Query items
168
+ * const allItems = menuItems.items();
169
+ * const enabledItems = allItems.filter(item => !item.metadata.disabled);
170
+ *
171
+ * // Cleanup
172
+ * unregister1();
173
+ * unregister2();
174
+ */
159
175
  //#endregion
160
176
  //#region src/foundations/structures/layer.d.ts
161
177
  /**
@@ -235,5 +251,29 @@ interface LayerManager {
235
251
  handleOutsidePointer(e: PointerEvent): void;
236
252
  }
237
253
  declare function createLayer(): LayerManager;
254
+ /**
255
+ * USAGE EXAMPLE:
256
+ *
257
+ * const layerManager = createLayer();
258
+ *
259
+ * function Modal({ onClose }) {
260
+ * const modalRef = ref<HTMLDivElement>();
261
+ *
262
+ * const layer = layerManager.register({
263
+ * node: modalRef.current,
264
+ * onEscape: onClose,
265
+ * onOutsidePointer: onClose,
266
+ * });
267
+ *
268
+ * onUnmount(() => layer.unregister());
269
+ *
270
+ * return (
271
+ * <div ref={modalRef}>
272
+ * <h1>Modal</h1>
273
+ * {layer.isTop() && <p>I am on top!</p>}
274
+ * </div>
275
+ * );
276
+ * }
277
+ */
238
278
  //#endregion
239
279
  export { definePortal as _, Collection as a, Presence as c, SlotProps as d, LayoutComponent as f, PortalProps as g, Portal as h, createLayer as i, PresenceProps as l, DefaultPortal as m, LayerManager as n, CollectionItem as o, layout as p, LayerOptions as r, createCollection as s, Layer as t, Slot as u };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { _ as state, a as defineScope, g as StateTuple, h as StateSetter, i as Scope, m as State, o as readScope } from "./control-CMzFPMjr.js";
1
+ import { _ as state, a as defineScope, g as StateTuple, h as StateSetter, i as Scope, m as State, o as readScope } from "./control-DO-iBEtV.js";
2
2
  import { s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
3
3
  import { t as getSignal } from "./component-scope-CvPba6O6.js";
4
- import { a as Derived, c as AskrRuntimeOptions, d as createRuntime, f as getDefaultRuntime, i as selector, l as RuntimeKeyedReorderDecision, n as cspNonce, o as derive, r as Selector, s as AskrRuntime, t as CspNonceScope, u as RuntimeRendererHost } from "./index-NKPpdRh9.js";
5
- 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-Byqjltu2.js";
6
- import { i as jsxs, n as jsx } from "./jsx-runtime-iTU73uwP.js";
4
+ import { a as Derived, c as AskrRuntimeOptions, d as createRuntime, f as getDefaultRuntime, i as selector, l as RuntimeKeyedReorderDecision, n as cspNonce, o as derive, r as Selector, s as AskrRuntime, t as CspNonceScope, u as RuntimeRendererHost } from "./index-BFnTM1a8.js";
5
+ 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-Dh6ZF9yW.js";
6
+ import { i as jsxs, n as jsx } from "./jsx-runtime-aYZ8zb4q.js";
7
7
  import { A as ServerQueryHandler, D as QueryPrefetchContext, T as QueryDefinition, a as defineServerQueries, c as prefetchQuery, g as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime, v as DataRuntime } from "./index-Bki2rqcr.js";
8
8
  export { AskrRuntime, type AskrRuntimeOptions, Case, type CaseProps, CspNonceScope, type DataRuntime, type Derived, For, type ForProps, Fragment, Match, type MatchProps, type Props, type QueryDefinition, type QueryPrefetchContext, type RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, createQuery, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, selector, serveQuery, state };
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
2
- import { f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
3
2
  import { n as Fragment } from "./jsx-CUpRxrLH.js";
4
- import { l as defineScope, m as readScope } from "./component-internal-CbALfPGD.js";
3
+ import { h as readScope, u as defineScope } from "./component-internal-CPjM4n8M.js";
4
+ import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BYSoWJSv.js";
5
5
  import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
6
6
  import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
7
- import { t as installRendererBridge } from "./renderer-aUD-acDe.js";
8
- import { t as state } from "./state-Cc5HumQ0.js";
9
- import { t as selector } from "./selector-pApF_lGd.js";
7
+ import { t as installRendererBridge } from "./renderer-Dwkk68c5.js";
8
+ import { t as state } from "./state-CVuQVjvK.js";
9
+ import { t as selector } from "./selector-DueeR6Oz.js";
10
10
  import { jsx, jsxs } from "./jsx-runtime.js";
11
- import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-C-8E85El.js";
12
- import { i as For, n as Match, r as Show, t as Case } from "./control-KVP6LMEQ.js";
13
- import { t as createQuery } from "./data-DvYo_dHd.js";
11
+ import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-HGZ0vbqT.js";
12
+ import { i as For, n as Match, r as Show, t as Case } from "./control-CA45Yvvu.js";
13
+ import { t as createQuery } from "./data-DHt_zO1G.js";
14
14
  import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CQIT4mXr.js";
15
15
  //#region src/runtime/derive.ts
16
16
  const deriveCells = /* @__PURE__ */ new WeakMap();
@@ -1,5 +1,6 @@
1
1
  import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
2
- import { t as EagerControlPrimitive } from "./control-B5xu8v4m.js";
2
+ import { t as EagerControlPrimitive } from "./control-BjYBlytA.js";
3
+ import "./types-DEhT-Nrv.js";
3
4
  //#region src/jsx/jsx-dev-runtime.d.ts
4
5
  declare namespace JSX {
5
6
  interface Element extends JSXElement {
@@ -0,0 +1,2 @@
1
+ import "./types-DEhT-Nrv.js";
2
+ import "./jsx-runtime-aYZ8zb4q.js";
@@ -1,5 +1,6 @@
1
1
  import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-Dvr2SGRG.js";
2
- import { t as EagerControlPrimitive } from "./control-B5xu8v4m.js";
2
+ import { t as EagerControlPrimitive } from "./control-BjYBlytA.js";
3
+ import "./types-DEhT-Nrv.js";
3
4
  //#region src/jsx/jsx-runtime.d.ts
4
5
  declare namespace JSX {
5
6
  interface Element extends JSXElement {
@@ -1,3 +1,3 @@
1
1
  import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-Dvr2SGRG.js";
2
- import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-iTU73uwP.js";
2
+ import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-aYZ8zb4q.js";
3
3
  export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
@@ -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,15 +1,16 @@
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-Eh9bCVGH.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";
12
+ import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-D7TC986A.js";
13
+ import { t as CspNonceScope } from "./csp-nonce-HGZ0vbqT.js";
13
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();
@@ -1072,48 +1073,6 @@ function applyPopStateNavigationTargets(requestId, previousHref, previousState,
1072
1073
  }
1073
1074
  }
1074
1075
  //#endregion
1075
- //#region src/router/route-query.ts
1076
- function getRouteQueryHistoryMode(options) {
1077
- if (options.history) return options.history;
1078
- return options.replace === false ? "push" : "replace";
1079
- }
1080
- function setRouteQueryValue(searchParams, key, value) {
1081
- searchParams.delete(key);
1082
- if (Array.isArray(value)) {
1083
- for (const entry of value) {
1084
- if (entry === null || entry === void 0) continue;
1085
- searchParams.append(key, String(entry));
1086
- }
1087
- return;
1088
- }
1089
- if (value === null || value === void 0) return;
1090
- searchParams.set(key, String(value));
1091
- }
1092
- function applyRouteQueryUpdates(searchParams, updates) {
1093
- if (typeof updates === "function") {
1094
- updates(searchParams);
1095
- return;
1096
- }
1097
- for (const [key, value] of Object.entries(updates)) setRouteQueryValue(searchParams, key, value);
1098
- }
1099
- function updateRouteQuery(updates, options = {}) {
1100
- if (typeof window === "undefined") return;
1101
- const url = parseTargetUrl(getWindowHref$1());
1102
- applyRouteQueryUpdates(url.searchParams, updates);
1103
- const href = `${url.pathname}${url.search}${url.hash}`;
1104
- if (href === getWindowHref$1()) return;
1105
- const historyMode = getRouteQueryHistoryMode(options);
1106
- if (historyMode === "push") saveScrollPosition(getCurrentHref());
1107
- const state = window.history.state && typeof window.history.state === "object" ? window.history.state : {};
1108
- window.history[historyMode === "replace" ? "replaceState" : "pushState"]({
1109
- ...state,
1110
- path: href
1111
- }, "", href);
1112
- setCurrentRouteLocation(url.pathname, href);
1113
- for (const app of getRegisteredAppsSnapshot()) syncAppRegistrationLocation(app, url.pathname, href);
1114
- syncRegisteredRouteSnapshot();
1115
- }
1116
- //#endregion
1117
1076
  //#region src/router/navigate.ts
1118
1077
  /**
1119
1078
  * Client-side navigation with History API
@@ -1180,4 +1139,4 @@ function initializeNavigation() {
1180
1139
  window.addEventListener("popstate", handlePopState);
1181
1140
  }
1182
1141
  //#endregion
1183
- 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;