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