octane 0.16.2 → 0.16.3

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 (123) hide show
  1. package/dist/cjs/rollback-flag.cjs +39 -0
  2. package/dist/cjs/runtime/activity.cjs +1 -1
  3. package/dist/cjs/runtime/block.cjs +23 -18
  4. package/dist/cjs/runtime/branches.cjs +1 -1
  5. package/dist/cjs/runtime/child-slots.cjs +24 -21
  6. package/dist/cjs/runtime/commit.cjs +33 -38
  7. package/dist/cjs/runtime/component-slots.cjs +35 -31
  8. package/dist/cjs/runtime/context.cjs +14 -8
  9. package/dist/cjs/runtime/deopt.cjs +30 -30
  10. package/dist/cjs/runtime/drivers.cjs +166 -14
  11. package/dist/cjs/runtime/effects.cjs +1 -1
  12. package/dist/cjs/runtime/elements.cjs +7 -3
  13. package/dist/cjs/runtime/engine.cjs +72 -67
  14. package/dist/cjs/runtime/events.cjs +22 -20
  15. package/dist/cjs/runtime/forms.cjs +10 -10
  16. package/dist/cjs/runtime/head.cjs +5 -4
  17. package/dist/cjs/runtime/hooks.cjs +3 -2
  18. package/dist/cjs/runtime/host-props.cjs +21 -21
  19. package/dist/cjs/runtime/hydrate-boundary.cjs +19 -4
  20. package/dist/cjs/runtime/hydration-presentation.cjs +24 -21
  21. package/dist/cjs/runtime/hydration.cjs +5 -5
  22. package/dist/cjs/runtime/lists.cjs +34 -29
  23. package/dist/cjs/runtime/portals.cjs +2 -2
  24. package/dist/cjs/runtime/refs.cjs +10 -7
  25. package/dist/cjs/runtime/render.cjs +29 -94
  26. package/dist/cjs/runtime/roots.cjs +1 -1
  27. package/dist/cjs/runtime/signal-bindings.cjs +17 -17
  28. package/dist/cjs/runtime/signal-owners.cjs +8 -9
  29. package/dist/cjs/runtime/suspense.cjs +38 -30
  30. package/dist/cjs/runtime/templates.cjs +7 -1
  31. package/dist/cjs/runtime/use.cjs +3 -1
  32. package/dist/cjs/runtime/view-transition.cjs +8 -8
  33. package/dist/cjs/runtime.cjs +2 -0
  34. package/dist/cjs/signals/owner-context.cjs +11 -0
  35. package/dist/cjs/version.cjs +1 -1
  36. package/dist/compiler/compile.js +4 -0
  37. package/dist/node/rollback-flag.js +13 -0
  38. package/dist/node/runtime/activity.js +2 -2
  39. package/dist/node/runtime/block.js +27 -17
  40. package/dist/node/runtime/branches.js +2 -7
  41. package/dist/node/runtime/child-slots.js +31 -22
  42. package/dist/node/runtime/commit.js +19 -24
  43. package/dist/node/runtime/component-slots.js +40 -35
  44. package/dist/node/runtime/context.js +20 -20
  45. package/dist/node/runtime/deopt.js +40 -33
  46. package/dist/node/runtime/drivers.js +143 -14
  47. package/dist/node/runtime/effects.js +7 -2
  48. package/dist/node/runtime/elements.js +13 -4
  49. package/dist/node/runtime/engine.js +75 -64
  50. package/dist/node/runtime/events.js +25 -23
  51. package/dist/node/runtime/forms.js +12 -16
  52. package/dist/node/runtime/head.js +4 -3
  53. package/dist/node/runtime/hooks.js +6 -4
  54. package/dist/node/runtime/host-props.js +22 -24
  55. package/dist/node/runtime/hydrate-boundary.js +24 -5
  56. package/dist/node/runtime/hydration-presentation.js +32 -30
  57. package/dist/node/runtime/hydration.js +11 -7
  58. package/dist/node/runtime/lists.js +38 -32
  59. package/dist/node/runtime/portals.js +1 -2
  60. package/dist/node/runtime/refs.js +18 -8
  61. package/dist/node/runtime/render.js +42 -91
  62. package/dist/node/runtime/roots.js +2 -2
  63. package/dist/node/runtime/signal-bindings.js +25 -27
  64. package/dist/node/runtime/signal-owners.js +8 -9
  65. package/dist/node/runtime/suspense.js +34 -26
  66. package/dist/node/runtime/templates.js +6 -1
  67. package/dist/node/runtime/use.js +3 -1
  68. package/dist/node/runtime/view-transition.js +10 -10
  69. package/dist/node/runtime.js +2 -0
  70. package/dist/node/signals/owner-context.js +9 -0
  71. package/dist/node/version.js +1 -1
  72. package/dist/rollback-flag.d.ts +11 -0
  73. package/dist/rollback-flag.js +13 -0
  74. package/dist/runtime/activity.js +2 -2
  75. package/dist/runtime/block.js +27 -17
  76. package/dist/runtime/branches.js +2 -7
  77. package/dist/runtime/child-slots.js +31 -22
  78. package/dist/runtime/commit.d.ts +0 -3
  79. package/dist/runtime/commit.js +19 -24
  80. package/dist/runtime/component-slots.js +40 -35
  81. package/dist/runtime/context.d.ts +6 -3
  82. package/dist/runtime/context.js +20 -20
  83. package/dist/runtime/deopt.d.ts +1 -1
  84. package/dist/runtime/deopt.js +40 -33
  85. package/dist/runtime/drivers.d.ts +55 -18
  86. package/dist/runtime/drivers.js +143 -14
  87. package/dist/runtime/effects.js +7 -2
  88. package/dist/runtime/elements.js +13 -4
  89. package/dist/runtime/engine.d.ts +7 -7
  90. package/dist/runtime/engine.js +75 -64
  91. package/dist/runtime/events.js +25 -23
  92. package/dist/runtime/forms.js +12 -16
  93. package/dist/runtime/head.js +4 -3
  94. package/dist/runtime/hooks.js +6 -4
  95. package/dist/runtime/host-props.d.ts +1 -1
  96. package/dist/runtime/host-props.js +22 -24
  97. package/dist/runtime/hydrate-boundary.js +24 -5
  98. package/dist/runtime/hydration-presentation.d.ts +1 -1
  99. package/dist/runtime/hydration-presentation.js +32 -30
  100. package/dist/runtime/hydration.js +11 -7
  101. package/dist/runtime/lists.js +38 -32
  102. package/dist/runtime/portals.js +1 -2
  103. package/dist/runtime/refs.d.ts +1 -1
  104. package/dist/runtime/refs.js +18 -8
  105. package/dist/runtime/render.d.ts +0 -11
  106. package/dist/runtime/render.js +42 -91
  107. package/dist/runtime/roots.js +2 -2
  108. package/dist/runtime/signal-bindings.js +25 -27
  109. package/dist/runtime/signal-owners.js +8 -9
  110. package/dist/runtime/suspense.d.ts +3 -1
  111. package/dist/runtime/suspense.js +34 -26
  112. package/dist/runtime/templates.d.ts +2 -0
  113. package/dist/runtime/templates.js +6 -1
  114. package/dist/runtime/types.d.ts +3 -2
  115. package/dist/runtime/use.d.ts +2 -1
  116. package/dist/runtime/use.js +3 -1
  117. package/dist/runtime/view-transition.js +10 -10
  118. package/dist/runtime.d.ts +1 -1
  119. package/dist/runtime.js +2 -0
  120. package/dist/signals/owner-context.d.ts +13 -0
  121. package/dist/signals/owner-context.js +9 -0
  122. package/dist/version.js +1 -1
  123. package/package.json +1 -1
