@aussieljk/forkbook 0.0.1-4 → 0.0.1-6

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 (318) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +35 -53
  3. package/dist/_browser-chunks/{Color-KRDPNBZS.js → Color-2BMQTRYG.js} +3 -3
  4. package/dist/_browser-chunks/WithTooltip-GJACFWKM.js +196 -0
  5. package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
  6. package/dist/_browser-chunks/chunk-6EJEEII7.js +1149 -0
  7. package/dist/_browser-chunks/{chunk-LXQPPHMD.js → chunk-6IKB2UHQ.js} +27 -27
  8. package/dist/_browser-chunks/chunk-DPRGR3QP.js +5995 -0
  9. package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
  10. package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
  11. package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
  12. package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
  13. package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
  14. package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
  15. package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
  16. package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
  17. package/dist/_browser-chunks/{chunk-BZGX2THJ.js → chunk-QAHDGPZ7.js} +3 -3
  18. package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
  19. package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
  20. package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-X7D777E6.js} +547 -1622
  21. package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
  22. package/dist/_node-chunks/{attached-runtime-CYMSKF3A.js → attached-runtime-EBWIOQZN.js} +29 -29
  23. package/dist/_node-chunks/{builder-manager-RMLSIO45.js → builder-manager-ETBLZ2RH.js} +288 -349
  24. package/dist/_node-chunks/{chunk-IR34HUSL.js → chunk-252Y5WHZ.js} +7 -7
  25. package/dist/_node-chunks/{chunk-VPOJCHKM.js → chunk-25PXULSJ.js} +14 -14
  26. package/dist/_node-chunks/chunk-2DBJWMYE.js +495 -0
  27. package/dist/_node-chunks/{chunk-KXDJ77EW.js → chunk-3UWWRDA5.js} +7 -7
  28. package/dist/_node-chunks/{chunk-DVLFCSDG.js → chunk-4KCQYJT6.js} +7 -7
  29. package/dist/_node-chunks/{chunk-X3E55W5S.js → chunk-4MJIPOJ5.js} +6 -6
  30. package/dist/_node-chunks/{chunk-5TPSYG4L.js → chunk-4WLIN3VZ.js} +8 -8
  31. package/dist/_node-chunks/{chunk-WBTLBIED.js → chunk-4XNPO23I.js} +6 -6
  32. package/dist/_node-chunks/{chunk-NHIRHARE.js → chunk-5T635FTI.js} +10 -10
  33. package/dist/_node-chunks/{chunk-YU2WFBFL.js → chunk-5Z6MT4RI.js} +8 -8
  34. package/dist/_node-chunks/{chunk-2QWFS23O.js → chunk-644CUCK5.js} +7 -7
  35. package/dist/_node-chunks/{chunk-7XCJ7RAJ.js → chunk-7E27CGRU.js} +7 -7
  36. package/dist/_node-chunks/{chunk-WS367FSJ.js → chunk-A35J7YYA.js} +6 -6
  37. package/dist/_node-chunks/{chunk-ILFIERUB.js → chunk-ALHPFKVB.js} +8 -8
  38. package/dist/_node-chunks/{chunk-SQMCVWOR.js → chunk-ANDQVXYX.js} +8 -8
  39. package/dist/_node-chunks/{chunk-HUFAUSEX.js → chunk-AS4SFRCZ.js} +6 -6
  40. package/dist/_node-chunks/{chunk-XBXGLD3K.js → chunk-BLUMKQQB.js} +6 -6
  41. package/dist/_node-chunks/{chunk-QU5ANYM7.js → chunk-C5JG7EKF.js} +6 -6
  42. package/dist/_node-chunks/{chunk-P6QAFJ5M.js → chunk-CBUQY454.js} +7 -15
  43. package/dist/_node-chunks/{chunk-4LPAWP5S.js → chunk-CF7KLGUW.js} +22 -20
  44. package/dist/_node-chunks/{chunk-MOITZTEA.js → chunk-CGVPHZVD.js} +8 -8
  45. package/dist/_node-chunks/{chunk-2NWHHNNI.js → chunk-DABFUVLR.js} +6 -6
  46. package/dist/_node-chunks/{chunk-XH6TDVML.js → chunk-DCNZ6SFN.js} +6 -6
  47. package/dist/_node-chunks/{chunk-F2N6BJRH.js → chunk-DDGW2EBW.js} +29843 -51588
  48. package/dist/_node-chunks/{chunk-OS5LQEC6.js → chunk-DRLBJM6X.js} +7 -7
  49. package/dist/_node-chunks/{chunk-GEMKJCEE.js → chunk-E3O7VAPG.js} +10 -10
  50. package/dist/_node-chunks/{chunk-4GD7MMLJ.js → chunk-FIFCNBTL.js} +7 -7
  51. package/dist/_node-chunks/{chunk-UMZSNFWM.js → chunk-FQWTUSYB.js} +6 -6
  52. package/dist/_node-chunks/{chunk-JEEXR245.js → chunk-G6YNW4FK.js} +7 -7
  53. package/dist/_node-chunks/{chunk-HP5UY6OY.js → chunk-GDFQQO5U.js} +6 -6
  54. package/dist/_node-chunks/{chunk-653BSJIX.js → chunk-GGTXOH3W.js} +6 -6
  55. package/dist/_node-chunks/{chunk-PDCSUZ4L.js → chunk-GIOREKIG.js} +7 -7
  56. package/dist/_node-chunks/{chunk-V2JDVM46.js → chunk-GOFK4EKU.js} +6 -6
  57. package/dist/_node-chunks/{chunk-INEYTOWF.js → chunk-GQ3HJNIH.js} +10 -13
  58. package/dist/_node-chunks/{chunk-2APY2YSW.js → chunk-GRTI5653.js} +7 -7
  59. package/dist/_node-chunks/{chunk-KN2S7JF2.js → chunk-HKL3VOYX.js} +6 -6
  60. package/dist/_node-chunks/{chunk-A2UMIN5B.js → chunk-HUPRQZ3I.js} +7 -7
  61. package/dist/_node-chunks/{chunk-7JA2DMCJ.js → chunk-HWRHYM7Z.js} +6 -6
  62. package/dist/_node-chunks/{chunk-SBQT3LMM.js → chunk-I7HRDCNY.js} +10 -10
  63. package/dist/_node-chunks/{chunk-2IJCISIB.js → chunk-IFPMZ247.js} +6 -6
  64. package/dist/_node-chunks/{chunk-DIUBMAMV.js → chunk-J6M5CRYZ.js} +8 -8
  65. package/dist/_node-chunks/{chunk-IBO346NQ.js → chunk-JPXJI6QR.js} +60 -134
  66. package/dist/_node-chunks/{chunk-STRSG3GT.js → chunk-JS2J2SKX.js} +6 -6
  67. package/dist/_node-chunks/{chunk-FNGLVURC.js → chunk-JZWF3XLN.js} +6 -6
  68. package/dist/_node-chunks/{chunk-KINEBDMM.js → chunk-KF3FT3NI.js} +9 -9
  69. package/dist/_node-chunks/chunk-KWPWQA7G.js +2609 -0
  70. package/dist/_node-chunks/{chunk-OIIORQX5.js → chunk-L4JGWK4K.js} +6 -6
  71. package/dist/_node-chunks/{chunk-MRZD5SBV.js → chunk-LFIFBDMS.js} +6 -6
  72. package/dist/_node-chunks/{chunk-UAALLQAQ.js → chunk-LWKLJYYQ.js} +6 -6
  73. package/dist/_node-chunks/{chunk-AFKKN27O.js → chunk-LXVSVTQ3.js} +6 -6
  74. package/dist/_node-chunks/chunk-MDW3GSU3.js +69 -0
  75. package/dist/_node-chunks/{chunk-UXW4I2CN.js → chunk-MFN2XBPL.js} +7 -7
  76. package/dist/_node-chunks/{chunk-ESZVID7Q.js → chunk-MQFB44YS.js} +7 -7
  77. package/dist/_node-chunks/{chunk-3XDIBUGD.js → chunk-MZ2GSR3G.js} +23 -51
  78. package/dist/_node-chunks/{chunk-POXTROIX.js → chunk-N7HEOGTM.js} +9 -6
  79. package/dist/_node-chunks/{chunk-UIFLXDUL.js → chunk-NUAQC3XP.js} +16 -13
  80. package/dist/_node-chunks/{chunk-BOUA7OB7.js → chunk-NX6CSWF3.js} +8 -8
  81. package/dist/_node-chunks/{chunk-B3LK7C7B.js → chunk-NZ7EQWYA.js} +9 -9
  82. package/dist/_node-chunks/{chunk-U5QMVW3H.js → chunk-OLGIDCVD.js} +650 -9
  83. package/dist/_node-chunks/{chunk-NAYTBC72.js → chunk-P65JVLO3.js} +8 -8
  84. package/dist/_node-chunks/{chunk-M2UZP5GC.js → chunk-PAN35AYX.js} +7 -7
  85. package/dist/_node-chunks/{chunk-GZBUCUF7.js → chunk-PLWLCVP2.js} +6 -6
  86. package/dist/_node-chunks/{chunk-A4YELYR3.js → chunk-Q4BEWGMK.js} +6 -6
  87. package/dist/_node-chunks/{chunk-YYIZ2PC4.js → chunk-QNUXGVZZ.js} +6 -6
  88. package/dist/_node-chunks/{chunk-WHZWLJGO.js → chunk-R5DWO2S2.js} +31 -30
  89. package/dist/_node-chunks/{chunk-RMLENEZC.js → chunk-SLZV7PTQ.js} +8 -8
  90. package/dist/_node-chunks/{chunk-B5VFV3ZW.js → chunk-TIRP5JQM.js} +11 -10
  91. package/dist/_node-chunks/{chunk-TLVEPWBN.js → chunk-TMXWDY2O.js} +6 -6
  92. package/dist/_node-chunks/{chunk-LGUMVMBA.js → chunk-TN3ULFFZ.js} +6 -6
  93. package/dist/_node-chunks/{chunk-5ZLOPVTG.js → chunk-TPSJW4CQ.js} +6 -6
  94. package/dist/_node-chunks/{chunk-RNF3Z4ZJ.js → chunk-TYBPAV3X.js} +6 -6
  95. package/dist/_node-chunks/chunk-UUE3PSJB.js +11 -0
  96. package/dist/_node-chunks/chunk-VKNRNBTB.js +18 -0
  97. package/dist/_node-chunks/{chunk-6Y6RBJD7.js → chunk-VPU4E7DI.js} +25 -8
  98. package/dist/_node-chunks/{chunk-FJDJE7XC.js → chunk-WIQ6Y3NX.js} +6 -6
  99. package/dist/_node-chunks/{chunk-DD2S4BFV.js → chunk-WRG3CFGS.js} +6 -6
  100. package/dist/_node-chunks/{chunk-FAZ3MUOI.js → chunk-X3RTVNRN.js} +7 -7
  101. package/dist/_node-chunks/chunk-XOGU5PWI.js +347 -0
  102. package/dist/_node-chunks/{chunk-AU3SF2WM.js → chunk-XWGMQW2H.js} +6 -6
  103. package/dist/_node-chunks/chunk-YCXTTQ7K.js +620 -0
  104. package/dist/_node-chunks/{chunk-KZBZYQTZ.js → chunk-YHH57LHY.js} +9 -9
  105. package/dist/_node-chunks/{chunk-J3M3X7GO.js → chunk-YMZ2SGFK.js} +6 -6
  106. package/dist/_node-chunks/{chunk-AY6B2C46.js → chunk-YNENOZRY.js} +7 -7
  107. package/dist/_node-chunks/{chunk-CGWACHNW.js → chunk-YPGVYNJB.js} +6 -6
  108. package/dist/_node-chunks/{chunk-OQ4NCWE4.js → chunk-YQDBSAXW.js} +7 -7
  109. package/dist/_node-chunks/{chunk-YGXJOSRU.js → chunk-Z4NZLBOX.js} +7 -7
  110. package/dist/_node-chunks/{chunk-74IEHSIR.js → chunk-ZC3ZZKMS.js} +8 -8
  111. package/dist/_node-chunks/{chunk-QDLR4JF5.js → chunk-ZCITDAV4.js} +34 -949
  112. package/dist/_node-chunks/chunk-ZNSGFYAT.js +25 -0
  113. package/dist/_node-chunks/{chunk-XD5SYXAU.js → chunk-ZSH6BUCW.js} +25 -25
  114. package/dist/_node-chunks/{chunk-X2KWNNFB.js → chunk-ZTFNOXZF.js} +6 -6
  115. package/dist/_node-chunks/dist-GGTGKXZA.js +27 -0
  116. package/dist/_node-chunks/dist-NS676VJR.js +16 -0
  117. package/dist/_node-chunks/{local-runtime-KTI3DH6X.js → local-runtime-BUTEKJYV.js} +20 -20
  118. package/dist/_node-chunks/{mdx-plugin-2E3SW5TL.js → mdx-plugin-7WXQIHPV.js} +2263 -130
  119. package/dist/_node-chunks/{monorepo-MWAMFHKY.js → monorepo-NCD3X2BR.js} +11 -11
  120. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-MGORG6W7.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-SD3B272K.js} +11 -11
  121. package/dist/_node-chunks/optimized-tests-ITVOHEOA.js +22 -0
  122. package/dist/_node-chunks/{pattern-copy-play-QTQOY7E7.js → pattern-copy-play-3QJANDJD.js} +9 -9
  123. package/dist/_node-chunks/postinstallAddon-LEUHOKX6.js +20 -0
  124. package/dist/_node-chunks/{rehype-external-links-T7DZNKMB.js → rehype-external-links-4LR5BDR2.js} +9 -9
  125. package/dist/_node-chunks/{rehype-slug-CSHI5WYI.js → rehype-slug-PWFRGOEV.js} +9 -9
  126. package/dist/_node-chunks/{relaxed-limits-RAZD36YR.js → relaxed-limits-VNNWUW7X.js} +11 -11
  127. package/dist/_node-chunks/{run-S6XSLPEB.js → run-RUAAWEQT.js} +13 -13
  128. package/dist/_node-chunks/{run-KJ3Z2TTY.js → run-YK6ARCWS.js} +17 -17
  129. package/dist/_node-chunks/session-id-JJYVZAKO.js +23 -0
  130. package/dist/_node-chunks/{setup-35J66GFB.js → setup-4QKCICV6.js} +8 -8
  131. package/dist/_node-chunks/{vitest.config.4.template-Z7OCRDKD.js → vitest.config.4.template-WVFLIXN7.js} +7 -7
  132. package/dist/actions/decorator.js +2 -1
  133. package/dist/actions/index.js +2 -1
  134. package/dist/addon-a11y/index.js +2 -1
  135. package/dist/addon-a11y/manager.js +24 -17
  136. package/dist/addon-a11y/preset.js +7 -7
  137. package/dist/addon-a11y/preview.js +2 -1
  138. package/dist/addon-docs/blocks.js +46 -25
  139. package/dist/addon-docs/manager.js +2 -2
  140. package/dist/addon-docs/preset.js +10 -10
  141. package/dist/addon-links/index.js +3 -2
  142. package/dist/addon-links/preview.d.ts +1 -1
  143. package/dist/addon-links/preview.js +3 -2
  144. package/dist/addon-links/react/index.js +2 -1
  145. package/dist/addon-mcp/preset.js +8 -8
  146. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +17 -45
  147. package/dist/addon-ondevice-actions/index.js +5 -1
  148. package/dist/addon-ondevice-actions/register.js +5 -1
  149. package/dist/addon-pseudo-states/manager.js +2 -2
  150. package/dist/addon-pseudo-states/preview.d.ts +1 -1
  151. package/dist/addon-themes/manager.js +1 -1
  152. package/dist/addon-themes/postinstall.js +7 -7
  153. package/dist/addon-vitest/constants.js +8 -8
  154. package/dist/addon-vitest/manager.js +8 -8
  155. package/dist/addon-vitest/node/coverage-reporter.js +8 -8
  156. package/dist/addon-vitest/node/vitest.js +16 -16
  157. package/dist/addon-vitest/postinstall.js +10 -10
  158. package/dist/addon-vitest/preset.js +15 -16
  159. package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
  160. package/dist/addon-vitest/vitest-plugin/index.js +17 -17
  161. package/dist/babel/index.d.ts +91 -842
  162. package/dist/babel/index.js +13 -19
  163. package/dist/bin/core.js +61 -60
  164. package/dist/bin/dispatcher.js +10 -10
  165. package/dist/bin/loader.js +16 -15
  166. package/dist/builder-vite/index.js +15 -15
  167. package/dist/builder-vite/preset.js +13 -13
  168. package/dist/{chunk-DF6btpT3.d.ts → chunk-BGhyFTJO.d.ts} +2 -2
  169. package/dist/chunk-CV4-Z2pn.d.ts +30 -0
  170. package/dist/{chunk-DvufcbCc.d.ts → chunk-CVY28Ngy.d.ts} +1 -1
  171. package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
  172. package/dist/{chunk-BYnH2sbb.d.ts → chunk-ClI-HEh5.d.ts} +1 -1
  173. package/dist/{chunk-DIz17UEJ.d.ts → chunk-CzmZhVrn.d.ts} +35 -1
  174. package/dist/{chunk-B2xylxt5.d.ts → chunk-DROZ9oel.d.ts} +7 -271
  175. package/dist/cli/index.d.ts +13 -866
  176. package/dist/cli/index.js +42 -4952
  177. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  178. package/dist/cli/tools/sdk/child-host.js +17 -17
  179. package/dist/cli/tools/sdk/index.d.ts +1 -1
  180. package/dist/cli/tools/sdk/index.js +18 -18
  181. package/dist/cli-commands/bin/index.js +7 -7
  182. package/dist/client-logger/index.js +3 -1
  183. package/dist/common/index.d.ts +5 -4
  184. package/dist/common/index.js +35 -37
  185. package/dist/components/index.d.ts +14 -231
  186. package/dist/components/index.js +2518 -8365
  187. package/dist/core-events/index.d.ts +4 -3
  188. package/dist/core-events/index.js +3 -1
  189. package/dist/core-server/index.d.ts +2 -2
  190. package/dist/core-server/index.js +450 -147
  191. package/dist/core-server/presets/common-manager.js +96 -894
  192. package/dist/core-server/presets/common-override-preset.js +12 -10
  193. package/dist/core-server/presets/common-preset.js +39 -40
  194. package/dist/create/bin/index.js +7 -7
  195. package/dist/create/index.js +15 -15
  196. package/dist/csf/index.d.ts +2 -2
  197. package/dist/csf/index.js +27 -93
  198. package/dist/csf-tools/index.d.ts +2 -12
  199. package/dist/csf-tools/index.js +14 -14
  200. package/dist/instrumenter/index.js +3 -1
  201. package/dist/manager/_manager-chunks/{globals-runtime-dKGpUUSb.js → globals-runtime-B-IeQLQu.js} +285 -61
  202. package/dist/manager/_manager-chunks/{globals-runtime-DuLFjsF4.js → globals-runtime-B5-0Ccbv.js} +1 -1
  203. package/dist/manager/_manager-chunks/{globals-runtime-8HkdnU2F.js → globals-runtime-B71TiXST.js} +93 -2146
  204. package/dist/manager/_manager-chunks/globals-runtime-BMCaBukU.js +413 -0
  205. package/dist/manager/_manager-chunks/globals-runtime-BUP5e_t9.js +1396 -0
  206. package/dist/manager/_manager-chunks/globals-runtime-C7mqoHpE.js +2093 -0
  207. package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
  208. package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-CYNosEiD.js} +1 -2
  209. package/dist/manager/_manager-chunks/globals-runtime-C_evJrEn.js +1960 -0
  210. package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-CdgVeAbk.js} +408 -377
  211. package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-Cqn8KdSZ.js} +4 -4
  212. package/dist/manager/_manager-chunks/{globals-runtime-ZHrQFa3-.js → globals-runtime-CrIF09P8.js} +1246 -539
  213. package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-Ct1kY4wb.js} +638 -1731
  214. package/dist/manager/_manager-chunks/globals-runtime-CvyFEPIY.js +5282 -0
  215. package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DMBjo1QS.js} +2 -1
  216. package/dist/manager/_manager-chunks/{globals-runtime-C9P2ZbMM.js → globals-runtime-DUK6bGcb.js} +52 -25
  217. package/dist/manager/_manager-chunks/globals-runtime-DedfO-DP.js +3414 -0
  218. package/dist/manager/_manager-chunks/{globals-runtime-q5R9dawi.js → globals-runtime-DqhIYwLp.js} +165 -152
  219. package/dist/manager/_manager-chunks/globals-runtime-XSxCU7PR.js +41 -0
  220. package/dist/manager/_manager-chunks/runtime-BR5z0WoJ.js +456 -0
  221. package/dist/manager/_manager-chunks/{runtime-DdCaBowH.js → runtime-BgYvp1WN.js} +15 -7
  222. package/dist/manager/_manager-chunks/{runtime-BGvLm94o.js → runtime-CHI-LHF1.js} +3 -3
  223. package/dist/manager/_manager-chunks/{runtime-BdLdsHca.js → runtime-CUymj6EY.js} +280 -288
  224. package/dist/manager/_manager-chunks/runtime-CaU1DSEZ.js +528 -0
  225. package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-CqItbdKW.js} +3 -2
  226. package/dist/manager/_manager-chunks/{runtime-B9QzcYO3.js → runtime-D4ZOOIV0.js} +5 -531
  227. package/dist/manager/_manager-chunks/{runtime-50_aob4S.js → runtime-DER98nV0.js} +3 -19
  228. package/dist/manager/_manager-chunks/{runtime-CE2sHVqs.js → runtime-DrTLBe7a.js} +39 -40
  229. package/dist/manager/_manager-chunks/runtime-MAf7Wpk5.js +692 -0
  230. package/dist/manager/_manager-chunks/{runtime-CKP1i0--.js → runtime-cVFIMcca.js} +1 -1
  231. package/dist/manager/globals-runtime.js +1 -1
  232. package/dist/manager/globals.d.ts +1 -1
  233. package/dist/manager/globals.js +1 -1
  234. package/dist/manager/runtime.js +1 -1
  235. package/dist/manager-api/index.d.ts +1 -1
  236. package/dist/manager-api/index.js +22 -28
  237. package/dist/manager-errors.d.ts +1 -1
  238. package/dist/mcp/index.js +8 -8
  239. package/dist/mocking-utils/index.js +16 -11
  240. package/dist/nextjs-vite/index.js +3 -2
  241. package/dist/nextjs-vite/node/index.js +7 -7
  242. package/dist/nextjs-vite/preset.js +11 -11
  243. package/dist/nextjs-vite/vite-plugin/index.js +7 -7
  244. package/dist/nextjs-vite-plugin/index.d.ts +1 -2
  245. package/dist/nextjs-vite-plugin/index.js +12 -27
  246. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  247. package/dist/node-logger/index.d.ts +65 -72
  248. package/dist/node-logger/index.js +11 -12
  249. package/dist/oxc-parser/index.js +11 -13
  250. package/dist/oxc-parser/worker.js +10 -10
  251. package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
  252. package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
  253. package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
  254. package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
  255. package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
  256. package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
  257. package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
  258. package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
  259. package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
  260. package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
  261. package/dist/preview/runtime.js +1 -1
  262. package/dist/preview-api/index.d.ts +1 -1
  263. package/dist/preview-api/index.js +2 -1
  264. package/dist/preview-errors.d.ts +1 -1
  265. package/dist/react/docgen/docgen-worker.js +11 -12
  266. package/dist/react/entry-preview.js +2 -1
  267. package/dist/react/index.js +6 -4
  268. package/dist/react/preset.js +13 -14
  269. package/dist/react/preview.js +3 -2
  270. package/dist/react-native/bin/get-stories.js +8 -8
  271. package/dist/react-native/index.js +25 -211
  272. package/dist/react-native/metro/node.js +10 -9
  273. package/dist/react-native/metro/withStorybook.js +11 -10
  274. package/dist/react-native/scripts/generate.js +8 -8
  275. package/dist/react-vite/node/index.js +7 -7
  276. package/dist/react-vite/preset.js +7 -7
  277. package/dist/router/index.js +3 -1
  278. package/dist/server-errors.d.ts +1 -1
  279. package/dist/server-errors.js +9 -9
  280. package/dist/shared/open-service/index.d.ts +1 -1
  281. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  282. package/dist/telemetry/index.js +43 -45
  283. package/dist/test/index.js +808 -573
  284. package/dist/theming/create.js +2 -1
  285. package/dist/theming/index.js +22 -1
  286. package/dist/types/index.d.ts +1 -1
  287. package/package.json +17 -45
  288. package/dist/_browser-chunks/WithTooltip-523JD6VH.js +0 -1619
  289. package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
  290. package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
  291. package/dist/_node-chunks/chunk-7XCEKQGV.js +0 -18
  292. package/dist/_node-chunks/chunk-EGS2SAD2.js +0 -5414
  293. package/dist/_node-chunks/chunk-GKTCJPLL.js +0 -36
  294. package/dist/_node-chunks/chunk-HENM5ZK3.js +0 -1877
  295. package/dist/_node-chunks/chunk-HQM4ISVU.js +0 -11
  296. package/dist/_node-chunks/chunk-K3I3G4VL.js +0 -4731
  297. package/dist/_node-chunks/chunk-MZMPFII2.js +0 -29
  298. package/dist/_node-chunks/chunk-NYAWUR6L.js +0 -3823
  299. package/dist/_node-chunks/chunk-NYRUWAL3.js +0 -23
  300. package/dist/_node-chunks/chunk-SSZ5REKS.js +0 -3008
  301. package/dist/_node-chunks/chunk-WEW23EEE.js +0 -662
  302. package/dist/_node-chunks/chunk-XWQEWRFD.js +0 -51
  303. package/dist/_node-chunks/dist-CNA633FI.js +0 -16
  304. package/dist/_node-chunks/globby-HRQV5N3V.js +0 -2884
  305. package/dist/_node-chunks/jiti-WE7NHS2Y.js +0 -3848
  306. package/dist/_node-chunks/lib-7MVA6CTW.js +0 -366
  307. package/dist/_node-chunks/optimized-tests-IAX6YURR.js +0 -22
  308. package/dist/_node-chunks/postinstallAddon-ROH2TBJX.js +0 -20
  309. package/dist/_node-chunks/session-id-GM226DGP.js +0 -23
  310. package/dist/chunk-BfBzpgct.d.ts +0 -916
  311. package/dist/core-server/presets/common-manager.css +0 -170
  312. package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
  313. package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
  314. package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
  315. package/dist/manager/_manager-chunks/runtime-89Cb0A8U.js +0 -998
  316. package/dist/manager/_manager-chunks/runtime-wL4UO7YO.js +0 -452
  317. package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
  318. package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_ubhjlnocuxr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ubhjlnocuxr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ubhjlnocuxr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ubhjlnocuxr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ubhjlnocuxr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.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
  nanoid
