@torpor/view 0.1.7 → 0.1.9

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 (141) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/compile.cjs +2 -8
  3. package/dist/compile.cjs.map +1 -1
  4. package/dist/compile.js +2 -8
  5. package/dist/compile.js.map +1 -1
  6. package/dist/index.cjs +0 -7
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +1 -16
  9. package/dist/index.d.ts +1 -16
  10. package/dist/index.js +0 -6
  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 +0 -1
  16. package/src/compile/build/client/buildElementNode.ts +0 -1
  17. package/src/compile/build/client/buildFragment.ts +0 -13
  18. package/src/compile/build/server/buildServerComponentNode.ts +12 -1
  19. package/src/index.ts +0 -2
  20. package/test/await/components/output/Await-client.ts +0 -3
  21. package/test/await/components/temp/{Await-client-e2fc91352ed24b160650d7851d82375910bd28d6.ts → Await-client-9c30564ea39457e614e60c0cc0a71c431e8a1e76.ts} +0 -3
  22. package/test/bind/components/output/BindComponent-client.ts +0 -3
  23. package/test/bind/components/output/BindComponent-server.ts +2 -2
  24. package/test/bind/components/temp/{BindComponent-client-c4dbd934eda6b8f9a7afc697b9d6dd3edc3a4a48.ts → BindComponent-client-6f650efb818a185ef33e1b071cfd77415a803dd3.ts} +0 -3
  25. package/test/bind/components/temp/{BindComponent-server-c630dee0bee6cea49d5eb8bea04979a737bb8f5e.ts → BindComponent-server-2e6caf0cbbb2831eb4bfbd7dcd6cf4d5c422d047.ts} +2 -2
  26. package/test/buildOutputFiles.ts +0 -2
  27. package/test/child-component/components/output/ParentChild-client.ts +0 -3
  28. package/test/child-component/components/output/ParentChild-server.ts +2 -2
  29. package/test/child-component/components/temp/{ParentChild-client-16042a29846dbbeec5905f163bf29b6bb48dfd42.ts → ParentChild-client-50ca7e499599209c9d674f2561413ca14a282c22.ts} +0 -3
  30. package/test/child-component/components/temp/{ParentChild-server-a34a8b5acf1c00d1990f8ab7433599506265a45a.ts → ParentChild-server-5e4a7fa5f4cd1c7dbe6866819025d2c03bfc62cb.ts} +2 -2
  31. package/test/class/components/output/Class-client.ts +0 -3
  32. package/test/class/components/output/Class-server.ts +2 -2
  33. package/test/class/components/temp/{Class-client-71b655ee0cbda59527269a2fbf0b6d2a1176bbaa.ts → Class-client-de2491c550647203bea08727fa8c88f30654db0a.ts} +0 -3
  34. package/test/class/components/temp/{Class-server-daf30ffb1bacf9877e3385dc9a3eede61c972329.ts → Class-server-c24c01d0d3a98169172aba453c183c4152705be9.ts} +2 -2
  35. package/test/component/components/output/Component-client.ts +0 -3
  36. package/test/component/components/output/Component-server.ts +2 -2
  37. package/test/component/components/temp/{Component-client-2f4734d1288dc88d1d5aa532791199969351ec1d.ts → Component-client-350d20784712c710929cc3ab34c6828b0ea338d8.ts} +0 -3
  38. package/test/component/components/temp/{Component-server-81012827b18e82d787d194a0a1a9d4e07311a336.ts → Component-server-57f59c74599572da6322a67cb97848cfbfcf6968.ts} +2 -2
  39. package/test/effects/components/output/For-client.ts +0 -3
  40. package/test/effects/components/output/If-client.ts +0 -3
  41. package/test/effects/components/output/NestedIf-client.ts +0 -5
  42. package/test/effects/components/temp/{For-client-56df708520a56e3461dd041d5fcf3a6d16d6c653.ts → For-client-35bf9bea43f53d6c0cf807f9e31500765fa0b455.ts} +0 -3
  43. package/test/effects/components/temp/{If-client-341b189ef35481d477325e09e9b2d3479b7a6dfc.ts → If-client-efb994796596d9d08f59a0ab5ffdacc74bd04545.ts} +0 -3
  44. package/test/effects/components/temp/{NestedIf-client-4c74efc133b9817ff106e6ffcf4065603030a596.ts → NestedIf-client-845b3789b8a938439bff758bc9b3731d769c8ff6.ts} +0 -5
  45. package/test/for/components/output/For-client.ts +0 -3
  46. package/test/for/components/output/ForEscape-client.ts +0 -3
  47. package/test/for/components/output/ForIn-client.ts +0 -3
  48. package/test/for/components/output/ForOf-client.ts +0 -3
  49. package/test/for/components/temp/{For-client-1d8c7995d69e881e0c6e23e17feb4ee73e34f7c3.ts → For-client-8ecb11a2f34c81f837bffdb88598da06d8c19158.ts} +0 -3
  50. package/test/for/components/temp/{ForEscape-client-c4b46ddf79bcceb3d677baeb57ac85ec6bc5f565.ts → ForEscape-client-14e7648415d967cdc57bf03d176eb6b6dddf0fb2.ts} +0 -3
  51. package/test/for/components/temp/{ForIn-client-b64e5ecc592f137f08fc6ab9da800732df94976e.ts → ForIn-client-25cd67f246a50fc6d926a8c66aa5e106f19578a8.ts} +0 -3
  52. package/test/for/components/temp/{ForOf-client-4ef8193b2f0603a8edfcbe6c2d321a240211bdcd.ts → ForOf-client-8f6598ccd9dc7b79aff6167b90ccea94f3029c84.ts} +0 -3
  53. package/test/html/components/output/Html-client.ts +0 -3
  54. package/test/html/components/temp/{Html-client-2c3bae5ddb348adb88e332df9bad69714a88ddd1.ts → Html-client-93b0d666142c64cd651dc37f14f12884b2f30612.ts} +0 -3
  55. package/test/if/components/output/IfAfterIf-client.ts +0 -5
  56. package/test/if/components/output/IfElse-client.ts +0 -3
  57. package/test/if/components/output/IfElseIf-client.ts +0 -3
  58. package/test/if/components/output/IfFalse-client.ts +0 -3
  59. package/test/if/components/output/IfNested-client.ts +0 -5
  60. package/test/if/components/temp/{IfAfterIf-client-e092f37a07f06c67501693a2028c3f7a809267a9.ts → IfAfterIf-client-6b4833209a01cdad18d453839e9c8b5dad2a8510.ts} +0 -5
  61. package/test/if/components/temp/{IfElse-client-9b9b5cd2d58364c2792c6233dcf1a028c343741b.ts → IfElse-client-f7eb8e5fe5e62975a2442c4b0ff3344fa44cef69.ts} +0 -3
  62. package/test/if/components/temp/{IfElseIf-client-c6e0f7e55b7d2471527f7fbc673cdb1be41a548c.ts → IfElseIf-client-734f1b2d9133294573770c1ffc2b589273498532.ts} +0 -3
  63. package/test/if/components/temp/{IfFalse-client-84249379a2b7b30baea5eeed2a64d4502763d002.ts → IfFalse-client-8a388cb48b4a5879d491f57d1f2551834de1e72e.ts} +0 -3
  64. package/test/if/components/temp/{IfNested-client-6a536c2000ef72e8c289ad789b135d4b1e170b6e.ts → IfNested-client-f3045daba052e459add6e7f84e8d21ba7b0d81e4.ts} +0 -5
  65. package/test/party/components/output/AnswerButtonApp-client.ts +0 -3
  66. package/test/party/components/output/AnswerButtonApp-server.ts +2 -2
  67. package/test/party/components/output/ColorSelect-client.ts +0 -3
  68. package/test/party/components/output/Colors-client.ts +0 -3
  69. package/test/party/components/output/FunnyButton-client.ts +0 -3
  70. package/test/party/components/output/FunnyButtonApp-client.ts +0 -5
  71. package/test/party/components/output/FunnyButtonApp-server.ts +3 -3
  72. package/test/party/components/output/TrafficLight-client.ts +0 -3
  73. package/test/party/components/output/UserProfileApp-client.ts +0 -3
  74. package/test/party/components/output/UserProfileApp-server.ts +2 -2
  75. package/test/party/components/output/UserProfileContextApp-client.ts +0 -3
  76. package/test/party/components/output/UserProfileContextApp-server.ts +2 -2
  77. package/test/party/components/temp/{AnswerButtonApp-client-959a3756a3549b01c5d4c6e7b1dade9dc14ce671.ts → AnswerButtonApp-client-5661f07868550612bcdeee268b82c473af6a2613.ts} +0 -3
  78. package/test/party/components/temp/{AnswerButtonApp-server-16161f2c9062dd11b8b6b8c898f9f1249ae2400d.ts → AnswerButtonApp-server-e4ea88e0f4d65508950594437e5e34424bd28897.ts} +2 -2
  79. package/test/party/components/temp/{ColorSelect-client-06e6ef9f285d81975b97d89c8a68a494a32a8e3b.ts → ColorSelect-client-70bf59d6399d63c0eed421b9d370a1e5c97a89ca.ts} +0 -3
  80. package/test/party/components/temp/{Colors-client-2f3ab581879042904699c9d47ae5001b82edd910.ts → Colors-client-806316cc5e01e8235c0b025cad34b1068addf5a5.ts} +0 -3
  81. package/test/party/components/temp/{FunnyButton-client-400cff6abc7bdd6dbcd23786070eb0e198800337.ts → FunnyButton-client-6d5662018a5a5529fd52ee82f7c88975b5c3355a.ts} +0 -3
  82. package/test/party/components/temp/{FunnyButtonApp-client-42c39a8ffb7563c474e6b3ccfc9d4ee064c8fbee.ts → FunnyButtonApp-client-daa929c6d64f67e4a1a387b884317a4bb615b5d4.ts} +0 -5
  83. package/test/party/components/temp/{FunnyButtonApp-server-48d37de0c755843a2be34d7c7cb5c730689dcc2f.ts → FunnyButtonApp-server-80d85ede7da558154a5aa17cd602d6724bf1c9cb.ts} +3 -3
  84. package/test/party/components/temp/{TrafficLight-client-b536f07f37c21cd9340db9cef7b95d30c53f9349.ts → TrafficLight-client-4a90675ca6157ed7701aefa0d9141575960a1d47.ts} +0 -3
  85. package/test/party/components/temp/{UserProfileApp-client-deefee703fc851401cd3a4eec7606d0a228a631d.ts → UserProfileApp-client-e0bfaa4ffed336c8be4b23dd81800501980c9938.ts} +0 -3
  86. package/test/party/components/temp/{UserProfileApp-server-97397c42aaac0ee3902218d02c0ce6884434cc5b.ts → UserProfileApp-server-86c204098fd0ffbeded50372354488768b255156.ts} +2 -2
  87. package/test/party/components/temp/{UserProfileContextApp-client-0f5f11a3fd62f7e0e428fec2a260b93fcff61578.ts → UserProfileContextApp-client-05ce216919de6ffde56d1c2c39299173d9b611b3.ts} +0 -3
  88. package/test/party/components/temp/{UserProfileContextApp-server-95a4b12d30cef621db55d5de102a906ac7286fb2.ts → UserProfileContextApp-server-c970abaa8326db9a5efc3a5c64741743ae0dd1ca.ts} +2 -2
  89. package/test/props/components/output/Reactive-client.ts +0 -3
  90. package/test/props/components/output/Reactive-server.ts +2 -2
  91. package/test/props/components/temp/{Reactive-client-524add56a858b575fda1001bfe4891e6a1d6d751.ts → Reactive-client-cf6e602b2f74fce8e9451b6c41c6f8ff8eab63a3.ts} +0 -3
  92. package/test/props/components/temp/{Reactive-server-770cd3df7c877c0c99e156b2ba6d1f8b35914027.ts → Reactive-server-206bcc8984bad12c5712661b77d000216cdfe66d.ts} +2 -2
  93. package/test/replace/components/output/Replace-client.ts +0 -3
  94. package/test/replace/components/temp/{Replace-client-7f6ae4e645d18c4768ef9a212b2e9626c9abdeb0.ts → Replace-client-2a9ee3430708b469fa31bbc6989eed5b2f22984d.ts} +0 -3
  95. package/test/slots/components/output/Article-client.ts +0 -7
  96. package/test/slots/components/output/Basic-client.ts +0 -3
  97. package/test/slots/components/output/Basic-server.ts +2 -2
  98. package/test/slots/components/output/Header-client.ts +0 -3
  99. package/test/slots/components/output/Let-client.ts +0 -3
  100. package/test/slots/components/output/Let-server.ts +2 -2
  101. package/test/slots/components/output/List-client.ts +0 -5
  102. package/test/slots/components/output/Named-client.ts +0 -3
  103. package/test/slots/components/output/Named-server.ts +2 -2
  104. package/test/slots/components/output/Unused-client.ts +0 -3
  105. package/test/slots/components/output/Unused-server.ts +2 -2
  106. package/test/slots/components/temp/{Article-client-5f243a2540a073d4018bdc93c6a8e285ba965f5c.ts → Article-client-3f2da4b399f94ae8c329489e1ba0ba98196df9c5.ts} +0 -7
  107. package/test/slots/components/temp/{Basic-client-85377d56d5d37f56ebb10a709e9ffa1a91a2dd91.ts → Basic-client-a2c4bf685d4b75d0395da427b7754c2a58374dd7.ts} +0 -3
  108. package/test/slots/components/temp/{Basic-server-aed46a5b459cce50e7ddb311c42a76b9e91c2dae.ts → Basic-server-6b37594c9bf74e0c86a05b20213f69651e2cc937.ts} +2 -2
  109. package/test/slots/components/temp/{Header-client-247a12314f4fc2695e63b576731b9d0c2a73dcac.ts → Header-client-d7418b71df5db36d58a73e909233863a6c03678b.ts} +0 -3
  110. package/test/slots/components/temp/{Let-client-2625080a2799f5124b1b7083b780958f95539f15.ts → Let-client-913f9dede92b68a3f4a13d1f56f99b3e08e01efe.ts} +0 -3
  111. package/test/slots/components/temp/{Let-server-62727e5e2db3df405cdbe7a2d339a99113fc7f4a.ts → Let-server-8cad3b1199bec801bc3a1f2f3dbc20f2ef1e9741.ts} +2 -2
  112. package/test/slots/components/temp/{List-client-2b316860db37180e9bdfabb32f18b391c3994ac4.ts → List-client-6bc2d267a8b2028a14b12b2c70feb7c6a47d6d64.ts} +0 -5
  113. package/test/slots/components/temp/{Named-client-64e56746d78b308fd788c9b0409d79e4c91756ff.ts → Named-client-f6e7a984759ce8f50bc52dcf56f6f06cab925a80.ts} +0 -3
  114. package/test/slots/components/temp/{Named-server-829daa82c94fd7142a721cabac1b3402cca8fce6.ts → Named-server-2aac48bb8c7300d1a8858917fe81edc17c6372fa.ts} +2 -2
  115. package/test/slots/components/temp/{Unused-client-3436f47c322f34378aa240b8ad789048d35b4829.ts → Unused-client-ea0a096aa7a1c958f3bf807f35340b96f8a025ee.ts} +0 -3
  116. package/test/slots/components/temp/{Unused-server-379b45ff313e82f8b2949385f50d8ea482094520.ts → Unused-server-6e832928d7db6c43c556e7bda8af34ac37c0d4c1.ts} +2 -2
  117. package/test/special-component/components/output/BigTitle-client.ts +0 -3
  118. package/test/special-component/components/output/Component-client.ts +0 -5
  119. package/test/special-component/components/output/Component-server.ts +2 -1
  120. package/test/special-component/components/output/SmallTitle-client.ts +0 -3
  121. package/test/special-component/components/temp/{BigTitle-client-aa7930485dfd471094922b7725ab6fd7718817e6.ts → BigTitle-client-c4bd66406d55ce83ab4491c4114d563055e1c275.ts} +0 -3
  122. package/test/special-component/components/temp/{Component-client-3353f5d7d697fd754f92ea30f751f62efb0635c9.ts → Component-client-c39c66cf5274445bb863fd759e0ef223613a9f3a.ts} +0 -5
  123. package/test/special-component/components/temp/{Component-server-3564dfcef8d015cab4944a3c75cc6cf329f3fad6.ts → Component-server-14cd9beb57d6e833f75ab8c6624eb9841444ef63.ts} +2 -1
  124. package/test/special-component/components/temp/{SmallTitle-client-419568c1936f1bb8346db193f0a17848aac61e8e.ts → SmallTitle-client-e4b3e51243ca4f1efca21ac0f957b81e8bc93167.ts} +0 -3
  125. package/test/special-self/components/output/Self-client.ts +0 -5
  126. package/test/special-self/components/output/Self-server.ts +2 -2
  127. package/test/special-self/components/temp/{Self-client-bc1db32c01ceebd8aac04288c4d73431cffb200f.ts → Self-client-43a0a90fac58867c88bf32221883e8da342a0295.ts} +0 -5
  128. package/test/special-self/components/temp/{Self-server-ee440757ca9772d7b4111451a9ee05a157302e7c.ts → Self-server-b857c30c279a16dd81ad29567fb8abb9b2a0c239.ts} +2 -2
  129. package/test/svg/components/output/Shape-client.ts +0 -3
  130. package/test/svg/components/temp/{Shape-client-8e9515d4a360b9f4a945263a485486a557da1075.ts → Shape-client-052ea7838de07222602834de58968a3f89e6ea56.ts} +0 -3
  131. package/test/switch/components/output/Switch-client.ts +0 -3
  132. package/test/switch/components/temp/{Switch-client-485db0bdd94941ecad84528054f40ec6330c5e48.ts → Switch-client-30113fadf131c72e7c24160fa62068b651716896.ts} +0 -3
  133. package/test/watch-array/components/output/Array-client.ts +0 -3
  134. package/test/watch-array/components/output/ArrayEntries-client.ts +0 -3
  135. package/test/watch-array/components/output/ArrayIndexes-client.ts +0 -3
  136. package/test/watch-array/components/output/ArrayUnkeyed-client.ts +0 -3
  137. package/test/watch-array/components/temp/{Array-client-8b76b82f631c149d12466795ef6b016ebeda5568.ts → Array-client-d048f5c224a3f2e2729878dbb069ce15ca913e12.ts} +0 -3
  138. package/test/watch-array/components/temp/{ArrayEntries-client-c7b6352485a0d8ebcdb150d3e7f49d60493fde92.ts → ArrayEntries-client-741607b276718f5deb520e3b657dbf6abbb8081c.ts} +0 -3
  139. package/test/watch-array/components/temp/{ArrayIndexes-client-d8321be46a9572147e7b4bc71d7496985217b4f8.ts → ArrayIndexes-client-8ab14b254ef67dafad5228c9ec1906eb3b3babef.ts} +0 -3
  140. package/test/watch-array/components/temp/{ArrayUnkeyed-client-e37813da82c6d06de32d77348f23ed29c9c08187.ts → ArrayUnkeyed-client-9684aba82757748815b94c04bf3f8d1f98332535.ts} +0 -3
  141. package/src/render/nodeReanchor.ts +0 -18
