@copilotkit/react-ui 1.52.0-next.8 → 1.52.1-next.0

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,5 +1,40 @@
1
1
  # ui
2
2
 
3
+ ## 1.52.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - bbdf67d: fix(css): address imcompat with CJS
8
+ - @copilotkit/react-core@1.52.1-next.0
9
+ - @copilotkit/runtime-client-gql@1.52.1-next.0
10
+ - @copilotkit/shared@1.52.1-next.0
11
+
12
+ ## 1.52.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 6dd6c84: Adding new v2 features:
17
+ - useComponent
18
+ - useRenderTool
19
+ - useDefaultRenderTool
20
+
21
+ Also, fixing issues with styles not being
22
+ properly scoped for tailwind.
23
+
24
+ ### Patch Changes
25
+
26
+ - 7e32e69: chore: fix up style generation
27
+ - 5f941db: Prevent CPK styles from leaking into user app
28
+ - Updated dependencies [6dd6c84]
29
+ - Updated dependencies [d77f347]
30
+ - Updated dependencies [2007f8b]
31
+ - Updated dependencies [ef0f539]
32
+ - Updated dependencies [412965a]
33
+ - Updated dependencies [5f941db]
34
+ - @copilotkit/react-core@1.52.0
35
+ - @copilotkit/shared@1.52.0
36
+ - @copilotkit/runtime-client-gql@1.52.0
37
+
3
38
  ## 1.52.0-next.8
4
39
 
5
40
  ### Patch Changes
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "type": "module",
13
- "version": "1.52.0-next.8",
13
+ "version": "1.52.1-next.0",
14
14
  "sideEffects": [
15
15
  "**/*.css"
16
16
  ],
@@ -42,9 +42,9 @@
42
42
  "vitest": "^3.2.4",
43
43
  "tsdown": "^0.20.3",
44
44
  "typescript": "^5.2.3",
45
- "eslint-config-custom": "1.4.8",
46
- "tailwind-config": "1.4.8",
47
- "tsconfig": "1.4.8"
45
+ "eslint-config-custom": "1.4.9",
46
+ "tailwind-config": "1.4.9",
47
+ "tsconfig": "1.4.9"
48
48
  },
49
49
  "dependencies": {
50
50
  "@headlessui/react": "^2.2.9",
@@ -53,9 +53,9 @@
53
53
  "rehype-raw": "^7.0.0",
54
54
  "remark-gfm": "^4.0.1",
55
55
  "remark-math": "^6.0.0",
56
- "@copilotkit/react-core": "1.52.0-next.8",
57
- "@copilotkit/runtime-client-gql": "1.52.0-next.8",
58
- "@copilotkit/shared": "1.52.0-next.8"
56
+ "@copilotkit/react-core": "1.52.1-next.0",
57
+ "@copilotkit/runtime-client-gql": "1.52.1-next.0",
58
+ "@copilotkit/shared": "1.52.1-next.0"
59
59
  },
60
60
  "keywords": [
61
61
  "copilotkit",
@@ -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 {
File without changes