@pstdio/ui 0.0.4 → 0.1.1

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 (54) hide show
  1. package/dist/chat-ui.js +1162 -193
  2. package/dist/chat-ui.js.map +1 -1
  3. package/dist/components/chat-ui/index.d.ts +8 -5
  4. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
  5. package/dist/components/checkbox.d.ts +8 -0
  6. package/dist/components/checkbox.stories.d.ts +15 -0
  7. package/dist/components/documentation/docs-changelog.d.ts +20 -0
  8. package/dist/components/documentation/docs-changelog.stories.d.ts +15 -0
  9. package/dist/components/documentation/docs-outline.d.ts +13 -0
  10. package/dist/components/documentation/docs-outline.stories.d.ts +16 -0
  11. package/dist/components/documentation/docs-pagination.d.ts +10 -0
  12. package/dist/components/documentation/docs-pagination.stories.d.ts +14 -0
  13. package/dist/components/documentation/docs-sidebar.d.ts +14 -0
  14. package/dist/components/documentation/docs-sidebar.stories.d.ts +7 -0
  15. package/dist/components/folder-picker-dialog.d.ts +25 -0
  16. package/dist/components/folder-picker-dialog.stories.d.ts +11 -0
  17. package/dist/components/item-section.d.ts +1 -1
  18. package/dist/components/panel-menu.d.ts +2 -0
  19. package/dist/components/panel-menu.stories.d.ts +1 -0
  20. package/dist/components/properties.d.ts +4 -4
  21. package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
  22. package/dist/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +1 -0
  23. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  24. package/dist/components/scroll-area.d.ts +16 -0
  25. package/dist/components/scroll-area.stories.d.ts +7 -0
  26. package/dist/components/session-indicator.d.ts +1 -1
  27. package/dist/components/switch.d.ts +15 -0
  28. package/dist/components/switch.stories.d.ts +16 -0
  29. package/dist/components/{ticket-card.d.ts → tickets/ticket-card.d.ts} +2 -1
  30. package/dist/components/tickets/ticket-list.d.ts +23 -0
  31. package/dist/components/tickets/ticket-list.stories.d.ts +10 -0
  32. package/dist/empty-state-B8mbv7ZH.js +128 -0
  33. package/dist/empty-state-B8mbv7ZH.js.map +1 -0
  34. package/dist/index.d.ts +33 -0
  35. package/dist/index.js +1330 -321
  36. package/dist/index.js.map +1 -1
  37. package/dist/{rich-message-CiA3ripk.js → rich-message-CNDoACE7.js} +8 -7
  38. package/dist/{rich-message-CiA3ripk.js.map → rich-message-CNDoACE7.js.map} +1 -1
  39. package/dist/rich-text.js +267 -262
  40. package/dist/rich-text.js.map +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/theme/primitives/colors.d.ts +12 -28
  43. package/dist/theme/recipes/menu.d.ts +1 -1
  44. package/dist/theme/recipes/progress-circle.d.ts +3 -3
  45. package/dist/theme/tokens/borders.d.ts +6 -6
  46. package/dist/theme/tokens/colors.d.ts +180 -0
  47. package/dist/{theme-9E0MRtZk.js → theme-C7CIuIPZ.js} +197 -115
  48. package/dist/theme-C7CIuIPZ.js.map +1 -0
  49. package/dist/theme.js +1 -1
  50. package/package.json +10 -8
  51. package/dist/theme-9E0MRtZk.js.map +0 -1
  52. /package/dist/components/{ticket-board.d.ts → tickets/ticket-board.d.ts} +0 -0
  53. /package/dist/components/{ticket-board.stories.d.ts → tickets/ticket-board.stories.d.ts} +0 -0
  54. /package/dist/components/{ticket-card.stories.d.ts → tickets/ticket-card.stories.d.ts} +0 -0
package/dist/rich-text.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { jsx as o, jsxs as ge } from "react/jsx-runtime";
2
2
  import { c as re } from "react/compiler-runtime";
3
- import { e as Ae, b as Be, I as Ne, E as Pe, C as Oe, s as Ye, c as Le, T as Xe, d as Qe } from "./rich-message-CiA3ripk.js";
4
- import { D as po, f as uo, R as ho, P as go, R as bo, a as vo, g as xo } from "./rich-message-CiA3ripk.js";
5
- import { Text as U, IconButton as q, Stack as Se, Box as He, Flex as $e } from "@chakra-ui/react";
3
+ import { e as Be, a as Ne, I as Pe, E as Oe, C as Fe, s as Ye, b as Ie, T as Xe, c as Qe } from "./rich-message-CNDoACE7.js";
4
+ import { D as ho, d as go, R as bo, P as vo, R as xo, g as _o, f as yo } from "./rich-message-CNDoACE7.js";
5
+ import { Text as U, IconButton as q, Stack as Se, Box as He, Flex as ke } from "@chakra-ui/react";
6
6
  import { LexicalCollaboration as Ze } from "@lexical/react/LexicalCollaborationContext";
7
7
  import { CollaborationPluginV2__EXPERIMENTAL as Je } from "@lexical/react/LexicalCollaborationPlugin";
8
- import { LexicalComposer as De } from "@lexical/react/LexicalComposer";
9
- import { LexicalErrorBoundary as Fe } from "@lexical/react/LexicalErrorBoundary";
8
+ import { LexicalComposer as $e } from "@lexical/react/LexicalComposer";
9
+ import { LexicalErrorBoundary as De } from "@lexical/react/LexicalErrorBoundary";
10
10
  import { HorizontalRulePlugin as ze } from "@lexical/react/LexicalHorizontalRulePlugin";
11
11
  import { LinkPlugin as je } from "@lexical/react/LexicalLinkPlugin";
12
12
  import { ListPlugin as We } from "@lexical/react/LexicalListPlugin";
13
13
  import { RichTextPlugin as Ue } from "@lexical/react/LexicalRichTextPlugin";
14
- import { useState as K, useRef as ke, useEffect as le } from "react";
14
+ import { useState as K, useRef as Le, useEffect as le } from "react";
15
15
  import { WebsocketProvider as et } from "y-websocket";
16
16
  import * as tt from "yjs";
