@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
package/dist/manager/_manager-chunks/{globals-runtime-qKvCZHFY.js → globals-runtime-D6tkG2NO.js}
RENAMED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { a as __toESM, n as __esmMin, r as __exportAll } from "./globals-runtime-BdGkqNEt.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import { $ as once, A as SET_WHATS_NEW_CACHE, B as STORY_PREPARED, C as SELECT_STORY, D as SET_GLOBALS, E as SET_FILTER, F as STORIES_EXPAND_ALL, G as UPDATE_GLOBALS, H as STORY_SPECIFIED, I as STORY_ARGS_UPDATED, J as core_events_exports, K as UPDATE_QUERY_PARAMS, L as STORY_CHANGED, M as SHARED_STATE_SET, N as SIDEBAR_FILTER_CHANGED, O as SET_INDEX, P as STORIES_COLLAPSE_ALL, Q as logger, R as STORY_INDEX_INVALIDATED, S as RESULT_WHATS_NEW_DATA, T as SET_CURRENT_STORY, U as TELEMETRY_ERROR, V as STORY_RENDER_PHASE_CHANGED, W as TOGGLE_WHATS_NEW_NOTIFICATIONS, X as client_logger_exports, Y as init_core_events, Z as init_client_logger, _ as OPEN_IN_EDITOR_RESPONSE, a as channels_exports, b as REQUEST_WHATS_NEW_DATA, c as init_channel_slot, d as CURRENT_STORY_WAS_SET, f as DOCS_PREPARED, g as OPEN_IN_EDITOR_REQUEST, h as NAVIGATE_URL, i as mockChannel, j as SHARED_STATE_CHANGED, k as SET_STORIES, l as setChannel, m as GLOBALS_UPDATED, n as init_components, o as init_channels, p as FORCE_REMOUNT, q as UPDATE_STORY_ARGS, r as init_mock_channel, s as getChannel, t as components_exports, u as CONFIG_ERROR, v as PRELOAD_ENTRIES, w as SET_CONFIG, x as RESET_STORY_ARGS, y as PREVIEW_KEYDOWN, z as STORY_MISSING } from "./globals-runtime-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { F as
|
|
8
|
-
import { n as
|
|
9
|
-
import {
|
|
2
|
+
import { B as stringify, H as init_esm, L as init_dist, V as dedent, c as require_semver, s as require_store2, z as parse } from "./globals-runtime-BnQ7i5wq.js";
|
|
3
|
+
import { $ as countStatusesByValue, A as setStoryPathEntries, B as init_test, C as init_use_universal_store_manager, D as buildManagerHref, E as router_exports, F as init_routes, G as init_tags$1, H as BUILT_IN_FILTERS, I as isReviewManagerRoute, L as create, M as buildArgsParam, O as fromUrlPath, P as queryFromLocation, Q as UNIVERSAL_STATUS_STORE_OPTIONS, R as create_exports, S as init_mock, T as init_router, U as Tag, V as test_exports, W as USER_TAG_FILTER, _ as useServiceCommand, _t as UniversalStore, b as init_test_provider_store, bt as init_storybook_error, d as getService, et as createStatusStore, f as init_manager, gt as init_global, h as useServiceQuery, ht as global, it as formatIssues, j as toUrlPath, n as theming_exports, nt as statusValueShortName, p as registerService, rt as toStatusValue, t as init_theming, tt as init_status_store, v as UNIVERSAL_TEST_PROVIDER_STORE_OPTIONS, vt as init_universal_store, w as useUniversalStore, x as MockUniversalStore, y as createTestProviderStore, yt as StorybookError, z as init_create } from "./globals-runtime-BDkYPr00.js";
|
|
4
|
+
import { $ as once, A as SET_WHATS_NEW_CACHE, B as STORY_PREPARED, C as SELECT_STORY, D as SET_GLOBALS, E as SET_FILTER, F as STORIES_EXPAND_ALL, G as UPDATE_GLOBALS, H as STORY_SPECIFIED, I as STORY_ARGS_UPDATED, J as core_events_exports, K as UPDATE_QUERY_PARAMS, L as STORY_CHANGED, M as SHARED_STATE_SET, N as SIDEBAR_FILTER_CHANGED, O as SET_INDEX, P as STORIES_COLLAPSE_ALL, Q as logger, R as STORY_INDEX_INVALIDATED, S as RESULT_WHATS_NEW_DATA, T as SET_CURRENT_STORY, U as TELEMETRY_ERROR, V as STORY_RENDER_PHASE_CHANGED, W as TOGGLE_WHATS_NEW_NOTIFICATIONS, X as client_logger_exports, Y as init_core_events, Z as init_client_logger, _ as OPEN_IN_EDITOR_RESPONSE, a as channels_exports, b as REQUEST_WHATS_NEW_DATA, c as init_channel_slot, d as CURRENT_STORY_WAS_SET, f as DOCS_PREPARED, g as OPEN_IN_EDITOR_REQUEST, h as NAVIGATE_URL, i as mockChannel, j as SHARED_STATE_CHANGED, k as SET_STORIES, l as setChannel, m as GLOBALS_UPDATED, n as init_components, o as init_channels, p as FORCE_REMOUNT, q as UPDATE_STORY_ARGS, r as init_mock_channel, s as getChannel, t as components_exports, u as CONFIG_ERROR, v as PRELOAD_ENTRIES, w as SET_CONFIG, x as RESET_STORY_ARGS, y as PREVIEW_KEYDOWN, z as STORY_MISSING } from "./globals-runtime-DafcXCKU.js";
|
|
5
|
+
import { i as require_react, r as require_jsx_runtime } from "./globals-runtime-nQMRiA0J.js";
|
|
6
|
+
import { n as require_react_dom, t as require_client } from "./globals-runtime-DgO0hT2p.js";
|
|
7
|
+
import { F as mergeWith, L as mapValues, N as omit, O as init_toMerged, P as init_mergeWith, R as init_isEqual, a as throttle, c as partition, i as init_throttle, j as pick, k as toMerged, l as countBy, o as require_copy_to_clipboard, t as require_browser_dtector_umd_min, z as isEqual } from "./globals-runtime-B4NRbNSS.js";
|
|
8
|
+
import { $ as init_timer, $a as init_circle, $i as init_file_code, $n as init_network, $o as init_bold, $r as init_layers, $t as init_save, A as Users, Aa as CornerUpRight, Ai as GitFork, An as Pilcrow, Ao as Check, Ar as Mail, As as ArrowDownRight, At as Smartphone, B as Unlink, Ba as Command, Bi as Folder, Bn as PanelLeft, Bo as Calendar, Br as ListFilter, Bs as Accessibility, Bt as ShoppingBasket, C as init_watch, Ca as init_database, Ci as init_grid_2x2, Cn as init_plus, Co as init_chevron_up, Cr as init_menu, Cs as init_arrow_left, Ct as init_square_x, D as init_volume_2, Da as init_credit_card, Di as init_git_pull_request, Dn as init_pin, Do as init_chevron_left, Dr as init_maximize_2, Ds as init_arrow_down, Dt as init_square_arrow_out_up_right, E as Volume2, Ea as CreditCard, Ei as GitPullRequest, En as Pin, Eo as ChevronLeft, Er as Maximize2, Es as ArrowDown, Et as SquareArrowOutUpRight, F as init_user_plus, Fa as init_copy, Fi as init_git_branch, Fn as init_pencil, Fo as init_chart_line, Fr as init_lock_open, Fs as init_archive_restore, Ft as init_skip_forward, G as init_type, Ga as init_code, Gi as init_flask_conical, Gn as init_paintbrush_vertical, Go as init_brush_cleaning, Gr as init_link, Gt as init_share, H as UnfoldVertical, Ha as Columns2, Hi as FoldVertical, Hn as Paintbrush, Ho as Bug, Hr as ListChecks, Hs as LucideProvider, Ht as Shield, I as UserCog, Ia as Contrast, Ii as Gift, In as PenTool, Io as ChartColumn, Ir as List, Is as Apple, It as SkipBack, J as TriangleAlert, Ja as Cloud, Ji as Files, Jn as Nut, Jo as Bookmark, Jr as LifeBuoy, Jt as Settings, K as TrianglesCenterlineDashedHorizontal, Ka as CodeXml, Ki as Flag, Kn as Package, Ko as Briefcase, Kr as Library, Kt as Share2, L as init_user_cog, La as init_contrast, Li as init_gift, Ln as init_pen_tool, Lo as init_chart_column, Lr as init_list, Ls as init_apple, Lt as init_skip_back, M as User, Ma as CornerUpLeft, Mi as GitCommitHorizontal, Mn as Phone, Mo as CheckCheck, Mr as Lock, Ms as ArrowDownLeft, Mt as SlidersHorizontal, N as init_user, Na as init_corner_up_left, Ni as init_git_commit_horizontal, Nn as init_phone, No as init_check_check, Nr as init_lock, Ns as init_arrow_down_left, Nt as init_sliders_horizontal, O as Video, Oa as Cpu, Oi as GitMerge, On as PinOff, Oo as ChevronDown, Or as MapPin, Os as ArrowDownWideNarrow, Ot as SquareArrowDownLeft, P as UserPlus, Pa as Copy, Pi as GitBranch, Pn as Pencil, Po as ChartLine, Pr as LockOpen, Ps as ArchiveRestore, Pt as SkipForward, Q as Timer, Qa as Circle, Qi as FileCode, Qn as Network, Qo as Bold, Qr as Layers, Qt as Save, R as Upload, Ra as Compass, Ri as Gauge, Rn as Paperclip, Ro as Camera, Rr as ListOrdered, Rs as AppWindow, Rt as Signpost, S as Watch, Sa as Database, Si as Grid2x2, Sn as Plus, So as ChevronUp, Sr as Menu, Ss as ArrowLeft, St as SquareX, T as init_wand_sparkles, Ta as init_crosshair, Ti as init_globe, Tn as init_play, To as init_chevron_right, Tr as init_memory_stick, Ts as init_arrow_left_right, Tt as init_square_dashed, U as init_unfold_vertical, Ua as init_columns_2, Ui as init_fold_vertical, Un as init_paintbrush, Uo as init_bug, Ur as init_list_checks, Us as init_context$1, Ut as init_shield, V as init_unlink, Va as init_command, Vi as init_folder, Vn as init_panel_left, Vo as init_calendar, Vr as init_list_filter, Vs as init_accessibility, Vt as init_shopping_basket, W as Type, Wa as Code, Wi as FlaskConical, Wn as PaintbrushVertical, Wo as BrushCleaning, Wr as Link, Ws as require_memoizerific, Wt as Share, X as Trash, Xa as Clock, Xi as FileText, Xn as Newspaper, Xo as BookOpen, Xr as LayoutGrid, Xt as Search, Y as init_triangle_alert, Ya as init_cloud, Yi as init_files, Yn as init_nut, Yo as init_bookmark, Yr as init_life_buoy, Yt as init_settings$1, Z as init_trash, Za as init_clock, Zi as init_file_text, Zn as init_newspaper, Zo as init_book_open, Zr as init_layout_grid, Zt as init_search, _ as init_x, _a as init_download, _i as init_hard_drive, _n as init_printer, _o as init_circle_arrow_right, _r as init_message_square_text, _s as init_arrow_up_narrow_wide, _t as init_sticker, aa as init_face_slightly_frowning, ai as init_info, an as init_rows_2, ao as init_circle_stop, ar as init_moon, as as init_badge_check, at as init_text_align_start, b as Waypoints, ba as Delete, bi as GripVertical, bn as Pointer, bo as CircleAlert, br as MessageCircleMore, bs as ArrowRight, bt as Square, c as ZoomOut, ca as Eye, ci as IdCard, cn as RotateCcw, co as CircleQuestionMark, cr as MonitorPlay, cs as AtSign, ct as Terminal, d as init_zoom_in, da as init_eye_off, di as init_house, dn as init_rewind, do as init_circle_play, dr as init_minus, ds as init_atom, dt as init_tag, ea as FastForward, ei as Key, en as Ruler, eo as CircleX, er as MousePointerClick, es as Bell, et as ThumbsUp, f as Zap, fa as Expand, fi as Hourglass, fn as RefreshCw, fo as CirclePlus, fr as MessagesSquare, fs as ArrowUp, ft as Tablet, g as X, ga as Download, gi as HardDrive, gn as Printer, go as CircleArrowRight, gr as MessageSquareText, gs as ArrowUpNarrowWide, gt as Sticker, h as init_zap_off, ha as init_ellipsis, hi as init_heart, hn as init_puzzle, ho as init_circle_check, hr as init_message_square, hs as init_arrow_up_right, ht as init_sun, ia as FaceSlightlyFrowning, ii as Info, in as Rows2, io as CircleStop, ir as Moon, is as BadgeCheck, it as TextAlignStart, j as init_users, ja as init_corner_up_right, ji as init_git_fork, jn as init_pilcrow, jo as init_check, jr as init_mail, js as init_arrow_down_right, jt as init_smartphone, k as init_video, ka as init_cpu, ki as init_git_merge, kn as init_pin_off, ko as init_chevron_down, kr as init_map_pin, ks as init_arrow_down_wide_narrow, kt as init_square_arrow_down_left, l as init_zoom_out, la as init_eye, li as init_id_card, ln as init_rotate_ccw, lo as init_circle_question_mark, lr as init_monitor_play, ls as init_at_sign, lt as init_terminal, m as ZapOff, ma as Ellipsis, mi as Heart, mn as Puzzle, mo as CircleCheck, mr as MessageSquare, ms as ArrowUpRight, mt as Sun, na as FaceSlightlySmiling, ni as Italic, nn as Rss, no as CircleUser, nr as MousePointer2, ns as Ban, nt as TextCursorInput, oa as FaceNeutral, oi as Image, on as RotateCw, oo as CircleSlash2, or as Monitor, os as Award, ot as TextAlignEnd, p as init_zap, pa as init_expand, pi as init_hourglass, pn as init_refresh_cw, po as init_circle_plus, pr as init_messages_square, ps as init_arrow_up, pt as init_tablet, q as init_triangles_centerline_dashed_horizontal, qa as init_code_xml, qi as init_flag, qn as init_package, qo as init_briefcase, qr as init_library, qt as init_share_2, ra as init_face_slightly_smiling, ri as init_italic, rn as init_rss, ro as init_circle_user, rr as init_mouse_pointer_2, rs as init_ban, rt as init_text_cursor_input, sa as init_face_neutral, si as init_image, sn as init_rotate_cw, so as init_circle_slash_2, sr as init_monitor, ss as init_award, st as init_text_align_end, ta as init_fast_forward, ti as init_key, tn as init_ruler, to as init_circle_x, tr as init_mouse_pointer_click, ts as init_bell, tt as init_thumbs_up, u as ZoomIn, ua as EyeOff, ui as House, un as Rewind, uo as CirclePlay, ur as Minus, us as Atom, ut as Tag$1, v as Wrench, va as Diamond, vi as Grid3x3, vn as Power, vo as CircleArrowLeft, vr as MessageCircle, vs as ArrowUpLeft, vt as Star, w as WandSparkles, wa as Crosshair, wi as Globe, wn as Play, wo as ChevronRight, wr as MemoryStick, ws as ArrowLeftRight, wt as SquareDashed, x as init_waypoints, xa as init_delete, xi as init_grip_vertical, xn as init_pointer, xo as init_circle_alert, xr as init_message_circle_more, xs as init_arrow_right, xt as init_square, y as init_wrench, ya as init_diamond, yi as init_grid_3x3, yn as init_power, yo as init_circle_arrow_left, yr as init_message_circle, ys as init_arrow_up_left, yt as init_star, z as init_upload, za as init_compass, zi as init_gauge, zn as init_paperclip, zo as init_camera, zr as init_list_ordered, zs as init_app_window, zt as init_signpost } from "./globals-runtime-oRjPg2jY.js";
|
|
9
|
+
import { n as types_exports, r as Addon_TypesEnum, t as init_types } from "./globals-runtime-BnWjPJUH.js";
|
|
10
|
+
import { c as stringify$1, o as init_main } from "./globals-runtime-BzuYs3dZ.js";
|
|
11
|
+
import { h as processError, m as init_error } from "./globals-runtime-DCmvKMN5.js";
|
|
10
12
|
//#region src/manager-errors.ts
|
|
11
13
|
var manager_errors_exports = /* @__PURE__ */ __exportAll({
|
|
12
14
|
Category: () => Category,
|
|
13
15
|
OpenServiceStaticSnapshotInvalidError: () => OpenServiceStaticSnapshotInvalidError,
|
|
14
16
|
OpenServiceStaticSnapshotLoadError: () => OpenServiceStaticSnapshotLoadError,
|
|
15
17
|
ProviderDoesNotExtendBaseProviderError: () => ProviderDoesNotExtendBaseProviderError,
|
|
16
|
-
StatusTypeIdMismatchError: () => StatusTypeIdMismatchError$
|
|
18
|
+
StatusTypeIdMismatchError: () => StatusTypeIdMismatchError$2,
|
|
17
19
|
UncaughtManagerError: () => UncaughtManagerError,
|
|
18
20
|
UniversalStoreFollowerTimeoutError: () => UniversalStoreFollowerTimeoutError
|
|
19
21
|
});
|
|
20
|
-
var Category, ProviderDoesNotExtendBaseProviderError, UncaughtManagerError, StatusTypeIdMismatchError$
|
|
22
|
+
var Category, ProviderDoesNotExtendBaseProviderError, UncaughtManagerError, StatusTypeIdMismatchError$2, UniversalStoreFollowerTimeoutError, OpenServiceStaticSnapshotLoadError, OpenServiceStaticSnapshotInvalidError;
|
|
21
23
|
function init_manager_errors() {
|
|
22
24
|
return (init_manager_errors = __esmMin((() => {
|
|
23
25
|
init_storybook_error();
|
|
@@ -56,7 +58,7 @@ function init_manager_errors() {
|
|
|
56
58
|
this.stack = data.error.stack;
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
|
-
StatusTypeIdMismatchError$
|
|
61
|
+
StatusTypeIdMismatchError$2 = class extends StorybookError {
|
|
60
62
|
constructor(data) {
|
|
61
63
|
super({
|
|
62
64
|
name: "StatusTypeIdMismatchError",
|
|
@@ -104,7 +106,7 @@ function init_manager_errors() {
|
|
|
104
106
|
}
|
|
105
107
|
//#endregion
|
|
106
108
|
//#region src/preview-errors.ts
|
|
107
|
-
var InvalidChannelPageError, StatusTypeIdMismatchError;
|
|
109
|
+
var InvalidChannelPageError, StatusTypeIdMismatchError$1;
|
|
108
110
|
function init_preview_errors() {
|
|
109
111
|
return (init_preview_errors = __esmMin((() => {
|
|
110
112
|
init_storybook_error();
|
|
@@ -119,7 +121,7 @@ function init_preview_errors() {
|
|
|
119
121
|
this.data = data;
|
|
120
122
|
}
|
|
121
123
|
};
|
|
122
|
-
StatusTypeIdMismatchError = class extends StorybookError {
|
|
124
|
+
StatusTypeIdMismatchError$1 = class extends StorybookError {
|
|
123
125
|
constructor(data) {
|
|
124
126
|
super({
|
|
125
127
|
name: "StatusTypeIdMismatchError",
|
|
@@ -143,18 +145,18 @@ function init_globals() {
|
|
|
143
145
|
"react/jsx-dev-runtime": "__REACT_JSX_DEV_RUNTIME__",
|
|
144
146
|
"react-dom": "__REACT_DOM__",
|
|
145
147
|
"react-dom/client": "__REACT_DOM_CLIENT__",
|
|
146
|
-
"
|
|
147
|
-
"@aussieljk/forkbook/manager-api": "
|
|
148
|
-
"@aussieljk/forkbook/theming": "
|
|
149
|
-
"@aussieljk/forkbook/theming/create": "
|
|
150
|
-
"@aussieljk/forkbook/test": "
|
|
151
|
-
"@aussieljk/forkbook/internal/channels": "
|
|
152
|
-
"@aussieljk/forkbook/internal/client-logger": "
|
|
153
|
-
"@aussieljk/forkbook/internal/components": "
|
|
154
|
-
"@aussieljk/forkbook/internal/core-events": "
|
|
155
|
-
"@aussieljk/forkbook/internal/manager-errors": "
|
|
156
|
-
"@aussieljk/forkbook/internal/router": "
|
|
157
|
-
"@aussieljk/forkbook/internal/types": "
|
|
148
|
+
"lucide-react": "__FORKBOOK_ICONS__",
|
|
149
|
+
"@aussieljk/forkbook/manager-api": "__FORKBOOK_API__",
|
|
150
|
+
"@aussieljk/forkbook/theming": "__FORKBOOK_THEMING__",
|
|
151
|
+
"@aussieljk/forkbook/theming/create": "__FORKBOOK_THEMING_CREATE__",
|
|
152
|
+
"@aussieljk/forkbook/test": "__FORKBOOK_TEST__",
|
|
153
|
+
"@aussieljk/forkbook/internal/channels": "__FORKBOOK_CHANNELS__",
|
|
154
|
+
"@aussieljk/forkbook/internal/client-logger": "__FORKBOOK_CLIENT_LOGGER__",
|
|
155
|
+
"@aussieljk/forkbook/internal/components": "__FORKBOOK_COMPONENTS__",
|
|
156
|
+
"@aussieljk/forkbook/internal/core-events": "__FORKBOOK_CORE_EVENTS__",
|
|
157
|
+
"@aussieljk/forkbook/internal/manager-errors": "__FORKBOOK_CORE_EVENTS_MANAGER_ERRORS__",
|
|
158
|
+
"@aussieljk/forkbook/internal/router": "__FORKBOOK_ROUTER__",
|
|
159
|
+
"@aussieljk/forkbook/internal/types": "__FORKBOOK_TYPES__"
|
|
158
160
|
};
|
|
159
161
|
globalPackages = Object.keys(globalsNameReferenceMap);
|
|
160
162
|
})))();
|
|
@@ -229,6 +231,185 @@ function init_initial_state() {
|
|
|
229
231
|
})))();
|
|
230
232
|
}
|
|
231
233
|
//#endregion
|
|
234
|
+
//#region src/errors/server/dev-server.ts
|
|
235
|
+
var StatusTypeIdMismatchError;
|
|
236
|
+
function init_dev_server() {
|
|
237
|
+
return (init_dev_server = __esmMin((() => {
|
|
238
|
+
init_storybook_error();
|
|
239
|
+
StatusTypeIdMismatchError = class extends StorybookError {
|
|
240
|
+
constructor(data) {
|
|
241
|
+
super({
|
|
242
|
+
name: "StatusTypeIdMismatchError",
|
|
243
|
+
category: "CORE-SERVER",
|
|
244
|
+
code: 16,
|
|
245
|
+
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(data.status, null, 2)}`
|
|
246
|
+
});
|
|
247
|
+
this.data = data;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
})))();
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/errors/server/open-service.ts
|
|
254
|
+
var OpenServiceValidationError, OpenServiceMissingServiceError, OpenServiceInternalServiceError, OpenServiceUnimplementedOperationError, OpenServiceInvalidStaticPathError, OpenServiceAsyncSchemaError, OpenServiceLoadedDrainExceededError, OpenServiceMissingChannelError, OpenServiceRemoteCommandDisconnectedError, OpenServiceRemoteCommandUnhandledError, OpenServiceRemoteCommandConfigDriftError, OpenServiceAsyncRecipeError, OpenServiceCyclicStateError, OpenServiceOperationNameCollisionError;
|
|
255
|
+
function init_open_service() {
|
|
256
|
+
return (init_open_service = __esmMin((() => {
|
|
257
|
+
init_storybook_error();
|
|
258
|
+
OpenServiceValidationError = class extends StorybookError {
|
|
259
|
+
constructor(data) {
|
|
260
|
+
super({
|
|
261
|
+
name: "OpenServiceValidationError",
|
|
262
|
+
category: "CORE-COMMON",
|
|
263
|
+
code: 5,
|
|
264
|
+
message: `Invalid ${data.phase} for ${data.kind} "${data.serviceId}.${data.name}":\n${formatIssues(data.issues)}`
|
|
265
|
+
});
|
|
266
|
+
this.data = data;
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
OpenServiceMissingServiceError = class extends StorybookError {
|
|
270
|
+
constructor(data) {
|
|
271
|
+
super({
|
|
272
|
+
name: "OpenServiceMissingServiceError",
|
|
273
|
+
category: "CORE-COMMON",
|
|
274
|
+
code: 7,
|
|
275
|
+
message: `No registered service with id "${data.serviceId}" exists in this environment.`
|
|
276
|
+
});
|
|
277
|
+
this.data = data;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
OpenServiceInternalServiceError = class extends StorybookError {
|
|
281
|
+
constructor(data) {
|
|
282
|
+
super({
|
|
283
|
+
name: "OpenServiceInternalServiceError",
|
|
284
|
+
category: "CORE-COMMON",
|
|
285
|
+
code: 19,
|
|
286
|
+
message: `Service "${data.serviceId}" is internal. Pass { internal: true } to getService() only if you intentionally depend on an unstable OSA surface. Internal services may change without notice.`
|
|
287
|
+
});
|
|
288
|
+
this.data = data;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
OpenServiceUnimplementedOperationError = class extends StorybookError {
|
|
292
|
+
constructor(data) {
|
|
293
|
+
super({
|
|
294
|
+
name: "OpenServiceUnimplementedOperationError",
|
|
295
|
+
category: "CORE-COMMON",
|
|
296
|
+
code: 8,
|
|
297
|
+
message: `${data.kind[0].toUpperCase()}${data.kind.slice(1)} "${data.serviceId}.${data.name}" is not implemented for this environment.`
|
|
298
|
+
});
|
|
299
|
+
this.data = data;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
OpenServiceInvalidStaticPathError = class extends StorybookError {
|
|
303
|
+
constructor(data) {
|
|
304
|
+
super({
|
|
305
|
+
name: "OpenServiceInvalidStaticPathError",
|
|
306
|
+
category: "CORE-COMMON",
|
|
307
|
+
code: 10,
|
|
308
|
+
message: `Invalid static path "${data.path}" for query "${data.serviceId}.${data.name}": use a relative path with forward slashes and no ".." segments.`
|
|
309
|
+
});
|
|
310
|
+
this.data = data;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
OpenServiceAsyncSchemaError = class extends StorybookError {
|
|
314
|
+
constructor(data) {
|
|
315
|
+
super({
|
|
316
|
+
name: "OpenServiceAsyncSchemaError",
|
|
317
|
+
category: "CORE-COMMON",
|
|
318
|
+
code: 9,
|
|
319
|
+
message: `Async schema for ${data.kind} "${data.serviceId}.${data.name}" (${data.phase}): query input and output schemas must validate synchronously.`
|
|
320
|
+
});
|
|
321
|
+
this.data = data;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
OpenServiceLoadedDrainExceededError = class extends StorybookError {
|
|
325
|
+
constructor(data) {
|
|
326
|
+
super({
|
|
327
|
+
name: "OpenServiceLoadedDrainExceededError",
|
|
328
|
+
category: "CORE-COMMON",
|
|
329
|
+
code: 11,
|
|
330
|
+
message: `Query "${data.serviceId}.${data.name}".loaded(...) did not settle after ${data.iterations} drain iterations. Check for handlers that keep discovering new dependencies after every state change.`
|
|
331
|
+
});
|
|
332
|
+
this.data = data;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
OpenServiceMissingChannelError = class extends StorybookError {
|
|
336
|
+
constructor(data = {}) {
|
|
337
|
+
super({
|
|
338
|
+
name: "OpenServiceMissingChannelError",
|
|
339
|
+
category: "CORE-COMMON",
|
|
340
|
+
code: 13,
|
|
341
|
+
message: data.serviceId ? `Cannot register service "${data.serviceId}": the Forkbook addons channel is not installed in this runtime.` : "The Forkbook addons channel is not installed in this runtime."
|
|
342
|
+
});
|
|
343
|
+
this.data = data;
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
OpenServiceRemoteCommandDisconnectedError = class extends StorybookError {
|
|
347
|
+
constructor(data) {
|
|
348
|
+
super({
|
|
349
|
+
name: "OpenServiceRemoteCommandDisconnectedError",
|
|
350
|
+
category: "CORE-COMMON",
|
|
351
|
+
code: 14,
|
|
352
|
+
message: `Service "${data.serviceId}" was unregistered before a remote command resolved.`
|
|
353
|
+
});
|
|
354
|
+
this.data = data;
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
OpenServiceRemoteCommandUnhandledError = class extends StorybookError {
|
|
358
|
+
constructor(data) {
|
|
359
|
+
super({
|
|
360
|
+
name: "OpenServiceRemoteCommandUnhandledError",
|
|
361
|
+
category: "CORE-COMMON",
|
|
362
|
+
code: 15,
|
|
363
|
+
message: data.delegated ? `The Forkbook this runtime is attached to did not acknowledge remote command "${data.serviceId}.${data.commandName}" in time — it may be busy or unreachable. Retry; note the command may still have executed on that instance.` : `No runtime acknowledged remote command "${data.serviceId}.${data.commandName}"; its handler is not implemented in any connected runtime.`
|
|
364
|
+
});
|
|
365
|
+
this.data = data;
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
OpenServiceRemoteCommandConfigDriftError = class extends StorybookError {
|
|
369
|
+
constructor(data) {
|
|
370
|
+
super({
|
|
371
|
+
name: "OpenServiceRemoteCommandConfigDriftError",
|
|
372
|
+
category: "CORE-COMMON",
|
|
373
|
+
code: 30,
|
|
374
|
+
message: `The Forkbook this runtime is attached to reported it has no handler for remote command "${data.serviceId}.${data.commandName}". The two processes are running different configurations (for example a feature flag enabled in one but not the other). Restart the attached Forkbook with a configuration matching this process.`
|
|
375
|
+
});
|
|
376
|
+
this.data = data;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
OpenServiceAsyncRecipeError = class extends StorybookError {
|
|
380
|
+
constructor() {
|
|
381
|
+
super({
|
|
382
|
+
name: "OpenServiceAsyncRecipeError",
|
|
383
|
+
category: "CORE-COMMON",
|
|
384
|
+
code: 31,
|
|
385
|
+
message: "setState recipes must be synchronous. A write after an await would change state without authoring a sync entry. Split the command into one setState per synchronous step."
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
OpenServiceCyclicStateError = class extends StorybookError {
|
|
390
|
+
constructor() {
|
|
391
|
+
super({
|
|
392
|
+
name: "OpenServiceCyclicStateError",
|
|
393
|
+
category: "CORE-COMMON",
|
|
394
|
+
code: 32,
|
|
395
|
+
message: "Service state must be JSON-serializable, but the value is cyclic or nested more than 256 levels deep. Store an id and look the value up in a query instead of a reference."
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
OpenServiceOperationNameCollisionError = class extends StorybookError {
|
|
400
|
+
constructor(data) {
|
|
401
|
+
super({
|
|
402
|
+
name: "OpenServiceOperationNameCollisionError",
|
|
403
|
+
category: "CORE-COMMON",
|
|
404
|
+
code: 16,
|
|
405
|
+
message: `Service "${data.serviceId}" cannot register "${data.operationName}" as both a query and a command.`
|
|
406
|
+
});
|
|
407
|
+
this.data = data;
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
})))();
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
232
413
|
//#region src/manager-api/lib/addons.ts
|
|
233
414
|
function getAddonsStore() {
|
|
234
415
|
if (!globalThis[KEY]) globalThis[KEY] = new AddonStore();
|
|
@@ -306,7 +487,7 @@ function init_addons() {
|
|
|
306
487
|
return type ? Object.keys(this.getElements(type)) : Object.keys(this.loaders);
|
|
307
488
|
}
|
|
308
489
|
};
|
|
309
|
-
KEY = "
|
|
490
|
+
KEY = "__FORKBOOK_ADDONS_MANAGER";
|
|
310
491
|
addons$1 = getAddonsStore();
|
|
311
492
|
})))();
|
|
312
493
|
}
|
|
@@ -359,7 +540,7 @@ function init_addons$1() {
|
|
|
359
540
|
}
|
|
360
541
|
}), options).then(() => api.getAddonState(addonId));
|
|
361
542
|
},
|
|
362
|
-
getAddonState
|
|
543
|
+
getAddonState(addonId) {
|
|
363
544
|
return store.getState().addons[addonId] || globalThis?.FORKBOOK_ADDON_STATE[addonId];
|
|
364
545
|
}
|
|
365
546
|
};
|
|
@@ -376,9 +557,10 @@ function init_addons$1() {
|
|
|
376
557
|
//#endregion
|
|
377
558
|
//#region src/manager-api/modules/channel.ts
|
|
378
559
|
var channel_exports = /* @__PURE__ */ __exportAll({ init: () => init$12 });
|
|
379
|
-
var init$12;
|
|
560
|
+
var hasTarget, init$12;
|
|
380
561
|
function init_channel() {
|
|
381
562
|
return (init_channel = __esmMin((() => {
|
|
563
|
+
hasTarget = (data) => typeof data === "object" && data !== null && "options" in data && typeof data.options === "object" && data.options !== null && "target" in data.options && typeof data.options.target === "string";
|
|
382
564
|
init$12 = ({ provider }) => {
|
|
383
565
|
return {
|
|
384
566
|
api: {
|
|
@@ -390,7 +572,7 @@ function init_channel() {
|
|
|
390
572
|
off: (type, handler) => provider.channel?.off(type, handler),
|
|
391
573
|
once: (type, handler) => provider.channel?.once(type, handler),
|
|
392
574
|
emit: (type, data, ...args) => {
|
|
393
|
-
if (data
|
|
575
|
+
if (hasTarget(data) && data.options.target && data.options.target !== "storybook-preview-iframe" && !data.options.target.startsWith("storybook-ref-")) data.options.target = data.options.target !== "storybook_internal" ? `storybook-ref-${data.options.target}` : "storybook-preview-iframe";
|
|
394
576
|
provider.channel?.emit(type, data, ...args);
|
|
395
577
|
}
|
|
396
578
|
},
|
|
@@ -448,7 +630,7 @@ function init_EVENTS() {
|
|
|
448
630
|
var addons;
|
|
449
631
|
function init_preview_api() {
|
|
450
632
|
return (init_preview_api = __esmMin((() => {
|
|
451
|
-
addons = globalThis.
|
|
633
|
+
addons = globalThis.__FORKBOOK_ADDONS_PREVIEW;
|
|
452
634
|
})))();
|
|
453
635
|
}
|
|
454
636
|
//#endregion
|
|
@@ -463,11 +645,11 @@ function instrument(obj, options = {}) {
|
|
|
463
645
|
try {
|
|
464
646
|
let forceInstrument = false;
|
|
465
647
|
let skipInstrument = false;
|
|
466
|
-
if (
|
|
467
|
-
else if (
|
|
468
|
-
if (
|
|
469
|
-
|
|
470
|
-
return
|
|
648
|
+
if (global.window?.location?.search?.includes("instrument=true")) forceInstrument = true;
|
|
649
|
+
else if (global.window?.location?.search?.includes("instrument=false")) skipInstrument = true;
|
|
650
|
+
if (global.window?.parent === global.window && !forceInstrument || skipInstrument) return obj;
|
|
651
|
+
global.window.__FORKBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ ??= new Instrumenter();
|
|
652
|
+
return global.window.__FORKBOOK_ADDON_INTERACTIONS_INSTRUMENTER__.instrument(obj, options);
|
|
471
653
|
} catch (e) {
|
|
472
654
|
once.warn(e);
|
|
473
655
|
return obj;
|
|
@@ -487,18 +669,19 @@ function isClass(obj) {
|
|
|
487
669
|
if (!descriptor) return false;
|
|
488
670
|
return !descriptor.writable;
|
|
489
671
|
}
|
|
490
|
-
var alreadyCompletedException, isObject, isModule, isInstrumentable, construct, getInitialState, getRetainedState, Instrumenter;
|
|
672
|
+
var alreadyCompletedException, isObject, isModule, isCallRef, isInstrumentable, construct, getInitialState, getRetainedState, Instrumenter;
|
|
491
673
|
function init_instrumenter() {
|
|
492
674
|
return (init_instrumenter = __esmMin((() => {
|
|
493
675
|
init_client_logger();
|
|
494
676
|
init_core_events();
|
|
495
|
-
|
|
677
|
+
init_global();
|
|
496
678
|
init_error();
|
|
497
679
|
init_EVENTS();
|
|
498
680
|
init_preview_api();
|
|
499
681
|
alreadyCompletedException = /* @__PURE__ */ new Error(`This function ran after the play function completed. Did you forget to \`await\` it?`);
|
|
500
682
|
isObject = (o) => Object.prototype.toString.call(o) === "[object Object]";
|
|
501
683
|
isModule = (o) => Object.prototype.toString.call(o) === "[object Module]";
|
|
684
|
+
isCallRef = (value) => typeof value === "object" && value !== null && "__callId__" in value;
|
|
502
685
|
isInstrumentable = (o) => {
|
|
503
686
|
if (!isObject(o) && !isModule(o)) return false;
|
|
504
687
|
if (o.constructor === void 0) return true;
|
|
@@ -545,14 +728,14 @@ function init_instrumenter() {
|
|
|
545
728
|
this.state = {};
|
|
546
729
|
this.loadParentWindowState = () => {
|
|
547
730
|
try {
|
|
548
|
-
this.state =
|
|
731
|
+
this.state = global.window?.parent?.__FORKBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
|
|
549
732
|
} catch {
|
|
550
733
|
this.detached = true;
|
|
551
734
|
}
|
|
552
735
|
};
|
|
553
736
|
this.updateParentWindowState = () => {
|
|
554
737
|
try {
|
|
555
|
-
|
|
738
|
+
global.window.parent.__FORKBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state;
|
|
556
739
|
} catch {
|
|
557
740
|
this.detached = true;
|
|
558
741
|
}
|
|
@@ -728,7 +911,7 @@ function init_instrumenter() {
|
|
|
728
911
|
const seen = /* @__PURE__ */ new Set();
|
|
729
912
|
return merged.reduceRight((acc, call) => {
|
|
730
913
|
call.args.forEach((arg) => {
|
|
731
|
-
if (arg
|
|
914
|
+
if (isCallRef(arg)) seen.add(arg.__callId__);
|
|
732
915
|
});
|
|
733
916
|
call.path.forEach((node) => {
|
|
734
917
|
if (node.__callId__) seen.add(node.__callId__);
|
|
@@ -746,14 +929,15 @@ function init_instrumenter() {
|
|
|
746
929
|
}
|
|
747
930
|
instrument(obj, options, depth = 0) {
|
|
748
931
|
if (!isInstrumentable(obj)) return obj;
|
|
932
|
+
const source = obj;
|
|
749
933
|
const { mutate = false, path = [] } = options;
|
|
750
|
-
const keys = options.getKeys ? options.getKeys(
|
|
934
|
+
const keys = options.getKeys ? options.getKeys(source, depth) : Object.keys(source);
|
|
751
935
|
depth += 1;
|
|
752
936
|
return keys.reduce((acc, key) => {
|
|
753
|
-
const descriptor = getPropertyDescriptor(
|
|
937
|
+
const descriptor = getPropertyDescriptor(source, key);
|
|
754
938
|
if (typeof descriptor?.get === "function") {
|
|
755
939
|
if (descriptor.configurable) {
|
|
756
|
-
const getter = () => descriptor?.get?.bind(
|
|
940
|
+
const getter = () => descriptor?.get?.bind(source)?.();
|
|
757
941
|
Object.defineProperty(acc, key, { get: () => {
|
|
758
942
|
return this.instrument(getter(), {
|
|
759
943
|
...options,
|
|
@@ -763,7 +947,7 @@ function init_instrumenter() {
|
|
|
763
947
|
}
|
|
764
948
|
return acc;
|
|
765
949
|
}
|
|
766
|
-
const value =
|
|
950
|
+
const value = source[key];
|
|
767
951
|
if (typeof value !== "function") {
|
|
768
952
|
acc[key] = this.instrument(value, {
|
|
769
953
|
...options,
|
|
@@ -775,21 +959,22 @@ function init_instrumenter() {
|
|
|
775
959
|
acc[key] = value;
|
|
776
960
|
return acc;
|
|
777
961
|
}
|
|
778
|
-
|
|
779
|
-
acc[key]
|
|
780
|
-
Object.defineProperty(
|
|
962
|
+
const patched = Object.assign((...args) => this.track(key, value, source, args, options), { __originalFn__: value });
|
|
963
|
+
acc[key] = patched;
|
|
964
|
+
Object.defineProperty(patched, "name", {
|
|
781
965
|
value: key,
|
|
782
966
|
writable: false
|
|
783
967
|
});
|
|
784
|
-
if (Object.keys(value).length > 0) Object.assign(
|
|
968
|
+
if (Object.keys(value).length > 0) Object.assign(patched, this.instrument({ ...value }, {
|
|
785
969
|
...options,
|
|
786
970
|
path: path.concat(key)
|
|
787
971
|
}, depth));
|
|
788
972
|
return acc;
|
|
789
|
-
}, mutate ?
|
|
973
|
+
}, mutate ? source : construct(source));
|
|
790
974
|
}
|
|
791
975
|
track(method, fn, object, args, options) {
|
|
792
|
-
const
|
|
976
|
+
const firstArg = args[0];
|
|
977
|
+
const storyId = (typeof firstArg === "object" && firstArg !== null && "__storyId__" in firstArg ? firstArg.__storyId__ : void 0) || global.__FORKBOOK_PREVIEW__?.selectionStore?.selection?.storyId;
|
|
793
978
|
const { cursor, ancestors } = this.getState(storyId);
|
|
794
979
|
this.setState(storyId, { cursor: cursor + 1 });
|
|
795
980
|
const id = `${ancestors.slice(-1)[0] || storyId} [${cursor}] ${method}`;
|
|
@@ -864,7 +1049,7 @@ function init_instrumenter() {
|
|
|
864
1049
|
source
|
|
865
1050
|
} };
|
|
866
1051
|
}
|
|
867
|
-
if (value instanceof
|
|
1052
|
+
if (value instanceof global.window?.HTMLElement) {
|
|
868
1053
|
const { prefix, localName, id, classList, innerText } = value;
|
|
869
1054
|
return { __element__: {
|
|
870
1055
|
prefix,
|
|
@@ -874,10 +1059,10 @@ function init_instrumenter() {
|
|
|
874
1059
|
innerText
|
|
875
1060
|
} };
|
|
876
1061
|
}
|
|
877
|
-
if (typeof value === "function") return { __function__: { name: "getMockName" in value ? value.getMockName() : value.name } };
|
|
1062
|
+
if (typeof value === "function") return { __function__: { name: "getMockName" in value && typeof value.getMockName === "function" ? value.getMockName() : value.name } };
|
|
878
1063
|
if (typeof value === "symbol") return { __symbol__: { description: value.description } };
|
|
879
1064
|
if (typeof value === "object" && value?.constructor?.name && value?.constructor?.name !== "Object") return { __class__: { name: value.constructor.name } };
|
|
880
|
-
if (
|
|
1065
|
+
if (isObject(value)) return Object.fromEntries(Object.entries(value).map(([key, val]) => [key, serializeValues(val, ++depth, seen)]));
|
|
881
1066
|
return value;
|
|
882
1067
|
};
|
|
883
1068
|
const info = {
|
|
@@ -885,7 +1070,7 @@ function init_instrumenter() {
|
|
|
885
1070
|
args: call.args.map((arg) => serializeValues(arg, 0, []))
|
|
886
1071
|
};
|
|
887
1072
|
call.path.forEach((ref) => {
|
|
888
|
-
if (ref?.__callId__) this.setState(call.storyId, ({ chainedCallIds }) => ({ chainedCallIds: new Set(Array.from(chainedCallIds).concat(ref.__callId__)) }));
|
|
1073
|
+
if (typeof ref === "object" && ref?.__callId__) this.setState(call.storyId, ({ chainedCallIds }) => ({ chainedCallIds: new Set(Array.from(chainedCallIds).concat(ref.__callId__)) }));
|
|
889
1074
|
});
|
|
890
1075
|
const handleException = (e) => {
|
|
891
1076
|
if (e instanceof Error) {
|
|
@@ -1111,16 +1296,15 @@ function init_stories() {
|
|
|
1111
1296
|
entries: Object.values(index.stories).reduce((acc, entry) => {
|
|
1112
1297
|
let type = "story";
|
|
1113
1298
|
if (entry.parameters?.docsOnly || entry.name === "Page" && countByTitle[entry.title] === 1) type = "docs";
|
|
1299
|
+
const { story: _story, kind: _kind, ...entryWithoutV3Fields } = entry;
|
|
1114
1300
|
acc[entry.id] = {
|
|
1115
1301
|
type,
|
|
1116
1302
|
...type === "docs" && {
|
|
1117
1303
|
tags: ["stories-mdx"],
|
|
1118
1304
|
storiesImports: []
|
|
1119
1305
|
},
|
|
1120
|
-
...
|
|
1306
|
+
...entryWithoutV3Fields
|
|
1121
1307
|
};
|
|
1122
|
-
delete acc[entry.id].story;
|
|
1123
|
-
delete acc[entry.id].kind;
|
|
1124
1308
|
return acc;
|
|
1125
1309
|
}, {})
|
|
1126
1310
|
};
|
|
@@ -1173,12 +1357,12 @@ function init_stories() {
|
|
|
1173
1357
|
})));
|
|
1174
1358
|
});
|
|
1175
1359
|
const { sidebar = {} } = provider.getConfig();
|
|
1176
|
-
const { showRoots, collapsedRoots = [], renderAriaLabel, renderLabel } = sidebar;
|
|
1360
|
+
const { showRoots, flat, collapsedRoots = [], renderAriaLabel, renderLabel } = sidebar;
|
|
1177
1361
|
const setShowRoots = typeof showRoots !== "undefined";
|
|
1178
1362
|
const storiesHashOutOfOrder = entryValues.reduce((acc, item) => {
|
|
1179
1363
|
if (docsOptions.docsMode && item.type !== "docs") return acc;
|
|
1180
1364
|
const { title } = item;
|
|
1181
|
-
const groups = title.trim().split(TITLE_PATH_SEPARATOR);
|
|
1365
|
+
const groups = flat ? [title.trim()] : title.trim().split(TITLE_PATH_SEPARATOR);
|
|
1182
1366
|
const root = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [];
|
|
1183
1367
|
const names = [...root, ...groups];
|
|
1184
1368
|
const paths = names.reduce((list, name, idx) => {
|
|
@@ -1335,10 +1519,10 @@ async function handleRequest(request) {
|
|
|
1335
1519
|
var location, fetch$1, getSourceType, defaultStoryMapper, addRefIds, applyRefStoryUpdates, parseUrl, getRedirectedRefUrl, map, init$11;
|
|
1336
1520
|
function init_refs() {
|
|
1337
1521
|
return (init_refs = __esmMin((() => {
|
|
1338
|
-
|
|
1522
|
+
init_global();
|
|
1339
1523
|
init_esm();
|
|
1340
1524
|
init_stories();
|
|
1341
|
-
({location, fetch: fetch$1} =
|
|
1525
|
+
({location, fetch: fetch$1} = global);
|
|
1342
1526
|
getSourceType = (source, refId) => {
|
|
1343
1527
|
const { origin: localOrigin, pathname: localPathname } = location;
|
|
1344
1528
|
const { origin: sourceOrigin, pathname: sourcePathname } = new URL(source);
|
|
@@ -1348,7 +1532,7 @@ function init_refs() {
|
|
|
1348
1532
|
if (refId || source) return ["external", sourceFull];
|
|
1349
1533
|
return [null, null];
|
|
1350
1534
|
};
|
|
1351
|
-
defaultStoryMapper = (
|
|
1535
|
+
defaultStoryMapper = (_ref, a) => {
|
|
1352
1536
|
return {
|
|
1353
1537
|
...a,
|
|
1354
1538
|
kind: a.kind.replace("|", "/")
|
|
@@ -1451,7 +1635,7 @@ function init_refs() {
|
|
|
1451
1635
|
credentials
|
|
1452
1636
|
}));
|
|
1453
1637
|
const [indexResult, storiesResult] = await Promise.all([handleRequest(indexRequest), handleRequest(storiesRequest)]);
|
|
1454
|
-
const refUrl =
|
|
1638
|
+
const refUrl = global.CONFIG_TYPE === "DEVELOPMENT" && indexResult.storyIndex ? getRedirectedRefUrl(urlParseResult.url, (await indexRequest).url) : urlParseResult.url;
|
|
1455
1639
|
if (!indexResult.indexError || !storiesResult.indexError) {
|
|
1456
1640
|
const metadata = await handleRequest(fetch$1(`${urlParseResult.url}/metadata.json${query}`, {
|
|
1457
1641
|
headers,
|
|
@@ -1488,21 +1672,20 @@ function init_refs() {
|
|
|
1488
1672
|
},
|
|
1489
1673
|
setRef: async (id, { storyIndex, setStoriesData, ...rest }, ready = false) => {
|
|
1490
1674
|
if (singleStory) return;
|
|
1491
|
-
let internal_index;
|
|
1492
1675
|
let index;
|
|
1493
1676
|
let filteredIndex;
|
|
1494
1677
|
const { filters } = store.getState();
|
|
1495
1678
|
const { storyMapper = defaultStoryMapper } = provider.getConfig();
|
|
1496
1679
|
const ref = api.getRefs()[id];
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
filteredIndex = transformStoryIndexToStoriesHash(
|
|
1680
|
+
const internal_index = setStoriesData ? transformSetStoriesStoryDataToPreparedStoryIndex(map(setStoriesData, ref, { storyMapper })) : storyIndex;
|
|
1681
|
+
if (internal_index) {
|
|
1682
|
+
filteredIndex = transformStoryIndexToStoriesHash(internal_index, {
|
|
1500
1683
|
provider,
|
|
1501
1684
|
docsOptions,
|
|
1502
1685
|
filters,
|
|
1503
1686
|
allStatuses: {}
|
|
1504
1687
|
});
|
|
1505
|
-
index = transformStoryIndexToStoriesHash(
|
|
1688
|
+
index = transformStoryIndexToStoriesHash(internal_index, {
|
|
1506
1689
|
provider,
|
|
1507
1690
|
docsOptions,
|
|
1508
1691
|
filters: {},
|
|
@@ -1531,14 +1714,11 @@ function init_refs() {
|
|
|
1531
1714
|
...ref,
|
|
1532
1715
|
...data
|
|
1533
1716
|
};
|
|
1534
|
-
const ordered = Object.keys(initialState).
|
|
1535
|
-
obj[key] = updated[key];
|
|
1536
|
-
return obj;
|
|
1537
|
-
}, {});
|
|
1717
|
+
const ordered = Object.fromEntries(Object.keys(initialState).map((key) => [key, updated[key]]));
|
|
1538
1718
|
await store.setState({ refs: ordered });
|
|
1539
1719
|
}
|
|
1540
1720
|
};
|
|
1541
|
-
const refs = !singleStory &&
|
|
1721
|
+
const refs = !singleStory && global.REFS || {};
|
|
1542
1722
|
const initialState = refs;
|
|
1543
1723
|
if (runCheck) new Promise(async (resolve) => {
|
|
1544
1724
|
for (const ref of Object.values(refs)) await api.checkRef({
|
|
@@ -1593,7 +1773,7 @@ function init_globals$1() {
|
|
|
1593
1773
|
return (init_globals$1 = __esmMin((() => {
|
|
1594
1774
|
init_client_logger();
|
|
1595
1775
|
init_core_events();
|
|
1596
|
-
|
|
1776
|
+
init_isEqual();
|
|
1597
1777
|
init_events();
|
|
1598
1778
|
init$10 = ({ store, fullAPI, provider }) => {
|
|
1599
1779
|
const api = {
|
|
@@ -1624,9 +1804,9 @@ function init_globals$1() {
|
|
|
1624
1804
|
};
|
|
1625
1805
|
const updateGlobals = ({ globals, storyGlobals, userGlobals }) => {
|
|
1626
1806
|
const { globals: currentGlobals, userGlobals: currentUserGlobals, storyGlobals: currentStoryGlobals } = store.getState();
|
|
1627
|
-
if (!
|
|
1628
|
-
if (!
|
|
1629
|
-
if (!
|
|
1807
|
+
if (!isEqual(globals, currentGlobals)) store.setState({ globals });
|
|
1808
|
+
if (!isEqual(userGlobals, currentUserGlobals)) store.setState({ userGlobals });
|
|
1809
|
+
if (!isEqual(storyGlobals, currentStoryGlobals)) store.setState({ storyGlobals });
|
|
1630
1810
|
};
|
|
1631
1811
|
provider.channel?.on(GLOBALS_UPDATED, function handleGlobalsUpdated({ globals, storyGlobals, userGlobals }) {
|
|
1632
1812
|
const { ref } = getEventMetadata(this, fullAPI);
|
|
@@ -1646,7 +1826,7 @@ function init_globals$1() {
|
|
|
1646
1826
|
globalTypes
|
|
1647
1827
|
});
|
|
1648
1828
|
else if (Object.keys(globals).length > 0) logger.warn("received globals from a non-local ref. This is not currently supported.");
|
|
1649
|
-
if (currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !
|
|
1829
|
+
if (currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !isEqual(globals, currentUserGlobals)) api.updateGlobals(currentUserGlobals);
|
|
1650
1830
|
});
|
|
1651
1831
|
return {
|
|
1652
1832
|
api,
|
|
@@ -1671,13 +1851,13 @@ var layout_exports = /* @__PURE__ */ __exportAll({
|
|
|
1671
1851
|
function init_layout() {
|
|
1672
1852
|
return (init_layout = __esmMin((() => {
|
|
1673
1853
|
init_core_events();
|
|
1674
|
-
|
|
1854
|
+
init_global();
|
|
1675
1855
|
init_toMerged();
|
|
1676
1856
|
init_isEqual();
|
|
1677
1857
|
init_create();
|
|
1678
1858
|
init_routes();
|
|
1679
1859
|
init_merge();
|
|
1680
|
-
({document: document$2} =
|
|
1860
|
+
({document: document$2} = global);
|
|
1681
1861
|
isFunction = (val) => typeof val === "function";
|
|
1682
1862
|
ActiveTabs$1 = {
|
|
1683
1863
|
SIDEBAR: "sidebar",
|
|
@@ -1761,7 +1941,7 @@ function init_layout() {
|
|
|
1761
1941
|
const uiKeys = Object.keys(uiState);
|
|
1762
1942
|
return toMerged(uiState, pick(options ?? {}, uiKeys));
|
|
1763
1943
|
};
|
|
1764
|
-
isDesktopViewport = () =>
|
|
1944
|
+
isDesktopViewport = () => global.matchMedia?.("(min-width: 600px)")?.matches ?? true;
|
|
1765
1945
|
init$9 = ({ store, provider, singleStory }) => {
|
|
1766
1946
|
const api = {
|
|
1767
1947
|
toggleFullscreen(nextState) {
|
|
@@ -1884,7 +2064,9 @@ function init_layout() {
|
|
|
1884
2064
|
element.focus();
|
|
1885
2065
|
}
|
|
1886
2066
|
if (element !== document$2.activeElement && element.id !== document$2.activeElement?.id) return false;
|
|
1887
|
-
if (select)
|
|
2067
|
+
if (select) {
|
|
2068
|
+
if ("select" in element && typeof element.select === "function") element.select();
|
|
2069
|
+
}
|
|
1888
2070
|
return true;
|
|
1889
2071
|
};
|
|
1890
2072
|
if (attemptFocus()) return true;
|
|
@@ -2034,7 +2216,7 @@ function init_open_in_editor() {
|
|
|
2034
2216
|
return (init_open_in_editor = __esmMin((() => {
|
|
2035
2217
|
import_react$4 = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
2036
2218
|
init_core_events();
|
|
2037
|
-
|
|
2219
|
+
init_circle_x();
|
|
2038
2220
|
init$7 = ({ provider, fullAPI }) => {
|
|
2039
2221
|
return {
|
|
2040
2222
|
api: { openInEditor(payload) {
|
|
@@ -2052,7 +2234,7 @@ function init_open_in_editor() {
|
|
|
2052
2234
|
} },
|
|
2053
2235
|
state: { notifications: [] },
|
|
2054
2236
|
init: async () => {
|
|
2055
|
-
const { color } = await import("./globals-runtime-
|
|
2237
|
+
const { color } = await import("./globals-runtime-BDkYPr00.js").then((n) => (n.t(), n.n));
|
|
2056
2238
|
provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, (payload) => {
|
|
2057
2239
|
if (payload.error !== null) fullAPI.addNotification({
|
|
2058
2240
|
id: "open-in-editor-error",
|
|
@@ -2060,7 +2242,7 @@ function init_open_in_editor() {
|
|
|
2060
2242
|
headline: "Failed to open in editor",
|
|
2061
2243
|
subHeadline: payload.error || "Check the Forkbook process on the command line for more details."
|
|
2062
2244
|
},
|
|
2063
|
-
icon: /* @__PURE__ */ import_react$4.default.createElement(
|
|
2245
|
+
icon: /* @__PURE__ */ import_react$4.default.createElement(CircleX, { color: color.negative }),
|
|
2064
2246
|
duration: 8e3
|
|
2065
2247
|
});
|
|
2066
2248
|
});
|
|
@@ -2127,8 +2309,8 @@ function init_settings() {
|
|
|
2127
2309
|
var navigator$1, isMacLike$1;
|
|
2128
2310
|
function init_platform() {
|
|
2129
2311
|
return (init_platform = __esmMin((() => {
|
|
2130
|
-
|
|
2131
|
-
({navigator: navigator$1} =
|
|
2312
|
+
init_global();
|
|
2313
|
+
({navigator: navigator$1} = global);
|
|
2132
2314
|
isMacLike$1 = () => navigator$1 && navigator$1.platform ? !!navigator$1.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false;
|
|
2133
2315
|
})))();
|
|
2134
2316
|
}
|
|
@@ -2242,12 +2424,12 @@ var import_copy_to_clipboard, navigator, document$1, isMacLike, controlOrMetaKey
|
|
|
2242
2424
|
function init_shortcuts() {
|
|
2243
2425
|
return (init_shortcuts = __esmMin((() => {
|
|
2244
2426
|
init_core_events();
|
|
2245
|
-
|
|
2427
|
+
init_global();
|
|
2246
2428
|
import_copy_to_clipboard = /* @__PURE__ */ __toESM(require_copy_to_clipboard(), 1);
|
|
2247
2429
|
init_client_logger();
|
|
2248
2430
|
init_shortcut();
|
|
2249
2431
|
init_layout();
|
|
2250
|
-
({navigator, document: document$1} =
|
|
2432
|
+
({navigator, document: document$1} = global);
|
|
2251
2433
|
isMacLike = () => navigator && navigator.platform ? !!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false;
|
|
2252
2434
|
controlOrMetaKey = () => isMacLike() ? "meta" : "control";
|
|
2253
2435
|
defaultShortcuts = Object.freeze({
|
|
@@ -2477,7 +2659,7 @@ function init_shortcuts() {
|
|
|
2477
2659
|
fullAPI.emit(FORCE_REMOUNT, { storyId });
|
|
2478
2660
|
break;
|
|
2479
2661
|
case "openInEditor":
|
|
2480
|
-
if (
|
|
2662
|
+
if (global.CONFIG_TYPE === "DEVELOPMENT") fullAPI.openInEditor({ file: fullAPI.getCurrentStoryData().importPath });
|
|
2481
2663
|
break;
|
|
2482
2664
|
case "openInIsolation":
|
|
2483
2665
|
if (storyId && viewMode === "story") {
|
|
@@ -2557,6 +2739,156 @@ function init_status() {
|
|
|
2557
2739
|
})))();
|
|
2558
2740
|
}
|
|
2559
2741
|
//#endregion
|
|
2742
|
+
//#region src/manager-api/modules/stories-events.ts
|
|
2743
|
+
function removeRemovedOptions(options) {
|
|
2744
|
+
if (!options || typeof options === "string") return options;
|
|
2745
|
+
const result = { ...options };
|
|
2746
|
+
removedOptions.forEach((option) => {
|
|
2747
|
+
if (option in result) delete result[option];
|
|
2748
|
+
});
|
|
2749
|
+
return result;
|
|
2750
|
+
}
|
|
2751
|
+
var removedOptions, listenToStoryEvents;
|
|
2752
|
+
function init_stories_events() {
|
|
2753
|
+
return (init_stories_events = __esmMin((() => {
|
|
2754
|
+
init_core_events();
|
|
2755
|
+
init_routes();
|
|
2756
|
+
init_events();
|
|
2757
|
+
init_stories();
|
|
2758
|
+
removedOptions = [
|
|
2759
|
+
"enableShortcuts",
|
|
2760
|
+
"theme",
|
|
2761
|
+
"showRoots"
|
|
2762
|
+
];
|
|
2763
|
+
listenToStoryEvents = ({ store, provider, fullAPI, api, navigateWithQueryParams }) => {
|
|
2764
|
+
provider.channel?.on(STORY_SPECIFIED, function handler({ storyId, viewMode }) {
|
|
2765
|
+
const { sourceType } = getEventMetadata(this, fullAPI);
|
|
2766
|
+
if (sourceType === "local") {
|
|
2767
|
+
const state = store.getState();
|
|
2768
|
+
const isCanvasRoute = !isReviewManagerRoute(state.path, state.customQueryParams) && (state.path === "/" || state.viewMode === "story" || state.viewMode === "docs");
|
|
2769
|
+
const stateHasSelection = state.viewMode && state.storyId;
|
|
2770
|
+
const stateSelectionDifferent = state.viewMode !== viewMode || state.storyId !== storyId;
|
|
2771
|
+
const { type } = state.index?.[state.storyId] || {};
|
|
2772
|
+
const isStory = !(type === "root" || type === "component" || type === "group");
|
|
2773
|
+
/**
|
|
2774
|
+
* When Forkbook starts, we want to navigate to the first story. But there are a few
|
|
2775
|
+
* exceptions:
|
|
2776
|
+
*
|
|
2777
|
+
* - If the current storyId and viewMode are already set/correct AND the url section is a
|
|
2778
|
+
* leaf-type.
|
|
2779
|
+
* - If the user has navigated away already.
|
|
2780
|
+
* - If the user started Forkbook with a specific page-URL like "/settings/about"
|
|
2781
|
+
*/
|
|
2782
|
+
if (isCanvasRoute) {
|
|
2783
|
+
const { filteredIndex } = state;
|
|
2784
|
+
if (filteredIndex && !stateHasSelection) {
|
|
2785
|
+
if (!(filteredIndex[storyId]?.type === "story")) {
|
|
2786
|
+
const firstFiltered = Object.keys(filteredIndex).find((id) => {
|
|
2787
|
+
const entry = filteredIndex[id];
|
|
2788
|
+
return entry.type === "story" || entry.type === "docs";
|
|
2789
|
+
});
|
|
2790
|
+
if (firstFiltered) navigateWithQueryParams(`/${viewMode}/${firstFiltered}`);
|
|
2791
|
+
return;
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
if (stateHasSelection && stateSelectionDifferent && isStory) provider.channel?.emit(SET_CURRENT_STORY, {
|
|
2795
|
+
storyId: state.storyId,
|
|
2796
|
+
viewMode: state.viewMode
|
|
2797
|
+
});
|
|
2798
|
+
else if (stateSelectionDifferent) navigateWithQueryParams(`/${viewMode}/${storyId}`);
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
provider.channel?.on(CURRENT_STORY_WAS_SET, function handler() {
|
|
2803
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2804
|
+
api.setPreviewInitialized(ref);
|
|
2805
|
+
});
|
|
2806
|
+
provider.channel?.on(STORY_CHANGED, function handler() {
|
|
2807
|
+
const { sourceType } = getEventMetadata(this, fullAPI);
|
|
2808
|
+
if (sourceType === "local") {
|
|
2809
|
+
const options = api.getCurrentParameter("options");
|
|
2810
|
+
if (options) fullAPI.setOptions(removeRemovedOptions(options));
|
|
2811
|
+
}
|
|
2812
|
+
});
|
|
2813
|
+
provider.channel?.on(STORY_PREPARED, function handler({ id, ...update }) {
|
|
2814
|
+
const { ref, sourceType } = getEventMetadata(this, fullAPI);
|
|
2815
|
+
api.updateStory(id, {
|
|
2816
|
+
...update,
|
|
2817
|
+
prepared: true
|
|
2818
|
+
}, ref);
|
|
2819
|
+
if (!ref) {
|
|
2820
|
+
if (!store.getState().hasCalledSetOptions) {
|
|
2821
|
+
const { options } = update.parameters;
|
|
2822
|
+
fullAPI.setOptions(removeRemovedOptions(options));
|
|
2823
|
+
store.setState({ hasCalledSetOptions: true });
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
if (sourceType === "local") {
|
|
2827
|
+
const { storyId, index, refId } = store.getState();
|
|
2828
|
+
if (!index) return;
|
|
2829
|
+
const toBePreloaded = Array.from(/* @__PURE__ */ new Set([api.findSiblingStoryId(storyId, index, 1, true), api.findSiblingStoryId(storyId, index, -1, true)])).filter(Boolean);
|
|
2830
|
+
provider.channel?.emit(PRELOAD_ENTRIES, {
|
|
2831
|
+
ids: toBePreloaded,
|
|
2832
|
+
options: { target: refId }
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
});
|
|
2836
|
+
provider.channel?.on(DOCS_PREPARED, function handler({ id, ...update }) {
|
|
2837
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2838
|
+
api.updateStory(id, {
|
|
2839
|
+
...update,
|
|
2840
|
+
prepared: true
|
|
2841
|
+
}, ref);
|
|
2842
|
+
});
|
|
2843
|
+
provider.channel?.on(SET_INDEX, function handler(index) {
|
|
2844
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2845
|
+
if (!ref) {
|
|
2846
|
+
api.setIndex(index);
|
|
2847
|
+
const options = api.getCurrentParameter("options");
|
|
2848
|
+
fullAPI.setOptions(removeRemovedOptions(options));
|
|
2849
|
+
} else fullAPI.setRef(ref.id, {
|
|
2850
|
+
...ref,
|
|
2851
|
+
storyIndex: index
|
|
2852
|
+
}, true);
|
|
2853
|
+
});
|
|
2854
|
+
provider.channel?.on(SET_STORIES, function handler(data) {
|
|
2855
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2856
|
+
const setStoriesData = data.v ? denormalizeStoryParameters(data) : data.stories;
|
|
2857
|
+
if (!ref) throw new Error("Cannot call SET_STORIES for local frame");
|
|
2858
|
+
else fullAPI.setRef(ref.id, {
|
|
2859
|
+
...ref,
|
|
2860
|
+
setStoriesData
|
|
2861
|
+
}, true);
|
|
2862
|
+
});
|
|
2863
|
+
provider.channel?.on(SELECT_STORY, function handler({ kind, title = kind, story, name = story, storyId, ...rest }) {
|
|
2864
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2865
|
+
if (!ref) fullAPI.selectStory(storyId || title, name, rest);
|
|
2866
|
+
else fullAPI.selectStory(storyId || title, name, {
|
|
2867
|
+
...rest,
|
|
2868
|
+
ref: ref.id
|
|
2869
|
+
});
|
|
2870
|
+
});
|
|
2871
|
+
provider.channel?.on(STORY_ARGS_UPDATED, function handleStoryArgsUpdated({ storyId, args }) {
|
|
2872
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2873
|
+
api.updateStory(storyId, { args }, ref);
|
|
2874
|
+
});
|
|
2875
|
+
provider.channel?.on(CONFIG_ERROR, function handleConfigError() {
|
|
2876
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2877
|
+
api.setPreviewInitialized(ref);
|
|
2878
|
+
});
|
|
2879
|
+
provider.channel?.on(STORY_MISSING, function handleStoryMissing(missingId) {
|
|
2880
|
+
const { ref } = getEventMetadata(this, fullAPI);
|
|
2881
|
+
api.setPreviewInitialized(ref);
|
|
2882
|
+
const { storyId, viewMode, index } = store.getState();
|
|
2883
|
+
if (!ref && missingId && storyId && storyId !== missingId && index?.[storyId] && (viewMode === "story" || viewMode === "docs")) provider.channel?.emit(SET_CURRENT_STORY, {
|
|
2884
|
+
storyId,
|
|
2885
|
+
viewMode
|
|
2886
|
+
});
|
|
2887
|
+
});
|
|
2888
|
+
};
|
|
2889
|
+
})))();
|
|
2890
|
+
}
|
|
2891
|
+
//#endregion
|
|
2560
2892
|
//#region src/manager-api/lib/filter-param.ts
|
|
2561
2893
|
var parseFilterParam;
|
|
2562
2894
|
function init_filter_param() {
|
|
@@ -2669,46 +3001,25 @@ function init_tags() {
|
|
|
2669
3001
|
})))();
|
|
2670
3002
|
}
|
|
2671
3003
|
//#endregion
|
|
2672
|
-
//#region src/manager-api/modules/stories.ts
|
|
2673
|
-
var
|
|
2674
|
-
function
|
|
2675
|
-
|
|
2676
|
-
const result = { ...options };
|
|
2677
|
-
removedOptions.forEach((option) => {
|
|
2678
|
-
if (option in result) delete result[option];
|
|
2679
|
-
});
|
|
2680
|
-
return result;
|
|
2681
|
-
}
|
|
2682
|
-
var fetch, STORY_INDEX_PATH, TAGS_FILTER, STATIC_FILTER, STATUS_FILTER, STATUS_CHANGE_REBUILD_THROTTLE, BUILT_IN_TAG_IDS, removedOptions, FILTER_KEYS, init$3;
|
|
2683
|
-
function init_stories$1() {
|
|
2684
|
-
return (init_stories$1 = __esmMin((() => {
|
|
3004
|
+
//#region src/manager-api/modules/stories-filters.ts
|
|
3005
|
+
var TAGS_FILTER, STATIC_FILTER, STATUS_FILTER, STATUS_CHANGE_REBUILD_THROTTLE, BUILT_IN_TAG_IDS, FILTER_KEYS, initFilters;
|
|
3006
|
+
function init_stories_filters() {
|
|
3007
|
+
return (init_stories_filters = __esmMin((() => {
|
|
2685
3008
|
init_client_logger();
|
|
2686
3009
|
init_core_events();
|
|
2687
|
-
init_csf_utils();
|
|
2688
3010
|
init_router();
|
|
2689
|
-
init_routes();
|
|
2690
|
-
init_dist$1();
|
|
2691
3011
|
init_throttle();
|
|
2692
3012
|
init_tags$1();
|
|
3013
|
+
init_global();
|
|
2693
3014
|
init_status_store();
|
|
2694
|
-
init_events();
|
|
2695
|
-
init_stories();
|
|
2696
|
-
init_url();
|
|
2697
3015
|
init_status();
|
|
2698
3016
|
init_statuses();
|
|
2699
3017
|
init_tags();
|
|
2700
|
-
({fetch} = scope);
|
|
2701
|
-
STORY_INDEX_PATH = "./index.json";
|
|
2702
3018
|
TAGS_FILTER = "tags-filter";
|
|
2703
3019
|
STATIC_FILTER = "static-filter";
|
|
2704
3020
|
STATUS_FILTER = "status-filter";
|
|
2705
3021
|
STATUS_CHANGE_REBUILD_THROTTLE = 500;
|
|
2706
3022
|
BUILT_IN_TAG_IDS = new Set(Object.keys(BUILT_IN_FILTERS));
|
|
2707
|
-
removedOptions = [
|
|
2708
|
-
"enableShortcuts",
|
|
2709
|
-
"theme",
|
|
2710
|
-
"showRoots"
|
|
2711
|
-
];
|
|
2712
3023
|
FILTER_KEYS = {
|
|
2713
3024
|
tag: {
|
|
2714
3025
|
included: "includedTagFilters",
|
|
@@ -2719,11 +3030,7 @@ function init_stories$1() {
|
|
|
2719
3030
|
excluded: "excludedStatusFilters"
|
|
2720
3031
|
}
|
|
2721
3032
|
};
|
|
2722
|
-
|
|
2723
|
-
const navigateWithQueryParams = (path, options) => {
|
|
2724
|
-
const { customQueryParams } = store.getState();
|
|
2725
|
-
navigate(buildNavigationUrl(path, customQueryParams ?? {}), options);
|
|
2726
|
-
};
|
|
3033
|
+
initFilters = ({ store, provider, fullAPI, location, setIndex }) => {
|
|
2727
3034
|
const persistFilters = (inputPatch) => {
|
|
2728
3035
|
return store.setState(inputPatch, {
|
|
2729
3036
|
persistence: "url",
|
|
@@ -2737,7 +3044,6 @@ function init_stories$1() {
|
|
|
2737
3044
|
}
|
|
2738
3045
|
});
|
|
2739
3046
|
};
|
|
2740
|
-
let urlFilterTelemetryEmitted = false;
|
|
2741
3047
|
const addFilters = async (type, items, excluded) => {
|
|
2742
3048
|
const { included, excluded: excludedKey } = FILTER_KEYS[type];
|
|
2743
3049
|
const state = store.getState();
|
|
@@ -2793,6 +3099,251 @@ function init_stories$1() {
|
|
|
2793
3099
|
});
|
|
2794
3100
|
};
|
|
2795
3101
|
const api = {
|
|
3102
|
+
setFilter: async (id, filterFunction) => {
|
|
3103
|
+
await api.setFilters({ [id]: filterFunction });
|
|
3104
|
+
},
|
|
3105
|
+
setFilters: async (filters) => {
|
|
3106
|
+
await store.setState((state) => ({ filters: {
|
|
3107
|
+
...state.filters,
|
|
3108
|
+
...filters
|
|
3109
|
+
} }));
|
|
3110
|
+
if (!await applyCurrentFilters()) return;
|
|
3111
|
+
for (const id of Object.keys(filters)) provider.channel?.emit(SET_FILTER, { id });
|
|
3112
|
+
},
|
|
3113
|
+
resetTagFilters: async () => {
|
|
3114
|
+
await persistFilters((s) => ({
|
|
3115
|
+
includedTagFilters: s.defaultIncludedTagFilters,
|
|
3116
|
+
excludedTagFilters: s.defaultExcludedTagFilters
|
|
3117
|
+
}));
|
|
3118
|
+
await recomputeTagsFilter();
|
|
3119
|
+
},
|
|
3120
|
+
setAllTagFilters: async (included, excluded) => {
|
|
3121
|
+
await persistFilters({
|
|
3122
|
+
includedTagFilters: included,
|
|
3123
|
+
excludedTagFilters: excluded
|
|
3124
|
+
});
|
|
3125
|
+
await recomputeTagsFilter();
|
|
3126
|
+
},
|
|
3127
|
+
addTagFilters: async (tags, excluded) => {
|
|
3128
|
+
await addFilters("tag", tags, excluded);
|
|
3129
|
+
await recomputeTagsFilter();
|
|
3130
|
+
if (tags.length === 1 && BUILT_IN_TAG_IDS.has(tags[0])) emitFilterTelemetry("interaction", {
|
|
3131
|
+
filterType: "tag",
|
|
3132
|
+
filterId: tags[0],
|
|
3133
|
+
action: excluded ? "exclude" : "include"
|
|
3134
|
+
});
|
|
3135
|
+
},
|
|
3136
|
+
removeTagFilters: async (tags) => {
|
|
3137
|
+
await removeFilters("tag", tags);
|
|
3138
|
+
await recomputeTagsFilter();
|
|
3139
|
+
if (tags.length === 1 && BUILT_IN_TAG_IDS.has(tags[0])) emitFilterTelemetry("interaction", {
|
|
3140
|
+
filterType: "tag",
|
|
3141
|
+
filterId: tags[0],
|
|
3142
|
+
action: "remove"
|
|
3143
|
+
});
|
|
3144
|
+
},
|
|
3145
|
+
resetStatusFilters: async () => {
|
|
3146
|
+
await persistFilters({
|
|
3147
|
+
includedStatusFilters: [],
|
|
3148
|
+
excludedStatusFilters: []
|
|
3149
|
+
});
|
|
3150
|
+
await recomputeStatusFilter();
|
|
3151
|
+
},
|
|
3152
|
+
setAllStatusFilters: async (included, excluded) => {
|
|
3153
|
+
const prevState = store.getState();
|
|
3154
|
+
const prevIncluded = new Set(prevState.includedStatusFilters ?? []);
|
|
3155
|
+
const prevExcluded = new Set(prevState.excludedStatusFilters ?? []);
|
|
3156
|
+
const nextIncluded = new Set(included);
|
|
3157
|
+
const nextExcluded = new Set(excluded);
|
|
3158
|
+
await persistFilters({
|
|
3159
|
+
includedStatusFilters: included,
|
|
3160
|
+
excludedStatusFilters: excluded
|
|
3161
|
+
});
|
|
3162
|
+
await recomputeStatusFilter();
|
|
3163
|
+
const changedIds = /* @__PURE__ */ new Set([
|
|
3164
|
+
...prevIncluded,
|
|
3165
|
+
...prevExcluded,
|
|
3166
|
+
...nextIncluded,
|
|
3167
|
+
...nextExcluded
|
|
3168
|
+
]);
|
|
3169
|
+
for (const id of changedIds) {
|
|
3170
|
+
const wasIncluded = prevIncluded.has(id);
|
|
3171
|
+
const wasExcluded = prevExcluded.has(id);
|
|
3172
|
+
const isIncluded = nextIncluded.has(id);
|
|
3173
|
+
const isExcluded = nextExcluded.has(id);
|
|
3174
|
+
if (wasIncluded === isIncluded && wasExcluded === isExcluded) continue;
|
|
3175
|
+
let action;
|
|
3176
|
+
if (isIncluded) action = "include";
|
|
3177
|
+
else if (isExcluded) action = "exclude";
|
|
3178
|
+
else action = "remove";
|
|
3179
|
+
emitFilterTelemetry("interaction", {
|
|
3180
|
+
filterType: "status",
|
|
3181
|
+
filterId: id,
|
|
3182
|
+
action
|
|
3183
|
+
});
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3186
|
+
addStatusFilters: async (statuses, excluded) => {
|
|
3187
|
+
await addFilters("status", statuses, excluded);
|
|
3188
|
+
await recomputeStatusFilter();
|
|
3189
|
+
if (statuses.length === 1) emitFilterTelemetry("interaction", {
|
|
3190
|
+
filterType: "status",
|
|
3191
|
+
filterId: statuses[0],
|
|
3192
|
+
action: excluded ? "exclude" : "include"
|
|
3193
|
+
});
|
|
3194
|
+
},
|
|
3195
|
+
removeStatusFilters: async (statuses) => {
|
|
3196
|
+
await removeFilters("status", statuses);
|
|
3197
|
+
await recomputeStatusFilter();
|
|
3198
|
+
if (statuses.length === 1) emitFilterTelemetry("interaction", {
|
|
3199
|
+
filterType: "status",
|
|
3200
|
+
filterId: statuses[0],
|
|
3201
|
+
action: "remove"
|
|
3202
|
+
});
|
|
3203
|
+
}
|
|
3204
|
+
};
|
|
3205
|
+
const applyCurrentFilters = async () => {
|
|
3206
|
+
const { internal_index: index } = store.getState();
|
|
3207
|
+
if (!index) return false;
|
|
3208
|
+
await setIndex(index);
|
|
3209
|
+
const refs = await fullAPI.getRefs();
|
|
3210
|
+
for (const [refId, { internal_index, ...ref }] of Object.entries(refs)) await fullAPI.setRef(refId, {
|
|
3211
|
+
...ref,
|
|
3212
|
+
storyIndex: internal_index
|
|
3213
|
+
}, true);
|
|
3214
|
+
return true;
|
|
3215
|
+
};
|
|
3216
|
+
let statusFilterRebuildQueued = false;
|
|
3217
|
+
let statusFilterRebuildInFlight = false;
|
|
3218
|
+
const flushStatusFilterRebuild = async () => {
|
|
3219
|
+
if (statusFilterRebuildInFlight) return;
|
|
3220
|
+
statusFilterRebuildInFlight = true;
|
|
3221
|
+
try {
|
|
3222
|
+
while (statusFilterRebuildQueued) {
|
|
3223
|
+
statusFilterRebuildQueued = false;
|
|
3224
|
+
try {
|
|
3225
|
+
await applyCurrentFilters();
|
|
3226
|
+
} catch (error) {
|
|
3227
|
+
logger.warn("Failed to rebuild story index after status change:", error);
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
} finally {
|
|
3231
|
+
statusFilterRebuildInFlight = false;
|
|
3232
|
+
if (statusFilterRebuildQueued) flushStatusFilterRebuild();
|
|
3233
|
+
}
|
|
3234
|
+
};
|
|
3235
|
+
const requestStatusFilterRebuild = () => {
|
|
3236
|
+
statusFilterRebuildQueued = true;
|
|
3237
|
+
flushStatusFilterRebuild();
|
|
3238
|
+
};
|
|
3239
|
+
const recomputeTagsFilter = () => {
|
|
3240
|
+
const { includedTagFilters, excludedTagFilters } = store.getState();
|
|
3241
|
+
return api.setFilters({ [TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters) });
|
|
3242
|
+
};
|
|
3243
|
+
const recomputeStatusFilter = () => {
|
|
3244
|
+
const { includedStatusFilters, excludedStatusFilters } = store.getState();
|
|
3245
|
+
return api.setFilters({ [STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters ?? [], excludedStatusFilters ?? []) });
|
|
3246
|
+
};
|
|
3247
|
+
provider.channel?.on(SET_CONFIG, async () => {
|
|
3248
|
+
const { includedTagFilters, excludedTagFilters, includedStatusFilters, excludedStatusFilters, tagPresets } = store.getState();
|
|
3249
|
+
await api.setFilters({
|
|
3250
|
+
[STATIC_FILTER]: computeStaticFilterFn(tagPresets),
|
|
3251
|
+
[TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters),
|
|
3252
|
+
[STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters, excludedStatusFilters)
|
|
3253
|
+
});
|
|
3254
|
+
});
|
|
3255
|
+
fullStatusStore.onAllStatusChange(throttle(requestStatusFilterRebuild, STATUS_CHANGE_REBUILD_THROTTLE, { edges: ["leading", "trailing"] }));
|
|
3256
|
+
const tagPresets = global.TAGS_OPTIONS || {};
|
|
3257
|
+
const defaultTags = getDefaultTagsFromPreset(tagPresets);
|
|
3258
|
+
const { tags, statuses } = queryFromLocation(location ?? { search: "" });
|
|
3259
|
+
const parsedTags = parseTagsParam(tags);
|
|
3260
|
+
const hasTagsParam = tags !== void 0;
|
|
3261
|
+
const initialIncluded = hasTagsParam ? parsedTags.included : defaultTags.included;
|
|
3262
|
+
const initialExcluded = hasTagsParam ? parsedTags.excluded : defaultTags.excluded;
|
|
3263
|
+
const parsedStatuses = parseStatusesParam(statuses);
|
|
3264
|
+
const initialIncludedStatuses = parsedStatuses.included;
|
|
3265
|
+
const initialExcludedStatuses = parsedStatuses.excluded;
|
|
3266
|
+
const state = {
|
|
3267
|
+
filters: {
|
|
3268
|
+
[STATIC_FILTER]: computeStaticFilterFn(tagPresets),
|
|
3269
|
+
[TAGS_FILTER]: computeTagsFilterFn(initialIncluded, initialExcluded),
|
|
3270
|
+
[STATUS_FILTER]: computeStatusFilterFn(initialIncludedStatuses, initialExcludedStatuses)
|
|
3271
|
+
},
|
|
3272
|
+
tagPresets,
|
|
3273
|
+
defaultIncludedTagFilters: defaultTags.included,
|
|
3274
|
+
defaultExcludedTagFilters: defaultTags.excluded,
|
|
3275
|
+
includedTagFilters: initialIncluded,
|
|
3276
|
+
excludedTagFilters: initialExcluded,
|
|
3277
|
+
includedStatusFilters: initialIncludedStatuses,
|
|
3278
|
+
excludedStatusFilters: initialExcludedStatuses
|
|
3279
|
+
};
|
|
3280
|
+
let urlFilterTelemetryEmitted = false;
|
|
3281
|
+
/** Sends one telemetry event when the first URL already has built-in tag or status filters. */
|
|
3282
|
+
const emitUrlFilterTelemetry = () => {
|
|
3283
|
+
if (urlFilterTelemetryEmitted) return;
|
|
3284
|
+
urlFilterTelemetryEmitted = true;
|
|
3285
|
+
const hasBuiltInTagFilters = initialIncluded.some((id) => BUILT_IN_TAG_IDS.has(id)) || initialExcluded.some((id) => BUILT_IN_TAG_IDS.has(id));
|
|
3286
|
+
const hasStatusFilters = initialIncludedStatuses.length > 0 || initialExcludedStatuses.length > 0;
|
|
3287
|
+
if (hasBuiltInTagFilters || hasStatusFilters) emitFilterTelemetry("url");
|
|
3288
|
+
};
|
|
3289
|
+
return {
|
|
3290
|
+
api,
|
|
3291
|
+
state,
|
|
3292
|
+
emitUrlFilterTelemetry
|
|
3293
|
+
};
|
|
3294
|
+
};
|
|
3295
|
+
})))();
|
|
3296
|
+
}
|
|
3297
|
+
//#endregion
|
|
3298
|
+
//#region src/manager-api/modules/stories.ts
|
|
3299
|
+
var stories_exports = /* @__PURE__ */ __exportAll({ init: () => init$3 });
|
|
3300
|
+
var fetch, STORY_INDEX_PATH, applyUpdate, init$3;
|
|
3301
|
+
function init_stories$1() {
|
|
3302
|
+
return (init_stories$1 = __esmMin((() => {
|
|
3303
|
+
init_client_logger();
|
|
3304
|
+
init_core_events();
|
|
3305
|
+
init_csf_utils();
|
|
3306
|
+
init_router();
|
|
3307
|
+
init_global();
|
|
3308
|
+
init_stories();
|
|
3309
|
+
init_url();
|
|
3310
|
+
init_status();
|
|
3311
|
+
init_stories_events();
|
|
3312
|
+
init_stories_filters();
|
|
3313
|
+
({fetch} = global);
|
|
3314
|
+
STORY_INDEX_PATH = "./index.json";
|
|
3315
|
+
applyUpdate = (indexes, id, update) => {
|
|
3316
|
+
for (const index of indexes) if (index?.[id]) index[id] = {
|
|
3317
|
+
...index[id],
|
|
3318
|
+
...update
|
|
3319
|
+
};
|
|
3320
|
+
};
|
|
3321
|
+
init$3 = ({ fullAPI, store, navigate, provider, state: { location } = {}, storyId: initialStoryId, viewMode: initialViewMode, docsOptions = {} }) => {
|
|
3322
|
+
const navigateWithQueryParams = (path, options) => {
|
|
3323
|
+
const { customQueryParams } = store.getState();
|
|
3324
|
+
navigate(buildNavigationUrl(path, customQueryParams ?? {}), options);
|
|
3325
|
+
};
|
|
3326
|
+
/**
|
|
3327
|
+
* Before the index loads, the manager guesses the story from the URL path. When the index loads,
|
|
3328
|
+
* read the URL again, and show the tree URL path for the story.
|
|
3329
|
+
*/
|
|
3330
|
+
const canonicaliseUrl = () => {
|
|
3331
|
+
const { location: currentLocation, path, customQueryParams } = store.getState();
|
|
3332
|
+
const pathname = currentLocation?.pathname;
|
|
3333
|
+
if (!pathname || queryFromLocation(currentLocation).path) return;
|
|
3334
|
+
const resolved = fromUrlPath(pathname);
|
|
3335
|
+
if (resolved === "/" || resolved === path && toUrlPath(resolved) === pathname) return;
|
|
3336
|
+
navigate(buildNavigationUrl(`${resolved}${currentLocation.hash ?? ""}`, customQueryParams ?? {}), { replace: true });
|
|
3337
|
+
};
|
|
3338
|
+
const filters = initFilters({
|
|
3339
|
+
store,
|
|
3340
|
+
provider,
|
|
3341
|
+
fullAPI,
|
|
3342
|
+
location,
|
|
3343
|
+
setIndex: (index) => api.setIndex(index)
|
|
3344
|
+
});
|
|
3345
|
+
const api = {
|
|
3346
|
+
...filters.api,
|
|
2796
3347
|
storyId: toId,
|
|
2797
3348
|
getData: (storyId, refId) => {
|
|
2798
3349
|
const result = api.resolveStory(storyId, refId);
|
|
@@ -2939,427 +3490,107 @@ function init_stories$1() {
|
|
|
2939
3490
|
const lookupList = getStoriesLookupList(index);
|
|
2940
3491
|
const position = lookupList.indexOf(storyId);
|
|
2941
3492
|
if (position === lookupList.length - 1 && direction > 0) return;
|
|
2942
|
-
if (position === 0 && direction < 0) return;
|
|
2943
|
-
return lookupList[position + direction];
|
|
2944
|
-
},
|
|
2945
|
-
updateStoryArgs: (story, updatedArgs) => {
|
|
2946
|
-
const { id: storyId, refId } = story;
|
|
2947
|
-
provider.channel?.emit(UPDATE_STORY_ARGS, {
|
|
2948
|
-
storyId,
|
|
2949
|
-
updatedArgs,
|
|
2950
|
-
options: { target: refId }
|
|
2951
|
-
});
|
|
2952
|
-
},
|
|
2953
|
-
resetStoryArgs: (story, argNames) => {
|
|
2954
|
-
const { id: storyId, refId } = story;
|
|
2955
|
-
provider.channel?.emit(RESET_STORY_ARGS, {
|
|
2956
|
-
storyId,
|
|
2957
|
-
argNames,
|
|
2958
|
-
options: { target: refId }
|
|
2959
|
-
});
|
|
2960
|
-
},
|
|
2961
|
-
fetchIndex: async () => {
|
|
2962
|
-
try {
|
|
2963
|
-
const result = await fetch(STORY_INDEX_PATH);
|
|
2964
|
-
if (result.status !== 200) throw new Error(await result.text());
|
|
2965
|
-
const storyIndex = await result.json();
|
|
2966
|
-
if (storyIndex.v < 3) {
|
|
2967
|
-
logger.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`);
|
|
2968
|
-
return;
|
|
2969
|
-
}
|
|
2970
|
-
await api.setIndex(storyIndex);
|
|
2971
|
-
} catch (err) {
|
|
2972
|
-
await store.setState({ indexError: err });
|
|
2973
|
-
}
|
|
2974
|
-
},
|
|
2975
|
-
setIndex: async (input) => {
|
|
2976
|
-
const { filteredIndex: oldFilteredHash, index: oldHash, filters } = store.getState();
|
|
2977
|
-
const allStatuses = fullStatusStore.getAll();
|
|
2978
|
-
const newFilteredHash = transformStoryIndexToStoriesHash(input, {
|
|
2979
|
-
provider,
|
|
2980
|
-
docsOptions,
|
|
2981
|
-
filters,
|
|
2982
|
-
allStatuses,
|
|
2983
|
-
statusFilterKey: STATUS_FILTER
|
|
2984
|
-
});
|
|
2985
|
-
const newHash = transformStoryIndexToStoriesHash(input, {
|
|
2986
|
-
provider,
|
|
2987
|
-
docsOptions,
|
|
2988
|
-
filters: {},
|
|
2989
|
-
allStatuses
|
|
2990
|
-
});
|
|
2991
|
-
await store.setState({
|
|
2992
|
-
internal_index: input,
|
|
2993
|
-
filteredIndex: addPreparedStories(newFilteredHash, oldFilteredHash),
|
|
2994
|
-
index: addPreparedStories(newHash, oldHash),
|
|
2995
|
-
indexError: void 0
|
|
2996
|
-
});
|
|
2997
|
-
},
|
|
2998
|
-
updateStory: async (storyId, update, ref) => {
|
|
2999
|
-
if (!ref) {
|
|
3000
|
-
const { index, filteredIndex } = store.getState();
|
|
3001
|
-
if (index && index[storyId]) index[storyId] = {
|
|
3002
|
-
...index[storyId],
|
|
3003
|
-
...update
|
|
3004
|
-
};
|
|
3005
|
-
if (filteredIndex && filteredIndex[storyId]) filteredIndex[storyId] = {
|
|
3006
|
-
...filteredIndex[storyId],
|
|
3007
|
-
...update
|
|
3008
|
-
};
|
|
3009
|
-
if (index || filteredIndex) await store.setState({
|
|
3010
|
-
index,
|
|
3011
|
-
filteredIndex
|
|
3012
|
-
});
|
|
3013
|
-
} else {
|
|
3014
|
-
const { id: refId, index, filteredIndex } = ref;
|
|
3015
|
-
const storyUpdates = {
|
|
3016
|
-
...ref.storyUpdates,
|
|
3017
|
-
[storyId]: {
|
|
3018
|
-
...ref.storyUpdates?.[storyId],
|
|
3019
|
-
...update
|
|
3020
|
-
}
|
|
3021
|
-
};
|
|
3022
|
-
if (index && index[storyId]) index[storyId] = {
|
|
3023
|
-
...index[storyId],
|
|
3024
|
-
...update
|
|
3025
|
-
};
|
|
3026
|
-
if (filteredIndex && filteredIndex[storyId]) filteredIndex[storyId] = {
|
|
3027
|
-
...filteredIndex[storyId],
|
|
3028
|
-
...update
|
|
3029
|
-
};
|
|
3030
|
-
await fullAPI.updateRef(refId, {
|
|
3031
|
-
index,
|
|
3032
|
-
filteredIndex,
|
|
3033
|
-
storyUpdates
|
|
3034
|
-
});
|
|
3035
|
-
}
|
|
3036
|
-
},
|
|
3037
|
-
updateDocs: async (docsId, update, ref) => {
|
|
3038
|
-
if (!ref) {
|
|
3039
|
-
const { index, filteredIndex } = store.getState();
|
|
3040
|
-
if (index) index[docsId] = {
|
|
3041
|
-
...index[docsId],
|
|
3042
|
-
...update
|
|
3043
|
-
};
|
|
3044
|
-
if (filteredIndex) filteredIndex[docsId] = {
|
|
3045
|
-
...filteredIndex[docsId],
|
|
3046
|
-
...update
|
|
3047
|
-
};
|
|
3048
|
-
if (index || filteredIndex) await store.setState({
|
|
3049
|
-
index,
|
|
3050
|
-
filteredIndex
|
|
3051
|
-
});
|
|
3052
|
-
} else {
|
|
3053
|
-
const { id: refId, index, filteredIndex } = ref;
|
|
3054
|
-
const storyUpdates = {
|
|
3055
|
-
...ref.storyUpdates,
|
|
3056
|
-
[docsId]: {
|
|
3057
|
-
...ref.storyUpdates?.[docsId],
|
|
3058
|
-
...update
|
|
3059
|
-
}
|
|
3060
|
-
};
|
|
3061
|
-
if (index && index[docsId]) index[docsId] = {
|
|
3062
|
-
...index[docsId],
|
|
3063
|
-
...update
|
|
3064
|
-
};
|
|
3065
|
-
if (filteredIndex && filteredIndex[docsId]) filteredIndex[docsId] = {
|
|
3066
|
-
...filteredIndex[docsId],
|
|
3067
|
-
...update
|
|
3068
|
-
};
|
|
3069
|
-
await fullAPI.updateRef(refId, {
|
|
3070
|
-
index,
|
|
3071
|
-
filteredIndex,
|
|
3072
|
-
storyUpdates
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
},
|
|
3076
|
-
setPreviewInitialized: async (ref) => {
|
|
3077
|
-
if (!ref) store.setState({ previewInitialized: true });
|
|
3078
|
-
else fullAPI.updateRef(ref.id, { previewInitialized: true });
|
|
3079
|
-
},
|
|
3080
|
-
setFilter: async (id, filterFunction) => {
|
|
3081
|
-
await api.setFilters({ [id]: filterFunction });
|
|
3082
|
-
},
|
|
3083
|
-
setFilters: async (filters) => {
|
|
3084
|
-
await store.setState((state) => ({ filters: {
|
|
3085
|
-
...state.filters,
|
|
3086
|
-
...filters
|
|
3087
|
-
} }));
|
|
3088
|
-
if (!await applyCurrentFilters()) return;
|
|
3089
|
-
for (const id of Object.keys(filters)) provider.channel?.emit(SET_FILTER, { id });
|
|
3090
|
-
},
|
|
3091
|
-
resetTagFilters: async () => {
|
|
3092
|
-
await persistFilters((s) => ({
|
|
3093
|
-
includedTagFilters: s.defaultIncludedTagFilters,
|
|
3094
|
-
excludedTagFilters: s.defaultExcludedTagFilters
|
|
3095
|
-
}));
|
|
3096
|
-
await recomputeTagsFilter();
|
|
3097
|
-
},
|
|
3098
|
-
setAllTagFilters: async (included, excluded) => {
|
|
3099
|
-
await persistFilters({
|
|
3100
|
-
includedTagFilters: included,
|
|
3101
|
-
excludedTagFilters: excluded
|
|
3102
|
-
});
|
|
3103
|
-
await recomputeTagsFilter();
|
|
3104
|
-
},
|
|
3105
|
-
addTagFilters: async (tags, excluded) => {
|
|
3106
|
-
await addFilters("tag", tags, excluded);
|
|
3107
|
-
await recomputeTagsFilter();
|
|
3108
|
-
if (tags.length === 1 && BUILT_IN_TAG_IDS.has(tags[0])) emitFilterTelemetry("interaction", {
|
|
3109
|
-
filterType: "tag",
|
|
3110
|
-
filterId: tags[0],
|
|
3111
|
-
action: excluded ? "exclude" : "include"
|
|
3112
|
-
});
|
|
3113
|
-
},
|
|
3114
|
-
removeTagFilters: async (tags) => {
|
|
3115
|
-
await removeFilters("tag", tags);
|
|
3116
|
-
await recomputeTagsFilter();
|
|
3117
|
-
if (tags.length === 1 && BUILT_IN_TAG_IDS.has(tags[0])) emitFilterTelemetry("interaction", {
|
|
3118
|
-
filterType: "tag",
|
|
3119
|
-
filterId: tags[0],
|
|
3120
|
-
action: "remove"
|
|
3121
|
-
});
|
|
3122
|
-
},
|
|
3123
|
-
resetStatusFilters: async () => {
|
|
3124
|
-
await persistFilters({
|
|
3125
|
-
includedStatusFilters: [],
|
|
3126
|
-
excludedStatusFilters: []
|
|
3127
|
-
});
|
|
3128
|
-
await recomputeStatusFilter();
|
|
3129
|
-
},
|
|
3130
|
-
setAllStatusFilters: async (included, excluded) => {
|
|
3131
|
-
const prevState = store.getState();
|
|
3132
|
-
const prevIncluded = new Set(prevState.includedStatusFilters ?? []);
|
|
3133
|
-
const prevExcluded = new Set(prevState.excludedStatusFilters ?? []);
|
|
3134
|
-
const nextIncluded = new Set(included);
|
|
3135
|
-
const nextExcluded = new Set(excluded);
|
|
3136
|
-
await persistFilters({
|
|
3137
|
-
includedStatusFilters: included,
|
|
3138
|
-
excludedStatusFilters: excluded
|
|
3139
|
-
});
|
|
3140
|
-
await recomputeStatusFilter();
|
|
3141
|
-
const changedIds = /* @__PURE__ */ new Set([
|
|
3142
|
-
...prevIncluded,
|
|
3143
|
-
...prevExcluded,
|
|
3144
|
-
...nextIncluded,
|
|
3145
|
-
...nextExcluded
|
|
3146
|
-
]);
|
|
3147
|
-
for (const id of changedIds) {
|
|
3148
|
-
const wasIncluded = prevIncluded.has(id);
|
|
3149
|
-
const wasExcluded = prevExcluded.has(id);
|
|
3150
|
-
const isIncluded = nextIncluded.has(id);
|
|
3151
|
-
const isExcluded = nextExcluded.has(id);
|
|
3152
|
-
if (wasIncluded === isIncluded && wasExcluded === isExcluded) continue;
|
|
3153
|
-
let action;
|
|
3154
|
-
if (isIncluded) action = "include";
|
|
3155
|
-
else if (isExcluded) action = "exclude";
|
|
3156
|
-
else action = "remove";
|
|
3157
|
-
emitFilterTelemetry("interaction", {
|
|
3158
|
-
filterType: "status",
|
|
3159
|
-
filterId: id,
|
|
3160
|
-
action
|
|
3161
|
-
});
|
|
3162
|
-
}
|
|
3493
|
+
if (position === 0 && direction < 0) return;
|
|
3494
|
+
return lookupList[position + direction];
|
|
3163
3495
|
},
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
action: excluded ? "exclude" : "include"
|
|
3496
|
+
updateStoryArgs: (story, updatedArgs) => {
|
|
3497
|
+
const { id: storyId, refId } = story;
|
|
3498
|
+
provider.channel?.emit(UPDATE_STORY_ARGS, {
|
|
3499
|
+
storyId,
|
|
3500
|
+
updatedArgs,
|
|
3501
|
+
options: { target: refId }
|
|
3171
3502
|
});
|
|
3172
3503
|
},
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
action: "remove"
|
|
3504
|
+
resetStoryArgs: (story, argNames) => {
|
|
3505
|
+
const { id: storyId, refId } = story;
|
|
3506
|
+
provider.channel?.emit(RESET_STORY_ARGS, {
|
|
3507
|
+
storyId,
|
|
3508
|
+
argNames,
|
|
3509
|
+
options: { target: refId }
|
|
3180
3510
|
});
|
|
3181
|
-
}
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
storyIndex: internal_index
|
|
3191
|
-
}, true);
|
|
3192
|
-
return true;
|
|
3193
|
-
};
|
|
3194
|
-
let statusFilterRebuildQueued = false;
|
|
3195
|
-
let statusFilterRebuildInFlight = false;
|
|
3196
|
-
const flushStatusFilterRebuild = async () => {
|
|
3197
|
-
if (statusFilterRebuildInFlight) return;
|
|
3198
|
-
statusFilterRebuildInFlight = true;
|
|
3199
|
-
try {
|
|
3200
|
-
while (statusFilterRebuildQueued) {
|
|
3201
|
-
statusFilterRebuildQueued = false;
|
|
3202
|
-
try {
|
|
3203
|
-
await applyCurrentFilters();
|
|
3204
|
-
} catch (error) {
|
|
3205
|
-
logger.warn("Failed to rebuild story index after status change:", error);
|
|
3511
|
+
},
|
|
3512
|
+
fetchIndex: async () => {
|
|
3513
|
+
try {
|
|
3514
|
+
const result = await fetch(STORY_INDEX_PATH);
|
|
3515
|
+
if (result.status !== 200) throw new Error(await result.text());
|
|
3516
|
+
const storyIndex = await result.json();
|
|
3517
|
+
if (storyIndex.v < 3) {
|
|
3518
|
+
logger.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`);
|
|
3519
|
+
return;
|
|
3206
3520
|
}
|
|
3521
|
+
await api.setIndex(storyIndex);
|
|
3522
|
+
} catch (err) {
|
|
3523
|
+
await store.setState({ indexError: err });
|
|
3207
3524
|
}
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
|
|
3525
|
+
},
|
|
3526
|
+
setIndex: async (input) => {
|
|
3527
|
+
const { filteredIndex: oldFilteredHash, index: oldHash, filters } = store.getState();
|
|
3528
|
+
const allStatuses = fullStatusStore.getAll();
|
|
3529
|
+
const newFilteredHash = transformStoryIndexToStoriesHash(input, {
|
|
3530
|
+
provider,
|
|
3531
|
+
docsOptions,
|
|
3532
|
+
filters,
|
|
3533
|
+
allStatuses,
|
|
3534
|
+
statusFilterKey: STATUS_FILTER
|
|
3535
|
+
});
|
|
3536
|
+
const newHash = transformStoryIndexToStoriesHash(input, {
|
|
3537
|
+
provider,
|
|
3538
|
+
docsOptions,
|
|
3539
|
+
filters: {},
|
|
3540
|
+
allStatuses
|
|
3541
|
+
});
|
|
3542
|
+
setStoryPathEntries(Object.values(input.entries));
|
|
3543
|
+
await store.setState({
|
|
3544
|
+
internal_index: input,
|
|
3545
|
+
filteredIndex: addPreparedStories(newFilteredHash, oldFilteredHash),
|
|
3546
|
+
index: addPreparedStories(newHash, oldHash),
|
|
3547
|
+
indexError: void 0
|
|
3548
|
+
});
|
|
3549
|
+
canonicaliseUrl();
|
|
3550
|
+
},
|
|
3551
|
+
updateStory: async (storyId, update, ref) => {
|
|
3552
|
+
await applyEntryUpdate(storyId, update, ref);
|
|
3553
|
+
},
|
|
3554
|
+
updateDocs: async (docsId, update, ref) => {
|
|
3555
|
+
await applyEntryUpdate(docsId, update, ref);
|
|
3556
|
+
},
|
|
3557
|
+
setPreviewInitialized: async (ref) => {
|
|
3558
|
+
if (!ref) store.setState({ previewInitialized: true });
|
|
3559
|
+
else fullAPI.updateRef(ref.id, { previewInitialized: true });
|
|
3211
3560
|
}
|
|
3212
3561
|
};
|
|
3213
|
-
const
|
|
3214
|
-
statusFilterRebuildQueued = true;
|
|
3215
|
-
flushStatusFilterRebuild();
|
|
3216
|
-
};
|
|
3217
|
-
const recomputeTagsFilter = () => {
|
|
3218
|
-
const { includedTagFilters, excludedTagFilters } = store.getState();
|
|
3219
|
-
return api.setFilters({ [TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters) });
|
|
3220
|
-
};
|
|
3221
|
-
const recomputeStatusFilter = () => {
|
|
3222
|
-
const { includedStatusFilters, excludedStatusFilters } = store.getState();
|
|
3223
|
-
return api.setFilters({ [STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters ?? [], excludedStatusFilters ?? []) });
|
|
3224
|
-
};
|
|
3225
|
-
provider.channel?.on(STORY_SPECIFIED, function handler({ storyId, viewMode }) {
|
|
3226
|
-
const { sourceType } = getEventMetadata(this, fullAPI);
|
|
3227
|
-
if (sourceType === "local") {
|
|
3228
|
-
const state = store.getState();
|
|
3229
|
-
const isCanvasRoute = !isReviewManagerRoute(state.path, state.customQueryParams) && (state.path === "/" || state.viewMode === "story" || state.viewMode === "docs");
|
|
3230
|
-
const stateHasSelection = state.viewMode && state.storyId;
|
|
3231
|
-
const stateSelectionDifferent = state.viewMode !== viewMode || state.storyId !== storyId;
|
|
3232
|
-
const { type } = state.index?.[state.storyId] || {};
|
|
3233
|
-
const isStory = !(type === "root" || type === "component" || type === "group");
|
|
3234
|
-
/**
|
|
3235
|
-
* When storybook starts, we want to navigate to the first story. But there are a few
|
|
3236
|
-
* exceptions:
|
|
3237
|
-
*
|
|
3238
|
-
* - If the current storyId and viewMode are already set/correct AND the url section is a
|
|
3239
|
-
* leaf-type.
|
|
3240
|
-
* - If the user has navigated away already.
|
|
3241
|
-
* - If the user started storybook with a specific page-URL like "/settings/about"
|
|
3242
|
-
*/
|
|
3243
|
-
if (isCanvasRoute) {
|
|
3244
|
-
const { filteredIndex } = state;
|
|
3245
|
-
if (filteredIndex && !stateHasSelection) {
|
|
3246
|
-
if (!(filteredIndex[storyId]?.type === "story")) {
|
|
3247
|
-
const firstFiltered = filteredIndex ? Object.keys(filteredIndex).find((id) => {
|
|
3248
|
-
const entry = filteredIndex[id];
|
|
3249
|
-
return entry.type === "story" || entry.type === "docs";
|
|
3250
|
-
}) : void 0;
|
|
3251
|
-
if (firstFiltered) navigateWithQueryParams(`/${viewMode}/${firstFiltered}`);
|
|
3252
|
-
return;
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
if (stateHasSelection && stateSelectionDifferent && isStory) provider.channel?.emit(SET_CURRENT_STORY, {
|
|
3256
|
-
storyId: state.storyId,
|
|
3257
|
-
viewMode: state.viewMode
|
|
3258
|
-
});
|
|
3259
|
-
else if (stateSelectionDifferent) navigateWithQueryParams(`/${viewMode}/${storyId}`);
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
});
|
|
3263
|
-
provider.channel?.on(CURRENT_STORY_WAS_SET, function handler() {
|
|
3264
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3265
|
-
api.setPreviewInitialized(ref);
|
|
3266
|
-
});
|
|
3267
|
-
provider.channel?.on(STORY_CHANGED, function handler() {
|
|
3268
|
-
const { sourceType } = getEventMetadata(this, fullAPI);
|
|
3269
|
-
if (sourceType === "local") {
|
|
3270
|
-
const options = api.getCurrentParameter("options");
|
|
3271
|
-
if (options) fullAPI.setOptions(removeRemovedOptions(options));
|
|
3272
|
-
}
|
|
3273
|
-
});
|
|
3274
|
-
provider.channel?.on(STORY_PREPARED, function handler({ id, ...update }) {
|
|
3275
|
-
const { ref, sourceType } = getEventMetadata(this, fullAPI);
|
|
3276
|
-
api.updateStory(id, {
|
|
3277
|
-
...update,
|
|
3278
|
-
prepared: true
|
|
3279
|
-
}, ref);
|
|
3562
|
+
const applyEntryUpdate = async (id, update, ref) => {
|
|
3280
3563
|
if (!ref) {
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
}
|
|
3287
|
-
if (sourceType === "local") {
|
|
3288
|
-
const { storyId, index, refId } = store.getState();
|
|
3289
|
-
if (!index) return;
|
|
3290
|
-
const toBePreloaded = Array.from(/* @__PURE__ */ new Set([api.findSiblingStoryId(storyId, index, 1, true), api.findSiblingStoryId(storyId, index, -1, true)])).filter(Boolean);
|
|
3291
|
-
provider.channel?.emit(PRELOAD_ENTRIES, {
|
|
3292
|
-
ids: toBePreloaded,
|
|
3293
|
-
options: { target: refId }
|
|
3564
|
+
const { index, filteredIndex } = store.getState();
|
|
3565
|
+
applyUpdate([index, filteredIndex], id, update);
|
|
3566
|
+
if (index || filteredIndex) await store.setState({
|
|
3567
|
+
index,
|
|
3568
|
+
filteredIndex
|
|
3294
3569
|
});
|
|
3570
|
+
return;
|
|
3295
3571
|
}
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
fullAPI.setOptions(removeRemovedOptions(options));
|
|
3310
|
-
} else fullAPI.setRef(ref.id, {
|
|
3311
|
-
...ref,
|
|
3312
|
-
storyIndex: index
|
|
3313
|
-
}, true);
|
|
3314
|
-
});
|
|
3315
|
-
provider.channel?.on(SET_STORIES, function handler(data) {
|
|
3316
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3317
|
-
const setStoriesData = data.v ? denormalizeStoryParameters(data) : data.stories;
|
|
3318
|
-
if (!ref) throw new Error("Cannot call SET_STORIES for local frame");
|
|
3319
|
-
else fullAPI.setRef(ref.id, {
|
|
3320
|
-
...ref,
|
|
3321
|
-
setStoriesData
|
|
3322
|
-
}, true);
|
|
3323
|
-
});
|
|
3324
|
-
provider.channel?.on(SELECT_STORY, function handler({ kind, title = kind, story, name = story, storyId, ...rest }) {
|
|
3325
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3326
|
-
if (!ref) fullAPI.selectStory(storyId || title, name, rest);
|
|
3327
|
-
else fullAPI.selectStory(storyId || title, name, {
|
|
3328
|
-
...rest,
|
|
3329
|
-
ref: ref.id
|
|
3330
|
-
});
|
|
3331
|
-
});
|
|
3332
|
-
provider.channel?.on(STORY_ARGS_UPDATED, function handleStoryArgsUpdated({ storyId, args }) {
|
|
3333
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3334
|
-
api.updateStory(storyId, { args }, ref);
|
|
3335
|
-
});
|
|
3336
|
-
provider.channel?.on(CONFIG_ERROR, function handleConfigError(err) {
|
|
3337
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3338
|
-
api.setPreviewInitialized(ref);
|
|
3339
|
-
});
|
|
3340
|
-
provider.channel?.on(STORY_MISSING, function handleConfigError(err) {
|
|
3341
|
-
const { ref } = getEventMetadata(this, fullAPI);
|
|
3342
|
-
api.setPreviewInitialized(ref);
|
|
3343
|
-
});
|
|
3344
|
-
provider.channel?.on(SET_CONFIG, async () => {
|
|
3345
|
-
const { includedTagFilters, excludedTagFilters, includedStatusFilters, excludedStatusFilters, tagPresets } = store.getState();
|
|
3346
|
-
await api.setFilters({
|
|
3347
|
-
[STATIC_FILTER]: computeStaticFilterFn(tagPresets),
|
|
3348
|
-
[TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters),
|
|
3349
|
-
[STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters, excludedStatusFilters)
|
|
3572
|
+
const { id: refId, index, filteredIndex } = ref;
|
|
3573
|
+
const storyUpdates = {
|
|
3574
|
+
...ref.storyUpdates,
|
|
3575
|
+
[id]: {
|
|
3576
|
+
...ref.storyUpdates?.[id],
|
|
3577
|
+
...update
|
|
3578
|
+
}
|
|
3579
|
+
};
|
|
3580
|
+
applyUpdate([index, filteredIndex], id, update);
|
|
3581
|
+
await fullAPI.updateRef(refId, {
|
|
3582
|
+
index,
|
|
3583
|
+
filteredIndex,
|
|
3584
|
+
storyUpdates
|
|
3350
3585
|
});
|
|
3586
|
+
};
|
|
3587
|
+
listenToStoryEvents({
|
|
3588
|
+
store,
|
|
3589
|
+
provider,
|
|
3590
|
+
fullAPI,
|
|
3591
|
+
api,
|
|
3592
|
+
navigateWithQueryParams
|
|
3351
3593
|
});
|
|
3352
|
-
fullStatusStore.onAllStatusChange(throttle(requestStatusFilterRebuild, STATUS_CHANGE_REBUILD_THROTTLE, { edges: ["leading", "trailing"] }));
|
|
3353
|
-
const tagPresets = scope.TAGS_OPTIONS || {};
|
|
3354
|
-
const defaultTags = getDefaultTagsFromPreset(tagPresets);
|
|
3355
|
-
const { tags, statuses } = queryFromLocation(location ?? { search: "" });
|
|
3356
|
-
const parsedTags = parseTagsParam(tags);
|
|
3357
|
-
const hasTagsParam = tags !== void 0;
|
|
3358
|
-
const initialIncluded = hasTagsParam ? parsedTags.included : defaultTags.included;
|
|
3359
|
-
const initialExcluded = hasTagsParam ? parsedTags.excluded : defaultTags.excluded;
|
|
3360
|
-
const parsedStatuses = parseStatusesParam(statuses);
|
|
3361
|
-
const initialIncludedStatuses = parsedStatuses.included;
|
|
3362
|
-
const initialExcludedStatuses = parsedStatuses.excluded;
|
|
3363
3594
|
return {
|
|
3364
3595
|
api,
|
|
3365
3596
|
state: {
|
|
@@ -3367,27 +3598,12 @@ function init_stories$1() {
|
|
|
3367
3598
|
viewMode: initialViewMode,
|
|
3368
3599
|
hasCalledSetOptions: false,
|
|
3369
3600
|
previewInitialized: false,
|
|
3370
|
-
filters
|
|
3371
|
-
[STATIC_FILTER]: computeStaticFilterFn(tagPresets),
|
|
3372
|
-
[TAGS_FILTER]: computeTagsFilterFn(initialIncluded, initialExcluded),
|
|
3373
|
-
[STATUS_FILTER]: computeStatusFilterFn(initialIncludedStatuses, initialExcludedStatuses)
|
|
3374
|
-
},
|
|
3375
|
-
tagPresets,
|
|
3376
|
-
defaultIncludedTagFilters: defaultTags.included,
|
|
3377
|
-
defaultExcludedTagFilters: defaultTags.excluded,
|
|
3378
|
-
includedTagFilters: initialIncluded,
|
|
3379
|
-
excludedTagFilters: initialExcluded,
|
|
3380
|
-
includedStatusFilters: initialIncludedStatuses,
|
|
3381
|
-
excludedStatusFilters: initialExcludedStatuses
|
|
3601
|
+
...filters.state
|
|
3382
3602
|
},
|
|
3383
3603
|
init: async () => {
|
|
3384
3604
|
provider.channel?.on(STORY_INDEX_INVALIDATED, () => api.fetchIndex());
|
|
3385
3605
|
await api.fetchIndex();
|
|
3386
|
-
|
|
3387
|
-
urlFilterTelemetryEmitted = true;
|
|
3388
|
-
const hasBuiltInTagFilters = initialIncluded.some((id) => BUILT_IN_TAG_IDS.has(id)) || initialExcluded.some((id) => BUILT_IN_TAG_IDS.has(id));
|
|
3389
|
-
const hasStatusFilters = initialIncludedStatuses.length > 0 || initialExcludedStatuses.length > 0;
|
|
3390
|
-
if (hasBuiltInTagFilters || hasStatusFilters) emitFilterTelemetry("url");
|
|
3606
|
+
filters.emitUrlFilterTelemetry();
|
|
3391
3607
|
}
|
|
3392
3608
|
};
|
|
3393
3609
|
};
|
|
@@ -3404,8 +3620,8 @@ function init_url$1() {
|
|
|
3404
3620
|
return (init_url$1 = __esmMin((() => {
|
|
3405
3621
|
init_core_events();
|
|
3406
3622
|
init_router();
|
|
3407
|
-
|
|
3408
|
-
|
|
3623
|
+
init_global();
|
|
3624
|
+
init_isEqual();
|
|
3409
3625
|
init_main();
|
|
3410
3626
|
init_merge();
|
|
3411
3627
|
init_url();
|
|
@@ -3463,13 +3679,13 @@ function init_url$1() {
|
|
|
3463
3679
|
navSize,
|
|
3464
3680
|
bottomPanelHeight,
|
|
3465
3681
|
rightPanelWidth,
|
|
3466
|
-
panelPosition:
|
|
3682
|
+
panelPosition: panel === "right" || panel === "bottom" ? panel : void 0
|
|
3467
3683
|
};
|
|
3468
3684
|
const ui = { enableShortcuts: parseBoolean(shortcuts) };
|
|
3469
3685
|
const selectedPanel = addonPanel || void 0;
|
|
3470
3686
|
const storyId = storyIdFromUrl;
|
|
3471
3687
|
const otherParams = getCustomQueryParams(location);
|
|
3472
|
-
const customQueryParams =
|
|
3688
|
+
const customQueryParams = isEqual(prevParams, otherParams) ? prevParams : otherParams;
|
|
3473
3689
|
prevParams = customQueryParams;
|
|
3474
3690
|
return {
|
|
3475
3691
|
viewMode,
|
|
@@ -3491,14 +3707,14 @@ function init_url$1() {
|
|
|
3491
3707
|
getStoryHrefs(storyId, options = {}) {
|
|
3492
3708
|
const { id: currentStoryId, refId: currentRefId } = fullAPI.getCurrentStoryData() ?? {};
|
|
3493
3709
|
const isCurrentStory = storyId === currentStoryId && options.refId === currentRefId;
|
|
3494
|
-
const { customQueryParams,
|
|
3710
|
+
const { customQueryParams, refs } = store.getState();
|
|
3495
3711
|
const { base, inheritArgs = isCurrentStory, inheritGlobals = true, queryParams = {}, refId, viewMode = "story", embed = false, freeze = false } = options;
|
|
3496
3712
|
if (refId && !refs[refId]) throw new Error(`Invalid refId: ${refId}`);
|
|
3497
|
-
const pathname =
|
|
3498
|
-
const originAddress =
|
|
3499
|
-
const networkAddress =
|
|
3713
|
+
const pathname = global.document?.baseURI ? new URL(".", global.document.baseURI).pathname : "/";
|
|
3714
|
+
const originAddress = global.window.location.origin + pathname;
|
|
3715
|
+
const networkAddress = global.FORKBOOK_NETWORK_ADDRESS ?? originAddress;
|
|
3500
3716
|
const managerBase = base === "origin" ? originAddress : base === "network" ? networkAddress : pathname;
|
|
3501
|
-
const previewBaseUrl = base ? managerBase :
|
|
3717
|
+
const previewBaseUrl = base ? managerBase : global.document?.baseURI || originAddress;
|
|
3502
3718
|
const previewBase = refId ? refs[refId].url + "/iframe.html" : resolveIframeUrl(previewBaseUrl, { absolute: Boolean(base) });
|
|
3503
3719
|
const refParam = refId ? `&refId=${encodeURIComponent(refId)}` : "";
|
|
3504
3720
|
const { args = "", globals = "", ...otherParams } = queryParams;
|
|
@@ -3526,7 +3742,7 @@ function init_url$1() {
|
|
|
3526
3742
|
const embedParam = embed ? "&embed=true" : "";
|
|
3527
3743
|
const freezeParam = freeze ? "&freeze=finished" : "";
|
|
3528
3744
|
return {
|
|
3529
|
-
managerHref:
|
|
3745
|
+
managerHref: buildManagerHref(managerBase, `/${viewMode}/${refId ? `${refId}_` : ""}${storyId}`, `${argsParam}${globalsParam}${customManagerParams}`.replace(/^&/, "")),
|
|
3530
3746
|
previewHref: `${previewBase}?id=${storyId}&viewMode=${viewMode}${refParam}${argsParam}${refId ? "" : globalsParam}${customPreviewParams}${embedParam}${freezeParam}`
|
|
3531
3747
|
};
|
|
3532
3748
|
},
|
|
@@ -3535,13 +3751,12 @@ function init_url$1() {
|
|
|
3535
3751
|
return customQueryParams ? customQueryParams[key] : void 0;
|
|
3536
3752
|
},
|
|
3537
3753
|
getUrlState() {
|
|
3538
|
-
const { location, path, customQueryParams, storyId,
|
|
3754
|
+
const { location, path, customQueryParams, storyId, viewMode } = store.getState();
|
|
3539
3755
|
return {
|
|
3540
3756
|
path,
|
|
3541
3757
|
hash: location?.hash ?? "",
|
|
3542
3758
|
queryParams: customQueryParams,
|
|
3543
3759
|
storyId,
|
|
3544
|
-
url,
|
|
3545
3760
|
viewMode
|
|
3546
3761
|
};
|
|
3547
3762
|
},
|
|
@@ -3550,7 +3765,7 @@ function init_url$1() {
|
|
|
3550
3765
|
const update = { ...customQueryParams };
|
|
3551
3766
|
for (const [key, value] of Object.entries(input)) if (value === null || value === void 0) delete update[key];
|
|
3552
3767
|
else update[key] = value;
|
|
3553
|
-
if (!
|
|
3768
|
+
if (!isEqual(customQueryParams, update)) {
|
|
3554
3769
|
store.setState({ customQueryParams: update });
|
|
3555
3770
|
provider.channel?.emit(UPDATE_QUERY_PARAMS, update);
|
|
3556
3771
|
}
|
|
@@ -3590,9 +3805,9 @@ function init_url$1() {
|
|
|
3590
3805
|
provider.channel?.on(SET_CURRENT_STORY, () => updateArgsParam());
|
|
3591
3806
|
let handleOrId;
|
|
3592
3807
|
provider.channel?.on(STORY_ARGS_UPDATED, () => {
|
|
3593
|
-
if ("requestIdleCallback" in
|
|
3594
|
-
if (handleOrId)
|
|
3595
|
-
handleOrId =
|
|
3808
|
+
if ("requestIdleCallback" in global.window) {
|
|
3809
|
+
if (handleOrId) global.window.cancelIdleCallback(handleOrId);
|
|
3810
|
+
handleOrId = global.window.requestIdleCallback(updateArgsParam, { timeout: 1e3 });
|
|
3596
3811
|
} else {
|
|
3597
3812
|
if (handleOrId) clearTimeout(handleOrId);
|
|
3598
3813
|
setTimeout(updateArgsParam, 100);
|
|
@@ -3636,14 +3851,14 @@ function init_version() {
|
|
|
3636
3851
|
//#endregion
|
|
3637
3852
|
//#region src/manager-api/modules/versions.ts
|
|
3638
3853
|
var versions_exports = /* @__PURE__ */ __exportAll({ init: () => init$1 });
|
|
3639
|
-
var import_memoizerific, import_semver, VERSIONCHECK, getVersionCheckData,
|
|
3854
|
+
var import_memoizerific, import_semver, VERSIONCHECK, getVersionCheckData, init$1;
|
|
3640
3855
|
function init_versions() {
|
|
3641
3856
|
return (init_versions = __esmMin((() => {
|
|
3642
|
-
|
|
3857
|
+
init_global();
|
|
3643
3858
|
import_memoizerific = /* @__PURE__ */ __toESM(require_memoizerific(), 1);
|
|
3644
3859
|
import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
3645
3860
|
init_version();
|
|
3646
|
-
({VERSIONCHECK} =
|
|
3861
|
+
({VERSIONCHECK} = global);
|
|
3647
3862
|
getVersionCheckData = (0, import_memoizerific.default)(1)(() => {
|
|
3648
3863
|
try {
|
|
3649
3864
|
return { ...JSON.parse(VERSIONCHECK).data || {} };
|
|
@@ -3651,10 +3866,6 @@ function init_versions() {
|
|
|
3651
3866
|
return {};
|
|
3652
3867
|
}
|
|
3653
3868
|
});
|
|
3654
|
-
normalizeRendererName = (renderer) => {
|
|
3655
|
-
if (renderer.includes("vue")) return "vue";
|
|
3656
|
-
return renderer;
|
|
3657
|
-
};
|
|
3658
3869
|
init$1 = ({ store }) => {
|
|
3659
3870
|
const { dismissedVersionNotification } = store.getState();
|
|
3660
3871
|
const state = {
|
|
@@ -3674,24 +3885,10 @@ function init_versions() {
|
|
|
3674
3885
|
if (current && import_semver.default.prerelease(current.version) && next) return latest && import_semver.default.gt(latest.version, next.version) ? latest : next;
|
|
3675
3886
|
return latest;
|
|
3676
3887
|
},
|
|
3677
|
-
getDocsUrl: ({ asset, subpath = asset
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
const activeVersion = currentVersion?.startsWith("0.0.0") && latestVersion || currentVersion;
|
|
3682
|
-
let url = `https://storybook.js.org/${asset ? "docs-assets" : "docs"}/`;
|
|
3683
|
-
if (asset && activeVersion) url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`;
|
|
3684
|
-
else if (versioned && activeVersion && latestVersion) {
|
|
3685
|
-
const versionDiff = import_semver.default.diff(latestVersion, activeVersion);
|
|
3686
|
-
if (!(versionDiff === "patch" || versionDiff === null)) url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`;
|
|
3687
|
-
}
|
|
3688
|
-
const [cleanedSubpath, hash] = subpath?.split("#") || [];
|
|
3689
|
-
if (cleanedSubpath) url += asset ? cleanedSubpath : `${cleanedSubpath}/`;
|
|
3690
|
-
if (renderer && typeof scope.FORKBOOK_RENDERER !== "undefined") {
|
|
3691
|
-
const rendererName = scope.FORKBOOK_RENDERER;
|
|
3692
|
-
if (rendererName) url += `?renderer=${normalizeRendererName(rendererName)}`;
|
|
3693
|
-
}
|
|
3694
|
-
if (ref) url += `${url.includes("?") ? "&" : "?"}ref=${ref}`;
|
|
3888
|
+
getDocsUrl: ({ asset, subpath = asset }) => {
|
|
3889
|
+
const [path, hash] = subpath?.split("#") || [];
|
|
3890
|
+
let url = `https://forkbook.ljk.dev/${asset ? "docs-assets" : "docs"}`;
|
|
3891
|
+
if (path) url += `/${path}`;
|
|
3695
3892
|
if (hash) url += `#${hash}`;
|
|
3696
3893
|
return url;
|
|
3697
3894
|
},
|
|
@@ -3728,27 +3925,21 @@ function init_versions() {
|
|
|
3728
3925
|
//#endregion
|
|
3729
3926
|
//#region src/manager-api/modules/whatsnew.tsx
|
|
3730
3927
|
var whatsnew_exports = /* @__PURE__ */ __exportAll({ init: () => init });
|
|
3731
|
-
var import_react$3, WHATS_NEW_NOTIFICATION_ID,
|
|
3928
|
+
var import_react$3, WHATS_NEW_NOTIFICATION_ID, ForkbookIcon, init;
|
|
3732
3929
|
function init_whatsnew() {
|
|
3733
3930
|
return (init_whatsnew = __esmMin((() => {
|
|
3734
3931
|
import_react$3 = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
3735
3932
|
init_core_events();
|
|
3736
|
-
|
|
3933
|
+
init_global();
|
|
3737
3934
|
WHATS_NEW_NOTIFICATION_ID = "whats-new";
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
fillRule: "evenodd",
|
|
3747
|
-
clipRule: "evenodd",
|
|
3748
|
-
d: "M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z",
|
|
3749
|
-
fill: color
|
|
3750
|
-
}));
|
|
3751
|
-
};
|
|
3935
|
+
ForkbookIcon = ({ size = 14 }) => /* @__PURE__ */ import_react$3.default.createElement("span", {
|
|
3936
|
+
role: "img",
|
|
3937
|
+
"aria-label": "Forkbook",
|
|
3938
|
+
style: {
|
|
3939
|
+
fontSize: size,
|
|
3940
|
+
lineHeight: 1
|
|
3941
|
+
}
|
|
3942
|
+
}, "🪩");
|
|
3752
3943
|
init = ({ fullAPI, store, provider }) => {
|
|
3753
3944
|
const state = { whatsNewData: void 0 };
|
|
3754
3945
|
function setWhatsNewState(newState) {
|
|
@@ -3787,7 +3978,7 @@ function init_whatsnew() {
|
|
|
3787
3978
|
provider.channel?.emit(SET_WHATS_NEW_CACHE, cache);
|
|
3788
3979
|
}
|
|
3789
3980
|
const initModule = async () => {
|
|
3790
|
-
if (
|
|
3981
|
+
if (global.CONFIG_TYPE !== "DEVELOPMENT") return;
|
|
3791
3982
|
const whatsNewData = await getLatestWhatsNewPost();
|
|
3792
3983
|
setWhatsNewState(whatsNewData);
|
|
3793
3984
|
const urlState = fullAPI.getUrlState();
|
|
@@ -3798,7 +3989,7 @@ function init_whatsnew() {
|
|
|
3798
3989
|
headline: whatsNewData.title,
|
|
3799
3990
|
subHeadline: "Learn what's new in Forkbook"
|
|
3800
3991
|
},
|
|
3801
|
-
icon: /* @__PURE__ */ import_react$3.default.createElement(
|
|
3992
|
+
icon: /* @__PURE__ */ import_react$3.default.createElement(ForkbookIcon, null),
|
|
3802
3993
|
onClear({ dismissed }) {
|
|
3803
3994
|
if (dismissed) setWhatsNewCache({ lastDismissedPost: whatsNewData.url });
|
|
3804
3995
|
}
|
|
@@ -3952,7 +4143,7 @@ function ManagerConsumer({ filter = defaultFilter, children }) {
|
|
|
3952
4143
|
if (typeof renderer.current !== "function") return /* @__PURE__ */ import_react$2.default.createElement(import_react$2.Fragment, null, renderer.current);
|
|
3953
4144
|
const comboData = filterer.current(managerContext);
|
|
3954
4145
|
const comboDataArray = (0, import_react$2.useMemo)(() => {
|
|
3955
|
-
return
|
|
4146
|
+
return Object.entries(comboData).flat();
|
|
3956
4147
|
}, [managerContext.state]);
|
|
3957
4148
|
return (0, import_react$2.useMemo)(() => {
|
|
3958
4149
|
const Child = renderer.current;
|
|
@@ -3989,14 +4180,15 @@ function useParameter(parameterKey, defaultValue) {
|
|
|
3989
4180
|
}
|
|
3990
4181
|
function useSharedState(stateId, defaultState) {
|
|
3991
4182
|
const api = useStorybookApi();
|
|
3992
|
-
const
|
|
4183
|
+
const getCachedState = () => FORKBOOK_ADDON_STATE[stateId];
|
|
4184
|
+
const state = orDefault(api.getAddonState(stateId) || getCachedState(), getCachedState() || defaultState);
|
|
3993
4185
|
let quicksync = false;
|
|
3994
4186
|
if (state === defaultState && defaultState !== void 0) {
|
|
3995
4187
|
FORKBOOK_ADDON_STATE[stateId] = defaultState;
|
|
3996
4188
|
quicksync = true;
|
|
3997
4189
|
}
|
|
3998
4190
|
(0, import_react$2.useEffect)(() => {
|
|
3999
|
-
if (quicksync) api.setAddonState(stateId, defaultState);
|
|
4191
|
+
if (quicksync && defaultState !== void 0) api.setAddonState(stateId, defaultState);
|
|
4000
4192
|
}, [quicksync]);
|
|
4001
4193
|
const setState = (0, import_react$2.useCallback)(async (s, options) => {
|
|
4002
4194
|
await api.setAddonState(stateId, s, options);
|
|
@@ -4012,12 +4204,13 @@ function useSharedState(stateId, defaultState) {
|
|
|
4012
4204
|
const stateInitializationHandlers = {
|
|
4013
4205
|
[SET_STORIES]: async () => {
|
|
4014
4206
|
const currentState = api.getAddonState(stateId);
|
|
4207
|
+
const cachedState = getCachedState();
|
|
4015
4208
|
if (currentState) {
|
|
4016
4209
|
FORKBOOK_ADDON_STATE[stateId] = currentState;
|
|
4017
4210
|
api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, currentState);
|
|
4018
|
-
} else if (
|
|
4019
|
-
await setState(
|
|
4020
|
-
api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,
|
|
4211
|
+
} else if (cachedState) {
|
|
4212
|
+
await setState(cachedState);
|
|
4213
|
+
api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, getCachedState());
|
|
4021
4214
|
} else if (defaultState !== void 0) {
|
|
4022
4215
|
await setState(defaultState);
|
|
4023
4216
|
FORKBOOK_ADDON_STATE[stateId] = defaultState;
|
|
@@ -4125,7 +4318,7 @@ function init_root() {
|
|
|
4125
4318
|
this.mounted = false;
|
|
4126
4319
|
this.initModules = () => {
|
|
4127
4320
|
this.modules.forEach((module) => {
|
|
4128
|
-
|
|
4321
|
+
module.init?.();
|
|
4129
4322
|
});
|
|
4130
4323
|
};
|
|
4131
4324
|
const { location, path, refId, viewMode = props.docsOptions.docsMode ? "docs" : props.viewMode, singleStory, storyId, docsOptions, navigate } = props;
|
|
@@ -4141,7 +4334,10 @@ function init_root() {
|
|
|
4141
4334
|
callback?.(this.state);
|
|
4142
4335
|
return this.state;
|
|
4143
4336
|
}
|
|
4144
|
-
this.setState(
|
|
4337
|
+
this.setState((state) => ({
|
|
4338
|
+
...state,
|
|
4339
|
+
...typeof stateChange === "function" ? stateChange(state) : stateChange
|
|
4340
|
+
}), () => callback(this.state));
|
|
4145
4341
|
return this.state;
|
|
4146
4342
|
}
|
|
4147
4343
|
});
|
|
@@ -4352,6 +4548,222 @@ function init_useMedia() {
|
|
|
4352
4548
|
})))();
|
|
4353
4549
|
}
|
|
4354
4550
|
//#endregion
|
|
4551
|
+
//#region src/manager/globals/icons.ts
|
|
4552
|
+
var icons_exports = /* @__PURE__ */ __exportAll({
|
|
4553
|
+
AccessibilityIcon: () => Accessibility,
|
|
4554
|
+
AppWindowIcon: () => AppWindow,
|
|
4555
|
+
AppleIcon: () => Apple,
|
|
4556
|
+
ArchiveRestoreIcon: () => ArchiveRestore,
|
|
4557
|
+
ArrowDownIcon: () => ArrowDown,
|
|
4558
|
+
ArrowDownLeftIcon: () => ArrowDownLeft,
|
|
4559
|
+
ArrowDownRightIcon: () => ArrowDownRight,
|
|
4560
|
+
ArrowDownWideNarrowIcon: () => ArrowDownWideNarrow,
|
|
4561
|
+
ArrowLeftIcon: () => ArrowLeft,
|
|
4562
|
+
ArrowLeftRightIcon: () => ArrowLeftRight,
|
|
4563
|
+
ArrowRightIcon: () => ArrowRight,
|
|
4564
|
+
ArrowUpIcon: () => ArrowUp,
|
|
4565
|
+
ArrowUpLeftIcon: () => ArrowUpLeft,
|
|
4566
|
+
ArrowUpNarrowWideIcon: () => ArrowUpNarrowWide,
|
|
4567
|
+
ArrowUpRightIcon: () => ArrowUpRight,
|
|
4568
|
+
AtSignIcon: () => AtSign,
|
|
4569
|
+
AtomIcon: () => Atom,
|
|
4570
|
+
AwardIcon: () => Award,
|
|
4571
|
+
BadgeCheckIcon: () => BadgeCheck,
|
|
4572
|
+
BanIcon: () => Ban,
|
|
4573
|
+
BellIcon: () => Bell,
|
|
4574
|
+
BoldIcon: () => Bold,
|
|
4575
|
+
BookOpenIcon: () => BookOpen,
|
|
4576
|
+
BookmarkIcon: () => Bookmark,
|
|
4577
|
+
BriefcaseIcon: () => Briefcase,
|
|
4578
|
+
BrushCleaningIcon: () => BrushCleaning,
|
|
4579
|
+
BugIcon: () => Bug,
|
|
4580
|
+
CalendarIcon: () => Calendar,
|
|
4581
|
+
CameraIcon: () => Camera,
|
|
4582
|
+
ChartColumnIcon: () => ChartColumn,
|
|
4583
|
+
ChartLineIcon: () => ChartLine,
|
|
4584
|
+
CheckCheckIcon: () => CheckCheck,
|
|
4585
|
+
CheckIcon: () => Check,
|
|
4586
|
+
ChevronDownIcon: () => ChevronDown,
|
|
4587
|
+
ChevronLeftIcon: () => ChevronLeft,
|
|
4588
|
+
ChevronRightIcon: () => ChevronRight,
|
|
4589
|
+
ChevronUpIcon: () => ChevronUp,
|
|
4590
|
+
CircleAlertIcon: () => CircleAlert,
|
|
4591
|
+
CircleArrowLeftIcon: () => CircleArrowLeft,
|
|
4592
|
+
CircleArrowRightIcon: () => CircleArrowRight,
|
|
4593
|
+
CircleCheckIcon: () => CircleCheck,
|
|
4594
|
+
CircleIcon: () => Circle,
|
|
4595
|
+
CirclePlayIcon: () => CirclePlay,
|
|
4596
|
+
CirclePlusIcon: () => CirclePlus,
|
|
4597
|
+
CircleQuestionMarkIcon: () => CircleQuestionMark,
|
|
4598
|
+
CircleSlash2Icon: () => CircleSlash2,
|
|
4599
|
+
CircleStopIcon: () => CircleStop,
|
|
4600
|
+
CircleUserIcon: () => CircleUser,
|
|
4601
|
+
CircleXIcon: () => CircleX,
|
|
4602
|
+
ClockIcon: () => Clock,
|
|
4603
|
+
CloudIcon: () => Cloud,
|
|
4604
|
+
CodeIcon: () => Code,
|
|
4605
|
+
CodeXmlIcon: () => CodeXml,
|
|
4606
|
+
Columns2Icon: () => Columns2,
|
|
4607
|
+
CommandIcon: () => Command,
|
|
4608
|
+
CompassIcon: () => Compass,
|
|
4609
|
+
ContrastIcon: () => Contrast,
|
|
4610
|
+
CopyIcon: () => Copy,
|
|
4611
|
+
CornerUpLeftIcon: () => CornerUpLeft,
|
|
4612
|
+
CornerUpRightIcon: () => CornerUpRight,
|
|
4613
|
+
CpuIcon: () => Cpu,
|
|
4614
|
+
CreditCardIcon: () => CreditCard,
|
|
4615
|
+
CrosshairIcon: () => Crosshair,
|
|
4616
|
+
DatabaseIcon: () => Database,
|
|
4617
|
+
DeleteIcon: () => Delete,
|
|
4618
|
+
DiamondIcon: () => Diamond,
|
|
4619
|
+
DownloadIcon: () => Download,
|
|
4620
|
+
EllipsisIcon: () => Ellipsis,
|
|
4621
|
+
ExpandIcon: () => Expand,
|
|
4622
|
+
EyeIcon: () => Eye,
|
|
4623
|
+
EyeOffIcon: () => EyeOff,
|
|
4624
|
+
FastForwardIcon: () => FastForward,
|
|
4625
|
+
FileCodeIcon: () => FileCode,
|
|
4626
|
+
FileTextIcon: () => FileText,
|
|
4627
|
+
FilesIcon: () => Files,
|
|
4628
|
+
FlagIcon: () => Flag,
|
|
4629
|
+
FlaskConicalIcon: () => FlaskConical,
|
|
4630
|
+
FlipHorizontal2Icon: () => TrianglesCenterlineDashedHorizontal,
|
|
4631
|
+
FoldVerticalIcon: () => FoldVertical,
|
|
4632
|
+
FolderIcon: () => Folder,
|
|
4633
|
+
FrownIcon: () => FaceSlightlyFrowning,
|
|
4634
|
+
GaugeIcon: () => Gauge,
|
|
4635
|
+
GiftIcon: () => Gift,
|
|
4636
|
+
GitBranchIcon: () => GitBranch,
|
|
4637
|
+
GitCommitHorizontalIcon: () => GitCommitHorizontal,
|
|
4638
|
+
GitForkIcon: () => GitFork,
|
|
4639
|
+
GitMergeIcon: () => GitMerge,
|
|
4640
|
+
GitPullRequestIcon: () => GitPullRequest,
|
|
4641
|
+
GlobeIcon: () => Globe,
|
|
4642
|
+
Grid2x2Icon: () => Grid2x2,
|
|
4643
|
+
Grid3x3Icon: () => Grid3x3,
|
|
4644
|
+
GripVerticalIcon: () => GripVertical,
|
|
4645
|
+
HardDriveIcon: () => HardDrive,
|
|
4646
|
+
HeartIcon: () => Heart,
|
|
4647
|
+
HourglassIcon: () => Hourglass,
|
|
4648
|
+
HouseIcon: () => House,
|
|
4649
|
+
IdCardIcon: () => IdCard,
|
|
4650
|
+
ImageIcon: () => Image,
|
|
4651
|
+
InfoIcon: () => Info,
|
|
4652
|
+
ItalicIcon: () => Italic,
|
|
4653
|
+
KeyIcon: () => Key,
|
|
4654
|
+
LayersIcon: () => Layers,
|
|
4655
|
+
LayoutGridIcon: () => LayoutGrid,
|
|
4656
|
+
LibraryIcon: () => Library,
|
|
4657
|
+
LifeBuoyIcon: () => LifeBuoy,
|
|
4658
|
+
LinkIcon: () => Link,
|
|
4659
|
+
ListChecksIcon: () => ListChecks,
|
|
4660
|
+
ListFilterIcon: () => ListFilter,
|
|
4661
|
+
ListIcon: () => List,
|
|
4662
|
+
ListOrderedIcon: () => ListOrdered,
|
|
4663
|
+
LockIcon: () => Lock,
|
|
4664
|
+
LockOpenIcon: () => LockOpen,
|
|
4665
|
+
LucideProvider: () => LucideProvider,
|
|
4666
|
+
MailIcon: () => Mail,
|
|
4667
|
+
MapPinIcon: () => MapPin,
|
|
4668
|
+
Maximize2Icon: () => Maximize2,
|
|
4669
|
+
MehIcon: () => FaceNeutral,
|
|
4670
|
+
MemoryStickIcon: () => MemoryStick,
|
|
4671
|
+
MenuIcon: () => Menu,
|
|
4672
|
+
MessageCircleIcon: () => MessageCircle,
|
|
4673
|
+
MessageCircleMoreIcon: () => MessageCircleMore,
|
|
4674
|
+
MessageSquareIcon: () => MessageSquare,
|
|
4675
|
+
MessageSquareTextIcon: () => MessageSquareText,
|
|
4676
|
+
MessagesSquareIcon: () => MessagesSquare,
|
|
4677
|
+
MinusIcon: () => Minus,
|
|
4678
|
+
MonitorIcon: () => Monitor,
|
|
4679
|
+
MonitorPlayIcon: () => MonitorPlay,
|
|
4680
|
+
MoonIcon: () => Moon,
|
|
4681
|
+
MousePointer2Icon: () => MousePointer2,
|
|
4682
|
+
MousePointerClickIcon: () => MousePointerClick,
|
|
4683
|
+
NetworkIcon: () => Network,
|
|
4684
|
+
NewspaperIcon: () => Newspaper,
|
|
4685
|
+
NutIcon: () => Nut,
|
|
4686
|
+
PackageIcon: () => Package,
|
|
4687
|
+
PaintbrushIcon: () => Paintbrush,
|
|
4688
|
+
PaintbrushVerticalIcon: () => PaintbrushVertical,
|
|
4689
|
+
PanelLeftIcon: () => PanelLeft,
|
|
4690
|
+
PaperclipIcon: () => Paperclip,
|
|
4691
|
+
PenToolIcon: () => PenTool,
|
|
4692
|
+
PencilIcon: () => Pencil,
|
|
4693
|
+
PhoneIcon: () => Phone,
|
|
4694
|
+
PilcrowIcon: () => Pilcrow,
|
|
4695
|
+
PinIcon: () => Pin,
|
|
4696
|
+
PinOffIcon: () => PinOff,
|
|
4697
|
+
PlayIcon: () => Play,
|
|
4698
|
+
PlusIcon: () => Plus,
|
|
4699
|
+
PointerIcon: () => Pointer,
|
|
4700
|
+
PowerIcon: () => Power,
|
|
4701
|
+
PrinterIcon: () => Printer,
|
|
4702
|
+
PuzzleIcon: () => Puzzle,
|
|
4703
|
+
RefreshCwIcon: () => RefreshCw,
|
|
4704
|
+
RewindIcon: () => Rewind,
|
|
4705
|
+
RotateCcwIcon: () => RotateCcw,
|
|
4706
|
+
RotateCwIcon: () => RotateCw,
|
|
4707
|
+
Rows2Icon: () => Rows2,
|
|
4708
|
+
RssIcon: () => Rss,
|
|
4709
|
+
RulerIcon: () => Ruler,
|
|
4710
|
+
SaveIcon: () => Save,
|
|
4711
|
+
SearchIcon: () => Search,
|
|
4712
|
+
SettingsIcon: () => Settings,
|
|
4713
|
+
Share2Icon: () => Share2,
|
|
4714
|
+
ShareIcon: () => Share,
|
|
4715
|
+
ShieldIcon: () => Shield,
|
|
4716
|
+
ShoppingBasketIcon: () => ShoppingBasket,
|
|
4717
|
+
SignpostIcon: () => Signpost,
|
|
4718
|
+
SkipBackIcon: () => SkipBack,
|
|
4719
|
+
SkipForwardIcon: () => SkipForward,
|
|
4720
|
+
SlidersHorizontalIcon: () => SlidersHorizontal,
|
|
4721
|
+
SmartphoneIcon: () => Smartphone,
|
|
4722
|
+
SmileIcon: () => FaceSlightlySmiling,
|
|
4723
|
+
SquareArrowDownLeftIcon: () => SquareArrowDownLeft,
|
|
4724
|
+
SquareArrowOutUpRightIcon: () => SquareArrowOutUpRight,
|
|
4725
|
+
SquareDashedIcon: () => SquareDashed,
|
|
4726
|
+
SquareIcon: () => Square,
|
|
4727
|
+
SquareXIcon: () => SquareX,
|
|
4728
|
+
StarIcon: () => Star,
|
|
4729
|
+
StickerIcon: () => Sticker,
|
|
4730
|
+
SunIcon: () => Sun,
|
|
4731
|
+
TabletIcon: () => Tablet,
|
|
4732
|
+
TagIcon: () => Tag$1,
|
|
4733
|
+
TerminalIcon: () => Terminal,
|
|
4734
|
+
TextAlignEndIcon: () => TextAlignEnd,
|
|
4735
|
+
TextAlignStartIcon: () => TextAlignStart,
|
|
4736
|
+
TextCursorInputIcon: () => TextCursorInput,
|
|
4737
|
+
ThumbsUpIcon: () => ThumbsUp,
|
|
4738
|
+
TimerIcon: () => Timer,
|
|
4739
|
+
Trash2Icon: () => Trash,
|
|
4740
|
+
TriangleAlertIcon: () => TriangleAlert,
|
|
4741
|
+
TypeIcon: () => Type,
|
|
4742
|
+
UnfoldVerticalIcon: () => UnfoldVertical,
|
|
4743
|
+
UnlinkIcon: () => Unlink,
|
|
4744
|
+
UploadIcon: () => Upload,
|
|
4745
|
+
UserCogIcon: () => UserCog,
|
|
4746
|
+
UserIcon: () => User,
|
|
4747
|
+
UserPlusIcon: () => UserPlus,
|
|
4748
|
+
UsersIcon: () => Users,
|
|
4749
|
+
VideoIcon: () => Video,
|
|
4750
|
+
Volume2Icon: () => Volume2,
|
|
4751
|
+
WandSparklesIcon: () => WandSparkles,
|
|
4752
|
+
WatchIcon: () => Watch,
|
|
4753
|
+
WaypointsIcon: () => Waypoints,
|
|
4754
|
+
WrenchIcon: () => Wrench,
|
|
4755
|
+
XIcon: () => X,
|
|
4756
|
+
ZapIcon: () => Zap,
|
|
4757
|
+
ZapOffIcon: () => ZapOff,
|
|
4758
|
+
ZoomInIcon: () => ZoomIn,
|
|
4759
|
+
ZoomOutIcon: () => ZoomOut
|
|
4760
|
+
});
|
|
4761
|
+
function init_icons() {
|
|
4762
|
+
return (init_icons = __esmMin((() => {
|
|
4763
|
+
init_accessibility(), init_apple(), init_app_window(), init_archive_restore(), init_arrow_down(), init_arrow_down_left(), init_arrow_down_right(), init_arrow_down_wide_narrow(), init_arrow_left(), init_arrow_left_right(), init_arrow_right(), init_arrow_up(), init_arrow_up_left(), init_arrow_up_narrow_wide(), init_arrow_up_right(), init_atom(), init_at_sign(), init_award(), init_badge_check(), init_ban(), init_bell(), init_bold(), init_bookmark(), init_book_open(), init_briefcase(), init_brush_cleaning(), init_bug(), init_calendar(), init_camera(), init_chart_column(), init_chart_line(), init_check_check(), init_check(), init_chevron_down(), init_chevron_left(), init_chevron_right(), init_chevron_up(), init_circle_alert(), init_circle_arrow_left(), init_circle_arrow_right(), init_circle_check(), init_circle(), init_circle_play(), init_circle_plus(), init_circle_question_mark(), init_circle_slash_2(), init_circle_stop(), init_circle_user(), init_circle_x(), init_clock(), init_cloud(), init_code(), init_code_xml(), init_columns_2(), init_command(), init_compass(), init_contrast(), init_copy(), init_corner_up_left(), init_corner_up_right(), init_cpu(), init_credit_card(), init_crosshair(), init_database(), init_delete(), init_diamond(), init_download(), init_ellipsis(), init_expand(), init_eye(), init_eye_off(), init_fast_forward(), init_file_code(), init_files(), init_file_text(), init_flag(), init_flask_conical(), init_triangles_centerline_dashed_horizontal(), init_folder(), init_fold_vertical(), init_face_slightly_frowning(), init_gauge(), init_gift(), init_git_branch(), init_git_commit_horizontal(), init_git_fork(), init_git_merge(), init_git_pull_request(), init_globe(), init_grid_2x2(), init_grid_3x3(), init_grip_vertical(), init_hard_drive(), init_heart(), init_hourglass(), init_house(), init_id_card(), init_image(), init_info(), init_italic(), init_key(), init_layers(), init_layout_grid(), init_library(), init_life_buoy(), init_link(), init_list_checks(), init_list_filter(), init_list(), init_list_ordered(), init_lock(), init_lock_open(), init_context$1(), init_mail(), init_map_pin(), init_maximize_2(), init_face_neutral(), init_memory_stick(), init_menu(), init_message_circle(), init_message_circle_more(), init_message_square(), init_message_square_text(), init_messages_square(), init_minus(), init_monitor(), init_monitor_play(), init_moon(), init_mouse_pointer_2(), init_mouse_pointer_click(), init_network(), init_newspaper(), init_nut(), init_package(), init_paintbrush(), init_paintbrush_vertical(), init_panel_left(), init_paperclip(), init_pencil(), init_pen_tool(), init_phone(), init_pilcrow(), init_pin(), init_pin_off(), init_play(), init_plus(), init_pointer(), init_power(), init_printer(), init_puzzle(), init_refresh_cw(), init_rewind(), init_rotate_ccw(), init_rotate_cw(), init_rows_2(), init_rss(), init_ruler(), init_save(), init_search(), init_settings$1(), init_share_2(), init_share(), init_shield(), init_shopping_basket(), init_signpost(), init_skip_back(), init_skip_forward(), init_sliders_horizontal(), init_smartphone(), init_face_slightly_smiling(), init_square_arrow_down_left(), init_square_arrow_out_up_right(), init_square_dashed(), init_square(), init_square_x(), init_star(), init_sticker(), init_sun(), init_tablet(), init_tag(), init_terminal(), init_text_align_end(), init_text_align_start(), init_text_cursor_input(), init_thumbs_up(), init_timer(), init_trash(), init_triangle_alert(), init_type(), init_unfold_vertical(), init_unlink(), init_upload(), init_user_cog(), init_user(), init_user_plus(), init_users(), init_video(), init_volume_2(), init_wand_sparkles(), init_watch(), init_waypoints(), init_wrench(), init_x(), init_zap(), init_zap_off(), init_zoom_in(), init_zoom_out();
|
|
4764
|
+
})))();
|
|
4765
|
+
}
|
|
4766
|
+
//#endregion
|
|
4355
4767
|
//#region src/manager/globals/runtime.ts
|
|
4356
4768
|
var import_react, import_react_dom, import_client, import_jsx_runtime, globalsNameValueMap;
|
|
4357
4769
|
function init_runtime() {
|
|
@@ -4367,11 +4779,11 @@ function init_runtime() {
|
|
|
4367
4779
|
init_manager_errors();
|
|
4368
4780
|
init_router();
|
|
4369
4781
|
init_types();
|
|
4370
|
-
init_dist$2();
|
|
4371
4782
|
init_manager_api();
|
|
4372
4783
|
init_test();
|
|
4373
4784
|
init_theming();
|
|
4374
4785
|
init_create();
|
|
4786
|
+
init_icons();
|
|
4375
4787
|
globalsNameValueMap = {
|
|
4376
4788
|
react: import_react,
|
|
4377
4789
|
"react/jsx-runtime": import_jsx_runtime,
|
|
@@ -4381,7 +4793,7 @@ function init_runtime() {
|
|
|
4381
4793
|
},
|
|
4382
4794
|
"react-dom": import_react_dom,
|
|
4383
4795
|
"react-dom/client": import_client,
|
|
4384
|
-
"
|
|
4796
|
+
"lucide-react": icons_exports,
|
|
4385
4797
|
"@aussieljk/forkbook/manager-api": manager_api_exports,
|
|
4386
4798
|
"@aussieljk/forkbook/theming": theming_exports,
|
|
4387
4799
|
"@aussieljk/forkbook/theming/create": create_exports,
|
|
@@ -4399,12 +4811,12 @@ function init_runtime() {
|
|
|
4399
4811
|
//#endregion
|
|
4400
4812
|
//#region src/manager/utils/prepareForTelemetry.ts
|
|
4401
4813
|
function getBrowserInfo() {
|
|
4402
|
-
if (!browserInfo) browserInfo = new import_browser_dtector_umd_min.default(
|
|
4814
|
+
if (!browserInfo) browserInfo = new import_browser_dtector_umd_min.default(global.navigator?.userAgent).getBrowserInfo();
|
|
4403
4815
|
return browserInfo;
|
|
4404
4816
|
}
|
|
4405
4817
|
function prepareForTelemetry(originalError) {
|
|
4406
4818
|
let error = originalError;
|
|
4407
|
-
if (originalError.target ===
|
|
4819
|
+
if (originalError.target === global || originalError.currentTarget === global || originalError.srcElement === global) {
|
|
4408
4820
|
error = new Error(originalError.message);
|
|
4409
4821
|
error.name = originalError.name || error.name;
|
|
4410
4822
|
}
|
|
@@ -4416,7 +4828,7 @@ var import_browser_dtector_umd_min, browserInfo, errorMessages, shouldSkipError;
|
|
|
4416
4828
|
function init_prepareForTelemetry() {
|
|
4417
4829
|
return (init_prepareForTelemetry = __esmMin((() => {
|
|
4418
4830
|
init_manager_errors();
|
|
4419
|
-
|
|
4831
|
+
init_global();
|
|
4420
4832
|
import_browser_dtector_umd_min = /* @__PURE__ */ __toESM(require_browser_dtector_umd_min(), 1);
|
|
4421
4833
|
errorMessages = [
|
|
4422
4834
|
"ResizeObserver loop completed with undelivered notifications.",
|
|
@@ -4438,7 +4850,7 @@ function init_globals_runtime() {
|
|
|
4438
4850
|
init_runtime();
|
|
4439
4851
|
init_prepareForTelemetry();
|
|
4440
4852
|
globalPackages.forEach((key) => {
|
|
4441
|
-
globalThis[globalsNameReferenceMap[key]]
|
|
4853
|
+
Object.assign(globalThis, { [globalsNameReferenceMap[key]]: globalsNameValueMap[key] });
|
|
4442
4854
|
});
|
|
4443
4855
|
queuedErrors = [];
|
|
4444
4856
|
globalThis.sendTelemetryError = (error) => {
|
|
@@ -4465,4 +4877,4 @@ function init_globals_runtime() {
|
|
|
4465
4877
|
})))();
|
|
4466
4878
|
}
|
|
4467
4879
|
//#endregion
|
|
4468
|
-
export { init_manager_errors as C,
|
|
4880
|
+
export { init_open_service as A, init_manager_errors as B, OpenServiceMissingServiceError as C, OpenServiceRemoteCommandUnhandledError as D, OpenServiceRemoteCommandDisconnectedError as E, init_preview_errors as F, OpenServiceStaticSnapshotInvalidError as I, OpenServiceStaticSnapshotLoadError as L, init_dev_server as M, InvalidChannelPageError as N, OpenServiceUnimplementedOperationError as O, StatusTypeIdMismatchError$1 as P, StatusTypeIdMismatchError$2 as R, OpenServiceMissingChannelError as S, OpenServiceRemoteCommandConfigDriftError as T, OpenServiceAsyncSchemaError as _, init_shortcut as a, OpenServiceInvalidStaticPathError as b, init_instrumenter as c, isTestEnvironment as d, init_csf_utils as f, OpenServiceAsyncRecipeError as g, init_addons as h, init_manager_api as i, StatusTypeIdMismatchError as j, OpenServiceValidationError as k, instrument as l, addons$1 as m, init_useMedia as n, shortcutToAriaKeyshortcuts as o, sanitize as p, useMediaQuery as r, shortcutToHumanString as s, init_globals_runtime as t, init_animation_utils as u, OpenServiceCyclicStateError as v, OpenServiceOperationNameCollisionError as w, OpenServiceLoadedDrainExceededError as x, OpenServiceInternalServiceError as y, UniversalStoreFollowerTimeoutError as z };
|