openchad-react 1.0.1 → 1.0.13
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/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +39 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableRow, TableCell, Checkbox, Switch, Tooltip, TooltipTrigger, TooltipContent, Spinner, Button, Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, Input, Card, CardContent, Avatar, Dialog, DialogContent, DialogHeader, DialogTitle, ResizablePanelGroup, ResizablePanel, ResizableHandle, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, Command, CommandInput, DropdownMenuSeparator, ScrollArea, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuPortal, DropdownMenuSubContent, CommandItem, DropdownMenuItem, DropdownMenuShortcut, Popover, PopoverTrigger, PopoverContent, CommandList as CommandList$1, CommandEmpty as CommandEmpty$1, cn, Table, TableHeader, TableHead, TableBody } from './chunk-545ZTT4L.mjs';
|
|
1
|
+
import { TableRow, TableCell, Checkbox, Switch, Tooltip, TooltipTrigger, TooltipContent, Spinner, Button, Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent, Input, Card, CardContent, Avatar, Dialog, DialogContent, DialogHeader, DialogTitle, ResizablePanelGroup, ResizablePanel, ResizableHandle, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, Command, CommandInput, DropdownMenuSeparator, ScrollArea, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuPortal, DropdownMenuSubContent, CommandItem, DropdownMenuItem, DropdownMenuShortcut, Popover, PopoverTrigger, PopoverContent, CommandList as CommandList$1, CommandEmpty as CommandEmpty$1, cn, Table, TableHeader, TableHead, TableBody } from './chunk-545ZTT4L.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { memo, useCallback, useState, useRef, createContext, useEffect, useLayoutEffect, Suspense, Fragment as Fragment$1, useMemo, useContext } from 'react';
|
|
4
4
|
import clsx8 from 'clsx';
|
|
@@ -4703,6 +4703,8 @@ function SearchDialogBody({ workspace, isOpen, setOpen }) {
|
|
|
4703
4703
|
] });
|
|
4704
4704
|
}
|
|
4705
4705
|
function Sidebar({
|
|
4706
|
+
projectName,
|
|
4707
|
+
ProjectIcon,
|
|
4706
4708
|
showMcpDialog,
|
|
4707
4709
|
setShowMcpDialog,
|
|
4708
4710
|
workspace,
|
|
@@ -4994,23 +4996,10 @@ function Sidebar({
|
|
|
4994
4996
|
"relative left-1 h-8 w-8 rounded-md flex items-center justify-center text-zinc-800 dark:text-zinc-100 font-bold pointer-events-auto",
|
|
4995
4997
|
isCollapsedSidebar && "group-hover:opacity-0"
|
|
4996
4998
|
),
|
|
4997
|
-
children: /* @__PURE__ */
|
|
4998
|
-
"svg",
|
|
4999
|
-
{
|
|
5000
|
-
className: "w-5 h-5 stroke-[15px] stroke-accent",
|
|
5001
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5002
|
-
viewBox: "0 0 657 657",
|
|
5003
|
-
children: [
|
|
5004
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M173 84h6a167 167 0 0 1 80 34l3 2a428 428 0 0 0 21 15l4 4 2 1a462 462 0 0 0 17 14c8 8 17 15 24 24l14 15 6 6 2 2c3 3 3 3 3 6l-8 7-3 3-2 1-8 6-4 1c-4-1-5-3-8-6a2267 2267 0 0 0-4-5l-9-9-10-11-21-21c-3-1-5-4-7-6-17-14-17-14-36-26-3 0-5 2-7 4l-2 2-2 2-2 2a968 968 0 0 0-17 19l-2 2a4081 4081 0 0 0-25 34l8 6 3 2a257 257 0 0 1 27 22 208 208 0 0 1 31 31 296 296 0 0 1 32 39 359 359 0 0 1 26 40 393 393 0 0 1 64 185c3 31-3 67-23 92a71 71 0 0 1-51 24 153 153 0 0 1-50-8l-6-2-1-3a1041 1041 0 0 1 9 1l8 1a65 65 0 0 0 51-13l4-1 1-2c1-4 3-6 6-9 5-6 8-13 10-21l2-5c20-49-4-118-23-164a332 332 0 0 0-16-32c-5-11-12-22-18-32l-2-2a356 356 0 0 0-50-67l-2 2-7 7c-12 11-12 11-22 23l-8 10-18 21 6 8 11 13 2 3a1365 1365 0 0 1 7 10c35 49 64 114 55 175-2 16-9 31-22 40l-5 3-2 2c-14 7-31 4-45 0a156 156 0 0 1-54-33 215 215 0 0 1-30-29 291 291 0 0 1-51-79c-14-29-25-61-26-93v-4c-1-22 2-44 17-60 10-10 21-14 35-14 29 0 54 16 75 34l5 4 7 6a82 82 0 0 0 14-18l2-2c10-15 21-29 33-41l4-8-24-20-2-2-19-13-3-2-19-10-2-1c-24-11-49-16-74-8-16 6-27 18-34 34l-8 24-2-1a121 121 0 0 1 26-69c4-6 8-10 15-13l2-2c7-4 13-6 20-7l3-1a105 105 0 0 1 67 13l3 1h7l3-4 2-3 2-2 3-3 10-14c10-14 21-26 33-38-11-11-36-16-52-18l-2-1c-9-1-18-1-27 1h-4c-13 2-22 8-33 15l-6 2 7-11 3-4 2-1 3-4a78 78 0 0 1 72-22ZM31 339c-8 11-12 23-12 37v3c-1 51 23 100 52 139l2 3c15 20 33 37 53 51l3 2c15 10 34 16 53 13 10-2 17-7 23-16 6-10 9-20 9-32v-3c1-58-29-114-66-156l-2-3-28-26-2-2c-22-17-62-36-85-10Z" }),
|
|
5005
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m344 57 7 5a199 199 0 0 1 35 27l12 10a134 134 0 0 1 24 22l6 7 18 20 13-5c14-7 28-13 43-17l3-2 16-2 4 5a2136 2136 0 0 0 38 54l8 14a267 267 0 0 1 22 42c21 43 35 90 37 138v20a124 124 0 0 1-9 43c-3 12-9 23-15 34l-2-1 4-13a116 116 0 0 0 7-37 373 373 0 0 0-59-212l-2-3a476970923 476970923 0 0 0-12-21l-24-33c-8 2-15 5-22 9l-3 1-26 13 10 14 17 25 11 19a362 362 0 0 1 29 55l1 2c25 54 44 114 42 174v4c-1 18-3 34-9 51v3c-3 9-7 17-14 24l-6 9c-7 9-17 16-27 22 0-4 0-5 3-8l2-3 2-2c18-24 23-50 24-79v-24c-1-22-5-43-10-65v-3l-15-45-1 1a378 378 0 0 1-58 34l-3 2-5 3 2 4c11 30 19 63 22 95v2c3 36 3 83-21 113l-5 5-4 6c-4 5-9 9-15 12l-2 1c-12 8-25 12-39 12v-3l5-3c12-7 22-14 30-26l2-4c5-7 8-14 10-21l1-2c3-10 5-19 6-30l1-7a356 356 0 0 0-54-210 248 248 0 0 0-27-45l-3-5-2-4-2-2-1-7 4-3 2-1 3-2 5-3 3-2 8-5c4 2 5 4 8 8l2 3a236496 236496 0 0 1 16 27l1 2 4 7a136 136 0 0 1 12 22l1 4a1318 1318 0 0 0 11 21l2 4 1 3 1 4a8549 8549 0 0 0 60-35l2-2 2-1 4-1a272 272 0 0 0-15-33l-1-3a404 404 0 0 0-31-53c-7-12-15-24-24-35l-9-13a335 335 0 0 0-43-49 242 242 0 0 0-37-34c-6-5-12-11-19-15l-2-1a981 981 0 0 0-53-30h-2c-9-4-18-7-28-8l-9-2c-16-3-31 0-46 3l-1-3c12-7 24-12 37-14l3-1c37-6 77 9 108 29ZM88 421c23 16 39 41 45 68 2 10 3 21-2 31-3 5-7 7-13 8-12 1-21-4-30-12l-2-2c-19-15-33-41-36-65-1-9-1-17 4-25l2-3c9-8 22-5 32 0Z" }),
|
|
5006
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m459 47 10 4 2 1 5 4 2 1a703 703 0 0 1 58 40l19 19 4 5c8 8 15 17 21 26l2 2c20 29 36 61 46 95l1 3c9 31 9 64 11 95h-3v-3a344 344 0 0 0-54-161l-2-3a2024 2024 0 0 0-7-12l-21-29-5-5a210 210 0 0 0-25-29 146 146 0 0 0-24-23c-9-8-18-14-28-20l-12-8v-2Z" }),
|
|
5007
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M329 16a182 182 0 0 1 119 38c6 3 11 8 16 13l11 9 12 10-1 3c-15 5-15 5-21 2-4-2-7-6-10-9l-9-8-8-7c-9-8-20-14-30-20l-6-4c-7-5-15-8-23-12h-2c-14-6-28-9-43-11l-6-1 1-3Z" })
|
|
5008
|
-
]
|
|
5009
|
-
}
|
|
5010
|
-
)
|
|
4999
|
+
children: /* @__PURE__ */ jsx(ProjectIcon, {})
|
|
5011
5000
|
}
|
|
5012
5001
|
),
|
|
5013
|
-
/* @__PURE__ */ jsx(Aspan, { isCollapsed: isCollapsedSidebar, className: "text-lg opacity-0 text-zinc-900 dark:text-gray-200 font-funnel", children:
|
|
5002
|
+
/* @__PURE__ */ jsx(Aspan, { isCollapsed: isCollapsedSidebar, className: "text-lg opacity-0 text-zinc-900 dark:text-gray-200 font-funnel", children: projectName }),
|
|
5014
5003
|
/* @__PURE__ */ jsx("div", { className: "ml-auto pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
5015
5004
|
"button",
|
|
5016
5005
|
{
|
|
@@ -9062,6 +9051,7 @@ function SelectWorkspace({ workspaces, setWorkspace }) {
|
|
|
9062
9051
|
/* @__PURE__ */ jsx(EmptyTitle, { className: clsx8(isSmallHeight && "text-base"), children: "No Workspaces Yet" }),
|
|
9063
9052
|
!isSmallHeight && /* @__PURE__ */ jsx(EmptyDescription, { children: "You haven't created any workspaces yet. Get started by creating your first workspace." })
|
|
9064
9053
|
] }),
|
|
9054
|
+
/* @__PURE__ */ jsx(EmptyContent, { children: /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx(Button, { onClick: () => setIsCreating(true), size: isSmallHeight ? "sm" : "default", children: "Create Workspace" }) }) }),
|
|
9065
9055
|
/* @__PURE__ */ jsx(Button, { variant: "link", asChild: true, className: "text-muted-foreground", size: "sm", children: /* @__PURE__ */ jsxs("a", { onClick: (e) => {
|
|
9066
9056
|
e.preventDefault();
|
|
9067
9057
|
if (isTauri6) {
|
|
@@ -10087,6 +10077,8 @@ function Container({ Apps: Apps2 }) {
|
|
|
10087
10077
|
/* @__PURE__ */ jsx("aside", { className: "items-start x hidden md:flex bg-[hsl(var(--bg))] relative z-10", children: /* @__PURE__ */ jsx(
|
|
10088
10078
|
Sidebar,
|
|
10089
10079
|
{
|
|
10080
|
+
projectName: Apps2.projectName,
|
|
10081
|
+
ProjectIcon: Apps2.projectIcon,
|
|
10090
10082
|
workspace,
|
|
10091
10083
|
setIsSwitchWorkspace,
|
|
10092
10084
|
showSearchDialog,
|
|
@@ -10504,6 +10496,24 @@ function Container({ Apps: Apps2 }) {
|
|
|
10504
10496
|
] })
|
|
10505
10497
|
] });
|
|
10506
10498
|
}
|
|
10499
|
+
var OpenChadIcon = () => {
|
|
10500
|
+
return /* @__PURE__ */ jsxs(
|
|
10501
|
+
"svg",
|
|
10502
|
+
{
|
|
10503
|
+
className: "w-5 h-5 stroke-[15px] stroke-accent",
|
|
10504
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10505
|
+
viewBox: "0 0 657 657",
|
|
10506
|
+
children: [
|
|
10507
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M173 84h6a167 167 0 0 1 80 34l3 2a428 428 0 0 0 21 15l4 4 2 1a462 462 0 0 0 17 14c8 8 17 15 24 24l14 15 6 6 2 2c3 3 3 3 3 6l-8 7-3 3-2 1-8 6-4 1c-4-1-5-3-8-6a2267 2267 0 0 0-4-5l-9-9-10-11-21-21c-3-1-5-4-7-6-17-14-17-14-36-26-3 0-5 2-7 4l-2 2-2 2-2 2a968 968 0 0 0-17 19l-2 2a4081 4081 0 0 0-25 34l8 6 3 2a257 257 0 0 1 27 22 208 208 0 0 1 31 31 296 296 0 0 1 32 39 359 359 0 0 1 26 40 393 393 0 0 1 64 185c3 31-3 67-23 92a71 71 0 0 1-51 24 153 153 0 0 1-50-8l-6-2-1-3a1041 1041 0 0 1 9 1l8 1a65 65 0 0 0 51-13l4-1 1-2c1-4 3-6 6-9 5-6 8-13 10-21l2-5c20-49-4-118-23-164a332 332 0 0 0-16-32c-5-11-12-22-18-32l-2-2a356 356 0 0 0-50-67l-2 2-7 7c-12 11-12 11-22 23l-8 10-18 21 6 8 11 13 2 3a1365 1365 0 0 1 7 10c35 49 64 114 55 175-2 16-9 31-22 40l-5 3-2 2c-14 7-31 4-45 0a156 156 0 0 1-54-33 215 215 0 0 1-30-29 291 291 0 0 1-51-79c-14-29-25-61-26-93v-4c-1-22 2-44 17-60 10-10 21-14 35-14 29 0 54 16 75 34l5 4 7 6a82 82 0 0 0 14-18l2-2c10-15 21-29 33-41l4-8-24-20-2-2-19-13-3-2-19-10-2-1c-24-11-49-16-74-8-16 6-27 18-34 34l-8 24-2-1a121 121 0 0 1 26-69c4-6 8-10 15-13l2-2c7-4 13-6 20-7l3-1a105 105 0 0 1 67 13l3 1h7l3-4 2-3 2-2 3-3 10-14c10-14 21-26 33-38-11-11-36-16-52-18l-2-1c-9-1-18-1-27 1h-4c-13 2-22 8-33 15l-6 2 7-11 3-4 2-1 3-4a78 78 0 0 1 72-22ZM31 339c-8 11-12 23-12 37v3c-1 51 23 100 52 139l2 3c15 20 33 37 53 51l3 2c15 10 34 16 53 13 10-2 17-7 23-16 6-10 9-20 9-32v-3c1-58-29-114-66-156l-2-3-28-26-2-2c-22-17-62-36-85-10Z" }),
|
|
10508
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m344 57 7 5a199 199 0 0 1 35 27l12 10a134 134 0 0 1 24 22l6 7 18 20 13-5c14-7 28-13 43-17l3-2 16-2 4 5a2136 2136 0 0 0 38 54l8 14a267 267 0 0 1 22 42c21 43 35 90 37 138v20a124 124 0 0 1-9 43c-3 12-9 23-15 34l-2-1 4-13a116 116 0 0 0 7-37 373 373 0 0 0-59-212l-2-3a476970923 476970923 0 0 0-12-21l-24-33c-8 2-15 5-22 9l-3 1-26 13 10 14 17 25 11 19a362 362 0 0 1 29 55l1 2c25 54 44 114 42 174v4c-1 18-3 34-9 51v3c-3 9-7 17-14 24l-6 9c-7 9-17 16-27 22 0-4 0-5 3-8l2-3 2-2c18-24 23-50 24-79v-24c-1-22-5-43-10-65v-3l-15-45-1 1a378 378 0 0 1-58 34l-3 2-5 3 2 4c11 30 19 63 22 95v2c3 36 3 83-21 113l-5 5-4 6c-4 5-9 9-15 12l-2 1c-12 8-25 12-39 12v-3l5-3c12-7 22-14 30-26l2-4c5-7 8-14 10-21l1-2c3-10 5-19 6-30l1-7a356 356 0 0 0-54-210 248 248 0 0 0-27-45l-3-5-2-4-2-2-1-7 4-3 2-1 3-2 5-3 3-2 8-5c4 2 5 4 8 8l2 3a236496 236496 0 0 1 16 27l1 2 4 7a136 136 0 0 1 12 22l1 4a1318 1318 0 0 0 11 21l2 4 1 3 1 4a8549 8549 0 0 0 60-35l2-2 2-1 4-1a272 272 0 0 0-15-33l-1-3a404 404 0 0 0-31-53c-7-12-15-24-24-35l-9-13a335 335 0 0 0-43-49 242 242 0 0 0-37-34c-6-5-12-11-19-15l-2-1a981 981 0 0 0-53-30h-2c-9-4-18-7-28-8l-9-2c-16-3-31 0-46 3l-1-3c12-7 24-12 37-14l3-1c37-6 77 9 108 29ZM88 421c23 16 39 41 45 68 2 10 3 21-2 31-3 5-7 7-13 8-12 1-21-4-30-12l-2-2c-19-15-33-41-36-65-1-9-1-17 4-25l2-3c9-8 22-5 32 0Z" }),
|
|
10509
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m459 47 10 4 2 1 5 4 2 1a703 703 0 0 1 58 40l19 19 4 5c8 8 15 17 21 26l2 2c20 29 36 61 46 95l1 3c9 31 9 64 11 95h-3v-3a344 344 0 0 0-54-161l-2-3a2024 2024 0 0 0-7-12l-21-29-5-5a210 210 0 0 0-25-29 146 146 0 0 0-24-23c-9-8-18-14-28-20l-12-8v-2Z" }),
|
|
10510
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M329 16a182 182 0 0 1 119 38c6 3 11 8 16 13l11 9 12 10-1 3c-15 5-15 5-21 2-4-2-7-6-10-9l-9-8-8-7c-9-8-20-14-30-20l-6-4c-7-5-15-8-23-12h-2c-14-6-28-9-43-11l-6-1 1-3Z" })
|
|
10511
|
+
]
|
|
10512
|
+
}
|
|
10513
|
+
);
|
|
10514
|
+
};
|
|
10515
|
+
|
|
10516
|
+
// index.ts
|
|
10507
10517
|
function generateIdFromString(input) {
|
|
10508
10518
|
return "tb_" + sha256(input).slice(0, 32);
|
|
10509
10519
|
}
|
|
@@ -10529,6 +10539,6 @@ var useGlobal3 = (tb, options) => {
|
|
|
10529
10539
|
return useGlobal2(tb, options);
|
|
10530
10540
|
};
|
|
10531
10541
|
|
|
10532
|
-
export { Container, generateIdFromString, useDatabase, useElementSize, useFile, useFolder, useGlobal3 as useGlobal, usePython, useTool };
|
|
10542
|
+
export { Container, OpenChadIcon, generateIdFromString, useDatabase, useElementSize, useFile, useFolder, useGlobal3 as useGlobal, usePython, useTool };
|
|
10533
10543
|
//# sourceMappingURL=index.mjs.map
|
|
10534
10544
|
//# sourceMappingURL=index.mjs.map
|