17
- import { INSERT_UNORDERED_LIST_COMMAND as ot, REMOVE_LIST_COMMAND as Ie, INSERT_ORDERED_LIST_COMMAND as nt, $isListNode as Ee } from "@lexical/list";
17
+ import { INSERT_UNORDERED_LIST_COMMAND as ot, REMOVE_LIST_COMMAND as Me, INSERT_ORDERED_LIST_COMMAND as nt, $isListNode as Ee } from "@lexical/list";
18
18
  import { useLexicalComposerContext as it } from "@lexical/react/LexicalComposerContext";
19
19
  import { $createHeadingNode as lt, $isHeadingNode as rt } from "@lexical/rich-text";
20
20
  import { $setBlocksType as qe } from "@lexical/selection";
@@ -23,20 +23,21 @@ import { $getSelection as ie, $isRangeSelection as we, SELECTION_CHANGE_COMMAND
23
23
  import { createPortal as ht } from "react-dom";
24
24
  import { T as V } from "./tooltip-Gm7PLwZG.js";
25
25
  import { $convertFromMarkdownString as gt, $convertToMarkdownString as bt } from "@lexical/markdown";
26
- import { HistoryPlugin as vt } from "@lexical/react/LexicalHistoryPlugin";
27
- import { OnChangePlugin as xt } from "@lexical/react/LexicalOnChangePlugin";
28
- const _t = 10, yt = 5;
29
- function Me(n, e, t, i = _t, g = yt) {
30
- const r = t.parentElement;
31
- if (n === null || !r) {
26
+ import { AutoFocusPlugin as vt } from "@lexical/react/LexicalAutoFocusPlugin";
27
+ import { HistoryPlugin as xt } from "@lexical/react/LexicalHistoryPlugin";
28
+ import { OnChangePlugin as _t } from "@lexical/react/LexicalOnChangePlugin";
29
+ const yt = 10, Ct = 5;
30
+ function Ae(n, e, t, i = yt, h = Ct) {
31
+ const a = t.parentElement;
32
+ if (n === null || !a) {
32
33
  e.style.opacity = "0", e.style.transform = "translate(-10000px, -10000px)";
33
34
  return;
34
35
  }
35
- const d = e.getBoundingClientRect(), l = t.getBoundingClientRect(), S = r.getBoundingClientRect();
36
- let s = n.top - i, x = n.left - g;
37
- s < S.top && (s += d.height + n.height + i * 2), x + d.width > S.right && (x = S.right - d.width - g), s -= l.top, x -= l.left, e.style.opacity = "1", e.style.transform = `translate(${x}px, ${s}px)`;
36
+ const d = e.getBoundingClientRect(), l = t.getBoundingClientRect(), E = a.getBoundingClientRect();
37
+ let w = n.top - i, R = n.left - h;
38
+ w < E.top && (w += d.height + n.height + i * 2), R + d.width > E.right && (R = E.right - d.width - h), w -= l.top, R -= l.left, e.style.opacity = "1", e.style.transform = `translate(${R}px, ${w}px)`;
38
39
  }
39
- const Ct = -4, Tt = {
40
+ const Tt = -4, St = {
40
41
  bullet: "Bulleted List",
41
42
  check: "Check List",
42
43
  code: "Code Block",
@@ -49,122 +50,122 @@ const Ct = -4, Tt = {
49
50
  number: "Numbered List",
50
51
  paragraph: "Normal",
51
52
  quote: "Quote"
52
- }, St = (n) => n in Tt ? n : null, Et = (n) => (n.getKey() === "root" ? n : Ve(n, (t) => {
53
+ }, Et = (n) => n in St ? n : null, wt = (n) => (n.getKey() === "root" ? n : Ve(n, (t) => {
53
54
  const i = t.getParent();
54
55
  return i !== null && pt(i);
55
- })) ?? n.getTopLevelElementOrThrow(), wt = (n) => {
56
- const e = Et(n);
56
+ })) ?? n.getTopLevelElementOrThrow(), Rt = (n) => {
57
+ const e = wt(n);
57
58
  if (Ee(e))
58
59
  return e.getListType();
59
- const t = Ve(n, (g) => Ee(g));
60
+ const t = Ve(n, (h) => Ee(h));
60
61
  if (t !== null && Ee(t))
61
62
  return t.getListType();
62
63
  const i = rt(e) ? e.getTag() : e.getType();
63
- return St(i);
64
+ return Et(i);
64
65
  };
65
- function Rt(n) {
66
+ function kt(n) {
66
67
  const e = re(81), {
67
68
  editor: t,
68
69
  anchorElem: i,
69
- isToolbarActive: g,
70
- setIsToolbarActive: r
71
- } = n, d = ke(null), [l, S] = K("paragraph"), [s, x] = K(!1), [F, j] = K(!1), [D, G] = K(!1);
70
+ isToolbarActive: h,
71
+ setIsToolbarActive: a
72
+ } = n, d = Le(null), [l, E] = K("paragraph"), [w, R] = K(!1), [g, j] = K(!1), [D, G] = K(!1);
73
+ let O;
74
+ e[0] !== l || e[1] !== t ? (O = (s) => {
75
+ l !== s ? t.update(() => {
76
+ const u = ie();
77
+ qe(u, () => lt(s));
78
+ }) : t.update(Lt);
79
+ }, e[0] = l, e[1] = t, e[2] = O) : O = e[2];
80
+ const k = O;
72
81
  let L;
73
- e[0] !== l || e[1] !== t ? (L = (a) => {
74
- l !== a ? t.update(() => {
75
- const h = ie();
76
- qe(h, () => lt(a));
77
- }) : t.update(kt);
78
- }, e[0] = l, e[1] = t, e[2] = L) : L = e[2];
79
- const I = L;
80
- let E;
81
- e[3] !== l || e[4] !== t ? (E = () => {
82
- l !== "bullet" ? t.dispatchCommand(ot, void 0) : t.dispatchCommand(Ie, void 0);
83
- }, e[3] = l, e[4] = t, e[5] = E) : E = e[5];
84
- const P = E;
85
- let p;
86
- e[6] !== l || e[7] !== t ? (p = () => {
87
- l !== "number" ? t.dispatchCommand(nt, void 0) : t.dispatchCommand(Ie, void 0);
88
- }, e[6] = l, e[7] = t, e[8] = p) : p = e[8];
89
- const _ = p;
90
- let M;
91
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = () => {
92
- const a = ie();
93
- if (!we(a))
82
+ e[3] !== l || e[4] !== t ? (L = () => {
83
+ l !== "bullet" ? t.dispatchCommand(ot, void 0) : t.dispatchCommand(Me, void 0);
84
+ }, e[3] = l, e[4] = t, e[5] = L) : L = e[5];
85
+ const W = L;
86
+ let _;
87
+ e[6] !== l || e[7] !== t ? (_ = () => {
88
+ l !== "number" ? t.dispatchCommand(nt, void 0) : t.dispatchCommand(Me, void 0);
89
+ }, e[6] = l, e[7] = t, e[8] = _) : _ = e[8];
90
+ const y = _;
91
+ let b;
92
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = () => {
93
+ const s = ie();
94
+ if (!we(s))
94
95
  return;
95
- x(a.hasFormat("bold")), j(a.hasFormat("italic")), G(a.hasFormat("underline"));
96
- const h = wt(a.anchor.getNode());
97
- h && S(h);
98
- }, e[9] = M) : M = e[9];
99
- const O = M;
100
- let w;
101
- e[10] !== i || e[11] !== t || e[12] !== r ? (w = () => {
102
- const a = ie(), h = d.current, he = window.getSelection();
103
- if (h === null)
96
+ R(s.hasFormat("bold")), j(s.hasFormat("italic")), G(s.hasFormat("underline"));
97
+ const u = Rt(s.anchor.getNode());
98
+ u && E(u);
99
+ }, e[9] = b) : b = e[9];
100
+ const F = b;
101
+ let A;
102
+ e[10] !== i || e[11] !== t || e[12] !== a ? (A = () => {
103
+ const s = ie(), u = d.current, he = window.getSelection();
104
+ if (u === null)
104
105
  return;
105
106
  const Ce = t.getRootElement();
106
- if (a !== null && we(a) && !a.isCollapsed() && he !== null && !he.isCollapsed && Ce !== null && Ce.contains(he.anchorNode) && t.isEditable()) {
107
+ if (s !== null && we(s) && !s.isCollapsed() && he !== null && !he.isCollapsed && Ce !== null && Ce.contains(he.anchorNode) && t.isEditable()) {
107
108
  const Te = he.getRangeAt(0).getBoundingClientRect();
108
109
  if (Te) {
109
110
  const Ge = new DOMRect(Te.left, Te.bottom, 0, 0);
110
- Me(Ge, h, i, Ct);
111
+ Ae(Ge, u, i, Tt);
111
112
  }
112
- r(!0);
113
+ a(!0);
113
114
  } else
114
- Ce !== null && Me(null, h, i), r(!1);
115
- return O(), !0;
116
- }, e[10] = i, e[11] = t, e[12] = r, e[13] = w) : w = e[13];
117
- const c = w;
118
- let R, H;
119
- e[14] !== c || e[15] !== i.parentElement || e[16] !== t ? (R = () => {
120
- const a = i.parentElement, h = () => {
115
+ Ce !== null && Ae(null, u, i), a(!1);
116
+ return F(), !0;
117
+ }, e[10] = i, e[11] = t, e[12] = a, e[13] = A) : A = e[13];
118
+ const r = A;
119
+ let I, H;
120
+ e[14] !== r || e[15] !== i.parentElement || e[16] !== t ? (I = () => {
121
+ const s = i.parentElement, u = () => {
121
122
  t.getEditorState().read(() => {
122
- c();
123
+ r();
123
124
  });
124
125
  };
125
- return window.addEventListener("resize", h), a && a.addEventListener("scroll", h), () => {
126
- window.removeEventListener("resize", h), a && a.removeEventListener("scroll", h);
126
+ return window.addEventListener("resize", u), s && s.addEventListener("scroll", u), () => {
127
+ window.removeEventListener("resize", u), s && s.removeEventListener("scroll", u);
127
128
  };
128
- }, H = [i.parentElement, t, c], e[14] = c, e[15] = i.parentElement, e[16] = t, e[17] = R, e[18] = H) : (R = e[17], H = e[18]), le(R, H);
129
- let k, A;
130
- e[19] !== c || e[20] !== t ? (k = () => st(t.registerUpdateListener((a) => {
129
+ }, H = [i.parentElement, t, r], e[14] = r, e[15] = i.parentElement, e[16] = t, e[17] = I, e[18] = H) : (I = e[17], H = e[18]), le(I, H);
130
+ let M, B;
131
+ e[19] !== r || e[20] !== t ? (M = () => st(t.registerUpdateListener((s) => {
131
132
  const {
132
- editorState: h
133
- } = a;
134
- h.read(() => {
135
- c();
133
+ editorState: u
134
+ } = s;
135
+ u.read(() => {
136
+ r();
136
137
  });
137
- }), t.registerCommand(at, (a) => (c(), !1), ct), t.registerCommand(dt, (a) => {
138
- const h = ie();
139
- return we(h) && c(), !1;
140
- }, mt)), A = [t, c], e[19] = c, e[20] = t, e[21] = k, e[22] = A) : (k = e[21], A = e[22]), le(k, A);
141
- const u = `floating-text-format-toolbar ${g ? "active" : ""}`, y = s || void 0;
142
- let m;
143
- e[23] !== t ? (m = () => {
138
+ }), t.registerCommand(at, (s) => (r(), !1), ct), t.registerCommand(dt, (s) => {
139
+ const u = ie();
140
+ return we(u) && r(), !1;
141
+ }, mt)), B = [t, r], e[19] = r, e[20] = t, e[21] = M, e[22] = B) : (M = e[21], B = e[22]), le(M, B);
142
+ const C = `floating-text-format-toolbar ${h ? "active" : ""}`, N = w || void 0;
143
+ let v;
144
+ e[23] !== t ? (v = () => {
144
145
  t.dispatchCommand(Re, "bold");
145
- }, e[23] = t, e[24] = m) : m = e[24];
146
- let b;
147
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(U, { fontWeight: "bold", fontSize: ".75rem", children: "B" }), e[25] = b) : b = e[25];
146
+ }, e[23] = t, e[24] = v) : v = e[24];
147
+ let x;
148
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ o(U, { fontWeight: "bold", fontSize: ".75rem", children: "B" }), e[25] = x) : x = e[25];
149
+ let m;
150
+ e[26] !== N || e[27] !== v ? (m = /* @__PURE__ */ o(V, { content: "Bold", children: /* @__PURE__ */ o(q, { "data-active": N, onClick: v, variant: "ghost", "aria-label": "Bold", size: "xs", children: x }) }), e[26] = N, e[27] = v, e[28] = m) : m = e[28];
151
+ const T = g || void 0;
148
152
  let f;
149
- e[26] !== y || e[27] !== m ? (f = /* @__PURE__ */ o(V, { content: "Bold", children: /* @__PURE__ */ o(q, { "data-active": y, onClick: m, variant: "ghost", "aria-label": "Bold", size: "xs", children: b }) }), e[26] = y, e[27] = m, e[28] = f) : f = e[28];
150
- const C = F || void 0;
151
- let v;
152
- e[29] !== t ? (v = () => {
153
+ e[29] !== t ? (f = () => {
153
154
  t.dispatchCommand(Re, "italic");
154
- }, e[29] = t, e[30] = v) : v = e[30];
155
- let B;
156
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ o(U, { fontStyle: "italic", fontSize: ".75rem", children: "I" }), e[31] = B) : B = e[31];
157
- let T;
158
- e[32] !== C || e[33] !== v ? (T = /* @__PURE__ */ o(V, { content: "Italic", children: /* @__PURE__ */ o(q, { "data-active": C, onClick: v, variant: "ghost", "aria-label": "Italic", size: "xs", children: B }) }), e[32] = C, e[33] = v, e[34] = T) : T = e[34];
159
- const N = D || void 0;
160
- let $;
161
- e[35] !== t ? ($ = () => {
155
+ }, e[29] = t, e[30] = f) : f = e[30];
156
+ let p;
157
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ o(U, { fontStyle: "italic", fontSize: ".75rem", children: "I" }), e[31] = p) : p = e[31];
158
+ let c;
159
+ e[32] !== T || e[33] !== f ? (c = /* @__PURE__ */ o(V, { content: "Italic", children: /* @__PURE__ */ o(q, { "data-active": T, onClick: f, variant: "ghost", "aria-label": "Italic", size: "xs", children: p }) }), e[32] = T, e[33] = f, e[34] = c) : c = e[34];
160
+ const S = D || void 0;
161
+ let P;
162
+ e[35] !== t ? (P = () => {
162
163
  t.dispatchCommand(Re, "underline");
163
- }, e[35] = t, e[36] = $) : $ = e[36];
164
+ }, e[35] = t, e[36] = P) : P = e[36];
165
+ let $;
166
+ e[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ o(U, { textDecoration: "underline", fontSize: ".75rem", children: "U" }), e[37] = $) : $ = e[37];
164
167
  let z;
165
- e[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ o(U, { textDecoration: "underline", fontSize: ".75rem", children: "U" }), e[37] = z) : z = e[37];
166
- let W;
167
- e[38] !== N || e[39] !== $ ? (W = /* @__PURE__ */ o(V, { content: "Underline", children: /* @__PURE__ */ o(q, { "data-active": N, onClick: $, variant: "ghost", "aria-label": "Underline", size: "xs", children: z }) }), e[38] = N, e[39] = $, e[40] = W) : W = e[40];
168
+ e[38] !== S || e[39] !== P ? (z = /* @__PURE__ */ o(V, { content: "Underline", children: /* @__PURE__ */ o(q, { "data-active": S, onClick: P, variant: "ghost", "aria-label": "Underline", size: "xs", children: $ }) }), e[38] = S, e[39] = P, e[40] = z) : z = e[40];
168
169
  let se;
169
170
  e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ o(Se, { as: "span", height: "1rem", mx: "0.5", children: /* @__PURE__ */ o("span", { style: {
170
171
  borderLeft: "1px solid",
@@ -173,27 +174,27 @@ function Rt(n) {
173
174
  } }) }), e[41] = se) : se = e[41];
174
175
  const be = l === "h1" || void 0;
175
176
  let Y;
176
- e[42] !== I ? (Y = () => {
177
- I("h1");
178
- }, e[42] = I, e[43] = Y) : Y = e[43];
177
+ e[42] !== k ? (Y = () => {
178
+ k("h1");
179
+ }, e[42] = k, e[43] = Y) : Y = e[43];
179
180
  let ae;
180
181
  e[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ae = /* @__PURE__ */ o(U, { fontWeight: "thin", fontSize: ".8rem", children: "H1" }), e[44] = ae) : ae = e[44];
181
182
  let X;
182
183
  e[45] !== be || e[46] !== Y ? (X = /* @__PURE__ */ o(V, { content: "Heading 1", children: /* @__PURE__ */ o(q, { "data-active": be, variant: "ghost", "aria-label": "Heading 1", size: "xs", onClick: Y, children: ae }) }), e[45] = be, e[46] = Y, e[47] = X) : X = e[47];
183
184
  const ve = l === "h2" || void 0;
184
185
  let Q;
185
- e[48] !== I ? (Q = () => {
186
- I("h2");
187
- }, e[48] = I, e[49] = Q) : Q = e[49];
186
+ e[48] !== k ? (Q = () => {
187
+ k("h2");
188
+ }, e[48] = k, e[49] = Q) : Q = e[49];
188
189
  let ce;
189
190
  e[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = /* @__PURE__ */ o(U, { fontWeight: "thin", fontSize: ".8rem", children: "H2" }), e[50] = ce) : ce = e[50];
190
191
  let Z;
191
192
  e[51] !== ve || e[52] !== Q ? (Z = /* @__PURE__ */ o(V, { content: "Heading 2", children: /* @__PURE__ */ o(q, { "data-active": ve, variant: "ghost", "aria-label": "Heading 2", size: "xs", onClick: Q, children: ce }) }), e[51] = ve, e[52] = Q, e[53] = Z) : Z = e[53];
192
193
  const xe = l === "h3" || void 0;
193
194
  let J;
194
- e[54] !== I ? (J = () => {
195
- I("h3");
196
- }, e[54] = I, e[55] = J) : J = e[55];
195
+ e[54] !== k ? (J = () => {
196
+ k("h3");
197
+ }, e[54] = k, e[55] = J) : J = e[55];
197
198
  let de;
198
199
  e[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (de = /* @__PURE__ */ o(U, { fontWeight: "thin", fontSize: ".8rem", children: "H3" }), e[56] = de) : de = e[56];
199
200
  let ee;
@@ -208,17 +209,17 @@ function Rt(n) {
208
209
  let fe;
209
210
  e[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ o(U, { fontWeight: "thin", fontSize: ".8rem", children: "•" }), e[61] = fe) : fe = e[61];
210
211
  let te;
211
- e[62] !== P || e[63] !== _e ? (te = /* @__PURE__ */ o(V, { content: "Bulleted List", children: /* @__PURE__ */ o(q, { "data-active": _e, variant: "ghost", "aria-label": "Bulleted List", size: "xs", onClick: P, children: fe }) }), e[62] = P, e[63] = _e, e[64] = te) : te = e[64];
212
+ e[62] !== W || e[63] !== _e ? (te = /* @__PURE__ */ o(V, { content: "Bulleted List", children: /* @__PURE__ */ o(q, { "data-active": _e, variant: "ghost", "aria-label": "Bulleted List", size: "xs", onClick: W, children: fe }) }), e[62] = W, e[63] = _e, e[64] = te) : te = e[64];
212
213
  const ye = l === "number" || void 0;
213
214
  let pe;
214
215
  e[65] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (pe = /* @__PURE__ */ o(U, { fontWeight: "thin", fontSize: ".8rem", children: "1." }), e[65] = pe) : pe = e[65];
215
216
  let oe;
216
- e[66] !== _ || e[67] !== ye ? (oe = /* @__PURE__ */ o(V, { content: "Numbered List", children: /* @__PURE__ */ o(q, { "data-active": ye, variant: "ghost", "aria-label": "Numbered List", size: "xs", onClick: _, children: pe }) }), e[66] = _, e[67] = ye, e[68] = oe) : oe = e[68];
217
+ e[66] !== y || e[67] !== ye ? (oe = /* @__PURE__ */ o(V, { content: "Numbered List", children: /* @__PURE__ */ o(q, { "data-active": ye, variant: "ghost", "aria-label": "Numbered List", size: "xs", onClick: y, children: pe }) }), e[66] = y, e[67] = ye, e[68] = oe) : oe = e[68];
217
218
  let ne;
218
- e[69] !== f || e[70] !== T || e[71] !== W || e[72] !== X || e[73] !== Z || e[74] !== ee || e[75] !== te || e[76] !== oe ? (ne = /* @__PURE__ */ ge(Se, { direction: "row", gap: "0.5", alignItems: "center", children: [
219
- f,
220
- T,
221
- W,
219
+ e[69] !== m || e[70] !== c || e[71] !== z || e[72] !== X || e[73] !== Z || e[74] !== ee || e[75] !== te || e[76] !== oe ? (ne = /* @__PURE__ */ ge(Se, { direction: "row", gap: "0.5", alignItems: "center", children: [
220
+ m,
221
+ c,
222
+ z,
222
223
  se,
223
224
  X,
224
225
  Z,
@@ -226,31 +227,31 @@ function Rt(n) {
226
227
  me,
227
228
  te,
228
229
  oe
229
- ] }), e[69] = f, e[70] = T, e[71] = W, e[72] = X, e[73] = Z, e[74] = ee, e[75] = te, e[76] = oe, e[77] = ne) : ne = e[77];
230
+ ] }), e[69] = m, e[70] = c, e[71] = z, e[72] = X, e[73] = Z, e[74] = ee, e[75] = te, e[76] = oe, e[77] = ne) : ne = e[77];
230
231
  let ue;
231
- return e[78] !== u || e[79] !== ne ? (ue = /* @__PURE__ */ o("div", { ref: d, className: u, children: ne }), e[78] = u, e[79] = ne, e[80] = ue) : ue = e[80], ue;
232
+ return e[78] !== C || e[79] !== ne ? (ue = /* @__PURE__ */ o("div", { ref: d, className: C, children: ne }), e[78] = C, e[79] = ne, e[80] = ue) : ue = e[80], ue;
232
233
  }
233
- function kt() {
234
+ function Lt() {
234
235
  const n = ie();
235
- qe(n, Lt);
236
+ qe(n, It);
236
237
  }
237
- function Lt() {
238
+ function It() {
238
239
  return ft();
239
240
  }
240
- function It(n, e) {
241
- const t = re(7), [i, g] = K(!1);
242
- let r;
243
- t[0] !== e || t[1] !== n || t[2] !== i ? (r = /* @__PURE__ */ o(Rt, { editor: n, anchorElem: e, isToolbarActive: i, setIsToolbarActive: g }), t[0] = e, t[1] = n, t[2] = i, t[3] = r) : r = t[3];
241
+ function Mt(n, e) {
242
+ const t = re(7), [i, h] = K(!1);
243
+ let a;
244
+ t[0] !== e || t[1] !== n || t[2] !== i ? (a = /* @__PURE__ */ o(kt, { editor: n, anchorElem: e, isToolbarActive: i, setIsToolbarActive: h }), t[0] = e, t[1] = n, t[2] = i, t[3] = a) : a = t[3];
244
245
  let d;
245
- return t[4] !== e || t[5] !== r ? (d = ht(r, e), t[4] = e, t[5] = r, t[6] = d) : d = t[6], d;
246
+ return t[4] !== e || t[5] !== a ? (d = ht(a, e), t[4] = e, t[5] = a, t[6] = d) : d = t[6], d;
246
247
  }
247
248
  function Ke(n) {
248
249
  const {
249
250
  anchorElem: e
250
251
  } = n, t = e === void 0 ? document.body : e, [i] = it();
251
- return It(i, t);
252
+ return Mt(i, t);
252
253
  }
253
- function Mt() {
254
+ function At() {
254
255
  const n = re(1);
255
256
  let e;
256
257
  return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o("style", { children: `
@@ -289,159 +290,163 @@ function Mt() {
289
290
  }
290
291
  ` }), n[0] = e) : e = n[0], e;
291
292
  }
292
- function ro(n) {
293
+ function ao(n) {
293
294
  const e = re(37), {
294
295
  roomId: t,
295
296
  wsUrl: i,
296
- wsParams: g,
297
- userName: r,
297
+ wsParams: h,
298
+ userName: a,
298
299
  userColor: d,
299
300
  placeholder: l
300
301
  } = n;
301
- let S;
302
- e[0] !== g ? (S = g === void 0 ? {} : g, e[0] = g, e[1] = S) : S = e[1];
303
- const s = S, x = r === void 0 ? "Anonymous" : r, F = d === void 0 ? "#30bced" : d, j = ke(null), [D, G] = K(null), [L, I] = K(!1);
304
302
  let E;
305
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = new tt.Doc(), e[2] = E) : E = e[2];
306
- const P = E;
307
- let p;
308
- if (e[3] !== t || e[4] !== s || e[5] !== i) {
309
- p = new et(i, t, P, {
310
- params: s,
303
+ e[0] !== h ? (E = h === void 0 ? {} : h, e[0] = h, e[1] = E) : E = e[1];
304
+ const w = E, R = a === void 0 ? "Anonymous" : a, g = d === void 0 ? "#30bced" : d, j = Le(null), [D, G] = K(null), [O, k] = K(!1);
305
+ let L;
306
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = new tt.Doc(), e[2] = L) : L = e[2];
307
+ const W = L;
308
+ let _;
309
+ if (e[3] !== t || e[4] !== w || e[5] !== i) {
310
+ _ = new et(i, t, W, {
311
+ params: w,
311
312
  connect: !1
312
313
  });
313
- let z;
314
- e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = (W) => {
315
- W && I(!0);
316
- }, e[7] = z) : z = e[7], p.on("sync", z), e[3] = t, e[4] = s, e[5] = i, e[6] = p;
314
+ let $;
315
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = (z) => {
316
+ z && k(!0);
317
+ }, e[7] = $) : $ = e[7], _.on("sync", $), e[3] = t, e[4] = w, e[5] = i, e[6] = _;
317
318
  } else
318
- p = e[6];
319
- const _ = p;
320
- let M, O;
321
- e[8] !== _ ? (M = () => (_.connect(), () => {
322
- _.disconnect();
323
- }), O = [_], e[8] = _, e[9] = M, e[10] = O) : (M = e[9], O = e[10]), le(M, O);
324
- let w, c;
325
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => {
319
+ _ = e[6];
320
+ const y = _;
321
+ let b, F;
322
+ e[8] !== y ? (b = () => (y.connect(), () => {
323
+ y.disconnect();
324
+ }), F = [y], e[8] = y, e[9] = b, e[10] = F) : (b = e[9], F = e[10]), le(b, F);
325
+ let A, r;
326
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = () => {
326
327
  G(j.current);
327
- }, c = [], e[11] = w, e[12] = c) : (w = e[11], c = e[12]), le(w, c);
328
- let R;
329
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
328
+ }, r = [], e[11] = A, e[12] = r) : (A = e[11], r = e[12]), le(A, r);
329
+ let I;
330
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
330
331
  namespace: "COLLABORATIVE_EDITOR",
331
- nodes: Be,
332
+ nodes: Ne,
332
333
  editorState: null,
333
- onError: At,
334
+ onError: Bt,
334
335
  editable: !0,
335
- theme: Ae
336
- }, e[13] = R) : R = e[13];
337
- const H = R;
338
- let k;
339
- e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ o(Mt, {}), e[14] = k) : k = e[14];
340
- const A = _;
341
- let u;
342
- e[15] !== t || e[16] !== A || e[17] !== F || e[18] !== x ? (u = /* @__PURE__ */ o(Je, { id: t, doc: P, provider: A, __shouldBootstrapUnsafe: !1, username: x, cursorColor: F }), e[15] = t, e[16] = A, e[17] = F, e[18] = x, e[19] = u) : u = e[19];
343
- let y, m, b, f, C;
344
- e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ o(je, {}), m = /* @__PURE__ */ o(We, {}), b = /* @__PURE__ */ o(ze, {}), f = /* @__PURE__ */ o(Ne, {}), C = /* @__PURE__ */ o(Pe, {}), e[20] = y, e[21] = m, e[22] = b, e[23] = f, e[24] = C) : (y = e[20], m = e[21], b = e[22], f = e[23], C = e[24]);
345
- let v;
346
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ o(Oe, { fullWidth: !1 }), e[25] = v) : v = e[25];
347
- let B;
348
- e[26] !== l || e[27] !== L ? (B = L && l ? /* @__PURE__ */ o(He, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: l }) : null, e[26] = l, e[27] = L, e[28] = B) : B = e[28];
349
- let T;
350
- e[29] !== B ? (T = /* @__PURE__ */ o(Ue, { contentEditable: v, placeholder: B, ErrorBoundary: Fe }), e[29] = B, e[30] = T) : T = e[30];
351
- let N;
352
- e[31] !== D ? (N = D ? /* @__PURE__ */ o(Ke, { anchorElem: D }) : null, e[31] = D, e[32] = N) : N = e[32];
353
- let $;
354
- return e[33] !== u || e[34] !== T || e[35] !== N ? ($ = /* @__PURE__ */ ge($e, { ref: j, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: [
355
- k,
356
- /* @__PURE__ */ o(De, { initialConfig: H, children: /* @__PURE__ */ ge(Ze, { children: [
357
- u,
358
- y,
359
- m,
360
- b,
361
- f,
336
+ theme: Be
337
+ }, e[13] = I) : I = e[13];
338
+ const H = I;
339
+ let M;
340
+ e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ o(At, {}), e[14] = M) : M = e[14];
341
+ const B = y;
342
+ let C;
343
+ e[15] !== t || e[16] !== B || e[17] !== g || e[18] !== R ? (C = /* @__PURE__ */ o(Je, { id: t, doc: W, provider: B, __shouldBootstrapUnsafe: !1, username: R, cursorColor: g }), e[15] = t, e[16] = B, e[17] = g, e[18] = R, e[19] = C) : C = e[19];
344
+ let N, v, x, m, T;
345
+ e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ o(je, {}), v = /* @__PURE__ */ o(We, {}), x = /* @__PURE__ */ o(ze, {}), m = /* @__PURE__ */ o(Pe, {}), T = /* @__PURE__ */ o(Oe, {}), e[20] = N, e[21] = v, e[22] = x, e[23] = m, e[24] = T) : (N = e[20], v = e[21], x = e[22], m = e[23], T = e[24]);
346
+ let f;
347
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ o(Fe, { fullWidth: !1 }), e[25] = f) : f = e[25];
348
+ let p;
349
+ e[26] !== l || e[27] !== O ? (p = O && l ? /* @__PURE__ */ o(He, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: l }) : null, e[26] = l, e[27] = O, e[28] = p) : p = e[28];
350
+ let c;
351
+ e[29] !== p ? (c = /* @__PURE__ */ o(Ue, { contentEditable: f, placeholder: p, ErrorBoundary: De }), e[29] = p, e[30] = c) : c = e[30];
352
+ let S;
353
+ e[31] !== D ? (S = D ? /* @__PURE__ */ o(Ke, { anchorElem: D }) : null, e[31] = D, e[32] = S) : S = e[32];
354
+ let P;
355
+ return e[33] !== C || e[34] !== c || e[35] !== S ? (P = /* @__PURE__ */ ge(ke, { ref: j, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "visible", children: [
356
+ M,
357
+ /* @__PURE__ */ o($e, { initialConfig: H, children: /* @__PURE__ */ ge(Ze, { children: [
362
358
  C,
359
+ N,
360
+ v,
361
+ x,
362
+ m,
363
363
  T,
364
- N
364
+ c,
365
+ S
365
366
  ] }) })
366
- ] }), e[33] = u, e[34] = T, e[35] = N, e[36] = $) : $ = e[36], $;
367
+ ] }), e[33] = C, e[34] = c, e[35] = S, e[36] = P) : P = e[36], P;
367
368
  }