@@ -4,7 +4,6 @@ import t_anchor from "../../../../src/render/nodeAnchor";
4
4
  import t_child from "../../../../src/render/nodeChild";
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";
8
7
  import t_root from "../../../../src/render/nodeRoot";
9
8
 
10
9
  export default function BigTitle(
@@ -28,8 +27,6 @@ export default function BigTitle(
28
27
  if ($slots && $slots["_"]) {
29
28
  $slots["_"](t_slot_parent_1, t_slot_anchor_1, undefined, $context)
30
29
  }
31
- t_slot_anchor_1 = t_reanchor(t_slot_anchor_1) as HTMLElement;
32
-
33
30
  // @ts-ignore
34
31
  const t_text_1 = t_next(t_slot_parent_1, true);
35
32
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -5,7 +5,6 @@ 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
7
  import t_range from "../../../../src/render/newRange";
8
- import t_reanchor from "../../../../src/render/nodeReanchor";
9
8
  import t_root from "../../../../src/render/nodeRoot";
10
9
  import t_run_branch from "../../../../src/render/runControlBranch";
11
10
  import t_run_control from "../../../../src/render/runControl";
@@ -66,14 +65,10 @@ export default function Component(
66
65
  }
67
66
  components[$props.self](t_fragment_1, t_comp_anchor_1, t_props_1, $context, t_slots_1);
68
67
 
69
- t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
70
-
71
68
  t_add_fragment(t_fragment_1, t_fragment_0, t_before);
72
69
  });
