@invect/ui 0.0.7 → 0.0.9
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/{Invect-BndIqK9R.js → Invect-DKeWRdqo.js} +30004 -29859
- package/dist/api/client.d.ts +5 -0
- package/dist/api/node-data.api.d.ts +1 -1
- package/dist/assets/provider-icons/index.d.ts +3 -4
- package/dist/{babel-C9OtljFZ.js → babel-BAnO5AO4.js} +5 -5
- package/dist/demo.js +31 -31
- package/dist/{estree-ClbRfS-1.js → estree-CKaJvoWR.js} +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +194 -194
- package/dist/stores/uiStore.d.ts +4 -0
- package/dist/svg-raw.d.ts +4 -0
- package/package.json +5 -5
- package/src/api/client.ts +11 -5
- package/src/api/use-flow-run-stream.ts +1 -5
- package/src/assets/provider-icons/cloudwatch.svg +14 -0
- package/src/assets/provider-icons/dropbox.svg +10 -0
- package/src/assets/provider-icons/facebook.svg +8 -0
- package/src/assets/provider-icons/google_analytics.svg +7 -0
- package/src/assets/provider-icons/index.ts +46 -43
- package/src/assets/provider-icons/jira.svg +18 -0
- package/src/assets/provider-icons/microsoft_teams.svg +27 -0
- package/src/assets/provider-icons/salesforce.svg +16 -0
- package/src/assets/provider-icons/shopify.svg +8 -0
- package/src/assets/provider-icons/trello.svg +16 -0
- package/src/assets/provider-icons/twitter.svg +7 -0
- package/src/components/chat/ChatMessageList.tsx +3 -27
- package/src/components/chat/ChatPanel.tsx +3 -3
- package/src/components/chat/InlineCredentialSetup.tsx +32 -19
- package/src/components/chat/use-chat.ts +1 -0
- package/src/components/credentials/CreateCredentialModal.tsx +89 -2
- package/src/components/credentials/EditCredentialModal.tsx +82 -2
- package/src/components/flow-editor/FlowHeader.tsx +1 -22
- package/src/components/flow-editor/FlowLayout.tsx +6 -27
- package/src/components/flow-editor/NodeSidebar.tsx +5 -12
- package/src/components/flow-editor/RunControls.tsx +12 -12
- package/src/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.tsx +1 -2
- package/src/components/flow-editor/node-config-panel/panels/ConfigurationPanel.tsx +1 -12
- package/src/components/graph/LayoutSelector.tsx +2 -2
- package/src/components/shared/ProviderIcon.tsx +35 -1
- package/src/stores/uiStore.ts +23 -0
- package/src/svg-raw.d.ts +4 -0
package/dist/api/client.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ declare class ApiClient {
|
|
|
9
9
|
getBaseURL(): string;
|
|
10
10
|
setUserId(userId: string): void;
|
|
11
11
|
private getUserHeaders;
|
|
12
|
+
/**
|
|
13
|
+
* Raw fetch with standard credentials/headers. Returns the raw Response
|
|
14
|
+
* for streaming endpoints (SSE, chat) that need access to response.body.
|
|
15
|
+
*/
|
|
16
|
+
rawRequest(endpoint: string, options?: RequestInit): Promise<Response>;
|
|
12
17
|
private request;
|
|
13
18
|
getDashboardStats(): Promise<DashboardStats>;
|
|
14
19
|
getFlows(options?: QueryOptions<Flow>): Promise<PaginatedResponse<Flow>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SubmitSQLQueryRequest } from '@invect/core/types';
|
|
2
2
|
export declare function useListQueryDatabases(): import('@tanstack/react-query').UseQueryResult<{
|
|
3
3
|
connectionString: string;
|
|
4
|
-
type: "
|
|
4
|
+
type: "mysql" | "sqlite" | "postgresql";
|
|
5
5
|
name?: string | undefined;
|
|
6
6
|
driver?: "pg" | "postgres" | "neon-serverless" | "better-sqlite3" | "libsql" | "mysql2" | undefined;
|
|
7
7
|
}[], Error>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Inline SVG strings for
|
|
2
|
+
* Inline SVG strings for built-in provider icons.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* SVGs are stored as files in this directory and imported with Vite's `?raw`
|
|
5
|
+
* loader so the runtime API remains a plain `Record<string, string>`.
|
|
6
6
|
*/
|
|
7
|
-
/** Map of provider ID → SVG markup string. */
|
|
8
7
|
export declare const PROVIDER_SVG_ICONS: Record<string, string>;
|
|
@@ -298,11 +298,11 @@ function h(e, t) {
|
|
|
298
298
|
if (Array.isArray(e)) return (t) => h(t, e[0]);
|
|
299
299
|
let n = {};
|
|
300
300
|
for (let r of Object.keys(e)) {
|
|
301
|
-
let a = e[r], o = typeof a == "string" ? { message: () => a } : typeof a == "function" ? { message: a } : a, { message: s } = o, c = i(o, ne)
|
|
301
|
+
let a = e[r], o = typeof a == "string" ? { message: () => a } : typeof a == "function" ? { message: a } : a, { message: s } = o, c = i(o, ne);
|
|
302
302
|
n[r] = ie(Object.assign({
|
|
303
303
|
code: "BABEL_PARSER_SYNTAX_ERROR",
|
|
304
304
|
reasonCode: r,
|
|
305
|
-
toMessage:
|
|
305
|
+
toMessage: typeof s == "string" ? () => s : s
|
|
306
306
|
}, t ? { syntaxPlugin: t } : {}, c));
|
|
307
307
|
}
|
|
308
308
|
return n;
|
|
@@ -2382,7 +2382,7 @@ var ft = /\*?\s*@((?:no)?flow)\b/, pt = (e) => class extends e {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
2384
|
flowCheckGetterSetterParams(e) {
|
|
2385
|
-
let t = e.kind === "get" ? 0 : 1, n = e.value.params.length +
|
|
2385
|
+
let t = e.kind === "get" ? 0 : 1, n = e.value.params.length + +!!e.value.rest;
|
|
2386
2386
|
e.value.this && this.raise(e.kind === "get" ? P.GetterMayNotHaveThisParam : P.SetterMayNotHaveThisParam, e.value.this), n !== t && this.raise(e.kind === "get" ? g.BadGetterArity : g.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(g.BadSetterRestParameter, e);
|
|
2387
2387
|
}
|
|
2388
2388
|
flowObjectTypeSemicolon() {
|
|
@@ -3538,7 +3538,7 @@ var yt = (e) => class extends e {
|
|
|
3538
3538
|
}
|
|
3539
3539
|
};
|
|
3540
3540
|
function Ct(e, t) {
|
|
3541
|
-
return (e ? 2 : 0) |
|
|
3541
|
+
return (e ? 2 : 0) | !!t;
|
|
3542
3542
|
}
|
|
3543
3543
|
var wt = class {
|
|
3544
3544
|
sawUnambiguousESM = !1;
|
|
@@ -9718,4 +9718,4 @@ var Ei = Y({
|
|
|
9718
9718
|
//#endregion
|
|
9719
9719
|
export { n as default, Ai as parsers };
|
|
9720
9720
|
|
|
9721
|
-
//# sourceMappingURL=babel-
|
|
9721
|
+
//# sourceMappingURL=babel-BAnO5AO4.js.map
|
package/dist/demo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { B as e,
|
|
2
|
+
import { B as e, It as t, Kt as n, L as r, Pt as i, Q as a, R as o, V as s, Xt as c, Yt as l, Zt as u, a as d, nn as f, o as p, t as m, z as h } from "./Invect-DKeWRdqo.js";
|
|
3
3
|
import { useCallback as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
4
4
|
import { QueryClient as x, QueryClientProvider as S } from "@tanstack/react-query";
|
|
5
5
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
@@ -32,7 +32,8 @@ function j(e = {}) {
|
|
|
32
32
|
runsByStatus: o.reduce((e, t) => (e[t.status] = (e[t.status] || 0) + 1, e), {}),
|
|
33
33
|
recentRuns: o.slice(0, 10),
|
|
34
34
|
...a
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
|
+
return new Proxy({
|
|
36
37
|
getBaseURL: () => "demo://mock",
|
|
37
38
|
setBaseURL: A,
|
|
38
39
|
setUserId: A,
|
|
@@ -130,8 +131,7 @@ function j(e = {}) {
|
|
|
130
131
|
sendChatMessage: async () => ({}),
|
|
131
132
|
saveChatMessages: async () => ({}),
|
|
132
133
|
deleteChatMessages: async () => ({})
|
|
133
|
-
}
|
|
134
|
-
return new Proxy(d, { get(e, t) {
|
|
134
|
+
}, { get(e, t) {
|
|
135
135
|
return t in e ? e[t] : async () => null;
|
|
136
136
|
} });
|
|
137
137
|
}
|
|
@@ -144,7 +144,7 @@ function M({ data: e, useMemoryRouter: t = !0, ...n }) {
|
|
|
144
144
|
credentialId: "cred-anthropic",
|
|
145
145
|
model: "claude-sonnet-4-6"
|
|
146
146
|
});
|
|
147
|
-
}, [i, a]), /* @__PURE__ */ C(
|
|
147
|
+
}, [i, a]), /* @__PURE__ */ C(m, {
|
|
148
148
|
apiClient: r,
|
|
149
149
|
useMemoryRouter: t,
|
|
150
150
|
...n
|
|
@@ -156,8 +156,8 @@ var N = { default: e }, P = {
|
|
|
156
156
|
duration: 0,
|
|
157
157
|
padding: .2
|
|
158
158
|
}, F = () => {};
|
|
159
|
-
function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools:
|
|
160
|
-
let { resolvedTheme:
|
|
159
|
+
function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: l = [], interactive: u = !0, showControls: d = !0 }) {
|
|
160
|
+
let { resolvedTheme: f } = c(), m = y(null), [x, S] = b(!1), [D, O] = b(null), k = a((e) => e.syncFromServer), A = a((e) => e.setFlowId);
|
|
161
161
|
_(() => {
|
|
162
162
|
A("demo-flow", void 0), k(e, t, "demo-flow:1", "Demo Flow");
|
|
163
163
|
}, [
|
|
@@ -168,12 +168,12 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
168
168
|
]);
|
|
169
169
|
let j = v(() => {
|
|
170
170
|
let e = {
|
|
171
|
-
[n.AGENT]:
|
|
171
|
+
[n.AGENT]: r,
|
|
172
172
|
default: h
|
|
173
173
|
};
|
|
174
174
|
for (let t of i) t.type in e || (e[t.type] = h);
|
|
175
175
|
return e;
|
|
176
|
-
}, [i]), M = v(() =>
|
|
176
|
+
}, [i]), M = v(() => l.filter((e) => e.provider?.id !== "triggers" && !e.id.startsWith("trigger.")).map((e) => ({
|
|
177
177
|
id: e.id,
|
|
178
178
|
name: e.name,
|
|
179
179
|
description: e.description,
|
|
@@ -182,7 +182,7 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
182
182
|
inputSchema: e.inputSchema,
|
|
183
183
|
nodeType: e.nodeType,
|
|
184
184
|
provider: e.provider
|
|
185
|
-
})), [
|
|
185
|
+
})), [l]), I = v(() => ({
|
|
186
186
|
onOpenToolSelector: F,
|
|
187
187
|
onShowMoreTools: F,
|
|
188
188
|
onRemoveTool: F,
|
|
@@ -191,8 +191,8 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
191
191
|
selectedToolNodeId: null,
|
|
192
192
|
selectedToolInstanceId: null
|
|
193
193
|
}), [M]), L = g((e, t) => {
|
|
194
|
-
|
|
195
|
-
}, [
|
|
194
|
+
u && (O(t.id), S(!0));
|
|
195
|
+
}, [u]), R = g((e) => {
|
|
196
196
|
e || (S(!1), O(null));
|
|
197
197
|
}, []);
|
|
198
198
|
return /* @__PURE__ */ w("div", {
|
|
@@ -202,21 +202,21 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
202
202
|
height: "100%",
|
|
203
203
|
background: "var(--canvas-background)"
|
|
204
204
|
},
|
|
205
|
-
children: [/* @__PURE__ */ C(
|
|
205
|
+
children: [/* @__PURE__ */ C(o, {
|
|
206
206
|
value: I,
|
|
207
207
|
children: /* @__PURE__ */ w(te, {
|
|
208
208
|
nodes: e,
|
|
209
209
|
edges: t,
|
|
210
210
|
nodeTypes: j,
|
|
211
211
|
edgeTypes: N,
|
|
212
|
-
defaultEdgeOptions:
|
|
213
|
-
colorMode:
|
|
212
|
+
defaultEdgeOptions: s,
|
|
213
|
+
colorMode: f,
|
|
214
214
|
fitView: !0,
|
|
215
215
|
fitViewOptions: P,
|
|
216
|
-
onNodeDoubleClick:
|
|
216
|
+
onNodeDoubleClick: u ? L : void 0,
|
|
217
217
|
nodesDraggable: !1,
|
|
218
218
|
nodesConnectable: !1,
|
|
219
|
-
elementsSelectable:
|
|
219
|
+
elementsSelectable: u,
|
|
220
220
|
panOnScroll: !0,
|
|
221
221
|
panOnDrag: !0,
|
|
222
222
|
zoomOnScroll: !0,
|
|
@@ -228,7 +228,7 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
228
228
|
size: 1.2
|
|
229
229
|
})]
|
|
230
230
|
})
|
|
231
|
-
}),
|
|
231
|
+
}), u && /* @__PURE__ */ C(p, {
|
|
232
232
|
open: x,
|
|
233
233
|
nodeId: D,
|
|
234
234
|
flowId: "demo-flow",
|
|
@@ -238,14 +238,14 @@ function I({ nodes: e, edges: t, nodeDefinitions: i = [], agentTools: o = [], in
|
|
|
238
238
|
})]
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
function L({ theme: e = "dark", className: n, style: r, containerClassName: a, nodeDefinitions:
|
|
241
|
+
function L({ theme: e = "dark", className: n, style: r, containerClassName: a, nodeDefinitions: o = [], agentTools: s = [], ...c }) {
|
|
242
242
|
let d = v(() => new x({ defaultOptions: { queries: {
|
|
243
243
|
staleTime: Infinity,
|
|
244
244
|
retry: !1
|
|
245
|
-
} } }), []),
|
|
246
|
-
nodeDefinitions:
|
|
247
|
-
agentTools:
|
|
248
|
-
}), [
|
|
245
|
+
} } }), []), p = v(() => j({
|
|
246
|
+
nodeDefinitions: o,
|
|
247
|
+
agentTools: s
|
|
248
|
+
}), [o, s]);
|
|
249
249
|
return /* @__PURE__ */ C("div", {
|
|
250
250
|
className: a,
|
|
251
251
|
style: {
|
|
@@ -253,20 +253,20 @@ function L({ theme: e = "dark", className: n, style: r, containerClassName: a, n
|
|
|
253
253
|
overflow: "hidden",
|
|
254
254
|
...r
|
|
255
255
|
},
|
|
256
|
-
children: /* @__PURE__ */ C(
|
|
256
|
+
children: /* @__PURE__ */ C(l, {
|
|
257
257
|
defaultTheme: e,
|
|
258
258
|
storageKey: "invect-viewer-theme",
|
|
259
259
|
className: n,
|
|
260
260
|
children: /* @__PURE__ */ C(S, {
|
|
261
261
|
client: d,
|
|
262
|
-
children: /* @__PURE__ */ C(
|
|
263
|
-
apiClient:
|
|
264
|
-
children: /* @__PURE__ */ C(
|
|
262
|
+
children: /* @__PURE__ */ C(u, {
|
|
263
|
+
apiClient: p,
|
|
264
|
+
children: /* @__PURE__ */ C(i, {
|
|
265
265
|
plugins: [],
|
|
266
|
-
children: /* @__PURE__ */ C(
|
|
267
|
-
nodeDefinitions:
|
|
268
|
-
agentTools:
|
|
269
|
-
...
|
|
266
|
+
children: /* @__PURE__ */ C(f, { children: /* @__PURE__ */ C(t, { children: /* @__PURE__ */ C(D, { children: /* @__PURE__ */ C(I, {
|
|
267
|
+
nodeDefinitions: o,
|
|
268
|
+
agentTools: s,
|
|
269
|
+
...c
|
|
270
270
|
}) }) }) })
|
|
271
271
|
})
|
|
272
272
|
})
|
|
@@ -3947,7 +3947,7 @@ function Fs(e, t, n) {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
let y = c.map(_), ee = y, te = g ? 3 : 2, ne = c.flat(), re = ne.slice(1, -1).some((e) => I(e.node, F.Leading)) || ne.slice(0, -1).some((e) => I(e.node, F.Trailing)) || c[te] && I(c[te][0].node, F.Leading);
|
|
3949
3949
|
if (c.length <= te && !re && !c.some((e) => l(0, e, -1).hasTrailingEmptyLine)) return Lt(e) ? ee : W(ee);
|
|
3950
|
-
let ie = l(0, c[g
|
|
3950
|
+
let ie = l(0, c[+!!g], -1).node, ae = !A(ie) && a(ie), oe = [
|
|
3951
3951
|
_(c[0]),
|
|
3952
3952
|
g ? c.slice(1, 2).map(_) : "",
|
|
3953
3953
|
ae ? Y : "",
|
|
@@ -5047,7 +5047,7 @@ function Vl(e) {
|
|
|
5047
5047
|
].some((t) => x(e[t])) : x(e.body);
|
|
5048
5048
|
}
|
|
5049
5049
|
function Hl(e) {
|
|
5050
|
-
let t = e.superClass
|
|
5050
|
+
let t = +!!e.superClass;
|
|
5051
5051
|
for (let n of [
|
|
5052
5052
|
"extends",
|
|
5053
5053
|
"mixins",
|
|
@@ -7073,4 +7073,4 @@ var $d = {
|
|
|
7073
7073
|
//#endregion
|
|
7074
7074
|
export { n as default, rf as languages, tf as options, nf as printers };
|
|
7075
7075
|
|
|
7076
|
-
//# sourceMappingURL=estree-
|
|
7076
|
+
//# sourceMappingURL=estree-CKaJvoWR.js.map
|