@adoptai/genui-components 0.1.58 → 0.1.60

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.
Files changed (54) hide show
  1. package/dist/builders/BlockForm.d.ts +5 -1
  2. package/dist/builders/BlockForm.d.ts.map +1 -1
  3. package/dist/builders/BuilderForm.d.ts +22 -1
  4. package/dist/builders/BuilderForm.d.ts.map +1 -1
  5. package/dist/builders/index.d.ts +1 -1
  6. package/dist/builders/index.d.ts.map +1 -1
  7. package/dist/composites/decision-card/resolver.cjs +289 -13
  8. package/dist/composites/decision-card/resolver.cjs.map +1 -1
  9. package/dist/composites/decision-card/resolver.d.ts +2 -1
  10. package/dist/composites/decision-card/resolver.d.ts.map +1 -1
  11. package/dist/composites/decision-card/resolver.js +289 -13
  12. package/dist/composites/decision-card/resolver.js.map +1 -1
  13. package/dist/composites/document-field-extraction/resolver.cjs +1920 -0
  14. package/dist/composites/document-field-extraction/resolver.cjs.map +1 -0
  15. package/dist/composites/document-field-extraction/resolver.js +1913 -0
  16. package/dist/composites/document-field-extraction/resolver.js.map +1 -0
  17. package/dist/composites/tabby-auth/resolver.cjs +597 -0
  18. package/dist/composites/tabby-auth/resolver.cjs.map +1 -0
  19. package/dist/composites/tabby-auth/resolver.d.ts +3 -0
  20. package/dist/composites/tabby-auth/resolver.d.ts.map +1 -0
  21. package/dist/composites/tabby-auth/resolver.js +595 -0
  22. package/dist/composites/tabby-auth/resolver.js.map +1 -0
  23. package/dist/composites/workflow-stepper/resolver.cjs +86 -18
  24. package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
  25. package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -1
  26. package/dist/composites/workflow-stepper/resolver.js +86 -18
  27. package/dist/composites/workflow-stepper/resolver.js.map +1 -1
  28. package/dist/index.cjs +901 -63
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.js +901 -63
  31. package/dist/index.js.map +1 -1
  32. package/dist/renderer.cjs +810 -45
  33. package/dist/renderer.cjs.map +1 -1
  34. package/dist/renderer.js +810 -45
  35. package/dist/renderer.js.map +1 -1
  36. package/dist/resolver.cjs +810 -45
  37. package/dist/resolver.cjs.map +1 -1
  38. package/dist/resolver.d.ts.map +1 -1
  39. package/dist/resolver.js +810 -45
  40. package/dist/resolver.js.map +1 -1
  41. package/dist/schemas/decision-card.d.ts +37 -0
  42. package/dist/schemas/decision-card.d.ts.map +1 -1
  43. package/dist/schemas/index.cjs +113 -8
  44. package/dist/schemas/index.cjs.map +1 -1
  45. package/dist/schemas/index.d.ts +155 -0
  46. package/dist/schemas/index.d.ts.map +1 -1
  47. package/dist/schemas/index.js +113 -8
  48. package/dist/schemas/index.js.map +1 -1
  49. package/dist/schemas/tabby-auth.d.ts +58 -0
  50. package/dist/schemas/tabby-auth.d.ts.map +1 -0
  51. package/dist/schemas/workflow-stepper.d.ts +60 -0
  52. package/dist/schemas/workflow-stepper.d.ts.map +1 -1
  53. package/dist/tool-definitions.json +135 -4
  54. package/package.json +1 -1
