forgebook 0.0.0-stage → 0.1.0

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 (493) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +136 -2
  3. package/dist/bin/forgebook/catalogueVite.d.ts +16 -0
  4. package/dist/bin/forgebook/catalogueVite.d.ts.map +1 -0
  5. package/dist/bin/forgebook/catalogueVite.js +15 -0
  6. package/dist/bin/forgebook/catalogueVite.js.map +1 -0
  7. package/dist/bin/forgebook/forgebook.d.mts +3 -0
  8. package/dist/bin/forgebook/forgebook.d.mts.map +1 -0
  9. package/dist/bin/forgebook/forgebook.mjs +93 -0
  10. package/dist/bin/forgebook/forgebook.mjs.map +1 -0
  11. package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +90 -0
  12. package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +1 -0
  13. package/dist/bin/forgebook-docs/catalogueDocs.types.js +1 -0
  14. package/dist/bin/forgebook-docs/catalogueDocs.types.js.map +1 -0
  15. package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +9 -0
  16. package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +1 -0
  17. package/dist/bin/forgebook-docs/catalogueMarkdown.js +132 -0
  18. package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +1 -0
  19. package/dist/bin/forgebook-docs/collectDocs.d.ts +17 -0
  20. package/dist/bin/forgebook-docs/collectDocs.d.ts.map +1 -0
  21. package/dist/bin/forgebook-docs/collectDocs.js +115 -0
  22. package/dist/bin/forgebook-docs/collectDocs.js.map +1 -0
  23. package/dist/bin/forgebook-docs/forgebook-docs.d.mts +3 -0
  24. package/dist/bin/forgebook-docs/forgebook-docs.d.mts.map +1 -0
  25. package/dist/bin/forgebook-docs/forgebook-docs.mjs +115 -0
  26. package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +1 -0
  27. package/dist/bin/forgebook-docs/moduleDocs.d.ts +9 -0
  28. package/dist/bin/forgebook-docs/moduleDocs.d.ts.map +1 -0
  29. package/dist/bin/forgebook-docs/moduleDocs.js +62 -0
  30. package/dist/bin/forgebook-docs/moduleDocs.js.map +1 -0
  31. package/dist/bin/forgebook-docs/sassDocs.d.ts +20 -0
  32. package/dist/bin/forgebook-docs/sassDocs.d.ts.map +1 -0
  33. package/dist/bin/forgebook-docs/sassDocs.js +77 -0
  34. package/dist/bin/forgebook-docs/sassDocs.js.map +1 -0
  35. package/dist/bin/forgebook-texts/forgebook-texts.d.mts +3 -0
  36. package/dist/bin/forgebook-texts/forgebook-texts.d.mts.map +1 -0
  37. package/dist/bin/forgebook-texts/forgebook-texts.mjs +94 -0
  38. package/dist/bin/forgebook-texts/forgebook-texts.mjs.map +1 -0
  39. package/dist/bin/forgebook-texts/storyTextsReport.d.ts +26 -0
  40. package/dist/bin/forgebook-texts/storyTextsReport.d.ts.map +1 -0
  41. package/dist/bin/forgebook-texts/storyTextsReport.js +35 -0
  42. package/dist/bin/forgebook-texts/storyTextsReport.js.map +1 -0
  43. package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts +25 -0
  44. package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts.map +1 -0
  45. package/dist/bin/forgebook-texts/storyTextsReport.types.js +7 -0
  46. package/dist/bin/forgebook-texts/storyTextsReport.types.js.map +1 -0
  47. package/dist/src/a11y.d.ts +28 -0
  48. package/dist/src/a11y.d.ts.map +1 -0
  49. package/dist/src/a11y.js +29 -0
  50. package/dist/src/a11y.js.map +1 -0
  51. package/dist/src/argTypes.d.ts +114 -0
  52. package/dist/src/argTypes.d.ts.map +1 -0
  53. package/dist/src/argTypes.js +254 -0
  54. package/dist/src/argTypes.js.map +1 -0
  55. package/dist/src/backdrops.d.ts +88 -0
  56. package/dist/src/backdrops.d.ts.map +1 -0
  57. package/dist/src/backdrops.js +202 -0
  58. package/dist/src/backdrops.js.map +1 -0
  59. package/dist/src/catalogue.d.ts +120 -0
  60. package/dist/src/catalogue.d.ts.map +1 -0
  61. package/dist/src/catalogue.js +80 -0
  62. package/dist/src/catalogue.js.map +1 -0
  63. package/dist/src/componentDocs.d.ts +98 -0
  64. package/dist/src/componentDocs.d.ts.map +1 -0
  65. package/dist/src/componentDocs.js +47 -0
  66. package/dist/src/componentDocs.js.map +1 -0
  67. package/dist/src/frame/checkStory.d.ts +20 -0
  68. package/dist/src/frame/checkStory.d.ts.map +1 -0
  69. package/dist/src/frame/checkStory.js +31 -0
  70. package/dist/src/frame/checkStory.js.map +1 -0
  71. package/dist/src/frame/frame.css +51 -0
  72. package/dist/src/frame/frameClock.d.ts +53 -0
  73. package/dist/src/frame/frameClock.d.ts.map +1 -0
  74. package/dist/src/frame/frameClock.js +80 -0
  75. package/dist/src/frame/frameClock.js.map +1 -0
  76. package/dist/src/frame/frameStatus.d.ts +8 -0
  77. package/dist/src/frame/frameStatus.d.ts.map +1 -0
  78. package/dist/src/frame/frameStatus.js +8 -0
  79. package/dist/src/frame/frameStatus.js.map +1 -0
  80. package/dist/src/frame/frameView.d.ts +33 -0
  81. package/dist/src/frame/frameView.d.ts.map +1 -0
  82. package/dist/src/frame/frameView.js +134 -0
  83. package/dist/src/frame/frameView.js.map +1 -0
  84. package/dist/src/frame/matrixLayout.d.ts +36 -0
  85. package/dist/src/frame/matrixLayout.d.ts.map +1 -0
  86. package/dist/src/frame/matrixLayout.js +87 -0
  87. package/dist/src/frame/matrixLayout.js.map +1 -0
  88. package/dist/src/frame/measureTools.d.ts +24 -0
  89. package/dist/src/frame/measureTools.d.ts.map +1 -0
  90. package/dist/src/frame/measureTools.js +141 -0
  91. package/dist/src/frame/measureTools.js.map +1 -0
  92. package/dist/src/frame/mountFrame.d.ts +47 -0
  93. package/dist/src/frame/mountFrame.d.ts.map +1 -0
  94. package/dist/src/frame/mountFrame.js +229 -0
  95. package/dist/src/frame/mountFrame.js.map +1 -0
  96. package/dist/src/frame/playStory.d.ts +40 -0
  97. package/dist/src/frame/playStory.d.ts.map +1 -0
  98. package/dist/src/frame/playStory.js +55 -0
  99. package/dist/src/frame/playStory.js.map +1 -0
  100. package/dist/src/frame/renderer.d.ts +85 -0
  101. package/dist/src/frame/renderer.d.ts.map +1 -0
  102. package/dist/src/frame/renderer.js +18 -0
  103. package/dist/src/frame/renderer.js.map +1 -0
  104. package/dist/src/frame/settle.d.ts +24 -0
  105. package/dist/src/frame/settle.d.ts.map +1 -0
  106. package/dist/src/frame/settle.js +25 -0
  107. package/dist/src/frame/settle.js.map +1 -0
  108. package/dist/src/frame/staleModule.d.ts +40 -0
  109. package/dist/src/frame/staleModule.d.ts.map +1 -0
  110. package/dist/src/frame/staleModule.js +74 -0
  111. package/dist/src/frame/staleModule.js.map +1 -0
  112. package/dist/src/frame/storyCanvas.d.ts +21 -0
  113. package/dist/src/frame/storyCanvas.d.ts.map +1 -0
  114. package/dist/src/frame/storyCanvas.js +30 -0
  115. package/dist/src/frame/storyCanvas.js.map +1 -0
  116. package/dist/src/frame/storyHooks.d.ts +31 -0
  117. package/dist/src/frame/storyHooks.d.ts.map +1 -0
  118. package/dist/src/frame/storyHooks.js +59 -0
  119. package/dist/src/frame/storyHooks.js.map +1 -0
  120. package/dist/src/frame/storyModule.d.ts +104 -0
  121. package/dist/src/frame/storyModule.d.ts.map +1 -0
  122. package/dist/src/frame/storyModule.js +205 -0
  123. package/dist/src/frame/storyModule.js.map +1 -0
  124. package/dist/src/frame/storyRun.d.ts +96 -0
  125. package/dist/src/frame/storyRun.d.ts.map +1 -0
  126. package/dist/src/frame/storyRun.js +318 -0
  127. package/dist/src/frame/storyRun.js.map +1 -0
  128. package/dist/src/languages.d.ts +15 -0
  129. package/dist/src/languages.d.ts.map +1 -0
  130. package/dist/src/languages.js +8 -0
  131. package/dist/src/languages.js.map +1 -0
  132. package/dist/src/matrix.d.ts +56 -0
  133. package/dist/src/matrix.d.ts.map +1 -0
  134. package/dist/src/matrix.js +61 -0
  135. package/dist/src/matrix.js.map +1 -0
  136. package/dist/src/messages.d.ts +203 -0
  137. package/dist/src/messages.d.ts.map +1 -0
  138. package/dist/src/messages.js +193 -0
  139. package/dist/src/messages.js.map +1 -0
  140. package/dist/src/namedValues.d.ts +38 -0
  141. package/dist/src/namedValues.d.ts.map +1 -0
  142. package/dist/src/namedValues.js +48 -0
  143. package/dist/src/namedValues.js.map +1 -0
  144. package/dist/src/pageConfig.d.ts +23 -0
  145. package/dist/src/pageConfig.d.ts.map +1 -0
  146. package/dist/src/pageConfig.js +1 -0
  147. package/dist/src/pageConfig.js.map +1 -0
  148. package/dist/src/playTrace.d.ts +41 -0
  149. package/dist/src/playTrace.d.ts.map +1 -0
  150. package/dist/src/playTrace.js +35 -0
  151. package/dist/src/playTrace.js.map +1 -0
  152. package/dist/src/shell/A11yTab.d.ts +44 -0
  153. package/dist/src/shell/A11yTab.d.ts.map +1 -0
  154. package/dist/src/shell/A11yTab.js +30 -0
  155. package/dist/src/shell/A11yTab.js.map +1 -0
  156. package/dist/src/shell/ApiReference.d.ts +18 -0
  157. package/dist/src/shell/ApiReference.d.ts.map +1 -0
  158. package/dist/src/shell/ApiReference.js +41 -0
  159. package/dist/src/shell/ApiReference.js.map +1 -0
  160. package/dist/src/shell/ClockControls.d.ts +43 -0
  161. package/dist/src/shell/ClockControls.d.ts.map +1 -0
  162. package/dist/src/shell/ClockControls.js +53 -0
  163. package/dist/src/shell/ClockControls.js.map +1 -0
  164. package/dist/src/shell/Code.d.ts +16 -0
  165. package/dist/src/shell/Code.d.ts.map +1 -0
  166. package/dist/src/shell/Code.js +9 -0
  167. package/dist/src/shell/Code.js.map +1 -0
  168. package/dist/src/shell/CodeTab.d.ts +17 -0
  169. package/dist/src/shell/CodeTab.d.ts.map +1 -0
  170. package/dist/src/shell/CodeTab.js +17 -0
  171. package/dist/src/shell/CodeTab.js.map +1 -0
  172. package/dist/src/shell/CodeText.d.ts +16 -0
  173. package/dist/src/shell/CodeText.d.ts.map +1 -0
  174. package/dist/src/shell/CodeText.js +10 -0
  175. package/dist/src/shell/CodeText.js.map +1 -0
  176. package/dist/src/shell/ComponentPage.d.ts +38 -0
  177. package/dist/src/shell/ComponentPage.d.ts.map +1 -0
  178. package/dist/src/shell/ComponentPage.js +146 -0
  179. package/dist/src/shell/ComponentPage.js.map +1 -0
  180. package/dist/src/shell/Dock.d.ts +42 -0
  181. package/dist/src/shell/Dock.d.ts.map +1 -0
  182. package/dist/src/shell/Dock.js +90 -0
  183. package/dist/src/shell/Dock.js.map +1 -0
  184. package/dist/src/shell/EventsTab.d.ts +25 -0
  185. package/dist/src/shell/EventsTab.d.ts.map +1 -0
  186. package/dist/src/shell/EventsTab.js +26 -0
  187. package/dist/src/shell/EventsTab.js.map +1 -0
  188. package/dist/src/shell/FrameView.d.ts +49 -0
  189. package/dist/src/shell/FrameView.d.ts.map +1 -0
  190. package/dist/src/shell/FrameView.js +29 -0
  191. package/dist/src/shell/FrameView.js.map +1 -0
  192. package/dist/src/shell/HomePage.d.ts +39 -0
  193. package/dist/src/shell/HomePage.d.ts.map +1 -0
  194. package/dist/src/shell/HomePage.js +85 -0
  195. package/dist/src/shell/HomePage.js.map +1 -0
  196. package/dist/src/shell/InteractionsTab.d.ts +28 -0
  197. package/dist/src/shell/InteractionsTab.d.ts.map +1 -0
  198. package/dist/src/shell/InteractionsTab.js +17 -0
  199. package/dist/src/shell/InteractionsTab.js.map +1 -0
  200. package/dist/src/shell/MatrixPicker.d.ts +24 -0
  201. package/dist/src/shell/MatrixPicker.d.ts.map +1 -0
  202. package/dist/src/shell/MatrixPicker.js +29 -0
  203. package/dist/src/shell/MatrixPicker.js.map +1 -0
  204. package/dist/src/shell/PackageHtml.d.ts +17 -0
  205. package/dist/src/shell/PackageHtml.d.ts.map +1 -0
  206. package/dist/src/shell/PackageHtml.js +13 -0
  207. package/dist/src/shell/PackageHtml.js.map +1 -0
  208. package/dist/src/shell/PartsTab.d.ts +23 -0
  209. package/dist/src/shell/PartsTab.d.ts.map +1 -0
  210. package/dist/src/shell/PartsTab.js +23 -0
  211. package/dist/src/shell/PartsTab.js.map +1 -0
  212. package/dist/src/shell/PropFields.d.ts +31 -0
  213. package/dist/src/shell/PropFields.d.ts.map +1 -0
  214. package/dist/src/shell/PropFields.js +81 -0
  215. package/dist/src/shell/PropFields.js.map +1 -0
  216. package/dist/src/shell/PropsTab.d.ts +45 -0
  217. package/dist/src/shell/PropsTab.d.ts.map +1 -0
  218. package/dist/src/shell/PropsTab.js +81 -0
  219. package/dist/src/shell/PropsTab.js.map +1 -0
  220. package/dist/src/shell/SchemeSwitches.d.ts +24 -0
  221. package/dist/src/shell/SchemeSwitches.d.ts.map +1 -0
  222. package/dist/src/shell/SchemeSwitches.js +36 -0
  223. package/dist/src/shell/SchemeSwitches.js.map +1 -0
  224. package/dist/src/shell/Segmented.d.ts +41 -0
  225. package/dist/src/shell/Segmented.d.ts.map +1 -0
  226. package/dist/src/shell/Segmented.js +19 -0
  227. package/dist/src/shell/Segmented.js.map +1 -0
  228. package/dist/src/shell/Shell.d.ts +49 -0
  229. package/dist/src/shell/Shell.d.ts.map +1 -0
  230. package/dist/src/shell/Shell.js +279 -0
  231. package/dist/src/shell/Shell.js.map +1 -0
  232. package/dist/src/shell/Sidebar.d.ts +52 -0
  233. package/dist/src/shell/Sidebar.d.ts.map +1 -0
  234. package/dist/src/shell/Sidebar.js +132 -0
  235. package/dist/src/shell/Sidebar.js.map +1 -0
  236. package/dist/src/shell/SidebarHandle.d.ts +29 -0
  237. package/dist/src/shell/SidebarHandle.d.ts.map +1 -0
  238. package/dist/src/shell/SidebarHandle.js +46 -0
  239. package/dist/src/shell/SidebarHandle.js.map +1 -0
  240. package/dist/src/shell/Stage.d.ts +68 -0
  241. package/dist/src/shell/Stage.d.ts.map +1 -0
  242. package/dist/src/shell/Stage.js +218 -0
  243. package/dist/src/shell/Stage.js.map +1 -0
  244. package/dist/src/shell/StageTools.d.ts +27 -0
  245. package/dist/src/shell/StageTools.d.ts.map +1 -0
  246. package/dist/src/shell/StageTools.js +34 -0
  247. package/dist/src/shell/StageTools.js.map +1 -0
  248. package/dist/src/shell/StageViewport.d.ts +47 -0
  249. package/dist/src/shell/StageViewport.d.ts.map +1 -0
  250. package/dist/src/shell/StageViewport.js +174 -0
  251. package/dist/src/shell/StageViewport.js.map +1 -0
  252. package/dist/src/shell/StoryCodeBlock.d.ts +35 -0
  253. package/dist/src/shell/StoryCodeBlock.d.ts.map +1 -0
  254. package/dist/src/shell/StoryCodeBlock.js +27 -0
  255. package/dist/src/shell/StoryCodeBlock.js.map +1 -0
  256. package/dist/src/shell/StoryPicker.d.ts +26 -0
  257. package/dist/src/shell/StoryPicker.d.ts.map +1 -0
  258. package/dist/src/shell/StoryPicker.js +32 -0
  259. package/dist/src/shell/StoryPicker.js.map +1 -0
  260. package/dist/src/shell/Toolbar.d.ts +40 -0
  261. package/dist/src/shell/Toolbar.d.ts.map +1 -0
  262. package/dist/src/shell/Toolbar.js +125 -0
  263. package/dist/src/shell/Toolbar.js.map +1 -0
  264. package/dist/src/shell/WidthField.d.ts +24 -0
  265. package/dist/src/shell/WidthField.d.ts.map +1 -0
  266. package/dist/src/shell/WidthField.js +40 -0
  267. package/dist/src/shell/WidthField.js.map +1 -0
  268. package/dist/src/shell/catalogueContext.d.ts +6 -0
  269. package/dist/src/shell/catalogueContext.d.ts.map +1 -0
  270. package/dist/src/shell/catalogueContext.js +14 -0
  271. package/dist/src/shell/catalogueContext.js.map +1 -0
  272. package/dist/src/shell/codeTokens.d.ts +23 -0
  273. package/dist/src/shell/codeTokens.d.ts.map +1 -0
  274. package/dist/src/shell/codeTokens.js +48 -0
  275. package/dist/src/shell/codeTokens.js.map +1 -0
  276. package/dist/src/shell/codeWriter.d.ts +6 -0
  277. package/dist/src/shell/codeWriter.d.ts.map +1 -0
  278. package/dist/src/shell/codeWriter.js +14 -0
  279. package/dist/src/shell/codeWriter.js.map +1 -0
  280. package/dist/src/shell/compareVariants.d.ts +35 -0
  281. package/dist/src/shell/compareVariants.d.ts.map +1 -0
  282. package/dist/src/shell/compareVariants.js +68 -0
  283. package/dist/src/shell/compareVariants.js.map +1 -0
  284. package/dist/src/shell/dockTabs.d.ts +63 -0
  285. package/dist/src/shell/dockTabs.d.ts.map +1 -0
  286. package/dist/src/shell/dockTabs.js +140 -0
  287. package/dist/src/shell/dockTabs.js.map +1 -0
  288. package/dist/src/shell/icons.d.ts +47 -0
  289. package/dist/src/shell/icons.d.ts.map +1 -0
  290. package/dist/src/shell/icons.js +36 -0
  291. package/dist/src/shell/icons.js.map +1 -0
  292. package/dist/src/shell/keyboard.d.ts +35 -0
  293. package/dist/src/shell/keyboard.d.ts.map +1 -0
  294. package/dist/src/shell/keyboard.js +51 -0
  295. package/dist/src/shell/keyboard.js.map +1 -0
  296. package/dist/src/shell/mountShell.d.ts +22 -0
  297. package/dist/src/shell/mountShell.d.ts.map +1 -0
  298. package/dist/src/shell/mountShell.js +39 -0
  299. package/dist/src/shell/mountShell.js.map +1 -0
  300. package/dist/src/shell/shell.css +1831 -0
  301. package/dist/src/shell/strings.d.ts +184 -0
  302. package/dist/src/shell/strings.d.ts.map +1 -0
  303. package/dist/src/shell/strings.js +188 -0
  304. package/dist/src/shell/strings.js.map +1 -0
  305. package/dist/src/shell/switchView.d.ts +23 -0
  306. package/dist/src/shell/switchView.d.ts.map +1 -0
  307. package/dist/src/shell/switchView.js +19 -0
  308. package/dist/src/shell/switchView.js.map +1 -0
  309. package/dist/src/shell/treeSearch.d.ts +35 -0
  310. package/dist/src/shell/treeSearch.d.ts.map +1 -0
  311. package/dist/src/shell/treeSearch.js +60 -0
  312. package/dist/src/shell/treeSearch.js.map +1 -0
  313. package/dist/src/shell/useComponentDocs.d.ts +16 -0
  314. package/dist/src/shell/useComponentDocs.d.ts.map +1 -0
  315. package/dist/src/shell/useComponentDocs.js +25 -0
  316. package/dist/src/shell/useComponentDocs.js.map +1 -0
  317. package/dist/src/shell/useCopy.d.ts +10 -0
  318. package/dist/src/shell/useCopy.d.ts.map +1 -0
  319. package/dist/src/shell/useCopy.js +23 -0
  320. package/dist/src/shell/useCopy.js.map +1 -0
  321. package/dist/src/shell/useFrameMessages.d.ts +54 -0
  322. package/dist/src/shell/useFrameMessages.d.ts.map +1 -0
  323. package/dist/src/shell/useFrameMessages.js +90 -0
  324. package/dist/src/shell/useFrameMessages.js.map +1 -0
  325. package/dist/src/shell/useFrameQueue.d.ts +29 -0
  326. package/dist/src/shell/useFrameQueue.d.ts.map +1 -0
  327. package/dist/src/shell/useFrameQueue.js +72 -0
  328. package/dist/src/shell/useFrameQueue.js.map +1 -0
  329. package/dist/src/shell/useLiveView.d.ts +29 -0
  330. package/dist/src/shell/useLiveView.d.ts.map +1 -0
  331. package/dist/src/shell/useLiveView.js +51 -0
  332. package/dist/src/shell/useLiveView.js.map +1 -0
  333. package/dist/src/shell/useLoaded.d.ts +20 -0
  334. package/dist/src/shell/useLoaded.d.ts.map +1 -0
  335. package/dist/src/shell/useLoaded.js +40 -0
  336. package/dist/src/shell/useLoaded.js.map +1 -0
  337. package/dist/src/shell/usePageDoc.d.ts +20 -0
  338. package/dist/src/shell/usePageDoc.d.ts.map +1 -0
  339. package/dist/src/shell/usePageDoc.js +21 -0
  340. package/dist/src/shell/usePageDoc.js.map +1 -0
  341. package/dist/src/shell/usePopover.d.ts +23 -0
  342. package/dist/src/shell/usePopover.d.ts.map +1 -0
  343. package/dist/src/shell/usePopover.js +39 -0
  344. package/dist/src/shell/usePopover.js.map +1 -0
  345. package/dist/src/shell/useRecentPages.d.ts +21 -0
  346. package/dist/src/shell/useRecentPages.d.ts.map +1 -0
  347. package/dist/src/shell/useRecentPages.js +62 -0
  348. package/dist/src/shell/useRecentPages.js.map +1 -0
  349. package/dist/src/shell/useScrollMemory.d.ts +40 -0
  350. package/dist/src/shell/useScrollMemory.d.ts.map +1 -0
  351. package/dist/src/shell/useScrollMemory.js +69 -0
  352. package/dist/src/shell/useScrollMemory.js.map +1 -0
  353. package/dist/src/shell/useSidebarLayout.d.ts +14 -0
  354. package/dist/src/shell/useSidebarLayout.d.ts.map +1 -0
  355. package/dist/src/shell/useSidebarLayout.js +19 -0
  356. package/dist/src/shell/useSidebarLayout.js.map +1 -0
  357. package/dist/src/shell/useStored.d.ts +11 -0
  358. package/dist/src/shell/useStored.d.ts.map +1 -0
  359. package/dist/src/shell/useStored.js +68 -0
  360. package/dist/src/shell/useStored.js.map +1 -0
  361. package/dist/src/shell/useStoryCode.d.ts +14 -0
  362. package/dist/src/shell/useStoryCode.d.ts.map +1 -0
  363. package/dist/src/shell/useStoryCode.js +29 -0
  364. package/dist/src/shell/useStoryCode.js.map +1 -0
  365. package/dist/src/shell/useStoryHeights.d.ts +9 -0
  366. package/dist/src/shell/useStoryHeights.d.ts.map +1 -0
  367. package/dist/src/shell/useStoryHeights.js +31 -0
  368. package/dist/src/shell/useStoryHeights.js.map +1 -0
  369. package/dist/src/shell/useStoryIdsElement.d.ts +7 -0
  370. package/dist/src/shell/useStoryIdsElement.d.ts.map +1 -0
  371. package/dist/src/shell/useStoryIdsElement.js +29 -0
  372. package/dist/src/shell/useStoryIdsElement.js.map +1 -0
  373. package/dist/src/shell/useStoryKeys.d.ts +11 -0
  374. package/dist/src/shell/useStoryKeys.d.ts.map +1 -0
  375. package/dist/src/shell/useStoryKeys.js +40 -0
  376. package/dist/src/shell/useStoryKeys.js.map +1 -0
  377. package/dist/src/shell/useSystemDark.d.ts +3 -0
  378. package/dist/src/shell/useSystemDark.d.ts.map +1 -0
  379. package/dist/src/shell/useSystemDark.js +19 -0
  380. package/dist/src/shell/useSystemDark.js.map +1 -0
  381. package/dist/src/sourceFiles.d.ts +18 -0
  382. package/dist/src/sourceFiles.d.ts.map +1 -0
  383. package/dist/src/sourceFiles.js +22 -0
  384. package/dist/src/sourceFiles.js.map +1 -0
  385. package/dist/src/storyBackground.d.ts +21 -0
  386. package/dist/src/storyBackground.d.ts.map +1 -0
  387. package/dist/src/storyBackground.js +27 -0
  388. package/dist/src/storyBackground.js.map +1 -0
  389. package/dist/src/storyClock.d.ts +62 -0
  390. package/dist/src/storyClock.d.ts.map +1 -0
  391. package/dist/src/storyClock.js +51 -0
  392. package/dist/src/storyClock.js.map +1 -0
  393. package/dist/src/storyGlobals.d.ts +60 -0
  394. package/dist/src/storyGlobals.d.ts.map +1 -0
  395. package/dist/src/storyGlobals.js +117 -0
  396. package/dist/src/storyGlobals.js.map +1 -0
  397. package/dist/src/storyHeights.d.ts +37 -0
  398. package/dist/src/storyHeights.d.ts.map +1 -0
  399. package/dist/src/storyHeights.js +53 -0
  400. package/dist/src/storyHeights.js.map +1 -0
  401. package/dist/src/storyIdsElement.d.ts +9 -0
  402. package/dist/src/storyIdsElement.d.ts.map +1 -0
  403. package/dist/src/storyIdsElement.js +9 -0
  404. package/dist/src/storyIdsElement.js.map +1 -0
  405. package/dist/src/storyTexts.d.ts +43 -0
  406. package/dist/src/storyTexts.d.ts.map +1 -0
  407. package/dist/src/storyTexts.js +71 -0
  408. package/dist/src/storyTexts.js.map +1 -0
  409. package/dist/src/storyTree.d.ts +215 -0
  410. package/dist/src/storyTree.d.ts.map +1 -0
  411. package/dist/src/storyTree.js +308 -0
  412. package/dist/src/storyTree.js.map +1 -0
  413. package/dist/src/switches.d.ts +156 -0
  414. package/dist/src/switches.d.ts.map +1 -0
  415. package/dist/src/switches.js +193 -0
  416. package/dist/src/switches.js.map +1 -0
  417. package/dist/src/viewState.d.ts +194 -0
  418. package/dist/src/viewState.d.ts.map +1 -0
  419. package/dist/src/viewState.js +303 -0
  420. package/dist/src/viewState.js.map +1 -0
  421. package/dist/src/vite/adapter.d.ts +70 -0
  422. package/dist/src/vite/adapter.d.ts.map +1 -0
  423. package/dist/src/vite/adapter.js +22 -0
  424. package/dist/src/vite/adapter.js.map +1 -0
  425. package/dist/src/vite/autoTitle.d.ts +28 -0
  426. package/dist/src/vite/autoTitle.d.ts.map +1 -0
  427. package/dist/src/vite/autoTitle.js +44 -0
  428. package/dist/src/vite/autoTitle.js.map +1 -0
  429. package/dist/src/vite/componentPage.d.ts +34 -0
  430. package/dist/src/vite/componentPage.d.ts.map +1 -0
  431. package/dist/src/vite/componentPage.js +94 -0
  432. package/dist/src/vite/componentPage.js.map +1 -0
  433. package/dist/src/vite/config.d.ts +72 -0
  434. package/dist/src/vite/config.d.ts.map +1 -0
  435. package/dist/src/vite/config.js +25 -0
  436. package/dist/src/vite/config.js.map +1 -0
  437. package/dist/src/vite/configFile.d.ts +76 -0
  438. package/dist/src/vite/configFile.d.ts.map +1 -0
  439. package/dist/src/vite/configFile.js +190 -0
  440. package/dist/src/vite/configFile.js.map +1 -0
  441. package/dist/src/vite/docsExtractor.d.ts +46 -0
  442. package/dist/src/vite/docsExtractor.d.ts.map +1 -0
  443. package/dist/src/vite/docsExtractor.js +88 -0
  444. package/dist/src/vite/docsExtractor.js.map +1 -0
  445. package/dist/src/vite/docsProgram.d.ts +42 -0
  446. package/dist/src/vite/docsProgram.d.ts.map +1 -0
  447. package/dist/src/vite/docsProgram.js +144 -0
  448. package/dist/src/vite/docsProgram.js.map +1 -0
  449. package/dist/src/vite/docsWorker.d.ts +2 -0
  450. package/dist/src/vite/docsWorker.d.ts.map +1 -0
  451. package/dist/src/vite/docsWorker.js +68 -0
  452. package/dist/src/vite/docsWorker.js.map +1 -0
  453. package/dist/src/vite/forcedStates.d.ts +27 -0
  454. package/dist/src/vite/forcedStates.d.ts.map +1 -0
  455. package/dist/src/vite/forcedStates.js +60 -0
  456. package/dist/src/vite/forcedStates.js.map +1 -0
  457. package/dist/src/vite/forgebookPlugin.d.ts +28 -0
  458. package/dist/src/vite/forgebookPlugin.d.ts.map +1 -0
  459. package/dist/src/vite/forgebookPlugin.js +375 -0
  460. package/dist/src/vite/forgebookPlugin.js.map +1 -0
  461. package/dist/src/vite/highlightCode.d.ts +16 -0
  462. package/dist/src/vite/highlightCode.d.ts.map +1 -0
  463. package/dist/src/vite/highlightCode.js +82 -0
  464. package/dist/src/vite/highlightCode.js.map +1 -0
  465. package/dist/src/vite/indexStoryFile.d.ts +35 -0
  466. package/dist/src/vite/indexStoryFile.d.ts.map +1 -0
  467. package/dist/src/vite/indexStoryFile.js +458 -0
  468. package/dist/src/vite/indexStoryFile.js.map +1 -0
  469. package/dist/src/vite/pages.d.ts +49 -0
  470. package/dist/src/vite/pages.d.ts.map +1 -0
  471. package/dist/src/vite/pages.js +171 -0
  472. package/dist/src/vite/pages.js.map +1 -0
  473. package/dist/src/vite/prebundled.d.ts +30 -0
  474. package/dist/src/vite/prebundled.d.ts.map +1 -0
  475. package/dist/src/vite/prebundled.js +81 -0
  476. package/dist/src/vite/prebundled.js.map +1 -0
  477. package/dist/src/vite/storyCode.d.ts +28 -0
  478. package/dist/src/vite/storyCode.d.ts.map +1 -0
  479. package/dist/src/vite/storyCode.js +80 -0
  480. package/dist/src/vite/storyCode.js.map +1 -0
  481. package/dist/src/vite/storyFilesModule.d.ts +17 -0
  482. package/dist/src/vite/storyFilesModule.d.ts.map +1 -0
  483. package/dist/src/vite/storyFilesModule.js +64 -0
  484. package/dist/src/vite/storyFilesModule.js.map +1 -0
  485. package/dist/src/vite/storyMeta.d.ts +34 -0
  486. package/dist/src/vite/storyMeta.d.ts.map +1 -0
  487. package/dist/src/vite/storyMeta.js +74 -0
  488. package/dist/src/vite/storyMeta.js.map +1 -0
  489. package/dist/src/vite/typeScriptPieces.d.ts +23 -0
  490. package/dist/src/vite/typeScriptPieces.d.ts.map +1 -0
  491. package/dist/src/vite/typeScriptPieces.js +236 -0
  492. package/dist/src/vite/typeScriptPieces.js.map +1 -0
  493. package/package.json +202 -3
