@aussieljk/forkbook 0.0.1-2 → 0.0.1-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +35 -53
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +2 -2
- package/assets/browser/favicon-wrapper.svg +4 -4
- package/assets/browser/favicon.svg +1 -1
- package/assets/browser/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +8 -24
- package/assets/create/rendererAssets/common/Configure.mdx +100 -100
- package/assets/create/rendererAssets/common/button.css +7 -7
- package/assets/create/rendererAssets/common/header.css +6 -6
- package/assets/create/rendererAssets/common/page.css +12 -12
- package/assets/create/templates/react-native/index.expo.js +4 -4
- package/assets/create/templates/react-native/index.js +5 -5
- package/assets/server/base-preview-body.html +32 -32
- package/assets/server/base-preview-head.html +86 -86
- package/assets/server/template.ejs +31 -26
- package/dist/_browser-chunks/{Color-PCLE2J36.js → Color-KALNKPOV.js} +8 -8
- package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
- package/dist/_browser-chunks/WithTooltip-66AWY4VQ.js +199 -0
- package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-2WZWS7GJ.js} +5 -5
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-3QNZOMD7.js} +8 -3
- package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-3QPZOXB7.js} +6 -8
- package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-4BOJAE7P.js} +14 -10
- package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
- package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-6SL45YM3.js} +15 -18
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-AN2LJG5I.js} +1 -1
- package/dist/_browser-chunks/{chunk-P6PK47TQ.js → chunk-BLCZ3C5M.js} +48 -83
- package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
- package/dist/_browser-chunks/{chunk-JYVGARBG.js → chunk-CX37N6FG.js} +770 -720
- package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-DHTLVXAL.js} +38 -45
- package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-E6QKKKLO.js} +21 -6
- package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-EBSOKHFG.js} +10 -4
- package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-ECMVTOVD.js} +1 -1
- package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-ENHFQXYS.js} +9 -7
- package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-EW2M3URL.js} +91 -84
- package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-FCULT3AE.js} +3 -3
- package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
- package/dist/_browser-chunks/chunk-HZFHNYRC.js +53 -0
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-KQJ4T6JL.js} +31 -25
- package/dist/_browser-chunks/{chunk-RNTIV5CE.js → chunk-LYYXDWR2.js} +9 -9
- package/dist/_browser-chunks/{chunk-V5M7Q4HT.js → chunk-MJIDTL3X.js} +4 -14
- package/dist/_browser-chunks/{chunk-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
- package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
- package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/{chunk-YEKO6BHJ.js → chunk-ONTSNQON.js} +1 -1
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/{chunk-KQ7CRO2B.js → chunk-OWWV6YG7.js} +12 -12
- package/dist/_browser-chunks/chunk-PFYL47RM.js +45 -0
- package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-PQRPDA4U.js} +5 -5
- package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
- package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
- package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-TRXLBGLS.js} +344 -166
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/chunk-XSVERCGB.js +91 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
- package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-YJO5BK52.js} +7 -3
- package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-ZF37BMDS.js} +6 -2
- package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
- package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-I2G4WLJI.js → attached-runtime-YD6HKC4B.js} +33 -31
- package/dist/_node-chunks/builder-manager-UNJGYVTD.js +1176 -0
- package/dist/_node-chunks/chunk-25A7444H.js +47 -0
- package/dist/_node-chunks/{chunk-U5W53R2J.js → chunk-2CNN3CRI.js} +506 -494
- package/dist/_node-chunks/{chunk-VLOXOXXE.js → chunk-2GA4VQCS.js} +9 -9
- package/dist/_node-chunks/{chunk-YZFWBA5L.js → chunk-2VJHCGAK.js} +368 -321
- package/dist/_node-chunks/{chunk-FK7KGTV7.js → chunk-33I6AQU7.js} +7 -7
- package/dist/_node-chunks/{chunk-6YKBRP72.js → chunk-3CQI3JH5.js} +6 -6
- package/dist/_node-chunks/{chunk-IK4FGZLR.js → chunk-3ZOSFS7G.js} +6 -6
- package/dist/_node-chunks/{chunk-DUR55DJJ.js → chunk-4BE3LRIQ.js} +86 -67
- package/dist/_node-chunks/{chunk-Q7QNUM5H.js → chunk-5LFJQCYN.js} +6 -6
- package/dist/_node-chunks/{chunk-3Y6AAY5H.js → chunk-65X3MXFT.js} +8 -8
- package/dist/_node-chunks/chunk-6FWJWEAG.js +52 -0
- package/dist/_node-chunks/{chunk-UVINFLGY.js → chunk-6NLQCV6A.js} +7 -7
- package/dist/_node-chunks/{chunk-KISMCCP5.js → chunk-6OQKMJJA.js} +474 -479
- package/dist/_node-chunks/{chunk-XLP2ZKXV.js → chunk-6RYD6ENB.js} +7 -7
- package/dist/_node-chunks/{chunk-V2DY426G.js → chunk-75TTPKEA.js} +283 -306
- package/dist/_node-chunks/{chunk-3W7F2B7P.js → chunk-7CWDZLIZ.js} +6 -6
- package/dist/_node-chunks/{chunk-FPZB5OI7.js → chunk-7M3TOE4F.js} +6 -6
- package/dist/_node-chunks/{chunk-DC7DKR5K.js → chunk-AGLGQNTY.js} +6 -6
- package/dist/_node-chunks/{chunk-NIBT7XDZ.js → chunk-AOYLA323.js} +9 -6
- package/dist/_node-chunks/{chunk-RRN2V55B.js → chunk-AP4HJ3I3.js} +7 -7
- package/dist/_node-chunks/chunk-AVHJZUTH.js +2613 -0
- package/dist/_node-chunks/{chunk-H32DYT6P.js → chunk-B2EEX2SZ.js} +6 -6
- package/dist/_node-chunks/chunk-CGVVOUBC.js +18 -0
- package/dist/_node-chunks/{chunk-B5J7Q7J4.js → chunk-CJDYU653.js} +6 -6
- package/dist/_node-chunks/{chunk-XHL2LVBM.js → chunk-CPDP5SQS.js} +14 -16
- package/dist/_node-chunks/{chunk-LO56I6E2.js → chunk-DAYTIH6Z.js} +10 -10
- package/dist/_node-chunks/{chunk-FW2HQUBQ.js → chunk-DO3CPQAZ.js} +6 -6
- package/dist/_node-chunks/chunk-DQEUNKLX.js +347 -0
- package/dist/_node-chunks/{chunk-BS2WMZMR.js → chunk-EFCBUWOB.js} +7 -7
- package/dist/_node-chunks/{chunk-OWNFOGTA.js → chunk-EG2WLN5V.js} +7 -7
- package/dist/_node-chunks/{chunk-LCK4ZQKG.js → chunk-EKYNX5NX.js} +9 -9
- package/dist/_node-chunks/{chunk-TNJIXE37.js → chunk-F762PHMI.js} +6 -6
- package/dist/_node-chunks/{chunk-ET7PWEO7.js → chunk-FC3V4KZO.js} +14 -13
- package/dist/_node-chunks/chunk-FXW52X4U.js +281 -0
- package/dist/_node-chunks/{chunk-TD5PLLQG.js → chunk-GEJBTN76.js} +62 -7
- package/dist/_node-chunks/chunk-GFEH7IBP.js +620 -0
- package/dist/_node-chunks/{chunk-TWI4GVH7.js → chunk-GWT4HQZU.js} +6 -6
- package/dist/_node-chunks/{chunk-4FEANXWU.js → chunk-HHM5X5RQ.js} +140 -118
- package/dist/_node-chunks/{chunk-MA24JW6C.js → chunk-IBLUURAJ.js} +25 -8
- package/dist/_node-chunks/{chunk-2BUPBPFB.js → chunk-IENHXJVB.js} +7 -7
- package/dist/_node-chunks/{chunk-EWOX7HPJ.js → chunk-IIGBIVK3.js} +6 -6
- package/dist/_node-chunks/{chunk-XGIUVY52.js → chunk-J6FGP2VM.js} +7 -7
- package/dist/_node-chunks/chunk-JOX7OETB.js +534 -0
- package/dist/_node-chunks/{chunk-RXNJDRGO.js → chunk-JR7ZCQ77.js} +21 -25
- package/dist/_node-chunks/{chunk-OISX4AGQ.js → chunk-JXZONVHW.js} +37 -31
- package/dist/_node-chunks/{chunk-34EO2PUT.js → chunk-KAALBGRE.js} +6 -6
- package/dist/_node-chunks/{chunk-SLWQNBGO.js → chunk-L52VGA36.js} +34 -949
- package/dist/_node-chunks/chunk-LAJIVWUF.js +497 -0
- package/dist/_node-chunks/{chunk-JGGFYIG5.js → chunk-LCNF6BLP.js} +7 -7
- package/dist/_node-chunks/chunk-LGHTKFSF.js +405 -0
- package/dist/_node-chunks/{chunk-WCULS5TP.js → chunk-LNGSV5UI.js} +7 -7
- package/dist/_node-chunks/{chunk-HMP2G23X.js → chunk-MC4BFUVH.js} +6 -6
- package/dist/_node-chunks/{chunk-SWO5CDYU.js → chunk-MWKSSYPG.js} +8 -8
- package/dist/_node-chunks/{chunk-2DSIDINN.js → chunk-N25CZ3RC.js} +650 -9
- package/dist/_node-chunks/{chunk-WZJF2OUH.js → chunk-N4LNGTYL.js} +7 -7
- package/dist/_node-chunks/{chunk-XI6B6P47.js → chunk-N5WU4BEY.js} +6 -6
- package/dist/_node-chunks/{chunk-TINO74G5.js → chunk-NRXCMSAI.js} +6 -6
- package/dist/_node-chunks/{chunk-E6YESGLX.js → chunk-NZWK62R5.js} +542 -1049
- package/dist/_node-chunks/{chunk-DHJFTB4K.js → chunk-OBPVOYJA.js} +7 -7
- package/dist/_node-chunks/{chunk-6KEHV53S.js → chunk-OMMQME7G.js} +33 -41
- package/dist/_node-chunks/chunk-PJRPETSU.js +62 -0
- package/dist/_node-chunks/{chunk-7GUDZVRQ.js → chunk-QDVIQG3B.js} +6 -6
- package/dist/_node-chunks/{chunk-OUW6R7C3.js → chunk-QEYWG5C7.js} +6 -6
- package/dist/_node-chunks/{chunk-GRBLDJCR.js → chunk-QQNRWEHL.js} +132 -149
- package/dist/_node-chunks/{chunk-EHUNOMDD.js → chunk-RAIWLNFA.js} +29849 -51588
- package/dist/_node-chunks/{chunk-JZOO7GGC.js → chunk-S7RGKBGT.js} +6 -6
- package/dist/_node-chunks/{chunk-GEFQN7K3.js → chunk-SFXFL4TP.js} +8 -8
- package/dist/_node-chunks/{chunk-JDXXX6LB.js → chunk-SPAHK37C.js} +6 -6
- package/dist/_node-chunks/chunk-SUQ4OM7Y.js +49 -0
- package/dist/_node-chunks/chunk-U54Q3F7E.js +20 -0
- package/dist/_node-chunks/{chunk-RWFIFGO5.js → chunk-UZH2V3WY.js} +8 -8
- package/dist/_node-chunks/{chunk-SVTBJ7Q3.js → chunk-VIMGLCNZ.js} +6 -6
- package/dist/_node-chunks/{chunk-BSKFCWQD.js → chunk-VNZF62KE.js} +7 -7
- package/dist/_node-chunks/{chunk-CCOTJ4FC.js → chunk-VPFU5CEP.js} +10 -10
- package/dist/_node-chunks/{chunk-RZMQ7S3L.js → chunk-VYCVBW5Q.js} +8 -8
- package/dist/_node-chunks/{chunk-ICPBH3E7.js → chunk-WDANLGYN.js} +7 -7
- package/dist/_node-chunks/{chunk-UMUBKI6E.js → chunk-WMZJ2WK4.js} +96 -177
- package/dist/_node-chunks/{chunk-LXBD4UL4.js → chunk-WTPHQ2NG.js} +8 -8
- package/dist/_node-chunks/chunk-WYCITRIE.js +11 -0
- package/dist/_node-chunks/chunk-WYRBOMQF.js +137 -0
- package/dist/_node-chunks/{chunk-ZWBCQ4MJ.js → chunk-WZBMPROH.js} +9 -17
- package/dist/_node-chunks/{chunk-CXRU72ET.js → chunk-X2GGQZIN.js} +6 -6
- package/dist/_node-chunks/chunk-X6OGIC2G.js +28 -0
- package/dist/_node-chunks/{chunk-42UWAGPW.js → chunk-XF7H5GZM.js} +52 -22
- package/dist/_node-chunks/{chunk-WNZ2UMFM.js → chunk-XUZB4FIX.js} +15 -9
- package/dist/_node-chunks/{chunk-3SDUYDXH.js → chunk-XVSUIOZA.js} +7 -7
- package/dist/_node-chunks/{chunk-TFEWM4E3.js → chunk-Z665R6AF.js} +75 -75
- package/dist/_node-chunks/{chunk-H4PPVMP5.js → chunk-ZEYZWDOS.js} +6 -6
- package/dist/_node-chunks/{chunk-UBOGWBEA.js → chunk-ZHRCL7PG.js} +10 -10
- package/dist/_node-chunks/chunk-ZLC4JSBV.js +25 -0
- package/dist/_node-chunks/{chunk-F3ZFKBHY.js → chunk-ZN6YOIB2.js} +8 -8
- package/dist/_node-chunks/{chunk-YCMRA6RX.js → chunk-ZX32M4O7.js} +7 -7
- package/dist/_node-chunks/{chunk-NDWKJ4CL.js → chunk-ZZ5XMIGW.js} +97 -111
- package/dist/_node-chunks/dist-HBFOS25E.js +16 -0
- package/dist/_node-chunks/dist-Q2XNFC24.js +27 -0
- package/dist/_node-chunks/{local-runtime-NTKIN2QT.js → local-runtime-4ETW6QTI.js} +19 -20
- package/dist/_node-chunks/{mdx-plugin-MWISDWDQ.js → mdx-plugin-OOYTYMVU.js} +2263 -130
- package/dist/_node-chunks/{monorepo-LIRFMQXE.js → monorepo-3AWUYNFD.js} +12 -12
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-ORY3BAP5.js} +12 -12
- package/dist/_node-chunks/optimized-tests-DOKSUJAM.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-EKHIUAU2.js → pattern-copy-play-AY4DE7ME.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-L46G75CD.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-BUN3HUCO.js → rehype-external-links-FGVC633L.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-PLADX223.js → rehype-slug-2AZLMC5G.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-GBHW6KIQ.js → relaxed-limits-QI3YR6CU.js} +12 -12
- package/dist/_node-chunks/{run-NL66VTNR.js → run-QJJ4FOF3.js} +281 -19
- package/dist/_node-chunks/{run-KDTIZNSY.js → run-WFJZYNZN.js} +18 -18
- package/dist/_node-chunks/{setup-MGC7BQO6.js → setup-V5CRAJMV.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-JH2THZFG.js → vitest.config.4.template-LECBBF3L.js} +9 -9
- package/dist/actions/decorator.js +18 -22
- package/dist/actions/index.d.ts +4 -4
- package/dist/actions/index.js +3 -2
- package/dist/addon-a11y/index.d.ts +3 -3
- package/dist/addon-a11y/index.js +3 -2
- package/dist/addon-a11y/manager.js +41 -38
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.d.ts +8 -2
- package/dist/addon-a11y/preview.js +3 -2
- package/dist/addon-comments/manager.js +353 -0
- package/dist/addon-comments/preset.js +52 -0
- package/dist/addon-comments/preview.js +101 -0
- package/dist/addon-docs/blocks.d.ts +123 -85
- package/dist/addon-docs/blocks.js +159 -85
- package/dist/addon-docs/index.d.ts +21 -21
- package/dist/addon-docs/index.js +3 -3
- package/dist/addon-docs/manager.js +6 -6
- package/dist/addon-docs/preset.js +12 -12
- package/dist/addon-docs/preview.d.ts +3 -1
- package/dist/addon-docs/preview.js +1 -1
- package/dist/addon-links/index.d.ts +2 -1
- package/dist/addon-links/index.js +5 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +5 -2
- package/dist/addon-links/react/index.js +4 -1
- package/dist/addon-mcp/preset.js +176 -57
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +70 -70
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.d.ts +1 -1
- package/dist/addon-pseudo-states/index.js +1 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-pseudo-states/preview.js +1 -1
- package/dist/addon-themes/index.d.ts +7 -6
- package/dist/addon-themes/index.js +2 -2
- package/dist/addon-themes/manager.js +4 -4
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-themes/preview.js +2 -2
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +32 -23
- package/dist/addon-vitest/node/coverage-reporter.js +11 -11
- package/dist/addon-vitest/node/vitest.js +35 -35
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +22 -22
- package/dist/addon-vitest/vitest-plugin/global-setup.js +22 -22
- package/dist/addon-vitest/vitest-plugin/index.js +78 -68
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +3 -3
- package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
- package/dist/babel/index.d.ts +241 -995
- package/dist/babel/index.js +13 -19
- package/dist/backgrounds/index.d.ts +1 -1
- package/dist/bin/core.js +118 -95
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +17 -16
- package/dist/builder-next/index.d.ts +59 -0
- package/dist/builder-next/index.js +201 -0
- package/dist/builder-vite/index.d.ts +8 -3
- package/dist/builder-vite/index.js +80 -25
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +3 -2
- package/dist/channels/index.js +97 -24
- package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
- package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
- package/dist/chunk-BcYKnZln.d.ts +10 -0
- package/dist/{chunk-DEVFdzxR.d.ts → chunk-BsO65uOb.d.ts} +4 -4
- package/dist/{chunk-BCoJQE-f.d.ts → chunk-BtKww7r1.d.ts} +6 -4
- package/dist/{chunk-Bpi2tz-6.d.ts → chunk-Bubi-WAs.d.ts} +20 -17
- package/dist/chunk-CDMZhRke.d.ts +30 -0
- package/dist/chunk-CFhJCPSB.d.ts +48 -0
- package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
- package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.d.ts} +1 -1
- package/dist/{chunk-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-D2CQlXaR.d.ts} +13 -15
- package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
- package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
- package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DNCU78oW.d.ts} +160 -323
- package/dist/chunk-DVIvUVkS.d.ts +195 -0
- package/dist/{chunk-gCX81nOr.d.ts → chunk-DgzPaTw9.d.ts} +3 -3
- package/dist/{chunk-Kt1tW-D1.d.ts → chunk-Dm-iHJ-s.d.ts} +3 -3
- package/dist/{chunk-C-bavsOH.d.ts → chunk-Dw_4ad2Y.d.ts} +6 -6
- package/dist/{chunk-CwQKNaYL.d.ts → chunk-OksNJcvJ.d.ts} +2 -2
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/{chunk-C2p5r3Vt.d.ts → chunk-ge-rSPy0.d.ts} +818 -701
- package/dist/{chunk-BXLImeLy.d.ts → chunk-r-Vjut9o.d.ts} +52 -11
- package/dist/cli/index.d.ts +14 -867
- package/dist/cli/index.js +47 -4962
- package/dist/cli/skills/content/index.d.ts +2 -2
- package/dist/cli/skills/content/index.js +2 -2
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +3 -3
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.d.ts +20 -21
- package/dist/client-logger/index.js +5 -2
- package/dist/common/index.d.ts +27 -39
- package/dist/common/index.js +35 -42
- package/dist/components/index.d.ts +86 -272
- package/dist/components/index.js +2759 -8547
- package/dist/core-events/index.d.ts +6 -4
- package/dist/core-events/index.js +5 -1
- package/dist/core-server/index.d.ts +58 -17
- package/dist/core-server/index.js +1500 -382
- package/dist/core-server/presets/common-manager.js +836 -1334
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +100 -282
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/csf-utils.d.ts +1 -1
- package/dist/csf/index.d.ts +6 -6
- package/dist/csf/index.js +86 -154
- package/dist/csf-tools/index.d.ts +66 -54
- package/dist/csf-tools/index.js +18 -16
- package/dist/docs-tools/index.d.ts +332 -16
- package/dist/docs-tools/index.js +3 -3
- package/dist/highlight/index.d.ts +1 -1
- package/dist/instrumenter/index.d.ts +5 -5
- package/dist/instrumenter/index.js +31 -19
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-B4NRbNSS.js} +638 -1731
- package/dist/{preview/_chunks/runtime-CqHxptiK.js → manager/_manager-chunks/globals-runtime-BC43T1rL.js} +3413 -173
- package/dist/manager/_manager-chunks/{globals-runtime-sGpNlIJ1.js → globals-runtime-BDkYPr00.js} +715 -620
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-BnQ7i5wq.js} +232 -370
- package/dist/manager/_manager-chunks/{globals-runtime-Rp_zjGnh.js → globals-runtime-BnWjPJUH.js} +2 -2
- package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-Bv2PBsx6.js} +411 -379
- package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/globals-runtime-CS41oTca.js +1808 -0
- package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
- package/dist/manager/_manager-chunks/{globals-runtime-qKvCZHFY.js → globals-runtime-D6tkG2NO.js} +1033 -621
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-D9zzVzSP.js} +11 -11
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DCmvKMN5.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DpNYC-qi.js → globals-runtime-DafcXCKU.js} +1013 -778
- package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
- package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
- package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
- package/dist/manager/_manager-chunks/globals-runtime-oRjPg2jY.js +8935 -0
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/runtime-BhfRBP4G.js +294 -0
- package/dist/manager/_manager-chunks/runtime-BuPcYKCO.js +737 -0
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-CGaGp83p.js} +57 -76
- package/dist/manager/_manager-chunks/{runtime-BhkT2CXl.js → runtime-CXROgt6G.js} +220 -406
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-Cn5PJT3-.js} +741 -698
- package/dist/manager/_manager-chunks/{runtime-cp5pazY2.js → runtime-DJlTd1qE.js} +1717 -1536
- package/dist/manager/_manager-chunks/{runtime-D0UOWx0U.js → runtime-DTUm5K9J.js} +232 -158
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-Dc6lf19c.js} +8 -534
- package/dist/manager/_manager-chunks/runtime-DmpQacrn.js +553 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/runtime-mjv_40eH.js +201 -0
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/globals.d.ts +12 -12
- package/dist/manager/globals.js +12 -12
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +537 -527
- package/dist/manager-errors.d.ts +1 -1
- package/dist/manager-errors.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mocking-utils/index.d.ts +7 -5
- package/dist/mocking-utils/index.js +34 -34
- package/dist/mocking-utils/mocker-runtime.js +2 -2
- package/dist/next/index.d.ts +231 -0
- package/dist/next/index.js +398 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +3 -1
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +4 -1
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +9 -1
- package/dist/nextjs-vite/export-mocks/router/index.js +13 -7
- package/dist/nextjs-vite/index.d.ts +4 -4
- package/dist/nextjs-vite/index.js +10 -5
- package/dist/nextjs-vite/node/index.d.ts +2 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +117 -15
- package/dist/nextjs-vite/preview.d.ts +2 -1
- package/dist/nextjs-vite/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
- package/dist/nextjs-vite/vite-plugin/index.js +9 -9
- package/dist/nextjs-vite-plugin/index.d.ts +2 -3
- package/dist/nextjs-vite-plugin/index.js +24 -49
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
- package/dist/node-logger/index.d.ts +83 -90
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +15 -14
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/{manager/_manager-chunks/globals-runtime-8HkdnU2F.js → preview/_chunks/runtime-BYRCSYBN.js} +4440 -179
- package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-BiYuZt-X.js} +392 -173
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-Bvh_rfnQ.js} +29 -64
- package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-C88AzFBv.js} +772 -418
- package/dist/preview/_chunks/{runtime-DrTjJkPY.js → runtime-Cpzxe5eK.js} +447 -151
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-D2MPrqbU.js} +2 -2
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-DS0s7U3c.js} +482 -334
- package/dist/preview/_chunks/{runtime-CxZK_Ln3.js → runtime-MYVHRAoo.js} +3 -3
- package/dist/preview/globals.d.ts +10 -10
- package/dist/preview/globals.js +10 -10
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +12 -10
- package/dist/preview-errors.d.ts +1 -1
- package/dist/preview-errors.js +2 -2
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview-argtypes.js +1 -1
- package/dist/react/entry-preview-docs.js +1 -1
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.d.ts +9 -11
- package/dist/react/index.js +8 -6
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.d.ts +1 -1
- package/dist/react/preview.js +5 -4
- package/dist/react-native/bin/get-stories.js +12 -12
- package/dist/react-native/index.d.ts +48 -47
- package/dist/react-native/index.js +64 -249
- package/dist/react-native/metro/node.d.ts +3 -3
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +18 -18
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +27 -26
- package/dist/react-native/preview.js +4 -1
- package/dist/react-native/scripts/generate.d.ts +1 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-theming/index.d.ts +2 -58
- package/dist/react-native-theming/index.js +63 -2338
- package/dist/react-native-ui/index.d.ts +14 -14
- package/dist/react-native-ui/index.js +8 -15
- package/dist/react-native-ui-common/index.d.ts +32 -12
- package/dist/react-native-ui-common/index.js +26 -31
- package/dist/react-vite/index.d.ts +2 -2
- package/dist/react-vite/node/index.d.ts +3 -3
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.d.ts +3 -1
- package/dist/react-vite/preset.js +16 -9
- package/dist/router/index.d.ts +80 -3
- package/dist/router/index.js +66 -12
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +3 -3
- package/dist/shared/open-service/index.js +2 -2
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +28 -28
- package/dist/telemetry/index.d.ts +38 -274
- package/dist/telemetry/index.js +11 -68
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +765 -511
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.d.ts +6 -6
- package/dist/theming/index.js +41 -16
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +5 -5
- package/dist/viewport/index.d.ts +1 -1
- package/package.json +69 -69
- package/skills/setup/SKILL.md +14 -0
- package/skills/stories/SKILL.md +21 -0
- package/skills/write-story/SKILL.md +14 -0
- package/template/nextjs-vite/cli/js/Button.jsx +2 -2
- package/template/nextjs-vite/cli/js/Button.stories.js +6 -6
- package/template/nextjs-vite/cli/js/Configure.mdx +100 -100
- package/template/nextjs-vite/cli/js/Header.jsx +1 -1
- package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
- package/template/nextjs-vite/cli/js/Page.jsx +3 -3
- package/template/nextjs-vite/cli/js/Page.stories.js +2 -2
- package/template/nextjs-vite/cli/ts/Button.stories.ts +6 -6
- package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
- package/template/nextjs-vite/cli/ts/Configure.mdx +84 -84
- package/template/nextjs-vite/cli/ts/Header.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
- package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.tsx +3 -3
- package/template/react/cli/js/Button.jsx +2 -2
- package/template/react/cli/js/Button.stories.js +6 -6
- package/template/react/cli/js/Header.jsx +1 -1
- package/template/react/cli/js/Header.stories.js +2 -2
- package/template/react/cli/js/Page.jsx +3 -3
- package/template/react/cli/js/Page.stories.js +2 -2
- package/template/react/cli/ts/Button.stories.ts +6 -6
- package/template/react/cli/ts/Button.tsx +2 -2
- package/template/react/cli/ts/Header.stories.ts +2 -2
- package/template/react/cli/ts/Header.tsx +1 -1
- package/template/react/cli/ts/Page.stories.ts +2 -2
- package/template/react/cli/ts/Page.tsx +3 -3
- package/template/react-vite/cli/js/Button.jsx +2 -2
- package/template/react-vite/cli/js/Button.stories.js +6 -6
- package/template/react-vite/cli/js/Header.jsx +1 -1
- package/template/react-vite/cli/js/Header.stories.js +2 -2
- package/template/react-vite/cli/js/Page.jsx +3 -3
- package/template/react-vite/cli/js/Page.stories.js +2 -2
- package/template/react-vite/cli/ts/Button.stories.ts +6 -6
- package/template/react-vite/cli/ts/Button.tsx +2 -2
- package/template/react-vite/cli/ts/Header.stories.ts +2 -2
- package/template/react-vite/cli/ts/Header.tsx +1 -1
- package/template/react-vite/cli/ts/Page.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.tsx +3 -3
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +0 -108
- package/dist/_node-chunks/builder-manager-VVHYQXCH.js +0 -1661
- package/dist/_node-chunks/chunk-2RU7BKEW.js +0 -23
- package/dist/_node-chunks/chunk-3BKIBF5S.js +0 -3008
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +0 -662
- package/dist/_node-chunks/chunk-5DQFEZEA.js +0 -40
- package/dist/_node-chunks/chunk-6LMWA44H.js +0 -3837
- package/dist/_node-chunks/chunk-BXVYT7SB.js +0 -36
- package/dist/_node-chunks/chunk-CQKMLL5J.js +0 -33
- package/dist/_node-chunks/chunk-FY6UXW6G.js +0 -11
- package/dist/_node-chunks/chunk-IDEL2J23.js +0 -23
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +0 -29
- package/dist/_node-chunks/chunk-MK2KYAI6.js +0 -5414
- package/dist/_node-chunks/chunk-NPO45IMH.js +0 -33
- package/dist/_node-chunks/chunk-QEQLR22M.js +0 -1877
- package/dist/_node-chunks/chunk-SIEXZVCR.js +0 -51
- package/dist/_node-chunks/chunk-TEQGGSP7.js +0 -33
- package/dist/_node-chunks/chunk-TFCEV2XX.js +0 -155
- package/dist/_node-chunks/chunk-W4OMYLSP.js +0 -1297
- package/dist/_node-chunks/chunk-WAXVSN3O.js +0 -18
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +0 -4731
- package/dist/_node-chunks/dist-VTSTZKUB.js +0 -16
- package/dist/_node-chunks/globby-OEMHPBFY.js +0 -2884
- package/dist/_node-chunks/jiti-NFX6UU74.js +0 -3848
- package/dist/_node-chunks/lib-MDVARD7W.js +0 -366
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +0 -22
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +0 -20
- package/dist/_node-chunks/session-id-KIIVOQLR.js +0 -23
- package/dist/chunk-BTVrWliM.d.ts +0 -115
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/chunk-BxWufQms.d.ts +0 -142
- package/dist/chunk-DaVb55-_.d.ts +0 -124
- 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/globals-runtime-ZHrQFa3-.js +0 -10463
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +0 -22
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +0 -77
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +0 -63
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +0 -387
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { n as __esmMin } from "./runtime-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { n as __esmMin } from "./runtime-BdGkqNEt.js";
|
|
2
|
+
import { $ as Separator, Co as useState, Gt as useStorybookApi, Ht as useGlobals, Nt as init_manager_api, Q as Select, So as useRef, Vt as useGlobalTypes, bo as useMemo, go as useEffect, ho as useDebugValue, mt as init_components, po as useCallback, ro as _forkbook_global_react_default, uo as init__forkbook_global_react, wo as useSyncExternalStore } from "./runtime-BuPcYKCO.js";
|
|
3
|
+
import { f as Icons, n as init_dev_server, p as init_icon, t as StatusTypeIdMismatchError$1 } from "./runtime-DmpQacrn.js";
|
|
4
|
+
import { a as init_constants$1 } from "./runtime-BhfRBP4G.js";
|
|
5
|
+
import { a as init_esm, i as dedent } from "./runtime-Cn5PJT3-.js";
|
|
6
|
+
import { l as init_isEqual, u as isEqual } from "./runtime-Dc6lf19c.js";
|
|
7
|
+
import { c as UniversalStoreFollowerTimeoutError, l as init_manager_errors, s as StatusTypeIdMismatchError$2 } from "./runtime-mjv_40eH.js";
|
|
8
|
+
//#region src/shared/global.ts
|
|
9
|
+
var global;
|
|
10
|
+
function init_global() {
|
|
11
|
+
return (init_global = __esmMin((() => {
|
|
12
|
+
global = globalThis;
|
|
13
|
+
})))();
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
8
16
|
//#region src/toolbar/utils/normalize-toolbar-arg-type.ts
|
|
9
17
|
var normalizeArgType;
|
|
10
18
|
function init_normalize_toolbar_arg_type() {
|
|
@@ -85,15 +93,15 @@ var id, ToolbarMenuSelect_module_default;
|
|
|
85
93
|
function init_ToolbarMenuSelect_module() {
|
|
86
94
|
return (init_ToolbarMenuSelect_module = __esmMin((() => {
|
|
87
95
|
id = "core/src/toolbar/components/ToolbarMenuSelect.module.css";
|
|
88
|
-
if (typeof document !== "undefined" && !document.querySelector(`style[data-
|
|
96
|
+
if (typeof document !== "undefined" && !document.querySelector(`style[data-fb-css="${id}"]`)) {
|
|
89
97
|
const style = document.createElement("style");
|
|
90
|
-
style.setAttribute("data-
|
|
91
|
-
style.textContent = ".
|
|
98
|
+
style.setAttribute("data-fb-css", id);
|
|
99
|
+
style.textContent = ".fb-FCSgfW-item{align-items:center;gap:8px;width:100%;display:flex}.fb-FCSgfW-itemMiddle{flex:1}";
|
|
92
100
|
document.head.appendChild(style);
|
|
93
101
|
}
|
|
94
102
|
ToolbarMenuSelect_module_default = {
|
|
95
|
-
"
|
|
96
|
-
"
|
|
103
|
+
"itemMiddle": "fb-FCSgfW-itemMiddle",
|
|
104
|
+
"item": "fb-FCSgfW-item"
|
|
97
105
|
};
|
|
98
106
|
})))();
|
|
99
107
|
}
|
|
@@ -102,7 +110,7 @@ function init_ToolbarMenuSelect_module() {
|
|
|
102
110
|
var ToolbarMenuSelect;
|
|
103
111
|
function init_ToolbarMenuSelect() {
|
|
104
112
|
return (init_ToolbarMenuSelect = __esmMin((() => {
|
|
105
|
-
|
|
113
|
+
init__forkbook_global_react();
|
|
106
114
|
init_components();
|
|
107
115
|
init_manager_api();
|
|
108
116
|
init_icon();
|
|
@@ -127,16 +135,16 @@ function init_ToolbarMenuSelect() {
|
|
|
127
135
|
if (!title && !icon) console.warn(`Toolbar '${id}' has no title or icon`);
|
|
128
136
|
const resetItem = items.find((item) => item.type === "reset");
|
|
129
137
|
const resetLabel = resetItem?.title;
|
|
130
|
-
const options =
|
|
138
|
+
const options = _forkbook_global_react_default.useMemo(() => items.filter((item) => item.type !== "reset").map((item) => {
|
|
131
139
|
const itemTitle = item.title ?? item.value ?? "Untitled";
|
|
132
|
-
const iconComponent = !item.hideIcon && item.icon ? /* @__PURE__ */
|
|
140
|
+
const iconComponent = !item.hideIcon && item.icon ? /* @__PURE__ */ _forkbook_global_react_default.createElement(Icons, {
|
|
133
141
|
icon: item.icon,
|
|
134
142
|
__suppressDeprecationWarning: true
|
|
135
143
|
}) : void 0;
|
|
136
144
|
if (item.right) return {
|
|
137
145
|
title: itemTitle,
|
|
138
146
|
value: item.value,
|
|
139
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ _forkbook_global_react_default.createElement("div", { className: ToolbarMenuSelect_module_default.item }, iconComponent, /* @__PURE__ */ _forkbook_global_react_default.createElement("div", { className: ToolbarMenuSelect_module_default.itemMiddle }, item.title ?? item.value), item.right)
|
|
140
148
|
};
|
|
141
149
|
else return {
|
|
142
150
|
title: itemTitle,
|
|
@@ -144,7 +152,7 @@ function init_ToolbarMenuSelect() {
|
|
|
144
152
|
icon: iconComponent
|
|
145
153
|
};
|
|
146
154
|
}), [items]);
|
|
147
|
-
|
|
155
|
+
_forkbook_global_react_default.useEffect(() => {
|
|
148
156
|
if (shortcuts) {
|
|
149
157
|
const length = options.length;
|
|
150
158
|
registerShortcuts(api, id, {
|
|
@@ -181,7 +189,7 @@ function init_ToolbarMenuSelect() {
|
|
|
181
189
|
updateGlobals
|
|
182
190
|
]);
|
|
183
191
|
const ariaLabel = description || title || name || id;
|
|
184
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ _forkbook_global_react_default.createElement(Select, {
|
|
185
193
|
defaultOptions: [currentValue],
|
|
186
194
|
options,
|
|
187
195
|
disabled: isOverridden,
|
|
@@ -190,7 +198,7 @@ function init_ToolbarMenuSelect() {
|
|
|
190
198
|
resetLabel,
|
|
191
199
|
onReset: resetItem ? () => updateGlobals({ [id]: resetItem?.value }) : void 0,
|
|
192
200
|
onSelect: (selected) => updateGlobals({ [id]: selected }),
|
|
193
|
-
icon: icon && /* @__PURE__ */
|
|
201
|
+
icon: icon && /* @__PURE__ */ _forkbook_global_react_default.createElement(Icons, {
|
|
194
202
|
icon,
|
|
195
203
|
__suppressDeprecationWarning: true
|
|
196
204
|
}),
|
|
@@ -204,7 +212,7 @@ function init_ToolbarMenuSelect() {
|
|
|
204
212
|
var ToolbarManager;
|
|
205
213
|
function init_ToolbarManager() {
|
|
206
214
|
return (init_ToolbarManager = __esmMin((() => {
|
|
207
|
-
|
|
215
|
+
init__forkbook_global_react();
|
|
208
216
|
init_components();
|
|
209
217
|
init_manager_api();
|
|
210
218
|
init_normalize_toolbar_arg_type();
|
|
@@ -212,9 +220,9 @@ function init_ToolbarManager() {
|
|
|
212
220
|
ToolbarManager = () => {
|
|
213
221
|
const globalTypes = useGlobalTypes();
|
|
214
222
|
if (!Object.keys(globalTypes).some((id) => !!globalTypes[id].toolbar)) return null;
|
|
215
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ _forkbook_global_react_default.createElement(_forkbook_global_react_default.Fragment, null, /* @__PURE__ */ _forkbook_global_react_default.createElement(Separator, null), Object.keys(globalTypes).map((id) => {
|
|
216
224
|
const normalizedArgType = normalizeArgType(id, globalTypes[id]);
|
|
217
|
-
return normalizedArgType && /* @__PURE__ */
|
|
225
|
+
return normalizedArgType && /* @__PURE__ */ _forkbook_global_react_default.createElement(ToolbarMenuSelect, {
|
|
218
226
|
key: id,
|
|
219
227
|
id,
|
|
220
228
|
...normalizedArgType
|
|
@@ -224,6 +232,106 @@ function init_ToolbarManager() {
|
|
|
224
232
|
})))();
|
|
225
233
|
}
|
|
226
234
|
//#endregion
|
|
235
|
+
//#region src/shared/constants/iframe-resize.ts
|
|
236
|
+
var IFRAME_RESIZE_REQUEST_CONTEXT, isPositiveFinite, parseViewport, parseIframeResizeMessage, hasFixedViewportDimensions, iframeResizeViewportsEqual, iframeResizeDimensionsEqual;
|
|
237
|
+
function init_iframe_resize() {
|
|
238
|
+
return (init_iframe_resize = __esmMin((() => {
|
|
239
|
+
init_constants$1();
|
|
240
|
+
IFRAME_RESIZE_REQUEST_CONTEXT = "iframe.resize.request";
|
|
241
|
+
isPositiveFinite = (value) => typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
242
|
+
parseViewport = (value) => {
|
|
243
|
+
if (!value || typeof value !== "object") return;
|
|
244
|
+
const viewport = value;
|
|
245
|
+
if (typeof viewport.name !== "string" || typeof viewport.value !== "string") return;
|
|
246
|
+
const parsed = {
|
|
247
|
+
name: viewport.name,
|
|
248
|
+
value: viewport.value
|
|
249
|
+
};
|
|
250
|
+
if (viewport.width !== void 0) {
|
|
251
|
+
if (!isPositiveFinite(viewport.width)) return;
|
|
252
|
+
parsed.width = viewport.width;
|
|
253
|
+
}
|
|
254
|
+
if (viewport.height !== void 0) {
|
|
255
|
+
if (!isPositiveFinite(viewport.height)) return;
|
|
256
|
+
parsed.height = viewport.height;
|
|
257
|
+
}
|
|
258
|
+
return parsed;
|
|
259
|
+
};
|
|
260
|
+
parseIframeResizeMessage = (data) => {
|
|
261
|
+
try {
|
|
262
|
+
const parsed = typeof data === "string" ? JSON.parse(data) : data;
|
|
263
|
+
if (parsed?.context !== "iframe.resize") return null;
|
|
264
|
+
if (!isPositiveFinite(parsed.width) || !isPositiveFinite(parsed.height)) return null;
|
|
265
|
+
const viewport = parseViewport(parsed.viewport);
|
|
266
|
+
if (parsed.viewport !== void 0 && viewport === void 0) return null;
|
|
267
|
+
return {
|
|
268
|
+
width: parsed.width,
|
|
269
|
+
height: parsed.height,
|
|
270
|
+
...viewport ? { viewport } : {}
|
|
271
|
+
};
|
|
272
|
+
} catch {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
hasFixedViewportDimensions = (viewport) => !!viewport && viewport.value !== "100pct-100pct" && typeof viewport.width === "number" && viewport.width > 0 && typeof viewport.height === "number" && viewport.height > 0;
|
|
277
|
+
iframeResizeViewportsEqual = (left, right) => {
|
|
278
|
+
if (left === right) return true;
|
|
279
|
+
if (!left || !right) return !left && !right;
|
|
280
|
+
return left.name === right.name && left.value === right.value && left.width === right.width && left.height === right.height;
|
|
281
|
+
};
|
|
282
|
+
iframeResizeDimensionsEqual = (left, right) => {
|
|
283
|
+
if (!left) return false;
|
|
284
|
+
if (left.width !== right.width || left.height !== right.height) return false;
|
|
285
|
+
return iframeResizeViewportsEqual(left.viewport, right.viewport);
|
|
286
|
+
};
|
|
287
|
+
})))();
|
|
288
|
+
}
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/shared/story-grid.ts
|
|
291
|
+
var isGridEntry, groupEntriesByComponent;
|
|
292
|
+
function init_story_grid() {
|
|
293
|
+
return (init_story_grid = __esmMin((() => {
|
|
294
|
+
isGridEntry = (entry, hiddenImportPath) => entry.importPath !== hiddenImportPath && (entry.type === "docs" || entry.type === "story" && entry.subtype !== "test");
|
|
295
|
+
groupEntriesByComponent = (entries, { hiddenImportPath } = {}) => {
|
|
296
|
+
const byTitle = /* @__PURE__ */ new Map();
|
|
297
|
+
for (const entry of entries) {
|
|
298
|
+
if (!isGridEntry(entry, hiddenImportPath)) continue;
|
|
299
|
+
let component = byTitle.get(entry.title);
|
|
300
|
+
if (!component) {
|
|
301
|
+
component = {
|
|
302
|
+
title: entry.title,
|
|
303
|
+
name: entry.title.split("/").pop() ?? entry.title,
|
|
304
|
+
entryId: entry.id,
|
|
305
|
+
viewMode: entry.type,
|
|
306
|
+
storyIds: []
|
|
307
|
+
};
|
|
308
|
+
byTitle.set(entry.title, component);
|
|
309
|
+
}
|
|
310
|
+
if (entry.type === "docs" && component.viewMode !== "docs") {
|
|
311
|
+
component.entryId = entry.id;
|
|
312
|
+
component.viewMode = "docs";
|
|
313
|
+
}
|
|
314
|
+
if (entry.type === "story") {
|
|
315
|
+
component.storyIds.push(entry.id);
|
|
316
|
+
if (!component.firstStoryId) {
|
|
317
|
+
component.firstStoryId = entry.id;
|
|
318
|
+
component.thumbnail = entry.thumbnail ?? component.thumbnail;
|
|
319
|
+
}
|
|
320
|
+
} else component.thumbnail ??= entry.thumbnail;
|
|
321
|
+
}
|
|
322
|
+
return [...byTitle.values()];
|
|
323
|
+
};
|
|
324
|
+
})))();
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region src/shared/thumbnails.ts
|
|
328
|
+
var isThumbnailUrl;
|
|
329
|
+
function init_thumbnails() {
|
|
330
|
+
return (init_thumbnails = __esmMin((() => {
|
|
331
|
+
isThumbnailUrl = (value) => /^([a-z][a-z\d+.-]*:|\/\/|\/)/i.test(value);
|
|
332
|
+
})))();
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
227
335
|
//#region src/shared/review/routes.ts
|
|
228
336
|
var REVIEW_COLLECTION_QUERY_PARAM, isReviewSummaryPath, isReviewCollectionStoryRoute;
|
|
229
337
|
function init_routes() {
|
|
@@ -281,7 +389,9 @@ function init_announce() {
|
|
|
281
389
|
}
|
|
282
390
|
//#endregion
|
|
283
391
|
//#region src/shared/useCopyButton.ts
|
|
284
|
-
function useCopyButton({ children
|
|
392
|
+
function useCopyButton({ children, childrenOnCopy, content, onCopy, ariaLabel = false, ariaLabelOnCopy = false, duration = 3e3 }) {
|
|
393
|
+
const label = children === void 0 ? "Copy" : children;
|
|
394
|
+
const labelOnCopy = childrenOnCopy === void 0 ? "Copied!" : childrenOnCopy;
|
|
285
395
|
const [copied, setCopied] = useState(false);
|
|
286
396
|
const timerRef = useRef(null);
|
|
287
397
|
useEffect(() => () => {
|
|
@@ -307,7 +417,7 @@ function useCopyButton({ children = "Copy", childrenOnCopy = "Copied!", content,
|
|
|
307
417
|
duration
|
|
308
418
|
]);
|
|
309
419
|
return {
|
|
310
|
-
children: copied ?
|
|
420
|
+
children: copied ? labelOnCopy : label,
|
|
311
421
|
buttonProps: useMemo(() => ({
|
|
312
422
|
onClick: handleClick,
|
|
313
423
|
ariaLabel: copied ? ariaLabelOnCopy : ariaLabel
|
|
@@ -321,363 +431,71 @@ function useCopyButton({ children = "Copy", childrenOnCopy = "Copied!", content,
|
|
|
321
431
|
}
|
|
322
432
|
function init_useCopyButton() {
|
|
323
433
|
return (init_useCopyButton = __esmMin((() => {
|
|
324
|
-
|
|
434
|
+
init__forkbook_global_react();
|
|
325
435
|
init_announce();
|
|
326
436
|
})))();
|
|
327
437
|
}
|
|
328
438
|
//#endregion
|
|
329
|
-
//#region src/shared/
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
return (init_iframe_resize = __esmMin((() => {
|
|
352
|
-
init_constants$1();
|
|
353
|
-
IFRAME_RESIZE_REQUEST_CONTEXT = "iframe.resize.request";
|
|
354
|
-
isPositiveFinite = (value) => typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
355
|
-
parseViewport = (value) => {
|
|
356
|
-
if (!value || typeof value !== "object") return;
|
|
357
|
-
const viewport = value;
|
|
358
|
-
if (typeof viewport.name !== "string" || typeof viewport.value !== "string") return;
|
|
359
|
-
const parsed = {
|
|
360
|
-
name: viewport.name,
|
|
361
|
-
value: viewport.value
|
|
362
|
-
};
|
|
363
|
-
if (viewport.width !== void 0) {
|
|
364
|
-
if (!isPositiveFinite(viewport.width)) return;
|
|
365
|
-
parsed.width = viewport.width;
|
|
439
|
+
//#region src/shared/use-sync-external-store/with-selector.ts
|
|
440
|
+
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
441
|
+
const instRef = useRef(null);
|
|
442
|
+
if (instRef.current === null) instRef.current = {
|
|
443
|
+
hasValue: false,
|
|
444
|
+
value: null
|
|
445
|
+
};
|
|
446
|
+
const inst = instRef.current;
|
|
447
|
+
const [getSelection, getServerSelection] = useMemo(() => {
|
|
448
|
+
let hasMemo = false;
|
|
449
|
+
let memoizedSnapshot;
|
|
450
|
+
let memoizedSelection;
|
|
451
|
+
const memoizedSelector = (nextSnapshot) => {
|
|
452
|
+
if (!hasMemo) {
|
|
453
|
+
hasMemo = true;
|
|
454
|
+
memoizedSnapshot = nextSnapshot;
|
|
455
|
+
const nextSelection = selector(nextSnapshot);
|
|
456
|
+
if (isEqual !== void 0 && inst.hasValue) {
|
|
457
|
+
const currentSelection = inst.value;
|
|
458
|
+
if (isEqual(currentSelection, nextSelection)) return memoizedSelection = currentSelection;
|
|
459
|
+
}
|
|
460
|
+
return memoizedSelection = nextSelection;
|
|
366
461
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
462
|
+
const currentSelection = memoizedSelection;
|
|
463
|
+
if (Object.is(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
464
|
+
const nextSelection = selector(nextSnapshot);
|
|
465
|
+
if (isEqual !== void 0 && isEqual(currentSelection, nextSelection)) {
|
|
466
|
+
memoizedSnapshot = nextSnapshot;
|
|
467
|
+
return currentSelection;
|
|
370
468
|
}
|
|
371
|
-
|
|
469
|
+
memoizedSnapshot = nextSnapshot;
|
|
470
|
+
return memoizedSelection = nextSelection;
|
|
372
471
|
};
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
hasFixedViewportDimensions = (viewport) => !!viewport && viewport.value !== "100pct-100pct" && typeof viewport.width === "number" && viewport.width > 0 && typeof viewport.height === "number" && viewport.height > 0;
|
|
390
|
-
iframeResizeViewportsEqual = (left, right) => {
|
|
391
|
-
if (left === right) return true;
|
|
392
|
-
if (!left || !right) return !left && !right;
|
|
393
|
-
return left.name === right.name && left.value === right.value && left.width === right.width && left.height === right.height;
|
|
394
|
-
};
|
|
395
|
-
iframeResizeDimensionsEqual = (left, right) => {
|
|
396
|
-
if (!left) return false;
|
|
397
|
-
if (left.width !== right.width || left.height !== right.height) return false;
|
|
398
|
-
return iframeResizeViewportsEqual(left.viewport, right.viewport);
|
|
399
|
-
};
|
|
400
|
-
})))();
|
|
472
|
+
return [() => memoizedSelector(getSnapshot()), getServerSnapshot == null ? void 0 : () => memoizedSelector(getServerSnapshot())];
|
|
473
|
+
}, [
|
|
474
|
+
getSnapshot,
|
|
475
|
+
getServerSnapshot,
|
|
476
|
+
selector,
|
|
477
|
+
isEqual
|
|
478
|
+
]);
|
|
479
|
+
const value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
480
|
+
useEffect(() => {
|
|
481
|
+
inst.hasValue = true;
|
|
482
|
+
inst.value = value;
|
|
483
|
+
}, [value]);
|
|
484
|
+
useDebugValue(value);
|
|
485
|
+
return value;
|
|
401
486
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
function init_defaults() {
|
|
406
|
-
return (init_defaults = __esmMin((() => {
|
|
407
|
-
MINIMAL_VIEWPORTS = {
|
|
408
|
-
mobile1: {
|
|
409
|
-
name: "Small mobile",
|
|
410
|
-
styles: {
|
|
411
|
-
height: "568px",
|
|
412
|
-
width: "320px"
|
|
413
|
-
},
|
|
414
|
-
type: "mobile"
|
|
415
|
-
},
|
|
416
|
-
mobile2: {
|
|
417
|
-
name: "Large mobile",
|
|
418
|
-
styles: {
|
|
419
|
-
height: "896px",
|
|
420
|
-
width: "414px"
|
|
421
|
-
},
|
|
422
|
-
type: "mobile"
|
|
423
|
-
},
|
|
424
|
-
tablet: {
|
|
425
|
-
name: "Tablet",
|
|
426
|
-
styles: {
|
|
427
|
-
height: "1112px",
|
|
428
|
-
width: "834px"
|
|
429
|
-
},
|
|
430
|
-
type: "tablet"
|
|
431
|
-
},
|
|
432
|
-
desktop: {
|
|
433
|
-
name: "Desktop",
|
|
434
|
-
styles: {
|
|
435
|
-
height: "1024px",
|
|
436
|
-
width: "1280px"
|
|
437
|
-
},
|
|
438
|
-
type: "desktop"
|
|
439
|
-
}
|
|
440
|
-
};
|
|
487
|
+
function init_with_selector() {
|
|
488
|
+
return (init_with_selector = __esmMin((() => {
|
|
489
|
+
init__forkbook_global_react();
|
|
441
490
|
})))();
|
|
442
491
|
}
|
|
443
492
|
//#endregion
|
|
444
|
-
//#region src/
|
|
445
|
-
var
|
|
446
|
-
function
|
|
447
|
-
return (
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
normalizeGlobal$1 = (value, defaultIsRotated) => typeof value === "string" ? {
|
|
451
|
-
value,
|
|
452
|
-
isRotated: defaultIsRotated
|
|
453
|
-
} : {
|
|
454
|
-
value: value?.value,
|
|
455
|
-
isRotated: value?.isRotated ?? defaultIsRotated
|
|
456
|
-
};
|
|
457
|
-
resolveViewport = ({ globals, storyGlobals, userGlobals, options, lastSelectedOption, disable = false, viewMode }) => {
|
|
458
|
-
if (viewMode !== "story") return {
|
|
459
|
-
name: "Responsive",
|
|
460
|
-
type: "desktop",
|
|
461
|
-
width: "100%",
|
|
462
|
-
height: "100%",
|
|
463
|
-
value: RESPONSIVE_VIEWPORT_VALUE,
|
|
464
|
-
option: void 0,
|
|
465
|
-
isCustom: false,
|
|
466
|
-
isDefault: true,
|
|
467
|
-
isLocked: true,
|
|
468
|
-
isRotated: false
|
|
469
|
-
};
|
|
470
|
-
const global = normalizeGlobal$1(globals?.[PARAM_KEY]);
|
|
471
|
-
const userGlobal = normalizeGlobal$1(userGlobals?.[PARAM_KEY]);
|
|
472
|
-
const storyGlobal = normalizeGlobal$1(storyGlobals?.[PARAM_KEY]);
|
|
473
|
-
const storyHasViewport = PARAM_KEY in storyGlobals;
|
|
474
|
-
const primaryGlobal = storyHasViewport ? storyGlobal : userGlobal;
|
|
475
|
-
const secondaryGlobal = storyHasViewport ? userGlobal : storyGlobal;
|
|
476
|
-
const value = primaryGlobal?.value ?? secondaryGlobal?.value ?? global?.value;
|
|
477
|
-
const isRotated = primaryGlobal?.isRotated ?? secondaryGlobal?.isRotated ?? global?.isRotated ?? false;
|
|
478
|
-
const keys = Object.keys(options);
|
|
479
|
-
const isLocked = disable || "viewport" in storyGlobals || !keys.length;
|
|
480
|
-
const [match, vx, ux, vy, uy] = value?.match(URL_VALUE_PATTERN) || [];
|
|
481
|
-
if (match) {
|
|
482
|
-
const x = ux && ux !== "px" ? vx : Math.max(Number(vx), 40);
|
|
483
|
-
const y = uy && uy !== "px" ? vy : Math.max(Number(vy), 40);
|
|
484
|
-
const width = `${x}${ux === "pct" ? "%" : ux || "px"}`;
|
|
485
|
-
const height = `${y}${uy === "pct" ? "%" : uy || "px"}`;
|
|
486
|
-
const selection = lastSelectedOption ? options[lastSelectedOption] : void 0;
|
|
487
|
-
return {
|
|
488
|
-
name: selection?.name ?? "Custom",
|
|
489
|
-
type: selection?.type ?? "other",
|
|
490
|
-
width: isRotated ? height : width,
|
|
491
|
-
height: isRotated ? width : height,
|
|
492
|
-
value: match,
|
|
493
|
-
option: void 0,
|
|
494
|
-
isCustom: true,
|
|
495
|
-
isDefault: false,
|
|
496
|
-
isLocked,
|
|
497
|
-
isRotated
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
if (value && keys.length) {
|
|
501
|
-
const { name, styles, type = "other" } = options[value] ?? options[keys[0]];
|
|
502
|
-
return {
|
|
503
|
-
name,
|
|
504
|
-
type,
|
|
505
|
-
width: isRotated ? styles.height : styles.width,
|
|
506
|
-
height: isRotated ? styles.width : styles.height,
|
|
507
|
-
value,
|
|
508
|
-
option: value,
|
|
509
|
-
isCustom: false,
|
|
510
|
-
isDefault: false,
|
|
511
|
-
isLocked,
|
|
512
|
-
isRotated
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
return {
|
|
516
|
-
name: "Responsive",
|
|
517
|
-
type: "desktop",
|
|
518
|
-
width: "100%",
|
|
519
|
-
height: "100%",
|
|
520
|
-
value: RESPONSIVE_VIEWPORT_VALUE,
|
|
521
|
-
option: void 0,
|
|
522
|
-
isCustom: false,
|
|
523
|
-
isDefault: true,
|
|
524
|
-
isLocked,
|
|
525
|
-
isRotated: false
|
|
526
|
-
};
|
|
527
|
-
};
|
|
528
|
-
})))();
|
|
529
|
-
}
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region src/viewport/useViewport.ts
|
|
532
|
-
var cycle, normalizeGlobal, useViewport;
|
|
533
|
-
function init_useViewport() {
|
|
534
|
-
return (init_useViewport = __esmMin((() => {
|
|
535
|
-
init__storybook_global_react();
|
|
536
|
-
init_manager_api();
|
|
537
|
-
init_constants$1();
|
|
538
|
-
init_defaults();
|
|
539
|
-
init_resolveViewport();
|
|
540
|
-
cycle = (viewports, current, direction = 1) => {
|
|
541
|
-
const keys = Object.keys(viewports);
|
|
542
|
-
const nextIndex = (current ? keys.indexOf(current) : -1) + direction;
|
|
543
|
-
return nextIndex < 0 ? keys[keys.length - 1] : nextIndex >= keys.length ? keys[0] : keys[nextIndex];
|
|
544
|
-
};
|
|
545
|
-
normalizeGlobal = (value, defaultIsRotated) => typeof value === "string" ? {
|
|
546
|
-
value,
|
|
547
|
-
isRotated: defaultIsRotated
|
|
548
|
-
} : {
|
|
549
|
-
value: value?.value,
|
|
550
|
-
isRotated: value?.isRotated ?? defaultIsRotated
|
|
551
|
-
};
|
|
552
|
-
useViewport = () => {
|
|
553
|
-
const api = useStorybookApi();
|
|
554
|
-
const { viewMode } = api.getUrlState();
|
|
555
|
-
const lastSelectedOption = useRef();
|
|
556
|
-
const parameter = useParameter(PARAM_KEY);
|
|
557
|
-
const [globals, updateGlobals, storyGlobals, userGlobals] = useGlobals();
|
|
558
|
-
const { options = MINIMAL_VIEWPORTS, disable = false } = parameter || {};
|
|
559
|
-
const { name, type, width, height, value, option, isCustom, isDefault, isLocked, isRotated } = resolveViewport({
|
|
560
|
-
globals,
|
|
561
|
-
storyGlobals,
|
|
562
|
-
userGlobals,
|
|
563
|
-
options,
|
|
564
|
-
lastSelectedOption: lastSelectedOption.current,
|
|
565
|
-
disable,
|
|
566
|
-
viewMode
|
|
567
|
-
});
|
|
568
|
-
const update = useCallback((input) => updateGlobals({ [PARAM_KEY]: normalizeGlobal(input, false) }), [updateGlobals]);
|
|
569
|
-
const resize = useCallback((width, height) => {
|
|
570
|
-
const w = width.replace(/px$/, "").replace(/%$/, "pct");
|
|
571
|
-
const h = height.replace(/px$/, "").replace(/%$/, "pct");
|
|
572
|
-
const value = isRotated ? `${h}-${w}` : `${w}-${h}`;
|
|
573
|
-
update({
|
|
574
|
-
value,
|
|
575
|
-
isRotated
|
|
576
|
-
});
|
|
577
|
-
}, [update, isRotated]);
|
|
578
|
-
useEffect(() => {
|
|
579
|
-
if (!parameter) return;
|
|
580
|
-
if (option) {
|
|
581
|
-
if (Object.hasOwn(options, option)) lastSelectedOption.current = option;
|
|
582
|
-
else {
|
|
583
|
-
lastSelectedOption.current = void 0;
|
|
584
|
-
if (!("viewport" in storyGlobals)) update({
|
|
585
|
-
value: void 0,
|
|
586
|
-
isRotated: false
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}, [
|
|
591
|
-
parameter,
|
|
592
|
-
storyGlobals,
|
|
593
|
-
options,
|
|
594
|
-
option,
|
|
595
|
-
update
|
|
596
|
-
]);
|
|
597
|
-
useEffect(() => {
|
|
598
|
-
api.setAddonShortcut(ADDON_ID, {
|
|
599
|
-
label: "Next viewport",
|
|
600
|
-
defaultShortcut: ["alt", "V"],
|
|
601
|
-
actionName: "next",
|
|
602
|
-
action: () => update({
|
|
603
|
-
value: cycle(options, lastSelectedOption.current),
|
|
604
|
-
isRotated
|
|
605
|
-
})
|
|
606
|
-
});
|
|
607
|
-
api.setAddonShortcut(ADDON_ID, {
|
|
608
|
-
label: "Previous viewport",
|
|
609
|
-
defaultShortcut: [
|
|
610
|
-
"alt",
|
|
611
|
-
"shift",
|
|
612
|
-
"V"
|
|
613
|
-
],
|
|
614
|
-
actionName: "previous",
|
|
615
|
-
action: () => update({
|
|
616
|
-
value: cycle(options, lastSelectedOption.current, -1),
|
|
617
|
-
isRotated
|
|
618
|
-
})
|
|
619
|
-
});
|
|
620
|
-
api.setAddonShortcut(ADDON_ID, {
|
|
621
|
-
label: "Reset viewport",
|
|
622
|
-
defaultShortcut: [
|
|
623
|
-
"alt",
|
|
624
|
-
"control",
|
|
625
|
-
"V"
|
|
626
|
-
],
|
|
627
|
-
actionName: "reset",
|
|
628
|
-
action: () => update({
|
|
629
|
-
value: void 0,
|
|
630
|
-
isRotated: false
|
|
631
|
-
})
|
|
632
|
-
});
|
|
633
|
-
}, [
|
|
634
|
-
api,
|
|
635
|
-
update,
|
|
636
|
-
options,
|
|
637
|
-
isRotated
|
|
638
|
-
]);
|
|
639
|
-
return useMemo(() => ({
|
|
640
|
-
name,
|
|
641
|
-
type,
|
|
642
|
-
width,
|
|
643
|
-
height,
|
|
644
|
-
value,
|
|
645
|
-
option,
|
|
646
|
-
isCustom,
|
|
647
|
-
isDefault,
|
|
648
|
-
isLocked,
|
|
649
|
-
isRotated,
|
|
650
|
-
options,
|
|
651
|
-
lastSelectedOption: lastSelectedOption.current,
|
|
652
|
-
resize,
|
|
653
|
-
reset: () => update({
|
|
654
|
-
value: void 0,
|
|
655
|
-
isRotated: false
|
|
656
|
-
}),
|
|
657
|
-
rotate: () => update({
|
|
658
|
-
value,
|
|
659
|
-
isRotated: !isRotated
|
|
660
|
-
}),
|
|
661
|
-
select: (value) => update({
|
|
662
|
-
value,
|
|
663
|
-
isRotated
|
|
664
|
-
})
|
|
665
|
-
}), [
|
|
666
|
-
name,
|
|
667
|
-
type,
|
|
668
|
-
width,
|
|
669
|
-
height,
|
|
670
|
-
value,
|
|
671
|
-
option,
|
|
672
|
-
isCustom,
|
|
673
|
-
isDefault,
|
|
674
|
-
isRotated,
|
|
675
|
-
isLocked,
|
|
676
|
-
options,
|
|
677
|
-
resize,
|
|
678
|
-
update
|
|
679
|
-
]);
|
|
680
|
-
};
|
|
493
|
+
//#region src/shared/review/events.ts
|
|
494
|
+
var REVIEW_NAMESPACE, REVIEW_EVENTS;
|
|
495
|
+
function init_events() {
|
|
496
|
+
return (init_events = __esmMin((() => {
|
|
497
|
+
REVIEW_NAMESPACE = "@aussieljk/forkbook/review";
|
|
498
|
+
REVIEW_EVENTS = { PAGEVIEW: `${REVIEW_NAMESPACE}/pageview` };
|
|
681
499
|
})))();
|
|
682
500
|
}
|
|
683
501
|
//#endregion
|
|
@@ -722,17 +540,7 @@ function init_story_index_filters() {
|
|
|
722
540
|
//#endregion
|
|
723
541
|
//#region src/storybook-error.ts
|
|
724
542
|
function parseErrorCode({ code, category }) {
|
|
725
|
-
return `
|
|
726
|
-
}
|
|
727
|
-
function appendErrorRef(url) {
|
|
728
|
-
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url)) return url;
|
|
729
|
-
try {
|
|
730
|
-
const urlObj = new URL(url);
|
|
731
|
-
urlObj.searchParams.set("ref", "error");
|
|
732
|
-
return urlObj.toString();
|
|
733
|
-
} catch {
|
|
734
|
-
return url;
|
|
735
|
-
}
|
|
543
|
+
return `FB_${category}_${String(code).padStart(4, "0")}`;
|
|
736
544
|
}
|
|
737
545
|
var StorybookError;
|
|
738
546
|
function init_storybook_error() {
|
|
@@ -744,7 +552,7 @@ function init_storybook_error() {
|
|
|
744
552
|
category: this.category
|
|
745
553
|
});
|
|
746
554
|
}
|
|
747
|
-
/** Overrides the default `Error.name` property in the format:
|
|
555
|
+
/** Overrides the default `Error.name` property in the format: FB_<CATEGORY>_<CODE>. */
|
|
748
556
|
get name() {
|
|
749
557
|
const errorName = this._name || this.constructor.name;
|
|
750
558
|
return `${this.fullErrorCode} (${errorName})`;
|
|
@@ -769,28 +577,28 @@ function init_storybook_error() {
|
|
|
769
577
|
/** Generates the error message along with additional documentation link (if applicable). */
|
|
770
578
|
static getFullMessage({ documentation, code, category, message }) {
|
|
771
579
|
let page;
|
|
772
|
-
if (documentation === true) page = `https://
|
|
580
|
+
if (documentation === true) page = `https://forkbook.ljk.dev/error/${parseErrorCode({
|
|
773
581
|
code,
|
|
774
582
|
category
|
|
775
|
-
})}
|
|
776
|
-
else if (typeof documentation === "string") page =
|
|
777
|
-
else if (Array.isArray(documentation)) page = `\n${documentation.map((doc) => `\t- ${
|
|
583
|
+
})}`;
|
|
584
|
+
else if (typeof documentation === "string") page = documentation;
|
|
585
|
+
else if (Array.isArray(documentation)) page = `\n${documentation.map((doc) => `\t- ${doc}`).join("\n")}`;
|
|
778
586
|
return `${message}${page != null ? `\n\nMore info: ${page}\n` : ""}`;
|
|
779
587
|
}
|
|
780
588
|
};
|
|
781
589
|
})))();
|
|
782
590
|
}
|
|
783
591
|
//#endregion
|
|
784
|
-
//#region src/
|
|
592
|
+
//#region src/preview-errors.ts
|
|
785
593
|
var StatusTypeIdMismatchError;
|
|
786
|
-
function
|
|
787
|
-
return (
|
|
594
|
+
function init_preview_errors() {
|
|
595
|
+
return (init_preview_errors = __esmMin((() => {
|
|
788
596
|
init_storybook_error();
|
|
789
597
|
StatusTypeIdMismatchError = class extends StorybookError {
|
|
790
598
|
constructor(data) {
|
|
791
599
|
super({
|
|
792
600
|
name: "StatusTypeIdMismatchError",
|
|
793
|
-
category: "
|
|
601
|
+
category: "PREVIEW_API",
|
|
794
602
|
code: 16,
|
|
795
603
|
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(data.status, null, 2)}`
|
|
796
604
|
});
|
|
@@ -861,15 +669,15 @@ function createStatusStore({ universalStatusStore, useUniversalStore, environmen
|
|
|
861
669
|
for (const status of statuses) {
|
|
862
670
|
const { storyId } = status;
|
|
863
671
|
if (status.typeId !== typeId) switch (environment) {
|
|
864
|
-
case "server": throw new StatusTypeIdMismatchError({
|
|
672
|
+
case "server": throw new StatusTypeIdMismatchError$1({
|
|
865
673
|
status,
|
|
866
674
|
typeId
|
|
867
675
|
});
|
|
868
|
-
case "manager": throw new StatusTypeIdMismatchError$
|
|
676
|
+
case "manager": throw new StatusTypeIdMismatchError$2({
|
|
869
677
|
status,
|
|
870
678
|
typeId
|
|
871
679
|
});
|
|
872
|
-
default: throw new StatusTypeIdMismatchError
|
|
680
|
+
default: throw new StatusTypeIdMismatchError({
|
|
873
681
|
status,
|
|
874
682
|
typeId
|
|
875
683
|
});
|
|
@@ -917,7 +725,7 @@ function init_status_store() {
|
|
|
917
725
|
return (init_status_store = __esmMin((() => {
|
|
918
726
|
init_manager_errors();
|
|
919
727
|
init_preview_errors();
|
|
920
|
-
|
|
728
|
+
init_dev_server();
|
|
921
729
|
statusValueShortName = (value) => {
|
|
922
730
|
if (value === "status-value:affected") return "related";
|
|
923
731
|
return value.slice(13);
|
|
@@ -964,6 +772,13 @@ function init_instances() {
|
|
|
964
772
|
}
|
|
965
773
|
//#endregion
|
|
966
774
|
//#region src/shared/universal-store/index.ts
|
|
775
|
+
/**
|
|
776
|
+
* Whether `event` has the type `type`. A custom event's `type` is any string, so a `switch` on
|
|
777
|
+
* `event.type` cannot narrow an event union to one payload, but this check can.
|
|
778
|
+
*/
|
|
779
|
+
function hasType(event, type) {
|
|
780
|
+
return event.type === type;
|
|
781
|
+
}
|
|
967
782
|
var CHANNEL_EVENT_PREFIX, ProgressState, UniversalStore;
|
|
968
783
|
function init_universal_store() {
|
|
969
784
|
return (init_universal_store = __esmMin((() => {
|
|
@@ -1243,8 +1058,8 @@ function init_universal_store() {
|
|
|
1243
1058
|
*/
|
|
1244
1059
|
onStateChange(listener) {
|
|
1245
1060
|
this.debug("onStateChange", { listener });
|
|
1246
|
-
return this.subscribe(UniversalStore.InternalEventType.SET_STATE, (
|
|
1247
|
-
listener(payload.state, payload.previousState, eventInfo);
|
|
1061
|
+
return this.subscribe(UniversalStore.InternalEventType.SET_STATE, (event, eventInfo) => {
|
|
1062
|
+
if (hasType(event, UniversalStore.InternalEventType.SET_STATE)) listener(event.payload.state, event.payload.previousState, eventInfo);
|
|
1248
1063
|
});
|
|
1249
1064
|
}
|
|
1250
1065
|
emitToChannel(event, eventInfo) {
|
|
@@ -1327,10 +1142,9 @@ function init_universal_store() {
|
|
|
1327
1142
|
});
|
|
1328
1143
|
}
|
|
1329
1144
|
}
|
|
1330
|
-
if (this.actor.type === UniversalStore.ActorType.FOLLOWER
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
if (this.syncing?.state !== ProgressState.PENDING) break;
|
|
1145
|
+
if (this.actor.type === UniversalStore.ActorType.FOLLOWER && hasType(event, UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE)) {
|
|
1146
|
+
this.debug("handleChannelEvents: Setting state from leader's existing state response", { event });
|
|
1147
|
+
if (this.syncing?.state === ProgressState.PENDING) {
|
|
1334
1148
|
this.syncing.resolve?.();
|
|
1335
1149
|
const setStateEvent = {
|
|
1336
1150
|
type: UniversalStore.InternalEventType.SET_STATE,
|
|
@@ -1341,11 +1155,11 @@ function init_universal_store() {
|
|
|
1341
1155
|
};
|
|
1342
1156
|
this.state = event.payload;
|
|
1343
1157
|
this.emitToListeners(setStateEvent, eventInfo);
|
|
1158
|
+
}
|
|
1344
1159
|
}
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
this.state = event.payload.state;
|
|
1160
|
+
if (hasType(event, UniversalStore.InternalEventType.SET_STATE)) {
|
|
1161
|
+
this.debug("handleChannelEvents: Setting state", { event });
|
|
1162
|
+
this.state = event.payload.state;
|
|
1349
1163
|
}
|
|
1350
1164
|
this.emitToListeners(event, { actor: eventInfo.actor });
|
|
1351
1165
|
}
|
|
@@ -1376,7 +1190,7 @@ function init_universal_store() {
|
|
|
1376
1190
|
var useUniversalStore;
|
|
1377
1191
|
function init_use_universal_store_manager() {
|
|
1378
1192
|
return (init_use_universal_store_manager = __esmMin((() => {
|
|
1379
|
-
|
|
1193
|
+
init__forkbook_global_react();
|
|
1380
1194
|
init_isEqual();
|
|
1381
1195
|
useUniversalStore = (universalStore, selector) => {
|
|
1382
1196
|
const snapshotRef = useRef(selector ? selector(universalStore.getState()) : universalStore.getState());
|
|
@@ -1405,4 +1219,4 @@ function init_use_universal_store_manager() {
|
|
|
1405
1219
|
})))();
|
|
1406
1220
|
}
|
|
1407
1221
|
//#endregion
|
|
1408
|
-
export {
|
|
1222
|
+
export { isThumbnailUrl as A, TOOLBAR_ID as B, init_useCopyButton as C, isReviewCollectionStoryRoute as D, init_routes as E, iframeResizeDimensionsEqual as F, global as H, init_iframe_resize as I, parseIframeResizeMessage as L, init_story_grid as M, IFRAME_RESIZE_REQUEST_CONTEXT as N, isReviewSummaryPath as O, hasFixedViewportDimensions as P, ToolbarManager as R, useSyncExternalStoreWithSelector as S, REVIEW_COLLECTION_QUERY_PARAM as T, init_global as U, init_constants as V, init_tags as _, UNIVERSAL_STATUS_STORE_OPTIONS as a, init_events as b, init_status_store as c, StorybookError as d, init_storybook_error as f, USER_TAG_FILTER as g, BUILT_IN_FILTERS as h, init_universal_store as i, groupEntriesByComponent as j, init_thumbnails as k, statusValueDescription as l, init_story_index_filters as m, useUniversalStore as n, countStatusesByValue as o, getActiveFilterCount as p, UniversalStore as r, createStatusStore as s, init_use_universal_store_manager as t, statusValueShortName as u, REVIEW_EVENTS as v, useCopyButton as w, init_with_selector as x, REVIEW_NAMESPACE as y, init_ToolbarManager as z };
|