@askrjs/askr 0.0.84 → 0.0.86

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 (71) hide show
  1. package/dist/{access-ePqdQqkV.js → access-Dpfoi4cA.js} +7 -1
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/index.js +3 -3
  4. package/dist/{activity-pySy9t7Y.d.ts → activity-B1I5HJQI.d.ts} +1 -1
  5. package/dist/{activity-CZiPgZy0.js → activity-BvgvaMZA.js} +53 -16
  6. package/dist/benchmark.js +8 -8
  7. package/dist/boot/index.d.ts +3 -3
  8. package/dist/boot/index.js +1 -1
  9. package/dist/{boot-D28lesMw.js → boot-CViTpUiB.js} +22 -20
  10. package/dist/{cleanup-ARiXproi.js → cleanup-c837KVij.js} +16 -6
  11. package/dist/{component-cleanup-Bug5tSiG.js → component-cleanup-BUfUleGZ.js} +2 -2
  12. package/dist/{component-internal-Bw4Mf9fd.js → component-internal-DcrLymUJ.js} +5 -5
  13. package/dist/components/index.d.ts +1 -1
  14. package/dist/components/index.js +1 -1
  15. package/dist/control/index.d.ts +1 -1
  16. package/dist/control/index.js +1 -1
  17. package/dist/{control-Y8F73Uln.d.ts → control-DhUZU4_V.d.ts} +2 -1
  18. package/dist/{control-nrS65oG3.js → control-oLADku43.js} +4 -4
  19. package/dist/{csp-nonce-ZTlD_EnK.js → csp-nonce-Bc52OIVc.js} +19 -2
  20. package/dist/data/index.js +3 -3
  21. package/dist/{data-BRS5woEh.js → data-DGrD3-qA.js} +5 -5
  22. package/dist/{data-runtime-D68YOo9L.js → data-runtime-Ck3tJDDQ.js} +1 -1
  23. package/dist/default-portal-runtime-DvMvWJVp.js +20 -0
  24. package/dist/{authoring-DQPG0VAm.js → deferred-nleQtdfY.js} +85 -5
  25. package/dist/{effect-B487asyz.js → effect-lnxQIpJG.js} +2 -2
  26. package/dist/{fastlane-BOr4lSLl.js → fastlane-CrfB3QG0.js} +2 -2
  27. package/dist/{for-internal-DjpV8ioj.js → for-internal-B_mnQhan.js} +18 -6
  28. package/dist/foundations/index.d.ts +1 -1
  29. package/dist/foundations/index.js +1 -2
  30. package/dist/foundations/state/index.d.ts +1 -1
  31. package/dist/foundations/state/index.js +1 -1
  32. package/dist/foundations/structures/index.d.ts +2 -2
  33. package/dist/foundations/structures/index.js +2 -3
  34. package/dist/fx/index.js +1 -1
  35. package/dist/{index-BApH3laU.d.ts → index-DflhL1h8.d.ts} +20 -16
  36. package/dist/{index-_UN08Pg1.d.ts → index-pIgGaXvS.d.ts} +19 -3
  37. package/dist/{index-DUXXZ31H.d.ts → index-r-nt13FE.d.ts} +1 -1
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +12 -12
  40. package/dist/{lifecycle-batch-CFI4NKpJ.js → lifecycle-batch-Dfpid9-A.js} +39 -20
  41. package/dist/{lifecycle-operations-KYOIcM5R.js → lifecycle-operations-BrYrBsXY.js} +1 -1
  42. package/dist/manifest-D1P9uTlz.js +53 -0
  43. package/dist/{navigate-Dr3cjOSz.js → navigate-BwAPbpCb.js} +17 -16
  44. package/dist/{navigate-CgVIrrSs.d.ts → navigate-NyIjQUwI.d.ts} +1 -1
  45. package/dist/{query-registry-BL6rjGsO.js → query-registry-CPW_6nwF.js} +1 -1
  46. package/dist/{readable-_GQGe_St.js → readable-B5NtV7V0.js} +1 -1
  47. package/dist/render-context-D0Hoj9dW.js +161 -0
  48. package/dist/{renderer-B9j5IV1q.js → renderer-D9DL9R2D.js} +58 -17
  49. package/dist/{deferred-oqtAJ4iH.js → resolution-YHwi4Bav.js} +234 -222
  50. package/dist/resource-operation-ys6eDoRJ.js +304 -0
  51. package/dist/resources/index.d.ts +2 -2
  52. package/dist/resources/index.js +5 -5
  53. package/dist/{route-matching-IfQZmqkN.js → route-matching-DqULzZtC.js} +46 -277
  54. package/dist/router/index.d.ts +12 -10
  55. package/dist/router/index.js +10 -7
  56. package/dist/{selector-DJ1-N1K-.js → selector-Ck_Pp9av.js} +2 -2
  57. package/dist/ssg/index.d.ts +9 -3
  58. package/dist/ssg/index.js +31 -15
  59. package/dist/ssr/index.d.ts +7 -3
  60. package/dist/ssr/index.js +2 -2
  61. package/dist/{ssr-CtC4lChT.js → ssr-B98593qJ.js} +53 -27
  62. package/dist/ssr-DSHd_Q9K.js +25 -0
  63. package/dist/{state-BzIMC6-i.js → state-DCjONcHK.js} +4 -3
  64. package/dist/{portal-pHBoqwYd.js → structures-DsOm-clq.js} +236 -7
  65. package/dist/testing/index.d.ts +2 -2
  66. package/dist/testing/index.js +4 -4
  67. package/dist/{verify-hydration-BguOSco9.js → verify-hydration-ww1dgwea.js} +5 -4
  68. package/package.json +2 -2
  69. package/dist/render-context-D-DFk2WN.js +0 -73
  70. package/dist/ssr-CbQO5xd3.js +0 -12
  71. package/dist/structures-D3vO-WMN.js +0 -221
