@pstdio/ui 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +8 -1
  2. package/dist/{MermaidComponent-BVdDqDRU.js → MermaidComponent-X__B6qib.js} +3 -3
  3. package/dist/{MermaidComponent-BVdDqDRU.js.map → MermaidComponent-X__B6qib.js.map} +1 -1
  4. package/dist/activity-timeline-BynMjXSB.js +283 -0
  5. package/dist/activity-timeline-BynMjXSB.js.map +1 -0
  6. package/dist/alert-ubcrW24X.js +33 -0
  7. package/dist/alert-ubcrW24X.js.map +1 -0
  8. package/dist/browser-storage-BinyFNJX.js +40 -0
  9. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  10. package/dist/chat-ui.js +1515 -1429
  11. package/dist/chat-ui.js.map +1 -1
  12. package/dist/components/activity/index.d.ts +1 -3
  13. package/dist/components/chat-ui/components/chat-history-story.d.ts +14 -0
  14. package/dist/components/chat-ui/components/chat-input-history.d.ts +6 -0
  15. package/dist/components/chat-ui/components/chat-input.d.ts +2 -0
  16. package/dist/components/chat-ui/components/chat-panel-composer.d.ts +49 -0
  17. package/dist/components/chat-ui/components/use-chat-input-history.d.ts +16 -0
  18. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +1 -1
  19. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  20. package/dist/components/diff-viewer/code-editor.d.ts +2 -0
  21. package/dist/components/rich-text/index.d.ts +2 -0
  22. package/dist/components/rich-text/markdown-editor/markdown-editor-scrolling.play.d.ts +4 -0
  23. package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +3 -1
  24. package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +2 -0
  25. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +2 -0
  26. package/dist/components/{activity → rich-text/resource-activity-feed}/resource-activity-feed.d.ts +1 -1
  27. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +1 -0
  28. package/dist/data-table.js +6 -6
  29. package/dist/diff.js +524 -522
  30. package/dist/diff.js.map +1 -1
  31. package/dist/{edit-mode-data-table-B8UpWb7i.js → edit-mode-data-table-Nfmfi7bz.js} +23 -22
  32. package/dist/{edit-mode-data-table-B8UpWb7i.js.map → edit-mode-data-table-Nfmfi7bz.js.map} +1 -1
  33. package/dist/index.d.ts +2 -3
  34. package/dist/index.js +1766 -2232
  35. package/dist/index.js.map +1 -1
  36. package/dist/{kanban-renderer-toolbar-DzY6THJY.js → kanban-renderer-toolbar-Buek4icz.js} +34 -33
  37. package/dist/{kanban-renderer-toolbar-DzY6THJY.js.map → kanban-renderer-toolbar-Buek4icz.js.map} +1 -1
  38. package/dist/kanban-renderer.js +31 -30
  39. package/dist/kanban-renderer.js.map +1 -1
  40. package/dist/lazy-markdown-editor-PzIBc9-l.js +42 -0
  41. package/dist/lazy-markdown-editor-PzIBc9-l.js.map +1 -0
  42. package/dist/{list-row-BDoV_iMV.js → list-row-DHzRa9-O.js} +2 -2
  43. package/dist/{list-row-BDoV_iMV.js.map → list-row-DHzRa9-O.js.map} +1 -1
  44. package/dist/{markdown-gNucAjnF.js → markdown-BCfPxNpb.js} +323 -303
  45. package/dist/markdown-BCfPxNpb.js.map +1 -0
  46. package/dist/markdown-editor-CsJ4KNGu.js +1034 -0
  47. package/dist/markdown-editor-CsJ4KNGu.js.map +1 -0
  48. package/dist/{mermaid-renderer-CVnuKs-A.js → mermaid-renderer-D0YP0FmJ.js} +3 -3
  49. package/dist/{mermaid-renderer-CVnuKs-A.js.map → mermaid-renderer-D0YP0FmJ.js.map} +1 -1
  50. package/dist/mermaid.js +1 -1
  51. package/dist/{param-editor-CTx3mDxQ.js → param-editor-CFM2Nf3l.js} +2 -2
  52. package/dist/{param-editor-CTx3mDxQ.js.map → param-editor-CFM2Nf3l.js.map} +1 -1
  53. package/dist/param-editor-field-Bj-AGUY6.js +1728 -0
  54. package/dist/param-editor-field-Bj-AGUY6.js.map +1 -0
  55. package/dist/param-editor.d.ts +2 -0
  56. package/dist/param-editor.js +47 -0
  57. package/dist/param-editor.js.map +1 -0
  58. package/dist/prism-n5gcERyD.js +202 -0
  59. package/dist/prism-n5gcERyD.js.map +1 -0
  60. package/dist/radio-BfjibByI.js +51 -0
  61. package/dist/radio-BfjibByI.js.map +1 -0
  62. package/dist/rich-message-q6Y6QJOq.js +633 -0
  63. package/dist/rich-message-q6Y6QJOq.js.map +1 -0
  64. package/dist/rich-text.js +342 -178
  65. package/dist/rich-text.js.map +1 -1
  66. package/dist/scroll-area-BMbg1WcD.js +91 -0
  67. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  68. package/dist/slider-DBHjdxsU.js +1092 -0
  69. package/dist/slider-DBHjdxsU.js.map +1 -0
  70. package/dist/style.css +1 -1
  71. package/dist/terminal.js +96 -93
  72. package/dist/terminal.js.map +1 -1
  73. package/dist/theme/recipes/timeline.d.ts +9 -0
  74. package/dist/{theme-Dc7hVvMC.js → theme-AzJH4Om3.js} +10 -1
  75. package/dist/theme-AzJH4Om3.js.map +1 -0
  76. package/dist/{theme-preference-Bpobguh4.js → theme-preference-DxGW1qg-.js} +2 -2
  77. package/dist/{theme-preference-Bpobguh4.js.map → theme-preference-DxGW1qg-.js.map} +1 -1
  78. package/dist/theme.js +1 -1
  79. package/dist/{tree-list-CZvcg3_6.js → tree-list-CPjbGTvs.js} +2 -2
  80. package/dist/{tree-list-CZvcg3_6.js.map → tree-list-CPjbGTvs.js.map} +1 -1
  81. package/dist/{workspace-badge-BR_GgsAG.js → workspace-badge-CuOcmnZc.js} +2 -2
  82. package/dist/{workspace-badge-BR_GgsAG.js.map → workspace-badge-CuOcmnZc.js.map} +1 -1
  83. package/package.json +7 -2
  84. package/dist/browser-storage-DPtOQJx0.js +0 -127
  85. package/dist/browser-storage-DPtOQJx0.js.map +0 -1
  86. package/dist/lazy-markdown-editor-ClZPZuaU.js +0 -235
  87. package/dist/lazy-markdown-editor-ClZPZuaU.js.map +0 -1
  88. package/dist/markdown-editor-CAVqJ9yR.js +0 -1019
  89. package/dist/markdown-editor-CAVqJ9yR.js.map +0 -1
  90. package/dist/markdown-gNucAjnF.js.map +0 -1
  91. package/dist/param-editor-field-DteDEyeU.js +0 -2810
  92. package/dist/param-editor-field-DteDEyeU.js.map +0 -1
  93. package/dist/prompt-input-DNpRL5tI.js +0 -564
  94. package/dist/prompt-input-DNpRL5tI.js.map +0 -1
  95. package/dist/radio-cLMEBBZk.js +0 -76
  96. package/dist/radio-cLMEBBZk.js.map +0 -1
  97. package/dist/rich-message-CuPiKxKX.js +0 -78
  98. package/dist/rich-message-CuPiKxKX.js.map +0 -1
  99. package/dist/theme-Dc7hVvMC.js.map +0 -1
