Commit Graph

303 Commits

Author SHA1 Message Date
Hayden Bleasel 82b1c6068b Version 1.7.0 ai-elements@1.7.0 2026-01-16 14:17:22 -08:00
Hayden Bleasel ef0a8a72ee Voice (#317)
* New voice folder

* Draft Audio Player component

* Add support for AI SDK speech result

* Draft Mic Selector component

* Extract PromptInputSpeechButton to SpeechInput

* Update speech-input.mdx

* Add new unit tests

* Merge groups

* Fix tests

* Improve test coverage

* Run Ultracite

* Update mic-selector.tsx

* Draft Voice Selector

* Scaffold Persona

* Update persona.tsx

* Redesign speech input as record button

* Scaffold Transcription component

* Fix unit tests

* Propagate changes from #233

* Resolves #242

* Update mic-selector.tsx

* Update preview.tsx

* Attempt to overwrite color

* Fix persona bugs

* Remove Pal

* Update persona.test.tsx

* Resolves #210

* Fix non-model instances

* Rename orb to opal, change default

* Performance improvements

* Update pnpm-lock.yaml

* Fix navbar tracking

* Minor fixes

* Update registry mcp server

* Add changesets

* Update persona.test.tsx
2026-01-14 07:26:36 -08:00
Haitian f0625b5ef3 fix(mcp): use zod/v3 for compatibility with mcp-handler (#290)
The mcp-handler package internally depends on @modelcontextprotocol/sdk@1.22.0,
which uses zod-to-json-schema that is incompatible with Zod 4. This caused
the `component` parameter in `get_ai_elements_component` tool to not be
exposed in the inputSchema (empty properties object).

Changes:
- Import zod from "zod/v3" instead of "zod" for backward compatibility
- Replace z.enum() with z.string().describe() for better schema generation
- Improve error message to list available components when not found

Co-authored-by: liuhaitian <liuhaitian@bytedance.com>
2025-12-18 17:33:54 -08:00
Tobias Büschel b4798cd099 docs: correct license information in CONTRIBUTING.md (#292)
Resolves #289
2025-12-18 17:32:59 -08:00
Hayden Bleasel 983238d9b7 Setup trusted publishing 2025-12-11 22:12:06 -08:00
vercel[bot] fbc9844dfd Fix React Server Components CVE vulnerabilities (#288)
Updated dependencies to fix Next.js and React CVE vulnerabilities.

The fix-react2shell-next tool automatically updated the following packages to their secure versions:
- next
- react-server-dom-webpack
- react-server-dom-parcel  
- react-server-dom-turbopack

All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2025-12-11 20:39:32 -08:00
vercel[bot] 28a1233654 Fix React Server Components CVE vulnerabilities (#287)
Updated dependencies to fix Next.js and React CVE vulnerabilities.

The fix-react2shell-next tool automatically updated the following packages to their secure versions:
- next
- react-server-dom-webpack
- react-server-dom-parcel  
- react-server-dom-turbopack

All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2025-12-11 14:14:27 -08:00
Hayden Bleasel 39882426d7 Update message.mdx 2025-12-09 12:25:45 -08:00
Francisco Moretti d1a79c0af3 add scroll behavior to code block (#283)
Long lines of codes were hidden before
2025-12-08 14:56:20 -08:00
Hayden Bleasel ae3af00fb5 Update chain-of-thought.tsx 2025-12-08 09:16:18 -08:00
Hayden Bleasel 99088be120 Add unit tests for #279 2025-12-07 23:51:30 -08:00
dependabot[bot] f2e4172a58 Bump ai from 5.0.89 to 5.0.104 (#263)
Bumps [ai](https://github.com/vercel/ai) from 5.0.89 to 5.0.104.
- [Release notes](https://github.com/vercel/ai/releases)
- [Changelog](https://github.com/vercel/ai/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vercel/ai/compare/ai@5.0.89...ai@5.0.104)

---
updated-dependencies:
- dependency-name: ai
  dependency-version: 5.0.104
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:34:32 -08:00
dependabot[bot] 13475932eb Bump playwright from 1.56.1 to 1.57.0 (#267)
Bumps [playwright](https://github.com/microsoft/playwright) from 1.56.1 to 1.57.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.56.1...v1.57.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.57.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:34:25 -08:00
dependabot[bot] 532d690f96 Bump @vitejs/plugin-react from 5.1.0 to 5.1.1 (#264)
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.1.1/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 5.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:32:26 -08:00
dependabot[bot] f83b1b2968 Bump react-hook-form from 7.66.0 to 7.67.0 (#265)
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.66.0 to 7.67.0.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.66.0...v7.67.0)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-version: 7.67.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:32:19 -08:00
dependabot[bot] 79930cdd23 Bump react-day-picker from 9.11.1 to 9.11.3 (#266)
Bumps [react-day-picker](https://github.com/gpbl/react-day-picker) from 9.11.1 to 9.11.3.
- [Release notes](https://github.com/gpbl/react-day-picker/releases)
- [Changelog](https://github.com/gpbl/react-day-picker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gpbl/react-day-picker/compare/v9.11.1...v9.11.3)

---
updated-dependencies:
- dependency-name: react-day-picker
  dependency-version: 9.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:32:11 -08:00
dependabot[bot] 2b7ce212f7 Bump @vitest/coverage-v8 from 4.0.7 to 4.0.14 (#268)
Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 4.0.7 to 4.0.14.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.14/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.0.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:32:01 -08:00
dependabot[bot] f6c8103f30 Bump streamdown from 1.4.0 to 1.6.9 (#269)
Bumps [streamdown](https://github.com/vercel/streamdown/tree/HEAD/packages/streamdown) from 1.4.0 to 1.6.9.
- [Release notes](https://github.com/vercel/streamdown/releases)
- [Changelog](https://github.com/vercel/streamdown/blob/main/packages/streamdown/CHANGELOG.md)
- [Commits](https://github.com/vercel/streamdown/commits/streamdown@1.6.9/packages/streamdown)

---
updated-dependencies:
- dependency-name: streamdown
  dependency-version: 1.6.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:31:55 -08:00
dependabot[bot] 022f1aa90d Bump react-player from 3.3.3 to 3.4.0 (#271)
Bumps [react-player](https://github.com/cookpete/react-player) from 3.3.3 to 3.4.0.
- [Release notes](https://github.com/cookpete/react-player/releases)
- [Changelog](https://github.com/cookpete/react-player/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cookpete/react-player/compare/v3.3.3...v3.4.0)

---
updated-dependencies:
- dependency-name: react-player
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:31:48 -08:00
dependabot[bot] bcff656ef3 Bump actions/checkout from 5 to 6 (#273)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 22:31:41 -08:00
Obada Khalili e1edb1b037 MessageContent max width should respect parent's (#274)
* MessageContent max width should respect parent's

* Create silver-poems-doubt.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:30:25 -08:00
Obada Khalili 16a9966732 Wrap items CoT search results component (#278)
* wrap items CoT search results component

* Create two-bats-yawn.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:29:00 -08:00
Obada Khalili b37a002890 Handle non image file types in matchesAccept filter (#279)
* handle non image file types in matchesAccept filter

* Create small-deer-tan.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-07 22:28:03 -08:00
Hayden Bleasel 5fb2978a8a Create chatty-mugs-eat.md 2025-12-07 22:26:21 -08:00
Obada Khalili 387e873fab prevent duplicate attachments when dropping in form and globalDrop is enabled (#280) 2025-12-07 22:26:00 -08:00
Hayden Bleasel 9e6d119f27 Update home-links.tsx 2025-12-04 21:14:00 -08:00
vercel[bot] 20931998b4 Update dependencies for React Flight RCE advisory (#276)
# React Flight / Next.js RCE Advisory Fix

## Summary
Successfully upgraded Next.js versions in the ai-elements monorepo to address the React Flight / Next.js RCE advisory (CVE-2024-XXX).

## Changes Made

### Affected Packages Identified
The project uses Next.js 16.0.1 in two applications:
- `apps/docs/package.json` - Documentation site
- `apps/registry/package.json` - Component registry site

The project does NOT use any vulnerable React Flight packages directly:
- No `react-server-dom-webpack` dependency
- No `react-server-dom-parcel` dependency
- No `react-server-dom-turbopack` dependency

### Upgrades Applied
Following the advisory guidelines for Next.js 16.x → 16.0.7:

**Modified Files:**
1. `apps/docs/package.json`
   - Updated: `"next": "16.0.1"` → `"next": "16.0.7"`

2. `apps/registry/package.json`
   - Updated: `"next": "16.0.1"` → `"next": "16.0.7"`

3. `pnpm-lock.yaml`
   - Updated lockfile to reflect new Next.js versions and their dependencies

### React Versions
React and react-dom were NOT manually modified, as per the advisory instructions. Next.js 16.0.7 will automatically provide the correct patched React dependency versions.

Current React versions in use:
- `react@19.2.0` and `react-dom@19.2.0` in most packages
- Next.js manages its own React dependencies internally

## Verification

### Dependency Installation
✓ Successfully ran `pnpm install` to update lockfile and install patched versions
✓ All 1168 packages installed successfully
✓ No dependency conflicts detected

### Build Verification
✓ `apps/docs` - Build successful with Next.js 16.0.7
  - 121 pages generated successfully
  - TypeScript compilation passed
  - No runtime errors

✓ `apps/registry` - Build successful with Next.js 16.0.7
  - 2 pages generated successfully
  - TypeScript compilation passed
  - No runtime errors

## Implementation Notes

- This is a monorepo using pnpm as the package manager
- No breaking changes introduced by the Next.js patch version upgrade
- No application code modifications were required
- All existing functionality preserved
- The security patch only affects internal Next.js server component handling

## Advisory Compliance

✓ Detected Next.js usage in the project
✓ Upgraded to patched version for 16.x minor (16.0.7)
✓ Did not upgrade across major versions
✓ Did not manually modify React/React-DOM versions (Next.js handles this)
✓ Updated lockfile and reinstalled dependencies
✓ Verified builds successfully complete

The repository is now protected against the React Flight / Next.js RCE vulnerability.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-04 21:05:20 -08:00
vercel[bot] f524f7e7b7 Update repo for React Flight RCE advisory (#277)
## React Flight / Next.js RCE Advisory Security Update

Successfully updated the ai-elements monorepo to address the React Flight / Next.js RCE advisory (CVE-2025-XXXXX).

### Summary of Changes

The project was found to be affected by the vulnerability. Two Next.js applications were using vulnerable versions and have been patched.

### Affected Packages Detected

- **apps/docs**: Next.js 16.0.1 → 16.0.7
- **apps/registry**: Next.js 16.0.1 → 16.0.7

Both applications were running Next.js 16.0.1, which is vulnerable to the RCE advisory. According to the security guidance, Next.js 16.x projects must be upgraded to 16.0.7.

### Not Affected

The project does NOT use any of the following vulnerable React Flight packages:
- react-server-dom-webpack
- react-server-dom-parcel
- react-server-dom-turbopack

Other workspace packages (elements, examples, shadcn-ui, cli, typescript-config) do not use Next.js and were not affected.

### Files Modified

1. **apps/docs/package.json** - Updated Next.js from 16.0.1 to 16.0.7
2. **apps/registry/package.json** - Updated Next.js from 16.0.1 to 16.0.7
3. **pnpm-lock.yaml** - Updated lockfile to reflect new Next.js versions
4. **apps/docs/next-env.d.ts** - Auto-generated type definitions updated by Next.js 16.0.7

### Implementation Details

- Used pnpm package manager to install dependencies and update lockfile
- Did NOT manually update React or React-DOM versions (Next.js manages these automatically)
- Followed the advisory guideline: "For Next.js 16.x → set to 16.0.7"
- Did NOT upgrade across major versions (stayed within Next.js 16.x)

### Verification

Both Next.js applications were successfully built with the patched version:
-  `apps/registry` - Build passed (Next.js 16.0.7 with Turbopack)
-  `apps/docs` - Build passed (Next.js 16.0.7 with Turbopack)

All TypeScript compilation and static page generation completed without errors.

### Security Impact

This update patches the React Flight / Next.js RCE vulnerability in both Next.js applications within the monorepo. The patched version 16.0.7 includes critical security fixes that prevent remote code execution attacks.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-12-04 21:04:02 -08:00
Hayden Bleasel 61838a469b Upgrade Next.js and React 2025-12-04 20:59:31 -08:00
Hayden Bleasel 347ce99b8d Update index.tsx 2025-11-28 23:47:50 -08:00
Hayden Bleasel 0fbdc6a244 241 multiple issues in prompt inputtsx drag and drop memoization cleanup error handling (#260)
* Fix issue 1

* Fix issue 2

* Fix issue 3

* Fix issue 4

* Create wacky-coins-peel.md

* Fix typos
2025-11-26 12:20:33 -08:00
Hayden Bleasel d60d684b4c Fix typo 2025-11-26 11:45:05 -08:00
Hayden Bleasel a5eeca40fd Resolves #254 2025-11-26 11:45:01 -08:00
Hayden Bleasel 478dcbda88 Resolves #42, resolves #252 2025-11-26 11:38:03 -08:00
Hayden Bleasel 1ab97a495c Resolves #245 2025-11-26 11:33:43 -08:00
Brendan Dash 034e5b4c2d fix: shiki dark mode (#246) 2025-11-26 11:29:52 -08:00
Felix Traxler 56ea3b96be build: expect errors for states added in ai-sdk v6 (#248)
* build: expect errors for states added in ai-sdk v6

* Create silly-shoes-pay.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:28:42 -08:00
李学明 787dfc3472 feat(reasoning): ReasoningTrigger allows custom getThinkingMessage function (#255)
* feat(reasoning): ReasoningTrigger allows custom getThinkingMessage function

* Update reasoning.mdx

* Create giant-streets-swim.md

---------

Co-authored-by: Comyn LI 李学明 <comyn.li@nio.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:25:26 -08:00
chaxus 68bc48491b fix(prompt-input): Adjust image preview hover state and alignment in input head (#256)
* fix(prompt-input): adjust image preview hover state and alignment in input head

* Create major-ants-cut.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:23:37 -08:00
chaxus a726985cb6 fix(prompt-input): Reset file input value to allow re-selecting previously removed files (#257)
* fix(prompt-input): Reset file input value to allow re-selecting previously removed files

* Create thin-suns-train.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-26 11:23:03 -08:00
Emmanuel Lucius 21a07f548a Updated Links routing to 404 (#251) 2025-11-20 15:27:56 -08:00
Will Garman 196f3d3d89 Import MessageResponse alongside Message and MessageContent from '@/components/ai-elements/message' (#249) 2025-11-19 16:56:24 -08:00
Hayden Bleasel 69204251b5 Resolves #244 2025-11-18 13:50:55 -08:00
streamdown-github-app[bot] 136f8e3f84 Version Packages (#238)
Co-authored-by: ai-elements-bot[bot] <ai-elements-bot[bot]@users.noreply.github.com>
ai-elements@1.6.3
2025-11-16 19:32:51 -08:00
Hayden Bleasel ae31076d13 Resolves #133 2025-11-16 19:25:29 -08:00
Hayden Bleasel b0d53479b1 Resolves #240 2025-11-16 19:17:09 -08:00
Hayden Bleasel bb4a036ac6 Import path fixes 2025-11-16 19:13:59 -08:00
Jan-Hendrik Koch 461eee14d3 docs: add claude code to mcp server docs and fix claude desktop location (#243) 2025-11-16 17:05:07 -08:00
Hayden Bleasel ecaa2d2082 Update search.tsx 2025-11-16 16:36:26 -08:00
Hayden Bleasel bd205aa8d5 Update search.tsx 2025-11-16 15:35:47 -08:00