73
70
  });
74
71
 
75
- t_replace_anchor_1 = t_reanchor(t_replace_anchor_1) as HTMLElement;
76
-
77
72
  // @ts-ignore
78
73
  const t_text_2 = t_next(t_replace_anchor_1, true);
79
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_2);
@@ -20,6 +20,7 @@ export default function Component(
20
20
  let $output = "";
21
21
  $output += ` <![>`;
22
22
  components[$props.self];
23
+ $output += `<![>`;
23
24
  const t_props_1: any = {};
24
25
  t_props_1["self"] = components[$props.self];
25
26
  const t_slots_1: Record<string, ServerSlotRender> = {};
@@ -35,7 +36,7 @@ export default function Component(
35
36
  }
36
37
 
37
38
  $output += components[$props.self](t_props_1, $context, t_slots_1)
38
- $output += `<!>`;
39
+ $output += `<!]><!>`;
39
40
  $output += `<!]><!> `;
40
41
 
41
42
  return $output;
@@ -4,7 +4,6 @@ import t_anchor from "../../../../src/render/nodeAnchor";
4
4
  import t_child from "../../../../src/render/nodeChild";
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";
8
7
  import t_root from "../../../../src/render/nodeRoot";
9
8
 
10
9
  export default function SmallTitle(
@@ -28,8 +27,6 @@ export default function SmallTitle(
28
27
  if ($slots && $slots["_"]) {
29
28
  $slots["_"](t_slot_parent_1, t_slot_anchor_1, undefined, $context)
30
29
  }
31
- t_slot_anchor_1 = t_reanchor(t_slot_anchor_1) as HTMLElement;
32
-
33
30
  // @ts-ignore
34
31
  const t_text_1 = t_next(t_slot_parent_1, true);
35
32
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -4,7 +4,6 @@ import t_anchor from "../../../../src/render/nodeAnchor";
4
4
  import t_child from "../../../../src/render/nodeChild";
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";
8
7
  import t_root from "../../../../src/render/nodeRoot";
9
8
 
10
9
  export default function BigTitle(
@@ -28,8 +27,6 @@ export default function BigTitle(
28
27
  if ($slots && $slots["_"]) {
29
28
  $slots["_"](t_slot_parent_1, t_slot_anchor_1, undefined, $context)
30
29
  }
31
- t_slot_anchor_1 = t_reanchor(t_slot_anchor_1) as HTMLElement;
32
-
33
30
  // @ts-ignore
34
31
  const t_text_1 = t_next(t_slot_parent_1, true);
35
32
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -5,7 +5,6 @@ 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
7
  import t_range from "../../../../src/render/newRange";
8
- import t_reanchor from "../../../../src/render/nodeReanchor";
9
8
  import t_root from "../../../../src/render/nodeRoot";
10
9
  import t_run_branch from "../../../../src/render/runControlBranch";
11
10
  import t_run_control from "../../../../src/render/runControl";
@@ -66,14 +65,10 @@ export default function Component(
66
65
  }
67
66
  components[$props.self](t_fragment_1, t_comp_anchor_1, t_props_1, $context, t_slots_1);
68
67
 
69
- t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
70
-
71
68
  t_add_fragment(t_fragment_1, t_fragment_0, t_before);
72
69
  });
73
70
  });
74
71
 
75
- t_replace_anchor_1 = t_reanchor(t_replace_anchor_1) as HTMLElement;
76
-
77
72
  // @ts-ignore
78
73
  const t_text_2 = t_next(t_replace_anchor_1, true);
79
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_2);
@@ -20,6 +20,7 @@ export default function Component(
20
20
  let $output = "";
21
21
  $output += ` <![>`;
22
22
  components[$props.self];
23
+ $output += `<![>`;
23
24
  const t_props_1: any = {};
24
25
  t_props_1["self"] = components[$props.self];
25
26
  const t_slots_1: Record<string, ServerSlotRender> = {};
@@ -35,7 +36,7 @@ export default function Component(
35
36
  }
36
37
 
37
38
  $output += components[$props.self](t_props_1, $context, t_slots_1)
38
- $output += `<!>`;
39
+ $output += `<!]><!>`;
39
40
  $output += `<!]><!> `;
40
41
 
41
42
  return $output;
@@ -4,7 +4,6 @@ import t_anchor from "../../../../src/render/nodeAnchor";
4
4
  import t_child from "../../../../src/render/nodeChild";
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";
8
7
  import t_root from "../../../../src/render/nodeRoot";
9
8
 
10
9
  export default function SmallTitle(
@@ -28,8 +27,6 @@ export default function SmallTitle(
28
27
  if ($slots && $slots["_"]) {
29
28
  $slots["_"](t_slot_parent_1, t_slot_anchor_1, undefined, $context)
30
29
  }
31
- t_slot_anchor_1 = t_reanchor(t_slot_anchor_1) as HTMLElement;
32
-
33
30
  // @ts-ignore
34
31
  const t_text_1 = t_next(t_slot_parent_1, true);
35
32
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_1);
@@ -8,7 +8,6 @@ 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
10
  import t_range from "../../../../src/render/newRange";
11
- import t_reanchor from "../../../../src/render/nodeReanchor";
12
11
  import t_root from "../../../../src/render/nodeRoot";
13
12
  import t_run_branch from "../../../../src/render/runControlBranch";
14
13
  import t_run_control from "../../../../src/render/runControl";
@@ -51,8 +50,6 @@ export default function Self(
51
50
  });
52
51
  Self(t_fragment_1, t_comp_anchor_1, t_props_1, $context);
53
52
 
54
- t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
55
-
56
53
  // @ts-ignore
57
54
  const t_text_2 = t_next(t_comp_anchor_1, true);
58
55
  t_add_fragment(t_fragment_1, t_if_parent_1, t_before, t_text_2);
@@ -65,8 +62,6 @@ export default function Self(
65
62
  }
66
63
  });
