@askrjs/askr 0.0.92 → 0.0.95

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 (89) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +3 -1
  3. package/dist/{access-DSkccuEI.js → access-d_DCdwqn.js} +3 -0
  4. package/dist/actions/index.d.ts +1 -1
  5. package/dist/actions/index.js +3 -2
  6. package/dist/{activity-DxUcygE5.d.ts → activity-D_5x2HXQ.d.ts} +5 -1
  7. package/dist/{activity-DodHdC0L.js → activity-d4t3CdzK.js} +4 -2
  8. package/dist/benchmark.d.ts +1 -1
  9. package/dist/benchmark.js +8 -8
  10. package/dist/boot/index.d.ts +12 -3
  11. package/dist/boot/index.js +1 -1
  12. package/dist/{boot-D71bjP4r.js → boot-C1wT3Vfs.js} +23 -15
  13. package/dist/{cleanup-DAAhJjx5.js → cleanup-D7uN-Z1s.js} +4 -4
  14. package/dist/{component-cleanup-CJCfu5ed.js → component-cleanup-DYG80yhG.js} +4 -2
  15. package/dist/{component-internal-DlAkCgBE.js → component-internal-D0yE2Ch3.js} +79 -13
  16. package/dist/components/index.d.ts +11 -3
  17. package/dist/components/index.js +5 -2
  18. package/dist/{compose-ref-Cc_YkUpM.js → compose-ref-1Fhs7mbF.js} +13 -0
  19. package/dist/{compose-ref-Cizq72-x.d.ts → compose-ref-DOJHoW5X.d.ts} +3 -0
  20. package/dist/control/index.d.ts +1 -1
  21. package/dist/control/index.js +1 -1
  22. package/dist/{control-Dv540XtV.js → control-C0klPV7Q.js} +9 -5
  23. package/dist/{control-CdzY49Q2.d.ts → control-DdFw-Caz.d.ts} +1 -1
  24. package/dist/{csp-nonce-ByMbWv8s.js → csp-nonce-BVybpV1v.js} +8 -1
  25. package/dist/data/index.d.ts +1 -1
  26. package/dist/data/index.js +3 -3
  27. package/dist/{data-DcikEH9N.js → data-Bm8L6JOm.js} +15 -4
  28. package/dist/{data-runtime-oIdQWnPW.js → data-runtime-JxoRgrrt.js} +2 -0
  29. package/dist/{deferred-B6CafO5u.js → deferred-p8hyanxJ.js} +8 -3
  30. package/dist/{effect-BdZcHblj.js → effect-BdvdgMvV.js} +2 -2
  31. package/dist/{fastlane-B2s24fWt.js → fastlane-DGo7SxBQ.js} +3 -3
  32. package/dist/{for-internal-T1C7jd7x.js → for-internal-DkBwTG4S.js} +5 -5
  33. package/dist/foundations/icon/index.d.ts +14 -2
  34. package/dist/foundations/icon/index.js +8 -0
  35. package/dist/foundations/index.d.ts +2 -2
  36. package/dist/foundations/index.js +1 -1
  37. package/dist/foundations/interactions/index.d.ts +18 -2
  38. package/dist/foundations/interactions/index.js +1 -1
  39. package/dist/foundations/state/index.d.ts +8 -1
  40. package/dist/foundations/state/index.js +7 -1
  41. package/dist/foundations/structures/index.d.ts +2 -2
  42. package/dist/foundations/structures/index.js +1 -1
  43. package/dist/foundations/utilities/index.d.ts +2 -2
  44. package/dist/foundations/utilities/index.js +1 -1
  45. package/dist/fx/index.d.ts +10 -1
  46. package/dist/fx/index.js +7 -1
  47. package/dist/{index-DA3g8lm8.d.ts → index-CTIBOqUB.d.ts} +418 -5
  48. package/dist/{index-BnU0NPwM.d.ts → index-CzH-0LcA.d.ts} +18 -0
  49. package/dist/{index-oswRaMn6.d.ts → index-S2IqSJib.d.ts} +30 -2
  50. package/dist/index.d.ts +3 -4
  51. package/dist/index.js +13 -12
  52. package/dist/{interactions-CWkNEq_C.js → interactions-B4XaFxt1.js} +6 -1
  53. package/dist/{jsx-C3IECePB.js → jsx-DRS-qjiN.js} +2 -0
  54. package/dist/jsx-dev-runtime.d.ts +2 -2
  55. package/dist/jsx-dev-runtime.js +1 -1
  56. package/dist/jsx-runtime-BTzDdBJ_.d.ts +2 -0
  57. package/dist/{jsx-runtime-Cfb2umb4.d.ts → jsx-runtime-Cdd6Gkb0.d.ts} +4 -2
  58. package/dist/jsx-runtime.d.ts +2 -2
  59. package/dist/jsx-runtime.js +1 -1
  60. package/dist/{lifecycle-batch-Cyfd07rf.js → lifecycle-batch-BH0fax4F.js} +2 -2
  61. package/dist/{lifecycle-operations-CQ8fsc94.js → lifecycle-operations-CBzG5PyB.js} +6 -1
  62. package/dist/{manifest-Dv0bO6kg.js → manifest-D6rfj_jC.js} +4 -0
  63. package/dist/{navigate-BbWj-QU-.js → navigate-DChM5m8m.js} +13 -10
  64. package/dist/{navigate-CZHPEUC4.d.ts → navigate-eGm4omPj.d.ts} +6 -1
  65. package/dist/{query-registry-qm13pEdK.js → query-registry-CimB1YeW.js} +11 -1
  66. package/dist/{readable-B99wh5Z_.js → readable-BsdGWsDE.js} +1 -1
  67. package/dist/{renderer-C6jz9nIN.js → renderer-tXX_xj86.js} +10 -37
  68. package/dist/{resolution-B21kmOkp.js → resolution-BQyo7qNn.js} +11 -5
  69. package/dist/{resource-operation-CaAttQqz.js → resource-operation-B62UQKHV.js} +4 -4
  70. package/dist/resources/index.d.ts +15 -2
  71. package/dist/resources/index.js +6 -5
  72. package/dist/router/index.d.ts +46 -4
  73. package/dist/router/index.js +15 -8
  74. package/dist/{selector-BLWwI55m.js → selector-CyK-sDwB.js} +4 -3
  75. package/dist/ssg/index.d.ts +5 -1
  76. package/dist/ssg/index.js +5 -5
  77. package/dist/ssr/index.d.ts +16 -3
  78. package/dist/ssr/index.js +1 -1
  79. package/dist/{ssr-CaZfvQWn.js → ssr-DYcK20IX.js} +18 -10
  80. package/dist/{state-XPZYUzHL.js → state-DmkGM_LN.js} +3 -3
  81. package/dist/{structures-DKjkAmM5.js → structures-CPycoyZj.js} +63 -14
  82. package/dist/testing/index.d.ts +31 -2
  83. package/dist/testing/index.js +23 -5
  84. package/dist/{types-BA9FJtfR.d.ts → types-DkVJhVs9.d.ts} +4 -0
  85. package/dist/{verify-hydration-CcF-HJil.js → verify-hydration-m-wVbYOD.js} +1 -1
  86. package/package.json +1 -1
  87. package/dist/index-2bk8nldG.d.ts +0 -241
  88. package/dist/jsx-runtime-C_0v1pMN.d.ts +0 -2
  89. package/dist/scheduler-CmLO4Dfm.d.ts +0 -65