14
- } from "./chunk-OIIORQX5.js";
14
+ } from "./chunk-L4JGWK4K.js";
15
15
 
16
16
  // src/telemetry/session-id.ts
17
17
  import { cache } from "@aussieljk/forkbook/internal/common";
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_ubhjlnocuxr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ubhjlnocuxr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ubhjlnocuxr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ubhjlnocuxr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ubhjlnocuxr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.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
  formatAttachFallback
14
- } from "./chunk-HP5UY6OY.js";
14
+ } from "./chunk-GDFQQO5U.js";
15
15
  import {
16
16
  AttachUnavailableError,
17
17
  EnvironmentMismatchError,
@@ -20,22 +20,22 @@ import {
20
20
  attachGateReasonFromError,
21
21
  isAttachGateError,
22
22
  projectPathsEqual
23
- } from "./chunk-A2UMIN5B.js";
23
+ } from "./chunk-HUPRQZ3I.js";
24
24
  import {
25
25
  invokeToolsetMethod,
26
26
  resolveToolsetDescription
27
- } from "./chunk-YGXJOSRU.js";
27
+ } from "./chunk-Z4NZLBOX.js";
28
28
  import {
29
29
  parseToolsetMethodId,
30
30
  toCliMethodName
31
- } from "./chunk-UXW4I2CN.js";
31
+ } from "./chunk-MFN2XBPL.js";
32
32
  import {
33
33
  deserializeError
34
- } from "./chunk-UMZSNFWM.js";
34
+ } from "./chunk-FQWTUSYB.js";
35
35
  import {
36
36
  StorybookDevServerDisconnectedError,
37
37
  formatIssues
38
- } from "./chunk-BOUA7OB7.js";
38
+ } from "./chunk-NX6CSWF3.js";
39
39
 
