@askrjs/askr 0.0.59 → 0.0.61
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/README.md +3 -0
- package/dist/{access-Bg4RJNC8.js → access-ePqdQqkV.js} +3 -0
- package/dist/actions/index.js +2 -1
- package/dist/benchmark.js +8 -8
- package/dist/boot/index.js +1 -1
- package/dist/{boot-BFz3Cwc3.js → boot-DmVZR_IA.js} +9 -9
- package/dist/{cleanup-Br2t23wI.js → cleanup-B6KovDZZ.js} +3 -3
- package/dist/{component-internal-S_ILK7MY.js → component-internal-CbALfPGD.js} +16 -3
- package/dist/{component-lifecycle-DFyfmw6H.js → component-lifecycle-DEMPihoZ.js} +2 -2
- package/dist/control/index.js +1 -1
- package/dist/{control-09vfq-H_.js → control-KVP6LMEQ.js} +4 -4
- package/dist/data/index.js +1 -1
- package/dist/{data-DBuZBv-V.js → data-DvYo_dHd.js} +3 -3
- package/dist/{deferred-DaOJ2Wbe.js → deferred-BeNnjR4r.js} +3 -3
- package/dist/{effect-BwnIvLah.js → effect-D_4zf_wy.js} +2 -2
- package/dist/{fastlane-Dw8SOBr9.js → fastlane-C8PYPotF.js} +1 -1
- package/dist/{for-internal-DDiDGhR2.js → for-internal-B2rBq6yB.js} +4 -4
- package/dist/foundations/index.js +1 -1
- package/dist/foundations/state/index.js +1 -1
- package/dist/foundations/structures/index.js +1 -1
- package/dist/fx/index.js +1 -1
- package/dist/{index-4jSsebbI.d.ts → index-XB38_9B8.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/{lifecycle-operations-OLgdNomp.js → lifecycle-operations-Dj5lK1K7.js} +1 -1
- package/dist/{navigate-zzFcn4zk.js → navigate-DLi79IZr.js} +7 -7
- package/dist/{portal-CH-lRprN.js → portal-D2tPWNrC.js} +3 -3
- package/dist/{renderer-BxEuzC3X.js → renderer-DhojfVg4.js} +99 -26
- package/dist/{resource-operation-BrvPPJDO.js → resource-operation-Dz2Nxi1q.js} +4 -4
- package/dist/resources/index.js +2 -2
- package/dist/router/index.js +2 -2
- package/dist/{selector-DafVYzV4.js → selector-pApF_lGd.js} +2 -2
- package/dist/ssg/index.js +3 -3
- package/dist/ssr/index.js +1 -1
- package/dist/{ssr-DPN09YB2.js → ssr-CbU-1UHm.js} +6 -6
- package/dist/{state-zZmOu_06.js → state-Cc5HumQ0.js} +2 -2
- package/dist/{verify-hydration-DB_huX_v.js → verify-hydration-BaWDqe5H.js} +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Askr
|
|
2
2
|
|
|
3
|
+
[](https://github.com/askrjs/askr/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@askrjs/askr)
|
|
5
|
+
|
|
3
6
|
Askr is an actor-backed UI runtime for TypeScript applications.
|
|
4
7
|
It provides explicit reactivity, routed application startup, server-side rendering,
|
|
5
8
|
and static-site generation entrypoints.
|
|
@@ -408,6 +408,9 @@ function createMissingRendererHost() {
|
|
|
408
408
|
cleanupInstancesUnder() {
|
|
409
409
|
missing("cleanupInstancesUnder");
|
|
410
410
|
},
|
|
411
|
+
replaceComponentRange() {
|
|
412
|
+
return missing("replaceComponentRange");
|
|
413
|
+
},
|
|
411
414
|
teardownNodeSubtree() {
|
|
412
415
|
missing("teardownNodeSubtree");
|
|
413
416
|
},
|
package/dist/actions/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as getCurrentAppRenderRuntime } from "../component-scope-CC3cojX9.js";
|
|
2
2
|
import { r as getCurrentRenderData } from "../render-context-Clw3rFiO.js";
|
|
3
|
-
import { t as state } from "../state-
|
|
3
|
+
import { t as state } from "../state-Cc5HumQ0.js";
|
|
4
4
|
import { jsx, jsxs } from "../jsx-runtime.js";
|
|
5
5
|
import { c as resolveDataRuntimeState, s as invalidateQueriesForRuntime } from "../data-runtime-SJ1BSUvk.js";
|
|
6
6
|
//#region src/actions/runtime.ts
|
|
@@ -88,6 +88,7 @@ function action(descriptor) {
|
|
|
88
88
|
pending: false,
|
|
89
89
|
result: envelope.result
|
|
90
90
|
});
|
|
91
|
+
if (typeof envelope.redirect === "string") location.assign(envelope.redirect);
|
|
91
92
|
return envelope.result;
|
|
92
93
|
} catch (error) {
|
|
93
94
|
setValue({
|
package/dist/benchmark.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as flushRuntimeScheduler } from "./access-
|
|
2
|
-
import { t as installRendererBridge } from "./renderer-
|
|
3
|
-
import { t as state } from "./state-
|
|
4
|
-
import { t as selector } from "./selector-
|
|
1
|
+
import { r as flushRuntimeScheduler } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { t as installRendererBridge } from "./renderer-DhojfVg4.js";
|
|
3
|
+
import { t as state } from "./state-Cc5HumQ0.js";
|
|
4
|
+
import { t as selector } from "./selector-pApF_lGd.js";
|
|
5
5
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
6
|
-
import { i as For } from "./control-
|
|
7
|
-
import { t as createIsland } from "./boot-
|
|
6
|
+
import { i as For } from "./control-KVP6LMEQ.js";
|
|
7
|
+
import { t as createIsland } from "./boot-DmVZR_IA.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.61",
|
|
67
|
+
buildLabel: "0.0.61-local"
|
|
68
68
|
};
|
|
69
69
|
function getBenchmarkMetadata() {
|
|
70
70
|
return { ...benchmarkMetadata };
|
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-DmVZR_IA.js";
|
|
2
2
|
export { cleanupApp, createIsland, createIslands, createSPA, hasApp, hydrateSPA };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-
|
|
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-CUpRxrLH.js";
|
|
3
|
-
import { n as createComponentInstance, r as executeComponent } from "./component-internal-
|
|
4
|
-
import { h as cleanupComponent, m as isPromiseLike } from "./component-lifecycle-
|
|
5
|
-
import { a as withIntrinsicHydrationAdoption, i as registerDeferredHydrationBoundary, n as activateHydrationBoundary$1, o as setStaticChildSlotsCacheEnabled, r as clearDeferredHydrationBoundaries, t as installRendererBridge } from "./renderer-
|
|
6
|
-
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-
|
|
7
|
-
import { C as assertExecutionModel, S as route, a as resolveRouteMeta, c as registerAppInstance, d as clearRoutes, g as createAppRenderRuntime, h as setServerLocation, i as reconcileRouteMeta, l as unregisterAppInstance, s as configureScrollRestoration, t as initializeNavigation, u as _applyManifest } from "./navigate-
|
|
3
|
+
import { n as createComponentInstance, r as executeComponent } from "./component-internal-CbALfPGD.js";
|
|
4
|
+
import { h as cleanupComponent, m as isPromiseLike } from "./component-lifecycle-DEMPihoZ.js";
|
|
5
|
+
import { a as withIntrinsicHydrationAdoption, i as registerDeferredHydrationBoundary, n as activateHydrationBoundary$1, o as setStaticChildSlotsCacheEnabled, r as clearDeferredHydrationBoundaries, t as installRendererBridge } from "./renderer-DhojfVg4.js";
|
|
6
|
+
import { _ as teardownNodeSubtree, d as removeAllListeners } from "./cleanup-B6KovDZZ.js";
|
|
7
|
+
import { C as assertExecutionModel, S as route, a as resolveRouteMeta, c as registerAppInstance, d as clearRoutes, g as createAppRenderRuntime, h as setServerLocation, i as reconcileRouteMeta, l as unregisterAppInstance, s as configureScrollRestoration, t as initializeNavigation, u as _applyManifest } from "./navigate-DLi79IZr.js";
|
|
8
8
|
import { a as startHydrationRenderPhase, s as stopHydrationRenderPhase } from "./render-context-Clw3rFiO.js";
|
|
9
|
-
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-
|
|
9
|
+
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-D2tPWNrC.js";
|
|
10
10
|
import { i as getDefaultDataRuntime } from "./data-runtime-SJ1BSUvk.js";
|
|
11
11
|
import { a as hydrateDataRuntime } from "./query-registry-CQIT4mXr.js";
|
|
12
12
|
import { a as resolveRouteFromRoutes, d as _setActiveRouteAuthOptions, j as lockRouteRegistration, k as hasRegisteredRoutes } from "./route-matching-vJpvLVbX.js";
|
|
13
|
-
import { _ as pageRenderEnvelope, d as hasRouteRenderData, f as resolveRouteRequest, l as getRouteRenderContext, o as reviveDeferredValue, u as getRouteRenderData, x as _preloadRouteHandler } from "./deferred-
|
|
13
|
+
import { _ as pageRenderEnvelope, d as hasRouteRenderData, f as resolveRouteRequest, l as getRouteRenderContext, o as reviveDeferredValue, u as getRouteRenderData, x as _preloadRouteHandler } from "./deferred-BeNnjR4r.js";
|
|
14
14
|
import "./ssr-CbQO5xd3.js";
|
|
15
15
|
//#region src/boot/hydration.ts
|
|
16
16
|
const DEFERRED_PAYLOAD = "__askr_deferred__";
|
|
@@ -594,7 +594,7 @@ async function hydrateSPA(config) {
|
|
|
594
594
|
handler: r.handler,
|
|
595
595
|
namespace: r.options.namespace
|
|
596
596
|
})) : routeTable;
|
|
597
|
-
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-
|
|
597
|
+
const { verifyHydrationSyncForUrl } = await import("./verify-hydration-BaWDqe5H.js");
|
|
598
598
|
if (!verifyHydrationSyncForUrl({
|
|
599
599
|
root: rootElement,
|
|
600
600
|
url: currentUrl,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as runRuntimeHandlerScope, v as logger } from "./access-
|
|
2
|
-
import "./fastlane-
|
|
3
|
-
import { f as registerLifecycleTransaction, h as cleanupComponent } from "./component-lifecycle-
|
|
1
|
+
import { c as runRuntimeHandlerScope, v as logger } from "./access-ePqdQqkV.js";
|
|
2
|
+
import "./fastlane-C8PYPotF.js";
|
|
3
|
+
import { f as registerLifecycleTransaction, h as cleanupComponent } from "./component-lifecycle-DEMPihoZ.js";
|
|
4
4
|
//#region src/runtime/events.ts
|
|
5
5
|
/**
|
|
6
6
|
* Event delegation system for Askr
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as markEagerControlPrimitive } from "./control-DhFRTIoE.js";
|
|
2
|
-
import { b as isDevelopmentEnvironment, n as enqueueRuntimeTask, o as getRuntimeRenderer, v as logger, x as isProductionEnvironment } from "./access-
|
|
3
|
-
import { r as tryRuntimeFastLaneSync, s as finalizeReadableSubscriptions } from "./fastlane-
|
|
2
|
+
import { b as isDevelopmentEnvironment, n as enqueueRuntimeTask, o as getRuntimeRenderer, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
3
|
+
import { r as tryRuntimeFastLaneSync, s as finalizeReadableSubscriptions } from "./fastlane-C8PYPotF.js";
|
|
4
4
|
import { r as STATIC_CHILDREN, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
5
5
|
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-CC3cojX9.js";
|
|
6
|
-
import { a as captureInlineRenderSnapshot$1, c as finalizeInlineReadSubscriptions, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, n as commitRenderedComponent$1, o as discardLifecycleCommitBatch, p as discardCommitOperations, r as registerCommitOperationForInstance, t as commitLifecycleForInstance } from "./component-lifecycle-
|
|
6
|
+
import { a as captureInlineRenderSnapshot$1, c as finalizeInlineReadSubscriptions, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, n as commitRenderedComponent$1, o as discardLifecycleCommitBatch, p as discardCommitOperations, r as registerCommitOperationForInstance, t as commitLifecycleForInstance } from "./component-lifecycle-DEMPihoZ.js";
|
|
7
7
|
//#region src/runtime/context.ts
|
|
8
8
|
const ROOT_EXECUTION_FRAME = {
|
|
9
9
|
parent: null,
|
|
@@ -274,6 +274,19 @@ function commitPlaceholderReplacement(instance, result, host) {
|
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
const renderer = getRuntimeRenderer();
|
|
277
|
+
const rangeReplacement = renderer.replaceComponentRange(instance, result, placeholder);
|
|
278
|
+
if (rangeReplacement) {
|
|
279
|
+
if (rangeReplacement instanceof Element) {
|
|
280
|
+
instance.target = rangeReplacement;
|
|
281
|
+
instance._placeholder = void 0;
|
|
282
|
+
} else {
|
|
283
|
+
instance.target = null;
|
|
284
|
+
instance._placeholder = rangeReplacement;
|
|
285
|
+
}
|
|
286
|
+
host.finalizeReadSubscriptions(instance);
|
|
287
|
+
host.commitRenderedComponent(instance);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
277
290
|
const hostElement = document.createElement("div");
|
|
278
291
|
const executionFrame = getExecutionContextFrame(instance.ownerFrame);
|
|
279
292
|
const oldInstance = enterDomCommitScope(instance);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as isDevelopmentEnvironment, v as logger, x as isProductionEnvironment } from "./access-
|
|
2
|
-
import { a as cleanupReadableSubscriptions, c as finalizeReadableSubscriptionsFromSnapshot, i as cleanupReadableSubscriptionSources, t as isBulkCommitActive } from "./fastlane-
|
|
1
|
+
import { b as isDevelopmentEnvironment, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { a as cleanupReadableSubscriptions, c as finalizeReadableSubscriptionsFromSnapshot, i as cleanupReadableSubscriptionSources, t as isBulkCommitActive } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { a as clearCurrentComponentScope, y as restoreCurrentComponentScope } from "./component-scope-CC3cojX9.js";
|
|
4
4
|
//#region src/runtime/state-diagnostics.ts
|
|
5
5
|
/**
|
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-KVP6LMEQ.js";
|
|
2
2
|
export { Case, For, Match, Show };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as markEagerControlPrimitive, t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
|
|
2
|
-
import { b as isDevelopmentEnvironment } from "./access-
|
|
2
|
+
import { b as isDevelopmentEnvironment } from "./access-ePqdQqkV.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
4
|
-
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-
|
|
5
|
-
import { t as createFineGrainedEffect } from "./effect-
|
|
6
|
-
import { t as state } from "./state-
|
|
4
|
+
import { m as createShowState, p as createCaseState, s as useForState } from "./for-internal-B2rBq6yB.js";
|
|
5
|
+
import { t as createFineGrainedEffect } from "./effect-D_4zf_wy.js";
|
|
6
|
+
import { t as state } from "./state-Cc5HumQ0.js";
|
|
7
7
|
//#region src/control/shared.ts
|
|
8
8
|
function normalizeBoundaryChild(value) {
|
|
9
9
|
if (Array.isArray(value)) {
|
package/dist/data/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as getDefaultDataRuntime, t as createDataRuntime } from "../data-runtime-SJ1BSUvk.js";
|
|
2
|
-
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-
|
|
2
|
+
import { a as queryScope, i as invalidateOnInterval, n as createMutation, r as invalidate, t as createQuery } from "../data-DvYo_dHd.js";
|
|
3
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-CQIT4mXr.js";
|
|
4
4
|
export { createDataRuntime, createMutation, createQuery, createQueryPrefetchContext, defineQuery, defineServerQueries, dehydrateDataRuntime, getDefaultDataRuntime, hydrateDataRuntime, invalidate, invalidateOnInterval, prefetchQuery, queryScope, serveQuery };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as enqueueRuntimeTask, v as logger } from "./access-
|
|
2
|
-
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { n as enqueueRuntimeTask, v as logger } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-CC3cojX9.js";
|
|
4
4
|
import { n as getActiveRenderContext } from "./render-context-Clw3rFiO.js";
|
|
5
|
-
import { c as windowFocused, i as routeActive, n as documentVisible, s as timer } from "./lifecycle-operations-
|
|
5
|
+
import { c as windowFocused, i as routeActive, n as documentVisible, s as timer } from "./lifecycle-operations-Dj5lK1K7.js";
|
|
6
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-SJ1BSUvk.js";
|
|
7
7
|
//#region src/data/query-key.ts
|
|
8
8
|
function serializeQueryKeyNumber(part) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
2
|
-
import { l as defineScope, m as readScope } from "./component-internal-
|
|
2
|
+
import { l as defineScope, m as readScope } from "./component-internal-CbALfPGD.js";
|
|
3
3
|
import { d as getCurrentAppRenderRuntime } from "./component-scope-CC3cojX9.js";
|
|
4
|
-
import { m as isPromiseLike } from "./component-lifecycle-
|
|
4
|
+
import { m as isPromiseLike } from "./component-lifecycle-DEMPihoZ.js";
|
|
5
5
|
import { n as getActiveRenderContext, r as getCurrentRenderData } from "./render-context-Clw3rFiO.js";
|
|
6
|
-
import { t as resource } from "./resource-operation-
|
|
6
|
+
import { t as resource } from "./resource-operation-Dz2Nxi1q.js";
|
|
7
7
|
import { t as ROUTE_ROOT_COMPONENT } from "./router-internal-BC0w1_xk.js";
|
|
8
8
|
import { c as withTelemetry, t as createQueryPrefetchContext } from "./query-registry-CQIT4mXr.js";
|
|
9
9
|
import { E as getRouteRecords, h as getActiveRouteAuthOptions, i as getMatchingRouteRecord, o as buildRouteContext, s as buildRouteContextBase } from "./route-matching-vJpvLVbX.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as enqueueRuntimeLane } from "./access-
|
|
2
|
-
import { _ as withFineGrainedReadTracking } from "./fastlane-
|
|
1
|
+
import { t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { _ as withFineGrainedReadTracking } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
//#region src/runtime/effect.ts
|
|
4
4
|
const SOURCE_EFFECTS = Symbol("askr.source-effects");
|
|
5
5
|
const effectSources = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as isDevelopmentEnvironment, l as runRuntimeWithSyncProgress, n as enqueueRuntimeTask, o as getRuntimeRenderer, s as markRuntimeReactivePropsDirtySource, u as setRuntimeBulkCommitProbe } from "./access-
|
|
1
|
+
import { b as isDevelopmentEnvironment, l as runRuntimeWithSyncProgress, n as enqueueRuntimeTask, o as getRuntimeRenderer, s as markRuntimeReactivePropsDirtySource, u as setRuntimeBulkCommitProbe } from "./access-ePqdQqkV.js";
|
|
2
2
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
3
3
|
import { p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
4
4
|
//#region src/runtime/dev-namespace.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as _isDOMElement } from "./vnode-D24p6IW2.js";
|
|
2
|
-
import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-
|
|
3
|
-
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, m as shouldCoalesceFineGrainedItemReads, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
4
|
-
import { n as createComponentInstance, s as renderScopedComponent } from "./component-internal-
|
|
2
|
+
import { b as isDevelopmentEnvironment, o as getRuntimeRenderer, v as logger } from "./access-ePqdQqkV.js";
|
|
3
|
+
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, m as shouldCoalesceFineGrainedItemReads, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
4
|
+
import { n as createComponentInstance, s as renderScopedComponent } from "./component-internal-CbALfPGD.js";
|
|
5
5
|
import { h as getCurrentStateIndex, i as claimHookIndex, o as clearRenderTracking, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
6
|
-
import { _ as registerOwnedChildScope, c as finalizeInlineReadSubscriptions, f as registerLifecycleTransaction, h as cleanupComponent, v as unregisterOwnedChildScope } from "./component-lifecycle-
|
|
6
|
+
import { _ as registerOwnedChildScope, c as finalizeInlineReadSubscriptions, f as registerLifecycleTransaction, h as cleanupComponent, v as unregisterOwnedChildScope } from "./component-lifecycle-DEMPihoZ.js";
|
|
7
7
|
//#region src/runtime/child-scope.ts
|
|
8
8
|
const EMPTY_CHILD_SCOPE_PROPS = {};
|
|
9
9
|
const childScopesByInstance = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-
|
|
1
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../portal-D2tPWNrC.js";
|
|
2
2
|
import { a as layout, i as Slot, r as Presence } from "../structures-DUB3HchX.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, definePortal, layout };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-
|
|
1
|
+
import { i as definePortal, n as Portal, t as DefaultPortal } from "../../portal-D2tPWNrC.js";
|
|
2
2
|
import { a as layout, i as Slot, n as createCollection, r as Presence, t as createLayer } from "../../structures-DUB3HchX.js";
|
|
3
3
|
export { DefaultPortal, Portal, Presence, Slot, createCollection, createLayer, definePortal, layout };
|
package/dist/fx/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as scheduleEventHandler, n as enqueueRuntimeTask, v as logger } from "../access-
|
|
1
|
+
import { h as scheduleEventHandler, n as enqueueRuntimeTask, v as logger } from "../access-ePqdQqkV.js";
|
|
2
2
|
import { f as getCurrentComponentInstance } from "../component-scope-CC3cojX9.js";
|
|
3
3
|
//#region src/fx/timing.ts
|
|
4
4
|
/**
|
|
@@ -14,6 +14,7 @@ interface RuntimeKeyedReorderDecision {
|
|
|
14
14
|
interface RuntimeRendererHost {
|
|
15
15
|
evaluate(node: unknown, target: Element | null, context?: object, retainedOwner?: ComponentInstance): void;
|
|
16
16
|
cleanupInstancesUnder(node: Node): void;
|
|
17
|
+
replaceComponentRange(instance: ComponentInstance, result: unknown, placeholder: Comment): Node | null;
|
|
17
18
|
teardownNodeSubtree(root: Node): void;
|
|
18
19
|
populateKeyMapForElement(parent: Element): void;
|
|
19
20
|
getKeyMapForElement(parent: Element): Map<string | number, Element> | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as state, a as defineScope, g as StateTuple, h as StateSetter, i as Scope, m as State, o as readScope } from "./control-D-9LKE3W.js";
|
|
2
2
|
import { s as Props, t as Fragment } from "./jsx-CP0gmYwJ.js";
|
|
3
3
|
import { t as getSignal } from "./component-scope-CvPba6O6.js";
|
|
4
|
-
import { a as AskrRuntime, c as RuntimeRendererHost, i as derive, l as createRuntime, n as selector, o as AskrRuntimeOptions, r as Derived, s as RuntimeKeyedReorderDecision, t as Selector, u as getDefaultRuntime } from "./index-
|
|
4
|
+
import { a as AskrRuntime, c as RuntimeRendererHost, i as derive, l as createRuntime, n as selector, o as AskrRuntimeOptions, r as Derived, s as RuntimeKeyedReorderDecision, t as Selector, u as getDefaultRuntime } from "./index-XB38_9B8.js";
|
|
5
5
|
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-DdkXZQEM.js";
|
|
6
6
|
import { i as jsxs, n as jsx } from "./jsx-runtime-92bV2hSa.js";
|
|
7
7
|
import { A as ServerQueryHandler, D as QueryPrefetchContext, T as QueryDefinition, a as defineServerQueries, c as prefetchQuery, g as createQuery, i as defineQuery, l as serveQuery, o as dehydrateDataRuntime, s as hydrateDataRuntime, v as DataRuntime } from "./index-Bki2rqcr.js";
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-
|
|
2
|
-
import { f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { a as getRuntimeFlushVersion, d as AskrRuntime, m as getDefaultRuntime, p as createRuntime, t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { n as Fragment } from "./jsx-CUpRxrLH.js";
|
|
4
|
-
import { l as defineScope, m as readScope } from "./component-internal-
|
|
4
|
+
import { l as defineScope, m as readScope } from "./component-internal-CbALfPGD.js";
|
|
5
5
|
import { g as getSignal, i as claimHookIndex, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
6
6
|
import { n as isSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
7
|
-
import { t as installRendererBridge } from "./renderer-
|
|
8
|
-
import { t as state } from "./state-
|
|
9
|
-
import { t as selector } from "./selector-
|
|
7
|
+
import { t as installRendererBridge } from "./renderer-DhojfVg4.js";
|
|
8
|
+
import { t as state } from "./state-Cc5HumQ0.js";
|
|
9
|
+
import { t as selector } from "./selector-pApF_lGd.js";
|
|
10
10
|
import { jsx, jsxs } from "./jsx-runtime.js";
|
|
11
|
-
import { i as For, n as Match, r as Show, t as Case } from "./control-
|
|
12
|
-
import { t as createQuery } from "./data-
|
|
11
|
+
import { i as For, n as Match, r as Show, t as Case } from "./control-KVP6LMEQ.js";
|
|
12
|
+
import { t as createQuery } from "./data-DvYo_dHd.js";
|
|
13
13
|
import { a as hydrateDataRuntime, i as dehydrateDataRuntime, n as defineQuery, o as prefetchQuery, r as defineServerQueries, s as serveQuery } from "./query-registry-CQIT4mXr.js";
|
|
14
14
|
//#region src/runtime/derive.ts
|
|
15
15
|
const deriveCells = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as registerCommitOperation } from "./component-internal-
|
|
1
|
+
import { a as registerCommitOperation } from "./component-internal-CbALfPGD.js";
|
|
2
2
|
import { f as getCurrentComponentInstance, i as claimHookIndex } from "./component-scope-CC3cojX9.js";
|
|
3
3
|
import { t as isRouteActivityActive } from "./route-activity-CNJfpwx-.js";
|
|
4
4
|
//#region src/runtime/lifecycle-operations.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-
|
|
2
|
-
import { f as notifyReadableReaders, i as cleanupReadableSubscriptionSources, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { b as isDevelopmentEnvironment, r as flushRuntimeScheduler, v as logger, x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { f as notifyReadableReaders, i as cleanupReadableSubscriptionSources, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
4
|
-
import { r as executeComponent } from "./component-internal-
|
|
4
|
+
import { r as executeComponent } from "./component-internal-CbALfPGD.js";
|
|
5
5
|
import { d as getCurrentAppRenderRuntime, f as getCurrentComponentInstance } from "./component-scope-CC3cojX9.js";
|
|
6
|
-
import { g as cleanupComponentGeneration, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, s as drainLifecycleCommitErrors } from "./component-lifecycle-
|
|
7
|
-
import { _ as teardownNodeSubtree } from "./cleanup-
|
|
6
|
+
import { g as cleanupComponentGeneration, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, s as drainLifecycleCommitErrors } from "./component-lifecycle-DEMPihoZ.js";
|
|
7
|
+
import { _ as teardownNodeSubtree } from "./cleanup-B6KovDZZ.js";
|
|
8
8
|
import { n as getActiveRenderContext } from "./render-context-Clw3rFiO.js";
|
|
9
9
|
import { n as syncRouteActivitySnapshot } from "./route-activity-CNJfpwx-.js";
|
|
10
|
-
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-
|
|
10
|
+
import { r as clearDefaultPortalForInstance, t as DefaultPortal } from "./portal-D2tPWNrC.js";
|
|
11
11
|
import { A as insertRecordSorted, C as getCurrentPathPrefix, D as getRoutes, E as getRouteRecords, F as snapshotRouteState, I as computeRank, L as normalizeRouteSegmentName, M as pushRegistrationScope, N as restoreRouteState, O as hasActivePageScope, P as setDefaultRouteAuthOptions, R as parseSegments, S as getCurrentPageScope, T as getDefaultRouteAuthOptions, _ as getCurrentInheritedAuthRequirements, a as resolveRouteFromRoutes, b as getCurrentLayoutChain, c as deepFreeze, f as addRouteToStores, g as getActiveRoutes, j as lockRouteRegistration, l as makeQuery, m as clearRouteState, n as computeMatchesFromRoutes, p as assertRouteRegistrationUnlocked, r as computeRouteActivityMatches, u as parseLocation, v as getCurrentInheritedMeta, w as getCurrentScopeKind, x as getCurrentPageChain, y as getCurrentInheritedPolicies } from "./route-matching-vJpvLVbX.js";
|
|
12
|
-
import { d as hasRouteRenderData, f as resolveRouteRequest, l as getRouteRenderContext, u as getRouteRenderData, x as _preloadRouteHandler, y as createRouteHandler } from "./deferred-
|
|
12
|
+
import { d as hasRouteRenderData, f as resolveRouteRequest, l as getRouteRenderContext, u as getRouteRenderData, x as _preloadRouteHandler, y as createRouteHandler } from "./deferred-BeNnjR4r.js";
|
|
13
13
|
import { allOf } from "@askrjs/auth";
|
|
14
14
|
//#region src/runtime/execution-model.ts
|
|
15
15
|
const EXECUTION_MODEL_KEY = Symbol.for("__ASKR_EXECUTION_MODEL__");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as getRuntimeRenderer } from "./access-
|
|
2
|
-
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { o as getRuntimeRenderer } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { f as getCurrentComponentInstance, m as getCurrentPortalScope } from "./component-scope-CC3cojX9.js";
|
|
4
|
-
import { f as registerLifecycleTransaction, h as cleanupComponent, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-
|
|
4
|
+
import { f as registerLifecycleTransaction, h as cleanupComponent, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-DEMPihoZ.js";
|
|
5
5
|
//#region src/runtime/portal.ts
|
|
6
6
|
function createPortalSlot() {
|
|
7
7
|
let currentValue;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
|
|
2
2
|
import { n as _isDOMElement, t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
3
|
-
import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as configureRuntimeRenderer, i as getDefaultRuntimeInstance, n as enqueueRuntimeTask, v as logger, y as getRuntimeEnv } from "./access-
|
|
4
|
-
import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-
|
|
3
|
+
import { b as isDevelopmentEnvironment, c as runRuntimeHandlerScope, f as configureRuntimeRenderer, i as getDefaultRuntimeInstance, n as enqueueRuntimeTask, v as logger, y as getRuntimeEnv } from "./access-ePqdQqkV.js";
|
|
4
|
+
import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-C8PYPotF.js";
|
|
5
5
|
import { n as Fragment, r as STATIC_CHILDREN } from "./jsx-CUpRxrLH.js";
|
|
6
|
-
import { f as getVNodeContextFrame, g as withContext, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as markVNodeTreeWithContextFrame, t as captureInlineRenderSnapshot, u as getCurrentContextFrame } from "./component-internal-
|
|
6
|
+
import { f as getVNodeContextFrame, g as withContext, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as markVNodeTreeWithContextFrame, t as captureInlineRenderSnapshot, u as getCurrentContextFrame } from "./component-internal-CbALfPGD.js";
|
|
7
7
|
import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
8
|
-
import { d as registerLifecycleRollback, f as registerLifecycleTransaction, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-
|
|
9
|
-
import { _ as createChildScope, a as registerForStateTransaction, 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 disposeChildScope, y as rerenderChildScope } from "./for-internal-
|
|
10
|
-
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-
|
|
11
|
-
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-
|
|
8
|
+
import { d as registerLifecycleRollback, f as registerLifecycleTransaction, h as cleanupComponent, i as beginLifecycleCommitBatch, l as flushLifecycleCommitBatch, m as isPromiseLike, o as discardLifecycleCommitBatch, u as getCurrentLifecycleCommitBatch } from "./component-lifecycle-DEMPihoZ.js";
|
|
9
|
+
import { _ as createChildScope, a as registerForStateTransaction, 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 disposeChildScope, y as rerenderChildScope } from "./for-internal-B2rBq6yB.js";
|
|
10
|
+
import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-D_4zf_wy.js";
|
|
11
|
+
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-B6KovDZZ.js";
|
|
12
12
|
import { t as getPublicAttributeName } from "./attr-names-CjhzmHOn.js";
|
|
13
13
|
import { t as ROUTE_ROOT_COMPONENT } from "./router-internal-BC0w1_xk.js";
|
|
14
14
|
//#region src/runtime/error-boundary.ts
|
|
@@ -897,7 +897,20 @@ function getRangeNodes(range) {
|
|
|
897
897
|
}
|
|
898
898
|
return nodes;
|
|
899
899
|
}
|
|
900
|
-
function createDetachedRange(nodes, owner) {
|
|
900
|
+
function createDetachedRange(nodes, owner, forceAnchors = false) {
|
|
901
|
+
if (nodes instanceof DocumentFragment) {
|
|
902
|
+
const first = nodes.firstChild;
|
|
903
|
+
const last = nodes.lastChild;
|
|
904
|
+
const existingOwner = first ? getRangeOwner(first) : void 0;
|
|
905
|
+
const existingRange = existingOwner ? getOwnedRange(existingOwner) : void 0;
|
|
906
|
+
if (existingRange && !existingRange.single && existingRange.start === first && existingRange.end === last) {
|
|
907
|
+
if (owner) registerRange(existingRange, owner);
|
|
908
|
+
return {
|
|
909
|
+
range: existingRange,
|
|
910
|
+
fragment: nodes
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
}
|
|
901
914
|
if (nodes && !(nodes instanceof DocumentFragment)) return {
|
|
902
915
|
range: createSingleNodeRange(nodes, owner),
|
|
903
916
|
fragment: null
|
|
@@ -905,7 +918,7 @@ function createDetachedRange(nodes, owner) {
|
|
|
905
918
|
const normalized = normalizeNodes(nodes);
|
|
906
919
|
const ownerDocument = normalized[0]?.ownerDocument ?? (typeof document !== "undefined" ? document : null);
|
|
907
920
|
if (!ownerDocument) throw new Error("[askr] Cannot create a DOM range without a document.");
|
|
908
|
-
if (normalized.length === 1) {
|
|
921
|
+
if (normalized.length === 1 && !forceAnchors) {
|
|
909
922
|
const single = normalized[0];
|
|
910
923
|
return {
|
|
911
924
|
range: createSingleNodeRange(single, owner),
|
|
@@ -944,10 +957,19 @@ function createEmptyRange(ownerDocument = document, owner) {
|
|
|
944
957
|
}
|
|
945
958
|
function registerRange(range, owner) {
|
|
946
959
|
if (!owner) return;
|
|
960
|
+
const previousStartOwner = ownersByAnchor.get(range.start);
|
|
961
|
+
const previousEndOwner = ownersByAnchor.get(range.end);
|
|
962
|
+
for (const previousOwner of [previousStartOwner, previousEndOwner]) if (previousOwner && previousOwner !== owner && rangesByOwner.get(previousOwner) === range) rangesByOwner.delete(previousOwner);
|
|
947
963
|
rangesByOwner.set(owner, range);
|
|
948
964
|
ownersByAnchor.set(range.start, owner);
|
|
949
965
|
if (range.end !== range.start) ownersByAnchor.set(range.end, owner);
|
|
950
966
|
}
|
|
967
|
+
function getOwnedRange(owner) {
|
|
968
|
+
return rangesByOwner.get(owner);
|
|
969
|
+
}
|
|
970
|
+
function getRangeOwner(node) {
|
|
971
|
+
return ownersByAnchor.get(node);
|
|
972
|
+
}
|
|
951
973
|
function clearRangeOwner(range, owner) {
|
|
952
974
|
const startOwner = ownersByAnchor.get(range.start);
|
|
953
975
|
const endOwner = ownersByAnchor.get(range.end);
|
|
@@ -4848,9 +4870,12 @@ function cleanupReplacementNode(node, retainedInstances) {
|
|
|
4848
4870
|
}
|
|
4849
4871
|
function beginComponentHostReplacement(existingHost, retainedInstance, previousTarget, retainedInstances = [retainedInstance], disposeOnRollback = false) {
|
|
4850
4872
|
const parent = existingHost.parentNode;
|
|
4873
|
+
const previousRange = getOwnedRange(retainedInstance);
|
|
4851
4874
|
const previousRef = existingHost instanceof Element ? elementRefs.get(existingHost) : void 0;
|
|
4852
4875
|
let previousRefDetached = false;
|
|
4853
4876
|
let nextDom = null;
|
|
4877
|
+
let nextHost = null;
|
|
4878
|
+
let nextRange;
|
|
4854
4879
|
let previousBindings = /* @__PURE__ */ new Map();
|
|
4855
4880
|
let didReplace = false;
|
|
4856
4881
|
let replacementAttempted = false;
|
|
@@ -4860,17 +4885,23 @@ function beginComponentHostReplacement(existingHost, retainedInstance, previousT
|
|
|
4860
4885
|
finished = true;
|
|
4861
4886
|
if (replacementAttempted && didReplace) {
|
|
4862
4887
|
const retained = Array.from(retainedInstances);
|
|
4863
|
-
if (
|
|
4888
|
+
if (nextHost) for (const [instance, binding] of previousBindings) {
|
|
4864
4889
|
if (binding.target !== existingHost && binding.placeholder !== existingHost) continue;
|
|
4865
|
-
if (
|
|
4866
|
-
instance.target =
|
|
4890
|
+
if (nextHost instanceof Element) {
|
|
4891
|
+
instance.target = nextHost;
|
|
4867
4892
|
instance._placeholder = void 0;
|
|
4868
|
-
} else if (
|
|
4893
|
+
} else if (nextHost instanceof Comment) {
|
|
4869
4894
|
instance.target = null;
|
|
4870
|
-
instance._placeholder =
|
|
4895
|
+
instance._placeholder = nextHost;
|
|
4871
4896
|
}
|
|
4872
4897
|
}
|
|
4873
|
-
|
|
4898
|
+
if (previousRange && !previousRange.single) {
|
|
4899
|
+
removeRange(previousRange, (node) => {
|
|
4900
|
+
cleanupDetachedComponentHost(node, retained);
|
|
4901
|
+
node.parentNode?.removeChild(node);
|
|
4902
|
+
});
|
|
4903
|
+
if (nextRange) registerRange(nextRange, retainedInstance);
|
|
4904
|
+
} else cleanupDetachedComponentHost(existingHost, retained);
|
|
4874
4905
|
}
|
|
4875
4906
|
};
|
|
4876
4907
|
const rollback = () => {
|
|
@@ -4879,8 +4910,15 @@ function beginComponentHostReplacement(existingHost, retainedInstance, previousT
|
|
|
4879
4910
|
if (!replacementAttempted) return;
|
|
4880
4911
|
const rollbackErrors = [];
|
|
4881
4912
|
const retained = Array.from(retainedInstances);
|
|
4882
|
-
if (
|
|
4883
|
-
|
|
4913
|
+
if (nextHost && nextHost !== existingHost) try {
|
|
4914
|
+
if (nextRange && !nextRange.single) removeRange(nextRange, (node) => {
|
|
4915
|
+
cleanupReplacementNode(node, retained);
|
|
4916
|
+
node.parentNode?.removeChild(node);
|
|
4917
|
+
});
|
|
4918
|
+
else {
|
|
4919
|
+
cleanupReplacementNode(nextHost, retained);
|
|
4920
|
+
nextHost.parentNode?.removeChild(nextHost);
|
|
4921
|
+
}
|
|
4884
4922
|
} catch (error) {
|
|
4885
4923
|
rollbackErrors.push(error);
|
|
4886
4924
|
}
|
|
@@ -4892,6 +4930,7 @@ function beginComponentHostReplacement(existingHost, retainedInstance, previousT
|
|
|
4892
4930
|
instance._placeholder = binding.placeholder;
|
|
4893
4931
|
}
|
|
4894
4932
|
if (!previousBindings.has(retainedInstance) && !disposeOnRollback) retainedInstance.target = previousTarget;
|
|
4933
|
+
if (previousRange) registerRange(previousRange, retainedInstance);
|
|
4895
4934
|
} catch (error) {
|
|
4896
4935
|
rollbackErrors.push(error);
|
|
4897
4936
|
}
|
|
@@ -4915,9 +4954,15 @@ function beginComponentHostReplacement(existingHost, retainedInstance, previousT
|
|
|
4915
4954
|
placeholder: instance._placeholder
|
|
4916
4955
|
}]));
|
|
4917
4956
|
nextDom = materialize();
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4957
|
+
const registeredRange = getOwnedRange(retainedInstance);
|
|
4958
|
+
nextRange = registeredRange && registeredRange !== previousRange ? registeredRange : void 0;
|
|
4959
|
+
nextHost = nextDom instanceof DocumentFragment ? nextDom.firstChild : nextDom;
|
|
4960
|
+
if (!nextHost) throw new Error("[askr] Component replacement produced no host node.");
|
|
4961
|
+
if (!nextRange) nextRange = createSingleNodeRange(nextHost, retainedInstance);
|
|
4962
|
+
prepareNextDom(nextHost);
|
|
4963
|
+
if (parent && nextHost !== existingHost) {
|
|
4964
|
+
if (previousRange && !previousRange.single) parent.insertBefore(nextDom, previousRange.start);
|
|
4965
|
+
else parent.replaceChild(nextDom, existingHost);
|
|
4921
4966
|
didReplace = true;
|
|
4922
4967
|
}
|
|
4923
4968
|
} catch (error) {
|
|
@@ -4927,7 +4972,7 @@ function beginComponentHostReplacement(existingHost, retainedInstance, previousT
|
|
|
4927
4972
|
throw error;
|
|
4928
4973
|
}
|
|
4929
4974
|
if (!staged) commit();
|
|
4930
|
-
return
|
|
4975
|
+
return nextHost;
|
|
4931
4976
|
};
|
|
4932
4977
|
return { replace };
|
|
4933
4978
|
}
|
|
@@ -4963,11 +5008,20 @@ function materializeComponentResultNode(childInstance, result, parentNamespace)
|
|
|
4963
5008
|
mountInstanceInline(childInstance, null);
|
|
4964
5009
|
return placeholder;
|
|
4965
5010
|
}
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
5011
|
+
if (!_isDOMElement(result) || result.type !== __CONTROL_BOUNDARY__) {
|
|
5012
|
+
const host = document.createElement("div");
|
|
5013
|
+
host.appendChild(dom);
|
|
5014
|
+
host.__ASKR_WRAPPER_HOST = true;
|
|
5015
|
+
mountInstanceInline(childInstance, host);
|
|
5016
|
+
return host;
|
|
5017
|
+
}
|
|
5018
|
+
const materialized = createDetachedRange(dom, childInstance, true);
|
|
5019
|
+
const host = materialized.range.start;
|
|
5020
|
+
host.__ASKR_INSTANCE = childInstance;
|
|
5021
|
+
host.__ASKR_INSTANCES = [childInstance];
|
|
5022
|
+
childInstance._placeholder = host;
|
|
5023
|
+
mountInstanceInline(childInstance, null);
|
|
5024
|
+
return materialized.fragment ?? host;
|
|
4971
5025
|
}
|
|
4972
5026
|
function resolveNestedComponentResult(result, snapshot, parentInstance) {
|
|
4973
5027
|
let currentResult = result;
|
|
@@ -6234,11 +6288,30 @@ function evaluateInLifecycleBatch(node, target, context, retainedOwner) {
|
|
|
6234
6288
|
}
|
|
6235
6289
|
}
|
|
6236
6290
|
//#endregion
|
|
6291
|
+
//#region src/renderer/component-range-commit.ts
|
|
6292
|
+
function replaceComponentRange(instance, result, placeholder) {
|
|
6293
|
+
const previousRange = getOwnedRange(instance);
|
|
6294
|
+
const parent = placeholder.parentNode;
|
|
6295
|
+
if (!previousRange || previousRange.single || previousRange.start !== placeholder || !(parent instanceof Element)) return null;
|
|
6296
|
+
const next = createDetachedRange(materializeComponentResultNode(instance, result, getParentNamespace(parent)), instance);
|
|
6297
|
+
const nextHost = next.range.start;
|
|
6298
|
+
nextHost.__ASKR_INSTANCE = instance;
|
|
6299
|
+
nextHost.__ASKR_INSTANCES = [instance];
|
|
6300
|
+
parent.insertBefore(next.fragment ?? next.range.start, previousRange.start);
|
|
6301
|
+
removeRange(previousRange, (node) => {
|
|
6302
|
+
cleanupDetachedComponentHost(node, [instance]);
|
|
6303
|
+
node.parentNode?.removeChild(node);
|
|
6304
|
+
});
|
|
6305
|
+
registerRange(next.range, instance);
|
|
6306
|
+
return nextHost;
|
|
6307
|
+
}
|
|
6308
|
+
//#endregion
|
|
6237
6309
|
//#region src/renderer/index.ts
|
|
6238
6310
|
function createRendererHost() {
|
|
6239
6311
|
return {
|
|
6240
6312
|
evaluate,
|
|
6241
6313
|
cleanupInstancesUnder,
|
|
6314
|
+
replaceComponentRange,
|
|
6242
6315
|
teardownNodeSubtree,
|
|
6243
6316
|
populateKeyMapForElement,
|
|
6244
6317
|
getKeyMapForElement,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as enqueueRuntimeLane, v as logger } from "./access-
|
|
2
|
-
import { h as withAsyncResourceContext, u as getCurrentContextFrame } from "./component-internal-
|
|
1
|
+
import { t as enqueueRuntimeLane, v as logger } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { h as withAsyncResourceContext, u as getCurrentContextFrame } from "./component-internal-CbALfPGD.js";
|
|
3
3
|
import { f as getCurrentComponentInstance } from "./component-scope-CC3cojX9.js";
|
|
4
|
-
import { m as isPromiseLike, r as registerCommitOperationForInstance } from "./component-lifecycle-
|
|
4
|
+
import { m as isPromiseLike, r as registerCommitOperationForInstance } from "./component-lifecycle-DEMPihoZ.js";
|
|
5
5
|
import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
|
|
6
6
|
import { i as getNextRenderKey, l as throwSSRDataMissing, n as getActiveRenderContext, r as getCurrentRenderData, u as SSRDataMissingError } from "./render-context-Clw3rFiO.js";
|
|
7
|
-
import { t as state } from "./state-
|
|
7
|
+
import { t as state } from "./state-Cc5HumQ0.js";
|
|
8
8
|
//#region src/runtime/resource-cell.ts
|
|
9
9
|
/**
|
|
10
10
|
* Pure, component-agnostic ResourceCell state machine.
|
package/dist/resources/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { g as getSignal } from "../component-scope-CC3cojX9.js";
|
|
2
|
-
import { t as resource } from "../resource-operation-
|
|
3
|
-
import { a as stream, c as windowFocused, i as routeActive, n as documentVisible, o as task, r as on, s as timer, t as capture } from "../lifecycle-operations-
|
|
2
|
+
import { t as resource } from "../resource-operation-Dz2Nxi1q.js";
|
|
3
|
+
import { a as stream, c as windowFocused, i as routeActive, n as documentVisible, o as task, r as on, s as timer, t as capture } from "../lifecycle-operations-Dj5lK1K7.js";
|
|
4
4
|
export { capture, documentVisible, getSignal, on, resource, routeActive, stream, task, timer, windowFocused };
|
package/dist/router/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as route, _ as fallback, a as resolveRouteMeta, b as page, d as clearRoutes, f as createRouteRegistry, i as reconcileRouteMeta, m as currentRoute, n as navigate, o as serializeRouteMeta, p as getManifest, r as updateRouteQuery, v as group, x as registerRoutes, y as index } from "../navigate-
|
|
1
|
+
import { S as route, _ as fallback, a as resolveRouteMeta, b as page, d as clearRoutes, f as createRouteRegistry, i as reconcileRouteMeta, m as currentRoute, n as navigate, o as serializeRouteMeta, p as getManifest, r as updateRouteQuery, v as group, x as registerRoutes, y as index } from "../navigate-DLi79IZr.js";
|
|
2
2
|
import { jsx } from "../jsx-runtime.js";
|
|
3
3
|
import { D as getRoutes } from "../route-matching-vJpvLVbX.js";
|
|
4
|
-
import { S as lazy, a as resolveDeferredValues, f as resolveRouteRequest, i as isDeferred, n as Resolve, p as currentAuth, r as defer, s as routeData, v as Outlet } from "../deferred-
|
|
4
|
+
import { S as lazy, a as resolveDeferredValues, f as resolveRouteRequest, i as isDeferred, n as Resolve, p as currentAuth, r as defer, s as routeData, v as Outlet } from "../deferred-BeNnjR4r.js";
|
|
5
5
|
import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
|
|
6
6
|
import { t as applyInteractionPolicy } from "../interactions-w7gQN4ha.js";
|
|
7
7
|
//#region src/router/policy.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as enqueueRuntimeLane } from "./access-
|
|
2
|
-
import { d as markReadableUsage, f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { t as enqueueRuntimeLane } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { d as markReadableUsage, f as notifyReadableReaders, g as withDerivedReadTracking, h as syncDerivedDependencySubscriptions, l as markReactivePropsDirtySource, o as clearDerivedDependencySubscriptions, p as recordReadableRead, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
4
4
|
//#region src/runtime/selector-store.ts
|
|
5
5
|
const dirtySelectorRecords = /* @__PURE__ */ new Set();
|
package/dist/ssg/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../access-
|
|
2
|
-
import { a as resolveDeferredValues, b as getRenderHandler, c as bindResolvedRouteData } from "../deferred-
|
|
1
|
+
import "../access-ePqdQqkV.js";
|
|
2
|
+
import { a as resolveDeferredValues, b as getRenderHandler, c as bindResolvedRouteData } from "../deferred-BeNnjR4r.js";
|
|
3
3
|
import { n as renderDocument } from "../ssr-CbQO5xd3.js";
|
|
4
|
-
import { n as renderToString } from "../ssr-
|
|
4
|
+
import { n as renderToString } from "../ssr-CbU-1UHm.js";
|
|
5
5
|
import * as fs from "node:fs/promises";
|
|
6
6
|
import * as pathModule from "node:path";
|
|
7
7
|
import * as os from "node:os";
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { u as SSRDataMissingError } from "../render-context-Clw3rFiO.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-CbU-1UHm.js";
|
|
3
3
|
export { SSRDataMissingError, createRenderContext, getRenderContext, renderResolvedToStringSync, renderRouteRequest, renderRouteRequestToString, renderToStream, renderToString, renderToStringSync, resolveRequest, withRenderContext, withRenderContextAsync };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
|
|
2
2
|
import { t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
|
|
3
|
-
import { v as logger } from "./access-
|
|
3
|
+
import { v as logger } from "./access-ePqdQqkV.js";
|
|
4
4
|
import { n as Fragment, t as ELEMENT_TYPE } from "./jsx-CUpRxrLH.js";
|
|
5
|
-
import { c as callWithContext, d as getExecutionContextFrame, f as getVNodeContextFrame, n as createComponentInstance, p as markVNodeTreeWithContextFrame } from "./component-internal-
|
|
5
|
+
import { c as callWithContext, d as getExecutionContextFrame, f as getVNodeContextFrame, n as createComponentInstance, p as markVNodeTreeWithContextFrame } from "./component-internal-CbALfPGD.js";
|
|
6
6
|
import { f as getCurrentComponentInstance, w as setCurrentComponentInstance } from "./component-scope-CC3cojX9.js";
|
|
7
|
-
import { h as cleanupComponent, m as isPromiseLike } from "./component-lifecycle-
|
|
8
|
-
import { g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-
|
|
7
|
+
import { h as cleanupComponent, m as isPromiseLike } from "./component-lifecycle-DEMPihoZ.js";
|
|
8
|
+
import { g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, o as rollbackForStateTransaction, r as commitForStateTransaction } from "./for-internal-B2rBq6yB.js";
|
|
9
9
|
import { c as stopRenderPhase$1, o as startRenderPhase$1, t as configureRenderContextProvider, u as SSRDataMissingError } from "./render-context-Clw3rFiO.js";
|
|
10
|
-
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-
|
|
10
|
+
import { a as disposeDefaultPortalScope, t as DefaultPortal } from "./portal-D2tPWNrC.js";
|
|
11
11
|
import { t as getPublicAttributeName } from "./attr-names-CjhzmHOn.js";
|
|
12
12
|
import { t as createDataRuntime } from "./data-runtime-SJ1BSUvk.js";
|
|
13
13
|
import { c as withTelemetry, i as dehydrateDataRuntime, t as createQueryPrefetchContext } from "./query-registry-CQIT4mXr.js";
|
|
14
14
|
import { a as resolveRouteFromRoutes, t as _resolveRouteMatchFromRoutes } from "./route-matching-vJpvLVbX.js";
|
|
15
|
-
import { f as resolveRouteRequest, g as isPageRenderEnvelope, h as isEmptyPageRenderEnvelope, i as isDeferred, m as createPageRenderEnvelope, t as DEFERRED_BOUNDARY, x as _preloadRouteHandler } from "./deferred-
|
|
15
|
+
import { f as resolveRouteRequest, g as isPageRenderEnvelope, h as isEmptyPageRenderEnvelope, i as isDeferred, m as createPageRenderEnvelope, t as DEFERRED_BOUNDARY, x as _preloadRouteHandler } from "./deferred-BeNnjR4r.js";
|
|
16
16
|
import { n as renderDocument, t as SSR_RENDER_DATA_ATTR } from "./ssr-CbQO5xd3.js";
|
|
17
17
|
//#region src/ssr/escape.ts
|
|
18
18
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as isProductionEnvironment } from "./access-
|
|
2
|
-
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, t as isBulkCommitActive, u as markReadableDerivedSubscribersDirty } from "./fastlane-
|
|
1
|
+
import { x as isProductionEnvironment } from "./access-ePqdQqkV.js";
|
|
2
|
+
import { f as notifyReadableReaders, l as markReactivePropsDirtySource, p as recordReadableRead, t as isBulkCommitActive, u as markReadableDerivedSubscribersDirty } from "./fastlane-C8PYPotF.js";
|
|
3
3
|
import { i as claimHookIndex, p as getCurrentInstance } from "./component-scope-CC3cojX9.js";
|
|
4
4
|
//#region src/runtime/state.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as SSR_RENDER_DATA_ATTR } from "./ssr-CbQO5xd3.js";
|
|
2
|
-
import { a as renderResolvedToStringSync } from "./ssr-
|
|
2
|
+
import { a as renderResolvedToStringSync } from "./ssr-CbU-1UHm.js";
|
|
3
3
|
//#region src/ssr/verify-hydration.ts
|
|
4
4
|
function normalizeHydrationHtml(html) {
|
|
5
5
|
const template = document.createElement("template");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askrjs/askr",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.61",
|
|
4
4
|
"description": "Actor-backed deterministic UI framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"askr",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"test:types": "vp pack && tsd --files \"tests/types/**/*.test-d.ts\" --files \"tests/types/**/*.test-d.tsx\"",
|
|
133
133
|
"test:installed": "node tests/installed-types.js",
|
|
134
134
|
"test:publint": "publint",
|
|
135
|
-
"release:verify": "npm run lint && npm run build && npm run test:publint && npm run test:checks && npm run test:types && npm run test:installed && npm run test:unit && npm run test:jsdom && npm run test:browser",
|
|
135
|
+
"release:verify": "npm run lint && npm run build && npm run test:publint && npm run test:checks && npm run test:types && npm run test:installed && npm run test:unit && npm run test:jsdom && npm run test:browser && npm run build",
|
|
136
136
|
"pack:check": "node tests/package-artifacts.js",
|
|
137
137
|
"check": "npm run release:verify && npm run pack:check",
|
|
138
138
|
"test:unit": "vp test run -c vitest.test.unit.config.ts",
|