chore(react-textarea): mark CopilotTextarea declarations as deprecated

The generated v1 notices tag the re-export specifiers in
`packages/react-textarea/src/index.tsx`, but the declarations themselves
carried no `@deprecated` JSDoc. Two consequences:

- Resolving `CopilotTextarea` or `CopilotTextareaProps` through the
  components barrel or at the definition gave no IDE warning.
- More importantly, the dts bundler collapses the tagged specifiers into
  a bare `export { ... }`, so the published `dist/index.d.cts` and
  `dist/index.d.mts` shipped zero `@deprecated` tags. npm consumers saw
  no deprecation at all, including through the package root.

Tag both declarations with the same text the generator emits. The
file-level generated notice is unaffected, so
`scripts/deprecations/v1-source-notices.mjs --check` stays clean and
regeneration is a no-op for this file.

Refs #6819

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Taylor
2026-09-01 17:52:14 -05:00
parent 89c9f205f8
commit aa2eb68cde
@@ -121,8 +121,17 @@ import { useMakeStandardInsertionOrEditingFunction } from "../../hooks/make-auto
import merge from "lodash.merge";
import type { AutosuggestionsConfigUserSpecified } from "../../types/autosuggestions-config/autosuggestions-config-user-specified";
// Like the base copilot textarea props,
// but with baseAutosuggestionsConfig replaced with autosuggestionsConfig.
/**
* Like the base copilot textarea props,
* but with baseAutosuggestionsConfig replaced with autosuggestionsConfig.
*
* @deprecated Since 1.68.2. The v1 SDK is deprecated. Use v2 instead.
* No 1:1 v2 replacement is available.
* Start with `@copilotkit/react-core/v2`.
* V2 docs: https://docs.copilotkit.ai/
* V2 reference docs: https://docs.copilotkit.ai/reference/v2
* Migration guide: https://docs.copilotkit.ai/migrate/v2
*/
export interface CopilotTextareaProps extends Omit<
BaseCopilotTextareaProps,
"baseAutosuggestionsConfig"
@@ -191,6 +200,13 @@ export interface CopilotTextareaProps extends Omit<
/**
* A copilot textarea that uses the standard autosuggestions function.
*
* @deprecated Since 1.68.2. The v1 SDK is deprecated. Use v2 instead.
* No 1:1 v2 replacement is available.
* Start with `@copilotkit/react-core/v2`.
* V2 docs: https://docs.copilotkit.ai/
* V2 reference docs: https://docs.copilotkit.ai/reference/v2
* Migration guide: https://docs.copilotkit.ai/migrate/v2
*/
export const CopilotTextarea = React.forwardRef(
(props: CopilotTextareaProps, ref: React.Ref<HTMLCopilotTextAreaElement>) => {