@aussieljk/forkbook 0.0.1-5 → 0.0.1-7

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 (314) hide show
  1. package/dist/_browser-chunks/{Color-GTF4GM7L.js → Color-2YRIFQLC.js} +1 -1
  2. package/dist/_browser-chunks/WithTooltip-4R5JMWZ7.js +196 -0
  3. package/dist/_browser-chunks/{chunk-MJY6ITYT.js → chunk-4EFKUJG2.js} +10 -10
  4. package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
  5. package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-DAUHYZUB.js} +550 -1621
  6. package/dist/_browser-chunks/chunk-E47B5255.js +1149 -0
  7. package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
  8. package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
  9. package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
  10. package/dist/_browser-chunks/{chunk-HOSBMS2F.js → chunk-HTL5ODCB.js} +1 -1
  11. package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
  12. package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
  13. package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
  14. package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
  15. package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
  16. package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
  17. package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
  18. package/dist/_browser-chunks/chunk-WVF42CP2.js +6027 -0
  19. package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
  20. package/dist/_node-chunks/{attached-runtime-IOE3BXIY.js → attached-runtime-WFZCCGUB.js} +29 -29
  21. package/dist/_node-chunks/{builder-manager-GDFEGD72.js → builder-manager-DHKHRZK4.js} +155 -148
  22. package/dist/_node-chunks/{chunk-M2QB5ALN.js → chunk-3ZCGT6VF.js} +6 -6
  23. package/dist/_node-chunks/{chunk-SUJXQU74.js → chunk-4HGC3G6B.js} +46 -15
  24. package/dist/_node-chunks/{chunk-WMQ2VCTF.js → chunk-5PYQ573S.js} +7 -7
  25. package/dist/_node-chunks/{chunk-TYCDPVIH.js → chunk-64JPAW3T.js} +6 -6
  26. package/dist/_node-chunks/chunk-6CB3XSQ2.js +495 -0
  27. package/dist/_node-chunks/{chunk-MHDKWHOA.js → chunk-6K3ZE4HN.js} +6 -6
  28. package/dist/_node-chunks/{chunk-3DCJB2D4.js → chunk-6QZ3PX5R.js} +6 -6
  29. package/dist/_node-chunks/{chunk-6DOJKR3V.js → chunk-7HVDL6M3.js} +29843 -51588
  30. package/dist/_node-chunks/chunk-7PMQPS5E.js +347 -0
  31. package/dist/_node-chunks/{chunk-L5CY6HKG.js → chunk-7V5AOV2J.js} +7 -7
  32. package/dist/_node-chunks/{chunk-AXJJB2K6.js → chunk-7VHCAGBJ.js} +8 -8
  33. package/dist/_node-chunks/{chunk-3DX6THMV.js → chunk-ATX7SHS7.js} +8 -8
  34. package/dist/_node-chunks/{chunk-SDXU22OH.js → chunk-BQC6WCUS.js} +6 -6
  35. package/dist/_node-chunks/{chunk-D6B2DRQZ.js → chunk-BR4WDRY6.js} +8 -8
  36. package/dist/_node-chunks/{chunk-SJZQ44OR.js → chunk-BRHJ4P3A.js} +6 -6
  37. package/dist/_node-chunks/{chunk-N4FLP7AO.js → chunk-CBBFNVFZ.js} +7 -7
  38. package/dist/_node-chunks/{chunk-PHXCOTMO.js → chunk-CDFQORVD.js} +34 -949
  39. package/dist/_node-chunks/{chunk-SR3BCYEH.js → chunk-CENNLCU7.js} +6 -6
  40. package/dist/_node-chunks/{chunk-OTFIQXHR.js → chunk-CNMMDQC3.js} +27 -50
  41. package/dist/_node-chunks/{chunk-E4C2H45J.js → chunk-DMDZPUHM.js} +6 -6
  42. package/dist/_node-chunks/{chunk-45LRLOYO.js → chunk-DT45EUDD.js} +60 -134
  43. package/dist/_node-chunks/{chunk-KQFHT7SW.js → chunk-EAL4RVEF.js} +6 -6
  44. package/dist/_node-chunks/chunk-EFFWFE6W.js +11 -0
  45. package/dist/_node-chunks/{chunk-MDGNN3FJ.js → chunk-ESCZ2NSB.js} +6 -6
  46. package/dist/_node-chunks/{chunk-T2I453AJ.js → chunk-ESZIQTUH.js} +7 -7
  47. package/dist/_node-chunks/{chunk-HWY2CAUH.js → chunk-F3SAYS4R.js} +6 -6
  48. package/dist/_node-chunks/{chunk-LSP54OYM.js → chunk-FTUQ7T3V.js} +25 -8
  49. package/dist/_node-chunks/{chunk-AAAUVDWT.js → chunk-FVFSSIGA.js} +10 -10
  50. package/dist/_node-chunks/{chunk-GS4VNNSS.js → chunk-G2AANC4A.js} +6 -6
  51. package/dist/_node-chunks/{chunk-SAAQFJL4.js → chunk-HUMAXGH2.js} +6 -6
  52. package/dist/_node-chunks/{chunk-A4XRNDN4.js → chunk-I535GEPH.js} +7 -7
  53. package/dist/_node-chunks/{chunk-CK4EHW3K.js → chunk-J3Q56GX3.js} +25 -25
  54. package/dist/_node-chunks/{chunk-U47PBQZ3.js → chunk-JDKYP7FW.js} +10 -10
  55. package/dist/_node-chunks/{chunk-7TUSIVWS.js → chunk-JED5F3H2.js} +6 -6
  56. package/dist/_node-chunks/{chunk-UM5G27IC.js → chunk-JMS4H7QB.js} +7 -7
  57. package/dist/_node-chunks/{chunk-GR65OLAH.js → chunk-JOSJ64KD.js} +7 -7
  58. package/dist/_node-chunks/{chunk-XUHEL63G.js → chunk-JPHSU5OI.js} +6 -6
  59. package/dist/_node-chunks/{chunk-NYWD5LYM.js → chunk-JQICISDD.js} +6 -6
  60. package/dist/_node-chunks/{chunk-I3DKGHVD.js → chunk-JTLOSDYL.js} +9 -9
  61. package/dist/_node-chunks/{chunk-5KAJVK4E.js → chunk-K5RUOW42.js} +7 -7
  62. package/dist/_node-chunks/{chunk-UKEJISQU.js → chunk-KHWCZDIW.js} +650 -9
  63. package/dist/_node-chunks/chunk-KWER36VB.js +20 -0
  64. package/dist/_node-chunks/{chunk-YTBTCM22.js → chunk-LJTP5PAJ.js} +6 -6
  65. package/dist/_node-chunks/chunk-LZYYZ62Y.js +19 -0
  66. package/dist/_node-chunks/{chunk-CGXW2HFE.js → chunk-M7ZVSBNU.js} +6 -6
  67. package/dist/_node-chunks/{chunk-BTFSFATC.js → chunk-MBIIJTGQ.js} +11 -10
  68. package/dist/_node-chunks/{chunk-VBSVLIXU.js → chunk-MF3AT3JQ.js} +6 -6
  69. package/dist/_node-chunks/{chunk-AX2ALHBK.js → chunk-MF5BYASO.js} +9 -6
  70. package/dist/_node-chunks/{chunk-JJNO3SFI.js → chunk-MJFMB4WD.js} +9 -9
  71. package/dist/_node-chunks/{chunk-E4TBS4MV.js → chunk-MRWBN46D.js} +8 -8
  72. package/dist/_node-chunks/{chunk-QQXFB4YA.js → chunk-MZQXEAI6.js} +9 -9
  73. package/dist/_node-chunks/{chunk-TZ2TZW2K.js → chunk-NLPC2DDQ.js} +6 -6
  74. package/dist/_node-chunks/{chunk-HCX5R46Q.js → chunk-NQAFLS5U.js} +8 -8
  75. package/dist/_node-chunks/{chunk-5LE7GXEC.js → chunk-NSZGBFPR.js} +6 -6
  76. package/dist/_node-chunks/{chunk-WHDCECIV.js → chunk-NUYBFTOU.js} +7 -7
  77. package/dist/_node-chunks/{chunk-RCPKLP3X.js → chunk-O7VJA7SM.js} +7 -7
  78. package/dist/_node-chunks/{chunk-2GY2FKLH.js → chunk-OGJ7LDX3.js} +7 -7
  79. package/dist/_node-chunks/{chunk-F4Q7OCCN.js → chunk-OWT6AVWK.js} +8 -8
  80. package/dist/_node-chunks/{chunk-LCXIUTOU.js → chunk-P3GOMPP3.js} +7 -7
  81. package/dist/_node-chunks/{chunk-KCAPE7OJ.js → chunk-PQLXHVWK.js} +6 -6
  82. package/dist/_node-chunks/{chunk-V45RRBTK.js → chunk-Q6QRFKHB.js} +8 -8
  83. package/dist/_node-chunks/{chunk-VJSOHPVD.js → chunk-QSP42ZBM.js} +6 -6
  84. package/dist/_node-chunks/{chunk-7XUQM6SR.js → chunk-QWDR5OWQ.js} +14 -14
  85. package/dist/_node-chunks/{chunk-YLKS7U3M.js → chunk-QWRQXG2V.js} +8 -8
  86. package/dist/_node-chunks/{chunk-4WO3GNZQ.js → chunk-R6AKCXPH.js} +6 -6
  87. package/dist/_node-chunks/{chunk-AXQ6LLSE.js → chunk-RCY7TLET.js} +8 -8
  88. package/dist/_node-chunks/chunk-RKKMQA6N.js +620 -0
  89. package/dist/_node-chunks/{chunk-BV3QRFE6.js → chunk-RZ7UEP4N.js} +6 -6
  90. package/dist/_node-chunks/{chunk-OSJFTZ5N.js → chunk-S3HB4EWT.js} +6 -6
  91. package/dist/_node-chunks/{chunk-QZVFIEOM.js → chunk-SHH7JROR.js} +6 -6
  92. package/dist/_node-chunks/{chunk-Q33BYVLY.js → chunk-SWHTDOB4.js} +7 -7
  93. package/dist/_node-chunks/{chunk-ZPPVG262.js → chunk-SZYMLCHF.js} +6 -6
  94. package/dist/_node-chunks/{chunk-ES5QZBSB.js → chunk-TOGDRW2W.js} +6 -6
  95. package/dist/_node-chunks/{chunk-J64XMUPF.js → chunk-U3E7E4Q2.js} +10 -10
  96. package/dist/_node-chunks/{chunk-RECGEABN.js → chunk-U6DHF3RM.js} +7 -7
  97. package/dist/_node-chunks/{chunk-OB2XHL53.js → chunk-UAG3XK32.js} +31 -30
  98. package/dist/_node-chunks/{chunk-BBD2KUV4.js → chunk-UF6Q6L5C.js} +22 -20
  99. package/dist/_node-chunks/chunk-UGXN7JTT.js +18 -0
  100. package/dist/_node-chunks/{chunk-EWAGCBER.js → chunk-UNCBLHIP.js} +8 -8
  101. package/dist/_node-chunks/chunk-UPJMGWMZ.js +25 -0
  102. package/dist/_node-chunks/chunk-UVV24PG4.js +69 -0
  103. package/dist/_node-chunks/{chunk-E6KXSYWR.js → chunk-WBB4NQ6H.js} +6 -6
  104. package/dist/_node-chunks/{chunk-B2IOB2V3.js → chunk-WHOF2BJB.js} +7 -7
  105. package/dist/_node-chunks/{chunk-FA36CEN4.js → chunk-WME5NEJA.js} +6 -6
  106. package/dist/_node-chunks/{chunk-BFZG4UTW.js → chunk-X63YMAHP.js} +7 -7
  107. package/dist/_node-chunks/chunk-Y2GHAOKI.js +25 -0
  108. package/dist/_node-chunks/{chunk-AXG3EMKS.js → chunk-Y6G64J5S.js} +7 -15
  109. package/dist/_node-chunks/chunk-YVIPYJ53.js +2609 -0
  110. package/dist/_node-chunks/{chunk-NDGTNFUN.js → chunk-YZWUD7I5.js} +16 -13
  111. package/dist/_node-chunks/{chunk-VN3A5CEH.js → chunk-ZIDIYSJQ.js} +7 -7
  112. package/dist/_node-chunks/chunk-ZSGOW4WQ.js +20 -0
  113. package/dist/_node-chunks/dist-5EG56KTF.js +16 -0
  114. package/dist/_node-chunks/dist-UEXSNGGQ.js +27 -0
  115. package/dist/_node-chunks/{local-runtime-RW6AAWSX.js → local-runtime-UN5QK2SE.js} +20 -20
  116. package/dist/_node-chunks/{mdx-plugin-BKWCT6CB.js → mdx-plugin-6M6CMNL3.js} +2263 -130
  117. package/dist/_node-chunks/{monorepo-ZFJ6HM34.js → monorepo-253VKW4B.js} +11 -11
  118. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-C3EW4VJW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-3ZOE54OQ.js} +11 -11
  119. package/dist/_node-chunks/optimized-tests-JSWLRMEI.js +22 -0
  120. package/dist/_node-chunks/{pattern-copy-play-2ZMJNCBS.js → pattern-copy-play-CCCJRMSL.js} +9 -9
  121. package/dist/_node-chunks/postinstallAddon-VMANBHPR.js +20 -0
  122. package/dist/_node-chunks/{rehype-external-links-RT5Z62RV.js → rehype-external-links-LJTPLCGD.js} +9 -9
  123. package/dist/_node-chunks/{rehype-slug-H5TWHJ6G.js → rehype-slug-KQI7ULEZ.js} +9 -9
  124. package/dist/_node-chunks/{relaxed-limits-DYLWZGE4.js → relaxed-limits-MUE2NI7S.js} +11 -11
  125. package/dist/_node-chunks/{run-65LLGSVR.js → run-PGZMPNMS.js} +246 -13
  126. package/dist/_node-chunks/{run-BQQLK454.js → run-SYLR25HA.js} +17 -17
  127. package/dist/_node-chunks/session-id-J4A25UQ6.js +23 -0
  128. package/dist/_node-chunks/{setup-NEO7XX66.js → setup-XZWSUYPG.js} +8 -8
  129. package/dist/_node-chunks/{vitest.config.4.template-6P3FZQTY.js → vitest.config.4.template-T25YYRGV.js} +7 -7
  130. package/dist/actions/decorator.js +2 -1
  131. package/dist/actions/index.js +2 -1
  132. package/dist/addon-a11y/index.js +2 -1
  133. package/dist/addon-a11y/manager.js +6 -5
  134. package/dist/addon-a11y/preset.js +7 -7
  135. package/dist/addon-a11y/preview.js +2 -1
  136. package/dist/addon-docs/blocks.js +28 -14
  137. package/dist/addon-docs/manager.js +2 -2
  138. package/dist/addon-docs/preset.js +10 -10
  139. package/dist/addon-links/index.js +3 -2
  140. package/dist/addon-links/preview.d.ts +1 -1
  141. package/dist/addon-links/preview.js +3 -2
  142. package/dist/addon-links/react/index.js +2 -1
  143. package/dist/addon-mcp/preset.js +8 -8
  144. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +21 -44
  145. package/dist/addon-ondevice-actions/index.js +5 -1
  146. package/dist/addon-ondevice-actions/register.js +5 -1
  147. package/dist/addon-themes/postinstall.js +7 -7
  148. package/dist/addon-vitest/constants.js +8 -8
  149. package/dist/addon-vitest/manager.js +2 -2
  150. package/dist/addon-vitest/node/coverage-reporter.js +8 -8
  151. package/dist/addon-vitest/node/vitest.js +16 -16
  152. package/dist/addon-vitest/postinstall.js +10 -10
  153. package/dist/addon-vitest/preset.js +15 -16
  154. package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
  155. package/dist/addon-vitest/vitest-plugin/index.js +17 -17
  156. package/dist/babel/index.d.ts +91 -842
  157. package/dist/babel/index.js +13 -19
  158. package/dist/bin/core.js +61 -60
  159. package/dist/bin/dispatcher.js +16 -11
  160. package/dist/bin/loader.js +16 -15
  161. package/dist/builder-vite/index.js +15 -15
  162. package/dist/builder-vite/preset.js +13 -13
  163. package/dist/{chunk-Jf7j2Ot0.d.ts → chunk-BGhyFTJO.d.ts} +1 -1
  164. package/dist/{chunk-Ce6uhJuR.d.ts → chunk-B_ZhEPlo.d.ts} +1 -1
  165. package/dist/{chunk-CZHsX9Zo.d.ts → chunk-CMaYrou5.d.ts} +1 -1
  166. package/dist/chunk-CV4-Z2pn.d.ts +30 -0
  167. package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
  168. package/dist/{chunk-DpljNJTz.d.ts → chunk-LrH1y9J2.d.ts} +39 -0
  169. package/dist/cli/index.d.ts +13 -866
  170. package/dist/cli/index.js +42 -4952
  171. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  172. package/dist/cli/tools/sdk/child-host.js +17 -17
  173. package/dist/cli/tools/sdk/index.d.ts +1 -1
  174. package/dist/cli/tools/sdk/index.js +18 -18
  175. package/dist/cli-commands/bin/index.js +7 -7
  176. package/dist/client-logger/index.js +3 -1
  177. package/dist/common/index.d.ts +5 -4
  178. package/dist/common/index.js +35 -37
  179. package/dist/components/index.d.ts +14 -231
  180. package/dist/components/index.js +2512 -8359
  181. package/dist/core-events/index.d.ts +3 -2
  182. package/dist/core-events/index.js +3 -1
  183. package/dist/core-server/index.d.ts +2 -2
  184. package/dist/core-server/index.js +450 -147
  185. package/dist/core-server/presets/common-manager.js +62 -866
  186. package/dist/core-server/presets/common-override-preset.js +12 -10
  187. package/dist/core-server/presets/common-preset.js +39 -40
  188. package/dist/create/bin/index.js +7 -7
  189. package/dist/create/index.js +15 -15
  190. package/dist/csf/index.d.ts +1 -1
  191. package/dist/csf/index.js +27 -93
  192. package/dist/csf-tools/index.d.ts +14 -12
  193. package/dist/csf-tools/index.js +14 -14
  194. package/dist/instrumenter/index.js +3 -1
  195. package/dist/manager/_manager-chunks/{globals-runtime-BgVwdR45.js → globals-runtime-4fCHtNC6.js} +1 -1
  196. package/dist/manager/_manager-chunks/{globals-runtime-DW1HVuLt.js → globals-runtime-BKPOYSwp.js} +410 -379
  197. package/dist/manager/_manager-chunks/{globals-runtime-zVfMhZAt.js → globals-runtime-BMIT8BJb.js} +1 -1
  198. package/dist/manager/_manager-chunks/{globals-runtime-CUBVmgcG.js → globals-runtime-BO0pfoqL.js} +4 -4
  199. package/dist/manager/_manager-chunks/{globals-runtime-Bke4A4DG.js → globals-runtime-BZKYJxYC.js} +1 -1
  200. package/dist/manager/_manager-chunks/{globals-runtime-D_YKR9nf.js → globals-runtime-Bpc_ftuT.js} +1252 -539
  201. package/dist/manager/_manager-chunks/{globals-runtime-DCOX9nD5.js → globals-runtime-CBviMKtt.js} +1 -17
  202. package/dist/manager/_manager-chunks/{globals-runtime-CTB3rhS1.js → globals-runtime-CI-C7ncS.js} +10 -10
  203. package/dist/manager/_manager-chunks/{globals-runtime-Cr3nYYcT.js → globals-runtime-CI_p54Ha.js} +59 -60
  204. package/dist/manager/_manager-chunks/{globals-runtime-CiLcg4q9.js → globals-runtime-CTyYXvUm.js} +1 -1
  205. package/dist/manager/_manager-chunks/{globals-runtime-DqNrRmOM.js → globals-runtime-CoCzM1V_.js} +93 -2146
  206. package/dist/manager/_manager-chunks/{globals-runtime-CXKb33hg.js → globals-runtime-CzEhVGVp.js} +141 -54
  207. package/dist/manager/_manager-chunks/{globals-runtime-CF4o9_wT.js → globals-runtime-D82vqOGq.js} +2 -1
  208. package/dist/manager/_manager-chunks/{globals-runtime-ALpzCL93.js → globals-runtime-DB8fVA5g.js} +2 -145
  209. package/dist/manager/_manager-chunks/{globals-runtime-DMvB3-IM.js → globals-runtime-DMq1Phbl.js} +153 -141
  210. package/dist/manager/_manager-chunks/globals-runtime-DOPUchia.js +5282 -0
  211. package/dist/manager/_manager-chunks/{globals-runtime-BcNHymiF.js → globals-runtime-Dbt08xWQ.js} +1 -1
  212. package/dist/manager/_manager-chunks/{globals-runtime-m07udJ_K.js → globals-runtime-kmPSyf3j.js} +637 -1730
  213. package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
  214. package/dist/manager/_manager-chunks/{runtime-DrjpEyLM.js → runtime-B4U0u9p4.js} +5 -147
  215. package/dist/manager/_manager-chunks/{runtime-B-eSQdxk.js → runtime-BM30BmeT.js} +503 -44
  216. package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
  217. package/dist/manager/_manager-chunks/{runtime-a5zd7km2.js → runtime-Cf0p9DUx.js} +5 -531
  218. package/dist/manager/_manager-chunks/{runtime-Cdz2BHhM.js → runtime-D-nYLsdk.js} +57 -34
  219. package/dist/manager/_manager-chunks/runtime-D09XMY6V.js +294 -0
  220. package/dist/manager/_manager-chunks/{runtime-Bldwclun.js → runtime-DvrwKw7z.js} +92 -303
  221. package/dist/manager/_manager-chunks/{runtime-DGHNKNQl.js → runtime-DzxaTqVN.js} +10 -29
  222. package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
  223. package/dist/manager/_manager-chunks/{runtime-Cmu7D8A0.js → runtime-ecY5qnmo.js} +193 -184
  224. package/dist/manager/globals-runtime.js +1 -1
  225. package/dist/manager/runtime.js +1 -1
  226. package/dist/manager-api/index.d.ts +1 -1
  227. package/dist/manager-api/index.js +22 -28
  228. package/dist/manager-errors.d.ts +1 -1
  229. package/dist/mcp/index.js +8 -8
  230. package/dist/mocking-utils/index.js +16 -11
  231. package/dist/nextjs-vite/index.js +3 -2
  232. package/dist/nextjs-vite/node/index.js +7 -7
  233. package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
  234. package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
  235. package/dist/nextjs-vite/preset.js +93 -14
  236. package/dist/nextjs-vite/vite-plugin/index.js +7 -7
  237. package/dist/nextjs-vite-plugin/index.d.ts +1 -2
  238. package/dist/nextjs-vite-plugin/index.js +12 -27
  239. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  240. package/dist/node-logger/index.d.ts +65 -72
  241. package/dist/node-logger/index.js +11 -12
  242. package/dist/oxc-parser/index.js +11 -13
  243. package/dist/oxc-parser/worker.js +10 -10
  244. package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
  245. package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
  246. package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
  247. package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
  248. package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
  249. package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
  250. package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
  251. package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
  252. package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
  253. package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
  254. package/dist/preview/runtime.js +1 -1
  255. package/dist/preview-api/index.d.ts +1 -1
  256. package/dist/preview-api/index.js +2 -1
  257. package/dist/preview-errors.d.ts +1 -1
  258. package/dist/react/docgen/docgen-worker.js +11 -12
  259. package/dist/react/entry-preview.js +2 -1
  260. package/dist/react/index.js +6 -4
  261. package/dist/react/preset.js +13 -14
  262. package/dist/react/preview.js +3 -2
  263. package/dist/react-native/bin/get-stories.js +8 -8
  264. package/dist/react-native/index.js +25 -211
  265. package/dist/react-native/metro/node.js +10 -9
  266. package/dist/react-native/metro/withStorybook.js +11 -10
  267. package/dist/react-native/scripts/generate.js +8 -8
  268. package/dist/react-vite/node/index.js +7 -7
  269. package/dist/react-vite/preset.js +7 -7
  270. package/dist/router/index.js +3 -1
  271. package/dist/server-errors.d.ts +1 -1
  272. package/dist/server-errors.js +9 -9
  273. package/dist/shared/open-service/index.d.ts +1 -1
  274. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  275. package/dist/telemetry/index.js +43 -45
  276. package/dist/test/index.js +808 -573
  277. package/dist/theming/create.js +2 -1
  278. package/dist/theming/index.js +22 -1
  279. package/dist/types/index.d.ts +1 -1
  280. package/package.json +21 -44
  281. package/dist/_browser-chunks/WithTooltip-V55S6YCY.js +0 -1619
  282. package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
  283. package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
  284. package/dist/_node-chunks/chunk-6QQTZT3Z.js +0 -19
  285. package/dist/_node-chunks/chunk-BRD332PB.js +0 -3008
  286. package/dist/_node-chunks/chunk-E2XKJLXK.js +0 -4731
  287. package/dist/_node-chunks/chunk-F2LQJXAB.js +0 -29
  288. package/dist/_node-chunks/chunk-MCZZMBPA.js +0 -20
  289. package/dist/_node-chunks/chunk-MMFUHYSU.js +0 -23
  290. package/dist/_node-chunks/chunk-UGFY5LEG.js +0 -18
  291. package/dist/_node-chunks/chunk-UO5ZOCSQ.js +0 -662
  292. package/dist/_node-chunks/chunk-UW35FCXF.js +0 -20
  293. package/dist/_node-chunks/chunk-VMUXW2E2.js +0 -5414
  294. package/dist/_node-chunks/chunk-VNXE7UJL.js +0 -51
  295. package/dist/_node-chunks/chunk-VRJJ43P2.js +0 -11
  296. package/dist/_node-chunks/chunk-WCJUS7OC.js +0 -1877
  297. package/dist/_node-chunks/chunk-WMBMSNB7.js +0 -36
  298. package/dist/_node-chunks/chunk-YV2QBXU6.js +0 -3823
  299. package/dist/_node-chunks/chunk-ZZNBVMBU.js +0 -25
  300. package/dist/_node-chunks/dist-VFUGPNLK.js +0 -16
  301. package/dist/_node-chunks/globby-N7LO32D3.js +0 -2884
  302. package/dist/_node-chunks/jiti-SJDZ7LQB.js +0 -3848
  303. package/dist/_node-chunks/lib-4HD6QL5R.js +0 -366
  304. package/dist/_node-chunks/optimized-tests-LVKXZ3HQ.js +0 -22
  305. package/dist/_node-chunks/postinstallAddon-I6MAL6PW.js +0 -20
  306. package/dist/_node-chunks/session-id-6Z2RXBTG.js +0 -23
  307. package/dist/chunk-BfBzpgct.d.ts +0 -916
  308. package/dist/core-server/presets/common-manager.css +0 -170
  309. package/dist/manager/_manager-chunks/globals-runtime-Bon7UvQk.js +0 -9766
  310. package/dist/manager/_manager-chunks/globals-runtime-DDOIxI_l.js +0 -1584
  311. package/dist/manager/_manager-chunks/runtime-CuJiHYCp.js +0 -22
  312. package/dist/manager/_manager-chunks/runtime-DFhLVh8q.js +0 -456
  313. package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
  314. package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_1qqypd7gt14 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_1qqypd7gt14 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_1qqypd7gt14 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_1qqypd7gt14.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_1qqypd7gt14.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_1qqypd7gt14.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.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-2GY2FKLH.js";
14
+ } from "./chunk-OGJ7LDX3.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_1qqypd7gt14 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_1qqypd7gt14 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_1qqypd7gt14 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_1qqypd7gt14.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_1qqypd7gt14.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_1qqypd7gt14.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
@@ -0,0 +1,495 @@
1
+ import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.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-7PMQPS5E.js";
15
+ import {
16
+ Tag
17
+ } from "./chunk-JQICISDD.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,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_1qqypd7gt14 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_1qqypd7gt14 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_1qqypd7gt14 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_1qqypd7gt14.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_1qqypd7gt14.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_1qqypd7gt14.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_1qqypd7gt14 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_1qqypd7gt14 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_1qqypd7gt14 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_1qqypd7gt14.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_1qqypd7gt14.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_1qqypd7gt14.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Forkbook's esbuild configuration