@magemetrics/ai 0.0.39 → 0.0.41

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,4 +1,21 @@
1
- import { ComponentPropsWithoutRef } from 'react';
1
+ import { default as default_2 } from 'react';
2
+ import { FormattedData } from '../../../../../shared/src/data/FormattedData';
3
+ import { FrontendFlowColumns } from '../../../../shared/src/schemas/flows';
4
+ import { FrontendFlowData } from '../../../../shared/src/schemas/flows';
5
+
6
+ declare type CellContentProps = {
7
+ formattedValue: FormattedData | undefined;
8
+ isOpened: boolean;
9
+ unit?: string;
10
+ renderType?: string;
11
+ };
12
+
13
+ declare interface Components {
14
+ dataTableCells?: {
15
+ [key: string]: (props: CellContentProps) => default_2.ReactNode;
16
+ };
17
+ dataReportTable?: (props: DataReportMessageProps) => default_2.ReactNode;
18
+ }
2
19
 
3
20
  declare type ControlledModalProps = {
4
21
  visible: boolean;
@@ -7,6 +24,24 @@ declare type ControlledModalProps = {
7
24
 
8
25
  export declare const createMagemetrics: () => void;
9
26
 
27
+ declare interface DataReportMessageProps {
28
+ report: FrontendFlowData;
29
+ isOpened: boolean;
30
+ setIsOpened: (opened: boolean) => void;
31
+ infiniteData: {
32
+ data?: {
33
+ pages: unknown[][];
34
+ };
35
+ isPending: boolean;
36
+ fetchNextPage: () => Promise<unknown>;
37
+ isFetching: boolean;
38
+ isFetchingNextPage: boolean;
39
+ hasNextPage: boolean | undefined;
40
+ };
41
+ columns: FrontendFlowColumns;
42
+ totalRows: number;
43
+ }
44
+
10
45
  declare type DisplayControlProps = {
11
46
  showRecommendations?: boolean;
12
47
  showRecentChats?: boolean;
@@ -15,25 +50,28 @@ declare type DisplayControlProps = {
15
50
 
16
51
  export declare const logout: () => Promise<void>;
17
52
 
18
- declare const MainModal: React.FC<{
53
+ declare interface ManagedModalProps extends ModalProps {
19
54
  apiKey: string;
20
55
  externalJwt: string;
21
56
  apiUrl: string;
22
- display?: string;
23
57
  persist?: PersistenceOptions;
58
+ experimental_components?: Components;
59
+ }
60
+
61
+ declare interface ModalProps {
62
+ display?: string;
24
63
  modal?: ControlledModalProps;
25
64
  startOptions?: StartOptions;
26
- }>;
65
+ }
27
66
 
28
- declare type PersistenceOptions = "localStorage" | "queryParam" | "none";
67
+ declare type PersistenceOptions = "queryParam" | "none";
29
68
 
30
- export declare interface SearchElement extends HTMLElement, SearchElementAttributes {
69
+ export declare interface SearchElement extends HTMLElement, ManagedModalProps {
31
70
  }
32
71
 
33
- export declare type SearchElementAttributes = ComponentPropsWithoutRef<typeof MainModal>;
34
-
35
72
  declare type StartOptions = DisplayControlProps & {
36
73
  label?: string;
74
+ recommendationsLabel?: string;
37
75
  };
38
76
 
39
77
  export { }
@@ -42,7 +80,7 @@ export { }
42
80
  declare module "react" {
43
81
  namespace JSX {
44
82
  interface IntrinsicElements {
45
- "magemetrics-ai": SearchElementAttributes;
83
+ "magemetrics-ai": ManagedModalProps;
46
84
  }
47
85
  }
48
86
  }
@@ -1,4 +1,4 @@
1
- import { c as o, l as r } from "./web-component-Bkvh5GBk.js";
1
+ import { c as o, l as r } from "./web-component-DMzWg4-A.js";
2
2
  export {
3
3
  o as createMagemetrics,
4
4
  r as logout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magemetrics/ai",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@ai-sdk/react": "^1.2.12",
@@ -9,7 +9,7 @@
9
9
  "@fontsource-variable/bitter": "^5.2.7",
10
10
  "@fontsource-variable/source-code-pro": "^5.2.5",
11
11
  "@fontsource-variable/source-sans-3": "^5.2.7",
12
- "@kurkle/color": "^0.3.4",
12
+ "@kurkle/color": "^0.4.0",
13
13
  "@r2wc/react-to-web-component": "^2.0.4",
14
14
  "@radix-ui/react-collapsible": "^1.1.11",
15
15
  "@radix-ui/react-dialog": "^1.1.14",
@@ -20,7 +20,7 @@
20
20
  "@radix-ui/react-tooltip": "^1.2.7",
21
21
  "@radix-ui/react-visually-hidden": "^1.2.3",
22
22
  "@supabase/supabase-js": "2.49.8",
23
- "@tanstack/react-query": "^5.77.1",
23
+ "@tanstack/react-query": "^5.79.0",
24
24
  "@tanstack/react-table": "^8.21.3",
25
25
  "@tanstack/react-virtual": "^3.13.9",
26
26
  "@uidotdev/usehooks": "^2.4.1",
@@ -30,14 +30,13 @@
30
30
  "dayjs": "^1.11.13",
31
31
  "framer-motion": "^12.4.3",
32
32
  "html2canvas": "^1.4.1",
33
- "jotai": "^2.12.4",
34
- "jotai-location": "^0.6.0",
35
33
  "openapi-fetch": "^0.13.4",
34
+ "react-error-boundary": "^6.0.0",
36
35
  "react-markdown": "^10.1.0",
37
36
  "recharts": "^2.15.3",
38
37
  "tailwind-merge": "^3.3.0",
39
38
  "vaul": "^1.1.2",
40
- "zod": "^3.25.28"
39
+ "zod": "^3.25.42"
41
40
  },
42
41
  "peerDependencies": {
43
42
  "react": "^18.2.0 || ^19.0.0",