assistant-ui 0.0.0 → 0.0.2
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/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Simon Farshid
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `assistant-ui`
|
|
2
|
+
|
|
3
|
+
`assistant-ui` is a set of React components for AI chat.
|
|
4
|
+
|
|
5
|
+
- [Website](https://assistant-ui.com/)
|
|
6
|
+
- [Demo](https://assistant-ui-rsc-example.vercel.app/)
|
|
7
|
+
|
|
8
|
+
## Documentation
|
|
9
|
+
|
|
10
|
+
- [Documentation](https://www.assistant-ui.com/docs/getting-started)
|
|
11
|
+
|
|
12
|
+
## Minimal Example with Vercel AI SDK
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx assistant-ui@latest add assistant-modal
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
"use client";
|
|
20
|
+
|
|
21
|
+
import { useChat } from "@ai-sdk/react";
|
|
22
|
+
import { AssistantRuntimeProvider, useVercelUseChatRuntime } from "@assistant-ui/react";
|
|
23
|
+
import { AssistantModal } from "@/components/ui/assistant-ui/assistant-modal";
|
|
24
|
+
|
|
25
|
+
export default const MyApp = () => {
|
|
26
|
+
const chat = useChat({
|
|
27
|
+
api: "/api/chat" // your backend route
|
|
28
|
+
});
|
|
29
|
+
const runtime = useVercelUseChatRuntime(chat);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
|
33
|
+
<AssistantModal />
|
|
34
|
+
</AssistantRuntimeProvider>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
```
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/commands/add.ts
|
|
4
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
5
|
+
import path3 from "node:path";
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import { spawn } from "cross-spawn";
|
|
9
|
+
|
|
10
|
+
// src/utils/get-component-target-path.ts
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
function getComponentTargetPath(config) {
|
|
13
|
+
if (config.aliases.ui) {
|
|
14
|
+
return config.resolvedPaths.ui;
|
|
15
|
+
}
|
|
16
|
+
const [parent, type] = ["components", "ui"];
|
|
17
|
+
if (!(parent in config.resolvedPaths)) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return path.join(
|
|
21
|
+
config.resolvedPaths[parent],
|
|
22
|
+
type
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// src/utils/get-config.ts
|
|
27
|
+
import path2 from "node:path";
|
|
28
|
+
import { cosmiconfig } from "cosmiconfig";
|
|
29
|
+
import { loadConfig } from "tsconfig-paths";
|
|
30
|
+
import { z } from "zod";
|
|
31
|
+
|
|
32
|
+
// src/utils/resolve-import.ts
|
|
33
|
+
import {
|
|
34
|
+
createMatchPath
|
|
35
|
+
} from "tsconfig-paths";
|
|
36
|
+
function resolveImport(importPath, config) {
|
|
37
|
+
return createMatchPath(config.absoluteBaseUrl, config.paths)(
|
|
38
|
+
importPath,
|
|
39
|
+
void 0,
|
|
40
|
+
() => true,
|
|
41
|
+
[".ts", ".tsx"]
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/utils/get-config.ts
|
|
46
|
+
var explorer = cosmiconfig("components", {
|
|
47
|
+
searchPlaces: ["components.json"]
|
|
48
|
+
});
|
|
49
|
+
var rawConfigSchema = z.object({
|
|
50
|
+
$schema: z.string().optional(),
|
|
51
|
+
style: z.string(),
|
|
52
|
+
rsc: z.coerce.boolean().default(false),
|
|
53
|
+
tsx: z.coerce.boolean().default(true),
|
|
54
|
+
tailwind: z.object({
|
|
55
|
+
config: z.string(),
|
|
56
|
+
css: z.string(),
|
|
57
|
+
baseColor: z.string(),
|
|
58
|
+
cssVariables: z.boolean().default(true),
|
|
59
|
+
prefix: z.string().default("").optional()
|
|
60
|
+
}),
|
|
61
|
+
aliases: z.object({
|
|
62
|
+
components: z.string(),
|
|
63
|
+
utils: z.string(),
|
|
64
|
+
ui: z.string().optional()
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
var configSchema = rawConfigSchema.extend({
|
|
68
|
+
resolvedPaths: z.object({
|
|
69
|
+
tailwindConfig: z.string(),
|
|
70
|
+
tailwindCss: z.string(),
|
|
71
|
+
utils: z.string(),
|
|
72
|
+
components: z.string(),
|
|
73
|
+
ui: z.string()
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
async function getConfig(cwd) {
|
|
77
|
+
const config = await getRawConfig(cwd);
|
|
78
|
+
if (!config) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return resolveConfigPaths(cwd, config);
|
|
82
|
+
}
|
|
83
|
+
function resolveConfigPaths(cwd, config) {
|
|
84
|
+
const tsConfig = loadConfig(cwd);
|
|
85
|
+
if (tsConfig.resultType === "failed") {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`Failed to load ${config.tsx ? "tsconfig" : "jsconfig"}.json. ${tsConfig.message ?? ""}`.trim()
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return configSchema.parse({
|
|
91
|
+
...config,
|
|
92
|
+
resolvedPaths: {
|
|
93
|
+
tailwindConfig: path2.resolve(cwd, config.tailwind.config),
|
|
94
|
+
tailwindCss: path2.resolve(cwd, config.tailwind.css),
|
|
95
|
+
utils: resolveImport(config.aliases["utils"], tsConfig),
|
|
96
|
+
components: resolveImport(config.aliases["components"], tsConfig),
|
|
97
|
+
ui: config.aliases["ui"] ? resolveImport(config.aliases["ui"], tsConfig) : resolveImport(config.aliases["components"], tsConfig)
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
async function getRawConfig(cwd) {
|
|
102
|
+
try {
|
|
103
|
+
const configResult = await explorer.search(cwd);
|
|
104
|
+
if (!configResult) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
return rawConfigSchema.parse(configResult.config);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
throw new Error(`Invalid configuration found in ${cwd}/components.json.`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// src/commands/add.ts
|
|
114
|
+
var SHADCN_CLI_VERSION = "0.8.0";
|
|
115
|
+
var getTargetPath = (config, pathOverride) => {
|
|
116
|
+
const baseConfig = pathOverride ?? getComponentTargetPath(config);
|
|
117
|
+
if (!baseConfig) {
|
|
118
|
+
console.warn(
|
|
119
|
+
`Unable to determine the base path. Please run ${chalk.green(
|
|
120
|
+
"npx shadcn-ui init"
|
|
121
|
+
)} to create a components.json file.`
|
|
122
|
+
);
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
return [baseConfig, path3.join(baseConfig, "assistant-ui")];
|
|
126
|
+
};
|
|
127
|
+
var add = new Command().name("add").description("add a component to your project").argument("[components...]", "the components to add").option("-y, --yes", "skip confirmation prompt.", true).option("-o, --overwrite", "overwrite existing files.", false).option(
|
|
128
|
+
"-c, --cwd <cwd>",
|
|
129
|
+
"the working directory. defaults to the current directory.",
|
|
130
|
+
process.cwd()
|
|
131
|
+
).option("-a, --all", "add all available components", false).option("-p, --path <path>", "the path to add the component to.").action(async (_, opts) => {
|
|
132
|
+
const cwd = path3.resolve(opts.cwd);
|
|
133
|
+
const config = await getConfig(cwd);
|
|
134
|
+
if (!config) {
|
|
135
|
+
console.warn(
|
|
136
|
+
`Configuration is missing. Please run ${chalk.green(
|
|
137
|
+
"npx shadcn-ui init"
|
|
138
|
+
)} to create a components.json file.`
|
|
139
|
+
);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
const [basePath, targetPath] = getTargetPath(config, opts.path);
|
|
143
|
+
if (targetPath && !existsSync(targetPath)) {
|
|
144
|
+
mkdirSync(targetPath, { recursive: true });
|
|
145
|
+
}
|
|
146
|
+
const child = spawn(
|
|
147
|
+
"npx",
|
|
148
|
+
[
|
|
149
|
+
`shadcn-ui@${SHADCN_CLI_VERSION}`,
|
|
150
|
+
...process.argv.slice(2),
|
|
151
|
+
"--path",
|
|
152
|
+
basePath
|
|
153
|
+
],
|
|
154
|
+
{
|
|
155
|
+
stdio: "inherit",
|
|
156
|
+
env: {
|
|
157
|
+
COMPONENTS_REGISTRY_URL: "https://www.assistant-ui.com",
|
|
158
|
+
...process.env
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
child.on("error", (error) => {
|
|
163
|
+
console.error(`Error: ${error.message}`);
|
|
164
|
+
});
|
|
165
|
+
child.on("close", (code) => {
|
|
166
|
+
if (code !== 0) {
|
|
167
|
+
console.log(`other-package-script process exited with code ${code}`);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// src/index.ts
|
|
173
|
+
import { Command as Command2 } from "commander";
|
|
174
|
+
|
|
175
|
+
// src/utils/get-package-info.ts
|
|
176
|
+
import path4 from "node:path";
|
|
177
|
+
import fs from "node:fs";
|
|
178
|
+
function getPackageInfo() {
|
|
179
|
+
const packageJsonPath = path4.join("package.json");
|
|
180
|
+
return JSON.parse(fs.readFileSync(packageJsonPath).toString("utf-8"));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/index.ts
|
|
184
|
+
process.on("SIGINT", () => process.exit(0));
|
|
185
|
+
process.on("SIGTERM", () => process.exit(0));
|
|
186
|
+
async function main() {
|
|
187
|
+
const packageInfo = await getPackageInfo();
|
|
188
|
+
const program = new Command2().name("assistant-ui").description("add components and dependencies to your project").version(
|
|
189
|
+
packageInfo.version || "1.0.0",
|
|
190
|
+
"-v, --version",
|
|
191
|
+
"display the version number"
|
|
192
|
+
);
|
|
193
|
+
program.addCommand(add);
|
|
194
|
+
program.parse();
|
|
195
|
+
}
|
|
196
|
+
main();
|
|
197
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/add.ts","../src/utils/get-component-target-path.ts","../src/utils/get-config.ts","../src/utils/resolve-import.ts","../src/index.ts","../src/utils/get-package-info.ts"],"sourcesContent":["import { existsSync, mkdirSync } from \"node:fs\";\nimport path from \"node:path\";\nimport chalk from \"chalk\";\nimport { Command } from \"commander\";\nimport { spawn } from \"cross-spawn\";\nimport { getComponentTargetPath } from \"../utils/get-component-target-path\";\nimport { type Config, getConfig } from \"../utils/get-config\";\n\nconst SHADCN_CLI_VERSION = \"0.8.0\";\n\nconst getTargetPath = (config: Config, pathOverride: string) => {\n const baseConfig = pathOverride ?? getComponentTargetPath(config);\n if (!baseConfig) {\n console.warn(\n `Unable to determine the base path. Please run ${chalk.green(\n \"npx shadcn-ui init\",\n )} to create a components.json file.`,\n );\n process.exit(1);\n }\n\n return [baseConfig, path.join(baseConfig, \"assistant-ui\")] as const;\n};\n\nexport const add = new Command()\n .name(\"add\")\n .description(\"add a component to your project\")\n .argument(\"[components...]\", \"the components to add\")\n .option(\"-y, --yes\", \"skip confirmation prompt.\", true)\n .option(\"-o, --overwrite\", \"overwrite existing files.\", false)\n .option(\n \"-c, --cwd <cwd>\",\n \"the working directory. defaults to the current directory.\",\n process.cwd(),\n )\n .option(\"-a, --all\", \"add all available components\", false)\n .option(\"-p, --path <path>\", \"the path to add the component to.\")\n .action(async (_, opts) => {\n const cwd = path.resolve(opts.cwd);\n const config = await getConfig(cwd);\n\n if (!config) {\n console.warn(\n `Configuration is missing. Please run ${chalk.green(\n \"npx shadcn-ui init\",\n )} to create a components.json file.`,\n );\n process.exit(1);\n }\n\n const [basePath, targetPath] = getTargetPath(config, opts.path);\n\n // create target path directory if it doesnt exist\n if (targetPath && !existsSync(targetPath)) {\n mkdirSync(targetPath, { recursive: true });\n }\n\n const child = spawn(\n \"npx\",\n [\n `shadcn-ui@${SHADCN_CLI_VERSION}`,\n ...process.argv.slice(2),\n \"--path\",\n basePath,\n ],\n {\n stdio: \"inherit\",\n env: {\n COMPONENTS_REGISTRY_URL: \"https://www.assistant-ui.com\",\n ...process.env,\n },\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`other-package-script process exited with code ${code}`);\n }\n });\n });\n","import path from \"node:path\";\nimport type { Config } from \"./get-config\";\n\nexport function getComponentTargetPath(config: Config) {\n if (config.aliases.ui) {\n return config.resolvedPaths.ui;\n }\n\n const [parent, type] = [\"components\", \"ui\"];\n if (!(parent in config.resolvedPaths)) {\n return null;\n }\n\n return path.join(\n config.resolvedPaths[parent as keyof typeof config.resolvedPaths],\n type,\n );\n}\n","import path from \"node:path\";\nimport { cosmiconfig } from \"cosmiconfig\";\nimport { loadConfig } from \"tsconfig-paths\";\nimport { z } from \"zod\";\nimport { resolveImport } from \"./resolve-import\";\n\nconst explorer = cosmiconfig(\"components\", {\n searchPlaces: [\"components.json\"],\n});\n\nexport const rawConfigSchema = z.object({\n $schema: z.string().optional(),\n style: z.string(),\n rsc: z.coerce.boolean().default(false),\n tsx: z.coerce.boolean().default(true),\n tailwind: z.object({\n config: z.string(),\n css: z.string(),\n baseColor: z.string(),\n cssVariables: z.boolean().default(true),\n prefix: z.string().default(\"\").optional(),\n }),\n aliases: z.object({\n components: z.string(),\n utils: z.string(),\n ui: z.string().optional(),\n }),\n});\n\nexport type RawConfig = z.infer<typeof rawConfigSchema>;\n\nexport const configSchema = rawConfigSchema.extend({\n resolvedPaths: z.object({\n tailwindConfig: z.string(),\n tailwindCss: z.string(),\n utils: z.string(),\n components: z.string(),\n ui: z.string(),\n }),\n});\n\nexport type Config = z.infer<typeof configSchema>;\n\nexport async function getConfig(cwd: string) {\n const config = await getRawConfig(cwd);\n\n if (!config) {\n return null;\n }\n\n return resolveConfigPaths(cwd, config);\n}\n\nexport function resolveConfigPaths(cwd: string, config: RawConfig) {\n // Read tsconfig.json.\n const tsConfig = loadConfig(cwd);\n\n if (tsConfig.resultType === \"failed\") {\n throw new Error(\n `Failed to load ${config.tsx ? \"tsconfig\" : \"jsconfig\"}.json. ${\n tsConfig.message ?? \"\"\n }`.trim(),\n );\n }\n\n return configSchema.parse({\n ...config,\n resolvedPaths: {\n tailwindConfig: path.resolve(cwd, config.tailwind.config),\n tailwindCss: path.resolve(cwd, config.tailwind.css),\n utils: resolveImport(config.aliases[\"utils\"], tsConfig),\n components: resolveImport(config.aliases[\"components\"], tsConfig),\n ui: config.aliases[\"ui\"]\n ? resolveImport(config.aliases[\"ui\"], tsConfig)\n : resolveImport(config.aliases[\"components\"], tsConfig),\n },\n });\n}\n\nexport async function getRawConfig(cwd: string): Promise<RawConfig | null> {\n try {\n const configResult = await explorer.search(cwd);\n\n if (!configResult) {\n return null;\n }\n\n return rawConfigSchema.parse(configResult.config);\n } catch (error) {\n throw new Error(`Invalid configuration found in ${cwd}/components.json.`);\n }\n}\n","import {\n type ConfigLoaderSuccessResult,\n createMatchPath,\n} from \"tsconfig-paths\";\n\nexport function resolveImport(\n importPath: string,\n config: Pick<ConfigLoaderSuccessResult, \"absoluteBaseUrl\" | \"paths\">,\n) {\n return createMatchPath(config.absoluteBaseUrl, config.paths)(\n importPath,\n undefined,\n () => true,\n [\".ts\", \".tsx\"],\n );\n}\n","#!/usr/bin/env node\n\nimport { add } from \"@/src/commands/add\";\nimport { Command } from \"commander\";\n\nimport { getPackageInfo } from \"./utils/get-package-info\";\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nasync function main() {\n const packageInfo = await getPackageInfo();\n\n const program = new Command()\n .name(\"assistant-ui\")\n .description(\"add components and dependencies to your project\")\n .version(\n packageInfo.version || \"1.0.0\",\n \"-v, --version\",\n \"display the version number\",\n );\n\n program.addCommand(add);\n\n program.parse();\n}\n\nmain();\n","import path from \"node:path\";\nimport fs from \"node:fs\";\n\nexport function getPackageInfo() {\n const packageJsonPath = path.join(\"package.json\");\n\n return JSON.parse(fs.readFileSync(packageJsonPath).toString(\"utf-8\")) as {\n version: string;\n };\n}\n"],"mappings":";;;AAAA,SAAS,YAAY,iBAAiB;AACtC,OAAOA,WAAU;AACjB,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,aAAa;;;ACJtB,OAAO,U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M,CAAC;AAAA,MACvB;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,KAAK;AAAA,QACH,yBAAyB;AAAA,QACzB,GAAG,QAAQ;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAEA,QAAM,GAAG,SAAS,CAAC,UAAU;AAC3B,YAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AAAA,EACzC,CAAC;AAED,QAAM,GAAG,SAAS,CAAC,SAAS;AAC1B,QAAI,SAAS,GAAG;AACd,cAAQ,IAAI,iDAAiD,IAAI,EAAE;AAAA,IACrE;AAAA,EACF,CAAC;AACH,CAAC;;;AIhFH,SAAS,WAAAC,gBAAe;;;ACHxB,OAAOC,WAAU;AACjB,OAAO,QAAQ;AAER,SAAS,iBAAiB;AAC/B,QAAM,kBAAkBA,MAAK,KAAK,cAAc;AAEhD,SAAO,KAAK,MAAM,GAAG,aAAa,eAAe,EAAE,SAAS,OAAO,CAAC;AAGtE;;;ADFA,QAAQ,GAAG,UAAU,MAAM,QAAQ,KAAK,CAAC,CAAC;AAC1C,QAAQ,GAAG,WAAW,MAAM,QAAQ,KAAK,CAAC,CAAC;AAE3C,eAAe,OAAO;AACpB,QAAM,cAAc,MAAM,eAAe;AAEzC,QAAM,UAAU,IAAIC,SAAQ,EACzB,KAAK,cAAc,EACnB,YAAY,iDAAiD,EAC7D;AAAA,IACC,YAAY,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEF,UAAQ,WAAW,GAAG;AAEtB,UAAQ,MAAM;AAChB;AAEA,KAAK;","names":["path","path","path","path","Command","path","Command"]}
|
package/package.json
CHANGED
|
@@ -1,4 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"chalk": "^5.3.0",
|
|
8
|
+
"commander": "^12.1.0",
|
|
9
|
+
"cosmiconfig": "^9.0.0",
|
|
10
|
+
"cross-spawn": "^7.0.3",
|
|
11
|
+
"tsconfig-paths": "^4.2.0",
|
|
12
|
+
"zod": "^3.23.8"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@radix-ui/react-avatar": "^1.0.4",
|
|
16
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
17
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
18
|
+
"@radix-ui/react-tooltip": "^1.0.7",
|
|
19
|
+
"@types/cross-spawn": "^6.0.6",
|
|
20
|
+
"@types/node": "^20.14.2",
|
|
21
|
+
"@types/react": "^18",
|
|
22
|
+
"class-variance-authority": "^0.7.0",
|
|
23
|
+
"clsx": "^2.1.1",
|
|
24
|
+
"lucide-react": "^0.394.0",
|
|
25
|
+
"react": "^18.3.1",
|
|
26
|
+
"react-resizable-panels": "^2.0.19",
|
|
27
|
+
"rimraf": "^5.0.7",
|
|
28
|
+
"shadcn-ui": "0.8.0",
|
|
29
|
+
"tailwind-merge": "^2.3.0",
|
|
30
|
+
"tailwindcss": "^3.4.4",
|
|
31
|
+
"tailwindcss-animate": "^1.0.7",
|
|
32
|
+
"tsup": "^8.1.0",
|
|
33
|
+
"tsx": "^4.15.4",
|
|
34
|
+
"@assistant-ui/react": "0.0.25",
|
|
35
|
+
"@assistant-ui/tsconfig": "0.0.0"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"bin": "./dist/index.js",
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup src/index.ts --format esm --sourcemap",
|
|
47
|
+
"build:registry": "tsx ./scripts/build-registry.ts",
|
|
48
|
+
"prepublish": "cp ../../README.md ./README.md"
|
|
49
|
+
}
|
|
50
|
+
}
|