laif-ds 0.1.75 → 0.1.79
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/_virtual/prism-cpp.js +3 -0
- package/dist/_virtual/prism-cpp2.js +5 -0
- package/dist/_virtual/prism-java.js +3 -0
- package/dist/_virtual/prism-java2.js +5 -0
- package/dist/_virtual/prism-python.js +3 -0
- package/dist/_virtual/prism-python2.js +5 -0
- package/dist/_virtual/prism-rust.js +3 -0
- package/dist/_virtual/prism-rust2.js +5 -0
- package/dist/_virtual/prism-typescript.js +3 -0
- package/dist/_virtual/prism-typescript2.js +5 -0
- package/dist/_virtual/prism.js +3 -0
- package/dist/_virtual/prism2.js +5 -0
- package/dist/components/editor/context/toolbar-context.js +42 -0
- package/dist/components/editor/editor-hooks/use-modal.js +30 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
- package/dist/components/editor/editor-ui/content-editable.js +26 -0
- package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
- package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
- package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
- package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
- package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
- package/dist/components/editor/themes/editor-theme.js +112 -0
- package/dist/components/ui/app-editor.js +150 -0
- package/dist/components/ui/app-multiple-select-dropdown.js +2 -2
- package/dist/components/ui/button.js +25 -24
- package/dist/components/ui/calendar.js +9 -9
- package/dist/components/ui/dialog.js +43 -37
- package/dist/index.d.ts +23 -1
- package/dist/index.js +48 -44
- package/dist/laif-ds.css +1 -0
- package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
- package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
- package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
- package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
- package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
- package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
- package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
- package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
- package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
- package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
- package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
- package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
- package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
- package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
- package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
- package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
- package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
- package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
- package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
- package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
- package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
- package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
- package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
- package/dist/node_modules/prismjs/components/prism-c.js +77 -0
- package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
- package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
- package/dist/node_modules/prismjs/components/prism-css.js +56 -0
- package/dist/node_modules/prismjs/components/prism-java.js +122 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
- package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
- package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
- package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
- package/dist/node_modules/prismjs/components/prism-python.js +69 -0
- package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
- package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
- package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
- package/dist/node_modules/prismjs/prism.js +1165 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +12 -1
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as r, Trigger as
|
|
2
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Root as r, Trigger as d, Content as c, Close as i, Title as g, Description as f, Portal as u, Overlay as m } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import p from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
6
6
|
function w({
|
|
7
7
|
...t
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ a(r, { "data-slot": "dialog", ...t });
|
|
10
10
|
}
|
|
11
11
|
function z({
|
|
12
12
|
...t
|
|
13
13
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ a(d, { "data-slot": "dialog-trigger", ...t });
|
|
15
15
|
}
|
|
16
16
|
function x({
|
|
17
17
|
...t
|
|
18
18
|
}) {
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ a(u, { "data-slot": "dialog-portal", ...t });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function C({
|
|
22
|
+
...t
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ a(i, { "data-slot": "dialog-close", ...t });
|
|
25
|
+
}
|
|
26
|
+
function D({
|
|
22
27
|
className: t,
|
|
23
|
-
...
|
|
28
|
+
...e
|
|
24
29
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ a(
|
|
26
31
|
m,
|
|
27
32
|
{
|
|
28
33
|
"data-slot": "dialog-overlay",
|
|
@@ -30,19 +35,19 @@ function v({
|
|
|
30
35
|
"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",
|
|
31
36
|
t
|
|
32
37
|
),
|
|
33
|
-
...
|
|
38
|
+
...e
|
|
34
39
|
}
|
|
35
40
|
);
|
|
36
41
|
}
|
|
37
42
|
function k({
|
|
38
43
|
className: t,
|
|
39
|
-
children:
|
|
40
|
-
...
|
|
44
|
+
children: e,
|
|
45
|
+
...l
|
|
41
46
|
}) {
|
|
42
47
|
return /* @__PURE__ */ n(x, { "data-slot": "dialog-portal", children: [
|
|
43
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ a(D, {}),
|
|
44
49
|
/* @__PURE__ */ n(
|
|
45
|
-
|
|
50
|
+
c,
|
|
46
51
|
{
|
|
47
52
|
"data-slot": "dialog-content",
|
|
48
53
|
onPointerDownOutside: (s) => {
|
|
@@ -52,30 +57,30 @@ function k({
|
|
|
52
57
|
"bg-d-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
53
58
|
t
|
|
54
59
|
),
|
|
55
|
-
...
|
|
60
|
+
...l,
|
|
56
61
|
children: [
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */ n(
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
e,
|
|
63
|
+
/* @__PURE__ */ n(i, { className: "ring-offset-d-background focus:ring-d-ring data-[state=open]:bg-d-accent data-[state=open]:text-d-secondary-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
|
|
64
|
+
/* @__PURE__ */ a(p, {}),
|
|
65
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
61
66
|
] })
|
|
62
67
|
]
|
|
63
68
|
}
|
|
64
69
|
)
|
|
65
70
|
] });
|
|
66
71
|
}
|
|
67
|
-
function
|
|
68
|
-
return /* @__PURE__ */
|
|
72
|
+
function T({ className: t, ...e }) {
|
|
73
|
+
return /* @__PURE__ */ a(
|
|
69
74
|
"div",
|
|
70
75
|
{
|
|
71
76
|
"data-slot": "dialog-header",
|
|
72
77
|
className: o("flex flex-col gap-2 text-center sm:text-left", t),
|
|
73
|
-
...
|
|
78
|
+
...e
|
|
74
79
|
}
|
|
75
80
|
);
|
|
76
81
|
}
|
|
77
|
-
function
|
|
78
|
-
return /* @__PURE__ */
|
|
82
|
+
function j({ className: t, ...e }) {
|
|
83
|
+
return /* @__PURE__ */ a(
|
|
79
84
|
"div",
|
|
80
85
|
{
|
|
81
86
|
"data-slot": "dialog-footer",
|
|
@@ -83,44 +88,45 @@ function T({ className: t, ...a }) {
|
|
|
83
88
|
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
84
89
|
t
|
|
85
90
|
),
|
|
86
|
-
...
|
|
91
|
+
...e
|
|
87
92
|
}
|
|
88
93
|
);
|
|
89
94
|
}
|
|
90
|
-
function
|
|
95
|
+
function O({
|
|
91
96
|
className: t,
|
|
92
|
-
...
|
|
97
|
+
...e
|
|
93
98
|
}) {
|
|
94
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ a(
|
|
95
100
|
g,
|
|
96
101
|
{
|
|
97
102
|
"data-slot": "dialog-title",
|
|
98
103
|
className: o("text-lg leading-none font-semibold", t),
|
|
99
|
-
...
|
|
104
|
+
...e
|
|
100
105
|
}
|
|
101
106
|
);
|
|
102
107
|
}
|
|
103
|
-
function
|
|
108
|
+
function P({
|
|
104
109
|
className: t,
|
|
105
|
-
...
|
|
110
|
+
...e
|
|
106
111
|
}) {
|
|
107
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ a(
|
|
108
113
|
f,
|
|
109
114
|
{
|
|
110
115
|
"data-slot": "dialog-description",
|
|
111
116
|
className: o("text-d-secondary-foreground text-sm", t),
|
|
112
|
-
...
|
|
117
|
+
...e
|
|
113
118
|
}
|
|
114
119
|
);
|
|
115
120
|
}
|
|
116
121
|
export {
|
|
117
122
|
w as Dialog,
|
|
123
|
+
C as DialogClose,
|
|
118
124
|
k as DialogContent,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
P as DialogDescription,
|
|
126
|
+
j as DialogFooter,
|
|
127
|
+
T as DialogHeader,
|
|
128
|
+
D as DialogOverlay,
|
|
123
129
|
x as DialogPortal,
|
|
124
|
-
|
|
130
|
+
O as DialogTitle,
|
|
125
131
|
z as DialogTrigger
|
|
126
132
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
|
25
25
|
import { HTMLAttributes } from 'react';
|
|
26
26
|
import { InputProps as InputProps_2 } from './input';
|
|
27
27
|
import { JSX } from 'react/jsx-runtime';
|
|
28
|
+
import { JSX as JSX_2 } from 'react';
|
|
28
29
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
29
30
|
import * as LucideIcons from 'lucide-react';
|
|
30
31
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
@@ -125,6 +126,22 @@ declare const alertVariants: (props?: ({
|
|
|
125
126
|
|
|
126
127
|
declare type Animation_2 = VariantProps<typeof chatBubbleVariants>["animation"];
|
|
127
128
|
|
|
129
|
+
export declare function AppEditor({ defaultValue, onMarkdownEdit, plugins, toolbars, placeholder, onlyMarkdown, className, }: AppEditorProps): JSX.Element;
|
|
130
|
+
|
|
131
|
+
declare type AppEditorPlugin = "clear" | "counter";
|
|
132
|
+
|
|
133
|
+
declare interface AppEditorProps {
|
|
134
|
+
defaultValue?: string;
|
|
135
|
+
onMarkdownEdit?: (markdown: string) => void;
|
|
136
|
+
plugins?: AppEditorPlugin[];
|
|
137
|
+
toolbars?: AppEditorToolbar[];
|
|
138
|
+
placeholder?: string;
|
|
139
|
+
onlyMarkdown?: boolean;
|
|
140
|
+
className?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare type AppEditorToolbar = "block-format" | "font-format" | "history";
|
|
144
|
+
|
|
128
145
|
export declare function AppMultipleSelectDropdown({ options, value, onChange, placeholder, disabled, size, label, labelClassName, emptyMessage, className, filterPlaceholder, filterable, cancelLabel, cancelButtonLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
|
|
129
146
|
|
|
130
147
|
export declare interface AppMultipleSelectOption {
|
|
@@ -258,7 +275,7 @@ export declare interface ButtonProps extends React_2.ComponentProps<"button">, V
|
|
|
258
275
|
}
|
|
259
276
|
|
|
260
277
|
export declare const buttonVariants: (props?: ({
|
|
261
|
-
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
278
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-primary" | "ghost" | null | undefined;
|
|
262
279
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
263
280
|
} & ClassProp) | undefined) => string;
|
|
264
281
|
|
|
@@ -1726,6 +1743,11 @@ declare type UseCopyToClipboardProps = {
|
|
|
1726
1743
|
|
|
1727
1744
|
export declare function useDebounce<T>(value: T, delay: number): T;
|
|
1728
1745
|
|
|
1746
|
+
export declare function useEditorModal(): [
|
|
1747
|
+
JSX_2.Element | null,
|
|
1748
|
+
(title: string, showModal: (onClose: () => void) => JSX_2.Element) => void
|
|
1749
|
+
];
|
|
1750
|
+
|
|
1729
1751
|
export declare const useFormField: () => {
|
|
1730
1752
|
invalid: boolean;
|
|
1731
1753
|
isDirty: boolean;
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@ import { Button as g, buttonVariants as C } from "./components/ui/button.js";
|
|
|
7
7
|
import { Checkbox as f } from "./components/ui/checkbox.js";
|
|
8
8
|
import { Collapsible as S, CollapsibleContent as M, CollapsibleTrigger as c } from "./components/ui/collapsible.js";
|
|
9
9
|
import { CopyButton as D } from "./components/ui/copy-button.js";
|
|
10
|
-
import { Icon as
|
|
10
|
+
import { Icon as I } from "./components/ui/icon.js";
|
|
11
11
|
import { Input as P } from "./components/ui/input.js";
|
|
12
12
|
import { InputOTP as F, InputOTPGroup as w, InputOTPSlot as G } from "./components/ui/input-otp.js";
|
|
13
13
|
import { Label as B } from "./components/ui/label.js";
|
|
14
14
|
import { Progress as H } from "./components/ui/progress.js";
|
|
15
15
|
import { RadioGroup as y, RadioGroupItem as N } from "./components/ui/radio-group.js";
|
|
16
|
-
import { Separator as
|
|
16
|
+
import { Separator as E } from "./components/ui/separator.js";
|
|
17
17
|
import { Skeleton as O } from "./components/ui/skeleton.js";
|
|
18
18
|
import { Switch as j } from "./components/ui/switch.js";
|
|
19
19
|
import { Textarea as J } from "./components/ui/textarea.js";
|
|
@@ -24,27 +24,27 @@ import { Toaster as te } from "./components/ui/toaster.js";
|
|
|
24
24
|
import { Accordion as ne, AccordionContent as ie, AccordionItem as pe, AccordionTrigger as me } from "./components/ui/accordion.js";
|
|
25
25
|
import { Alert as ue, AlertDescription as xe, AlertTitle as de } from "./components/ui/alert.js";
|
|
26
26
|
import { AlertDialog as Ce, AlertDialogAction as be, AlertDialogCancel as fe, AlertDialogContent as se, AlertDialogDescription as Se, AlertDialogFooter as Me, AlertDialogHeader as ce, AlertDialogTitle as Te, AlertDialogTrigger as De } from "./components/ui/alert-dialog.js";
|
|
27
|
-
import { AsyncSelect as
|
|
27
|
+
import { AsyncSelect as Ie } from "./components/ui/async-select.js";
|
|
28
28
|
import { Calendar as Pe } from "./components/ui/calendar.js";
|
|
29
29
|
import { Card as Fe, CardContent as we, CardDescription as Ge, CardFooter as Le, CardHeader as Be, CardTitle as Re } from "./components/ui/card.js";
|
|
30
30
|
import { Typo as ke } from "./components/ui/typo.js";
|
|
31
|
-
import { Command as Ne, CommandDialog as ze, CommandEmpty as
|
|
31
|
+
import { Command as Ne, CommandDialog as ze, CommandEmpty as Ee, CommandGroup as Ve, CommandInput as Oe, CommandItem as We, CommandList as je, CommandSeparator as qe, CommandShortcut as Je } from "./components/ui/command.js";
|
|
32
32
|
import { ContextMenu as Qe, ContextMenuCheckboxItem as Ue, ContextMenuContent as Xe, ContextMenuGroup as Ye, ContextMenuItem as Ze, ContextMenuLabel as _e, ContextMenuPortal as $e, ContextMenuRadioGroup as er, ContextMenuRadioItem as rr, ContextMenuSeparator as or, ContextMenuShortcut as tr, ContextMenuSub as ar, ContextMenuSubContent as nr, ContextMenuSubTrigger as ir, ContextMenuTrigger as pr } from "./components/ui/context-menu.js";
|
|
33
33
|
import { DatePicker as lr } from "./components/ui/date-picker.js";
|
|
34
34
|
import { InputSelector as xr } from "./components/ui/input-selector.js";
|
|
35
35
|
import { Dialog as gr, DialogContent as Cr, DialogDescription as br, DialogFooter as fr, DialogHeader as sr, DialogTitle as Sr, DialogTrigger as Mr } from "./components/ui/dialog.js";
|
|
36
|
-
import { Drawer as Tr, DrawerContent as Dr, DrawerDescription as
|
|
36
|
+
import { Drawer as Tr, DrawerContent as Dr, DrawerDescription as Ar, DrawerFooter as Ir, DrawerHeader as hr, DrawerTitle as Pr, DrawerTrigger as vr } from "./components/ui/drawer.js";
|
|
37
37
|
import { Form as wr, FormControl as Gr, FormDescription as Lr, FormField as Br, FormItem as Rr, FormLabel as Hr, FormMessage as kr, useFormField as yr } from "./components/ui/form.js";
|
|
38
|
-
import { HoverCard as zr, HoverCardContent as
|
|
38
|
+
import { HoverCard as zr, HoverCardContent as Er, HoverCardTrigger as Vr } from "./components/ui/hover-card.js";
|
|
39
39
|
import { Menubar as Wr, MenubarCheckboxItem as jr, MenubarContent as qr, MenubarGroup as Jr, MenubarItem as Kr, MenubarLabel as Qr, MenubarMenu as Ur, MenubarPortal as Xr, MenubarRadioGroup as Yr, MenubarRadioItem as Zr, MenubarSeparator as _r, MenubarShortcut as $r, MenubarSub as eo, MenubarSubContent as ro, MenubarSubTrigger as oo, MenubarTrigger as to } from "./components/ui/menubar.js";
|
|
40
40
|
import { MultipleSelector as no } from "./components/ui/multiple-selector.js";
|
|
41
41
|
import { Pagination as po, PaginationContent as mo, PaginationEllipsis as lo, PaginationItem as uo, PaginationLink as xo, PaginationNext as go, PaginationPrevious as Co } from "./components/ui/pagination.js";
|
|
42
42
|
import { Popover as fo, PopoverContent as so, PopoverTrigger as So } from "./components/ui/popover.js";
|
|
43
43
|
import { PromptSuggestions as co } from "./components/ui/prompt-suggestions.js";
|
|
44
|
-
import { ResizableHandle as Do, ResizablePanel as
|
|
44
|
+
import { ResizableHandle as Do, ResizablePanel as Ao, ResizablePanelGroup as Io } from "./components/ui/resizable.js";
|
|
45
45
|
import { ScrollArea as Po, ScrollBar as vo } from "./components/ui/scroll-area.js";
|
|
46
46
|
import { Select as wo, SelectContent as Go, SelectGroup as Lo, SelectItem as Bo, SelectLabel as Ro, SelectSeparator as Ho, SelectTrigger as ko, SelectValue as yo } from "./components/ui/select.js";
|
|
47
|
-
import { Sheet as zo, SheetContent as
|
|
47
|
+
import { Sheet as zo, SheetContent as Eo, SheetDescription as Vo, SheetFooter as Oo, SheetHeader as Wo, SheetTitle as jo, SheetTrigger as qo } from "./components/ui/sheet.js";
|
|
48
48
|
import { Table as Ko, TableBody as Qo, TableCaption as Uo, TableCell as Xo, TableFooter as Yo, TableHead as Zo, TableHeader as _o, TableRow as $o } from "./components/ui/table.js";
|
|
49
49
|
import { Tabs as rt, TabsContent as ot, TabsList as tt, TabsTrigger as at } from "./components/ui/tabs.js";
|
|
50
50
|
import { ToggleGroup as it, ToggleGroupItem as pt } from "./components/ui/toggle-group.js";
|
|
@@ -52,10 +52,10 @@ import { Breadcrumb as lt, BreadcrumbEllipsis as ut, BreadcrumbItem as xt, Bread
|
|
|
52
52
|
import { Slider as st } from "./components/ui/slider.js";
|
|
53
53
|
import { CircularProgress as Mt } from "./components/ui/charts/circular.js";
|
|
54
54
|
import { ThemeSwitcher as Tt } from "./components/ui/theme-switcher.js";
|
|
55
|
-
import { DropdownMenu as
|
|
55
|
+
import { DropdownMenu as At, DropdownMenuContent as It, DropdownMenuItem as ht, DropdownMenuLabel as Pt, DropdownMenuSeparator as vt, DropdownMenuTrigger as Ft } from "./components/ui/dropdown-menu.js";
|
|
56
56
|
import { AudioVisualizer as Gt } from "./components/ui/audio-visualizer.js";
|
|
57
57
|
import { Carousel as Bt, CarouselContent as Rt, CarouselItem as Ht, CarouselNext as kt, CarouselPrevious as yt } from "./components/ui/carousel.js";
|
|
58
|
-
import { ChartContainer as zt, ChartLegend as
|
|
58
|
+
import { ChartContainer as zt, ChartLegend as Et, ChartLegendContent as Vt, ChartStyle as Ot, ChartTooltip as Wt, ChartTooltipContent as jt } from "./components/ui/chart.js";
|
|
59
59
|
import { Chat as Jt, ChatContainer as Kt, ChatForm as Qt, ChatMessages as Ut } from "./components/ui/chat.js";
|
|
60
60
|
import { ChatMessage as Yt } from "./components/ui/chat-message.js";
|
|
61
61
|
import { FilePreview as _t } from "./components/ui/file-preview.js";
|
|
@@ -64,7 +64,7 @@ import { MarkdownRenderer as oa } from "./components/ui/markdown-renderer.js";
|
|
|
64
64
|
import { MessageInput as aa } from "./components/ui/message-input.js";
|
|
65
65
|
import { MessageList as ia } from "./components/ui/message-list.js";
|
|
66
66
|
import { NavigationMenu as ma, NavigationMenuContent as la, NavigationMenuIndicator as ua, NavigationMenuItem as xa, NavigationMenuLink as da, NavigationMenuList as ga, NavigationMenuTrigger as Ca, NavigationMenuViewport as ba } from "./components/ui/navigation-menu.js";
|
|
67
|
-
import { Sidebar as sa, SidebarContent as Sa, SidebarFooter as Ma, SidebarGroup as ca, SidebarGroupAction as Ta, SidebarGroupContent as Da, SidebarGroupLabel as
|
|
67
|
+
import { Sidebar as sa, SidebarContent as Sa, SidebarFooter as Ma, SidebarGroup as ca, SidebarGroupAction as Ta, SidebarGroupContent as Da, SidebarGroupLabel as Aa, SidebarHeader as Ia, SidebarInput as ha, SidebarInset as Pa, SidebarMenu as va, SidebarMenuAction as Fa, SidebarMenuBadge as wa, SidebarMenuButton as Ga, SidebarMenuItem as La, SidebarMenuSkeleton as Ba, SidebarMenuSub as Ra, SidebarMenuSubButton as Ha, SidebarMenuSubItem as ka, SidebarProvider as ya, SidebarRail as Na, SidebarSeparator as za, SidebarTrigger as Ea, useSidebar as Va } from "./components/ui/sidebar.js";
|
|
68
68
|
import { DataTable as Wa } from "./components/ui/data-table.js";
|
|
69
69
|
import { ELogicalFilterOperator as qa } from "./components/ui/data-table.service.js";
|
|
70
70
|
import { GanttDimensions as Ka } from "./components/ui/gantt/enums/GanttDimensions.js";
|
|
@@ -80,12 +80,14 @@ import { DataCrossTableButtonsGroup as dn } from "./components/ui/tables/data-cr
|
|
|
80
80
|
import { DataCrossTableProvider as Cn } from "./components/ui/tables/data-cross-table/data-cross-table-context.js";
|
|
81
81
|
import { WeeklyCalendar as fn } from "./components/ui/weekly-calendar/weekly-calendar.js";
|
|
82
82
|
import { hexContrast as Sn, hexToRgba as Mn, stringToHexColor as cn } from "./lib/utils.js";
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
83
|
+
import { useEditorModal as Dn } from "./components/editor/editor-hooks/use-modal.js";
|
|
84
|
+
import { AppEditor as In } from "./components/ui/app-editor.js";
|
|
85
|
+
import { useAudioRecording as Pn } from "./hooks/use-audio-recording.js";
|
|
86
|
+
import { useAutoScroll as Fn } from "./hooks/use-auto-scroll.js";
|
|
87
|
+
import { useAutosizeTextArea as Gn } from "./hooks/use-autosize-textarea.js";
|
|
88
|
+
import { useCopyToClipboard as Bn } from "./hooks/use-copy-to-clipboard.js";
|
|
89
|
+
import { useDebounce as Hn } from "./hooks/use-debounce.js";
|
|
90
|
+
import { useIsMobile as yn } from "./hooks/use-mobile.js";
|
|
89
91
|
export {
|
|
90
92
|
ne as Accordion,
|
|
91
93
|
ie as AccordionContent,
|
|
@@ -103,11 +105,12 @@ export {
|
|
|
103
105
|
Te as AlertDialogTitle,
|
|
104
106
|
De as AlertDialogTrigger,
|
|
105
107
|
de as AlertTitle,
|
|
108
|
+
In as AppEditor,
|
|
106
109
|
mn as AppMultipleSelectDropdown,
|
|
107
110
|
nn as AppSelect,
|
|
108
111
|
en as AppSidebar,
|
|
109
112
|
a as AspectRatio,
|
|
110
|
-
|
|
113
|
+
Ie as AsyncSelect,
|
|
111
114
|
Gt as AudioVisualizer,
|
|
112
115
|
i as Avatar,
|
|
113
116
|
p as AvatarFallback,
|
|
@@ -134,8 +137,8 @@ export {
|
|
|
134
137
|
kt as CarouselNext,
|
|
135
138
|
yt as CarouselPrevious,
|
|
136
139
|
zt as ChartContainer,
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
Et as ChartLegend,
|
|
141
|
+
Vt as ChartLegendContent,
|
|
139
142
|
Ot as ChartStyle,
|
|
140
143
|
Wt as ChartTooltip,
|
|
141
144
|
jt as ChartTooltipContent,
|
|
@@ -151,8 +154,8 @@ export {
|
|
|
151
154
|
c as CollapsibleTrigger,
|
|
152
155
|
Ne as Command,
|
|
153
156
|
ze as CommandDialog,
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
Ee as CommandEmpty,
|
|
158
|
+
Ve as CommandGroup,
|
|
156
159
|
Oe as CommandInput,
|
|
157
160
|
We as CommandItem,
|
|
158
161
|
je as CommandList,
|
|
@@ -191,13 +194,13 @@ export {
|
|
|
191
194
|
Ya as DragStepSizes,
|
|
192
195
|
Tr as Drawer,
|
|
193
196
|
Dr as DrawerContent,
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
Ar as DrawerDescription,
|
|
198
|
+
Ir as DrawerFooter,
|
|
196
199
|
hr as DrawerHeader,
|
|
197
200
|
Pr as DrawerTitle,
|
|
198
201
|
vr as DrawerTrigger,
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
At as DropdownMenu,
|
|
203
|
+
It as DropdownMenuContent,
|
|
201
204
|
ht as DropdownMenuItem,
|
|
202
205
|
Pt as DropdownMenuLabel,
|
|
203
206
|
vt as DropdownMenuSeparator,
|
|
@@ -215,9 +218,9 @@ export {
|
|
|
215
218
|
Ua as GanttConsts,
|
|
216
219
|
Ka as GanttDimensions,
|
|
217
220
|
zr as HoverCard,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
+
Er as HoverCardContent,
|
|
222
|
+
Vr as HoverCardTrigger,
|
|
223
|
+
I as Icon,
|
|
221
224
|
P as Input,
|
|
222
225
|
F as InputOTP,
|
|
223
226
|
w as InputOTPGroup,
|
|
@@ -268,8 +271,8 @@ export {
|
|
|
268
271
|
y as RadioGroup,
|
|
269
272
|
N as RadioGroupItem,
|
|
270
273
|
Do as ResizableHandle,
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
Ao as ResizablePanel,
|
|
275
|
+
Io as ResizablePanelGroup,
|
|
273
276
|
Po as ScrollArea,
|
|
274
277
|
vo as ScrollBar,
|
|
275
278
|
wo as Select,
|
|
@@ -280,10 +283,10 @@ export {
|
|
|
280
283
|
Ho as SelectSeparator,
|
|
281
284
|
ko as SelectTrigger,
|
|
282
285
|
yo as SelectValue,
|
|
283
|
-
|
|
286
|
+
E as Separator,
|
|
284
287
|
zo as Sheet,
|
|
285
|
-
|
|
286
|
-
|
|
288
|
+
Eo as SheetContent,
|
|
289
|
+
Vo as SheetDescription,
|
|
287
290
|
Oo as SheetFooter,
|
|
288
291
|
Wo as SheetHeader,
|
|
289
292
|
jo as SheetTitle,
|
|
@@ -294,8 +297,8 @@ export {
|
|
|
294
297
|
ca as SidebarGroup,
|
|
295
298
|
Ta as SidebarGroupAction,
|
|
296
299
|
Da as SidebarGroupContent,
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
Aa as SidebarGroupLabel,
|
|
301
|
+
Ia as SidebarHeader,
|
|
299
302
|
ha as SidebarInput,
|
|
300
303
|
Pa as SidebarInset,
|
|
301
304
|
va as SidebarMenu,
|
|
@@ -310,7 +313,7 @@ export {
|
|
|
310
313
|
ya as SidebarProvider,
|
|
311
314
|
Na as SidebarRail,
|
|
312
315
|
za as SidebarSeparator,
|
|
313
|
-
|
|
316
|
+
Ea as SidebarTrigger,
|
|
314
317
|
O as Skeleton,
|
|
315
318
|
st as Slider,
|
|
316
319
|
j as Switch,
|
|
@@ -346,12 +349,13 @@ export {
|
|
|
346
349
|
Mn as hexToRgba,
|
|
347
350
|
cn as stringToHexColor,
|
|
348
351
|
U as toggleVariants,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
Pn as useAudioRecording,
|
|
353
|
+
Fn as useAutoScroll,
|
|
354
|
+
Gn as useAutosizeTextArea,
|
|
355
|
+
Bn as useCopyToClipboard,
|
|
356
|
+
Hn as useDebounce,
|
|
357
|
+
Dn as useEditorModal,
|
|
354
358
|
yr as useFormField,
|
|
355
|
-
|
|
356
|
-
|
|
359
|
+
yn as useIsMobile,
|
|
360
|
+
Va as useSidebar
|
|
357
361
|
};
|
package/dist/laif-ds.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.EditorTheme__code{background-color:transparent;font-family:Menlo,Consolas,Monaco,monospace;display:block;padding:8px 8px 8px 52px;line-height:1.53;font-size:13px;margin:8px 0;overflow-x:auto;border:1px solid #ccc;position:relative;border-radius:8px;tab-size:2}.EditorTheme__code:before{content:attr(data-gutter);position:absolute;background-color:transparent;border-right:1px solid #ccc;left:0;top:0;padding:8px;color:#777;white-space:pre-wrap;text-align:right;min-width:25px}.EditorTheme__table{border-collapse:collapse;border-spacing:0;overflow-y:scroll;overflow-x:scroll;table-layout:fixed;width:fit-content;width:100%;margin:0 25px 30px 0}.EditorTheme__tokenComment{color:#708090}.EditorTheme__tokenPunctuation{color:#999}.EditorTheme__tokenProperty{color:#905}.EditorTheme__tokenSelector{color:#690}.EditorTheme__tokenOperator{color:#9a6e3a}.EditorTheme__tokenAttr{color:#07a}.EditorTheme__tokenVariable{color:#e90}.EditorTheme__tokenFunction{color:#dd4a68}.Collapsible__container{background-color:var(--background);border:1px solid #ccc;border-radius:.5rem;margin-bottom:.5rem}.Collapsible__title{padding:.25rem .25rem .25rem 1rem;position:relative;font-weight:700;outline:none;cursor:pointer;list-style-type:disclosure-closed;list-style-position:inside}.Collapsible__title p{display:inline-flex}.Collapsible__title::marker{color:#d3d3d3}.Collapsible__container[open]>.Collapsible__title{list-style-type:disclosure-open}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { $generateNodesFromDOM as y, $generateHtmlFromNodes as $ } from "../html/LexicalHtml.prod.js";
|
|
3
|
+
import { $addNodeStyle as D, $sliceSelectedTextNodeContent as O } from "../selection/LexicalSelection.prod.js";
|
|
4
|
+
import { objectKlassEquals as R } from "../utils/LexicalUtils.prod.js";
|
|
5
|
+
import { $isRangeSelection as h, $getSelection as p, $createTabNode as E, getDOMSelection as T, COPY_COMMAND as _, COMMAND_PRIORITY_CRITICAL as A, SELECTION_INSERT_CLIPBOARD_NODES_COMMAND as M, $parseSerializedNode as v, $isTextNode as N, isSelectionWithinEditor as L, $getEditor as P, $getRoot as b, $isElementNode as g, $cloneWithProperties as F } from "../../lexical/Lexical.prod.js";
|
|
6
|
+
function x(t, ...e) {
|
|
7
|
+
const n = new URL("https://lexical.dev/docs/error"), i = new URLSearchParams();
|
|
8
|
+
i.append("code", t);
|
|
9
|
+
for (const r of e) i.append("v", r);
|
|
10
|
+
throw n.search = i.toString(), Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
11
|
+
}
|
|
12
|
+
function I(t, e = p()) {
|
|
13
|
+
return e == null && x(166), h(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : $(t, e);
|
|
14
|
+
}
|
|
15
|
+
function H(t, e = p()) {
|
|
16
|
+
return e == null && x(166), h(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(J(t, e));
|
|
17
|
+
}
|
|
18
|
+
function G(t, e, n) {
|
|
19
|
+
const i = t.getData("application/x-lexical-editor");
|
|
20
|
+
if (i) try {
|
|
21
|
+
const s = JSON.parse(i);
|
|
22
|
+
if (s.namespace === n._config.namespace && Array.isArray(s.nodes))
|
|
23
|
+
return w(n, z(s.nodes), e);
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
const r = t.getData("text/html"), d = t.getData("text/plain");
|
|
27
|
+
if (r && d !== r) try {
|
|
28
|
+
const s = new DOMParser().parseFromString(function(l) {
|
|
29
|
+
return window.trustedTypes && window.trustedTypes.createPolicy ? window.trustedTypes.createPolicy("lexical", { createHTML: (o) => o }).createHTML(l) : l;
|
|
30
|
+
}(r), "text/html");
|
|
31
|
+
return w(n, y(n, s), e);
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
const a = d || t.getData("text/uri-list");
|
|
35
|
+
if (a != null) if (h(e)) {
|
|
36
|
+
const s = a.split(/(\r?\n|\t)/);
|
|
37
|
+
s[s.length - 1] === "" && s.pop();
|
|
38
|
+
for (let l = 0; l < s.length; l++) {
|
|
39
|
+
const o = p();
|
|
40
|
+
if (h(o)) {
|
|
41
|
+
const c = s[l];
|
|
42
|
+
c === `
|
|
43
|
+
` || c === `\r
|
|
44
|
+
` ? o.insertParagraph() : c === " " ? o.insertNodes([E()]) : o.insertText(c);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
} else e.insertRawText(a);
|
|
48
|
+
}
|
|
49
|
+
function w(t, e, n) {
|
|
50
|
+
t.dispatchCommand(M, { nodes: e, selection: n }) || n.insertNodes(e);
|
|
51
|
+
}
|
|
52
|
+
function S(t, e, n, i = []) {
|
|
53
|
+
let r = e === null || n.isSelected(e);
|
|
54
|
+
const d = g(n) && n.excludeFromCopy("html");
|
|
55
|
+
let a = n;
|
|
56
|
+
if (e !== null) {
|
|
57
|
+
let o = F(n);
|
|
58
|
+
o = N(o) && e !== null ? O(e, o) : o, a = o;
|
|
59
|
+
}
|
|
60
|
+
const s = g(a) ? a.getChildren() : [], l = function(o) {
|
|
61
|
+
const c = o.exportJSON(), u = o.constructor;
|
|
62
|
+
if (c.type !== u.getType() && x(58, u.name), g(o)) {
|
|
63
|
+
const m = c.children;
|
|
64
|
+
Array.isArray(m) || x(59, u.name);
|
|
65
|
+
}
|
|
66
|
+
return c;
|
|
67
|
+
}(a);
|
|
68
|
+
if (N(a)) {
|
|
69
|
+
const o = a.__text;
|
|
70
|
+
o.length > 0 ? l.text = o : r = !1;
|
|
71
|
+
}
|
|
72
|
+
for (let o = 0; o < s.length; o++) {
|
|
73
|
+
const c = s[o], u = S(t, e, c, l.children);
|
|
74
|
+
!r && g(n) && u && n.extractWithChild(c, e, "clone") && (r = !0);
|
|
75
|
+
}
|
|
76
|
+
if (r && !d) i.push(l);
|
|
77
|
+
else if (Array.isArray(l.children)) for (let o = 0; o < l.children.length; o++) {
|
|
78
|
+
const c = l.children[o];
|
|
79
|
+
i.push(c);
|
|
80
|
+
}
|
|
81
|
+
return r;
|
|
82
|
+
}
|
|
83
|
+
function J(t, e) {
|
|
84
|
+
const n = [], i = b().getChildren();
|
|
85
|
+
for (let r = 0; r < i.length; r++)
|
|
86
|
+
S(t, e, i[r], n);
|
|
87
|
+
return { namespace: t._config.namespace, nodes: n };
|
|
88
|
+
}
|
|
89
|
+
function z(t) {
|
|
90
|
+
const e = [];
|
|
91
|
+
for (let n = 0; n < t.length; n++) {
|
|
92
|
+
const i = t[n], r = v(i);
|
|
93
|
+
N(r) && D(r), e.push(r);
|
|
94
|
+
}
|
|
95
|
+
return e;
|
|
96
|
+
}
|
|
97
|
+
let f = null;
|
|
98
|
+
async function K(t, e, n) {
|
|
99
|
+
if (f !== null) return !1;
|
|
100
|
+
if (e !== null) return new Promise((o, c) => {
|
|
101
|
+
t.update(() => {
|
|
102
|
+
o(C(t, e, n));
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
const i = t.getRootElement(), r = t._window || window, d = window.document, a = T(r);
|
|
106
|
+
if (i === null || a === null) return !1;
|
|
107
|
+
const s = d.createElement("span");
|
|
108
|
+
s.style.cssText = "position: fixed; top: -1000px;", s.append(d.createTextNode("#")), i.append(s);
|
|
109
|
+
const l = new Range();
|
|
110
|
+
return l.setStart(s, 0), l.setEnd(s, 1), a.removeAllRanges(), a.addRange(l), new Promise((o, c) => {
|
|
111
|
+
const u = t.registerCommand(_, (m) => (R(m, ClipboardEvent) && (u(), f !== null && (window.clearTimeout(f), f = null), o(C(t, m, n))), !0), A);
|
|
112
|
+
f = window.setTimeout(() => {
|
|
113
|
+
u(), f = null, o(!1);
|
|
114
|
+
}, 50), d.execCommand("copy"), s.remove();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function C(t, e, n) {
|
|
118
|
+
if (n === void 0) {
|
|
119
|
+
const r = T(t._window);
|
|
120
|
+
if (!r) return !1;
|
|
121
|
+
const d = r.anchorNode, a = r.focusNode;
|
|
122
|
+
if (d !== null && a !== null && !L(t, d, a)) return !1;
|
|
123
|
+
const s = p();
|
|
124
|
+
if (s === null) return !1;
|
|
125
|
+
n = B(s);
|
|
126
|
+
}
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
const i = e.clipboardData;
|
|
129
|
+
return i !== null && (U(i, n), !0);
|
|
130
|
+
}
|
|
131
|
+
const W = [["text/html", I], ["application/x-lexical-editor", H]];
|
|
132
|
+
function B(t = p()) {
|
|
133
|
+
const e = { "text/plain": t ? t.getTextContent() : "" };
|
|
134
|
+
if (t) {
|
|
135
|
+
const n = P();
|
|
136
|
+
for (const [i, r] of W) {
|
|
137
|
+
const d = r(n, t);
|
|
138
|
+
d !== null && (e[i] = d);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return e;
|
|
142
|
+
}
|
|
143
|
+
function U(t, e) {
|
|
144
|
+
for (const n in e) {
|
|
145
|
+
const i = e[n];
|
|
146
|
+
i !== void 0 && t.setData(n, i);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
J as $generateJSONFromSelectedNodes,
|
|
151
|
+
z as $generateNodesFromSerializedNodes,
|
|
152
|
+
B as $getClipboardDataFromSelection,
|
|
153
|
+
I as $getHtmlContent,
|
|
154
|
+
H as $getLexicalContent,
|
|
155
|
+
G as $insertDataTransferForRichText,
|
|
156
|
+
w as $insertGeneratedNodes,
|
|
157
|
+
K as copyToClipboard,
|
|
158
|
+
U as setLexicalClipboardDataTransfer
|
|
159
|
+
};
|