@aussieljk/forkbook 0.0.1-14 → 0.0.1-15

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 (231) hide show
  1. package/dist/_browser-chunks/{Color-SRJLV635.js → Color-OSKHEBLS.js} +1 -1
  2. package/dist/_browser-chunks/{WithTooltip-66AWY4VQ.js → WithTooltip-IPJFQHVQ.js} +1 -1
  3. package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
  4. package/dist/_browser-chunks/{chunk-TISSQK65.js → chunk-74S4GA34.js} +1 -1
  5. package/dist/_browser-chunks/{chunk-S7N7Z5TY.js → chunk-TRXLBGLS.js} +21 -2
  6. package/dist/_browser-chunks/{chunk-J4UZWNQC.js → chunk-XRILAR4S.js} +11 -11
  7. package/dist/_node-chunks/{attached-runtime-6PIRX7CQ.js → attached-runtime-5ABH72AY.js} +28 -28
  8. package/dist/_node-chunks/{builder-manager-V5HY2EIW.js → builder-manager-4T5FVGUR.js} +18 -15
  9. package/dist/_node-chunks/{chunk-USLPZFTU.js → chunk-2FWG2MQN.js} +6 -6
  10. package/dist/_node-chunks/chunk-2YVNFDPN.js +18 -0
  11. package/dist/_node-chunks/{chunk-IWNGZZOH.js → chunk-33IC7FUB.js} +9 -9
  12. package/dist/_node-chunks/{chunk-HIUJFVVI.js → chunk-46E6YIPW.js} +7 -7
  13. package/dist/_node-chunks/{chunk-NRYRRB6R.js → chunk-4BWBFTBZ.js} +7 -7
  14. package/dist/_node-chunks/{chunk-475RIYQK.js → chunk-4ELXERU6.js} +6 -6
  15. package/dist/_node-chunks/{chunk-YAASP4OM.js → chunk-4GGXQOD4.js} +8 -8
  16. package/dist/_node-chunks/{chunk-DBZ3MV24.js → chunk-4ISTQSCO.js} +19 -7
  17. package/dist/_node-chunks/{chunk-ZDMZKYDQ.js → chunk-4XKLH4I3.js} +6 -6
  18. package/dist/_node-chunks/{chunk-DMIUL52J.js → chunk-56L6SVSQ.js} +6 -6
  19. package/dist/_node-chunks/{chunk-4IMBYVSQ.js → chunk-5NWCUFPU.js} +6 -6
  20. package/dist/_node-chunks/{chunk-6BYFV3Q7.js → chunk-5Y53QRNN.js} +6 -6
  21. package/dist/_node-chunks/{chunk-UZRRWBTM.js → chunk-6DHYHTHM.js} +8 -8
  22. package/dist/_node-chunks/{chunk-XOHD6XOU.js → chunk-6H3FQSQV.js} +52 -22
  23. package/dist/_node-chunks/{chunk-H7BW4AVF.js → chunk-6WHTGFDB.js} +6 -6
  24. package/dist/_node-chunks/{chunk-ESF43LCU.js → chunk-767UK7PX.js} +9 -9
  25. package/dist/_node-chunks/{chunk-K3M6GTPC.js → chunk-7IYNKFXW.js} +10 -10
  26. package/dist/_node-chunks/{chunk-DDKUSQFU.js → chunk-7LYHZMJO.js} +6 -6
  27. package/dist/_node-chunks/{chunk-KE27G2SG.js → chunk-7RE5WNOM.js} +7 -7
  28. package/dist/_node-chunks/{chunk-AYCHV6XS.js → chunk-A3EPCOVV.js} +7 -7
  29. package/dist/_node-chunks/chunk-AK4RPNTY.js +137 -0
  30. package/dist/_node-chunks/{chunk-H7OP7USW.js → chunk-AUUVNECB.js} +7 -7
  31. package/dist/_node-chunks/{chunk-AWQ6IMN5.js → chunk-B6JJQARD.js} +9 -9
  32. package/dist/_node-chunks/chunk-BVF25DJF.js +20 -0
  33. package/dist/_node-chunks/{chunk-CM4ALPXN.js → chunk-DASUWWHV.js} +6 -6
  34. package/dist/_node-chunks/{chunk-G7CEHU7W.js → chunk-DJPS7LWH.js} +7 -7
  35. package/dist/_node-chunks/{chunk-7F55FT5N.js → chunk-DTFPS5QE.js} +7 -7
  36. package/dist/_node-chunks/{chunk-TR5RJPQV.js → chunk-EHPAFXPB.js} +8 -8
  37. package/dist/_node-chunks/{chunk-XXQUU56M.js → chunk-FFE4YDDE.js} +9 -9
  38. package/dist/_node-chunks/{chunk-DLQVZMTD.js → chunk-FJE2XPLI.js} +6 -6
  39. package/dist/_node-chunks/{chunk-6C6EDUW3.js → chunk-FSSOM72N.js} +14 -14
  40. package/dist/_node-chunks/{chunk-PU4TVXCV.js → chunk-FVHSCRCK.js} +7 -7
  41. package/dist/_node-chunks/{chunk-2WWD7IJS.js → chunk-G6M5USWY.js} +8 -8
  42. package/dist/_node-chunks/{chunk-WWGYV7QI.js → chunk-G7NZ27DS.js} +7 -7
  43. package/dist/_node-chunks/{chunk-XAK4JWKF.js → chunk-GRJPH3NW.js} +8 -8
  44. package/dist/_node-chunks/{chunk-56Y4ZIQS.js → chunk-H4IDYTC4.js} +7 -7
  45. package/dist/_node-chunks/{chunk-PB5OW47R.js → chunk-H5AAYJZE.js} +8 -8
  46. package/dist/_node-chunks/{chunk-KO7CKNTP.js → chunk-HK47D3O3.js} +7 -7
  47. package/dist/_node-chunks/{chunk-5VLJNYCG.js → chunk-J2ZTT2OP.js} +33 -23
  48. package/dist/_node-chunks/{chunk-2DGZADP4.js → chunk-JAPFAHXG.js} +6 -6
  49. package/dist/_node-chunks/{chunk-OZM2N3ZY.js → chunk-JC4I7ZVM.js} +7 -7
  50. package/dist/_node-chunks/{chunk-YUZDQTG3.js → chunk-JCQU3LND.js} +7 -7
  51. package/dist/_node-chunks/{chunk-OGF5O46G.js → chunk-JQKD337A.js} +6 -6
  52. package/dist/_node-chunks/{chunk-QP5A3OYV.js → chunk-JYQSJLIK.js} +8 -8
  53. package/dist/_node-chunks/{chunk-4IRW4KVR.js → chunk-KFZRX33G.js} +8 -8
  54. package/dist/_node-chunks/{chunk-QVEPLFS4.js → chunk-KIAQML4H.js} +8 -8
  55. package/dist/_node-chunks/{chunk-YHXP7DMA.js → chunk-LHRQTTE7.js} +8 -8
  56. package/dist/_node-chunks/{chunk-JBQXQVOG.js → chunk-LNMVMXBN.js} +7 -7
  57. package/dist/_node-chunks/chunk-M6LN66WA.js +20 -0
  58. package/dist/_node-chunks/{chunk-DQHAJZYL.js → chunk-M75NG64K.js} +7 -7
  59. package/dist/_node-chunks/{chunk-4MFP6QG3.js → chunk-MBTS4OBP.js} +6 -6
  60. package/dist/_node-chunks/chunk-MBTTUFUX.js +11 -0
  61. package/dist/_node-chunks/{chunk-5A53X2WP.js → chunk-MLJPAH4O.js} +6 -6
  62. package/dist/_node-chunks/{chunk-T3SCXAMA.js → chunk-NGFVR7UO.js} +6 -6
  63. package/dist/_node-chunks/{chunk-IXZUAPGY.js → chunk-ONKMPF4O.js} +6 -6
  64. package/dist/_node-chunks/{chunk-CCJIZTUJ.js → chunk-OS6P62RS.js} +6 -6
  65. package/dist/_node-chunks/{chunk-PXN2IFPG.js → chunk-QAQWINPN.js} +7 -7
  66. package/dist/_node-chunks/{chunk-4RBPVBKC.js → chunk-QF4WUMRT.js} +10 -10
  67. package/dist/_node-chunks/{chunk-3MBZZMYZ.js → chunk-QF5RQWCH.js} +6 -6
  68. package/dist/_node-chunks/{chunk-TH6GIF3K.js → chunk-QZR6HJVD.js} +7 -7
  69. package/dist/_node-chunks/chunk-R5H4DAON.js +19 -0
  70. package/dist/_node-chunks/{chunk-LXLNUUFW.js → chunk-RENIT4CI.js} +6 -6
  71. package/dist/_node-chunks/{chunk-QTB7G4LF.js → chunk-SJVTZ4IO.js} +23 -23
  72. package/dist/_node-chunks/{chunk-5OVUKRFB.js → chunk-SL53Q3H4.js} +6 -6
  73. package/dist/_node-chunks/{chunk-CXSBVV4J.js → chunk-T34DVPWM.js} +6 -6
  74. package/dist/_node-chunks/{chunk-S2IX32KL.js → chunk-TVDV6YAE.js} +8 -8
  75. package/dist/_node-chunks/{chunk-CEBBAWIT.js → chunk-U6T34IDM.js} +6 -6
  76. package/dist/_node-chunks/{chunk-LGMNVTJZ.js → chunk-UAU6RMOS.js} +19 -19
  77. package/dist/_node-chunks/{chunk-3MBTHKMD.js → chunk-UMWJISED.js} +6 -6
  78. package/dist/_node-chunks/{chunk-Q7ADULRW.js → chunk-UO3EXKJC.js} +6 -6
  79. package/dist/_node-chunks/{chunk-ST7CLK7N.js → chunk-VCKRLODV.js} +8 -8
  80. package/dist/_node-chunks/{chunk-DYHMJVLZ.js → chunk-VS4AUXP2.js} +6 -6
  81. package/dist/_node-chunks/{chunk-MACS5P6Q.js → chunk-VUHK6VXL.js} +12 -12
  82. package/dist/_node-chunks/{chunk-EYZMI5JO.js → chunk-VUP4EHUR.js} +8 -8
  83. package/dist/_node-chunks/{chunk-IY3BJJVM.js → chunk-VXDKI65K.js} +26 -26
  84. package/dist/_node-chunks/{chunk-QGJV32VT.js → chunk-W32FBKF3.js} +10 -10
  85. package/dist/_node-chunks/{chunk-RH4PXLHE.js → chunk-W6AOA2O5.js} +7 -7
  86. package/dist/_node-chunks/{chunk-FMXUZSLI.js → chunk-W7352H3Q.js} +6 -6
  87. package/dist/_node-chunks/{chunk-VHSRKW3N.js → chunk-WMUNVUVG.js} +6 -6
  88. package/dist/_node-chunks/{chunk-UWM37IXC.js → chunk-WTZ24FWN.js} +8 -8
  89. package/dist/_node-chunks/{chunk-YMF2ZP77.js → chunk-X3BAGYZJ.js} +8 -8
  90. package/dist/_node-chunks/{chunk-FDWORQWO.js → chunk-XERNMHVC.js} +6 -6
  91. package/dist/_node-chunks/chunk-XU6HITGZ.js +25 -0
  92. package/dist/_node-chunks/chunk-XV76A4CX.js +47 -0
  93. package/dist/_node-chunks/{chunk-HXFN2M2F.js → chunk-XWHHBYMV.js} +6 -6
  94. package/dist/_node-chunks/{chunk-WDSTXRQP.js → chunk-Y3FJT543.js} +7 -7
  95. package/dist/_node-chunks/{chunk-LBAKDZV6.js → chunk-YHYL4HYS.js} +6 -6
  96. package/dist/_node-chunks/{chunk-CH5FN27Z.js → chunk-ZNT3JZI2.js} +7 -7
  97. package/dist/_node-chunks/{chunk-NZ2SSNU7.js → chunk-ZPWEQZYR.js} +7 -7
  98. package/dist/_node-chunks/{chunk-PTMZZHGA.js → chunk-ZSTCVYOA.js} +6 -6
  99. package/dist/_node-chunks/dist-2H6YEUMD.js +16 -0
  100. package/dist/_node-chunks/dist-HL4THRGZ.js +27 -0
  101. package/dist/_node-chunks/{local-runtime-2DFMXO2N.js → local-runtime-W3N7O65Q.js} +19 -19
  102. package/dist/_node-chunks/{mdx-plugin-FEC4UKBF.js → mdx-plugin-NVSAW2N3.js} +13 -13
  103. package/dist/_node-chunks/{monorepo-TRTFPD3M.js → monorepo-JDWM46J3.js} +11 -11
  104. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-D3VPQGCI.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-56HEREMG.js} +11 -11
  105. package/dist/_node-chunks/optimized-tests-VZGTWCG4.js +22 -0
  106. package/dist/_node-chunks/{pattern-copy-play-ZUQ2ZQ7T.js → pattern-copy-play-ZWHYXQK5.js} +9 -9
  107. package/dist/_node-chunks/postinstallAddon-5TRUTJXJ.js +20 -0
  108. package/dist/_node-chunks/{rehype-external-links-MEOVNWZI.js → rehype-external-links-ME2XNDXH.js} +9 -9
  109. package/dist/_node-chunks/{rehype-slug-RRLOM7B4.js → rehype-slug-2UJLYPC6.js} +9 -9
  110. package/dist/_node-chunks/{relaxed-limits-RGYTFJP3.js → relaxed-limits-XWE3S456.js} +11 -11
  111. package/dist/_node-chunks/{run-FRTM74WS.js → run-5YG73LXV.js} +17 -17
  112. package/dist/_node-chunks/{run-YVMIX6AJ.js → run-DNDPGCFE.js} +15 -15
  113. package/dist/_node-chunks/{setup-4TBDLNSA.js → setup-MDNSLQIJ.js} +8 -8
  114. package/dist/_node-chunks/{vitest.config.4.template-GCYBLHAD.js → vitest.config.4.template-TXAUMPSS.js} +7 -7
  115. package/dist/addon-a11y/manager.js +4 -4
  116. package/dist/addon-a11y/preset.js +7 -7
  117. package/dist/addon-comments/manager.js +346 -0
  118. package/dist/addon-comments/preset.js +52 -0
  119. package/dist/addon-comments/preview.js +101 -0
  120. package/dist/addon-docs/blocks.js +10 -10
  121. package/dist/addon-docs/manager.js +1 -1
  122. package/dist/addon-docs/preset.js +10 -10
  123. package/dist/addon-links/preview.d.ts +1 -1
  124. package/dist/addon-mcp/preset.js +138 -38
  125. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +13 -1
  126. package/dist/addon-themes/postinstall.js +7 -7
  127. package/dist/addon-vitest/constants.js +8 -8
  128. package/dist/addon-vitest/manager.js +3 -3
  129. package/dist/addon-vitest/node/coverage-reporter.js +8 -8
  130. package/dist/addon-vitest/node/vitest.js +16 -16
  131. package/dist/addon-vitest/postinstall.js +10 -10
  132. package/dist/addon-vitest/preset.js +14 -14
  133. package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
  134. package/dist/addon-vitest/vitest-plugin/index.js +12 -12
  135. package/dist/babel/index.js +11 -11
  136. package/dist/bin/core.js +56 -56
  137. package/dist/bin/dispatcher.js +10 -10
  138. package/dist/bin/loader.js +8 -8
  139. package/dist/builder-vite/index.js +15 -15
  140. package/dist/builder-vite/preset.js +13 -13
  141. package/dist/channels/index.d.ts +2 -2
  142. package/dist/channels/index.js +68 -17
  143. package/dist/{chunk-BCG2ui5q.d.ts → chunk-BRMwIGWt.d.ts} +14 -3
  144. package/dist/{chunk-LWwxlbee.d.ts → chunk-C4-cnJ1R.d.ts} +1 -1
  145. package/dist/{chunk-u_gGuTrz.d.ts → chunk-QtkUsZCs.d.ts} +27 -2
  146. package/dist/{chunk-BV_hETtB.d.ts → chunk-s5Ka0eSs.d.ts} +1 -1
  147. package/dist/cli/index.d.ts +1 -1
  148. package/dist/cli/index.js +21 -21
  149. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  150. package/dist/cli/tools/sdk/child-host.js +17 -17
  151. package/dist/cli/tools/sdk/index.d.ts +2 -2
  152. package/dist/cli/tools/sdk/index.js +18 -18
  153. package/dist/cli-commands/bin/index.js +7 -7
  154. package/dist/common/index.d.ts +3 -3
  155. package/dist/common/index.js +34 -34
  156. package/dist/components/index.js +29 -29
  157. package/dist/core-events/index.d.ts +3 -2
  158. package/dist/core-events/index.js +3 -1
  159. package/dist/core-server/index.d.ts +23 -3
  160. package/dist/core-server/index.js +206 -103
  161. package/dist/core-server/presets/common-manager.js +17 -9
  162. package/dist/core-server/presets/common-override-preset.js +10 -10
  163. package/dist/core-server/presets/common-preset.js +38 -38
  164. package/dist/create/bin/index.js +7 -7
  165. package/dist/create/index.js +15 -15
  166. package/dist/csf/index.js +1 -1
  167. package/dist/csf-tools/index.js +12 -12
  168. package/dist/manager/_manager-chunks/{globals-runtime-BIrCHXzl.js → globals-runtime-BUEqXras.js} +4 -4
  169. package/dist/manager/_manager-chunks/{globals-runtime-CHSN7ayG.js → globals-runtime-BsHjh8rR.js} +2 -2
  170. package/dist/manager/_manager-chunks/{globals-runtime-tTC_6sNF.js → globals-runtime-CQ0Et7dZ.js} +2 -2
  171. package/dist/manager/_manager-chunks/{globals-runtime-Cw7lbjdT.js → globals-runtime-DChrMWvh.js} +1 -1
  172. package/dist/manager/_manager-chunks/{globals-runtime-LBSQHYdZ.js → globals-runtime-DiIxNujJ.js} +2 -2
  173. package/dist/manager/_manager-chunks/{globals-runtime-BypvnYKb.js → globals-runtime-DjkYleFR.js} +174 -104
  174. package/dist/manager/_manager-chunks/{runtime-Db8fJ2MP.js → runtime-BMoEpoix.js} +24 -21
  175. package/dist/manager/_manager-chunks/{runtime-DNudxxRZ.js → runtime-BWASr_zc.js} +2 -2
  176. package/dist/manager/_manager-chunks/{runtime-BjFN_NTg.js → runtime-B_e-Zdqt.js} +12 -8
  177. package/dist/manager/_manager-chunks/{runtime-CmF_ONjM.js → runtime-CEi1oIg2.js} +420 -326
  178. package/dist/manager/_manager-chunks/{runtime-DAe0yHIe.js → runtime-CLIeRJL-.js} +2 -2
  179. package/dist/manager/_manager-chunks/{runtime-Bm0yxY5O.js → runtime-CWZ9qCi4.js} +51 -24
  180. package/dist/manager/_manager-chunks/{runtime-DE1NZ9Fx.js → runtime-CXOuNYw-.js} +3 -3
  181. package/dist/manager/_manager-chunks/{runtime-BUwzOVia.js → runtime-C_H6vGzi.js} +6 -5
  182. package/dist/manager/_manager-chunks/{runtime-X3QUx4F_.js → runtime-Dn2myy1z.js} +8 -8
  183. package/dist/manager/_manager-chunks/{runtime-CZtDJIYj.js → runtime-TSEq5lJd.js} +1 -1
  184. package/dist/manager/globals-runtime.js +1 -1
  185. package/dist/manager/runtime.js +1 -1
  186. package/dist/manager-api/index.d.ts +1 -1
  187. package/dist/manager-errors.d.ts +1 -1
  188. package/dist/mcp/index.js +8 -8
  189. package/dist/mocking-utils/index.js +9 -9
  190. package/dist/nextjs-vite/node/index.js +7 -7
  191. package/dist/nextjs-vite/preset.js +15 -11
  192. package/dist/nextjs-vite/vite-plugin/index.js +7 -7
  193. package/dist/nextjs-vite-plugin/index.js +8 -8
  194. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  195. package/dist/node-logger/index.js +9 -9
  196. package/dist/oxc-parser/index.js +10 -10
  197. package/dist/oxc-parser/worker.js +10 -10
  198. package/dist/preview/_chunks/{runtime-tyJLgv6h.js → runtime-COMyPEkR.js} +97 -27
  199. package/dist/preview/_chunks/{runtime-CdZ1yk7m.js → runtime-CqTqsVg2.js} +2 -2
  200. package/dist/preview/_chunks/{runtime-U1Ycy25F.js → runtime-CrKf1OM4.js} +2 -2
  201. package/dist/preview/_chunks/{runtime-CsO4apr9.js → runtime-YJlypwja.js} +30 -5
  202. package/dist/preview/runtime.js +1 -1
  203. package/dist/preview-api/index.d.ts +2 -2
  204. package/dist/preview-api/index.js +1 -1
  205. package/dist/preview-errors.d.ts +1 -1
  206. package/dist/react/docgen/docgen-worker.js +11 -11
  207. package/dist/react/preset.js +13 -13
  208. package/dist/react-native/bin/get-stories.js +8 -8
  209. package/dist/react-native/metro/node.js +10 -10
  210. package/dist/react-native/metro/withForkbook.js +13 -13
  211. package/dist/react-native/scripts/generate.js +8 -8
  212. package/dist/react-vite/node/index.js +7 -7
  213. package/dist/react-vite/preset.d.ts +3 -1
  214. package/dist/react-vite/preset.js +16 -9
  215. package/dist/server-errors.d.ts +1 -1
  216. package/dist/server-errors.js +9 -9
  217. package/dist/shared/open-service/index.d.ts +1 -1
  218. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  219. package/dist/telemetry/index.js +11 -11
  220. package/dist/types/index.d.ts +2 -2
  221. package/package.json +13 -1
  222. package/dist/_node-chunks/chunk-DGXCQ24N.js +0 -20
  223. package/dist/_node-chunks/chunk-HLVUFCKZ.js +0 -18
  224. package/dist/_node-chunks/chunk-K5OUTGSQ.js +0 -25
  225. package/dist/_node-chunks/chunk-RG3VKQXD.js +0 -11
  226. package/dist/_node-chunks/chunk-SAVT2SUC.js +0 -20
  227. package/dist/_node-chunks/chunk-UOIQLKIA.js +0 -19
  228. package/dist/_node-chunks/dist-474BX4RE.js +0 -27
  229. package/dist/_node-chunks/dist-U25X3BJ2.js +0 -16
  230. package/dist/_node-chunks/optimized-tests-4LM55CRN.js +0 -22
  231. package/dist/_node-chunks/postinstallAddon-OUVXGSJV.js +0 -20