package/dist/rich-text.js CHANGED
@@ -1,29 +1,33 @@
1
- import { jsx as o, jsxs as Y } from "react/jsx-runtime";
2
- import { c as U } from "react/compiler-runtime";
3
- import { e as ee, a as te, C as oe, I as ne, E as re, b as ie } from "./markdown-gNucAjnF.js";
4
- import { Box as R, Flex as le, Table as T, Text as F, Textarea as se } from "@chakra-ui/react";
5
- import { LexicalCollaboration as ae } from "@lexical/react/LexicalCollaborationContext";
6
- import { CollaborationPluginV2__EXPERIMENTAL as ce } from "@lexical/react/LexicalCollaborationPlugin";
7
- import { LexicalComposer as de } from "@lexical/react/LexicalComposer";
8
- import { LexicalErrorBoundary as me } from "@lexical/react/LexicalErrorBoundary";
9
- import { HorizontalRulePlugin as fe } from "@lexical/react/LexicalHorizontalRulePlugin";
10
- import { LinkPlugin as pe } from "@lexical/react/LexicalLinkPlugin";
11
- import { ListPlugin as ue } from "@lexical/react/LexicalListPlugin";
12
- import { RichTextPlugin as he } from "@lexical/react/LexicalRichTextPlugin";
13
- import { TabIndentationPlugin as ge } from "@lexical/react/LexicalTabIndentationPlugin";
14
- import { useRef as be, useState as q, useEffect as J } from "react";
15
- import { WebsocketProvider as xe } from "y-websocket";
16
- import * as Se from "yjs";
17
- import { C as ye, F as we } from "./markdown-editor-CAVqJ9yR.js";
18
- import { M as Ze } from "./markdown-editor-CAVqJ9yR.js";
19
- import { L as tt } from "./lazy-markdown-editor-ClZPZuaU.js";
20
- import { P as nt, g as rt, a as it } from "./prompt-input-DNpRL5tI.js";
21
- import { RichMessage as st, RichMessage as at } from "./rich-message-CuPiKxKX.js";
22
- import { S as K } from "./browser-storage-DPtOQJx0.js";
23
- function ve() {
24
- const t = U(1);
1
+ import { jsx as o, jsxs as M } from "react/jsx-runtime";
2
+ import { c as I } from "react/compiler-runtime";
3
+ import { e as ie, a as le, C as re, I as ae, E as se, b as ce } from "./markdown-BCfPxNpb.js";
4
+ import { Box as X, Flex as de, HStack as Q, Spinner as me, Text as W, Button as K, Icon as fe, Stack as pe, Table as H, Textarea as ue } from "@chakra-ui/react";
5
+ import { LexicalCollaboration as he } from "@lexical/react/LexicalCollaborationContext";
6
+ import { CollaborationPluginV2__EXPERIMENTAL as ge } from "@lexical/react/LexicalCollaborationPlugin";
7
+ import { LexicalComposer as be } from "@lexical/react/LexicalComposer";
8
+ import { LexicalErrorBoundary as xe } from "@lexical/react/LexicalErrorBoundary";
9
+ import { HorizontalRulePlugin as ye } from "@lexical/react/LexicalHorizontalRulePlugin";
10
+ import { LinkPlugin as ve } from "@lexical/react/LexicalLinkPlugin";
11
+ import { ListPlugin as Se } from "@lexical/react/LexicalListPlugin";
12
+ import { RichTextPlugin as we } from "@lexical/react/LexicalRichTextPlugin";
13
+ import { TabIndentationPlugin as Ce } from "@lexical/react/LexicalTabIndentationPlugin";
14
+ import { useRef as ke, useState as G, useEffect as ee } from "react";
15
+ import { WebsocketProvider as Ae } from "y-websocket";
16
+ import * as Te from "yjs";
17
+ import { C as Ee, F as Le } from "./markdown-editor-CsJ4KNGu.js";
18
+ import { M as Mt } from "./markdown-editor-CsJ4KNGu.js";
19
+ import { L as jt } from "./lazy-markdown-editor-PzIBc9-l.js";
20
+ import { R as ze } from "./rich-message-q6Y6QJOq.js";
21
+ import { P as Ft, g as It, a as Nt } from "./rich-message-q6Y6QJOq.js";
22
+ import { Sparkles as Re, ScanSearch as _e, MessageCircle as Pe, Info as Me, GitBranch as $e, ExternalLink as je, Component as Be, CircleAlert as Fe, Bell as Ie, Activity as Ne } from "lucide-react";
23
+ import { A as We, a as He, b as De, c as Oe } from "./activity-timeline-BynMjXSB.js";
24
+ import { A as Ve } from "./alert-ubcrW24X.js";
25
+ import { E as Xe } from "./empty-state-Bo4HVrgr.js";
26
+ import { S as oe } from "./scroll-area-BMbg1WcD.js";
27
+ function qe() {
28
+ const n = I(1);
25
29
  let e;
26
- return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o("style", { children: `
30
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o("style", { children: `
27
31
  .collaboration-cursor-container {
28
32
  position: relative;
29
33
  display: inline;
@@ -57,170 +61,329 @@ function ve() {
57
61
  pointer-events: none;
58
62
  opacity: 0.25;
59
63
  }
60
- ` }), t[0] = e) : e = t[0], e;
64
+ ` }), n[0] = e) : e = n[0], e;
61
65
  }
62
- function Ye(t) {
63
- const e = U(42), {
64
- roomId: n,
65
- wsUrl: y,
66
- wsParams: x,
67
- userName: S,
66
+ function At(n) {
67
+ const e = I(42), {
68
+ roomId: t,
69
+ wsUrl: i,
70
+ wsParams: s,
71
+ userName: c,
68
72
  userColor: a,
69
- placeholder: w
70
- } = t;
71
- let l;
72
- e[0] !== x ? (l = x === void 0 ? {} : x, e[0] = x, e[1] = l) : l = e[1];
73
- const f = l, c = S === void 0 ? "Anonymous" : S, p = a === void 0 ? "#30bced" : a, s = be(null), [r, h] = q(null), [C, L] = q(!1), [d] = q(Ee);
74
- let g;
75
- e[2] !== d || e[3] !== n || e[4] !== f || e[5] !== y ? (g = () => {
76
- const G = new xe(y, n, d, {
77
- params: f,
73
+ placeholder: l
74
+ } = n;
75
+ let d;
76
+ e[0] !== s ? (d = s === void 0 ? {} : s, e[0] = s, e[1] = d) : d = e[1];
77
+ const m = d, r = c === void 0 ? "Anonymous" : c, y = a === void 0 ? "#30bced" : a, p = ke(null), [f, b] = G(null), [A, L] = G(!1), [h] = G(Ue);
78
+ let S;
79
+ e[2] !== h || e[3] !== t || e[4] !== m || e[5] !== i ? (S = () => {
80
+ const Z = new Ae(i, t, h, {
81
+ params: m,
78
82
  connect: !1
79
83
  });
80
- return G.on("sync", (Z) => {
81
- Z && L(!0);
82
- }), G;
83
- }, e[2] = d, e[3] = n, e[4] = f, e[5] = y, e[6] = g) : g = e[6];
84
- const [m] = q(g);
85
- let v, i;
86
- e[7] !== m ? (v = () => (m.connect(), () => {
87
- m.disconnect();
88
- }), i = [m], e[7] = m, e[8] = v, e[9] = i) : (v = e[8], i = e[9]), J(v, i);
89
- let b, u;
90
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = () => {
91
- h(s.current);
92
- }, u = [], e[10] = b, e[11] = u) : (b = e[10], u = e[11]), J(b, u);
93
- let E;
94
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = {
84
+ return Z.on("sync", (ne) => {
85
+ ne && L(!0);
86
+ }), Z;
87
+ }, e[2] = h, e[3] = t, e[4] = m, e[5] = i, e[6] = S) : S = e[6];
88
+ const [u] = G(S);
89
+ let C, g;
90
+ e[7] !== u ? (C = () => (u.connect(), () => {
91
+ u.disconnect();
92
+ }), g = [u], e[7] = u, e[8] = C, e[9] = g) : (C = e[8], g = e[9]), ee(C, g);
93
+ let v, w;
94
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = () => {
95
+ b(p.current);
96
+ }, w = [], e[10] = v, e[11] = w) : (v = e[10], w = e[11]), ee(v, w);
97
+ let k;
98
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {
95
99
  namespace: "COLLABORATIVE_EDITOR",
96
- nodes: te,
100
+ nodes: le,
97
101
  editorState: null,
98
- onError: Ce,
102
+ onError: Ye,
99
103
  editable: !0,
100
- theme: ee
101
- }, e[12] = E) : E = e[12];
102
- const Q = E;
103
- let B;
104
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ o(ve, {}), e[13] = B) : B = e[13];
105
- const X = m;
106
- let _;
107
- e[14] !== d || e[15] !== n || e[16] !== X || e[17] !== p || e[18] !== c ? (_ = /* @__PURE__ */ o(ce, { id: n, doc: d, provider: X, __shouldBootstrapUnsafe: !1, username: c, cursorColor: p }), e[14] = d, e[15] = n, e[16] = X, e[17] = p, e[18] = c, e[19] = _) : _ = e[19];
108
- let M, W, A, N, H, I;
109
- e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ o(pe, {}), W = /* @__PURE__ */ o(ue, {}), A = /* @__PURE__ */ o(ge, { maxIndent: 7 }), N = /* @__PURE__ */ o(fe, {}), H = /* @__PURE__ */ o(oe, {}), I = /* @__PURE__ */ o(ne, {}), e[20] = M, e[21] = W, e[22] = A, e[23] = N, e[24] = H, e[25] = I) : (M = e[20], W = e[21], A = e[22], N = e[23], H = e[24], I = e[25]);
110
- let k;
111
- e[26] !== r ? (k = /* @__PURE__ */ o(ye, { anchorElem: r }), e[26] = r, e[27] = k) : k = e[27];
104
+ theme: ie
105
+ }, e[12] = k) : k = e[12];
106
+ const j = k;
107
+ let z;
108
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ o(qe, {}), e[13] = z) : z = e[13];
109
+ const R = u;
110
+ let T;
111
+ e[14] !== h || e[15] !== t || e[16] !== R || e[17] !== y || e[18] !== r ? (T = /* @__PURE__ */ o(ge, { id: t, doc: h, provider: R, __shouldBootstrapUnsafe: !1, username: r, cursorColor: y }), e[14] = h, e[15] = t, e[16] = R, e[17] = y, e[18] = r, e[19] = T) : T = e[19];
112
+ let $, N, _, P, B, x;
113
+ e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ o(ve, {}), N = /* @__PURE__ */ o(Se, {}), _ = /* @__PURE__ */ o(Ce, { maxIndent: 7 }), P = /* @__PURE__ */ o(ye, {}), B = /* @__PURE__ */ o(re, {}), x = /* @__PURE__ */ o(ae, {}), e[20] = $, e[21] = N, e[22] = _, e[23] = P, e[24] = B, e[25] = x) : ($ = e[20], N = e[21], _ = e[22], P = e[23], B = e[24], x = e[25]);
114
+ let E;
115
+ e[26] !== f ? (E = /* @__PURE__ */ o(Ee, { anchorElem: f }), e[26] = f, e[27] = E) : E = e[27];
116
+ let F;
117
+ e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ o(se, {}), e[28] = F) : F = e[28];
118
+ let Y;
119
+ e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Y = /* @__PURE__ */ o(ce, { fullWidth: !1 }), e[29] = Y) : Y = e[29];
112
120
  let D;
