@aussieljk/forkbook 0.0.0-stage → 0.0.1-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +59 -2
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -0
- package/assets/browser/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +83 -0
- package/assets/create/rendererAssets/.eslintrc.json +16 -0
- package/assets/create/rendererAssets/common/Configure.mdx +388 -0
- package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
- package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
- package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
- package/assets/create/rendererAssets/common/assets/assets.png +0 -0
- package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
- package/assets/create/rendererAssets/common/assets/context.png +0 -0
- package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
- package/assets/create/rendererAssets/common/assets/docs.png +0 -0
- package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
- package/assets/create/rendererAssets/common/assets/github.svg +1 -0
- package/assets/create/rendererAssets/common/assets/share.png +0 -0
- package/assets/create/rendererAssets/common/assets/styling.png +0 -0
- package/assets/create/rendererAssets/common/assets/testing.png +0 -0
- package/assets/create/rendererAssets/common/assets/theming.png +0 -0
- package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
- package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
- package/assets/create/rendererAssets/common/button.css +30 -0
- package/assets/create/rendererAssets/common/header.css +32 -0
- package/assets/create/rendererAssets/common/page.css +68 -0
- package/assets/create/templates/react-native/index.expo.js +20 -0
- package/assets/create/templates/react-native/index.js +25 -0
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/message-reference.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/react-native/metro-env.d.ts +69 -0
- package/assets/server/addon.tsconfig.json +6 -0
- package/assets/server/base-preview-body.html +116 -0
- package/assets/server/base-preview-head.html +494 -0
- package/assets/server/openBrowser.applescript +94 -0
- package/assets/server/template.ejs +85 -0
- package/dist/.build-stamp +0 -0
- package/dist/_browser-chunks/Color-X63I7FHI.js +1025 -0
- package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
- package/dist/_browser-chunks/WithTooltip-5S6F2P7L.js +198 -0
- package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
- package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
- package/dist/_browser-chunks/chunk-3HM3VWJS.js +2604 -0
- package/dist/_browser-chunks/chunk-3M5T7BW4.js +43 -0
- package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
- package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
- package/dist/_browser-chunks/chunk-4KIQBRD2.js +17 -0
- package/dist/_browser-chunks/chunk-5H4KFI44.js +386 -0
- package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
- package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
- package/dist/_browser-chunks/chunk-5Z65SURM.js +108 -0
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/chunk-6ELMKWKX.js +22 -0
- package/dist/_browser-chunks/chunk-76222HQR.js +253 -0
- package/dist/_browser-chunks/chunk-7DQREF4S.js +218 -0
- package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
- package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
- package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
- package/dist/_browser-chunks/chunk-BNP234B4.js +80 -0
- package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
- package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
- package/dist/_browser-chunks/chunk-DS2WQZGO.js +1956 -0
- package/dist/_browser-chunks/chunk-DYNTDJ3O.js +155 -0
- package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
- package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
- package/dist/_browser-chunks/chunk-EQKMUQF3.js +224 -0
- package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
- package/dist/_browser-chunks/chunk-FRAOQJDI.js +95 -0
- package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
- package/dist/_browser-chunks/chunk-GRO2ZYEJ.js +157 -0
- package/dist/_browser-chunks/chunk-I4ATZPNZ.js +34 -0
- package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
- package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
- package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
- package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
- package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
- package/dist/_browser-chunks/chunk-KYSD26D6.js +1966 -0
- package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
- package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
- package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
- package/dist/_browser-chunks/chunk-LTCXWKZO.js +2935 -0
- package/dist/_browser-chunks/chunk-LYYXDWR2.js +411 -0
- package/dist/_browser-chunks/chunk-MJIDTL3X.js +78 -0
- package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
- package/dist/_browser-chunks/chunk-N3NRW5XX.js +117 -0
- package/dist/_browser-chunks/chunk-N5WQGLI7.js +11 -0
- package/dist/_browser-chunks/chunk-NA4ITZTK.js +324 -0
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
- package/dist/_browser-chunks/chunk-NTUHL5NS.js +54 -0
- package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/chunk-O24AZJZ7.js +56 -0
- package/dist/_browser-chunks/chunk-ONTSNQON.js +20 -0
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
- package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
- package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
- package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
- package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
- package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
- package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
- package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
- package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
- package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
- package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
- package/dist/_browser-chunks/chunk-TTBPZQ24.js +3551 -0
- package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
- package/dist/_browser-chunks/chunk-UMGDO2ZM.js +169 -0
- package/dist/_browser-chunks/chunk-V5U45XXZ.js +24 -0
- package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
- package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
- package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
- package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
- package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/chunk-XTQCLWVH.js +1500 -0
- package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
- package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
- package/dist/_browser-chunks/chunk-ZHKZKFY4.js +199 -0
- package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
- package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
- package/dist/_node-chunks/attached-runtime-PDBJ2EGV.js +282 -0
- package/dist/_node-chunks/builder-manager-VLL26RPG.js +1139 -0
- package/dist/_node-chunks/chunk-3CSGIJKG.js +499 -0
- package/dist/_node-chunks/chunk-3W4KR5GX.js +2609 -0
- package/dist/_node-chunks/chunk-5NRWU7S2.js +194 -0
- package/dist/_node-chunks/chunk-5SMIGUYF.js +102 -0
- package/dist/_node-chunks/chunk-63LPGIV4.js +1049 -0
- package/dist/_node-chunks/chunk-6DHTL5G2.js +35 -0
- package/dist/_node-chunks/chunk-6DRVJCYP.js +299 -0
- package/dist/_node-chunks/chunk-7CV4VEA2.js +620 -0
- package/dist/_node-chunks/chunk-7KD5DKGZ.js +79 -0
- package/dist/_node-chunks/chunk-7O2UIVID.js +82 -0
- package/dist/_node-chunks/chunk-7OY4VMAT.js +90 -0
- package/dist/_node-chunks/chunk-AAL6X7YG.js +1986 -0
- package/dist/_node-chunks/chunk-ACSO4HQP.js +32 -0
- package/dist/_node-chunks/chunk-BDU3ZUMK.js +98 -0
- package/dist/_node-chunks/chunk-BMJPOQ2S.js +11 -0
- package/dist/_node-chunks/chunk-BNEC3EBC.js +28 -0
- package/dist/_node-chunks/chunk-BPL3ERBH.js +347 -0
- package/dist/_node-chunks/chunk-BXDMSX3D.js +30600 -0
- package/dist/_node-chunks/chunk-C3PLG47Q.js +25 -0
- package/dist/_node-chunks/chunk-CEDR5CNM.js +74 -0
- package/dist/_node-chunks/chunk-CKE4R4NL.js +26 -0
- package/dist/_node-chunks/chunk-CSFNS7HA.js +21 -0
- package/dist/_node-chunks/chunk-CZ3V3HHK.js +223 -0
- package/dist/_node-chunks/chunk-DNV3LPV3.js +33 -0
- package/dist/_node-chunks/chunk-DPILYJH4.js +33 -0
- package/dist/_node-chunks/chunk-DQ44ZAEM.js +25 -0
- package/dist/_node-chunks/chunk-DR7NW2MI.js +104 -0
- package/dist/_node-chunks/chunk-DRCP3DQF.js +209 -0
- package/dist/_node-chunks/chunk-EBWZKN2I.js +1297 -0
- package/dist/_node-chunks/chunk-ECOW63CV.js +92 -0
- package/dist/_node-chunks/chunk-ENBDAHOV.js +18 -0
- package/dist/_node-chunks/chunk-FAEOR2AW.js +40 -0
- package/dist/_node-chunks/chunk-FERXOKZY.js +80 -0
- package/dist/_node-chunks/chunk-FJFB7TWU.js +495 -0
- package/dist/_node-chunks/chunk-FQGQ5KHN.js +63 -0
- package/dist/_node-chunks/chunk-FR2ZDWKJ.js +45 -0
- package/dist/_node-chunks/chunk-FRBE7ES4.js +59 -0
- package/dist/_node-chunks/chunk-FWAF5NBL.js +20 -0
- package/dist/_node-chunks/chunk-FXBZWUW3.js +7044 -0
- package/dist/_node-chunks/chunk-FZ453CHY.js +25 -0
- package/dist/_node-chunks/chunk-G2ZUFOHU.js +68 -0
- package/dist/_node-chunks/chunk-GBVWRZHP.js +23 -0
- package/dist/_node-chunks/chunk-GGE7TBVX.js +121 -0
- package/dist/_node-chunks/chunk-GJSYGBI5.js +47 -0
- package/dist/_node-chunks/chunk-GKHLTHYM.js +4744 -0
- package/dist/_node-chunks/chunk-GQYATLH6.js +3708 -0
- package/dist/_node-chunks/chunk-HCP5DG52.js +2743 -0
- package/dist/_node-chunks/chunk-HVOSLI2K.js +20 -0
- package/dist/_node-chunks/chunk-ID3WA6WR.js +171 -0
- package/dist/_node-chunks/chunk-IGOX6TUG.js +95 -0
- package/dist/_node-chunks/chunk-IL7YA7QJ.js +148 -0
- package/dist/_node-chunks/chunk-IUPE4SU2.js +688 -0
- package/dist/_node-chunks/chunk-JVWXCB3L.js +7179 -0
- package/dist/_node-chunks/chunk-K4O2ZAMU.js +57 -0
- package/dist/_node-chunks/chunk-KRWR44KT.js +25 -0
- package/dist/_node-chunks/chunk-KWNBN3DV.js +132 -0
- package/dist/_node-chunks/chunk-LG3NMXCM.js +20 -0
- package/dist/_node-chunks/chunk-LH5QBX2U.js +1001 -0
- package/dist/_node-chunks/chunk-LX2XSPPL.js +59 -0
- package/dist/_node-chunks/chunk-M4QNXI37.js +21 -0
- package/dist/_node-chunks/chunk-MBPHOLXB.js +1218 -0
- package/dist/_node-chunks/chunk-MIWBXEUH.js +26 -0
- package/dist/_node-chunks/chunk-MKUA4ZCG.js +1193 -0
- package/dist/_node-chunks/chunk-MQC7ZY6L.js +5468 -0
- package/dist/_node-chunks/chunk-MRCPS4S3.js +48 -0
- package/dist/_node-chunks/chunk-MY7UVHPL.js +153 -0
- package/dist/_node-chunks/chunk-ND323XCC.js +33 -0
- package/dist/_node-chunks/chunk-NGFFEW2B.js +972 -0
- package/dist/_node-chunks/chunk-OPG46TLN.js +1119 -0
- package/dist/_node-chunks/chunk-PEL4YXU6.js +19 -0
- package/dist/_node-chunks/chunk-QFXAGOIO.js +115 -0
- package/dist/_node-chunks/chunk-QGC3UWR5.js +110 -0
- package/dist/_node-chunks/chunk-QGVU7IFS.js +414 -0
- package/dist/_node-chunks/chunk-QOFBJXPH.js +1525 -0
- package/dist/_node-chunks/chunk-QVLHVO4X.js +532 -0
- package/dist/_node-chunks/chunk-R2ZCFA7I.js +60 -0
- package/dist/_node-chunks/chunk-RC4HPD5Q.js +26 -0
- package/dist/_node-chunks/chunk-RJXAXHDJ.js +415 -0
- package/dist/_node-chunks/chunk-SGEPJMTU.js +1094 -0
- package/dist/_node-chunks/chunk-SYUOBOB5.js +35 -0
- package/dist/_node-chunks/chunk-T5VZYRL2.js +40 -0
- package/dist/_node-chunks/chunk-T6IU66AM.js +69 -0
- package/dist/_node-chunks/chunk-THDTJJMO.js +611 -0
- package/dist/_node-chunks/chunk-TNFH4Y4G.js +1133 -0
- package/dist/_node-chunks/chunk-TY2ZY7AO.js +155 -0
- package/dist/_node-chunks/chunk-TZIT6SZP.js +49 -0
- package/dist/_node-chunks/chunk-VG2KFIOW.js +45 -0
- package/dist/_node-chunks/chunk-VSHYJR23.js +56 -0
- package/dist/_node-chunks/chunk-VUMGWJ6Y.js +844 -0
- package/dist/_node-chunks/chunk-WVRM6DQU.js +3767 -0
- package/dist/_node-chunks/chunk-YU5TVYPS.js +87 -0
- package/dist/_node-chunks/chunk-ZBWAA2EY.js +2106 -0
- package/dist/_node-chunks/chunk-ZD5TUA6I.js +20 -0
- package/dist/_node-chunks/chunk-ZFLK7MY5.js +144 -0
- package/dist/_node-chunks/dist-7OJKTBKL.js +27 -0
- package/dist/_node-chunks/dist-MWP6WLW4.js +16 -0
- package/dist/_node-chunks/local-runtime-V5YTRN24.js +78 -0
- package/dist/_node-chunks/mdx-plugin-CBOD52VP.js +7813 -0
- package/dist/_node-chunks/monorepo-GF6H53U4.js +121 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-K4TTV2DQ.js +121 -0
- package/dist/_node-chunks/optimized-tests-KOTSVWTN.js +22 -0
- package/dist/_node-chunks/pattern-copy-play-M2QNC4IZ.js +807 -0
- package/dist/_node-chunks/postinstallAddon-WXKJL6DP.js +20 -0
- package/dist/_node-chunks/rehype-external-links-3IDE4CYH.js +121 -0
- package/dist/_node-chunks/rehype-slug-GKB3WS3U.js +52 -0
- package/dist/_node-chunks/relaxed-limits-C6QU365N.js +117 -0
- package/dist/_node-chunks/run-TMVS3KKA.js +4792 -0
- package/dist/_node-chunks/run-XWBUPXLN.js +103 -0
- package/dist/_node-chunks/session-id-VMH57SKN.js +23 -0
- package/dist/_node-chunks/setup-KEEJK4WI.js +278 -0
- package/dist/_node-chunks/vitest.config.4.template-74HEE4WJ.js +54 -0
- package/dist/actions/decorator.d.ts +7 -0
- package/dist/actions/decorator.js +44 -0
- package/dist/actions/index.d.ts +67 -0
- package/dist/actions/index.js +29 -0
- package/dist/addon-a11y/index.d.ts +52 -0
- package/dist/addon-a11y/index.js +17 -0
- package/dist/addon-a11y/manager.js +1432 -0
- package/dist/addon-a11y/preset.js +18 -0
- package/dist/addon-a11y/preview.d.ts +17 -0
- package/dist/addon-a11y/preview.js +16 -0
- package/dist/addon-docs/blocks.d.ts +1080 -0
- package/dist/addon-docs/blocks.js +2537 -0
- package/dist/addon-docs/index.d.ts +236 -0
- package/dist/addon-docs/index.js +16 -0
- package/dist/addon-docs/manager.js +90 -0
- package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
- package/dist/addon-docs/mdx-react-shim.js +2 -0
- package/dist/addon-docs/preset.js +378 -0
- package/dist/addon-docs/preview.d.ts +4 -0
- package/dist/addon-docs/preview.js +7 -0
- package/dist/addon-links/index.d.ts +22 -0
- package/dist/addon-links/index.js +23 -0
- package/dist/addon-links/manager.js +14 -0
- package/dist/addon-links/preview.d.ts +6 -0
- package/dist/addon-links/preview.js +12 -0
- package/dist/addon-links/react/index.d.ts +25 -0
- package/dist/addon-links/react/index.js +55 -0
- package/dist/addon-mcp/preset.js +1353 -0
- package/dist/addon-mcp/preview.js +29 -0
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1129 -0
- package/dist/addon-ondevice-actions/index.d.ts +4 -0
- package/dist/addon-ondevice-actions/index.js +11 -0
- package/dist/addon-ondevice-actions/register.js +11 -0
- package/dist/addon-ondevice-controls/index.d.ts +6 -0
- package/dist/addon-ondevice-controls/index.js +14 -0
- package/dist/addon-ondevice-controls/register.js +10 -0
- package/dist/addon-pseudo-states/index.d.ts +35 -0
- package/dist/addon-pseudo-states/index.js +15 -0
- package/dist/addon-pseudo-states/manager.js +53 -0
- package/dist/addon-pseudo-states/preview.d.ts +9 -0
- package/dist/addon-pseudo-states/preview.js +10 -0
- package/dist/addon-themes/index.d.ts +80 -0
- package/dist/addon-themes/index.js +104 -0
- package/dist/addon-themes/manager.js +97 -0
- package/dist/addon-themes/postinstall.js +33 -0
- package/dist/addon-themes/preview.d.ts +6 -0
- package/dist/addon-themes/preview.js +8 -0
- package/dist/addon-vitest/constants.d.ts +132 -0
- package/dist/addon-vitest/constants.js +66 -0
- package/dist/addon-vitest/index.d.ts +4 -0
- package/dist/addon-vitest/index.js +8 -0
- package/dist/addon-vitest/manager.js +665 -0
- package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
- package/dist/addon-vitest/node/vitest.js +674 -0
- package/dist/addon-vitest/postinstall.js +24 -0
- package/dist/addon-vitest/preset.js +942 -0
- package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
- package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
- package/dist/addon-vitest/vitest-plugin/index.js +463 -0
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
- package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
- package/dist/babel/index.d.ts +1550 -0
- package/dist/babel/index.js +55 -0
- package/dist/backgrounds/index.d.ts +6 -0
- package/dist/backgrounds/index.js +15 -0
- package/dist/bin/core.js +1706 -0
- package/dist/bin/dispatcher.js +45 -0
- package/dist/bin/loader.js +116 -0
- package/dist/builder-vite/index.d.ts +50 -0
- package/dist/builder-vite/index.js +245 -0
- package/dist/builder-vite/preset.js +27 -0
- package/dist/channels/index.d.ts +2 -0
- package/dist/channels/index.js +352 -0
- package/dist/chunk-BCoJQE-f.d.ts +602 -0
- package/dist/chunk-BGhyFTJO.d.ts +115 -0
- package/dist/chunk-BGkgZp-H.d.ts +214 -0
- package/dist/chunk-BXLImeLy.d.ts +197 -0
- package/dist/chunk-Bpi2tz-6.d.ts +511 -0
- package/dist/chunk-C6PAgHLT.d.ts +12 -0
- package/dist/chunk-CFk6djyM.d.ts +55 -0
- package/dist/chunk-CNqjcOmK.d.ts +15 -0
- package/dist/chunk-CT2iXaHz.d.ts +179 -0
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/chunk-CYuvV2sR.d.ts +282 -0
- package/dist/chunk-Ct9xd6IM.d.ts +65 -0
- package/dist/chunk-D0NUmzXp.d.ts +253 -0
- package/dist/chunk-D7DwV41f.d.ts +3622 -0
- package/dist/chunk-DDd8BhTY.d.ts +79 -0
- package/dist/chunk-DROZ9oel.d.ts +669 -0
- package/dist/chunk-DaVb55-_.d.ts +124 -0
- package/dist/chunk-DgRNfmj_.d.ts +40 -0
- package/dist/chunk-DgzPaTw9.d.ts +61 -0
- package/dist/chunk-Dm-iHJ-s.d.ts +59 -0
- package/dist/chunk-DoIGKY33.d.ts +666 -0
- package/dist/chunk-Dr3R0DXk.d.ts +40 -0
- package/dist/chunk-Dw_4ad2Y.d.ts +34 -0
- package/dist/chunk-Fg1Fm__9.d.ts +13091 -0
- package/dist/chunk-FjDVzZTj.d.ts +62 -0
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/chunk-XP8oHzpE.d.ts +6 -0
- package/dist/chunk-pcFXCimE.d.ts +741 -0
- package/dist/cli/index.d.ts +321 -0
- package/dist/cli/index.js +703 -0
- package/dist/cli/skills/content/index.d.ts +72 -0
- package/dist/cli/skills/content/index.js +335 -0
- package/dist/cli/tools/sdk/child-host.d.ts +61 -0
- package/dist/cli/tools/sdk/child-host.js +131 -0
- package/dist/cli/tools/sdk/index.d.ts +137 -0
- package/dist/cli/tools/sdk/index.js +44 -0
- package/dist/cli-commands/bin/index.js +25 -0
- package/dist/client-logger/index.d.ts +31 -0
- package/dist/client-logger/index.js +65 -0
- package/dist/common/index.d.ts +1091 -0
- package/dist/common/index.js +358 -0
- package/dist/components/index.d.ts +1727 -0
- package/dist/components/index.js +7982 -0
- package/dist/core-events/index.d.ts +156 -0
- package/dist/core-events/index.js +138 -0
- package/dist/core-server/index.d.ts +2200 -0
- package/dist/core-server/index.js +4577 -0
- package/dist/core-server/presets/common-manager.js +3744 -0
- package/dist/core-server/presets/common-override-preset.js +83 -0
- package/dist/core-server/presets/common-preset.js +2194 -0
- package/dist/create/bin/index.js +23 -0
- package/dist/create/index.js +25 -0
- package/dist/csf/csf-utils.d.ts +2 -0
- package/dist/csf/csf-utils.js +19 -0
- package/dist/csf/index.d.ts +7 -0
- package/dist/csf/index.js +2077 -0
- package/dist/csf-tools/index.d.ts +1161 -0
- package/dist/csf-tools/index.js +738 -0
- package/dist/docs-tools/index.d.ts +197 -0
- package/dist/docs-tools/index.js +61 -0
- package/dist/highlight/index.d.ts +10 -0
- package/dist/highlight/index.js +15 -0
- package/dist/instrumenter/index.d.ts +113 -0
- package/dist/instrumenter/index.js +2597 -0
- package/dist/manager/_manager-chunks/globals-runtime-BKQscPdC.js +5661 -0
- package/dist/manager/_manager-chunks/globals-runtime-BY3epqww.js +1807 -0
- package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +9987 -0
- package/dist/manager/_manager-chunks/globals-runtime-BweHuXkK.js +6838 -0
- package/dist/manager/_manager-chunks/globals-runtime-CA8AuIRT.js +7617 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/globals-runtime-CJL1dQtn.js +4674 -0
- package/dist/manager/_manager-chunks/globals-runtime-CfurFwS_.js +121 -0
- package/dist/manager/_manager-chunks/globals-runtime-CvIgTRVu.js +1190 -0
- package/dist/manager/_manager-chunks/globals-runtime-DBba3I9c.js +5307 -0
- package/dist/manager/_manager-chunks/globals-runtime-DvV_TF3-.js +12214 -0
- package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
- package/dist/manager/_manager-chunks/globals-runtime-NwJK8t0T.js +9274 -0
- package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +4091 -0
- package/dist/manager/_manager-chunks/globals-runtime-wjkxyMn0.js +5283 -0
- package/dist/manager/_manager-chunks/runtime-5B2mWjEm.js +294 -0
- package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +78 -0
- package/dist/manager/_manager-chunks/runtime-B_nqedQW.js +197 -0
- package/dist/manager/_manager-chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/runtime-Bs3bEhuy.js +1232 -0
- package/dist/manager/_manager-chunks/runtime-CBQsKmch.js +2351 -0
- package/dist/manager/_manager-chunks/runtime-DG61zYUm.js +1158 -0
- package/dist/manager/_manager-chunks/runtime-DtCVCy4G.js +6841 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/runtime-eBAgOym6.js +9010 -0
- package/dist/manager/_manager-chunks/runtime-j9yqh0tr.js +1023 -0
- package/dist/manager/_manager-chunks/runtime-jj8qYc2n.js +3488 -0
- package/dist/manager/globals-runtime.js +2 -0
- package/dist/manager/globals.d.ts +23 -0
- package/dist/manager/globals.js +26 -0
- package/dist/manager/manager-stores.d.ts +2 -0
- package/dist/manager/manager-stores.js +19 -0
- package/dist/manager/runtime.js +2 -0
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +3247 -0
- package/dist/manager-errors.d.ts +89 -0
- package/dist/manager-errors.js +20 -0
- package/dist/mcp/index.d.ts +270 -0
- package/dist/mcp/index.js +305 -0
- package/dist/mocking-utils/index.d.ts +689 -0
- package/dist/mocking-utils/index.js +526 -0
- package/dist/mocking-utils/mocker-runtime.js +1254 -0
- package/dist/nextjs-vite/config/preview.js +3 -0
- package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
- package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
- package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
- package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
- package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
- package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
- package/dist/nextjs-vite/index.d.ts +92 -0
- package/dist/nextjs-vite/index.js +59 -0
- package/dist/nextjs-vite/node/index.d.ts +6 -0
- package/dist/nextjs-vite/node/index.js +20 -0
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +727 -0
- package/dist/nextjs-vite/preview.d.ts +20 -0
- package/dist/nextjs-vite/preview.js +11 -0
- package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
- package/dist/nextjs-vite/vite-plugin/index.js +19 -0
- package/dist/nextjs-vite-plugin/index.d.ts +27 -0
- package/dist/nextjs-vite-plugin/index.js +908 -0
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
- package/dist/node-logger/index.d.ts +488 -0
- package/dist/node-logger/index.js +41 -0
- package/dist/oxc-parser/index.d.ts +99 -0
- package/dist/oxc-parser/index.js +273 -0
- package/dist/oxc-parser/worker.js +37 -0
- package/dist/preview/_chunks/runtime-BJwGQok8.js +3873 -0
- package/dist/preview/_chunks/runtime-BPwAnlRx.js +10411 -0
- package/dist/preview/_chunks/runtime-BUnOhg9h.js +6838 -0
- package/dist/preview/_chunks/runtime-BZ4pNS3g.js +284 -0
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/preview/_chunks/runtime-BgPhfM5P.js +3681 -0
- package/dist/preview/_chunks/runtime-BhSZ1Mwt.js +5262 -0
- package/dist/preview/_chunks/runtime-BsMjBzuq.js +53 -0
- package/dist/preview/_chunks/runtime-C1jgT6tJ.js +4091 -0
- package/dist/preview/_chunks/runtime-CkOhMcXf.js +387 -0
- package/dist/preview/_chunks/runtime-WapFVPAh.js +8484 -0
- package/dist/preview/globals.d.ts +16 -0
- package/dist/preview/globals.js +20 -0
- package/dist/preview/runtime.js +6 -0
- package/dist/preview-api/index.d.ts +4 -0
- package/dist/preview-api/index.js +149 -0
- package/dist/preview-errors.d.ts +186 -0
- package/dist/preview-errors.js +56 -0
- package/dist/react/docgen/docgen-worker.js +37 -0
- package/dist/react/entry-preview-argtypes.js +9 -0
- package/dist/react/entry-preview-docs.js +12 -0
- package/dist/react/entry-preview-rsc.js +11 -0
- package/dist/react/entry-preview.js +22 -0
- package/dist/react/index.d.ts +119 -0
- package/dist/react/index.js +28 -0
- package/dist/react/preset.js +300 -0
- package/dist/react/preview.d.ts +2 -0
- package/dist/react/preview.js +12 -0
- package/dist/react-native/bin/get-stories.js +34 -0
- package/dist/react-native/index.d.ts +160 -0
- package/dist/react-native/index.js +1362 -0
- package/dist/react-native/metro/node.d.ts +83 -0
- package/dist/react-native/metro/node.js +22 -0
- package/dist/react-native/metro/withForkbook.d.ts +2269 -0
- package/dist/react-native/metro/withForkbook.js +139 -0
- package/dist/react-native/preview.d.ts +6 -0
- package/dist/react-native/preview.js +20 -0
- package/dist/react-native/scripts/generate.d.ts +22 -0
- package/dist/react-native/scripts/generate.js +18 -0
- package/dist/react-native/stub.js +20 -0
- package/dist/react-native-theming/index.d.ts +119 -0
- package/dist/react-native-theming/index.js +316 -0
- package/dist/react-native-ui/index.d.ts +129 -0
- package/dist/react-native-ui/index.js +1448 -0
- package/dist/react-native-ui-common/index.d.ts +229 -0
- package/dist/react-native-ui-common/index.js +514 -0
- package/dist/react-vite/index.d.ts +4 -0
- package/dist/react-vite/index.js +8 -0
- package/dist/react-vite/node/index.d.ts +6 -0
- package/dist/react-vite/node/index.js +20 -0
- package/dist/react-vite/preset.d.ts +6 -0
- package/dist/react-vite/preset.js +21 -0
- package/dist/router/index.d.ts +209 -0
- package/dist/router/index.js +1259 -0
- package/dist/server-errors.d.ts +2 -0
- package/dist/server-errors.js +149 -0
- package/dist/shared/open-service/index.d.ts +3 -0
- package/dist/shared/open-service/index.js +115 -0
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
- package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
- package/dist/shared/open-service/toolsets/docs/public.js +991 -0
- package/dist/telemetry/index.d.ts +314 -0
- package/dist/telemetry/index.js +101 -0
- package/dist/test/index.d.ts +158 -0
- package/dist/test/index.js +19656 -0
- package/dist/theming/create.d.ts +15 -0
- package/dist/theming/create.js +12 -0
- package/dist/theming/index.d.ts +54 -0
- package/dist/theming/index.js +536 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +48 -0
- package/dist/viewport/index.d.ts +275 -0
- package/dist/viewport/index.js +21 -0
- package/package.json +1030 -4
- package/template/nextjs-vite/cli/.eslintrc.json +6 -0
- package/template/nextjs-vite/cli/js/Button.jsx +42 -0
- package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
- package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
- package/template/nextjs-vite/cli/js/Header.jsx +58 -0
- package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
- package/template/nextjs-vite/cli/js/Page.jsx +68 -0
- package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
- package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
- package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
- package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
- package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
- package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
- package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
- package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
- package/template/react/cli/.eslintrc.json +5 -0
- package/template/react/cli/js/Button.jsx +39 -0
- package/template/react/cli/js/Button.stories.js +49 -0
- package/template/react/cli/js/Header.jsx +56 -0
- package/template/react/cli/js/Header.stories.js +29 -0
- package/template/react/cli/js/Page.jsx +69 -0
- package/template/react/cli/js/Page.stories.js +28 -0
- package/template/react/cli/ts/Button.stories.ts +54 -0
- package/template/react/cli/ts/Button.tsx +37 -0
- package/template/react/cli/ts/Header.stories.ts +34 -0
- package/template/react/cli/ts/Header.tsx +56 -0
- package/template/react/cli/ts/Page.stories.ts +33 -0
- package/template/react/cli/ts/Page.tsx +73 -0
- package/template/react-vite/cli/.eslintrc.json +5 -0
- package/template/react-vite/cli/js/Button.jsx +39 -0
- package/template/react-vite/cli/js/Button.stories.js +49 -0
- package/template/react-vite/cli/js/Header.jsx +56 -0
- package/template/react-vite/cli/js/Header.stories.js +29 -0
- package/template/react-vite/cli/js/Page.jsx +69 -0
- package/template/react-vite/cli/js/Page.stories.js +28 -0
- package/template/react-vite/cli/ts/Button.stories.ts +54 -0
- package/template/react-vite/cli/ts/Button.tsx +37 -0
- package/template/react-vite/cli/ts/Header.stories.ts +34 -0
- package/template/react-vite/cli/ts/Header.tsx +56 -0
- package/template/react-vite/cli/ts/Page.stories.ts +33 -0
- package/template/react-vite/cli/ts/Page.tsx +73 -0
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/addon-pseudo-states/constants.ts
|
|
2
|
+
var ADDON_ID = "@aussieljk/forkbook/pseudo-states", TOOL_ID = `${ADDON_ID}/tool`, PARAM_KEY = "pseudo", EXCLUDED_PSEUDO_ELEMENT_PATTERNS = ["::-(webkit|moz|ms)-[a-z-]+", "::part\\([^)]+\\)"], PSEUDO_STATES = {
|
|
3
|
+
hover: "hover",
|
|
4
|
+
active: "active",
|
|
5
|
+
focusVisible: "focus-visible",
|
|
6
|
+
focusWithin: "focus-within",
|
|
7
|
+
focus: "focus",
|
|
8
|
+
// must come after its alternatives
|
|
9
|
+
visited: "visited",
|
|
10
|
+
link: "link",
|
|
11
|
+
target: "target"
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
ADDON_ID,
|
|
16
|
+
TOOL_ID,
|
|
17
|
+
PARAM_KEY,
|
|
18
|
+
EXCLUDED_PSEUDO_ELEMENT_PATTERNS,
|
|
19
|
+
PSEUDO_STATES
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/addon-a11y/constants.ts
|
|
2
|
+
var ADDON_ID = "@aussieljk/forkbook/a11y", PANEL_ID = `${ADDON_ID}/panel`, PARAM_KEY = "a11y", VISION_GLOBAL_KEY = "vision", UI_STATE_ID = `${ADDON_ID}/ui`, RESULT = `${ADDON_ID}/result`, REQUEST = `${ADDON_ID}/request`, RUNNING = `${ADDON_ID}/running`, ERROR = `${ADDON_ID}/error`, MANUAL = `${ADDON_ID}/manual`, DOCUMENTATION_LINK = "writing-tests/accessibility-testing", DOCUMENTATION_DISCREPANCY_LINK = `${DOCUMENTATION_LINK}#why-are-my-tests-failing-in-different-environments`;
|
|
3
|
+
var EVENTS = { RESULT, REQUEST, RUNNING, ERROR, MANUAL }, STATUS_TYPE_ID_COMPONENT_TEST = "@aussieljk/forkbook/component-test", STATUS_TYPE_ID_A11Y = "@aussieljk/forkbook/a11y";
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
ADDON_ID,
|
|
7
|
+
PANEL_ID,
|
|
8
|
+
PARAM_KEY,
|
|
9
|
+
VISION_GLOBAL_KEY,
|
|
10
|
+
DOCUMENTATION_DISCREPANCY_LINK,
|
|
11
|
+
EVENTS,
|
|
12
|
+
STATUS_TYPE_ID_COMPONENT_TEST,
|
|
13
|
+
STATUS_TYPE_ID_A11Y
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/addon-docs/blocks/controls/helpers.ts
|
|
2
|
+
var getControlId = (value, storyId, controlsId) => {
|
|
3
|
+
let base = value.replace(/\s+/g, "-"), parts = ["control"];
|
|
4
|
+
return controlsId && parts.push(controlsId), storyId && parts.push(storyId), parts.push(base), parts.join("-");
|
|
5
|
+
}, getControlSetterButtonId = (value, storyId, controlsId) => {
|
|
6
|
+
let base = value.replace(/\s+/g, "-"), parts = ["set"];
|
|
7
|
+
return controlsId && parts.push(controlsId), storyId && parts.push(storyId), parts.push(base), parts.join("-");
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
getControlId,
|
|
12
|
+
getControlSetterButtonId
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/shared/story-grid.ts
|
|
2
|
+
var isGridEntry = (entry, hiddenImportPath) => entry.importPath !== hiddenImportPath && (entry.type === "docs" || entry.type === "story" && entry.subtype !== "test"), groupEntriesByComponent = (entries, { hiddenImportPath } = {}) => {
|
|
3
|
+
let byTitle = /* @__PURE__ */ new Map();
|
|
4
|
+
for (let entry of entries) {
|
|
5
|
+
if (!isGridEntry(entry, hiddenImportPath))
|
|
6
|
+
continue;
|
|
7
|
+
let component = byTitle.get(entry.title);
|
|
8
|
+
component || (component = {
|
|
9
|
+
title: entry.title,
|
|
10
|
+
name: entry.title.split("/").pop() ?? entry.title,
|
|
11
|
+
entryId: entry.id,
|
|
12
|
+
viewMode: entry.type,
|
|
13
|
+
storyIds: []
|
|
14
|
+
}, byTitle.set(entry.title, component)), entry.type === "docs" && component.viewMode !== "docs" && (component.entryId = entry.id, component.viewMode = "docs"), entry.type === "story" ? (component.storyIds.push(entry.id), component.firstStoryId || (component.firstStoryId = entry.id, component.thumbnail = entry.thumbnail ?? component.thumbnail)) : component.thumbnail ??= entry.thumbnail;
|
|
15
|
+
}
|
|
16
|
+
return [...byTitle.values()];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
groupEntriesByComponent
|
|
21
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/shared/open-service/query-state.ts
|
|
2
|
+
function buildQueryState(data, lifecycle) {
|
|
3
|
+
let isPending = lifecycle.status === "pending", isLoading = lifecycle.loadStatus === "loading";
|
|
4
|
+
return {
|
|
5
|
+
data,
|
|
6
|
+
error: lifecycle.error,
|
|
7
|
+
status: lifecycle.status,
|
|
8
|
+
loadStatus: lifecycle.loadStatus,
|
|
9
|
+
isPending,
|
|
10
|
+
isSuccess: lifecycle.status === "success",
|
|
11
|
+
isError: lifecycle.status === "error",
|
|
12
|
+
isLoading,
|
|
13
|
+
isInitialLoading: isPending && isLoading && data === void 0,
|
|
14
|
+
isRefreshing: isLoading && !isPending
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function toError(value) {
|
|
18
|
+
return value instanceof Error ? value : new Error(String(value));
|
|
19
|
+
}
|
|
20
|
+
function seedQueryState(query, input, selector) {
|
|
21
|
+
try {
|
|
22
|
+
let output = query.get(input);
|
|
23
|
+
return buildQueryState(selector ? selector(output) : output, {
|
|
24
|
+
status: "pending",
|
|
25
|
+
error: void 0,
|
|
26
|
+
loadStatus: "loading"
|
|
27
|
+
});
|
|
28
|
+
} catch (error) {
|
|
29
|
+
return buildQueryState(void 0, {
|
|
30
|
+
status: "error",
|
|
31
|
+
error: toError(error),
|
|
32
|
+
loadStatus: "idle"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
buildQueryState,
|
|
39
|
+
toError,
|
|
40
|
+
seedQueryState
|
|
41
|
+
};
|