@copilotkit/react-ui 0.0.0-feat-use-frontend-component-20260219223758 → 0.0.0-feat-a2ui-default-renderer-20260305151820

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/CHANGELOG.md CHANGED
@@ -1,14 +1,131 @@
1
1
  # ui
2
2
 
3
- ## 0.0.0-feat-use-frontend-component-20260219223758
3
+ ## 0.0.0-feat-a2ui-default-renderer-20260305151820
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Updated dependencies [2ae1705]
8
+ - @copilotkit/react-core@0.0.0-feat-a2ui-default-renderer-20260305151820
9
+ - @copilotkit/shared@0.0.0-feat-a2ui-default-renderer-20260305151820
10
+ - @copilotkit/runtime-client-gql@0.0.0-feat-a2ui-default-renderer-20260305151820
11
+
12
+ ## 1.52.1
13
+
14
+ ### Patch Changes
15
+
16
+ - bbdf67d: fix(css): address imcompat with CJS
17
+ - Updated dependencies [b555ac4]
18
+ - @copilotkit/react-core@1.52.1
19
+ - @copilotkit/runtime-client-gql@1.52.1
20
+ - @copilotkit/shared@1.52.1
21
+
22
+ ## 1.52.1-next.1
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [b555ac4]
27
+ - @copilotkit/react-core@1.52.1-next.1
28
+ - @copilotkit/runtime-client-gql@1.52.1-next.1
29
+ - @copilotkit/shared@1.52.1-next.1
30
+
31
+ ## 1.52.1-next.0
32
+
33
+ ### Patch Changes
34
+
35
+ - bbdf67d: fix(css): address imcompat with CJS
36
+ - @copilotkit/react-core@1.52.1-next.0
37
+ - @copilotkit/runtime-client-gql@1.52.1-next.0
38
+ - @copilotkit/shared@1.52.1-next.0
39
+
40
+ ## 1.52.0
41
+
42
+ ### Minor Changes
43
+
44
+ - 6dd6c84: Adding new v2 features:
45
+ - useComponent
46
+ - useRenderTool
47
+ - useDefaultRenderTool
48
+
49
+ Also, fixing issues with styles not being
50
+ properly scoped for tailwind.
51
+
52
+ ### Patch Changes
53
+
54
+ - 7e32e69: chore: fix up style generation
55
+ - 5f941db: Prevent CPK styles from leaking into user app
56
+ - Updated dependencies [6dd6c84]
57
+ - Updated dependencies [d77f347]
58
+ - Updated dependencies [2007f8b]
7
59
  - Updated dependencies [ef0f539]
8
60
  - Updated dependencies [412965a]