368
- function At(n) {
369
+ function Bt(n) {
369
370
  return console.error(n);
370
371
  }
371
- function so(n) {
372
- const e = re(38), {
373
- debug: t,
374
- defaultState: i,
375
- isEditable: g,
376
- placeholder: r,
377
- onChange: d
378
- } = n, l = t === void 0 ? !1 : t, S = i === void 0 ? "" : i, s = g === void 0 ? !1 : g;
379
- let x;
380
- e[0] !== S ? (x = Ye(S), e[0] = S, e[1] = x) : x = e[1];
372
+ function co(n) {
373
+ const e = re(41), {
374
+ autoFocus: t,
375
+ debug: i,
376
+ defaultState: h,
377
+ isEditable: a,
378
+ placeholder: d,
379
+ onChange: l
380
+ } = n, E = t === void 0 ? !1 : t, w = i === void 0 ? !1 : i, R = h === void 0 ? "" : h, g = a === void 0 ? !1 : a;
381
+ let j;
382
+ e[0] !== R ? (j = Ye(R), e[0] = R, e[1] = j) : j = e[1];
381
383
  const {
382
- frontmatter: F,
383
- body: j
384
- } = x, D = s && !!d, G = ke(null), [L, I] = K(null);
385
- let E, P;
386
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => {
387
- I(G.current);
388
- }, P = [], e[2] = E, e[3] = P) : (E = e[2], P = e[3]), le(E, P);
389
- let p;
390
- e[4] !== j ? (p = () => gt(j, Le, void 0, !1), e[4] = j, e[5] = p) : p = e[5];
391
- let _;
392
- e[6] !== s || e[7] !== p ? (_ = {
384
+ frontmatter: D,
385
+ body: G
386
+ } = j, O = g && !!l, k = Le(null), [L, W] = K(null);
387
+ let _, y;
388
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = () => {
389
+ W(k.current);
390
+ }, y = [], e[2] = _, e[3] = y) : (_ = e[2], y = e[3]), le(_, y);
391
+ let b;
392
+ e[4] !== G ? (b = () => gt(G, Ie, void 0, !1), e[4] = G, e[5] = b) : b = e[5];
393
+ let F;
394
+ e[6] !== g || e[7] !== b ? (F = {
393
395
  namespace: "MARKDOWN_EDITOR",
394
- nodes: Be,
395
- editorState: p,
396
- onError: Bt,
397
- editable: s,
398
- theme: Ae
399
- }, e[6] = s, e[7] = p, e[8] = _) : _ = e[8];
400
- const M = _;
401
- let O, w, c, R, H, k;
402
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ o(vt, {}), k = /* @__PURE__ */ o(je, {}), O = /* @__PURE__ */ o(We, {}), w = /* @__PURE__ */ o(ze, {}), c = /* @__PURE__ */ o(Ne, {}), R = /* @__PURE__ */ o(Pe, {}), e[9] = O, e[10] = w, e[11] = c, e[12] = R, e[13] = H, e[14] = k) : (O = e[9], w = e[10], c = e[11], R = e[12], H = e[13], k = e[14]);
403
- let A;
404
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ o(Oe, { fullWidth: !1 }), e[15] = A) : A = e[15];
405
- let u;
406
- e[16] !== r ? (u = r ? /* @__PURE__ */ o(He, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: r }) : null, e[16] = r, e[17] = u) : u = e[17];
407
- let y;
408
- e[18] !== u ? (y = /* @__PURE__ */ o(Ue, { contentEditable: A, placeholder: u, ErrorBoundary: Fe }), e[18] = u, e[19] = y) : y = e[19];
396
+ nodes: Ne,
397
+ editorState: b,
398
+ onError: Nt,
399
+ editable: g,
400
+ theme: Be
401
+ }, e[6] = g, e[7] = b, e[8] = F) : F = e[8];
402
+ const A = F;
403
+ let r;
404
+ e[9] !== E ? (r = E ? /* @__PURE__ */ o(vt, {}) : null, e[9] = E, e[10] = r) : r = e[10];
405
+ let I, H, M, B, C, N;
406
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ o(xt, {}), H = /* @__PURE__ */ o(je, {}), M = /* @__PURE__ */ o(We, {}), B = /* @__PURE__ */ o(ze, {}), C = /* @__PURE__ */ o(Pe, {}), N = /* @__PURE__ */ o(Oe, {}), e[11] = I, e[12] = H, e[13] = M, e[14] = B, e[15] = C, e[16] = N) : (I = e[11], H = e[12], M = e[13], B = e[14], C = e[15], N = e[16]);
407
+ let v;
408
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ o(Fe, { fullWidth: !1 }), e[17] = v) : v = e[17];
409
+ let x;
410
+ e[18] !== d ? (x = d ? /* @__PURE__ */ o(ke, { position: "absolute", top: "0", left: "0", right: "0", pointerEvents: "none", userSelect: "none", justifyContent: "center", children: /* @__PURE__ */ o(He, { width: "100%", maxWidth: "720px", color: "fg.muted", textStyle: "paragraph/M/regular", children: d }) }) : null, e[18] = d, e[19] = x) : x = e[19];
409
411
  let m;
