feat: color engine and core style system refactor#147
Merged
Conversation
Phase 1 of the refactor plan: - Add `ComponentGroup` type to registry types (buttons, inputs, selections, overlays, feedback, navigation, data-display, date-time, color, forms, layout) - Add `group` field to all 60 component meta.ts files - Create `scripts/build-registry.ts` to generate variants.ts from meta files - Generate `packages/core/src/__registry__/variants.ts` with VARIANTS and VARIANT_GROUPS constants (only components with 2+ variants) - Add `build:registry` and `dev:registry` scripts to root package.json - Add CI check to ensure generated files stay in sync 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Update tsx to ^4.21.0 in all packages (was ^4.19.2) - Update zod to ^4.1.13 in all packages (was ^4.0.5) - Resolves workspace dependency version conflicts
Phase 2 of the refactor plan: - Add Zod schemas for style configuration: - colorsConfigSchema (re-export from @dotui/colors) - typographyConfigSchema, effectsConfigSchema - iconsConfigSchema (uses __registry__/icons.ts as source of truth) - variantsConfigSchema (generated from __registry__/variants.ts) - themeConfigSchema, styleConfigSchema - Add style providers: - StyleProvider - main provider wrapping theme + variants - ThemeProvider - provides theme config and generated theme - VariantsProvider - provides variant selection with useVariant() hook - Add createDynamicComponent factory: - Suspense support with DisableSuspense context for React Aria - ErrorBoundary for graceful error handling - Skeleton fallback during lazy loading - Update package.json exports for new structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 of the refactor plan: - Update createDynamicComponent signature to accept `Props extends object` and optional variant type parameter `V extends string` - Update import paths in all 57 components from `@dotui/core/utils/...` to `@dotui/core/components/...` - Update build-registry.ts to include all components (not just 2+ variants) - Regenerate variants.ts with all 59 components Type safety maintained: variant components must match DefaultComponent props. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 4 of the refactor plan: - Update style table: theme/icons/variants columns → single `config` column - Add `isPreset` column for admin-managed presets - Simplify typography: heading/body/mono → single `font` field - Update db package to use @dotui/core for schemas - Update tRPC router to use new updateStyleConfigSchema - Update seed files with new StyleConfig structure - Add CI check for database migrations sync - Add db-migrate workflow for production deployments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Port @dotui/transformers to core/shadcn/transforms/ - types.ts, pipeline.ts, icons.ts, imports.ts - Port @dotui/shadcn-adapter to core/shadcn/ - generators: base.ts, all.ts, item.ts, registry.ts, theme.ts - transform.ts with transformItemJson, updateFiles, etc. - Import from internal __registry__ instead of @dotui/registry - Eliminates cyclic dependency between core and registry - Create __registry__/index.ts with combined registry export - Create registry/src/index.ts for backwards compatibility - Add shadcn export to core package.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete packages/shadcn-adapter (now in @dotui/core/shadcn) - Delete packages/transformers (now in @dotui/core/shadcn/transforms) - Add core/src/types.ts with runtime types (Style, Variants, etc.) - Update www to import from @dotui/core/shadcn - Remove tsconfig path alias for style-system in core - Update changeset config to remove deleted packages Note: www typecheck failing - needs updates for new DB schema (style.config.* instead of style.theme/icons/variants) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add registry/src/providers.tsx (re-exports from style-system) - Add registry/src/constants.ts (DEFAULT_STYLE, DEFAULT_THEME) - Update use-update-style-mutation.ts to use config wrapper - Update use-create-style.ts to use config wrapper Note: www still has type errors - style-editor needs full refactor for new StyleConfig schema (colors algorithm change) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename _style-editor to style-editor (remove underscore prefix) - Fix HSL color format for @react-stately/color (requires commas) - Remove typescript.ignoreBuildErrors from next.config.mjs Build and typecheck now pass with style-editor included. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use @dotui/core/__registry__/variants instead of relative import to fix module resolution on Vercel. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add build script to core package - Extend internal-package.json for declaration output - Revert to relative imports in schemas/variants.ts This ensures core builds before db in turbo, fixing Vercel builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add @dotui/core/* path to core, registry, db, api, and www tsconfigs - Enable absolute imports across packages following cal.com/midday pattern - Each package can now import from @dotui/core/* with proper resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ports - Update all relative parent imports (../) to use @dotui/core/* absolute paths - Improves code clarity and enables proper cross-package resolution - Follows monorepo best practices from cal.com/midday 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove build: "tsc" from core, db, and api packages - These packages don't need to emit declarations - Fixes cross-package resolution issues during build 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Merge 3 separate scripts into packages/registry/scripts/build.ts - Generates all registry data in one pass: - registry/__generated__/ (blocks, demos, icons) - core/__registry__/ (base, hooks, lib, ui, icons, blocks, variants, index) - Delete old scripts: - packages/registry/scripts/build-internal-registry.ts - packages/registry/scripts/build-registry.ts - scripts/build-registry.ts - Update package.json build commands - Fixes issue where rimraf deleted variants.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Regenerate all core/__registry__/ files - Regenerate registry/__generated__/icons.tsx - Comment updated to reference new build.ts location 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes CI typecheck failure - auth needs to resolve core's internal imports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- zod 4.1.13 → 4.2.1 - react-hook-form 7.68.0 → 7.69.0 - Fixes Turbopack build error: Can't resolve 'zod/v4/core' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…react - Update package from hugeicons-react@0.3.0 to @hugeicons/react@0.4.1 - Fix renamed icons in the new package: - TextCheckIcon → ClosedCaptionIcon - Shield01Icon → SecurityIcon - Activity01Icon → Cardiogram01Icon - TableIcon → Table01Icon - Regenerate registry files with updated imports - Also includes react-hook-form update to 7.69.0 from previous fix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dotui/colors to handle theme generation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@dotui/colorspackage (color engine)