@pstdio/ui 0.45.0-nightly.20261021030241 → 0.45.0

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 (133) hide show
  1. package/dist/{EquationComponent-DDd5UoIP.js → EquationComponent-BtOgXA3g.js} +3 -5
  2. package/dist/{EquationComponent-DDd5UoIP.js.map → EquationComponent-BtOgXA3g.js.map} +1 -1
  3. package/dist/{MermaidComponent-CTWuGAqI.js → MermaidComponent--W7gDFCk.js} +4 -5
  4. package/dist/{MermaidComponent-CTWuGAqI.js.map → MermaidComponent--W7gDFCk.js.map} +1 -1
  5. package/dist/activity-timeline-D-IDENMg.js +349 -0
  6. package/dist/activity-timeline-D-IDENMg.js.map +1 -0
  7. package/dist/{apply-theme-preference-B0vCu8zY.d.ts → apply-theme-preference-Wdm8bz5f.d.ts} +0 -2
  8. package/dist/{browser-storage-C_ipoNwP.js → browser-storage-CIj_9R9x.js} +2 -3
  9. package/dist/{browser-storage-C_ipoNwP.js.map → browser-storage-CIj_9R9x.js.map} +1 -1
  10. package/dist/chat-ui.d.ts +2 -40
  11. package/dist/chat-ui.js +219 -280
  12. package/dist/chat-ui.js.map +1 -1
  13. package/dist/{collection-view-fields-tMtZmuhS.d.ts → collection-view-fields-CBlYAPxD.d.ts} +1 -9
  14. package/dist/{collection-view-grouping-BQMfKdQG.js → collection-view-grouping-BHuFPVAV.js} +3 -4
  15. package/dist/{collection-view-grouping-BQMfKdQG.js.map → collection-view-grouping-BHuFPVAV.js.map} +1 -1
  16. package/dist/{collection-view-search-DS9U9WAl.js → collection-view-search-CLvyY0cg.js} +21 -35
  17. package/dist/{collection-view-search-DS9U9WAl.js.map → collection-view-search-CLvyY0cg.js.map} +1 -1
  18. package/dist/collection-view.d.ts +1 -15
  19. package/dist/collection-view.js +3 -4
  20. package/dist/collection-view.js.map +1 -1
  21. package/dist/{data-table-stat-chart-content-waJAm_nt.js → data-table-stat-chart-content-CJVgiHlL.js} +2 -3
  22. package/dist/{data-table-stat-chart-content-waJAm_nt.js.map → data-table-stat-chart-content-CJVgiHlL.js.map} +1 -1
  23. package/dist/data-table.d.ts +2 -14
  24. package/dist/data-table.js +16 -22
  25. package/dist/data-table.js.map +1 -1
  26. package/dist/{diff-bubble-DewUd_2w.js → diff-bubble-DietCcSc.js} +2 -3
  27. package/dist/{diff-bubble-DewUd_2w.js.map → diff-bubble-DietCcSc.js.map} +1 -1
  28. package/dist/{diff-drawer-ByJsQg8F.js → diff-drawer-COlghuX8.js} +11 -25
  29. package/dist/{diff-drawer-ByJsQg8F.js.map → diff-drawer-COlghuX8.js.map} +1 -1
  30. package/dist/{diff-editor-CGpeyoCE.js → diff-editor-BMBk4KXR.js} +3 -4
  31. package/dist/{diff-editor-CGpeyoCE.js.map → diff-editor-BMBk4KXR.js.map} +1 -1
  32. package/dist/{diff-size-Dydn_Uw5.js → diff-size-BR8D-bcL.js} +2 -3
  33. package/dist/{diff-size-Dydn_Uw5.js.map → diff-size-BR8D-bcL.js.map} +1 -1
  34. package/dist/{diff-viewer-ChEyTNpa.js → diff-viewer-nCYtig03.js} +10 -15
  35. package/dist/{diff-viewer-ChEyTNpa.js.map → diff-viewer-nCYtig03.js.map} +1 -1
  36. package/dist/diff.d.ts +0 -22
  37. package/dist/diff.js +8 -9
  38. package/dist/{display-sort-control-BUMkmlIu.js → display-sort-control-DXXkOgUC.js} +6 -7
  39. package/dist/{display-sort-control-BUMkmlIu.js.map → display-sort-control-DXXkOgUC.js.map} +1 -1
  40. package/dist/{drop-indicator-HjlBSIeV.js → drop-indicator-66rhST1K.js} +2 -3
  41. package/dist/{drop-indicator-HjlBSIeV.js.map → drop-indicator-66rhST1K.js.map} +1 -1
  42. package/dist/{edit-mode-data-table-MKEjfFUw.js → edit-mode-data-table-lvGsQ1Da.js} +17 -27
  43. package/dist/{edit-mode-data-table-MKEjfFUw.js.map → edit-mode-data-table-lvGsQ1Da.js.map} +1 -1
  44. package/dist/{empty-state-3mVV_pV-.js → empty-state-J96iLli9.js} +2 -3
  45. package/dist/{empty-state-3mVV_pV-.js.map → empty-state-J96iLli9.js.map} +1 -1
  46. package/dist/{file-change-badge-0QFNv82B.js → file-change-badge-5_T5hnWQ.js} +2 -3
  47. package/dist/{file-change-badge-0QFNv82B.js.map → file-change-badge-5_T5hnWQ.js.map} +1 -1
  48. package/dist/{host-storage-28AkEy1N.js → host-storage-CtscVB4w.js} +3 -4
  49. package/dist/{host-storage-28AkEy1N.js.map → host-storage-CtscVB4w.js.map} +1 -1
  50. package/dist/{host-storage-J0089Hyk.d.ts → host-storage-SnBKPpbc.d.ts} +0 -2
  51. package/dist/{icon-options-DpzDAnlu.js → icon-options-DJmsp8bw.js} +2 -4
  52. package/dist/{icon-options-DpzDAnlu.js.map → icon-options-DJmsp8bw.js.map} +1 -1
  53. package/dist/{index-3H4B61XK.d.ts → index-B0bZ__Yf.d.ts} +1 -5
  54. package/dist/{index-DlmvvQ6x.d.ts → index-CYiWcIGu.d.ts} +0 -18
  55. package/dist/{index-C0PaeiBy.d.ts → index-DYCXgPCg.d.ts} +2 -34
  56. package/dist/{index-eV_0Gjzo.d.ts → index-DzVOXj8n.d.ts} +1 -37
  57. package/dist/index.d.ts +6 -156
  58. package/dist/index.js +973 -958
  59. package/dist/index.js.map +1 -1
  60. package/dist/kanban-renderer.d.ts +2 -2
  61. package/dist/kanban-renderer.js +24 -44
  62. package/dist/kanban-renderer.js.map +1 -1
  63. package/dist/{list-row-BDDAVuVd.js → list-row-Dqb5Xfjf.js} +12 -39
  64. package/dist/{list-row-BDDAVuVd.js.map → list-row-Dqb5Xfjf.js.map} +1 -1
  65. package/dist/{markdown-editor-BPGIS9ku.js → markdown-editor-D419iTD2.js} +65 -159
  66. package/dist/markdown-editor-D419iTD2.js.map +1 -0
  67. package/dist/{mermaid-renderer-BtW_13Sz.js → mermaid-renderer-B8LpF3rD.js} +6 -12
  68. package/dist/{mermaid-renderer-BtW_13Sz.js.map → mermaid-renderer-B8LpF3rD.js.map} +1 -1
  69. package/dist/mermaid.d.ts +0 -2
  70. package/dist/mermaid.js +1 -2
  71. package/dist/{monaco-browser-CLRPSE4-.js → monaco-browser-BBIyiPtL.js} +2 -3
  72. package/dist/{monaco-browser-CLRPSE4-.js.map → monaco-browser-BBIyiPtL.js.map} +1 -1
  73. package/dist/{number-input-QDqWYzTR.js → number-input-DzRvKj64.js} +3 -4
  74. package/dist/{number-input-QDqWYzTR.js.map → number-input-DzRvKj64.js.map} +1 -1
  75. package/dist/{param-editor-Bva0M7Ns.js → param-editor-DyIO1rSf.js} +8 -14
  76. package/dist/{param-editor-Bva0M7Ns.js.map → param-editor-DyIO1rSf.js.map} +1 -1
  77. package/dist/{param-editor-field-BPBlweVg.js → param-editor-field-Bt7NP9OH.js} +682 -676
  78. package/dist/param-editor-field-Bt7NP9OH.js.map +1 -0
  79. package/dist/param-editor.d.ts +0 -66
  80. package/dist/param-editor.js +3 -3
  81. package/dist/prism-CQBZiF5P.js +391 -0
  82. package/dist/prism-CQBZiF5P.js.map +1 -0
  83. package/dist/{queued-follow-up-Bj_vtMgd.js → queued-follow-up-Bl8TC36-.js} +2 -3
  84. package/dist/{queued-follow-up-Bj_vtMgd.js.map → queued-follow-up-Bl8TC36-.js.map} +1 -1
  85. package/dist/{radio-CiFrDN6O.js → radio-BPnviQ4h.js} +2 -3
  86. package/dist/{radio-CiFrDN6O.js.map → radio-BPnviQ4h.js.map} +1 -1
  87. package/dist/{resolve-icon-component-Dy0pOuj5.js → resolve-icon-component-BrIOFsnC.js} +3 -4
  88. package/dist/{resolve-icon-component-Dy0pOuj5.js.map → resolve-icon-component-BrIOFsnC.js.map} +1 -1
  89. package/dist/{resource-badge-DGwekS-G.d.ts → resource-badge-C73K0Vg9.d.ts} +0 -4
  90. package/dist/{rich-text-CH2psble.js → rich-text-DBpBdWtn.js} +75 -104
  91. package/dist/{rich-text-CH2psble.js.map → rich-text-DBpBdWtn.js.map} +1 -1
  92. package/dist/rich-text.d.ts +1 -1
  93. package/dist/rich-text.js +3 -3
  94. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  95. package/dist/{scroll-area-IeoRS73V.js → scroll-area-BfAlvhjh.js} +3 -5
  96. package/dist/{scroll-area-IeoRS73V.js.map → scroll-area-BfAlvhjh.js.map} +1 -1
  97. package/dist/split-panel-motion-context-B8QvAyTv.js +6 -0
  98. package/dist/{split-panel-motion-context-YB0sduVv.js.map → split-panel-motion-context-B8QvAyTv.js.map} +1 -1
  99. package/dist/terminal.d.ts +1 -11
  100. package/dist/terminal.js +7 -15
  101. package/dist/terminal.js.map +1 -1
  102. package/dist/{theme-kKuLN2jb.js → theme-BMHkV5Ry.js} +2 -3
  103. package/dist/{theme-kKuLN2jb.js.map → theme-BMHkV5Ry.js.map} +1 -1
  104. package/dist/{theme-preference-BV4cbJNB.js → theme-preference-Bdi0s7vE.js} +10 -19
  105. package/dist/{theme-preference-BV4cbJNB.js.map → theme-preference-Bdi0s7vE.js.map} +1 -1
  106. package/dist/{theme-BsStBWWL.js → theme-rmCwx-aG.js} +30 -14
  107. package/dist/theme-rmCwx-aG.js.map +1 -0
  108. package/dist/theme.d.ts +1 -1
  109. package/dist/theme.js +2 -2
  110. package/dist/{tree-list-aNC_UTGS.js → tree-list-Bg8U7ZYc.js} +31 -65
  111. package/dist/{tree-list-aNC_UTGS.js.map → tree-list-Bg8U7ZYc.js.map} +1 -1
  112. package/dist/{use-virtualizer-CqDYJolY.js → use-virtualizer-B6ABIiNI.js} +2 -3
  113. package/dist/{use-virtualizer-CqDYJolY.js.map → use-virtualizer-B6ABIiNI.js.map} +1 -1
  114. package/dist/{workspace-badge-BMjS8ii4.d.ts → workspace-badge-DI6ZpW9Z.d.ts} +0 -6
  115. package/dist/{workspace-badge-DqQKSUJw.js → workspace-badge-Dqi-Sh_Q.js} +3 -4
  116. package/dist/{workspace-badge-DqQKSUJw.js.map → workspace-badge-Dqi-Sh_Q.js.map} +1 -1
  117. package/dist-monaco/assets/{css.worker-DFdt6_zu.js → css.worker-D55UB6Ki.js} +7 -7
  118. package/dist-monaco/assets/editor.worker-C3R1XRkp.js +26 -0
  119. package/dist-monaco/assets/{html.worker-JUzsMP-j.js → html.worker-CFLR1M2C.js} +7 -7
  120. package/dist-monaco/assets/json.worker-DJ19GkSR.js +58 -0
  121. package/dist-monaco/assets/{ts.worker-CmEKzkmF.js → ts.worker-DJNYEI7I.js} +32 -32
  122. package/dist-monaco/monaco.js +188 -188
  123. package/package.json +2 -2
  124. package/dist/alert-CO-uOKLm.js +0 -409
  125. package/dist/alert-CO-uOKLm.js.map +0 -1
  126. package/dist/markdown-editor-BPGIS9ku.js.map +0 -1
  127. package/dist/param-editor-field-BPBlweVg.js.map +0 -1
  128. package/dist/prism-E3-NXX_t.js +0 -335
  129. package/dist/prism-E3-NXX_t.js.map +0 -1
  130. package/dist/split-panel-motion-context-YB0sduVv.js +0 -7
  131. package/dist/theme-BsStBWWL.js.map +0 -1
  132. package/dist-monaco/assets/editor.worker-O-CH8JUO.js +0 -26
  133. package/dist-monaco/assets/json.worker-B4dEhy0e.js +0 -58
