@aussieljk/forkbook 0.0.1-1 → 0.0.1-11
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/LICENSE +1 -1
- package/README.md +35 -53
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +2 -2
- package/assets/browser/favicon-wrapper.svg +4 -4
- package/assets/browser/favicon.svg +1 -1
- package/assets/browser/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +8 -24
- package/assets/create/rendererAssets/common/Configure.mdx +100 -100
- package/assets/create/rendererAssets/common/button.css +1 -1
- package/assets/create/rendererAssets/common/header.css +1 -1
- package/assets/create/rendererAssets/common/page.css +2 -2
- package/assets/create/templates/react-native/index.expo.js +4 -4
- package/assets/create/templates/react-native/index.js +5 -5
- package/assets/server/base-preview-body.html +32 -32
- package/assets/server/base-preview-head.html +86 -86
- package/assets/server/template.ejs +27 -26
- package/dist/_browser-chunks/{Color-OEKZ7XSW.js → Color-QLZNXLSV.js} +8 -8
- package/dist/_browser-chunks/WithTooltip-GNLRTZDF.js +198 -0
- package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-3HM3VWJS.js} +1 -1
- package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-3M5T7BW4.js} +1 -1
- package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
- package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-5H4KFI44.js} +1 -1
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-6ELMKWKX.js} +5 -5
- package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-76222HQR.js} +1 -1
- package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-7DQREF4S.js} +1 -1
- package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
- package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/{chunk-PP4R7USA.js → chunk-DS2WQZGO.js} +222 -433
- package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-DYNTDJ3O.js} +3 -3
- package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-EQKMUQF3.js} +5 -4
- package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-FRAOQJDI.js} +5 -3
- package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-GRO2ZYEJ.js} +2 -2
- package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-KYSD26D6.js} +3 -3
- package/dist/_browser-chunks/{chunk-RNTIV5CE.js → chunk-LYYXDWR2.js} +9 -9
- package/dist/_browser-chunks/{chunk-V5M7Q4HT.js → chunk-MJIDTL3X.js} +4 -14
- package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-N3NRW5XX.js} +2 -2
- package/dist/_browser-chunks/{chunk-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
- package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-NTUHL5NS.js} +8 -3
- package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-YEKO6BHJ.js → chunk-ONTSNQON.js} +1 -1
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/{chunk-VVWPND3J.js → chunk-QU4RB2WU.js} +12 -12
- package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-TTBPZQ24.js} +282 -127
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-V5U45XXZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-73OX2G56.js → chunk-WBLVFDJT.js} +100 -108
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
- package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-ZHKZKFY4.js} +7 -6
- package/dist/_node-chunks/{attached-runtime-O4YTVUKE.js → attached-runtime-J2AKT5WI.js} +30 -30
- package/dist/_node-chunks/builder-manager-Z4RWF4ZH.js +1139 -0
- package/dist/_node-chunks/{chunk-XURIZ7IC.js → chunk-2U5J7YTA.js} +8 -8
- package/dist/_node-chunks/{chunk-PBMWZVLD.js → chunk-2WVLC5M2.js} +6 -6
- package/dist/_node-chunks/{chunk-SVZ6Q3CS.js → chunk-2YNXKY72.js} +6 -6
- package/dist/_node-chunks/{chunk-CYPPELO4.js → chunk-32FLWHUC.js} +22 -32
- package/dist/_node-chunks/{chunk-XTTAS346.js → chunk-36LPBTLF.js} +6 -6
- package/dist/_node-chunks/{chunk-ILWHW4HU.js → chunk-3EBGFRAH.js} +15 -15
- package/dist/_node-chunks/{chunk-I2ANCID7.js → chunk-3IIQSDCO.js} +66 -145
- package/dist/_node-chunks/{chunk-G6PUNHCI.js → chunk-3NST2GUZ.js} +6 -6
- package/dist/_node-chunks/{chunk-YWMICX2T.js → chunk-46Y5H6X5.js} +12 -12
- package/dist/_node-chunks/{chunk-5WHA37KG.js → chunk-4D325SMT.js} +102 -40
- package/dist/_node-chunks/{chunk-2XDUXZGI.js → chunk-54EHKXV7.js} +8 -8
- package/dist/_node-chunks/{chunk-AWJOXJAZ.js → chunk-55S3GGGC.js} +8 -8
- package/dist/_node-chunks/{chunk-QMU5ODXZ.js → chunk-5GOXN5M4.js} +7 -7
- package/dist/_node-chunks/{chunk-AWXGCPW6.js → chunk-5JLVSH44.js} +6 -6
- package/dist/_node-chunks/{chunk-BENYUF74.js → chunk-5P4N734V.js} +77 -78
- package/dist/_node-chunks/{chunk-PEIAGMSR.js → chunk-6E34W4UX.js} +6 -6
- package/dist/_node-chunks/chunk-6UAJLEIO.js +28 -0
- package/dist/_node-chunks/chunk-6UASHVMR.js +620 -0
- package/dist/_node-chunks/{chunk-R5FYRP6X.js → chunk-76KKKLEE.js} +7 -7
- package/dist/_node-chunks/{chunk-DWE36J35.js → chunk-7IOSIYW2.js} +7 -7
- package/dist/_node-chunks/chunk-7YQTID2W.js +25 -0
- package/dist/_node-chunks/{chunk-A724RK5H.js → chunk-A7GEBS3Q.js} +9 -6
- package/dist/_node-chunks/{chunk-6EJ5NPEM.js → chunk-AKMPPLT5.js} +7 -7
- package/dist/_node-chunks/{chunk-2BJIHWOK.js → chunk-ALGQMFMN.js} +6 -6
- package/dist/_node-chunks/{chunk-JEC2OK5B.js → chunk-APPFF22V.js} +7 -7
- package/dist/_node-chunks/chunk-APXRPW7A.js +11 -0
- package/dist/_node-chunks/{chunk-IZISFDKM.js → chunk-AVL7GUOZ.js} +161 -145
- package/dist/_node-chunks/chunk-BBU2FUPC.js +495 -0
- package/dist/_node-chunks/{chunk-Y2GH4XO7.js → chunk-BKND5XP2.js} +650 -9
- package/dist/_node-chunks/{chunk-2UG3IYCC.js → chunk-BSQB5B57.js} +6 -6
- package/dist/_node-chunks/{chunk-ULW4SLMN.js → chunk-C5OFHB3N.js} +34 -949
- package/dist/_node-chunks/{chunk-5RNOGGO6.js → chunk-CEYSYQLV.js} +6 -6
- package/dist/_node-chunks/{chunk-NIHZECYO.js → chunk-D5ADPGA4.js} +6 -6
- package/dist/_node-chunks/{chunk-3CLITGI2.js → chunk-DGWKJQ6G.js} +6 -6
- package/dist/_node-chunks/{chunk-EWXASIWR.js → chunk-ER3X3AQ7.js} +7 -7
- package/dist/_node-chunks/{chunk-JBCKN6P4.js → chunk-FB2BOL6I.js} +6 -6
- package/dist/_node-chunks/{chunk-4PK3LUHM.js → chunk-FEC5PGJO.js} +7 -7
- package/dist/_node-chunks/{chunk-NZ3GOT7V.js → chunk-FTYDKQCO.js} +6 -6
- package/dist/_node-chunks/chunk-FUG5LYKS.js +532 -0
- package/dist/_node-chunks/{chunk-ASJFOW6O.js → chunk-GGCOG7OV.js} +8 -8
- package/dist/_node-chunks/{chunk-GVSFRNWZ.js → chunk-GMKLTDKN.js} +6 -6
- package/dist/_node-chunks/{chunk-JE6JEGXA.js → chunk-GO3YSBPE.js} +9 -9
- package/dist/_node-chunks/chunk-GTXZNA2L.js +347 -0
- package/dist/_node-chunks/{chunk-XJSYJTBD.js → chunk-GYFR2JLS.js} +7 -7
- package/dist/_node-chunks/{chunk-HKUNJELN.js → chunk-IFAV3CER.js} +8 -8
- package/dist/_node-chunks/{chunk-IJL5JOLL.js → chunk-IRPQQARO.js} +7 -7
- package/dist/_node-chunks/{chunk-M2BRIUUP.js → chunk-IVAOJWPF.js} +7 -7
- package/dist/_node-chunks/{chunk-RHG33T7C.js → chunk-J3SM62J3.js} +10 -10
- package/dist/_node-chunks/{chunk-7TSL7D5D.js → chunk-LAIED5XU.js} +6 -6
- package/dist/_node-chunks/{chunk-RJUHZH32.js → chunk-LHNHFYK3.js} +6 -6
- package/dist/_node-chunks/{chunk-B6SKX4JF.js → chunk-LKITAODU.js} +7 -7
- package/dist/_node-chunks/{chunk-7LLQDMVS.js → chunk-MBIVTOJK.js} +6 -6
- package/dist/_node-chunks/{chunk-X6OWHTYE.js → chunk-MI7WBXWX.js} +6 -6
- package/dist/_node-chunks/{chunk-CDRLLNRQ.js → chunk-MW4OAPPD.js} +11 -11
- package/dist/_node-chunks/{chunk-ZMEGPR47.js → chunk-MXLHIEXC.js} +6 -6
- package/dist/_node-chunks/{chunk-RJXEPYEN.js → chunk-NFDQT7UW.js} +64 -21
- package/dist/_node-chunks/{chunk-CWD5A6NI.js → chunk-NIQSBBT2.js} +7 -7
- package/dist/_node-chunks/{chunk-MJ2UD7FU.js → chunk-NLLM4MDK.js} +7 -7
- package/dist/_node-chunks/{chunk-US7L4S72.js → chunk-NLNAIU4I.js} +9 -9
- package/dist/_node-chunks/{chunk-AANHLH5M.js → chunk-OJWUUSA4.js} +6 -6
- package/dist/_node-chunks/{chunk-CXLL2F6O.js → chunk-OPT5A55S.js} +25 -8
- package/dist/_node-chunks/{chunk-RQVK2TOI.js → chunk-OXT6T4AS.js} +14 -13
- package/dist/_node-chunks/{chunk-7DCDBICW.js → chunk-PQTEFQIJ.js} +13 -13
- package/dist/_node-chunks/{chunk-5GN5N22E.js → chunk-PXOD36TR.js} +131 -148
- package/dist/_node-chunks/{chunk-5J3O7EDY.js → chunk-PYVGF5F2.js} +6 -6
- package/dist/_node-chunks/{chunk-ICADUNQM.js → chunk-QHBQRPDP.js} +6 -6
- package/dist/_node-chunks/{chunk-VXDWOVWD.js → chunk-R7VDUSKY.js} +29843 -51588
- package/dist/_node-chunks/chunk-REIDJUVJ.js +2609 -0
- package/dist/_node-chunks/{chunk-KGOAOPKR.js → chunk-RNRGXAFV.js} +6 -6
- package/dist/_node-chunks/{chunk-6APBQVEX.js → chunk-S3NDLFYL.js} +7 -7
- package/dist/_node-chunks/chunk-SJXLINHV.js +57 -0
- package/dist/_node-chunks/chunk-SMBAR4G6.js +18 -0
- package/dist/_node-chunks/{chunk-R7CY5LX6.js → chunk-SRDKK3SG.js} +6 -6
- package/dist/_node-chunks/{chunk-G5OYQQDY.js → chunk-T6P2EJD2.js} +6 -6
- package/dist/_node-chunks/{chunk-7BVUZZIY.js → chunk-TAMTPVYZ.js} +7 -7
- package/dist/_node-chunks/{chunk-ILVD64RB.js → chunk-TKMXEHM4.js} +8 -8
- package/dist/_node-chunks/{chunk-XCGMRAV5.js → chunk-V5IMPC3J.js} +7 -7
- package/dist/_node-chunks/{chunk-2QTI45JU.js → chunk-VKRGTLQJ.js} +35 -35
- package/dist/_node-chunks/{chunk-QVMUIU7S.js → chunk-VZG3OKFO.js} +6 -6
- package/dist/_node-chunks/{chunk-2JSABFAM.js → chunk-W3KFVTWV.js} +10 -10
- package/dist/_node-chunks/{chunk-U4GKV7GZ.js → chunk-W7HY3ELZ.js} +10 -10
- package/dist/_node-chunks/{chunk-NKAUZU4C.js → chunk-WBCKO5LP.js} +6 -6
- package/dist/_node-chunks/{chunk-JVQYQTTM.js → chunk-WO4UEQI6.js} +42 -87
- package/dist/_node-chunks/{chunk-SRXCCL2O.js → chunk-XCJ2ZIQ4.js} +7 -7
- package/dist/_node-chunks/{chunk-MDKFZRYG.js → chunk-XH5CXH53.js} +8 -8
- package/dist/_node-chunks/{chunk-4TV3Z3S3.js → chunk-XICRXTTE.js} +6 -6
- package/dist/_node-chunks/{chunk-GSWBRZLU.js → chunk-XO54HM4P.js} +9 -17
- package/dist/_node-chunks/{chunk-URRTQ2QM.js → chunk-XSVOMORJ.js} +8 -8
- package/dist/_node-chunks/{chunk-WQ7PSP6H.js → chunk-XVOIYGTJ.js} +6 -6
- package/dist/_node-chunks/chunk-Y4W4B3E7.js +20 -0
- package/dist/_node-chunks/{chunk-HKQEE62W.js → chunk-YBG7HVP7.js} +8 -8
- package/dist/_node-chunks/chunk-YIAUHGY2.js +69 -0
- package/dist/_node-chunks/{chunk-GP5YLBNS.js → chunk-Z2ZTDQDY.js} +8 -8
- package/dist/_node-chunks/{chunk-GT5EHMNM.js → chunk-ZEYODVQT.js} +7 -7
- package/dist/_node-chunks/dist-C5QIQD3G.js +27 -0
- package/dist/_node-chunks/dist-NBRPZCHX.js +16 -0
- package/dist/_node-chunks/{local-runtime-4UNT5EZJ.js → local-runtime-YDAW5RJV.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-ZY6XLLA4.js → mdx-plugin-XLDET5LV.js} +2263 -130
- package/dist/_node-chunks/{monorepo-B65J4UFS.js → monorepo-NWMAHGOM.js} +12 -12
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-45ZTNWJS.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-4B6IZ7JD.js} +12 -12
- package/dist/_node-chunks/optimized-tests-EIPJR7HA.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-LOHSM7ID.js → pattern-copy-play-PJC4PO6A.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-EOAAURMG.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-22ZBI6K4.js → rehype-external-links-4CWXZ35U.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-ROZVEEFZ.js → rehype-slug-QZ2PWSJH.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-EDE2B34G.js → relaxed-limits-ZQR4ER7L.js} +12 -12
- package/dist/_node-chunks/{run-IR3BRDJV.js → run-BMXB2BW2.js} +17 -17
- package/dist/_node-chunks/{run-372BSBV5.js → run-U63AXEKZ.js} +273 -13
- package/dist/_node-chunks/session-id-HEW5JUNB.js +23 -0
- package/dist/_node-chunks/{setup-6TMCKUTA.js → setup-NCUTUBNN.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-QJBEVCKG.js → vitest.config.4.template-4XHF7XPS.js} +9 -9
- package/dist/actions/decorator.js +3 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +3 -2
- package/dist/addon-a11y/index.d.ts +3 -3
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +40 -37
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.d.ts +20 -1
- package/dist/addon-docs/blocks.js +150 -74
- package/dist/addon-docs/index.d.ts +19 -19
- package/dist/addon-docs/manager.js +6 -6
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +5 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +5 -2
- package/dist/addon-links/react/index.js +4 -1
- package/dist/addon-mcp/preset.js +29 -21
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +37 -82
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.d.ts +1 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-themes/index.d.ts +1 -1
- package/dist/addon-themes/index.js +2 -2
- package/dist/addon-themes/manager.js +4 -4
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-themes/preview.js +2 -2
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +21 -21
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +17 -17
- 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 +8 -8
- package/dist/addon-vitest/vitest-plugin/index.js +23 -23
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +3 -3
- package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/backgrounds/index.d.ts +1 -1
- package/dist/bin/core.js +65 -64
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +17 -16
- package/dist/builder-vite/index.js +17 -17
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.js +6 -6
- package/dist/{chunk-BTVrWliM.d.ts → chunk-BGhyFTJO.d.ts} +2 -2
- package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
- package/dist/{chunk-CwQKNaYL.d.ts → chunk-CNqjcOmK.d.ts} +1 -1
- package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.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-DEVFdzxR.d.ts → chunk-D0NUmzXp.d.ts} +1 -1
- package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
- package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DROZ9oel.d.ts} +50 -314
- package/dist/{chunk-gCX81nOr.d.ts → chunk-DgzPaTw9.d.ts} +3 -3
- package/dist/{chunk-Kt1tW-D1.d.ts → chunk-Dm-iHJ-s.d.ts} +3 -3
- package/dist/{chunk-C-bavsOH.d.ts → chunk-Dw_4ad2Y.d.ts} +6 -6
- package/dist/{chunk-C2p5r3Vt.d.ts → chunk-Fg1Fm__9.d.ts} +119 -29
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +44 -4954
- package/dist/cli/skills/content/index.d.ts +1 -1
- package/dist/cli/skills/content/index.js +2 -2
- 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 +17 -29
- package/dist/common/index.js +36 -42
- package/dist/components/index.d.ts +41 -238
- package/dist/components/index.js +2738 -8515
- package/dist/core-events/index.d.ts +4 -3
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +7 -6
- package/dist/core-server/index.js +665 -250
- package/dist/core-server/presets/common-manager.js +603 -1027
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +55 -48
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +5 -5
- package/dist/csf/index.js +55 -120
- package/dist/csf-tools/index.d.ts +17 -13
- package/dist/csf-tools/index.js +17 -15
- package/dist/docs-tools/index.js +2 -2
- package/dist/highlight/index.d.ts +1 -1
- package/dist/instrumenter/index.js +8 -6
- package/dist/manager/_manager-chunks/{globals-runtime-B0I9dSVs.js → globals-runtime-BSj0mCjE.js} +824 -727
- package/dist/manager/_manager-chunks/globals-runtime-BY3epqww.js +1807 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
- package/dist/manager/_manager-chunks/{globals-runtime-ZHrQFa3-.js → globals-runtime-Bs75QQ_I.js} +77 -553
- package/dist/manager/_manager-chunks/{globals-runtime-f5oIrim0.js → globals-runtime-Bu9eGDTe.js} +394 -189
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-BweHuXkK.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BQCkfH1B.js → globals-runtime-C5gK7HhH.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-C92M_Vnq.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-CA8AuIRT.js} +3 -145
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-CCTA-XPa.js} +410 -379
- package/dist/manager/_manager-chunks/{globals-runtime-CXoVXiJA.js → globals-runtime-CHjExYMv.js} +324 -118
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-DvV_TF3-.js} +638 -1731
- package/dist/manager/_manager-chunks/{globals-runtime-8HkdnU2F.js → globals-runtime-WZKaeKm9.js} +93 -2146
- package/dist/manager/_manager-chunks/globals-runtime-wjkxyMn0.js +5283 -0
- package/dist/manager/_manager-chunks/{runtime-DtyerpFe.js → runtime--hR2NZFd.js} +124 -80
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-B6NL14pz.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-BAsOe1C_.js} +10 -29
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-DcJBhKG9.js → runtime-CJQZFUUj.js} +200 -376
- package/dist/manager/_manager-chunks/{runtime-Bry1Biu7.js → runtime-CgRqs_SK.js} +989 -915
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-Dem2xJbS.js} +5 -147
- package/dist/manager/_manager-chunks/runtime-Dtbhxq5m.js +1158 -0
- package/dist/manager/_manager-chunks/runtime-DvB1axgp.js +197 -0
- package/dist/manager/_manager-chunks/runtime-EPerAEAs.js +294 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/globals.d.ts +12 -12
- package/dist/manager/globals.js +12 -12
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +72 -82
- package/dist/manager-errors.d.ts +1 -1
- package/dist/manager-errors.js +2 -2
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.d.ts +2 -2
- package/dist/mocking-utils/index.js +22 -17
- package/dist/mocking-utils/mocker-runtime.js +2 -2
- package/dist/nextjs-vite/index.d.ts +2 -2
- package/dist/nextjs-vite/index.js +4 -3
- package/dist/nextjs-vite/node/index.d.ts +2 -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/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +2 -3
- package/dist/nextjs-vite-plugin/index.js +15 -30
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +2 -2
- 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-DrTjJkPY.js → runtime-BJwGQok8.js} +77 -76
- 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-CxZK_Ln3.js → runtime-BZ4pNS3g.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-BgPhfM5P.js} +54 -8
- package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-BhSZ1Mwt.js} +335 -137
- package/dist/preview/_chunks/{runtime-BwSxqk3t.js → runtime-BsMjBzuq.js} +6 -16
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-DuHdxMFA.js → runtime-CkOhMcXf.js} +8 -8
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/globals.d.ts +10 -10
- package/dist/preview/globals.js +10 -10
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +11 -9
- package/dist/preview-errors.d.ts +1 -1
- package/dist/preview-errors.js +2 -2
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.d.ts +1 -1
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +12 -12
- package/dist/react-native/index.d.ts +11 -11
- package/dist/react-native/index.js +46 -231
- package/dist/react-native/metro/node.d.ts +2 -2
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +11 -11
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +22 -21
- package/dist/react-native/scripts/generate.d.ts +1 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-theming/index.d.ts +2 -58
- package/dist/react-native-theming/index.js +63 -2338
- package/dist/react-native-ui/index.d.ts +6 -7
- package/dist/react-native-ui/index.js +207 -624
- package/dist/react-native-ui-common/index.d.ts +2 -3
- package/dist/react-vite/index.d.ts +2 -2
- package/dist/react-vite/node/index.d.ts +3 -3
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.d.ts +69 -1
- package/dist/router/index.js +52 -10
- 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/index.js +2 -2
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +21 -21
- package/dist/telemetry/index.d.ts +3 -3
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +810 -575
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.d.ts +5 -5
- package/dist/theming/index.js +41 -16
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +5 -5
- package/dist/viewport/index.d.ts +1 -1
- package/package.json +36 -81
- package/template/nextjs-vite/cli/js/Button.stories.js +6 -6
- package/template/nextjs-vite/cli/js/Configure.mdx +100 -100
- package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
- package/template/nextjs-vite/cli/js/Page.jsx +2 -2
- package/template/nextjs-vite/cli/js/Page.stories.js +2 -2
- package/template/nextjs-vite/cli/ts/Button.stories.ts +6 -6
- package/template/nextjs-vite/cli/ts/Configure.mdx +84 -84
- package/template/nextjs-vite/cli/ts/Header.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.tsx +2 -2
- package/template/react/cli/js/Button.stories.js +6 -6
- package/template/react/cli/js/Header.stories.js +2 -2
- package/template/react/cli/js/Page.jsx +2 -2
- package/template/react/cli/js/Page.stories.js +2 -2
- package/template/react/cli/ts/Button.stories.ts +6 -6
- package/template/react/cli/ts/Header.stories.ts +2 -2
- package/template/react/cli/ts/Page.stories.ts +2 -2
- package/template/react/cli/ts/Page.tsx +2 -2
- package/template/react-vite/cli/js/Button.stories.js +6 -6
- package/template/react-vite/cli/js/Header.stories.js +2 -2
- package/template/react-vite/cli/js/Page.jsx +2 -2
- package/template/react-vite/cli/js/Page.stories.js +2 -2
- package/template/react-vite/cli/ts/Button.stories.ts +6 -6
- package/template/react-vite/cli/ts/Header.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.tsx +2 -2
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/dist/_browser-chunks/WithTooltip-GZSSFOG3.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +0 -108
- package/dist/_node-chunks/builder-manager-FPV2L36T.js +0 -1661
- package/dist/_node-chunks/chunk-356LV3NX.js +0 -36
- package/dist/_node-chunks/chunk-5BTU7UZ5.js +0 -1877
- package/dist/_node-chunks/chunk-5J3BMBMY.js +0 -51
- package/dist/_node-chunks/chunk-BCRWDMAU.js +0 -11
- package/dist/_node-chunks/chunk-BE6ULVPN.js +0 -662
- package/dist/_node-chunks/chunk-CSXS6LVI.js +0 -29
- package/dist/_node-chunks/chunk-DUOXRUVQ.js +0 -18
- package/dist/_node-chunks/chunk-FUYZNTIS.js +0 -23
- package/dist/_node-chunks/chunk-TB6Y6NSL.js +0 -3837
- package/dist/_node-chunks/chunk-VQEQ7ZLS.js +0 -4731
- package/dist/_node-chunks/chunk-WVCU34IS.js +0 -23
- package/dist/_node-chunks/chunk-Y2DEKWVE.js +0 -3008
- package/dist/_node-chunks/chunk-ZBAIFZNB.js +0 -5414
- package/dist/_node-chunks/dist-ZGSN23B7.js +0 -16
- package/dist/_node-chunks/globby-HWZL7XSQ.js +0 -2884
- package/dist/_node-chunks/jiti-GNDCTFYU.js +0 -3848
- package/dist/_node-chunks/lib-DI662U2R.js +0 -366
- package/dist/_node-chunks/optimized-tests-ZMNICF4R.js +0 -22
- package/dist/_node-chunks/postinstallAddon-NT5XE7IT.js +0 -20
- package/dist/_node-chunks/session-id-OO2WQF5N.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/chunk-BxWufQms.d.ts +0 -142
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
- package/dist/manager/_manager-chunks/runtime-DpgBAFGf.js +0 -22
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i135z88drol from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i135z88drol from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i135z88drol from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i135z88drol.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i135z88drol.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i135z88drol.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
|
postinstallAddon
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-76KKKLEE.js";
|
|
15
15
|
import {
|
|
16
16
|
version
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SMBAR4G6.js";
|
|
18
18
|
import {
|
|
19
19
|
leven
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-2WVLC5M2.js";
|
|
21
|
+
import "./chunk-TKMXEHM4.js";
|
|
22
|
+
import "./chunk-VZG3OKFO.js";
|
|
23
23
|
import {
|
|
24
24
|
require_picocolors
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FEC5PGJO.js";
|
|
26
|
+
import {
|
|
27
|
+
glob
|
|
28
|
+
} from "./chunk-6UASHVMR.js";
|
|
29
|
+
import "./chunk-C5OFHB3N.js";
|
|
26
30
|
import {
|
|
27
31
|
__commonJS,
|
|
28
32
|
__require,
|
|
29
33
|
__toESM
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WBCKO5LP.js";
|
|
31
35
|
|
|
32
36
|
// ../../node_modules/envinfo/dist/envinfo.js
|
|
33
37
|
var require_envinfo = __commonJS({
|
|
@@ -4435,6 +4439,245 @@ function isValidVersion(version2) {
|
|
|
4435
4439
|
return SemVer.valid(version2) || version2.match(/^\d+$/);
|
|
4436
4440
|
}
|
|
4437
4441
|
|
|
4442
|
+
// src/cli-commands/migrate.ts
|
|
4443
|
+
import { existsSync } from "node:fs";
|
|
4444
|
+
import { readFile, rename, writeFile } from "node:fs/promises";
|
|
4445
|
+
import { join, relative as relative2 } from "node:path";
|
|
4446
|
+
var IMPORT_RULES = [
|
|
4447
|
+
[/(['"])@storybook\/([a-z-]+)/g, "$1@aussieljk/forkbook/$2"],
|
|
4448
|
+
[/(['"])storybook\//g, "$1@aussieljk/forkbook/"]
|
|
4449
|
+
], ENV_RULE = [/(?<![A-Za-z0-9])(_*)STORYBOOK_/g, "$1FORKBOOK_"], NAME_RULES = [
|
|
4450
|
+
[/\.rnstorybook\b/g, ".rnforkbook"],
|
|
4451
|
+
[/(?<![\w-])\.storybook\b/g, ".forkbook"],
|
|
4452
|
+
[/storybook\.requires/g, "forkbook.requires"],
|
|
4453
|
+
[
|
|
4454
|
+
/@storybook\/react-native\/metro\/withStorybook/g,
|
|
4455
|
+
"@aussieljk/forkbook/react-native/metro/withForkbook"
|
|
4456
|
+
],
|
|
4457
|
+
[/withStorybook/g, "withForkbook"],
|
|
4458
|
+
[/\bStorybookConfig\b/g, "ForkbookConfig"]
|
|
4459
|
+
], SCRIPT_RULES = [
|
|
4460
|
+
[/\bsb-rn-get-stories\b/g, "forkbook rn-stories"],
|
|
4461
|
+
[/(?<![\w@/.-])storybook(?=[\s:]|$)/g, "forkbook"]
|
|
4462
|
+
], MOVES = [
|
|
4463
|
+
[".storybook", ".forkbook"],
|
|
4464
|
+
[".rnstorybook", ".rnforkbook"],
|
|
4465
|
+
[".rnforkbook/storybook.requires.ts", ".rnforkbook/forkbook.requires.ts"],
|
|
4466
|
+
[".rnforkbook/storybook.requires.js", ".rnforkbook/forkbook.requires.js"]
|
|
4467
|
+
], CSS_RULE = [/(?<![\w-])(--)?sb-(?=[a-z])/g, "$1fb-"], SOURCE_GLOBS = ["**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts,mdx,css,scss,sass,less,html}", ".env*"], IGNORE = [
|
|
4468
|
+
"**/node_modules/**",
|
|
4469
|
+
"**/dist/**",
|
|
4470
|
+
"**/build/**",
|
|
4471
|
+
"**/.next/**",
|
|
4472
|
+
"**/storybook-static/**"
|
|
4473
|
+
], isStorybookPackage = (name) => name === "storybook" || name.startsWith("@storybook/");
|
|
4474
|
+
function apply(text, rules) {
|
|
4475
|
+
return rules.reduce((out, [pattern, replacement]) => out.replace(pattern, replacement), text);
|
|
4476
|
+
}
|
|
4477
|
+
function migrateSource(text) {
|
|
4478
|
+
return apply(text, [NAME_RULES[3], ...IMPORT_RULES, ...NAME_RULES, ENV_RULE, CSS_RULE]);
|
|
4479
|
+
}
|
|
4480
|
+
function installCommand(cwd) {
|
|
4481
|
+
return existsSync(join(cwd, "pnpm-lock.yaml")) ? "pnpm install" : existsSync(join(cwd, "yarn.lock")) ? "yarn install" : existsSync(join(cwd, "package-lock.json")) ? "npm install" : "bun install";
|
|
4482
|
+
}
|
|
4483
|
+
async function migrate({
|
|
4484
|
+
cwd = process.cwd(),
|
|
4485
|
+
dryRun = !1,
|
|
4486
|
+
version: version2
|
|
4487
|
+
}) {
|
|
4488
|
+
let changedFiles = [], removedPackages = [], packageJsonPath = join(cwd, "package.json"), packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
|
|
4489
|
+
for (let field of [
|
|
4490
|
+
"dependencies",
|
|
4491
|
+
"devDependencies",
|
|
4492
|
+
"peerDependencies",
|
|
4493
|
+
"optionalDependencies"
|
|
4494
|
+
]) {
|
|
4495
|
+
let deps = packageJson[field];
|
|
4496
|
+
for (let name of Object.keys(deps ?? {}))
|
|
4497
|
+
deps && isStorybookPackage(name) && (delete deps[name], removedPackages.push(name));
|
|
4498
|
+
}
|
|
4499
|
+
packageJson.devDependencies = {
|
|
4500
|
+
...packageJson.devDependencies,
|
|
4501
|
+
"@aussieljk/forkbook": `^${version2}`
|
|
4502
|
+
}, packageJson.scripts && (packageJson.scripts = Object.fromEntries(
|
|
4503
|
+
Object.entries(packageJson.scripts).map(([name, script]) => [
|
|
4504
|
+
apply(name, SCRIPT_RULES),
|
|
4505
|
+
apply(script, [ENV_RULE, ...NAME_RULES, ...SCRIPT_RULES])
|
|
4506
|
+
])
|
|
4507
|
+
));
|
|
4508
|
+
let before = await readFile(packageJsonPath, "utf8"), after = `${JSON.stringify(packageJson, null, 2)}
|
|
4509
|
+
`;
|
|
4510
|
+
after !== before && (changedFiles.push("package.json"), dryRun || await writeFile(packageJsonPath, after));
|
|
4511
|
+
let moved = [];
|
|
4512
|
+
for (let [from, to] of MOVES) {
|
|
4513
|
+
let source = join(cwd, dryRun ? from.replace(".rnforkbook/", ".rnstorybook/") : from);
|
|
4514
|
+
existsSync(source) && !existsSync(join(cwd, to)) && (moved.push(`${from} -> ${to}`), dryRun || await rename(source, join(cwd, to)));
|
|
4515
|
+
}
|
|
4516
|
+
let files = await glob(SOURCE_GLOBS, { cwd, dot: !0, ignore: IGNORE, absolute: !0 });
|
|
4517
|
+
for (let file of files.sort()) {
|
|
4518
|
+
let text = await readFile(file, "utf8"), next = migrateSource(text);
|
|
4519
|
+
next !== text && (changedFiles.push(relative2(cwd, file)), dryRun || await writeFile(file, next));
|
|
4520
|
+
}
|
|
4521
|
+
return {
|
|
4522
|
+
moved,
|
|
4523
|
+
removedPackages,
|
|
4524
|
+
addedPackage: `@aussieljk/forkbook@^${version2}`,
|
|
4525
|
+
changedFiles,
|
|
4526
|
+
installCommand: installCommand(cwd)
|
|
4527
|
+
};
|
|
4528
|
+
}
|
|
4529
|
+
|
|
4530
|
+
// src/cli-commands/pages.ts
|
|
4531
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
4532
|
+
import { mkdir, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
4533
|
+
import { dirname, join as join2, relative as relative3 } from "node:path";
|
|
4534
|
+
var HELPER_FILE = "page.tsx";
|
|
4535
|
+
function routeFromPage(pagePath) {
|
|
4536
|
+
return `/${dirname(pagePath).split("/").filter((segment) => segment !== "." && !/^\(.*\)$/.test(segment) && !segment.startsWith("@")).join("/")}`;
|
|
4537
|
+
}
|
|
4538
|
+
function isRedirectOnly(source) {
|
|
4539
|
+
return /\b(redirect|permanentRedirect)\s*\(/.test(source) && !/<[A-Za-z]/.test(source);
|
|
4540
|
+
}
|
|
4541
|
+
var hasStaticParams = (source) => /export\s+(async\s+)?function\s+generateStaticParams\b|export\s+(const|let)\s+generateStaticParams\b/.test(
|
|
4542
|
+
source
|
|
4543
|
+
), importPath = (from, to) => {
|
|
4544
|
+
let path = relative3(dirname(from), to).replace(/\.tsx?$/, "");
|
|
4545
|
+
return path.startsWith(".") ? path : `./${path}`;
|
|
4546
|
+
};
|
|
4547
|
+
function pageStory({
|
|
4548
|
+
storyPath,
|
|
4549
|
+
helperPath,
|
|
4550
|
+
route,
|
|
4551
|
+
withStaticParams
|
|
4552
|
+
}) {
|
|
4553
|
+
let title = route === "/" ? "index" : route.slice(1), name = title.split("/").at(-1), pageImport = withStaticParams ? "Page, { generateStaticParams }" : "Page", options = withStaticParams ? ", { generateStaticParams }" : "";
|
|
4554
|
+
return `import type { Meta, StoryObj } from '@aussieljk/forkbook/nextjs-vite';
|
|
4555
|
+
|
|
4556
|
+
import { page } from '${importPath(storyPath, helperPath)}';
|
|
4557
|
+
import ${pageImport} from './page';
|
|
4558
|
+
|
|
4559
|
+
const meta = {
|
|
4560
|
+
title: ${JSON.stringify(title)},
|
|
4561
|
+
tags: ['!autodocs'],
|
|
4562
|
+
...page(${JSON.stringify(route)}, Page${options}),
|
|
4563
|
+
} satisfies Meta;
|
|
4564
|
+
|
|
4565
|
+
export default meta;
|
|
4566
|
+
|
|
4567
|
+
export const Default: StoryObj = { name: ${JSON.stringify(name)} };
|
|
4568
|
+
`;
|
|
4569
|
+
}
|
|
4570
|
+
function pageHelper({
|
|
4571
|
+
helperPath,
|
|
4572
|
+
layoutPath
|
|
4573
|
+
}) {
|
|
4574
|
+
return `import { Children, Fragment, cloneElement, isValidElement } from 'react';
|
|
4575
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
4576
|
+
|
|
4577
|
+
${layoutPath ? `import RootLayout from '${importPath(helperPath, layoutPath)}';
|
|
4578
|
+
` : ""}
|
|
4579
|
+
type Params = Record<string, string | string[]>;
|
|
4580
|
+
|
|
4581
|
+
interface PageOptions {
|
|
4582
|
+
generateStaticParams?: () => Params[] | Promise<Params[]>;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
const SLOT = '__forkbook_page_slot__';
|
|
4586
|
+
|
|
4587
|
+
const isAsync = (component: unknown) =>
|
|
4588
|
+
Object.prototype.toString.call(component) === '[object AsyncFunction]';
|
|
4589
|
+
|
|
4590
|
+
/** Puts \`params\` into the dynamic segments of a route: \`/blog/[slug]\` to \`/blog/hello\`. */
|
|
4591
|
+
function fillRoute(route: string, params: Params) {
|
|
4592
|
+
return route.replace(/\\[{1,2}(?:\\.\\.\\.)?([^\\]]+)\\]{1,2}/g, (_, key: string) => {
|
|
4593
|
+
const value = params[key];
|
|
4594
|
+
return Array.isArray(value) ? value.join('/') : (value ?? key);
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4598
|
+
/** Keeps the layout chrome (header, footer) and removes \`<html>\` and \`<body>\`. */
|
|
4599
|
+
function chrome(node: ReactNode, page: ReactNode): ReactNode {
|
|
4600
|
+
return Children.map(node, (child) => {
|
|
4601
|
+
if (!isValidElement<{ children?: ReactNode }>(child)) {
|
|
4602
|
+
return child;
|
|
4603
|
+
}
|
|
4604
|
+
if (child.type === SLOT) {
|
|
4605
|
+
return page;
|
|
4606
|
+
}
|
|
4607
|
+
const children = chrome(child.props.children, page);
|
|
4608
|
+
if (child.type === 'html' || child.type === 'body') {
|
|
4609
|
+
return <Fragment key={child.key}>{children}</Fragment>;
|
|
4610
|
+
}
|
|
4611
|
+
return child.props.children === undefined ? child : cloneElement(child, undefined, children);
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4615
|
+
/** Makes the meta for a story of a Next.js App Router page. Written by \`forkbook init --pages\`. */
|
|
4616
|
+
export function page(route: string, Page: ComponentType<any>, options: PageOptions = {}) {
|
|
4617
|
+
const Layout: ComponentType<any> | undefined = ${layoutPath ? "RootLayout" : "undefined"};
|
|
4618
|
+
return {
|
|
4619
|
+
component: Page,
|
|
4620
|
+
parameters: {
|
|
4621
|
+
layout: 'fullscreen',
|
|
4622
|
+
nextjs: { appDirectory: true, navigation: { pathname: route, segments: [] } },
|
|
4623
|
+
},
|
|
4624
|
+
loaders: [
|
|
4625
|
+
async (context: any) => {
|
|
4626
|
+
const params = (await options.generateStaticParams?.())?.[0] ?? {};
|
|
4627
|
+
// The Next.js decorator reads the navigation parameters when it renders, after the loaders.
|
|
4628
|
+
context.parameters.nextjs.navigation = {
|
|
4629
|
+
pathname: fillRoute(route, params),
|
|
4630
|
+
segments: Object.entries(params),
|
|
4631
|
+
};
|
|
4632
|
+
const props = { params: Promise.resolve(params), searchParams: Promise.resolve({}) };
|
|
4633
|
+
const pageNode = isAsync(Page) ? await Page(props) : <Page {...props} />;
|
|
4634
|
+
const slot = <SLOT />;
|
|
4635
|
+
const layoutNode = Layout
|
|
4636
|
+
? isAsync(Layout)
|
|
4637
|
+
? await (Layout as any)({ children: slot, params: props.params })
|
|
4638
|
+
: (Layout as any)({ children: slot, params: props.params })
|
|
4639
|
+
: slot;
|
|
4640
|
+
return { pageNode, layoutNode };
|
|
4641
|
+
},
|
|
4642
|
+
],
|
|
4643
|
+
render: (_args: unknown, { loaded }: any) => chrome(loaded.layoutNode, loaded.pageNode),
|
|
4644
|
+
};
|
|
4645
|
+
}
|
|
4646
|
+
`;
|
|
4647
|
+
}
|
|
4648
|
+
async function pages({
|
|
4649
|
+
cwd = process.cwd(),
|
|
4650
|
+
dryRun = !1
|
|
4651
|
+
} = {}) {
|
|
4652
|
+
let appDir = ["app", "src/app"].find((dir) => existsSync2(join2(cwd, dir)));
|
|
4653
|
+
if (!appDir)
|
|
4654
|
+
throw new Error(
|
|
4655
|
+
"No `app` or `src/app` folder found. This command is for the Next.js App Router."
|
|
4656
|
+
);
|
|
4657
|
+
let result = { written: [], skipped: [] }, helperFile = join2(".forkbook", HELPER_FILE), helperPath = join2(cwd, helperFile), layoutPath = (await glob(`${appDir}/layout.{tsx,jsx,ts,js}`, { cwd, absolute: !0 }))[0], pageFiles = await glob(`${appDir}/**/page.{tsx,jsx}`, {
|
|
4658
|
+
cwd,
|
|
4659
|
+
ignore: ["**/node_modules/**"]
|
|
4660
|
+
});
|
|
4661
|
+
for (let pageFile of pageFiles.sort()) {
|
|
4662
|
+
let storyFile = join2(cwd, dirname(pageFile), "page.stories.tsx");
|
|
4663
|
+
if ((await glob("page.stories.*", { cwd: join2(cwd, dirname(pageFile)) })).length > 0)
|
|
4664
|
+
continue;
|
|
4665
|
+
let source = await readFile2(join2(cwd, pageFile), "utf8");
|
|
4666
|
+
if (isRedirectOnly(source)) {
|
|
4667
|
+
result.skipped.push(pageFile);
|
|
4668
|
+
continue;
|
|
4669
|
+
}
|
|
4670
|
+
let story = pageStory({
|
|
4671
|
+
storyPath: storyFile,
|
|
4672
|
+
helperPath,
|
|
4673
|
+
route: routeFromPage(relative3(appDir, pageFile)),
|
|
4674
|
+
withStaticParams: hasStaticParams(source)
|
|
4675
|
+
});
|
|
4676
|
+
result.written.push(relative3(cwd, storyFile)), dryRun || await writeFile2(storyFile, story);
|
|
4677
|
+
}
|
|
4678
|
+
return result.written.length > 0 && !existsSync2(helperPath) && (result.helper = helperFile, dryRun || (await mkdir(dirname(helperPath), { recursive: !0 }), await writeFile2(helperPath, pageHelper({ helperPath, layoutPath })))), result;
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4438
4681
|
// src/cli-commands/bin/run.ts
|
|
4439
4682
|
addToGlobalContext("cliVersion", versions["@aussieljk/forkbook"]);
|
|
4440
4683
|
var handleCommandFailure = (logFilePath) => async (error) => {
|
|
@@ -4506,6 +4749,23 @@ command("remove <addon>").description("Remove an addon from your Forkbook").addO
|
|
|
4506
4749
|
}), await telemetry("remove", { addon: addonName, source: "cli" }), logger.outro("Done!");
|
|
4507
4750
|
}).catch(handleCommandFailure(options.logfile))
|
|
4508
4751
|
);
|
|
4752
|
+
command("migrate").description("Move a Storybook project to Forkbook").option("--dry-run", "Print the changes, but do not write them").action(async (options) => {
|
|
4753
|
+
let result = await migrate({ dryRun: options.dryRun, version: String(version) }), verb = options.dryRun ? "Would change" : "Changed";
|
|
4754
|
+
logger.log(`Removed packages: ${result.removedPackages.join(", ") || "none"}`), logger.log(`Added package: ${result.addedPackage}`);
|
|
4755
|
+
for (let move of result.moved)
|
|
4756
|
+
logger.log(`${options.dryRun ? "Would move" : "Moved"} ${move}`);
|
|
4757
|
+
logger.log(`${verb} ${result.changedFiles.length} files:`);
|
|
4758
|
+
for (let file of result.changedFiles)
|
|
4759
|
+
logger.log(` ${file}`);
|
|
4760
|
+
logger.log(`Now run ${import_picocolors.default.bold(result.installCommand)}, then read the diff.`);
|
|
4761
|
+
});
|
|
4762
|
+
command("pages").description("Write a story for each Next.js App Router page (also `init --pages`)").option("--dry-run", "Print the files, but do not write them").action(async (options) => {
|
|
4763
|
+
let result = await pages({ dryRun: options.dryRun });
|
|
4764
|
+
for (let file of [result.helper, ...result.written].filter(Boolean))
|
|
4765
|
+
logger.log(`${options.dryRun ? "Would write" : "Wrote"} ${file}`);
|
|
4766
|
+
for (let file of result.skipped)
|
|
4767
|
+
logger.log(`Skipped ${file} (redirect only)`);
|
|
4768
|
+
});
|
|
4509
4769
|
command("info").description("Prints debugging information about the local environment").action(async () => {
|
|
4510
4770
|
logger.log(import_picocolors.default.bold(`
|
|
4511
4771
|
Storybook Environment Info:`));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i135z88drol from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i135z88drol from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i135z88drol from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i135z88drol.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i135z88drol.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i135z88drol.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
SESSION_TIMEOUT,
|
|
14
|
+
getSessionId,
|
|
15
|
+
resetSessionIdForTest
|
|
16
|
+
} from "./chunk-V5IMPC3J.js";
|
|
17
|
+
import "./chunk-3NST2GUZ.js";
|
|
18
|
+
import "./chunk-WBCKO5LP.js";
|
|
19
|
+
export {
|
|
20
|
+
SESSION_TIMEOUT,
|
|
21
|
+
getSessionId,
|
|
22
|
+
resetSessionIdForTest
|
|
23
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i135z88drol from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i135z88drol from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i135z88drol from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i135z88drol.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i135z88drol.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i135z88drol.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
|
getTypeImportSource
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-XICRXTTE.js";
|
|
15
|
+
import "./chunk-WBCKO5LP.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/skills/content/setup-prompts/setup.ts
|
|
18
18
|
import { getVitestStorybookRunCommand } from "@aussieljk/forkbook/internal/common";
|
|
@@ -217,7 +217,7 @@ function instructions(projectInfo) {
|
|
|
217
217
|
- If a component needs per-story decorators (beyond the global ones), add them in the meta.
|
|
218
218
|
- Do NOT use \`any\` types. Use the component's prop types for type safety.
|
|
219
219
|
|
|
220
|
-
Reference: https://
|
|
220
|
+
Reference: https://forkbook.ljk.dev/docs/writing-stories
|
|
221
221
|
|
|
222
222
|
### Step 4: Verify each story with Vitest
|
|
223
223
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i135z88drol from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i135z88drol from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i135z88drol from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i135z88drol.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i135z88drol.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i135z88drol.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 "./chunk-
|
|
12
|
+
import "./chunk-WBCKO5LP.js";
|
|
13
13
|
|
|
14
14
|
// raw:../../assets/addon-vitest/templates/vitest.config.4.template.ts
|
|
15
15
|
var vitest_config_4_template_default = `import path from 'node:path';
|
|
@@ -24,7 +24,7 @@ import { playwright } from '@vitest/browser-playwright';
|
|
|
24
24
|
const dirname =
|
|
25
25
|
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
26
26
|
|
|
27
|
-
// More info at: https://
|
|
27
|
+
// More info at: https://forkbook.ljk.dev/docs/writing-tests/integrations/vitest-addon
|
|
28
28
|
export default defineConfig({
|
|
29
29
|
test: {
|
|
30
30
|
projects: [
|
|
@@ -32,7 +32,7 @@ export default defineConfig({
|
|
|
32
32
|
extends: true,
|
|
33
33
|
plugins: [
|
|
34
34
|
// The plugin will run tests for the stories defined in your Forkbook config
|
|
35
|
-
// See options at: https://
|
|
35
|
+
// See options at: https://forkbook.ljk.dev/docs/writing-tests/integrations/vitest-addon#storybooktest
|
|
36
36
|
storybookTest({ configDir: path.join(dirname, 'CONFIG_DIR') }),
|
|
37
37
|
],
|
|
38
38
|
test: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
actions
|
|
3
|
-
} from "../_browser-chunks/chunk-
|
|
3
|
+
} from "../_browser-chunks/chunk-FRAOQJDI.js";
|
|
4
4
|
import {
|
|
5
5
|
PARAM_KEY
|
|
6
|
-
} from "../_browser-chunks/chunk-
|
|
6
|
+
} from "../_browser-chunks/chunk-N5WQGLI7.js";
|
|
7
|
+
import "../_browser-chunks/chunk-6AKCRYVX.js";
|
|
7
8
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
8
9
|
|
|
9
10
|
// src/actions/decorator.ts
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const ADDON_ID = "@aussieljk/forkbook/actions";
|
|
|
6
6
|
declare const PANEL_ID = "@aussieljk/forkbook/actions/panel";
|
|
7
7
|
declare const EVENT_ID = "@aussieljk/forkbook/actions/action-event";
|
|
8
8
|
declare const CLEAR_ID = "@aussieljk/forkbook/actions/action-clear";
|
|
9
|
-
declare const CYCLIC_KEY = "$
|
|
9
|
+
declare const CYCLIC_KEY = "$___forkbook.isCyclic";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region .dts-emit/code/core/src/actions/models/ActionOptions.d.ts
|
|
12
12
|
interface Options {
|
package/dist/actions/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
actions,
|
|
5
5
|
config,
|
|
6
6
|
configureActions
|
|
7
|
-
} from "../_browser-chunks/chunk-
|
|
7
|
+
} from "../_browser-chunks/chunk-FRAOQJDI.js";
|
|
8
8
|
import {
|
|
9
9
|
ADDON_ID,
|
|
10
10
|
CLEAR_ID,
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
EVENT_ID,
|
|
13
13
|
PANEL_ID,
|
|
14
14
|
PARAM_KEY
|
|
15
|
-
} from "../_browser-chunks/chunk-
|
|
15
|
+
} from "../_browser-chunks/chunk-N5WQGLI7.js";
|
|
16
|
+
import "../_browser-chunks/chunk-6AKCRYVX.js";
|
|
16
17
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
17
18
|
export {
|
|
18
19
|
ADDON_ID,
|
|
@@ -10,7 +10,7 @@ interface A11yParameters$1 {
|
|
|
10
10
|
/**
|
|
11
11
|
* Accessibility configuration
|
|
12
12
|
*
|
|
13
|
-
* @see https://
|
|
13
|
+
* @see https://forkbook.ljk.dev/docs/writing-tests/accessibility-testing
|
|
14
14
|
*/
|
|
15
15
|
a11y?: A11yParameters;
|
|
16
16
|
}
|
|
@@ -18,14 +18,14 @@ interface A11yGlobals {
|
|
|
18
18
|
/**
|
|
19
19
|
* Accessibility configuration
|
|
20
20
|
*
|
|
21
|
-
* @see https://
|
|
21
|
+
* @see https://forkbook.ljk.dev/docs/writing-tests/accessibility-testing
|
|
22
22
|
*/
|
|
23
23
|
a11y?: {
|
|
24
24
|
/**
|
|
25
25
|
* Prevent the addon from executing automated accessibility checks upon visiting a story. You
|
|
26
26
|
* can still trigger the checks from the addon panel.
|
|
27
27
|
*
|
|
28
|
-
* @see https://
|
|
28
|
+
* @see https://forkbook.ljk.dev/docs/writing-tests/accessibility-testing#disable-automated-checks
|
|
29
29
|
*/
|
|
30
30
|
manual?: boolean;
|
|
31
31
|
};
|
package/dist/addon-a11y/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
preview_exports
|
|
3
|
-
} from "../_browser-chunks/chunk-
|
|
3
|
+
} from "../_browser-chunks/chunk-ZHKZKFY4.js";
|
|
4
4
|
import "../_browser-chunks/chunk-2JT76G3E.js";
|
|
5
5
|
import {
|
|
6
6
|
PARAM_KEY
|
|
7
7
|
} from "../_browser-chunks/chunk-OZZPSYQR.js";
|
|
8
|
+
import "../_browser-chunks/chunk-6AKCRYVX.js";
|
|
8
9
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
9
10
|
|
|
10
11
|
// src/addon-a11y/index.ts
|