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 @@
1
+ {"version":3,"file":"SchemeSwitches.js","sourceRoot":"","sources":["../../../src/shell/SchemeSwitches.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,cAAc,EAAmB,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAiB,MAAM,YAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC;AAC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C,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAC3E,CACF,aAGH,KAAC,IAAI,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,EAAE,GAAI,EAClC,eAAM,SAAS,EAAC,yBAAyB,YAAE,QAAQ,CAAC,KAAK,GAAQ,IAC1D,CACV,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * A segmented choice built on native radio buttons, so the arrow keys, the form semantics and screen readers work
3
+ * as they do for any radio group.
4
+ *
5
+ * @module
6
+ */
7
+ import { type ReactNode } from "react";
8
+ import { type IconName } from "./icons.tsx";
9
+ /** One option. */
10
+ export type SegmentOption<TValue extends string | number> = {
11
+ /** The value. */
12
+ readonly value: TValue;
13
+ /** The visible label, or the accessible name when the option shows an icon. */
14
+ readonly label: string;
15
+ /** An icon instead of the label. */
16
+ readonly icon?: IconName;
17
+ };
18
+ /** The segmented choice's props. */
19
+ export type SegmentedProps<TValue extends string | number> = {
20
+ /** The group's name, for screen readers. */
21
+ readonly label: string;
22
+ /** The options, in order. */
23
+ readonly options: readonly SegmentOption<TValue>[];
24
+ /** The chosen value. */
25
+ readonly value: TValue;
26
+ /** Called with the chosen value. */
27
+ readonly onValueChange: (value: TValue) => void;
28
+ /** Whether the choice is off (the compare view fixes the theme); `false` by default. */
29
+ readonly isDisabled?: boolean;
30
+ /** Why the choice is off, as its tooltip (the story sets it); none by default. */
31
+ readonly disabledNote?: string | undefined;
32
+ /** What closes the group inside its frame (the width's field after its presets); none by default. */
33
+ readonly after?: ReactNode;
34
+ };
35
+ /**
36
+ * A segmented choice.
37
+ *
38
+ * @param props - the options and the chosen value.
39
+ */
40
+ export declare const Segmented: <TValue extends string | number>({ label, options, value, onValueChange, isDisabled, disabledNote, after }: SegmentedProps<TValue>) => ReactNode;
41
+ //# sourceMappingURL=Segmented.d.ts.map
@@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0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * A segmented choice built on native radio buttons, so the arrow keys, the form semantics and screen readers work
4
+ * as they do for any radio group.
5
+ *
6
+ * @module
7
+ */
8
+ import { useId } from "react";
9
+ import { Icon } from "./icons.js";
10
+ /**
11
+ * A segmented choice.
12
+ *
13
+ * @param props - the options and the chosen value.
14
+ */
15
+ export const Segmented = ({ label, options, value, onValueChange, isDisabled = false, disabledNote, after }) => {
16
+ const name = useId();
17
+ return (_jsxs("fieldset", { className: "forgebook-segmented", disabled: isDisabled, title: isDisabled ? disabledNote : undefined, children: [_jsx("legend", { className: "forgebook-visually-hidden", children: label }), options.map((option) => (_jsxs("label", { className: "forgebook-segmented__option", title: option.icon ? option.label : undefined, children: [_jsx("input", { type: "radio", className: "forgebook-visually-hidden", name: name, checked: option.value === value, "aria-label": option.icon ? option.label : undefined, onChange: () => onValueChange(option.value) }), _jsx("span", { className: "forgebook-segmented__face", children: option.icon ? _jsx(Icon, { name: option.icon, size: 14 }) : option.label })] }, String(option.value)))), after] }));
18
+ };
19
+ //# sourceMappingURL=Segmented.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Segmented.js","sourceRoot":"","sources":["../../../src/shell/Segmented.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAkB,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAiB,MAAM,YAAa,CAAC;AA8BlD;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAiC,EACxD,KAAK,EACL,OAAO,EACP,KAAK,EACL,aAAa,EACb,UAAU,GAAG,KAAK,EAClB,YAAY,EACZ,KAAK,EACkB,EAAa,EAAE;IACtC,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC;IACrB,OAAO,CACL,oBACE,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,aAE5C,iBAAQ,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAU,EAC7D,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,iBAEE,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,aAE7C,gBACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,2BAA2B,EACrC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,CAAC,KAAK,KAAK,KAAK,gBACnB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAClD,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,GAC3C,EACF,eAAM,SAAS,EAAC,2BAA2B,YACxC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,GAC9D,KAdF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAenB,CACT,CAAC,EACD,KAAK,IACG,CACZ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The catalogue's page: the sidebar, the toolbar, the component's header and either the component's page (every
3
+ * story) or one story's stage, with the page and the view kept in the address.
4
+ *
5
+ * @module
6
+ */
7
+ import type { StoryLanguage, StorySource } from "@forgebook/story-format/source";
8
+ import { type ReactNode } from "react";
9
+ import { type CatalogueLists } from "../catalogue.ts";
10
+ import { type ViewSwitch } from "../switches.ts";
11
+ /** What an app passes to the shell. */
12
+ export type ShellConfig = {
13
+ /** The catalogue's name, in the page title and the sidebar. */
14
+ readonly title: string;
15
+ /**
16
+ * The catalogue's logo, the URL of a square image: beside its name in the sidebar and as the page's icon. None by
17
+ * default: the catalogue's own mark. The catalogue belongs to whoever mounts it, so the logo is theirs to give.
18
+ */
19
+ readonly logo?: string;
20
+ /**
21
+ * The stories' measured heights, the address of the file `forgebook-heights` writes (relative to the page): a story's
22
+ * box waits at its height while it loads. None by default, and a missing file is none: boxes then wait at a guess.
23
+ */
24
+ readonly heights?: string;
25
+ /** The sources, in the order the sidebar lists them. */
26
+ readonly sources: readonly StorySource[];
27
+ /** The frame page's address, relative to the shell's (`frame.html`). */
28
+ readonly frameUrl: string;
29
+ /**
30
+ * The languages every story can be drawn in (the View menu's Language row); none turns them off. Give the frame
31
+ * the same list.
32
+ */
33
+ readonly languages?: readonly StoryLanguage[];
34
+ /**
35
+ * The switches of the toolbar and the View menu (`switches.ts`): the theme and the contrast when none are given.
36
+ * Give the frame the same list.
37
+ */
38
+ readonly switches?: readonly ViewSwitch[];
39
+ /** The catalogue's lists (its widths, zoom steps, backgrounds, story groups…); the defaults when none. */
40
+ readonly lists?: CatalogueLists;
41
+ };
42
+ /**
43
+ * The catalogue's page: its settings computed once from the configuration (its switches, its languages' switch, its
44
+ * lists) and provided to the whole page.
45
+ *
46
+ * @param props - the configuration.
47
+ */
48
+ export declare const Shell: (props: ShellConfig) => ReactNode;
49
+ //# sourceMappingURL=Shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shell.d.ts","sourceRoot":"","sources":["../../../src/shell/Shell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAmB,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAC;AAE9F,OAAO,EAAE,KAAK,cAAc,EAA6C,MAAM,iBAAiB,CAAC;AAiBjG,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmBpE,uCAAuC;AACvC,MAAM,MAAM,WAAW,GAAG;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC1C,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AA+hBF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,WAAW,KAAG,SAW1C,CAAC"}
@@ -0,0 +1,279 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useRef, useState } from "react";
3
+ import { catalogueSettings } from "../catalogue.js";
4
+ import { panelArgsParam, parsePanelArgsParam } from "../messages.js";
5
+ import { sourceFiles } from "../sourceFiles.js";
6
+ import { storyBackground } from "../storyBackground.js";
7
+ import { NOT_FIXED } from "../storyGlobals.js";
8
+ import { knownHeight } from "../storyHeights.js";
9
+ import { componentId, findComponent, findStory, sidebarStoryIds, storyTree } from "../storyTree.js";
10
+ import { catalogueSwitches } from "../switches.js";
11
+ import { parseView, viewParams } from "../viewState.js";
12
+ import { ComponentPage } from "./ComponentPage.js";
13
+ import { CatalogueContext, useCatalogue } from "./catalogueContext.js";
14
+ import { HomePage } from "./HomePage.js";
15
+ import { Sidebar } from "./Sidebar.js";
16
+ import { SidebarHandle } from "./SidebarHandle.js";
17
+ import { Stage } from "./Stage.js";
18
+ import { StoryPicker } from "./StoryPicker.js";
19
+ import { STRINGS } from "./strings.js";
20
+ import { ShowSidebarButton, Toolbar } from "./Toolbar.js";
21
+ import { useRecentPages } from "./useRecentPages.js";
22
+ import { useSidebarLayout } from "./useSidebarLayout.js";
23
+ import { useStoryHeights } from "./useStoryHeights.js";
24
+ import { useStoryIdsElement } from "./useStoryIdsElement.js";
25
+ import { useStoryKeys } from "./useStoryKeys.js";
26
+ import { useSystemDark } from "./useSystemDark.js";
27
+ /** No languages: a catalogue that offers none. */
28
+ const NO_LANGUAGES = [];
29
+ /** The home. */
30
+ const HOME = { kind: "home" };
31
+ /** A page's key: the same for every view of it. */
32
+ const pageKey = (page) => (page.kind === "home" ? page.kind : `${page.kind}:${page.id}`);
33
+ /**
34
+ * A visit of the page an address shows.
35
+ *
36
+ * @param address - the address.
37
+ * @param isReturn - whether the history brought it back.
38
+ */
39
+ const visitOf = (address, isReturn) => ({
40
+ pageKey: pageKey(address.page),
41
+ isReturn
42
+ });
43
+ /** The width a story that fills the stage is guessed at before the stage measures it, in CSS px. */
44
+ const FILL_WIDTH = 1440;
45
+ /** The width an example fills on a component's page: its column at its widest (`.forgebook-doc`), in CSS px. */
46
+ const PAGE_COLUMN_WIDTH = 832;
47
+ /**
48
+ * The width a story is drawn at: the one the view sets, or, for Fill, the room it fills.
49
+ *
50
+ * @param width - the view's width.
51
+ * @param fill - the width Fill gives, in CSS px.
52
+ */
53
+ const drawnWidth = (width, fill) => (width === "fill" ? fill : width);
54
+ /**
55
+ * A story's measured height on its own page, at the width its stage draws it.
56
+ *
57
+ * @param heights - the measured heights; none when the catalogue has none.
58
+ * @param storyId - the story's id.
59
+ * @param width - the view's width.
60
+ * @param shownWidth - the width the stage measured for Fill; none before it measured.
61
+ */
62
+ const stageHeight = (heights, storyId, width, shownWidth) => knownHeight(heights, storyId, drawnWidth(width, shownWidth ?? FILL_WIDTH));
63
+ /** The page of the address's `story` and `component` parameters: a story wins, none is the home. */
64
+ const pageOf = (story, component) => {
65
+ if (story !== null)
66
+ return { kind: "story", id: story };
67
+ if (component !== null)
68
+ return { kind: "component", id: component };
69
+ return HOME;
70
+ };
71
+ /**
72
+ * The current address.
73
+ *
74
+ * @param catalogue - the catalogue's switches and lists, for the view's values.
75
+ */
76
+ const readAddress = (catalogue) => {
77
+ const params = new URLSearchParams(window.location.search);
78
+ const story = params.get("story");
79
+ const component = params.get("component");
80
+ return {
81
+ page: pageOf(story, component),
82
+ view: parseView(window.location.search, catalogue),
83
+ panelArgs: parsePanelArgsParam(params.get("args")),
84
+ matrix: (params.get("matrix") ?? "").split(",").filter((name) => name !== "")
85
+ };
86
+ };
87
+ /**
88
+ * The query of an address.
89
+ *
90
+ * @param address - the page, the view, the panel's values and the matrix's axes.
91
+ * @param switches - the catalogue's switches, for the view's values.
92
+ */
93
+ const addressQuery = ({ page, view, panelArgs, matrix }, switches) => {
94
+ const params = viewParams(view, switches);
95
+ if (page.kind === "story")
96
+ params.set("story", page.id);
97
+ if (page.kind === "component")
98
+ params.set("component", page.id);
99
+ const args = page.kind === "story" ? panelArgsParam(panelArgs) : "";
100
+ if (args !== "")
101
+ params.set("args", args);
102
+ if (page.kind === "story" && matrix.length > 0)
103
+ params.set("matrix", matrix.join(","));
104
+ const query = params.toString();
105
+ return query === "" ? window.location.pathname : `?${query}`;
106
+ };
107
+ /** What the address's page shows: a story or a component that is not there (renamed, removed) says so, never another. */
108
+ const shownPage = (tree, page) => {
109
+ if (page.kind === "story") {
110
+ const location = findStory(tree, page.id);
111
+ return location === undefined
112
+ ? { kind: "missing", message: STRINGS.unknownStory(page.id) }
113
+ : { kind: "story", location };
114
+ }
115
+ if (page.kind === "component") {
116
+ const location = findComponent(tree, page.id);
117
+ return location === undefined
118
+ ? { kind: "missing", message: STRINGS.unknownComponent(page.id) }
119
+ : { kind: "component", location };
120
+ }
121
+ return { kind: "home" };
122
+ };
123
+ /** The shown page as the home's recent pages list it: a story's or a component's, none for the home or a missing one. */
124
+ const recentPageOf = (shown) => {
125
+ if (shown.kind === "story")
126
+ return { kind: "story", id: shown.location.story.id };
127
+ if (shown.kind === "component") {
128
+ return { kind: "component", id: componentId(shown.location.source.id, shown.location.component.title) };
129
+ }
130
+ return undefined;
131
+ };
132
+ /** What the sidebar marks: the shown component and story; none on the home or a missing page. */
133
+ const sidebarCurrent = (location, storyId) => location === undefined
134
+ ? undefined
135
+ : { sourceId: location.source.id, title: location.component.title, storyId };
136
+ /**
137
+ * What the shown story fixes of the view, for the toolbar; nothing on any other page.
138
+ *
139
+ * @param fixedViews - what each story's frame reported.
140
+ * @param shown - the page shown.
141
+ */
142
+ const fixedOfShown = (fixedViews, shown) => shown.kind === "story" ? (fixedViews.get(shown.location.story.id) ?? NOT_FIXED) : NOT_FIXED;
143
+ /**
144
+ * The bar above the page: the view's switches, which act on stories; on the home only the way back to a hidden
145
+ * sidebar.
146
+ *
147
+ * @param props - whether the home is shown, and the toolbar's props.
148
+ */
149
+ const ShellBar = ({ isHome, ...toolbar }) => isHome ? (_jsx("div", { className: "forgebook-toolbar", children: toolbar.onShowSidebar === undefined ? null : (_jsx(ShowSidebarButton, { onShowSidebar: toolbar.onShowSidebar })) })) : (_jsx(Toolbar, { ...toolbar }));
150
+ /** A component's page, by its title. */
151
+ const componentPage = (sourceId, title) => ({
152
+ kind: "component",
153
+ id: componentId(sourceId, title)
154
+ });
155
+ /**
156
+ * The components related to the shown one, with their names.
157
+ *
158
+ * @param tree - the tree.
159
+ * @param location - the shown component's place; none on the home or a missing page.
160
+ */
161
+ const relatedComponents = (tree, location) => (location?.component.related ?? []).flatMap((title) => {
162
+ if (location === undefined)
163
+ return [];
164
+ const found = findComponent(tree, componentId(location.source.id, title));
165
+ return found === undefined
166
+ ? []
167
+ : [{ page: componentPage(location.source.id, title), name: found.component.name }];
168
+ });
169
+ /**
170
+ * The links to the related components, at the top of the page; nothing when there are none.
171
+ *
172
+ * @param props - the related components and how to open one.
173
+ */
174
+ const RelatedLinks = ({ related, hrefOf, onOpen }) => related.length === 0 ? null : (_jsxs("nav", { className: "forgebook-header__related", "aria-label": STRINGS.related, children: [_jsx("span", { className: "forgebook-header__related-label", children: STRINGS.related }), related.map((component) => (_jsx("a", { className: "forgebook-header__related-link", href: hrefOf(component.page), onClick: (event) => {
175
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
176
+ return;
177
+ event.preventDefault();
178
+ onOpen(component.page);
179
+ }, children: component.name }, component.name)))] }));
180
+ /**
181
+ * What scrolls above a page: the index's problems, and the component's place and name, or why nothing is shown.
182
+ *
183
+ * @remarks
184
+ * The place is always where the component lives, with the other places it is listed in, so a page opened from an
185
+ * alias entry says where it really sits; its related components follow its name.
186
+ *
187
+ * @param props - the problems, the shown component's place, the message when a named page is missing, the picker
188
+ * of the component's stories, and the related components.
189
+ */
190
+ const ShellHeader = ({ problems, location, message, picker, related }) => (_jsxs(_Fragment, { children: [problems.length > 0 ? (_jsxs("div", { className: "forgebook-problems", role: "alert", children: [_jsx("strong", { children: STRINGS.indexProblems }), _jsx("ul", { children: problems.map((problem) => (_jsx("li", { children: problem }, problem))) })] })) : null, message === undefined ? null : (_jsx("p", { className: "forgebook-empty", role: "alert", children: message })), location === undefined ? null : (_jsxs("header", { className: "forgebook-header", children: [_jsxs("p", { className: "forgebook-header__path", children: [[location.source.name, location.family.name, location.group.name]
191
+ .filter((part) => part !== undefined)
192
+ .join(" · "), location.component.alsoIn.length === 0 ? null : (_jsxs("span", { className: "forgebook-header__also-in", children: [" · ", STRINGS.alsoIn(location.component.alsoIn.map((place) => place.split("/").join(" › ")).join(", "))] }))] }), _jsxs("div", { className: "forgebook-header__row", children: [_jsx("h1", { className: "forgebook-header__title", children: location.component.name }), picker] }), related] }))] }));
193
+ /** A story's page. */
194
+ const storyPage = (story) => ({ kind: "story", id: story.id });
195
+ /** The address, read again when the history goes back or forth. */
196
+ const useAddress = (catalogue) => {
197
+ const { switches } = catalogue;
198
+ const [address, setAddress] = useState(() => readAddress(catalogue));
199
+ const [visit, setVisit] = useState(() => visitOf(address, false));
200
+ useEffect(() => {
201
+ const onBack = () => {
202
+ const next = readAddress(catalogue);
203
+ setAddress(next);
204
+ setVisit(visitOf(next, true));
205
+ };
206
+ window.addEventListener("popstate", onBack);
207
+ return () => window.removeEventListener("popstate", onBack);
208
+ }, [catalogue]);
209
+ // a height set with the foot handle belongs to the story it was set on: another page starts at its own
210
+ const pageAddress = (page) => ({
211
+ page,
212
+ view: { ...address.view, height: "auto" },
213
+ panelArgs: {},
214
+ matrix: []
215
+ });
216
+ return {
217
+ address,
218
+ visit,
219
+ pageAddress,
220
+ openPage: (page) => {
221
+ const next = pageAddress(page);
222
+ window.history.pushState(null, "", addressQuery(next, switches));
223
+ setAddress(next);
224
+ setVisit(visitOf(next, false));
225
+ },
226
+ replaceAddress: (next) => {
227
+ window.history.replaceState(null, "", addressQuery(next, switches));
228
+ setAddress(next);
229
+ }
230
+ };
231
+ };
232
+ /**
233
+ * The catalogue's page inside its settings: everything below reads them, the shell's own hooks (the sidebar's width,
234
+ * the keys, the recent pages) included.
235
+ *
236
+ * @param props - the configuration.
237
+ */
238
+ const ShellPage = ({ title, logo, heights, sources, frameUrl }) => {
239
+ const tree = useMemo(() => storyTree(sources), [sources]);
240
+ const { width: sidebarWidth, setWidth: setSidebarWidth, isOpen: isSidebarOpen, setIsOpen: setIsSidebarOpen } = useSidebarLayout();
241
+ const catalogue = useCatalogue();
242
+ const { switches } = catalogue;
243
+ const { address, visit, pageAddress, openPage, replaceAddress } = useAddress(catalogue);
244
+ // each page's last scroll position, kept across the component pages and the stage
245
+ const scrollPositions = useRef(new Map());
246
+ const scroll = { visit, positions: scrollPositions.current };
247
+ // the width the shown story really has, measured on its stage, for the toolbar's width field
248
+ const [shownWidth, setShownWidth] = useState(undefined);
249
+ // what each story fixes of the view, as its frame reported it: the toolbar shows it for the shown story
250
+ const [fixedViews, setFixedViews] = useState(new Map());
251
+ const storyHeights = useStoryHeights(heights);
252
+ const isSystemDark = useSystemDark();
253
+ useStoryIdsElement(useMemo(() => sidebarStoryIds(tree, catalogue.storyGroups.map((group) => group.id)), [tree, catalogue.storyGroups]));
254
+ const shown = shownPage(tree, address.page);
255
+ const location = shown.kind === "story" || shown.kind === "component" ? shown.location : undefined;
256
+ const recent = useRecentPages(recentPageOf(shown));
257
+ useEffect(() => {
258
+ document.title = location === undefined ? title : `${location.component.name} · ${title}`;
259
+ }, [location, title]);
260
+ const changeView = (view) => replaceAddress({ ...address, view });
261
+ const shownStoryId = shown.kind === "story" ? shown.location.story.id : undefined;
262
+ useStoryKeys(tree, shownStoryId, shown.kind === "component" ? shown.location.component.stories[0]?.id : undefined, (id) => openPage({ kind: "story", id }));
263
+ const source = sources.find((candidate) => candidate.id === location?.source.id);
264
+ const files = source === undefined ? undefined : sourceFiles(source);
265
+ const header = (_jsx(ShellHeader, { problems: tree.problems, location: location, message: shown.kind === "missing" ? shown.message : undefined, picker: location === undefined ? null : (_jsx(StoryPicker, { component: location.component, currentStoryId: shownStoryId, onOpenComponent: () => openPage(componentPage(location.source.id, location.component.title)), onOpenStory: (story) => openPage(storyPage(story)) })), related: _jsx(RelatedLinks, { related: relatedComponents(tree, location), hrefOf: (page) => addressQuery(pageAddress(page), switches), onOpen: openPage }) }));
266
+ return (_jsxs("div", { className: "catalogue", children: [_jsx(Sidebar, { width: sidebarWidth, isOpen: isSidebarOpen, onHide: () => setIsSidebarOpen(false), title: title, logo: logo, tree: tree, isHome: shown.kind === "home", homeHref: addressQuery(pageAddress(HOME), switches), onOpenHome: () => openPage(HOME), current: sidebarCurrent(location, shownStoryId), componentHref: (sourceId, componentTitle) => addressQuery(pageAddress(componentPage(sourceId, componentTitle)), switches), onOpenComponent: (sourceId, componentTitle) => openPage(componentPage(sourceId, componentTitle)) }), isSidebarOpen ? _jsx(SidebarHandle, { width: sidebarWidth, onWidthChange: setSidebarWidth }) : null, _jsxs("main", { className: "forgebook-main", children: [_jsx(ShellBar, { isHome: shown.kind === "home", view: address.view, onViewChange: changeView, isStoryPage: shown.kind === "story", onShowSidebar: isSidebarOpen ? undefined : () => setIsSidebarOpen(true), shownWidth: shown.kind === "story" ? shownWidth : undefined, fixed: fixedOfShown(fixedViews, shown) }), shown.kind === "home" ? (_jsx(HomePage, { title: title, tree: tree, sources: sources, recent: recent, hrefOf: (page) => addressQuery(pageAddress(page), switches), onOpen: (page) => openPage(page), header: header })) : null, shown.kind === "component" ? (_jsx(ComponentPage, { component: shown.location.component, view: address.view, frameUrl: frameUrl, hrefOf: (story) => addressQuery(pageAddress(storyPage(story)), switches), onOpen: (story) => openPage(storyPage(story)), loadDocs: files?.docs[shown.location.component.file], loadCode: files?.code[shown.location.component.file], loadPage: files?.pages[shown.location.component.file], background: storyBackground(shown.location.source.background, address.view, catalogue, isSystemDark), heightOf: (storyId) => knownHeight(storyHeights, storyId, drawnWidth(address.view.width, PAGE_COLUMN_WIDTH)), header: header, scroll: scroll })) : null, shown.kind === "story" ? (_jsx(Stage, { component: shown.location.component, story: shown.location.story, view: address.view, onViewChange: changeView, onFixedChange: (storyId, fixed) => setFixedViews((current) => new Map(current).set(storyId, fixed)), panelArgs: address.panelArgs, onPanelArgsChange: (panelArgs) => replaceAddress({ ...address, panelArgs }), matrixAxes: address.matrix, onMatrixAxesChange: (matrix) => replaceAddress({ ...address, matrix }), frameUrl: frameUrl, loadCode: files?.code[shown.location.component.file], loadDocs: files?.docs[shown.location.component.file], namedValues: source?.namedValues, header: header, onShownWidthChange: setShownWidth, scroll: scroll, backgroundOf: (view) => storyBackground(shown.location.source.background, view, catalogue, isSystemDark), measuredHeight: stageHeight(storyHeights, shown.location.story.id, address.view.width, shownWidth) })) : null, shown.kind === "missing" ? header : null] })] }));
267
+ };
268
+ /**
269
+ * The catalogue's page: its settings computed once from the configuration (its switches, its languages' switch, its
270
+ * lists) and provided to the whole page.
271
+ *
272
+ * @param props - the configuration.
273
+ */
274
+ export const Shell = (props) => {
275
+ const { title, switches, languages = NO_LANGUAGES, lists } = props;
276
+ const catalogue = useMemo(() => catalogueSettings(title, catalogueSwitches(switches, languages), lists), [title, switches, languages, lists]);
277
+ return (_jsx(CatalogueContext.Provider, { value: catalogue, children: _jsx(ShellPage, { ...props }) }));
278
+ };
279
+ //# sourceMappingURL=Shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shell.js","sourceRoot":"","sources":["../../../src/shell/Shell.tsx"],"names":[],"mappings":";AASA,OAAO,EAAmC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9F,OAAO,EAA+C,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAkB,cAAc,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAkB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAqB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAEL,WAAW,EACX,aAAa,EACb,SAAS,EAGT,eAAe,EACf,SAAS,EAEV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAuD,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAe,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AACpC,OAAO,EAAE,WA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AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAkB,EAAa,EAAE;IACrD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,GAAG,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACnE,MAAM,SAAS,GAAG,OAAO,CACvB,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,EAC7E,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,CACpC,CAAC;IACF,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,SAAS,YACzC,KAAC,SAAS,OAAK,KAAK,GAAI,GACE,CAC7B,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The sidebar: a search field and the tree, by source, family (opens and closes), group and component, one line per
3
+ * component that never opens: a component's link opens its page, and its stories are picked in the page's header, so
4
+ * nothing in the list folds under the pointer. A family stays open once opened; a search finds a component by its
5
+ * name, its place, its meta's search words or its stories' names and descriptions. A component listed in other places too (`alsoIn`) has an
6
+ * alias entry in each, beside the components that live there, which says where it lives and opens its page.
7
+ *
8
+ * @module
9
+ */
10
+ import { type ReactNode } from "react";
11
+ import type { StoryTree } from "../storyTree.ts";
12
+ /** The sidebar's props. */
13
+ export type SidebarProps = {
14
+ /** The catalogue's name. */
15
+ readonly title: string;
16
+ /** The catalogue's logo, the URL of a square image; none shows the catalogue's own mark. */
17
+ readonly logo: string | undefined;
18
+ /** The tree. */
19
+ readonly tree: StoryTree;
20
+ /** Whether the home is shown: the logo, its link, is then the current page. */
21
+ readonly isHome: boolean;
22
+ /** The home's address, for the logo's link. */
23
+ readonly homeHref: string;
24
+ /** Opens the home. */
25
+ readonly onOpenHome: () => void;
26
+ /**
27
+ * The shown component's source and title, to mark it and keep its family open, and the shown story's id; none on the
28
+ * home.
29
+ */
30
+ readonly current: {
31
+ readonly sourceId: string;
32
+ readonly title: string;
33
+ readonly storyId: string | undefined;
34
+ } | undefined;
35
+ /** The address of a component's page, by its title, for its link. */
36
+ readonly componentHref: (sourceId: string, title: string) => string;
37
+ /** Opens a component's page, by its title. */
38
+ readonly onOpenComponent: (sourceId: string, title: string) => void;
39
+ /** The sidebar's width, in CSS px. */
40
+ readonly width: number;
41
+ /** Whether it is shown: hidden, it slides out and stays mounted, so its search and open families come back with it. */
42
+ readonly isOpen: boolean;
43
+ /** Hides the sidebar. */
44
+ readonly onHide: () => void;
45
+ };
46
+ /**
47
+ * The sidebar.
48
+ *
49
+ * @param props - the tree, the shown component and how to open one.
50
+ */
51
+ export declare const Sidebar: ({ title, logo, tree, isHome, homeHref, onOpenHome, current, width, isOpen, onHide, ...links }: SidebarProps) => ReactNode;
52
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/shell/Sidebar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAIL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAA+D,MAAM,iBAAiB,CAAC;AAM9G,2BAA2B;AAC3B,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sBAAsB;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;IA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