laif-ds 0.2.74 → 0.2.75
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/CHANGELOG.md +431 -0
- package/dist/agent-docs/adoption-report.json +614 -0
- package/dist/agent-docs/components/Accordion.md +46 -16
- package/dist/agent-docs/components/Alert.md +90 -95
- package/dist/agent-docs/components/AlertDialog.md +132 -126
- package/dist/agent-docs/components/AppEditor.md +90 -90
- package/dist/agent-docs/components/AppRadioGroup.md +18 -18
- package/dist/agent-docs/components/AppSidebar.md +129 -122
- package/dist/agent-docs/components/AppStepper.md +81 -77
- package/dist/agent-docs/components/AspectRatio.md +70 -62
- package/dist/agent-docs/components/AudioVisualizer.md +5 -5
- package/dist/agent-docs/components/Avatar.md +112 -113
- package/dist/agent-docs/components/Badge.md +123 -118
- package/dist/agent-docs/components/Breadcrumb.md +8 -1
- package/dist/agent-docs/components/Button.md +131 -129
- package/dist/agent-docs/components/Card.md +172 -147
- package/dist/agent-docs/components/Carousel.md +148 -129
- package/dist/agent-docs/components/Chat.md +121 -109
- package/dist/agent-docs/components/ChatMessage.md +72 -61
- package/dist/agent-docs/components/Checkbox.md +150 -135
- package/dist/agent-docs/components/CircularProgress.md +53 -49
- package/dist/agent-docs/components/CodeHighlighter.md +4 -4
- package/dist/agent-docs/components/Collapsible.md +114 -95
- package/dist/agent-docs/components/Command.md +141 -142
- package/dist/agent-docs/components/Confirmer.md +182 -175
- package/dist/agent-docs/components/ContextMenu.md +196 -191
- package/dist/agent-docs/components/DataCrossTable.md +114 -94
- package/dist/agent-docs/components/DataTable.md +29 -24
- package/dist/agent-docs/components/Dialog.md +130 -125
- package/dist/agent-docs/components/Drawer.md +141 -127
- package/dist/agent-docs/components/FilePreviewer.md +138 -139
- package/dist/agent-docs/components/FileUploader.md +143 -129
- package/dist/agent-docs/components/Form.md +3 -1
- package/dist/agent-docs/components/FormComposer.md +163 -137
- package/dist/agent-docs/components/GanttChart.md +125 -122
- package/dist/agent-docs/components/HoverCard.md +1 -1
- package/dist/agent-docs/components/Icon.md +98 -99
- package/dist/agent-docs/components/Input.md +173 -138
- package/dist/agent-docs/components/InputOtp.md +6 -1
- package/dist/agent-docs/components/InputSelector.md +94 -97
- package/dist/agent-docs/components/InterruptPrompt.md +4 -4
- package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
- package/dist/agent-docs/components/Menubar.md +60 -57
- package/dist/agent-docs/components/MessageInput.md +134 -131
- package/dist/agent-docs/components/MessageList.md +110 -96
- package/dist/agent-docs/components/MultipleSelector.md +147 -146
- package/dist/agent-docs/components/NavigationMenu.md +6 -2
- package/dist/agent-docs/components/Popover.md +112 -103
- package/dist/agent-docs/components/PromptSuggestions.md +5 -5
- package/dist/agent-docs/components/RadioGroup.md +97 -90
- package/dist/agent-docs/components/Resizable.md +4 -1
- package/dist/agent-docs/components/ResizePrompt.md +12 -13
- package/dist/agent-docs/components/ScrollArea.md +6 -2
- package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
- package/dist/agent-docs/components/Select.md +131 -132
- package/dist/agent-docs/components/Sheet.md +8 -1
- package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
- package/dist/agent-docs/components/Sidebar.md +94 -85
- package/dist/agent-docs/components/Slider.md +62 -58
- package/dist/agent-docs/components/Sonner.md +1 -0
- package/dist/agent-docs/components/Spinner.md +14 -14
- package/dist/agent-docs/components/Stepper.md +93 -67
- package/dist/agent-docs/components/Switch.md +41 -42
- package/dist/agent-docs/components/TableSkeleton.md +8 -8
- package/dist/agent-docs/components/Tabs.md +106 -86
- package/dist/agent-docs/components/TextArea.md +51 -52
- package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
- package/dist/agent-docs/components/Toaster.md +1 -0
- package/dist/agent-docs/components/Tooltip.md +102 -91
- package/dist/agent-docs/components/Typo.md +68 -65
- package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
- package/dist/agent-docs/manifest.json +5979 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
- package/dist/components/ui/app-checkbox.js +1 -1
- package/dist/components/ui/app-dialog.js +70 -64
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/app-form.js +81 -81
- package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
- package/dist/components/ui/app-select.js +109 -104
- package/dist/components/ui/app-sidebar.js +41 -41
- package/dist/components/ui/app-stepper.js +1 -1
- package/dist/components/ui/app-time-picker.js +18 -18
- package/dist/components/ui/app-tooltip.js +1 -1
- package/dist/components/ui/async-select.js +5 -5
- package/dist/components/ui/audio-visualizer.js +61 -58
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.js +2 -2
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chat-message.js +8 -8
- package/dist/components/ui/chat.js +86 -88
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/date-picker.js +20 -20
- package/dist/components/ui/file-preview/index.js +13 -13
- package/dist/components/ui/file-previewer.js +12 -11
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
- package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
- package/dist/components/ui/input-selector.js +1 -1
- package/dist/components/ui/input.js +23 -23
- package/dist/components/ui/kanban.js +8 -9
- package/dist/components/ui/markdown-renderer.js +41 -35
- package/dist/components/ui/message-input.js +45 -44
- package/dist/components/ui/multiple-selector.js +91 -82
- package/dist/components/ui/secure-pdf-viewer.js +19 -7
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/spinner.js +4 -4
- package/dist/components/ui/stepper.js +157 -138
- package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +204 -368
- package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
- package/dist/components/ui/tables/data-table/components/data-table-header.js +210 -0
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
- package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
- package/dist/components/ui/tables/data-table/data-table.js +256 -250
- package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
- package/dist/components/ui/tables/data-table/data-table.utils.js +2 -0
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
- package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
- package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
- package/dist/components/ui/weekly-calendar/day-column.js +16 -16
- package/dist/components/ui/weekly-calendar/time-column.js +4 -4
- package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
- package/dist/hooks/use-audio-recording.js +1 -1
- package/dist/hooks/use-auto-scroll.js +18 -18
- package/dist/hooks/use-autosize-textarea.js +12 -13
- package/dist/index.d.ts +67 -43
- package/dist/index.js +229 -229
- package/dist/lib/utils.js +6 -6
- package/dist/styles.v3.css +1 -1
- package/package.json +14 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useEffect as r } from "react";
|
|
3
2
|
import { useLexicalComposerContext as n } from "../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
|
|
4
|
-
import { SELECTION_CHANGE_COMMAND as m, $getSelection as
|
|
3
|
+
import { SELECTION_CHANGE_COMMAND as m, $getSelection as r, COMMAND_PRIORITY_CRITICAL as f } from "../../../node_modules/lexical/Lexical.prod.js";
|
|
4
|
+
import { useEffect as i } from "react";
|
|
5
5
|
import { useToolbarContext as C } from "../context/toolbar-context.js";
|
|
6
6
|
function c(t) {
|
|
7
7
|
const [s] = n(), { activeEditor: o } = C();
|
|
8
|
-
|
|
8
|
+
i(() => o.registerCommand(
|
|
9
9
|
m,
|
|
10
10
|
() => {
|
|
11
|
-
const e =
|
|
11
|
+
const e = r();
|
|
12
12
|
return e && t(e), !1;
|
|
13
13
|
},
|
|
14
14
|
f
|
|
15
|
-
), [s, t]),
|
|
15
|
+
), [s, t, o]), i(() => {
|
|
16
16
|
o.getEditorState().read(() => {
|
|
17
|
-
const e =
|
|
17
|
+
const e = r();
|
|
18
18
|
e && t(e);
|
|
19
19
|
});
|
|
20
20
|
}, [o, t]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as o } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useLexicalComposerContext as a } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
|
|
4
|
+
import { $rootTextContent as u } from "../../../../node_modules/@lexical/text/LexicalText.prod.js";
|
|
5
|
+
import { useState as d, useEffect as f } from "react";
|
|
6
6
|
let s = null;
|
|
7
7
|
function h() {
|
|
8
8
|
return window.TextEncoder === void 0 ? null : (s === null && (s = new window.TextEncoder()), s);
|
|
@@ -24,14 +24,14 @@ const c = (t, e) => {
|
|
|
24
24
|
function T({
|
|
25
25
|
charset: t = "UTF-16"
|
|
26
26
|
}) {
|
|
27
|
-
const [e] =
|
|
28
|
-
const r = e.getEditorState().read(
|
|
27
|
+
const [e] = a(), [n, l] = d(() => {
|
|
28
|
+
const r = e.getEditorState().read(u);
|
|
29
29
|
return {
|
|
30
30
|
characters: c(r, t),
|
|
31
31
|
words: i(r)
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
|
-
return
|
|
34
|
+
return f(() => e.registerTextContentListener((r) => {
|
|
35
35
|
l({
|
|
36
36
|
characters: c(r, t),
|
|
37
37
|
words: i(r)
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { $isTableSelection as m } from "../../../../node_modules/@lexical/table/LexicalTable.prod.js";
|
|
4
|
+
import { FORMAT_TEXT_COMMAND as l, $isRangeSelection as n } from "../../../../node_modules/lexical/Lexical.prod.js";
|
|
5
|
+
import { useState as d } from "react";
|
|
6
6
|
import { useToolbarContext as c } from "../../context/toolbar-context.js";
|
|
7
7
|
import { useUpdateToolbarHandler as p } from "../../editor-hooks/use-update-toolbar.js";
|
|
8
8
|
import { Toggle as f } from "../../../ui/toggle.js";
|
|
9
9
|
import u from "../../../../node_modules/lucide-react/dist/esm/icons/code.js";
|
|
10
10
|
import T from "../../../../node_modules/lucide-react/dist/esm/icons/strikethrough.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import h from "../../../../node_modules/lucide-react/dist/esm/icons/underline.js";
|
|
12
|
+
import b from "../../../../node_modules/lucide-react/dist/esm/icons/italic.js";
|
|
13
|
+
import g from "../../../../node_modules/lucide-react/dist/esm/icons/bold.js";
|
|
14
14
|
const C = {
|
|
15
|
-
bold:
|
|
16
|
-
italic:
|
|
17
|
-
underline:
|
|
15
|
+
bold: g,
|
|
16
|
+
italic: b,
|
|
17
|
+
underline: h,
|
|
18
18
|
strikethrough: T,
|
|
19
19
|
code: u
|
|
20
20
|
};
|
|
21
21
|
function R({
|
|
22
|
-
format:
|
|
22
|
+
format: r
|
|
23
23
|
}) {
|
|
24
|
-
const { activeEditor: a } = c(), [
|
|
25
|
-
p((
|
|
26
|
-
(
|
|
24
|
+
const { activeEditor: a } = c(), [e, t] = d(!1);
|
|
25
|
+
p((o) => {
|
|
26
|
+
(n(o) || m(o)) && "hasFormat" in o && t(o.hasFormat(r));
|
|
27
27
|
});
|
|
28
|
-
const s = C[
|
|
28
|
+
const s = C[r];
|
|
29
29
|
return /* @__PURE__ */ i(
|
|
30
30
|
f,
|
|
31
31
|
{
|
|
32
32
|
"aria-label": "Toggle bold",
|
|
33
33
|
variant: "outline",
|
|
34
34
|
size: "sm",
|
|
35
|
-
defaultPressed:
|
|
36
|
-
pressed:
|
|
35
|
+
defaultPressed: e,
|
|
36
|
+
pressed: e,
|
|
37
37
|
onPressedChange: t,
|
|
38
38
|
onClick: () => {
|
|
39
39
|
a.dispatchCommand(
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
l,
|
|
41
|
+
r
|
|
42
42
|
);
|
|
43
43
|
},
|
|
44
44
|
children: /* @__PURE__ */ i(s, { className: "h-4 w-4" })
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useLexicalComposerContext as u } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
|
|
4
|
+
import { mergeRegister as N } from "../../../../node_modules/@lexical/utils/LexicalUtils.prod.js";
|
|
5
|
+
import { CAN_REDO_COMMAND as b, COMMAND_PRIORITY_CRITICAL as n, CAN_UNDO_COMMAND as R, UNDO_COMMAND as M, REDO_COMMAND as O } from "../../../../node_modules/lexical/Lexical.prod.js";
|
|
6
|
+
import { useState as s, useEffect as D } from "react";
|
|
7
7
|
import { useToolbarContext as g } from "../../context/toolbar-context.js";
|
|
8
8
|
import { Button as d } from "../../../ui/button.js";
|
|
9
9
|
import x from "../../../../node_modules/lucide-react/dist/esm/icons/undo.js";
|
|
10
10
|
import A from "../../../../node_modules/lucide-react/dist/esm/icons/redo.js";
|
|
11
11
|
function j() {
|
|
12
|
-
const [i] =
|
|
13
|
-
return
|
|
12
|
+
const [i] = u(), { activeEditor: t, $updateToolbar: a } = g(), [r, l] = s(i.isEditable()), [m, c] = s(!1), [C, p] = s(!1);
|
|
13
|
+
return D(() => N(
|
|
14
14
|
i.registerEditableListener((e) => {
|
|
15
15
|
l(e);
|
|
16
16
|
}),
|
|
@@ -20,12 +20,12 @@ function j() {
|
|
|
20
20
|
});
|
|
21
21
|
}),
|
|
22
22
|
t.registerCommand(
|
|
23
|
-
|
|
23
|
+
R,
|
|
24
24
|
(e) => (c(e), !1),
|
|
25
25
|
n
|
|
26
26
|
),
|
|
27
27
|
t.registerCommand(
|
|
28
|
-
|
|
28
|
+
b,
|
|
29
29
|
(e) => (p(e), !1),
|
|
30
30
|
n
|
|
31
31
|
)
|
|
@@ -35,7 +35,7 @@ function j() {
|
|
|
35
35
|
{
|
|
36
36
|
disabled: !m || !r,
|
|
37
37
|
onClick: () => {
|
|
38
|
-
t.dispatchCommand(
|
|
38
|
+
t.dispatchCommand(M, void 0);
|
|
39
39
|
},
|
|
40
40
|
title: "Undo (⌘Z)",
|
|
41
41
|
type: "button",
|
|
@@ -51,7 +51,7 @@ function j() {
|
|
|
51
51
|
{
|
|
52
52
|
disabled: !C || !r,
|
|
53
53
|
onClick: () => {
|
|
54
|
-
t.dispatchCommand(
|
|
54
|
+
t.dispatchCommand(O, void 0);
|
|
55
55
|
},
|
|
56
56
|
title: "Redo (⇧⌘Z)",
|
|
57
57
|
type: "button",
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useLexicalComposerContext as d } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
|
|
4
|
+
import { SELECTION_CHANGE_COMMAND as u, COMMAND_PRIORITY_CRITICAL as f } from "../../../../node_modules/lexical/Lexical.prod.js";
|
|
5
|
+
import { useState as e, useEffect as C } from "react";
|
|
6
6
|
import { ToolbarContext as T } from "../../context/toolbar-context.js";
|
|
7
7
|
import { useEditorModal as E } from "../../editor-hooks/use-modal.js";
|
|
8
8
|
function O({
|
|
9
9
|
children: s
|
|
10
10
|
}) {
|
|
11
|
-
const [
|
|
11
|
+
const [t] = d(), [o, a] = e(t), [r, i] = e("paragraph"), [m, n] = E(), l = () => {
|
|
12
12
|
};
|
|
13
|
-
return
|
|
14
|
-
|
|
13
|
+
return C(() => o.registerCommand(
|
|
14
|
+
u,
|
|
15
15
|
(M, c) => (a(c), !1),
|
|
16
|
-
|
|
17
|
-
), [o]), /* @__PURE__ */ p(
|
|
16
|
+
f
|
|
17
|
+
), [t, o]), /* @__PURE__ */ p(
|
|
18
18
|
T,
|
|
19
19
|
{
|
|
20
|
-
activeEditor:
|
|
20
|
+
activeEditor: o,
|
|
21
21
|
$updateToolbar: l,
|
|
22
22
|
blockType: r,
|
|
23
23
|
setBlockType: i,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
3
|
+
import * as A from "react";
|
|
3
4
|
import { designTokens as v } from "../design-tokens.js";
|
|
4
5
|
import { cn as r } from "../../lib/utils.js";
|
|
5
|
-
import * as A from "react";
|
|
6
6
|
import { Checkbox as H } from "./checkbox.js";
|
|
7
7
|
import { Icon as L } from "./icon.js";
|
|
8
8
|
import { Label as R } from "./label.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l, jsxs as
|
|
3
|
-
import { DialogTitle as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Dialog as
|
|
7
|
-
import { Typo as
|
|
8
|
-
import { cn as
|
|
9
|
-
const
|
|
2
|
+
import { jsx as l, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { DialogTitle as C, DialogDescription as b } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
+
import { cva as z } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { Button as j } from "./button.js";
|
|
6
|
+
import { Dialog as T, DialogTrigger as A, DialogContent as B, DialogHeader as E, DialogClose as I, DialogFooter as K } from "./dialog.js";
|
|
7
|
+
import { Typo as c } from "./typo.js";
|
|
8
|
+
import { cn as f } from "../../lib/utils.js";
|
|
9
|
+
const V = z(
|
|
10
10
|
[
|
|
11
11
|
"flex flex-col justify-between gap-2 w-full h-dvh max-w-[initial] p-6",
|
|
12
12
|
"max-sm:rounded-none max-sm:px-2 max-sm:py-3 max-sm:min-w-full max-sm:min-h-full max-sm:w-full max-sm:h-full max-sm:max-w-full max-sm:max-h-full"
|
|
@@ -26,90 +26,96 @@ const k = b(
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
function
|
|
30
|
-
children:
|
|
31
|
-
trigger:
|
|
32
|
-
title:
|
|
33
|
-
description:
|
|
34
|
-
footer:
|
|
35
|
-
size:
|
|
36
|
-
open:
|
|
37
|
-
defaultOpen:
|
|
38
|
-
onOpenChange:
|
|
39
|
-
triggerClassName:
|
|
40
|
-
headerClassName:
|
|
41
|
-
bodyClassName:
|
|
42
|
-
footerClassName:
|
|
43
|
-
disabled:
|
|
44
|
-
asChild:
|
|
45
|
-
preventClose:
|
|
46
|
-
...
|
|
29
|
+
function G({
|
|
30
|
+
children: r,
|
|
31
|
+
trigger: m,
|
|
32
|
+
title: t,
|
|
33
|
+
description: o,
|
|
34
|
+
footer: s,
|
|
35
|
+
size: w = "default",
|
|
36
|
+
open: u,
|
|
37
|
+
defaultOpen: p,
|
|
38
|
+
onOpenChange: x,
|
|
39
|
+
triggerClassName: d,
|
|
40
|
+
headerClassName: D,
|
|
41
|
+
bodyClassName: g,
|
|
42
|
+
footerClassName: v,
|
|
43
|
+
disabled: h = !1,
|
|
44
|
+
asChild: N = !1,
|
|
45
|
+
preventClose: n,
|
|
46
|
+
...e
|
|
47
47
|
}) {
|
|
48
|
-
const
|
|
49
|
-
return
|
|
50
|
-
|
|
48
|
+
const y = u !== void 0;
|
|
49
|
+
return h ? /* @__PURE__ */ l("div", { className: d, children: m }) : /* @__PURE__ */ i(
|
|
50
|
+
T,
|
|
51
51
|
{
|
|
52
|
-
open:
|
|
53
|
-
defaultOpen:
|
|
54
|
-
onOpenChange:
|
|
52
|
+
open: y ? u : void 0,
|
|
53
|
+
defaultOpen: p,
|
|
54
|
+
onOpenChange: x,
|
|
55
55
|
children: [
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
m && /* @__PURE__ */ l(
|
|
57
|
+
A,
|
|
58
58
|
{
|
|
59
|
-
asChild:
|
|
60
|
-
className:
|
|
61
|
-
disabled:
|
|
62
|
-
children:
|
|
59
|
+
asChild: N,
|
|
60
|
+
className: d,
|
|
61
|
+
disabled: h,
|
|
62
|
+
children: m
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
/* @__PURE__ */ i(
|
|
66
|
+
B,
|
|
67
67
|
{
|
|
68
|
-
...
|
|
69
|
-
className:
|
|
70
|
-
|
|
71
|
-
size:
|
|
68
|
+
...e,
|
|
69
|
+
className: f(
|
|
70
|
+
V({
|
|
71
|
+
size: w
|
|
72
72
|
}),
|
|
73
|
-
|
|
73
|
+
e.className
|
|
74
74
|
),
|
|
75
|
+
onInteractOutside: (a) => {
|
|
76
|
+
e.onInteractOutside?.(a), (n === "overlay" || n === "all") && a.preventDefault();
|
|
77
|
+
},
|
|
78
|
+
onEscapeKeyDown: (a) => {
|
|
79
|
+
e.onEscapeKeyDown?.(a), n === "all" && a.preventDefault();
|
|
80
|
+
},
|
|
75
81
|
showCloseButton: !1,
|
|
76
82
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ l(
|
|
80
|
-
/* @__PURE__ */ l(
|
|
81
|
-
|
|
83
|
+
/* @__PURE__ */ i(E, { className: f("gap-1", D), children: [
|
|
84
|
+
/* @__PURE__ */ i("div", { className: "flex w-full flex-row items-start gap-2", children: [
|
|
85
|
+
/* @__PURE__ */ l(C, { asChild: !0, children: /* @__PURE__ */ l(c, { variant: "h5", className: "flex flex-1", children: t }) }),
|
|
86
|
+
/* @__PURE__ */ l(I, { asChild: !0, children: /* @__PURE__ */ l(
|
|
87
|
+
j,
|
|
82
88
|
{
|
|
83
89
|
iconLeft: "X",
|
|
84
90
|
variant: "ghost",
|
|
85
91
|
size: "icon",
|
|
86
92
|
className: "size-7",
|
|
87
|
-
onClick: () =>
|
|
93
|
+
onClick: () => x?.(!1)
|
|
88
94
|
}
|
|
89
95
|
) })
|
|
90
96
|
] }),
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
o && /* @__PURE__ */ l(b, { asChild: !0, children: /* @__PURE__ */ l(
|
|
98
|
+
c,
|
|
93
99
|
{
|
|
94
100
|
variant: "caption",
|
|
95
101
|
className: "text-d-secondary-foreground flex flex-1",
|
|
96
|
-
children:
|
|
102
|
+
children: o
|
|
97
103
|
}
|
|
98
104
|
) })
|
|
99
105
|
] }),
|
|
100
|
-
|
|
106
|
+
r && /* @__PURE__ */ l(
|
|
101
107
|
"div",
|
|
102
108
|
{
|
|
103
|
-
className:
|
|
109
|
+
className: f(
|
|
104
110
|
"border-d-border flex min-h-0 w-full flex-1 flex-col gap-2 overflow-auto py-2",
|
|
105
|
-
(!!
|
|
106
|
-
!!
|
|
107
|
-
|
|
111
|
+
(!!t || !!o) && "border-t",
|
|
112
|
+
!!s && "border-b",
|
|
113
|
+
g
|
|
108
114
|
),
|
|
109
|
-
children:
|
|
115
|
+
children: r
|
|
110
116
|
}
|
|
111
117
|
),
|
|
112
|
-
|
|
118
|
+
s && /* @__PURE__ */ l(K, { className: v, children: s })
|
|
113
119
|
]
|
|
114
120
|
}
|
|
115
121
|
)
|
|
@@ -118,7 +124,7 @@ function J({
|
|
|
118
124
|
);
|
|
119
125
|
}
|
|
120
126
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
127
|
+
G as AppDialog,
|
|
128
|
+
I as AppDialogClose,
|
|
129
|
+
G as default
|
|
124
130
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as t, Fragment as s } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ListNode as w, ListItemNode as L } from "../../node_modules/@lexical/list/LexicalList.prod.js";
|
|
4
|
+
import { $convertToMarkdownString as S, $convertFromMarkdownString as T, TRANSFORMERS as C } from "../../node_modules/@lexical/markdown/LexicalMarkdown.prod.js";
|
|
5
|
+
import { CheckListPlugin as j } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
|
|
6
|
+
import { ClearEditorPlugin as A } from "../../node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js";
|
|
7
|
+
import { LexicalComposer as B } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
|
|
8
|
+
import { useLexicalComposerContext as H } from "../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
|
|
9
|
+
import { LexicalErrorBoundary as R } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
|
|
10
|
+
import { HistoryPlugin as $ } from "../../node_modules/@lexical/react/LexicalHistoryPlugin.prod.js";
|
|
11
|
+
import { ListPlugin as O } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
|
|
12
|
+
import { OnChangePlugin as z } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
|
|
13
|
+
import { RichTextPlugin as D } from "../../node_modules/@lexical/react/LexicalRichTextPlugin.prod.js";
|
|
14
|
+
import { HeadingNode as I, QuoteNode as M } from "../../node_modules/@lexical/rich-text/LexicalRichText.prod.js";
|
|
8
15
|
import { ParagraphNode as d, TextNode as p, $getRoot as f } from "../../node_modules/lexical/Lexical.prod.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { ActionsPlugin as I } from "../editor/plugins/actions/actions-plugin.js";
|
|
15
|
-
import { ClearEditorActionPlugin as _ } from "../editor/plugins/actions/clear-editor-plugin.js";
|
|
16
|
-
import { ClearEditorPlugin as M } from "../../node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js";
|
|
17
|
-
import { CounterCharacterPlugin as Q } from "../editor/plugins/actions/counter-character-plugin.js";
|
|
18
|
-
import { ToolbarPlugin as c } from "../editor/plugins/toolbar/toolbar-plugin.js";
|
|
19
|
-
import { BlockFormatDropDown as J } from "../editor/plugins/toolbar/block-format-toolbar-plugin.js";
|
|
20
|
-
import { FormatParagraph as U } from "../editor/plugins/toolbar/block-format/format-paragraph.js";
|
|
21
|
-
import { FormatHeading as q } from "../editor/plugins/toolbar/block-format/format-heading.js";
|
|
22
|
-
import { FormatNumberedList as G } from "../editor/plugins/toolbar/block-format/format-numbered-list.js";
|
|
16
|
+
import { useState as Q, useEffect as _ } from "react";
|
|
17
|
+
import { ContentEditable as J } from "../editor/editor-ui/content-editable.js";
|
|
18
|
+
import { ActionsPlugin as U } from "../editor/plugins/actions/actions-plugin.js";
|
|
19
|
+
import { ClearEditorActionPlugin as q } from "../editor/plugins/actions/clear-editor-plugin.js";
|
|
20
|
+
import { CounterCharacterPlugin as G } from "../editor/plugins/actions/counter-character-plugin.js";
|
|
23
21
|
import { FormatBulletedList as K } from "../editor/plugins/toolbar/block-format/format-bulleted-list.js";
|
|
24
22
|
import { FormatCheckList as W } from "../editor/plugins/toolbar/block-format/format-check-list.js";
|
|
25
|
-
import {
|
|
23
|
+
import { FormatHeading as X } from "../editor/plugins/toolbar/block-format/format-heading.js";
|
|
24
|
+
import { FormatNumberedList as Y } from "../editor/plugins/toolbar/block-format/format-numbered-list.js";
|
|
25
|
+
import { FormatParagraph as Z } from "../editor/plugins/toolbar/block-format/format-paragraph.js";
|
|
26
|
+
import { FormatQuote as V } from "../editor/plugins/toolbar/block-format/format-quote.js";
|
|
27
|
+
import { BlockFormatDropDown as rr } from "../editor/plugins/toolbar/block-format-toolbar-plugin.js";
|
|
26
28
|
import { FontFormatToolbarPlugin as l } from "../editor/plugins/toolbar/font-format-toolbar-plugin.js";
|
|
27
|
-
import {
|
|
28
|
-
import { CheckListPlugin as Z } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
|
|
29
|
-
import { ListNode as V, ListItemNode as rr } from "../../node_modules/@lexical/list/LexicalList.prod.js";
|
|
29
|
+
import { ToolbarPlugin as c } from "../editor/plugins/toolbar/toolbar-plugin.js";
|
|
30
30
|
import { editorTheme as or } from "../editor/themes/editor-theme.js";
|
|
31
31
|
import { TooltipProvider as tr } from "./tooltip.js";
|
|
32
32
|
import { HistoryToolbarPlugin as er } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
|
|
@@ -35,10 +35,10 @@ function nr({
|
|
|
35
35
|
defaultValue: o,
|
|
36
36
|
onlyMarkdown: i
|
|
37
37
|
}) {
|
|
38
|
-
const [n] =
|
|
39
|
-
return
|
|
38
|
+
const [n] = H();
|
|
39
|
+
return _(() => {
|
|
40
40
|
o && n.update(() => {
|
|
41
|
-
i ?
|
|
41
|
+
i ? T(o, C) : f().append(
|
|
42
42
|
new d().append(new p(o))
|
|
43
43
|
);
|
|
44
44
|
const a = f();
|
|
@@ -46,7 +46,7 @@ function nr({
|
|
|
46
46
|
});
|
|
47
47
|
}, [n, o, i]), null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Or({
|
|
50
50
|
defaultValue: o,
|
|
51
51
|
onMarkdownEdit: i,
|
|
52
52
|
plugins: n = [],
|
|
@@ -55,16 +55,16 @@ function zr({
|
|
|
55
55
|
onlyMarkdown: h = !0,
|
|
56
56
|
className: F = "overflow-hidden rounded-lg border border-d-border"
|
|
57
57
|
}) {
|
|
58
|
-
const [
|
|
58
|
+
const [, P] = Q(null), y = {
|
|
59
59
|
namespace: "AppEditor",
|
|
60
60
|
theme: or,
|
|
61
61
|
nodes: [
|
|
62
|
-
|
|
62
|
+
I,
|
|
63
63
|
d,
|
|
64
64
|
p,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
M,
|
|
66
|
+
w,
|
|
67
|
+
L
|
|
68
68
|
],
|
|
69
69
|
onError: (e) => {
|
|
70
70
|
console.error(e);
|
|
@@ -77,7 +77,7 @@ function zr({
|
|
|
77
77
|
}
|
|
78
78
|
} : {}
|
|
79
79
|
}, u = (e) => n.includes(e), m = (e) => a.includes(e), g = u("clear"), v = u("counter"), b = m("block-format"), E = m("font-format"), x = m("history");
|
|
80
|
-
return /* @__PURE__ */ r("div", { className: "bg-d-background", children: /* @__PURE__ */ r(
|
|
80
|
+
return /* @__PURE__ */ r("div", { className: "bg-d-background", children: /* @__PURE__ */ r(B, { initialConfig: y, children: /* @__PURE__ */ t(tr, { children: [
|
|
81
81
|
o && /* @__PURE__ */ r(
|
|
82
82
|
nr,
|
|
83
83
|
{
|
|
@@ -87,13 +87,13 @@ function zr({
|
|
|
87
87
|
),
|
|
88
88
|
/* @__PURE__ */ t("div", { className: "border-d-border flex items-center border-b", children: [
|
|
89
89
|
x && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(er, {}) }) }),
|
|
90
|
-
b && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(
|
|
91
|
-
/* @__PURE__ */ r(
|
|
92
|
-
/* @__PURE__ */ r(
|
|
93
|
-
/* @__PURE__ */ r(
|
|
90
|
+
b && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(rr, { children: [
|
|
91
|
+
/* @__PURE__ */ r(Z, {}),
|
|
92
|
+
/* @__PURE__ */ r(X, { levels: ["h1", "h2", "h3"] }),
|
|
93
|
+
/* @__PURE__ */ r(Y, {}),
|
|
94
94
|
/* @__PURE__ */ r(K, {}),
|
|
95
95
|
/* @__PURE__ */ r(W, {}),
|
|
96
|
-
/* @__PURE__ */ r(
|
|
96
|
+
/* @__PURE__ */ r(V, {})
|
|
97
97
|
] }) }) }) }),
|
|
98
98
|
E && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
|
|
99
99
|
/* @__PURE__ */ r(l, { format: "bold" }),
|
|
@@ -103,13 +103,13 @@ function zr({
|
|
|
103
103
|
] }) })
|
|
104
104
|
] }),
|
|
105
105
|
/* @__PURE__ */ t("div", { className: "relative", children: [
|
|
106
|
-
x && /* @__PURE__ */ r(
|
|
106
|
+
x && /* @__PURE__ */ r($, {}),
|
|
107
107
|
/* @__PURE__ */ r(
|
|
108
|
-
|
|
108
|
+
D,
|
|
109
109
|
{
|
|
110
|
-
ErrorBoundary:
|
|
110
|
+
ErrorBoundary: R,
|
|
111
111
|
contentEditable: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("div", { ref: P, children: /* @__PURE__ */ r(
|
|
112
|
-
|
|
112
|
+
J,
|
|
113
113
|
{
|
|
114
114
|
placeholder: N,
|
|
115
115
|
className: `ContentEditable__root relative block h-72 min-h-full overflow-auto px-8 py-4 focus:outline-none ${F}`
|
|
@@ -118,26 +118,26 @@ function zr({
|
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
120
|
b && /* @__PURE__ */ t(s, { children: [
|
|
121
|
-
/* @__PURE__ */ r(
|
|
122
|
-
/* @__PURE__ */ r(
|
|
121
|
+
/* @__PURE__ */ r(O, {}),
|
|
122
|
+
/* @__PURE__ */ r(j, {})
|
|
123
123
|
] }),
|
|
124
|
-
(g || v) && /* @__PURE__ */ r(
|
|
124
|
+
(g || v) && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
|
|
125
125
|
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-start" }),
|
|
126
|
-
/* @__PURE__ */ r("div", { children: v && /* @__PURE__ */ r(
|
|
126
|
+
/* @__PURE__ */ r("div", { children: v && /* @__PURE__ */ r(G, { charset: "UTF-16" }) }),
|
|
127
127
|
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-end gap-2", children: g && /* @__PURE__ */ t(s, { children: [
|
|
128
|
-
/* @__PURE__ */ r(
|
|
129
|
-
/* @__PURE__ */ r(
|
|
128
|
+
/* @__PURE__ */ r(q, {}),
|
|
129
|
+
/* @__PURE__ */ r(A, {})
|
|
130
130
|
] }) })
|
|
131
131
|
] }) })
|
|
132
132
|
] }),
|
|
133
133
|
/* @__PURE__ */ r(
|
|
134
|
-
|
|
134
|
+
z,
|
|
135
135
|
{
|
|
136
136
|
ignoreSelectionChange: !0,
|
|
137
137
|
onChange: (e) => {
|
|
138
138
|
if (!i) return;
|
|
139
139
|
const k = e.read(
|
|
140
|
-
() =>
|
|
140
|
+
() => S(C)
|
|
141
141
|
);
|
|
142
142
|
i(k);
|
|
143
143
|
}
|
|
@@ -146,5 +146,5 @@ function zr({
|
|
|
146
146
|
] }) }) });
|
|
147
147
|
}
|
|
148
148
|
export {
|
|
149
|
-
|
|
149
|
+
Or as AppEditor
|
|
150
150
|
};
|