@alquimia-ai/ui 1.2.4 → 1.3.1

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.
Files changed (50) hide show
  1. package/dist/components/atoms/index.d.mts +4 -1
  2. package/dist/components/atoms/index.d.ts +4 -1
  3. package/dist/components/atoms/index.js +39 -17
  4. package/dist/components/atoms/index.js.map +1 -1
  5. package/dist/components/atoms/index.mjs +35 -13
  6. package/dist/components/atoms/index.mjs.map +1 -1
  7. package/dist/components/index.d.mts +2 -1
  8. package/dist/components/index.d.ts +2 -1
  9. package/dist/components/index.js +39 -17
  10. package/dist/components/index.js.map +1 -1
  11. package/dist/components/index.mjs +35 -13
  12. package/dist/components/index.mjs.map +1 -1
  13. package/dist/components/molecules/documents/index.js +82 -52
  14. package/dist/components/molecules/documents/index.js.map +1 -1
  15. package/dist/components/molecules/documents/index.mjs +67 -37
  16. package/dist/components/molecules/documents/index.mjs.map +1 -1
  17. package/dist/components/molecules/index.js +145 -124
  18. package/dist/components/molecules/index.js.map +1 -1
  19. package/dist/components/molecules/index.mjs +137 -116
  20. package/dist/components/molecules/index.mjs.map +1 -1
  21. package/dist/components/molecules/viewers/index.js +31 -10
  22. package/dist/components/molecules/viewers/index.js.map +1 -1
  23. package/dist/components/molecules/viewers/index.mjs +30 -9
  24. package/dist/components/molecules/viewers/index.mjs.map +1 -1
  25. package/dist/components/organisms/index.d.mts +3 -1
  26. package/dist/components/organisms/index.d.ts +3 -1
  27. package/dist/components/organisms/index.js +187 -164
  28. package/dist/components/organisms/index.js.map +1 -1
  29. package/dist/components/organisms/index.mjs +175 -152
  30. package/dist/components/organisms/index.mjs.map +1 -1
  31. package/dist/components/templates/cards/index.js +57 -36
  32. package/dist/components/templates/cards/index.js.map +1 -1
  33. package/dist/components/templates/cards/index.mjs +45 -24
  34. package/dist/components/templates/cards/index.mjs.map +1 -1
  35. package/dist/components/templates/index.js +57 -36
  36. package/dist/components/templates/index.js.map +1 -1
  37. package/dist/components/templates/index.mjs +45 -24
  38. package/dist/components/templates/index.mjs.map +1 -1
  39. package/dist/index.d.mts +3 -2
  40. package/dist/index.d.ts +3 -2
  41. package/dist/index.js +242 -218
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +220 -196
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/types/index.d.mts +12 -1
  46. package/dist/types/index.d.ts +12 -1
  47. package/dist/types/index.js.map +1 -1
  48. package/dist/types/index.mjs.map +1 -1
  49. package/package.json +3 -19
  50. package/dist/package.json +0 -136
@@ -64,5 +64,16 @@ interface TWYDServerActions {
64
64
  sendRating?: (ratingData: RatingData) => Promise<any>;
65
65
  logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;
66
66
  }
67
+ interface ToolFactory {
68
+ createTool: (tool: string, payload: any) => React.ReactNode | null;
69
+ }
70
+ type Tooler = {
71
+ tool_summary?: ToolSummary;
72
+ tool_output?: Record<string, any>;
73
+ };
74
+ type ToolSummary = {
75
+ name: string;
76
+ parameters: Record<string, any>;
77
+ };
67
78
 