67
64
 
68
- t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
69
-
70
65
  // @ts-ignore
71
66
  const t_text_3 = t_next(t_if_parent_1, true);
72
67
  $run(function setTextContent() {
@@ -14,12 +14,12 @@ export default function Self(
14
14
  let $output = "";
15
15
  $output += ` <div> Level ${t_fmt($props.level)} <![>`;
16
16
  if ($props.level < 3) {
17
- $output += `<!^> `;
17
+ $output += `<!^> <![>`;
18
18
  const t_props_1: any = {};
19
19
  t_props_1["level"] = $props.level + 1;
20
20
 
21
21
  $output += Self(t_props_1, $context)
22
- $output += `<!> `;
22
+ $output += `<!]><!> `;
23
23
  }
24
24
  $output += `<!]><!> </div> `;
25
25
 
@@ -8,7 +8,6 @@ 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
10
  import t_range from "../../../../src/render/newRange";
11
- import t_reanchor from "../../../../src/render/nodeReanchor";
12
11
  import t_root from "../../../../src/render/nodeRoot";
13
12
  import t_run_branch from "../../../../src/render/runControlBranch";
14
13
  import t_run_control from "../../../../src/render/runControl";
@@ -51,8 +50,6 @@ export default function Self(
51
50
  });
52
51
  Self(t_fragment_1, t_comp_anchor_1, t_props_1, $context);
53
52
 
54
- t_comp_anchor_1 = t_reanchor(t_comp_anchor_1) as HTMLElement;
55
-
56
53
  // @ts-ignore
57
54
  const t_text_2 = t_next(t_comp_anchor_1, true);
58
55
  t_add_fragment(t_fragment_1, t_if_parent_1, t_before, t_text_2);
@@ -65,8 +62,6 @@ export default function Self(
65
62
  }
66
63
  });
