@askrjs/askr 0.0.90 → 0.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/{access-Dpfoi4cA.js → access-DSkccuEI.js} +5 -2
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/index.js +4 -4
  4. package/dist/{activity-CQKEAORw.js → activity-DodHdC0L.js} +8 -6
  5. package/dist/{activity-CF2_JvJs.d.ts → activity-DxUcygE5.d.ts} +1 -1
  6. package/dist/benchmark.d.ts +1 -1
  7. package/dist/benchmark.js +8 -8
  8. package/dist/boot/index.d.ts +3 -4
  9. package/dist/boot/index.js +1 -1
  10. package/dist/{boot-D5GZU_g4.js → boot-D71bjP4r.js} +28 -22
  11. package/dist/{cleanup-c837KVij.js → cleanup-DAAhJjx5.js} +8 -5
  12. package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-CJCfu5ed.js} +3 -3
  13. package/dist/{component-internal-C4uwwUaK.js → component-internal-DlAkCgBE.js} +5 -5
  14. package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
  15. package/dist/components/index.d.ts +2 -2
  16. package/dist/components/index.js +1 -1
  17. package/dist/control/index.d.ts +1 -1
  18. package/dist/control/index.js +1 -1
  19. package/dist/{control-CsGs2bLS.d.ts → control-CdzY49Q2.d.ts} +1 -1
  20. package/dist/{control-CON10J1p.js → control-Dv540XtV.js} +4 -4
  21. package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-ByMbWv8s.js} +1 -1
  22. package/dist/data/index.d.ts +1 -2
  23. package/dist/data/index.js +3 -3
  24. package/dist/{data-BmZC1kDn.js → data-DcikEH9N.js} +13 -13
  25. package/dist/{data-runtime-SC6zzAwh.js → data-runtime-oIdQWnPW.js} +2 -2
  26. package/dist/{deferred-Bh-nZhZF.js → deferred-B6CafO5u.js} +6 -6
  27. package/dist/{effect-lnxQIpJG.js → effect-BdZcHblj.js} +73 -14
  28. package/dist/{fastlane-CrfB3QG0.js → fastlane-B2s24fWt.js} +22 -3
  29. package/dist/{for-internal-Bsm0B8GZ.js → for-internal-T1C7jd7x.js} +6 -6
  30. package/dist/foundations/icon/index.d.ts +1 -2
  31. package/dist/foundations/index.d.ts +2 -2
  32. package/dist/foundations/index.js +1 -1
  33. package/dist/foundations/state/index.d.ts +1 -1
  34. package/dist/foundations/state/index.js +1 -1
  35. package/dist/foundations/structures/index.d.ts +2 -2
  36. package/dist/foundations/structures/index.js +1 -1
  37. package/dist/fx/index.js +2 -2
  38. package/dist/{types-iAmDSV6o.d.ts → index-2bk8nldG.d.ts} +63 -1
  39. package/dist/index-DA3g8lm8.d.ts +955 -0
  40. package/dist/{index-Cf2ANwPL.d.ts → index-oswRaMn6.d.ts} +2 -3
  41. package/dist/index.d.ts +4 -7
  42. package/dist/index.js +32 -17
  43. package/dist/jsx-dev-runtime.d.ts +2 -3
  44. package/dist/jsx-runtime-C_0v1pMN.d.ts +2 -0
  45. package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cfb2umb4.d.ts} +2 -3
  46. package/dist/jsx-runtime.d.ts +2 -2
  47. package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-Cyfd07rf.js} +2 -2
  48. package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-CQ8fsc94.js} +2 -2
  49. package/dist/{manifest-D1P9uTlz.js → manifest-Dv0bO6kg.js} +1 -1
  50. package/dist/{navigate-DIOaNAcS.js → navigate-BbWj-QU-.js} +12 -10
  51. package/dist/{navigate-BO7M2iUG.d.ts → navigate-CZHPEUC4.d.ts} +1 -1
  52. package/dist/{query-registry-IACQeDqi.js → query-registry-qm13pEdK.js} +1 -1
  53. package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
  54. package/dist/{render-context-D0Hoj9dW.js → render-context-B7ohlh6t.js} +17 -1
  55. package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
  56. package/dist/{resolution-D3UO6aKA.js → resolution-B21kmOkp.js} +6 -6
  57. package/dist/{resource-operation-CYDU3XzS.js → resource-operation-CaAttQqz.js} +6 -6
  58. package/dist/resources/index.d.ts +2 -2
  59. package/dist/resources/index.js +6 -6
  60. package/dist/{route-matching-DqULzZtC.js → route-matching-Bo6UqG-5.js} +14 -5
  61. package/dist/router/index.d.ts +4 -6
  62. package/dist/router/index.js +7 -7
  63. package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
  64. package/dist/ssg/index.d.ts +1 -2
  65. package/dist/ssg/index.js +6 -6
  66. package/dist/ssr/index.d.ts +3 -5
  67. package/dist/ssr/index.js +2 -2
  68. package/dist/{ssr-VdXmmJqx.js → ssr-CaZfvQWn.js} +14 -13
  69. package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
  70. package/dist/{structures--NKfTh3j.js → structures-DKjkAmM5.js} +6 -6
  71. package/dist/testing/index.d.ts +2 -3
  72. package/dist/testing/index.js +6 -6
  73. package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
  74. package/dist/{verify-hydration-wRofFN5b.js → verify-hydration-CcF-HJil.js} +4 -3
  75. package/package.json +1 -1
  76. package/dist/control-D-FIa-n-.d.ts +0 -451
  77. package/dist/index-BU17hud9.d.ts +0 -52
  78. package/dist/index-CPlPDbEY.d.ts +0 -64
  79. package/dist/index-Izwp_ESC.d.ts +0 -458
  80. package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
  81. package/dist/types-CsPtBGWb.d.ts +0 -16
