@aussieljk/forkbook 0.0.1-4 → 0.0.1-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +35 -53
  3. package/dist/_browser-chunks/{Color-KRDPNBZS.js → Color-2BMQTRYG.js} +3 -3
  4. package/dist/_browser-chunks/WithTooltip-GJACFWKM.js +196 -0
  5. package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
  6. package/dist/_browser-chunks/chunk-6EJEEII7.js +1149 -0
  7. package/dist/_browser-chunks/{chunk-LXQPPHMD.js → chunk-6IKB2UHQ.js} +27 -27
  8. package/dist/_browser-chunks/chunk-DPRGR3QP.js +5995 -0
  9. package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
  10. package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
  11. package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
  12. package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
  13. package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
  14. package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
  15. package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
  16. package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
  17. package/dist/_browser-chunks/{chunk-BZGX2THJ.js → chunk-QAHDGPZ7.js} +3 -3
  18. package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
  19. package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
  20. package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-X7D777E6.js} +547 -1622
  21. package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
  22. package/dist/_node-chunks/{attached-runtime-CYMSKF3A.js → attached-runtime-EBWIOQZN.js} +29 -29
  23. package/dist/_node-chunks/{builder-manager-RMLSIO45.js → builder-manager-ETBLZ2RH.js} +288 -349
  24. package/dist/_node-chunks/{chunk-IR34HUSL.js → chunk-252Y5WHZ.js} +7 -7
  25. package/dist/_node-chunks/{chunk-VPOJCHKM.js → chunk-25PXULSJ.js} +14 -14
  26. package/dist/_node-chunks/chunk-2DBJWMYE.js +495 -0
  27. package/dist/_node-chunks/{chunk-KXDJ77EW.js → chunk-3UWWRDA5.js} +7 -7
  28. package/dist/_node-chunks/{chunk-DVLFCSDG.js → chunk-4KCQYJT6.js} +7 -7
  29. package/dist/_node-chunks/{chunk-X3E55W5S.js → chunk-4MJIPOJ5.js} +6 -6
  30. package/dist/_node-chunks/{chunk-5TPSYG4L.js → chunk-4WLIN3VZ.js} +8 -8
  31. package/dist/_node-chunks/{chunk-WBTLBIED.js → chunk-4XNPO23I.js} +6 -6
  32. package/dist/_node-chunks/{chunk-NHIRHARE.js → chunk-5T635FTI.js} +10 -10
  33. package/dist/_node-chunks/{chunk-YU2WFBFL.js → chunk-5Z6MT4RI.js} +8 -8
  34. package/dist/_node-chunks/{chunk-2QWFS23O.js → chunk-644CUCK5.js} +7 -7
  35. package/dist/_node-chunks/{chunk-7XCJ7RAJ.js → chunk-7E27CGRU.js} +7 -7
  36. package/dist/_node-chunks/{chunk-WS367FSJ.js → chunk-A35J7YYA.js} +6 -6
  37. package/dist/_node-chunks/{chunk-ILFIERUB.js → chunk-ALHPFKVB.js} +8 -8
  38. package/dist/_node-chunks/{chunk-SQMCVWOR.js → chunk-ANDQVXYX.js} +8 -8
  39. package/dist/_node-chunks/{chunk-HUFAUSEX.js → chunk-AS4SFRCZ.js} +6 -6
  40. package/dist/_node-chunks/{chunk-XBXGLD3K.js → chunk-BLUMKQQB.js} +6 -6
  41. package/dist/_node-chunks/{chunk-QU5ANYM7.js → chunk-C5JG7EKF.js} +6 -6
  42. package/dist/_node-chunks/{chunk-P6QAFJ5M.js → chunk-CBUQY454.js} +7 -15
  43. package/dist/_node-chunks/{chunk-4LPAWP5S.js → chunk-CF7KLGUW.js} +22 -20
  44. package/dist/_node-chunks/{chunk-MOITZTEA.js → chunk-CGVPHZVD.js} +8 -8
  45. package/dist/_node-chunks/{chunk-2NWHHNNI.js → chunk-DABFUVLR.js} +6 -6
  46. package/dist/_node-chunks/{chunk-XH6TDVML.js → chunk-DCNZ6SFN.js} +6 -6
  47. package/dist/_node-chunks/{chunk-F2N6BJRH.js → chunk-DDGW2EBW.js} +29843 -51588
  48. package/dist/_node-chunks/{chunk-OS5LQEC6.js → chunk-DRLBJM6X.js} +7 -7
  49. package/dist/_node-chunks/{chunk-GEMKJCEE.js → chunk-E3O7VAPG.js} +10 -10
  50. package/dist/_node-chunks/{chunk-4GD7MMLJ.js → chunk-FIFCNBTL.js} +7 -7
  51. package/dist/_node-chunks/{chunk-UMZSNFWM.js → chunk-FQWTUSYB.js} +6 -6
  52. package/dist/_node-chunks/{chunk-JEEXR245.js → chunk-G6YNW4FK.js} +7 -7
  53. package/dist/_node-chunks/{chunk-HP5UY6OY.js → chunk-GDFQQO5U.js} +6 -6
  54. package/dist/_node-chunks/{chunk-653BSJIX.js → chunk-GGTXOH3W.js} +6 -6
  55. package/dist/_node-chunks/{chunk-PDCSUZ4L.js → chunk-GIOREKIG.js} +7 -7
  56. package/dist/_node-chunks/{chunk-V2JDVM46.js → chunk-GOFK4EKU.js} +6 -6
  57. package/dist/_node-chunks/{chunk-INEYTOWF.js → chunk-GQ3HJNIH.js} +10 -13
  58. package/dist/_node-chunks/{chunk-2APY2YSW.js → chunk-GRTI5653.js} +7 -7
  59. package/dist/_node-chunks/{chunk-KN2S7JF2.js → chunk-HKL3VOYX.js} +6 -6
  60. package/dist/_node-chunks/{chunk-A2UMIN5B.js → chunk-HUPRQZ3I.js} +7 -7
  61. package/dist/_node-chunks/{chunk-7JA2DMCJ.js → chunk-HWRHYM7Z.js} +6 -6
  62. package/dist/_node-chunks/{chunk-SBQT3LMM.js → chunk-I7HRDCNY.js} +10 -10
  63. package/dist/_node-chunks/{chunk-2IJCISIB.js → chunk-IFPMZ247.js} +6 -6
  64. package/dist/_node-chunks/{chunk-DIUBMAMV.js → chunk-J6M5CRYZ.js} +8 -8
  65. package/dist/_node-chunks/{chunk-IBO346NQ.js → chunk-JPXJI6QR.js} +60 -134
  66. package/dist/_node-chunks/{chunk-STRSG3GT.js → chunk-JS2J2SKX.js} +6 -6
  67. package/dist/_node-chunks/{chunk-FNGLVURC.js → chunk-JZWF3XLN.js} +6 -6
  68. package/dist/_node-chunks/{chunk-KINEBDMM.js → chunk-KF3FT3NI.js} +9 -9
  69. package/dist/_node-chunks/chunk-KWPWQA7G.js +2609 -0
  70. package/dist/_node-chunks/{chunk-OIIORQX5.js → chunk-L4JGWK4K.js} +6 -6
  71. package/dist/_node-chunks/{chunk-MRZD5SBV.js → chunk-LFIFBDMS.js} +6 -6
  72. package/dist/_node-chunks/{chunk-UAALLQAQ.js → chunk-LWKLJYYQ.js} +6 -6
  73. package/dist/_node-chunks/{chunk-AFKKN27O.js → chunk-LXVSVTQ3.js} +6 -6
  74. package/dist/_node-chunks/chunk-MDW3GSU3.js +69 -0
  75. package/dist/_node-chunks/{chunk-UXW4I2CN.js → chunk-MFN2XBPL.js} +7 -7
  76. package/dist/_node-chunks/{chunk-ESZVID7Q.js → chunk-MQFB44YS.js} +7 -7
  77. package/dist/_node-chunks/{chunk-3XDIBUGD.js → chunk-MZ2GSR3G.js} +23 -51
  78. package/dist/_node-chunks/{chunk-POXTROIX.js → chunk-N7HEOGTM.js} +9 -6
  79. package/dist/_node-chunks/{chunk-UIFLXDUL.js → chunk-NUAQC3XP.js} +16 -13
  80. package/dist/_node-chunks/{chunk-BOUA7OB7.js → chunk-NX6CSWF3.js} +8 -8
  81. package/dist/_node-chunks/{chunk-B3LK7C7B.js → chunk-NZ7EQWYA.js} +9 -9
  82. package/dist/_node-chunks/{chunk-U5QMVW3H.js → chunk-OLGIDCVD.js} +650 -9
  83. package/dist/_node-chunks/{chunk-NAYTBC72.js → chunk-P65JVLO3.js} +8 -8
  84. package/dist/_node-chunks/{chunk-M2UZP5GC.js → chunk-PAN35AYX.js} +7 -7
  85. package/dist/_node-chunks/{chunk-GZBUCUF7.js → chunk-PLWLCVP2.js} +6 -6
  86. package/dist/_node-chunks/{chunk-A4YELYR3.js → chunk-Q4BEWGMK.js} +6 -6
  87. package/dist/_node-chunks/{chunk-YYIZ2PC4.js → chunk-QNUXGVZZ.js} +6 -6
  88. package/dist/_node-chunks/{chunk-WHZWLJGO.js → chunk-R5DWO2S2.js} +31 -30
  89. package/dist/_node-chunks/{chunk-RMLENEZC.js → chunk-SLZV7PTQ.js} +8 -8
  90. package/dist/_node-chunks/{chunk-B5VFV3ZW.js → chunk-TIRP5JQM.js} +11 -10
  91. package/dist/_node-chunks/{chunk-TLVEPWBN.js → chunk-TMXWDY2O.js} +6 -6
  92. package/dist/_node-chunks/{chunk-LGUMVMBA.js → chunk-TN3ULFFZ.js} +6 -6
  93. package/dist/_node-chunks/{chunk-5ZLOPVTG.js → chunk-TPSJW4CQ.js} +6 -6
  94. package/dist/_node-chunks/{chunk-RNF3Z4ZJ.js → chunk-TYBPAV3X.js} +6 -6
  95. package/dist/_node-chunks/chunk-UUE3PSJB.js +11 -0
  96. package/dist/_node-chunks/chunk-VKNRNBTB.js +18 -0
  97. package/dist/_node-chunks/{chunk-6Y6RBJD7.js → chunk-VPU4E7DI.js} +25 -8
  98. package/dist/_node-chunks/{chunk-FJDJE7XC.js → chunk-WIQ6Y3NX.js} +6 -6
  99. package/dist/_node-chunks/{chunk-DD2S4BFV.js → chunk-WRG3CFGS.js} +6 -6
  100. package/dist/_node-chunks/{chunk-FAZ3MUOI.js → chunk-X3RTVNRN.js} +7 -7
  101. package/dist/_node-chunks/chunk-XOGU5PWI.js +347 -0
  102. package/dist/_node-chunks/{chunk-AU3SF2WM.js → chunk-XWGMQW2H.js} +6 -6
  103. package/dist/_node-chunks/chunk-YCXTTQ7K.js +620 -0
  104. package/dist/_node-chunks/{chunk-KZBZYQTZ.js → chunk-YHH57LHY.js} +9 -9
  105. package/dist/_node-chunks/{chunk-J3M3X7GO.js → chunk-YMZ2SGFK.js} +6 -6
  106. package/dist/_node-chunks/{chunk-AY6B2C46.js → chunk-YNENOZRY.js} +7 -7
  107. package/dist/_node-chunks/{chunk-CGWACHNW.js → chunk-YPGVYNJB.js} +6 -6
  108. package/dist/_node-chunks/{chunk-OQ4NCWE4.js → chunk-YQDBSAXW.js} +7 -7
  109. package/dist/_node-chunks/{chunk-YGXJOSRU.js → chunk-Z4NZLBOX.js} +7 -7
  110. package/dist/_node-chunks/{chunk-74IEHSIR.js → chunk-ZC3ZZKMS.js} +8 -8
  111. package/dist/_node-chunks/{chunk-QDLR4JF5.js → chunk-ZCITDAV4.js} +34 -949
  112. package/dist/_node-chunks/chunk-ZNSGFYAT.js +25 -0
  113. package/dist/_node-chunks/{chunk-XD5SYXAU.js → chunk-ZSH6BUCW.js} +25 -25
  114. package/dist/_node-chunks/{chunk-X2KWNNFB.js → chunk-ZTFNOXZF.js} +6 -6
  115. package/dist/_node-chunks/dist-GGTGKXZA.js +27 -0
  116. package/dist/_node-chunks/dist-NS676VJR.js +16 -0
  117. package/dist/_node-chunks/{local-runtime-KTI3DH6X.js → local-runtime-BUTEKJYV.js} +20 -20
  118. package/dist/_node-chunks/{mdx-plugin-2E3SW5TL.js → mdx-plugin-7WXQIHPV.js} +2263 -130
  119. package/dist/_node-chunks/{monorepo-MWAMFHKY.js → monorepo-NCD3X2BR.js} +11 -11
  120. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-MGORG6W7.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-SD3B272K.js} +11 -11
  121. package/dist/_node-chunks/optimized-tests-ITVOHEOA.js +22 -0
  122. package/dist/_node-chunks/{pattern-copy-play-QTQOY7E7.js → pattern-copy-play-3QJANDJD.js} +9 -9
  123. package/dist/_node-chunks/postinstallAddon-LEUHOKX6.js +20 -0
  124. package/dist/_node-chunks/{rehype-external-links-T7DZNKMB.js → rehype-external-links-4LR5BDR2.js} +9 -9
  125. package/dist/_node-chunks/{rehype-slug-CSHI5WYI.js → rehype-slug-PWFRGOEV.js} +9 -9
  126. package/dist/_node-chunks/{relaxed-limits-RAZD36YR.js → relaxed-limits-VNNWUW7X.js} +11 -11
  127. package/dist/_node-chunks/{run-S6XSLPEB.js → run-RUAAWEQT.js} +13 -13
  128. package/dist/_node-chunks/{run-KJ3Z2TTY.js → run-YK6ARCWS.js} +17 -17
  129. package/dist/_node-chunks/session-id-JJYVZAKO.js +23 -0
  130. package/dist/_node-chunks/{setup-35J66GFB.js → setup-4QKCICV6.js} +8 -8
  131. package/dist/_node-chunks/{vitest.config.4.template-Z7OCRDKD.js → vitest.config.4.template-WVFLIXN7.js} +7 -7
  132. package/dist/actions/decorator.js +2 -1
  133. package/dist/actions/index.js +2 -1
  134. package/dist/addon-a11y/index.js +2 -1
  135. package/dist/addon-a11y/manager.js +24 -17
  136. package/dist/addon-a11y/preset.js +7 -7
  137. package/dist/addon-a11y/preview.js +2 -1
  138. package/dist/addon-docs/blocks.js +46 -25
  139. package/dist/addon-docs/manager.js +2 -2
  140. package/dist/addon-docs/preset.js +10 -10
  141. package/dist/addon-links/index.js +3 -2
  142. package/dist/addon-links/preview.d.ts +1 -1
  143. package/dist/addon-links/preview.js +3 -2
  144. package/dist/addon-links/react/index.js +2 -1
  145. package/dist/addon-mcp/preset.js +8 -8
  146. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +17 -45
  147. package/dist/addon-ondevice-actions/index.js +5 -1
  148. package/dist/addon-ondevice-actions/register.js +5 -1
  149. package/dist/addon-pseudo-states/manager.js +2 -2
  150. package/dist/addon-pseudo-states/preview.d.ts +1 -1
  151. package/dist/addon-themes/manager.js +1 -1
  152. package/dist/addon-themes/postinstall.js +7 -7
  153. package/dist/addon-vitest/constants.js +8 -8
  154. package/dist/addon-vitest/manager.js +8 -8
  155. package/dist/addon-vitest/node/coverage-reporter.js +8 -8
  156. package/dist/addon-vitest/node/vitest.js +16 -16
  157. package/dist/addon-vitest/postinstall.js +10 -10
  158. package/dist/addon-vitest/preset.js +15 -16
  159. package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
  160. package/dist/addon-vitest/vitest-plugin/index.js +17 -17
  161. package/dist/babel/index.d.ts +91 -842
  162. package/dist/babel/index.js +13 -19
  163. package/dist/bin/core.js +61 -60
  164. package/dist/bin/dispatcher.js +10 -10
  165. package/dist/bin/loader.js +16 -15
  166. package/dist/builder-vite/index.js +15 -15
  167. package/dist/builder-vite/preset.js +13 -13
  168. package/dist/{chunk-DF6btpT3.d.ts → chunk-BGhyFTJO.d.ts} +2 -2
  169. package/dist/chunk-CV4-Z2pn.d.ts +30 -0
  170. package/dist/{chunk-DvufcbCc.d.ts → chunk-CVY28Ngy.d.ts} +1 -1
  171. package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
  172. package/dist/{chunk-BYnH2sbb.d.ts → chunk-ClI-HEh5.d.ts} +1 -1
  173. package/dist/{chunk-DIz17UEJ.d.ts → chunk-CzmZhVrn.d.ts} +35 -1
  174. package/dist/{chunk-B2xylxt5.d.ts → chunk-DROZ9oel.d.ts} +7 -271
  175. package/dist/cli/index.d.ts +13 -866
  176. package/dist/cli/index.js +42 -4952
  177. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  178. package/dist/cli/tools/sdk/child-host.js +17 -17
  179. package/dist/cli/tools/sdk/index.d.ts +1 -1
  180. package/dist/cli/tools/sdk/index.js +18 -18
  181. package/dist/cli-commands/bin/index.js +7 -7
  182. package/dist/client-logger/index.js +3 -1
  183. package/dist/common/index.d.ts +5 -4
  184. package/dist/common/index.js +35 -37
  185. package/dist/components/index.d.ts +14 -231
  186. package/dist/components/index.js +2518 -8365
  187. package/dist/core-events/index.d.ts +4 -3
  188. package/dist/core-events/index.js +3 -1
  189. package/dist/core-server/index.d.ts +2 -2
  190. package/dist/core-server/index.js +450 -147
  191. package/dist/core-server/presets/common-manager.js +96 -894
  192. package/dist/core-server/presets/common-override-preset.js +12 -10
  193. package/dist/core-server/presets/common-preset.js +39 -40
  194. package/dist/create/bin/index.js +7 -7
  195. package/dist/create/index.js +15 -15
  196. package/dist/csf/index.d.ts +2 -2
  197. package/dist/csf/index.js +27 -93
  198. package/dist/csf-tools/index.d.ts +2 -12
  199. package/dist/csf-tools/index.js +14 -14
  200. package/dist/instrumenter/index.js +3 -1
  201. package/dist/manager/_manager-chunks/{globals-runtime-dKGpUUSb.js → globals-runtime-B-IeQLQu.js} +285 -61
  202. package/dist/manager/_manager-chunks/{globals-runtime-DuLFjsF4.js → globals-runtime-B5-0Ccbv.js} +1 -1
  203. package/dist/manager/_manager-chunks/{globals-runtime-8HkdnU2F.js → globals-runtime-B71TiXST.js} +93 -2146
  204. package/dist/manager/_manager-chunks/globals-runtime-BMCaBukU.js +413 -0
  205. package/dist/manager/_manager-chunks/globals-runtime-BUP5e_t9.js +1396 -0
  206. package/dist/manager/_manager-chunks/globals-runtime-C7mqoHpE.js +2093 -0
  207. package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
  208. package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-CYNosEiD.js} +1 -2
  209. package/dist/manager/_manager-chunks/globals-runtime-C_evJrEn.js +1960 -0
  210. package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-CdgVeAbk.js} +408 -377
  211. package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-Cqn8KdSZ.js} +4 -4
  212. package/dist/manager/_manager-chunks/{globals-runtime-ZHrQFa3-.js → globals-runtime-CrIF09P8.js} +1246 -539
  213. package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-Ct1kY4wb.js} +638 -1731
  214. package/dist/manager/_manager-chunks/globals-runtime-CvyFEPIY.js +5282 -0
  215. package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DMBjo1QS.js} +2 -1
  216. package/dist/manager/_manager-chunks/{globals-runtime-C9P2ZbMM.js → globals-runtime-DUK6bGcb.js} +52 -25
  217. package/dist/manager/_manager-chunks/globals-runtime-DedfO-DP.js +3414 -0
  218. package/dist/manager/_manager-chunks/{globals-runtime-q5R9dawi.js → globals-runtime-DqhIYwLp.js} +165 -152
  219. package/dist/manager/_manager-chunks/globals-runtime-XSxCU7PR.js +41 -0
  220. package/dist/manager/_manager-chunks/runtime-BR5z0WoJ.js +456 -0
  221. package/dist/manager/_manager-chunks/{runtime-DdCaBowH.js → runtime-BgYvp1WN.js} +15 -7
  222. package/dist/manager/_manager-chunks/{runtime-BGvLm94o.js → runtime-CHI-LHF1.js} +3 -3
  223. package/dist/manager/_manager-chunks/{runtime-BdLdsHca.js → runtime-CUymj6EY.js} +280 -288
  224. package/dist/manager/_manager-chunks/runtime-CaU1DSEZ.js +528 -0
  225. package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-CqItbdKW.js} +3 -2
  226. package/dist/manager/_manager-chunks/{runtime-B9QzcYO3.js → runtime-D4ZOOIV0.js} +5 -531
  227. package/dist/manager/_manager-chunks/{runtime-50_aob4S.js → runtime-DER98nV0.js} +3 -19
  228. package/dist/manager/_manager-chunks/{runtime-CE2sHVqs.js → runtime-DrTLBe7a.js} +39 -40
  229. package/dist/manager/_manager-chunks/runtime-MAf7Wpk5.js +692 -0
  230. package/dist/manager/_manager-chunks/{runtime-CKP1i0--.js → runtime-cVFIMcca.js} +1 -1
  231. package/dist/manager/globals-runtime.js +1 -1
  232. package/dist/manager/globals.d.ts +1 -1
  233. package/dist/manager/globals.js +1 -1
  234. package/dist/manager/runtime.js +1 -1
  235. package/dist/manager-api/index.d.ts +1 -1
  236. package/dist/manager-api/index.js +22 -28
  237. package/dist/manager-errors.d.ts +1 -1
  238. package/dist/mcp/index.js +8 -8
  239. package/dist/mocking-utils/index.js +16 -11
  240. package/dist/nextjs-vite/index.js +3 -2
  241. package/dist/nextjs-vite/node/index.js +7 -7
  242. package/dist/nextjs-vite/preset.js +11 -11
  243. package/dist/nextjs-vite/vite-plugin/index.js +7 -7
  244. package/dist/nextjs-vite-plugin/index.d.ts +1 -2
  245. package/dist/nextjs-vite-plugin/index.js +12 -27
  246. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  247. package/dist/node-logger/index.d.ts +65 -72
  248. package/dist/node-logger/index.js +11 -12
  249. package/dist/oxc-parser/index.js +11 -13
  250. package/dist/oxc-parser/worker.js +10 -10
  251. package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
  252. package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
  253. package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
  254. package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
  255. package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
  256. package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
  257. package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
  258. package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
  259. package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
  260. package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
  261. package/dist/preview/runtime.js +1 -1
  262. package/dist/preview-api/index.d.ts +1 -1
  263. package/dist/preview-api/index.js +2 -1
  264. package/dist/preview-errors.d.ts +1 -1
  265. package/dist/react/docgen/docgen-worker.js +11 -12
  266. package/dist/react/entry-preview.js +2 -1
  267. package/dist/react/index.js +6 -4
  268. package/dist/react/preset.js +13 -14
  269. package/dist/react/preview.js +3 -2
  270. package/dist/react-native/bin/get-stories.js +8 -8
  271. package/dist/react-native/index.js +25 -211
  272. package/dist/react-native/metro/node.js +10 -9
  273. package/dist/react-native/metro/withStorybook.js +11 -10
  274. package/dist/react-native/scripts/generate.js +8 -8
  275. package/dist/react-vite/node/index.js +7 -7
  276. package/dist/react-vite/preset.js +7 -7
  277. package/dist/router/index.js +3 -1
  278. package/dist/server-errors.d.ts +1 -1
  279. package/dist/server-errors.js +9 -9
  280. package/dist/shared/open-service/index.d.ts +1 -1
  281. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  282. package/dist/telemetry/index.js +43 -45
  283. package/dist/test/index.js +808 -573
  284. package/dist/theming/create.js +2 -1
  285. package/dist/theming/index.js +22 -1
  286. package/dist/types/index.d.ts +1 -1
  287. package/package.json +17 -45
  288. package/dist/_browser-chunks/WithTooltip-523JD6VH.js +0 -1619
  289. package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
  290. package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
  291. package/dist/_node-chunks/chunk-7XCEKQGV.js +0 -18
  292. package/dist/_node-chunks/chunk-EGS2SAD2.js +0 -5414
  293. package/dist/_node-chunks/chunk-GKTCJPLL.js +0 -36
  294. package/dist/_node-chunks/chunk-HENM5ZK3.js +0 -1877
  295. package/dist/_node-chunks/chunk-HQM4ISVU.js +0 -11
  296. package/dist/_node-chunks/chunk-K3I3G4VL.js +0 -4731
  297. package/dist/_node-chunks/chunk-MZMPFII2.js +0 -29
  298. package/dist/_node-chunks/chunk-NYAWUR6L.js +0 -3823
  299. package/dist/_node-chunks/chunk-NYRUWAL3.js +0 -23
  300. package/dist/_node-chunks/chunk-SSZ5REKS.js +0 -3008
  301. package/dist/_node-chunks/chunk-WEW23EEE.js +0 -662
  302. package/dist/_node-chunks/chunk-XWQEWRFD.js +0 -51
  303. package/dist/_node-chunks/dist-CNA633FI.js +0 -16
  304. package/dist/_node-chunks/globby-HRQV5N3V.js +0 -2884
  305. package/dist/_node-chunks/jiti-WE7NHS2Y.js +0 -3848
  306. package/dist/_node-chunks/lib-7MVA6CTW.js +0 -366
  307. package/dist/_node-chunks/optimized-tests-IAX6YURR.js +0 -22
  308. package/dist/_node-chunks/postinstallAddon-ROH2TBJX.js +0 -20
  309. package/dist/_node-chunks/session-id-GM226DGP.js +0 -23
  310. package/dist/chunk-BfBzpgct.d.ts +0 -916
  311. package/dist/core-server/presets/common-manager.css +0 -170
  312. package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
  313. package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
  314. package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
  315. package/dist/manager/_manager-chunks/runtime-89Cb0A8U.js +0 -998
  316. package/dist/manager/_manager-chunks/runtime-wL4UO7YO.js +0 -452
  317. package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
  318. package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Lucas Knight
