Files
tweakcn/package.json
T
Sahaj Jain 2548f49de1 ai chat (#107)
* Enhanced Editor (#100)

* refactor: editor page to improve responsiveness

* feat: add editor tab persistance to url

* chore: clean up classNames

* feat: enhance theme color-preview to make it responsive

* feat: add ai chat tab working with local state

* successful responses return a theme color-preview
* error responses return a generic message

* fix: invalid tabs fallback to default tab "colors"

* fix: remove messages scroll animation on tabs change and remove duplicate preview

* fix: minor fixes in classNames

* feat: Chat starts with a default message

* refactor: Enhance editor controls and toolbar buttons to disable when generating theme

- Updated button components to be extendible.
- Refactored buttons to utilize TooltipWrapper for consistent tooltip behavior.

* fix: sync controls tabs by 'value' instead of 'defaultValue'

* fix: load messages from local storage, otherwise set a default initial message

* fix: editor mention list positions correctly and add a tab handler for selecting mention

* fix: build errors due to unused imports

* chore: improve defaults and styles for ai chat interface and editor

* refactor: move AIChat state management to a zustand store

* feat: preserve control tab between edit mode and traditional editor mode

* feat: reset ai chat on editor reset button click

* feat: load chat messages dynamically to avoid layout shifts due to local storage

* fix: Use const id for default ai message to avoid re-render

* fix: Use searchParams for callback url as well after auth

* refactor: Remove unused getEditorConfig code

* feat: Only have 1 handler per postlogin action type

This was causing issues in AI Chat form. AI_GENERATE_FROM_CHAT action
was being scheduled twice because of re-render (caused by lazy-loaded
component)

* fix: Add user message for post login action

* refactor: Only use JSONContent in application state (derive textContent from it)

* feat: Auto-attach current theme to prompt after 1st user message

* feat: clean up AI interface and add community themes section

* feat: AI entrypoint redirect to main Editor and trigger theme generation

* chore: improve styles on ai page

* refactor: clean up AI components components from AI page and Editor page

* refactor: share repeated theme generation logic

* fix: chat messages inconsistent padding and pill buttons disabled state

* fix: build error

* feat: remove AI Generation Dialog and related logic

* feat: show agent response about the theme

* refactor: simplify theme generation logic and improve error handling

* refactor: transition from JSONContent to AIPromptData for theme generation

* feat: add retry functionality for user messages in AI chat interface

* refactor: remove unused loading fallback component and integrate loading indicator in chat messages

* change position of retry button

* feat: Improve system prompt

* refactor: replace createCurrentThemePrompt with attachCurrentThemeMention for improved prompt handling

* feat: add a placeholder for new chat and fix chat area styles

* chore: hide Community themes from AI page

* fix: build errors

* fix: ai theme generation only happens when there is content to be sent as the prompt

* feat: show AI tab in production

* fix: Early return after showing error message in ai chat

* feat: Attach last generated message instead of current theme for chat

* Use @ mentions in example prompts

* Enhance mention rendering in AI prompts and update mention styles in CSS

* skip posthog on dev

* Enhanced Editor (#100)

* refactor: editor page to improve responsiveness

* feat: add editor tab persistance to url

* chore: clean up classNames

* feat: enhance theme color-preview to make it responsive

* feat: add ai chat tab working with local state

* successful responses return a theme color-preview
* error responses return a generic message

* fix: invalid tabs fallback to default tab "colors"

* fix: remove messages scroll animation on tabs change and remove duplicate preview

* fix: minor fixes in classNames

* feat: Chat starts with a default message

* refactor: Enhance editor controls and toolbar buttons to disable when generating theme

- Updated button components to be extendible.
- Refactored buttons to utilize TooltipWrapper for consistent tooltip behavior.

* fix: sync controls tabs by 'value' instead of 'defaultValue'

* fix: load messages from local storage, otherwise set a default initial message

* fix: editor mention list positions correctly and add a tab handler for selecting mention

* fix: build errors due to unused imports

* chore: improve defaults and styles for ai chat interface and editor

* refactor: move AIChat state management to a zustand store

* feat: preserve control tab between edit mode and traditional editor mode

* feat: reset ai chat on editor reset button click

* feat: load chat messages dynamically to avoid layout shifts due to local storage

* fix: Use const id for default ai message to avoid re-render

* fix: Use searchParams for callback url as well after auth

* refactor: Remove unused getEditorConfig code

* feat: Only have 1 handler per postlogin action type

This was causing issues in AI Chat form. AI_GENERATE_FROM_CHAT action
was being scheduled twice because of re-render (caused by lazy-loaded
component)

* fix: Add user message for post login action

* refactor: Only use JSONContent in application state (derive textContent from it)

* feat: Auto-attach current theme to prompt after 1st user message

* feat: clean up AI interface and add community themes section

* feat: AI entrypoint redirect to main Editor and trigger theme generation

* chore: improve styles on ai page

* refactor: clean up AI components components from AI page and Editor page

* refactor: share repeated theme generation logic

* fix: chat messages inconsistent padding and pill buttons disabled state

* fix: build error

* feat: remove AI Generation Dialog and related logic

* feat: show agent response about the theme

* refactor: simplify theme generation logic and improve error handling

* refactor: transition from JSONContent to AIPromptData for theme generation

* feat: add retry functionality for user messages in AI chat interface

* refactor: remove unused loading fallback component and integrate loading indicator in chat messages

* change position of retry button

* feat: Improve system prompt

* refactor: replace createCurrentThemePrompt with attachCurrentThemeMention for improved prompt handling

* feat: add a placeholder for new chat and fix chat area styles

* chore: hide Community themes from AI page

* fix: build errors

* fix: ai theme generation only happens when there is content to be sent as the prompt

* feat: show AI tab in production

* fix: Early return after showing error message in ai chat

* feat: Attach last generated message instead of current theme for chat

* Use @ mentions in example prompts

* Enhance mention rendering in AI prompts and update mention styles in CSS

* fix: missing fade effect on chat messages scroll area and overflow in placeholder buttons

* feat: add user name from session to the chat placeholder component

* feat: Improve system prompt context

* chore: remove unnecessary context from example prompts

* feat: Enhance mention list with auto-scroll functionality and update prompt structures in no-messages placeholder

* feat: Add character limit for AI prompt input and integrate character count extension

* fix: Simplify prompt data handling in AI chat component and adjust textarea behavior during AI generation

* fix: Update theme state handling to include current mode in editor store

* chore: improve styles for consistency

* feat: add fun prompts to chat placeholder

* feat: add typography demo to preview panel

* feat: add responsive cards demo based on shadcn showcase

* fix: typography demo scroll area

* fix: build errors due to components refactor

* fix: wrap typography demo in ExamplesPreviewContainer

* feat: change default theme to match shadcn/ui default

* chore: move some theme previews into a dropdown to keep ui clean

---------

Co-authored-by: Luis Llanes <137589205+llanesluis@users.noreply.github.com>
Co-authored-by: Luis Llanes <luisllaboj@gmail.com>
2025-05-31 20:08:53 +05:30

122 lines
3.8 KiB
JSON

{
"name": "tweakcn-next",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "npm run generate-theme-registry && next build",
"start": "next start",
"lint": "next lint",
"generate-theme-registry": "tsx scripts/generate-theme-registry.ts && tsx scripts/generate-registry.ts"
},
"dependencies": {
"@ai-sdk/google": "^1.2.14",
"@ai-sdk/groq": "^1.2.8",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@google/generative-ai": "^0.24.1",
"@hookform/resolvers": "^5.0.1",
"@lexical/react": "^0.31.0",
"@neondatabase/serverless": "^1.0.0",
"@radix-ui/react-accordion": "^1.2.7",
"@radix-ui/react-alert-dialog": "^1.1.10",
"@radix-ui/react-aspect-ratio": "^1.1.4",
"@radix-ui/react-avatar": "^1.1.6",
"@radix-ui/react-checkbox": "^1.2.2",
"@radix-ui/react-collapsible": "^1.1.7",
"@radix-ui/react-context-menu": "^2.2.10",
"@radix-ui/react-dialog": "^1.1.10",
"@radix-ui/react-dropdown-menu": "^2.1.10",
"@radix-ui/react-hover-card": "^1.1.10",
"@radix-ui/react-label": "^2.1.4",
"@radix-ui/react-menubar": "^1.1.10",
"@radix-ui/react-navigation-menu": "^1.2.9",
"@radix-ui/react-popover": "^1.1.10",
"@radix-ui/react-progress": "^1.1.4",
"@radix-ui/react-radio-group": "^1.3.2",
"@radix-ui/react-scroll-area": "^1.2.5",
"@radix-ui/react-select": "^2.2.2",
"@radix-ui/react-separator": "^1.1.4",
"@radix-ui/react-slider": "^1.3.2",
"@radix-ui/react-slot": "^1.2.0",
"@radix-ui/react-switch": "^1.2.2",
"@radix-ui/react-tabs": "^1.1.7",
"@radix-ui/react-toast": "^1.2.10",
"@radix-ui/react-toggle": "^1.1.6",
"@radix-ui/react-toggle-group": "^1.1.6",
"@radix-ui/react-tooltip": "^1.2.3",
"@tanstack/react-table": "^8.21.3",
"@tiptap/extension-character-count": "^2.12.0",
"@tiptap/extension-mention": "^2.11.9",
"@tiptap/extension-placeholder": "^2.11.9",
"@tiptap/react": "^2.11.9",
"@tiptap/starter-kit": "^2.11.9",
"@tiptap/suggestion": "^2.11.9",
"@upstash/ratelimit": "^2.0.5",
"@vercel/kv": "^3.0.0",
"@vercel/og": "^0.6.8",
"ai": "^4.3.13",
"ai-fallback": "^0.1.3",
"better-auth": "^1.2.7",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cuid": "^3.0.0",
"culori": "^4.0.1",
"date-fns": "^4.1.0",
"dotenv": "^16.5.0",
"drizzle-orm": "^0.42.0",
"embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
"isbot": "^5.1.26",
"lexical": "^0.31.0",
"lucide-react": "^0.488.0",
"motion": "^12.7.3",
"next": "15.3.0",
"next-themes": "^0.4.6",
"nuqs": "^2.4.3",
"openai": "^4.96.2",
"posthog-js": "^1.236.1",
"react": "^19.0.0",
"react-day-picker": "^9.6.7",
"react-dom": "^19.0.0",
"react-hook-form": "^7.55.0",
"react-resizable-panels": "^2.1.7",
"recharts": "^2.15.2",
"screenfull": "^6.0.2",
"shadcn": "^2.5.0",
"sonner": "^2.0.3",
"swr": "^2.3.3",
"tailwind-merge": "^3.2.0",
"tippy.js": "^6.3.7",
"use-scramble": "^2.2.15",
"vaul": "^1.1.2",
"zod": "^3.24.2",
"zustand": "^5.0.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@ngard/tiny-isequal": "^1.1.0",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/postcss": "^4",
"@types/culori": "^2.1.1",
"@types/next": "^9.0.0",
"@types/node": "^20",
"@types/pg": "^8.11.13",
"@types/react": "^19",
"@types/react-dom": "^19",
"drizzle-kit": "^0.31.0",
"eslint": "^9",
"eslint-config-next": "15.3.0",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"raw-loader": "^4.0.2",
"tailwindcss": "^4",
"tsx": "^4.19.3",
"tw-animate-css": "^1.2.5",
"typescript": "^5"
}
}