@meshagent/meshagent-tailwind 0.5.7 → 0.5.9
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/CHANGELOG.md +6 -0
- package/dist/cjs/Chat.js +28 -5
- package/dist/cjs/ChatInput.d.ts +4 -1
- package/dist/cjs/ChatInput.js +15 -3
- package/dist/cjs/ChatThread.js +1 -0
- package/dist/cjs/ChatTypingIndicator.js +2 -2
- package/dist/cjs/components/pane-example.d.ts +1 -0
- package/dist/cjs/components/pane-example.js +43 -0
- package/dist/cjs/components/ui/dialog.d.ts +15 -0
- package/dist/cjs/components/ui/dialog.js +166 -0
- package/dist/cjs/components/ui/form.d.ts +24 -0
- package/dist/cjs/components/ui/form.js +146 -0
- package/dist/cjs/components/ui/input.d.ts +3 -0
- package/dist/cjs/components/ui/input.js +41 -0
- package/dist/cjs/components/ui/label.d.ts +4 -0
- package/dist/cjs/components/ui/label.js +53 -0
- package/dist/cjs/components/ui/progress.js +1 -1
- package/dist/cjs/components/ui/radio-group.d.ts +5 -0
- package/dist/cjs/components/ui/radio-group.js +76 -0
- package/dist/cjs/components/ui/select.d.ts +15 -0
- package/dist/cjs/components/ui/select.js +199 -0
- package/dist/cjs/components/ui/sheet.d.ts +13 -0
- package/dist/cjs/components/ui/sheet.js +110 -0
- package/dist/cjs/components/ui/sonner.d.ts +3 -0
- package/dist/cjs/components/ui/sonner.js +42 -0
- package/dist/cjs/lib/pane-service.d.ts +16 -0
- package/dist/cjs/lib/pane-service.js +35 -0
- package/dist/cjs/lib/utils.d.ts +4 -0
- package/dist/cjs/tools/ask-user-for-file.d.ts +10 -0
- package/dist/cjs/tools/ask-user-for-file.js +68 -0
- package/dist/cjs/tools/ask-user.d.ts +10 -0
- package/dist/cjs/tools/ask-user.js +161 -0
- package/dist/cjs/tools/display-document.d.ts +10 -0
- package/dist/cjs/tools/display-document.js +49 -0
- package/dist/cjs/tools/file-dialog.d.ts +11 -0
- package/dist/cjs/tools/file-dialog.js +113 -0
- package/dist/cjs/tools/form-dialog.d.ts +12 -0
- package/dist/cjs/tools/form-dialog.js +92 -0
- package/dist/cjs/tools/form-schema.d.ts +41 -0
- package/dist/cjs/tools/form-schema.js +51 -0
- package/dist/cjs/tools/form.d.ts +16 -0
- package/dist/cjs/tools/form.js +81 -0
- package/dist/cjs/tools/toast.d.ts +10 -0
- package/dist/cjs/tools/toast.js +52 -0
- package/dist/cjs/tools/ui-toolkit.d.ts +6 -0
- package/dist/cjs/tools/ui-toolkit.js +44 -0
- package/dist/esm/Chat.js +29 -6
- package/dist/esm/ChatInput.d.ts +4 -1
- package/dist/esm/ChatInput.js +15 -3
- package/dist/esm/ChatThread.js +1 -0
- package/dist/esm/ChatTypingIndicator.js +2 -2
- package/dist/esm/components/pane-example.d.ts +1 -0
- package/dist/esm/components/pane-example.js +30 -0
- package/dist/esm/components/ui/dialog.d.ts +15 -0
- package/dist/esm/components/ui/dialog.js +136 -0
- package/dist/esm/components/ui/form.d.ts +24 -0
- package/dist/esm/components/ui/form.js +121 -0
- package/dist/esm/components/ui/input.d.ts +3 -0
- package/dist/esm/components/ui/input.js +21 -0
- package/dist/esm/components/ui/label.d.ts +4 -0
- package/dist/esm/components/ui/label.js +23 -0
- package/dist/esm/components/ui/progress.js +1 -1
- package/dist/esm/components/ui/radio-group.d.ts +5 -0
- package/dist/esm/components/ui/radio-group.js +46 -0
- package/dist/esm/components/ui/select.d.ts +15 -0
- package/dist/esm/components/ui/select.js +169 -0
- package/dist/esm/components/ui/sheet.d.ts +13 -0
- package/dist/esm/components/ui/sheet.js +80 -0
- package/dist/esm/components/ui/sonner.d.ts +3 -0
- package/dist/esm/components/ui/sonner.js +22 -0
- package/dist/esm/lib/pane-service.d.ts +16 -0
- package/dist/esm/lib/pane-service.js +15 -0
- package/dist/esm/lib/utils.d.ts +4 -0
- package/dist/esm/tools/ask-user-for-file.d.ts +10 -0
- package/dist/esm/tools/ask-user-for-file.js +48 -0
- package/dist/esm/tools/ask-user.d.ts +10 -0
- package/dist/esm/tools/ask-user.js +141 -0
- package/dist/esm/tools/display-document.d.ts +10 -0
- package/dist/esm/tools/display-document.js +29 -0
- package/dist/esm/tools/file-dialog.d.ts +11 -0
- package/dist/esm/tools/file-dialog.js +101 -0
- package/dist/esm/tools/form-dialog.d.ts +12 -0
- package/dist/esm/tools/form-dialog.js +79 -0
- package/dist/esm/tools/form-schema.d.ts +41 -0
- package/dist/esm/tools/form-schema.js +31 -0
- package/dist/esm/tools/form.d.ts +16 -0
- package/dist/esm/tools/form.js +64 -0
- package/dist/esm/tools/toast.d.ts +10 -0
- package/dist/esm/tools/toast.js +32 -0
- package/dist/esm/tools/ui-toolkit.d.ts +6 -0
- package/dist/esm/tools/ui-toolkit.js +24 -0
- package/dist/index.css +1 -1
- package/package.json +13 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var radio_group_exports = {};
|
|
31
|
+
__export(radio_group_exports, {
|
|
32
|
+
RadioGroup: () => RadioGroup,
|
|
33
|
+
RadioGroupItem: () => RadioGroupItem
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(radio_group_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
38
|
+
var import_lucide_react = require("lucide-react");
|
|
39
|
+
var import_utils = require("../../lib/utils");
|
|
40
|
+
function RadioGroup({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
+
RadioGroupPrimitive.Root,
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "radio-group",
|
|
48
|
+
className: (0, import_utils.cn)("grid gap-3", className),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function RadioGroupItem({
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
RadioGroupPrimitive.Item,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "radio-group-item",
|
|
61
|
+
className: (0, import_utils.cn)(
|
|
62
|
+
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
63
|
+
className
|
|
64
|
+
),
|
|
65
|
+
...props,
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
RadioGroupPrimitive.Indicator,
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "radio-group-indicator",
|
|
70
|
+
className: "relative flex items-center justify-center",
|
|
71
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var select_exports = {};
|
|
30
|
+
__export(select_exports, {
|
|
31
|
+
Select: () => Select,
|
|
32
|
+
SelectContent: () => SelectContent,
|
|
33
|
+
SelectGroup: () => SelectGroup,
|
|
34
|
+
SelectItem: () => SelectItem,
|
|
35
|
+
SelectLabel: () => SelectLabel,
|
|
36
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
37
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
38
|
+
SelectSeparator: () => SelectSeparator,
|
|
39
|
+
SelectTrigger: () => SelectTrigger,
|
|
40
|
+
SelectValue: () => SelectValue
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(select_exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
45
|
+
var import_lucide_react = require("lucide-react");
|
|
46
|
+
var import_utils = require("../../lib/utils");
|
|
47
|
+
function Select({
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
51
|
+
}
|
|
52
|
+
function SelectGroup({
|
|
53
|
+
...props
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
56
|
+
}
|
|
57
|
+
function SelectValue({
|
|
58
|
+
...props
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
61
|
+
}
|
|
62
|
+
function SelectTrigger({
|
|
63
|
+
className,
|
|
64
|
+
size = "default",
|
|
65
|
+
children,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
69
|
+
SelectPrimitive.Trigger,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "select-trigger",
|
|
72
|
+
"data-size": size,
|
|
73
|
+
className: (0, import_utils.cn)(
|
|
74
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props,
|
|
78
|
+
children: [
|
|
79
|
+
children,
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
function SelectContent({
|
|
86
|
+
className,
|
|
87
|
+
children,
|
|
88
|
+
position = "popper",
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
92
|
+
SelectPrimitive.Content,
|
|
93
|
+
{
|
|
94
|
+
"data-slot": "select-content",
|
|
95
|
+
className: (0, import_utils.cn)(
|
|
96
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
97
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
98
|
+
className
|
|
99
|
+
),
|
|
100
|
+
position,
|
|
101
|
+
...props,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectScrollUpButton, {}),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
+
SelectPrimitive.Viewport,
|
|
106
|
+
{
|
|
107
|
+
className: (0, import_utils.cn)(
|
|
108
|
+
"p-1",
|
|
109
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
110
|
+
),
|
|
111
|
+
children
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectScrollDownButton, {})
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
) });
|
|
118
|
+
}
|
|
119
|
+
function SelectLabel({
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
SelectPrimitive.Label,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "select-label",
|
|
127
|
+
className: (0, import_utils.cn)("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function SelectItem({
|
|
133
|
+
className,
|
|
134
|
+
children,
|
|
135
|
+
...props
|
|
136
|
+
}) {
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
138
|
+
SelectPrimitive.Item,
|
|
139
|
+
{
|
|
140
|
+
"data-slot": "select-item",
|
|
141
|
+
className: (0, import_utils.cn)(
|
|
142
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
143
|
+
className
|
|
144
|
+
),
|
|
145
|
+
...props,
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, { className: "size-4" }) }) }),
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectPrimitive.ItemText, { children })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function SelectSeparator({
|
|
154
|
+
className,
|
|
155
|
+
...props
|
|
156
|
+
}) {
|
|
157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
158
|
+
SelectPrimitive.Separator,
|
|
159
|
+
{
|
|
160
|
+
"data-slot": "select-separator",
|
|
161
|
+
className: (0, import_utils.cn)("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function SelectScrollUpButton({
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}) {
|
|
170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
171
|
+
SelectPrimitive.ScrollUpButton,
|
|
172
|
+
{
|
|
173
|
+
"data-slot": "select-scroll-up-button",
|
|
174
|
+
className: (0, import_utils.cn)(
|
|
175
|
+
"flex cursor-default items-center justify-center py-1",
|
|
176
|
+
className
|
|
177
|
+
),
|
|
178
|
+
...props,
|
|
179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronUpIcon, { className: "size-4" })
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
function SelectScrollDownButton({
|
|
184
|
+
className,
|
|
185
|
+
...props
|
|
186
|
+
}) {
|
|
187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
188
|
+
SelectPrimitive.ScrollDownButton,
|
|
189
|
+
{
|
|
190
|
+
"data-slot": "select-scroll-down-button",
|
|
191
|
+
className: (0, import_utils.cn)(
|
|
192
|
+
"flex cursor-default items-center justify-center py-1",
|
|
193
|
+
className
|
|
194
|
+
),
|
|
195
|
+
...props,
|
|
196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDownIcon, { className: "size-4" })
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var sheet_exports = {};
|
|
30
|
+
__export(sheet_exports, {
|
|
31
|
+
Sheet: () => Sheet,
|
|
32
|
+
SheetClose: () => SheetClose,
|
|
33
|
+
SheetContent: () => SheetContent,
|
|
34
|
+
SheetDescription: () => SheetDescription,
|
|
35
|
+
SheetFooter: () => SheetFooter,
|
|
36
|
+
SheetHeader: () => SheetHeader,
|
|
37
|
+
SheetTitle: () => SheetTitle,
|
|
38
|
+
SheetTrigger: () => SheetTrigger
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(sheet_exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
43
|
+
var import_lucide_react = require("lucide-react");
|
|
44
|
+
var import_utils = require("../../lib/utils");
|
|
45
|
+
function Sheet({ ...props }) {
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
47
|
+
}
|
|
48
|
+
function SheetTrigger({ ...props }) {
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
50
|
+
}
|
|
51
|
+
function SheetClose({ ...props }) {
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
53
|
+
}
|
|
54
|
+
function SheetPortal({ ...props }) {
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
56
|
+
}
|
|
57
|
+
function SheetOverlay({ className, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
SheetPrimitive.Overlay,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "sheet-overlay",
|
|
62
|
+
className: (0, import_utils.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function SheetContent({ className, children, side = "right", ...props }) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPortal, { children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetOverlay, {}),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
71
|
+
SheetPrimitive.Content,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "sheet-content",
|
|
74
|
+
className: (0, import_utils.cn)(
|
|
75
|
+
"fixed z-50",
|
|
76
|
+
"flex flex-col gap-4",
|
|
77
|
+
"shadow-lg bg-background",
|
|
78
|
+
"transition ease-in-out",
|
|
79
|
+
"data-[state=open]:animate-in data-[state=open]:duration-500",
|
|
80
|
+
"data-[state=closed]:animate-out data-[state=closed]:duration-300",
|
|
81
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full border-l sm:max-w-sm",
|
|
82
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full border-r sm:max-w-sm",
|
|
83
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
84
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
children,
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, { className: "size-4" }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
|
|
93
|
+
] })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
function SheetHeader({ className, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "sheet-header", className: (0, import_utils.cn)("flex flex-col gap-1.5 p-4", className), ...props });
|
|
101
|
+
}
|
|
102
|
+
function SheetFooter({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-slot": "sheet-footer", className: (0, import_utils.cn)("mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
104
|
+
}
|
|
105
|
+
function SheetTitle({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Title, { "data-slot": "sheet-title", className: (0, import_utils.cn)("text-foreground font-semibold", className), ...props });
|
|
107
|
+
}
|
|
108
|
+
function SheetDescription({ className, ...props }) {
|
|
109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Description, { "data-slot": "sheet-description", className: (0, import_utils.cn)("text-muted-foreground text-sm", className), ...props });
|
|
110
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var sonner_exports = {};
|
|
20
|
+
__export(sonner_exports, {
|
|
21
|
+
Toaster: () => Toaster
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(sonner_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_next_themes = require("next-themes");
|
|
26
|
+
var import_sonner = require("sonner");
|
|
27
|
+
const Toaster = ({ ...props }) => {
|
|
28
|
+
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
import_sonner.Toaster,
|
|
31
|
+
{
|
|
32
|
+
theme,
|
|
33
|
+
className: "toaster group",
|
|
34
|
+
style: {
|
|
35
|
+
"--normal-bg": "var(--popover)",
|
|
36
|
+
"--normal-text": "var(--popover-foreground)",
|
|
37
|
+
"--normal-border": "var(--border)"
|
|
38
|
+
},
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple emitter service to control a Radix UI Sheet (pane) from anywhere
|
|
3
|
+
*/
|
|
4
|
+
export type PaneCallback = (open: boolean) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Register a listener (usually in a React root component)
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerPane(cb: PaneCallback): void;
|
|
9
|
+
/**
|
|
10
|
+
* Open the pane from anywhere—even outside React components
|
|
11
|
+
*/
|
|
12
|
+
export declare function openPane(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Close the pane
|
|
15
|
+
*/
|
|
16
|
+
export declare function closePane(): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var pane_service_exports = {};
|
|
20
|
+
__export(pane_service_exports, {
|
|
21
|
+
closePane: () => closePane,
|
|
22
|
+
openPane: () => openPane,
|
|
23
|
+
registerPane: () => registerPane
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(pane_service_exports);
|
|
26
|
+
let paneCallback = null;
|
|
27
|
+
function registerPane(cb) {
|
|
28
|
+
paneCallback = cb;
|
|
29
|
+
}
|
|
30
|
+
function openPane() {
|
|
31
|
+
paneCallback?.(true);
|
|
32
|
+
}
|
|
33
|
+
function closePane() {
|
|
34
|
+
paneCallback?.(false);
|
|
35
|
+
}
|
package/dist/cjs/lib/utils.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tool } from '@meshagent/meshagent';
|
|
2
|
+
import type { Response } from '@meshagent/meshagent';
|
|
3
|
+
export declare class AskUserForFile extends Tool {
|
|
4
|
+
constructor({ name, description, title }?: {
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
});
|
|
9
|
+
execute(arguments_: Record<string, any>): Promise<Response>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ask_user_for_file_exports = {};
|
|
20
|
+
__export(ask_user_for_file_exports, {
|
|
21
|
+
AskUserForFile: () => AskUserForFile
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ask_user_for_file_exports);
|
|
24
|
+
var import_meshagent = require("@meshagent/meshagent");
|
|
25
|
+
var import_file_dialog = require("./file-dialog");
|
|
26
|
+
const askUserForFileSchema = {
|
|
27
|
+
type: "object",
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
required: ["title", "description"],
|
|
30
|
+
properties: {
|
|
31
|
+
title: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "a very short description suitable for a dialog title"
|
|
34
|
+
},
|
|
35
|
+
description: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "helpful information that explains why this information is being collected and how it will be used"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
class AskUserForFile extends import_meshagent.Tool {
|
|
42
|
+
constructor({ name, description, title } = {}) {
|
|
43
|
+
super({
|
|
44
|
+
name: name ?? "ask_user_for_file",
|
|
45
|
+
description: description ?? "ask the user for a file (will be accessible as a blob url to other tools)",
|
|
46
|
+
title: title ?? "ask user for file",
|
|
47
|
+
inputSchema: askUserForFileSchema
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async execute(arguments_) {
|
|
51
|
+
const file = await (0, import_file_dialog.showFileDialog)({
|
|
52
|
+
title: arguments_.title,
|
|
53
|
+
description: arguments_.description
|
|
54
|
+
});
|
|
55
|
+
if (file) {
|
|
56
|
+
const data = await file.arrayBuffer();
|
|
57
|
+
const name = file ? file.name : "unknown";
|
|
58
|
+
const mimeType = file ? file.type : "application/octet-stream";
|
|
59
|
+
return new import_meshagent.FileResponse({
|
|
60
|
+
data: data ?? new Uint8Array(),
|
|
61
|
+
name,
|
|
62
|
+
mimeType
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
throw Error("The user cancelled the request");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tool } from '@meshagent/meshagent';
|
|
2
|
+
import type { Response } from '@meshagent/meshagent';
|
|
3
|
+
export declare class AskUser extends Tool {
|
|
4
|
+
constructor({ name, description, title }?: {
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
});
|
|
9
|
+
execute(arguments_: Record<string, any>): Promise<Response>;
|
|
10
|
+
}
|