9
- - @copilotkit/react-core@0.0.0-feat-use-frontend-component-20260219223758
10
- - @copilotkit/shared@0.0.0-feat-use-frontend-component-20260219223758
11
- - @copilotkit/runtime-client-gql@0.0.0-feat-use-frontend-component-20260219223758
61
+ - Updated dependencies [5f941db]
62
+ - @copilotkit/react-core@1.52.0
63
+ - @copilotkit/shared@1.52.0
64
+ - @copilotkit/runtime-client-gql@1.52.0
65
+
66
+ ## 1.52.0-next.8
67
+
68
+ ### Patch Changes
69
+
70
+ - @copilotkit/react-core@1.52.0-next.8
71
+ - @copilotkit/runtime-client-gql@1.52.0-next.8
72
+ - @copilotkit/shared@1.52.0-next.8
73
+
74
+ ## 1.52.0-next.7
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [d77f347]
79
+ - @copilotkit/react-core@1.52.0-next.7
80
+ - @copilotkit/runtime-client-gql@1.52.0-next.7
81
+ - @copilotkit/shared@1.52.0-next.7
82
+
83
+ ## 1.52.0-next.6
84
+
85
+ ### Patch Changes
86
+
87
+ - 5f941db: Prevent CPK styles from leaking into user app
88
+ - Updated dependencies [2007f8b]
89
+ - Updated dependencies [5f941db]
90
+ - @copilotkit/react-core@1.52.0-next.6
91
+ - @copilotkit/runtime-client-gql@1.52.0-next.6
92
+ - @copilotkit/shared@1.52.0-next.6
93
+
94
+ ## 1.52.0-next.5
95
+
96
+ ### Minor Changes
97
+
98
+ - 6dd6c84: Adding new v2 features:
99
+ - useComponent
100
+ - useRenderTool
101
+ - useDefaultRenderTool
102
+
103
+ Also, fixing issues with styles not being
104
+ properly scoped for tailwind.
105
+
106
+ ### Patch Changes
107
+
108
+ - Updated dependencies [6dd6c84]
109
+ - @copilotkit/react-core@1.52.0-next.5
110
+ - @copilotkit/runtime-client-gql@1.52.0-next.5
111
+ - @copilotkit/shared@1.52.0-next.5
112
+
113
+ ## 1.51.5-next.4
114
+
115
+ ### Patch Changes
116
+
117
+ - 7e32e69: chore: fix up style generation
118
+ - @copilotkit/react-core@1.51.5-next.4
119
+ - @copilotkit/runtime-client-gql@1.51.5-next.4
120
+ - @copilotkit/shared@1.51.5-next.4
121
+
122
+ ## 1.51.5-next.3
123
+
124
+ ### Patch Changes
125
+
126
+ - @copilotkit/react-core@1.51.5-next.3
127
+ - @copilotkit/runtime-client-gql@1.51.5-next.3
128
+ - @copilotkit/shared@1.51.5-next.3
12
129
 
13
130
  ## 1.51.5-next.2
14
131
 
@@ -0,0 +1 @@
1
+ @import "@copilotkit/react-core/v2/styles.css";
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "type": "module",
13
- "version": "0.0.0-feat-use-frontend-component-20260219223758",
13
+ "version": "0.0.0-feat-a2ui-default-renderer-20260305151820",
14
14
  "sideEffects": [
15
15
  "**/*.css"
16
16
  ],
@@ -22,7 +22,8 @@
22
22
  "require": "./dist/index.cjs"
23
23
  },
24
24
  "./package.json": "./package.json",
25
- "./styles.css": "./dist/index.css"
25
+ "./styles.css": "./dist/index.css",
26
+ "./v2/styles.css": "./dist/v2/index.css"
26
27
  },
27
28
  "unpkg": "./dist/index.umd.js",
28
29
  "jsdelivr": "./dist/index.umd.js",
@@ -41,9 +42,9 @@
41
42
  "vitest": "^3.2.4",
42
43
  "tsdown": "^0.20.3",
43
44
  "typescript": "^5.2.3",
44
- "eslint-config-custom": "0.0.0-feat-use-frontend-component-20260219223758",
45
- "tailwind-config": "0.0.0-feat-use-frontend-component-20260219223758",
46
- "tsconfig": "0.0.0-feat-use-frontend-component-20260219223758"
45
+ "eslint-config-custom": "0.0.0-feat-a2ui-default-renderer-20260305151820",
46
+ "tailwind-config": "0.0.0-feat-a2ui-default-renderer-20260305151820",
47
+ "tsconfig": "0.0.0-feat-a2ui-default-renderer-20260305151820"
47
48
  },
48
49
  "dependencies": {
49
50
  "@headlessui/react": "^2.2.9",
@@ -52,9 +53,9 @@
52
53
  "rehype-raw": "^7.0.0",
53
54
  "remark-gfm": "^4.0.1",
54
55
  "remark-math": "^6.0.0",
55
- "@copilotkit/react-core": "0.0.0-feat-use-frontend-component-20260219223758",
56
- "@copilotkit/runtime-client-gql": "0.0.0-feat-use-frontend-component-20260219223758",
57
- "@copilotkit/shared": "0.0.0-feat-use-frontend-component-20260219223758"
56
+ "@copilotkit/react-core": "0.0.0-feat-a2ui-default-renderer-20260305151820",
57
+ "@copilotkit/runtime-client-gql": "0.0.0-feat-a2ui-default-renderer-20260305151820",
58
+ "@copilotkit/shared": "0.0.0-feat-a2ui-default-renderer-20260305151820"
58
59
  },
