laif-ds 0.2.80 → 0.2.84

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 (31) hide show
  1. package/dist/CHANGELOG.md +40 -0
  2. package/dist/_virtual/index3.js +5 -5
  3. package/dist/_virtual/index4.js +5 -5
  4. package/dist/_virtual/index5.js +4 -4
  5. package/dist/_virtual/index7.js +5 -2
  6. package/dist/_virtual/index8.js +2 -5
  7. package/dist/agent-docs/adoption-report.json +17 -13
  8. package/dist/agent-docs/components/AppEditor.md +117 -7
  9. package/dist/agent-docs/components/Chat.md +1 -0
  10. package/dist/agent-docs/components/FileUploader.md +8 -3
  11. package/dist/agent-docs/manifest.json +125 -19
  12. package/dist/components/editor/nodes/mention-node.js +113 -0
  13. package/dist/components/editor/plugins/mention-plugin.js +215 -0
  14. package/dist/components/editor/plugins/toolbar/mention-insert-toolbar-plugin.js +41 -0
  15. package/dist/components/ui/app-editor.js +150 -112
  16. package/dist/components/ui/chat.js +35 -33
  17. package/dist/components/ui/file-previewer.js +66 -61
  18. package/dist/components/ui/file-uploader.js +116 -112
  19. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  20. package/dist/index.d.ts +44 -5
  21. package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +5 -5
  22. package/dist/node_modules/@lexical/react/LexicalTypeaheadMenuPlugin.prod.js +220 -0
  23. package/dist/node_modules/eventemitter3/index.js +1 -1
  24. package/dist/node_modules/eventemitter3/index2.js +1 -1
  25. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  26. package/dist/node_modules/lexical/Lexical.prod.js +314 -303
  27. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  28. package/dist/node_modules/unified/lib/index.js +1 -1
  29. package/dist/styles.v3.css +1 -1
  30. package/package.json +1 -1
  31. /package/dist/agent-docs/{truncated-cell.md → components/truncated-cell.md} +0 -0
