@simpreact/simpreact 0.0.6 → 0.0.8

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 (45) hide show
  1. package/compat/context.d.ts +4 -5
  2. package/compat/context.js +3 -3
  3. package/compat/core.d.ts +28 -27
  4. package/compat/core.js +8 -7
  5. package/compat/dom.d.ts +5 -5
  6. package/compat/dom.js +5 -5
  7. package/compat/hooks.d.ts +7 -8
  8. package/compat/hooks.js +3 -3
  9. package/compat/index.d.ts +100 -43
  10. package/compat/index.js +3 -0
  11. package/compat/jsx-runtime.d.ts +7 -7
  12. package/compat/jsx-runtime.js +4 -4
  13. package/compat/renderRuntime.d.ts +4 -0
  14. package/compat/renderRuntime.js +3 -0
  15. package/component/index.d.ts +6 -7
  16. package/context/index.d.ts +5 -5
  17. package/context/index.js +1 -1
  18. package/core/index.d.ts +17 -19
  19. package/core/index.js +3 -2
  20. package/core/internal.d.ts +2 -0
  21. package/core/internal.js +2 -0
  22. package/core/mounting.d.ts +1 -2
  23. package/core/mounting.js +50 -101
  24. package/core/mountingChildren.d.ts +4 -0
  25. package/core/mountingChildren.js +47 -0
  26. package/core/patching.d.ts +1 -1
  27. package/core/patching.js +54 -44
  28. package/core/patchingChildren.d.ts +3 -3
  29. package/core/patchingChildren.js +104 -91
  30. package/core/processStack.d.ts +53 -16
  31. package/core/processStack.js +23 -11
  32. package/core/unmounting.d.ts +4 -8
  33. package/core/unmounting.js +45 -85
  34. package/core/unmountingChildren.d.ts +4 -0
  35. package/core/unmountingChildren.js +23 -0
  36. package/core/utils.d.ts +3 -2
  37. package/core/utils.js +28 -3
  38. package/dom/index.d.ts +4 -5
  39. package/dom/props/dangerInnerHTML.d.ts +5 -5
  40. package/dom/props/dangerInnerHTML.js +10 -16
  41. package/dom/props/props.js +5 -5
  42. package/hooks/index.d.ts +12 -10
  43. package/hooks/index.js +1 -0
  44. package/package.json +1 -1
  45. package/shared/index.d.ts +10 -6
package/core/mounting.js CHANGED
@@ -1,18 +1,19 @@
1
- import { createTextElement, normalizeRoot, SIMP_ELEMENT_CHILD_FLAG_ELEMENT, SIMP_ELEMENT_CHILD_FLAG_LIST, SIMP_ELEMENT_CHILD_FLAG_TEXT, } from './createElement.js';
1
+ import { createTextElement, normalizeRoot, SIMP_ELEMENT_CHILD_FLAG_TEXT, } from './createElement.js';
2
2
  import { _pushHostOperationPlaceElement } from './hostOperations.js';
3
3
  import { lifecycleEventBus } from './lifecycleEventBus.js';
4
+ import { _pushMountChildrenFrame } from './mountingChildren.js';
4
5
  import { MOUNT_ENTER, MOUNT_EXIT, processStack } from './processStack.js';
5
6
  import { applyRef } from './ref.js';
6
7
  import { MOUNTING_PHASE } from './runtime.js';
7
8
  import { bitScanForwardIndex } from './utils.js';
8
9
  const mountHandlers = [_mountHostElement, _mountFunctionalElement, _mountTextElement, _mountPortal, _mountFragment];
