@torpor/view 0.1.6 → 0.1.7

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 (110) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/compile.cjs +9 -8
  3. package/dist/compile.cjs.map +1 -1
  4. package/dist/compile.js +9 -8
  5. package/dist/compile.js.map +1 -1
  6. package/dist/index.cjs +8 -4
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +17 -3
  9. package/dist/index.d.ts +17 -3
  10. package/dist/index.js +7 -4
  11. package/dist/index.js.map +1 -1
  12. package/dist/metafile-cjs.json +1 -1
  13. package/dist/metafile-esm.json +1 -1
  14. package/package.json +1 -1
  15. package/src/compile/build/client/buildCode.ts +1 -0
  16. package/src/compile/build/client/buildFragment.ts +15 -8
  17. package/src/index.ts +2 -0
  18. package/src/render/nodeAnchor.ts +1 -11
  19. package/src/render/nodeReanchor.ts +18 -0
  20. package/test/await/components/output/Await-client.ts +5 -2
  21. package/test/await/components/temp/{Await-client-5d753441145fbac078393af24cccadb208453d69.ts → Await-client-e2fc91352ed24b160650d7851d82375910bd28d6.ts} +5 -2
  22. package/test/bind/components/output/BindComponent-client.ts +5 -2
  23. package/test/bind/components/temp/{BindComponent-client-aaeb489ce72b664c6372f8764f7e665994a751a7.ts → BindComponent-client-c4dbd934eda6b8f9a7afc697b9d6dd3edc3a4a48.ts} +5 -2
  24. package/test/buildOutputFiles.ts +2 -0
  25. package/test/child-component/components/output/ParentChild-client.ts +4 -1
  26. package/test/child-component/components/temp/{ParentChild-client-6cf4d156ea46338815270faf67f56472f1a4ccd4.ts → ParentChild-client-16042a29846dbbeec5905f163bf29b6bb48dfd42.ts} +4 -1
  27. package/test/class/components/output/Class-client.ts +4 -1
  28. package/test/class/components/temp/{Class-client-0405eff591f854c04e5728df0479014ef91efc61.ts → Class-client-71b655ee0cbda59527269a2fbf0b6d2a1176bbaa.ts} +4 -1
  29. package/test/component/components/output/Component-client.ts +5 -2
  30. package/test/component/components/temp/{Component-client-355b42e5f7411c399e2f50fba3580f4f7c3fa943.ts → Component-client-2f4734d1288dc88d1d5aa532791199969351ec1d.ts} +5 -2
  31. package/test/effects/components/output/For-client.ts +4 -1
  32. package/test/effects/components/output/If-client.ts +4 -1
  33. package/test/effects/components/output/NestedIf-client.ts +8 -3
  34. package/test/effects/components/temp/{For-client-fbe876286c0f99b8391ff0c06c92b58bf580218f.ts → For-client-56df708520a56e3461dd041d5fcf3a6d16d6c653.ts} +4 -1
  35. package/test/effects/components/temp/{If-client-420a093f13de6ce07d2d4bc94705901809096cd9.ts → If-client-341b189ef35481d477325e09e9b2d3479b7a6dfc.ts} +4 -1
  36. package/test/effects/components/temp/{NestedIf-client-af88ec303b1a4184263bb370ef5b1f1e8aca8efc.ts → NestedIf-client-4c74efc133b9817ff106e6ffcf4065603030a596.ts} +8 -3
  37. package/test/for/components/output/For-client.ts +4 -1
  38. package/test/for/components/output/ForEscape-client.ts +4 -1
  39. package/test/for/components/output/ForIn-client.ts +4 -1
  40. package/test/for/components/output/ForOf-client.ts +4 -1
  41. package/test/for/components/temp/{For-client-421f2a6ca501d135c0aef9d1aaea25de0e1c00e4.ts → For-client-1d8c7995d69e881e0c6e23e17feb4ee73e34f7c3.ts} +4 -1
  42. package/test/for/components/temp/{ForEscape-client-72879c80f7544c2edfc224095740bdea20e1e12d.ts → ForEscape-client-c4b46ddf79bcceb3d677baeb57ac85ec6bc5f565.ts} +4 -1
  43. package/test/for/components/temp/{ForIn-client-e12c45d7f53e50ea3ed456110138dfb95f6930e0.ts → ForIn-client-b64e5ecc592f137f08fc6ab9da800732df94976e.ts} +4 -1
  44. package/test/for/components/temp/{ForOf-client-422d67d6c046f1d1de655719d061ea29f67d23f7.ts → ForOf-client-4ef8193b2f0603a8edfcbe6c2d321a240211bdcd.ts} +4 -1
  45. package/test/html/components/output/Html-client.ts +4 -1
  46. package/test/html/components/temp/{Html-client-2f309b06c3304a952d249057dec058a514d52874.ts → Html-client-2c3bae5ddb348adb88e332df9bad69714a88ddd1.ts} +4 -1
  47. package/test/if/components/output/IfAfterIf-client.ts +8 -3
  48. package/test/if/components/output/IfElse-client.ts +5 -2
  49. package/test/if/components/output/IfElseIf-client.ts +5 -2
  50. package/test/if/components/output/IfFalse-client.ts +5 -2
  51. package/test/if/components/output/IfNested-client.ts +9 -4
  52. package/test/if/components/temp/{IfAfterIf-client-5ddfc6dc62ffbc9a518220458403008e88e69e6c.ts → IfAfterIf-client-e092f37a07f06c67501693a2028c3f7a809267a9.ts} +8 -3
  53. package/test/if/components/temp/{IfElse-client-815057ffb2d9a1861bb316d445321947ddedbb65.ts → IfElse-client-9b9b5cd2d58364c2792c6233dcf1a028c343741b.ts} +5 -2
  54. package/test/if/components/temp/{IfElseIf-client-a7b16a8af24fdd3caa7b9e8e56d4bdb6ad3ab855.ts → IfElseIf-client-c6e0f7e55b7d2471527f7fbc673cdb1be41a548c.ts} +5 -2
  55. package/test/if/components/temp/{IfFalse-client-6507ff8abd4842b78da27d8a9d4964abc1d9b727.ts → IfFalse-client-84249379a2b7b30baea5eeed2a64d4502763d002.ts} +5 -2
  56. package/test/if/components/temp/{IfNested-client-e09f8af625b4e0b3e9eb210440f8edda720f0d53.ts → IfNested-client-6a536c2000ef72e8c289ad789b135d4b1e170b6e.ts} +9 -4
  57. package/test/party/components/output/AnswerButtonApp-client.ts +5 -2
  58. package/test/party/components/output/ColorSelect-client.ts +4 -1
  59. package/test/party/components/output/Colors-client.ts +4 -1
  60. package/test/party/components/output/FunnyButton-client.ts +4 -1
  61. package/test/party/components/output/FunnyButtonApp-client.ts +7 -2
  62. package/test/party/components/output/TrafficLight-client.ts +4 -1
  63. package/test/party/components/output/UserProfileApp-client.ts +5 -2
  64. package/test/party/components/output/UserProfileContextApp-client.ts +4 -1
  65. package/test/party/components/temp/{AnswerButtonApp-client-a2b16c738467742436b1a2ddaf2d767795a4d625.ts → AnswerButtonApp-client-959a3756a3549b01c5d4c6e7b1dade9dc14ce671.ts} +5 -2
  66. package/test/party/components/temp/{ColorSelect-client-4e848c296047911f4c0e3bc1447e5562ce06087c.ts → ColorSelect-client-06e6ef9f285d81975b97d89c8a68a494a32a8e3b.ts} +4 -1
  67. package/test/party/components/temp/{Colors-client-dde7bf60e2b16383ec981b08f8414b1ebeb349a5.ts → Colors-client-2f3ab581879042904699c9d47ae5001b82edd910.ts} +4 -1
  68. package/test/party/components/temp/{FunnyButton-client-61a1699da08e210375edff33f7b27d3cc0e99cc3.ts → FunnyButton-client-400cff6abc7bdd6dbcd23786070eb0e198800337.ts} +4 -1
  69. package/test/party/components/temp/{FunnyButtonApp-client-cbce6a591bae38ab8b312551f8741d50ae6294bf.ts → FunnyButtonApp-client-42c39a8ffb7563c474e6b3ccfc9d4ee064c8fbee.ts} +7 -2
  70. package/test/party/components/temp/{TrafficLight-client-4010f51fde4c8c21e6c232eff974c86820dbad4f.ts → TrafficLight-client-b536f07f37c21cd9340db9cef7b95d30c53f9349.ts} +4 -1
  71. package/test/party/components/temp/{UserProfileApp-client-32b5cc129b32af5cdd94f39c6fb09a2e4806b04e.ts → UserProfileApp-client-deefee703fc851401cd3a4eec7606d0a228a631d.ts} +5 -2
  72. package/test/party/components/temp/{UserProfileContextApp-client-c4b64ccf44069bcbf18acb585afa62ac9127aeb9.ts → UserProfileContextApp-client-0f5f11a3fd62f7e0e428fec2a260b93fcff61578.ts} +4 -1
  73. package/test/props/components/output/Reactive-client.ts +4 -1
  74. package/test/props/components/temp/{Reactive-client-249382840865c9911857b89085bc85ff901b8e8f.ts → Reactive-client-524add56a858b575fda1001bfe4891e6a1d6d751.ts} +4 -1
  75. package/test/replace/components/output/Replace-client.ts +4 -1
  76. package/test/replace/components/temp/{Replace-client-ef66f06bc0cfa91e800b185dbccbca6a98693c21.ts → Replace-client-7f6ae4e645d18c4768ef9a212b2e9626c9abdeb0.ts} +4 -1
  77. package/test/slots/components/output/Article-client.ts +10 -3
  78. package/test/slots/components/output/Basic-client.ts +5 -2
  79. package/test/slots/components/output/Header-client.ts +4 -1
  80. package/test/slots/components/output/Let-client.ts +5 -2
  81. package/test/slots/components/output/List-client.ts +7 -2
  82. package/test/slots/components/output/Named-client.ts +5 -2
  83. package/test/slots/components/output/Unused-client.ts +5 -2
  84. package/test/slots/components/temp/{Article-client-f7676836f5ded94222b11ef81e41dd675d1af04b.ts → Article-client-5f243a2540a073d4018bdc93c6a8e285ba965f5c.ts} +10 -3
  85. package/test/slots/components/temp/{Basic-client-e7650b8be5f6e50fa0f2f343a145f86edfe14ff4.ts → Basic-client-85377d56d5d37f56ebb10a709e9ffa1a91a2dd91.ts} +5 -2
  86. package/test/slots/components/temp/{Header-client-127c27e6bfcd5b37cc871164cd665b740418dc82.ts → Header-client-247a12314f4fc2695e63b576731b9d0c2a73dcac.ts} +4 -1
  87. package/test/slots/components/temp/{Let-client-c107eb0fe42f125996d2c9a83ab7b3c1916ca26d.ts → Let-client-2625080a2799f5124b1b7083b780958f95539f15.ts} +5 -2
  88. package/test/slots/components/temp/{List-client-ca1d8f9a9cc8b513323de7c5531a4ec03898d920.ts → List-client-2b316860db37180e9bdfabb32f18b391c3994ac4.ts} +7 -2
  89. package/test/slots/components/temp/{Named-client-636b6a18c25a27099f883cb9eeb04e182e248941.ts → Named-client-64e56746d78b308fd788c9b0409d79e4c91756ff.ts} +5 -2
  90. package/test/slots/components/temp/{Unused-client-0aefcc79e9ae050358fa049a35b7e8e0a6bc2d66.ts → Unused-client-3436f47c322f34378aa240b8ad789048d35b4829.ts} +5 -2
  91. package/test/special-component/components/output/BigTitle-client.ts +4 -1
  92. package/test/special-component/components/output/Component-client.ts +8 -3
  93. package/test/special-component/components/output/SmallTitle-client.ts +4 -1
  94. package/test/special-component/components/temp/{BigTitle-client-04ca3c7b6aaf76b81baa5a3d3720fbd2a1760550.ts → BigTitle-client-aa7930485dfd471094922b7725ab6fd7718817e6.ts} +4 -1
  95. package/test/special-component/components/temp/{Component-client-24cd39596c4281ee2709e6aa482818d071825b4f.ts → Component-client-3353f5d7d697fd754f92ea30f751f62efb0635c9.ts} +8 -3
  96. package/test/special-component/components/temp/{SmallTitle-client-213b422377a30fe0b12f7256e654bf0313ac9cf9.ts → SmallTitle-client-419568c1936f1bb8346db193f0a17848aac61e8e.ts} +4 -1
  97. package/test/special-self/components/output/Self-client.ts +8 -3
  98. package/test/special-self/components/temp/{Self-client-99b34229c85a477881299311f56f48686352c3b3.ts → Self-client-bc1db32c01ceebd8aac04288c4d73431cffb200f.ts} +8 -3
  99. package/test/svg/components/output/Shape-client.ts +4 -1
  100. package/test/svg/components/temp/{Shape-client-368789c592401c3e4c99ddcdb8fe6dded45eb34a.ts → Shape-client-8e9515d4a360b9f4a945263a485486a557da1075.ts} +4 -1
  101. package/test/switch/components/output/Switch-client.ts +4 -1
  102. package/test/switch/components/temp/{Switch-client-5ef1937202adac7fd5aae866357d95beb4b5805f.ts → Switch-client-485db0bdd94941ecad84528054f40ec6330c5e48.ts} +4 -1
  103. package/test/watch-array/components/output/Array-client.ts +4 -1
  104. package/test/watch-array/components/output/ArrayEntries-client.ts +4 -1
  105. package/test/watch-array/components/output/ArrayIndexes-client.ts +4 -1
  106. package/test/watch-array/components/output/ArrayUnkeyed-client.ts +4 -1
  107. package/test/watch-array/components/temp/{Array-client-24ccac431fa237432ec4875234773f36a9a5b120.ts → Array-client-8b76b82f631c149d12466795ef6b016ebeda5568.ts} +4 -1
  108. package/test/watch-array/components/temp/{ArrayEntries-client-ebfb391a78325be4411f24a1ecfdc45ca3a6a621.ts → ArrayEntries-client-c7b6352485a0d8ebcdb150d3e7f49d60493fde92.ts} +4 -1
  109. package/test/watch-array/components/temp/{ArrayIndexes-client-0a4b3226862bb1de13fdbc7a14f689d9f7ade2a1.ts → ArrayIndexes-client-d8321be46a9572147e7b4bc71d7496985217b4f8.ts} +4 -1
  110. package/test/watch-array/components/temp/{ArrayUnkeyed-client-0966fa5ed460f4c627d8d619e493601098d6a33e.ts → ArrayUnkeyed-client-e37813da82c6d06de32d77348f23ed29c9c08187.ts} +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torpor/view",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Torpor's view library, for writing and mounting components",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -29,6 +29,7 @@ const importsMap: Record<string, string> = {
29
29
  t_animate: 'import { t_animate } from "${folder}";',
30
30
  t_root: 'import { t_root } from "${folder}";',
31
31
  t_anchor: 'import { t_anchor } from "${folder}";',
32
+ t_reanchor: 'import { t_reanchor } from "${folder}";',
32
33
  t_child: 'import { t_child } from "${folder}";',
33
34
  t_next: 'import { t_next } from "${folder}";',
34
35
  t_skip: 'import { t_skip } from "${folder}";',
@@ -661,18 +661,12 @@ function declareParentAndAnchorFragmentVars(
661
661
  path.children.push(anchorPath);
662
662
 
663
663
  node.varName = nextVarName(`${name}_anchor`, status);
664
- const anchorVarPath = getFragmentVarPath(
665
- fragment,
666
- status,
667
- `t_anchor(${node.varName}, true)`,
668
- anchorPath,
669
- varPaths,
670
- );
664
+ const anchorVarPath = getFragmentVarPath(fragment, status, node.varName, anchorPath, varPaths);
671
665
  if (status.options?.useCreateElement) {
672
666
  b.append(`let ${node.varName};`);
673
667
  } else {
674
668
  status.imports.add("t_anchor");
675
- b.append(`const ${node.varName} = t_anchor(${anchorVarPath}) as HTMLElement;`);
669
+ b.append(`let ${node.varName} = t_anchor(${anchorVarPath}) as HTMLElement;`);
676
670
 
677
671
  printDebug(node.varName, status, b);
678
672
  }
@@ -685,6 +679,19 @@ function declareParentAndAnchorFragmentVars(
685
679
  // rather than at the end of the fragment
686
680
  buildNode(node, status, b, parentName, anchorName);
687
681
  node.handled = true;
682
+
683
+ // Before hydrating, the anchor node actually gets set to the first node
684
+ // After hydrating, we need to reset the anchor node to the end node
685
+ if (declare && node.varName) {
686
+ status.imports.add("t_reanchor");
687
+ b.append(`${node.varName} = t_reanchor(${node.varName}) as HTMLElement;`);
688
+ b.append("");
689
+
690
+ printDebug(node.varName, status, b);
691
+ }
692
+
693
+ // TODO: Due to the above, I think we only need to set the hydration node at
694
+ // the end of a fragment, not in every next() call??
688
695
  }
689
696
 
690
697
  function getFragmentVarPath(
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import t_range from "./render/newRange";
18
18
  import t_anchor from "./render/nodeAnchor";
19
19
  import t_child from "./render/nodeChild";
20
20
  import t_next from "./render/nodeNext";
21
+ import t_reanchor from "./render/nodeReanchor";
21
22
  import t_root from "./render/nodeRoot";
22
23
  import t_skip from "./render/nodeSkip";
23
24
  import t_pop_range from "./render/popRange";
@@ -52,6 +53,7 @@ export {
52
53
  t_style,
53
54
  t_range,
54
55
  t_anchor,
56
+ t_reanchor,
55
57
  t_child,
56
58
  t_next,
57
59
  t_root,
@@ -15,20 +15,10 @@ import nodeNext from "./nodeNext";
15
15
  * the matched comments.
16
16
  *
17
17
  * @param node The potential anchor node.
18
- * @param subsequent Whether this is the second time the anchor is being retrieved.
19
18
  * @returns The anchor node.
20
19
  */
21
- export default function nodeAnchor(node: ChildNode, subsequent = false): ChildNode {
20
+ export default function nodeAnchor(node: ChildNode): ChildNode {
22
21
  if (context.hydrationNode) {
23
- // The first time we get a node anchor during hydration, the hydration
24
- // node gets set to the first node in the statement, and then we work
25
- // through the nodes until we get to the anchor node itself. So, the
26
- // second time we get the anchor node, the hydration node should have
27
- // been set to it. I'm not sure this is going to always be the case...
28
- if (subsequent) {
29
- return context.hydrationNode;
30
- }
31
-
32
22
  if (isComment(node) && node.data === HYDRATION_START) {
33
23
  // Skip and remove the start node, setting the hydration node in
34
24
  // nodeNext
@@ -0,0 +1,18 @@
1
+ import context from "./context";
2
+
3
+ /**
4
+ * Gets the anchor node after adding a fragment.
5
+ *
6
+ * When hydrating, the anchor node initially gets set to the first node in the
7
+ * statement, and then we work through the nodes until we get to the anchor node
8
+ * itself. So, after hydrating, we need to set the anchor node to the actual
9
+ * anchor node, from the current hydration node.
10
+ *
11
+ * I'm not sure this is going to always be the case...
12
+ *
13
+ * @param node The anchor node.
14
+ * @returns The (maybe new) anchor node.
15
+ */
16
+ export default function nodeReanchor(node: ChildNode): ChildNode {
17
+ return context.hydrationNode ?? node;
18
+ }
@@ -11,6 +11,7 @@ import t_next from "../../../../src/render/nodeNext";
11
11
  import t_pop_range from "../../../../src/render/popRange";
12
12
  import t_push_range from "../../../../src/render/pushRange";
13
13
  import t_range from "../../../../src/render/newRange";
14
+ import t_reanchor from "../../../../src/render/nodeReanchor";
14
15
  import t_root from "../../../../src/render/nodeRoot";
15
16
  import t_run_branch from "../../../../src/render/runControlBranch";
16
17
  import t_run_control from "../../../../src/render/runControl";
@@ -50,7 +51,7 @@ export default function Await(
50
51
  // @ts-ignore
51
52
  const t_root_0 = t_root(t_fragment_0, true);
52
53
  const t_await_parent_1 = t_next(t_root_0) as HTMLElement;
53
- const t_await_anchor_1 = t_anchor(t_next(t_child(t_await_parent_1))) as HTMLElement;
54
+ let t_await_anchor_1 = t_anchor(t_next(t_child(t_await_parent_1))) as HTMLElement;
54
55
 
55
56
  /* @await */
56
57
  const t_await_range_1 = t_range();
@@ -106,7 +107,9 @@ export default function Await(
106
107
  })(t_await_token_1);
107
108
  });
108
109
 
109
- const t_button_1 = t_next(t_next(t_anchor(t_await_anchor_1, true), true)) as HTMLElement;
110
+ t_await_anchor_1 = t_reanchor(t_await_anchor_1) as HTMLElement;
111
+
112
+ const t_button_1 = t_next(t_next(t_await_anchor_1, true)) as HTMLElement;
110
113
  // @ts-ignore
111
114
  const t_text_5 = t_next(t_await_parent_1, true);
112
115
  t_event(t_button_1, "click", () => $state.guesser = guessNumber(100));
@@ -11,6 +11,7 @@ import t_next from "../../../../src/render/nodeNext";
11
11
  import t_pop_range from "../../../../src/render/popRange";
12
12
  import t_push_range from "../../../../src/render/pushRange";
13
13
  import t_range from "../../../../src/render/newRange";
14
+ import t_reanchor from "../../../../src/render/nodeReanchor";
14
15
  import t_root from "../../../../src/render/nodeRoot";
15
16
  import t_run_branch from "../../../../src/render/runControlBranch";
16
17
  import t_run_control from "../../../../src/render/runControl";
@@ -50,7 +51,7 @@ export default function Await(
50
51
  // @ts-ignore
51
52
  const t_root_0 = t_root(t_fragment_0, true);
52
53
  const t_await_parent_1 = t_next(t_root_0) as HTMLElement;
53
- const t_await_anchor_1 = t_anchor(t_next(t_child(t_await_parent_1))) as HTMLElement;
54
+ let t_await_anchor_1 = t_anchor(t_next(t_child(t_await_parent_1))) as HTMLElement;
54
55
 
55
56
  /* @await */
56
57
  const t_await_range_1 = t_range();
@@ -106,7 +107,9 @@ export default function Await(
106
107
  })(t_await_token_1);
107
108
  });
108
109
 
109
- const t_button_1 = t_next(t_next(t_anchor(t_await_anchor_1, true), true)) as HTMLElement;
110
+ t_await_anchor_1 = t_reanchor(t_await_anchor_1) as HTMLElement;
111
+
112
+ const t_button_1 = t_next(t_next(t_await_anchor_1, true)) as HTMLElement;
110
113
  // @ts-ignore
111
114
  const t_text_5 = t_next(t_await_parent_1, true);
112
115
  t_event(t_button_1, "click", () => $state.guesser = guessNumber(100));
@@ -8,6 +8,7 @@ import t_event from "../../../../src/render/addEvent";
8
8
  import t_fmt from "../../../../src/render/formatText";
9
9
  import t_fragment from "../../../../src/render/getFragment";
10
10
  import t_next from "../../../../src/render/nodeNext";
11
+ import t_reanchor from "../../../../src/render/nodeReanchor";
11
12
  import t_root from "../../../../src/render/nodeRoot";
12
13
 
13
14
  export default function BindComponent(
@@ -30,7 +31,7 @@ export default function BindComponent(
30
31
  // @ts-ignore
31
32
  const t_root_0 = t_root(t_fragment_0, true);
32
33
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
33
- const t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
34
+ let t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
34
35
 
35
36
  /* @component */
36
37
  const t_props_1: any = $watch({});
@@ -42,7 +43,9 @@ export default function BindComponent(
42
43
  });
43
44
  BindText(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
44
45
 
45
- const t_text_1 = t_child(t_next(t_next(t_anchor(t_comp_anchor_1, true), true)));
46
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
47
+
48
+ const t_text_1 = t_child(t_next(t_next(t_comp_anchor_1, true)));
46
49
  // @ts-ignore
47
50
  const t_text_2 = t_next(t_comp_parent_1, true);
48
51
  $run(function setTextContent() {
@@ -8,6 +8,7 @@ import t_event from "../../../../src/render/addEvent";
8
8
  import t_fmt from "../../../../src/render/formatText";
9
9
  import t_fragment from "../../../../src/render/getFragment";
10
10
  import t_next from "../../../../src/render/nodeNext";
11
+ import t_reanchor from "../../../../src/render/nodeReanchor";
11
12
  import t_root from "../../../../src/render/nodeRoot";
12
13
 
13
14
  export default function BindComponent(
@@ -30,7 +31,7 @@ export default function BindComponent(
30
31
  // @ts-ignore
31
32
  const t_root_0 = t_root(t_fragment_0, true);
32
33
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
33
- const t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
34
+ let t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
34
35
 
35
36
  /* @component */
36
37
  const t_props_1: any = $watch({});
@@ -42,7 +43,9 @@ export default function BindComponent(
42
43
  });
43
44
  BindText(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
44
45
 
45
- const t_text_1 = t_child(t_next(t_next(t_anchor(t_comp_anchor_1, true), true)));
46
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
47
+
48
+ const t_text_1 = t_child(t_next(t_next(t_comp_anchor_1, true)));
46
49
  // @ts-ignore
47
50
  const t_text_2 = t_next(t_comp_parent_1, true);
48
51
  $run(function setTextContent() {
@@ -140,6 +140,8 @@ const importsMap: Record<string, string> = {
140
140
  'import { t_root } from "@torpor/view";': 'import t_root from "../../../../src/render/nodeRoot";',
141
141
  'import { t_anchor } from "@torpor/view";':
142
142
  'import t_anchor from "../../../../src/render/nodeAnchor";',
143
+ 'import { t_reanchor } from "@torpor/view";':
144
+ 'import t_reanchor from "../../../../src/render/nodeReanchor";',
143
145
  'import { t_child } from "@torpor/view";':
144
146
  'import t_child from "../../../../src/render/nodeChild";',
145
147
  'import { t_next } from "@torpor/view";': 'import t_next from "../../../../src/render/nodeNext";',
@@ -7,6 +7,7 @@ import t_child from "../../../../src/render/nodeChild";
7
7
  import t_fmt from "../../../../src/render/formatText";
8
8
  import t_fragment from "../../../../src/render/getFragment";
9
9
  import t_next from "../../../../src/render/nodeNext";
10
+ import t_reanchor from "../../../../src/render/nodeReanchor";
10
11
  import t_root from "../../../../src/render/nodeRoot";
11
12
 
12
13
  export default function ParentChild(
@@ -27,13 +28,15 @@ export default function ParentChild(
27
28
  // @ts-ignore
28
29
  const t_root_0 = t_root(t_fragment_0, true);
29
30
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
30
- const t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
31
+ let t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
31
32
 
32
33
  /* @component */
33
34
  const t_props_1: any = $watch({});
34
35
  t_props_1["name"] = "Anna";
35
36
  Child(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
36
37
 
38
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
39
+
37
40
  // @ts-ignore
38
41
  const t_text_1 = t_next(t_comp_parent_1, true);
39
42
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -7,6 +7,7 @@ import t_child from "../../../../src/render/nodeChild";
7
7
  import t_fmt from "../../../../src/render/formatText";
8
8
  import t_fragment from "../../../../src/render/getFragment";
9
9
  import t_next from "../../../../src/render/nodeNext";
10
+ import t_reanchor from "../../../../src/render/nodeReanchor";
10
11
  import t_root from "../../../../src/render/nodeRoot";
11
12
 
12
13
  export default function ParentChild(
@@ -27,13 +28,15 @@ export default function ParentChild(
27
28
  // @ts-ignore
28
29
  const t_root_0 = t_root(t_fragment_0, true);
29
30
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
30
- const t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
31
+ let t_comp_anchor_1 = t_anchor(t_next(t_child(t_comp_parent_1))) as HTMLElement;
31
32
 
32
33
  /* @component */
33
34
  const t_props_1: any = $watch({});
34
35
  t_props_1["name"] = "Anna";
35
36
  Child(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
36
37
 
38
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
39
+
37
40
  // @ts-ignore
38
41
  const t_text_1 = t_next(t_comp_parent_1, true);
39
42
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -7,6 +7,7 @@ import t_child from "../../../../src/render/nodeChild";
7
7
  import t_class from "../../../../src/render/getClasses";
8
8
  import t_fragment from "../../../../src/render/getFragment";
9
9
  import t_next from "../../../../src/render/nodeNext";
10
+ import t_reanchor from "../../../../src/render/nodeReanchor";
10
11
  import t_root from "../../../../src/render/nodeRoot";
11
12
 
12
13
  export default function Class(
@@ -32,7 +33,7 @@ export default function Class(
32
33
  const t_div_3 = t_next(t_next(t_div_2, true)) as HTMLDivElement;
33
34
  const t_div_4 = t_next(t_next(t_div_3, true)) as HTMLDivElement;
34
35
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
35
- const t_comp_anchor_1 = t_anchor(t_next(t_next(t_div_4, true))) as HTMLElement;
36
+ let t_comp_anchor_1 = t_anchor(t_next(t_next(t_div_4, true))) as HTMLElement;
36
37
 
37
38
  /* @component */
38
39
  const t_props_1: any = $watch({});
@@ -41,6 +42,8 @@ export default function Class(
41
42
  });
42
43
  Child(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
43
44
 
45
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
46
+
44
47
  // @ts-ignore
45
48
  const t_text_1 = t_next(t_comp_parent_1, true);
46
49
  $run(function setClasses() {
@@ -7,6 +7,7 @@ import t_child from "../../../../src/render/nodeChild";
7
7
  import t_class from "../../../../src/render/getClasses";
8
8
  import t_fragment from "../../../../src/render/getFragment";
9
9
  import t_next from "../../../../src/render/nodeNext";
10
+ import t_reanchor from "../../../../src/render/nodeReanchor";
10
11
  import t_root from "../../../../src/render/nodeRoot";
11
12
 
12
13
  export default function Class(
@@ -32,7 +33,7 @@ export default function Class(
32
33
  const t_div_3 = t_next(t_next(t_div_2, true)) as HTMLDivElement;
33
34
  const t_div_4 = t_next(t_next(t_div_3, true)) as HTMLDivElement;
34
35
  const t_comp_parent_1 = t_next(t_root_0) as HTMLElement;
35
- const t_comp_anchor_1 = t_anchor(t_next(t_next(t_div_4, true))) as HTMLElement;
36
+ let t_comp_anchor_1 = t_anchor(t_next(t_next(t_div_4, true))) as HTMLElement;
36
37
 
37
38
  /* @component */
38
39
  const t_props_1: any = $watch({});
@@ -41,6 +42,8 @@ export default function Class(
41
42
  });
42
43
  Child(t_comp_parent_1, t_comp_anchor_1, t_props_1, $context);
43
44
 
45
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
46
+
44
47
  // @ts-ignore
45
48
  const t_text_1 = t_next(t_comp_parent_1, true);
46
49
  $run(function setClasses() {
@@ -4,6 +4,7 @@ import t_add_fragment from "../../../../src/render/addFragment";
4
4
  import t_anchor from "../../../../src/render/nodeAnchor";
5
5
  import t_fragment from "../../../../src/render/getFragment";
6
6
  import t_next from "../../../../src/render/nodeNext";
7
+ import t_reanchor from "../../../../src/render/nodeReanchor";
7
8
  import t_root from "../../../../src/render/nodeRoot";
8
9
 
9
10
  import Header from "../output/./Header-client";
@@ -25,15 +26,17 @@ export default function Component(
25
26
  const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <!> `);
26
27
  // @ts-ignore
27
28
  const t_root_0 = t_root(t_fragment_0, true);
28
- const t_comp_anchor_1 = t_anchor(t_next(t_root_0)) as HTMLElement;
29
+ let t_comp_anchor_1 = t_anchor(t_next(t_root_0)) as HTMLElement;
29
30
 
30
31
  /* @component */
31
32
  const t_props_1: any = $watch({});
32
33
  t_props_1["name"] = "Amy";
33
34
  Header(t_fragment_0, t_comp_anchor_1, t_props_1, $context);
34
35
 
36
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
37
+
35
38
  // @ts-ignore
36
- const t_text_1 = t_next(t_anchor(t_comp_anchor_1, true), true);
39
+ const t_text_1 = t_next(t_comp_anchor_1, true);
37
40
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
38
41
  t_next(t_text_1);
39
42
 
@@ -4,6 +4,7 @@ import t_add_fragment from "../../../../src/render/addFragment";
4
4
  import t_anchor from "../../../../src/render/nodeAnchor";
5
5
  import t_fragment from "../../../../src/render/getFragment";
6
6
  import t_next from "../../../../src/render/nodeNext";
7
+ import t_reanchor from "../../../../src/render/nodeReanchor";
7
8
  import t_root from "../../../../src/render/nodeRoot";
8
9
 
9
10
  import Header from "../output/./Header-client";
@@ -25,15 +26,17 @@ export default function Component(
25
26
  const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <!> `);
26
27
  // @ts-ignore
27
28
  const t_root_0 = t_root(t_fragment_0, true);
28
- const t_comp_anchor_1 = t_anchor(t_next(t_root_0)) as HTMLElement;
29
+ let t_comp_anchor_1 = t_anchor(t_next(t_root_0)) as HTMLElement;
29
30
 
30
31
  /* @component */
31
32
  const t_props_1: any = $watch({});
32
33
  t_props_1["name"] = "Amy";
33
34
  Header(t_fragment_0, t_comp_anchor_1, t_props_1, $context);
34
35
 
36
+ t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
37
+
35
38
  // @ts-ignore
36
- const t_text_1 = t_next(t_anchor(t_comp_anchor_1, true), true);
39
+ const t_text_1 = t_next(t_comp_anchor_1, true);
37
40
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
38
41
  t_next(t_text_1);
39
42
 
@@ -12,6 +12,7 @@ import t_next from "../../../../src/render/nodeNext";
12
12
  import t_pop_range from "../../../../src/render/popRange";
13
13
  import t_push_range from "../../../../src/render/pushRange";
14
14
  import t_range from "../../../../src/render/newRange";
15
+ import t_reanchor from "../../../../src/render/nodeReanchor";
15
16
  import t_root from "../../../../src/render/nodeRoot";
16
17
  import t_run_list from "../../../../src/render/runList";
17
18
 
@@ -33,7 +34,7 @@ export default function For(
33
34
  // @ts-ignore
34
35
  const t_root_0 = t_root(t_fragment_0, true);
35
36
  const t_for_parent_1 = t_next(t_root_0) as HTMLElement;
36
- const t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
37
+ let t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
37
38
 
38
39
  /* @for */
39
40
  let t_for_range_1 = t_range();
@@ -68,6 +69,8 @@ export default function For(
68
69
  }
69
70
  );
70
71
 
72
+ t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
73
+
71
74
  // @ts-ignore
72
75
  const t_text_3 = t_next(t_for_parent_1, true);
73
76
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,6 +6,7 @@ import t_child from "../../../../src/render/nodeChild";
6
6
  import t_fragment from "../../../../src/render/getFragment";
7
7
  import t_next from "../../../../src/render/nodeNext";
8
8
  import t_range from "../../../../src/render/newRange";
9
+ import t_reanchor from "../../../../src/render/nodeReanchor";
9
10
  import t_root from "../../../../src/render/nodeRoot";
10
11
  import t_run_branch from "../../../../src/render/runControlBranch";
11
12
  import t_run_control from "../../../../src/render/runControl";
@@ -28,7 +29,7 @@ export default function If(
28
29
  // @ts-ignore
29
30
  const t_root_0 = t_root(t_fragment_0, true);
30
31
  const t_if_parent_1 = t_next(t_root_0) as HTMLElement;
31
- const t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
+ let t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
33
 
33
34
  /* @if */
34
35
  const t_if_range_1 = t_range();
@@ -57,6 +58,8 @@ export default function If(
57
58
  }
58
59
  });
59
60
 
61
+ t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
62
+
60
63
  // @ts-ignore
61
64
  const t_text_3 = t_next(t_if_parent_1, true);
62
65
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,6 +6,7 @@ import t_child from "../../../../src/render/nodeChild";
6
6
  import t_fragment from "../../../../src/render/getFragment";
7
7
  import t_next from "../../../../src/render/nodeNext";
8
8
  import t_range from "../../../../src/render/newRange";
9
+ import t_reanchor from "../../../../src/render/nodeReanchor";
9
10
  import t_root from "../../../../src/render/nodeRoot";
10
11
  import t_run_branch from "../../../../src/render/runControlBranch";
11
12
  import t_run_control from "../../../../src/render/runControl";
@@ -28,7 +29,7 @@ export default function NestedIf(
28
29
  // @ts-ignore
29
30
  const t_root_0 = t_root(t_fragment_0, true);
30
31
  const t_if_parent_1 = t_next(t_root_0) as HTMLElement;
31
- const t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
+ let t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
33
 
33
34
  /* @if */
34
35
  const t_if_range_1 = t_range();
@@ -38,7 +39,7 @@ export default function NestedIf(
38
39
  const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <!> `);
39
40
  // @ts-ignore
40
41
  const t_root_1 = t_root(t_fragment_1, true);
41
- const t_if_anchor_2 = t_anchor(t_next(t_root_1)) as HTMLElement;
42
+ let t_if_anchor_2 = t_anchor(t_next(t_root_1)) as HTMLElement;
42
43
 
43
44
  /* @if */
44
45
  const t_if_range_2 = t_range();
@@ -67,8 +68,10 @@ export default function NestedIf(
67
68
  }
68
69
  });
69
70
 
71
+ t_if_anchor_2 = t_reanchor(t_if_anchor_2) as HTMLElement;
72
+
70
73
  // @ts-ignore
71
- const t_text_3 = t_next(t_anchor(t_if_anchor_2, true), true);
74
+ const t_text_3 = t_next(t_if_anchor_2, true);
72
75
  t_add_fragment(t_fragment_1, t_if_parent_1, t_before, t_text_3);
73
76
  t_next(t_text_3);
74
77
  });
@@ -79,6 +82,8 @@ export default function NestedIf(
79
82
  }
80
83
  });
81
84
 
85
+ t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
86
+
82
87
  // @ts-ignore
83
88
  const t_text_4 = t_next(t_if_parent_1, true);
84
89
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_4);
@@ -12,6 +12,7 @@ import t_next from "../../../../src/render/nodeNext";
12
12
  import t_pop_range from "../../../../src/render/popRange";
13
13
  import t_push_range from "../../../../src/render/pushRange";
14
14
  import t_range from "../../../../src/render/newRange";
15
+ import t_reanchor from "../../../../src/render/nodeReanchor";
15
16
  import t_root from "../../../../src/render/nodeRoot";
16
17
  import t_run_list from "../../../../src/render/runList";
17
18
 
@@ -33,7 +34,7 @@ export default function For(
33
34
  // @ts-ignore
34
35
  const t_root_0 = t_root(t_fragment_0, true);
35
36
  const t_for_parent_1 = t_next(t_root_0) as HTMLElement;
36
- const t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
37
+ let t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
37
38
 
38
39
  /* @for */
39
40
  let t_for_range_1 = t_range();
@@ -68,6 +69,8 @@ export default function For(
68
69
  }
69
70
  );
70
71
 
72
+ t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
73
+
71
74
  // @ts-ignore
72
75
  const t_text_3 = t_next(t_for_parent_1, true);
73
76
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,6 +6,7 @@ import t_child from "../../../../src/render/nodeChild";
6
6
  import t_fragment from "../../../../src/render/getFragment";
7
7
  import t_next from "../../../../src/render/nodeNext";
8
8
  import t_range from "../../../../src/render/newRange";
9
+ import t_reanchor from "../../../../src/render/nodeReanchor";
9
10
  import t_root from "../../../../src/render/nodeRoot";
10
11
  import t_run_branch from "../../../../src/render/runControlBranch";
11
12
  import t_run_control from "../../../../src/render/runControl";
@@ -28,7 +29,7 @@ export default function If(
28
29
  // @ts-ignore
29
30
  const t_root_0 = t_root(t_fragment_0, true);
30
31
  const t_if_parent_1 = t_next(t_root_0) as HTMLElement;
31
- const t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
+ let t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
33
 
33
34
  /* @if */
34
35
  const t_if_range_1 = t_range();
@@ -57,6 +58,8 @@ export default function If(
57
58
  }
58
59
  });
59
60
 
61
+ t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
62
+
60
63
  // @ts-ignore
61
64
  const t_text_3 = t_next(t_if_parent_1, true);
62
65
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,6 +6,7 @@ import t_child from "../../../../src/render/nodeChild";
6
6
  import t_fragment from "../../../../src/render/getFragment";
7
7
  import t_next from "../../../../src/render/nodeNext";
8
8
  import t_range from "../../../../src/render/newRange";
9
+ import t_reanchor from "../../../../src/render/nodeReanchor";
9
10
  import t_root from "../../../../src/render/nodeRoot";
10
11
  import t_run_branch from "../../../../src/render/runControlBranch";
11
12
  import t_run_control from "../../../../src/render/runControl";
@@ -28,7 +29,7 @@ export default function NestedIf(
28
29
  // @ts-ignore
29
30
  const t_root_0 = t_root(t_fragment_0, true);
30
31
  const t_if_parent_1 = t_next(t_root_0) as HTMLElement;
31
- const t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
+ let t_if_anchor_1 = t_anchor(t_next(t_child(t_if_parent_1))) as HTMLElement;
32
33
 
33
34
  /* @if */
34
35
  const t_if_range_1 = t_range();
@@ -38,7 +39,7 @@ export default function NestedIf(
38
39
  const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <!> `);
39
40
  // @ts-ignore
40
41
  const t_root_1 = t_root(t_fragment_1, true);
41
- const t_if_anchor_2 = t_anchor(t_next(t_root_1)) as HTMLElement;
42
+ let t_if_anchor_2 = t_anchor(t_next(t_root_1)) as HTMLElement;
42
43
 
43
44
  /* @if */
44
45
  const t_if_range_2 = t_range();
@@ -67,8 +68,10 @@ export default function NestedIf(
67
68
  }
68
69
  });
69
70
 
71
+ t_if_anchor_2 = t_reanchor(t_if_anchor_2) as HTMLElement;
72
+
70
73
  // @ts-ignore
71
- const t_text_3 = t_next(t_anchor(t_if_anchor_2, true), true);
74
+ const t_text_3 = t_next(t_if_anchor_2, true);
72
75
  t_add_fragment(t_fragment_1, t_if_parent_1, t_before, t_text_3);
73
76
  t_next(t_text_3);
74
77
  });
@@ -79,6 +82,8 @@ export default function NestedIf(
79
82
  }
80
83
  });
81
84
 
85
+ t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
86
+
82
87
  // @ts-ignore
83
88
  const t_text_4 = t_next(t_if_parent_1, true);
84
89
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_4);
@@ -11,6 +11,7 @@ import t_next from "../../../../src/render/nodeNext";
11
11
  import t_pop_range from "../../../../src/render/popRange";
12
12
  import t_push_range from "../../../../src/render/pushRange";
13
13
  import t_range from "../../../../src/render/newRange";
14
+ import t_reanchor from "../../../../src/render/nodeReanchor";
14
15
  import t_root from "../../../../src/render/nodeRoot";
15
16
  import t_run_list from "../../../../src/render/runList";
16
17
 
@@ -32,7 +33,7 @@ export default function For(
32
33
  // @ts-ignore
33
34
  const t_root_0 = t_root(t_fragment_0, true);
34
35
  const t_for_parent_1 = t_next(t_root_0) as HTMLElement;
35
- const t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
36
+ let t_for_anchor_1 = t_anchor(t_next(t_child(t_for_parent_1))) as HTMLElement;
36
37
 
37
38
  /* @for */
38
39
  let t_for_range_1 = t_range();
@@ -67,6 +68,8 @@ export default function For(
67
68
  }
68
69
  );
69
70
 
71
+ t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
72
+
70
73
  // @ts-ignore
71
74
  const t_text_3 = t_next(t_for_parent_1, true);
72
75
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);