@@ -94,6 +94,7 @@ var import_activity = require("./activity.cjs");
94
94
  var import_lists = require("./lists.cjs");
95
95
  var import_commit = require("./commit.cjs");
96
96
  var import_templates = require("./templates.cjs");
97
+ var import_rollback_flag = require("../rollback-flag.cjs");
97
98
  function provideContext(scope, context, value) {
98
99
  if (scope.$$ctxValues === null) scope.$$ctxValues = /* @__PURE__ */ new Map();
99
100
  const values = scope.$$ctxValues;
@@ -165,7 +166,7 @@ function childrenTryBlock(scope, props, catchBody, pendingBody, propagateSuspens
165
166
  body = descriptorChildrenTryBody;
166
167
  env = [props.children];
167
168
  }
168
- return (0, import_suspense.tryBlock)(
169
+ return (0, import_suspense.tryBlockImpl)(
169
170
  scope,
170
171
  0,
171
172
  block.parentNode,
@@ -254,6 +255,7 @@ function resolveLazyModule(mod) {
254
255
  }
255
256
  // @__NO_SIDE_EFFECTS__
256
257
  function lazy(load) {
258
+ (0, import_rollback_flag.installRootRollback)();
257
259
  let status = "uninitialized";
258
260
  let result = null;
259
261
  let initializationError;
@@ -299,7 +301,7 @@ function lazy(load) {
299
301
  if (previousBody !== comp) {
300
302
  if (previousBody !== void 0) (0, import_context.invalidateSharedBodyOutput)(scope);
301
303
  const hooks = (0, import_hooks.ensureHooks)(scope);
302
- if (import_render.TRANSITION_JOURNAL !== null && !import_engine.ROOT_RENDER_ROLLBACK) {
304
+ if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
303
305
  (0, import_engine.journalUndo)(() => {
304
306
  if (previousBody === void 0) hooks.delete(bodySlot);
305
307
  else hooks.set(bodySlot, previousBody);
@@ -843,9 +845,9 @@ function swapComponentFrontier(state, parentBlock, domParent, body, identity, re
843
845
  }
844
846
  }
845
847
  function spliceOffscreenCapture(capture, deferredNativeAcceptance = false) {
846
- if (capture.presentations !== void 0 && import_render.WIP_CAPTURE !== null)
848
+ if (import_hydration_flag.hydrationStarted && capture.presentations !== void 0 && import_render.WIP_CAPTURE !== null)
847
849
  (import_render.WIP_CAPTURE.presentations ??= []).push(...capture.presentations);
848
- if (capture.hostEvents !== void 0 && import_render.WIP_CAPTURE !== null) {
850
+ if (import_hydration_flag.hydrationStarted && capture.hostEvents !== void 0 && import_render.WIP_CAPTURE !== null) {
849
851
  (import_render.WIP_CAPTURE.hostEvents ??= []).push(...capture.hostEvents);
850
852
  capture.hostEvents = void 0;
851
853
  }
@@ -857,34 +859,36 @@ function spliceOffscreenCapture(capture, deferredNativeAcceptance = false) {
857
859
  if (rendered !== null && import_render.WIP_CAPTURE !== null) {
858
860
  for (const block of rendered) (0, import_block.recordCapturedRender)(import_render.WIP_CAPTURE, block);
859
861
  }
860
- for (let p = 0; p < 3; p++) {
861
- const src = capture.effects[p];
862
- const target = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.effects[p] : import_effects.effectQueues[p];
863
- for (let i = 0; i < src.length; i++) {
862
+ if (import_drivers.COMMIT_WORK) {
863
+ for (let p = 0; p < 3; p++) {
864
+ const src = capture.effects[p];
865
+ const target = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.effects[p] : import_effects.effectQueues[p];
866
+ for (let i = 0; i < src.length; i++) {
867
+ if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
868
+ (0, import_profiling.__profileQueueWork)(src[i]);
869
+ target.push(src[i]);
870
+ }
871
+ }
872
+ const eventTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.events : import_render.effectEventQueue;
873
+ for (let i = 0; i < capture.events.length; i++) {
874
+ eventTarget.push(capture.events[i]);
875
+ }
876
+ const eventActionTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.eventActions : import_render.effectEventCommitActions;
877
+ for (let i = 0; i < capture.eventActions.length; i++) {
864
878
  if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
865
- (0, import_profiling.__profileQueueWork)(src[i]);
866
- target.push(src[i]);
879
+ (0, import_profiling.__profileQueueWork)(capture.eventActions[i]);
880
+ eventActionTarget.push(capture.eventActions[i]);
867
881
  }
882
+ const refTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.refs : import_engine.refAttachQueue;
883
+ for (let i = 0; i < capture.refs.length; i++) refTarget.push(capture.refs[i]);
884
+ if (capture.detaches !== void 0) {
885
+ const target = import_render.WIP_CAPTURE === null ? import_refs.refDetachQueue : import_render.WIP_CAPTURE.detaches ??= [];
886
+ for (const entry of capture.detaches) target.push(entry);
887
+ }
888
+ const storeTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.stores : import_refs.storeSyncQueue;
889
+ for (let i = 0; i < capture.stores.length; i++) storeTarget.push(capture.stores[i]);
868
890
  }
869
- const eventTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.events : import_render.effectEventQueue;
870
- for (let i = 0; i < capture.events.length; i++) {
871
- eventTarget.push(capture.events[i]);
872
- }
873
- const eventActionTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.eventActions : import_render.effectEventCommitActions;
874
- for (let i = 0; i < capture.eventActions.length; i++) {
875
- if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
876
- (0, import_profiling.__profileQueueWork)(capture.eventActions[i]);
877
- eventActionTarget.push(capture.eventActions[i]);
878
- }
879
- const refTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.refs : import_engine.refAttachQueue;
880
- for (let i = 0; i < capture.refs.length; i++) refTarget.push(capture.refs[i]);
881
- if (capture.detaches !== void 0) {
882
- const target = import_render.WIP_CAPTURE === null ? import_refs.refDetachQueue : import_render.WIP_CAPTURE.detaches ??= [];
883
- for (const entry of capture.detaches) target.push(entry);
884
- }
885
- const storeTarget = import_render.WIP_CAPTURE !== null ? import_render.WIP_CAPTURE.stores : import_refs.storeSyncQueue;
886
- for (let i = 0; i < capture.stores.length; i++) storeTarget.push(capture.stores[i]);
887
- if (capture.suspenseCommits !== void 0) {
891
+ if (import_suspense.PUBLISH_SUSPENSE_COMMIT && capture.suspenseCommits !== void 0) {
888
892
  for (const state of capture.suspenseCommits) (0, import_suspense.PUBLISH_SUSPENSE_COMMIT)(state);
889
893
  }
890
894
  const cleanups = capture.renderCleanups;
@@ -965,7 +969,7 @@ function discardOffscreenCapture(capture) {
965
969
  if (rendered !== null) {
966
970
  for (const block of rendered) (0, import_block.invalidateRender)(block, owner);
967
971
  }
968
- for (let i = 0; i < capture.stores.length; i++) capture.stores[i].queued = false;
972
+ if (import_drivers.COMMIT_WORK) for (let i = 0; i < capture.stores.length; i++) capture.stores[i].queued = false;
969
973
  const cleanups = capture.renderCleanups;
970
974
  if (cleanups !== void 0) {
971
975
  capture.renderCleanups = void 0;
@@ -974,7 +978,7 @@ function discardOffscreenCapture(capture) {
974
978
  }
975
979
  function clearChildContent(state) {
976
980
  const transaction = import_render.ROOT_RENDER_TRANSACTION;
977
- if (transaction !== null && !transaction.aborted && !import_engine.ROOT_RENDER_ROLLBACK) {
981
+ if (transaction !== null && !transaction.aborted && !import_drivers.ROOT_RENDER_ROLLBACK) {
978
982
  if (state.block === null && state.forSlot === null && state.text === null && state.hostNode === null)
979
983
  return;
980
984
  const parent = state.ownerHost ?? state.start?.parentNode ?? state.text?.parentNode ?? state.hostNode?.parentNode ?? state.block?.parentNode ?? null;
@@ -46,6 +46,7 @@ __export(context_exports, {
46
46
  reportRendererOwnerError: () => reportRendererOwnerError,
47
47
  use: () => use,
48
48
  useContext: () => useContext,
49
+ useImpl: () => useImpl,
49
50
  useRendererThenable: () => useRendererThenable
50
51
  });
51
52
  module.exports = __toCommonJS(context_exports);
@@ -70,6 +71,7 @@ var import_activity = require("./activity.cjs");
70
71
  var import_lists = require("./lists.cjs");
71
72
  var import_commit = require("./commit.cjs");
72
73
  var import_templates = require("./templates.cjs");
74
+ var import_rollback_flag = require("../rollback-flag.cjs");
73
75
  const __octaneDev = process.env.NODE_ENV !== "production";
74
76
  let CONTEXT_DEPENDENCIES = null;
75
77
  let CONTEXT_CHILD = null;
@@ -94,7 +96,7 @@ function __createCompiledContext(defaultValue) {
94
96
  if (previous !== dialect) {
95
97
  if (previous !== void 0) {
96
98
  invalidateSharedBodyOutput(scope);
97
- if (import_render.TRANSITION_JOURNAL !== null && !import_engine.ROOT_RENDER_ROLLBACK) {
99
+ if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
98
100
  const hooks = scope.hooks;
99
101
  (0, import_engine.journalUndo)(() => hooks.set(import_component_slots.CHILDREN_DIALECT_SLOT, previous));
100
102
  }
@@ -129,7 +131,7 @@ function clearEmptiedProvider(scope) {
129
131
  (0, import_hooks.ensureHooks)(scope).set(import_component_slots.CHILDREN_DIALECT_SLOT, 2);
130
132
  }
131
133
  function setChildrenDialect(scope, previous, dialect) {
132
- if (previous !== void 0 && import_render.TRANSITION_JOURNAL !== null && !import_engine.ROOT_RENDER_ROLLBACK) {
134
+ if (previous !== void 0 && import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
133
135
  (0, import_engine.journalUndo)(() => (0, import_hooks.ensureHooks)(scope).set(import_component_slots.CHILDREN_DIALECT_SLOT, previous));
134
136
  }
135
137
  (0, import_hooks.ensureHooks)(scope).set(import_component_slots.CHILDREN_DIALECT_SLOT, dialect);
@@ -206,7 +208,7 @@ function renderClientContextProvider(context, props, renderScope) {
206
208
  }
207
209
  } else if (previous !== void 0) {
208
210
  invalidateSharedBodyOutput(scope);
209
- if (import_render.TRANSITION_JOURNAL !== null && !import_engine.ROOT_RENDER_ROLLBACK) {
211
+ if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
210
212
  const hooks = scope.hooks;
211
213
  (0, import_engine.journalUndo)(() => hooks.set(import_component_slots.CHILDREN_DIALECT_SLOT, previous));
212
214
  }
@@ -254,12 +256,12 @@ function invalidateSharedBodyOutput(scope) {
254
256
  }
255
257
  function invalidateSharedBodyMemoRegion(region) {
256
258
  if (region.auto === void 0) return;
257
- if (import_render.TRANSITION_JOURNAL !== null && !import_engine.ROOT_RENDER_ROLLBACK) {
258
- import_render.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, region, "auto", region.auto);
259
+ if (import_drivers.TRANSITION_JOURNAL && !import_drivers.ROOT_RENDER_ROLLBACK) {
260
+ import_drivers.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, region, "auto", region.auto);
259
261
  }
260
262
  region.auto = void 0;
261
263
  }
262
- function use(usable) {
264
+ function useImpl(usable) {
263
265
  if (__octaneDev && import_hooks.devMemoComputeDepth !== 0) {
264
266
  console.error(
265
267
  "Do not call use() inside a useMemo() factory. Cached factories can skip context or promise reads; call use() before useMemo() and memoize the returned value instead."
@@ -273,6 +275,7 @@ function use(usable) {
273
275
  }
274
276
  return (0, import_use.useThenable)(usable);
275
277
  }
278
+ const use = /* @__PURE__ */ (0, import_rollback_flag.rollbackEntry)(useImpl);
276
279
  function useForeignContext(usable, api) {
277
280
  if (usable !== null && typeof usable === "object") {
278
281
  const bridge = RENDERER_REGION_OWNER_COUNT ? rendererRegionOwnerForBlock(import_render.CURRENT_BLOCK) : null;
@@ -284,9 +287,10 @@ function useForeignContext(usable, api) {
284
287
  }
285
288
  throw new Error((0, import_error_codes_client_generated.formatClientError)(12, api));
286
289
  }
287
- function useRendererThenable(thenable) {
290
+ function useRendererThenableImpl(thenable) {
288
291
  return (0, import_use.useThenable)(thenable, true);
289
292
  }
293
+ const useRendererThenable = /* @__PURE__ */ (0, import_rollback_flag.rollbackEntry)(useRendererThenableImpl);
290
294
  function useContext(context) {
291
295
  if (context && context.$$kind === import_runtime_tags.CONTEXT_TAG) {
292
296
  return useContextInternal(context);
@@ -315,7 +319,7 @@ function rendererRegionSuspenseHandler(block) {
315
319
  if (!bridge.routeSuspense(thenable)) throw new import_use.SuspenseException(thenable);
316
320
  };
317
321
  }
318
- function bindRendererRegionOwner(props) {
322
+ function bindRendererRegionOwnerImpl(props) {
319
323
  const bridge = props?.[import_runtime_tags.RENDERER_REGION_OWNER_TAG];
320
324
  if (bridge === void 0) {
321
325
  throw new Error((0, import_error_codes_client_generated.formatClientError)(19));
@@ -352,6 +356,7 @@ function bindRendererRegionOwner(props) {
352
356
  });
353
357
  }
354
358
  }
359
+ const bindRendererRegionOwner = /* @__PURE__ */ (0, import_rollback_flag.rollbackEntry)(bindRendererRegionOwnerImpl);
355
360
  const HOST_CONTEXT_REQUEST_TAG = /* @__PURE__ */ Symbol.for("octane.host-context-request");
356
361
  // @__NO_SIDE_EFFECTS__
357
362
  function createHostContextRequest(thenable) {
@@ -623,5 +628,6 @@ function useContextInternal(context) {
623
628
  reportRendererOwnerError,
624
629
  use,
625
630
  useContext,
631
+ useImpl,
626
632
  useRendererThenable
627
633
  });
@@ -139,7 +139,7 @@ function hostComponent(scope, slot, tag, props, childrenBody, anchor) {
139
139
  (0, import_host_props.enableDescriptorFormActions)();
140
140
  const elNs = (0, import_host_props.inferTagNs)(tag, (0, import_host_props.deoptChildNamespace)(block.parentNode));
141
141
  const el2 = elNs !== void 0 ? document.createElementNS(elNs, tag) : document.createElement(tag);
142
- if (import_render.ROOT_RENDER_TRANSACTION !== null && (import_render.TRANSITION_JOURNAL_DEPTH !== 1 || block.createdStamp !== import_render.ROOT_DISCARD_STAMP)) {
142
+ if (import_drivers.TRANSITION_JOURNAL && import_render.ROOT_RENDER_TRANSACTION !== null && (import_drivers.TRANSITION_JOURNAL_DEPTH !== 1 || block.createdStamp !== import_render.ROOT_DISCARD_STAMP)) {
143
143
  (0, import_engine.journalRootProperty)(scope.slots, slot, void 0);
144
144
  if (scope.children === null) (0, import_engine.journalRootProperty)(scope, "children", null);
145
145
  else (0, import_commit.journalObjectOnce)(scope.children);
@@ -314,8 +314,7 @@ function deoptRecord(el, d) {
314
314
  }
315
315
  function stampDeoptDesc(el, record) {
316
316
  const host = el;
317
- if (import_render.TRANSITION_JOURNAL !== null)
318
- import_render.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, el, DEOPT_DESC, host[DEOPT_DESC]);
317
+ if (import_drivers.TRANSITION_JOURNAL) import_drivers.TRANSITION_JOURNAL.push(import_commit.JOURNAL_PROP, el, DEOPT_DESC, host[DEOPT_DESC]);
319
318
  host[DEOPT_DESC] = record;
320
319
  }
321
320
  function isFragmentDescriptor(value) {
@@ -383,7 +382,7 @@ function renderFragmentRefDescriptor(descriptor, scope) {
383
382
  if (hydration !== null) hydration.node = (0, import_templates.getNextSibling)(instance._endMarker);
384
383
  }
385
384
  function deoptWrapperKind(value) {
386
- return POSITIONAL_CHILDREN.has(value) ? "fragment" : "array";
385
+ return import_drivers.ELEMENT_DESCRIPTORS && POSITIONAL_CHILDREN.has(value) ? "fragment" : "array";
387
386
  }
388
387
  const DEOPT_KEY_STRINGIFY = JSON.stringify;
389
388
  const DEOPT_KEY_STRING = String;
@@ -419,7 +418,7 @@ function flattenReactChildContainer(outItems, outKeys, children, kind, path) {
419
418
  let keyPrefix = count > 1 ? void 0 : null;
420
419
  for (let i = 0; i < count; i++) {
421
420
  const item = children[i];
422
- if (isFragmentDescriptor(item)) {
421
+ if (import_drivers.ELEMENT_DESCRIPTORS && isFragmentDescriptor(item)) {
423
422
  if (item.ref != null || import_has_own.hasOwnProp.call(item.props, "ref")) {
424
423
  outItems.push(DESCRIPTOR_FRAGMENT_REF(item));
425
424
  keyPrefix = appendScopedDeoptKey(
@@ -458,8 +457,8 @@ function flattenReactChildContainer(outItems, outKeys, children, kind, path) {
458
457
  function singleDeoptKey(item, key) {
459
458
  return ((0, import_elements.isElementDescriptor)(item) || item?.$$kind === import_runtime_tags.PORTAL_TAG) && item.key != null ? "k" + String(key) : 0;
460
459
  }
461
- function prepareDeoptList(value, forceSingle = false, includeKeyedSingle = true, elementType = (0, import_elements.isElementDescriptor)(value) ? value.type : void 0) {
462
- if (elementType === import_elements.Fragment) {
460
+ function prepareDeoptList(value, forceSingle = false, includeKeyedSingle = true, elementType = import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value) ? value.type : void 0) {
461
+ if (import_drivers.ELEMENT_DESCRIPTORS && elementType === import_elements.Fragment) {
463
462
  if (value.ref != null || import_has_own.hasOwnProp.call(value.props, "ref")) {
464
463
  return {
465
464
  items: [DESCRIPTOR_FRAGMENT_REF(value)],
@@ -479,7 +478,7 @@ function prepareDeoptList(value, forceSingle = false, includeKeyedSingle = true,
479
478
  flattenReactChildContainer(items, keys, value, deoptWrapperKind(value), []);
480
479
  return { items, keys };
481
480
  }
482
- if (includeKeyedSingle && (0, import_elements.isElementDescriptor)(value)) {
481
+ if (import_drivers.ELEMENT_DESCRIPTORS && includeKeyedSingle && (0, import_elements.isElementDescriptor)(value)) {
483
482
  const key = value.key;
484
483
  if (key != null) return { items: [value], keys: ["k" + String(key)] };
485
484
  }
@@ -489,7 +488,7 @@ function prepareDeoptList(value, forceSingle = false, includeKeyedSingle = true,
489
488
  return null;
490
489
  }
491
490
  function iterableChildArray(value) {
492
- if (value == null || typeof value === "string" || Array.isArray(value) || (0, import_elements.isElementDescriptor)(value))
491
+ if (value == null || typeof value === "string" || Array.isArray(value) || import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value))
493
492
  return null;
494
493
  const iterator = (0, import_shared_value_helpers.childrenIterator)(value);
495
494
  if (iterator === null) return null;
@@ -543,7 +542,7 @@ function reconcileDeoptNode(prev, value, ownerBlock) {
543
542
  }
544
543
  return document.createTextNode(s);
545
544
  }
546
- if ((0, import_elements.isElementDescriptor)(value)) {
545
+ if (import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value)) {
547
546
  throw new Error((0, import_error_codes_client_generated.formatClientError)(25));
548
547
  }
549
548
  if (t === "object") throw (0, import_elements.invalidChildError)(value);
@@ -869,17 +868,17 @@ function deoptItemBody(item, scope) {
869
868
  const block = scope.block;
870
869
  const hydration = import_hydration_flag.hydrating ? import_hydration.CURSOR : null;
871
870
  const existingChild = scope.slots[0];
872
- const itemType = (0, import_elements.isElementDescriptor)(item) ? item.type : void 0;
873
- const hostDriver = typeof itemType === "string" && import_drivers.HOST_DESCRIPTORS ? import_drivers.HOST_DESCRIPTORS : null;
874
- const needsBlocks = hostDriver !== null && existingChild?.__kind === "childSlot" && existingChild.currentComp === hostDriver.body || typeof itemType === "function" || descNeedsBlocks(item);
875
- if (needsBlocks || hostDriver === null) promoteSelfMarkedItem(block);
871
+ const itemType = import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(item) ? item.type : void 0;
872
+ const hostBody = typeof itemType === "string" && import_drivers.HOST_BODY ? import_drivers.HOST_BODY : null;
873
+ const needsBlocks = hostBody !== null && existingChild?.__kind === "childSlot" && existingChild.currentComp === hostBody || typeof itemType === "function" || descNeedsBlocks(item);
874
+ if (needsBlocks || hostBody === null) promoteSelfMarkedItem(block);
876
875
  const [itemStart, itemEnd] = itemRange(block);
877
876
  if (needsBlocks) {
878
877
  const stale = block.deoptNode;
879
878
  let transfer = null;
880
879
  if (stale != null) {
881
880
  (0, import_engine.journalRootProperty)(block, "deoptNode", block.deoptNode);
882
- if (scope.slots[0] === void 0 && stale.nodeType === 1 && hostDriver !== null && (0, import_host_props.isHostElementOfType)(stale, itemType) && stale.parentNode === block.parentNode) {
881
+ if (scope.slots[0] === void 0 && stale.nodeType === 1 && hostBody !== null && (0, import_host_props.isHostElementOfType)(stale, itemType) && stale.parentNode === block.parentNode) {
883
882
  transfer = stale;
884
883
  } else if (stale.parentNode === block.parentNode) {
885
884
  if (import_render.ROOT_RENDER_TRANSACTION !== null) {
@@ -935,7 +934,7 @@ function deoptItemBody(item, scope) {
935
934
  prev = startM != null ? (0, import_templates.getNextSibling)(startM) : null;
936
935
  if (prev === endM) prev = null;
937
936
  }
938
- const node = hostDriver !== null ? hostDriver.reconcile(prev, item, block, (0, import_host_props.deoptChildNamespace)(block.parentNode)) : reconcileDeoptNode(prev, item, block);
937
+ const node = hostBody !== null ? (0, import_drivers.HOST_RECONCILE)(prev, item, block, (0, import_host_props.deoptChildNamespace)(block.parentNode)) : reconcileDeoptNode(prev, item, block);
939
938
  if (node !== prev) {
940
939
  (0, import_engine.journalRootProperty)(block, "deoptNode", block.deoptNode);
941
940
  const parent = block.parentNode;
@@ -983,7 +982,7 @@ function deoptItemBody(item, scope) {
983
982
  function mappedDeoptItemBody(item, scope) {
984
983
  const state = scope.slots[0];
985
984
  const block = scope.block;
986
- if ((0, import_elements.isElementDescriptor)(item) && typeof item.type === "function") {
985
+ if (import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(item) && typeof item.type === "function") {
987
986
  if (state === void 0 || state.__kind === "componentSlotSlot") {
988
987
  const stale = block.deoptNode;
989
988
  let parent = block.parentNode;
@@ -1043,25 +1042,26 @@ function itemComponentFrontier(block, stale) {
1043
1042
  block.endMarker = end;
1044
1043
  return frag;
1045
1044
  }
1046
- function descNeedsBlocks(value) {
1045
+ const descNeedsBlocks = function descNeedsBlocks2(value) {
1047
1046
  if (typeof value === "function") return true;
1048
1047
  if (value == null || typeof value !== "object") return false;
1049
1048
  if (typeof value.then === "function") return true;
1050
1049
  if (Array.isArray(value)) {
1051
1050
  for (let i = 0; i < value.length; i++) {
1052
- if (descNeedsBlocks(value[i])) return true;
1051
+ if (descNeedsBlocks2(value[i])) return true;
1053
1052
  }
1054
1053
  return false;
1055
1054
  }
1056
- if (!(0, import_elements.isElementDescriptor)(value) && (0, import_shared_value_helpers.childrenIterator)(value) !== null) return true;
1057
- if (value.$$kind === import_runtime_tags.ELEMENT_TAG) {
1055
+ if (!(import_drivers.ELEMENT_DESCRIPTORS && (0, import_elements.isElementDescriptor)(value)) && (0, import_shared_value_helpers.childrenIterator)(value) !== null)
1056
+ return true;
1057
+ if (import_drivers.ELEMENT_DESCRIPTORS && value.$$kind === import_runtime_tags.ELEMENT_TAG) {
1058
1058
  if (value.type === import_elements.Fragment || import_elements.activityDescriptorDispatch !== null && value.type === import_elements.activityDescriptorDispatch.type)
1059
1059
  return true;
1060
- return typeof value.type === "function" || descNeedsBlocks(value.children);
1060
+ return typeof value.type === "function" || descNeedsBlocks2(value.children);
1061
1061
  }
1062
1062
  if (value.$$kind === import_runtime_tags.PORTAL_TAG) return true;
1063
1063
  return false;
1064
- }
1064
+ };
1065
1065
  function isTextareaTag(type) {
1066
1066
  return type === "textarea" || type.length === 8 && type.toLowerCase() === "textarea";
1067
1067
  }
@@ -1359,7 +1359,7 @@ function placeUpgradedList(args) {
1359
1359
  host.insertBefore(state.start, anchor);
1360
1360
  }
1361
1361
  function journalRootChildShape(state) {
1362
- if (import_render.ROOT_RENDER_TRANSACTION === null || import_render.ROOT_RENDER_TRANSACTION.aborted || import_engine.ROOT_RENDER_ROLLBACK)
1362
+ if (import_render.ROOT_RENDER_TRANSACTION === null || import_render.ROOT_RENDER_TRANSACTION.aborted || import_drivers.ROOT_RENDER_ROLLBACK)
1363
1363
  return;
1364
1364
  (0, import_commit.journalBag)();
1365
1365
  (0, import_commit.journalObjectOnce)(state);
@@ -1441,15 +1441,15 @@ function renderPreparedChildList(state, parentBlock, domParent, preparedList, hy
1441
1441
  signalSite: void 0,
1442
1442
  next: null
1443
1443
  };
1444
- if (upgradeArmed && import_drivers.HOST_DESCRIPTORS)
1445
- state.forSlot.adopt = import_drivers.HOST_DESCRIPTORS.adoptQueue(upgradeChildren, (0, import_templates.getFirstChild)(domParent));
1444
+ if (upgradeArmed && import_drivers.HOST_ADOPT_QUEUE)
1445
+ state.forSlot.adopt = (0, import_drivers.HOST_ADOPT_QUEUE)(upgradeChildren, (0, import_templates.getFirstChild)(domParent));
1446
1446
  }
1447
1447
  const { items, keys } = preparedList;
1448
1448
  const keySource = compiledMapKey || keys;
1449
1449
  const normalizeKey = !!compiledMapKey;
1450
1450
  const wasMappedNative = state.forSlot.mappedNative === true;
1451
1451
  const body = compiledMapBody || (mappedFallback === true ? mappedDeoptItemBody : deoptItemBody);
1452
- if (compiledMapBody === void 0 && wasMappedNative && state.forSlot.size > 0) {
1452
+ if (import_drivers.HOST_BODY && compiledMapBody === void 0 && wasMappedNative && state.forSlot.size > 0) {
1453
1453
  for (let index = 0; index < items.length; index++) {
1454
1454
  const item = items[index];
1455
1455
  if (!(0, import_elements.isHostDescriptor)(item)) continue;
@@ -1480,7 +1480,7 @@ function renderPreparedChildList(state, parentBlock, domParent, preparedList, hy
1480
1480
  }
1481
1481
  if (compiledMapBody !== void 0) state.forSlot.mappedNative = true;
1482
1482
  const plainDeopt = compiledMapBody === void 0 && mappedFallback !== true;
1483
- state.forSlot.plainDeopt = plainDeopt ? import_render.updateDeoptComponent : null;
1483
+ state.forSlot.plainDeopt = import_drivers.ELEMENT_DESCRIPTORS && plainDeopt ? import_render.updateDeoptComponent : null;
1484
1484
  const fastFlags = compiledMapFlags || 0;
1485
1485
  const ssrMarkerless = compiledMapBody !== void 0 && (fastFlags & 16) !== 0;
1486
1486
  let pure = (fastFlags & 1) !== 0;
@@ -1522,8 +1522,8 @@ function renderPreparedChildList(state, parentBlock, domParent, preparedList, hy
1522
1522
  adopt !== null ? domParent : null,
1523
1523
  adoptByKey
1524
1524
  );
1525
- if (adoptByKey !== null && import_drivers.HOST_DESCRIPTORS)
1526
- import_render.ROOT_RENDER_TRANSACTION.ops.push(import_drivers.HOST_DESCRIPTORS.placeUpgraded, [
1525
+ if (adoptByKey !== null && import_drivers.HOST_PLACE_UPGRADED)
1526
+ import_render.ROOT_RENDER_TRANSACTION.ops.push(import_drivers.HOST_PLACE_UPGRADED, [
1527
1527
  forSlot,
1528
1528
  parentBlock,
1529
1529
  domParent,