forgebook 0.1.3 → 0.1.5

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 (379) hide show
  1. package/README.md +99 -6
  2. package/dist/bin/forgebook/agentClient.d.ts +17 -0
  3. package/dist/bin/forgebook/agentClient.d.ts.map +1 -1
  4. package/dist/bin/forgebook/agentClient.js +21 -0
  5. package/dist/bin/forgebook/agentClient.js.map +1 -1
  6. package/dist/bin/forgebook/agentLoopCommands.d.mts +9 -0
  7. package/dist/bin/forgebook/agentLoopCommands.d.mts.map +1 -0
  8. package/dist/bin/forgebook/agentLoopCommands.mjs +217 -0
  9. package/dist/bin/forgebook/agentLoopCommands.mjs.map +1 -0
  10. package/dist/bin/forgebook/agentText.d.ts +37 -1
  11. package/dist/bin/forgebook/agentText.d.ts.map +1 -1
  12. package/dist/bin/forgebook/agentText.js +49 -2
  13. package/dist/bin/forgebook/agentText.js.map +1 -1
  14. package/dist/bin/forgebook/agents.md +51 -0
  15. package/dist/bin/forgebook/agentsText.d.ts +29 -0
  16. package/dist/bin/forgebook/agentsText.d.ts.map +1 -0
  17. package/dist/bin/forgebook/agentsText.js +48 -0
  18. package/dist/bin/forgebook/agentsText.js.map +1 -0
  19. package/dist/bin/forgebook/catalogueCommands.d.ts +51 -0
  20. package/dist/bin/forgebook/catalogueCommands.d.ts.map +1 -0
  21. package/dist/bin/forgebook/catalogueCommands.js +90 -0
  22. package/dist/bin/forgebook/catalogueCommands.js.map +1 -0
  23. package/dist/bin/forgebook/errorsRun.d.ts +27 -0
  24. package/dist/bin/forgebook/errorsRun.d.ts.map +1 -0
  25. package/dist/bin/forgebook/errorsRun.js +60 -0
  26. package/dist/bin/forgebook/errorsRun.js.map +1 -0
  27. package/dist/bin/forgebook/forgebook.mjs +121 -86
  28. package/dist/bin/forgebook/forgebook.mjs.map +1 -1
  29. package/dist/bin/forgebook/importers/storybook.d.ts +53 -0
  30. package/dist/bin/forgebook/importers/storybook.d.ts.map +1 -0
  31. package/dist/bin/forgebook/importers/storybook.js +318 -0
  32. package/dist/bin/forgebook/importers/storybook.js.map +1 -0
  33. package/dist/bin/forgebook/initCommands.d.mts +9 -0
  34. package/dist/bin/forgebook/initCommands.d.mts.map +1 -0
  35. package/dist/bin/forgebook/initCommands.mjs +86 -0
  36. package/dist/bin/forgebook/initCommands.mjs.map +1 -0
  37. package/dist/bin/forgebook/initConfig.d.ts +22 -0
  38. package/dist/bin/forgebook/initConfig.d.ts.map +1 -0
  39. package/dist/bin/forgebook/initConfig.js +51 -0
  40. package/dist/bin/forgebook/initConfig.js.map +1 -0
  41. package/dist/bin/forgebook/mcpTools.d.ts +29 -3
  42. package/dist/bin/forgebook/mcpTools.d.ts.map +1 -1
  43. package/dist/bin/forgebook/mcpTools.js +130 -7
  44. package/dist/bin/forgebook/mcpTools.js.map +1 -1
  45. package/dist/bin/forgebook/newStories.d.ts +27 -0
  46. package/dist/bin/forgebook/newStories.d.ts.map +1 -0
  47. package/dist/bin/forgebook/newStories.js +109 -0
  48. package/dist/bin/forgebook/newStories.js.map +1 -0
  49. package/dist/bin/forgebook/newStoriesFile.d.ts +18 -0
  50. package/dist/bin/forgebook/newStoriesFile.d.ts.map +1 -0
  51. package/dist/bin/forgebook/newStoriesFile.js +58 -0
  52. package/dist/bin/forgebook/newStoriesFile.js.map +1 -0
  53. package/dist/bin/forgebook/storyCheckRun.d.ts +49 -0
  54. package/dist/bin/forgebook/storyCheckRun.d.ts.map +1 -0
  55. package/dist/bin/forgebook/storyCheckRun.js +178 -0
  56. package/dist/bin/forgebook/storyCheckRun.js.map +1 -0
  57. package/dist/bin/forgebook/touchWindowRun.d.ts +17 -0
  58. package/dist/bin/forgebook/touchWindowRun.d.ts.map +1 -0
  59. package/dist/bin/forgebook/touchWindowRun.js +21 -0
  60. package/dist/bin/forgebook/touchWindowRun.js.map +1 -0
  61. package/dist/bin/forgebook-docs/catalogueDocs.d.ts +24 -0
  62. package/dist/bin/forgebook-docs/catalogueDocs.d.ts.map +1 -0
  63. package/dist/bin/forgebook-docs/catalogueDocs.js +71 -0
  64. package/dist/bin/forgebook-docs/catalogueDocs.js.map +1 -0
  65. package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +8 -0
  66. package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +1 -1
  67. package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +3 -1
  68. package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +1 -1
  69. package/dist/bin/forgebook-docs/catalogueMarkdown.js +62 -42
  70. package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +1 -1
  71. package/dist/bin/forgebook-docs/catalogueOptions.d.ts +39 -0
  72. package/dist/bin/forgebook-docs/catalogueOptions.d.ts.map +1 -0
  73. package/dist/bin/forgebook-docs/catalogueOptions.js +76 -0
  74. package/dist/bin/forgebook-docs/catalogueOptions.js.map +1 -0
  75. package/dist/bin/forgebook-docs/collectDocs.d.ts +3 -1
  76. package/dist/bin/forgebook-docs/collectDocs.d.ts.map +1 -1
  77. package/dist/bin/forgebook-docs/collectDocs.js +37 -13
  78. package/dist/bin/forgebook-docs/collectDocs.js.map +1 -1
  79. package/dist/bin/forgebook-docs/forgebook-docs.mjs +17 -80
  80. package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +1 -1
  81. package/dist/bin/forgebook-docs/llmsText.d.ts +24 -0
  82. package/dist/bin/forgebook-docs/llmsText.d.ts.map +1 -0
  83. package/dist/bin/forgebook-docs/llmsText.js +33 -0
  84. package/dist/bin/forgebook-docs/llmsText.js.map +1 -0
  85. package/dist/bin/forgebook-docs/sourceId.d.ts +9 -0
  86. package/dist/bin/forgebook-docs/sourceId.d.ts.map +1 -0
  87. package/dist/bin/forgebook-docs/sourceId.js +45 -0
  88. package/dist/bin/forgebook-docs/sourceId.js.map +1 -0
  89. package/dist/bin/frameworkDocs.d.ts +10 -0
  90. package/dist/bin/frameworkDocs.d.ts.map +1 -0
  91. package/dist/bin/frameworkDocs.js +43 -0
  92. package/dist/bin/frameworkDocs.js.map +1 -0
  93. package/dist/src/argTypes.d.ts +23 -0
  94. package/dist/src/argTypes.d.ts.map +1 -1
  95. package/dist/src/argTypes.js +27 -0
  96. package/dist/src/argTypes.js.map +1 -1
  97. package/dist/src/catalogue.d.ts +70 -3
  98. package/dist/src/catalogue.d.ts.map +1 -1
  99. package/dist/src/catalogue.js +85 -3
  100. package/dist/src/catalogue.js.map +1 -1
  101. package/dist/src/controlKeys.d.ts +85 -0
  102. package/dist/src/controlKeys.d.ts.map +1 -0
  103. package/dist/src/controlKeys.js +118 -0
  104. package/dist/src/controlKeys.js.map +1 -0
  105. package/dist/src/frame/frame.css +33 -2
  106. package/dist/src/frame/frameView.d.ts +2 -2
  107. package/dist/src/frame/frameView.d.ts.map +1 -1
  108. package/dist/src/frame/frameView.js +7 -3
  109. package/dist/src/frame/frameView.js.map +1 -1
  110. package/dist/src/frame/mountFrame.d.ts.map +1 -1
  111. package/dist/src/frame/mountFrame.js +30 -2
  112. package/dist/src/frame/mountFrame.js.map +1 -1
  113. package/dist/src/frame/spillOutline.d.ts +10 -0
  114. package/dist/src/frame/spillOutline.d.ts.map +1 -0
  115. package/dist/src/frame/spillOutline.js +80 -0
  116. package/dist/src/frame/spillOutline.js.map +1 -0
  117. package/dist/src/frame/touchDots.d.ts +32 -0
  118. package/dist/src/frame/touchDots.d.ts.map +1 -0
  119. package/dist/src/frame/touchDots.js +52 -0
  120. package/dist/src/frame/touchDots.js.map +1 -0
  121. package/dist/src/frame/touchEvents.d.ts +66 -0
  122. package/dist/src/frame/touchEvents.d.ts.map +1 -0
  123. package/dist/src/frame/touchEvents.js +152 -0
  124. package/dist/src/frame/touchEvents.js.map +1 -0
  125. package/dist/src/frame/touchGesture.d.ts +80 -0
  126. package/dist/src/frame/touchGesture.d.ts.map +1 -0
  127. package/dist/src/frame/touchGesture.js +87 -0
  128. package/dist/src/frame/touchGesture.js.map +1 -0
  129. package/dist/src/frame/touchLayer.d.ts +7 -0
  130. package/dist/src/frame/touchLayer.d.ts.map +1 -0
  131. package/dist/src/frame/touchLayer.js +399 -0
  132. package/dist/src/frame/touchLayer.js.map +1 -0
  133. package/dist/src/frame/touchScroll.d.ts +51 -0
  134. package/dist/src/frame/touchScroll.d.ts.map +1 -0
  135. package/dist/src/frame/touchScroll.js +137 -0
  136. package/dist/src/frame/touchScroll.js.map +1 -0
  137. package/dist/src/liveErrors.d.ts +57 -0
  138. package/dist/src/liveErrors.d.ts.map +1 -0
  139. package/dist/src/liveErrors.js +52 -0
  140. package/dist/src/liveErrors.js.map +1 -0
  141. package/dist/src/messages.d.ts +12 -0
  142. package/dist/src/messages.d.ts.map +1 -1
  143. package/dist/src/messages.js +4 -0
  144. package/dist/src/messages.js.map +1 -1
  145. package/dist/src/namedViews.d.ts +80 -0
  146. package/dist/src/namedViews.d.ts.map +1 -0
  147. package/dist/src/namedViews.js +88 -0
  148. package/dist/src/namedViews.js.map +1 -0
  149. package/dist/src/realTouch.d.ts +21 -0
  150. package/dist/src/realTouch.d.ts.map +1 -0
  151. package/dist/src/realTouch.js +16 -0
  152. package/dist/src/realTouch.js.map +1 -0
  153. package/dist/src/shell/AppearanceMenu.d.ts +15 -0
  154. package/dist/src/shell/AppearanceMenu.d.ts.map +1 -0
  155. package/dist/src/shell/AppearanceMenu.js +28 -0
  156. package/dist/src/shell/AppearanceMenu.js.map +1 -0
  157. package/dist/src/shell/BoxWidth.d.ts +40 -0
  158. package/dist/src/shell/BoxWidth.d.ts.map +1 -0
  159. package/dist/src/shell/BoxWidth.js +56 -0
  160. package/dist/src/shell/BoxWidth.js.map +1 -0
  161. package/dist/src/shell/ComponentPage.d.ts +17 -1
  162. package/dist/src/shell/ComponentPage.d.ts.map +1 -1
  163. package/dist/src/shell/ComponentPage.js +19 -54
  164. package/dist/src/shell/ComponentPage.js.map +1 -1
  165. package/dist/src/shell/ControlKeyField.d.ts +21 -0
  166. package/dist/src/shell/ControlKeyField.d.ts.map +1 -0
  167. package/dist/src/shell/ControlKeyField.js +46 -0
  168. package/dist/src/shell/ControlKeyField.js.map +1 -0
  169. package/dist/src/shell/ControlRow.d.ts +31 -0
  170. package/dist/src/shell/ControlRow.d.ts.map +1 -0
  171. package/dist/src/shell/ControlRow.js +30 -0
  172. package/dist/src/shell/ControlRow.js.map +1 -0
  173. package/dist/src/shell/Example.d.ts +58 -0
  174. package/dist/src/shell/Example.d.ts.map +1 -0
  175. package/dist/src/shell/Example.js +89 -0
  176. package/dist/src/shell/Example.js.map +1 -0
  177. package/dist/src/shell/InfoTip.d.ts +23 -0
  178. package/dist/src/shell/InfoTip.d.ts.map +1 -0
  179. package/dist/src/shell/InfoTip.js +51 -0
  180. package/dist/src/shell/InfoTip.js.map +1 -0
  181. package/dist/src/shell/NamedViews.d.ts +23 -0
  182. package/dist/src/shell/NamedViews.d.ts.map +1 -0
  183. package/dist/src/shell/NamedViews.js +49 -0
  184. package/dist/src/shell/NamedViews.js.map +1 -0
  185. package/dist/src/shell/PinnedControl.d.ts +25 -0
  186. package/dist/src/shell/PinnedControl.d.ts.map +1 -0
  187. package/dist/src/shell/PinnedControl.js +82 -0
  188. package/dist/src/shell/PinnedControl.js.map +1 -0
  189. package/dist/src/shell/PropsTab.d.ts +5 -2
  190. package/dist/src/shell/PropsTab.d.ts.map +1 -1
  191. package/dist/src/shell/PropsTab.js +12 -15
  192. package/dist/src/shell/PropsTab.js.map +1 -1
  193. package/dist/src/shell/Shell.d.ts.map +1 -1
  194. package/dist/src/shell/Shell.js +27 -2
  195. package/dist/src/shell/Shell.js.map +1 -1
  196. package/dist/src/shell/Sidebar.d.ts +11 -9
  197. package/dist/src/shell/Sidebar.d.ts.map +1 -1
  198. package/dist/src/shell/Sidebar.js +48 -42
  199. package/dist/src/shell/Sidebar.js.map +1 -1
  200. package/dist/src/shell/SidebarEntries.d.ts +50 -0
  201. package/dist/src/shell/SidebarEntries.d.ts.map +1 -0
  202. package/dist/src/shell/SidebarEntries.js +51 -0
  203. package/dist/src/shell/SidebarEntries.js.map +1 -0
  204. package/dist/src/shell/Stage.d.ts.map +1 -1
  205. package/dist/src/shell/Stage.js +19 -2
  206. package/dist/src/shell/Stage.js.map +1 -1
  207. package/dist/src/shell/Toolbar.d.ts +7 -3
  208. package/dist/src/shell/Toolbar.d.ts.map +1 -1
  209. package/dist/src/shell/Toolbar.js +38 -68
  210. package/dist/src/shell/Toolbar.js.map +1 -1
  211. package/dist/src/shell/ToolbarControl.d.ts +47 -0
  212. package/dist/src/shell/ToolbarControl.d.ts.map +1 -0
  213. package/dist/src/shell/ToolbarControl.js +150 -0
  214. package/dist/src/shell/ToolbarControl.js.map +1 -0
  215. package/dist/src/shell/UsedIn.d.ts +38 -0
  216. package/dist/src/shell/UsedIn.d.ts.map +1 -0
  217. package/dist/src/shell/UsedIn.js +77 -0
  218. package/dist/src/shell/UsedIn.js.map +1 -0
  219. package/dist/src/shell/ViewMenu.d.ts +37 -0
  220. package/dist/src/shell/ViewMenu.d.ts.map +1 -0
  221. package/dist/src/shell/ViewMenu.js +219 -0
  222. package/dist/src/shell/ViewMenu.js.map +1 -0
  223. package/dist/src/shell/controlCycle.d.ts +28 -0
  224. package/dist/src/shell/controlCycle.d.ts.map +1 -0
  225. package/dist/src/shell/controlCycle.js +51 -0
  226. package/dist/src/shell/controlCycle.js.map +1 -0
  227. package/dist/src/shell/dockTabs.d.ts +3 -0
  228. package/dist/src/shell/dockTabs.d.ts.map +1 -1
  229. package/dist/src/shell/dockTabs.js +1 -1
  230. package/dist/src/shell/dockTabs.js.map +1 -1
  231. package/dist/src/shell/icons.d.ts +7 -0
  232. package/dist/src/shell/icons.d.ts.map +1 -1
  233. package/dist/src/shell/icons.js +8 -1
  234. package/dist/src/shell/icons.js.map +1 -1
  235. package/dist/src/shell/keyboard.d.ts +2 -1
  236. package/dist/src/shell/keyboard.d.ts.map +1 -1
  237. package/dist/src/shell/keyboard.js +5 -2
  238. package/dist/src/shell/keyboard.js.map +1 -1
  239. package/dist/src/shell/shell.css +876 -244
  240. package/dist/src/shell/strings.d.ts +46 -0
  241. package/dist/src/shell/strings.d.ts.map +1 -1
  242. package/dist/src/shell/strings.js +46 -0
  243. package/dist/src/shell/strings.js.map +1 -1
  244. package/dist/src/shell/useAppearance.d.ts +17 -0
  245. package/dist/src/shell/useAppearance.d.ts.map +1 -0
  246. package/dist/src/shell/useAppearance.js +36 -0
  247. package/dist/src/shell/useAppearance.js.map +1 -0
  248. package/dist/src/shell/useControlKeys.d.ts +23 -0
  249. package/dist/src/shell/useControlKeys.d.ts.map +1 -0
  250. package/dist/src/shell/useControlKeys.js +44 -0
  251. package/dist/src/shell/useControlKeys.js.map +1 -0
  252. package/dist/src/shell/useFold.d.ts +27 -0
  253. package/dist/src/shell/useFold.d.ts.map +1 -0
  254. package/dist/src/shell/useFold.js +87 -0
  255. package/dist/src/shell/useFold.js.map +1 -0
  256. package/dist/src/shell/useFrameMessages.d.ts +2 -0
  257. package/dist/src/shell/useFrameMessages.d.ts.map +1 -1
  258. package/dist/src/shell/useFrameMessages.js +3 -0
  259. package/dist/src/shell/useFrameMessages.js.map +1 -1
  260. package/dist/src/shell/useFullPage.d.ts +45 -0
  261. package/dist/src/shell/useFullPage.d.ts.map +1 -0
  262. package/dist/src/shell/useFullPage.js +149 -0
  263. package/dist/src/shell/useFullPage.js.map +1 -0
  264. package/dist/src/shell/usePopover.d.ts +17 -3
  265. package/dist/src/shell/usePopover.d.ts.map +1 -1
  266. package/dist/src/shell/usePopover.js +65 -4
  267. package/dist/src/shell/usePopover.js.map +1 -1
  268. package/dist/src/shell/useStored.d.ts +13 -2
  269. package/dist/src/shell/useStored.d.ts.map +1 -1
  270. package/dist/src/shell/useStored.js +1 -1
  271. package/dist/src/shell/useStored.js.map +1 -1
  272. package/dist/src/shell/useToolbarLayout.d.ts +39 -0
  273. package/dist/src/shell/useToolbarLayout.d.ts.map +1 -0
  274. package/dist/src/shell/useToolbarLayout.js +58 -0
  275. package/dist/src/shell/useToolbarLayout.js.map +1 -0
  276. package/dist/src/shell/useToolbarOverflow.d.ts +31 -0
  277. package/dist/src/shell/useToolbarOverflow.d.ts.map +1 -0
  278. package/dist/src/shell/useToolbarOverflow.js +62 -0
  279. package/dist/src/shell/useToolbarOverflow.js.map +1 -0
  280. package/dist/src/shell/useWorstCase.d.ts +46 -0
  281. package/dist/src/shell/useWorstCase.d.ts.map +1 -0
  282. package/dist/src/shell/useWorstCase.js +42 -0
  283. package/dist/src/shell/useWorstCase.js.map +1 -0
  284. package/dist/src/shell/worstArgs.d.ts +42 -0
  285. package/dist/src/shell/worstArgs.d.ts.map +1 -0
  286. package/dist/src/shell/worstArgs.js +47 -0
  287. package/dist/src/shell/worstArgs.js.map +1 -0
  288. package/dist/src/spills.d.ts +31 -0
  289. package/dist/src/spills.d.ts.map +1 -0
  290. package/dist/src/spills.js +65 -0
  291. package/dist/src/spills.js.map +1 -0
  292. package/dist/src/storyCheck.d.ts +105 -0
  293. package/dist/src/storyCheck.d.ts.map +1 -0
  294. package/dist/src/storyCheck.js +63 -0
  295. package/dist/src/storyCheck.js.map +1 -0
  296. package/dist/src/switches.d.ts +26 -4
  297. package/dist/src/switches.d.ts.map +1 -1
  298. package/dist/src/switches.js +50 -5
  299. package/dist/src/switches.js.map +1 -1
  300. package/dist/src/toolbarLayout.d.ts +119 -0
  301. package/dist/src/toolbarLayout.d.ts.map +1 -0
  302. package/dist/src/toolbarLayout.js +155 -0
  303. package/dist/src/toolbarLayout.js.map +1 -0
  304. package/dist/src/usedIn.d.ts +60 -0
  305. package/dist/src/usedIn.d.ts.map +1 -0
  306. package/dist/src/usedIn.js +92 -0
  307. package/dist/src/usedIn.js.map +1 -0
  308. package/dist/src/viewState.d.ts +9 -11
  309. package/dist/src/viewState.d.ts.map +1 -1
  310. package/dist/src/viewState.js +24 -20
  311. package/dist/src/viewState.js.map +1 -1
  312. package/dist/src/viewWords.d.ts +26 -0
  313. package/dist/src/viewWords.d.ts.map +1 -0
  314. package/dist/src/viewWords.js +29 -0
  315. package/dist/src/viewWords.js.map +1 -0
  316. package/dist/src/vite/adapter.d.ts +13 -4
  317. package/dist/src/vite/adapter.d.ts.map +1 -1
  318. package/dist/src/vite/adapter.js +4 -2
  319. package/dist/src/vite/adapter.js.map +1 -1
  320. package/dist/src/vite/agent.types.d.ts +32 -2
  321. package/dist/src/vite/agent.types.d.ts.map +1 -1
  322. package/dist/src/vite/agentApi.d.ts +15 -3
  323. package/dist/src/vite/agentApi.d.ts.map +1 -1
  324. package/dist/src/vite/agentApi.js +63 -9
  325. package/dist/src/vite/agentApi.js.map +1 -1
  326. package/dist/src/vite/agentRoutes.d.ts +8 -3
  327. package/dist/src/vite/agentRoutes.d.ts.map +1 -1
  328. package/dist/src/vite/agentRoutes.js +84 -23
  329. package/dist/src/vite/agentRoutes.js.map +1 -1
  330. package/dist/src/vite/configFile.d.ts +2 -1
  331. package/dist/src/vite/configFile.d.ts.map +1 -1
  332. package/dist/src/vite/configFile.js +29 -11
  333. package/dist/src/vite/configFile.js.map +1 -1
  334. package/dist/src/vite/docsExtractor.d.ts +26 -2
  335. package/dist/src/vite/docsExtractor.d.ts.map +1 -1
  336. package/dist/src/vite/docsExtractor.js +12 -9
  337. package/dist/src/vite/docsExtractor.js.map +1 -1
  338. package/dist/src/vite/docsWorker.js +18 -2
  339. package/dist/src/vite/docsWorker.js.map +1 -1
  340. package/dist/src/vite/forcedStates.d.ts +6 -2
  341. package/dist/src/vite/forcedStates.d.ts.map +1 -1
  342. package/dist/src/vite/forcedStates.js +20 -4
  343. package/dist/src/vite/forcedStates.js.map +1 -1
  344. package/dist/src/vite/forgebookPlugin.d.ts.map +1 -1
  345. package/dist/src/vite/forgebookPlugin.js +104 -16
  346. package/dist/src/vite/forgebookPlugin.js.map +1 -1
  347. package/dist/src/vite/indexStoryFile.d.ts +14 -0
  348. package/dist/src/vite/indexStoryFile.d.ts.map +1 -1
  349. package/dist/src/vite/indexStoryFile.js +13 -4
  350. package/dist/src/vite/indexStoryFile.js.map +1 -1
  351. package/dist/src/vite/mcpProtocol.d.ts +9 -0
  352. package/dist/src/vite/mcpProtocol.d.ts.map +1 -1
  353. package/dist/src/vite/mcpProtocol.js +6 -3
  354. package/dist/src/vite/mcpProtocol.js.map +1 -1
  355. package/dist/src/vite/storyFilesModule.d.ts +44 -1
  356. package/dist/src/vite/storyFilesModule.d.ts.map +1 -1
  357. package/dist/src/vite/storyFilesModule.js +49 -14
  358. package/dist/src/vite/storyFilesModule.js.map +1 -1
  359. package/dist/src/vite/touchMedia.d.ts +35 -0
  360. package/dist/src/vite/touchMedia.d.ts.map +1 -0
  361. package/dist/src/vite/touchMedia.js +187 -0
  362. package/dist/src/vite/touchMedia.js.map +1 -0
  363. package/dist/src/vite/usageGraph.d.ts +45 -0
  364. package/dist/src/vite/usageGraph.d.ts.map +1 -0
  365. package/dist/src/vite/usageGraph.js +246 -0
  366. package/dist/src/vite/usageGraph.js.map +1 -0
  367. package/dist/src/vite/usageModule.d.ts +33 -0
  368. package/dist/src/vite/usageModule.d.ts.map +1 -0
  369. package/dist/src/vite/usageModule.js +135 -0
  370. package/dist/src/vite/usageModule.js.map +1 -0
  371. package/dist/src/worstCase.d.ts +16 -0
  372. package/dist/src/worstCase.d.ts.map +1 -0
  373. package/dist/src/worstCase.js +16 -0
  374. package/dist/src/worstCase.js.map +1 -0
  375. package/package.json +18 -2
  376. package/dist/src/shell/SchemeSwitches.d.ts +0 -24
  377. package/dist/src/shell/SchemeSwitches.d.ts.map +0 -1
  378. package/dist/src/shell/SchemeSwitches.js +0 -36
  379. package/dist/src/shell/SchemeSwitches.js.map +0 -1