4
+ Copyright (c) 2024 Storybook
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,21 +1,13 @@
1
- # Forkbook
1
+ # 🪩 Forkbook
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@aussieljk/forkbook?label=npm)](https://www.npmjs.com/package/@aussieljk/forkbook)
4
- [![Docs](https://img.shields.io/badge/docs-forkbook.ljk.dev-0F766E)](https://forkbook.ljk.dev)
3
+ [![npm](https://img.shields.io/npm/v/@aussieljk/forkbook?style=flat-square&color=555&labelColor=333&label=npm)](https://www.npmjs.com/package/@aussieljk/forkbook)
4
+ [![licence](https://img.shields.io/npm/l/@aussieljk/forkbook?style=flat-square&color=555&labelColor=333&label=licence)](https://www.npmjs.com/package/@aussieljk/forkbook)
5
5
 
6
- Forkbook is a small, fast fork of [Storybook](https://github.com/storybookjs/storybook). Use it to develop, document and test UI components in isolation.
6
+ Forkbook is a small, fast workshop for UI components. Use it to develop, document and test components in isolation. It reads Storybook stories (CSF) and MDX docs.
7
7
 
8
- - npm: [`@aussieljk/forkbook`](https://www.npmjs.com/package/@aussieljk/forkbook)
9
- - Docs: [forkbook.ljk.dev](https://forkbook.ljk.dev)
10
-
11
- ## What is different
12
-
13
- - It is one package. The renderer, the frameworks, the Vite builder, the addons and the CLI are subpaths of `@aussieljk/forkbook`.
14
- - It supports only React with Vite and Next.js with Vite.
15
- - The CLI is `forkbook`, and the config folder is `.forkbook`.
16
- - It sends no telemetry, unless you set an OpenTelemetry endpoint.
8
+ It supports React with Vite, Next.js with Vite, and React Native (iOS, Expo).
17
9
 
18
- ## Start
10
+ ## Install
19
11
 
20
12
  ```sh
21
13
  bun add -d @aussieljk/forkbook
@@ -23,56 +15,46 @@ bunx forkbook init
23
15
  bunx forkbook dev
24
16
  ```
25
17
 
26
- `.forkbook/main.ts`:
27
-
28
18
  ```ts
29
- import type { StorybookConfig } from '@aussieljk/forkbook/react-vite';
19
+ import type { Meta, StoryObj } from '@aussieljk/forkbook/react-vite';
20
+ ```
30
21
 
31
- const config: StorybookConfig = {
32
- stories: ['../src/**/*.stories.tsx'],
33
- framework: '@aussieljk/forkbook/react-vite',
34
- addons: ['@aussieljk/forkbook/addon-docs', '@aussieljk/forkbook/addon-a11y'],
35
- };
22
+ ## Quick start
36
23
 
37
- export default config;
38
- ```
24
+ - React with Vite: [forkbook.ljk.dev/docs/get-started/frameworks/react-vite](https://forkbook.ljk.dev/docs/get-started/frameworks/react-vite)
25
+ - Next.js with Vite: [forkbook.ljk.dev/docs/get-started/frameworks/nextjs-vite](https://forkbook.ljk.dev/docs/get-started/frameworks/nextjs-vite)
26
+ - React Native (iOS): [forkbook.ljk.dev/docs/get-started/frameworks/react-native](https://forkbook.ljk.dev/docs/get-started/frameworks/react-native)
39
27
 
40
- ## Subpaths
28
+ ## Forkbook and Storybook
41
29
 
42
- | Subpath | Use |
43
- |---|---|
44
- | `@aussieljk/forkbook/react-vite` | React with Vite (framework) |
45
- | `@aussieljk/forkbook/nextjs-vite` | Next.js with Vite (framework) |
46
- | `@aussieljk/forkbook/react` | React renderer and types |
47
- | `@aussieljk/forkbook/addon-docs` | Docs pages and MDX |
48
- | `@aussieljk/forkbook/addon-a11y` | Accessibility checks |
49
- | `@aussieljk/forkbook/addon-vitest` | Run stories as Vitest tests |
50
- | `@aussieljk/forkbook/addon-themes` | Theme switcher |
51
- | `@aussieljk/forkbook/addon-links` | Links between stories |
52
- | `@aussieljk/forkbook/addon-pseudo-states` | Hover, focus and active states |
53
- | `@aussieljk/forkbook/addon-mcp` | MCP server for agents |
54
- | `@aussieljk/forkbook/test` | `fn`, `expect` and `userEvent` |
30
+ | | Forkbook | Storybook 10.6 |
31
+ |---|---|---|
32
+ | Packages | One: `@aussieljk/forkbook` | One for the core, plus one for each framework, renderer and addon |
33
+ | Frameworks | React (Vite), Next.js (Vite), React Native (iOS) | React, Vue, Angular, Svelte, Preact, Web Components and more |
34
+ | Bundler | Vite 8 only | Vite and webpack |
35
+ | UI styles | CSS variables and CSS modules | Emotion |
36
+ | Syntax highlight | sugar-high | react-syntax-highlighter (Prism) |
37
+ | Component docs | tsgo (TypeScript native) | react-docgen |
38
+ | Source formatter | oxfmt | Prettier |
39
+ | File watcher | @parcel/watcher | watchpack |
40
+ | React Native UI | Expo UI (SwiftUI sheets, slider, date picker) and SF Symbols | @gorhom/bottom-sheet, react-native-svg, community slider and date picker |
41
+ | Unpacked size (web and React Native packages) | 25.8 MB | 28.9 MB (`storybook`, `@storybook/react-vite`, `react`, `builder-vite`, `react-dom-shim`, `addon-docs`, `addon-a11y`, `addon-vitest`, `nextjs-vite` and the six React Native packages) |
42
+ | Telemetry | Off | On (you can turn it off) |
55
43
 
56
- ## Telemetry with OpenTelemetry (for example SigNoz)
44
+ ## Moving from Storybook
57
45
 
58
- Forkbook sends nothing by default. To send data to your own OpenTelemetry backend:
46
+ Replace the packages with `@aussieljk/forkbook` and change the imports. See [forkbook.ljk.dev/docs/migrate/from-storybook](https://forkbook.ljk.dev/docs/migrate/from-storybook).
59
47
 
60
- ```sh
61
- bun add -d @opentelemetry/api @opentelemetry/context-async-hooks @opentelemetry/sdk-trace-base \
62
- @opentelemetry/sdk-logs @opentelemetry/exporter-trace-otlp-http \
63
- @opentelemetry/exporter-logs-otlp-http @opentelemetry/resources
64
- OTEL_EXPORTER_OTLP_ENDPOINT=https://signoz.example.com bunx forkbook dev
65
- ```
48
+ ## Notes
66
49
 
67
- - Traces: one span for each command (`forkbook dev`, `forkbook build`, `forkbook init`), with child spans for the story index, the manager start and the preview start.
68
- - Logs: one record for each Forkbook event (`forkbook.dev`, `forkbook.build`, `forkbook.save-story`, and more). The data is anonymous and has no file paths.
69
- - The standard variables apply: `OTEL_SERVICE_NAME` (default `forkbook`), `OTEL_EXPORTER_OTLP_HEADERS` (for example an ingestion key).
70
- - `core.disableTelemetry: true` in `main.ts` stops the event logs.
50
+ - Telemetry: Forkbook sends nothing. To send traces and logs to your own OpenTelemetry server, set `OTEL_EXPORTER_OTLP_ENDPOINT` ([telemetry](https://forkbook.ljk.dev/docs/configure/telemetry)).
71
51
 
72
- ## Develop
52
+ ## Links
73
53
 
74
- See [CLAUDE.md](./CLAUDE.md) for the commands. `bun run verify` builds, type-checks and tests the repo.
54
+ - Docs: [forkbook.ljk.dev](https://forkbook.ljk.dev)
55
+ - Docs for agents: [forkbook.ljk.dev/llms.txt](https://forkbook.ljk.dev/llms.txt) (add `.md` to any docs page URL for markdown)
56
+ - Source: [github.com/aussieljk/forkbook](https://github.com/aussieljk/forkbook). To work on it, see [CLAUDE.md](https://github.com/aussieljk/forkbook/blob/master/CLAUDE.md). `bun run verify` builds, type-checks and tests the repo.
75
57
 
76
58
  ## Licence
77
59
 
78
- MIT. Forkbook is a fork of Storybook. See [LICENSE](./LICENSE).
60
+ MIT.
@@ -578,7 +578,7 @@ var require_color_convert = __commonJS({
578
578
  // src/addon-docs/blocks/controls/Color.tsx
579
579
  import { useCallback, useEffect, useMemo, useState } from "react";
580
580
  import { Button, Form, PopoverProvider } from "@aussieljk/forkbook/internal/components";
581
- import { MarkupIcon } from "@storybook/icons";
581
+ import { CodeIcon } from "@phosphor-icons/react";
582
582
  var import_color_convert = __toESM(require_color_convert(), 1);
583
583
 
584
584
  // ../../node_modules/react-colorful/dist/index.mjs
@@ -802,7 +802,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
802
802
  let style = document.createElement("style");
803
803
  style.setAttribute("data-fb-css", id), style.textContent = '.fb-jgXPQa-wrapper{max-width:250px;position:relative}.fb-jgXPQa-tooltipContent{width:200px;margin:5px;& .react-colorful__saturation{border-radius:4px 4px 0 0}& .react-colorful__hue{box-shadow:inset 0 0 0 1px #0000000d}& .react-colorful__last-control{border-radius:0 0 4px 4px}}.fb-jgXPQa-swatches{grid-template-columns:repeat(9,16px);gap:6px;width:200px;margin-top:5px;padding:3px;display:grid}.fb-jgXPQa-swatch{--checkers:url("data:image/svg+xml;charset=utf-8,<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"16\\" height=\\"16\\" fill-opacity=\\"0.05\\" fill=\\"black\\"><path d=\\"M8 0h8v8H8zM0 8h8v8H0z\\"/></svg>");width:16px;height:16px;box-shadow:var(--fb-app-border-color) 0 0 0 1px inset;border-radius:var(--fb-app-border-radius);border:none;&,&:hover{background:unset;background-color:unset;background-image:linear-gradient(var(--fb-swatch-color), var(--fb-swatch-color)), var(--checkers)}&[data-selected]{box-shadow:var(--fb-app-border-color) 0 0 0 1px inset, rgb(from var(--fb-text-muted-color) r g b / .31) 0 0 0 4px}}:where([data-fb-theme=dark]) .fb-jgXPQa-swatch{--checkers:url("data:image/svg+xml;charset=utf-8,<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"16\\" height=\\"16\\" fill-opacity=\\"0.05\\" fill=\\"white\\"><path d=\\"M8 0h8v8H8zM0 8h8v8H0z\\"/></svg>")}.fb-jgXPQa-input{box-sizing:border-box;width:100%;font-family:var(--fb-font-base);padding-left:30px;padding-right:30px;[aria-readonly=true]>&{background:var(--fb-color-lighter)}}:where([data-fb-theme=dark]) [aria-readonly=true]>.fb-jgXPQa-input{background:0 0}.fb-jgXPQa-popoverTrigger{z-index:1;cursor:pointer;position:absolute;top:4px;left:4px;&:disabled,&[aria-disabled=true]{cursor:not-allowed}}.fb-jgXPQa-cycleColorSpaceButton{z-index:1;box-sizing:border-box;cursor:pointer;width:20px;height:20px;color:var(--fb-input-color);padding:4px;position:absolute;top:6px;right:7px}', document.head.appendChild(style);
804
804
  }
805
- var Color_default = { swatches: "fb-jgXPQa-swatches", swatch: "fb-jgXPQa-swatch", input: "fb-jgXPQa-input", popoverTrigger: "fb-jgXPQa-popoverTrigger", wrapper: "fb-jgXPQa-wrapper", tooltipContent: "fb-jgXPQa-tooltipContent", cycleColorSpaceButton: "fb-jgXPQa-cycleColorSpaceButton" };
805
+ var Color_default = { wrapper: "fb-jgXPQa-wrapper", swatches: "fb-jgXPQa-swatches", swatch: "fb-jgXPQa-swatch", popoverTrigger: "fb-jgXPQa-popoverTrigger", cycleColorSpaceButton: "fb-jgXPQa-cycleColorSpaceButton", tooltipContent: "fb-jgXPQa-tooltipContent", input: "fb-jgXPQa-input" };
806
806
 
807
807
  // src/addon-docs/blocks/controls/Color.tsx
808
808
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1014,7 +1014,7 @@ var swatchStyle = (color) => ({ "--fb-swatch-color": color }), ColorSpace = /* @
1014
1014
  ariaLabel: "Cycle through color spaces",
1015
1015
  disabled: readOnly,
1016
1016
  onClick: readOnly ? void 0 : cycleColorSpace,
1017
- children: jsx(MarkupIcon, {})
1017
+ children: jsx(CodeIcon, {})
1018
1018
  }
1019
1019
  ) : null
1020
1020
  ] });
@@ -0,0 +1,196 @@
1
+ import {
2
+ PortalContainerContext,
3
+ PortalTheme,
4
+ index_parts_exports
5
+ } from "./chunk-DPRGR3QP.js";
6
+ import "./chunk-X7D777E6.js";
7
+ import {
8
+ global
9
+ } from "./chunk-6AKCRYVX.js";
10
+ import "./chunk-IMSF75WX.js";
11
+
12
+ // src/components/components/tooltip/WithTooltip.tsx
13
+ import React, { useCallback, useContext, useEffect, useId, useState } from "react";
14
+ import { deprecate } from "@aussieljk/forkbook/internal/client-logger";
15
+
16
+ // storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/components/components/tooltip/WithTooltip.module.css
17
+ var id = "core/src/components/components/tooltip/WithTooltip.module.css";
18
+ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]`)) {
19
+ let style = document.createElement("style");
20
+ style.setAttribute("data-fb-css", id), style.textContent = ".fb-QoytUq-wrapper{--tooltip-bg:#fffffff2;z-index:2147483647;color-scheme:light dark;display:inline-block;&[data-chrome]{background:var(--tooltip-bg);filter:drop-shadow(0 5px 5px #0000000d)drop-shadow(0 1px 3px #0000001a);border-radius:calc(var(--fb-app-border-radius) + 2px);font-family:var(--fb-font-base);font-size:var(--fb-size-s1)}}:where([data-fb-theme=dark]) .fb-QoytUq-wrapper:not([data-color]){--tooltip-bg:var(--fb-background-app)}.fb-QoytUq-arrow{border:8px solid #0000;position:absolute;inset:auto;&[data-side=top]{border-bottom-width:0;border-top-color:var(--tooltip-bg);bottom:-8px;transform:translate(8px)}&[data-side=bottom]{border-top-width:0;border-bottom-color:var(--tooltip-bg);top:-8px;transform:translate(8px)}&[data-side=left]{border-right-width:0;border-left-color:var(--tooltip-bg);right:-8px;transform:translateY(8px)}&[data-side=right]{border-left-width:0;border-right-color:var(--tooltip-bg);left:-8px;transform:translateY(8px)}}.fb-QoytUq-target{cursor:pointer;display:inline-block;&[data-hover]{cursor:default}}.fb-QoytUq-targetSvg{cursor:pointer;&[data-hover]{cursor:default}}", document.head.appendChild(style);
21
+ }
22
+ var WithTooltip_default = { targetSvg: "fb-QoytUq-targetSvg", target: "fb-QoytUq-target", wrapper: "fb-QoytUq-wrapper", arrow: "fb-QoytUq-arrow" };
23
+
24
+ // src/components/components/tooltip/WithTooltip.tsx
25
+ import { jsx, jsxs } from "react/jsx-runtime";
26
+ var { document: document2 } = global, Tooltip = React.forwardRef(
27
+ ({
28
+ placement = "top",
29
+ hasChrome = !0,
30
+ children,
31
+ arrowProps = {},
32
+ tooltipRef,
33
+ color,
34
+ withArrows,
35
+ hidden,
36
+ className,
37
+ style,
38
+ ...props
39
+ }, ref) => jsxs(
40
+ "div",
41
+ {
42
+ "data-testid": "tooltip",
43
+ ref,
44
+ hidden,
45
+ ...props,
46
+ className: [WithTooltip_default.wrapper, className].filter(Boolean).join(" "),
47
+ style: { display: hidden ? "none" : void 0, ...style },
48
+ "data-chrome": hasChrome || void 0,
49
+ "data-color": color,
50
+ children: [
51
+ hasChrome && withArrows && jsx(
52
+ "div",
53
+ {
54
+ className: WithTooltip_default.arrow,
55
+ "data-side": placement.split("-")[0],
56
+ ...arrowProps,
57
+ "data-color": color
58
+ }
59
+ ),
60
+ children
61
+ ]
62
+ }
63
+ )
64
+ );
65
+ Tooltip.displayName = "Tooltip";
66
+ var toSideAndAlign = (placement) => {
67
+ let [side, align = "center"] = placement.split("-");
68
+ return {
69
+ side: side === "auto" ? "top" : side,
70
+ align
71
+ };
72
+ }, WithTooltipPure = ({
73
+ svg = !1,
74
+ trigger = "click",
75
+ closeOnOutsideClick = !1,
76
+ placement = "top",
77
+ hasChrome = !0,
78
+ defaultVisible = !1,
79
+ withArrows,
80
+ offset = [0, 8],
81
+ tooltip,
82
+ children,
83
+ delayHide = trigger === "hover" ? 200 : 0,
84
+ visible,
85
+ interactive: _interactive,
86
+ delayShow = trigger === "hover" ? 400 : 0,
87
+ strategy,
88
+ onVisibleChange,
89
+ portalContainer,
90
+ ...props
91
+ }) => {
92
+ let Container = svg ? "g" : "div", triggers = trigger === null ? [] : Array.isArray(trigger) ? trigger : [trigger], isHover = triggers.includes("hover"), isClick = triggers.includes("click"), isFocus = triggers.includes("focus"), triggerId = useId(), [shown, setShown] = useState(defaultVisible), isVisible = visible ?? shown, setVisible = useCallback(
93
+ (next) => {
94
+ setShown(next), onVisibleChange?.(next);
95
+ },
96
+ [onVisibleChange]
97
+ ), onOpenChange = useCallback(
98
+ (open, { reason }) => {
99
+ reason === "trigger-press" && !isClick || reason === "trigger-hover" && !isHover || reason === "trigger-focus" && !isFocus || reason === "outside-press" && !closeOnOutsideClick || setVisible(open);
100
+ },
101
+ [isClick, isHover, isFocus, closeOnOutsideClick, setVisible]
102
+ ), contextContainer = useContext(PortalContainerContext), portalTarget = (typeof portalContainer == "string" ? document2.querySelector(portalContainer) : portalContainer) || contextContainer || document2.body;
103
+ return jsxs(index_parts_exports.Root, { open: isVisible, onOpenChange, triggerId, children: [
104
+ jsx(
105
+ index_parts_exports.Trigger,
106
+ {
107
+ id: triggerId,
108
+ nativeButton: !1,
109
+ openOnHover: isHover,
110
+ delay: delayShow,
111
+ closeDelay: delayHide,
112
+ render: jsx(
113
+ Container,
114
+ {
115
+ className: svg ? WithTooltip_default.targetSvg : WithTooltip_default.target,
116
+ "data-hover": isHover || void 0,
117
+ ...props
118
+ }
119
+ ),
120
+ children
121
+ }
122
+ ),
123
+ jsx(index_parts_exports.Portal, { container: portalTarget, children: jsx(PortalTheme, { children: jsx(
124
+ index_parts_exports.Positioner,
125
+ {
126
+ ...toSideAndAlign(placement),
127
+ sideOffset: offset[1],
128
+ alignOffset: offset[0],
129
+ collisionPadding: 8,
130
+ arrowPadding: 8,
131
+ positionMethod: strategy,
132
+ style: { zIndex: 2147483647 },
133
+ children: jsxs(
134
+ index_parts_exports.Popup,
135
+ {
136
+ initialFocus: !1,
137
+ finalFocus: !1,
138
+ render: jsx(Tooltip, { hasChrome }),
139
+ children: [
140
+ hasChrome && withArrows && jsx(index_parts_exports.Arrow, { render: jsx("div", { className: WithTooltip_default.arrow }) }),
141
+ typeof tooltip == "function" ? tooltip({ onHide: () => setVisible(!1) }) : tooltip
142
+ ]
143
+ }
144
+ )
145
+ }
146
+ ) }) })
147
+ ] });
148
+ }, WithToolTipState = ({
149
+ startOpen = !1,
150
+ onVisibleChange: onChange,
151
+ ...rest
152
+ }) => {
153
+ let [tooltipShown, setTooltipShown] = useState(startOpen), onVisibilityChange = useCallback(
154
+ (visibility) => {
155
+ onChange && onChange(visibility) === !1 || setTooltipShown(visibility);
156
+ },
157
+ [onChange]
158
+ );
159
+ return useEffect(() => {
160
+ let hide = () => onVisibilityChange(!1), handleKeyDown = (e) => {
161
+ e.key === "Escape" && hide();
162
+ };
163
+ document2.addEventListener("keydown", handleKeyDown, !1);
164
+ let iframes = Array.from(document2.getElementsByTagName("iframe")), unbinders = [];
165
+ return iframes.forEach((iframe) => {
166
+ let bind = () => {
167
+ try {
168
+ iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide), unbinders.push(() => {
169
+ try {
170
+ iframe.contentWindow.document.removeEventListener("click", hide);
171
+ } catch {
172
+ }
173
+ }));
174
+ } catch {
175
+ }
176
+ };
177
+ bind(), iframe.addEventListener("load", bind), unbinders.push(() => {
178
+ iframe.removeEventListener("load", bind);
179
+ });
180
+ }), () => {
181
+ document2.removeEventListener("keydown", handleKeyDown), unbinders.forEach((unbind) => {
182
+ unbind();
183
+ });
184
+ };
185
+ }), jsx(WithTooltipPure, { ...rest, visible: tooltipShown, onVisibleChange: onVisibilityChange });
186
+ }, DeprecatedPure = (props) => (deprecate(
187
+ "WithTooltipPure is deprecated and will be removed in Forkbook 11. Please use WithTooltip instead."
188
+ ), jsx(WithTooltipPure, { "data-deprecated": "WithTooltipPure", ...props })), DeprecatedState = (props) => (deprecate(
189
+ "WithToolTipState is deprecated and will be removed in Forkbook 11. Please use WithTooltip instead."
190
+ ), jsx(WithToolTipState, { "data-deprecated": "WithToolTipState", ...props }));
191
+ export {
192
+ Tooltip,
193
+ DeprecatedState as WithToolTipState,
194
+ WithToolTipState as WithTooltip,
195
+ DeprecatedPure as WithTooltipPure
196
+ };
@@ -0,0 +1,6 @@
1
+ // src/shared/global.ts
2
+ var global = globalThis;
3
+
4
+ export {
5
+ global
6
+ };