59
60
  "keywords": [
60
61
  "copilotkit",
@@ -69,7 +70,8 @@
69
70
  "textarea"
70
71
  ],
71
72
  "scripts": {
72
- "build": "tsdown",
73
+ "build:css": "node -e \"const fs=require('fs');fs.mkdirSync('./dist/v2',{recursive:true});fs.cpSync('./src/v2/styles.css','./dist/v2/index.css')\"",
74
+ "build": "tsdown && pnpm run build:css",
73
75
  "dev": "tsdown --watch",
74
76
  "test": "vitest run",
75
77
  "test:watch": "vitest",
@@ -44,7 +44,7 @@ module.exports = {
44
44
 
45
45
  function generateInterface(variables) {
46
46
  const interfaceLines = [
47
- "// autogenerated (see postcss.config.js) - do not edit",
47
+ "// autogenerated (see postcss.config.cjs) - do not edit",
48
48
  'import { CSSProperties } from "react";',
49
49
  "",
50
50
  "export interface CopilotKitCSSProperties extends CSSProperties {",
@@ -0,0 +1,44 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+
5
+ /**
6
+ * Validates that packages with "type": "module" don't ship .js files using
7
+ * CommonJS syntax (require/module.exports). Consumers' build tools (e.g.
8
+ * postcss-loader) may discover these config files and fail because Node
9
+ * treats .js as ESM in "type": "module" packages.
10
+ *
11
+ * Fix: rename CJS files to .cjs so Node always treats them as CommonJS.
12
+ */
13
+ describe("ESM compatibility", () => {
14
+ const pkgRoot = path.resolve(__dirname, "..");
15
+ const pkg = JSON.parse(
16
+ fs.readFileSync(path.join(pkgRoot, "package.json"), "utf-8"),
17
+ );
18
+
19
+ it('should not have .js config files with CJS syntax when package uses "type": "module"', () => {
20
+ if (pkg.type !== "module") return;
21
+
22
+ const jsFiles = fs
23
+ .readdirSync(pkgRoot)
24
+ .filter((f) => f.endsWith(".config.js") || f === ".postcssrc.js");
25
+
26
+ const cjsFiles: string[] = [];
27
+ for (const file of jsFiles) {
28
+ const content = fs.readFileSync(path.join(pkgRoot, file), "utf-8");
29
+ if (content.includes("require(") || content.includes("module.exports")) {
30
+ cjsFiles.push(file);
31
+ }
32
+ }
33
+
34
+ expect(cjsFiles).toEqual(expect.arrayContaining([]));
35
+ expect(cjsFiles).toHaveLength(0);
36
+ if (cjsFiles.length > 0) {
37
+ throw new Error(
38
+ `These files use CommonJS syntax but will be treated as ESM because ` +
39
+ `package.json has "type": "module". Rename them to .cjs:\n` +
40
+ cjsFiles.map((f) => ` - ${f}`).join("\n"),
41
+ );
42
+ }
43
+ });
44
+ });
package/src/types/css.ts CHANGED
@@ -1,4 +1,4 @@
1
- // autogenerated (see postcss.config.js) - do not edit
1
+ // autogenerated (see postcss.config.cjs) - do not edit
2
2
  import { CSSProperties } from "react";
3
3
 
4
4
  export interface CopilotKitCSSProperties extends CSSProperties {
package/tsdown.config.ts CHANGED
@@ -18,6 +18,7 @@ export default defineConfig([
18
18
  customExports: (exports) => ({
19
19
  ...exports,
20
20
  "./styles.css": "./dist/index.css",
21
+ "./v2/styles.css": "./dist/v2/index.css",
21
22
  }),
22
23
  },
23
24
  },
File without changes