@@ -1,6 +1,20 @@
1
+ /**
2
+ * A component's page, as a library documents a component: what it is, its demo (the story marked `main`) with
3
+ * its code, the text of its documentation file, its API reference drawn from its types, then every other story as an
4
+ * example.
5
+ *
6
+ * @remarks
7
+ * The demo loads at once; the examples load as they come near the visible part of the page, a few at a time
8
+ * (`useFrameQueue`): a component may have twenty stories. The view's live part reaches every frame as a message, as
9
+ * on the story page; the props panel and Replay belong to a story's own page, which each story's name links to. The
10
+ * documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`).
11
+ *
12
+ * @module
13
+ */
1
14
  import { type ReactNode } from "react";
2
15
  import { type TreeComponent, type TreeStory } from "../storyTree.ts";
3
16
  import { type ViewState } from "../viewState.ts";
17
+ import { type UsedInProps } from "./UsedIn.tsx";
4
18
  import { type PageScroll } from "./useScrollMemory.ts";
5
19
  /** The component page's props. */
6
20
  export type ComponentPageProps = {
@@ -28,11 +42,13 @@ export type ComponentPageProps = {
28
42
  readonly header: ReactNode;
29
43
  /** Where its scrolling part starts: the shell's visit of the page and every page's last position. */
30
44
  readonly scroll: PageScroll;
45
+ /** What "Used in" reads and opens; none when the catalogue turned it off. */
46
+ readonly usedIn?: Omit<UsedInProps, "title"> | undefined;
31
47
  };
32
48
  /**
33
49
  * A component's page.
34
50
  *
35
51
  * @param props - the component, the view, its loaders and how to open a story.
36
52
  */
37
- export declare const ComponentPage: ({ component, view, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll }: ComponentPageProps) => ReactNode;
53
+ export declare const ComponentPage: ({ component, view, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn }: ComponentPageProps) => ReactNode;
38
54
  //# sourceMappingURL=ComponentPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentPage.d.ts","sourceRoot":"","sources":["../../../src/shell/ComponentPage.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAmB,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAC;AAK1F,OAAO,EAA6B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkBzE,OAAO,EAAE,KAAK,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AASxE,kCAAkC;AAClC,MAAM,MAAM,kBAAkB,GAAG;IA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Q,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC1D,CAAC;AAyCF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,2HAc3B,kBAAkB,KAAG,SAgGvB,CAAC"}
@@ -1,70 +1,35 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId, useMemo, useRef, useState } from "react";
2
+ /**
3
+ * A component's page, as a library documents a component: what it is, its demo (the story marked `main`) with
4
+ * its code, the text of its documentation file, its API reference drawn from its types, then every other story as an
5
+ * example.
6
+ *
7
+ * @remarks
8
+ * The demo loads at once; the examples load as they come near the visible part of the page, a few at a time
9
+ * (`useFrameQueue`): a component may have twenty stories. The view's live part reaches every frame as a message, as
10
+ * on the story page; the props panel and Replay belong to a story's own page, which each story's name links to. The
11
+ * documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`).
12
+ *
13
+ * @module
14
+ */
15
+ import { useMemo, useRef, useState } from "react";
3
16
  import { groupLabel } from "../catalogue.js";