67
64
 
68
- t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
69
-
70
65
  // @ts-ignore
71
66
  const t_text_3 = t_next(t_if_parent_1, true);
72
67
  $run(function setTextContent() {
@@ -14,12 +14,12 @@ export default function Self(
14
14
  let $output = "";
15
15
  $output += ` <div> Level ${t_fmt($props.level)} <![>`;
16
16
  if ($props.level < 3) {
17
- $output += `<!^> `;
17
+ $output += `<!^> <![>`;
18
18
  const t_props_1: any = {};
19
19
  t_props_1["level"] = $props.level + 1;
20
20
 
21
21
  $output += Self(t_props_1, $context)
22
- $output += `<!> `;
22
+ $output += `<!]><!> `;
23
23
  }
24
24
  $output += `<!]><!> </div> `;
25
25
 
@@ -6,7 +6,6 @@ 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";
10
9
  import t_root from "../../../../src/render/nodeRoot";
11
10
  import t_run_branch from "../../../../src/render/runControlBranch";
12
11
  import t_run_control from "../../../../src/render/runControl";
@@ -58,8 +57,6 @@ export default function Shape(
58
57
  }
59
58
  });
60
59
 
61
- t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
62
-
63
60
  // @ts-ignore
64
61
  const t_text_3 = t_next(t_if_parent_1, true);
65
62
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,7 +6,6 @@ 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";
10
9
  import t_root from "../../../../src/render/nodeRoot";
11
10
  import t_run_branch from "../../../../src/render/runControlBranch";
12
11
  import t_run_control from "../../../../src/render/runControl";
@@ -58,8 +57,6 @@ export default function Shape(
58
57
  }
59
58
  });
