@aussieljk/forkbook 0.0.1-8 → 0.0.1-9
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/assets/server/template.ejs +13 -0
- package/dist/_browser-chunks/{Color-ZG7LKYDZ.js → Color-GEC6HRBY.js} +2 -2
- package/dist/_browser-chunks/{WithTooltip-YZ36EZ4X.js → WithTooltip-CS3HPMGA.js} +6 -4
- package/dist/_browser-chunks/{chunk-MZVQEZOB.js → chunk-6QEYM2YW.js} +24 -24
- package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
- package/dist/_browser-chunks/{chunk-WVF42CP2.js → chunk-DNJ3OSLB.js} +46 -52
- package/dist/_browser-chunks/{chunk-E47B5255.js → chunk-IFADVEQE.js} +63 -543
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/{chunk-YYWKZ7O3.js → chunk-NTUHL5NS.js} +5 -2
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/{chunk-SK6S7ZXD.js → chunk-PFCGVFP6.js} +3 -3
- package/dist/_browser-chunks/{chunk-H4ZHAXN3.js → chunk-V5U45XXZ.js} +1 -1
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/{chunk-DAUHYZUB.js → chunk-XTQCLWVH.js} +255 -494
- package/dist/_browser-chunks/{chunk-SFMQDIN2.js → chunk-ZHKZKFY4.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-SRP2RPCT.js → attached-runtime-OI5IEIR7.js} +29 -29
- package/dist/_node-chunks/builder-manager-JEIVVV43.js +1139 -0
- package/dist/_node-chunks/{chunk-A73YRJPA.js → chunk-2FWH7OUZ.js} +6 -6
- package/dist/_node-chunks/{chunk-DGA2Q7TE.js → chunk-2QPSOAHI.js} +6 -6
- package/dist/_node-chunks/{chunk-QQKVXB5Q.js → chunk-2T2S3YYS.js} +6 -6
- package/dist/_node-chunks/{chunk-7GLNBVQO.js → chunk-35JF5BS4.js} +6 -6
- package/dist/_node-chunks/{chunk-JB5Q4WGX.js → chunk-3I43FMZC.js} +7 -7
- package/dist/_node-chunks/{chunk-WF7RDUU7.js → chunk-3R57KO3F.js} +10 -10
- package/dist/_node-chunks/chunk-4CWEAS2M.js +11 -0
- package/dist/_node-chunks/{chunk-TLB2LNUO.js → chunk-4HYKKRBM.js} +8 -8
- package/dist/_node-chunks/{chunk-YBRV5FIK.js → chunk-4W6HJYYC.js} +7 -7
- package/dist/_node-chunks/{chunk-VV6CPF3T.js → chunk-57BBVTHQ.js} +6 -6
- package/dist/_node-chunks/{chunk-MGFH4KGP.js → chunk-5MDE2KCS.js} +6 -6
- package/dist/_node-chunks/{chunk-TBLZESXE.js → chunk-5NCRCPYK.js} +6 -6
- package/dist/_node-chunks/{chunk-QEDRYWP7.js → chunk-6O6BHNDO.js} +6 -6
- package/dist/_node-chunks/chunk-7PZDRNVT.js +19 -0
- package/dist/_node-chunks/{chunk-M74NU6PU.js → chunk-7X5WP3UJ.js} +6 -6
- package/dist/_node-chunks/{chunk-DSWCMXKR.js → chunk-7XYURNT2.js} +10 -10
- package/dist/_node-chunks/{chunk-SNQKCFKN.js → chunk-AONRQAQP.js} +6 -6
- package/dist/_node-chunks/chunk-ASFRQHZH.js +20 -0
- package/dist/_node-chunks/{chunk-54WGE5OK.js → chunk-AUY6EZPA.js} +8 -8
- package/dist/_node-chunks/{chunk-I5Y7NDAM.js → chunk-BCFTMBAH.js} +7 -7
- package/dist/_node-chunks/{chunk-6GBMB2E4.js → chunk-BEHNZYWF.js} +8 -8
- package/dist/_node-chunks/chunk-BZNVRJ6H.js +25 -0
- package/dist/_node-chunks/chunk-CHLWJ5F5.js +20 -0
- package/dist/_node-chunks/{chunk-D4IL5V6A.js → chunk-CMDR42D7.js} +6 -6
- package/dist/_node-chunks/{chunk-LF7EC235.js → chunk-CP646EXE.js} +8 -8
- package/dist/_node-chunks/chunk-DDRGY4RJ.js +57 -0
- package/dist/_node-chunks/{chunk-UCBUYT7S.js → chunk-DMDIIGJ4.js} +7 -7
- package/dist/_node-chunks/{chunk-DADJTKJT.js → chunk-DTZELAXT.js} +7 -7
- package/dist/_node-chunks/{chunk-6YDXCU32.js → chunk-ELMANXC3.js} +6 -6
- package/dist/_node-chunks/{chunk-VTLGMRU5.js → chunk-ELXK72IJ.js} +6 -6
- package/dist/_node-chunks/{chunk-GXSB54NU.js → chunk-F6RXCQF6.js} +6 -6
- package/dist/_node-chunks/{chunk-4T3WPVSQ.js → chunk-FKQHIPUA.js} +6 -6
- package/dist/_node-chunks/{chunk-2WPUJ7UM.js → chunk-FPWDVE2V.js} +7 -7
- package/dist/_node-chunks/{chunk-HNMHTOKI.js → chunk-FVJLKXNS.js} +23 -23
- package/dist/_node-chunks/{chunk-ICGRYYV7.js → chunk-GABGLW7D.js} +7 -7
- package/dist/_node-chunks/{chunk-BPMXWGDX.js → chunk-GOZDHTIK.js} +6 -6
- package/dist/_node-chunks/{chunk-3NXJBXBF.js → chunk-GPSR4MZL.js} +14 -14
- package/dist/_node-chunks/{chunk-T62LXT34.js → chunk-GZ2YC6US.js} +6 -6
- package/dist/_node-chunks/chunk-H5HD6EW2.js +28 -0
- package/dist/_node-chunks/{chunk-3KY2GA5X.js → chunk-I6ANUF4J.js} +7 -7
- package/dist/_node-chunks/{chunk-CZDEJ7DD.js → chunk-ICIP5FB5.js} +9 -9
- package/dist/_node-chunks/{chunk-CL4T6DGA.js → chunk-IK35TZRH.js} +7 -7
- package/dist/_node-chunks/{chunk-CHPKBTH7.js → chunk-IOJ6NYLD.js} +7 -7
- package/dist/_node-chunks/{chunk-77YIWZPS.js → chunk-IWEZ5KSJ.js} +7 -7
- package/dist/_node-chunks/{chunk-UBEILYLL.js → chunk-JOOZKSBS.js} +7 -7
- package/dist/_node-chunks/{chunk-I26RWAW3.js → chunk-JXVJAA3U.js} +6 -6
- package/dist/_node-chunks/{chunk-GUKZDREX.js → chunk-K6VX4GUH.js} +8 -8
- package/dist/_node-chunks/{chunk-VPGX2PAB.js → chunk-L7US6VLX.js} +6 -6
- package/dist/_node-chunks/{chunk-JCLP42A7.js → chunk-LKMHU2P3.js} +7 -7
- package/dist/_node-chunks/{chunk-IVU4D6LF.js → chunk-LMWS7NDR.js} +7 -7
- package/dist/_node-chunks/{chunk-M3F5R2JO.js → chunk-LPDII6WJ.js} +6 -6
- package/dist/_node-chunks/{chunk-RR3WLRNQ.js → chunk-MBJ2CUVU.js} +7 -7
- package/dist/_node-chunks/{chunk-KQBTXUT5.js → chunk-MGXABKCL.js} +6 -6
- package/dist/_node-chunks/{chunk-BY65FGKD.js → chunk-MHLTWQGQ.js} +8 -8
- package/dist/_node-chunks/{chunk-7YBOQWWR.js → chunk-MMMKY3DA.js} +8 -8
- package/dist/_node-chunks/{chunk-NV6HM53D.js → chunk-MXNT3HBF.js} +6 -6
- package/dist/_node-chunks/{chunk-LPLXO4HE.js → chunk-O7WMRMVJ.js} +6 -6
- package/dist/_node-chunks/{chunk-BLAPFOIX.js → chunk-OPLD7FOE.js} +6 -6
- package/dist/_node-chunks/{chunk-XTCOGCTP.js → chunk-P4CWOISW.js} +7 -7
- package/dist/_node-chunks/{chunk-IFF53QVX.js → chunk-POXIO453.js} +7 -7
- package/dist/_node-chunks/{chunk-4U5ZQZJ4.js → chunk-PRTTCG3N.js} +6 -6
- package/dist/_node-chunks/{chunk-27R37QFW.js → chunk-QE3NKWUX.js} +7 -7
- package/dist/_node-chunks/{chunk-LYMYDMEK.js → chunk-QMERCCIQ.js} +6 -6
- package/dist/_node-chunks/{chunk-4CPTSXU6.js → chunk-QVF2NJK4.js} +10 -10
- package/dist/_node-chunks/{chunk-Y2HWZ262.js → chunk-R33EXC6B.js} +12 -12
- package/dist/_node-chunks/{chunk-ZKS2H56J.js → chunk-R3BJJGEG.js} +6 -6
- package/dist/_node-chunks/chunk-REDMAZRP.js +18 -0
- package/dist/_node-chunks/{chunk-DVSKRIH3.js → chunk-RJV4QWRP.js} +7 -7
- package/dist/_node-chunks/{chunk-3KKSPEAE.js → chunk-RXEMA2TT.js} +6 -6
- package/dist/_node-chunks/{chunk-XGMO4SW2.js → chunk-TKOUTJWX.js} +6 -6
- package/dist/_node-chunks/{chunk-LSKOVF6F.js → chunk-TRZWEDUE.js} +6 -6
- package/dist/_node-chunks/{chunk-2ZB3ZVDY.js → chunk-U3BEYEZ5.js} +8 -8
- package/dist/_node-chunks/{chunk-HF6FRLS6.js → chunk-UI6NW64P.js} +19 -19
- package/dist/_node-chunks/chunk-UK2NKD4E.js +532 -0
- package/dist/_node-chunks/{chunk-II4SIIJW.js → chunk-VF6725VX.js} +7 -7
- package/dist/_node-chunks/{chunk-YMVL55QY.js → chunk-VJJTMS2R.js} +9 -9
- package/dist/_node-chunks/{chunk-62PEOH4P.js → chunk-VQBXHU2T.js} +8 -8
- package/dist/_node-chunks/{chunk-5BQKMZYJ.js → chunk-VZ3PQJKF.js} +23 -23
- package/dist/_node-chunks/{chunk-G6UTEYYQ.js → chunk-WI6FDUOM.js} +8 -8
- package/dist/_node-chunks/{chunk-4QYNOSOA.js → chunk-WTS7HYGM.js} +7 -7
- package/dist/_node-chunks/{chunk-VQ2NW4OR.js → chunk-WXMIR2F2.js} +8 -8
- package/dist/_node-chunks/{chunk-G3J2VAY4.js → chunk-XA2UQNP3.js} +10 -10
- package/dist/_node-chunks/{chunk-VTVQ5TKB.js → chunk-Y2FWEOIW.js} +8 -8
- package/dist/_node-chunks/{chunk-526SOV2Y.js → chunk-Y5JLYH6J.js} +6 -6
- package/dist/_node-chunks/{chunk-X5IJ42Q2.js → chunk-YELBVH4K.js} +7 -7
- package/dist/_node-chunks/{chunk-QQ7GEJNY.js → chunk-YK5N35SR.js} +9 -9
- package/dist/_node-chunks/{chunk-UEWCGYSE.js → chunk-YLXOGJX6.js} +21 -9
- package/dist/_node-chunks/{chunk-OZBNKCKM.js → chunk-YSVJU5VZ.js} +6 -6
- package/dist/_node-chunks/{chunk-F2XPZVCK.js → chunk-ZFTEHWNT.js} +8 -8
- package/dist/_node-chunks/{chunk-6DZY675E.js → chunk-ZLBDSC7U.js} +9 -9
- package/dist/_node-chunks/{chunk-6DCYMQX2.js → chunk-ZMI35R7E.js} +45 -34
- package/dist/_node-chunks/{chunk-QVIC3UDL.js → chunk-ZOE2QQSS.js} +8 -8
- package/dist/_node-chunks/{chunk-OFZX45ZR.js → chunk-ZST2SPBX.js} +6 -6
- package/dist/_node-chunks/{chunk-IAYHJZOR.js → chunk-ZUYRTHXN.js} +6 -6
- package/dist/_node-chunks/dist-FABQFQ76.js +27 -0
- package/dist/_node-chunks/dist-ZUXZVI3A.js +16 -0
- package/dist/_node-chunks/{local-runtime-Y6OH2SFM.js → local-runtime-LKT5I6NG.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-R6GNGQP2.js → mdx-plugin-2YIBFVCV.js} +13 -13
- package/dist/_node-chunks/{monorepo-R2CLQIWG.js → monorepo-HROZW452.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-PTWFSPXD.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-MUIOTVJR.js} +11 -11
- package/dist/_node-chunks/optimized-tests-EK5H7MUQ.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-5VCD6ED3.js → pattern-copy-play-VQNMME5S.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-T4RENREB.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-SKSQEDUP.js → rehype-external-links-WXD3NVWK.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-27WNXM7U.js → rehype-slug-LWBEJBWR.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-PDGCGDW4.js → relaxed-limits-MKV6OE3S.js} +11 -11
- package/dist/_node-chunks/{run-BD52SWQC.js → run-A4A2HQDT.js} +17 -17
- package/dist/_node-chunks/{run-IKBDOUY2.js → run-UBPF7ZUG.js} +15 -15
- package/dist/_node-chunks/session-id-YZZIHNID.js +23 -0
- package/dist/_node-chunks/{setup-7ECNMG4A.js → setup-SMMCS2Q5.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-J4YODMMP.js → vitest.config.4.template-PYSDGPB4.js} +7 -7
- package/dist/addon-a11y/index.js +1 -1
- package/dist/addon-a11y/manager.js +20 -24
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +1 -1
- package/dist/addon-docs/blocks.js +20 -26
- package/dist/addon-docs/manager.js +1 -1
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +4 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +4 -2
- package/dist/addon-links/react/index.js +3 -1
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +3 -3
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-themes/manager.js +3 -3
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +9 -9
- 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 +14 -14
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +13 -13
- package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +59 -59
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-CJY2njs4.d.ts → chunk-BhAPwdVB.d.ts} +1 -1
- package/dist/{chunk-pFH9P91a.d.ts → chunk-DXsI731B.d.ts} +1 -1
- package/dist/{chunk-DktrsDd6.d.ts → chunk-PdOIKm0H.d.ts} +35 -2
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +22 -22
- 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/common/index.d.ts +2 -2
- package/dist/common/index.js +35 -35
- package/dist/components/index.d.ts +38 -1
- package/dist/components/index.js +593 -518
- package/dist/core-server/index.d.ts +2 -2
- package/dist/core-server/index.js +282 -173
- package/dist/core-server/presets/common-manager.js +491 -117
- package/dist/core-server/presets/common-override-preset.js +10 -10
- package/dist/core-server/presets/common-preset.js +51 -43
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf-tools/index.d.ts +3 -1
- package/dist/csf-tools/index.js +14 -12
- package/dist/manager/_manager-chunks/{globals-runtime-z143vedu.js → globals-runtime-B1q30If4.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-4fCHtNC6.js → globals-runtime-BY3epqww.js} +413 -2
- package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
- package/dist/manager/_manager-chunks/{globals-runtime-Bpc_ftuT.js → globals-runtime-Bs75QQ_I.js} +3 -1192
- package/dist/manager/_manager-chunks/{globals-runtime-D82vqOGq.js → globals-runtime-BweHuXkK.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-BKW-4ztO.js → globals-runtime-C4GdZS7_.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-DB8fVA5g.js → globals-runtime-CA8AuIRT.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DZN_3ZLm.js → globals-runtime-CnfHMZV0.js} +153 -27
- package/dist/manager/_manager-chunks/{globals-runtime-WhJXr5R1.js → globals-runtime-DgHSAUIB.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-kmPSyf3j.js → globals-runtime-DvV_TF3-.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-DgUeynuu.js → globals-runtime-FcobHVj9.js} +475 -370
- package/dist/manager/_manager-chunks/{globals-runtime-CoCzM1V_.js → globals-runtime-WZKaeKm9.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CIcNS9TG.js → globals-runtime-dh5vgpgm.js} +238 -232
- package/dist/manager/_manager-chunks/{globals-runtime-DOPUchia.js → globals-runtime-wjkxyMn0.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-DEHcqyTM.js → runtime-BSkBrZa7.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-C-s1miBr.js → runtime-Bdda1ODD.js} +1 -1
- package/dist/manager/_manager-chunks/{runtime-DuptfEhw.js → runtime-Bp_XtatN.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-BrwmuSZ1.js → runtime-D-bkVc6v.js} +31 -30
- package/dist/manager/_manager-chunks/{runtime-CHQZzIX6.js → runtime-DP_7wWTN.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-Dtpc5s3G.js → runtime-DlX-MKi1.js} +335 -327
- package/dist/manager/_manager-chunks/{runtime-B_U-7omv.js → runtime-TytMkKcC.js} +340 -241
- package/dist/manager/_manager-chunks/{runtime-BrlctLSK.js → runtime-jOBCBZ66.js} +100 -63
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/globals.d.ts +1 -1
- package/dist/manager/globals.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 +34 -9
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +9 -9
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +10 -10
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.js +8 -8
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +10 -10
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -11
- package/dist/react/preset.js +13 -13
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/withForkbook.js +11 -11
- 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.d.ts +69 -1
- package/dist/router/index.js +48 -8
- 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 -43
- package/dist/theming/index.js +13 -9
- package/dist/types/index.d.ts +2 -2
- package/package.json +2 -2
- package/dist/_node-chunks/builder-manager-V7M6SFEM.js +0 -1623
- package/dist/_node-chunks/chunk-27KT3BJI.js +0 -25
- package/dist/_node-chunks/chunk-4XNKH2BY.js +0 -18
- package/dist/_node-chunks/chunk-CT3L2NXZ.js +0 -20
- package/dist/_node-chunks/chunk-NORBEBNM.js +0 -19
- package/dist/_node-chunks/chunk-SBNQ6YGM.js +0 -11
- package/dist/_node-chunks/chunk-YHWOGAFM.js +0 -20
- package/dist/_node-chunks/dist-GJ53PFWF.js +0 -27
- package/dist/_node-chunks/dist-TLMACGH6.js +0 -16
- package/dist/_node-chunks/optimized-tests-DIPB4OM6.js +0 -22
- package/dist/_node-chunks/postinstallAddon-PSN7XRSV.js +0 -20
- package/dist/_node-chunks/session-id-K7PM5ZGL.js +0 -23
- package/dist/manager/_manager-chunks/globals-runtime-BMCaBukU.js +0 -413
- package/dist/manager/_manager-chunks/globals-runtime-BO0pfoqL.js +0 -3414
- package/dist/manager/_manager-chunks/globals-runtime-BZKYJxYC.js +0 -2093
- package/dist/manager/_manager-chunks/globals-runtime-CTyYXvUm.js +0 -41
- package/dist/manager/_manager-chunks/globals-runtime-Dbt08xWQ.js +0 -1960
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "../../_browser-chunks/chunk-MLBOOZL4.js";
|
|
11
11
|
import {
|
|
12
12
|
ArgsTable
|
|
13
|
-
} from "../../_browser-chunks/chunk-
|
|
13
|
+
} from "../../_browser-chunks/chunk-6QEYM2YW.js";
|
|
14
14
|
import "../../_browser-chunks/chunk-PJSMZ27A.js";
|
|
15
15
|
import "../../_browser-chunks/chunk-OZZPSYQR.js";
|
|
16
16
|
import "../../_browser-chunks/chunk-6ELMKWKX.js";
|
|
@@ -20,6 +20,25 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
announce
|
|
22
22
|
} from "../../_browser-chunks/chunk-KBK7GKBN.js";
|
|
23
|
+
import {
|
|
24
|
+
useToolbarRootContext
|
|
25
|
+
} from "../../_browser-chunks/chunk-NPNIBOPF.js";
|
|
26
|
+
import {
|
|
27
|
+
CompositeRoot,
|
|
28
|
+
useCompositeItem,
|
|
29
|
+
useControlled
|
|
30
|
+
} from "../../_browser-chunks/chunk-OOETBSA7.js";
|
|
31
|
+
import {
|
|
32
|
+
EMPTY_ARRAY,
|
|
33
|
+
EMPTY_OBJECT,
|
|
34
|
+
createChangeEventDetails,
|
|
35
|
+
error,
|
|
36
|
+
reason_parts_exports,
|
|
37
|
+
useBaseUiId,
|
|
38
|
+
useButton,
|
|
39
|
+
useRenderElement,
|
|
40
|
+
useStableCallback
|
|
41
|
+
} from "../../_browser-chunks/chunk-XTQCLWVH.js";
|
|
23
42
|
import "../../_browser-chunks/chunk-CNED6RYH.js";
|
|
24
43
|
import {
|
|
25
44
|
registerService
|
|
@@ -195,7 +214,7 @@ var ADDON_ID8 = "core/review", manager_default2 = addons2.register(ADDON_ID8, ()
|
|
|
195
214
|
// src/controls/manager.tsx
|
|
196
215
|
import { AddonPanel } from "@aussieljk/forkbook/internal/components";
|
|
197
216
|
import { SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE } from "@aussieljk/forkbook/internal/core-events";
|
|
198
|
-
import {
|
|
217
|
+
import { CircleCheckIcon, CircleXIcon } from "lucide-react";
|
|
199
218
|
import {
|
|
200
219
|
addons as addons3,
|
|
201
220
|
experimental_requestResponse,
|
|
@@ -224,7 +243,7 @@ var ADDON_ID9 = "addon-controls", PARAM_KEY6 = "controls";
|
|
|
224
243
|
// src/controls/components/SaveStory.tsx
|
|
225
244
|
import React from "react";
|
|
226
245
|
import { Bar, Button, Form, Modal } from "@aussieljk/forkbook/internal/components";
|
|
227
|
-
import {
|
|
246
|
+
import { RotateCcwIcon, CheckIcon, PlusIcon } from "lucide-react";
|
|
228
247
|
|
|
229
248
|
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/controls/components/SaveStory.module.css
|
|
230
249
|
var id = "core/src/controls/components/SaveStory.module.css";
|
|
@@ -232,7 +251,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
|
|
|
232
251
|
let style = document.createElement("style");
|
|
233
252
|
style.setAttribute("data-fb-css", id), style.textContent = ".fb-zEgyLq-container{z-index:1;width:100%;height:41px;position:absolute;bottom:0;overflow:hidden;container-type:size}.fb-zEgyLq-bar{--highlight-bg-color:#e0f0ff;background:var(--fb-background-bar);border-top:1px solid var(--fb-app-border-color);font-size:var(--fb-size-s2);padding-inline:4px;animation:.3s fb-zEgyLq-slideIn,2s fb-zEgyLq-highlight;@container (width<=799px){flex-direction:row;justify-content:flex-end}}:where([data-fb-theme=dark]) .fb-zEgyLq-bar{--highlight-bg-color:#153b5b}.fb-zEgyLq-info{flex:99 0 auto;align-items:center;gap:6px;margin-inline:7px 10px;display:flex}.fb-zEgyLq-actions{color:var(--fb-text-muted-color);font-size:var(--fb-size-s2);flex:1 0 0;align-items:center;gap:2px;display:flex}.fb-zEgyLq-label{@container (width<=799px){text-indent:-9999px;line-height:0;&:after{content:attr(data-short-label);line-height:initial;text-indent:0;display:block}}}.fb-zEgyLq-modalInput{&::placeholder{color:var(--fb-color-mediumdark)}&:invalid:not(:placeholder-shown){box-shadow:var(--fb-color-negative) 0 0 0 1px inset}}@keyframes fb-zEgyLq-slideIn{0%{transform:translateY(40px)}to{transform:translateY(0)}}@keyframes fb-zEgyLq-highlight{0%{background:var(--highlight-bg-color)}}", document.head.appendChild(style);
|
|
234
253
|
}
|
|
235
|
-
var SaveStory_default = {
|
|
254
|
+
var SaveStory_default = { container: "fb-zEgyLq-container", label: "fb-zEgyLq-label", modalInput: "fb-zEgyLq-modalInput", highlight: "fb-zEgyLq-highlight", info: "fb-zEgyLq-info", bar: "fb-zEgyLq-bar", slideIn: "fb-zEgyLq-slideIn", actions: "fb-zEgyLq-actions" };
|
|
236
255
|
|
|
237
256
|
// src/controls/components/SaveStory.tsx
|
|
238
257
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -273,7 +292,7 @@ var SaveStory = ({ saveStory, createStory, resetArgs }) => {
|
|
|
273
292
|
jsx("div", { className: SaveStory_default.label, "data-short-label": "New", children: "Create new story" })
|
|
274
293
|
] }),
|
|
275
294
|
jsxs(Button, { ariaLabel: "Reset changes", onClick: () => resetArgs(), children: [
|
|
276
|
-
jsx(
|
|
295
|
+
jsx(RotateCcwIcon, {}),
|
|
277
296
|
jsx("span", { children: "Reset" })
|
|
278
297
|
] })
|
|
279
298
|
] }),
|
|
@@ -379,10 +398,10 @@ function LegacyControlsPanel(props) {
|
|
|
379
398
|
}
|
|
380
399
|
function DocgenQuery({
|
|
381
400
|
docgenService,
|
|
382
|
-
id:
|
|
401
|
+
id: id14,
|
|
383
402
|
onChange
|
|
384
403
|
}) {
|
|
385
|
-
let { data, isInitialLoading } = useServiceQuery(docgenService.queries.docgen, { id:
|
|
404
|
+
let { data, isInitialLoading } = useServiceQuery(docgenService.queries.docgen, { id: id14 });
|
|
386
405
|
return useEffect(() => {
|
|
387
406
|
onChange({ payload: data, isInitialLoading });
|
|
388
407
|
}, [data, isInitialLoading, onChange]), null;
|
|
@@ -402,10 +421,10 @@ function ServiceControlsPanel({
|
|
|
402
421
|
docgenService,
|
|
403
422
|
...props
|
|
404
423
|
}) {
|
|
405
|
-
let storyData = useStorybookApi().getCurrentStoryData(), [, , , initialArgs] = useArgs(), customArgTypes = useArgTypes(),
|
|
406
|
-
(state) => setDocgen({ id:
|
|
407
|
-
[
|
|
408
|
-
), current = queryReady && docgen?.id ===
|
|
424
|
+
let storyData = useStorybookApi().getCurrentStoryData(), [, , , initialArgs] = useArgs(), customArgTypes = useArgTypes(), id14 = storyData.id.split("--")[0], isStory = storyData.type === "story", isStoryPrepared = !(global.CONFIG_TYPE === "DEVELOPMENT") || (isStory ? storyData.prepared : !0), gateReady = useStoryDocgenGateReady(storyData.id), queryReady = !isStory || gateReady, [docgen, setDocgen] = useState(), onDocgenChange = useCallback(
|
|
425
|
+
(state) => setDocgen({ id: id14, ...state }),
|
|
426
|
+
[id14]
|
|
427
|
+
), current = queryReady && docgen?.id === id14 ? docgen : void 0, docgenPayload = current?.payload, docgenResolved = !!current && !current.isInitialLoading, rows = useMemo(
|
|
409
428
|
() => docgenResolved ? mergeServiceArgTypes({
|
|
410
429
|
payload: docgenPayload,
|
|
411
430
|
storyId: storyData.id,
|
|
@@ -416,7 +435,7 @@ function ServiceControlsPanel({
|
|
|
416
435
|
[docgenResolved, docgenPayload, initialArgs, storyData.id, storyData.parameters, customArgTypes]
|
|
417
436
|
), isDocgenLoading = !docgenResolved;
|
|
418
437
|
return jsxs2(Fragment, { children: [
|
|
419
|
-
queryReady && jsx2(DocgenQuery, { docgenService, id:
|
|
438
|
+
queryReady && jsx2(DocgenQuery, { docgenService, id: id14, onChange: onDocgenChange }),
|
|
420
439
|
jsx2(
|
|
421
440
|
ControlsPanelTable,
|
|
422
441
|
{
|
|
@@ -476,7 +495,7 @@ var manager_default3 = addons3.register(ADDON_ID9, (api) => {
|
|
|
476
495
|
});
|
|
477
496
|
api.addNotification({
|
|
478
497
|
id: "save-story-success",
|
|
479
|
-
icon: jsx4(
|
|
498
|
+
icon: jsx4(CircleCheckIcon, { color: color.positive }),
|
|
480
499
|
content: {
|
|
481
500
|
headline: "Story saved",
|
|
482
501
|
subHeadline: jsxs4(Fragment2, { children: [
|
|
@@ -487,16 +506,16 @@ var manager_default3 = addons3.register(ADDON_ID9, (api) => {
|
|
|
487
506
|
},
|
|
488
507
|
duration: 8e3
|
|
489
508
|
});
|
|
490
|
-
} catch (
|
|
509
|
+
} catch (error2) {
|
|
491
510
|
throw api.addNotification({
|
|
492
511
|
id: "save-story-error",
|
|
493
|
-
icon: jsx4(
|
|
512
|
+
icon: jsx4(CircleXIcon, { color: color.negative }),
|
|
494
513
|
content: {
|
|
495
514
|
headline: "Failed to save story",
|
|
496
|
-
subHeadline:
|
|
515
|
+
subHeadline: error2?.message || "Check the Forkbook process on the command line for more details."
|
|
497
516
|
},
|
|
498
517
|
duration: 8e3
|
|
499
|
-
}),
|
|
518
|
+
}), error2;
|
|
500
519
|
}
|
|
501
520
|
}, createStory = async (name) => {
|
|
502
521
|
let data = api.getCurrentStoryData();
|
|
@@ -510,7 +529,7 @@ var manager_default3 = addons3.register(ADDON_ID9, (api) => {
|
|
|
510
529
|
});
|
|
511
530
|
api.addNotification({
|
|
512
531
|
id: "save-story-success",
|
|
513
|
-
icon: jsx4(
|
|
532
|
+
icon: jsx4(CircleCheckIcon, { color: color.positive }),
|
|
514
533
|
content: {
|
|
515
534
|
headline: "Story created",
|
|
516
535
|
subHeadline: jsxs4(Fragment2, { children: [
|
|
@@ -1566,7 +1585,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id3}"
|
|
|
1566
1585
|
let style = document.createElement("style");
|
|
1567
1586
|
style.setAttribute("data-fb-css", id3), style.textContent = ".fb-IaeYrG-wrapper{margin:0;padding:10px 5px 20px}.fb-IaeYrG-action{white-space:pre;border-bottom:1px solid #0000;border-left:5px solid #0000;align-items:flex-start;padding:0;transition:all .1s;display:flex}.fb-IaeYrG-counter{background-color:rgb(from var(--fb-app-border-color) r g b / calc(alpha + .5));color:var(--fb-color-inverse-text);font-size:var(--fb-size-s1);font-weight:var(--fb-weight-bold);border-radius:20px;margin:2px 0;padding:1px 5px;line-height:1}.fb-IaeYrG-inspectorContainer{flex:1;padding:0 0 0 5px}", document.head.appendChild(style);
|
|
1568
1587
|
}
|
|
1569
|
-
var ActionLogger_default = {
|
|
1588
|
+
var ActionLogger_default = { action: "fb-IaeYrG-action", inspectorContainer: "fb-IaeYrG-inspectorContainer", wrapper: "fb-IaeYrG-wrapper", counter: "fb-IaeYrG-counter" };
|
|
1570
1589
|
|
|
1571
1590
|
// src/actions/components/ActionLogger/index.tsx
|
|
1572
1591
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
@@ -1696,14 +1715,14 @@ function stripAnsi(string2) {
|
|
|
1696
1715
|
function isInteractionsDisabled(parameters) {
|
|
1697
1716
|
return !!parameters?.[PARAM_KEY5]?.disable;
|
|
1698
1717
|
}
|
|
1699
|
-
function isTestAssertionError(
|
|
1700
|
-
return isChaiError(
|
|
1718
|
+
function isTestAssertionError(error2) {
|
|
1719
|
+
return isChaiError(error2) || isJestError(error2);
|
|
1701
1720
|
}
|
|
1702
|
-
function isChaiError(
|
|
1703
|
-
return
|
|
1721
|
+
function isChaiError(error2) {
|
|
1722
|
+
return error2 && typeof error2 == "object" && "name" in error2 && typeof error2.name == "string" && error2.name === "AssertionError";
|
|
1704
1723
|
}
|
|
1705
|
-
function isJestError(
|
|
1706
|
-
return
|
|
1724
|
+
function isJestError(error2) {
|
|
1725
|
+
return error2 && typeof error2 == "object" && "message" in error2 && typeof error2.message == "string" && stripAnsi(error2.message).startsWith("expect(");
|
|
1707
1726
|
}
|
|
1708
1727
|
function createAnsiToHtmlFilter(theme3) {
|
|
1709
1728
|
return new import_ansi_to_html.default({
|
|
@@ -1748,7 +1767,7 @@ var DetachedDebuggerMessage = ({ storyUrl }) => jsxs7("div", { className: Detach
|
|
|
1748
1767
|
// src/component-testing/components/EmptyState.tsx
|
|
1749
1768
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
1750
1769
|
import { EmptyTabContent, Link as Link2 } from "@aussieljk/forkbook/internal/components";
|
|
1751
|
-
import { FileTextIcon } from "
|
|
1770
|
+
import { FileTextIcon } from "lucide-react";
|
|
1752
1771
|
import { useStorybookApi as useStorybookApi4 } from "@aussieljk/forkbook/manager-api";
|
|
1753
1772
|
|
|
1754
1773
|
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/component-testing/components/EmptyState.module.css
|
|
@@ -1788,7 +1807,7 @@ var Empty = () => {
|
|
|
1788
1807
|
// src/component-testing/components/Interaction.tsx
|
|
1789
1808
|
import * as React21 from "react";
|
|
1790
1809
|
import { Button as Button2 } from "@aussieljk/forkbook/internal/components";
|
|
1791
|
-
import {
|
|
1810
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
1792
1811
|
|
|
1793
1812
|
// src/component-testing/components/MethodCall.tsx
|
|
1794
1813
|
import React20, { Fragment as Fragment5 } from "react";
|
|
@@ -1996,7 +2015,7 @@ var colorsLight = {
|
|
|
1996
2015
|
}, ElementNode = ({
|
|
1997
2016
|
prefix,
|
|
1998
2017
|
localName,
|
|
1999
|
-
id:
|
|
2018
|
+
id: id14,
|
|
2000
2019
|
classNames = [],
|
|
2001
2020
|
innerText
|
|
2002
2021
|
}) => {
|
|
@@ -2004,9 +2023,9 @@ var colorsLight = {
|
|
|
2004
2023
|
return jsxs9("span", { style: { wordBreak: "keep-all" }, children: [
|
|
2005
2024
|
jsx11("span", { style: { color: colors.muted }, children: "<" }, `${name}_lt`),
|
|
2006
2025
|
jsx11("span", { style: { color: colors.tag.name }, children: name }, `${name}_tag`),
|
|
2007
|
-
jsx11("span", { style: { color: colors.tag.suffix }, children:
|
|
2026
|
+
jsx11("span", { style: { color: colors.tag.suffix }, children: id14 ? `#${id14}` : classNames.reduce((acc, className) => `${acc}.${className}`, "") }, `${name}_suffix`),
|
|
2008
2027
|
jsx11("span", { style: { color: colors.muted }, children: ">" }, `${name}_gt`),
|
|
2009
|
-
!
|
|
2028
|
+
!id14 && classNames.length === 0 && innerText && jsxs9(Fragment6, { children: [
|
|
2010
2029
|
jsx11("span", { children: innerText }, `${name}_text`),
|
|
2011
2030
|
jsx11("span", { style: { color: colors.muted }, children: "<" }, `${name}_close_lt`),
|
|
2012
2031
|
jsxs9("span", { style: { color: colors.tag.name }, children: [
|
|
@@ -2202,7 +2221,7 @@ var getParams = (line, fromIndex = 0) => {
|
|
|
2202
2221
|
};
|
|
2203
2222
|
|
|
2204
2223
|
// src/component-testing/components/StatusIcon.tsx
|
|
2205
|
-
import { CheckIcon as CheckIcon2, CircleIcon, PlayIcon,
|
|
2224
|
+
import { CheckIcon as CheckIcon2, CircleIcon, PlayIcon, CircleStopIcon } from "lucide-react";
|
|
2206
2225
|
import { useTheme as useTheme4 } from "@aussieljk/forkbook/theming";
|
|
2207
2226
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2208
2227
|
var StatusIcon = ({ status }) => {
|
|
@@ -2211,7 +2230,7 @@ var StatusIcon = ({ status }) => {
|
|
|
2211
2230
|
case "done" /* DONE */:
|
|
2212
2231
|
return jsx13(CheckIcon2, { color: theme3.color.positive, "data-testid": "icon-done" });
|
|
2213
2232
|
case "error" /* ERROR */:
|
|
2214
|
-
return jsx13(
|
|
2233
|
+
return jsx13(CircleStopIcon, { color: theme3.color.negative, "data-testid": "icon-error" });
|
|
2215
2234
|
case "active" /* ACTIVE */:
|
|
2216
2235
|
return jsx13(PlayIcon, { color: theme3.color.secondary, "data-testid": "icon-active" });
|
|
2217
2236
|
case "waiting" /* WAITING */:
|
|
@@ -2240,7 +2259,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id7}"
|
|
|
2240
2259
|
let style = document.createElement("style");
|
|
2241
2260
|
style.setAttribute("data-fb-css", id7), style.textContent = '.fb-PYwdvq-methodCall{font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);overflow-wrap:break-word;inline-size:calc(100% - 40px)}.fb-PYwdvq-row{border-bottom:1px solid var(--fb-app-border-color);font-family:var(--fb-font-base);flex-direction:column;font-size:13px;list-style:none;display:flex;position:relative;&[data-status=error]{background-color:var(--fb-background-warning)}&[data-paused]:before{content:"";z-index:1;border-top:4.5px solid #0000;border-left:7px solid var(--fb-color-warning);border-bottom:4.5px solid #0000;position:absolute;top:-5px}&[data-paused]:after{content:"";z-index:1;border-top:1.5px solid var(--fb-color-warning);width:100%;position:absolute;top:-1px}}:where([data-fb-theme=dark]) .fb-PYwdvq-row[data-status=error]{background-color:rgb(from var(--fb-color-negative) r g b / calc(alpha - .93))}.fb-PYwdvq-rowHeader{display:flex;&:not([data-navigation-disabled]):hover{background:var(--fb-background-hoverable)}}.fb-PYwdvq-rowLabel{text-align:start;cursor:pointer;background:0 0;border:0;flex:1;grid-template-columns:15px 1fr;align-items:center;min-height:40px;margin:0;padding:8px 15px;display:grid;&:disabled,&[data-status=error]{cursor:default}&:focus-visible{box-shadow:inset 3px 0 0 0 var(--fb-color-secondary);background:var(--fb-background-hoverable);outline:0}&[data-status=error]:focus-visible{box-shadow:inset 3px 0 0 0 var(--fb-color-warning);background:0 0}&[data-status=waiting]>div{opacity:.5}}.fb-PYwdvq-rowActions{align-items:center;padding:6px;display:flex}.fb-PYwdvq-button{color:var(--fb-text-muted-color);margin:0 3px}.fb-PYwdvq-rowMessage{font-size:var(--fb-size-s1);color:var(--fb-color-default-text);padding:8px 10px 8px 36px;& pre{margin:0;padding:0}}.fb-PYwdvq-errorName{color:#0271b6}.fb-PYwdvq-errorMessage{color:#444}.fb-PYwdvq-errorExplainer{color:var(--fb-color-negative-text);font-size:var(--fb-size-s2);text-wrap:balance;max-width:500px}:where([data-fb-theme=dark]){& .fb-PYwdvq-errorName{color:#5ec1ff}& .fb-PYwdvq-errorMessage{color:#eee}& .fb-PYwdvq-errorExplainer{color:var(--fb-color-negative)}}', document.head.appendChild(style);
|
|
2242
2261
|
}
|
|
2243
|
-
var Interaction_default = {
|
|
2262
|
+
var Interaction_default = { rowActions: "fb-PYwdvq-rowActions", rowHeader: "fb-PYwdvq-rowHeader", errorExplainer: "fb-PYwdvq-errorExplainer", row: "fb-PYwdvq-row", methodCall: "fb-PYwdvq-methodCall", rowLabel: "fb-PYwdvq-rowLabel", rowMessage: "fb-PYwdvq-rowMessage", button: "fb-PYwdvq-button", errorName: "fb-PYwdvq-errorName", errorMessage: "fb-PYwdvq-errorMessage" };
|
|
2244
2263
|
|
|
2245
2264
|
// src/component-testing/components/Interaction.tsx
|
|
2246
2265
|
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
@@ -2357,7 +2376,7 @@ ${exception.diff}` : ""}`,
|
|
|
2357
2376
|
onClick: toggleCollapsed,
|
|
2358
2377
|
ariaLabel: getExpandButtonAriaLabel({ isCollapsed, stepName }),
|
|
2359
2378
|
"aria-expanded": !isCollapsed,
|
|
2360
|
-
children: isCollapsed ? jsx14(
|
|
2379
|
+
children: isCollapsed ? jsx14(ChevronUpIcon, {}) : jsx14(ChevronDownIcon, {})
|
|
2361
2380
|
}
|
|
2362
2381
|
) })
|
|
2363
2382
|
]
|
|
@@ -2408,12 +2427,12 @@ import {
|
|
|
2408
2427
|
Toolbar as SharedToolbar
|
|
2409
2428
|
} from "@aussieljk/forkbook/internal/components";
|
|
2410
2429
|
import {
|
|
2411
|
-
|
|
2430
|
+
RefreshCwIcon,
|
|
2412
2431
|
FastForwardIcon,
|
|
2413
2432
|
RewindIcon,
|
|
2414
2433
|
SkipBackIcon,
|
|
2415
2434
|
SkipForwardIcon
|
|
2416
|
-
} from "
|
|
2435
|
+
} from "lucide-react";
|
|
2417
2436
|
import { useTheme as useTheme5 } from "@aussieljk/forkbook/theming";
|
|
2418
2437
|
|
|
2419
2438
|
// src/component-testing/components/StatusBadge.tsx
|
|
@@ -2475,7 +2494,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id10}
|
|
|
2475
2494
|
let style = document.createElement("style");
|
|
2476
2495
|
style.setAttribute("data-fb-css", id10), style.textContent = ".fb-W9rv1G-wrapper{box-shadow:var(--fb-app-border-color) 0 -1px 0 0 inset;background:var(--fb-background-app);z-index:1;position:sticky;top:0}.fb-W9rv1G-controlsGroup{flex:1;align-items:center;gap:6px;display:flex}.fb-W9rv1G-iconButton{color:var(--fb-text-muted-color)}.fb-W9rv1G-rewindButton{margin-inline-start:3px;}.fb-W9rv1G-jumpToEndButton{color:var(--fb-text-muted-color);border-radius:4px;margin-inline:3px;padding:6px;line-height:12px;&:not(:disabled):hover,&:not(:disabled):focus-visible{color:var(--fb-color-secondary)}}.fb-W9rv1G-openInEditorButton{color:var(--fb-color-secondary);font-weight:var(--fb-weight-bold);text-align:right;white-space:nowrap;justify-content:flex-end;font-size:13px;line-height:24px}.fb-W9rv1G-location{color:var(--fb-text-muted-color);cursor:default;font-weight:var(--fb-weight-regular);text-align:right;white-space:nowrap;justify-content:flex-end;margin:0;font-size:13px}", document.head.appendChild(style);
|
|
2477
2496
|
}
|
|
2478
|
-
var Toolbar_default = {
|
|
2497
|
+
var Toolbar_default = { openInEditorButton: "fb-W9rv1G-openInEditorButton", rewindButton: "fb-W9rv1G-rewindButton fb-W9rv1G-iconButton", iconButton: "fb-W9rv1G-iconButton", location: "fb-W9rv1G-location", wrapper: "fb-W9rv1G-wrapper", controlsGroup: "fb-W9rv1G-controlsGroup", jumpToEndButton: "fb-W9rv1G-jumpToEndButton" };
|
|
2479
2498
|
|
|
2480
2499
|
// src/component-testing/components/Toolbar.tsx
|
|
2481
2500
|
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -2572,7 +2591,7 @@ var Toolbar = ({
|
|
|
2572
2591
|
ariaLabel: "Rerun",
|
|
2573
2592
|
onClick: controls.rerun,
|
|
2574
2593
|
onPointerDown: preventFocusLoss,
|
|
2575
|
-
children: jsx17(
|
|
2594
|
+
children: jsx17(RefreshCwIcon, {})
|
|
2576
2595
|
}
|
|
2577
2596
|
)
|
|
2578
2597
|
] }),
|
|
@@ -2603,7 +2622,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id11}
|
|
|
2603
2622
|
let style = document.createElement("style");
|
|
2604
2623
|
style.setAttribute("data-fb-css", id11), style.textContent = ".fb-RpIDLa-container{background:var(--fb-background-content);height:100%}.fb-RpIDLa-section{position:relative}.fb-RpIDLa-heading{white-space:nowrap;clip:rect(0, 0, 0, 0);clip-path:inset(50%);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fb-RpIDLa-list{margin:0;padding:0}.fb-RpIDLa-caughtException{border-bottom:1px solid var(--fb-app-border-color);background-color:var(--fb-background-warning);font-size:calc(var(--fb-size-s2) - 1px);padding:15px;line-height:19px}:where([data-fb-theme=dark]) .fb-RpIDLa-caughtException{background-color:rgb(from var(--fb-color-negative) r g b / calc(alpha - .93))}.fb-RpIDLa-caughtExceptionCode{font-size:calc(var(--fb-size-s1) - 1px);vertical-align:top;border:1px solid var(--fb-app-border-color);background:#0000000d;border-radius:3px;margin:0 1px;padding:3px;line-height:1}.fb-RpIDLa-caughtExceptionTitle{padding-bottom:4px;font-weight:700}.fb-RpIDLa-caughtExceptionDescription{margin:0;padding:0 0 20px}.fb-RpIDLa-caughtExceptionStack{font-size:calc(var(--fb-size-s1) - 1px);margin:0;padding:0;&:not(:last-child){padding-bottom:16px}}", document.head.appendChild(style);
|
|
2605
2624
|
}
|
|
2606
|
-
var InteractionsPanel_default = {
|
|
2625
|
+
var InteractionsPanel_default = { section: "fb-RpIDLa-section", heading: "fb-RpIDLa-heading", container: "fb-RpIDLa-container", caughtExceptionTitle: "fb-RpIDLa-caughtExceptionTitle", list: "fb-RpIDLa-list", caughtExceptionCode: "fb-RpIDLa-caughtExceptionCode", caughtExceptionDescription: "fb-RpIDLa-caughtExceptionDescription", caughtException: "fb-RpIDLa-caughtException", caughtExceptionStack: "fb-RpIDLa-caughtExceptionStack" };
|
|
2607
2626
|
|
|
2608
2627
|
// src/component-testing/components/InteractionsPanel.tsx
|
|
2609
2628
|
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
@@ -2703,15 +2722,15 @@ var StatusAnnouncementMapping = {
|
|
|
2703
2722
|
jsx18("code", { className: InteractionsPanel_default.caughtExceptionCode, children: "true" }),
|
|
2704
2723
|
"."
|
|
2705
2724
|
] }),
|
|
2706
|
-
unhandledErrors.map((
|
|
2725
|
+
unhandledErrors.map((error2, i) => jsx18("pre", { className: InteractionsPanel_default.caughtExceptionStack, "data-chromatic": "ignore", children: printSerializedError(error2) }, i))
|
|
2707
2726
|
] }),
|
|
2708
2727
|
jsx18("div", { ref: endRef }),
|
|
2709
2728
|
status === "completed" && !caughtException && !hasRealInteractions && jsx18(Empty, {})
|
|
2710
2729
|
] });
|
|
2711
2730
|
}
|
|
2712
2731
|
);
|
|
2713
|
-
function printSerializedError(
|
|
2714
|
-
return
|
|
2732
|
+
function printSerializedError(error2) {
|
|
2733
|
+
return error2.stack || `${error2.name}: ${error2.message}`;
|
|
2715
2734
|
}
|
|
2716
2735
|
|
|
2717
2736
|
// src/component-testing/components/Panel.tsx
|
|
@@ -2990,7 +3009,7 @@ import { addons as addons6, types as types4 } from "@aussieljk/forkbook/manager-
|
|
|
2990
3009
|
// src/backgrounds/components/Tool.tsx
|
|
2991
3010
|
import { Fragment as Fragment9, memo as memo5, useCallback as useCallback5 } from "react";
|
|
2992
3011
|
import { Select, ToggleButton } from "@aussieljk/forkbook/internal/components";
|
|
2993
|
-
import { CircleIcon as CircleIcon2,
|
|
3012
|
+
import { CircleIcon as CircleIcon2, Grid2x2Icon, ImageIcon } from "lucide-react";
|
|
2994
3013
|
import { useGlobals as useGlobals2, useParameter as useParameter4 } from "@aussieljk/forkbook/manager-api";
|
|
2995
3014
|
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2996
3015
|
var BackgroundTool = memo5(function() {
|
|
@@ -3041,7 +3060,7 @@ var BackgroundTool = memo5(function() {
|
|
|
3041
3060
|
ariaLabel: isLocked ? "Grid set by story parameters" : "Grid visibility",
|
|
3042
3061
|
tooltip: isLocked ? "Grid set by story parameters" : "Toggle grid visibility",
|
|
3043
3062
|
onClick: () => update({ value: backgroundName, grid: !isGrid }),
|
|
3044
|
-
children: jsx22(
|
|
3063
|
+
children: jsx22(Grid2x2Icon, {})
|
|
3045
3064
|
},
|
|
3046
3065
|
"grid"
|
|
3047
3066
|
),
|
|
@@ -3080,7 +3099,7 @@ import { addons as addons7, types as types5 } from "@aussieljk/forkbook/manager-
|
|
|
3080
3099
|
// src/measure/Tool.tsx
|
|
3081
3100
|
import { useCallback as useCallback6, useEffect as useEffect7 } from "react";
|
|
3082
3101
|
import { ToggleButton as ToggleButton2 } from "@aussieljk/forkbook/internal/components";
|
|
3083
|
-
import { RulerIcon } from "
|
|
3102
|
+
import { RulerIcon } from "lucide-react";
|
|
3084
3103
|
import { useGlobals as useGlobals3, useParameter as useParameter5, useStorybookApi as useStorybookApi8 } from "@aussieljk/forkbook/manager-api";
|
|
3085
3104
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3086
3105
|
var Tool = () => {
|
|
@@ -3131,7 +3150,7 @@ import { addons as addons8, types as types6 } from "@aussieljk/forkbook/manager-
|
|
|
3131
3150
|
// src/outline/OutlineSelector.tsx
|
|
3132
3151
|
import { memo as memo6, useCallback as useCallback7, useEffect as useEffect8 } from "react";
|
|
3133
3152
|
import { ToggleButton as ToggleButton3 } from "@aussieljk/forkbook/internal/components";
|
|
3134
|
-
import {
|
|
3153
|
+
import { SquareDashedIcon } from "lucide-react";
|
|
3135
3154
|
import { useGlobals as useGlobals4, useParameter as useParameter6, useStorybookApi as useStorybookApi9 } from "@aussieljk/forkbook/manager-api";
|
|
3136
3155
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3137
3156
|
var OutlineSelector = memo6(function() {
|
|
@@ -3159,7 +3178,7 @@ var OutlineSelector = memo6(function() {
|
|
|
3159
3178
|
ariaDescription: "When enabled, this tool displays the outline of every element in the preview area, which helps understand their layout.",
|
|
3160
3179
|
tooltip: "Toggle outline",
|
|
3161
3180
|
onClick: toggleOutline,
|
|
3162
|
-
children: jsx26(
|
|
3181
|
+
children: jsx26(SquareDashedIcon, {})
|
|
3163
3182
|
},
|
|
3164
3183
|
"outline"
|
|
3165
3184
|
);
|
|
@@ -3179,11 +3198,6 @@ var manager_default8 = addons8.register(ADDON_ID5, () => {
|
|
|
3179
3198
|
// src/viewport/manager.tsx
|
|
3180
3199
|
import { addons as addons9, types as types7 } from "@aussieljk/forkbook/manager-api";
|
|
3181
3200
|
|
|
3182
|
-
// src/viewport/components/Tool.tsx
|
|
3183
|
-
import { useMemo as useMemo6 } from "react";
|
|
3184
|
-
import { Select as Select2 } from "@aussieljk/forkbook/internal/components";
|
|
3185
|
-
import { ArrowsOutIcon } from "@phosphor-icons/react";
|
|
3186
|
-
|
|
3187
3201
|
// src/viewport/useViewport.ts
|
|
3188
3202
|
import { useCallback as useCallback8, useEffect as useEffect9, useMemo as useMemo5, useRef as useRef3 } from "react";
|
|
3189
3203
|
import { useGlobals as useGlobals5, useParameter as useParameter7, useStorybookApi as useStorybookApi10 } from "@aussieljk/forkbook/manager-api";
|
|
@@ -3265,91 +3279,451 @@ var cycle = (viewports, current, direction = 1) => {
|
|
|
3265
3279
|
);
|
|
3266
3280
|
};
|
|
3267
3281
|
|
|
3282
|
+
// src/viewport/components/FrameSize.tsx
|
|
3283
|
+
import { useEffect as useEffect10, useState as useState8 } from "react";
|
|
3284
|
+
|
|
3285
|
+
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/viewport/components/FrameSize.module.css
|
|
3286
|
+
var id12 = "core/src/viewport/components/FrameSize.module.css";
|
|
3287
|
+
if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id12}"]`)) {
|
|
3288
|
+
let style = document.createElement("style");
|
|
3289
|
+
style.setAttribute("data-fb-css", id12), style.textContent = ".fb-bVlzdq-wrapper{height:28px;font-family:var(--fb-font-mono);font-size:calc(var(--fb-size-s1) - 1px);font-variant-numeric:tabular-nums;color:var(--fb-text-muted-color);white-space:nowrap;align-items:center;gap:1px;padding-inline:4px;display:inline-flex}.fb-bVlzdq-times{opacity:.7}.fb-bVlzdq-value,.fb-bVlzdq-input{height:22px;font:inherit;color:inherit;border-radius:4px;padding-inline:3px}.fb-bVlzdq-value{cursor:text;background:0 0;border:none;&:hover:not(:disabled),&:focus-visible{background:var(--fb-input-background)}&:disabled{cursor:default}}.fb-bVlzdq-input{min-width:0;color:var(--fb-input-color);text-align:center;background:var(--fb-input-background);box-shadow:var(--fb-input-border) 0 0 0 1px inset;appearance:textfield;border:none;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{appearance:none;margin:0}}", document.head.appendChild(style);
|
|
3290
|
+
}
|
|
3291
|
+
var FrameSize_default = { input: "fb-bVlzdq-input", wrapper: "fb-bVlzdq-wrapper", times: "fb-bVlzdq-times", value: "fb-bVlzdq-value" };
|
|
3292
|
+
|
|
3293
|
+
// src/viewport/components/FrameSize.tsx
|
|
3294
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3295
|
+
var PREVIEW_IFRAME_ID = "storybook-preview-iframe", usePreviewFrameSize = (id14 = PREVIEW_IFRAME_ID) => {
|
|
3296
|
+
let [size, setSize] = useState8();
|
|
3297
|
+
return useEffect10(() => {
|
|
3298
|
+
let observed = null, resizeObserver = new ResizeObserver(() => {
|
|
3299
|
+
observed && setSize({ width: observed.clientWidth, height: observed.clientHeight });
|
|
3300
|
+
}), attach = () => {
|
|
3301
|
+
let el = document.getElementById(id14);
|
|
3302
|
+
el !== observed && (observed && resizeObserver.unobserve(observed), observed = el, el && resizeObserver.observe(el));
|
|
3303
|
+
};
|
|
3304
|
+
attach();
|
|
3305
|
+
let mutationObserver = new MutationObserver(attach);
|
|
3306
|
+
return mutationObserver.observe(document.body, { childList: !0, subtree: !0 }), () => {
|
|
3307
|
+
mutationObserver.disconnect(), resizeObserver.disconnect();
|
|
3308
|
+
};
|
|
3309
|
+
}, [id14]), size;
|
|
3310
|
+
}, Dimension = ({
|
|
3311
|
+
label,
|
|
3312
|
+
value,
|
|
3313
|
+
disabled,
|
|
3314
|
+
onApply
|
|
3315
|
+
}) => {
|
|
3316
|
+
let [draft, setDraft] = useState8();
|
|
3317
|
+
if (draft === void 0)
|
|
3318
|
+
return jsx28(
|
|
3319
|
+
"button",
|
|
3320
|
+
{
|
|
3321
|
+
type: "button",
|
|
3322
|
+
className: FrameSize_default.value,
|
|
3323
|
+
"aria-label": `${label}: ${value}px. Click to edit.`,
|
|
3324
|
+
disabled,
|
|
3325
|
+
onClick: () => setDraft(String(value)),
|
|
3326
|
+
children: value
|
|
3327
|
+
}
|
|
3328
|
+
);
|
|
3329
|
+
let apply = () => {
|
|
3330
|
+
let next = Math.round(Number(draft));
|
|
3331
|
+
setDraft(void 0), draft.trim() !== "" && Number.isFinite(next) && next > 0 && next !== value && onApply(next);
|
|
3332
|
+
}, onKeyDown = (e) => {
|
|
3333
|
+
e.key === "Enter" ? (e.preventDefault(), apply()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), setDraft(void 0));
|
|
3334
|
+
};
|
|
3335
|
+
return jsx28(
|
|
3336
|
+
"input",
|
|
3337
|
+
{
|
|
3338
|
+
className: FrameSize_default.input,
|
|
3339
|
+
"aria-label": label,
|
|
3340
|
+
type: "number",
|
|
3341
|
+
min: 1,
|
|
3342
|
+
autoFocus: !0,
|
|
3343
|
+
value: draft,
|
|
3344
|
+
style: { width: `${Math.max(draft.length, 2) + 2}ch` },
|
|
3345
|
+
onChange: (e) => setDraft(e.target.value),
|
|
3346
|
+
onFocus: (e) => e.target.select(),
|
|
3347
|
+
onBlur: apply,
|
|
3348
|
+
onKeyDown
|
|
3349
|
+
}
|
|
3350
|
+
);
|
|
3351
|
+
}, FrameSize = ({
|
|
3352
|
+
size,
|
|
3353
|
+
disabled,
|
|
3354
|
+
onApply
|
|
3355
|
+
}) => size ? jsxs16("span", { className: FrameSize_default.wrapper, "data-testid": "frame-size", children: [
|
|
3356
|
+
jsx28(
|
|
3357
|
+
Dimension,
|
|
3358
|
+
{
|
|
3359
|
+
label: "Frame width",
|
|
3360
|
+
value: size.width,
|
|
3361
|
+
disabled,
|
|
3362
|
+
onApply: (width) => onApply({ ...size, width })
|
|
3363
|
+
}
|
|
3364
|
+
),
|
|
3365
|
+
jsx28("span", { "aria-hidden": !0, className: FrameSize_default.times, children: "\xD7" }),
|
|
3366
|
+
jsx28(
|
|
3367
|
+
Dimension,
|
|
3368
|
+
{
|
|
3369
|
+
label: "Frame height",
|
|
3370
|
+
value: size.height,
|
|
3371
|
+
disabled,
|
|
3372
|
+
onApply: (height) => onApply({ ...size, height })
|
|
3373
|
+
}
|
|
3374
|
+
)
|
|
3375
|
+
] }) : null;
|
|
3376
|
+
|
|
3377
|
+
// src/viewport/components/ViewportSegments.tsx
|
|
3378
|
+
import { useMemo as useMemo8 } from "react";
|
|
3379
|
+
import { Button as Button4, Select as Select2 } from "@aussieljk/forkbook/internal/components";
|
|
3380
|
+
|
|
3381
|
+
// ../../node_modules/@base-ui/react/toggle/Toggle.mjs
|
|
3382
|
+
import * as React30 from "react";
|
|
3383
|
+
|
|
3384
|
+
// ../../node_modules/@base-ui/react/toggle-group/ToggleGroupContext.mjs
|
|
3385
|
+
import * as React29 from "react";
|
|
3386
|
+
var ToggleGroupContext = React29.createContext(void 0);
|
|
3387
|
+
process.env.NODE_ENV !== "production" && (ToggleGroupContext.displayName = "ToggleGroupContext");
|
|
3388
|
+
function useToggleGroupContext() {
|
|
3389
|
+
return React29.useContext(ToggleGroupContext);
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
// ../../node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs
|
|
3393
|
+
function CompositeItem(componentProps) {
|
|
3394
|
+
let {
|
|
3395
|
+
render,
|
|
3396
|
+
className,
|
|
3397
|
+
style,
|
|
3398
|
+
state = EMPTY_OBJECT,
|
|
3399
|
+
props = EMPTY_ARRAY,
|
|
3400
|
+
refs = EMPTY_ARRAY,
|
|
3401
|
+
metadata,
|
|
3402
|
+
stateAttributesMapping,
|
|
3403
|
+
tag = "div",
|
|
3404
|
+
...elementProps
|
|
3405
|
+
} = componentProps, {
|
|
3406
|
+
compositeProps,
|
|
3407
|
+
compositeRef
|
|
3408
|
+
} = useCompositeItem({
|
|
3409
|
+
metadata
|
|
3410
|
+
});
|
|
3411
|
+
return useRenderElement(tag, componentProps, {
|
|
3412
|
+
state,
|
|
3413
|
+
// The composite ref attaches first so an outer item wins when nested items share a DOM node.
|
|
3414
|
+
ref: [compositeRef, ...refs],
|
|
3415
|
+
props: [compositeProps, ...props, elementProps],
|
|
3416
|
+
stateAttributesMapping
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3420
|
+
// ../../node_modules/@base-ui/react/toggle/Toggle.mjs
|
|
3421
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3422
|
+
var Toggle = React30.forwardRef(function(componentProps, forwardedRef) {
|
|
3423
|
+
let {
|
|
3424
|
+
className,
|
|
3425
|
+
defaultPressed = !1,
|
|
3426
|
+
disabled: disabledProp = !1,
|
|
3427
|
+
form,
|
|
3428
|
+
// never participates in form validation
|
|
3429
|
+
onPressedChange,
|
|
3430
|
+
pressed: pressedProp,
|
|
3431
|
+
render,
|
|
3432
|
+
type,
|
|
3433
|
+
// cannot change button type
|
|
3434
|
+
value: valueProp,
|
|
3435
|
+
nativeButton = !0,
|
|
3436
|
+
style,
|
|
3437
|
+
...elementProps
|
|
3438
|
+
} = componentProps, value = useBaseUiId(valueProp || void 0), groupContext = useToggleGroupContext(), groupValue = groupContext?.value ?? [], disabled = (disabledProp || groupContext?.disabled) ?? !1;
|
|
3439
|
+
process.env.NODE_ENV !== "production" && React30.useEffect(() => {
|
|
3440
|
+
groupContext && valueProp === void 0 && groupContext.isValueInitialized && error("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.", "This will cause issues between the Toggle Group and Toggle values.", "Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.");
|
|
3441
|
+
}, [groupContext, valueProp, groupContext?.isValueInitialized]);
|
|
3442
|
+
let [pressed, setPressedState] = useControlled({
|
|
3443
|
+
controlled: groupContext ? value !== void 0 && groupValue.indexOf(value) > -1 : pressedProp,
|
|
3444
|
+
default: defaultPressed,
|
|
3445
|
+
name: "Toggle",
|
|
3446
|
+
state: "pressed"
|
|
3447
|
+
}), {
|
|
3448
|
+
getButtonProps,
|
|
3449
|
+
buttonRef
|
|
3450
|
+
} = useButton({
|
|
3451
|
+
disabled,
|
|
3452
|
+
native: nativeButton
|
|
3453
|
+
}), state = {
|
|
3454
|
+
disabled,
|
|
3455
|
+
pressed
|
|
3456
|
+
}, refs = [buttonRef, forwardedRef], props = [{
|
|
3457
|
+
"aria-pressed": pressed,
|
|
3458
|
+
onClick(event) {
|
|
3459
|
+
let nextPressed = !pressed, details = createChangeEventDetails(reason_parts_exports.none, event.nativeEvent);
|
|
3460
|
+
onPressedChange?.(nextPressed, details), !details.isCanceled && (value && groupContext?.setGroupValue?.(value, nextPressed, details), !details.isCanceled && setPressedState(nextPressed));
|
|
3461
|
+
}
|
|
3462
|
+
}, elementProps, getButtonProps], element = useRenderElement("button", componentProps, {
|
|
3463
|
+
enabled: !groupContext,
|
|
3464
|
+
state,
|
|
3465
|
+
ref: refs,
|
|
3466
|
+
props
|
|
3467
|
+
}), itemMetadata = React30.useMemo(() => ({
|
|
3468
|
+
disabled,
|
|
3469
|
+
focusableWhenDisabled: !1
|
|
3470
|
+
}), [disabled]);
|
|
3471
|
+
return groupContext ? _jsx(CompositeItem, {
|
|
3472
|
+
tag: "button",
|
|
3473
|
+
render,
|
|
3474
|
+
className,
|
|
3475
|
+
style,
|
|
3476
|
+
metadata: itemMetadata,
|
|
3477
|
+
state,
|
|
3478
|
+
refs,
|
|
3479
|
+
props
|
|
3480
|
+
}) : element;
|
|
3481
|
+
});
|
|
3482
|
+
process.env.NODE_ENV !== "production" && (Toggle.displayName = "Toggle");
|
|
3483
|
+
|
|
3484
|
+
// ../../node_modules/@base-ui/react/toggle-group/ToggleGroup.mjs
|
|
3485
|
+
import * as React32 from "react";
|
|
3486
|
+
|
|
3487
|
+
// ../../node_modules/@base-ui/react/toolbar/group/ToolbarGroupContext.mjs
|
|
3488
|
+
import * as React31 from "react";
|
|
3489
|
+
var ToolbarGroupContext = React31.createContext(void 0);
|
|
3490
|
+
process.env.NODE_ENV !== "production" && (ToolbarGroupContext.displayName = "ToolbarGroupContext");
|
|
3491
|
+
function useToolbarGroupContext() {
|
|
3492
|
+
return React31.useContext(ToolbarGroupContext);
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
// ../../node_modules/@base-ui/react/toggle-group/ToggleGroup.mjs
|
|
3496
|
+
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
3497
|
+
var ToggleGroup = React32.forwardRef(function(componentProps, forwardedRef) {
|
|
3498
|
+
let {
|
|
3499
|
+
defaultValue: defaultValueProp,
|
|
3500
|
+
disabled: disabledProp = !1,
|
|
3501
|
+
loopFocus = !0,
|
|
3502
|
+
onValueChange,
|
|
3503
|
+
orientation = "horizontal",
|
|
3504
|
+
multiple = !1,
|
|
3505
|
+
value: valueProp,
|
|
3506
|
+
className,
|
|
3507
|
+
render,
|
|
3508
|
+
style,
|
|
3509
|
+
...elementProps
|
|
3510
|
+
} = componentProps, toolbarContext = useToolbarRootContext(!0), toolbarGroupContext = useToolbarGroupContext(), defaultValue = defaultValueProp ?? EMPTY_ARRAY, isValueInitialized = valueProp !== void 0 || defaultValueProp !== void 0, disabled = (toolbarContext?.disabled ?? !1) || (toolbarGroupContext?.disabled ?? !1) || disabledProp, [groupValue, setValueState] = useControlled({
|
|
3511
|
+
controlled: valueProp,
|
|
3512
|
+
default: defaultValue,
|
|
3513
|
+
name: "ToggleGroup",
|
|
3514
|
+
state: "value"
|
|
3515
|
+
}), setGroupValue = useStableCallback((newValue, nextPressed, eventDetails) => {
|
|
3516
|
+
let newGroupValue;
|
|
3517
|
+
multiple ? (newGroupValue = groupValue.slice(), nextPressed ? newGroupValue.push(newValue) : newGroupValue.splice(groupValue.indexOf(newValue), 1)) : newGroupValue = nextPressed ? [newValue] : [], onValueChange?.(newGroupValue, eventDetails), !eventDetails.isCanceled && setValueState(newGroupValue);
|
|
3518
|
+
}), state = {
|
|
3519
|
+
disabled,
|
|
3520
|
+
multiple,
|
|
3521
|
+
orientation
|
|
3522
|
+
}, contextValue = React32.useMemo(() => ({
|
|
3523
|
+
disabled,
|
|
3524
|
+
setGroupValue,
|
|
3525
|
+
value: groupValue,
|
|
3526
|
+
isValueInitialized
|
|
3527
|
+
}), [disabled, setGroupValue, groupValue, isValueInitialized]), defaultProps = {
|
|
3528
|
+
role: "group"
|
|
3529
|
+
}, element = useRenderElement("div", componentProps, {
|
|
3530
|
+
enabled: !!toolbarContext,
|
|
3531
|
+
state,
|
|
3532
|
+
ref: forwardedRef,
|
|
3533
|
+
props: [defaultProps, elementProps]
|
|
3534
|
+
});
|
|
3535
|
+
return _jsx2(ToggleGroupContext.Provider, {
|
|
3536
|
+
value: contextValue,
|
|
3537
|
+
children: toolbarContext ? element : _jsx2(CompositeRoot, {
|
|
3538
|
+
render,
|
|
3539
|
+
className,
|
|
3540
|
+
style,
|
|
3541
|
+
state,
|
|
3542
|
+
refs: [forwardedRef],
|
|
3543
|
+
props: [defaultProps, elementProps],
|
|
3544
|
+
loopFocus,
|
|
3545
|
+
enableHomeAndEndKeys: !0,
|
|
3546
|
+
orientation
|
|
3547
|
+
})
|
|
3548
|
+
});
|
|
3549
|
+
});
|
|
3550
|
+
process.env.NODE_ENV !== "production" && (ToggleGroup.displayName = "ToggleGroup");
|
|
3551
|
+
|
|
3552
|
+
// src/viewport/components/ViewportSegments.tsx
|
|
3553
|
+
import { EllipsisIcon, Maximize2Icon, MonitorIcon, SmartphoneIcon as SmartphoneIcon2, TabletIcon as TabletIcon2 } from "lucide-react";
|
|
3554
|
+
|
|
3268
3555
|
// src/viewport/viewportIcons.tsx
|
|
3269
|
-
import {
|
|
3270
|
-
|
|
3271
|
-
DeviceMobileIcon,
|
|
3272
|
-
DeviceTabletIcon,
|
|
3273
|
-
DiamondIcon,
|
|
3274
|
-
WatchIcon
|
|
3275
|
-
} from "@phosphor-icons/react";
|
|
3276
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3556
|
+
import { AppWindowIcon, SmartphoneIcon, TabletIcon, DiamondIcon, WatchIcon } from "lucide-react";
|
|
3557
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3277
3558
|
var iconsMap = {
|
|
3278
|
-
desktop:
|
|
3279
|
-
mobile:
|
|
3280
|
-
tablet:
|
|
3281
|
-
watch:
|
|
3282
|
-
other:
|
|
3559
|
+
desktop: jsx29(AppWindowIcon, {}),
|
|
3560
|
+
mobile: jsx29(SmartphoneIcon, {}),
|
|
3561
|
+
tablet: jsx29(TabletIcon, {}),
|
|
3562
|
+
watch: jsx29(WatchIcon, {}),
|
|
3563
|
+
other: jsx29(DiamondIcon, {})
|
|
3564
|
+
};
|
|
3565
|
+
|
|
3566
|
+
// src/viewport/components/segments.ts
|
|
3567
|
+
var SEGMENT_KINDS = ["mobile", "tablet", "desktop"], NAME_PATTERNS = {
|
|
3568
|
+
mobile: /mobile|phone/i,
|
|
3569
|
+
tablet: /tablet|ipad/i,
|
|
3570
|
+
desktop: /desktop|laptop/i
|
|
3571
|
+
}, mapSegments = (viewports) => {
|
|
3572
|
+
let keys = Object.keys(viewports), used = /* @__PURE__ */ new Set(), segments = {}, pick = (kind, test) => {
|
|
3573
|
+
if (segments[kind])
|
|
3574
|
+
return;
|
|
3575
|
+
let key = keys.find((k) => !used.has(k) && test(k));
|
|
3576
|
+
key && (segments[kind] = key, used.add(key));
|
|
3577
|
+
};
|
|
3578
|
+
for (let kind of SEGMENT_KINDS)
|
|
3579
|
+
pick(kind, (k) => viewports[k].type === kind);
|
|
3580
|
+
for (let kind of SEGMENT_KINDS)
|
|
3581
|
+
pick(kind, (k) => NAME_PATTERNS[kind].test(`${k} ${viewports[k].name}`));
|
|
3582
|
+
return { segments, overflow: keys.filter((k) => !used.has(k)) };
|
|
3283
3583
|
};
|
|
3284
3584
|
|
|
3285
3585
|
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/viewport/components/Tool.module.css
|
|
3286
|
-
var
|
|
3287
|
-
if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${
|
|
3586
|
+
var id13 = "core/src/viewport/components/Tool.module.css";
|
|
3587
|
+
if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id13}"]`)) {
|
|
3288
3588
|
let style = document.createElement("style");
|
|
3289
|
-
style.setAttribute("data-fb-css",
|
|
3589
|
+
style.setAttribute("data-fb-css", id13), style.textContent = ".fb-vBOFLW-dimensions{font-family:var(--fb-font-mono);font-size:calc(var(--fb-size-s1) - 1px);font-weight:var(--fb-weight-regular);color:var(--fb-text-muted-color);gap:2px;margin-left:20px;display:flex}.fb-vBOFLW-segments{box-shadow:var(--fb-app-border-color) 0 0 0 1px inset;border-radius:4px;align-items:center;gap:1px;padding:1px;display:inline-flex}.fb-vBOFLW-segment:where([data-pressed]){background:rgb(from var(--fb-bar-selected-color) r g b / calc(alpha - .93));color:var(--fb-bar-selected-color)}", document.head.appendChild(style);
|
|
3290
3590
|
}
|
|
3291
|
-
var Tool_default = { dimensions: "fb-vBOFLW-dimensions" };
|
|
3591
|
+
var Tool_default = { segment: "fb-vBOFLW-segment", dimensions: "fb-vBOFLW-dimensions", segments: "fb-vBOFLW-segments" };
|
|
3592
|
+
|
|
3593
|
+
// src/viewport/components/ViewportSegments.tsx
|
|
3594
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3595
|
+
var FULL = "full", SEGMENT_ICONS = {
|
|
3596
|
+
mobile: jsx30(SmartphoneIcon2, {}),
|
|
3597
|
+
tablet: jsx30(TabletIcon2, {}),
|
|
3598
|
+
desktop: jsx30(MonitorIcon, {})
|
|
3599
|
+
}, SEGMENT_LABELS = {
|
|
3600
|
+
mobile: "Mobile",
|
|
3601
|
+
tablet: "Tablet",
|
|
3602
|
+
desktop: "Desktop"
|
|
3603
|
+
}, ViewportSegments = ({
|
|
3604
|
+
viewports,
|
|
3605
|
+
value,
|
|
3606
|
+
isDefault,
|
|
3607
|
+
isLocked = !1,
|
|
3608
|
+
onSelect,
|
|
3609
|
+
onReset
|
|
3610
|
+
}) => {
|
|
3611
|
+
let { segments, overflow } = useMemo8(() => mapSegments(viewports), [viewports]), pressed = isDefault ? FULL : SEGMENT_KINDS.find((kind) => segments[kind] === value), overflowOptions = useMemo8(
|
|
3612
|
+
() => overflow.map((key) => ({
|
|
3613
|
+
value: key,
|
|
3614
|
+
title: viewports[key].name,
|
|
3615
|
+
icon: iconsMap[viewports[key].type ?? "other"],
|
|
3616
|
+
right: jsxs17("div", { className: Tool_default.dimensions, children: [
|
|
3617
|
+
jsx30("span", { children: viewports[key].styles.width.replace("px", "") }),
|
|
3618
|
+
jsx30("span", { children: "\xD7" }),
|
|
3619
|
+
jsx30("span", { children: viewports[key].styles.height.replace("px", "") })
|
|
3620
|
+
] })
|
|
3621
|
+
})),
|
|
3622
|
+
[overflow, viewports]
|
|
3623
|
+
), lockedNote = isLocked ? " (set by story parameters)" : "";
|
|
3624
|
+
return jsxs17(Fragment10, { children: [
|
|
3625
|
+
jsxs17(
|
|
3626
|
+
ToggleGroup,
|
|
3627
|
+
{
|
|
3628
|
+
className: Tool_default.segments,
|
|
3629
|
+
"aria-label": `Viewport size${lockedNote}`,
|
|
3630
|
+
value: pressed ? [pressed] : [],
|
|
3631
|
+
disabled: isLocked,
|
|
3632
|
+
onValueChange: (next) => {
|
|
3633
|
+
let [picked] = next;
|
|
3634
|
+
picked === FULL ? onReset() : picked && segments[picked] && onSelect(segments[picked]);
|
|
3635
|
+
},
|
|
3636
|
+
children: [
|
|
3637
|
+
SEGMENT_KINDS.filter((kind) => segments[kind]).map((kind) => jsx30(
|
|
3638
|
+
Toggle,
|
|
3639
|
+
{
|
|
3640
|
+
value: kind,
|
|
3641
|
+
className: Tool_default.segment,
|
|
3642
|
+
render: jsx30(
|
|
3643
|
+
Button4,
|
|
3644
|
+
{
|
|
3645
|
+
variant: "ghost",
|
|
3646
|
+
padding: "small",
|
|
3647
|
+
size: "small",
|
|
3648
|
+
ariaLabel: `${SEGMENT_LABELS[kind]}: ${viewports[segments[kind]].name}${lockedNote}`
|
|
3649
|
+
}
|
|
3650
|
+
),
|
|
3651
|
+
children: SEGMENT_ICONS[kind]
|
|
3652
|
+
},
|
|
3653
|
+
kind
|
|
3654
|
+
)),
|
|
3655
|
+
jsx30(
|
|
3656
|
+
Toggle,
|
|
3657
|
+
{
|
|
3658
|
+
value: FULL,
|
|
3659
|
+
className: Tool_default.segment,
|
|
3660
|
+
render: jsx30(
|
|
3661
|
+
Button4,
|
|
3662
|
+
{
|
|
3663
|
+
variant: "ghost",
|
|
3664
|
+
padding: "small",
|
|
3665
|
+
size: "small",
|
|
3666
|
+
ariaLabel: `Full size (reset viewport)${lockedNote}`
|
|
3667
|
+
}
|
|
3668
|
+
),
|
|
3669
|
+
children: jsx30(Maximize2Icon, {})
|
|
3670
|
+
}
|
|
3671
|
+
)
|
|
3672
|
+
]
|
|
3673
|
+
}
|
|
3674
|
+
),
|
|
3675
|
+
overflowOptions.length > 0 && jsx30(
|
|
3676
|
+
Select2,
|
|
3677
|
+
{
|
|
3678
|
+
padding: "small",
|
|
3679
|
+
disabled: isLocked,
|
|
3680
|
+
ariaLabel: `More viewports${lockedNote}`,
|
|
3681
|
+
tooltip: "More viewports",
|
|
3682
|
+
defaultOptions: value && overflow.includes(value) ? value : void 0,
|
|
3683
|
+
options: overflowOptions,
|
|
3684
|
+
onSelect: (selected) => onSelect(selected),
|
|
3685
|
+
icon: jsx30(EllipsisIcon, {})
|
|
3686
|
+
},
|
|
3687
|
+
"viewport-more"
|
|
3688
|
+
)
|
|
3689
|
+
] });
|
|
3690
|
+
};
|
|
3292
3691
|
|
|
3293
3692
|
// src/viewport/components/Tool.tsx
|
|
3294
|
-
import { jsx as
|
|
3693
|
+
import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3295
3694
|
var ViewportTool = () => {
|
|
3296
|
-
let {
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
isCustom,
|
|
3301
|
-
isLocked,
|
|
3302
|
-
options: viewportMap,
|
|
3303
|
-
reset,
|
|
3304
|
-
select
|
|
3305
|
-
} = useViewport(), options = useMemo6(() => {
|
|
3306
|
-
let presetOptions = Object.entries(viewportMap).map(([k, value2]) => ({
|
|
3307
|
-
value: k,
|
|
3308
|
-
title: value2.name,
|
|
3309
|
-
icon: iconsMap[value2.type],
|
|
3310
|
-
right: jsxs16("div", { className: Tool_default.dimensions, children: [
|
|
3311
|
-
jsx29("span", { children: value2.styles.width.replace("px", "") }),
|
|
3312
|
-
jsx29("span", { children: "\xD7" }),
|
|
3313
|
-
jsx29("span", { children: value2.styles.height.replace("px", "") })
|
|
3314
|
-
] })
|
|
3315
|
-
}));
|
|
3316
|
-
return isCustom && value ? [
|
|
3317
|
-
...presetOptions,
|
|
3695
|
+
let { option, isDefault, isLocked, options, reset, resize, select } = useViewport(), frameSize = usePreviewFrameSize();
|
|
3696
|
+
return jsxs18(Fragment11, { children: [
|
|
3697
|
+
jsx31(
|
|
3698
|
+
ViewportSegments,
|
|
3318
3699
|
{
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3700
|
+
viewports: options,
|
|
3701
|
+
value: option,
|
|
3702
|
+
isDefault,
|
|
3703
|
+
isLocked,
|
|
3704
|
+
onSelect: select,
|
|
3705
|
+
onReset: reset
|
|
3323
3706
|
}
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
tooltip: isLocked ? "Viewport set by story parameters" : "Change viewport",
|
|
3335
|
-
defaultOptions: value,
|
|
3336
|
-
options,
|
|
3337
|
-
onSelect: (selected) => select(selected),
|
|
3338
|
-
icon: jsx29(ArrowsOutIcon, {}),
|
|
3339
|
-
children: isDefault ? null : name
|
|
3340
|
-
},
|
|
3341
|
-
"viewport"
|
|
3342
|
-
);
|
|
3707
|
+
),
|
|
3708
|
+
jsx31(
|
|
3709
|
+
FrameSize,
|
|
3710
|
+
{
|
|
3711
|
+
size: frameSize,
|
|
3712
|
+
disabled: isLocked,
|
|
3713
|
+
onApply: ({ width, height }) => resize(`${width}px`, `${height}px`)
|
|
3714
|
+
}
|
|
3715
|
+
)
|
|
3716
|
+
] });
|
|
3343
3717
|
};
|
|
3344
3718
|
|
|
3345
3719
|
// src/viewport/manager.tsx
|
|
3346
|
-
import { jsx as
|
|
3720
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3347
3721
|
var manager_default9 = addons9.register(ADDON_ID, () => {
|
|
3348
3722
|
globalThis?.FEATURES?.viewport && addons9.add(TOOL_ID, {
|
|
3349
3723
|
title: "viewport / media-queries",
|
|
3350
3724
|
type: types7.TOOL,
|
|
3351
3725
|
match: ({ viewMode }) => viewMode === "story",
|
|
3352
|
-
render: () =>
|
|
3726
|
+
render: () => jsx32(ViewportTool, {})
|
|
3353
3727
|
});
|
|
3354
3728
|
});
|
|
3355
3729
|
|