@askrjs/askr 0.0.77 → 0.0.79
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 +2 -2
- package/dist/{activity-DaqZEUPh.d.ts → activity-CXEaU-Al.d.ts} +1 -1
- package/dist/{activity-BWQeEtNt.js → activity-DfrtblJA.js} +3 -3
- package/dist/{authoring-prA293gq.js → authoring-DE-LH_s-.js} +2 -2
- package/dist/benchmark.js +5 -5
- package/dist/boot/index.d.ts +4 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-Cc5axhVo.js → boot-jD3P49ST.js} +12 -12
- package/dist/{component-internal-TurioKgs.js → component-internal-BuTG89T8.js} +11 -7
- package/dist/components/index.d.ts +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-D9UorK1Q.js → control-DQIsWvhr.js} +2 -2
- package/dist/{csp-nonce-DYspaK0L.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-vaClyf1I.js → data-eBdygZ1f.js} +3 -3
- package/dist/{data-runtime-rpV6-3XW.js → data-runtime-D68YOo9L.js} +1 -1
- package/dist/{deferred-Dfk7vuTX.js → deferred-t79wHqe1.js} +5 -5
- package/dist/{for-internal-BM8KbadU.js → for-internal-BnXrQbgo.js} +1 -1
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +1 -1
- 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 +8 -7
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/{lifecycle-operations-DxwqHvyx.js → lifecycle-operations-CN0PiLE_.js} +1 -1
- package/dist/{navigate-DlaVqF4n.d.ts → navigate-DfY1BUYc.d.ts} +1 -1
- package/dist/{navigate-CwddZjwU.js → navigate-ype2B_M8.js} +6 -6
- package/dist/{portal-BsSJusvs.js → portal-BZ_rN17v.js} +14 -13
- 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-Ba-KixHB.js → renderer-CDw8ltTw.js} +952 -763
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/{route-matching-DqM8k4tZ.js → route-matching-jqwlQJ5g.js} +2 -2
- 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-Cv5qWPxz.js → ssr-Dcmi1bZi.js} +53 -24
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +3 -3
- package/dist/{verify-hydration-BC5bmXr4.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/actions/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-
|
|
1
|
+
import { a as action, i as ActionValidationError, n as ActionForm, o as defineAction, r as ActionStatus, t as ActionDescriptor } from "../index-TlEvex-C.js";
|
|
2
2
|
export { ActionDescriptor, ActionForm, ActionStatus, ActionValidationError, action, defineAction };
|
package/dist/actions/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as getCurrentAppRenderRuntime } from "../component-scope-DzJEbYGE.js";
|
|
2
|
-
import { r as getCurrentRenderData } from "../render-context-
|
|
2
|
+
import { r as getCurrentRenderData } from "../render-context-D-DFk2WN.js";
|
|
3
3
|
import { t as state } from "../state-BCl9DeiN.js";
|
|
4
4
|
import { jsx, jsxs } from "../jsx-runtime.js";
|
|
5
|
-
import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-
|
|
5
|
+
import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-D68YOo9L.js";
|
|
6
6
|
//#region src/actions/runtime.ts
|
|
7
7
|
const emptyFramework = Object.freeze({});
|
|
8
8
|
/** @internal Read Askr-owned state from the current application root. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-BuTG89T8.js";
|
|
2
2
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
3
3
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
4
|
-
import { n as getActiveRenderContext } from "./render-context-
|
|
5
|
-
import { c as deepFreeze, g as getActiveRoutes, l as makeQuery, n as computeMatchesFromRoutes, u as parseLocation } from "./route-matching-
|
|
4
|
+
import { n as getActiveRenderContext } from "./render-context-D-DFk2WN.js";
|
|
5
|
+
import { c as deepFreeze, g as getActiveRoutes, l as makeQuery, n as computeMatchesFromRoutes, u as parseLocation } from "./route-matching-jqwlQJ5g.js";
|
|
6
6
|
import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
|
|
7
7
|
//#region src/common/app-render-runtime.ts
|
|
8
8
|
const stagedRouteLocations = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
2
|
-
import { E as getExecutionModel, x as createRouteHandler } from "./deferred-
|
|
3
|
-
import { A as insertRecordSorted, C as getCurrentPathPrefix, I as computeRank, L as normalizeRouteSegmentName, M as pushRegistrationScope, O as hasActivePageScope, R as parseSegments, S as getCurrentPageScope, _ as getCurrentInheritedAuthRequirements, b as getCurrentLayoutChain, f as addRouteToStores, p as assertRouteRegistrationUnlocked, v as getCurrentInheritedMeta, w as getCurrentScopeKind, x as getCurrentPageChain, y as getCurrentInheritedPolicies } from "./route-matching-
|
|
2
|
+
import { E as getExecutionModel, x as createRouteHandler } from "./deferred-t79wHqe1.js";
|
|
3
|
+
import { A as insertRecordSorted, C as getCurrentPathPrefix, I as computeRank, L as normalizeRouteSegmentName, M as pushRegistrationScope, O as hasActivePageScope, R as parseSegments, S as getCurrentPageScope, _ as getCurrentInheritedAuthRequirements, b as getCurrentLayoutChain, f as addRouteToStores, p as assertRouteRegistrationUnlocked, v as getCurrentInheritedMeta, w as getCurrentScopeKind, x as getCurrentPageChain, y as getCurrentInheritedPolicies } from "./route-matching-jqwlQJ5g.js";
|
|
4
4
|
import { allOf } from "@askrjs/auth";
|
|
5
5
|
//#region src/router/access.ts
|
|
6
6
|
function compileNodePolicies(node) {
|
package/dist/benchmark.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as flushRuntimeScheduler } from "./access-ePqdQqkV.js";
|
|
2
|
-
import { t as installRendererBridge } from "./renderer-
|
|
2
|
+
import { t as installRendererBridge } from "./renderer-CDw8ltTw.js";
|
|
3
3
|
import { t as state } from "./state-BCl9DeiN.js";
|
|
4
4
|
import { t as selector } from "./selector-BzPPLXny.js";
|
|
5
|
-
import { i as For } from "./control-
|
|
5
|
+
import { i as For } from "./control-DQIsWvhr.js";
|
|
6
6
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
7
|
-
import { t as createIsland } from "./boot-
|
|
7
|
+
import { t as createIsland } from "./boot-jD3P49ST.js";
|
|
8
8
|
//#region src/bench/components/benchmark-row.tsx
|
|
9
9
|
function BenchmarkRow({ item, isSelected, onSelect, onRemove }) {
|
|
10
10
|
return /* @__PURE__ */ jsxs("tr", {
|
|
@@ -63,8 +63,8 @@ function BenchmarkTable({ rows, isSelected, onSelect, onRemove }) {
|
|
|
63
63
|
installRendererBridge();
|
|
64
64
|
const benchmarkMetadata = {
|
|
65
65
|
packageName: "@askrjs/askr",
|
|
66
|
-
packageVersion: "0.0.
|
|
67
|
-
buildLabel: "0.0.
|
|
66
|
+
packageVersion: "0.0.79",
|
|
67
|
+
buildLabel: "0.0.79-local"
|
|
68
68
|
};
|
|
69
69
|
function getBenchmarkMetadata() {
|
|
70
70
|
return { ...benchmarkMetadata };
|
package/dist/boot/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as ComponentFunction } from "../control-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as ScrollRestorationOptions } from "../navigate-
|
|
1
|
+
import { s as ComponentFunction } from "../control-Cix3yjVf.js";
|
|
2
|
+
import { W as RouteRegistry, w as RouteAuthOptions } from "../index-TlEvex-C.js";
|
|
3
|
+
import { v as DataRuntime } from "../index-5S-fi2xy.js";
|
|
4
|
+
import { a as ScrollRestorationOptions } from "../navigate-DfY1BUYc.js";
|
|
5
5
|
//#region src/boot/types.d.ts
|
|
6
6
|
type IslandConfig = {
|
|
7
7
|
root: Element | string;
|
package/dist/boot/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-
|
|
1
|
+
import { a as cleanupApp, i as hydrateSPA, n as createIslands, o as hasApp, r as createSPA, t as createIsland } from "../boot-jD3P49ST.js";
|
|
2
2
|
export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
|
-
import { n as createComponentInstance, r as executeComponent } from "./component-internal-
|
|
3
|
+
import { n as createComponentInstance, r as executeComponent } from "./component-internal-BuTG89T8.js";
|
|
4
4
|
import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
5
5
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
6
|
-
import { a as withIntrinsicHydrationAdoption, c as beginHydrationListenerTransaction, d as setStaticChildSlotsCacheEnabled, i as registerDeferredHydrationBoundary, l as commitHydrationListenerTransaction, n as activateHydrationBoundary$1, o as beginHydrationDirectListenerMode, r as clearDeferredHydrationBoundaries, s as endHydrationDirectListenerMode, t as installRendererBridge, u as discardHydrationListenerTransaction } from "./renderer-
|
|
6
|
+
import { a as withIntrinsicHydrationAdoption, c as beginHydrationListenerTransaction, d as setStaticChildSlotsCacheEnabled, i as registerDeferredHydrationBoundary, l as commitHydrationListenerTransaction, n as activateHydrationBoundary$1, o as beginHydrationDirectListenerMode, r as clearDeferredHydrationBoundaries, s as endHydrationDirectListenerMode, t as installRendererBridge, u as discardHydrationListenerTransaction } from "./renderer-CDw8ltTw.js";
|
|
7
7
|
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-CyY1ROBI.js";
|
|
8
|
-
import { T as assertExecutionModel, c as _applyManifest, d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, o as reviveDeferredValue, p as hasRouteRenderData, v as pageRenderEnvelope } from "./deferred-
|
|
9
|
-
import {
|
|
10
|
-
import { d as _setActiveRouteAuthOptions, j as lockRouteRegistration, k as hasRegisteredRoutes, m as clearRouteState } from "./route-matching-
|
|
11
|
-
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-
|
|
12
|
-
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
13
|
-
import { i as getDefaultDataRuntime } from "./data-runtime-
|
|
14
|
-
import { a as hydrateDataRuntime } from "./query-registry-
|
|
15
|
-
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-
|
|
16
|
-
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-
|
|
8
|
+
import { T as assertExecutionModel, c as _applyManifest, d as getRouteRenderContext, f as getRouteRenderData, m as resolveRouteRequest, o as reviveDeferredValue, p as hasRouteRenderData, v as pageRenderEnvelope } from "./deferred-t79wHqe1.js";
|
|
9
|
+
import { c as stopHydrationRenderPhase, o as startHydrationRenderPhase } from "./render-context-D-DFk2WN.js";
|
|
10
|
+
import { d as _setActiveRouteAuthOptions, j as lockRouteRegistration, k as hasRegisteredRoutes, m as clearRouteState } from "./route-matching-jqwlQJ5g.js";
|
|
11
|
+
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-BZ_rN17v.js";
|
|
12
|
+
import { r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-BUsz0Em7.js";
|
|
13
|
+
import { i as getDefaultDataRuntime } from "./data-runtime-D68YOo9L.js";
|
|
14
|
+
import { a as hydrateDataRuntime } from "./query-registry-BL6rjGsO.js";
|
|
15
|
+
import { o as createAppRenderRuntime, r as setServerLocation } from "./activity-DfrtblJA.js";
|
|
16
|
+
import { f as registerAppInstance, g as unregisterAppInstance, i as resolveRouteMeta, o as configureScrollRestoration, r as reconcileRouteMeta, t as initializeNavigation } from "./navigate-ype2B_M8.js";
|
|
17
17
|
import "./ssr-CbQO5xd3.js";
|
|
18
18
|
//#region src/boot/hydration.ts
|
|
19
19
|
const DEFERRED_PAYLOAD = "__askr_deferred__";
|
|
@@ -585,7 +585,7 @@ async function hydrateSPA(config) {
|
|
|
585
585
|
cspNonce: config.cspNonce
|
|
586
586
|
}));
|
|
587
587
|
if (shouldVerifyHydrationMarkup(config)) {
|
|
588
|
-
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-
|
|
588
|
+
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-Dfx-ZhbX.js");
|
|
589
589
|
if (!verifyHydrationSyncForUrl({
|
|
590
590
|
root: rootElement,
|
|
591
591
|
url: currentUrl,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as markTransparentComponentResult, i as markEagerControlPrimitive } from "./control-C-ApnFs1.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment, n as enqueueRuntimeTask, o as getRuntimeRenderer, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
3
3
|
import { r as tryRuntimeFastLaneSync, t as isBulkCommitActive } from "./fastlane-CkBXZ_3K.js";
|
|
4
4
|
import { r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
@@ -6,6 +6,8 @@ import { i as finalizeReadableSubscriptions } from "./readable-B3VIOfd7.js";
|
|
|
6
6
|
import { C as restoreRenderScopedComponent, S as restoreInlineRenderTracking, _ as getSignalForInstance, b as restoreDomCommitScope, c as enterDomCommitScope, f as getCurrentComponentInstance, l as enterRenderScopedComponent, m as getCurrentPortalScope, n as captureInlineComponentScope, o as clearRenderTracking, p as getCurrentInstance, r as captureInlineRenderTracking, s as enterComponentExecutionScope, t as beginRenderTracking, u as exitComponentExecutionScope, v as resetRenderState, x as restoreInlineComponentScope } from "./component-scope-DzJEbYGE.js";
|
|
7
7
|
import { a as enqueueLifecycleCommitForInstance, d as discardCommitOperations, f as executeCommittedLifecycleOperations, n as captureInlineRenderSnapshot$1, o as finalizeInlineReadSubscriptions, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-CwHCDseR.js";
|
|
8
8
|
//#region src/runtime/context.ts
|
|
9
|
+
const TransparentContextScopeComponent = markTransparentComponentResult(ContextScopeComponent);
|
|
10
|
+
let nextScopeIdentityKey = 0;
|
|
9
11
|
/** @internal Compare immutable context snapshots by provider identity and value. */
|
|
10
12
|
function haveEquivalentContextFrames(left, right) {
|
|
11
13
|
let leftFrame = left;
|
|
@@ -211,11 +213,13 @@ function withAsyncResourceContext(frame, fn) {
|
|
|
211
213
|
}
|
|
212
214
|
function defineScope(defaultValue) {
|
|
213
215
|
const key = Symbol("AskrContext");
|
|
216
|
+
const identityKey = nextScopeIdentityKey++;
|
|
214
217
|
const scope = markEagerControlPrimitive((props) => ({
|
|
215
218
|
$$typeof: ELEMENT_TYPE,
|
|
216
|
-
type:
|
|
219
|
+
type: TransparentContextScopeComponent,
|
|
217
220
|
props: {
|
|
218
|
-
|
|
221
|
+
__askrIdentityKey: identityKey,
|
|
222
|
+
__scopeKey: key,
|
|
219
223
|
value: props.value,
|
|
220
224
|
children: props.children
|
|
221
225
|
},
|
|
@@ -253,7 +257,7 @@ function readScope(context) {
|
|
|
253
257
|
* Used by a scope component to provide a shadowed value to its children.
|
|
254
258
|
*/
|
|
255
259
|
function ContextScopeComponent(props) {
|
|
256
|
-
const key = props["
|
|
260
|
+
const key = props["__scopeKey"];
|
|
257
261
|
const value = props["value"];
|
|
258
262
|
const children = props["children"];
|
|
259
263
|
const instance = getCurrentComponentInstance();
|
|
@@ -395,10 +399,11 @@ function commitPlaceholderReplacement(instance, result, host) {
|
|
|
395
399
|
renderer.evaluate(result, hostElement);
|
|
396
400
|
});
|
|
397
401
|
const onlyChild = hostElement.childNodes.length === 1 ? hostElement.firstChild : null;
|
|
398
|
-
const replacement = onlyChild instanceof Element ? onlyChild : hostElement;
|
|
402
|
+
const replacement = onlyChild instanceof Element || onlyChild instanceof Comment ? onlyChild : hostElement;
|
|
399
403
|
if (replacement === hostElement) hostElement.__ASKR_WRAPPER_HOST = true;
|
|
400
404
|
parent.replaceChild(replacement, placeholder);
|
|
401
|
-
instance.target = replacement;
|
|
405
|
+
instance.target = replacement instanceof Element ? replacement : null;
|
|
406
|
+
instance._placeholder = replacement instanceof Comment ? replacement : void 0;
|
|
402
407
|
const instanceHost = replacement;
|
|
403
408
|
const instances = instanceHost.__ASKR_INSTANCES ?? [];
|
|
404
409
|
if (!instances.includes(instance)) instances.push(instance);
|
|
@@ -408,7 +413,6 @@ function commitPlaceholderReplacement(instance, result, host) {
|
|
|
408
413
|
discardLifecycleCommitBatch(lifecycleBatch);
|
|
409
414
|
throw err;
|
|
410
415
|
}
|
|
411
|
-
instance._placeholder = void 0;
|
|
412
416
|
host.finalizeReadSubscriptions(instance);
|
|
413
417
|
host.commitRenderedComponent(instance);
|
|
414
418
|
flushLifecycleCommitBatch(lifecycleBatch);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as VNode } from "../control-
|
|
1
|
+
import { l as VNode } from "../control-Cix3yjVf.js";
|
|
2
2
|
import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.js";
|
|
3
3
|
//#region src/common/error-boundary.d.ts
|
|
4
4
|
type ErrorBoundaryContent = VNode | readonly VNode[];
|
package/dist/control/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { Case, type CaseProps, For, type ForProps, Match, type MatchProps, Show, type ShowProps };
|
package/dist/control/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as For, n as Match, r as Show, t as Case } from "../control-
|
|
1
|
+
import { i as For, n as Match, r as Show, t as Case } from "../control-DQIsWvhr.js";
|
|
2
2
|
export { Case, For, Match, Show };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/common/control.ts
|
|
2
|
+
const __CONTROL_BOUNDARY__ = Symbol("__CONTROL_BOUNDARY__");
|
|
3
|
+
const EAGER_CONTROL_PRIMITIVE = Symbol("__ASKR_EAGER_CONTROL_PRIMITIVE__");
|
|
4
|
+
const TRANSPARENT_COMPONENT_RESULT = Symbol("__ASKR_TRANSPARENT_COMPONENT_RESULT__");
|
|
5
|
+
function markEagerControlPrimitive(primitive) {
|
|
6
|
+
primitive[EAGER_CONTROL_PRIMITIVE] = true;
|
|
7
|
+
return primitive;
|
|
8
|
+
}
|
|
9
|
+
function isEagerControlPrimitive(value) {
|
|
10
|
+
return typeof value === "function" && Boolean(value[EAGER_CONTROL_PRIMITIVE]);
|
|
11
|
+
}
|
|
12
|
+
function markTransparentComponentResult(component) {
|
|
13
|
+
component[TRANSPARENT_COMPONENT_RESULT] = true;
|
|
14
|
+
return component;
|
|
15
|
+
}
|
|
16
|
+
function hasTransparentComponentResult(value) {
|
|
17
|
+
return typeof value === "function" && Boolean(value[TRANSPARENT_COMPONENT_RESULT]);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { markTransparentComponentResult as a, markEagerControlPrimitive as i, hasTransparentComponentResult as n, isEagerControlPrimitive as r, __CONTROL_BOUNDARY__ as t };
|
|
@@ -55,6 +55,11 @@ declare function state<T>(initialValue: T): StateTuple<T>;
|
|
|
55
55
|
* Common call contracts: SSR types
|
|
56
56
|
*/
|
|
57
57
|
type SSRData = Record<string, unknown>;
|
|
58
|
+
/** Styles produced while rendering a request, kept with that request's SSR context. */
|
|
59
|
+
interface SSRStyleRegistration {
|
|
60
|
+
id: string;
|
|
61
|
+
cssText: string;
|
|
62
|
+
}
|
|
58
63
|
interface DocumentRenderRoute {
|
|
59
64
|
path: string;
|
|
60
65
|
namespace?: string;
|
|
@@ -70,6 +75,7 @@ interface DocumentRenderContext {
|
|
|
70
75
|
seed: number;
|
|
71
76
|
route: DocumentRenderRoute;
|
|
72
77
|
cspNonce?: string;
|
|
78
|
+
styles?: readonly SSRStyleRegistration[];
|
|
73
79
|
}
|
|
74
80
|
interface DocumentRenderArgs {
|
|
75
81
|
appHtml: string;
|
|
@@ -439,4 +445,4 @@ interface ControlTransaction {
|
|
|
439
445
|
registered: boolean;
|
|
440
446
|
}
|
|
441
447
|
//#endregion
|
|
442
|
-
export {
|
|
448
|
+
export { StateTuple as _, defineScope as a, RenderableChild as c, DocumentRenderContext as d, DocumentRenderer as f, StateSetter as g, State as h, Scope as i, VNode as l, SSRStyleRegistration as m, ReadableSource as n, readScope as o, SSRData as p, ComponentInstance as r, ComponentFunction as s, ForEachSource as t, DocumentRenderArgs as u, state as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment } from "./access-ePqdQqkV.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-C3IECePB.js";
|
|
4
|
-
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-
|
|
4
|
+
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-BnXrQbgo.js";
|
|
5
5
|
import { t as createFineGrainedEffect } from "./effect-2IIWvUjG.js";
|
|
6
6
|
import { t as state } from "./state-BCl9DeiN.js";
|
|
7
7
|
//#region src/control/shared.ts
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ServerQueryHandler, C as Query, D as QueryPrefetchContext, E as QueryKeyPart, O as QueryScope, S as Mutation, T as QueryDefinition,
|
|
1
|
+
import { A as ServerQueryHandler, C as Query, D as QueryPrefetchContext, E as QueryKeyPart, O as QueryScope, S as Mutation, T as QueryDefinition, a as defineServerQueries, b as InvalidateOnIntervalOptions, c as prefetchQuery, d as invalidateOnInterval, f as queryScope, g as createMutation, h as createQuery, i as defineQuery, k as QueryStaleReason, l as serveQuery, m as getDefaultDataRuntime, n as ServerQueryRegistry, o as dehydrateDataRuntime, p as createDataRuntime, r as createQueryPrefetchContext, s as hydrateDataRuntime, t as ServerQueryEntry, u as invalidate, v as DataRuntime, w as QueryConsistency, x as InvalidateOptions, y as DataRuntimeOptions } from "../index-5S-fi2xy.js";
|
|
2
2
|
export { type DataRuntime, type DataRuntimeOptions, type InvalidateOnIntervalOptions, type InvalidateOptions, type Mutation, type Query, type QueryConsistency, type QueryDefinition, type QueryKeyPart, type QueryPrefetchContext, type QueryScope, type QueryStaleReason, type ServerQueryEntry, type ServerQueryHandler, type ServerQueryRegistry, createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
package/dist/data/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-
|
|
2
|
-
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-
|
|
3
|
-
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-
|
|
1
|
+
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-D68YOo9L.js";
|
|
2
|
+
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-eBdygZ1f.js";
|
|
3
|
+
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery, t as createQueryPrefetchContext } from "../query-registry-BL6rjGsO.js";
|
|
4
4
|
export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as enqueueRuntimeTask, v as logger } from "./access-ePqdQqkV.js";
|
|
2
2
|
import { l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
3
3
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
4
|
-
import { n as getActiveRenderContext } from "./render-context-
|
|
5
|
-
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-
|
|
6
|
-
import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-
|
|
4
|
+
import { n as getActiveRenderContext } from "./render-context-D-DFk2WN.js";
|
|
5
|
+
import { i as routeActive, n as documentVisible, o as timer, s as windowFocused } from "./lifecycle-operations-CN0PiLE_.js";
|
|
6
|
+
import { a as getMutationSlotStore, c as resolveDataRuntimeState, i as getDefaultDataRuntime, n as ensureMutationCleanup, o as getQuerySlotStore, r as ensureQueryCleanup, s as invalidateQueriesForRuntime } from "./data-runtime-D68YOo9L.js";
|
|
7
7
|
//#region src/data/query-key.ts
|
|
8
8
|
function serializeQueryKeyNumber(part) {
|
|
9
9
|
if (Number.isNaN(part)) return "NaN";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getActiveRenderContext } from "./render-context-
|
|
1
|
+
import { n as getActiveRenderContext } from "./render-context-D-DFk2WN.js";
|
|
2
2
|
//#region src/data/invalidation-listeners.ts
|
|
3
3
|
const invalidationListeners = /* @__PURE__ */ new Set();
|
|
4
4
|
function addInvalidationListener(listener) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
2
|
-
import { g as readScope, u as defineScope } from "./component-internal-
|
|
2
|
+
import { g as readScope, u as defineScope } from "./component-internal-BuTG89T8.js";
|
|
3
3
|
import { d as getCurrentAppRenderRuntime } from "./component-scope-DzJEbYGE.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
|
|
5
|
-
import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-
|
|
6
|
-
import { A as insertRecordSorted, D as getRouteRecords, E as getRouteList, F as snapshotRouteState, N as restoreRouteState, P as setDefaultRouteAuthOptions, T as getDefaultRouteAuthOptions, f as addRouteToStores, h as getActiveRouteAuthOptions, i as getMatchingRouteRecord, m as clearRouteState, o as buildRouteContext, s as buildRouteContextBase, z as resource } from "./route-matching-
|
|
7
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
8
|
-
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-
|
|
5
|
+
import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-D-DFk2WN.js";
|
|
6
|
+
import { A as insertRecordSorted, D as getRouteRecords, E as getRouteList, F as snapshotRouteState, N as restoreRouteState, P as setDefaultRouteAuthOptions, T as getDefaultRouteAuthOptions, f as addRouteToStores, h as getActiveRouteAuthOptions, i as getMatchingRouteRecord, m as clearRouteState, o as buildRouteContext, s as buildRouteContextBase, z as resource } from "./route-matching-jqwlQJ5g.js";
|
|
7
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-BUsz0Em7.js";
|
|
8
|
+
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-BL6rjGsO.js";
|
|
9
9
|
//#region src/runtime/execution-model.ts
|
|
10
10
|
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
11
11
|
function getExecutionModel() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
|
|
2
2
|
import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-ePqdQqkV.js";
|
|
3
|
-
import { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-
|
|
3
|
+
import { _ as rebaseVNodeTreeWithContextFrame, m as haveEquivalentContextFrames, n as createComponentInstance, s as renderScopedComponent } from "./component-internal-BuTG89T8.js";
|
|
4
4
|
import { d as shouldCoalesceFineGrainedItemReads, l as notifyReadableReaders, o as markReactivePropsDirtySource, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B3VIOfd7.js";
|
|
5
5
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { i as unregisterOwnedChildScope, r as registerOwnedChildScope, t as cleanupComponent } from "./component-cleanup-oWN45rfa.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../jsx-Dvr2SGRG.js";
|
|
2
|
-
import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-
|
|
2
|
+
import { _ as definePortal, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, l as PresenceProps, m as DefaultPortal, p as layout, u as Slot } from "../index-Vs1EeWEr.js";
|
|
3
3
|
export { DefaultPortal, type JSXElement, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, definePortal, layout };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-BsSJusvs.js";
|
|
2
1
|
import { a as layout, i as Slot, r as Presence } from "../structures-D3vO-WMN.js";
|
|
2
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-BZ_rN17v.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as State } from "../../control-Cix3yjVf.js";
|
|
2
2
|
//#region src/foundations/state/controllable.d.ts
|
|
3
3
|
declare function isControlled<T>(value: T | undefined): value is T;
|
|
4
4
|
declare function resolveControllable<T>(value: T | undefined, defaultValue: T): {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as JSXElement } from "../../jsx-Dvr2SGRG.js";
|
|
2
|
-
import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-
|
|
2
|
+
import { _ as definePortal, a as Collection, c as Presence, d as SlotProps, f as LayoutComponent, g as PortalProps, h as Portal, i as createLayer, l as PresenceProps, m as DefaultPortal, n as LayerManager, o as CollectionItem, p as layout, r as LayerOptions, s as createCollection, t as Layer, u as Slot } from "../../index-Vs1EeWEr.js";
|
|
3
3
|
export { type Collection, type CollectionItem, DefaultPortal, type JSXElement, type Layer, type LayerManager, type LayerOptions, type LayoutComponent, Portal, type PortalProps, Presence, type PresenceProps, Slot, type SlotProps, createCollection, createLayer, definePortal, layout };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-BsSJusvs.js";
|
|
2
1
|
import { a as layout, i as Slot, n as createCollection, r as Presence, t as createLayer } from "../../structures-D3vO-WMN.js";
|
|
2
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-BZ_rN17v.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, createCollection, createLayer, definePortal, layout };
|
|
@@ -168,22 +168,6 @@ type MutationOptions<TInput, TResult> = {
|
|
|
168
168
|
runtime?: DataRuntime;
|
|
169
169
|
};
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region src/data/mutation-cell.d.ts
|
|
172
|
-
declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/data/query-cell.d.ts
|
|
175
|
-
declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
|
|
176
|
-
declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/data/data-runtime.d.ts
|
|
179
|
-
declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
|
|
180
|
-
declare function getDefaultDataRuntime(): DataRuntime;
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/data/invalidation.d.ts
|
|
183
|
-
declare function invalidate(prefix: string, options?: InvalidateOptions): void;
|
|
184
|
-
declare function queryScope(namespace: string): QueryScope;
|
|
185
|
-
declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
|
|
186
|
-
//#endregion
|
|
187
171
|
//#region src/common/telemetry.d.ts
|
|
188
172
|
interface TelemetryFields {
|
|
189
173
|
requestId?: string;
|
|
@@ -206,6 +190,22 @@ interface CoreTelemetry {
|
|
|
206
190
|
ssrRender?: TelemetrySpan;
|
|
207
191
|
}
|
|
208
192
|
//#endregion
|
|
193
|
+
//#region src/data/mutation-cell.d.ts
|
|
194
|
+
declare function createMutation<TInput, TResult>(options: MutationOptions<TInput, TResult>): Mutation<TInput, TResult>;
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/data/query-cell.d.ts
|
|
197
|
+
declare function createQuery<T extends {}>(options: QueryOptions<T>): Query<T>;
|
|
198
|
+
declare function createQuery<TInput, TResult extends {}>(definition: QueryDefinition<TInput, TResult>, input: TInput, options?: Omit<QueryOptions<TResult>, 'key' | 'fetch'>): Query<TResult>;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/data/data-runtime.d.ts
|
|
201
|
+
declare function createDataRuntime(options?: DataRuntimeOptions): DataRuntime;
|
|
202
|
+
declare function getDefaultDataRuntime(): DataRuntime;
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/data/invalidation.d.ts
|
|
205
|
+
declare function invalidate(prefix: string, options?: InvalidateOptions): void;
|
|
206
|
+
declare function queryScope(namespace: string): QueryScope;
|
|
207
|
+
declare function invalidateOnInterval(prefix: string, options: InvalidateOnIntervalOptions): void;
|
|
208
|
+
//#endregion
|
|
209
209
|
//#region src/data/query-registry.d.ts
|
|
210
210
|
interface ServerQueryRegistry {
|
|
211
211
|
readonly entries: readonly ServerQueryEntry<unknown, {}>[];
|
|
@@ -230,4 +230,4 @@ declare function prefetchQuery<TInput, TResult extends {}>(context: QueryPrefetc
|
|
|
230
230
|
declare function dehydrateDataRuntime(runtime: DataRuntime): Record<string, unknown>;
|
|
231
231
|
declare function hydrateDataRuntime(runtime: DataRuntime, data: unknown): void;
|
|
232
232
|
//#endregion
|
|
233
|
-
export { ServerQueryHandler as A, Query as C, QueryPrefetchContext as D, QueryKeyPart as E, QueryScope as O, Mutation as S, QueryDefinition as T,
|
|
233
|
+
export { ServerQueryHandler as A, Query as C, QueryPrefetchContext as D, QueryKeyPart as E, QueryScope as O, Mutation as S, QueryDefinition as T, CoreTelemetry as _, defineServerQueries as a, InvalidateOnIntervalOptions as b, prefetchQuery as c, invalidateOnInterval as d, queryScope as f, createMutation as g, createQuery as h, defineQuery as i, QueryStaleReason as k, serveQuery as l, getDefaultDataRuntime as m, ServerQueryRegistry as n, dehydrateDataRuntime as o, createDataRuntime as p, createQueryPrefetchContext as r, hydrateDataRuntime as s, ServerQueryEntry as t, invalidate as u, DataRuntime as v, QueryConsistency as w, InvalidateOptions as x, DataRuntimeOptions as y };
|
|
@@ -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 };
|