@pstdio/ui 0.44.0 → 0.45.0-nightly.20261021030241
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/{MermaidComponent-DhNTaUMt.js → MermaidComponent-CTWuGAqI.js} +2 -2
- package/dist/{MermaidComponent-DhNTaUMt.js.map → MermaidComponent-CTWuGAqI.js.map} +1 -1
- package/dist/alert-CO-uOKLm.js +409 -0
- package/dist/alert-CO-uOKLm.js.map +1 -0
- package/dist/chat-ui.d.ts +7 -5
- package/dist/chat-ui.js +1110 -1119
- package/dist/chat-ui.js.map +1 -1
- package/dist/{collection-view-grouping-BKIr4QAb.js → collection-view-grouping-BQMfKdQG.js} +2 -2
- package/dist/{collection-view-grouping-BKIr4QAb.js.map → collection-view-grouping-BQMfKdQG.js.map} +1 -1
- package/dist/{collection-view-search-D7HFymZW.js → collection-view-search-DS9U9WAl.js} +2 -2
- package/dist/{collection-view-search-D7HFymZW.js.map → collection-view-search-DS9U9WAl.js.map} +1 -1
- package/dist/collection-view.d.ts +90 -3
- package/dist/collection-view.js +1 -1
- package/dist/data-table.d.ts +1 -2
- package/dist/data-table.js +4 -4
- package/dist/{diff-viewer-Cpiw-1ut.js → diff-viewer-ChEyTNpa.js} +2 -2
- package/dist/{diff-viewer-Cpiw-1ut.js.map → diff-viewer-ChEyTNpa.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-BuqijDAl.js → display-sort-control-BUMkmlIu.js} +3 -3
- package/dist/{display-sort-control-BuqijDAl.js.map → display-sort-control-BUMkmlIu.js.map} +1 -1
- package/dist/{edit-mode-data-table-BwNTRik5.js → edit-mode-data-table-MKEjfFUw.js} +4 -4
- package/dist/{edit-mode-data-table-BwNTRik5.js.map → edit-mode-data-table-MKEjfFUw.js.map} +1 -1
- package/dist/icon-options-DpzDAnlu.js +313 -0
- package/dist/icon-options-DpzDAnlu.js.map +1 -0
- package/dist/{index-DTjRTEez.d.ts → index-C0PaeiBy.d.ts} +8 -1
- package/dist/{index-Bq1BDCBk.d.ts → index-eV_0Gjzo.d.ts} +4 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +862 -780
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -2
- package/dist/kanban-renderer.js +596 -397
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{markdown-editor-DUBUE7M-.js → markdown-editor-BPGIS9ku.js} +996 -876
- package/dist/markdown-editor-BPGIS9ku.js.map +1 -0
- package/dist/param-editor-Bva0M7Ns.js +374 -0
- package/dist/param-editor-Bva0M7Ns.js.map +1 -0
- package/dist/{param-editor-field-B5z6200g.js → param-editor-field-BPBlweVg.js} +1183 -1161
- package/dist/param-editor-field-BPBlweVg.js.map +1 -0
- package/dist/param-editor.d.ts +57 -2
- package/dist/param-editor.js +3 -3
- package/dist/{resolve-icon-component-Ck6ZyRnc.js → resolve-icon-component-Dy0pOuj5.js} +2 -2
- package/dist/{resolve-icon-component-Ck6ZyRnc.js.map → resolve-icon-component-Dy0pOuj5.js.map} +1 -1
- package/dist/{rich-text-2c_ra5gK.js → rich-text-CH2psble.js} +569 -524
- package/dist/rich-text-CH2psble.js.map +1 -0
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/terminal.js +1 -1
- package/dist/{theme-Chgjys_o.js → theme-BsStBWWL.js} +255 -155
- package/dist/theme-BsStBWWL.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-B8Gtot1M.js → tree-list-aNC_UTGS.js} +396 -341
- package/dist/tree-list-aNC_UTGS.js.map +1 -0
- package/package.json +2 -2
- package/dist/alert-MQ47wy7f.js +0 -388
- package/dist/alert-MQ47wy7f.js.map +0 -1
- package/dist/icon-options-Tt6Wzhtv.js +0 -308
- package/dist/icon-options-Tt6Wzhtv.js.map +0 -1
- package/dist/index-kYQwGcym.d.ts +0 -91
- package/dist/markdown-editor-DUBUE7M-.js.map +0 -1
- package/dist/param-editor-DK1uCOh3.js +0 -225
- package/dist/param-editor-DK1uCOh3.js.map +0 -1
- package/dist/param-editor-field-B5z6200g.js.map +0 -1
- package/dist/rich-text-2c_ra5gK.js.map +0 -1
- package/dist/theme-Chgjys_o.js.map +0 -1
- package/dist/tree-list-B8Gtot1M.js.map +0 -1
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { n as e, o as t, r as n, s as r, t as i } from "./alert-
|
|
1
|
+
import { n as e, o as t, r as n, s as r, t as i } from "./alert-CO-uOKLm.js";
|
|
2
2
|
import { t as a } from "./scroll-area-IeoRS73V.js";
|
|
3
3
|
import { t as o } from "./list-row-BDDAVuVd.js";
|
|
4
4
|
import { t as s } from "./empty-state-3mVV_pV-.js";
|
|
5
|
-
import {
|
|
6
|
-
import { Box as
|
|
7
|
-
import { c as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { forwardRef as
|
|
10
|
-
import { Activity as
|
|
11
|
-
import { createPortal as
|
|
12
|
-
import { LexicalCollaboration as
|
|
13
|
-
import { CollaborationPluginV2__EXPERIMENTAL as
|
|
14
|
-
import { LexicalComposer as
|
|
15
|
-
import { LexicalErrorBoundary as
|
|
16
|
-
import { HorizontalRulePlugin as
|
|
17
|
-
import { LinkPlugin as
|
|
18
|
-
import { ListPlugin as
|
|
19
|
-
import { RichTextPlugin as
|
|
20
|
-
import { TabIndentationPlugin as
|
|
21
|
-
import { WebsocketProvider as
|
|
22
|
-
import * as
|
|
23
|
-
import { $addUpdateTag as
|
|
24
|
-
import { useLexicalComposerContext as
|
|
25
|
-
import { addClassNamesToElement as
|
|
26
|
-
import { $setBlocksType as
|
|
27
|
-
import { OnChangePlugin as
|
|
28
|
-
import { LexicalTypeaheadMenuPlugin as
|
|
29
|
-
import { HistoryPlugin as
|
|
30
|
-
import { MarkNode as
|
|
31
|
-
import { useLexicalEditable as
|
|
32
|
-
import { ClickableLinkPlugin as
|
|
5
|
+
import { A as c, B as l, D as u, F as d, I as f, L as p, M as m, N as h, O as g, R as _, V as v, _ as y, a as b, b as x, c as S, d as C, f as w, h as T, i as E, j as D, k as O, l as ee, m as te, o as k, p as A, r as j, s as M, u as N, v as P, x as F, y as I } from "./markdown-editor-BPGIS9ku.js";
|
|
6
|
+
import { Box as L, Button as R, Flex as ne, HStack as z, Icon as B, Spinner as V, Stack as H, Table as U, Text as W, Textarea as G, useRecipe as K, useSlotRecipe as q } from "@chakra-ui/react";
|
|
7
|
+
import { c as J } from "react/compiler-runtime";
|
|
8
|
+
import { jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
9
|
+
import { forwardRef as Z, useEffect as Q, useImperativeHandle as $, useLayoutEffect as re, useRef as ie, useState as ae } from "react";
|
|
10
|
+
import { Activity as oe, Bell as se, CircleAlert as ce, Component as le, ExternalLink as ue, GitBranch as de, Info as fe, MessageCircle as pe, ScanSearch as me, Sparkles as he } from "lucide-react";
|
|
11
|
+
import { createPortal as ge } from "react-dom";
|
|
12
|
+
import { LexicalCollaboration as _e } from "@lexical/react/LexicalCollaborationContext";
|
|
13
|
+
import { CollaborationPluginV2__EXPERIMENTAL as ve } from "@lexical/react/LexicalCollaborationPlugin";
|
|
14
|
+
import { LexicalComposer as ye } from "@lexical/react/LexicalComposer";
|
|
15
|
+
import { LexicalErrorBoundary as be } from "@lexical/react/LexicalErrorBoundary";
|
|
16
|
+
import { HorizontalRulePlugin as xe } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
17
|
+
import { LinkPlugin as Se } from "@lexical/react/LexicalLinkPlugin";
|
|
18
|
+
import { ListPlugin as Ce } from "@lexical/react/LexicalListPlugin";
|
|
19
|
+
import { RichTextPlugin as we } from "@lexical/react/LexicalRichTextPlugin";
|
|
20
|
+
import { TabIndentationPlugin as Te } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
21
|
+
import { WebsocketProvider as Ee } from "y-websocket";
|
|
22
|
+
import * as De from "yjs";
|
|
23
|
+
import { $addUpdateTag as Oe, $createParagraphNode as ke, $createRangeSelection as Ae, $createTextNode as je, $getNodeByKey as Me, $getRoot as Ne, $getSelection as Pe, $isElementNode as Fe, $isRangeSelection as Ie, $isTextNode as Le, $setSelection as Re, COMMAND_PRIORITY_HIGH as ze, COMMAND_PRIORITY_LOW as Be, DecoratorNode as Ve, ElementNode as He, INSERT_LINE_BREAK_COMMAND as Ue, INSERT_PARAGRAPH_COMMAND as We, KEY_DOWN_COMMAND as Ge, TextNode as Ke, createCommand as qe, isHTMLElement as Je } from "lexical";
|
|
24
|
+
import { useLexicalComposerContext as Ye } from "@lexical/react/LexicalComposerContext";
|
|
25
|
+
import { addClassNamesToElement as Xe, mergeRegister as Ze } from "@lexical/utils";
|
|
26
|
+
import { $setBlocksType as Qe } from "@lexical/selection";
|
|
27
|
+
import { OnChangePlugin as $e } from "@lexical/react/LexicalOnChangePlugin";
|
|
28
|
+
import { LexicalTypeaheadMenuPlugin as et, MenuOption as tt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
29
|
+
import { HistoryPlugin as nt } from "@lexical/react/LexicalHistoryPlugin";
|
|
30
|
+
import { MarkNode as rt } from "@lexical/mark";
|
|
31
|
+
import { useLexicalEditable as it } from "@lexical/react/useLexicalEditable";
|
|
32
|
+
import { ClickableLinkPlugin as at } from "@lexical/react/LexicalClickableLinkPlugin";
|
|
33
33
|
//#region src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx
|
|
34
|
-
function
|
|
35
|
-
let e =
|
|
36
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
34
|
+
function ot() {
|
|
35
|
+
let e = J(1), t;
|
|
36
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Y("style", { children: "\n .collaboration-cursor-container {\n position: relative;\n display: inline;\n }\n\n .collaboration-cursor-caret {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 2px;\n pointer-events: none;\n }\n\n .collaboration-cursor-label {\n position: absolute;\n top: -18px;\n left: -2px;\n padding: 1px 6px;\n font-size: 11px;\n font-weight: 600;\n line-height: 16px;\n white-space: nowrap;\n border-radius: 4px 4px 4px 0;\n color: #fff;\n pointer-events: none;\n user-select: none;\n }\n\n .collaboration-cursor-selection {\n position: absolute;\n pointer-events: none;\n opacity: 0.25;\n }\n " }), e[0] = t) : t = e[0], t;
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx
|
|
40
|
-
function
|
|
41
|
-
let t =
|
|
40
|
+
function st(e) {
|
|
41
|
+
let t = J(43), { roomId: n, wsUrl: r, wsParams: i, userName: a, userColor: o, placeholder: s } = e, c;
|
|
42
42
|
t[0] === i ? c = t[1] : (c = i === void 0 ? {} : i, t[0] = i, t[1] = c);
|
|
43
|
-
let l = c, u = a === void 0 ? "Anonymous" : a, d = o === void 0 ? "#30bced" : o,
|
|
44
|
-
t[2] !==
|
|
45
|
-
let e = new
|
|
43
|
+
let l = c, u = a === void 0 ? "Anonymous" : a, d = o === void 0 ? "#30bced" : o, f = ie(null), [p, m] = ae(null), [h, g] = ae(!1), [_] = ae(lt), b;
|
|
44
|
+
t[2] !== _ || t[3] !== n || t[4] !== l || t[5] !== r ? (b = () => {
|
|
45
|
+
let e = new Ee(r, n, _, {
|
|
46
46
|
params: l,
|
|
47
47
|
connect: !1
|
|
48
48
|
});
|
|
49
49
|
return e.on("sync", (e) => {
|
|
50
|
-
e &&
|
|
50
|
+
e && g(!0);
|
|
51
51
|
}), e;
|
|
52
|
-
}, t[2] =
|
|
53
|
-
let [
|
|
54
|
-
t[7] ===
|
|
55
|
-
|
|
56
|
-
}),
|
|
57
|
-
let
|
|
58
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
let
|
|
62
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
52
|
+
}, t[2] = _, t[3] = n, t[4] = l, t[5] = r, t[6] = b) : b = t[6];
|
|
53
|
+
let [x] = ae(b), S, E;
|
|
54
|
+
t[7] === x ? (S = t[8], E = t[9]) : (S = () => (x.connect(), () => {
|
|
55
|
+
x.disconnect();
|
|
56
|
+
}), E = [x], t[7] = x, t[8] = S, t[9] = E), Q(S, E);
|
|
57
|
+
let D, O;
|
|
58
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
59
|
+
m(f.current);
|
|
60
|
+
}, O = [], t[10] = D, t[11] = O) : (D = t[10], O = t[11]), Q(D, O);
|
|
61
|
+
let k;
|
|
62
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (k = {
|
|
63
63
|
namespace: "COLLABORATIVE_EDITOR",
|
|
64
|
-
nodes:
|
|
64
|
+
nodes: te,
|
|
65
65
|
editorState: null,
|
|
66
|
-
onError:
|
|
66
|
+
onError: ct,
|
|
67
67
|
editable: !0,
|
|
68
|
-
theme:
|
|
69
|
-
}, t[12] =
|
|
70
|
-
let
|
|
71
|
-
t[13] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
72
|
-
let
|
|
73
|
-
t[14] !==
|
|
68
|
+
theme: T
|
|
69
|
+
}, t[12] = k) : k = t[12];
|
|
70
|
+
let j = k, M;
|
|
71
|
+
t[13] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ Y(ot, {}), t[13] = M) : M = t[13];
|
|
72
|
+
let P = x, F;
|
|
73
|
+
t[14] !== _ || t[15] !== n || t[16] !== P || t[17] !== d || t[18] !== u ? (F = /* @__PURE__ */ Y(ve, {
|
|
74
74
|
id: n,
|
|
75
|
-
doc:
|
|
76
|
-
provider:
|
|
75
|
+
doc: _,
|
|
76
|
+
provider: P,
|
|
77
77
|
__shouldBootstrapUnsafe: !1,
|
|
78
78
|
username: u,
|
|
79
79
|
cursorColor: d
|
|
80
|
-
}), t[14] =
|
|
81
|
-
let z, B, V,
|
|
82
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
83
|
-
let
|
|
84
|
-
t[27] ===
|
|
85
|
-
let
|
|
86
|
-
t[29] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
87
|
-
let
|
|
88
|
-
t[30] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
80
|
+
}), t[14] = _, t[15] = n, t[16] = P, t[17] = d, t[18] = u, t[19] = F) : F = t[19];
|
|
81
|
+
let I, R, z, B, V, H, U;
|
|
82
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ Y(Se, {}), R = /* @__PURE__ */ Y(Ce, {}), z = /* @__PURE__ */ Y(ee, {}), B = /* @__PURE__ */ Y(Te, { maxIndent: 7 }), V = /* @__PURE__ */ Y(xe, {}), H = /* @__PURE__ */ Y(C, {}), U = /* @__PURE__ */ Y(w, {}), t[20] = I, t[21] = R, t[22] = z, t[23] = B, t[24] = V, t[25] = H, t[26] = U) : (I = t[20], R = t[21], z = t[22], B = t[23], V = t[24], H = t[25], U = t[26]);
|
|
83
|
+
let W;
|
|
84
|
+
t[27] === p ? W = t[28] : (W = /* @__PURE__ */ Y(A, { anchorElem: p }), t[27] = p, t[28] = W);
|
|
85
|
+
let G;
|
|
86
|
+
t[29] === Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ Y(y, {}), t[29] = G) : G = t[29];
|
|
87
|
+
let K;
|
|
88
|
+
t[30] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ Y(v, {
|
|
89
89
|
fullWidth: !1,
|
|
90
90
|
layerStyle: "markdownEditorInset"
|
|
91
|
-
}), t[30] =
|
|
92
|
-
let
|
|
93
|
-
t[31] !== s || t[32] !==
|
|
91
|
+
}), t[30] = K) : K = t[30];
|
|
92
|
+
let q;
|
|
93
|
+
t[31] !== s || t[32] !== h ? (q = h && s ? /* @__PURE__ */ Y(L, {
|
|
94
94
|
position: "absolute",
|
|
95
95
|
top: "0",
|
|
96
96
|
left: "0",
|
|
@@ -101,18 +101,18 @@ function tt(e) {
|
|
|
101
101
|
userSelect: "none",
|
|
102
102
|
textStyle: "paragraph/M/regular",
|
|
103
103
|
children: s
|
|
104
|
-
}) : null, t[31] = s, t[32] =
|
|
104
|
+
}) : null, t[31] = s, t[32] = h, t[33] = q) : q = t[33];
|
|
105
|
+
let Z;
|
|
106
|
+
t[34] === q ? Z = t[35] : (Z = /* @__PURE__ */ Y(we, {
|
|
107
|
+
contentEditable: K,
|
|
108
|
+
placeholder: q,
|
|
109
|
+
ErrorBoundary: be
|
|
110
|
+
}), t[34] = q, t[35] = Z);
|
|
105
111
|
let $;
|
|
106
|
-
t[
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}), t[34] = Q, t[35] = $);
|
|
111
|
-
let ie;
|
|
112
|
-
t[36] === h ? ie = t[37] : (ie = h ? /* @__PURE__ */ W(k, { anchorElem: h }) : null, t[36] = h, t[37] = ie);
|
|
113
|
-
let ae;
|
|
114
|
-
return t[38] !== R || t[39] !== Y || t[40] !== $ || t[41] !== ie ? (ae = /* @__PURE__ */ G(ee, {
|
|
115
|
-
ref: m,
|
|
112
|
+
t[36] === p ? $ = t[37] : ($ = p ? /* @__PURE__ */ Y(N, { anchorElem: p }) : null, t[36] = p, t[37] = $);
|
|
113
|
+
let re;
|
|
114
|
+
return t[38] !== F || t[39] !== W || t[40] !== Z || t[41] !== $ ? (re = /* @__PURE__ */ X(ne, {
|
|
115
|
+
ref: f,
|
|
116
116
|
className: "rich-text",
|
|
117
117
|
justifyContent: "space-between",
|
|
118
118
|
width: "100%",
|
|
@@ -121,41 +121,41 @@ function tt(e) {
|
|
|
121
121
|
position: "relative",
|
|
122
122
|
direction: "column",
|
|
123
123
|
overflow: "visible",
|
|
124
|
-
children: [
|
|
125
|
-
initialConfig:
|
|
126
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: [M, /* @__PURE__ */ Y(ye, {
|
|
125
|
+
initialConfig: j,
|
|
126
|
+
children: /* @__PURE__ */ X(_e, { children: [
|
|
127
|
+
F,
|
|
128
|
+
I,
|
|
127
129
|
R,
|
|
128
130
|
z,
|
|
129
131
|
B,
|
|
130
132
|
V,
|
|
131
|
-
te,
|
|
132
133
|
H,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
U,
|
|
135
|
+
W,
|
|
136
|
+
G,
|
|
136
137
|
Z,
|
|
137
|
-
|
|
138
|
-
ie
|
|
138
|
+
$
|
|
139
139
|
] })
|
|
140
140
|
})]
|
|
141
|
-
}), t[38] =
|
|
141
|
+
}), t[38] = F, t[39] = W, t[40] = Z, t[41] = $, t[42] = re) : re = t[42], re;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function ct(e) {
|
|
144
144
|
return console.error(e);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return new
|
|
146
|
+
function lt() {
|
|
147
|
+
return new De.Doc();
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/rich-text/prompt-input/commands.ts
|
|
151
|
-
var
|
|
151
|
+
var ut = qe("INSERT_BLOCK");
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx
|
|
154
|
-
function
|
|
155
|
-
let t =
|
|
154
|
+
function dt(e) {
|
|
155
|
+
let t = pt();
|
|
156
156
|
return e.style !== null && t.setFormat(e.style.textAlign), { node: t };
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var ft = class e extends He {
|
|
159
159
|
static getType() {
|
|
160
160
|
return "comment";
|
|
161
161
|
}
|
|
@@ -164,20 +164,20 @@ var ot = class e extends Ie {
|
|
|
164
164
|
}
|
|
165
165
|
createDOM(e) {
|
|
166
166
|
let t = document.createElement("blockquote");
|
|
167
|
-
return
|
|
167
|
+
return Xe(t, e.theme.comment), t;
|
|
168
168
|
}
|
|
169
169
|
updateDOM() {
|
|
170
170
|
return !1;
|
|
171
171
|
}
|
|
172
172
|
static importDOM() {
|
|
173
173
|
return { blockquote: () => ({
|
|
174
|
-
conversion:
|
|
174
|
+
conversion: dt,
|
|
175
175
|
priority: 0
|
|
176
176
|
}) };
|
|
177
177
|
}
|
|
178
178
|
exportDOM(e) {
|
|
179
179
|
let { element: t } = super.exportDOM(e);
|
|
180
|
-
if (t &&
|
|
180
|
+
if (t && Je(t)) {
|
|
181
181
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
182
182
|
let e = this.getFormatType();
|
|
183
183
|
t.style.textAlign = e;
|
|
@@ -187,7 +187,7 @@ var ot = class e extends Ie {
|
|
|
187
187
|
return { element: t };
|
|
188
188
|
}
|
|
189
189
|
static importJSON(e) {
|
|
190
|
-
let t =
|
|
190
|
+
let t = pt();
|
|
191
191
|
return t.setFormat(e.format), t.setIndent(e.indent), t.setDirection(e.direction), t;
|
|
192
192
|
}
|
|
193
193
|
exportJSON() {
|
|
@@ -200,86 +200,86 @@ var ot = class e extends Ie {
|
|
|
200
200
|
return `{{! ${super.getTextContent().replace(/([{}])/g, "\\$1")} }}`;
|
|
201
201
|
}
|
|
202
202
|
insertNewAfter(e, t) {
|
|
203
|
-
let n =
|
|
203
|
+
let n = ke(), r = this.getDirection();
|
|
204
204
|
return n.setDirection(r), this.insertAfter(n, t), n;
|
|
205
205
|
}
|
|
206
206
|
collapseAtStart() {
|
|
207
|
-
let e =
|
|
207
|
+
let e = ke();
|
|
208
208
|
return this.getChildren().forEach((t) => {
|
|
209
209
|
e.append(t);
|
|
210
210
|
}), this.replace(e), !0;
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
|
-
function
|
|
214
|
-
return new
|
|
213
|
+
function pt() {
|
|
214
|
+
return new ft();
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts
|
|
218
|
-
var
|
|
219
|
-
let n =
|
|
218
|
+
var mt = (e, t) => {
|
|
219
|
+
let n = Pe(), r = pt();
|
|
220
220
|
if (t) {
|
|
221
221
|
t.getParent()?.replace(r, !0), t.remove(), r.selectEnd();
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
Ie(n) && Qe(n, pt);
|
|
225
225
|
};
|
|
226
|
-
function
|
|
227
|
-
let e =
|
|
228
|
-
return e[0] === t ? (n = e[1], r = e[2]) : (n = () =>
|
|
226
|
+
function ht() {
|
|
227
|
+
let e = J(3), [t] = Ye(), n, r;
|
|
228
|
+
return e[0] === t ? (n = e[1], r = e[2]) : (n = () => Ze(t.registerCommand(ut, gt, Be)), r = [t], e[0] = t, e[1] = n, e[2] = r), Q(n, r), null;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function gt(e) {
|
|
231
231
|
let { optionId: t, nodeToReplace: n } = e;
|
|
232
|
-
return
|
|
232
|
+
return mt(t, n), !1;
|
|
233
233
|
}
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts
|
|
236
|
-
var
|
|
237
|
-
let e =
|
|
238
|
-
e[0] === t ? (n = e[1], r = e[2]) : (n = () =>
|
|
239
|
-
let n = e.getChildren().filter(
|
|
236
|
+
var _t = () => {
|
|
237
|
+
let e = J(3), [t] = Ye(), n, r;
|
|
238
|
+
e[0] === t ? (n = e[1], r = e[2]) : (n = () => Ze(t.registerNodeTransform(ft, (e) => {
|
|
239
|
+
let n = e.getChildren().filter(vt);
|
|
240
240
|
n.length > 0 && t.update(() => {
|
|
241
|
-
n.forEach(
|
|
241
|
+
n.forEach(yt);
|
|
242
242
|
});
|
|
243
|
-
})), r = [t], e[0] = t, e[1] = n, e[2] = r),
|
|
243
|
+
})), r = [t], e[0] = t, e[1] = n, e[2] = r), Q(n, r);
|
|
244
244
|
};
|
|
245
|
-
function
|
|
245
|
+
function vt(e) {
|
|
246
246
|
return e.getType() === "comment";
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
e.replace(
|
|
248
|
+
function yt(e) {
|
|
249
|
+
e.replace(ke(), !0);
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx
|
|
253
|
-
function
|
|
254
|
-
return
|
|
253
|
+
function bt() {
|
|
254
|
+
return _t(), ht(), null;
|
|
255
255
|
}
|
|
256
256
|
//#endregion
|
|
257
257
|
//#region src/components/rich-text/prompt-input/plugins/command-query.ts
|
|
258
|
-
var
|
|
258
|
+
var xt = (e) => {
|
|
259
259
|
let t = /(?:^|\s)(\/[^\s/]*)$/.exec(e)?.[1];
|
|
260
260
|
return t ? {
|
|
261
261
|
leadOffset: e.length - t.length,
|
|
262
262
|
matchingString: t.slice(1),
|
|
263
263
|
replaceableString: t
|
|
264
264
|
} : null;
|
|
265
|
-
},
|
|
265
|
+
}, St = class extends tt {
|
|
266
266
|
command;
|
|
267
267
|
constructor(e) {
|
|
268
268
|
super(e.name), this.command = e;
|
|
269
269
|
}
|
|
270
|
-
},
|
|
271
|
-
let t =
|
|
270
|
+
}, Ct = (e) => {
|
|
271
|
+
let t = J(21), { options: n, selectedIndex: r, onSelect: i, onHighlight: s } = e, c;
|
|
272
272
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = { key: "menu" }, t[0] = c) : c = t[0];
|
|
273
|
-
let l =
|
|
273
|
+
let l = q(c), u;
|
|
274
274
|
t[1] === l ? u = t[2] : (u = l(), t[1] = l, t[2] = u);
|
|
275
275
|
let d = u, f, p;
|
|
276
276
|
t[3] !== n || t[4] !== r ? (f = () => {
|
|
277
277
|
n[r ?? -1]?.ref?.current?.scrollIntoView({ block: "nearest" });
|
|
278
|
-
}, p = [n, r], t[3] = n, t[4] = r, t[5] = f, t[6] = p) : (f = t[5], p = t[6]),
|
|
278
|
+
}, p = [n, r], t[3] = n, t[4] = r, t[5] = f, t[6] = p) : (f = t[5], p = t[6]), Q(f, p);
|
|
279
279
|
let m = d.content, h;
|
|
280
280
|
if (t[7] !== s || t[8] !== i || t[9] !== n || t[10] !== r) {
|
|
281
281
|
let e;
|
|
282
|
-
t[12] !== s || t[13] !== i || t[14] !== r ? (e = (e, t) => /* @__PURE__ */
|
|
282
|
+
t[12] !== s || t[13] !== i || t[14] !== r ? (e = (e, t) => /* @__PURE__ */ Y(o, {
|
|
283
283
|
id: `typeahead-item-${t}`,
|
|
284
284
|
ref: e.setRefElement,
|
|
285
285
|
role: "option",
|
|
@@ -291,19 +291,19 @@ var ht = (e) => {
|
|
|
291
291
|
description: e.command.disabledReason ?? e.command.description,
|
|
292
292
|
disabled: !!e.command.disabledReason,
|
|
293
293
|
isSelected: r === t,
|
|
294
|
-
onMouseDown:
|
|
294
|
+
onMouseDown: Tt,
|
|
295
295
|
onPointerMove: () => s(t),
|
|
296
296
|
onActivate: () => i(e, t)
|
|
297
297
|
}, e.key), t[12] = s, t[13] = i, t[14] = r, t[15] = e) : e = t[15], h = n.map(e), t[7] = s, t[8] = i, t[9] = n, t[10] = r, t[11] = h;
|
|
298
298
|
} else h = t[11];
|
|
299
299
|
let g;
|
|
300
|
-
t[16] === h ? g = t[17] : (g = /* @__PURE__ */
|
|
300
|
+
t[16] === h ? g = t[17] : (g = /* @__PURE__ */ Y(a, {
|
|
301
301
|
maxH: "xs",
|
|
302
302
|
showHorizontalScrollbar: !1,
|
|
303
303
|
children: h
|
|
304
304
|
}), t[16] = h, t[17] = g);
|
|
305
305
|
let _;
|
|
306
|
-
return t[18] !== d.content || t[19] !== g ? (_ = /* @__PURE__ */
|
|
306
|
+
return t[18] !== d.content || t[19] !== g ? (_ = /* @__PURE__ */ Y(L, {
|
|
307
307
|
css: m,
|
|
308
308
|
position: "absolute",
|
|
309
309
|
bottom: "100%",
|
|
@@ -311,50 +311,50 @@ var ht = (e) => {
|
|
|
311
311
|
zIndex: "popover",
|
|
312
312
|
children: g
|
|
313
313
|
}), t[18] = d.content, t[19] = g, t[20] = _) : _ = t[20], _;
|
|
314
|
-
},
|
|
315
|
-
let t =
|
|
314
|
+
}, wt = (e) => {
|
|
315
|
+
let t = J(16), { commands: n } = e, [r] = Ye(), [i, a] = ae(null), o, s;
|
|
316
316
|
t[0] === r ? (o = t[1], s = t[2]) : (o = () => {
|
|
317
317
|
let e = r.getRootElement();
|
|
318
|
-
e?.contains(e.ownerDocument.activeElement) && r.update(
|
|
319
|
-
}, s = [r], t[0] = r, t[1] = o, t[2] = s),
|
|
318
|
+
e?.contains(e.ownerDocument.activeElement) && r.update(Et);
|
|
319
|
+
}, s = [r], t[0] = r, t[1] = o, t[2] = s), Q(o, s);
|
|
320
320
|
let c;
|
|
321
321
|
if (t[3] !== n || t[4] !== i) {
|
|
322
322
|
let e;
|
|
323
|
-
t[6] === i ? e = t[7] : (e = (e) => e.name.startsWith(`/${i ?? ""}`), t[6] = i, t[7] = e), c = n.filter(e).map(
|
|
323
|
+
t[6] === i ? e = t[7] : (e = (e) => e.name.startsWith(`/${i ?? ""}`), t[6] = i, t[7] = e), c = n.filter(e).map(Dt), t[3] = n, t[4] = i, t[5] = c;
|
|
324
324
|
} else c = t[5];
|
|
325
325
|
let l = c, u;
|
|
326
326
|
t[8] === n ? u = t[9] : (u = (e) => {
|
|
327
|
-
let t =
|
|
327
|
+
let t = xt(e);
|
|
328
328
|
return !t || !n.some((e) => e.name.startsWith(`/${t.matchingString}`)) ? null : t;
|
|
329
329
|
}, t[8] = n, t[9] = u);
|
|
330
330
|
let d;
|
|
331
331
|
t[10] === r ? d = t[11] : (d = (e, t, n) => {
|
|
332
332
|
e.command.disabledReason || (r.update(() => {
|
|
333
|
-
t?.replace(
|
|
333
|
+
t?.replace(je(e.command.onSelect ? "" : `${e.command.name} `)).selectEnd(), n();
|
|
334
334
|
}), e.command.onSelect?.());
|
|
335
335
|
}, t[10] = r, t[11] = d);
|
|
336
336
|
let f;
|
|
337
|
-
return t[12] !== l || t[13] !== u || t[14] !== d ? (f = /* @__PURE__ */
|
|
337
|
+
return t[12] !== l || t[13] !== u || t[14] !== d ? (f = /* @__PURE__ */ Y(et, {
|
|
338
338
|
onQueryChange: a,
|
|
339
339
|
options: l,
|
|
340
340
|
triggerFn: u,
|
|
341
341
|
onSelectOption: d,
|
|
342
|
-
menuRenderFn:
|
|
342
|
+
menuRenderFn: Ot
|
|
343
343
|
}), t[12] = l, t[13] = u, t[14] = d, t[15] = f) : f = t[15], f;
|
|
344
344
|
};
|
|
345
|
-
function
|
|
345
|
+
function Tt(e) {
|
|
346
346
|
return e.preventDefault();
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
let e =
|
|
350
|
-
e &&
|
|
348
|
+
function Et() {
|
|
349
|
+
let e = Pe();
|
|
350
|
+
e && Re(e.clone());
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return new
|
|
352
|
+
function Dt(e) {
|
|
353
|
+
return new St(e);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ot(e, t) {
|
|
356
356
|
let { options: n, selectedIndex: r, selectOptionAndCleanUp: i, setHighlightedIndex: a } = t;
|
|
357
|
-
return e.current?.setAttribute("aria-label", "Harness commands"), e.current ?
|
|
357
|
+
return e.current?.setAttribute("aria-label", "Harness commands"), e.current ? ge(/* @__PURE__ */ Y(Ct, {
|
|
358
358
|
options: n,
|
|
359
359
|
selectedIndex: r,
|
|
360
360
|
onHighlight: a,
|
|
@@ -365,8 +365,8 @@ function St(e, t) {
|
|
|
365
365
|
}
|
|
366
366
|
//#endregion
|
|
367
367
|
//#region src/components/rich-text/prompt-input/plugins/focus-request-plugin.tsx
|
|
368
|
-
var
|
|
369
|
-
let t =
|
|
368
|
+
var kt = (e) => {
|
|
369
|
+
let t = J(7), { requested: n, isEditable: r, onComplete: i } = e, [a] = Ye(), o = it(), s, c;
|
|
370
370
|
return t[0] !== a || t[1] !== r || t[2] !== i || t[3] !== o || t[4] !== n ? (s = () => {
|
|
371
371
|
if (!n || !r || !o) return;
|
|
372
372
|
let e = a.getRootElement(), t = document.activeElement;
|
|
@@ -377,15 +377,15 @@ var Ct = (e) => {
|
|
|
377
377
|
o,
|
|
378
378
|
a,
|
|
379
379
|
i
|
|
380
|
-
], t[0] = a, t[1] = r, t[2] = i, t[3] = o, t[4] = n, t[5] = s, t[6] = c) : (s = t[5], c = t[6]),
|
|
381
|
-
},
|
|
380
|
+
], t[0] = a, t[1] = r, t[2] = i, t[3] = o, t[4] = n, t[5] = s, t[6] = c) : (s = t[5], c = t[6]), re(s, c), null;
|
|
381
|
+
}, At = (e) => {
|
|
382
382
|
let t = "", n = e.getChildren(), r = n.length;
|
|
383
383
|
for (let e = 0; e < r; e++) {
|
|
384
384
|
let i = n[e];
|
|
385
|
-
t += i.getTextContent(),
|
|
385
|
+
t += i.getTextContent(), Fe(i) && e !== r - 1 && !i.isInline() && (t += "\n");
|
|
386
386
|
}
|
|
387
387
|
return t;
|
|
388
|
-
},
|
|
388
|
+
}, jt = (e) => e.type === "paragraph" && !!e.children?.length, Mt = (e) => {
|
|
389
389
|
if (e.type === "comment") return "";
|
|
390
390
|
let t = typeof e.text == "string" ? e.text : "", n = e.children;
|
|
391
391
|
if (!Array.isArray(n)) return t;
|
|
@@ -396,16 +396,16 @@ var Ct = (e) => {
|
|
|
396
396
|
e !== r - 1 && (t += "\n");
|
|
397
397
|
continue;
|
|
398
398
|
}
|
|
399
|
-
t +=
|
|
399
|
+
t += Mt(i), jt(i) && (t += "\n");
|
|
400
400
|
}
|
|
401
401
|
return t;
|
|
402
|
-
},
|
|
402
|
+
}, Nt = (e) => {
|
|
403
403
|
try {
|
|
404
|
-
return
|
|
404
|
+
return Mt(JSON.parse(e).root ?? {});
|
|
405
405
|
} catch {
|
|
406
406
|
return "";
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, Pt = { root: {
|
|
409
409
|
direction: "ltr",
|
|
410
410
|
format: "",
|
|
411
411
|
indent: 0,
|
|
@@ -421,7 +421,7 @@ var Ct = (e) => {
|
|
|
421
421
|
children: []
|
|
422
422
|
}]
|
|
423
423
|
} };
|
|
424
|
-
function
|
|
424
|
+
function Ft(e = "") {
|
|
425
425
|
return e.trim() ? { root: {
|
|
426
426
|
direction: "ltr",
|
|
427
427
|
format: "",
|
|
@@ -445,198 +445,198 @@ function kt(e = "") {
|
|
|
445
445
|
style: ""
|
|
446
446
|
}] : []
|
|
447
447
|
}))
|
|
448
|
-
} } : JSON.parse(JSON.stringify(
|
|
448
|
+
} } : JSON.parse(JSON.stringify(Pt));
|
|
449
449
|
}
|
|
450
450
|
//#endregion
|
|
451
451
|
//#region src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx
|
|
452
|
-
function
|
|
453
|
-
let t =
|
|
452
|
+
function It(e) {
|
|
453
|
+
let t = J(4), { editorRef: n, previousTextRef: r } = e, [i] = Ye(), a, o;
|
|
454
454
|
return t[0] !== i || t[1] !== r ? (a = () => ({ setEditorValue: (e) => {
|
|
455
|
-
let t = i.parseEditorState(JSON.stringify(
|
|
455
|
+
let t = i.parseEditorState(JSON.stringify(Ft(e)), Lt);
|
|
456
456
|
i.setEditorState(t), r.current = e, i.focus();
|
|
457
|
-
} }), o = [i, r], t[0] = i, t[1] = r, t[2] = a, t[3] = o) : (a = t[2], o = t[3]),
|
|
457
|
+
} }), o = [i, r], t[0] = i, t[1] = r, t[2] = a, t[3] = o) : (a = t[2], o = t[3]), $(n, a, o), null;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
|
|
459
|
+
function Lt() {
|
|
460
|
+
Ne().selectEnd();
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts
|
|
464
|
-
var
|
|
465
|
-
t.preventDefault(), t.shiftKey ? e.dispatchCommand(
|
|
464
|
+
var Rt = (e) => e.key === "Enter" && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey, zt = (e) => e.key === "ArrowUp" && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey, Bt = (e) => e.key === "ArrowDown" && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey, Vt = (e, t) => {
|
|
465
|
+
t.preventDefault(), t.shiftKey ? e.dispatchCommand(Ue, !1) : e.dispatchCommand(We, void 0);
|
|
466
466
|
};
|
|
467
|
-
function
|
|
468
|
-
let t =
|
|
469
|
-
return t[0] !== a || t[1] !== i || t[2] !== r || t[3] !== n ? (o = () => a.registerCommand(
|
|
467
|
+
function Ht(e) {
|
|
468
|
+
let t = J(6), { onSubmit: n, onRecallPrevious: r, onRecallNext: i } = e, [a] = Ye(), o, s;
|
|
469
|
+
return t[0] !== a || t[1] !== i || t[2] !== r || t[3] !== n ? (o = () => a.registerCommand(Ge, (e) => a.getRootElement()?.hasAttribute("aria-controls") ? e.key === "Enter" && !Rt(e) && (Vt(a, e), !0) : Rt(e) ? (e.preventDefault(), n?.(), !0) : zt(e) && r?.() || Bt(e) && i?.() ? (e.preventDefault(), !0) : !1, ze), s = [
|
|
470
470
|
a,
|
|
471
471
|
n,
|
|
472
472
|
r,
|
|
473
473
|
i
|
|
474
|
-
], t[0] = a, t[1] = i, t[2] = r, t[3] = n, t[4] = o, t[5] = s) : (o = t[4], s = t[5]),
|
|
474
|
+
], t[0] = a, t[1] = i, t[2] = r, t[3] = n, t[4] = o, t[5] = s) : (o = t[4], s = t[5]), Q(o, s), null;
|
|
475
475
|
}
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/components/rich-text/prompt-input/plugins/preserve-selection-plugin.tsx
|
|
478
|
-
var
|
|
479
|
-
let t =
|
|
480
|
-
return t?.isAttached() ? e.type === "text" ?
|
|
481
|
-
},
|
|
482
|
-
let t = [], n =
|
|
478
|
+
var Ut = (e) => {
|
|
479
|
+
let t = Me(e.key);
|
|
480
|
+
return t?.isAttached() ? e.type === "text" ? Le(t) && e.offset <= t.getTextContentSize() : Fe(t) && e.offset <= t.getChildrenSize() : !1;
|
|
481
|
+
}, Wt = (e) => {
|
|
482
|
+
let t = [], n = Me(e.key);
|
|
483
483
|
for (; n?.getParent();) t.unshift(n.getIndexWithinParent()), n = n.getParent();
|
|
484
484
|
return {
|
|
485
485
|
path: t,
|
|
486
486
|
offset: e.offset,
|
|
487
487
|
type: e.type
|
|
488
488
|
};
|
|
489
|
-
},
|
|
490
|
-
let t =
|
|
491
|
-
for (let n of e.path) t =
|
|
489
|
+
}, Gt = (e) => {
|
|
490
|
+
let t = Ne();
|
|
491
|
+
for (let n of e.path) t = Fe(t) ? t.getChildAtIndex(n) ?? void 0 : void 0;
|
|
492
492
|
return t ? {
|
|
493
493
|
key: t.getKey(),
|
|
494
494
|
offset: e.offset,
|
|
495
495
|
type: e.type
|
|
496
496
|
} : void 0;
|
|
497
|
-
},
|
|
498
|
-
let { isEditable: t, initialSelection: n, onSelectionChange: r } = e, i =
|
|
497
|
+
}, Kt = (e) => {
|
|
498
|
+
let { isEditable: t, initialSelection: n, onSelectionChange: r } = e, i = ie(n), a = ie(r);
|
|
499
499
|
a.current = r;
|
|
500
|
-
let [o] =
|
|
501
|
-
return c.current = t,
|
|
500
|
+
let [o] = Ye(), s = ie(null), c = ie(t);
|
|
501
|
+
return c.current = t, re(() => o.registerUpdateListener(({ editorState: e }) => {
|
|
502
502
|
e.read(() => {
|
|
503
503
|
let e = s.current;
|
|
504
|
-
if (e && (!
|
|
505
|
-
let t =
|
|
506
|
-
|
|
507
|
-
anchor:
|
|
508
|
-
focus:
|
|
504
|
+
if (e && (!Ut(e.anchor) || !Ut(e.focus)) && (s.current = null), !c.current) return;
|
|
505
|
+
let t = Pe();
|
|
506
|
+
Ie(t) && (s.current = t.clone(), a.current?.({
|
|
507
|
+
anchor: Wt(t.anchor),
|
|
508
|
+
focus: Wt(t.focus)
|
|
509
509
|
}));
|
|
510
510
|
});
|
|
511
|
-
}), [o]),
|
|
511
|
+
}), [o]), re(() => {
|
|
512
512
|
if (!t) return;
|
|
513
513
|
let e = o.getRootElement();
|
|
514
514
|
if (!e || e.contains(document.activeElement) || !s.current && !i.current) return;
|
|
515
515
|
let n = () => {
|
|
516
516
|
o.update(() => {
|
|
517
517
|
if (!s.current && i.current) {
|
|
518
|
-
let e =
|
|
518
|
+
let e = Gt(i.current.anchor), t = Gt(i.current.focus);
|
|
519
519
|
if (e && t) {
|
|
520
|
-
let n =
|
|
520
|
+
let n = Ae();
|
|
521
521
|
n.anchor.set(e.key, e.offset, e.type), n.focus.set(t.key, t.offset, t.type), s.current = n;
|
|
522
522
|
}
|
|
523
523
|
i.current = void 0;
|
|
524
524
|
}
|
|
525
525
|
let e = s.current;
|
|
526
|
-
e &&
|
|
526
|
+
e && Ut(e.anchor) && Ut(e.focus) && Re(e.clone());
|
|
527
527
|
}, { discrete: !0 });
|
|
528
528
|
};
|
|
529
529
|
return e.addEventListener("focus", n, { once: !0 }), () => e.removeEventListener("focus", n);
|
|
530
530
|
}, [o, t]), null;
|
|
531
|
-
},
|
|
532
|
-
...
|
|
531
|
+
}, qt = {
|
|
532
|
+
...h,
|
|
533
533
|
paragraph: "rich-text__p rich-text__p--no-margin"
|
|
534
|
-
},
|
|
535
|
-
let n =
|
|
536
|
-
n[0] !== a || n[1] !== u || n[2] !==
|
|
534
|
+
}, Jt = [ft, rt], Yt = Z((e, t) => {
|
|
535
|
+
let n = J(54), { initialSelection: r, onSelectionChange: i, defaultState: a, debug: o, isEditable: s, placeholder: c } = e, l = o !== void 0 && o, u = s === void 0 || s, { focusRequested: d, onFocusRequestComplete: f } = e, p = d !== void 0 && d, { onChange: m, onError: h, onSubmit: g, onRecallPrevious: _, onRecallNext: y, commands: x } = e, S = h === void 0 ? Xt : h, C = x === void 0 ? [] : x, w;
|
|
536
|
+
n[0] !== a || n[1] !== u || n[2] !== S ? (w = {
|
|
537
537
|
namespace: "PROMPT_EDITOR",
|
|
538
|
-
nodes:
|
|
538
|
+
nodes: Jt,
|
|
539
539
|
editorState: a,
|
|
540
540
|
editable: u,
|
|
541
|
-
onError:
|
|
542
|
-
theme:
|
|
543
|
-
}, n[0] = a, n[1] = u, n[2] =
|
|
544
|
-
let
|
|
545
|
-
n[4] === a ? D = n[5] : (D =
|
|
546
|
-
let O =
|
|
547
|
-
n[6] === c ?
|
|
541
|
+
onError: S,
|
|
542
|
+
theme: qt
|
|
543
|
+
}, n[0] = a, n[1] = u, n[2] = S, n[3] = w) : w = n[3];
|
|
544
|
+
let T = w, D;
|
|
545
|
+
n[4] === a ? D = n[5] : (D = Nt(a), n[4] = a, n[5] = D);
|
|
546
|
+
let O = ie(D), ee;
|
|
547
|
+
n[6] === c ? ee = n[7] : (ee = c ?? /* @__PURE__ */ Y(W, {
|
|
548
548
|
textStyle: "label/M/regular",
|
|
549
549
|
color: "fg.subtle",
|
|
550
550
|
pointerEvents: "none",
|
|
551
551
|
position: "absolute",
|
|
552
552
|
top: "0",
|
|
553
553
|
children: "Type your message here."
|
|
554
|
-
}), n[6] = c, n[7] =
|
|
555
|
-
let
|
|
556
|
-
n[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
554
|
+
}), n[6] = c, n[7] = ee);
|
|
555
|
+
let te = ee, k = ne, A = ye, j;
|
|
556
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ Y(nt, {}), n[8] = j) : j = n[8];
|
|
557
|
+
let M;
|
|
558
|
+
n[9] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ Y(v, { fullWidth: !0 }), n[9] = M) : M = n[9];
|
|
559
|
+
let N;
|
|
560
|
+
n[10] === te ? N = n[11] : (N = /* @__PURE__ */ Y(we, {
|
|
561
|
+
contentEditable: M,
|
|
562
|
+
placeholder: te,
|
|
563
|
+
ErrorBoundary: be
|
|
564
|
+
}), n[10] = te, n[11] = N);
|
|
557
565
|
let P;
|
|
558
|
-
n[
|
|
559
|
-
let F;
|
|
560
|
-
n[10] === A ? F = n[11] : (F = /* @__PURE__ */ W(ve, {
|
|
561
|
-
contentEditable: P,
|
|
562
|
-
placeholder: A,
|
|
563
|
-
ErrorBoundary: me
|
|
564
|
-
}), n[10] = A, n[11] = F);
|
|
565
|
-
let I;
|
|
566
|
-
n[12] === g ? I = n[13] : (I = /* @__PURE__ */ W(qe, {
|
|
566
|
+
n[12] === m ? P = n[13] : (P = /* @__PURE__ */ Y($e, {
|
|
567
567
|
ignoreSelectionChange: !0,
|
|
568
568
|
ignoreHistoryMergeTagChange: !1,
|
|
569
569
|
onChange: (e) => {
|
|
570
570
|
e.read(() => {
|
|
571
|
-
let t =
|
|
572
|
-
t !== O.current && (O.current = t,
|
|
571
|
+
let t = At(Ne());
|
|
572
|
+
t !== O.current && (O.current = t, m?.(t, e.toJSON()));
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
}), n[12] =
|
|
576
|
-
let
|
|
577
|
-
n[14] === t ?
|
|
575
|
+
}), n[12] = m, n[13] = P);
|
|
576
|
+
let F;
|
|
577
|
+
n[14] === t ? F = n[15] : (F = /* @__PURE__ */ Y(It, {
|
|
578
578
|
editorRef: t,
|
|
579
579
|
previousTextRef: O
|
|
580
|
-
}), n[14] = t, n[15] =
|
|
581
|
-
let
|
|
582
|
-
n[16] === u ?
|
|
583
|
-
let
|
|
584
|
-
n[18] !== r || n[19] !== u || n[20] !== i ? (
|
|
580
|
+
}), n[14] = t, n[15] = F);
|
|
581
|
+
let I;
|
|
582
|
+
n[16] === u ? I = n[17] : (I = /* @__PURE__ */ Y(b, { isEditable: u }), n[16] = u, n[17] = I);
|
|
583
|
+
let L;
|
|
584
|
+
n[18] !== r || n[19] !== u || n[20] !== i ? (L = /* @__PURE__ */ Y(Kt, {
|
|
585
585
|
isEditable: u,
|
|
586
586
|
initialSelection: r,
|
|
587
587
|
onSelectionChange: i
|
|
588
|
-
}), n[18] = r, n[19] = u, n[20] = i, n[21] =
|
|
589
|
-
let
|
|
590
|
-
n[22] !==
|
|
591
|
-
requested:
|
|
588
|
+
}), n[18] = r, n[19] = u, n[20] = i, n[21] = L) : L = n[21];
|
|
589
|
+
let R;
|
|
590
|
+
n[22] !== p || n[23] !== u || n[24] !== f ? (R = /* @__PURE__ */ Y(kt, {
|
|
591
|
+
requested: p,
|
|
592
592
|
isEditable: u,
|
|
593
|
-
onComplete:
|
|
594
|
-
}), n[22] =
|
|
595
|
-
let
|
|
596
|
-
n[26] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
597
|
-
let
|
|
598
|
-
n[27] !==
|
|
599
|
-
onSubmit:
|
|
600
|
-
onRecallPrevious:
|
|
601
|
-
onRecallNext:
|
|
602
|
-
}), n[27] =
|
|
603
|
-
let
|
|
604
|
-
n[31] !==
|
|
605
|
-
let
|
|
606
|
-
n[35] === l ?
|
|
607
|
-
let
|
|
608
|
-
n[37] !==
|
|
609
|
-
initialConfig:
|
|
593
|
+
onComplete: f
|
|
594
|
+
}), n[22] = p, n[23] = u, n[24] = f, n[25] = R) : R = n[25];
|
|
595
|
+
let z;
|
|
596
|
+
n[26] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ Y(bt, {}), n[26] = z) : z = n[26];
|
|
597
|
+
let B;
|
|
598
|
+
n[27] !== y || n[28] !== _ || n[29] !== g ? (B = /* @__PURE__ */ Y(Ht, {
|
|
599
|
+
onSubmit: g,
|
|
600
|
+
onRecallPrevious: _,
|
|
601
|
+
onRecallNext: y
|
|
602
|
+
}), n[27] = y, n[28] = _, n[29] = g, n[30] = B) : B = n[30];
|
|
603
|
+
let V = wt, H = C.map(Zt).join("\n"), U;
|
|
604
|
+
n[31] !== V || n[32] !== C || n[33] !== H ? (U = /* @__PURE__ */ Y(V, { commands: C }, H), n[31] = V, n[32] = C, n[33] = H, n[34] = U) : U = n[34];
|
|
605
|
+
let G;
|
|
606
|
+
n[35] === l ? G = n[36] : (G = l ? /* @__PURE__ */ Y(E, {}) : "", n[35] = l, n[36] = G);
|
|
607
|
+
let K;
|
|
608
|
+
n[37] !== A || n[38] !== T || n[39] !== j || n[40] !== N || n[41] !== P || n[42] !== F || n[43] !== I || n[44] !== L || n[45] !== R || n[46] !== z || n[47] !== B || n[48] !== U || n[49] !== G ? (K = /* @__PURE__ */ X(A, {
|
|
609
|
+
initialConfig: T,
|
|
610
610
|
children: [
|
|
611
|
+
j,
|
|
611
612
|
N,
|
|
613
|
+
P,
|
|
612
614
|
F,
|
|
613
615
|
I,
|
|
614
616
|
L,
|
|
615
617
|
R,
|
|
616
618
|
z,
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
J,
|
|
621
|
-
Y
|
|
619
|
+
B,
|
|
620
|
+
U,
|
|
621
|
+
G
|
|
622
622
|
]
|
|
623
|
-
}), n[37] =
|
|
624
|
-
let
|
|
625
|
-
return n[51] !==
|
|
623
|
+
}), n[37] = A, n[38] = T, n[39] = j, n[40] = N, n[41] = P, n[42] = F, n[43] = I, n[44] = L, n[45] = R, n[46] = z, n[47] = B, n[48] = U, n[49] = G, n[50] = K) : K = n[50];
|
|
624
|
+
let q;
|
|
625
|
+
return n[51] !== k || n[52] !== K ? (q = /* @__PURE__ */ Y(k, {
|
|
626
626
|
direction: "column",
|
|
627
627
|
justifyContent: "space-between",
|
|
628
628
|
width: "100%",
|
|
629
629
|
position: "relative",
|
|
630
|
-
children:
|
|
631
|
-
}), n[51] =
|
|
630
|
+
children: K
|
|
631
|
+
}), n[51] = k, n[52] = K, n[53] = q) : q = n[53], q;
|
|
632
632
|
});
|
|
633
|
-
function
|
|
634
|
-
function
|
|
633
|
+
function Xt() {}
|
|
634
|
+
function Zt(e) {
|
|
635
635
|
return e.name;
|
|
636
636
|
}
|
|
637
637
|
//#endregion
|
|
638
638
|
//#region src/components/chat-ui/links/chat-code-link-node.ts
|
|
639
|
-
var
|
|
639
|
+
var Qt = class e extends Ke {
|
|
640
640
|
__href;
|
|
641
641
|
__description;
|
|
642
642
|
__animateArrival;
|
|
@@ -665,33 +665,50 @@ var Kt = class e extends Be {
|
|
|
665
665
|
updateDOM(e) {
|
|
666
666
|
return e.__text !== this.__text || e.__format !== this.__format || e.__href !== this.__href;
|
|
667
667
|
}
|
|
668
|
-
},
|
|
668
|
+
}, $t = class e extends Ve {
|
|
669
669
|
__candidate;
|
|
670
670
|
__label;
|
|
671
|
+
__format;
|
|
671
672
|
static getType() {
|
|
672
673
|
return "chat-resource-link";
|
|
673
674
|
}
|
|
674
675
|
static clone(t) {
|
|
675
|
-
return new e(t.__candidate, t.__label, t.__key);
|
|
676
|
+
return new e(t.__candidate, t.__label, t.__format, t.__key);
|
|
676
677
|
}
|
|
677
|
-
constructor(e, t, n) {
|
|
678
|
-
super(
|
|
678
|
+
constructor(e, t, n = 0, r) {
|
|
679
|
+
super(r), this.__candidate = e, this.__label = t, this.__format = n;
|
|
679
680
|
}
|
|
680
681
|
static importJSON(t) {
|
|
681
|
-
return new e(t.candidate, t.label);
|
|
682
|
+
return new e(t.candidate, t.label, t.format);
|
|
682
683
|
}
|
|
683
684
|
exportJSON() {
|
|
684
685
|
return {
|
|
685
686
|
...super.exportJSON(),
|
|
686
|
-
type:
|
|
687
|
+
type: this.getType(),
|
|
687
688
|
version: 1,
|
|
688
689
|
candidate: this.__candidate,
|
|
689
|
-
label: this.__label
|
|
690
|
+
label: this.__label,
|
|
691
|
+
format: this.__format
|
|
690
692
|
};
|
|
691
693
|
}
|
|
692
694
|
createDOM() {
|
|
693
695
|
return document.createElement("span");
|
|
694
696
|
}
|
|
697
|
+
static importDOM() {
|
|
698
|
+
return null;
|
|
699
|
+
}
|
|
700
|
+
exportDOM() {
|
|
701
|
+
let e = document.createTextNode(this.__label);
|
|
702
|
+
for (let [t, n] of D.toReversed()) {
|
|
703
|
+
if (!m(this.__format, t)) continue;
|
|
704
|
+
let r = document.createElement(n);
|
|
705
|
+
r.append(e), e = r;
|
|
706
|
+
}
|
|
707
|
+
let t = this.__candidate.origin === "markdown" && O(this.__candidate.source, "link");
|
|
708
|
+
if (!t) return { element: e };
|
|
709
|
+
let n = document.createElement("a");
|
|
710
|
+
return n.setAttribute("href", t), n.append(e), { element: n };
|
|
711
|
+
}
|
|
695
712
|
updateDOM() {
|
|
696
713
|
return !1;
|
|
697
714
|
}
|
|
@@ -702,37 +719,38 @@ var Kt = class e extends Be {
|
|
|
702
719
|
return this.__label;
|
|
703
720
|
}
|
|
704
721
|
matchesSource(e) {
|
|
705
|
-
return this.__candidate.origin === "markdown" ? e instanceof
|
|
722
|
+
return this.__candidate.origin === "markdown" ? e instanceof x && e.getSource() === this.__candidate.source && e.getTextContent() === this.__label : Le(e) && e.getFormat() === this.__format && e.getTextContent() === this.__candidate.source;
|
|
706
723
|
}
|
|
707
724
|
decorate() {
|
|
708
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ Y(c, {
|
|
709
726
|
candidate: this.__candidate,
|
|
710
|
-
label: this.__label
|
|
727
|
+
label: this.__label,
|
|
728
|
+
format: this.__format
|
|
711
729
|
});
|
|
712
730
|
}
|
|
713
|
-
},
|
|
714
|
-
if (e instanceof
|
|
731
|
+
}, en = (e, t, n, r = !1) => {
|
|
732
|
+
if (e instanceof Qt || !e.hasFormat("code")) return;
|
|
715
733
|
let i = e.getParent();
|
|
716
734
|
if (!i || i.getType() === "code" || i.getType().includes("link")) return;
|
|
717
735
|
let a = {
|
|
718
736
|
source: e.getTextContent(),
|
|
719
737
|
origin: "inline-code"
|
|
720
|
-
}, o =
|
|
738
|
+
}, o = l(a, n);
|
|
721
739
|
if (!o || o.kind === "external") return;
|
|
722
740
|
if (r) {
|
|
723
|
-
e.replace(new
|
|
741
|
+
e.replace(new $t(a, a.source, e.getFormat()));
|
|
724
742
|
return;
|
|
725
743
|
}
|
|
726
|
-
let s = new
|
|
744
|
+
let s = new Qt(a.source, t.resolveHref(a), t.describe?.(a), void 0, e instanceof I);
|
|
727
745
|
s.setFormat(e.getFormat()), e.replace(s);
|
|
728
|
-
},
|
|
746
|
+
}, tn = {
|
|
729
747
|
"(": ")",
|
|
730
748
|
"[": "]",
|
|
731
749
|
"{": "}"
|
|
732
|
-
},
|
|
750
|
+
}, nn = (e) => {
|
|
733
751
|
let t = 0, n = e.replace(/[.,;:!?]+$/, "").length, r = [], i = /* @__PURE__ */ new Map();
|
|
734
752
|
for (let t = 0; t < n; t++) {
|
|
735
|
-
let a = e[t], o =
|
|
753
|
+
let a = e[t], o = tn[a];
|
|
736
754
|
if (o) r.push({
|
|
737
755
|
close: o,
|
|
738
756
|
index: t
|
|
@@ -753,12 +771,12 @@ var Kt = class e extends Be {
|
|
|
753
771
|
offset: t
|
|
754
772
|
};
|
|
755
773
|
}
|
|
756
|
-
},
|
|
774
|
+
}, rn = (e) => {
|
|
757
775
|
let t = [];
|
|
758
776
|
for (let n of e.matchAll(/[^\s`"'<>]+/g)) {
|
|
759
|
-
let e =
|
|
777
|
+
let e = nn(n[0]);
|
|
760
778
|
if (!e) continue;
|
|
761
|
-
let { source: r, offset: i } = e, a =
|
|
779
|
+
let { source: r, offset: i } = e, a = l({
|
|
762
780
|
source: r,
|
|
763
781
|
origin: "text"
|
|
764
782
|
});
|
|
@@ -773,23 +791,39 @@ var Kt = class e extends Be {
|
|
|
773
791
|
});
|
|
774
792
|
}
|
|
775
793
|
return t;
|
|
776
|
-
},
|
|
777
|
-
if (!
|
|
794
|
+
}, an = (e) => {
|
|
795
|
+
if (!Le(e) || e.hasFormat("code")) return [e];
|
|
778
796
|
let t = e.getParent();
|
|
779
797
|
if (!t || t.getType() === "code" || t.getType().includes("link")) return [e];
|
|
780
|
-
let n = e.getTextContentSize(), r = [...new Set(
|
|
798
|
+
let n = e.getTextContentSize(), r = [...new Set(rn(e.getTextContent()).flatMap(({ start: e, end: t }) => [e, t]))].filter((e) => e > 0 && e < n).sort((e, t) => e - t);
|
|
781
799
|
return r.length ? e.splitText(...r) : [e];
|
|
782
|
-
},
|
|
800
|
+
}, on = (e) => {
|
|
783
801
|
if (e.hasFormat("code")) return;
|
|
784
802
|
let t = e.getParent();
|
|
785
|
-
if (t && t.getType() !== "code" && !t.getType().includes("link")) for (let t of
|
|
786
|
-
let e = t.getTextContent(), n =
|
|
787
|
-
n?.start === 0 && n.end === e.length && t.replace(new
|
|
803
|
+
if (t && t.getType() !== "code" && !t.getType().includes("link")) for (let t of an(e)) {
|
|
804
|
+
let e = t.getTextContent(), n = rn(e)[0];
|
|
805
|
+
Le(t) && n?.start === 0 && n.end === e.length && t.replace(new $t({
|
|
788
806
|
source: e,
|
|
789
807
|
origin: "text"
|
|
790
|
-
}, e));
|
|
808
|
+
}, e, t.getFormat()));
|
|
809
|
+
}
|
|
810
|
+
}, sn = class e extends $t {
|
|
811
|
+
static getType() {
|
|
812
|
+
return "chat-web-link";
|
|
813
|
+
}
|
|
814
|
+
static clone(t) {
|
|
815
|
+
return new e(t.__candidate, t.__label, t.__format, t.__key);
|
|
816
|
+
}
|
|
817
|
+
static importJSON(t) {
|
|
818
|
+
return new e(t.candidate, t.label, t.format);
|
|
791
819
|
}
|
|
792
|
-
|
|
820
|
+
decorate() {
|
|
821
|
+
return /* @__PURE__ */ Y(g, {
|
|
822
|
+
source: this.__candidate.source,
|
|
823
|
+
label: this.__label
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
}, cn = (e) => e instanceof MouseEvent && (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey), ln = (e, t) => {
|
|
793
827
|
if (t instanceof KeyboardEvent && t.key !== "Enter") return;
|
|
794
828
|
let n = t.target;
|
|
795
829
|
if (!(n instanceof Element)) return;
|
|
@@ -798,27 +832,32 @@ var Kt = class e extends Be {
|
|
|
798
832
|
let i = {
|
|
799
833
|
source: r.dataset.chatSource,
|
|
800
834
|
origin: r.dataset.chatOrigin === "markdown" ? "markdown" : "inline-code"
|
|
801
|
-
}, a =
|
|
835
|
+
}, a = l(i, window.location.origin);
|
|
802
836
|
if (!a) return;
|
|
803
837
|
let o = e.resolveHref(i);
|
|
804
|
-
(a.kind !== "external" || o) && (o &&
|
|
805
|
-
},
|
|
806
|
-
let e =
|
|
838
|
+
(a.kind !== "external" || o) && (o && cn(t) || (t.preventDefault(), t.stopImmediatePropagation(), e.open(i)));
|
|
839
|
+
}, un = () => {
|
|
840
|
+
let e = J(4), [t] = Ye(), n = p(), r, i;
|
|
807
841
|
return e[0] !== t || e[1] !== n ? (r = () => {
|
|
808
842
|
if (!n) return;
|
|
809
|
-
let e = t.registerNodeTransform(
|
|
843
|
+
let e = t.registerNodeTransform(x, (e) => {
|
|
810
844
|
let r = {
|
|
811
845
|
source: e.getSource(),
|
|
812
846
|
origin: "markdown"
|
|
813
|
-
}
|
|
847
|
+
};
|
|
848
|
+
if (!t.isEditable() && e.getChildren().every(Le) && _(n, r)) {
|
|
849
|
+
e.replace(new sn(r, e.getTextContent()));
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
let i = l(r, window.location.origin);
|
|
814
853
|
if (i && (i.kind !== "external" || n.resolveHref(r))) {
|
|
815
854
|
if (!t.isEditable()) {
|
|
816
|
-
e.replace(new
|
|
855
|
+
e.replace(new $t(r, e.getTextContent()));
|
|
817
856
|
return;
|
|
818
857
|
}
|
|
819
858
|
e.setResolvedURL(n.resolveHref(r) ?? "#");
|
|
820
859
|
}
|
|
821
|
-
}), r = t.registerMutationListener(
|
|
860
|
+
}), r = t.registerMutationListener(x, (e) => {
|
|
822
861
|
for (let [r, i] of e) {
|
|
823
862
|
if (i === "destroyed") continue;
|
|
824
863
|
let e = t.getElementByKey(r), a = e?.dataset.chatSource;
|
|
@@ -826,72 +865,72 @@ var Kt = class e extends Be {
|
|
|
826
865
|
let o = {
|
|
827
866
|
source: a,
|
|
828
867
|
origin: "markdown"
|
|
829
|
-
}, s =
|
|
868
|
+
}, s = l(o, window.location.origin);
|
|
830
869
|
s && (s.kind !== "external" || n.resolveHref(o)) && (e.title = n.describe?.(o) ?? `Open file or document: ${a}`);
|
|
831
870
|
}
|
|
832
871
|
}), i = (e) => {
|
|
833
|
-
|
|
834
|
-
}, a = t.registerNodeTransform(
|
|
872
|
+
en(e, n, window.location.origin, !t.isEditable()), !t.isEditable() && e.isAttached() && on(e);
|
|
873
|
+
}, a = t.registerNodeTransform(Ke, i), o = t.registerNodeTransform(I, i), s = (e) => ln(n, e), c = t.registerRootListener((e, t) => {
|
|
835
874
|
t?.removeEventListener("click", s, !0), t?.removeEventListener("keydown", s, !0), e?.addEventListener("click", s, !0), e?.addEventListener("keydown", s, !0), e && (e.dataset.chatLinks = "true");
|
|
836
875
|
});
|
|
837
876
|
return () => {
|
|
838
877
|
e(), a(), o(), r(), c();
|
|
839
878
|
};
|
|
840
|
-
}, i = [t, n], e[0] = t, e[1] = n, e[2] = r, e[3] = i) : (r = e[2], i = e[3]),
|
|
841
|
-
},
|
|
879
|
+
}, i = [t, n], e[0] = t, e[1] = n, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), Q(r, i), null;
|
|
880
|
+
}, dn = (e, t) => {
|
|
842
881
|
let n = (e) => {
|
|
843
882
|
let { children: t, ...n } = e.exportJSON();
|
|
844
|
-
return e instanceof
|
|
883
|
+
return e instanceof Qt ? JSON.stringify({
|
|
845
884
|
...n,
|
|
846
885
|
href: e.__href,
|
|
847
886
|
description: e.__description
|
|
848
887
|
}) : JSON.stringify(n);
|
|
849
888
|
};
|
|
850
889
|
return n(e) === n(t);
|
|
851
|
-
},
|
|
890
|
+
}, fn = (e, t) => e.getFormat() === t.getFormat() && e.getStyle() === t.getStyle(), pn = (e) => !!(e && Le(e) && ["text", "streaming-text"].includes(e.getType())), mn = (e, t) => P(t).setFormat(e.getFormat()).setStyle(e.getStyle()), hn = (e, t) => {
|
|
852
891
|
if (!t) return e;
|
|
853
|
-
if (
|
|
892
|
+
if (pn(e)) return mn(e, e.getTextContent());
|
|
854
893
|
let n = [e];
|
|
855
894
|
for (; n.length;) {
|
|
856
895
|
let e = n.pop();
|
|
857
|
-
if (
|
|
896
|
+
if (Fe(e)) for (let t of e.getChildren()) pn(t) ? t.replace(mn(t, t.getTextContent())) : n.push(t);
|
|
858
897
|
}
|
|
859
898
|
return e;
|
|
860
|
-
},
|
|
899
|
+
}, gn = (e, t, n, r) => {
|
|
861
900
|
let i = [], a = n, o = t[a], s = e.getTextContent();
|
|
862
|
-
for (;
|
|
863
|
-
return s &&
|
|
901
|
+
for (; Le(o) && fn(o, e) && o.getTextContent().length > 0 && s.startsWith(o.getTextContent()) && (s.length === o.getTextContentSize() || pn(o));) s = s.slice(o.getTextContentSize()), i.push(o), o = t[++a];
|
|
902
|
+
return s && pn(o) ? (o.setTextContent(s).setFormat(e.getFormat()).setStyle(e.getStyle()), i.push(o), a += 1) : s && i.push(r ? mn(e, s) : e.setTextContent(s).toggleUnmergeable()), {
|
|
864
903
|
nodes: i,
|
|
865
904
|
cursor: a
|
|
866
905
|
};
|
|
867
|
-
},
|
|
906
|
+
}, _n = (e, t, n) => {
|
|
868
907
|
let r = e.getChildren(), i = [], a = 0;
|
|
869
|
-
for (let e of t.flatMap(
|
|
908
|
+
for (let e of t.flatMap(an)) {
|
|
870
909
|
let t = r[a];
|
|
871
|
-
if (t instanceof
|
|
910
|
+
if (t instanceof $t && t.matchesSource(e)) {
|
|
872
911
|
i.push(t), a += 1;
|
|
873
912
|
continue;
|
|
874
913
|
}
|
|
875
|
-
if (
|
|
876
|
-
let t =
|
|
914
|
+
if (pn(e)) {
|
|
915
|
+
let t = gn(e, r, a, n);
|
|
877
916
|
i.push(...t.nodes), a = t.cursor;
|
|
878
917
|
continue;
|
|
879
918
|
}
|
|
880
|
-
t &&
|
|
919
|
+
t && dn(t, e) ? (Fe(t) && Fe(e) && _n(t, e.getChildren(), n), i.push(t), a += 1) : (i.push(hn(e, n && !t)), t && (a += 1));
|
|
881
920
|
}
|
|
882
921
|
(i.length !== r.length || i.some((e, t) => e.getKey() !== r[t]?.getKey())) && e.splice(0, e.getChildrenSize(), i);
|
|
883
|
-
},
|
|
884
|
-
|
|
885
|
-
},
|
|
886
|
-
function
|
|
887
|
-
let t =
|
|
922
|
+
}, vn = (e, t, n = !0) => {
|
|
923
|
+
_n(Ne(), M(e, t), n);
|
|
924
|
+
}, yn = "markdown-source-import";
|
|
925
|
+
function bn(e) {
|
|
926
|
+
let t = J(9), { body: n, resolver: r, isEditable: i, streaming: a, loadedRef: o, sourceDocumentRef: s } = e, [c] = Ye(), l, u;
|
|
888
927
|
return t[0] !== n || t[1] !== c || t[2] !== i || t[3] !== o || t[4] !== r || t[5] !== s || t[6] !== a ? (l = () => {
|
|
889
928
|
let e = o.current;
|
|
890
929
|
(e.body !== n || e.resolver !== r || i && !s.current) && c.update(() => {
|
|
891
|
-
if (
|
|
892
|
-
let e =
|
|
930
|
+
if (Oe(yn), i) {
|
|
931
|
+
let e = k(n, r);
|
|
893
932
|
s.current = e, e.importToLexical();
|
|
894
|
-
} else s.current = null,
|
|
933
|
+
} else s.current = null, vn(n, r, a && n.startsWith(e.body));
|
|
895
934
|
o.current = {
|
|
896
935
|
body: n,
|
|
897
936
|
resolver: r
|
|
@@ -905,141 +944,147 @@ function pn(e) {
|
|
|
905
944
|
c,
|
|
906
945
|
o,
|
|
907
946
|
s
|
|
908
|
-
], t[0] = n, t[1] = c, t[2] = i, t[3] = o, t[4] = r, t[5] = s, t[6] = a, t[7] = l, t[8] = u) : (l = t[7], u = t[8]),
|
|
947
|
+
], t[0] = n, t[1] = c, t[2] = i, t[3] = o, t[4] = r, t[5] = s, t[6] = a, t[7] = l, t[8] = u) : (l = t[7], u = t[8]), Q(l, u), null;
|
|
909
948
|
}
|
|
910
949
|
//#endregion
|
|
911
950
|
//#region src/components/rich-text/rich-message/rich-message.tsx
|
|
912
|
-
var
|
|
951
|
+
var xn = {
|
|
913
952
|
rowNumbers: !1,
|
|
914
953
|
wrapRows: !0
|
|
915
954
|
};
|
|
916
|
-
function
|
|
917
|
-
let t =
|
|
918
|
-
t[0] === e ?
|
|
919
|
-
let
|
|
920
|
-
|
|
955
|
+
function Sn(e) {
|
|
956
|
+
let t = J(8), n = p(), r = e.linkHandler ?? n, i = e.streaming ?? !1, a;
|
|
957
|
+
t[0] === e ? a = t[1] : (a = /* @__PURE__ */ Y(Cn, { ...e }), t[0] = e, t[1] = a);
|
|
958
|
+
let o;
|
|
959
|
+
t[2] !== i || t[3] !== a ? (o = /* @__PURE__ */ Y(f, {
|
|
960
|
+
value: i,
|
|
961
|
+
children: a
|
|
962
|
+
}), t[2] = i, t[3] = a, t[4] = o) : o = t[4];
|
|
963
|
+
let s;
|
|
964
|
+
return t[5] !== r || t[6] !== o ? (s = /* @__PURE__ */ Y(d, {
|
|
921
965
|
handler: r,
|
|
922
|
-
children:
|
|
923
|
-
}), t[
|
|
966
|
+
children: o
|
|
967
|
+
}), t[5] = r, t[6] = o, t[7] = s) : s = t[7], s;
|
|
924
968
|
}
|
|
925
|
-
function
|
|
926
|
-
let t =
|
|
927
|
-
t[0] === d ?
|
|
928
|
-
let { frontmatter:
|
|
929
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
930
|
-
let
|
|
931
|
-
t[3] !==
|
|
932
|
-
body:
|
|
969
|
+
function Cn(e) {
|
|
970
|
+
let t = J(66), { debug: n, defaultState: r, fullWidth: i, isEditable: a, streaming: o, resolveMarkdownUrl: s, onChange: c } = e, l = n !== void 0 && n, d = r === void 0 ? "" : r, f = i !== void 0 && i, p = a !== void 0 && a, m = o !== void 0 && o, h;
|
|
971
|
+
t[0] === d ? h = t[1] : (h = j(d), t[0] = d, t[1] = h);
|
|
972
|
+
let { frontmatter: g, body: _ } = h, x = p && !!c, D;
|
|
973
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (D = { key: "streamingText" }, t[2] = D) : D = t[2];
|
|
974
|
+
let O = K(D), A;
|
|
975
|
+
t[3] !== _ || t[4] !== s ? (A = {
|
|
976
|
+
body: _,
|
|
933
977
|
resolver: s
|
|
934
|
-
}, t[3] =
|
|
935
|
-
let
|
|
936
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
937
|
-
...
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
978
|
+
}, t[3] = _, t[4] = s, t[5] = A) : A = t[5];
|
|
979
|
+
let M = ie(A), N = ie(null), P;
|
|
980
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (P = [
|
|
981
|
+
...te,
|
|
982
|
+
Qt,
|
|
983
|
+
$t,
|
|
984
|
+
sn
|
|
985
|
+
], t[6] = P) : P = t[6];
|
|
986
|
+
let I;
|
|
987
|
+
t[7] !== _ || t[8] !== p || t[9] !== s ? (I = () => {
|
|
988
|
+
if (Oe(yn), p) {
|
|
989
|
+
let e = k(_, s);
|
|
990
|
+
N.current = e, e.importToLexical();
|
|
991
|
+
} else S(_, s);
|
|
992
|
+
}, t[7] = _, t[8] = p, t[9] = s, t[10] = I) : I = t[10];
|
|
993
|
+
let L;
|
|
994
|
+
t[11] !== p || t[12] !== I ? (L = {
|
|
950
995
|
namespace: "RICH_MESSAGE",
|
|
951
|
-
nodes:
|
|
952
|
-
editorState:
|
|
953
|
-
onError:
|
|
954
|
-
editable:
|
|
955
|
-
theme:
|
|
956
|
-
}, t[11] =
|
|
957
|
-
let
|
|
958
|
-
t[14] ===
|
|
959
|
-
let
|
|
960
|
-
t[16] !==
|
|
961
|
-
body:
|
|
996
|
+
nodes: P,
|
|
997
|
+
editorState: I,
|
|
998
|
+
onError: wn,
|
|
999
|
+
editable: p,
|
|
1000
|
+
theme: T
|
|
1001
|
+
}, t[11] = p, t[12] = I, t[13] = L) : L = t[13];
|
|
1002
|
+
let R = L, z;
|
|
1003
|
+
t[14] === O ? z = t[15] : (z = O(), t[14] = O, t[15] = z);
|
|
1004
|
+
let B;
|
|
1005
|
+
t[16] !== _ || t[17] !== p || t[18] !== s || t[19] !== m ? (B = /* @__PURE__ */ Y(bn, {
|
|
1006
|
+
body: _,
|
|
962
1007
|
resolver: s,
|
|
963
|
-
isEditable:
|
|
964
|
-
streaming:
|
|
965
|
-
loadedRef:
|
|
966
|
-
sourceDocumentRef:
|
|
967
|
-
}), t[16] =
|
|
968
|
-
let
|
|
969
|
-
t[21] ===
|
|
970
|
-
let
|
|
971
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
972
|
-
let
|
|
973
|
-
t[25] ===
|
|
974
|
-
let
|
|
975
|
-
t[27] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1008
|
+
isEditable: p,
|
|
1009
|
+
streaming: m,
|
|
1010
|
+
loadedRef: M,
|
|
1011
|
+
sourceDocumentRef: N
|
|
1012
|
+
}), t[16] = _, t[17] = p, t[18] = s, t[19] = m, t[20] = B) : B = t[20];
|
|
1013
|
+
let V;
|
|
1014
|
+
t[21] === p ? V = t[22] : (V = p ? /* @__PURE__ */ Y(Se, {}) : null, t[21] = p, t[22] = V);
|
|
1015
|
+
let H, U;
|
|
1016
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ Y(un, {}), U = /* @__PURE__ */ Y(at, { newTab: !0 }), t[23] = H, t[24] = U) : (H = t[23], U = t[24]);
|
|
1017
|
+
let W;
|
|
1018
|
+
t[25] === p ? W = t[26] : (W = p ? /* @__PURE__ */ Y(Ce, {}) : null, t[25] = p, t[26] = W);
|
|
1019
|
+
let G;
|
|
1020
|
+
t[27] === Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ Y(ee, {}), t[27] = G) : G = t[27];
|
|
1021
|
+
let q;
|
|
1022
|
+
t[28] === p ? q = t[29] : (q = p ? /* @__PURE__ */ Y(Te, { maxIndent: 7 }) : null, t[28] = p, t[29] = q);
|
|
976
1023
|
let Z;
|
|
977
|
-
t[
|
|
978
|
-
let re;
|
|
979
|
-
t[30] === x ? re = t[31] : (re = x ? /* @__PURE__ */ W(he, {}) : null, t[30] = x, t[31] = re);
|
|
1024
|
+
t[30] === p ? Z = t[31] : (Z = p ? /* @__PURE__ */ Y(xe, {}) : null, t[30] = p, t[31] = Z);
|
|
980
1025
|
let Q;
|
|
981
|
-
t[32] ===
|
|
1026
|
+
t[32] === m ? Q = t[33] : (Q = m ? null : /* @__PURE__ */ Y(C, {}), t[32] = m, t[33] = Q);
|
|
982
1027
|
let $;
|
|
983
|
-
t[34] ===
|
|
984
|
-
let
|
|
985
|
-
t[36] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
1028
|
+
t[34] === p ? $ = t[35] : ($ = p ? /* @__PURE__ */ Y(w, {}) : null, t[34] = p, t[35] = $);
|
|
1029
|
+
let re;
|
|
1030
|
+
t[36] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ Y(y, {}), t[36] = re) : re = t[36];
|
|
986
1031
|
let ae;
|
|
987
|
-
t[37] ===
|
|
988
|
-
contentEditable: /* @__PURE__ */
|
|
989
|
-
fullWidth:
|
|
1032
|
+
t[37] === f ? ae = t[38] : (ae = /* @__PURE__ */ Y(we, {
|
|
1033
|
+
contentEditable: /* @__PURE__ */ Y(v, {
|
|
1034
|
+
fullWidth: f,
|
|
990
1035
|
isRichMessage: !0
|
|
991
1036
|
}),
|
|
992
|
-
ErrorBoundary:
|
|
993
|
-
}), t[37] =
|
|
1037
|
+
ErrorBoundary: be
|
|
1038
|
+
}), t[37] = f, t[38] = ae);
|
|
994
1039
|
let oe;
|
|
995
|
-
t[39] !==
|
|
1040
|
+
t[39] !== g || t[40] !== c || t[41] !== x ? (oe = x ? /* @__PURE__ */ Y($e, {
|
|
996
1041
|
ignoreSelectionChange: !0,
|
|
997
1042
|
ignoreHistoryMergeTagChange: !1,
|
|
998
1043
|
onChange: (e, t, n) => {
|
|
999
1044
|
n.has("markdown-source-import") || e.read(() => {
|
|
1000
|
-
let e =
|
|
1001
|
-
|
|
1045
|
+
let e = Ne(), t = N.current?.exportFromLexical(e) ?? "";
|
|
1046
|
+
c?.(g + t);
|
|
1002
1047
|
});
|
|
1003
1048
|
}
|
|
1004
|
-
}) : null, t[39] =
|
|
1049
|
+
}) : null, t[39] = g, t[40] = c, t[41] = x, t[42] = oe) : oe = t[42];
|
|
1005
1050
|
let se;
|
|
1006
|
-
t[43] ===
|
|
1051
|
+
t[43] === p ? se = t[44] : (se = /* @__PURE__ */ Y(b, { isEditable: p }), t[43] = p, t[44] = se);
|
|
1007
1052
|
let ce;
|
|
1008
|
-
t[45] ===
|
|
1053
|
+
t[45] === l ? ce = t[46] : (ce = l && /* @__PURE__ */ Y(E, {}), t[45] = l, t[46] = ce);
|
|
1009
1054
|
let le;
|
|
1010
|
-
t[47] !==
|
|
1011
|
-
value:
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1013
|
-
initialConfig:
|
|
1055
|
+
t[47] !== R || t[48] !== B || t[49] !== V || t[50] !== W || t[51] !== q || t[52] !== Z || t[53] !== Q || t[54] !== $ || t[55] !== ae || t[56] !== oe || t[57] !== se || t[58] !== ce ? (le = /* @__PURE__ */ Y(F, {
|
|
1056
|
+
value: xn,
|
|
1057
|
+
children: /* @__PURE__ */ X(ye, {
|
|
1058
|
+
initialConfig: R,
|
|
1014
1059
|
children: [
|
|
1060
|
+
B,
|
|
1061
|
+
V,
|
|
1015
1062
|
H,
|
|
1016
|
-
|
|
1063
|
+
U,
|
|
1064
|
+
W,
|
|
1065
|
+
G,
|
|
1017
1066
|
q,
|
|
1018
|
-
J,
|
|
1019
|
-
Y,
|
|
1020
|
-
X,
|
|
1021
1067
|
Z,
|
|
1022
|
-
re,
|
|
1023
1068
|
Q,
|
|
1024
1069
|
$,
|
|
1025
|
-
|
|
1070
|
+
re,
|
|
1026
1071
|
ae,
|
|
1027
1072
|
oe,
|
|
1028
1073
|
se,
|
|
1029
1074
|
ce
|
|
1030
1075
|
]
|
|
1031
1076
|
})
|
|
1032
|
-
}), t[47] =
|
|
1077
|
+
}), t[47] = R, t[48] = B, t[49] = V, t[50] = W, t[51] = q, t[52] = Z, t[53] = Q, t[54] = $, t[55] = ae, t[56] = oe, t[57] = se, t[58] = ce, t[59] = le) : le = t[59];
|
|
1033
1078
|
let ue;
|
|
1034
|
-
t[60] !== s || t[61] !== le ? (ue = /* @__PURE__ */
|
|
1079
|
+
t[60] !== s || t[61] !== le ? (ue = /* @__PURE__ */ Y(u, {
|
|
1035
1080
|
resolver: s,
|
|
1036
1081
|
children: le
|
|
1037
1082
|
}), t[60] = s, t[61] = le, t[62] = ue) : ue = t[62];
|
|
1038
1083
|
let de;
|
|
1039
|
-
return t[63] !==
|
|
1084
|
+
return t[63] !== z || t[64] !== ue ? (de = /* @__PURE__ */ Y(ne, {
|
|
1040
1085
|
className: "rich-text",
|
|
1041
1086
|
"data-rich-message": "true",
|
|
1042
|
-
css:
|
|
1087
|
+
css: z,
|
|
1043
1088
|
justifyContent: "space-between",
|
|
1044
1089
|
width: "100%",
|
|
1045
1090
|
maxWidth: "100%",
|
|
@@ -1048,44 +1093,44 @@ function gn(e) {
|
|
|
1048
1093
|
direction: "column",
|
|
1049
1094
|
overflow: "hidden",
|
|
1050
1095
|
children: ue
|
|
1051
|
-
}), t[63] =
|
|
1096
|
+
}), t[63] = z, t[64] = ue, t[65] = de) : de = t[65], de;
|
|
1052
1097
|
}
|
|
1053
|
-
function
|
|
1098
|
+
function wn(e) {
|
|
1054
1099
|
return console.error(e);
|
|
1055
1100
|
}
|
|
1056
1101
|
//#endregion
|
|
1057
1102
|
//#region src/components/rich-text/resource-activity-feed/resource-activity-feed.tsx
|
|
1058
|
-
var
|
|
1059
|
-
activity:
|
|
1060
|
-
bell:
|
|
1061
|
-
"circle-alert":
|
|
1062
|
-
component:
|
|
1063
|
-
"external-link":
|
|
1064
|
-
"git-branch":
|
|
1065
|
-
info:
|
|
1066
|
-
"message-circle":
|
|
1067
|
-
"scan-search":
|
|
1068
|
-
sparkles:
|
|
1069
|
-
},
|
|
1070
|
-
let t =
|
|
1071
|
-
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */
|
|
1103
|
+
var Tn = {
|
|
1104
|
+
activity: oe,
|
|
1105
|
+
bell: se,
|
|
1106
|
+
"circle-alert": ce,
|
|
1107
|
+
component: le,
|
|
1108
|
+
"external-link": ue,
|
|
1109
|
+
"git-branch": de,
|
|
1110
|
+
info: fe,
|
|
1111
|
+
"message-circle": pe,
|
|
1112
|
+
"scan-search": me,
|
|
1113
|
+
sparkles: he
|
|
1114
|
+
}, En = (e) => {
|
|
1115
|
+
let t = J(2), n = Tn[e.name], r;
|
|
1116
|
+
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ Y(B, {
|
|
1072
1117
|
as: n,
|
|
1073
1118
|
boxSize: "13px"
|
|
1074
1119
|
}), t[0] = n, t[1] = r), r;
|
|
1075
|
-
},
|
|
1076
|
-
let t =
|
|
1120
|
+
}, Dn = (e) => {
|
|
1121
|
+
let t = J(12), { item: n, size: r, onActionSelect: i, onRelatedResourceSelect: a } = e, o = n.kind === "message" ? n.attention?.actions : void 0;
|
|
1077
1122
|
if (!n.relatedResources?.length && !o?.length) return null;
|
|
1078
1123
|
let s;
|
|
1079
|
-
t[0] !== o || t[1] !== n || t[2] !== i || t[3] !== r ? (s = o?.map((e) => /* @__PURE__ */
|
|
1124
|
+
t[0] !== o || t[1] !== n || t[2] !== i || t[3] !== r ? (s = o?.map((e) => /* @__PURE__ */ X(R, {
|
|
1080
1125
|
type: "button",
|
|
1081
1126
|
size: r === "compact" ? "2xs" : "xs",
|
|
1082
1127
|
variant: "outline",
|
|
1083
1128
|
disabled: !i,
|
|
1084
1129
|
onClick: () => i?.(e, n),
|
|
1085
|
-
children: [e.icon ? /* @__PURE__ */
|
|
1130
|
+
children: [e.icon ? /* @__PURE__ */ Y(En, { name: e.icon }) : null, e.label]
|
|
1086
1131
|
}, e.id)), t[0] = o, t[1] = n, t[2] = i, t[3] = r, t[4] = s) : s = t[4];
|
|
1087
1132
|
let c;
|
|
1088
|
-
t[5] !== n || t[6] !== a || t[7] !== r ? (c = n.relatedResources?.map((e) => /* @__PURE__ */
|
|
1133
|
+
t[5] !== n || t[6] !== a || t[7] !== r ? (c = n.relatedResources?.map((e) => /* @__PURE__ */ Y(R, {
|
|
1089
1134
|
type: "button",
|
|
1090
1135
|
size: r === "compact" ? "2xs" : "xs",
|
|
1091
1136
|
variant: "ghost",
|
|
@@ -1094,54 +1139,54 @@ var vn = {
|
|
|
1094
1139
|
children: e.label
|
|
1095
1140
|
}, `${e.type}:${e.id}`)), t[5] = n, t[6] = a, t[7] = r, t[8] = c) : c = t[8];
|
|
1096
1141
|
let l;
|
|
1097
|
-
return t[9] !== s || t[10] !== c ? (l = /* @__PURE__ */
|
|
1142
|
+
return t[9] !== s || t[10] !== c ? (l = /* @__PURE__ */ X(z, {
|
|
1098
1143
|
gap: "2xs",
|
|
1099
1144
|
flexWrap: "wrap",
|
|
1100
1145
|
children: [s, c]
|
|
1101
1146
|
}), t[9] = s, t[10] = c, t[11] = l) : l = t[11], l;
|
|
1102
|
-
},
|
|
1103
|
-
let t =
|
|
1147
|
+
}, On = (e) => {
|
|
1148
|
+
let t = J(7), { attention: n } = e;
|
|
1104
1149
|
if (!n.statusLabel) return null;
|
|
1105
1150
|
let r = n.icon ?? "bell", i;
|
|
1106
|
-
t[0] === r ? i = t[1] : (i = /* @__PURE__ */
|
|
1151
|
+
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ Y(En, { name: r }), t[0] = r, t[1] = i);
|
|
1107
1152
|
let a;
|
|
1108
|
-
t[2] === n.statusLabel ? a = t[3] : (a = /* @__PURE__ */ W
|
|
1153
|
+
t[2] === n.statusLabel ? a = t[3] : (a = /* @__PURE__ */ Y(W, {
|
|
1109
1154
|
textStyle: "label/XS/medium",
|
|
1110
1155
|
children: n.statusLabel
|
|
1111
1156
|
}), t[2] = n.statusLabel, t[3] = a);
|
|
1112
1157
|
let o;
|
|
1113
|
-
return t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */
|
|
1158
|
+
return t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */ X(z, {
|
|
1114
1159
|
gap: "2xs",
|
|
1115
1160
|
color: "fg.warning",
|
|
1116
1161
|
children: [i, a]
|
|
1117
1162
|
}), t[4] = i, t[5] = a, t[6] = o) : o = t[6], o;
|
|
1118
|
-
},
|
|
1119
|
-
let i =
|
|
1163
|
+
}, kn = (n) => {
|
|
1164
|
+
let i = J(50), { item: a, size: o, fallbackActorName: s, formatTimestamp: c, onActionSelect: l, onRelatedResourceSelect: u } = n, d;
|
|
1120
1165
|
i[0] !== s || i[1] !== a.actor ? (d = a.actor ?? { name: s }, i[0] = s, i[1] = a.actor, i[2] = d) : d = i[2];
|
|
1121
1166
|
let f = d, p;
|
|
1122
1167
|
i[3] !== c || i[4] !== a ? (p = a.timestampLabel ?? c(a.createdAt, a), i[3] = c, i[4] = a, i[5] = p) : p = i[5];
|
|
1123
1168
|
let m;
|
|
1124
|
-
i[6] !== a.createdAt || i[7] !== p ? (m = /* @__PURE__ */
|
|
1169
|
+
i[6] !== a.createdAt || i[7] !== p ? (m = /* @__PURE__ */ Y("time", {
|
|
1125
1170
|
dateTime: a.createdAt,
|
|
1126
1171
|
children: p
|
|
1127
1172
|
}), i[6] = a.createdAt, i[7] = p, i[8] = m) : m = i[8];
|
|
1128
1173
|
let h = m;
|
|
1129
1174
|
if (a.kind === "event") {
|
|
1130
1175
|
let n;
|
|
1131
|
-
i[9] === a.icon ? n = i[10] : (n = a.icon ? /* @__PURE__ */
|
|
1176
|
+
i[9] === a.icon ? n = i[10] : (n = a.icon ? /* @__PURE__ */ Y(En, { name: a.icon }) : void 0, i[9] = a.icon, i[10] = n);
|
|
1132
1177
|
let r = o === "compact" ? "sm" : "md", s;
|
|
1133
|
-
i[11] === a.summary ? s = i[12] : (s = /* @__PURE__ */ W
|
|
1178
|
+
i[11] === a.summary ? s = i[12] : (s = /* @__PURE__ */ Y(W, {
|
|
1134
1179
|
as: "span",
|
|
1135
1180
|
children: a.summary
|
|
1136
1181
|
}), i[11] = a.summary, i[12] = s);
|
|
1137
1182
|
let c;
|
|
1138
|
-
i[13] !== a || i[14] !== u || i[15] !== o ? (c = /* @__PURE__ */
|
|
1183
|
+
i[13] !== a || i[14] !== u || i[15] !== o ? (c = /* @__PURE__ */ Y(Dn, {
|
|
1139
1184
|
item: a,
|
|
1140
1185
|
size: o,
|
|
1141
1186
|
onRelatedResourceSelect: u
|
|
1142
1187
|
}), i[13] = a, i[14] = u, i[15] = o, i[16] = c) : c = i[16];
|
|
1143
1188
|
let l;
|
|
1144
|
-
return i[17] !== f || i[18] !== n || i[19] !== r || i[20] !== s || i[21] !== c || i[22] !== h ? (l = /* @__PURE__ */
|
|
1189
|
+
return i[17] !== f || i[18] !== n || i[19] !== r || i[20] !== s || i[21] !== c || i[22] !== h ? (l = /* @__PURE__ */ Y(e, { children: /* @__PURE__ */ X(t, {
|
|
1145
1190
|
actor: f,
|
|
1146
1191
|
icon: n,
|
|
1147
1192
|
timestamp: h,
|
|
@@ -1150,28 +1195,28 @@ var vn = {
|
|
|
1150
1195
|
}) }), i[17] = f, i[18] = n, i[19] = r, i[20] = s, i[21] = c, i[22] = h, i[23] = l) : l = i[23], l;
|
|
1151
1196
|
}
|
|
1152
1197
|
let g = a.attention?.icon ?? "bell", _;
|
|
1153
|
-
i[24] !== g || i[25] !== a.attention ? (_ = a.attention ? /* @__PURE__ */
|
|
1198
|
+
i[24] !== g || i[25] !== a.attention ? (_ = a.attention ? /* @__PURE__ */ Y(En, { name: g }) : void 0, i[24] = g, i[25] = a.attention, i[26] = _) : _ = i[26];
|
|
1154
1199
|
let v = a.attention ? "fg.warning" : void 0, y = a.attention ? "bg.warning" : void 0, b;
|
|
1155
|
-
i[27] === a.attention ? b = i[28] : (b = a.attention ? /* @__PURE__ */
|
|
1200
|
+
i[27] === a.attention ? b = i[28] : (b = a.attention ? /* @__PURE__ */ Y(On, { attention: a.attention }) : void 0, i[27] = a.attention, i[28] = b);
|
|
1156
1201
|
let x = a.attention ? "attention" : "default", S = o === "compact" ? "xs" : "sm", C;
|
|
1157
|
-
i[29] === a.markdown ? C = i[30] : (C = /* @__PURE__ */
|
|
1202
|
+
i[29] === a.markdown ? C = i[30] : (C = /* @__PURE__ */ Y(Sn, {
|
|
1158
1203
|
defaultState: a.markdown,
|
|
1159
1204
|
fullWidth: !0
|
|
1160
1205
|
}), i[29] = a.markdown, i[30] = C);
|
|
1161
1206
|
let w;
|
|
1162
|
-
i[31] !== a || i[32] !== l || i[33] !== u || i[34] !== o ? (w = /* @__PURE__ */
|
|
1207
|
+
i[31] !== a || i[32] !== l || i[33] !== u || i[34] !== o ? (w = /* @__PURE__ */ Y(Dn, {
|
|
1163
1208
|
item: a,
|
|
1164
1209
|
size: o,
|
|
1165
1210
|
onActionSelect: l,
|
|
1166
1211
|
onRelatedResourceSelect: u
|
|
1167
1212
|
}), i[31] = a, i[32] = l, i[33] = u, i[34] = o, i[35] = w) : w = i[35];
|
|
1168
1213
|
let T;
|
|
1169
|
-
i[36] !== w || i[37] !== S || i[38] !== C ? (T = /* @__PURE__ */
|
|
1214
|
+
i[36] !== w || i[37] !== S || i[38] !== C ? (T = /* @__PURE__ */ X(H, {
|
|
1170
1215
|
gap: S,
|
|
1171
1216
|
children: [C, w]
|
|
1172
1217
|
}), i[36] = w, i[37] = S, i[38] = C, i[39] = T) : T = i[39];
|
|
1173
1218
|
let E;
|
|
1174
|
-
return i[40] !== f || i[41] !== o || i[42] !== T || i[43] !== _ || i[44] !== v || i[45] !== y || i[46] !== b || i[47] !== x || i[48] !== h ? (E = /* @__PURE__ */
|
|
1219
|
+
return i[40] !== f || i[41] !== o || i[42] !== T || i[43] !== _ || i[44] !== v || i[45] !== y || i[46] !== b || i[47] !== x || i[48] !== h ? (E = /* @__PURE__ */ Y(r, {
|
|
1175
1220
|
actor: f,
|
|
1176
1221
|
icon: _,
|
|
1177
1222
|
iconColor: v,
|
|
@@ -1182,13 +1227,13 @@ var vn = {
|
|
|
1182
1227
|
size: o,
|
|
1183
1228
|
children: T
|
|
1184
1229
|
}), i[40] = f, i[41] = o, i[42] = T, i[43] = _, i[44] = v, i[45] = y, i[46] = b, i[47] = x, i[48] = h, i[49] = E) : E = i[49], E;
|
|
1185
|
-
},
|
|
1186
|
-
let t =
|
|
1230
|
+
}, An = (e) => e, jn = (e) => {
|
|
1231
|
+
let t = J(56), r, a, o, c, l, u, d, f, p, m, h, g, _, v, y, b, x;
|
|
1187
1232
|
t[0] === e ? (r = t[1], a = t[2], o = t[3], c = t[4], l = t[5], u = t[6], d = t[7], f = t[8], p = t[9], m = t[10], h = t[11], g = t[12], _ = t[13], v = t[14], y = t[15], b = t[16], x = t[17]) : ({items: a, size: d, isLoading: f, error: r, hasMore: m, isLoadingMore: h, emptyTitle: g, emptyDescription: _, errorTitle: v, loadMoreLabel: y, loadingLabel: b, fallbackActorName: x, formatTimestamp: p, onActionSelect: o, onLoadMore: c, onRelatedResourceSelect: l, ...u} = e, t[0] = e, t[1] = r, t[2] = a, t[3] = o, t[4] = c, t[5] = l, t[6] = u, t[7] = d, t[8] = f, t[9] = p, t[10] = m, t[11] = h, t[12] = g, t[13] = _, t[14] = v, t[15] = y, t[16] = b, t[17] = x);
|
|
1188
|
-
let S = d === void 0 ? "comfortable" : d, C = f !== void 0 && f, w = m !== void 0 && m, T = h !== void 0 && h, E = g === void 0 ? "No activity yet" : g, D = _ === void 0 ? "Events and messages will appear here." : _, O = v === void 0 ? "Activity unavailable" : v,
|
|
1233
|
+
let S = d === void 0 ? "comfortable" : d, C = f !== void 0 && f, w = m !== void 0 && m, T = h !== void 0 && h, E = g === void 0 ? "No activity yet" : g, D = _ === void 0 ? "Events and messages will appear here." : _, O = v === void 0 ? "Activity unavailable" : v, ee = y === void 0 ? "Load more" : y, te = b === void 0 ? "Loading activity" : b, k = x === void 0 ? "System" : x, A = p === void 0 ? An : p;
|
|
1189
1234
|
if (r) {
|
|
1190
1235
|
let e;
|
|
1191
|
-
return t[18] !== r || t[19] !== O || t[20] !== u ? (e = /* @__PURE__ */
|
|
1236
|
+
return t[18] !== r || t[19] !== O || t[20] !== u ? (e = /* @__PURE__ */ Y(i, {
|
|
1192
1237
|
status: "error",
|
|
1193
1238
|
colorPalette: "red",
|
|
1194
1239
|
title: O,
|
|
@@ -1199,14 +1244,14 @@ var vn = {
|
|
|
1199
1244
|
}
|
|
1200
1245
|
if (C && a.length === 0) {
|
|
1201
1246
|
let e;
|
|
1202
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
1247
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(V, { size: "sm" }), t[22] = e) : e = t[22];
|
|
1203
1248
|
let n;
|
|
1204
|
-
t[23] ===
|
|
1249
|
+
t[23] === te ? n = t[24] : (n = /* @__PURE__ */ Y(W, {
|
|
1205
1250
|
textStyle: "label/S/regular",
|
|
1206
|
-
children:
|
|
1207
|
-
}), t[23] =
|
|
1251
|
+
children: te
|
|
1252
|
+
}), t[23] = te, t[24] = n);
|
|
1208
1253
|
let r;
|
|
1209
|
-
return t[25] !== u || t[26] !== n ? (r = /* @__PURE__ */
|
|
1254
|
+
return t[25] !== u || t[26] !== n ? (r = /* @__PURE__ */ X(z, {
|
|
1210
1255
|
role: "status",
|
|
1211
1256
|
"aria-live": "polite",
|
|
1212
1257
|
gap: "xs",
|
|
@@ -1217,48 +1262,48 @@ var vn = {
|
|
|
1217
1262
|
}
|
|
1218
1263
|
if (a.length === 0) {
|
|
1219
1264
|
let e;
|
|
1220
|
-
return t[28] !== D || t[29] !== E || t[30] !== u ? (e = /* @__PURE__ */
|
|
1265
|
+
return t[28] !== D || t[29] !== E || t[30] !== u ? (e = /* @__PURE__ */ Y(s, {
|
|
1221
1266
|
title: E,
|
|
1222
1267
|
description: D,
|
|
1223
1268
|
...u
|
|
1224
1269
|
}), t[28] = D, t[29] = E, t[30] = u, t[31] = e) : e = t[31], e;
|
|
1225
1270
|
}
|
|
1226
|
-
let
|
|
1227
|
-
if (t[32] !==
|
|
1271
|
+
let j = S === "compact" ? "sm" : "md", M;
|
|
1272
|
+
if (t[32] !== k || t[33] !== A || t[34] !== a || t[35] !== o || t[36] !== l || t[37] !== S) {
|
|
1228
1273
|
let e;
|
|
1229
|
-
t[39] !==
|
|
1274
|
+
t[39] !== k || t[40] !== A || t[41] !== o || t[42] !== l || t[43] !== S ? (e = (e) => /* @__PURE__ */ Y(kn, {
|
|
1230
1275
|
item: e,
|
|
1231
1276
|
size: S,
|
|
1232
|
-
fallbackActorName:
|
|
1233
|
-
formatTimestamp:
|
|
1277
|
+
fallbackActorName: k,
|
|
1278
|
+
formatTimestamp: A,
|
|
1234
1279
|
onActionSelect: o,
|
|
1235
1280
|
onRelatedResourceSelect: l
|
|
1236
|
-
}, e.id), t[39] =
|
|
1237
|
-
} else
|
|
1238
|
-
let
|
|
1239
|
-
t[45] !== w || t[46] !== T || t[47] !==
|
|
1281
|
+
}, e.id), t[39] = k, t[40] = A, t[41] = o, t[42] = l, t[43] = S, t[44] = e) : e = t[44], M = a.map(e), t[32] = k, t[33] = A, t[34] = a, t[35] = o, t[36] = l, t[37] = S, t[38] = M;
|
|
1282
|
+
} else M = t[38];
|
|
1283
|
+
let N;
|
|
1284
|
+
t[45] !== w || t[46] !== T || t[47] !== ee || t[48] !== c || t[49] !== S ? (N = w ? /* @__PURE__ */ Y(R, {
|
|
1240
1285
|
type: "button",
|
|
1241
1286
|
width: "full",
|
|
1242
1287
|
size: S === "compact" ? "xs" : "sm",
|
|
1243
1288
|
variant: "ghost",
|
|
1244
1289
|
loading: T,
|
|
1245
1290
|
onClick: c,
|
|
1246
|
-
children:
|
|
1247
|
-
}) : null, t[45] = w, t[46] = T, t[47] =
|
|
1248
|
-
let
|
|
1249
|
-
return t[51] !== u || t[52] !==
|
|
1250
|
-
gap:
|
|
1291
|
+
children: ee
|
|
1292
|
+
}) : null, t[45] = w, t[46] = T, t[47] = ee, t[48] = c, t[49] = S, t[50] = N) : N = t[50];
|
|
1293
|
+
let P;
|
|
1294
|
+
return t[51] !== u || t[52] !== j || t[53] !== M || t[54] !== N ? (P = /* @__PURE__ */ X(n, {
|
|
1295
|
+
gap: j,
|
|
1251
1296
|
...u,
|
|
1252
|
-
children: [
|
|
1253
|
-
}), t[51] = u, t[52] =
|
|
1254
|
-
},
|
|
1255
|
-
let t =
|
|
1297
|
+
children: [M, N]
|
|
1298
|
+
}), t[51] = u, t[52] = j, t[53] = M, t[54] = N, t[55] = P) : P = t[55], P;
|
|
1299
|
+
}, Mn = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", Nn = (e) => e == null ? "-" : typeof e == "string" ? e.length ? e : "-" : typeof e == "number" || typeof e == "boolean" ? String(e).toUpperCase() : e instanceof Date ? e.toISOString() : JSON.stringify(e), Pn = (e) => {
|
|
1300
|
+
let t = J(8), { defaultCode: n, isEditable: r, showLineNumbers: i, disableScroll: o } = e, s = n === void 0 ? "" : n, c = r !== void 0 && r, l = i !== void 0 && i, u = o !== void 0 && o;
|
|
1256
1301
|
if (c) {
|
|
1257
1302
|
let e;
|
|
1258
|
-
return t[0] === s ? e = t[1] : (e = /* @__PURE__ */
|
|
1303
|
+
return t[0] === s ? e = t[1] : (e = /* @__PURE__ */ Y(G, {
|
|
1259
1304
|
defaultValue: s,
|
|
1260
1305
|
fontFamily: "mono",
|
|
1261
|
-
fontSize:
|
|
1306
|
+
fontSize: Mn,
|
|
1262
1307
|
resize: "vertical",
|
|
1263
1308
|
minHeight: "100%"
|
|
1264
1309
|
}), t[0] = s, t[1] = e), e;
|
|
@@ -1266,24 +1311,24 @@ var vn = {
|
|
|
1266
1311
|
let d;
|
|
1267
1312
|
if (t[2] !== s || t[3] !== u || t[4] !== l) {
|
|
1268
1313
|
let e = l ? s.split("\n") : [s];
|
|
1269
|
-
d = /* @__PURE__ */
|
|
1314
|
+
d = /* @__PURE__ */ Y(L, {
|
|
1270
1315
|
as: "pre",
|
|
1271
1316
|
margin: 0,
|
|
1272
1317
|
padding: "sm",
|
|
1273
1318
|
fontFamily: "mono",
|
|
1274
|
-
fontSize:
|
|
1319
|
+
fontSize: Mn,
|
|
1275
1320
|
lineHeight: "1.5",
|
|
1276
1321
|
background: "bg.code",
|
|
1277
1322
|
borderRadius: "md",
|
|
1278
1323
|
width: "100%",
|
|
1279
1324
|
overflowY: u ? "hidden" : void 0,
|
|
1280
|
-
children: l ? /* @__PURE__ */
|
|
1325
|
+
children: l ? /* @__PURE__ */ Y(L, {
|
|
1281
1326
|
as: "code",
|
|
1282
1327
|
display: "grid",
|
|
1283
1328
|
gridTemplateColumns: "auto 1fr",
|
|
1284
1329
|
columnGap: "sm",
|
|
1285
|
-
children: e.map(
|
|
1286
|
-
}) : /* @__PURE__ */
|
|
1330
|
+
children: e.map(In)
|
|
1331
|
+
}) : /* @__PURE__ */ Y(L, {
|
|
1287
1332
|
as: "code",
|
|
1288
1333
|
children: s
|
|
1289
1334
|
})
|
|
@@ -1292,27 +1337,27 @@ var vn = {
|
|
|
1292
1337
|
let f = d;
|
|
1293
1338
|
if (u) return f;
|
|
1294
1339
|
let p;
|
|
1295
|
-
return t[6] === f ? p = t[7] : (p = /* @__PURE__ */
|
|
1340
|
+
return t[6] === f ? p = t[7] : (p = /* @__PURE__ */ Y(a, {
|
|
1296
1341
|
width: "100%",
|
|
1297
1342
|
background: "bg.code",
|
|
1298
1343
|
borderRadius: "md",
|
|
1299
1344
|
showHorizontalScrollbar: !0,
|
|
1300
1345
|
children: f
|
|
1301
1346
|
}), t[6] = f, t[7] = p), p;
|
|
1302
|
-
},
|
|
1303
|
-
let t =
|
|
1347
|
+
}, Fn = (e) => {
|
|
1348
|
+
let t = J(26), { data: n, fullWidth: r, noBorder: i, hiddenColumns: o } = e, s = r !== void 0 && r, c = i !== void 0 && i, l;
|
|
1304
1349
|
t[0] === o ? l = t[1] : (l = o === void 0 ? [] : o, t[0] = o, t[1] = l);
|
|
1305
1350
|
let u = l;
|
|
1306
1351
|
if (!n.length) {
|
|
1307
1352
|
let e = c ? "0" : "1px", n;
|
|
1308
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ W
|
|
1353
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Y(W, {
|
|
1309
1354
|
textStyle: "label/S/regular",
|
|
1310
|
-
fontSize:
|
|
1355
|
+
fontSize: Mn,
|
|
1311
1356
|
color: "fg.muted",
|
|
1312
1357
|
children: "No data"
|
|
1313
1358
|
}), t[2] = n) : n = t[2];
|
|
1314
1359
|
let r;
|
|
1315
|
-
return t[3] === e ? r = t[4] : (r = /* @__PURE__ */
|
|
1360
|
+
return t[3] === e ? r = t[4] : (r = /* @__PURE__ */ Y(L, {
|
|
1316
1361
|
padding: "sm",
|
|
1317
1362
|
borderWidth: e,
|
|
1318
1363
|
borderColor: "border.subtle",
|
|
@@ -1326,31 +1371,31 @@ var vn = {
|
|
|
1326
1371
|
let m;
|
|
1327
1372
|
t[9] !== f || t[10] !== p ? (m = p.filter((e) => !f.has(e)), t[9] = f, t[10] = p, t[11] = m) : m = t[11];
|
|
1328
1373
|
let h = m, g = s ? "100%" : "fit-content", _ = c ? "0" : "1px", v;
|
|
1329
|
-
t[12] === h ? v = t[13] : (v = /* @__PURE__ */
|
|
1374
|
+
t[12] === h ? v = t[13] : (v = /* @__PURE__ */ Y(U.Header, { children: /* @__PURE__ */ Y(U.Row, {
|
|
1330
1375
|
background: "bg.muted",
|
|
1331
|
-
children: h.map(
|
|
1376
|
+
children: h.map(Ln)
|
|
1332
1377
|
}) }), t[12] = h, t[13] = v);
|
|
1333
1378
|
let y;
|
|
1334
1379
|
if (t[14] !== h || t[15] !== n) {
|
|
1335
1380
|
let e;
|
|
1336
|
-
t[17] === h ? e = t[18] : (e = (e, t) => /* @__PURE__ */
|
|
1381
|
+
t[17] === h ? e = t[18] : (e = (e, t) => /* @__PURE__ */ Y(U.Row, { children: h.map((n) => /* @__PURE__ */ Y(U.Cell, {
|
|
1337
1382
|
paddingX: "xs",
|
|
1338
1383
|
paddingY: "2xs",
|
|
1339
|
-
children: /* @__PURE__ */ W
|
|
1384
|
+
children: /* @__PURE__ */ Y(W, {
|
|
1340
1385
|
textStyle: "paragraph/S/regular",
|
|
1341
|
-
fontSize:
|
|
1342
|
-
children:
|
|
1386
|
+
fontSize: Mn,
|
|
1387
|
+
children: Nn(e[n])
|
|
1343
1388
|
})
|
|
1344
1389
|
}, `${t}-${n}`)) }, `${t}-${h.join("-")}`), t[17] = h, t[18] = e), y = n.map(e), t[14] = h, t[15] = n, t[16] = y;
|
|
1345
1390
|
} else y = t[16];
|
|
1346
1391
|
let b;
|
|
1347
|
-
t[19] === y ? b = t[20] : (b = /* @__PURE__ */
|
|
1392
|
+
t[19] === y ? b = t[20] : (b = /* @__PURE__ */ Y(U.Body, { children: y }), t[19] = y, t[20] = b);
|
|
1348
1393
|
let x;
|
|
1349
|
-
return t[21] !== b || t[22] !== g || t[23] !== _ || t[24] !== v ? (x = /* @__PURE__ */
|
|
1394
|
+
return t[21] !== b || t[22] !== g || t[23] !== _ || t[24] !== v ? (x = /* @__PURE__ */ Y(a, {
|
|
1350
1395
|
maxWidth: "100%",
|
|
1351
1396
|
showHorizontalScrollbar: !0,
|
|
1352
1397
|
showVerticalScrollbar: !1,
|
|
1353
|
-
children: /* @__PURE__ */
|
|
1398
|
+
children: /* @__PURE__ */ X(U.Root, {
|
|
1354
1399
|
size: "sm",
|
|
1355
1400
|
width: g,
|
|
1356
1401
|
borderWidth: _,
|
|
@@ -1359,44 +1404,44 @@ var vn = {
|
|
|
1359
1404
|
})
|
|
1360
1405
|
}), t[21] = b, t[22] = g, t[23] = _, t[24] = v, t[25] = x) : x = t[25], x;
|
|
1361
1406
|
};
|
|
1362
|
-
function
|
|
1363
|
-
return /* @__PURE__ */
|
|
1407
|
+
function In(e, t) {
|
|
1408
|
+
return /* @__PURE__ */ X(L, {
|
|
1364
1409
|
as: "span",
|
|
1365
1410
|
display: "contents",
|
|
1366
|
-
children: [/* @__PURE__ */ W
|
|
1411
|
+
children: [/* @__PURE__ */ Y(W, {
|
|
1367
1412
|
as: "span",
|
|
1368
1413
|
color: "fg.muted",
|
|
1369
1414
|
textAlign: "right",
|
|
1370
1415
|
fontSize: "inherit",
|
|
1371
1416
|
children: t + 1
|
|
1372
|
-
}), /* @__PURE__ */ W
|
|
1417
|
+
}), /* @__PURE__ */ Y(W, {
|
|
1373
1418
|
as: "span",
|
|
1374
1419
|
fontSize: "inherit",
|
|
1375
1420
|
children: e.length ? e : " "
|
|
1376
1421
|
})]
|
|
1377
1422
|
}, `${t}-${e}`);
|
|
1378
1423
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return /* @__PURE__ */
|
|
1424
|
+
function Ln(e) {
|
|
1425
|
+
return /* @__PURE__ */ Y(U.ColumnHeader, {
|
|
1381
1426
|
textTransform: "none",
|
|
1382
1427
|
paddingX: "xs",
|
|
1383
1428
|
paddingY: "2xs",
|
|
1384
|
-
children: /* @__PURE__ */ W
|
|
1429
|
+
children: /* @__PURE__ */ Y(W, {
|
|
1385
1430
|
textStyle: "label/S/medium",
|
|
1386
|
-
fontSize:
|
|
1431
|
+
fontSize: Mn,
|
|
1387
1432
|
children: e
|
|
1388
1433
|
})
|
|
1389
1434
|
}, e);
|
|
1390
1435
|
}
|
|
1391
1436
|
//#endregion
|
|
1392
1437
|
//#region src/components/rich-text/utils/inferResourceType.ts
|
|
1393
|
-
function
|
|
1438
|
+
function Rn(e) {
|
|
1394
1439
|
let t = e.toLowerCase().trim();
|
|
1395
1440
|
return t ? t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : t === "text/markdown" ? "markdown" : t === "text/csv" || t === "text/tab-separated-values" ? "table" : t === "application/json" ? "json" : (t.startsWith("text/") || t.startsWith("application/"), "text") : "text";
|
|
1396
1441
|
}
|
|
1397
1442
|
//#endregion
|
|
1398
1443
|
//#region src/components/rich-text/utils/mediaType.ts
|
|
1399
|
-
var
|
|
1444
|
+
var zn = {
|
|
1400
1445
|
csv: "text/csv",
|
|
1401
1446
|
tsv: "text/tab-separated-values",
|
|
1402
1447
|
json: "application/json",
|
|
@@ -1420,11 +1465,11 @@ var Mn = {
|
|
|
1420
1465
|
yml: "text/yaml",
|
|
1421
1466
|
yaml: "text/yaml"
|
|
1422
1467
|
};
|
|
1423
|
-
function
|
|
1468
|
+
function Bn(e) {
|
|
1424
1469
|
let t = (e.split("?")[0]?.split("#")[0] ?? "").split(".").pop()?.toLowerCase();
|
|
1425
|
-
return t ?
|
|
1470
|
+
return t ? zn[t] ?? null : null;
|
|
1426
1471
|
}
|
|
1427
1472
|
//#endregion
|
|
1428
|
-
export {
|
|
1473
|
+
export { jn as a, Ft as c, Fn as i, Nt as l, Rn as n, Sn as o, Pn as r, Yt as s, Bn as t, st as u };
|
|
1429
1474
|
|
|
1430
|
-
//# sourceMappingURL=rich-text-
|
|
1475
|
+
//# sourceMappingURL=rich-text-CH2psble.js.map
|