@@ -0,0 +1,161 @@
1
+ //#region src/common/ssr-errors.ts
2
+ /**
3
+ * Common call contracts: SSR error types
4
+ */
5
+ var SSRDataMissingError = class SSRDataMissingError extends Error {
6
+ constructor(message = "Server-side rendering requires all data to be available synchronously. This component attempted to use async data during SSR.") {
7
+ super(message);
8
+ this.code = "SSR_DATA_MISSING";
9
+ this.name = "SSRDataMissingError";
10
+ Object.setPrototypeOf(this, SSRDataMissingError.prototype);
11
+ }
12
+ };
13
+ //#endregion
14
+ //#region src/common/page-render-envelope.ts
15
+ const PAGE_RENDER_ENVELOPE_VERSION = 1;
16
+ function ownedRecord(value) {
17
+ return Object.freeze({ ...value });
18
+ }
19
+ function createPageRenderEnvelope(input = {}) {
20
+ return Object.freeze({
21
+ version: PAGE_RENDER_ENVELOPE_VERSION,
22
+ resources: ownedRecord(input.resources),
23
+ route: input.route,
24
+ framework: ownedRecord(input.framework)
25
+ });
26
+ }
27
+ function isPageRenderEnvelope(value) {
28
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
29
+ const candidate = value;
30
+ return candidate.version === PAGE_RENDER_ENVELOPE_VERSION && Boolean(candidate.resources && typeof candidate.resources === "object" && !Array.isArray(candidate.resources)) && Boolean(candidate.framework && typeof candidate.framework === "object" && !Array.isArray(candidate.framework));
31
+ }
32
+ function pageRenderEnvelope(value, fallback = {}) {
33
+ if (isPageRenderEnvelope(value)) return value;
34
+ return createPageRenderEnvelope({
35
+ ...fallback,
36
+ route: value ?? fallback.route
37
+ });
38
+ }
39
+ function replacePageRoute(value, route) {
40
+ const current = pageRenderEnvelope(value);
41
+ return createPageRenderEnvelope({
42
+ resources: current.resources,
43
+ route,
44
+ framework: current.framework
45
+ });
46
+ }
47
+ function withPageFramework(value, framework) {
48
+ const current = pageRenderEnvelope(value);
49
+ return createPageRenderEnvelope({
50
+ resources: current.resources,
51
+ route: current.route,
52
+ framework
53
+ });
54
+ }
55
+ function isEmptyPageRenderEnvelope(value) {
56
+ return value.route === void 0 && Object.keys(value.resources).length === 0 && Object.keys(value.framework).length === 0;
57
+ }
58
+ //#endregion
59
+ //#region src/common/render-context.ts
60
+ let provider = { getRenderContext() {
61
+ return null;
62
+ } };
63
+ let hydrationRenderData = null;
64
+ let hydrationKeyCounter = 0;
65
+ let hydrationVerificationDepth = 0;
66
+ const RESOURCE_VERIFICATION_SNAPSHOTS = "rv";
67
+ function configureRenderContextProvider(nextProvider) {
68
+ provider = nextProvider;
69
+ }
70
+ function getActiveRenderContext() {
71
+ return provider.getRenderContext();
72
+ }
73
+ /** Register request-local CSS produced during SSR without importing the SSR renderer in clients. */
74
+ function registerSSRStyle(id, cssText) {
75
+ const context = getActiveRenderContext();
76
+ if (!context?.ssrStyles) return;
77
+ const safeCssText = cssText.replace(/<\/style/gi, "<\\/style");
78
+ const existing = context.ssrStyles.get(id);
79
+ if (existing && existing.cssText !== safeCssText) throw new RangeError(`SSR style registration collision for ${JSON.stringify(id)}.`);
80
+ context.ssrStyles.set(id, {
81
+ id,
82
+ cssText: safeCssText
83
+ });
84
+ }
85
+ function getCurrentRenderData() {
86
+ return getActiveRenderContext()?.renderData ?? hydrationRenderData;
87
+ }
88
+ function getNextRenderKey() {
89
+ const ctx = getActiveRenderContext();
90
+ if (ctx) return `r:${ctx.keyCounter++}`;
91
+ if (hydrationRenderData) return `r:${hydrationKeyCounter++}`;
92
+ return "r:0";
93
+ }
94
+ function startHydrationRenderPhase(data) {
95
+ hydrationRenderData = data;
96
+ hydrationKeyCounter = 0;
97
+ }
98
+ function stopHydrationRenderPhase() {
99
+ hydrationRenderData = null;
100
+ hydrationKeyCounter = 0;
101
+ }
102
+ /** @internal Run one synchronous client-side markup verification pass. */
103
+ function withHydrationVerificationRender(fn) {
104
+ hydrationVerificationDepth += 1;
105
+ try {
106
+ return fn();
107
+ } finally {
108
+ hydrationVerificationDepth -= 1;
109
+ }
110
+ }
111
+ /** @internal Whether resources should reflect their server pending snapshot. */
112
+ function isHydrationVerificationRender() {
113
+ return hydrationVerificationDepth > 0;
114
+ }
115
+ /** @internal Read a server-captured resource branch without invoking its loader. */
116
+ function getResourceVerificationSnapshot(key) {
117
+ const snapshots = getCurrentRenderData()?.framework[RESOURCE_VERIFICATION_SNAPSHOTS];
118
+ if (!snapshots || typeof snapshots !== "object" || Array.isArray(snapshots)) return null;
119
+ if (!Object.prototype.hasOwnProperty.call(snapshots, key)) return null;
120
+ const snapshot = snapshots[key];
121
+ if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot)) return null;
122
+ const candidate = snapshot;
123
+ return typeof candidate.pending === "boolean" ? {
124
+ value: candidate.value,
125
+ pending: candidate.pending
126
+ } : null;
127
+ }
128
+ /** @internal Preserve a JSON-safe server branch solely for markup verification. */
129
+ function recordResourceVerificationSnapshot(key, snapshot) {
130
+ const ctx = getActiveRenderContext();
131
+ const envelope = ctx?.hydrationData;
132
+ if (!ctx || !envelope) return;
133
+ const current = envelope.framework[RESOURCE_VERIFICATION_SNAPSHOTS];
134
+ const snapshots = current && typeof current === "object" && !Array.isArray(current) ? current : {};
135
+ ctx.hydrationData = withPageFramework(envelope, {
136
+ ...envelope.framework,
137
+ [RESOURCE_VERIFICATION_SNAPSHOTS]: {
138
+ ...snapshots,
139
+ [key]: snapshot
140
+ }
141
+ });
142
+ }
143
+ function startRenderPhase(data) {
144
+ const ctx = getActiveRenderContext();
145
+ if (ctx) {
146
+ ctx.renderData = data ?? null;
147
+ ctx.keyCounter = 0;
148
+ }
149
+ }
150
+ function stopRenderPhase() {
151
+ const ctx = getActiveRenderContext();
152
+ if (ctx) {
153
+ ctx.renderData = null;
154
+ ctx.keyCounter = 0;
155
+ }
156
+ }
157
+ function throwSSRDataMissing() {
158
+ throw new SSRDataMissingError();
159
+ }
160
+ //#endregion
161
+ export { isPageRenderEnvelope as _, getResourceVerificationSnapshot as a, withPageFramework as b, registerSSRStyle as c, stopHydrationRenderPhase as d, stopRenderPhase as f, isEmptyPageRenderEnvelope as g, createPageRenderEnvelope as h, getNextRenderKey as i, startHydrationRenderPhase as l, withHydrationVerificationRender as m, getActiveRenderContext as n, isHydrationVerificationRender as o, throwSSRDataMissing as p, getCurrentRenderData as r, recordResourceVerificationSnapshot as s, configureRenderContextProvider as t, startRenderPhase as u, pageRenderEnvelope as v, SSRDataMissingError as x, replacePageRoute as y };
@@ -1,18 +1,18 @@
1
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
- 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-BOr4lSLl.js";
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-Bw4Mf9fd.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-Dpfoi4cA.js";
4
+ import { n as markFastPathApplied, t as isBulkCommitActive } from "./fastlane-CrfB3QG0.js";
7
5
  import { b as restoreDomCommitScope, c as enterDomCommitScope, p as getCurrentInstance } from "./component-scope-DzJEbYGE.js";
