@arbidocs/blocks 0.5.195 → 0.5.196
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/{ConnectedCallDock-L2ER6N2P.cjs → ConnectedCallDock-RRTYZERC.cjs} +22 -22
- package/dist/{ConnectedCallDock-L2ER6N2P.cjs.map → ConnectedCallDock-RRTYZERC.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-R6SHBOKX.cjs → ConnectedCallRoom-HFVIMBCN.cjs} +15 -15
- package/dist/{ConnectedCallRoom-R6SHBOKX.cjs.map → ConnectedCallRoom-HFVIMBCN.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-JNOAKSPK.cjs → ConnectedNativeDocxComparison-FSJQITYC.cjs} +18 -18
- package/dist/{ConnectedNativeDocxComparison-JNOAKSPK.cjs.map → ConnectedNativeDocxComparison-FSJQITYC.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-ZSB7454J.cjs → ConnectedPresentation-ZRCLFY43.cjs} +19 -19
- package/dist/{ConnectedPresentation-ZSB7454J.cjs.map → ConnectedPresentation-ZRCLFY43.cjs.map} +1 -1
- package/dist/{ConnectedProductionSetDialog-SHDI7KP6.cjs → ConnectedProductionSetDialog-KT6BPSRE.cjs} +6 -6
- package/dist/{ConnectedProductionSetDialog-SHDI7KP6.cjs.map → ConnectedProductionSetDialog-KT6BPSRE.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-LCA3ZX5W.cjs → ConnectedSlidesTab-WCPQJZ3S.cjs} +16 -16
- package/dist/{ConnectedSlidesTab-LCA3ZX5W.cjs.map → ConnectedSlidesTab-WCPQJZ3S.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-J5HVQMUS.cjs → ConnectedStreamedWordArtifact-PJTPIXJU.cjs} +18 -18
- package/dist/{ConnectedStreamedWordArtifact-J5HVQMUS.cjs.map → ConnectedStreamedWordArtifact-PJTPIXJU.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-Q3NKJLSM.cjs → DocumentReviewCard-5LGKZ3QM.cjs} +20 -20
- package/dist/{DocumentReviewCard-Q3NKJLSM.cjs.map → DocumentReviewCard-5LGKZ3QM.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-O3ZTKELI.cjs → FilesViewerDialog-GICV5UY6.cjs} +52 -50
- package/dist/FilesViewerDialog-GICV5UY6.cjs.map +1 -0
- package/dist/{WorkspaceTableView-QT63XYII.cjs → WorkspaceTableView-FEP7EXL4.cjs} +11 -11
- package/dist/{WorkspaceTableView-QT63XYII.cjs.map → WorkspaceTableView-FEP7EXL4.cjs.map} +1 -1
- package/dist/agents/index.cjs +289 -289
- package/dist/{ai-I7QIW5OA.cjs → ai-BCZZFQUB.cjs} +25 -25
- package/dist/ai-BCZZFQUB.cjs.map +1 -0
- package/dist/auth/index.cjs +12 -12
- package/dist/calls/index.cjs +125 -125
- package/dist/chat/index.cjs +18 -18
- package/dist/{chunk-KD37PODE.cjs → chunk-2ET34WD5.cjs} +5 -5
- package/dist/{chunk-KD37PODE.cjs.map → chunk-2ET34WD5.cjs.map} +1 -1
- package/dist/{chunk-XYN3RP5W.cjs → chunk-2FBWSMAX.cjs} +26 -8
- package/dist/chunk-2FBWSMAX.cjs.map +1 -0
- package/dist/{chunk-LYDSETR7.cjs → chunk-33VS7HH4.cjs} +11 -228
- package/dist/chunk-33VS7HH4.cjs.map +1 -0
- package/dist/{chunk-5OD6DRG7.cjs → chunk-3P6KGC46.cjs} +3 -3
- package/dist/{chunk-5OD6DRG7.cjs.map → chunk-3P6KGC46.cjs.map} +1 -1
- package/dist/{chunk-AZUPMHZI.cjs → chunk-3U6XE7SF.cjs} +4 -4
- package/dist/{chunk-AZUPMHZI.cjs.map → chunk-3U6XE7SF.cjs.map} +1 -1
- package/dist/{chunk-HBY5PEMC.cjs → chunk-6CJBNRKW.cjs} +4 -4
- package/dist/{chunk-HBY5PEMC.cjs.map → chunk-6CJBNRKW.cjs.map} +1 -1
- package/dist/{chunk-VDHBLDQC.cjs → chunk-6N7QT2DH.cjs} +3 -3
- package/dist/{chunk-VDHBLDQC.cjs.map → chunk-6N7QT2DH.cjs.map} +1 -1
- package/dist/{chunk-VDT7TEAH.cjs → chunk-6ZJBUMNK.cjs} +3 -3
- package/dist/{chunk-VDT7TEAH.cjs.map → chunk-6ZJBUMNK.cjs.map} +1 -1
- package/dist/{chunk-V5VFRRLL.cjs → chunk-AZHIZRHN.cjs} +12 -12
- package/dist/{chunk-V5VFRRLL.cjs.map → chunk-AZHIZRHN.cjs.map} +1 -1
- package/dist/{chunk-P5DNNAUY.cjs → chunk-BCVC6PG5.cjs} +78 -78
- package/dist/{chunk-P5DNNAUY.cjs.map → chunk-BCVC6PG5.cjs.map} +1 -1
- package/dist/{chunk-X3SUQFY7.cjs → chunk-BR3XQ45B.cjs} +28 -28
- package/dist/{chunk-X3SUQFY7.cjs.map → chunk-BR3XQ45B.cjs.map} +1 -1
- package/dist/{chunk-5WCQ5Y77.cjs → chunk-BXHPV6QF.cjs} +4 -4
- package/dist/{chunk-5WCQ5Y77.cjs.map → chunk-BXHPV6QF.cjs.map} +1 -1
- package/dist/{chunk-EAH7LFJN.cjs → chunk-CUYELFKB.cjs} +4 -4
- package/dist/{chunk-EAH7LFJN.cjs.map → chunk-CUYELFKB.cjs.map} +1 -1
- package/dist/{chunk-HGH5FLYS.cjs → chunk-CZOHXTHJ.cjs} +6 -6
- package/dist/{chunk-HGH5FLYS.cjs.map → chunk-CZOHXTHJ.cjs.map} +1 -1
- package/dist/{chunk-XQPJWPWE.cjs → chunk-DJ7LSKBJ.cjs} +3 -3
- package/dist/{chunk-XQPJWPWE.cjs.map → chunk-DJ7LSKBJ.cjs.map} +1 -1
- package/dist/{chunk-6EATJW7T.cjs → chunk-DRQB5V5C.cjs} +7 -7
- package/dist/{chunk-6EATJW7T.cjs.map → chunk-DRQB5V5C.cjs.map} +1 -1
- package/dist/chunk-EEKY7VO3.cjs +58 -0
- package/dist/chunk-EEKY7VO3.cjs.map +1 -0
- package/dist/{chunk-SYUVP52B.cjs → chunk-G3SWFSPS.cjs} +69 -69
- package/dist/chunk-G3SWFSPS.cjs.map +1 -0
- package/dist/{chunk-633ZCYVN.cjs → chunk-GEVBY536.cjs} +37 -37
- package/dist/{chunk-633ZCYVN.cjs.map → chunk-GEVBY536.cjs.map} +1 -1
- package/dist/{chunk-EFV52SZ6.cjs → chunk-GY4T4JSC.cjs} +4 -4
- package/dist/{chunk-EFV52SZ6.cjs.map → chunk-GY4T4JSC.cjs.map} +1 -1
- package/dist/chunk-HYYYXHBK.cjs +393 -0
- package/dist/chunk-HYYYXHBK.cjs.map +1 -0
- package/dist/{chunk-YYK2CCMC.cjs → chunk-ICZBM35E.cjs} +7 -7
- package/dist/{chunk-YYK2CCMC.cjs.map → chunk-ICZBM35E.cjs.map} +1 -1
- package/dist/{chunk-YPSCG6ZW.cjs → chunk-IIAJVC3L.cjs} +15 -15
- package/dist/{chunk-YPSCG6ZW.cjs.map → chunk-IIAJVC3L.cjs.map} +1 -1
- package/dist/{chunk-6LNTU7DA.cjs → chunk-IRVSCMRW.cjs} +3 -3
- package/dist/{chunk-6LNTU7DA.cjs.map → chunk-IRVSCMRW.cjs.map} +1 -1
- package/dist/{chunk-V4XARTJ4.cjs → chunk-ISPDSFVM.cjs} +13 -13
- package/dist/{chunk-V4XARTJ4.cjs.map → chunk-ISPDSFVM.cjs.map} +1 -1
- package/dist/{chunk-KQJUY2OE.cjs → chunk-JGU6YLIA.cjs} +11 -11
- package/dist/{chunk-KQJUY2OE.cjs.map → chunk-JGU6YLIA.cjs.map} +1 -1
- package/dist/chunk-JOQDJRV2.cjs +25 -0
- package/dist/chunk-JOQDJRV2.cjs.map +1 -0
- package/dist/{chunk-L3MYUPSH.cjs → chunk-JYDVGZ62.cjs} +5 -5
- package/dist/{chunk-L3MYUPSH.cjs.map → chunk-JYDVGZ62.cjs.map} +1 -1
- package/dist/{chunk-VD3HI5RF.cjs → chunk-NS7PWOL7.cjs} +3 -3
- package/dist/{chunk-VD3HI5RF.cjs.map → chunk-NS7PWOL7.cjs.map} +1 -1
- package/dist/{chunk-HJAI3QNK.cjs → chunk-PUSCVYTH.cjs} +18 -18
- package/dist/{chunk-HJAI3QNK.cjs.map → chunk-PUSCVYTH.cjs.map} +1 -1
- package/dist/{chunk-SXC4ZIN4.cjs → chunk-QOTDPA62.cjs} +10 -10
- package/dist/{chunk-SXC4ZIN4.cjs.map → chunk-QOTDPA62.cjs.map} +1 -1
- package/dist/{chunk-3GI3UM2T.cjs → chunk-RR3QJM2Y.cjs} +52 -52
- package/dist/chunk-RR3QJM2Y.cjs.map +1 -0
- package/dist/{chunk-ELN3YOXF.cjs → chunk-SLVWSTFY.cjs} +28 -28
- package/dist/{chunk-ELN3YOXF.cjs.map → chunk-SLVWSTFY.cjs.map} +1 -1
- package/dist/{chunk-A7MGQMOV.cjs → chunk-SOJYSRO4.cjs} +10 -10
- package/dist/{chunk-A7MGQMOV.cjs.map → chunk-SOJYSRO4.cjs.map} +1 -1
- package/dist/{chunk-QXIWLWR2.cjs → chunk-SVHUSJFP.cjs} +4 -4
- package/dist/{chunk-QXIWLWR2.cjs.map → chunk-SVHUSJFP.cjs.map} +1 -1
- package/dist/{chunk-KHT2YJ5N.cjs → chunk-T7UGI2F2.cjs} +7 -7
- package/dist/{chunk-KHT2YJ5N.cjs.map → chunk-T7UGI2F2.cjs.map} +1 -1
- package/dist/{chunk-KC3HRFSO.cjs → chunk-UTDLO73D.cjs} +3 -3
- package/dist/{chunk-KC3HRFSO.cjs.map → chunk-UTDLO73D.cjs.map} +1 -1
- package/dist/{chunk-ZTR3SUN4.cjs → chunk-UYFHTF2G.cjs} +12 -12
- package/dist/{chunk-ZTR3SUN4.cjs.map → chunk-UYFHTF2G.cjs.map} +1 -1
- package/dist/chunk-VHC3B3R7.cjs +199 -0
- package/dist/chunk-VHC3B3R7.cjs.map +1 -0
- package/dist/{chunk-IOGN5UAT.cjs → chunk-VXCZFJU7.cjs} +3 -3
- package/dist/{chunk-IOGN5UAT.cjs.map → chunk-VXCZFJU7.cjs.map} +1 -1
- package/dist/{chunk-SDID4WK7.cjs → chunk-W365ZZTM.cjs} +49 -49
- package/dist/{chunk-SDID4WK7.cjs.map → chunk-W365ZZTM.cjs.map} +1 -1
- package/dist/{chunk-TLIZD6DV.cjs → chunk-W7TSEN3J.cjs} +6 -6
- package/dist/{chunk-TLIZD6DV.cjs.map → chunk-W7TSEN3J.cjs.map} +1 -1
- package/dist/{chunk-D4SJT3NG.cjs → chunk-WB5XAM77.cjs} +4 -4
- package/dist/{chunk-D4SJT3NG.cjs.map → chunk-WB5XAM77.cjs.map} +1 -1
- package/dist/{chunk-QSY2VW7V.cjs → chunk-WXRAU2FF.cjs} +6 -6
- package/dist/{chunk-QSY2VW7V.cjs.map → chunk-WXRAU2FF.cjs.map} +1 -1
- package/dist/{chunk-LYJFE37D.cjs → chunk-X6TSOKEP.cjs} +3 -3
- package/dist/{chunk-LYJFE37D.cjs.map → chunk-X6TSOKEP.cjs.map} +1 -1
- package/dist/{chunk-NSL5BCGH.cjs → chunk-XTEGQZM2.cjs} +6 -6
- package/dist/{chunk-NSL5BCGH.cjs.map → chunk-XTEGQZM2.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +13 -13
- package/dist/connect/docx.cjs +21 -21
- package/dist/connect/index.cjs +1171 -1163
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +40 -38
- package/dist/connection/ConnectedSignDocumentDialog.d.ts +8 -0
- package/dist/connection/ConnectedSignDocumentDialog.js +14 -0
- package/dist/connection/ConnectedSignDocumentDialog.js.map +7 -0
- package/dist/connection/WorkflowRunnerDialogs.js +2 -2
- package/dist/connection/WorkflowRunnerDialogs.js.map +2 -2
- package/dist/connection/useSigningIdentity.d.ts +10 -0
- package/dist/connection/useSigningIdentity.js +15 -0
- package/dist/connection/useSigningIdentity.js.map +7 -0
- package/dist/connection/viewer/ConnectedDocumentViewer.js +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/ConnectedSharedFileDialog.js +4 -0
- package/dist/connection/viewer/ConnectedSharedFileDialog.js.map +2 -2
- package/dist/connection/viewer/ConnectedSharedFilesPage.js +4 -0
- package/dist/connection/viewer/ConnectedSharedFilesPage.js.map +2 -2
- package/dist/dashboards/index.cjs +1 -1
- package/dist/document-tools/SignDocumentDialog.d.ts +10 -1
- package/dist/document-tools/SignDocumentDialog.js +116 -93
- package/dist/document-tools/SignDocumentDialog.js.map +2 -2
- package/dist/document-tools/index.cjs +10 -9
- package/dist/document-tools/useIdentityGate.d.ts +26 -0
- package/dist/document-tools/useIdentityGate.js +55 -0
- package/dist/document-tools/useIdentityGate.js.map +7 -0
- package/dist/document-tools/viewer/GuidedSigningViewer.d.ts +9 -1
- package/dist/document-tools/viewer/GuidedSigningViewer.js +19 -5
- package/dist/document-tools/viewer/GuidedSigningViewer.js.map +2 -2
- package/dist/document-tools/viewer/SharedFileView.d.ts +5 -1
- package/dist/document-tools/viewer/SharedFileView.js +5 -1
- package/dist/document-tools/viewer/SharedFileView.js.map +2 -2
- package/dist/document-tools/viewer/index.cjs +11 -9
- package/dist/document-tools/viewer/index.cjs.map +1 -1
- package/dist/embed/index.cjs +46 -46
- package/dist/facts/index.cjs +39 -39
- package/dist/files/index.cjs +221 -221
- package/dist/index.cjs +1773 -1773
- package/dist/pages/index.cjs +30 -30
- package/dist/settings/IdentityVerification.d.ts +2 -0
- package/dist/settings/IdentityVerification.js +8 -5
- package/dist/settings/IdentityVerification.js.map +2 -2
- package/dist/settings/index.cjs +156 -156
- package/dist/shell/index.cjs +81 -81
- package/dist/studio/index.cjs +28 -28
- package/dist/workflow-canvas/index.cjs +65 -63
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/FilesViewerDialog-O3ZTKELI.cjs.map +0 -1
- package/dist/ai-I7QIW5OA.cjs.map +0 -1
- package/dist/chunk-3GI3UM2T.cjs.map +0 -1
- package/dist/chunk-LYDSETR7.cjs.map +0 -1
- package/dist/chunk-OUYBYZ7Y.cjs +0 -176
- package/dist/chunk-OUYBYZ7Y.cjs.map +0 -1
- package/dist/chunk-QQMMCXBP.cjs +0 -173
- package/dist/chunk-QQMMCXBP.cjs.map +0 -1
- package/dist/chunk-SYUVP52B.cjs.map +0 -1
- package/dist/chunk-XYN3RP5W.cjs.map +0 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkCVPV4I7Z_cjs = require('./chunk-CVPV4I7Z.cjs');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
var ui = require('@arbidocs/react/ui');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
var DEFAULT_SETTINGS_DANGER_ZONE_LABELS = {
|
|
11
|
+
dangerZone: "Danger Zone"
|
|
12
|
+
};
|
|
13
|
+
function SettingsPanel({ className, testId, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "settings-panel",
|
|
18
|
+
"data-testid": testId,
|
|
19
|
+
className: ui.cn("mx-auto w-full max-w-xl space-y-6", className),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function SettingsSection({
|
|
25
|
+
icon,
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
action,
|
|
29
|
+
testId,
|
|
30
|
+
className,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35
|
+
"section",
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "settings-section",
|
|
38
|
+
"data-testid": testId,
|
|
39
|
+
className: ui.cn("space-y-3", className),
|
|
40
|
+
...props,
|
|
41
|
+
children: [
|
|
42
|
+
(title || action) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
43
|
+
title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
44
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground [&_svg]:h-4 [&_svg]:w-4", children: icon }),
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold text-foreground", children: title })
|
|
46
|
+
] }),
|
|
47
|
+
action
|
|
48
|
+
] }),
|
|
49
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description }),
|
|
50
|
+
children
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function SettingsDisclosure({
|
|
56
|
+
title,
|
|
57
|
+
children,
|
|
58
|
+
testId
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "[&[open]>summary>svg]:rotate-90", "data-testid": testId, children: [
|
|
61
|
+
/* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer list-none items-center gap-2 rounded py-2 text-sm pointer-coarse:min-h-11 font-medium text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", children: [
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-3.5 w-3.5 transition-transform", "aria-hidden": "true" }),
|
|
63
|
+
title
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 space-y-4", children })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
function SettingsRow({
|
|
69
|
+
label,
|
|
70
|
+
labelFor,
|
|
71
|
+
description,
|
|
72
|
+
children,
|
|
73
|
+
testId,
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
"data-slot": "settings-row",
|
|
81
|
+
"data-testid": testId,
|
|
82
|
+
className: ui.cn(
|
|
83
|
+
"flex flex-col gap-2 py-2 @xl:flex-row @xl:items-center @xl:justify-between @xl:gap-6",
|
|
84
|
+
className
|
|
85
|
+
),
|
|
86
|
+
...props,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
89
|
+
labelFor ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: labelFor, className: "text-sm font-medium text-foreground", children: label }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-foreground", children: label }),
|
|
90
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: description })
|
|
91
|
+
] }),
|
|
92
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function SettingsCard({ padding = "md", className, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
"data-slot": "settings-card",
|
|
102
|
+
className: ui.cn(
|
|
103
|
+
"rounded-lg border border-border bg-card shadow-xs",
|
|
104
|
+
padding === "md" ? "space-y-5 p-5" : "divide-y divide-border p-2",
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
...props
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function SettingsActionRow({ title, description, onClick, testId }) {
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
|
+
"button",
|
|
114
|
+
{
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick,
|
|
117
|
+
"data-slot": "settings-action-row",
|
|
118
|
+
"data-testid": testId,
|
|
119
|
+
className: "flex w-full items-center gap-3 rounded-md px-3 py-3 text-left transition-colors hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
122
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
123
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: description })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 shrink-0 text-muted-foreground" })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function SettingsDangerZone({
|
|
131
|
+
isOpen,
|
|
132
|
+
onToggle,
|
|
133
|
+
label,
|
|
134
|
+
title,
|
|
135
|
+
description,
|
|
136
|
+
action,
|
|
137
|
+
labels
|
|
138
|
+
}) {
|
|
139
|
+
const l = react.useMemo(() => ({ ...DEFAULT_SETTINGS_DANGER_ZONE_LABELS, ...labels }), [labels]);
|
|
140
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "settings-danger-zone", className: "mt-8 pt-2", children: [
|
|
141
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
onClick: onToggle,
|
|
146
|
+
"aria-expanded": isOpen,
|
|
147
|
+
className: "flex w-full items-center gap-1.5 text-left pointer-coarse:min-h-11",
|
|
148
|
+
children: [
|
|
149
|
+
isOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-muted-foreground", children: label ?? l.dangerZone })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex items-center justify-between gap-4 rounded-lg bg-destructive/5 p-4", children: [
|
|
155
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
156
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: title }),
|
|
157
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action })
|
|
160
|
+
] })
|
|
161
|
+
] });
|
|
162
|
+
}
|
|
163
|
+
var DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
164
|
+
title: "Identity verification",
|
|
165
|
+
intro: "Check your ID once to get a verified tick next to your name.",
|
|
166
|
+
priceLine: (price, attempts) => `${price} \xB7 ${attempts} attempts`,
|
|
167
|
+
proOnly: "Available on Pro subscriptions.",
|
|
168
|
+
seePlans: "See subscriptions",
|
|
169
|
+
manageBilling: "Manage billing",
|
|
170
|
+
verify: "Verify identity",
|
|
171
|
+
continue: "Continue",
|
|
172
|
+
attemptsLeft: (n) => `${n} attempt${n === 1 ? "" : "s"} left`,
|
|
173
|
+
verified: "Verified",
|
|
174
|
+
verifiedDetail: (country) => `ID issued in ${country}`,
|
|
175
|
+
inReview: "Your check is being reviewed. We\u2019ll update this when it\u2019s done.",
|
|
176
|
+
finishName: "Your ID was verified. Confirm your name to get the tick.",
|
|
177
|
+
finish: "Finish",
|
|
178
|
+
remove: "Remove",
|
|
179
|
+
payTitle: "Verify your identity",
|
|
180
|
+
payBody: (price, attempts) => `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,
|
|
181
|
+
pay: "Pay and continue",
|
|
182
|
+
confirmPayment: "Confirm payment with your bank",
|
|
183
|
+
paymentConfirmed: "I\u2019ve confirmed it",
|
|
184
|
+
verifyTitle: "Scan your ID",
|
|
185
|
+
embedFailed: "Your camera isn\u2019t available here. Continue in a new tab, then come back.",
|
|
186
|
+
openInNewTab: "Open in a new tab",
|
|
187
|
+
checkResult: "I\u2019ve finished",
|
|
188
|
+
resultVerified: "You\u2019re verified. The tick now shows next to your name.",
|
|
189
|
+
resultDeclined: (n) => n > 0 ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? "" : "s"} left.` : "We couldn\u2019t verify your ID and no attempts are left.",
|
|
190
|
+
resultDeclinedFree: "We couldn\u2019t verify your ID. You can try again.",
|
|
191
|
+
tryAgain: "Try again",
|
|
192
|
+
resultInReview: "Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.",
|
|
193
|
+
nameMismatchTitle: "Your ID was verified",
|
|
194
|
+
nameMismatchBody: "The name on your ID differs from your account name. The tick shows only with the name on your ID.",
|
|
195
|
+
documentName: "Name on your ID",
|
|
196
|
+
accountName: "Account name",
|
|
197
|
+
useDocumentName: (name) => `Change my name to ${name}`,
|
|
198
|
+
keepName: "Keep my name",
|
|
199
|
+
close: "Close"
|
|
200
|
+
};
|
|
201
|
+
function useLabels(labels) {
|
|
202
|
+
return react.useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels]);
|
|
203
|
+
}
|
|
204
|
+
var BILLING_CODES = [
|
|
205
|
+
"PRO_REQUIRED",
|
|
206
|
+
"PAYMENT_METHOD_REQUIRED",
|
|
207
|
+
"BILLING_ADDRESS_REQUIRED",
|
|
208
|
+
"PAYMENT_DECLINED"
|
|
209
|
+
];
|
|
210
|
+
function Problem({
|
|
211
|
+
flow,
|
|
212
|
+
onManageBilling,
|
|
213
|
+
label
|
|
214
|
+
}) {
|
|
215
|
+
if (!flow.problem) return null;
|
|
216
|
+
const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? "");
|
|
217
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-testid": "identity-problem", children: [
|
|
218
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: flow.problem.message }),
|
|
219
|
+
billing && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: label })
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
222
|
+
function IdentityVerificationCard({
|
|
223
|
+
collapsible = false,
|
|
224
|
+
flow,
|
|
225
|
+
onManageBilling,
|
|
226
|
+
labels
|
|
227
|
+
}) {
|
|
228
|
+
const l = useLabels(labels);
|
|
229
|
+
const { status } = flow;
|
|
230
|
+
if (!status?.enabled) return null;
|
|
231
|
+
const busy = flow.busy !== null;
|
|
232
|
+
let description;
|
|
233
|
+
let action = null;
|
|
234
|
+
if (status.verified) {
|
|
235
|
+
description = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
236
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, {}),
|
|
237
|
+
l.verified,
|
|
238
|
+
status.document_country && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
239
|
+
" \xB7 ",
|
|
240
|
+
l.verifiedDetail(status.document_country)
|
|
241
|
+
] })
|
|
242
|
+
] });
|
|
243
|
+
action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "ghost", onClick: flow.remove, disabled: busy, children: l.remove });
|
|
244
|
+
} else if (!status.eligible && !status.free) {
|
|
245
|
+
description = `${l.intro} ${l.proOnly}`;
|
|
246
|
+
action = onManageBilling ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: l.seePlans }) : null;
|
|
247
|
+
} else if (status.state === "in_review") {
|
|
248
|
+
description = l.inReview;
|
|
249
|
+
} else if (status.state === "name_mismatch") {
|
|
250
|
+
description = l.finishName;
|
|
251
|
+
action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", onClick: flow.open, children: l.finish });
|
|
252
|
+
} else {
|
|
253
|
+
const resuming = status.attempts_left > 0 || status.state === "in_progress";
|
|
254
|
+
const detail = status.free ? null : resuming ? l.attemptsLeft(status.attempts_left) : l.priceLine(flow.price ?? "", status.attempts_per_fee);
|
|
255
|
+
description = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
256
|
+
l.intro,
|
|
257
|
+
" ",
|
|
258
|
+
detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: detail })
|
|
259
|
+
] });
|
|
260
|
+
action = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "sm", onClick: flow.open, disabled: busy, children: [
|
|
261
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "mr-1 h-4 w-4" }),
|
|
262
|
+
resuming && !status.free ? l.continue : l.verify
|
|
263
|
+
] });
|
|
264
|
+
}
|
|
265
|
+
const card = /* @__PURE__ */ jsxRuntime.jsxs(SettingsCard, { padding: "sm", "data-testid": "identity-verification-card", children: [
|
|
266
|
+
/* @__PURE__ */ jsxRuntime.jsx(SettingsRow, { label: collapsible ? null : l.title, description, children: action }),
|
|
267
|
+
!flow.isOpen && /* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
|
|
268
|
+
] });
|
|
269
|
+
return collapsible ? /* @__PURE__ */ jsxRuntime.jsx(SettingsDisclosure, { title: l.title, testId: "identity-verification-settings", children: card }) : card;
|
|
270
|
+
}
|
|
271
|
+
function IdentityVerificationDialog({
|
|
272
|
+
flow,
|
|
273
|
+
accountName,
|
|
274
|
+
dismissible = true,
|
|
275
|
+
onManageBilling,
|
|
276
|
+
labels
|
|
277
|
+
}) {
|
|
278
|
+
const l = useLabels(labels);
|
|
279
|
+
const { status } = flow;
|
|
280
|
+
const attempts = status?.attempts_per_fee ?? 0;
|
|
281
|
+
const docName = [status?.document_given_name, status?.document_family_name].filter(Boolean).join(" ");
|
|
282
|
+
const spinner = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1 h-4 w-4 animate-spin" });
|
|
283
|
+
let body;
|
|
284
|
+
let footer = null;
|
|
285
|
+
if (flow.step === "pay") {
|
|
286
|
+
body = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
287
|
+
"a",
|
|
288
|
+
{
|
|
289
|
+
href: flow.paymentUrl,
|
|
290
|
+
target: "_blank",
|
|
291
|
+
rel: "noopener noreferrer",
|
|
292
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
293
|
+
children: [
|
|
294
|
+
l.confirmPayment,
|
|
295
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-3.5 w-3.5" })
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.payBody(flow.price ?? "", attempts) });
|
|
299
|
+
footer = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.recheckPayment, disabled: flow.busy !== null, children: [
|
|
300
|
+
flow.busy === "start" && spinner,
|
|
301
|
+
l.paymentConfirmed
|
|
302
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.pay, disabled: flow.busy !== null, "data-testid": "identity-pay", children: [
|
|
303
|
+
flow.busy === "pay" && spinner,
|
|
304
|
+
l.pay
|
|
305
|
+
] });
|
|
306
|
+
} else if (flow.step === "verify") {
|
|
307
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: flow.embedFailed ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.embedFailed }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
308
|
+
"div",
|
|
309
|
+
{
|
|
310
|
+
id: flow.verifyContainerId,
|
|
311
|
+
ref: flow.verifyContainerRef,
|
|
312
|
+
className: "h-[560px] w-full overflow-hidden rounded-md bg-muted",
|
|
313
|
+
"data-testid": "identity-didit-frame",
|
|
314
|
+
children: flow.busy === "start" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
|
|
315
|
+
}
|
|
316
|
+
) });
|
|
317
|
+
footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
318
|
+
flow.embedFailed && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "outline", onClick: flow.openInNewTab, children: [
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "mr-1 h-4 w-4" }),
|
|
320
|
+
l.openInNewTab
|
|
321
|
+
] }),
|
|
322
|
+
status?.free && flow.problem && flow.busy === null && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.retry, "data-testid": "identity-start-retry", children: l.tryAgain }),
|
|
323
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "ghost", onClick: flow.checkResult, disabled: flow.busy !== null, children: [
|
|
324
|
+
flow.busy === "refresh" && spinner,
|
|
325
|
+
l.checkResult
|
|
326
|
+
] })
|
|
327
|
+
] });
|
|
328
|
+
} else if (status?.state === "name_mismatch") {
|
|
329
|
+
body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", "data-testid": "identity-name-mismatch", children: [
|
|
330
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.nameMismatchBody }),
|
|
331
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm", children: [
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.documentName }),
|
|
333
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium", children: docName }),
|
|
334
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.accountName }),
|
|
335
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: accountName })
|
|
336
|
+
] })
|
|
337
|
+
] });
|
|
338
|
+
footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
339
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: flow.keepName, disabled: flow.busy !== null, children: l.keepName }),
|
|
340
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.acceptName, disabled: flow.busy !== null || !docName, children: [
|
|
341
|
+
flow.busy === "accept" && spinner,
|
|
342
|
+
l.useDocumentName(docName)
|
|
343
|
+
] })
|
|
344
|
+
] });
|
|
345
|
+
} else if (status?.verified) {
|
|
346
|
+
body = /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm", children: [
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, { className: "h-4 w-4" }),
|
|
348
|
+
l.resultVerified
|
|
349
|
+
] });
|
|
350
|
+
footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
351
|
+
} else if (status?.state === "in_review") {
|
|
352
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.resultInReview });
|
|
353
|
+
footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
354
|
+
} else {
|
|
355
|
+
const left = status?.attempts_left ?? 0;
|
|
356
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: status?.free ? l.resultDeclinedFree : l.resultDeclined(left) });
|
|
357
|
+
footer = left > 0 || status?.free ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.retry, disabled: flow.busy !== null, children: l.tryAgain }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
358
|
+
}
|
|
359
|
+
const title = status?.state === "name_mismatch" && flow.step === "result" ? l.nameMismatchTitle : flow.step === "verify" ? l.verifyTitle : l.payTitle;
|
|
360
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
361
|
+
chunkCVPV4I7Z_cjs.ModalScaffold,
|
|
362
|
+
{
|
|
363
|
+
open: flow.isOpen,
|
|
364
|
+
onOpenChange: (open) => open ? flow.open() : flow.close(),
|
|
365
|
+
title,
|
|
366
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "h-5 w-5" }),
|
|
367
|
+
size: flow.step === "verify" ? "lg" : "md",
|
|
368
|
+
dismissible,
|
|
369
|
+
testId: "identity-verification-dialog",
|
|
370
|
+
children: [
|
|
371
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkCVPV4I7Z_cjs.ModalScaffold.Body, { children: [
|
|
372
|
+
body,
|
|
373
|
+
/* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
|
|
374
|
+
] }),
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkCVPV4I7Z_cjs.ModalScaffold.Footer, { children: footer })
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
exports.DEFAULT_IDENTITY_VERIFICATION_LABELS = DEFAULT_IDENTITY_VERIFICATION_LABELS;
|
|
382
|
+
exports.DEFAULT_SETTINGS_DANGER_ZONE_LABELS = DEFAULT_SETTINGS_DANGER_ZONE_LABELS;
|
|
383
|
+
exports.IdentityVerificationCard = IdentityVerificationCard;
|
|
384
|
+
exports.IdentityVerificationDialog = IdentityVerificationDialog;
|
|
385
|
+
exports.SettingsActionRow = SettingsActionRow;
|
|
386
|
+
exports.SettingsCard = SettingsCard;
|
|
387
|
+
exports.SettingsDangerZone = SettingsDangerZone;
|
|
388
|
+
exports.SettingsDisclosure = SettingsDisclosure;
|
|
389
|
+
exports.SettingsPanel = SettingsPanel;
|
|
390
|
+
exports.SettingsRow = SettingsRow;
|
|
391
|
+
exports.SettingsSection = SettingsSection;
|
|
392
|
+
//# sourceMappingURL=chunk-HYYYXHBK.cjs.map
|
|
393
|
+
//# sourceMappingURL=chunk-HYYYXHBK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/settings/SettingsPanel.tsx","../src/settings/IdentityVerification.tsx"],"names":["jsx","cn","jsxs","ChevronRight","useMemo","ChevronDown","Button","VerifiedBadge","Fragment","ShieldCheck","Loader2","ExternalLink","ModalScaffold"],"mappings":";;;;;;;;AASO,IAAM,mCAAA,GAAgE;AAAA,EAC3E,UAAA,EAAY;AACd;AAQO,SAAS,cAAc,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,OAAM,EAAuB;AACjF,EAAA,uBACEA,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,gBAAA;AAAA,MACV,aAAA,EAAa,MAAA;AAAA,MACb,SAAA,EAAWC,KAAA,CAAG,mCAAA,EAAqC,SAAS,CAAA;AAAA,MAC3D,GAAG;AAAA;AAAA,GACN;AAEJ;AAaO,SAAS,eAAA,CAAgB;AAAA,EAC9B,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;A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E,QAAA,EACL,CAAA,mBAEAN,cAAAA,CAACM,aAAO,OAAA,EAAS,IAAA,CAAK,KAAA,EAAQ,QAAA,EAAA,CAAA,CAAE,KAAA,EAAM,CAAA;AAAA,EAE5C;AAEA,EAAA,MAAM,KAAA,GACJ,MAAA,EAAQ,KAAA,KAAU,eAAA,IAAmB,KAAK,IAAA,KAAS,QAAA,GAC/C,CAAA,CAAE,iBAAA,GACF,IAAA,CAAK,IAAA,KAAS,QAAA,GACZ,CAAA,CAAE,cACF,CAAA,CAAE,QAAA;AACV,EAAA,uBACEJ,eAAAA;AAAA,IAACU,+BAAA;AAAA,IAAA;AAAA,MACC,MAAM,IAAA,CAAK,MAAA;AAAA,MACX,YAAA,EAAc,CAAC,IAAA,KAAU,IAAA,GAAO,KAAK,IAAA,EAAK,GAAI,KAAK,KAAA,EAAM;AAAA,MACzD,KAAA;AAAA,MACA,IAAA,kBAAMZ,cAAAA,CAACS,uBAAA,EAAA,EAAY,WAAU,SAAA,EAAU,CAAA;AAAA,MACvC,IAAA,EAAM,IAAA,CAAK,IAAA,KAAS,QAAA,GAAW,IAAA,GAAO,IAAA;AAAA,MACtC,WAAA;AAAA,MACA,MAAA,EAAO,8BAAA;AAAA,MAEP,QAAA,EAAA;AAAA,wBAAAP,eAAAA,CAACU,+BAAA,CAAc,IAAA,EAAd,EACE,QAAA,EAAA;AAAA,UAAA,IAAA;AAAA,0BACDZ,cAAAA,CAAC,OAAA,EAAA,EAAQ,MAAY,eAAA,EAAkC,KAAA,EAAO,EAAE,aAAA,EAAe;AAAA,SAAA,EACjF,CAAA;AAAA,wBACAA,cAAAA,CAACY,+BAAA,CAAc,MAAA,EAAd,EAAsB,QAAA,EAAA,MAAA,EAAO;AAAA;AAAA;AAAA,GAChC;AAEJ","file":"chunk-HYYYXHBK.cjs","sourcesContent":["import { useMemo, type ComponentProps, type ReactNode } from 'react'\nimport { ChevronDown, ChevronRight } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\n/** Every fixed string of the danger zone. `label` prop wins. */\nexport interface SettingsDangerZoneLabels {\n dangerZone: string\n}\n\nexport const DEFAULT_SETTINGS_DANGER_ZONE_LABELS: SettingsDangerZoneLabels = {\n dangerZone: 'Danger Zone',\n}\n\nexport interface SettingsPanelProps extends ComponentProps<'div'> {\n /** Stable test id of the panel. */\n testId?: string\n}\n\n/** Centred column of {@link SettingsSection}s with a readable measure. */\nexport function SettingsPanel({ className, testId, ...props }: SettingsPanelProps) {\n return (\n <div\n data-slot=\"settings-panel\"\n data-testid={testId}\n className={cn('mx-auto w-full max-w-xl space-y-6', className)}\n {...props}\n />\n )\n}\n\nexport interface SettingsSectionProps extends Omit<ComponentProps<'section'>, 'title'> {\n /** Small muted icon before the title. */\n icon?: ReactNode\n title?: ReactNode\n description?: ReactNode\n /** Right-aligned control in the heading row (e.g. a Reset button). */\n action?: ReactNode\n testId?: string\n}\n\n/** Titled group of settings: heading row, optional description, then the controls. */\nexport function SettingsSection({\n icon,\n title,\n description,\n action,\n testId,\n className,\n children,\n ...props\n}: SettingsSectionProps) {\n return (\n <section\n data-slot=\"settings-section\"\n data-testid={testId}\n className={cn('space-y-3', className)}\n {...props}\n >\n {(title || action) && (\n <div className=\"flex items-center justify-between gap-3\">\n {title && (\n <div className=\"flex items-center gap-2\">\n {icon && (\n <span className=\"text-muted-foreground [&_svg]:h-4 [&_svg]:w-4\">{icon}</span>\n )}\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\n </div>\n )}\n {action}\n </div>\n )}\n {description && <p className=\"text-sm text-muted-foreground\">{description}</p>}\n {children}\n </section>\n )\n}\n\n/** A quiet, closed-by-default group for secondary account settings. */\nexport function SettingsDisclosure({\n title,\n children,\n testId,\n}: {\n title: ReactNode\n children: ReactNode\n testId?: string\n}) {\n return (\n <details className=\"[&[open]>summary>svg]:rotate-90\" data-testid={testId}>\n <summary className=\"flex cursor-pointer list-none items-center gap-2 rounded py-2 text-sm pointer-coarse:min-h-11 font-medium text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden\">\n <ChevronRight className=\"h-3.5 w-3.5 transition-transform\" aria-hidden=\"true\" />\n {title}\n </summary>\n <div className=\"mt-3 space-y-4\">{children}</div>\n </details>\n )\n}\n\nexport interface SettingsRowProps extends Omit<ComponentProps<'div'>, 'title'> {\n label: ReactNode\n /** Id of the control: renders the label as a `<label htmlFor>` so it toggles the control. */\n labelFor?: string\n description?: ReactNode\n /** The control: switch, select, button. Sits at the end of the row. */\n children?: ReactNode\n testId?: string\n}\n\n/** One setting: label + help text on the left, its control on the right (stacks on phones). */\nexport function SettingsRow({\n label,\n labelFor,\n description,\n children,\n testId,\n className,\n ...props\n}: SettingsRowProps) {\n return (\n <div\n data-slot=\"settings-row\"\n data-testid={testId}\n className={cn(\n 'flex flex-col gap-2 py-2 @xl:flex-row @xl:items-center @xl:justify-between @xl:gap-6',\n className\n )}\n {...props}\n >\n <div className=\"min-w-0\">\n {labelFor ? (\n <label htmlFor={labelFor} className=\"text-sm font-medium text-foreground\">\n {label}\n </label>\n ) : (\n <div className=\"text-sm font-medium text-foreground\">{label}</div>\n )}\n {description && <div className=\"text-sm text-muted-foreground\">{description}</div>}\n </div>\n {children && <div className=\"flex shrink-0 items-center gap-2\">{children}</div>}\n </div>\n )\n}\n\nexport interface SettingsCardProps extends ComponentProps<'div'> {\n /** `md` for form-like content, `sm` when the card holds a list of full-bleed action rows. */\n padding?: 'md' | 'sm'\n}\n\n/** Bordered card that groups related settings, the same surface as the dashboard cards. */\nexport function SettingsCard({ padding = 'md', className, ...props }: SettingsCardProps) {\n return (\n <div\n data-slot=\"settings-card\"\n className={cn(\n 'rounded-lg border border-border bg-card shadow-xs',\n padding === 'md' ? 'space-y-5 p-5' : 'divide-y divide-border p-2',\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface SettingsActionRowProps {\n title: ReactNode\n description?: ReactNode\n onClick: () => void\n testId?: string\n}\n\n/** Full-width row that opens a dialog or sub-page: title, help text and a chevron. */\nexport function SettingsActionRow({ title, description, onClick, testId }: SettingsActionRowProps) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n data-slot=\"settings-action-row\"\n data-testid={testId}\n className=\"flex w-full items-center gap-3 rounded-md px-3 py-3 text-left transition-colors hover:bg-background/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-sm font-semibold text-foreground\">{title}</div>\n {description && (\n <div className=\"mt-0.5 text-xs leading-relaxed text-muted-foreground\">{description}</div>\n )}\n </div>\n <ChevronRight className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n </button>\n )\n}\n\nexport interface SettingsDangerZoneProps {\n isOpen: boolean\n onToggle: () => void\n /** Heading of the collapsed zone. */\n label?: string\n title: ReactNode\n description: ReactNode\n /** The destructive control (a Button). */\n action: ReactNode\n labels?: Partial<SettingsDangerZoneLabels>\n}\n\n/** Collapsed-by-default zone for irreversible actions. */\nexport function SettingsDangerZone({\n isOpen,\n onToggle,\n label,\n title,\n description,\n action,\n labels,\n}: SettingsDangerZoneProps) {\n const l = useMemo(() => ({ ...DEFAULT_SETTINGS_DANGER_ZONE_LABELS, ...labels }), [labels])\n return (\n <div data-slot=\"settings-danger-zone\" className=\"mt-8 pt-2\">\n <button\n type=\"button\"\n onClick={onToggle}\n aria-expanded={isOpen}\n className=\"flex w-full items-center gap-1.5 text-left pointer-coarse:min-h-11\"\n >\n {isOpen ? (\n <ChevronDown className=\"h-3.5 w-3.5 text-muted-foreground\" />\n ) : (\n <ChevronRight className=\"h-3.5 w-3.5 text-muted-foreground\" />\n )}\n <p className=\"text-sm font-medium text-muted-foreground\">{label ?? l.dangerZone}</p>\n </button>\n {isOpen && (\n <div className=\"mt-3 flex items-center justify-between gap-4 rounded-lg bg-destructive/5 p-4\">\n <div>\n <p className=\"font-medium\">{title}</p>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n <div className=\"shrink-0\">{action}</div>\n </div>\n )}\n </div>\n )\n}\n","/**\n * Identity verification blocks: the settings card, the dialog (pay → verify in Didit's frame →\n * result) and a gate for deployments that require it. All take the `IdentityVerificationFlow` from\n * `@arbidocs/react` (`useIdentityVerification` with a provider, or `useIdentityVerificationFlow`\n * bound to a host's own API), so they work the same inside ARBI and on a customer's site.\n */\nimport { useMemo, type ReactNode } from 'react'\nimport { ExternalLink, Loader2, ShieldCheck } from 'lucide-react'\nimport { Button, VerifiedBadge, type IdentityVerificationFlow } from '@arbidocs/react/ui'\nimport { ModalScaffold } from './ModalScaffold'\nimport { SettingsCard, SettingsDisclosure, SettingsRow } from './SettingsPanel'\n\n/** Every fixed string of the identity verification blocks. */\nexport interface IdentityVerificationLabels {\n title: string\n intro: string\n /** \"£5.00 incl. VAT · 3 attempts\" (`price` comes formatted, VAT note included). */\n priceLine: (price: string, attempts: number) => string\n proOnly: string\n seePlans: string\n manageBilling: string\n verify: string\n continue: string\n attemptsLeft: (n: number) => string\n verified: string\n verifiedDetail: (country: string) => string\n inReview: string\n finishName: string\n finish: string\n remove: string\n payTitle: string\n payBody: (price: string, attempts: number) => string\n pay: string\n confirmPayment: string\n paymentConfirmed: string\n verifyTitle: string\n embedFailed: string\n openInNewTab: string\n checkResult: string\n resultVerified: string\n resultDeclined: (attemptsLeft: number) => string\n /** Declined where the check is free: trying again costs nothing. */\n resultDeclinedFree: string\n tryAgain: string\n resultInReview: string\n nameMismatchTitle: string\n nameMismatchBody: string\n documentName: string\n accountName: string\n useDocumentName: (name: string) => string\n keepName: string\n close: string\n}\n\nexport const DEFAULT_IDENTITY_VERIFICATION_LABELS: IdentityVerificationLabels = {\n title: 'Identity verification',\n intro: 'Check your ID once to get a verified tick next to your name.',\n priceLine: (price, attempts) => `${price} · ${attempts} attempts`,\n proOnly: 'Available on Pro subscriptions.',\n seePlans: 'See subscriptions',\n manageBilling: 'Manage billing',\n verify: 'Verify identity',\n continue: 'Continue',\n attemptsLeft: (n) => `${n} attempt${n === 1 ? '' : 's'} left`,\n verified: 'Verified',\n verifiedDetail: (country) => `ID issued in ${country}`,\n inReview: 'Your check is being reviewed. We’ll update this when it’s done.',\n finishName: 'Your ID was verified. Confirm your name to get the tick.',\n finish: 'Finish',\n remove: 'Remove',\n payTitle: 'Verify your identity',\n payBody: (price, attempts) =>\n `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,\n pay: 'Pay and continue',\n confirmPayment: 'Confirm payment with your bank',\n paymentConfirmed: 'I’ve confirmed it',\n verifyTitle: 'Scan your ID',\n embedFailed: 'Your camera isn’t available here. Continue in a new tab, then come back.',\n openInNewTab: 'Open in a new tab',\n checkResult: 'I’ve finished',\n resultVerified: 'You’re verified. The tick now shows next to your name.',\n resultDeclined: (n) =>\n n > 0\n ? `We couldn’t verify your ID. You have ${n} attempt${n === 1 ? '' : 's'} left.`\n : 'We couldn’t verify your ID and no attempts are left.',\n resultDeclinedFree: 'We couldn’t verify your ID. You can try again.',\n tryAgain: 'Try again',\n resultInReview: 'Your check needs a manual review. We’ll show the result here when it’s done.',\n nameMismatchTitle: 'Your ID was verified',\n nameMismatchBody:\n 'The name on your ID differs from your account name. The tick shows only with the name on your ID.',\n documentName: 'Name on your ID',\n accountName: 'Account name',\n useDocumentName: (name) => `Change my name to ${name}`,\n keepName: 'Keep my name',\n close: 'Close',\n}\n\nfunction useLabels(labels?: Partial<IdentityVerificationLabels>) {\n return useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels])\n}\n\n/** Refusals the user fixes in billing (plan, card, address). */\nconst BILLING_CODES = [\n 'PRO_REQUIRED',\n 'PAYMENT_METHOD_REQUIRED',\n 'BILLING_ADDRESS_REQUIRED',\n 'PAYMENT_DECLINED',\n]\n\nfunction Problem({\n flow,\n onManageBilling,\n label,\n}: {\n flow: IdentityVerificationFlow\n onManageBilling?: () => void\n label: string\n}) {\n if (!flow.problem) return null\n const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? '')\n return (\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"identity-problem\">\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {flow.problem.message}\n </p>\n {billing && (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {label}\n </Button>\n )}\n </div>\n )\n}\n\n// ── Card ────────────────────────────────────────────────────────────────────\n\nexport interface IdentityVerificationCardProps {\n /** Secondary account settings start closed; payment and verification remain explicit actions. */\n collapsible?: boolean\n flow: IdentityVerificationFlow\n /** Open the host's plans / billing (upgrade to Pro, fix the card or address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** Settings row for the ID check: offer, progress, or the tick. Renders nothing when not offered. */\nexport function IdentityVerificationCard({\n collapsible = false,\n flow,\n onManageBilling,\n labels,\n}: IdentityVerificationCardProps) {\n const l = useLabels(labels)\n const { status } = flow\n if (!status?.enabled) return null\n const busy = flow.busy !== null\n\n let description: ReactNode\n let action: ReactNode = null\n if (status.verified) {\n description = (\n <span className=\"inline-flex items-center gap-1.5\">\n <VerifiedBadge />\n {l.verified}\n {status.document_country && (\n <span className=\"text-muted-foreground\">\n {' · '}\n {l.verifiedDetail(status.document_country)}\n </span>\n )}\n </span>\n )\n action = (\n <Button size=\"sm\" variant=\"ghost\" onClick={flow.remove} disabled={busy}>\n {l.remove}\n </Button>\n )\n } else if (!status.eligible && !status.free) {\n description = `${l.intro} ${l.proOnly}`\n action = onManageBilling ? (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {l.seePlans}\n </Button>\n ) : null\n } else if (status.state === 'in_review') {\n description = l.inReview\n } else if (status.state === 'name_mismatch') {\n description = l.finishName\n action = (\n <Button size=\"sm\" onClick={flow.open}>\n {l.finish}\n </Button>\n )\n } else {\n const resuming = status.attempts_left > 0 || status.state === 'in_progress'\n // Where the check is free there is no fee and no attempt count to show.\n const detail = status.free\n ? null\n : resuming\n ? l.attemptsLeft(status.attempts_left)\n : l.priceLine(flow.price ?? '', status.attempts_per_fee)\n description = (\n <>\n {l.intro} {detail && <span className=\"text-muted-foreground\">{detail}</span>}\n </>\n )\n action = (\n <Button size=\"sm\" onClick={flow.open} disabled={busy}>\n <ShieldCheck className=\"mr-1 h-4 w-4\" />\n {resuming && !status.free ? l.continue : l.verify}\n </Button>\n )\n }\n\n const card = (\n <SettingsCard padding=\"sm\" data-testid=\"identity-verification-card\">\n <SettingsRow label={collapsible ? null : l.title} description={description}>\n {action}\n </SettingsRow>\n {!flow.isOpen && (\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n )}\n </SettingsCard>\n )\n return collapsible ? (\n <SettingsDisclosure title={l.title} testId=\"identity-verification-settings\">\n {card}\n </SettingsDisclosure>\n ) : (\n card\n )\n}\n\n// ── Dialog ──────────────────────────────────────────────────────────────────\n\nexport interface IdentityVerificationDialogProps {\n flow: IdentityVerificationFlow\n /** The account name as shown, compared with the name on the document. */\n accountName: string\n /** Allow closing; false blocks it. Default true. */\n dismissible?: boolean\n /** Open the host's billing to fix a refused payment (plan, card, address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** The verification dialog: pay the fee, verify in Didit's embedded frame, then the result. */\nexport function IdentityVerificationDialog({\n flow,\n accountName,\n dismissible = true,\n onManageBilling,\n labels,\n}: IdentityVerificationDialogProps) {\n const l = useLabels(labels)\n const { status } = flow\n const attempts = status?.attempts_per_fee ?? 0\n const docName = [status?.document_given_name, status?.document_family_name]\n .filter(Boolean)\n .join(' ')\n const spinner = <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n\n let body: ReactNode\n let footer: ReactNode = null\n if (flow.step === 'pay') {\n body = flow.paymentUrl ? (\n <a\n href={flow.paymentUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {l.confirmPayment}\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.payBody(flow.price ?? '', attempts)}</p>\n )\n footer = flow.paymentUrl ? (\n <Button onClick={flow.recheckPayment} disabled={flow.busy !== null}>\n {flow.busy === 'start' && spinner}\n {l.paymentConfirmed}\n </Button>\n ) : (\n <Button onClick={flow.pay} disabled={flow.busy !== null} data-testid=\"identity-pay\">\n {flow.busy === 'pay' && spinner}\n {l.pay}\n </Button>\n )\n } else if (flow.step === 'verify') {\n body = (\n <div className=\"space-y-3\">\n {flow.embedFailed ? (\n <p className=\"text-sm text-muted-foreground\">{l.embedFailed}</p>\n ) : (\n <div\n id={flow.verifyContainerId}\n ref={flow.verifyContainerRef}\n className=\"h-[560px] w-full overflow-hidden rounded-md bg-muted\"\n data-testid=\"identity-didit-frame\"\n >\n {flow.busy === 'start' && (\n <div className=\"flex h-full items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n </div>\n )}\n </div>\n )}\n </div>\n )\n footer = (\n <>\n {flow.embedFailed && (\n <Button variant=\"outline\" onClick={flow.openInNewTab}>\n <ExternalLink className=\"mr-1 h-4 w-4\" />\n {l.openInNewTab}\n </Button>\n )}\n {status?.free && flow.problem && flow.busy === null && (\n <Button onClick={flow.retry} data-testid=\"identity-start-retry\">\n {l.tryAgain}\n </Button>\n )}\n <Button variant=\"ghost\" onClick={flow.checkResult} disabled={flow.busy !== null}>\n {flow.busy === 'refresh' && spinner}\n {l.checkResult}\n </Button>\n </>\n )\n } else if (status?.state === 'name_mismatch') {\n body = (\n <div className=\"space-y-3\" data-testid=\"identity-name-mismatch\">\n <p className=\"text-sm text-muted-foreground\">{l.nameMismatchBody}</p>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">{l.documentName}</dt>\n <dd className=\"font-medium\">{docName}</dd>\n <dt className=\"text-muted-foreground\">{l.accountName}</dt>\n <dd>{accountName}</dd>\n </dl>\n </div>\n )\n footer = (\n <>\n <Button variant=\"ghost\" onClick={flow.keepName} disabled={flow.busy !== null}>\n {l.keepName}\n </Button>\n <Button onClick={flow.acceptName} disabled={flow.busy !== null || !docName}>\n {flow.busy === 'accept' && spinner}\n {l.useDocumentName(docName)}\n </Button>\n </>\n )\n } else if (status?.verified) {\n body = (\n <p className=\"flex items-center gap-2 text-sm\">\n <VerifiedBadge className=\"h-4 w-4\" />\n {l.resultVerified}\n </p>\n )\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else if (status?.state === 'in_review') {\n body = <p className=\"text-sm text-muted-foreground\">{l.resultInReview}</p>\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else {\n const left = status?.attempts_left ?? 0\n body = (\n <p className=\"text-sm text-muted-foreground\">\n {status?.free ? l.resultDeclinedFree : l.resultDeclined(left)}\n </p>\n )\n footer =\n left > 0 || status?.free ? (\n <Button onClick={flow.retry} disabled={flow.busy !== null}>\n {l.tryAgain}\n </Button>\n ) : (\n <Button onClick={flow.close}>{l.close}</Button>\n )\n }\n\n const title =\n status?.state === 'name_mismatch' && flow.step === 'result'\n ? l.nameMismatchTitle\n : flow.step === 'verify'\n ? l.verifyTitle\n : l.payTitle\n return (\n <ModalScaffold\n open={flow.isOpen}\n onOpenChange={(open) => (open ? flow.open() : flow.close())}\n title={title}\n icon={<ShieldCheck className=\"h-5 w-5\" />}\n size={flow.step === 'verify' ? 'lg' : 'md'}\n dismissible={dismissible}\n testId=\"identity-verification-dialog\"\n >\n <ModalScaffold.Body>\n {body}\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>{footer}</ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkGXRD5OSU_cjs = require('./chunk-GXRD5OSU.cjs');
|
|
5
5
|
var chunkWOOOMTTA_cjs = require('./chunk-WOOOMTTA.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkUYFHTF2G_cjs = require('./chunk-UYFHTF2G.cjs');
|
|
7
|
+
var chunkIRVSCMRW_cjs = require('./chunk-IRVSCMRW.cjs');
|
|
8
8
|
var chunkWVZLAAIZ_cjs = require('./chunk-WVZLAAIZ.cjs');
|
|
9
9
|
var chunkX7ALF4MP_cjs = require('./chunk-X7ALF4MP.cjs');
|
|
10
10
|
var chunkJVEDKKNO_cjs = require('./chunk-JVEDKKNO.cjs');
|
|
@@ -2843,7 +2843,7 @@ function useGenerateImageLaunch() {
|
|
|
2843
2843
|
if (!arbi || !workspaceId) throw new Error("Open a workspace to generate images.");
|
|
2844
2844
|
const prompt = typeof inputs.prompt === "string" ? inputs.prompt.trim() : "";
|
|
2845
2845
|
if (!prompt) return;
|
|
2846
|
-
const tools =
|
|
2846
|
+
const tools = chunkUYFHTF2G_cjs.PROMPT_BINDINGS[chunkQFSFTO7I_cjs.GENERATE_IMAGE_ID].tools?.(inputs);
|
|
2847
2847
|
let image;
|
|
2848
2848
|
let answer = "";
|
|
2849
2849
|
let failure = "";
|
|
@@ -2889,7 +2889,7 @@ function GenerateImageDialog({
|
|
|
2889
2889
|
referenceId
|
|
2890
2890
|
}) {
|
|
2891
2891
|
const notify = chunkJVEDKKNO_cjs.usePresentation((s) => s.notify);
|
|
2892
|
-
const { skills } =
|
|
2892
|
+
const { skills } = chunkIRVSCMRW_cjs.useWorkflowDefinitions();
|
|
2893
2893
|
const run = useGenerateImageLaunch();
|
|
2894
2894
|
const workflows = react.useMemo(
|
|
2895
2895
|
() => skills.filter((w) => w.id === chunkQFSFTO7I_cjs.GENERATE_IMAGE_ID).map((w) => ({ ...w, options: { ...w.options, agent: false } })),
|
|
@@ -2909,7 +2909,7 @@ function GenerateImageDialog({
|
|
|
2909
2909
|
);
|
|
2910
2910
|
if (!open || !workflows.length) return null;
|
|
2911
2911
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2912
|
-
|
|
2912
|
+
chunkUYFHTF2G_cjs.ConnectedWorkflowStart,
|
|
2913
2913
|
{
|
|
2914
2914
|
workflows,
|
|
2915
2915
|
showTiles: false,
|
|
@@ -3395,5 +3395,5 @@ function usePresentationController(active) {
|
|
|
3395
3395
|
exports.SlidesEditor = SlidesEditor;
|
|
3396
3396
|
exports.usePresentationController = usePresentationController;
|
|
3397
3397
|
exports.usePresentationFiles = usePresentationFiles;
|
|
3398
|
-
//# sourceMappingURL=chunk-
|
|
3399
|
-
//# sourceMappingURL=chunk-
|
|
3398
|
+
//# sourceMappingURL=chunk-ICZBM35E.cjs.map
|
|
3399
|
+
//# sourceMappingURL=chunk-ICZBM35E.cjs.map
|