@@ -1,9 +1,9 @@
1
- import { t as enqueueRuntimeLane } from "../access-Dpfoi4cA.js";
2
- import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.js";
3
- import { a as registerCommitOperation } from "../component-internal-C4uwwUaK.js";
4
- import { t as resource } from "../resource-operation-CYDU3XzS.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-CMK1AN2C.js";
6
- import { n as onRouteChange } from "../activity-CQKEAORw.js";
1
+ import { t as enqueueRuntimeLane } from "../access-DSkccuEI.js";
2
+ import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-4I3yEMkb.js";
3
+ import { a as registerCommitOperation } from "../component-internal-DlAkCgBE.js";
4
+ import { t as resource } from "../resource-operation-CaAttQqz.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-CQ8fsc94.js";
6
+ import { n as onRouteChange } from "../activity-DodHdC0L.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,4 +1,5 @@
1
- import { n as getActiveRenderContext } from "./render-context-D0Hoj9dW.js";
1
+ import { d as getCurrentAppRenderRuntime } from "./component-scope-4I3yEMkb.js";
2
+ import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
2
3
  //#region src/router/match.ts
3
4
  function splitPathSegments(path) {
4
5
  const normalized = path.endsWith("/") && path !== "/" ? path.slice(0, -1) : path;
@@ -160,11 +161,15 @@ function addRouteToStores(routeObj) {
160
161
  if (routeObj.namespace) namespaces.add(routeObj.namespace);
161
162
  }
162
163
  function getActiveRoutes() {
163
- return getActiveRenderContext()?.routes ?? routes;
164
+ return getActiveRenderContext()?.routes ?? getCurrentAppRenderRuntime()?.routeRegistry?.routes ?? routes;
164
165
  }
165
166
  function getActiveRouteAuthOptions(override) {
166
- if (override) return override;
167
- return getActiveRenderContext()?.routeAuth ?? activeClientRouteAuthOptions ?? defaultRouteAuthOptions;
167
+ if (override !== void 0) return override;
168
+ const renderContext = getActiveRenderContext();
169
+ if (renderContext) return renderContext.routeAuth;
170
+ const appRuntime = getCurrentAppRenderRuntime();
171
+ if (appRuntime) return appRuntime.routeAuth;
172
+ return activeClientRouteAuthOptions ?? defaultRouteAuthOptions;
168
173
  }
169
174
  function _setActiveRouteAuthOptions(auth) {
170
175
  activeClientRouteAuthOptions = auth;
@@ -182,7 +187,11 @@ function setDefaultRouteBasePath(basePath) {
182
187
  defaultRouteBasePath = basePath;
183
188
  }
184
189
  function getActiveRouteBasePath() {
185
- return getActiveRenderContext()?.basePath ?? defaultRouteBasePath;
190
+ const renderContext = getActiveRenderContext();
191
+ if (renderContext?.basePath !== void 0) return renderContext.basePath;
192
+ const appRegistry = getCurrentAppRenderRuntime()?.routeRegistry;
193
+ if (appRegistry) return appRegistry.manifest.basePath ?? "";
194
+ return defaultRouteBasePath;
186
195
  }
187
196
  function getCurrentLayoutChain() {
188
197
  const layoutChain = [];
@@ -1,9 +1,7 @@
1
- import { u as RenderableChild } from "../control-D-FIa-n-.js";
2
- import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.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-Izwp_ESC.js";
4
- import "../types-CsPtBGWb.js";
5
- import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-BO7M2iUG.js";
6
- import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-CF2_JvJs.js";
1
+ import { $ as RouteHandler, B as AccessRedirectStatus, F as AccessAllowDecision, G as ParsedSegment, H as LayoutScopeRecord, I as AccessDecision, J as RouteAuthResolver, K as Route, L as AccessDenyDecision, Q as RouteDestination, R as AccessDenyStatus, Tt as RenderableChild, U as PageHelperOptions, V as GroupHelperOptions, W as PageScopeRecord, X as RouteContext, Y as RouteComponent, Z as RouteDefinition, _t as RouteRequestResult, at as RouteOptions, bt as RouteSnapshot, ct as RoutePolicy, dt as RouteRef, et as RouteManifest, ft as RouteRefSearch, gt as RouteRequestOptions, ht as RouteRenderResult, it as RouteMode, lt as RouteQuery, mt as RouteRegistryOptions, nt as RouteMeta, ot as RouteParams, pt as RouteRegistry, q as RouteAuthOptions, rt as RouteMetaSource, st as RoutePathParams, tt as RouteMatch, ut as RouteRecord, vt as RouteSearch, yt as RouteSearchValue, z as AccessRedirectDecision } from "../index-DA3g8lm8.js";
2
+ import { r as JSXElement, s as Props } from "../types-BA9FJtfR.js";
3
+ import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-CZHPEUC4.js";
4
+ import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-DxUcygE5.js";
7
5
  import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
8
6
  import { ObjectSchema } from "@askrjs/schema";
9
7
  //#region src/router/route-query.d.ts
@@ -1,11 +1,11 @@
1
- import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
2
- import { a as isSafeHref } from "../csp-nonce-DH0TrDij.js";
1
+ import { n as createRouteRegistry } from "../manifest-Dv0bO6kg.js";
2
+ import { a as isSafeHref } from "../csp-nonce-ByMbWv8s.js";
3
3
  import { jsx } from "../jsx-runtime.js";
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-Bh-nZhZF.js";
6
- import { S as RouteDataLoadError, a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred, x as lazyRouteData } from "../resolution-D3UO6aKA.js";
7
- import { n as onRouteChange, t as currentRoute } from "../activity-CQKEAORw.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-DIOaNAcS.js";
4
+ import { o as addRouteBasePath, y as getActiveRouteBasePath } from "../route-matching-Bo6UqG-5.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-B6CafO5u.js";
6
+ import { S as RouteDataLoadError, a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred, x as lazyRouteData } from "../resolution-B21kmOkp.js";
7
+ import { n as onRouteChange, t as currentRoute } from "../activity-DodHdC0L.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-BbWj-QU-.js";
9
9
  import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
10
10
  import { t as applyInteractionPolicy } from "../interactions-CWkNEq_C.js";
11
11
  //#region src/router/route-query.ts
@@ -1,6 +1,6 @@
1
- import { t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
2
- import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
3
- import { c as markReadableUsage, 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";
1
+ import { t as enqueueRuntimeLane } from "./access-DSkccuEI.js";
2
+ import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
3
+ import { c as markReadableUsage, f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
4
4
  //#region src/runtime/selector-store.ts
5
5
  const dirtySelectorRecords = /* @__PURE__ */ new Set();
6
6
  let hasPendingSelectorFlush = false;
@@ -37,11 +37,18 @@ function markSelectorRecordDirty(record) {
37
37
  markDirtySelectorRecord(record, flushDirtySelectorRecords);
38
38
  }
39
39
  function flushDirtySelectorRecords() {
40
+ let failures = null;
40
41
  for (const record of takeDirtySelectorRecords()) {
41
42
  record._scheduled = false;
42
43
  if (!record._dirty) continue;
43
- recomputeSelectorSourceRecord(record, true);
44
+ try {
45
+ recomputeSelectorSourceRecord(record, true);
46
+ } catch (error) {
47
+ (failures ??= []).push(error);
48
+ }
44
49
  }
50
+ if (failures?.length === 1) throw failures[0];
51
+ if (failures && failures.length > 1) throw new AggregateError(failures, "selector() recompute failures");
45
52
  }
46
53
  function isObjectCandidate(value) {
47
54
  return typeof value === "object" && value !== null || typeof value === "function";
@@ -140,7 +147,7 @@ function createSelectorLane(record, equals) {
140
147
  return lane;
141
148
  }
142
149
  function notifySelectorSource(source) {
143
- markReadableDerivedSubscribersDirty(source);
150
+ markReadableDerivedSubscribersDirty(source, true);
144
151
  markReactivePropsDirtySource(source);
145
152
  notifyReadableReaders(source);
146
153
  }
@@ -223,6 +230,7 @@ function ensureSelectorHookBinding(hook) {
223
230
  function createSelectorHook(instance, generation, store, hookIndex, source, equals) {
224
231
  const hook = function selectorPredicate(candidate) {
225
232
  const selectorHook = hook;
233
+ if (!selectorHook._active) return selectorHook._hasDisposedValue && selectorHook._equals(selectorHook._disposedValue, candidate);
226
234
  const record = selectorHook._record ?? ensureSelectorHookBinding(selectorHook);
227
235
  const lane = selectorHook._lane;
228
236
  if (!lane) throw new Error("selector() binding could not be established.");
@@ -237,7 +245,16 @@ function createSelectorHook(instance, generation, store, hookIndex, source, equa
237
245
  hook._equals = equals;
238
246
  hook._record = null;
239
247
  hook._lane = null;
248
+ hook._active = true;
249
+ hook._disposedValue = void 0;
250
+ hook._hasDisposedValue = false;
240
251
  hook._cleanup = () => {
252
+ if (!hook._active) return;
253
+ if (hook._record?._hasValue) {
254
+ hook._disposedValue = hook._record._value;
255
+ hook._hasDisposedValue = true;
256
+ }
257
+ hook._active = false;
241
258
  detachSelectorHookBinding(hook);
242
259
  };
243
260
  attachSelectorHookBinding(hook, source, equals);
@@ -1,5 +1,4 @@
1
- import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-D-FIa-n-.js";
2
- import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-Izwp_ESC.js";
1
+ import { $ as RouteHandler, Dt as DocumentRenderArgs, Mt as SSRStyleRegistrationValidation, Ot as DocumentRenderContext, at as RouteOptions, ct as RoutePolicy, kt as DocumentRenderer, pt as RouteRegistry, st as RoutePathParams } from "../index-DA3g8lm8.js";
3
2
  import { AuthRequirement } from "@askrjs/auth";
4
3
  import "node:fs/promises";
5
4
  //#region src/ssg/types.d.ts
package/dist/ssg/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import "../access-Dpfoi4cA.js";
2
- import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
3
- import { o as addRouteBasePath } from "../route-matching-DqULzZtC.js";
4
- import { c as route, n as resolveDeferredValues } from "../deferred-Bh-nZhZF.js";
5
- import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-D3UO6aKA.js";
1
+ import "../access-DSkccuEI.js";
2
+ import { n as createRouteRegistry } from "../manifest-Dv0bO6kg.js";
3
+ import { o as addRouteBasePath } from "../route-matching-Bo6UqG-5.js";
4
+ import { c as route, n as resolveDeferredValues } from "../deferred-B6CafO5u.js";
5
+ import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-B21kmOkp.js";
6
6
  import { n as renderDocument } from "../ssr-DSHd_Q9K.js";
7
- import { n as renderToString } from "../ssr-VdXmmJqx.js";
7
+ import { n as renderToString } from "../ssr-CaZfvQWn.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,8 +1,6 @@
1
- import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-D-FIa-n-.js";
2
- import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
3
- import { f as QueryPrefetchContext, t as DataRuntime } from "../types-iAmDSV6o.js";
4
- 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-Izwp_ESC.js";
5
- import { _ as CoreTelemetry, n as ServerQueryRegistry } from "../index-CPlPDbEY.js";
1
+ import { $ as RouteHandler, At as SSRData, Dt as DocumentRenderArgs, K as Route, L as AccessDenyDecision, Mt as SSRStyleRegistrationValidation, Ot as DocumentRenderContext, _t as RouteRequestResult, jt as SSRStyleRegistration, kt as DocumentRenderer, l as DeferredBoundaryRegistration, pt as RouteRegistry, q as RouteAuthOptions, u as SSRPortalState, ut as RouteRecord, z as AccessRedirectDecision } from "../index-DA3g8lm8.js";
2
+ import { r as JSXElement, s as Props } from "../types-BA9FJtfR.js";
3
+ import { O as QueryPrefetchContext, _ as CoreTelemetry, n as ServerQueryRegistry, v as DataRuntime } from "../index-2bk8nldG.js";
6
4
  import { AuthContext } from "@askrjs/auth";
7
5
  //#region src/common/page-render-envelope.d.ts
8
6
  declare const PAGE_RENDER_ENVELOPE_VERSION: 1;
package/dist/ssr/index.js CHANGED
@@ -1,3 +1,3 @@
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-VdXmmJqx.js";
1
+ import { C as SSRDataMissingError } from "../render-context-B7ohlh6t.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-CaZfvQWn.js";
3
3
  export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
@@ -1,20 +1,20 @@
1
1
  import { t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
2
2
  import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
3
- import { v as logger } from "./access-Dpfoi4cA.js";
4
- import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
3
+ import { y as logger } from "./access-DSkccuEI.js";
4
+ import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-4I3yEMkb.js";
5
5
  import { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
6
- import { g as markVNodeTreeWithContextFrame, m as getVNodeContextFrame, n as createComponentInstance, p as getExecutionContextFrame, u as callWithContext } from "./component-internal-C4uwwUaK.js";
7
- import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
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-Bsm0B8GZ.js";
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";
6
+ import { g as markVNodeTreeWithContextFrame, m as getVNodeContextFrame, n as createComponentInstance, p as getExecutionContextFrame, u as callWithContext } from "./component-internal-DlAkCgBE.js";
7
+ import { t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
8
+ import { p as isPromiseLike } from "./lifecycle-batch-Cyfd07rf.js";
9
+ import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-T1C7jd7x.js";
10
+ import { C as SSRDataMissingError, _ as isEmptyPageRenderEnvelope, f as stopRenderPhase$1, h as createPageRenderEnvelope, t as configureRenderContextProvider, u as startRenderPhase$1, v as isPageRenderEnvelope, x as withHydrationRenderUrl } from "./render-context-B7ohlh6t.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-DH0TrDij.js";
12
+ import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-ByMbWv8s.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-SC6zzAwh.js";
15
- import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-IACQeDqi.js";
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-D3UO6aKA.js";
14
+ import { t as createDataRuntime } from "./data-runtime-oIdQWnPW.js";
15
+ import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-qm13pEdK.js";
16
+ import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-Bo6UqG-5.js";
17
+ import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-B21kmOkp.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
@@ -189,6 +189,7 @@ function createRenderContext(seed = 12345, opts = {}) {
189
189
  resources: opts.data,
190
190
  framework: opts.framework
191
191
  });
192
+ const hydrationEnvelope = opts.url ? withHydrationRenderUrl(envelope, opts.url) : envelope;
192
193
  return {
193
194
  url: opts.url ?? "",
194
195
  seed,
@@ -206,7 +207,7 @@ function createRenderContext(seed = 12345, opts = {}) {
206
207
  ssrCleanupFns: [],
207
208
  keyCounter: 0,
208
209
  renderData: envelope,
209
- hydrationData: envelope,
210
+ hydrationData: hydrationEnvelope,
210
211
  deferredBoundaries: [],
211
212
  ssrStyles: /* @__PURE__ */ new Map(),
212
213
  ssrPortals: {
@@ -1,7 +1,7 @@
1
- import { v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
2
- import { t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
3
- import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
4
- import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
1
+ import { S as isProductionEnvironment } from "./access-DSkccuEI.js";
2
+ import { n as isBulkCommitActive, t as deferBulkCommitReadableNotification } from "./fastlane-B2s24fWt.js";
3
+ import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-4I3yEMkb.js";
4
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
5
5
  //#region src/runtime/state.ts
6
6
  /**
7
7
  * State primitive for Askr components
@@ -77,8 +77,8 @@ function createStateCell(initialValue, instance) {
77
77
  else newValue = newValueOrUpdater;
78
78
  if (Object.is(value, newValue)) return;
79
79
  if (isBulkCommitActive()) {
80
- if (!isProductionEnvironment()) logger.warn("[Askr] state.set() was called while a bulk commit (fast-lane reorder) was in progress. The value updated, but subscribers were not notified, so this change will not be reflected in the UI until an unrelated update triggers a re-render. This usually happens from a ref callback or a native focus/blur event fired synchronously during a large keyed-list reorder.");
81
80
  value = newValue;
81
+ deferBulkCommitReadableNotification(read);
82
82
  return;
83
83
  }
84
84
  value = newValue;
@@ -1,10 +1,10 @@
1
- import { o as getRuntimeRenderer } from "./access-Dpfoi4cA.js";
2
- import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-DzJEbYGE.js";
1
+ import { o as getRuntimeRenderer } from "./access-DSkccuEI.js";
2
+ import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-4I3yEMkb.js";
3
3
  import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
4
- import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
5
- import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
6
- import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
7
- import { n as getActiveRenderContext } from "./render-context-D0Hoj9dW.js";
4
+ import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B99wh5Z_.js";
5
+ import { t as cleanupComponent } from "./component-cleanup-CJCfu5ed.js";
6
+ import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-Cyfd07rf.js";
7
+ import { n as getActiveRenderContext } from "./render-context-B7ohlh6t.js";
8
8
  import { i as createSSRPortalHostToken, n as SSR_PORTAL_HOST, r as createSSRPortalAnchorToken, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
9
9
  import { i as registerDefaultPortalRuntime } from "./default-portal-runtime-DvMvWJVp.js";
10
10
  //#region src/jsx/utils.ts
@@ -1,6 +1,5 @@
1
- import { l as ComponentFunction } from "../control-D-FIa-n-.js";
2
- import { a as Mutation, m as QueryStaleReason, s as Query, t as DataRuntime } from "../types-iAmDSV6o.js";
3
- import { M as RouteMatch, W as RouteRegistry, w as RouteAuthOptions } from "../index-Izwp_ESC.js";
1
+ import { pt as RouteRegistry, q as RouteAuthOptions, tt as RouteMatch, wt as ComponentFunction } from "../index-DA3g8lm8.js";
2
+ import { A as QueryStaleReason, S as Mutation, v as DataRuntime, w as Query } from "../index-2bk8nldG.js";
4
3
  //#region src/testing/render.d.ts
5
4
  interface RenderOptions {
6
5
  /**
@@ -1,9 +1,9 @@
1
- import { r as flushRuntimeScheduler } from "../access-Dpfoi4cA.js";
2
- import { u as recordReadableRead } from "../readable-B5NtV7V0.js";
3
- import { l as addInvalidationListener, t as createDataRuntime } from "../data-runtime-SC6zzAwh.js";
4
- import { a as notifySource, i as normalizeAsyncDataError, r as createReadableSource } from "../data-BmZC1kDn.js";
5
- import { r as computeRouteActivityMatches } from "../route-matching-DqULzZtC.js";
6
- import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-D5GZU_g4.js";
1
+ import { r as flushRuntimeScheduler } from "../access-DSkccuEI.js";
2
+ import { u as recordReadableRead } from "../readable-B99wh5Z_.js";
3
+ import { l as addInvalidationListener, t as createDataRuntime } from "../data-runtime-oIdQWnPW.js";
4
+ import { a as notifySource, i as normalizeAsyncDataError, r as createReadableSource } from "../data-DcikEH9N.js";
5
+ import { r as computeRouteActivityMatches } from "../route-matching-Bo6UqG-5.js";
6
+ import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-D71bjP4r.js";
7
7
  //#region src/testing/render.ts
8
8
  const renderStates = /* @__PURE__ */ new WeakMap();
9
9
  const eventConstructorNames = {
@@ -342,4 +342,20 @@ interface JSXElement {
342
342
  key?: string | number | null;
343
343
  }
344
344
  //#endregion
345
+ //#region src/jsx/types.d.ts
346
+ declare global {
347
+ namespace JSX {
348
+ interface Element extends JSXElement {
349
+ readonly __askrJsxElementBrand?: never;
350
+ }
351
+ interface IntrinsicElements extends KnownIntrinsicElementProps {}
352
+ interface ElementAttributesProperty {
353
+ props: Props;
354
+ }
355
+ interface ElementChildrenAttribute {
356
+ children: unknown;
357
+ }
358
+ }
359
+ }
360
+ //#endregion
345
361
  export { IntrinsicFallbackProps as a, JSXElementType as i, JSXComponent as n, KnownIntrinsicElementProps as o, JSXElement as r, Props as s, Fragment as t };
@@ -1,6 +1,6 @@
1
- import { m as withHydrationVerificationRender } from "./render-context-D0Hoj9dW.js";
1
+ import { g as getHydrationRenderUrl, m as withHydrationVerificationRender } from "./render-context-B7ohlh6t.js";
2
2
  import { t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
3
- import { a as renderResolvedToStringSync } from "./ssr-VdXmmJqx.js";
3
+ import { a as renderResolvedToStringSync } from "./ssr-CaZfvQWn.js";
4
4
  //#region src/ssr/verify-hydration.ts
5
5
  function normalizeHydrationHtml(html) {
6
6
  const template = document.createElement("template");
@@ -10,8 +10,9 @@ function normalizeHydrationHtml(html) {
10
10
  }
11
11
  function verifyHydrationSyncForUrl(opts) {
12
12
  const { root, url, registry, resolved, options } = opts;
13
+ const verificationUrl = getHydrationRenderUrl(options?.envelope) ?? new URL(url, "http://localhost").pathname;
13
14
  const expected = withHydrationVerificationRender(() => renderResolvedToStringSync({
14
- url,
15
+ url: verificationUrl,
15
16
  registry,
16
17
  handler: resolved.handler,
17
18
  params: resolved.params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askrjs/askr",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "description": "Actor-backed deterministic UI framework",
5
5
  "keywords": [
6
6
  "askr",