Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 11 additions & 0 deletions .changeset/react-extension-urls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"fulldev-ui": minor
---

Restore the docs at their original addresses and make React an extension of shadcn/ui.

The Astro docs are back at `/docs/`, `/components/` and `/blocks/`, with the original home page, navigation, `llms.txt` and registry docs links. The short-lived `/astro/` addresses redirect there.

The React registry at `https://ui.full.dev/r/react/styles/{style}/{name}.json` now holds only the Fulldev extras (banner, header, icon, layout, logo, marquee, price, rating, section, theme toggle, toc, typography, video) and the 82 blocks, documented at `/react/`. Set up the project with the official `npx shadcn@latest init`, then add the `@fulldev` registry. Standard components install from the official shadcn/ui registry as plain registry dependencies, so an extra never replaces them. The React `base`, `init` and `form` items, the copies of the standard shadcn/ui components and hooks, and the `<component>-examples` items are removed from the React registry. React `Sidebar1` no longer takes `labels.mobileTitle` and `labels.mobileDescription`, which only a modified Sidebar supported.

The Astro `ThemeProvider` keeps "follow the system" as a preference: with no stored theme, or `"system"`, it follows changes of the system theme, and `window.__setTheme("system")` returns to it. It follows a theme changed in another window or frame of the site, and it saves only a choice, so following the system or another window no longer stores an explicit theme. `__setTheme("dark")` and `__setTheme("light")` work as before.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A shadcn-compatible set of components built for [Astro][astro], designed for con
- **100+ Components & Blocks** — Ready-to-use UI components and pre-built page blocks
- **Tailwind CSS v4** — Styled with the latest Tailwind CSS
- **TypeScript** — Full TypeScript support
- **React**: the same components and blocks for React; see [react/README.md](react/README.md)
- **React extension**: the Fulldev extras and blocks for official shadcn/ui React projects; see [react/README.md](react/README.md)

## Installation

Expand Down
11 changes: 0 additions & 11 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { readdirSync } from "node:fs"
import { defineConfig, fontProviders } from "astro/config"
import { unified } from "@astrojs/markdown-remark"
import mdx from "@astrojs/mdx"
import liveCode from "astro-live-code"

import fulldevIntegration from "./src/lib/integration"

