@aussieljk/forkbook 0.0.1-5 → 0.0.1-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/{Color-GTF4GM7L.js → Color-2YRIFQLC.js} +1 -1
- package/dist/_browser-chunks/WithTooltip-4R5JMWZ7.js +196 -0
- package/dist/_browser-chunks/{chunk-MJY6ITYT.js → chunk-4EFKUJG2.js} +10 -10
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-DAUHYZUB.js} +550 -1621
- package/dist/_browser-chunks/chunk-E47B5255.js +1149 -0
- package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
- package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
- package/dist/_browser-chunks/{chunk-HOSBMS2F.js → chunk-HTL5ODCB.js} +1 -1
- package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
- package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/chunk-WVF42CP2.js +6027 -0
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
- package/dist/_node-chunks/{attached-runtime-IOE3BXIY.js → attached-runtime-WFZCCGUB.js} +29 -29
- package/dist/_node-chunks/{builder-manager-GDFEGD72.js → builder-manager-DHKHRZK4.js} +155 -148
- package/dist/_node-chunks/{chunk-M2QB5ALN.js → chunk-3ZCGT6VF.js} +6 -6
- package/dist/_node-chunks/{chunk-SUJXQU74.js → chunk-4HGC3G6B.js} +46 -15
- package/dist/_node-chunks/{chunk-WMQ2VCTF.js → chunk-5PYQ573S.js} +7 -7
- package/dist/_node-chunks/{chunk-TYCDPVIH.js → chunk-64JPAW3T.js} +6 -6
- package/dist/_node-chunks/chunk-6CB3XSQ2.js +495 -0
- package/dist/_node-chunks/{chunk-MHDKWHOA.js → chunk-6K3ZE4HN.js} +6 -6
- package/dist/_node-chunks/{chunk-3DCJB2D4.js → chunk-6QZ3PX5R.js} +6 -6
- package/dist/_node-chunks/{chunk-6DOJKR3V.js → chunk-7HVDL6M3.js} +29843 -51588
- package/dist/_node-chunks/chunk-7PMQPS5E.js +347 -0
- package/dist/_node-chunks/{chunk-L5CY6HKG.js → chunk-7V5AOV2J.js} +7 -7
- package/dist/_node-chunks/{chunk-AXJJB2K6.js → chunk-7VHCAGBJ.js} +8 -8
- package/dist/_node-chunks/{chunk-3DX6THMV.js → chunk-ATX7SHS7.js} +8 -8
- package/dist/_node-chunks/{chunk-SDXU22OH.js → chunk-BQC6WCUS.js} +6 -6
- package/dist/_node-chunks/{chunk-D6B2DRQZ.js → chunk-BR4WDRY6.js} +8 -8
- package/dist/_node-chunks/{chunk-SJZQ44OR.js → chunk-BRHJ4P3A.js} +6 -6
- package/dist/_node-chunks/{chunk-N4FLP7AO.js → chunk-CBBFNVFZ.js} +7 -7
- package/dist/_node-chunks/{chunk-PHXCOTMO.js → chunk-CDFQORVD.js} +34 -949
- package/dist/_node-chunks/{chunk-SR3BCYEH.js → chunk-CENNLCU7.js} +6 -6
- package/dist/_node-chunks/{chunk-OTFIQXHR.js → chunk-CNMMDQC3.js} +27 -50
- package/dist/_node-chunks/{chunk-E4C2H45J.js → chunk-DMDZPUHM.js} +6 -6
- package/dist/_node-chunks/{chunk-45LRLOYO.js → chunk-DT45EUDD.js} +60 -134
- package/dist/_node-chunks/{chunk-KQFHT7SW.js → chunk-EAL4RVEF.js} +6 -6
- package/dist/_node-chunks/chunk-EFFWFE6W.js +11 -0
- package/dist/_node-chunks/{chunk-MDGNN3FJ.js → chunk-ESCZ2NSB.js} +6 -6
- package/dist/_node-chunks/{chunk-T2I453AJ.js → chunk-ESZIQTUH.js} +7 -7
- package/dist/_node-chunks/{chunk-HWY2CAUH.js → chunk-F3SAYS4R.js} +6 -6
- package/dist/_node-chunks/{chunk-LSP54OYM.js → chunk-FTUQ7T3V.js} +25 -8
- package/dist/_node-chunks/{chunk-AAAUVDWT.js → chunk-FVFSSIGA.js} +10 -10
- package/dist/_node-chunks/{chunk-GS4VNNSS.js → chunk-G2AANC4A.js} +6 -6
- package/dist/_node-chunks/{chunk-SAAQFJL4.js → chunk-HUMAXGH2.js} +6 -6
- package/dist/_node-chunks/{chunk-A4XRNDN4.js → chunk-I535GEPH.js} +7 -7
- package/dist/_node-chunks/{chunk-CK4EHW3K.js → chunk-J3Q56GX3.js} +25 -25
- package/dist/_node-chunks/{chunk-U47PBQZ3.js → chunk-JDKYP7FW.js} +10 -10
- package/dist/_node-chunks/{chunk-7TUSIVWS.js → chunk-JED5F3H2.js} +6 -6
- package/dist/_node-chunks/{chunk-UM5G27IC.js → chunk-JMS4H7QB.js} +7 -7
- package/dist/_node-chunks/{chunk-GR65OLAH.js → chunk-JOSJ64KD.js} +7 -7
- package/dist/_node-chunks/{chunk-XUHEL63G.js → chunk-JPHSU5OI.js} +6 -6
- package/dist/_node-chunks/{chunk-NYWD5LYM.js → chunk-JQICISDD.js} +6 -6
- package/dist/_node-chunks/{chunk-I3DKGHVD.js → chunk-JTLOSDYL.js} +9 -9
- package/dist/_node-chunks/{chunk-5KAJVK4E.js → chunk-K5RUOW42.js} +7 -7
- package/dist/_node-chunks/{chunk-UKEJISQU.js → chunk-KHWCZDIW.js} +650 -9
- package/dist/_node-chunks/chunk-KWER36VB.js +20 -0
- package/dist/_node-chunks/{chunk-YTBTCM22.js → chunk-LJTP5PAJ.js} +6 -6
- package/dist/_node-chunks/chunk-LZYYZ62Y.js +19 -0
- package/dist/_node-chunks/{chunk-CGXW2HFE.js → chunk-M7ZVSBNU.js} +6 -6
- package/dist/_node-chunks/{chunk-BTFSFATC.js → chunk-MBIIJTGQ.js} +11 -10
- package/dist/_node-chunks/{chunk-VBSVLIXU.js → chunk-MF3AT3JQ.js} +6 -6
- package/dist/_node-chunks/{chunk-AX2ALHBK.js → chunk-MF5BYASO.js} +9 -6
- package/dist/_node-chunks/{chunk-JJNO3SFI.js → chunk-MJFMB4WD.js} +9 -9
- package/dist/_node-chunks/{chunk-E4TBS4MV.js → chunk-MRWBN46D.js} +8 -8
- package/dist/_node-chunks/{chunk-QQXFB4YA.js → chunk-MZQXEAI6.js} +9 -9
- package/dist/_node-chunks/{chunk-TZ2TZW2K.js → chunk-NLPC2DDQ.js} +6 -6
- package/dist/_node-chunks/{chunk-HCX5R46Q.js → chunk-NQAFLS5U.js} +8 -8
- package/dist/_node-chunks/{chunk-5LE7GXEC.js → chunk-NSZGBFPR.js} +6 -6
- package/dist/_node-chunks/{chunk-WHDCECIV.js → chunk-NUYBFTOU.js} +7 -7
- package/dist/_node-chunks/{chunk-RCPKLP3X.js → chunk-O7VJA7SM.js} +7 -7
- package/dist/_node-chunks/{chunk-2GY2FKLH.js → chunk-OGJ7LDX3.js} +7 -7
- package/dist/_node-chunks/{chunk-F4Q7OCCN.js → chunk-OWT6AVWK.js} +8 -8
- package/dist/_node-chunks/{chunk-LCXIUTOU.js → chunk-P3GOMPP3.js} +7 -7
- package/dist/_node-chunks/{chunk-KCAPE7OJ.js → chunk-PQLXHVWK.js} +6 -6
- package/dist/_node-chunks/{chunk-V45RRBTK.js → chunk-Q6QRFKHB.js} +8 -8
- package/dist/_node-chunks/{chunk-VJSOHPVD.js → chunk-QSP42ZBM.js} +6 -6
- package/dist/_node-chunks/{chunk-7XUQM6SR.js → chunk-QWDR5OWQ.js} +14 -14
- package/dist/_node-chunks/{chunk-YLKS7U3M.js → chunk-QWRQXG2V.js} +8 -8
- package/dist/_node-chunks/{chunk-4WO3GNZQ.js → chunk-R6AKCXPH.js} +6 -6
- package/dist/_node-chunks/{chunk-AXQ6LLSE.js → chunk-RCY7TLET.js} +8 -8
- package/dist/_node-chunks/chunk-RKKMQA6N.js +620 -0
- package/dist/_node-chunks/{chunk-BV3QRFE6.js → chunk-RZ7UEP4N.js} +6 -6
- package/dist/_node-chunks/{chunk-OSJFTZ5N.js → chunk-S3HB4EWT.js} +6 -6
- package/dist/_node-chunks/{chunk-QZVFIEOM.js → chunk-SHH7JROR.js} +6 -6
- package/dist/_node-chunks/{chunk-Q33BYVLY.js → chunk-SWHTDOB4.js} +7 -7
- package/dist/_node-chunks/{chunk-ZPPVG262.js → chunk-SZYMLCHF.js} +6 -6
- package/dist/_node-chunks/{chunk-ES5QZBSB.js → chunk-TOGDRW2W.js} +6 -6
- package/dist/_node-chunks/{chunk-J64XMUPF.js → chunk-U3E7E4Q2.js} +10 -10
- package/dist/_node-chunks/{chunk-RECGEABN.js → chunk-U6DHF3RM.js} +7 -7
- package/dist/_node-chunks/{chunk-OB2XHL53.js → chunk-UAG3XK32.js} +31 -30
- package/dist/_node-chunks/{chunk-BBD2KUV4.js → chunk-UF6Q6L5C.js} +22 -20
- package/dist/_node-chunks/chunk-UGXN7JTT.js +18 -0
- package/dist/_node-chunks/{chunk-EWAGCBER.js → chunk-UNCBLHIP.js} +8 -8
- package/dist/_node-chunks/chunk-UPJMGWMZ.js +25 -0
- package/dist/_node-chunks/chunk-UVV24PG4.js +69 -0
- package/dist/_node-chunks/{chunk-E6KXSYWR.js → chunk-WBB4NQ6H.js} +6 -6
- package/dist/_node-chunks/{chunk-B2IOB2V3.js → chunk-WHOF2BJB.js} +7 -7
- package/dist/_node-chunks/{chunk-FA36CEN4.js → chunk-WME5NEJA.js} +6 -6
- package/dist/_node-chunks/{chunk-BFZG4UTW.js → chunk-X63YMAHP.js} +7 -7
- package/dist/_node-chunks/chunk-Y2GHAOKI.js +25 -0
- package/dist/_node-chunks/{chunk-AXG3EMKS.js → chunk-Y6G64J5S.js} +7 -15
- package/dist/_node-chunks/chunk-YVIPYJ53.js +2609 -0
- package/dist/_node-chunks/{chunk-NDGTNFUN.js → chunk-YZWUD7I5.js} +16 -13
- package/dist/_node-chunks/{chunk-VN3A5CEH.js → chunk-ZIDIYSJQ.js} +7 -7
- package/dist/_node-chunks/chunk-ZSGOW4WQ.js +20 -0
- package/dist/_node-chunks/dist-5EG56KTF.js +16 -0
- package/dist/_node-chunks/dist-UEXSNGGQ.js +27 -0
- package/dist/_node-chunks/{local-runtime-RW6AAWSX.js → local-runtime-UN5QK2SE.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-BKWCT6CB.js → mdx-plugin-6M6CMNL3.js} +2263 -130
- package/dist/_node-chunks/{monorepo-ZFJ6HM34.js → monorepo-253VKW4B.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-C3EW4VJW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-3ZOE54OQ.js} +11 -11
- package/dist/_node-chunks/optimized-tests-JSWLRMEI.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-2ZMJNCBS.js → pattern-copy-play-CCCJRMSL.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-VMANBHPR.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-RT5Z62RV.js → rehype-external-links-LJTPLCGD.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-H5TWHJ6G.js → rehype-slug-KQI7ULEZ.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-DYLWZGE4.js → relaxed-limits-MUE2NI7S.js} +11 -11
- package/dist/_node-chunks/{run-65LLGSVR.js → run-PGZMPNMS.js} +246 -13
- package/dist/_node-chunks/{run-BQQLK454.js → run-SYLR25HA.js} +17 -17
- package/dist/_node-chunks/session-id-J4A25UQ6.js +23 -0
- package/dist/_node-chunks/{setup-NEO7XX66.js → setup-XZWSUYPG.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-6P3FZQTY.js → vitest.config.4.template-T25YYRGV.js} +7 -7
- package/dist/actions/decorator.js +2 -1
- package/dist/actions/index.js +2 -1
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +6 -5
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.js +28 -14
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +3 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +3 -2
- package/dist/addon-links/react/index.js +2 -1
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +21 -44
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +2 -2
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +15 -16
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +17 -17
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/bin/core.js +61 -60
- package/dist/bin/dispatcher.js +16 -11
- package/dist/bin/loader.js +16 -15
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-Jf7j2Ot0.d.ts → chunk-BGhyFTJO.d.ts} +1 -1
- package/dist/{chunk-Ce6uhJuR.d.ts → chunk-B_ZhEPlo.d.ts} +1 -1
- package/dist/{chunk-CZHsX9Zo.d.ts → chunk-CMaYrou5.d.ts} +1 -1
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
- package/dist/{chunk-DpljNJTz.d.ts → chunk-LrH1y9J2.d.ts} +39 -0
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +42 -4952
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +1 -1
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.js +3 -1
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +35 -37
- package/dist/components/index.d.ts +14 -231
- package/dist/components/index.js +2512 -8359
- package/dist/core-events/index.d.ts +3 -2
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +2 -2
- package/dist/core-server/index.js +450 -147
- package/dist/core-server/presets/common-manager.js +62 -866
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +39 -40
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +1 -1
- package/dist/csf/index.js +27 -93
- package/dist/csf-tools/index.d.ts +14 -12
- package/dist/csf-tools/index.js +14 -14
- package/dist/instrumenter/index.js +3 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BgVwdR45.js → globals-runtime-4fCHtNC6.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DW1HVuLt.js → globals-runtime-BKPOYSwp.js} +410 -379
- package/dist/manager/_manager-chunks/{globals-runtime-zVfMhZAt.js → globals-runtime-BMIT8BJb.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CUBVmgcG.js → globals-runtime-BO0pfoqL.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-Bke4A4DG.js → globals-runtime-BZKYJxYC.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-D_YKR9nf.js → globals-runtime-Bpc_ftuT.js} +1252 -539
- package/dist/manager/_manager-chunks/{globals-runtime-DCOX9nD5.js → globals-runtime-CBviMKtt.js} +1 -17
- package/dist/manager/_manager-chunks/{globals-runtime-CTB3rhS1.js → globals-runtime-CI-C7ncS.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-Cr3nYYcT.js → globals-runtime-CI_p54Ha.js} +59 -60
- package/dist/manager/_manager-chunks/{globals-runtime-CiLcg4q9.js → globals-runtime-CTyYXvUm.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DqNrRmOM.js → globals-runtime-CoCzM1V_.js} +93 -2146
- package/dist/manager/_manager-chunks/{globals-runtime-CXKb33hg.js → globals-runtime-CzEhVGVp.js} +141 -54
- package/dist/manager/_manager-chunks/{globals-runtime-CF4o9_wT.js → globals-runtime-D82vqOGq.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-ALpzCL93.js → globals-runtime-DB8fVA5g.js} +2 -145
- package/dist/manager/_manager-chunks/{globals-runtime-DMvB3-IM.js → globals-runtime-DMq1Phbl.js} +153 -141
- package/dist/manager/_manager-chunks/globals-runtime-DOPUchia.js +5282 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BcNHymiF.js → globals-runtime-Dbt08xWQ.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-m07udJ_K.js → globals-runtime-kmPSyf3j.js} +637 -1730
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-DrjpEyLM.js → runtime-B4U0u9p4.js} +5 -147
- package/dist/manager/_manager-chunks/{runtime-B-eSQdxk.js → runtime-BM30BmeT.js} +503 -44
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-a5zd7km2.js → runtime-Cf0p9DUx.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-Cdz2BHhM.js → runtime-D-nYLsdk.js} +57 -34
- package/dist/manager/_manager-chunks/runtime-D09XMY6V.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-Bldwclun.js → runtime-DvrwKw7z.js} +92 -303
- package/dist/manager/_manager-chunks/{runtime-DGHNKNQl.js → runtime-DzxaTqVN.js} +10 -29
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-Cmu7D8A0.js → runtime-ecY5qnmo.js} +193 -184
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +22 -28
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +16 -11
- package/dist/nextjs-vite/index.js +3 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +93 -14
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +1 -2
- package/dist/nextjs-vite-plugin/index.js +12 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.d.ts +65 -72
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +11 -13
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
- package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
- package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
- package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +2 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.js +25 -211
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/withStorybook.js +11 -10
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.js +3 -1
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +808 -573
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.js +22 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +21 -44
- package/dist/_browser-chunks/WithTooltip-V55S6YCY.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
- package/dist/_node-chunks/chunk-6QQTZT3Z.js +0 -19
- package/dist/_node-chunks/chunk-BRD332PB.js +0 -3008
- package/dist/_node-chunks/chunk-E2XKJLXK.js +0 -4731
- package/dist/_node-chunks/chunk-F2LQJXAB.js +0 -29
- package/dist/_node-chunks/chunk-MCZZMBPA.js +0 -20
- package/dist/_node-chunks/chunk-MMFUHYSU.js +0 -23
- package/dist/_node-chunks/chunk-UGFY5LEG.js +0 -18
- package/dist/_node-chunks/chunk-UO5ZOCSQ.js +0 -662
- package/dist/_node-chunks/chunk-UW35FCXF.js +0 -20
- package/dist/_node-chunks/chunk-VMUXW2E2.js +0 -5414
- package/dist/_node-chunks/chunk-VNXE7UJL.js +0 -51
- package/dist/_node-chunks/chunk-VRJJ43P2.js +0 -11
- package/dist/_node-chunks/chunk-WCJUS7OC.js +0 -1877
- package/dist/_node-chunks/chunk-WMBMSNB7.js +0 -36
- package/dist/_node-chunks/chunk-YV2QBXU6.js +0 -3823
- package/dist/_node-chunks/chunk-ZZNBVMBU.js +0 -25
- package/dist/_node-chunks/dist-VFUGPNLK.js +0 -16
- package/dist/_node-chunks/globby-N7LO32D3.js +0 -2884
- package/dist/_node-chunks/jiti-SJDZ7LQB.js +0 -3848
- package/dist/_node-chunks/lib-4HD6QL5R.js +0 -366
- package/dist/_node-chunks/optimized-tests-LVKXZ3HQ.js +0 -22
- package/dist/_node-chunks/postinstallAddon-I6MAL6PW.js +0 -20
- package/dist/_node-chunks/session-id-6Z2RXBTG.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-Bon7UvQk.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DDOIxI_l.js +0 -1584
- package/dist/manager/_manager-chunks/runtime-CuJiHYCp.js +0 -22
- package/dist/manager/_manager-chunks/runtime-DFhLVh8q.js +0 -456
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as init_globals_runtime } from "./_manager-chunks/globals-runtime-
|
|
1
|
+
import { t as init_globals_runtime } from "./_manager-chunks/globals-runtime-CI_p54Ha.js";
|
|
2
2
|
init_globals_runtime();
|
package/dist/manager/runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as init_runtime } from "./_manager-chunks/runtime-
|
|
1
|
+
import { t as init_runtime } from "./_manager-chunks/runtime-D-nYLsdk.js";
|
|
2
2
|
init_runtime();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $c as API_GroupEntry, Ac as useTestProviderStore, Al as experimental_requestResponse, Bc as useStatusStore, Bl as shortcutMatchesShortcut, Cl as useSharedState, Dc as fullTestProviderStore, Dl as _default, Ec as Tag, El as useStorybookState, Fl as eventMatchesShortcut, Gl as Addon_Type, Hc as useUniversalStore, Hl as shortcutToHumanString, Il as eventToShortcut, Jc as API, Kl as addons, Lc as fullStatusStore, Ll as isShortcutTaken, Ml as KeyboardEventLike, Nl as controlOrMetaKey, Oc as getTestProviderStoreById, Ol as isMacLike, Pl as controlOrMetaSymbol, Qc as API_EventMap, Rc as getStatusStoreByTypeId, Rl as keyToSymbol, Sl as useParameter, Tl as useStorybookApi, Uc as UniversalStore, Ul as Options, Vc as MockUniversalStore, Vl as shortcutToAriaKeyshortcuts, Wl as AddonStore, Xc as API_ComposedRef, Yc as API_ComponentEntry, Zc as API_DocsEntry, _l as useArgTypes, al as API_StoryEntry, ao as useServiceQuery, bl as useGlobalTypes, cl as Listener, dl as ManagerProvider, el as API_HashEntry, fl as ManagerProviderProps, gl as useAddonState, hl as typesX, il as API_RootEntry, io as registerService, jl as API_KeyCollection, kc as universalTestProviderStore, kl as RequestResponseError, ll as ManagerConsumer, ml as combineParameters, nl as API_LeafEntry, ol as ActiveTabs, oo as useServiceCommand, pl as State, rl as API_Refs, ro as getService, sl as Combo, tl as API_IndexHash, ul as ManagerContext, vl as useArgs, wl as useStoryPrepared, xl as useGlobals, yl as useChannel, zc as universalStatusStore, zl as optionOrAltSymbol } from "../chunk-
|
|
1
|
+
import { $c as API_GroupEntry, Ac as useTestProviderStore, Al as experimental_requestResponse, Bc as useStatusStore, Bl as shortcutMatchesShortcut, Cl as useSharedState, Dc as fullTestProviderStore, Dl as _default, Ec as Tag, El as useStorybookState, Fl as eventMatchesShortcut, Gl as Addon_Type, Hc as useUniversalStore, Hl as shortcutToHumanString, Il as eventToShortcut, Jc as API, Kl as addons, Lc as fullStatusStore, Ll as isShortcutTaken, Ml as KeyboardEventLike, Nl as controlOrMetaKey, Oc as getTestProviderStoreById, Ol as isMacLike, Pl as controlOrMetaSymbol, Qc as API_EventMap, Rc as getStatusStoreByTypeId, Rl as keyToSymbol, Sl as useParameter, Tl as useStorybookApi, Uc as UniversalStore, Ul as Options, Vc as MockUniversalStore, Vl as shortcutToAriaKeyshortcuts, Wl as AddonStore, Xc as API_ComposedRef, Yc as API_ComponentEntry, Zc as API_DocsEntry, _l as useArgTypes, al as API_StoryEntry, ao as useServiceQuery, bl as useGlobalTypes, cl as Listener, dl as ManagerProvider, el as API_HashEntry, fl as ManagerProviderProps, gl as useAddonState, hl as typesX, il as API_RootEntry, io as registerService, jl as API_KeyCollection, kc as universalTestProviderStore, kl as RequestResponseError, ll as ManagerConsumer, ml as combineParameters, nl as API_LeafEntry, ol as ActiveTabs, oo as useServiceCommand, pl as State, rl as API_Refs, ro as getService, sl as Combo, tl as API_IndexHash, ul as ManagerContext, vl as useArgs, wl as useStoryPrepared, xl as useGlobals, yl as useChannel, zc as universalStatusStore, zl as optionOrAltSymbol } from "../chunk-LrH1y9J2.js";
|
|
2
2
|
export { API, API_EventMap, type API_KeyCollection, ActiveTabs, type Addon_Type as Addon, type AddonStore, type Listener as ChannelListener, Combo, type API_ComponentEntry as ComponentEntry, type API_ComposedRef as ComposedRef, ManagerConsumer as Consumer, type API_DocsEntry as DocsEntry, type API_GroupEntry as GroupEntry, type API_HashEntry as HashEntry, type API_IndexHash as IndexHash, type API_IndexHash as StoriesHash, KeyboardEventLike, type API_LeafEntry as LeafEntry, ManagerContext, ManagerProviderProps, ManagerProvider as Provider, type API_Refs as Refs, RequestResponseError, type API_RootEntry as RootEntry, State, type Options as StoreOptions, type API_StoryEntry as StoryEntry, Tag, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, experimental_requestResponse, useStatusStore as experimental_useStatusStore, useTestProviderStore as experimental_useTestProviderStore, getService, UniversalStore as internal_UniversalStore, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, useUniversalStore as internal_useUniversalStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, optionOrAltSymbol, registerService, shortcutMatchesShortcut, shortcutToAriaKeyshortcuts, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useServiceCommand, useServiceQuery, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState };
|
|
@@ -16,12 +16,11 @@ import {
|
|
|
16
16
|
toStatusValue
|
|
17
17
|
} from "../_browser-chunks/chunk-DYNTDJ3O.js";
|
|
18
18
|
import {
|
|
19
|
-
dequal,
|
|
20
19
|
getService,
|
|
21
20
|
registerService,
|
|
22
21
|
useServiceCommand,
|
|
23
22
|
useServiceQuery
|
|
24
|
-
} from "../_browser-chunks/chunk-
|
|
23
|
+
} from "../_browser-chunks/chunk-NGMQJMCY.js";
|
|
25
24
|
import {
|
|
26
25
|
countBy,
|
|
27
26
|
partition
|
|
@@ -66,6 +65,9 @@ import "../_browser-chunks/chunk-JPUOQJUI.js";
|
|
|
66
65
|
import "../_browser-chunks/chunk-BNP234B4.js";
|
|
67
66
|
import "../_browser-chunks/chunk-MJIDTL3X.js";
|
|
68
67
|
import "../_browser-chunks/chunk-SC67XZST.js";
|
|
68
|
+
import {
|
|
69
|
+
global
|
|
70
|
+
} from "../_browser-chunks/chunk-6AKCRYVX.js";
|
|
69
71
|
import {
|
|
70
72
|
__commonJS,
|
|
71
73
|
__export,
|
|
@@ -598,7 +600,6 @@ __export(refs_exports, {
|
|
|
598
600
|
getSourceType: () => getSourceType,
|
|
599
601
|
init: () => init3
|
|
600
602
|
});
|
|
601
|
-
import { global } from "@storybook/global";
|
|
602
603
|
import { dedent as dedent2 } from "ts-dedent";
|
|
603
604
|
|
|
604
605
|
// src/manager-api/lib/stories.ts
|
|
@@ -699,10 +700,10 @@ var TITLE_PATH_SEPARATOR = /\s*\/\s*/, denormalizeStoryParameters = ({
|
|
|
699
700
|
return statusFilterFn && !statusFilterFn({ ...entry, statuses }) && !indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some(
|
|
700
701
|
(child) => statusFilterFn({ ...child, statuses: allStatuses[child.id] ?? {} })
|
|
701
702
|
) ? !1 : Object.values(statuses).some(({ value }) => value === "status-value:error") || filterFunctions.every((fn) => fn({ ...entry, statuses })) ? !0 : indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some((child) => filterFunctions.every((fn) => fn({ ...child, statuses })));
|
|
702
|
-
}), { sidebar = {} } = provider.getConfig(), { showRoots, collapsedRoots = [], renderAriaLabel, renderLabel } = sidebar, setShowRoots = typeof showRoots < "u", storiesHashOutOfOrder = entryValues.reduce((acc, item) => {
|
|
703
|
+
}), { sidebar = {} } = provider.getConfig(), { showRoots, flat, collapsedRoots = [], renderAriaLabel, renderLabel } = sidebar, setShowRoots = typeof showRoots < "u", storiesHashOutOfOrder = entryValues.reduce((acc, item) => {
|
|
703
704
|
if (docsOptions.docsMode && item.type !== "docs")
|
|
704
705
|
return acc;
|
|
705
|
-
let { title } = item, groups = title.trim().split(TITLE_PATH_SEPARATOR), root = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [], names = [...root, ...groups], paths = names.reduce((list, name, idx) => {
|
|
706
|
+
let { title } = item, groups = flat ? [title.trim()] : title.trim().split(TITLE_PATH_SEPARATOR), root = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [], names = [...root, ...groups], paths = names.reduce((list, name, idx) => {
|
|
706
707
|
let parent = idx > 0 && list[idx - 1], id = sanitize(parent ? `${parent}-${name}` : name);
|
|
707
708
|
if (name.trim() === "")
|
|
708
709
|
throw new Error(dedent`Invalid title ${title} ending in slash.`);
|
|
@@ -1024,7 +1025,7 @@ var init4 = ({ store: store2, fullAPI, provider }) => {
|
|
|
1024
1025
|
userGlobals: currentUserGlobals,
|
|
1025
1026
|
storyGlobals: currentStoryGlobals
|
|
1026
1027
|
} = store2.getState();
|
|
1027
|
-
|
|
1028
|
+
isEqual(globals, currentGlobals) || store2.setState({ globals }), isEqual(userGlobals, currentUserGlobals) || store2.setState({ userGlobals }), isEqual(storyGlobals, currentStoryGlobals) || store2.setState({ storyGlobals });
|
|
1028
1029
|
};
|
|
1029
1030
|
return provider.channel?.on(
|
|
1030
1031
|
GLOBALS_UPDATED,
|
|
@@ -1038,7 +1039,7 @@ var init4 = ({ store: store2, fullAPI, provider }) => {
|
|
|
1038
1039
|
SET_GLOBALS,
|
|
1039
1040
|
function({ globals, globalTypes }) {
|
|
1040
1041
|
let { ref } = getEventMetadata(this, fullAPI), currentUserGlobals = store2.getState()?.userGlobals;
|
|
1041
|
-
ref ? Object.keys(globals).length > 0 && logger5.warn("received globals from a non-local ref. This is not currently supported.") : store2.setState({ globals, userGlobals: globals, globalTypes }), currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !
|
|
1042
|
+
ref ? Object.keys(globals).length > 0 && logger5.warn("received globals from a non-local ref. This is not currently supported.") : store2.setState({ globals, userGlobals: globals, globalTypes }), currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !isEqual(globals, currentUserGlobals) && api.updateGlobals(currentUserGlobals);
|
|
1042
1043
|
}
|
|
1043
1044
|
), {
|
|
1044
1045
|
api,
|
|
@@ -1060,9 +1061,8 @@ __export(layout_exports, {
|
|
|
1060
1061
|
isPagesViewMode: () => isPagesViewMode
|
|
1061
1062
|
});
|
|
1062
1063
|
import { SET_CONFIG as SET_CONFIG2 } from "@aussieljk/forkbook/internal/core-events";
|
|
1063
|
-
import { global as global2 } from "@storybook/global";
|
|
1064
1064
|
import { create } from "@aussieljk/forkbook/theming/create";
|
|
1065
|
-
var { document: document2 } =
|
|
1065
|
+
var { document: document2 } = global, isFunction = (val) => typeof val == "function", ActiveTabs = {
|
|
1066
1066
|
SIDEBAR: "sidebar",
|
|
1067
1067
|
CANVAS: "canvas",
|
|
1068
1068
|
ADDONS: "addons"
|
|
@@ -1114,7 +1114,7 @@ var { document: document2 } = global2, isFunction = (val) => typeof val == "func
|
|
|
1114
1114
|
}, applyUiOptions = (uiState, options) => {
|
|
1115
1115
|
let uiKeys = Object.keys(uiState);
|
|
1116
1116
|
return toMerged(uiState, pick(options ?? {}, uiKeys));
|
|
1117
|
-
}, isDesktopViewport = () =>
|
|
1117
|
+
}, isDesktopViewport = () => global.matchMedia?.("(min-width: 600px)")?.matches ?? !0, init5 = ({ store: store2, provider, singleStory }) => {
|
|
1118
1118
|
let api = {
|
|
1119
1119
|
toggleFullscreen(nextState) {
|
|
1120
1120
|
return store2.setState(
|
|
@@ -1466,19 +1466,17 @@ __export(shortcuts_exports, {
|
|
|
1466
1466
|
isMacLike: () => isMacLike2,
|
|
1467
1467
|
keys: () => keys
|
|
1468
1468
|
});
|
|
1469
|
-
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
1470
1469
|
import {
|
|
1471
1470
|
FORCE_REMOUNT,
|
|
1472
1471
|
PREVIEW_KEYDOWN,
|
|
1473
1472
|
STORIES_COLLAPSE_ALL,
|
|
1474
1473
|
STORIES_EXPAND_ALL
|
|
1475
1474
|
} from "@aussieljk/forkbook/internal/core-events";
|
|
1476
|
-
|
|
1475
|
+
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
1477
1476
|
import { logger as logger6 } from "@aussieljk/forkbook/internal/client-logger";
|
|
1478
1477
|
|
|
1479
1478
|
// src/manager-api/lib/platform.ts
|
|
1480
|
-
|
|
1481
|
-
var { navigator: navigator2 } = global3, isMacLike = () => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1;
|
|
1479
|
+
var { navigator: navigator2 } = global, isMacLike = () => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1;
|
|
1482
1480
|
|
|
1483
1481
|
// src/manager-api/lib/shortcut.ts
|
|
1484
1482
|
var controlOrMetaSymbol = () => isMacLike() ? "\u2318" : "ctrl", controlOrMetaKey = () => isMacLike() ? "meta" : "control", optionOrAltSymbol = () => isMacLike() ? "\u2325" : "alt", isShortcutTaken = (arr1, arr2) => JSON.stringify(arr1) === JSON.stringify(arr2), eventToShortcut = (e) => {
|
|
@@ -1509,7 +1507,7 @@ var controlOrMetaSymbol = () => isMacLike() ? "\u2318" : "ctrl", controlOrMetaKe
|
|
|
1509
1507
|
), eventMatchesShortcut = (e, shortcut) => shortcutMatchesShortcut(eventToShortcut(e), shortcut), keyToSymbol = (key) => key === "alt" ? optionOrAltSymbol() : key === "control" ? "\u2303" : key === "meta" ? "\u2318" : key === "shift" ? "\u21E7\u200B" : key === "Enter" || key === "Backspace" || key === "Esc" ? "" : key === " " ? "SPACE" : key === "ArrowUp" ? "\u2191" : key === "ArrowDown" ? "\u2193" : key === "ArrowLeft" ? "\u2190" : key === "ArrowRight" ? "\u2192" : key?.toUpperCase(), shortcutToHumanString = (shortcut) => shortcut.map(keyToSymbol).join(" "), shortcutToAriaKeyshortcuts = (shortcut) => shortcut.map((shortcut2) => shortcut2 === "+" ? "plus" : shortcut2 === " " ? "space" : shortcut2).join("+");
|
|
1510
1508
|
|
|
1511
1509
|
// src/manager-api/modules/shortcuts.ts
|
|
1512
|
-
var { navigator: navigator3, document: document3 } =
|
|
1510
|
+
var { navigator: navigator3, document: document3 } = global;
|
|
1513
1511
|
function wasFocusInElement(element) {
|
|
1514
1512
|
return document3.activeElement && element?.contains(document3.activeElement);
|
|
1515
1513
|
}
|
|
@@ -1720,7 +1718,7 @@ var init10 = ({ store: store2, fullAPI, provider }) => {
|
|
|
1720
1718
|
break;
|
|
1721
1719
|
}
|
|
1722
1720
|
case "openInEditor": {
|
|
1723
|
-
|
|
1721
|
+
global.CONFIG_TYPE === "DEVELOPMENT" && fullAPI.openInEditor({
|
|
1724
1722
|
file: fullAPI.getCurrentStoryData().importPath
|
|
1725
1723
|
});
|
|
1726
1724
|
break;
|
|
@@ -1806,7 +1804,6 @@ import {
|
|
|
1806
1804
|
} from "@aussieljk/forkbook/internal/core-events";
|
|
1807
1805
|
import { sanitize as sanitize2, toId } from "@aussieljk/forkbook/internal/csf";
|
|
1808
1806
|
import { queryFromLocation } from "@aussieljk/forkbook/internal/router";
|
|
1809
|
-
import { global as global5 } from "@storybook/global";
|
|
1810
1807
|
|
|
1811
1808
|
// src/manager-api/lib/url.ts
|
|
1812
1809
|
var buildNavigationUrl = (path, queryParams = {}) => {
|
|
@@ -1914,7 +1911,7 @@ var BUILT_IN_URL_TAG_MAP = {
|
|
|
1914
1911
|
};
|
|
1915
1912
|
|
|
1916
1913
|
// src/manager-api/modules/stories.ts
|
|
1917
|
-
var { fetch: fetch2 } =
|
|
1914
|
+
var { fetch: fetch2 } = global, STORY_INDEX_PATH = "./index.json", TAGS_FILTER = "tags-filter", STATIC_FILTER = "static-filter", STATUS_FILTER = "status-filter", STATUS_CHANGE_REBUILD_THROTTLE = 500, BUILT_IN_TAG_IDS = new Set(Object.keys(BUILT_IN_FILTERS)), removedOptions = ["enableShortcuts", "theme", "showRoots"];
|
|
1918
1915
|
function removeRemovedOptions(options) {
|
|
1919
1916
|
if (!options || typeof options == "string")
|
|
1920
1917
|
return options;
|
|
@@ -2455,7 +2452,7 @@ var FILTER_KEYS = {
|
|
|
2455
2452
|
edges: ["leading", "trailing"]
|
|
2456
2453
|
})
|
|
2457
2454
|
);
|
|
2458
|
-
let tagPresets =
|
|
2455
|
+
let tagPresets = global.TAGS_OPTIONS || {}, defaultTags = getDefaultTagsFromPreset(tagPresets), { tags, statuses } = queryFromLocation(location2 ?? { search: "" }), parsedTags = parseTagsParam(tags), hasTagsParam = tags !== void 0, initialIncluded = hasTagsParam ? parsedTags.included : defaultTags.included, initialExcluded = hasTagsParam ? parsedTags.excluded : defaultTags.excluded, parsedStatuses = parseStatusesParam(statuses), initialIncludedStatuses = parsedStatuses.included, initialExcludedStatuses = parsedStatuses.excluded, initialFilters = {
|
|
2459
2456
|
[STATIC_FILTER]: computeStaticFilterFn(tagPresets),
|
|
2460
2457
|
[TAGS_FILTER]: computeTagsFilterFn(initialIncluded, initialExcluded),
|
|
2461
2458
|
[STATUS_FILTER]: computeStatusFilterFn(initialIncludedStatuses, initialExcludedStatuses)
|
|
@@ -2500,7 +2497,6 @@ import {
|
|
|
2500
2497
|
UPDATE_QUERY_PARAMS
|
|
2501
2498
|
} from "@aussieljk/forkbook/internal/core-events";
|
|
2502
2499
|
import { buildArgsParam, queryFromLocation as queryFromLocation2 } from "@aussieljk/forkbook/internal/router";
|
|
2503
|
-
import { global as global6 } from "@storybook/global";
|
|
2504
2500
|
var parseBoolean = (value) => {
|
|
2505
2501
|
if (value === "true" || value === "1")
|
|
2506
2502
|
return !0;
|
|
@@ -2527,7 +2523,7 @@ var parseBoolean = (value) => {
|
|
|
2527
2523
|
panelPosition: ["right", "bottom"].includes(panel) ? panel : void 0
|
|
2528
2524
|
}, ui = {
|
|
2529
2525
|
enableShortcuts: parseBoolean(shortcuts)
|
|
2530
|
-
}, selectedPanel = addonPanel || void 0, storyId = storyIdFromUrl, otherParams = getCustomQueryParams(location2), customQueryParams =
|
|
2526
|
+
}, selectedPanel = addonPanel || void 0, storyId = storyIdFromUrl, otherParams = getCustomQueryParams(location2), customQueryParams = isEqual(prevParams, otherParams) ? prevParams : otherParams;
|
|
2531
2527
|
return prevParams = customQueryParams, { viewMode, layout, ui, selectedPanel, location: location2, path, customQueryParams, storyId };
|
|
2532
2528
|
}, init12 = (moduleArgs) => {
|
|
2533
2529
|
let { store: store2, navigate, provider, fullAPI } = moduleArgs, navigateTo = (path, queryParams = {}, options = {}) => navigate(buildNavigationUrl(path, queryParams), options), api = {
|
|
@@ -2544,7 +2540,7 @@ var parseBoolean = (value) => {
|
|
|
2544
2540
|
} = options;
|
|
2545
2541
|
if (refId && !refs[refId])
|
|
2546
2542
|
throw new Error(`Invalid refId: ${refId}`);
|
|
2547
|
-
let pathname = location2.pathname || "/", originAddress =
|
|
2543
|
+
let pathname = location2.pathname || "/", originAddress = global.window.location.origin + pathname, networkAddress = global.FORKBOOK_NETWORK_ADDRESS ?? originAddress, managerBase = base === "origin" ? originAddress : base === "network" ? networkAddress : pathname, previewBaseUrl = base ? managerBase : global.document?.baseURI || originAddress, previewBase = refId ? refs[refId].url + "/iframe.html" : resolveIframeUrl(previewBaseUrl, { absolute: !!base }), refParam = refId ? `&refId=${encodeURIComponent(refId)}` : "", { args = "", globals = "", ...otherParams } = queryParams, argsParam = inheritArgs ? mergeSerializedParams(customQueryParams?.args ?? "", args) : args, globalsParam = inheritGlobals ? mergeSerializedParams(customQueryParams?.globals ?? "", globals) : globals, managerQueryParams = omit(otherParams, ["embed", "freeze"]), previewQueryParams = omit(otherParams, ["id", "viewMode", "embed", "freeze"]), customManagerParams = stringify(managerQueryParams, {
|
|
2548
2544
|
nesting: !0,
|
|
2549
2545
|
nestingSyntax: "js"
|
|
2550
2546
|
}), customPreviewParams = stringify(previewQueryParams, {
|
|
@@ -2577,7 +2573,7 @@ var parseBoolean = (value) => {
|
|
|
2577
2573
|
let { customQueryParams } = store2.getState(), update2 = { ...customQueryParams };
|
|
2578
2574
|
for (let [key, value] of Object.entries(input))
|
|
2579
2575
|
value == null ? delete update2[key] : update2[key] = value;
|
|
2580
|
-
|
|
2576
|
+
isEqual(customQueryParams, update2) || (store2.setState({ customQueryParams: update2 }), provider.channel?.emit(UPDATE_QUERY_PARAMS, update2));
|
|
2581
2577
|
},
|
|
2582
2578
|
applyQueryParams(input, options) {
|
|
2583
2579
|
let { path, hash = "", queryParams } = api.getUrlState();
|
|
@@ -2599,7 +2595,7 @@ var parseBoolean = (value) => {
|
|
|
2599
2595
|
provider.channel?.on(SET_CURRENT_STORY2, () => updateArgsParam());
|
|
2600
2596
|
let handleOrId;
|
|
2601
2597
|
return provider.channel?.on(STORY_ARGS_UPDATED2, () => {
|
|
2602
|
-
"requestIdleCallback" in
|
|
2598
|
+
"requestIdleCallback" in global.window ? (handleOrId && global.window.cancelIdleCallback(handleOrId), handleOrId = global.window.requestIdleCallback(updateArgsParam, { timeout: 1e3 })) : (handleOrId && clearTimeout(handleOrId), setTimeout(updateArgsParam, 100));
|
|
2603
2599
|
}), provider.channel?.on(GLOBALS_UPDATED2, ({ userGlobals, initialGlobals }) => {
|
|
2604
2600
|
let { path, hash = "", queryParams } = api.getUrlState(), globalsString = buildArgsParam(initialGlobals, merge_default(initialGlobals, userGlobals));
|
|
2605
2601
|
navigateTo(
|
|
@@ -2629,14 +2625,13 @@ __export(versions_exports, {
|
|
|
2629
2625
|
init: () => init13
|
|
2630
2626
|
});
|
|
2631
2627
|
var import_memoizerific3 = __toESM(require_memoizerific(), 1);
|
|
2632
|
-
import { global as global7 } from "@storybook/global";
|
|
2633
2628
|
import semver from "semver";
|
|
2634
2629
|
|
|
2635
2630
|
// src/manager-api/version.ts
|
|
2636
2631
|
var version = "11.0.0-alpha.6";
|
|
2637
2632
|
|
|
2638
2633
|
// src/manager-api/modules/versions.ts
|
|
2639
|
-
var { VERSIONCHECK } =
|
|
2634
|
+
var { VERSIONCHECK } = global, getVersionCheckData = (0, import_memoizerific3.default)(1)(() => {
|
|
2640
2635
|
try {
|
|
2641
2636
|
return { ...JSON.parse(VERSIONCHECK).data || {} };
|
|
2642
2637
|
} catch {
|
|
@@ -2701,7 +2696,6 @@ import {
|
|
|
2701
2696
|
SET_WHATS_NEW_CACHE,
|
|
2702
2697
|
TOGGLE_WHATS_NEW_NOTIFICATIONS
|
|
2703
2698
|
} from "@aussieljk/forkbook/internal/core-events";
|
|
2704
|
-
import { global as global8 } from "@storybook/global";
|
|
2705
2699
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
2706
2700
|
var WHATS_NEW_NOTIFICATION_ID = "whats-new", ForkbookIcon = ({ size = 14 }) => jsx2("span", { role: "img", "aria-label": "Forkbook", style: { fontSize: size, lineHeight: 1 }, children: "\u{1FAA9}" }), init14 = ({ fullAPI, store: store2, provider }) => {
|
|
2707
2701
|
let state = {
|
|
@@ -2738,7 +2732,7 @@ var WHATS_NEW_NOTIFICATION_ID = "whats-new", ForkbookIcon = ({ size = 14 }) => j
|
|
|
2738
2732
|
provider.channel?.emit(SET_WHATS_NEW_CACHE, cache);
|
|
2739
2733
|
}
|
|
2740
2734
|
return { init: async () => {
|
|
2741
|
-
if (
|
|
2735
|
+
if (global.CONFIG_TYPE !== "DEVELOPMENT")
|
|
2742
2736
|
return;
|
|
2743
2737
|
let whatsNewData = await getLatestWhatsNewPost();
|
|
2744
2738
|
setWhatsNewState(whatsNewData);
|
package/dist/manager-errors.d.ts
CHANGED
package/dist/mcp/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
package_default
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-CNMMDQC3.js";
|
|
15
|
+
import "../_node-chunks/chunk-NLPC2DDQ.js";
|
|
16
16
|
|
|
17
17
|
// src/mcp/index.ts
|
|
18
18
|
import { McpServer } from "tmcp";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
walk
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-PQLXHVWK.js";
|
|
15
15
|
import {
|
|
16
16
|
userModuleExtensions
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
18
|
-
import "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-3ZCGT6VF.js";
|
|
18
|
+
import "../_node-chunks/chunk-NLPC2DDQ.js";
|
|
19
19
|
|
|
20
20
|
// src/mocking-utils/automock.ts
|
|
21
21
|
import MagicString from "magic-string";
|
|
@@ -215,7 +215,7 @@ import { readFileSync } from "node:fs";
|
|
|
215
215
|
import { generate, parser, types as t } from "@aussieljk/forkbook/internal/babel";
|
|
216
216
|
import { logger } from "@aussieljk/forkbook/internal/node-logger";
|
|
217
217
|
import { telemetry } from "@aussieljk/forkbook/internal/telemetry";
|
|
218
|
-
import { transformSync } from "
|
|
218
|
+
import { transformSync } from "rolldown/utils";
|
|
219
219
|
import { basename, normalize } from "pathe";
|
|
220
220
|
|
|
221
221
|
// src/mocking-utils/resolve.ts
|
|
@@ -303,7 +303,12 @@ function extractMockCalls(options, parse, root, findMockRedirect2) {
|
|
|
303
303
|
return !1;
|
|
304
304
|
};
|
|
305
305
|
var hasSpyTrue = hasSpyTrue2;
|
|
306
|
-
let previewConfigCode = readFileSync(options.previewConfigPath, "utf-8"), { code: jsCode } = transformSync(previewConfigCode, {
|
|
306
|
+
let previewConfigCode = readFileSync(options.previewConfigPath, "utf-8"), { code: jsCode, errors } = transformSync(options.previewConfigPath, previewConfigCode, {
|
|
307
|
+
lang: "tsx"
|
|
308
|
+
});
|
|
309
|
+
if (errors.length)
|
|
310
|
+
throw new Error(errors[0].message);
|
|
311
|
+
let ast = parse(jsCode), mocks = [];
|
|
307
312
|
return walk(ast, {
|
|
308
313
|
// @ts-expect-error - Node comes from babel
|
|
309
314
|
async enter(node) {
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
} from "../_browser-chunks/chunk-7DQREF4S.js";
|
|
4
4
|
import {
|
|
5
5
|
INTERNAL_DEFAULT_PROJECT_ANNOTATIONS
|
|
6
|
-
} from "../_browser-chunks/chunk-
|
|
6
|
+
} from "../_browser-chunks/chunk-O24AZJZ7.js";
|
|
7
7
|
import "../_browser-chunks/chunk-GNZY6LOW.js";
|
|
8
|
-
import "../_browser-chunks/chunk-
|
|
8
|
+
import "../_browser-chunks/chunk-EQKMUQF3.js";
|
|
9
9
|
import "../_browser-chunks/chunk-WHQRNHXD.js";
|
|
10
|
+
import "../_browser-chunks/chunk-6AKCRYVX.js";
|
|
10
11
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
11
12
|
|
|
12
13
|
// src/nextjs-vite/index.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_j88npgqhy9 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_j88npgqhy9 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_j88npgqhy9 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_j88npgqhy9.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_j88npgqhy9.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_j88npgqhy9.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../../_node-chunks/chunk-
|
|
12
|
+
import "../../_node-chunks/chunk-NLPC2DDQ.js";
|
|
13
13
|
|
|
14
14
|
// src/nextjs-vite/node/index.ts
|
|
15
15
|
function defineMain(config) {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region .dts-emit/code/core/src/nextjs-vite/node-stand-ins/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Browser stand-ins for the small part of `node:fs` and `node:path` that async server pages use
|
|
4
|
+
* to read project files at build time. The nextjs-vite preset aliases the Node modules to virtual
|
|
5
|
+
* modules that call these functions (see `plugin.ts`).
|
|
6
|
+
*/
|
|
7
|
+
/** Sets the project root. `process.cwd()` and `path.resolve()` use it. */
|
|
8
|
+
declare function setProjectRoot(root: string): void;
|
|
9
|
+
declare function getProjectRoot(): string;
|
|
10
|
+
declare const sep = "/";
|
|
11
|
+
declare const delimiter = ":";
|
|
12
|
+
declare function isAbsolute(p: string): boolean;
|
|
13
|
+
declare function normalize(p: string): string;
|
|
14
|
+
declare function join(...parts: string[]): string;
|
|
15
|
+
declare function resolve(...parts: string[]): string;
|
|
16
|
+
declare function dirname(p: string): string;
|
|
17
|
+
declare function basename(p: string, ext?: string): string;
|
|
18
|
+
declare function extname(p: string): string;
|
|
19
|
+
declare function relative(from: string, to: string): string;
|
|
20
|
+
declare function parse(p: string): {
|
|
21
|
+
root: string;
|
|
22
|
+
dir: string;
|
|
23
|
+
base: string;
|
|
24
|
+
ext: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
declare function format(p: {
|
|
28
|
+
dir?: string;
|
|
29
|
+
root?: string;
|
|
30
|
+
base?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
ext?: string;
|
|
33
|
+
}): string;
|
|
34
|
+
declare const pathFunctions: {
|
|
35
|
+
sep: string;
|
|
36
|
+
delimiter: string;
|
|
37
|
+
isAbsolute: typeof isAbsolute;
|
|
38
|
+
normalize: typeof normalize;
|
|
39
|
+
join: typeof join;
|
|
40
|
+
resolve: typeof resolve;
|
|
41
|
+
dirname: typeof dirname;
|
|
42
|
+
basename: typeof basename;
|
|
43
|
+
extname: typeof extname;
|
|
44
|
+
relative: typeof relative;
|
|
45
|
+
parse: typeof parse;
|
|
46
|
+
format: typeof format;
|
|
47
|
+
};
|
|
48
|
+
declare const path: typeof pathFunctions & {
|
|
49
|
+
posix: typeof pathFunctions;
|
|
50
|
+
};
|
|
51
|
+
type Callback = (error: Error | null, data?: string | Uint8Array) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Makes the fs stand-in.
|
|
54
|
+
*
|
|
55
|
+
* @param files File contents. Each key is a path from the project root, as `import.meta.glob`
|
|
56
|
+
* gives it (`./content/x.md` or `/content/x.md`).
|
|
57
|
+
*/
|
|
58
|
+
declare function createFs(files: Record<string, string>): {
|
|
59
|
+
readFileSync: (p: unknown, options?: unknown) => string | Uint8Array;
|
|
60
|
+
existsSync: (p: unknown) => boolean;
|
|
61
|
+
readFile: (p: unknown, options?: unknown, callback?: Callback) => void;
|
|
62
|
+
promises: {
|
|
63
|
+
readFile: (p: unknown, options?: unknown) => Promise<string | Uint8Array<ArrayBufferLike>>;
|
|
64
|
+
access: (p: unknown) => Promise<void>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { basename, createFs, delimiter, dirname, extname, format, getProjectRoot, isAbsolute, join, normalize, parse, path, relative, resolve, sep, setProjectRoot };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import "../../_browser-chunks/chunk-IMSF75WX.js";
|
|
2
|
+
|
|
3
|
+
// src/nextjs-vite/node-stand-ins/index.ts
|
|
4
|
+
var projectRoot = "/";
|
|
5
|
+
function setProjectRoot(root) {
|
|
6
|
+
projectRoot = normalize(root.replace(/\\/g, "/")).replace(/(.)\/$/, "$1");
|
|
7
|
+
let g = globalThis;
|
|
8
|
+
g.process ??= { env: {} }, g.process.cwd = () => projectRoot;
|
|
9
|
+
}
|
|
10
|
+
function getProjectRoot() {
|
|
11
|
+
return projectRoot;
|
|
12
|
+
}
|
|
13
|
+
var sep = "/", delimiter = ":";
|
|
14
|
+
function isAbsolute(p) {
|
|
15
|
+
return p.startsWith("/");
|
|
16
|
+
}
|
|
17
|
+
function normalize(p) {
|
|
18
|
+
if (p === "") return ".";
|
|
19
|
+
let absolute = isAbsolute(p), trailing = p.endsWith("/"), parts = [];
|
|
20
|
+
for (let part of p.split("/"))
|
|
21
|
+
part === "" || part === "." || (part === ".." ? parts.length && parts[parts.length - 1] !== ".." ? parts.pop() : absolute || parts.push("..") : parts.push(part));
|
|
22
|
+
let out = parts.join("/");
|
|
23
|
+
return absolute ? "/" + out + (trailing && out ? "/" : "") : out === "" ? trailing ? "./" : "." : trailing ? out + "/" : out;
|
|
24
|
+
}
|
|
25
|
+
function join(...parts) {
|
|
26
|
+
return normalize(parts.filter((p) => p !== "").join("/"));
|
|
27
|
+
}
|
|
28
|
+
function resolve(...parts) {
|
|
29
|
+
let out = "";
|
|
30
|
+
for (let i = parts.length - 1; i >= 0 && !isAbsolute(out); i--)
|
|
31
|
+
parts[i] && (out = out ? `${parts[i]}/${out}` : parts[i]);
|
|
32
|
+
return isAbsolute(out) || (out = out ? `${projectRoot}/${out}` : projectRoot), normalize(out).replace(/(.)\/$/, "$1");
|
|
33
|
+
}
|
|
34
|
+
function dirname(p) {
|
|
35
|
+
let trimmed = p.length > 1 ? p.replace(/\/+$/, "") : p, index = trimmed.lastIndexOf("/");
|
|
36
|
+
return index === -1 ? "." : index === 0 ? "/" : trimmed.slice(0, index);
|
|
37
|
+
}
|
|
38
|
+
function basename(p, ext) {
|
|
39
|
+
let trimmed = p.length > 1 ? p.replace(/\/+$/, "") : p, base = trimmed.slice(trimmed.lastIndexOf("/") + 1);
|
|
40
|
+
return ext && base.endsWith(ext) && base !== ext ? base.slice(0, -ext.length) : base;
|
|
41
|
+
}
|
|
42
|
+
function extname(p) {
|
|
43
|
+
let base = basename(p), index = base.lastIndexOf(".");
|
|
44
|
+
return index <= 0 ? "" : base.slice(index);
|
|
45
|
+
}
|
|
46
|
+
function relative(from, to) {
|
|
47
|
+
let a = resolve(from).split("/").filter(Boolean), b = resolve(to).split("/").filter(Boolean), i = 0;
|
|
48
|
+
for (; i < a.length && i < b.length && a[i] === b[i]; ) i++;
|
|
49
|
+
return [...Array(a.length - i).fill(".."), ...b.slice(i)].join("/");
|
|
50
|
+
}
|
|
51
|
+
function parse(p) {
|
|
52
|
+
let base = basename(p), ext = extname(p);
|
|
53
|
+
return {
|
|
54
|
+
root: isAbsolute(p) ? "/" : "",
|
|
55
|
+
dir: dirname(p),
|
|
56
|
+
base,
|
|
57
|
+
ext,
|
|
58
|
+
name: ext ? base.slice(0, -ext.length) : base
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function format(p) {
|
|
62
|
+
let base = p.base ?? `${p.name ?? ""}${p.ext ?? ""}`, dir = p.dir ?? p.root ?? "";
|
|
63
|
+
return dir ? dir.endsWith("/") ? dir + base : `${dir}/${base}` : base;
|
|
64
|
+
}
|
|
65
|
+
var pathFunctions = {
|
|
66
|
+
sep,
|
|
67
|
+
delimiter,
|
|
68
|
+
isAbsolute,
|
|
69
|
+
normalize,
|
|
70
|
+
join,
|
|
71
|
+
resolve,
|
|
72
|
+
dirname,
|
|
73
|
+
basename,
|
|
74
|
+
extname,
|
|
75
|
+
relative,
|
|
76
|
+
parse,
|
|
77
|
+
format
|
|
78
|
+
}, path = {
|
|
79
|
+
...pathFunctions,
|
|
80
|
+
posix: pathFunctions
|
|
81
|
+
};
|
|
82
|
+
function notFound(p, syscall) {
|
|
83
|
+
let error = new Error(
|
|
84
|
+
`ENOENT: no such file or directory, ${syscall} '${p}'. In the browser, Forkbook can only read the text files of the project.`
|
|
85
|
+
);
|
|
86
|
+
return error.code = "ENOENT", error.path = p, error.syscall = syscall, error;
|
|
87
|
+
}
|
|
88
|
+
function toPath(p) {
|
|
89
|
+
return p instanceof URL ? decodeURIComponent(p.pathname) : String(p);
|
|
90
|
+
}
|
|
91
|
+
function encodingOf(options) {
|
|
92
|
+
return typeof options == "string" ? options : options?.encoding;
|
|
93
|
+
}
|
|
94
|
+
function createFs(files) {
|
|
95
|
+
let byPath = /* @__PURE__ */ new Map();
|
|
96
|
+
for (let [key, value] of Object.entries(files))
|
|
97
|
+
byPath.set(normalize(key.replace(/^\.?\//, "")), value);
|
|
98
|
+
let relativeKey = (p) => relative(projectRoot, resolve(toPath(p)));
|
|
99
|
+
function readFileSync(p, options) {
|
|
100
|
+
let content = byPath.get(relativeKey(p));
|
|
101
|
+
if (content === void 0) throw notFound(toPath(p), "open");
|
|
102
|
+
return encodingOf(options) ? content : new TextEncoder().encode(content);
|
|
103
|
+
}
|
|
104
|
+
function existsSync(p) {
|
|
105
|
+
let key = relativeKey(p);
|
|
106
|
+
if (key === "" || byPath.has(key)) return !0;
|
|
107
|
+
let prefix = key + "/";
|
|
108
|
+
for (let file of byPath.keys()) if (file.startsWith(prefix)) return !0;
|
|
109
|
+
return !1;
|
|
110
|
+
}
|
|
111
|
+
function readFile(p, options, callback) {
|
|
112
|
+
let cb = typeof options == "function" ? options : callback, opts = typeof options == "function" ? void 0 : options;
|
|
113
|
+
queueMicrotask(() => {
|
|
114
|
+
try {
|
|
115
|
+
cb?.(null, readFileSync(p, opts));
|
|
116
|
+
} catch (error) {
|
|
117
|
+
cb?.(error);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return { readFileSync, existsSync, readFile, promises: {
|
|
122
|
+
readFile: async (p, options) => readFileSync(p, options),
|
|
123
|
+
access: async (p) => {
|
|
124
|
+
if (!existsSync(p)) throw notFound(toPath(p), "access");
|
|
125
|
+
}
|
|
126
|
+
} };
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
basename,
|
|
130
|
+
createFs,
|
|
131
|
+
delimiter,
|
|
132
|
+
dirname,
|
|
133
|
+
extname,
|
|
134
|
+
format,
|
|
135
|
+
getProjectRoot,
|
|
136
|
+
isAbsolute,
|
|
137
|
+
join,
|
|
138
|
+
normalize,
|
|
139
|
+
parse,
|
|
140
|
+
path,
|
|
141
|
+
relative,
|
|
142
|
+
resolve,
|
|
143
|
+
sep,
|
|
144
|
+
setProjectRoot
|
|
145
|
+
};
|