113
- e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ o(re, {}), e[28] = D) : D = e[28];
121
+ e[30] !== l || e[31] !== A ? (D = A && l ? /* @__PURE__ */ o(X, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: l }) : null, e[30] = l, e[31] = A, e[32] = D) : D = e[32];
114
122
  let O;
115
- e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ o(ie, { fullWidth: !1 }), e[29] = O) : O = e[29];
116
- let P;
117
- e[30] !== w || e[31] !== C ? (P = C && w ? /* @__PURE__ */ o(R, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: w }) : null, e[30] = w, e[31] = C, e[32] = P) : P = e[32];
118
- let z;
119
- e[33] !== P ? (z = /* @__PURE__ */ o(he, { contentEditable: O, placeholder: P, ErrorBoundary: me }), e[33] = P, e[34] = z) : z = e[34];
120
- let j;
121
- e[35] !== r ? (j = r ? /* @__PURE__ */ o(we, { anchorElem: r }) : null, e[35] = r, e[36] = j) : j = e[36];
123
+ e[33] !== D ? (O = /* @__PURE__ */ o(we, { contentEditable: Y, placeholder: D, ErrorBoundary: xe }), e[33] = D, e[34] = O) : O = e[34];
122
124
  let V;
123
- return e[37] !== _ || e[38] !== k || e[39] !== z || e[40] !== j ? (V = /* @__PURE__ */ Y(le, { ref: s, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "visible", children: [
124
- B,
125
- /* @__PURE__ */ o(de, { initialConfig: Q, children: /* @__PURE__ */ Y(ae, { children: [
126
- _,
127
- M,
128
- W,
129
- A,
125
+ e[35] !== f ? (V = f ? /* @__PURE__ */ o(Le, { anchorElem: f }) : null, e[35] = f, e[36] = V) : V = e[36];
126
+ let U;
127
+ return e[37] !== T || e[38] !== E || e[39] !== O || e[40] !== V ? (U = /* @__PURE__ */ M(de, { ref: p, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "visible", children: [
128
+ z,
129
+ /* @__PURE__ */ o(be, { initialConfig: j, children: /* @__PURE__ */ M(he, { children: [
130
+ T,
131
+ $,
130
132
  N,
131
- H,
132
- I,
133
- k,
134
- D,
135
- z,
136
- j
133
+ _,
134
+ P,
135
+ B,
136
+ x,
137
+ E,
138
+ F,
139
+ O,
140
+ V
137
141
  ] }) })
138
- ] }), e[37] = _, e[38] = k, e[39] = z, e[40] = j, e[41] = V) : V = e[41], V;
142
+ ] }), e[37] = T, e[38] = E, e[39] = O, e[40] = V, e[41] = U) : U = e[41], U;
139
143
  }
140
- function Ce(t) {
141
- return console.error(t);
144
+ function Ye(n) {
145
+ return console.error(n);
142
146
  }
143
- function Ee() {
144
- return new Se.Doc();
147
+ function Ue() {
148
+ return new Te.Doc();
145
149
  }
146
- const $ = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", Te = (t) => t == null ? "-" : typeof t == "string" ? t.length ? t : "-" : typeof t == "number" || typeof t == "boolean" ? String(t).toUpperCase() : t instanceof Date ? t.toISOString() : JSON.stringify(t), Ue = (t) => {
147
- const e = U(8), {
148
- defaultCode: n,
149
- isEditable: y,
150
- showLineNumbers: x,
151
- disableScroll: S
152
- } = t, a = n === void 0 ? "" : n, w = y === void 0 ? !1 : y, l = x === void 0 ? !1 : x, f = S === void 0 ? !1 : S;
153
- if (w) {
154
- let r;
155
- return e[0] !== a ? (r = /* @__PURE__ */ o(se, { defaultValue: a, fontFamily: "mono", fontSize: $, resize: "vertical", minHeight: "100%" }), e[0] = a, e[1] = r) : r = e[1], r;
156
- }
150
+ const Ge = {
151
+ activity: Ne,
152
+ bell: Ie,
153
+ "circle-alert": Fe,
154
+ component: Be,
155
+ "external-link": je,
156
+ "git-branch": $e,
157
+ info: Me,
158
+ "message-circle": Pe,
159
+ "scan-search": _e,
160
+ sparkles: Re
161
+ }, J = (n) => {
162
+ const e = I(2), t = Ge[n.name];
163
+ let i;
164
+ return e[0] !== t ? (i = /* @__PURE__ */ o(fe, { as: t, boxSize: "13px" }), e[0] = t, e[1] = i) : i = e[1], i;
165
+ }, te = (n) => {
166
+ const e = I(12), {
167
+ item: t,
168
+ size: i,
169
+ onActionSelect: s,
170
+ onRelatedResourceSelect: c
171
+ } = n, a = t.kind === "message" ? t.attention?.actions : void 0;
172
+ if (!t.relatedResources?.length && !a?.length)
173
+ return null;
174
+ let l;
175
+ e[0] !== a || e[1] !== t || e[2] !== s || e[3] !== i ? (l = a?.map((r) => /* @__PURE__ */ M(K, { type: "button", size: i === "compact" ? "2xs" : "xs", variant: "outline", disabled: !s, onClick: () => s?.(r, t), children: [
176
+ r.icon ? /* @__PURE__ */ o(J, { name: r.icon }) : null,
177
+ r.label
178
+ ] }, r.id)), e[0] = a, e[1] = t, e[2] = s, e[3] = i, e[4] = l) : l = e[4];
179
+ let d;
180
+ e[5] !== t || e[6] !== c || e[7] !== i ? (d = t.relatedResources?.map((r) => /* @__PURE__ */ o(K, { type: "button", size: i === "compact" ? "2xs" : "xs", variant: "ghost", disabled: !c, onClick: () => c?.(r, t), children: r.label }, `${r.type}:${r.id}`)), e[5] = t, e[6] = c, e[7] = i, e[8] = d) : d = e[8];
181
+ let m;
182
+ return e[9] !== l || e[10] !== d ? (m = /* @__PURE__ */ M(Q, { gap: "2xs", flexWrap: "wrap", children: [
183
+ l,
184
+ d
185
+ ] }), e[9] = l, e[10] = d, e[11] = m) : m = e[11], m;
186
+ }, Je = (n) => {
187
+ const e = I(7), {
188
+ attention: t
189
+ } = n;
190
+ if (!t.statusLabel)
191
+ return null;
192
+ const i = t.icon ?? "bell";
193
+ let s;
194
+ e[0] !== i ? (s = /* @__PURE__ */ o(J, { name: i }), e[0] = i, e[1] = s) : s = e[1];
157
195
  let c;
158
- if (e[2] !== a || e[3] !== f || e[4] !== l) {
159
- const r = l ? a.split(`
160
- `) : [a];
161
- c = /* @__PURE__ */ o(R, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: $, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: f ? "hidden" : void 0, children: l ? /* @__PURE__ */ o(R, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: r.map(_e) }) : /* @__PURE__ */ o(R, { as: "code", children: a }) }), e[2] = a, e[3] = f, e[4] = l, e[5] = c;
196
+ e[2] !== t.statusLabel ? (c = /* @__PURE__ */ o(W, { textStyle: "label/XS/medium", children: t.statusLabel }), e[2] = t.statusLabel, e[3] = c) : c = e[3];
197
+ let a;
198
+ return e[4] !== s || e[5] !== c ? (a = /* @__PURE__ */ M(Q, { gap: "2xs", color: "fg.warning", children: [
199
+ s,
200
+ c
201
+ ] }), e[4] = s, e[5] = c, e[6] = a) : a = e[6], a;
202
+ }, Ke = (n) => {
203
+ const e = I(50), {
204
+ item: t,
205
+ size: i,
206
+ fallbackActorName: s,
207
+ formatTimestamp: c,
208
+ onActionSelect: a,
209
+ onRelatedResourceSelect: l
210
+ } = n;
211
+ let d;
212
+ e[0] !== s || e[1] !== t.actor ? (d = t.actor ?? {
213
+ name: s
214
+ }, e[0] = s, e[1] = t.actor, e[2] = d) : d = e[2];
215
+ const m = d;
216
+ let r;
217
+ e[3] !== c || e[4] !== t ? (r = t.timestampLabel ?? c(t.createdAt, t), e[3] = c, e[4] = t, e[5] = r) : r = e[5];
218
+ let y;
219
+ e[6] !== t.createdAt || e[7] !== r ? (y = /* @__PURE__ */ o("time", { dateTime: t.createdAt, children: r }), e[6] = t.createdAt, e[7] = r, e[8] = y) : y = e[8];
220
+ const p = y;
221
+ if (t.kind === "event") {
222
+ let k;
223
+ e[9] !== t.icon ? (k = t.icon ? /* @__PURE__ */ o(J, { name: t.icon }) : void 0, e[9] = t.icon, e[10] = k) : k = e[10];
224
+ const j = i === "compact" ? "sm" : "md";
225
+ let z;
226
+ e[11] !== t.summary ? (z = /* @__PURE__ */ o(W, { as: "span", children: t.summary }), e[11] = t.summary, e[12] = z) : z = e[12];
227
+ let R;
228
+ e[13] !== t || e[14] !== l || e[15] !== i ? (R = /* @__PURE__ */ o(te, { item: t, size: i, onRelatedResourceSelect: l }), e[13] = t, e[14] = l, e[15] = i, e[16] = R) : R = e[16];
229
+ let T;
230
+ return e[17] !== m || e[18] !== k || e[19] !== j || e[20] !== z || e[21] !== R || e[22] !== p ? (T = /* @__PURE__ */ o(He, { children: /* @__PURE__ */ M(De, { actor: m, icon: k, timestamp: p, paddingX: j, children: [
231
+ z,
232
+ R
233
+ ] }) }), e[17] = m, e[18] = k, e[19] = j, e[20] = z, e[21] = R, e[22] = p, e[23] = T) : T = e[23], T;
234
+ }
235
+ const f = t.attention?.icon ?? "bell";
236
+ let b;
237
+ e[24] !== f || e[25] !== t.attention ? (b = t.attention ? /* @__PURE__ */ o(J, { name: f }) : void 0, e[24] = f, e[25] = t.attention, e[26] = b) : b = e[26];
238
+ const A = t.attention ? "fg.warning" : void 0, L = t.attention ? "bg.warning" : void 0;
239
+ let h;
240
+ e[27] !== t.attention ? (h = t.attention ? /* @__PURE__ */ o(Je, { attention: t.attention }) : void 0, e[27] = t.attention, e[28] = h) : h = e[28];
241
+ const S = t.attention ? "attention" : "default", u = i === "compact" ? "xs" : "sm";
242
+ let C;
243
+ e[29] !== t.markdown ? (C = /* @__PURE__ */ o(ze, { defaultState: t.markdown, fullWidth: !0 }), e[29] = t.markdown, e[30] = C) : C = e[30];
244
+ let g;
245
+ e[31] !== t || e[32] !== a || e[33] !== l || e[34] !== i ? (g = /* @__PURE__ */ o(te, { item: t, size: i, onActionSelect: a, onRelatedResourceSelect: l }), e[31] = t, e[32] = a, e[33] = l, e[34] = i, e[35] = g) : g = e[35];
246
+ let v;
247
+ e[36] !== g || e[37] !== u || e[38] !== C ? (v = /* @__PURE__ */ M(pe, { gap: u, children: [
248
+ C,
249
+ g
250
+ ] }), e[36] = g, e[37] = u, e[38] = C, e[39] = v) : v = e[39];
251
+ let w;
252
+ return e[40] !== m || e[41] !== i || e[42] !== v || e[43] !== b || e[44] !== A || e[45] !== L || e[46] !== h || e[47] !== S || e[48] !== p ? (w = /* @__PURE__ */ o(Oe, { actor: m, icon: b, iconColor: A, iconBackground: L, timestamp: p, actions: h, tone: S, size: i, children: v }), e[40] = m, e[41] = i, e[42] = v, e[43] = b, e[44] = A, e[45] = L, e[46] = h, e[47] = S, e[48] = p, e[49] = w) : w = e[49], w;
253
+ }, Qe = (n) => n, Tt = (n) => {
254
+ const e = I(56);
255
+ let t, i, s, c, a, l, d, m, r, y, p, f, b, A, L, h, S;
256
+ e[0] !== n ? ({
257
+ items: i,
258
+ size: d,
259
+ isLoading: m,
260
+ error: t,
261
+ hasMore: y,
262
+ isLoadingMore: p,
263
+ emptyTitle: f,
264
+ emptyDescription: b,
265
+ errorTitle: A,
266
+ loadMoreLabel: L,
267
+ loadingLabel: h,
268
+ fallbackActorName: S,
269
+ formatTimestamp: r,
270
+ onActionSelect: s,
271
+ onLoadMore: c,
272
+ onRelatedResourceSelect: a,
273
+ ...l
274
+ } = n, e[0] = n, e[1] = t, e[2] = i, e[3] = s, e[4] = c, e[5] = a, e[6] = l, e[7] = d, e[8] = m, e[9] = r, e[10] = y, e[11] = p, e[12] = f, e[13] = b, e[14] = A, e[15] = L, e[16] = h, e[17] = S) : (t = e[1], i = e[2], s = e[3], c = e[4], a = e[5], l = e[6], d = e[7], m = e[8], r = e[9], y = e[10], p = e[11], f = e[12], b = e[13], A = e[14], L = e[15], h = e[16], S = e[17]);
275
+ const u = d === void 0 ? "comfortable" : d, C = m === void 0 ? !1 : m, g = y === void 0 ? !1 : y, v = p === void 0 ? !1 : p, w = f === void 0 ? "No activity yet" : f, k = b === void 0 ? "Events and messages will appear here." : b, j = A === void 0 ? "Activity unavailable" : A, z = L === void 0 ? "Load more" : L, R = h === void 0 ? "Loading activity" : h, T = S === void 0 ? "System" : S, $ = r === void 0 ? Qe : r;
276
+ if (t) {
277
+ let x;
278
+ return e[18] !== t || e[19] !== j || e[20] !== l ? (x = /* @__PURE__ */ o(Ve, { status: "error", colorPalette: "red", title: j, size: "sm", ...l, children: t }), e[18] = t, e[19] = j, e[20] = l, e[21] = x) : x = e[21], x;
279
+ }
280
+ if (C && i.length === 0) {
281
+ let x;
282
+ e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ o(me, { size: "sm" }), e[22] = x) : x = e[22];
283
+ let E;
284
+ e[23] !== R ? (E = /* @__PURE__ */ o(W, { textStyle: "label/S/regular", children: R }), e[23] = R, e[24] = E) : E = e[24];
285
+ let F;
286
+ return e[25] !== l || e[26] !== E ? (F = /* @__PURE__ */ M(Q, { role: "status", "aria-live": "polite", gap: "xs", color: "fg.muted", ...l, children: [
287
+ x,
288
+ E
289
+ ] }), e[25] = l, e[26] = E, e[27] = F) : F = e[27], F;
290
+ }
291
+ if (i.length === 0) {
292
+ let x;
293
+ return e[28] !== k || e[29] !== w || e[30] !== l ? (x = /* @__PURE__ */ o(Xe, { title: w, description: k, ...l }), e[28] = k, e[29] = w, e[30] = l, e[31] = x) : x = e[31], x;
294
+ }
295
+ const N = u === "compact" ? "sm" : "md";
296
+ let _;
297
+ if (e[32] !== T || e[33] !== $ || e[34] !== i || e[35] !== s || e[36] !== a || e[37] !== u) {
298
+ let x;
299
+ e[39] !== T || e[40] !== $ || e[41] !== s || e[42] !== a || e[43] !== u ? (x = (E) => /* @__PURE__ */ o(Ke, { item: E, size: u, fallbackActorName: T, formatTimestamp: $, onActionSelect: s, onRelatedResourceSelect: a }, E.id), e[39] = T, e[40] = $, e[41] = s, e[42] = a, e[43] = u, e[44] = x) : x = e[44], _ = i.map(x), e[32] = T, e[33] = $, e[34] = i, e[35] = s, e[36] = a, e[37] = u, e[38] = _;
162
300
  } else
163
- c = e[5];
164
- const p = c;
165
- if (f)
166
- return p;
167
- let s;
168
- return e[6] !== p ? (s = /* @__PURE__ */ o(K, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: p }), e[6] = p, e[7] = s) : s = e[7], s;
169
- }, Xe = (t) => {
170
- const e = U(26), {
171
- data: n,
172
- fullWidth: y,
173
- noBorder: x,
174
- hiddenColumns: S
175
- } = t, a = y === void 0 ? !1 : y, w = x === void 0 ? !1 : x;
176
- let l;
177
- e[0] !== S ? (l = S === void 0 ? [] : S, e[0] = S, e[1] = l) : l = e[1];
178
- const f = l;
179
- if (!n.length) {
180
- const i = w ? "0" : "1px";
181
- let b;
182
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(F, { textStyle: "label/S/regular", fontSize: $, color: "fg.muted", children: "No data" }), e[2] = b) : b = e[2];
183
- let u;
184
- return e[3] !== i ? (u = /* @__PURE__ */ o(R, { padding: "sm", borderWidth: i, borderColor: "border.subtle", children: b }), e[3] = i, e[4] = u) : u = e[4], u;
301
+ _ = e[38];
302
+ let P;
303
+ e[45] !== g || e[46] !== v || e[47] !== z || e[48] !== c || e[49] !== u ? (P = g ? /* @__PURE__ */ o(K, { type: "button", width: "full", size: u === "compact" ? "xs" : "sm", variant: "ghost", loading: v, onClick: c, children: z }) : null, e[45] = g, e[46] = v, e[47] = z, e[48] = c, e[49] = u, e[50] = P) : P = e[50];
304
+ let B;
305
+ return e[51] !== l || e[52] !== N || e[53] !== _ || e[54] !== P ? (B = /* @__PURE__ */ M(We, { gap: N, ...l, children: [
306
+ _,
307
+ P
308
+ ] }), e[51] = l, e[52] = N, e[53] = _, e[54] = P, e[55] = B) : B = e[55], B;
309
+ }, q = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", Ze = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), Et = (n) => {
310
+ const e = I(8), {
311
+ defaultCode: t,
312
+ isEditable: i,
313
+ showLineNumbers: s,
314
+ disableScroll: c
315
+ } = n, a = t === void 0 ? "" : t, l = i === void 0 ? !1 : i, d = s === void 0 ? !1 : s, m = c === void 0 ? !1 : c;
316
+ if (l) {
317
+ let f;
318
+ return e[0] !== a ? (f = /* @__PURE__ */ o(ue, { defaultValue: a, fontFamily: "mono", fontSize: q, resize: "vertical", minHeight: "100%" }), e[0] = a, e[1] = f) : f = e[1], f;
185
319
  }
186
- let c;
187
- e[5] !== f ? (c = new Set(f), e[5] = f, e[6] = c) : c = e[6];
188
- const p = c;
189
- let s;
190
- e[7] !== n[0] ? (s = Object.keys(n[0] ?? {}), e[7] = n[0], e[8] = s) : s = e[8];
191
320
  let r;
192
- e[9] !== p || e[10] !== s ? (r = s.filter((i) => !p.has(i)), e[9] = p, e[10] = s, e[11] = r) : r = e[11];
193
- const h = r, C = a ? "100%" : "fit-content", L = w ? "0" : "1px";
321
+ if (e[2] !== a || e[3] !== m || e[4] !== d) {
322
+ const f = d ? a.split(`
323
+ `) : [a];
324
+ r = /* @__PURE__ */ o(X, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: q, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: m ? "hidden" : void 0, children: d ? /* @__PURE__ */ o(X, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: f.map(et) }) : /* @__PURE__ */ o(X, { as: "code", children: a }) }), e[2] = a, e[3] = m, e[4] = d, e[5] = r;
325
+ } else
326
+ r = e[5];
327
+ const y = r;
328
+ if (m)
329
+ return y;
330
+ let p;
331
+ return e[6] !== y ? (p = /* @__PURE__ */ o(oe, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: y }), e[6] = y, e[7] = p) : p = e[7], p;
332
+ }, Lt = (n) => {
333
+ const e = I(26), {
334
+ data: t,
335
+ fullWidth: i,
336
+ noBorder: s,
337
+ hiddenColumns: c
338
+ } = n, a = i === void 0 ? !1 : i, l = s === void 0 ? !1 : s;
194
339
  let d;
195
- e[12] !== h ? (d = /* @__PURE__ */ o(T.Header, { children: /* @__PURE__ */ o(T.Row, { background: "bg.muted", children: h.map(ke) }) }), e[12] = h, e[13] = d) : d = e[13];
196
- let g;
197
- if (e[14] !== h || e[15] !== n) {
198
- let i;
199
- e[17] !== h ? (i = (b, u) => /* @__PURE__ */ o(T.Row, { children: h.map((E) => /* @__PURE__ */ o(T.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ o(F, { textStyle: "paragraph/S/regular", fontSize: $, children: Te(b[E]) }) }, `${u}-${E}`)) }, `${u}-${h.join("-")}`), e[17] = h, e[18] = i) : i = e[18], g = n.map(i), e[14] = h, e[15] = n, e[16] = g;
340
+ e[0] !== c ? (d = c === void 0 ? [] : c, e[0] = c, e[1] = d) : d = e[1];
341
+ const m = d;
342
+ if (!t.length) {
343
+ const g = l ? "0" : "1px";
344
+ let v;
345
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ o(W, { textStyle: "label/S/regular", fontSize: q, color: "fg.muted", children: "No data" }), e[2] = v) : v = e[2];
346
+ let w;
347
+ return e[3] !== g ? (w = /* @__PURE__ */ o(X, { padding: "sm", borderWidth: g, borderColor: "border.subtle", children: v }), e[3] = g, e[4] = w) : w = e[4], w;
348
+ }
349
+ let r;
350
+ e[5] !== m ? (r = new Set(m), e[5] = m, e[6] = r) : r = e[6];
351
+ const y = r;
352
+ let p;
353
+ e[7] !== t[0] ? (p = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = p) : p = e[8];
354
+ let f;
355
+ e[9] !== y || e[10] !== p ? (f = p.filter((g) => !y.has(g)), e[9] = y, e[10] = p, e[11] = f) : f = e[11];
356
+ const b = f, A = a ? "100%" : "fit-content", L = l ? "0" : "1px";
357
+ let h;
358
+ e[12] !== b ? (h = /* @__PURE__ */ o(H.Header, { children: /* @__PURE__ */ o(H.Row, { background: "bg.muted", children: b.map(tt) }) }), e[12] = b, e[13] = h) : h = e[13];
359
+ let S;
360
+ if (e[14] !== b || e[15] !== t) {
361
+ let g;
362
+ e[17] !== b ? (g = (v, w) => /* @__PURE__ */ o(H.Row, { children: b.map((k) => /* @__PURE__ */ o(H.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ o(W, { textStyle: "paragraph/S/regular", fontSize: q, children: Ze(v[k]) }) }, `${w}-${k}`)) }, `${w}-${b.join("-")}`), e[17] = b, e[18] = g) : g = e[18], S = t.map(g), e[14] = b, e[15] = t, e[16] = S;
200
363
  } else