@@ -0,0 +1,595 @@
1
+ "use client";
2
+ import { createContext, useState, useContext, useRef, useCallback, useEffect } from 'react';
3
+ import { toPng } from 'html-to-image';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ // src/shared/theme.ts
7
+ var BORDER = "#dedede";
8
+ var MUTED = "#777777";
9
+ var PAPER = "#f6f6f6";
10
+ var ACCENT = "#ff5000";
11
+ var ACCENT_SOFT = "#cc4000";
12
+ var SECONDARY = "#0364ff";
13
+ var CHART_PALETTE = [
14
+ "#ff5000",
15
+ "#0364ff",
16
+ "#16a34a",
17
+ "#dc2626",
18
+ "#7c3aed",
19
+ "#0891b2",
20
+ "#f59e0b",
21
+ "#6366f1",
22
+ "#ec4899",
23
+ "#84cc16",
24
+ "#e11d48",
25
+ "#0ea5e9"
26
+ ];
27
+ function ColumnSettingsPanel({ columns, hidden, onToggle, onShowAll, onHideAll }) {
28
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px", minWidth: "180px" }, children: [
29
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", paddingBottom: "4px", borderBottom: `1px solid ${BORDER}` }, children: [
30
+ /* @__PURE__ */ jsx(
31
+ "button",
32
+ {
33
+ onClick: onShowAll,
34
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: ACCENT, fontWeight: 500, padding: 0 },
35
+ children: "Show all"
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsx(
39
+ "button",
40
+ {
41
+ onClick: onHideAll,
42
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, fontWeight: 500, padding: 0 },
43
+ children: "Hide all"
44
+ }
45
+ )
46
+ ] }),
47
+ columns.map((col) => /* @__PURE__ */ jsxs(
48
+ "label",
49
+ {
50
+ style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", fontSize: "12px", color: "var(--foreground)" },
51
+ children: [
52
+ /* @__PURE__ */ jsx(
53
+ "input",
54
+ {
55
+ type: "checkbox",
56
+ checked: !hidden.has(col.key),
57
+ onChange: () => onToggle(col.key),
58
+ style: { accentColor: ACCENT, width: "14px", height: "14px", margin: 0, cursor: "pointer" }
59
+ }
60
+ ),
61
+ col.label
62
+ ]
63
+ },
64
+ col.key
65
+ ))
66
+ ] });
67
+ }
68
+ var DOT_COLOR = "#aaaaaa";
69
+ var DOT_HOVER = "#555555";
70
+ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "component" }) {
71
+ const [open, setOpen] = useState(false);
72
+ const [view, setView] = useState("main");
73
+ const contentRef = useRef(null);
74
+ const menuRef = useRef(null);
75
+ const btnRef = useRef(null);
76
+ const close = useCallback(() => {
77
+ setOpen(false);
78
+ setView("main");
79
+ }, []);
80
+ useEffect(() => {
81
+ if (!open) return;
82
+ const handler = (e) => {
83
+ var _a, _b;
84
+ if ((_a = menuRef.current) == null ? void 0 : _a.contains(e.target)) return;
85
+ if ((_b = btnRef.current) == null ? void 0 : _b.contains(e.target)) return;
86
+ close();
87
+ };
88
+ document.addEventListener("mousedown", handler);
89
+ return () => document.removeEventListener("mousedown", handler);
90
+ }, [open, close]);
91
+ const handleDownloadPNG = useCallback(async () => {
92
+ if (!contentRef.current) return;
93
+ try {
94
+ const url = await toPng(contentRef.current, { backgroundColor: "white", pixelRatio: 2 });
95
+ const a = document.createElement("a");
96
+ a.href = url;
97
+ a.download = `${filename}.png`;
98
+ a.click();
99
+ } catch (e) {
100
+ }
101
+ close();
102
+ }, [filename, close]);
103
+ const handleCSV = useCallback(() => {
104
+ onDownloadCSV == null ? void 0 : onDownloadCSV();
105
+ close();
106
+ }, [onDownloadCSV, close]);
107
+ return /* @__PURE__ */ jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column" }, children: [
108
+ /* @__PURE__ */ jsx("div", { ref: contentRef, style: { width: "100%" }, children }),
109
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: "4px", position: "relative", zIndex: 10, flexShrink: 0 }, children: [
110
+ /* @__PURE__ */ jsx(
111
+ "button",
112
+ {
113
+ ref: btnRef,
114
+ onClick: () => {
115
+ setOpen((o) => !o);
116
+ setView("main");
117
+ },
118
+ "aria-label": "Component actions",
119
+ style: {
120
+ background: "none",
121
+ border: "none",
122
+ cursor: "pointer",
123
+ padding: "4px 8px",
124
+ display: "flex",
125
+ gap: "3px",
126
+ alignItems: "center",
127
+ borderRadius: "6px",
128
+ transition: "background 0.15s"
129
+ },
130
+ onMouseEnter: (e) => {
131
+ e.currentTarget.style.background = "#f2f2f2";
132
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_HOVER);
133
+ },
134
+ onMouseLeave: (e) => {
135
+ e.currentTarget.style.background = "none";
136
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_COLOR);
137
+ },
138
+ children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "6", viewBox: "0 0 20 6", children: [
139
+ /* @__PURE__ */ jsx("circle", { cx: "3", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
140
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
141
+ /* @__PURE__ */ jsx("circle", { cx: "17", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } })
142
+ ] })
143
+ }
144
+ ),
145
+ open && /* @__PURE__ */ jsx(
146
+ "div",
147
+ {
148
+ ref: menuRef,
149
+ style: {
150
+ position: "absolute",
151
+ bottom: "100%",
152
+ right: 0,
153
+ marginBottom: "4px",
154
+ background: "white",
155
+ border: `1px solid ${BORDER}`,
156
+ borderRadius: "0.75rem",
157
+ boxShadow: "0 4px 12px rgba(0,0,0,0.06)",
158
+ zIndex: 50,
159
+ padding: view === "columns" ? "10px" : "4px",
160
+ minWidth: view === "columns" ? "200px" : "160px"
161
+ },
162
+ children: view === "main" ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
163
+ columnConfig && /* @__PURE__ */ jsx(MenuButton, { label: "Customize columns", onClick: () => setView("columns") }),
164
+ onDownloadCSV && /* @__PURE__ */ jsx(MenuButton, { label: "Download CSV", onClick: handleCSV }),
165
+ /* @__PURE__ */ jsx(MenuButton, { label: "Download PNG", onClick: handleDownloadPNG })
166
+ ] }) : /* @__PURE__ */ jsxs("div", { children: [
167
+ /* @__PURE__ */ jsx(
168
+ "button",
169
+ {
170
+ onClick: () => setView("main"),
171
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, marginBottom: "6px", padding: 0 },
172
+ children: "\u2190 Back"
173
+ }
174
+ ),
175
+ /* @__PURE__ */ jsx(
176
+ ColumnSettingsPanel,
177
+ {
178
+ columns: columnConfig.columns,
179
+ hidden: columnConfig.hidden,
180
+ onToggle: columnConfig.onToggle,
181
+ onShowAll: columnConfig.onShowAll,
182
+ onHideAll: columnConfig.onHideAll
183
+ }
184
+ )
185
+ ] })
186
+ }
187
+ )
188
+ ] })
189
+ ] });
190
+ }
191
+ function MenuButton({ label, onClick }) {
192
+ return /* @__PURE__ */ jsx(
193
+ "button",
194
+ {
195
+ onClick,
196
+ style: {
197
+ background: "none",
198
+ border: "none",
199
+ cursor: "pointer",
200
+ padding: "8px 12px",
201
+ fontSize: "12.5px",
202
+ color: "var(--foreground)",
203
+ textAlign: "left",
204
+ borderRadius: "8px",
205
+ transition: "background 0.15s",
206
+ whiteSpace: "nowrap"
207
+ },
208
+ onMouseEnter: (e) => e.currentTarget.style.background = "#f2f2f2",
209
+ onMouseLeave: (e) => e.currentTarget.style.background = "none",
210
+ children: label
211
+ }
212
+ );
213
+ }
214
+ var DEFAULT_TOKENS = {
215
+ BORDER,
216
+ MUTED,
217
+ PAPER,
218
+ ACCENT,
219
+ ACCENT_SOFT,
220
+ SECONDARY,
221
+ CHART_PALETTE: [...CHART_PALETTE]
222
+ };
223
+ var GenUIThemeContext = createContext(DEFAULT_TOKENS);
224
+ function useTheme() {
225
+ return useContext(GenUIThemeContext);
226
+ }
227
+
228
+ // src/shared/brandIcons.ts
229
+ var SLUGS = {
230
+ gmail: "gmail",
231
+ googlemail: "gmail",
232
+ outlook: "microsoftoutlook",
233
+ microsoftoutlook: "microsoftoutlook",
234
+ office365: "microsoftoffice",
235
+ slack: "slack",
236
+ googledrive: "googledrive",
237
+ drive: "googledrive",
238
+ googlesheets: "googlesheets",
239
+ googledocs: "googledocs",
240
+ googlecalendar: "googlecalendar",
241
+ gcal: "googlecalendar",
242
+ notion: "notion",
243
+ salesforce: "salesforce",
244
+ hubspot: "hubspot",
245
+ github: "github",
246
+ gitlab: "gitlab",
247
+ jira: "jira",
248
+ confluence: "confluence",
249
+ atlassian: "atlassian",
250
+ asana: "asana",
251
+ trello: "trello",
252
+ linear: "linear",
253
+ zoom: "zoom",
254
+ dropbox: "dropbox",
255
+ box: "box",
256
+ zendesk: "zendesk",
257
+ intercom: "intercom",
258
+ stripe: "stripe",
259
+ shopify: "shopify",
260
+ perplexity: "perplexity",
261
+ openai: "openai",
262
+ anthropic: "anthropic",
263
+ fireflies: "fireflies",
264
+ zohodesk: "zoho",
265
+ zoho: "zoho",
266
+ pipedrive: "pipedrive",
267
+ workday: "workday",
268
+ sap: "sap",
269
+ odoo: "odoo",
270
+ superset: "apachesuperset",
271
+ highradius: "",
272
+ zoominfo: ""
273
+ };
274
+ function normalize(name) {
275
+ return (name || "").toLowerCase().replace(/[^a-z0-9]/g, "");
276
+ }
277
+ function brandIconUrl(name) {
278
+ const slug = SLUGS[normalize(name)];
279
+ if (!slug) return void 0;
280
+ return `https://cdn.simpleicons.org/${slug}`;
281
+ }
282
+ var CONNECTED_GREEN = "#15803d";
283
+ var CONNECTED_GREEN_BG = "#dcfce7";
284
+ var PENDING_AMBER = "#92400e";
285
+ var PENDING_AMBER_BG = "#fff7ed";
286
+ var CARD_TITLE = "Authentication required";
287
+ var TRUST_FOOTER = "Credentials not stored by Adopt";
288
+ var DEFAULT_STEPS = (app, ctaLabel, connected) => connected ? [
289
+ `Click ${ctaLabel} below to open ${app} in a new tab.`,
290
+ "Confirm you are signed in \u2014 re-authenticate if prompted.",
291
+ "Return here \u2014 the request continues automatically."
292
+ ] : [
293
+ `Click ${ctaLabel} below to open the sign-in page.`,
294
+ `Sign in with your ${app} credentials \u2014 SSO is supported.`,
295
+ "Return here \u2014 the request resumes automatically."
296
+ ];
297
+ function humanizeApp(raw) {
298
+ const v = raw.trim();
299
+ if (!v) return v;
300
+ const looksLikeSlug = /^[a-z0-9]+([_-][a-z0-9]+)*$/.test(v);
301
+ if (!looksLikeSlug) return v;
302
+ return v.split(/[_-]+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
303
+ }
304
+ function ShieldIcon({ color }) {
305
+ return /* @__PURE__ */ jsxs(
306
+ "svg",
307
+ {
308
+ width: "13",
309
+ height: "13",
310
+ viewBox: "0 0 24 24",
311
+ fill: "none",
312
+ stroke: color,
313
+ strokeWidth: "2",
314
+ strokeLinecap: "round",
315
+ strokeLinejoin: "round",
316
+ "aria-hidden": "true",
317
+ style: { flexShrink: 0 },
318
+ children: [
319
+ /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }),
320
+ /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
321
+ ]
322
+ }
323
+ );
324
+ }
325
+ function ExternalIcon() {
326
+ return /* @__PURE__ */ jsxs(
327
+ "svg",
328
+ {
329
+ width: "13",
330
+ height: "13",
331
+ viewBox: "0 0 24 24",
332
+ fill: "none",
333
+ stroke: "currentColor",
334
+ strokeWidth: "2",
335
+ strokeLinecap: "round",
336
+ strokeLinejoin: "round",
337
+ "aria-hidden": "true",
338
+ style: { flexShrink: 0 },
339
+ children: [
340
+ /* @__PURE__ */ jsx("path", { d: "M15 3h6v6" }),
341
+ /* @__PURE__ */ jsx("path", { d: "M10 14 21 3" }),
342
+ /* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
343
+ ]
344
+ }
345
+ );
346
+ }
347
+ function TabbyAuthResolver(p) {
348
+ var _a, _b, _c;
349
+ const { BORDER: BORDER2, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
350
+ const [cardHovered, setCardHovered] = useState(false);
351
+ const [btnHovered, setBtnHovered] = useState(false);
352
+ const [imgFailed, setImgFailed] = useState(false);
353
+ const app = humanizeApp(p.app || "the app");
354
+ const connected = p.state === "connected";
355
+ const accent = connected ? CONNECTED_GREEN : ACCENT2;
356
+ const ctaLabel = (_a = p.ctaLabel) != null ? _a : connected ? `Open ${app}` : `Connect ${app}`;
357
+ const subtitle = p.workspace ? `${app} \xB7 ${p.workspace} workspace` : app;
358
+ const steps = ((_b = p.steps) == null ? void 0 : _b.length) ? p.steps : DEFAULT_STEPS(app, ctaLabel, connected);
359
+ const description = (_c = p.description) != null ? _c : connected ? `Your ${app} session is active. Open ${app} to continue, or re-authenticate if prompted.` : `Your ${app} account is not yet connected to this workspace. Complete sign-in once to enable automatic access.`;
360
+ const iconSrc = p.iconUrl || brandIconUrl(app);
361
+ const showImg = Boolean(iconSrc) && !imgFailed;
362
+ const initial = app.charAt(0).toUpperCase();
363
+ const badge = connected ? { label: "Connected", bg: CONNECTED_GREEN_BG, color: CONNECTED_GREEN } : { label: "Pending sign-in", bg: PENDING_AMBER_BG, color: PENDING_AMBER };
364
+ const sectionPad = "13px 16px";
365
+ return /* @__PURE__ */ jsx(ComponentActions, { filename: `${app} authentication`, children: /* @__PURE__ */ jsx("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "10px" }, children: /* @__PURE__ */ jsxs(
366
+ "div",
367
+ {
368
+ onMouseEnter: () => setCardHovered(true),
369
+ onMouseLeave: () => setCardHovered(false),
370
+ style: {
371
+ display: "flex",
372
+ flexDirection: "row",
373
+ alignItems: "stretch",
374
+ borderRadius: "0.75rem",
375
+ border: `1px solid ${cardHovered ? "#d2d2d2" : BORDER2}`,
376
+ background: "white",
377
+ overflow: "hidden",
378
+ boxShadow: cardHovered ? "0 1px 3px rgba(0,0,0,0.05), 0 6px 18px rgba(0,0,0,0.06)" : "0 1px 2px rgba(0,0,0,0.03)",
379
+ transition: "box-shadow 0.18s ease, border-color 0.18s ease"
380
+ },
381
+ children: [
382
+ /* @__PURE__ */ jsx("div", { style: { width: "3px", flexShrink: 0, background: accent } }),
383
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
384
+ /* @__PURE__ */ jsxs(
385
+ "div",
386
+ {
387
+ style: {
388
+ display: "flex",
389
+ alignItems: "flex-start",
390
+ gap: "12px",
391
+ padding: sectionPad
392
+ },
393
+ children: [
394
+ /* @__PURE__ */ jsx(
395
+ "div",
396
+ {
397
+ style: {
398
+ position: "relative",
399
+ width: "34px",
400
+ height: "34px",
401
+ borderRadius: "9px",
402
+ flexShrink: 0,
403
+ display: "flex",
404
+ alignItems: "center",
405
+ justifyContent: "center",
406
+ background: showImg ? "white" : "#fff3ee",
407
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.06)",
408
+ overflow: "hidden"
409
+ },
410
+ children: showImg ? /* @__PURE__ */ jsx(
411
+ "img",
412
+ {
413
+ src: iconSrc,
414
+ alt: app,
415
+ onError: () => setImgFailed(true),
416
+ style: { width: "22px", height: "22px", objectFit: "contain" }
417
+ }
418
+ ) : /* @__PURE__ */ jsx(
419
+ "span",
420
+ {
421
+ style: {
422
+ fontFamily: "var(--font-serif)",
423
+ fontSize: "17px",
424
+ fontWeight: 400,
425
+ color: ACCENT2,
426
+ lineHeight: 1
427
+ },
428
+ children: initial
429
+ }
430
+ )
431
+ }
432
+ ),
433
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "2px" }, children: [
434
+ /* @__PURE__ */ jsx(
435
+ "span",
436
+ {
437
+ style: {
438
+ fontFamily: "var(--font-serif)",
439
+ fontSize: "15px",
440
+ fontWeight: 400,
441
+ color: "var(--foreground)",
442
+ letterSpacing: "-0.01em",
443
+ lineHeight: 1.2
444
+ },
445
+ children: CARD_TITLE
446
+ }
447
+ ),
448
+ /* @__PURE__ */ jsx(
449
+ "span",
450
+ {
451
+ style: {
452
+ fontSize: "12px",
453
+ color: MUTED2,
454
+ whiteSpace: "nowrap",
455
+ overflow: "hidden",
456
+ textOverflow: "ellipsis"
457
+ },
458
+ children: subtitle
459
+ }
460
+ )
461
+ ] }),
462
+ /* @__PURE__ */ jsxs(
463
+ "span",
464
+ {
465
+ style: {
466
+ display: "inline-flex",
467
+ alignItems: "center",
468
+ gap: "5px",
469
+ flexShrink: 0,
470
+ fontSize: "10.5px",
471
+ fontWeight: 600,
472
+ padding: "3px 9px",
473
+ borderRadius: "9999px",
474
+ background: badge.bg,
475
+ color: badge.color,
476
+ whiteSpace: "nowrap"
477
+ },
478
+ children: [
479
+ /* @__PURE__ */ jsx(
480
+ "span",
481
+ {
482
+ style: {
483
+ width: "6px",
484
+ height: "6px",
485
+ borderRadius: "9999px",
486
+ background: badge.color
487
+ }
488
+ }
489
+ ),
490
+ badge.label
491
+ ]
492
+ }
493
+ )
494
+ ]
495
+ }
496
+ ),
497
+ /* @__PURE__ */ jsxs(
498
+ "div",
499
+ {
500
+ style: {
501
+ borderTop: `1px solid ${BORDER2}`,
502
+ padding: sectionPad,
503
+ display: "flex",
504
+ flexDirection: "column",
505
+ gap: "12px"
506
+ },
507
+ children: [
508
+ description && /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: "12.5px", lineHeight: 1.5, color: "var(--foreground)" }, children: description }),
509
+ /* @__PURE__ */ jsx("ol", { style: { margin: 0, padding: 0, listStyle: "none", display: "flex", flexDirection: "column", gap: "8px" }, children: steps.map((step, i) => /* @__PURE__ */ jsxs("li", { style: { display: "flex", alignItems: "flex-start", gap: "10px" }, children: [
510
+ /* @__PURE__ */ jsx(
511
+ "span",
512
+ {
513
+ style: {
514
+ flexShrink: 0,
515
+ width: "18px",
516
+ height: "18px",
517
+ borderRadius: "9999px",
518
+ background: accent,
519
+ color: "white",
520
+ fontSize: "10.5px",
521
+ fontWeight: 600,
522
+ display: "flex",
523
+ alignItems: "center",
524
+ justifyContent: "center",
525
+ marginTop: "1px"
526
+ },
527
+ children: i + 1
528
+ }
529
+ ),
530
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "12.5px", lineHeight: 1.45, color: "var(--foreground)" }, children: step })
531
+ ] }, i)) })
532
+ ]
533
+ }
534
+ ),
535
+ /* @__PURE__ */ jsxs(
536
+ "div",
537
+ {
538
+ style: {
539
+ borderTop: `1px solid ${BORDER2}`,
540
+ padding: sectionPad,
541
+ background: "#fbfbfb",
542
+ display: "flex",
543
+ alignItems: "center",
544
+ justifyContent: "space-between",
545
+ gap: "12px",
546
+ flexWrap: "wrap"
547
+ },
548
+ children: [
549
+ /* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px", color: MUTED2, fontSize: "11.5px" }, children: [
550
+ /* @__PURE__ */ jsx(ShieldIcon, { color: CONNECTED_GREEN }),
551
+ TRUST_FOOTER
552
+ ] }),
553
+ /* @__PURE__ */ jsxs(
554
+ "a",
555
+ {
556
+ href: p.url,
557
+ target: "_blank",
558
+ rel: "noopener noreferrer",
559
+ onMouseEnter: () => setBtnHovered(true),
560
+ onMouseLeave: () => setBtnHovered(false),
561
+ style: {
562
+ display: "inline-flex",
563
+ alignItems: "center",
564
+ gap: "7px",
565
+ flexShrink: 0,
566
+ borderRadius: "8px",
567
+ padding: "8px 15px",
568
+ fontSize: "12.5px",
569
+ fontWeight: 600,
570
+ textDecoration: "none",
571
+ whiteSpace: "nowrap",
572
+ cursor: "pointer",
573
+ color: "white",
574
+ border: "1px solid transparent",
575
+ background: btnHovered ? connected ? "#126a33" : ACCENT_SOFT2 : accent,
576
+ transition: "background 0.15s ease"
577
+ },
578
+ children: [
579
+ /* @__PURE__ */ jsx(ExternalIcon, {}),
580
+ ctaLabel
581
+ ]
582
+ }
583
+ )
584
+ ]
585
+ }
586
+ )
587
+ ] })
588
+ ]
589
+ }
590
+ ) }) });
591
+ }
592
+
593
+ export { TabbyAuthResolver };
594
+ //# sourceMappingURL=resolver.js.map
595
+ //# sourceMappingURL=resolver.js.map