@askrjs/askr 0.0.85 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/capabilities.json +25 -0
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +2 -2
- package/dist/{activity-Jd9CgEa3.js → activity-BnkhdIXm.js} +3 -3
- package/dist/{activity-B1I5HJQI.d.ts → activity-DNYL__cW.d.ts} +1 -1
- package/dist/benchmark.js +5 -5
- package/dist/boot/index.d.ts +3 -3
- package/dist/boot/index.js +1 -1
- package/dist/{boot-DWe880Et.js → boot-Bd-j_BL5.js} +15 -14
- package/dist/{component-internal-DcrLymUJ.js → component-internal-uVCJAre6.js} +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-oLADku43.js → control-BF3geQKh.js} +1 -1
- package/dist/{csp-nonce-Bc52OIVc.js → csp-nonce-CUscoNF1.js} +1 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +3 -3
- package/dist/{data-Dkqb8_QP.js → data-CXZ-FOa7.js} +6 -3
- package/dist/{data-runtime-D68YOo9L.js → data-runtime-CnVeSvJz.js} +7 -5
- package/dist/default-portal-runtime-DvMvWJVp.js +20 -0
- package/dist/{authoring-DdQ3pHqt.js → deferred-_DaSfpsr.js} +81 -4
- package/dist/{for-internal-B_mnQhan.js → for-internal-Dxf3iZ9E.js} +1 -1
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +1 -2
- package/dist/foundations/structures/index.d.ts +1 -1
- package/dist/foundations/structures/index.js +1 -2
- package/dist/{index-pIgGaXvS.d.ts → index-BvNkcegT.d.ts} +1 -1
- package/dist/{index-Bkh9S9-t.d.ts → index-DflhL1h8.d.ts} +15 -15
- package/dist/{index-5S-fi2xy.d.ts → index-SGxMZLAc.d.ts} +3 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/{lifecycle-operations-BrYrBsXY.js → lifecycle-operations-DTO93Hrl.js} +1 -1
- package/dist/manifest-D1P9uTlz.js +53 -0
- package/dist/{navigate-NyIjQUwI.d.ts → navigate-B_fcLDAG.d.ts} +1 -1
- package/dist/{navigate-b4GGxO_l.js → navigate-DSATWfHh.js} +8 -8
- package/dist/{query-registry-BL6rjGsO.js → query-registry-p_0kkieE.js} +1 -1
- package/dist/render-context-D0Hoj9dW.js +161 -0
- package/dist/{renderer-CZzNtoj2.js → renderer-BGMaUrVj.js} +10 -7
- package/dist/{deferred-vUOy-awa.js → resolution-BRmiFYvw.js} +61 -231
- package/dist/resource-operation-B94oj6xT.js +304 -0
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/{route-matching-DHduNiGk.js → route-matching-DqULzZtC.js} +2 -276
- package/dist/router/index.d.ts +8 -6
- package/dist/router/index.js +7 -6
- package/dist/ssg/index.d.ts +1 -1
- package/dist/ssg/index.js +5 -4
- package/dist/ssr/index.d.ts +2 -2
- package/dist/ssr/index.js +2 -2
- package/dist/{ssr-CpiBHMNv.js → ssr-q250YlKo.js} +36 -18
- package/dist/{portal-BVWjAhNQ.js → structures-DsOm-clq.js} +232 -3
- package/dist/testing/index.d.ts +17 -3
- package/dist/testing/index.js +42 -4
- package/dist/{verify-hydration-C3QBBQqR.js → verify-hydration-DkISyZCo.js} +4 -3
- package/package.json +3 -2
- package/dist/render-context-D-DFk2WN.js +0 -73
- package/dist/structures-DSLF_iis.js +0 -223
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-C3IECePB.js";
|
|
4
|
-
import { g as readScope, u as defineScope } from "./component-internal-
|
|
4
|
+
import { g as readScope, u as defineScope } from "./component-internal-uVCJAre6.js";
|
|
5
5
|
import { f as syncDerivedDependencySubscriptions, l as notifyReadableReaders, o as markReactivePropsDirtySource, p as withDerivedReadTracking, r as clearDerivedDependencySubscriptions, s as markReadableDerivedSubscribersDirty, u as recordReadableRead } from "./readable-B5NtV7V0.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
8
|
-
import {
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-BGMaUrVj.js";
|
|
8
|
+
import { c as registerSSRStyle } from "./render-context-D0Hoj9dW.js";
|
|
9
9
|
import { t as state } from "./state-DCjONcHK.js";
|
|
10
10
|
import { t as selector } from "./selector-Ck_Pp9av.js";
|
|
11
|
-
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
-
import { i as For, n as Match, r as Show, t as Case } from "./control-
|
|
11
|
+
import { n as cspNonce, t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
|
|
12
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-BF3geQKh.js";
|
|
13
13
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
14
|
-
import { t as createQuery } from "./data-
|
|
15
|
-
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-
|
|
14
|
+
import { t as createQuery } from "./data-CXZ-FOa7.js";
|
|
15
|
+
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-p_0kkieE.js";
|
|
16
16
|
//#region src/runtime/derive.ts
|
|
17
17
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
18
18
|
const dirtyDerivedCells = /* @__PURE__ */ new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-DzJEbYGE.js";
|
|
2
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
2
|
+
import { a as registerCommitOperation } from "./component-internal-uVCJAre6.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
5
5
|
function normalizePredicates(predicates) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { A as getDefaultRouteBasePath, B as setDefaultRouteBasePath, F as insertRecordSorted, M as getRouteRecords, R as restoreRouteState, V as snapshotRouteState, _ as clearRouteState, h as addRouteToStores, j as getRouteList, k as getDefaultRouteAuthOptions, s as normalizeRouteBasePath, z as setDefaultRouteAuthOptions } from "./route-matching-DqULzZtC.js";
|
|
2
|
+
//#region src/runtime/execution-model.ts
|
|
3
|
+
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
4
|
+
function getExecutionModel() {
|
|
5
|
+
return globalThis[EXECUTION_MODEL_KEY];
|
|
6
|
+
}
|
|
7
|
+
function assertExecutionModel(model) {
|
|
8
|
+
const g = globalThis;
|
|
9
|
+
const cur = g[EXECUTION_MODEL_KEY];
|
|
10
|
+
if (cur && cur !== model) throw new Error(`[Askr] mixing execution models is not allowed (current: ${cur}, attempted: ${model}). Choose exactly one: createSPA, createSSR, or createIslands.`);
|
|
11
|
+
if (!cur) g[EXECUTION_MODEL_KEY] = model;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/router/manifest.ts
|
|
15
|
+
function createRouteManifest() {
|
|
16
|
+
const auth = getDefaultRouteAuthOptions();
|
|
17
|
+
return {
|
|
18
|
+
records: [...getRouteRecords()],
|
|
19
|
+
...auth ? { auth } : {},
|
|
20
|
+
...getDefaultRouteBasePath() ? { basePath: getDefaultRouteBasePath() } : {}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function _applyManifest(manifest) {
|
|
24
|
+
setDefaultRouteAuthOptions(manifest.auth);
|
|
25
|
+
setDefaultRouteBasePath(normalizeRouteBasePath(manifest.basePath));
|
|
26
|
+
for (const record of manifest.records) {
|
|
27
|
+
insertRecordSorted(record);
|
|
28
|
+
addRouteToStores({
|
|
29
|
+
path: record.path,
|
|
30
|
+
handler: record.handler,
|
|
31
|
+
namespace: record.options.namespace,
|
|
32
|
+
..."fallbackPrefix" in record && typeof record.fallbackPrefix === "string" ? { fallbackPrefix: record.fallbackPrefix } : {}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function createRouteRegistry(definition, options = {}) {
|
|
37
|
+
const previous = snapshotRouteState();
|
|
38
|
+
clearRouteState();
|
|
39
|
+
try {
|
|
40
|
+
setDefaultRouteAuthOptions(options.auth);
|
|
41
|
+
setDefaultRouteBasePath(normalizeRouteBasePath(options.basePath));
|
|
42
|
+
definition();
|
|
43
|
+
const manifest = createRouteManifest();
|
|
44
|
+
return Object.freeze({
|
|
45
|
+
manifest,
|
|
46
|
+
routes: getRouteList()
|
|
47
|
+
});
|
|
48
|
+
} finally {
|
|
49
|
+
restoreRouteState(previous);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { getExecutionModel as i, createRouteRegistry as n, assertExecutionModel as r, _applyManifest as t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
3
|
-
import { r as executeComponent } from "./component-internal-
|
|
3
|
+
import { r as executeComponent } from "./component-internal-uVCJAre6.js";
|
|
4
4
|
import { t as cleanupReadableSubscriptionSources } from "./readable-B5NtV7V0.js";
|
|
5
5
|
import { n as cleanupComponentGeneration, t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
|
|
6
6
|
import { i as drainLifecycleCommitErrors, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch } from "./lifecycle-batch-Dfpid9-A.js";
|
|
7
7
|
import { _ as teardownNodeSubtree } from "./cleanup-c837KVij.js";
|
|
8
|
-
import {
|
|
9
|
-
import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-
|
|
10
|
-
import { r as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
|
|
9
|
+
import { I as lockRouteRegistration, o as addRouteBasePath, r as computeRouteActivityMatches, y as getActiveRouteBasePath } from "./route-matching-DqULzZtC.js";
|
|
10
|
+
import { a as resolveRouteRequest, i as hasRouteRenderData, n as getRouteRenderContext, r as getRouteRenderData, u as withoutRouteHydrationMetadata } from "./resolution-BRmiFYvw.js";
|
|
11
|
+
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-BnkhdIXm.js";
|
|
12
|
+
import { r as getDefaultPortalHost, t as clearRegisteredDefaultPortalForInstance } from "./default-portal-runtime-DvMvWJVp.js";
|
|
13
13
|
//#region src/router/navigation-registry.ts
|
|
14
14
|
let currentInstance = null;
|
|
15
15
|
let currentPathname = "/";
|
|
@@ -423,7 +423,7 @@ function wrapRootRouteHandler(componentFn, cspNonce) {
|
|
|
423
423
|
if (isPromiseLike(out)) throw new Error("Async components are not supported. Components must return synchronously.");
|
|
424
424
|
const portalVNode = {
|
|
425
425
|
$$typeof: ELEMENT_TYPE,
|
|
426
|
-
type:
|
|
426
|
+
type: getDefaultPortalHost(),
|
|
427
427
|
props: { __askrAutoDefaultPortal: true },
|
|
428
428
|
key: "__default_portal"
|
|
429
429
|
};
|
|
@@ -671,7 +671,7 @@ function cleanupDeferredRouteInstance(deferred) {
|
|
|
671
671
|
}
|
|
672
672
|
function remountResolvedRoute(instance, resolved, pathname, href, existingSnapshot) {
|
|
673
673
|
const deferredCleanup = existingSnapshot ?? captureDeferredRouteCleanup(instance);
|
|
674
|
-
|
|
674
|
+
clearRegisteredDefaultPortalForInstance(instance);
|
|
675
675
|
instance.fn = wrapRootRouteHandler(bindResolvedRouteHandler(resolved), instance._cspNonce);
|
|
676
676
|
instance.props = {};
|
|
677
677
|
instance._ownershipGeneration = {};
|
|
@@ -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-CnVeSvJz.js";
|
|
2
2
|
//#region src/common/telemetry.ts
|
|
3
3
|
function withTelemetry(span, fields, work) {
|
|
4
4
|
return span ? span(fields, work) : work();
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
//#region src/common/ssr-errors.ts
|
|
2
|
+
/**
|
|
3
|
+
* Common call contracts: SSR error types
|
|
4
|
+
*/
|
|
5
|
+
var SSRDataMissingError = class SSRDataMissingError extends Error {
|
|
6
|
+
constructor(message = "Server-side rendering requires all data to be available synchronously. This component attempted to use async data during SSR.") {
|
|
7
|
+
super(message);
|
|
8
|
+
this.code = "SSR_DATA_MISSING";
|
|
9
|
+
this.name = "SSRDataMissingError";
|
|
10
|
+
Object.setPrototypeOf(this, SSRDataMissingError.prototype);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/common/page-render-envelope.ts
|
|
15
|
+
const PAGE_RENDER_ENVELOPE_VERSION = 1;
|
|
16
|
+
function ownedRecord(value) {
|
|
17
|
+
return Object.freeze({ ...value });
|
|
18
|
+
}
|
|
19
|
+
function createPageRenderEnvelope(input = {}) {
|
|
20
|
+
return Object.freeze({
|
|
21
|
+
version: PAGE_RENDER_ENVELOPE_VERSION,
|
|
22
|
+
resources: ownedRecord(input.resources),
|
|
23
|
+
route: input.route,
|
|
24
|
+
framework: ownedRecord(input.framework)
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function isPageRenderEnvelope(value) {
|
|
28
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
29
|
+
const candidate = value;
|
|
30
|
+
return candidate.version === PAGE_RENDER_ENVELOPE_VERSION && Boolean(candidate.resources && typeof candidate.resources === "object" && !Array.isArray(candidate.resources)) && Boolean(candidate.framework && typeof candidate.framework === "object" && !Array.isArray(candidate.framework));
|
|
31
|
+
}
|
|
32
|
+
function pageRenderEnvelope(value, fallback = {}) {
|
|
33
|
+
if (isPageRenderEnvelope(value)) return value;
|
|
34
|
+
return createPageRenderEnvelope({
|
|
35
|
+
...fallback,
|
|
36
|
+
route: value ?? fallback.route
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function replacePageRoute(value, route) {
|
|
40
|
+
const current = pageRenderEnvelope(value);
|
|
41
|
+
return createPageRenderEnvelope({
|
|
42
|
+
resources: current.resources,
|
|
43
|
+
route,
|
|
44
|
+
framework: current.framework
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function withPageFramework(value, framework) {
|
|
48
|
+
const current = pageRenderEnvelope(value);
|
|
49
|
+
return createPageRenderEnvelope({
|
|
50
|
+
resources: current.resources,
|
|
51
|
+
route: current.route,
|
|
52
|
+
framework
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function isEmptyPageRenderEnvelope(value) {
|
|
56
|
+
return value.route === void 0 && Object.keys(value.resources).length === 0 && Object.keys(value.framework).length === 0;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/common/render-context.ts
|
|
60
|
+
let provider = { getRenderContext() {
|
|
61
|
+
return null;
|
|
62
|
+
} };
|
|
63
|
+
let hydrationRenderData = null;
|
|
64
|
+
let hydrationKeyCounter = 0;
|
|
65
|
+
let hydrationVerificationDepth = 0;
|
|
66
|
+
const RESOURCE_VERIFICATION_SNAPSHOTS = "rv";
|
|
67
|
+
function configureRenderContextProvider(nextProvider) {
|
|
68
|
+
provider = nextProvider;
|
|
69
|
+
}
|
|
70
|
+
function getActiveRenderContext() {
|
|
71
|
+
return provider.getRenderContext();
|
|
72
|
+
}
|
|
73
|
+
/** Register request-local CSS produced during SSR without importing the SSR renderer in clients. */
|
|
74
|
+
function registerSSRStyle(id, cssText) {
|
|
75
|
+
const context = getActiveRenderContext();
|
|
76
|
+
if (!context?.ssrStyles) return;
|
|
77
|
+
const safeCssText = cssText.replace(/<\/style/gi, "<\\/style");
|
|
78
|
+
const existing = context.ssrStyles.get(id);
|
|
79
|
+
if (existing && existing.cssText !== safeCssText) throw new RangeError(`SSR style registration collision for ${JSON.stringify(id)}.`);
|
|
80
|
+
context.ssrStyles.set(id, {
|
|
81
|
+
id,
|
|
82
|
+
cssText: safeCssText
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function getCurrentRenderData() {
|
|
86
|
+
return getActiveRenderContext()?.renderData ?? hydrationRenderData;
|
|
87
|
+
}
|
|
88
|
+
function getNextRenderKey() {
|
|
89
|
+
const ctx = getActiveRenderContext();
|
|
90
|
+
if (ctx) return `r:${ctx.keyCounter++}`;
|
|
91
|
+
if (hydrationRenderData) return `r:${hydrationKeyCounter++}`;
|
|
92
|
+
return "r:0";
|
|
93
|
+
}
|
|
94
|
+
function startHydrationRenderPhase(data) {
|
|
95
|
+
hydrationRenderData = data;
|
|
96
|
+
hydrationKeyCounter = 0;
|
|
97
|
+
}
|
|
98
|
+
function stopHydrationRenderPhase() {
|
|
99
|
+
hydrationRenderData = null;
|
|
100
|
+
hydrationKeyCounter = 0;
|
|
101
|
+
}
|
|
102
|
+
/** @internal Run one synchronous client-side markup verification pass. */
|
|
103
|
+
function withHydrationVerificationRender(fn) {
|
|
104
|
+
hydrationVerificationDepth += 1;
|
|
105
|
+
try {
|
|
106
|
+
return fn();
|
|
107
|
+
} finally {
|
|
108
|
+
hydrationVerificationDepth -= 1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** @internal Whether resources should reflect their server pending snapshot. */
|
|
112
|
+
function isHydrationVerificationRender() {
|
|
113
|
+
return hydrationVerificationDepth > 0;
|
|
114
|
+
}
|
|
115
|
+
/** @internal Read a server-captured resource branch without invoking its loader. */
|
|
116
|
+
function getResourceVerificationSnapshot(key) {
|
|
117
|
+
const snapshots = getCurrentRenderData()?.framework[RESOURCE_VERIFICATION_SNAPSHOTS];
|
|
118
|
+
if (!snapshots || typeof snapshots !== "object" || Array.isArray(snapshots)) return null;
|
|
119
|
+
if (!Object.prototype.hasOwnProperty.call(snapshots, key)) return null;
|
|
120
|
+
const snapshot = snapshots[key];
|
|
121
|
+
if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot)) return null;
|
|
122
|
+
const candidate = snapshot;
|
|
123
|
+
return typeof candidate.pending === "boolean" ? {
|
|
124
|
+
value: candidate.value,
|
|
125
|
+
pending: candidate.pending
|
|
126
|
+
} : null;
|
|
127
|
+
}
|
|
128
|
+
/** @internal Preserve a JSON-safe server branch solely for markup verification. */
|
|
129
|
+
function recordResourceVerificationSnapshot(key, snapshot) {
|
|
130
|
+
const ctx = getActiveRenderContext();
|
|
131
|
+
const envelope = ctx?.hydrationData;
|
|
132
|
+
if (!ctx || !envelope) return;
|
|
133
|
+
const current = envelope.framework[RESOURCE_VERIFICATION_SNAPSHOTS];
|
|
134
|
+
const snapshots = current && typeof current === "object" && !Array.isArray(current) ? current : {};
|
|
135
|
+
ctx.hydrationData = withPageFramework(envelope, {
|
|
136
|
+
...envelope.framework,
|
|
137
|
+
[RESOURCE_VERIFICATION_SNAPSHOTS]: {
|
|
138
|
+
...snapshots,
|
|
139
|
+
[key]: snapshot
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function startRenderPhase(data) {
|
|
144
|
+
const ctx = getActiveRenderContext();
|
|
145
|
+
if (ctx) {
|
|
146
|
+
ctx.renderData = data ?? null;
|
|
147
|
+
ctx.keyCounter = 0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function stopRenderPhase() {
|
|
151
|
+
const ctx = getActiveRenderContext();
|
|
152
|
+
if (ctx) {
|
|
153
|
+
ctx.renderData = null;
|
|
154
|
+
ctx.keyCounter = 0;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function throwSSRDataMissing() {
|
|
158
|
+
throw new SSRDataMissingError();
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
export { isPageRenderEnvelope as _, getResourceVerificationSnapshot as a, withPageFramework as b, registerSSRStyle as c, stopHydrationRenderPhase as d, stopRenderPhase as f, isEmptyPageRenderEnvelope as g, createPageRenderEnvelope as h, getNextRenderKey as i, startHydrationRenderPhase as l, withHydrationVerificationRender as m, getActiveRenderContext as n, isHydrationVerificationRender as o, throwSSRDataMissing as p, getCurrentRenderData as r, recordResourceVerificationSnapshot as s, configureRenderContextProvider as t, startRenderPhase as u, pageRenderEnvelope as v, SSRDataMissingError as x, replacePageRoute as y };
|
|
@@ -4,15 +4,15 @@ import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as config
|
|
|
4
4
|
import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
|
|
5
5
|
import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
|
|
6
6
|
import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
|
|
7
|
-
import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-
|
|
7
|
+
import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-uVCJAre6.js";
|
|
8
8
|
import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
|
|
9
9
|
import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
|
|
10
|
-
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-
|
|
10
|
+
import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-Dxf3iZ9E.js";
|
|
11
11
|
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
|
|
12
12
|
import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-c837KVij.js";
|
|
13
|
-
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
14
13
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
15
|
-
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-
|
|
14
|
+
import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-CUscoNF1.js";
|
|
15
|
+
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
16
16
|
//#region src/runtime/error-boundary.ts
|
|
17
17
|
function createBoundaryReset(instance) {
|
|
18
18
|
return () => {
|
|
@@ -722,6 +722,9 @@ function applyDangerousInnerHTMLValue(el, value) {
|
|
|
722
722
|
const html = value.__html;
|
|
723
723
|
el.innerHTML = html === null || html === void 0 ? "" : String(html);
|
|
724
724
|
}
|
|
725
|
+
function isAriaAttribute(key) {
|
|
726
|
+
return key.length > 5 && key.slice(0, 5).toLowerCase() === "aria-";
|
|
727
|
+
}
|
|
725
728
|
function applyFormControlProp(el, key, value, tagName) {
|
|
726
729
|
if (key === "value") {
|
|
727
730
|
const stringValue = String(value);
|
|
@@ -824,7 +827,7 @@ function applyStaticScalarPropsToElement(el, props, tagName) {
|
|
|
824
827
|
for (const key in props) {
|
|
825
828
|
if (isSkippedProp(key)) continue;
|
|
826
829
|
const value = props[key];
|
|
827
|
-
if (value === void 0 || value === null || value === false) continue;
|
|
830
|
+
if (value === void 0 || value === null || value === false && !isAriaAttribute(key)) continue;
|
|
828
831
|
if (key === "class" || key === "className") writeElementClassName(el, String(value));
|
|
829
832
|
else if (key === "style") applyStylePropValue(el, value);
|
|
830
833
|
else if (key === "value" || key === "checked") applyFormControlProp(el, key, value, tagName);
|
|
@@ -881,7 +884,7 @@ function applyClassPropValue(el, value, previousValue, descriptor) {
|
|
|
881
884
|
}
|
|
882
885
|
function applyScalarPropValue(el, key, value, tagName, previousValue, descriptor) {
|
|
883
886
|
if (key === "dangerouslySetInnerHTML" && !isDangerousInnerHTMLPayload(value)) return;
|
|
884
|
-
if (value === void 0 || value === null || value === false) {
|
|
887
|
+
if (value === void 0 || value === null || value === false && !isAriaAttribute(key)) {
|
|
885
888
|
if (key === "class" || key === "className") {
|
|
886
889
|
const previousTokens = descriptor?.lastClassTokens;
|
|
887
890
|
if (previousTokens && previousTokens.length > 0) el.classList.remove(...previousTokens);
|
|
@@ -910,7 +913,7 @@ function removeStaleAttributes(el, vnode, props) {
|
|
|
910
913
|
if (isSkippedProp(propName)) continue;
|
|
911
914
|
if (parseEventName(propName)) continue;
|
|
912
915
|
const value = props[propName];
|
|
913
|
-
if (value === void 0 || value === null || value === false) continue;
|
|
916
|
+
if (value === void 0 || value === null || value === false && !isAriaAttribute(propName)) continue;
|
|
914
917
|
desiredAttributes.add(getRenderedAttributeName(el, propName));
|
|
915
918
|
}
|
|
916
919
|
for (const attribute of Array.from(el.attributes)) if (!desiredAttributes.has(getRenderedAttributeName(el, attribute.name))) removeRenderedAttribute(el, attribute.name);
|