@@ -0,0 +1,458 @@
1
+ /**
2
+ * A story file's index, read from its source without running it: the meta's title and the stories with their names,
3
+ * as Forgebook's and Storybook's files write them.
4
+ *
5
+ * @remarks
6
+ * The sidebar lists every story before any is loaded, so the index comes from the code itself, parsed with Vite's
7
+ * parser (the same files Vite compiles). It reads a meta written inline or as a constant (`export default meta`), a
8
+ * story as an object (CSF 3) or as a function with its properties assigned after it (CSF 2: `A.storyName`,
9
+ * `A.parameters`), named exports and re-exports (`export { A as B }`), `includeStories`, `excludeStories`,
10
+ * `__namedExportsOrder`, the meta's and the stories' `tags`, the TSDoc above a story, and `parameters.docs.description`.
11
+ *
12
+ * A value the index needs (the title, a name, `parameters.controls`, `group`, `height`, `main`, the meta's `alsoIn`,
13
+ * `related`, `keywords`) is read when written plainly; written by code, it is left to the frame, which reads it when
14
+ * the story loads. A title written by code, or none, is the file's path (`autoTitle`, as Storybook's auto-title); one
15
+ * written by code is also noted, since the author meant another. A value written plainly but wrongly
16
+ * (`controls: true`) is a problem. Pure: text in, index or problem out.
17
+ *
18
+ * @module
19
+ */
20
+ import { parseSync } from "vite";
21
+ /** An expression without the TypeScript wrappers a meta is often written with (`satisfies Meta<…>`, `as Meta`). */
22
+ const unwrapped = (expression) => {
23
+ if (expression.type === "TSSatisfiesExpression" ||
24
+ expression.type === "TSAsExpression" ||
25
+ expression.type === "ParenthesizedExpression") {
26
+ return unwrapped(expression.expression);
27
+ }
28
+ return expression;
29
+ };
30
+ /** A property key's name: an identifier's or a literal's; `undefined` for any other key. */
31
+ const keyName = (key) => {
32
+ if (key.type === "Identifier")
33
+ return key.name;
34
+ return key.type === "Literal" ? String(key.value) : undefined;
35
+ };
36
+ /** A property's value expression, by the property's name (an identifier or a string key). */
37
+ const propertyValue = (object, name) => {
38
+ for (const property of object.properties) {
39
+ if (property.type !== "Property" || property.computed)
40
+ continue;
41
+ if (keyName(property.key) === name)
42
+ return unwrapped(property.value);
43
+ }
44
+ return undefined;
45
+ };
46
+ /** An object's fields. */
47
+ const objectFields = (object) => (name) => propertyValue(object, name);
48
+ /** Whether an expression is written plainly: a literal, or a list of literals; anything else is written by code. */
49
+ const isPlain = (expression) => expression.type === "Literal" ||
50
+ (expression.type === "ArrayExpression" &&
51
+ expression.elements.every((element) => element !== null && element.type === "Literal"));
52
+ /** A field's value when it is a plain string; `undefined` when it is missing or written by code. */
53
+ const stringField = (fields, name) => {
54
+ const value = fields(name);
55
+ return value?.type === "Literal" && typeof value.value === "string" ? value.value : undefined;
56
+ };
57
+ /** A field of the `parameters` object, when the fields write one as an object. */
58
+ const parameter = (fields, name) => {
59
+ const parameters = fields("parameters");
60
+ return parameters?.type === "ObjectExpression" ? propertyValue(parameters, name) : undefined;
61
+ };
62
+ /** Why `parameters.controls` cannot be read. */
63
+ const CONTROLS_PROBLEM = "`parameters.controls` must be written as `false` or a list of plain strings";
64
+ /**
65
+ * `parameters.controls`: `undefined` when none or written by code, `[]` for `false`, the names of a list, or a
66
+ * problem when written plainly but wrongly.
67
+ */
68
+ const controlsOf = (fields) => {
69
+ const controls = parameter(fields, "controls");
70
+ if (controls === undefined || !isPlain(controls))
71
+ return undefined;
72
+ if (controls.type === "Literal" && controls.value === false)
73
+ return [];
74
+ if (controls.type !== "ArrayExpression")
75
+ return new Error(CONTROLS_PROBLEM);
76
+ const names = controls.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
77
+ return names.length === controls.elements.length ? names : new Error(CONTROLS_PROBLEM);
78
+ };
79
+ /** A list of plain strings: `undefined` when none or written by code, the strings, or a problem when it is wrong. */
80
+ const stringListOf = (fields, name) => {
81
+ const list = fields(name);
82
+ if (list === undefined || !isPlain(list))
83
+ return undefined;
84
+ if (list.type !== "ArrayExpression")
85
+ return new Error(`\`${name}\` must be written as a list of plain strings`);
86
+ const strings = list.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
87
+ return strings.length === list.elements.length
88
+ ? strings
89
+ : new Error(`\`${name}\` must be written as a list of plain strings`);
90
+ };
91
+ /** `parameters.group`: `undefined` when none or written by code, the group, or a problem when it is wrong. */
92
+ const groupOf = (fields) => {
93
+ const group = parameter(fields, "group");
94
+ if (group === undefined || !isPlain(group))
95
+ return undefined;
96
+ if (group.type === "Literal" && typeof group.value === "string" && group.value !== "")
97
+ return group.value;
98
+ return new Error("`parameters.group` must be written as a plain string");
99
+ };
100
+ /** `parameters.height`: `undefined` when none or written by code, the height in CSS px, or a problem when wrong. */
101
+ const heightOf = (fields) => {
102
+ const height = parameter(fields, "height");
103
+ if (height === undefined || !isPlain(height))
104
+ return undefined;
105
+ if (height.type === "Literal" && typeof height.value === "number" && height.value > 0)
106
+ return height.value;
107
+ return new Error("`parameters.height` must be written as a plain positive number of CSS px");
108
+ };
109
+ /** `parameters.docs.description.<kind>`, when written as a plain string. */
110
+ const docsDescription = (fields, kind) => {
111
+ const docs = parameter(fields, "docs");
112
+ const description = docs?.type === "ObjectExpression" ? propertyValue(docs, "description") : undefined;
113
+ if (description?.type !== "ObjectExpression")
114
+ return undefined;
115
+ const text = propertyValue(description, kind);
116
+ return text?.type === "Literal" && typeof text.value === "string" ? text.value : undefined;
117
+ };
118
+ /**
119
+ * The first sentence of the TSDoc right above a statement, without its tags; `undefined` when there is none.
120
+ *
121
+ * @param text - the file's source.
122
+ * @param comments - the file's comments.
123
+ * @param start - where the statement starts.
124
+ */
125
+ const leadingSentence = (text, comments, start) => {
126
+ const comment = comments.find((candidate) => candidate.type === "Block" &&
127
+ candidate.value.startsWith("*") &&
128
+ candidate.end <= start &&
129
+ text.slice(candidate.end, start).trim() === "");
130
+ if (comment === undefined)
131
+ return undefined;
132
+ const prose = comment.value
133
+ .split("\n")
134
+ .map((line) => line.replace(/^\s*\*?\s?/, ""))
135
+ .filter((line) => !line.startsWith("@"))
136
+ .join(" ")
137
+ .replace(/\s+/g, " ")
138
+ .trim();
139
+ const sentence = /^(.+?[.!?])(\s|$)/.exec(prose)?.[1] ?? prose;
140
+ return sentence === "" ? undefined : sentence;
141
+ };
142
+ /**
143
+ * Tags as Storybook combines them: the meta's, then the story's, a `!name` taking `name` away.
144
+ *
145
+ * @param lists - the tag lists, outermost first.
146
+ */
147
+ const combinedTags = (lists) => {
148
+ const tags = new Set();
149
+ for (const tag of lists.flatMap((list) => list ?? [])) {
150
+ if (tag.startsWith("!")) {
151
+ tags.delete(tag.slice(1));
152
+ tags.add(tag);
153
+ }
154
+ else {
155
+ tags.delete(`!${tag}`);
156
+ tags.add(tag);
157
+ }
158
+ }
159
+ return [...tags];
160
+ };
161
+ /**
162
+ * What the index reads of one story: its name (`name`, or CSF 2's `storyName`), controls, group, height, whether it is
163
+ * the demo, and its tags under the meta's.
164
+ *
165
+ * @param fields - the story's fields.
166
+ * @param metaTags - the meta's tags.
167
+ */
168
+ const storyFields = (fields, metaTags) => {
169
+ const name = stringField(fields, "name") ?? stringField(fields, "storyName");
170
+ const controls = controlsOf(fields);
171
+ if (controls instanceof Error)
172
+ return controls;
173
+ const group = groupOf(fields);
174
+ if (group instanceof Error)
175
+ return group;
176
+ const height = heightOf(fields);
177
+ if (height instanceof Error)
178
+ return height;
179
+ const ownTags = stringListOf(fields, "tags");
180
+ if (ownTags instanceof Error)
181
+ return ownTags;
182
+ const tags = combinedTags([metaTags, ownTags]);
183
+ const main = parameter(fields, "main");
184
+ return {
185
+ ...(name === undefined ? {} : { name }),
186
+ ...(controls === undefined ? {} : { controls }),
187
+ ...(group === undefined ? {} : { group }),
188
+ ...(height === undefined ? {} : { height }),
189
+ ...(main?.type === "Literal" && main.value === true ? { isMain: true } : {}),
190
+ ...(tags.length > 0 ? { tags } : {})
191
+ };
192
+ };
193
+ /** Whether an expression binds a template into a story function (`Template.bind({})`). */
194
+ const isBoundTemplate = (value) => value.type === "CallExpression" &&
195
+ value.callee.type === "MemberExpression" &&
196
+ value.callee.property.type === "Identifier" &&
197
+ value.callee.property.name === "bind";
198
+ /**
199
+ * The property a top-level statement assigns to a name, when it assigns one.
200
+ *
201
+ * @param statement - the statement.
202
+ */
203
+ const assignedProperty = (statement) => {
204
+ if (statement.type !== "ExpressionStatement")
205
+ return undefined;
206
+ const { expression } = statement;
207
+ if (expression.type !== "AssignmentExpression" || expression.left.type !== "MemberExpression")
208
+ return undefined;
209
+ const { object, property } = expression.left;
210
+ if (object.type !== "Identifier" || property.type !== "Identifier")
211
+ return undefined;
212
+ return { name: object.name, property: property.name, value: unwrapped(expression.right) };
213
+ };
214
+ /**
215
+ * The names a top-level statement declares, exported or not: its constants with a value, its function.
216
+ *
217
+ * @param statement - the statement.
218
+ */
219
+ const declaredBy = (statement) => {
220
+ const declaration = statement.type === "ExportNamedDeclaration" ? statement.declaration : statement;
221
+ if (declaration?.type === "FunctionDeclaration" && declaration.id !== null)
222
+ return [{ kind: "function", name: declaration.id.name, value: declaration }];
223
+ if (declaration?.type !== "VariableDeclaration")
224
+ return [];
225
+ return declaration.declarations.flatMap(({ id, init }) => id.type === "Identifier" && init !== null
226
+ ? [{ kind: "value", name: id.name, value: unwrapped(init) }]
227
+ : []);
228
+ };
229
+ /**
230
+ * The file's top level: its constants and functions, exported or not, and the properties assigned to them.
231
+ *
232
+ * @param program - the parsed file.
233
+ */
234
+ const topLevelOf = (program) => {
235
+ const values = new Map();
236
+ const functions = new Map();
237
+ const assigned = new Map();
238
+ for (const statement of program.body) {
239
+ for (const declared of declaredBy(statement)) {
240
+ if (declared.kind === "value")
241
+ values.set(declared.name, declared.value);
242
+ else
243
+ functions.set(declared.name, declared.value);
244
+ }
245
+ const property = assignedProperty(statement);
246
+ if (property === undefined)
247
+ continue;
248
+ const properties = assigned.get(property.name) ?? new Map();
249
+ properties.set(property.property, property.value);
250
+ assigned.set(property.name, properties);
251
+ }
252
+ return { values, functions, assigned };
253
+ };
254
+ /**
255
+ * A story's source and fields, by the local name its export points at.
256
+ *
257
+ * @param top - the file's top level.
258
+ * @param local - the local name.
259
+ */
260
+ const storyOf = (top, local) => {
261
+ const value = top.values.get(local);
262
+ const isStory = value !== undefined &&
263
+ (value.type === "ObjectExpression" ||
264
+ value.type === "ArrowFunctionExpression" ||
265
+ value.type === "FunctionExpression" ||
266
+ isBoundTemplate(value));
267
+ const node = isStory ? value : top.functions.get(local);
268
+ const properties = top.assigned.get(local);
269
+ const fields = node?.type === "ObjectExpression"
270
+ ? objectFields(node)
271
+ : (name) => properties?.get(name);
272
+ return { node, fields };
273
+ };
274
+ /**
275
+ * The file's named exports, in their order: declared ones and re-exports of local names (`export { A as B }`), never
276
+ * an export from another file.
277
+ *
278
+ * @param program - the parsed file.
279
+ */
280
+ const namedExports = (program) => program.body.flatMap((statement) => {
281
+ if (statement.type !== "ExportNamedDeclaration" || statement.source !== null)
282
+ return [];
283
+ const { declaration } = statement;
284
+ if (declaration?.type === "VariableDeclaration") {
285
+ return declaration.declarations.flatMap((declarator) => declarator.id.type === "Identifier"
286
+ ? [{ exportName: declarator.id.name, local: declarator.id.name, start: statement.start }]
287
+ : []);
288
+ }
289
+ if (declaration?.type === "FunctionDeclaration" && declaration.id !== null)
290
+ return [{ exportName: declaration.id.name, local: declaration.id.name, start: statement.start }];
291
+ return statement.specifiers.flatMap((specifier) => specifier.local.type === "Identifier" && specifier.exported.type === "Identifier"
292
+ ? [{ exportName: specifier.exported.name, local: specifier.local.name, start: statement.start }]
293
+ : []);
294
+ });
295
+ /**
296
+ * Whether an export is a story, as the meta's `includeStories` and `excludeStories` say (a list of names or a regular
297
+ * expression, written plainly).
298
+ *
299
+ * @param meta - the meta's fields.
300
+ * @param exportName - the export.
301
+ */
302
+ const isIncluded = (meta, exportName) => {
303
+ const matches = (name) => {
304
+ const filter = meta(name);
305
+ if (filter?.type === "ArrayExpression")
306
+ return filter.elements.some((element) => element?.type === "Literal" && element.value === exportName);
307
+ if (filter?.type === "Literal" && "regex" in filter && filter.regex !== undefined)
308
+ return new RegExp(filter.regex.pattern, filter.regex.flags).test(exportName);
309
+ return undefined;
310
+ };
311
+ return matches("includeStories") !== false && matches("excludeStories") !== true;
312
+ };
313
+ /**
314
+ * The order `__namedExportsOrder` writes, when the file writes one plainly.
315
+ *
316
+ * @param top - the file's top level.
317
+ */
318
+ const exportsOrder = (top) => {
319
+ const order = top.values.get("__namedExportsOrder");
320
+ if (order?.type !== "ArrayExpression")
321
+ return undefined;
322
+ return order.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
323
+ };
324
+ /**
325
+ * The meta's object: the default export, inline or a constant of the file (`export default meta`).
326
+ *
327
+ * @param program - the parsed file.
328
+ * @param top - the file's top level.
329
+ */
330
+ const metaObject = (program, top) => {
331
+ const meta = program.body.find((statement) => statement.type === "ExportDefaultDeclaration");
332
+ if (meta === undefined)
333
+ return undefined;
334
+ const { declaration } = meta;
335
+ if (declaration.type === "FunctionDeclaration" ||
336
+ declaration.type === "ClassDeclaration" ||
337
+ declaration.type === "TSInterfaceDeclaration")
338
+ return undefined;
339
+ const expression = unwrapped(declaration);
340
+ const value = expression.type === "Identifier" ? top.values.get(expression.name) : expression;
341
+ return value?.type === "ObjectExpression" ? value : undefined;
342
+ };
343
+ /** The meta's lists of plain strings (`alsoIn`, `related`, `keywords`), each only when set, or the first problem. */
344
+ const metaListsOf = (meta) => {
345
+ const lists = {};
346
+ for (const name of ["alsoIn", "related", "keywords"]) {
347
+ const list = stringListOf(meta, name);
348
+ if (list instanceof Error)
349
+ return list;
350
+ if (list !== undefined)
351
+ lists[name] = list;
352
+ }
353
+ return lists;
354
+ };
355
+ /**
356
+ * The meta's title and the note to give with it: the title written plainly; the file's path for none; the path, with
357
+ * a note, for a title written by code.
358
+ *
359
+ * @param meta - the meta's fields.
360
+ * @param options - the title the file's path makes.
361
+ */
362
+ const titleOf = (meta, options) => {
363
+ const written = meta("title");
364
+ if (written?.type === "Literal" && typeof written.value === "string")
365
+ return { title: written.value, notes: [] };
366
+ if (options.autoTitle === undefined)
367
+ return "the meta's title must be a plain string (or the file must sit where its path makes one)";
368
+ if (written === undefined)
369
+ return { title: options.autoTitle, notes: [] };
370
+ return {
371
+ title: options.autoTitle,
372
+ notes: [`its title is written by code, so it is placed by its path as "${options.autoTitle}"`]
373
+ };
374
+ };
375
+ /**
376
+ * The meta's fields besides its title and stories, or the first problem.
377
+ *
378
+ * @param meta - the meta's fields.
379
+ */
380
+ const metaFieldsOf = (meta) => {
381
+ const controls = controlsOf(meta);
382
+ if (controls instanceof Error)
383
+ return controls;
384
+ const height = heightOf(meta);
385
+ if (height instanceof Error)
386
+ return height;
387
+ const lists = metaListsOf(meta);
388
+ if (lists instanceof Error)
389
+ return lists;
390
+ const description = docsDescription(meta, "component");
391
+ return {
392
+ ...(controls === undefined ? {} : { controls }),
393
+ ...(height === undefined ? {} : { height }),
394
+ ...lists,
395
+ ...(description === undefined ? {} : { description })
396
+ };
397
+ };
398
+ /**
399
+ * The exports that are stories, in the order of `__namedExportsOrder` when the file writes one, else of the file.
400
+ *
401
+ * @param program - the parsed file.
402
+ * @param top - the file's top level.
403
+ * @param meta - the meta's fields, for `includeStories` and `excludeStories`.
404
+ */
405
+ const storyExports = (program, top, meta) => {
406
+ const exported = namedExports(program).filter(({ exportName }) => exportName !== "__namedExportsOrder" && isIncluded(meta, exportName));
407
+ const order = exportsOrder(top);
408
+ if (order === undefined)
409
+ return exported;
410
+ const rank = (name) => (order.includes(name) ? order.indexOf(name) : order.length);
411
+ return [...exported].sort((first, second) => rank(first.exportName) - rank(second.exportName));
412
+ };
413
+ /**
414
+ * The index of one story file.
415
+ *
416
+ * @param file - the file's path, for the parser (its extension decides TypeScript and JSX) and the messages.
417
+ * @param text - the file's source.
418
+ * @param options - the title the file's path makes, for a meta that writes none.
419
+ * @returns the title and the stories, or a message saying why the file cannot be indexed.
420
+ */
421
+ export const indexStoryFile = (file, text, options = {}) => {
422
+ const { program, comments, errors } = parseSync(file, text);
423
+ const [error] = errors;
424
+ if (error !== undefined)
425
+ return `${file} does not parse: ${error.message}`;
426
+ const top = topLevelOf(program);
427
+ const metaNode = metaObject(program, top);
428
+ if (metaNode === undefined)
429
+ return `${file} has no meta: the default export is an object (CSF)`;
430
+ const meta = objectFields(metaNode);
431
+ const title = titleOf(meta, options);
432
+ if (typeof title === "string")
433
+ return `${file}: ${title}`;
434
+ const metaTags = stringListOf(meta, "tags");
435
+ if (metaTags instanceof Error)
436
+ return `${file}: the meta's ${metaTags.message}`;
437
+ const stories = [];
438
+ for (const { exportName, local, start } of storyExports(program, top, meta)) {
439
+ const story = storyOf(top, local);
440
+ if (story.node === undefined)
441
+ continue;
442
+ const fields = storyFields(story.fields, metaTags);
443
+ if (fields instanceof Error)
444
+ return `${file}: story ${exportName}: ${fields.message}`;
445
+ const description = leadingSentence(text, comments, start) ?? docsDescription(story.fields, "story");
446
+ stories.push({ exportName, ...fields, ...(description === undefined ? {} : { description }) });
447
+ }
448
+ const metaFields = metaFieldsOf(meta);
449
+ if (metaFields instanceof Error)
450
+ return `${file}: the meta's ${metaFields.message}`;
451
+ return {
452
+ title: title.title,
453
+ stories,
454
+ ...metaFields,
455
+ ...(title.notes.length > 0 ? { notes: title.notes } : {})
456
+ };
457
+ };
458
+ //# sourceMappingURL=indexStoryFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexStoryFile.js","sourceRoot":"","sources":["../../../src/vite/indexStoryFile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAe,SAAS,EAAE,MAAM,MAAM,CAAC;AAW9C,mHAAmH;AACnH,MAAM,SAAS,GAAG,CAAC,UAA6B,EAAqB,EAAE;IACrE,IACE,UAAU,CAAC,IAAI,KAAK,uBAAuB;QAC3C,UAAU,CAAC,IAAI,KAAK,gBAAgB;QACpC,UAAU,CAAC,IAAI,KAAK,yBAAyB,EAC7C,CAAC;QACD,OAAO,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,4FAA4F;AAC5F,MAAM,OAAO,GAAG,CAAC,GAAuB,EAAsB,EAAE;IAC9D,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC;IAC/C,OAAO,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAChE,CAAC,CAAC;AAEF,6FAA6F;AAC7F,MAAM,aAAa,GAAG,CAAC,MAA+B,EAAE,IAAY,EAAiC,EAAE;I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AM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAClC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,SAAS;QACvC,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,YAAY,KAAK;YAAE,OAAO,GAAG,IAAI,WAAW,UAAU,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;QACtF,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACrG,OAAO,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,UAAU,YAAY,KAAK;QAAE,OAAO,GAAG,IAAI,gBAAgB,UAAU,CAAC,OAAO,EAAE,CAAC;IACpF,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO;QACP,GAAG,UAAU;QACb,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { type ResolvedConfig } from "./configFile.ts";
2
+ /** The pages, by their file name. */
3
+ export declare const PAGE_FILES: readonly ["index.html", "frame.html"];
4
+ /** A page's file name. */
5
+ export type PageFile = (typeof PAGE_FILES)[number];
6
+ /** The module the pages read the configuration's data from. */
7
+ export declare const CONFIG_MODULE = "virtual:forgebook/config";
8
+ /**
9
+ * The entries the pages load, by page: file names in the configuration's folder, never written to disk. Named as
10
+ * files rather than virtual modules because the build names a page's chunk and its style sheet after its entry, and a
11
+ * virtual module's id cannot be part of a file name.
12
+ */
13
+ export declare const PAGE_ENTRIES: Readonly<Record<PageFile, string>>;
14
+ /** The file name, in the configuration's folder, of the project's own stories' source (never written to disk). */
15
+ export declare const STORIES_SOURCE_FILE = ".forgebook-stories.ts";
16
+ /** The project's own stories' source id. */
17
+ export declare const OWN_SOURCE_ID = "stories";
18
+ /**
19
+ * A page's HTML: its title, the frame's head tags, the root the entry mounts in.
20
+ *
21
+ * @param page - the page.
22
+ * @param config - the configuration.
23
+ */
24
+ export declare const pageHtml: (page: PageFile, config: ResolvedConfig) => string;
25
+ /**
26
+ * The configuration's data, as the pages' module exports it.
27
+ *
28
+ * @param config - the configuration.
29
+ */
30
+ export declare const configModule: (config: ResolvedConfig) => string;
31
+ /**
32
+ * The shell's entry: the shell mounted with the configuration's data, the logo, the sources and the code writer.
33
+ *
34
+ * @param config - the configuration.
35
+ */
36
+ export declare const shellEntry: (config: ResolvedConfig) => string;
37
+ /**
38
+ * The frame's entry: the framework's frame mounted with the sources, the configuration's data and the previews.
39
+ *
40
+ * @param config - the configuration.
41
+ */
42
+ export declare const frameEntry: (config: ResolvedConfig) => string;
43
+ /**
44
+ * The source of the project's own stories: one `?forgebook-files` import per glob, named after the catalogue.
45
+ *
46
+ * @param config - the configuration.
47
+ */
48
+ export declare const storiesSourceModule: (config: ResolvedConfig) => string;
49
+ //# sourceMappingURL=pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/vite/pages.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE3E,qCAAqC;AACrC,eAAO,MAAM,UAAU,uCAAwC,CAAC;AAEhE,0BAA0B;AAC1B,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,+DAA+D;AAC/D,eAAO,MAAM,aAAa,6BAA6B,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAG3D,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D,4CAA4C;AAC5C,eAAO,MAAM,aAAa,YAAY,CAAC;AAUvC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,QAAQ,EAAE,QAAQ,cAAc,KAAG,MAgBpD,CAAC;AAEf;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,cAAc,KAAG,MASrD,CAAC;AAkBF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,cAAc,KAAG,MAuBnD,CAAC;AAgBF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,cAAc,KAAG,MAmBnD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,cAAc,KAAG,MAa/C,CAAC"}