Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"ui": "@/registry/bases/radix/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "default",
"menuAccent": "subtle",
"registries": {
"@diceui": "https://diceui.com/r/{name}.json"
"@diceui": "https://diceui.com/r/{style}/{name}.json"
}
}
16 changes: 16 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@ import type { NextConfig } from "next";
*/
// Import environment validation synchronously
import "./src/env.js";
import { DEFAULT_STYLE_ID, getStyleIds } from "./src/registry/styles";

const nextConfig: NextConfig = {
cacheComponents: true,
async rewrites() {
return [
// Published style ids resolve to their static directory.
{
source: `/r/:style(${getStyleIds().join("|")})/:name.json`,
destination: "/r/styles/:style/:name.json",
},
// Bases we don't author (`aria-*`) and legacy v3 ids fall back to the
// default rather than 404ing on an otherwise valid install.
{
source: "/r/:style/:name.json",
destination: `/r/styles/${DEFAULT_STYLE_ID}/:name.json`,
Comment thread
sadmann7 marked this conversation as resolved.
},
];
},
// Already doing typechecking as separate task in CI
typescript: { ignoreBuildErrors: true },
experimental: {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"typecheck": "tsc --noEmit",
"check": "oxlint . && oxfmt --check && tsc --noEmit",
"shadcn": "pnpm dlx shadcn@latest",
"build:registry": "shadcn build",
"build:registry": "tsx scripts/build-registry.ts",
"clean:registry": "tsx scripts/clean-registry.ts",
"db:start": "docker compose up -d",
"db:stop": "docker compose down",
"db:generate": "dotenv drizzle-kit generate",
Expand All @@ -34,6 +35,8 @@
"db:studio": "dotenv drizzle-kit studio"
},
"dependencies": {
"@base-ui/react": "^1.8.0",
"@base-ui/utils": "^0.4.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
Expand Down
Loading
Loading