60
59
 
61
- t_if_anchor_1 = t_reanchor(t_if_anchor_1) as HTMLElement;
62
-
63
60
  // @ts-ignore
64
61
  const t_text_3 = t_next(t_if_parent_1, true);
65
62
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -6,7 +6,6 @@ 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";
10
9
  import t_root from "../../../../src/render/nodeRoot";
11
10
  import t_run_branch from "../../../../src/render/runControlBranch";
12
11
  import t_run_control from "../../../../src/render/runControl";
@@ -80,8 +79,6 @@ export default function Switch(
80
79
  }
81
80
  });
82
81
 
83
- t_switch_anchor_1 = t_reanchor(t_switch_anchor_1) as HTMLElement;
84
-
85
82
  // @ts-ignore
86
83
  const t_text_4 = t_next(t_switch_parent_1, true);
87
84
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_4);
@@ -6,7 +6,6 @@ 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";
10
9
  import t_root from "../../../../src/render/nodeRoot";
11
10
  import t_run_branch from "../../../../src/render/runControlBranch";
12
11
  import t_run_control from "../../../../src/render/runControl";
@@ -80,8 +79,6 @@ export default function Switch(
80
79
  }
81
80
  });
82
81
 
83
- t_switch_anchor_1 = t_reanchor(t_switch_anchor_1) as HTMLElement;
84
-
85
82
  // @ts-ignore
