@aussieljk/forkbook 0.0.1-14 → 0.0.1-15
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/dist/_browser-chunks/{Color-SRJLV635.js → Color-OSKHEBLS.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-66AWY4VQ.js → WithTooltip-IPJFQHVQ.js} +1 -1
- package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
- package/dist/_browser-chunks/{chunk-TISSQK65.js → chunk-74S4GA34.js} +1 -1
- package/dist/_browser-chunks/{chunk-S7N7Z5TY.js → chunk-TRXLBGLS.js} +21 -2
- package/dist/_browser-chunks/{chunk-J4UZWNQC.js → chunk-XRILAR4S.js} +11 -11
- package/dist/_node-chunks/{attached-runtime-6PIRX7CQ.js → attached-runtime-5ABH72AY.js} +28 -28
- package/dist/_node-chunks/{builder-manager-V5HY2EIW.js → builder-manager-4T5FVGUR.js} +18 -15
- package/dist/_node-chunks/{chunk-USLPZFTU.js → chunk-2FWG2MQN.js} +6 -6
- package/dist/_node-chunks/chunk-2YVNFDPN.js +18 -0
- package/dist/_node-chunks/{chunk-IWNGZZOH.js → chunk-33IC7FUB.js} +9 -9
- package/dist/_node-chunks/{chunk-HIUJFVVI.js → chunk-46E6YIPW.js} +7 -7
- package/dist/_node-chunks/{chunk-NRYRRB6R.js → chunk-4BWBFTBZ.js} +7 -7
- package/dist/_node-chunks/{chunk-475RIYQK.js → chunk-4ELXERU6.js} +6 -6
- package/dist/_node-chunks/{chunk-YAASP4OM.js → chunk-4GGXQOD4.js} +8 -8
- package/dist/_node-chunks/{chunk-DBZ3MV24.js → chunk-4ISTQSCO.js} +19 -7
- package/dist/_node-chunks/{chunk-ZDMZKYDQ.js → chunk-4XKLH4I3.js} +6 -6
- package/dist/_node-chunks/{chunk-DMIUL52J.js → chunk-56L6SVSQ.js} +6 -6
- package/dist/_node-chunks/{chunk-4IMBYVSQ.js → chunk-5NWCUFPU.js} +6 -6
- package/dist/_node-chunks/{chunk-6BYFV3Q7.js → chunk-5Y53QRNN.js} +6 -6
- package/dist/_node-chunks/{chunk-UZRRWBTM.js → chunk-6DHYHTHM.js} +8 -8
- package/dist/_node-chunks/{chunk-XOHD6XOU.js → chunk-6H3FQSQV.js} +52 -22
- package/dist/_node-chunks/{chunk-H7BW4AVF.js → chunk-6WHTGFDB.js} +6 -6
- package/dist/_node-chunks/{chunk-ESF43LCU.js → chunk-767UK7PX.js} +9 -9
- package/dist/_node-chunks/{chunk-K3M6GTPC.js → chunk-7IYNKFXW.js} +10 -10
- package/dist/_node-chunks/{chunk-DDKUSQFU.js → chunk-7LYHZMJO.js} +6 -6
- package/dist/_node-chunks/{chunk-KE27G2SG.js → chunk-7RE5WNOM.js} +7 -7
- package/dist/_node-chunks/{chunk-AYCHV6XS.js → chunk-A3EPCOVV.js} +7 -7
- package/dist/_node-chunks/chunk-AK4RPNTY.js +137 -0
- package/dist/_node-chunks/{chunk-H7OP7USW.js → chunk-AUUVNECB.js} +7 -7
- package/dist/_node-chunks/{chunk-AWQ6IMN5.js → chunk-B6JJQARD.js} +9 -9
- package/dist/_node-chunks/chunk-BVF25DJF.js +20 -0
- package/dist/_node-chunks/{chunk-CM4ALPXN.js → chunk-DASUWWHV.js} +6 -6
- package/dist/_node-chunks/{chunk-G7CEHU7W.js → chunk-DJPS7LWH.js} +7 -7
- package/dist/_node-chunks/{chunk-7F55FT5N.js → chunk-DTFPS5QE.js} +7 -7
- package/dist/_node-chunks/{chunk-TR5RJPQV.js → chunk-EHPAFXPB.js} +8 -8
- package/dist/_node-chunks/{chunk-XXQUU56M.js → chunk-FFE4YDDE.js} +9 -9
- package/dist/_node-chunks/{chunk-DLQVZMTD.js → chunk-FJE2XPLI.js} +6 -6
- package/dist/_node-chunks/{chunk-6C6EDUW3.js → chunk-FSSOM72N.js} +14 -14
- package/dist/_node-chunks/{chunk-PU4TVXCV.js → chunk-FVHSCRCK.js} +7 -7
- package/dist/_node-chunks/{chunk-2WWD7IJS.js → chunk-G6M5USWY.js} +8 -8
- package/dist/_node-chunks/{chunk-WWGYV7QI.js → chunk-G7NZ27DS.js} +7 -7
- package/dist/_node-chunks/{chunk-XAK4JWKF.js → chunk-GRJPH3NW.js} +8 -8
- package/dist/_node-chunks/{chunk-56Y4ZIQS.js → chunk-H4IDYTC4.js} +7 -7
- package/dist/_node-chunks/{chunk-PB5OW47R.js → chunk-H5AAYJZE.js} +8 -8
- package/dist/_node-chunks/{chunk-KO7CKNTP.js → chunk-HK47D3O3.js} +7 -7
- package/dist/_node-chunks/{chunk-5VLJNYCG.js → chunk-J2ZTT2OP.js} +33 -23
- package/dist/_node-chunks/{chunk-2DGZADP4.js → chunk-JAPFAHXG.js} +6 -6
- package/dist/_node-chunks/{chunk-OZM2N3ZY.js → chunk-JC4I7ZVM.js} +7 -7
- package/dist/_node-chunks/{chunk-YUZDQTG3.js → chunk-JCQU3LND.js} +7 -7
- package/dist/_node-chunks/{chunk-OGF5O46G.js → chunk-JQKD337A.js} +6 -6
- package/dist/_node-chunks/{chunk-QP5A3OYV.js → chunk-JYQSJLIK.js} +8 -8
- package/dist/_node-chunks/{chunk-4IRW4KVR.js → chunk-KFZRX33G.js} +8 -8
- package/dist/_node-chunks/{chunk-QVEPLFS4.js → chunk-KIAQML4H.js} +8 -8
- package/dist/_node-chunks/{chunk-YHXP7DMA.js → chunk-LHRQTTE7.js} +8 -8
- package/dist/_node-chunks/{chunk-JBQXQVOG.js → chunk-LNMVMXBN.js} +7 -7
- package/dist/_node-chunks/chunk-M6LN66WA.js +20 -0
- package/dist/_node-chunks/{chunk-DQHAJZYL.js → chunk-M75NG64K.js} +7 -7
- package/dist/_node-chunks/{chunk-4MFP6QG3.js → chunk-MBTS4OBP.js} +6 -6
- package/dist/_node-chunks/chunk-MBTTUFUX.js +11 -0
- package/dist/_node-chunks/{chunk-5A53X2WP.js → chunk-MLJPAH4O.js} +6 -6
- package/dist/_node-chunks/{chunk-T3SCXAMA.js → chunk-NGFVR7UO.js} +6 -6
- package/dist/_node-chunks/{chunk-IXZUAPGY.js → chunk-ONKMPF4O.js} +6 -6
- package/dist/_node-chunks/{chunk-CCJIZTUJ.js → chunk-OS6P62RS.js} +6 -6
- package/dist/_node-chunks/{chunk-PXN2IFPG.js → chunk-QAQWINPN.js} +7 -7
- package/dist/_node-chunks/{chunk-4RBPVBKC.js → chunk-QF4WUMRT.js} +10 -10
- package/dist/_node-chunks/{chunk-3MBZZMYZ.js → chunk-QF5RQWCH.js} +6 -6
- package/dist/_node-chunks/{chunk-TH6GIF3K.js → chunk-QZR6HJVD.js} +7 -7
- package/dist/_node-chunks/chunk-R5H4DAON.js +19 -0
- package/dist/_node-chunks/{chunk-LXLNUUFW.js → chunk-RENIT4CI.js} +6 -6
- package/dist/_node-chunks/{chunk-QTB7G4LF.js → chunk-SJVTZ4IO.js} +23 -23
- package/dist/_node-chunks/{chunk-5OVUKRFB.js → chunk-SL53Q3H4.js} +6 -6
- package/dist/_node-chunks/{chunk-CXSBVV4J.js → chunk-T34DVPWM.js} +6 -6
- package/dist/_node-chunks/{chunk-S2IX32KL.js → chunk-TVDV6YAE.js} +8 -8
- package/dist/_node-chunks/{chunk-CEBBAWIT.js → chunk-U6T34IDM.js} +6 -6
- package/dist/_node-chunks/{chunk-LGMNVTJZ.js → chunk-UAU6RMOS.js} +19 -19
- package/dist/_node-chunks/{chunk-3MBTHKMD.js → chunk-UMWJISED.js} +6 -6
- package/dist/_node-chunks/{chunk-Q7ADULRW.js → chunk-UO3EXKJC.js} +6 -6
- package/dist/_node-chunks/{chunk-ST7CLK7N.js → chunk-VCKRLODV.js} +8 -8
- package/dist/_node-chunks/{chunk-DYHMJVLZ.js → chunk-VS4AUXP2.js} +6 -6
- package/dist/_node-chunks/{chunk-MACS5P6Q.js → chunk-VUHK6VXL.js} +12 -12
- package/dist/_node-chunks/{chunk-EYZMI5JO.js → chunk-VUP4EHUR.js} +8 -8
- package/dist/_node-chunks/{chunk-IY3BJJVM.js → chunk-VXDKI65K.js} +26 -26
- package/dist/_node-chunks/{chunk-QGJV32VT.js → chunk-W32FBKF3.js} +10 -10
- package/dist/_node-chunks/{chunk-RH4PXLHE.js → chunk-W6AOA2O5.js} +7 -7
- package/dist/_node-chunks/{chunk-FMXUZSLI.js → chunk-W7352H3Q.js} +6 -6
- package/dist/_node-chunks/{chunk-VHSRKW3N.js → chunk-WMUNVUVG.js} +6 -6
- package/dist/_node-chunks/{chunk-UWM37IXC.js → chunk-WTZ24FWN.js} +8 -8
- package/dist/_node-chunks/{chunk-YMF2ZP77.js → chunk-X3BAGYZJ.js} +8 -8
- package/dist/_node-chunks/{chunk-FDWORQWO.js → chunk-XERNMHVC.js} +6 -6
- package/dist/_node-chunks/chunk-XU6HITGZ.js +25 -0
- package/dist/_node-chunks/chunk-XV76A4CX.js +47 -0
- package/dist/_node-chunks/{chunk-HXFN2M2F.js → chunk-XWHHBYMV.js} +6 -6
- package/dist/_node-chunks/{chunk-WDSTXRQP.js → chunk-Y3FJT543.js} +7 -7
- package/dist/_node-chunks/{chunk-LBAKDZV6.js → chunk-YHYL4HYS.js} +6 -6
- package/dist/_node-chunks/{chunk-CH5FN27Z.js → chunk-ZNT3JZI2.js} +7 -7
- package/dist/_node-chunks/{chunk-NZ2SSNU7.js → chunk-ZPWEQZYR.js} +7 -7
- package/dist/_node-chunks/{chunk-PTMZZHGA.js → chunk-ZSTCVYOA.js} +6 -6
- package/dist/_node-chunks/dist-2H6YEUMD.js +16 -0
- package/dist/_node-chunks/dist-HL4THRGZ.js +27 -0
- package/dist/_node-chunks/{local-runtime-2DFMXO2N.js → local-runtime-W3N7O65Q.js} +19 -19
- package/dist/_node-chunks/{mdx-plugin-FEC4UKBF.js → mdx-plugin-NVSAW2N3.js} +13 -13
- package/dist/_node-chunks/{monorepo-TRTFPD3M.js → monorepo-JDWM46J3.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-D3VPQGCI.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-56HEREMG.js} +11 -11
- package/dist/_node-chunks/optimized-tests-VZGTWCG4.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-ZUQ2ZQ7T.js → pattern-copy-play-ZWHYXQK5.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-5TRUTJXJ.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-MEOVNWZI.js → rehype-external-links-ME2XNDXH.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-RRLOM7B4.js → rehype-slug-2UJLYPC6.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-RGYTFJP3.js → relaxed-limits-XWE3S456.js} +11 -11
- package/dist/_node-chunks/{run-FRTM74WS.js → run-5YG73LXV.js} +17 -17
- package/dist/_node-chunks/{run-YVMIX6AJ.js → run-DNDPGCFE.js} +15 -15
- package/dist/_node-chunks/{setup-4TBDLNSA.js → setup-MDNSLQIJ.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-GCYBLHAD.js → vitest.config.4.template-TXAUMPSS.js} +7 -7
- package/dist/addon-a11y/manager.js +4 -4
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-comments/manager.js +346 -0
- package/dist/addon-comments/preset.js +52 -0
- package/dist/addon-comments/preview.js +101 -0
- package/dist/addon-docs/blocks.js +10 -10
- package/dist/addon-docs/manager.js +1 -1
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-mcp/preset.js +138 -38
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +13 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +3 -3
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +14 -14
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +12 -12
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +56 -56
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +2 -2
- package/dist/channels/index.js +68 -17
- package/dist/{chunk-BCG2ui5q.d.ts → chunk-BRMwIGWt.d.ts} +14 -3
- package/dist/{chunk-LWwxlbee.d.ts → chunk-C4-cnJ1R.d.ts} +1 -1
- package/dist/{chunk-u_gGuTrz.d.ts → chunk-QtkUsZCs.d.ts} +27 -2
- package/dist/{chunk-BV_hETtB.d.ts → chunk-s5Ka0eSs.d.ts} +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +21 -21
- 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 +2 -2
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/common/index.d.ts +3 -3
- package/dist/common/index.js +34 -34
- package/dist/components/index.js +29 -29
- package/dist/core-events/index.d.ts +3 -2
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +23 -3
- package/dist/core-server/index.js +206 -103
- package/dist/core-server/presets/common-manager.js +17 -9
- package/dist/core-server/presets/common-override-preset.js +10 -10
- package/dist/core-server/presets/common-preset.js +38 -38
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.js +1 -1
- package/dist/csf-tools/index.js +12 -12
- package/dist/manager/_manager-chunks/{globals-runtime-BIrCHXzl.js → globals-runtime-BUEqXras.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-CHSN7ayG.js → globals-runtime-BsHjh8rR.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-tTC_6sNF.js → globals-runtime-CQ0Et7dZ.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-Cw7lbjdT.js → globals-runtime-DChrMWvh.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-LBSQHYdZ.js → globals-runtime-DiIxNujJ.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-BypvnYKb.js → globals-runtime-DjkYleFR.js} +174 -104
- package/dist/manager/_manager-chunks/{runtime-Db8fJ2MP.js → runtime-BMoEpoix.js} +24 -21
- package/dist/manager/_manager-chunks/{runtime-DNudxxRZ.js → runtime-BWASr_zc.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-BjFN_NTg.js → runtime-B_e-Zdqt.js} +12 -8
- package/dist/manager/_manager-chunks/{runtime-CmF_ONjM.js → runtime-CEi1oIg2.js} +420 -326
- package/dist/manager/_manager-chunks/{runtime-DAe0yHIe.js → runtime-CLIeRJL-.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-Bm0yxY5O.js → runtime-CWZ9qCi4.js} +51 -24
- package/dist/manager/_manager-chunks/{runtime-DE1NZ9Fx.js → runtime-CXOuNYw-.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-BUwzOVia.js → runtime-C_H6vGzi.js} +6 -5
- package/dist/manager/_manager-chunks/{runtime-X3QUx4F_.js → runtime-Dn2myy1z.js} +8 -8
- package/dist/manager/_manager-chunks/{runtime-CZtDJIYj.js → runtime-TSEq5lJd.js} +1 -1
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +9 -9
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +15 -11
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.js +8 -8
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +10 -10
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-tyJLgv6h.js → runtime-COMyPEkR.js} +97 -27
- package/dist/preview/_chunks/{runtime-CdZ1yk7m.js → runtime-CqTqsVg2.js} +2 -2
- package/dist/preview/_chunks/{runtime-U1Ycy25F.js → runtime-CrKf1OM4.js} +2 -2
- package/dist/preview/_chunks/{runtime-CsO4apr9.js → runtime-YJlypwja.js} +30 -5
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +2 -2
- package/dist/preview-api/index.js +1 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -11
- package/dist/react/preset.js +13 -13
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/withForkbook.js +13 -13
- package/dist/react-native/scripts/generate.js +8 -8
- 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/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +11 -11
- package/dist/types/index.d.ts +2 -2
- package/package.json +13 -1
- package/dist/_node-chunks/chunk-DGXCQ24N.js +0 -20
- package/dist/_node-chunks/chunk-HLVUFCKZ.js +0 -18
- package/dist/_node-chunks/chunk-K5OUTGSQ.js +0 -25
- package/dist/_node-chunks/chunk-RG3VKQXD.js +0 -11
- package/dist/_node-chunks/chunk-SAVT2SUC.js +0 -20
- package/dist/_node-chunks/chunk-UOIQLKIA.js +0 -19
- package/dist/_node-chunks/dist-474BX4RE.js +0 -27
- package/dist/_node-chunks/dist-U25X3BJ2.js +0 -16
- package/dist/_node-chunks/optimized-tests-4LM55CRN.js +0 -22
- package/dist/_node-chunks/postinstallAddon-OUVXGSJV.js +0 -20
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EVENTS
|
|
3
|
+
} from "../_browser-chunks/chunk-4ZGQ4YQ2.js";
|
|
4
|
+
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
5
|
+
|
|
6
|
+
// src/addon-comments/preview.ts
|
|
7
|
+
import { addons } from "@aussieljk/forkbook/preview-api";
|
|
8
|
+
|
|
9
|
+
// src/addon-comments/selector.ts
|
|
10
|
+
var escapeIdent = (value) => typeof CSS < "u" && CSS.escape ? CSS.escape(value) : value.replace(/[^\w-]/g, "\\$&");
|
|
11
|
+
function getCssSelector(element) {
|
|
12
|
+
let parts = [], current = element;
|
|
13
|
+
for (; current && current.tagName.toLowerCase() !== "html"; ) {
|
|
14
|
+
let tag = current.tagName.toLowerCase();
|
|
15
|
+
if (current.id) {
|
|
16
|
+
parts.unshift(`#${escapeIdent(current.id)}`);
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
let testId = current.getAttribute("data-testid");
|
|
20
|
+
if (testId) {
|
|
21
|
+
parts.unshift(`${tag}[data-testid="${testId.replace(/"/g, '\\"')}"]`);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
let part = tag, parent = current.parentElement;
|
|
25
|
+
if (parent) {
|
|
26
|
+
let tagName = current.tagName, sameTag = Array.from(parent.children).filter((child) => child.tagName === tagName);
|
|
27
|
+
sameTag.length > 1 && (part += `:nth-of-type(${sameTag.indexOf(current) + 1})`);
|
|
28
|
+
}
|
|
29
|
+
if (parts.unshift(part), tag === "body")
|
|
30
|
+
break;
|
|
31
|
+
current = parent;
|
|
32
|
+
}
|
|
33
|
+
return parts.join(" > ");
|
|
34
|
+
}
|
|
35
|
+
function getTextSnippet(element) {
|
|
36
|
+
let text = (element.innerText || element.textContent || "").replace(/\s+/g, " ").trim();
|
|
37
|
+
return text.length > 120 ? `${text.slice(0, 119)}\u2026` : text;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/addon-comments/picker.ts
|
|
41
|
+
var OVERLAY_ID = "forkbook-comments-picker-overlay";
|
|
42
|
+
function startPicker(doc, onPick, onEnd) {
|
|
43
|
+
let overlay = doc.createElement("div");
|
|
44
|
+
overlay.id = OVERLAY_ID, Object.assign(overlay.style, {
|
|
45
|
+
position: "fixed",
|
|
46
|
+
pointerEvents: "none",
|
|
47
|
+
zIndex: "2147483647",
|
|
48
|
+
outline: "2px solid #ff4785",
|
|
49
|
+
background: "rgba(255, 71, 133, 0.12)",
|
|
50
|
+
display: "none"
|
|
51
|
+
}), doc.body.appendChild(overlay);
|
|
52
|
+
let previousCursor = doc.body.style.cursor;
|
|
53
|
+
doc.body.style.cursor = "crosshair";
|
|
54
|
+
let onMove = (event) => {
|
|
55
|
+
let target = event.target;
|
|
56
|
+
if (!target || target === overlay || !target.getBoundingClientRect)
|
|
57
|
+
return;
|
|
58
|
+
let rect = target.getBoundingClientRect();
|
|
59
|
+
Object.assign(overlay.style, {
|
|
60
|
+
display: "block",
|
|
61
|
+
top: `${rect.top}px`,
|
|
62
|
+
left: `${rect.left}px`,
|
|
63
|
+
width: `${rect.width}px`,
|
|
64
|
+
height: `${rect.height}px`
|
|
65
|
+
});
|
|
66
|
+
}, onClick = (event) => {
|
|
67
|
+
event.preventDefault(), event.stopPropagation();
|
|
68
|
+
let target = event.target;
|
|
69
|
+
stop(), target && onPick({ selector: getCssSelector(target), text: getTextSnippet(target) });
|
|
70
|
+
}, onKey = (event) => {
|
|
71
|
+
event.key === "Escape" && (stop(), onEnd());
|
|
72
|
+
}, block = (event) => {
|
|
73
|
+
event.preventDefault(), event.stopPropagation();
|
|
74
|
+
};
|
|
75
|
+
doc.addEventListener("mousemove", onMove, !0), doc.addEventListener("click", onClick, !0), doc.addEventListener("mousedown", block, !0), doc.addEventListener("mouseup", block, !0), doc.addEventListener("keydown", onKey, !0);
|
|
76
|
+
let stopped = !1;
|
|
77
|
+
function stop() {
|
|
78
|
+
stopped || (stopped = !0, doc.removeEventListener("mousemove", onMove, !0), doc.removeEventListener("click", onClick, !0), doc.removeEventListener("mousedown", block, !0), doc.removeEventListener("mouseup", block, !0), doc.removeEventListener("keydown", onKey, !0), overlay.remove(), doc.body.style.cursor = previousCursor);
|
|
79
|
+
}
|
|
80
|
+
return stop;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/addon-comments/preview.ts
|
|
84
|
+
var globalState = globalThis;
|
|
85
|
+
if (!globalState.__FORKBOOK_COMMENTS_PICKER__ && typeof document < "u") {
|
|
86
|
+
globalState.__FORKBOOK_COMMENTS_PICKER__ = !0;
|
|
87
|
+
let channel = addons.getChannel(), stop;
|
|
88
|
+
channel.on(EVENTS.PICK_START, () => {
|
|
89
|
+
stop?.(), stop = startPicker(
|
|
90
|
+
document,
|
|
91
|
+
(element) => {
|
|
92
|
+
stop = void 0, channel.emit(EVENTS.PICKED, element);
|
|
93
|
+
},
|
|
94
|
+
() => {
|
|
95
|
+
stop = void 0, channel.emit(EVENTS.PICK_ENDED);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}), channel.on(EVENTS.PICK_CANCEL, () => {
|
|
99
|
+
stop?.(), stop = void 0;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SnippetWarning,
|
|
3
3
|
Source
|
|
4
|
-
} from "../_browser-chunks/chunk-
|
|
4
|
+
} from "../_browser-chunks/chunk-74S4GA34.js";
|
|
5
5
|
import {
|
|
6
6
|
ArgsTable,
|
|
7
7
|
BooleanControl,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
parse,
|
|
22
22
|
parseDate,
|
|
23
23
|
parseTime
|
|
24
|
-
} from "../_browser-chunks/chunk-
|
|
24
|
+
} from "../_browser-chunks/chunk-XRILAR4S.js";
|
|
25
25
|
import "../_browser-chunks/chunk-PJSMZ27A.js";
|
|
26
26
|
import "../_browser-chunks/chunk-2WZWS7GJ.js";
|
|
27
27
|
import {
|
|
@@ -54,7 +54,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
|
|
|
54
54
|
let style = document.createElement("style");
|
|
55
55
|
style.setAttribute("data-fb-css", id), style.textContent = ".fb-JTDUUW-subtitle{font-weight:var(--fb-weight-regular);font-size:var(--fb-size-s3);color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .25));border-bottom:none;margin-bottom:15px;line-height:20px;@media (width>=600px){font-size:var(--fb-size-m1);margin-bottom:24px;line-height:28px}}.fb-JTDUUW-docsWrapper{background:var(--fb-background-content);box-sizing:border-box;flex-direction:row-reverse;justify-content:center;gap:3rem;min-height:100vh;padding:4rem 40px;display:flex}.fb-JTDUUW-docsContent{--docs-code-border:var(--fb-color-mediumlight);--docs-code-color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .1));--docs-code-background:var(--fb-color-lighter);--docs-table-header-background:var(--fb-color-lighter);flex:1;width:100%;min-width:0;max-width:1000px;& :where(a:not(.fb-anchor,.fb-unstyled,.fb-unstyled a)),& :where(blockquote:not(.fb-anchor,.fb-unstyled,.fb-unstyled blockquote)),& :where(div:not(.fb-anchor,.fb-unstyled,.fb-unstyled div)),& :where(dl:not(.fb-anchor,.fb-unstyled,.fb-unstyled dl)),& :where(h1:not(.fb-anchor,.fb-unstyled,.fb-unstyled h1)),& :where(h2:not(.fb-anchor,.fb-unstyled,.fb-unstyled h2)),& :where(h3:not(.fb-anchor,.fb-unstyled,.fb-unstyled h3)),& :where(h4:not(.fb-anchor,.fb-unstyled,.fb-unstyled h4)),& :where(h5:not(.fb-anchor,.fb-unstyled,.fb-unstyled h5)),& :where(h6:not(.fb-anchor,.fb-unstyled,.fb-unstyled h6)),& :where(li:not(.fb-anchor,.fb-unstyled,.fb-unstyled li)),& :where(ol:not(.fb-anchor,.fb-unstyled,.fb-unstyled ol)),& :where(p:not(.fb-anchor,.fb-unstyled,.fb-unstyled p)),& :where(pre:not(.fb-anchor,.fb-unstyled,.fb-unstyled pre)),& :where(span:not(.fb-anchor,.fb-unstyled,.fb-unstyled span)),& :where(table:not(.fb-anchor,.fb-unstyled,.fb-unstyled table)),& :where(ul:not(.fb-anchor,.fb-unstyled,.fb-unstyled ul)){font-family:var(--fb-font-base);font-size:var(--fb-size-s3);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch;margin:0}& :where(h1:not(.fb-anchor,.fb-unstyled,.fb-unstyled h1)),& :where(h2:not(.fb-anchor,.fb-unstyled,.fb-unstyled h2)),& :where(h3:not(.fb-anchor,.fb-unstyled,.fb-unstyled h3)),& :where(h4:not(.fb-anchor,.fb-unstyled,.fb-unstyled h4)),& :where(h5:not(.fb-anchor,.fb-unstyled,.fb-unstyled h5)),& :where(h6:not(.fb-anchor,.fb-unstyled,.fb-unstyled h6)){cursor:text;color:var(--fb-color-default-text);margin:20px 0 8px;padding:0;position:relative;&:first-of-type{margin-top:0;padding-top:0}&:hover a.anchor{text-decoration:none}& code{font-size:inherit}}& :where(li:not(.fb-anchor,.fb-unstyled,.fb-unstyled li)) code,& :where(p:not(.fb-anchor,.fb-unstyled,.fb-unstyled p)) code{white-space:nowrap;line-height:1;font-size:calc(var(--fb-size-s2) - 1px);border:1px solid var(--docs-code-border);color:var(--docs-code-color);background-color:var(--docs-code-background);border-radius:3px;margin:0 2px;padding:3px 5px}& :where(a:not(.fb-anchor,.fb-unstyled,.fb-unstyled a)){font-size:inherit;color:var(--fb-color-secondary);text-underline-offset:.11em;line-height:24px;text-decoration:underline .03125rem;&.absent{color:#c00}&.anchor{cursor:pointer;margin-left:-30px;padding-left:30px;text-decoration:none;display:block;position:absolute;top:0;bottom:0;left:0}&.anchor:hover,&.anchor:focus{text-decoration:underline}}& :where(blockquote:not(.fb-anchor,.fb-unstyled,.fb-unstyled blockquote)){border-left:4px solid var(--fb-color-medium);color:var(--fb-color-dark);margin:16px 0;padding:0 15px;&>:first-of-type{margin-top:0}&>:last-child{margin-bottom:0}}& :where(dl:not(.fb-anchor,.fb-unstyled,.fb-unstyled dl)){margin:16px 0;padding:0;& dt{margin:16px 0 4px;padding:0;font-size:14px;font-style:italic;font-weight:700}& dt:first-of-type{padding:0}& dt>:first-of-type{margin-top:0}& dt>:last-child{margin-bottom:0}& dd{margin:0 0 16px;padding:0 15px}& dd>:first-of-type{margin-top:0}& dd>:last-child{margin-bottom:0}}& :where(h1:not(.fb-anchor,.fb-unstyled,.fb-unstyled h1)){font-size:var(--fb-size-l1);font-weight:var(--fb-weight-bold)}& :where(h2:not(.fb-anchor,.fb-unstyled,.fb-unstyled h2)){font-size:var(--fb-size-m2);border-bottom:1px solid var(--fb-app-border-color);padding-bottom:4px}& :where(h3:not(.fb-anchor,.fb-unstyled,.fb-unstyled h3)){font-size:var(--fb-size-m1);font-weight:var(--fb-weight-bold)}& :where(h4:not(.fb-anchor,.fb-unstyled,.fb-unstyled h4)){font-size:var(--fb-size-s3)}& :where(h5:not(.fb-anchor,.fb-unstyled,.fb-unstyled h5)){font-size:var(--fb-size-s2)}& :where(h6:not(.fb-anchor,.fb-unstyled,.fb-unstyled h6)){font-size:var(--fb-size-s2);color:var(--fb-color-dark)}& :where(hr:not(.fb-anchor,.fb-unstyled,.fb-unstyled hr)){border:0;border-top:1px solid var(--fb-app-border-color);height:4px;padding:0}& :where(img:not(.fb-anchor,.fb-unstyled,.fb-unstyled img)){max-width:100%}& :where(li:not(.fb-anchor,.fb-unstyled,.fb-unstyled li)){font-size:var(--fb-size-s2);color:var(--fb-color-default-text);line-height:24px;&+li{margin-top:.25em}& ul,& ol{margin-top:.25em;margin-bottom:0}}& :where(ol:not(.fb-anchor,.fb-unstyled,.fb-unstyled ol)),& :where(ul:not(.fb-anchor,.fb-unstyled,.fb-unstyled ul)){margin:16px 0;padding-left:30px;& :first-of-type{margin-top:0}& :last-child{margin-bottom:0}}& :where(ul:not(.fb-anchor,.fb-unstyled,.fb-unstyled ul)){list-style:outside}& :where(p:not(.fb-anchor,.fb-unstyled,.fb-unstyled p)){font-size:var(--fb-size-s2);color:var(--fb-color-default-text);margin:16px 0;line-height:24px}& :where(pre:not(.fb-anchor,.fb-unstyled,.fb-unstyled pre)){font-family:var(--fb-font-mono);white-space:pre-wrap;color:inherit;border-radius:3px;margin:1rem 0;padding:11px 1rem;line-height:18px;&:not(.prismjs){background:0 0;border:none;border-radius:0;margin:0;padding:0}& pre,&.prismjs{white-space:pre-wrap;color:inherit;margin:0;padding:15px;font-size:13px;line-height:19px;& code{color:inherit;font-size:inherit}}& code{white-space:pre}& code,& tt{border:none}}& :where(span:not(.fb-anchor,.fb-unstyled,.fb-unstyled span)){&.frame{display:block;overflow:hidden;&>span{border:1px solid var(--fb-color-medium);float:left;width:auto;margin:13px 0 0;padding:7px;display:block;overflow:hidden}& span img{float:left;display:block}& span span{clear:both;color:var(--fb-color-darkest);padding:5px 0 0;display:block}}&.align-center{clear:both;display:block;overflow:hidden;&>span{text-align:center;margin:13px auto 0;display:block;overflow:hidden}& span img{text-align:center;margin:0 auto}}&.align-right{clear:both;display:block;overflow:hidden;&>span{text-align:right;margin:13px 0 0;display:block;overflow:hidden}& span img{text-align:right;margin:0}}&.float-left{float:left;margin-right:13px;display:block;overflow:hidden;& span{margin:13px 0 0}}&.float-right{float:right;margin-left:13px;display:block;overflow:hidden;&>span{text-align:right;margin:13px auto 0;display:block;overflow:hidden}}}& :where(table:not(.fb-anchor,.fb-unstyled,.fb-unstyled table)){max-width:100%;font-size:var(--fb-size-s2);border-collapse:collapse;border-spacing:0;margin:16px 0;padding:0;line-height:22px;display:block;overflow-x:auto;& tr{margin:0;padding:0}& tr th{font-weight:var(--fb-weight-bold);text-align:left;color:var(--fb-color-default-text);background:var(--docs-table-header-background);border:1px solid var(--fb-app-border-color);vertical-align:bottom;margin:0;padding:8px 12px}& tr td{border:1px solid var(--fb-app-border-color);color:var(--fb-color-default-text);vertical-align:top;margin:0;padding:8px 12px}& tr th :first-of-type,& tr td :first-of-type{margin-top:0}& tr th :last-child,& tr td :last-child{margin-bottom:0}}}:where([data-fb-theme=dark]) .fb-JTDUUW-docsContent{--docs-code-border:var(--fb-color-darker);--docs-code-color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .3));--docs-code-background:var(--fb-color-border);--docs-table-header-background:var(--fb-color-darker)}", document.head.appendChild(style);
|
|
56
56
|
}
|
|
57
|
-
var DocsPage_default = {
|
|
57
|
+
var DocsPage_default = { docsWrapper: "fb-JTDUUW-docsWrapper", subtitle: "fb-JTDUUW-subtitle", docsContent: "fb-JTDUUW-docsContent" };
|
|
58
58
|
|
|
59
59
|
// src/addon-docs/blocks/components/Title.tsx
|
|
60
60
|
import { withReset } from "@aussieljk/forkbook/internal/components";
|
|
@@ -319,7 +319,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id4}"
|
|
|
319
319
|
let style = document.createElement("style");
|
|
320
320
|
style.setAttribute("data-fb-css", id4), style.textContent = ".fb-zhwxuG-absoluteBar{align-items:center;transition:transform .2s linear;display:flex;position:absolute;top:0;left:0;right:0}.fb-zhwxuG-wrapper{align-items:center;gap:4px;display:flex}.fb-zhwxuG-iconPlaceholder{background-color:var(--fb-app-border-color);border-radius:2px;width:14px;height:14px;margin:0 7px;animation:1.5s ease-in-out infinite fb-zhwxuG-glow}@keyframes fb-zhwxuG-glow{0%,to{opacity:1}50%{opacity:.4}}", document.head.appendChild(style);
|
|
321
321
|
}
|
|
322
|
-
var Toolbar_default = {
|
|
322
|
+
var Toolbar_default = { wrapper: "fb-zhwxuG-wrapper", glow: "fb-zhwxuG-glow", iconPlaceholder: "fb-zhwxuG-iconPlaceholder", absoluteBar: "fb-zhwxuG-absoluteBar" };
|
|
323
323
|
|
|
324
324
|
// src/addon-docs/blocks/components/Toolbar.tsx
|
|
325
325
|
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -417,7 +417,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id5}"
|
|
|
417
417
|
let style = document.createElement("style");
|
|
418
418
|
style.setAttribute("data-fb-css", id5), style.textContent = ".fb-3lk6NG-childrenContainer{flex-flow:wrap;display:block;position:relative;overflow:auto;& .innerZoomElementWrapper>*{max-width:calc(100% - 20px);display:inline-block}}.fb-3lk6NG-childrenContainer:where([data-flex]){display:flex}.fb-3lk6NG-childrenContainer:where([data-column]){flex-direction:column;& .innerZoomElementWrapper>*{width:calc(100% - 20px);max-width:none;display:block}}.fb-3lk6NG-childrenContainer:where([data-layout=fullscreen]) .innerZoomElementWrapper>*{max-width:100%}.fb-3lk6NG-childrenContainer:where([data-layout=fullscreen][data-column]) .innerZoomElementWrapper>*{width:100%;max-width:none}.fb-3lk6NG-childrenContainer:where([data-layout=padded],[data-layout=centered]){padding:0;& .innerZoomElementWrapper>*{width:auto;border:8px solid #0000!important}}.fb-3lk6NG-childrenContainer:where([data-layout=padded][data-inline],[data-layout=centered][data-inline]){padding:32px 22px}.fb-3lk6NG-childrenContainer:where([data-layout=centered][data-inline]){place-content:center;place-items:center;display:flex}.fb-3lk6NG-childrenContainer:where([data-columns]) .innerZoomElementWrapper>*{min-width:calc(100% / var(--preview-columns) - 20px)}.fb-3lk6NG-actionBar{margin-top:-40px;margin-bottom:40px}.fb-3lk6NG-trailingSnippetWarning{margin-inline:auto 10px}.fb-3lk6NG-previewContainer{--preview-source-background:#000000d9;margin:25px 0 40px;position:relative;overflow:hidden;h3+&{margin-top:16px}}:where([data-fb-theme=dark]) .fb-3lk6NG-previewContainer{--preview-source-background:hsl(from var(--fb-background-content) h s calc(l - 5))}.fb-3lk6NG-previewContainer:where([data-with-toolbar]){padding-top:40px}.fb-3lk6NG-source{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--fb-app-border-radius);border-bottom-right-radius:var(--fb-app-border-radius);background:var(--preview-source-background);color:var(--fb-color-lightest);border:none;margin:0;& button{background:var(--preview-source-background)}}.fb-3lk6NG-positionedToolbar{height:40px;position:absolute;top:0;left:0;right:0}.fb-3lk6NG-skeleton .docs-story{padding-top:32px;padding-bottom:40px}", document.head.appendChild(style);
|
|
419
419
|
}
|
|
420
|
-
var Preview_default = {
|
|
420
|
+
var Preview_default = { childrenContainer: "fb-3lk6NG-childrenContainer", trailingSnippetWarning: "fb-3lk6NG-trailingSnippetWarning", source: "fb-3lk6NG-source", positionedToolbar: "fb-3lk6NG-positionedToolbar", previewContainer: "fb-3lk6NG-previewContainer", skeleton: "fb-3lk6NG-skeleton", actionBar: "fb-3lk6NG-actionBar" };
|
|
421
421
|
|
|
422
422
|
// src/addon-docs/blocks/components/Preview.tsx
|
|
423
423
|
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -593,7 +593,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id6}"
|
|
|
593
593
|
let style = document.createElement("style");
|
|
594
594
|
style.setAttribute("data-fb-css", id6), style.textContent = ".fb-JrHkka-label{font-size:var(--fb-size-s1);color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .4));margin-right:30px}:where([data-fb-theme=dark]) .fb-JrHkka-label{color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .6))}.fb-JrHkka-sample{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fb-JrHkka-typeSpecimen{flex-direction:row;align-items:baseline;display:flex;&:not(:last-child){margin-bottom:1rem}}.fb-JrHkka-wrapper{margin:25px 0 40px;padding:30px 20px}", document.head.appendChild(style);
|
|
595
595
|
}
|
|
596
|
-
var Typeset_default = {
|
|
596
|
+
var Typeset_default = { sample: "fb-JrHkka-sample", wrapper: "fb-JrHkka-wrapper", label: "fb-JrHkka-label", typeSpecimen: "fb-JrHkka-typeSpecimen" };
|
|
597
597
|
|
|
598
598
|
// src/addon-docs/blocks/components/Typeset.tsx
|
|
599
599
|
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
@@ -636,7 +636,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id7}"
|
|
|
636
636
|
let style = document.createElement("style");
|
|
637
637
|
style.setAttribute("data-fb-css", id7), style.textContent = '.fb-yLo5nG-itemTitle{font-weight:var(--fb-weight-bold);color:var(--fb-color-default-text)}.fb-yLo5nG-itemSubtitle{color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .3))}.fb-yLo5nG-itemDescription{flex:0 0 30%;margin-top:5px;line-height:20px}.fb-yLo5nG-swatchLabel{text-align:center;font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .3));flex:1;line-height:1;overflow:hidden;&>div{text-overflow:ellipsis;max-width:100%;display:inline-block;overflow:hidden}& span{margin-top:2px;display:block}}.fb-yLo5nG-swatchLabels{flex-direction:row;display:flex}.fb-yLo5nG-swatch{flex:1;position:relative;&:before{background:var(--swatch-background);content:"";width:100%;height:100%;position:absolute;top:0;left:0}}.fb-yLo5nG-swatchColors{background-color:#fff;background-image:repeating-linear-gradient(-45deg,#ccc,#ccc 1px,#fff 1px 16px);background-clip:padding-box;flex-direction:row;height:50px;margin-bottom:5px;display:flex;overflow:hidden}.fb-yLo5nG-swatchSpecimen{flex-direction:column;flex:1;margin-bottom:30px;display:flex;position:relative}.fb-yLo5nG-swatches{flex-direction:row;flex:1;display:flex}.fb-yLo5nG-item{align-items:flex-start;display:flex}.fb-yLo5nG-listName{flex:0 0 30%}.fb-yLo5nG-listSwatches{flex:1}.fb-yLo5nG-listHeading{font-weight:var(--fb-weight-bold);color:rgb(from var(--fb-color-default-text) r g b / calc(alpha - .3));flex-direction:row;align-items:center;padding-bottom:20px;display:flex}.fb-yLo5nG-list{font-size:var(--fb-size-s2);flex-direction:column;line-height:20px;display:flex}', document.head.appendChild(style);
|
|
638
638
|
}
|
|
639
|
-
var ColorPalette_default = {
|
|
639
|
+
var ColorPalette_default = { itemSubtitle: "fb-yLo5nG-itemSubtitle", swatchLabels: "fb-yLo5nG-swatchLabels", swatchLabel: "fb-yLo5nG-swatchLabel", listName: "fb-yLo5nG-listName", itemDescription: "fb-yLo5nG-itemDescription", swatch: "fb-yLo5nG-swatch", swatchColors: "fb-yLo5nG-swatchColors", listSwatches: "fb-yLo5nG-listSwatches", itemTitle: "fb-yLo5nG-itemTitle", list: "fb-yLo5nG-list", swatchSpecimen: "fb-yLo5nG-swatchSpecimen", listHeading: "fb-yLo5nG-listHeading", swatches: "fb-yLo5nG-swatches", item: "fb-yLo5nG-item" };
|
|
640
640
|
|
|
641
641
|
// src/addon-docs/blocks/components/ColorPalette.tsx
|
|
642
642
|
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
@@ -696,7 +696,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id8}"
|
|
|
696
696
|
let style = document.createElement("style");
|
|
697
697
|
style.setAttribute("data-fb-css", id8), style.textContent = ".fb-P_cJ1a-itemLabel{font-family:var(--fb-font-base);font-size:var(--fb-size-s1);color:var(--fb-color-default-text);word-break:break-word;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-left:10px;line-height:1.2;display:-webkit-box;overflow:hidden}.fb-P_cJ1a-itemSpecimen{flex:none;justify-content:center;align-items:center;width:40px;height:40px;display:flex;overflow:hidden;&>img,&>svg{width:20px;height:20px}}.fb-P_cJ1a-item{flex-direction:row;align-items:center;width:100%;display:inline-flex}.fb-P_cJ1a-list{grid-gap:8px 16px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-auto-rows:50px;grid-auto-flow:dense;display:grid}", document.head.appendChild(style);
|
|
698
698
|
}
|
|
699
|
-
var IconGallery_default = { itemLabel: "fb-P_cJ1a-itemLabel",
|
|
699
|
+
var IconGallery_default = { itemLabel: "fb-P_cJ1a-itemLabel", list: "fb-P_cJ1a-list", itemSpecimen: "fb-P_cJ1a-itemSpecimen", item: "fb-P_cJ1a-item" };
|
|
700
700
|
|
|
701
701
|
// src/addon-docs/blocks/components/IconGallery.tsx
|
|
702
702
|
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -1228,7 +1228,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id9}"
|
|
|
1228
1228
|
let style = document.createElement("style");
|
|
1229
1229
|
style.setAttribute("data-fb-css", id9), style.textContent = '.fb-7qSlVa-aside{width:10rem;@media (width<=768px){display:none}}.fb-7qSlVa-nav{width:10rem;font-family:var(--fb-font-base);font-size:var(--fb-size-s2);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch;padding-top:4rem;padding-bottom:2rem;position:fixed;top:0;bottom:0;overflow-y:auto;& *{box-sizing:border-box}&>.toc-wrapper>.toc-list,&>.toc-wrapper>.toc-list .toc-list{border-left:solid 2px var(--fb-color-mediumlight);padding-left:0}& .toc-list-item{margin-left:20px;padding-top:3px;padding-bottom:3px;list-style-type:none;position:relative}& .toc-list-item:before{content:"";border-left:solid 2px var(--fb-color-mediumdark);opacity:0;height:100%;transition:opacity .2s;position:absolute;top:0;left:0;transform:translate(-22px)}& .toc-list-item.is-active-li:before{opacity:1}& .toc-list-item>a{color:var(--fb-color-default-text);text-decoration:none}& .toc-list-item.is-active-li>a{color:var(--fb-color-secondary);font-weight:600;text-decoration:none}}.fb-7qSlVa-heading{color:var(--fb-color-default-text);text-transform:uppercase;margin-bottom:10px;font-size:.875em;font-weight:600}', document.head.appendChild(style);
|
|
1230
1230
|
}
|
|
1231
|
-
var TableOfContents_default = {
|
|
1231
|
+
var TableOfContents_default = { nav: "fb-7qSlVa-nav", aside: "fb-7qSlVa-aside", heading: "fb-7qSlVa-heading" };
|
|
1232
1232
|
|
|
1233
1233
|
// src/addon-docs/blocks/components/TableOfContents.tsx
|
|
1234
1234
|
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
@@ -1917,7 +1917,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id10}
|
|
|
1917
1917
|
let style = document.createElement("style");
|
|
1918
1918
|
style.setAttribute("data-fb-css", id10), style.textContent = ".fb-HnuX0q-alignmentWrapper{display:block;position:relative;& svg{visibility:hidden}&:hover svg,&:focus-within svg{visibility:visible}}.fb-HnuX0q-anchorWrapper{line-height:inherit;color:inherit;padding-right:8px;position:absolute;top:50%;right:100%;& a{color:inherit;text-decoration:none}}.fb-HnuX0q-anchorWrapper.fb-HnuX0q-anchorWrapper{margin-top:-14px}", document.head.appendChild(style);
|
|
1919
1919
|
}
|
|
1920
|
-
var mdx_default = {
|
|
1920
|
+
var mdx_default = { anchorWrapper: "fb-HnuX0q-anchorWrapper", alignmentWrapper: "fb-HnuX0q-alignmentWrapper" };
|
|
1921
1921
|
|
|
1922
1922
|
// src/addon-docs/blocks/blocks/mdx.tsx
|
|
1923
1923
|
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SnippetWarning,
|
|
3
3
|
Source
|
|
4
|
-
} from "../_browser-chunks/chunk-
|
|
4
|
+
} from "../_browser-chunks/chunk-74S4GA34.js";
|
|
5
5
|
import "../_browser-chunks/chunk-2WZWS7GJ.js";
|
|
6
6
|
import "../_browser-chunks/chunk-CNED6RYH.js";
|
|
7
7
|
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
resolvePackageDir
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
16
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-Y3FJT543.js";
|
|
15
|
+
import "../_node-chunks/chunk-JQKD337A.js";
|
|
16
|
+
import "../_node-chunks/chunk-7LYHZMJO.js";
|
|
17
17
|
|
|
18
18
|
// src/addon-docs/preset.ts
|
|
19
19
|
import { isAbsolute } from "node:path";
|
|
@@ -327,7 +327,7 @@ var getResolvedReact = async (options) => {
|
|
|
327
327
|
}, docsMode = options.docs;
|
|
328
328
|
return docsMode && (result.docsMode = docsMode), result;
|
|
329
329
|
}, viteFinal = async (config, options) => {
|
|
330
|
-
let { plugins = [] } = config, { csfPluginOptions = {} } = options, { mdxPlugin } = await import("../_node-chunks/mdx-plugin-
|
|
330
|
+
let { plugins = [] } = config, { csfPluginOptions = {} } = options, { mdxPlugin } = await import("../_node-chunks/mdx-plugin-NVSAW2N3.js"), enrichCsf2 = await options.presets.apply("experimental_enrichCsf"), { react, reactDom, mdx } = await getResolvedReact(options), packageDeduplicationPlugin = {
|
|
331
331
|
name: "storybook:package-deduplication",
|
|
332
332
|
enforce: "pre",
|
|
333
333
|
config: () => ({
|
package/dist/addon-mcp/preset.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
package_default
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import
|
|
14
|
+
} from "../_node-chunks/chunk-4ISTQSCO.js";
|
|
15
|
+
import {
|
|
16
|
+
getCommentStore
|
|
17
|
+
} from "../_node-chunks/chunk-AK4RPNTY.js";
|
|
18
|
+
import "../_node-chunks/chunk-7LYHZMJO.js";
|
|
16
19
|
|
|
17
20
|
// src/addon-mcp/mcp-handler.ts
|
|
18
21
|
import { McpServer } from "tmcp";
|
|
@@ -209,6 +212,103 @@ async function buildStorybookStoryInstructions(options, {
|
|
|
209
212
|
});
|
|
210
213
|
}
|
|
211
214
|
|
|
215
|
+
// src/addon-mcp/tools/comments.ts
|
|
216
|
+
import * as v from "valibot";
|
|
217
|
+
import { getProjectRoot } from "@aussieljk/forkbook/internal/common";
|
|
218
|
+
|
|
219
|
+
// src/addon-comments/prompt.ts
|
|
220
|
+
var formatArgs = (args) => {
|
|
221
|
+
if (!(!args || Object.keys(args).length === 0))
|
|
222
|
+
try {
|
|
223
|
+
return JSON.stringify(args, null, 2);
|
|
224
|
+
} catch {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
function formatCommentPrompt(comment) {
|
|
229
|
+
let lines = [`Story: ${comment.title} / ${comment.name} (id: ${comment.storyId})`];
|
|
230
|
+
comment.importPath && lines.push(`File: ${comment.importPath}`), comment.element ? (lines.push(`Element: \`${comment.element.selector}\``), comment.element.text && lines.push(`Element text: "${comment.element.text}"`)) : lines.push("Element: the whole story");
|
|
231
|
+
let args = formatArgs(comment.args);
|
|
232
|
+
return args && lines.push("Args:", "```json", args, "```"), lines.push(`Note: ${comment.note}`), lines.push(`Comment id: ${comment.id}`), lines.join(`
|
|
233
|
+
`);
|
|
234
|
+
}
|
|
235
|
+
function formatCommentsPrompt(comments) {
|
|
236
|
+
return comments.length === 0 ? "There are no open Forkbook comments." : [
|
|
237
|
+
comments.length === 1 ? "Please address this Forkbook comment on a story." : `Please address these ${comments.length} Forkbook comments on stories.`,
|
|
238
|
+
...comments.map((comment, index) => `## Comment ${index + 1}
|
|
239
|
+
${formatCommentPrompt(comment)}`),
|
|
240
|
+
"When you finish a comment, resolve it with the `resolve_comment` MCP tool (Forkbook addon-mcp). Give its id and a short reply."
|
|
241
|
+
].join(`
|
|
242
|
+
|
|
243
|
+
`);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// src/addon-mcp/tools/comments.ts
|
|
247
|
+
var LIST_COMMENTS_TOOL_NAME = "list_comments", RESOLVE_COMMENT_TOOL_NAME = "resolve_comment", ListCommentsInput = v.object({
|
|
248
|
+
status: v.optional(
|
|
249
|
+
v.pipe(
|
|
250
|
+
v.picklist(["open", "resolved", "all"]),
|
|
251
|
+
v.description('Which comments to list. The default is "open".')
|
|
252
|
+
)
|
|
253
|
+
),
|
|
254
|
+
storyId: v.optional(v.pipe(v.string(), v.description("Only list comments on this story id.")))
|
|
255
|
+
}), ResolveCommentInput = v.object({
|
|
256
|
+
id: v.pipe(v.string(), v.description("Id of the comment, from list_comments.")),
|
|
257
|
+
reply: v.optional(
|
|
258
|
+
v.pipe(v.string(), v.description("Optional short note that tells the user what you changed."))
|
|
259
|
+
)
|
|
260
|
+
});
|
|
261
|
+
function addCommentTools(server, enabled, getStore = () => getCommentStore(getProjectRoot())) {
|
|
262
|
+
server.tool(
|
|
263
|
+
{
|
|
264
|
+
name: LIST_COMMENTS_TOOL_NAME,
|
|
265
|
+
title: "List story comments",
|
|
266
|
+
description: "List the comments that the user left on Forkbook stories (from the Comments panel). Each comment has the story id, story file path, the element selector and text, the args and the note. Only open comments by default. Do what each note asks, then call resolve_comment.",
|
|
267
|
+
schema: ListCommentsInput,
|
|
268
|
+
enabled
|
|
269
|
+
},
|
|
270
|
+
async (input) => {
|
|
271
|
+
try {
|
|
272
|
+
let comments = await getStore().list({
|
|
273
|
+
status: input?.status ?? "open",
|
|
274
|
+
storyId: input?.storyId
|
|
275
|
+
});
|
|
276
|
+
return {
|
|
277
|
+
content: [
|
|
278
|
+
{ type: "text", text: formatCommentsPrompt(comments) },
|
|
279
|
+
{ type: "text", text: JSON.stringify({ comments }, null, 2) }
|
|
280
|
+
]
|
|
281
|
+
};
|
|
282
|
+
} catch (error) {
|
|
283
|
+
return errorToMCPContent(error);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
), server.tool(
|
|
287
|
+
{
|
|
288
|
+
name: RESOLVE_COMMENT_TOOL_NAME,
|
|
289
|
+
title: "Resolve a story comment",
|
|
290
|
+
description: "Mark a comment on a Forkbook story as resolved, after you made the change that it asks for. Add an optional reply that the user sees in the Comments panel.",
|
|
291
|
+
schema: ResolveCommentInput,
|
|
292
|
+
enabled
|
|
293
|
+
},
|
|
294
|
+
async (input) => {
|
|
295
|
+
try {
|
|
296
|
+
let comment = await getStore().resolve(input.id, input.reply);
|
|
297
|
+
return {
|
|
298
|
+
content: [
|
|
299
|
+
{
|
|
300
|
+
type: "text",
|
|
301
|
+
text: `Resolved comment ${comment.id} on ${comment.title} / ${comment.name}.`
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
};
|
|
305
|
+
} catch (error) {
|
|
306
|
+
return errorToMCPContent(error);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
212
312
|
// src/addon-mcp/tools/preview-stories.ts
|
|
213
313
|
import url from "node:url";
|
|
214
314
|
import fs from "node:fs/promises";
|
|
@@ -545,7 +645,7 @@ function dropToolIfToolsetMissing(name, error) {
|
|
|
545
645
|
logger3.error(`Skipping MCP tool "${name}", its backing toolset is not registered: ${error}`);
|
|
546
646
|
}
|
|
547
647
|
async function registerAddonMcpTools(server, context) {
|
|
548
|
-
isToolsetEnabled("dev", context.toolsets) && await addPreviewStoriesResource(server);
|
|
648
|
+
isToolsetEnabled("dev", context.toolsets) && await addPreviewStoriesResource(server), isToolsetEnabled("dev", context.toolsets) && addCommentTools(server, createToolsetEnabled(server, "dev"));
|
|
549
649
|
for (let definition of addonToolDefinitions)
|
|
550
650
|
if (isToolsetEnabled(definition.toolset, context.toolsets) && isToolAvailable(definition, context))
|
|
551
651
|
try {
|
|
@@ -670,7 +770,7 @@ function getToolsets(request, addonOptions) {
|
|
|
670
770
|
}
|
|
671
771
|
|
|
672
772
|
// src/addon-mcp/types.ts
|
|
673
|
-
import * as
|
|
773
|
+
import * as v2 from "valibot";
|
|
674
774
|
var isLiteralEndpointPathname = (endpoint) => {
|
|
675
775
|
try {
|
|
676
776
|
let { pathname } = new URL(endpoint, "http://storybook.local");
|
|
@@ -678,18 +778,18 @@ var isLiteralEndpointPathname = (endpoint) => {
|
|
|
678
778
|
} catch {
|
|
679
779
|
return !1;
|
|
680
780
|
}
|
|
681
|
-
}, AddonOptions =
|
|
682
|
-
endpoint:
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
781
|
+
}, AddonOptions = v2.object({
|
|
782
|
+
endpoint: v2.optional(
|
|
783
|
+
v2.pipe(
|
|
784
|
+
v2.string(),
|
|
785
|
+
v2.check(isLiteralEndpointPathname, "Endpoint must be a literal URL pathname")
|
|
686
786
|
)
|
|
687
787
|
),
|
|
688
|
-
toolsets:
|
|
689
|
-
|
|
690
|
-
dev:
|
|
691
|
-
docs:
|
|
692
|
-
test:
|
|
788
|
+
toolsets: v2.optional(
|
|
789
|
+
v2.object({
|
|
790
|
+
dev: v2.exactOptional(v2.boolean(), !0),
|
|
791
|
+
docs: v2.exactOptional(v2.boolean(), !0),
|
|
792
|
+
test: v2.exactOptional(v2.boolean(), !0)
|
|
693
793
|
}),
|
|
694
794
|
{
|
|
695
795
|
// Default values for toolsets
|
|
@@ -701,7 +801,7 @@ var isLiteralEndpointPathname = (endpoint) => {
|
|
|
701
801
|
});
|
|
702
802
|
|
|
703
803
|
// src/addon-mcp/preset.ts
|
|
704
|
-
import * as
|
|
804
|
+
import * as v4 from "valibot";
|
|
705
805
|
import {
|
|
706
806
|
createLocalDocsAccess,
|
|
707
807
|
getEffectiveToolAvailability as getEffectiveToolAvailability2,
|
|
@@ -979,16 +1079,16 @@ import {
|
|
|
979
1079
|
DocsManifestMap
|
|
980
1080
|
} from "@aussieljk/forkbook/internal/toolsets-docs";
|
|
981
1081
|
import { logger as logger5 } from "@aussieljk/forkbook/internal/node-logger";
|
|
982
|
-
import * as
|
|
983
|
-
var OAuthResourceMetadata =
|
|
984
|
-
resource:
|
|
985
|
-
authorization_servers:
|
|
986
|
-
scopes_supported:
|
|
987
|
-
}), OAuthServerMetadata =
|
|
988
|
-
issuer:
|
|
989
|
-
authorization_endpoint:
|
|
990
|
-
token_endpoint:
|
|
991
|
-
scopes_supported:
|
|
1082
|
+
import * as v3 from "valibot";
|
|
1083
|
+
var OAuthResourceMetadata = v3.object({
|
|
1084
|
+
resource: v3.optional(v3.string()),
|
|
1085
|
+
authorization_servers: v3.pipe(v3.array(v3.string()), v3.minLength(1)),
|
|
1086
|
+
scopes_supported: v3.optional(v3.array(v3.string()))
|
|
1087
|
+
}), OAuthServerMetadata = v3.object({
|
|
1088
|
+
issuer: v3.string(),
|
|
1089
|
+
authorization_endpoint: v3.string(),
|
|
1090
|
+
token_endpoint: v3.string(),
|
|
1091
|
+
scopes_supported: v3.optional(v3.array(v3.string()))
|
|
992
1092
|
}), MANIFEST_CACHE_TTL = 3600 * 1e3, REVALIDATION_TTL = 60 * 1e3, AuthenticationError = class extends Error {
|
|
993
1093
|
constructor(url2) {
|
|
994
1094
|
super(`Authentication failed for ${url2}. Your token may be invalid or expired.`), this.name = "AuthenticationError";
|
|
@@ -1114,8 +1214,8 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1114
1214
|
throw new AuthenticationError(url2);
|
|
1115
1215
|
if (!response.ok)
|
|
1116
1216
|
throw new Error(`Failed to fetch ${url2}: ${response.status}`);
|
|
1117
|
-
let text = await response.text(), { pathname } = new URL(url2), isComponentsManifest = pathname.endsWith("/manifests/components.json"), isDocsManifest = pathname.endsWith("/manifests/docs.json"), schema = isComponentsManifest ? ComponentManifestMap : isDocsManifest ? DocsManifestMap :
|
|
1118
|
-
if (
|
|
1217
|
+
let text = await response.text(), { pathname } = new URL(url2), isComponentsManifest = pathname.endsWith("/manifests/components.json"), isDocsManifest = pathname.endsWith("/manifests/docs.json"), schema = isComponentsManifest ? ComponentManifestMap : isDocsManifest ? DocsManifestMap : v3.unknown();
|
|
1218
|
+
if (v3.safeParse(v3.pipe(v3.string(), v3.parseJson(), schema), text).success)
|
|
1119
1219
|
return text;
|
|
1120
1220
|
throw await this.#isMcpUnauthorized(new URL(url2).origin) ? new AuthenticationError(url2) : new Error(
|
|
1121
1221
|
`Invalid manifest response from ${url2}: expected valid JSON manifest but got unexpected content.`
|
|
@@ -1135,9 +1235,9 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1135
1235
|
if (authReq) return authReq;
|
|
1136
1236
|
let noManifestReason = "manifest-not-found";
|
|
1137
1237
|
if (response.ok) {
|
|
1138
|
-
let text = await response.text(), json =
|
|
1238
|
+
let text = await response.text(), json = v3.safeParse(v3.pipe(v3.string(), v3.parseJson()), text);
|
|
1139
1239
|
if (json.success) {
|
|
1140
|
-
if (
|
|
1240
|
+
if (v3.safeParse(ComponentManifestMap, json.output).success)
|
|
1141
1241
|
return "public";
|
|
1142
1242
|
noManifestReason = "manifest-invalid";
|
|
1143
1243
|
}
|
|
@@ -1178,7 +1278,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1178
1278
|
return logger5.warn(
|
|
1179
1279
|
`[addon-mcp] Failed to fetch OAuth resource metadata from ${resourceMetadataUrl}: ${resourceResponse.status}`
|
|
1180
1280
|
), null;
|
|
1181
|
-
let resourceResult =
|
|
1281
|
+
let resourceResult = v3.safeParse(OAuthResourceMetadata, await resourceResponse.json());
|
|
1182
1282
|
if (!resourceResult.success)
|
|
1183
1283
|
return logger5.warn(
|
|
1184
1284
|
`[addon-mcp] Invalid OAuth resource metadata from ${resourceMetadataUrl}: ${resourceResult.issues.map((i) => i.message).join(", ")}`
|
|
@@ -1188,7 +1288,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1188
1288
|
return logger5.warn(
|
|
1189
1289
|
`[addon-mcp] Failed to fetch OAuth server metadata from ${serverMetadataUrl}: ${serverResponse.status}`
|
|
1190
1290
|
), null;
|
|
1191
|
-
let serverResult =
|
|
1291
|
+
let serverResult = v3.safeParse(OAuthServerMetadata, await serverResponse.json());
|
|
1192
1292
|
return serverResult.success ? {
|
|
1193
1293
|
resourceMetadataUrl,
|
|
1194
1294
|
resourceMetadata: resourceResult.output,
|
|
@@ -1238,7 +1338,7 @@ async function getStoryIndex(options) {
|
|
|
1238
1338
|
|
|
1239
1339
|
// src/addon-mcp/preset.ts
|
|
1240
1340
|
var previewAnnotations = async (existingAnnotations = []) => [...existingAnnotations, path.join(import.meta.dirname, "preview.js")], experimental_devServer = async (app, options) => {
|
|
1241
|
-
let addonOptions =
|
|
1341
|
+
let addonOptions = v4.parse(AddonOptions, {
|
|
1242
1342
|
endpoint: options.endpoint,
|
|
1243
1343
|
toolsets: options.toolsets ?? {}
|
|
1244
1344
|
}), origin2 = `http://localhost:${options.port}`, endpoint = addonOptions.endpoint ?? DEFAULT_MCP_ENDPOINT, core = await options.presets.apply("core", {}), hostValidation = {
|
|
@@ -4,7 +4,7 @@ var MCP_APP_PARAM = "mcp-app", MCP_APP_SIZE_CHANGED_EVENT = "storybook-mcp:size-
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@aussieljk/forkbook",
|
|
7
|
-
version: "0.0.1-
|
|
7
|
+
version: "0.0.1-15",
|
|
8
8
|
description: "Forkbook: a small, fast fork of Storybook for React with Vite, Next.js with Vite and React Native",
|
|
9
9
|
keywords: [
|
|
10
10
|
"forkbook",
|
|
@@ -76,6 +76,18 @@ var package_default = {
|
|
|
76
76
|
types: "./dist/addon-a11y/preview.d.ts",
|
|
77
77
|
default: "./dist/addon-a11y/preview.js"
|
|
78
78
|
},
|
|
79
|
+
"./addon-comments/manager": {
|
|
80
|
+
code: "./src/addon-comments/manager.tsx",
|
|
81
|
+
default: "./dist/addon-comments/manager.js"
|
|
82
|
+
},
|
|
83
|
+
"./addon-comments/preset": {
|
|
84
|
+
code: "./src/addon-comments/preset.ts",
|
|
85
|
+
default: "./dist/addon-comments/preset.js"
|
|
86
|
+
},
|
|
87
|
+
"./addon-comments/preview": {
|
|
88
|
+
code: "./src/addon-comments/preview.ts",
|
|
89
|
+
default: "./dist/addon-comments/preview.js"
|
|
90
|
+
},
|
|
79
91
|
"./addon-docs": {
|
|
80
92
|
code: "./src/addon-docs/index.ts",
|
|
81
93
|
types: "./dist/addon-docs/index.d.ts",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-7LYHZMJO.js";
|
|
13
13
|
|
|
14
14
|
// src/addon-themes/postinstall.ts
|
|
15
15
|
import { PackageManagerName } from "@aussieljk/forkbook/internal/common";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wr9w1e50s8 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wr9w1e50s8 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wr9w1e50s8 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wr9w1e50s8.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wr9w1e50s8.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wr9w1e50s8.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
TRIGGER_TEST_RUN_RESPONSE,
|
|
36
36
|
TUTORIAL_VIDEO_LINK,
|
|
37
37
|
storeOptions
|
|
38
|
-
} from "../_node-chunks/chunk-
|
|
39
|
-
import "../_node-chunks/chunk-
|
|
38
|
+
} from "../_node-chunks/chunk-VS4AUXP2.js";
|
|
39
|
+
import "../_node-chunks/chunk-7LYHZMJO.js";
|
|
40
40
|
export {
|
|
41
41
|
ADDON_ID as A11Y_ADDON_ID,
|
|
42
42
|
PANEL_ID2 as A11Y_PANEL_ID,
|