@@ -1,4 +1,4 @@
1
- import { s as Props } from "./types-BA9FJtfR.js";
1
+ import { s as Props } from "./types-DkVJhVs9.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,4 +1,4 @@
1
- import { _ as readScope, d as defineScope } from "./component-internal-DlAkCgBE.js";
1
+ import { p as defineScope, y as readScope } from "./component-internal-D0yE2Ch3.js";
2
2
  //#region src/common/url.ts
3
3
  const SAFE_URL_SCHEMES = /* @__PURE__ */ new Set([
4
4
  "http",
@@ -35,7 +35,14 @@ function isUnsafeUrlAttribute(key, value) {
35
35
  const ROUTE_ROOT_COMPONENT = Symbol.for("askr.route-root-component");
36
36
  //#endregion
37
37
  //#region src/csp-nonce.ts
38
+ /** Lexical scope carrying the CSP nonce for the current render, if any. */
38
39
  const CspNonceScope = defineScope(void 0);
40
+ /**
41
+ * Read the CSP nonce for the current render from {@link CspNonceScope}.
42
+ *
43
+ * @returns The active nonce, or `undefined` when called outside of a
44
+ * component render or when no nonce was configured.
45
+ */
39
46
  function cspNonce() {
40
47
  try {
41
48
  return readScope(CspNonceScope);
@@ -1,2 +1,2 @@
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";
1
+ import { Bt as DataRuntimeOptions, Gt as Query, Ht as InvalidateOptions, Jt as QueryKeyPart, Kt as QueryConsistency, Qt as ServerQueryHandler, S as createMutation, Ut as Mutation, Vt as InvalidateOnIntervalOptions, Wt as MutationOptions, Xt as QueryScope, Yt as QueryPrefetchContext, Zt as QueryStaleReason, _ as invalidateOnInterval, b as getDefaultDataRuntime, c as ServerQueryRegistry, d as defineServerQueries, f as dehydrateDataRuntime, g as invalidate, h as serveQuery, l as createQueryPrefetchContext, m as prefetchQuery, p as hydrateDataRuntime, qt as QueryDefinition, s as ServerQueryEntry, u as defineQuery, v as queryScope, x as createQuery, y as createDataRuntime, zt as DataRuntime } from "../index-CTIBOqUB.js";
2
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-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";
1
+ import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-JxoRgrrt.js";
2
+ import { c as queryScope, n as createMutation, o as invalidate, s as invalidateOnInterval, t as createQuery } from "../data-Bm8L6JOm.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-CimB1YeW.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, y as logger } from "./access-DSkccuEI.js";
1
+ import { n as enqueueRuntimeTask, y as logger } from "./access-d_DCdwqn.js";
2
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";
3
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.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-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";
5
+ import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-CBzG5PyB.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-JxoRgrrt.js";
7
7
  //#region src/data/query-key.ts
8
8
  function serializeQueryKeyNumber(part) {
9
9
  if (Number.isNaN(part)) return "NaN";
@@ -44,13 +44,19 @@ function createQueryScope(namespace, invalidate) {
44
44
  }
45
45
  //#endregion
46
46
  //#region src/data/invalidation.ts
47
+ /** Mark all cached queries whose key starts with `prefix` as stale, triggering a refresh. */
47
48
  function invalidate(prefix, options) {
48
49
  invalidateQueriesForRuntime(resolveDataRuntimeState(options?.runtime), prefix, options?.markPendingWrite ?? false);
49
50
  }
51
+ /** Create a {@link QueryScope} that namespaces keys and invalidations under `namespace`. */
50
52
  function queryScope(namespace) {
51
53
  return createQueryScope(namespace, invalidate);
52
54
  }
53
55
  const INVALIDATE_ON_INTERVAL_OPTIONS_ERROR = "[Askr] invalidateOnInterval() requires an options object with a finite numeric intervalMs.";
56
+ /**
57
+ * Periodically invalidate queries matching `prefix` on a fixed interval,
58
+ * optionally gated by active route, document visibility, or window focus.
59
+ */
54
60
  function invalidateOnInterval(prefix, options) {
55
61
  if (!options || typeof options !== "object" || typeof options.intervalMs !== "number" || !Number.isFinite(options.intervalMs)) throw new Error(INVALIDATE_ON_INTERVAL_OPTIONS_ERROR);
56
62
  const runtimeState = resolveDataRuntimeState(options.runtime);
@@ -190,6 +196,11 @@ var MutationCell = class {
190
196
  });
191
197
  }
192
198
  };
199
+ /**
200
+ * Create a reactive {@link Mutation} cell bound to the current component,
201
+ * running `options.action` on `execute()` and optionally invalidating
202
+ * affected query prefixes on success.
203
+ */
193
204
  function createMutation(options) {
194
205
  if (options.key !== void 0 && options.key.length === 0) throw new TypeError("createMutation key must be a non-empty string.");
195
206
  const instance = getCurrentComponentInstance();
@@ -27,6 +27,7 @@ function createDataRuntimeState(queryCache, queryData, queryTestOverrides, mutat
27
27
  mutationTestOverrides
28
28
  };
29
29
  }
30
+ /** Create a new, isolated {@link DataRuntime} with its own query/mutation caches. */
30
31
  function createDataRuntime(options = {}) {
31
32
  const runtime = Object.freeze({
32
33
  queryCache: options.queryCache ?? /* @__PURE__ */ new Map(),
@@ -39,6 +40,7 @@ function createDataRuntime(options = {}) {
39
40
  return runtime;
40
41
  }
41
42
  const defaultDataRuntime = createDataRuntime();
43
+ /** Get the process-wide default {@link DataRuntime} used when none is provided explicitly. */
42
44
  function getDefaultDataRuntime() {
43
45
  return defaultDataRuntime;
44
46
  }
@@ -1,9 +1,9 @@
1
1
  import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
2
- import { i as getExecutionModel } from "./manifest-Dv0bO6kg.js";
2
+ import { i as getExecutionModel } from "./manifest-D6rfj_jC.js";
3
3
  import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-B7ohlh6t.js";
4
- import { t as resource } from "./resource-operation-CaAttQqz.js";
4
+ import { t as resource } from "./resource-operation-B62UQKHV.js";
5
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";
6
+ import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-BQyo7qNn.js";
7
7
  import { allOf } from "@askrjs/auth";
8
8
  //#region src/router/access.ts
9
9
  function compileNodePolicies(node) {
@@ -167,12 +167,14 @@ function page(path, Component, optionsOrFn, maybeFn) {
167
167
  if (typeof fn !== "function") throw new Error("page(path, Component, fn) requires a route definition callback as the final argument.");
168
168
  pushPageScope(path, Component, options, fn);
169
169
  }
170
+ /** Declare the index route for the enclosing `page()` scope. */
170
171
  function index(Component, options) {
171
172
  const pageScope = getCurrentPageScope();
172
173
  if (pageScope?.hasIndex) throw new Error("page() cannot declare multiple index routes.");
173
174
  if (pageScope) pageScope.hasIndex = true;
174
175
  registerRouteAtResolvedPath(resolveIndexPath(), Component, options);
175
176
  }
177
+ /** Declare the catch-all `/*` fallback route for the enclosing scope. */
176
178
  function fallback(Component) {
177
179
  if (hasActivePageScope()) {
178
180
  if (getCurrentScopeKind() !== "page") throw new Error("fallback() inside page() must be declared directly in the page scope, not inside nested group().");
@@ -225,6 +227,7 @@ function awaitWithSignal(promise, signal) {
225
227
  });
226
228
  });
227
229
  }
230
+ /** Recursively await any {@link Deferred} values nested within `input`, returning it once fully resolved. */
228
231
  async function resolveDeferredValues(input, signal) {
229
232
  const seen = /* @__PURE__ */ new Set();
230
233
  const visit = async (value) => {
@@ -242,6 +245,7 @@ async function resolveDeferredValues(input, signal) {
242
245
  await visit(input);
243
246
  return input;
244
247
  }
248
+ /** Read the current route's server loader data during render or hydration. */
245
249
  function routeData() {
246
250
  const envelope = getCurrentRenderData();
247
251
  if (envelope) return guardHydratedRouteData(envelope.route, envelope.framework);
@@ -252,6 +256,7 @@ function routeData() {
252
256
  function rejectedChild(props, error) {
253
257
  return typeof props.rejected === "function" ? props.rejected(error) : props.rejected ?? null;
254
258
  }
259
+ /** Render a {@link Deferred} value's fulfilled state, a pending placeholder, or a rejected fallback. */
255
260
  function Resolve(props) {
256
261
  if (props.value.state === "fulfilled") return props.children(props.value.value);
257
262
  if (props.value.state === "rejected") return rejectedChild(props, props.value.error);
@@ -1,5 +1,5 @@
1
- import { t as enqueueRuntimeLane } from "./access-DSkccuEI.js";
2
- import { m as withFineGrainedReadTracking } from "./readable-B99wh5Z_.js";
1
+ import { t as enqueueRuntimeLane } from "./access-d_DCdwqn.js";
2
+ import { m as withFineGrainedReadTracking } from "./readable-BsdGWsDE.js";
3
3
  //#region src/runtime/effect.ts
4
4
  const SOURCE_EFFECTS = Symbol("askr.source-effects");
5
5
  const effectSources = /* @__PURE__ */ new WeakMap();
@@ -1,6 +1,6 @@
1
- import { d as setRuntimeBulkCommitProbe, o as getRuntimeRenderer, u as runRuntimeWithSyncProgress, x as isDevelopmentEnvironment } from "./access-DSkccuEI.js";
2
- import { i as isFragmentType } from "./jsx-C3IECePB.js";
3
- import { i as finalizeReadableSubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty } from "./readable-B99wh5Z_.js";
1
+ import { d as setRuntimeBulkCommitProbe, o as getRuntimeRenderer, u as runRuntimeWithSyncProgress, x as isDevelopmentEnvironment } from "./access-d_DCdwqn.js";
2
+ import { i as isFragmentType } from "./jsx-DRS-qjiN.js";
3
+ import { i as finalizeReadableSubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty } from "./readable-BsdGWsDE.js";
4
4
  //#region src/runtime/dev-namespace.ts
5
5
  /**
6
6
  * Set a value in the dev namespace (no-op in production).
@@ -1,10 +1,10 @@
1
1
  import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
2
- import { o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-DSkccuEI.js";
2
+ import { o as getRuntimeRenderer, x as isDevelopmentEnvironment, y as logger } from "./access-d_DCdwqn.js";
3
3
  import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
4
- import { h as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent, v as rebaseVNodeTreeWithContextFrame } from "./component-internal-DlAkCgBE.js";
5
- import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
6
- import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
7
- import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-Cyfd07rf.js";
4
+ import { _ as haveEquivalentContextFrames, b as rebaseVNodeTreeWithContextFrame, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-D0yE2Ch3.js";
5
+ import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-BsdGWsDE.js";
6
+ import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-DYG80yhG.js";
7
+ import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-BH0fax4F.js";
8
8
  //#region src/runtime/child-scope.ts
9
9
  const EMPTY_CHILD_SCOPE_PROPS = {};
10
10
  const childScopesByInstance = /* @__PURE__ */ new WeakMap();
@@ -1,8 +1,11 @@
1
- import { r as JSXElement, s as Props } from "../../types-BA9FJtfR.js";
2
- import { t as Ref } from "../../compose-ref-Cizq72-x.js";
1
+ import { r as JSXElement, s as Props } from "../../types-DkVJhVs9.js";
2
+ import { t as Ref } from "../../compose-ref-DOJHoW5X.js";
3
3
  //#region src/foundations/icon/icon.types.d.ts
4
+ /** Named icon size presets, mapped to CSS variables at render time. */
4
5
  type IconSizeToken = 'sm' | 'md' | 'lg' | 'xl';
6
+ /** Camel-cased CSS style object accepted by icon `style` props. */
5
7
  type IconStyleObject = Record<string, unknown>;
8
+ /** Props specific to the icon contract, independent of the underlying `<svg>` props. */
6
9
  type IconOwnProps = {
7
10
  size?: number | string;
8
11
  strokeWidth?: number;
@@ -12,18 +15,26 @@ type IconOwnProps = {
12
15
  style?: string | IconStyleObject;
13
16
  iconName?: string;
14
17
  };
18
+ /** Full prop set accepted by {@link IconBase} and generated icon components. */
15
19
  type IconProps = Omit<Props, 'children' | 'class' | 'color' | 'height' | 'ref' | 'role' | 'stroke' | 'stroke-width' | 'style' | 'title' | 'width'> & IconOwnProps & {
16
20
  children?: unknown;
17
21
  ref?: Ref<SVGSVGElement>;
18
22
  };
19
23
  //#endregion
20
24
  //#region src/foundations/icon/icon.d.ts
25
+ /** Check whether `value` is one of the named icon size tokens ('sm'|'md'|'lg'|'xl'). */
21
26
  declare function isIconSizeToken(value: unknown): value is IconSizeToken;
27
+ /** Normalize a numeric icon size to a `px` string; strings pass through unchanged. */
22
28
  declare function normalizeIconSizeValue(size: number | string): string;
29
+ /** Resolve a size (token or literal) to a CSS `var(--ak-icon-size-*, ...)` expression or literal value. */
23
30
  declare function resolveIconSizeVariable(size: number | string): string;
31
+ /** Resolve a stroke width to a CSS `var(--ak-icon-stroke-width-*, ...)` expression, scoped to `sizeToken` when given. */
24
32
  declare function resolveIconStrokeWidthVariable(strokeWidth: number, sizeToken: IconSizeToken | undefined): string;
33
+ /** Serialize an inline style object (or pass through a string) to a CSS declaration string. */
25
34
  declare function serializeIconStyle(style: string | IconStyleObject | undefined): string;
35
+ /** Join non-empty CSS declaration fragments with `;`, dropping any that are blank. */
26
36
  declare function joinIconStyle(...styles: Array<string | undefined>): string | undefined;
37
+ /** Compute the shared SVG attributes and inline style implementing the icon size/stroke/color contract. */
27
38
  declare function getIconContractProps({ size, strokeWidth, color, title, style, iconName }: Pick<IconProps, 'color' | 'iconName' | 'size' | 'strokeWidth' | 'style' | 'title'>): {
28
39
  sizeToken: IconSizeToken | undefined;
29
40
  decorative: string | undefined;
@@ -45,6 +56,7 @@ declare function getIconContractProps({ size, strokeWidth, color, title, style,
45
56
  'data-color': string | undefined;
46
57
  };
47
58
  };
59
+ /** Base `<svg>` wrapper implementing the icon contract; generated icon components render into it. */
48
60
  declare function IconBase({ size, strokeWidth, color, title, class: className, style, iconName, children, ref, ...rest }: IconProps): JSXElement;
49
61
  //#endregion
50
62
  export { IconBase, type IconOwnProps, type IconProps, type IconSizeToken, type IconStyleObject, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle };
@@ -6,17 +6,21 @@ const ICON_SIZE_TOKENS = [
6
6
  "lg",
7
7
  "xl"
8
8
  ];
9
+ /** Check whether `value` is one of the named icon size tokens ('sm'|'md'|'lg'|'xl'). */
9
10
  function isIconSizeToken(value) {
10
11
  return typeof value === "string" && ICON_SIZE_TOKENS.includes(value);
11
12
  }
13
+ /** Normalize a numeric icon size to a `px` string; strings pass through unchanged. */
12
14
  function normalizeIconSizeValue(size) {
13
15
  if (typeof size === "number") return `${size}px`;
14
16
  return size;
15
17
  }
18
+ /** Resolve a size (token or literal) to a CSS `var(--ak-icon-size-*, ...)` expression or literal value. */
16
19
  function resolveIconSizeVariable(size) {
17
20
  if (isIconSizeToken(size)) return `var(--ak-icon-size-${size}, var(--ak-icon-size-md, 1.25rem))`;
18
21
  return normalizeIconSizeValue(size);
19
22
  }
23
+ /** Resolve a stroke width to a CSS `var(--ak-icon-stroke-width-*, ...)` expression, scoped to `sizeToken` when given. */
20
24
  function resolveIconStrokeWidthVariable(strokeWidth, sizeToken) {
21
25
  if (sizeToken) return `var(--ak-icon-stroke-width-${sizeToken}, var(--ak-icon-stroke-width-md, ${strokeWidth}))`;
22
26
  return `var(--ak-icon-stroke-width-md, ${strokeWidth})`;
@@ -24,15 +28,18 @@ function resolveIconStrokeWidthVariable(strokeWidth, sizeToken) {
24
28
  function camelToKebab(key) {
25
29
  return key.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
26
30
  }
31
+ /** Serialize an inline style object (or pass through a string) to a CSS declaration string. */
27
32
  function serializeIconStyle(style) {
28
33
  if (!style) return "";
29
34
  if (typeof style === "string") return style.trim();
30
35
  return Object.entries(style).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => `${camelToKebab(key)}:${String(value)}`).join(";");
31
36
  }
37
+ /** Join non-empty CSS declaration fragments with `;`, dropping any that are blank. */
32
38
  function joinIconStyle(...styles) {
33
39
  const merged = styles.map((style) => style?.trim()).filter(Boolean);
34
40
  return merged.length > 0 ? merged.join(";") : void 0;
35
41
  }
42
+ /** Compute the shared SVG attributes and inline style implementing the icon size/stroke/color contract. */
36
43
  function getIconContractProps({ size = 20, strokeWidth = 2, color = "currentColor", title, style, iconName }) {
37
44
  const sizeToken = isIconSizeToken(size) ? size : void 0;
38
45
  const decorative = title ? void 0 : "true";
@@ -61,6 +68,7 @@ function getIconContractProps({ size = 20, strokeWidth = 2, color = "currentColo
61
68
  }
62
69
  };
63
70
  }
71
+ /** Base `<svg>` wrapper implementing the icon contract; generated icon components render into it. */
64
72
  function IconBase({ size = 20, strokeWidth = 2, color = "currentColor", title, class: className, style, iconName, children, ref, ...rest }) {
65
73
  const { attrs } = getIconContractProps({
66
74
  size,
@@ -1,3 +1,3 @@
1
- import { r as JSXElement } from "../types-BA9FJtfR.js";
2
- import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-oswRaMn6.js";
1
+ import { r as JSXElement } from "../types-DkVJhVs9.js";
2
+ import { c as DefaultPortal, d as definePortal, f as Presence, h as SlotProps, l as Portal, m as Slot, p as PresenceProps, u as PortalProps, v as LayoutComponent, y as layout } from "../index-S2IqSJib.js";
3
3
  export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
@@ -1,2 +1,2 @@
1
- import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures-DKjkAmM5.js";
1
+ import { a as definePortal, c as layout, i as Portal, o as Presence, r as DefaultPortal, s as Slot } from "../structures-CPycoyZj.js";
2
2
  export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
@@ -1,5 +1,5 @@
1
- import { t as Ref } from "../../compose-ref-Cizq72-x.js";
2
- import { d as KeyboardLikeEvent, f as PointerLikeEvent, l as DefaultPreventable, p as PropagationStoppable } from "../../index-BnU0NPwM.js";
1
+ import { t as Ref } from "../../compose-ref-DOJHoW5X.js";
2
+ import { d as KeyboardLikeEvent, f as PointerLikeEvent, l as DefaultPreventable, p as PropagationStoppable } from "../../index-CzH-0LcA.js";
3
3
  //#region src/foundations/interactions/pressable.d.ts
4
4
  /**
5
5
  * pressable
@@ -33,6 +33,7 @@ import { d as KeyboardLikeEvent, f as PointerLikeEvent, l as DefaultPreventable,
33
33
  * - Held Enter/Space will fire onPress repeatedly (matches native button)
34
34
  * - No debouncing or repeat prevention (platform parity)
35
35
  */
36
+ /** Options for {@link pressable}. */
36
37
  interface PressableOptions {
37
38
  disabled?: boolean;
38
39
  onPress?: (e: PressEvent) => void;
@@ -42,6 +43,7 @@ interface PressableOptions {
42
43
  isNativeButton?: boolean;
43
44
  }
44
45
  type PressEvent = DefaultPreventable & PropagationStoppable;
46
+ /** Element props returned by {@link pressable}. */
45
47
  interface PressableResult {
46
48
  onClick: (e: PressEvent) => void;
47
49
  disabled?: true;
@@ -51,6 +53,7 @@ interface PressableResult {
51
53
  onKeyUp?: (e: KeyboardLikeEvent) => void;
52
54
  'aria-disabled'?: 'true';
53
55
  }
56
+ /** Produce click/keyboard props implementing 'press' semantics for an element. */
54
57
  declare function pressable({ disabled, onPress, isNativeButton }: PressableOptions): PressableResult;
55
58
  //#endregion
56
59
  //#region src/foundations/interactions/dismissable.d.ts
@@ -97,6 +100,7 @@ declare function pressable({ disabled, onPress, isNativeButton }: PressableOptio
97
100
  * ❌ Can't create custom escape handler - this is the only one
98
101
  * ❌ Can't bypass via direct event listeners - mergeProps composes correctly
99
102
  */
103
+ /** Options for {@link dismissable}. */
100
104
  interface DismissableOptions {
101
105
  /**
102
106
  * Reference to the protected element for outside click detection. Attach the
@@ -112,6 +116,7 @@ interface DismissableOptions {
112
116
  */
113
117
  onDismiss?: (trigger: 'escape' | 'outside') => void;
114
118
  }
119
+ /** Produce keydown/outside-click props that invoke `onDismiss` on Escape or an outside click. */
115
120
  declare function dismissable({ node, disabled, onDismiss }: DismissableOptions): {
116
121
  onKeyDown: (e: KeyboardLikeEvent) => void;
117
122
  onPointerDownCapture: (e: PointerLikeEvent) => void;
@@ -124,14 +129,17 @@ declare function dismissable({ node, disabled, onDismiss }: DismissableOptions):
124
129
  * Normalize focus-related props for hosts.
125
130
  * - No DOM manipulation here; returns props that the runtime may attach.
126
131
  */
132
+ /** Options for {@link focusable}. */
127
133
  interface FocusableOptions {
128
134
  disabled?: boolean;
129
135
  tabIndex?: number | undefined;
130
136
  }
137
+ /** Element props returned by {@link focusable}. */
131
138
  interface FocusableResult {
132
139
  tabIndex?: number;
133
140
  'aria-disabled'?: 'true';
134
141
  }
142
+ /** Normalize `tabIndex`/`aria-disabled` props for a focusable host. */
135
143
  declare function focusable({ disabled, tabIndex }: FocusableOptions): FocusableResult;
136
144
  //#endregion
137
145
  //#region src/foundations/interactions/hoverable.d.ts
@@ -140,20 +148,25 @@ declare function focusable({ disabled, tabIndex }: FocusableOptions): FocusableR
140
148
  *
141
149
  * Produces props for pointer enter/leave handling. Pure and deterministic.
142
150
  */
151
+ /** Options for {@link hoverable}. */
143
152
  interface HoverableOptions {
144
153
  disabled?: boolean;
145
154
  onEnter?: (e: HoverEvent) => void;
146
155
  onLeave?: (e: HoverEvent) => void;
147
156
  }
148
157
  type HoverEvent = DefaultPreventable & PropagationStoppable;
158
+ /** Element props returned by {@link hoverable}. */
149
159
  interface HoverableResult {
150
160
  onPointerEnter?: (e: HoverEvent) => void;
151
161
  onPointerLeave?: (e: HoverEvent) => void;
152
162
  }
163
+ /** Produce pointer enter/leave props that call `onEnter`/`onLeave` unless disabled. */
153
164
  declare function hoverable({ disabled, onEnter, onLeave }: HoverableOptions): HoverableResult;
154
165
  //#endregion
155
166
  //#region src/foundations/interactions/roving-focus.d.ts
167
+ /** Arrow-key axis for {@link rovingFocus}. */
156
168
  type Orientation = 'horizontal' | 'vertical' | 'both';
169
+ /** Options for {@link rovingFocus}. */
157
170
  interface RovingFocusOptions {
158
171
  /**
159
172
  * Current focused index
@@ -183,6 +196,7 @@ interface RovingFocusOptions {
183
196
  */
184
197
  isDisabled?: (index: number) => boolean;
185
198
  }
199
+ /** Container and per-item props returned by {@link rovingFocus}. */
186
200
  interface RovingFocusResult {
187
201
  /**
188
202
  * Props for the container element (composes via mergeProps)
@@ -198,6 +212,7 @@ interface RovingFocusResult {
198
212
  'data-roving-index': number;
199
213
  };
200
214
  }
215
+ /** Implement arrow-key roving tabindex navigation over a set of items. */
201
216
  declare function rovingFocus(options: RovingFocusOptions): RovingFocusResult;
202
217
  /**
203
218
  * USAGE EXAMPLE:
@@ -227,6 +242,7 @@ declare function rovingFocus(options: RovingFocusOptions): RovingFocusResult;
227
242
  */
228
243
  //#endregion
229
244
  //#region src/foundations/interactions/interaction-policy.d.ts
245
+ /** Input to {@link applyInteractionPolicy}. */
230
246
  interface InteractionPolicyInput {
231
247
  /** Whether the host element is a native interactive element (button, a, etc) */
232
248
  isNative: boolean;
@@ -1,2 +1,2 @@
1
- import { a as focusable, i as hoverable, n as mergeInteractionProps, o as dismissable, r as rovingFocus, s as pressable, t as applyInteractionPolicy } from "../../interactions-CWkNEq_C.js";
1
+ import { a as focusable, i as hoverable, n as mergeInteractionProps, o as dismissable, r as rovingFocus, s as pressable, t as applyInteractionPolicy } from "../../interactions-B4XaFxt1.js";
2
2
  export { applyInteractionPolicy, dismissable, focusable, hoverable, mergeInteractionProps, pressable, rovingFocus };
@@ -1,10 +1,16 @@
1
- import { Nt as State } from "../../index-DA3g8lm8.js";
1
+ import { dn as State } from "../../index-CTIBOqUB.js";
2
2
  //#region src/foundations/state/controllable.d.ts
3
+ /** Whether `value` represents controlled mode (not `undefined`). */
3
4
  declare function isControlled<T>(value: T | undefined): value is T;
5
+ /** Resolve the effective value and controlled-ness for a controllable prop. */
4
6
  declare function resolveControllable<T>(value: T | undefined, defaultValue: T): {
5
7
  value: T;
6
8
  isControlled: boolean;
7
9
  };
10
+ /**
11
+ * Build a `set` function that calls `onChange` in controlled mode, or
12
+ * updates internal state and then calls `onChange` in uncontrolled mode.
13
+ */
8
14
  declare function makeControllable<T>(options: {
9
15
  value: T | undefined;
10
16
  defaultValue: T;
@@ -14,6 +20,7 @@ declare function makeControllable<T>(options: {
14
20
  set: (next: T) => void;
15
21
  isControlled: boolean;
16
22
  };
23
+ /** A {@link State} accessor that also reports whether it is controlled. */
17
24
  type ControllableState<T> = State<T> & {
18
25
  isControlled: boolean;
19
26
  };
@@ -1,4 +1,4 @@
1
- import { t as state } from "../../state-XPZYUzHL.js";
1
+ import { t as state } from "../../state-DmkGM_LN.js";
2
2
  //#region src/foundations/state/controllable.ts
3
3
  /**
4
4
  * controllable
@@ -23,9 +23,11 @@ import { t as state } from "../../state-XPZYUzHL.js";
23
23
  * controllableState uses Object.is() to prevent unnecessary onChange calls.
24
24
  * This is intentional — strict equality, no deep comparison.
25
25
  */
26
+ /** Whether `value` represents controlled mode (not `undefined`). */
26
27
  function isControlled(value) {
27
28
  return value !== void 0;
28
29
  }
30
+ /** Resolve the effective value and controlled-ness for a controllable prop. */
29
31
  function resolveControllable(value, defaultValue) {
30
32
  const controlled = isControlled(value);
31
33
  return {
@@ -33,6 +35,10 @@ function resolveControllable(value, defaultValue) {
33
35
  isControlled: controlled
34
36
  };
35
37
  }
38
+ /**
39
+ * Build a `set` function that calls `onChange` in controlled mode, or
40
+ * updates internal state and then calls `onChange` in uncontrolled mode.
41
+ */
36
42
  function makeControllable(options) {
37
43
  const { value, defaultValue, onChange, setInternal } = options;
38
44
  const { isControlled } = resolveControllable(value, defaultValue);
@@ -1,3 +1,3 @@
1
- import { r as JSXElement } from "../../types-BA9FJtfR.js";
2
- import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-oswRaMn6.js";
1
+ import { r as JSXElement } from "../../types-DkVJhVs9.js";
2
+ import { _ as isElement, a as Collection, c as DefaultPortal, d as definePortal, f as Presence, g as cloneElement, h as SlotProps, i as createLayer, l as Portal, m as Slot, n as LayerManager, o as CollectionItem, p as PresenceProps, r as LayerOptions, s as createCollection, t as Layer, u as PortalProps, v as LayoutComponent, y as layout } from "../../index-S2IqSJib.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, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
@@ -1,2 +1,2 @@
1
- import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures-DKjkAmM5.js";
1
+ import { a as definePortal, c as layout, i as Portal, l as cloneElement, n as createCollection, o as Presence, r as DefaultPortal, s as Slot, t as createLayer, u as isElement } from "../../structures-CPycoyZj.js";
2
2
  export { DefaultPortal, Portal, Presence, Slot, cloneElement, createCollection, createLayer, definePortal, isElement, layout };
@@ -1,3 +1,3 @@
1
- import { n as composeRefs, r as setRef, t as Ref } from "../../compose-ref-Cizq72-x.js";
2
- import { a as ariaSelected, c as composeHandlers, d as KeyboardLikeEvent, f as PointerLikeEvent, i as ariaExpanded, l as DefaultPreventable, n as formatId, o as mergeProps, p as PropagationStoppable, r as ariaDisabled, s as ComposeHandlersOptions, t as FormatIdOptions, u as FocusLikeEvent } from "../../index-BnU0NPwM.js";
1
+ import { n as composeRefs, r as setRef, t as Ref } from "../../compose-ref-DOJHoW5X.js";
2
+ import { a as ariaSelected, c as composeHandlers, d as KeyboardLikeEvent, f as PointerLikeEvent, i as ariaExpanded, l as DefaultPreventable, n as formatId, o as mergeProps, p as PropagationStoppable, r as ariaDisabled, s as ComposeHandlersOptions, t as FormatIdOptions, u as FocusLikeEvent } from "../../index-CzH-0LcA.js";
3
3
  export { type ComposeHandlersOptions, type DefaultPreventable, type FocusLikeEvent, type FormatIdOptions, type KeyboardLikeEvent, type PointerLikeEvent, type PropagationStoppable, type Ref, ariaDisabled, ariaExpanded, ariaSelected, composeHandlers, composeRefs, formatId, mergeProps, setRef };
@@ -1,3 +1,3 @@
1
- import { a as ariaSelected, i as ariaExpanded, n as setRef, o as mergeProps, r as ariaDisabled, s as composeHandlers, t as composeRefs } from "../../compose-ref-Cc_YkUpM.js";
1
+ import { a as ariaSelected, i as ariaExpanded, n as setRef, o as mergeProps, r as ariaDisabled, s as composeHandlers, t as composeRefs } from "../../compose-ref-1Fhs7mbF.js";
2
2
  import { t as formatId } from "../../utilities-C_CGX4Dz.js";
3
3
  export { ariaDisabled, ariaExpanded, ariaSelected, composeHandlers, composeRefs, formatId, mergeProps, setRef };
@@ -1,17 +1,20 @@
1
- import { n as scheduleEventHandler } from "../scheduler-CmLO4Dfm.js";
1
+ import { X as scheduleEventHandler } from "../index-CTIBOqUB.js";
2
2
  //#region src/fx/timing.d.ts
3
3
  /**
4
4
  * Timing utilities — pure helpers for common async patterns
5
5
  * No framework coupling. No lifecycle awareness.
6
6
  */
7
+ /** Options for {@link debounce}. */
7
8
  interface DebounceOptions {
8
9
  leading?: boolean;
9
10
  trailing?: boolean;
10
11
  }
12
+ /** Options for {@link throttle}. */
11
13
  interface ThrottleOptions {
12
14
  leading?: boolean;
13
15
  trailing?: boolean;
14
16
  }
17
+ /** Options for {@link retry}. */
15
18
  interface RetryOptions {
16
19
  maxAttempts?: number;
17
20
  delayMs?: number;
@@ -158,6 +161,7 @@ declare function retry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise
158
161
  //#endregion
159
162
  //#region src/fx/fx.d.ts
160
163
  type CancelFn = () => void;
164
+ /** Wrap an event handler so rapid events are coalesced and delayed by `ms`. */
161
165
  declare function debounceEvent(ms: number, handler: EventListener, options?: {
162
166
  leading?: boolean;
163
167
  trailing?: boolean;
@@ -165,16 +169,20 @@ declare function debounceEvent(ms: number, handler: EventListener, options?: {
165
169
  cancel(): void;
166
170
  flush(): void;
167
171
  };
172
+ /** Wrap an event handler so it runs at most once per `ms` interval. */
168
173
  declare function throttleEvent(ms: number, handler: EventListener, options?: {
169
174
  leading?: boolean;
170
175
  trailing?: boolean;
171
176
  }): EventListener & {
172
177
  cancel(): void;
173
178
  };
179
+ /** Wrap an event handler so it runs at most once per animation frame, using the latest event. */
174
180
  declare function rafEvent(handler: EventListener): EventListener & {
175
181
  cancel(): void;
176
182
  };
183
+ /** Schedule `fn` after `ms`, auto-cancelling on component cleanup; returns a cancel function. */
177
184
  declare function scheduleTimeout(ms: number, fn: () => void): CancelFn;
185
+ /** Schedule `fn` during browser idle time, auto-cancelling on component cleanup. */
178
186
  declare function scheduleIdle(fn: () => void, options?: {
179
187
  timeout?: number;
180
188
  }): CancelFn;
@@ -183,6 +191,7 @@ interface RetryOptions$1 {
183
191
  delayMs?: number;
184
192
  backoff?: (attemptIndex: number) => number;
185
193
  }
194
+ /** Run `fn`, retrying with backoff on failure, auto-cancelling on component cleanup. */
186
195
  declare function scheduleRetry<T>(fn: () => Promise<T>, options?: RetryOptions$1): {
187
196
  cancel(): void;
188
197
  };
package/dist/fx/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as scheduleEventHandler, n as enqueueRuntimeTask, y as logger } from "../access-DSkccuEI.js";
1
+ import { g as scheduleEventHandler, n as enqueueRuntimeTask, y as logger } from "../access-d_DCdwqn.js";
2
2
  import { f as getCurrentComponentInstance } from "../component-scope-4I3yEMkb.js";
3
3
  //#region src/fx/timing.ts
4
4
  /**
@@ -263,6 +263,7 @@ function enqueueUserCallback(fn) {
263
263
  }
264
264
  });
265
265
  }
266
+ /** Wrap an event handler so rapid events are coalesced and delayed by `ms`. */
266
267
  function debounceEvent(ms, handler, options) {
267
268
  const { leading = false, trailing = true } = options || {};
268
269
  const inst = getCurrentComponentInstance();
@@ -309,6 +310,7 @@ function debounceEvent(ms, handler, options) {
309
310
  });
310
311
  return debounced;
311
312
  }
313
+ /** Wrap an event handler so it runs at most once per `ms` interval. */
312
314
  function throttleEvent(ms, handler, options) {
313
315
  const { leading = true, trailing = true } = options || {};
314
316
  const inst = getCurrentComponentInstance();
@@ -347,6 +349,7 @@ function throttleEvent(ms, handler, options) {
347
349
  if (inst) (inst.cleanupFns ??= []).push(() => throttled.cancel());
348
350
  return throttled;
349
351
  }
352
+ /** Wrap an event handler so it runs at most once per animation frame, using the latest event. */
350
353
  function rafEvent(handler) {
351
354
  const inst = getCurrentComponentInstance();
352
355
  if (inst && inst.ssr) return noopEventListener;
@@ -378,6 +381,7 @@ function rafEvent(handler) {
378
381
  if (inst) (inst.cleanupFns ??= []).push(() => fn.cancel());
379
382
  return fn;
380
383
  }
384
+ /** Schedule `fn` after `ms`, auto-cancelling on component cleanup; returns a cancel function. */
381
385
  function scheduleTimeout(ms, fn) {
382
386
  throwIfDuringRender();
383
387
  const inst = getCurrentComponentInstance();
@@ -395,6 +399,7 @@ function scheduleTimeout(ms, fn) {
395
399
  if (inst) (inst.cleanupFns ??= []).push(cancel);
396
400
  return cancel;
397
401
  }
402
+ /** Schedule `fn` during browser idle time, auto-cancelling on component cleanup. */
398
403
  function scheduleIdle(fn, options) {
399
404
  throwIfDuringRender();
400
405
  const inst = getCurrentComponentInstance();
@@ -421,6 +426,7 @@ function scheduleIdle(fn, options) {
421
426
  if (inst) (inst.cleanupFns ??= []).push(cancel);
422
427
  return cancel;
423
428
  }
429
+ /** Run `fn`, retrying with backoff on failure, auto-cancelling on component cleanup. */
424
430
  function scheduleRetry(fn, options) {
425
431
  throwIfDuringRender();
426
432
  const inst = getCurrentComponentInstance();