@copilotkit/react-ui 1.62.3 → 1.63.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.
- package/package.json +5 -5
- package/tsdown.config.ts +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.63.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@headlessui/react": "^2.2.9",
|
|
46
46
|
"react-markdown": "^10.1.0",
|
|
47
|
-
"react-syntax-highlighter": "^
|
|
47
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
48
48
|
"rehype-raw": "^7.0.0",
|
|
49
49
|
"rehype-sanitize": "^6.0.0",
|
|
50
50
|
"remark-gfm": "^4.0.1",
|
|
51
51
|
"remark-math": "^6.0.0",
|
|
52
|
-
"@copilotkit/
|
|
53
|
-
"@copilotkit/
|
|
54
|
-
"@copilotkit/
|
|
52
|
+
"@copilotkit/react-core": "1.63.1",
|
|
53
|
+
"@copilotkit/runtime-client-gql": "1.63.1",
|
|
54
|
+
"@copilotkit/shared": "1.63.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/react": "^19.1.0",
|
package/tsdown.config.ts
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { defineConfig } from "tsdown";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
|
|
6
|
+
// Side-effect CSS imports are kept in the JS output so styles auto-load for
|
|
7
|
+
// bundler consumers, but rolldown-plugin-dts also leaves them in the emitted
|
|
8
|
+
// declaration files, where TypeScript cannot resolve a `.css` as a typed module
|
|
9
|
+
// (an `attw` InternalResolutionError). Strip them from declarations only, via the
|
|
10
|
+
// `build:done` hook so every format's declarations are post-processed on disk.
|
|
11
|
+
const stripCssTypeImports = (dir: string) => {
|
|
12
|
+
const cssImport = /^[ \t]*import\s+["'][^"']+\.css["'];?[ \t]*\r?\n/gm;
|
|
13
|
+
const walk = (current: string) => {
|
|
14
|
+
for (const entry of fs.readdirSync(current, { withFileTypes: true })) {
|
|
15
|
+
const full = path.join(current, entry.name);
|
|
16
|
+
if (entry.isDirectory()) {
|
|
17
|
+
walk(full);
|
|
18
|
+
} else if (/\.d\.[cm]?ts$/.test(entry.name)) {
|
|
19
|
+
const code = fs.readFileSync(full, "utf8");
|
|
20
|
+
const next = code.replace(cssImport, "");
|
|
21
|
+
if (next !== code) fs.writeFileSync(full, next);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
if (fs.existsSync(dir)) walk(dir);
|
|
26
|
+
};
|
|
2
27
|
|
|
3
28
|
export default defineConfig([
|
|
4
29
|
{
|
|
@@ -8,6 +33,9 @@ export default defineConfig([
|
|
|
8
33
|
sourcemap: true,
|
|
9
34
|
target: "es2022",
|
|
10
35
|
outDir: "dist",
|
|
36
|
+
hooks: {
|
|
37
|
+
"build:done": () => stripCssTypeImports(path.resolve("dist")),
|
|
38
|
+
},
|
|
11
39
|
external: [
|
|
12
40
|
"react",
|
|
13
41
|
"react-dom",
|