410
- e[20] !== L || e[21] !== s ? (m = s && L ? /* @__PURE__ */ o(Ke, { anchorElem: L }) : null, e[20] = L, e[21] = s, e[22] = m) : m = e[22];
411
- let b;
412
- e[23] !== F || e[24] !== d || e[25] !== D ? (b = D ? /* @__PURE__ */ o(xt, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (B) => {
413
- B.read(() => {
414
- const T = ut(), N = bt(Le, T);
415
- d?.(F + N);
416
- });
417
- } }) : null, e[23] = F, e[24] = d, e[25] = D, e[26] = b) : b = e[26];
412
+ e[20] !== x ? (m = /* @__PURE__ */ o(Ue, { contentEditable: v, placeholder: x, ErrorBoundary: De }), e[20] = x, e[21] = m) : m = e[21];
413
+ let T;
414
+ e[22] !== L || e[23] !== g ? (T = g && L ? /* @__PURE__ */ o(Ke, { anchorElem: L }) : null, e[22] = L, e[23] = g, e[24] = T) : T = e[24];
418
415
  let f;
419
- e[27] !== s ? (f = /* @__PURE__ */ o(Xe, { isEditable: s }), e[27] = s, e[28] = f) : f = e[28];
420
- let C;
421
- e[29] !== l ? (C = l && /* @__PURE__ */ o(Qe, {}), e[29] = l, e[30] = C) : C = e[30];
422
- let v;
423
- return e[31] !== M || e[32] !== y || e[33] !== m || e[34] !== b || e[35] !== f || e[36] !== C ? (v = /* @__PURE__ */ o($e, { ref: G, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ ge(De, { initialConfig: M, children: [
416
+ e[25] !== D || e[26] !== l || e[27] !== O ? (f = O ? /* @__PURE__ */ o(_t, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (P) => {
417
+ P.read(() => {
418
+ const $ = ut(), z = bt(Ie, $);
419
+ l?.(D + z);
420
+ });
421
+ } }) : null, e[25] = D, e[26] = l, e[27] = O, e[28] = f) : f = e[28];
422
+ let p;
423
+ e[29] !== g ? (p = /* @__PURE__ */ o(Xe, { isEditable: g }), e[29] = g, e[30] = p) : p = e[30];
424
+ let c;
425
+ e[31] !== w ? (c = w && /* @__PURE__ */ o(Qe, {}), e[31] = w, e[32] = c) : c = e[32];
426
+ let S;
427
+ return e[33] !== A || e[34] !== m || e[35] !== T || e[36] !== f || e[37] !== p || e[38] !== c || e[39] !== r ? (S = /* @__PURE__ */ o(ke, { ref: k, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "visible", children: /* @__PURE__ */ ge($e, { initialConfig: A, children: [
428
+ r,
429
+ I,
424
430
  H,
425
- k,
426
- O,
427
- w,
428
- c,
429
- R,
430
- y,
431
+ M,
432
+ B,
433
+ C,
434
+ N,
431
435
  m,
432
- b,
436
+ T,
433
437
  f,
434
- C
435
- ] }) }), e[31] = M, e[32] = y, e[33] = m, e[34] = b, e[35] = f, e[36] = C, e[37] = v) : v = e[37], v;
438
+ p,
439
+ c
440
+ ] }) }), e[33] = A, e[34] = m, e[35] = T, e[36] = f, e[37] = p, e[38] = c, e[39] = r, e[40] = S) : S = e[40], S;
436
441
  }
