@askrjs/askr 0.0.86 → 0.0.87

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 (44) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/capabilities.json +25 -0
  3. package/dist/actions/index.d.ts +1 -1
  4. package/dist/actions/index.js +1 -1
  5. package/dist/{activity-BvgvaMZA.js → activity-BnkhdIXm.js} +1 -1
  6. package/dist/{activity-B1I5HJQI.d.ts → activity-DNYL__cW.d.ts} +1 -1
  7. package/dist/benchmark.js +5 -5
  8. package/dist/boot/index.d.ts +3 -3
  9. package/dist/boot/index.js +1 -1
  10. package/dist/{boot-CViTpUiB.js → boot-Bd-j_BL5.js} +9 -9
  11. package/dist/{component-internal-DcrLymUJ.js → component-internal-uVCJAre6.js} +1 -1
  12. package/dist/control/index.js +1 -1
  13. package/dist/{control-oLADku43.js → control-BF3geQKh.js} +1 -1
  14. package/dist/{csp-nonce-Bc52OIVc.js → csp-nonce-CUscoNF1.js} +1 -1
  15. package/dist/data/index.d.ts +1 -1
  16. package/dist/data/index.js +3 -3
  17. package/dist/{data-DGrD3-qA.js → data-CXZ-FOa7.js} +5 -2
  18. package/dist/{data-runtime-Ck3tJDDQ.js → data-runtime-CnVeSvJz.js} +6 -4
  19. package/dist/{deferred-nleQtdfY.js → deferred-_DaSfpsr.js} +2 -2
  20. package/dist/{for-internal-B_mnQhan.js → for-internal-Dxf3iZ9E.js} +1 -1
  21. package/dist/{index-pIgGaXvS.d.ts → index-BvNkcegT.d.ts} +1 -1
  22. package/dist/{index-5S-fi2xy.d.ts → index-SGxMZLAc.d.ts} +3 -0
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +6 -6
  25. package/dist/{lifecycle-operations-BrYrBsXY.js → lifecycle-operations-DTO93Hrl.js} +1 -1
  26. package/dist/{navigate-NyIjQUwI.d.ts → navigate-B_fcLDAG.d.ts} +1 -1
  27. package/dist/{navigate-BwAPbpCb.js → navigate-DSATWfHh.js} +4 -4
  28. package/dist/{query-registry-CPW_6nwF.js → query-registry-p_0kkieE.js} +1 -1
  29. package/dist/{renderer-D9DL9R2D.js → renderer-BGMaUrVj.js} +9 -6
  30. package/dist/{resolution-YHwi4Bav.js → resolution-BRmiFYvw.js} +3 -3
  31. package/dist/{resource-operation-ys6eDoRJ.js → resource-operation-B94oj6xT.js} +1 -1
  32. package/dist/resources/index.d.ts +2 -2
  33. package/dist/resources/index.js +4 -4
  34. package/dist/router/index.d.ts +3 -3
  35. package/dist/router/index.js +5 -5
  36. package/dist/ssg/index.d.ts +1 -1
  37. package/dist/ssg/index.js +3 -3
  38. package/dist/ssr/index.d.ts +2 -2
  39. package/dist/ssr/index.js +1 -1
  40. package/dist/{ssr-B98593qJ.js → ssr-q250YlKo.js} +11 -8
  41. package/dist/testing/index.d.ts +17 -3
  42. package/dist/testing/index.js +41 -3
  43. package/dist/{verify-hydration-ww1dgwea.js → verify-hydration-DkISyZCo.js} +1 -1
  44. package/package.json +2 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,60 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.0.85
6
+
7
+ - breaking(runtime): require Node.js 24.15 or newer.
8
+ - feat(router): validate route hydration data and add synchronous `dehydrate`
9
+ selectors so SSR/SSG can omit server-only fields while client navigation
10
+ retains complete loader results.
11
+ - feat(router): add registry `basePath` support for mounted SPA, SSR, and SSG
12
+ routing, destinations, navigation, redirects, activity, and metadata context.
13
+ - fix(jsx): expose safe element inspection and cloning from the structures
14
+ foundation without carrying renderer-private cache metadata into clones.
15
+ - fix(renderer): retain intrinsic hosts and nested interactive descendants when
16
+ a rerender passes through a transparent context scope, keep keyed provider
17
+ ownership isolated, and preserve intentional focus moves during commits.
18
+ - fix(runtime): isolate synchronous DOM handlers from active reconciliation
19
+ scopes and correctly detach capture-phase delegated listeners.
20
+
21
+ ### 0.0.52 — audit remediation
22
+
23
+ - fix(release): rebuild packed artifacts from an absent `dist`, verify every
24
+ export-map subpath and installed CLI, and keep source maps out of npm
25
+ tarballs.
26
+ - fix(data): make query invalidation generation-safe, await reconciliation,
27
+ normalize async failures, and retain mutation callbacks for an execution.
28
+ - fix(router): isolate initial route sources per root and keep history/route
29
+ cleanup coherent when destination rendering or teardown fails.
30
+ - fix(renderer): make control, keyed, portal, ownership, and lifecycle writes
31
+ transactional, with anchored multi-node ranges and structural SSR hydration.
32
+ - perf(hydration): adopt matching intrinsic SSR trees in place and publish only
33
+ transactional refs and listeners instead of running full reconciliation.
34
+ - fix(hydration): activate deferred boundaries locally with retryable marker and
35
+ listener rollback semantics, while preserving focus, portals, and cleanup.
36
+ - refactor(renderer): split blueprint, boundary-range, component-host, and
37
+ lifecycle batch responsibilities behind internal facades with enforced
38
+ complexity budgets.
39
+ - test(bench): add keyed movement-density and separate full-clear teardown
40
+ diagnostics without changing movement thresholds or cleanup semantics.
41
+ - test(bench): add a Chromium component-boundary keyed reorder diagnostic and
42
+ document browser authority for jsdom-only hotspot investigations.
43
+ - fix(router): preserve shared layout identity and roll back multi-root route
44
+ DOM, ownership, metadata, history, and URL publication as one transaction.
45
+ - fix(ssg): publish full builds through staging/backup swap and incremental
46
+ routes through temp-file replacement.
47
+ - test(quality): add replayable lifecycle traces, deterministic seed fixtures,
48
+ timer-policy enforcement, benchmark guardrails, and package release gates.
49
+
50
+ ## 0.0.51
51
+
52
+ - chore(quality): make release verification test packed consumers and public types, exclude source maps from npm tarballs, and replace architecture size checks with semantic boundaries.
53
+ - feat(router): add route-query updates for route-local filters without remounting the active route.
54
+ - feat(runtime): isolate render-scoped query caches, keep the first shared query contract, and evict entries when the last owner unmounts.
55
+ - feat(ssr): harden CSS style sanitization with an allowlist for safe functions and URI-scheme rejection, while resetting escape caches per request.
56
+ - fix(router): trim the public router barrel so internal manifest and SSR helpers stay on source-only paths.
57
+
58
+ ## 0.0.29
59
+
60
+ - feat(state): support destructuring `const [get, set] = state(initial)`; getter remains callable and setter is identical to `get.set`. Added tests and docs.
package/capabilities.json CHANGED
@@ -12,6 +12,31 @@
12
12
  "docs": "https://github.com/askrjs/askr/blob/main/docs/guides/state.md",