@@ -1,32 +1,32 @@
1
- import CJS_COMPAT_NODE_URL_8s9wmxw3hps from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8s9wmxw3hps from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8s9wmxw3hps from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8s9wmxw3hps.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8s9wmxw3hps.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8s9wmxw3hps.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  initiate
14
- } from "./chunk-MACS5P6Q.js";
15
- import "./chunk-AWQ6IMN5.js";
16
- import "./chunk-DYHMJVLZ.js";
14
+ } from "./chunk-VUHK6VXL.js";
15
+ import "./chunk-B6JJQARD.js";
16
+ import "./chunk-VS4AUXP2.js";
17
17
  import {
18
18
  version
19
- } from "./chunk-HLVUFCKZ.js";
19
+ } from "./chunk-2YVNFDPN.js";
20
20
  import {
21
21
  e,
22
22
  i
23
- } from "./chunk-2DGZADP4.js";
24
- import "./chunk-DLQVZMTD.js";
25
- import "./chunk-ZDMZKYDQ.js";
26
- import "./chunk-3MBZZMYZ.js";
27
- import "./chunk-WDSTXRQP.js";
28
- import "./chunk-OGF5O46G.js";
29
- import "./chunk-DDKUSQFU.js";
23
+ } from "./chunk-JAPFAHXG.js";
24
+ import "./chunk-FJE2XPLI.js";
25
+ import "./chunk-4XKLH4I3.js";
26
+ import "./chunk-QF5RQWCH.js";
27
+ import "./chunk-Y3FJT543.js";
28
+ import "./chunk-JQKD337A.js";
29
+ import "./chunk-7LYHZMJO.js";
30
30
 
