@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.
- package/dist/{access-Dpfoi4cA.js → access-DSkccuEI.js} +5 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +4 -4
- package/dist/{activity-CQKEAORw.js → activity-DodHdC0L.js} +8 -6
- package/dist/{activity-CF2_JvJs.d.ts → activity-DxUcygE5.d.ts} +1 -1
- package/dist/benchmark.d.ts +1 -1
- package/dist/benchmark.js +8 -8
- package/dist/boot/index.d.ts +3 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-D5GZU_g4.js → boot-D71bjP4r.js} +28 -22
- package/dist/{cleanup-c837KVij.js → cleanup-DAAhJjx5.js} +8 -5
- package/dist/{component-cleanup-BUfUleGZ.js → component-cleanup-CJCfu5ed.js} +3 -3
- package/dist/{component-internal-C4uwwUaK.js → component-internal-DlAkCgBE.js} +5 -5
- package/dist/{component-scope-DzJEbYGE.js → component-scope-4I3yEMkb.js} +13 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-CsGs2bLS.d.ts → control-CdzY49Q2.d.ts} +1 -1
- package/dist/{control-CON10J1p.js → control-Dv540XtV.js} +4 -4
- package/dist/{csp-nonce-DH0TrDij.js → csp-nonce-ByMbWv8s.js} +1 -1
- package/dist/data/index.d.ts +1 -2
- package/dist/data/index.js +3 -3
- package/dist/{data-BmZC1kDn.js → data-DcikEH9N.js} +13 -13
- package/dist/{data-runtime-SC6zzAwh.js → data-runtime-oIdQWnPW.js} +2 -2
- package/dist/{deferred-Bh-nZhZF.js → deferred-B6CafO5u.js} +6 -6
- package/dist/{effect-lnxQIpJG.js → effect-BdZcHblj.js} +73 -14
- package/dist/{fastlane-CrfB3QG0.js → fastlane-B2s24fWt.js} +22 -3
- package/dist/{for-internal-Bsm0B8GZ.js → for-internal-T1C7jd7x.js} +6 -6
- package/dist/foundations/icon/index.d.ts +1 -2
- package/dist/foundations/index.d.ts +2 -2
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.d.ts +2 -2
- package/dist/foundations/structures/index.js +1 -1
- package/dist/fx/index.js +2 -2
- package/dist/{types-iAmDSV6o.d.ts → index-2bk8nldG.d.ts} +63 -1
- package/dist/index-DA3g8lm8.d.ts +955 -0
- package/dist/{index-Cf2ANwPL.d.ts → index-oswRaMn6.d.ts} +2 -3
- package/dist/index.d.ts +4 -7
- package/dist/index.js +32 -17
- package/dist/jsx-dev-runtime.d.ts +2 -3
- package/dist/jsx-runtime-C_0v1pMN.d.ts +2 -0
- package/dist/{jsx-runtime-LHh5tcTe.d.ts → jsx-runtime-Cfb2umb4.d.ts} +2 -3
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/{lifecycle-batch-Dfpid9-A.js → lifecycle-batch-Cyfd07rf.js} +2 -2
- package/dist/{lifecycle-operations-CMK1AN2C.js → lifecycle-operations-CQ8fsc94.js} +2 -2
- package/dist/{manifest-D1P9uTlz.js → manifest-Dv0bO6kg.js} +1 -1
- package/dist/{navigate-DIOaNAcS.js → navigate-BbWj-QU-.js} +12 -10
- package/dist/{navigate-BO7M2iUG.d.ts → navigate-CZHPEUC4.d.ts} +1 -1
- package/dist/{query-registry-IACQeDqi.js → query-registry-qm13pEdK.js} +1 -1
- package/dist/{readable-B5NtV7V0.js → readable-B99wh5Z_.js} +9 -6
- package/dist/{render-context-D0Hoj9dW.js → render-context-B7ohlh6t.js} +17 -1
- package/dist/{renderer-y2DL627q.js → renderer-C6jz9nIN.js} +234 -188
- package/dist/{resolution-D3UO6aKA.js → resolution-B21kmOkp.js} +6 -6
- package/dist/{resource-operation-CYDU3XzS.js → resource-operation-CaAttQqz.js} +6 -6
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +6 -6
- package/dist/{route-matching-DqULzZtC.js → route-matching-Bo6UqG-5.js} +14 -5
- package/dist/router/index.d.ts +4 -6
- package/dist/router/index.js +7 -7
- package/dist/{selector-BLNkRZ2i.js → selector-BLWwI55m.js} +22 -5
- package/dist/ssg/index.d.ts +1 -2
- package/dist/ssg/index.js +6 -6
- package/dist/ssr/index.d.ts +3 -5
- package/dist/ssr/index.js +2 -2
- package/dist/{ssr-VdXmmJqx.js → ssr-CaZfvQWn.js} +14 -13
- package/dist/{state-DCjONcHK.js → state-XPZYUzHL.js} +5 -5
- package/dist/{structures--NKfTh3j.js → structures-DKjkAmM5.js} +6 -6
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.js +6 -6
- package/dist/{jsx-BYXe_Nnk.d.ts → types-BA9FJtfR.d.ts} +16 -0
- package/dist/{verify-hydration-wRofFN5b.js → verify-hydration-CcF-HJil.js} +4 -3
- package/package.json +1 -1
- package/dist/control-D-FIa-n-.d.ts +0 -451
- package/dist/index-BU17hud9.d.ts +0 -52
- package/dist/index-CPlPDbEY.d.ts +0 -64
- package/dist/index-Izwp_ESC.d.ts +0 -458
- package/dist/jsx-runtime-BqhMEuT4.d.ts +0 -2
- package/dist/types-CsPtBGWb.d.ts +0 -16
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as enqueueRuntimeLane } from "../access-
|
|
2
|
-
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-
|
|
3
|
-
import { a as registerCommitOperation } from "../component-internal-
|
|
4
|
-
import { t as resource } from "../resource-operation-
|
|
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-
|
|
6
|
-
import { n as onRouteChange } from "../activity-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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 = [];
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as JSXElement, s as Props } from "../
|
|
3
|
-
import {
|
|
4
|
-
import "../
|
|
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
|
package/dist/router/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as createRouteRegistry } from "../manifest-
|
|
2
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
-
import { n as onRouteChange, t as currentRoute } from "../activity-
|
|
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-
|
|
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-
|
|
2
|
-
import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-
|
|
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-
|
|
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
|
-
|
|
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);
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
2
|
-
import { n as createRouteRegistry } from "../manifest-
|
|
3
|
-
import { o as addRouteBasePath } from "../route-matching-
|
|
4
|
-
import { c as route, n as resolveDeferredValues } from "../deferred-
|
|
5
|
-
import { S as RouteDataLoadError, c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-
|
|
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-
|
|
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";
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as JSXElement, s as Props } from "../
|
|
3
|
-
import {
|
|
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 {
|
|
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-
|
|
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 {
|
|
4
|
-
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-
|
|
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-
|
|
7
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
8
|
-
import { p as isPromiseLike } from "./lifecycle-batch-
|
|
9
|
-
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-
|
|
10
|
-
import { _ as
|
|
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-
|
|
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-
|
|
15
|
-
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-
|
|
16
|
-
import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-
|
|
17
|
-
import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-
|
|
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:
|
|
210
|
+
hydrationData: hydrationEnvelope,
|
|
210
211
|
deferredBoundaries: [],
|
|
211
212
|
ssrStyles: /* @__PURE__ */ new Map(),
|
|
212
213
|
ssrPortals: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-
|
|
4
|
-
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-
|
|
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-
|
|
2
|
-
import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-
|
|
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-
|
|
5
|
-
import { t as cleanupComponent } from "./component-cleanup-
|
|
6
|
-
import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-
|
|
7
|
-
import { n as getActiveRenderContext } from "./render-context-
|
|
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
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
/**
|
package/dist/testing/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as flushRuntimeScheduler } from "../access-
|
|
2
|
-
import { u as recordReadableRead } from "../readable-
|
|
3
|
-
import { l as addInvalidationListener, t as createDataRuntime } from "../data-runtime-
|
|
4
|
-
import { a as notifySource, i as normalizeAsyncDataError, r as createReadableSource } from "../data-
|
|
5
|
-
import { r as computeRouteActivityMatches } from "../route-matching-
|
|
6
|
-
import { a as cleanupApp, r as createSPA, t as createIsland } from "../boot-
|
|
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-
|
|
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-
|
|
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,
|