@askrjs/askr 0.0.77 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/actions/index.d.ts +1 -1
  2. package/dist/actions/index.js +2 -2
  3. package/dist/{activity-DaqZEUPh.d.ts → activity-CXEaU-Al.d.ts} +1 -1
  4. package/dist/{activity-BWQeEtNt.js → activity-DfrtblJA.js} +3 -3
  5. package/dist/{authoring-prA293gq.js → authoring-DE-LH_s-.js} +2 -2
  6. package/dist/benchmark.js +5 -5
  7. package/dist/boot/index.d.ts +4 -4
  8. package/dist/boot/index.js +1 -1
  9. package/dist/{boot-Cc5axhVo.js → boot-C5bZY3Uc.js} +12 -12
  10. package/dist/{component-internal-TurioKgs.js → component-internal-BuTG89T8.js} +11 -7
  11. package/dist/components/index.d.ts +1 -1
  12. package/dist/control/index.d.ts +1 -1
  13. package/dist/control/index.js +1 -1
  14. package/dist/control-C-ApnFs1.js +20 -0
  15. package/dist/{control-Uvq1GU4K.d.ts → control-Cix3yjVf.d.ts} +7 -1
  16. package/dist/{control-D9UorK1Q.js → control-DQIsWvhr.js} +2 -2
  17. package/dist/{csp-nonce-DYspaK0L.js → csp-nonce-BUsz0Em7.js} +1 -1
  18. package/dist/data/index.d.ts +1 -1
  19. package/dist/data/index.js +3 -3
  20. package/dist/{data-vaClyf1I.js → data-eBdygZ1f.js} +3 -3
  21. package/dist/{data-runtime-rpV6-3XW.js → data-runtime-D68YOo9L.js} +1 -1
  22. package/dist/{deferred-Dfk7vuTX.js → deferred-t79wHqe1.js} +5 -5
  23. package/dist/{for-internal-BM8KbadU.js → for-internal-BnXrQbgo.js} +1 -1
  24. package/dist/foundations/index.d.ts +1 -1
  25. package/dist/foundations/index.js +1 -1
  26. package/dist/foundations/state/index.d.ts +1 -1
  27. package/dist/foundations/structures/index.d.ts +1 -1
  28. package/dist/foundations/structures/index.js +1 -1
  29. package/dist/{index-Bki2rqcr.d.ts → index-5S-fi2xy.d.ts} +17 -17
  30. package/dist/{router-Dd-LoJmM.d.ts → index-TlEvex-C.d.ts} +162 -4
  31. package/dist/{index-CbRdEUPB.d.ts → index-Vs1EeWEr.d.ts} +2 -2
  32. package/dist/{index-acX2RLxD.d.ts → index-ho0Htetw.d.ts} +1 -1
  33. package/dist/index.d.ts +5 -5
  34. package/dist/index.js +8 -7
  35. package/dist/jsx-dev-runtime.js +1 -1
  36. package/dist/jsx-runtime.js +1 -1
  37. package/dist/{lifecycle-operations-DxwqHvyx.js → lifecycle-operations-CN0PiLE_.js} +1 -1
  38. package/dist/{navigate-DlaVqF4n.d.ts → navigate-DfY1BUYc.d.ts} +1 -1
  39. package/dist/{navigate-CwddZjwU.js → navigate-ype2B_M8.js} +6 -6
  40. package/dist/{portal-BsSJusvs.js → portal-BZ_rN17v.js} +14 -13
  41. package/dist/portal-w3oQ6oQU.js +29 -0
  42. package/dist/{query-registry-Bu_cuMch.js → query-registry-BL6rjGsO.js} +1 -1
  43. package/dist/{render-context-Clw3rFiO.js → render-context-D-DFk2WN.js} +13 -1
  44. package/dist/{renderer-Ba-KixHB.js → renderer-_l_U-AbR.js} +210 -45
  45. package/dist/resources/index.d.ts +2 -2
  46. package/dist/resources/index.js +4 -4
  47. package/dist/{route-matching-DqM8k4tZ.js → route-matching-jqwlQJ5g.js} +2 -2
  48. package/dist/router/index.d.ts +4 -4
  49. package/dist/router/index.js +5 -5
  50. package/dist/ssg/index.d.ts +2 -2
  51. package/dist/ssg/index.js +7 -5
  52. package/dist/ssr/index.d.ts +8 -25
  53. package/dist/ssr/index.js +2 -2
  54. package/dist/{ssr-Cv5qWPxz.js → ssr-Dcmi1bZi.js} +53 -24
  55. package/dist/testing/index.d.ts +3 -3
  56. package/dist/testing/index.js +3 -3
  57. package/dist/{verify-hydration-BC5bmXr4.js → verify-hydration-Dfx-ZhbX.js} +1 -1
  58. package/package.json +1 -1
  59. package/dist/control-DhFRTIoE.js +0 -12
  60. package/dist/index-CDACZEF2.d.ts +0 -102
  61. package/dist/index-vo_FDR-B.d.ts +0 -40
@@ -1,17 +1,18 @@
1
- import { t as __CONTROL_BOUNDARY__ } from "./control-DhFRTIoE.js";
1
+ import { n as hasTransparentComponentResult, t as __CONTROL_BOUNDARY__ } from "./control-C-ApnFs1.js";
2
2
  import { n as _isDOMElement, t as __ERROR_BOUNDARY__ } from "./vnode-D24p6IW2.js";
3
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
4
  import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-CkBXZ_3K.js";
5
5
  import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
6
- 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-TurioKgs.js";
6
+ 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-BuTG89T8.js";
7
7
  import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
8
8
  import { t as cleanupComponent } from "./component-cleanup-oWN45rfa.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-CwHCDseR.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-BM8KbadU.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-BnXrQbgo.js";
11
11
  import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-2IIWvUjG.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-CyY1ROBI.js";
13
+ import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
13
14
  import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
