laif-ds 0.1.76 → 0.1.80

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 (96) hide show
  1. package/dist/_virtual/index.js +5 -3
  2. package/dist/_virtual/index2.js +5 -2
  3. package/dist/_virtual/index3.js +5 -5
  4. package/dist/_virtual/index4.js +2 -5
  5. package/dist/_virtual/index5.js +2 -5
  6. package/dist/_virtual/index7.js +3 -2
  7. package/dist/_virtual/prism-cpp.js +3 -0
  8. package/dist/_virtual/prism-cpp2.js +5 -0
  9. package/dist/_virtual/prism-java.js +3 -0
  10. package/dist/_virtual/prism-java2.js +5 -0
  11. package/dist/_virtual/prism-python.js +3 -0
  12. package/dist/_virtual/prism-python2.js +5 -0
  13. package/dist/_virtual/prism-rust.js +3 -0
  14. package/dist/_virtual/prism-rust2.js +5 -0
  15. package/dist/_virtual/prism-typescript.js +3 -0
  16. package/dist/_virtual/prism-typescript2.js +5 -0
  17. package/dist/_virtual/prism.js +3 -0
  18. package/dist/_virtual/prism2.js +5 -0
  19. package/dist/components/editor/context/toolbar-context.js +42 -0
  20. package/dist/components/editor/editor-hooks/use-modal.js +30 -0
  21. package/dist/components/editor/editor-hooks/use-update-toolbar.js +24 -0
  22. package/dist/components/editor/editor-ui/content-editable.js +26 -0
  23. package/dist/components/editor/plugins/actions/actions-plugin.js +7 -0
  24. package/dist/components/editor/plugins/actions/clear-editor-plugin.js +39 -0
  25. package/dist/components/editor/plugins/actions/counter-character-plugin.js +53 -0
  26. package/dist/components/editor/plugins/toolbar/block-format/block-format-data.js +52 -0
  27. package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +26 -0
  28. package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +26 -0
  29. package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +31 -0
  30. package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +26 -0
  31. package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +23 -0
  32. package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +24 -0
  33. package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +56 -0
  34. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +50 -0
  35. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +69 -0
  36. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +34 -0
  37. package/dist/components/editor/themes/editor-theme.js +112 -0
  38. package/dist/components/ui/app-editor.js +150 -0
  39. package/dist/components/ui/app-multiple-select-dropdown.js +2 -2
  40. package/dist/components/ui/button.js +25 -24
  41. package/dist/components/ui/calendar.js +9 -9
  42. package/dist/components/ui/dialog.js +43 -37
  43. package/dist/components/ui/sidebar.js +20 -19
  44. package/dist/index.d.ts +23 -1
  45. package/dist/index.js +48 -44
  46. package/dist/laif-ds.css +1 -0
  47. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +159 -0
  48. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +236 -0
  49. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +46 -0
  50. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +89 -0
  51. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +108 -0
  52. package/dist/node_modules/@lexical/link/LexicalLink.prod.js +187 -0
  53. package/dist/node_modules/@lexical/list/LexicalList.prod.js +729 -0
  54. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +367 -0
  55. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +11 -0
  56. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +17 -0
  57. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +45 -0
  58. package/dist/node_modules/@lexical/react/LexicalComposerContext.prod.js +22 -0
  59. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +55 -0
  60. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +49 -0
  61. package/dist/node_modules/@lexical/react/LexicalHistoryPlugin.prod.js +15 -0
  62. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +17 -0
  63. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +16 -0
  64. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +56 -0
  65. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +21 -0
  66. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +376 -0
  67. package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +107 -0
  68. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +661 -0
  69. package/dist/node_modules/@lexical/text/LexicalText.prod.js +37 -0
  70. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +102 -0
  71. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  72. package/dist/node_modules/eventemitter3/index.js +1 -1
  73. package/dist/node_modules/eventemitter3/index2.js +1 -1
  74. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  75. package/dist/node_modules/lexical/Lexical.prod.js +4901 -0
  76. package/dist/node_modules/prismjs/components/prism-c.js +77 -0
  77. package/dist/node_modules/prismjs/components/prism-clike.js +32 -0
  78. package/dist/node_modules/prismjs/components/prism-cpp.js +93 -0
  79. package/dist/node_modules/prismjs/components/prism-css.js +56 -0
  80. package/dist/node_modules/prismjs/components/prism-java.js +122 -0
  81. package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
  82. package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
  83. package/dist/node_modules/prismjs/components/prism-markup.js +174 -0
  84. package/dist/node_modules/prismjs/components/prism-objectivec.js +11 -0
  85. package/dist/node_modules/prismjs/components/prism-powershell.js +56 -0
  86. package/dist/node_modules/prismjs/components/prism-python.js +69 -0
  87. package/dist/node_modules/prismjs/components/prism-rust.js +124 -0
  88. package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
  89. package/dist/node_modules/prismjs/components/prism-swift.js +114 -0
  90. package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
  91. package/dist/node_modules/prismjs/prism.js +1165 -0
  92. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  93. package/dist/node_modules/unified/lib/index.js +1 -1
  94. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  95. package/dist/styles.v3.css +1 -1
  96. package/package.json +12 -1