9
- export function mount(element, parentReference, rightSibling, context, hostNamespace, renderRuntime) {
10
+ export function mount(element, parentReference, subtreeRightBoundary, context, hostNamespace, renderRuntime) {
10
11
  if (renderRuntime.renderStack.length !== 0) {
11
12
  throw new Error('Cannot mount while rendering.');
12
13
  }
13
14
  _pushMountEnterFrame(element, {
14
15
  parentReference,
15
- rightSibling,
16
+ subtreeRightBoundary,
16
17
  context,
17
18
  hostNamespace,
18
19
  renderRuntime,
@@ -37,18 +38,9 @@ function _pushMountExitFrame(element, meta) {
37
38
  meta,
38
39
  });
39
40
  }
40
- export function _pushMountArrayChildrenFrame(element, meta) {
41
- const children = element.children;
42
- for (let i = children.length - 1; i >= 0; i--) {
43
- const child = children[i];
44
- child.parent = element;
45
- const rightSibling = children[child.index + 1] ?? meta.rightSibling;
46
- _pushMountEnterFrame(child, { ...meta, rightSibling });
47
- }
48
- }
49
41
  function _mountHostElement(frame) {
50
42
  const element = frame.node;
51
- const { parentReference, rightSibling, context, hostNamespace, renderRuntime } = frame.meta;
43
+ const { parentReference, subtreeRightBoundary, context, hostNamespace, renderRuntime } = frame.meta;
52
44
  if (frame.kind === MOUNT_EXIT) {
53
45
  if (element.childFlag === SIMP_ELEMENT_CHILD_FLAG_TEXT) {
54
46
  renderRuntime.hostAdapter.setTextContent(element.reference, element.props.children);
@@ -62,7 +54,7 @@ function _mountHostElement(frame) {
62
54
  if (parentReference) {
63
55
  _pushHostOperationPlaceElement(element, {
64
56
  renderRuntime,
65
- rightSibling,
57
+ subtreeRightBoundary,
66
58
  parentReference,
67
59
  });
68
60
  }
@@ -75,39 +67,23 @@ function _mountHostElement(frame) {
75
67
  _pushMountExitFrame(element, {
76
68
  renderRuntime,
77
69
  hostNamespace: hostNamespaces?.self,
78
- rightSibling,
70
+ subtreeRightBoundary,
79
71
  context,
80
72
  parentReference,
81
73
  placeHolderElement: null,
82
74
  });
83
- switch (element.childFlag) {
84
- case SIMP_ELEMENT_CHILD_FLAG_LIST: {
85
- _pushMountArrayChildrenFrame(element, {
86
- renderRuntime,
87
- hostNamespace: hostNamespaces?.children,
88
- rightSibling: null,
89
- context,
90
- parentReference: hostReference,
91
- placeHolderElement: null,
92
- });
93
- break;
94
- }
95
- case SIMP_ELEMENT_CHILD_FLAG_ELEMENT: {
96
- element.children.parent = element;
97
- _pushMountEnterFrame(element.children, {
98
- renderRuntime,
99
- hostNamespace: hostNamespaces?.children,
100
- rightSibling: null,
101
- context,
102
- parentReference: hostReference,
103
- placeHolderElement: null,
104
- });
105
- }
106
- }
75
+ _pushMountChildrenFrame(element, {
76
+ renderRuntime,
77
+ hostNamespace: hostNamespaces?.children,
78
+ subtreeRightBoundary,
79
+ context,
80
+ parentReference: hostReference,
81
+ children: element.children,
82
+ });
107
83
  }
108
84
  function _mountFunctionalElement(frame) {
109
85
  const element = frame.node;
110
- const { parentReference, rightSibling, context, hostNamespace, renderRuntime } = frame.meta;
86
+ const { parentReference, subtreeRightBoundary, context, hostNamespace, renderRuntime } = frame.meta;
111
87
  if (frame.kind === MOUNT_EXIT) {
112
88
  lifecycleEventBus.publish({ type: 'mounted', element, renderRuntime });
113
89
  return;
@@ -154,6 +130,7 @@ function _mountFunctionalElement(frame) {
154
130
  });
155
131
  } while (triedToRerender);
156
132
  normalizeRoot(element, children, false);
133
+ children = element.children;
157
134
  }
158
135
  catch (error) {
159
136
  const event = {
@@ -176,37 +153,28 @@ function _mountFunctionalElement(frame) {
176
153
  }
177
154
  _pushMountExitFrame(element, {
178
155
  renderRuntime,
179
- hostNamespace: null,
180
- rightSibling: null,
181
- context: null,
182
- parentReference: null,
156
+ hostNamespace,
157
+ subtreeRightBoundary,
158
+ context,
159
+ parentReference,
183
160
  placeHolderElement: null,
184
161
  });
185
- if (element.children) {
186
- const child = element.children;
187
- child.parent = element;
188
- _pushMountEnterFrame(child, {
189
- renderRuntime,
190
- hostNamespace,
191
- rightSibling,
192
- context: element.context,
193
- parentReference,
194
- placeHolderElement: null,
195
- });
196
- }
197
- }
198
- function _mountTextElement(frame) {
199
- const { renderRuntime, parentReference } = frame.meta;
200
- frame.node.reference = renderRuntime.hostAdapter.createTextReference(frame.node.children);
201
- _pushHostOperationPlaceElement(frame.node, {
162
+ _pushMountChildrenFrame(element, {
202
163
  renderRuntime,
203
- rightSibling: frame.meta.rightSibling,
164
+ hostNamespace,
165
+ children: children,
166
+ context: element.context,
204
167
  parentReference,
168
+ subtreeRightBoundary,
205
169
  });
206
170
  }
171
+ function _mountTextElement(frame) {
172
+ frame.node.reference = frame.meta.renderRuntime.hostAdapter.createTextReference(frame.node.children);
173
+ _pushHostOperationPlaceElement(frame.node, frame.meta);
174
+ }
207
175
  function _mountPortal(frame) {
208
176
  const element = frame.node;
209
- const { parentReference, rightSibling, context, renderRuntime } = frame.meta;
177
+ const { parentReference, subtreeRightBoundary, context, renderRuntime } = frame.meta;
210
178
  if (frame.kind === MOUNT_EXIT) {
211
179
  element.reference = frame.meta.placeHolderElement.reference;
212
180
  return;
@@ -214,27 +182,23 @@ function _mountPortal(frame) {
214
182
  const placeHolderElement = createTextElement('');
215
183
  _pushMountExitFrame(element, {
216
184
  renderRuntime,
217
- rightSibling: null,
185
+ subtreeRightBoundary,
218
186
  context: null,
219
187
  parentReference: null,
220
188
  hostNamespace: null,
221
189
  placeHolderElement,
222
190
  });
223
- if (element.children) {
224
- const child = element.children;
225
- child.parent = element;
226
- _pushMountEnterFrame(child, {
227
- renderRuntime,
228
- rightSibling: null,
229
- context,
230
- parentReference: element.ref,
231
- hostNamespace: renderRuntime.hostAdapter.getHostNamespaces(child, undefined)?.self,
232
- placeHolderElement: null,
233
- });
234
- }
191
+ _pushMountChildrenFrame(element, {
192
+ renderRuntime,
193
+ hostNamespace: renderRuntime.hostAdapter.getHostNamespaces(element.children, undefined)?.self,
194
+ subtreeRightBoundary,
195
+ context,
196
+ parentReference: element.ref,
197
+ children: element.children,
198
+ });
235
199
  _pushMountEnterFrame(placeHolderElement, {
236
200
  renderRuntime,
237
- rightSibling,
201
+ subtreeRightBoundary,
238
202
  context: null,
239
203
  parentReference,
240
204
  hostNamespace: null,
@@ -243,28 +207,13 @@ function _mountPortal(frame) {
243
207
  }
244
208
  function _mountFragment(frame) {
245
209
  const element = frame.node;
246
- const { parentReference, hostNamespace, context, renderRuntime, rightSibling } = frame.meta;
247
- switch (element.childFlag) {
248
- case SIMP_ELEMENT_CHILD_FLAG_LIST:
249
- _pushMountArrayChildrenFrame(element, {
250
- renderRuntime,
251
- hostNamespace,
252
- rightSibling,
253
- context,
254
- parentReference,
255
- placeHolderElement: null,
256
- });
257
- break;
258
- case SIMP_ELEMENT_CHILD_FLAG_ELEMENT:
259
- const child = element.children;
260
- child.parent = element;
261
- _pushMountEnterFrame(child, {
262
- renderRuntime,
263
- hostNamespace,
264
- rightSibling,
265
- context,
266
- parentReference,
267
- placeHolderElement: null,
268
- });
269
- }
210
+ const { parentReference, hostNamespace, context, renderRuntime, subtreeRightBoundary } = frame.meta;
211
+ _pushMountChildrenFrame(element, {
212
+ renderRuntime,
213
+ hostNamespace,
214
+ children: element.children,
215
+ parentReference,
216
+ context,
217
+ subtreeRightBoundary: subtreeRightBoundary,
218
+ });
270
219
  }
@@ -0,0 +1,4 @@
1
+ import { type SimpElement } from './createElement.js';
2
+ import { type MountChildrenFrame, type MountChildrenFrameMeta } from './processStack.js';
3
+ export declare function _pushMountChildrenFrame(parent: SimpElement, meta: MountChildrenFrameMeta): void;
4
+ export declare function _mountChildren(frame: MountChildrenFrame): void;
@@ -0,0 +1,47 @@
1
+ import { SIMP_ELEMENT_CHILD_FLAG_ELEMENT, SIMP_ELEMENT_CHILD_FLAG_LIST } from './createElement.js';
2
+ import { _pushMountEnterFrame } from './mounting.js';
3
+ import { MOUNT_CHILDREN_ENTER } from './processStack.js';
4
+ import { isHostLike } from './utils.js';
5
+ export function _pushMountChildrenFrame(parent, meta) {
6
+ meta.renderRuntime.renderStack.push({
7
+ node: parent,
8
+ kind: MOUNT_CHILDREN_ENTER,
9
+ meta,
10
+ });
11
+ }
12
+ export function _mountChildren(frame) {
13
+ const parentElement = frame.node;
14
+ const { parentReference, hostNamespace, renderRuntime, context } = frame.meta;
15
+ const subtreeRightBoundary = isHostLike(parentElement.flag) ? null : frame.meta.subtreeRightBoundary;
16
+ switch (parentElement.childFlag) {
17
+ case SIMP_ELEMENT_CHILD_FLAG_ELEMENT: {
18
+ const children = frame.meta.children;
19
+ children.parent = parentElement;
20
+ _pushMountEnterFrame(children, {
21
+ renderRuntime,
22
+ hostNamespace,
23
+ subtreeRightBoundary,
24
+ context,
25
+ parentReference,
26
+ placeHolderElement: null,
27
+ });
28
+ break;
29
+ }
30
+ case SIMP_ELEMENT_CHILD_FLAG_LIST: {
31
+ const children = frame.meta.children;
32
+ for (let i = children.length - 1; i >= 0; i--) {
33
+ const child = children[i];
34
+ child.parent = parentElement;
35
+ const rightSibling = children[child.index + 1] || subtreeRightBoundary;
36
+ _pushMountEnterFrame(child, {
37
+ renderRuntime,
38
+ parentReference,
39
+ context,
40
+ hostNamespace,
41
+ subtreeRightBoundary: rightSibling,
42
+ placeHolderElement: null,
43
+ });
44
+ }
45
+ }
46
+ }
47
+ }
@@ -2,7 +2,7 @@ import type { Maybe, Nullable } from '../shared/index.js';
2
2
  import { type SimpElement } from './createElement.js';
3
3
  import { type PatchFrame, type PatchFrameMeta } from './processStack.js';
4
4
  import { type SimpRenderRuntime } from './runtime.js';
5
- export declare function patch(prevElement: SimpElement, nextElement: SimpElement, parentReference: unknown, rightSibling: Nullable<SimpElement>, context: unknown, hostNamespace: Maybe<string>, renderRuntime: SimpRenderRuntime): void;
5
+ export declare function patch(prevElement: SimpElement, nextElement: SimpElement, parentReference: unknown, subtreeRightBoundary: Nullable<SimpElement>, context: unknown, hostNamespace: Maybe<string>, renderRuntime: SimpRenderRuntime): void;
6
6
  export declare function _pushPatchEnterFrame(element: SimpElement, meta: PatchFrameMeta): void;
7
7
  export declare function _pushPatchExitFrame(element: SimpElement, meta: PatchFrameMeta): void;
8
8
  export declare function _patch(frame: PatchFrame): void;
package/core/patching.js CHANGED
@@ -7,10 +7,10 @@ import { _pushPatchChildrenFrame } from './patchingChildren.js';
7
7
  import { PATCH_ENTER, PATCH_EXIT, processStack } from './processStack.js';
8
8
  import { applyRef } from './ref.js';
9
9
  import { UPDATING_PHASE } from './runtime.js';
10
- import { _clearElementHostReference, _pushUnmountEnterFrame, _remove } from './unmounting.js';
11
- import { bitScanForwardIndex } from './utils.js';
10
+ import { _pushUnmountEnterFrame } from './unmounting.js';
11
+ import { _clearElementHostReference, bitScanForwardIndex } from './utils.js';
12
12
  const patchHandlers = [_patchHostElement, _patchFunctionalComponent, _patchTextElement, _patchPortal, _patchFragment];
13
- export function patch(prevElement, nextElement, parentReference, rightSibling, context, hostNamespace, renderRuntime) {
13
+ export function patch(prevElement, nextElement, parentReference, subtreeRightBoundary, context, hostNamespace, renderRuntime) {
14
14
  if (renderRuntime.renderStack.length !== 0) {
15
15
  throw new Error('Cannot patch while rendering.');
16
16
  }
@@ -18,10 +18,9 @@ export function patch(prevElement, nextElement, parentReference, rightSibling, c
18
18
  prevElement,
19
19
  parentReference,
20
20
  renderRuntime,
21
- rightSibling,
21
+ subtreeRightBoundary,
22
22
  context,
23
23
  hostNamespace,
24
- placeHolderElement: null,
25
24
  });
26
25
  processStack(renderRuntime);
27
26
  }
@@ -52,7 +51,7 @@ export function _patch(frame) {
52
51
  function _replaceWithNewElement(frame) {
53
52
  const nextElement = frame.node;
54
53
  const { prevElement, parentReference, context, hostNamespace, renderRuntime } = frame.meta;
55
- _pushUnmountEnterFrame(prevElement, renderRuntime);
54
+ _pushUnmountEnterFrame(prevElement, frame.meta);
56
55
  nextElement.parent = prevElement.parent;
57
56
  if ((nextElement.flag & SIMP_ELEMENT_FLAG_HOST) !== 0 && (prevElement.flag & SIMP_ELEMENT_FLAG_HOST) !== 0) {
58
57
  _pushHostOperationReplaceElement(nextElement, renderRuntime, {
@@ -64,14 +63,14 @@ function _replaceWithNewElement(frame) {
64
63
  hostNamespace,
65
64
  renderRuntime,
66
65
  parentReference: null,
67
- rightSibling: null,
66
+ subtreeRightBoundary: null,
68
67
  placeHolderElement: null,
69
68
  });
70
69
  }
71
70
  else {
72
71
  _clearElementHostReference(prevElement, parentReference, renderRuntime);
73
72
  _pushMountEnterFrame(nextElement, {
74
- rightSibling: frame.meta.rightSibling,
73
+ subtreeRightBoundary: frame.meta.subtreeRightBoundary,
75
74
  renderRuntime,
76
75
  hostNamespace,
77
76
  context,
@@ -82,7 +81,7 @@ function _replaceWithNewElement(frame) {
82
81
  }
83
82
  function _patchHostElement(frame) {
84
83
  const nextElement = frame.node;
85
- const { prevElement, context, hostNamespace, renderRuntime } = frame.meta;
84
+ const { prevElement, context, hostNamespace, renderRuntime, subtreeRightBoundary, parentReference } = frame.meta;
86
85
  if (frame.kind === PATCH_EXIT) {
87
86
  renderRuntime.hostAdapter.patchProps(nextElement.reference, prevElement, nextElement, renderRuntime, hostNamespace);
88
87
  if (prevElement.className !== nextElement.className) {
@@ -98,31 +97,33 @@ function _patchHostElement(frame) {
98
97
  prevElement,
99
98
  renderRuntime,
100
99
  hostNamespace,
101
- rightSibling: null,
102
- context: null,
103
- parentReference: null,
104
- placeHolderElement: null,
100
+ subtreeRightBoundary,
101
+ context,
102
+ parentReference,
105
103
  });
106
104
  _pushPatchChildrenFrame(nextElement, {
107
- prevElement,
108
- renderRuntime,
105
+ prevParentElement: prevElement,
106
+ nextChildren: nextElement.children,
107
+ prevChildren: prevElement.children,
108
+ nextParentChildFlag: nextElement.childFlag,
109
+ prevParentChildFlag: prevElement.childFlag,
110
+ subtreeRightBoundary,
109
111
  hostNamespace: renderRuntime.hostAdapter.getHostNamespaces(nextElement, hostNamespace)?.children,
110
- rightSibling: null,
111
112
  context,
112
113
  parentReference: nextElement.reference,
113
- placeHolderElement: null,
114
+ renderRuntime,
114
115
  });
115
116
  }
116
117
  function _patchFunctionalComponent(frame) {
117
118
  const nextElement = frame.node;
118
- const { prevElement, context, renderRuntime, hostNamespace, rightSibling, parentReference } = frame.meta;
119
+ const { prevElement, context, renderRuntime, hostNamespace, subtreeRightBoundary, parentReference } = frame.meta;
119
120
  if (frame.kind === PATCH_EXIT) {
120
121
  lifecycleEventBus.publish({ type: 'updated', element: nextElement, renderRuntime });
121
122
  return;
122
123
  }
123
124
  if (prevElement.unmounted) {
124
125
  _pushMountEnterFrame(nextElement, {
125
- rightSibling,
126
+ subtreeRightBoundary,
126
127
  renderRuntime,
127
128
  hostNamespace,
128
129
  context,
@@ -176,6 +177,7 @@ function _patchFunctionalComponent(frame) {
176
177
  });
177
178
  } while (triedToRerender);
178
179
  normalizeRoot(nextElement, nextChildren, false);
180
+ nextChildren = nextElement.children;
179
181
  }
180
182
  catch (error) {
181
183
  const parentChildren = prevElement.parent?.children;
@@ -196,7 +198,8 @@ function _patchFunctionalComponent(frame) {
196
198
  prevElement.parent.childFlag = SIMP_ELEMENT_CHILD_FLAG_EMPTY;
197
199
  prevElement.parent.children = null;
198
200
  }
199
- _remove(prevElement, parentReference, renderRuntime);
201
+ _clearElementHostReference(prevElement, parentReference, renderRuntime);
202
+ _pushUnmountEnterFrame(prevElement, frame.meta);
200
203
  const event = {
201
204
  type: 'errored',
202
205
  element: nextElement,
@@ -219,19 +222,21 @@ function _patchFunctionalComponent(frame) {
219
222
  prevElement,
220
223
  renderRuntime,
221
224
  hostNamespace,
222
- rightSibling: null,
223
- context: null,
224
- parentReference: null,
225
- placeHolderElement: null,
225
+ subtreeRightBoundary,
226
+ context,
227
+ parentReference,
226
228
  });
227
229
  _pushPatchChildrenFrame(nextElement, {
228
- prevElement: prevElementSnapshot,
230
+ subtreeRightBoundary,
231
+ prevParentChildFlag: prevElementSnapshot.childFlag,
232
+ nextParentChildFlag: nextElement.childFlag,
233
+ prevChildren: prevElementSnapshot.children,
234
+ nextChildren: nextChildren,
229
235
  renderRuntime,
230
236
  hostNamespace,
231
- rightSibling,
232
- context,
233
237
  parentReference,
234
- placeHolderElement: null,
238
+ context,
239
+ prevParentElement: prevElementSnapshot,
235
240
  });
236
241
  }
237
242
  function _patchTextElement(frame) {
@@ -244,7 +249,7 @@ function _patchTextElement(frame) {
244
249
  }
245
250
  function _patchPortal(frame) {
246
251
  const nextElement = frame.node;
247
- const { prevElement, renderRuntime, context } = frame.meta;
252
+ const { prevElement, renderRuntime, context, subtreeRightBoundary, hostNamespace, parentReference } = frame.meta;
248
253
  const prevContainer = prevElement.ref;
249
254
  const nextContainer = nextElement.ref;
250
255
  const nextChildren = nextElement.children;
@@ -258,33 +263,38 @@ function _patchPortal(frame) {
258
263
  _pushPatchExitFrame(nextElement, {
259
264
  prevElement,
260
265
  renderRuntime,
261
- hostNamespace: null,
262
- rightSibling: null,
263
- context: null,
264
- parentReference: null,
265
- placeHolderElement: null,
266
+ hostNamespace,
267
+ subtreeRightBoundary,
268
+ context,
269
+ parentReference,
266
270
  });
267
271
  }
268
272
  _pushPatchChildrenFrame(nextElement, {
269
- prevElement,
270
- renderRuntime,
271
- hostNamespace: renderRuntime.hostAdapter.getHostNamespaces(nextChildren, undefined)?.self,
272
- rightSibling: null,
273
+ prevParentElement: prevElement,
273
274
  context,
274
275
  parentReference: nextContainer,
275
- placeHolderElement: null,
276
+ hostNamespace: renderRuntime.hostAdapter.getHostNamespaces(nextChildren, undefined)?.self,
277
+ renderRuntime,
278
+ prevChildren: prevElement.children,
279
+ nextChildren,
280
+ nextParentChildFlag: nextElement.childFlag,
281
+ prevParentChildFlag: prevElement.childFlag,
282
+ subtreeRightBoundary,
276
283
  });
277
284
  }
278
285
  function _patchFragment(frame) {
279
286
  const nextElement = frame.node;
280
- const { prevElement, renderRuntime, context, parentReference, hostNamespace, rightSibling } = frame.meta;
287
+ const { prevElement, renderRuntime, context, parentReference, hostNamespace, subtreeRightBoundary } = frame.meta;
281
288
  _pushPatchChildrenFrame(nextElement, {
282
- prevElement,
283
- parentReference,
284
- rightSibling,
289
+ subtreeRightBoundary,
285
290
  context,
291
+ parentReference,
292
+ prevParentChildFlag: prevElement.childFlag,
293
+ nextParentChildFlag: nextElement.childFlag,
294
+ nextChildren: nextElement.children,
295
+ prevChildren: prevElement.children,
286
296
  renderRuntime,
287
297
  hostNamespace,
288
- placeHolderElement: null,
298
+ prevParentElement: prevElement,
289
299
  });
290
300
  }
@@ -1,6 +1,6 @@
1
1
  import { type SimpElement } from './createElement.js';
2
- import { type PatchChildrenFrame, type PatchFrameMeta } from './processStack.js';
3
- export declare function _pushPatchChildrenFrame(element: SimpElement, meta: PatchFrameMeta): void;
4
- export declare function _pushPatchKeyedChildrenFrame(element: SimpElement, meta: PatchFrameMeta): void;
2
+ import { type PatchChildrenFrame, type PatchChildrenFrameMeta } from './processStack.js';
3
+ export declare function _pushPatchChildrenFrame(parent: SimpElement, meta: PatchChildrenFrameMeta): void;
4
+ export declare function _pushPatchKeyedChildrenFrame(element: SimpElement, meta: PatchChildrenFrameMeta): void;
5
5
  export declare function _patchChildren(frame: PatchChildrenFrame): void;
6
6
  export declare function _patchKeyedChildren(frame: PatchChildrenFrame): void;