14
- import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-DYspaK0L.js";
15
+ import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-BUsz0Em7.js";
15
16
  //#region src/runtime/error-boundary.ts
16
17
  function createBoundaryReset(instance) {
17
18
  return () => {
@@ -1820,6 +1821,12 @@ function performFullReconciliation(parent, newChildren, oldKeyMap) {
1820
1821
  function isFragmentVNode(node) {
1821
1822
  return _isDOMElement(node) && isFragmentType(node.type);
1822
1823
  }
1824
+ function isTransparentComponentResult(result) {
1825
+ return Array.isArray(result) || _isDOMElement(result) && (result.type === __CONTROL_BOUNDARY__ || hasTransparentComponentResult(result.type) || isFragmentVNode(result));
1826
+ }
1827
+ function isTransparentComponentRangeResult(result) {
1828
+ return Array.isArray(result) || isFragmentVNode(result);
1829
+ }
1823
1830
  function normalizeComponentChildren(result) {
1824
1831
  if (result === null || result === void 0 || result === false) return [];
1825
1832
  if (Array.isArray(result)) {
@@ -2702,7 +2709,11 @@ function updateMixedControlChildren(parent, children, forceUpdate) {
2702
2709
  else if (cursorWasReplaced && isRangeStart(cursor)) cursor = findRangeEnd(cursor)?.nextSibling ?? last.end.nextSibling;
2703
2710
  else if (isRangeStart(cursor)) cursor = findRangeEnd(cursor)?.nextSibling ?? last.end.nextSibling;
2704
2711
  else cursor = last.end.nextSibling;
2705
- } else if (cursor?.parentNode !== parent) cursor = cursorAfterBoundary?.parentNode === parent ? cursorAfterBoundary : null;
2712
+ } else {
2713
+ const inactiveBoundaryCursor = cursor?.parentNode === parent ? cursor : cursorAfterBoundary?.parentNode === parent ? cursorAfterBoundary : null;
2714
+ const inactiveBoundaryEnd = inactiveBoundaryCursor && isRangeStart(inactiveBoundaryCursor) ? findRangeEnd(inactiveBoundaryCursor) : null;
2715
+ cursor = inactiveBoundaryEnd?.previousSibling === inactiveBoundaryCursor ? inactiveBoundaryEnd.nextSibling : inactiveBoundaryCursor;
2716
+ }
2706
2717
  continue;
2707
2718
  }
2708
2719
  if (cursor) cursor = removeRangeAtCursor(parent, cursor);
@@ -2717,7 +2728,7 @@ function updateMixedControlChildren(parent, children, forceUpdate) {
2717
2728
  continue;
2718
2729
  }
2719
2730
  if (cursor && _isDOMElement(child) && typeof child.type === "function") {
2720
- const synced = domHost.syncComponentElement(cursor, child, child.type, (child.props ?? {}) || {}, parentNamespace, forceUpdate);
2731
+ const synced = domHost.syncComponentElement(cursor, child, child.type, (child.props ?? {}) || {}, parentNamespace, forceUpdate, void 0, void 0, true);
2721
2732
  if (synced) {
2722
2733
  cursor = synced.nextSibling;
2723
2734
  continue;
@@ -2760,9 +2771,9 @@ function getOrBuildDomKeyMap(parent) {
2760
2771
  function updateUnkeyedChildren(parent, newChildren, forceUpdate = false) {
2761
2772
  const parentNamespace = getParentNamespace(parent);
2762
2773
  const domHost = getRendererDOMHost();
2763
- const trySyncComponentChild = (currentDom, next) => {
2774
+ const trySyncComponentChild = (currentDom, next, hydrationRangeEnd) => {
2764
2775
  if (typeof next.type !== "function") return null;
2765
- return domHost.syncComponentElement(currentDom, next, next.type, (next.props ?? {}) || {}, parentNamespace, forceUpdate);
2776
+ return domHost.syncComponentElement(currentDom, next, next.type, (next.props ?? {}) || {}, parentNamespace, forceUpdate, void 0, hydrationRangeEnd, true);
2766
2777
  };
2767
2778
  const hasText = newChildren.some((c) => typeof c === "string" || typeof c === "number");
2768
2779
  const hasElements = newChildren.some((c) => _isDOMElement(c));
@@ -2806,14 +2817,13 @@ function updateUnkeyedChildren(parent, newChildren, forceUpdate = false) {
2806
2817
  const existing = Array.from(parent.children);
2807
2818
  if (hasText || hasComponentChildren || hasEmptyChildren || hasNonElementDomChildren) {
2808
2819
  const allNodes = Array.from(parent.childNodes);
2809
- const max = Math.max(allNodes.length, newChildren.length);
2810
- for (let i = 0; i < max; i++) {
2820
+ for (let i = 0; i < Math.max(allNodes.length, newChildren.length); i += 1) {
2811
2821
  const currentNode = allNodes[i];
2812
2822
  const next = newChildren[i];
2813
2823
  const nextIsEmpty = isEmptyChild(next);
2814
2824
  if (nextIsEmpty && currentNode) {
2815
2825
  teardownNodeSubtree(currentNode);
2816
- currentNode.remove();
2826
+ currentNode.parentNode?.removeChild(currentNode);
2817
2827
  continue;
2818
2828
  }
2819
2829
  if (!currentNode && !nextIsEmpty) {
@@ -2841,7 +2851,18 @@ function updateUnkeyedChildren(parent, newChildren, forceUpdate = false) {
2841
2851
  }
2842
2852
  else {
2843
2853
  if (trySyncControlBoundaryChild(parent, currentNode, next)) continue;
2844
- if (!trySyncComponentChild(currentEl, next)) {
2854
+ const remainingExpected = newChildren.length - i - 1;
2855
+ const hydrationRangeEndIndex = allNodes.length - remainingExpected;
2856
+ const synced = trySyncComponentChild(currentEl, next, hydrationRangeEndIndex > i ? allNodes[hydrationRangeEndIndex] ?? null : void 0);
2857
+ if (synced && isRangeStart(synced)) {
2858
+ allNodes.splice(i, Math.max(1, hydrationRangeEndIndex - i), synced);
2859
+ continue;
2860
+ }
2861
+ if (synced && synced !== currentNode && synced.nextSibling === currentNode) {
2862
+ allNodes.splice(i, 0, synced);
2863
+ continue;
2864
+ }
2865
+ if (!synced) {
2845
2866
  const dom = domHost.createDOMNode(next, parentNamespace);
2846
2867
  if (dom) {
2847
2868
  teardownNodeSubtree(currentEl);
@@ -2850,7 +2871,20 @@ function updateUnkeyedChildren(parent, newChildren, forceUpdate = false) {
2850
2871
  }
2851
2872
  }
2852
2873
  } else {
2853
- if (typeof next.type === "function" && trySyncComponentChild(currentNode, next)) continue;
2874
+ if (typeof next.type === "function") {
2875
+ const remainingExpected = newChildren.length - i - 1;
2876
+ const hydrationRangeEndIndex = allNodes.length - remainingExpected;
2877
+ const synced = trySyncComponentChild(currentNode, next, hydrationRangeEndIndex > i ? allNodes[hydrationRangeEndIndex] ?? null : void 0);
2878
+ if (synced && isRangeStart(synced)) {
2879
+ allNodes.splice(i, Math.max(1, hydrationRangeEndIndex - i), synced);
2880
+ continue;
2881
+ }
2882
+ if (synced && synced !== currentNode && synced.nextSibling === currentNode) {
2883
+ allNodes.splice(i, 0, synced);
2884
+ continue;
2885
+ }
2886
+ if (synced) continue;
2887
+ }
2854
2888
  const dom = domHost.createDOMNode(next, parentNamespace);
2855
2889
  if (dom) {
2856
2890
  teardownNodeSubtree(currentNode);
@@ -4350,6 +4384,11 @@ function checkVNodeShapeChanged(dom, vnode) {
4350
4384
  if (typeof vnode.type !== "string") return true;
4351
4385
  return dom.tagName.toLowerCase() !== vnode.type.toLowerCase();
4352
4386
  }
4387
+ function canAdoptHydratedElement(dom, vnode) {
4388
+ if (!_isDOMElement(vnode)) return false;
4389
+ if (typeof vnode.type === "function") return true;
4390
+ return !checkVNodeShapeChanged(dom, vnode);
4391
+ }
4353
4392
  function adoptHydratedRange(parent, scope, before, vnode) {
4354
4393
  if (!scope.hydrationPending || !before || !isRangeStart(before)) return null;
4355
4394
  const end = findRangeEnd(before);
@@ -4518,7 +4557,7 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
4518
4557
  const item = controlState.orderedItems[index];
4519
4558
  const vnode = childrenVNodes[index];
4520
4559
  if (!item || vnode === void 0) continue;
4521
- if (item.scope.hydrationPending && !item.scope.range && syncBefore instanceof Element && getMaterializedKey(syncBefore) === controlState.orderedKeys[index] && !checkVNodeShapeChanged(syncBefore, vnode)) {
4560
+ if (item.scope.hydrationPending && !item.scope.range && syncBefore instanceof Element && getMaterializedKey(syncBefore) === controlState.orderedKeys[index] && canAdoptHydratedElement(syncBefore, vnode)) {
4522
4561
  assignScopeRange(item.scope, {
4523
4562
  start: syncBefore,
4524
4563
  end: syncBefore,
@@ -4548,6 +4587,14 @@ function syncControlBoundaryInMixedParent(parent, controlState, childrenVNodes,
4548
4587
  }
4549
4588
  const activeScope = controlState.activeScope;
4550
4589
  const activeVNode = childrenVNodes[0];
4590
+ if (activeScope?.hydrationPending && activeVNode !== void 0 && !activeScope.range && controlState.lastRemovedRanges.length === 0 && before instanceof Element && canAdoptHydratedElement(before, activeVNode)) {
4591
+ assignScopeRange(activeScope, {
4592
+ start: before,
4593
+ end: before,
4594
+ single: true
4595
+ });
4596
+ activeScope.hydrationPending = false;
4597
+ }
4551
4598
  const nextRange = activeScope && activeVNode !== void 0 ? syncControlBoundaryScopeDom(parent, activeScope, activeVNode, before, controlState.lastRemovedRanges.length === 0) : null;
4552
4599
  for (const range of controlState.lastRemovedRanges) if (range !== nextRange) removeRange(range, teardownBoundaryRangeNode);
4553
4600
  for (const node of controlState.lastRemovedNodes) if (node.parentNode === parent) teardownBoundaryRangeNode(node);
@@ -4800,12 +4847,60 @@ function unwrapStagingHost(staging, parent, restoreFocus) {
4800
4847
  function createAttributeFreeStagingHost(parent) {
4801
4848
  return parent.ownerDocument.createElementNS(parent.namespaceURI, parent.localName);
4802
4849
  }
4850
+ function isAutomaticPortalHost(node) {
4851
+ const host = node;
4852
+ const instances = new Set(host.__ASKR_INSTANCES ?? []);
4853
+ if (host.__ASKR_INSTANCE) instances.add(host.__ASKR_INSTANCE);
4854
+ return instances.size > 0 && Array.from(instances).some((candidate) => candidate.props.__askrAutoDefaultPortal === true);
4855
+ }
4856
+ function adoptHydratedComponentRange(existingHost, instance, result, endExclusive, forceChildrenUpdate, retainedInstances) {
4857
+ const parent = existingHost.parentNode;
4858
+ if (!(parent instanceof Element) || endExclusive !== null && endExclusive.parentNode !== parent) return null;
4859
+ if (endExclusive !== null) {
4860
+ let current = existingHost;
4861
+ while (current && current !== endExclusive) current = current.nextSibling;
4862
+ if (current !== endExclusive) return null;
4863
+ }
4864
+ const start = existingHost.ownerDocument.createComment(RANGE_START_MARKER);
4865
+ const end = existingHost.ownerDocument.createComment(RANGE_END_MARKER);
4866
+ parent.insertBefore(start, existingHost);
4867
+ parent.insertBefore(end, endExclusive);
4868
+ registerRange({
4869
+ start,
4870
+ end,
4871
+ single: false
4872
+ }, instance);
4873
+ const host = start;
4874
+ const owners = new Set(retainedInstances);
4875
+ owners.add(instance);
4876
+ host.__ASKR_INSTANCE = instance;
4877
+ host.__ASKR_INSTANCES = Array.from(owners);
4878
+ instance.target = null;
4879
+ instance._placeholder = start;
4880
+ mountInstanceInline(instance, null);
4881
+ const registered = registerLifecycleTransaction({}, () => {}, () => {
4882
+ start.parentNode?.removeChild(start);
4883
+ end.parentNode?.removeChild(end);
4884
+ });
4885
+ try {
4886
+ if (!syncComponentFragmentRange(host, instance, result, forceChildrenUpdate)) throw new Error("[askr] Failed to adopt hydrated component range.");
4887
+ } catch (error) {
4888
+ if (!registered) {
4889
+ start.remove();
4890
+ end.remove();
4891
+ }
4892
+ throw error;
4893
+ }
4894
+ return start;
4895
+ }
4803
4896
  function syncComponentFragmentRange(host, instance, result, forceUpdate) {
4804
- if (!isFragmentVNode(result)) return false;
4897
+ if (!isTransparentComponentRangeResult(result)) return false;
4805
4898
  const range = getOwnedRange(instance);
4806
4899
  const parent = range?.start.parentNode;
4807
4900
  if (!range || range.single || range.start !== host || !(parent instanceof Element)) return false;
4808
4901
  const restoreFocus = captureRangeFocus(range, parent);
4902
+ const normalizedChildren = normalizeComponentChildren(result);
4903
+ const preserveForeignHosts = Array.isArray(result);
4809
4904
  const staging = createAttributeFreeStagingHost(parent);
4810
4905
  try {
4811
4906
  parent.insertBefore(staging, range.end);
@@ -4818,10 +4913,15 @@ function syncComponentFragmentRange(host, instance, result, forceUpdate) {
4818
4913
  restoreFocus();
4819
4914
  return false;
4820
4915
  }
4821
- while (range.start.nextSibling && range.start.nextSibling !== staging) staging.appendChild(range.start.nextSibling);
4916
+ let current = range.start.nextSibling;
4917
+ while (current && current !== staging) {
4918
+ const next = current.nextSibling;
4919
+ if (!preserveForeignHosts || !isAutomaticPortalHost(current)) staging.appendChild(current);
4920
+ current = next;
4921
+ }
4822
4922
  const rollbackStaging = registerLifecycleTransaction({}, () => {}, () => unwrapStagingHost(staging, parent, restoreFocus));
4823
4923
  try {
4824
- getRendererDOMHost().updateElementChildren(staging, normalizeComponentChildren(result), forceUpdate);
4924
+ getRendererDOMHost().updateElementChildren(staging, normalizedChildren, forceUpdate);
4825
4925
  } catch (error) {
4826
4926
  if (!rollbackStaging) unwrapStagingHost(staging, parent, restoreFocus);
4827
4927
  throw error;
@@ -5029,11 +5129,19 @@ function inheritComponentKey(target, source) {
5029
5129
  }
5030
5130
  return target;
5031
5131
  }
5132
+ function extractComponentIdentityKey(node) {
5133
+ const publicKey = extractKey(node);
5134
+ if (publicKey !== void 0) return publicKey;
5135
+ if (typeof node !== "object" || node === null) return;
5136
+ const internalKey = node.props?.["__askrIdentityKey"];
5137
+ if (internalKey === void 0 || internalKey === null) return;
5138
+ return typeof internalKey === "symbol" ? String(internalKey) : internalKey;
5139
+ }
5032
5140
  function setComponentOwnershipIdentity(instance, node, parent, wrapperDepth = 0, position) {
5033
5141
  instance._vnodeOwner = typeof node === "object" && node !== null ? node : void 0;
5034
5142
  instance._vnodeParent = parent;
5035
5143
  instance._vnodeParentGeneration = parent?._ownershipGeneration;
5036
- const key = extractKey(node);
5144
+ const key = extractComponentIdentityKey(node);
5037
5145
  if (key === void 0) delete instance._vnodeKey;
5038
5146
  else instance._vnodeKey = key;
5039
5147
  instance._vnodePosition = position;
@@ -5044,7 +5152,7 @@ function findHostInstanceByType(host, type, node, parent, wrapperDepth) {
5044
5152
  if (instances && instances.length > 0) {
5045
5153
  const vnodeOwner = getVNodeComponentInstance(node);
5046
5154
  if (vnodeOwner && vnodeOwner.fn === type && instances.includes(vnodeOwner)) return vnodeOwner;
5047
- const key = extractKey(node);
5155
+ const key = extractComponentIdentityKey(node);
5048
5156
  const identityMatches = instances.filter((instance) => {
5049
5157
  if (instance.fn !== type) return false;
5050
5158
  if (parent !== void 0 && instance._vnodeParent !== parent) return false;
@@ -5060,7 +5168,7 @@ function findHostInstanceByType(host, type, node, parent, wrapperDepth) {
5060
5168
  }
5061
5169
  if (host.__ASKR_INSTANCE?.fn === type) {
5062
5170
  const instance = host.__ASKR_INSTANCE;
5063
- const key = extractKey(node);
5171
+ const key = extractComponentIdentityKey(node);
5064
5172
  if ((parent === void 0 || instance._vnodeParent === parent) && (key === void 0 || instance._vnodeKey === key) && (wrapperDepth === void 0 || instance._wrapperDepth === wrapperDepth)) return instance;
5065
5173
  if (node === void 0 && parent === void 0 && wrapperDepth === void 0) return instance;
5066
5174
  }
@@ -5068,8 +5176,9 @@ function findHostInstanceByType(host, type, node, parent, wrapperDepth) {
5068
5176
  }
5069
5177
  /**
5070
5178
  * Resolve an instance on a comment host only when the vnode carries durable
5071
- * identity. Fresh unkeyed null components intentionally supersede the old
5072
- * generation instead of falling back to type-only reuse.
5179
+ * identity. An unkeyed multi-node range can also move through transparent
5180
+ * wrapper owners while its recorded owner generation remains live. Fresh
5181
+ * unkeyed null components still supersede the old generation.
5073
5182
  */
5074
5183
  function findStableHostInstanceByType(host, type, node, parent, wrapperDepth) {
5075
5184
  const instances = new Set(host.__ASKR_INSTANCES ?? []);
@@ -5077,10 +5186,21 @@ function findStableHostInstanceByType(host, type, node, parent, wrapperDepth) {
5077
5186
  const parentGeneration = parent?._ownershipGeneration;
5078
5187
  const vnodeOwner = getVNodeComponentInstance(node);
5079
5188
  if (vnodeOwner?.fn === type && instances.has(vnodeOwner) && vnodeOwner._vnodeParent === parent && vnodeOwner._vnodeParentGeneration === parentGeneration) return vnodeOwner;
5080
- const key = extractKey(node);
5081
- if (key === void 0) return null;
5189
+ const key = extractComponentIdentityKey(node);
5190
+ if (key === void 0) {
5191
+ const rangeMatches = Array.from(instances).filter((instance) => {
5192
+ const range = getOwnedRange(instance);
5193
+ return instance.fn === type && instance._vnodeParent !== parent && instance._vnodeParent != null && instance._vnodeParentGeneration === instance._vnodeParent._ownershipGeneration && instance._vnodeKey === void 0 && instance._wrapperDepth === wrapperDepth && (range?.single === false && range.start === host || host instanceof Comment && host.data === "askr-range-start" && instance._placeholder === host);
5194
+ });
5195
+ return rangeMatches.length === 1 ? rangeMatches[0] : null;
5196
+ }
5082
5197
  const matches = Array.from(instances).filter((instance) => instance.fn === type && instance._vnodeParent === parent && instance._vnodeParentGeneration === parentGeneration && instance._vnodeKey === key && instance._wrapperDepth === wrapperDepth);
5083
- return matches.length > 0 ? matches[matches.length - 1] : null;
5198
+ if (matches.length > 0) return matches[matches.length - 1];
5199
+ const rangeMatches = Array.from(instances).filter((instance) => {
5200
+ const range = getOwnedRange(instance);
5201
+ return instance.fn === type && instance._vnodeParent !== parent && instance._vnodeParent != null && instance._vnodeParentGeneration === instance._vnodeParent._ownershipGeneration && instance._vnodeKey === key && instance._wrapperDepth === wrapperDepth && (range?.single === false && range.start === host || host instanceof Comment && host.data === "askr-range-start" && instance._placeholder === host);
5202
+ });
5203
+ return rangeMatches.length === 1 ? rangeMatches[0] : null;
5084
5204
  }
5085
5205
  //#endregion
5086
5206
  //#region src/renderer/component-host-replacement.ts
@@ -5223,6 +5343,39 @@ function registerVNodeComponentInstanceRollback(node, previousInstance, provisio
5223
5343
  }
5224
5344
  //#endregion
5225
5345
  //#region src/renderer/component-host-results.ts
5346
+ function retainReplacementOwnerChain(host, owner, retainedInstances) {
5347
+ const componentHost = host;
5348
+ const next = [...componentHost.__ASKR_INSTANCES ?? []];
5349
+ for (const instance of retainedInstances) if (!next.includes(instance)) next.push(instance);
5350
+ componentHost.__ASKR_INSTANCES = next;
5351
+ componentHost.__ASKR_INSTANCE = owner;
5352
+ }
5353
+ function adoptEmptySSRPortalHydrationHost(host, instance, retainedInstances, result) {
5354
+ if (!isSSRPortalHydrationAnchor(host) || result !== null && result !== void 0 && result !== false) return false;
5355
+ const instanceHost = host;
5356
+ instanceHost.__ASKR_INSTANCE = instance;
5357
+ instanceHost.__ASKR_INSTANCES = Array.from(/* @__PURE__ */ new Set([instance, ...retainedInstances]));
5358
+ instance._placeholder = instanceHost;
5359
+ mountInstanceInline(instance, null);
5360
+ retainReplacementOwnerChain(instanceHost, instance, retainedInstances);
5361
+ return true;
5362
+ }
5363
+ function materializeEmptyHydrationPlaceholder(existingHost, instance, retainedInstances, result, preserveHydrationCursor) {
5364
+ if (!preserveHydrationCursor && !isSSRPortalHydrationAnchor(existingHost) || result !== null && result !== void 0 && result !== false) return null;
5365
+ const placeholder = isSSRPortalHydrationAnchor(existingHost) ? existingHost : (existingHost.ownerDocument ?? document).createComment("");
5366
+ if (placeholder !== existingHost) existingHost.parentNode?.insertBefore(placeholder, existingHost);
5367
+ const host = placeholder;
5368
+ host.__ASKR_INSTANCE = instance;
5369
+ host.__ASKR_INSTANCES = [instance];
5370
+ instance._placeholder = placeholder;
5371
+ mountInstanceInline(instance, null);
5372
+ retainReplacementOwnerChain(placeholder, instance, retainedInstances);
5373
+ return placeholder;
5374
+ }
5375
+ function itemInstanceHydrationComplete(host) {
5376
+ const scope = host.__ASKR_INSTANCE?.scope;
5377
+ if (scope) scope.hydrationPending = false;
5378
+ }
5226
5379
  function materializeComponentResultNode(childInstance, result, parentNamespace) {
5227
5380
  const dom = getRendererDOMHost().createComponentResultNode(childInstance.fn, result, parentNamespace);
5228
5381
  if (dom instanceof Element) {
@@ -5240,7 +5393,17 @@ function materializeComponentResultNode(childInstance, result, parentNamespace)
5240
5393
  mountInstanceInline(childInstance, null);
5241
5394
  return placeholder;
5242
5395
  }
5243
- if (!_isDOMElement(result) || result.type !== __CONTROL_BOUNDARY__ && !isFragmentVNode(result)) {
5396
+ if (dom instanceof Comment) {
5397
+ const host = dom;
5398
+ const instances = host.__ASKR_INSTANCES ?? [];
5399
+ if (!instances.includes(childInstance)) instances.push(childInstance);
5400
+ host.__ASKR_INSTANCES = instances;
5401
+ host.__ASKR_INSTANCE = instances[0] ?? childInstance;
5402
+ childInstance._placeholder = dom;
5403
+ mountInstanceInline(childInstance, null);
5404
+ return dom;
5405
+ }
5406
+ if (!isTransparentComponentResult(result)) {
5244
5407
  const host = document.createElement("div");
5245
5408
  host.appendChild(dom);
5246
5409
  host.__ASKR_WRAPPER_HOST = true;
@@ -5364,15 +5527,15 @@ function resolveWrapperHostResult(host, result, snapshot, retainedInstances) {
5364
5527
  }
5365
5528
  //#endregion
5366
5529
  //#region src/renderer/component-host.ts
5367
- function syncComponentElement(currentDom, node, type, props, parentNamespace, forceChildrenUpdate = false, retainedHostInstances) {
5530
+ function syncComponentElement(currentDom, node, type, props, parentNamespace, forceChildrenUpdate = false, retainedHostInstances, hydrationRangeEnd, preserveHydrationCursorOnEmpty = false) {
5368
5531
  const existingHost = currentDom instanceof Element || currentDom instanceof Comment ? currentDom : null;
5369
5532
  const existingInstance = existingHost ? existingHost instanceof Comment ? findStableHostInstanceByType(existingHost, type, node, getCurrentInstance(), 0) : findHostInstanceByType(existingHost, type, node, getCurrentInstance(), 0) : null;
5370
5533
  if (!existingHost) return null;
5371
5534
  const domHost = getRendererDOMHost();
5372
5535
  if (!existingInstance || existingInstance.fn !== type) {
5373
- if (!(existingHost instanceof Element)) return null;
5536
+ if (!(existingHost instanceof Element) && !isSSRPortalHydrationAnchor(existingHost)) return null;
5374
5537
  const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame() || null;
5375
- const hydrationInstance = createComponentInstance(nextComponentInstanceId(), type, props || {}, existingHost);
5538
+ const hydrationInstance = createComponentInstance(nextComponentInstanceId(), type, props || {}, existingHost instanceof Element ? existingHost : null);
5376
5539
  setComponentOwnershipIdentity(hydrationInstance, node, getCurrentInstance(), 0);
5377
5540
  hydrationInstance.isRoot = isRouteRootComponentVNode(node);
5378
5541
  hydrationInstance.portalScope = getCurrentInstance()?.portalScope ?? hydrationInstance.portalScope;
@@ -5388,7 +5551,13 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
5388
5551
  const result = withContext(snapshot, () => renderComponentInline(hydrationInstance));
5389
5552
  if (isPromiseLike(result)) throw new Error("Async components are not supported. Components must return synchronously.");
5390
5553
  const scopedResult = markVNodeTreeWithContextFrame(result, snapshot ?? null);
5391
- if (scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase$1(existingHost.tagName, scopedResult.type)) {
5554
+ const emptyPlaceholder = materializeEmptyHydrationPlaceholder(existingHost, hydrationInstance, liveRetainedInstances, scopedResult, preserveHydrationCursorOnEmpty);
5555
+ if (emptyPlaceholder) return emptyPlaceholder;
5556
+ if (hydrationRangeEnd !== void 0 && isTransparentComponentRangeResult(scopedResult)) {
5557
+ const adoptedHost = adoptHydratedComponentRange(existingHost, hydrationInstance, scopedResult, hydrationRangeEnd, forceChildrenUpdate || hydrationInstance.mounted === false, liveRetainedInstances);
5558
+ if (adoptedHost) return adoptedHost;
5559
+ }
5560
+ if (existingHost instanceof Element && scopedResult && typeof scopedResult === "object" && "type" in scopedResult && typeof scopedResult.type === "string" && tagNamesEqualIgnoreCase$1(existingHost.tagName, scopedResult.type)) {
5392
5561
  withContext(snapshot, () => {
5393
5562
  domHost.updateElementFromVnode(existingHost, inheritComponentKey(scopedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
5394
5563
  materializeKey(existingHost, node, props);
@@ -5398,7 +5567,12 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
5398
5567
  return existingHost;
5399
5568
  }
5400
5569
  const resolvedResult = resolveHostNestedComponentResult(existingHost, hydrationInstance, scopedResult, snapshot ?? null, liveRetainedInstances);
5401
- if (_isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase$1(existingHost.tagName, resolvedResult.type)) {
5570
+ if (adoptEmptySSRPortalHydrationHost(existingHost, hydrationInstance, liveRetainedInstances, resolvedResult)) return existingHost;
5571
+ if (hydrationRangeEnd !== void 0 && isTransparentComponentRangeResult(resolvedResult)) {
5572
+ const adoptedHost = adoptHydratedComponentRange(existingHost, hydrationInstance, resolvedResult, hydrationRangeEnd, forceChildrenUpdate || hydrationInstance.mounted === false, liveRetainedInstances);
5573
+ if (adoptedHost) return adoptedHost;
5574
+ }
5575
+ if (existingHost instanceof Element && _isDOMElement(resolvedResult) && typeof resolvedResult.type === "string" && tagNamesEqualIgnoreCase$1(existingHost.tagName, resolvedResult.type)) {
5402
5576
  withContext(snapshot, () => {
5403
5577
  domHost.updateElementFromVnode(existingHost, inheritComponentKey(resolvedResult, node), true, forceChildrenUpdate || hydrationInstance.mounted === false);
5404
5578
  materializeKey(existingHost, node, props);
@@ -5445,6 +5619,7 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
5445
5619
  return existingHost;
5446
5620
  }
5447
5621
  const resolvedResult = resolveHostNestedComponentResult(existingHost, existingInstance, scopedResult, snapshot ?? null, liveRetainedInstances);
5622
+ if (existingHost instanceof Comment && syncComponentFragmentRange(existingHost, existingInstance, resolvedResult, forceChildrenUpdate || existingInstance.mounted === false)) return existingHost;
5448
5623
  if (existingHost instanceof Comment && (resolvedResult === null || resolvedResult === void 0 || resolvedResult === false)) {
5449
5624
  retainReplacementOwnerChain(existingHost, existingInstance, liveRetainedInstances);
5450
5625
  for (const instance of liveRetainedInstances) if (instance.target === null || instance._placeholder === existingHost) {
@@ -5465,20 +5640,6 @@ function syncComponentElement(currentDom, node, type, props, parentNamespace, fo
5465
5640
  retainReplacementOwnerChain(replacement, existingInstance, liveRetainedInstances);
5466
5641
  });
5467
5642
  }
5468
- function retainReplacementOwnerChain(host, owner, retainedInstances) {
5469
- const componentHost = host;
5470
- const next = [...componentHost.__ASKR_INSTANCES ?? []];
5471
- for (const instance of retainedInstances) if (!next.includes(instance)) next.push(instance);
5472
- componentHost.__ASKR_INSTANCES = next;
5473
- componentHost.__ASKR_INSTANCE = owner;
5474
- }
5475
- function itemInstanceHydrationComplete(host) {
5476
- const instance = host.__ASKR_INSTANCE;
5477
- if (instance) {
5478
- const scope = instance.scope;
5479
- if (scope) scope.hydrationPending = false;
5480
- }
5481
- }
5482
5643
  function createComponentElement(node, type, props, parentNamespace) {
5483
5644
  const snapshot = getVNodeContextFrame(node) || getCurrentContextFrame();
5484
5645
  const componentFn = type;
@@ -6529,6 +6690,10 @@ function replaceComponentRange(instance, result, placeholder) {
6529
6690
  const parent = placeholder.parentNode;
6530
6691
  if (!previousRange || previousRange.single || previousRange.start !== placeholder || !(parent instanceof Element)) return null;
6531
6692
  if (syncComponentFragmentRange(placeholder, instance, result, false)) return placeholder;
6693
+ if (_isDOMElement(result) && hasTransparentComponentResult(result.type)) {
6694
+ const retainedInstances = createRetainedHostInstanceSet(instance);
6695
+ if (syncComponentFragmentRange(placeholder, instance, resolveHostNestedComponentResult(placeholder, instance, result, getVNodeContextFrame(result) ?? instance.ownerFrame ?? null, retainedInstances), false)) return placeholder;
6696
+ }
6532
6697
  const next = createDetachedRange(materializeComponentResultNode(instance, result, getParentNamespace(parent)), instance);
6533
6698
  const nextHost = next.range.start;
6534
6699
  nextHost.__ASKR_INSTANCE = instance;
@@ -1,5 +1,5 @@
1
- import { h as getSignal } from "../index-CDACZEF2.js";
2
- import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-DaqZEUPh.js";
1
+ import { ut as getSignal } from "../index-TlEvex-C.js";
2
+ import { i as onRouteChange, n as RouteChangeOptions, t as RouteChangeCleanup } from "../activity-CXEaU-Al.js";
3
3
  //#region src/runtime/resource-operation.d.ts
4
4
  interface ResourceResult<T> {
5
5
  value: T | null;
@@ -1,9 +1,9 @@
1
1
  import { t as enqueueRuntimeLane } from "../access-ePqdQqkV.js";
2
- import { a as registerCommitOperation } from "../component-internal-TurioKgs.js";
2
+ import { a as registerCommitOperation } from "../component-internal-BuTG89T8.js";
3
3
  import { f as getCurrentComponentInstance, g as getSignal, i as claimHookIndex } from "../component-scope-DzJEbYGE.js";
4
- import { z as resource } from "../route-matching-DqM8k4tZ.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-DxwqHvyx.js";
6
- import { n as onRouteChange } from "../activity-BWQeEtNt.js";
4
+ import { z as resource } from "../route-matching-jqwlQJ5g.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-CN0PiLE_.js";
6
+ import { n as onRouteChange } from "../activity-DfrtblJA.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));
@@ -1,9 +1,9 @@
1
1
  import { t as enqueueRuntimeLane, v as logger } from "./access-ePqdQqkV.js";
2
- import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-TurioKgs.js";
2
+ import { c as registerCommitOperationForInstance, d as getCurrentContextFrame, v as withAsyncResourceContext } from "./component-internal-BuTG89T8.js";
3
3
  import { f as getCurrentComponentInstance } from "./component-scope-DzJEbYGE.js";
4
4
  import { p as isPromiseLike } from "./lifecycle-batch-CwHCDseR.js";
5
5
  import { t as brandSnapshotSource } from "./snapshot-source-BB42xgwb.js";
6
- import { i as getNextRenderKey, l as throwSSRDataMissing, n as getActiveRenderContext, r as getCurrentRenderData, u as SSRDataMissingError } from "./render-context-Clw3rFiO.js";
6
+ import { d as SSRDataMissingError, i as getNextRenderKey, n as getActiveRenderContext, r as getCurrentRenderData, u as throwSSRDataMissing } from "./render-context-D-DFk2WN.js";
7
7
  import { t as state } from "./state-BCl9DeiN.js";
8
8
  //#region src/runtime/resource-cell.ts
9
9
  /**
@@ -1,9 +1,9 @@
1
- import { c as RenderableChild } from "../control-Uvq1GU4K.js";
1
+ import { c as RenderableChild } from "../control-Cix3yjVf.js";
2
2
  import { r as JSXElement, s as Props } from "../jsx-Dvr2SGRG.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-TlEvex-C.js";
3
4
  import "../types-C9YcqVpk.js";
4
- import { A as RouteRecord, B as RouteSnapshot, C as RouteMetaSource, D as RoutePathParams, E as RouteParams, F as RouteRenderResult, I as RouteRequestOptions, L as RouteRequestResult, M as RouteRefSearch, N as RouteRegistry, O as RoutePolicy, P as RouteRegistryOptions, R as RouteSearch, S as RouteMeta, T as RouteOptions, _ as RouteDefinition, a as AccessRedirectDecision, b as RouteManifest, c as LayoutScopeRecord, d as ParsedSegment, f as Route, g as RouteContext, h as RouteComponent, i as AccessDenyStatus, j as RouteRef, k as RouteQuery, l as PageHelperOptions, m as RouteAuthResolver, n as AccessDecision, o as AccessRedirectStatus, p as RouteAuthOptions, r as AccessDenyDecision, s as GroupHelperOptions, t as AccessAllowDecision, u as PageScopeRecord, v as RouteDestination, w as RouteMode, x as RouteMatch, y as RouteHandler, z as RouteSearchValue } from "../router-Dd-LoJmM.js";
5
- import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-DlaVqF4n.js";
6
- import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-DaqZEUPh.js";
5
+ import { a as ScrollRestorationOptions, i as NavigationScrollBehavior, n as NavigateOptions, r as HistoryScrollBehavior, t as navigate } from "../navigate-DfY1BUYc.js";
6
+ import { i as onRouteChange, n as RouteChangeOptions, r as currentRoute, t as RouteChangeCleanup } from "../activity-CXEaU-Al.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
@@ -1,9 +1,9 @@
1
- import { a as resolveDeferredValues, b as Outlet, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, n as Resolve, r as defer, s as routeData, w as lazy, y as currentAuth } from "../deferred-Dfk7vuTX.js";
2
- import { a as isSafeHref } from "../csp-nonce-DYspaK0L.js";
1
+ import { a as resolveDeferredValues, b as Outlet, i as isDeferred, l as createRouteRegistry, m as resolveRouteRequest, n as Resolve, r as defer, s as routeData, w as lazy, y as currentAuth } from "../deferred-t79wHqe1.js";
2
+ import { a as isSafeHref } from "../csp-nonce-BUsz0Em7.js";
3
3
  import { jsx } from "../jsx-runtime.js";
4
- import { a as route, i as page, n as group, r as index, t as fallback } from "../authoring-prA293gq.js";
5
- import { n as onRouteChange, t as currentRoute } from "../activity-BWQeEtNt.js";
6
- 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-CwddZjwU.js";
4
+ import { a as route, i as page, n as group, r as index, t as fallback } from "../authoring-DE-LH_s-.js";
5
+ import { n as onRouteChange, t as currentRoute } from "../activity-DfrtblJA.js";
6
+ 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-ype2B_M8.js";
7
7
  import { o as mergeProps } from "../compose-ref-Cc_YkUpM.js";
8
8
  import { t as applyInteractionPolicy } from "../interactions-w7gQN4ha.js";
9
9
  //#region src/router/route-query.ts
@@ -1,5 +1,5 @@
1
- import { d as DocumentRenderContext, f as DocumentRenderer, u as DocumentRenderArgs } from "../control-Uvq1GU4K.js";
2
- import { D as RoutePathParams, N as RouteRegistry, O as RoutePolicy, T as RouteOptions, y as RouteHandler } from "../router-Dd-LoJmM.js";
1
+ import { d as DocumentRenderContext, f as DocumentRenderer, u as DocumentRenderArgs } from "../control-Cix3yjVf.js";
2
+ import { A as RouteHandler, I as RouteOptions, R as RoutePathParams, W as RouteRegistry, z as RoutePolicy } from "../index-TlEvex-C.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,8 +1,8 @@
1
1
  import "../access-ePqdQqkV.js";
2
- import { C as _preloadRouteHandler, S as getRenderHandler, a as resolveDeferredValues, l as createRouteRegistry, u as bindResolvedRouteData } from "../deferred-Dfk7vuTX.js";
3
- import { a as route } from "../authoring-prA293gq.js";
2
+ import { C as _preloadRouteHandler, S as getRenderHandler, a as resolveDeferredValues, l as createRouteRegistry, u as bindResolvedRouteData } from "../deferred-t79wHqe1.js";
3
+ import { a as route } from "../authoring-DE-LH_s-.js";
4
4
  import { n as renderDocument } from "../ssr-CbQO5xd3.js";
5
- import { n as renderToString } from "../ssr-Cv5qWPxz.js";
5
+ import { n as renderToString } from "../ssr-Dcmi1bZi.js";
6
6
  import * as fs from "node:fs/promises";
7
7
  import * as pathModule from "node:path";
8
8
  import * as os from "node:os";
@@ -197,7 +197,7 @@ async function batchRenderRoutes(routes, options = {}) {
197
197
  registry,
198
198
  seed,
199
199
  data: baseData,
200
- document: document === void 0 ? void 0 : ({ appHtml }) => renderDocument(document, {
200
+ document: document === void 0 ? void 0 : ({ appHtml, context }) => renderDocument(document, {
201
201
  appHtml,
202
202
  context: {
203
203
  mode: "ssg",
@@ -211,7 +211,9 @@ async function batchRenderRoutes(routes, options = {}) {
211
211
  route: {
212
212
  path: route$2.path,
213
213
  namespace: route$2.namespace
214
- }
214
+ },
215
+ cspNonce: context.cspNonce,
216
+ styles: context.styles
215
217
  }
216
218
  }, "createStaticGen()")
217
219
  });