86
83
  const t_text_4 = t_next(t_switch_parent_1, true);
87
84
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_4);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -70,8 +69,6 @@ export default function Array(
70
69
  }
71
70
  );
72
71
 
73
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
74
-
75
72
  // @ts-ignore
76
73
  const t_text_3 = t_next(t_for_parent_1, true);
77
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -72,8 +71,6 @@ export default function ArrayEntries(
72
71
  }
73
72
  );
74
73
 
75
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
76
-
77
74
  // @ts-ignore
78
75
  const t_text_3 = t_next(t_for_parent_1, true);
79
76
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -70,8 +69,6 @@ export default function ArrayIndexes(
70
69
  }
71
70
  );
72
71
 
73
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
74
-
75
72
  // @ts-ignore
76
73
  const t_text_3 = t_next(t_for_parent_1, true);
77
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -69,8 +68,6 @@ export default function ArrayUnkeyed(
69
68
  }
70
69
  );
71
70
 
72
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
73
-
74
71
  // @ts-ignore
75
72
  const t_text_3 = t_next(t_for_parent_1, true);
76
73
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -70,8 +69,6 @@ export default function Array(
70
69
  }
71
70
  );
72
71
 
73
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
74
-
75
72
  // @ts-ignore
76
73
  const t_text_3 = t_next(t_for_parent_1, true);
77
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -72,8 +71,6 @@ export default function ArrayEntries(
72
71
  }
73
72
  );
74
73
 
75
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
76
-
77
74
  // @ts-ignore
78
75
  const t_text_3 = t_next(t_for_parent_1, true);
79
76
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -70,8 +69,6 @@ export default function ArrayIndexes(
70
69
  }
71
70
  );
72
71
 
73
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
74
-
75
72
  // @ts-ignore
76
73
  const t_text_3 = t_next(t_for_parent_1, true);
77
74
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -12,7 +12,6 @@ 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";
16
15
  import t_root from "../../../../src/render/nodeRoot";
17
16
  import t_run_list from "../../../../src/render/runList";
18
17
 
@@ -69,8 +68,6 @@ export default function ArrayUnkeyed(
69
68
  }
70
69
  );
71
70
 
72
- t_for_anchor_1 = t_reanchor(t_for_anchor_1) as HTMLElement;
73
-
74
71
  // @ts-ignore
75
72
  const t_text_3 = t_next(t_for_parent_1, true);
76
73
  t_add_fragment(t_fragment_0, $parent, $anchor, t_text_3);
@@ -1,18 +0,0 @@
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
- }