68
- export { type ActionError, type ActionResponse, type AlquimiaDocument, type AlquimiaFile, type AlquimiaTopic, type ApiError, EditingStatus, type ErrorDetails, type RatingData, type TWYDServerActions, type TopicRating };
79
+ export { type ActionError, type ActionResponse, type AlquimiaDocument, type AlquimiaFile, type AlquimiaTopic, type ApiError, EditingStatus, type ErrorDetails, type RatingData, type TWYDServerActions, type ToolFactory, type ToolSummary, type Tooler, type TopicRating };
@@ -64,5 +64,16 @@ interface TWYDServerActions {
64
64
  sendRating?: (ratingData: RatingData) => Promise<any>;
65
65
  logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;
66
66
  }
67
+ interface ToolFactory {
68
+ createTool: (tool: string, payload: any) => React.ReactNode | null;
69
+ }
70
+ type Tooler = {
71
+ tool_summary?: ToolSummary;
72
+ tool_output?: Record<string, any>;
73
+ };
74
+ type ToolSummary = {
75
+ name: string;
76
+ parameters: Record<string, any>;
77
+ };
67
78
 
68
- export { type ActionError, type ActionResponse, type AlquimiaDocument, type AlquimiaFile, type AlquimiaTopic, type ApiError, EditingStatus, type ErrorDetails, type RatingData, type TWYDServerActions, type TopicRating };
79
+ export { type ActionError, type ActionResponse, type AlquimiaDocument, type AlquimiaFile, type AlquimiaTopic, type ApiError, EditingStatus, type ErrorDetails, type RatingData, type TWYDServerActions, type ToolFactory, type ToolSummary, type Tooler, type TopicRating };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts","../../src/types/type.ts"],"sourcesContent":["export * from \"./type\";\n","export type AlquimiaDocument = {\n id: string;\n name: string;\n description?: string;\n isActive: boolean;\n contentType: string;\n url: string;\n updatedAt?: string;\n};\n\nexport type AlquimiaTopic = {\n id: string;\n externalCollectionId: string;\n isActive: boolean;\n name: string;\n description: string;\n createdAt?: string;\n updatedAt?: string;\n files: AlquimiaDocument[];\n ratings?: TopicRating[];\n};\n\nexport type TopicRating = {\n id: number;\n sessionId: string;\n}\n\nexport type AlquimiaFile = {\n id: string;\n file: Blob;\n}\n\nexport enum EditingStatus {\n EDITING = 'EDITING',\n FINISHED = 'FINISHED',\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n emoji?: string;\n description?: string;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: ActionError;\n}\n\nexport type ActionError = {\n message: string;\n code?: string;\n details?: ErrorDetails;\n}\n\nexport type ErrorDetails = {\n status: string;\n statusText?: string;\n}\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport interface TWYDServerActions {\n getDocument?: (id: string) => Promise<ActionResponse<Blob>>;\n sendRating?: (ratingData: RatingData) => Promise<any>;\n logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgCO,IAAK,gBAAL,kBAAKA,mBAAL;AACL,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;","names":["EditingStatus"]}
1
+ {"version":3,"sources":["../../src/types/index.ts","../../src/types/type.ts"],"sourcesContent":["export * from \"./type\";\n","export type AlquimiaDocument = {\n id: string;\n name: string;\n description?: string;\n isActive: boolean;\n contentType: string;\n url: string;\n updatedAt?: string;\n};\n\nexport type AlquimiaTopic = {\n id: string;\n externalCollectionId: string;\n isActive: boolean;\n name: string;\n description: string;\n createdAt?: string;\n updatedAt?: string;\n files: AlquimiaDocument[];\n ratings?: TopicRating[];\n};\n\nexport type TopicRating = {\n id: number;\n sessionId: string;\n}\n\nexport type AlquimiaFile = {\n id: string;\n file: Blob;\n}\n\nexport enum EditingStatus {\n EDITING = 'EDITING',\n FINISHED = 'FINISHED',\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n emoji?: string;\n description?: string;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: ActionError;\n}\n\nexport type ActionError = {\n message: string;\n code?: string;\n details?: ErrorDetails;\n}\n\nexport type ErrorDetails = {\n status: string;\n statusText?: string;\n}\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport interface TWYDServerActions {\n getDocument?: (id: string) => Promise<ActionResponse<Blob>>;\n sendRating?: (ratingData: RatingData) => Promise<any>;\n logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;\n}\n\nexport interface ToolFactory {\n createTool: (tool: string, payload: any) => React.ReactNode | null;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgCO,IAAK,gBAAL,kBAAKA,mBAAL;AACL,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;","names":["EditingStatus"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/type.ts"],"sourcesContent":["export type AlquimiaDocument = {\n id: string;\n name: string;\n description?: string;\n isActive: boolean;\n contentType: string;\n url: string;\n updatedAt?: string;\n};\n\nexport type AlquimiaTopic = {\n id: string;\n externalCollectionId: string;\n isActive: boolean;\n name: string;\n description: string;\n createdAt?: string;\n updatedAt?: string;\n files: AlquimiaDocument[];\n ratings?: TopicRating[];\n};\n\nexport type TopicRating = {\n id: number;\n sessionId: string;\n}\n\nexport type AlquimiaFile = {\n id: string;\n file: Blob;\n}\n\nexport enum EditingStatus {\n EDITING = 'EDITING',\n FINISHED = 'FINISHED',\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n emoji?: string;\n description?: string;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: ActionError;\n}\n\nexport type ActionError = {\n message: string;\n code?: string;\n details?: ErrorDetails;\n}\n\nexport type ErrorDetails = {\n status: string;\n statusText?: string;\n}\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport interface TWYDServerActions {\n getDocument?: (id: string) => Promise<ActionResponse<Blob>>;\n sendRating?: (ratingData: RatingData) => Promise<any>;\n logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;\n}"],"mappings":";AAgCO,IAAK,gBAAL,kBAAKA,mBAAL;AACL,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;","names":["EditingStatus"]}
1
+ {"version":3,"sources":["../../src/types/type.ts"],"sourcesContent":["export type AlquimiaDocument = {\n id: string;\n name: string;\n description?: string;\n isActive: boolean;\n contentType: string;\n url: string;\n updatedAt?: string;\n};\n\nexport type AlquimiaTopic = {\n id: string;\n externalCollectionId: string;\n isActive: boolean;\n name: string;\n description: string;\n createdAt?: string;\n updatedAt?: string;\n files: AlquimiaDocument[];\n ratings?: TopicRating[];\n};\n\nexport type TopicRating = {\n id: number;\n sessionId: string;\n}\n\nexport type AlquimiaFile = {\n id: string;\n file: Blob;\n}\n\nexport enum EditingStatus {\n EDITING = 'EDITING',\n FINISHED = 'FINISHED',\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n emoji?: string;\n description?: string;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: ActionError;\n}\n\nexport type ActionError = {\n message: string;\n code?: string;\n details?: ErrorDetails;\n}\n\nexport type ErrorDetails = {\n status: string;\n statusText?: string;\n}\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport interface TWYDServerActions {\n getDocument?: (id: string) => Promise<ActionResponse<Blob>>;\n sendRating?: (ratingData: RatingData) => Promise<any>;\n logError?: (message: string, error: Error, data?: Record<string, any>) => Promise<any>;\n}\n\nexport interface ToolFactory {\n createTool: (tool: string, payload: any) => React.ReactNode | null;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n"],"mappings":";AAgCO,IAAK,gBAAL,kBAAKA,mBAAL;AACL,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;","names":["EditingStatus"]}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@alquimia-ai/ui",
3
- "version": "1.2.4",
3
+ "version": "1.3.1",
4
4
  "author": "Alquimia AI",
5
5
  "description": "UI components for Alquimia SDK",
6
6
  "private": false,
7
7
  "license": "MIT",
8
- "exportsProd": {
8
+ "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.mjs",
@@ -65,23 +65,6 @@
65
65
  "./tailwind.config": "./dist/tailwind.config.js",
66
66
  "./package.json": "./package.json"
67
67
  },
68
- "exports": {
69
- ".": "./src/index.ts",
70
- "./styles.css": "./src/styles.css",
71
- "./components/atoms": "./src/components/atoms/index.ts",
72
- "./components/templates": "./src/components/templates/index.ts",
73
- "./components/organisms": "./src/components/organisms/index.ts",
74
- "./components/molecules": "./src/components/molecules/index.ts",
75
- "./components/hooks": "./src/components/hooks/index.ts",
76
- "./components/molecules/viewers": "./src/components/molecules/viewers/index.ts",
77
- "./components/molecules/documents": "./src/components/molecules/documents/index.ts",
78
- "./lib/utils": "./src/lib/index.ts",
79
- "./types": "./src/types/index.ts",
80
- "./styles/*": "./src/styles/*",
81
- "./styles/themes/*": "./src/styles/themes/*",
82
- "./tailwind.config": "./src/tailwind.config.js",
83
- "./package.json": "./package.json"
84
- },
85
68
  "scripts": {
86
69
  "lint": "eslint . --max-warnings 0",
87
70
  "generate:component": "turbo gen react-component",
@@ -135,6 +118,7 @@
135
118
  "@radix-ui/react-toggle": "^1.1.0",
136
119
  "@radix-ui/react-tooltip": "^1.1.3",
137
120
  "@tanstack/react-table": "^8.20.5",
121
+ "@radix-ui/react-separator": "^1.0.3",
138
122
  "class-variance-authority": "^0.7.0",
139
123
  "clsx": "^2.1.1",
140
124
  "cmdk": "1.0.0",
package/dist/package.json DELETED
@@ -1,136 +0,0 @@
1
- {
2
- "name": "@alquimia-ai/ui",
3
- "version": "1.2.4",
4
- "author": "Alquimia AI",
5
- "description": "UI components for Alquimia SDK",
6
- "private": false,
7
- "license": "MIT",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- },
14
- "./styles.css": "./dist/styles.css",
15
- "./components/atoms": {
16
- "types": "./dist/components/atoms/index.d.ts",
17
- "import": "./dist/components/atoms/index.mjs",
18
- "require": "./dist/components/atoms/index.js"
19
- },
20
- "./components/templates": {
21
- "types": "./dist/components/templates/index.d.ts",
22
- "import": "./dist/components/templates/index.mjs",
23
- "require": "./dist/components/templates/index.js"
24
- },
25
- "./components/organisms": {
26
- "types": "./dist/components/organisms/index.d.ts",
27
- "import": "./dist/components/organisms/index.mjs",
28
- "require": "./dist/components/organisms/index.js"
29
- },
30
- "./components/molecules": {
31
- "types": "./dist/components/molecules/index.d.ts",
32
- "import": "./dist/components/molecules/index.mjs",
33
- "require": "./dist/components/molecules/index.js"
34
- },
35
- "./components/hooks": {
36
- "types": "./dist/components/hooks/index.d.ts",
37
- "import": "./dist/components/hooks/index.mjs",
38
- "require": "./dist/components/hooks/index.js"
39
- },
40
- "./components/molecules/viewers": {
41
- "types": "./dist/components/molecules/viewers/index.d.ts",
42
- "import": "./dist/components/molecules/viewers/index.mjs",
43
- "require": "./dist/components/molecules/viewers/index.js"
44
- },
45
- "./components/molecules/documents": {
46
- "types": "./dist/components/molecules/documents/index.d.ts",
47
- "import": "./dist/components/molecules/documents/index.mjs",
48
- "require": "./dist/components/molecules/documents/index.js"
49
- },
50
- "./lib/utils": {
51
- "types": "./dist/lib/index.d.ts",
52
- "import": "./dist/lib/index.mjs",
53
- "require": "./dist/lib/index.js"
54
- },
55
- "./types": {
56
- "types": "./dist/types/index.d.ts",
57
- "import": "./dist/types/index.mjs",
58
- "require": "./dist/types/index.js"
59
- },
60
- "./styles/*": {
61
- "import": "./dist/styles/*",
62
- "require": "./dist/styles/*"
63
- },
64
- "./styles/themes/*": "./dist/styles/themes/*",
65
- "./tailwind.config": "./dist/tailwind.config.js",
66
- "./package.json": "./package.json"
67
- },
68
- "scripts": {
69
- "lint": "eslint . --max-warnings 0",
70
- "generate:component": "turbo gen react-component",
71
- "prebuild": "cd ../tools && npm run build",
72
- "build": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 && cpx \"src/styles/**/*\" dist/styles",
73
- "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
74
- "dev": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 --watch",
75
- "genversion": "genversion --es6 --semi ./version.js"
76
- },
77
- "files": [
78
- "dist/**",
79
- "README.md",
80
- "package.json"
81
- ],
82
- "devDependencies": {
83
- "@alquimia-ai/eslint-config": "*",
84
- "@alquimia-ai/tools": "*",
85
- "@alquimia-ai/typescript-config": "*",
86
- "@changesets/changelog-git": "^0.2.0",
87
- "@changesets/changelog-github": "^0.5.0",
88
- "@turbo/gen": "^1.12.4",
89
- "@types/eslint": "^8.56.5",
90
- "@types/node": "^20.11.24",
91
- "@types/react": "^18.2.61",
92
- "@types/react-dom": "^18.2.19",
93
- "cpx": "^1.5.0",
94
- "eslint": "^8.57.0",
95
- "next": ">=13.5.0",
96
- "react": ">=18.0.0",
97
- "react-dom": ">=18.0.0",
98
- "typescript": "^5.3.3"
99
- },
100
- "dependencies": {
101
- "@alquimia-ai/tools": "*",
102
- "@radix-ui/react-alert-dialog": "^1.1.2",
103
- "@radix-ui/react-aspect-ratio": "^1.1.0",
104
- "@radix-ui/react-avatar": "^1.1.0",
105
- "@radix-ui/react-checkbox": "^1.1.2",
106
- "@radix-ui/react-dialog": "^1.1.2",
107
- "@radix-ui/react-icons": "^1.3.0",
108
- "@radix-ui/react-label": "^2.1.0",
109
- "@radix-ui/react-navigation-menu": "^1.2.1",
110
- "@radix-ui/react-popover": "^1.1.2",
111
- "@radix-ui/react-scroll-area": "^1.1.0",
112
- "@radix-ui/react-select": "^2.1.2",
113
- "@radix-ui/react-slider": "^1.2.1",
114
- "@radix-ui/react-slot": "^1.1.0",
115
- "@radix-ui/react-switch": "^1.1.1",
116
- "@radix-ui/react-tabs": "^1.1.1",
117
- "@radix-ui/react-toast": "^1.2.2",
118
- "@radix-ui/react-toggle": "^1.1.0",
119
- "@radix-ui/react-tooltip": "^1.1.3",
120
- "@tanstack/react-table": "^8.20.5",
121
- "class-variance-authority": "^0.7.0",
122
- "clsx": "^2.1.1",
123
- "cmdk": "1.0.0",
124
- "embla-carousel-react": "^8.3.0",
125
- "lucide-react": "^0.436.0",
126
- "next-themes": ">=0.3.0",
127
- "pdfjs-dist": "4.4.168",
128
- "react-markdown": "^9.0.1",
129
- "react-pdf": "9.1.1",
130
- "remark-gfm": "^4.0.0",
131
- "sonner": "^1.5.0",
132
- "tailwind-merge": "^2.5.2",
133
- "tailwindcss-animate": "^1.0.7",
134
- "vaul": "^0.9.4"
135
- }
136
- }