13
13
  "docsPath": "docs/guides/state.md"
14
14
  },
15
+ {
16
+ "intent": "data queries and mutations",
17
+ "package": "@askrjs/askr",
18
+ "import": "@askrjs/askr/data",
19
+ "exports": ["createQuery", "defineQuery", "queryScope", "createMutation"],
20
+ "constraints": [
21
+ "query keys identify shared cache entries",
22
+ "fetches are cancellable"
23
+ ],
24
+ "stability": "stable",
25
+ "docs": "https://github.com/askrjs/askr/blob/main/docs/core/data.md",
26
+ "docsPath": "docs/core/data.md"
27
+ },
28
+ {
29
+ "intent": "test query-state fixtures",
30
+ "package": "@askrjs/askr",
31
+ "import": "@askrjs/askr/testing",
32
+ "exports": ["queryState"],
33
+ "constraints": [
34
+ "fixtures are test-only and do not perform network requests"
35
+ ],
36
+ "stability": "stable",
37
+ "docs": "https://github.com/askrjs/askr/blob/main/docs/contributing/testing.md",
38
+ "docsPath": "docs/contributing/testing.md"
39
+ },
15
40
  {
16
41
  "intent": "routing and navigation",
17
42
  "package": "@askrjs/askr",
@@ -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-pIgGaXvS.js";
1
+ import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-BvNkcegT.js";
2
2
  export { ActionDescriptor, ActionForm, ActionStatus, ActionValidationError, action, defineAction };
@@ -2,7 +2,7 @@ import { d as getCurrentAppRenderRuntime } from "../component-scope-DzJEbYGE.js"
2
2
  import { r as getCurrentRenderData } from "../render-context-D0Hoj9dW.js";
3
3
  import { t as state } from "../state-DCjONcHK.js";
4
4
  import { jsx, jsxs } from "../jsx-runtime.js";
5
- import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-Ck3tJDDQ.js";
5
+ import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-CnVeSvJz.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,5 +1,5 @@
1
1
  import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
2
- import { a as registerCommitOperation } from "./component-internal-DcrLymUJ.js";
2
+ import { a as registerCommitOperation } from "./component-internal-uVCJAre6.js";
3
3
  import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
4
4
  import { n as getActiveRenderContext } from "./render-context-D0Hoj9dW.js";
5
5
  import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
@@ -1,4 +1,4 @@
1
- import { L as RouteParams, Z as RouteSnapshot } from "./index-pIgGaXvS.js";
1
+ import { L as RouteParams, Z as RouteSnapshot } from "./index-BvNkcegT.js";
2
2
  //#region src/router/activity.d.ts
3
3
  interface RouteChangeOptions {
4
4
  immediate?: boolean;
package/dist/benchmark.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { r as flushRuntimeScheduler } from "./access-Dpfoi4cA.js";
2
- import { t as installRendererBridge } from "./renderer-D9DL9R2D.js";
2
+ import { t as installRendererBridge } from "./renderer-BGMaUrVj.js";
3
3
  import { t as state } from "./state-DCjONcHK.js";
4
4
  import { t as selector } from "./selector-Ck_Pp9av.js";
5
- import { i as For } from "./control-oLADku43.js";
5
+ import { i as For } from "./control-BF3geQKh.js";
6
6
  import { jsx, jsxs } from "./jsx-runtime.js";
7
- import { t as createIsland } from "./boot-CViTpUiB.js";
7
+ import { t as createIsland } from "./boot-Bd-j_BL5.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.86",
67
- buildLabel: "0.0.86-local"
66
+ packageVersion: "0.0.87",
67
+ buildLabel: "0.0.87-local"
68
68
  };
69
69
  function getBenchmarkMetadata() {
70
70
  return { ...benchmarkMetadata };
@@ -1,7 +1,7 @@
1
1
  import { l as ComponentFunction } from "../control-DhUZU4_V.js";
2
- import { W as RouteRegistry, w as RouteAuthOptions } from "../index-pIgGaXvS.js";
3
- import { v as DataRuntime } from "../index-5S-fi2xy.js";
4
- import { a as ScrollRestorationOptions } from "../navigate-NyIjQUwI.js";
2
+ import { W as RouteRegistry, w as RouteAuthOptions } from "../index-BvNkcegT.js";
3
+ import { v as DataRuntime } from "../index-SGxMZLAc.js";
4
+ import { a as ScrollRestorationOptions } from "../navigate-B_fcLDAG.js";
5
5
  //#region src/boot/types.d.ts
6
6
  type IslandConfig = {
7
7
  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-CViTpUiB.js";
1
+ import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-Bd-j_BL5.js";
2
2
  export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
@@ -1,19 +1,19 @@
1
1
  import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.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-DcrLymUJ.js";
3
+ import { n as createComponentInstance, r as executeComponent } from "./component-internal-uVCJAre6.js";
4
4
  import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
5
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-D9DL9R2D.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-BGMaUrVj.js";
7
7
  import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-c837KVij.js";
8
8
  import { r as assertExecutionModel, t as _applyManifest } from "./manifest-D1P9uTlz.js";
9
9
  import { d as stopHydrationRenderPhase, l as startHydrationRenderPhase, v as pageRenderEnvelope } from "./render-context-D0Hoj9dW.js";
10
- import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-Bc52OIVc.js";
11
- import { i as getDefaultDataRuntime } from "./data-runtime-Ck3tJDDQ.js";
12
- import { a as hydrateDataRuntime } from "./query-registry-CPW_6nwF.js";
10
+ import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
11
+ import { i as getDefaultDataRuntime } from "./data-runtime-CnVeSvJz.js";
12
+ import { a as hydrateDataRuntime } from "./query-registry-p_0kkieE.js";
13
13
  import { I as lockRouteRegistration, P as hasRegisteredRoutes, _ as clearRouteState, m as _setActiveRouteAuthOptions } from "./route-matching-DqULzZtC.js";
14
- import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-YHwi4Bav.js";
15
- import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-BvgvaMZA.js";
16
- import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-BwAPbpCb.js";
14
+ import { a as resolveRouteRequest, i as hasRouteRenderData, m as reviveDeferredValue, n as getRouteRenderContext, r as getRouteRenderData } from "./resolution-BRmiFYvw.js";
15
+ import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-BnkhdIXm.js";
16
+ import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-DSATWfHh.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
@@ -587,7 +587,7 @@ async function hydrateSPA(config) {
587
587
  cspNonce: config.cspNonce
588
588
  }));
589
589
  if (shouldVerifyHydrationMarkup(config)) {
590
- const { verifyHydrationSyncForUrl } = await import("./verify-hydration-ww1dgwea.js");
590
+ const { verifyHydrationSyncForUrl } = await import("./verify-hydration-DkISyZCo.js");
591
591
  if (!verifyHydrationSyncForUrl({
592
592
  root: rootElement,
593
593
  url: currentUrl,
@@ -668,7 +668,7 @@ function executeComponentSync(instance) {
668
668
  const result = callWithContext(getExecutionContextFrame(instance.ownerFrame), instance.fn, instance.props, context);
669
669
  if (trackRenderTime) {
670
670
  const renderTime = Date.now() - renderStartTime;
671
- if (renderTime > 5) warnInstanceOnce(instance, "slow-render", `[askr] Slow render detected: ${renderTime}ms. Consider optimizing component performance.`);
671
+ if (renderTime > 5) warnInstanceOnce(instance, "slow-render", `[askr] Slow render detected in ${instance.fn?.name || "<anonymous>"}: ${renderTime}ms. Consider optimizing component performance.`);
672
672
  }
673
673
  if (!instance.firstRenderComplete) instance.firstRenderComplete = true;
674
674
  didComplete = true;
@@ -1,2 +1,2 @@
1
- import { i as For, n as Match, r as Show, t as Case } from "../control-oLADku43.js";
1
+ import { i as For, n as Match, r as Show, t as Case } from "../control-BF3geQKh.js";
2
2
  export { Case, For, Match, Show };
@@ -1,7 +1,7 @@
1
1
  import { i as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
2
2
  import { b as isDevelopmentEnvironment } from "./access-Dpfoi4cA.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-B_mnQhan.js";
4
+ import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-Dxf3iZ9E.js";
5
5
  import { t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
6
6
  import { t as state } from "./state-DCjONcHK.js";
7
7
  //#region src/control/shared.ts
@@ -1,4 +1,4 @@
1
- import { g as readScope, u as defineScope } from "./component-internal-DcrLymUJ.js";
1
+ import { g as readScope, u as defineScope } from "./component-internal-uVCJAre6.js";
2
2
  //#region src/common/url.ts
3
3
  const SAFE_URL_SCHEMES = /* @__PURE__ */ new Set([
4
4
  "http",
@@ -1,2 +1,2 @@
1
- import { A as ServerQueryHandler, C as Query, D as QueryPrefetchContext, E as QueryKeyPart, O as QueryScope, S as Mutation, T as QueryDefinition, a as defineServerQueries, b as InvalidateOnIntervalOptions, c as prefetchQuery, d as invalidateOnInterval, f as queryScope, g as createMutation, h as createQuery, i as defineQuery, k as QueryStaleReason, 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 QueryConsistency, x as InvalidateOptions, y as DataRuntimeOptions } from "../index-5S-fi2xy.js";
1
+ import { A as ServerQueryHandler, C as Query, D as QueryPrefetchContext, E as QueryKeyPart, O as QueryScope, S as Mutation, T as QueryDefinition, a as defineServerQueries, b as InvalidateOnIntervalOptions, c as prefetchQuery, d as invalidateOnInterval, f as queryScope, g as createMutation, h as createQuery, i as defineQuery, k as QueryStaleReason, 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 QueryConsistency, x as InvalidateOptions, y as DataRuntimeOptions } from "../index-SGxMZLAc.js";
2
2
  export { type DataRuntime, type DataRuntimeOptions, type InvalidateOnIntervalOptions, type InvalidateOptions, type Mutation, 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-Ck3tJDDQ.js";
2
- import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-DGrD3-qA.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-CPW_6nwF.js";
1
+ import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-CnVeSvJz.js";
2
+ import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-CXZ-FOa7.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-p_0kkieE.js";
4
4
  export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
@@ -2,8 +2,8 @@ import { n as enqueueRuntimeTask, v as logger } from "./access-Dpfoi4cA.js";
2
2
  import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
3
3
  import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
4
4
  import { n as getActiveRenderContext } from "./render-context-D0Hoj9dW.js";
5
- import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-BrYrBsXY.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-Ck3tJDDQ.js";
5
+ import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-DTO93Hrl.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-CnVeSvJz.js";
7
7
  //#region src/data/query-key.ts
8
8
  function serializeQueryKeyNumber(part) {
9
9
  if (Number.isNaN(part)) return "NaN";
@@ -500,7 +500,9 @@ function createLegacyQuery(options) {
500
500
  const instance = getCurrentComponentInstance();
501
501
  const runtimeState = resolveDataRuntimeState(options.runtime);
502
502
  const cache = runtimeState.queryCache;
503
+ const override = runtimeState.queryTestOverrides.get(options.key);
503
504
  if (!instance) {
505
+ if (override) return override;
504
506
  let cell = cache.get(options.key);
505
507
  if (!cell) {
506
508
  cell = new QueryCell(options, options.key, cache);
@@ -518,6 +520,7 @@ function createLegacyQuery(options) {
518
520
  return existingSlot.cell;
519
521
  }
520
522
  if (existingSlot) existingSlot.cell.detach(instance._ownershipGeneration, hookIndex);
523
+ if (override) return override;
521
524
  let cell = cache.get(options.key);
522
525
  if (!cell) {
523
526
  cell = new QueryCell(options, options.key, cache);
@@ -14,22 +14,24 @@ function emitInvalidation(event) {
14
14
  //#region src/data/data-runtime.ts
15
15
  const dataRuntimeStates = /* @__PURE__ */ new WeakMap();
16
16
  const dataRuntimeByQueryCache = /* @__PURE__ */ new WeakMap();
17
- function createDataRuntimeState(queryCache, queryData) {
17
+ function createDataRuntimeState(queryCache, queryData, queryTestOverrides) {
18
18
  return {
19
19
  queryCache,
20
20
  queryData,
21
21
  querySlotsByGeneration: /* @__PURE__ */ new WeakMap(),
22
22
  mutationSlotsByGeneration: /* @__PURE__ */ new WeakMap(),
23
23
  queryCleanupRegistered: /* @__PURE__ */ new WeakSet(),
24
- mutationCleanupRegistered: /* @__PURE__ */ new WeakSet()
24
+ mutationCleanupRegistered: /* @__PURE__ */ new WeakSet(),
25
+ queryTestOverrides
25
26
  };
26
27
  }
27
28
  function createDataRuntime(options = {}) {
28
29
  const runtime = Object.freeze({
29
30
  queryCache: options.queryCache ?? /* @__PURE__ */ new Map(),
30
- queryData: options.queryData ?? /* @__PURE__ */ new Map()
31
+ queryData: options.queryData ?? /* @__PURE__ */ new Map(),
32
+ queryTestOverrides: options.queryTestOverrides ?? /* @__PURE__ */ new Map()
31
33
  });
32
- dataRuntimeStates.set(runtime, createDataRuntimeState(runtime.queryCache, runtime.queryData));
34
+ dataRuntimeStates.set(runtime, createDataRuntimeState(runtime.queryCache, runtime.queryData, runtime.queryTestOverrides));
33
35
  dataRuntimeByQueryCache.set(runtime.queryCache, runtime);
34
36
  return runtime;
35
37
  }
@@ -1,9 +1,9 @@
1
1
  import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
2
2
  import { i as getExecutionModel } from "./manifest-D1P9uTlz.js";
3
3
  import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-D0Hoj9dW.js";
4
- import { t as resource } from "./resource-operation-ys6eDoRJ.js";
4
+ import { t as resource } from "./resource-operation-B94oj6xT.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-DqULzZtC.js";
6
- import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-YHwi4Bav.js";
6
+ import { _ as createRouteHandler, d as DEFERRED_BOUNDARY, p as isDeferred, s as guardHydratedRouteData } from "./resolution-BRmiFYvw.js";
7
7
  import { allOf } from "@askrjs/auth";
8
8
  //#region src/router/access.ts
9
9
  function compileNodePolicies(node) {
@@ -1,7 +1,7 @@
1
1
  import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
2
2
  import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-Dpfoi4cA.js";
3
3
  import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
4
- import { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-DcrLymUJ.js";
4
+ import { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-uVCJAre6.js";
5
5
  import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
6
6
  import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
7
7
  import { o as finalizeInlineReadSubscriptions, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
@@ -1,7 +1,7 @@
1
1
  import { a as ComponentInstance, b as StateTuple, i as ReadableSource, n as ChildScope, o as Scope, r as DOMRange, u as RenderableChild } from "./control-DhUZU4_V.js";
2
2
  import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
3
3
  import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
4
- import { D as QueryPrefetchContext, _ as CoreTelemetry } from "./index-5S-fi2xy.js";
4
+ import { D as QueryPrefetchContext, _ as CoreTelemetry } from "./index-SGxMZLAc.js";
5
5
  import "./jsx-runtime-C-oIHX9X.js";
6
6
  import { AuthContext, AuthRequirement } from "@askrjs/auth";
7
7
  import { InferSchema, ObjectSchema } from "@askrjs/schema";
@@ -4,10 +4,13 @@ type QueryStaleReason = 'aborted' | 'error' | 'inconsistent';
4
4
  interface DataRuntime {
5
5
  readonly queryCache: Map<string, unknown>;
6
6
  readonly queryData: Map<string, unknown>;
7
+ /** Test-only query overrides keyed by the canonical query key. */
8
+ readonly queryTestOverrides: Map<string, unknown>;
7
9
  }
8
10
  interface DataRuntimeOptions {
9
11
  queryCache?: Map<string, unknown>;
10
12
  queryData?: Map<string, unknown>;
13
+ queryTestOverrides?: Map<string, unknown>;
11
14
  }
12
15
  interface QueryDefinition<TInput, TResult extends {}> {
13
16
  readonly key: (input: TInput) => string;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { b as StateTuple, c as readScope, o as Scope, s as defineScope, v as State, x as state, y as StateSetter } from "./control-DhUZU4_V.js";
2
2
  import { s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
3
- import { $ as cspNonce, Q as CspNonceScope, at as AskrRuntimeOptions, c as createRef, ct as createRuntime, d as registerSSRStyle, et as Selector, it as AskrRuntime, lt as getDefaultRuntime, nt as Derived, ot as RuntimeKeyedReorderDecision, rt as derive, s as Ref, st as RuntimeRendererHost, tt as selector, ut as getSignal } from "./index-pIgGaXvS.js";
3
+ import { $ as cspNonce, Q as CspNonceScope, at as AskrRuntimeOptions, c as createRef, ct as createRuntime, d as registerSSRStyle, et as Selector, it as AskrRuntime, lt as getDefaultRuntime, nt as Derived, ot as RuntimeKeyedReorderDecision, rt as derive, s as Ref, st as RuntimeRendererHost, tt as selector, ut as getSignal } from "./index-BvNkcegT.js";
4
4
  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-r-nt13FE.js";
5
- import { A as ServerQueryHandler, D as QueryPrefetchContext, T as QueryDefinition, a as defineServerQueries, c as prefetchQuery, h as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime, v as DataRuntime } from "./index-5S-fi2xy.js";
5
+ import { A as ServerQueryHandler, D as QueryPrefetchContext, T as QueryDefinition, a as defineServerQueries, c as prefetchQuery, h as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime, v as DataRuntime } from "./index-SGxMZLAc.js";
6
6
  import { i as jsxs, n as jsx } from "./jsx-runtime-Cr1jspx9.js";
7
7
  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 Ref, type RuntimeKeyedReorderDecision, type RuntimeRendererHost, type Scope, type Selector, type ServerQueryHandler, Show, type ShowProps, type State, type StateSetter, type StateTuple, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
2
2
  import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
3
3
  import { n as Fragment } from "./jsx-C3IECePB.js";
4
- import { g as readScope, u as defineScope } from "./component-internal-DcrLymUJ.js";
4
+ import { g as readScope, u as defineScope } from "./component-internal-uVCJAre6.js";
5
5
  import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
6
6
  import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
7
- import { t as installRendererBridge } from "./renderer-D9DL9R2D.js";
7
+ import { t as installRendererBridge } from "./renderer-BGMaUrVj.js";
8
8
  import { c as registerSSRStyle } from "./render-context-D0Hoj9dW.js";
9
9
  import { t as state } from "./state-DCjONcHK.js";
10
10
  import { t as selector } from "./selector-Ck_Pp9av.js";
11
- import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-Bc52OIVc.js";
12
- import { i as For, n as Match, r as Show, t as Case } from "./control-oLADku43.js";
11
+ import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
12
+ import { i as For, n as Match, r as Show, t as Case } from "./control-BF3geQKh.js";
13
13
  import { jsx, jsxs } from "./jsx-runtime.js";
14
- import { t as createQuery } from "./data-DGrD3-qA.js";
15
- import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CPW_6nwF.js";
14
+ import { t as createQuery } from "./data-CXZ-FOa7.js";
15
+ import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-p_0kkieE.js";
16
16
  //#region src/runtime/derive.ts
17
17
  const deriveCells = /* @__PURE__ */ new WeakMap();
18
18
  const dirtyDerivedCells = /* @__PURE__ */ new Set();
@@ -1,5 +1,5 @@
1
1
  import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
2
- import { a as registerCommitOperation } from "./component-internal-DcrLymUJ.js";
2
+ import { a as registerCommitOperation } from "./component-internal-uVCJAre6.js";
3
3
  import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
4
4
  //#region src/runtime/lifecycle-operations.ts
5
5
  function normalizePredicates(predicates) {
@@ -1,4 +1,4 @@
1
- import "./index-pIgGaXvS.js";
1
+ import "./index-BvNkcegT.js";
2
2
  //#region src/router/navigation-scroll.d.ts
3
3
  type NavigationScrollBehavior = 'top' | 'preserve';
4
4
  type HistoryScrollBehavior = 'restore' | 'top' | 'preserve';
@@ -1,14 +1,14 @@
1
1
  import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
2
2
  import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
3
- import { r as executeComponent } from "./component-internal-DcrLymUJ.js";
3
+ import { r as executeComponent } from "./component-internal-uVCJAre6.js";
4
4
  import { t as cleanupReadableSubscriptionSources } from "./readable-B5NtV7V0.js";
5
5
  import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
6
6
  import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Dfpid9-A.js";
7
7
  import { _ as teardownNodeSubtree } from "./cleanup-c837KVij.js";
8
- import { t as CspNonceScope } from "./csp-nonce-Bc52OIVc.js";
8
+ import { t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
9
9
  import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-DqULzZtC.js";
10
- import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-YHwi4Bav.js";
11
- import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-BvgvaMZA.js";
10
+ import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-BRmiFYvw.js";
11
+ import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-BnkhdIXm.js";
12
12
  import { r as getDefaultPortalHost, t as clearRegisteredDefaultPortalForInstance } from "./default-portal-runtime-DvMvWJVp.js";
13
13
  //#region src/router/navigation-registry.ts
14
14
  let currentInstance = null;
@@ -1,4 +1,4 @@
1
- import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-Ck3tJDDQ.js";
1
+ import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-CnVeSvJz.js";
2
2
  //#region src/common/telemetry.ts
3
3
  function withTelemetry(span, fields, work) {
4
4
  return span ? span(fields, work) : work();
@@ -4,14 +4,14 @@ import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as config
4
4
  import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
5
5
  import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
6
6
  import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
7
- import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-DcrLymUJ.js";
7
+ import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-uVCJAre6.js";
8
8
  import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
9
9
  import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
10
- import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-B_mnQhan.js";
10
+ import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-Dxf3iZ9E.js";
11
11
  import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
12
12
  import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-c837KVij.js";
13
13
  import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
14
- import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-Bc52OIVc.js";
14
+ import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-CUscoNF1.js";
15
15
  import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
16
16
  //#region src/runtime/error-boundary.ts
17
17
  function createBoundaryReset(instance) {
@@ -722,6 +722,9 @@ function applyDangerousInnerHTMLValue(el, value) {
722
722
  const html = value.__html;
723
723
  el.innerHTML = html === null || html === void 0 ? "" : String(html);
724
724
  }
725
+ function isAriaAttribute(key) {
726
+ return key.length > 5 && key.slice(0, 5).toLowerCase() === "aria-";
727
+ }
725
728
  function applyFormControlProp(el, key, value, tagName) {
726
729
  if (key === "value") {
727
730
  const stringValue = String(value);
@@ -824,7 +827,7 @@ function applyStaticScalarPropsToElement(el, props, tagName) {
824
827
  for (const key in props) {
825
828
  if (isSkippedProp(key)) continue;
826
829
  const value = props[key];
827
- if (value === void 0 || value === null || value === false) continue;
830
+ if (value === void 0 || value === null || value === false && !isAriaAttribute(key)) continue;
828
831
  if (key === "class" || key === "className") writeElementClassName(el, String(value));
829
832
  else if (key === "style") applyStylePropValue(el, value);
830
833
  else if (key === "value" || key === "checked") applyFormControlProp(el, key, value, tagName);
@@ -881,7 +884,7 @@ function applyClassPropValue(el, value, previousValue, descriptor) {
881
884
  }
882
885
  function applyScalarPropValue(el, key, value, tagName, previousValue, descriptor) {
883
886
  if (key === "dangerouslySetInnerHTML" && !isDangerousInnerHTMLPayload(value)) return;
884
- if (value === void 0 || value === null || value === false) {
887
+ if (value === void 0 || value === null || value === false && !isAriaAttribute(key)) {
885
888
  if (key === "class" || key === "className") {
886
889
  const previousTokens = descriptor?.lastClassTokens;
887
890
  if (previousTokens && previousTokens.length > 0) el.classList.remove(...previousTokens);
@@ -910,7 +913,7 @@ function removeStaleAttributes(el, vnode, props) {
910
913
  if (isSkippedProp(propName)) continue;
911
914
  if (parseEventName(propName)) continue;
912
915
  const value = props[propName];
913
- if (value === void 0 || value === null || value === false) continue;
916
+ if (value === void 0 || value === null || value === false && !isAriaAttribute(propName)) continue;
914
917
  desiredAttributes.add(getRenderedAttributeName(el, propName));
915
918
  }
916
919
  for (const attribute of Array.from(el.attributes)) if (!desiredAttributes.has(getRenderedAttributeName(el, attribute.name))) removeRenderedAttribute(el, attribute.name);
@@ -1,9 +1,9 @@
1
1
  import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
2
- import { g as readScope, u as defineScope } from "./component-internal-DcrLymUJ.js";
2
+ import { g as readScope, u as defineScope } from "./component-internal-uVCJAre6.js";
3
3
  import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
4
4
  import { b as withPageFramework, n as getActiveRenderContext, y as replacePageRoute } from "./render-context-D0Hoj9dW.js";
5
- import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-Bc52OIVc.js";
6
- import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-CPW_6nwF.js";
5
+ import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-CUscoNF1.js";
6
+ import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-p_0kkieE.js";
7
7
  import { c as removeRouteBasePath, i as getMatchingRouteRecord, l as buildRouteContext, o as addRouteBasePath, s as normalizeRouteBasePath, u as buildRouteContextBase, v as getActiveRouteAuthOptions } from "./route-matching-DqULzZtC.js";
8
8
  //#region src/router/lazy.ts
9
9
  const pendingLazy = /* @__PURE__ */ new Set();
@@ -1,6 +1,6 @@
1
1
  import { t as enqueueRuntimeLane, v as logger } from "./access-Dpfoi4cA.js";
2
2
  import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
3
- import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-DcrLymUJ.js";
3
+ import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-uVCJAre6.js";
4
4
  import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
5
5
  import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
6
6
  import { a as getResourceVerificationSnapshot, i as getNextRenderKey, n as getActiveRenderContext, o as isHydrationVerificationRender, p as throwSSRDataMissing, r as getCurrentRenderData, s as recordResourceVerificationSnapshot, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.js";
@@ -1,5 +1,5 @@
1
- import { ut as getSignal } from "../index-pIgGaXvS.js";
2
- import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-B1I5HJQI.js";
1
+ import { ut as getSignal } from "../index-BvNkcegT.js";
2
+ import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-DNYL__cW.js";
3
3
  //#region src/runtime/resource-operation.d.ts
4
4
  interface ResourceResult<T> {
5
5
  value: T | null;
@@ -1,9 +1,9 @@
1
1
  import { t as enqueueRuntimeLane } from "../access-Dpfoi4cA.js";
2
2
  import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.js";
3
- import { a as registerCommitOperation } from "../component-internal-DcrLymUJ.js";
4
- import { t as resource } from "../resource-operation-ys6eDoRJ.js";
5
- import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-BrYrBsXY.js";
6
- import { n as onRouteChange } from "../activity-BvgvaMZA.js";
3
+ import { a as registerCommitOperation } from "../component-internal-uVCJAre6.js";
4
+ import { t as resource } from "../resource-operation-B94oj6xT.js";
5
+ import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-DTO93Hrl.js";
6
+ import { n as onRouteChange } from "../activity-BnkhdIXm.js";
7
7
  //#region src/runtime/stream-operation.ts
8
8
  function toError(value) {
9
9
  return value instanceof Error ? value : new Error(String(value));
@@ -1,9 +1,9 @@
1
1
  import { u as RenderableChild } from "../control-DhUZU4_V.js";
2
2
  import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
3
- import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-pIgGaXvS.js";
3
+ import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-BvNkcegT.js";
4
4
  import "../types-C9YcqVpk.js";
5
- import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-NyIjQUwI.js";
6
- import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-B1I5HJQI.js";
5
+ import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-B_fcLDAG.js";
6
+ import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-DNYL__cW.js";
7
7
  import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
8
8
  import { ObjectSchema } from "@askrjs/schema";
9
9
  //#region src/router/route-query.d.ts
@@ -1,11 +1,11 @@
1
1
  import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
2
- import { a as isSafeHref } from "../csp-nonce-Bc52OIVc.js";
2
+ import { a as isSafeHref } from "../csp-nonce-CUscoNF1.js";
3
3
  import { jsx } from "../jsx-runtime.js";
4
4
  import { o as addRouteBasePath, y as getActiveRouteBasePath } from "../route-matching-DqULzZtC.js";
5
- import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-nleQtdfY.js";
6
- import { a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred } from "../resolution-YHwi4Bav.js";
7
- import { n as onRouteChange, t as currentRoute } from "../activity-BvgvaMZA.js";
8
- import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-BwAPbpCb.js";
5
+ import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-_DaSfpsr.js";
6
+ import { a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred } from "../resolution-BRmiFYvw.js";
7
+ import { n as onRouteChange, t as currentRoute } from "../activity-BnkhdIXm.js";
8
+ import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-DSATWfHh.js";
9
9
  import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
10
10
  import { t as applyInteractionPolicy } from "../interactions-DgGQyUQv.js";
11
11
  //#region src/router/route-query.ts
@@ -1,5 +1,5 @@
1
1
  import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-DhUZU4_V.js";
2
- import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-pIgGaXvS.js";
2
+ import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-BvNkcegT.js";
3
3
  import { AuthRequirement } from "@askrjs/auth";
4
4
  import "node:fs/promises";
5
5
  //#region src/ssg/types.d.ts
package/dist/ssg/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import "../access-Dpfoi4cA.js";
2
2
  import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
3
3
  import { o as addRouteBasePath } from "../route-matching-DqULzZtC.js";
4
- import { c as route, n as resolveDeferredValues } from "../deferred-nleQtdfY.js";
5
- import { c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-YHwi4Bav.js";
4
+ import { c as route, n as resolveDeferredValues } from "../deferred-_DaSfpsr.js";
5
+ import { c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-BRmiFYvw.js";
6
6
  import { n as renderDocument } from "../ssr-DSHd_Q9K.js";
7
- import { n as renderToString } from "../ssr-B98593qJ.js";
7
+ import { n as renderToString } from "../ssr-q250YlKo.js";
8
8
  import * as fs from "node:fs/promises";
9
9
  import * as pathModule from "node:path";
10
10
  import * as os from "node:os";
@@ -1,7 +1,7 @@
1
1
  import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-DhUZU4_V.js";
2
2
  import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
3
- import { A as RouteHandler, C as Route, J as RouteRequestResult, V as RouteRecord, W as RouteRegistry, g as AccessRedirectDecision, l as DeferredBoundaryRegistration, m as AccessDenyDecision, u as SSRPortalState, w as RouteAuthOptions } from "../index-pIgGaXvS.js";
4
- import { D as QueryPrefetchContext, _ as CoreTelemetry, n as ServerQueryRegistry, v as DataRuntime } from "../index-5S-fi2xy.js";
3
+ import { A as RouteHandler, C as Route, J as RouteRequestResult, V as RouteRecord, W as RouteRegistry, g as AccessRedirectDecision, l as DeferredBoundaryRegistration, m as AccessDenyDecision, u as SSRPortalState, w as RouteAuthOptions } from "../index-BvNkcegT.js";
4
+ import { D as QueryPrefetchContext, _ as CoreTelemetry, n as ServerQueryRegistry, v as DataRuntime } from "../index-SGxMZLAc.js";
5
5
  import { AuthContext } from "@askrjs/auth";
6
6
  //#region src/common/page-render-envelope.d.ts
7
7
  declare const PAGE_RENDER_ENVELOPE_VERSION: 1;
package/dist/ssr/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { x as SSRDataMissingError } from "../render-context-D0Hoj9dW.js";
2
- import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-B98593qJ.js";
2
+ import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-q250YlKo.js";
3
3
  export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
@@ -3,18 +3,18 @@ import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
3
3
  import { v as logger } from "./access-Dpfoi4cA.js";
4
4
  import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
5
5
  import { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
6
- import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-DcrLymUJ.js";
6
+ import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-uVCJAre6.js";
7
7
  import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
8
8
  import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
9
- import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-B_mnQhan.js";
9
+ import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-Dxf3iZ9E.js";
10
10
  import { _ as isPageRenderEnvelope, f as stopRenderPhase$1, g as isEmptyPageRenderEnvelope, h as createPageRenderEnvelope, t as configureRenderContextProvider, u as startRenderPhase$1, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.js";
11
11
  import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
12
- import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-Bc52OIVc.js";
12
+ import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
13
13
  import { n as SSR_PORTAL_HOST, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
14
- import { t as createDataRuntime } from "./data-runtime-Ck3tJDDQ.js";
15
- import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-CPW_6nwF.js";
14
+ import { t as createDataRuntime } from "./data-runtime-CnVeSvJz.js";
15
+ import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-p_0kkieE.js";
16
16
  import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-DqULzZtC.js";
17
- import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-YHwi4Bav.js";
17
+ import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-BRmiFYvw.js";
18
18
  import { n as disposeRegisteredDefaultPortalScope, r as getDefaultPortalHost } from "./default-portal-runtime-DvMvWJVp.js";
19
19
  import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
20
20
  //#region src/ssr/escape.ts
@@ -742,6 +742,9 @@ const escapedAttrValueCache = /* @__PURE__ */ new Map();
742
742
  function isEventHandler(key) {
743
743
  return key.length >= 2 && key.slice(0, 2).toLowerCase() === "on";
744
744
  }
745
+ function isAriaAttribute(key) {
746
+ return key.length > 5 && key.slice(0, 5).toLowerCase() === "aria-";
747
+ }
745
748
  function assertAttributeName(name) {
746
749
  if (!/^[A-Za-z_:][A-Za-z0-9_.:-]*$/.test(name)) throw new TypeError(`Invalid SSR attribute name: ${JSON.stringify(name)}`);
747
750
  }
@@ -783,7 +786,7 @@ function renderAttrsDirect(props, sink) {
783
786
  sink.write(attrName);
784
787
  continue;
785
788
  }
786
- if (value === false || value === null || value === void 0) continue;
789
+ if (value === null || value === void 0 || value === false && !isAriaAttribute(attrName)) continue;
787
790
  const strValue = String(value);
788
791
  if (isUnsafeUrlAttribute(attrName, strValue)) continue;
789
792
  sink.write(" ");
@@ -817,7 +820,7 @@ function renderAttrs(props, opts) {
817
820
  continue;
818
821
  }
819
822
  if (value === true) attrParts.push(` ${attrName}`);
820
- else if (value === false || value === null || value === void 0) continue;
823
+ else if (value === null || value === void 0 || value === false && !isAriaAttribute(attrName)) continue;
821
824
  else {
822
825
  const strValue = String(value);
823
826
  if (isUnsafeUrlAttribute(attrName, strValue)) continue;
@@ -1,6 +1,6 @@
1
1
  import { l as ComponentFunction } from "../control-DhUZU4_V.js";
2
- import { M as RouteMatch, W as RouteRegistry, w as RouteAuthOptions } from "../index-pIgGaXvS.js";
3
- import { C as Query, k as QueryStaleReason } from "../index-5S-fi2xy.js";
2
+ import { M as RouteMatch, W as RouteRegistry, w as RouteAuthOptions } from "../index-BvNkcegT.js";
3
+ import { C as Query, k as QueryStaleReason, v as DataRuntime } from "../index-SGxMZLAc.js";
4
4
  //#region src/testing/render.d.ts
5
5
  interface RenderOptions {
6
6
  /**
@@ -34,6 +34,20 @@ declare function mount(component: ComponentFunction, options?: RenderOptions): R
34
34
  declare function renderRoute(options: RouteRenderOptions): Promise<RenderResult>;
35
35
  //#endregion
36
36
  //#region src/testing/index.d.ts
37
+ /** Dispatch the browser click sequence expected by Askr's delegated events. */
38
+ declare function click(element: Element): boolean;
39
+ /** Set a text control's value and emit an input event for each character. */
40
+ declare function type(element: HTMLInputElement | HTMLTextAreaElement, text: string): void;
41
+ /** Dispatch a cancelable bubbling submit event on a form. */
42
+ declare function submit(form: HTMLFormElement): boolean;
43
+ interface QueryTestRegistry {
44
+ readonly runtime: DataRuntime;
45
+ set<T extends {}>(key: string, query: Query<T>): void;
46
+ delete(key: string): void;
47
+ clear(): void;
48
+ }
49
+ /** Create a keyed query fixture registry for a test render runtime. */
50
+ declare function createQueryTestRegistry(): QueryTestRegistry;
37
51
  type MockRefresh = () => void | Promise<void>;
38
52
  interface MockQueryOptions {
39
53
  refresh?: MockRefresh;
@@ -80,4 +94,4 @@ declare function createInvalidationRecorder(): InvalidationRecorder;
80
94
  declare function matchRoute(path: string, options: MatchRouteOptions): RouteMatch | null;
81
95
  declare function getRouteWarnings(options: MatchRouteOptions): RoutePatternWarning[];
82
96
  //#endregion
83
- export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, type RenderOptions, type RenderResult, RoutePatternWarning, type RouteRenderOptions, cleanup, createInvalidationRecorder, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, queryState, render, renderRoute };
97
+ export { InvalidationRecord, InvalidationRecorder, MockQueryOptions, MockRefresh, QueryTestRegistry, type RenderOptions, type RenderResult, RoutePatternWarning, type RouteRenderOptions, cleanup, click, createInvalidationRecorder, createQueryTestRegistry, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, queryState, render, renderRoute, submit, type };
@@ -1,7 +1,7 @@
1
1
  import { r as flushRuntimeScheduler } from "../access-Dpfoi4cA.js";
2
- import { l as addInvalidationListener } from "../data-runtime-Ck3tJDDQ.js";
2
+ import { l as addInvalidationListener, t as createDataRuntime } from "../data-runtime-CnVeSvJz.js";
3
3
  import { r as computeRouteActivityMatches } from "../route-matching-DqULzZtC.js";
4
- import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-CViTpUiB.js";
4
+ import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-Bd-j_BL5.js";
5
5
  //#region src/testing/render.ts
6
6
  const renderStates = /* @__PURE__ */ new WeakMap();
7
7
  const eventConstructorNames = {
@@ -180,6 +180,44 @@ async function renderRoute(options) {
180
180
  }
181
181
  //#endregion
182
182
  //#region src/testing/index.ts
183
+ /** Dispatch the browser click sequence expected by Askr's delegated events. */
184
+ function click(element) {
185
+ if (!element || typeof element.dispatchEvent !== "function") throw new TypeError("@askrjs/askr/testing click requires an Element.");
186
+ return dispatch(element, "click");
187
+ }
188
+ /** Set a text control's value and emit an input event for each character. */
189
+ function type(element, text) {
190
+ if (!element || typeof element.dispatchEvent !== "function") throw new TypeError("@askrjs/askr/testing type requires a text control.");
191
+ for (const character of text) {
192
+ element.value += character;
193
+ dispatch(element, "input", {
194
+ inputType: "insertText",
195
+ data: character
196
+ });
197
+ }
198
+ }
199
+ /** Dispatch a cancelable bubbling submit event on a form. */
200
+ function submit(form) {
201
+ if (!form || typeof form.dispatchEvent !== "function") throw new TypeError("@askrjs/askr/testing submit requires a form.");
202
+ return dispatch(form, "submit");
203
+ }
204
+ /** Create a keyed query fixture registry for a test render runtime. */
205
+ function createQueryTestRegistry() {
206
+ const runtime = createDataRuntime();
207
+ return {
208
+ runtime,
209
+ set(key, query) {
210
+ if (typeof key !== "string" || key.length === 0) throw new TypeError("@askrjs/askr/testing query registry keys must be non-empty strings.");
211
+ runtime.queryTestOverrides.set(key, query);
212
+ },
213
+ delete(key) {
214
+ runtime.queryTestOverrides.delete(key);
215
+ },
216
+ clear() {
217
+ runtime.queryTestOverrides.clear();
218
+ }
219
+ };
220
+ }
183
221
  function normalizeRefresh(options) {
184
222
  return async () => {
185
223
  await options?.refresh?.();
@@ -342,4 +380,4 @@ function getRouteWarnings(options) {
342
380
  });
343
381
  }
344
382
  //#endregion
345
- export { cleanup, createInvalidationRecorder, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, queryState, render, renderRoute };
383
+ export { cleanup, click, createInvalidationRecorder, createQueryTestRegistry, dispatch, flush, getRouteWarnings, matchRoute, mockQuery, mount, queryState, render, renderRoute, submit, type };
@@ -1,6 +1,6 @@
1
1
  import { m as withHydrationVerificationRender } from "./render-context-D0Hoj9dW.js";
2
2
  import { t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
3
- import { a as renderResolvedToStringSync } from "./ssr-B98593qJ.js";
3
+ import { a as renderResolvedToStringSync } from "./ssr-q250YlKo.js";
4
4
  //#region src/ssr/verify-hydration.ts
5
5
  function normalizeHydrationHtml(html) {
6
6
  const template = document.createElement("template");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askrjs/askr",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "description": "Actor-backed deterministic UI framework",
5
5
  "keywords": [
6
6
  "askr",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "files": [
26
26
  "capabilities.json",
27
+ "CHANGELOG.md",
27
28
  "dist/**/*.js",
28
29
  "dist/**/*.d.ts"
29
30
  ],