31
31
  // src/create/bin/run.ts
32
32
  import { ProjectType } from "@aussieljk/forkbook/internal/cli";
@@ -1,37 +1,37 @@
1
- import CJS_COMPAT_NODE_URL_8s9wmxw3hps from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8s9wmxw3hps from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8s9wmxw3hps from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8s9wmxw3hps.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8s9wmxw3hps.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8s9wmxw3hps.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  postinstallAddon
14
- } from "./chunk-WWGYV7QI.js";
14
+ } from "./chunk-G7NZ27DS.js";
15
15
  import {
16
16
  version
17
- } from "./chunk-HLVUFCKZ.js";
17
+ } from "./chunk-2YVNFDPN.js";
18
18
  import {
19
19
  leven
20
- } from "./chunk-CEBBAWIT.js";
21
- import "./chunk-WDSTXRQP.js";
22
- import "./chunk-OGF5O46G.js";
20
+ } from "./chunk-U6T34IDM.js";
21
+ import "./chunk-Y3FJT543.js";
22
+ import "./chunk-JQKD337A.js";
23
23
  import {
24
24
  require_picocolors
25
- } from "./chunk-DQHAJZYL.js";
25
+ } from "./chunk-M75NG64K.js";
26
26
  import {
27
27
  glob
28
- } from "./chunk-4IRW4KVR.js";
29
- import "./chunk-RH4PXLHE.js";
28
+ } from "./chunk-KFZRX33G.js";
29
+ import "./chunk-W6AOA2O5.js";
30
30
  import {
31
31
  __commonJS,
32
32
  __require,
33
33
  __toESM
34
- } from "./chunk-DDKUSQFU.js";
34
+ } from "./chunk-7LYHZMJO.js";
35
35
 