4
17
  import { groupedStories, mainStory } from "../storyTree.js";
5
- import { frameAddress, liveView } from "../viewState.js";
18
+ import { liveView } from "../viewState.js";
6
19
  import { ApiReference } from "./ApiReference.js";
7
20
  import { CodeText } from "./CodeText.js";
8
21
  import { useCatalogue } from "./catalogueContext.js";
9
- import { useCodeWriter } from "./codeWriter.js";
10
- import { FrameView } from "./FrameView.js";
11
- import { Icon } from "./icons.js";
22
+ import { Example } from "./Example.js";
12
23
  import { PackageHtml } from "./PackageHtml.js";
13
- import { StageViewport } from "./StageViewport.js";
14
- import { StoryCodeBlock, storyCodeText } from "./StoryCodeBlock.js";
15
24
  import { STRINGS } from "./strings.js";
25
+ import { UsedIn } from "./UsedIn.js";
16
26
  import { useComponentDocs } from "./useComponentDocs.js";
17
- import { useCopy } from "./useCopy.js";
18
27
  import { useFrameMessages } from "./useFrameMessages.js";
19
28
  import { useFrameQueue } from "./useFrameQueue.js";
20
29
  import { useLiveView, useLoadedView } from "./useLiveView.js";
21
30
  import { usePageDoc } from "./usePageDoc.js";
