@magemetrics/ai 0.0.44-rc1 → 0.0.44
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/react/ai.js +11 -9
- package/dist/react/index.d.ts +15 -15
- package/dist/web-component/{browser-BTJRbFGc.js → browser-BEtEmtej.js} +1 -1
- package/dist/web-component/{web-component-DD7rf3Sz.js → web-component-D7L8akX4.js} +25571 -25006
- package/dist/web-component/web-component.es.js +1 -1
- package/package.json +2 -2
package/dist/react/ai.js
CHANGED
|
@@ -29,7 +29,7 @@ import { notUndefined as rf, useVirtualizer as Vw } from "@tanstack/react-virtua
|
|
|
29
29
|
import { Handle as of, Position as nf, useNodesState as $w, useEdgesState as Uw, useReactFlow as qw, ReactFlow as Zw, MarkerType as Kw, ReactFlowProvider as Qw } from "@xyflow/react";
|
|
30
30
|
import af from "@dagrejs/dagre";
|
|
31
31
|
import { renderToStaticMarkup as Ph } from "react-dom/server";
|
|
32
|
-
import Jw from "html2canvas";
|
|
32
|
+
import Jw from "html2canvas-pro";
|
|
33
33
|
import tk from "react-textarea-autosize";
|
|
34
34
|
import * as Oh from "@radix-ui/react-popover";
|
|
35
35
|
const Cg = "X-Client-Version", Ya = (c, t) => {
|
|
@@ -275,9 +275,9 @@ const ok = R.object({
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}), lk = (c, t) => Ci({
|
|
278
|
-
queryKey: ["apiInformation", { apiKey: c }, t, "0.0.
|
|
278
|
+
queryKey: ["apiInformation", { apiKey: c }, t, "0.0.44"],
|
|
279
279
|
queryFn: async () => {
|
|
280
|
-
const i = Ya(t, "0.0.
|
|
280
|
+
const i = Ya(t, "0.0.44"), { data: s } = await i.GET(rk.path, {
|
|
281
281
|
params: {
|
|
282
282
|
query: {
|
|
283
283
|
apiKey: c
|
|
@@ -298,7 +298,7 @@ const ok = R.object({
|
|
|
298
298
|
apiKey: t,
|
|
299
299
|
externalJWT: i
|
|
300
300
|
}) => {
|
|
301
|
-
const s = Ya(c, "0.0.
|
|
301
|
+
const s = Ya(c, "0.0.44"), { data: o } = await s.POST(ak.path, {
|
|
302
302
|
body: {
|
|
303
303
|
apiKey: t,
|
|
304
304
|
externalJWT: i
|
|
@@ -323,7 +323,7 @@ const ck = (c, t) => (zi || (zi = Pw(t, c, {
|
|
|
323
323
|
}), Jr = il(void 0), uk = (c) => /* @__PURE__ */ _(Nw, { client: dk, children: /* @__PURE__ */ _(Bw, { fallback: /* @__PURE__ */ _("div", { children: "Something went wrong in Magemetrics" }), children: /* @__PURE__ */ _(pk, { ...c }) }) }), pk = ({ children: c, apiKey: t, externalJwt: i, apiUrl: s, experimental_components: o }) => {
|
|
324
324
|
const a = gi(Symbol("initial")), [l, d] = Qe.useState(!1), { data: f } = lk(t || "", s), { mutateAsync: g, isPending: y } = hk(s);
|
|
325
325
|
Xe(() => {
|
|
326
|
-
s && Ya(s, "0.0.
|
|
326
|
+
s && Ya(s, "0.0.44");
|
|
327
327
|
}, [s]), Xe(() => {
|
|
328
328
|
if (!t || !s)
|
|
329
329
|
return;
|
|
@@ -401,7 +401,7 @@ const ck = (c, t) => (zi || (zi = Pw(t, c, {
|
|
|
401
401
|
]);
|
|
402
402
|
const b = {
|
|
403
403
|
client: ki(
|
|
404
|
-
() => Ya(s, "0.0.
|
|
404
|
+
() => Ya(s, "0.0.44"),
|
|
405
405
|
[s]
|
|
406
406
|
),
|
|
407
407
|
isLoggedIn: l,
|
|
@@ -1804,7 +1804,7 @@ class SD {
|
|
|
1804
1804
|
});
|
|
1805
1805
|
return i.flowId;
|
|
1806
1806
|
});
|
|
1807
|
-
this.client = kg({ baseUrl: t }), this.client.use(Mg), this.client.use(Ag()), this.client.use(Tg("0.0.
|
|
1807
|
+
this.client = kg({ baseUrl: t }), this.client.use(Mg), this.client.use(Ag()), this.client.use(Tg("0.0.44"));
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
function $t(...c) {
|
|
@@ -2614,7 +2614,7 @@ const cx = R.discriminatedUnion("tool", [
|
|
|
2614
2614
|
// Use a consistent ID to share state
|
|
2615
2615
|
api: `${s}/api/v1/chat/${c}`,
|
|
2616
2616
|
headers: {
|
|
2617
|
-
[Cg]: "0.0.
|
|
2617
|
+
[Cg]: "0.0.44"
|
|
2618
2618
|
},
|
|
2619
2619
|
initialMessages: y,
|
|
2620
2620
|
sendExtraMessageFields: !0,
|
|
@@ -2918,6 +2918,7 @@ const qS = (c, t) => tn({
|
|
|
2918
2918
|
"textarea",
|
|
2919
2919
|
{
|
|
2920
2920
|
className: $t(
|
|
2921
|
+
"mm:bg-ChatLauncherInputContainer-fill-neutral-active",
|
|
2921
2922
|
"mm:leading-6 mm:w-full mm:resize-none mm:border-none mm:box-border mm:rounded-[7px] mm:outline-none mm:px-2 mm:py-1.5 mm:max-h-[500px] mm:font-serif"
|
|
2922
2923
|
),
|
|
2923
2924
|
disabled: C,
|
|
@@ -21230,7 +21231,7 @@ const p1 = Bi.create(ge), xg = ({ children: c }) => /* @__PURE__ */ _(
|
|
|
21230
21231
|
if (t.current)
|
|
21231
21232
|
try {
|
|
21232
21233
|
const P = await Jw(t.current, {
|
|
21233
|
-
backgroundColor:
|
|
21234
|
+
backgroundColor: "#fcfdfd",
|
|
21234
21235
|
scale: 2,
|
|
21235
21236
|
useCORS: !0,
|
|
21236
21237
|
ignoreElements: (E) => E.classList.contains("screenshot-ignore"),
|
|
@@ -22265,6 +22266,7 @@ ${i}`);
|
|
|
22265
22266
|
tk,
|
|
22266
22267
|
{
|
|
22267
22268
|
className: $t(
|
|
22269
|
+
"mm:bg-ChatLauncherInputContainer-fill-neutral-active",
|
|
22268
22270
|
"mm:leading-6 mm:text-[20px] mm:w-full mm:resize-none mm:box-border mm:border-none mm:rounded-[8px] mm:outline-none mm:duration-200 mm:ease-in-out mm:max-h-[500px] mm:px-2 mm:py-1.5 mm:font-serif mm:h-[2.25rem]",
|
|
22269
22271
|
!t && "mm:overflow-hidden"
|
|
22270
22272
|
),
|
package/dist/react/index.d.ts
CHANGED
|
@@ -129,25 +129,25 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
129
129
|
sql: z.ZodString;
|
|
130
130
|
explanation: z.ZodString;
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
explanation: string;
|
|
133
132
|
sql: string;
|
|
134
|
-
}, {
|
|
135
133
|
explanation: string;
|
|
134
|
+
}, {
|
|
136
135
|
sql: string;
|
|
136
|
+
explanation: string;
|
|
137
137
|
}>, "many">;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
139
|
chunk_title: string;
|
|
140
140
|
chunk_explanation: string;
|
|
141
141
|
lines: {
|
|
142
|
-
explanation: string;
|
|
143
142
|
sql: string;
|
|
143
|
+
explanation: string;
|
|
144
144
|
}[];
|
|
145
145
|
}, {
|
|
146
146
|
chunk_title: string;
|
|
147
147
|
chunk_explanation: string;
|
|
148
148
|
lines: {
|
|
149
|
-
explanation: string;
|
|
150
149
|
sql: string;
|
|
150
|
+
explanation: string;
|
|
151
151
|
}[];
|
|
152
152
|
}>, "many">>>;
|
|
153
153
|
business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -189,11 +189,11 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
189
189
|
type: z.ZodEnum<["entity", "attribute", "filter", "process", "combine", "result"]>;
|
|
190
190
|
explanation: z.ZodString;
|
|
191
191
|
}, "strip", z.ZodTypeAny, {
|
|
192
|
-
type: "filter" | "
|
|
192
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
193
193
|
id: string;
|
|
194
194
|
explanation: string;
|
|
195
195
|
}, {
|
|
196
|
-
type: "filter" | "
|
|
196
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
197
197
|
id: string;
|
|
198
198
|
explanation: string;
|
|
199
199
|
}>, "many">;
|
|
@@ -209,7 +209,7 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
209
209
|
}>, "many">;
|
|
210
210
|
}, "strip", z.ZodTypeAny, {
|
|
211
211
|
nodes: {
|
|
212
|
-
type: "filter" | "
|
|
212
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
213
213
|
id: string;
|
|
214
214
|
explanation: string;
|
|
215
215
|
}[];
|
|
@@ -219,7 +219,7 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
219
219
|
}[];
|
|
220
220
|
}, {
|
|
221
221
|
nodes: {
|
|
222
|
-
type: "filter" | "
|
|
222
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
223
223
|
id: string;
|
|
224
224
|
explanation: string;
|
|
225
225
|
}[];
|
|
@@ -237,7 +237,7 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
237
237
|
flow_data_id: number;
|
|
238
238
|
columns_lineage: Record<string, {
|
|
239
239
|
nodes: {
|
|
240
|
-
type: "filter" | "
|
|
240
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
241
241
|
id: string;
|
|
242
242
|
explanation: string;
|
|
243
243
|
}[];
|
|
@@ -252,8 +252,8 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
252
252
|
chunk_title: string;
|
|
253
253
|
chunk_explanation: string;
|
|
254
254
|
lines: {
|
|
255
|
-
explanation: string;
|
|
256
255
|
sql: string;
|
|
256
|
+
explanation: string;
|
|
257
257
|
}[];
|
|
258
258
|
}[] | null | undefined;
|
|
259
259
|
business_explanation?: {
|
|
@@ -269,7 +269,7 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
269
269
|
flow_data_id: number;
|
|
270
270
|
columns_lineage: Record<string, {
|
|
271
271
|
nodes: {
|
|
272
|
-
type: "filter" | "
|
|
272
|
+
type: "filter" | "result" | "entity" | "attribute" | "process" | "combine";
|
|
273
273
|
id: string;
|
|
274
274
|
explanation: string;
|
|
275
275
|
}[];
|
|
@@ -284,8 +284,8 @@ declare const FrontendFlowDataExplainabilitySchema: z.ZodObject<Omit<{
|
|
|
284
284
|
chunk_title: string;
|
|
285
285
|
chunk_explanation: string;
|
|
286
286
|
lines: {
|
|
287
|
-
explanation: string;
|
|
288
287
|
sql: string;
|
|
288
|
+
explanation: string;
|
|
289
289
|
}[];
|
|
290
290
|
}[] | null | undefined;
|
|
291
291
|
business_explanation?: {
|
|
@@ -372,9 +372,9 @@ declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
|
|
|
372
372
|
}, z.ZodTypeAny, "passthrough">>;
|
|
373
373
|
bookmarked: z.ZodBoolean;
|
|
374
374
|
status: z.ZodNullable<z.ZodString>;
|
|
375
|
-
}, "schema" | "sql" | "
|
|
376
|
-
title: string;
|
|
375
|
+
}, "schema" | "sql" | "table" | "created_at" | "is_sample" | "data_sample">, "strip", z.ZodTypeAny, {
|
|
377
376
|
status: string | null;
|
|
377
|
+
title: string;
|
|
378
378
|
id: number;
|
|
379
379
|
bookmarked: boolean;
|
|
380
380
|
flow_id: string;
|
|
@@ -390,8 +390,8 @@ declare const FrontendFlowDataSchema: z.ZodObject<Omit<{
|
|
|
390
390
|
[k: string]: unknown;
|
|
391
391
|
};
|
|
392
392
|
}, {
|
|
393
|
-
title: string;
|
|
394
393
|
status: string | null;
|
|
394
|
+
title: string;
|
|
395
395
|
id: number;
|
|
396
396
|
bookmarked: boolean;
|
|
397
397
|
flow_id: string;
|