@aussieljk/forkbook 0.0.0-stage → 0.0.1-10

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 (604) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +59 -2
  3. package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
  4. package/assets/browser/favicon-wrapper.svg +46 -0
  5. package/assets/browser/favicon.svg +1 -0
  6. package/assets/browser/inter-LICENSE.txt +92 -0
  7. package/assets/browser/inter-variable-italic.woff2 +0 -0
  8. package/assets/browser/inter-variable.woff2 +0 -0
  9. package/assets/browser/mirror-ball.png +0 -0
  10. package/assets/builder-vite/iframe.html +83 -0
  11. package/assets/create/rendererAssets/.eslintrc.json +16 -0
  12. package/assets/create/rendererAssets/common/Configure.mdx +388 -0
  13. package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
  14. package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
  15. package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
  16. package/assets/create/rendererAssets/common/assets/assets.png +0 -0
  17. package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
  18. package/assets/create/rendererAssets/common/assets/context.png +0 -0
  19. package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
  20. package/assets/create/rendererAssets/common/assets/docs.png +0 -0
  21. package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
  22. package/assets/create/rendererAssets/common/assets/github.svg +1 -0
  23. package/assets/create/rendererAssets/common/assets/share.png +0 -0
  24. package/assets/create/rendererAssets/common/assets/styling.png +0 -0
  25. package/assets/create/rendererAssets/common/assets/testing.png +0 -0
  26. package/assets/create/rendererAssets/common/assets/theming.png +0 -0
  27. package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
  28. package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
  29. package/assets/create/rendererAssets/common/button.css +30 -0
  30. package/assets/create/rendererAssets/common/header.css +32 -0
  31. package/assets/create/rendererAssets/common/page.css +68 -0
  32. package/assets/create/templates/react-native/index.expo.js +20 -0
  33. package/assets/create/templates/react-native/index.js +25 -0
  34. package/assets/docs/addon-backgrounds.gif +0 -0
  35. package/assets/docs/addon-controls-args-annotated.png +0 -0
  36. package/assets/docs/addon-controls-args-background-color.png +0 -0
  37. package/assets/docs/addon-controls-args-background-string.png +0 -0
  38. package/assets/docs/addon-controls-args-docs.png +0 -0
  39. package/assets/docs/addon-controls-args-logging.png +0 -0
  40. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  41. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  42. package/assets/docs/addon-controls-args-reflow.png +0 -0
  43. package/assets/docs/addon-controls-args-template.png +0 -0
  44. package/assets/docs/addon-controls-expanded.png +0 -0
  45. package/assets/docs/addon-controls-hero.gif +0 -0
  46. package/assets/docs/addon-controls-install.png +0 -0
  47. package/assets/docs/hero.gif +0 -0
  48. package/assets/docs/highlight.png +0 -0
  49. package/assets/docs/message-reference.png +0 -0
  50. package/assets/docs/viewport.png +0 -0
  51. package/assets/react-native/metro-env.d.ts +69 -0
  52. package/assets/server/addon.tsconfig.json +6 -0
  53. package/assets/server/base-preview-body.html +116 -0
  54. package/assets/server/base-preview-head.html +494 -0
  55. package/assets/server/openBrowser.applescript +94 -0
  56. package/assets/server/template.ejs +85 -0
  57. package/dist/.build-stamp +0 -0
  58. package/dist/_browser-chunks/Color-X63I7FHI.js +1025 -0
  59. package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
  60. package/dist/_browser-chunks/WithTooltip-5S6F2P7L.js +198 -0
  61. package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
  62. package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
  63. package/dist/_browser-chunks/chunk-3HM3VWJS.js +2604 -0
  64. package/dist/_browser-chunks/chunk-3M5T7BW4.js +43 -0
  65. package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
  66. package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
  67. package/dist/_browser-chunks/chunk-4KIQBRD2.js +17 -0
  68. package/dist/_browser-chunks/chunk-5H4KFI44.js +386 -0
  69. package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
  70. package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
  71. package/dist/_browser-chunks/chunk-5Z65SURM.js +108 -0
  72. package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
  73. package/dist/_browser-chunks/chunk-6ELMKWKX.js +22 -0
  74. package/dist/_browser-chunks/chunk-76222HQR.js +253 -0
  75. package/dist/_browser-chunks/chunk-7DQREF4S.js +218 -0
  76. package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
  77. package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
  78. package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
  79. package/dist/_browser-chunks/chunk-BNP234B4.js +80 -0
  80. package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
  81. package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
  82. package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
  83. package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
  84. package/dist/_browser-chunks/chunk-DS2WQZGO.js +1956 -0
  85. package/dist/_browser-chunks/chunk-DYNTDJ3O.js +155 -0
  86. package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
  87. package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
  88. package/dist/_browser-chunks/chunk-EQKMUQF3.js +224 -0
  89. package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
  90. package/dist/_browser-chunks/chunk-FRAOQJDI.js +95 -0
  91. package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
  92. package/dist/_browser-chunks/chunk-GRO2ZYEJ.js +157 -0
  93. package/dist/_browser-chunks/chunk-I4ATZPNZ.js +34 -0
  94. package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
  95. package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
  96. package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
  97. package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
  98. package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
  99. package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
  100. package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
  101. package/dist/_browser-chunks/chunk-KYSD26D6.js +1966 -0
  102. package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
  103. package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
  104. package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
  105. package/dist/_browser-chunks/chunk-LTCXWKZO.js +2935 -0
  106. package/dist/_browser-chunks/chunk-LYYXDWR2.js +411 -0
  107. package/dist/_browser-chunks/chunk-MJIDTL3X.js +78 -0
  108. package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
  109. package/dist/_browser-chunks/chunk-N3NRW5XX.js +117 -0
  110. package/dist/_browser-chunks/chunk-N5WQGLI7.js +11 -0
  111. package/dist/_browser-chunks/chunk-NA4ITZTK.js +324 -0
  112. package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
  113. package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
  114. package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
  115. package/dist/_browser-chunks/chunk-NTUHL5NS.js +54 -0
  116. package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
  117. package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
  118. package/dist/_browser-chunks/chunk-O24AZJZ7.js +56 -0
  119. package/dist/_browser-chunks/chunk-ONTSNQON.js +20 -0
  120. package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
  121. package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
  122. package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
  123. package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
  124. package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
  125. package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
  126. package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
  127. package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
  128. package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
  129. package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
  130. package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
  131. package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
  132. package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
  133. package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
  134. package/dist/_browser-chunks/chunk-TTBPZQ24.js +3551 -0
  135. package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
  136. package/dist/_browser-chunks/chunk-UMGDO2ZM.js +169 -0
  137. package/dist/_browser-chunks/chunk-V5U45XXZ.js +24 -0
  138. package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
  139. package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
  140. package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
  141. package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
  142. package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
  143. package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
  144. package/dist/_browser-chunks/chunk-XTQCLWVH.js +1500 -0
  145. package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
  146. package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
  147. package/dist/_browser-chunks/chunk-ZHKZKFY4.js +199 -0
  148. package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
  149. package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
  150. package/dist/_node-chunks/attached-runtime-PDBJ2EGV.js +282 -0
  151. package/dist/_node-chunks/builder-manager-VLL26RPG.js +1139 -0
  152. package/dist/_node-chunks/chunk-3CSGIJKG.js +499 -0
  153. package/dist/_node-chunks/chunk-3W4KR5GX.js +2609 -0
  154. package/dist/_node-chunks/chunk-5NRWU7S2.js +194 -0
  155. package/dist/_node-chunks/chunk-5SMIGUYF.js +102 -0
  156. package/dist/_node-chunks/chunk-63LPGIV4.js +1049 -0
  157. package/dist/_node-chunks/chunk-6DHTL5G2.js +35 -0
  158. package/dist/_node-chunks/chunk-6DRVJCYP.js +299 -0
  159. package/dist/_node-chunks/chunk-7CV4VEA2.js +620 -0
  160. package/dist/_node-chunks/chunk-7KD5DKGZ.js +79 -0
  161. package/dist/_node-chunks/chunk-7O2UIVID.js +82 -0
  162. package/dist/_node-chunks/chunk-7OY4VMAT.js +90 -0
  163. package/dist/_node-chunks/chunk-AAL6X7YG.js +1986 -0
  164. package/dist/_node-chunks/chunk-ACSO4HQP.js +32 -0
  165. package/dist/_node-chunks/chunk-BDU3ZUMK.js +98 -0
  166. package/dist/_node-chunks/chunk-BMJPOQ2S.js +11 -0
  167. package/dist/_node-chunks/chunk-BNEC3EBC.js +28 -0
  168. package/dist/_node-chunks/chunk-BPL3ERBH.js +347 -0
  169. package/dist/_node-chunks/chunk-BXDMSX3D.js +30600 -0
  170. package/dist/_node-chunks/chunk-C3PLG47Q.js +25 -0
  171. package/dist/_node-chunks/chunk-CEDR5CNM.js +74 -0
  172. package/dist/_node-chunks/chunk-CKE4R4NL.js +26 -0
  173. package/dist/_node-chunks/chunk-CSFNS7HA.js +21 -0
  174. package/dist/_node-chunks/chunk-CZ3V3HHK.js +223 -0
  175. package/dist/_node-chunks/chunk-DNV3LPV3.js +33 -0
  176. package/dist/_node-chunks/chunk-DPILYJH4.js +33 -0
  177. package/dist/_node-chunks/chunk-DQ44ZAEM.js +25 -0
  178. package/dist/_node-chunks/chunk-DR7NW2MI.js +104 -0
  179. package/dist/_node-chunks/chunk-DRCP3DQF.js +209 -0
  180. package/dist/_node-chunks/chunk-EBWZKN2I.js +1297 -0
  181. package/dist/_node-chunks/chunk-ECOW63CV.js +92 -0
  182. package/dist/_node-chunks/chunk-ENBDAHOV.js +18 -0
  183. package/dist/_node-chunks/chunk-FAEOR2AW.js +40 -0
  184. package/dist/_node-chunks/chunk-FERXOKZY.js +80 -0
  185. package/dist/_node-chunks/chunk-FJFB7TWU.js +495 -0
  186. package/dist/_node-chunks/chunk-FQGQ5KHN.js +63 -0
  187. package/dist/_node-chunks/chunk-FR2ZDWKJ.js +45 -0
  188. package/dist/_node-chunks/chunk-FRBE7ES4.js +59 -0
  189. package/dist/_node-chunks/chunk-FWAF5NBL.js +20 -0
  190. package/dist/_node-chunks/chunk-FXBZWUW3.js +7044 -0
  191. package/dist/_node-chunks/chunk-FZ453CHY.js +25 -0
  192. package/dist/_node-chunks/chunk-G2ZUFOHU.js +68 -0
  193. package/dist/_node-chunks/chunk-GBVWRZHP.js +23 -0
  194. package/dist/_node-chunks/chunk-GGE7TBVX.js +121 -0
  195. package/dist/_node-chunks/chunk-GJSYGBI5.js +47 -0
  196. package/dist/_node-chunks/chunk-GKHLTHYM.js +4744 -0
  197. package/dist/_node-chunks/chunk-GQYATLH6.js +3708 -0
  198. package/dist/_node-chunks/chunk-HCP5DG52.js +2743 -0
  199. package/dist/_node-chunks/chunk-HVOSLI2K.js +20 -0
  200. package/dist/_node-chunks/chunk-ID3WA6WR.js +171 -0
  201. package/dist/_node-chunks/chunk-IGOX6TUG.js +95 -0
  202. package/dist/_node-chunks/chunk-IL7YA7QJ.js +148 -0
  203. package/dist/_node-chunks/chunk-IUPE4SU2.js +688 -0
  204. package/dist/_node-chunks/chunk-JVWXCB3L.js +7179 -0
  205. package/dist/_node-chunks/chunk-K4O2ZAMU.js +57 -0
  206. package/dist/_node-chunks/chunk-KRWR44KT.js +25 -0
  207. package/dist/_node-chunks/chunk-KWNBN3DV.js +132 -0
  208. package/dist/_node-chunks/chunk-LG3NMXCM.js +20 -0
  209. package/dist/_node-chunks/chunk-LH5QBX2U.js +1001 -0
  210. package/dist/_node-chunks/chunk-LX2XSPPL.js +59 -0
  211. package/dist/_node-chunks/chunk-M4QNXI37.js +21 -0
  212. package/dist/_node-chunks/chunk-MBPHOLXB.js +1218 -0
  213. package/dist/_node-chunks/chunk-MIWBXEUH.js +26 -0
  214. package/dist/_node-chunks/chunk-MKUA4ZCG.js +1193 -0
  215. package/dist/_node-chunks/chunk-MQC7ZY6L.js +5468 -0
  216. package/dist/_node-chunks/chunk-MRCPS4S3.js +48 -0
  217. package/dist/_node-chunks/chunk-MY7UVHPL.js +153 -0
  218. package/dist/_node-chunks/chunk-ND323XCC.js +33 -0
  219. package/dist/_node-chunks/chunk-NGFFEW2B.js +972 -0
  220. package/dist/_node-chunks/chunk-OPG46TLN.js +1119 -0
  221. package/dist/_node-chunks/chunk-PEL4YXU6.js +19 -0
  222. package/dist/_node-chunks/chunk-QFXAGOIO.js +115 -0
  223. package/dist/_node-chunks/chunk-QGC3UWR5.js +110 -0
  224. package/dist/_node-chunks/chunk-QGVU7IFS.js +414 -0
  225. package/dist/_node-chunks/chunk-QOFBJXPH.js +1525 -0
  226. package/dist/_node-chunks/chunk-QVLHVO4X.js +532 -0
  227. package/dist/_node-chunks/chunk-R2ZCFA7I.js +60 -0
  228. package/dist/_node-chunks/chunk-RC4HPD5Q.js +26 -0
  229. package/dist/_node-chunks/chunk-RJXAXHDJ.js +415 -0
  230. package/dist/_node-chunks/chunk-SGEPJMTU.js +1094 -0
  231. package/dist/_node-chunks/chunk-SYUOBOB5.js +35 -0
  232. package/dist/_node-chunks/chunk-T5VZYRL2.js +40 -0
  233. package/dist/_node-chunks/chunk-T6IU66AM.js +69 -0
  234. package/dist/_node-chunks/chunk-THDTJJMO.js +611 -0
  235. package/dist/_node-chunks/chunk-TNFH4Y4G.js +1133 -0
  236. package/dist/_node-chunks/chunk-TY2ZY7AO.js +155 -0
  237. package/dist/_node-chunks/chunk-TZIT6SZP.js +49 -0
  238. package/dist/_node-chunks/chunk-VG2KFIOW.js +45 -0
  239. package/dist/_node-chunks/chunk-VSHYJR23.js +56 -0
  240. package/dist/_node-chunks/chunk-VUMGWJ6Y.js +844 -0
  241. package/dist/_node-chunks/chunk-WVRM6DQU.js +3767 -0
  242. package/dist/_node-chunks/chunk-YU5TVYPS.js +87 -0
  243. package/dist/_node-chunks/chunk-ZBWAA2EY.js +2106 -0
  244. package/dist/_node-chunks/chunk-ZD5TUA6I.js +20 -0
  245. package/dist/_node-chunks/chunk-ZFLK7MY5.js +144 -0
  246. package/dist/_node-chunks/dist-7OJKTBKL.js +27 -0
  247. package/dist/_node-chunks/dist-MWP6WLW4.js +16 -0
  248. package/dist/_node-chunks/local-runtime-V5YTRN24.js +78 -0
  249. package/dist/_node-chunks/mdx-plugin-CBOD52VP.js +7813 -0
  250. package/dist/_node-chunks/monorepo-GF6H53U4.js +121 -0
  251. package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-K4TTV2DQ.js +121 -0
  252. package/dist/_node-chunks/optimized-tests-KOTSVWTN.js +22 -0
  253. package/dist/_node-chunks/pattern-copy-play-M2QNC4IZ.js +807 -0
  254. package/dist/_node-chunks/postinstallAddon-WXKJL6DP.js +20 -0
  255. package/dist/_node-chunks/rehype-external-links-3IDE4CYH.js +121 -0
  256. package/dist/_node-chunks/rehype-slug-GKB3WS3U.js +52 -0
  257. package/dist/_node-chunks/relaxed-limits-C6QU365N.js +117 -0
  258. package/dist/_node-chunks/run-TMVS3KKA.js +4792 -0
  259. package/dist/_node-chunks/run-XWBUPXLN.js +103 -0
  260. package/dist/_node-chunks/session-id-VMH57SKN.js +23 -0
  261. package/dist/_node-chunks/setup-KEEJK4WI.js +278 -0
  262. package/dist/_node-chunks/vitest.config.4.template-74HEE4WJ.js +54 -0
  263. package/dist/actions/decorator.d.ts +7 -0
  264. package/dist/actions/decorator.js +44 -0
  265. package/dist/actions/index.d.ts +67 -0
  266. package/dist/actions/index.js +29 -0
  267. package/dist/addon-a11y/index.d.ts +52 -0
  268. package/dist/addon-a11y/index.js +17 -0
  269. package/dist/addon-a11y/manager.js +1432 -0
  270. package/dist/addon-a11y/preset.js +18 -0
  271. package/dist/addon-a11y/preview.d.ts +17 -0
  272. package/dist/addon-a11y/preview.js +16 -0
  273. package/dist/addon-docs/blocks.d.ts +1080 -0
  274. package/dist/addon-docs/blocks.js +2537 -0
  275. package/dist/addon-docs/index.d.ts +236 -0
  276. package/dist/addon-docs/index.js +16 -0
  277. package/dist/addon-docs/manager.js +90 -0
  278. package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
  279. package/dist/addon-docs/mdx-react-shim.js +2 -0
  280. package/dist/addon-docs/preset.js +378 -0
  281. package/dist/addon-docs/preview.d.ts +4 -0
  282. package/dist/addon-docs/preview.js +7 -0
  283. package/dist/addon-links/index.d.ts +22 -0
  284. package/dist/addon-links/index.js +23 -0
  285. package/dist/addon-links/manager.js +14 -0
  286. package/dist/addon-links/preview.d.ts +6 -0
  287. package/dist/addon-links/preview.js +12 -0
  288. package/dist/addon-links/react/index.d.ts +25 -0
  289. package/dist/addon-links/react/index.js +55 -0
  290. package/dist/addon-mcp/preset.js +1353 -0
  291. package/dist/addon-mcp/preview.js +29 -0
  292. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1129 -0
  293. package/dist/addon-ondevice-actions/index.d.ts +4 -0
  294. package/dist/addon-ondevice-actions/index.js +11 -0
  295. package/dist/addon-ondevice-actions/register.js +11 -0
  296. package/dist/addon-ondevice-controls/index.d.ts +6 -0
  297. package/dist/addon-ondevice-controls/index.js +14 -0
  298. package/dist/addon-ondevice-controls/register.js +10 -0
  299. package/dist/addon-pseudo-states/index.d.ts +35 -0
  300. package/dist/addon-pseudo-states/index.js +15 -0
  301. package/dist/addon-pseudo-states/manager.js +53 -0
  302. package/dist/addon-pseudo-states/preview.d.ts +9 -0
  303. package/dist/addon-pseudo-states/preview.js +10 -0
  304. package/dist/addon-themes/index.d.ts +80 -0
  305. package/dist/addon-themes/index.js +104 -0
  306. package/dist/addon-themes/manager.js +97 -0
  307. package/dist/addon-themes/postinstall.js +33 -0
  308. package/dist/addon-themes/preview.d.ts +6 -0
  309. package/dist/addon-themes/preview.js +8 -0
  310. package/dist/addon-vitest/constants.d.ts +132 -0
  311. package/dist/addon-vitest/constants.js +66 -0
  312. package/dist/addon-vitest/index.d.ts +4 -0
  313. package/dist/addon-vitest/index.js +8 -0
  314. package/dist/addon-vitest/manager.js +665 -0
  315. package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
  316. package/dist/addon-vitest/node/vitest.js +674 -0
  317. package/dist/addon-vitest/postinstall.js +24 -0
  318. package/dist/addon-vitest/preset.js +942 -0
  319. package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
  320. package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
  321. package/dist/addon-vitest/vitest-plugin/index.js +463 -0
  322. package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
  323. package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
  324. package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
  325. package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
  326. package/dist/babel/index.d.ts +1550 -0
  327. package/dist/babel/index.js +55 -0
  328. package/dist/backgrounds/index.d.ts +6 -0
  329. package/dist/backgrounds/index.js +15 -0
  330. package/dist/bin/core.js +1706 -0
  331. package/dist/bin/dispatcher.js +45 -0
  332. package/dist/bin/loader.js +116 -0
  333. package/dist/builder-vite/index.d.ts +50 -0
  334. package/dist/builder-vite/index.js +245 -0
  335. package/dist/builder-vite/preset.js +27 -0
  336. package/dist/channels/index.d.ts +2 -0
  337. package/dist/channels/index.js +352 -0
  338. package/dist/chunk-BCoJQE-f.d.ts +602 -0
  339. package/dist/chunk-BGhyFTJO.d.ts +115 -0
  340. package/dist/chunk-BGkgZp-H.d.ts +214 -0
  341. package/dist/chunk-BXLImeLy.d.ts +197 -0
  342. package/dist/chunk-Bpi2tz-6.d.ts +511 -0
  343. package/dist/chunk-C6PAgHLT.d.ts +12 -0
  344. package/dist/chunk-CFk6djyM.d.ts +55 -0
  345. package/dist/chunk-CNqjcOmK.d.ts +15 -0
  346. package/dist/chunk-CT2iXaHz.d.ts +179 -0
  347. package/dist/chunk-CV4-Z2pn.d.ts +30 -0
  348. package/dist/chunk-CYuvV2sR.d.ts +282 -0
  349. package/dist/chunk-Ct9xd6IM.d.ts +65 -0
  350. package/dist/chunk-D0NUmzXp.d.ts +253 -0
  351. package/dist/chunk-D7DwV41f.d.ts +3622 -0
  352. package/dist/chunk-DDd8BhTY.d.ts +79 -0
  353. package/dist/chunk-DROZ9oel.d.ts +669 -0
  354. package/dist/chunk-DaVb55-_.d.ts +124 -0
  355. package/dist/chunk-DgRNfmj_.d.ts +40 -0
  356. package/dist/chunk-DgzPaTw9.d.ts +61 -0
  357. package/dist/chunk-Dm-iHJ-s.d.ts +59 -0
  358. package/dist/chunk-DoIGKY33.d.ts +666 -0
  359. package/dist/chunk-Dr3R0DXk.d.ts +40 -0
  360. package/dist/chunk-Dw_4ad2Y.d.ts +34 -0
  361. package/dist/chunk-Fg1Fm__9.d.ts +13091 -0
  362. package/dist/chunk-FjDVzZTj.d.ts +62 -0
  363. package/dist/chunk-Susgfkap.d.ts +20 -0
  364. package/dist/chunk-XP8oHzpE.d.ts +6 -0
  365. package/dist/chunk-pcFXCimE.d.ts +741 -0
  366. package/dist/cli/index.d.ts +321 -0
  367. package/dist/cli/index.js +703 -0
  368. package/dist/cli/skills/content/index.d.ts +72 -0
  369. package/dist/cli/skills/content/index.js +335 -0
  370. package/dist/cli/tools/sdk/child-host.d.ts +61 -0
  371. package/dist/cli/tools/sdk/child-host.js +131 -0
  372. package/dist/cli/tools/sdk/index.d.ts +137 -0
  373. package/dist/cli/tools/sdk/index.js +44 -0
  374. package/dist/cli-commands/bin/index.js +25 -0
  375. package/dist/client-logger/index.d.ts +31 -0
  376. package/dist/client-logger/index.js +65 -0
  377. package/dist/common/index.d.ts +1091 -0
  378. package/dist/common/index.js +358 -0
  379. package/dist/components/index.d.ts +1727 -0
  380. package/dist/components/index.js +7982 -0
  381. package/dist/core-events/index.d.ts +156 -0
  382. package/dist/core-events/index.js +138 -0
  383. package/dist/core-server/index.d.ts +2200 -0
  384. package/dist/core-server/index.js +4577 -0
  385. package/dist/core-server/presets/common-manager.js +3744 -0
  386. package/dist/core-server/presets/common-override-preset.js +83 -0
  387. package/dist/core-server/presets/common-preset.js +2194 -0
  388. package/dist/create/bin/index.js +23 -0
  389. package/dist/create/index.js +25 -0
  390. package/dist/csf/csf-utils.d.ts +2 -0
  391. package/dist/csf/csf-utils.js +19 -0
  392. package/dist/csf/index.d.ts +7 -0
  393. package/dist/csf/index.js +2077 -0
  394. package/dist/csf-tools/index.d.ts +1161 -0
  395. package/dist/csf-tools/index.js +738 -0
  396. package/dist/docs-tools/index.d.ts +197 -0
  397. package/dist/docs-tools/index.js +61 -0
  398. package/dist/highlight/index.d.ts +10 -0
  399. package/dist/highlight/index.js +15 -0
  400. package/dist/instrumenter/index.d.ts +113 -0
  401. package/dist/instrumenter/index.js +2597 -0
  402. package/dist/manager/_manager-chunks/globals-runtime-BKQscPdC.js +5661 -0
  403. package/dist/manager/_manager-chunks/globals-runtime-BY3epqww.js +1807 -0
  404. package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
  405. package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
  406. package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +9987 -0
  407. package/dist/manager/_manager-chunks/globals-runtime-BweHuXkK.js +6838 -0
  408. package/dist/manager/_manager-chunks/globals-runtime-CA8AuIRT.js +7617 -0
  409. package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
  410. package/dist/manager/_manager-chunks/globals-runtime-CJL1dQtn.js +4674 -0
  411. package/dist/manager/_manager-chunks/globals-runtime-CfurFwS_.js +121 -0
  412. package/dist/manager/_manager-chunks/globals-runtime-CvIgTRVu.js +1190 -0
  413. package/dist/manager/_manager-chunks/globals-runtime-DBba3I9c.js +5307 -0
  414. package/dist/manager/_manager-chunks/globals-runtime-DvV_TF3-.js +12214 -0
  415. package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
  416. package/dist/manager/_manager-chunks/globals-runtime-NwJK8t0T.js +9274 -0
  417. package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +4091 -0
  418. package/dist/manager/_manager-chunks/globals-runtime-wjkxyMn0.js +5283 -0
  419. package/dist/manager/_manager-chunks/runtime-5B2mWjEm.js +294 -0
  420. package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +78 -0
  421. package/dist/manager/_manager-chunks/runtime-B_nqedQW.js +197 -0
  422. package/dist/manager/_manager-chunks/runtime-BdGkqNEt.js +45 -0
  423. package/dist/manager/_manager-chunks/runtime-Bs3bEhuy.js +1232 -0
  424. package/dist/manager/_manager-chunks/runtime-CBQsKmch.js +2351 -0
  425. package/dist/manager/_manager-chunks/runtime-DG61zYUm.js +1158 -0
  426. package/dist/manager/_manager-chunks/runtime-DtCVCy4G.js +6841 -0
  427. package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
  428. package/dist/manager/_manager-chunks/runtime-eBAgOym6.js +9010 -0
  429. package/dist/manager/_manager-chunks/runtime-j9yqh0tr.js +1023 -0
  430. package/dist/manager/_manager-chunks/runtime-jj8qYc2n.js +3488 -0
  431. package/dist/manager/globals-runtime.js +2 -0
  432. package/dist/manager/globals.d.ts +23 -0
  433. package/dist/manager/globals.js +26 -0
  434. package/dist/manager/manager-stores.d.ts +2 -0
  435. package/dist/manager/manager-stores.js +19 -0
  436. package/dist/manager/runtime.js +2 -0
  437. package/dist/manager-api/index.d.ts +2 -0
  438. package/dist/manager-api/index.js +3247 -0
  439. package/dist/manager-errors.d.ts +89 -0
  440. package/dist/manager-errors.js +20 -0
  441. package/dist/mcp/index.d.ts +270 -0
  442. package/dist/mcp/index.js +305 -0
  443. package/dist/mocking-utils/index.d.ts +689 -0
  444. package/dist/mocking-utils/index.js +526 -0
  445. package/dist/mocking-utils/mocker-runtime.js +1254 -0
  446. package/dist/nextjs-vite/config/preview.js +3 -0
  447. package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
  448. package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
  449. package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
  450. package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
  451. package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
  452. package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
  453. package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
  454. package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
  455. package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
  456. package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
  457. package/dist/nextjs-vite/index.d.ts +92 -0
  458. package/dist/nextjs-vite/index.js +59 -0
  459. package/dist/nextjs-vite/node/index.d.ts +6 -0
  460. package/dist/nextjs-vite/node/index.js +20 -0
  461. package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
  462. package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
  463. package/dist/nextjs-vite/preset.js +727 -0
  464. package/dist/nextjs-vite/preview.d.ts +20 -0
  465. package/dist/nextjs-vite/preview.js +11 -0
  466. package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
  467. package/dist/nextjs-vite/vite-plugin/index.js +19 -0
  468. package/dist/nextjs-vite-plugin/index.d.ts +27 -0
  469. package/dist/nextjs-vite-plugin/index.js +908 -0
  470. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
  471. package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
  472. package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
  473. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
  474. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
  475. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
  476. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
  477. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
  478. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
  479. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
  480. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
  481. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
  482. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
  483. package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
  484. package/dist/node-logger/index.d.ts +488 -0
  485. package/dist/node-logger/index.js +41 -0
  486. package/dist/oxc-parser/index.d.ts +99 -0
  487. package/dist/oxc-parser/index.js +273 -0
  488. package/dist/oxc-parser/worker.js +37 -0
  489. package/dist/preview/_chunks/runtime-BJwGQok8.js +3873 -0
  490. package/dist/preview/_chunks/runtime-BPwAnlRx.js +10411 -0
  491. package/dist/preview/_chunks/runtime-BUnOhg9h.js +6838 -0
  492. package/dist/preview/_chunks/runtime-BZ4pNS3g.js +284 -0
  493. package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
  494. package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
  495. package/dist/preview/_chunks/runtime-BgPhfM5P.js +3681 -0
  496. package/dist/preview/_chunks/runtime-BhSZ1Mwt.js +5262 -0
  497. package/dist/preview/_chunks/runtime-BsMjBzuq.js +53 -0
  498. package/dist/preview/_chunks/runtime-C1jgT6tJ.js +4091 -0
  499. package/dist/preview/_chunks/runtime-CkOhMcXf.js +387 -0
  500. package/dist/preview/_chunks/runtime-WapFVPAh.js +8484 -0
  501. package/dist/preview/globals.d.ts +16 -0
  502. package/dist/preview/globals.js +20 -0
  503. package/dist/preview/runtime.js +6 -0
  504. package/dist/preview-api/index.d.ts +4 -0
  505. package/dist/preview-api/index.js +149 -0
  506. package/dist/preview-errors.d.ts +186 -0
  507. package/dist/preview-errors.js +56 -0
  508. package/dist/react/docgen/docgen-worker.js +37 -0
  509. package/dist/react/entry-preview-argtypes.js +9 -0
  510. package/dist/react/entry-preview-docs.js +12 -0
  511. package/dist/react/entry-preview-rsc.js +11 -0
  512. package/dist/react/entry-preview.js +22 -0
  513. package/dist/react/index.d.ts +119 -0
  514. package/dist/react/index.js +28 -0
  515. package/dist/react/preset.js +300 -0
  516. package/dist/react/preview.d.ts +2 -0
  517. package/dist/react/preview.js +12 -0
  518. package/dist/react-native/bin/get-stories.js +34 -0
  519. package/dist/react-native/index.d.ts +160 -0
  520. package/dist/react-native/index.js +1362 -0
  521. package/dist/react-native/metro/node.d.ts +83 -0
  522. package/dist/react-native/metro/node.js +22 -0
  523. package/dist/react-native/metro/withForkbook.d.ts +2269 -0
  524. package/dist/react-native/metro/withForkbook.js +139 -0
  525. package/dist/react-native/preview.d.ts +6 -0
  526. package/dist/react-native/preview.js +20 -0
  527. package/dist/react-native/scripts/generate.d.ts +22 -0
  528. package/dist/react-native/scripts/generate.js +18 -0
  529. package/dist/react-native/stub.js +20 -0
  530. package/dist/react-native-theming/index.d.ts +119 -0
  531. package/dist/react-native-theming/index.js +316 -0
  532. package/dist/react-native-ui/index.d.ts +129 -0
  533. package/dist/react-native-ui/index.js +1448 -0
  534. package/dist/react-native-ui-common/index.d.ts +229 -0
  535. package/dist/react-native-ui-common/index.js +514 -0
  536. package/dist/react-vite/index.d.ts +4 -0
  537. package/dist/react-vite/index.js +8 -0
  538. package/dist/react-vite/node/index.d.ts +6 -0
  539. package/dist/react-vite/node/index.js +20 -0
  540. package/dist/react-vite/preset.d.ts +6 -0
  541. package/dist/react-vite/preset.js +21 -0
  542. package/dist/router/index.d.ts +209 -0
  543. package/dist/router/index.js +1259 -0
  544. package/dist/server-errors.d.ts +2 -0
  545. package/dist/server-errors.js +149 -0
  546. package/dist/shared/open-service/index.d.ts +3 -0
  547. package/dist/shared/open-service/index.js +115 -0
  548. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
  549. package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
  550. package/dist/shared/open-service/toolsets/docs/public.js +991 -0
  551. package/dist/telemetry/index.d.ts +314 -0
  552. package/dist/telemetry/index.js +101 -0
  553. package/dist/test/index.d.ts +158 -0
  554. package/dist/test/index.js +19656 -0
  555. package/dist/theming/create.d.ts +15 -0
  556. package/dist/theming/create.js +12 -0
  557. package/dist/theming/index.d.ts +54 -0
  558. package/dist/theming/index.js +536 -0
  559. package/dist/types/index.d.ts +2 -0
  560. package/dist/types/index.js +48 -0
  561. package/dist/viewport/index.d.ts +275 -0
  562. package/dist/viewport/index.js +21 -0
  563. package/package.json +1030 -4
  564. package/template/nextjs-vite/cli/.eslintrc.json +6 -0
  565. package/template/nextjs-vite/cli/js/Button.jsx +42 -0
  566. package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
  567. package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
  568. package/template/nextjs-vite/cli/js/Header.jsx +58 -0
  569. package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
  570. package/template/nextjs-vite/cli/js/Page.jsx +68 -0
  571. package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
  572. package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
  573. package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
  574. package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
  575. package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
  576. package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
  577. package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
  578. package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
  579. package/template/react/cli/.eslintrc.json +5 -0
  580. package/template/react/cli/js/Button.jsx +39 -0
  581. package/template/react/cli/js/Button.stories.js +49 -0
  582. package/template/react/cli/js/Header.jsx +56 -0
  583. package/template/react/cli/js/Header.stories.js +29 -0
  584. package/template/react/cli/js/Page.jsx +69 -0
  585. package/template/react/cli/js/Page.stories.js +28 -0
  586. package/template/react/cli/ts/Button.stories.ts +54 -0
  587. package/template/react/cli/ts/Button.tsx +37 -0
  588. package/template/react/cli/ts/Header.stories.ts +34 -0
  589. package/template/react/cli/ts/Header.tsx +56 -0
  590. package/template/react/cli/ts/Page.stories.ts +33 -0
  591. package/template/react/cli/ts/Page.tsx +73 -0
  592. package/template/react-vite/cli/.eslintrc.json +5 -0
  593. package/template/react-vite/cli/js/Button.jsx +39 -0
  594. package/template/react-vite/cli/js/Button.stories.js +49 -0
  595. package/template/react-vite/cli/js/Header.jsx +56 -0
  596. package/template/react-vite/cli/js/Header.stories.js +29 -0
  597. package/template/react-vite/cli/js/Page.jsx +69 -0
  598. package/template/react-vite/cli/js/Page.stories.js +28 -0
  599. package/template/react-vite/cli/ts/Button.stories.ts +54 -0
  600. package/template/react-vite/cli/ts/Button.tsx +37 -0
  601. package/template/react-vite/cli/ts/Header.stories.ts +34 -0
  602. package/template/react-vite/cli/ts/Header.tsx +56 -0
  603. package/template/react-vite/cli/ts/Page.stories.ts +33 -0
  604. package/template/react-vite/cli/ts/Page.tsx +73 -0
