create-foldkit-app 0.40.0 → 0.41.0-canary.54f8bcd443b4

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 (787) hide show
  1. package/README.md +3 -3
  2. package/dist/examples.js +4 -4
  3. package/dist/templates/base/AGENTS.md +22 -0
  4. package/dist/templates/base/FOLDKIT.md +281 -45
  5. package/dist/templates/examples/api-cache/package.json +7 -6
  6. package/dist/templates/examples/api-cache/src/block.ts +24 -0
  7. package/dist/templates/examples/api-cache/src/command.ts +66 -0
  8. package/dist/templates/examples/api-cache/src/composition.ts +79 -0
  9. package/dist/templates/examples/api-cache/src/effectsLayer.ts +11 -0
  10. package/dist/templates/examples/api-cache/src/entry.ts +7 -12
  11. package/dist/templates/examples/api-cache/src/index.ts +2 -0
  12. package/dist/templates/examples/api-cache/src/init.ts +16 -0
  13. package/dist/templates/examples/api-cache/src/layer.ts +18 -0
  14. package/dist/templates/examples/api-cache/src/message.ts +24 -0
  15. package/dist/templates/examples/api-cache/src/model.fixture.ts +128 -0
  16. package/dist/templates/examples/api-cache/src/model.ts +45 -0
  17. package/dist/templates/examples/api-cache/src/scene.test.ts +118 -101
  18. package/dist/templates/examples/api-cache/src/story.test.ts +309 -245
  19. package/dist/templates/examples/api-cache/src/subscription.ts +33 -0
  20. package/dist/templates/examples/api-cache/src/update.ts +75 -0
  21. package/dist/templates/examples/api-cache/src/view/posts.ts +260 -0
  22. package/dist/templates/examples/api-cache/src/view/shared.ts +63 -0
  23. package/dist/templates/examples/api-cache/src/view/stats.ts +140 -0
  24. package/dist/templates/examples/api-cache/src/view/view.ts +78 -0
  25. package/dist/templates/examples/api-cache-query/package.json +7 -6
  26. package/dist/templates/examples/api-cache-query/src/block.ts +23 -0
  27. package/dist/templates/examples/api-cache-query/src/composition.ts +54 -0
  28. package/dist/templates/examples/api-cache-query/src/effectsLayer.ts +3 -0
  29. package/dist/templates/examples/api-cache-query/src/entry.ts +7 -13
  30. package/dist/templates/examples/api-cache-query/src/index.ts +2 -0
  31. package/dist/templates/examples/api-cache-query/src/init.ts +11 -0
  32. package/dist/templates/examples/api-cache-query/src/layer.ts +19 -0
  33. package/dist/templates/examples/api-cache-query/src/message.ts +14 -0
  34. package/dist/templates/examples/api-cache-query/src/model.fixture.ts +135 -0
  35. package/dist/templates/examples/api-cache-query/src/model.ts +22 -0
  36. package/dist/templates/examples/api-cache-query/src/query.ts +78 -0
  37. package/dist/templates/examples/api-cache-query/src/scene.test.ts +123 -103
  38. package/dist/templates/examples/api-cache-query/src/story.test.ts +323 -254
  39. package/dist/templates/examples/api-cache-query/src/subscription.ts +33 -0
  40. package/dist/templates/examples/api-cache-query/src/update.ts +33 -0
  41. package/dist/templates/examples/api-cache-query/src/view/index.ts +1 -0
  42. package/dist/templates/examples/api-cache-query/src/view/posts.ts +243 -0
  43. package/dist/templates/examples/api-cache-query/src/view/shared.ts +67 -0
  44. package/dist/templates/examples/api-cache-query/src/view/stats.ts +132 -0
  45. package/dist/templates/examples/api-cache-query/src/view/view.ts +101 -0
  46. package/dist/templates/examples/auth/package.json +7 -6
  47. package/dist/templates/examples/auth/src/block.ts +27 -0
  48. package/dist/templates/examples/auth/src/blocks/index.ts +4 -0
  49. package/dist/templates/examples/auth/src/blocks/loggedIn/block.ts +19 -0
  50. package/dist/templates/examples/auth/src/blocks/loggedIn/composition.ts +8 -0
  51. package/dist/templates/examples/auth/src/blocks/loggedIn/index.ts +2 -0
  52. package/dist/templates/examples/auth/src/blocks/loggedIn/init.ts +10 -0
  53. package/dist/templates/examples/auth/src/blocks/loggedIn/layer.ts +10 -0
  54. package/dist/templates/examples/auth/src/{page → blocks}/loggedIn/message.ts +0 -6
  55. package/dist/templates/examples/auth/src/{page → blocks}/loggedIn/model.ts +0 -11
  56. package/dist/templates/examples/auth/src/{page → blocks}/loggedIn/page/dashboard.ts +4 -8
  57. package/dist/templates/examples/auth/src/{page → blocks}/loggedIn/page/settings.ts +4 -5
  58. package/dist/templates/examples/auth/src/blocks/loggedIn/update.ts +7 -0
  59. package/dist/templates/examples/auth/src/{page → blocks}/loggedIn/view.ts +4 -6
  60. package/dist/templates/examples/auth/src/blocks/loggedOut/block.ts +23 -0
  61. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/index.ts +2 -0
  62. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/block.ts +45 -0
  63. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/composition.ts +6 -0
  64. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/index.ts +2 -0
  65. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/layer.ts +10 -0
  66. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/login.ts +123 -0
  67. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/scene.test.ts +110 -0
  68. package/dist/templates/examples/auth/src/blocks/loggedOut/blocks/login/story.test.ts +105 -0
  69. package/dist/templates/examples/auth/src/{page/loggedOut/page/login.ts → blocks/loggedOut/blocks/login/view.ts} +10 -157
  70. package/dist/templates/examples/auth/src/blocks/loggedOut/composition.ts +25 -0
  71. package/dist/templates/examples/auth/src/blocks/loggedOut/index.ts +2 -0
  72. package/dist/templates/examples/auth/src/blocks/loggedOut/init.ts +6 -0
  73. package/dist/templates/examples/auth/src/blocks/loggedOut/layer.ts +13 -0
  74. package/dist/templates/examples/auth/src/{page → blocks}/loggedOut/message.ts +1 -11
  75. package/dist/templates/examples/auth/src/{page → blocks}/loggedOut/model.ts +2 -13
  76. package/dist/templates/examples/auth/src/{page → blocks}/loggedOut/page/home.ts +5 -5
  77. package/dist/templates/examples/auth/src/blocks/loggedOut/update.ts +3 -0
  78. package/dist/templates/examples/auth/src/{page → blocks}/loggedOut/view.ts +8 -11
  79. package/dist/templates/examples/auth/src/command.ts +85 -32
  80. package/dist/templates/examples/auth/src/composition/bindings.ts +8 -0
  81. package/dist/templates/examples/auth/src/composition/composition.ts +7 -0
  82. package/dist/templates/examples/auth/src/composition/index.ts +3 -0
  83. package/dist/templates/examples/auth/src/composition/loggedIn.ts +18 -0
  84. package/dist/templates/examples/auth/src/composition/loggedOut.ts +18 -0
  85. package/dist/templates/examples/auth/src/domain/session.ts +1 -1
  86. package/dist/templates/examples/auth/src/effectsLayer.ts +23 -0
  87. package/dist/templates/examples/auth/src/entry.ts +11 -17
  88. package/dist/templates/examples/auth/src/flags.ts +27 -0
  89. package/dist/templates/examples/auth/src/index.ts +2 -0
  90. package/dist/templates/examples/auth/src/init.ts +53 -0
  91. package/dist/templates/examples/auth/src/layer.ts +15 -0
  92. package/dist/templates/examples/auth/src/message.ts +3 -5
  93. package/dist/templates/examples/auth/src/model.ts +5 -5
  94. package/dist/templates/examples/auth/src/route.ts +18 -13
  95. package/dist/templates/examples/auth/src/scene.test.ts +35 -38
  96. package/dist/templates/examples/auth/src/services.ts +3 -0
  97. package/dist/templates/examples/auth/src/update.ts +63 -156
  98. package/dist/templates/examples/auth/src/view.ts +23 -22
  99. package/dist/templates/examples/canvas-art/package.json +7 -6
  100. package/dist/templates/examples/canvas-art/src/{main.ts → block.ts} +132 -81
  101. package/dist/templates/examples/canvas-art/src/entry.ts +7 -12
  102. package/dist/templates/examples/canvas-art/src/scene.test.ts +39 -35
  103. package/dist/templates/examples/canvas-art/src/story.test.ts +125 -110
  104. package/dist/templates/examples/charting/package.json +7 -6
  105. package/dist/templates/examples/charting/src/block.ts +28 -0
  106. package/dist/templates/examples/charting/src/chartRegistry.ts +42 -0
  107. package/dist/templates/examples/charting/src/command.ts +52 -39
  108. package/dist/templates/examples/charting/src/composition.ts +125 -0
  109. package/dist/templates/examples/charting/src/domain.ts +0 -6
  110. package/dist/templates/examples/charting/src/effectsLayer.ts +10 -0
  111. package/dist/templates/examples/charting/src/entry.ts +8 -15
  112. package/dist/templates/examples/charting/src/githubApi.ts +19 -30
  113. package/dist/templates/examples/charting/src/http.ts +0 -4
  114. package/dist/templates/examples/charting/src/index.ts +2 -0
  115. package/dist/templates/examples/charting/src/init.ts +4 -15
  116. package/dist/templates/examples/charting/src/layer.ts +16 -0
  117. package/dist/templates/examples/charting/src/message.ts +3 -7
  118. package/dist/templates/examples/charting/src/{main.fixture.ts → model.fixture.ts} +15 -5
  119. package/dist/templates/examples/charting/src/model.ts +8 -5
  120. package/dist/templates/examples/charting/src/mount.ts +136 -0
  121. package/dist/templates/examples/charting/src/npmApi.ts +6 -9
  122. package/dist/templates/examples/charting/src/radioGroups.ts +3 -3
  123. package/dist/templates/examples/charting/src/scene.test.ts +54 -63
  124. package/dist/templates/examples/charting/src/services.ts +15 -0
  125. package/dist/templates/examples/charting/src/story.test.ts +119 -90
  126. package/dist/templates/examples/charting/src/telemetry.ts +87 -87
  127. package/dist/templates/examples/charting/src/update.ts +53 -183
  128. package/dist/templates/examples/charting/src/view/chart.ts +9 -122
  129. package/dist/templates/examples/charting/src/view/layout.ts +8 -8
  130. package/dist/templates/examples/charting/src/view/sidebar.ts +114 -115
  131. package/dist/templates/examples/charting/src/view/view.ts +3 -7
  132. package/dist/templates/examples/charting/src/weeks.ts +0 -4
  133. package/dist/templates/examples/counter/package.json +7 -6
  134. package/dist/templates/examples/counter/src/{main.ts → block.ts} +36 -28
  135. package/dist/templates/examples/counter/src/entry.ts +7 -11
  136. package/dist/templates/examples/counter/src/scene.test.ts +54 -52
  137. package/dist/templates/examples/counter/src/story.test.ts +52 -50
  138. package/dist/templates/examples/counters/package.json +7 -6
  139. package/dist/templates/examples/counters/src/block.ts +158 -0
  140. package/dist/templates/examples/counters/src/{counter.ts → blocks/counter/block.ts} +35 -24
  141. package/dist/templates/examples/counters/src/blocks/counter/index.ts +3 -0
  142. package/dist/templates/examples/counters/src/blocks/index.ts +2 -0
  143. package/dist/templates/examples/counters/src/entry.ts +7 -11
  144. package/dist/templates/examples/counters/src/scene.test.ts +94 -79
  145. package/dist/templates/examples/counters/src/story.test.ts +184 -103
  146. package/dist/templates/examples/crash-view/package.json +7 -6
  147. package/dist/templates/examples/crash-view/src/{main.ts → block.ts} +35 -20
  148. package/dist/templates/examples/crash-view/src/entry.ts +8 -13
  149. package/dist/templates/examples/crash-view/src/scene.test.ts +12 -10
  150. package/dist/templates/examples/crash-view/src/story.test.ts +19 -7
  151. package/dist/templates/examples/embedding/package.json +7 -6
  152. package/dist/templates/examples/embedding/src/{main.ts → block.ts} +77 -68
  153. package/dist/templates/examples/embedding/src/host.ts +13 -4
  154. package/dist/templates/examples/embedding/src/scene.test.ts +31 -21
  155. package/dist/templates/examples/embedding/src/story.test.ts +58 -46
  156. package/dist/templates/examples/form/package.json +7 -6
  157. package/dist/templates/examples/form/src/block.ts +17 -0
  158. package/dist/templates/examples/form/src/command.ts +63 -0
  159. package/dist/templates/examples/form/src/composition.ts +8 -0
  160. package/dist/templates/examples/form/src/effectsLayer.ts +8 -0
  161. package/dist/templates/examples/form/src/entry.ts +7 -11
  162. package/dist/templates/examples/form/src/index.ts +2 -0
  163. package/dist/templates/examples/form/src/init.ts +15 -0
  164. package/dist/templates/examples/form/src/layer.ts +12 -0
  165. package/dist/templates/examples/form/src/message.ts +14 -0
  166. package/dist/templates/examples/form/src/model.ts +19 -0
  167. package/dist/templates/examples/form/src/scene.test.ts +131 -111
  168. package/dist/templates/examples/form/src/story.test.ts +157 -143
  169. package/dist/templates/examples/form/src/update.ts +72 -0
  170. package/dist/templates/examples/form/src/validation.ts +21 -0
  171. package/dist/templates/examples/form/src/{main.ts → view.ts} +20 -236
  172. package/dist/templates/examples/generative-art/package.json +7 -6
  173. package/dist/templates/examples/generative-art/src/block.ts +24 -0
  174. package/dist/templates/examples/generative-art/src/command.ts +81 -79
  175. package/dist/templates/examples/generative-art/src/composition.ts +70 -0
  176. package/dist/templates/examples/generative-art/src/effectsLayer.ts +10 -0
  177. package/dist/templates/examples/generative-art/src/entry.ts +7 -10
  178. package/dist/templates/examples/generative-art/src/index.ts +2 -0
  179. package/dist/templates/examples/generative-art/src/{main.ts → init.ts} +3 -22
  180. package/dist/templates/examples/generative-art/src/layer.ts +18 -0
  181. package/dist/templates/examples/generative-art/src/message.ts +4 -5
  182. package/dist/templates/examples/generative-art/src/model.ts +2 -2
  183. package/dist/templates/examples/generative-art/src/scene.test.ts +57 -49
  184. package/dist/templates/examples/generative-art/src/story.test.ts +143 -129
  185. package/dist/templates/examples/generative-art/src/subscription.ts +21 -32
  186. package/dist/templates/examples/generative-art/src/update.ts +58 -114
  187. package/dist/templates/examples/generative-art/src/view.ts +101 -66
  188. package/dist/templates/examples/interrupting-commands/package.json +7 -6
  189. package/dist/templates/examples/interrupting-commands/src/block.ts +22 -0
  190. package/dist/templates/examples/interrupting-commands/src/command.ts +32 -0
  191. package/dist/templates/examples/interrupting-commands/src/composition.ts +8 -0
  192. package/dist/templates/examples/interrupting-commands/src/entry.ts +7 -11
  193. package/dist/templates/examples/interrupting-commands/src/index.ts +2 -0
  194. package/dist/templates/examples/interrupting-commands/src/init.ts +8 -0
  195. package/dist/templates/examples/interrupting-commands/src/layer.ts +12 -0
  196. package/dist/templates/examples/interrupting-commands/src/message.ts +16 -0
  197. package/dist/templates/examples/interrupting-commands/src/model.ts +18 -0
  198. package/dist/templates/examples/interrupting-commands/src/scene.test.ts +83 -75
  199. package/dist/templates/examples/interrupting-commands/src/story.test.ts +146 -141
  200. package/dist/templates/examples/interrupting-commands/src/update.ts +100 -0
  201. package/dist/templates/examples/interrupting-commands/src/view.ts +169 -0
  202. package/dist/templates/examples/job-application/package.json +7 -6
  203. package/dist/templates/examples/job-application/src/block.ts +28 -0
  204. package/dist/templates/examples/job-application/src/blocks/attachments/block.ts +36 -0
  205. package/dist/templates/examples/job-application/src/blocks/attachments/composition.ts +52 -0
  206. package/dist/templates/examples/job-application/src/blocks/attachments/index.ts +2 -0
  207. package/dist/templates/examples/job-application/src/blocks/attachments/init.ts +10 -0
  208. package/dist/templates/examples/job-application/src/blocks/attachments/layer.ts +14 -0
  209. package/dist/templates/examples/job-application/src/blocks/attachments/scene.test.ts +20 -0
  210. package/dist/templates/examples/job-application/src/blocks/attachments/story.test.ts +46 -0
  211. package/dist/templates/examples/job-application/src/blocks/attachments/update.ts +14 -0
  212. package/dist/templates/examples/job-application/src/{step → blocks}/attachments/view.ts +65 -62
  213. package/dist/templates/examples/job-application/src/{step/coverLetter/coverLetter.ts → blocks/coverLetter/block.ts} +30 -25
  214. package/dist/templates/examples/job-application/src/blocks/coverLetter/index.ts +3 -0
  215. package/dist/templates/examples/job-application/src/blocks/coverLetter/scene.test.ts +26 -0
  216. package/dist/templates/examples/job-application/src/blocks/coverLetter/story.test.ts +23 -0
  217. package/dist/templates/examples/job-application/src/blocks/education/block.ts +48 -0
  218. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/block.ts +60 -0
  219. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/composition.ts +30 -0
  220. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/inMessageUpdate.ts +12 -0
  221. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/index.ts +3 -0
  222. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/init.ts +16 -0
  223. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/layer.ts +16 -0
  224. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/story.test.ts +42 -0
  225. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/update.ts +29 -0
  226. package/dist/templates/examples/job-application/src/blocks/education/blocks/educationEntry/validation.ts +25 -0
  227. package/dist/templates/examples/job-application/src/{step/education/entry → blocks/education/blocks/educationEntry}/view.ts +49 -48
  228. package/dist/templates/examples/job-application/src/blocks/education/blocks/index.ts +2 -0
  229. package/dist/templates/examples/job-application/src/blocks/education/command.ts +23 -0
  230. package/dist/templates/examples/job-application/src/blocks/education/composition.ts +35 -0
  231. package/dist/templates/examples/job-application/src/blocks/education/inMessageUpdate.ts +14 -0
  232. package/dist/templates/examples/job-application/src/blocks/education/index.ts +3 -0
  233. package/dist/templates/examples/job-application/src/blocks/education/init.ts +10 -0
  234. package/dist/templates/examples/job-application/src/blocks/education/layer.ts +17 -0
  235. package/dist/templates/examples/job-application/src/blocks/education/scene.test.ts +20 -0
  236. package/dist/templates/examples/job-application/src/blocks/education/story.test.ts +69 -0
  237. package/dist/templates/examples/job-application/src/blocks/education/update.ts +20 -0
  238. package/dist/templates/examples/job-application/src/blocks/education/validation.ts +11 -0
  239. package/dist/templates/examples/job-application/src/{step → blocks}/education/view.ts +21 -15
  240. package/dist/templates/examples/job-application/src/blocks/index.ts +15 -0
  241. package/dist/templates/examples/job-application/src/blocks/personalInfo/block.ts +67 -0
  242. package/dist/templates/examples/job-application/src/blocks/personalInfo/command.ts +41 -0
  243. package/dist/templates/examples/job-application/src/blocks/personalInfo/composition.ts +54 -0
  244. package/dist/templates/examples/job-application/src/blocks/personalInfo/inMessageUpdate.ts +20 -0
  245. package/dist/templates/examples/job-application/src/blocks/personalInfo/index.ts +3 -0
  246. package/dist/templates/examples/job-application/src/blocks/personalInfo/init.ts +20 -0
  247. package/dist/templates/examples/job-application/src/blocks/personalInfo/layer.ts +18 -0
  248. package/dist/templates/examples/job-application/src/blocks/personalInfo/scene.test.ts +52 -0
  249. package/dist/templates/examples/job-application/src/blocks/personalInfo/story.test.ts +120 -0
  250. package/dist/templates/examples/job-application/src/blocks/personalInfo/update.ts +69 -0
  251. package/dist/templates/examples/job-application/src/blocks/personalInfo/validation.ts +58 -0
  252. package/dist/templates/examples/job-application/src/{step → blocks}/personalInfo/view.ts +79 -75
  253. package/dist/templates/examples/job-application/src/blocks/skills/block.ts +44 -0
  254. package/dist/templates/examples/job-application/src/blocks/skills/blocks/index.ts +2 -0
  255. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/block.ts +55 -0
  256. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/composition.ts +31 -0
  257. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/inMessageUpdate.ts +10 -0
  258. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/index.ts +3 -0
  259. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/init.ts +12 -0
  260. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/layer.ts +16 -0
  261. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/story.test.ts +30 -0
  262. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/update.ts +15 -0
  263. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/validation.ts +11 -0
  264. package/dist/templates/examples/job-application/src/blocks/skills/blocks/skillsEntry/view.ts +100 -0
  265. package/dist/templates/examples/job-application/src/blocks/skills/command.ts +20 -0
  266. package/dist/templates/examples/job-application/src/blocks/skills/composition.ts +31 -0
  267. package/dist/templates/examples/job-application/src/blocks/skills/inMessageUpdate.ts +14 -0
  268. package/dist/templates/examples/job-application/src/blocks/skills/index.ts +3 -0
  269. package/dist/templates/examples/job-application/src/blocks/skills/init.ts +6 -0
  270. package/dist/templates/examples/job-application/src/blocks/skills/layer.ts +17 -0
  271. package/dist/templates/examples/job-application/src/blocks/skills/scene.test.ts +17 -0
  272. package/dist/templates/examples/job-application/src/blocks/skills/story.test.ts +68 -0
  273. package/dist/templates/examples/job-application/src/blocks/skills/update.ts +20 -0
  274. package/dist/templates/examples/job-application/src/blocks/skills/validation.ts +11 -0
  275. package/dist/templates/examples/job-application/src/{step → blocks}/skills/view.ts +10 -13
  276. package/dist/templates/examples/job-application/src/blocks/workHistory/block.ts +48 -0
  277. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/index.ts +2 -0
  278. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/block.ts +63 -0
  279. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/composition.ts +78 -0
  280. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/inMessageUpdate.ts +11 -0
  281. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/index.ts +3 -0
  282. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/init.ts +20 -0
  283. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/layer.ts +16 -0
  284. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/story.test.ts +44 -0
  285. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/update.ts +28 -0
  286. package/dist/templates/examples/job-application/src/blocks/workHistory/blocks/workHistoryEntry/validation.ts +20 -0
  287. package/dist/templates/examples/job-application/src/{step/workHistory/entry → blocks/workHistory/blocks/workHistoryEntry}/view.ts +44 -42
  288. package/dist/templates/examples/job-application/src/blocks/workHistory/command.ts +23 -0
  289. package/dist/templates/examples/job-application/src/blocks/workHistory/composition.ts +31 -0
  290. package/dist/templates/examples/job-application/src/blocks/workHistory/inMessageUpdate.ts +14 -0
  291. package/dist/templates/examples/job-application/src/blocks/workHistory/index.ts +3 -0
  292. package/dist/templates/examples/job-application/src/blocks/workHistory/init.ts +10 -0
  293. package/dist/templates/examples/job-application/src/blocks/workHistory/layer.ts +17 -0
  294. package/dist/templates/examples/job-application/src/blocks/workHistory/scene.test.ts +20 -0
  295. package/dist/templates/examples/job-application/src/blocks/workHistory/story.test.ts +73 -0
  296. package/dist/templates/examples/job-application/src/blocks/workHistory/update.ts +20 -0
  297. package/dist/templates/examples/job-application/src/blocks/workHistory/validation.ts +11 -0
  298. package/dist/templates/examples/job-application/src/{step → blocks}/workHistory/view.ts +10 -16
  299. package/dist/templates/examples/job-application/src/command.ts +9 -8
  300. package/dist/templates/examples/job-application/src/composition.ts +99 -0
  301. package/dist/templates/examples/job-application/src/entry.ts +9 -11
  302. package/dist/templates/examples/job-application/src/flags.ts +27 -0
  303. package/dist/templates/examples/job-application/src/index.ts +2 -0
  304. package/dist/templates/examples/job-application/src/init.ts +13 -0
  305. package/dist/templates/examples/job-application/src/layer.ts +37 -0
  306. package/dist/templates/examples/job-application/src/message.ts +0 -20
  307. package/dist/templates/examples/job-application/src/model.fixture.ts +94 -0
  308. package/dist/templates/examples/job-application/src/model.ts +11 -16
  309. package/dist/templates/examples/job-application/src/navigationComponents.ts +6 -0
  310. package/dist/templates/examples/job-application/src/scene.test.ts +240 -185
  311. package/dist/templates/examples/job-application/src/services.ts +3 -0
  312. package/dist/templates/examples/job-application/src/story.test.ts +345 -279
  313. package/dist/templates/examples/job-application/src/update.ts +52 -154
  314. package/dist/templates/examples/job-application/src/view/preview.ts +23 -9
  315. package/dist/templates/examples/job-application/src/view/review.ts +29 -18
  316. package/dist/templates/examples/job-application/src/view/stepNav.ts +53 -56
  317. package/dist/templates/examples/job-application/src/view/view.ts +122 -120
  318. package/dist/templates/examples/kanban/package.json +7 -6
  319. package/dist/templates/examples/kanban/src/block.ts +30 -0
  320. package/dist/templates/examples/kanban/src/command.ts +36 -29
  321. package/dist/templates/examples/kanban/src/composition/composition.ts +11 -0
  322. package/dist/templates/examples/kanban/src/composition/dragAndDrop.ts +99 -0
  323. package/dist/templates/examples/kanban/src/composition/index.ts +3 -0
  324. package/dist/templates/examples/kanban/src/domain/card.ts +0 -1
  325. package/dist/templates/examples/kanban/src/domain/column.ts +4 -2
  326. package/dist/templates/examples/kanban/src/effectsLayer.ts +9 -0
  327. package/dist/templates/examples/kanban/src/entry.ts +9 -21
  328. package/dist/templates/examples/kanban/src/flags.ts +24 -0
  329. package/dist/templates/examples/kanban/src/index.ts +2 -0
  330. package/dist/templates/examples/kanban/src/init.ts +21 -0
  331. package/dist/templates/examples/kanban/src/layer.ts +16 -0
  332. package/dist/templates/examples/kanban/src/message.ts +0 -4
  333. package/dist/templates/examples/kanban/src/model.ts +2 -3
  334. package/dist/templates/examples/kanban/src/scene.test.ts +97 -94
  335. package/dist/templates/examples/kanban/src/services.ts +8 -0
  336. package/dist/templates/examples/kanban/src/story.test.ts +221 -211
  337. package/dist/templates/examples/kanban/src/update.ts +49 -185
  338. package/dist/templates/examples/kanban/src/view/card.ts +14 -21
  339. package/dist/templates/examples/kanban/src/view/column.ts +46 -54
  340. package/dist/templates/examples/kanban/src/view/view.ts +53 -20
  341. package/dist/templates/examples/managed-resource-layer/package.json +7 -6
  342. package/dist/templates/examples/managed-resource-layer/src/{main.ts → block.ts} +126 -113
  343. package/dist/templates/examples/managed-resource-layer/src/entry.ts +8 -12
  344. package/dist/templates/examples/managed-resource-layer/src/scene.test.ts +89 -84
  345. package/dist/templates/examples/managed-resource-layer/src/services.ts +3 -0
  346. package/dist/templates/examples/managed-resource-layer/src/story.test.ts +88 -68
  347. package/dist/templates/examples/map/package.json +7 -6
  348. package/dist/templates/examples/map/src/block.ts +24 -0
  349. package/dist/templates/examples/map/src/command.ts +137 -0
  350. package/dist/templates/examples/map/src/composition.ts +11 -0
  351. package/dist/templates/examples/map/src/effectsLayer.ts +19 -0
  352. package/dist/templates/examples/map/src/entry.ts +8 -11
  353. package/dist/templates/examples/map/src/index.ts +2 -0
  354. package/dist/templates/examples/map/src/init.ts +20 -0
  355. package/dist/templates/examples/map/src/layer.ts +12 -0
  356. package/dist/templates/examples/map/src/mapRegistry.ts +42 -0
  357. package/dist/templates/examples/map/src/message.ts +32 -0
  358. package/dist/templates/examples/map/src/{main.fixture.ts → model.fixture.ts} +1 -1
  359. package/dist/templates/examples/map/src/model.ts +34 -0
  360. package/dist/templates/examples/map/src/mount.test.ts +5 -3
  361. package/dist/templates/examples/map/src/mount.ts +180 -0
  362. package/dist/templates/examples/map/src/scene.test.ts +90 -97
  363. package/dist/templates/examples/map/src/services.ts +3 -0
  364. package/dist/templates/examples/map/src/story.test.ts +160 -147
  365. package/dist/templates/examples/map/src/update.ts +101 -0
  366. package/dist/templates/examples/map/src/view.ts +359 -0
  367. package/dist/templates/examples/pixel-art/package.json +7 -6
  368. package/dist/templates/examples/pixel-art/src/{main.bench.ts → app.bench.ts} +78 -53
  369. package/dist/templates/examples/pixel-art/src/block.ts +29 -0
  370. package/dist/templates/examples/pixel-art/src/command.ts +52 -48
  371. package/dist/templates/examples/pixel-art/src/comparison.bench.test.ts +138 -143
  372. package/dist/templates/examples/pixel-art/src/components.ts +12 -0
  373. package/dist/templates/examples/pixel-art/src/composition.ts +135 -0
  374. package/dist/templates/examples/pixel-art/src/effectsLayer.ts +10 -0
  375. package/dist/templates/examples/pixel-art/src/entry.ts +9 -21
  376. package/dist/templates/examples/pixel-art/src/flags.ts +24 -0
  377. package/dist/templates/examples/pixel-art/src/index.ts +2 -0
  378. package/dist/templates/examples/pixel-art/src/init.ts +39 -0
  379. package/dist/templates/examples/pixel-art/src/layer.ts +20 -0
  380. package/dist/templates/examples/pixel-art/src/message.ts +3 -9
  381. package/dist/templates/examples/pixel-art/src/model.ts +19 -10
  382. package/dist/templates/examples/pixel-art/src/scene.test.ts +260 -196
  383. package/dist/templates/examples/pixel-art/src/services.ts +3 -0
  384. package/dist/templates/examples/pixel-art/src/steps.ts +52 -0
  385. package/dist/templates/examples/pixel-art/src/story.test.ts +349 -278
  386. package/dist/templates/examples/pixel-art/src/subscription.ts +46 -29
  387. package/dist/templates/examples/pixel-art/src/update.ts +200 -436
  388. package/dist/templates/examples/pixel-art/src/view/canvas.ts +4 -3
  389. package/dist/templates/examples/pixel-art/src/view/dialog.ts +148 -134
  390. package/dist/templates/examples/pixel-art/src/view/history.ts +5 -4
  391. package/dist/templates/examples/pixel-art/src/view/toolbar.ts +192 -183
  392. package/dist/templates/examples/pixel-art/src/view/view.ts +8 -11
  393. package/dist/templates/examples/query-sync/package.json +7 -6
  394. package/dist/templates/examples/query-sync/src/block.ts +24 -0
  395. package/dist/templates/examples/query-sync/src/command.ts +40 -0
  396. package/dist/templates/examples/query-sync/src/composition.ts +60 -0
  397. package/dist/templates/examples/query-sync/src/effectsLayer.ts +9 -0
  398. package/dist/templates/examples/query-sync/src/entry.ts +9 -13
  399. package/dist/templates/examples/query-sync/src/index.ts +2 -0
  400. package/dist/templates/examples/query-sync/src/init.ts +12 -0
  401. package/dist/templates/examples/query-sync/src/layer.ts +16 -0
  402. package/dist/templates/examples/query-sync/src/message.ts +17 -0
  403. package/dist/templates/examples/query-sync/src/model.ts +22 -0
  404. package/dist/templates/examples/query-sync/src/route.ts +174 -0
  405. package/dist/templates/examples/query-sync/src/scene.test.ts +94 -48
  406. package/dist/templates/examples/query-sync/src/story.test.ts +134 -84
  407. package/dist/templates/examples/query-sync/src/update.ts +57 -0
  408. package/dist/templates/examples/query-sync/src/view.ts +530 -0
  409. package/dist/templates/examples/route-transitions/package.json +7 -6
  410. package/dist/templates/examples/route-transitions/src/block.ts +25 -0
  411. package/dist/templates/examples/route-transitions/src/command.ts +59 -0
  412. package/dist/templates/examples/route-transitions/src/composition.ts +8 -0
  413. package/dist/templates/examples/route-transitions/src/effectsLayer.ts +17 -0
  414. package/dist/templates/examples/route-transitions/src/entry.ts +9 -13
  415. package/dist/templates/examples/route-transitions/src/index.ts +2 -0
  416. package/dist/templates/examples/route-transitions/src/init.ts +21 -0
  417. package/dist/templates/examples/route-transitions/src/layer.ts +12 -0
  418. package/dist/templates/examples/route-transitions/src/message.ts +16 -0
  419. package/dist/templates/examples/route-transitions/src/model.ts +31 -0
  420. package/dist/templates/examples/route-transitions/src/route.ts +8 -9
  421. package/dist/templates/examples/route-transitions/src/steps.ts +94 -0
  422. package/dist/templates/examples/route-transitions/src/story.test.ts +170 -151
  423. package/dist/templates/examples/route-transitions/src/update.ts +61 -0
  424. package/dist/templates/examples/route-transitions/src/{main.ts → view.ts} +35 -279
  425. package/dist/templates/examples/routing/package.json +7 -6
  426. package/dist/templates/examples/routing/src/block.ts +27 -0
  427. package/dist/templates/examples/routing/src/blocks/index.ts +2 -0
  428. package/dist/templates/examples/routing/src/blocks/people/block.ts +25 -0
  429. package/dist/templates/examples/routing/src/blocks/people/command.ts +34 -0
  430. package/dist/templates/examples/routing/src/blocks/people/composition.ts +6 -0
  431. package/dist/templates/examples/routing/src/blocks/people/inMessage.ts +8 -0
  432. package/dist/templates/examples/routing/src/blocks/people/inMessageUpdate.ts +20 -0
  433. package/dist/templates/examples/routing/src/blocks/people/index.ts +3 -0
  434. package/dist/templates/examples/routing/src/blocks/people/layer.ts +17 -0
  435. package/dist/templates/examples/routing/src/blocks/people/message.ts +15 -0
  436. package/dist/templates/examples/routing/src/blocks/people/model.ts +71 -0
  437. package/dist/templates/examples/routing/src/blocks/people/scene.test.ts +44 -0
  438. package/dist/templates/examples/routing/src/blocks/people/story.test.ts +73 -0
  439. package/dist/templates/examples/routing/src/blocks/people/update.ts +43 -0
  440. package/dist/templates/examples/routing/src/blocks/people/view.ts +146 -0
  441. package/dist/templates/examples/routing/src/command.ts +23 -0
  442. package/dist/templates/examples/routing/src/composition.ts +16 -0
  443. package/dist/templates/examples/routing/src/effectsLayer.ts +10 -0
  444. package/dist/templates/examples/routing/src/entry.ts +9 -14
  445. package/dist/templates/examples/routing/src/fileTree.ts +1 -1
  446. package/dist/templates/examples/routing/src/index.ts +2 -0
  447. package/dist/templates/examples/routing/src/init.ts +19 -0
  448. package/dist/templates/examples/routing/src/layer.ts +17 -0
  449. package/dist/templates/examples/routing/src/message.ts +16 -0
  450. package/dist/templates/examples/routing/src/model.ts +10 -0
  451. package/dist/templates/examples/routing/src/route.ts +11 -12
  452. package/dist/templates/examples/routing/src/scene.test.ts +116 -105
  453. package/dist/templates/examples/routing/src/story.test.ts +204 -174
  454. package/dist/templates/examples/routing/src/subscription.ts +37 -0
  455. package/dist/templates/examples/routing/src/update.ts +82 -0
  456. package/dist/templates/examples/routing/src/{main.ts → view.ts} +31 -203
  457. package/dist/templates/examples/shopping-cart/package.json +7 -6
  458. package/dist/templates/examples/shopping-cart/src/block.ts +24 -0
  459. package/dist/templates/examples/shopping-cart/src/blocks/index.ts +2 -0
  460. package/dist/templates/examples/shopping-cart/src/blocks/products/block.ts +44 -0
  461. package/dist/templates/examples/shopping-cart/src/blocks/products/composition.ts +3 -0
  462. package/dist/templates/examples/shopping-cart/src/blocks/products/index.ts +2 -0
  463. package/dist/templates/examples/shopping-cart/src/blocks/products/layer.ts +10 -0
  464. package/dist/templates/examples/shopping-cart/src/blocks/products/products.ts +57 -0
  465. package/dist/templates/examples/shopping-cart/src/blocks/products/scene.test.ts +21 -0
  466. package/dist/templates/examples/shopping-cart/src/blocks/products/story.test.ts +58 -0
  467. package/dist/templates/examples/shopping-cart/src/{page/products.ts → blocks/products/view.ts} +6 -96
  468. package/dist/templates/examples/shopping-cart/src/command.ts +23 -0
  469. package/dist/templates/examples/shopping-cart/src/composition.ts +38 -0
  470. package/dist/templates/examples/shopping-cart/src/data/products.ts +1 -1
  471. package/dist/templates/examples/shopping-cart/src/domain/item.ts +0 -2
  472. package/dist/templates/examples/shopping-cart/src/effectsLayer.ts +8 -0
  473. package/dist/templates/examples/shopping-cart/src/entry.ts +9 -13
  474. package/dist/templates/examples/shopping-cart/src/index.ts +2 -0
  475. package/dist/templates/examples/shopping-cart/src/init.ts +15 -0
  476. package/dist/templates/examples/shopping-cart/src/layer.ts +15 -0
  477. package/dist/templates/examples/shopping-cart/src/message.ts +18 -0
  478. package/dist/templates/examples/shopping-cart/src/model.ts +14 -0
  479. package/dist/templates/examples/shopping-cart/src/page/cart.ts +4 -5
  480. package/dist/templates/examples/shopping-cart/src/page/checkout.ts +4 -5
  481. package/dist/templates/examples/shopping-cart/src/page/index.ts +0 -1
  482. package/dist/templates/examples/shopping-cart/src/route.ts +10 -14
  483. package/dist/templates/examples/shopping-cart/src/scene.test.ts +119 -96
  484. package/dist/templates/examples/shopping-cart/src/story.test.ts +154 -142
  485. package/dist/templates/examples/shopping-cart/src/update.ts +47 -0
  486. package/dist/templates/examples/shopping-cart/src/view.ts +153 -0
  487. package/dist/templates/examples/slow-warnings/package.json +7 -6
  488. package/dist/templates/examples/slow-warnings/src/block.ts +18 -0
  489. package/dist/templates/examples/slow-warnings/src/composition.ts +8 -0
  490. package/dist/templates/examples/slow-warnings/src/entry.ts +8 -20
  491. package/dist/templates/examples/slow-warnings/src/handleSlow.test.ts +3 -1
  492. package/dist/templates/examples/slow-warnings/src/index.ts +2 -0
  493. package/dist/templates/examples/slow-warnings/src/init.ts +12 -0
  494. package/dist/templates/examples/slow-warnings/src/layer.ts +13 -0
  495. package/dist/templates/examples/slow-warnings/src/message.ts +13 -0
  496. package/dist/templates/examples/slow-warnings/src/model.ts +37 -0
  497. package/dist/templates/examples/slow-warnings/src/scene.test.ts +36 -31
  498. package/dist/templates/examples/slow-warnings/src/story.test.ts +98 -88
  499. package/dist/templates/examples/slow-warnings/src/subscription.ts +108 -0
  500. package/dist/templates/examples/slow-warnings/src/update.ts +46 -0
  501. package/dist/templates/examples/slow-warnings/src/{main.ts → view.ts} +23 -252
  502. package/dist/templates/examples/slow-warnings/src/workload.ts +19 -0
  503. package/dist/templates/examples/snake/package.json +7 -6
  504. package/dist/templates/examples/snake/src/block.ts +371 -0
  505. package/dist/templates/examples/snake/src/domain/position.ts +1 -2
  506. package/dist/templates/examples/snake/src/entry.ts +7 -12
  507. package/dist/templates/examples/snake/src/scene.test.ts +54 -52
  508. package/dist/templates/examples/snake/src/story.test.ts +124 -107
  509. package/dist/templates/examples/ssg/package.json +4 -4
  510. package/dist/templates/examples/ssg/src/{main.ts → block.ts} +81 -56
  511. package/dist/templates/examples/ssg/src/entry.server.ts +3 -2
  512. package/dist/templates/examples/ssg/src/entry.ts +9 -13
  513. package/dist/templates/examples/ssg/src/route.ts +9 -7
  514. package/dist/templates/examples/ssr/package.json +9 -8
  515. package/dist/templates/examples/ssr/src/{main.ts → block.ts} +58 -49
  516. package/dist/templates/examples/ssr/src/entry.server.ts +3 -2
  517. package/dist/templates/examples/ssr/src/entry.ts +7 -11
  518. package/dist/templates/examples/ssr/src/scene.test.ts +27 -25
  519. package/dist/templates/examples/state-machine/package.json +7 -6
  520. package/dist/templates/examples/state-machine/src/block.ts +22 -0
  521. package/dist/templates/examples/state-machine/src/command.ts +20 -0
  522. package/dist/templates/examples/state-machine/src/composition.ts +41 -0
  523. package/dist/templates/examples/state-machine/src/entry.ts +7 -12
  524. package/dist/templates/examples/state-machine/src/index.ts +2 -0
  525. package/dist/templates/examples/state-machine/src/init.ts +10 -0
  526. package/dist/templates/examples/state-machine/src/layer.ts +16 -0
  527. package/dist/templates/examples/state-machine/src/machine.ts +235 -0
  528. package/dist/templates/examples/state-machine/src/message.ts +17 -0
  529. package/dist/templates/examples/state-machine/src/model.ts +77 -0
  530. package/dist/templates/examples/state-machine/src/scene.test.ts +83 -70
  531. package/dist/templates/examples/state-machine/src/story.test.ts +123 -144
  532. package/dist/templates/examples/state-machine/src/transition.ts +50 -0
  533. package/dist/templates/examples/state-machine/src/update.ts +21 -0
  534. package/dist/templates/examples/state-machine/src/view/analysis.ts +173 -0
  535. package/dist/templates/examples/state-machine/src/view/cart.ts +210 -0
  536. package/dist/templates/examples/state-machine/src/view/checkout.ts +203 -0
  537. package/dist/templates/examples/state-machine/src/view/header.ts +193 -0
  538. package/dist/templates/examples/state-machine/src/view/payment.ts +176 -0
  539. package/dist/templates/examples/state-machine/src/view/review.ts +323 -0
  540. package/dist/templates/examples/state-machine/src/view/shared.ts +134 -0
  541. package/dist/templates/examples/state-machine/src/view/shipping.ts +179 -0
  542. package/dist/templates/examples/state-machine/src/view/status.ts +131 -0
  543. package/dist/templates/examples/state-machine/src/view.ts +8 -1622
  544. package/dist/templates/examples/stopwatch/package.json +7 -6
  545. package/dist/templates/examples/stopwatch/src/{main.ts → block.ts} +111 -89
  546. package/dist/templates/examples/stopwatch/src/entry.ts +7 -12
  547. package/dist/templates/examples/stopwatch/src/scene.test.ts +82 -78
  548. package/dist/templates/examples/stopwatch/src/story.test.ts +84 -75
  549. package/dist/templates/examples/todo/package.json +7 -6
  550. package/dist/templates/examples/todo/src/block.ts +20 -0
  551. package/dist/templates/examples/todo/src/command.ts +40 -0
  552. package/dist/templates/examples/todo/src/composition.ts +8 -0
  553. package/dist/templates/examples/todo/src/effectsLayer.ts +5 -0
  554. package/dist/templates/examples/todo/src/entry.ts +11 -11
  555. package/dist/templates/examples/todo/src/flags.ts +21 -0
  556. package/dist/templates/examples/todo/src/index.ts +2 -0
  557. package/dist/templates/examples/todo/src/init.ts +14 -0
  558. package/dist/templates/examples/todo/src/layer.ts +12 -0
  559. package/dist/templates/examples/todo/src/message.ts +26 -0
  560. package/dist/templates/examples/todo/src/model.ts +35 -0
  561. package/dist/templates/examples/todo/src/scene.test.ts +85 -99
  562. package/dist/templates/examples/todo/src/services.ts +3 -0
  563. package/dist/templates/examples/todo/src/story.test.ts +172 -165
  564. package/dist/templates/examples/todo/src/update.ts +169 -0
  565. package/dist/templates/examples/todo/src/{main.ts → view.ts} +25 -330
  566. package/dist/templates/examples/ui-showcase/package.json +7 -6
  567. package/dist/templates/examples/ui-showcase/src/block.ts +25 -0
  568. package/dist/templates/examples/ui-showcase/src/blocks/index.ts +2 -0
  569. package/dist/templates/examples/ui-showcase/src/blocks/ui/block.ts +25 -0
  570. package/dist/templates/examples/ui-showcase/src/blocks/ui/combobox.ts +6 -0
  571. package/dist/templates/examples/ui-showcase/src/blocks/ui/composition/animation.ts +24 -0
  572. package/dist/templates/examples/ui-showcase/src/blocks/ui/composition/composition.ts +584 -0
  573. package/dist/templates/examples/ui-showcase/src/blocks/ui/composition/dragAndDrop.ts +76 -0
  574. package/dist/templates/examples/ui-showcase/src/blocks/ui/composition/index.ts +43 -0
  575. package/dist/templates/examples/ui-showcase/src/blocks/ui/domain/domain.ts +43 -0
  576. package/dist/templates/examples/ui-showcase/src/blocks/ui/domain/index.ts +8 -0
  577. package/dist/templates/examples/ui-showcase/src/blocks/ui/inMessage.ts +7 -0
  578. package/dist/templates/examples/ui-showcase/src/blocks/ui/inMessageUpdate.ts +6 -0
  579. package/dist/templates/examples/ui-showcase/src/blocks/ui/index.ts +3 -0
  580. package/dist/templates/examples/ui-showcase/src/blocks/ui/init.ts +60 -0
  581. package/dist/templates/examples/ui-showcase/src/blocks/ui/layer.ts +56 -0
  582. package/dist/templates/examples/ui-showcase/src/blocks/ui/listbox.ts +15 -0
  583. package/dist/templates/examples/ui-showcase/src/blocks/ui/menu.ts +5 -0
  584. package/dist/templates/examples/ui-showcase/src/blocks/ui/message.ts +36 -0
  585. package/dist/templates/examples/ui-showcase/src/blocks/ui/model.ts +107 -0
  586. package/dist/templates/examples/ui-showcase/src/blocks/ui/radioGroup.ts +5 -0
  587. package/dist/templates/examples/ui-showcase/src/blocks/ui/story.test.ts +33 -0
  588. package/dist/templates/examples/ui-showcase/src/blocks/ui/tabs.ts +5 -0
  589. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/toast.ts +2 -2
  590. package/dist/templates/examples/ui-showcase/src/blocks/ui/update.ts +157 -0
  591. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/animation.ts +51 -0
  592. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/button.ts +59 -0
  593. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/calendar.ts +29 -48
  594. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/checkbox.ts +61 -65
  595. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/combobox.ts +135 -139
  596. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/datePicker.ts +32 -56
  597. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/dialog.ts +129 -151
  598. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/disclosure.ts +253 -0
  599. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/dragAndDrop.ts +75 -63
  600. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/fieldset.ts +30 -40
  601. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/fileDrop.ts +112 -0
  602. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/hoverIntent.ts +81 -0
  603. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/index.ts +2 -0
  604. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/input.ts +87 -0
  605. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/listbox.ts +259 -0
  606. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/menu.ts +59 -66
  607. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/meter.ts +95 -0
  608. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/mobileMenu.ts +48 -0
  609. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/popover.ts +122 -132
  610. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/progress.ts +96 -0
  611. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/radioGroup.ts +177 -0
  612. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/select.ts +119 -0
  613. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/slider.ts +150 -0
  614. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/switch.ts +79 -0
  615. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/tabs.ts +85 -87
  616. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/textarea.ts +92 -0
  617. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/toast.ts +181 -0
  618. package/dist/templates/examples/ui-showcase/src/blocks/ui/view/tooltip.ts +132 -0
  619. package/dist/templates/examples/ui-showcase/src/{ui → blocks/ui}/view/virtualList.ts +91 -113
  620. package/dist/templates/examples/ui-showcase/src/blocks/ui/virtualList.ts +16 -0
  621. package/dist/templates/examples/ui-showcase/src/command.ts +23 -0
  622. package/dist/templates/examples/ui-showcase/src/composition.ts +16 -0
  623. package/dist/templates/examples/ui-showcase/src/effectsLayer.ts +8 -0
  624. package/dist/templates/examples/ui-showcase/src/entry.ts +10 -23
  625. package/dist/templates/examples/ui-showcase/src/flags.ts +13 -0
  626. package/dist/templates/examples/ui-showcase/src/index.ts +2 -0
  627. package/dist/templates/examples/ui-showcase/src/init.ts +9 -0
  628. package/dist/templates/examples/ui-showcase/src/layer.ts +15 -0
  629. package/dist/templates/examples/ui-showcase/src/message.ts +12 -0
  630. package/dist/templates/examples/ui-showcase/src/model.ts +10 -0
  631. package/dist/templates/examples/ui-showcase/src/route.ts +209 -0
  632. package/dist/templates/examples/ui-showcase/src/scene.test.ts +113 -96
  633. package/dist/templates/examples/ui-showcase/src/story.test.ts +68 -74
  634. package/dist/templates/examples/ui-showcase/src/update.ts +38 -0
  635. package/dist/templates/examples/ui-showcase/src/view.ts +420 -0
  636. package/dist/templates/examples/view-transitions/package.json +7 -6
  637. package/dist/templates/examples/view-transitions/src/{main.ts → block.ts} +100 -70
  638. package/dist/templates/examples/view-transitions/src/entry.ts +9 -13
  639. package/dist/templates/examples/view-transitions/src/route.ts +9 -7
  640. package/dist/templates/examples/view-transitions/src/scene.test.ts +45 -33
  641. package/dist/templates/examples/weather/package.json +7 -6
  642. package/dist/templates/examples/weather/src/block.ts +18 -0
  643. package/dist/templates/examples/weather/src/command.ts +142 -0
  644. package/dist/templates/examples/weather/src/composition.ts +8 -0
  645. package/dist/templates/examples/weather/src/entry.ts +8 -11
  646. package/dist/templates/examples/weather/src/index.ts +2 -0
  647. package/dist/templates/examples/weather/src/init.ts +9 -0
  648. package/dist/templates/examples/weather/src/layer.ts +12 -0
  649. package/dist/templates/examples/weather/src/message.ts +12 -0
  650. package/dist/templates/examples/weather/src/model.fixture.ts +16 -0
  651. package/dist/templates/examples/weather/src/model.ts +21 -0
  652. package/dist/templates/examples/weather/src/scene.test.ts +79 -86
  653. package/dist/templates/examples/weather/src/services.ts +3 -0
  654. package/dist/templates/examples/weather/src/story.test.ts +30 -106
  655. package/dist/templates/examples/weather/src/update.ts +30 -0
  656. package/dist/templates/examples/weather/src/view.ts +146 -0
  657. package/dist/templates/examples/web-components/package.json +7 -6
  658. package/dist/templates/examples/web-components/src/{main.ts → block.ts} +82 -49
  659. package/dist/templates/examples/web-components/src/entry.ts +7 -11
  660. package/dist/templates/examples/web-components/src/scene.test.ts +74 -73
  661. package/dist/templates/examples/web-components/src/story.test.ts +55 -53
  662. package/dist/templates/examples/websocket-chat/package.json +7 -6
  663. package/dist/templates/examples/websocket-chat/src/block.ts +27 -0
  664. package/dist/templates/examples/websocket-chat/src/chatSocket.ts +4 -0
  665. package/dist/templates/examples/websocket-chat/src/command.ts +61 -0
  666. package/dist/templates/examples/websocket-chat/src/composition.ts +8 -0
  667. package/dist/templates/examples/websocket-chat/src/effectsLayer.ts +17 -0
  668. package/dist/templates/examples/websocket-chat/src/entry.ts +8 -21
  669. package/dist/templates/examples/websocket-chat/src/index.ts +2 -0
  670. package/dist/templates/examples/websocket-chat/src/init.ts +10 -0
  671. package/dist/templates/examples/websocket-chat/src/layer.ts +16 -0
  672. package/dist/templates/examples/websocket-chat/src/managedResource.ts +41 -0
  673. package/dist/templates/examples/websocket-chat/src/message.ts +25 -0
  674. package/dist/templates/examples/websocket-chat/src/model.ts +24 -0
  675. package/dist/templates/examples/websocket-chat/src/scene.test.ts +127 -127
  676. package/dist/templates/examples/websocket-chat/src/services.ts +3 -0
  677. package/dist/templates/examples/websocket-chat/src/story.test.ts +141 -132
  678. package/dist/templates/examples/websocket-chat/src/subscription.ts +50 -0
  679. package/dist/templates/examples/websocket-chat/src/update.ts +78 -0
  680. package/dist/templates/examples/websocket-chat/src/view.ts +276 -0
  681. package/dist/templates/examples/websocket-chat/src/webSocketConnection.test.ts +225 -0
  682. package/dist/templates/examples/websocket-chat/src/webSocketConnection.ts +25 -0
  683. package/dist/templates/release.json +18 -17
  684. package/dist/templates/rendering/ssg/README.md +6 -0
  685. package/dist/templates/rendering/ssg/src/{main.ts → block.ts} +82 -55
  686. package/dist/templates/rendering/ssg/src/entry.server.ts +3 -2
  687. package/dist/templates/rendering/ssg/src/entry.ts +10 -14
  688. package/dist/templates/rendering/ssg/src/route.ts +9 -7
  689. package/dist/templates/rendering/ssg/src/scene.test.ts +26 -21
  690. package/dist/templates/rendering/ssr/src/{main.ts → block.ts} +53 -48
  691. package/dist/templates/rendering/ssr/src/entry.server.ts +3 -2
  692. package/dist/templates/rendering/ssr/src/entry.ts +7 -11
  693. package/dist/templates/rendering/ssr/src/scene.test.ts +27 -25
  694. package/dist/utils/packages.js +1 -0
  695. package/package.json +7 -7
  696. package/dist/templates/examples/api-cache/src/main.fixture.ts +0 -71
  697. package/dist/templates/examples/api-cache/src/main.ts +0 -743
  698. package/dist/templates/examples/api-cache-query/src/main.fixture.ts +0 -136
  699. package/dist/templates/examples/api-cache-query/src/main.ts +0 -651
  700. package/dist/templates/examples/auth/src/main.ts +0 -76
  701. package/dist/templates/examples/auth/src/page/index.ts +0 -2
  702. package/dist/templates/examples/auth/src/page/loggedIn/index.ts +0 -4
  703. package/dist/templates/examples/auth/src/page/loggedIn/update.ts +0 -15
  704. package/dist/templates/examples/auth/src/page/loggedOut/index.ts +0 -4
  705. package/dist/templates/examples/auth/src/page/loggedOut/page/login.scene.test.ts +0 -109
  706. package/dist/templates/examples/auth/src/page/loggedOut/page/login.story.test.ts +0 -111
  707. package/dist/templates/examples/auth/src/page/loggedOut/update.ts +0 -26
  708. package/dist/templates/examples/charting/src/chartHost.ts +0 -19
  709. package/dist/templates/examples/charting/src/init.test.ts +0 -17
  710. package/dist/templates/examples/counters/src/main.ts +0 -167
  711. package/dist/templates/examples/interrupting-commands/src/main.ts +0 -358
  712. package/dist/templates/examples/job-application/src/main.fixture.ts +0 -69
  713. package/dist/templates/examples/job-application/src/main.ts +0 -68
  714. package/dist/templates/examples/job-application/src/step/attachments/attachments.ts +0 -106
  715. package/dist/templates/examples/job-application/src/step/attachments/index.ts +0 -2
  716. package/dist/templates/examples/job-application/src/step/attachments/scene.test.ts +0 -19
  717. package/dist/templates/examples/job-application/src/step/attachments/story.test.ts +0 -46
  718. package/dist/templates/examples/job-application/src/step/coverLetter/index.ts +0 -1
  719. package/dist/templates/examples/job-application/src/step/coverLetter/scene.test.ts +0 -24
  720. package/dist/templates/examples/job-application/src/step/coverLetter/story.test.ts +0 -19
  721. package/dist/templates/examples/job-application/src/step/education/education.ts +0 -111
  722. package/dist/templates/examples/job-application/src/step/education/entry/entry.ts +0 -160
  723. package/dist/templates/examples/job-application/src/step/education/entry/index.ts +0 -11
  724. package/dist/templates/examples/job-application/src/step/education/entry/story.test.ts +0 -39
  725. package/dist/templates/examples/job-application/src/step/education/index.ts +0 -12
  726. package/dist/templates/examples/job-application/src/step/education/scene.test.ts +0 -20
  727. package/dist/templates/examples/job-application/src/step/education/story.test.ts +0 -87
  728. package/dist/templates/examples/job-application/src/step/index.ts +0 -6
  729. package/dist/templates/examples/job-application/src/step/personalInfo/index.ts +0 -11
  730. package/dist/templates/examples/job-application/src/step/personalInfo/personalInfo.ts +0 -291
  731. package/dist/templates/examples/job-application/src/step/personalInfo/scene.test.ts +0 -38
  732. package/dist/templates/examples/job-application/src/step/personalInfo/story.test.ts +0 -89
  733. package/dist/templates/examples/job-application/src/step/skills/entry/entry.ts +0 -120
  734. package/dist/templates/examples/job-application/src/step/skills/entry/index.ts +0 -11
  735. package/dist/templates/examples/job-application/src/step/skills/entry/story.test.ts +0 -27
  736. package/dist/templates/examples/job-application/src/step/skills/entry/view.ts +0 -99
  737. package/dist/templates/examples/job-application/src/step/skills/index.ts +0 -12
  738. package/dist/templates/examples/job-application/src/step/skills/scene.test.ts +0 -16
  739. package/dist/templates/examples/job-application/src/step/skills/skills.ts +0 -108
  740. package/dist/templates/examples/job-application/src/step/skills/story.test.ts +0 -85
  741. package/dist/templates/examples/job-application/src/step/workHistory/entry/entry.ts +0 -188
  742. package/dist/templates/examples/job-application/src/step/workHistory/entry/index.ts +0 -11
  743. package/dist/templates/examples/job-application/src/step/workHistory/entry/story.test.ts +0 -42
  744. package/dist/templates/examples/job-application/src/step/workHistory/index.ts +0 -12
  745. package/dist/templates/examples/job-application/src/step/workHistory/scene.test.ts +0 -20
  746. package/dist/templates/examples/job-application/src/step/workHistory/story.test.ts +0 -87
  747. package/dist/templates/examples/job-application/src/step/workHistory/workHistory.ts +0 -111
  748. package/dist/templates/examples/kanban/src/main.ts +0 -55
  749. package/dist/templates/examples/kanban/src/subscription.ts +0 -17
  750. package/dist/templates/examples/map/src/main.ts +0 -788
  751. package/dist/templates/examples/map/src/mapHost.ts +0 -21
  752. package/dist/templates/examples/pixel-art/src/main.ts +0 -84
  753. package/dist/templates/examples/query-sync/src/main.ts +0 -893
  754. package/dist/templates/examples/routing/src/page/index.ts +0 -1
  755. package/dist/templates/examples/routing/src/page/people.scene.test.ts +0 -41
  756. package/dist/templates/examples/routing/src/page/people.story.test.ts +0 -73
  757. package/dist/templates/examples/routing/src/page/people.ts +0 -331
  758. package/dist/templates/examples/shopping-cart/src/main.ts +0 -299
  759. package/dist/templates/examples/shopping-cart/src/page/products.scene.test.ts +0 -20
  760. package/dist/templates/examples/shopping-cart/src/page/products.story.test.ts +0 -56
  761. package/dist/templates/examples/snake/src/main.ts +0 -338
  762. package/dist/templates/examples/state-machine/src/main.ts +0 -436
  763. package/dist/templates/examples/ui-showcase/src/main.ts +0 -688
  764. package/dist/templates/examples/ui-showcase/src/ui/init.ts +0 -189
  765. package/dist/templates/examples/ui-showcase/src/ui/message.ts +0 -96
  766. package/dist/templates/examples/ui-showcase/src/ui/model.ts +0 -144
  767. package/dist/templates/examples/ui-showcase/src/ui/subscriptions.ts +0 -49
  768. package/dist/templates/examples/ui-showcase/src/ui/update.ts +0 -1197
  769. package/dist/templates/examples/ui-showcase/src/ui/view/animation.ts +0 -58
  770. package/dist/templates/examples/ui-showcase/src/ui/view/button.ts +0 -64
  771. package/dist/templates/examples/ui-showcase/src/ui/view/disclosure.ts +0 -260
  772. package/dist/templates/examples/ui-showcase/src/ui/view/fileDrop.ts +0 -121
  773. package/dist/templates/examples/ui-showcase/src/ui/view/hoverIntent.ts +0 -86
  774. package/dist/templates/examples/ui-showcase/src/ui/view/input.ts +0 -91
  775. package/dist/templates/examples/ui-showcase/src/ui/view/listbox.ts +0 -263
  776. package/dist/templates/examples/ui-showcase/src/ui/view/meter.ts +0 -98
  777. package/dist/templates/examples/ui-showcase/src/ui/view/progress.ts +0 -99
  778. package/dist/templates/examples/ui-showcase/src/ui/view/radioGroup.ts +0 -188
  779. package/dist/templates/examples/ui-showcase/src/ui/view/select.ts +0 -127
  780. package/dist/templates/examples/ui-showcase/src/ui/view/slider.ts +0 -158
  781. package/dist/templates/examples/ui-showcase/src/ui/view/switch.ts +0 -82
  782. package/dist/templates/examples/ui-showcase/src/ui/view/textarea.ts +0 -94
  783. package/dist/templates/examples/ui-showcase/src/ui/view/toast.ts +0 -182
  784. package/dist/templates/examples/ui-showcase/src/ui/view/tooltip.ts +0 -135
  785. package/dist/templates/examples/weather/src/main.fixture.ts +0 -59
  786. package/dist/templates/examples/weather/src/main.ts +0 -349
  787. package/dist/templates/examples/websocket-chat/src/main.ts +0 -628