8
- import { t as cleanupComponent } from "./component-cleanup-Bug5tSiG.js";
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-CFI4NKpJ.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-DjpV8ioj.js";
11
- import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-B487asyz.js";
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-ARiXproi.js";
13
- import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
6
+ import { i as isFragmentType, r as STATIC_CHILDREN } from "./jsx-C3IECePB.js";
7
+ import { d as getCurrentContextFrame, h as markVNodeTreeWithContextFrame, i as mountInstanceInline, n as createComponentInstance, o as renderComponentInline, p as getVNodeContextFrame, t as captureInlineRenderSnapshot, y as withContext } from "./component-internal-DcrLymUJ.js";
8
+ import { t as cleanupComponent } from "./component-cleanup-BUfUleGZ.js";
9
+ import { c as getCurrentLifecycleCommitBatch, l as registerLifecycleRollback, p as isPromiseLike, r as discardLifecycleCommitBatch, s as flushLifecycleCommitBatch, t as beginLifecycleCommitBatch, u as registerLifecycleTransaction } from "./lifecycle-batch-Dfpid9-A.js";
10
+ import { _ as setControlBoundaryContextFrame, a as registerForStateTransaction, b as rerenderChildScope, c as captureForFallbackTransactionSnapshot, d as clearCaseDomUpdateState, f as clearShowDomUpdateState, g as evaluateShowState, h as evaluateCaseState, i as evaluateForState, l as captureForItemTransactionSnapshot, n as clearForDomUpdateState, o as rollbackForStateTransaction, t as beginForStateTransaction, v as createChildScope, y as disposeChildScope } from "./for-internal-B_mnQhan.js";
11
+ import { n as createOwnedFineGrainedEffect, r as markFineGrainedEffectsDirtySource, t as createFineGrainedEffect } from "./effect-lnxQIpJG.js";
12
+ import { C as getDelegatedHandlersForElement, D as updateDelegatedListener, E as removeDelegatedListener, S as getDelegatedHandlerForElement, T as isEventDelegationEnabled, _ as teardownNodeSubtree, a as elementReactivePropsCleanup, b as addFreshDelegatedListener, c as forEachElementReactivePropCleanup, d as removeAllListeners, f as removeElementReactiveProps, g as setFreshElementReactivePropCleanup, h as setDirectElementReactivePropCleanup, i as elementListeners, l as getElementReactivePropCleanupSize, m as replaceElementRefBookkeeping, n as cleanupInstanceIfPresent, o as elementRefs, p as removeElementRef, r as cleanupInstancesUnder, s as forEachDescendantNode, t as REACTIVE_CHILDREN_KEY, u as getElementReactivePropsCleanupMap, v as updateElementRef, w as isDelegatedEvent, x as clearDelegatedHandlersForElement, y as addDelegatedListener } from "./cleanup-c837KVij.js";
14
13
  import { n as getPublicAttributeName, t as sanitizeCssValue } from "./css-BuPaTOfe.js";
