@arcadeai/design-system 3.27.0 → 3.27.2
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/README.md +2 -2
- package/dist/assets/icons/railway.js +10 -0
- package/dist/calendar-w1IATMME.js +3042 -0
- package/dist/components/index.js +444 -435
- package/dist/components/ui/atoms/accordion.js +4 -4
- package/dist/components/ui/atoms/alert-dialog.js +11 -11
- package/dist/components/ui/atoms/breadcrumb.js +3 -3
- package/dist/components/ui/atoms/calendar.d.ts +21 -0
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -0
- package/dist/components/ui/atoms/calendar.js +10 -0
- package/dist/components/ui/atoms/command.js +1 -1
- package/dist/components/ui/atoms/dialog.js +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +5 -5
- package/dist/components/ui/atoms/form.js +3 -3
- package/dist/components/ui/atoms/hover-card.js +1 -1
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +80 -78
- package/dist/components/ui/atoms/icons/railway.d.ts +4 -0
- package/dist/components/ui/atoms/icons/railway.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/railway.js +31 -0
- package/dist/components/ui/atoms/index.d.ts +2 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +429 -422
- package/dist/components/ui/atoms/popover.js +5 -5
- package/dist/components/ui/atoms/radio-group.js +1 -1
- package/dist/components/ui/atoms/resizable.js +3 -3
- package/dist/components/ui/atoms/select.js +1 -1
- package/dist/components/ui/atoms/sheet.js +4 -4
- package/dist/components/ui/atoms/tabs.js +1 -1
- package/dist/components/ui/atoms/tooltip.js +1 -1
- package/dist/components/ui/atoms/virtualized-grid.d.ts +23 -0
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -0
- package/dist/components/ui/atoms/virtualized-grid.js +682 -0
- package/dist/components/ui/index.js +444 -435
- package/dist/components/ui/molecules/date-time-picker.d.ts +12 -0
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -0
- package/dist/components/ui/molecules/date-time-picker.js +84 -0
- package/dist/components/ui/molecules/index.d.ts +1 -0
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +13 -11
- package/dist/components/ui/molecules/requirement-badges.js +7 -6
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-selection-summary.js +6 -5
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +16 -15
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +11 -10
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts +3 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +110 -58
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts +3 -1
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +75 -70
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts +8 -0
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts.map +1 -0
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.js +11 -0
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +6 -4
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +195 -261
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +5 -1
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +154 -80
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +89 -75
- package/dist/hooks/use-columns.d.ts +6 -0
- package/dist/hooks/use-columns.d.ts.map +1 -0
- package/dist/hooks/use-columns.js +20 -0
- package/dist/{index-C8tglJS9.js → index-By-GFSsC.js} +3 -3
- package/dist/{index-8kzT5-zz.js → index-DO05OIM5.js} +385 -380
- package/dist/main.js +478 -469
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +80 -78
- package/dist/metadata/toolkits.js +13 -13
- package/dist/metadata/utils.js +3 -3
- package/dist/{react-resizable-panels.browser-31wAXhAV.js → react-resizable-panels.browser-DYl0LXfw.js} +5 -5
- package/dist/{toolkit-card-CsV6xoOG.js → toolkit-card-D6Dqff6p.js} +5 -3
- package/package.json +43 -34
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import "../../../../../web-sgv-FK6q.js";
|
|
2
|
-
import { allTools as
|
|
3
|
-
import { TOOLKIT_CATALOGUE as
|
|
4
|
-
const
|
|
5
|
-
const l =
|
|
2
|
+
import { allTools as h } from "../../../../../lib/arcade/mocks.js";
|
|
3
|
+
import { TOOLKIT_CATALOGUE as M } from "../../../../../metadata/toolkits.js";
|
|
4
|
+
const G = h.filter((a) => a.toolkit.name === "basic"), E = h.filter((a) => a.toolkit.name === "api_toolkit"), I = h.filter((a) => a.toolkit.name === "Google"), N = h.filter((a) => a.toolkit.name === "Gmail"), o = (a, n = !1, s = !1) => {
|
|
5
|
+
const l = M[a];
|
|
6
6
|
return l ? {
|
|
7
7
|
...l,
|
|
8
|
-
isBYOC:
|
|
9
|
-
isPro:
|
|
8
|
+
isBYOC: n,
|
|
9
|
+
isPro: s
|
|
10
10
|
} : {
|
|
11
|
-
id:
|
|
12
|
-
label:
|
|
13
|
-
isBYOC:
|
|
14
|
-
isPro:
|
|
11
|
+
id: a,
|
|
12
|
+
label: a,
|
|
13
|
+
isBYOC: n,
|
|
14
|
+
isPro: s,
|
|
15
15
|
publicIconUrl: "",
|
|
16
|
-
docsLink: `https://docs.example.com/${
|
|
17
|
-
relativeDocsLink: `/${
|
|
16
|
+
docsLink: `https://docs.example.com/${a}`,
|
|
17
|
+
relativeDocsLink: `/${a}`,
|
|
18
18
|
type: "community",
|
|
19
19
|
category: "productivity",
|
|
20
20
|
isComingSoon: !1,
|
|
21
21
|
isHidden: !1
|
|
22
22
|
};
|
|
23
|
-
},
|
|
23
|
+
}, C = {
|
|
24
24
|
basic: {
|
|
25
25
|
name: "basic",
|
|
26
26
|
description: "Basic toolkit with essential tools",
|
|
27
27
|
version: "1.0.0",
|
|
28
|
-
tools:
|
|
28
|
+
tools: G,
|
|
29
29
|
requirements: {
|
|
30
30
|
met: !0,
|
|
31
31
|
secrets: [],
|
|
@@ -37,7 +37,7 @@ const y = d.filter((i) => i.toolkit.name === "basic"), q = d.filter((i) => i.too
|
|
|
37
37
|
name: "api_toolkit",
|
|
38
38
|
description: "API toolkit for external integrations",
|
|
39
39
|
version: "2.0.0",
|
|
40
|
-
tools:
|
|
40
|
+
tools: E,
|
|
41
41
|
requirements: {
|
|
42
42
|
met: !1,
|
|
43
43
|
secrets: [
|
|
@@ -215,7 +215,7 @@ const y = d.filter((i) => i.toolkit.name === "basic"), q = d.filter((i) => i.too
|
|
|
215
215
|
name: "Google",
|
|
216
216
|
description: "Arcade.dev LLM tools for Google Workspace",
|
|
217
217
|
version: "1.2.4",
|
|
218
|
-
tools:
|
|
218
|
+
tools: I,
|
|
219
219
|
requirements: {
|
|
220
220
|
met: !0,
|
|
221
221
|
secrets: [],
|
|
@@ -234,7 +234,7 @@ const y = d.filter((i) => i.toolkit.name === "basic"), q = d.filter((i) => i.too
|
|
|
234
234
|
name: "Gmail",
|
|
235
235
|
description: "Arcade.dev LLM tools for Gmail",
|
|
236
236
|
version: "2.0.0",
|
|
237
|
-
tools:
|
|
237
|
+
tools: N,
|
|
238
238
|
requirements: {
|
|
239
239
|
met: !0,
|
|
240
240
|
secrets: [],
|
|
@@ -260,25 +260,25 @@ const y = d.filter((i) => i.toolkit.name === "basic"), q = d.filter((i) => i.too
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
|
-
function
|
|
264
|
-
const
|
|
263
|
+
function A(a) {
|
|
264
|
+
const n = [], s = [], l = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), u = {
|
|
265
265
|
toolkitsByName: /* @__PURE__ */ new Map(),
|
|
266
266
|
toolsByName: /* @__PURE__ */ new Map()
|
|
267
267
|
};
|
|
268
|
-
for (const [e,
|
|
269
|
-
const
|
|
270
|
-
secrets:
|
|
271
|
-
configured:
|
|
272
|
-
pending:
|
|
268
|
+
for (const [e, i] of Object.entries(a)) {
|
|
269
|
+
const v = `${i.name} ${i.description || ""} ${i.version || ""}`, y = {
|
|
270
|
+
secrets: i.requirements?.secrets?.length ? {
|
|
271
|
+
configured: i.requirements.secrets.filter((t) => t.met === !0).map((t) => t.key),
|
|
272
|
+
pending: i.requirements.secrets.filter((t) => t.met === !1).map((t) => t.key)
|
|
273
273
|
} : void 0,
|
|
274
|
-
oauth:
|
|
275
|
-
providers:
|
|
274
|
+
oauth: i.requirements?.authorization?.length ? {
|
|
275
|
+
providers: i.requirements.authorization.filter((t) => t.provider_id || t.id).map((t) => ({
|
|
276
276
|
id: t.provider_id || t.id || "",
|
|
277
277
|
status: t.status,
|
|
278
278
|
scopes: t.oauth2?.scopes || []
|
|
279
279
|
}))
|
|
280
280
|
} : void 0
|
|
281
|
-
},
|
|
281
|
+
}, w = (() => {
|
|
282
282
|
switch (e) {
|
|
283
283
|
case "basic":
|
|
284
284
|
return o(e, !1, !1);
|
|
@@ -348,33 +348,33 @@ function f(i) {
|
|
|
348
348
|
default:
|
|
349
349
|
return o(e, !1, !1);
|
|
350
350
|
}
|
|
351
|
-
})(),
|
|
352
|
-
...
|
|
353
|
-
searchableText:
|
|
354
|
-
requirementsSummary:
|
|
355
|
-
metadata:
|
|
351
|
+
})(), d = {
|
|
352
|
+
...i,
|
|
353
|
+
searchableText: v,
|
|
354
|
+
requirementsSummary: y,
|
|
355
|
+
metadata: w
|
|
356
356
|
};
|
|
357
|
-
|
|
358
|
-
for (const t of
|
|
359
|
-
const
|
|
357
|
+
n.push(d), l.set(e, d), u.toolkitsByName.set(e.toLowerCase(), d);
|
|
358
|
+
for (const t of i.tools) {
|
|
359
|
+
const _ = `${t.name} ${t.fully_qualified_name} ${t.description || ""} ${i.name} ${i.description || ""}`, c = {
|
|
360
360
|
...t,
|
|
361
|
-
searchableText:
|
|
361
|
+
searchableText: _
|
|
362
362
|
};
|
|
363
|
-
|
|
363
|
+
s.push(c), m.set(t.fully_qualified_name, e), u.toolsByName.set(
|
|
364
364
|
t.fully_qualified_name.toLowerCase(),
|
|
365
365
|
c
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
return {
|
|
370
|
-
toolkits:
|
|
371
|
-
tools:
|
|
370
|
+
toolkits: n,
|
|
371
|
+
tools: s,
|
|
372
372
|
toolkitMap: l,
|
|
373
|
-
toolToToolkitMap:
|
|
373
|
+
toolToToolkitMap: m,
|
|
374
374
|
searchIndex: u
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const $ = {
|
|
378
378
|
Slack: {
|
|
379
379
|
name: "Slack",
|
|
380
380
|
description: "Slack communication toolkit",
|
|
@@ -427,7 +427,7 @@ const S = {
|
|
|
427
427
|
],
|
|
428
428
|
requirements: { met: !0, secrets: [], authorization: [], scopes: {} }
|
|
429
429
|
}
|
|
430
|
-
},
|
|
430
|
+
}, D = A(C), L = A($), P = {
|
|
431
431
|
Gmail: {
|
|
432
432
|
name: "Gmail",
|
|
433
433
|
description: "Gmail email management toolkit",
|
|
@@ -614,9 +614,19 @@ const S = {
|
|
|
614
614
|
scopes: { notion: ["read", "write"] }
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
},
|
|
618
|
-
function
|
|
619
|
-
const
|
|
617
|
+
}, R = A(P);
|
|
618
|
+
function O(a = {}) {
|
|
619
|
+
const {
|
|
620
|
+
toolkitCount: n = 100,
|
|
621
|
+
minToolsPerToolkit: s = 10,
|
|
622
|
+
maxToolsPerToolkit: l = 25
|
|
623
|
+
} = a, m = {}, u = 3, e = 1, i = 10, v = 0.3, y = 0.7, w = 0.5, d = 0.5, t = [
|
|
624
|
+
"Gmail",
|
|
625
|
+
"GoogleCalendar",
|
|
626
|
+
"GoogleDocs",
|
|
627
|
+
"Github",
|
|
628
|
+
"Slack",
|
|
629
|
+
"Jira",
|
|
620
630
|
"Discord",
|
|
621
631
|
"Notion",
|
|
622
632
|
"Stripe",
|
|
@@ -645,42 +655,106 @@ function P() {
|
|
|
645
655
|
"Video",
|
|
646
656
|
"Audio",
|
|
647
657
|
"Finance",
|
|
648
|
-
"CRM"
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
658
|
+
"CRM",
|
|
659
|
+
"Workflow",
|
|
660
|
+
"Scheduler",
|
|
661
|
+
"Calendar",
|
|
662
|
+
"Maps",
|
|
663
|
+
"Weather",
|
|
664
|
+
"Translation",
|
|
665
|
+
"Search",
|
|
666
|
+
"Indexing",
|
|
667
|
+
"Cache",
|
|
668
|
+
"Queue",
|
|
669
|
+
"Messaging",
|
|
670
|
+
"Notification",
|
|
671
|
+
"Authentication",
|
|
672
|
+
"Authorization",
|
|
673
|
+
"Logging",
|
|
674
|
+
"Tracing",
|
|
675
|
+
"Metrics",
|
|
676
|
+
"Alerting",
|
|
677
|
+
"Backup",
|
|
678
|
+
"Recovery"
|
|
679
|
+
], _ = [
|
|
680
|
+
"Pro",
|
|
681
|
+
"Enterprise",
|
|
682
|
+
"Basic",
|
|
683
|
+
"Advanced",
|
|
684
|
+
"Premium",
|
|
685
|
+
"Starter",
|
|
686
|
+
"Core",
|
|
687
|
+
"Plus"
|
|
688
|
+
], c = [];
|
|
689
|
+
for (let r = 0; c.length < n; r++) {
|
|
690
|
+
const p = t[r % t.length];
|
|
691
|
+
if (r < t.length)
|
|
692
|
+
c.push(p);
|
|
693
|
+
else {
|
|
694
|
+
const f = Math.floor(r / t.length) - 1, q = _[f % _.length];
|
|
695
|
+
c.push(`${p} ${q}`);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
for (const r of c) {
|
|
699
|
+
const p = [], f = r.toLowerCase().replace(/\s+/g, "_"), q = l - s + 1, S = s + Math.floor(Math.random() * q), T = [
|
|
700
|
+
"create",
|
|
701
|
+
"read",
|
|
702
|
+
"update",
|
|
703
|
+
"delete",
|
|
704
|
+
"list",
|
|
705
|
+
"search",
|
|
706
|
+
"export",
|
|
707
|
+
"import",
|
|
708
|
+
"sync",
|
|
709
|
+
"validate",
|
|
710
|
+
"process",
|
|
711
|
+
"transform",
|
|
712
|
+
"analyze",
|
|
713
|
+
"generate",
|
|
714
|
+
"send",
|
|
715
|
+
"receive",
|
|
716
|
+
"connect",
|
|
717
|
+
"disconnect",
|
|
718
|
+
"configure",
|
|
719
|
+
"monitor",
|
|
720
|
+
"schedule",
|
|
721
|
+
"cancel",
|
|
722
|
+
"retry",
|
|
723
|
+
"archive",
|
|
724
|
+
"restore"
|
|
725
|
+
];
|
|
726
|
+
for (let g = 0; g < S; g++) {
|
|
727
|
+
const k = T[g % T.length], b = `${k}_${f}_${g + 1}`;
|
|
728
|
+
p.push({
|
|
729
|
+
name: b,
|
|
730
|
+
fully_qualified_name: `${f}.${b}`,
|
|
731
|
+
qualified_name: b,
|
|
732
|
+
description: `${k.charAt(0).toUpperCase() + k.slice(1)} operation for ${r} - performs ${k} with advanced features and error handling`,
|
|
659
733
|
toolkit: {
|
|
660
|
-
name:
|
|
661
|
-
description: `${
|
|
662
|
-
version: `${Math.floor(Math.random() *
|
|
663
|
-
Math.random() *
|
|
734
|
+
name: r,
|
|
735
|
+
description: `${r} toolkit for comprehensive operations`,
|
|
736
|
+
version: `${Math.floor(Math.random() * u) + e}.${Math.floor(
|
|
737
|
+
Math.random() * i
|
|
664
738
|
)}.0`
|
|
665
739
|
},
|
|
666
740
|
input: { parameters: [] },
|
|
667
741
|
requirements: void 0
|
|
668
742
|
});
|
|
669
743
|
}
|
|
670
|
-
|
|
671
|
-
name:
|
|
672
|
-
description: `${
|
|
673
|
-
version: `${Math.floor(Math.random() *
|
|
674
|
-
Math.random() *
|
|
744
|
+
m[r] = {
|
|
745
|
+
name: r,
|
|
746
|
+
description: `${r} toolkit with ${S} powerful tools for comprehensive operations`,
|
|
747
|
+
version: `${Math.floor(Math.random() * u) + e}.${Math.floor(
|
|
748
|
+
Math.random() * i
|
|
675
749
|
)}.0`,
|
|
676
|
-
tools:
|
|
750
|
+
tools: p,
|
|
677
751
|
requirements: {
|
|
678
|
-
met: Math.random() >
|
|
679
|
-
secrets: Math.random() >
|
|
752
|
+
met: Math.random() > v,
|
|
753
|
+
secrets: Math.random() > y ? [
|
|
680
754
|
{
|
|
681
|
-
key: `${
|
|
682
|
-
met: Math.random() >
|
|
683
|
-
status_reason: Math.random() >
|
|
755
|
+
key: `${f.toUpperCase()}_API_KEY`,
|
|
756
|
+
met: Math.random() > w,
|
|
757
|
+
status_reason: Math.random() > d ? "API key configured" : "API key not found"
|
|
684
758
|
}
|
|
685
759
|
] : [],
|
|
686
760
|
authorization: [],
|
|
@@ -688,15 +762,15 @@ function P() {
|
|
|
688
762
|
}
|
|
689
763
|
};
|
|
690
764
|
}
|
|
691
|
-
return
|
|
765
|
+
return m;
|
|
692
766
|
}
|
|
693
767
|
export {
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
768
|
+
A as createMockToolkitCollection,
|
|
769
|
+
R as demoMockToolkitCollection,
|
|
770
|
+
P as demoMockToolkits,
|
|
771
|
+
O as generateLargeDataset,
|
|
772
|
+
D as mockToolkitCollection,
|
|
773
|
+
C as mockToolkits,
|
|
774
|
+
L as simpleMockToolkitCollection,
|
|
775
|
+
$ as simpleMockToolkits
|
|
702
776
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolkit-picker.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/organisms/toolkit-picker/toolkit-picker.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,eAAO,MAAM,mBAAmB,GAAI,OAAO,kBAAkB,
|
|
1
|
+
{"version":3,"file":"toolkit-picker.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/organisms/toolkit-picker/toolkit-picker.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,eAAO,MAAM,mBAAmB,GAAI,OAAO,kBAAkB,4CAsN5D,CAAC"}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import { Arcade as
|
|
5
|
-
import { MobileTooltipProvider as
|
|
6
|
-
import { Tabs as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { X, Package as
|
|
9
|
-
import { useState as
|
|
10
|
-
import { ActionButtons as
|
|
11
|
-
import { FilterBadges as
|
|
12
|
-
import { FooterSummary as
|
|
13
|
-
import { SearchInput as
|
|
14
|
-
import { SelectButton as
|
|
15
|
-
import { ToolkitList as
|
|
16
|
-
import { ToolsList as
|
|
17
|
-
import { useToolkitPicker as
|
|
18
|
-
const
|
|
2
|
+
import { Button as m } from "../../atoms/button.js";
|
|
3
|
+
import { Dialog as S, DialogTrigger as z, DialogContent as D, DialogHeader as j, DialogTitle as A, DialogDescription as R, DialogClose as c, DialogFooter as B } from "../../atoms/dialog.js";
|
|
4
|
+
import { Arcade as M } from "../../atoms/icons/arcade.js";
|
|
5
|
+
import { MobileTooltipProvider as P } from "../../atoms/mobile-tooltip.js";
|
|
6
|
+
import { Tabs as F, TabsList as L, TabsTrigger as p, TabsContent as h } from "../../atoms/tabs.js";
|
|
7
|
+
import { Tooltip as E, TooltipTrigger as X, TooltipContent as G } from "../../atoms/tooltip.js";
|
|
8
|
+
import { X as H, Package as I, Wrench as O } from "lucide-react";
|
|
9
|
+
import { useState as Q, useRef as x } from "react";
|
|
10
|
+
import { ActionButtons as V } from "./components/action-buttons.js";
|
|
11
|
+
import { FilterBadges as W } from "./components/filter-badges.js";
|
|
12
|
+
import { FooterSummary as Y } from "./components/footer-summary.js";
|
|
13
|
+
import { SearchInput as $ } from "./components/search-input.js";
|
|
14
|
+
import { SelectButton as q } from "./components/select-button.js";
|
|
15
|
+
import { ToolkitList as J } from "./components/toolkit-list.js";
|
|
16
|
+
import { ToolsList as K } from "./components/tools-list.js";
|
|
17
|
+
import { useToolkitPicker as U } from "./hooks/use-toolkit-picker.js";
|
|
18
|
+
const Z = /Mac/i, ue = (f) => {
|
|
19
19
|
const {
|
|
20
|
-
description:
|
|
21
|
-
children:
|
|
20
|
+
description: g = "Select toolkits and tools",
|
|
21
|
+
children: u,
|
|
22
22
|
selectionMode: a = "multi",
|
|
23
23
|
onSelectionChange: s
|
|
24
|
-
} =
|
|
24
|
+
} = f, [b, r] = Q(!1), i = x(null), o = x(null), {
|
|
25
25
|
state: {
|
|
26
|
-
selectedToolkits:
|
|
27
|
-
selectedTools:
|
|
28
|
-
activeTab:
|
|
29
|
-
filteredToolkits:
|
|
30
|
-
filteredTools:
|
|
26
|
+
selectedToolkits: k,
|
|
27
|
+
selectedTools: n,
|
|
28
|
+
activeTab: v,
|
|
29
|
+
filteredToolkits: N,
|
|
30
|
+
filteredTools: w
|
|
31
31
|
},
|
|
32
|
-
setActiveTab:
|
|
33
|
-
clearSearchQuery:
|
|
34
|
-
commitSelections:
|
|
35
|
-
restoreCommittedState:
|
|
36
|
-
} =
|
|
37
|
-
|
|
38
|
-
selectedToolkits: Array.from(
|
|
39
|
-
selectedTools: Array.from(
|
|
32
|
+
setActiveTab: d,
|
|
33
|
+
clearSearchQuery: T,
|
|
34
|
+
commitSelections: y,
|
|
35
|
+
restoreCommittedState: C
|
|
36
|
+
} = U(), _ = () => {
|
|
37
|
+
y(), s && s({
|
|
38
|
+
selectedToolkits: Array.from(k.keys()),
|
|
39
|
+
selectedTools: Array.from(n.keys())
|
|
40
40
|
}), r(!1);
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */ e(
|
|
43
|
-
|
|
42
|
+
return /* @__PURE__ */ e(P, { children: /* @__PURE__ */ t(
|
|
43
|
+
S,
|
|
44
44
|
{
|
|
45
45
|
onOpenChange: (l) => {
|
|
46
|
-
r(l), l && (
|
|
46
|
+
r(l), l && (C(), T(), d("toolkits"));
|
|
47
47
|
},
|
|
48
|
-
open:
|
|
48
|
+
open: b,
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(z, { asChild: !0, children: u }),
|
|
51
51
|
/* @__PURE__ */ t(
|
|
52
|
-
|
|
52
|
+
D,
|
|
53
53
|
{
|
|
54
54
|
className: "flex max-h-[80vh] min-h-80 w-[95vw] max-w-xl flex-col gap-2 p-0 sm:max-w-2xl md:max-w-3xl lg:max-w-4xl xl:max-w-5xl 2xl:max-w-7xl",
|
|
55
55
|
"data-testid": "toolkit-picker-dialog",
|
|
56
56
|
showCloseButton: !1,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */ t(
|
|
58
|
+
/* @__PURE__ */ t(j, { className: "shrink-0 p-4 pb-0 sm:p-6 sm:pb-0", children: [
|
|
59
59
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
60
60
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
61
61
|
/* @__PURE__ */ t("div", { className: "relative flex size-10 items-center justify-center overflow-hidden rounded-xl shadow-lg ring-1 ring-black/5 sm:size-12", children: [
|
|
@@ -73,97 +73,111 @@ const J = /Mac/i, xe = (p) => {
|
|
|
73
73
|
className: "pointer-events-none absolute inset-0 z-10 bg-[repeating-conic-gradient(from_0deg_at_100%_0%,rgba(0,0,0,0.25)_0deg_1deg,transparent_1deg_12deg)] opacity-30"
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */ e("span", { className: "relative z-20", children: /* @__PURE__ */ e(
|
|
76
|
+
/* @__PURE__ */ e("span", { className: "relative z-20", children: /* @__PURE__ */ e(M, { className: "size-5 sm:size-7" }) })
|
|
77
77
|
] }),
|
|
78
78
|
/* @__PURE__ */ t("div", { className: "ml-1 text-left", children: [
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
-
/* @__PURE__ */ e(
|
|
79
|
+
/* @__PURE__ */ e(A, { className: "font-bold text-lg sm:text-xl", children: "Choose Your Tools" }),
|
|
80
|
+
/* @__PURE__ */ e(R, { className: "hidden sm:block", children: g })
|
|
81
81
|
] })
|
|
82
82
|
] }),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
84
|
-
|
|
83
|
+
/* @__PURE__ */ e(c, { asChild: !0, children: /* @__PURE__ */ e(
|
|
84
|
+
m,
|
|
85
85
|
{
|
|
86
86
|
className: "h-8 w-8 rounded-full p-0",
|
|
87
87
|
"data-testid": "toolkit-picker-close",
|
|
88
88
|
size: "sm",
|
|
89
89
|
variant: "ghost",
|
|
90
|
-
children: /* @__PURE__ */ e(
|
|
90
|
+
children: /* @__PURE__ */ e(H, { className: "h-4 w-4" })
|
|
91
91
|
}
|
|
92
92
|
) })
|
|
93
93
|
] }),
|
|
94
|
-
/* @__PURE__ */ e("div", { className: "mb-2 space-y-2 pt-2 sm:space-y-4 sm:pt-4", children: /* @__PURE__ */ e(
|
|
94
|
+
/* @__PURE__ */ e("div", { className: "mb-2 space-y-2 pt-2 sm:space-y-4 sm:pt-4", children: /* @__PURE__ */ e($, {}) })
|
|
95
95
|
] }),
|
|
96
96
|
/* @__PURE__ */ t(
|
|
97
|
-
|
|
97
|
+
F,
|
|
98
98
|
{
|
|
99
99
|
className: "flex min-h-0 flex-1 flex-col gap-0.5",
|
|
100
|
-
onValueChange: (l) =>
|
|
101
|
-
value:
|
|
100
|
+
onValueChange: (l) => d(l),
|
|
101
|
+
value: v,
|
|
102
102
|
children: [
|
|
103
103
|
/* @__PURE__ */ t("div", { className: "shrink-0 space-y-2 px-4 sm:space-y-3 sm:px-6", children: [
|
|
104
104
|
/* @__PURE__ */ t("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
105
|
-
/* @__PURE__ */ t(
|
|
105
|
+
/* @__PURE__ */ t(L, { className: "h-10 w-auto gap-1 rounded-md border border-neutral-200 bg-white/60 p-1 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/60", children: [
|
|
106
106
|
/* @__PURE__ */ t(
|
|
107
|
-
|
|
107
|
+
p,
|
|
108
108
|
{
|
|
109
109
|
className: "h-8 rounded-md px-3 font-medium text-neutral-600 text-sm hover:bg-black/5 data-[state=active]:bg-white data-[state=active]:text-neutral-900 dark:text-neutral-300 dark:data-[state=active]:bg-neutral-800 dark:data-[state=active]:text-white dark:hover:bg-white/10",
|
|
110
110
|
"data-testid": "toolkits-tab",
|
|
111
111
|
value: "toolkits",
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */ e(
|
|
113
|
+
/* @__PURE__ */ e(I, { className: "h-4 w-4" }),
|
|
114
114
|
/* @__PURE__ */ e("span", { children: "Toolkits" }),
|
|
115
|
-
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children:
|
|
115
|
+
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: N.size })
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
119
|
/* @__PURE__ */ t(
|
|
120
|
-
|
|
120
|
+
p,
|
|
121
121
|
{
|
|
122
122
|
className: "h-8 rounded-md px-3 font-medium text-neutral-600 text-sm hover:bg-black/5 data-[state=active]:bg-white data-[state=active]:text-neutral-900 dark:text-neutral-300 dark:data-[state=active]:bg-neutral-800 dark:data-[state=active]:text-white dark:hover:bg-white/10",
|
|
123
123
|
"data-testid": "tools-tab",
|
|
124
124
|
value: "tools",
|
|
125
125
|
children: [
|
|
126
|
-
/* @__PURE__ */ e(
|
|
126
|
+
/* @__PURE__ */ e(O, { className: "h-4 w-4" }),
|
|
127
127
|
/* @__PURE__ */ e("span", { children: "Tools" }),
|
|
128
|
-
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children:
|
|
128
|
+
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: w.size })
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
)
|
|
132
132
|
] }),
|
|
133
|
-
/* @__PURE__ */ e(
|
|
133
|
+
/* @__PURE__ */ e(V, { selectionMode: a })
|
|
134
134
|
] }),
|
|
135
|
-
/* @__PURE__ */ e(
|
|
135
|
+
/* @__PURE__ */ e(W, {})
|
|
136
136
|
] }),
|
|
137
137
|
/* @__PURE__ */ e(
|
|
138
|
-
|
|
138
|
+
h,
|
|
139
139
|
{
|
|
140
140
|
className: "min-h-0 flex-1 overflow-y-auto px-4 py-2 sm:px-6",
|
|
141
141
|
"data-testid": "content-area",
|
|
142
|
+
ref: i,
|
|
142
143
|
value: "toolkits",
|
|
143
|
-
children: /* @__PURE__ */ e(
|
|
144
|
+
children: /* @__PURE__ */ e(
|
|
145
|
+
J,
|
|
146
|
+
{
|
|
147
|
+
scrollContainerRef: i,
|
|
148
|
+
selectionMode: a
|
|
149
|
+
}
|
|
150
|
+
)
|
|
144
151
|
}
|
|
145
152
|
),
|
|
146
153
|
/* @__PURE__ */ e(
|
|
147
|
-
|
|
154
|
+
h,
|
|
148
155
|
{
|
|
149
156
|
className: "min-h-0 flex-1 overflow-y-auto px-4 py-2 sm:px-6",
|
|
150
157
|
"data-testid": "content-area",
|
|
158
|
+
ref: o,
|
|
151
159
|
value: "tools",
|
|
152
|
-
children: /* @__PURE__ */ e(
|
|
160
|
+
children: /* @__PURE__ */ e(
|
|
161
|
+
K,
|
|
162
|
+
{
|
|
163
|
+
scrollContainerRef: o,
|
|
164
|
+
selectionMode: a
|
|
165
|
+
}
|
|
166
|
+
)
|
|
153
167
|
}
|
|
154
168
|
)
|
|
155
169
|
]
|
|
156
170
|
}
|
|
157
171
|
),
|
|
158
|
-
/* @__PURE__ */ e(
|
|
172
|
+
/* @__PURE__ */ e(B, { className: "shrink-0 border-t bg-white px-4 py-3 sm:px-6 sm:py-4 dark:bg-neutral-950", children: /* @__PURE__ */ t(
|
|
159
173
|
"div",
|
|
160
174
|
{
|
|
161
175
|
className: `${a === "single" ? "sm:justify-end" : "sm:justify-between"} flex w-full flex-col gap-3 sm:flex-row sm:items-center`,
|
|
162
176
|
children: [
|
|
163
|
-
a === "multi" && /* @__PURE__ */ e(
|
|
177
|
+
a === "multi" && /* @__PURE__ */ e(Y, {}),
|
|
164
178
|
/* @__PURE__ */ t("div", { className: "mt-2 flex gap-2 sm:mt-0 sm:gap-2", children: [
|
|
165
|
-
/* @__PURE__ */ e(
|
|
166
|
-
|
|
179
|
+
/* @__PURE__ */ e(c, { asChild: !0, children: /* @__PURE__ */ e(
|
|
180
|
+
m,
|
|
167
181
|
{
|
|
168
182
|
className: "flex-1 sm:flex-none",
|
|
169
183
|
"data-testid": "cancel-button",
|
|
@@ -172,20 +186,20 @@ const J = /Mac/i, xe = (p) => {
|
|
|
172
186
|
children: "Cancel"
|
|
173
187
|
}
|
|
174
188
|
) }),
|
|
175
|
-
/* @__PURE__ */ t(
|
|
176
|
-
/* @__PURE__ */ e(
|
|
177
|
-
|
|
189
|
+
/* @__PURE__ */ t(E, { delayDuration: 350, children: [
|
|
190
|
+
/* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
191
|
+
q,
|
|
178
192
|
{
|
|
179
193
|
className: "flex-1 sm:flex-none",
|
|
180
|
-
onCommit:
|
|
181
|
-
selectedCount:
|
|
194
|
+
onCommit: _,
|
|
195
|
+
selectedCount: n.size,
|
|
182
196
|
selectionMode: a
|
|
183
197
|
}
|
|
184
198
|
) }) }),
|
|
185
|
-
/* @__PURE__ */ e(
|
|
199
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
186
200
|
/* @__PURE__ */ e("span", { children: "Submit selection" }),
|
|
187
201
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
188
|
-
/* @__PURE__ */ e("kbd", { className: "inline-flex h-4 items-center rounded border bg-muted px-1 font-mono text-[10px]", children: typeof window < "u" &&
|
|
202
|
+
/* @__PURE__ */ e("kbd", { className: "inline-flex h-4 items-center rounded border bg-muted px-1 font-mono text-[10px]", children: typeof window < "u" && Z.test(navigator.userAgent) ? "⌘" : "Ctrl" }),
|
|
189
203
|
/* @__PURE__ */ e("span", { className: "text-xs", children: "+" }),
|
|
190
204
|
/* @__PURE__ */ e("kbd", { className: "inline-flex h-4 items-center rounded border bg-muted px-1 font-mono text-[10px]", children: "↵" })
|
|
191
205
|
] })
|
|
@@ -203,5 +217,5 @@ const J = /Mac/i, xe = (p) => {
|
|
|
203
217
|
) });
|
|
204
218
|
};
|
|
205
219
|
export {
|
|
206
|
-
|
|
220
|
+
ue as ToolkitPickerDialog
|
|
207
221
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-columns.d.ts","sourceRoot":"","sources":["../../lib/hooks/use-columns.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAmCnC"}
|