@blocknote/xl-ai 0.44.0 → 0.44.2
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/blocknote-xl-ai.cjs +1 -1
- package/dist/blocknote-xl-ai.cjs.map +1 -1
- package/dist/blocknote-xl-ai.js +382 -376
- package/dist/blocknote-xl-ai.js.map +1 -1
- package/dist/{client-C4uaJa77.js → client-ChPl2nQr.js} +42 -24
- package/dist/client-ChPl2nQr.js.map +1 -0
- package/dist/client-wMB2zJXh.cjs +36 -0
- package/dist/client-wMB2zJXh.cjs.map +1 -0
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +7 -7
- package/src/AIExtension.ts +6 -2
- package/src/components/AIMenu/AIMenuController.tsx +6 -1
- package/src/prosemirror/rebaseTool.ts +1 -1
- package/src/streamTool/filterValidOperations.ts +1 -0
- package/src/streamTool/preprocess.test.ts +32 -66
- package/src/streamTool/preprocess.ts +8 -38
- package/src/streamTool/toValidatedOperations.ts +12 -0
- package/src/streamTool/vercelAiSdk/util/chatHandlers.ts +2 -0
- package/src/testUtil/suggestChangesTestUtil.ts +1 -1
- package/types/src/streamTool/preprocess.d.ts +0 -13
- package/dist/client-C4uaJa77.js.map +0 -1
- package/dist/client-DrruPiJu.cjs +0 -36
- package/dist/client-DrruPiJu.cjs.map +0 -1
package/dist/blocknote-xl-ai.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Chat as
|
|
2
|
-
import { createExtension as
|
|
3
|
-
import { ForkYDocExtension as
|
|
4
|
-
import { suggestChanges as
|
|
5
|
-
import { Slice as
|
|
6
|
-
import { Plugin as
|
|
7
|
-
import { fixTablesKey as
|
|
8
|
-
import { DecorationSet as
|
|
9
|
-
import { defaultSelectionBuilder as
|
|
10
|
-
import { b as
|
|
11
|
-
import { C as
|
|
12
|
-
import { jsxs as
|
|
13
|
-
import { useBlockNoteContext as
|
|
14
|
-
import
|
|
15
|
-
import { offset as
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
return new
|
|
19
|
-
key:
|
|
1
|
+
import { Chat as oe } from "@ai-sdk/react";
|
|
2
|
+
import { createExtension as ne, createStore as H, getNodeById as re, UnreachableCaseError as ie, mergeCSSClasses as ae } from "@blocknote/core";
|
|
3
|
+
import { ForkYDocExtension as L, ShowSelectionExtension as T, filterSuggestionItems as se, FormattingToolbarExtension as le } from "@blocknote/core/extensions";
|
|
4
|
+
import { suggestChanges as ce, revertSuggestions as j, applySuggestions as ue } from "@handlewithcare/prosemirror-suggest-changes";
|
|
5
|
+
import { Slice as R, Fragment as q } from "prosemirror-model";
|
|
6
|
+
import { Plugin as W, PluginKey as G } from "prosemirror-state";
|
|
7
|
+
import { fixTablesKey as me } from "prosemirror-tables";
|
|
8
|
+
import { DecorationSet as Z, Decoration as D } from "prosemirror-view";
|
|
9
|
+
import { defaultSelectionBuilder as de } from "y-prosemirror";
|
|
10
|
+
import { b as fe, s as ge, c as y, a as S } from "./client-ChPl2nQr.js";
|
|
11
|
+
import { C as gt, P as pt, S as ht, g as Ct, d as bt, f as vt, h as St, j as yt, m as wt, o as kt, n as It, k as _t, p as xt, i as Mt, e as Lt, l as Tt, t as Pt } from "./client-ChPl2nQr.js";
|
|
12
|
+
import { jsxs as pe, jsx as l } from "react/jsx-runtime";
|
|
13
|
+
import { useBlockNoteContext as he, useComponentsContext as P, useSuggestionMenuKeyboardHandler as Ce, useBlockNoteEditor as A, useExtension as _, useExtensionState as $, BlockPopover as be } from "@blocknote/react";
|
|
14
|
+
import v, { useState as Y, useCallback as I, useMemo as k, useEffect as J } from "react";
|
|
15
|
+
import { offset as ve, size as Se, autoUpdate as ye } from "@floating-ui/react";
|
|
16
|
+
const N = new G("blocknote-agent-cursor");
|
|
17
|
+
function we(e) {
|
|
18
|
+
return new W({
|
|
19
|
+
key: N,
|
|
20
20
|
view: (t) => ({}),
|
|
21
21
|
state: {
|
|
22
22
|
init: () => ({
|
|
23
23
|
selection: void 0
|
|
24
24
|
}),
|
|
25
|
-
apply: (t,
|
|
25
|
+
apply: (t, r) => {
|
|
26
26
|
const o = t.getMeta("aiAgent");
|
|
27
27
|
return o ? {
|
|
28
28
|
selection: o.selection
|
|
@@ -33,142 +33,143 @@ function Se(e) {
|
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
35
35
|
decorations: (t) => {
|
|
36
|
-
const { doc:
|
|
36
|
+
const { doc: r } = t, { selection: o } = N.getState(t), i = [];
|
|
37
37
|
if (!o)
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
return Z.create(r, []);
|
|
39
|
+
i.push(
|
|
40
|
+
D.widget(o.head, () => ke(e), {
|
|
41
41
|
key: "agent-cursor",
|
|
42
42
|
side: 10
|
|
43
43
|
})
|
|
44
44
|
);
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
|
|
45
|
+
const m = Math.min(o.anchor, o.head), f = Math.max(o.anchor, o.head);
|
|
46
|
+
return i.push(
|
|
47
|
+
D.inline(m, f, de(e), {
|
|
48
48
|
inclusiveEnd: !0,
|
|
49
49
|
inclusiveStart: !1
|
|
50
50
|
})
|
|
51
|
-
),
|
|
51
|
+
), Z.create(r, i);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const ke = (e) => {
|
|
57
57
|
const t = document.createElement("span");
|
|
58
58
|
t.classList.add("bn-collaboration-cursor__base"), t.setAttribute("data-active", "true");
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const r = document.createElement("span");
|
|
60
|
+
r.setAttribute("contentedEditable", "false"), r.classList.add("bn-collaboration-cursor__caret"), r.setAttribute("style", `background-color: ${e.color}`);
|
|
61
61
|
const o = document.createElement("span");
|
|
62
|
-
return o.classList.add("bn-collaboration-cursor__label"), o.setAttribute("style", `background-color: ${e.color}`), o.insertBefore(document.createTextNode(e.name), null),
|
|
63
|
-
},
|
|
62
|
+
return o.classList.add("bn-collaboration-cursor__label"), o.setAttribute("style", `background-color: ${e.color}`), o.insertBefore(document.createTextNode(e.name), null), r.insertBefore(o, null), t.insertBefore(document.createTextNode(""), null), t.insertBefore(r, null), t.insertBefore(document.createTextNode(""), null), t;
|
|
63
|
+
}, Ie = new G("blocknote-ai-plugin"), b = ne(
|
|
64
64
|
({
|
|
65
65
|
editor: e,
|
|
66
66
|
options: t
|
|
67
67
|
}) => {
|
|
68
|
-
const
|
|
68
|
+
const r = H(t ?? {}), o = H({
|
|
69
69
|
aiMenuState: "closed"
|
|
70
70
|
});
|
|
71
|
-
let
|
|
72
|
-
|
|
71
|
+
let i, m = !1;
|
|
72
|
+
const f = ce();
|
|
73
|
+
return f.props.decorations = void 0, {
|
|
73
74
|
key: "ai",
|
|
74
|
-
options:
|
|
75
|
+
options: r,
|
|
75
76
|
store: o,
|
|
76
|
-
mount({ signal:
|
|
77
|
-
let
|
|
77
|
+
mount({ signal: n }) {
|
|
78
|
+
let a = !1;
|
|
78
79
|
document.addEventListener(
|
|
79
80
|
"scroll",
|
|
80
81
|
() => {
|
|
81
|
-
|
|
82
|
+
a && (m = !1), a = !0;
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
capture: !0,
|
|
85
|
-
signal:
|
|
86
|
+
signal: n
|
|
86
87
|
}
|
|
87
88
|
), document.addEventListener(
|
|
88
89
|
"scrollend",
|
|
89
90
|
() => {
|
|
90
|
-
|
|
91
|
+
a = !1;
|
|
91
92
|
},
|
|
92
93
|
{
|
|
93
94
|
capture: !0,
|
|
94
|
-
signal:
|
|
95
|
+
signal: n
|
|
95
96
|
}
|
|
96
97
|
);
|
|
97
98
|
},
|
|
98
99
|
prosemirrorPlugins: [
|
|
99
|
-
new
|
|
100
|
-
key:
|
|
101
|
-
filterTransaction: (
|
|
100
|
+
new W({
|
|
101
|
+
key: Ie,
|
|
102
|
+
filterTransaction: (n) => {
|
|
102
103
|
var s;
|
|
103
|
-
const
|
|
104
|
-
return !(
|
|
104
|
+
const a = o.state.aiMenuState;
|
|
105
|
+
return !(a !== "closed" && a.status === "ai-writing" && (s = n.getMeta(me)) != null && s.fixTables);
|
|
105
106
|
}
|
|
106
107
|
}),
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
f,
|
|
109
|
+
we(
|
|
109
110
|
(t == null ? void 0 : t.agentCursor) || { name: "AI", color: "#8bc6ff" }
|
|
110
111
|
)
|
|
111
112
|
],
|
|
112
113
|
/**
|
|
113
114
|
* Open the AI menu at a specific block
|
|
114
115
|
*/
|
|
115
|
-
openAIMenuAtBlock(
|
|
116
|
-
var s,
|
|
116
|
+
openAIMenuAtBlock(n) {
|
|
117
|
+
var s, c;
|
|
117
118
|
(s = e.getExtension(T)) == null || s.showSelection(!0), e.isEditable = !1, o.setState({
|
|
118
119
|
aiMenuState: {
|
|
119
|
-
blockId:
|
|
120
|
+
blockId: n,
|
|
120
121
|
status: "user-input"
|
|
121
122
|
}
|
|
122
123
|
});
|
|
123
|
-
const
|
|
124
|
-
`[data-node-type="blockContainer"][data-id="${
|
|
124
|
+
const a = (c = e.domElement) == null ? void 0 : c.querySelector(
|
|
125
|
+
`[data-node-type="blockContainer"][data-id="${n}"]`
|
|
125
126
|
);
|
|
126
|
-
|
|
127
|
+
a == null || a.scrollIntoView({ block: "center" });
|
|
127
128
|
},
|
|
128
129
|
/**
|
|
129
130
|
* Close the AI menu
|
|
130
131
|
*/
|
|
131
132
|
closeAIMenu() {
|
|
132
|
-
var
|
|
133
|
+
var n;
|
|
133
134
|
o.setState({
|
|
134
135
|
aiMenuState: "closed"
|
|
135
|
-
}),
|
|
136
|
+
}), i = void 0, (n = e.getExtension(T)) == null || n.showSelection(!1), e.isEditable = !0, e.focus();
|
|
136
137
|
},
|
|
137
138
|
/**
|
|
138
139
|
* Accept the changes made by the LLM
|
|
139
140
|
*/
|
|
140
141
|
acceptChanges() {
|
|
141
|
-
var
|
|
142
|
-
const
|
|
143
|
-
e.exec((s,
|
|
144
|
-
|
|
145
|
-
})), e.exec((s,
|
|
146
|
-
const
|
|
147
|
-
|
|
142
|
+
var a;
|
|
143
|
+
const n = e.prosemirrorState.doc;
|
|
144
|
+
e.exec((s, c) => j(s, (g) => {
|
|
145
|
+
c == null || c(g.setMeta("addToHistory", !1));
|
|
146
|
+
})), e.exec((s, c) => {
|
|
147
|
+
const g = s.tr;
|
|
148
|
+
g.replace(
|
|
148
149
|
0,
|
|
149
|
-
|
|
150
|
-
new
|
|
150
|
+
g.doc.content.size,
|
|
151
|
+
new R(q.from(n), 0, 0)
|
|
151
152
|
);
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const p = s.apply(g);
|
|
154
|
+
return ue(p, (d) => {
|
|
155
|
+
c == null || c(
|
|
156
|
+
g.replace(
|
|
156
157
|
0,
|
|
157
|
-
|
|
158
|
-
new
|
|
158
|
+
g.doc.content.size,
|
|
159
|
+
new R(q.from(d.doc), 0, 0)
|
|
159
160
|
)
|
|
160
161
|
);
|
|
161
162
|
});
|
|
162
|
-
}), (
|
|
163
|
+
}), (a = e.getExtension(L)) == null || a.merge({ keepChanges: !0 }), this.closeAIMenu();
|
|
163
164
|
},
|
|
164
165
|
/**
|
|
165
166
|
* Reject the changes made by the LLM
|
|
166
167
|
*/
|
|
167
168
|
rejectChanges() {
|
|
168
|
-
var
|
|
169
|
-
e.exec((
|
|
170
|
-
s == null || s(
|
|
171
|
-
})), (
|
|
169
|
+
var n;
|
|
170
|
+
e.exec((a, s) => j(a, (c) => {
|
|
171
|
+
s == null || s(c.setMeta("addToHistory", !1));
|
|
172
|
+
})), (n = e.getExtension(L)) == null || n.merge({ keepChanges: !1 }), this.closeAIMenu();
|
|
172
173
|
},
|
|
173
174
|
/**
|
|
174
175
|
* Abort the current LLM request.
|
|
@@ -176,12 +177,12 @@ const ye = (e) => {
|
|
|
176
177
|
* This will stop the ongoing request and revert any changes made by the AI.
|
|
177
178
|
* Only valid when there is an active AI request in progress.
|
|
178
179
|
*/
|
|
179
|
-
async abort(
|
|
180
|
-
const { aiMenuState:
|
|
181
|
-
if (
|
|
180
|
+
async abort(n) {
|
|
181
|
+
const { aiMenuState: a } = o.state;
|
|
182
|
+
if (a === "closed" || !i || a.status !== "thinking" && a.status !== "ai-writing")
|
|
182
183
|
return;
|
|
183
|
-
const s =
|
|
184
|
-
|
|
184
|
+
const s = i.chat;
|
|
185
|
+
i.abortController.abort(n), await s.stop();
|
|
185
186
|
},
|
|
186
187
|
/**
|
|
187
188
|
* Retry the previous LLM call.
|
|
@@ -189,16 +190,16 @@ const ye = (e) => {
|
|
|
189
190
|
* Only valid if the current status is "error"
|
|
190
191
|
*/
|
|
191
192
|
async retry() {
|
|
192
|
-
const { aiMenuState:
|
|
193
|
-
if (
|
|
193
|
+
const { aiMenuState: n } = o.state;
|
|
194
|
+
if (n === "closed" || n.status !== "error" || !i)
|
|
194
195
|
throw new Error(
|
|
195
196
|
"retry() is only valid when a previous response failed"
|
|
196
197
|
);
|
|
197
|
-
return (
|
|
198
|
-
...
|
|
198
|
+
return (i == null ? void 0 : i.chat.status) === "error" ? this.invokeAI({
|
|
199
|
+
...i.previousRequestOptions,
|
|
199
200
|
userPrompt: "An error occured in the previous request. Please retry to accomplish the last user prompt."
|
|
200
201
|
}) : this.invokeAI({
|
|
201
|
-
...
|
|
202
|
+
...i.previousRequestOptions,
|
|
202
203
|
userPrompt: "An error occured while executing the previous tool call. Please retry to accomplish the last user prompt."
|
|
203
204
|
});
|
|
204
205
|
},
|
|
@@ -209,288 +210,288 @@ const ye = (e) => {
|
|
|
209
210
|
* if you want to implement how an LLM call is executed. Usually, you should
|
|
210
211
|
* use {@link executeLLMRequest} instead which will handle the status updates for you.
|
|
211
212
|
*/
|
|
212
|
-
setAIResponseStatus(
|
|
213
|
+
setAIResponseStatus(n) {
|
|
213
214
|
var s;
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
if (
|
|
217
|
-
if (
|
|
218
|
-
throw new
|
|
215
|
+
const a = o.state.aiMenuState;
|
|
216
|
+
if (a !== "closed")
|
|
217
|
+
if (n === "ai-writing" && ((s = e.getExtension(T)) == null || s.showSelection(!1)), typeof n == "object") {
|
|
218
|
+
if (n.status !== "error")
|
|
219
|
+
throw new ie(n.status);
|
|
219
220
|
this.store.setState({
|
|
220
221
|
aiMenuState: {
|
|
221
|
-
status:
|
|
222
|
-
error:
|
|
223
|
-
blockId:
|
|
222
|
+
status: n.status,
|
|
223
|
+
error: n.error,
|
|
224
|
+
blockId: a.blockId
|
|
224
225
|
}
|
|
225
226
|
});
|
|
226
227
|
} else
|
|
227
228
|
this.store.setState({
|
|
228
229
|
aiMenuState: {
|
|
229
|
-
status:
|
|
230
|
-
blockId:
|
|
230
|
+
status: n,
|
|
231
|
+
blockId: a.blockId
|
|
231
232
|
}
|
|
232
233
|
});
|
|
233
234
|
},
|
|
234
235
|
/**
|
|
235
236
|
* @deprecated Use {@link invokeAI} instead
|
|
236
237
|
*/
|
|
237
|
-
async callLLM(
|
|
238
|
-
return this.invokeAI(
|
|
238
|
+
async callLLM(n) {
|
|
239
|
+
return this.invokeAI(n);
|
|
239
240
|
},
|
|
240
241
|
/**
|
|
241
242
|
* Execute a call to an LLM and apply the result to the editor
|
|
242
243
|
*/
|
|
243
|
-
async invokeAI(
|
|
244
|
-
var
|
|
245
|
-
this.setAIResponseStatus("thinking"), (
|
|
244
|
+
async invokeAI(n) {
|
|
245
|
+
var a, s, c, g;
|
|
246
|
+
this.setAIResponseStatus("thinking"), (a = e.getExtension(L)) == null || a.fork();
|
|
246
247
|
try {
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
previousRequestOptions:
|
|
250
|
-
chat: ((s =
|
|
248
|
+
const p = new AbortController();
|
|
249
|
+
i ? (i.previousRequestOptions = n, i.abortController = p) : i = {
|
|
250
|
+
previousRequestOptions: n,
|
|
251
|
+
chat: ((s = n.chatProvider) == null ? void 0 : s.call(n)) || ((g = (c = this.options.state).chatProvider) == null ? void 0 : g.call(c)) || new oe({
|
|
251
252
|
sendAutomaticallyWhen: () => !1,
|
|
252
|
-
transport:
|
|
253
|
+
transport: n.transport || this.options.state.transport
|
|
253
254
|
}),
|
|
254
|
-
abortController:
|
|
255
|
+
abortController: p
|
|
255
256
|
};
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
...
|
|
259
|
-
...
|
|
257
|
+
const d = i.chat;
|
|
258
|
+
n = {
|
|
259
|
+
...r.state,
|
|
260
|
+
...n
|
|
260
261
|
};
|
|
261
|
-
const
|
|
262
|
+
const u = await fe({
|
|
262
263
|
editor: e,
|
|
263
|
-
useSelection:
|
|
264
|
-
deleteEmptyCursorBlock:
|
|
265
|
-
streamToolsProvider:
|
|
266
|
-
documentStateBuilder:
|
|
267
|
-
onBlockUpdated: (
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
264
|
+
useSelection: n.useSelection,
|
|
265
|
+
deleteEmptyCursorBlock: n.deleteEmptyCursorBlock,
|
|
266
|
+
streamToolsProvider: n.streamToolsProvider ?? this.options.state.streamToolsProvider,
|
|
267
|
+
documentStateBuilder: n.documentStateBuilder ?? this.options.state.documentStateBuilder,
|
|
268
|
+
onBlockUpdated: (B) => {
|
|
269
|
+
const O = o.state.aiMenuState, z = O === "closed" ? void 0 : O;
|
|
270
|
+
if (!z || z.status !== "ai-writing")
|
|
270
271
|
return;
|
|
271
|
-
const
|
|
272
|
-
|
|
272
|
+
const V = re(
|
|
273
|
+
B,
|
|
273
274
|
e.prosemirrorState.doc
|
|
274
275
|
);
|
|
275
|
-
|
|
276
|
+
V && (o.setState({
|
|
276
277
|
aiMenuState: {
|
|
277
|
-
blockId:
|
|
278
|
+
blockId: B,
|
|
278
279
|
status: "ai-writing"
|
|
279
280
|
}
|
|
280
|
-
}),
|
|
281
|
-
|
|
281
|
+
}), m && e.prosemirrorView.domAtPos(
|
|
282
|
+
V.posBeforeNode + 1
|
|
282
283
|
).node.scrollIntoView({
|
|
283
284
|
block: "center"
|
|
284
285
|
}));
|
|
285
286
|
},
|
|
286
287
|
onStart: () => {
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
m = !0, this.setAIResponseStatus("ai-writing"), u.emptyCursorBlockToDelete && u.editor.getBlock(u.emptyCursorBlockToDelete) && u.editor.removeBlocks([
|
|
289
|
+
u.emptyCursorBlockToDelete
|
|
289
290
|
]);
|
|
290
291
|
}
|
|
291
|
-
}),
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
}), C = await ge(
|
|
293
|
+
d,
|
|
294
|
+
u,
|
|
294
295
|
{
|
|
295
296
|
role: "user",
|
|
296
297
|
parts: [
|
|
297
298
|
{
|
|
298
299
|
type: "text",
|
|
299
|
-
text:
|
|
300
|
+
text: n.userPrompt
|
|
300
301
|
}
|
|
301
302
|
]
|
|
302
303
|
},
|
|
303
|
-
|
|
304
|
-
|
|
304
|
+
n.chatRequestOptions || this.options.state.chatRequestOptions,
|
|
305
|
+
i.abortController.signal
|
|
305
306
|
);
|
|
306
|
-
|
|
307
|
-
result:
|
|
308
|
-
chatStatus:
|
|
309
|
-
chatError:
|
|
307
|
+
C.ok && d.status !== "error" || p.signal.aborted ? this.setAIResponseStatus("user-reviewing") : (console.warn("Error calling LLM", {
|
|
308
|
+
result: C,
|
|
309
|
+
chatStatus: d.status,
|
|
310
|
+
chatError: d.error
|
|
310
311
|
}), this.setAIResponseStatus({
|
|
311
312
|
status: "error",
|
|
312
|
-
error:
|
|
313
|
+
error: C.ok ? d.error : C.error
|
|
313
314
|
}));
|
|
314
|
-
} catch (
|
|
315
|
+
} catch (p) {
|
|
315
316
|
this.setAIResponseStatus({
|
|
316
317
|
status: "error",
|
|
317
|
-
error:
|
|
318
|
+
error: p
|
|
318
319
|
}), console.error(
|
|
319
320
|
"Unexpected error calling LLM",
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
p,
|
|
322
|
+
i == null ? void 0 : i.chat.messages
|
|
322
323
|
);
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
};
|
|
326
327
|
}
|
|
327
328
|
);
|
|
328
|
-
var
|
|
329
|
+
var Q = {
|
|
329
330
|
color: void 0,
|
|
330
331
|
size: void 0,
|
|
331
332
|
className: void 0,
|
|
332
333
|
style: void 0,
|
|
333
334
|
attr: void 0
|
|
334
|
-
},
|
|
335
|
-
function
|
|
335
|
+
}, F = v.createContext && /* @__PURE__ */ v.createContext(Q), _e = ["attr", "size", "title"];
|
|
336
|
+
function xe(e, t) {
|
|
336
337
|
if (e == null) return {};
|
|
337
|
-
var
|
|
338
|
+
var r = Me(e, t), o, i;
|
|
338
339
|
if (Object.getOwnPropertySymbols) {
|
|
339
|
-
var
|
|
340
|
-
for (
|
|
341
|
-
o =
|
|
340
|
+
var m = Object.getOwnPropertySymbols(e);
|
|
341
|
+
for (i = 0; i < m.length; i++)
|
|
342
|
+
o = m[i], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (r[o] = e[o]);
|
|
342
343
|
}
|
|
343
|
-
return
|
|
344
|
+
return r;
|
|
344
345
|
}
|
|
345
|
-
function
|
|
346
|
+
function Me(e, t) {
|
|
346
347
|
if (e == null) return {};
|
|
347
|
-
var
|
|
348
|
+
var r = {};
|
|
348
349
|
for (var o in e)
|
|
349
350
|
if (Object.prototype.hasOwnProperty.call(e, o)) {
|
|
350
351
|
if (t.indexOf(o) >= 0) continue;
|
|
351
|
-
|
|
352
|
+
r[o] = e[o];
|
|
352
353
|
}
|
|
353
|
-
return
|
|
354
|
+
return r;
|
|
354
355
|
}
|
|
355
356
|
function x() {
|
|
356
357
|
return x = Object.assign ? Object.assign.bind() : function(e) {
|
|
357
358
|
for (var t = 1; t < arguments.length; t++) {
|
|
358
|
-
var
|
|
359
|
-
for (var o in
|
|
360
|
-
Object.prototype.hasOwnProperty.call(
|
|
359
|
+
var r = arguments[t];
|
|
360
|
+
for (var o in r)
|
|
361
|
+
Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
|
|
361
362
|
}
|
|
362
363
|
return e;
|
|
363
364
|
}, x.apply(this, arguments);
|
|
364
365
|
}
|
|
365
|
-
function
|
|
366
|
-
var
|
|
366
|
+
function U(e, t) {
|
|
367
|
+
var r = Object.keys(e);
|
|
367
368
|
if (Object.getOwnPropertySymbols) {
|
|
368
369
|
var o = Object.getOwnPropertySymbols(e);
|
|
369
|
-
t && (o = o.filter(function(
|
|
370
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
371
|
-
})),
|
|
370
|
+
t && (o = o.filter(function(i) {
|
|
371
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
372
|
+
})), r.push.apply(r, o);
|
|
372
373
|
}
|
|
373
|
-
return
|
|
374
|
+
return r;
|
|
374
375
|
}
|
|
375
|
-
function
|
|
376
|
+
function M(e) {
|
|
376
377
|
for (var t = 1; t < arguments.length; t++) {
|
|
377
|
-
var
|
|
378
|
-
t % 2 ?
|
|
379
|
-
|
|
380
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
381
|
-
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(
|
|
378
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
379
|
+
t % 2 ? U(Object(r), !0).forEach(function(o) {
|
|
380
|
+
Le(e, o, r[o]);
|
|
381
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : U(Object(r)).forEach(function(o) {
|
|
382
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(r, o));
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
385
|
return e;
|
|
385
386
|
}
|
|
386
|
-
function
|
|
387
|
-
return t =
|
|
387
|
+
function Le(e, t, r) {
|
|
388
|
+
return t = Te(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
-
var t =
|
|
390
|
+
function Te(e) {
|
|
391
|
+
var t = Pe(e, "string");
|
|
391
392
|
return typeof t == "symbol" ? t : t + "";
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
+
function Pe(e, t) {
|
|
394
395
|
if (typeof e != "object" || !e) return e;
|
|
395
|
-
var
|
|
396
|
-
if (
|
|
397
|
-
var o =
|
|
396
|
+
var r = e[Symbol.toPrimitive];
|
|
397
|
+
if (r !== void 0) {
|
|
398
|
+
var o = r.call(e, t);
|
|
398
399
|
if (typeof o != "object") return o;
|
|
399
400
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
400
401
|
}
|
|
401
402
|
return (t === "string" ? String : Number)(e);
|
|
402
403
|
}
|
|
403
|
-
function
|
|
404
|
-
return e && e.map((t,
|
|
405
|
-
key:
|
|
406
|
-
}, t.attr),
|
|
404
|
+
function X(e) {
|
|
405
|
+
return e && e.map((t, r) => /* @__PURE__ */ v.createElement(t.tag, M({
|
|
406
|
+
key: r
|
|
407
|
+
}, t.attr), X(t.child)));
|
|
407
408
|
}
|
|
408
|
-
function
|
|
409
|
-
return (t) => /* @__PURE__ */
|
|
410
|
-
attr:
|
|
411
|
-
}, t),
|
|
409
|
+
function h(e) {
|
|
410
|
+
return (t) => /* @__PURE__ */ v.createElement(Ae, x({
|
|
411
|
+
attr: M({}, e.attr)
|
|
412
|
+
}, t), X(e.child));
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
-
var t = (
|
|
414
|
+
function Ae(e) {
|
|
415
|
+
var t = (r) => {
|
|
415
416
|
var {
|
|
416
417
|
attr: o,
|
|
417
|
-
size:
|
|
418
|
-
title:
|
|
419
|
-
} = e,
|
|
420
|
-
return
|
|
418
|
+
size: i,
|
|
419
|
+
title: m
|
|
420
|
+
} = e, f = xe(e, _e), n = i || r.size || "1em", a;
|
|
421
|
+
return r.className && (a = r.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ v.createElement("svg", x({
|
|
421
422
|
stroke: "currentColor",
|
|
422
423
|
fill: "currentColor",
|
|
423
424
|
strokeWidth: "0"
|
|
424
|
-
},
|
|
425
|
-
className:
|
|
426
|
-
style:
|
|
427
|
-
color: e.color ||
|
|
428
|
-
},
|
|
429
|
-
height:
|
|
430
|
-
width:
|
|
425
|
+
}, r.attr, o, f, {
|
|
426
|
+
className: a,
|
|
427
|
+
style: M(M({
|
|
428
|
+
color: e.color || r.color
|
|
429
|
+
}, r.style), e.style),
|
|
430
|
+
height: n,
|
|
431
|
+
width: n,
|
|
431
432
|
xmlns: "http://www.w3.org/2000/svg"
|
|
432
|
-
}),
|
|
433
|
+
}), m && /* @__PURE__ */ v.createElement("title", null, m), e.children);
|
|
433
434
|
};
|
|
434
|
-
return
|
|
435
|
+
return F !== void 0 ? /* @__PURE__ */ v.createElement(F.Consumer, null, (r) => t(r)) : t(Q);
|
|
435
436
|
}
|
|
436
|
-
function
|
|
437
|
-
return
|
|
437
|
+
function ee(e) {
|
|
438
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z" }, child: [] }] })(e);
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
-
return
|
|
441
|
-
}
|
|
442
|
-
function Pe(e) {
|
|
443
|
-
return C({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M15.1986 9.94447C14.7649 9.5337 14.4859 8.98613 14.4085 8.39384L14.0056 5.31138L11.275 6.79724C10.7503 7.08274 10.1433 7.17888 9.55608 7.06948L6.49998 6.50015L7.06931 9.55625C7.17871 10.1435 7.08257 10.7505 6.79707 11.2751L5.31121 14.0057L8.39367 14.4086C8.98596 14.4861 9.53353 14.7651 9.94431 15.1987L12.0821 17.4557L13.4178 14.6486C13.6745 14.1092 14.109 13.6747 14.6484 13.418L17.4555 12.0823L15.1986 9.94447ZM15.2238 15.5079L13.0111 20.1581C12.8687 20.4573 12.5107 20.5844 12.2115 20.442C12.1448 20.4103 12.0845 20.3665 12.0337 20.3129L8.49229 16.5741C8.39749 16.474 8.27113 16.4096 8.13445 16.3918L3.02816 15.7243C2.69958 15.6814 2.46804 15.3802 2.51099 15.0516C2.52056 14.9784 2.54359 14.9075 2.5789 14.8426L5.04031 10.3192C5.1062 10.1981 5.12839 10.058 5.10314 9.92253L4.16 4.85991C4.09931 4.53414 4.3142 4.22086 4.63997 4.16017C4.7126 4.14664 4.78711 4.14664 4.85974 4.16017L9.92237 5.10331C10.0579 5.12855 10.198 5.10637 10.319 5.04048L14.8424 2.57907C15.1335 2.42068 15.4979 2.52825 15.6562 2.81931C15.6916 2.88421 15.7146 2.95507 15.7241 3.02833L16.3916 8.13462C16.4095 8.2713 16.4739 8.39766 16.5739 8.49245L20.3127 12.0338C20.5533 12.2617 20.5636 12.6415 20.3357 12.8821C20.2849 12.9357 20.2246 12.9795 20.1579 13.0112L15.5078 15.224C15.3833 15.2832 15.283 15.3835 15.2238 15.5079ZM16.0206 17.435L17.4348 16.0208L21.6775 20.2634L20.2633 21.6776L16.0206 17.435Z" }, child: [] }] })(e);
|
|
444
|
-
}
|
|
445
|
-
function Ae(e) {
|
|
446
|
-
return C({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z" }, child: [] }] })(e);
|
|
440
|
+
function K(e) {
|
|
441
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M17.8492 11.6983L17.1421 10.9912L7.24264 20.8907H3V16.648L14.3137 5.33432L19.9706 10.9912C20.3611 11.3817 20.3611 12.0149 19.9706 12.4054L12.8995 19.4765L11.4853 18.0622L17.8492 11.6983ZM15.7279 9.57696L14.3137 8.16274L5 17.4765V18.8907H6.41421L15.7279 9.57696ZM18.5563 2.50589L21.3848 5.33432C21.7753 5.72484 21.7753 6.35801 21.3848 6.74853L19.9706 8.16274L15.7279 3.9201L17.1421 2.50589C17.5327 2.11537 18.1658 2.11537 18.5563 2.50589Z" }, child: [] }] })(e);
|
|
447
442
|
}
|
|
448
443
|
function Ee(e) {
|
|
449
|
-
return
|
|
444
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M15.1986 9.94447C14.7649 9.5337 14.4859 8.98613 14.4085 8.39384L14.0056 5.31138L11.275 6.79724C10.7503 7.08274 10.1433 7.17888 9.55608 7.06948L6.49998 6.50015L7.06931 9.55625C7.17871 10.1435 7.08257 10.7505 6.79707 11.2751L5.31121 14.0057L8.39367 14.4086C8.98596 14.4861 9.53353 14.7651 9.94431 15.1987L12.0821 17.4557L13.4178 14.6486C13.6745 14.1092 14.109 13.6747 14.6484 13.418L17.4555 12.0823L15.1986 9.94447ZM15.2238 15.5079L13.0111 20.1581C12.8687 20.4573 12.5107 20.5844 12.2115 20.442C12.1448 20.4103 12.0845 20.3665 12.0337 20.3129L8.49229 16.5741C8.39749 16.474 8.27113 16.4096 8.13445 16.3918L3.02816 15.7243C2.69958 15.6814 2.46804 15.3802 2.51099 15.0516C2.52056 14.9784 2.54359 14.9075 2.5789 14.8426L5.04031 10.3192C5.1062 10.1981 5.12839 10.058 5.10314 9.92253L4.16 4.85991C4.09931 4.53414 4.3142 4.22086 4.63997 4.16017C4.7126 4.14664 4.78711 4.14664 4.85974 4.16017L9.92237 5.10331C10.0579 5.12855 10.198 5.10637 10.319 5.04048L14.8424 2.57907C15.1335 2.42068 15.4979 2.52825 15.6562 2.81931C15.6916 2.88421 15.7146 2.95507 15.7241 3.02833L16.3916 8.13462C16.4095 8.2713 16.4739 8.39766 16.5739 8.49245L20.3127 12.0338C20.5533 12.2617 20.5636 12.6415 20.3357 12.8821C20.2849 12.9357 20.2246 12.9795 20.1579 13.0112L15.5078 15.224C15.3833 15.2832 15.283 15.3835 15.2238 15.5079ZM16.0206 17.435L17.4348 16.0208L21.6775 20.2634L20.2633 21.6776L16.0206 17.435Z" }, child: [] }] })(e);
|
|
450
445
|
}
|
|
451
446
|
function Be(e) {
|
|
452
|
-
return
|
|
447
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z" }, child: [] }] })(e);
|
|
453
448
|
}
|
|
454
449
|
function Oe(e) {
|
|
455
|
-
return
|
|
450
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z" }, child: [] }] })(e);
|
|
456
451
|
}
|
|
457
452
|
function ze(e) {
|
|
458
|
-
return
|
|
453
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M13 6V21H11V6H5V4H19V6H13Z" }, child: [] }] })(e);
|
|
459
454
|
}
|
|
460
455
|
function Ve(e) {
|
|
461
|
-
return
|
|
456
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M6.23509 6.45329C4.85101 7.89148 4 9.84636 4 12C4 16.4183 7.58172 20 12 20C13.0808 20 14.1116 19.7857 15.0521 19.3972C15.1671 18.6467 14.9148 17.9266 14.8116 17.6746C14.582 17.115 13.8241 16.1582 12.5589 14.8308C12.2212 14.4758 12.2429 14.2035 12.3636 13.3943L12.3775 13.3029C12.4595 12.7486 12.5971 12.4209 14.4622 12.1248C15.4097 11.9746 15.6589 12.3533 16.0043 12.8777C16.0425 12.9358 16.0807 12.9928 16.1198 13.0499C16.4479 13.5297 16.691 13.6394 17.0582 13.8064C17.2227 13.881 17.428 13.9751 17.7031 14.1314C18.3551 14.504 18.3551 14.9247 18.3551 15.8472V15.9518C18.3551 16.3434 18.3168 16.6872 18.2566 16.9859C19.3478 15.6185 20 13.8854 20 12C20 8.70089 18.003 5.8682 15.1519 4.64482C14.5987 5.01813 13.8398 5.54726 13.575 5.91C13.4396 6.09538 13.2482 7.04166 12.6257 7.11976C12.4626 7.14023 12.2438 7.12589 12.012 7.11097C11.3905 7.07058 10.5402 7.01606 10.268 7.75495C10.0952 8.2232 10.0648 9.49445 10.6239 10.1543C10.7134 10.2597 10.7307 10.4547 10.6699 10.6735C10.59 10.9608 10.4286 11.1356 10.3783 11.1717C10.2819 11.1163 10.0896 10.8931 9.95938 10.7412C9.64554 10.3765 9.25405 9.92233 8.74797 9.78176C8.56395 9.73083 8.36166 9.68867 8.16548 9.64736C7.6164 9.53227 6.99443 9.40134 6.84992 9.09302C6.74442 8.8672 6.74488 8.55621 6.74529 8.22764C6.74529 7.8112 6.74529 7.34029 6.54129 6.88256C6.46246 6.70541 6.35689 6.56446 6.23509 6.45329ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22Z" }, child: [] }] })(e);
|
|
462
457
|
}
|
|
463
458
|
function He(e) {
|
|
464
|
-
return
|
|
459
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
|
|
460
|
+
}
|
|
461
|
+
function je(e) {
|
|
462
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
|
|
463
|
+
}
|
|
464
|
+
function Re(e) {
|
|
465
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 4C9.4095 4 7.10606 5.23053 5.64274 7.14274L8 9.5H2V3.5L4.21863 5.71863C6.05061 3.452 8.85558 2 12 2 17.5228 2 22 6.47715 22 12H20C20 7.58172 16.4183 4 12 4ZM4 12C4 16.4183 7.58172 20 12 20 14.5905 20 16.894 18.7695 18.3573 16.8573L16 14.5 22 14.5V20.5L19.7814 18.2814C17.9494 20.548 15.1444 22 12 22 6.47715 22 2 17.5228 2 12H4Z" }, child: [] }] })(e);
|
|
465
466
|
}
|
|
466
467
|
function E(e) {
|
|
467
|
-
return
|
|
468
|
+
return h({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M17.0007 1.20825 18.3195 3.68108 20.7923 4.99992 18.3195 6.31876 17.0007 8.79159 15.6818 6.31876 13.209 4.99992 15.6818 3.68108 17.0007 1.20825ZM8.00065 4.33325 10.6673 9.33325 15.6673 11.9999 10.6673 14.6666 8.00065 19.6666 5.33398 14.6666.333984 11.9999 5.33398 9.33325 8.00065 4.33325ZM19.6673 16.3333 18.0007 13.2083 16.334 16.3333 13.209 17.9999 16.334 19.6666 18.0007 22.7916 19.6673 19.6666 22.7923 17.9999 19.6673 16.3333Z" }, child: [] }] })(e);
|
|
468
469
|
}
|
|
469
|
-
function
|
|
470
|
-
const e =
|
|
471
|
-
return
|
|
470
|
+
function te() {
|
|
471
|
+
const e = he();
|
|
472
|
+
return y(e.editor);
|
|
472
473
|
}
|
|
473
|
-
const
|
|
474
|
-
const t = P(), { onManualPromptSubmit:
|
|
475
|
-
async (
|
|
476
|
-
|
|
474
|
+
const qe = (e) => {
|
|
475
|
+
const t = P(), { onManualPromptSubmit: r, promptText: o, onPromptTextChange: i } = e, [m, f] = Y(""), n = o || m, a = I(
|
|
476
|
+
async (u) => {
|
|
477
|
+
u.key === "Enter" && r(n);
|
|
477
478
|
},
|
|
478
|
-
[
|
|
479
|
-
),
|
|
480
|
-
(
|
|
481
|
-
const
|
|
482
|
-
|
|
479
|
+
[n, r]
|
|
480
|
+
), s = I(
|
|
481
|
+
(u) => {
|
|
482
|
+
const C = u.currentTarget.value;
|
|
483
|
+
i && i(C), o === void 0 && f(C);
|
|
483
484
|
},
|
|
484
|
-
[
|
|
485
|
-
),
|
|
486
|
-
(
|
|
487
|
-
|
|
485
|
+
[i, f, o]
|
|
486
|
+
), c = k(() => se(e.items, n), [n, e.items]), { selectedIndex: g, setSelectedIndex: p, handler: d } = Ce(c, (u) => u.onItemClick()), w = I(
|
|
487
|
+
(u) => {
|
|
488
|
+
u.key === "Enter" ? c.length > 0 ? d(u) : a(u) : d(u);
|
|
488
489
|
},
|
|
489
|
-
[
|
|
490
|
+
[a, d, c.length]
|
|
490
491
|
);
|
|
491
|
-
return
|
|
492
|
+
return J(() => {
|
|
492
493
|
p(0);
|
|
493
|
-
}, [
|
|
494
|
+
}, [n, p]), /* @__PURE__ */ pe("div", { className: "bn-combobox", children: [
|
|
494
495
|
/* @__PURE__ */ l(t.Generic.Form.Root, { children: /* @__PURE__ */ l(
|
|
495
496
|
t.Generic.Form.TextInput,
|
|
496
497
|
{
|
|
@@ -498,12 +499,12 @@ const je = (e) => {
|
|
|
498
499
|
name: "ai-prompt",
|
|
499
500
|
variant: "large",
|
|
500
501
|
icon: e.icon,
|
|
501
|
-
value:
|
|
502
|
+
value: n || "",
|
|
502
503
|
autoFocus: !0,
|
|
503
504
|
placeholder: e.placeholder,
|
|
504
505
|
disabled: e.disabled,
|
|
505
|
-
onKeyDown:
|
|
506
|
-
onChange:
|
|
506
|
+
onKeyDown: w,
|
|
507
|
+
onChange: s,
|
|
507
508
|
autoComplete: "off",
|
|
508
509
|
rightSection: e.rightSection
|
|
509
510
|
},
|
|
@@ -514,37 +515,37 @@ const je = (e) => {
|
|
|
514
515
|
{
|
|
515
516
|
className: "bn-combobox-items",
|
|
516
517
|
id: "ai-suggestion-menu",
|
|
517
|
-
children:
|
|
518
|
+
children: c.map((u, C) => /* @__PURE__ */ l(
|
|
518
519
|
t.SuggestionMenu.Item,
|
|
519
520
|
{
|
|
520
|
-
className:
|
|
521
|
+
className: ae(
|
|
521
522
|
"bn-suggestion-menu-item",
|
|
522
|
-
|
|
523
|
+
u.size === "small" ? "bn-suggestion-menu-item-small" : ""
|
|
523
524
|
),
|
|
524
|
-
id: `bn-suggestion-menu-item-${
|
|
525
|
-
isSelected:
|
|
526
|
-
onClick:
|
|
527
|
-
item:
|
|
525
|
+
id: `bn-suggestion-menu-item-${C}`,
|
|
526
|
+
isSelected: C === g,
|
|
527
|
+
onClick: u.onItemClick,
|
|
528
|
+
item: u
|
|
528
529
|
},
|
|
529
|
-
|
|
530
|
+
u.title
|
|
530
531
|
))
|
|
531
532
|
}
|
|
532
533
|
)
|
|
533
534
|
] });
|
|
534
535
|
};
|
|
535
|
-
function
|
|
536
|
-
const t =
|
|
537
|
-
return
|
|
536
|
+
function Ze(e) {
|
|
537
|
+
const t = y(e), r = e.getExtension(b);
|
|
538
|
+
return r ? [
|
|
538
539
|
{
|
|
539
540
|
key: "continue_writing",
|
|
540
541
|
title: t.ai_default_commands.continue_writing.title,
|
|
541
542
|
aliases: t.ai_default_commands.continue_writing.aliases,
|
|
542
|
-
icon: /* @__PURE__ */ l(
|
|
543
|
+
icon: /* @__PURE__ */ l(K, { size: 18 }),
|
|
543
544
|
onItemClick: async () => {
|
|
544
|
-
await
|
|
545
|
+
await r.invokeAI({
|
|
545
546
|
userPrompt: "Continue writing at the current cursor position related to the previous text. Add multiple blocks if needed. If the document looks like a template / draft, follow the template. Be extensive if needed.",
|
|
546
547
|
// By default, LLM will be able to add / update / delete blocks. For "continue writing", we only want to allow adding new blocks.
|
|
547
|
-
streamToolsProvider:
|
|
548
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
548
549
|
defaultStreamTools: {
|
|
549
550
|
add: !0,
|
|
550
551
|
delete: !1,
|
|
@@ -559,12 +560,12 @@ function Re(e) {
|
|
|
559
560
|
key: "summarize",
|
|
560
561
|
title: t.ai_default_commands.summarize.title,
|
|
561
562
|
aliases: t.ai_default_commands.summarize.aliases,
|
|
562
|
-
icon: /* @__PURE__ */ l(
|
|
563
|
+
icon: /* @__PURE__ */ l(Oe, { size: 18 }),
|
|
563
564
|
onItemClick: async () => {
|
|
564
|
-
await
|
|
565
|
+
await r.invokeAI({
|
|
565
566
|
userPrompt: "Summarize",
|
|
566
567
|
// By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks.
|
|
567
|
-
streamToolsProvider:
|
|
568
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
568
569
|
defaultStreamTools: {
|
|
569
570
|
add: !0,
|
|
570
571
|
delete: !1,
|
|
@@ -579,12 +580,12 @@ function Re(e) {
|
|
|
579
580
|
key: "action_items",
|
|
580
581
|
title: t.ai_default_commands.add_action_items.title,
|
|
581
582
|
aliases: t.ai_default_commands.add_action_items.aliases,
|
|
582
|
-
icon: /* @__PURE__ */ l(
|
|
583
|
+
icon: /* @__PURE__ */ l(Be, { size: 18 }),
|
|
583
584
|
onItemClick: async () => {
|
|
584
|
-
await
|
|
585
|
+
await r.invokeAI({
|
|
585
586
|
userPrompt: "Add action items",
|
|
586
587
|
// By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks.
|
|
587
|
-
streamToolsProvider:
|
|
588
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
588
589
|
defaultStreamTools: {
|
|
589
590
|
add: !0,
|
|
590
591
|
delete: !1,
|
|
@@ -599,7 +600,7 @@ function Re(e) {
|
|
|
599
600
|
key: "write_anything",
|
|
600
601
|
title: t.ai_default_commands.write_anything.title,
|
|
601
602
|
aliases: t.ai_default_commands.write_anything.aliases,
|
|
602
|
-
icon: /* @__PURE__ */ l(
|
|
603
|
+
icon: /* @__PURE__ */ l(K, { size: 18 }),
|
|
603
604
|
onItemClick: (o) => {
|
|
604
605
|
o(t.ai_default_commands.write_anything.prompt_placeholder);
|
|
605
606
|
},
|
|
@@ -607,20 +608,20 @@ function Re(e) {
|
|
|
607
608
|
}
|
|
608
609
|
] : [];
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
-
const t =
|
|
612
|
-
return
|
|
611
|
+
function De(e) {
|
|
612
|
+
const t = y(e), r = e.getExtension(b);
|
|
613
|
+
return r ? [
|
|
613
614
|
{
|
|
614
615
|
key: "improve_writing",
|
|
615
616
|
title: t.ai_default_commands.improve_writing.title,
|
|
616
617
|
aliases: t.ai_default_commands.improve_writing.aliases,
|
|
617
|
-
icon: /* @__PURE__ */ l(
|
|
618
|
+
icon: /* @__PURE__ */ l(ze, { size: 18 }),
|
|
618
619
|
onItemClick: async () => {
|
|
619
|
-
await
|
|
620
|
+
await r.invokeAI({
|
|
620
621
|
useSelection: !0,
|
|
621
622
|
userPrompt: "Improve writing",
|
|
622
623
|
// By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks.
|
|
623
|
-
streamToolsProvider:
|
|
624
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
624
625
|
defaultStreamTools: {
|
|
625
626
|
add: !1,
|
|
626
627
|
delete: !1,
|
|
@@ -635,13 +636,13 @@ function qe(e) {
|
|
|
635
636
|
key: "fix_spelling",
|
|
636
637
|
title: t.ai_default_commands.fix_spelling.title,
|
|
637
638
|
aliases: t.ai_default_commands.fix_spelling.aliases,
|
|
638
|
-
icon: /* @__PURE__ */ l(
|
|
639
|
+
icon: /* @__PURE__ */ l(je, { size: 18 }),
|
|
639
640
|
onItemClick: async () => {
|
|
640
|
-
await
|
|
641
|
+
await r.invokeAI({
|
|
641
642
|
useSelection: !0,
|
|
642
643
|
userPrompt: "Fix spelling",
|
|
643
644
|
// By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks.
|
|
644
|
-
streamToolsProvider:
|
|
645
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
645
646
|
defaultStreamTools: {
|
|
646
647
|
add: !1,
|
|
647
648
|
delete: !1,
|
|
@@ -656,7 +657,7 @@ function qe(e) {
|
|
|
656
657
|
key: "translate",
|
|
657
658
|
title: t.ai_default_commands.translate.title,
|
|
658
659
|
aliases: t.ai_default_commands.translate.aliases,
|
|
659
|
-
icon: /* @__PURE__ */ l(
|
|
660
|
+
icon: /* @__PURE__ */ l(Ve, { size: 18 }),
|
|
660
661
|
onItemClick: (o) => {
|
|
661
662
|
o(t.ai_default_commands.translate.prompt_placeholder);
|
|
662
663
|
},
|
|
@@ -666,13 +667,13 @@ function qe(e) {
|
|
|
666
667
|
key: "simplify",
|
|
667
668
|
title: t.ai_default_commands.simplify.title,
|
|
668
669
|
aliases: t.ai_default_commands.simplify.aliases,
|
|
669
|
-
icon: /* @__PURE__ */ l(
|
|
670
|
+
icon: /* @__PURE__ */ l(Ee, { size: 18 }),
|
|
670
671
|
onItemClick: async () => {
|
|
671
|
-
await
|
|
672
|
+
await r.invokeAI({
|
|
672
673
|
useSelection: !0,
|
|
673
674
|
userPrompt: "Simplify",
|
|
674
675
|
// By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks.
|
|
675
|
-
streamToolsProvider:
|
|
676
|
+
streamToolsProvider: S.html.getStreamToolsProvider({
|
|
676
677
|
defaultStreamTools: {
|
|
677
678
|
add: !1,
|
|
678
679
|
delete: !1,
|
|
@@ -685,16 +686,16 @@ function qe(e) {
|
|
|
685
686
|
}
|
|
686
687
|
] : [];
|
|
687
688
|
}
|
|
688
|
-
function
|
|
689
|
-
const t =
|
|
690
|
-
return
|
|
689
|
+
function Ne(e) {
|
|
690
|
+
const t = y(e), r = e.getExtension(b);
|
|
691
|
+
return r ? [
|
|
691
692
|
{
|
|
692
693
|
key: "accept",
|
|
693
694
|
title: t.ai_menu.actions.accept.title,
|
|
694
695
|
aliases: t.ai_menu.actions.accept.aliases,
|
|
695
|
-
icon: /* @__PURE__ */ l(
|
|
696
|
+
icon: /* @__PURE__ */ l(He, { size: 18 }),
|
|
696
697
|
onItemClick: () => {
|
|
697
|
-
|
|
698
|
+
r.acceptChanges();
|
|
698
699
|
},
|
|
699
700
|
size: "small"
|
|
700
701
|
},
|
|
@@ -702,24 +703,24 @@ function Ze(e) {
|
|
|
702
703
|
key: "revert",
|
|
703
704
|
title: t.ai_menu.actions.revert.title,
|
|
704
705
|
aliases: t.ai_menu.actions.revert.aliases,
|
|
705
|
-
icon: /* @__PURE__ */ l(
|
|
706
|
+
icon: /* @__PURE__ */ l(ee, { size: 18 }),
|
|
706
707
|
onItemClick: () => {
|
|
707
|
-
|
|
708
|
+
r.rejectChanges();
|
|
708
709
|
},
|
|
709
710
|
size: "small"
|
|
710
711
|
}
|
|
711
712
|
] : [];
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
-
const t =
|
|
715
|
-
return
|
|
714
|
+
function Fe(e) {
|
|
715
|
+
const t = y(e), r = e.getExtension(b);
|
|
716
|
+
return r ? [
|
|
716
717
|
{
|
|
717
718
|
key: "retry",
|
|
718
719
|
title: t.ai_menu.actions.retry.title,
|
|
719
720
|
aliases: t.ai_menu.actions.retry.aliases,
|
|
720
|
-
icon: /* @__PURE__ */ l(
|
|
721
|
+
icon: /* @__PURE__ */ l(Re, { size: 18 }),
|
|
721
722
|
onItemClick: async () => {
|
|
722
|
-
await
|
|
723
|
+
await r.retry();
|
|
723
724
|
},
|
|
724
725
|
size: "small"
|
|
725
726
|
},
|
|
@@ -727,49 +728,49 @@ function De(e) {
|
|
|
727
728
|
key: "cancel",
|
|
728
729
|
title: t.ai_menu.actions.cancel.title,
|
|
729
730
|
aliases: t.ai_menu.actions.cancel.aliases,
|
|
730
|
-
icon: /* @__PURE__ */ l(
|
|
731
|
+
icon: /* @__PURE__ */ l(ee, { size: 18 }),
|
|
731
732
|
onItemClick: () => {
|
|
732
|
-
|
|
733
|
+
r.rejectChanges();
|
|
733
734
|
},
|
|
734
735
|
size: "small"
|
|
735
736
|
}
|
|
736
737
|
] : [];
|
|
737
738
|
}
|
|
738
|
-
function
|
|
739
|
-
return t === "user-input" ? e.getSelection() ?
|
|
739
|
+
function Ue(e, t) {
|
|
740
|
+
return t === "user-input" ? e.getSelection() ? De(e) : Ze(e) : t === "user-reviewing" ? Ne(e) : t === "error" ? Fe(e) : [];
|
|
740
741
|
}
|
|
741
|
-
const
|
|
742
|
-
const t = A(), [
|
|
743
|
-
selector: (
|
|
744
|
-
}), { items:
|
|
745
|
-
let
|
|
746
|
-
return
|
|
747
|
-
...
|
|
742
|
+
const Ke = (e) => {
|
|
743
|
+
const t = A(), [r, o] = Y(""), i = te(), m = P(), f = _(b), n = $(b, {
|
|
744
|
+
selector: (d) => d.aiMenuState !== "closed" ? d.aiMenuState.status : "closed"
|
|
745
|
+
}), { items: a } = e, s = k(() => {
|
|
746
|
+
let d = [];
|
|
747
|
+
return a ? d = a(t, n) : d = Ue(t, n), d.map((w) => ({
|
|
748
|
+
...w,
|
|
748
749
|
onItemClick: () => {
|
|
749
|
-
|
|
750
|
+
w.onItemClick(o);
|
|
750
751
|
}
|
|
751
752
|
}));
|
|
752
|
-
}, [
|
|
753
|
-
async (
|
|
754
|
-
await
|
|
755
|
-
userPrompt:
|
|
753
|
+
}, [a, n, t]), c = I(
|
|
754
|
+
async (d) => {
|
|
755
|
+
await f.invokeAI({
|
|
756
|
+
userPrompt: d,
|
|
756
757
|
useSelection: t.getSelection() !== void 0
|
|
757
758
|
});
|
|
758
759
|
},
|
|
759
|
-
[
|
|
760
|
+
[f, t]
|
|
760
761
|
);
|
|
761
|
-
|
|
762
|
-
(
|
|
763
|
-
}, [
|
|
764
|
-
const g = k(() =>
|
|
765
|
-
if (
|
|
762
|
+
J(() => {
|
|
763
|
+
(n === "ai-writing" || n === "user-reviewing" || n === "error") && o("");
|
|
764
|
+
}, [n]);
|
|
765
|
+
const g = k(() => n === "thinking" ? i.ai_menu.status.thinking : n === "ai-writing" ? i.ai_menu.status.editing : n === "error" ? i.ai_menu.status.error : i.ai_menu.input_placeholder, [n, i]), p = k(() => {
|
|
766
|
+
if (n === "thinking" || n === "ai-writing")
|
|
766
767
|
return /* @__PURE__ */ l(
|
|
767
|
-
|
|
768
|
+
m.SuggestionMenu.Loader,
|
|
768
769
|
{
|
|
769
770
|
className: "bn-suggestion-menu-loader bn-combobox-right-section"
|
|
770
771
|
}
|
|
771
772
|
);
|
|
772
|
-
if (
|
|
773
|
+
if (n === "error")
|
|
773
774
|
return /* @__PURE__ */ l("div", { className: "bn-combobox-right-section bn-combobox-error", children: /* @__PURE__ */ l(
|
|
774
775
|
"svg",
|
|
775
776
|
{
|
|
@@ -781,42 +782,47 @@ const Fe = (e) => {
|
|
|
781
782
|
children: /* @__PURE__ */ l("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm0-160q17 0 28.5-11.5T520-480v-160q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640v160q0 17 11.5 28.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" })
|
|
782
783
|
}
|
|
783
784
|
) });
|
|
784
|
-
}, [
|
|
785
|
+
}, [m, n]);
|
|
785
786
|
return /* @__PURE__ */ l(
|
|
786
|
-
|
|
787
|
+
qe,
|
|
787
788
|
{
|
|
788
|
-
onManualPromptSubmit: e.onManualPromptSubmit ||
|
|
789
|
-
items:
|
|
790
|
-
promptText:
|
|
789
|
+
onManualPromptSubmit: e.onManualPromptSubmit || c,
|
|
790
|
+
items: s,
|
|
791
|
+
promptText: r,
|
|
791
792
|
onPromptTextChange: o,
|
|
792
793
|
placeholder: g,
|
|
793
|
-
disabled:
|
|
794
|
+
disabled: n === "thinking" || n === "ai-writing",
|
|
794
795
|
icon: /* @__PURE__ */ l("div", { className: "bn-combobox-icon", children: /* @__PURE__ */ l(E, {}) }),
|
|
795
796
|
rightSection: p
|
|
796
797
|
}
|
|
797
798
|
);
|
|
798
|
-
},
|
|
799
|
-
const t = A(),
|
|
799
|
+
}, ct = (e) => {
|
|
800
|
+
const t = A(), r = _(b), o = $(b, {
|
|
800
801
|
editor: t,
|
|
801
|
-
selector: (
|
|
802
|
-
}),
|
|
802
|
+
selector: (n) => n.aiMenuState
|
|
803
|
+
}), i = o === "closed" ? void 0 : o.blockId, m = k(
|
|
803
804
|
() => ({
|
|
804
805
|
useFloatingOptions: {
|
|
805
806
|
open: o !== "closed",
|
|
806
807
|
placement: "bottom",
|
|
807
808
|
middleware: [
|
|
808
|
-
|
|
809
|
+
ve(10),
|
|
809
810
|
// flip(),
|
|
810
|
-
|
|
811
|
-
apply({ rects:
|
|
812
|
-
Object.assign(
|
|
813
|
-
width: `${
|
|
811
|
+
Se({
|
|
812
|
+
apply({ rects: n, elements: a }) {
|
|
813
|
+
Object.assign(a.floating.style, {
|
|
814
|
+
width: `${n.reference.width}px`
|
|
814
815
|
});
|
|
815
816
|
}
|
|
816
817
|
})
|
|
817
818
|
],
|
|
818
|
-
onOpenChange: (
|
|
819
|
-
|
|
819
|
+
onOpenChange: (n) => {
|
|
820
|
+
n || o === "closed" || (o.status === "user-input" ? r.closeAIMenu() : (o.status === "user-reviewing" || o.status === "error") && r.rejectChanges());
|
|
821
|
+
},
|
|
822
|
+
whileElementsMounted(n, a, s) {
|
|
823
|
+
return ye(n, a, s, {
|
|
824
|
+
animationFrame: !0
|
|
825
|
+
});
|
|
820
826
|
}
|
|
821
827
|
},
|
|
822
828
|
useDismissProps: {
|
|
@@ -824,10 +830,10 @@ const Fe = (e) => {
|
|
|
824
830
|
// We should just be able to set `referencePress: true` instead of
|
|
825
831
|
// using this listener, but this doesn't seem to trigger.
|
|
826
832
|
// (probably because we don't assign the referenceProps to the reference element)
|
|
827
|
-
outsidePress: (
|
|
828
|
-
if (
|
|
829
|
-
const
|
|
830
|
-
|
|
833
|
+
outsidePress: (n) => {
|
|
834
|
+
if (n.target instanceof Element) {
|
|
835
|
+
const a = n.target.closest(".bn-block");
|
|
836
|
+
a && a.getAttribute("data-id") === i && r.closeAIMenu();
|
|
831
837
|
}
|
|
832
838
|
return !0;
|
|
833
839
|
}
|
|
@@ -839,31 +845,31 @@ const Fe = (e) => {
|
|
|
839
845
|
},
|
|
840
846
|
...e.floatingUIOptions
|
|
841
847
|
}),
|
|
842
|
-
[
|
|
843
|
-
),
|
|
844
|
-
return /* @__PURE__ */ l(
|
|
845
|
-
},
|
|
846
|
-
const e =
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
848
|
+
[r, o, i, e.floatingUIOptions]
|
|
849
|
+
), f = e.aiMenu || Ke;
|
|
850
|
+
return /* @__PURE__ */ l(be, { blockId: i, ...m, children: o !== "closed" && /* @__PURE__ */ l(f, {}) });
|
|
851
|
+
}, ut = () => {
|
|
852
|
+
const e = te(), t = P(), r = A(), o = _(b), i = _(le), m = () => {
|
|
853
|
+
const f = r.getSelection();
|
|
854
|
+
if (!f)
|
|
849
855
|
throw new Error("No selection");
|
|
850
|
-
const
|
|
851
|
-
o.openAIMenuAtBlock(
|
|
856
|
+
const n = f.blocks[f.blocks.length - 1].id;
|
|
857
|
+
o.openAIMenuAtBlock(n), i.store.setState(!1);
|
|
852
858
|
};
|
|
853
|
-
return
|
|
859
|
+
return r.isEditable ? /* @__PURE__ */ l(
|
|
854
860
|
t.Generic.Toolbar.Button,
|
|
855
861
|
{
|
|
856
862
|
className: "bn-button",
|
|
857
863
|
label: e.formatting_toolbar.ai.tooltip,
|
|
858
864
|
mainTooltip: e.formatting_toolbar.ai.tooltip,
|
|
859
865
|
icon: /* @__PURE__ */ l(E, {}),
|
|
860
|
-
onClick:
|
|
866
|
+
onClick: m
|
|
861
867
|
}
|
|
862
868
|
) : null;
|
|
863
|
-
},
|
|
869
|
+
}, We = {
|
|
864
870
|
AI: E
|
|
865
871
|
};
|
|
866
|
-
function
|
|
872
|
+
function mt(e) {
|
|
867
873
|
const t = e.getExtension(b);
|
|
868
874
|
return t ? [
|
|
869
875
|
{
|
|
@@ -873,40 +879,40 @@ function ct(e) {
|
|
|
873
879
|
o.block.content && Array.isArray(o.block.content) && // isarray check not ideal
|
|
874
880
|
o.block.content.length === 0 && o.prevBlock ? t.openAIMenuAtBlock(o.prevBlock.id) : t.openAIMenuAtBlock(o.block.id);
|
|
875
881
|
},
|
|
876
|
-
...
|
|
877
|
-
icon: /* @__PURE__ */ l(
|
|
882
|
+
...y(e).slash_menu.ai,
|
|
883
|
+
icon: /* @__PURE__ */ l(We.AI, {})
|
|
878
884
|
}
|
|
879
885
|
] : [];
|
|
880
886
|
}
|
|
881
887
|
export {
|
|
882
888
|
b as AIExtension,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
889
|
+
Ke as AIMenu,
|
|
890
|
+
ct as AIMenuController,
|
|
891
|
+
ut as AIToolbarButton,
|
|
892
|
+
gt as ClientSideTransport,
|
|
893
|
+
pt as PROVIDER_OVERRIDES,
|
|
894
|
+
qe as PromptSuggestionMenu,
|
|
895
|
+
ht as StreamToolExecutor,
|
|
896
|
+
Ct as _getApplySuggestionsTr,
|
|
897
|
+
S as aiDocumentFormats,
|
|
898
|
+
fe as buildAIRequest,
|
|
899
|
+
bt as createStreamToolsArraySchema,
|
|
900
|
+
vt as fetchViaProxy,
|
|
901
|
+
y as getAIDictionary,
|
|
902
|
+
mt as getAISlashMenuItems,
|
|
903
|
+
Ue as getDefaultAIMenuItems,
|
|
904
|
+
St as getProviderOverrides,
|
|
905
|
+
yt as injectDocumentStateMessages,
|
|
906
|
+
wt as makeDocumentStateBuilder,
|
|
907
|
+
kt as objectAsToolCallInUIMessageStream,
|
|
908
|
+
It as objectStreamToOperationsResult,
|
|
909
|
+
_t as partialObjectStreamAsToolCallInUIMessageStream,
|
|
910
|
+
xt as promptHelpers,
|
|
911
|
+
ge as sendMessageWithAIRequest,
|
|
912
|
+
Mt as setupToolCallStreaming,
|
|
913
|
+
Lt as streamToolsToToolSet,
|
|
914
|
+
Tt as toolDefinitionsToToolSet,
|
|
915
|
+
Pt as toolSetToToolDefinitions,
|
|
916
|
+
te as useAIDictionary
|
|
911
917
|
};
|
|
912
918
|
//# sourceMappingURL=blocknote-xl-ai.js.map
|