36
36
  // ../../node_modules/envinfo/dist/envinfo.js
37
37
  var require_envinfo = __commonJS({
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_8s9wmxw3hps from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8s9wmxw3hps from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8s9wmxw3hps from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8s9wmxw3hps.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8s9wmxw3hps.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8s9wmxw3hps.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  getTypeImportSource
14
- } from "./chunk-USLPZFTU.js";
15
- import "./chunk-DDKUSQFU.js";
14
+ } from "./chunk-2FWG2MQN.js";
15
+ import "./chunk-7LYHZMJO.js";
16
16
 
17
17
  // src/cli/skills/content/setup-prompts/setup.ts
18
18
  import { getVitestStorybookRunCommand } from "@aussieljk/forkbook/internal/common";
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_8s9wmxw3hps from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8s9wmxw3hps from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8s9wmxw3hps from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8s9wmxw3hps.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8s9wmxw3hps.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8s9wmxw3hps.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "./chunk-DDKUSQFU.js";
12
+ import "./chunk-7LYHZMJO.js";
13
13
 
14
14
  // raw:../../assets/addon-vitest/templates/vitest.config.4.template.ts
15
15
  var vitest_config_4_template_default = `import path from 'node:path';
@@ -907,7 +907,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
907
907
  let style = document.createElement("style");
908
908
  style.setAttribute("data-fb-css", id), style.textContent = ".fb-fcntIq-syntaxHighlighter{font-size:var(--fb-size-s1)}.fb-fcntIq-info{flex-direction:column;display:flex}.fb-fcntIq-ruleId{color:var(--fb-text-muted-color);font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);margin-top:-8px;margin-bottom:12px;display:block;@container (width>=800px){display:none}}.fb-fcntIq-description{margin:0}.fb-fcntIq-wrapper{flex-direction:column;gap:20px;padding:0 15px 20px;display:flex}.fb-fcntIq-columns{gap:15px;@container (width>=800px){grid-template-columns:50% 50%;display:grid}}.fb-fcntIq-content{border-left:none;flex-direction:column;gap:15px;margin:0;padding:0;display:none;&[data-side=left]{border-left:1px solid var(--fb-color-border);margin:15px 0;padding:0 15px;display:flex}&:focus-visible{box-shadow:0 0 0 1px inset var(--fb-color-secondary);border-radius:4px;outline:none}@container (width>=800px){display:flex;&[data-side=left]{display:none}}}.fb-fcntIq-item{font-family:var(--fb-font-mono);font-weight:var(--fb-weight-regular);color:var(--fb-text-muted-color);text-overflow:ellipsis;white-space:nowrap;text-align:left;width:100%;height:40px;padding:0 12px;display:block;overflow:hidden;&[data-active]{color:var(--fb-color-secondary);background-color:var(--fb-background-hoverable)}}.fb-fcntIq-messages{flex-direction:column;gap:10px;display:flex}.fb-fcntIq-actions{gap:10px;display:flex}", document.head.appendChild(style);
909
909
  }
910
- var Details_default = { wrapper: "fb-fcntIq-wrapper", actions: "fb-fcntIq-actions", content: "fb-fcntIq-content", description: "fb-fcntIq-description", ruleId: "fb-fcntIq-ruleId", columns: "fb-fcntIq-columns", syntaxHighlighter: "fb-fcntIq-syntaxHighlighter", info: "fb-fcntIq-info", messages: "fb-fcntIq-messages", item: "fb-fcntIq-item" };
910
+ var Details_default = { syntaxHighlighter: "fb-fcntIq-syntaxHighlighter", ruleId: "fb-fcntIq-ruleId", wrapper: "fb-fcntIq-wrapper", item: "fb-fcntIq-item", description: "fb-fcntIq-description", columns: "fb-fcntIq-columns", info: "fb-fcntIq-info", messages: "fb-fcntIq-messages", content: "fb-fcntIq-content", actions: "fb-fcntIq-actions" };
911
911
 
912
912
  // src/addon-a11y/components/Report/Details.tsx
913
913
  import { Fragment as Fragment2, jsx as jsx2, jsxs } from "react/jsx-runtime";
@@ -1027,7 +1027,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id2}"
1027
1027
  let style = document.createElement("style");
1028
1028
  style.setAttribute("data-fb-css", id2), style.textContent = ".fb-Rcvs-q-wrapper{border-bottom:1px solid var(--fb-app-border-color);width:100%;font-size:var(--fb-size-s2);flex-direction:column;display:flex;container-type:inline-size}.fb-Rcvs-q-icon{transition:transform .1s ease-in-out}.fb-Rcvs-q-headerBar{min-height:40px;color:inherit;text-align:left;cursor:pointer;background:0 0;justify-content:space-between;align-items:center;gap:6px;width:100%;padding:6px 10px 6px 15px;display:flex;&:hover{color:var(--fb-color-secondary)}}.fb-Rcvs-q-title{font-size:var(--fb-size-s2);flex-grow:1;align-items:baseline;gap:8px;display:flex}.fb-Rcvs-q-ruleId{color:var(--fb-text-muted-color);font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);display:none;@container (width>=800px){display:block}}.fb-Rcvs-q-count{color:var(--fb-text-muted-color);justify-content:center;align-items:center;width:28px;height:28px;display:flex}", document.head.appendChild(style);
1029
1029
  }
1030
- var Report_default = { wrapper: "fb-Rcvs-q-wrapper", title: "fb-Rcvs-q-title", ruleId: "fb-Rcvs-q-ruleId", count: "fb-Rcvs-q-count", icon: "fb-Rcvs-q-icon", headerBar: "fb-Rcvs-q-headerBar" };
1030
+ var Report_default = { title: "fb-Rcvs-q-title", count: "fb-Rcvs-q-count", headerBar: "fb-Rcvs-q-headerBar", wrapper: "fb-Rcvs-q-wrapper", icon: "fb-Rcvs-q-icon", ruleId: "fb-Rcvs-q-ruleId" };
1031
1031
 
1032
1032
  // src/addon-a11y/components/Report/Report.tsx
1033
1033
  import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -1109,7 +1109,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id3}"
1109
1109
  let style = document.createElement("style");
1110
1110
  style.setAttribute("data-fb-css", id3), style.textContent = ".fb-bXrCLq-container{flex-direction:column;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.fb-bXrCLq-actions{justify-content:flex-end;gap:6px;display:flex}", document.head.appendChild(style);
1111
1111
  }
1112
- var Tabs_default = { container: "fb-bXrCLq-container", actions: "fb-bXrCLq-actions" };
1112
+ var Tabs_default = { actions: "fb-bXrCLq-actions", container: "fb-bXrCLq-container" };
1113
1113
 
1114
1114
  // src/addon-a11y/components/Tabs.tsx
1115
1115
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -1218,7 +1218,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id5}"
1218
1218
  let style = document.createElement("style");
1219
1219
  style.setAttribute("data-fb-css", id5), style.textContent = ".fb-qxvdxW-rotatingIcon{margin:4px;animation:1s linear infinite fb-qxvdxW-rotate360}@keyframes fb-qxvdxW-rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fb-qxvdxW-tab{align-items:center;gap:6px;display:flex}.fb-qxvdxW-centered{text-align:center;font-size:var(--fb-size-s2);flex-direction:column;justify-content:center;align-items:center;gap:24px;height:100%;display:flex;& div{flex-direction:column;align-items:center;gap:8px;display:flex}& p{color:var(--fb-text-muted-color);margin:0}& code{font-size:calc(var(--fb-size-s2) - 1px);background-color:var(--fb-background-app);border:1px solid var(--fb-color-border);border-radius:4px;padding:2px 3px;display:inline-block}}", document.head.appendChild(style);
1220
1220
  }
1221
- var A11YPanel_default = { centered: "fb-qxvdxW-centered", rotate360: "fb-qxvdxW-rotate360", rotatingIcon: "fb-qxvdxW-rotatingIcon", tab: "fb-qxvdxW-tab" };
1221
+ var A11YPanel_default = { rotatingIcon: "fb-qxvdxW-rotatingIcon", tab: "fb-qxvdxW-tab", centered: "fb-qxvdxW-centered", rotate360: "fb-qxvdxW-rotate360" };
1222
1222
 
1223
1223
  // src/addon-a11y/components/A11YPanel.tsx
1224
1224
  import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_8s9wmxw3hps from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8s9wmxw3hps from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8s9wmxw3hps from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8s9wmxw3hps.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8s9wmxw3hps.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8s9wmxw3hps.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "../_node-chunks/chunk-DDKUSQFU.js";
12
+ import "../_node-chunks/chunk-7LYHZMJO.js";
13
13
 
14
14
  // src/addon-a11y/preset.ts
15
15
  var isAddonA11yEnabled = !0;
@@ -0,0 +1,346 @@
1
+ import {
2
+ ADDON_ID,
3
+ COMMENTS_API_PATH,
4
+ EVENTS,
5
+ PANEL_ID,
6
+ TOOL_ID
7
+ } from "../_browser-chunks/chunk-4ZGQ4YQ2.js";
8
+ import "../_browser-chunks/chunk-IMSF75WX.js";
9
+
10
+ // src/addon-comments/manager.tsx
11
+ import { ToggleButton } from "@aussieljk/forkbook/internal/components";
12
+ import { addons, types, useAddonState as useAddonState2, useStorybookApi as useStorybookApi2 } from "@aussieljk/forkbook/manager-api";
13
+ import { MessageSquareTextIcon } from "lucide-react";
14
+
15
+ // src/addon-comments/components/CommentsPanel.tsx
16
+ import { useCallback, useEffect, useState } from "react";
17
+ import { Button as Button2, ScrollArea } from "@aussieljk/forkbook/internal/components";
18
+ import { useAddonState, useStorybookApi, useStorybookState } from "@aussieljk/forkbook/manager-api";
19
+
20
+ // src/addon-comments/client.ts
21
+ var parse = async (response) => {
22
+ let body = await response.json().catch(() => ({}));
23
+ if (!response.ok)
24
+ throw new Error(body.error ?? `Comments request failed (${response.status})`);
25
+ return body;
26
+ };
27
+ async function fetchComments(fetchImpl = fetch) {
28
+ return (await parse(
29
+ await fetchImpl(COMMENTS_API_PATH, { headers: { Accept: "application/json" } })
30
+ )).comments ?? [];
31
+ }
32
+ async function sendCommentAction(action, fetchImpl = fetch) {
33
+ return (await parse(
34
+ await fetchImpl(COMMENTS_API_PATH, {
35
+ method: "POST",
36
+ headers: { "Content-Type": "application/json" },
37
+ body: JSON.stringify(action)
38
+ })
39
+ )).comment;
40
+ }
41
+
42
+ // src/addon-comments/state.ts
43
+ var DEFAULT_STATE = { picking: !1 };
44
+
45
+ // src/addon-comments/components/CommentList.tsx
46
+ import { Button, useCopyButton } from "@aussieljk/forkbook/internal/components";
47
+
48
+ // src/addon-comments/prompt.ts
49
+ var formatArgs = (args) => {
50
+ if (!(!args || Object.keys(args).length === 0))
51
+ try {
52
+ return JSON.stringify(args, null, 2);
53
+ } catch {
54
+ return;
55
+ }
56
+ };
57
+ function formatCommentPrompt(comment) {
58
+ let lines = [`Story: ${comment.title} / ${comment.name} (id: ${comment.storyId})`];
59
+ comment.importPath && lines.push(`File: ${comment.importPath}`), comment.element ? (lines.push(`Element: \`${comment.element.selector}\``), comment.element.text && lines.push(`Element text: "${comment.element.text}"`)) : lines.push("Element: the whole story");
60
+ let args = formatArgs(comment.args);
61
+ return args && lines.push("Args:", "```json", args, "```"), lines.push(`Note: ${comment.note}`), lines.push(`Comment id: ${comment.id}`), lines.join(`
62
+ `);
63
+ }
64
+ function formatCommentsPrompt(comments) {
65
+ return comments.length === 0 ? "There are no open Forkbook comments." : [
66
+ comments.length === 1 ? "Please address this Forkbook comment on a story." : `Please address these ${comments.length} Forkbook comments on stories.`,
67
+ ...comments.map((comment, index) => `## Comment ${index + 1}
68
+ ${formatCommentPrompt(comment)}`),
69
+ "When you finish a comment, resolve it with the `resolve_comment` MCP tool (Forkbook addon-mcp). Give its id and a short reply."
70
+ ].join(`
71
+
72
+ `);
73
+ }
74
+
75
+ // forkbook-css:/home/runner/work/forkbook/forkbook/code/core/src/addon-comments/components/Comments.module.css
76
+ var id = "core/src/addon-comments/components/Comments.module.css";
77
+ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]`)) {
78
+ let style = document.createElement("style");
79
+ style.setAttribute("data-fb-css", id), style.textContent = ".fb-Y5e6Rq-panel{flex-direction:column;gap:12px;padding:12px;display:flex}.fb-Y5e6Rq-row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.fb-Y5e6Rq-form{flex-direction:column;gap:6px;display:flex}.fb-Y5e6Rq-muted{font-size:var(--fb-size-s1);color:var(--fb-text-muted-color);flex-wrap:wrap;gap:6px;display:flex}.fb-Y5e6Rq-input{box-sizing:border-box;width:100%;min-height:64px;font:inherit;font-size:var(--fb-size-s2);color:var(--fb-color-default-text);background:var(--fb-input-background);border:1px solid var(--fb-input-border);border-radius:var(--fb-app-border-radius);padding:8px}.fb-Y5e6Rq-error{color:var(--fb-color-negative-text);font-size:var(--fb-size-s1)}.fb-Y5e6Rq-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.fb-Y5e6Rq-item{border:1px solid var(--fb-app-border-color);border-radius:var(--fb-app-border-radius);flex-direction:column;gap:6px;padding:10px;display:flex}.fb-Y5e6Rq-current{border-color:var(--fb-color-secondary)}.fb-Y5e6Rq-resolved{opacity:.6}.fb-Y5e6Rq-note{font-size:var(--fb-size-s2);white-space:pre-wrap;margin:0}.fb-Y5e6Rq-code{font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);word-break:break-all}.fb-Y5e6Rq-link{all:unset;cursor:pointer;color:var(--fb-color-secondary)}", document.head.appendChild(style);
80
+ }
81
+ var Comments_default = { row: "fb-Y5e6Rq-row", current: "fb-Y5e6Rq-current", panel: "fb-Y5e6Rq-panel", form: "fb-Y5e6Rq-form", resolved: "fb-Y5e6Rq-resolved", muted: "fb-Y5e6Rq-muted", code: "fb-Y5e6Rq-code", input: "fb-Y5e6Rq-input", list: "fb-Y5e6Rq-list", error: "fb-Y5e6Rq-error", item: "fb-Y5e6Rq-item", link: "fb-Y5e6Rq-link", note: "fb-Y5e6Rq-note" };
82
+
83
+ // src/addon-comments/components/CommentList.tsx
84
+ import { jsx, jsxs } from "react/jsx-runtime";
85
+ var CopyForClaude = ({ comment }) => {
86
+ let { children, buttonProps } = useCopyButton({
87
+ content: formatCommentsPrompt([comment]),
88
+ children: "Copy for Claude",
89
+ ariaLabel: !1
90
+ });
91
+ return jsx(Button, { size: "small", variant: "outline", ...buttonProps, children });
92
+ }, CopyAllOpen = ({ comments }) => {
93
+ let open = comments.filter((comment) => comment.status === "open"), { children, buttonProps } = useCopyButton({
94
+ content: formatCommentsPrompt(open),
95
+ children: `Copy all open (${open.length})`,
96
+ ariaLabel: !1
97
+ });
98
+ return jsx(Button, { size: "small", variant: "solid", disabled: open.length === 0, ...buttonProps, children });
99
+ }, CommentList = ({
100
+ comments,
101
+ currentStoryId,
102
+ onResolve,
103
+ onReopen,
104
+ onDelete,
105
+ onSelectStory
106
+ }) => comments.length === 0 ? jsx("div", { className: Comments_default.muted, children: "No comments yet." }) : jsx("ol", { className: Comments_default.list, "aria-label": "Comments", children: comments.map((comment) => jsxs(
107
+ "li",
108
+ {
109
+ className: [
110
+ Comments_default.item,
111
+ comment.storyId === currentStoryId ? Comments_default.current : "",
112
+ comment.status === "resolved" ? Comments_default.resolved : ""
113
+ ].join(" "),
114
+ "data-comment-id": comment.id,
115
+ children: [
116
+ jsxs("div", { className: Comments_default.muted, children: [
117
+ onSelectStory ? jsxs("button", { type: "button", className: Comments_default.link, onClick: () => onSelectStory(comment), children: [
118
+ comment.title,
119
+ " / ",
120
+ comment.name
121
+ ] }) : jsxs("span", { children: [
122
+ comment.title,
123
+ " / ",
124
+ comment.name
125
+ ] }),
126
+ jsx("span", { children: comment.status === "resolved" ? "Resolved" : "Open" })
127
+ ] }),
128
+ comment.element ? jsx("code", { className: Comments_default.code, title: comment.element.text, children: comment.element.selector }) : jsx("div", { className: Comments_default.muted, children: "Whole story" }),
129
+ jsx("p", { className: Comments_default.note, children: comment.note }),
130
+ comment.reply && jsxs("div", { className: Comments_default.muted, children: [
131
+ "Reply: ",
132
+ comment.reply
133
+ ] }),
134
+ jsxs("div", { className: Comments_default.row, children: [
135
+ jsx(CopyForClaude, { comment }),
136
+ comment.status === "open" ? jsx(
137
+ Button,
138
+ {
139
+ size: "small",
140
+ variant: "ghost",
141
+ ariaLabel: !1,
142
+ onClick: () => onResolve(comment),
143
+ children: "Resolve"
144
+ }
145
+ ) : jsx(
146
+ Button,
147
+ {
148
+ size: "small",
149
+ variant: "ghost",
150
+ ariaLabel: !1,
151
+ onClick: () => onReopen(comment),
152
+ children: "Reopen"
153
+ }
154
+ ),
155
+ jsx(
156
+ Button,
157
+ {
158
+ size: "small",
159
+ variant: "ghost",
160
+ ariaLabel: !1,
161
+ onClick: () => onDelete(comment),
162
+ children: "Delete"
163
+ }
164
+ )
165
+ ] })
166
+ ]
167
+ },
168
+ comment.id
169
+ )) });
170
+
171
+ // src/addon-comments/components/CommentsPanel.tsx
172
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
173
+ var toJsonArgs = (args) => {
174
+ if (args)
175
+ try {
176
+ return JSON.parse(JSON.stringify(args));
177
+ } catch {
178
+ return;
179
+ }
180
+ }, CommentsPanel = ({ active }) => {
181
+ let api = useStorybookApi(), { storyId } = useStorybookState(), [state, setState] = useAddonState(ADDON_ID, DEFAULT_STATE), [comments, setComments] = useState([]), [note, setNote] = useState(""), [filter, setFilter] = useState("open"), [error, setError] = useState(), reload = useCallback(async () => {
182
+ try {
183
+ setComments(await fetchComments()), setError(void 0);
184
+ } catch (err) {
185
+ setError(err instanceof Error ? err.message : String(err));
186
+ }
187
+ }, []);
188
+ useEffect(() => {
189
+ active && reload();
190
+ }, [active, reload]);
191
+ let run = async (action) => {
192
+ try {
193
+ await sendCommentAction(action), await reload();
194
+ } catch (err) {
195
+ setError(err instanceof Error ? err.message : String(err));
196
+ }
197
+ }, composing = !!state.pending || !!state.wholeStory, startPick = () => {
198
+ setState({ picking: !0 }), api.emit(EVENTS.PICK_START);
199
+ }, cancel = () => {
200
+ state.picking && api.emit(EVENTS.PICK_CANCEL), setState(DEFAULT_STATE), setNote("");
201
+ }, save = async () => {
202
+ let story = api.getCurrentStoryData();
203
+ !story || story.type !== "story" || !note.trim() || (await run({
204
+ action: "add",
205
+ comment: {
206
+ storyId: story.id,
207
+ title: story.title,
208
+ name: story.name,
209
+ importPath: story.importPath,
210
+ element: state.pending,
211
+ args: toJsonArgs(story.args),
212
+ note
213
+ }
214
+ }), setNote(""), setState(DEFAULT_STATE));
215
+ }, shown = filter === "open" ? comments.filter((c) => c.status === "open") : comments;
216
+ return jsx2(ScrollArea, { vertical: !0, children: jsxs2("div", { className: Comments_default.panel, children: [
217
+ jsxs2("div", { className: Comments_default.row, children: [
218
+ jsx2(
219
+ Button2,
220
+ {
221
+ size: "small",
222
+ variant: "solid",
223
+ ariaLabel: !1,
224
+ onClick: startPick,
225
+ disabled: state.picking,
226
+ children: state.picking ? "Click an element in the story\u2026" : "Add comment on element"
227
+ }
228
+ ),
229
+ jsx2(
230
+ Button2,
231
+ {
232
+ size: "small",
233
+ variant: "outline",
234
+ onClick: () => setState({ picking: !1, wholeStory: !0 }),
235
+ children: "Comment on whole story"
236
+ }
237
+ ),
238
+ (state.picking || composing) && jsx2(Button2, { size: "small", variant: "ghost", ariaLabel: !1, onClick: cancel, children: "Cancel" })
239
+ ] }),
240
+ composing && jsxs2(
241
+ "form",
242
+ {
243
+ className: Comments_default.form,
244
+ onSubmit: (event) => {
245
+ event.preventDefault(), save();
246
+ },
247
+ children: [
248
+ jsx2("span", { className: Comments_default.muted, children: state.pending ? `Element: ${state.pending.selector}${state.pending.text ? ` ("${state.pending.text}")` : ""}` : "Whole story" }),
249
+ jsx2(
250
+ "textarea",
251
+ {
252
+ className: Comments_default.input,
253
+ "aria-label": "Comment note",
254
+ autoFocus: !0,
255
+ value: note,
256
+ placeholder: "What should change?",
257
+ onChange: (event) => setNote(event.target.value),
258
+ onKeyDown: (event) => {
259
+ event.key === "Enter" && (event.metaKey || event.ctrlKey) && save();
260
+ }
261
+ }
262
+ ),
263
+ jsx2("div", { className: Comments_default.row, children: jsx2(
264
+ Button2,
265
+ {
266
+ size: "small",
267
+ variant: "solid",
268
+ ariaLabel: !1,
269
+ type: "submit",
270
+ disabled: !note.trim(),
271
+ children: "Save comment"
272
+ }
273
+ ) })
274
+ ]
275
+ }
276
+ ),
277
+ error && jsx2("div", { className: Comments_default.error, role: "alert", children: error }),
278
+ jsxs2("div", { className: Comments_default.row, children: [
279
+ jsx2(CopyAllOpen, { comments }),
280
+ jsx2(
281
+ Button2,
282
+ {
283
+ size: "small",
284
+ variant: "ghost",
285
+ onClick: () => setFilter(filter === "open" ? "all" : "open"),
286
+ children: filter === "open" ? "Show resolved" : "Hide resolved"
287
+ }
288
+ ),
289
+ jsx2(Button2, { size: "small", variant: "ghost", ariaLabel: !1, onClick: () => {
290
+ reload();
291
+ }, children: "Refresh" })
292
+ ] }),
293
+ jsx2(
294
+ CommentList,
295
+ {
296
+ comments: shown,
297
+ currentStoryId: storyId,
298
+ onResolve: (comment) => run({ action: "resolve", id: comment.id }),
299
+ onReopen: (comment) => run({ action: "reopen", id: comment.id }),
300
+ onDelete: (comment) => run({ action: "delete", id: comment.id }),
301
+ onSelectStory: (comment) => api.selectStory(comment.storyId)
302
+ }
303
+ )
304
+ ] }) });
305
+ };
306
+
307
+ // src/addon-comments/manager.tsx
308
+ import { jsx as jsx3 } from "react/jsx-runtime";
309
+ var CommentTool = () => {
310
+ let api = useStorybookApi2(), [state, setState] = useAddonState2(ADDON_ID, DEFAULT_STATE);
311
+ return jsx3(
312
+ ToggleButton,
313
+ {
314
+ padding: "small",
315
+ variant: "ghost",
316
+ pressed: state.picking,
317
+ ariaLabel: "Add comment",
318
+ tooltip: "Add a comment on an element",
319
+ onClick: () => {
320
+ if (state.picking) {
321
+ api.emit(EVENTS.PICK_CANCEL), setState(DEFAULT_STATE);
322
+ return;
323
+ }
324
+ api.togglePanel(!0), api.setSelectedPanel(PANEL_ID), setState({ picking: !0 }), api.emit(EVENTS.PICK_START);
325
+ },
326
+ children: jsx3(MessageSquareTextIcon, {})
327
+ },
328
+ "comments"
329
+ );
330
+ };
331
+ addons.register(ADDON_ID, (api) => {
332
+ api.on(EVENTS.PICKED, (element) => {
333
+ api.setAddonState(ADDON_ID, { picking: !1, pending: element }), api.togglePanel(!0), api.setSelectedPanel(PANEL_ID);
334
+ }), api.on(EVENTS.PICK_ENDED, () => {
335
+ api.setAddonState(ADDON_ID, DEFAULT_STATE);
336
+ }), addons.add(TOOL_ID, {
337
+ type: types.TOOL,
338
+ title: "Comments",
339
+ match: ({ viewMode }) => viewMode === "story",
340
+ render: () => jsx3(CommentTool, {})
341
+ }), addons.add(PANEL_ID, {
342
+ type: types.PANEL,
343
+ title: "Comments",
344
+ render: ({ active }) => jsx3(CommentsPanel, { active: !!active })
345
+ });
346
+ });
@@ -0,0 +1,52 @@
1
+ import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ COMMENTS_API_PATH,
14
+ getCommentStore
15
+ } from "../_node-chunks/chunk-AK4RPNTY.js";
16
+ import "../_node-chunks/chunk-7LYHZMJO.js";
17
+
18
+ // src/addon-comments/preset.ts
19
+ import { fileURLToPath } from "node:url";
20
+ import { buffer } from "node:stream/consumers";
21
+ import { getProjectRoot } from "@aussieljk/forkbook/internal/common";
22
+ var sendJson = (res, status, body) => {
23
+ res.writeHead(status, { "Content-Type": "application/json" }), res.end(JSON.stringify(body));
24
+ };
25
+ async function handleCommentsRequest(store, req, res) {
26
+ try {
27
+ if (req.method === "GET") {
28
+ let url = new URL(req.url ?? "/", "http://localhost"), status = url.searchParams.get("status") ?? "all", storyId = url.searchParams.get("storyId") ?? void 0;
29
+ sendJson(res, 200, { comments: await store.list({ status, storyId }) });
30
+ return;
31
+ }
32
+ if (req.headers["content-type"]?.split(";")[0].trim().toLowerCase() !== "application/json") {
33
+ sendJson(res, 415, { error: "Content-Type must be application/json" });
34
+ return;
35
+ }
36
+ let action = JSON.parse((await buffer(req)).toString("utf8"));
37
+ sendJson(res, 200, { comment: await store.apply(action) });
38
+ } catch (error) {
39
+ sendJson(res, 400, { error: error instanceof Error ? error.message : String(error) });
40
+ }
41
+ }
42
+ var experimental_devServer = async (app) => {
43
+ let store = getCommentStore(getProjectRoot());
44
+ return app.get(COMMENTS_API_PATH, (req, res) => handleCommentsRequest(store, req, res)), app.post(COMMENTS_API_PATH, (req, res) => handleCommentsRequest(store, req, res)), app;
45
+ }, DEFAULT_ADDON = "@aussieljk/forkbook/addon-comments", managerEntries = async (entries = [], options) => options.forkbookDefaultComments ? [...entries, fileURLToPath(import.meta.resolve(`${DEFAULT_ADDON}/manager`))] : entries, previewAnnotations = async (entries = [], options) => options.forkbookDefaultComments ? [...entries, fileURLToPath(import.meta.resolve(`${DEFAULT_ADDON}/preview`))] : entries;
46
+ export {
47
+ DEFAULT_ADDON,
48
+ experimental_devServer,
49
+ handleCommentsRequest,
50
+ managerEntries,
51
+ previewAnnotations
52
+ };