437
- function Bt(n) {
442
+ function Nt(n) {
438
443
  return console.error(n);
439
444
  }
440
- function ao(n) {
445
+ function mo(n) {
441
446
  const e = n.toLowerCase().trim();
442
447
  return e ? e.startsWith("image/") ? "image" : e === "application/pdf" ? "pdf" : e === "text/markdown" ? "markdown" : e === "text/csv" || e === "text/tab-separated-values" ? "table" : e === "application/json" ? "json" : (e.startsWith("text/") || e.startsWith("application/"), "text") : "text";
443
448
  }
444
- const Nt = {
449
+ const Pt = {
445
450
  csv: "text/csv",
446
451
  tsv: "text/tab-separated-values",
447
452
  json: "application/json",
@@ -465,21 +470,21 @@ const Nt = {
465
470
  yml: "text/yaml",
466
471
  yaml: "text/yaml"
467
472
  };
468
- function co(n) {
473
+ function fo(n) {
469
474
  const t = (n.split("?")[0]?.split("#")[0] ?? "").split(".").pop()?.toLowerCase();
470
- return t ? Nt[t] ?? null : null;
475
+ return t ? Pt[t] ?? null : null;
471
476
  }
472
477
  export {
473
- ro as CollaborativeMarkdownEditor,
474
- po as DefaultRichTextCodeEditor,
475
- uo as DefaultRichTextDataTable,
476
- so as MarkdownEditor,
477
- ho as MarkdownPreview,
478
- go as PromptEditor,
479
- bo as RichMessage,
480
- vo as generateEditorStateFromString,
481
- xo as getTextFromSerializedEditorState,
482
- ao as inferResourceTypeFromMediaType,
483
- co as mediaTypeFromPath
478
+ ao as CollaborativeMarkdownEditor,
479
+ ho as DefaultRichTextCodeEditor,
480
+ go as DefaultRichTextDataTable,
481
+ co as MarkdownEditor,
482
+ bo as MarkdownPreview,
483
+ vo as PromptEditor,
484
+ xo as RichMessage,
485
+ _o as generateEditorStateFromString,
486
+ yo as getTextFromSerializedEditorState,
487
+ mo as inferResourceTypeFromMediaType,
488
+ fo as mediaTypeFromPath
484
489
  };
485
490
  //# sourceMappingURL=rich-text.js.map