@magemetrics/ai 0.0.27 → 0.0.28

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.
@@ -1,15 +1,9 @@
1
+ import { colorsTuple } from '@mantine/core';
1
2
  import { ComponentPropsWithoutRef } from 'react';
2
- import { default as default_2 } from 'react';
3
3
  import { JSX } from 'react/jsx-runtime';
4
4
  import { MantineColorsTuple } from '@mantine/core';
5
5
 
6
- declare type AppWrapperProps = {
7
- apiKey: string;
8
- externalJWT: string;
9
- apiUrl: string;
10
- display?: string;
11
- themeColors?: ThemeColors;
12
- };
6
+ export { colorsTuple }
13
7
 
14
8
  declare type ControlledModalProps = {
15
9
  visible: boolean;
@@ -23,11 +17,6 @@ declare type DisplayControlProps = {
23
17
 
24
18
  export declare const logout: () => Promise<void>;
25
19
 
26
- export declare const MageMetricsDataTable: default_2.FC<{
27
- flowId: string;
28
- flowDataId: number;
29
- } & AppWrapperProps>;
30
-
31
20
  export declare const MageMetricsModal: (props: MageMetricsModalProps) => JSX.Element;
32
21
 
33
22
  declare type MageMetricsModalProps = ComponentPropsWithoutRef<typeof MainModal> & {
@@ -1,4 +1,4 @@
1
- import { g as o } from "./web-component-D6IanYiA.js";
1
+ import { g as o } from "./web-component-J_lmvPsd.js";
2
2
  var r, e;
3
3
  function t() {
4
4
  return e || (e = 1, r = function() {
@@ -12259,7 +12259,7 @@ class RealtimeClient {
12259
12259
  close: () => {
12260
12260
  this.conn = null;
12261
12261
  }
12262
- }), import("./browser-BwTlMJQO.js").then((R) => R.b).then(({ default: R }) => {
12262
+ }), import("./browser-yp_VhCQy.js").then((R) => R.b).then(({ default: R }) => {
12263
12263
  this.conn = new R(this.endpointURL(), void 0, {
12264
12264
  headers: this.headers
12265
12265
  }), this.setupConnection();
@@ -43434,7 +43434,7 @@ const defaultProps$s = {}, ModalCloseButton = factory((C, R) => {
43434
43434
  });
43435
43435
  ModalCloseButton.classes = classes$b;
43436
43436
  ModalCloseButton.displayName = "@mantine/core/ModalCloseButton";
43437
- const defaultProps$r = {}, ModalContent = factory((C, R) => {
43437
+ const defaultProps$r = {}, ModalContent$1 = factory((C, R) => {
43438
43438
  const M = useProps("ModalContent", defaultProps$r, C), { classNames: D, className: F, style: H, styles: U, vars: q, children: G, __hidden: Z, ...Y } = M, Q = useModalContext(), J = Q.scrollAreaComponent || NativeScrollArea;
43439
43439
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
43440
43440
  ModalBaseContent,
@@ -43458,8 +43458,8 @@ const defaultProps$r = {}, ModalContent = factory((C, R) => {
43458
43458
  }
43459
43459
  );
43460
43460
  });
43461
- ModalContent.classes = classes$b;
43462
- ModalContent.displayName = "@mantine/core/ModalContent";
43461
+ ModalContent$1.classes = classes$b;
43462
+ ModalContent$1.displayName = "@mantine/core/ModalContent";
43463
43463
  const defaultProps$q = {}, ModalHeader = factory((C, R) => {
43464
43464
  const M = useProps("ModalHeader", defaultProps$q, C), { classNames: D, className: F, style: H, styles: U, vars: q, ...G } = M, Z = useModalContext();
43465
43465
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -43634,7 +43634,7 @@ const defaultProps$m = {
43634
43634
  }
43635
43635
  ),
43636
43636
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
43637
- ModalContent,
43637
+ ModalContent$1,
43638
43638
  {
43639
43639
  radius: G,
43640
43640
  __hidden: te && Y && Z ? Y !== te.currentId : !1,
@@ -43655,7 +43655,7 @@ Modal.classes = classes$b;
43655
43655
  Modal.displayName = "@mantine/core/Modal";
43656
43656
  Modal.Root = ModalRoot;
43657
43657
  Modal.Overlay = ModalOverlay;
43658
- Modal.Content = ModalContent;
43658
+ Modal.Content = ModalContent$1;
43659
43659
  Modal.Body = ModalBody;
43660
43660
  Modal.Header = ModalHeader;
43661
43661
  Modal.Title = ModalTitle;
@@ -47431,6 +47431,7 @@ const SuccessVersion$4 = z$1.object({
47431
47431
  status: z$1.literal("success"),
47432
47432
  public: z$1.object({}),
47433
47433
  private: z$1.object({
47434
+ message: z$1.string().optional(),
47434
47435
  columns: z$1.object({
47435
47436
  id: z$1.number(),
47436
47437
  name: z$1.string(),
@@ -47490,6 +47491,7 @@ const SuccessVersion$4 = z$1.object({
47490
47491
  status: z$1.literal("success"),
47491
47492
  public: z$1.object({}),
47492
47493
  private: z$1.object({
47494
+ message: z$1.string().optional(),
47493
47495
  columns: z$1.object({
47494
47496
  id: z$1.number(),
47495
47497
  name: z$1.string(),
@@ -55942,7 +55944,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
55942
55944
  "data-active": M,
55943
55945
  "data-hovered": F,
55944
55946
  sx: () => ({
55945
- background: "white",
55947
+ background: "var(--mantine-color-white)",
55946
55948
  "&[data-hovered=true]": {
55947
55949
  background: "var(--mantine-color-mageWhisper-10)"
55948
55950
  },
@@ -56449,7 +56451,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56449
56451
  if (!supabase) return [];
56450
56452
  const { data: R, error: M } = await supabase.from("flows").select("*, flow_steps(*)").order("created_at", {
56451
56453
  ascending: !1
56452
- }).limit(10);
56454
+ }).limit(C || 10);
56453
56455
  if (M)
56454
56456
  throw new Error(M.message);
56455
56457
  return R.map((D) => FlowSchema.parse(D));
@@ -79246,7 +79248,7 @@ const MotionStack$1 = motion.create(Stack), AnimatedBox = ({ children: C }) => /
79246
79248
  border: "1px solid var(--mantine-color-mageGunmetal-1)"
79247
79249
  },
79248
79250
  '& [data-active="true"]': {
79249
- backgroundColor: "white",
79251
+ backgroundColor: "var(--mantine-color-white)",
79250
79252
  borderBottom: 0
79251
79253
  }
79252
79254
  }),
@@ -79280,7 +79282,7 @@ const MotionStack$1 = motion.create(Stack), AnimatedBox = ({ children: C }) => /
79280
79282
  overflow: "hidden",
79281
79283
  display: "flex",
79282
79284
  flexDirection: "column",
79283
- backgroundColor: "white",
79285
+ backgroundColor: "var(--mantine-color-white)",
79284
79286
  border: "1px solid var(--mantine-color-mageGunmetal-1)",
79285
79287
  borderTop: 0,
79286
79288
  borderBottomLeftRadius: "var(--mantine-radius-md)",
@@ -79310,7 +79312,7 @@ const MotionStack$1 = motion.create(Stack), AnimatedBox = ({ children: C }) => /
79310
79312
  overflow: "hidden",
79311
79313
  display: "flex",
79312
79314
  flexDirection: "column",
79313
- backgroundColor: "white",
79315
+ backgroundColor: "var(--mantine-color-white)",
79314
79316
  border: "1px solid var(--mantine-color-mageGunmetal-1)",
79315
79317
  borderTop: 0,
79316
79318
  borderBottomLeftRadius: "var(--mantine-radius-md)",
@@ -85425,7 +85427,7 @@ const TableBody$1 = ({ table: C, virtualizer: R, ...M }) => {
85425
85427
  {
85426
85428
  h: `${q.size}px`,
85427
85429
  style: {
85428
- backgroundColor: q.index % 2 === 0 ? "var(--table-striped-color)" : "white",
85430
+ backgroundColor: q.index % 2 === 0 ? "var(--table-striped-color)" : "var(--mantine-color-white)",
85429
85431
  overflow: "hidden"
85430
85432
  },
85431
85433
  children: Z.getVisibleCells().map((Y) => /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -96133,24 +96135,22 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
96133
96135
  }), useRecommendations = () => useQuery(recommendationsQueryOptions()), DEFAULT_EVENTS = ["mousedown", "touchstart"], useShadowClickOutside = (C, R, M) => {
96134
96136
  const D = reactExports.useRef(null);
96135
96137
  return reactExports.useEffect(() => {
96136
- const F = (U) => {
96137
- var Y;
96138
- const { target: q } = U ?? {}, G = (Y = D.current) == null ? void 0 : Y.getRootNode(), Z = G instanceof ShadowRoot;
96138
+ const F = new AbortController(), H = (G) => {
96139
+ var J;
96140
+ const { target: Z } = G ?? {}, Y = (J = D.current) == null ? void 0 : J.getRootNode(), Q = Y instanceof ShadowRoot;
96139
96141
  if (Array.isArray(M)) {
96140
- const Q = (q == null ? void 0 : q.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(q) && q.tagName !== "HTML", J = U.composedPath();
96141
- M.every((ie) => ie ? !J.includes(ie) : !0) && !Q && C();
96142
+ const te = (Z == null ? void 0 : Z.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(Z) && Z.tagName !== "HTML", ie = G.composedPath();
96143
+ M.every((oe) => oe ? !ie.includes(oe) : !0) && !te && C();
96142
96144
  } else if (D.current)
96143
- if (Z) {
96144
- const Q = U.composedPath(), J = Q.includes(G), te = Q.includes(D.current);
96145
- (!J || J && !te) && C();
96146
- } else D.current.contains(q) || C();
96147
- }, H = { capture: !0, passive: !0 };
96145
+ if (Q) {
96146
+ const te = G.composedPath(), ie = te.includes(Y), ne = te.includes(D.current);
96147
+ (!ie || ie && !ne) && C();
96148
+ } else D.current.contains(Z) || C();
96149
+ }, U = { capture: !0, passive: !0, signal: F.signal };
96148
96150
  return DEFAULT_EVENTS.forEach(
96149
- (U) => document.addEventListener(U, F, H)
96151
+ (G) => document.addEventListener(G, H, U)
96150
96152
  ), () => {
96151
- DEFAULT_EVENTS.forEach(
96152
- (U) => document.removeEventListener(U, F, H)
96153
- );
96153
+ F.abort();
96154
96154
  };
96155
96155
  }, [D, C, M, R]), D;
96156
96156
  };
@@ -96786,17 +96786,14 @@ function PiFile(C) {
96786
96786
  return GenIcon({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z" }, child: [] }] })(C);
96787
96787
  }
96788
96788
  const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { height: 24 }), RecentDashboardsDropdown = () => {
96789
- const C = useRecentFlows(), [R, M] = reactExports.useState(!1), D = useSetAtom(flowIdAtom), F = reactExports.useMemo(() => {
96790
- var U;
96791
- return (U = C.data) == null ? void 0 : U.slice(0, 5);
96792
- }, [C.data]), H = R ? "#DADADA" : "var(--mantine-color-body)";
96793
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
96789
+ const { data: C, status: R } = useRecentFlows(5), [M, D] = reactExports.useState(!1), F = useSetAtom(flowIdAtom), H = M ? "#DADADA" : "var(--mantine-color-body)";
96790
+ return !C || C.length == 0 ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs(
96794
96791
  Popover,
96795
96792
  {
96796
96793
  withinPortal: !1,
96797
96794
  width: 350,
96798
- opened: R,
96799
- onChange: M,
96795
+ opened: M,
96796
+ onChange: D,
96800
96797
  position: "top-start",
96801
96798
  offset: { mainAxis: -1, crossAxis: 0 },
96802
96799
  styles: {
@@ -96811,7 +96808,7 @@ const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { hei
96811
96808
  Group,
96812
96809
  {
96813
96810
  gap: 4,
96814
- onClick: () => M((U) => !U),
96811
+ onClick: () => D((U) => !U),
96815
96812
  style: {
96816
96813
  cursor: "pointer",
96817
96814
  userSelect: "none",
@@ -96834,7 +96831,7 @@ const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { hei
96834
96831
  size: 18,
96835
96832
  color: "var(--mantine-color-mageGunmetal-1)",
96836
96833
  style: {
96837
- transform: R ? "rotate(-180deg)" : "",
96834
+ transform: M ? "rotate(-180deg)" : "",
96838
96835
  transition: "all 0.2s"
96839
96836
  }
96840
96837
  }
@@ -96842,12 +96839,12 @@ const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { hei
96842
96839
  ]
96843
96840
  }
96844
96841
  ) }),
96845
- /* @__PURE__ */ jsxRuntimeExports.jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { gap: 2, align: "stretch", children: C.status === "success" ? F == null ? void 0 : F.map((U) => /* @__PURE__ */ jsxRuntimeExports.jsx(
96842
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { gap: 2, align: "stretch", children: R === "success" ? C.map((U) => /* @__PURE__ */ jsxRuntimeExports.jsx(
96846
96843
  Button,
96847
96844
  {
96848
96845
  component: "a",
96849
96846
  onClick: (q) => {
96850
- q.preventDefault(), D(U.id);
96847
+ q.preventDefault(), F(U.id);
96851
96848
  },
96852
96849
  size: "compact-md",
96853
96850
  leftSection: /* @__PURE__ */ jsxRuntimeExports.jsx(PiFile, { size: 14 }),
@@ -96868,6 +96865,7 @@ const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { hei
96868
96865
  {
96869
96866
  size: "sm",
96870
96867
  fw: 400,
96868
+ c: "black",
96871
96869
  style: {
96872
96870
  textOverflow: "ellipsis",
96873
96871
  overflow: "hidden",
@@ -96913,6 +96911,9 @@ const TextSkeleton = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { hei
96913
96911
  borderColor: "var(--mantine-primary-color-1)",
96914
96912
  "&::before": {
96915
96913
  opacity: 1
96914
+ },
96915
+ "&::after": {
96916
+ opacity: 0
96916
96917
  }
96917
96918
  },
96918
96919
  "&::after": {
@@ -96988,22 +96989,21 @@ ${M}`);
96988
96989
  ] });
96989
96990
  }, MotionStack = motion.create(Stack), MotionModal = motion.create(Modal.Root), ControlledMageMetricsModal = ({
96990
96991
  children: C,
96991
- visible: R,
96992
- onClose: M
96992
+ onClose: R
96993
96993
  }) => {
96994
- const { classes: D } = useModalStyles();
96994
+ const { classes: M } = useModalStyles();
96995
96995
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
96996
96996
  MotionModal,
96997
96997
  {
96998
- opened: R,
96998
+ opened: !0,
96999
96999
  closeOnEscape: !0,
97000
97000
  fullScreen: !0,
97001
- onClose: M,
97001
+ onClose: R,
97002
97002
  transitionProps: { transition: "fade", duration: 200 },
97003
97003
  removeScrollProps: {
97004
97004
  enabled: !1
97005
97005
  },
97006
- className: D.centered,
97006
+ className: M.centered,
97007
97007
  styles: {
97008
97008
  content: {
97009
97009
  display: "flex",
@@ -97041,22 +97041,21 @@ ${M}`);
97041
97041
  ]
97042
97042
  }
97043
97043
  );
97044
- }, StartModal = ({
97044
+ }, ModalContent = ({
97045
97045
  showRecentDashboards: C,
97046
97046
  showRecommendations: R,
97047
- ...M
97047
+ onClose: M
97048
97048
  }) => {
97049
97049
  const [D, F] = reactExports.useState(!1), H = useContextReady(), { classes: U } = useFlowTrackerStyles({}), q = useSetAtom(flowIdAtom), { mutate: G } = useStartFlow({
97050
- onSuccess: (se) => {
97051
- q(se.flowId);
97050
+ onSuccess: (oe) => {
97051
+ q(oe.flowId);
97052
97052
  }
97053
97053
  }), Z = useQueryClient();
97054
97054
  reactExports.useEffect(() => {
97055
97055
  H && (C && Z.prefetchQuery(recentFlowsQueryOptions()), R && Z.prefetchQuery(recommendationsQueryOptions()));
97056
97056
  }, [H, R, C, Z]);
97057
97057
  const Y = useShadowClickOutside(() => {
97058
- var se;
97059
- F(!1), (se = M.onClose) == null || se.call(M);
97058
+ F(!1), M == null || M();
97060
97059
  }), Q = useForm({
97061
97060
  initialValues: {
97062
97061
  userQuery: ""
@@ -97066,12 +97065,13 @@ ${M}`);
97066
97065
  userQuery: z$1.string().nonempty("Please type in a request")
97067
97066
  })
97068
97067
  )
97069
- }), J = (se) => {
97070
- G(se.trim());
97068
+ }), J = (oe) => {
97069
+ G(oe.trim());
97071
97070
  }, te = reactExports.useMemo(
97072
97071
  () => Q.values.userQuery.length > 30 || /[\r\n]/.test(Q.values.userQuery) ? Q.values.userQuery.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : Q.values.userQuery,
97073
97072
  [Q.values.userQuery]
97074
- ), ie = D && R, ne = D && C, oe = /* @__PURE__ */ jsxRuntimeExports.jsx(
97073
+ ), ie = D && R, ne = D && C;
97074
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
97075
97075
  MotionStack,
97076
97076
  {
97077
97077
  flex: 1,
@@ -97145,7 +97145,7 @@ ${M}`);
97145
97145
  "form",
97146
97146
  {
97147
97147
  onSubmit: Q.onSubmit(
97148
- (se) => J(se.userQuery)
97148
+ (oe) => J(oe.userQuery)
97149
97149
  ),
97150
97150
  style: { flex: "1" },
97151
97151
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -97174,8 +97174,8 @@ ${M}`);
97174
97174
  onFocus: () => {
97175
97175
  F(!0);
97176
97176
  },
97177
- onKeyDown: (se) => {
97178
- se.key === "Enter" && !se.shiftKey && (se.preventDefault(), Q.onSubmit((ce) => J(ce.userQuery))());
97177
+ onKeyDown: (oe) => {
97178
+ oe.key === "Enter" && !oe.shiftKey && (oe.preventDefault(), Q.onSubmit((se) => J(se.userQuery))());
97179
97179
  }
97180
97180
  },
97181
97181
  Q.key("userQuery")
@@ -97193,8 +97193,25 @@ ${M}`);
97193
97193
  },
97194
97194
  "request-form"
97195
97195
  );
97196
- return M.onClose != null && M.visible != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { visible: M.visible, onClose: M.onClose, children: oe }) : oe;
97197
- }, defaultColors = {
97196
+ }, StartModal = ({
97197
+ showRecentDashboards: C,
97198
+ showRecommendations: R,
97199
+ onClose: M
97200
+ }) => M != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ControlledMageMetricsModal, { onClose: M, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
97201
+ ModalContent,
97202
+ {
97203
+ showRecentDashboards: C,
97204
+ showRecommendations: R,
97205
+ onClose: M
97206
+ }
97207
+ ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
97208
+ ModalContent,
97209
+ {
97210
+ showRecentDashboards: C,
97211
+ showRecommendations: R,
97212
+ onClose: M
97213
+ }
97214
+ ), defaultColors = {
97198
97215
  mageMagenta: [
97199
97216
  "#EED4EB",
97200
97217
  // 0
@@ -97285,13 +97302,13 @@ ${M}`);
97285
97302
  }, theme = (C, R) => ({
97286
97303
  cursorType: "pointer",
97287
97304
  colors: R ? {
97288
- mageGunmetal: R.darkAccent,
97289
- mageMagenta: R.primary,
97305
+ mageGunmetal: R.primary,
97306
+ mageMagenta: R.darkAccent,
97290
97307
  mageRuby: R.secondary,
97291
97308
  mageWhisper: R.lightAccent
97292
97309
  } : defaultColors,
97293
97310
  white: "var(--mantine-color-mageWhisper-6)",
97294
- black: "var(--mantine-color-mageGunmetal-6)",
97311
+ black: R ? "black" : "var(--mantine-color-mageGunmetal-6)",
97295
97312
  primaryColor: "mageGunmetal",
97296
97313
  fontFamily: "'Bitter Variable', serif",
97297
97314
  fontFamilyMonospace: '"Source Code Pro Variable", monospace',
@@ -97452,30 +97469,23 @@ ${M}`);
97452
97469
  ) }) : null
97453
97470
  ] });
97454
97471
  }, InnerModal = ({
97455
- persist: C,
97456
- visible: R,
97457
- onClose: M,
97458
- showRecentDashboards: D,
97459
- showRecommendations: F
97472
+ onClose: C,
97473
+ showRecentDashboards: R,
97474
+ showRecommendations: M
97460
97475
  }) => {
97461
- const H = useAtomValue(flowIdAtom), U = useAtomValue(activeModalAtom), q = useSetAtom(persistenceAtom);
97462
- reactExports.useEffect(() => {
97463
- q(C);
97464
- }, [C, q]);
97465
- const G = !!H, Z = G && U === "flow", Y = G && U === "exploreData", Q = !(Z || Y);
97476
+ const D = useAtomValue(flowIdAtom), F = useAtomValue(activeModalAtom), H = !!D, U = H && F === "flow", q = H && F === "exploreData", G = !(U || q);
97466
97477
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(AnimatePresence, { mode: "wait", children: [
97467
- Y && /* @__PURE__ */ jsxRuntimeExports.jsx(ExploreDataModal, {}),
97468
- Z && /* @__PURE__ */ jsxRuntimeExports.jsx(FlowModal, {}),
97469
- Q && /* @__PURE__ */ jsxRuntimeExports.jsx(
97478
+ q && /* @__PURE__ */ jsxRuntimeExports.jsx(ExploreDataModal, {}),
97479
+ U && /* @__PURE__ */ jsxRuntimeExports.jsx(FlowModal, {}),
97480
+ G && /* @__PURE__ */ jsxRuntimeExports.jsx(
97470
97481
  StartModal,
97471
97482
  {
97472
- showRecentDashboards: D !== void 0 ? D : !1,
97473
- showRecommendations: F !== void 0 ? F : !1,
97474
- visible: R,
97475
- onClose: M
97483
+ showRecentDashboards: R !== void 0 ? R : !1,
97484
+ showRecommendations: M !== void 0 ? M : !1,
97485
+ onClose: C
97476
97486
  }
97477
97487
  )
97478
- ] }, H);
97488
+ ] }, D);
97479
97489
  }, MainModal = ({
97480
97490
  apiKey: C,
97481
97491
  externalJWT: R,
@@ -97485,7 +97495,11 @@ ${M}`);
97485
97495
  startOptions: H = void 0,
97486
97496
  themeColors: U = void 0
97487
97497
  }) => {
97488
- const q = (F == null ? void 0 : F.visible) === !0 || F == null;
97498
+ const q = useSetAtom(persistenceAtom);
97499
+ reactExports.useEffect(() => {
97500
+ q(D);
97501
+ }, [D, q]);
97502
+ const G = (F == null ? void 0 : F.visible) === !0 || F === void 0;
97489
97503
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
97490
97504
  AppWrapper,
97491
97505
  {
@@ -97493,11 +97507,9 @@ ${M}`);
97493
97507
  externalJWT: R,
97494
97508
  apiUrl: M,
97495
97509
  themeColors: U,
97496
- children: q && /* @__PURE__ */ jsxRuntimeExports.jsx(
97510
+ children: G && /* @__PURE__ */ jsxRuntimeExports.jsx(
97497
97511
  InnerModal,
97498
97512
  {
97499
- persist: D,
97500
- visible: q,
97501
97513
  onClose: F == null ? void 0 : F.onClose,
97502
97514
  showRecentDashboards: H == null ? void 0 : H.showRecentDashboards,
97503
97515
  showRecommendations: H == null ? void 0 : H.showRecommendations
@@ -97521,6 +97533,7 @@ ${M}`);
97521
97533
  customElements.get("magemetrics-ai") || customElements.define("magemetrics-ai", MagemetricsAI);
97522
97534
  };
97523
97535
  export {
97536
+ colorsTuple as a,
97524
97537
  createMagemetrics as c,
97525
97538
  getDefaultExportFromCjs as g,
97526
97539
  logout as l
@@ -1,3 +1,7 @@
1
+ import { colorsTuple } from '@mantine/core';
2
+
3
+ export { colorsTuple }
4
+
1
5
  export declare const createMagemetrics: () => void;
2
6
 
3
7
  export declare const logout: () => Promise<void>;
@@ -1,5 +1,6 @@
1
- import { c as o, l as r } from "./web-component-D6IanYiA.js";
1
+ import { a as o, c as r, l as s } from "./web-component-J_lmvPsd.js";
2
2
  export {
3
- o as createMagemetrics,
4
- r as logout
3
+ o as colorsTuple,
4
+ r as createMagemetrics,
5
+ s as logout
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magemetrics/ai",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@ai-sdk/react": "^1.2.5",