laif-ds 0.2.85 → 0.2.86

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 (120) hide show
  1. package/README.md +11 -81
  2. package/dist/CHANGELOG.md +7 -0
  3. package/dist/_virtual/index3.js +5 -5
  4. package/dist/_virtual/index4.js +5 -5
  5. package/dist/_virtual/index5.js +4 -4
  6. package/dist/_virtual/index7.js +5 -2
  7. package/dist/_virtual/index8.js +2 -5
  8. package/dist/agent-docs/adoption-report.json +2 -2
  9. package/dist/agent-docs/manifest.json +3 -3
  10. package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
  11. package/dist/components/editor/editor-ui/content-editable.js +1 -1
  12. package/dist/components/editor/nodes/mention-node.js +2 -2
  13. package/dist/components/editor/plugins/actions/clear-editor-plugin.js +2 -2
  14. package/dist/components/editor/plugins/actions/counter-character-plugin.js +2 -2
  15. package/dist/components/editor/plugins/mention-plugin.js +21 -21
  16. package/dist/components/editor/plugins/toolbar/block-format/format-bulleted-list.js +10 -10
  17. package/dist/components/editor/plugins/toolbar/block-format/format-check-list.js +5 -5
  18. package/dist/components/editor/plugins/toolbar/block-format/format-heading.js +5 -5
  19. package/dist/components/editor/plugins/toolbar/block-format/format-numbered-list.js +5 -5
  20. package/dist/components/editor/plugins/toolbar/block-format/format-paragraph.js +9 -9
  21. package/dist/components/editor/plugins/toolbar/block-format/format-quote.js +3 -3
  22. package/dist/components/editor/plugins/toolbar/block-format-toolbar-plugin.js +13 -13
  23. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +2 -2
  24. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +18 -19
  25. package/dist/components/editor/plugins/toolbar/mention-insert-toolbar-plugin.js +1 -1
  26. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +3 -3
  27. package/dist/components/ui/app-editor.js +51 -51
  28. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  29. package/dist/components/ui/markdown-renderer.js +33 -32
  30. package/dist/lib/utils.js +35 -34
  31. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  32. package/dist/node_modules/@floating-ui/{utils → core/node_modules/@floating-ui/utils}/dist/floating-ui.utils.js +33 -39
  33. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +20 -19
  34. package/dist/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +12 -0
  35. package/dist/node_modules/@lexical/clipboard/dist/LexicalClipboard.prod.js +354 -0
  36. package/dist/node_modules/@lexical/code-core/dist/LexicalCodeCore.prod.js +298 -0
  37. package/dist/node_modules/@lexical/dragon/dist/LexicalDragon.prod.js +89 -0
  38. package/dist/node_modules/@lexical/extension/dist/LexicalExtension.prod.js +611 -0
  39. package/dist/node_modules/@lexical/history/dist/LexicalHistory.prod.js +96 -0
  40. package/dist/node_modules/@lexical/html/dist/LexicalHtml.prod.js +604 -0
  41. package/dist/node_modules/@lexical/link/dist/LexicalLink.prod.js +201 -0
  42. package/dist/node_modules/@lexical/list/dist/LexicalList.prod.js +843 -0
  43. package/dist/node_modules/@lexical/markdown/dist/LexicalMarkdown.prod.js +555 -0
  44. package/dist/node_modules/@lexical/react/dist/LexicalCheckListPlugin.prod.js +11 -0
  45. package/dist/node_modules/@lexical/react/dist/LexicalClearEditorPlugin.prod.js +13 -0
  46. package/dist/node_modules/@lexical/react/dist/LexicalComposer.prod.js +45 -0
  47. package/dist/node_modules/@lexical/react/{LexicalComposerContext.prod.js → dist/LexicalComposerContext.prod.js} +1 -1
  48. package/dist/node_modules/@lexical/react/dist/LexicalContentEditable.prod.js +53 -0
  49. package/dist/node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.js +21 -0
  50. package/dist/node_modules/@lexical/react/{LexicalHistoryPlugin.prod.js → dist/LexicalHistoryPlugin.prod.js} +3 -3
  51. package/dist/node_modules/@lexical/react/dist/LexicalListPlugin.prod.js +17 -0
  52. package/dist/node_modules/@lexical/react/dist/LexicalOnChangePlugin.prod.js +16 -0
  53. package/dist/node_modules/@lexical/react/dist/LexicalReactProviderExtension.prod.js +6 -0
  54. package/dist/node_modules/@lexical/react/dist/LexicalRichTextPlugin.prod.js +77 -0
  55. package/dist/node_modules/@lexical/react/dist/LexicalTypeaheadMenuPlugin.prod.js +245 -0
  56. package/dist/node_modules/@lexical/react/dist/useLexicalEditable.prod.js +22 -0
  57. package/dist/node_modules/@lexical/rich-text/dist/LexicalRichText.prod.js +567 -0
  58. package/dist/node_modules/@lexical/selection/dist/LexicalSelection.prod.js +123 -0
  59. package/dist/node_modules/@lexical/table/dist/LexicalTable.prod.js +929 -0
  60. package/dist/node_modules/@lexical/text/{LexicalText.prod.js → dist/LexicalText.prod.js} +6 -6
  61. package/dist/node_modules/@lexical/utils/dist/LexicalUtils.prod.js +111 -0
  62. package/dist/node_modules/eventemitter3/index.js +1 -1
  63. package/dist/node_modules/eventemitter3/index2.js +1 -1
  64. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  65. package/dist/node_modules/lexical/dist/Lexical.prod.js +6731 -0
  66. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  67. package/dist/node_modules/unified/lib/index.js +1 -1
  68. package/package.json +14 -14
  69. package/dist/_virtual/prism-cpp.js +0 -3
  70. package/dist/_virtual/prism-cpp2.js +0 -5
  71. package/dist/_virtual/prism-java.js +0 -3
  72. package/dist/_virtual/prism-java2.js +0 -5
  73. package/dist/_virtual/prism-python.js +0 -3
  74. package/dist/_virtual/prism-python2.js +0 -5
  75. package/dist/_virtual/prism-rust.js +0 -3
  76. package/dist/_virtual/prism-rust2.js +0 -5
  77. package/dist/_virtual/prism-typescript.js +0 -3
  78. package/dist/_virtual/prism-typescript2.js +0 -5
  79. package/dist/_virtual/prism.js +0 -3
  80. package/dist/_virtual/prism2.js +0 -5
  81. package/dist/node_modules/@lexical/clipboard/LexicalClipboard.prod.js +0 -159
  82. package/dist/node_modules/@lexical/code/LexicalCode.prod.js +0 -236
  83. package/dist/node_modules/@lexical/dragon/LexicalDragon.prod.js +0 -46
  84. package/dist/node_modules/@lexical/history/LexicalHistory.prod.js +0 -89
  85. package/dist/node_modules/@lexical/html/LexicalHtml.prod.js +0 -108
  86. package/dist/node_modules/@lexical/link/LexicalLink.prod.js +0 -187
  87. package/dist/node_modules/@lexical/list/LexicalList.prod.js +0 -729
  88. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +0 -367
  89. package/dist/node_modules/@lexical/react/LexicalCheckListPlugin.prod.js +0 -11
  90. package/dist/node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js +0 -17
  91. package/dist/node_modules/@lexical/react/LexicalComposer.prod.js +0 -45
  92. package/dist/node_modules/@lexical/react/LexicalContentEditable.prod.js +0 -55
  93. package/dist/node_modules/@lexical/react/LexicalErrorBoundary.prod.js +0 -49
  94. package/dist/node_modules/@lexical/react/LexicalListPlugin.prod.js +0 -17
  95. package/dist/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +0 -16
  96. package/dist/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +0 -56
  97. package/dist/node_modules/@lexical/react/LexicalTypeaheadMenuPlugin.prod.js +0 -220
  98. package/dist/node_modules/@lexical/react/useLexicalEditable.prod.js +0 -21
  99. package/dist/node_modules/@lexical/rich-text/LexicalRichText.prod.js +0 -376
  100. package/dist/node_modules/@lexical/selection/LexicalSelection.prod.js +0 -107
  101. package/dist/node_modules/@lexical/table/LexicalTable.prod.js +0 -661
  102. package/dist/node_modules/@lexical/utils/LexicalUtils.prod.js +0 -102
  103. package/dist/node_modules/lexical/Lexical.prod.js +0 -4912
  104. package/dist/node_modules/prismjs/components/prism-c.js +0 -77
  105. package/dist/node_modules/prismjs/components/prism-clike.js +0 -32
  106. package/dist/node_modules/prismjs/components/prism-cpp.js +0 -93
  107. package/dist/node_modules/prismjs/components/prism-css.js +0 -56
  108. package/dist/node_modules/prismjs/components/prism-java.js +0 -122
  109. package/dist/node_modules/prismjs/components/prism-javascript.js +0 -138
  110. package/dist/node_modules/prismjs/components/prism-markdown.js +0 -301
  111. package/dist/node_modules/prismjs/components/prism-markup.js +0 -174
  112. package/dist/node_modules/prismjs/components/prism-objectivec.js +0 -11
  113. package/dist/node_modules/prismjs/components/prism-powershell.js +0 -56
  114. package/dist/node_modules/prismjs/components/prism-python.js +0 -69
  115. package/dist/node_modules/prismjs/components/prism-rust.js +0 -124
  116. package/dist/node_modules/prismjs/components/prism-sql.js +0 -34
  117. package/dist/node_modules/prismjs/components/prism-swift.js +0 -114
  118. package/dist/node_modules/prismjs/components/prism-typescript.js +0 -53
  119. package/dist/node_modules/prismjs/prism.js +0 -1165
  120. /package/dist/node_modules/@floating-ui/{utils → dom/node_modules/@floating-ui/utils}/dist/floating-ui.utils.dom.js +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as i } from "react/jsx-runtime";
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";
3
+ import { $isTableSelection as m } from "../../../../node_modules/@lexical/table/dist/LexicalTable.prod.js";
4
+ import { FORMAT_TEXT_COMMAND as l, $isRangeSelection as n } from "../../../../node_modules/lexical/dist/Lexical.prod.js";
5
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";
@@ -1,22 +1,21 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
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
- 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";
2
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
3
+ import { useLexicalComposerContext as f } from "../../../../node_modules/@lexical/react/dist/LexicalComposerContext.prod.js";
4
+ import { mergeRegister as N, 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/dist/Lexical.prod.js";
5
+ import { useState as a, useEffect as D } from "react";
6
+ import { useToolbarContext as E } from "../../context/toolbar-context.js";
7
+ import { Button as l } from "../../../ui/button.js";
8
+ import g from "../../../../node_modules/lucide-react/dist/esm/icons/undo.js";
10
9
  import A from "../../../../node_modules/lucide-react/dist/esm/icons/redo.js";
11
- function j() {
12
- const [i] = u(), { activeEditor: t, $updateToolbar: a } = g(), [r, l] = s(i.isEditable()), [m, c] = s(!1), [C, p] = s(!1);
10
+ function L() {
11
+ const [s] = f(), { activeEditor: t, $updateToolbar: i } = E(), [r, d] = a(s.isEditable()), [m, c] = a(!1), [C, u] = a(!1);
13
12
  return D(() => N(
14
- i.registerEditableListener((e) => {
15
- l(e);
13
+ s.registerEditableListener((e) => {
14
+ d(e);
16
15
  }),
17
16
  t.registerUpdateListener(({ editorState: e }) => {
18
17
  e.read(() => {
19
- a();
18
+ i();
20
19
  });
21
20
  }),
22
21
  t.registerCommand(
@@ -26,12 +25,12 @@ function j() {
26
25
  ),
27
26
  t.registerCommand(
28
27
  b,
29
- (e) => (p(e), !1),
28
+ (e) => (u(e), !1),
30
29
  n
31
30
  )
32
- ), [a, t, i]), /* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
31
+ ), [i, t, s]), /* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
33
32
  /* @__PURE__ */ o(
34
- d,
33
+ l,
35
34
  {
36
35
  disabled: !m || !r,
37
36
  onClick: () => {
@@ -43,11 +42,11 @@ function j() {
43
42
  size: "icon",
44
43
  className: "!h-8 !w-8",
45
44
  variant: "outline",
46
- children: /* @__PURE__ */ o(x, { className: "size-4" })
45
+ children: /* @__PURE__ */ o(g, { className: "size-4" })
47
46
  }
48
47
  ),
49
48
  /* @__PURE__ */ o(
50
- d,
49
+ l,
51
50
  {
52
51
  disabled: !C || !r,
53
52
  onClick: () => {
@@ -65,5 +64,5 @@ function j() {
65
64
  ] });
66
65
  }
67
66
  export {
68
- j as HistoryToolbarPlugin
67
+ L as HistoryToolbarPlugin
69
68
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { $getSelection as i, $isRangeSelection as c, $getRoot as a } from "../../../../node_modules/lexical/Lexical.prod.js";
3
+ import { $getSelection as i, $isRangeSelection as c, $getRoot as a } from "../../../../node_modules/lexical/dist/Lexical.prod.js";
4
4
  import { useToolbarContext as f } from "../../context/toolbar-context.js";
5
5
  import { Toggle as m } from "../../../ui/toggle.js";
6
6
  import p from "../../../../node_modules/lucide-react/dist/esm/icons/at-sign.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as p } from "react/jsx-runtime";
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";
3
+ import { useLexicalComposerContext as d } from "../../../../node_modules/@lexical/react/dist/LexicalComposerContext.prod.js";
4
+ import { SELECTION_CHANGE_COMMAND as u, COMMAND_PRIORITY_CRITICAL as f } from "../../../../node_modules/lexical/dist/Lexical.prod.js";
5
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";
@@ -12,7 +12,7 @@ function O({
12
12
  };
13
13
  return C(() => o.registerCommand(
14
14
  u,
15
- (M, c) => (a(c), !1),
15
+ (I, c) => (a(c), !1),
16
16
  f
17
17
  ), [t, o]), /* @__PURE__ */ p(
18
18
  T,
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as r, jsxs as t, Fragment as p } from "react/jsx-runtime";
3
- import { ListNode as D, ListItemNode as H } from "../../node_modules/@lexical/list/LexicalList.prod.js";
4
- import { TRANSFORMERS as z, $convertToMarkdownString as U, $convertFromMarkdownString as _ } from "../../node_modules/@lexical/markdown/LexicalMarkdown.prod.js";
5
- import { CheckListPlugin as Q } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
6
- import { ClearEditorPlugin as J } from "../../node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js";
7
- import { LexicalComposer as q } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
8
- import { useLexicalComposerContext as G } from "../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
9
- import { LexicalErrorBoundary as K } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
10
- import { HistoryPlugin as W } from "../../node_modules/@lexical/react/LexicalHistoryPlugin.prod.js";
11
- import { ListPlugin as X } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
12
- import { OnChangePlugin as Y } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
13
- import { RichTextPlugin as Z } from "../../node_modules/@lexical/react/LexicalRichTextPlugin.prod.js";
14
- import { HeadingNode as V, QuoteNode as rr } from "../../node_modules/@lexical/rich-text/LexicalRichText.prod.js";
15
- import { ParagraphNode as g, TextNode as h, $nodesOfType as or, $getRoot as b } from "../../node_modules/lexical/Lexical.prod.js";
3
+ import { ListNode as H, ListItemNode as D } from "../../node_modules/@lexical/list/dist/LexicalList.prod.js";
4
+ import { TRANSFORMERS as U, $convertToMarkdownString as _, $convertFromMarkdownString as z } from "../../node_modules/@lexical/markdown/dist/LexicalMarkdown.prod.js";
5
+ import { CheckListPlugin as Q } from "../../node_modules/@lexical/react/dist/LexicalCheckListPlugin.prod.js";
6
+ import { ClearEditorPlugin as K } from "../../node_modules/@lexical/react/dist/LexicalClearEditorPlugin.prod.js";
7
+ import { LexicalComposer as W } from "../../node_modules/@lexical/react/dist/LexicalComposer.prod.js";
8
+ import { useLexicalComposerContext as q } from "../../node_modules/@lexical/react/dist/LexicalComposerContext.prod.js";
9
+ import { LexicalErrorBoundary as G } from "../../node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.js";
10
+ import { HistoryPlugin as J } from "../../node_modules/@lexical/react/dist/LexicalHistoryPlugin.prod.js";
11
+ import { ListPlugin as X } from "../../node_modules/@lexical/react/dist/LexicalListPlugin.prod.js";
12
+ import { OnChangePlugin as Y } from "../../node_modules/@lexical/react/dist/LexicalOnChangePlugin.prod.js";
13
+ import { RichTextPlugin as Z } from "../../node_modules/@lexical/react/dist/LexicalRichTextPlugin.prod.js";
14
+ import { HeadingNode as V, QuoteNode as rr } from "../../node_modules/@lexical/rich-text/dist/LexicalRichText.prod.js";
15
+ import { ParagraphNode as g, TextNode as h, $nodesOfType as or, $getRoot as b } from "../../node_modules/lexical/dist/Lexical.prod.js";
16
16
  import { useState as er, useMemo as tr, useEffect as ir } from "react";
17
17
  import { ContentEditable as nr } from "../editor/editor-ui/content-editable.js";
18
- import { MentionNode as S } from "../editor/nodes/mention-node.js";
18
+ import { MentionNode as w } from "../editor/nodes/mention-node.js";
19
19
  import { ActionsPlugin as lr } from "../editor/plugins/actions/actions-plugin.js";
20
20
  import { ClearEditorActionPlugin as ar } from "../editor/plugins/actions/clear-editor-plugin.js";
21
21
  import { CounterCharacterPlugin as sr } from "../editor/plugins/actions/counter-character-plugin.js";
@@ -33,25 +33,25 @@ import { ToolbarPlugin as u } from "../editor/plugins/toolbar/toolbar-plugin.js"
33
33
  import { editorTheme as vr } from "../editor/themes/editor-theme.js";
34
34
  import { TooltipProvider as Er } from "./tooltip.js";
35
35
  import { HistoryToolbarPlugin as Fr } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
36
- import { cn as Pr } from "../../lib/utils.js";
37
- const yr = "Start typing...", Cr = {
36
+ import { cn as Cr } from "../../lib/utils.js";
37
+ const Pr = "Start typing...", yr = {
38
38
  format: ["underline"],
39
39
  tag: "++",
40
40
  type: "text-format"
41
- }, w = [
42
- ...z,
43
- Cr
44
- ], Rr = (o) => o.replace(/<u>(.*?)<\/u>/g, "++$1++"), Tr = (o) => o.replace(/\+\+(.+?)\+\+/g, "<u>$1</u>");
45
- function Sr({
41
+ }, S = [
42
+ ...U,
43
+ yr
44
+ ], Tr = (o) => o.replace(/<u>(.*?)<\/u>/g, "++$1++"), Rr = (o) => o.replace(/\+\+(.+?)\+\+/g, "<u>$1</u>");
45
+ function wr({
46
46
  defaultValue: o,
47
47
  onlyMarkdown: a,
48
48
  transformers: n
49
49
  }) {
50
- const [s] = G();
50
+ const [s] = q();
51
51
  return ir(() => {
52
52
  o && s.update(() => {
53
- a ? _(
54
- Rr(o),
53
+ a ? z(
54
+ Tr(o),
55
55
  n
56
56
  ) : b().append(
57
57
  new g().append(new h(o))
@@ -67,15 +67,15 @@ function co({
67
67
  onValueChange: n,
68
68
  plugins: s = [],
69
69
  toolbars: m = [],
70
- placeholder: M = yr,
70
+ placeholder: L = Pr,
71
71
  onlyMarkdown: x = !0,
72
- className: L = "rounded-lg border border-d-border",
72
+ className: M = "rounded-lg border border-d-border",
73
73
  wrpClassName: A = "",
74
74
  mentions: c,
75
75
  mentionTrigger: N = "@"
76
76
  }) {
77
77
  const [, k] = er(null), l = c !== void 0, v = tr(
78
- () => l ? [mr, ...w] : w,
78
+ () => l ? [mr, ...S] : S,
79
79
  [l]
80
80
  ), O = {
81
81
  namespace: "AppEditor",
@@ -85,9 +85,9 @@ function co({
85
85
  g,
86
86
  h,
87
87
  rr,
88
- D,
89
88
  H,
90
- ...l ? [S] : []
89
+ D,
90
+ ...l ? [w] : []
91
91
  ],
92
92
  onError: (e) => {
93
93
  console.error(e);
@@ -99,10 +99,10 @@ function co({
99
99
  );
100
100
  }
101
101
  } : {}
102
- }, E = (e) => s.includes(e), f = (e) => m.includes(e), F = E("clear"), P = E("counter"), y = f("block-format"), I = f("font-format"), C = f("history");
103
- return /* @__PURE__ */ r("div", { className: Pr("bg-d-background flex h-96 flex-col", A), children: /* @__PURE__ */ r(q, { initialConfig: O, children: /* @__PURE__ */ t(Er, { children: [
102
+ }, E = (e) => s.includes(e), f = (e) => m.includes(e), F = E("clear"), C = E("counter"), P = f("block-format"), $ = f("font-format"), y = f("history");
103
+ return /* @__PURE__ */ r("div", { className: Cr("bg-d-background flex h-96 flex-col", A), children: /* @__PURE__ */ r(W, { initialConfig: O, children: /* @__PURE__ */ t(Er, { children: [
104
104
  o && /* @__PURE__ */ r(
105
- Sr,
105
+ wr,
106
106
  {
107
107
  defaultValue: o,
108
108
  onlyMarkdown: x,
@@ -111,8 +111,8 @@ function co({
111
111
  ),
112
112
  l && /* @__PURE__ */ r(cr, { source: c, trigger: N }),
113
113
  /* @__PURE__ */ t("div", { className: "border-d-border flex items-center border-b", children: [
114
- C && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(Fr, {}) }) }),
115
- y && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(xr, { children: [
114
+ y && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(Fr, {}) }) }),
115
+ P && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(xr, { children: [
116
116
  /* @__PURE__ */ r(hr, {}),
117
117
  /* @__PURE__ */ r(ur, { levels: ["h1", "h2", "h3"] }),
118
118
  /* @__PURE__ */ r(gr, {}),
@@ -120,7 +120,7 @@ function co({
120
120
  /* @__PURE__ */ r(pr, {}),
121
121
  /* @__PURE__ */ r(br, {})
122
122
  ] }) }) }) }),
123
- I && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
123
+ $ && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
124
124
  /* @__PURE__ */ r(d, { format: "bold" }),
125
125
  /* @__PURE__ */ r(d, { format: "italic" }),
126
126
  /* @__PURE__ */ r(d, { format: "underline" }),
@@ -134,11 +134,11 @@ function co({
134
134
  ] }) })
135
135
  ] }),
136
136
  /* @__PURE__ */ t("div", { className: "relative flex min-h-0 w-full flex-1 flex-col", children: [
137
- C && /* @__PURE__ */ r(W, {}),
137
+ y && /* @__PURE__ */ r(J, {}),
138
138
  /* @__PURE__ */ r(
139
139
  Z,
140
140
  {
141
- ErrorBoundary: K,
141
+ ErrorBoundary: G,
142
142
  contentEditable: /* @__PURE__ */ r(
143
143
  "div",
144
144
  {
@@ -147,24 +147,24 @@ function co({
147
147
  children: /* @__PURE__ */ r(
148
148
  nr,
149
149
  {
150
- placeholder: M,
151
- className: `border-d-border w-full rounded-none border-b ${L}`
150
+ placeholder: L,
151
+ className: `border-d-border w-full rounded-none border-b ${M}`
152
152
  }
153
153
  )
154
154
  }
155
155
  )
156
156
  }
157
157
  ),
158
- y && /* @__PURE__ */ t(p, { children: [
158
+ P && /* @__PURE__ */ t(p, { children: [
159
159
  /* @__PURE__ */ r(X, {}),
160
160
  /* @__PURE__ */ r(Q, {})
161
161
  ] }),
162
- (F || P) && /* @__PURE__ */ r(lr, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
162
+ (F || C) && /* @__PURE__ */ r(lr, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
163
163
  /* @__PURE__ */ r("div", { className: "flex flex-1 justify-start" }),
164
- /* @__PURE__ */ r("div", { children: P && /* @__PURE__ */ r(sr, { charset: "UTF-16" }) }),
164
+ /* @__PURE__ */ r("div", { children: C && /* @__PURE__ */ r(sr, { charset: "UTF-16" }) }),
165
165
  /* @__PURE__ */ r("div", { className: "flex flex-1 justify-end gap-2", children: F && /* @__PURE__ */ t(p, { children: [
166
166
  /* @__PURE__ */ r(ar, {}),
167
- /* @__PURE__ */ r(J, {})
167
+ /* @__PURE__ */ r(K, {})
168
168
  ] }) })
169
169
  ] }) })
170
170
  ] }),
@@ -174,21 +174,21 @@ function co({
174
174
  ignoreSelectionChange: !0,
175
175
  onChange: (e) => {
176
176
  if (!n && !a) return;
177
- const R = Tr(
178
- e.read(() => U(v))
177
+ const T = Rr(
178
+ e.read(() => _(v))
179
179
  );
180
180
  if (!n) {
181
- a?.(R);
181
+ a?.(T);
182
182
  return;
183
183
  }
184
- let T = [];
184
+ let R = [];
185
185
  if (l) {
186
- const $ = e.read(
187
- () => dr(or(S))
186
+ const I = e.read(
187
+ () => dr(or(w))
188
188
  ), j = Array.isArray(c) ? c : [], B = new Map(
189
189
  j.map((i) => [String(i.id), i])
190
190
  );
191
- T = $.map(
191
+ R = I.map(
192
192
  (i) => B.get(String(i.id)) ?? {
193
193
  id: i.id,
194
194
  label: i.label,
@@ -196,7 +196,7 @@ function co({
196
196
  }
197
197
  );
198
198
  }
199
- n(R, { mentions: T });
199
+ n(T, { mentions: R });
200
200
  }
201
201
  }
202
202
  )
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as b, Fragment as G } from "react/jsx-runtime";
3
- import L from "../../../../../_virtual/index8.js";
3
+ import L from "../../../../../_virtual/index7.js";
4
4
  import _ from "../../../../../_virtual/debounce3.js";
5
5
  import { useContext as j, useRef as l, useState as o, useCallback as M, useMemo as N, useEffect as a } from "react";
6
6
  import { GanttContext as O } from "../Gantt/GanttContext.js";
@@ -1,28 +1,29 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as p, Fragment as y } from "react/jsx-runtime";
3
- import g, { Suspense as x } from "react";
3
+ import m, { Suspense as x } from "react";
4
4
  import { CopyButton as k } from "./copy-button.js";
5
- import { cn as m } from "../../lib/utils.js";
6
- import { Markdown as w } from "../../node_modules/react-markdown/lib/index.js";
7
- import N from "../../node_modules/rehype-raw/lib/index.js";
8
- import v from "../../node_modules/remark-gfm/lib/index.js";
9
- function B({ children: e }) {
5
+ import { normalizeEmphasisWhitespace as w, cn as h } from "../../lib/utils.js";
6
+ import { Markdown as N } from "../../node_modules/react-markdown/lib/index.js";
7
+ import v from "../../node_modules/rehype-raw/lib/index.js";
8
+ import C from "../../node_modules/remark-gfm/lib/index.js";
9
+ function z({ children: e }) {
10
+ const o = w(e);
10
11
  return /* @__PURE__ */ t("div", { className: "space-y-3", children: /* @__PURE__ */ t(
11
- w,
12
+ N,
12
13
  {
13
- remarkPlugins: [v],
14
- rehypePlugins: [N],
15
- components: S,
16
- children: e
14
+ remarkPlugins: [C],
15
+ rehypePlugins: [v],
16
+ components: T,
17
+ children: o
17
18
  }
18
19
  ) });
19
20
  }
20
- const u = g.memo(
21
+ const g = m.memo(
21
22
  async ({ children: e, language: o, ...n }) => {
22
- const { codeToTokens: i, bundledLanguages: d } = await import("../../node_modules/shiki/dist/index.js");
23
- if (!(o in d))
23
+ const { codeToTokens: i, bundledLanguages: l } = await import("../../node_modules/shiki/dist/index.js");
24
+ if (!(o in l))
24
25
  return /* @__PURE__ */ t("pre", { ...n, children: e });
25
- const { tokens: l } = await i(e, {
26
+ const { tokens: a } = await i(e, {
26
27
  lang: o,
27
28
  defaultColor: !1,
28
29
  themes: {
@@ -30,32 +31,32 @@ const u = g.memo(
30
31
  dark: "github-dark"
31
32
  }
32
33
  });
33
- return /* @__PURE__ */ t("pre", { ...n, children: /* @__PURE__ */ t("code", { children: l.map((h, c) => /* @__PURE__ */ p(y, { children: [
34
- /* @__PURE__ */ t("span", { children: h.map((a, b) => {
35
- const f = typeof a.htmlStyle == "string" ? void 0 : a.htmlStyle;
34
+ return /* @__PURE__ */ t("pre", { ...n, children: /* @__PURE__ */ t("code", { children: a.map((u, c) => /* @__PURE__ */ p(y, { children: [
35
+ /* @__PURE__ */ t("span", { children: u.map((d, b) => {
36
+ const f = typeof d.htmlStyle == "string" ? void 0 : d.htmlStyle;
36
37
  return /* @__PURE__ */ t(
37
38
  "span",
38
39
  {
39
40
  className: "text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",
40
41
  style: f,
41
- children: a.content
42
+ children: d.content
42
43
  },
43
44
  b
44
45
  );
45
46
  }) }, c),
46
- c !== l.length - 1 && `
47
+ c !== a.length - 1 && `
47
48
  `
48
49
  ] })) }) });
49
50
  }
50
51
  );
51
- u.displayName = "HighlightedCode";
52
- const C = ({
52
+ g.displayName = "HighlightedCode";
53
+ const S = ({
53
54
  children: e,
54
55
  className: o,
55
56
  language: n,
56
57
  ...i
57
58
  }) => {
58
- const d = typeof e == "string" ? e : s(e), l = m(
59
+ const l = typeof e == "string" ? e : s(e), a = h(
59
60
  "overflow-x-scroll rounded-md border border-d-border bg-d-background/50 p-4 font-mono text-sm [scrollbar-width:none]",
60
61
  o
61
62
  );
@@ -63,23 +64,23 @@ const C = ({
63
64
  /* @__PURE__ */ t(
64
65
  x,
65
66
  {
66
- fallback: /* @__PURE__ */ t("pre", { className: l, ...i, children: e }),
67
- children: /* @__PURE__ */ t(u, { language: n, className: l, children: d })
67
+ fallback: /* @__PURE__ */ t("pre", { className: a, ...i, children: e }),
68
+ children: /* @__PURE__ */ t(g, { language: n, className: a, children: l })
68
69
  }
69
70
  ),
70
- /* @__PURE__ */ t("div", { className: "invisible absolute top-2 right-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100", children: /* @__PURE__ */ t(k, { content: d, copyMessage: "Copied code to clipboard" }) })
71
+ /* @__PURE__ */ t("div", { className: "invisible absolute top-2 right-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100", children: /* @__PURE__ */ t(k, { content: l, copyMessage: "Copied code to clipboard" }) })
71
72
  ] });
72
73
  };
73
74
  function s(e) {
74
75
  if (typeof e == "string")
75
76
  return e;
76
- if (g.isValidElement(e) && e.props && typeof e.props == "object" && "children" in e.props) {
77
+ if (m.isValidElement(e) && e.props && typeof e.props == "object" && "children" in e.props) {
77
78
  const o = e.props.children;
78
79
  return o && typeof o == "object" && Array.isArray(o) ? o.map((n) => s(n)).join("") : s(o);
79
80
  }
80
81
  return "";
81
82
  }
82
- const S = {
83
+ const T = {
83
84
  h1: r("h1", "text-2xl font-semibold"),
84
85
  h2: r("h2", "font-semibold text-xl"),
85
86
  h3: r("h3", "font-semibold text-lg"),
@@ -95,10 +96,10 @@ const S = {
95
96
  ...n
96
97
  }) => {
97
98
  const i = /language-(\w+)/.exec(o || "");
98
- return i ? /* @__PURE__ */ t(C, { className: o, language: i[1], ...n, children: e }) : /* @__PURE__ */ t(
99
+ return i ? /* @__PURE__ */ t(S, { className: o, language: i[1], ...n, children: e }) : /* @__PURE__ */ t(
99
100
  "code",
100
101
  {
101
- className: m(
102
+ className: h(
102
103
  "[:not(pre)>&]:bg-d-background/50 font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"
103
104
  ),
104
105
  ...n,
@@ -133,6 +134,6 @@ function r(e, o) {
133
134
  return n.displayName = String(e), n;
134
135
  }
135
136
  export {
136
- B as MarkdownRenderer,
137
- B as default
137
+ z as MarkdownRenderer,
138
+ z as default
138
139
  };
package/dist/lib/utils.js CHANGED
@@ -1,53 +1,54 @@
1
1
  "use client";
2
2
  import { clsx as l } from "../node_modules/clsx/dist/clsx.js";
3
3
  import { twMerge as m } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
4
- import { guessKind as d, getOfficeEmbedUrl as p } from "./file-preview.js";
5
- function u(...n) {
6
- return m(l(n));
4
+ import { guessKind as p, getOfficeEmbedUrl as d } from "./file-preview.js";
5
+ function u(...t) {
6
+ return m(l(t));
7
7
  }
8
- const b = (n) => {
9
- if (!n) return "#777777";
10
- let e = 0;
11
- for (let s = 0; s < n.length; s += 1)
12
- e = n.charCodeAt(s) + ((e << 5) - e), e &= e;
13
- let t = e >> 16 & 255, o = e >> 8 & 255, r = e & 255;
8
+ const b = (t) => t.replace(/(\*{1,3}|_{1,3}|~{1,2})(?:&#32;)+/g, " $1").replace(/(?:&#32;)+(\*{1,3}|_{1,3}|~{1,2})/g, "$1 "), w = (t) => {
9
+ if (!t) return "#777777";
10
+ let n = 0;
11
+ for (let s = 0; s < t.length; s += 1)
12
+ n = t.charCodeAt(s) + ((n << 5) - n), n &= n;
13
+ let e = n >> 16 & 255, o = n >> 8 & 255, r = n & 255;
14
14
  const c = 60, a = 200;
15
- t = Math.min(a, Math.max(c, t)), o = Math.min(a, Math.max(c, o)), r = Math.min(a, Math.max(c, r));
15
+ e = Math.min(a, Math.max(c, e)), o = Math.min(a, Math.max(c, o)), r = Math.min(a, Math.max(c, r));
16
16
  const i = (s) => s.toString(16).padStart(2, "0");
17
- return `#${i(t)}${i(o)}${i(r)}`;
18
- }, w = (n, e) => {
19
- let t = n.replace("#", "");
20
- t.length === 3 && (t = t.split("").map((i) => i + i).join(""));
21
- const o = parseInt(t, 16), r = o >> 16 & 255, c = o >> 8 & 255, a = o & 255;
22
- return `rgba(${r}, ${c}, ${a}, ${e})`;
23
- }, x = (n) => {
24
- const e = parseInt(n.replace("#", ""), 16), t = e >> 16 & 255, o = e >> 8 & 255, r = e & 255;
25
- return (0.299 * t + 0.587 * o + 0.114 * r) / 255 > 0.5 ? "#000000" : "#FFFFFF";
26
- }, y = (n, e) => {
27
- if (!n) return;
28
- const t = n.split("?")[1] || "";
17
+ return `#${i(e)}${i(o)}${i(r)}`;
18
+ }, x = (t, n) => {
19
+ let e = t.replace("#", "");
20
+ e.length === 3 && (e = e.split("").map((i) => i + i).join(""));
21
+ const o = parseInt(e, 16), r = o >> 16 & 255, c = o >> 8 & 255, a = o & 255;
22
+ return `rgba(${r}, ${c}, ${a}, ${n})`;
23
+ }, y = (t) => {
24
+ const n = parseInt(t.replace("#", ""), 16), e = n >> 16 & 255, o = n >> 8 & 255, r = n & 255;
25
+ return (0.299 * e + 0.587 * o + 0.114 * r) / 255 > 0.5 ? "#000000" : "#FFFFFF";
26
+ }, $ = (t, n) => {
27
+ if (!t) return;
28
+ const e = t.split("?")[1] || "";
29
29
  let o = "";
30
30
  try {
31
- const c = new URLSearchParams(t);
31
+ const c = new URLSearchParams(e);
32
32
  o = c.get("response-content-type") || c.get("content-type") || "";
33
33
  } catch {
34
34
  }
35
- if (d({ mimeType: o, filename: e, url: n }) === "office") {
36
- const c = p(n);
35
+ if (p({ mimeType: o, filename: n, url: t }) === "office") {
36
+ const c = d(t);
37
37
  window.open(c, "_blank");
38
38
  return;
39
39
  }
40
- window.open(n, "_blank");
41
- }, F = (n, e) => {
42
- if (!n) return;
43
- const t = document.createElement("a");
44
- t.href = n, t.download = e || "document", t.style.display = "none", document.body.appendChild(t), t.click(), document.body.removeChild(t);
40
+ window.open(t, "_blank");
41
+ }, F = (t, n) => {
42
+ if (!t) return;
43
+ const e = document.createElement("a");
44
+ e.href = t, e.download = n || "document", e.style.display = "none", document.body.appendChild(e), e.click(), document.body.removeChild(e);
45
45
  };
46
46
  export {
47
47
  u as cn,
48
48
  F as downloadFile,
49
- x as hexContrast,
50
- w as hexToRgba,
51
- y as previewFile,
52
- b as stringToHexColor
49
+ y as hexContrast,
50
+ x as hexToRgba,
51
+ b as normalizeEmphasisWhitespace,
52
+ $ as previewFile,
53
+ w as stringToHexColor
53
54
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as se, getAxisLength as Q } from "../../utils/dist/floating-ui.utils.js";
2
+ import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as se, getAxisLength as Q } from "../node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
3
3
  function I(t, e, d) {
4
4
  let {
5
5
  reference: a,