@@ -1,10 +1,10 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { n as t, t as n } from "./scroll-area-IeoRS73V.js";
3
- import { a as r, i } from "./prism-E3-NXX_t.js";
4
- import { t as a } from "./host-storage-28AkEy1N.js";
5
- import { t as o } from "./resolve-icon-component-Dy0pOuj5.js";
6
- import { t as s } from "./edit-mode-data-table-MKEjfFUw.js";
7
- import { y as c } from "./param-editor-field-BPBlweVg.js";
1
+ import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
+ import { n as t, t as n } from "./scroll-area-BfAlvhjh.js";
3
+ import { a as r, i } from "./prism-CQBZiF5P.js";
4
+ import { t as a } from "./host-storage-CtscVB4w.js";
5
+ import { t as o } from "./resolve-icon-component-BrIOFsnC.js";
6
+ import { t as s } from "./edit-mode-data-table-lvGsQ1Da.js";
7
+ import { y as c } from "./param-editor-field-Bt7NP9OH.js";
8
8
  import { Box as l, Button as u, Code as d, Dialog as f, Field as p, Flex as m, Icon as h, IconButton as g, Image as _, Input as v, Link as y, Stack as b, Text as x, chakra as S } from "@chakra-ui/react";
9
9
  import { c as C } from "react/compiler-runtime";