201
- g = e[16];
202
- let m;
203
- e[19] !== g ? (m = /* @__PURE__ */ o(T.Body, { children: g }), e[19] = g, e[20] = m) : m = e[20];
204
- let v;
205
- return e[21] !== m || e[22] !== C || e[23] !== L || e[24] !== d ? (v = /* @__PURE__ */ o(K, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ Y(T.Root, { size: "sm", width: C, borderWidth: L, borderColor: "border.subtle", children: [
206
- d,
207
- m
208
- ] }) }), e[21] = m, e[22] = C, e[23] = L, e[24] = d, e[25] = v) : v = e[25], v;
364
+ S = e[16];
365
+ let u;
366
+ e[19] !== S ? (u = /* @__PURE__ */ o(H.Body, { children: S }), e[19] = S, e[20] = u) : u = e[20];
367
+ let C;
368
+ return e[21] !== u || e[22] !== A || e[23] !== L || e[24] !== h ? (C = /* @__PURE__ */ o(oe, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ M(H.Root, { size: "sm", width: A, borderWidth: L, borderColor: "border.subtle", children: [
369
+ h,
370
+ u
371
+ ] }) }), e[21] = u, e[22] = A, e[23] = L, e[24] = h, e[25] = C) : C = e[25], C;
209
372
  };