@@ -0,0 +1,1161 @@
1
+ import { ArgTypes } from "@aussieljk/forkbook/internal/csf";
2
+ import { ComponentAnnotations, CsfEnricher, IndexInput, IndexInputStats, IndexedCSFFile, StoriesEntry, StoryAnnotations, Tag as Tag$1 } from "@aussieljk/forkbook/internal/types";
3
+ import { BabelFile, GeneratorOptions, NodePath, RecastOptions, babelParse, generate, types } from "@aussieljk/forkbook/internal/babel";
4
+
5
+ //#region .dts-emit/code/core/src/csf-tools/PrintResultType.d.ts
6
+ interface PrintResultType {
7
+ code: string;
8
+ map?: any;
9
+ toString(): string;
10
+ }
11
+ //#endregion
12
+ //#region .dts-emit/code/core/src/csf-tools/CsfObject.d.ts
13
+ type CsfObjectTarget = {
14
+ kind: 'config';
15
+ } | {
16
+ kind: 'call-argument';
17
+ importedName: string;
18
+ methodName: string;
19
+ } | {
20
+ kind: 'meta';
21
+ } | {
22
+ kind: 'story';
23
+ exportName: string;
24
+ localName: string;
25
+ } | {
26
+ kind: 'story-annotation';
27
+ exportName: string;
28
+ localName: string;
29
+ annotation: 'parameters' | 'argTypes';
30
+ };
31
+ type CsfMutationDiagnosticCode = 'unsupported-initializer' | 'ambiguous-binding' | 'duplicate-field' | 'spread-field' | 'dynamic-key' | 'unsupported-value' | 'unsupported-member' | 'occupied-destination' | 'cyclic-move' | 'evaluation-order';
32
+ interface CsfMutationDiagnostic {
33
+ code: CsfMutationDiagnosticCode;
34
+ target: CsfObjectTarget;
35
+ path: readonly string[];
36
+ message: string;
37
+ loc?: types.SourceLocation;
38
+ }
39
+ type CsfMutationResult = {
40
+ ok: true;
41
+ changed: boolean;
42
+ } | {
43
+ ok: false;
44
+ changed: false;
45
+ diagnostic: CsfMutationDiagnostic;
46
+ };
47
+ type CsfValue = string | number | boolean | null | undefined | readonly CsfValue[] | {
48
+ readonly [key: string]: CsfValue;
49
+ };
50
+ interface CsfObject {
51
+ /**
52
+ * Identify the config, meta, story, annotation, or call argument this editor represents.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const object = loadConfig('export default {};').parse();
57
+ * object.target; // { kind: 'config' }
58
+ * ```
59
+ */
60
+ readonly target: CsfObjectTarget;
61
+ /**
62
+ * Report whether this editor has applied a mutation. Reads and no-op edits leave it unchanged.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const object = loadConfig('export default {};').parse();
67
+ * object.changed; // false
68
+ * object.set(['tags'], ['autodocs']);
69
+ * object.changed; // true
70
+ * ```
71
+ */
72
+ readonly changed: boolean;
73
+ /**
74
+ * Read a copy of the Babel expression at a property path. For a CSF2 annotation, its annotation
75
+ * path returns the whole object. Missing fields return `undefined`.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const object = loadConfig("export default { tags: ['docs'] };").parse();
80
+ * object.get(['tags'])?.type; // 'ArrayExpression'
81
+ * object.get(['missing']); // undefined
82
+ * ```
83
+ */
84
+ get(path: readonly string[]): types.Expression | undefined;
85
+ /**
86
+ * Read plain values without executing code. Missing fields return `undefined`; unresolved
87
+ * expressions also return `undefined` and add a mutation diagnostic.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const object = loadConfig("export default { tags: ['docs'], enabled: true };").parse();
92
+ * object.getValue(['tags']); // ['docs']
93
+ * object.getValue(['enabled']); // true
94
+ * object.getValue(['missing']); // undefined
95
+ * ```
96
+ */
97
+ getValue(path: readonly string[]): CsfValue;
98
+ /**
99
+ * Set a plain value or Babel expression, creating missing parents. Accepts nested arrays and
100
+ * objects; top-level expression-shaped objects are interpreted as AST nodes.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * const object = loadConfig('export default {};').parse();
105
+ * object.set(['parameters', 'a11y'], { test: 'todo', enabled: true });
106
+ * // { ok: true, changed: true }
107
+ * object.getValue(['parameters']); // { a11y: { test: 'todo', enabled: true } }
108
+ * ```
109
+ */
110
+ set(path: readonly string[], value: CsfValue | types.Expression): CsfMutationResult;
111
+ /**
112
+ * Replace a value using its live Babel expression. Reused nodes preserve their source formatting.
113
+ * Return a new node, or `undefined` to leave the value unchanged. Do not mutate or retain the input
114
+ * node: such changes bypass change tracking and diagnostics.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const object = loadConfig("export default { tags: ['docs'] };").parse();
119
+ * object.transform(['tags'], (value) =>
120
+ * t.arrayExpression([t.spreadElement(value), t.stringLiteral('autodocs')])
121
+ * ); // { ok: true, changed: true }
122
+ * object.getValue(['tags']); // ['docs', 'autodocs']
123
+ * ```
124
+ */
125
+ transform(path: readonly string[], derive: (value: types.Expression) => types.Expression | undefined): CsfMutationResult;
126
+ /**
127
+ * Remove a property and recursively clean up empty parents. Missing fields are a no-op.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * const object = loadConfig('export default { parameters: { a11y: { disable: true } } };').parse();
132
+ * object.remove(['parameters', 'a11y', 'disable']); // { ok: true, changed: true }
133
+ * object.getValue(['parameters']); // undefined
134
+ * object.remove(['parameters']); // { ok: true, changed: false }
135
+ * ```
136
+ */
137
+ remove(path: readonly string[]): CsfMutationResult;
138
+ /**
139
+ * Rename a property within its parent. An occupied destination produces a diagnostic
140
+ * and leaves the source unchanged.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * const object = loadConfig("export default { a11y: { element: '#root' } };").parse();
145
+ * object.rename(['a11y', 'element'], 'context'); // { ok: true, changed: true }
146
+ * object.getValue(['a11y']); // { context: '#root' }
147
+ * ```
148
+ */
149
+ rename(path: readonly string[], name: string): CsfMutationResult;
150
+ /**
151
+ * Move a property to another path, creating missing destination parents and cleaning up
152
+ * empty source parents. Rejects occupied destinations. Use `group` when nesting siblings must
153
+ * preserve expression evaluation order.
154
+ *
155
+ * @example
156
+ * ```ts
157
+ * const object = loadConfig("export default { globals: { theme: 'dark' } };").parse();
158
+ * object.move(['globals'], ['initialGlobals']); // { ok: true, changed: true }
159
+ * object.getValue(['initialGlobals']); // { theme: 'dark' }
160
+ * object.getValue(['globals']); // undefined
161
+ * ```
162
+ */
163
+ move(from: readonly string[], to: readonly string[]): CsfMutationResult;
164
+ /**
165
+ * Nest named sibling properties under a destination, retaining their source order. Rejects
166
+ * conflicts and relocations that could change evaluation order. Missing source fields are ignored.
167
+ *
168
+ * @example
169
+ * ```ts
170
+ * const object = loadConfig('export default { showNav: false, showPanel: true };').parse();
171
+ * object.group(['layout'], ['showNav', 'showPanel']); // { ok: true, changed: true }
172
+ * object.getValue(['layout']); // { showNav: false, showPanel: true }
173
+ * object.getValue(['showNav']); // undefined
174
+ * ```
175
+ */
176
+ group(path: readonly string[], names: readonly string[]): CsfMutationResult;
177
+ }
178
+ interface CsfObjectOptions {
179
+ meta?: boolean;
180
+ stories?: boolean;
181
+ }
182
+ //#endregion
183
+ //#region .dts-emit/code/core/src/csf-tools/CsfFile.d.ts
184
+ declare const isValidPreviewPath: (filepath: string) => boolean;
185
+ declare const isModuleMock: (importPath: string) => boolean;
186
+ interface CsfOptions {
187
+ fileName?: string;
188
+ makeTitle: (userTitle: string) => string;
189
+ /**
190
+ * If an inline meta is detected e.g. `export default { title: 'foo' }` it will be transformed
191
+ * into a constant format e.g. `export const _meta = { title: 'foo' }; export default _meta;`
192
+ */
193
+ transformInlineMeta?: boolean;
194
+ }
195
+ declare class NoMetaError extends Error {
196
+ constructor(message: string, ast: types.Node, fileName?: string);
197
+ }
198
+ declare class MultipleMetaError extends Error {
199
+ constructor(message: string, ast: types.Node, fileName?: string);
200
+ }
201
+ declare class MixedFactoryError extends Error {
202
+ constructor(message: string, ast: types.Node, fileName?: string);
203
+ }
204
+ declare class BadMetaError extends Error {
205
+ constructor(message: string, ast: types.Node, fileName?: string);
206
+ }
207
+ interface StaticMeta extends Pick<ComponentAnnotations, 'id' | 'title' | 'includeStories' | 'excludeStories' | 'tags'> {
208
+ component?: string;
209
+ }
210
+ interface StaticStory extends Pick<StoryAnnotations, 'name' | 'parameters' | 'tags'> {
211
+ id: string;
212
+ localName?: string;
213
+ __stats: IndexInputStats;
214
+ }
215
+ interface StoryTest {
216
+ node: types.Node;
217
+ function: types.Node;
218
+ name: string;
219
+ id: string;
220
+ tags: string[];
221
+ parent: {
222
+ node: types.Node;
223
+ };
224
+ }
225
+ /** Reads `parameters.thumbnail` when it is a string literal in the object. */
226
+ declare const staticThumbnail: (parameters: types.Node | undefined) => string | undefined;
227
+ declare class CsfFile {
228
+ _ast: types.File;
229
+ _file: BabelFile;
230
+ _options: CsfOptions;
231
+ _rawComponentPath?: string;
232
+ _componentImportSpecifier?: types.ImportSpecifier | types.ImportDefaultSpecifier;
233
+ _meta?: StaticMeta;
234
+ _stories: Record<string, StaticStory>;
235
+ _metaAnnotations: Record<string, types.Node>;
236
+ _storyExports: Record<string, types.VariableDeclarator | types.FunctionDeclaration>;
237
+ _storyDeclarationPath: Record<string, NodePath<types.VariableDeclarator | types.FunctionDeclaration>>;
238
+ _storyPaths: Record<string, NodePath<types.ExportNamedDeclaration>>;
239
+ _metaStatement: types.Statement | undefined;
240
+ _metaStatementPath: NodePath<types.Statement> | undefined;
241
+ _metaNode: types.ObjectExpression | undefined;
242
+ _metaPath: NodePath<types.ExportDefaultDeclaration> | undefined;
243
+ _metaVariableName: string | undefined;
244
+ _metaIsFactory: boolean | undefined;
245
+ _metaFactoryCall: types.CallExpression | undefined;
246
+ /**
247
+ * True when the CSF factory configuration could not be resolved to an object literal in this
248
+ * file, so `_metaNode` is a stand-in that is not part of the AST. Writes to it are discarded.
249
+ */
250
+ _metaNodeIsSynthetic: boolean | undefined;
251
+ _storyStatements: Record<string, types.ExportNamedDeclaration | types.Expression>;
252
+ _storyAnnotations: Record<string, Record<string, types.Node>>;
253
+ _templates: Record<string, types.Expression>;
254
+ _namedExportsOrder?: string[];
255
+ imports: string[];
256
+ _tests: StoryTest[];
257
+ constructor(ast: types.File, options: CsfOptions, file: BabelFile);
258
+ /**
259
+ * Read diagnostics from object discovery, reads, and mutations. Check them before writing
260
+ * because a file can contain both successful edits and unsupported targets.
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * const [story] = csf.objects({ meta: false });
265
+ * story.set(['args', 'old'], 1);
266
+ * story.set(['args', 'current'], 2);
267
+ * story.rename(['args', 'old'], 'current');
268
+ * csf.mutationDiagnostics.map(({ code }) => code); // ['occupied-destination']
269
+ * ```
270
+ */
271
+ get mutationDiagnostics(): readonly CsfMutationDiagnostic[];
272
+ /**
273
+ * Report whether any object editor has changed this story file.
274
+ *
275
+ * @example
276
+ * ```ts
277
+ * csf.changed; // false, before any edits
278
+ * const [story] = csf.objects({ meta: false });
279
+ * story.set(['args', 'disabled'], true);
280
+ * csf.changed; // true
281
+ * ```
282
+ */
283
+ get changed(): boolean;
284
+ /**
285
+ * Discover editors for the meta and stories, including CSF2 parameter and argTypes assignments. Unsupported
286
+ * targets are skipped and reported in `mutationDiagnostics`.
287
+ *
288
+ * @example
289
+ * ```ts
290
+ * const csf = loadCsf('export default {}; export const Primary = {};', {
291
+ * makeTitle: () => 'Example',
292
+ * }).parse();
293
+ * const [story] = csf.objects({ meta: false });
294
+ * story.set(['args', 'disabled'], true);
295
+ * story.getValue(['args']); // { disabled: true }
296
+ * csf.changed; // true
297
+ * ```
298
+ */
299
+ objects(options?: CsfObjectOptions): readonly CsfObject[];
300
+ _parseTitle(value: types.Node): string;
301
+ /**
302
+ * Gets the properties of the meta object. Spreads of object literals, or of identifiers that
303
+ * refer to object literals, are expanded. Other spreads are returned in `unresolved`, with the
304
+ * number of properties that come before them.
305
+ */
306
+ _flattenMetaProperties(declaration: types.ObjectExpression, program: types.Program, seen?: Set<string>): {
307
+ properties: types.ObjectProperty[];
308
+ unresolved: {
309
+ index: number;
310
+ node: types.Node;
311
+ }[];
312
+ };
313
+ _parseMeta(declaration: types.ObjectExpression, program: types.Program): void;
314
+ getStoryExport(key: string): types.Node;
315
+ parse(): CsfFile & IndexedCSFFile;
316
+ get meta(): StaticMeta | undefined;
317
+ get stories(): StaticStory[];
318
+ getStoryTests(story: string | types.Node): StoryTest[];
319
+ get indexInputs(): IndexInput[];
320
+ }
321
+ /** A parsed file with its Program path, so paths have scopes and `buildCodeFrameError`. */
322
+ declare const babelParseFile: ({
323
+ code,
324
+ filename,
325
+ ast
326
+ }: {
327
+ code: string;
328
+ filename?: string;
329
+ ast?: types.File;
330
+ }) => BabelFile;
331
+ declare const loadCsf: (code: string, options: CsfOptions) => CsfFile;
332
+ declare const formatCsf: (csf: CsfFile, options?: GeneratorOptions & {
333
+ inputSourceMap?: any;
334
+ }, code?: string) => ReturnType<typeof generate> | string;
335
+ /** Use this function, if you want to preserve styles. Uses recast under the hood. */
336
+ declare const printCsf: (csf: CsfFile, options?: RecastOptions) => PrintResultType;
337
+ declare const readCsf: (fileName: string, options: CsfOptions) => Promise<CsfFile>;
338
+ declare const writeCsf: (csf: CsfFile, fileName?: string) => Promise<void>;
339
+ //#endregion
340
+ //#region .dts-emit/code/core/src/csf-tools/ConfigFile.d.ts
341
+ interface CallArgumentsOptions {
342
+ importedName: string;
343
+ methodName: string;
344
+ moduleNames: Iterable<string>;
345
+ }
346
+ declare const _getPathProperties: (path: string[], node: types.Node) => types.ObjectProperty[] | undefined;
347
+ type RecastComment = types.Comment & {
348
+ leading?: boolean;
349
+ };
350
+ /**
351
+ * Return the leading comments of a program's first statement that form the file header. A
352
+ * directive that applies only to that statement, such as `@ts-expect-error`, ends the header.
353
+ */
354
+ declare const getHeaderComments: (statement: types.Statement | undefined) => RecastComment[];
355
+ declare class ConfigFile implements CsfObject {
356
+ /**
357
+ * Identify the config, meta, story, annotation, or call argument this editor represents.
358
+ *
359
+ * @example
360
+ * ```ts
361
+ * const object = loadConfig('export default {};').parse();
362
+ * object.target; // { kind: 'config' }
363
+ * ```
364
+ */
365
+ readonly target: {
366
+ readonly kind: 'config';
367
+ };
368
+ _changed: boolean;
369
+ _mutationDiagnostics: CsfMutationDiagnostic[];
370
+ /**
371
+ * Report whether this editor has applied a mutation. Reads and no-op edits leave it unchanged.
372
+ *
373
+ * @example
374
+ * ```ts
375
+ * const object = loadConfig('export default {};').parse();
376
+ * object.changed; // false
377
+ * object.set(['tags'], ['autodocs']);
378
+ * object.changed; // true
379
+ * ```
380
+ */
381
+ get changed(): boolean;
382
+ /**
383
+ * Read diagnostics from unsupported discovery, reads, or mutations. `writeConfig` refuses to
384
+ * write a config with diagnostics, even if another edit succeeded.
385
+ *
386
+ * @example
387
+ * ```ts
388
+ * const config = loadConfig('export default { old: 1, current: 2 };').parse();
389
+ * config.rename(['old'], 'current');
390
+ * config.mutationDiagnostics.map(({ code }) => code); // ['occupied-destination']
391
+ * config.changed; // false
392
+ * ```
393
+ */
394
+ get mutationDiagnostics(): readonly CsfMutationDiagnostic[];
395
+ /**
396
+ * Read a copy of the Babel expression at a property path. Missing fields return `undefined`.
397
+ *
398
+ * @example
399
+ * ```ts
400
+ * const object = loadConfig("export default { tags: ['docs'] };").parse();
401
+ * object.get(['tags'])?.type; // 'ArrayExpression'
402
+ * object.get(['missing']); // undefined
403
+ * ```
404
+ */
405
+ get(path: readonly string[]): types.Expression | undefined;
406
+ /**
407
+ * Read plain values without executing code. Missing fields return `undefined`; unresolved
408
+ * expressions also return `undefined` and add a mutation diagnostic.
409
+ *
410
+ * @example
411
+ * ```ts
412
+ * const object = loadConfig("export default { tags: ['docs'], enabled: true };").parse();
413
+ * object.getValue(['tags']); // ['docs']
414
+ * object.getValue(['enabled']); // true
415
+ * object.getValue(['missing']); // undefined
416
+ * ```
417
+ */
418
+ getValue(path: readonly string[]): CsfValue;
419
+ /**
420
+ * Set a plain value or Babel expression, creating missing parents. Accepts nested arrays and
421
+ * objects; top-level expression-shaped objects are interpreted as AST nodes.
422
+ *
423
+ * @example
424
+ * ```ts
425
+ * const object = loadConfig('export default {};').parse();
426
+ * object.set(['parameters', 'a11y'], { test: 'todo', enabled: true });
427
+ * // { ok: true, changed: true }
428
+ * object.getValue(['parameters']); // { a11y: { test: 'todo', enabled: true } }
429
+ * ```
430
+ */
431
+ set(path: readonly string[], value: CsfValue | types.Expression): CsfMutationResult;
432
+ /**
433
+ * Replace a value using its live Babel expression. Reused nodes preserve their source formatting.
434
+ * Return a new node, or `undefined` to leave the value unchanged. Do not mutate or retain the input
435
+ * node: such changes bypass change tracking and diagnostics.
436
+ *
437
+ * @example
438
+ * ```ts
439
+ * const object = loadConfig("export default { tags: ['docs'] };").parse();
440
+ * object.transform(['tags'], (value) =>
441
+ * t.arrayExpression([t.spreadElement(value), t.stringLiteral('autodocs')])
442
+ * ); // { ok: true, changed: true }
443
+ * object.getValue(['tags']); // ['docs', 'autodocs']
444
+ * ```
445
+ */
446
+ transform(path: readonly string[], derive: (value: types.Expression) => types.Expression | undefined): CsfMutationResult;
447
+ /**
448
+ * Remove a property and recursively clean up empty parents. Missing fields are a no-op.
449
+ *
450
+ * @example
451
+ * ```ts
452
+ * const object = loadConfig('export default { parameters: { a11y: { disable: true } } };').parse();
453
+ * object.remove(['parameters', 'a11y', 'disable']); // { ok: true, changed: true }
454
+ * object.getValue(['parameters']); // undefined
455
+ * object.remove(['parameters']); // { ok: true, changed: false }
456
+ * ```
457
+ */
458
+ remove(path: readonly string[]): CsfMutationResult;
459
+ /**
460
+ * Rename a property within its parent. An occupied destination produces a diagnostic
461
+ * and leaves the source unchanged.
462
+ *
463
+ * @example
464
+ * ```ts
465
+ * const object = loadConfig("export default { a11y: { element: '#root' } };").parse();
466
+ * object.rename(['a11y', 'element'], 'context'); // { ok: true, changed: true }
467
+ * object.getValue(['a11y']); // { context: '#root' }
468
+ * ```
469
+ */
470
+ rename(path: readonly string[], name: string): CsfMutationResult;
471
+ /**
472
+ * Move a property to another path, creating missing destination parents and cleaning up
473
+ * empty source parents. Rejects occupied destinations. Use `group` when nesting siblings must
474
+ * preserve expression evaluation order.
475
+ *
476
+ * @example
477
+ * ```ts
478
+ * const object = loadConfig("export default { globals: { theme: 'dark' } };").parse();
479
+ * object.move(['globals'], ['initialGlobals']); // { ok: true, changed: true }
480
+ * object.getValue(['initialGlobals']); // { theme: 'dark' }
481
+ * object.getValue(['globals']); // undefined
482
+ * ```
483
+ */
484
+ move(from: readonly string[], to: readonly string[]): CsfMutationResult;
485
+ /**
486
+ * Nest named sibling properties under a destination, retaining their source order. Rejects
487
+ * conflicts and relocations that could change evaluation order. Missing source fields are ignored.
488
+ *
489
+ * @example
490
+ * ```ts
491
+ * const object = loadConfig('export default { showNav: false, showPanel: true };').parse();
492
+ * object.group(['layout'], ['showNav', 'showPanel']); // { ok: true, changed: true }
493
+ * object.getValue(['layout']); // { showNav: false, showPanel: true }
494
+ * object.getValue(['showNav']); // undefined
495
+ * ```
496
+ */
497
+ group(path: readonly string[], names: readonly string[]): CsfMutationResult;
498
+ _mutate(operation: (object: CsfObject) => CsfMutationResult): CsfMutationResult;
499
+ _editor(mode: 'read' | 'mutate'): {
500
+ ok: true;
501
+ object: CsfObject;
502
+ } | {
503
+ ok: false;
504
+ diagnostic: CsfMutationDiagnostic;
505
+ };
506
+ _ast: types.File;
507
+ _code: string;
508
+ _exports: Record<string, types.Expression>;
509
+ _exportDecls: Record<string, types.VariableDeclarator | types.FunctionDeclaration>;
510
+ _exportsObject: types.ObjectExpression | undefined;
511
+ _quotes: 'single' | 'double' | undefined;
512
+ fileName?: string;
513
+ hasDefaultExport: boolean;
514
+ constructor(ast: types.File, code: string, fileName?: string);
515
+ _parseExportsObject(exportsObject: types.ObjectExpression): void;
516
+ /** Unwraps TS assertions/satisfies from a node, to get the underlying node. */
517
+ _unwrap: (node: types.Node | undefined | null) => any;
518
+ /**
519
+ * Resolve a declaration node by unwrapping TS assertions/satisfies and following identifiers to
520
+ * resolve the correct node in case it's an identifier.
521
+ */
522
+ _resolveDeclaration: (node: types.Node, parent?: types.Node) => any;
523
+ parse(): this;
524
+ getFieldNode(path: string[]): types.Node | undefined;
525
+ getFieldProperties(path: string[]): ReturnType<typeof _getPathProperties>;
526
+ /**
527
+ * @example
528
+ *
529
+ * ```ts
530
+ * // 1. { framework: 'framework-name' }
531
+ * // 2. { framework: { name: 'framework-name', options: {} }
532
+ * getNameFromPath(['framework']); // => 'framework-name'
533
+ * ```
534
+ *
535
+ * @returns The name of a node in a given path, supporting the following formats:
536
+ */
537
+ getNameFromPath(path: string[]): string | undefined;
538
+ /**
539
+ * Returns an array of names of a node in a given path, supporting the following formats:
540
+ *
541
+ * @example
542
+ *
543
+ * ```ts
544
+ * const config = {
545
+ * addons: ['first-addon', { name: 'second-addon', options: {} }],
546
+ * };
547
+ * // => ['first-addon', 'second-addon']
548
+ * getNamesFromPath(['addons']);
549
+ * ```
550
+ */
551
+ getNamesFromPath(path: string[]): string[] | undefined;
552
+ _getWrappedValue(node: types.Node): string | undefined;
553
+ /**
554
+ * Given a node and a fallback property, returns a **non-evaluated** string value of the node.
555
+ *
556
+ * 1. `{ node: 'value' }`
557
+ * 2. `{ node: { fallbackProperty: 'value' } }`
558
+ */
559
+ _getPresetValue(node: types.Node, fallbackProperty: string): string;
560
+ removeField(path: string[]): void;
561
+ appendValueToArray(path: string[], value: any): void;
562
+ appendNodeToArray(path: string[], node: types.Expression): void;
563
+ /**
564
+ * Specialized helper to remove addons or other array entries that can either be strings or
565
+ * objects with a name property.
566
+ */
567
+ removeEntryFromArray(path: string[], value: string): void;
568
+ _inferQuotes(): "double" | "single";
569
+ valueToNode(value: any): types.Expression | undefined;
570
+ getBodyDeclarations(): types.Statement[];
571
+ /**
572
+ * Edit the first object argument of method calls on a named import, including CommonJS aliases.
573
+ * Unsupported arguments add mutation diagnostics; calls without arguments are ignored.
574
+ *
575
+ * @example
576
+ * ```ts
577
+ * const manager = loadConfig(`
578
+ * import { addons } from '@aussieljk/forkbook/manager-api';
579
+ * addons.setConfig({ showNav: false });
580
+ * `).parse();
581
+ * const [object] = manager.callArguments({
582
+ * importedName: 'addons',
583
+ * methodName: 'setConfig',
584
+ * moduleNames: ['@aussieljk/forkbook/manager-api'],
585
+ * });
586
+ * object.group(['layout'], ['showNav']);
587
+ * object.getValue(['layout']); // { showNav: false }
588
+ * manager.changed; // true
589
+ * ```
590
+ */
591
+ callArguments({
592
+ importedName,
593
+ methodName,
594
+ moduleNames
595
+ }: CallArgumentsOptions): readonly CsfObject[];
596
+ setBodyDeclaration(declaration: types.Declaration): void;
597
+ /**
598
+ * Import specifiers for a specific require import
599
+ *
600
+ * @example
601
+ *
602
+ * ```ts
603
+ * // const { foo } = require('bar');
604
+ * setRequireImport(['foo'], 'bar');
605
+ *
606
+ * // const foo = require('bar');
607
+ * setRequireImport('foo', 'bar');
608
+ * ```
609
+ *
610
+ * @param importSpecifiers - The import specifiers to set. If a string is passed in, a default
611
+ * import will be set. Otherwise, an array of named imports will be set
612
+ * @param fromImport - The module to import from
613
+ */
614
+ setRequireImport(importSpecifier: string[] | string, fromImport: string): void;
615
+ /**
616
+ * Set import specifiers for a given import statement.
617
+ *
618
+ * Does not support setting type imports (yet)
619
+ *
620
+ * @example
621
+ *
622
+ * ```ts
623
+ * // import { foo } from 'bar';
624
+ * setImport(['foo'], 'bar');
625
+ *
626
+ * // import foo from 'bar';
627
+ * setImport('foo', 'bar');
628
+ *
629
+ * // import * as foo from 'bar';
630
+ * setImport({ namespace: 'foo' }, 'bar');
631
+ *
632
+ * // import 'bar';
633
+ * setImport(null, 'bar');
634
+ * ```
635
+ *
636
+ * @param importSpecifiers - The import specifiers to set. If a string is passed in, a default
637
+ * import will be set. Otherwise, an array of named imports will be set
638
+ * @param fromImport - The module to import from
639
+ */
640
+ setImport(importSpecifier: string[] | string | {
641
+ namespace: string;
642
+ } | null, fromImport: string): void;
643
+ _removeRequireImport(importSpecifier: string[] | string | {
644
+ namespace: string;
645
+ } | null, fromImport: string): void;
646
+ _removeImport(importSpecifier: string[] | string | {
647
+ namespace: string;
648
+ } | null, fromImport: string): void;
649
+ /**
650
+ * Remove import specifiers for a given import statement.
651
+ *
652
+ * Does not support removing type imports (yet)
653
+ *
654
+ * @example
655
+ *
656
+ * ```ts
657
+ * // import { foo } from 'bar';
658
+ * setImport(['foo'], 'bar');
659
+ *
660
+ * // import foo from 'bar';
661
+ * setImport('foo', 'bar');
662
+ *
663
+ * // import * as foo from 'bar';
664
+ * setImport({ namespace: 'foo' }, 'bar');
665
+ *
666
+ * // import 'bar';
667
+ * setImport(null, 'bar');
668
+ * ```
669
+ *
670
+ * @param importSpecifiers - The import specifiers to remove. If a string is passed in, will only
671
+ * remove the default import. Otherwise, named imports matching the array will be removed.
672
+ * @param fromImport - The module to import from
673
+ */
674
+ removeImport(importSpecifier: string[] | string | {
675
+ namespace: string;
676
+ } | null, fromImport: string): void;
677
+ }
678
+ declare const loadConfig: (code: string, fileName?: string) => ConfigFile;
679
+ declare const formatConfig: (config: ConfigFile) => string;
680
+ declare const printConfig: (config: ConfigFile, options?: RecastOptions) => PrintResultType;
681
+ declare const readConfig: (fileName: string) => Promise<ConfigFile>;
682
+ declare const writeConfig: (config: ConfigFile, fileName?: string) => Promise<void>;
683
+ declare const isCsfFactoryPreview: (previewConfig: ConfigFile) => boolean;
684
+ //#endregion
685
+ //#region .dts-emit/code/core/src/csf-tools/jsdoc.d.ts
686
+ /** Compact JSDoc tag map: tag name → list of tag values (e.g. `@example a` → `{ example: ['a'] }`). */
687
+ type JsDocTagMap = Record<string, string[]>;
688
+ /**
689
+ * Splits a bare docblock body (no `/**` markers) into its description and a compact tag map.
690
+ *
691
+ * For docblocks that only exist as raw text — CSF story/meta docblocks and TS-less docgen engines.
692
+ * When a TS checker and symbol are available, `extractComponentJsDocInfo` in
693
+ * `core/src/component-meta/jsdoc-info.ts` is the canonical extractor instead; the two differ on
694
+ * malformed input (this one only treats line-leading `@tags` as tags).
695
+ */
696
+ declare function extractJSDocInfo(jsdocComment: string): {
697
+ description: string;
698
+ tags: JsDocTagMap;
699
+ };
700
+ /**
701
+ * Resolves the description, summary, and tag map a docgen payload reports.
702
+ *
703
+ * The CSF `meta` docblock wins over the docgen engine's own component description, and an explicit
704
+ * `@describe` / `@desc` tag wins over the block description. Docgen/provider tags win over same
705
+ * named docblock tags, but a provider that found no tags must not suppress the docblock's own.
706
+ * `extractStoryJSDocInfo` reuses this for story docblocks, so both resolve tags identically.
707
+ */
708
+ declare function extractComponentDescription(metaJsDoc: string | undefined, docgenDescription: string | undefined, docgenJsDocTags?: JsDocTagMap): {
709
+ description: string;
710
+ summary: string;
711
+ jsDocTags: JsDocTagMap;
712
+ };
713
+ //#endregion
714
+ //#region .dts-emit/code/core/src/csf-tools/enrichCsf.d.ts
715
+ interface EnrichCsfOptions {
716
+ disableSource?: boolean;
717
+ disableDescription?: boolean;
718
+ enrichCsf?: CsfEnricher;
719
+ }
720
+ declare const enrichCsfStory: (csf: CsfFile, csfSource: CsfFile, key: string, options?: EnrichCsfOptions) => void;
721
+ declare const enrichCsfMeta: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => void;
722
+ declare const enrichCsf: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => Promise<void>;
723
+ declare const extractSource: (node: types.Node) => string;
724
+ declare const extractDescription: (node?: types.Node) => string;
725
+ //#endregion
726
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/imports.d.ts
727
+ interface ImportBinding {
728
+ /** Module specifier the local name is imported from. */
729
+ importId: string;
730
+ /** Original export name; `'default'` or `'*'` for default/namespace imports. */
731
+ importName: string;
732
+ }
733
+ /** True for `import { type X }` specifiers, which carry no runtime binding. */
734
+ declare const isTypeSpecifier: (s: types.ImportSpecifier | types.ImportDefaultSpecifier | types.ImportNamespaceSpecifier) => boolean;
735
+ /** Exported name behind an import specifier, incl. string-named exports. */
736
+ declare const importedName$1: (im: types.Identifier | types.StringLiteral) => string;
737
+ /** Map of local identifier → import binding for a file's value imports (type-only skipped). */
738
+ declare function collectImportBindings(program: NodePath<types.Program>): Map<string, ImportBinding>;
739
+ //#endregion
740
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/import-statements.d.ts
741
+ /** A component reference resolved to the module binding it comes from. */
742
+ interface ImportRef {
743
+ /** Module specifier. Refs without one contribute no import statement. */
744
+ importId?: string;
745
+ /** Exported name; `'default'` for default imports and `'*'` for whole-namespace bindings. */
746
+ importName?: string;
747
+ /** Local identifier the import is bound to. */
748
+ localImportName?: string;
749
+ /** Local identifier of the `import * as` binding this ref reaches through. */
750
+ namespace?: string;
751
+ /** Import statement replacing the derived source and specifier, e.g. from an `@import` tag. */
752
+ importOverride?: string;
753
+ /** Whether `importId` already resolves as a package, which suppresses `packageName` rewriting. */
754
+ isPackage?: boolean;
755
+ }
756
+ /** An {@link ImportRef} together with the component expression it was resolved from. */
757
+ interface ComponentImportRef extends ImportRef {
758
+ /** Component as written in the story file, e.g. `Button` or `Accordion.Root`. */
759
+ componentName: string;
760
+ /** Accessed member of a compound name, e.g. `Root` for `Accordion.Root`. */
761
+ member?: string;
762
+ }
763
+ /**
764
+ * Resolve a component expression as written in a story file to the import it binds to.
765
+ *
766
+ * A compound name resolves through its base identifier, so `Accordion.Root` reached through
767
+ * `import * as Accordion` exports `Root`, while the same name reached through
768
+ * `import { Accordion }` exports `Accordion` and carries `Root` as the member.
769
+ */
770
+ declare function resolveComponentImport(componentName: string, bindings: Map<string, ImportBinding>): ComponentImportRef;
771
+ /**
772
+ * Build the minimal, deduplicated set of import declarations the given references need.
773
+ *
774
+ * References are bucketed by their final source, which is the `importOverride` source when one
775
+ * parses, else `packageName` when the original source is not already a package, else the source as
776
+ * written. Sources keep first-seen order and declarations keep a fixed order within a source, so
777
+ * repeated runs produce byte-identical output.
778
+ */
779
+ declare function buildImportStatements({
780
+ refs,
781
+ packageName
782
+ }: {
783
+ refs: ImportRef[];
784
+ packageName?: string;
785
+ }): string[];
786
+ //#endregion
787
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/resolve-members.d.ts
788
+ /** Members of an object, and what reading it statically could not account for. */
789
+ interface ResolvedMembers {
790
+ /** Member name → value node, as of the last write this pass could read. */
791
+ properties: Record<string, types.Node>;
792
+ /**
793
+ * Names whose value an `unresolved` entry written after them may replace at runtime. A member
794
+ * absent from `properties` is only knowably absent when `unresolved` is empty.
795
+ */
796
+ shadowed: string[];
797
+ /** Source text of every member `properties` could not absorb; empty exactly when complete. */
798
+ unresolved: string[];
799
+ }
800
+ /** A module a reference reaches into, parsed and paired with the path it was read from. */
801
+ interface ReferenceModule {
802
+ program: NodePath<types.Program>;
803
+ /** Absolute path `program` was parsed from; the base every import specifier resolves against. */
804
+ filePath: string;
805
+ }
806
+ /** Everything following a reference beyond the object it starts at needs. */
807
+ interface ReferenceContext extends ReferenceModule {
808
+ /**
809
+ * Parses the module an import specifier names. Callers that read a single file leave it unset,
810
+ * which confines resolution to that file.
811
+ */
812
+ resolveModule?: (fromFile: string, specifier: string) => ReferenceModule | undefined;
813
+ /**
814
+ * Rewrites a value read out of another module into one that stands on its own, since the name it
815
+ * was written as means nothing where the snippet lands. Returning `undefined` rejects the value,
816
+ * leaving the reference that reached it unresolved.
817
+ */
818
+ externalize?: (node: types.Node) => types.Node | undefined;
819
+ }
820
+ /** The half of a {@link ReferenceContext} that is not specific to one story file. */
821
+ type StoryReferenceResolver = Pick<ReferenceContext, 'resolveModule' | 'externalize'>;
822
+ /** How arg resolution leaves the story file; without it only the story file itself is read. */
823
+ interface StoryReferences extends StoryReferenceResolver {
824
+ /** Absolute path of the story file, which every import specifier resolves against. */
825
+ filePath: string;
826
+ }
827
+ /** Source text of a node, for naming an expression a static pass could not read. */
828
+ declare const sourceOf: (node: types.Node) => string;
829
+ /**
830
+ * Members of an object literal, absorbing every spread the context can follow.
831
+ *
832
+ * A method shorthand keeps its member, since its key is as knowable as any other; a getter, setter
833
+ * or generator does not, because reading it runs code.
834
+ */
835
+ declare const resolveObjectMembers: (object: types.ObjectExpression, ctx: ReferenceContext) => ResolvedMembers;
836
+ /**
837
+ * An `args` record, absorbing every spread the context can follow.
838
+ *
839
+ * Unlike {@link resolveObjectMembers} every member has to reduce to a printable value, so a method
840
+ * is reported rather than kept, wherever a spread copied it from.
841
+ */
842
+ declare const resolveArgsRecord: (node: types.Node | undefined, ctx: ReferenceContext) => ResolvedMembers;
843
+ /**
844
+ * The members a module-level binding holds, following the spreads and references it is composed of.
845
+ *
846
+ * For a CSF factory story the members are the ones behind `input`, matching how the factory exposes
847
+ * the config it was called with. `undefined` when the binding cannot be read at all.
848
+ */
849
+ declare const resolveBindingMembers: (ctx: ReferenceContext, name: string) => ResolvedMembers | undefined;
850
+ /**
851
+ * The value a member chain names, paired with the module whose scope its names resolve against.
852
+ *
853
+ * Unlike {@link resolveObjectMembers} the value is returned as written rather than read into
854
+ * members, so a chain landing on a name, as `internal.config.component` reaching a component
855
+ * does, can be followed further by the caller. `undefined` when the chain
856
+ * leaves what this pass can read, and for a bare identifier, which names no member.
857
+ */
858
+ declare const resolveReferencedValue: (ctx: ReferenceContext, expression: types.Node) => {
859
+ node: types.Node;
860
+ ctx: ReferenceContext;
861
+ } | undefined;
862
+ //#endregion
863
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/resolve-story-args.d.ts
864
+ /** Everything reading one story's args statically produced. */
865
+ interface ResolvedStoryArgs {
866
+ /** Meta args merged under story args, keyed by arg name, every value read through. */
867
+ args: Record<string, types.Node>;
868
+ /** Imports the arg values need beyond the component, from values that kept a name. */
869
+ imports: ImportRef[];
870
+ /** Source text of everything hiding args from this pass; empty when the merged args are known. */
871
+ unresolved: string[];
872
+ /** The story's own config members, spreads and names followed. */
873
+ storyMembers: ResolvedMembers;
874
+ /** The meta's config members, spreads and names followed. */
875
+ metaMembers: ResolvedMembers;
876
+ }
877
+ interface StoryArgsResolver {
878
+ /** The context every resolution in this file runs against. */
879
+ ctx: ReferenceContext;
880
+ resolve: (storyExport: string) => ResolvedStoryArgs;
881
+ }
882
+ /**
883
+ * Builds the args resolver for one story file, resolving the meta once for all of its stories.
884
+ *
885
+ * Pass `references` to let a story's args resolve names other modules own; without it only the
886
+ * story file itself is read, and anything it reaches for elsewhere is reported as unresolved.
887
+ */
888
+ declare function createStoryArgsResolver(csf: CsfFile, references?: StoryReferences): StoryArgsResolver;
889
+ /** Says which source text a static pass could not read, so a reader can see what is missing. */
890
+ declare const unresolvedWarning: (unresolved: readonly string[]) => string | undefined;
891
+ /** {@link unresolvedWarning} for a story that gets no snippet at all instead of a partial one. */
892
+ declare const noSnippetWarning: (unresolved: readonly string[]) => string | undefined;
893
+ //#endregion
894
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/authored-source.d.ts
895
+ type AuthoredSource = {
896
+ kind: 'missing';
897
+ } | {
898
+ kind: 'disabled';
899
+ } | {
900
+ kind: 'code';
901
+ code: string;
902
+ } | {
903
+ kind: 'unresolvable';
904
+ source: string;
905
+ };
906
+ type AuthoredSourceShape = Pick<ResolvedStoryArgs, 'storyMembers' | 'metaMembers'>;
907
+ declare const authoredSource: (shape: AuthoredSourceShape, ctx: ReferenceContext) => AuthoredSource;
908
+ //#endregion
909
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/jsdoc.d.ts
910
+ /**
911
+ * JSDoc tags on the docblock of the statement a path belongs to.
912
+ *
913
+ * The docblock sits on the enclosing statement rather than the expression itself, so a `meta`
914
+ * object literal has to look upwards to find the comment an author wrote above `const meta`.
915
+ */
916
+ declare function jsDocTagsForPath(path?: NodePath<types.Node>): Record<string, string[]>;
917
+ /** Story description and summary from its JSDoc; `@describe`/`@desc` tags override the body. */
918
+ declare function extractStoryJSDocInfo(storyStatement?: types.Node): {
919
+ description?: string;
920
+ summary?: string;
921
+ };
922
+ //#endregion
923
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/normalize-story.d.ts
924
+ type NormalizedStoryDeclaration = {
925
+ type: 'config';
926
+ path: NodePath<types.ObjectExpression>;
927
+ } | {
928
+ type: 'fn';
929
+ path: NodePath<types.ArrowFunctionExpression | types.FunctionExpression | types.FunctionDeclaration>;
930
+ } | {
931
+ type: 'emptyConfig';
932
+ path: NodePath<types.Expression>;
933
+ };
934
+ /**
935
+ * Resolve a story export's declaration to its snippet-ready story shape.
936
+ *
937
+ * @example
938
+ *
939
+ * ```ts
940
+ * export const A: Story = { args: {} }; // → { type: 'config', path }
941
+ * export const B = {} satisfies Story; // → { type: 'config', path }
942
+ * export const C = meta.story({ args: {} }); // → { type: 'config', path }
943
+ * export const D = meta.story(); // → { type: 'emptyConfig', path }
944
+ * export const E = Template.bind({}); // → Template's classified initializer
945
+ * ```
946
+ */
947
+ declare function normalizeStoryDeclaration(storyDeclaration: NodePath<types.Node>): NormalizedStoryDeclaration;
948
+ //#endregion
949
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/reference-context.d.ts
950
+ interface StoryReferenceResolverOptions {
951
+ /** Extensions tried ahead of the JS/TS set, for single-file-component formats like `.vue`. */
952
+ extensions?: string[];
953
+ /**
954
+ * Rewrites a value read out of another module into one that stands on its own. Defaults to
955
+ * accepting exactly the values that already do.
956
+ */
957
+ externalize?: StoryReferenceResolver['externalize'];
958
+ }
959
+ /**
960
+ * Builds the half of a story-file reference context that lets static arg resolution leave the
961
+ * story file.
962
+ *
963
+ * A story's args can spread or name a value another module owns, so resolving them reads those
964
+ * modules too. The returned function opens a resolver for one build, which parses each module it
965
+ * reaches at most once; module *resolutions* are cached across builds, since a specifier resolving
966
+ * to a different file is far rarer than that file's contents changing:
967
+ *
968
+ * ```ts
969
+ * const openStoryReferences = createStoryReferenceResolver();
970
+ * // per build:
971
+ * const resolver = createStoryArgsResolver(csf, { filePath: storyPath, ...openStoryReferences() });
972
+ * ```
973
+ */
974
+ declare function createStoryReferenceResolver(options?: StoryReferenceResolverOptions): () => StoryReferenceResolver;
975
+ /** Parses a module reached by an import, for a caller that already resolved its path. */
976
+ declare const parseReferenceModule: (filePath: string) => ReferenceModule | undefined;
977
+ //#endregion
978
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/resolve-arg-value.d.ts
979
+ /** An arg value read through to the definition it names, and what printing it still depends on. */
980
+ interface ResolvedArgValue {
981
+ /** Node to print in place of what was written. */
982
+ node: types.Node;
983
+ /** Imports the printed node needs to resolve where the snippet lands. */
984
+ imports: ImportRef[];
985
+ /** Source text of every name the printed node depends on that no import can supply. */
986
+ unresolved: string[];
987
+ }
988
+ /**
989
+ * The value an arg node stands for, following a name to the definition it refers to.
990
+ *
991
+ * A name the story file declares resolves to the value it was declared with, since that name means
992
+ * nothing where the snippet lands. A name another module owns stays as written and reports the
993
+ * import that makes it resolve. Names a larger expression reaches for are reported the same way,
994
+ * except that a locally declared one can only be named, not substituted into the expression.
995
+ */
996
+ declare const resolveArgValue: (node: types.Node, ctx: ReferenceContext) => ResolvedArgValue;
997
+ /**
998
+ * Whether printing a node needs no name from the scope it was written in.
999
+ *
1000
+ * This is the bar a value copied out of another module has to clear, since the names that module
1001
+ * declares and imports mean nothing where the snippet lands.
1002
+ */
1003
+ declare const isSelfContained: (node: types.Node) => boolean;
1004
+ //#endregion
1005
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/render.d.ts
1006
+ /** A function a story or meta supplies through `render`. */
1007
+ type RenderFunctionPath = NodePath<types.ArrowFunctionExpression | types.FunctionExpression | types.FunctionDeclaration | types.ObjectMethod>;
1008
+ /**
1009
+ * Outcome of looking for a `render` function.
1010
+ *
1011
+ * `missing` and `unresolved` have to stay distinct. A story whose `render` exists but cannot be
1012
+ * read must not fall back to the meta's `render`: the story's intent was to override it, and
1013
+ * quietly rendering the meta's version instead produces a snippet for code the story never runs.
1014
+ *
1015
+ * `shadowedRender` is present when an explicit render resolved but a later spread may replace it
1016
+ * at runtime. Strict consumers ignore it and emit nothing; coverage-oriented consumers may prefer
1017
+ * it as the best static guess, since spreads rarely carry a render.
1018
+ */
1019
+ type RenderResolution = {
1020
+ kind: 'missing';
1021
+ } | {
1022
+ kind: 'resolved';
1023
+ path: RenderFunctionPath;
1024
+ } | {
1025
+ kind: 'unresolved';
1026
+ shadowedRender?: RenderFunctionPath;
1027
+ };
1028
+ /**
1029
+ * Resolves the `render` property of a story or meta config, following a local identifier
1030
+ * (`render: Template`) to the function it names and accepting the `render(args) {}` method
1031
+ * shorthand.
1032
+ *
1033
+ * Spread semantics follow the runtime: a spread written after `render` can shadow it, so the
1034
+ * result is `unresolved` (carrying the shadowed function); a spread before it is harmless because
1035
+ * the explicit property wins. When `render` is missing, any spread could still be supplying one,
1036
+ * which is also `unresolved`.
1037
+ *
1038
+ * `storyDeclaration` anchors the identifier lookup to the module the story lives in, so a helper
1039
+ * declared beside the story resolves while an imported one reports `unresolved`.
1040
+ *
1041
+ * `references` lets a spread be read rather than assumed: with it, `{ ...Base }` reports whichever
1042
+ * `render` `Base` supplies, or `missing` when it supplies none, instead of the `unresolved` a pass
1043
+ * that cannot see through the spread has to report.
1044
+ *
1045
+ * Throws when `render` is present but is neither a function nor an identifier, because that is a
1046
+ * story-file mistake rather than something a static pass merely could not follow.
1047
+ */
1048
+ declare function resolveRenderFunction(config: NodePath<types.ObjectExpression> | undefined, storyDeclaration: NodePath<types.Node>, references?: ReferenceContext): RenderResolution;
1049
+ declare function resolveEffectiveRender(csf: CsfFile, exportName: string, references?: ReferenceContext): RenderResolution;
1050
+ //#endregion
1051
+ //#region .dts-emit/code/core/src/csf-tools/story-shape/utils.d.ts
1052
+ type StaticIdentifierMemberCall = types.CallExpression & {
1053
+ callee: types.MemberExpression & {
1054
+ object: types.Identifier;
1055
+ property: types.Identifier;
1056
+ };
1057
+ };
1058
+ type CsfFactoryCall = types.CallExpression & {
1059
+ callee: types.MemberExpression & {
1060
+ property: types.Identifier;
1061
+ };
1062
+ };
1063
+ interface TemplateParts {
1064
+ quasis: string[];
1065
+ expressions: types.Node[];
1066
+ }
1067
+ /** Peels TS assertion/satisfies wrappers and parentheses off an expression node. */
1068
+ declare const unwrapExpression: (node: types.Node) => types.Node;
1069
+ declare const isCanonicalCsf2BindCall: (node: types.Node) => node is StaticIdentifierMemberCall;
1070
+ /** Receiver of a `.type<T>()` chain, which returns its receiver: `meta` for `meta.type<T>()`. */
1071
+ declare const withoutTypeCalls: (object: types.Node) => types.Node;
1072
+ declare const isCsfFactoryCall: (node: types.Node) => node is CsfFactoryCall;
1073
+ /** Identifier a CSF factory call is made on: `meta` in `meta.type<T>().story()`. */
1074
+ declare const csfFactoryReceiver: (node: CsfFactoryCall) => types.Identifier;
1075
+ declare const templateParts: (node: types.Node) => TemplateParts | undefined;
1076
+ /**
1077
+ * Static key of an object member, or `null` when it is computed from something else.
1078
+ *
1079
+ * A computed key written as a string literal is static: `{ ['args']: … }` names the same member as
1080
+ * `{ args: … }`, so it reads as that name rather than as a key only running the story would produce.
1081
+ */
1082
+ declare const keyOf: (p: types.ObjectMethod | types.ObjectProperty) => string | null;
1083
+ /** Value of an object expression's own property, when it has one. */
1084
+ declare const propertyValue: (object: types.ObjectExpression | undefined | null, name: string) => types.Node | undefined;
1085
+ /**
1086
+ * Expression a function returns directly, covering the concise body (`() => …`) and a block body
1087
+ * that is only a `return`.
1088
+ *
1089
+ * A block body must hold nothing but that `return`, since any extra statement could change what the
1090
+ * expression evaluates to and a static reader cannot follow it.
1091
+ */
1092
+ declare const returnedExpression: (fn: types.Node | undefined) => types.Expression | undefined;
1093
+ /** {@link returnedExpression} as a path, for callers that resolve identifiers against scope. */
1094
+ declare const returnedExpressionPath: (renderFunction: RenderFunctionPath) => NodePath<types.Expression> | undefined;
1095
+ /**
1096
+ * Object literal a render function resolves to, following a local identifier when it returns one.
1097
+ *
1098
+ * @example `() => ({ template })` and `() => config` with `const config = { template }` both →
1099
+ * that object literal
1100
+ */
1101
+ declare const resolveReturnedObjectExpression: (renderFunction: RenderFunctionPath) => types.ObjectExpression | undefined;
1102
+ /** Resolve a local story helper used by `Template.bind({})` or `render: Template`. */
1103
+ declare function resolveIdentifierInit(storyPath: NodePath<types.Node>, identifier: NodePath<types.Identifier>): NodePath<types.FunctionDeclaration> | NodePath<types.Expression> | null;
1104
+ /** NodePath for a known node inside a program. */
1105
+ declare function pathForNode<T extends types.Node>(program: NodePath<types.Program>, target: T | undefined): NodePath<T> | undefined;
1106
+ /** ObjectExpression path for the parsed CSF default meta, when available. */
1107
+ declare function metaObjectPath(csf: CsfFile): NodePath<types.ObjectExpression> | undefined;
1108
+ //#endregion
1109
+ //#region .dts-emit/code/core/src/csf-tools/vitest-plugin/transformer.d.ts
1110
+ type TagsFilter = {
1111
+ include: string[];
1112
+ exclude: string[];
1113
+ skip: string[];
1114
+ };
1115
+ /**
1116
+ * In Forkbook users might be importing stories from other story files. As a side effect, tests can
1117
+ * get re-triggered. To avoid this, we add a guard to only run tests if the current file is the one
1118
+ * running the test.
1119
+ *
1120
+ * Const isRunningFromThisFile = import.meta.url.includes(expect.getState().testPath ??
1121
+ * globalThis.**vitest_worker**.filepath) if(isRunningFromThisFile) { ... }
1122
+ */
1123
+ declare function vitestTransform({
1124
+ code,
1125
+ fileName,
1126
+ configDir,
1127
+ stories,
1128
+ tagsFilter,
1129
+ previewLevelTags
1130
+ }: {
1131
+ code: string;
1132
+ fileName: string;
1133
+ configDir: string;
1134
+ tagsFilter: TagsFilter;
1135
+ stories: StoriesEntry[];
1136
+ previewLevelTags: Tag$1[];
1137
+ }): Promise<ReturnType<typeof formatCsf>>;
1138
+ //#endregion
1139
+ //#region .dts-emit/code/core/src/csf-tools/vitest-plugin/component-transformer.d.ts
1140
+ /**
1141
+ * Transforms a component file directly into a Vitest test file. Uses a getComponentArgTypes
1142
+ * function to retrieve component argTypes for required prop generation. Uses portable stories to
1143
+ * construct a test based on the default state of a component (basic render + required args)
1144
+ */
1145
+ declare const componentTransform: ({
1146
+ code,
1147
+ fileName,
1148
+ getComponentArgTypes
1149
+ }: {
1150
+ code: string;
1151
+ fileName: string;
1152
+ getComponentArgTypes?: (options: {
1153
+ componentName: string;
1154
+ fileName: string;
1155
+ }) => Promise<ArgTypes | null | undefined>;
1156
+ }) => Promise<ReturnType<typeof generate> | {
1157
+ code: string;
1158
+ map: null;
1159
+ }>;
1160
+ //#endregion
1161
+ export { type AuthoredSource, BadMetaError, CallArgumentsOptions, type ComponentImportRef, ConfigFile, CsfFile, type CsfMutationDiagnostic, type CsfMutationDiagnosticCode, type CsfMutationResult, type CsfObject, type CsfObjectOptions, type CsfObjectTarget, CsfOptions, type CsfValue, EnrichCsfOptions, type ImportBinding, type ImportRef, JsDocTagMap, MixedFactoryError, MultipleMetaError, NoMetaError, type NormalizedStoryDeclaration, type ReferenceContext, type ReferenceModule, type RenderFunctionPath, type RenderResolution, type ResolvedArgValue, type ResolvedMembers, type ResolvedStoryArgs, StaticMeta, StaticStory, type StoryArgsResolver, type StoryReferenceResolver, type StoryReferenceResolverOptions, type StoryReferences, StoryTest, type TemplateParts, authoredSource, babelParse, babelParseFile, buildImportStatements, collectImportBindings, componentTransform, createStoryArgsResolver, createStoryReferenceResolver, csfFactoryReceiver, enrichCsf, enrichCsfMeta, enrichCsfStory, extractComponentDescription, extractDescription, extractJSDocInfo, extractSource, extractStoryJSDocInfo, formatConfig, formatCsf, getHeaderComments, importedName$1 as importedName, isCanonicalCsf2BindCall, isCsfFactoryCall, isCsfFactoryPreview, isModuleMock, isSelfContained, isTypeSpecifier, isValidPreviewPath, jsDocTagsForPath, keyOf, loadConfig, loadCsf, metaObjectPath, noSnippetWarning, normalizeStoryDeclaration, parseReferenceModule, pathForNode, printConfig, printCsf, propertyValue, readConfig, readCsf, resolveArgValue, resolveArgsRecord, resolveBindingMembers, resolveComponentImport, resolveEffectiveRender, resolveIdentifierInit, resolveObjectMembers, resolveReferencedValue, resolveRenderFunction, resolveReturnedObjectExpression, returnedExpression, returnedExpressionPath, sourceOf, staticThumbnail, templateParts, unresolvedWarning, unwrapExpression, vitestTransform, withoutTypeCalls, writeConfig, writeCsf };