10
10
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
@@ -47,7 +47,7 @@ import { TreeView as Ht } from "@lexical/react/LexicalTreeView";
47
47
  import { $createHorizontalRuleNode as Ut } from "@lexical/react/LexicalHorizontalRuleNode";
48
48
  import { LexicalTypeaheadMenuPlugin as Wt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
49
49
  import { HistoryPlugin as Gt } from "@lexical/react/LexicalHistoryPlugin";
50
- //#region src/components/rich-text/shared/components/content-editable.tsx
50
+ // src/components/rich-text/shared/components/content-editable.tsx
51
51
  var Kt = S(ge);
52
52
  function qt(e) {
53
53
  let t = C(12), { onRef: r, fullWidth: i, padding: a, layerStyle: o, isRichMessage: s, scrollable: c } = e, u = i !== void 0 && i, d = s !== void 0 && s, f = c === void 0 || c, p = u ? "100%" : "45rem", m = u ? "0" : "auto", h;
@@ -90,8 +90,7 @@ function qt(e) {
90
90
  children: _
91
91
  }), t[9] = _, t[10] = v, t[11] = b) : b = t[11], b;
92
92
  }
93
- //#endregion
94
- //#region src/components/chat-ui/links/chat-link.ts
93
+ // src/components/chat-ui/links/chat-link.ts
95
94
  var Jt = (e) => e.origin === "text" || e.origin === "inline-code", Yt = (e, t) => {
96
95
  if (!e?.resolveIcon || e.resolveHref(t)) return !1;
97
96
  let n = en(t, typeof window > "u" ? void 0 : window.location.origin);
@@ -555,8 +554,7 @@ function Cn(e, t) {
555
554
  function wn(e) {
556
555
  return e instanceof Sn;
557
556
  }
558
- //#endregion
559
- //#region src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts
557
+ // src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts
560
558
  var Tn = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, En = {
561
559
  dependencies: [Sn],
562
560
  export: (e) => {
@@ -596,15 +594,7 @@ var Tn = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, En = {
596
594
  continue;
597
595
  }
598
596
  let i = e.slice(r, r + 2);
599
- if (t === null && (i === "\\(" || i === "\\)")) {
600
- n += "$", r += 2;
601
- continue;
602
- }
603
- if (t === null && (i === "\\[" || i === "\\]")) {
604
- n += "$$", r += 2;
605
- continue;
606
- }
607
- n += e[r], r += 1;
597
+ t === null && (i === "\\(" || i === "\\)") ? (n += "$", r += 2) : t === null && (i === "\\[" || i === "\\]") ? (n += "$$", r += 2) : (n += e[r], r += 1);
608
598
  }
609
599
  return n;
610
600
  }, jn = (e) => {
@@ -628,17 +618,7 @@ var Tn = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, En = {
628
618
  if (i) {
629
619
  let e = i[1] ?? "";
630
620
  n.push(`${e}$$`, i[2] ?? "", `${e}$$`);
631
- continue;
632
- }
633
- if (/^ {0,3}\\\[[ \t]*$/.test(r)) {
634
- n.push(r.replace("\\[", () => "$$"));
635
- continue;
636
- }
637
- if (/^ {0,3}\\\][ \t]*$/.test(r)) {
638
- n.push(r.replace("\\]", () => "$$"));
639
- continue;
640
- }
641
- n.push(An(r));
621
+ } else /^ {0,3}\\\[[ \t]*$/.test(r) ? n.push(r.replace("\\[", () => "$$")) : /^ {0,3}\\\][ \t]*$/.test(r) ? n.push(r.replace("\\]", () => "$$")) : n.push(An(r));
642
622
  }
643
623
  return n.join("\n");
644
624
  }, Mn = (e) => wt(jn(e), Dn), Nn = (e) => wt(e, Dn), Pn = (e) => kt(e, On).trimEnd(), Fn = (e) => Pn({
@@ -802,8 +782,7 @@ var Tn = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, En = {
802
782
  function tr() {
803
783
  return null;
804
784
  }
805
- //#endregion
806
- //#region src/components/rich-text/shared/nodes/RawHtmlNode.tsx
785
+ // src/components/rich-text/shared/nodes/RawHtmlNode.tsx
807
786
  var nr = (e) => /^<!--[\s\S]*-->$/.test(e.trim()), rr = (e, t) => {
808
787
  if (typeof document > "u") return null;
809
788
  let n = Mt.sanitize(e, { FORBID_TAGS: [
@@ -963,8 +942,7 @@ var nr = (e) => /^<!--[\s\S]*-->$/.test(e.trim()), rr = (e, t) => {
963
942
  function dr(e) {
964
943
  return e.type !== "image";
965
944
  }
966
- //#endregion
967
- //#region src/components/rich-text/shared/markdown-table-settings-context.ts
945
+ // src/components/rich-text/shared/markdown-table-settings-context.ts
968
946
  var fr = A(void 0), pr = (e) => e.rows.map((e) => ({
969
947
  id: e.id,
970
948
  ...e.cells
@@ -1022,11 +1000,7 @@ var fr = A(void 0), pr = (e) => e.rows.map((e) => ({
1022
1000
  let O = D, k;
1023
1001
  t[13] !== S || t[14] !== n || t[15] !== u ? (k = (e) => {
1024
1002
  let t = e.target, r = t.matches("input, textarea") || t.isContentEditable;
1025
- if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "z" && !r) {
1026
- e.preventDefault(), e.stopPropagation(), n.dispatchCommand(e.shiftKey ? ft : gt, void 0);
1027
- return;
1028
- }
1029
- r || u && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), e.stopPropagation(), S());
1003
+ (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "z" && !r ? (e.preventDefault(), e.stopPropagation(), n.dispatchCommand(e.shiftKey ? ft : gt, void 0)) : r || u && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), e.stopPropagation(), S());
1030
1004
  }, t[13] = S, t[14] = n, t[15] = u, t[16] = k) : k = t[16];
1031
1005
  let A = k, j = String(u), N = u ? "2px solid" : "none", P;
1032
1006
  t[17] === Symbol.for("react.memo_cache_sentinel") ? (P = () => d(!0), t[17] = P) : P = t[17];
@@ -1158,8 +1132,7 @@ function wr(e) {
1158
1132
  function Tr(e) {
1159
1133
  return String(e.id);
1160
1134
  }
1161
- //#endregion
1162
- //#region src/components/rich-text/shared/nodes/MarkdownLinkNode.ts
1135
+ // src/components/rich-text/shared/nodes/MarkdownLinkNode.ts
1163
1136
  var Er = (e, t) => vn(e, "link", t) ?? "about:blank", Dr = class e extends be {
1164
1137
  __source;
1165
1138
  static getType() {
@@ -1228,7 +1201,7 @@ var Er = (e, t) => vn(e, "link", t) ?? "about:blank", Dr = class e extends be {
1228
1201
  type: "streaming-text"
1229
1202
  };
1230
1203
  }
1231
- }, jr = (e) => Ve(new Ar(e)), Mr = D.lazy(() => import("./EquationComponent-DDd5UoIP.js"));
1204
+ }, jr = (e) => Ve(new Ar(e)), Mr = D.lazy(() => import("./EquationComponent-BtOgXA3g.js"));
1232
1205
  function Nr(e) {
1233
1206
  let t = e.getAttribute("data-lexical-equation"), n = e.getAttribute("data-lexical-inline") === "true";
1234
1207
  return t = atob(t || ""), t ? { node: Fr(t, n) } : null;
@@ -1316,8 +1289,7 @@ function Fr(e = "", t = !1) {
1316
1289
  function Ir(e) {
1317
1290
  return e instanceof Pr;
1318
1291
  }
1319
- //#endregion
1320
- //#region src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx
1292
+ // src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx
1321
1293
  var Lr = {
1322
1294
  dependencies: [Pr],
1323
1295
  export: (e) => Ir(e) && e.isInline() ? `\\( ${e.getEquation().trim()} \\)` : null,
@@ -1339,8 +1311,7 @@ var Lr = {
1339
1311
  function zr() {
1340
1312
  return null;
1341
1313
  }
1342
- //#endregion
1343
- //#region src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts
1314
+ // src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts
1344
1315
  var Br = class e extends ot {
1345
1316
  static getType() {
1346
1317
  return "hr";
@@ -1371,9 +1342,8 @@ function Vr() {
1371
1342
  function Hr(e) {
1372
1343
  return e instanceof Br;
1373
1344
  }
1374
- //#endregion
1375
- //#region src/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.tsx
1376
- var Ur = j(() => import("./MermaidComponent-CTWuGAqI.js")), Wr = class e extends at {
1345
+ // src/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.tsx
1346
+ var Ur = j(() => import("./MermaidComponent--W7gDFCk.js")), Wr = class e extends at {
1377
1347
  __code;
1378
1348
  static getType() {
1379
1349
  return "mermaid";
@@ -1426,8 +1396,7 @@ function Gr(e) {
1426
1396
  function Kr(e) {
1427
1397
  return Ve(new Wr(e));
1428
1398
  }
1429
- //#endregion
1430
- //#region src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts
1399
+ // src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts
1431
1400
  var qr = {
1432
1401
  dependencies: [Br],
1433
1402
  export: (e) => Hr(e) ? "***" : null,
@@ -1538,8 +1507,7 @@ var qr = {
1538
1507
  Rr,
1539
1508
  En
1540
1509
  ], ii = cn;
1541
- //#endregion
1542
- //#region src/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.tsx
1510
+ // src/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.tsx
1543
1511
  function ai(e) {
1544
1512
  let t = Y();
1545
1513
  if (!X(t)) return null;
@@ -1589,11 +1557,7 @@ function ci(e) {
1589
1557
  });
1590
1558
  }), i.registerCommand(pt, () => (i.getEditorState().read(() => {
1591
1559
  let e = ai(i);
1592
- if (!e) {
1593
- o(li);
1594
- return;
1595
- }
1596
- o(e);
1560
+ o(e || li);
1597
1561
  }), !1), nt)), h = [i], n[5] = i, n[6] = m, n[7] = h), N(m, h), !r || !a) return null;
1598
1562
  let _;
1599
1563
  n[8] !== a || n[9] !== r ? (_ = si(r, a), n[8] = a, n[9] = r, n[10] = _) : _ = n[10];
@@ -1641,8 +1605,7 @@ function ci(e) {
1641
1605
  function li(e) {
1642
1606
  return e?.matches(":hover") ? e : null;
1643
1607
  }
1644
- //#endregion
1645
- //#region src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx
1608
+ // src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx
1646
1609
  function ui(e) {
1647
1610
  return e.trim().toLowerCase() === "mermaid";
1648
1611
  }
@@ -1659,23 +1622,19 @@ function pi() {
1659
1622
  let e = $e(St);
1660
1623
  for (let t of e) di(t);
1661
1624
  }
1662
- //#endregion
1663
- //#region src/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.tsx
1625
+ // src/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.tsx
1664
1626
  function mi() {
1665
1627
  let e = C(3), [t] = Z(), n, r;
1666
1628
  return e[0] === t ? (n = e[1], r = e[2]) : (n = () => Ct(t), r = [t], e[0] = t, e[1] = n, e[2] = r), N(n, r), null;
1667
1629
  }
1668
- //#endregion
1669
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/commands.ts
1630
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/commands.ts
1670
1631
  var hi = _t("TOGGLE_LINK_EDIT_MODE_COMMAND");
1671
- //#endregion
1672
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts
1632
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts
1673
1633
  function gi(e) {
1674
1634
  let t = e.anchor, n = e.focus, r = e.anchor.getNode(), i = e.focus.getNode();
1675
1635
  return r === i ? r : e.isBackward() ? Ft(n) ? r : i : Ft(t) ? r : i;
1676
1636
  }
1677
- //#endregion
1678
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts
1637
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts
1679
1638
  var _i = 10, vi = 5;
1680
1639
  function yi(e, t, n, r = _i, i = vi, a = "legacy", o = "anchor") {
1681
1640
  let s = n.parentElement;
@@ -1686,8 +1645,7 @@ function yi(e, t, n, r = _i, i = vi, a = "legacy", o = "anchor") {
1686
1645
  let c = t.getBoundingClientRect(), l = n.getBoundingClientRect(), u = o === "viewport" ? new DOMRect(0, 0, document.documentElement.clientWidth, document.documentElement.clientHeight) : s.getBoundingClientRect(), d = a === "above" ? e.top - c.height - r : e.top - r, f = e.left - i;
1687
1646
  d < u.top && (d = a === "above" ? e.bottom + r : d + c.height + e.height + r * 2), f + c.width > u.right && (f = u.right - c.width - i), d + c.height > u.bottom && (d = e.top - c.height - Math.abs(r)), o === "anchor" && (d -= l.top, f -= l.left), t.style.opacity = "1", t.style.transform = `translate(${f}px, ${d}px)`;
1688
1647
  }
1689
- //#endregion
1690
- //#region src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.tsx
1648
+ // src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.tsx
1691
1649
  function bi() {
1692
1650
  let e = C(1), t;
1693
1651
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ T("span", { style: {
@@ -1942,8 +1900,7 @@ function xi(e) {
1942
1900
  ]
1943
1901
  }), n[75] = j, n[76] = I, n[77] = V, n[78] = re, n[79] = le, n[80] = v, n[81] = he, n[82] = ve, n[83] = xe, n[84] = J, n[85] = Oe, n[86] = D, n[87] = ke) : ke = n[87], ke;
1944
1902
  }
1945
- //#endregion
1946
- //#region src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.ts
1903
+ // src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.ts
1947
1904
  var Si = {
1948
1905
  bullet: "Bulleted List",
1949
1906
  check: "Check List",
@@ -1966,26 +1923,18 @@ var Si = {
1966
1923
  let n = Q(e, (e) => J(e));
1967
1924
  return n !== null && J(n) ? n.getListType() : Ci(Ie(t) ? t.getTag() : t.getType());
1968
1925
  };
1969
- //#endregion
1970
- //#region src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.ts
1926
+ // src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.ts
1971
1927
  function Ei(e) {
1972
1928
  let { hasSelection: t, isRangeSelection: n, isCollapsed: r, hasNativeSelection: i, hasNativeRange: a, isAnchorInsideEditor: o, isEditorEditable: s, isPointerSelecting: c } = e;
1973
1929
  return t && n && !r && i && a && o && s && !c;
1974
1930
  }
1975
- //#endregion
1976
- //#region src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx
1931
+ // src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx
1977
1932
  var Di = -4;
1978
1933
  function Oi({ editor: e, anchorElem: t, isToolbarActive: n, setIsToolbarActive: r }) {
1979
1934
  let i = F(null), [a, o] = I("paragraph"), [s, c] = I(!1), [u, d] = I(!1), [f, p] = I(!1), [m, h] = I(!1), [g, _] = I(!1), v = F(!1), y = F(() => void 0), b = (t) => {
1980
1935
  e.update(() => {
1981
1936
  let e = Y();
1982
- if (X(e)) {
1983
- if (a === t) {
1984
- It(e, Ue);
1985
- return;
1986
- }
1987
- It(e, () => Pe(t));
1988
- }
1937
+ X(e) && (a === t ? It(e, Ue) : It(e, () => Pe(t)));
1989
1938
  });
1990
1939
  }, x = (t) => {
1991
1940
  if (a === t) {
@@ -2001,20 +1950,10 @@ function Oi({ editor: e, anchorElem: t, isToolbarActive: n, setIsToolbarActive:
2001
1950
  }, S = () => {
2002
1951
  e.update(() => {
2003
1952
  let e = Y();
2004
- if (X(e)) {
2005
- if (a === "quote") {
2006
- It(e, Ue);
2007
- return;
2008
- }
2009
- It(e, Fe);
2010
- }
1953
+ X(e) && (a === "quote" ? It(e, Ue) : It(e, Fe));
2011
1954
  });
2012
1955
  }, C = () => {
2013
- if (g) {
2014
- e.dispatchCommand(xe, null);
2015
- return;
2016
- }
2017
- e.dispatchCommand(hi, !0);
1956
+ g ? e.dispatchCommand(xe, null) : e.dispatchCommand(hi, !0);
2018
1957
  }, w = () => {
2019
1958
  let e = Y();
2020
1959
  if (!X(e)) return;
@@ -2099,8 +2038,7 @@ function ki(e) {
2099
2038
  setIsToolbarActive: o
2100
2039
  }), document.body), t[0] = r, t[1] = i, t[2] = a, t[3] = s) : s = t[3], s;
2101
2040
  }
2102
- //#endregion
2103
- //#region src/components/rich-text/shared/plugins/list-marker-width-plugin.tsx
2041
+ // src/components/rich-text/shared/plugins/list-marker-width-plugin.tsx
2104
2042
  function Ai() {
2105
2043
  let e = C(3), [t] = Z(), n, r;
2106
2044
  return e[0] === t ? (n = e[1], r = e[2]) : (n = () => t.registerMutationListener(ke, (e) => {
@@ -2116,8 +2054,7 @@ function Ai() {
2116
2054
  function ji(e) {
2117
2055
  return e instanceof HTMLLIElement ? [e.value] : [];
2118
2056
  }
2119
- //#endregion
2120
- //#region src/components/rich-text/shared/markdown-export.ts
2057
+ // src/components/rich-text/shared/markdown-export.ts
2121
2058
  var Mi = (e) => {
2122
2059
  let t = e.hasFormat("code") ? {
2123
2060
  type: "inlineCode",
@@ -2358,11 +2295,7 @@ function Qi(e, t, n = /* @__PURE__ */ new Set()) {
2358
2295
  let s = new Set(n);
2359
2296
  i > 0 && s.add("underline");
2360
2297
  let c = qi(e, a);
2361
- if (c) {
2362
- r.push(...Yi(c.value, s)), a = c.end;
2363
- continue;
2364
- }
2365
- r.push(...Zi(o, t, s));
2298
+ c ? (r.push(...Yi(c.value, s)), a = c.end) : r.push(...Zi(o, t, s));
2366
2299
  }
2367
2300
  return r;
2368
2301
  }
@@ -2557,20 +2490,17 @@ var ma = (e, t) => {
2557
2490
  n[0] = 0, r[0] = 0;
2558
2491
  for (let c of pa(e, t, s)) {
2559
2492
  let e = c.value.length;
2560
- if (c.added) {
2561
- r[i] = a, a += e, n[i] = a, o && (r[i] = a), o = !1;
2562
- continue;
2563
- }
2564
- if (c.removed) {
2493
+ if (c.added) r[i] = a, a += e, n[i] = a, o && (r[i] = a), o = !1;
2494
+ else if (c.removed) {
2565
2495
  for (let t = 0; t <= e; t += 1) n[i + t] = a, r[i + t] = a;
2566
2496
  i += e, o = !0;
2567
- continue;
2568
- }
2569
- for (let t = 0; t <= e; t += 1) {
2570
- let e = i + t;
2571
- n[e] = a + t, (r[e] === void 0 || r[e] < 0) && (r[e] = a + t);
2497
+ } else {
2498
+ for (let t = 0; t <= e; t += 1) {
2499
+ let e = i + t;
2500
+ n[e] = a + t, (r[e] === void 0 || r[e] < 0) && (r[e] = a + t);
2501
+ }
2502
+ i += e, a += e, o = !1;
2572
2503
  }
2573
- i += e, a += e, o = !1;
2574
2504
  }
2575
2505
  let c = /* @__PURE__ */ new Map();
2576
2506
  for (let e of s) {
@@ -2598,21 +2528,11 @@ var ma = (e, t) => {
2598
2528
  let n = [], r = 0, i = null, a = () => {
2599
2529
  i &&= (n.push(i), null);
2600
2530
  };
2601
- for (let n of Vt(e, t)) {
2602
- if (!n.added && !n.removed) {
2603
- a(), r += n.value.length;
2604
- continue;
2605
- }
2606
- if (i ??= {
2607
- start: r,
2608
- end: r,
2609
- replacement: ""
2610
- }, n.added) {
2611
- i.replacement += n.value;
2612
- continue;
2613
- }
2614
- r += n.value.length, i.end = r;
2615
- }
2531
+ for (let n of Vt(e, t)) !n.added && !n.removed ? (a(), r += n.value.length) : (i ??= {
2532
+ start: r,
2533
+ end: r,
2534
+ replacement: ""
2535
+ }, n.added ? i.replacement += n.value : (r += n.value.length, i.end = r));
2616
2536
  return a(), n;
2617
2537
  }, ba = (e) => e.includes("\r\n") ? "\r\n" : "\n", xa = (e, t) => {
2618
2538
  let n = ba(t);
@@ -2706,8 +2626,7 @@ var ma = (e, t) => {
2706
2626
  }
2707
2627
  };
2708
2628
  };
2709
- //#endregion
2710
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.tsx
2629
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.tsx
2711
2630
  function Fa(e) {
2712
2631
  let n = C(32), { isActive: r, isLinkEditMode: i, editedLinkUrl: a, editedLinkUrlIsValid: o, linkUrl: s, href: c, inputRef: l, onEditedLinkUrlChange: u, onInputKeyDown: d, onClose: f, onSubmit: p, onEdit: m, onRemove: h } = e;
2713
2632
  if (!r) return null;
@@ -2829,19 +2748,16 @@ function Fa(e) {
2829
2748
  function Ia(e) {
2830
2749
  e.preventDefault();
2831
2750
  }
2832
- //#endregion
2833
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.ts
2751
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.ts
2834
2752
  function La(e, t, n) {
2835
2753
  return e && t && n === "";
2836
2754
  }
2837
- //#endregion
2838
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.ts
2755
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.ts
2839
2756
  function Ra(e) {
2840
2757
  let t = gi(e), n = Q(t, q);
2841
2758
  return n ? n.getURL() : q(t) ? t.getURL() : "";
2842
2759
  }
2843
- //#endregion
2844
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts
2760
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts
2845
2761
  var za = /* @__PURE__ */ new Set([
2846
2762
  "http:",
2847
2763
  "https:",
@@ -2866,8 +2782,7 @@ function Va(e) {
2866
2782
  return !1;
2867
2783
  }
2868
2784
  }
2869
- //#endregion
2870
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx
2785
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx
2871
2786
  var Ha = 8;
2872
2787
  function Ua({ editor: e, isLink: t, setIsLink: n, anchorElem: r, isLinkEditMode: i, setIsLinkEditMode: a }) {
2873
2788
  let o = F(null), s = F(null), c = F(() => void 0), [u, d] = I(""), [f, p] = I("https://"), [m, h] = I(null), g = t || i, _ = Va(f);
@@ -3008,22 +2923,19 @@ function qa(e) {
3008
2923
  let { anchorElem: t } = e, n = t === void 0 ? document.body : t, [r, i] = I(!1), [a] = Z();
3009
2924
  return Wa(a, n, r, i);
3010
2925
  }
3011
- //#endregion
3012
- //#region src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx
2926
+ // src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx
3013
2927
  function Ja() {
3014
2928
  let e = C(1), t;
3015
2929
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ T(fe, { validateUrl: Va }), e[0] = t) : t = e[0], t;
3016
2930
  }
3017
- //#endregion
3018
- //#region src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx
2931
+ // src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx
3019
2932
  function Ya(e) {
3020
2933
  let t = C(4), { isEditable: n } = e, [r] = Z(), i, a;
3021
2934
  return t[0] !== r || t[1] !== n ? (i = () => {
3022
2935
  r.setEditable(n);
3023
2936
  }, a = [n, r], t[0] = r, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), P(i, a), null;
3024
2937
  }
3025
- //#endregion
3026
- //#region src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx
2938
+ // src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx
3027
2939
  function Xa() {
3028
2940
  let e = C(2), [t] = Z(), n;
3029
2941
  return e[0] === t ? n = e[1] : (n = /* @__PURE__ */ T(l, {
@@ -3041,8 +2953,7 @@ function Xa() {
3041
2953
  })
3042
2954
  }), e[0] = t, e[1] = n), n;
3043
2955
  }
3044
- //#endregion
3045
- //#region src/components/rich-text/utils/markdown.ts
2956
+ // src/components/rich-text/utils/markdown.ts
3046
2957
  var Za = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
3047
2958
  function Qa(e) {
3048
2959
  let t = e.match(Za);
@@ -3054,8 +2965,7 @@ function Qa(e) {
3054
2965
  body: e
3055
2966
  };
3056
2967
  }
3057
- //#endregion
3058
- //#region src/components/rich-text/markdown-editor/plugins/markdown-section-navigation.ts
2968
+ // src/components/rich-text/markdown-editor/plugins/markdown-section-navigation.ts
3059
2969
  var $a = (e) => e.trim().replace(/\s+/g, " "), eo = (e, t) => {
3060
2970
  let n = e.map($a), r = /* @__PURE__ */ new Map(), i = [];
3061
2971
  for (let e of t) {
@@ -3280,9 +3190,7 @@ var $a = (e) => e.trim().replace(/\s+/g, " "), eo = (e, t) => {
3280
3190
  let e = t?.getParent(), r = Y();
3281
3191
  if (!Xe(e) || !X(r)) return;
3282
3192
  Be(ct), r.anchor.set(e.getKey(), 0, "element"), r.removeText(), s(""), l("Image"), a(e.getKey()), n();
3283
- return;
3284
- }
3285
- Be(ct), e.id === "table" && co(t, _r(io(so()))), e.id === "code" && co(t, vt()), e.id === "divider" && co(t, Ut()), n();
3193
+ } else Be(ct), e.id === "table" && co(t, _r(io(so()))), e.id === "code" && co(t, vt()), e.id === "divider" && co(t, Ut()), n();
3286
3194
  }, e[10] = x) : x = e[10];
3287
3195
  let S;
3288
3196
  e[11] === h ? S = e[12] : (S = /* @__PURE__ */ T(Wt, {
@@ -3391,8 +3299,7 @@ function ho(e, t) {
3391
3299
  }
3392
3300
  }), e.current) : null;
3393
3301
  }
3394
- //#endregion
3395
- //#region src/components/rich-text/markdown-editor/plugins/markdown-history-plugin.tsx
3302
+ // src/components/rich-text/markdown-editor/plugins/markdown-history-plugin.tsx
3396
3303
  var go = () => {
3397
3304
  let [e] = Z(), [t] = I(() => ({
3398
3305
  current: {
@@ -3506,7 +3413,6 @@ function yo(e) {
3506
3413
  })
3507
3414
  });
3508
3415
  }
3509
- //#endregion
3510
3416
  export { fn as A, en as B, Yn as C, zn as D, Jn as E, nn as F, an as I, rn as L, un as M, cn as N, bn as O, sn as P, Yt as R, qn as S, Gn as T, qt as V, zr as _, Ya as a, Dr as b, ra as c, mi as d, fi as f, Gr as g, ii as h, Xa as i, ln as j, vn as k, Ai as l, ni as m, _o as n, Pa as o, ci as p, Qa as r, na as s, yo as t, ki as u, jr as v, Vn as w, fr as x, Ar as y, Jt as z };
3511
3417
 
3512
- //# sourceMappingURL=markdown-editor-BPGIS9ku.js.map
3418
+ //# sourceMappingURL=markdown-editor-D419iTD2.js.map