// The docs used to live at /docs/, /components/ and /blocks/; they are the
// Astro edition now. Netlify answers these with a 301 (netlify.toml).
// Docs tables scroll inside the content column instead of widening the page.
type Node = { type: string; tagName?: string; children?: Node[] }
const scrollTables = () => (tree: Node) => {
Expand All @@ -27,19 +24,11 @@ const scrollTables = () => (tree: Node) => {
wrap(tree)
}

const legacyRedirects = Object.fromEntries(
readdirSync("src/content/pages/astro", { recursive: true })
.map((file) => String(file).replace(/(\/?index)?\.mdx$/, ""))
.filter((path) => /^(docs|components|blocks)/.test(path))
.map((path) => [`/${path}/`, `/astro/${path}/`])
)

// React previews come from the gallery in react/, at /preview/react/. In
// development its Vite server runs on REACT_PREVIEW_PORT (pnpm dev:react).
const reactPreviewPort = process.env.REACT_PREVIEW_PORT ?? "4322"

export default defineConfig({
redirects: legacyRedirects,
server: {
host: "127.0.0.1",
port: 4321,
Expand Down
21 changes: 0 additions & 21 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,6 @@ export default defineConfig([
],
rules: { "react-hooks/set-state-in-effect": "off" },
},
{
// The official shadcn/ui docs examples and the docs helpers they import,
// unchanged.
files: [
"react/src/components/examples/**/*.tsx",
"react/src/components/language-selector.tsx",
"react/src/components/markdown.tsx",
"react/src/components/message-animated.tsx",
"react/src/lib/ai.ts",
"react/src/lib/message-animations.ts",
"react/src/hooks/use-copy-to-clipboard.ts",
"react/src/hooks/use-media-query.tsx",
],
rules: {
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-useless-assignment": "off",
"react-hooks/refs": "off",
"react-hooks/set-state-in-effect": "off",
},
},
...astro.configs.recommended,
...astro.configs["jsx-a11y-recommended"],
{
Expand Down
22 changes: 11 additions & 11 deletions html-validate.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ export default defineFlatConfig([
// the page's own breadcrumb or table of contents, so the landmark names
// repeat. A site renders each of these landmarks once.
files: [
"dist/astro/blocks/banner/index.html",
"dist/astro/blocks/footer/index.html",
"dist/astro/blocks/header/index.html",
"dist/astro/components/banner/index.html",
"dist/astro/components/breadcrumb/index.html",
"dist/astro/components/navigation-menu/index.html",
"dist/astro/components/pagination/index.html",
"dist/astro/components/sidebar/index.html",
"dist/astro/components/toc/index.html",
"dist/blocks/banner/index.html",
"dist/blocks/footer/index.html",
"dist/blocks/header/index.html",
"dist/components/banner/index.html",
"dist/components/breadcrumb/index.html",
"dist/components/navigation-menu/index.html",
"dist/components/pagination/index.html",
"dist/components/sidebar/index.html",
"dist/components/toc/index.html",
],
rules: { "unique-landmark": "off" },
},
{
// The official sidebar example is a full app layout: its SidebarInset is
// the app's main element, rendered here inside the docs page's own main.
files: ["dist/astro/components/sidebar/index.html"],
files: ["dist/components/sidebar/index.html"],
rules: { "no-multiple-main": "off", "element-permitted-content": "off" },
},
{
// ItemGroup and Item follow shadcn/ui: ARIA list roles on div and a, so
// an item can be a link.
files: ["dist/astro/components/item/index.html"],
files: ["dist/components/item/index.html"],
rules: {
"prefer-native-element": ["error", { exclude: ["list", "listitem"] }],
},
Expand Down
9 changes: 2 additions & 7 deletions knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,16 @@
},
"react": {
"entry": [
// The React registry publishes these as installable files.
// The React registry publishes the extras and blocks; the standard
// shadcn/ui components and hooks are local copies for the gallery.
"src/components/ui/*.tsx",
"src/components/blocks/*.tsx",
"src/components/examples/*/*.tsx",
"src/hooks/*.{ts,tsx}",
"src/lib/*.ts",
// The gallery loads its demos through import.meta.glob.
"gallery/ui/*.tsx",
"gallery/blocks/*.tsx",
],
"ignoreIssues": {
// shadcn/ui docs helpers that example items install, shipped unchanged.
"src/components/language-selector.tsx": ["exports", "types"],
"src/components/message-animated.tsx": ["types"],
},
},
},
}
20 changes: 1 addition & 19 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,4 @@ host = "eu.i.posthog.com"
status = 200
force = true

# The docs moved to the Astro edition; the React gallery became the React
# edition, with its previews at /preview/react/.
[[redirects]]
from = "/docs/*"
to = "/astro/docs/:splat"
status = 301
force = true

[[redirects]]
from = "/components/*"
to = "/astro/components/:splat"
status = 301
force = true

[[redirects]]
from = "/blocks/*"
to = "/astro/blocks/:splat"
status = 301
force = true
# Redirects of former docs addresses are in public/_redirects.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"typecheck": "tsc --noEmit --noCheck && astro check --minimumFailingSeverity hint && tsc --noEmit -p react",
"check": "prettier --check . && pnpm typecheck && eslint . && knip && node scripts/images.ts --check && pnpm registry:check && pnpm test",
"test": "node --test tests/*.test.mjs",
"test:browser": "node --test tests/browser/*.test.mjs",
"fix": "prettier --write . && eslint . --fix",
"images": "node scripts/images.ts",
"ui:add": "node scripts/ui-add.ts",
Expand Down
Loading
Loading