15
- import { a as isSafeHref, i as ROUTE_ROOT_COMPONENT } from "./csp-nonce-ZTlD_EnK.js";
14
+ import { i as ROUTE_ROOT_COMPONENT, o as isUnsafeUrlAttribute } from "./csp-nonce-Bc52OIVc.js";
15
+ import { a as isSSRPortalHydrationAnchor } from "./portal-w3oQ6oQU.js";
16
16
  //#region src/runtime/error-boundary.ts
17
17
  function createBoundaryReset(instance) {
18
18
  return () => {
@@ -713,6 +713,15 @@ function isKeyedReorderFastPathEligible(parent, newChildren, oldKeyMap) {
713
713
  }
714
714
  //#endregion
715
715
  //#region src/renderer/attributes.ts
716
+ function isDangerousInnerHTMLPayload(value) {
717
+ return value !== null && typeof value === "object" && "__html" in value;
718
+ }
719
+ function applyDangerousInnerHTMLValue(el, value) {
720
+ if (!isDangerousInnerHTMLPayload(value)) return;
721
+ if (isDevelopmentEnvironment()) logger.warn("[Askr] dangerouslySetInnerHTML is being used, which bypasses the framework's normal rendering and can introduce XSS vulnerabilities if the HTML is derived from untrusted input. Make sure the value is sanitized.");
722
+ const html = value.__html;
723
+ el.innerHTML = html === null || html === void 0 ? "" : String(html);
724
+ }
716
725
  function applyFormControlProp(el, key, value, tagName) {
717
726
  if (key === "value") {
718
727
  const stringValue = String(value);
@@ -819,7 +828,8 @@ function applyStaticScalarPropsToElement(el, props, tagName) {
819
828
  if (key === "class" || key === "className") writeElementClassName(el, String(value));
820
829
  else if (key === "style") applyStylePropValue(el, value);
821
830
  else if (key === "value" || key === "checked") applyFormControlProp(el, key, value, tagName);
822
- else if (key.toLowerCase() === "href" && !isSafeHref(String(value))) removeRenderedAttribute(el, key);
831
+ else if (key === "dangerouslySetInnerHTML") applyDangerousInnerHTMLValue(el, value);
832
+ else if (isUnsafeUrlAttribute(key, value)) removeRenderedAttribute(el, key);
823
833
  else setRenderedAttribute(el, key, String(value));
824
834
  }
825
835
  }
@@ -870,6 +880,7 @@ function applyClassPropValue(el, value, previousValue, descriptor) {
870
880
  if (descriptor) descriptor.lastClassTokens = nextTokens;
871
881
  }
872
882
  function applyScalarPropValue(el, key, value, tagName, previousValue, descriptor) {
883
+ if (key === "dangerouslySetInnerHTML" && !isDangerousInnerHTMLPayload(value)) return;
873
884
  if (value === void 0 || value === null || value === false) {
874
885
  if (key === "class" || key === "className") {
875
886
  const previousTokens = descriptor?.lastClassTokens;
@@ -885,7 +896,8 @@ function applyScalarPropValue(el, key, value, tagName, previousValue, descriptor
885
896
  if (key === "class" || key === "className") applyClassPropValue(el, value, previousValue, descriptor);
886
897
  else if (key === "style") applyStylePropValue(el, value);
887
898
  else if (key === "value" || key === "checked") applyFormControlProp(el, key, value, tagName);
888
- else if (key.toLowerCase() === "href" && !isSafeHref(String(value))) removeRenderedAttribute(el, key);
899
+ else if (key === "dangerouslySetInnerHTML") applyDangerousInnerHTMLValue(el, value);
900
+ else if (isUnsafeUrlAttribute(key, value)) removeRenderedAttribute(el, key);
889
901
  else setRenderedAttribute(el, key, String(value));
890
902
  }
891
903
  function removeStaleAttributes(el, vnode, props) {
@@ -1266,7 +1278,7 @@ function findHostInstanceByType(host, type, node, parent, wrapperDepth) {
1266
1278
  if (identityMatches.length === 1) return identityMatches[0];
1267
1279
  if (identityMatches.length > 1 && key !== void 0) return identityMatches[identityMatches.length - 1];
1268
1280
  const sameType = instances.filter((instance) => instance.fn === type);
1269
- if (sameType.length === 1) return sameType[0];
1281
+ if (key === void 0 && sameType.length === 1) return sameType[0];
1270
1282
  return null;
1271
1283
  }
1272
1284
  if (host.__ASKR_INSTANCE?.fn === type) {
@@ -1642,6 +1654,10 @@ function applyPropsToElement$1(el, props, tagName, isHydrationSkipped) {
1642
1654
  continue;
1643
1655
  }
1644
1656
  if (isSkippedProp(key)) continue;
1657
+ if (key === "dangerouslySetInnerHTML") {
1658
+ applyScalarPropValue(el, key, value, tagName);
1659
+ continue;
1660
+ }
1645
1661
  if (value === void 0 || value === null || value === false) continue;
1646
1662
  const eventProp = parseEventProp(key);
1647
1663
  if (eventProp) {
@@ -1666,6 +1682,15 @@ function syncElementPropBindings(el, domVNode, props, usesReactiveChildren) {
1666
1682
  const value = props[key];
1667
1683
  if (key === "ref") continue;
1668
1684
  if (isSkippedProp(key)) continue;
1685
+ if (key === "dangerouslySetInnerHTML") {
1686
+ const existingEntry = existingReactiveProps?.get(key);
1687
+ if (existingEntry) {
1688
+ existingEntry.cleanup();
1689
+ existingReactiveProps?.delete(key);
1690
+ }
1691
+ applyScalarPropValue(el, key, value, domVNode.type);
1692
+ continue;
1693
+ }
1669
1694
  const eventProp = parseEventProp(key);
1670
1695
  const eventName = eventProp?.eventName;
1671
1696
  const eventCapture = eventProp?.capture ?? false;
@@ -3713,6 +3738,7 @@ function updateElementChildren$1(el, children, forceUpdate = false) {
3713
3738
  }
3714
3739
  clearControlBoundaryCommitOwner(el);
3715
3740
  if (children === null || children === void 0) {
3741
+ keyedElements.delete(el);
3716
3742
  for (let n = el.firstChild; n;) {
3717
3743
  const next = n.nextSibling;
3718
3744
  teardownNodeSubtree(n);
@@ -3722,7 +3748,7 @@ function updateElementChildren$1(el, children, forceUpdate = false) {
3722
3748
  return;
3723
3749
  }
3724
3750
  if (!Array.isArray(children) && isFragmentVNode(children)) {
3725
- updateUnkeyedChildren(el, normalizeComponentChildren(children), forceUpdate);
3751
+ updateElementChildren$1(el, normalizeComponentChildren(children), forceUpdate);
3726
3752
  return;
3727
3753
  }
3728
3754
  if (!Array.isArray(children) && (typeof children === "string" || typeof children === "number")) {
@@ -4827,6 +4853,8 @@ function commitForStateBoundaryChildrenImpl(parent, forState, childrenVNodes, ru
4827
4853
  commitDirtyNoReorder(dirtyIndices);
4828
4854
  break;
4829
4855
  case "REMOVE_ONE":
4856
+ removeForBoundaryNodes(parent, forState.lastRemovedNodes, { teardown: false });
4857
+ removedBoundaryConsumed = true;
4830
4858
  commitDirtyNoReorder(dirtyIndices);
4831
4859
  break;
4832
4860
  case "TRUNCATE":
@@ -4989,6 +5017,8 @@ function captureRangeFocus(range, parent) {
4989
5017
  } : null;
4990
5018
  return () => {
4991
5019
  if (!active.isConnected || active.ownerDocument.activeElement === active) return;
5020
+ const currentActive = active.ownerDocument.activeElement;
5021
+ if (currentActive instanceof Element && currentActive !== active.ownerDocument.body && currentActive !== active.ownerDocument.documentElement && currentActive.isConnected) return;
4992
5022
  try {
4993
5023
  active.focus({ preventScroll: true });
4994
5024
  } catch {
@@ -6419,6 +6449,7 @@ function isBlueprintKeyProp(key) {
6419
6449
  }
6420
6450
  function classifyProp(value, key) {
6421
6451
  if (key === "ref") return { kind: "ref" };
6452
+ if (key === "dangerouslySetInnerHTML") return null;
6422
6453
  if (key.startsWith("on") && key.length > 2) return typeof value === "function" ? { kind: "event" } : null;
6423
6454
  if (typeof value === "function") return { kind: "reactive" };
6424
6455
  if (value === void 0 || value === null || value === false) return { kind: "empty" };
@@ -6894,6 +6925,7 @@ function createOwnedResultNodeWithBlueprint(owner, node, parentNamespace) {
6894
6925
  }
6895
6926
  function createIntrinsicElement(node, type, props, parentNamespace) {
6896
6927
  const children = props.children ?? node.children;
6928
+ const usesDangerousHTML = isDangerousInnerHTMLPayload(props.dangerouslySetInnerHTML);
6897
6929
  const elementNamespace = resolveChildNamespace(type, parentNamespace);
6898
6930
  const el = createElementForNamespace(type, parentNamespace);
6899
6931
  try {
@@ -6905,7 +6937,7 @@ function createIntrinsicElement(node, type, props, parentNamespace) {
6905
6937
  return el;
6906
6938
  }
6907
6939
  applyPropsToElement$1(el, props, type, isHydrationSkipped);
6908
- if (children !== null && children !== void 0) {
6940
+ if (!usesDangerousHTML && children !== null && children !== void 0) {
6909
6941
  const controlBoundaryVNode = getDirectControlBoundaryVNode(children);
6910
6942
  if (controlBoundaryVNode) {
6911
6943
  const controlState = getControlBoundaryState(controlBoundaryVNode);
@@ -6965,7 +6997,8 @@ function applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpd
6965
6997
  if (!_isDOMElement(vnode)) return;
6966
6998
  const props = vnode.props || {};
6967
6999
  const domVNode = vnode;
6968
- const shouldUpdateChildren = updateChildren && props.imperativeChildren !== true;
7000
+ const usesDangerousHTML = isDangerousInnerHTMLPayload(props.dangerouslySetInnerHTML);
7001
+ const shouldUpdateChildren = updateChildren && props.imperativeChildren !== true && !usesDangerousHTML;
6969
7002
  if (isHydrationSkipped(el)) {
6970
7003
  rememberDeferredHydrationVNode(el, vnode, getCurrentInstance(), getCurrentInstance()?.ownerFrame ?? null);
6971
7004
  clearHydrationDeferredSubtree(el);
@@ -6973,6 +7006,7 @@ function applyElementUpdateFromVnode(el, vnode, updateChildren, forceChildrenUpd
6973
7006
  }
6974
7007
  materializeKey(el, vnode, props);
6975
7008
  updateElementRef(el, props.ref);
7009
+ if (usesDangerousHTML) updateElementChildren$1(el, void 0, forceChildrenUpdate);
6976
7010
  if (!hasTrackedElementPropBindings(el)) {
6977
7011
  if (!forceChildrenUpdate && hasMatchingStaticProps(el, props, vnode.type)) {
6978
7012
  if (shouldUpdateChildren) {
@@ -7226,6 +7260,13 @@ function replaceComponentRange(instance, result, host) {
7226
7260
  const emptyResult = result === null || result === void 0 || result === false;
7227
7261
  if (host instanceof Comment && emptyResult) return host;
7228
7262
  if (!(host instanceof Comment) && !emptyResult && !isTransparentComponentResult(result)) return null;
7263
+ if (host instanceof Element && _isDOMElement(result) && hasTransparentComponentResult(result.type)) {
7264
+ const syncedHost = getRendererDOMHost().syncComponentElement(host, result, result.type, result.props ?? {}, getParentNamespace(parent), false, retainedInstances);
7265
+ if (syncedHost) {
7266
+ retainReplacementOwnerChain(syncedHost, instance, retainedInstances);
7267
+ return syncedHost;
7268
+ }
7269
+ }
7229
7270
  return beginComponentHostReplacement(instanceHost, instance, instance.target, retainedInstances).replace(() => materializeComponentResultNode(instance, result, getParentNamespace(parent)), (nextHost) => retainReplacementOwnerChain(nextHost, instance, retainedInstances));
7230
7271
  }
7231
7272
  const placeholder = host;