@askrjs/askr 0.0.86 → 0.0.88
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 +1 -1
- package/dist/{activity-BvgvaMZA.js → activity-C9naVZwy.js} +3 -2
- package/dist/{activity-B1I5HJQI.d.ts → activity-VMb7aJVx.d.ts} +1 -1
- package/dist/benchmark.d.ts +1 -1
- package/dist/benchmark.js +6 -6
- package/dist/boot/index.d.ts +4 -4
- package/dist/boot/index.js +1 -1
- package/dist/{boot-CViTpUiB.js → boot-BVHzYQz8.js} +11 -10
- package/dist/{component-internal-DcrLymUJ.js → component-internal-uVCJAre6.js} +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/control/index.d.ts +1 -1
- package/dist/control/index.js +1 -1
- package/dist/{control-BjYBlytA.d.ts → control-CsGs2bLS.d.ts} +1 -1
- package/dist/{control-oLADku43.js → control-DlwTrXBN.js} +1 -1
- package/dist/{control-DhUZU4_V.d.ts → control-x8iehxf7.d.ts} +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-DGrD3-qA.js → data-CXZ-FOa7.js} +5 -2
- package/dist/{data-runtime-Ck3tJDDQ.js → data-runtime-CnVeSvJz.js} +6 -4
- package/dist/{deferred-nleQtdfY.js → deferred-BCgoep1C.js} +5 -4
- package/dist/{for-internal-B_mnQhan.js → for-internal-Be7x2TFd.js} +9 -5
- package/dist/foundations/icon/index.d.ts +2 -2
- package/dist/foundations/icon/index.js +3 -2
- package/dist/foundations/index.d.ts +2 -2
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/interactions/index.js +1 -1
- package/dist/foundations/state/index.d.ts +1 -1
- package/dist/foundations/structures/index.d.ts +2 -2
- package/dist/foundations/structures/index.js +1 -1
- package/dist/{index-r-nt13FE.d.ts → index-BYWsbogt.d.ts} +2 -2
- package/dist/{index-DflhL1h8.d.ts → index-DODUjRdZ.d.ts} +3 -3
- package/dist/{index-5S-fi2xy.d.ts → index-SGxMZLAc.d.ts} +3 -0
- package/dist/{index-pIgGaXvS.d.ts → index-yDjeTqs5.d.ts} +4 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/{interactions-DgGQyUQv.js → interactions-CWkNEq_C.js} +2 -1
- package/dist/{jsx-Dvr2SGRG.d.ts → jsx-BYXe_Nnk.d.ts} +18 -0
- package/dist/jsx-dev-runtime.d.ts +3 -3
- package/dist/jsx-runtime-BqhMEuT4.d.ts +2 -0
- package/dist/{jsx-runtime-Cr1jspx9.d.ts → jsx-runtime-LHh5tcTe.d.ts} +3 -3
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/{lifecycle-operations-BrYrBsXY.js → lifecycle-operations-DTO93Hrl.js} +1 -1
- package/dist/{navigate-BwAPbpCb.js → navigate-Bz6hh2JB.js} +4 -4
- package/dist/{navigate-NyIjQUwI.d.ts → navigate-kJ_EW8Y8.d.ts} +1 -1
- package/dist/{query-registry-CPW_6nwF.js → query-registry-p_0kkieE.js} +1 -1
- package/dist/{renderer-D9DL9R2D.js → renderer-5bjf5dIf.js} +53 -12
- package/dist/{resolution-YHwi4Bav.js → resolution-BRmiFYvw.js} +3 -3
- package/dist/{resource-operation-ys6eDoRJ.js → resource-operation-B94oj6xT.js} +1 -1
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +4 -4
- package/dist/router/index.d.ts +6 -6
- package/dist/router/index.js +17 -16
- package/dist/{selector-Ck_Pp9av.js → selector-BLNkRZ2i.js} +2 -1
- package/dist/ssg/index.d.ts +2 -2
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.d.ts +4 -4
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-B98593qJ.js → ssr-D3hUAWyQ.js} +16 -11
- package/dist/{structures-DsOm-clq.js → structures--NKfTh3j.js} +2 -1
- package/dist/testing/index.d.ts +18 -4
- package/dist/testing/index.js +41 -3
- package/dist/{types-C9YcqVpk.d.ts → types-CsPtBGWb.d.ts} +1 -1
- package/dist/{verify-hydration-ww1dgwea.js → verify-hydration-Bd1kGLmH.js} +1 -1
- package/package.json +12 -10
- package/dist/jsx-runtime-C-oIHX9X.d.ts +0 -2
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-
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-5bjf5dIf.js";
|
|
8
8
|
import { c as registerSSRStyle } from "./render-context-D0Hoj9dW.js";
|
|
9
9
|
import { t as state } from "./state-DCjONcHK.js";
|
|
10
|
-
import { t as selector } from "./selector-
|
|
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-
|
|
10
|
+
import { t as selector } from "./selector-BLNkRZ2i.js";
|
|
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-DlwTrXBN.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();
|
|
@@ -260,7 +260,8 @@ function applyInteractionPolicy({ isNative, disabled, onPress, ref }) {
|
|
|
260
260
|
* Policy props MUST take precedence to enforce invariants.
|
|
261
261
|
*/
|
|
262
262
|
function mergeInteractionProps(childProps, policyProps, userProps) {
|
|
263
|
-
const
|
|
263
|
+
const mergedUserChild = userProps ? mergeProps(userProps, childProps) : childProps;
|
|
264
|
+
const out = mergeProps(policyProps, mergedUserChild);
|
|
264
265
|
for (const k in out) {
|
|
265
266
|
if (!k.startsWith("on")) continue;
|
|
266
267
|
const policyHandler = policyProps?.[k];
|
|
@@ -117,10 +117,16 @@ type ForbiddenLayoutOnlyProps = {
|
|
|
117
117
|
htmlFor?: never;
|
|
118
118
|
label?: never;
|
|
119
119
|
method?: never;
|
|
120
|
+
maxLength?: never;
|
|
121
|
+
maxlength?: never;
|
|
122
|
+
minLength?: never;
|
|
123
|
+
minlength?: never;
|
|
120
124
|
multiple?: never;
|
|
121
125
|
name?: never;
|
|
122
126
|
noValidate?: never;
|
|
123
127
|
placeholder?: never;
|
|
128
|
+
readOnly?: never;
|
|
129
|
+
readonly?: never;
|
|
124
130
|
rel?: never;
|
|
125
131
|
required?: never;
|
|
126
132
|
rowSpan?: never;
|
|
@@ -183,8 +189,14 @@ interface InputIntrinsicProps extends IntrinsicProps {
|
|
|
183
189
|
autocomplete?: ReactiveProp<IntrinsicTextValue>;
|
|
184
190
|
checked?: ReactiveProp<IntrinsicBooleanValue>;
|
|
185
191
|
disabled?: ReactiveProp<IntrinsicBooleanValue>;
|
|
192
|
+
maxLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
193
|
+
maxlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
194
|
+
minLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
195
|
+
minlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
186
196
|
name?: ReactiveProp<IntrinsicTextValue>;
|
|
187
197
|
placeholder?: ReactiveProp<IntrinsicTextValue>;
|
|
198
|
+
readOnly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
199
|
+
readonly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
188
200
|
required?: ReactiveProp<IntrinsicBooleanValue>;
|
|
189
201
|
type?: ReactiveProp<IntrinsicTextValue>;
|
|
190
202
|
value?: ReactiveProp<IntrinsicFormValue>;
|
|
@@ -247,8 +259,14 @@ interface TextareaIntrinsicProps extends IntrinsicProps {
|
|
|
247
259
|
autocomplete?: ReactiveProp<IntrinsicTextValue>;
|
|
248
260
|
cols?: ReactiveProp<IntrinsicNumberValue>;
|
|
249
261
|
disabled?: ReactiveProp<IntrinsicBooleanValue>;
|
|
262
|
+
maxLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
263
|
+
maxlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
264
|
+
minLength?: ReactiveProp<IntrinsicNumberValue>;
|
|
265
|
+
minlength?: ReactiveProp<IntrinsicNumberValue>;
|
|
250
266
|
name?: ReactiveProp<IntrinsicTextValue>;
|
|
251
267
|
placeholder?: ReactiveProp<IntrinsicTextValue>;
|
|
268
|
+
readOnly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
269
|
+
readonly?: ReactiveProp<IntrinsicBooleanValue>;
|
|
252
270
|
required?: ReactiveProp<IntrinsicBooleanValue>;
|
|
253
271
|
rows?: ReactiveProp<IntrinsicNumberValue>;
|
|
254
272
|
value?: ReactiveProp<IntrinsicTextValue>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { a as IntrinsicFallbackProps, i as JSXElementType, n as JSXComponent, o as KnownIntrinsicElementProps, r as JSXElement, s as Props, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
|
|
3
|
+
import "./types-CsPtBGWb.js";
|
|
4
4
|
//#region src/jsx/jsx-dev-runtime.d.ts
|
|
5
5
|
declare namespace JSX {
|
|
6
6
|
type ElementType = string | symbol | ((props: never) => unknown);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-
|
|
2
|
-
import { t as EagerControlPrimitive } from "./control-
|
|
3
|
-
import "./types-
|
|
1
|
+
import { a as IntrinsicFallbackProps, o as KnownIntrinsicElementProps, r as JSXElement, s as Props } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { t as EagerControlPrimitive } from "./control-CsGs2bLS.js";
|
|
3
|
+
import "./types-CsPtBGWb.js";
|
|
4
4
|
//#region src/jsx/jsx-runtime.d.ts
|
|
5
5
|
declare namespace JSX {
|
|
6
6
|
type ElementType = string | symbol | ((props: never) => unknown);
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-
|
|
2
|
-
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-
|
|
1
|
+
import { i as JSXElementType, n as JSXComponent, r as JSXElement, t as Fragment } from "./jsx-BYXe_Nnk.js";
|
|
2
|
+
import { i as jsxs, n as jsx, r as jsxDEV, t as JSX } from "./jsx-runtime-LHh5tcTe.js";
|
|
3
3
|
export { Fragment, JSX, type JSXComponent, type JSXElement, type JSXElementType, jsx, jsxDEV, jsxs };
|
|
@@ -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) {
|
|
@@ -1,14 +1,14 @@
|
|
|
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 { t as CspNonceScope } from "./csp-nonce-
|
|
8
|
+
import { t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
|
|
9
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-
|
|
11
|
-
import { a as clearStagedAppRenderRouteLocation, i as syncCurrentRouteSnapshot, o as createAppRenderRuntime, s as stageAppRenderRouteLocation } from "./activity-
|
|
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-C9naVZwy.js";
|
|
12
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;
|
|
@@ -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();
|
|
@@ -4,14 +4,14 @@ 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-Be7x2TFd.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
13
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
14
|
-
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
15
|
import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
|
|
16
16
|
//#region src/runtime/error-boundary.ts
|
|
17
17
|
function createBoundaryReset(instance) {
|
|
@@ -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);
|
|
@@ -3476,8 +3479,9 @@ function createReactiveScalarChildCleanupEntry(el, source, host) {
|
|
|
3476
3479
|
}
|
|
3477
3480
|
function setupReactiveChildBoundary(el, childFn, host) {
|
|
3478
3481
|
let currentChildFn = childFn;
|
|
3482
|
+
const parentInstance = getCurrentInstance();
|
|
3479
3483
|
const entry = {
|
|
3480
|
-
scope: createChildScope(
|
|
3484
|
+
scope: createChildScope(parentInstance, `__reactive-child__:${reactiveChildScopeId += 1}`, () => {
|
|
3481
3485
|
syncReactiveChildExpectedNodes(el, commitReactiveChildBoundaryEntryNodes(el, entry, host));
|
|
3482
3486
|
}),
|
|
3483
3487
|
nodes: []
|
|
@@ -4869,9 +4873,7 @@ function commitForStateBoundaryChildrenImpl(parent, forState, childrenVNodes, ru
|
|
|
4869
4873
|
case "SWAP":
|
|
4870
4874
|
commitSwap();
|
|
4871
4875
|
break;
|
|
4872
|
-
default:
|
|
4873
|
-
commitReorder();
|
|
4874
|
-
break;
|
|
4876
|
+
default: commitReorder();
|
|
4875
4877
|
}
|
|
4876
4878
|
if (!removedBoundaryConsumed) removeForBoundaryNodes(parent, forState.lastRemovedNodes, { teardown: false });
|
|
4877
4879
|
syncKeyedMapFromForState(parent, forState, forState.lastCommitStrategy, forState.lastRemovedNodes);
|
|
@@ -5036,6 +5038,44 @@ function unwrapStagingHost(staging, parent, restoreFocus) {
|
|
|
5036
5038
|
function createAttributeFreeStagingHost(parent) {
|
|
5037
5039
|
return parent.ownerDocument.createElementNS(parent.namespaceURI, parent.localName);
|
|
5038
5040
|
}
|
|
5041
|
+
function migrateAdoptedRangeOwners(sourceNode, rangeHost, owners) {
|
|
5042
|
+
const sourceHost = sourceNode;
|
|
5043
|
+
const sourceHadInstanceList = Object.prototype.hasOwnProperty.call(sourceHost, "__ASKR_INSTANCES");
|
|
5044
|
+
const sourceHadPrimaryInstance = Object.prototype.hasOwnProperty.call(sourceHost, "__ASKR_INSTANCE");
|
|
5045
|
+
const sourceInstanceList = sourceHost.__ASKR_INSTANCES?.slice();
|
|
5046
|
+
const sourcePrimaryInstance = sourceHost.__ASKR_INSTANCE;
|
|
5047
|
+
const previousBindings = /* @__PURE__ */ new Map();
|
|
5048
|
+
for (const owner of owners) if (owner.target === sourceNode || owner._placeholder === sourceNode) {
|
|
5049
|
+
previousBindings.set(owner, {
|
|
5050
|
+
target: owner.target,
|
|
5051
|
+
placeholder: owner._placeholder
|
|
5052
|
+
});
|
|
5053
|
+
owner.target = null;
|
|
5054
|
+
owner._placeholder = rangeHost;
|
|
5055
|
+
}
|
|
5056
|
+
const sourceInstances = new Set(sourceHost.__ASKR_INSTANCES ?? []);
|
|
5057
|
+
if (sourcePrimaryInstance) sourceInstances.add(sourcePrimaryInstance);
|
|
5058
|
+
const remainingSourceInstances = Array.from(sourceInstances).filter((owner) => !owners.has(owner));
|
|
5059
|
+
if (remainingSourceInstances.length > 0) {
|
|
5060
|
+
sourceHost.__ASKR_INSTANCES = remainingSourceInstances;
|
|
5061
|
+
sourceHost.__ASKR_INSTANCE = remainingSourceInstances[0];
|
|
5062
|
+
} else {
|
|
5063
|
+
delete sourceHost.__ASKR_INSTANCES;
|
|
5064
|
+
delete sourceHost.__ASKR_INSTANCE;
|
|
5065
|
+
}
|
|
5066
|
+
rangeHost.__ASKR_INSTANCES = Array.from(owners);
|
|
5067
|
+
rangeHost.__ASKR_INSTANCE = rangeHost.__ASKR_INSTANCES[0];
|
|
5068
|
+
return () => {
|
|
5069
|
+
if (sourceHadInstanceList) sourceHost.__ASKR_INSTANCES = sourceInstanceList;
|
|
5070
|
+
else delete sourceHost.__ASKR_INSTANCES;
|
|
5071
|
+
if (sourceHadPrimaryInstance) sourceHost.__ASKR_INSTANCE = sourcePrimaryInstance;
|
|
5072
|
+
else delete sourceHost.__ASKR_INSTANCE;
|
|
5073
|
+
for (const [owner, binding] of previousBindings) {
|
|
5074
|
+
owner.target = binding.target;
|
|
5075
|
+
owner._placeholder = binding.placeholder;
|
|
5076
|
+
}
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5039
5079
|
function isAutomaticPortalHost(node) {
|
|
5040
5080
|
const host = node;
|
|
5041
5081
|
const instances = new Set(host.__ASKR_INSTANCES ?? []);
|
|
@@ -5090,12 +5130,12 @@ function adoptHydratedComponentRange(existingHost, instance, result, endExclusiv
|
|
|
5090
5130
|
const host = start;
|
|
5091
5131
|
const owners = new Set(retainedInstances);
|
|
5092
5132
|
owners.add(instance);
|
|
5093
|
-
|
|
5094
|
-
host.__ASKR_INSTANCES = Array.from(owners);
|
|
5133
|
+
const restoreMigratedOwners = migrateAdoptedRangeOwners(existingHost, host, owners);
|
|
5095
5134
|
instance.target = null;
|
|
5096
5135
|
instance._placeholder = start;
|
|
5097
5136
|
mountInstanceInline(instance, null);
|
|
5098
5137
|
const registered = registerLifecycleTransaction({}, () => {}, () => {
|
|
5138
|
+
restoreMigratedOwners();
|
|
5099
5139
|
start.parentNode?.removeChild(start);
|
|
5100
5140
|
end.parentNode?.removeChild(end);
|
|
5101
5141
|
});
|
|
@@ -5103,6 +5143,7 @@ function adoptHydratedComponentRange(existingHost, instance, result, endExclusiv
|
|
|
5103
5143
|
if (!syncComponentFragmentRange(host, instance, result, forceChildrenUpdate)) throw new Error("[askr] Failed to adopt hydrated component range.");
|
|
5104
5144
|
} catch (error) {
|
|
5105
5145
|
if (!registered) {
|
|
5146
|
+
restoreMigratedOwners();
|
|
5106
5147
|
start.remove();
|
|
5107
5148
|
end.remove();
|
|
5108
5149
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
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-uVCJAre6.js";
|
|
3
3
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
|
|
4
4
|
import { b as withPageFramework, n as getActiveRenderContext, y as replacePageRoute } from "./render-context-D0Hoj9dW.js";
|
|
5
|
-
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-
|
|
6
|
-
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-
|
|
5
|
+
import { i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-CUscoNF1.js";
|
|
6
|
+
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-p_0kkieE.js";
|
|
7
7
|
import { c as removeRouteBasePath, i as getMatchingRouteRecord, l as buildRouteContext, o as addRouteBasePath, s as normalizeRouteBasePath, u as buildRouteContextBase, v as getActiveRouteAuthOptions } from "./route-matching-DqULzZtC.js";
|
|
8
8
|
//#region src/router/lazy.ts
|
|
9
9
|
const pendingLazy = /* @__PURE__ */ new Set();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane, v as logger } from "./access-Dpfoi4cA.js";
|
|
2
2
|
import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
3
|
-
import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-
|
|
3
|
+
import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-uVCJAre6.js";
|
|
4
4
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
6
6
|
import { a as getResourceVerificationSnapshot, i as getNextRenderKey, n as getActiveRenderContext, o as isHydrationVerificationRender, p as throwSSRDataMissing, r as getCurrentRenderData, s as recordResourceVerificationSnapshot, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ut as getSignal } from "../index-
|
|
2
|
-
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { ut as getSignal } from "../index-yDjeTqs5.js";
|
|
2
|
+
import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-VMb7aJVx.js";
|
|
3
3
|
//#region src/runtime/resource-operation.d.ts
|
|
4
4
|
interface ResourceResult<T> {
|
|
5
5
|
value: T | null;
|
package/dist/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as enqueueRuntimeLane } from "../access-Dpfoi4cA.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.js";
|
|
3
|
-
import { a as registerCommitOperation } from "../component-internal-
|
|
4
|
-
import { t as resource } from "../resource-operation-
|
|
5
|
-
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-
|
|
6
|
-
import { n as onRouteChange } from "../activity-
|
|
3
|
+
import { a as registerCommitOperation } from "../component-internal-uVCJAre6.js";
|
|
4
|
+
import { t as resource } from "../resource-operation-B94oj6xT.js";
|
|
5
|
+
import { a as task, i as routeActive, n as documentVisible, o as timer, r as on, s as windowFocused, t as capture } from "../lifecycle-operations-DTO93Hrl.js";
|
|
6
|
+
import { n as onRouteChange } from "../activity-C9naVZwy.js";
|
|
7
7
|
//#region src/runtime/stream-operation.ts
|
|
8
8
|
function toError(value) {
|
|
9
9
|
return value instanceof Error ? value : new Error(String(value));
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as RenderableChild } from "../control-
|
|
2
|
-
import { r as JSXElement, s as Props } from "../jsx-
|
|
3
|
-
import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-
|
|
4
|
-
import "../types-
|
|
5
|
-
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-
|
|
6
|
-
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-
|
|
1
|
+
import { u as RenderableChild } from "../control-x8iehxf7.js";
|
|
2
|
+
import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
|
|
3
|
+
import { A as RouteHandler, B as RouteQuery, C as Route, D as RouteContext, E as RouteComponent, F as RouteMode, G as RouteRegistryOptions, H as RouteRef, I as RouteOptions, J as RouteRequestResult, K as RouteRenderResult, L as RouteParams, M as RouteMatch, N as RouteMeta, O as RouteDefinition, P as RouteMetaSource, R as RoutePathParams, S as ParsedSegment, T as RouteAuthResolver, U as RouteRefSearch, V as RouteRecord, W as RouteRegistry, X as RouteSearchValue, Y as RouteSearch, Z as RouteSnapshot, _ as AccessRedirectStatus, b as PageHelperOptions, f as AccessAllowDecision, g as AccessRedirectDecision, h as AccessDenyStatus, j as RouteManifest, k as RouteDestination, m as AccessDenyDecision, p as AccessDecision, q as RouteRequestOptions, v as GroupHelperOptions, w as RouteAuthOptions, x as PageScopeRecord, y as LayoutScopeRecord, z as RoutePolicy } from "../index-yDjeTqs5.js";
|
|
4
|
+
import "../types-CsPtBGWb.js";
|
|
5
|
+
import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-kJ_EW8Y8.js";
|
|
6
|
+
import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-VMb7aJVx.js";
|
|
7
7
|
import { AuthContext, AuthContext as AuthContext$1, AuthRequirement, AuthRequirement as AuthRequirement$1 } from "@askrjs/auth";
|
|
8
8
|
import { ObjectSchema } from "@askrjs/schema";
|
|
9
9
|
//#region src/router/route-query.d.ts
|
package/dist/router/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
|
|
2
|
-
import { a as isSafeHref } from "../csp-nonce-
|
|
2
|
+
import { a as isSafeHref } from "../csp-nonce-CUscoNF1.js";
|
|
3
3
|
import { jsx } from "../jsx-runtime.js";
|
|
4
4
|
import { o as addRouteBasePath, y as getActiveRouteBasePath } from "../route-matching-DqULzZtC.js";
|
|
5
|
-
import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-
|
|
6
|
-
import { a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred } from "../resolution-
|
|
7
|
-
import { n as onRouteChange, t as currentRoute } from "../activity-
|
|
8
|
-
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-
|
|
5
|
+
import { a as group, c as route, i as fallback, n as resolveDeferredValues, o as index, r as routeData, s as page, t as Resolve } from "../deferred-BCgoep1C.js";
|
|
6
|
+
import { a as resolveRouteRequest, b as lazy, f as defer, g as Outlet, h as currentAuth, p as isDeferred } from "../resolution-BRmiFYvw.js";
|
|
7
|
+
import { n as onRouteChange, t as currentRoute } from "../activity-C9naVZwy.js";
|
|
8
|
+
import { a as serializeRouteMeta, c as getCurrentHref, d as parseTargetUrl, h as syncRegisteredRouteSnapshot, i as resolveRouteMeta, l as getRegisteredAppsSnapshot, m as syncAppRegistrationLocation, n as navigate, p as setCurrentRouteLocation, r as reconcileRouteMeta, s as saveScrollPosition, u as getWindowHref } from "../navigate-Bz6hh2JB.js";
|
|
9
9
|
import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
|
|
10
|
-
import { t as applyInteractionPolicy } from "../interactions-
|
|
10
|
+
import { t as applyInteractionPolicy } from "../interactions-CWkNEq_C.js";
|
|
11
11
|
//#region src/router/route-query.ts
|
|
12
12
|
function getRouteQueryHistoryMode(options) {
|
|
13
13
|
if (options.history) return options.history;
|
|
@@ -192,17 +192,18 @@ function Link({ href: suppliedHref, to, class: className, children, rel, target,
|
|
|
192
192
|
onPress?.(e);
|
|
193
193
|
onClick?.(e);
|
|
194
194
|
};
|
|
195
|
+
const props = mergeProps(interaction, {
|
|
196
|
+
...rest,
|
|
197
|
+
onClick: consumerActivation,
|
|
198
|
+
href,
|
|
199
|
+
class: className,
|
|
200
|
+
rel,
|
|
201
|
+
target,
|
|
202
|
+
"aria-current": ariaCurrent,
|
|
203
|
+
"aria-label": ariaLabel
|
|
204
|
+
});
|
|
195
205
|
return /* @__PURE__ */ jsx("a", {
|
|
196
|
-
...
|
|
197
|
-
...rest,
|
|
198
|
-
onClick: consumerActivation,
|
|
199
|
-
href,
|
|
200
|
-
class: className,
|
|
201
|
-
rel,
|
|
202
|
-
target,
|
|
203
|
-
"aria-current": ariaCurrent,
|
|
204
|
-
"aria-label": ariaLabel
|
|
205
|
-
}),
|
|
206
|
+
...props,
|
|
206
207
|
children
|
|
207
208
|
});
|
|
208
209
|
}
|
|
@@ -226,7 +226,8 @@ function createSelectorHook(instance, generation, store, hookIndex, source, equa
|
|
|
226
226
|
const record = selectorHook._record ?? ensureSelectorHookBinding(selectorHook);
|
|
227
227
|
const lane = selectorHook._lane;
|
|
228
228
|
if (!lane) throw new Error("selector() binding could not be established.");
|
|
229
|
-
|
|
229
|
+
const sourceRef = getCandidateSource(lane, candidate);
|
|
230
|
+
recordReadableRead(sourceRef);
|
|
230
231
|
const current = record._dirty || !record._hasValue ? recomputeSelectorSourceRecord(record, record._scheduled) : record._value;
|
|
231
232
|
return lane._equals(current, candidate);
|
|
232
233
|
};
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-
|
|
2
|
-
import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-
|
|
1
|
+
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, m as DocumentRenderer, p as DocumentRenderContext } from "../control-x8iehxf7.js";
|
|
2
|
+
import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-yDjeTqs5.js";
|
|
3
3
|
import { AuthRequirement } from "@askrjs/auth";
|
|
4
4
|
import "node:fs/promises";
|
|
5
5
|
//#region src/ssg/types.d.ts
|
package/dist/ssg/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../access-Dpfoi4cA.js";
|
|
2
2
|
import { n as createRouteRegistry } from "../manifest-D1P9uTlz.js";
|
|
3
3
|
import { o as addRouteBasePath } from "../route-matching-DqULzZtC.js";
|
|
4
|
-
import { c as route, n as resolveDeferredValues } from "../deferred-
|
|
5
|
-
import { c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-
|
|
4
|
+
import { c as route, n as resolveDeferredValues } from "../deferred-BCgoep1C.js";
|
|
5
|
+
import { c as prepareRouteHydrationData, t as bindResolvedRouteData, v as getRenderHandler, y as _preloadRouteHandler } from "../resolution-BRmiFYvw.js";
|
|
6
6
|
import { n as renderDocument } from "../ssr-DSHd_Q9K.js";
|
|
7
|
-
import { n as renderToString } from "../ssr-
|
|
7
|
+
import { n as renderToString } from "../ssr-D3hUAWyQ.js";
|
|
8
8
|
import * as fs from "node:fs/promises";
|
|
9
9
|
import * as pathModule from "node:path";
|
|
10
10
|
import * as os from "node:os";
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-
|
|
2
|
-
import { r as JSXElement, s as Props } from "../jsx-
|
|
3
|
-
import { A as RouteHandler, C as Route, J as RouteRequestResult, V as RouteRecord, W as RouteRegistry, g as AccessRedirectDecision, l as DeferredBoundaryRegistration, m as AccessDenyDecision, u as SSRPortalState, w as RouteAuthOptions } from "../index-
|
|
4
|
-
import { D as QueryPrefetchContext, _ as CoreTelemetry, n as ServerQueryRegistry, v as DataRuntime } from "../index-
|
|
1
|
+
import { _ as SSRStyleRegistrationValidation, f as DocumentRenderArgs, g as SSRStyleRegistration, h as SSRData, m as DocumentRenderer, p as DocumentRenderContext } from "../control-x8iehxf7.js";
|
|
2
|
+
import { r as JSXElement, s as Props } from "../jsx-BYXe_Nnk.js";
|
|
3
|
+
import { A as RouteHandler, C as Route, J as RouteRequestResult, V as RouteRecord, W as RouteRegistry, g as AccessRedirectDecision, l as DeferredBoundaryRegistration, m as AccessDenyDecision, u as SSRPortalState, w as RouteAuthOptions } from "../index-yDjeTqs5.js";
|
|
4
|
+
import { D as QueryPrefetchContext, _ as CoreTelemetry, n as ServerQueryRegistry, v as DataRuntime } from "../index-SGxMZLAc.js";
|
|
5
5
|
import { AuthContext } from "@askrjs/auth";
|
|
6
6
|
//#region src/common/page-render-envelope.d.ts
|
|
7
7
|
declare const PAGE_RENDER_ENVELOPE_VERSION: 1;
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { x as SSRDataMissingError } from "../render-context-D0Hoj9dW.js";
|
|
2
|
-
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-
|
|
2
|
+
import { a as renderResolvedToStringSync, c as createRenderContext, d as withRenderContextAsync, i as renderRouteRequestToString, l as getRenderContext, n as renderToString, o as renderToStringSync, r as renderRouteRequest, s as resolveRequest, t as renderToStream, u as withRenderContext } from "../ssr-D3hUAWyQ.js";
|
|
3
3
|
export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
|
|
@@ -3,18 +3,18 @@ import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
|
3
3
|
import { v as logger } from "./access-Dpfoi4cA.js";
|
|
4
4
|
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
|
|
5
5
|
import { i as isFragmentType, n as Fragment, t as ELEMENT_TYPE } from "./jsx-C3IECePB.js";
|
|
6
|
-
import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-
|
|
6
|
+
import { f as getExecutionContextFrame, h as markVNodeTreeWithContextFrame, l as callWithContext, n as createComponentInstance, p as getVNodeContextFrame } from "./component-internal-uVCJAre6.js";
|
|
7
7
|
import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
|
|
8
8
|
import { p as isPromiseLike } from "./lifecycle-batch-Dfpid9-A.js";
|
|
9
|
-
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-
|
|
9
|
+
import { _ as setControlBoundaryContextFrame, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-Be7x2TFd.js";
|
|
10
10
|
import { _ as isPageRenderEnvelope, f as stopRenderPhase$1, g as isEmptyPageRenderEnvelope, h as createPageRenderEnvelope, t as configureRenderContextProvider, u as startRenderPhase$1, x as SSRDataMissingError } from "./render-context-D0Hoj9dW.js";
|
|
11
11
|
import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
|
|
12
|
-
import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-
|
|
12
|
+
import { o as isUnsafeUrlAttribute, r as validateCspNonce, t as CspNonceScope } from "./csp-nonce-CUscoNF1.js";
|
|
13
13
|
import { n as SSR_PORTAL_HOST, t as SSR_PORTAL_ANCHOR } from "./portal-w3oQ6oQU.js";
|
|
14
|
-
import { t as createDataRuntime } from "./data-runtime-
|
|
15
|
-
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-
|
|
14
|
+
import { t as createDataRuntime } from "./data-runtime-CnVeSvJz.js";
|
|
15
|
+
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-p_0kkieE.js";
|
|
16
16
|
import { a as resolveRouteFromRoutes, c as removeRouteBasePath, s as normalizeRouteBasePath, t as _resolveRouteMatchFromRoutes } from "./route-matching-DqULzZtC.js";
|
|
17
|
-
import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-
|
|
17
|
+
import { a as resolveRouteRequest, d as DEFERRED_BOUNDARY, l as validateRouteHydrationData, o as getRouteHydrationMetadata, p as isDeferred } from "./resolution-BRmiFYvw.js";
|
|
18
18
|
import { n as disposeRegisteredDefaultPortalScope, r as getDefaultPortalHost } from "./default-portal-runtime-DvMvWJVp.js";
|
|
19
19
|
import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-DSHd_Q9K.js";
|
|
20
20
|
//#region src/ssr/escape.ts
|
|
@@ -309,7 +309,8 @@ function resolvePolicyAwareSSRRoute(opts, routeTable) {
|
|
|
309
309
|
for (let redirects = 0; redirects <= MAX_SSR_REDIRECTS; redirects += 1) {
|
|
310
310
|
const logicalHref = removeRouteBasePath(href, normalizeRouteBasePath(manifest.basePath));
|
|
311
311
|
if (logicalHref === void 0) throw new Error(`SSR: no route found for url: ${href}`);
|
|
312
|
-
const
|
|
312
|
+
const logicalUrl = new URL(logicalHref, "http://localhost");
|
|
313
|
+
const matched = _resolveRouteMatchFromRoutes(logicalUrl.pathname, routeTable);
|
|
313
314
|
if (!matched) throw new Error(`SSR: no route found for url: ${href}`);
|
|
314
315
|
const resolved = getRouteRequestResultSync(resolveRouteRequest(href, {
|
|
315
316
|
registry: opts.registry,
|
|
@@ -350,7 +351,7 @@ var StringSink = class StringSink {
|
|
|
350
351
|
this.bufferLen = 0;
|
|
351
352
|
}
|
|
352
353
|
static {
|
|
353
|
-
this.FLUSH_THRESHOLD =
|
|
354
|
+
this.FLUSH_THRESHOLD = 32768;
|
|
354
355
|
}
|
|
355
356
|
write(html) {
|
|
356
357
|
if (!html) return;
|
|
@@ -564,7 +565,8 @@ function executeComponentSync(component, props, ctx, ownerFrame = null) {
|
|
|
564
565
|
});
|
|
565
566
|
setCurrentComponentInstance(temp);
|
|
566
567
|
try {
|
|
567
|
-
const
|
|
568
|
+
const executionFrame = getExecutionContextFrame(ownerFrame);
|
|
569
|
+
const result = callWithContext(executionFrame, component, props || {}, { ssr: ctx });
|
|
568
570
|
if (isPromiseLike(result)) throwSSRDataMissing();
|
|
569
571
|
if (typeof result === "string" || typeof result === "number" || typeof result === "boolean" || result === null || result === void 0) {
|
|
570
572
|
const inner = result === null || result === void 0 || result === false ? "" : String(result);
|
|
@@ -742,6 +744,9 @@ const escapedAttrValueCache = /* @__PURE__ */ new Map();
|
|
|
742
744
|
function isEventHandler(key) {
|
|
743
745
|
return key.length >= 2 && key.slice(0, 2).toLowerCase() === "on";
|
|
744
746
|
}
|
|
747
|
+
function isAriaAttribute(key) {
|
|
748
|
+
return key.length > 5 && key.slice(0, 5).toLowerCase() === "aria-";
|
|
749
|
+
}
|
|
745
750
|
function assertAttributeName(name) {
|
|
746
751
|
if (!/^[A-Za-z_:][A-Za-z0-9_.:-]*$/.test(name)) throw new TypeError(`Invalid SSR attribute name: ${JSON.stringify(name)}`);
|
|
747
752
|
}
|
|
@@ -783,7 +788,7 @@ function renderAttrsDirect(props, sink) {
|
|
|
783
788
|
sink.write(attrName);
|
|
784
789
|
continue;
|
|
785
790
|
}
|
|
786
|
-
if (value ===
|
|
791
|
+
if (value === null || value === void 0 || value === false && !isAriaAttribute(attrName)) continue;
|
|
787
792
|
const strValue = String(value);
|
|
788
793
|
if (isUnsafeUrlAttribute(attrName, strValue)) continue;
|
|
789
794
|
sink.write(" ");
|
|
@@ -817,7 +822,7 @@ function renderAttrs(props, opts) {
|
|
|
817
822
|
continue;
|
|
818
823
|
}
|
|
819
824
|
if (value === true) attrParts.push(` ${attrName}`);
|
|
820
|
-
else if (value ===
|
|
825
|
+
else if (value === null || value === void 0 || value === false && !isAriaAttribute(attrName)) continue;
|
|
821
826
|
else {
|
|
822
827
|
const strValue = String(value);
|
|
823
828
|
if (isUnsafeUrlAttribute(attrName, strValue)) continue;
|
|
@@ -145,10 +145,11 @@ function writeSSRPortal(key, children) {
|
|
|
145
145
|
function createSSRPortalAnchor() {
|
|
146
146
|
const context = getActiveRenderContext();
|
|
147
147
|
if (context?.mode !== "ssr") return null;
|
|
148
|
+
const token = createSSRPortalAnchorToken(context.ssrPortals.nextHostId++);
|
|
148
149
|
return {
|
|
149
150
|
$$typeof: ELEMENT_TYPE,
|
|
150
151
|
type: SSR_PORTAL_ANCHOR,
|
|
151
|
-
props: { token
|
|
152
|
+
props: { token }
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
155
|
function createPortalSlot() {
|