@@ -1,28 +1,33 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
3
- import { Root as i, Trigger as l, Content as d, Close as c, Title as g, Description as f, Portal as u, Overlay as m } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
2
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
3
+ import { Root as l, Trigger as d, Content as c, Close as s, 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__ */ e(i, { "data-slot": "dialog", ...t });
9
+ return /* @__PURE__ */ a(l, { "data-slot": "dialog", ...t });
10
10
  }
11
11
  function z({
12
12
  ...t
13
13
  }) {
14
- return /* @__PURE__ */ e(l, { "data-slot": "dialog-trigger", ...t });
14
+ return /* @__PURE__ */ a(d, { "data-slot": "dialog-trigger", ...t });
15
15
  }
16
16
  function x({
17
17
  ...t
18
18
  }) {
19
- return /* @__PURE__ */ e(u, { "data-slot": "dialog-portal", ...t });
19
+ return /* @__PURE__ */ a(u, { "data-slot": "dialog-portal", ...t });
20
20
  }
21
- function v({
21
+ function C({
22
+ ...t
23
+ }) {
24
+ return /* @__PURE__ */ a(s, { "data-slot": "dialog-close", ...t });
25
+ }
26
+ function D({
22
27
  className: t,
23
- ...a
28
+ ...e
24
29
  }) {
25
- return /* @__PURE__ */ e(
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
- ...a
38
+ ...e
34
39
  }
35
40
  );
36
41
  }
37
42
  function k({
38
43
  className: t,
39
- children: a,
40
- ...s
44
+ children: e,
45
+ ...i
41
46
  }) {
42
47
  return /* @__PURE__ */ n(x, { "data-slot": "dialog-portal", children: [
43
- /* @__PURE__ */ e(v, {}),
48
+ /* @__PURE__ */ a(D, {}),
44
49
  /* @__PURE__ */ n(
45
- d,
50
+ c,
46
51
  {
47
52
  "data-slot": "dialog-content",
48
53
  onPointerDownOutside: (r) => {
@@ -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 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",
53
58
  t
54
59
  ),
55
- ...s,
60
+ ...i,
56
61
  children: [
57
- a,
58
- /* @__PURE__ */ n(c, { 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: [
59
- /* @__PURE__ */ e(p, {}),
60
- /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
62
+ e,
63
+ /* @__PURE__ */ n(s, { 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 C({ className: t, ...a }) {
68
- return /* @__PURE__ */ e(
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
- ...a
78
+ ...e
74
79
  }
75
80
  );
76
81
  }
77
- function T({ className: t, ...a }) {
78
- return /* @__PURE__ */ e(
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
- ...a
91
+ ...e
87
92
  }
88
93
  );
89
94
  }
90
- function j({
95
+ function O({
91
96
  className: t,
92
- ...a
97
+ ...e
93
98
  }) {
94
- return /* @__PURE__ */ e(
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
- ...a
104
+ ...e
100
105
  }
101
106
  );
102
107
  }
103
- function O({
108
+ function P({
104
109
  className: t,
105
- ...a
110
+ ...e
106
111
  }) {
107
- return /* @__PURE__ */ e(
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
- ...a
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
- O as DialogDescription,
120
- T as DialogFooter,
121
- C as DialogHeader,
122
- v as DialogOverlay,
125
+ P as DialogDescription,
126
+ j as DialogFooter,
127
+ T as DialogHeader,
128
+ D as DialogOverlay,
123
129
  x as DialogPortal,
124
- j as DialogTitle,
130
+ O as DialogTitle,
125
131
  z as DialogTrigger
126
132
  };
@@ -29,16 +29,16 @@ const X = d.forwardRef(
29
29
  children: s,
30
30
  ...f
31
31
  }, g) => {
32
- const c = j(), [p, b] = d.useState(!1), [x, _] = d.useState(a), h = e ?? x, w = d.useCallback(
32
+ const c = j(), [p, u] = d.useState(!1), [x, _] = d.useState(a), h = e ?? x, w = d.useCallback(
33
33
  (l) => {
34
- const u = typeof l == "function" ? l(h) : l;
35
- t ? t(u) : _(u), document.cookie = `${$}=${u}; path=/; max-age=${V}`;
34
+ const b = typeof l == "function" ? l(h) : l;
35
+ t ? t(b) : _(b), document.cookie = `${$}=${b}; path=/; max-age=${V}`;
36
36
  },
37
37
  [t, h]
38
- ), S = d.useCallback(() => c ? b((l) => !l) : w((l) => !l), [c, w, b]);
38
+ ), S = d.useCallback(() => c ? u((l) => !l) : w((l) => !l), [c, w, u]);
39
39
  d.useEffect(() => {
40
- const l = (u) => {
41
- u.key === U && (u.metaKey || u.ctrlKey) && (u.preventDefault(), S());
40
+ const l = (b) => {
41
+ b.key === U && (b.metaKey || b.ctrlKey) && (b.preventDefault(), S());
42
42
  };
43
43
  return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
44
44
  }, [S]);
@@ -49,7 +49,7 @@ const X = d.forwardRef(
49
49
  setOpen: w,
50
50
  isMobile: c,
51
51
  openMobile: p,
52
- setOpenMobile: b,
52
+ setOpenMobile: u,
53
53
  toggleSidebar: S
54
54
  }),
55
55
  [
@@ -58,7 +58,7 @@ const X = d.forwardRef(
58
58
  w,
59
59
  c,
60
60
  p,
61
- b,
61
+ u,
62
62
  S
63
63
  ]
64
64
  );
@@ -91,7 +91,7 @@ const Y = d.forwardRef(
91
91
  children: n,
92
92
  ...s
93
93
  }, f) => {
94
- const { isMobile: g, state: c, openMobile: p, setOpenMobile: b } = N();
94
+ const { isMobile: g, state: c, openMobile: p, setOpenMobile: u } = N();
95
95
  return t === "none" ? /* @__PURE__ */ r(
96
96
  "div",
97
97
  {
@@ -103,7 +103,7 @@ const Y = d.forwardRef(
103
103
  ...s,
104
104
  children: n
105
105
  }
106
- ) : g ? /* @__PURE__ */ r(E, { open: p, onOpenChange: b, ...s, children: /* @__PURE__ */ m(
106
+ ) : g ? /* @__PURE__ */ r(E, { open: p, onOpenChange: u, ...s, children: /* @__PURE__ */ m(
107
107
  T,
108
108
  {
109
109
  "data-sidebar": "sidebar",
@@ -138,7 +138,7 @@ const Y = d.forwardRef(
138
138
  "relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear",
139
139
  "group-data-[collapsible=offcanvas]:w-0",
140
140
  "group-data-[side=right]:rotate-180",
141
- e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
141
+ e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
142
142
  )
143
143
  }
144
144
  ),
@@ -148,7 +148,8 @@ const Y = d.forwardRef(
148
148
  className: i(
149
149
  "fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",
150
150
  a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
151
- e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "border-d-border group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",
151
+ // Adjust the padding for floating and inset variants.
152
+ e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
152
153
  o
153
154
  ),
154
155
  ...s,
@@ -354,7 +355,7 @@ const ce = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
354
355
  }
355
356
  ));
356
357
  ce.displayName = "SidebarMenuItem";
357
- const be = k(
358
+ const ue = k(
358
359
  "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-d-sidebar-ring transition-[width,height,padding] hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground focus-visible:ring-2 active:bg-d-sidebar-accent active:text-d-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-d-sidebar-accent data-[active=true]:font-bold data-[active=true]:text-d-sidebar-accent-foreground data-[state=open]:hover:bg-d-sidebar-accent data-[state=open]:hover:text-d-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
359
360
  {
360
361
  variants: {
@@ -373,7 +374,7 @@ const be = k(
373
374
  size: "default"
374
375
  }
375
376
  }
376
- ), ue = d.forwardRef(
377
+ ), be = d.forwardRef(
377
378
  ({
378
379
  asChild: a = !1,
379
380
  isActive: e = !1,
@@ -383,14 +384,14 @@ const be = k(
383
384
  className: s,
384
385
  ...f
385
386
  }, g) => {
386
- const c = a ? v : "button", { isMobile: p, state: b } = N(), x = /* @__PURE__ */ r(
387
+ const c = a ? v : "button", { isMobile: p, state: u } = N(), x = /* @__PURE__ */ r(
387
388
  c,
388
389
  {
389
390
  ref: g,
390
391
  "data-sidebar": "menu-button",
391
392
  "data-size": o,
392
393
  "data-active": e,
393
- className: i(be({ variant: t, size: o }), s),
394
+ className: i(ue({ variant: t, size: o }), s),
394
395
  ...f
395
396
  }
396
397
  );
@@ -403,14 +404,14 @@ const be = k(
403
404
  {
404
405
  side: "right",
405
406
  align: "center",
406
- hidden: b !== "collapsed" || p,
407
+ hidden: u !== "collapsed" || p,
407
408
  ...n
408
409
  }
409
410
  )
410
411
  ] })) : x;
411
412
  }
412
413
  );
413
- ue.displayName = "SidebarMenuButton";
414
+ be.displayName = "SidebarMenuButton";
414
415
  const fe = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ r(
415
416
  e ? v : "button",
416
417
  {
@@ -530,7 +531,7 @@ export {
530
531
  le as SidebarMenu,
531
532
  fe as SidebarMenuAction,
532
533
  pe as SidebarMenuBadge,
533
- ue as SidebarMenuButton,
534
+ be as SidebarMenuButton,
534
535
  ce as SidebarMenuItem,
535
536
  me as SidebarMenuSkeleton,
536
537
  ge as SidebarMenuSub,
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 A } from "./components/ui/icon.js";
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 V } from "./components/ui/separator.js";
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 Ae } from "./components/ui/async-select.js";
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 Ve, CommandGroup as Ee, CommandInput as Oe, CommandItem as We, CommandList as je, CommandSeparator as qe, CommandShortcut as Je } from "./components/ui/command.js";
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 Ir, DrawerFooter as Ar, DrawerHeader as hr, DrawerTitle as Pr, DrawerTrigger as vr } from "./components/ui/drawer.js";
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 Vr, HoverCardTrigger as Er } from "./components/ui/hover-card.js";
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 Io, ResizablePanelGroup as Ao } from "./components/ui/resizable.js";
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 Vo, SheetDescription as Eo, SheetFooter as Oo, SheetHeader as Wo, SheetTitle as jo, SheetTrigger as qo } from "./components/ui/sheet.js";
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 It, DropdownMenuContent as At, DropdownMenuItem as ht, DropdownMenuLabel as Pt, DropdownMenuSeparator as vt, DropdownMenuTrigger as Ft } from "./components/ui/dropdown-menu.js";
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 Vt, ChartLegendContent as Et, ChartStyle as Ot, ChartTooltip as Wt, ChartTooltipContent as jt } from "./components/ui/chart.js";
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 Ia, SidebarHeader as Aa, 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 Va, useSidebar as Ea } from "./components/ui/sidebar.js";
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 { useAudioRecording as Dn } from "./hooks/use-audio-recording.js";
84
- import { useAutoScroll as An } from "./hooks/use-auto-scroll.js";
85
- import { useAutosizeTextArea as Pn } from "./hooks/use-autosize-textarea.js";
86
- import { useCopyToClipboard as Fn } from "./hooks/use-copy-to-clipboard.js";
87
- import { useDebounce as Gn } from "./hooks/use-debounce.js";
88
- import { useIsMobile as Bn } from "./hooks/use-mobile.js";
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
- Ae as AsyncSelect,
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
- Vt as ChartLegend,
138
- Et as ChartLegendContent,
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
- Ve as CommandEmpty,
155
- Ee as CommandGroup,
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
- Ir as DrawerDescription,
195
- Ar as DrawerFooter,
197
+ Ar as DrawerDescription,
198
+ Ir as DrawerFooter,
196
199
  hr as DrawerHeader,
197
200
  Pr as DrawerTitle,
198
201
  vr as DrawerTrigger,
199
- It as DropdownMenu,
200
- At as DropdownMenuContent,
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
- Vr as HoverCardContent,
219
- Er as HoverCardTrigger,
220
- A as Icon,
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
- Io as ResizablePanel,
272
- Ao as ResizablePanelGroup,
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
- V as Separator,
286
+ E as Separator,
284
287
  zo as Sheet,
285
- Vo as SheetContent,
286
- Eo as SheetDescription,
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
- Ia as SidebarGroupLabel,
298
- Aa as SidebarHeader,
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
- Va as SidebarTrigger,
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
- Dn as useAudioRecording,
350
- An as useAutoScroll,
351
- Pn as useAutosizeTextArea,
352
- Fn as useCopyToClipboard,
353
- Gn as useDebounce,
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
- Bn as useIsMobile,
356
- Ea as useSidebar
359
+ yn as useIsMobile,
360
+ Va as useSidebar
357
361
  };
@@ -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}