210
- function _e(t, e) {
211
- return /* @__PURE__ */ Y(R, { as: "span", display: "contents", children: [
212
- /* @__PURE__ */ o(F, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
213
- /* @__PURE__ */ o(F, { as: "span", fontSize: "inherit", children: t.length ? t : " " })
214
- ] }, `${e}-${t}`);
373
+ function et(n, e) {
374
+ return /* @__PURE__ */ M(X, { as: "span", display: "contents", children: [
375
+ /* @__PURE__ */ o(W, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
376
+ /* @__PURE__ */ o(W, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
377
+ ] }, `${e}-${n}`);
215
378
  }
216
- function ke(t) {
217
- return /* @__PURE__ */ o(T.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ o(F, { textStyle: "label/S/medium", fontSize: $, children: t }) }, t);
379
+ function tt(n) {
380
+ return /* @__PURE__ */ o(H.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ o(W, { textStyle: "label/S/medium", fontSize: q, children: n }) }, n);
218
381
  }
219
- function Ge(t) {
220
- const e = t.toLowerCase().trim();
382
+ function zt(n) {
383
+ const e = n.toLowerCase().trim();
221
384
  return e ? e.startsWith("image/") ? "image" : e === "application/pdf" ? "pdf" : e === "text/markdown" ? "markdown" : e === "text/csv" || e === "text/tab-separated-values" ? "table" : e === "application/json" ? "json" : (e.startsWith("text/") || e.startsWith("application/"), "text") : "text";
222
385
  }
223
- const Pe = {
386
+ const ot = {
224
387
  csv: "text/csv",
225
388
  tsv: "text/tab-separated-values",
226
389
  json: "application/json",
@@ -244,22 +407,23 @@ const Pe = {
244
407
  yml: "text/yaml",
245
408
  yaml: "text/yaml"
246
409
  };
247
- function Je(t) {
248
- const n = (t.split("?")[0]?.split("#")[0] ?? "").split(".").pop()?.toLowerCase();
249
- return n ? Pe[n] ?? null : null;
410
+ function Rt(n) {
411
+ const t = (n.split("?")[0]?.split("#")[0] ?? "").split(".").pop()?.toLowerCase();
412
+ return t ? ot[t] ?? null : null;
250
413
  }
251
414
  export {
252
- Ye as CollaborativeMarkdownEditor,
253
- Ue as DefaultRichTextCodeEditor,
254
- Xe as DefaultRichTextDataTable,
255
- tt as LazyMarkdownEditor,
256
- Ze as MarkdownEditor,
257
- st as MarkdownPreview,
258
- nt as PromptEditor,
259
- at as RichMessage,
260
- rt as generateEditorStateFromString,
261
- it as getTextFromSerializedEditorState,
262
- Ge as inferResourceTypeFromMediaType,
263
- Je as mediaTypeFromPath
415
+ At as CollaborativeMarkdownEditor,
416
+ Et as DefaultRichTextCodeEditor,
417
+ Lt as DefaultRichTextDataTable,
418
+ jt as LazyMarkdownEditor,
419
+ Mt as MarkdownEditor,
420
+ ze as MarkdownPreview,
421
+ Ft as PromptEditor,
422
+ Tt as ResourceActivityFeed,
423
+ ze as RichMessage,
424
+ It as generateEditorStateFromString,
425
+ Nt as getTextFromSerializedEditorState,
426
+ zt as inferResourceTypeFromMediaType,
427
+ Rt as mediaTypeFromPath
264
428
  };
265
429
  //# sourceMappingURL=rich-text.js.map