@aussieljk/forkbook 0.0.1-4 → 0.0.1-6
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 +35 -53
- package/dist/_browser-chunks/{Color-KRDPNBZS.js → Color-2BMQTRYG.js} +3 -3
- package/dist/_browser-chunks/WithTooltip-GJACFWKM.js +196 -0
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/chunk-6EJEEII7.js +1149 -0
- package/dist/_browser-chunks/{chunk-LXQPPHMD.js → chunk-6IKB2UHQ.js} +27 -27
- package/dist/_browser-chunks/chunk-DPRGR3QP.js +5995 -0
- package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
- package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
- package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
- package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-BZGX2THJ.js → chunk-QAHDGPZ7.js} +3 -3
- package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-X7D777E6.js} +547 -1622
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
- package/dist/_node-chunks/{attached-runtime-CYMSKF3A.js → attached-runtime-EBWIOQZN.js} +29 -29
- package/dist/_node-chunks/{builder-manager-RMLSIO45.js → builder-manager-ETBLZ2RH.js} +288 -349
- package/dist/_node-chunks/{chunk-IR34HUSL.js → chunk-252Y5WHZ.js} +7 -7
- package/dist/_node-chunks/{chunk-VPOJCHKM.js → chunk-25PXULSJ.js} +14 -14
- package/dist/_node-chunks/chunk-2DBJWMYE.js +495 -0
- package/dist/_node-chunks/{chunk-KXDJ77EW.js → chunk-3UWWRDA5.js} +7 -7
- package/dist/_node-chunks/{chunk-DVLFCSDG.js → chunk-4KCQYJT6.js} +7 -7
- package/dist/_node-chunks/{chunk-X3E55W5S.js → chunk-4MJIPOJ5.js} +6 -6
- package/dist/_node-chunks/{chunk-5TPSYG4L.js → chunk-4WLIN3VZ.js} +8 -8
- package/dist/_node-chunks/{chunk-WBTLBIED.js → chunk-4XNPO23I.js} +6 -6
- package/dist/_node-chunks/{chunk-NHIRHARE.js → chunk-5T635FTI.js} +10 -10
- package/dist/_node-chunks/{chunk-YU2WFBFL.js → chunk-5Z6MT4RI.js} +8 -8
- package/dist/_node-chunks/{chunk-2QWFS23O.js → chunk-644CUCK5.js} +7 -7
- package/dist/_node-chunks/{chunk-7XCJ7RAJ.js → chunk-7E27CGRU.js} +7 -7
- package/dist/_node-chunks/{chunk-WS367FSJ.js → chunk-A35J7YYA.js} +6 -6
- package/dist/_node-chunks/{chunk-ILFIERUB.js → chunk-ALHPFKVB.js} +8 -8
- package/dist/_node-chunks/{chunk-SQMCVWOR.js → chunk-ANDQVXYX.js} +8 -8
- package/dist/_node-chunks/{chunk-HUFAUSEX.js → chunk-AS4SFRCZ.js} +6 -6
- package/dist/_node-chunks/{chunk-XBXGLD3K.js → chunk-BLUMKQQB.js} +6 -6
- package/dist/_node-chunks/{chunk-QU5ANYM7.js → chunk-C5JG7EKF.js} +6 -6
- package/dist/_node-chunks/{chunk-P6QAFJ5M.js → chunk-CBUQY454.js} +7 -15
- package/dist/_node-chunks/{chunk-4LPAWP5S.js → chunk-CF7KLGUW.js} +22 -20
- package/dist/_node-chunks/{chunk-MOITZTEA.js → chunk-CGVPHZVD.js} +8 -8
- package/dist/_node-chunks/{chunk-2NWHHNNI.js → chunk-DABFUVLR.js} +6 -6
- package/dist/_node-chunks/{chunk-XH6TDVML.js → chunk-DCNZ6SFN.js} +6 -6
- package/dist/_node-chunks/{chunk-F2N6BJRH.js → chunk-DDGW2EBW.js} +29843 -51588
- package/dist/_node-chunks/{chunk-OS5LQEC6.js → chunk-DRLBJM6X.js} +7 -7
- package/dist/_node-chunks/{chunk-GEMKJCEE.js → chunk-E3O7VAPG.js} +10 -10
- package/dist/_node-chunks/{chunk-4GD7MMLJ.js → chunk-FIFCNBTL.js} +7 -7
- package/dist/_node-chunks/{chunk-UMZSNFWM.js → chunk-FQWTUSYB.js} +6 -6
- package/dist/_node-chunks/{chunk-JEEXR245.js → chunk-G6YNW4FK.js} +7 -7
- package/dist/_node-chunks/{chunk-HP5UY6OY.js → chunk-GDFQQO5U.js} +6 -6
- package/dist/_node-chunks/{chunk-653BSJIX.js → chunk-GGTXOH3W.js} +6 -6
- package/dist/_node-chunks/{chunk-PDCSUZ4L.js → chunk-GIOREKIG.js} +7 -7
- package/dist/_node-chunks/{chunk-V2JDVM46.js → chunk-GOFK4EKU.js} +6 -6
- package/dist/_node-chunks/{chunk-INEYTOWF.js → chunk-GQ3HJNIH.js} +10 -13
- package/dist/_node-chunks/{chunk-2APY2YSW.js → chunk-GRTI5653.js} +7 -7
- package/dist/_node-chunks/{chunk-KN2S7JF2.js → chunk-HKL3VOYX.js} +6 -6
- package/dist/_node-chunks/{chunk-A2UMIN5B.js → chunk-HUPRQZ3I.js} +7 -7
- package/dist/_node-chunks/{chunk-7JA2DMCJ.js → chunk-HWRHYM7Z.js} +6 -6
- package/dist/_node-chunks/{chunk-SBQT3LMM.js → chunk-I7HRDCNY.js} +10 -10
- package/dist/_node-chunks/{chunk-2IJCISIB.js → chunk-IFPMZ247.js} +6 -6
- package/dist/_node-chunks/{chunk-DIUBMAMV.js → chunk-J6M5CRYZ.js} +8 -8
- package/dist/_node-chunks/{chunk-IBO346NQ.js → chunk-JPXJI6QR.js} +60 -134
- package/dist/_node-chunks/{chunk-STRSG3GT.js → chunk-JS2J2SKX.js} +6 -6
- package/dist/_node-chunks/{chunk-FNGLVURC.js → chunk-JZWF3XLN.js} +6 -6
- package/dist/_node-chunks/{chunk-KINEBDMM.js → chunk-KF3FT3NI.js} +9 -9
- package/dist/_node-chunks/chunk-KWPWQA7G.js +2609 -0
- package/dist/_node-chunks/{chunk-OIIORQX5.js → chunk-L4JGWK4K.js} +6 -6
- package/dist/_node-chunks/{chunk-MRZD5SBV.js → chunk-LFIFBDMS.js} +6 -6
- package/dist/_node-chunks/{chunk-UAALLQAQ.js → chunk-LWKLJYYQ.js} +6 -6
- package/dist/_node-chunks/{chunk-AFKKN27O.js → chunk-LXVSVTQ3.js} +6 -6
- package/dist/_node-chunks/chunk-MDW3GSU3.js +69 -0
- package/dist/_node-chunks/{chunk-UXW4I2CN.js → chunk-MFN2XBPL.js} +7 -7
- package/dist/_node-chunks/{chunk-ESZVID7Q.js → chunk-MQFB44YS.js} +7 -7
- package/dist/_node-chunks/{chunk-3XDIBUGD.js → chunk-MZ2GSR3G.js} +23 -51
- package/dist/_node-chunks/{chunk-POXTROIX.js → chunk-N7HEOGTM.js} +9 -6
- package/dist/_node-chunks/{chunk-UIFLXDUL.js → chunk-NUAQC3XP.js} +16 -13
- package/dist/_node-chunks/{chunk-BOUA7OB7.js → chunk-NX6CSWF3.js} +8 -8
- package/dist/_node-chunks/{chunk-B3LK7C7B.js → chunk-NZ7EQWYA.js} +9 -9
- package/dist/_node-chunks/{chunk-U5QMVW3H.js → chunk-OLGIDCVD.js} +650 -9
- package/dist/_node-chunks/{chunk-NAYTBC72.js → chunk-P65JVLO3.js} +8 -8
- package/dist/_node-chunks/{chunk-M2UZP5GC.js → chunk-PAN35AYX.js} +7 -7
- package/dist/_node-chunks/{chunk-GZBUCUF7.js → chunk-PLWLCVP2.js} +6 -6
- package/dist/_node-chunks/{chunk-A4YELYR3.js → chunk-Q4BEWGMK.js} +6 -6
- package/dist/_node-chunks/{chunk-YYIZ2PC4.js → chunk-QNUXGVZZ.js} +6 -6
- package/dist/_node-chunks/{chunk-WHZWLJGO.js → chunk-R5DWO2S2.js} +31 -30
- package/dist/_node-chunks/{chunk-RMLENEZC.js → chunk-SLZV7PTQ.js} +8 -8
- package/dist/_node-chunks/{chunk-B5VFV3ZW.js → chunk-TIRP5JQM.js} +11 -10
- package/dist/_node-chunks/{chunk-TLVEPWBN.js → chunk-TMXWDY2O.js} +6 -6
- package/dist/_node-chunks/{chunk-LGUMVMBA.js → chunk-TN3ULFFZ.js} +6 -6
- package/dist/_node-chunks/{chunk-5ZLOPVTG.js → chunk-TPSJW4CQ.js} +6 -6
- package/dist/_node-chunks/{chunk-RNF3Z4ZJ.js → chunk-TYBPAV3X.js} +6 -6
- package/dist/_node-chunks/chunk-UUE3PSJB.js +11 -0
- package/dist/_node-chunks/chunk-VKNRNBTB.js +18 -0
- package/dist/_node-chunks/{chunk-6Y6RBJD7.js → chunk-VPU4E7DI.js} +25 -8
- package/dist/_node-chunks/{chunk-FJDJE7XC.js → chunk-WIQ6Y3NX.js} +6 -6
- package/dist/_node-chunks/{chunk-DD2S4BFV.js → chunk-WRG3CFGS.js} +6 -6
- package/dist/_node-chunks/{chunk-FAZ3MUOI.js → chunk-X3RTVNRN.js} +7 -7
- package/dist/_node-chunks/chunk-XOGU5PWI.js +347 -0
- package/dist/_node-chunks/{chunk-AU3SF2WM.js → chunk-XWGMQW2H.js} +6 -6
- package/dist/_node-chunks/chunk-YCXTTQ7K.js +620 -0
- package/dist/_node-chunks/{chunk-KZBZYQTZ.js → chunk-YHH57LHY.js} +9 -9
- package/dist/_node-chunks/{chunk-J3M3X7GO.js → chunk-YMZ2SGFK.js} +6 -6
- package/dist/_node-chunks/{chunk-AY6B2C46.js → chunk-YNENOZRY.js} +7 -7
- package/dist/_node-chunks/{chunk-CGWACHNW.js → chunk-YPGVYNJB.js} +6 -6
- package/dist/_node-chunks/{chunk-OQ4NCWE4.js → chunk-YQDBSAXW.js} +7 -7
- package/dist/_node-chunks/{chunk-YGXJOSRU.js → chunk-Z4NZLBOX.js} +7 -7
- package/dist/_node-chunks/{chunk-74IEHSIR.js → chunk-ZC3ZZKMS.js} +8 -8
- package/dist/_node-chunks/{chunk-QDLR4JF5.js → chunk-ZCITDAV4.js} +34 -949
- package/dist/_node-chunks/chunk-ZNSGFYAT.js +25 -0
- package/dist/_node-chunks/{chunk-XD5SYXAU.js → chunk-ZSH6BUCW.js} +25 -25
- package/dist/_node-chunks/{chunk-X2KWNNFB.js → chunk-ZTFNOXZF.js} +6 -6
- package/dist/_node-chunks/dist-GGTGKXZA.js +27 -0
- package/dist/_node-chunks/dist-NS676VJR.js +16 -0
- package/dist/_node-chunks/{local-runtime-KTI3DH6X.js → local-runtime-BUTEKJYV.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-2E3SW5TL.js → mdx-plugin-7WXQIHPV.js} +2263 -130
- package/dist/_node-chunks/{monorepo-MWAMFHKY.js → monorepo-NCD3X2BR.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-MGORG6W7.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-SD3B272K.js} +11 -11
- package/dist/_node-chunks/optimized-tests-ITVOHEOA.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-QTQOY7E7.js → pattern-copy-play-3QJANDJD.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-LEUHOKX6.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-T7DZNKMB.js → rehype-external-links-4LR5BDR2.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-CSHI5WYI.js → rehype-slug-PWFRGOEV.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-RAZD36YR.js → relaxed-limits-VNNWUW7X.js} +11 -11
- package/dist/_node-chunks/{run-S6XSLPEB.js → run-RUAAWEQT.js} +13 -13
- package/dist/_node-chunks/{run-KJ3Z2TTY.js → run-YK6ARCWS.js} +17 -17
- package/dist/_node-chunks/session-id-JJYVZAKO.js +23 -0
- package/dist/_node-chunks/{setup-35J66GFB.js → setup-4QKCICV6.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-Z7OCRDKD.js → vitest.config.4.template-WVFLIXN7.js} +7 -7
- package/dist/actions/decorator.js +2 -1
- package/dist/actions/index.js +2 -1
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +24 -17
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.js +46 -25
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +3 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +3 -2
- package/dist/addon-links/react/index.js +2 -1
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +17 -45
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-themes/manager.js +1 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +8 -8
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +15 -16
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +17 -17
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/bin/core.js +61 -60
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +16 -15
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-DF6btpT3.d.ts → chunk-BGhyFTJO.d.ts} +2 -2
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/{chunk-DvufcbCc.d.ts → chunk-CVY28Ngy.d.ts} +1 -1
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
- package/dist/{chunk-BYnH2sbb.d.ts → chunk-ClI-HEh5.d.ts} +1 -1
- package/dist/{chunk-DIz17UEJ.d.ts → chunk-CzmZhVrn.d.ts} +35 -1
- package/dist/{chunk-B2xylxt5.d.ts → chunk-DROZ9oel.d.ts} +7 -271
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +42 -4952
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +1 -1
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.js +3 -1
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +35 -37
- package/dist/components/index.d.ts +14 -231
- package/dist/components/index.js +2518 -8365
- package/dist/core-events/index.d.ts +4 -3
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +2 -2
- package/dist/core-server/index.js +450 -147
- package/dist/core-server/presets/common-manager.js +96 -894
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +39 -40
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +2 -2
- package/dist/csf/index.js +27 -93
- package/dist/csf-tools/index.d.ts +2 -12
- package/dist/csf-tools/index.js +14 -14
- package/dist/instrumenter/index.js +3 -1
- package/dist/manager/_manager-chunks/{globals-runtime-dKGpUUSb.js → globals-runtime-B-IeQLQu.js} +285 -61
- package/dist/manager/_manager-chunks/{globals-runtime-DuLFjsF4.js → globals-runtime-B5-0Ccbv.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-8HkdnU2F.js → globals-runtime-B71TiXST.js} +93 -2146
- package/dist/manager/_manager-chunks/globals-runtime-BMCaBukU.js +413 -0
- package/dist/manager/_manager-chunks/globals-runtime-BUP5e_t9.js +1396 -0
- package/dist/manager/_manager-chunks/globals-runtime-C7mqoHpE.js +2093 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-CYNosEiD.js} +1 -2
- package/dist/manager/_manager-chunks/globals-runtime-C_evJrEn.js +1960 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-CdgVeAbk.js} +408 -377
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-Cqn8KdSZ.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-ZHrQFa3-.js → globals-runtime-CrIF09P8.js} +1246 -539
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-Ct1kY4wb.js} +638 -1731
- package/dist/manager/_manager-chunks/globals-runtime-CvyFEPIY.js +5282 -0
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DMBjo1QS.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-C9P2ZbMM.js → globals-runtime-DUK6bGcb.js} +52 -25
- package/dist/manager/_manager-chunks/globals-runtime-DedfO-DP.js +3414 -0
- package/dist/manager/_manager-chunks/{globals-runtime-q5R9dawi.js → globals-runtime-DqhIYwLp.js} +165 -152
- package/dist/manager/_manager-chunks/globals-runtime-XSxCU7PR.js +41 -0
- package/dist/manager/_manager-chunks/runtime-BR5z0WoJ.js +456 -0
- package/dist/manager/_manager-chunks/{runtime-DdCaBowH.js → runtime-BgYvp1WN.js} +15 -7
- package/dist/manager/_manager-chunks/{runtime-BGvLm94o.js → runtime-CHI-LHF1.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-BdLdsHca.js → runtime-CUymj6EY.js} +280 -288
- package/dist/manager/_manager-chunks/runtime-CaU1DSEZ.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-CqItbdKW.js} +3 -2
- package/dist/manager/_manager-chunks/{runtime-B9QzcYO3.js → runtime-D4ZOOIV0.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-50_aob4S.js → runtime-DER98nV0.js} +3 -19
- package/dist/manager/_manager-chunks/{runtime-CE2sHVqs.js → runtime-DrTLBe7a.js} +39 -40
- package/dist/manager/_manager-chunks/runtime-MAf7Wpk5.js +692 -0
- package/dist/manager/_manager-chunks/{runtime-CKP1i0--.js → runtime-cVFIMcca.js} +1 -1
- 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 +22 -28
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +16 -11
- package/dist/nextjs-vite/index.js +3 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +11 -11
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +1 -2
- package/dist/nextjs-vite-plugin/index.js +12 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.d.ts +65 -72
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +11 -13
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
- package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
- package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
- package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +2 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.js +25 -211
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/withStorybook.js +11 -10
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.js +3 -1
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +808 -573
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.js +22 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +17 -45
- package/dist/_browser-chunks/WithTooltip-523JD6VH.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
- package/dist/_node-chunks/chunk-7XCEKQGV.js +0 -18
- package/dist/_node-chunks/chunk-EGS2SAD2.js +0 -5414
- package/dist/_node-chunks/chunk-GKTCJPLL.js +0 -36
- package/dist/_node-chunks/chunk-HENM5ZK3.js +0 -1877
- package/dist/_node-chunks/chunk-HQM4ISVU.js +0 -11
- package/dist/_node-chunks/chunk-K3I3G4VL.js +0 -4731
- package/dist/_node-chunks/chunk-MZMPFII2.js +0 -29
- package/dist/_node-chunks/chunk-NYAWUR6L.js +0 -3823
- package/dist/_node-chunks/chunk-NYRUWAL3.js +0 -23
- package/dist/_node-chunks/chunk-SSZ5REKS.js +0 -3008
- package/dist/_node-chunks/chunk-WEW23EEE.js +0 -662
- package/dist/_node-chunks/chunk-XWQEWRFD.js +0 -51
- package/dist/_node-chunks/dist-CNA633FI.js +0 -16
- package/dist/_node-chunks/globby-HRQV5N3V.js +0 -2884
- package/dist/_node-chunks/jiti-WE7NHS2Y.js +0 -3848
- package/dist/_node-chunks/lib-7MVA6CTW.js +0 -366
- package/dist/_node-chunks/optimized-tests-IAX6YURR.js +0 -22
- package/dist/_node-chunks/postinstallAddon-ROH2TBJX.js +0 -20
- package/dist/_node-chunks/session-id-GM226DGP.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
- package/dist/manager/_manager-chunks/runtime-89Cb0A8U.js +0 -998
- package/dist/manager/_manager-chunks/runtime-wL4UO7YO.js +0 -452
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucas Knight
|
|
4
|
+
Copyright (c) 2024 Storybook
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
# Forkbook
|
|
1
|
+
# 🪩 Forkbook
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@aussieljk/forkbook)
|
|
4
|
-
[](https://www.npmjs.com/package/@aussieljk/forkbook)
|
|
4
|
+
[](https://www.npmjs.com/package/@aussieljk/forkbook)
|
|
5
5
|
|
|
6
|
-
Forkbook is a small, fast
|
|
6
|
+
Forkbook is a small, fast workshop for UI components. Use it to develop, document and test components in isolation. It reads Storybook stories (CSF) and MDX docs.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- Docs: [forkbook.ljk.dev](https://forkbook.ljk.dev)
|
|
10
|
-
|
|
11
|
-
## What is different
|
|
12
|
-
|
|
13
|
-
- It is one package. The renderer, the frameworks, the Vite builder, the addons and the CLI are subpaths of `@aussieljk/forkbook`.
|
|
14
|
-
- It supports only React with Vite and Next.js with Vite.
|
|
15
|
-
- The CLI is `forkbook`, and the config folder is `.forkbook`.
|
|
16
|
-
- It sends no telemetry, unless you set an OpenTelemetry endpoint.
|
|
8
|
+
It supports React with Vite, Next.js with Vite, and React Native (iOS, Expo).
|
|
17
9
|
|
|
18
|
-
##
|
|
10
|
+
## Install
|
|
19
11
|
|
|
20
12
|
```sh
|
|
21
13
|
bun add -d @aussieljk/forkbook
|
|
@@ -23,56 +15,46 @@ bunx forkbook init
|
|
|
23
15
|
bunx forkbook dev
|
|
24
16
|
```
|
|
25
17
|
|
|
26
|
-
`.forkbook/main.ts`:
|
|
27
|
-
|
|
28
18
|
```ts
|
|
29
|
-
import type {
|
|
19
|
+
import type { Meta, StoryObj } from '@aussieljk/forkbook/react-vite';
|
|
20
|
+
```
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
stories: ['../src/**/*.stories.tsx'],
|
|
33
|
-
framework: '@aussieljk/forkbook/react-vite',
|
|
34
|
-
addons: ['@aussieljk/forkbook/addon-docs', '@aussieljk/forkbook/addon-a11y'],
|
|
35
|
-
};
|
|
22
|
+
## Quick start
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
- React with Vite: [forkbook.ljk.dev/docs/get-started/frameworks/react-vite](https://forkbook.ljk.dev/docs/get-started/frameworks/react-vite)
|
|
25
|
+
- Next.js with Vite: [forkbook.ljk.dev/docs/get-started/frameworks/nextjs-vite](https://forkbook.ljk.dev/docs/get-started/frameworks/nextjs-vite)
|
|
26
|
+
- React Native (iOS): [forkbook.ljk.dev/docs/get-started/frameworks/react-native](https://forkbook.ljk.dev/docs/get-started/frameworks/react-native)
|
|
39
27
|
|
|
40
|
-
##
|
|
28
|
+
## Forkbook and Storybook
|
|
41
29
|
|
|
42
|
-
|
|
|
43
|
-
|
|
44
|
-
| `@aussieljk/forkbook
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| `@
|
|
54
|
-
|
|
|
30
|
+
| | Forkbook | Storybook 10.6 |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Packages | One: `@aussieljk/forkbook` | One for the core, plus one for each framework, renderer and addon |
|
|
33
|
+
| Frameworks | React (Vite), Next.js (Vite), React Native (iOS) | React, Vue, Angular, Svelte, Preact, Web Components and more |
|
|
34
|
+
| Bundler | Vite 8 only | Vite and webpack |
|
|
35
|
+
| UI styles | CSS variables and CSS modules | Emotion |
|
|
36
|
+
| Syntax highlight | sugar-high | react-syntax-highlighter (Prism) |
|
|
37
|
+
| Component docs | tsgo (TypeScript native) | react-docgen |
|
|
38
|
+
| Source formatter | oxfmt | Prettier |
|
|
39
|
+
| File watcher | @parcel/watcher | watchpack |
|
|
40
|
+
| React Native UI | Expo UI (SwiftUI sheets, slider, date picker) and SF Symbols | @gorhom/bottom-sheet, react-native-svg, community slider and date picker |
|
|
41
|
+
| Unpacked size (web and React Native packages) | 25.8 MB | 28.9 MB (`storybook`, `@storybook/react-vite`, `react`, `builder-vite`, `react-dom-shim`, `addon-docs`, `addon-a11y`, `addon-vitest`, `nextjs-vite` and the six React Native packages) |
|
|
42
|
+
| Telemetry | Off | On (you can turn it off) |
|
|
55
43
|
|
|
56
|
-
##
|
|
44
|
+
## Moving from Storybook
|
|
57
45
|
|
|
58
|
-
|
|
46
|
+
Replace the packages with `@aussieljk/forkbook` and change the imports. See [forkbook.ljk.dev/docs/migrate/from-storybook](https://forkbook.ljk.dev/docs/migrate/from-storybook).
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
bun add -d @opentelemetry/api @opentelemetry/context-async-hooks @opentelemetry/sdk-trace-base \
|
|
62
|
-
@opentelemetry/sdk-logs @opentelemetry/exporter-trace-otlp-http \
|
|
63
|
-
@opentelemetry/exporter-logs-otlp-http @opentelemetry/resources
|
|
64
|
-
OTEL_EXPORTER_OTLP_ENDPOINT=https://signoz.example.com bunx forkbook dev
|
|
65
|
-
```
|
|
48
|
+
## Notes
|
|
66
49
|
|
|
67
|
-
-
|
|
68
|
-
- Logs: one record for each Forkbook event (`forkbook.dev`, `forkbook.build`, `forkbook.save-story`, and more). The data is anonymous and has no file paths.
|
|
69
|
-
- The standard variables apply: `OTEL_SERVICE_NAME` (default `forkbook`), `OTEL_EXPORTER_OTLP_HEADERS` (for example an ingestion key).
|
|
70
|
-
- `core.disableTelemetry: true` in `main.ts` stops the event logs.
|
|
50
|
+
- Telemetry: Forkbook sends nothing. To send traces and logs to your own OpenTelemetry server, set `OTEL_EXPORTER_OTLP_ENDPOINT` ([telemetry](https://forkbook.ljk.dev/docs/configure/telemetry)).
|
|
71
51
|
|
|
72
|
-
##
|
|
52
|
+
## Links
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
- Docs: [forkbook.ljk.dev](https://forkbook.ljk.dev)
|
|
55
|
+
- Docs for agents: [forkbook.ljk.dev/llms.txt](https://forkbook.ljk.dev/llms.txt) (add `.md` to any docs page URL for markdown)
|
|
56
|
+
- Source: [github.com/aussieljk/forkbook](https://github.com/aussieljk/forkbook). To work on it, see [CLAUDE.md](https://github.com/aussieljk/forkbook/blob/master/CLAUDE.md). `bun run verify` builds, type-checks and tests the repo.
|
|
75
57
|
|
|
76
58
|
## Licence
|
|
77
59
|
|
|
78
|
-
MIT.
|
|
60
|
+
MIT.
|
|
@@ -578,7 +578,7 @@ var require_color_convert = __commonJS({
|
|
|
578
578
|
// src/addon-docs/blocks/controls/Color.tsx
|
|
579
579
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
580
580
|
import { Button, Form, PopoverProvider } from "@aussieljk/forkbook/internal/components";
|
|
581
|
-
import {
|
|
581
|
+
import { CodeIcon } from "@phosphor-icons/react";
|
|
582
582
|
var import_color_convert = __toESM(require_color_convert(), 1);
|
|
583
583
|
|
|
584
584
|
// ../../node_modules/react-colorful/dist/index.mjs
|
|
@@ -802,7 +802,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
|
|
|
802
802
|
let style = document.createElement("style");
|
|
803
803
|
style.setAttribute("data-fb-css", id), style.textContent = '.fb-jgXPQa-wrapper{max-width:250px;position:relative}.fb-jgXPQa-tooltipContent{width:200px;margin:5px;& .react-colorful__saturation{border-radius:4px 4px 0 0}& .react-colorful__hue{box-shadow:inset 0 0 0 1px #0000000d}& .react-colorful__last-control{border-radius:0 0 4px 4px}}.fb-jgXPQa-swatches{grid-template-columns:repeat(9,16px);gap:6px;width:200px;margin-top:5px;padding:3px;display:grid}.fb-jgXPQa-swatch{--checkers:url("data:image/svg+xml;charset=utf-8,<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"16\\" height=\\"16\\" fill-opacity=\\"0.05\\" fill=\\"black\\"><path d=\\"M8 0h8v8H8zM0 8h8v8H0z\\"/></svg>");width:16px;height:16px;box-shadow:var(--fb-app-border-color) 0 0 0 1px inset;border-radius:var(--fb-app-border-radius);border:none;&,&:hover{background:unset;background-color:unset;background-image:linear-gradient(var(--fb-swatch-color), var(--fb-swatch-color)), var(--checkers)}&[data-selected]{box-shadow:var(--fb-app-border-color) 0 0 0 1px inset, rgb(from var(--fb-text-muted-color) r g b / .31) 0 0 0 4px}}:where([data-fb-theme=dark]) .fb-jgXPQa-swatch{--checkers:url("data:image/svg+xml;charset=utf-8,<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"16\\" height=\\"16\\" fill-opacity=\\"0.05\\" fill=\\"white\\"><path d=\\"M8 0h8v8H8zM0 8h8v8H0z\\"/></svg>")}.fb-jgXPQa-input{box-sizing:border-box;width:100%;font-family:var(--fb-font-base);padding-left:30px;padding-right:30px;[aria-readonly=true]>&{background:var(--fb-color-lighter)}}:where([data-fb-theme=dark]) [aria-readonly=true]>.fb-jgXPQa-input{background:0 0}.fb-jgXPQa-popoverTrigger{z-index:1;cursor:pointer;position:absolute;top:4px;left:4px;&:disabled,&[aria-disabled=true]{cursor:not-allowed}}.fb-jgXPQa-cycleColorSpaceButton{z-index:1;box-sizing:border-box;cursor:pointer;width:20px;height:20px;color:var(--fb-input-color);padding:4px;position:absolute;top:6px;right:7px}', document.head.appendChild(style);
|
|
804
804
|
}
|
|
805
|
-
var Color_default = {
|
|
805
|
+
var Color_default = { wrapper: "fb-jgXPQa-wrapper", swatches: "fb-jgXPQa-swatches", swatch: "fb-jgXPQa-swatch", popoverTrigger: "fb-jgXPQa-popoverTrigger", cycleColorSpaceButton: "fb-jgXPQa-cycleColorSpaceButton", tooltipContent: "fb-jgXPQa-tooltipContent", input: "fb-jgXPQa-input" };
|
|
806
806
|
|
|
807
807
|
// src/addon-docs/blocks/controls/Color.tsx
|
|
808
808
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1014,7 +1014,7 @@ var swatchStyle = (color) => ({ "--fb-swatch-color": color }), ColorSpace = /* @
|
|
|
1014
1014
|
ariaLabel: "Cycle through color spaces",
|
|
1015
1015
|
disabled: readOnly,
|
|
1016
1016
|
onClick: readOnly ? void 0 : cycleColorSpace,
|
|
1017
|
-
children: jsx(
|
|
1017
|
+
children: jsx(CodeIcon, {})
|
|
1018
1018
|
}
|
|
1019
1019
|
) : null
|
|
1020
1020
|
] });
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PortalContainerContext,
|
|
3
|
+
PortalTheme,
|
|
4
|
+
index_parts_exports
|
|
5
|
+
} from "./chunk-DPRGR3QP.js";
|
|
6
|
+
import "./chunk-X7D777E6.js";
|
|
7
|
+
import {
|
|
8
|
+
global
|
|
9
|
+
} from "./chunk-6AKCRYVX.js";
|
|
10
|
+
import "./chunk-IMSF75WX.js";
|
|
11
|
+
|
|
12
|
+
// src/components/components/tooltip/WithTooltip.tsx
|
|
13
|
+
import React, { useCallback, useContext, useEffect, useId, useState } from "react";
|
|
14
|
+
import { deprecate } from "@aussieljk/forkbook/internal/client-logger";
|
|
15
|
+
|
|
16
|
+
// storybook-css:/home/runner/work/forkbook/forkbook/code/core/src/components/components/tooltip/WithTooltip.module.css
|
|
17
|
+
var id = "core/src/components/components/tooltip/WithTooltip.module.css";
|
|
18
|
+
if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]`)) {
|
|
19
|
+
let style = document.createElement("style");
|
|
20
|
+
style.setAttribute("data-fb-css", id), style.textContent = ".fb-QoytUq-wrapper{--tooltip-bg:#fffffff2;z-index:2147483647;color-scheme:light dark;display:inline-block;&[data-chrome]{background:var(--tooltip-bg);filter:drop-shadow(0 5px 5px #0000000d)drop-shadow(0 1px 3px #0000001a);border-radius:calc(var(--fb-app-border-radius) + 2px);font-family:var(--fb-font-base);font-size:var(--fb-size-s1)}}:where([data-fb-theme=dark]) .fb-QoytUq-wrapper:not([data-color]){--tooltip-bg:var(--fb-background-app)}.fb-QoytUq-arrow{border:8px solid #0000;position:absolute;inset:auto;&[data-side=top]{border-bottom-width:0;border-top-color:var(--tooltip-bg);bottom:-8px;transform:translate(8px)}&[data-side=bottom]{border-top-width:0;border-bottom-color:var(--tooltip-bg);top:-8px;transform:translate(8px)}&[data-side=left]{border-right-width:0;border-left-color:var(--tooltip-bg);right:-8px;transform:translateY(8px)}&[data-side=right]{border-left-width:0;border-right-color:var(--tooltip-bg);left:-8px;transform:translateY(8px)}}.fb-QoytUq-target{cursor:pointer;display:inline-block;&[data-hover]{cursor:default}}.fb-QoytUq-targetSvg{cursor:pointer;&[data-hover]{cursor:default}}", document.head.appendChild(style);
|
|
21
|
+
}
|
|
22
|
+
var WithTooltip_default = { targetSvg: "fb-QoytUq-targetSvg", target: "fb-QoytUq-target", wrapper: "fb-QoytUq-wrapper", arrow: "fb-QoytUq-arrow" };
|
|
23
|
+
|
|
24
|
+
// src/components/components/tooltip/WithTooltip.tsx
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
var { document: document2 } = global, Tooltip = React.forwardRef(
|
|
27
|
+
({
|
|
28
|
+
placement = "top",
|
|
29
|
+
hasChrome = !0,
|
|
30
|
+
children,
|
|
31
|
+
arrowProps = {},
|
|
32
|
+
tooltipRef,
|
|
33
|
+
color,
|
|
34
|
+
withArrows,
|
|
35
|
+
hidden,
|
|
36
|
+
className,
|
|
37
|
+
style,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) => jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-testid": "tooltip",
|
|
43
|
+
ref,
|
|
44
|
+
hidden,
|
|
45
|
+
...props,
|
|
46
|
+
className: [WithTooltip_default.wrapper, className].filter(Boolean).join(" "),
|
|
47
|
+
style: { display: hidden ? "none" : void 0, ...style },
|
|
48
|
+
"data-chrome": hasChrome || void 0,
|
|
49
|
+
"data-color": color,
|
|
50
|
+
children: [
|
|
51
|
+
hasChrome && withArrows && jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: WithTooltip_default.arrow,
|
|
55
|
+
"data-side": placement.split("-")[0],
|
|
56
|
+
...arrowProps,
|
|
57
|
+
"data-color": color
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
children
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
Tooltip.displayName = "Tooltip";
|
|
66
|
+
var toSideAndAlign = (placement) => {
|
|
67
|
+
let [side, align = "center"] = placement.split("-");
|
|
68
|
+
return {
|
|
69
|
+
side: side === "auto" ? "top" : side,
|
|
70
|
+
align
|
|
71
|
+
};
|
|
72
|
+
}, WithTooltipPure = ({
|
|
73
|
+
svg = !1,
|
|
74
|
+
trigger = "click",
|
|
75
|
+
closeOnOutsideClick = !1,
|
|
76
|
+
placement = "top",
|
|
77
|
+
hasChrome = !0,
|
|
78
|
+
defaultVisible = !1,
|
|
79
|
+
withArrows,
|
|
80
|
+
offset = [0, 8],
|
|
81
|
+
tooltip,
|
|
82
|
+
children,
|
|
83
|
+
delayHide = trigger === "hover" ? 200 : 0,
|
|
84
|
+
visible,
|
|
85
|
+
interactive: _interactive,
|
|
86
|
+
delayShow = trigger === "hover" ? 400 : 0,
|
|
87
|
+
strategy,
|
|
88
|
+
onVisibleChange,
|
|
89
|
+
portalContainer,
|
|
90
|
+
...props
|
|
91
|
+
}) => {
|
|
92
|
+
let Container = svg ? "g" : "div", triggers = trigger === null ? [] : Array.isArray(trigger) ? trigger : [trigger], isHover = triggers.includes("hover"), isClick = triggers.includes("click"), isFocus = triggers.includes("focus"), triggerId = useId(), [shown, setShown] = useState(defaultVisible), isVisible = visible ?? shown, setVisible = useCallback(
|
|
93
|
+
(next) => {
|
|
94
|
+
setShown(next), onVisibleChange?.(next);
|
|
95
|
+
},
|
|
96
|
+
[onVisibleChange]
|
|
97
|
+
), onOpenChange = useCallback(
|
|
98
|
+
(open, { reason }) => {
|
|
99
|
+
reason === "trigger-press" && !isClick || reason === "trigger-hover" && !isHover || reason === "trigger-focus" && !isFocus || reason === "outside-press" && !closeOnOutsideClick || setVisible(open);
|
|
100
|
+
},
|
|
101
|
+
[isClick, isHover, isFocus, closeOnOutsideClick, setVisible]
|
|
102
|
+
), contextContainer = useContext(PortalContainerContext), portalTarget = (typeof portalContainer == "string" ? document2.querySelector(portalContainer) : portalContainer) || contextContainer || document2.body;
|
|
103
|
+
return jsxs(index_parts_exports.Root, { open: isVisible, onOpenChange, triggerId, children: [
|
|
104
|
+
jsx(
|
|
105
|
+
index_parts_exports.Trigger,
|
|
106
|
+
{
|
|
107
|
+
id: triggerId,
|
|
108
|
+
nativeButton: !1,
|
|
109
|
+
openOnHover: isHover,
|
|
110
|
+
delay: delayShow,
|
|
111
|
+
closeDelay: delayHide,
|
|
112
|
+
render: jsx(
|
|
113
|
+
Container,
|
|
114
|
+
{
|
|
115
|
+
className: svg ? WithTooltip_default.targetSvg : WithTooltip_default.target,
|
|
116
|
+
"data-hover": isHover || void 0,
|
|
117
|
+
...props
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
children
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
jsx(index_parts_exports.Portal, { container: portalTarget, children: jsx(PortalTheme, { children: jsx(
|
|
124
|
+
index_parts_exports.Positioner,
|
|
125
|
+
{
|
|
126
|
+
...toSideAndAlign(placement),
|
|
127
|
+
sideOffset: offset[1],
|
|
128
|
+
alignOffset: offset[0],
|
|
129
|
+
collisionPadding: 8,
|
|
130
|
+
arrowPadding: 8,
|
|
131
|
+
positionMethod: strategy,
|
|
132
|
+
style: { zIndex: 2147483647 },
|
|
133
|
+
children: jsxs(
|
|
134
|
+
index_parts_exports.Popup,
|
|
135
|
+
{
|
|
136
|
+
initialFocus: !1,
|
|
137
|
+
finalFocus: !1,
|
|
138
|
+
render: jsx(Tooltip, { hasChrome }),
|
|
139
|
+
children: [
|
|
140
|
+
hasChrome && withArrows && jsx(index_parts_exports.Arrow, { render: jsx("div", { className: WithTooltip_default.arrow }) }),
|
|
141
|
+
typeof tooltip == "function" ? tooltip({ onHide: () => setVisible(!1) }) : tooltip
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
) }) })
|
|
147
|
+
] });
|
|
148
|
+
}, WithToolTipState = ({
|
|
149
|
+
startOpen = !1,
|
|
150
|
+
onVisibleChange: onChange,
|
|
151
|
+
...rest
|
|
152
|
+
}) => {
|
|
153
|
+
let [tooltipShown, setTooltipShown] = useState(startOpen), onVisibilityChange = useCallback(
|
|
154
|
+
(visibility) => {
|
|
155
|
+
onChange && onChange(visibility) === !1 || setTooltipShown(visibility);
|
|
156
|
+
},
|
|
157
|
+
[onChange]
|
|
158
|
+
);
|
|
159
|
+
return useEffect(() => {
|
|
160
|
+
let hide = () => onVisibilityChange(!1), handleKeyDown = (e) => {
|
|
161
|
+
e.key === "Escape" && hide();
|
|
162
|
+
};
|
|
163
|
+
document2.addEventListener("keydown", handleKeyDown, !1);
|
|
164
|
+
let iframes = Array.from(document2.getElementsByTagName("iframe")), unbinders = [];
|
|
165
|
+
return iframes.forEach((iframe) => {
|
|
166
|
+
let bind = () => {
|
|
167
|
+
try {
|
|
168
|
+
iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide), unbinders.push(() => {
|
|
169
|
+
try {
|
|
170
|
+
iframe.contentWindow.document.removeEventListener("click", hide);
|
|
171
|
+
} catch {
|
|
172
|
+
}
|
|
173
|
+
}));
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
bind(), iframe.addEventListener("load", bind), unbinders.push(() => {
|
|
178
|
+
iframe.removeEventListener("load", bind);
|
|
179
|
+
});
|
|
180
|
+
}), () => {
|
|
181
|
+
document2.removeEventListener("keydown", handleKeyDown), unbinders.forEach((unbind) => {
|
|
182
|
+
unbind();
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
}), jsx(WithTooltipPure, { ...rest, visible: tooltipShown, onVisibleChange: onVisibilityChange });
|
|
186
|
+
}, DeprecatedPure = (props) => (deprecate(
|
|
187
|
+
"WithTooltipPure is deprecated and will be removed in Forkbook 11. Please use WithTooltip instead."
|
|
188
|
+
), jsx(WithTooltipPure, { "data-deprecated": "WithTooltipPure", ...props })), DeprecatedState = (props) => (deprecate(
|
|
189
|
+
"WithToolTipState is deprecated and will be removed in Forkbook 11. Please use WithTooltip instead."
|
|
190
|
+
), jsx(WithToolTipState, { "data-deprecated": "WithToolTipState", ...props }));
|
|
191
|
+
export {
|
|
192
|
+
Tooltip,
|
|
193
|
+
DeprecatedState as WithToolTipState,
|
|
194
|
+
WithToolTipState as WithTooltip,
|
|
195
|
+
DeprecatedPure as WithTooltipPure
|
|
196
|
+
};
|