package/README.md CHANGED
@@ -31,7 +31,7 @@ The starter examples apply to `spa` rendering. The `ssg` and `ssr` modes scaffol
31
31
  | Example | Description |
32
32
  | ------------------------ | ------------------------------------------------------------------------------------------------------ |
33
33
  | `counter` | Simple increment/decrement with reset |
34
- | `counters` | A dynamic list of Counter Submodels with per-instance routing via a wrapper Message |
34
+ | `counters` | A dynamic list of Counter Blocks with generated per-instance delivery |
35
35
  | `todo` | CRUD operations with localStorage persistence |
36
36
  | `stopwatch` | Timer with start/stop/reset |
37
37
  | `crash-view` | Custom crash fallback UI with crash.view and crash.report |
@@ -48,7 +48,7 @@ The starter examples apply to `spa` rendering. The `ssg` and `ssr` modes scaffol
48
48
  | `snake` | Classic game built with Subscriptions |
49
49
  | `canvas-art` | Declarative 2D canvas with shapes, animation-frame Subscriptions, and pointer events |
50
50
  | `generative-art` | Perlin-noise flow field with evolving particle trails, mouse vortex, and high-frequency Messages |
51
- | `auth` | Authentication with Submodels, OutMessage, and protected routes |
51
+ | `auth` | Authentication with Blocks, OutMessage, and protected routes |
52
52
  | `shopping-cart` | Complex state management with nested Models and routing |
