@chaibuilder/sdk 1.2.90 → 1.2.91
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/CodeEditor-Imjgt7mh.cjs +1 -0
- package/dist/{CodeEditor-t2oVfSyK.js → CodeEditor-_Pim7pDO.js} +5 -4
- package/dist/{Topbar-x0tjZaWC.js → Topbar-4ejjKoRn.js} +5 -4
- package/dist/Topbar-irIirqy7.cjs +1 -0
- package/dist/UnsplashImages-NfwOtGHo.cjs +1 -0
- package/dist/{UnsplashImages-965l8pGL.js → UnsplashImages-fpbR9Jbs.js} +5 -4
- package/dist/{UploadImages-glp4ZyQm.js → UploadImages-9hzL5Hu1.js} +11 -10
- package/dist/UploadImages-OVHnYeiL.cjs +1 -0
- package/dist/{context-menu-DeUUflYX.js → context-menu-9cWJcKdh.js} +442 -373
- package/dist/context-menu-sQn7ryJ6.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +69 -68
- package/dist/{index-BuZrwlQG.cjs → index-VBJLJ6fO.cjs} +27 -27
- package/dist/{index-qptv-vi2.js → index-ry3B_D93.js} +189 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +241 -301
- package/package.json +1 -1
- package/dist/CodeEditor-gqhS0hpB.cjs +0 -1
- package/dist/Topbar-s9YVXp9Z.cjs +0 -1
- package/dist/UnsplashImages-DRQaQoM-.cjs +0 -1
- package/dist/UploadImages-CumBJ3oE.cjs +0 -1
- package/dist/context-menu--DZnHfxj.cjs +0 -1
|
@@ -4,7 +4,7 @@ var ze = (r, n, o) => (gt(r, typeof n != "symbol" ? n + "" : n, o), o);
|
|
|
4
4
|
import { j as jsxRuntimeExports } from "./jsx-runtime-Sp0orL4X.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import React__default, { createContext as createContext$1, useReducer, useEffect as useEffect$1, useDebugValue, useCallback as useCallback$1, useContext as useContext$1, useState as useState$1, Component, Children, Suspense, useMemo as useMemo$1, useRef as useRef$1, memo, createElement as createElement$1, useLayoutEffect as useLayoutEffect$1, forwardRef as forwardRef$1, cloneElement, Fragment, lazy } from "react";
|
|
7
|
-
import { S as Skeleton, B as Button$1, C as ContextMenu, a as ContextMenuTrigger, b as ContextMenuContent, c as ContextMenuItem, T as Tooltip$1, d as TooltipTrigger, e as TooltipContent, f as Card, g as CardHeader, h as CardDescription, i as CardContent, L as Label, j as Textarea, k as CardFooter, D as Dialog, l as DialogTrigger, m as DialogContent, n as DialogHeader, o as DialogTitle, p as DialogDescription, q as DialogFooter, P as Popover$1, r as PopoverTrigger, s as PopoverContent, t as Command, u as CommandInput, v as CommandList, w as CommandEmpty, x as CommandGroup, y as CommandItem, z as Tabs$1, A as TabsList$1, E as TabsTrigger, F as TabsContent, G as Switch, H as Accordion, I as AccordionItem, J as AccordionTrigger, K as AccordionContent, M as useToast, N as Input$2, O as TooltipPortal, Q as DropdownMenu, R as DropdownMenuTrigger, U as DropdownMenuContent, V as ScrollArea$1, W as DropdownMenuLabel, X as DropdownMenuSeparator, Y as DropdownMenuGroup, Z as DropdownMenuItem, _ as DropdownMenuShortcut, $ as AlertDialog, a0 as AlertDialogContent, a1 as AlertDialogHeader, a2 as AlertDialogTitle, a3 as AlertDialogTrigger, a4 as AlertDialogDescription, a5 as AlertDialogFooter, a6 as AlertDialogCancel, a7 as AlertDialogAction, a8 as DropdownMenuCheckboxItem, a9 as HoverCard, aa as HoverCardTrigger, ab as HoverCardContent, ac as Separator, ad as Badge$1, ae as
|
|
7
|
+
import { S as Skeleton, B as Button$1, C as ContextMenu, a as ContextMenuTrigger, b as ContextMenuContent, c as ContextMenuItem, T as Tooltip$1, d as TooltipTrigger, e as TooltipContent, f as Card, g as CardHeader, h as CardDescription, i as CardContent, L as Label, j as Textarea, k as CardFooter, D as Dialog, l as DialogTrigger, m as DialogContent, n as DialogHeader, o as DialogTitle, p as DialogDescription, q as DialogFooter, P as Popover$1, r as PopoverTrigger, s as PopoverContent, t as Command, u as CommandInput, v as CommandList, w as CommandEmpty, x as CommandGroup, y as CommandItem, z as Tabs$1, A as TabsList$1, E as TabsTrigger, F as TabsContent, G as Switch, H as Accordion, I as AccordionItem, J as AccordionTrigger, K as AccordionContent, M as useToast, N as Input$2, O as TooltipPortal, Q as DropdownMenu, R as DropdownMenuTrigger, U as DropdownMenuContent, V as ScrollArea$1, W as DropdownMenuLabel, X as DropdownMenuSeparator, Y as DropdownMenuGroup, Z as DropdownMenuItem, _ as DropdownMenuShortcut, $ as AlertDialog, a0 as AlertDialogContent, a1 as AlertDialogHeader, a2 as AlertDialogTitle, a3 as AlertDialogTrigger, a4 as AlertDialogDescription, a5 as AlertDialogFooter, a6 as AlertDialogCancel, a7 as AlertDialogAction, a8 as DropdownMenuCheckboxItem, a9 as HoverCard, aa as HoverCardTrigger, ab as HoverCardContent, ac as Separator, ad as Badge$1, ae as Select$1, af as SelectTrigger, ag as SelectValue, ah as SelectContent, ai as SelectItem, aj as TooltipProvider, ak as Toaster } from "./context-menu-9cWJcKdh.js";
|
|
8
8
|
import { has, find, filter, flatten, map, omit, isString as isString$1, includes, without, get as get$1, compact, set, isEmpty, forIn, isObject as isObject$2, each, first, noop as noop$1, keys, startsWith, range, values, flattenDeep, isNull, pick, sortBy, chunk, throttle, memoize as memoize$1, reverse, debounce as debounce$1, flatMapDeep, forEach, capitalize, last, startCase, truncate, isArray as isArray$5, split, toLower, cloneDeep, reject, nth, isNumber as isNumber$1, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, groupBy, isFunction as isFunction$2, uniq, toUpper, round } from "lodash-es";
|
|
9
9
|
import { atom as atom$1, useAtomValue as useAtomValue$1, useAtom as useAtom$1, useSetAtom as useSetAtom$1, getDefaultStore as getDefaultStore$1 } from "jotai";
|
|
10
10
|
import { g as generateUUID, a as getBreakpointValue$1, f, y, s, c as cn, G as GenIcon } from "./iconBase-zweRWSz0.js";
|
|
@@ -3647,7 +3647,7 @@ const useAllDataProviders = () => useMemo$1(() => getChaiDataProviders(), []), B
|
|
|
3647
3647
|
i !== r.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 16 })
|
|
3648
3648
|
] }, i))
|
|
3649
3649
|
] }) });
|
|
3650
|
-
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-
|
|
3650
|
+
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-_Pim7pDO.js")), CanvasArea = () => {
|
|
3651
3651
|
const [r] = useCodeEditor(), n = useBuilderProp("onError", noop$1);
|
|
3652
3652
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
|
|
3653
3653
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-full" }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary$1, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(FallbackError, {}), onError: n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(StaticCanvas$1, {}) }) }),
|
|
@@ -5032,7 +5032,7 @@ const ViewData = ({ data: r, fullView: n }) => {
|
|
|
5032
5032
|
}
|
|
5033
5033
|
)
|
|
5034
5034
|
] });
|
|
5035
|
-
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-
|
|
5035
|
+
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-fpbR9Jbs.js")), UploadImages = React__default.lazy(() => import("./UploadImages-9hzL5Hu1.js")), ImagesPanel = ({
|
|
5036
5036
|
isModalView: r = !1,
|
|
5037
5037
|
onSelect: n = () => {
|
|
5038
5038
|
}
|
|
@@ -5282,9 +5282,9 @@ function BlockSettings() {
|
|
|
5282
5282
|
return u && each(g, (x) => delete b[x]), b;
|
|
5283
5283
|
}, [a, g, u]);
|
|
5284
5284
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-x-hidden px-px", children: [
|
|
5285
|
-
u ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "h-full w-full", children: [
|
|
5285
|
+
u ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion, { type: "multiple", defaultValue: ["STATIC", "BINDING"], className: "mt-4 h-full w-full", children: [
|
|
5286
5286
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem, { value: "BINDING", children: [
|
|
5287
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "
|
|
5287
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
5288
5288
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5289
5289
|
"div",
|
|
5290
5290
|
{
|
|
@@ -5293,7 +5293,7 @@ function BlockSettings() {
|
|
|
5293
5293
|
),
|
|
5294
5294
|
"Data Binding"
|
|
5295
5295
|
] }) }),
|
|
5296
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { className: "
|
|
5296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { className: "pt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
5297
5297
|
DataBindingSetting$1,
|
|
5298
5298
|
{
|
|
5299
5299
|
bindingData: get$1(r, "_bindings", {}),
|
|
@@ -5304,12 +5304,12 @@ function BlockSettings() {
|
|
|
5304
5304
|
) })
|
|
5305
5305
|
] }),
|
|
5306
5306
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem, { value: "STATIC", children: [
|
|
5307
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "
|
|
5307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
5308
5308
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-[8px] w-[8px] rounded-full bg-blue-500" }),
|
|
5309
5309
|
"Static Content"
|
|
5310
5310
|
] }) }),
|
|
5311
5311
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionContent, { className: "pt-4", children: [
|
|
5312
|
-
isEmpty(g) ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
|
5312
|
+
isEmpty(g) ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-1 mt-0 rounded-sm border border-orange-500 bg-orange-100 p-1 text-xs text-orange-500", children: [
|
|
5313
5313
|
"Data binding is set for ",
|
|
5314
5314
|
/* @__PURE__ */ jsxRuntimeExports.jsx("b", { children: map(g, capitalize).join(", ") }),
|
|
5315
5315
|
" ",
|
|
@@ -34074,7 +34074,7 @@ const ChooseLayout = ({ open: r, close: n }) => {
|
|
|
34074
34074
|
};
|
|
34075
34075
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Dialog, { children: [
|
|
34076
34076
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DialogTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
|
|
34077
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { variant: "ghost", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardIcon, { className: "size-
|
|
34077
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { className: "mb-2 rounded-lg p-2 transition-colors", variant: "ghost", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardIcon, { className: "size-4" }) }) }),
|
|
34078
34078
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: r("Keyboard shortcuts") }) })
|
|
34079
34079
|
] }) }),
|
|
34080
34080
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "border-border sm:max-w-[525px]", children: [
|
|
@@ -34091,28 +34091,192 @@ const ChooseLayout = ({ open: r, close: n }) => {
|
|
|
34091
34091
|
] }) })
|
|
34092
34092
|
] })
|
|
34093
34093
|
] });
|
|
34094
|
-
},
|
|
34094
|
+
}, ViewProviderData = ({ provider: r, onClose: n }) => {
|
|
34095
|
+
const { t: o } = useTranslation(), [a, i] = useState$1(null), l = useBuilderProp("onError", noop$1);
|
|
34096
|
+
return useEffect$1(() => {
|
|
34097
|
+
r && (r.mockFn ? r.mockFn : r.dataFn)().then((u) => i(u));
|
|
34098
|
+
}, [r]), r ? /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { onOpenChange: (c) => c ? "" : n(), defaultOpen: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "border-border", children: [
|
|
34099
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
|
|
34100
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DialogTitle, { className: "text-foreground", children: [
|
|
34101
|
+
o("data_provider"),
|
|
34102
|
+
": ",
|
|
34103
|
+
r.name
|
|
34104
|
+
] }),
|
|
34105
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: r.description })
|
|
34106
|
+
] }),
|
|
34107
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary$1, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(FallbackError, {}), onError: l, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34108
|
+
JsonView,
|
|
34109
|
+
{
|
|
34110
|
+
data: a,
|
|
34111
|
+
shouldExpandNode: allExpanded,
|
|
34112
|
+
style: {
|
|
34113
|
+
...defaultStyles,
|
|
34114
|
+
container: "max-h-[80vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
|
|
34115
|
+
stringValue: "text-orange-600",
|
|
34116
|
+
label: "text-green-900 font-semibold pr-1 tracking-wider"
|
|
34117
|
+
}
|
|
34118
|
+
}
|
|
34119
|
+
) })
|
|
34120
|
+
] }) }) : null;
|
|
34121
|
+
};
|
|
34122
|
+
function RemoveProviderConfirmation({
|
|
34123
|
+
children: r,
|
|
34124
|
+
name: n,
|
|
34125
|
+
onRemove: o
|
|
34126
|
+
}) {
|
|
34127
|
+
const { t: a } = useTranslation();
|
|
34128
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialog, { children: [
|
|
34129
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTrigger, { asChild: !0, children: r }),
|
|
34130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogContent, { children: [
|
|
34131
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogHeader, { children: [
|
|
34132
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34133
|
+
AlertDialogTitle,
|
|
34134
|
+
{
|
|
34135
|
+
dangerouslySetInnerHTML: { __html: a("remove_provider_confirmation").replace("{name}", n) }
|
|
34136
|
+
}
|
|
34137
|
+
),
|
|
34138
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, { children: a("remove_provider_warning") })
|
|
34139
|
+
] }),
|
|
34140
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogFooter, { children: [
|
|
34141
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogCancel, { children: a("cancel") }),
|
|
34142
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogAction, { onClick: o, className: "bg-red-600 hover:bg-red-700", children: a("remove") })
|
|
34143
|
+
] })
|
|
34144
|
+
] })
|
|
34145
|
+
] });
|
|
34146
|
+
}
|
|
34147
|
+
const PageDataProviders = () => {
|
|
34148
|
+
const { t: r } = useTranslation(), n = useMemo$1(() => getChaiDataProviders(), []), [o, a] = usePageDataProviders(), [, i] = useAtom$1(builderSaveStateAtom), [l, c] = useState$1(
|
|
34149
|
+
filter(n, (v) => map(o, "providerKey").includes(v.providerKey))
|
|
34150
|
+
), [u, d] = useState$1(""), [p, m] = useState$1(null), g = filter(
|
|
34151
|
+
n.map((v) => map(l, "providerKey").includes(v.providerKey) ? null : { value: v.providerKey, label: v.name }),
|
|
34152
|
+
(v) => !isNull(v)
|
|
34153
|
+
), h = (v) => {
|
|
34154
|
+
const S = find(n, { providerKey: v });
|
|
34155
|
+
c((E) => [...E, S]), a((E) => [...E, { providerKey: S.providerKey, args: {} }]), d(""), i("UNSAVED");
|
|
34156
|
+
}, b = (v) => {
|
|
34157
|
+
c((S) => filter(S, (E) => E.providerKey !== v.providerKey)), a((S) => filter(S, (E) => E.providerKey !== v.providerKey)), i("UNSAVED");
|
|
34158
|
+
}, x = (v) => m(v);
|
|
34159
|
+
return isEmpty(n) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "mb-1.5 p-4 text-xs text-gray-500", children: [
|
|
34160
|
+
r("no_data_providers"),
|
|
34161
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
34162
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: r("learn_more") })
|
|
34163
|
+
] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-1", children: [
|
|
34164
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
34165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mb-1.5 text-xs text-gray-500", children: r("add_data_providers") }) }),
|
|
34166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Select$1, { value: u, onValueChange: (v) => h(v), children: [
|
|
34167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: r("select_provider") }) }),
|
|
34168
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
34169
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "", children: r("choose") }),
|
|
34170
|
+
g.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: v.value, children: v.label }, v.value))
|
|
34171
|
+
] })
|
|
34172
|
+
] }) }),
|
|
34173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
34174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `border-t border-border ${l.length ? "block" : "hidden"}`, children: [
|
|
34175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex-1 pb-1.5 pt-4 text-xs font-medium text-gray-500", children: [
|
|
34176
|
+
r("page_data_providers"),
|
|
34177
|
+
":"
|
|
34178
|
+
] }),
|
|
34179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: l.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34180
|
+
"div",
|
|
34181
|
+
{
|
|
34182
|
+
className: "w-full rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
34183
|
+
"data-v0-t": "card",
|
|
34184
|
+
children: [
|
|
34185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col space-y-1.5 px-4 pt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
34186
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium leading-4", children: v.name }),
|
|
34187
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "pt-1 text-xs text-gray-400", children: v.description })
|
|
34188
|
+
] }) }) }),
|
|
34189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between p-2 py-2", children: [
|
|
34190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34191
|
+
"button",
|
|
34192
|
+
{
|
|
34193
|
+
onClick: () => x(v),
|
|
34194
|
+
className: "inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-blue-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
34195
|
+
children: [
|
|
34196
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34197
|
+
"svg",
|
|
34198
|
+
{
|
|
34199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34200
|
+
width: "24",
|
|
34201
|
+
height: "24",
|
|
34202
|
+
viewBox: "0 0 24 24",
|
|
34203
|
+
fill: "none",
|
|
34204
|
+
stroke: "currentColor",
|
|
34205
|
+
strokeWidth: "2",
|
|
34206
|
+
strokeLinecap: "round",
|
|
34207
|
+
strokeLinejoin: "round",
|
|
34208
|
+
className: "mr-2 h-4 w-4",
|
|
34209
|
+
children: [
|
|
34210
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
34211
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
34212
|
+
]
|
|
34213
|
+
}
|
|
34214
|
+
),
|
|
34215
|
+
r("view_data")
|
|
34216
|
+
]
|
|
34217
|
+
}
|
|
34218
|
+
),
|
|
34219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RemoveProviderConfirmation, { onRemove: () => b(v), name: v.name, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-red-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", children: [
|
|
34220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34221
|
+
"svg",
|
|
34222
|
+
{
|
|
34223
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34224
|
+
width: "24",
|
|
34225
|
+
height: "24",
|
|
34226
|
+
viewBox: "0 0 24 24",
|
|
34227
|
+
fill: "none",
|
|
34228
|
+
stroke: "currentColor",
|
|
34229
|
+
strokeWidth: "2",
|
|
34230
|
+
strokeLinecap: "round",
|
|
34231
|
+
strokeLinejoin: "round",
|
|
34232
|
+
className: "mr-2 h-4 w-4",
|
|
34233
|
+
children: [
|
|
34234
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M3 6h18" }),
|
|
34235
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
34236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
34237
|
+
]
|
|
34238
|
+
}
|
|
34239
|
+
),
|
|
34240
|
+
r("remove")
|
|
34241
|
+
] }) })
|
|
34242
|
+
] })
|
|
34243
|
+
]
|
|
34244
|
+
},
|
|
34245
|
+
v.providerKey
|
|
34246
|
+
)) }),
|
|
34247
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ViewProviderData, { onClose: () => m(null), provider: p })
|
|
34248
|
+
] })
|
|
34249
|
+
] });
|
|
34250
|
+
};
|
|
34251
|
+
function AiFillDatabase(r) {
|
|
34252
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M832 64H192c-17.7 0-32 14.3-32 32v224h704V96c0-17.7-14.3-32-32-32zM288 232c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zM160 928c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V704H160v224zm128-136c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM160 640h704V384H160v256zm128-168c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z" }, child: [] }] })(r);
|
|
34253
|
+
}
|
|
34254
|
+
const TopBar = lazy(() => import("./Topbar-4ejjKoRn.js")), useAutoSave = () => {
|
|
34095
34255
|
const { savePage: r } = useSavePage(), n = useBuilderProp("autoSaveSupport", !0), o = useBuilderProp("autoSaveInterval", 60);
|
|
34096
34256
|
useIntervalEffect(() => {
|
|
34097
34257
|
n && r();
|
|
34098
34258
|
}, o * 1e3);
|
|
34099
34259
|
};
|
|
34100
34260
|
function useSidebarMenuItems(r) {
|
|
34101
|
-
const n = r === "SINGLE_SIDE_PANEL";
|
|
34102
|
-
return useMemo$1(() =>
|
|
34103
|
-
|
|
34104
|
-
|
|
34105
|
-
|
|
34106
|
-
|
|
34107
|
-
|
|
34108
|
-
|
|
34109
|
-
|
|
34110
|
-
|
|
34111
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34112
|
-
|
|
34113
|
-
|
|
34114
|
-
|
|
34115
|
-
|
|
34261
|
+
const n = r === "SINGLE_SIDE_PANEL", { t: o } = useTranslation(), a = useBuilderProp("dataBindingSupport", !1);
|
|
34262
|
+
return useMemo$1(() => {
|
|
34263
|
+
const i = [
|
|
34264
|
+
{
|
|
34265
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Layers, { size: 20 }),
|
|
34266
|
+
label: "sidebar.outline",
|
|
34267
|
+
component: () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "-mt-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Outline$1, {}) })
|
|
34268
|
+
},
|
|
34269
|
+
n ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(GearIcon, { className: "size-5" }), label: "sidebar.edit_block", component: SettingsPanel$1 } : null,
|
|
34270
|
+
a ? { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(AiFillDatabase, { className: "size-3" }), label: o("Data Providers"), component: PageDataProviders } : null,
|
|
34271
|
+
{ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(LightningBoltIcon, { className: "size-5" }), label: "sidebar.ai_assistant", component: AskAI },
|
|
34272
|
+
{
|
|
34273
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(PaintBucketIcon, { size: 20 }),
|
|
34274
|
+
label: "sidebar.theme",
|
|
34275
|
+
component: () => /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeOptions, { showHeading: !1 })
|
|
34276
|
+
}
|
|
34277
|
+
];
|
|
34278
|
+
return compact(i);
|
|
34279
|
+
}, [n, a]);
|
|
34116
34280
|
}
|
|
34117
34281
|
function isDualLayout(r) {
|
|
34118
34282
|
return r !== "SINGLE_SIDE_PANEL";
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-JYMCiFoE.cjs"),B=require("react"),J=require("@radix-ui/react-toggle"),p=require("class-variance-authority"),e=require("./context-menu--DZnHfxj.cjs"),c=require("@radix-ui/react-icons"),K=require("@radix-ui/react-menubar"),Q=require("@radix-ui/react-select"),U=require("@radix-ui/react-dialog");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");function m(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const i=m(B),x=m(J),n=m(K),d=m(Q),l=m(U),g=p.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),f=i.forwardRef(({className:t,variant:o,size:a,...s},u)=>r.jsxRuntimeExports.jsx(x.Root,{ref:u,className:e.cn(g({variant:o,size:a,className:t})),...s}));f.displayName=x.Root.displayName;const W=p.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),b=i.forwardRef(({className:t,variant:o,...a},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,role:"alert",className:e.cn(W({variant:o}),t),...a}));b.displayName="Alert";const C=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx("h5",{ref:a,className:e.cn("mb-1 font-medium leading-none tracking-tight",t),...o}));C.displayName="AlertTitle";const h=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx("div",{ref:a,className:e.cn("text-sm [&_p]:leading-relaxed",t),...o}));h.displayName="AlertDescription";const X=n.Menu,Y=n.Group,Z=n.Portal,$=n.Sub,ee=n.RadioGroup,j=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(n.Root,{ref:a,className:e.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",t),...o}));j.displayName=n.Root.displayName;const M=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(n.Trigger,{ref:a,className:e.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...o}));M.displayName=n.Trigger.displayName;const S=i.forwardRef(({className:t,inset:o,children:a,...s},u)=>r.jsxRuntimeExports.jsxs(n.SubTrigger,{ref:u,className:e.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",t),...s,children:[a,r.jsxRuntimeExports.jsx(c.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));S.displayName=n.SubTrigger.displayName;const R=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(n.SubContent,{ref:a,className:e.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...o}));R.displayName=n.SubContent.displayName;const y=i.forwardRef(({className:t,align:o="start",alignOffset:a=-4,sideOffset:s=8,...u},O)=>r.jsxRuntimeExports.jsx(n.Portal,{children:r.jsxRuntimeExports.jsx(n.Content,{ref:O,align:o,alignOffset:a,sideOffset:s,className:e.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",t),...u})}));y.displayName=n.Content.displayName;const w=i.forwardRef(({className:t,inset:o,...a},s)=>r.jsxRuntimeExports.jsx(n.Item,{ref:s,className:e.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",t),...a}));w.displayName=n.Item.displayName;const v=i.forwardRef(({className:t,children:o,checked:a,...s},u)=>r.jsxRuntimeExports.jsxs(n.CheckboxItem,{ref:u,className:e.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:a,...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(n.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),o]}));v.displayName=n.CheckboxItem.displayName;const N=i.forwardRef(({className:t,children:o,...a},s)=>r.jsxRuntimeExports.jsxs(n.RadioItem,{ref:s,className:e.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(n.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),o]}));N.displayName=n.RadioItem.displayName;const T=i.forwardRef(({className:t,inset:o,...a},s)=>r.jsxRuntimeExports.jsx(n.Label,{ref:s,className:e.cn("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...a}));T.displayName=n.Label.displayName;const D=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(n.Separator,{ref:a,className:e.cn("-mx-1 my-1 h-px bg-muted",t),...o}));D.displayName=n.Separator.displayName;const I=({className:t,...o})=>r.jsxRuntimeExports.jsx("span",{className:e.cn("ml-auto text-xs tracking-widest text-muted-foreground",t),...o});I.displayname="MenubarShortcut";const te=d.Root,oe=d.Group,ae=d.Value,E=i.forwardRef(({className:t,children:o,...a},s)=>r.jsxRuntimeExports.jsxs(d.Trigger,{ref:s,className:e.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:[o,r.jsxRuntimeExports.jsx(d.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(c.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));E.displayName=d.Trigger.displayName;const A=i.forwardRef(({className:t,children:o,position:a="popper",...s},u)=>r.jsxRuntimeExports.jsx(d.Portal,{children:r.jsxRuntimeExports.jsx(d.Content,{ref:u,className:e.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",a==="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",t),position:a,...s,children:r.jsxRuntimeExports.jsx(d.Viewport,{className:e.cn("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o})})}));A.displayName=d.Content.displayName;const P=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(d.Label,{ref:a,className:e.cn("px-2 py-1.5 text-sm font-semibold",t),...o}));P.displayName=d.Label.displayName;const q=i.forwardRef(({className:t,children:o,...a},s)=>r.jsxRuntimeExports.jsxs(d.Item,{ref:s,className:e.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(d.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(d.ItemText,{children:o})]}));q.displayName=d.Item.displayName;const k=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(d.Separator,{ref:a,className:e.cn("-mx-1 my-1 h-px bg-muted",t),...o}));k.displayName=d.Separator.displayName;const re=l.Root,ne=l.Trigger,se=l.Close,G=({className:t,...o})=>r.jsxRuntimeExports.jsx(l.Portal,{className:e.cn(t),...o});G.displayName=l.Portal.displayName;const L=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(l.Overlay,{className:e.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o,ref:a}));L.displayName=l.Overlay.displayName;const ie=p.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),V=i.forwardRef(({side:t="right",className:o,children:a,...s},u)=>r.jsxRuntimeExports.jsxs(G,{children:[r.jsxRuntimeExports.jsx(L,{}),r.jsxRuntimeExports.jsxs(l.Content,{ref:u,className:e.cn(ie({side:t}),o),...s,children:[a,r.jsxRuntimeExports.jsxs(l.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsxRuntimeExports.jsx(c.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));V.displayName=l.Content.displayName;const H=({className:t,...o})=>r.jsxRuntimeExports.jsx("div",{className:e.cn("flex flex-col space-y-2 text-center sm:text-left",t),...o});H.displayName="SheetHeader";const z=({className:t,...o})=>r.jsxRuntimeExports.jsx("div",{className:e.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o});z.displayName="SheetFooter";const _=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(l.Title,{ref:a,className:e.cn("text-lg font-semibold text-foreground",t),...o}));_.displayName=l.Title.displayName;const F=i.forwardRef(({className:t,...o},a)=>r.jsxRuntimeExports.jsx(l.Description,{ref:a,className:e.cn("text-sm text-muted-foreground",t),...o}));F.displayName=l.Description.displayName;exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.Input=e.Input;exports.Label=e.Label;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Separator=e.Separator;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.useToast=e.useToast;exports.Alert=b;exports.AlertDescription=h;exports.AlertTitle=C;exports.Menubar=j;exports.MenubarCheckboxItem=v;exports.MenubarContent=y;exports.MenubarGroup=Y;exports.MenubarItem=w;exports.MenubarLabel=T;exports.MenubarMenu=X;exports.MenubarPortal=Z;exports.MenubarRadioGroup=ee;exports.MenubarRadioItem=N;exports.MenubarSeparator=D;exports.MenubarShortcut=I;exports.MenubarSub=$;exports.MenubarSubContent=R;exports.MenubarSubTrigger=S;exports.MenubarTrigger=M;exports.Select=te;exports.SelectContent=A;exports.SelectGroup=oe;exports.SelectItem=q;exports.SelectLabel=P;exports.SelectSeparator=k;exports.SelectTrigger=E;exports.SelectValue=ae;exports.Sheet=re;exports.SheetClose=se;exports.SheetContent=V;exports.SheetDescription=F;exports.SheetFooter=z;exports.SheetHeader=H;exports.SheetTitle=_;exports.SheetTrigger=ne;exports.Toggle=f;exports.toggleVariants=g;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-JYMCiFoE.cjs"),H=require("react"),V=require("@radix-ui/react-toggle"),m=require("class-variance-authority"),e=require("./context-menu-sQn7ryJ6.cjs"),u=require("@radix-ui/react-icons"),z=require("@radix-ui/react-menubar"),F=require("@radix-ui/react-dialog");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");function c(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const i=c(H),p=c(V),n=c(z),d=c(F),x=m.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),g=i.forwardRef(({className:t,variant:o,size:r,...s},l)=>a.jsxRuntimeExports.jsx(p.Root,{ref:l,className:e.cn(x({variant:o,size:r,className:t})),...s}));g.displayName=p.Root.displayName;const _=m.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),b=i.forwardRef(({className:t,variant:o,...r},s)=>a.jsxRuntimeExports.jsx("div",{ref:s,role:"alert",className:e.cn(_({variant:o}),t),...r}));b.displayName="Alert";const f=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx("h5",{ref:r,className:e.cn("mb-1 font-medium leading-none tracking-tight",t),...o}));f.displayName="AlertTitle";const C=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx("div",{ref:r,className:e.cn("text-sm [&_p]:leading-relaxed",t),...o}));C.displayName="AlertDescription";const O=n.Menu,B=n.Group,J=n.Portal,K=n.Sub,Q=n.RadioGroup,M=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(n.Root,{ref:r,className:e.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",t),...o}));M.displayName=n.Root.displayName;const h=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(n.Trigger,{ref:r,className:e.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...o}));h.displayName=n.Trigger.displayName;const S=i.forwardRef(({className:t,inset:o,children:r,...s},l)=>a.jsxRuntimeExports.jsxs(n.SubTrigger,{ref:l,className:e.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",t),...s,children:[r,a.jsxRuntimeExports.jsx(u.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));S.displayName=n.SubTrigger.displayName;const j=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(n.SubContent,{ref:r,className:e.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",t),...o}));j.displayName=n.SubContent.displayName;const D=i.forwardRef(({className:t,align:o="start",alignOffset:r=-4,sideOffset:s=8,...l},L)=>a.jsxRuntimeExports.jsx(n.Portal,{children:a.jsxRuntimeExports.jsx(n.Content,{ref:L,align:o,alignOffset:r,sideOffset:s,className:e.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",t),...l})}));D.displayName=n.Content.displayName;const v=i.forwardRef(({className:t,inset:o,...r},s)=>a.jsxRuntimeExports.jsx(n.Item,{ref:s,className:e.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",t),...r}));v.displayName=n.Item.displayName;const T=i.forwardRef(({className:t,children:o,checked:r,...s},l)=>a.jsxRuntimeExports.jsxs(n.CheckboxItem,{ref:l,className:e.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...s,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(n.ItemIndicator,{children:a.jsxRuntimeExports.jsx(u.CheckIcon,{className:"h-4 w-4"})})}),o]}));T.displayName=n.CheckboxItem.displayName;const R=i.forwardRef(({className:t,children:o,...r},s)=>a.jsxRuntimeExports.jsxs(n.RadioItem,{ref:s,className:e.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(n.ItemIndicator,{children:a.jsxRuntimeExports.jsx(u.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),o]}));R.displayName=n.RadioItem.displayName;const y=i.forwardRef(({className:t,inset:o,...r},s)=>a.jsxRuntimeExports.jsx(n.Label,{ref:s,className:e.cn("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...r}));y.displayName=n.Label.displayName;const w=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(n.Separator,{ref:r,className:e.cn("-mx-1 my-1 h-px bg-muted",t),...o}));w.displayName=n.Separator.displayName;const N=({className:t,...o})=>a.jsxRuntimeExports.jsx("span",{className:e.cn("ml-auto text-xs tracking-widest text-muted-foreground",t),...o});N.displayname="MenubarShortcut";const U=d.Root,W=d.Trigger,X=d.Close,I=({className:t,...o})=>a.jsxRuntimeExports.jsx(d.Portal,{className:e.cn(t),...o});I.displayName=d.Portal.displayName;const A=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(d.Overlay,{className:e.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o,ref:r}));A.displayName=d.Overlay.displayName;const Y=m.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),E=i.forwardRef(({side:t="right",className:o,children:r,...s},l)=>a.jsxRuntimeExports.jsxs(I,{children:[a.jsxRuntimeExports.jsx(A,{}),a.jsxRuntimeExports.jsxs(d.Content,{ref:l,className:e.cn(Y({side:t}),o),...s,children:[r,a.jsxRuntimeExports.jsxs(d.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsxRuntimeExports.jsx(u.Cross2Icon,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));E.displayName=d.Content.displayName;const P=({className:t,...o})=>a.jsxRuntimeExports.jsx("div",{className:e.cn("flex flex-col space-y-2 text-center sm:text-left",t),...o});P.displayName="SheetHeader";const q=({className:t,...o})=>a.jsxRuntimeExports.jsx("div",{className:e.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o});q.displayName="SheetFooter";const k=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(d.Title,{ref:r,className:e.cn("text-lg font-semibold text-foreground",t),...o}));k.displayName=d.Title.displayName;const G=i.forwardRef(({className:t,...o},r)=>a.jsxRuntimeExports.jsx(d.Description,{ref:r,className:e.cn("text-sm text-muted-foreground",t),...o}));G.displayName=d.Description.displayName;exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.Input=e.Input;exports.Label=e.Label;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Separator=e.Separator;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.useToast=e.useToast;exports.Alert=b;exports.AlertDescription=C;exports.AlertTitle=f;exports.Menubar=M;exports.MenubarCheckboxItem=T;exports.MenubarContent=D;exports.MenubarGroup=B;exports.MenubarItem=v;exports.MenubarLabel=y;exports.MenubarMenu=O;exports.MenubarPortal=J;exports.MenubarRadioGroup=Q;exports.MenubarRadioItem=R;exports.MenubarSeparator=w;exports.MenubarShortcut=N;exports.MenubarSub=K;exports.MenubarSubContent=j;exports.MenubarSubTrigger=S;exports.MenubarTrigger=h;exports.Sheet=U;exports.SheetClose=X;exports.SheetContent=E;exports.SheetDescription=G;exports.SheetFooter=q;exports.SheetHeader=P;exports.SheetTitle=k;exports.SheetTrigger=W;exports.Toggle=g;exports.toggleVariants=x;
|