@@ -1,169 +1,207 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as e, Fragment as s } from "react/jsx-runtime";
3
- import { ListNode as S, ListItemNode as T } from "../../node_modules/@lexical/list/LexicalList.prod.js";
4
- import { $convertToMarkdownString as L, $convertFromMarkdownString as k, TRANSFORMERS as A } from "../../node_modules/@lexical/markdown/LexicalMarkdown.prod.js";
5
- import { CheckListPlugin as j } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
6
- import { ClearEditorPlugin as O } from "../../node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js";
7
- import { LexicalComposer as $ } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
8
- import { useLexicalComposerContext as B } from "../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
9
- import { LexicalErrorBoundary as D } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
10
- import { HistoryPlugin as H } from "../../node_modules/@lexical/react/LexicalHistoryPlugin.prod.js";
11
- import { ListPlugin as I } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
12
- import { OnChangePlugin as M } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
13
- import { RichTextPlugin as U } from "../../node_modules/@lexical/react/LexicalRichTextPlugin.prod.js";
14
- import { HeadingNode as z, QuoteNode as Q } from "../../node_modules/@lexical/rich-text/LexicalRichText.prod.js";
15
- import { ParagraphNode as d, TextNode as f, $getRoot as p } from "../../node_modules/lexical/Lexical.prod.js";
16
- import { useState as _, useEffect as J } from "react";
17
- import { ContentEditable as q } from "../editor/editor-ui/content-editable.js";
18
- import { ActionsPlugin as G } from "../editor/plugins/actions/actions-plugin.js";
19
- import { ClearEditorActionPlugin as K } from "../editor/plugins/actions/clear-editor-plugin.js";
20
- import { CounterCharacterPlugin as W } from "../editor/plugins/actions/counter-character-plugin.js";
21
- import { FormatBulletedList as X } from "../editor/plugins/toolbar/block-format/format-bulleted-list.js";
22
- import { FormatCheckList as Y } from "../editor/plugins/toolbar/block-format/format-check-list.js";
23
- import { FormatHeading as Z } from "../editor/plugins/toolbar/block-format/format-heading.js";
24
- import { FormatNumberedList as V } from "../editor/plugins/toolbar/block-format/format-numbered-list.js";
25
- import { FormatParagraph as rr } from "../editor/plugins/toolbar/block-format/format-paragraph.js";
26
- import { FormatQuote as or } from "../editor/plugins/toolbar/block-format/format-quote.js";
27
- import { BlockFormatDropDown as er } from "../editor/plugins/toolbar/block-format-toolbar-plugin.js";
28
- import { FontFormatToolbarPlugin as l } from "../editor/plugins/toolbar/font-format-toolbar-plugin.js";
29
- import { ToolbarPlugin as c } from "../editor/plugins/toolbar/toolbar-plugin.js";
30
- import { editorTheme as tr } from "../editor/themes/editor-theme.js";
31
- import { TooltipProvider as ir } from "./tooltip.js";
32
- import { HistoryToolbarPlugin as nr } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
33
- import { cn as ar } from "../../lib/utils.js";
34
- const lr = "Start typing...", mr = {
2
+ import { jsx as r, jsxs as t, Fragment as p } from "react/jsx-runtime";
3
+ import { ListNode as D, ListItemNode as H } from "../../node_modules/@lexical/list/LexicalList.prod.js";
4
+ import { TRANSFORMERS as z, $convertToMarkdownString as U, $convertFromMarkdownString as _ } from "../../node_modules/@lexical/markdown/LexicalMarkdown.prod.js";
5
+ import { CheckListPlugin as Q } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
6
+ import { ClearEditorPlugin as J } from "../../node_modules/@lexical/react/LexicalClearEditorPlugin.prod.js";
7
+ import { LexicalComposer as q } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
8
+ import { useLexicalComposerContext as G } from "../../node_modules/@lexical/react/LexicalComposerContext.prod.js";
9
+ import { LexicalErrorBoundary as K } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
10
+ import { HistoryPlugin as W } from "../../node_modules/@lexical/react/LexicalHistoryPlugin.prod.js";
11
+ import { ListPlugin as X } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
12
+ import { OnChangePlugin as Y } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
13
+ import { RichTextPlugin as Z } from "../../node_modules/@lexical/react/LexicalRichTextPlugin.prod.js";
14
+ import { HeadingNode as V, QuoteNode as rr } from "../../node_modules/@lexical/rich-text/LexicalRichText.prod.js";
15
+ import { ParagraphNode as g, TextNode as h, $nodesOfType as or, $getRoot as b } from "../../node_modules/lexical/Lexical.prod.js";
16
+ import { useState as er, useMemo as tr, useEffect as ir } from "react";
17
+ import { ContentEditable as nr } from "../editor/editor-ui/content-editable.js";
18
+ import { MentionNode as S } from "../editor/nodes/mention-node.js";
19
+ import { ActionsPlugin as lr } from "../editor/plugins/actions/actions-plugin.js";
20
+ import { ClearEditorActionPlugin as ar } from "../editor/plugins/actions/clear-editor-plugin.js";
21
+ import { CounterCharacterPlugin as sr } from "../editor/plugins/actions/counter-character-plugin.js";
22
+ import { MENTION_TRANSFORMER as mr, MentionPlugin as cr, collectMentions as dr } from "../editor/plugins/mention-plugin.js";
23
+ import { FormatBulletedList as fr } from "../editor/plugins/toolbar/block-format/format-bulleted-list.js";
24
+ import { FormatCheckList as pr } from "../editor/plugins/toolbar/block-format/format-check-list.js";
25
+ import { FormatHeading as ur } from "../editor/plugins/toolbar/block-format/format-heading.js";
26
+ import { FormatNumberedList as gr } from "../editor/plugins/toolbar/block-format/format-numbered-list.js";
27
+ import { FormatParagraph as hr } from "../editor/plugins/toolbar/block-format/format-paragraph.js";
28
+ import { FormatQuote as br } from "../editor/plugins/toolbar/block-format/format-quote.js";
29
+ import { BlockFormatDropDown as xr } from "../editor/plugins/toolbar/block-format-toolbar-plugin.js";
30
+ import { FontFormatToolbarPlugin as d } from "../editor/plugins/toolbar/font-format-toolbar-plugin.js";
31
+ import { MentionInsertToolbarPlugin as Nr } from "../editor/plugins/toolbar/mention-insert-toolbar-plugin.js";
32
+ import { ToolbarPlugin as u } from "../editor/plugins/toolbar/toolbar-plugin.js";
33
+ import { editorTheme as vr } from "../editor/themes/editor-theme.js";
34
+ import { TooltipProvider as Er } from "./tooltip.js";
35
+ import { HistoryToolbarPlugin as Fr } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
36
+ import { cn as Pr } from "../../lib/utils.js";
37
+ const yr = "Start typing...", Cr = {
35
38
  format: ["underline"],
36
39
  tag: "++",
37
40
  type: "text-format"
38
- }, v = [
39
- ...A,
40
- mr
41
- ], sr = (o) => o.replace(/<u>(.*?)<\/u>/g, "++$1++"), cr = (o) => o.replace(/\+\+(.+?)\+\+/g, "<u>$1</u>");
42
- function dr({
41
+ }, w = [
42
+ ...z,
43
+ Cr
44
+ ], Rr = (o) => o.replace(/<u>(.*?)<\/u>/g, "++$1++"), Tr = (o) => o.replace(/\+\+(.+?)\+\+/g, "<u>$1</u>");
45
+ function Sr({
43
46
  defaultValue: o,
44
- onlyMarkdown: i
47
+ onlyMarkdown: a,
48
+ transformers: n
45
49
  }) {
46
- const [n] = B();
47
- return J(() => {
48
- o && n.update(() => {
49
- i ? k(
50
- sr(o),
51
- v
52
- ) : p().append(
53
- new d().append(new f(o))
50
+ const [s] = G();
51
+ return ir(() => {
52
+ o && s.update(() => {
53
+ a ? _(
54
+ Rr(o),
55
+ n
56
+ ) : b().append(
57
+ new g().append(new h(o))
54
58
  );
55
- const a = p();
56
- (a.getFirstChild() ?? a).selectStart();
59
+ const m = b();
60
+ (m.getFirstChild() ?? m).selectStart();
57
61
  });
58
- }, [n, o, i]), null;
62
+ }, [s, o, a, n]), null;
59
63
  }
60
- function _r({
64
+ function co({
61
65
  defaultValue: o,
62
- onMarkdownEdit: i,
63
- plugins: n = [],
64
- toolbars: a = [],
65
- placeholder: F = lr,
66
- onlyMarkdown: h = !0,
67
- className: C = "rounded-lg border border-d-border",
68
- wrpClassName: E = ""
66
+ onMarkdownEdit: a,
67
+ onValueChange: n,
68
+ plugins: s = [],
69
+ toolbars: m = [],
70
+ placeholder: M = yr,
71
+ onlyMarkdown: x = !0,
72
+ className: L = "rounded-lg border border-d-border",
73
+ wrpClassName: A = "",
74
+ mentions: c,
75
+ mentionTrigger: N = "@"
69
76
  }) {
70
- const [, P] = _(null), w = {
77
+ const [, k] = er(null), l = c !== void 0, v = tr(
78
+ () => l ? [mr, ...w] : w,
79
+ [l]
80
+ ), O = {
71
81
  namespace: "AppEditor",
72
- theme: tr,
82
+ theme: vr,
73
83
  nodes: [
74
- z,
75
- d,
76
- f,
77
- Q,
78
- S,
79
- T
84
+ V,
85
+ g,
86
+ h,
87
+ rr,
88
+ D,
89
+ H,
90
+ ...l ? [S] : []
80
91
  ],
81
- onError: (t) => {
82
- console.error(t);
92
+ onError: (e) => {
93
+ console.error(e);
83
94
  },
84
- ...o && !h ? {
95
+ ...o && !x ? {
85
96
  editorState: () => {
86
- p().append(
87
- new d().append(new f(o))
97
+ b().append(
98
+ new g().append(new h(o))
88
99
  );
89
100
  }
90
101
  } : {}
91
- }, u = (t) => n.includes(t), m = (t) => a.includes(t), g = u("clear"), x = u("counter"), b = m("block-format"), y = m("font-format"), N = m("history");
92
- return /* @__PURE__ */ r("div", { className: ar("bg-d-background flex h-96 flex-col", E), children: /* @__PURE__ */ r($, { initialConfig: w, children: /* @__PURE__ */ e(ir, { children: [
102
+ }, E = (e) => s.includes(e), f = (e) => m.includes(e), F = E("clear"), P = E("counter"), y = f("block-format"), I = f("font-format"), C = f("history");
103
+ return /* @__PURE__ */ r("div", { className: Pr("bg-d-background flex h-96 flex-col", A), children: /* @__PURE__ */ r(q, { initialConfig: O, children: /* @__PURE__ */ t(Er, { children: [
93
104
  o && /* @__PURE__ */ r(
94
- dr,
105
+ Sr,
95
106
  {
96
107
  defaultValue: o,
97
- onlyMarkdown: h
108
+ onlyMarkdown: x,
109
+ transformers: v
98
110
  }
99
111
  ),
100
- /* @__PURE__ */ e("div", { className: "border-d-border flex items-center border-b", children: [
101
- N && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(nr, {}) }) }),
102
- b && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ e(er, { children: [
103
- /* @__PURE__ */ r(rr, {}),
104
- /* @__PURE__ */ r(Z, { levels: ["h1", "h2", "h3"] }),
105
- /* @__PURE__ */ r(V, {}),
106
- /* @__PURE__ */ r(X, {}),
107
- /* @__PURE__ */ r(Y, {}),
108
- /* @__PURE__ */ r(or, {})
112
+ l && /* @__PURE__ */ r(cr, { source: c, trigger: N }),
113
+ /* @__PURE__ */ t("div", { className: "border-d-border flex items-center border-b", children: [
114
+ C && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(Fr, {}) }) }),
115
+ y && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(xr, { children: [
116
+ /* @__PURE__ */ r(hr, {}),
117
+ /* @__PURE__ */ r(ur, { levels: ["h1", "h2", "h3"] }),
118
+ /* @__PURE__ */ r(gr, {}),
119
+ /* @__PURE__ */ r(fr, {}),
120
+ /* @__PURE__ */ r(pr, {}),
121
+ /* @__PURE__ */ r(br, {})
109
122
  ] }) }) }) }),
110
- y && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ e("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
111
- /* @__PURE__ */ r(l, { format: "bold" }),
112
- /* @__PURE__ */ r(l, { format: "italic" }),
113
- /* @__PURE__ */ r(l, { format: "underline" }),
114
- /* @__PURE__ */ r(l, { format: "strikethrough" })
123
+ I && /* @__PURE__ */ r(u, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
124
+ /* @__PURE__ */ r(d, { format: "bold" }),
125
+ /* @__PURE__ */ r(d, { format: "italic" }),
126
+ /* @__PURE__ */ r(d, { format: "underline" }),
127
+ /* @__PURE__ */ r(d, { format: "strikethrough" }),
128
+ l && /* @__PURE__ */ r(
129
+ Nr,
130
+ {
131
+ trigger: N ?? "@"
132
+ }
133
+ )
115
134
  ] }) })
116
135
  ] }),
117
- /* @__PURE__ */ e("div", { className: "relative flex min-h-0 w-full flex-1 flex-col", children: [
118
- N && /* @__PURE__ */ r(H, {}),
136
+ /* @__PURE__ */ t("div", { className: "relative flex min-h-0 w-full flex-1 flex-col", children: [
137
+ C && /* @__PURE__ */ r(W, {}),
119
138
  /* @__PURE__ */ r(
120
- U,
139
+ Z,
121
140
  {
122
- ErrorBoundary: D,
141
+ ErrorBoundary: K,
123
142
  contentEditable: /* @__PURE__ */ r(
124
143
  "div",
125
144
  {
126
- ref: P,
145
+ ref: k,
127
146
  className: "flex min-h-0 w-full flex-1 overflow-auto",
128
147
  children: /* @__PURE__ */ r(
129
- q,
148
+ nr,
130
149
  {
131
- placeholder: F,
132
- className: `border-d-border w-full rounded-none border-b ${C}`
150
+ placeholder: M,
151
+ className: `border-d-border w-full rounded-none border-b ${L}`
133
152
  }
134
153
  )
135
154
  }
136
155
  )
137
156
  }
138
157
  ),
139
- b && /* @__PURE__ */ e(s, { children: [
140
- /* @__PURE__ */ r(I, {}),
141
- /* @__PURE__ */ r(j, {})
158
+ y && /* @__PURE__ */ t(p, { children: [
159
+ /* @__PURE__ */ r(X, {}),
160
+ /* @__PURE__ */ r(Q, {})
142
161
  ] }),
143
- (g || x) && /* @__PURE__ */ r(G, { children: /* @__PURE__ */ e("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
162
+ (F || P) && /* @__PURE__ */ r(lr, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
144
163
  /* @__PURE__ */ r("div", { className: "flex flex-1 justify-start" }),
145
- /* @__PURE__ */ r("div", { children: x && /* @__PURE__ */ r(W, { charset: "UTF-16" }) }),
146
- /* @__PURE__ */ r("div", { className: "flex flex-1 justify-end gap-2", children: g && /* @__PURE__ */ e(s, { children: [
147
- /* @__PURE__ */ r(K, {}),
148
- /* @__PURE__ */ r(O, {})
164
+ /* @__PURE__ */ r("div", { children: P && /* @__PURE__ */ r(sr, { charset: "UTF-16" }) }),
165
+ /* @__PURE__ */ r("div", { className: "flex flex-1 justify-end gap-2", children: F && /* @__PURE__ */ t(p, { children: [
166
+ /* @__PURE__ */ r(ar, {}),
167
+ /* @__PURE__ */ r(J, {})
149
168
  ] }) })
150
169
  ] }) })
151
170
  ] }),
152
171
  /* @__PURE__ */ r(
153
- M,
172
+ Y,
154
173
  {
155
174
  ignoreSelectionChange: !0,
156
- onChange: (t) => {
157
- if (!i) return;
158
- const R = t.read(
159
- () => L(v)
175
+ onChange: (e) => {
176
+ if (!n && !a) return;
177
+ const R = Tr(
178
+ e.read(() => U(v))
160
179
  );
161
- i(cr(R));
180
+ if (!n) {
181
+ a?.(R);
182
+ return;
183
+ }
184
+ let T = [];
185
+ if (l) {
186
+ const $ = e.read(
187
+ () => dr(or(S))
188
+ ), j = Array.isArray(c) ? c : [], B = new Map(
189
+ j.map((i) => [String(i.id), i])
190
+ );
191
+ T = $.map(
192
+ (i) => B.get(String(i.id)) ?? {
193
+ id: i.id,
194
+ label: i.label,
195
+ value: i.value
196
+ }
197
+ );
198
+ }
199
+ n(R, { mentions: T });
162
200
  }
163
201
  }
164
202
  )
165
203
  ] }) }) });
166
204
  }
167
205
  export {
168
- _r as AppEditor
206
+ co as AppEditor
169
207
  };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsxs as b, Fragment as y, jsx as t } from "react/jsx-runtime";
3
- import { forwardRef as A, useRef as M, useCallback as k, useState as O } from "react";
3
+ import { forwardRef as A, useRef as O, useCallback as k, useState as q } from "react";
4
4
  import { Button as v } from "./button.js";
5
5
  import { CopyButton as S } from "./copy-button.js";
6
- import { MessageInput as q } from "./message-input.js";
7
- import { MessageList as H } from "./message-list.js";
8
- import { PromptSuggestions as J } from "./prompt-suggestions.js";
9
- import { useAutoScroll as K } from "../../hooks/use-auto-scroll.js";
10
- import { cn as Q } from "../../lib/utils.js";
6
+ import { MessageInput as H } from "./message-input.js";
7
+ import { MessageList as J } from "./message-list.js";
8
+ import { PromptSuggestions as K } from "./prompt-suggestions.js";
9
+ import { useAutoScroll as Q } from "../../hooks/use-auto-scroll.js";
10
+ import { cn as V } from "../../lib/utils.js";
11
11
  import { Typo as z } from "./typo.js";
12
12
  import j from "../../node_modules/lucide-react/dist/esm/icons/save.js";
13
- import V from "../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js";
14
- import W from "../../node_modules/lucide-react/dist/esm/icons/thumbs-down.js";
15
- import X from "../../node_modules/lucide-react/dist/esm/icons/arrow-down.js";
16
- function Y({
13
+ import W from "../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js";
14
+ import X from "../../node_modules/lucide-react/dist/esm/icons/thumbs-down.js";
15
+ import Y from "../../node_modules/lucide-react/dist/esm/icons/arrow-down.js";
16
+ function Z({
17
17
  messages: o,
18
18
  welcomeTitle: n = "Da dove iniziamo?",
19
19
  handleSubmit: i,
@@ -29,11 +29,12 @@ function Y({
29
29
  transcribeAudio: D,
30
30
  allowAttachments: L = !1,
31
31
  onEdit: B,
32
- onMessageSave: d
32
+ onMessageSave: d,
33
+ placeholder: P
33
34
  }) {
34
- const P = o.at(-1), T = o.length === 0, I = P?.role === "user", C = M(o);
35
+ const U = o.at(-1), T = o.length === 0, I = U?.role === "user", C = O(o);
35
36
  C.current = o;
36
- const U = k(() => {
37
+ const E = k(() => {
37
38
  if (s?.(), !x) return;
38
39
  const e = [...C.current], l = e.findLast(
39
40
  (a) => a.role === "assistant"
@@ -81,7 +82,7 @@ function Y({
81
82
  );
82
83
  a !== -1 && (e[a] = p, x(e));
83
84
  }
84
- }, [s, x, C]), E = k(
85
+ }, [s, x, C]), M = k(
85
86
  (e) => ({
86
87
  actions: N ? /* @__PURE__ */ b(y, { children: [
87
88
  /* @__PURE__ */ t("div", { className: "border-d-border border-r pr-1", children: /* @__PURE__ */ t(
@@ -109,7 +110,7 @@ function Y({
109
110
  variant: "ghost",
110
111
  className: "h-6 w-6",
111
112
  onClick: () => N(e.id, "thumbs-up"),
112
- children: /* @__PURE__ */ t(V, { className: "h-4 w-4" })
113
+ children: /* @__PURE__ */ t(W, { className: "h-4 w-4" })
113
114
  }
114
115
  ),
115
116
  /* @__PURE__ */ t(
@@ -119,7 +120,7 @@ function Y({
119
120
  variant: "ghost",
120
121
  className: "h-6 w-6",
121
122
  onClick: () => N(e.id, "thumbs-down"),
122
- children: /* @__PURE__ */ t(W, { className: "h-4 w-4" })
123
+ children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
123
124
  }
124
125
  )
125
126
  ] }) : /* @__PURE__ */ b(y, { children: [
@@ -150,7 +151,7 @@ function Y({
150
151
  T && /* @__PURE__ */ t("div", { className: "flex flex-1 flex-col items-center justify-center p-8", children: m && u && /* @__PURE__ */ b(y, { children: [
151
152
  /* @__PURE__ */ t(z, { variant: "h3", className: "mb-8 text-center", children: n }),
152
153
  /* @__PURE__ */ t(
153
- J,
154
+ K,
154
155
  {
155
156
  label: "",
156
157
  append: m,
@@ -158,12 +159,12 @@ function Y({
158
159
  }
159
160
  )
160
161
  ] }) }),
161
- o.length > 0 ? /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(
162
- H,
162
+ o.length > 0 ? /* @__PURE__ */ t($, { children: /* @__PURE__ */ t(
163
+ J,
163
164
  {
164
165
  messages: o,
165
166
  isTyping: I,
166
- messageOptions: E,
167
+ messageOptions: M,
167
168
  onEdit: B,
168
169
  onMessageSave: d
169
170
  }
@@ -176,31 +177,32 @@ function Y({
176
177
  isPending: w || I,
177
178
  handleSubmit: i,
178
179
  children: ({ files: e, setFiles: l }) => /* @__PURE__ */ t(
179
- q,
180
+ H,
180
181
  {
181
182
  value: f,
182
183
  onChange: c,
183
184
  allowAttachments: L,
184
185
  files: e,
185
186
  setFiles: l,
186
- stop: U,
187
+ stop: E,
187
188
  isGenerating: w,
188
- transcribeAudio: D
189
+ transcribeAudio: D,
190
+ placeholder: P
189
191
  }
190
192
  )
191
193
  }
192
194
  )
193
195
  ] });
194
196
  }
195
- Y.displayName = "Chat";
196
- function Z({ children: o }) {
197
+ Z.displayName = "Chat";
198
+ function $({ children: o }) {
197
199
  const {
198
200
  containerRef: n,
199
201
  scrollToBottom: i,
200
202
  handleScroll: f,
201
203
  shouldAutoScroll: c,
202
204
  handleTouchStart: s
203
- } = K();
205
+ } = Q();
204
206
  return /* @__PURE__ */ b(
205
207
  "div",
206
208
  {
@@ -217,7 +219,7 @@ function Z({ children: o }) {
217
219
  className: "animate-in fade-in-0 slide-in-from-bottom-1 pointer-events-auto h-8 w-8 rounded-full ease-in-out",
218
220
  size: "icon",
219
221
  variant: "ghost",
220
- children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
222
+ children: /* @__PURE__ */ t(Y, { className: "h-4 w-4" })
221
223
  }
222
224
  ) }) })
223
225
  ]
@@ -228,26 +230,26 @@ const F = A(({ className: o, ...n }, i) => /* @__PURE__ */ t(
228
230
  "div",
229
231
  {
230
232
  ref: i,
231
- className: Q("flex h-full max-h-full w-full flex-col", o),
233
+ className: V("flex h-full max-h-full w-full flex-col", o),
232
234
  ...n
233
235
  }
234
236
  ));
235
237
  F.displayName = "ChatContainer";
236
238
  const _ = A(
237
239
  ({ children: o, handleSubmit: n, className: i }, f) => {
238
- const [c, s] = O(null);
240
+ const [c, s] = q(null);
239
241
  return /* @__PURE__ */ t("form", { ref: f, onSubmit: (m) => {
240
242
  if (!c) {
241
243
  n(m);
242
244
  return;
243
245
  }
244
- const u = $(c);
246
+ const u = G(c);
245
247
  n(m, { experimental_attachments: u }), s(null);
246
248
  }, className: i, children: o({ files: c, setFiles: s }) });
247
249
  }
248
250
  );
249
251
  _.displayName = "ChatForm";
250
- function $(o) {
252
+ function G(o) {
251
253
  if (typeof window > "u")
252
254
  return {};
253
255
  const n = new DataTransfer();
@@ -256,8 +258,8 @@ function $(o) {
256
258
  return n.files;
257
259
  }
258
260
  export {
259
- Y as Chat,
261
+ Z as Chat,
260
262
  F as ChatContainer,
261
263
  _ as ChatForm,
262
- Z as ChatMessages
264
+ $ as ChatMessages
263
265
  };