laif-ds 0.1.76 → 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.
Files changed (112) hide show
  1. package/dist/_virtual/prism-cpp.js +3 -0
  2. package/dist/_virtual/prism-cpp2.js +5 -0
  3. package/dist/_virtual/prism-java.js +3 -0
  4. package/dist/_virtual/prism-java2.js +5 -0
  5. package/dist/_virtual/prism-python.js +3 -0
  6. package/dist/_virtual/prism-python2.js +5 -0
  7. package/dist/_virtual/prism-rust.js +3 -0
  8. package/dist/_virtual/prism-rust2.js +5 -0
  9. package/dist/_virtual/prism-typescript.js +3 -0
  10. package/dist/_virtual/prism-typescript2.js +5 -0
  11. package/dist/_virtual/prism.js +3 -0
  12. package/dist/_virtual/prism2.js +5 -0
  13. package/dist/components/editor/context/toolbar-context.js +42 -0
  14. package/dist/components/editor/editor-hooks/use-modal.js +30 -0
  15. package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
  16. package/dist/components/editor/editor-ui/content-editable.js +26 -0
  17. package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
  18. package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
  19. package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
  20. package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
  21. package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
  22. package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
  23. package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
  24. package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
  25. package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
  26. package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
  27. package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
  28. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
  29. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
  30. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
  31. package/dist/components/editor/themes/editor-theme.js +112 -0
  32. package/dist/components/ui/accordion.js +1 -1
  33. package/dist/components/ui/alert-dialog.js +3 -3
  34. package/dist/components/ui/alert.js +3 -3
  35. package/dist/components/ui/app-editor.js +150 -0
  36. package/dist/components/ui/app-multiple-select-dropdown.js +13 -13
  37. package/dist/components/ui/async-select.js +18 -18
  38. package/dist/components/ui/button.js +25 -24
  39. package/dist/components/ui/calendar.js +9 -9
  40. package/dist/components/ui/card.js +26 -26
  41. package/dist/components/ui/chat-message.js +6 -6
  42. package/dist/components/ui/chat.js +44 -44
  43. package/dist/components/ui/context-menu.js +2 -2
  44. package/dist/components/ui/dialog.js +46 -40
  45. package/dist/components/ui/drawer.js +33 -33
  46. package/dist/components/ui/dropdown-menu.js +20 -20
  47. package/dist/components/ui/file-preview.js +51 -51
  48. package/dist/components/ui/gantt/components/Controls/Controls.js +51 -60
  49. package/dist/components/ui/hover-card.js +5 -5
  50. package/dist/components/ui/input-selector.js +19 -19
  51. package/dist/components/ui/interrupt-prompt.js +6 -6
  52. package/dist/components/ui/markdown-renderer.js +16 -16
  53. package/dist/components/ui/menubar.js +26 -26
  54. package/dist/components/ui/message-input.js +9 -9
  55. package/dist/components/ui/multiple-selector.js +20 -20
  56. package/dist/components/ui/navigation-menu.js +5 -5
  57. package/dist/components/ui/popover.js +4 -4
  58. package/dist/components/ui/prompt-suggestions.js +11 -11
  59. package/dist/components/ui/resizable.js +2 -2
  60. package/dist/components/ui/sheet.js +16 -16
  61. package/dist/components/ui/sidebar.js +24 -23
  62. package/dist/components/ui/table-skeleton.js +36 -36
  63. package/dist/components/ui/table.js +25 -25
  64. package/dist/components/ui/toggle-group.js +15 -15
  65. package/dist/components/ui/weekly-calendar/appointment-card.js +24 -24
  66. package/dist/index.d.ts +23 -1
  67. package/dist/index.js +48 -44
  68. package/dist/laif-ds.css +1 -0
  69. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
  70. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
  71. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
  72. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
  73. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
  74. package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
  75. package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
  76. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
  77. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
  78. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
  79. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
  80. package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
  81. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
  82. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
  83. package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
  84. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
  85. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
  86. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
  87. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
  88. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
  89. package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
  90. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
  91. package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
  92. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
  93. package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
  94. package/dist/node_modules/prismjs/components/prism-c.js +77 -0
  95. package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
  96. package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
  97. package/dist/node_modules/prismjs/components/prism-css.js +56 -0
  98. package/dist/node_modules/prismjs/components/prism-java.js +122 -0
  99. package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
  100. package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
  101. package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
  102. package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
  103. package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
  104. package/dist/node_modules/prismjs/components/prism-python.js +69 -0
  105. package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
  106. package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
  107. package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
  108. package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
  109. package/dist/node_modules/prismjs/prism.js +1165 -0
  110. package/dist/styles.css +1 -1
  111. package/dist/styles.v3.css +1 -1
  112. package/package.json +12 -1
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
3
+ import { useState as s, useEffect as u } from "react";
4
+ import { useLexicalComposerContext as N } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
5
+ import { mergeRegister as b } from "../../../../node_modules/@lexical/utils/LexicalUtils.prod.js";
6
+ import { CAN_REDO_COMMAND as R, COMMAND_PRIORITY_CRITICAL as n, CAN_UNDO_COMMAND as M, UNDO_COMMAND as O, REDO_COMMAND as D } from "../../../../node_modules/lexical/Lexical.prod.js";
7
+ import { useToolbarContext as g } from "../../context/toolbar-context.js";
8
+ import { Button as d } from "../../../ui/button.js";
9
+ import x from "../../../../node_modules/lucide-react/dist/esm/icons/undo.js";
10
+ import A from "../../../../node_modules/lucide-react/dist/esm/icons/redo.js";
11
+ function j() {
12
+ const [i] = N(), { activeEditor: t, $updateToolbar: a } = g(), [r, l] = s(i.isEditable()), [m, c] = s(!1), [C, p] = s(!1);
13
+ return u(() => b(
14
+ i.registerEditableListener((e) => {
15
+ l(e);
16
+ }),
17
+ t.registerUpdateListener(({ editorState: e }) => {
18
+ e.read(() => {
19
+ a();
20
+ });
21
+ }),
22
+ t.registerCommand(
23
+ M,
24
+ (e) => (c(e), !1),
25
+ n
26
+ ),
27
+ t.registerCommand(
28
+ R,
29
+ (e) => (p(e), !1),
30
+ n
31
+ )
32
+ ), [a, t, i]), /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
33
+ /* @__PURE__ */ o(
34
+ d,
35
+ {
36
+ disabled: !m || !r,
37
+ onClick: () => {
38
+ t.dispatchCommand(O, void 0);
39
+ },
40
+ title: "Undo (⌘Z)",
41
+ type: "button",
42
+ "aria-label": "Undo",
43
+ size: "icon",
44
+ className: "!h-8 !w-8",
45
+ variant: "outline",
46
+ children: /* @__PURE__ */ o(x, { className: "size-4" })
47
+ }
48
+ ),
49
+ /* @__PURE__ */ o(
50
+ d,
51
+ {
52
+ disabled: !C || !r,
53
+ onClick: () => {
54
+ t.dispatchCommand(D, void 0);
55
+ },
56
+ title: "Redo (⇧⌘Z)",
57
+ type: "button",
58
+ "aria-label": "Redo",
59
+ variant: "outline",
60
+ size: "icon",
61
+ className: "!h-8 !w-8",
62
+ children: /* @__PURE__ */ o(A, { className: "size-4" })
63
+ }
64
+ )
65
+ ] });
66
+ }
67
+ export {
68
+ j as HistoryToolbarPlugin
69
+ };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsxs as p } from "react/jsx-runtime";
3
+ import { useState as e, useEffect as d } from "react";
4
+ import { useLexicalComposerContext as u } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
5
+ import { SELECTION_CHANGE_COMMAND as f, COMMAND_PRIORITY_CRITICAL as C } from "../../../../node_modules/lexical/Lexical.prod.js";
6
+ import { ToolbarContext as T } from "../../context/toolbar-context.js";
7
+ import { useEditorModal as E } from "../../editor-hooks/use-modal.js";
8
+ function O({
9
+ children: s
10
+ }) {
11
+ const [o] = u(), [t, a] = e(o), [r, i] = e("paragraph"), [m, n] = E(), l = () => {
12
+ };
13
+ return d(() => t.registerCommand(
14
+ f,
15
+ (M, c) => (a(c), !1),
16
+ C
17
+ ), [o]), /* @__PURE__ */ p(
18
+ T,
19
+ {
20
+ activeEditor: t,
21
+ $updateToolbar: l,
22
+ blockType: r,
23
+ setBlockType: i,
24
+ showModal: n,
25
+ children: [
26
+ m,
27
+ s({ blockType: r })
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ O as ToolbarPlugin
34
+ };
@@ -0,0 +1,112 @@
1
+ "use client";
2
+ /* empty css */
3
+ const t = {
4
+ ltr: "text-left",
5
+ rtl: "text-right",
6
+ heading: {
7
+ h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
8
+ h2: "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0",
9
+ h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
10
+ h4: "scroll-m-20 text-xl font-semibold tracking-tight",
11
+ h5: "scroll-m-20 text-lg font-semibold tracking-tight",
12
+ h6: "scroll-m-20 text-base font-semibold tracking-tight"
13
+ },
14
+ paragraph: "leading-7 [&:not(:first-child)]:mt-6",
15
+ quote: "mt-6 border-l-2 pl-6 italic",
16
+ link: "text-blue-600 hover:underline hover:cursor-pointer",
17
+ list: {
18
+ checklist: "relative",
19
+ listitem: "mx-8",
20
+ listitemChecked: 'relative mx-2 px-6 list-none outline-none line-through before:content-[""] before:w-4 before:h-4 before:top-0.5 before:left-0 before:cursor-pointer before:block before:bg-cover before:absolute before:border before:border-primary before:rounded before:bg-primary before:bg-no-repeat after:content-[""] after:cursor-pointer after:border-white after:border-solid after:absolute after:block after:top-[6px] after:w-[3px] after:left-[7px] after:right-[7px] after:h-[6px] after:rotate-45 after:border-r-2 after:border-b-2 after:border-l-0 after:border-t-0',
21
+ listitemUnchecked: 'relative mx-2 px-6 list-none outline-none before:content-[""] before:w-4 before:h-4 before:top-0.5 before:left-0 before:cursor-pointer before:block before:bg-cover before:absolute before:border before:border-primary before:rounded',
22
+ nested: {
23
+ listitem: "list-none before:hidden after:hidden"
24
+ },
25
+ ol: "my-6 ml-6 list-decimal [&>li]:mt-2",
26
+ olDepth: [
27
+ "list-outside !list-decimal",
28
+ "list-outside !list-[upper-roman]",
29
+ "list-outside !list-[lower-roman]",
30
+ "list-outside !list-[upper-alpha]",
31
+ "list-outside !list-[lower-alpha]"
32
+ ],
33
+ ul: "m-0 p-0 list-outside"
34
+ },
35
+ hashtag: "text-blue-600 bg-blue-100 rounded-md px-1",
36
+ text: {
37
+ bold: "font-bold",
38
+ code: "bg-gray-100 p-1 rounded-md",
39
+ italic: "italic",
40
+ strikethrough: "line-through",
41
+ subscript: "sub",
42
+ superscript: "sup",
43
+ underline: "underline",
44
+ underlineStrikethrough: "underline line-through"
45
+ },
46
+ image: "relative inline-block user-select-none cursor-default editor-image",
47
+ inlineImage: "relative inline-block user-select-none cursor-default inline-editor-image",
48
+ keyword: "text-purple-900 font-bold",
49
+ code: "EditorTheme__code",
50
+ codeHighlight: {
51
+ atrule: "EditorTheme__tokenAttr",
52
+ attr: "EditorTheme__tokenAttr",
53
+ boolean: "EditorTheme__tokenProperty",
54
+ builtin: "EditorTheme__tokenSelector",
55
+ cdata: "EditorTheme__tokenComment",
56
+ char: "EditorTheme__tokenSelector",
57
+ class: "EditorTheme__tokenFunction",
58
+ "class-name": "EditorTheme__tokenFunction",
59
+ comment: "EditorTheme__tokenComment",
60
+ constant: "EditorTheme__tokenProperty",
61
+ deleted: "EditorTheme__tokenProperty",
62
+ doctype: "EditorTheme__tokenComment",
63
+ entity: "EditorTheme__tokenOperator",
64
+ function: "EditorTheme__tokenFunction",
65
+ important: "EditorTheme__tokenVariable",
66
+ inserted: "EditorTheme__tokenSelector",
67
+ keyword: "EditorTheme__tokenAttr",
68
+ namespace: "EditorTheme__tokenVariable",
69
+ number: "EditorTheme__tokenProperty",
70
+ operator: "EditorTheme__tokenOperator",
71
+ prolog: "EditorTheme__tokenComment",
72
+ property: "EditorTheme__tokenProperty",
73
+ punctuation: "EditorTheme__tokenPunctuation",
74
+ regex: "EditorTheme__tokenVariable",
75
+ selector: "EditorTheme__tokenSelector",
76
+ string: "EditorTheme__tokenSelector",
77
+ symbol: "EditorTheme__tokenProperty",
78
+ tag: "EditorTheme__tokenProperty",
79
+ url: "EditorTheme__tokenOperator",
80
+ variable: "EditorTheme__tokenVariable"
81
+ },
82
+ characterLimit: "!bg-destructive/50",
83
+ table: "EditorTheme__table w-fit overflow-scroll border-collapse",
84
+ tableCell: 'EditorTheme__tableCell w-24 relative border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right"',
85
+ tableCellActionButton: "EditorTheme__tableCellActionButton bg-background block border-0 rounded-2xl w-5 h-5 text-foreground cursor-pointer",
86
+ tableCellActionButtonContainer: "EditorTheme__tableCellActionButtonContainer block right-1 top-1.5 absolute z-10 w-5 h-5",
87
+ tableCellEditing: "EditorTheme__tableCellEditing rounded-sm shadow-sm",
88
+ tableCellHeader: "EditorTheme__tableCellHeader bg-muted border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",
89
+ tableCellPrimarySelected: "EditorTheme__tableCellPrimarySelected border border-primary border-solid block h-[calc(100%-2px)] w-[calc(100%-2px)] absolute -left-[1px] -top-[1px] z-10 ",
90
+ tableCellResizer: "EditorTheme__tableCellResizer absolute -right-1 h-full w-2 cursor-ew-resize z-10 top-0",
91
+ tableCellSelected: "EditorTheme__tableCellSelected bg-muted",
92
+ tableCellSortedIndicator: "EditorTheme__tableCellSortedIndicator block opacity-50 bsolute bottom-0 left-0 w-full h-1 bg-muted",
93
+ tableResizeRuler: "EditorTheme__tableCellResizeRuler block absolute w-[1px] h-full bg-primary top-0",
94
+ tableRowStriping: "EditorTheme__tableRowStriping m-0 border-t p-0 even:bg-muted",
95
+ tableSelected: "EditorTheme__tableSelected ring-2 ring-primary ring-offset-2",
96
+ tableSelection: "EditorTheme__tableSelection bg-transparent",
97
+ layoutItem: "border border-dashed px-4 py-2",
98
+ layoutContainer: "grid gap-2.5 my-2.5 mx-0",
99
+ autocomplete: "text-muted-foreground",
100
+ blockCursor: "",
101
+ embedBlock: {
102
+ base: "user-select-none",
103
+ focus: "ring-2 ring-primary ring-offset-2"
104
+ },
105
+ hr: 'p-0.5 border-none my-1 mx-0 cursor-pointer after:content-[""] after:block after:h-0.5 after:bg-muted selected:ring-2 selected:ring-primary selected:ring-offset-2 selected:user-select-none',
106
+ indent: "[--lexical-indent-base-value:40px]",
107
+ mark: "",
108
+ markOverlap: ""
109
+ };
110
+ export {
111
+ t as editorTheme
112
+ };
@@ -11,7 +11,7 @@ function x({ className: e, ...o }) {
11
11
  s,
12
12
  {
13
13
  "data-slot": "accordion-item",
14
- className: r("border-d-border border-b last:border-b-0", e),
14
+ className: r("border-b last:border-b-0", e),
15
15
  ...o
16
16
  }
17
17
  );
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
3
  import { Root as n, Trigger as i, Content as s, Title as d, Description as c, Action as g, Cancel as u, Portal as f, Overlay as m } from "../../node_modules/@radix-ui/react-alert-dialog/dist/index.js";
4
4
  import { cn as o } from "../../lib/utils.js";
5
5
  import { buttonVariants as l } from "./button.js";
6
- function N({ ...t }) {
6
+ function b({ ...t }) {
7
7
  return /* @__PURE__ */ e(n, { "data-slot": "alert-dialog", ...t });
8
8
  }
9
9
  function y({ ...t }) {
@@ -33,7 +33,7 @@ function T({ className: t, ...a }) {
33
33
  {
34
34
  "data-slot": "alert-dialog-content",
35
35
  className: o(
36
- "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 border-d-border 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",
36
+ "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",
37
37
  t
38
38
  ),
39
39
  ...a
@@ -106,7 +106,7 @@ function O({ className: t, ...a }) {
106
106
  );
107
107
  }
108
108
  export {
109
- N as AlertDialog,
109
+ b as AlertDialog,
110
110
  j as AlertDialogAction,
111
111
  O as AlertDialogCancel,
112
112
  T as AlertDialogContent,
@@ -3,7 +3,7 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import { cva as i } from "../../node_modules/class-variance-authority/dist/index.js";
4
4
  import { cn as a } from "../../lib/utils.js";
5
5
  const d = i(
6
- "relative w-full rounded-lg border border-d-border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -16,7 +16,7 @@ const d = i(
16
16
  }
17
17
  }
18
18
  );
19
- function c({ className: t, variant: r, ...s }) {
19
+ function o({ className: t, variant: r, ...s }) {
20
20
  return /* @__PURE__ */ e(
21
21
  "div",
22
22
  {
@@ -57,7 +57,7 @@ function u({
57
57
  );
58
58
  }
59
59
  export {
60
- c as Alert,
60
+ o as Alert,
61
61
  u as AlertDescription,
62
62
  g as AlertTitle
63
63
  };
@@ -0,0 +1,150 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as t, Fragment as s } from "react/jsx-runtime";
3
+ import { LexicalComposer as w } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
4
+ import { OnChangePlugin as L } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
5
+ import { LexicalErrorBoundary as S } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
6
+ import { RichTextPlugin as T } from "../../node_modules/@lexical/react/LexicalRichTextPlugin.prod.js";
7
+ import { HeadingNode as j, QuoteNode as A } from "../../node_modules/@lexical/rich-text/LexicalRichText.prod.js";
8
+ import { ParagraphNode as d, TextNode as p, $getRoot as f } from "../../node_modules/lexical/Lexical.prod.js";
9
+ import { $convertToMarkdownString as B, $convertFromMarkdownString as H, TRANSFORMERS as C } from "../../node_modules/@lexical/markdown/LexicalMarkdown.prod.js";
10
+ import { useState as R, useEffect as $ } from "react";
11
+ import { useLexicalComposerContext as O } from "../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
12
+ import { HistoryPlugin as z } from "../../node_modules/@lexical/react/LexicalHistoryPlugin.prod.js";
13
+ import { ContentEditable as D } from "../editor/editor-ui/content-editable.js";
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";
23
+ import { FormatBulletedList as K } from "../editor/plugins/toolbar/block-format/format-bulleted-list.js";
24
+ import { FormatCheckList as W } from "../editor/plugins/toolbar/block-format/format-check-list.js";
25
+ import { FormatQuote as X } from "../editor/plugins/toolbar/block-format/format-quote.js";
26
+ import { FontFormatToolbarPlugin as l } from "../editor/plugins/toolbar/font-format-toolbar-plugin.js";
27
+ import { ListPlugin as Y } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
28
+ import { CheckListPlugin as Z } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
29
+ import { ListNode as V, ListItemNode as oo } from "../../node_modules/@lexical/list/LexicalList.prod.js";
30
+ import { editorTheme as ro } from "../editor/themes/editor-theme.js";
31
+ import { TooltipProvider as to } from "./tooltip.js";
32
+ import { HistoryToolbarPlugin as eo } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
33
+ const io = "Start typing...";
34
+ function no({
35
+ defaultValue: r,
36
+ onlyMarkdown: i
37
+ }) {
38
+ const [n] = O();
39
+ return $(() => {
40
+ r && n.update(() => {
41
+ i ? H(r, C) : f().append(
42
+ new d().append(new p(r))
43
+ );
44
+ const a = f();
45
+ (a.getFirstChild() ?? a).selectStart();
46
+ });
47
+ }, [n, r, i]), null;
48
+ }
49
+ function Do({
50
+ defaultValue: r,
51
+ onMarkdownEdit: i,
52
+ plugins: n = [],
53
+ toolbars: a = [],
54
+ placeholder: F = io,
55
+ onlyMarkdown: h = !0,
56
+ className: N = "bg-d-background overflow-hidden rounded-lg border"
57
+ }) {
58
+ const [ao, P] = R(null), k = {
59
+ namespace: "AppEditor",
60
+ theme: ro,
61
+ nodes: [
62
+ j,
63
+ d,
64
+ p,
65
+ A,
66
+ V,
67
+ oo
68
+ ],
69
+ onError: (e) => {
70
+ console.error(e);
71
+ },
72
+ ...r && !h ? {
73
+ editorState: () => {
74
+ f().append(
75
+ new d().append(new p(r))
76
+ );
77
+ }
78
+ } : {}
79
+ }, g = (e) => n.includes(e), m = (e) => a.includes(e), u = g("clear"), b = g("counter"), v = m("block-format"), y = m("font-format"), x = m("history");
80
+ return /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(w, { initialConfig: k, children: /* @__PURE__ */ t(to, { children: [
81
+ r && /* @__PURE__ */ o(
82
+ no,
83
+ {
84
+ defaultValue: r,
85
+ onlyMarkdown: h
86
+ }
87
+ ),
88
+ /* @__PURE__ */ t("div", { className: "flex items-center", children: [
89
+ x && /* @__PURE__ */ o(c, { children: () => /* @__PURE__ */ o("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto border-b p-1", children: /* @__PURE__ */ o(eo, {}) }) }),
90
+ v && /* @__PURE__ */ o(c, { children: () => /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o("div", { className: "vertical-align-middle bg-d-background sticky top-0 z-10 flex gap-2 overflow-auto border-b p-1", children: /* @__PURE__ */ t(J, { children: [
91
+ /* @__PURE__ */ o(U, {}),
92
+ /* @__PURE__ */ o(q, { levels: ["h1", "h2", "h3"] }),
93
+ /* @__PURE__ */ o(G, {}),
94
+ /* @__PURE__ */ o(K, {}),
95
+ /* @__PURE__ */ o(W, {}),
96
+ /* @__PURE__ */ o(X, {})
97
+ ] }) }) }) }),
98
+ y && /* @__PURE__ */ o(c, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle bg-background sticky top-0 z-10 flex gap-2 overflow-auto border-b p-1", children: [
99
+ /* @__PURE__ */ o(l, { format: "bold" }),
100
+ /* @__PURE__ */ o(l, { format: "italic" }),
101
+ /* @__PURE__ */ o(l, { format: "underline" }),
102
+ /* @__PURE__ */ o(l, { format: "strikethrough" })
103
+ ] }) })
104
+ ] }),
105
+ /* @__PURE__ */ t("div", { className: "relative", children: [
106
+ x && /* @__PURE__ */ o(z, {}),
107
+ /* @__PURE__ */ o(
108
+ T,
109
+ {
110
+ ErrorBoundary: S,
111
+ contentEditable: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o("div", { ref: P, children: /* @__PURE__ */ o(
112
+ D,
113
+ {
114
+ placeholder: F,
115
+ className: `ContentEditable__root relative block h-72 min-h-full overflow-auto px-8 py-4 focus:outline-none ${N}`
116
+ }
117
+ ) }) })
118
+ }
119
+ ),
120
+ v && /* @__PURE__ */ t(s, { children: [
121
+ /* @__PURE__ */ o(Y, {}),
122
+ /* @__PURE__ */ o(Z, {})
123
+ ] }),
124
+ (u || b) && /* @__PURE__ */ o(I, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 border-t p-1", children: [
125
+ /* @__PURE__ */ o("div", { className: "flex flex-1 justify-start" }),
126
+ /* @__PURE__ */ o("div", { children: b && /* @__PURE__ */ o(Q, { charset: "UTF-16" }) }),
127
+ /* @__PURE__ */ o("div", { className: "flex flex-1 justify-end gap-2", children: u && /* @__PURE__ */ t(s, { children: [
128
+ /* @__PURE__ */ o(_, {}),
129
+ /* @__PURE__ */ o(M, {})
130
+ ] }) })
131
+ ] }) })
132
+ ] }),
133
+ /* @__PURE__ */ o(
134
+ L,
135
+ {
136
+ ignoreSelectionChange: !0,
137
+ onChange: (e) => {
138
+ if (!i) return;
139
+ const E = e.read(
140
+ () => B(C)
141
+ );
142
+ i(E);
143
+ }
144
+ }
145
+ )
146
+ ] }) }) });
147
+ }
148
+ export {
149
+ Do as AppEditor
150
+ };
@@ -30,7 +30,7 @@ function oe({
30
30
  cancelButtonLabel: R = "Cancella",
31
31
  maxSelectedItems: t
32
32
  }) {
33
- const m = n.useId(), [u, h] = n.useState(!1), [d, b] = n.useState(""), g = n.useRef(null), v = n.useCallback(
33
+ const m = n.useId(), [u, h] = n.useState(!1), [c, b] = n.useState(""), g = n.useRef(null), v = n.useCallback(
34
34
  (e) => {
35
35
  if (a.includes(e))
36
36
  o(a.filter((i) => i !== e));
@@ -43,9 +43,9 @@ function oe({
43
43
  [a, o, t]
44
44
  ), w = n.useCallback(() => {
45
45
  o([]), b("");
46
- }, [o]), c = n.useMemo(() => s.filter((e) => a.includes(e.value)), [s, a]), S = n.useMemo(() => d ? s.filter(
47
- (e) => e.label.toLowerCase().includes(d.toLowerCase())
48
- ) : s, [s, d]), x = n.useMemo(() => t ? a.length >= t : !1, [a, t]);
46
+ }, [o]), d = n.useMemo(() => s.filter((e) => a.includes(e.value)), [s, a]), S = n.useMemo(() => c ? s.filter(
47
+ (e) => e.label.toLowerCase().includes(c.toLowerCase())
48
+ ) : s, [s, c]), x = n.useMemo(() => t ? a.length >= t : !1, [a, t]);
49
49
  return /* @__PURE__ */ r(T.Provider, { value: { size: f, id: m }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
50
50
  p && /* @__PURE__ */ r(B, { htmlFor: m, className: z, children: p }),
51
51
  /* @__PURE__ */ l(
@@ -65,22 +65,22 @@ function oe({
65
65
  "aria-expanded": u,
66
66
  disabled: k,
67
67
  className: N(
68
- "border-d-border relative w-full justify-between border bg-transparent font-normal",
69
- "border-d-input ring-offset-background focus:ring-ring flex items-center rounded-md border !bg-transparent whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
68
+ "!bg-d-input relative w-full justify-between border font-normal",
69
+ "border-d-input ring-offset-background focus:ring-ring flex items-center rounded-md border whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
70
70
  "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
71
71
  j
72
72
  ),
73
73
  onClick: () => h(!u),
74
74
  children: [
75
- /* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: c.length > 0 ? /* @__PURE__ */ l(A, { children: [
75
+ /* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: d.length > 0 ? /* @__PURE__ */ l(A, { children: [
76
76
  /* @__PURE__ */ l(
77
77
  F,
78
78
  {
79
79
  variant: "secondary",
80
80
  className: "flex items-center gap-1",
81
81
  children: [
82
- /* @__PURE__ */ r("span", { children: c.length }),
83
- c.length === 1 ? " elemento selezionato" : " elementi selezionati"
82
+ /* @__PURE__ */ r("span", { children: d.length }),
83
+ d.length === 1 ? " elemento selezionato" : " elementi selezionati"
84
84
  ]
85
85
  }
86
86
  ),
@@ -108,8 +108,8 @@ function oe({
108
108
  open: u,
109
109
  triggerRef: g,
110
110
  onClose: () => h(!1),
111
- children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(E, { className: "bg-d-popover border-d-border w-full rounded-md border shadow-md", children: [
112
- D && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
111
+ children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(E, { className: "bg-d-popover w-full rounded-md border shadow-md", children: [
112
+ D && /* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b px-3", children: [
113
113
  /* @__PURE__ */ l("div", { className: "flex items-center", children: [
114
114
  /* @__PURE__ */ r(I, { name: "Search", className: "text-d-accent", size: "sm" }),
115
115
  /* @__PURE__ */ r(
@@ -117,13 +117,13 @@ function oe({
117
117
  {
118
118
  id: "app-multiple-select-dropdown-filter",
119
119
  placeholder: P,
120
- value: d,
120
+ value: c,
121
121
  onChange: (e) => b(e.target.value),
122
122
  className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${q({ size: f })} !shadow-none`
123
123
  }
124
124
  )
125
125
  ] }),
126
- c.length > 0 && /* @__PURE__ */ r(
126
+ d.length > 0 && /* @__PURE__ */ r(
127
127
  C,
128
128
  {
129
129
  variant: "ghost",
@@ -34,7 +34,7 @@ function ke({
34
34
  filterFn: y,
35
35
  renderOption: A,
36
36
  getOptionValue: a,
37
- getDisplayValue: b,
37
+ getDisplayValue: v,
38
38
  notFound: F,
39
39
  loadingSkeleton: $,
40
40
  label: l,
@@ -42,15 +42,15 @@ function ke({
42
42
  placeholder: G = "Select...",
43
43
  value: s,
44
44
  onChange: u,
45
- disabled: v = !1,
45
+ disabled: w = !1,
46
46
  width: E = "200px",
47
47
  className: M,
48
48
  triggerClassName: U,
49
49
  noResultsMessage: X,
50
- clearable: w = !0,
50
+ clearable: N = !0,
51
51
  size: q
52
52
  }) {
53
- const [p, N] = i(!1), [r, d] = i([]), [C, h] = i(!1), [S, g] = i(null), [L, x] = i(null), [I, H] = i(""), f = Z(I, m ? 0 : 300), [j, P] = i([]);
53
+ const [p, b] = i(!1), [r, d] = i([]), [C, h] = i(!1), [S, g] = i(null), [L, x] = i(null), [I, H] = i(""), f = Z(I, m ? 0 : 300), [j, P] = i([]);
54
54
  k(() => ((async () => {
55
55
  try {
56
56
  if (h(!0), g(null), m) {
@@ -77,7 +77,7 @@ function ke({
77
77
  if (m)
78
78
  if (f) {
79
79
  const t = j.filter(
80
- (o) => y ? y(o, f) : String(b(o)).toLowerCase().includes(f.toLowerCase())
80
+ (o) => y ? y(o, f) : String(v(o)).toLowerCase().includes(f.toLowerCase())
81
81
  );
82
82
  d(t);
83
83
  } else
@@ -102,7 +102,7 @@ function ke({
102
102
  m,
103
103
  y,
104
104
  j,
105
- b
105
+ v
106
106
  ]), k(() => {
107
107
  if (s && r.length > 0) {
108
108
  const t = r.find((o) => a(o) === s);
@@ -111,20 +111,20 @@ function ke({
111
111
  }, [s, r, a]);
112
112
  const J = D(
113
113
  (t) => {
114
- const o = w && t === s ? "" : t, Q = r.find((W) => a(W) === o) || null;
115
- x(Q), u(o), N(!1);
114
+ const o = N && t === s ? "" : t, Q = r.find((W) => a(W) === o) || null;
115
+ x(Q), u(o), b(!1);
116
116
  },
117
- [s, u, w, r, a]
117
+ [s, u, N, r, a]
118
118
  ), K = D(
119
119
  (t) => {
120
- t.stopPropagation(), t.preventDefault(), x(null), u(""), N(!1);
120
+ t.stopPropagation(), t.preventDefault(), x(null), u(""), b(!1);
121
121
  },
122
122
  [u]
123
123
  ), T = Y.useId();
124
124
  return /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
125
125
  l && /* @__PURE__ */ e(ee, { htmlFor: T, className: B, children: l }),
126
- /* @__PURE__ */ n(re, { open: p, onOpenChange: N, children: [
127
- /* @__PURE__ */ e(ae, { disabled: v, children: /* @__PURE__ */ e(
126
+ /* @__PURE__ */ n(re, { open: p, onOpenChange: b, children: [
127
+ /* @__PURE__ */ e(ae, { disabled: w, children: /* @__PURE__ */ e(
128
128
  V,
129
129
  {
130
130
  id: T,
@@ -134,19 +134,19 @@ function ke({
134
134
  "aria-expanded": p,
135
135
  className: z(
136
136
  fe({ size: q }),
137
- v && "cursor-not-allowed opacity-50",
137
+ w && "cursor-not-allowed opacity-50",
138
138
  U,
139
139
  "font-normal"
140
140
  ),
141
141
  style: { width: E },
142
- disabled: v,
142
+ disabled: w,
143
143
  children: /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-between overflow-hidden", children: [
144
- L ? /* @__PURE__ */ e("div", { className: "truncate", children: b(L) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: G }),
144
+ L ? /* @__PURE__ */ e("div", { className: "truncate", children: v(L) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: G }),
145
145
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
146
- w && L && /* @__PURE__ */ e(
146
+ N && L && /* @__PURE__ */ e(
147
147
  "div",
148
148
  {
149
- className: "bg-d-input hover:bg-d-input/30 border-d-border z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
149
+ className: "bg-d-input hover:bg-d-input/30 z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
150
150
  onClick: K,
151
151
  onMouseDown: (t) => t.preventDefault(),
152
152
  "aria-label": "Clear selection",
@@ -164,7 +164,7 @@ function ke({
164
164
  style: { width: E },
165
165
  className: z("p-0", M),
166
166
  children: /* @__PURE__ */ n(te, { shouldFilter: !1, children: [
167
- /* @__PURE__ */ n("div", { className: "border-d-border relative w-full border-b", children: [
167
+ /* @__PURE__ */ n("div", { className: "relative w-full border-b", children: [
168
168
  /* @__PURE__ */ e(
169
169
  oe,
170
170
  {