53
53
  | `state-machine` | Experimental state machine checkout with guarded branches and edge Commands |
54
54
  | `pixel-art` | Pixel editor with undo/redo, UI components, and localStorage persistence |
@@ -58,7 +58,7 @@ The starter examples apply to `spa` rendering. The `ssg` and `ssr` modes scaffol
58
58
  | `map` | Interactive MapLibre GL map with Mount and Subscriptions |
59
59
  | `web-components` | QR code designer wiring third-party web components into Foldkit with CustomElement.define |
60
60
  | `embedding` | A Foldkit widget embedded in a plain TypeScript host page with Ports and dispose |
61
- | `ui-showcase` | Every Foldkit UI component with routing and Submodels |
61
+ | `ui-showcase` | Every Foldkit UI component with routing and Blocks |
62
62
 
63
63
  ## License
64
64
 
package/dist/examples.js CHANGED
@@ -40,7 +40,7 @@ export const examples = [
40
40
  {
41
41
  value: 'counters',
42
42
  title: 'counters',
43
- description: 'A dynamic list of Counter Submodels with per-instance routing via a wrapper Message',
43
+ description: 'A dynamic list of Counter Blocks with generated per-instance delivery',
44
44
  },
45
45
  {
46
46
  value: 'todo',
@@ -85,7 +85,7 @@ export const examples = [
85
85
  {
86
86
  value: 'api-cache-query',
87
87
  title: 'api-cache-query',
88
- description: 'The API Cache app rewritten with experimental Query.define. Fetching and retained entries live in Query Submodels',
88
+ description: 'The API Cache app rewritten with experimental Query.define. Fetching and retained entries live in Query Blocks',
89
89
  },
90
90
  {
91
91
  value: 'charting',
@@ -135,7 +135,7 @@ export const examples = [
135
135
  {
136
136
  value: 'auth',
137
137
  title: 'auth',
138
- description: 'Authentication with Submodels, OutMessage, and protected routes',
138
+ description: 'Authentication with Blocks, OutMessage, and protected routes',
139
139
  },
140
140
  {
141
141
  value: 'shopping-cart',
@@ -185,6 +185,6 @@ export const examples = [
185
185
  {
186
186
  value: 'ui-showcase',
187
187
  title: 'ui-showcase',
188
- description: 'Every Foldkit UI component with routing and Submodels',
188
+ description: 'Every Foldkit UI component with routing and Blocks',
189
189
  },
190
190
  ];
@@ -2,6 +2,26 @@
2
2
 
3
3
  This is a Foldkit app. Read [`FOLDKIT.md`](./FOLDKIT.md) before writing any code in this project. It covers the architecture, the APIs, and the conventions the project is built on.
4
4
 
5
+ A compact feature may keep its complete implementation together. A split feature declares `FooBlock`, its adjacent key and needed authoring helpers in `block.ts`; `composition.ts` owns static Bindings, OutMessage policies and graph-aware builders; `layer.ts` completes `FooBlock.makeLayer({ init, update, view, ... })` and provides child implementation Layers. The record acquires the init plan's registered child inventory when its Layer is built; use plans from that same Composition. Keep a custom Effect constructor for genuine construction dependencies or scoped work, with explicit acquired `children`. Put a separate local handler bundle in `effectsLayer.ts`. Ordinary Services remain in `services.ts` or a feature-owned provider. Keep init, update, view, Commands and lifecycle definitions in their responsibility modules. Never use `layer.ts` for the local EffectsLayer bundle. A compact root keeps all structural pieces in `block.ts`; retain its declaration when splitting. The root entry selects `{ block: ApplicationBlock, layer }` and starts the Runtime.
6
+
7
+ A child feature exports `FooBlock = Block.make(...)` separately from its implementation `layer`. Composition and extracted builders import child contracts; only completion imports child implementation Layers. The root exports the `ApplicationBlock` and its construction `layer` for Program/Server hosting. `entry.ts` chooses the host, container and startup inputs, supplies ordinary Services through `program.provide(ApplicationLayer)`, and starts Runtime. Imported Block declarations, Compositions and Layer recipes stay passive. Child startup selectors remain deferred until parent init, handler dependencies remain in their handler constructors, and application state stays in the Model.
8
+
9
+ Split implementations named-import their needed Step helpers from `block.ts`; compact implementations destructure them beside the Block declaration. Keep Block qualification where several owners share one module. Keep shared Mount definitions in `mount.ts` and separate local handler bundles in `effectsLayer.ts`; feature barrels do not reexport authoring helpers. Keep the declaration in `block.ts` when splitting, and use an explicit `index.ts` barrel. Name the root Route union `ApplicationRoute`, ordinary Service provider `ApplicationLayer`, and its test alternative `ApplicationTestLayer`.
10
+
11
+ Block-aware Story and Scene runners return scoped Effects. Use their `init(...args)` step to preserve init Model and Commands, `given(model)` for a deliberate prebuilt state, and the paired `{ block: FeatureBlock, layer }` for implementation construction. Their ordinary steps stay synchronous and do not run handlers. See FOLDKIT.md for exact view/context/routing and deferred child-message testing forms.
12
+
13
+ Name application-authored Step values and factories for their operation: `clearSearch`, `changeSearchQuery(query)`, and `applyDomainResult(result)`. Their definitions and types establish the Step role; omit the `make` prefix and `Step` suffix from these application names. Preserve framework helpers and types such as `makeStep`, `makeFieldsStep`, `makeCommandsStep`, `makeOutMessageStep`, `makeNoopStep`, `Update.Step`, and `Update.combineSteps`, along with other public framework helpers whose names include `Step`. Keep existing naming conventions for unrelated factories, Commands, Messages, Bindings, OutMessage folds and matchers, dedicated `handle<MessageTag>` handlers, public operation keys, and applied update-like results.
14
+
15
+ Keep a Step used by only one responsibility with that code. Put reusable Steps shared by update, composition, or init in the owning Block's `steps.ts`. For a larger module, use responsibility files such as `steps/search.ts` and `steps/quoteLoading.ts`, with an explicit `steps/index.ts` barrel. The owner is the Block whose Model the Step transforms. Keep shared Steps independent of the owning update and completed Block.
16
+
17
+ `update.ts` maps incoming Messages to handlers and Steps. `composition.ts` registers relationships and maps child OutMessages to parent Steps. `steps.ts` owns the reusable transitions those entry points share. Keep Binding registration and OutMessage policy in composition. Name shared transitions for their operation, without a `make` prefix or `Step` suffix. A Step that closes over a Binding from composition must read it in a deferred producer when the modules depend on one another; module initialization must not invoke that Binding.
18
+
19
+ Declare the unique key immediately before its Block and give `Symbol('Feature')` the same description as the Block's readable name. Keep the key private unless verified declaration emission needs its original declaration exported. Split implementation modules commonly need that export because their inferred contracts name the owner key. A public barrel may re-export the original declaration with `export type` when only its identity is needed in types. Verify source and relocated declarations before removing an export.
20
+
21
+ Declare parent requests and notifications in the child's `InMessage` union and handle them with `Composition.makeInMessageUpdate`. `RequestedX` generates `Binding.requestX`, and `InformedOfX` generates `Binding.informOfX`. The remaining suffix is preserved exactly; other prefixes and empty suffixes are rejected. Methods take the constructor payload when present, with a keyed occurrence first and InMessage context last. They return connected parent Steps, so pass them directly to handler records or compose them. Do not add a manual request wrapper or an `operations` entry that only repeats an InMessage constructor. Keep explicit operations for real argument adaptation, generic interfaces or intentional local-Message mappings.
22
+
23
+ Application behavior belongs in Story or Scene. Use their DSL to deliver Messages and InMessages, resolve Commands, and assert Models, OutMessages and views. Do not manually chain acquired `update` calls or invoke application Steps as a substitute for the DSL. Pure fixture construction and intentional `given(model)` remain valid; use scoped acquisition only when a fixture genuinely needs initialized state, graph identity or custom view context. Keep pure domain/selector tests separate from application behavior, and reserve low-level transition tests for framework infrastructure. Keep Story and Scene specifications declarative: use immutable fixtures, `messageWith` for a value read from the current Model, and observable assertions. Do not carry values between steps through mutable outer captures or `mockImplementation` closures; establish a genuine DSL gap before introducing a mutable bridge.
24
+
5
25
  Foldkit owns `FOLDKIT.md` and replaces it whole on upgrade. This file is yours. Anything you want an agent to know about this project goes below, where an upgrade won't touch it.
6
26
 
7
27
  `FOLDKIT.md` reads the line below to decide whether it has already offered to vendor the Foldkit source. Leave it in place.
@@ -11,3 +31,5 @@ subtree_prompted: false
11
31
  ## Project Notes
12
32
 
13
33
  Domain vocabulary, deployment steps, local conventions that differ from Foldkit's defaults: write them here.
34
+
35
+ For a required direct child field, omit `init` when its initializer accepts no arguments; use `init: { contextToArgs }` for required inputs or `init: false` when the parent supplies that field. Optional, keyed, and accessor storage remains parent-owned when `init` is omitted; explicit `init.contextToArgs`, keyed `init.instances` / `init.toItem`, or a checked custom projection chooses automatic startup. An optional `ChildInitContext` Schema on the parent Block contextually types selectors that prepare arguments for direct child initializers. Author root startup through `ApplicationComposition.makeInit`, returning parent-owned `model` fields plus optional ephemeral `childInitContext`, parent `commands`, and post-assembly `steps`. Composition initializes and places child Models and collects their Commands. Use an exhaustive `ApplicationComposition.makeUpdate` handler record for parent transitions; registered Bindings route generated child envelopes before local handlers. Use `makeUpdate({})` when the parent has no locally authored Messages and `.withContext` when handlers need dispatch context. Put delivery admission in `delivery.when`, derive required child update context with `delivery.toUpdateContext`, and provide `keySchema` for a custom keyed Binding. See FOLDKIT.md for optional presence, exact keyed identity and startup Steps.