@gram-ai/elements 1.0.1 → 1.0.3
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/README.md +5 -5
- package/dist/components/Chat/index.d.ts +1 -0
- package/dist/components/Chat/index.stories.d.ts +6 -0
- package/dist/components/assistant-ui/attachment.d.ts +4 -0
- package/dist/components/assistant-ui/markdown-text.d.ts +1 -0
- package/dist/components/assistant-ui/thread-list.d.ts +2 -0
- package/dist/components/assistant-ui/thread.d.ts +2 -0
- package/dist/components/assistant-ui/tool-fallback.d.ts +2 -0
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/contexts/ElementsProvider.d.ts +3 -0
- package/dist/elements.js +6285 -26193
- package/dist/index.d.ts +3 -0
- package/dist/lib/gramRuntimeApi.d.ts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/types/index.d.ts +14 -0
- package/package.json +32 -29
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatModelAdapter } from '@assistant-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface ElementsProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
api: GramRuntimeApi | CustomRuntimeApi;
|
|
6
|
+
}
|
|
7
|
+
export interface GramRuntimeApi {
|
|
8
|
+
getSessionToken: () => Promise<string>;
|
|
9
|
+
projectToken: string;
|
|
10
|
+
}
|
|
11
|
+
export type CustomRuntimeApi = ChatModelAdapter;
|
|
12
|
+
export type ElementsContextType = object;
|
|
13
|
+
export declare function isGramRuntimeApi(api: GramRuntimeApi | CustomRuntimeApi): api is GramRuntimeApi;
|
|
14
|
+
export declare function isCustomRuntimeApi(api: GramRuntimeApi | CustomRuntimeApi): api is CustomRuntimeApi;
|
package/package.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"name": "@gram-ai/elements",
|
|
3
3
|
"description": "Gram Elements is a library of UI primitives for building chat-like experiences for MCP Servers.",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.3",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"import": "./dist/
|
|
9
|
+
"import": "./dist/elements.js",
|
|
10
10
|
"types": "./dist/index.d.ts"
|
|
11
11
|
},
|
|
12
12
|
"./elements.css": "./dist/elements.css"
|
|
@@ -22,26 +22,48 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
|
-
"type-check": "tsc --noEmit",
|
|
26
25
|
"build": "vite build",
|
|
27
26
|
"lint": "eslint . && tsc -b --noEmit",
|
|
28
27
|
"analyze": "pnpm dlx vite-bundle-visualizer",
|
|
29
28
|
"storybook": "storybook dev -p 6006",
|
|
30
29
|
"build-storybook": "storybook build",
|
|
31
|
-
"
|
|
30
|
+
"type-check": "tsc --noEmit"
|
|
32
31
|
},
|
|
33
32
|
"keywords": [],
|
|
34
33
|
"author": "Adam Bull <adam@speakeasy.com>",
|
|
35
34
|
"license": "ISC",
|
|
36
35
|
"packageManager": "pnpm@10.18.2",
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@assistant-ui/react": "^0.11.0",
|
|
38
|
+
"@assistant-ui/react-markdown": "^0.11.0",
|
|
39
|
+
"@types/react": "^19.1.13",
|
|
40
|
+
"@types/react-dom": "^19.1.13",
|
|
41
|
+
"motion": "^12.0.0",
|
|
42
|
+
"react": "^19.1.13",
|
|
43
|
+
"react-dom": "^19.1.13",
|
|
44
|
+
"remark-gfm": "^4.0.0",
|
|
45
|
+
"zustand": "^5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
49
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
50
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
51
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
|
+
"class-variance-authority": "^0.7.1",
|
|
53
|
+
"clsx": "^2.1.1",
|
|
54
|
+
"lucide-react": "^0.544.0",
|
|
55
|
+
"tailwind-merge": "^3.3.1"
|
|
56
|
+
},
|
|
37
57
|
"devDependencies": {
|
|
38
58
|
"@ai-sdk/openai": "2.0.0-beta.5",
|
|
59
|
+
"@assistant-ui/react": "^0.11.37",
|
|
60
|
+
"@assistant-ui/react-markdown": "^0.11.4",
|
|
39
61
|
"@eslint/compat": "^2.0.0",
|
|
40
62
|
"@eslint/js": "^9.39.1",
|
|
41
63
|
"@storybook/addon-docs": "^10.0.8",
|
|
42
64
|
"@storybook/addon-onboarding": "^10.0.8",
|
|
43
65
|
"@storybook/react-vite": "^10.0.8",
|
|
44
|
-
"@
|
|
66
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
45
67
|
"@types/node": "^24.10.1",
|
|
46
68
|
"@vitejs/plugin-react": "^5.0.3",
|
|
47
69
|
"ai": "5.0.90",
|
|
@@ -53,36 +75,17 @@
|
|
|
53
75
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
54
76
|
"eslint-plugin-storybook": "^10.1.4",
|
|
55
77
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
78
|
+
"motion": "^12.23.14",
|
|
56
79
|
"prettier": "^3.7.4",
|
|
57
80
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
81
|
+
"remark-gfm": "^4.0.1",
|
|
58
82
|
"semantic-release": "^24.2.0",
|
|
59
83
|
"storybook": "^10.0.8",
|
|
84
|
+
"tailwindcss": "^4.1.13",
|
|
60
85
|
"tw-animate-css": "^1.3.8",
|
|
61
86
|
"typescript-eslint": "^8.48.1",
|
|
62
|
-
"vite": "^7.1.6"
|
|
63
|
-
|
|
64
|
-
"peerDependencies": {
|
|
65
|
-
"@types/react": "^19.1.13",
|
|
66
|
-
"@types/react-dom": "^19.1.13",
|
|
67
|
-
"react": "^19.1.13",
|
|
68
|
-
"react-dom": "^19.1.13"
|
|
69
|
-
},
|
|
70
|
-
"dependencies": {
|
|
71
|
-
"@assistant-ui/react": "^0.11.37",
|
|
72
|
-
"@assistant-ui/react-ai-sdk": "^1.1.9",
|
|
73
|
-
"@assistant-ui/react-markdown": "^0.11.4",
|
|
74
|
-
"@radix-ui/react-avatar": "^1.1.10",
|
|
75
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
76
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
77
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
78
|
-
"@tailwindcss/vite": "^4.1.13",
|
|
79
|
-
"class-variance-authority": "^0.7.1",
|
|
80
|
-
"clsx": "^2.1.1",
|
|
81
|
-
"lucide-react": "^0.544.0",
|
|
82
|
-
"motion": "^12.23.14",
|
|
83
|
-
"remark-gfm": "^4.0.1",
|
|
84
|
-
"tailwind-merge": "^3.3.1",
|
|
85
|
-
"tailwindcss": "^4.1.13",
|
|
87
|
+
"vite": "^7.1.6",
|
|
88
|
+
"vite-plugin-dts": "^4.5.4",
|
|
86
89
|
"zustand": "^5.0.8"
|
|
87
90
|
}
|
|
88
91
|
}
|