@arcadeai/design-system 3.27.0 → 3.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/calendar-w1IATMME.js +3042 -0
- package/dist/components/index.js +442 -435
- 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/index.d.ts +2 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +427 -422
- 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 +442 -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 +6 -5
- 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 +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +15 -14
- 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 +10 -9
- 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 +109 -57
- 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 +74 -69
- 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/main.js +476 -469
- package/dist/{toolkit-card-CsV6xoOG.js → toolkit-card-Qou74oWg.js} +4 -2
- package/package.json +7 -2
|
@@ -1,96 +1,101 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { VirtualizedGrid as c } from "../../../atoms/virtualized-grid.js";
|
|
3
|
+
import "../../../molecules/date-time-picker.js";
|
|
4
|
+
import { EmptyState as _ } from "../../../molecules/empty-state.js";
|
|
5
|
+
import "../../../../../toolkit-card-Qou74oWg.js";
|
|
6
|
+
import { ToolCard as k } from "../../../molecules/tool-card.js";
|
|
7
|
+
import { getToolkitIcon as T } from "../../../../../metadata/toolkit-icons.js";
|
|
6
8
|
import "lucide-react";
|
|
7
|
-
import { useToolkitPicker as
|
|
9
|
+
import { useToolkitPicker as N } from "../hooks/use-toolkit-picker.js";
|
|
8
10
|
import "../../../atoms/mobile-tooltip.js";
|
|
11
|
+
import "react";
|
|
9
12
|
import "../../../atoms/chart.js";
|
|
10
13
|
import "../../../../../react-resizable-panels.browser-31wAXhAV.js";
|
|
11
14
|
import "../../../atoms/sidebar.js";
|
|
12
|
-
import "
|
|
13
|
-
|
|
15
|
+
import { useColumns as q } from "../../../../../hooks/use-columns.js";
|
|
16
|
+
const f = 136;
|
|
17
|
+
function K({
|
|
18
|
+
selectionMode: p,
|
|
19
|
+
scrollContainerRef: s
|
|
20
|
+
}) {
|
|
14
21
|
const {
|
|
15
|
-
state: { filteredTools:
|
|
16
|
-
toggleTool:
|
|
17
|
-
} =
|
|
18
|
-
if (
|
|
22
|
+
state: { filteredTools: o, filteredToolkits: u, selectedTools: i },
|
|
23
|
+
toggleTool: g
|
|
24
|
+
} = N(), d = q();
|
|
25
|
+
if (o.size === 0)
|
|
19
26
|
return /* @__PURE__ */ t(
|
|
20
|
-
|
|
27
|
+
_,
|
|
21
28
|
{
|
|
22
29
|
"data-testid": "empty-tools",
|
|
23
30
|
description: "Try a different search term",
|
|
24
31
|
title: "No tools found"
|
|
25
32
|
}
|
|
26
33
|
);
|
|
27
|
-
const
|
|
28
|
-
(e) =>
|
|
29
|
-
),
|
|
30
|
-
(e) => !
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const m = Array.from(o), a = m.filter(
|
|
35
|
+
(e) => i.has(e.fully_qualified_name)
|
|
36
|
+
), r = m.filter(
|
|
37
|
+
(e) => !i.has(e.fully_qualified_name)
|
|
38
|
+
), x = new Map(
|
|
39
|
+
Array.from(u).map((e) => [e.name, e])
|
|
40
|
+
), n = (e) => {
|
|
41
|
+
const h = x.get(e.toolkit.name), y = T(h?.metadata?.id);
|
|
42
|
+
return /* @__PURE__ */ t(
|
|
43
|
+
k,
|
|
44
|
+
{
|
|
45
|
+
"data-testid": `tool-card-${e.fully_qualified_name}`,
|
|
46
|
+
description: e.description,
|
|
47
|
+
fully_qualified_name: e.fully_qualified_name,
|
|
48
|
+
hideCheckbox: p === "single",
|
|
49
|
+
Icon: y,
|
|
50
|
+
isSelected: i.has(e.fully_qualified_name),
|
|
51
|
+
name: e.name,
|
|
52
|
+
onSelect: () => g(e),
|
|
53
|
+
toolkitName: e.toolkit.name
|
|
54
|
+
},
|
|
55
|
+
e.fully_qualified_name
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ l("div", { className: "space-y-4", "data-testid": "tools-grid", children: [
|
|
59
|
+
a.length > 0 && /* @__PURE__ */ l("div", { className: "space-y-3", "data-testid": "selected-tools-section", children: [
|
|
60
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
|
|
35
61
|
/* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "Selected" }),
|
|
36
|
-
/* @__PURE__ */ t("span", { className: "rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-600 dark:text-emerald-200", children:
|
|
62
|
+
/* @__PURE__ */ t("span", { className: "rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-600 dark:text-emerald-200", children: a.length })
|
|
37
63
|
] }),
|
|
38
64
|
/* @__PURE__ */ t(
|
|
39
|
-
|
|
65
|
+
c,
|
|
40
66
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
"data-testid": `tool-card-${e.fully_qualified_name}`,
|
|
51
|
-
description: e.description,
|
|
52
|
-
fully_qualified_name: e.fully_qualified_name,
|
|
53
|
-
hideCheckbox: n === "single",
|
|
54
|
-
Icon: s,
|
|
55
|
-
isSelected: l.has(e.fully_qualified_name),
|
|
56
|
-
name: e.name,
|
|
57
|
-
onSelect: () => c(e),
|
|
58
|
-
toolkitName: e.toolkit.name
|
|
59
|
-
},
|
|
60
|
-
e.fully_qualified_name
|
|
61
|
-
);
|
|
62
|
-
})
|
|
67
|
+
columns: d,
|
|
68
|
+
estimateRowSize: f,
|
|
69
|
+
getItemKey: (e) => e.fully_qualified_name,
|
|
70
|
+
gridClassName: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
71
|
+
items: a,
|
|
72
|
+
parentRef: s,
|
|
73
|
+
renderItem: n,
|
|
74
|
+
rowGapPx: 12
|
|
63
75
|
}
|
|
64
76
|
)
|
|
65
77
|
] }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
78
|
+
r.length > 0 && /* @__PURE__ */ l("div", { className: "space-y-3", children: [
|
|
79
|
+
a.length > 0 && /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
|
|
68
80
|
/* @__PURE__ */ t("h3", { className: "font-semibold text-neutral-700 text-sm dark:text-neutral-200", children: "All tools" }),
|
|
69
|
-
/* @__PURE__ */ t("span", { className: "rounded-full bg-neutral-200 px-1.5 py-0.5 text-neutral-800 text-xs dark:bg-neutral-800 dark:text-neutral-200", children:
|
|
81
|
+
/* @__PURE__ */ t("span", { className: "rounded-full bg-neutral-200 px-1.5 py-0.5 text-neutral-800 text-xs dark:bg-neutral-800 dark:text-neutral-200", children: r.length })
|
|
70
82
|
] }),
|
|
71
|
-
/* @__PURE__ */ t(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
name: e.name,
|
|
85
|
-
onSelect: () => c(e),
|
|
86
|
-
toolkitName: e.toolkit.name
|
|
87
|
-
},
|
|
88
|
-
e.fully_qualified_name
|
|
89
|
-
);
|
|
90
|
-
}) })
|
|
83
|
+
/* @__PURE__ */ t(
|
|
84
|
+
c,
|
|
85
|
+
{
|
|
86
|
+
columns: d,
|
|
87
|
+
estimateRowSize: f,
|
|
88
|
+
getItemKey: (e) => e.fully_qualified_name,
|
|
89
|
+
gridClassName: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
90
|
+
items: r,
|
|
91
|
+
parentRef: s,
|
|
92
|
+
renderItem: n,
|
|
93
|
+
rowGapPx: 12
|
|
94
|
+
}
|
|
95
|
+
)
|
|
91
96
|
] })
|
|
92
97
|
] });
|
|
93
98
|
}
|
|
94
99
|
export {
|
|
95
|
-
|
|
100
|
+
K as ToolsList
|
|
96
101
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Featured toolkit names for the toolkit picker.
|
|
3
|
+
* These appear in a highlighted "Featured Toolkits" section when not searching.
|
|
4
|
+
* Matching is case-insensitive.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FEATURED_TOOLKITS: readonly ["Gmail", "GoogleCalendar", "GoogleDocs", "Github", "Slack", "Jira"];
|
|
7
|
+
export type FeaturedToolkit = (typeof FEATURED_TOOLKITS)[number];
|
|
8
|
+
//# sourceMappingURL=featured-toolkits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featured-toolkits.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,+EAOpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -15,19 +15,21 @@ export type UseToolkitPickerProps = {
|
|
|
15
15
|
export type ToolkitPickerTab = "toolkits" | "tools";
|
|
16
16
|
export type ToolkitSelectionMap = Map<string, ProcessedToolkit>;
|
|
17
17
|
export type ToolSelectionMap = Map<string, boolean>;
|
|
18
|
-
type
|
|
19
|
-
toolkitCollection?: ToolkitCollection;
|
|
18
|
+
type ReducerState = {
|
|
20
19
|
selectionMode: SelectionMode;
|
|
21
20
|
selectedToolkits: ToolkitSelectionMap;
|
|
22
21
|
selectedTools: ToolSelectionMap;
|
|
23
22
|
committedToolkits: ToolkitSelectionMap;
|
|
24
23
|
committedTools: ToolSelectionMap;
|
|
25
|
-
filteredToolkits: Set<ProcessedToolkit>;
|
|
26
|
-
filteredTools: Set<ProcessedTool>;
|
|
27
24
|
searchQuery: string;
|
|
28
25
|
toolkitFilter: string;
|
|
29
26
|
activeTab: ToolkitPickerTab;
|
|
30
27
|
};
|
|
28
|
+
type UseToolkitPickerState = ReducerState & {
|
|
29
|
+
toolkitCollection?: ToolkitCollection;
|
|
30
|
+
filteredToolkits: Set<ProcessedToolkit>;
|
|
31
|
+
filteredTools: Set<ProcessedTool>;
|
|
32
|
+
};
|
|
31
33
|
type ToolkitPickerContextType = {
|
|
32
34
|
state: UseToolkitPickerState;
|
|
33
35
|
toggleToolkit: (toolkit: ProcessedToolkit) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toolkit-picker.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAElG,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"use-toolkit-picker.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAElG,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