22
31
  import { useScrollMemory } from "./useScrollMemory.js";
23
32
  import { useStoryCode } from "./useStoryCode.js";
24
- /** The height of a frame before its story reports its own, in CSS px. */
25
- const FALLBACK_HEIGHT = 160;
26
- /** The demo's height before its story reports its own, in CSS px: the demo is the page's first, larger frame. */
27
- const DEMO_FALLBACK_HEIGHT = 280;
28
- /** A link to a story's own page, opened in place unless the user asks for another tab. */
29
- const StoryLink = ({ story, hrefOf, onOpen, className, children }) => (_jsx("a", { className: className, href: hrefOf(story), onClick: (event) => {
30
- if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
31
- return;
32
- event.preventDefault();
33
- onOpen(story);
34
- }, children: children }));
35
- /**
36
- * The code under an example: closed until asked for, then opened in place with a button that copies it.
37
- *
38
- * @param props - the story's code and whether it is shown.
39
- */
40
- const ExampleCode = ({ id, source, isShown }) => {
41
- const { isCopied, copy } = useCopy();
42
- const write = useCodeWriter();
43
- return (_jsx("div", { id: id, className: "forgebook-example__code", "data-open": isShown ? "" : undefined, inert: !isShown, children: _jsxs("div", { className: "forgebook-example__code-inner", children: [_jsx("button", { type: "button", className: "forgebook-example__copy", onClick: () => copy(storyCodeText(source, write)), "aria-live": "polite", children: isCopied ? STRINGS.copied : STRINGS.copy }), _jsx(StoryCodeBlock, { ...source })] }) }));
44
- };
45
- /**
46
- * One example: its title and description (the demo has none: it opens the page), its story in a frame, and a bar
47
- * that shows its code.
48
- *
49
- * @param props - the story, whether it is the demo, whether its frame may load, where the queue watches it, and what
50
- * every example shares.
51
- */
52
- const Example = ({ story, isDemo, isMounted, observe, ...context }) => {
53
- const [isCodeShown, setIsCodeShown] = useState(false);
54
- const codeId = useId();
55
- // the story's measured height when there is one; a guess otherwise, larger for the demo; never below the height its
56
- // scene needs, which its frame has from the start
57
- const fallbackHeight = Math.max(story.height ?? 0, context.heightOf(story.id) ?? (isDemo ? DEMO_FALLBACK_HEIGHT : FALLBACK_HEIGHT));
58
- const source = context.code.status === "ready"
59
- ? {
60
- code: context.code.value,
61
- exportName: story.exportName,
62
- componentName: context.componentName,
63
- args: context.argsOf(story.id)
64
- }
65
- : undefined;
66
- return (_jsxs("article", { ref: observe, className: "forgebook-example", "data-demo": isDemo ? "" : undefined, "aria-label": isDemo ? STRINGS.frameTitle(context.component.name, story.name) : story.name, children: [isDemo ? null : (_jsxs("header", { className: "forgebook-example__head", children: [_jsx("h4", { className: "forgebook-example__title", children: _jsx(StoryLink, { story: story, hrefOf: context.hrefOf, onOpen: context.onOpen, className: "forgebook-link", children: story.name }) }), story.description === undefined ? null : (_jsx("p", { className: "forgebook-example__description", children: _jsx(CodeText, { text: story.description }) }))] })), _jsxs("div", { className: "forgebook-example__box", children: [_jsx("div", { className: "forgebook-example__stage", children: _jsx(StageViewport, { width: context.view.width, background: context.background, children: isMounted ? (_jsx(FrameView, { title: STRINGS.frameTitle(context.component.name, story.name), address: frameAddress(context.frameUrl, story.id, context.frameView, context.switches), heights: context.heights, settled: context.settled, fallbackHeight: fallbackHeight, sceneHeight: story.height })) : (_jsx("div", { className: "forgebook-frame-placeholder", style: { height: fallbackHeight } })) }) }), _jsxs("div", { className: "forgebook-example__bar", children: [source === undefined ? null : (_jsxs("button", { type: "button", className: "forgebook-example__toggle", "aria-expanded": isCodeShown, "aria-controls": codeId, onClick: () => setIsCodeShown(!isCodeShown), children: [_jsx(Icon, { name: "chevronRight", size: 12 }), isCodeShown ? STRINGS.hideCode : STRINGS.showCode] })), isDemo ? (_jsxs(StoryLink, { story: story, hrefOf: context.hrefOf, onOpen: context.onOpen, className: "forgebook-example__open", children: [STRINGS.openStory, _jsx(Icon, { name: "external", size: 12 })] })) : null] }), source === undefined ? null : _jsx(ExampleCode, { id: codeId, source: source, isShown: isCodeShown })] })] }));
67
- };
68
33
  /**
69
34
  * The page's lead: what the component is and does, from its file's `@module` comment (its own TSDoc is often a bare
70
35
  * name), read with the documentation file so it comes with the page; else its TSDoc summary, once the docs come.
@@ -94,7 +59,7 @@ const Prose = ({ page }) => {
94
59
  *
95
60
  * @param props - the component, the view, its loaders and how to open a story.
96
61
  */
