@orion-ds/react 4.2.3 → 4.2.4
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/components/Accordion/Accordion.module.css +1 -0
- package/dist/components/ActivityFeed/ActivityFeed.module.css +1 -0
- package/dist/components/AgentCard/AgentCard.module.css +1 -0
- package/dist/components/Alert/Alert.module.css +1 -0
- package/dist/components/AlertDialog/AlertDialog.module.css +1 -0
- package/dist/components/Avatar/Avatar.module.css +1 -0
- package/dist/components/Badge/Badge.module.css +1 -0
- package/dist/components/Banner/Banner.module.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.css +1 -0
- package/dist/components/Button/Button.module.css +1 -0
- package/dist/components/Calendar/Calendar.module.css +1 -0
- package/dist/components/Card/Card.module.css +1 -0
- package/dist/components/Carousel/Carousel.module.css +1 -0
- package/dist/components/Chart/Chart.module.css +1 -0
- package/dist/components/Chat/Chat.module.css +1 -0
- package/dist/components/Checkbox/Checkbox.module.css +1 -0
- package/dist/components/Chip/Chip.module.css +1 -0
- package/dist/components/CodeEditor/CodeEditor.module.css +1 -0
- package/dist/components/Collapsible/Collapsible.module.css +1 -0
- package/dist/components/CollapsibleFolder/CollapsibleFolder.module.css +1 -0
- package/dist/components/Combobox/Combobox.module.css +1 -0
- package/dist/components/Command/Command.module.css +1 -0
- package/dist/components/CommandBar/CommandBar.module.css +1 -0
- package/dist/components/DataTable/DataTable.module.css +1 -0
- package/dist/components/DatePicker/DatePicker.module.css +1 -0
- package/dist/components/DetailPanel/DetailPanel.module.css +1 -0
- package/dist/components/Divider/Divider.module.css +1 -0
- package/dist/components/Drawer/Drawer.module.css +1 -0
- package/dist/components/Dropdown/Dropdown.module.css +1 -0
- package/dist/components/EmptyState/EmptyState.module.css +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.module.css +1 -0
- package/dist/components/Field/Field.module.css +1 -0
- package/dist/components/FileUploader/FileUploader.module.css +1 -0
- package/dist/components/FilterBar/FilterBar.module.css +1 -0
- package/dist/components/FormSection/FormSection.module.css +1 -0
- package/dist/components/Icon/Icon.module.css +1 -0
- package/dist/components/IconGallery/IconGallery.module.css +1 -0
- package/dist/components/InputOTP/InputOTP.module.css +1 -0
- package/dist/components/KanbanBoard/KanbanBoard.module.css +1 -0
- package/dist/components/Link/Link.module.css +1 -0
- package/dist/components/List/List.module.css +1 -0
- package/dist/components/MetricCards/MetricCards.module.css +1 -0
- package/dist/components/Modal/Modal.module.css +1 -0
- package/dist/components/NavTree/NavTree.module.css +1 -0
- package/dist/components/Navbar/Navbar.module.css +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.module.css +1 -0
- package/dist/components/PageHeader/PageHeader.module.css +1 -0
- package/dist/components/Pagination/Pagination.module.css +1 -0
- package/dist/components/Popover/Popover.module.css +1 -0
- package/dist/components/ProgressBar/ProgressBar.module.css +1 -0
- package/dist/components/QuickActions/QuickActions.module.css +1 -0
- package/dist/components/Radio/Radio.module.css +1 -0
- package/dist/components/SearchInput/SearchInput.module.css +1 -0
- package/dist/components/Select/Select.module.css +1 -0
- package/dist/components/Sidebar/Sidebar.module.css +1 -0
- package/dist/components/Skeleton/Skeleton.module.css +1 -0
- package/dist/components/Slider/Slider.module.css +1 -0
- package/dist/components/Spinner/Spinner.module.css +1 -0
- package/dist/components/Stepper/Stepper.module.css +1 -0
- package/dist/components/Switch/Switch.module.css +1 -0
- package/dist/components/Table/Table.module.css +1 -0
- package/dist/components/Tabs/Tabs.module.css +1 -0
- package/dist/components/Textarea/Textarea.module.css +1 -0
- package/dist/components/Toast/Toast.module.css +1 -0
- package/dist/components/Toggle/Toggle.module.css +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.module.css +1 -0
- package/dist/components/Tooltip/Tooltip.module.css +1 -0
- package/dist/components/UserMenu/UserMenu.module.css +1 -0
- package/dist/components/WorkspaceSwitcher/WorkspaceSwitcher.module.css +1 -0
- package/dist/index10.cjs +1 -1
- package/dist/index10.mjs +1 -1
- package/dist/index100.cjs +1 -1
- package/dist/index100.mjs +30 -20
- package/dist/index101.cjs +1 -1
- package/dist/index101.mjs +40 -42
- package/dist/index102.cjs +1 -1
- package/dist/index102.mjs +44 -60
- package/dist/index103.cjs +1 -1
- package/dist/index103.mjs +24 -30
- package/dist/index104.cjs +1 -1
- package/dist/index104.mjs +12 -36
- package/dist/index105.cjs +1 -1
- package/dist/index105.mjs +44 -30
- package/dist/index106.cjs +1 -1
- package/dist/index106.mjs +22 -45
- package/dist/index107.cjs +1 -1
- package/dist/index107.mjs +38 -18
- package/dist/index108.cjs +1 -1
- package/dist/index108.mjs +14 -30
- package/dist/index109.cjs +1 -1
- package/dist/index109.mjs +18 -14
- package/dist/index11.cjs +1 -1
- package/dist/index11.mjs +1 -1
- package/dist/index110.cjs +1 -1
- package/dist/index110.mjs +27 -45
- package/dist/index111.cjs +1 -1
- package/dist/index111.mjs +30 -24
- package/dist/index112.cjs +1 -1
- package/dist/index112.mjs +52 -46
- package/dist/index113.cjs +1 -1
- package/dist/index113.mjs +37 -43
- package/dist/index114.cjs +1 -1
- package/dist/index114.mjs +28 -18
- package/dist/index115.cjs +1 -1
- package/dist/index115.mjs +40 -22
- package/dist/index116.cjs +1 -1
- package/dist/index116.mjs +46 -33
- package/dist/index117.cjs +1 -1
- package/dist/index117.mjs +28 -20
- package/dist/index118.cjs +1 -1
- package/dist/index118.mjs +22 -32
- package/dist/index119.cjs +1 -1
- package/dist/index119.mjs +28 -52
- package/dist/index12.cjs +1 -1
- package/dist/index12.mjs +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.mjs +62 -20
- package/dist/index121.cjs +1 -1
- package/dist/index121.mjs +32 -18
- package/dist/index122.cjs +1 -1
- package/dist/index122.mjs +45 -32
- package/dist/index123.cjs +1 -1
- package/dist/index123.mjs +28 -30
- package/dist/index124.cjs +1 -1
- package/dist/index124.mjs +33 -24
- package/dist/index125.cjs +1 -1
- package/dist/index125.mjs +38 -28
- package/dist/index126.cjs +1 -1
- package/dist/index126.mjs +32 -38
- package/dist/index127.cjs +1 -1
- package/dist/index127.mjs +42 -38
- package/dist/index128.cjs +1 -1
- package/dist/index128.mjs +40 -40
- package/dist/index129.cjs +1 -1
- package/dist/index129.mjs +30 -40
- package/dist/index13.cjs +1 -1
- package/dist/index13.mjs +1 -1
- package/dist/index130.cjs +1 -1
- package/dist/index130.mjs +62 -36
- package/dist/index131.cjs +1 -1
- package/dist/index131.mjs +106 -44
- package/dist/index132.cjs +1 -1
- package/dist/index132.mjs +57 -16
- package/dist/index133.cjs +1 -1
- package/dist/index133.mjs +24 -28
- package/dist/index134.cjs +1 -1
- package/dist/index134.mjs +30 -22
- package/dist/index135.cjs +1 -1
- package/dist/index135.mjs +18 -28
- package/dist/index136.cjs +1 -1
- package/dist/index136.mjs +52 -55
- package/dist/index137.cjs +1 -1
- package/dist/index137.mjs +30 -56
- package/dist/index138.cjs +1 -1
- package/dist/index138.mjs +28 -33
- package/dist/index139.cjs +1 -1
- package/dist/index139.mjs +42 -46
- package/dist/index14.cjs +1 -1
- package/dist/index14.mjs +1 -1
- package/dist/index140.cjs +1 -1
- package/dist/index140.mjs +19 -37
- package/dist/index141.cjs +1 -1
- package/dist/index141.mjs +44 -28
- package/dist/index142.cjs +1 -1
- package/dist/index142.mjs +65 -67
- package/dist/index143.cjs +1 -1
- package/dist/index143.mjs +20 -52
- package/dist/index144.cjs +1 -1
- package/dist/index144.mjs +33 -62
- package/dist/index145.cjs +1 -1
- package/dist/index145.mjs +76 -234
- package/dist/index146.cjs +1 -1
- package/dist/index146.mjs +65 -34
- package/dist/index147.cjs +1 -1
- package/dist/index147.mjs +65 -44
- package/dist/index148.cjs +1 -1
- package/dist/index148.mjs +18 -170
- package/dist/index149.cjs +1 -1
- package/dist/index149.mjs +21 -186
- package/dist/index15.cjs +1 -1
- package/dist/index15.mjs +1 -1
- package/dist/index150.cjs +1 -1
- package/dist/index150.mjs +57 -29
- package/dist/index151.cjs +1 -1
- package/dist/index151.mjs +24 -90
- package/dist/index152.cjs +1 -1
- package/dist/index152.mjs +54 -53
- package/dist/index153.cjs +1 -1
- package/dist/index153.mjs +26 -66
- package/dist/index154.cjs +1 -1
- package/dist/index154.mjs +27 -124
- package/dist/index155.cjs +1 -1
- package/dist/index155.mjs +46 -108
- package/dist/index156.cjs +1 -1
- package/dist/index156.mjs +42 -111
- package/dist/index157.cjs +1 -1
- package/dist/index157.mjs +30 -122
- package/dist/index158.cjs +1 -1
- package/dist/index158.mjs +55 -214
- package/dist/index159.cjs +1 -1
- package/dist/index159.mjs +16 -64
- package/dist/index16.cjs +1 -1
- package/dist/index16.mjs +1 -1
- package/dist/index160.cjs +1 -1
- package/dist/index160.mjs +12 -57
- package/dist/index161.cjs +1 -1
- package/dist/index161.mjs +50 -27
- package/dist/index162.cjs +1 -1
- package/dist/index162.mjs +20 -28
- package/dist/index163.cjs +1 -1
- package/dist/index163.mjs +33 -18
- package/dist/index164.cjs +1 -1
- package/dist/index164.mjs +36 -24
- package/dist/index165.cjs +1 -1
- package/dist/index165.mjs +67 -50
- package/dist/index166.cjs +1 -1
- package/dist/index166.mjs +28 -64
- package/dist/index167.cjs +1 -1
- package/dist/index167.mjs +16 -31
- package/dist/index168.cjs +1 -1
- package/dist/index168.mjs +234 -30
- package/dist/index169.cjs +1 -1
- package/dist/index169.mjs +34 -43
- package/dist/index17.cjs +1 -1
- package/dist/index17.mjs +1 -1
- package/dist/index170.cjs +1 -1
- package/dist/index170.mjs +44 -13
- package/dist/index171.cjs +1 -1
- package/dist/index171.mjs +170 -44
- package/dist/index172.cjs +1 -1
- package/dist/index172.mjs +186 -41
- package/dist/index173.cjs +1 -1
- package/dist/index173.mjs +29 -29
- package/dist/index174.cjs +1 -1
- package/dist/index174.mjs +90 -76
- package/dist/index175.cjs +1 -1
- package/dist/index175.mjs +53 -107
- package/dist/index176.cjs +1 -1
- package/dist/index176.mjs +66 -26
- package/dist/index177.cjs +1 -1
- package/dist/index177.mjs +124 -30
- package/dist/index178.cjs +1 -1
- package/dist/index178.mjs +108 -12
- package/dist/index179.cjs +1 -1
- package/dist/index179.mjs +111 -18
- package/dist/index18.cjs +1 -1
- package/dist/index18.mjs +1 -1
- package/dist/index180.cjs +1 -1
- package/dist/index180.mjs +122 -53
- package/dist/index181.cjs +1 -1
- package/dist/index181.mjs +214 -65
- package/dist/index185.cjs +1 -1
- package/dist/index185.mjs +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.mjs +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.mjs +14 -14
- package/dist/index21.cjs +1 -1
- package/dist/index21.mjs +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.mjs +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.mjs +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.mjs +1 -1
- package/dist/index25.cjs +1 -1
- package/dist/index25.mjs +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.mjs +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.mjs +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.mjs +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.mjs +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.mjs +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.mjs +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.mjs +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.mjs +1 -1
- package/dist/index43.cjs +1 -1
- package/dist/index43.mjs +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.mjs +1 -1
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.mjs +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index5.cjs +1 -1
- package/dist/index5.mjs +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.cjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.cjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.mjs +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.mjs +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.mjs +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.mjs +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.mjs +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.mjs +1 -1
- package/dist/index68.cjs +1 -1
- package/dist/index68.mjs +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.mjs +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.mjs +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.mjs +1 -1
- package/dist/index71.cjs +1 -1
- package/dist/index71.mjs +1 -1
- package/dist/index72.cjs +1 -1
- package/dist/index72.mjs +1 -1
- package/dist/index73.cjs +1 -1
- package/dist/index73.mjs +1 -1
- package/dist/index76.cjs +1 -1
- package/dist/index76.mjs +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.mjs +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.mjs +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.mjs +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.mjs +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.mjs +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.mjs +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.mjs +1 -1
- package/dist/index99.cjs +1 -1
- package/dist/index99.mjs +36 -28
- package/dist/sections/Container/Container.module.css +1 -0
- package/dist/sections/Section/Section.module.css +1 -0
- package/dist/styles/marker.css +1 -0
- package/dist/styles.css +141 -1
- package/package.json +1 -1
- package/dist/react.css +0 -1
package/dist/index181.mjs
CHANGED
|
@@ -1,68 +1,217 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
import { jsxs as l, Fragment as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as D, useRef as Y, useEffect as x, useMemo as S, useCallback as y } from "react";
|
|
3
|
+
import { Plus as A, X as U, Search as $, MessageSquare as T, Trash2 as q } from "lucide-react";
|
|
4
|
+
import e from "./index168.mjs";
|
|
5
|
+
const G = {
|
|
6
|
+
today: "Today",
|
|
7
|
+
yesterday: "Yesterday",
|
|
8
|
+
previous7: "Previous 7 days",
|
|
9
|
+
previous30: "Previous 30 days",
|
|
10
|
+
older: "Older"
|
|
11
|
+
}, N = [
|
|
12
|
+
"today",
|
|
13
|
+
"yesterday",
|
|
14
|
+
"previous7",
|
|
15
|
+
"previous30",
|
|
16
|
+
"older"
|
|
17
|
+
], B = (t) => {
|
|
18
|
+
const a = /* @__PURE__ */ new Date(), d = (new Date(
|
|
19
|
+
a.getFullYear(),
|
|
20
|
+
a.getMonth(),
|
|
21
|
+
a.getDate()
|
|
22
|
+
).getTime() - new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime()) / (1e3 * 60 * 60 * 24);
|
|
23
|
+
return d < 1 ? "today" : d < 2 ? "yesterday" : d < 7 ? "previous7" : d < 30 ? "previous30" : "older";
|
|
24
|
+
}, H = (t) => {
|
|
25
|
+
const a = B(t);
|
|
26
|
+
return a === "today" ? new Intl.DateTimeFormat("en-US", {
|
|
27
|
+
hour: "numeric",
|
|
28
|
+
minute: "2-digit"
|
|
29
|
+
}).format(t) : a === "yesterday" ? "Yesterday" : a === "previous7" ? new Intl.DateTimeFormat("en-US", {
|
|
30
|
+
weekday: "short"
|
|
31
|
+
}).format(t) : new Intl.DateTimeFormat("en-US", {
|
|
32
|
+
month: "short",
|
|
33
|
+
day: "numeric"
|
|
34
|
+
}).format(t);
|
|
35
|
+
}, Q = (t) => {
|
|
36
|
+
const a = /* @__PURE__ */ new Map();
|
|
37
|
+
return N.forEach((o) => a.set(o, [])), t.forEach((o) => {
|
|
38
|
+
const f = B(o.updatedAt);
|
|
39
|
+
a.get(f)?.push(o);
|
|
40
|
+
}), a;
|
|
41
|
+
}, R = ({
|
|
42
|
+
conversations: t = [],
|
|
43
|
+
activeConversationId: a,
|
|
44
|
+
onSelectConversation: o,
|
|
45
|
+
onNewConversation: f,
|
|
46
|
+
onDeleteConversation: d,
|
|
47
|
+
onSearch: g,
|
|
48
|
+
header: j,
|
|
49
|
+
footer: v,
|
|
50
|
+
collapsed: u = !1,
|
|
51
|
+
onCollapsedChange: m,
|
|
52
|
+
className: k,
|
|
53
|
+
...F
|
|
54
|
+
}) => {
|
|
55
|
+
const [h, z] = D(""), [p, b] = D(null), c = Y(
|
|
56
|
+
void 0
|
|
57
|
+
);
|
|
58
|
+
x(() => () => {
|
|
59
|
+
c.current && clearTimeout(c.current);
|
|
60
|
+
}, []);
|
|
61
|
+
const w = S(() => {
|
|
62
|
+
if (!h.trim()) return t;
|
|
63
|
+
const s = h.toLowerCase();
|
|
64
|
+
return t.filter(
|
|
65
|
+
(n) => n.title.toLowerCase().includes(s) || n.preview?.toLowerCase().includes(s)
|
|
66
|
+
);
|
|
67
|
+
}, [t, h]), I = S(() => Q(w), [w]), O = y(
|
|
68
|
+
(s) => {
|
|
69
|
+
const n = s.target.value;
|
|
70
|
+
z(n), g?.(n);
|
|
71
|
+
},
|
|
72
|
+
[g]
|
|
73
|
+
), P = y(
|
|
74
|
+
(s) => {
|
|
75
|
+
o?.(s), u && m && m(!0);
|
|
76
|
+
},
|
|
77
|
+
[o, u, m]
|
|
78
|
+
), E = y(
|
|
79
|
+
(s, n) => {
|
|
80
|
+
s.stopPropagation(), p === n ? (d?.(n), b(null), c.current && clearTimeout(c.current)) : (b(n), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
81
|
+
b(null);
|
|
82
|
+
}, 3e3));
|
|
83
|
+
},
|
|
84
|
+
[p, d]
|
|
85
|
+
), L = N.some(
|
|
86
|
+
(s) => (I.get(s)?.length ?? 0) > 0
|
|
87
|
+
);
|
|
88
|
+
return /* @__PURE__ */ l(C, { children: [
|
|
89
|
+
!u && /* @__PURE__ */ r(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: e.sidebarOverlay,
|
|
93
|
+
onClick: () => m?.(!0),
|
|
94
|
+
"aria-hidden": "true"
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ l(
|
|
98
|
+
"aside",
|
|
99
|
+
{
|
|
100
|
+
className: [
|
|
101
|
+
e.sidebar,
|
|
102
|
+
u && e.sidebarCollapsed,
|
|
103
|
+
!u && e.sidebarOpen,
|
|
104
|
+
k
|
|
105
|
+
].filter(Boolean).join(" "),
|
|
106
|
+
...F,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ r("div", { className: e.sidebarHeader, children: j || /* @__PURE__ */ l(C, { children: [
|
|
109
|
+
/* @__PURE__ */ r(
|
|
110
|
+
"button",
|
|
111
|
+
{
|
|
112
|
+
className: [
|
|
113
|
+
e.inputButton,
|
|
114
|
+
e.inputButtonPrimary,
|
|
115
|
+
e.sidebarNewButton
|
|
116
|
+
].filter(Boolean).join(" "),
|
|
117
|
+
onClick: f,
|
|
118
|
+
"aria-label": "New conversation",
|
|
119
|
+
children: /* @__PURE__ */ l("span", { className: e.sidebarNewButtonInner, children: [
|
|
120
|
+
/* @__PURE__ */ r(A, { size: 18 }),
|
|
121
|
+
/* @__PURE__ */ r("span", { children: "New Chat" })
|
|
122
|
+
] })
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ r(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
className: [e.inputButton, e.sidebarCloseButton].join(
|
|
129
|
+
" "
|
|
130
|
+
),
|
|
131
|
+
onClick: () => m?.(!0),
|
|
132
|
+
"aria-label": "Close sidebar",
|
|
133
|
+
children: /* @__PURE__ */ r(U, { size: 20 })
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] }) }),
|
|
137
|
+
/* @__PURE__ */ r("div", { className: e.sidebarSearch, children: /* @__PURE__ */ l("div", { className: e.sidebarSearchWrapper, children: [
|
|
138
|
+
/* @__PURE__ */ r($, { size: 16, className: e.sidebarSearchIcon }),
|
|
139
|
+
/* @__PURE__ */ r(
|
|
140
|
+
"input",
|
|
141
|
+
{
|
|
142
|
+
type: "search",
|
|
143
|
+
className: [
|
|
144
|
+
e.sidebarSearchInput,
|
|
145
|
+
e.sidebarSearchInputWithIcon
|
|
146
|
+
].join(" "),
|
|
147
|
+
placeholder: "Search conversations...",
|
|
148
|
+
value: h,
|
|
149
|
+
onChange: O,
|
|
150
|
+
"aria-label": "Search conversations"
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] }) }),
|
|
154
|
+
/* @__PURE__ */ r(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
className: e.sidebarList,
|
|
158
|
+
role: "list",
|
|
159
|
+
"aria-label": "Conversations",
|
|
160
|
+
children: L ? N.map((s) => {
|
|
161
|
+
const n = I.get(s) ?? [];
|
|
162
|
+
return n.length === 0 ? null : /* @__PURE__ */ l("div", { children: [
|
|
163
|
+
/* @__PURE__ */ r("div", { className: e.sidebarGroupHeader, children: G[s] }),
|
|
164
|
+
n.map((i) => /* @__PURE__ */ l(
|
|
165
|
+
"button",
|
|
166
|
+
{
|
|
167
|
+
className: [
|
|
168
|
+
e.sidebarItem,
|
|
169
|
+
i.id === a && e.sidebarItemActive
|
|
170
|
+
].filter(Boolean).join(" "),
|
|
171
|
+
onClick: () => P(i.id),
|
|
172
|
+
role: "listitem",
|
|
173
|
+
"aria-selected": i.id === a,
|
|
174
|
+
"aria-label": `Conversation: ${i.title}`,
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ r(
|
|
177
|
+
T,
|
|
178
|
+
{
|
|
179
|
+
size: 18,
|
|
180
|
+
className: e.sidebarItemIcon
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ l("div", { className: e.sidebarItemContent, children: [
|
|
184
|
+
/* @__PURE__ */ r("span", { className: e.sidebarItemTitle, children: i.title }),
|
|
185
|
+
i.preview && /* @__PURE__ */ r("span", { className: e.sidebarItemPreview, children: i.preview })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ r("span", { className: e.sidebarItemDate, children: H(i.updatedAt) }),
|
|
188
|
+
d && /* @__PURE__ */ r(
|
|
189
|
+
"button",
|
|
190
|
+
{
|
|
191
|
+
className: e.sidebarItemDelete,
|
|
192
|
+
onClick: (M) => E(M, i.id),
|
|
193
|
+
"aria-label": p === i.id ? `Confirm delete ${i.title}` : `Delete ${i.title}`,
|
|
194
|
+
children: p === i.id ? /* @__PURE__ */ r("span", { className: e.sidebarItemDeleteConfirm, children: "Delete?" }) : /* @__PURE__ */ r(q, { size: 16 })
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
i.id
|
|
200
|
+
))
|
|
201
|
+
] }, s);
|
|
202
|
+
}) : /* @__PURE__ */ l("div", { className: e.sidebarEmpty, children: [
|
|
203
|
+
/* @__PURE__ */ r(T, { size: 32, className: e.sidebarEmptyIcon }),
|
|
204
|
+
/* @__PURE__ */ r("p", { children: h ? "No conversations found" : "No conversations yet" })
|
|
205
|
+
] })
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
v && /* @__PURE__ */ r("div", { className: e.sidebarFooter, children: v })
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] });
|
|
36
213
|
};
|
|
214
|
+
R.displayName = "ChatSidebar";
|
|
37
215
|
export {
|
|
38
|
-
|
|
39
|
-
t as activityFeed,
|
|
40
|
-
r as actor,
|
|
41
|
-
m as actorName,
|
|
42
|
-
u as avatar,
|
|
43
|
-
I as compact,
|
|
44
|
-
j as connector,
|
|
45
|
-
i as content,
|
|
46
|
-
W as default,
|
|
47
|
-
k as description,
|
|
48
|
-
o as empty,
|
|
49
|
-
n as filters,
|
|
50
|
-
p as header,
|
|
51
|
-
c as iconColumn,
|
|
52
|
-
s as iconWrapper,
|
|
53
|
-
_ as item,
|
|
54
|
-
a as itemCompact,
|
|
55
|
-
e as list,
|
|
56
|
-
V as metadata,
|
|
57
|
-
y as metadataItem,
|
|
58
|
-
C as metadataKey,
|
|
59
|
-
f as metadataValue,
|
|
60
|
-
F as pulse,
|
|
61
|
-
h as skeleton,
|
|
62
|
-
K as skeletonContent,
|
|
63
|
-
T as skeletonDesc,
|
|
64
|
-
D as skeletonIcon,
|
|
65
|
-
N as skeletonTitle,
|
|
66
|
-
d as time,
|
|
67
|
-
l as title
|
|
216
|
+
R as ChatSidebar
|
|
68
217
|
};
|
package/dist/index185.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react"),b=require("lucide-react"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react"),b=require("lucide-react"),i=require("./index168.cjs"),l=({src:s,alt:d="Image",isOpen:a,onClose:t,className:f,...m})=>{const u=n.useRef(null),r=n.useRef(null),c=n.useCallback(e=>{if(e.key==="Escape"){t();return}e.key==="Tab"&&(e.preventDefault(),u.current?.focus())},[t]),g=e=>{e.target===e.currentTarget&&t()};return n.useEffect(()=>(a&&(r.current=document.activeElement,document.addEventListener("keydown",c),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.current?.focus()})),()=>{document.removeEventListener("keydown",c),document.body.style.overflow="",r.current&&typeof r.current.focus=="function"&&r.current.focus()}),[a,c]),a?o.jsxs("div",{className:[i.default.lightbox,f].filter(Boolean).join(" "),onClick:g,role:"dialog","aria-modal":"true","aria-label":"Image viewer",...m,children:[o.jsx("button",{ref:u,className:i.default.lightboxClose,onClick:t,"aria-label":"Close image viewer",children:o.jsx(b.X,{size:24})}),o.jsx("img",{src:s,alt:d,className:i.default.lightboxImage})]}):null};l.displayName="ChatLightbox";exports.ChatLightbox=l;
|
package/dist/index185.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as g, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as c, useCallback as b, useEffect as h } from "react";
|
|
3
3
|
import { X as y } from "lucide-react";
|
|
4
|
-
import l from "./
|
|
4
|
+
import l from "./index168.mjs";
|
|
5
5
|
const v = ({
|
|
6
6
|
src: u,
|
|
7
7
|
alt: s = "Image",
|
package/dist/index19.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),p=require("recharts"),R=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),p=require("recharts"),R=require("./index113.cjs"),t=require("./index114.cjs"),f=h.createContext({}),j=({config:s,children:o,className:a,style:n,...l})=>{const{resolvedConfig:r,resolvedColorVars:i}=R.useResolvedChartColors(s),d=[t.default.container,a].filter(Boolean).join(" ");return e.jsx(f.Provider,{value:r,children:e.jsx("div",{role:"figure",className:d,style:{...i,...n},...l,children:e.jsx(p.ResponsiveContainer,{width:"100%",height:"100%",children:o})})})};j.displayName="ChartContainer";const v=({active:s,payload:o,label:a,indicator:n="dot",hideLabel:l=!1,hideIndicator:r=!1,labelFormatter:i,formatter:d,className:u})=>{const L=h.useContext(f);if(!s||!o?.length)return null;const b=[t.default.tooltip,u].filter(Boolean).join(" "),g=i?i(String(a)):a,T={dot:t.default.tooltipDot,line:t.default.tooltipLine,dashed:t.default.tooltipDashed}[n];return e.jsxs("div",{className:b,children:[!l&&g&&e.jsx("div",{className:t.default.tooltipLabel,children:g}),e.jsx("div",{className:t.default.tooltipItems,children:o.map(c=>{const C=String(c.dataKey||c.name),m=L[C],q=m?.label||C,I=d?d(c.value,C):String(c.value),x=c.color||m?.color;return e.jsxs("div",{className:t.default.tooltipItem,children:[!r&&e.jsx("span",{className:T,style:{backgroundColor:x,borderColor:x}}),e.jsx("span",{className:t.default.tooltipName,children:q}),e.jsx("span",{className:t.default.tooltipValue,children:I})]},C)})})]})};v.displayName="ChartTooltipContent";const N=({payload:s,className:o})=>{const a=h.useContext(f);if(!s?.length)return null;const n=[t.default.legend,o].filter(Boolean).join(" ");return e.jsx("div",{className:n,children:s.map(l=>{const r=l.dataKey||l.value,i=a[r],d=i?.label||r,u=l.color||i?.color;return e.jsxs("div",{className:t.default.legendItem,children:[e.jsx("span",{className:t.default.legendDot,style:{backgroundColor:u}}),e.jsx("span",{children:d})]},r)})})};N.displayName="ChartLegendContent";const y=({id:s,color:o,startOpacity:a=.4,endOpacity:n=.05})=>e.jsxs("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:o,stopOpacity:a}),e.jsx("stop",{offset:"95%",stopColor:o,stopOpacity:n})]});y.displayName="ChartGradient";const S=p.Tooltip,G=p.Legend;exports.ChartContainer=j;exports.ChartGradient=y;exports.ChartLegend=G;exports.ChartLegendContent=N;exports.ChartTooltip=S;exports.ChartTooltipContent=v;
|
package/dist/index19.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as v, createContext as j } from "react";
|
|
3
3
|
import { Legend as I, Tooltip as K, ResponsiveContainer as T } from "recharts";
|
|
4
|
-
import { useResolvedChartColors as B } from "./
|
|
5
|
-
import o from "./
|
|
4
|
+
import { useResolvedChartColors as B } from "./index113.mjs";
|
|
5
|
+
import o from "./index114.mjs";
|
|
6
6
|
const h = j({}), D = ({
|
|
7
7
|
config: n,
|
|
8
8
|
children: e,
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("./index168.cjs"),d=require("./index169.cjs"),h=require("./index170.cjs"),n=require("./index171.cjs"),C=require("./index172.cjs"),c=require("./index173.cjs"),l=require("./index174.cjs"),u=require("./index175.cjs"),p=require("./index176.cjs"),m=require("./index177.cjs"),y=require("./index178.cjs"),g=require("./index179.cjs"),M=require("./index180.cjs"),q=require("./index181.cjs"),a=({children:t,className:r,...i})=>o.jsx("div",{className:[s.default.chat,r].filter(Boolean).join(" "),role:"region","aria-label":"Chat interface",...i,children:t});a.displayName="Chat";const e=a;e.Header=d.ChatHeader;e.Messages=h.ChatMessages;e.Message=n.ChatMessage;e.Input=C.ChatInput;e.TypingIndicator=c.ChatTypingIndicator;e.CodeBlock=l.ChatCodeBlock;e.Markdown=u.ChatMarkdown;e.ImagePreview=p.ChatImagePreview;e.AudioPlayer=m.ChatAudioPlayer;e.VoiceRecorder=y.ChatVoiceRecorder;e.FileUpload=g.ChatFileUpload;e.Attachment=M.ChatAttachment;e.Sidebar=q.ChatSidebar;e.Header.displayName="Chat.Header";e.Messages.displayName="Chat.Messages";e.Message.displayName="Chat.Message";e.Input.displayName="Chat.Input";e.TypingIndicator.displayName="Chat.TypingIndicator";e.CodeBlock.displayName="Chat.CodeBlock";e.Markdown.displayName="Chat.Markdown";e.ImagePreview.displayName="Chat.ImagePreview";e.AudioPlayer.displayName="Chat.AudioPlayer";e.VoiceRecorder.displayName="Chat.VoiceRecorder";e.FileUpload.displayName="Chat.FileUpload";e.Attachment.displayName="Chat.Attachment";e.Sidebar.displayName="Chat.Sidebar";exports.Chat=e;
|
package/dist/index20.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import m from "./
|
|
3
|
-
import { ChatHeader as d } from "./
|
|
4
|
-
import { ChatMessages as p } from "./
|
|
5
|
-
import { ChatMessage as s } from "./
|
|
6
|
-
import { ChatInput as l } from "./
|
|
7
|
-
import { ChatTypingIndicator as h } from "./
|
|
8
|
-
import { ChatCodeBlock as C } from "./
|
|
9
|
-
import { ChatMarkdown as n } from "./
|
|
10
|
-
import { ChatImagePreview as c } from "./
|
|
11
|
-
import { ChatAudioPlayer as y } from "./
|
|
12
|
-
import { ChatVoiceRecorder as f } from "./
|
|
13
|
-
import { ChatFileUpload as g } from "./
|
|
14
|
-
import { ChatAttachment as N } from "./
|
|
15
|
-
import { ChatSidebar as I } from "./
|
|
2
|
+
import m from "./index168.mjs";
|
|
3
|
+
import { ChatHeader as d } from "./index169.mjs";
|
|
4
|
+
import { ChatMessages as p } from "./index170.mjs";
|
|
5
|
+
import { ChatMessage as s } from "./index171.mjs";
|
|
6
|
+
import { ChatInput as l } from "./index172.mjs";
|
|
7
|
+
import { ChatTypingIndicator as h } from "./index173.mjs";
|
|
8
|
+
import { ChatCodeBlock as C } from "./index174.mjs";
|
|
9
|
+
import { ChatMarkdown as n } from "./index175.mjs";
|
|
10
|
+
import { ChatImagePreview as c } from "./index176.mjs";
|
|
11
|
+
import { ChatAudioPlayer as y } from "./index177.mjs";
|
|
12
|
+
import { ChatVoiceRecorder as f } from "./index178.mjs";
|
|
13
|
+
import { ChatFileUpload as g } from "./index179.mjs";
|
|
14
|
+
import { ChatAttachment as N } from "./index180.mjs";
|
|
15
|
+
import { ChatSidebar as I } from "./index181.mjs";
|
|
16
16
|
const e = ({ children: t, className: o, ...r }) => /* @__PURE__ */ i(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),u=require("lucide-react"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),u=require("lucide-react"),s=require("./index111.cjs"),m=t.forwardRef(({label:i,helperText:n,error:a,size:j="md",indeterminate:r=!1,className:k,id:N,disabled:h,required:o,checked:v,"aria-label":f,"aria-describedby":p,...C},y)=>{const R=t.useId(),l=N||`checkbox-${R}`,x=`${l}-error`,b=`${l}-helper`,g=t.useRef(null),d=y||g;t.useEffect(()=>{d.current&&(d.current.indeterminate=r)},[r,d]);const c=[];a&&c.push(x),n&&!a&&c.push(b),p&&c.push(p);const I=c.length>0?c.join(" "):void 0;!(i||f)&&process.env.NODE_ENV==="development"&&console.warn("Checkbox: Missing accessible name. Provide either a `label` prop or `aria-label` for screen reader users.");const q=r?"mixed":void 0,M=[s.default.container,s.default[j],a&&s.default.error,h&&s.default.disabled,k].filter(Boolean).join(" ");return e.jsxs("div",{className:M,children:[e.jsx("input",{ref:d,type:"checkbox",id:l,className:s.default.input,disabled:h,required:o,checked:v,"aria-required":o||void 0,"aria-invalid":a?"true":"false","aria-checked":q,"aria-describedby":I,"aria-label":i?void 0:f,...C}),e.jsxs("label",{htmlFor:l,className:s.default.labelWrapper,children:[e.jsx("span",{className:s.default.checkbox,"aria-hidden":"true",children:e.jsx("span",{className:s.default.checkmark,children:r?e.jsx(u.Minus,{strokeWidth:3}):e.jsx(u.Check,{strokeWidth:3})})}),i&&e.jsxs("span",{className:s.default.label,children:[i,o&&e.jsx("span",{className:s.default.required,"aria-hidden":"true",children:"*"})]})]}),n&&!a&&e.jsx("p",{id:b,className:s.default.helperText,children:n}),a&&e.jsxs("p",{id:x,className:s.default.errorMessage,role:"alert","aria-live":"assertive",children:[e.jsx(u.AlertCircle,{size:14,"aria-hidden":"true"}),e.jsx("span",{children:a})]})]})});m.displayName="Checkbox";exports.Checkbox=m;
|
package/dist/index21.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as A, useId as B, useRef as E, useEffect as M } from "react";
|
|
3
3
|
import { Minus as W, Check as $, AlertCircle as w } from "lucide-react";
|
|
4
|
-
import e from "./
|
|
4
|
+
import e from "./index111.mjs";
|
|
5
5
|
const z = A(
|
|
6
6
|
({
|
|
7
7
|
label: i,
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),w=require("react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),w=require("react"),e=require("./index124.cjs"),u=w.forwardRef(({variant:c="default",size:d="md",icon:i,clickable:f=!1,onClick:s,onRemove:l,disabled:a=!1,selected:o=!1,children:h,className:p,...v},m)=>{const r=f||!!s,j=[e.default.chip,e.default[c],e.default[d],r&&e.default.clickable,o&&e.default.selected,a&&e.default.disabled,p].filter(Boolean).join(" "),k=()=>{!a&&s&&s()},x=t=>{t.stopPropagation(),!a&&l&&l()},y=t=>{a||((t.key==="Enter"||t.key===" ")&&(t.preventDefault(),s?.()),(t.key==="Backspace"||t.key==="Delete")&&(t.preventDefault(),l?.()))};return n.jsxs("div",{ref:m,className:j,role:r?"button":void 0,tabIndex:r&&!a?0:void 0,"aria-disabled":a,"aria-pressed":o,onClick:r?k:void 0,onKeyDown:r?y:void 0,...v,children:[i&&n.jsx("span",{className:e.default.icon,"aria-hidden":"true",children:i}),n.jsx("span",{className:e.default.label,children:h}),l&&n.jsx("button",{type:"button",className:e.default.removeButton,onClick:x,disabled:a,"aria-label":"Remove",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});u.displayName="Chip";exports.Chip=u;
|
package/dist/index22.mjs
CHANGED
package/dist/index23.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),_=require("react-syntax-highlighter"),$=require("react-syntax-highlighter/dist/esm/styles/prism"),l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),_=require("react-syntax-highlighter"),$=require("react-syntax-highlighter/dist/esm/styles/prism"),l=require("./index162.cjs"),z=require("./index75.cjs");try{const r=require("refractor/all");r.default&&r.default.registered&&r.default.registered("markdown")&&!r.default.languages.markdown?.["quoted-string"]&&r.default.languages.insertBefore("markdown","bold",{"quoted-string":{pattern:/"(?:\\.|[^"\\])*"/,greedy:!0,alias:"string"}})}catch{}const A=i.forwardRef(({value:r="",onChange:g,language:j,readOnly:T=!1,showLineNumbers:k=!0,placeholder:C,minRows:m=10,className:B,"aria-label":S,...R},D)=>{const p=i.useRef(null),x=i.useRef(null),v=i.useRef(null),E=i.useRef(null),K=i.useRef(null),u=i.useRef(null),h=D||K,[y,F]=i.useState(0),[d,O]=i.useState([]);let q="dark";try{q=z.useThemeContext().theme}catch{}const P=q==="light"?$.oneLight:$.oneDark,L=Math.max(r.split(`
|
|
2
2
|
`).length,m);i.useEffect(()=>{if(u.current&&h.current){const{start:e,end:t}=u.current;h.current.setSelectionRange(e,t),u.current=null}}),i.useEffect(()=>{const e=v.current,t=E.current;if(!e||!t)return;const n=()=>{const o=t.clientWidth;if(o<=0)return;e.style.width=`${o}px`;const a=r.split(`
|
|
3
3
|
`),f=Math.max(a.length,m),b=[];for(let N=0;N<f;N++){const V=a[N]??"";e.textContent=V||" ",b.push(e.scrollHeight)}O(b)};n();const c=new ResizeObserver(n);return c.observe(t),()=>c.disconnect()},[r,m]),i.useEffect(()=>{const e=n=>{const c=n.target;p.current&&(p.current.scrollTop=c.scrollTop),x.current&&(x.current.scrollTop=c.scrollTop,x.current.scrollLeft=c.scrollLeft)},t=h?.current;if(t)return t.addEventListener("scroll",e),()=>{t.removeEventListener("scroll",e)}},[h]);const w=e=>{const t=e.value.substring(0,e.selectionStart);F(t.split(`
|
|
4
4
|
`).length-1)},H=e=>{if(e.key==="Tab"){e.preventDefault();const t=e.currentTarget,n=t.selectionStart,c=t.selectionEnd,o=" ";if(n===c){const a=r.substring(0,n)+o+r.substring(c);u.current={start:n+o.length,end:n+o.length},g?.(a)}else if(e.shiftKey){const a=r.lastIndexOf(`
|
package/dist/index23.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as k, jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as U, useRef as g, useState as K, useEffect as T } from "react";
|
|
3
3
|
import { Prism as W } from "react-syntax-highlighter";
|
|
4
4
|
import { oneLight as _, oneDark as I } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
5
|
-
import i from "./
|
|
5
|
+
import i from "./index162.mjs";
|
|
6
6
|
import { useThemeContext as G } from "./index75.mjs";
|
|
7
7
|
try {
|
|
8
8
|
const r = require("refractor/all");
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),e=require("react"),p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),e=require("react"),p=require("./index104.cjs"),x=e.createContext(null);function j(){const t=e.useContext(x);if(!t)throw new Error("Collapsible.Trigger/Content must be used within a Collapsible");return t}const I=e.forwardRef(({asChild:t,className:d,children:l,onClick:n,...u},s)=>{const{open:a,disabled:r,toggle:i,contentId:b,triggerId:c}=j(),o=e.useCallback(g=>{i(),n?.(g)},[i,n]);if(t&&e.isValidElement(l))return e.cloneElement(l,{id:c,"aria-expanded":a,"aria-controls":b,disabled:r,onClick:o});const f=[p.default.trigger,d].filter(Boolean).join(" ");return C.jsx("button",{ref:s,id:c,type:"button",className:f,"aria-expanded":a,"aria-controls":b,disabled:r,onClick:o,...u,children:l})});I.displayName="Collapsible.Trigger";const N=e.forwardRef(({forceMount:t,className:d,children:l,...n},u)=>{const{open:s,triggerId:a,contentId:r}=j();if(!t&&!s)return null;const i=[p.default.content,s&&p.default.contentOpen,d].filter(Boolean).join(" ");return C.jsx("div",{ref:u,id:r,role:"region","aria-labelledby":a,className:i,...n,children:C.jsx("div",{className:p.default.contentInner,children:l})})});N.displayName="Collapsible.Content";const v=e.forwardRef(({open:t,defaultOpen:d=!1,onOpenChange:l,disabled:n=!1,className:u,children:s,...a},r)=>{const[i,b]=e.useState(d),c=t!==void 0,o=c?t:i,f=e.useId(),g=e.useId(),y=e.useCallback(()=>{if(n)return;const m=!o;c||b(m),l?.(m)},[o,c,n,l]),w=[p.default.collapsible,u].filter(Boolean).join(" "),R={open:o,disabled:n,toggle:y,contentId:f,triggerId:g};return C.jsx(x.Provider,{value:R,children:C.jsx("div",{ref:r,className:w,"data-state":o?"open":"closed",...a,children:s})})});v.displayName="Collapsible";const O=Object.assign(v,{Trigger:I,Content:N});exports.Collapsible=O;
|
package/dist/index24.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m, useState as B, useId as x, useCallback as I, isValidElement as E, cloneElement as h, createContext as R, useContext as P } from "react";
|
|
3
|
-
import p from "./
|
|
3
|
+
import p from "./index104.mjs";
|
|
4
4
|
const N = R(null);
|
|
5
5
|
function v() {
|
|
6
6
|
const e = P(N);
|
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),le=require("@dnd-kit/core"),g=require("lucide-react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),le=require("@dnd-kit/core"),g=require("lucide-react"),a=require("./index107.cjs"),h=require("./index24.cjs"),ne=require("./index11.cjs"),F=require("./index35.cjs"),R=require("./index14.cjs");function w(E){const{id:u,title:B,itemCount:x,items:r,renderItem:z,itemLabel:O="Item",itemLabelPlural:k="Items",emptyText:A="No items in this folder",sortLabel:v="Sort",defaultExpanded:$=!0,sortOptions:i,selectedSort:M,onSortChange:P,onDrop:D,onFolderEdit:b,onFolderDelete:j,onFolderInvite:N,isDropTarget:Y=!1,isDropCompleted:H=!1,onDragEnter:Z,onDragLeaveFolder:C,className:_,...G}=E,[f,J]=o.useState($),[m,d]=o.useState(null),[T,p]=o.useState(!1),I=o.useRef(null),{setNodeRef:K}=le.useDroppable({id:u}),Q=t=>{if(t.preventDefault(),t.dataTransfer.dropEffect="move",T||(p(!0),Z?.()),!f||r.length===0){d(0);return}const l=I.current;if(!l)return;const n=Array.from(l.querySelectorAll("[data-item-id]")),ae=t.clientY;let S=n.length;for(let c=0;c<n.length;c++){const y=n[c];if(!y)continue;const q=y.getBoundingClientRect();if(ae<q.top+q.height/2){S=c;break}}d(S)},U=t=>{t.currentTarget.contains(t.relatedTarget)||(p(!1),d(null),C?.())},V=t=>{t.preventDefault();const l=t.dataTransfer.getData("text/plain")||t.dataTransfer.getData("itemId");if(l&&D){const n=m??r.length;D(l,u,n)}p(!1),d(null),C?.()},W=(t,l)=>{t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",l)},X=i?.map(t=>({id:t.value,label:t.label,onClick:()=>P?.(t.value)})),L=[...b?[{id:"rename",label:"Rename",onClick:b}]:[],...N?[{id:"invite",label:"Invite participants",onClick:N}]:[],...j?[{id:"delete",label:"Delete folder",danger:!0,onClick:j}]:[]],s=Y||T,ee=[a.default.folder,s&&a.default.dropTarget,H&&a.default.dropCompleted,_].filter(Boolean).join(" "),te=x===1?O:k;return e.jsx("div",{ref:K,className:ee,"data-folder-id":u,"data-drop-active":s,onDragOver:Q,onDragLeave:U,onDrop:V,...G,children:e.jsxs(h.Collapsible,{open:f,onOpenChange:J,children:[e.jsxs("div",{className:a.default.header,children:[e.jsxs(h.Collapsible.Trigger,{className:a.default.trigger,children:[e.jsx(g.ChevronDown,{size:20,className:`${a.default.chevron} ${f?a.default.expanded:""}`}),e.jsx("h2",{className:a.default.title,children:B}),e.jsxs(ne.Badge,{variant:"neutral",className:a.default.badge,children:[x,e.jsxs("span",{className:a.default.badgeLabel,children:[" ",te]})]})]}),e.jsxs("div",{className:a.default.actions,children:[i&&i.length>0&&e.jsx("div",{className:a.default.sortDropdown,children:e.jsx(F.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconRight:e.jsx(g.ChevronDown,{size:16}),"aria-label":`Sort by ${v}`,children:i.find(t=>t.value===M)?.label||v}),items:X,placement:"bottom-end"})}),L.length>0&&e.jsx(F.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconOnly:!0,icon:e.jsx(g.MoreHorizontal,{size:20}),"aria-label":"Folder actions"}),items:L,placement:"bottom-end"})]})]}),e.jsx(h.Collapsible.Content,{children:e.jsx("div",{className:a.default.content,children:r.length===0?s?e.jsx("div",{className:a.default.emptyDropZone,children:e.jsx("div",{className:a.default.insertionLine,role:"presentation"})}):e.jsx("div",{className:a.default.emptyState,children:e.jsx("p",{className:a.default.emptyText,children:A})}):e.jsxs("div",{className:a.default.grid,ref:I,children:[r.map((t,l)=>e.jsxs(o.Fragment,{children:[s&&m===l&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"}),e.jsx("div",{"data-item-id":t.id,draggable:t.draggable,onDragStart:n=>W(n,t.id),children:z(t,l)})]},t.id)),s&&m===r.length&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"})]})})})]})})}w.displayName="CollapsibleFolder";exports.CollapsibleFolder=w;
|
package/dist/index25.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import re, { useState as h, useRef as ne } from "react";
|
|
3
3
|
import { useDroppable as le } from "@dnd-kit/core";
|
|
4
4
|
import { ChevronDown as R, MoreHorizontal as oe } from "lucide-react";
|
|
5
|
-
import t from "./
|
|
5
|
+
import t from "./index107.mjs";
|
|
6
6
|
import { Collapsible as v } from "./index24.mjs";
|
|
7
7
|
import { Badge as ie } from "./index11.mjs";
|
|
8
8
|
import { Dropdown as z } from "./index35.mjs";
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),oe=require("react-dom"),R=require("lucide-react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),oe=require("react-dom"),R=require("lucide-react"),t=require("./index130.cjs"),de=(u,i)=>{const c=i.toLowerCase().trim();return c?u.label.toLowerCase().includes(c)||u.value.toLowerCase().includes(c)||(u.description?.toLowerCase().includes(c)??!1):!0},X=l.forwardRef(({options:u,value:i,onChange:c,onInputChange:P,size:D="md",label:S,helperText:z,error:g,loading:K=!1,clearable:U=!0,allowFreeInput:f=!1,filterFn:B=de,openOnFocus:I=!0,minChars:C=0,emptyText:Y="No results found",renderOption:T,maxHeight:_=300,fullWidth:G=!1,placeholder:V,disabled:w,className:J,id:Q,onFocus:A,onBlur:H,onKeyDown:W,...Z},k)=>{const F=l.useId(),$=Q||F,q=`${$}-listbox`,v=l.useRef(null),N=l.useRef(null),b=l.useRef(null),[r,h]=l.useState(!1),[E,o]=l.useState(""),[d,j]=l.useState(-1),[M,ee]=l.useState({top:0,left:0,width:0}),a=l.useMemo(()=>u.find(e=>e.value===i)??null,[u,i]);l.useEffect(()=>{a?o(a.label):f||o("")},[a,f]);const p=l.useMemo(()=>E.length<C?[]:u.filter(e=>B(e,E)),[u,E,C,B]),x=l.useCallback(()=>{if(!v.current)return;const e=v.current.getBoundingClientRect();ee({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})},[]);l.useEffect(()=>{if(r)return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}},[r,x]),l.useEffect(()=>{if(!r)return;const e=n=>{const m=n.target;v.current&&!v.current.contains(m)&&b.current&&!b.current.contains(m)&&(h(!1),!f&&!i?o(""):a&&o(a.label))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r,f,i,a]);const te=l.useCallback(e=>{const n=e.target.value;o(n),j(-1),P?.(n),!r&&n.length>=C&&h(!0),a&&n!==a.label&&!f&&c?.(null,null)},[r,C,P,a,f,c]),se=l.useCallback(e=>{I&&!w&&h(!0),A?.(e)},[I,w,A]),le=l.useCallback(e=>{setTimeout(()=>{b.current?.contains(document.activeElement)||(h(!1),!f&&!i?o(""):a&&o(a.label))},200),H?.(e)},[f,i,a,H]),O=l.useCallback(e=>{e.disabled||(c?.(e.value,e),o(e.label),h(!1),j(-1),N.current?.focus())},[c]),ne=l.useCallback(e=>{e.stopPropagation(),c?.(null,null),o(""),N.current?.focus()},[c]),ae=l.useCallback(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),r?j(n=>Math.min(n+1,p.length-1)):h(!0);break;case"ArrowUp":e.preventDefault(),j(n=>Math.max(n-1,0));break;case"Enter":e.preventDefault(),r&&d>=0&&p[d]&&O(p[d]);break;case"Escape":e.preventDefault(),h(!1),o(a?a.label:"");break;case"Tab":h(!1);break}W?.(e)},[r,d,p,O,a,W]);l.useEffect(()=>{d>=0&&b.current&&b.current.querySelectorAll('[role="option"]')[d]?.scrollIntoView({block:"nearest"})},[d]);const re=[t.default.container,t.default[D],G&&t.default.fullWidth,w&&t.default.disabled,g&&t.default.error,J].filter(Boolean).join(" "),L=D==="sm"?14:D==="lg"?20:16,ie=(e,n)=>{const m=e.value===i,y=n===d;return T?T(e,m,y):s.jsxs(s.Fragment,{children:[e.icon&&s.jsx("span",{className:t.default.optionIcon,"aria-hidden":"true",children:e.icon}),s.jsxs("div",{className:t.default.optionContent,children:[s.jsx("span",{className:t.default.optionLabel,children:e.label}),e.description&&s.jsx("span",{className:t.default.optionDescription,children:e.description})]}),m&&s.jsx(R.Check,{size:L,className:t.default.checkIcon,"aria-hidden":"true"})]})},ce=s.jsx("div",{ref:b,className:`${t.default.dropdown} ${r&&t.default.visible}`,style:{top:M.top,left:M.left,width:M.width,maxHeight:_},role:"listbox",id:q,"aria-label":S||V,children:K?s.jsxs("div",{className:t.default.loading,children:[s.jsx(R.Loader2,{size:L,className:t.default.spinner}),s.jsx("span",{children:"Loading..."})]}):p.length===0?s.jsx("div",{className:t.default.empty,children:Y}):p.map((e,n)=>{const m=n===d,y=e.value===i;return s.jsx("div",{className:[t.default.option,m&&t.default.highlighted,y&&t.default.selected,e.disabled&&t.default.disabled].filter(Boolean).join(" "),role:"option","aria-selected":y,"aria-disabled":e.disabled,onClick:()=>O(e),onMouseEnter:()=>j(n),children:ie(e,n)},e.value)})});return s.jsxs("div",{className:re,children:[S&&s.jsx("label",{htmlFor:$,className:t.default.label,children:S}),s.jsxs("div",{ref:v,className:t.default.inputWrapper,onClick:()=>N.current?.focus(),children:[s.jsx("input",{...Z,ref:e=>{typeof k=="function"?k(e):k&&(k.current=e),N.current=e},id:$,type:"text",className:t.default.input,value:E,onChange:te,onFocus:se,onBlur:le,onKeyDown:ae,disabled:w,placeholder:V,role:"combobox","aria-expanded":r,"aria-haspopup":"listbox","aria-controls":q,"aria-autocomplete":"list","aria-activedescendant":d>=0?`${q}-option-${d}`:void 0}),s.jsxs("div",{className:t.default.actions,children:[U&&i&&!w&&s.jsx("button",{type:"button",className:t.default.clearButton,onClick:ne,"aria-label":"Clear selection",tabIndex:-1,children:s.jsx(R.X,{size:L})}),s.jsx("span",{className:`${t.default.chevron} ${r?t.default.open:""}`,"aria-hidden":"true",children:s.jsx(R.ChevronDown,{size:L})})]})]}),(z||g)&&s.jsx("span",{className:g?t.default.errorText:t.default.helperText,children:g||z}),r&&oe.createPortal(ce,document.body)]})});X.displayName="Combobox";exports.Combobox=X;
|
package/dist/index26.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as v, Fragment as fe } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as me, useId as he, useRef as M, useState as R, useMemo as Y, useEffect as z, useCallback as h } from "react";
|
|
3
3
|
import { createPortal as pe } from "react-dom";
|
|
4
4
|
import { Loader2 as be, X as we, ChevronDown as ve, Check as ge } from "lucide-react";
|
|
5
|
-
import t from "./
|
|
5
|
+
import t from "./index130.mjs";
|
|
6
6
|
const Ne = (d, l) => {
|
|
7
7
|
const o = l.toLowerCase().trim();
|
|
8
8
|
return o ? d.label.toLowerCase().includes(o) || d.value.toLowerCase().includes(o) || (d.description?.toLowerCase().includes(o) ?? !1) : !0;
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),H=require("react-dom"),K=require("lucide-react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),H=require("react-dom"),K=require("lucide-react"),r=require("./index126.cjs"),U=require("./index33.cjs"),B=s.createContext(null);function S(){const e=s.useContext(B);if(!e)throw new Error("Command compound components must be used within <Command>");return e}const $=(e,t)=>t?e.toLowerCase().includes(t.toLowerCase())?1:0:1,d=({value:e,onValueChange:t,filter:n=$,children:i,className:c,...l})=>{const[C,b]=s.useState(""),[v,p]=s.useState(0),y=s.useRef(new Map),[,j]=s.useState(0),x=s.useId(),m=e!==void 0?e:C,I=s.useCallback(o=>{e!==void 0?t?.(o):b(o),p(0)},[e,t]),N=s.useCallback((o,u)=>{y.current.set(o,u),j(f=>f+1)},[]),w=s.useCallback(o=>{y.current.delete(o),j(u=>u+1)},[]),g=s.useCallback(()=>{const o=[];for(const[u,f]of y.current)n(f,m)>0&&o.push(u);return o},[n,m]),h=s.useMemo(()=>({search:m,setSearch:I,filter:n,activeIndex:v,setActiveIndex:p,registerItem:N,unregisterItem:w,items:y.current,getVisibleItems:g,listId:x}),[m,I,n,v,p,N,w,g,x]),k=s.useRef(null),E=s.useCallback(o=>{const u=g();if(u.length){if(o.key==="ArrowDown")o.preventDefault(),p(f=>(f+1)%u.length);else if(o.key==="ArrowUp")o.preventDefault(),p(f=>(f-1+u.length)%u.length);else if(o.key==="Enter"){o.preventDefault();const f=u[v];f&&k.current?.querySelector(`[data-command-id="${f}"]`)?.click()}}},[g,v,p]),T=[r.default.command,c].filter(Boolean).join(" ");return a.jsx(B.Provider,{value:h,children:a.jsx("div",{ref:k,className:T,onKeyDown:E,...l,children:i})})},R=({className:e,...t})=>{const{search:n,setSearch:i,listId:c}=S(),l=s.useRef(null);s.useEffect(()=>{l.current?.focus()},[]);const C=[r.default.inputWrapper,e].filter(Boolean).join(" ");return a.jsxs("div",{className:C,children:[a.jsx(K.Search,{size:16,className:r.default.searchIcon,"aria-hidden":"true"}),a.jsx("input",{ref:l,className:r.default.input,value:n,onChange:b=>i(b.target.value),type:"text",role:"combobox","aria-expanded":"true","aria-autocomplete":"list","aria-controls":c,...t})]})};R.displayName="Command.Input";const q=({children:e,className:t,...n})=>{const{listId:i}=S(),c=[r.default.list,t].filter(Boolean).join(" ");return a.jsx("div",{id:i,className:c,role:"listbox",...n,children:e})};q.displayName="Command.List";const L=({children:e,className:t})=>{const{getVisibleItems:n}=S();if(n().length>0)return null;const c=[r.default.empty,t].filter(Boolean).join(" ");return a.jsx("div",{className:c,role:"status","aria-live":"polite",children:e})};L.displayName="Command.Empty";const A=({heading:e,children:t,className:n})=>{const i=[r.default.group,n].filter(Boolean).join(" ");return a.jsxs("div",{className:i,role:"group","aria-label":e,children:[e&&a.jsx("div",{className:r.default.groupHeading,children:e}),t]})};A.displayName="Command.Group";let z=0;const V=({onSelect:e,disabled:t=!1,value:n,children:i,className:c,...l})=>{const{filter:C,search:b,activeIndex:v,getVisibleItems:p,registerItem:y,unregisterItem:j}=S(),x=s.useRef("");x.current||(x.current=`cmd-item-${++z}`);const m=x.current,I=n||D(i);s.useEffect(()=>(y(m,I),()=>j(m)),[m,I,y,j]);const N=C(I,b)>0,h=p().indexOf(m)===v,k=()=>{t||e?.()},E=[r.default.item,t&&r.default.itemDisabled,!N&&r.default.itemHidden,c].filter(Boolean).join(" ");return a.jsx("div",{className:E,"data-command-id":m,"data-active":h,role:"option","aria-selected":h,"aria-disabled":t,onClick:k,...l,children:i})};V.displayName="Command.Item";const G=({className:e})=>{const t=[r.default.separator,e].filter(Boolean).join(" ");return a.jsx(U.Divider,{spacing:"none",className:t})};G.displayName="Command.Separator";const M=({children:e,className:t})=>{const n=[r.default.shortcut,t].filter(Boolean).join(" ");return a.jsx("span",{className:n,children:e})};M.displayName="Command.Shortcut";const P=({open:e,onOpenChange:t,children:n,className:i})=>{if(s.useEffect(()=>{if(!e)return;const l=C=>{C.key==="Escape"&&t(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e,t]),s.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const c=l=>{l.target===l.currentTarget&&t(!1)};return H.createPortal(a.jsx("div",{className:r.default.dialogBackdrop,onClick:c,children:a.jsx("div",{className:[r.default.dialogContent,i].filter(Boolean).join(" "),children:a.jsx(d,{children:n})})}),document.body)};P.displayName="Command.Dialog";d.Input=R;d.List=q;d.Empty=L;d.Group=A;d.Item=V;d.Separator=G;d.Shortcut=M;d.Dialog=P;d.displayName="Command";function D(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(D).join(" "):s.isValidElement(e)&&e.props?D(e.props.children):""}exports.Command=d;
|
package/dist/index27.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as R } from "react/jsx-runtime";
|
|
|
2
2
|
import z, { useState as L, useRef as S, useId as F, useCallback as b, useMemo as W, createContext as J, useEffect as j, useContext as Q } from "react";
|
|
3
3
|
import { createPortal as X } from "react-dom";
|
|
4
4
|
import { Search as Y } from "lucide-react";
|
|
5
|
-
import s from "./
|
|
5
|
+
import s from "./index126.mjs";
|
|
6
6
|
import { Divider as Z } from "./index33.mjs";
|
|
7
7
|
const V = J(null);
|
|
8
8
|
function B() {
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),w=require("lucide-react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),w=require("lucide-react"),a=require("./index156.cjs"),S=n.forwardRef(({open:d,onOpenChange:c,commands:m,recentCommands:i,onSelect:D,placeholder:E="Type a command or search...",emptyMessage:C="No results found.",footer:N,className:L,...R},M)=>{const[r,b]=n.useState(""),[o,u]=n.useState(0),v=n.useRef(null),y=n.useRef(null),k=n.useMemo(()=>{if(!r)return m;const e=r.toLowerCase();return m.filter(t=>{const l=t.label.toLowerCase().includes(e),h=t.description?.toLowerCase().includes(e),j=t.keywords?.some(K=>K.toLowerCase().includes(e));return l||h||j})},[m,r]),p=n.useMemo(()=>{const e=[],t=[];return k.forEach(l=>{if(l.category){const h=e.find(j=>j.title===l.category);h?h.commands.push(l):e.push({title:l.category,commands:[l]})}else t.push(l)}),t.length>0&&e.unshift({title:"",commands:t}),e},[k]),f=n.useMemo(()=>{const e=[];return i&&i.length>0&&!r&&e.push(...i),p.forEach(t=>{e.push(...t.commands)}),e},[p,i,r]);n.useEffect(()=>{d&&(b(""),u(0),setTimeout(()=>v.current?.focus(),0))},[d]);const $=n.useCallback(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),u(t=>Math.min(t+1,f.length-1));break;case"ArrowUp":e.preventDefault(),u(t=>Math.max(t-1,0));break;case"Enter":{e.preventDefault();const t=f[o];t&&!t.disabled&&x(t);break}case"Escape":e.preventDefault(),c(!1);break}},[f,o,c]),x=e=>{D?.(e),e.onSelect(),c(!1)};if(n.useEffect(()=>{const e=y.current;if(!e)return;const t=e.querySelector(`[data-index="${o}"]`);t&&t.scrollIntoView({block:"nearest"})},[o]),n.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),c(!d))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[d,c]),!d)return null;const I=[a.default.commandBar,L].filter(Boolean).join(" ");let g=0;return s.jsx("div",{className:a.default.overlay,onClick:()=>c(!1),children:s.jsxs("div",{ref:M,className:I,onClick:e=>e.stopPropagation(),onKeyDown:$,...R,children:[s.jsxs("div",{className:a.default.inputWrapper,children:[s.jsx(w.Search,{size:18,className:a.default.searchIcon}),s.jsx("input",{ref:v,type:"text",className:a.default.input,placeholder:E,value:r,onChange:e=>{b(e.target.value),u(0)},autoComplete:"off",autoCorrect:"off",spellCheck:!1}),s.jsx("kbd",{className:a.default.shortcutHint,children:"ESC"})]}),s.jsx("div",{ref:y,className:a.default.results,children:f.length===0?s.jsx("div",{className:a.default.empty,children:C}):s.jsxs(s.Fragment,{children:[i&&i.length>0&&!r&&s.jsxs("div",{className:a.default.group,children:[s.jsx("div",{className:a.default.groupTitle,children:"Recent"}),i.map(e=>{const t=g++;return s.jsxs("button",{type:"button","data-index":t,className:`${a.default.item} ${t===o?a.default.itemSelected:""} ${e.disabled?a.default.itemDisabled:""}`,onClick:()=>!e.disabled&&x(e),onMouseEnter:()=>u(t),children:[e.icon&&s.jsx("span",{className:a.default.itemIcon,children:e.icon}),s.jsxs("span",{className:a.default.itemContent,children:[s.jsx("span",{className:a.default.itemLabel,children:e.label}),e.description&&s.jsx("span",{className:a.default.itemDescription,children:e.description})]}),e.shortcut&&s.jsx("kbd",{className:a.default.itemShortcut,children:e.shortcut})]},`recent-${e.id}`)})]}),p.map(e=>s.jsxs("div",{className:a.default.group,children:[e.title&&s.jsx("div",{className:a.default.groupTitle,children:e.title}),e.commands.map(t=>{const l=g++;return s.jsxs("button",{type:"button","data-index":l,className:`${a.default.item} ${l===o?a.default.itemSelected:""} ${t.disabled?a.default.itemDisabled:""}`,onClick:()=>!t.disabled&&x(t),onMouseEnter:()=>u(l),children:[t.icon&&s.jsx("span",{className:a.default.itemIcon,children:t.icon}),s.jsxs("span",{className:a.default.itemContent,children:[s.jsx("span",{className:a.default.itemLabel,children:t.label}),t.description&&s.jsx("span",{className:a.default.itemDescription,children:t.description})]}),t.shortcut&&s.jsx("kbd",{className:a.default.itemShortcut,children:t.shortcut})]},t.id)})]},e.title||"ungrouped"))]})}),N?s.jsx("div",{className:a.default.footer,children:N}):s.jsxs("div",{className:a.default.footer,children:[s.jsxs("span",{className:a.default.footerHint,children:[s.jsx(w.Command,{size:12})," ",s.jsx("span",{children:"K to toggle"})]}),s.jsxs("span",{className:a.default.footerHint,children:[s.jsx("span",{children:"↑↓"})," to navigate"]}),s.jsxs("span",{className:a.default.footerHint,children:[s.jsx("span",{children:"↵"})," to select"]})]})]})})});S.displayName="CommandBar";exports.CommandBar=S;
|
package/dist/index28.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as z, useState as E, useRef as C, useMemo as v, useEffect as y, useCallback as A } from "react";
|
|
3
3
|
import { Search as q, Command as F } from "lucide-react";
|
|
4
|
-
import s from "./
|
|
4
|
+
import s from "./index156.mjs";
|
|
5
5
|
const G = z(
|
|
6
6
|
({
|
|
7
7
|
open: u,
|