@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatErrorMessage_default
|
|
3
|
+
} from "./chunk-XTQCLWVH.js";
|
|
4
|
+
|
|
5
|
+
// ../../node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
var ToolbarRootContext = React.createContext(void 0);
|
|
8
|
+
process.env.NODE_ENV !== "production" && (ToolbarRootContext.displayName = "ToolbarRootContext");
|
|
9
|
+
function useToolbarRootContext(optional) {
|
|
10
|
+
let context = React.useContext(ToolbarRootContext);
|
|
11
|
+
if (context === void 0 && !optional)
|
|
12
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>." : formatErrorMessage_default(69));
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
useToolbarRootContext
|
|
18
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PARAM_KEY
|
|
3
3
|
} from "./chunk-ENKK74N4.js";
|
|
4
|
+
import {
|
|
5
|
+
entryUrlPath
|
|
6
|
+
} from "./chunk-C5TKXHTM.js";
|
|
4
7
|
import {
|
|
5
8
|
global
|
|
6
9
|
} from "./chunk-6AKCRYVX.js";
|
|
@@ -19,8 +22,8 @@ function parseQuery(queryString) {
|
|
|
19
22
|
return query;
|
|
20
23
|
}
|
|
21
24
|
var navigate = (params) => addons.getChannel().emit(SELECT_STORY, params), generateStoryUrl = (title, name) => {
|
|
22
|
-
let { location } = document, query = parseQuery(location.search), existingId = query.id ?? query.path?.match(/^\/story\/(.+)$/)?.[1], titleToLink = title || existingId?.split("--", 2)[0] || "",
|
|
23
|
-
return `${location.origin + sbPath}
|
|
25
|
+
let { location } = document, query = parseQuery(location.search), existingId = query.id ?? query.path?.match(/^\/story\/(.+)$/)?.[1], titleToLink = title || existingId?.split("--", 2)[0] || "", urlPath = title && entryUrlPath({ title, name }) || `/_story/${toId(titleToLink, name)}`, sbPath = location.pathname.replace(/iframe\.html$/, "");
|
|
26
|
+
return `${location.origin + sbPath}${urlPath.slice(1)}`;
|
|
24
27
|
}, hrefTo = (title, name) => new Promise((resolve) => {
|
|
25
28
|
resolve(generateStoryUrl(title, name));
|
|
26
29
|
}), hrefToSync = (title, name) => generateStoryUrl(title, name), valueOrCall = (args) => (value) => typeof value == "function" ? value(...args) : value, linkTo = (idOrTitle, nameInput) => (...args) => {
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ARROW_DOWN,
|
|
3
|
+
ARROW_LEFT,
|
|
4
|
+
ARROW_RIGHT,
|
|
5
|
+
ARROW_UP,
|
|
6
|
+
COMPOSITE_KEYS,
|
|
7
|
+
CompositeRootContext,
|
|
8
|
+
EMPTY_ARRAY,
|
|
9
|
+
EMPTY_OBJECT,
|
|
10
|
+
END,
|
|
11
|
+
HOME,
|
|
12
|
+
MODIFIER_KEYS,
|
|
13
|
+
error,
|
|
14
|
+
findNonDisabledListIndex,
|
|
15
|
+
getMaxListIndex,
|
|
16
|
+
getMinListIndex,
|
|
17
|
+
getTarget,
|
|
18
|
+
isIndexOutOfListBounds,
|
|
19
|
+
isListIndexDisabled,
|
|
20
|
+
isNativeInput,
|
|
21
|
+
scrollIntoViewIfNeeded,
|
|
22
|
+
useCompositeRootContext,
|
|
23
|
+
useDirection,
|
|
24
|
+
useIsoLayoutEffect,
|
|
25
|
+
useMergedRefs,
|
|
26
|
+
useRefWithInit,
|
|
27
|
+
useRenderElement,
|
|
28
|
+
useStableCallback
|
|
29
|
+
} from "./chunk-XTQCLWVH.js";
|
|
30
|
+
|
|
31
|
+
// ../../node_modules/@base-ui/utils/useControlled.mjs
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
function useControlled({
|
|
34
|
+
controlled,
|
|
35
|
+
default: defaultProp,
|
|
36
|
+
name,
|
|
37
|
+
state = "value"
|
|
38
|
+
}) {
|
|
39
|
+
let {
|
|
40
|
+
current: isControlled
|
|
41
|
+
} = React.useRef(controlled !== void 0), [valueState, setValue] = React.useState(() => defaultProp), value = isControlled && controlled !== void 0 ? controlled : valueState;
|
|
42
|
+
if (process.env.NODE_ENV !== "production") {
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
isControlled !== (controlled !== void 0) && error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
45
|
+
`));
|
|
46
|
+
}, [state, name, controlled]);
|
|
47
|
+
let {
|
|
48
|
+
current: defaultValue
|
|
49
|
+
} = React.useRef(defaultProp);
|
|
50
|
+
React.useEffect(() => {
|
|
51
|
+
!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp) && error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join(`
|
|
52
|
+
`));
|
|
53
|
+
}, [defaultProp]);
|
|
54
|
+
}
|
|
55
|
+
let setValueIfUncontrolled = React.useCallback((newValue) => {
|
|
56
|
+
isControlled || setValue(newValue);
|
|
57
|
+
}, []);
|
|
58
|
+
return [value, setValueIfUncontrolled];
|
|
59
|
+
}
|
|
60
|
+
function serializeToDevModeString(input) {
|
|
61
|
+
let nextId = 0, seen = /* @__PURE__ */ new WeakMap();
|
|
62
|
+
try {
|
|
63
|
+
return JSON.stringify(input, function(key, value) {
|
|
64
|
+
if (!(key === "_owner" && this != null && typeof this == "object" && "$$typeof" in this)) {
|
|
65
|
+
if (typeof value == "bigint")
|
|
66
|
+
return `__bigint__:${value}`;
|
|
67
|
+
if (value !== null && typeof value == "object") {
|
|
68
|
+
let id = seen.get(value);
|
|
69
|
+
if (id !== void 0)
|
|
70
|
+
return `__object__:${id}`;
|
|
71
|
+
seen.set(value, nextId), nextId += 1;
|
|
72
|
+
}
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
}) ?? `__top__:${typeof input}`;
|
|
76
|
+
} catch {
|
|
77
|
+
return "__unserializable__";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ../../node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
|
|
82
|
+
import * as React3 from "react";
|
|
83
|
+
|
|
84
|
+
// ../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
|
|
85
|
+
import * as React2 from "react";
|
|
86
|
+
var CompositeListContext = React2.createContext({
|
|
87
|
+
register: () => {
|
|
88
|
+
},
|
|
89
|
+
unregister: () => {
|
|
90
|
+
},
|
|
91
|
+
subscribeMapChange: () => () => {
|
|
92
|
+
},
|
|
93
|
+
nextIndexRef: {
|
|
94
|
+
current: 0
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
process.env.NODE_ENV !== "production" && (CompositeListContext.displayName = "CompositeListContext");
|
|
98
|
+
function useCompositeListContext() {
|
|
99
|
+
return React2.useContext(CompositeListContext);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ../../node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
|
|
103
|
+
function useCompositeListItem(params = {}) {
|
|
104
|
+
let {
|
|
105
|
+
guess,
|
|
106
|
+
label,
|
|
107
|
+
metadata,
|
|
108
|
+
textRef,
|
|
109
|
+
index: externalIndex
|
|
110
|
+
} = params, {
|
|
111
|
+
register,
|
|
112
|
+
unregister,
|
|
113
|
+
subscribeMapChange,
|
|
114
|
+
nextIndexRef
|
|
115
|
+
} = useCompositeListContext(), indexRef = React3.useRef(-1), [internalIndex, setInternalIndex] = React3.useState(externalIndex == null && guess ? () => {
|
|
116
|
+
if (indexRef.current === -1) {
|
|
117
|
+
let newIndex = nextIndexRef.current;
|
|
118
|
+
nextIndexRef.current += 1, indexRef.current = newIndex;
|
|
119
|
+
}
|
|
120
|
+
return indexRef.current;
|
|
121
|
+
} : -1), index = externalIndex ?? internalIndex, componentRef = React3.useRef(null), ref = React3.useCallback((node) => {
|
|
122
|
+
let previousNode = componentRef.current;
|
|
123
|
+
previousNode && unregister(previousNode), componentRef.current = node, node && register(node, {
|
|
124
|
+
metadata: metadata ?? null,
|
|
125
|
+
index: externalIndex ?? null,
|
|
126
|
+
label,
|
|
127
|
+
textRef
|
|
128
|
+
});
|
|
129
|
+
}, [externalIndex, register, unregister, metadata, label, textRef]);
|
|
130
|
+
return useIsoLayoutEffect(() => {
|
|
131
|
+
if (externalIndex == null)
|
|
132
|
+
return subscribeMapChange((map) => {
|
|
133
|
+
let i = componentRef.current ? map.get(componentRef.current)?.index : null;
|
|
134
|
+
i != null && setInternalIndex(i);
|
|
135
|
+
});
|
|
136
|
+
}, [externalIndex, subscribeMapChange]), {
|
|
137
|
+
ref,
|
|
138
|
+
index
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ../../node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
|
|
143
|
+
import * as React4 from "react";
|
|
144
|
+
function useCompositeItem(params = {}) {
|
|
145
|
+
let {
|
|
146
|
+
highlightItemOnHover,
|
|
147
|
+
highlightedIndex,
|
|
148
|
+
onHighlightedIndexChange
|
|
149
|
+
} = useCompositeRootContext(), {
|
|
150
|
+
ref,
|
|
151
|
+
index
|
|
152
|
+
} = useCompositeListItem(params), isHighlighted = highlightedIndex === index, itemRef = React4.useRef(null), mergedRef = useMergedRefs(ref, itemRef);
|
|
153
|
+
return {
|
|
154
|
+
compositeProps: {
|
|
155
|
+
tabIndex: isHighlighted ? 0 : -1,
|
|
156
|
+
onFocus() {
|
|
157
|
+
onHighlightedIndexChange(index);
|
|
158
|
+
},
|
|
159
|
+
onMouseMove() {
|
|
160
|
+
let item = itemRef.current;
|
|
161
|
+
if (!highlightItemOnHover || !item)
|
|
162
|
+
return;
|
|
163
|
+
let disabled = item.hasAttribute("disabled") || item.ariaDisabled === "true";
|
|
164
|
+
!isHighlighted && !disabled && item.focus();
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
compositeRef: mergedRef,
|
|
168
|
+
index
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// ../../node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
|
|
173
|
+
import * as React5 from "react";
|
|
174
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
175
|
+
function CompositeList(props) {
|
|
176
|
+
let {
|
|
177
|
+
children,
|
|
178
|
+
elementsRef,
|
|
179
|
+
labelsRef,
|
|
180
|
+
onMapChange: onMapChangeProp
|
|
181
|
+
} = props, onMapChange = useStableCallback(onMapChangeProp), [, setMapTick] = React5.useState(0), listeners = useRefWithInit(createListeners).current, map = useRefWithInit(createMap).current, nextIndexRef = React5.useRef(0), isDirtyRef = React5.useRef(!0), itemsRef = React5.useRef(null), mutationObserverRef = React5.useRef(null), scheduleMapUpdate = useStableCallback(() => {
|
|
182
|
+
isDirtyRef.current || (isDirtyRef.current = !0, setMapTick((tick) => tick + 1));
|
|
183
|
+
}), register = useStableCallback((node, registration) => {
|
|
184
|
+
map.set(node, registration), scheduleMapUpdate();
|
|
185
|
+
}), unregister = useStableCallback((node) => {
|
|
186
|
+
map.delete(node), scheduleMapUpdate();
|
|
187
|
+
}), syncRefs = useStableCallback((items) => {
|
|
188
|
+
let nextMap = /* @__PURE__ */ new Map();
|
|
189
|
+
return elementsRef.current.length = 0, labelsRef && (labelsRef.current.length = 0), items.forEach((item) => {
|
|
190
|
+
nextMap.set(item.element, {
|
|
191
|
+
...item.registration.metadata ?? {},
|
|
192
|
+
index: item.index
|
|
193
|
+
}), elementsRef.current[item.index] = item.element, labelsRef && (labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent);
|
|
194
|
+
}), nextIndexRef.current = elementsRef.current.length, nextMap;
|
|
195
|
+
});
|
|
196
|
+
function observe(sortedNodes) {
|
|
197
|
+
if (mutationObserverRef.current?.disconnect(), mutationObserverRef.current = null, typeof MutationObserver != "function" || sortedNodes.length < 2)
|
|
198
|
+
return;
|
|
199
|
+
let mutationObserver = new MutationObserver((entries) => {
|
|
200
|
+
if (!hasMovedNode(entries))
|
|
201
|
+
return;
|
|
202
|
+
let previousConnectedNode = null;
|
|
203
|
+
for (let node of sortedNodes)
|
|
204
|
+
if (node.isConnected) {
|
|
205
|
+
if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
|
|
206
|
+
mutationObserver.disconnect(), scheduleMapUpdate();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
previousConnectedNode = node;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
mutationObserverRef.current = mutationObserver;
|
|
213
|
+
let roots = /* @__PURE__ */ new Set();
|
|
214
|
+
for (let i = 1; i < sortedNodes.length; i += 1) {
|
|
215
|
+
let root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
|
|
216
|
+
root && roots.add(root);
|
|
217
|
+
}
|
|
218
|
+
roots.forEach((root) => mutationObserver.observe(root, {
|
|
219
|
+
childList: !0
|
|
220
|
+
}));
|
|
221
|
+
}
|
|
222
|
+
let flush = useStableCallback(() => {
|
|
223
|
+
let [items, automaticNodes] = getCompositeListSnapshot(map), nextMap = syncRefs(items), previousItems = itemsRef.current, changed = !previousItems || previousItems.length !== items.length || items.some((item, index) => {
|
|
224
|
+
let previousItem = previousItems[index];
|
|
225
|
+
return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
|
|
226
|
+
});
|
|
227
|
+
observe(automaticNodes), itemsRef.current = items, isDirtyRef.current = !1, changed && (listeners.forEach((listener) => listener(nextMap)), onMapChange(nextMap));
|
|
228
|
+
});
|
|
229
|
+
useIsoLayoutEffect(() => (!isDirtyRef.current && itemsRef.current && syncRefs(itemsRef.current), () => {
|
|
230
|
+
elementsRef.current = [], labelsRef && (labelsRef.current = []);
|
|
231
|
+
}), [elementsRef, labelsRef, syncRefs]), useIsoLayoutEffect(() => {
|
|
232
|
+
isDirtyRef.current && flush();
|
|
233
|
+
}), useIsoLayoutEffect(() => () => {
|
|
234
|
+
mutationObserverRef.current?.disconnect(), isDirtyRef.current = !0;
|
|
235
|
+
}, []);
|
|
236
|
+
let subscribeMapChange = useStableCallback((fn) => (listeners.add(fn), () => {
|
|
237
|
+
listeners.delete(fn);
|
|
238
|
+
})), contextValue = React5.useMemo(() => ({
|
|
239
|
+
register,
|
|
240
|
+
unregister,
|
|
241
|
+
subscribeMapChange,
|
|
242
|
+
nextIndexRef
|
|
243
|
+
}), [register, unregister, subscribeMapChange, nextIndexRef]);
|
|
244
|
+
return _jsx(CompositeListContext.Provider, {
|
|
245
|
+
value: contextValue,
|
|
246
|
+
children
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function createMap() {
|
|
250
|
+
return /* @__PURE__ */ new Map();
|
|
251
|
+
}
|
|
252
|
+
function createListeners() {
|
|
253
|
+
return /* @__PURE__ */ new Set();
|
|
254
|
+
}
|
|
255
|
+
function getCompositeListSnapshot(map) {
|
|
256
|
+
let reservedIndices = /* @__PURE__ */ new Set(), items = [], automaticItems = [];
|
|
257
|
+
map.forEach((registration, node) => {
|
|
258
|
+
if (!node.isConnected)
|
|
259
|
+
return;
|
|
260
|
+
let index = registration.index, item = {
|
|
261
|
+
index: index ?? -1,
|
|
262
|
+
element: node,
|
|
263
|
+
registration
|
|
264
|
+
};
|
|
265
|
+
index === null ? automaticItems.push(item) : index >= 0 && (reservedIndices.add(index), items.push(item));
|
|
266
|
+
});
|
|
267
|
+
let nextAutomaticIndex = 0;
|
|
268
|
+
return automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element)), automaticItems.forEach((item) => {
|
|
269
|
+
for (; reservedIndices.has(nextAutomaticIndex); )
|
|
270
|
+
nextAutomaticIndex += 1;
|
|
271
|
+
item.index = nextAutomaticIndex, items.push(item), nextAutomaticIndex += 1;
|
|
272
|
+
}), reservedIndices.size > 0 && items.sort((a, b) => a.index - b.index), [items, automaticItems.map((item) => item.element)];
|
|
273
|
+
}
|
|
274
|
+
function getCommonAncestor(firstNode, lastNode) {
|
|
275
|
+
let ancestor = firstNode.parentElement;
|
|
276
|
+
for (; ancestor && !ancestor.contains(lastNode); )
|
|
277
|
+
ancestor = ancestor.parentElement;
|
|
278
|
+
return ancestor;
|
|
279
|
+
}
|
|
280
|
+
function hasMovedNode(entries) {
|
|
281
|
+
for (let entry of entries)
|
|
282
|
+
for (let i = 0; i < entry.removedNodes.length; i += 1)
|
|
283
|
+
if (entry.removedNodes[i].isConnected)
|
|
284
|
+
return !0;
|
|
285
|
+
return !1;
|
|
286
|
+
}
|
|
287
|
+
function sortByDocumentPosition(a, b) {
|
|
288
|
+
return a.nextElementSibling === b ? -1 : b.nextElementSibling === a ? 1 : a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// ../../node_modules/@base-ui/react/internals/composite/constants.mjs
|
|
292
|
+
var ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
|
|
293
|
+
|
|
294
|
+
// ../../node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
|
|
295
|
+
import * as React7 from "react";
|
|
296
|
+
|
|
297
|
+
// ../../node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
|
|
298
|
+
import * as React6 from "react";
|
|
299
|
+
|
|
300
|
+
// ../../node_modules/@base-ui/utils/isElementDisabled.mjs
|
|
301
|
+
function isElementDisabled(element) {
|
|
302
|
+
return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// ../../node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
|
|
306
|
+
function useCompositeRoot(params) {
|
|
307
|
+
let {
|
|
308
|
+
loopFocus = !0,
|
|
309
|
+
orientation = "both",
|
|
310
|
+
grid,
|
|
311
|
+
onLoop,
|
|
312
|
+
direction,
|
|
313
|
+
highlightedIndex: externalHighlightedIndex,
|
|
314
|
+
onHighlightedIndexChange: externalSetHighlightedIndex,
|
|
315
|
+
rootRef: externalRef,
|
|
316
|
+
enableHomeAndEndKeys = !1,
|
|
317
|
+
stopEventPropagation,
|
|
318
|
+
disabledIndices,
|
|
319
|
+
modifierKeys = EMPTY_ARRAY
|
|
320
|
+
} = params, [internalHighlightedIndex, internalSetHighlightedIndex] = React6.useState(0), isGrid = grid != null, rootRef = React6.useRef(null), mergedRef = useMergedRefs(rootRef, externalRef), elementsRef = React6.useRef([]), hasSetDefaultIndexRef = React6.useRef(!1), highlightedElementRef = React6.useRef(null), highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex, onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = !1) => {
|
|
321
|
+
if (highlightedElementRef.current = elementsRef.current[index] ?? null, (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index), shouldScrollIntoView) {
|
|
322
|
+
let newActiveItem = elementsRef.current[index];
|
|
323
|
+
scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);
|
|
324
|
+
}
|
|
325
|
+
}), onMapChange = useStableCallback((map) => {
|
|
326
|
+
if (map.size === 0)
|
|
327
|
+
return;
|
|
328
|
+
if (hasSetDefaultIndexRef.current) {
|
|
329
|
+
let elements = elementsRef.current, nextIndex = elements.indexOf(highlightedElementRef.current);
|
|
330
|
+
if (nextIndex === -1) {
|
|
331
|
+
let replacement = elements[highlightedIndex];
|
|
332
|
+
!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices) ? onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices)) : highlightedElementRef.current = replacement;
|
|
333
|
+
} else nextIndex !== highlightedIndex && onHighlightedIndexChange(nextIndex);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
hasSetDefaultIndexRef.current = !0;
|
|
337
|
+
let sortedElements = Array.from(map.keys()), activeItem = sortedElements.find((compositeElement) => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null, activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;
|
|
338
|
+
if (activeIndex !== -1)
|
|
339
|
+
onHighlightedIndexChange(activeIndex);
|
|
340
|
+
else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {
|
|
341
|
+
let firstEnabledIndex = findNonDisabledListIndex(sortedElements, {
|
|
342
|
+
disabledIndices
|
|
343
|
+
});
|
|
344
|
+
isIndexOutOfListBounds(sortedElements, firstEnabledIndex) || onHighlightedIndexChange(firstEnabledIndex);
|
|
345
|
+
}
|
|
346
|
+
scrollIntoViewIfNeeded(rootRef.current, activeItem, direction, orientation);
|
|
347
|
+
});
|
|
348
|
+
useIsoLayoutEffect(() => {
|
|
349
|
+
if (disabledIndices == null || externalHighlightedIndex != null || !hasSetDefaultIndexRef.current)
|
|
350
|
+
return;
|
|
351
|
+
let elements = elementsRef.current;
|
|
352
|
+
if (isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {
|
|
353
|
+
let firstEnabledIndex = findNonDisabledListIndex(elements, {
|
|
354
|
+
disabledIndices
|
|
355
|
+
});
|
|
356
|
+
isIndexOutOfListBounds(elements, firstEnabledIndex) || onHighlightedIndexChange(firstEnabledIndex);
|
|
357
|
+
}
|
|
358
|
+
}, [disabledIndices, externalHighlightedIndex, highlightedIndex, elementsRef, onHighlightedIndexChange]);
|
|
359
|
+
let wrappedOnLoop = useStableCallback((event, prevIndex, nextIndex) => onLoop ? onLoop(event, prevIndex, nextIndex, elementsRef) : nextIndex), onKeyDown = useStableCallback((event) => {
|
|
360
|
+
let isHomeOrEnd = event.key === HOME || event.key === END;
|
|
361
|
+
if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd || isModifierKeySet(event, modifierKeys) || !rootRef.current)
|
|
362
|
+
return;
|
|
363
|
+
let isRtl = direction === "rtl", horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT, horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT, forwardKey = orientation === "vertical" ? ARROW_DOWN : horizontalForwardKey, backwardKey = orientation === "vertical" ? ARROW_UP : horizontalBackwardKey, target = getTarget(event.nativeEvent);
|
|
364
|
+
if (target != null && isNativeInput(target) && !isElementDisabled(target)) {
|
|
365
|
+
let selectionStart = target.selectionStart, selectionEnd = target.selectionEnd, textContent = target.value;
|
|
366
|
+
if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd || event.key !== backwardKey && selectionStart < textContent.length || event.key !== forwardKey && selectionStart > 0)
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
let nextIndex = highlightedIndex, minIndex = getMinListIndex(elementsRef, disabledIndices), maxIndex = getMaxListIndex(elementsRef, disabledIndices);
|
|
370
|
+
grid != null && (nextIndex = grid({
|
|
371
|
+
disabledIndices,
|
|
372
|
+
elementsRef,
|
|
373
|
+
event,
|
|
374
|
+
highlightedIndex,
|
|
375
|
+
loopFocus,
|
|
376
|
+
maxIndex,
|
|
377
|
+
minIndex,
|
|
378
|
+
onLoop: wrappedOnLoop,
|
|
379
|
+
orientation,
|
|
380
|
+
rtl: isRtl
|
|
381
|
+
}));
|
|
382
|
+
let isForwardKey = orientation !== "vertical" && event.key === horizontalForwardKey || orientation !== "horizontal" && event.key === ARROW_DOWN, isBackwardKey = orientation !== "vertical" && event.key === horizontalBackwardKey || orientation !== "horizontal" && event.key === ARROW_UP;
|
|
383
|
+
enableHomeAndEndKeys && (event.key === HOME ? nextIndex = minIndex : event.key === END && (nextIndex = maxIndex)), nextIndex === highlightedIndex && (isForwardKey || isBackwardKey) && (loopFocus && nextIndex === maxIndex && isForwardKey ? (nextIndex = minIndex, onLoop && (nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef))) : loopFocus && nextIndex === minIndex && isBackwardKey ? (nextIndex = maxIndex, onLoop && (nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef))) : nextIndex = findNonDisabledListIndex(elementsRef.current, {
|
|
384
|
+
startingIndex: nextIndex,
|
|
385
|
+
decrement: isBackwardKey,
|
|
386
|
+
disabledIndices
|
|
387
|
+
})), nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex) && (stopEventPropagation && event.stopPropagation(), (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) && event.preventDefault(), onHighlightedIndexChange(nextIndex, !0), queueMicrotask(() => {
|
|
388
|
+
elementsRef.current[nextIndex]?.focus();
|
|
389
|
+
}));
|
|
390
|
+
});
|
|
391
|
+
return {
|
|
392
|
+
props: {
|
|
393
|
+
ref: mergedRef,
|
|
394
|
+
onFocus(event) {
|
|
395
|
+
let element = rootRef.current, target = getTarget(event.nativeEvent);
|
|
396
|
+
!element || target == null || !isNativeInput(target) || target.setSelectionRange(0, target.value.length);
|
|
397
|
+
},
|
|
398
|
+
onKeyDown
|
|
399
|
+
},
|
|
400
|
+
highlightedIndex,
|
|
401
|
+
onHighlightedIndexChange,
|
|
402
|
+
elementsRef,
|
|
403
|
+
onMapChange,
|
|
404
|
+
relayKeyboardEvent: onKeyDown
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
function getFallbackIndex(elements, disabledIndices) {
|
|
408
|
+
let fallbackIndex = -1;
|
|
409
|
+
for (let index = 0; index < elements.length; index += 1) {
|
|
410
|
+
let element = elements[index];
|
|
411
|
+
if (!(!element || isListIndexDisabled(elements, index, disabledIndices))) {
|
|
412
|
+
if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM))
|
|
413
|
+
return index;
|
|
414
|
+
fallbackIndex === -1 && (fallbackIndex = index);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return Math.max(fallbackIndex, 0);
|
|
418
|
+
}
|
|
419
|
+
function isModifierKeySet(event, ignoredModifierKeys) {
|
|
420
|
+
for (let key of MODIFIER_KEYS)
|
|
421
|
+
if (!ignoredModifierKeys.includes(key) && event.getModifierState(key))
|
|
422
|
+
return !0;
|
|
423
|
+
return !1;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// ../../node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
|
|
427
|
+
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
428
|
+
function CompositeRoot(componentProps) {
|
|
429
|
+
let {
|
|
430
|
+
render,
|
|
431
|
+
className,
|
|
432
|
+
style,
|
|
433
|
+
refs = EMPTY_ARRAY,
|
|
434
|
+
props = EMPTY_ARRAY,
|
|
435
|
+
state = EMPTY_OBJECT,
|
|
436
|
+
stateAttributesMapping,
|
|
437
|
+
highlightedIndex: highlightedIndexProp,
|
|
438
|
+
onHighlightedIndexChange: onHighlightedIndexChangeProp,
|
|
439
|
+
orientation,
|
|
440
|
+
grid,
|
|
441
|
+
loopFocus,
|
|
442
|
+
onLoop,
|
|
443
|
+
enableHomeAndEndKeys,
|
|
444
|
+
onMapChange: onMapChangeProp,
|
|
445
|
+
stopEventPropagation = !0,
|
|
446
|
+
rootRef,
|
|
447
|
+
disabledIndices,
|
|
448
|
+
modifierKeys,
|
|
449
|
+
highlightItemOnHover = !1,
|
|
450
|
+
tag = "div",
|
|
451
|
+
...elementProps
|
|
452
|
+
} = componentProps, direction = useDirection(), {
|
|
453
|
+
props: defaultProps,
|
|
454
|
+
highlightedIndex,
|
|
455
|
+
onHighlightedIndexChange,
|
|
456
|
+
elementsRef,
|
|
457
|
+
onMapChange: onMapChangeUnwrapped,
|
|
458
|
+
relayKeyboardEvent
|
|
459
|
+
} = useCompositeRoot({
|
|
460
|
+
grid,
|
|
461
|
+
loopFocus,
|
|
462
|
+
onLoop,
|
|
463
|
+
orientation,
|
|
464
|
+
highlightedIndex: highlightedIndexProp,
|
|
465
|
+
onHighlightedIndexChange: onHighlightedIndexChangeProp,
|
|
466
|
+
rootRef,
|
|
467
|
+
stopEventPropagation,
|
|
468
|
+
enableHomeAndEndKeys,
|
|
469
|
+
direction,
|
|
470
|
+
disabledIndices,
|
|
471
|
+
modifierKeys
|
|
472
|
+
}), element = useRenderElement(tag, componentProps, {
|
|
473
|
+
state,
|
|
474
|
+
ref: refs,
|
|
475
|
+
props: [defaultProps, ...props, elementProps],
|
|
476
|
+
stateAttributesMapping
|
|
477
|
+
}), contextValue = React7.useMemo(() => ({
|
|
478
|
+
highlightedIndex,
|
|
479
|
+
onHighlightedIndexChange,
|
|
480
|
+
highlightItemOnHover,
|
|
481
|
+
relayKeyboardEvent
|
|
482
|
+
}), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);
|
|
483
|
+
return _jsx2(CompositeRootContext.Provider, {
|
|
484
|
+
value: contextValue,
|
|
485
|
+
children: _jsx2(CompositeList, {
|
|
486
|
+
elementsRef,
|
|
487
|
+
onMapChange: (newMap) => {
|
|
488
|
+
onMapChangeProp?.(newMap), onMapChangeUnwrapped(newMap);
|
|
489
|
+
},
|
|
490
|
+
children: element
|
|
491
|
+
})
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export {
|
|
496
|
+
useControlled,
|
|
497
|
+
useCompositeListItem,
|
|
498
|
+
useCompositeItem,
|
|
499
|
+
CompositeList,
|
|
500
|
+
ACTIVE_COMPOSITE_ITEM,
|
|
501
|
+
CompositeRoot
|
|
502
|
+
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
// src/addon-docs/blocks/components/SnippetWarning.tsx
|
|
9
9
|
import { Button } from "@aussieljk/forkbook/internal/components";
|
|
10
|
-
import {
|
|
10
|
+
import { TriangleAlertIcon } from "lucide-react";
|
|
11
11
|
|
|
12
12
|
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/addon-docs/blocks/components/SnippetWarning.module.css
|
|
13
13
|
var id = "core/src/addon-docs/blocks/components/SnippetWarning.module.css";
|
|
@@ -28,7 +28,7 @@ var SNIPPET_WARNING_LABEL = "Incomplete code snippet", SnippetWarning = ({ warni
|
|
|
28
28
|
variant: "ghost",
|
|
29
29
|
size: "small",
|
|
30
30
|
padding: "small",
|
|
31
|
-
children: jsx(
|
|
31
|
+
children: jsx(TriangleAlertIcon, {})
|
|
32
32
|
}
|
|
33
33
|
) : null;
|
|
34
34
|
|
|
@@ -42,7 +42,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id2}"
|
|
|
42
42
|
let style = document.createElement("style");
|
|
43
43
|
style.setAttribute("data-fb-css", id2), style.textContent = ".fb-I61SDG-syntaxHighlighter{font-size:calc(var(--fb-size-s2) - 1px);border-radius:var(--fb-app-border-radius);margin:25px 0 40px;line-height:19px;box-shadow:0 1px 3px #0000001a;& pre.fb-I61SDG-prismjs{background:inherit;padding:20px}}.fb-I61SDG-snippetWarning{z-index:1;position:absolute;top:4px;right:4px}.fb-I61SDG-sourceWrapper{position:relative}.fb-I61SDG-skeletonWrapper{background:var(--fb-background-content);border-radius:var(--fb-app-border-radius);border:1px solid var(--fb-app-border-color);margin:25px 0 40px;padding:20px 20px 20px 22px;box-shadow:0 1px 3px #0000001a}:where([data-fb-theme=dark]){& .fb-I61SDG-syntaxHighlighter,& .fb-I61SDG-skeletonWrapper{box-shadow:0 2px 5px #0003}}.fb-I61SDG-skeletonPlaceholder{background:var(--fb-app-border-color);width:60%;height:17px;margin-top:1px;animation:1.5s ease-in-out infinite fb-I61SDG-glow;&:first-child{margin:0}}@keyframes fb-I61SDG-glow{0%,to{opacity:1}50%{opacity:.4}}", document.head.appendChild(style);
|
|
44
44
|
}
|
|
45
|
-
var Source_default = {
|
|
45
|
+
var Source_default = { snippetWarning: "fb-I61SDG-snippetWarning", prismjs: "fb-I61SDG-prismjs", syntaxHighlighter: "fb-I61SDG-syntaxHighlighter", sourceWrapper: "fb-I61SDG-sourceWrapper", skeletonPlaceholder: "fb-I61SDG-skeletonPlaceholder", glow: "fb-I61SDG-glow", skeletonWrapper: "fb-I61SDG-skeletonWrapper" };
|
|
46
46
|
|
|
47
47
|
// src/addon-docs/blocks/components/Source.tsx
|
|
48
48
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|