forgebook 0.0.0-stage → 0.1.2

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 +114 -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 +46 -0
  249. package/dist/src/shell/StageViewport.d.ts.map +1 -0
  250. package/dist/src/shell/StageViewport.js +173 -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,215 @@
1
+ /**
2
+ * The catalogue's tree: sources, families, groups, components and their stories, built from the sources' indexes,
3
+ * with every story's id.
4
+ *
5
+ * @remarks
6
+ * A story's place comes from its file's title (`Family/Name` or `Family/Group/Name`, or Storybook's titles of any
7
+ * depth), so the sidebar needs no list kept by hand. Ids follow CSF: the title and the export name in lower-case kebab, joined by `--`, here prefixed by
8
+ * the source's id, so two packages can hold the same title. A component its meta lists in other places (`alsoIn`)
9
+ * gets an alias entry in each, and related components (`related`) name each other both ways: an alias is not
10
+ * a component, so the stories, the ids and the tests stay one per file. Pure.
11
+ *
12
+ * @module
13
+ */
14
+ import type { StoryGroup } from "@forgebook/story-format/csf";
15
+ import type { StoryBackground, StoryControlsSetting, StorySource } from "@forgebook/story-format/source";
16
+ /** One story in the tree. */
17
+ export type TreeStory = {
18
+ /** `<source>:<title>--<export>` in kebab case: the URL's `story` parameter. */
19
+ readonly id: string;
20
+ /** The name shown in the tabs. */
21
+ readonly name: string;
22
+ /** The named export. */
23
+ readonly exportName: string;
24
+ /** The props the panel can set, from the index: the story's setting, else the meta's, else every one. */
25
+ readonly controls: StoryControlsSetting;
26
+ /** Its group in the sidebar; none puts it above the groups. */
27
+ readonly group: StoryGroup | undefined;
28
+ /** What it shows and what to notice, from its TSDoc. */
29
+ readonly description: string | undefined;
30
+ /** Whether it is the component's demo (`parameters.main`). */
31
+ readonly isMain: boolean;
32
+ /** The height its scene needs, in CSS px: its own `parameters.height`, else the meta's; none by default. */
33
+ readonly height: number | undefined;
34
+ /** Its tags, the meta's and its own (`!dev` keeps it out of the lists, `!test` out of the generated tests). */
35
+ readonly tags: readonly string[];
36
+ };
37
+ /** One component (one story file). */
38
+ export type TreeComponent = {
39
+ /** The last segment of the title (`Select`). */
40
+ readonly name: string;
41
+ /** The whole title (`Inputs/Selection/Select`). */
42
+ readonly title: string;
43
+ /** The story file, a key of the source's `index` and `stories`. */
44
+ readonly file: string;
45
+ /** Its stories the catalogue lists (the sidebar's count, the picker, the page), in the order of the file. */
46
+ readonly stories: readonly TreeStory[];
47
+ /**
48
+ * Its stories tagged `!dev`, as Storybook's: listed nowhere, still opened by their address and tested; empty when
49
+ * none.
50
+ */
51
+ readonly unlisted: readonly TreeStory[];
52
+ /** The other places it is listed in, as the meta writes them (`Data/Tables`); empty when none. */
53
+ readonly alsoIn: readonly string[];
54
+ /**
55
+ * The titles of its related components, both ways: those its meta names and those whose meta names it, by name.
56
+ *
57
+ */
58
+ readonly related: readonly string[];
59
+ /** Other words the search finds it by, as the meta writes them; empty when none. */
60
+ readonly keywords: readonly string[];
61
+ };
62
+ /** A group's entry for a component that lives elsewhere and is listed here too (the meta's `alsoIn`). */
63
+ export type TreeAlias = {
64
+ /** The component's name (`DataTable`). */
65
+ readonly name: string;
66
+ /** The component's title, where it lives (`Recipes/DataTable`): the entry opens that page. */
67
+ readonly title: string;
68
+ };
69
+ /** A group inside a family; `name` is `undefined` for the components whose title has no group. */
70
+ export type TreeGroup = {
71
+ /** The middle segment of the title, when it has three. */
72
+ readonly name: string | undefined;
73
+ /** Its components, alphabetically. */
74
+ readonly components: readonly TreeComponent[];
75
+ /** The components that live elsewhere and are listed here too, alphabetically; never counted as its own. */
76
+ readonly aliases: readonly TreeAlias[];
77
+ };
78
+ /** A family: the first segment of the title. */
79
+ export type TreeFamily = {
80
+ /** The family's name (`Inputs`). */
81
+ readonly name: string;
82
+ /**
83
+ * The components without a group first, then the groups in the source's order (`familyGroups`), then
84
+ * alphabetically.
85
+ */
86
+ readonly groups: readonly TreeGroup[];
87
+ };
88
+ /** A source and its families. */
89
+ export type TreeSource = {
90
+ /** The source's id. */
91
+ readonly id: string;
92
+ /** The source's name. */
93
+ readonly name: string;
94
+ /** The URL of its logo, a square image; none when the source has none. */
95
+ readonly logo: string | undefined;
96
+ /** The colour its stories' page has, by theme and contrast; none when the source gives none. */
97
+ readonly background: StoryBackground | undefined;
98
+ /** Its families, in the source's order, then alphabetically. */
99
+ readonly families: readonly TreeFamily[];
100
+ };
101
+ /** The tree, with what is wrong in the indexes (a title without a family, two files with the same title). */
102
+ export type StoryTree = {
103
+ /** Every source with stories. */
104
+ readonly sources: readonly TreeSource[];
105
+ /** One message per problem; the files concerned are left out of the tree. */
106
+ readonly problems: readonly string[];
107
+ };
108
+ /**
109
+ * A text in lower-case kebab case, as CSF writes ids: every run of other characters becomes one `-`.
110
+ *
111
+ * @param text - any text.
112
+ */
113
+ export declare const kebab: (text: string) => string;
114
+ /**
115
+ * A story's id.
116
+ *
117
+ * @param sourceId - the source's id (`acme-ui`).
118
+ * @param title - the file's title.
119
+ * @param exportName - the story's export.
120
+ */
121
+ export declare const storyId: (sourceId: string, title: string, exportName: string) => string;
122
+ /**
123
+ * A component's id: its source and title, the part of its stories' ids before `--`.
124
+ *
125
+ * @param sourceId - the source's id (`acme-ui`).
126
+ * @param title - the file's title.
127
+ */
128
+ export declare const componentId: (sourceId: string, title: string) => string;
129
+ /**
130
+ * A story's name from its export, in sentence case: `KeyboardOpen` → "Keyboard open", `Size2X` → "Size 2 x".
131
+ *
132
+ * @param exportName - the named export.
133
+ */
134
+ export declare const storyName: (exportName: string) => string;
135
+ /**
136
+ * The catalogue's tree from the sources.
137
+ *
138
+ * @param sources - the sources, in the order the app lists them.
139
+ */
140
+ export declare const storyTree: (sources: readonly StorySource[]) => StoryTree;
141
+ /** Where a story sits: its source, family, group and component. */
142
+ export type StoryLocation = {
143
+ /** The source. */
144
+ readonly source: TreeSource;
145
+ /** The family. */
146
+ readonly family: TreeFamily;
147
+ /** The group. */
148
+ readonly group: TreeGroup;
149
+ /** The component. */
150
+ readonly component: TreeComponent;
151
+ /** The story. */
152
+ readonly story: TreeStory;
153
+ };
154
+ /**
155
+ * Every story of the tree with its place: each component's listed stories in the sidebar's order, then its unlisted
156
+ * ones.
157
+ *
158
+ * @param tree - the tree.
159
+ */
160
+ export declare const storyLocations: (tree: StoryTree) => StoryLocation[];
161
+ /**
162
+ * Every story the generated tests check, with its place: all but those tagged `!test`, as Storybook's test runner
163
+ * leaves them out.
164
+ *
165
+ * @param tree - the tree.
166
+ */
167
+ export declare const testedStoryLocations: (tree: StoryTree) => StoryLocation[];
168
+ /**
169
+ * Where a story sits.
170
+ *
171
+ * @param tree - the tree.
172
+ * @param id - the story's id.
173
+ * @returns its place, or `undefined` when no story has this id.
174
+ */
175
+ export declare const findStory: (tree: StoryTree, id: string) => StoryLocation | undefined;
176
+ /** Where a component sits: its source, family and group. */
177
+ export type ComponentLocation = Omit<StoryLocation, "story">;
178
+ /**
179
+ * Where a component sits.
180
+ *
181
+ * @param tree - the tree.
182
+ * @param id - the component's id (`componentId`).
183
+ * @returns its place, or `undefined` when no component has this id.
184
+ */
185
+ export declare const findComponent: (tree: StoryTree, id: string) => ComponentLocation | undefined;
186
+ /** A component's stories under one group heading in the sidebar. */
187
+ export type StoryGroupSection = {
188
+ /** The group; none for the stories above the groups. */
189
+ readonly group: StoryGroup | undefined;
190
+ /** Its stories, in the order of the file. */
191
+ readonly stories: readonly TreeStory[];
192
+ };
193
+ /**
194
+ * A component's stories by group: the ungrouped ones first, then the groups the catalogue names in its order, then
195
+ * the groups it does not name, by id; empty groups are left out.
196
+ *
197
+ * @param stories - the component's stories, in the order of the file.
198
+ * @param order - the groups the catalogue names, in their order.
199
+ */
200
+ export declare const groupedStories: (stories: readonly TreeStory[], order: readonly string[]) => StoryGroupSection[];
201
+ /**
202
+ * Every story's id in the sidebar's order: each component's stories by group, as the sidebar lists them.
203
+ *
204
+ * @param tree - the tree.
205
+ * @param order - the groups the catalogue names, in their order.
206
+ */
207
+ export declare const sidebarStoryIds: (tree: StoryTree, order: readonly string[]) => string[];
208
+ /**
209
+ * A component's demo, drawn at the top of its page: the story marked `main`, else the one named `Overview`, else its
210
+ * first.
211
+ *
212
+ * @param component - the component.
213
+ */
214
+ export declare const mainStory: (component: TreeComponent) => TreeStory | undefined;
215
+ //# sourceMappingURL=storyTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyTree.d.ts","sourceRoot":"","sources":["../../src/storyTree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EAEpB,WAAW,EACZ,MAAM,gCAAgC,CAAC;AAIxC,6BAA6B;AAC7B,MAAM,MAAM,SAAS,GAAG;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,EAAE,MAAM,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K,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;CACxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,SAAS,SAAS,EAAE,EAC7B,OAAO,SAAS,MAAM,EAAE,KACvB,iBAAiB,EAOnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAW/E,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,WAAW,aAAa,KAAG,SAAS,GAAG,SAG3C,CAAC"}
@@ -0,0 +1,308 @@
1
+ import { sourceFiles } from "./sourceFiles.js";
2
+ /**
3
+ * A text in lower-case kebab case, as CSF writes ids: every run of other characters becomes one `-`.
4
+ *
5
+ * @param text - any text.
6
+ */
7
+ export const kebab = (text) => text
8
+ .replace(/([a-z0-9])([A-Z])/g, "$1-$2")
9
+ .toLowerCase()
10
+ .replace(/[^a-z0-9]+/g, "-")
11
+ .replace(/^-|-$/g, "");
12
+ /**
13
+ * A story's id.
14
+ *
15
+ * @param sourceId - the source's id (`acme-ui`).
16
+ * @param title - the file's title.
17
+ * @param exportName - the story's export.
18
+ */
19
+ export const storyId = (sourceId, title, exportName) => `${sourceId}:${kebab(title)}--${kebab(exportName)}`;
20
+ /**
21
+ * A component's id: its source and title, the part of its stories' ids before `--`.
22
+ *
23
+ * @param sourceId - the source's id (`acme-ui`).
24
+ * @param title - the file's title.
25
+ */
26
+ export const componentId = (sourceId, title) => `${sourceId}:${kebab(title)}`;
27
+ /**
28
+ * A story's name from its export, in sentence case: `KeyboardOpen` → "Keyboard open", `Size2X` → "Size 2 x".
29
+ *
30
+ * @param exportName - the named export.
31
+ */
32
+ export const storyName = (exportName) => {
33
+ const words = exportName
34
+ .replace(/([a-z])([A-Z0-9])/g, "$1 $2")
35
+ .replace(/([0-9])([A-Za-z])/g, "$1 $2")
36
+ .replace(/_/g, " ")
37
+ .trim()
38
+ .toLowerCase();
39
+ return words.charAt(0).toUpperCase() + words.slice(1);
40
+ };
41
+ /**
42
+ * Where a title places its component, or why it cannot be placed.
43
+ *
44
+ * @remarks
45
+ * `Family/Name` and `Family/Group/Name` are Forgebook's titles. Storybook's may have any depth: one segment is a
46
+ * family with a component of the same name; past three, the segments between the family and the name make the group
47
+ * (`Atoms / Forms`), so every title of a Storybook project has a place.
48
+ *
49
+ * @param title - the meta's title.
50
+ */
51
+ const titlePlace = (title) => {
52
+ const segments = title.split("/").map((segment) => segment.trim());
53
+ if (segments.some((segment) => segment === ""))
54
+ return `"${title}" has an empty segment`;
55
+ const [family = "", ...rest] = segments;
56
+ const name = rest.at(-1) ?? family;
57
+ const between = rest.slice(0, -1);
58
+ return { family, group: between.length === 0 ? undefined : between.join(" / "), name };
59
+ };
60
+ /**
61
+ * The rank of a name in an order the source gives: its place in the list, or after every listed one.
62
+ *
63
+ * @param order - the names in their order.
64
+ * @param name - the name.
65
+ */
66
+ const rankIn = (order, name) => {
67
+ const index = order.indexOf(name);
68
+ return index === -1 ? order.length : index;
69
+ };
70
+ /**
71
+ * Compares groups: the components without a group first, then the groups in the source's order, then by name.
72
+ *
73
+ * @param order - the family's groups in the source's order (`familyGroups`); empty when it gives none.
74
+ */
75
+ const byGroup = (order) => (left, right) => {
76
+ if (left === undefined)
77
+ return right === undefined ? 0 : -1;
78
+ if (right === undefined)
79
+ return 1;
80
+ return rankIn(order, left) - rankIn(order, right) || left.localeCompare(right);
81
+ };
82
+ /** The files of one source placed by their titles; a title that cannot be placed, or is taken, is a problem. */
83
+ const placedFiles = (source, problems) => {
84
+ const placed = [];
85
+ const seenTitles = new Map();
86
+ for (const [file, entry] of Object.entries(sourceFiles(source).index)) {
87
+ for (const note of entry.notes ?? [])
88
+ problems.push(`${source.name}: ${file}: ${note}`);
89
+ const place = titlePlace(entry.title);
90
+ if (typeof place === "string") {
91
+ problems.push(`${source.name}: ${file}: ${place}`);
92
+ continue;
93
+ }
94
+ const other = seenTitles.get(entry.title);
95
+ if (other !== undefined) {
96
+ problems.push(`${source.name}: ${file} and ${other} have the same title "${entry.title}"`);
97
+ continue;
98
+ }
99
+ seenTitles.set(entry.title, file);
100
+ placed.push({ file, entry, ...place });
101
+ }
102
+ return placed;
103
+ };
104
+ /**
105
+ * Each component's related titles, both ways, by its title: a link written in one meta reaches both pages. A title
106
+ * that names no component of the source, or the component itself, is a problem.
107
+ */
108
+ const relatedTitles = (source, placed, problems) => {
109
+ const names = new Map(placed.map((file) => [file.entry.title, file.name]));
110
+ const links = new Map();
111
+ const link = (from, to) => {
112
+ links.set(from, (links.get(from) ?? new Set()).add(to));
113
+ };
114
+ for (const { file, entry } of placed) {
115
+ for (const title of entry.related ?? []) {
116
+ if (title === entry.title)
117
+ problems.push(`${source.name}: ${file} names itself as related`);
118
+ else if (!names.has(title))
119
+ problems.push(`${source.name}: ${file} names "${title}" as related: no such title`);
120
+ else {
121
+ link(entry.title, title);
122
+ link(title, entry.title);
123
+ }
124
+ }
125
+ }
126
+ return new Map([...links.entries()].map(([title, others]) => [
127
+ title,
128
+ [...others].sort((left, right) => (names.get(left) ?? left).localeCompare(names.get(right) ?? right))
129
+ ]));
130
+ };
131
+ /** The family and group a place of `alsoIn` names (`Data/Tables`, `Data`), or why it cannot be one. */
132
+ const aliasPlace = (place) => {
133
+ const segments = place.split("/").map((segment) => segment.trim());
134
+ if (segments.some((segment) => segment === ""))
135
+ return `"${place}" has an empty segment`;
136
+ const [family = "", group, ...rest] = segments;
137
+ if (rest.length > 0)
138
+ return `"${place}" is not Family or Family/Group`;
139
+ return { family, group };
140
+ };
141
+ /** A family's group as it is being built, created when it is not there yet. */
142
+ const groupAt = (families, family, group) => {
143
+ const groups = families.get(family) ?? new Map();
144
+ families.set(family, groups);
145
+ const found = groups.get(group) ?? { components: [], aliases: [] };
146
+ groups.set(group, found);
147
+ return found;
148
+ };
149
+ /**
150
+ * Lists each component in the other places its meta names, beside the components that live there. A place that is
151
+ * the component's own, or that already holds a component of the same name, is a problem.
152
+ */
153
+ const placeAliases = (source, placed, families, problems) => {
154
+ for (const { file, entry, family, group, name } of placed) {
155
+ for (const place of entry.alsoIn ?? []) {
156
+ const at = aliasPlace(place);
157
+ if (typeof at === "string") {
158
+ problems.push(`${source.name}: ${file}: also in ${at}`);
159
+ continue;
160
+ }
161
+ if (at.family === family && at.group === group) {
162
+ problems.push(`${source.name}: ${file} is also in "${place}", its own place`);
163
+ continue;
164
+ }
165
+ const target = groupAt(families, at.family, at.group);
166
+ if ([...target.components, ...target.aliases].some((other) => other.name === name)) {
167
+ problems.push(`${source.name}: ${file} is also in "${place}", which already lists a ${name}`);
168
+ continue;
169
+ }
170
+ target.aliases.push({ name, title: entry.title });
171
+ }
172
+ }
173
+ };
174
+ /** Whether a story is kept out of the catalogue's lists: tagged `!dev`, as Storybook's sidebar leaves it out. */
175
+ const isUnlisted = (story) => story.tags.includes("!dev");
176
+ /** The families of one source, from its files. */
177
+ const sourceFamilies = (source, problems) => {
178
+ const placed = placedFiles(source, problems);
179
+ const related = relatedTitles(source, placed, problems);
180
+ const families = new Map();
181
+ for (const { file, entry, family, group, name } of placed) {
182
+ const stories = entry.stories.map((story) => ({
183
+ id: storyId(source.id, entry.title, story.exportName),
184
+ name: story.name ?? storyName(story.exportName),
185
+ exportName: story.exportName,
186
+ controls: story.controls ?? entry.controls ?? "all",
187
+ group: story.group,
188
+ description: story.description,
189
+ isMain: story.isMain === true,
190
+ height: story.height ?? entry.height,
191
+ tags: story.tags ?? []
192
+ }));
193
+ groupAt(families, family, group).components.push({
194
+ name,
195
+ title: entry.title,
196
+ file,
197
+ stories: stories.filter((story) => !isUnlisted(story)),
198
+ unlisted: stories.filter(isUnlisted),
199
+ alsoIn: entry.alsoIn ?? [],
200
+ related: related.get(entry.title) ?? [],
201
+ keywords: entry.keywords ?? []
202
+ });
203
+ }
204
+ placeAliases(source, placed, families, problems);
205
+ const order = source.families ?? [];
206
+ const byOwnName = (left, right) => left.name.localeCompare(right.name);
207
+ return [...families.entries()]
208
+ .sort(([left], [right]) => rankIn(order, left) - rankIn(order, right) || left.localeCompare(right))
209
+ .map(([name, groups]) => {
210
+ const compareGroups = byGroup(source.familyGroups?.[name] ?? []);
211
+ return {
212
+ name,
213
+ groups: [...groups.entries()]
214
+ .sort(([left], [right]) => compareGroups(left, right))
215
+ .map(([group, { components, aliases }]) => ({
216
+ name: group,
217
+ components: [...components].sort(byOwnName),
218
+ aliases: [...aliases].sort(byOwnName)
219
+ }))
220
+ };
221
+ });
222
+ };
223
+ /**
224
+ * The catalogue's tree from the sources.
225
+ *
226
+ * @param sources - the sources, in the order the app lists them.
227
+ */
228
+ export const storyTree = (sources) => {
229
+ const problems = [];
230
+ const tree = sources.map((source) => ({
231
+ id: source.id,
232
+ name: source.name,
233
+ logo: source.logo,
234
+ background: source.background,
235
+ families: sourceFamilies(source, problems)
236
+ }));
237
+ return { sources: tree.filter((source) => source.families.length > 0), problems };
238
+ };
239
+ /**
240
+ * Every story of the tree with its place: each component's listed stories in the sidebar's order, then its unlisted
241
+ * ones.
242
+ *
243
+ * @param tree - the tree.
244
+ */
245
+ export const storyLocations = (tree) => tree.sources.flatMap((source) => source.families.flatMap((family) => family.groups.flatMap((group) => group.components.flatMap((component) => [...component.stories, ...component.unlisted].map((story) => ({
246
+ source,
247
+ family,
248
+ group,
249
+ component,
250
+ story
251
+ }))))));
252
+ /**
253
+ * Every story the generated tests check, with its place: all but those tagged `!test`, as Storybook's test runner
254
+ * leaves them out.
255
+ *
256
+ * @param tree - the tree.
257
+ */
258
+ export const testedStoryLocations = (tree) => storyLocations(tree).filter((location) => !location.story.tags.includes("!test"));
259
+ /**
260
+ * Where a story sits.
261
+ *
262
+ * @param tree - the tree.
263
+ * @param id - the story's id.
264
+ * @returns its place, or `undefined` when no story has this id.
265
+ */
266
+ export const findStory = (tree, id) => storyLocations(tree).find((location) => location.story.id === id);
267
+ /**
268
+ * Where a component sits.
269
+ *
270
+ * @param tree - the tree.
271
+ * @param id - the component's id (`componentId`).
272
+ * @returns its place, or `undefined` when no component has this id.
273
+ */
274
+ export const findComponent = (tree, id) => tree.sources
275
+ .flatMap((source) => source.families.flatMap((family) => family.groups.flatMap((group) => group.components.map((component) => ({ source, family, group, component })))))
276
+ .find((location) => componentId(location.source.id, location.component.title) === id);
277
+ /**
278
+ * A component's stories by group: the ungrouped ones first, then the groups the catalogue names in its order, then
279
+ * the groups it does not name, by id; empty groups are left out.
280
+ *
281
+ * @param stories - the component's stories, in the order of the file.
282
+ * @param order - the groups the catalogue names, in their order.
283
+ */
284
+ export const groupedStories = (stories, order) => {
285
+ const unnamed = [...new Set(stories.flatMap((story) => (story.group === undefined ? [] : [story.group])))]
286
+ .filter((group) => !order.includes(group))
287
+ .sort();
288
+ return [undefined, ...order, ...unnamed]
289
+ .map((group) => ({ group, stories: stories.filter((story) => story.group === group) }))
290
+ .filter((section) => section.stories.length > 0);
291
+ };
292
+ /**
293
+ * Every story's id in the sidebar's order: each component's stories by group, as the sidebar lists them.
294
+ *
295
+ * @param tree - the tree.
296
+ * @param order - the groups the catalogue names, in their order.
297
+ */
298
+ export const sidebarStoryIds = (tree, order) => tree.sources.flatMap((source) => source.families.flatMap((family) => family.groups.flatMap((group) => group.components.flatMap((component) => groupedStories(component.stories, order).flatMap((section) => section.stories.map((story) => story.id))))));
299
+ /**
300
+ * A component's demo, drawn at the top of its page: the story marked `main`, else the one named `Overview`, else its
301
+ * first.
302
+ *
303
+ * @param component - the component.
304
+ */
305
+ export const mainStory = (component) => component.stories.find((story) => story.isMain) ??
306
+ component.stories.find((story) => story.exportName === "Overview") ??
307
+ component.stories[0];
308
+ //# sourceMappingURL=storyTree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyTree.js","sourceRoot":"","sources":["../../src/storyTree.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB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