97
- export const ComponentPage = ({ component, view, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll }) => {
62
+ export const ComponentPage = ({ component, view, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn }) => {
98
63
  const pageRef = useRef(null);
99
64
  const docs = useComponentDocs(loadDocs);
100
65
  const code = useStoryCode(loadCode);
@@ -141,6 +106,6 @@ export const ComponentPage = ({ component, view, frameUrl, hrefOf, onOpen, loadD
141
106
  heightOf,
142
107
  background
143
108
  };
144
- return (_jsxs("div", { className: "forgebook-workspace", children: [header, _jsx("div", { ref: pageRef, className: "forgebook-scroll", children: _jsxs("div", { className: "forgebook-doc", children: [_jsx(Lead, { page: page, docs: componentDocs }), demo === undefined ? null : _jsx(Example, { ...context, story: demo, isDemo: true, isMounted: true }), _jsx(Prose, { page: page }), componentDocs === undefined || componentDocs.props.length === 0 ? null : (_jsx(ApiReference, { docs: componentDocs })), examples.length === 0 ? null : (_jsxs("section", { className: "forgebook-doc__section", "aria-labelledby": "forgebook-examples", children: [_jsx("h2", { id: "forgebook-examples", children: STRINGS.examples }), groupedStories(examples, catalogue.storyGroups.map((group) => group.id)).map((section) => (_jsxs("section", { className: "forgebook-doc__group", children: [section.group === undefined ? null : (_jsx("h3", { className: "forgebook-doc__group-name", children: groupLabel(catalogue.storyGroups, section.group) })), section.stories.map((story) => (_jsx(Example, { ...context, story: story, isDemo: false, isMounted: queue.mounted.has(story.id), observe: (element) => queue.observe(story.id, element) }, story.id)))] }, section.group ?? "")))] }))] }, `${component.file}|${component.title}`) })] }));
109
+ return (_jsxs("div", { className: "forgebook-workspace", children: [header, _jsx("div", { ref: pageRef, className: "forgebook-scroll", children: _jsxs("div", { className: "forgebook-doc", children: [_jsx(Lead, { page: page, docs: componentDocs }), demo === undefined ? null : _jsx(Example, { ...context, story: demo, isDemo: true, isMounted: true }), _jsx(Prose, { page: page }), componentDocs === undefined || componentDocs.props.length === 0 ? null : (_jsx(ApiReference, { docs: componentDocs })), examples.length === 0 ? null : (_jsxs("section", { className: "forgebook-doc__section", "aria-labelledby": "forgebook-examples", children: [_jsx("h2", { id: "forgebook-examples", children: STRINGS.examples }), groupedStories(examples, catalogue.storyGroups.map((group) => group.id)).map((section) => (_jsxs("section", { className: "forgebook-doc__group", children: [section.group === undefined ? null : (_jsx("h3", { className: "forgebook-doc__group-name", children: groupLabel(catalogue.storyGroups, section.group) })), section.stories.map((story) => (_jsx(Example, { ...context, story: story, isDemo: false, isMounted: queue.mounted.has(story.id), observe: (element) => queue.observe(story.id, element) }, story.id)))] }, section.group ?? "")))] })), usedIn === undefined ? null : _jsx(UsedIn, { title: component.title, ...usedIn })] }, `${component.file}|${component.title}`) })] }));
145
110
  };
146
111
  //# sourceMappingURL=ComponentPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentPage.js","sourceRoot":"","sources":["../../../src/shell/ComponentPage.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAmC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAsC,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAkB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBA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,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A control's key in its View row: the key shown, and a press on it records another (Backspace takes it away, Escape
3
+ * keeps it). A key the shell or another control has is refused, the reason said in place.
4
+ *
5
+ * @module
6
+ */
7
+ import { type ReactNode } from "react";
8
+ /**
9
+ * The key field.
10
+ *
11
+ * @param props - the control's name, its key, and what gives it another.
12
+ */
13
+ export declare const ControlKeyField: ({ label, shortcut, onKeyChange }: {
14
+ /** The control's name, for the field's own. */
15
+ readonly label: string;
16
+ /** Its key; none when it has none. */
17
+ readonly shortcut: string | undefined;
18
+ /** Gives it another key (`null` takes it away); answers why a key cannot be given. */
19
+ readonly onKeyChange: (key: string | null) => string | undefined;
20
+ }) => ReactNode;
21
+ //# sourceMappingURL=ControlKeyField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlKeyField.d.ts","sourceRoot":"","sources":["../../../src/shell/ControlKeyField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAsB,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAQrE;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,kCAI7B;IACD,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,sFAAsF;IACtF,QAAQ,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;CAClE,KAAG,SAyCH,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * A control's key in its View row: the key shown, and a press on it records another (Backspace takes it away, Escape
4
+ * keeps it). A key the shell or another control has is refused, the reason said in place.
5
+ *
6
+ * @module
7
+ */
8
+ import { useState } from "react";
9
+ import { keyOf } from "../controlKeys.js";
10
+ import { STRINGS } from "./strings.js";
11
+ /** The keys that take a control's key away while one is recorded. */
12
+ const REMOVE_KEYS = ["Backspace", "Delete"];
13
+ /**
14
+ * The key field.
15
+ *
16
+ * @param props - the control's name, its key, and what gives it another.
17
+ */
18
+ export const ControlKeyField = ({ label, shortcut, onKeyChange }) => {
19
+ const [isRecording, setIsRecording] = useState(false);
20
+ const [problem, setProblem] = useState(undefined);
21
+ const record = (event) => {
22
+ if (!isRecording || event.key === "Tab")
23
+ return;
24
+ // the press is the field's: neither the controls' keys nor the menu's Escape see it
25
+ event.preventDefault();
26
+ event.stopPropagation();
27
+ if (event.key === "Escape") {
28
+ setIsRecording(false);
29
+ return;
30
+ }
31
+ if (event.metaKey || event.ctrlKey || event.altKey)
32
+ return;
33
+ const key = REMOVE_KEYS.includes(event.key) ? null : keyOf(event.key);
34
+ if (key === undefined)
35
+ return;
36
+ const refused = onKeyChange(key);
37
+ setProblem(refused);
38
+ if (refused === undefined)
39
+ setIsRecording(false);
40
+ };
41
+ return (_jsxs("span", { className: "forgebook-key-field", children: [_jsx("button", { type: "button", className: "forgebook-key-field__button", "aria-label": STRINGS.controlKey(label, shortcut), "aria-pressed": isRecording, title: isRecording ? STRINGS.pressAKey : STRINGS.changeKey, onClick: () => {
42
+ setProblem(undefined);
43
+ setIsRecording(!isRecording);
44
+ }, onBlur: () => setIsRecording(false), onKeyDown: record, children: isRecording ? STRINGS.pressAKey : _jsx("kbd", { children: shortcut?.toUpperCase() ?? "–" }) }), _jsx("span", { className: "forgebook-key-field__problem", role: "status", children: problem ?? "" })] }));
45
+ };
46
+ //# sourceMappingURL=ControlKeyField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlKeyField.js","sourceRoot":"","sources":["../../../src/shell/ControlKeyField.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAsC,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;A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aACnC,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,6BAA6B,gBAC3B,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,kBACjC,WAAW,EACzB,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAC1D,OAAO,EAAE,GAAS,EAAE;oBAClB,UAAU,CAAC,SAAS,CAAC,CAAC;oBACtB,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC;gBAC/B,CAAC,EACD,MAAM,EAAE,GAAS,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EACzC,SAAS,EAAE,MAAM,YAEhB,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,wBAAM,QAAQ,EAAE,WAAW,EAAE,IAAI,GAAG,GAAO,GACvE,EACT,eAAM,SAAS,EAAC,8BAA8B,EAAC,IAAI,EAAC,QAAQ,YACzD,OAAO,IAAI,EAAE,GACT,IACF,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A row of the View menu: a handle to move the control (dragged, or with the arrow keys, the new position announced),
3
+ * its name with a dot when its value is changed, its value, its key, a pin that puts it on the toolbar and a button that
4
+ * hides it in the menu.
5
+ *
6
+ * @module
7
+ */
8
+ import type { PointerEvent, ReactNode } from "react";
9
+ import type { PlacedControl } from "../toolbarLayout.ts";
10
+ import { type ControlContext } from "./ToolbarControl.tsx";
11
+ import type { ToolbarLayout } from "./useToolbarLayout.ts";
12
+ /**
13
+ * One control's row: its handle, its name, its value, its key, its pin and its hide button.
14
+ *
15
+ * @param props - the placed control, its position, what moving and placing it do, and what every control shares.
16
+ */
17
+ export declare const ControlRow: ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce, ...context }: ControlContext & {
18
+ readonly each: PlacedControl;
19
+ readonly index: number;
20
+ readonly count: number;
21
+ readonly isDragged: boolean;
22
+ /** Whether it is pinned but the bar has no room for it now. */
23
+ readonly isMoved: boolean;
24
+ /** Whether the person set a value that is not its default. */
25
+ readonly isChanged: boolean;
26
+ readonly layout: ToolbarLayout;
27
+ readonly hintId: string;
28
+ readonly onGrab: (event: PointerEvent<HTMLButtonElement>, id: string) => void;
29
+ readonly onAnnounce: (text: string) => void;
30
+ }) => ReactNode;
31
+ //# sourceMappingURL=ControlRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlRow.d.ts","sourceRoot":"","sources":["../../../src/shell/ControlRow.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAE,KAAK,cAAc,EAAgC,MAAM,sBAAsB,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,uGAYxB,cAAc,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,KAAG,SAmEH,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ControlKeyField } from "./ControlKeyField.js";
3
+ import { InfoTip } from "./InfoTip.js";
4
+ import { Icon } from "./icons.js";
5
+ import { STRINGS } from "./strings.js";
6
+ import { controlLabel, ToolbarControl } from "./ToolbarControl.js";
7
+ /** The arrow keys that move a row, and by how much. */
8
+ const ARROW_STEPS = { ArrowUp: -1, ArrowDown: 1 };
9
+ /**
10
+ * One control's row: its handle, its name, its value, its key, its pin and its hide button.
11
+ *
12
+ * @param props - the placed control, its position, what moving and placing it do, and what every control shares.
13
+ */
14
+ export const ControlRow = ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce, ...context }) => {
15
+ const { control, isPinned } = each;
16
+ const label = controlLabel(control);
17
+ const step = (event) => {
18
+ const offset = ARROW_STEPS[event.key] ?? 0;
19
+ const target = index + offset;
20
+ if (offset === 0 || target < 0 || target >= count)
21
+ return;
22
+ event.preventDefault();
23
+ layout.move(control.id, target);
24
+ onAnnounce(STRINGS.controlMoved(label, target + 1, count));
25
+ };
26
+ // a switch's note (the touch simulation's limits): an info button beside its value
27
+ const description = control.kind === "switch" ? control.switch.description : undefined;
28
+ return (_jsxs("li", { className: "forgebook-arrange", "data-control": control.id, "data-pinned": isPinned ? "" : undefined, "data-dragged": isDragged ? "" : undefined, "data-moved": isMoved ? "" : undefined, children: [_jsx("button", { type: "button", className: "forgebook-arrange__handle", "aria-label": STRINGS.moveControl(label), "aria-describedby": hintId, onPointerDown: (event) => onGrab(event, control.id), onKeyDown: step, children: _jsx(Icon, { name: "grip", size: 14 }) }), _jsxs("span", { className: "forgebook-popover__label", children: [label, isChanged ? (_jsx("span", { className: "forgebook-dot", role: "img", "aria-label": STRINGS.controlChanged(label) })) : null] }), _jsxs("div", { className: "forgebook-arrange__control", children: [_jsx(ToolbarControl, { control: control, form: "row", ...context }), description === undefined ? null : _jsx(InfoTip, { note: description, about: label })] }), _jsx(ControlKeyField, { label: label, shortcut: layout.keys[control.id], onKeyChange: (key) => layout.setKey(control.id, key) }), _jsx("button", { type: "button", className: "forgebook-icon-button", "aria-label": STRINGS.pinControl(label), title: isMoved ? STRINGS.pinnedNoRoom : STRINGS.pinControl(label), "aria-pressed": isPinned, onClick: () => layout.pin(control.id, !isPinned), children: _jsx(Icon, { name: "pin", size: 14 }) }), _jsx("button", { type: "button", className: "forgebook-icon-button", "aria-label": STRINGS.hideControl(label), title: STRINGS.hideControl(label), onClick: () => layout.hide(control.id, true), children: _jsx(Icon, { name: "eyeOff", size: 14 }) })] }));
29
+ };
30
+ //# sourceMappingURL=ControlRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlRow.js","sourceRoot":"","sources":["../../../src/shell/ControlRow.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAuB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AAGzF,uDAAuD;AACvD,MAAM,WAAW,GAAqC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAEpF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,UAAU,EACV,GAAG,OAAO,EAcX,EAAa,EAAE;IACd,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACnC,MAAM,KAAK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,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EACjC,OAAO,EAAE,GAAS,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,YAElD,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,EAAE,GAAI,GACzB,IACN,CACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * One example of a component's page: its title and description, its story in a frame, and a bar that shows its code,
3
+ * fills the page with its box (with the story's width set there) and opens its story on its own page.
4
+ *
5
+ * @module
6
+ */
7
+ import type { StoryFileCode } from "@forgebook/story-format/source";
8
+ import { type ReactNode } from "react";
9
+ import type { PanelArgs } from "../messages.ts";
10
+ import type { TreeComponent, TreeStory } from "../storyTree.ts";
11
+ import type { ViewSwitch } from "../switches.ts";
12
+ import { type ViewState } from "../viewState.ts";
13
+ import type { Loaded } from "./useLoaded.ts";
14
+ /** What every example of the page shares: the frames' address, view and reports, the code, how to open a story. */
15
+ export type ExampleContext = {
16
+ /** The component. */
17
+ readonly component: TreeComponent;
18
+ /** The view. */
19
+ readonly view: ViewState;
20
+ /** The frame page's address. */
21
+ readonly frameUrl: string;
22
+ /** The address of a story's page, for its link. */
23
+ readonly hrefOf: (story: TreeStory) => string;
24
+ /** Opens a story's page. */
25
+ readonly onOpen: (story: TreeStory) => void;
26
+ /** The view the frames loaded with. */
27
+ readonly frameView: ViewState;
28
+ /** The catalogue's switches, for the frames' addresses. */
29
+ readonly switches: readonly ViewSwitch[];
30
+ /** Each frame's reported height, by its address. */
31
+ readonly heights: ReadonlyMap<string, number>;
32
+ /** The addresses of the frames that finished loading. */
33
+ readonly settled: ReadonlySet<string>;
34
+ /** The story file's code. */
35
+ readonly code: Loaded<StoryFileCode>;
36
+ /** The component's name, for the JSX of a story drawn from its args. */
37
+ readonly componentName: string;
38
+ /** A story's own args, as its frame reported them; none before it loads. */
39
+ readonly argsOf: (storyId: string) => PanelArgs;
40
+ /** A story's measured height, for its box while it loads. */
41
+ readonly heightOf: (storyId: string) => number | undefined;
42
+ /** The colour the stories' page has, which each box waits on. */
43
+ readonly background: string | undefined;
44
+ };
45
+ /**
46
+ * One example: its title and description (the demo has none: it opens the page), its story in a frame, and a bar
47
+ * that shows its code and opens the story on its own page.
48
+ *
49
+ * @param props - the story, whether it is the demo, whether its frame may load, where the queue watches it, and what
50
+ * every example shares.
51
+ */
52
+ export declare const Example: ({ story, isDemo, isMounted, observe, ...context }: ExampleContext & {
53
+ readonly story: TreeStory;
54
+ readonly isDemo: boolean;
55
+ readonly isMounted: boolean;
56
+ readonly observe?: (element: HTMLElement | null) => void;
57
+ }) => ReactNode;
58
+ //# sourceMappingURL=Example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.d.ts","sourceRoot":"","sources":["../../../src/shell/Example.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAmB,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAW/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,mHAAmH;AACnH,MAAM,MAAM,cAAc,GAAG;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IAC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as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useId, useState } from "react";
3
+ import { frameAddress } from "../viewState.js";
4
+ import { BoxWidthControl, useBoxWidth } from "./BoxWidth.js";
5
+ import { CodeText } from "./CodeText.js";
6
+ import { useCodeWriter } from "./codeWriter.js";
7
+ import { FrameView } from "./FrameView.js";
8
+ import { Icon } from "./icons.js";
9
+ import { StageViewport } from "./StageViewport.js";
10
+ import { StoryCodeBlock, storyCodeText } from "./StoryCodeBlock.js";
11
+ import { STRINGS } from "./strings.js";
12
+ import { useCopy } from "./useCopy.js";
13
+ import { useFullPage } from "./useFullPage.js";
14
+ /** The height of a frame before its story reports its own, in CSS px. */
15
+ const FALLBACK_HEIGHT = 160;
16
+ /** The demo's height before its story reports its own, in CSS px: the demo is the page's first, larger frame. */
17
+ const DEMO_FALLBACK_HEIGHT = 280;
18
+ /** A link to a story's own page, opened in place unless the user asks for another tab. */
19
+ const StoryLink = ({ story, hrefOf, onOpen, className, label, children }) => (_jsx("a", { className: className, "aria-label": label, href: hrefOf(story), onClick: (event) => {
20
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
21
+ return;
22
+ event.preventDefault();
23
+ onOpen(story);
24
+ }, children: children }));
25
+ /**
26
+ * The code under an example: closed until asked for, then opened in place with a button that copies it.
27
+ *
28
+ * @param props - the story's code and whether it is shown.
29
+ */
30
+ const ExampleCode = ({ id, source, isShown }) => {
31
+ const { isCopied, copy } = useCopy();
32
+ const write = useCodeWriter();
33
+ return (_jsx("div", { id: id, className: "forgebook-example__code", "data-open": isShown ? "" : undefined, inert: !isShown, children: _jsxs("div", { className: "forgebook-example__code-inner", children: [_jsx("button", { type: "button", className: "forgebook-example__copy", onClick: () => copy(storyCodeText(source, write)), "aria-live": "polite", children: isCopied ? STRINGS.copied : STRINGS.copy }), _jsx(StoryCodeBlock, { ...source })] }) }));
34
+ };
35
+ /**
36
+ * The height an example's story is drawn at least at: its scene's, and over the page the room its stage has.
37
+ *
38
+ * @param story - the story.
39
+ * @param stageHeight - the stage's height while the box is over the page, in CSS px; none in the list.
40
+ */
41
+ const sceneHeightOf = (story, stageHeight) => stageHeight === undefined ? story.height : Math.max(story.height ?? 0, stageHeight);
42
+ /**
43
+ * An example's title, a link to its story's page, and its description.
44
+ *
45
+ * @param props - the story and how its link opens it.
46
+ */
47
+ const ExampleHead = ({ story, context }) => (_jsxs("header", { className: "forgebook-example__head", children: [_jsx("h4", { className: "forgebook-example__title", children: _jsx(StoryLink, { story: story, hrefOf: context.hrefOf, onOpen: context.onOpen, className: "forgebook-link", children: story.name }) }), story.description === undefined ? null : (_jsx("p", { className: "forgebook-example__description", children: _jsx(CodeText, { text: story.description }) }))] }));
48
+ /**
49
+ * What keeps an example's place while its box is over the page: a slot of its height in the list, and the shade
50
+ * under the box, a press on which brings it back.
51
+ *
52
+ * @param props - the box's state over the page.
53
+ */
54
+ const FullPageSlot = ({ full }) => (_jsxs(_Fragment, { children: [_jsx("div", { ref: full.slotRef, className: "forgebook-example__slot", style: { height: full.slotHeight } }), _jsx("div", { ref: full.shadeRef, className: "forgebook-full-shade", "aria-hidden": "true", onClick: () => full.toggle() })] }));
55
+ /**
56
+ * An example's bar: its code shown or hidden, the story's width while its box fills the page, its box filling the page
57
+ * or back in its place, and its story opened on its own page.
58
+ *
59
+ * @param props - the story, what every example shares, its code's state and its box's state over the page.
60
+ */
61
+ const ExampleBar = ({ story, context, hasCode, isCodeShown, onCodeShownChange, codeId, full, boxWidth }) => (_jsxs("div", { className: "forgebook-example__bar", children: [hasCode ? (_jsxs("button", { type: "button", className: "forgebook-example__toggle", "aria-expanded": isCodeShown, "aria-controls": codeId, onClick: () => onCodeShownChange(!isCodeShown), children: [_jsx(Icon, { name: "chevronRight", size: 12 }), isCodeShown ? STRINGS.hideCode : STRINGS.showCode] })) : null, _jsx(BoxWidthControl, { boxWidth: boxWidth }), _jsxs("button", { type: "button", className: "forgebook-example__full", "aria-label": full.isFull ? STRINGS.backToPlaceNamed(story.name) : STRINGS.fillPageNamed(story.name), onClick: (event) => full.toggle(event), children: [_jsx(Icon, { name: full.isFull ? "collapse" : "expand", size: 12 }), full.isFull ? STRINGS.backToPlace : STRINGS.fillPage] }), _jsxs(StoryLink, { story: story, hrefOf: context.hrefOf, onOpen: context.onOpen, className: "forgebook-example__open", label: STRINGS.openStoryNamed(story.name), children: [STRINGS.openStory, _jsx(Icon, { name: "external", size: 12 })] })] }));
62
+ /**
63
+ * One example: its title and description (the demo has none: it opens the page), its story in a frame, and a bar
64
+ * that shows its code and opens the story on its own page.
65
+ *
66
+ * @param props - the story, whether it is the demo, whether its frame may load, where the queue watches it, and what
67
+ * every example shares.
68
+ */
69
+ export const Example = ({ story, isDemo, isMounted, observe, ...context }) => {
70
+ const [isCodeShown, setIsCodeShown] = useState(false);
71
+ const codeId = useId();
72
+ const full = useFullPage();
73
+ const boxWidth = useBoxWidth(full.isOver, context.view.width);
74
+ // the story's measured height when there is one; a guess otherwise, larger for the demo; never below the height its
75
+ // scene needs, which its frame has from the start
76
+ const fallbackHeight = Math.max(story.height ?? 0, context.heightOf(story.id) ?? (isDemo ? DEMO_FALLBACK_HEIGHT : FALLBACK_HEIGHT));
77
+ const source = context.code.status === "ready"
78
+ ? {
79
+ code: context.code.value,
80
+ exportName: story.exportName,
81
+ componentName: context.componentName,
82
+ args: context.argsOf(story.id)
83
+ }
84
+ : undefined;
85
+ return (_jsxs("article", { ref: observe, className: "forgebook-example", "data-demo": isDemo ? "" : undefined, "aria-label": isDemo ? STRINGS.frameTitle(context.component.name, story.name) : story.name, children: [isDemo ? null : _jsx(ExampleHead, { story: story, context: context }), full.isOver ? _jsx(FullPageSlot, { full: full }) : null, _jsxs("div", { ref: full.boxRef, className: "forgebook-example__box", "data-full": full.isOver ? "" : undefined, ...(full.isFull ? { role: "dialog", "aria-label": story.name } : {}), children: [_jsx("div", { ref: full.stageRef, className: "forgebook-example__stage", children: _jsx(StageViewport, { width: boxWidth.width, onWidthChange: boxWidth.onWidthChange, onShownWidthChange: boxWidth.onShownWidthChange, background: context.background, children: isMounted ? (_jsx(FrameView, { title: STRINGS.frameTitle(context.component.name, story.name), address: frameAddress(context.frameUrl, story.id, context.frameView, context.switches), heights: context.heights, settled: context.settled, fallbackHeight: fallbackHeight,
86
+ // over the page, the story fills the room it has
87
+ sceneHeight: sceneHeightOf(story, full.stageHeight) })) : (_jsx("div", { className: "forgebook-frame-placeholder", style: { height: fallbackHeight } })) }) }), _jsx(ExampleBar, { story: story, context: context, hasCode: source !== undefined, isCodeShown: isCodeShown, onCodeShownChange: setIsCodeShown, codeId: codeId, full: full, boxWidth: boxWidth }), source === undefined ? null : _jsx(ExampleCode, { id: codeId, source: source, isShown: isCodeShown })] })] }));
88
+ };
89
+ //# sourceMappingURL=Example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Example.js","sourceRoot":"","sources":["../../../src/shell/Example.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAmC,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKzE,OAAO,EAAE,YAAY,EAAkB,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAiB,eAAe,EAAE,WAAW,EAAE,MAAM,eAAgB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAa,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAwB,aAAa,EAAE,MAAM,qBAAsB,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG9D,yEAAyE;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AC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,EACtF,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,cAAc,EAAE,cAAc;gCAC9B,iDAAiD;gCACjD,WAAW,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,GACnD,CACH,CAAC,CAAC,CAAC,CAEF,cAAK,SAAS,EAAC,6BAA6B,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAI,CACnF,GACa,GACZ,EACN,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,KAAK,SAAS,EAC7B,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,cAAc,EACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,GAClB,EACD,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAI,IAC5F,IACE,CACX,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A small info button whose note shows while the pointer is over it or it has the focus: for a control that needs a
3
+ * word of warning (the touch simulation's limits) without a paragraph under it.
4
+ *
5
+ * @remarks
6
+ * The note is a manual popover in the top layer, placed under the button (above it near the window's foot), so no
7
+ * scrolling menu or toolbar clips it; it is the button's description for screen readers as well, and Escape hides it.
8
+ *
9
+ * @module
10
+ */
11
+ import { type ReactNode } from "react";
12
+ /**
13
+ * The info button.
14
+ *
15
+ * @param props - the note, and the name of what it is about.
16
+ */
17
+ export declare const InfoTip: ({ note, about }: {
18
+ /** The note. */
19
+ readonly note: string;
20
+ /** What it is about, for the button's name (`Touch`). */
21
+ readonly about: string;
22
+ }) => ReactNode;
23
+ //# sourceMappingURL=InfoTip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoTip.d.ts","sourceRoot":"","sources":["../../../src/shell/InfoTip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAsB,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAQ1E;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,iBAGrB;IACD,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,KAAG,SA6CH,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * A small info button whose note shows while the pointer is over it or it has the focus: for a control that needs a
4
+ * word of warning (the touch simulation's limits) without a paragraph under it.
5
+ *
6
+ * @remarks
7
+ * The note is a manual popover in the top layer, placed under the button (above it near the window's foot), so no
8
+ * scrolling menu or toolbar clips it; it is the button's description for screen readers as well, and Escape hides it.
9
+ *
10
+ * @module
11
+ */
12
+ import { useId, useRef } from "react";
13
+ import { Icon } from "./icons.js";
14
+ import { STRINGS } from "./strings.js";
15
+ /** The room kept between the note, its button and the window's edges, in CSS px. */
16
+ const GAP_PX = 6;
17
+ /**
18
+ * The info button.
19
+ *
20
+ * @param props - the note, and the name of what it is about.
21
+ */
22
+ export const InfoTip = ({ note, about }) => {
23
+ const noteId = useId();
24
+ const buttonRef = useRef(null);
25
+ const noteRef = useRef(null);
26
+ const show = () => {
27
+ const button = buttonRef.current;
28
+ const tip = noteRef.current;
29
+ if (button === null || tip === null || tip.matches(":popover-open"))
30
+ return;
31
+ tip.showPopover();
32
+ const box = button.getBoundingClientRect();
33
+ const height = tip.offsetHeight;
34
+ const isAbove = box.bottom + GAP_PX + height > window.innerHeight;
35
+ const left = Math.min(Math.max(GAP_PX, box.left), window.innerWidth - tip.offsetWidth - GAP_PX);
36
+ tip.style.left = `${left}px`;
37
+ tip.style.top = `${isAbove ? box.top - GAP_PX - height : box.bottom + GAP_PX}px`;
38
+ };
39
+ const hide = () => {
40
+ if (noteRef.current?.matches(":popover-open") === true)
41
+ noteRef.current.hidePopover();
42
+ };
43
+ return (_jsxs(_Fragment, { children: [_jsx("button", { ref: buttonRef, type: "button", className: "forgebook-info-tip", "aria-label": STRINGS.aboutControl(about), "aria-describedby": noteId, onPointerEnter: show, onPointerLeave: hide, onFocus: show, onBlur: hide, onKeyDown: (event) => {
44
+ // an open note takes the first Escape; the menu around it, the next
45
+ if (event.key !== "Escape" || noteRef.current?.matches(":popover-open") !== true)
46
+ return;
47
+ event.stopPropagation();
48
+ hide();
49
+ }, children: _jsx(Icon, { name: "info", size: 14 }) }), _jsx("span", { ref: noteRef, id: noteId, className: "forgebook-info-tip__note", popover: "manual", role: "tooltip", children: note })] }));
50
+ };
51
+ //# sourceMappingURL=InfoTip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoTip.js","sourceRoot":"","sources":["../../../src/shell/InfoTip.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AACH,OAAO,EAAsC,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,oFAAoF;AACpF,MAAM,MAAM,GAAG,CAAC,CAAC;AAEjB;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACtB,IAAI,EACJ,KAAK,EAMN,EAAa,EAAE;IACd,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IACvB,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAC;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