@askrjs/askr 0.0.76 → 0.0.78
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/actions/index.d.ts +1 -1
- package/dist/actions/index.js +3 -3
- package/dist/{activity-DaqZEUPh.d.ts → activity-CXEaU-Al.d.ts} +1 -1
- package/dist/{activity-386uXmPJ.js → activity-DfrtblJA.js} +3 -3
- package/dist/{authoring-ycOVkX1-.js → authoring-DE-LH_s-.js} +2 -2
- package/dist/benchmark.js +6 -6
- package/dist/boot/index.d.ts +4 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-eaBrci4W.js → boot-C5bZY3Uc.js} +14 -14
- package/dist/{cleanup-e4Rn287s.js → cleanup-CyY1ROBI.js} +1 -1
- package/dist/{component-internal-iJ7HAcpc.js → component-internal-BuTG89T8.js} +13 -9
- package/dist/components/index.d.ts +1 -1
- 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-C-ApnFs1.js +20 -0
- package/dist/{control-Uvq1GU4K.d.ts → control-Cix3yjVf.d.ts} +7 -1
- package/dist/{control-ByyOdVdr.js → control-DQIsWvhr.js} +4 -4
- package/dist/{csp-nonce-BLkoekFX.js → csp-nonce-BUsz0Em7.js} +1 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +3 -3
- package/dist/{data-E7oXei9c.js → data-eBdygZ1f.js} +3 -3
- package/dist/{data-runtime-rpV6-3XW.js → data-runtime-D68YOo9L.js} +1 -1
- package/dist/{deferred-iBBHEN5Z.js → deferred-t79wHqe1.js} +6 -6
- package/dist/{fastlane-BbexfvHo.js → fastlane-CkBXZ_3K.js} +2 -2
- package/dist/{for-internal-tNicxJY3.js → for-internal-BnXrQbgo.js} +1 -1
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +2 -2
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +2 -2
- package/dist/{index-Bki2rqcr.d.ts → index-5S-fi2xy.d.ts} +17 -17
- package/dist/{router-Dd-LoJmM.d.ts → index-TlEvex-C.d.ts} +162 -4
- package/dist/{index-CbRdEUPB.d.ts → index-Vs1EeWEr.d.ts} +2 -2
- package/dist/{index-acX2RLxD.d.ts → index-ho0Htetw.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -9
- package/dist/jsx-C3IECePB.js +12 -0
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/{lifecycle-operations-D2wzCYYh.js → lifecycle-operations-CN0PiLE_.js} +1 -1
- package/dist/{navigate-DlaVqF4n.d.ts → navigate-DfY1BUYc.d.ts} +1 -1
- package/dist/{navigate-BwCpLrSM.js → navigate-ype2B_M8.js} +8 -8
- package/dist/{portal-EKmTCMKp.js → portal-BZ_rN17v.js} +15 -14
- package/dist/portal-w3oQ6oQU.js +29 -0
- package/dist/{query-registry-Bu_cuMch.js → query-registry-BL6rjGsO.js} +1 -1
- package/dist/{render-context-Clw3rFiO.js → render-context-D-DFk2WN.js} +13 -1
- package/dist/{renderer-GFETYwZ6.js → renderer-_l_U-AbR.js} +292 -67
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/{route-matching-Dmb_MKUb.js → route-matching-jqwlQJ5g.js} +3 -3
- package/dist/router/index.d.ts +4 -4
- package/dist/router/index.js +5 -5
- package/dist/ssg/index.d.ts +2 -2
- package/dist/ssg/index.js +7 -5
- package/dist/ssr/index.d.ts +8 -25
- package/dist/ssr/index.js +2 -2
- package/dist/{ssr-CtumC_es.js → ssr-Dcmi1bZi.js} +57 -28
- package/dist/{state-rjmMPExl.js → state-BCl9DeiN.js} +1 -1
- package/dist/{structures-DUB3HchX.js → structures-D3vO-WMN.js} +1 -1
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +3 -3
- package/dist/{verify-hydration-GMsdoOUX.js → verify-hydration-Dfx-ZhbX.js} +1 -1
- package/package.json +1 -1
- package/dist/control-DhFRTIoE.js +0 -12
- package/dist/index-CDACZEF2.d.ts +0 -102
- package/dist/index-vo_FDR-B.d.ts +0 -40
- package/dist/jsx-CUpRxrLH.js +0 -6
|
@@ -1,8 +1,96 @@
|
|
|
1
|
-
import { c as RenderableChild } from "./control-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { _ as StateTuple, c as RenderableChild, i as Scope, n as ReadableSource, r as ComponentInstance } from "./control-Cix3yjVf.js";
|
|
2
|
+
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
|
+
import { t as Scheduler } from "./scheduler-CmLO4Dfm.js";
|
|
4
|
+
import { D as QueryPrefetchContext, _ as CoreTelemetry } from "./index-5S-fi2xy.js";
|
|
5
|
+
import "./jsx-runtime-C-oIHX9X.js";
|
|
4
6
|
import { AuthContext, AuthRequirement } from "@askrjs/auth";
|
|
5
7
|
import { InferSchema, ObjectSchema } from "@askrjs/schema";
|
|
8
|
+
//#region src/runtime/component-scope.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Get the abort signal for the current component.
|
|
11
|
+
*
|
|
12
|
+
* The signal is guaranteed to be aborted when:
|
|
13
|
+
* - Component unmounts
|
|
14
|
+
* - Navigation occurs (different route)
|
|
15
|
+
* - Parent is destroyed
|
|
16
|
+
*/
|
|
17
|
+
declare function getSignal(): AbortSignal;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/runtime/runtime.d.ts
|
|
20
|
+
interface RuntimeKeyedReorderDecision {
|
|
21
|
+
useFastPath: boolean;
|
|
22
|
+
totalKeyed: number;
|
|
23
|
+
totalChildren: number;
|
|
24
|
+
currentKeyCount: number;
|
|
25
|
+
moveCount: number;
|
|
26
|
+
lisLen: number;
|
|
27
|
+
hasPropChanges: boolean;
|
|
28
|
+
isWholeKeyedList: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface RuntimeRendererHost {
|
|
31
|
+
evaluate(node: unknown, target: Element | null, context?: object, retainedOwner?: ComponentInstance): void;
|
|
32
|
+
cleanupInstancesUnder(node: Node): void;
|
|
33
|
+
replaceComponentRange(instance: ComponentInstance, result: unknown, placeholder: Comment): Node | null;
|
|
34
|
+
teardownNodeSubtree(root: Node): void;
|
|
35
|
+
populateKeyMapForElement(parent: Element): void;
|
|
36
|
+
getKeyMapForElement(parent: Element): Map<string | number, Element> | undefined;
|
|
37
|
+
isKeyedReorderFastPathEligible(parent: Element, children: unknown[], oldKeyMap: Map<string | number, Element> | undefined): RuntimeKeyedReorderDecision;
|
|
38
|
+
markReactivePropsDirtySource(source: ReadableSource<unknown>): void;
|
|
39
|
+
}
|
|
40
|
+
interface AskrRuntimeOptions {
|
|
41
|
+
scheduler?: Scheduler;
|
|
42
|
+
renderer?: RuntimeRendererHost;
|
|
43
|
+
}
|
|
44
|
+
declare class AskrRuntime {
|
|
45
|
+
readonly scheduler: Scheduler;
|
|
46
|
+
private rendererHost;
|
|
47
|
+
constructor(options?: AskrRuntimeOptions);
|
|
48
|
+
get renderer(): RuntimeRendererHost;
|
|
49
|
+
configureRenderer(renderer: RuntimeRendererHost): void;
|
|
50
|
+
}
|
|
51
|
+
declare function createRuntime(options?: AskrRuntimeOptions): AskrRuntime;
|
|
52
|
+
declare function getDefaultRuntime(): AskrRuntime;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/runtime/snapshot-source.d.ts
|
|
55
|
+
declare const SNAPSHOT_SOURCE_BRAND: unique symbol;
|
|
56
|
+
type SnapshotSourceBrand = {
|
|
57
|
+
readonly [SNAPSHOT_SOURCE_BRAND]: true;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/runtime/derive.d.ts
|
|
61
|
+
interface Derived<T> extends ReadableSource<T> {
|
|
62
|
+
(): T;
|
|
63
|
+
}
|
|
64
|
+
type SnapshotSource<T> = {
|
|
65
|
+
value: T | null;
|
|
66
|
+
pending?: boolean;
|
|
67
|
+
error?: Error | null;
|
|
68
|
+
} & SnapshotSourceBrand;
|
|
69
|
+
/** Creates a render-scoped derived value; must be called during component render. */
|
|
70
|
+
declare function derive<TOut>(fn: () => TOut): Derived<TOut>;
|
|
71
|
+
declare function derive<TIn, TOut>(source: SnapshotSource<TIn> | TIn | (() => TIn), map: (value: TIn) => TOut): Derived<TOut | null>;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/runtime/selector.d.ts
|
|
74
|
+
interface Selector<T> {
|
|
75
|
+
(candidate: T): boolean;
|
|
76
|
+
}
|
|
77
|
+
type SelectorEquals<T> = {
|
|
78
|
+
bivarianceHack(a: T, b: T): boolean;
|
|
79
|
+
}['bivarianceHack'];
|
|
80
|
+
/**
|
|
81
|
+
* Creates a render-scoped predicate for keyed membership in reactive list rows.
|
|
82
|
+
*
|
|
83
|
+
* Use this when a `<For>` child needs to compare each stable item with a
|
|
84
|
+
* changing selected value. Unlike a plain closure capture, the predicate
|
|
85
|
+
* subscribes the affected rows and updates them without rebuilding the list.
|
|
86
|
+
* Must be called during component render.
|
|
87
|
+
*/
|
|
88
|
+
declare function selector<T>(source: () => T, equals?: SelectorEquals<T>): Selector<T>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/csp-nonce.d.ts
|
|
91
|
+
declare const CspNonceScope: Scope<string | undefined>;
|
|
92
|
+
declare function cspNonce(): string | undefined;
|
|
93
|
+
//#endregion
|
|
6
94
|
//#region src/common/router.d.ts
|
|
7
95
|
/**
|
|
8
96
|
* Common call contracts: Router types
|
|
@@ -265,4 +353,74 @@ interface RouteSnapshot<TParams extends RouteParams = RouteParams> {
|
|
|
265
353
|
matches: readonly RouteMatch<TParams>[];
|
|
266
354
|
}
|
|
267
355
|
//#endregion
|
|
268
|
-
|
|
356
|
+
//#region src/common/render-context.d.ts
|
|
357
|
+
interface DeferredBoundaryRegistration {
|
|
358
|
+
id: string;
|
|
359
|
+
promise: Promise<unknown>;
|
|
360
|
+
fulfilled(value: unknown): RenderableChild;
|
|
361
|
+
rejected(error: unknown): RenderableChild;
|
|
362
|
+
}
|
|
363
|
+
interface SSRPortalHostRegistration {
|
|
364
|
+
token: string;
|
|
365
|
+
automatic: boolean;
|
|
366
|
+
}
|
|
367
|
+
interface SSRPortalSlot {
|
|
368
|
+
hasValue: boolean;
|
|
369
|
+
value: RenderableChild | undefined;
|
|
370
|
+
hosts: SSRPortalHostRegistration[];
|
|
371
|
+
}
|
|
372
|
+
interface SSRPortalState {
|
|
373
|
+
slots: Map<object, SSRPortalSlot>;
|
|
374
|
+
nextHostId: number;
|
|
375
|
+
}
|
|
376
|
+
/** Register request-local CSS produced during SSR without importing the SSR renderer in clients. */
|
|
377
|
+
declare function registerSSRStyle(id: string, cssText: string): void;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/ref.d.ts
|
|
380
|
+
/**
|
|
381
|
+
* Creates a stable holder for an intrinsic element ref.
|
|
382
|
+
*
|
|
383
|
+
* The renderer mutates `current` during commit and clears it during cleanup.
|
|
384
|
+
* Updating the holder never schedules a render.
|
|
385
|
+
*/
|
|
386
|
+
interface Ref<T extends Element = Element> {
|
|
387
|
+
current: T | null;
|
|
388
|
+
}
|
|
389
|
+
declare function createRef<T extends Element = Element>(): Ref<T>;
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region src/actions/index.d.ts
|
|
392
|
+
interface ActionDescriptor<TInput extends Record<string, unknown> = Record<string, unknown>> {
|
|
393
|
+
readonly id: string;
|
|
394
|
+
readonly input: ObjectSchema<TInput>;
|
|
395
|
+
readonly invalidates: readonly string[];
|
|
396
|
+
}
|
|
397
|
+
declare function defineAction<TInput extends Record<string, unknown>>(options: {
|
|
398
|
+
readonly id: string;
|
|
399
|
+
readonly input: ObjectSchema<TInput>;
|
|
400
|
+
readonly invalidates?: readonly string[];
|
|
401
|
+
}): ActionDescriptor<TInput>;
|
|
402
|
+
/** A native form bound to a declared action; it is not a synthetic event API. */
|
|
403
|
+
declare function ActionForm<TInput extends Record<string, unknown>>({ action, children, ...props }: {
|
|
404
|
+
readonly action: ActionDescriptor<TInput>;
|
|
405
|
+
readonly children?: RenderableChild;
|
|
406
|
+
readonly [key: string]: unknown;
|
|
407
|
+
}): JSXElement;
|
|
408
|
+
interface ActionValidationError {
|
|
409
|
+
readonly kind: 'invalid';
|
|
410
|
+
readonly action: string;
|
|
411
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
412
|
+
readonly issues: readonly unknown[];
|
|
413
|
+
readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
|
|
414
|
+
}
|
|
415
|
+
interface ActionStatus<TResult = unknown> {
|
|
416
|
+
readonly pending: boolean;
|
|
417
|
+
readonly result?: TResult;
|
|
418
|
+
readonly error?: unknown;
|
|
419
|
+
}
|
|
420
|
+
/** Returns a command handle, rather than a hook. */
|
|
421
|
+
declare function action<TInput extends Record<string, unknown>, TResult = unknown>(descriptor: ActionDescriptor<TInput>): {
|
|
422
|
+
state: StateTuple<ActionStatus<TResult>>;
|
|
423
|
+
submit(input: TInput): Promise<TResult>;
|
|
424
|
+
};
|
|
425
|
+
//#endregion
|
|
426
|
+
export { cspNonce as $, RouteHandler as A, RouteQuery as B, Route as C, RouteContext as D, RouteComponent as E, RouteMode as F, RouteRegistryOptions as G, RouteRef as H, RouteOptions as I, RouteRequestResult as J, RouteRenderResult as K, RouteParams as L, RouteMatch as M, RouteMeta as N, RouteDefinition as O, RouteMetaSource as P, CspNonceScope as Q, RoutePathParams as R, ParsedSegment as S, RouteAuthResolver as T, RouteRefSearch as U, RouteRecord as V, RouteRegistry as W, RouteSearchValue as X, RouteSearch as Y, RouteSnapshot as Z, AccessRedirectStatus as _, action as a, AskrRuntimeOptions as at, PageHelperOptions as b, createRef as c, createRuntime as ct, registerSSRStyle as d, Selector as et, AccessAllowDecision as f, AccessRedirectDecision as g, AccessDenyStatus as h, ActionValidationError as i, AskrRuntime as it, RouteManifest as j, RouteDestination as k, DeferredBoundaryRegistration as l, getDefaultRuntime as lt, AccessDenyDecision as m, ActionForm as n, Derived as nt, defineAction as o, RuntimeKeyedReorderDecision as ot, AccessDecision as p, RouteRequestOptions as q, ActionStatus as r, derive as rt, Ref as s, RuntimeRendererHost as st, ActionDescriptor as t, selector as tt, SSRPortalState as u, getSignal as ut, GroupHelperOptions as v, RouteAuthOptions as w, PageScopeRecord as x, LayoutScopeRecord as y, RoutePolicy as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as RenderableChild } from "./control-
|
|
1
|
+
import { c as RenderableChild } from "./control-Cix3yjVf.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
3
|
import "./types-C9YcqVpk.js";
|
|
4
4
|
//#region src/runtime/portal.d.ts
|
|
@@ -13,7 +13,7 @@ interface PortalProps {
|
|
|
13
13
|
}
|
|
14
14
|
declare function definePortal<T extends RenderableChild = RenderableChild>(): Portal<T>;
|
|
15
15
|
declare const DefaultPortal: Portal<RenderableChild>;
|
|
16
|
-
declare function Portal(props: PortalProps): null;
|
|
16
|
+
declare function Portal(props: PortalProps): JSXElement | null;
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/foundations/structures/layout.d.ts
|
|
19
19
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-
|
|
1
|
+
import { c as RenderableChild, l as VNode, t as ForEachSource } from "./control-Cix3yjVf.js";
|
|
2
2
|
import { r as JSXElement } from "./jsx-Dvr2SGRG.js";
|
|
3
3
|
//#region src/control/shared.d.ts
|
|
4
4
|
type BoundaryChild = RenderableChild;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as StateTuple, a as defineScope, g as StateSetter, h as State, i as Scope, o as readScope, v as state } from "./control-Cix3yjVf.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./jsx-Dvr2SGRG.js";
|
|
3
|
-
import {
|
|
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-
|
|
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-TlEvex-C.js";
|
|
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-ho0Htetw.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
6
|
import { i as jsxs, n as jsx } from "./jsx-runtime-Cr1jspx9.js";
|
|
6
|
-
|
|
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, selector, serveQuery, state };
|
|
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,17 +1,18 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { n as Fragment } from "./jsx-
|
|
3
|
-
import { g as readScope, u as defineScope } from "./component-internal-
|
|
2
|
+
import { n as Fragment } from "./jsx-C3IECePB.js";
|
|
3
|
+
import { g as readScope, u as defineScope } from "./component-internal-BuTG89T8.js";
|
|
4
4
|
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
5
5
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
8
|
-
import {
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-_l_U-AbR.js";
|
|
8
|
+
import { a as registerSSRStyle } from "./render-context-D-DFk2WN.js";
|
|
9
|
+
import { t as state } from "./state-BCl9DeiN.js";
|
|
9
10
|
import { t as selector } from "./selector-BzPPLXny.js";
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-BUsz0Em7.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-DQIsWvhr.js";
|
|
10
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
11
|
-
import {
|
|
12
|
-
import { i as
|
|
13
|
-
import { t as createQuery } from "./data-E7oXei9c.js";
|
|
14
|
-
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-Bu_cuMch.js";
|
|
14
|
+
import { t as createQuery } from "./data-eBdygZ1f.js";
|
|
15
|
+
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-BL6rjGsO.js";
|
|
15
16
|
//#region src/runtime/derive.ts
|
|
16
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
17
18
|
const dirtyDerivedCells = /* @__PURE__ */ new Set();
|
|
@@ -162,4 +163,4 @@ function createRef() {
|
|
|
162
163
|
*/
|
|
163
164
|
installRendererBridge();
|
|
164
165
|
//#endregion
|
|
165
|
-
export { AskrRuntime, Case, CspNonceScope, For, Fragment, Match, Show, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, selector, serveQuery, state };
|
|
166
|
+
export { AskrRuntime, Case, CspNonceScope, For, Fragment, Match, Show, createQuery, createRef, createRuntime, cspNonce, defineQuery, defineScope, defineServerQueries, dehydrateDataRuntime, derive, getDefaultRuntime, getSignal, hydrateDataRuntime, jsx, jsxs, prefetchQuery, readScope, registerSSRStyle, selector, serveQuery, state };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/common/jsx.ts
|
|
2
|
+
const ELEMENT_TYPE = Symbol.for("askr.element");
|
|
3
|
+
const Fragment = Symbol.for("askr.fragment");
|
|
4
|
+
const STATIC_CHILDREN = Symbol.for("askr.static-children");
|
|
5
|
+
function isFragmentType(type) {
|
|
6
|
+
if (typeof type !== "symbol") return false;
|
|
7
|
+
if (type === Fragment) return true;
|
|
8
|
+
const label = String(type);
|
|
9
|
+
return label === "Symbol(askr.fragment)" || label === "Symbol(Fragment)";
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isFragmentType as i, Fragment as n, STATIC_CHILDREN as r, ELEMENT_TYPE as t };
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-
|
|
1
|
+
import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
|
+
import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
3
|
//#region src/jsx/jsx-dev-runtime.ts
|
|
4
4
|
function annotatePropsUsage(props) {
|
|
5
5
|
return props ?? {};
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-
|
|
1
|
+
import { r as isEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
|
+
import { n as Fragment, r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
3
|
//#region src/jsx/jsx-runtime.ts
|
|
4
4
|
function markStaticChildren(props) {
|
|
5
5
|
if (Array.isArray(props.children)) Object.defineProperty(props.children, STATIC_CHILDREN, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-BuTG89T8.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
2
|
+
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
|
+
import { r as executeComponent } from "./component-internal-BuTG89T8.js";
|
|
4
4
|
import { t as cleanupReadableSubscriptionSources } from "./readable-B3VIOfd7.js";
|
|
5
5
|
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
6
6
|
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-CwHCDseR.js";
|
|
7
|
-
import { _ as teardownNodeSubtree } from "./cleanup-
|
|
8
|
-
import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-
|
|
9
|
-
import { j as lockRouteRegistration, r as computeRouteActivityMatches } from "./route-matching-
|
|
10
|
-
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-
|
|
11
|
-
import { t as CspNonceScope } from "./csp-nonce-
|
|
12
|
-
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-
|
|
7
|
+
import { _ as teardownNodeSubtree } from "./cleanup-CyY1ROBI.js";
|
|
8
|
+
import { d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, p as hasRouteRenderData } from "./deferred-t79wHqe1.js";
|
|
9
|
+
import { j as lockRouteRegistration, r as computeRouteActivityMatches } from "./route-matching-jqwlQJ5g.js";
|
|
10
|
+
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-BZ_rN17v.js";
|
|
11
|
+
import { t as CspNonceScope } from "./csp-nonce-BUsz0Em7.js";
|
|
12
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-DfrtblJA.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
15
15
|
let currentPathname = "/";
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { o as getRuntimeRenderer } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { t as ELEMENT_TYPE } from "./jsx-
|
|
2
|
+
import { t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
3
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
4
4
|
import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-DzJEbYGE.js";
|
|
5
5
|
import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
6
6
|
import { c as getCurrentLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-CwHCDseR.js";
|
|
7
|
-
import { n as getActiveRenderContext } from "./render-context-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal marker used to defer server portal host output until all writes in
|
|
11
|
-
* the current render root are known.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
const SSR_PORTAL_HOST = Symbol.for("askr.ssr-portal-host");
|
|
16
|
-
//#endregion
|
|
7
|
+
import { n as getActiveRenderContext } from "./render-context-D-DFk2WN.js";
|
|
8
|
+
import { i as createSSRPortalHostToken, n as SSR_PORTAL_HOST, r as createSSRPortalAnchorToken, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
17
9
|
//#region src/runtime/portal.ts
|
|
18
10
|
const DEFAULT_SSR_PORTAL_KEY = {};
|
|
19
11
|
function getSSRPortalSlot(key) {
|
|
@@ -36,7 +28,7 @@ function getSSRPortalSlot(key) {
|
|
|
36
28
|
function createSSRPortalHost(key, automatic) {
|
|
37
29
|
const current = getSSRPortalSlot(key);
|
|
38
30
|
if (!current) return null;
|
|
39
|
-
const token =
|
|
31
|
+
const token = createSSRPortalHostToken(current.context.ssrPortals.nextHostId++);
|
|
40
32
|
current.slot.hosts.push({
|
|
41
33
|
token,
|
|
42
34
|
automatic
|
|
@@ -54,6 +46,15 @@ function writeSSRPortal(key, children) {
|
|
|
54
46
|
current.slot.value = children;
|
|
55
47
|
return true;
|
|
56
48
|
}
|
|
49
|
+
function createSSRPortalAnchor() {
|
|
50
|
+
const context = getActiveRenderContext();
|
|
51
|
+
if (context?.mode !== "ssr") return null;
|
|
52
|
+
return {
|
|
53
|
+
$$typeof: ELEMENT_TYPE,
|
|
54
|
+
type: SSR_PORTAL_ANCHOR,
|
|
55
|
+
props: { token: createSSRPortalAnchorToken(context.ssrPortals.nextHostId++) }
|
|
56
|
+
};
|
|
57
|
+
}
|
|
57
58
|
function createPortalSlot() {
|
|
58
59
|
let currentValue;
|
|
59
60
|
const source = (() => {
|
|
@@ -384,11 +385,11 @@ const DefaultPortal = (() => {
|
|
|
384
385
|
return Host;
|
|
385
386
|
})();
|
|
386
387
|
function Portal(props) {
|
|
387
|
-
if (writeSSRPortal(DEFAULT_SSR_PORTAL_KEY, props.children)) return
|
|
388
|
+
if (writeSSRPortal(DEFAULT_SSR_PORTAL_KEY, props.children)) return createSSRPortalAnchor();
|
|
388
389
|
const owner = getCurrentComponentInstance();
|
|
389
390
|
if (owner) registerDefaultPortalOwner(owner);
|
|
390
391
|
writeDefaultPortal(props, owner);
|
|
391
392
|
return null;
|
|
392
393
|
}
|
|
393
394
|
//#endregion
|
|
394
|
-
export { disposeDefaultPortalScope as a, definePortal as i, Portal as n,
|
|
395
|
+
export { disposeDefaultPortalScope as a, definePortal as i, Portal as n, clearDefaultPortalForInstance as r, DefaultPortal as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/common/portal.ts
|
|
2
|
+
/**
|
|
3
|
+
* Internal marker used to defer server portal host output until all writes in
|
|
4
|
+
* the current render root are known.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
const SSR_PORTAL_HOST = Symbol.for("askr.ssr-portal-host");
|
|
9
|
+
const SSR_PORTAL_ANCHOR = Symbol.for("askr.ssr-portal-anchor");
|
|
10
|
+
const SSR_PORTAL_HOST_PREFIX = "askr-portal:";
|
|
11
|
+
const SSR_PORTAL_ANCHOR_PREFIX = "askr-portal-anchor:";
|
|
12
|
+
function createSSRPortalHostToken(id) {
|
|
13
|
+
return `<!--${SSR_PORTAL_HOST_PREFIX}${id}-->`;
|
|
14
|
+
}
|
|
15
|
+
function createSSRPortalAnchorToken(id) {
|
|
16
|
+
return `<!--${SSR_PORTAL_ANCHOR_PREFIX}${id}-->`;
|
|
17
|
+
}
|
|
18
|
+
function isSSRPortalMarkerData(data, prefix) {
|
|
19
|
+
if (!data.startsWith(prefix)) return false;
|
|
20
|
+
const id = data.slice(prefix.length);
|
|
21
|
+
return id.length > 0 && Array.from(id).every((char) => char >= "0" && char <= "9");
|
|
22
|
+
}
|
|
23
|
+
function isSSRPortalHydrationAnchor(node) {
|
|
24
|
+
if (typeof node !== "object" || node === null || node.nodeType !== 8) return false;
|
|
25
|
+
const data = node.data;
|
|
26
|
+
return typeof data === "string" && (isSSRPortalMarkerData(data, SSR_PORTAL_HOST_PREFIX) || isSSRPortalMarkerData(data, SSR_PORTAL_ANCHOR_PREFIX));
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { isSSRPortalHydrationAnchor as a, createSSRPortalHostToken as i, SSR_PORTAL_HOST as n, createSSRPortalAnchorToken as r, SSR_PORTAL_ANCHOR as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-
|
|
1
|
+
import { i as getDefaultDataRuntime, t as createDataRuntime } from "./data-runtime-D68YOo9L.js";
|
|
2
2
|
//#region src/common/telemetry.ts
|
|
3
3
|
function withTelemetry(span, fields, work) {
|
|
4
4
|
return span ? span(fields, work) : work();
|
|
@@ -23,6 +23,18 @@ function configureRenderContextProvider(nextProvider) {
|
|
|
23
23
|
function getActiveRenderContext() {
|
|
24
24
|
return provider.getRenderContext();
|
|
25
25
|
}
|
|
26
|
+
/** Register request-local CSS produced during SSR without importing the SSR renderer in clients. */
|
|
27
|
+
function registerSSRStyle(id, cssText) {
|
|
28
|
+
const context = getActiveRenderContext();
|
|
29
|
+
if (!context?.ssrStyles) return;
|
|
30
|
+
const safeCssText = cssText.replace(/<\/style/gi, "<\\/style");
|
|
31
|
+
const existing = context.ssrStyles.get(id);
|
|
32
|
+
if (existing && existing.cssText !== safeCssText) throw new RangeError(`SSR style registration collision for ${JSON.stringify(id)}.`);
|
|
33
|
+
context.ssrStyles.set(id, {
|
|
34
|
+
id,
|
|
35
|
+
cssText: safeCssText
|
|
36
|
+
});
|
|
37
|
+
}
|
|
26
38
|
function getCurrentRenderData() {
|
|
27
39
|
return getActiveRenderContext()?.renderData ?? hydrationRenderData;
|
|
28
40
|
}
|
|
@@ -58,4 +70,4 @@ function throwSSRDataMissing() {
|
|
|
58
70
|
throw new SSRDataMissingError();
|
|
59
71
|
}
|
|
60
72
|
//#endregion
|
|
61
|
-
export {
|
|
73
|
+
export { registerSSRStyle as a, stopHydrationRenderPhase as c, SSRDataMissingError as d, getNextRenderKey as i, stopRenderPhase as l, getActiveRenderContext as n, startHydrationRenderPhase as o, getCurrentRenderData as r, startRenderPhase as s, configureRenderContextProvider as t, throwSSRDataMissing as u };
|