@copilotkit/react-ui 1.54.1-next.6 → 1.55.0-next.7

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 CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "type": "module",
13
- "version": "1.54.1-next.6",
13
+ "version": "1.55.0-next.7",
14
14
  "sideEffects": [
15
15
  "**/*.css"
16
16
  ],
@@ -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.54.1-next.6",
57
- "@copilotkit/runtime-client-gql": "1.54.1-next.6",
58
- "@copilotkit/shared": "1.54.1-next.6"
56
+ "@copilotkit/react-core": "1.55.0-next.7",
57
+ "@copilotkit/runtime-client-gql": "1.55.0-next.7",
58
+ "@copilotkit/shared": "1.55.0-next.7"
59
59
  },
60
60
  "keywords": [
61
61
  "copilotkit",
@@ -1,4 +1,4 @@
1
- import { FC, memo } from "react";
1
+ import { FC, memo, useMemo } from "react";
2
2
  import ReactMarkdown, { Options, Components } from "react-markdown";
3
3
  import { CodeBlock } from "./CodeBlock";
4
4
  import remarkGfm from "remark-gfm";
@@ -136,10 +136,14 @@ type MarkdownProps = {
136
136
  };
137
137
 
138
138
  export const Markdown = ({ content, components }: MarkdownProps) => {
139
+ const mergedComponents = useMemo(
140
+ () => ({ ...defaultComponents, ...components }),
141
+ [components],
142
+ );
139
143
  return (
140
144
  <div className="copilotKitMarkdown">
141
145
  <MemoizedReactMarkdown
142
- components={{ ...defaultComponents, ...components }}
146
+ components={mergedComponents}
143
147
  remarkPlugins={[
144
148
  remarkGfm,
145
149
  [remarkMath, { singleDollarTextMath: false }],
@@ -3,8 +3,10 @@ import { useDarkMode } from "../../hooks/use-dark-mode";
3
3
 
4
4
  export function PoweredByTag({
5
5
  showPoweredBy = true,
6
+ removeBranding = false,
6
7
  }: {
7
8
  showPoweredBy?: boolean;
9
+ removeBranding?: boolean;
8
10
  }) {
9
11
  const [mounted, setMounted] = useState(false);
10
12
  const isDark = useDarkMode();
@@ -21,7 +23,7 @@ export function PoweredByTag({
21
23
  setMounted(true);
22
24
  }, []);
23
25
 
24
- if (!showPoweredBy) {
26
+ if (!showPoweredBy || removeBranding) {
25
27
  return null;
26
28
  }
27
29
 
package/tsconfig.json CHANGED
@@ -5,8 +5,8 @@
5
5
  "dist",
6
6
  "build",
7
7
  "node_modules",
8
- "**/*.test.ts", // Exclude TypeScript test files
9
- "**/*.test.tsx", // Exclude TypeScript React test files
10
- "**/__tests__/*" // Exclude any files inside a __tests__ directory
8
+ "**/*.test.ts",
9
+ "**/*.test.tsx",
10
+ "**/__tests__/*"
11
11
  ]
12
12
  }
package/tsdown.config.ts CHANGED
@@ -11,8 +11,8 @@ export default defineConfig([
11
11
  external: [
12
12
  "react",
13
13
  "react-dom",
14
- "@copilotkitnext/core",
15
- "@copilotkitnext/react",
14
+ "@copilotkit/core",
15
+ "@copilotkit/react-core/v2",
16
16
  ],
17
17
  exports: {
18
18
  customExports: (exports) => ({