@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
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { CodeNode as ae } from "@lexical/code";
|
|
2
|
-
import { LinkNode as
|
|
3
|
-
import { ListNode as
|
|
4
|
-
import { TRANSFORMERS as Ne, $convertFromMarkdownString as Ce, $convertToMarkdownString as
|
|
2
|
+
import { LinkNode as Se } from "@lexical/link";
|
|
3
|
+
import { ListNode as Te, ListItemNode as Re } from "@lexical/list";
|
|
4
|
+
import { TRANSFORMERS as Ne, $convertFromMarkdownString as Ce, $convertToMarkdownString as nt } from "@lexical/markdown";
|
|
5
5
|
import { QuoteNode as Oe, HeadingNode as ke } from "@lexical/rich-text";
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { chakra as ie, Flex as V, Text as I, Spacer as
|
|
8
|
-
import { DecoratorNode as G, $applyNodeReplacement as
|
|
6
|
+
import { jsx as s, jsxs as P, Fragment as pe } from "react/jsx-runtime";
|
|
7
|
+
import { chakra as ie, Flex as V, Text as I, Spacer as rt, IconButton as ot, Box as v, Table as A, Textarea as it, Tooltip as Z, Kbd as st } from "@chakra-ui/react";
|
|
8
|
+
import { DecoratorNode as G, $applyNodeReplacement as lt, ElementNode as $e, TextNode as ee, $createTextNode as Ie, $nodesOfType as ct, createCommand as k, isHTMLElement as at, $createParagraphNode as se, COMMAND_PRIORITY_LOW as ve, $getSelection as dt, $isRangeSelection as ut, $isElementNode as mt, KEY_DOWN_COMMAND as ft, COMMAND_PRIORITY_HIGH as pt, $getRoot as we } from "lexical";
|
|
9
9
|
import { c as C } from "react/compiler-runtime";
|
|
10
|
-
import { MarkNode as
|
|
10
|
+
import { MarkNode as _t } from "@lexical/mark";
|
|
11
11
|
import { LexicalComposer as Pe } from "@lexical/react/LexicalComposer";
|
|
12
12
|
import { LexicalErrorBoundary as Le } from "@lexical/react/LexicalErrorBoundary";
|
|
13
|
-
import { HistoryPlugin as
|
|
13
|
+
import { HistoryPlugin as ht } from "@lexical/react/LexicalHistoryPlugin";
|
|
14
14
|
import { OnChangePlugin as Me } from "@lexical/react/LexicalOnChangePlugin";
|
|
15
15
|
import { RichTextPlugin as De } from "@lexical/react/LexicalRichTextPlugin";
|
|
16
|
-
import * as
|
|
17
|
-
import { Suspense as
|
|
16
|
+
import * as gt from "react";
|
|
17
|
+
import { Suspense as xt, useEffect as F, useImperativeHandle as Et, useState as bt, forwardRef as yt, useRef as St } from "react";
|
|
18
18
|
import { useLexicalComposerContext as L } from "@lexical/react/LexicalComposerContext";
|
|
19
|
-
import { $setBlocksType as
|
|
20
|
-
import { addClassNamesToElement as
|
|
19
|
+
import { $setBlocksType as Tt } from "@lexical/selection";
|
|
20
|
+
import { addClassNamesToElement as Ae, mergeRegister as de } from "@lexical/utils";
|
|
21
21
|
import { LexicalTypeaheadMenuPlugin as Rt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
22
22
|
import * as Nt from "react-dom";
|
|
23
23
|
import { HorizontalRulePlugin as Ct } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
@@ -29,16 +29,16 @@ import { TreeView as vt } from "@lexical/react/LexicalTreeView";
|
|
|
29
29
|
import { FileSpreadsheet as wt, FileCode as Pt, FileChartLine as Lt, FileJson as Mt, FileText as Dt, FileCog as At, FileImage as Ft, FileArchive as qt, File as Ht, X as jt } from "lucide-react";
|
|
30
30
|
import { T as Bt } from "./tooltip-Gm7PLwZG.js";
|
|
31
31
|
const Ut = ie($t);
|
|
32
|
-
function
|
|
32
|
+
function Fe(n) {
|
|
33
33
|
const e = C(7), {
|
|
34
34
|
onRef: t,
|
|
35
35
|
fullWidth: r,
|
|
36
36
|
padding: o
|
|
37
|
-
} = n, i = r === void 0 ? !1 : r,
|
|
37
|
+
} = n, i = r === void 0 ? !1 : r, l = i ? "flex-start" : "center", a = i ? "100%" : "720px";
|
|
38
38
|
let c;
|
|
39
|
-
e[0] !== a ? (c = /* @__PURE__ */
|
|
39
|
+
e[0] !== a ? (c = /* @__PURE__ */ s(Ut, { height: "fit-content", minH: "100%", width: "100%", maxWidth: a, textStyle: "paragraph/M/regular", position: "relative", outline: "none" }), e[0] = a, e[1] = c) : c = e[1];
|
|
40
40
|
let d;
|
|
41
|
-
return e[2] !== t || e[3] !== o || e[4] !==
|
|
41
|
+
return e[2] !== t || e[3] !== o || e[4] !== l || e[5] !== c ? (d = /* @__PURE__ */ s(V, { className: "rich-text", height: "100%", overflow: "auto", position: "relative", children: /* @__PURE__ */ s(V, { ref: t, width: "100%", padding: o, justifyContent: l, children: c }) }), e[2] = t, e[3] = o, e[4] = l, e[5] = c, e[6] = d) : d = e[6], d;
|
|
42
42
|
}
|
|
43
43
|
const Jt = (n) => {
|
|
44
44
|
const e = n.split(".").pop()?.toLowerCase() ?? "";
|
|
@@ -81,9 +81,9 @@ const Jt = (n) => {
|
|
|
81
81
|
bg: "var(--schub-accent-subtle)"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
}, Kt = "md", Vt = "neutral",
|
|
84
|
+
}, Kt = "md", Vt = "neutral", qe = (n) => {
|
|
85
85
|
const e = C(39);
|
|
86
|
-
let t, r, o, i,
|
|
86
|
+
let t, r, o, i, l, a, c;
|
|
87
87
|
e[0] !== n ? ({
|
|
88
88
|
fileName: t,
|
|
89
89
|
onSelect: i,
|
|
@@ -91,43 +91,43 @@ const Jt = (n) => {
|
|
|
91
91
|
size: a,
|
|
92
92
|
tone: c,
|
|
93
93
|
icon: r,
|
|
94
|
-
...
|
|
95
|
-
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] =
|
|
96
|
-
const d = a === void 0 ? Kt : a,
|
|
97
|
-
let
|
|
98
|
-
e[8] !== t ? (
|
|
99
|
-
const
|
|
94
|
+
...l
|
|
95
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] = l, e[6] = a, e[7] = c) : (t = e[1], r = e[2], o = e[3], i = e[4], l = e[5], a = e[6], c = e[7]);
|
|
96
|
+
const d = a === void 0 ? Kt : a, h = c === void 0 ? Vt : c;
|
|
97
|
+
let f;
|
|
98
|
+
e[8] !== t ? (f = Jt(t), e[8] = t, e[9] = f) : f = e[9];
|
|
99
|
+
const _ = f, u = Wt[d], m = zt[h], g = i ? "pointer" : "default";
|
|
100
100
|
let y;
|
|
101
101
|
e[10] !== t || e[11] !== i ? (y = (O) => {
|
|
102
102
|
O.stopPropagation(), i?.(t);
|
|
103
103
|
}, e[10] = t, e[11] = i, e[12] = y) : y = e[12];
|
|
104
104
|
let E;
|
|
105
|
-
e[13] !==
|
|
105
|
+
e[13] !== _ || e[14] !== r || e[15] !== u.iconSize ? (E = r ?? /* @__PURE__ */ s(_, { size: u.iconSize }), e[13] = _, e[14] = r, e[15] = u.iconSize, e[16] = E) : E = e[16];
|
|
106
106
|
let R;
|
|
107
|
-
e[17] !== E ? (R = /* @__PURE__ */
|
|
108
|
-
let T;
|
|
109
|
-
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
110
|
-
base: "14rem"
|
|
111
|
-
}, e[19] = T) : T = e[19];
|
|
107
|
+
e[17] !== E ? (R = /* @__PURE__ */ s(ie.span, { mr: "xs", display: "inline-flex", children: E }), e[17] = E, e[18] = R) : R = e[18];
|
|
112
108
|
let S;
|
|
113
|
-
e[
|
|
109
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
110
|
+
base: "14rem"
|
|
111
|
+
}, e[19] = S) : S = e[19];
|
|
112
|
+
let T;
|
|
113
|
+
e[20] !== t || e[21] !== u.textStyle ? (T = /* @__PURE__ */ s(I, { maxW: S, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: u.textStyle, children: t }), e[20] = t, e[21] = u.textStyle, e[22] = T) : T = e[22];
|
|
114
114
|
let x;
|
|
115
|
-
e[23] !== t || e[24] !==
|
|
115
|
+
e[23] !== t || e[24] !== T ? (x = /* @__PURE__ */ s(Bt, { content: t, children: T }), e[23] = t, e[24] = T, e[25] = x) : x = e[25];
|
|
116
116
|
let N;
|
|
117
|
-
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */
|
|
117
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ s(rt, {}), e[26] = N) : N = e[26];
|
|
118
118
|
let b;
|
|
119
|
-
e[27] !== t || e[28] !== o ? (b = o && /* @__PURE__ */
|
|
119
|
+
e[27] !== t || e[28] !== o ? (b = o && /* @__PURE__ */ s(ot, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
|
|
120
120
|
bg: "transparent"
|
|
121
121
|
}, onClick: (O) => {
|
|
122
122
|
O.stopPropagation(), o?.(t);
|
|
123
|
-
}, children: /* @__PURE__ */
|
|
124
|
-
let
|
|
125
|
-
return e[30] !==
|
|
123
|
+
}, children: /* @__PURE__ */ s(jt, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = b) : b = e[29];
|
|
124
|
+
let p;
|
|
125
|
+
return e[30] !== l || e[31] !== u.container || e[32] !== b || e[33] !== g || e[34] !== y || e[35] !== R || e[36] !== x || e[37] !== m ? (p = /* @__PURE__ */ P(ie.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: g, ...m, ...u.container, onClick: y, ...l, children: [
|
|
126
126
|
R,
|
|
127
127
|
x,
|
|
128
128
|
N,
|
|
129
129
|
b
|
|
130
|
-
] }), e[30] =
|
|
130
|
+
] }), e[30] = l, e[31] = u.container, e[32] = b, e[33] = g, e[34] = y, e[35] = R, e[36] = x, e[37] = m, e[38] = p) : p = e[38], p;
|
|
131
131
|
};
|
|
132
132
|
let ne = class le extends G {
|
|
133
133
|
__href;
|
|
@@ -159,12 +159,12 @@ let ne = class le extends G {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
static importJSON(e) {
|
|
162
|
-
return
|
|
162
|
+
return He(e.href, e.label);
|
|
163
163
|
}
|
|
164
164
|
decorate(e, t) {
|
|
165
|
-
const r = this.__href, i = r.split("/").pop() || "unknown",
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
if (
|
|
165
|
+
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), a = /^#?\$PROJECT\//i.test(r);
|
|
166
|
+
return /* @__PURE__ */ s(v, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(qe, { fileName: i, onSelect: () => {
|
|
167
|
+
if (l)
|
|
168
168
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
169
169
|
else if (a) {
|
|
170
170
|
const c = r.replace(/^#?\$PROJECT\//i, ""), d = new CustomEvent("ui:open-project-file", {
|
|
@@ -176,7 +176,7 @@ let ne = class le extends G {
|
|
|
176
176
|
} }) });
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function He(n, e) {
|
|
180
180
|
return new ne(n, e);
|
|
181
181
|
}
|
|
182
182
|
function Xt(n) {
|
|
@@ -195,7 +195,7 @@ const _e = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Gt = {
|
|
|
195
195
|
importRegExp: _e,
|
|
196
196
|
replace: (n, e) => {
|
|
197
197
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
198
|
-
n.replace(
|
|
198
|
+
n.replace(He(o, i));
|
|
199
199
|
},
|
|
200
200
|
type: "text-match"
|
|
201
201
|
}, ue = {
|
|
@@ -278,68 +278,68 @@ const _e = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Gt = {
|
|
|
278
278
|
isEditable: r,
|
|
279
279
|
showLineNumbers: o,
|
|
280
280
|
disableScroll: i
|
|
281
|
-
} = n,
|
|
281
|
+
} = n, l = t === void 0 ? "" : t, a = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o, d = i === void 0 ? !1 : i;
|
|
282
282
|
if (a) {
|
|
283
|
-
let
|
|
284
|
-
return e[0] !==
|
|
283
|
+
let f;
|
|
284
|
+
return e[0] !== l ? (f = /* @__PURE__ */ s(it, { defaultValue: l, fontFamily: "mono", fontSize: "sm", resize: "vertical", minHeight: "100%" }), e[0] = l, e[1] = f) : f = e[1], f;
|
|
285
285
|
}
|
|
286
|
-
let
|
|
287
|
-
if (e[2] !==
|
|
288
|
-
const
|
|
289
|
-
`) : [
|
|
290
|
-
|
|
286
|
+
let h;
|
|
287
|
+
if (e[2] !== l || e[3] !== d || e[4] !== c) {
|
|
288
|
+
const f = c ? l.split(`
|
|
289
|
+
`) : [l];
|
|
290
|
+
h = /* @__PURE__ */ s(v, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: "sm", lineHeight: "1.5", overflowY: d ? "hidden" : "auto", background: "bg.muted", borderRadius: "md", width: "100%", children: c ? /* @__PURE__ */ s(v, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: f.map(en) }) : /* @__PURE__ */ s(v, { as: "code", children: l }) }), e[2] = l, e[3] = d, e[4] = c, e[5] = h;
|
|
291
291
|
} else
|
|
292
|
-
|
|
293
|
-
return
|
|
292
|
+
h = e[5];
|
|
293
|
+
return h;
|
|
294
294
|
}, Zt = (n) => {
|
|
295
295
|
const e = C(26), {
|
|
296
296
|
data: t,
|
|
297
297
|
fullWidth: r,
|
|
298
298
|
noBorder: o,
|
|
299
299
|
hiddenColumns: i
|
|
300
|
-
} = n,
|
|
300
|
+
} = n, l = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o;
|
|
301
301
|
let c;
|
|
302
302
|
e[0] !== i ? (c = i === void 0 ? [] : i, e[0] = i, e[1] = c) : c = e[1];
|
|
303
303
|
const d = c;
|
|
304
304
|
if (!t.length) {
|
|
305
305
|
const x = a ? "0" : "1px";
|
|
306
306
|
let N;
|
|
307
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */
|
|
307
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ s(I, { textStyle: "label/S/regular", color: "fg.muted", children: "No data" }), e[2] = N) : N = e[2];
|
|
308
308
|
let b;
|
|
309
|
-
return e[3] !== x ? (b = /* @__PURE__ */
|
|
309
|
+
return e[3] !== x ? (b = /* @__PURE__ */ s(v, { padding: "sm", borderWidth: x, borderColor: "border.muted", children: N }), e[3] = x, e[4] = b) : b = e[4], b;
|
|
310
310
|
}
|
|
311
|
-
let p;
|
|
312
|
-
e[5] !== d ? (p = new Set(d), e[5] = d, e[6] = p) : p = e[6];
|
|
313
|
-
const u = p;
|
|
314
311
|
let h;
|
|
315
|
-
e[
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
312
|
+
e[5] !== d ? (h = new Set(d), e[5] = d, e[6] = h) : h = e[6];
|
|
313
|
+
const f = h;
|
|
314
|
+
let _;
|
|
315
|
+
e[7] !== t[0] ? (_ = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = _) : _ = e[8];
|
|
316
|
+
let u;
|
|
317
|
+
e[9] !== f || e[10] !== _ ? (u = _.filter((x) => !f.has(x)), e[9] = f, e[10] = _, e[11] = u) : u = e[11];
|
|
318
|
+
const m = u, g = l ? "100%" : "fit-content", y = a ? "0" : "1px";
|
|
319
319
|
let E;
|
|
320
|
-
e[12] !==
|
|
320
|
+
e[12] !== m ? (E = /* @__PURE__ */ s(A.Header, { children: /* @__PURE__ */ s(A.Row, { background: "bg.muted", children: m.map(tn) }) }), e[12] = m, e[13] = E) : E = e[13];
|
|
321
321
|
let R;
|
|
322
|
-
if (e[14] !==
|
|
322
|
+
if (e[14] !== m || e[15] !== t) {
|
|
323
323
|
let x;
|
|
324
|
-
e[17] !==
|
|
324
|
+
e[17] !== m ? (x = (N, b) => /* @__PURE__ */ s(A.Row, { children: m.map((p) => /* @__PURE__ */ s(A.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(I, { textStyle: "paragraph/S/regular", children: Yt(N[p]) }) }, `${b}-${p}`)) }, `${b}-${m.join("-")}`), e[17] = m, e[18] = x) : x = e[18], R = t.map(x), e[14] = m, e[15] = t, e[16] = R;
|
|
325
325
|
} else
|
|
326
326
|
R = e[16];
|
|
327
|
-
let T;
|
|
328
|
-
e[19] !== R ? (T = /* @__PURE__ */ l(F.Body, { children: R }), e[19] = R, e[20] = T) : T = e[20];
|
|
329
327
|
let S;
|
|
330
|
-
|
|
328
|
+
e[19] !== R ? (S = /* @__PURE__ */ s(A.Body, { children: R }), e[19] = R, e[20] = S) : S = e[20];
|
|
329
|
+
let T;
|
|
330
|
+
return e[21] !== S || e[22] !== g || e[23] !== y || e[24] !== E ? (T = /* @__PURE__ */ s(A.ScrollArea, { overflowX: "auto", maxWidth: "100%", children: /* @__PURE__ */ P(A.Root, { size: "sm", width: g, borderWidth: y, borderColor: "border.muted", children: [
|
|
331
331
|
E,
|
|
332
|
-
|
|
333
|
-
] }) }), e[21] =
|
|
332
|
+
S
|
|
333
|
+
] }) }), e[21] = S, e[22] = g, e[23] = y, e[24] = E, e[25] = T) : T = e[25], T;
|
|
334
334
|
};
|
|
335
335
|
function en(n, e) {
|
|
336
336
|
return /* @__PURE__ */ P(v, { as: "span", display: "contents", children: [
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ s(I, { as: "span", color: "fg.muted", textAlign: "right", children: e + 1 }),
|
|
338
|
+
/* @__PURE__ */ s(I, { as: "span", children: n.length ? n : " " })
|
|
339
339
|
] }, `${e}-${n}`);
|
|
340
340
|
}
|
|
341
341
|
function tn(n) {
|
|
342
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ s(A.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(I, { textStyle: "label/S/medium", children: n }) }, n);
|
|
343
343
|
}
|
|
344
344
|
class H extends G {
|
|
345
345
|
__data;
|
|
@@ -362,7 +362,7 @@ class H extends G {
|
|
|
362
362
|
return !1;
|
|
363
363
|
}
|
|
364
364
|
decorate() {
|
|
365
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ s(Zt, { fullWidth: !0, isReadOnly: !0, data: this.__data });
|
|
366
366
|
}
|
|
367
367
|
exportJSON() {
|
|
368
368
|
return {
|
|
@@ -376,7 +376,7 @@ class H extends G {
|
|
|
376
376
|
}
|
|
377
377
|
getTextContent() {
|
|
378
378
|
if (!this.__data.length) return "";
|
|
379
|
-
const e = Object.keys(this.__data[0]), t = e.join(" | "), r = e.map(() => "---").join(" | "), o = this.__data.map((i) => e.map((
|
|
379
|
+
const e = Object.keys(this.__data[0]), t = e.join(" | "), r = e.map(() => "---").join(" | "), o = this.__data.map((i) => e.map((l) => String(i[l] || "")).join(" | "));
|
|
380
380
|
return [t, r, ...o].join(`
|
|
381
381
|
`);
|
|
382
382
|
}
|
|
@@ -413,10 +413,10 @@ class K extends G {
|
|
|
413
413
|
return new K(t, r);
|
|
414
414
|
}
|
|
415
415
|
decorate() {
|
|
416
|
-
return /* @__PURE__ */
|
|
416
|
+
return /* @__PURE__ */ s(v, { borderRadius: "md", overflow: "hidden", children: /* @__PURE__ */ s(Qt, { language: this.__language || "plaintext", defaultCode: this.__code, isEditable: !1, showLineNumbers: !0, disableScroll: !0 }) });
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
const nn =
|
|
419
|
+
const nn = gt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
|
|
420
420
|
function xe(n) {
|
|
421
421
|
let e = n.getAttribute("data-lexical-equation");
|
|
422
422
|
const t = n.getAttribute("data-lexical-inline") === "true";
|
|
@@ -494,19 +494,19 @@ class q extends G {
|
|
|
494
494
|
return this.__inline;
|
|
495
495
|
}
|
|
496
496
|
decorate() {
|
|
497
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ s(xt, { fallback: null, children: /* @__PURE__ */ s(nn, { equation: this.__equation, inline: this.__inline }) });
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
function re(n = "", e = !1) {
|
|
501
501
|
const t = new q(n, e);
|
|
502
|
-
return
|
|
502
|
+
return lt(t);
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function je(n) {
|
|
505
505
|
return n instanceof q;
|
|
506
506
|
}
|
|
507
|
-
const
|
|
507
|
+
const Be = {
|
|
508
508
|
dependencies: [q],
|
|
509
|
-
export: (n) =>
|
|
509
|
+
export: (n) => je(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
|
|
510
510
|
importRegExp: /\\\((.*?)\\\)/,
|
|
511
511
|
regExp: /\\\((.*?)\\\)/,
|
|
512
512
|
replace: (n, e) => {
|
|
@@ -514,11 +514,11 @@ const Ue = {
|
|
|
514
514
|
n.replace(t);
|
|
515
515
|
},
|
|
516
516
|
type: "text-match"
|
|
517
|
-
},
|
|
517
|
+
}, Ue = {
|
|
518
518
|
dependencies: [q],
|
|
519
519
|
regExpStart: /\\\[/,
|
|
520
520
|
regExpEnd: /\\]/,
|
|
521
|
-
export: (n) =>
|
|
521
|
+
export: (n) => je(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
|
|
522
522
|
replace: (n, e, t, r, o) => o ? (n.append(re(o.join(" "), !1)), !0) : !1,
|
|
523
523
|
type: "multiline-element"
|
|
524
524
|
};
|
|
@@ -533,7 +533,7 @@ class B extends $e {
|
|
|
533
533
|
return new B(e?.__key);
|
|
534
534
|
}
|
|
535
535
|
static importJSON(e) {
|
|
536
|
-
return
|
|
536
|
+
return Je();
|
|
537
537
|
}
|
|
538
538
|
exportJSON() {
|
|
539
539
|
return {
|
|
@@ -551,7 +551,7 @@ class B extends $e {
|
|
|
551
551
|
return null;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Je() {
|
|
555
555
|
return new B();
|
|
556
556
|
}
|
|
557
557
|
function on(n) {
|
|
@@ -562,7 +562,7 @@ const sn = {
|
|
|
562
562
|
export: (n) => on(n) ? "***" : null,
|
|
563
563
|
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
564
564
|
replace: (n) => {
|
|
565
|
-
const e =
|
|
565
|
+
const e = Je();
|
|
566
566
|
n.replace(e);
|
|
567
567
|
},
|
|
568
568
|
type: "element"
|
|
@@ -572,8 +572,8 @@ const sn = {
|
|
|
572
572
|
if (ge(n)) {
|
|
573
573
|
const t = n.getData();
|
|
574
574
|
if (!t.length) return "";
|
|
575
|
-
const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "),
|
|
576
|
-
return [`| ${o} |`, `| ${i} |`, ...
|
|
575
|
+
const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), l = t.map((a) => r.map((c) => String(a[c] || "")).join(" | "));
|
|
576
|
+
return [`| ${o} |`, `| ${i} |`, ...l.map((a) => `| ${a} |`)].join(`
|
|
577
577
|
`);
|
|
578
578
|
}
|
|
579
579
|
return null;
|
|
@@ -585,19 +585,19 @@ const sn = {
|
|
|
585
585
|
n.remove();
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
|
-
const
|
|
588
|
+
const l = t[0].split("|").slice(1, -1).map((a) => a.trim());
|
|
589
589
|
if (o?.getType() === "data_table" && ge(o)) {
|
|
590
|
-
const a = o.getData(), c = {}, d = a.length === 1 && Object.values(a[0]).every((
|
|
591
|
-
|
|
592
|
-
const g =
|
|
593
|
-
c[g] =
|
|
590
|
+
const a = o.getData(), c = {}, d = a.length === 1 && Object.values(a[0]).every((u) => u === ""), h = a.length > 0 ? Object.keys(a[0]) : l.map((u, m) => `col_${m}`);
|
|
591
|
+
l.forEach((u, m) => {
|
|
592
|
+
const g = h[m] || `col_${m}`;
|
|
593
|
+
c[g] = u;
|
|
594
594
|
});
|
|
595
|
-
const
|
|
596
|
-
o.replace(
|
|
595
|
+
const f = d ? [c] : [...a, c], _ = he(f);
|
|
596
|
+
o.replace(_), n.remove();
|
|
597
597
|
} else {
|
|
598
598
|
const a = {};
|
|
599
|
-
|
|
600
|
-
a[d || `col_${
|
|
599
|
+
l.forEach((d, h) => {
|
|
600
|
+
a[d || `col_${h}`] = "";
|
|
601
601
|
});
|
|
602
602
|
const c = he([a]);
|
|
603
603
|
n.replace(c);
|
|
@@ -638,34 +638,34 @@ const sn = {
|
|
|
638
638
|
t.toggleFormat("underline"), n.replace(t);
|
|
639
639
|
},
|
|
640
640
|
type: "text-match"
|
|
641
|
-
},
|
|
641
|
+
}, We = [ln, sn, cn, an], Wr = [Oe, Se, H, ke, Te, Re, ae, K, q, B, ne], zr = [...Ne, ...We, Be, Ue, Gt], Kr = ue;
|
|
642
642
|
function dn() {
|
|
643
643
|
const n = C(3), [e] = L();
|
|
644
644
|
let t, r;
|
|
645
645
|
return n[0] !== e ? (t = () => {
|
|
646
646
|
e.update(un);
|
|
647
|
-
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
647
|
+
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), F(t, r), null;
|
|
648
648
|
}
|
|
649
649
|
function un() {
|
|
650
|
-
const n =
|
|
650
|
+
const n = ct(ae);
|
|
651
651
|
for (const e of n) {
|
|
652
652
|
const t = e.getLanguage() ?? "plaintext", r = e.getTextContent();
|
|
653
653
|
e.replace(new K(t, r));
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function ze(n) {
|
|
657
657
|
const e = C(4), {
|
|
658
658
|
isEditable: t
|
|
659
659
|
} = n, [r] = L();
|
|
660
660
|
let o, i;
|
|
661
661
|
return e[0] !== r || e[1] !== t ? (o = () => {
|
|
662
662
|
r.setEditable(t);
|
|
663
|
-
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]),
|
|
663
|
+
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), F(o, i), null;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Ke() {
|
|
666
666
|
const n = C(2), [e] = L();
|
|
667
667
|
let t;
|
|
668
|
-
return n[0] !== e ? (t = /* @__PURE__ */
|
|
668
|
+
return n[0] !== e ? (t = /* @__PURE__ */ s(v, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ s(vt, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
|
|
669
669
|
}
|
|
670
670
|
const mn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
|
|
671
671
|
function fn(n) {
|
|
@@ -678,7 +678,7 @@ function fn(n) {
|
|
|
678
678
|
body: n
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
const pn = "UPLOAD_FILE", _n = "OPEN_CONTEXT", hn = "RUN_PROMPT", gn = "UPDATE_FORMAT", xn = "UPDATE_BEHAVIOR", En = "INSERT_PROMPT", bn = "RENAME_PROMPT", yn = "DUPLICATE_PROMPT",
|
|
681
|
+
const pn = "UPLOAD_FILE", _n = "OPEN_CONTEXT", hn = "RUN_PROMPT", gn = "UPDATE_FORMAT", xn = "UPDATE_BEHAVIOR", En = "INSERT_PROMPT", bn = "RENAME_PROMPT", yn = "DUPLICATE_PROMPT", Sn = "DELETE_PROMPT", Tn = "DELETE_REFERENCES", Rn = "RENAME_REFERENCES", Nn = "INSERT_REFERENCE", Cn = "INSERT_BLOCK";
|
|
682
682
|
k(pn);
|
|
683
683
|
k(_n);
|
|
684
684
|
k(hn);
|
|
@@ -687,10 +687,10 @@ k(xn);
|
|
|
687
687
|
k(En);
|
|
688
688
|
k(bn);
|
|
689
689
|
k(yn);
|
|
690
|
-
k(Tn);
|
|
691
690
|
k(Sn);
|
|
691
|
+
k(Tn);
|
|
692
692
|
k(Rn);
|
|
693
|
-
const
|
|
693
|
+
const Ve = k(Nn), On = k(Cn), kn = "INSERT_NEW_FILE_PLACEHOLDER", $n = "INSERT_NEW_TEXT_PLACEHOLDER", In = "INSERT_PLACEHOLDER_REFERENCE";
|
|
694
694
|
k(kn);
|
|
695
695
|
k($n);
|
|
696
696
|
k(In);
|
|
@@ -709,7 +709,7 @@ class Y extends $e {
|
|
|
709
709
|
}
|
|
710
710
|
createDOM(e) {
|
|
711
711
|
const t = document.createElement("blockquote");
|
|
712
|
-
return
|
|
712
|
+
return Ae(t, e.theme.comment), t;
|
|
713
713
|
}
|
|
714
714
|
updateDOM() {
|
|
715
715
|
return !1;
|
|
@@ -726,7 +726,7 @@ class Y extends $e {
|
|
|
726
726
|
const {
|
|
727
727
|
element: t
|
|
728
728
|
} = super.exportDOM(e);
|
|
729
|
-
if (t &&
|
|
729
|
+
if (t && at(t)) {
|
|
730
730
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
731
731
|
const r = this.getFormatType();
|
|
732
732
|
t.style.textAlign = r;
|
|
@@ -766,17 +766,17 @@ function te() {
|
|
|
766
766
|
return new Y();
|
|
767
767
|
}
|
|
768
768
|
const wn = (n, e) => {
|
|
769
|
-
const t =
|
|
769
|
+
const t = dt(), r = te();
|
|
770
770
|
if (e) {
|
|
771
771
|
e.getParent()?.replace(r, !0), e.remove(), r.selectEnd();
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
|
-
|
|
774
|
+
ut(t) && Tt(t, te);
|
|
775
775
|
};
|
|
776
776
|
function Pn() {
|
|
777
777
|
const n = C(3), [e] = L();
|
|
778
778
|
let t, r;
|
|
779
|
-
return n[0] !== e ? (t = () => de(e.registerCommand(On, Ln, ve)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
779
|
+
return n[0] !== e ? (t = () => de(e.registerCommand(On, Ln, ve)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), F(t, r), null;
|
|
780
780
|
}
|
|
781
781
|
function Ln(n) {
|
|
782
782
|
const {
|
|
@@ -789,11 +789,11 @@ const Mn = () => {
|
|
|
789
789
|
const n = C(3), [e] = L();
|
|
790
790
|
let t, r;
|
|
791
791
|
n[0] !== e ? (t = () => de(e.registerNodeTransform(Y, (o) => {
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
|
|
792
|
+
const l = o.getChildren().filter(Dn);
|
|
793
|
+
l.length > 0 && e.update(() => {
|
|
794
|
+
l.forEach(An);
|
|
795
795
|
});
|
|
796
|
-
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
796
|
+
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), F(t, r);
|
|
797
797
|
};
|
|
798
798
|
function Dn(n) {
|
|
799
799
|
return n.getType() === "comment";
|
|
@@ -809,11 +809,11 @@ const qn = (n) => {
|
|
|
809
809
|
const t = n.getChildren(), r = t.length;
|
|
810
810
|
for (let o = 0; o < r; o++) {
|
|
811
811
|
const i = t[o];
|
|
812
|
-
e += i.getTextContent(),
|
|
812
|
+
e += i.getTextContent(), mt(i) && o !== r - 1 && !i.isInline() && (e += `
|
|
813
813
|
`);
|
|
814
814
|
}
|
|
815
815
|
return e;
|
|
816
|
-
}, Hn = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, jn = (n) => n.type === "paragraph" && !!n.children?.length,
|
|
816
|
+
}, Hn = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, jn = (n) => n.type === "paragraph" && !!n.children?.length, Xe = (n) => {
|
|
817
817
|
if (n.type === "comment")
|
|
818
818
|
return "";
|
|
819
819
|
const e = Hn(n);
|
|
@@ -824,20 +824,20 @@ const qn = (n) => {
|
|
|
824
824
|
if (!Array.isArray(r)) return t;
|
|
825
825
|
const o = r.length;
|
|
826
826
|
for (let i = 0; i < o; i += 1) {
|
|
827
|
-
const
|
|
828
|
-
if (
|
|
827
|
+
const l = r[i];
|
|
828
|
+
if (l.type === "comment") {
|
|
829
829
|
i !== o - 1 && (t += `
|
|
830
830
|
`);
|
|
831
831
|
continue;
|
|
832
832
|
}
|
|
833
|
-
t +=
|
|
833
|
+
t += Xe(l), jn(l) && (t += `
|
|
834
834
|
`);
|
|
835
835
|
}
|
|
836
836
|
return t;
|
|
837
|
-
},
|
|
837
|
+
}, Ge = (n) => {
|
|
838
838
|
try {
|
|
839
839
|
const e = JSON.parse(n);
|
|
840
|
-
return
|
|
840
|
+
return Xe(e.root ?? {});
|
|
841
841
|
} catch {
|
|
842
842
|
return "";
|
|
843
843
|
}
|
|
@@ -892,15 +892,15 @@ function Jn(n) {
|
|
|
892
892
|
editorRef: t,
|
|
893
893
|
previousTextRef: r
|
|
894
894
|
} = n, [o] = L();
|
|
895
|
-
let i,
|
|
895
|
+
let i, l;
|
|
896
896
|
return e[0] !== o || e[1] !== r ? (i = () => ({
|
|
897
897
|
setEditorValue: (a) => {
|
|
898
898
|
const c = o.parseEditorState(JSON.stringify(Un(a)));
|
|
899
|
-
o.setEditorState(c), r.current =
|
|
899
|
+
o.setEditorState(c), r.current = Ge(a), o.focus(void 0, {
|
|
900
900
|
defaultSelection: "rootEnd"
|
|
901
901
|
});
|
|
902
902
|
}
|
|
903
|
-
}),
|
|
903
|
+
}), l = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = l) : (i = e[2], l = e[3]), Et(t, i, l), null;
|
|
904
904
|
}
|
|
905
905
|
const Wn = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
|
|
906
906
|
function zn(n) {
|
|
@@ -908,7 +908,7 @@ function zn(n) {
|
|
|
908
908
|
onSubmit: t
|
|
909
909
|
} = n, [r] = L();
|
|
910
910
|
let o, i;
|
|
911
|
-
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(
|
|
911
|
+
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(ft, (l) => Wn(l) ? (l.preventDefault(), t?.(), !0) : !1, pt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), F(o, i), null;
|
|
912
912
|
}
|
|
913
913
|
const Ee = ["table", "connector"], Kn = (n) => n.sort((r, o) => Ee.indexOf(r.group) - Ee.indexOf(o.group)).map((r, o) => ({
|
|
914
914
|
...r,
|
|
@@ -923,27 +923,27 @@ function be(n) {
|
|
|
923
923
|
isSelected: r,
|
|
924
924
|
onClick: o,
|
|
925
925
|
onMouseEnter: i,
|
|
926
|
-
setRefElement:
|
|
926
|
+
setRefElement: l,
|
|
927
927
|
secondaryLabel: a,
|
|
928
928
|
primaryLabel: c,
|
|
929
929
|
tabIndex: d
|
|
930
|
-
} = n,
|
|
931
|
-
let
|
|
932
|
-
e[0] !== c ? (
|
|
930
|
+
} = n, h = d === void 0 ? -1 : d, f = r ? "bg.muted" : "transparent";
|
|
931
|
+
let _;
|
|
932
|
+
e[0] !== c ? (_ = /* @__PURE__ */ s(Z.Trigger, { children: /* @__PURE__ */ s(I, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: c }) }), e[0] = c, e[1] = _) : _ = e[1];
|
|
933
|
+
let u;
|
|
934
|
+
e[2] !== c ? (u = /* @__PURE__ */ s(Z.Positioner, { children: /* @__PURE__ */ s(Z.Content, { children: c }) }), e[2] = c, e[3] = u) : u = e[3];
|
|
933
935
|
let m;
|
|
934
|
-
e[
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
m
|
|
939
|
-
] }), e[4] = h, e[5] = m, e[6] = f) : f = e[6];
|
|
936
|
+
e[4] !== _ || e[5] !== u ? (m = /* @__PURE__ */ P(Z.Root, { children: [
|
|
937
|
+
_,
|
|
938
|
+
u
|
|
939
|
+
] }), e[4] = _, e[5] = u, e[6] = m) : m = e[6];
|
|
940
940
|
let g;
|
|
941
|
-
e[7] !== a ? (g = a && /* @__PURE__ */
|
|
941
|
+
e[7] !== a ? (g = a && /* @__PURE__ */ s(I, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: a }), e[7] = a, e[8] = g) : g = e[8];
|
|
942
942
|
let y;
|
|
943
|
-
return e[9] !== t || e[10] !== r || e[11] !== o || e[12] !== i || e[13] !==
|
|
944
|
-
|
|
943
|
+
return e[9] !== t || e[10] !== r || e[11] !== o || e[12] !== i || e[13] !== l || e[14] !== f || e[15] !== m || e[16] !== g || e[17] !== h ? (y = /* @__PURE__ */ P(V, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: f, tabIndex: h, ref: l, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
|
|
944
|
+
m,
|
|
945
945
|
g
|
|
946
|
-
] }), e[9] = t, e[10] = r, e[11] = o, e[12] = i, e[13] =
|
|
946
|
+
] }), e[9] = t, e[10] = r, e[11] = o, e[12] = i, e[13] = l, e[14] = f, e[15] = m, e[16] = g, e[17] = h, e[18] = y) : y = e[18], y;
|
|
947
947
|
}
|
|
948
948
|
const Vn = (n) => {
|
|
949
949
|
const e = C(12), {
|
|
@@ -952,75 +952,55 @@ const Vn = (n) => {
|
|
|
952
952
|
onSelectItem: o,
|
|
953
953
|
onMouseEnterItem: i
|
|
954
954
|
} = n, {
|
|
955
|
-
table:
|
|
955
|
+
table: l,
|
|
956
956
|
connector: a
|
|
957
|
-
} = Kn(t), c =
|
|
958
|
-
let
|
|
959
|
-
e[0] !== r ? (
|
|
957
|
+
} = Kn(t), c = l === void 0 ? [] : l, d = a === void 0 ? [] : a, h = [...c, ...d].length;
|
|
958
|
+
let f, _;
|
|
959
|
+
e[0] !== r ? (f = () => {
|
|
960
960
|
document.getElementById(`typeahead-item-${r}`)?.scrollIntoView({
|
|
961
961
|
behavior: "instant",
|
|
962
962
|
block: "nearest"
|
|
963
963
|
});
|
|
964
|
-
},
|
|
965
|
-
const
|
|
966
|
-
let
|
|
967
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
964
|
+
}, _ = [r], e[0] = r, e[1] = f, e[2] = _) : (f = e[1], _ = e[2]), F(f, _);
|
|
965
|
+
const u = v, m = "1000", g = "absolute", y = "modal", E = "auto", R = "24rem";
|
|
966
|
+
let S;
|
|
967
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
968
968
|
base: "100vw",
|
|
969
969
|
md: "264px"
|
|
970
|
-
}, e[3] =
|
|
971
|
-
let
|
|
972
|
-
e[4] !==
|
|
970
|
+
}, e[3] = S) : S = e[3];
|
|
971
|
+
let T;
|
|
972
|
+
e[4] !== h ? (T = !h && /* @__PURE__ */ s(I, { children: "No results" }), e[4] = h, e[5] = T) : T = e[5];
|
|
973
973
|
const x = !!c.length && /* @__PURE__ */ P(pe, { children: [
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ s(I, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
|
|
975
|
+
/* @__PURE__ */ s(v, { children: c.map((p) => /* @__PURE__ */ s(be, { id: `typeahead-item-${p.index}`, isSelected: r === p.index, onClick: () => o(p, p.index), onMouseEnter: () => i(p.index), primaryLabel: p.name, secondaryLabel: p.description, setRefElement: p.setRefElement, tabIndex: -1 }, p.id)) })
|
|
976
976
|
] }), N = !!d.length && /* @__PURE__ */ P(pe, { children: [
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ s(I, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
|
|
978
|
+
/* @__PURE__ */ s(v, { children: d.map((p) => /* @__PURE__ */ s(be, { id: `typeahead-item-${p.index}`, isSelected: r === p.index, onClick: () => o(p, p.index), onMouseEnter: () => i(p.index), primaryLabel: p.name, secondaryLabel: p.description, setRefElement: p.setRefElement, tabIndex: -1 }, p.id)) })
|
|
979
979
|
] });
|
|
980
980
|
let b;
|
|
981
|
-
return e[6] !==
|
|
982
|
-
|
|
981
|
+
return e[6] !== u || e[7] !== T || e[8] !== x || e[9] !== N || e[10] !== S ? (b = /* @__PURE__ */ P(u, { zIndex: m, position: g, layerStyle: y, overflow: E, maxHeight: R, minWidth: S, children: [
|
|
982
|
+
T,
|
|
983
983
|
x,
|
|
984
984
|
N
|
|
985
|
-
] }), e[6] =
|
|
985
|
+
] }), e[6] = u, e[7] = T, e[8] = x, e[9] = N, e[10] = S, e[11] = b) : b = e[11], b;
|
|
986
986
|
}, Xn = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
|
|
987
|
-
function Gn(n, e) {
|
|
988
|
-
const t =
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
t[3] !== o ? (c = o.map(Yn), t[3] = o, t[4] = c) : c = t[4];
|
|
997
|
-
const d = c;
|
|
998
|
-
let p, u;
|
|
999
|
-
return t[5] !== d || t[6] !== n ? (p = () => {
|
|
1000
|
-
if (n == null || n === "") {
|
|
1001
|
-
a(d);
|
|
1002
|
-
return;
|
|
987
|
+
function Gn(n, e = []) {
|
|
988
|
+
const t = e.map((r, o) => ({
|
|
989
|
+
id: r.resourceId,
|
|
990
|
+
key: r.resourceId,
|
|
991
|
+
index: o,
|
|
992
|
+
group: r.resourceType,
|
|
993
|
+
name: r.name,
|
|
994
|
+
description: r.description,
|
|
995
|
+
setRefElement: () => {
|
|
1003
996
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}
|
|
1007
|
-
function Yn(n, e) {
|
|
1008
|
-
return {
|
|
1009
|
-
id: n.resourceId,
|
|
1010
|
-
key: n.resourceId,
|
|
1011
|
-
index: e,
|
|
1012
|
-
group: n.resourceType,
|
|
1013
|
-
name: n.name,
|
|
1014
|
-
description: n.description,
|
|
1015
|
-
setRefElement: Qn
|
|
1016
|
-
};
|
|
997
|
+
}));
|
|
998
|
+
return n == null || n === "" ? t : Xn(t, n);
|
|
1017
999
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
let t = er.exec(n);
|
|
1023
|
-
if (t === null && (t = tr.exec(n)), t !== null) {
|
|
1000
|
+
const Ye = "\\.\\-<>_:", me = ["#"].join(""), Qe = `[^${me}${Ye}\\s]`, Yn = `(?:[${Ye}]|)`, Ze = 75, Qn = new RegExp(`(^|\\s|\\()([${me}]((?:${Qe}${Yn}){0,${Ze}}))$`), Zn = new RegExp(`(^|\\s|\\()([${me}]((?:${Qe}){0,${Ze}}))$`);
|
|
1001
|
+
function er(n, e) {
|
|
1002
|
+
let t = Qn.exec(n);
|
|
1003
|
+
if (t === null && (t = Zn.exec(n)), t !== null) {
|
|
1024
1004
|
const r = t[1], o = t[3];
|
|
1025
1005
|
if (o.length >= e)
|
|
1026
1006
|
return {
|
|
@@ -1031,18 +1011,18 @@ function nr(n, e) {
|
|
|
1031
1011
|
}
|
|
1032
1012
|
return null;
|
|
1033
1013
|
}
|
|
1034
|
-
const
|
|
1035
|
-
function
|
|
1014
|
+
const tr = 20;
|
|
1015
|
+
function nr(n) {
|
|
1036
1016
|
const e = C(9), {
|
|
1037
1017
|
items: t
|
|
1038
1018
|
} = n;
|
|
1039
1019
|
let r;
|
|
1040
1020
|
e[0] !== t ? (r = t === void 0 ? [] : t, e[0] = t, e[1] = r) : r = e[1];
|
|
1041
|
-
const o = r, [i,
|
|
1021
|
+
const o = r, [i, l] = bt(null), [a] = L(), c = Gn(i, o);
|
|
1042
1022
|
let d;
|
|
1043
1023
|
e[2] !== a ? (d = (g, y, E) => {
|
|
1044
1024
|
a.update(() => {
|
|
1045
|
-
y && (a.dispatchCommand(
|
|
1025
|
+
y && (a.dispatchCommand(Ve, {
|
|
1046
1026
|
resourceId: g.id,
|
|
1047
1027
|
resourceType: g.group,
|
|
1048
1028
|
name: g.name,
|
|
@@ -1050,28 +1030,28 @@ function or(n) {
|
|
|
1050
1030
|
}), E());
|
|
1051
1031
|
});
|
|
1052
1032
|
}, e[2] = a, e[3] = d) : d = e[3];
|
|
1053
|
-
const
|
|
1054
|
-
let
|
|
1055
|
-
e[4] !== c ? (
|
|
1056
|
-
const
|
|
1057
|
-
let
|
|
1058
|
-
return e[6] !==
|
|
1033
|
+
const h = d, f = or;
|
|
1034
|
+
let _;
|
|
1035
|
+
e[4] !== c ? (_ = c.slice(0, tr), e[4] = c, e[5] = _) : _ = e[5];
|
|
1036
|
+
const u = _;
|
|
1037
|
+
let m;
|
|
1038
|
+
return e[6] !== u || e[7] !== h ? (m = /* @__PURE__ */ s(Rt, { onQueryChange: l, onSelectOption: h, triggerFn: f, options: u, menuRenderFn: rr }), e[6] = u, e[7] = h, e[8] = m) : m = e[8], m;
|
|
1059
1039
|
}
|
|
1060
|
-
function
|
|
1040
|
+
function rr(n, e) {
|
|
1061
1041
|
const {
|
|
1062
1042
|
options: t,
|
|
1063
1043
|
selectedIndex: r,
|
|
1064
1044
|
selectOptionAndCleanUp: o,
|
|
1065
1045
|
setHighlightedIndex: i
|
|
1066
1046
|
} = e;
|
|
1067
|
-
return n.current ? Nt.createPortal(/* @__PURE__ */
|
|
1068
|
-
i(a), o(
|
|
1069
|
-
}, onMouseEnterItem: (
|
|
1070
|
-
i(
|
|
1047
|
+
return n.current ? Nt.createPortal(/* @__PURE__ */ s(Vn, { options: t, selectedIndex: r, onSelectItem: (l, a) => {
|
|
1048
|
+
i(a), o(l);
|
|
1049
|
+
}, onMouseEnterItem: (l) => {
|
|
1050
|
+
i(l);
|
|
1071
1051
|
} }), n.current) : null;
|
|
1072
1052
|
}
|
|
1073
|
-
function
|
|
1074
|
-
return
|
|
1053
|
+
function or(n) {
|
|
1054
|
+
return er(n, 0);
|
|
1075
1055
|
}
|
|
1076
1056
|
class X extends ee {
|
|
1077
1057
|
__referenceId;
|
|
@@ -1099,7 +1079,7 @@ class X extends ee {
|
|
|
1099
1079
|
}
|
|
1100
1080
|
createDOM(e) {
|
|
1101
1081
|
const t = document.createElement("span");
|
|
1102
|
-
return
|
|
1082
|
+
return Ae(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
|
|
1103
1083
|
}
|
|
1104
1084
|
updateDOM(e, t) {
|
|
1105
1085
|
return (e.__name !== this.__name || e.__referenceId !== this.__referenceId) && (t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`), !1;
|
|
@@ -1125,127 +1105,127 @@ class X extends ee {
|
|
|
1125
1105
|
return `#${this.__name}`;
|
|
1126
1106
|
}
|
|
1127
1107
|
}
|
|
1128
|
-
function
|
|
1108
|
+
function ir(n, e) {
|
|
1129
1109
|
return new X(n, e);
|
|
1130
1110
|
}
|
|
1131
|
-
const
|
|
1132
|
-
const r =
|
|
1111
|
+
const sr = (n, e, t) => {
|
|
1112
|
+
const r = ir(e, t);
|
|
1133
1113
|
if (n) {
|
|
1134
1114
|
n?.replace(r), n.remove(), r.selectEnd();
|
|
1135
1115
|
return;
|
|
1136
1116
|
}
|
|
1137
1117
|
};
|
|
1138
|
-
function
|
|
1118
|
+
function lr(n) {
|
|
1139
1119
|
const e = C(4), {
|
|
1140
1120
|
onAddReference: t
|
|
1141
1121
|
} = n, [r] = L();
|
|
1142
1122
|
let o, i;
|
|
1143
|
-
return e[0] !== r || e[1] !== t ? (o = () => de(r.registerCommand(
|
|
1123
|
+
return e[0] !== r || e[1] !== t ? (o = () => de(r.registerCommand(Ve, (l) => {
|
|
1144
1124
|
const {
|
|
1145
1125
|
resourceId: a,
|
|
1146
1126
|
resourceType: c,
|
|
1147
1127
|
name: d,
|
|
1148
|
-
nodeToReplace:
|
|
1149
|
-
} =
|
|
1128
|
+
nodeToReplace: h
|
|
1129
|
+
} = l;
|
|
1150
1130
|
return r.update(() => {
|
|
1151
|
-
|
|
1131
|
+
sr(h, a, d);
|
|
1152
1132
|
}), t?.(a, c), !0;
|
|
1153
|
-
}, ve)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]),
|
|
1133
|
+
}, ve)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), F(o, i), null;
|
|
1154
1134
|
}
|
|
1155
|
-
const
|
|
1135
|
+
const cr = {
|
|
1156
1136
|
...ue,
|
|
1157
1137
|
// Override paragraph class to remove margins specifically for prompt input
|
|
1158
1138
|
paragraph: "rich-text__p rich-text__p--no-margin"
|
|
1159
|
-
},
|
|
1139
|
+
}, ar = [Y, _t, X], dr = (n, e) => {
|
|
1160
1140
|
const t = C(39), {
|
|
1161
1141
|
defaultState: r,
|
|
1162
1142
|
debug: o,
|
|
1163
1143
|
isEditable: i,
|
|
1164
|
-
placeholder:
|
|
1144
|
+
placeholder: l
|
|
1165
1145
|
} = n, a = o === void 0 ? !1 : o, c = i === void 0 ? !0 : i, {
|
|
1166
1146
|
onChange: d,
|
|
1167
|
-
onError:
|
|
1168
|
-
onSubmit:
|
|
1169
|
-
references:
|
|
1170
|
-
onAddReference:
|
|
1171
|
-
} = n,
|
|
1147
|
+
onError: h,
|
|
1148
|
+
onSubmit: f,
|
|
1149
|
+
references: _,
|
|
1150
|
+
onAddReference: u
|
|
1151
|
+
} = n, m = h === void 0 ? ur : h;
|
|
1172
1152
|
let g;
|
|
1173
|
-
t[0] !==
|
|
1153
|
+
t[0] !== _ ? (g = _ === void 0 ? [] : _, t[0] = _, t[1] = g) : g = t[1];
|
|
1174
1154
|
const y = g;
|
|
1175
1155
|
let E;
|
|
1176
|
-
t[2] !== r || t[3] !== c || t[4] !==
|
|
1156
|
+
t[2] !== r || t[3] !== c || t[4] !== m ? (E = {
|
|
1177
1157
|
namespace: "PROMPT_EDITOR",
|
|
1178
|
-
nodes:
|
|
1158
|
+
nodes: ar,
|
|
1179
1159
|
editorState: r,
|
|
1180
1160
|
editable: c,
|
|
1181
|
-
onError:
|
|
1182
|
-
theme:
|
|
1183
|
-
}, t[2] = r, t[3] = c, t[4] =
|
|
1161
|
+
onError: m,
|
|
1162
|
+
theme: cr
|
|
1163
|
+
}, t[2] = r, t[3] = c, t[4] = m, t[5] = E) : E = t[5];
|
|
1184
1164
|
const R = E;
|
|
1185
|
-
let
|
|
1186
|
-
t[6] !== r ? (
|
|
1187
|
-
const
|
|
1165
|
+
let S;
|
|
1166
|
+
t[6] !== r ? (S = Ge(r), t[6] = r, t[7] = S) : S = t[7];
|
|
1167
|
+
const T = St(S);
|
|
1188
1168
|
let x;
|
|
1189
|
-
t[8] !==
|
|
1169
|
+
t[8] !== l ? (x = l ?? /* @__PURE__ */ P(I, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
|
|
1190
1170
|
"Type your query here or press ",
|
|
1191
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ s(st, { color: "fg.subtle", children: "#" }),
|
|
1192
1172
|
" to add a reference."
|
|
1193
|
-
] }), t[8] =
|
|
1173
|
+
] }), t[8] = l, t[9] = x) : x = t[9];
|
|
1194
1174
|
const N = x;
|
|
1195
1175
|
let b;
|
|
1196
|
-
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */
|
|
1197
|
-
let
|
|
1198
|
-
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1176
|
+
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ s(ht, {}), t[10] = b) : b = t[10];
|
|
1177
|
+
let p;
|
|
1178
|
+
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ s(Fe, { fullWidth: !0 }), t[11] = p) : p = t[11];
|
|
1199
1179
|
let O;
|
|
1200
|
-
t[12] !== N ? (O = /* @__PURE__ */
|
|
1180
|
+
t[12] !== N ? (O = /* @__PURE__ */ s(De, { contentEditable: p, placeholder: N, ErrorBoundary: Le }), t[12] = N, t[13] = O) : O = t[13];
|
|
1201
1181
|
let $;
|
|
1202
|
-
t[14] !== d ? ($ = /* @__PURE__ */
|
|
1182
|
+
t[14] !== d ? ($ = /* @__PURE__ */ s(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (fe) => {
|
|
1203
1183
|
fe.read(() => {
|
|
1204
|
-
const
|
|
1205
|
-
oe !==
|
|
1184
|
+
const tt = we(), oe = qn(tt);
|
|
1185
|
+
oe !== T.current && (T.current = oe, d?.(oe, fe.toJSON()));
|
|
1206
1186
|
});
|
|
1207
1187
|
} }), t[14] = d, t[15] = $) : $ = t[15];
|
|
1208
1188
|
let w;
|
|
1209
|
-
t[16] !== e ? (w = /* @__PURE__ */
|
|
1210
|
-
let
|
|
1211
|
-
t[18] !== c ? (
|
|
1189
|
+
t[16] !== e ? (w = /* @__PURE__ */ s(Jn, { editorRef: e, previousTextRef: T }), t[16] = e, t[17] = w) : w = t[17];
|
|
1190
|
+
let M;
|
|
1191
|
+
t[18] !== c ? (M = /* @__PURE__ */ s(ze, { isEditable: c }), t[18] = c, t[19] = M) : M = t[19];
|
|
1212
1192
|
let U;
|
|
1213
|
-
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */
|
|
1214
|
-
let
|
|
1215
|
-
t[21] !==
|
|
1193
|
+
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ s(Fn, {}), t[20] = U) : U = t[20];
|
|
1194
|
+
let D;
|
|
1195
|
+
t[21] !== f ? (D = /* @__PURE__ */ s(zn, { onSubmit: f }), t[21] = f, t[22] = D) : D = t[22];
|
|
1216
1196
|
let J;
|
|
1217
|
-
t[23] !== y ? (J = /* @__PURE__ */
|
|
1197
|
+
t[23] !== y ? (J = /* @__PURE__ */ s(nr, { items: y }), t[23] = y, t[24] = J) : J = t[24];
|
|
1218
1198
|
let W;
|
|
1219
|
-
t[25] !==
|
|
1199
|
+
t[25] !== u ? (W = /* @__PURE__ */ s(lr, { onAddReference: u }), t[25] = u, t[26] = W) : W = t[26];
|
|
1220
1200
|
let z;
|
|
1221
|
-
t[27] !== a ? (z = a ? /* @__PURE__ */
|
|
1201
|
+
t[27] !== a ? (z = a ? /* @__PURE__ */ s(Ke, {}) : "", t[27] = a, t[28] = z) : z = t[28];
|
|
1222
1202
|
let Q;
|
|
1223
|
-
return t[29] !== R || t[30] !== O || t[31] !== $ || t[32] !== w || t[33] !==
|
|
1203
|
+
return t[29] !== R || t[30] !== O || t[31] !== $ || t[32] !== w || t[33] !== M || t[34] !== D || t[35] !== J || t[36] !== W || t[37] !== z ? (Q = /* @__PURE__ */ s(V, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ P(Pe, { initialConfig: R, children: [
|
|
1224
1204
|
b,
|
|
1225
1205
|
O,
|
|
1226
1206
|
$,
|
|
1227
1207
|
w,
|
|
1228
|
-
|
|
1208
|
+
M,
|
|
1229
1209
|
U,
|
|
1230
|
-
|
|
1210
|
+
D,
|
|
1231
1211
|
J,
|
|
1232
1212
|
W,
|
|
1233
1213
|
z
|
|
1234
|
-
] }) }), t[29] = R, t[30] = O, t[31] = $, t[32] = w, t[33] =
|
|
1235
|
-
},
|
|
1236
|
-
function
|
|
1214
|
+
] }) }), t[29] = R, t[30] = O, t[31] = $, t[32] = w, t[33] = M, t[34] = D, t[35] = J, t[36] = W, t[37] = z, t[38] = Q) : Q = t[38], Q;
|
|
1215
|
+
}, Vr = yt(dr);
|
|
1216
|
+
function ur() {
|
|
1237
1217
|
}
|
|
1238
|
-
function
|
|
1218
|
+
function mr(n) {
|
|
1239
1219
|
const e = C(5), {
|
|
1240
1220
|
value: t,
|
|
1241
1221
|
onUpdate: r
|
|
1242
1222
|
} = n, [o] = L();
|
|
1243
|
-
let i,
|
|
1223
|
+
let i, l;
|
|
1244
1224
|
return e[0] !== o || e[1] !== r || e[2] !== t ? (i = () => {
|
|
1245
1225
|
o && o.update(() => r(t), {
|
|
1246
1226
|
tag: "history-merge"
|
|
1247
1227
|
});
|
|
1248
|
-
},
|
|
1228
|
+
}, l = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = l) : (i = e[3], l = e[4]), F(i, l), null;
|
|
1249
1229
|
}
|
|
1250
1230
|
class j extends G {
|
|
1251
1231
|
__href;
|
|
@@ -1277,12 +1257,12 @@ class j extends G {
|
|
|
1277
1257
|
};
|
|
1278
1258
|
}
|
|
1279
1259
|
static importJSON(e) {
|
|
1280
|
-
return
|
|
1260
|
+
return et(e.href, e.label);
|
|
1281
1261
|
}
|
|
1282
1262
|
decorate(e, t) {
|
|
1283
|
-
const r = this.__href, i = r.split("/").pop() || "unknown",
|
|
1284
|
-
return /* @__PURE__ */
|
|
1285
|
-
if (
|
|
1263
|
+
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), a = /^#?\$PROJECT\//i.test(r);
|
|
1264
|
+
return /* @__PURE__ */ s(v, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(qe, { fileName: i, onSelect: () => {
|
|
1265
|
+
if (l)
|
|
1286
1266
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
1287
1267
|
else if (a) {
|
|
1288
1268
|
const c = r.replace(/^#?\$PROJECT\//i, ""), d = new CustomEvent("ui:open-project-file", {
|
|
@@ -1294,16 +1274,16 @@ class j extends G {
|
|
|
1294
1274
|
} }) });
|
|
1295
1275
|
}
|
|
1296
1276
|
}
|
|
1297
|
-
function
|
|
1277
|
+
function et(n, e) {
|
|
1298
1278
|
return new j(n, e);
|
|
1299
1279
|
}
|
|
1300
|
-
function
|
|
1280
|
+
function fr(n) {
|
|
1301
1281
|
return n instanceof j;
|
|
1302
1282
|
}
|
|
1303
|
-
const ye = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/,
|
|
1283
|
+
const ye = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, pr = {
|
|
1304
1284
|
dependencies: [j],
|
|
1305
1285
|
export: (n) => {
|
|
1306
|
-
if (
|
|
1286
|
+
if (fr(n)) {
|
|
1307
1287
|
const e = n.__href, t = n.__label ?? e;
|
|
1308
1288
|
return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
|
|
1309
1289
|
}
|
|
@@ -1313,90 +1293,90 @@ const ye = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, hr = {
|
|
|
1313
1293
|
importRegExp: ye,
|
|
1314
1294
|
replace: (n, e) => {
|
|
1315
1295
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
1316
|
-
n.replace(
|
|
1296
|
+
n.replace(et(o, i));
|
|
1317
1297
|
},
|
|
1318
1298
|
type: "text-match"
|
|
1319
|
-
}, ce = [...Ne, ...
|
|
1320
|
-
function
|
|
1299
|
+
}, ce = [...Ne, ...We, Be, Ue, pr];
|
|
1300
|
+
function Xr(n) {
|
|
1321
1301
|
const e = C(30), {
|
|
1322
1302
|
debug: t,
|
|
1323
1303
|
defaultState: r,
|
|
1324
1304
|
isEditable: o,
|
|
1325
1305
|
onChange: i
|
|
1326
|
-
} = n,
|
|
1306
|
+
} = n, l = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, c = o === void 0 ? !1 : o;
|
|
1327
1307
|
let d;
|
|
1328
1308
|
e[0] !== a ? (d = fn(a), e[0] = a, e[1] = d) : d = e[1];
|
|
1329
1309
|
const {
|
|
1330
|
-
frontmatter:
|
|
1331
|
-
body:
|
|
1332
|
-
} = d,
|
|
1310
|
+
frontmatter: h,
|
|
1311
|
+
body: f
|
|
1312
|
+
} = d, _ = c && !!i;
|
|
1313
|
+
let u;
|
|
1314
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = [Oe, Se, H, ke, Te, Re, ae, K, q, B, j], e[2] = u) : u = e[2];
|
|
1333
1315
|
let m;
|
|
1334
|
-
e[
|
|
1335
|
-
let f;
|
|
1336
|
-
e[3] !== u ? (f = () => Ce(u, ce, void 0, !1), e[3] = u, e[4] = f) : f = e[4];
|
|
1316
|
+
e[3] !== f ? (m = () => Ce(f, ce, void 0, !1), e[3] = f, e[4] = m) : m = e[4];
|
|
1337
1317
|
let g;
|
|
1338
|
-
e[5] !== c || e[6] !==
|
|
1318
|
+
e[5] !== c || e[6] !== m ? (g = {
|
|
1339
1319
|
namespace: "RICH_MESSAGE",
|
|
1340
|
-
nodes:
|
|
1341
|
-
editorState:
|
|
1342
|
-
onError:
|
|
1320
|
+
nodes: u,
|
|
1321
|
+
editorState: m,
|
|
1322
|
+
onError: hr,
|
|
1343
1323
|
editable: c,
|
|
1344
1324
|
theme: ue
|
|
1345
|
-
}, e[5] = c, e[6] =
|
|
1325
|
+
}, e[5] = c, e[6] = m, e[7] = g) : g = e[7];
|
|
1346
1326
|
const y = g;
|
|
1347
1327
|
let E;
|
|
1348
|
-
e[8] !==
|
|
1349
|
-
let R,
|
|
1350
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */
|
|
1328
|
+
e[8] !== f ? (E = /* @__PURE__ */ s(mr, { value: f, onUpdate: _r }), e[8] = f, e[9] = E) : E = e[9];
|
|
1329
|
+
let R, S, T, x, N;
|
|
1330
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ s(Ot, {}), N = /* @__PURE__ */ s(kt, {}), R = /* @__PURE__ */ s(Ct, {}), S = /* @__PURE__ */ s(dn, {}), T = /* @__PURE__ */ s(rn, {}), e[10] = R, e[11] = S, e[12] = T, e[13] = x, e[14] = N) : (R = e[10], S = e[11], T = e[12], x = e[13], N = e[14]);
|
|
1351
1331
|
let b;
|
|
1352
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */
|
|
1353
|
-
let
|
|
1354
|
-
e[16] !==
|
|
1355
|
-
|
|
1356
|
-
const U = we(),
|
|
1357
|
-
i?.(
|
|
1332
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ s(De, { contentEditable: /* @__PURE__ */ s(Fe, { fullWidth: !1 }), ErrorBoundary: Le }), e[15] = b) : b = e[15];
|
|
1333
|
+
let p;
|
|
1334
|
+
e[16] !== h || e[17] !== i || e[18] !== _ ? (p = _ ? /* @__PURE__ */ s(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (M) => {
|
|
1335
|
+
M.read(() => {
|
|
1336
|
+
const U = we(), D = nt(ce, U);
|
|
1337
|
+
i?.(h + D);
|
|
1358
1338
|
});
|
|
1359
|
-
} }) : null, e[16] =
|
|
1339
|
+
} }) : null, e[16] = h, e[17] = i, e[18] = _, e[19] = p) : p = e[19];
|
|
1360
1340
|
let O;
|
|
1361
|
-
e[20] !== c ? (O = /* @__PURE__ */
|
|
1341
|
+
e[20] !== c ? (O = /* @__PURE__ */ s(ze, { isEditable: c }), e[20] = c, e[21] = O) : O = e[21];
|
|
1362
1342
|
let $;
|
|
1363
|
-
e[22] !==
|
|
1343
|
+
e[22] !== l ? ($ = l && /* @__PURE__ */ s(Ke, {}), e[22] = l, e[23] = $) : $ = e[23];
|
|
1364
1344
|
let w;
|
|
1365
|
-
return e[24] !== y || e[25] !==
|
|
1345
|
+
return e[24] !== y || e[25] !== p || e[26] !== O || e[27] !== $ || e[28] !== E ? (w = /* @__PURE__ */ s(V, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ P(Pe, { initialConfig: y, children: [
|
|
1366
1346
|
E,
|
|
1367
1347
|
x,
|
|
1368
1348
|
N,
|
|
1369
1349
|
R,
|
|
1370
|
-
T,
|
|
1371
1350
|
S,
|
|
1351
|
+
T,
|
|
1372
1352
|
b,
|
|
1373
|
-
|
|
1353
|
+
p,
|
|
1374
1354
|
O,
|
|
1375
1355
|
$
|
|
1376
|
-
] }) }), e[24] = y, e[25] =
|
|
1356
|
+
] }) }), e[24] = y, e[25] = p, e[26] = O, e[27] = $, e[28] = E, e[29] = w) : w = e[29], w;
|
|
1377
1357
|
}
|
|
1378
|
-
function
|
|
1358
|
+
function _r(n) {
|
|
1379
1359
|
Ce(n, ce, void 0, !1);
|
|
1380
1360
|
}
|
|
1381
|
-
function
|
|
1361
|
+
function hr(n) {
|
|
1382
1362
|
return console.error(n);
|
|
1383
1363
|
}
|
|
1384
1364
|
export {
|
|
1385
|
-
|
|
1365
|
+
Fe as C,
|
|
1386
1366
|
Qt as D,
|
|
1387
1367
|
rn as E,
|
|
1388
1368
|
dn as I,
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1369
|
+
Vr as P,
|
|
1370
|
+
Xr as R,
|
|
1371
|
+
ze as T,
|
|
1372
|
+
Wr as a,
|
|
1373
|
+
zr as b,
|
|
1374
|
+
Ke as c,
|
|
1395
1375
|
Zt as d,
|
|
1396
|
-
|
|
1397
|
-
|
|
1376
|
+
Kr as e,
|
|
1377
|
+
Ge as f,
|
|
1398
1378
|
Un as g,
|
|
1399
|
-
|
|
1379
|
+
qe as h,
|
|
1400
1380
|
fn as s
|
|
1401
1381
|
};
|
|
1402
|
-
//# sourceMappingURL=rich-message-
|
|
1382
|
+
//# sourceMappingURL=rich-message-B2gxL8oy.js.map
|