@knocklabs/react 0.11.0 → 0.11.1
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/CHANGELOG.md +10 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/modules/feed/components/NotificationIconButton/NotificationIconButton.js.map +1 -1
- package/dist/cjs/modules/feed/components/UnseenBadge/UnseenBadge.js +1 -1
- package/dist/cjs/modules/feed/components/UnseenBadge/UnseenBadge.js.map +1 -1
- package/dist/cjs/modules/guide/components/Toolbar/KnockButton.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/KnockButton.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V1/V1.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V1/V1.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuideHoverCard.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuideHoverCard.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuideRow.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuideRow.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/V2.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/V2.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/helpers.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/helpers.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.js.map +1 -0
- package/dist/cjs/modules/guide/components/Toolbar/shared.js +2 -0
- package/dist/cjs/modules/guide/components/Toolbar/shared.js.map +1 -0
- package/dist/cjs/modules/guide/providers/KnockGuideProvider.js +1 -1
- package/dist/cjs/modules/guide/providers/KnockGuideProvider.js.map +1 -1
- package/dist/esm/index.mjs +112 -102
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/modules/feed/components/NotificationIconButton/NotificationIconButton.mjs.map +1 -1
- package/dist/esm/modules/feed/components/UnseenBadge/UnseenBadge.mjs +5 -5
- package/dist/esm/modules/feed/components/UnseenBadge/UnseenBadge.mjs.map +1 -1
- package/dist/esm/modules/guide/components/Toolbar/KnockButton.mjs +18 -0
- package/dist/esm/modules/guide/components/Toolbar/KnockButton.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V1/V1.mjs +42 -0
- package/dist/esm/modules/guide/components/Toolbar/V1/V1.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuideHoverCard.mjs +27 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuideHoverCard.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuideRow.mjs +34 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuideRow.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.mjs +17 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/V2.mjs +46 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/V2.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/helpers.mjs +13 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/helpers.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.mjs +101 -0
- package/dist/esm/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.mjs.map +1 -0
- package/dist/esm/modules/guide/components/Toolbar/shared.mjs +5 -0
- package/dist/esm/modules/guide/components/Toolbar/shared.mjs.map +1 -0
- package/dist/esm/modules/guide/providers/KnockGuideProvider.mjs +16 -6
- package/dist/esm/modules/guide/providers/KnockGuideProvider.mjs.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts +1 -1
- package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts.map +1 -1
- package/dist/types/modules/feed/components/UnseenBadge/UnseenBadge.d.ts +1 -1
- package/dist/types/modules/feed/components/UnseenBadge/UnseenBadge.d.ts.map +1 -1
- package/dist/types/modules/feed/components/UnseenBadge/index.d.ts +1 -1
- package/dist/types/modules/feed/components/UnseenBadge/index.d.ts.map +1 -1
- package/dist/types/modules/feed/index.d.ts +1 -1
- package/dist/types/modules/feed/index.d.ts.map +1 -1
- package/dist/types/modules/guide/components/Toolbar/KnockButton.d.ts +6 -0
- package/dist/types/modules/guide/components/Toolbar/KnockButton.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V1/V1.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/V1/V1.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V1/index.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/V1/index.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuideHoverCard.d.ts +8 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuideHoverCard.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuideRow.d.ts +8 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuideRow.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.d.ts +8 -0
- package/dist/types/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/V2.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/V2/V2.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/helpers.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/V2/helpers.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/index.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/V2/index.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.d.ts +59 -0
- package/dist/types/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/index.d.ts +3 -0
- package/dist/types/modules/guide/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/modules/guide/components/Toolbar/shared.d.ts +2 -0
- package/dist/types/modules/guide/components/Toolbar/shared.d.ts.map +1 -0
- package/dist/types/modules/guide/components/index.d.ts +1 -1
- package/dist/types/modules/guide/components/index.d.ts.map +1 -1
- package/dist/types/modules/guide/index.d.ts +1 -1
- package/dist/types/modules/guide/index.d.ts.map +1 -1
- package/dist/types/modules/guide/providers/KnockGuideProvider.d.ts +5 -1
- package/dist/types/modules/guide/providers/KnockGuideProvider.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/modules/guide/components/GuideToolbar/GuideToolbar.js +0 -2
- package/dist/cjs/modules/guide/components/GuideToolbar/GuideToolbar.js.map +0 -1
- package/dist/esm/modules/guide/components/GuideToolbar/GuideToolbar.mjs +0 -47
- package/dist/esm/modules/guide/components/GuideToolbar/GuideToolbar.mjs.map +0 -1
- package/dist/types/modules/guide/components/GuideToolbar/GuideToolbar.d.ts +0 -2
- package/dist/types/modules/guide/components/GuideToolbar/GuideToolbar.d.ts.map +0 -1
- package/dist/types/modules/guide/components/GuideToolbar/index.d.ts +0 -2
- package/dist/types/modules/guide/components/GuideToolbar/index.d.ts.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import { Button as o } from "@telegraph/button";
|
|
3
|
+
import { TOOLBAR_Z_INDEX as a } from "./shared.mjs";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const p = ({
|
|
6
|
+
onClick: e
|
|
7
|
+
}) => /* @__PURE__ */ t.createElement(o, { onClick: e, position: "fixed", top: "4", right: "4", bg: "surface-2", shadow: "3", rounded: "3", w: "10", h: "10", variant: "soft", "data-tgph-appearance": "dark", "aria-label": "Expand guide toolbar", style: {
|
|
8
|
+
zIndex: a
|
|
9
|
+
} }, /* @__PURE__ */ t.createElement("svg", { width: "40", height: "40", viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
10
|
+
position: "absolute",
|
|
11
|
+
top: "50%",
|
|
12
|
+
left: "50%",
|
|
13
|
+
transform: "translate(-50%, -50%)"
|
|
14
|
+
} }, /* @__PURE__ */ t.createElement("path", { d: "M11.6001 32.4V7.59998H16.6365V21.8219H16.7774L22.3067 14.8525H27.9418L21.8138 22.0696L28.4001 32.4H22.7996L18.8555 25.572L16.6365 28.0839V32.4H11.6001Z", fill: "#EDEEEF" }), /* @__PURE__ */ t.createElement("path", { d: "M28.4 10.4C28.4 11.9464 27.1467 13.2 25.6 13.2C24.0534 13.2 22.8 11.9464 22.8 10.4C22.8 8.85358 24.0534 7.59998 25.6 7.59998C27.1467 7.59998 28.4 8.85358 28.4 10.4Z", fill: "#FF573A" })));
|
|
15
|
+
export {
|
|
16
|
+
p as KnockButton
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=KnockButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnockButton.mjs","sources":["../../../../../../src/modules/guide/components/Toolbar/KnockButton.tsx"],"sourcesContent":["import { Button } from \"@telegraph/button\";\n\nimport { TOOLBAR_Z_INDEX } from \"./shared\";\nimport \"./styles.css\";\n\ntype Props = {\n onClick: () => void;\n};\n\nexport const KnockButton = ({ onClick }: Props) => {\n return (\n <Button\n onClick={onClick}\n position=\"fixed\"\n top=\"4\"\n right=\"4\"\n bg=\"surface-2\"\n shadow=\"3\"\n rounded=\"3\"\n w=\"10\"\n h=\"10\"\n variant=\"soft\"\n data-tgph-appearance=\"dark\"\n aria-label=\"Expand guide toolbar\"\n style={{ zIndex: TOOLBAR_Z_INDEX }}\n >\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n }}\n >\n <path\n d=\"M11.6001 32.4V7.59998H16.6365V21.8219H16.7774L22.3067 14.8525H27.9418L21.8138 22.0696L28.4001 32.4H22.7996L18.8555 25.572L16.6365 28.0839V32.4H11.6001Z\"\n fill=\"#EDEEEF\"\n />\n <path\n d=\"M28.4 10.4C28.4 11.9464 27.1467 13.2 25.6 13.2C24.0534 13.2 22.8 11.9464 22.8 10.4C22.8 8.85358 24.0534 7.59998 25.6 7.59998C27.1467 7.59998 28.4 8.85358 28.4 10.4Z\"\n fill=\"#FF573A\"\n />\n </svg>\n </Button>\n );\n};\n"],"names":["KnockButton","onClick","React","Button","zIndex","TOOLBAR_Z_INDEX","position","top","left","transform"],"mappings":";;;;AASO,MAAMA,IAAcA,CAAC;AAAA,EAAEC,SAAAA;AAAe,MAEzCC,gBAAAA,EAAA,cAACC,GACC,EAAA,SAAAF,GACA,UAAS,SACT,KAAI,KACJ,OAAM,KACN,IAAG,aACH,QAAO,KACP,SAAQ,KACR,GAAE,MACF,GAAE,MACF,SAAQ,QACR,wBAAqB,QACrB,cAAW,wBACX,OAAO;AAAA,EAAEG,QAAQC;AAAAA,EAEjB,GAAAH,gBAAAA,EAAA,cAAC,OACC,EAAA,OAAM,MACN,QAAO,MACP,SAAQ,aACR,MAAK,QACL,OAAM,8BACN,OAAO;AAAA,EACLI,UAAU;AAAA,EACVC,KAAK;AAAA,EACLC,MAAM;AAAA,EACNC,WAAW;AAAA,KAGbP,gBAAAA,EAAA,cAAC,QACC,EAAA,GAAE,2JACF,MAAK,UAAS,CAAA,GAEhBA,gBAAAA,EAAA,cAAC,UACC,GAAE,wKACF,MAAK,UAAS,CAAA,CAElB,CACF;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import e, { useState as d } from "react";
|
|
2
|
+
import { useGuideContext as m, useStore as p } from "@knocklabs/react-core";
|
|
3
|
+
import { Button as n } from "@telegraph/button";
|
|
4
|
+
import { Stack as a } from "@telegraph/layout";
|
|
5
|
+
import { Tag as f } from "@telegraph/tag";
|
|
6
|
+
import { Text as u } from "@telegraph/typography";
|
|
7
|
+
import { Wrench as g, Undo2 as h, Minimize2 as x } from "lucide-react";
|
|
8
|
+
import { KnockButton as E } from "../KnockButton.mjs";
|
|
9
|
+
import { TOOLBAR_Z_INDEX as C } from "../shared.mjs";
|
|
10
|
+
/* empty css */
|
|
11
|
+
const D = () => {
|
|
12
|
+
const [o, l] = d(!1), {
|
|
13
|
+
client: r
|
|
14
|
+
} = m(), t = p(r.store, (s) => s.debug);
|
|
15
|
+
if (!(t != null && t.forcedGuideKey))
|
|
16
|
+
return null;
|
|
17
|
+
const c = () => {
|
|
18
|
+
r.exitDebugMode();
|
|
19
|
+
}, i = () => {
|
|
20
|
+
l(!o);
|
|
21
|
+
};
|
|
22
|
+
return o ? /* @__PURE__ */ e.createElement(E, { onClick: i }) : /* @__PURE__ */ e.createElement(a, { gap: "2", align: "center", position: "fixed", top: "4", right: "4", backgroundColor: "surface-2", bg: "surface-2", shadow: "3", rounded: "3", py: "2", px: "3", "data-tgph-appearance": "dark", style: {
|
|
23
|
+
zIndex: C
|
|
24
|
+
} }, /* @__PURE__ */ e.createElement(a, { gap: "2", align: "center", direction: "row" }, /* @__PURE__ */ e.createElement(f, { color: "green", variant: "soft", icon: {
|
|
25
|
+
icon: g,
|
|
26
|
+
"aria-hidden": !0
|
|
27
|
+
} }, "Debug"), /* @__PURE__ */ e.createElement(u, { as: "div", size: "1", weight: "medium", w: "full", maxWidth: "40", style: {
|
|
28
|
+
overflow: "hidden",
|
|
29
|
+
textOverflow: "ellipsis",
|
|
30
|
+
whiteSpace: "nowrap"
|
|
31
|
+
} }, t.forcedGuideKey), /* @__PURE__ */ e.createElement(n, { onClick: c, size: "1", variant: "soft", trailingIcon: {
|
|
32
|
+
icon: h,
|
|
33
|
+
"aria-hidden": !0
|
|
34
|
+
} }, "Exit"), /* @__PURE__ */ e.createElement(n, { onClick: i, size: "1", variant: "soft", leadingIcon: {
|
|
35
|
+
icon: x,
|
|
36
|
+
alt: "Collapse guide toolbar"
|
|
37
|
+
} })));
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
D as V1
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=V1.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V1/V1.tsx"],"sourcesContent":["import { useGuideContext, useStore } from \"@knocklabs/react-core\";\nimport { Button } from \"@telegraph/button\";\nimport { Stack } from \"@telegraph/layout\";\nimport { Tag } from \"@telegraph/tag\";\nimport { Text } from \"@telegraph/typography\";\nimport { Minimize2, Undo2, Wrench } from \"lucide-react\";\nimport { useState } from \"react\";\n\nimport { KnockButton } from \"../KnockButton\";\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\nimport \"../styles.css\";\n\nexport const V1 = () => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n const { client } = useGuideContext();\n const debugState = useStore(client.store, (state) => state.debug);\n\n if (!debugState?.forcedGuideKey) {\n return null;\n }\n\n const handleExit = () => {\n client.exitDebugMode();\n };\n\n const handleToggleCollapse = () => {\n setIsCollapsed(!isCollapsed);\n };\n\n if (isCollapsed) {\n return <KnockButton onClick={handleToggleCollapse} />;\n }\n\n return (\n <Stack\n gap=\"2\"\n align=\"center\"\n position=\"fixed\"\n top=\"4\"\n right=\"4\"\n backgroundColor=\"surface-2\"\n bg=\"surface-2\"\n shadow=\"3\"\n rounded=\"3\"\n py=\"2\"\n px=\"3\"\n data-tgph-appearance=\"dark\"\n style={{ zIndex: TOOLBAR_Z_INDEX }}\n >\n <Stack gap=\"2\" align=\"center\" direction=\"row\">\n <Tag\n color=\"green\"\n variant=\"soft\"\n icon={{ icon: Wrench, \"aria-hidden\": true }}\n >\n Debug\n </Tag>\n\n <Text\n as=\"div\"\n size=\"1\"\n weight=\"medium\"\n w=\"full\"\n maxWidth=\"40\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {debugState.forcedGuideKey}\n </Text>\n\n <Button\n onClick={handleExit}\n size=\"1\"\n variant=\"soft\"\n trailingIcon={{ icon: Undo2, \"aria-hidden\": true }}\n >\n Exit\n </Button>\n\n <Button\n onClick={handleToggleCollapse}\n size=\"1\"\n variant=\"soft\"\n leadingIcon={{ icon: Minimize2, alt: \"Collapse guide toolbar\" }}\n />\n </Stack>\n </Stack>\n );\n};\n"],"names":["V1","isCollapsed","setIsCollapsed","useState","client","useGuideContext","debugState","useStore","store","state","debug","forcedGuideKey","handleExit","exitDebugMode","handleToggleCollapse","React","KnockButton","Stack","zIndex","TOOLBAR_Z_INDEX","Tag","icon","Wrench","Text","overflow","textOverflow","whiteSpace","Button","Undo2","Minimize2","alt"],"mappings":";;;;;;;;;;AAYO,MAAMA,IAAKA,MAAM;AACtB,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9C;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAgB,GAC7BC,IAAaC,EAASH,EAAOI,OAAQC,CAAAA,MAAUA,EAAMC,KAAK;AAE5D,MAAA,EAACJ,KAAAA,QAAAA,EAAYK;AACR,WAAA;AAGT,QAAMC,IAAaA,MAAM;AACvBR,IAAAA,EAAOS,cAAc;AAAA,EACvB,GAEMC,IAAuBA,MAAM;AACjCZ,IAAAA,EAAe,CAACD,CAAW;AAAA,EAC7B;AAEA,SAAIA,IACKc,gBAAAA,EAAA,cAACC,GAAY,EAAA,SAASF,EAAwB,CAAA,IAIrDC,gBAAAA,EAAA,cAACE,GACC,EAAA,KAAI,KACJ,OAAM,UACN,UAAS,SACT,KAAI,KACJ,OAAM,KACN,iBAAgB,aAChB,IAAG,aACH,QAAO,KACP,SAAQ,KACR,IAAG,KACH,IAAG,KACH,wBAAqB,QACrB,OAAO;AAAA,IAAEC,QAAQC;AAAAA,EAAAA,KAEjBJ,gBAAAA,EAAA,cAACE,GAAM,EAAA,KAAI,KAAI,OAAM,UAAS,WAAU,MAAA,mCACrCG,GACC,EAAA,OAAM,SACN,SAAQ,QACR,MAAM;AAAA,IAAEC,MAAMC;AAAAA,IAAQ,eAAe;AAAA,EAAA,EAAO,GAAA,OAG9C,GAEAP,gBAAAA,EAAA,cAACQ,KACC,IAAG,OACH,MAAK,KACL,QAAO,UACP,GAAE,QACF,UAAS,MACT,OAAO;AAAA,IACLC,UAAU;AAAA,IACVC,cAAc;AAAA,IACdC,YAAY;AAAA,EAGbpB,EAAAA,GAAAA,EAAWK,cACd,GAECI,gBAAAA,EAAA,cAAAY,GAAA,EACC,SAASf,GACT,MAAK,KACL,SAAQ,QACR,cAAc;AAAA,IAAES,MAAMO;AAAAA,IAAO,eAAe;AAAA,EAAK,EAAA,GAAE,MAGrD,GAECb,gBAAAA,EAAA,cAAAY,GAAA,EACC,SAASb,GACT,MAAK,KACL,SAAQ,QACR,aAAa;AAAA,IAAEO,MAAMQ;AAAAA,IAAWC,KAAK;AAAA,EAAyB,EAAA,CAAE,CAEpE,CACF;AAEJ;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as t from "@radix-ui/react-hover-card";
|
|
2
|
+
import { Stack as n, Box as l } from "@telegraph/layout";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import { isUnknownGuide as i } from "./useInspectGuideClientStore.mjs";
|
|
5
|
+
const f = ({
|
|
6
|
+
children: r,
|
|
7
|
+
guide: o
|
|
8
|
+
}) => {
|
|
9
|
+
if (i(o))
|
|
10
|
+
return /* @__PURE__ */ e.createElement(n, { align: "center" }, r);
|
|
11
|
+
const {
|
|
12
|
+
annotation: c,
|
|
13
|
+
activation_location_rules: m,
|
|
14
|
+
priority: s,
|
|
15
|
+
...a
|
|
16
|
+
} = o;
|
|
17
|
+
return /* @__PURE__ */ e.createElement(t.Root, null, /* @__PURE__ */ e.createElement(t.Trigger, null, /* @__PURE__ */ e.createElement(n, { align: "center" }, r)), /* @__PURE__ */ e.createElement(t.Portal, null, /* @__PURE__ */ e.createElement(t.Content, { sideOffset: 44, side: "left" }, /* @__PURE__ */ e.createElement(l, { px: "2", shadow: "2", rounded: "3", border: "px", overflow: "auto", backgroundColor: "surface-2", style: {
|
|
18
|
+
width: "450px",
|
|
19
|
+
maxHeight: "600px"
|
|
20
|
+
} }, /* @__PURE__ */ e.createElement("pre", { style: {
|
|
21
|
+
fontSize: "11px"
|
|
22
|
+
} }, /* @__PURE__ */ e.createElement("code", null, JSON.stringify(a, null, 2)))), /* @__PURE__ */ e.createElement(t.Arrow, null))));
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
f as GuideHoverCard
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=GuideHoverCard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuideHoverCard.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideHoverCard.tsx"],"sourcesContent":["import * as HoverCard from \"@radix-ui/react-hover-card\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport * as React from \"react\";\n\nimport {\n AnnotatedGuide,\n UnknownGuide,\n isUnknownGuide,\n} from \"./useInspectGuideClientStore\";\n\ntype Props = {\n guide: AnnotatedGuide | UnknownGuide;\n};\n\nexport const GuideHoverCard = ({\n children,\n guide,\n}: React.PropsWithChildren<Props>) => {\n if (isUnknownGuide(guide)) {\n return <Stack align=\"center\">{children}</Stack>;\n }\n\n // Prune out internal or legacy fields.\n const {\n annotation: _annotation,\n activation_location_rules: _activation_location_rules,\n priority: _priority,\n ...rest\n } = guide;\n\n return (\n <HoverCard.Root>\n <HoverCard.Trigger>\n <Stack align=\"center\">{children}</Stack>\n </HoverCard.Trigger>\n <HoverCard.Portal>\n <HoverCard.Content sideOffset={44} side=\"left\">\n <Box\n px=\"2\"\n shadow=\"2\"\n rounded=\"3\"\n border=\"px\"\n overflow=\"auto\"\n backgroundColor=\"surface-2\"\n style={{\n width: \"450px\",\n maxHeight: \"600px\",\n }}\n >\n <pre\n style={{\n fontSize: \"11px\",\n }}\n >\n <code>{JSON.stringify(rest, null, 2)}</code>\n </pre>\n </Box>\n <HoverCard.Arrow />\n </HoverCard.Content>\n </HoverCard.Portal>\n </HoverCard.Root>\n );\n};\n"],"names":["GuideHoverCard","children","guide","isUnknownGuide","React","Stack","annotation","_annotation","activation_location_rules","_activation_location_rules","priority","_priority","rest","HoverCard","Box","width","maxHeight","fontSize","JSON","stringify"],"mappings":";;;;AAcO,MAAMA,IAAiBA,CAAC;AAAA,EAC7BC,UAAAA;AAAAA,EACAC,OAAAA;AAC8B,MAAM;AAChCC,MAAAA,EAAeD,CAAK;AACtB,WAAQ,gBAAAE,EAAA,cAAAC,GAAA,EAAM,OAAM,SAAA,GAAUJ,CAAS;AAInC,QAAA;AAAA,IACJK,YAAYC;AAAAA,IACZC,2BAA2BC;AAAAA,IAC3BC,UAAUC;AAAAA,IACV,GAAGC;AAAAA,EAAAA,IACDV;AAEJ,yCACGW,EAAU,MAAV,MACE,gBAAAT,EAAA,cAAAS,EAAU,SAAV,MACC,gBAAAT,EAAA,cAACC,GAAM,EAAA,OAAM,YAAUJ,CAAS,CAClC,GACC,gBAAAG,EAAA,cAAAS,EAAU,QAAV,MACC,gBAAAT,EAAA,cAACS,EAAU,SAAV,EAAkB,YAAY,IAAI,MAAK,UACtC,gBAAAT,EAAA,cAACU,KACC,IAAG,KACH,QAAO,KACP,SAAQ,KACR,QAAO,MACP,UAAS,QACT,iBAAgB,aAChB,OAAO;AAAA,IACLC,OAAO;AAAA,IACPC,WAAW;AAAA,EACb,EAAA,GAEC,gBAAAZ,EAAA,cAAA,OAAA,EACC,OAAO;AAAA,IACLa,UAAU;AAAA,EAAA,KAGX,gBAAAb,EAAA,cAAA,QAAA,MAAMc,KAAKC,UAAUP,GAAM,MAAM,CAAC,CAAE,CACvC,CACF,GACC,gBAAAR,EAAA,cAAAS,EAAU,OAAV,IAAe,CAClB,CACF,CACF;AAEJ;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button as r } from "@telegraph/button";
|
|
2
|
+
import { Stack as a, Box as l } from "@telegraph/layout";
|
|
3
|
+
import { Tag as c } from "@telegraph/tag";
|
|
4
|
+
import { Tooltip as n } from "@telegraph/tooltip";
|
|
5
|
+
import { Text as s } from "@telegraph/typography";
|
|
6
|
+
import { LocateFixed as m, UserCircle2 as d, Eye as p, CheckCircle2 as b, CircleDashed as h } from "lucide-react";
|
|
7
|
+
import * as e from "react";
|
|
8
|
+
import { GuideHoverCard as v } from "./GuideHoverCard.mjs";
|
|
9
|
+
import { isUnknownGuide as o } from "./useInspectGuideClientStore.mjs";
|
|
10
|
+
const E = ({
|
|
11
|
+
children: t
|
|
12
|
+
}) => /* @__PURE__ */ e.createElement(a, { h: "7", px: "2", borderTop: "px", justify: "space-between", align: "center" }, t), k = ({
|
|
13
|
+
guide: t,
|
|
14
|
+
orderIndex: i
|
|
15
|
+
}) => /* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement(a, { h: "6", justify: "flex-start", align: "center", gap: "2" }, /* @__PURE__ */ e.createElement(c, { size: "0", variant: "soft", color: t.bypass_global_group_limit ? "blue" : "default" }, i + 1), /* @__PURE__ */ e.createElement(v, { guide: t }, /* @__PURE__ */ e.createElement(s, { as: "code", size: "1", color: t.active ? "black" : "disabled" }, t.key))), /* @__PURE__ */ e.createElement(a, { justify: "flex-end" }, !o(t) && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(a, { gap: "1" }, /* @__PURE__ */ e.createElement(n, { label: t.annotation.activatable.status ? "This guide can be activated at the current location" : "This guide cannot be activated at the current location" }, /* @__PURE__ */ e.createElement(r, { px: "1", size: "1", variant: "soft", color: t.annotation.activatable.status ? "green" : "red", leadingIcon: {
|
|
16
|
+
icon: m,
|
|
17
|
+
alt: "Target"
|
|
18
|
+
} }))), /* @__PURE__ */ e.createElement(a, { px: "2", align: "center" }, /* @__PURE__ */ e.createElement(l, { h: "3", borderLeft: "px", borderColor: "gray-6" }))), /* @__PURE__ */ e.createElement(a, { gap: "1" }, !o(t) && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(n, { label: t.annotation.targetable.status ? "This user is being targeted" : t.annotation.targetable.message }, /* @__PURE__ */ e.createElement(r, { px: "1", size: "1", variant: "soft", color: t.annotation.targetable.status ? "green" : "red", leadingIcon: {
|
|
19
|
+
icon: d,
|
|
20
|
+
alt: "Target"
|
|
21
|
+
} })), /* @__PURE__ */ e.createElement(n, { label: t.annotation.archived.status ? "User has already dismissed this guide" : "User has not dismissed this guide" }, /* @__PURE__ */ e.createElement(r, { px: "1", size: "1", variant: "soft", color: t.annotation.archived.status ? "red" : "green", leadingIcon: {
|
|
22
|
+
icon: p,
|
|
23
|
+
alt: "Not archived"
|
|
24
|
+
} }))), /* @__PURE__ */ e.createElement(n, { label: o(t) ? "This guide has never been committed and published yet" : t.active ? "This guide is active" : "This guide is not active" }, /* @__PURE__ */ e.createElement(r, { px: "1", size: "1", variant: "soft", color: t.active ? "green" : "red", leadingIcon: t.active ? {
|
|
25
|
+
icon: b,
|
|
26
|
+
alt: "Active"
|
|
27
|
+
} : {
|
|
28
|
+
icon: h,
|
|
29
|
+
alt: "Inactive"
|
|
30
|
+
} })))));
|
|
31
|
+
export {
|
|
32
|
+
k as GuideRow
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=GuideRow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuideRow.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideRow.tsx"],"sourcesContent":["import { Button } from \"@telegraph/button\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport { Tag } from \"@telegraph/tag\";\nimport { Tooltip } from \"@telegraph/tooltip\";\nimport { Text } from \"@telegraph/typography\";\nimport {\n CheckCircle2,\n CircleDashed,\n Eye,\n LocateFixed,\n UserCircle2,\n} from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { GuideHoverCard } from \"./GuideHoverCard\";\nimport {\n AnnotatedGuide,\n UnknownGuide,\n isUnknownGuide,\n} from \"./useInspectGuideClientStore\";\n\nconst Row = ({ children }: React.PropsWithChildren) => (\n <Stack h=\"7\" px=\"2\" borderTop=\"px\" justify=\"space-between\" align=\"center\">\n {children}\n </Stack>\n);\n\ntype Props = {\n guide: UnknownGuide | AnnotatedGuide;\n orderIndex: number;\n};\n\nexport const GuideRow = ({ guide, orderIndex }: Props) => {\n return (\n <Row>\n <Stack h=\"6\" justify=\"flex-start\" align=\"center\" gap=\"2\">\n <Tag\n size=\"0\"\n variant=\"soft\"\n color={guide.bypass_global_group_limit ? \"blue\" : \"default\"}\n >\n {orderIndex + 1}\n </Tag>\n <GuideHoverCard guide={guide}>\n <Text as=\"code\" size=\"1\" color={guide.active ? \"black\" : \"disabled\"}>\n {guide.key}\n </Text>\n </GuideHoverCard>\n </Stack>\n\n <Stack justify=\"flex-end\">\n {!isUnknownGuide(guide) && (\n <>\n <Stack gap=\"1\">\n <Tooltip\n label={\n guide.annotation.activatable.status\n ? \"This guide can be activated at the current location\"\n : \"This guide cannot be activated at the current location\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.activatable.status ? \"green\" : \"red\"}\n leadingIcon={{ icon: LocateFixed, alt: \"Target\" }}\n />\n </Tooltip>\n </Stack>\n <Stack px=\"2\" align=\"center\">\n <Box h=\"3\" borderLeft=\"px\" borderColor=\"gray-6\" />\n </Stack>\n </>\n )}\n <Stack gap=\"1\">\n {!isUnknownGuide(guide) && (\n <>\n <Tooltip\n label={\n guide.annotation.targetable.status\n ? \"This user is being targeted\"\n : guide.annotation.targetable.message\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.targetable.status ? \"green\" : \"red\"}\n leadingIcon={{ icon: UserCircle2, alt: \"Target\" }}\n />\n </Tooltip>\n <Tooltip\n label={\n guide.annotation.archived.status\n ? \"User has already dismissed this guide\"\n : \"User has not dismissed this guide\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.archived.status ? \"red\" : \"green\"}\n leadingIcon={{ icon: Eye, alt: \"Not archived\" }}\n />\n </Tooltip>\n </>\n )}\n <Tooltip\n label={\n isUnknownGuide(guide)\n ? \"This guide has never been committed and published yet\"\n : !guide.active\n ? \"This guide is not active\"\n : \"This guide is active\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.active ? \"green\" : \"red\"}\n leadingIcon={\n guide.active\n ? { icon: CheckCircle2, alt: \"Active\" }\n : { icon: CircleDashed, alt: \"Inactive\" }\n }\n />\n </Tooltip>\n </Stack>\n </Stack>\n </Row>\n );\n};\n"],"names":["Row","children","React","Stack","GuideRow","guide","orderIndex","Tag","bypass_global_group_limit","GuideHoverCard","Text","active","key","isUnknownGuide","Tooltip","annotation","activatable","status","Button","icon","LocateFixed","alt","Box","targetable","message","UserCircle2","archived","Eye","CheckCircle2","CircleDashed"],"mappings":";;;;;;;;;AAqBA,MAAMA,IAAMA,CAAC;AAAA,EAAEC,UAAAA;AAAkC,MAC9C,gBAAAC,EAAA,cAAAC,GAAA,EAAM,GAAE,KAAI,IAAG,KAAI,WAAU,MAAK,SAAQ,iBAAgB,OAAM,SAAA,GAC9DF,CACH,GAQWG,IAAWA,CAAC;AAAA,EAAEC,OAAAA;AAAAA,EAAOC,YAAAA;AAAkB,sCAE/CN,GACC,MAAA,gBAAAE,EAAA,cAACC,GAAM,EAAA,GAAE,KAAI,SAAQ,cAAa,OAAM,UAAS,KAAI,IACnD,GAAA,gBAAAD,EAAA,cAACK,KACC,MAAK,KACL,SAAQ,QACR,OAAOF,EAAMG,4BAA4B,SAAS,UAEjDF,GAAAA,IAAa,CAChB,GACA,gBAAAJ,EAAA,cAACO,KAAe,OAAAJ,EACd,GAAA,gBAAAH,EAAA,cAACQ,GAAK,EAAA,IAAG,QAAO,MAAK,KAAI,OAAOL,EAAMM,SAAS,UAAU,WACtDN,GAAAA,EAAMO,GACT,CACF,CACF,GAEA,gBAAAV,EAAA,cAACC,GAAM,EAAA,SAAQ,cACZ,CAACU,EAAeR,CAAK,uDAEjB,gBAAAH,EAAA,cAAAC,GAAA,EAAM,KAAI,IACT,GAAA,gBAAAD,EAAA,cAACY,KACC,OACET,EAAMU,WAAWC,YAAYC,SACzB,wDACA,yDAAA,mCAGLC,GACC,EAAA,IAAG,KACH,MAAK,KACL,SAAQ,QACR,OAAOb,EAAMU,WAAWC,YAAYC,SAAS,UAAU,OACvD,aAAa;AAAA,EAAEE,MAAMC;AAAAA,EAAaC,KAAK;AAAA,EAAW,CAAA,CAEtD,CACF,GACA,gBAAAnB,EAAA,cAACC,GAAM,EAAA,IAAG,KAAI,OAAM,SAClB,GAAA,gBAAAD,EAAA,cAACoB,GAAI,EAAA,GAAE,KAAI,YAAW,MAAK,aAAY,SAAA,CAAQ,CACjD,CACF,GAEF,gBAAApB,EAAA,cAACC,GAAM,EAAA,KAAI,IACR,GAAA,CAACU,EAAeR,CAAK,KAElB,gBAAAH,EAAA,cAAAA,EAAA,UAAA,MAAA,gBAAAA,EAAA,cAACY,GACC,EAAA,OACET,EAAMU,WAAWQ,WAAWN,SACxB,gCACAZ,EAAMU,WAAWQ,WAAWC,WAGlC,gBAAAtB,EAAA,cAACgB,GACC,EAAA,IAAG,KACH,MAAK,KACL,SAAQ,QACR,OAAOb,EAAMU,WAAWQ,WAAWN,SAAS,UAAU,OACtD,aAAa;AAAA,EAAEE,MAAMM;AAAAA,EAAaJ,KAAK;AAAA,EAAW,CAAA,CAEtD,GACC,gBAAAnB,EAAA,cAAAY,GAAA,EACC,OACET,EAAMU,WAAWW,SAAST,SACtB,0CACA,oCAGN,GAAA,gBAAAf,EAAA,cAACgB,GACC,EAAA,IAAG,KACH,MAAK,KACL,SAAQ,QACR,OAAOb,EAAMU,WAAWW,SAAST,SAAS,QAAQ,SAClD,aAAa;AAAA,EAAEE,MAAMQ;AAAAA,EAAKN,KAAK;AAAA,EAAiB,CAAA,CAEpD,CACF,GAED,gBAAAnB,EAAA,cAAAY,GAAA,EACC,OACED,EAAeR,CAAK,IAChB,0DACCA,EAAMM,SAEL,yBADA,8BAIR,gBAAAT,EAAA,cAACgB,GACC,EAAA,IAAG,KACH,MAAK,KACL,SAAQ,QACR,OAAOb,EAAMM,SAAS,UAAU,OAChC,aACEN,EAAMM,SACF;AAAA,EAAEQ,MAAMS;AAAAA,EAAcP,KAAK;AAAA,IAC3B;AAAA,EAAEF,MAAMU;AAAAA,EAAcR,KAAK;AAAA,EAChC,CAAA,CAEL,CACF,CACF,CACF;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Select as t } from "@telegraph/select";
|
|
3
|
+
import { TOOLBAR_Z_INDEX as n } from "../shared.mjs";
|
|
4
|
+
const u = ({
|
|
5
|
+
value: i,
|
|
6
|
+
onChange: r
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement(t.Root, { size: "1", value: i, onValueChange: (l) => {
|
|
8
|
+
l && r(l);
|
|
9
|
+
}, contentProps: {
|
|
10
|
+
style: {
|
|
11
|
+
zIndex: n
|
|
12
|
+
}
|
|
13
|
+
} }, /* @__PURE__ */ e.createElement(t.Option, { size: "1", value: "current-page" }, "Displayable on current page"), /* @__PURE__ */ e.createElement(t.Option, { size: "1", value: "all-eligible" }, "All eligible guides for user"), /* @__PURE__ */ e.createElement(t.Option, { size: "1", value: "all-guides" }, "All existing guides"));
|
|
14
|
+
export {
|
|
15
|
+
u as GuidesListDisplaySelect
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=GuidesListDisplaySelect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidesListDisplaySelect.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.tsx"],"sourcesContent":["import { Select } from \"@telegraph/select\";\n\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\n\nexport type DisplayOption = \"current-page\" | \"all-eligible\" | \"all-guides\";\n\ntype Props = {\n value: DisplayOption;\n onChange: (option: DisplayOption) => void;\n};\n\nexport const GuidesListDisplaySelect = ({ value, onChange }: Props) => {\n return (\n <Select.Root\n size=\"1\"\n value={value}\n onValueChange={(value) => {\n if (!value) return;\n onChange(value as DisplayOption);\n }}\n contentProps={{\n style: { zIndex: TOOLBAR_Z_INDEX },\n }}\n >\n <Select.Option size=\"1\" value=\"current-page\">\n Displayable on current page\n </Select.Option>\n <Select.Option size=\"1\" value=\"all-eligible\">\n All eligible guides for user\n </Select.Option>\n <Select.Option size=\"1\" value=\"all-guides\">\n All existing guides\n </Select.Option>\n </Select.Root>\n );\n};\n"],"names":["GuidesListDisplaySelect","value","onChange","React","Select","style","zIndex","TOOLBAR_Z_INDEX"],"mappings":";;;AAWO,MAAMA,IAA0BA,CAAC;AAAA,EAAEC,OAAAA;AAAAA,EAAOC,UAAAA;AAAgB,MAE7DC,gBAAAA,EAAA,cAACC,EAAO,MAAP,EACC,MAAK,KACL,OAAAH,GACA,eAAgBA,CAAAA,MAAU;AACxB,EAAKA,KACLC,EAASD,CAAsB;GAEjC,cAAc;AAAA,EACZI,OAAO;AAAA,IAAEC,QAAQC;AAAAA,EAAAA;AAAgB,EAGnC,GAAAJ,gBAAAA,EAAA,cAACC,EAAO,QAAP,EAAc,MAAK,KAAI,OAAM,eAAc,GAAA,6BAE5C,GACAD,gBAAAA,EAAA,cAACC,EAAO,QAAP,EAAc,MAAK,KAAI,OAAM,eAAA,GAAc,8BAE5C,GACCD,gBAAAA,EAAA,cAAAC,EAAO,QAAP,EAAc,MAAK,KAAI,OAAM,aAAA,GAAY,qBAE1C,CACF;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useGuideContext as d } from "@knocklabs/react-core";
|
|
2
|
+
import { Button as u } from "@telegraph/button";
|
|
3
|
+
import { Box as l, Stack as s } from "@telegraph/layout";
|
|
4
|
+
import { Undo2 as f, Minimize2 as E } from "lucide-react";
|
|
5
|
+
import e from "react";
|
|
6
|
+
import { KnockButton as b } from "../KnockButton.mjs";
|
|
7
|
+
import { TOOLBAR_Z_INDEX as g } from "../shared.mjs";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { GuideRow as x } from "./GuideRow.mjs";
|
|
10
|
+
import { GuidesListDisplaySelect as y } from "./GuidesListDisplaySelect.mjs";
|
|
11
|
+
import { detectToolbarParam as C } from "./helpers.mjs";
|
|
12
|
+
import { useInspectGuideClientStore as w } from "./useInspectGuideClientStore.mjs";
|
|
13
|
+
const k = ({
|
|
14
|
+
guides: r,
|
|
15
|
+
displayOption: i
|
|
16
|
+
}) => r.map((t, o) => i === "current-page" && (!t.annotation.isEligible || !t.annotation.isQualified) || i === "all-eligible" && !t.annotation.isEligible ? null : /* @__PURE__ */ e.createElement(x, { key: t.key, guide: t, orderIndex: o })), V = () => {
|
|
17
|
+
const {
|
|
18
|
+
client: r
|
|
19
|
+
} = d(), [i, t] = e.useState("current-page"), [o, c] = e.useState(C()), [m, a] = e.useState(!0);
|
|
20
|
+
e.useEffect(() => {
|
|
21
|
+
if (o)
|
|
22
|
+
return r.setDebug(), () => {
|
|
23
|
+
r.unsetDebug();
|
|
24
|
+
};
|
|
25
|
+
}, [o, r]);
|
|
26
|
+
const n = w();
|
|
27
|
+
return n ? /* @__PURE__ */ e.createElement(l, { position: "fixed", top: "4", right: "4", style: {
|
|
28
|
+
zIndex: g
|
|
29
|
+
} }, m ? /* @__PURE__ */ e.createElement(b, { onClick: () => a(!1) }) : /* @__PURE__ */ e.createElement(s, { direction: "column", backgroundColor: "surface-2", shadow: "2", rounded: "3", border: "px", overflow: "hidden", style: {
|
|
30
|
+
width: "400px"
|
|
31
|
+
} }, /* @__PURE__ */ e.createElement(s, { w: "full", p: "2", justify: "space-between", direction: "row", style: {
|
|
32
|
+
boxSizing: "border-box"
|
|
33
|
+
} }, /* @__PURE__ */ e.createElement(l, { style: {
|
|
34
|
+
width: "220px"
|
|
35
|
+
} }, /* @__PURE__ */ e.createElement(y, { value: i, onChange: (p) => t(p) })), /* @__PURE__ */ e.createElement(s, { gap: "2" }, /* @__PURE__ */ e.createElement(u, { onClick: () => c(!1), size: "1", variant: "soft", trailingIcon: {
|
|
36
|
+
icon: f,
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
} }, "Exit"), /* @__PURE__ */ e.createElement(u, { onClick: () => a(!0), size: "1", variant: "soft", leadingIcon: {
|
|
39
|
+
icon: E,
|
|
40
|
+
alt: "Collapse guide toolbar"
|
|
41
|
+
} }))), /* @__PURE__ */ e.createElement(l, { w: "full" }, n.error && /* @__PURE__ */ e.createElement(l, null, n.error), /* @__PURE__ */ e.createElement(k, { guides: n.guides, displayOption: i })))) : null;
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
V as V2
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=V2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/V2.tsx"],"sourcesContent":["import { useGuideContext } from \"@knocklabs/react-core\";\nimport { Button } from \"@telegraph/button\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport { Minimize2, Undo2 } from \"lucide-react\";\nimport React from \"react\";\n\nimport { KnockButton } from \"../KnockButton\";\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\nimport \"../styles.css\";\n\nimport { GuideRow } from \"./GuideRow\";\nimport {\n DisplayOption,\n GuidesListDisplaySelect,\n} from \"./GuidesListDisplaySelect\";\nimport { detectToolbarParam } from \"./helpers\";\nimport {\n InspectionResult,\n useInspectGuideClientStore,\n} from \"./useInspectGuideClientStore\";\n\nconst GuidesList = ({\n guides,\n displayOption,\n}: {\n guides: InspectionResult[\"guides\"];\n displayOption: DisplayOption;\n}) => {\n return guides.map((guide, idx) => {\n if (\n displayOption === \"current-page\" &&\n (!guide.annotation.isEligible || !guide.annotation.isQualified)\n ) {\n return null;\n }\n if (displayOption === \"all-eligible\" && !guide.annotation.isEligible) {\n return null;\n }\n\n return <GuideRow key={guide.key} guide={guide} orderIndex={idx} />;\n });\n};\n\nexport const V2 = () => {\n const { client } = useGuideContext();\n\n const [guidesListDisplayOption, setGuidesListDisplayOption] =\n React.useState<DisplayOption>(\"current-page\");\n\n const [isVisible, setIsVisible] = React.useState(detectToolbarParam());\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n\n React.useEffect(() => {\n if (!isVisible) {\n return;\n }\n\n client.setDebug();\n\n return () => {\n client.unsetDebug();\n };\n }, [isVisible, client]);\n\n const result = useInspectGuideClientStore();\n if (!result) {\n return null;\n }\n\n return (\n <Box position=\"fixed\" top=\"4\" right=\"4\" style={{ zIndex: TOOLBAR_Z_INDEX }}>\n {isCollapsed ? (\n <KnockButton onClick={() => setIsCollapsed(false)} />\n ) : (\n <Stack\n direction=\"column\"\n backgroundColor=\"surface-2\"\n shadow=\"2\"\n rounded=\"3\"\n border=\"px\"\n overflow=\"hidden\"\n style={{ width: \"400px\" }}\n >\n <Stack\n w=\"full\"\n p=\"2\"\n justify=\"space-between\"\n direction=\"row\"\n style={{ boxSizing: \"border-box\" }}\n >\n <Box style={{ width: \"220px\" }}>\n <GuidesListDisplaySelect\n value={guidesListDisplayOption}\n onChange={(opt) => setGuidesListDisplayOption(opt)}\n />\n </Box>\n\n <Stack gap=\"2\">\n <Button\n onClick={() => setIsVisible(false)}\n size=\"1\"\n variant=\"soft\"\n trailingIcon={{ icon: Undo2, \"aria-hidden\": true }}\n >\n Exit\n </Button>\n <Button\n onClick={() => setIsCollapsed(true)}\n size=\"1\"\n variant=\"soft\"\n leadingIcon={{ icon: Minimize2, alt: \"Collapse guide toolbar\" }}\n />\n </Stack>\n </Stack>\n\n <Box w=\"full\">\n {result.error && <Box>{result.error}</Box>}\n <GuidesList\n guides={result.guides}\n displayOption={guidesListDisplayOption}\n />\n </Box>\n </Stack>\n )}\n </Box>\n );\n};\n"],"names":["GuidesList","guides","displayOption","map","guide","idx","annotation","isEligible","isQualified","GuideRow","key","V2","client","useGuideContext","guidesListDisplayOption","setGuidesListDisplayOption","React","useState","isVisible","setIsVisible","detectToolbarParam","isCollapsed","setIsCollapsed","useEffect","setDebug","unsetDebug","result","useInspectGuideClientStore","Box","zIndex","TOOLBAR_Z_INDEX","KnockButton","Stack","width","boxSizing","GuidesListDisplaySelect","opt","Button","icon","Undo2","Minimize2","alt","error"],"mappings":";;;;;;;;;;;;AAqBA,MAAMA,IAAaA,CAAC;AAAA,EAClBC,QAAAA;AAAAA,EACAC,eAAAA;AAIF,MACSD,EAAOE,IAAI,CAACC,GAAOC,MAEtBH,MAAkB,mBACjB,CAACE,EAAME,WAAWC,cAAc,CAACH,EAAME,WAAWE,gBAIjDN,MAAkB,kBAAkB,CAACE,EAAME,WAAWC,aACjD,uCAGDE,GAAS,EAAA,KAAKL,EAAMM,KAAK,OAAAN,GAAc,YAAYC,GAAO,CACnE,GAGUM,IAAKA,MAAM;AAChB,QAAA;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAgB,GAE7B,CAACC,GAAyBC,CAA0B,IACxDC,EAAMC,SAAwB,cAAc,GAExC,CAACC,GAAWC,CAAY,IAAIH,EAAMC,SAASG,GAAoB,GAC/D,CAACC,GAAaC,CAAc,IAAIN,EAAMC,SAAS,EAAI;AAEzDD,EAAAA,EAAMO,UAAU,MAAM;AACpB,QAAKL;AAILN,aAAAA,EAAOY,SAAS,GAET,MAAM;AACXZ,QAAAA,EAAOa,WAAW;AAAA,MACpB;AAAA,EAAA,GACC,CAACP,GAAWN,CAAM,CAAC;AAEtB,QAAMc,IAASC,EAA2B;AAC1C,SAAKD,IAKHV,gBAAAA,EAAA,cAACY,KAAI,UAAS,SAAQ,KAAI,KAAI,OAAM,KAAI,OAAO;AAAA,IAAEC,QAAQC;AAAAA,EAAgB,EAAA,GACtET,IACCL,gBAAAA,EAAA,cAACe,GAAY,EAAA,SAAS,MAAMT,EAAe,EAAK,EAAE,CAAA,IAEjDN,gBAAAA,EAAA,cAAAgB,GAAA,EACC,WAAU,UACV,iBAAgB,aAChB,QAAO,KACP,SAAQ,KACR,QAAO,MACP,UAAS,UACT,OAAO;AAAA,IAAEC,OAAO;AAAA,EAAQ,EAAA,GAEvBjB,gBAAAA,EAAA,cAAAgB,GAAA,EACC,GAAE,QACF,GAAE,KACF,SAAQ,iBACR,WAAU,OACV,OAAO;AAAA,IAAEE,WAAW;AAAA,EAAa,EAAA,GAEhClB,gBAAAA,EAAA,cAAAY,GAAA,EAAI,OAAO;AAAA,IAAEK,OAAO;AAAA,EAAA,EAAQ,GAC1BjB,gBAAAA,EAAA,cAAAmB,GAAA,EACC,OAAOrB,GACP,UAAWsB,CAAAA,MAAQrB,EAA2BqB,CAAG,EAAE,CAAA,CAEvD,GAEApB,gBAAAA,EAAA,cAACgB,GAAM,EAAA,KAAI,IACT,GAAAhB,gBAAAA,EAAA,cAACqB,GACC,EAAA,SAAS,MAAMlB,EAAa,EAAK,GACjC,MAAK,KACL,SAAQ,QACR,cAAc;AAAA,IAAEmB,MAAMC;AAAAA,IAAO,eAAe;AAAA,EAAA,EAAO,GAAA,MAGrD,GACAvB,gBAAAA,EAAA,cAACqB,KACC,SAAS,MAAMf,EAAe,EAAI,GAClC,MAAK,KACL,SAAQ,QACR,aAAa;AAAA,IAAEgB,MAAME;AAAAA,IAAWC,KAAK;AAAA,EAAyB,EAAA,CAAE,CAEpE,CACF,GAEAzB,gBAAAA,EAAA,cAACY,KAAI,GAAE,OAAA,GACJF,EAAOgB,SAAU1B,gBAAAA,EAAA,cAAAY,GAAA,MAAKF,EAAOgB,KAAM,GACnC1B,gBAAAA,EAAA,cAAAhB,GAAA,EACC,QAAQ0B,EAAOzB,QACf,eAAea,EAAwB,CAAA,CAE3C,CACF,CAEJ,IA1DO;AA4DX;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "@knocklabs/react-core";
|
|
2
|
+
import "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "lodash.debounce";
|
|
5
|
+
import { checkForWindow as o } from "../../../../core/utils.mjs";
|
|
6
|
+
const a = "knock_guide_toolbar", l = () => {
|
|
7
|
+
const r = o();
|
|
8
|
+
return !r || !r.location ? !1 : new URLSearchParams(r.location.search).get(a) === "true";
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
l as detectToolbarParam
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/helpers.ts"],"sourcesContent":["import { checkForWindow } from \"../../../../../modules/core\";\n\n// Use this param to start Toolbar and enter into a debugging session when\n// it is present and set to true.\nconst TOOLBAR_QUERY_PARAM = \"knock_guide_toolbar\";\n\nexport const detectToolbarParam = () => {\n const win = checkForWindow();\n if (!win || !win.location) {\n return false;\n }\n\n const urlSearchParams = new URLSearchParams(win.location.search);\n const hasToolbarParam = urlSearchParams.get(TOOLBAR_QUERY_PARAM) === \"true\";\n\n return hasToolbarParam;\n};\n"],"names":["TOOLBAR_QUERY_PARAM","detectToolbarParam","win","checkForWindow","location","URLSearchParams","search","get"],"mappings":";;;;;AAIA,MAAMA,IAAsB,uBAEfC,IAAqBA,MAAM;AACtC,QAAMC,IAAMC,EAAe;AAC3B,SAAI,CAACD,KAAO,CAACA,EAAIE,WACR,KAGe,IAAIC,gBAAgBH,EAAIE,SAASE,MAAM,EACvBC,IAAIP,CAAmB,MAAM;AAGvE;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { checkActivatable as i } from "@knocklabs/client";
|
|
2
|
+
import { useGuideContext as c, useStore as d } from "@knocklabs/react-core";
|
|
3
|
+
const l = (e) => {
|
|
4
|
+
switch (e.reason) {
|
|
5
|
+
case "not_in_target_audience":
|
|
6
|
+
case "target_conditions_not_met":
|
|
7
|
+
return {
|
|
8
|
+
targetable: {
|
|
9
|
+
status: !1,
|
|
10
|
+
reason: e.reason,
|
|
11
|
+
message: e.message
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
case "marked_as_archived":
|
|
15
|
+
return {
|
|
16
|
+
archived: {
|
|
17
|
+
status: !0
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
case "guide_not_active":
|
|
21
|
+
return {
|
|
22
|
+
active: {
|
|
23
|
+
status: !1
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
default:
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}, f = ({
|
|
30
|
+
active: e,
|
|
31
|
+
targetable: s,
|
|
32
|
+
archived: n
|
|
33
|
+
}) => !(!e.status || !s.status || n.status), g = ({
|
|
34
|
+
activatable: e
|
|
35
|
+
}) => !!e.status, _ = (e, s) => {
|
|
36
|
+
const {
|
|
37
|
+
ineligibleGuides: n,
|
|
38
|
+
location: u
|
|
39
|
+
} = s, r = n[e.key], t = r ? l(r) : void 0, a = {
|
|
40
|
+
// isEligible:
|
|
41
|
+
active: (t == null ? void 0 : t.active) || {
|
|
42
|
+
status: !0
|
|
43
|
+
},
|
|
44
|
+
targetable: (t == null ? void 0 : t.targetable) || {
|
|
45
|
+
status: !0
|
|
46
|
+
},
|
|
47
|
+
archived: (t == null ? void 0 : t.archived) || {
|
|
48
|
+
status: !1
|
|
49
|
+
},
|
|
50
|
+
// isQualified:
|
|
51
|
+
activatable: {
|
|
52
|
+
status: i(e, u)
|
|
53
|
+
}
|
|
54
|
+
}, o = {
|
|
55
|
+
...a,
|
|
56
|
+
isEligible: f(a),
|
|
57
|
+
isQualified: g(a)
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
...e,
|
|
61
|
+
annotation: o
|
|
62
|
+
};
|
|
63
|
+
}, v = (e) => ({
|
|
64
|
+
__typename: "UnknownGuide",
|
|
65
|
+
key: e,
|
|
66
|
+
active: !1,
|
|
67
|
+
bypass_global_group_limit: !1,
|
|
68
|
+
annotation: {
|
|
69
|
+
isEligible: !1,
|
|
70
|
+
isQualified: !1
|
|
71
|
+
}
|
|
72
|
+
}), b = () => {
|
|
73
|
+
var r;
|
|
74
|
+
const {
|
|
75
|
+
client: e
|
|
76
|
+
} = c(), s = d(e.store, (t) => ({
|
|
77
|
+
location: t.location,
|
|
78
|
+
guides: t.guides,
|
|
79
|
+
guideGroups: t.guideGroups,
|
|
80
|
+
ineligibleGuides: t.ineligibleGuides,
|
|
81
|
+
debug: t.debug
|
|
82
|
+
}));
|
|
83
|
+
if (!((r = s.debug) != null && r.debugging))
|
|
84
|
+
return;
|
|
85
|
+
const n = s.guideGroups[0];
|
|
86
|
+
return n ? {
|
|
87
|
+
guides: n.display_sequence.map((t) => {
|
|
88
|
+
const a = s.guides[t];
|
|
89
|
+
return a ? _(a, s) : v(t);
|
|
90
|
+
})
|
|
91
|
+
} : {
|
|
92
|
+
error: "no_guide_group",
|
|
93
|
+
guides: []
|
|
94
|
+
};
|
|
95
|
+
}, m = (e) => typeof e == "object" && e !== null && "__typename" in e && e.__typename === "UnknownGuide";
|
|
96
|
+
export {
|
|
97
|
+
m as isUnknownGuide,
|
|
98
|
+
g as resolveIsQualified,
|
|
99
|
+
b as useInspectGuideClientStore
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=useInspectGuideClientStore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInspectGuideClientStore.mjs","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.ts"],"sourcesContent":["import {\n KnockGuide,\n KnockGuideClientStoreState,\n KnockGuideIneligibilityMarker,\n checkActivatable,\n} from \"@knocklabs/client\";\nimport { useGuideContext, useStore } from \"@knocklabs/react-core\";\n\n/**\n * This is the main module that will house core logic for the toolbar. It hooks\n * into the guide client state store, extracts relevant data for debugging, and\n * transforms it into easily consumable data for the toolbar - namely\n * \"annotating\" guides for its various statuses to display.\n */\n\n// Active: `true` status = good\ntype ActiveStatus = {\n status: boolean;\n};\n\n// Targetable: `true` status = good\ntype TargetableStatusTrue = {\n status: true;\n};\ntype TargetableStatusFalse = {\n status: false;\n reason: string;\n message: string;\n};\ntype TargetableStatus = TargetableStatusTrue | TargetableStatusFalse;\n\ntype ActivatableStatus = {\n status: boolean;\n};\n\n// Archived: `false` status = good\ntype ArchivedStatus = {\n status: boolean;\n};\n\ntype AnnotatedStatuses = {\n // Individual eligibility statuses:\n active: ActiveStatus;\n targetable: TargetableStatus;\n archived: ArchivedStatus;\n // Individual qualified statuses:\n activatable: ActivatableStatus;\n};\n\ntype GuideAnnotation = AnnotatedStatuses & {\n // Resolved eligibility based on active, targetable and archived statuses,\n // which are backend driven evaluation results that are exposed for debugging.\n isEligible: boolean;\n\n // Resolved display qualification based on an activatable status, which\n // informs \"when\" and \"where\" an eligible guide can be displayed to user.\n isQualified: boolean;\n};\n\nexport type AnnotatedGuide = KnockGuide & {\n annotation: GuideAnnotation;\n\n // Legacy fields, typed only to make tsc happy when we prune these out.\n activation_location_rules?: KnockGuide[\"activation_url_patterns\"];\n priority?: number;\n};\n\n// Exists and ordered in control but absent in switchboard (therefore not\n// included in the api response), which implies a newly created guide that has\n// never been published to switchboard.\nexport type UnknownGuide = {\n __typename: \"UnknownGuide\";\n key: KnockGuide[\"key\"];\n active: false;\n bypass_global_group_limit: false;\n annotation: {\n isEligible: false;\n isQualified: false;\n };\n};\n\nexport type InspectionResult = {\n guides: (AnnotatedGuide | UnknownGuide)[];\n error?: \"no_guide_group\";\n};\n\nconst toIneligibilityStatus = (\n marker: KnockGuideIneligibilityMarker,\n): Partial<AnnotatedStatuses> | undefined => {\n switch (marker.reason) {\n case \"not_in_target_audience\":\n case \"target_conditions_not_met\":\n return {\n targetable: {\n status: false,\n reason: marker.reason,\n message: marker.message,\n },\n };\n\n case \"marked_as_archived\":\n return {\n archived: {\n status: true,\n },\n };\n\n case \"guide_not_active\":\n return {\n active: {\n status: false,\n },\n };\n\n default:\n return undefined;\n }\n};\n\nconst resolveIsEligible = ({\n active,\n targetable,\n archived,\n}: AnnotatedStatuses) => {\n if (!active.status) return false;\n if (!targetable.status) return false;\n if (archived.status) return false;\n return true;\n};\n\nexport const resolveIsQualified = ({ activatable }: AnnotatedStatuses) => {\n if (!activatable.status) return false;\n return true;\n};\n\ntype StoreStateSnapshot = Pick<\n KnockGuideClientStoreState,\n \"location\" | \"guides\" | \"guideGroups\" | \"ineligibleGuides\" | \"debug\"\n>;\n\nconst annotateGuide = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n): AnnotatedGuide => {\n const { ineligibleGuides, location } = snapshot;\n const marker = ineligibleGuides[guide.key];\n const ineligiblity = marker ? toIneligibilityStatus(marker) : undefined;\n\n const statuses: AnnotatedStatuses = {\n // isEligible:\n active: ineligiblity?.active || { status: true },\n targetable: ineligiblity?.targetable || { status: true },\n archived: ineligiblity?.archived || { status: false },\n // isQualified:\n activatable: { status: checkActivatable(guide, location) },\n };\n\n const annotation: GuideAnnotation = {\n ...statuses,\n isEligible: resolveIsEligible(statuses),\n isQualified: resolveIsQualified(statuses),\n };\n\n return {\n ...guide,\n annotation,\n };\n};\n\nconst newUnknownGuide = (key: KnockGuide[\"key\"]) =>\n ({\n __typename: \"UnknownGuide\",\n key,\n active: false,\n bypass_global_group_limit: false,\n annotation: {\n isEligible: false,\n isQualified: false,\n },\n }) as UnknownGuide;\n\nexport const useInspectGuideClientStore = (): InspectionResult | undefined => {\n const { client } = useGuideContext();\n\n // Extract a snapshot of the client store state for debugging.\n const snapshot: StoreStateSnapshot = useStore(client.store, (state) => {\n return {\n location: state.location,\n guides: state.guides,\n guideGroups: state.guideGroups,\n ineligibleGuides: state.ineligibleGuides,\n debug: state.debug,\n };\n });\n\n // Not in debugging session, so noop.\n if (!snapshot.debug?.debugging) {\n return undefined;\n }\n\n // Only for completeness, as there should always be a default group so this\n // should never happen.\n const defaultGroup = snapshot.guideGroups[0];\n if (!defaultGroup) {\n return {\n error: \"no_guide_group\",\n guides: [],\n };\n }\n\n // Annotate guides for various eligibility, activation and query statuses\n // that are useful for debugging purposes.\n const orderedGuides = defaultGroup.display_sequence.map((guideKey) => {\n const guide = snapshot.guides[guideKey];\n if (!guide) {\n return newUnknownGuide(guideKey);\n }\n\n return annotateGuide(guide, snapshot);\n });\n\n return {\n guides: orderedGuides,\n };\n};\n\nexport const isUnknownGuide = (input: unknown): input is UnknownGuide =>\n typeof input === \"object\" &&\n input !== null &&\n \"__typename\" in input &&\n (input as UnknownGuide).__typename === \"UnknownGuide\";\n"],"names":["toIneligibilityStatus","marker","reason","targetable","status","message","archived","active","undefined","resolveIsEligible","resolveIsQualified","activatable","annotateGuide","guide","snapshot","ineligibleGuides","location","key","ineligiblity","statuses","checkActivatable","annotation","isEligible","isQualified","newUnknownGuide","__typename","bypass_global_group_limit","useInspectGuideClientStore","client","useGuideContext","useStore","store","state","guides","guideGroups","debug","debugging","defaultGroup","display_sequence","map","guideKey","error","isUnknownGuide","input"],"mappings":";;AAsFA,MAAMA,IAAwBA,CAC5BC,MAC2C;AAC3C,UAAQA,EAAOC,QAAM;AAAA,IACnB,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,QACLC,YAAY;AAAA,UACVC,QAAQ;AAAA,UACRF,QAAQD,EAAOC;AAAAA,UACfG,SAASJ,EAAOI;AAAAA,QAAAA;AAAAA,MAEpB;AAAA,IAEF,KAAK;AACI,aAAA;AAAA,QACLC,UAAU;AAAA,UACRF,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,IAEF,KAAK;AACI,aAAA;AAAA,QACLG,QAAQ;AAAA,UACNH,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,IAEF;AACSI;AAAAA,EAAAA;AAEb,GAEMC,IAAoBA,CAAC;AAAA,EACzBF,QAAAA;AAAAA,EACAJ,YAAAA;AAAAA,EACAG,UAAAA;AACiB,MACb,GAACC,EAAOH,UACR,CAACD,EAAWC,UACZE,EAASF,SAIFM,IAAqBA,CAAC;AAAA,EAAEC,aAAAA;AAA+B,MAC7DA,EAAAA,EAAYP,QASbQ,IAAgBA,CACpBC,GACAC,MACmB;AACb,QAAA;AAAA,IAAEC,kBAAAA;AAAAA,IAAkBC,UAAAA;AAAAA,EAAAA,IAAaF,GACjCb,IAASc,EAAiBF,EAAMI,GAAG,GACnCC,IAAejB,IAASD,EAAsBC,CAAM,IAAIO,QAExDW,IAA8B;AAAA;AAAA,IAElCZ,SAAQW,KAAAA,gBAAAA,EAAcX,WAAU;AAAA,MAAEH,QAAQ;AAAA,IAAK;AAAA,IAC/CD,aAAYe,KAAAA,gBAAAA,EAAcf,eAAc;AAAA,MAAEC,QAAQ;AAAA,IAAK;AAAA,IACvDE,WAAUY,KAAAA,gBAAAA,EAAcZ,aAAY;AAAA,MAAEF,QAAQ;AAAA,IAAM;AAAA;AAAA,IAEpDO,aAAa;AAAA,MAAEP,QAAQgB,EAAiBP,GAAOG,CAAQ;AAAA,IAAA;AAAA,EACzD,GAEMK,IAA8B;AAAA,IAClC,GAAGF;AAAAA,IACHG,YAAYb,EAAkBU,CAAQ;AAAA,IACtCI,aAAab,EAAmBS,CAAQ;AAAA,EAC1C;AAEO,SAAA;AAAA,IACL,GAAGN;AAAAA,IACHQ,YAAAA;AAAAA,EACF;AACF,GAEMG,IAAkBA,CAACP,OACtB;AAAA,EACCQ,YAAY;AAAA,EACZR,KAAAA;AAAAA,EACAV,QAAQ;AAAA,EACRmB,2BAA2B;AAAA,EAC3BL,YAAY;AAAA,IACVC,YAAY;AAAA,IACZC,aAAa;AAAA,EAAA;AAEjB,IAEWI,IAA6BA,MAAoC;;AACtE,QAAA;AAAA,IAAEC,QAAAA;AAAAA,MAAWC,EAAgB,GAG7Bf,IAA+BgB,EAASF,EAAOG,OAAQC,CAAUA,OAC9D;AAAA,IACLhB,UAAUgB,EAAMhB;AAAAA,IAChBiB,QAAQD,EAAMC;AAAAA,IACdC,aAAaF,EAAME;AAAAA,IACnBnB,kBAAkBiB,EAAMjB;AAAAA,IACxBoB,OAAOH,EAAMG;AAAAA,EACf,EACD;AAGG,MAAA,GAACrB,IAAAA,EAASqB,UAATrB,QAAAA,EAAgBsB;AACZ5B;AAKH6B,QAAAA,IAAevB,EAASoB,YAAY,CAAC;AAC3C,SAAKG,IAkBE;AAAA,IACLJ,QAVoBI,EAAaC,iBAAiBC,IAAKC,CAAaA,MAAA;AAC9D3B,YAAAA,IAAQC,EAASmB,OAAOO,CAAQ;AACtC,aAAK3B,IAIED,EAAcC,GAAOC,CAAQ,IAH3BU,EAAgBgB,CAAQ;AAAA,IAGG,CACrC;AAAA,EAID,IAnBS;AAAA,IACLC,OAAO;AAAA,IACPR,QAAQ,CAAA;AAAA,EACV;AAiBJ,GAEaS,IAAiBA,CAACC,MAC7B,OAAOA,KAAU,YACjBA,MAAU,QACV,gBAAgBA,KACfA,EAAuBlB,eAAe;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.mjs","sources":["../../../../../../src/modules/guide/components/Toolbar/shared.ts"],"sourcesContent":["// Match the hardcoded z-index value in the telegraph tooltip package for now\n// to ensure everything within a toolbar is visible.\nexport const TOOLBAR_Z_INDEX = \"var(--tgph-zIndex-tooltip)\";\n"],"names":["TOOLBAR_Z_INDEX"],"mappings":"AAEO,MAAMA,IAAkB;"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { KnockGuideProvider as
|
|
1
|
+
import { KnockGuideProvider as m } from "@knocklabs/react-core";
|
|
2
2
|
import r from "react";
|
|
3
3
|
import "../components/Banner/Banner.mjs";
|
|
4
4
|
import "../components/Card/Card.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { V1 as i } from "../components/Toolbar/V1/V1.mjs";
|
|
6
|
+
import { V2 as n } from "../components/Toolbar/V2/V2.mjs";
|
|
6
7
|
import "../components/Modal/Modal.mjs";
|
|
7
|
-
const
|
|
8
|
-
children:
|
|
8
|
+
const f = ({
|
|
9
|
+
children: t,
|
|
10
|
+
toolbar: e = "v1",
|
|
9
11
|
...o
|
|
10
|
-
}) => /* @__PURE__ */ r.createElement(
|
|
12
|
+
}) => /* @__PURE__ */ r.createElement(
|
|
13
|
+
m,
|
|
14
|
+
{
|
|
15
|
+
...o,
|
|
16
|
+
trackDebugParams: e === "v1"
|
|
17
|
+
},
|
|
18
|
+
t,
|
|
19
|
+
e === "v2" ? /* @__PURE__ */ r.createElement(n, null) : /* @__PURE__ */ r.createElement(i, null)
|
|
20
|
+
);
|
|
11
21
|
export {
|
|
12
|
-
|
|
22
|
+
f as KnockGuideProvider
|
|
13
23
|
};
|
|
14
24
|
//# sourceMappingURL=KnockGuideProvider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KnockGuideProvider.mjs","sources":["../../../../../src/modules/guide/providers/KnockGuideProvider.tsx"],"sourcesContent":["import {\n KnockGuideProvider as KnockGuideProviderCore,\n type KnockGuideProviderProps,\n} from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"KnockGuideProvider.mjs","sources":["../../../../../src/modules/guide/providers/KnockGuideProvider.tsx"],"sourcesContent":["import {\n KnockGuideProvider as KnockGuideProviderCore,\n type KnockGuideProviderProps,\n} from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport { ToolbarV1, ToolbarV2 } from \"../components\";\n\ntype Props = KnockGuideProviderProps & {\n toolbar?: \"v1\" | \"v2\";\n};\n\n// Re-export the core KnockGuideProvider, so we can add React specific\n// functionality like the Toolbar component which shouldn't be included in other\n// contexts (e.g. React Native).\nexport const KnockGuideProvider: React.FC<React.PropsWithChildren<Props>> = ({\n children,\n toolbar = \"v1\",\n ...props\n}) => {\n return (\n <KnockGuideProviderCore\n {...props}\n // For backward compatibility with toolbar v1. Remove once v2 ships.\n trackDebugParams={toolbar === \"v1\"}\n >\n {children}\n {toolbar === \"v2\" ? <ToolbarV2 /> : <ToolbarV1 />}\n </KnockGuideProviderCore>\n );\n};\n"],"names":["KnockGuideProvider","children","toolbar","props","React","KnockGuideProviderCore","ToolbarV2","ToolbarV1"],"mappings":";;;;;;;AAeO,MAAMA,IAA+DA,CAAC;AAAA,EAC3EC,UAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACL,MAEIC,gBAAAA,EAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,GAAIF;AAAAA,IAEJ,kBAAkBD,MAAY;AAAA,EAAA;AAAA,EAE7BD;AAAAA,EACAC,MAAY,OAAOE,gBAAAA,EAAA,cAACE,GAAY,IAAA,oCAAIC,GAAY,IAAA;AACnD;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BellIcon, Button, ButtonGroup, CheckmarkCircle, ChevronDown, CloseCircle, Spinner, useOnBottomScroll, type ButtonProps, type SpinnerProps, } from './modules/core';
|
|
2
|
-
export { Avatar, EmptyFeed, MarkAsRead, NotificationCell, NotificationFeed, NotificationFeedContainer, NotificationFeedHeader, NotificationFeedPopover, NotificationIconButton, UnseenBadge, type AvatarProps, type
|
|
3
|
-
export { Banner, BannerView, Card, CardView, KnockGuideProvider,
|
|
2
|
+
export { Avatar, EmptyFeed, MarkAsRead, NotificationCell, NotificationFeed, NotificationFeedContainer, NotificationFeedHeader, NotificationFeedPopover, NotificationIconButton, UnseenBadge, type AvatarProps, type MarkAsReadProps, type NotificationCellProps, type NotificationFeedHeaderProps, type NotificationFeedPopoverProps, type NotificationFeedProps, type NotificationIconButtonProps, type RenderItem, type RenderItemProps, type UnseenBadgeProps, } from './modules/feed';
|
|
3
|
+
export { Banner, BannerView, Card, CardView, KnockGuideProvider, Modal, ModalView, } from './modules/guide';
|
|
4
4
|
export { MsTeamsAuthButton, MsTeamsAuthContainer, MsTeamsChannelCombobox, type MsTeamsAuthButtonProps, type MsTeamsAuthContainerProps, } from './modules/ms-teams';
|
|
5
5
|
export { SlackAuthButton, SlackAuthContainer, SlackChannelCombobox, type SlackAuthButtonProps, type SlackAuthContainerProps, type SlackChannelComboboxInputMessages, type SlackChannelComboboxProps, } from './modules/slack';
|
|
6
|
-
export { FilterStatus, KnockProvider, feedProviderKey, formatBadgeCount, formatTimestamp, msTeamsProviderKey, renderNodeOrFallback, slackProviderKey, toSentenceCase, type ColorMode, type KnockProviderProps, type KnockProviderState, useAuthenticatedKnockClient, useKnockClient, useStableOptions, KnockFeedProvider, type KnockFeedProviderProps, type KnockFeedProviderState, type Selector, useCreateNotificationStore, useFeedSettings, useKnockFeed, useNotificationStore, useNotifications, KnockGuideContext, useGuide, useGuides, useGuideContext, type MsTeamsChannelQueryOptions, type MsTeamsTeamQueryOptions, KnockMsTeamsProvider, type KnockMsTeamsProviderProps, type KnockMsTeamsProviderState, useConnectedMsTeamsChannels, useKnockMsTeamsClient, useMsTeamsAuth, useMsTeamsChannels, useMsTeamsConnectionStatus, useMsTeamsTeams, KnockSlackProvider, type ContainerObject, type KnockSlackProviderProps, type KnockSlackProviderState, type SlackChannelQueryOptions, useConnectedSlackChannels, useKnockSlackClient, useSlackAuth, useSlackChannels, useSlackConnectionStatus, I18nContext, KnockI18nProvider, locales, type I18nContent, type KnockI18nProviderProps, type Translations, useTranslations, type RecipientObject, usePreferences, } from '@knocklabs/react-core';
|
|
6
|
+
export { type BadgeCountType, FilterStatus, KnockProvider, feedProviderKey, formatBadgeCount, getBadgeAriaLabel, formatTimestamp, msTeamsProviderKey, renderNodeOrFallback, slackProviderKey, toSentenceCase, type ColorMode, type KnockProviderProps, type KnockProviderState, useAuthenticatedKnockClient, useKnockClient, useStableOptions, KnockFeedProvider, type KnockFeedProviderProps, type KnockFeedProviderState, type Selector, useCreateNotificationStore, useFeedSettings, useKnockFeed, useNotificationStore, useNotifications, KnockGuideContext, useGuide, useGuides, useGuideContext, type MsTeamsChannelQueryOptions, type MsTeamsTeamQueryOptions, KnockMsTeamsProvider, type KnockMsTeamsProviderProps, type KnockMsTeamsProviderState, useConnectedMsTeamsChannels, useKnockMsTeamsClient, useMsTeamsAuth, useMsTeamsChannels, useMsTeamsConnectionStatus, useMsTeamsTeams, KnockSlackProvider, type ContainerObject, type KnockSlackProviderProps, type KnockSlackProviderState, type SlackChannelQueryOptions, useConnectedSlackChannels, useKnockSlackClient, useSlackAuth, useSlackChannels, useSlackConnectionStatus, I18nContext, KnockI18nProvider, locales, type I18nContent, type KnockI18nProviderProps, type Translations, useTranslations, type RecipientObject, usePreferences, } from '@knocklabs/react-core';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAErB,OAAO,EACL,QAAQ,EACR,MAAM,EACN,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,EACX,OAAO,EACP,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAErB,OAAO,EACL,QAAQ,EACR,MAAM,EACN,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,EACX,OAAO,EACP,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,SAAS,GACV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,yBAAyB,GAC/B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,cAAc,EACnB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,2BAA2B,EAC3B,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,0BAA0B,EAC1B,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,eAAe,EACf,KAAK,eAAe,EACpB,cAAc,GACf,MAAM,uBAAuB,CAAC"}
|
package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BadgeCountType } from '@knocklabs/react-core';
|
|
1
2
|
import { default as React, SyntheticEvent } from 'react';
|
|
2
|
-
import { BadgeCountType } from '../UnseenBadge';
|
|
3
3
|
export interface NotificationIconButtonProps {
|
|
4
4
|
badgeCountType?: BadgeCountType;
|
|
5
5
|
onClick: (e: SyntheticEvent) => void;
|
package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationIconButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/NotificationIconButton/NotificationIconButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationIconButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/NotificationIconButton/NotificationIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK9C,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,2BAA2B;IAE1C,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,sBAAsB,uGAiBjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnseenBadge.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/UnseenBadge/UnseenBadge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UnseenBadge.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/UnseenBadge/UnseenBadge.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAgBF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmBlD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { UnseenBadge, type UnseenBadgeProps
|
|
1
|
+
export { UnseenBadge, type UnseenBadgeProps } from './UnseenBadge';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/UnseenBadge/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/feed/components/UnseenBadge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -4,5 +4,5 @@ export { NotificationFeed, NotificationFeedHeader, MarkAsRead, type Notification
|
|
|
4
4
|
export { NotificationFeedContainer } from './components/NotificationFeedContainer';
|
|
5
5
|
export { NotificationFeedPopover, type NotificationFeedPopoverProps, } from './components/NotificationFeedPopover';
|
|
6
6
|
export { NotificationIconButton, type NotificationIconButtonProps, } from './components/NotificationIconButton';
|
|
7
|
-
export { UnseenBadge, type UnseenBadgeProps
|
|
7
|
+
export { UnseenBadge, type UnseenBadgeProps } from './components/UnseenBadge';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/feed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,2BAA2B,EAChC,KAAK,eAAe,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/feed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,2BAA2B,EAChC,KAAK,eAAe,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnockButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/guide/components/Toolbar/KnockButton.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,aAAa,KAAK,4CAyC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/guide/components/Toolbar/V1/V1.tsx"],"names":[],"mappings":"AAUA,OAAO,eAAe,CAAC;AAEvB,eAAO,MAAM,EAAE,sDAgFd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/guide/components/Toolbar/V1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnnotatedGuide, UnknownGuide } from './useInspectGuideClientStore';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type Props = {
|
|
4
|
+
guide: AnnotatedGuide | UnknownGuide;
|
|
5
|
+
};
|
|
6
|
+
export declare const GuideHoverCard: ({ children, guide, }: React.PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=GuideHoverCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuideHoverCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideHoverCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EACd,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAEtC,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,cAAc,GAAG,YAAY,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,sBAG5B,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,4CA6ChC,CAAC"}
|