40
40
  // src/cli/tools/sdk/child-protocol.ts
41
41
  function isChildMessage(value) {
@@ -965,7 +965,7 @@ async function createTools(options = {}, deps = {}) {
965
965
  }
966
966
  async function createAttachedTools(options, deps, clientInfo, requestedMode) {
967
967
  process.env.FORKBOOK_ATTACHED_TOOLS = "true";
968
- let { bootstrapAttachedRuntime } = await import("./attached-runtime-CYMSKF3A.js"), autoSpawn = process.env.FORKBOOK_TOOLS_CHILD_HOST === "true" ? !1 : options.autoSpawn ?? !0, attached = await (deps.attach ?? ((target) => bootstrapAttachedRuntime({ ...target, autoSpawn })))({
968
+ let { bootstrapAttachedRuntime } = await import("./attached-runtime-EBWIOQZN.js"), autoSpawn = process.env.FORKBOOK_TOOLS_CHILD_HOST === "true" ? !1 : options.autoSpawn ?? !0, attached = await (deps.attach ?? ((target) => bootstrapAttachedRuntime({ ...target, autoSpawn })))({
969
969
  cwd: options.cwd,
970
970
  configDir: options.configDir,
971
971
  port: options.port
@@ -1030,7 +1030,7 @@ async function createLocalTools(options, deps, clientInfo, requestedMode, fallba
1030
1030
  });
1031
1031
  return fallback ? { ...child, ...fallback } : child;
1032
1032
  }
1033
- let { bootstrapToolsRuntime } = await import("./local-runtime-KTI3DH6X.js"), runtime;
1033
+ let { bootstrapToolsRuntime } = await import("./local-runtime-BUTEKJYV.js"), runtime;
1034
1034
  try {
1035
1035
  runtime = await (deps.bootstrap ?? bootstrapToolsRuntime)({
1036
1036
  cwd,
@@ -0,0 +1,495 @@
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ nodePathsToArray
14
+ } from "./chunk-XOGU5PWI.js";
15
+ import {
16
+ Tag
17
+ } from "./chunk-JS2J2SKX.js";
18
+
19
+ // src/common/utils/envs.ts
20
+ var isWebContainer = () => process.versions.webcontainer != null;
21
+ async function loadEnvs(options = {}) {
22
+ let { loadEnv } = await import("vite"), defaultNodeEnv = options.production ? "production" : "development", baseEnv = {
23
+ NODE_ENV: process.env.NODE_ENV || defaultNodeEnv,
24
+ NODE_PATH: process.env.NODE_PATH || "",
25
+ STORYBOOK: process.env.STORYBOOK || "true",
26
+ // This is to support CRA's public folder feature.
27
+ // In production we set this to dot(.) to allow the browser to access these assets
28
+ // even when deployed inside a subpath. (like in GitHub pages)
29
+ // In development this is just empty as we always serves from the root.
30
+ PUBLIC_URL: options.production ? "." : ""
31
+ }, envEntries = loadEnv(baseEnv.NODE_ENV, process.cwd(), "FORKBOOK_"), raw = { ...baseEnv, ...envEntries };
32
+ raw.NODE_PATH = nodePathsToArray(raw.NODE_PATH || "");
33
+ let stringified = Object.fromEntries(
34
+ Object.entries(raw).map(([key, value]) => [key, JSON.stringify(value)])
35
+ );
36
+ return { raw, stringified };
37
+ }
38
+ var stringifyEnvs = (raw) => Object.entries(raw).reduce((acc, [key, value]) => (acc[key] = JSON.stringify(value), acc), {}), stringifyProcessEnvs = (raw) => Object.entries(raw).reduce((acc, [key, value]) => (acc[`process.env.${key}`] = JSON.stringify(value), acc), {}), optionalEnvToBoolean = (input) => {
39
+ if (input !== void 0)
40
+ return input.toUpperCase() === "FALSE" || input === "0" ? !1 : input.toUpperCase() === "TRUE" || input === "1" ? !0 : !!input;
41
+ };
42
+ function isCI() {
43
+ return optionalEnvToBoolean(process.env.CI);
44
+ }
45
+
46
+ // src/common/utils/component-id.ts
47
+ function getComponentIdFromEntry(entry) {
48
+ return entry.id.split("--")[0];
49
+ }
50
+
51
+ // src/common/utils/select-component-entry.ts
52
+ import { dedent } from "ts-dedent";
53
+ import { once } from "@aussieljk/forkbook/internal/node-logger";
54
+ var STORY_FILE_TEST_REGEXP = /(stories|story)\.(m?js|ts)x?$/;
55
+ function isAttachedDocsEntry(entry) {
56
+ return entry.type === "docs" && entry.tags?.includes(Tag.ATTACHED_MDX) === !0 && entry.storiesImports.length > 0;
57
+ }
58
+ function isEligibleStoryEntry(entry) {
59
+ return entry.type === "story" && entry.subtype === "story";
60
+ }
61
+ function getStoryImportPathFromEntry(entry) {
62
+ if (entry.type === "story")
63
+ return entry.importPath;
64
+ if (isAttachedDocsEntry(entry))
65
+ return entry.storiesImports[0];
66
+ }
67
+ function buildCollisionWarning(componentId, importPaths, winner) {
68
+ let sortedPaths = Array.from(importPaths).sort();
69
+ return dedent`
70
+ Multiple story files share the component id '${componentId}':
71
+ ${sortedPaths.map((path) => ` - ${path}`).join(`
72
+ `)}
73
+ The props table and description for this id are generated from '${winner.importPath}' only. If these files document different components, give each file a unique title so every component keeps its docs.
74
+ `;
75
+ }
76
+ function selectComponentEntriesByComponentId(indexEntries) {
77
+ let entriesByComponentId = /* @__PURE__ */ new Map(), storyImportPathsByComponentId = /* @__PURE__ */ new Map();
78
+ for (let entry of indexEntries) {
79
+ if (!isEligibleStoryEntry(entry))
80
+ continue;
81
+ let componentId = getComponentIdFromEntry(entry);
82
+ entriesByComponentId.set(componentId, entry);
83
+ let importPaths = storyImportPathsByComponentId.get(componentId) ?? /* @__PURE__ */ new Set();
84
+ importPaths.add(entry.importPath), storyImportPathsByComponentId.set(componentId, importPaths);
85
+ }
86
+ for (let [componentId, importPaths] of storyImportPathsByComponentId) {
87
+ let winner = entriesByComponentId.get(componentId);
88
+ importPaths.size > 1 && winner && once.warn(buildCollisionWarning(componentId, importPaths, winner));
89
+ }
90
+ for (let entry of indexEntries) {
91
+ if (!isAttachedDocsEntry(entry))
92
+ continue;
93
+ let componentId = getComponentIdFromEntry(entry);
94
+ entriesByComponentId.has(componentId) || entriesByComponentId.set(componentId, entry);
95
+ }
96
+ return entriesByComponentId;
97
+ }
98
+
99
+ // src/common/utils/exec.ts
100
+ import { fork } from "node:child_process";
101
+
102
+ // ../../node_modules/tinyexec/dist/main.mjs
103
+ import { spawn, spawnSync } from "node:child_process";
104
+ import { cwd } from "node:process";
105
+ import { basename, delimiter, dirname, normalize, resolve } from "node:path";
106
+ import { fileURLToPath } from "node:url";
107
+ import { pipeline } from "node:stream/promises";
108
+ import { PassThrough } from "node:stream";
109
+ import readline from "node:readline";
110
+ import { closeSync, openSync, readSync, statSync } from "node:fs";
111
+ var isPathLikePattern = /^path$/i, defaultEnvPathInfo = {
112
+ key: "PATH",
113
+ value: ""
114
+ };
115
+ function getPathFromEnv(env) {
116
+ for (let key in env) {
117
+ if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
118
+ let value = env[key];
119
+ return value ? {
120
+ key,
121
+ value
122
+ } : defaultEnvPathInfo;
123
+ }
124
+ return defaultEnvPathInfo;
125
+ }
126
+ function addNodeBinToPath(cwd2, path) {
127
+ let parts = path.value.split(delimiter), nodeBinPaths = [], currentPath = typeof cwd2 == "string" ? cwd2 : fileURLToPath(cwd2, { windows: !1 }), lastPath;
128
+ do
129
+ nodeBinPaths.push(resolve(currentPath, "node_modules", ".bin")), lastPath = currentPath, currentPath = dirname(currentPath);
130
+ while (currentPath !== lastPath);
131
+ nodeBinPaths.push(dirname(process.execPath));
132
+ let newPath = nodeBinPaths.concat(parts).join(delimiter);
133
+ return {
134
+ key: path.key,
135
+ value: newPath
136
+ };
137
+ }
138
+ function computeEnv(cwd2, env, nodePath = !0) {
139
+ let envWithDefault = {
140
+ ...process.env,
141
+ ...env
142
+ };
143
+ if (!nodePath) return envWithDefault;
144
+ let envPathInfo = addNodeBinToPath(cwd2, getPathFromEnv(envWithDefault));
145
+ return envWithDefault[envPathInfo.key] = envPathInfo.value, envWithDefault;
146
+ }
147
+ var combineStreams = (streams) => {
148
+ let streamCount = streams.length, combined = new PassThrough(), maybeEmitEnd = () => {
149
+ --streamCount === 0 && combined.end();
150
+ };
151
+ for (let stream of streams) pipeline(stream, combined, { end: !1 }).then(maybeEmitEnd).catch(maybeEmitEnd);
152
+ return combined;
153
+ }, metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g, shebangRegExp = /^#!\s*(.+)/, isWindowsExecutableRegExp = /\.(?:com|exe)$/i, isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i, isWindows = process.platform === "win32", defaultPathExt = [
154
+ ".EXE",
155
+ ".CMD",
156
+ ".BAT",
157
+ ".COM"
158
+ ], noPathExt = [""];
159
+ function normalizeSpawnCommand(command, args = [], options = {}) {
160
+ if (options.shell === !0 || !isWindows) return {
161
+ command,
162
+ args,
163
+ options
164
+ };
165
+ let file = resolveCommand(command, options), shebang = null;
166
+ if (file !== null) {
167
+ let buffer = Buffer.alloc(150), fd = null;
168
+ try {
169
+ fd = openSync(file, "r"), readSync(fd, buffer, 0, 150, 0);
170
+ } catch {
171
+ } finally {
172
+ fd !== null && closeSync(fd);
173
+ }
174
+ let match = buffer.toString().match(shebangRegExp);
175
+ if (match !== null) {
176
+ let line = match[1].trim(), separatorIndex = line.indexOf(" "), path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line, argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "", binary = basename(path);
177
+ shebang = binary === "env" ? argument || null : binary;
178
+ }
179
+ }
180
+ if (shebang !== null && file !== null && (args = [file, ...args], command = shebang, file = resolveCommand(command, options)), file === null || !isWindowsExecutableRegExp.test(file)) {
181
+ let needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
182
+ command = normalize(command), command = command.replace(metaCharsRegExp, "^$1"), args = args.map((arg) => (arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"), arg = `"${arg}"`, arg = arg.replace(metaCharsRegExp, "^$1"), needsDoubleEscapeMetaChars && (arg = arg.replace(metaCharsRegExp, "^$1")), arg)), args = [
183
+ "/d",
184
+ "/s",
185
+ "/c",
186
+ `"${[command, ...args].join(" ")}"`
187
+ ], command = options.env?.comspec ?? "cmd.exe", options = {
188
+ ...options,
189
+ windowsVerbatimArguments: !0
190
+ };
191
+ }
192
+ return {
193
+ command,
194
+ args,
195
+ options
196
+ };
197
+ }
198
+ function resolveCommand(command, options) {
199
+ let cwd$3 = (options.cwd ?? cwd()).toString(), env = options.env ?? process.env, PATH = getPathFromEnv(env).value, pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(delimiter)], pathExt = env.PATHEXT ? env.PATHEXT.split(delimiter) : defaultPathExt;
200
+ command.includes(".") && pathExt[0] !== "" && (pathExt = ["", ...pathExt]);
201
+ for (let extensions of [pathExt, noPathExt]) for (let path of pathEnv) {
202
+ let unquoted = path.startsWith('"') && path.endsWith('"') && path.length > 1 ? path.slice(1, -1) : path, dest = resolve(cwd$3, unquoted, command);
203
+ for (let ext of extensions) {
204
+ let destWithExt = dest + ext;
205
+ try {
206
+ if (statSync(destWithExt).isFile()) return destWithExt;
207
+ } catch {
208
+ }
209
+ }
210
+ }
211
+ return null;
212
+ }
213
+ var NonZeroExitError = class extends Error {
214
+ result;
215
+ output;
216
+ exitCode;
217
+ get signalCode() {
218
+ return this.result.signalCode;
219
+ }
220
+ constructor(result, output, command, args) {
221
+ let target = "The process";
222
+ command && (target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``);
223
+ let exitCode = result.exitCode ?? 1;
224
+ super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`), this.result = result, this.output = output, this.exitCode = exitCode, Object.defineProperty(this, "result", {
225
+ enumerable: !1,
226
+ writable: !1,
227
+ configurable: !1
228
+ });
229
+ }
230
+ }, LINE_SEPARATOR_REGEX = /\r?\n/, defaultOptions = {
231
+ timeout: void 0,
232
+ persist: !1
233
+ }, defaultSyncOptions = { timeout: void 0 }, defaultNodeOptions = { windowsHide: !0 };
234
+ function combineSignals(signals) {
235
+ let controller = new AbortController();
236
+ for (let signal of signals) {
237
+ if (signal.aborted)
238
+ return controller.abort(), signal;
239
+ let onAbort = () => {
240
+ controller.abort(signal.reason);
241
+ };
242
+ signal.addEventListener("abort", onAbort, { signal: controller.signal });
243
+ }
244
+ return controller.signal;
245
+ }
246
+ async function readStream(stream) {
247
+ let output = "";
248
+ try {
249
+ for await (let chunk of stream) output += chunk.toString();
250
+ } catch {
251
+ }
252
+ return output;
253
+ }
254
+ var ExecProcess = class {
255
+ _process;
256
+ _aborted = !1;
257
+ _options;
258
+ _command;
259
+ _args;
260
+ _resolveClose;
261
+ _processClosed;
262
+ _thrownError;
263
+ get process() {
264
+ return this._process;
265
+ }
266
+ get pid() {
267
+ return this._process?.pid;
268
+ }
269
+ get exitCode() {
270
+ if (this._process && this._process.exitCode !== null) return this._process.exitCode;
271
+ }
272
+ get signalCode() {
273
+ return this._process?.signalCode ?? null;
274
+ }
275
+ constructor(command, args, options) {
276
+ this._options = {
277
+ ...defaultOptions,
278
+ ...options
279
+ }, this._command = command, this._args = args ?? [], this._processClosed = new Promise((resolve2) => {
280
+ this._resolveClose = resolve2;
281
+ });
282
+ }
283
+ kill(signal) {
284
+ return this._process?.kill(signal) === !0;
285
+ }
286
+ get aborted() {
287
+ return this._aborted;
288
+ }
289
+ get killed() {
290
+ return this._process?.killed === !0;
291
+ }
292
+ pipe(command, args, options) {
293
+ return exec(command, args, {
294
+ ...options,
295
+ stdin: this
296
+ });
297
+ }
298
+ async *[Symbol.asyncIterator]() {
299
+ let proc = this._process;
300
+ if (!proc) return;
301
+ let streams = [];
302
+ this._streamErr && streams.push(this._streamErr), this._streamOut && streams.push(this._streamOut);
303
+ let streamCombined = combineStreams(streams), rl = readline.createInterface({ input: streamCombined });
304
+ for await (let chunk of rl) yield chunk.toString();
305
+ if (await this._processClosed, proc.removeAllListeners(), this._thrownError) throw this._thrownError;
306
+ if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
307
+ }
308
+ async _waitForOutput() {
309
+ let proc = this._process;
310
+ if (!proc) throw new Error("No process was started");
311
+ let [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
312
+ await this._processClosed;
313
+ let { stdin } = this._options;
314
+ if (stdin && typeof stdin != "string" && await stdin, proc.removeAllListeners(), this._thrownError) throw this._thrownError;
315
+ let result = {
316
+ stderr,
317
+ stdout,
318
+ exitCode: this.exitCode
319
+ };
320
+ if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
321
+ return result;
322
+ }
323
+ then(onfulfilled, onrejected) {
324
+ return this._waitForOutput().then(onfulfilled, onrejected);
325
+ }
326
+ _streamOut;
327
+ _streamErr;
328
+ spawn() {
329
+ let options = this._options, nodeOptions = {
330
+ ...defaultNodeOptions,
331
+ ...options.nodeOptions
332
+ }, cwd$1 = nodeOptions?.cwd ?? cwd(), signals = [];
333
+ this._resetState(), options.timeout !== void 0 && signals.push(AbortSignal.timeout(options.timeout)), options.signal !== void 0 && signals.push(options.signal), options.persist === !0 && (nodeOptions.detached = !0), signals.length > 0 && (nodeOptions.signal = combineSignals(signals)), nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
334
+ let crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions), handle = spawn(crossResult.command, crossResult.args, crossResult.options);
335
+ if (handle.stderr && (this._streamErr = handle.stderr), handle.stdout && (this._streamOut = handle.stdout), this._process = handle, handle.once("error", this._onError), handle.once("close", this._onClose), handle.stdin) {
336
+ let { stdin } = options;
337
+ typeof stdin == "string" ? handle.stdin.end(stdin) : stdin?.process?.stdout?.pipe(handle.stdin);
338
+ }
339
+ }
340
+ _resetState() {
341
+ this._aborted = !1, this._processClosed = new Promise((resolve2) => {
342
+ this._resolveClose = resolve2;
343
+ }), this._thrownError = void 0;
344
+ }
345
+ _onError = (err) => {
346
+ if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
347
+ this._aborted = !0;
348
+ return;
349
+ }
350
+ this._thrownError = err;
351
+ };
352
+ _onClose = () => {
353
+ this._resolveClose && this._resolveClose();
354
+ };
355
+ };
356
+ function xSync(command, args, options) {
357
+ let opts = {
358
+ ...defaultSyncOptions,
359
+ ...options
360
+ }, nodeOptions = {
361
+ ...defaultNodeOptions,
362
+ ...opts.nodeOptions
363
+ }, cwd$2 = nodeOptions?.cwd ?? cwd();
364
+ opts.timeout !== void 0 && (nodeOptions.timeout = opts.timeout), nodeOptions.env = computeEnv(cwd$2, nodeOptions.env, opts.nodePath);
365
+ let crossResult = normalizeSpawnCommand(command, args ?? [], nodeOptions), spawnResult = spawnSync(crossResult.command, crossResult.args, crossResult.options);
366
+ if (spawnResult.error) throw spawnResult.error;
367
+ let stdout = spawnResult.stdout?.toString() ?? "", stderr = spawnResult.stderr?.toString() ?? "", exitCode = spawnResult.status ?? void 0, signalCode = spawnResult.signal ?? null, killed = signalCode !== null, result = {
368
+ stdout,
369
+ stderr,
370
+ get exitCode() {
371
+ return exitCode;
372
+ },
373
+ get signalCode() {
374
+ return signalCode;
375
+ },
376
+ get pid() {
377
+ return spawnResult.pid;
378
+ },
379
+ get killed() {
380
+ return killed;
381
+ },
382
+ *[Symbol.iterator]() {
383
+ for (let text of [stdout, stderr]) {
384
+ if (!text) continue;
385
+ let lines = text.split(LINE_SEPARATOR_REGEX);
386
+ lines[lines.length - 1] === "" && lines.pop(), yield* lines;
387
+ }
388
+ }
389
+ };
390
+ if (opts.throwOnError && (exitCode !== 0 && exitCode !== void 0 || signalCode !== null)) throw new NonZeroExitError(result, {
391
+ stdout: result.stdout,
392
+ stderr: result.stderr,
393
+ exitCode: result.exitCode
394
+ }, command, args);
395
+ return result;
396
+ }
397
+ var x = (command, args, userOptions) => {
398
+ let proc = new ExecProcess(command, args, userOptions);
399
+ return proc.spawn(), proc;
400
+ }, exec = x;
401
+
402
+ // src/common/utils/exec.ts
403
+ var ExecError = class extends Error {
404
+ constructor(command, {
405
+ exitCode,
406
+ signal,
407
+ code,
408
+ stdout = "",
409
+ stderr = "",
410
+ cause
411
+ }) {
412
+ let shortMessage = `Command ${signal ? `was killed with ${signal}` : code ? `failed with ${code}` : `failed with exit code ${exitCode}`}: ${command}`;
413
+ super([shortMessage, stderr, stdout].filter(Boolean).join(`
414
+
415
+ `), { cause }), this.name = "ExecError", this.command = command, this.shortMessage = shortMessage, this.exitCode = exitCode, this.signal = signal, this.code = code, this.stdout = stdout, this.stderr = stderr;
416
+ }
417
+ }, withProcessEnv = (env) => ({ ...process.env, ...env });
418
+ function exec2(command, args = [], options = {}) {
419
+ let commandLine = [command, ...args].join(" "), result = x(command, args, {
420
+ throwOnError: !1,
421
+ timeout: options.timeout,
422
+ nodeOptions: {
423
+ cwd: options.cwd,
424
+ env: withProcessEnv(options.env),
425
+ stdio: options.stdio ?? "pipe",
426
+ signal: options.signal,
427
+ shell: options.shell
428
+ }
429
+ }), promise = Promise.resolve(result).then(
430
+ (output) => {
431
+ let signal = result.signalCode ?? void 0;
432
+ if (output.exitCode !== 0 || signal)
433
+ throw new ExecError(commandLine, { ...output, signal });
434
+ return output;
435
+ },
436
+ (error) => {
437
+ throw error?.name === "AbortError" ? error : new ExecError(commandLine, { code: error?.code, cause: error });
438
+ }
439
+ );
440
+ return Object.assign(promise, {
441
+ stdout: result.process?.stdout ?? null,
442
+ stderr: result.process?.stderr ?? null,
443
+ kill: () => result.kill()
444
+ });
445
+ }
446
+ function execSync(command, args = [], options = {}) {
447
+ let commandLine = [command, ...args].join(" "), output;
448
+ try {
449
+ output = xSync(command, args, {
450
+ throwOnError: !1,
451
+ timeout: options.timeout,
452
+ nodeOptions: {
453
+ cwd: options.cwd,
454
+ env: withProcessEnv(options.env),
455
+ stdio: options.stdio ?? "pipe",
456
+ encoding: "utf8",
457
+ shell: options.shell
458
+ }
459
+ });
460
+ } catch (error) {
461
+ throw new ExecError(commandLine, {
462
+ code: error?.code,
463
+ cause: error
464
+ });
465
+ }
466
+ let signal = output.signalCode ?? void 0;
467
+ if (output.exitCode !== 0 || signal)
468
+ throw new ExecError(commandLine, { ...output, signal });
469
+ return output;
470
+ }
471
+ function execNode(scriptPath, args = [], options = {}) {
472
+ return fork(scriptPath, args, {
473
+ cwd: options.cwd,
474
+ env: withProcessEnv(options.env),
475
+ signal: options.signal,
476
+ stdio: ["pipe", "pipe", "pipe", "ipc"]
477
+ });
478
+ }
479
+
480
+ export {
481
+ exec2 as exec,
482
+ execSync,
483
+ execNode,
484
+ isWebContainer,
485
+ loadEnvs,
486
+ stringifyEnvs,
487
+ stringifyProcessEnvs,
488
+ optionalEnvToBoolean,
489
+ isCI,
490
+ getComponentIdFromEntry,
491
+ STORY_FILE_TEST_REGEXP,
492
+ isEligibleStoryEntry,
493
+ getStoryImportPathFromEntry,
494
+ selectComponentEntriesByComponentId
495
+ };
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_ubhjlnocuxr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ubhjlnocuxr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ubhjlnocuxr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ubhjlnocuxr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ubhjlnocuxr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.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
  UniversalStoreFollowerTimeoutError
14
- } from "./chunk-M2UZP5GC.js";
14
+ } from "./chunk-PAN35AYX.js";
15
15
 
16
16
  // src/shared/universal-store/index.ts
17
17
  import { dedent } from "ts-dedent";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_ubhjlnocuxr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ubhjlnocuxr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ubhjlnocuxr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ubhjlnocuxr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ubhjlnocuxr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __require
15
- } from "./chunk-WS367FSJ.js";
15
+ } from "./chunk-A35J7YYA.js";
16
16
 
17
17
  // ../../node_modules/has-flag/index.js
18
18
  var require_has_flag = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_ubhjlnocuxr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ubhjlnocuxr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ubhjlnocuxr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7qov04rgzsv from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7qov04rgzsv from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7qov04rgzsv from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ubhjlnocuxr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ubhjlnocuxr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ubhjlnocuxr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7qov04rgzsv.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7qov04rgzsv.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration