@aussieljk/forkbook 0.0.1-13 → 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-2EUQ6NXV.js → Color-OSKHEBLS.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-QCFTNB6P.js → WithTooltip-IPJFQHVQ.js} +1 -1
- package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
- package/dist/_browser-chunks/{chunk-ZF5SPY56.js → chunk-74S4GA34.js} +1 -1
- package/dist/_browser-chunks/{chunk-S7N7Z5TY.js → chunk-TRXLBGLS.js} +21 -2
- package/dist/_browser-chunks/{chunk-UH3XTEOQ.js → chunk-XRILAR4S.js} +13 -13
- package/dist/_node-chunks/{attached-runtime-7IRDQUTZ.js → attached-runtime-5ABH72AY.js} +28 -28
- package/dist/_node-chunks/{builder-manager-YTALSWKQ.js → builder-manager-4T5FVGUR.js} +18 -15
- package/dist/_node-chunks/{chunk-LR4W5G37.js → chunk-2FWG2MQN.js} +6 -6
- package/dist/_node-chunks/chunk-2YVNFDPN.js +18 -0
- package/dist/_node-chunks/{chunk-TSJ3JCNN.js → chunk-33IC7FUB.js} +9 -9
- package/dist/_node-chunks/{chunk-SXX75O2D.js → chunk-46E6YIPW.js} +7 -7
- package/dist/_node-chunks/{chunk-OH5M2YER.js → chunk-4BWBFTBZ.js} +7 -7
- package/dist/_node-chunks/{chunk-ADCQYK3Z.js → chunk-4ELXERU6.js} +6 -6
- package/dist/_node-chunks/{chunk-4CZJ4SFH.js → chunk-4GGXQOD4.js} +8 -8
- package/dist/_node-chunks/{chunk-PGIDRLZ5.js → chunk-4ISTQSCO.js} +19 -7
- package/dist/_node-chunks/{chunk-OSIENBU6.js → chunk-4XKLH4I3.js} +6 -6
- package/dist/_node-chunks/{chunk-TQ5YAQ4Y.js → chunk-56L6SVSQ.js} +6 -6
- package/dist/_node-chunks/{chunk-XC7K4QEX.js → chunk-5NWCUFPU.js} +6 -6
- package/dist/_node-chunks/{chunk-DIC4T2UO.js → chunk-5Y53QRNN.js} +6 -6
- package/dist/_node-chunks/{chunk-BFQJF3ID.js → chunk-6DHYHTHM.js} +8 -8
- package/dist/_node-chunks/{chunk-LMGI47HP.js → chunk-6H3FQSQV.js} +52 -22
- package/dist/_node-chunks/{chunk-ST3KB36E.js → chunk-6WHTGFDB.js} +6 -6
- package/dist/_node-chunks/{chunk-VJLLEKWR.js → chunk-767UK7PX.js} +9 -9
- package/dist/_node-chunks/{chunk-GRN6WQC3.js → chunk-7IYNKFXW.js} +10 -10
- package/dist/_node-chunks/{chunk-6JSZY5TJ.js → chunk-7LYHZMJO.js} +6 -6
- package/dist/_node-chunks/{chunk-GQZZQB4K.js → chunk-7RE5WNOM.js} +7 -7
- package/dist/_node-chunks/{chunk-I26RGEVQ.js → chunk-A3EPCOVV.js} +7 -7
- package/dist/_node-chunks/chunk-AK4RPNTY.js +137 -0
- package/dist/_node-chunks/{chunk-MK2RPLWT.js → chunk-AUUVNECB.js} +7 -7
- package/dist/_node-chunks/{chunk-EM6AYELK.js → chunk-B6JJQARD.js} +9 -9
- package/dist/_node-chunks/chunk-BVF25DJF.js +20 -0
- package/dist/_node-chunks/{chunk-EFX2VA4Q.js → chunk-DASUWWHV.js} +6 -6
- package/dist/_node-chunks/{chunk-NDVIMCIX.js → chunk-DJPS7LWH.js} +7 -7
- package/dist/_node-chunks/{chunk-K6TEIAKH.js → chunk-DTFPS5QE.js} +7 -7
- package/dist/_node-chunks/{chunk-O46DZ2KC.js → chunk-EHPAFXPB.js} +8 -8
- package/dist/_node-chunks/{chunk-KUZSE7ZD.js → chunk-FFE4YDDE.js} +9 -9
- package/dist/_node-chunks/{chunk-4YWZLOAF.js → chunk-FJE2XPLI.js} +6 -6
- package/dist/_node-chunks/{chunk-7SPDKMDQ.js → chunk-FSSOM72N.js} +14 -14
- package/dist/_node-chunks/{chunk-BZQF5KUE.js → chunk-FVHSCRCK.js} +7 -7
- package/dist/_node-chunks/{chunk-F2AFT3P7.js → chunk-G6M5USWY.js} +8 -8
- package/dist/_node-chunks/{chunk-OVJZBW54.js → chunk-G7NZ27DS.js} +7 -7
- package/dist/_node-chunks/{chunk-E56UKDJR.js → chunk-GRJPH3NW.js} +8 -8
- package/dist/_node-chunks/{chunk-KEXQ3BON.js → chunk-H4IDYTC4.js} +7 -7
- package/dist/_node-chunks/{chunk-NRP4FGRT.js → chunk-H5AAYJZE.js} +8 -8
- package/dist/_node-chunks/{chunk-PUBZLLNL.js → chunk-HK47D3O3.js} +7 -7
- package/dist/_node-chunks/{chunk-M4MRBEJI.js → chunk-J2ZTT2OP.js} +33 -23
- package/dist/_node-chunks/{chunk-NIOVXWQZ.js → chunk-JAPFAHXG.js} +6 -6
- package/dist/_node-chunks/{chunk-3F3673RQ.js → chunk-JC4I7ZVM.js} +7 -7
- package/dist/_node-chunks/{chunk-7YLKDHLZ.js → chunk-JCQU3LND.js} +7 -7
- package/dist/_node-chunks/{chunk-33T4HNF2.js → chunk-JQKD337A.js} +6 -6
- package/dist/_node-chunks/{chunk-4IIWFG7O.js → chunk-JYQSJLIK.js} +8 -8
- package/dist/_node-chunks/{chunk-HCMHVV7N.js → chunk-KFZRX33G.js} +8 -8
- package/dist/_node-chunks/{chunk-PQXP5FZ2.js → chunk-KIAQML4H.js} +8 -8
- package/dist/_node-chunks/{chunk-Y64FM6U7.js → chunk-LHRQTTE7.js} +8 -8
- package/dist/_node-chunks/{chunk-NSNBFXVB.js → chunk-LNMVMXBN.js} +7 -7
- package/dist/_node-chunks/chunk-M6LN66WA.js +20 -0
- package/dist/_node-chunks/{chunk-SHP6447T.js → chunk-M75NG64K.js} +7 -7
- package/dist/_node-chunks/{chunk-YDM7NH4T.js → chunk-MBTS4OBP.js} +6 -6
- package/dist/_node-chunks/chunk-MBTTUFUX.js +11 -0
- package/dist/_node-chunks/{chunk-JUVUVVHI.js → chunk-MLJPAH4O.js} +6 -6
- package/dist/_node-chunks/{chunk-RMUBUNBY.js → chunk-NGFVR7UO.js} +6 -6
- package/dist/_node-chunks/{chunk-3FLRYZLJ.js → chunk-ONKMPF4O.js} +6 -6
- package/dist/_node-chunks/{chunk-B4XAZ2OC.js → chunk-OS6P62RS.js} +16 -20
- package/dist/_node-chunks/{chunk-GC7NA2Y7.js → chunk-QAQWINPN.js} +7 -7
- package/dist/_node-chunks/{chunk-IDPQ3CVN.js → chunk-QF4WUMRT.js} +10 -10
- package/dist/_node-chunks/{chunk-I36FPWMO.js → chunk-QF5RQWCH.js} +6 -6
- package/dist/_node-chunks/{chunk-BSXI35KM.js → chunk-QZR6HJVD.js} +7 -7
- package/dist/_node-chunks/chunk-R5H4DAON.js +19 -0
- package/dist/_node-chunks/{chunk-MWQIBOUB.js → chunk-RENIT4CI.js} +6 -6
- package/dist/_node-chunks/{chunk-4B52HLKK.js → chunk-SJVTZ4IO.js} +23 -23
- package/dist/_node-chunks/{chunk-ALHQVE5R.js → chunk-SL53Q3H4.js} +6 -6
- package/dist/_node-chunks/{chunk-7YQIVUEK.js → chunk-T34DVPWM.js} +6 -6
- package/dist/_node-chunks/{chunk-WWJKLYU5.js → chunk-TVDV6YAE.js} +8 -8
- package/dist/_node-chunks/{chunk-26ERGIQH.js → chunk-U6T34IDM.js} +6 -6
- package/dist/_node-chunks/{chunk-GLNHSUKT.js → chunk-UAU6RMOS.js} +19 -19
- package/dist/_node-chunks/{chunk-ZHVOUP6D.js → chunk-UMWJISED.js} +6 -6
- package/dist/_node-chunks/{chunk-LPIPPSMS.js → chunk-UO3EXKJC.js} +6 -6
- package/dist/_node-chunks/{chunk-NTUTJAD4.js → chunk-VCKRLODV.js} +8 -8
- package/dist/_node-chunks/{chunk-CESXIP3N.js → chunk-VS4AUXP2.js} +6 -6
- package/dist/_node-chunks/{chunk-PU33WSBW.js → chunk-VUHK6VXL.js} +12 -12
- package/dist/_node-chunks/{chunk-PJCSZR4T.js → chunk-VUP4EHUR.js} +8 -8
- package/dist/_node-chunks/{chunk-3L2QRDKH.js → chunk-VXDKI65K.js} +26 -26
- package/dist/_node-chunks/{chunk-DTNEHO4J.js → chunk-W32FBKF3.js} +10 -10
- package/dist/_node-chunks/{chunk-DY7F7B6V.js → chunk-W6AOA2O5.js} +7 -7
- package/dist/_node-chunks/{chunk-QWZZX2HN.js → chunk-W7352H3Q.js} +6 -6
- package/dist/_node-chunks/{chunk-S33FEPQ3.js → chunk-WMUNVUVG.js} +6 -6
- package/dist/_node-chunks/{chunk-M7BVABR2.js → chunk-WTZ24FWN.js} +8 -8
- package/dist/_node-chunks/{chunk-NAXIA2JI.js → chunk-X3BAGYZJ.js} +8 -8
- package/dist/_node-chunks/{chunk-3ZAENV5A.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-CEIESR4U.js → chunk-XWHHBYMV.js} +6 -6
- package/dist/_node-chunks/{chunk-UYEX6LW6.js → chunk-Y3FJT543.js} +7 -7
- package/dist/_node-chunks/{chunk-DAEUTT3I.js → chunk-YHYL4HYS.js} +6 -6
- package/dist/_node-chunks/{chunk-DPOWAA4P.js → chunk-ZNT3JZI2.js} +7 -7
- package/dist/_node-chunks/{chunk-GIKCT5KG.js → chunk-ZPWEQZYR.js} +7 -7
- package/dist/_node-chunks/{chunk-3NH7IHUS.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-BKID5MBG.js → local-runtime-W3N7O65Q.js} +19 -19
- package/dist/_node-chunks/{mdx-plugin-7BOUDCZB.js → mdx-plugin-NVSAW2N3.js} +13 -13
- package/dist/_node-chunks/{monorepo-FRHSAJB7.js → monorepo-JDWM46J3.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-7BHSAJP4.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-6TGV6WS4.js → pattern-copy-play-ZWHYXQK5.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-5TRUTJXJ.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-EE2HT4QP.js → rehype-external-links-ME2XNDXH.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-ZKRW2V6Z.js → rehype-slug-2UJLYPC6.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-6Q7VRQC5.js → relaxed-limits-XWE3S456.js} +11 -11
- package/dist/_node-chunks/{run-EBHIAT35.js → run-5YG73LXV.js} +17 -17
- package/dist/_node-chunks/{run-6Y3ZTASZ.js → run-DNDPGCFE.js} +15 -15
- package/dist/_node-chunks/{setup-6XIF77JT.js → setup-MDNSLQIJ.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-GMQNQ4UW.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 +2 -2
- 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 +18 -10
- 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-UFDJQlo-.js → globals-runtime-BUEqXras.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-Ddp2jFET.js → globals-runtime-BsHjh8rR.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-CCZrdft6.js → globals-runtime-CQ0Et7dZ.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-C59T0h-j.js → globals-runtime-DChrMWvh.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Cccwtspx.js → globals-runtime-DiIxNujJ.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-BgWmCsA7.js → globals-runtime-DjkYleFR.js} +163 -93
- package/dist/manager/_manager-chunks/{runtime-Db8fJ2MP.js → runtime-BMoEpoix.js} +24 -21
- package/dist/manager/_manager-chunks/{runtime-DC3oEVlM.js → runtime-BWASr_zc.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-D_FDSHFG.js → runtime-B_e-Zdqt.js} +12 -8
- package/dist/manager/_manager-chunks/{runtime-lPbyY_f5.js → runtime-CEi1oIg2.js} +405 -311
- package/dist/manager/_manager-chunks/{runtime-td6oYfU6.js → runtime-CLIeRJL-.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-AvqHE9rM.js → runtime-CWZ9qCi4.js} +54 -27
- package/dist/manager/_manager-chunks/{runtime-D8QxTQiI.js → runtime-CXOuNYw-.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-4wMiTjjZ.js → runtime-C_H6vGzi.js} +6 -5
- package/dist/manager/_manager-chunks/{runtime-DCOIOn4T.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-5A5XOSRM.js +0 -19
- package/dist/_node-chunks/chunk-5T6Q7HT3.js +0 -11
- package/dist/_node-chunks/chunk-6DRDJF2Q.js +0 -20
- package/dist/_node-chunks/chunk-HJVZQS65.js +0 -25
- package/dist/_node-chunks/chunk-LJ5JRR5Q.js +0 -18
- package/dist/_node-chunks/chunk-MKSEM5C2.js +0 -20
- package/dist/_node-chunks/dist-CFCU4PZG.js +0 -27
- package/dist/_node-chunks/dist-PFMT5YJK.js +0 -16
- package/dist/_node-chunks/optimized-tests-F5LCOTXH.js +0 -22
- package/dist/_node-chunks/postinstallAddon-4RININ5C.js +0 -20
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ADDON_ID,
|
|
3
|
+
COMMENTS_API_PATH,
|
|
4
|
+
EVENTS,
|
|
5
|
+
PANEL_ID,
|
|
6
|
+
TOOL_ID
|
|
7
|
+
} from "../_browser-chunks/chunk-4ZGQ4YQ2.js";
|
|
8
|
+
import "../_browser-chunks/chunk-IMSF75WX.js";
|
|
9
|
+
|
|
10
|
+
// src/addon-comments/manager.tsx
|
|
11
|
+
import { ToggleButton } from "@aussieljk/forkbook/internal/components";
|
|
12
|
+
import { addons, types, useAddonState as useAddonState2, useStorybookApi as useStorybookApi2 } from "@aussieljk/forkbook/manager-api";
|
|
13
|
+
import { MessageSquareTextIcon } from "lucide-react";
|
|
14
|
+
|
|
15
|
+
// src/addon-comments/components/CommentsPanel.tsx
|
|
16
|
+
import { useCallback, useEffect, useState } from "react";
|
|
17
|
+
import { Button as Button2, ScrollArea } from "@aussieljk/forkbook/internal/components";
|
|
18
|
+
import { useAddonState, useStorybookApi, useStorybookState } from "@aussieljk/forkbook/manager-api";
|
|
19
|
+
|
|
20
|
+
// src/addon-comments/client.ts
|
|
21
|
+
var parse = async (response) => {
|
|
22
|
+
let body = await response.json().catch(() => ({}));
|
|
23
|
+
if (!response.ok)
|
|
24
|
+
throw new Error(body.error ?? `Comments request failed (${response.status})`);
|
|
25
|
+
return body;
|
|
26
|
+
};
|
|
27
|
+
async function fetchComments(fetchImpl = fetch) {
|
|
28
|
+
return (await parse(
|
|
29
|
+
await fetchImpl(COMMENTS_API_PATH, { headers: { Accept: "application/json" } })
|
|
30
|
+
)).comments ?? [];
|
|
31
|
+
}
|
|
32
|
+
async function sendCommentAction(action, fetchImpl = fetch) {
|
|
33
|
+
return (await parse(
|
|
34
|
+
await fetchImpl(COMMENTS_API_PATH, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
headers: { "Content-Type": "application/json" },
|
|
37
|
+
body: JSON.stringify(action)
|
|
38
|
+
})
|
|
39
|
+
)).comment;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/addon-comments/state.ts
|
|
43
|
+
var DEFAULT_STATE = { picking: !1 };
|
|
44
|
+
|
|
45
|
+
// src/addon-comments/components/CommentList.tsx
|
|
46
|
+
import { Button, useCopyButton } from "@aussieljk/forkbook/internal/components";
|
|
47
|
+
|
|
48
|
+
// src/addon-comments/prompt.ts
|
|
49
|
+
var formatArgs = (args) => {
|
|
50
|
+
if (!(!args || Object.keys(args).length === 0))
|
|
51
|
+
try {
|
|
52
|
+
return JSON.stringify(args, null, 2);
|
|
53
|
+
} catch {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
function formatCommentPrompt(comment) {
|
|
58
|
+
let lines = [`Story: ${comment.title} / ${comment.name} (id: ${comment.storyId})`];
|
|
59
|
+
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");
|
|
60
|
+
let args = formatArgs(comment.args);
|
|
61
|
+
return args && lines.push("Args:", "```json", args, "```"), lines.push(`Note: ${comment.note}`), lines.push(`Comment id: ${comment.id}`), lines.join(`
|
|
62
|
+
`);
|
|
63
|
+
}
|
|
64
|
+
function formatCommentsPrompt(comments) {
|
|
65
|
+
return comments.length === 0 ? "There are no open Forkbook comments." : [
|
|
66
|
+
comments.length === 1 ? "Please address this Forkbook comment on a story." : `Please address these ${comments.length} Forkbook comments on stories.`,
|
|
67
|
+
...comments.map((comment, index) => `## Comment ${index + 1}
|
|
68
|
+
${formatCommentPrompt(comment)}`),
|
|
69
|
+
"When you finish a comment, resolve it with the `resolve_comment` MCP tool (Forkbook addon-mcp). Give its id and a short reply."
|
|
70
|
+
].join(`
|
|
71
|
+
|
|
72
|
+
`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// forkbook-css:/home/runner/work/forkbook/forkbook/code/core/src/addon-comments/components/Comments.module.css
|
|
76
|
+
var id = "core/src/addon-comments/components/Comments.module.css";
|
|
77
|
+
if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]`)) {
|
|
78
|
+
let style = document.createElement("style");
|
|
79
|
+
style.setAttribute("data-fb-css", id), style.textContent = ".fb-Y5e6Rq-panel{flex-direction:column;gap:12px;padding:12px;display:flex}.fb-Y5e6Rq-row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.fb-Y5e6Rq-form{flex-direction:column;gap:6px;display:flex}.fb-Y5e6Rq-muted{font-size:var(--fb-size-s1);color:var(--fb-text-muted-color);flex-wrap:wrap;gap:6px;display:flex}.fb-Y5e6Rq-input{box-sizing:border-box;width:100%;min-height:64px;font:inherit;font-size:var(--fb-size-s2);color:var(--fb-color-default-text);background:var(--fb-input-background);border:1px solid var(--fb-input-border);border-radius:var(--fb-app-border-radius);padding:8px}.fb-Y5e6Rq-error{color:var(--fb-color-negative-text);font-size:var(--fb-size-s1)}.fb-Y5e6Rq-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.fb-Y5e6Rq-item{border:1px solid var(--fb-app-border-color);border-radius:var(--fb-app-border-radius);flex-direction:column;gap:6px;padding:10px;display:flex}.fb-Y5e6Rq-current{border-color:var(--fb-color-secondary)}.fb-Y5e6Rq-resolved{opacity:.6}.fb-Y5e6Rq-note{font-size:var(--fb-size-s2);white-space:pre-wrap;margin:0}.fb-Y5e6Rq-code{font-family:var(--fb-font-mono);font-size:var(--fb-size-s1);word-break:break-all}.fb-Y5e6Rq-link{all:unset;cursor:pointer;color:var(--fb-color-secondary)}", document.head.appendChild(style);
|
|
80
|
+
}
|
|
81
|
+
var Comments_default = { row: "fb-Y5e6Rq-row", current: "fb-Y5e6Rq-current", panel: "fb-Y5e6Rq-panel", form: "fb-Y5e6Rq-form", resolved: "fb-Y5e6Rq-resolved", muted: "fb-Y5e6Rq-muted", code: "fb-Y5e6Rq-code", input: "fb-Y5e6Rq-input", list: "fb-Y5e6Rq-list", error: "fb-Y5e6Rq-error", item: "fb-Y5e6Rq-item", link: "fb-Y5e6Rq-link", note: "fb-Y5e6Rq-note" };
|
|
82
|
+
|
|
83
|
+
// src/addon-comments/components/CommentList.tsx
|
|
84
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
85
|
+
var CopyForClaude = ({ comment }) => {
|
|
86
|
+
let { children, buttonProps } = useCopyButton({
|
|
87
|
+
content: formatCommentsPrompt([comment]),
|
|
88
|
+
children: "Copy for Claude",
|
|
89
|
+
ariaLabel: !1
|
|
90
|
+
});
|
|
91
|
+
return jsx(Button, { size: "small", variant: "outline", ...buttonProps, children });
|
|
92
|
+
}, CopyAllOpen = ({ comments }) => {
|
|
93
|
+
let open = comments.filter((comment) => comment.status === "open"), { children, buttonProps } = useCopyButton({
|
|
94
|
+
content: formatCommentsPrompt(open),
|
|
95
|
+
children: `Copy all open (${open.length})`,
|
|
96
|
+
ariaLabel: !1
|
|
97
|
+
});
|
|
98
|
+
return jsx(Button, { size: "small", variant: "solid", disabled: open.length === 0, ...buttonProps, children });
|
|
99
|
+
}, CommentList = ({
|
|
100
|
+
comments,
|
|
101
|
+
currentStoryId,
|
|
102
|
+
onResolve,
|
|
103
|
+
onReopen,
|
|
104
|
+
onDelete,
|
|
105
|
+
onSelectStory
|
|
106
|
+
}) => comments.length === 0 ? jsx("div", { className: Comments_default.muted, children: "No comments yet." }) : jsx("ol", { className: Comments_default.list, "aria-label": "Comments", children: comments.map((comment) => jsxs(
|
|
107
|
+
"li",
|
|
108
|
+
{
|
|
109
|
+
className: [
|
|
110
|
+
Comments_default.item,
|
|
111
|
+
comment.storyId === currentStoryId ? Comments_default.current : "",
|
|
112
|
+
comment.status === "resolved" ? Comments_default.resolved : ""
|
|
113
|
+
].join(" "),
|
|
114
|
+
"data-comment-id": comment.id,
|
|
115
|
+
children: [
|
|
116
|
+
jsxs("div", { className: Comments_default.muted, children: [
|
|
117
|
+
onSelectStory ? jsxs("button", { type: "button", className: Comments_default.link, onClick: () => onSelectStory(comment), children: [
|
|
118
|
+
comment.title,
|
|
119
|
+
" / ",
|
|
120
|
+
comment.name
|
|
121
|
+
] }) : jsxs("span", { children: [
|
|
122
|
+
comment.title,
|
|
123
|
+
" / ",
|
|
124
|
+
comment.name
|
|
125
|
+
] }),
|
|
126
|
+
jsx("span", { children: comment.status === "resolved" ? "Resolved" : "Open" })
|
|
127
|
+
] }),
|
|
128
|
+
comment.element ? jsx("code", { className: Comments_default.code, title: comment.element.text, children: comment.element.selector }) : jsx("div", { className: Comments_default.muted, children: "Whole story" }),
|
|
129
|
+
jsx("p", { className: Comments_default.note, children: comment.note }),
|
|
130
|
+
comment.reply && jsxs("div", { className: Comments_default.muted, children: [
|
|
131
|
+
"Reply: ",
|
|
132
|
+
comment.reply
|
|
133
|
+
] }),
|
|
134
|
+
jsxs("div", { className: Comments_default.row, children: [
|
|
135
|
+
jsx(CopyForClaude, { comment }),
|
|
136
|
+
comment.status === "open" ? jsx(
|
|
137
|
+
Button,
|
|
138
|
+
{
|
|
139
|
+
size: "small",
|
|
140
|
+
variant: "ghost",
|
|
141
|
+
ariaLabel: !1,
|
|
142
|
+
onClick: () => onResolve(comment),
|
|
143
|
+
children: "Resolve"
|
|
144
|
+
}
|
|
145
|
+
) : jsx(
|
|
146
|
+
Button,
|
|
147
|
+
{
|
|
148
|
+
size: "small",
|
|
149
|
+
variant: "ghost",
|
|
150
|
+
ariaLabel: !1,
|
|
151
|
+
onClick: () => onReopen(comment),
|
|
152
|
+
children: "Reopen"
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
jsx(
|
|
156
|
+
Button,
|
|
157
|
+
{
|
|
158
|
+
size: "small",
|
|
159
|
+
variant: "ghost",
|
|
160
|
+
ariaLabel: !1,
|
|
161
|
+
onClick: () => onDelete(comment),
|
|
162
|
+
children: "Delete"
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] })
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
comment.id
|
|
169
|
+
)) });
|
|
170
|
+
|
|
171
|
+
// src/addon-comments/components/CommentsPanel.tsx
|
|
172
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
173
|
+
var toJsonArgs = (args) => {
|
|
174
|
+
if (args)
|
|
175
|
+
try {
|
|
176
|
+
return JSON.parse(JSON.stringify(args));
|
|
177
|
+
} catch {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
}, CommentsPanel = ({ active }) => {
|
|
181
|
+
let api = useStorybookApi(), { storyId } = useStorybookState(), [state, setState] = useAddonState(ADDON_ID, DEFAULT_STATE), [comments, setComments] = useState([]), [note, setNote] = useState(""), [filter, setFilter] = useState("open"), [error, setError] = useState(), reload = useCallback(async () => {
|
|
182
|
+
try {
|
|
183
|
+
setComments(await fetchComments()), setError(void 0);
|
|
184
|
+
} catch (err) {
|
|
185
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
186
|
+
}
|
|
187
|
+
}, []);
|
|
188
|
+
useEffect(() => {
|
|
189
|
+
active && reload();
|
|
190
|
+
}, [active, reload]);
|
|
191
|
+
let run = async (action) => {
|
|
192
|
+
try {
|
|
193
|
+
await sendCommentAction(action), await reload();
|
|
194
|
+
} catch (err) {
|
|
195
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
196
|
+
}
|
|
197
|
+
}, composing = !!state.pending || !!state.wholeStory, startPick = () => {
|
|
198
|
+
setState({ picking: !0 }), api.emit(EVENTS.PICK_START);
|
|
199
|
+
}, cancel = () => {
|
|
200
|
+
state.picking && api.emit(EVENTS.PICK_CANCEL), setState(DEFAULT_STATE), setNote("");
|
|
201
|
+
}, save = async () => {
|
|
202
|
+
let story = api.getCurrentStoryData();
|
|
203
|
+
!story || story.type !== "story" || !note.trim() || (await run({
|
|
204
|
+
action: "add",
|
|
205
|
+
comment: {
|
|
206
|
+
storyId: story.id,
|
|
207
|
+
title: story.title,
|
|
208
|
+
name: story.name,
|
|
209
|
+
importPath: story.importPath,
|
|
210
|
+
element: state.pending,
|
|
211
|
+
args: toJsonArgs(story.args),
|
|
212
|
+
note
|
|
213
|
+
}
|
|
214
|
+
}), setNote(""), setState(DEFAULT_STATE));
|
|
215
|
+
}, shown = filter === "open" ? comments.filter((c) => c.status === "open") : comments;
|
|
216
|
+
return jsx2(ScrollArea, { vertical: !0, children: jsxs2("div", { className: Comments_default.panel, children: [
|
|
217
|
+
jsxs2("div", { className: Comments_default.row, children: [
|
|
218
|
+
jsx2(
|
|
219
|
+
Button2,
|
|
220
|
+
{
|
|
221
|
+
size: "small",
|
|
222
|
+
variant: "solid",
|
|
223
|
+
ariaLabel: !1,
|
|
224
|
+
onClick: startPick,
|
|
225
|
+
disabled: state.picking,
|
|
226
|
+
children: state.picking ? "Click an element in the story\u2026" : "Add comment on element"
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
jsx2(
|
|
230
|
+
Button2,
|
|
231
|
+
{
|
|
232
|
+
size: "small",
|
|
233
|
+
variant: "outline",
|
|
234
|
+
onClick: () => setState({ picking: !1, wholeStory: !0 }),
|
|
235
|
+
children: "Comment on whole story"
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
(state.picking || composing) && jsx2(Button2, { size: "small", variant: "ghost", ariaLabel: !1, onClick: cancel, children: "Cancel" })
|
|
239
|
+
] }),
|
|
240
|
+
composing && jsxs2(
|
|
241
|
+
"form",
|
|
242
|
+
{
|
|
243
|
+
className: Comments_default.form,
|
|
244
|
+
onSubmit: (event) => {
|
|
245
|
+
event.preventDefault(), save();
|
|
246
|
+
},
|
|
247
|
+
children: [
|
|
248
|
+
jsx2("span", { className: Comments_default.muted, children: state.pending ? `Element: ${state.pending.selector}${state.pending.text ? ` ("${state.pending.text}")` : ""}` : "Whole story" }),
|
|
249
|
+
jsx2(
|
|
250
|
+
"textarea",
|
|
251
|
+
{
|
|
252
|
+
className: Comments_default.input,
|
|
253
|
+
"aria-label": "Comment note",
|
|
254
|
+
autoFocus: !0,
|
|
255
|
+
value: note,
|
|
256
|
+
placeholder: "What should change?",
|
|
257
|
+
onChange: (event) => setNote(event.target.value),
|
|
258
|
+
onKeyDown: (event) => {
|
|
259
|
+
event.key === "Enter" && (event.metaKey || event.ctrlKey) && save();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
jsx2("div", { className: Comments_default.row, children: jsx2(
|
|
264
|
+
Button2,
|
|
265
|
+
{
|
|
266
|
+
size: "small",
|
|
267
|
+
variant: "solid",
|
|
268
|
+
ariaLabel: !1,
|
|
269
|
+
type: "submit",
|
|
270
|
+
disabled: !note.trim(),
|
|
271
|
+
children: "Save comment"
|
|
272
|
+
}
|
|
273
|
+
) })
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
error && jsx2("div", { className: Comments_default.error, role: "alert", children: error }),
|
|
278
|
+
jsxs2("div", { className: Comments_default.row, children: [
|
|
279
|
+
jsx2(CopyAllOpen, { comments }),
|
|
280
|
+
jsx2(
|
|
281
|
+
Button2,
|
|
282
|
+
{
|
|
283
|
+
size: "small",
|
|
284
|
+
variant: "ghost",
|
|
285
|
+
onClick: () => setFilter(filter === "open" ? "all" : "open"),
|
|
286
|
+
children: filter === "open" ? "Show resolved" : "Hide resolved"
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
jsx2(Button2, { size: "small", variant: "ghost", ariaLabel: !1, onClick: () => {
|
|
290
|
+
reload();
|
|
291
|
+
}, children: "Refresh" })
|
|
292
|
+
] }),
|
|
293
|
+
jsx2(
|
|
294
|
+
CommentList,
|
|
295
|
+
{
|
|
296
|
+
comments: shown,
|
|
297
|
+
currentStoryId: storyId,
|
|
298
|
+
onResolve: (comment) => run({ action: "resolve", id: comment.id }),
|
|
299
|
+
onReopen: (comment) => run({ action: "reopen", id: comment.id }),
|
|
300
|
+
onDelete: (comment) => run({ action: "delete", id: comment.id }),
|
|
301
|
+
onSelectStory: (comment) => api.selectStory(comment.storyId)
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
] }) });
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
// src/addon-comments/manager.tsx
|
|
308
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
309
|
+
var CommentTool = () => {
|
|
310
|
+
let api = useStorybookApi2(), [state, setState] = useAddonState2(ADDON_ID, DEFAULT_STATE);
|
|
311
|
+
return jsx3(
|
|
312
|
+
ToggleButton,
|
|
313
|
+
{
|
|
314
|
+
padding: "small",
|
|
315
|
+
variant: "ghost",
|
|
316
|
+
pressed: state.picking,
|
|
317
|
+
ariaLabel: "Add comment",
|
|
318
|
+
tooltip: "Add a comment on an element",
|
|
319
|
+
onClick: () => {
|
|
320
|
+
if (state.picking) {
|
|
321
|
+
api.emit(EVENTS.PICK_CANCEL), setState(DEFAULT_STATE);
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
api.togglePanel(!0), api.setSelectedPanel(PANEL_ID), setState({ picking: !0 }), api.emit(EVENTS.PICK_START);
|
|
325
|
+
},
|
|
326
|
+
children: jsx3(MessageSquareTextIcon, {})
|
|
327
|
+
},
|
|
328
|
+
"comments"
|
|
329
|
+
);
|
|
330
|
+
};
|
|
331
|
+
addons.register(ADDON_ID, (api) => {
|
|
332
|
+
api.on(EVENTS.PICKED, (element) => {
|
|
333
|
+
api.setAddonState(ADDON_ID, { picking: !1, pending: element }), api.togglePanel(!0), api.setSelectedPanel(PANEL_ID);
|
|
334
|
+
}), api.on(EVENTS.PICK_ENDED, () => {
|
|
335
|
+
api.setAddonState(ADDON_ID, DEFAULT_STATE);
|
|
336
|
+
}), addons.add(TOOL_ID, {
|
|
337
|
+
type: types.TOOL,
|
|
338
|
+
title: "Comments",
|
|
339
|
+
match: ({ viewMode }) => viewMode === "story",
|
|
340
|
+
render: () => jsx3(CommentTool, {})
|
|
341
|
+
}), addons.add(PANEL_ID, {
|
|
342
|
+
type: types.PANEL,
|
|
343
|
+
title: "Comments",
|
|
344
|
+
render: ({ active }) => jsx3(CommentsPanel, { active: !!active })
|
|
345
|
+
});
|
|
346
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
|
|
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
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
COMMENTS_API_PATH,
|
|
14
|
+
getCommentStore
|
|
15
|
+
} from "../_node-chunks/chunk-AK4RPNTY.js";
|
|
16
|
+
import "../_node-chunks/chunk-7LYHZMJO.js";
|
|
17
|
+
|
|
18
|
+
// src/addon-comments/preset.ts
|
|
19
|
+
import { fileURLToPath } from "node:url";
|
|
20
|
+
import { buffer } from "node:stream/consumers";
|
|
21
|
+
import { getProjectRoot } from "@aussieljk/forkbook/internal/common";
|
|
22
|
+
var sendJson = (res, status, body) => {
|
|
23
|
+
res.writeHead(status, { "Content-Type": "application/json" }), res.end(JSON.stringify(body));
|
|
24
|
+
};
|
|
25
|
+
async function handleCommentsRequest(store, req, res) {
|
|
26
|
+
try {
|
|
27
|
+
if (req.method === "GET") {
|
|
28
|
+
let url = new URL(req.url ?? "/", "http://localhost"), status = url.searchParams.get("status") ?? "all", storyId = url.searchParams.get("storyId") ?? void 0;
|
|
29
|
+
sendJson(res, 200, { comments: await store.list({ status, storyId }) });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (req.headers["content-type"]?.split(";")[0].trim().toLowerCase() !== "application/json") {
|
|
33
|
+
sendJson(res, 415, { error: "Content-Type must be application/json" });
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let action = JSON.parse((await buffer(req)).toString("utf8"));
|
|
37
|
+
sendJson(res, 200, { comment: await store.apply(action) });
|
|
38
|
+
} catch (error) {
|
|
39
|
+
sendJson(res, 400, { error: error instanceof Error ? error.message : String(error) });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
var experimental_devServer = async (app) => {
|
|
43
|
+
let store = getCommentStore(getProjectRoot());
|
|
44
|
+
return app.get(COMMENTS_API_PATH, (req, res) => handleCommentsRequest(store, req, res)), app.post(COMMENTS_API_PATH, (req, res) => handleCommentsRequest(store, req, res)), app;
|
|
45
|
+
}, DEFAULT_ADDON = "@aussieljk/forkbook/addon-comments", managerEntries = async (entries = [], options) => options.forkbookDefaultComments ? [...entries, fileURLToPath(import.meta.resolve(`${DEFAULT_ADDON}/manager`))] : entries, previewAnnotations = async (entries = [], options) => options.forkbookDefaultComments ? [...entries, fileURLToPath(import.meta.resolve(`${DEFAULT_ADDON}/preview`))] : entries;
|
|
46
|
+
export {
|
|
47
|
+
DEFAULT_ADDON,
|
|
48
|
+
experimental_devServer,
|
|
49
|
+
handleCommentsRequest,
|
|
50
|
+
managerEntries,
|
|
51
|
+
previewAnnotations
|
|
52
|
+
};
|
|
@@ -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 = { wrapper: "fb-zhwxuG-wrapper",
|
|
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 = {
|
|
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";
|
|
@@ -27,7 +27,7 @@ if (typeof document < "u" && !document.querySelector(`style[data-fb-css="${id}"]
|
|
|
27
27
|
let style = document.createElement("style");
|
|
28
28
|
style.setAttribute("data-fb-css", id), style.textContent = ".fb-iSROvG-source{height:100%;position:relative;&>:first-child{height:100%;box-shadow:none;margin:0}}.fb-iSROvG-snippetWarning{position:absolute;top:8px;right:10px}", document.head.appendChild(style);
|
|
29
29
|
}
|
|
30
|
-
var manager_default = {
|
|
30
|
+
var manager_default = { snippetWarning: "fb-iSROvG-snippetWarning", source: "fb-iSROvG-source" };
|
|
31
31
|
|
|
32
32
|
// src/addon-docs/manager.tsx
|
|
33
33
|
import { jsx, jsxs } from "react/jsx-runtime";
|