TypeScript
Switch shadcn registry adds to @extend namespace
Andrew Luo6d8dd4ad0823
diff --git a/apps/v4/components.json b/apps/v4/components.jsonindex 02fba9a..608f26a 100644--- a/apps/v4/components.json+++ b/apps/v4/components.json@@ -19,6 +19,7 @@"hooks": "@/hooks"},"registries": {+ "@extend": "https://ui.extend.ai/r/{name}.json","@coss": "https://coss.com/ui/r/{name}.json"}}diff --git a/apps/v4/components/command-menu.tsx b/apps/v4/components/command-menu.tsxindex 9ddb765..a1893dd 100644--- a/apps/v4/components/command-menu.tsx+++ b/apps/v4/components/command-menu.tsx@@ -11,7 +11,6 @@ import { HugeiconsIcon } from "@hugeicons/react"import { useDocsSearch } from "fumadocs-core/search/client"import { type ColorPalette } from "@/lib/colors"-import { siteConfig } from "@/lib/config"import { trackEvent } from "@/lib/events"import { showMcpDocs } from "@/lib/flags"import { getCurrentBase, getPagesFromFolder } from "@/lib/page-tree"@@ -20,7 +19,6 @@ import { cn } from "@/lib/utils"import { useConfig } from "@/hooks/use-config"import { useMutationObserver } from "@/hooks/use-mutation-observer"import { Button } from "@/components/ui/button"-import { copyToClipboardWithMeta } from "@/components/copy-button"import {Command,CommandEmpty,@@ -39,21 +37,23 @@ import {} from "@/components/ui/dialog"import { Separator } from "@/components/ui/separator"import { Spinner } from "@/components/ui/spinner"+import { copyToClipboardWithMeta } from "@/components/copy-button"-function getRegistryItemUrl(name: string) {- return `${siteConfig.url}/r/${name}.json`+function getRegistryItemSpecifier(name: string) {+ return `@extend/${name}`}function getShadcnAddCommand(packageManager: "npm" | "yarn" | "pnpm" | "bun",itemName: string) {- const itemUrl = getRegistryItemUrl(itemName)+ const itemSpecifier = getRegistryItemSpecifier(itemName)- if (packageManager === "npm") return `npx shadcn@latest add ${itemUrl}`- if (packageManager === "bun") return `bunx --bun shadcn@latest add ${itemUrl}`+ if (packageManager === "npm") return `npx shadcn@latest add ${itemSpecifier}`+ if (packageManager === "bun")+ return `bunx --bun shadcn@latest add ${itemSpecifier}`- return `${packageManager} dlx shadcn@latest add ${itemUrl}`+ return `${packageManager} dlx shadcn@latest add ${itemSpecifier}`}export function CommandMenu({diff --git a/apps/v4/content/docs/components/csv-tsv-viewer.mdx b/apps/v4/content/docs/components/csv-tsv-viewer.mdxindex 717e4c1..090a2ab 100644--- a/apps/v4/content/docs/components/csv-tsv-viewer.mdx+++ b/apps/v4/content/docs/components/csv-tsv-viewer.mdx@@ -44,7 +44,7 @@ const CsvViewer = dynamic(<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/csv-viewer.json+pnpm dlx shadcn@latest add @extend/csv-viewer```</TabsContent>diff --git a/apps/v4/content/docs/components/document-splits.mdx b/apps/v4/content/docs/components/document-splits.mdxindex cc129b6..1aed122 100644--- a/apps/v4/content/docs/components/document-splits.mdx+++ b/apps/v4/content/docs/components/document-splits.mdx@@ -21,7 +21,7 @@ See it composed with the PDF Viewer in the [Document Splits block](/blocks#docum<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/document-splits.json+pnpm dlx shadcn@latest add @extend/document-splits```</TabsContent>diff --git a/apps/v4/content/docs/components/document-viewer-sidebar.mdx b/apps/v4/content/docs/components/document-viewer-sidebar.mdxindex 79e6245..c4f6271 100644--- a/apps/v4/content/docs/components/document-viewer-sidebar.mdx+++ b/apps/v4/content/docs/components/document-viewer-sidebar.mdx@@ -19,7 +19,7 @@ Document Viewer Sidebar provides the responsive shell used by document viewers t<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/document-viewer-sidebar.json+pnpm dlx shadcn@latest add @extend/document-viewer-sidebar```</TabsContent>diff --git a/apps/v4/content/docs/components/docx-editor.mdx b/apps/v4/content/docs/components/docx-editor.mdxindex 1a8c35c..b402b9e 100644--- a/apps/v4/content/docs/components/docx-editor.mdx+++ b/apps/v4/content/docs/components/docx-editor.mdx@@ -20,7 +20,7 @@ The React DOCX Editor is an experimental document editing surface built on top o<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/docx-editor.json+pnpm dlx shadcn@latest add @extend/docx-editor```</TabsContent>@@ -41,7 +41,7 @@ npm install @base-ui/react@^1.4.1 @extend-ai/react-docx@^0.6.6 @hugeicons/core-f</Step>```bash-npx shadcn@latest add https://ui.extend.ai/r/file-thumbnail.json+pnpm dlx shadcn@latest add @extend/file-thumbnail```<Step>Copy and paste the following code into your project.</Step>diff --git a/apps/v4/content/docs/components/docx-viewer.mdx b/apps/v4/content/docs/components/docx-viewer.mdxindex 2484cae..2428432 100644--- a/apps/v4/content/docs/components/docx-viewer.mdx+++ b/apps/v4/content/docs/components/docx-viewer.mdx@@ -20,7 +20,7 @@ The React DOCX Viewer is for contracts, proposals, reports, and internal docs wh<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/docx-viewer.json+pnpm dlx shadcn@latest add @extend/docx-viewer```</TabsContent>diff --git a/apps/v4/content/docs/components/e-signature.mdx b/apps/v4/content/docs/components/e-signature.mdxindex 45dc120..e1d9a71 100644--- a/apps/v4/content/docs/components/e-signature.mdx+++ b/apps/v4/content/docs/components/e-signature.mdx@@ -21,7 +21,7 @@ See it composed with the PDF Viewer in the [E-Signature block](/blocks#e-signatu<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/e-signature.json+pnpm dlx shadcn@latest add @extend/e-signature```</TabsContent>diff --git a/apps/v4/content/docs/components/file-thumbnail.mdx b/apps/v4/content/docs/components/file-thumbnail.mdxindex 70d265c..2580df6 100644--- a/apps/v4/content/docs/components/file-thumbnail.mdx+++ b/apps/v4/content/docs/components/file-thumbnail.mdx@@ -19,7 +19,7 @@ File Thumbnail gives document lists, upload queues, and attachment trays a consi<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/file-thumbnail.json+pnpm dlx shadcn@latest add @extend/file-thumbnail```</TabsContent>diff --git a/apps/v4/content/docs/components/file-upload.mdx b/apps/v4/content/docs/components/file-upload.mdxindex eed0e13..b2ab818 100644--- a/apps/v4/content/docs/components/file-upload.mdx+++ b/apps/v4/content/docs/components/file-upload.mdx@@ -20,7 +20,7 @@ File Upload is the starting point for document processing workflows. It should h<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/file-upload.json+pnpm dlx shadcn@latest add @extend/file-upload```</TabsContent>@@ -41,7 +41,7 @@ npm install @hugeicons/core-free-icons@^4.2.0 @hugeicons/react@^1.1.6 border-bea</Step>```bash-npx shadcn@latest add https://ui.extend.ai/r/file-thumbnail.json+pnpm dlx shadcn@latest add @extend/file-thumbnail```<Step>Copy and paste the following code into your project.</Step>diff --git a/apps/v4/content/docs/components/human-review.mdx b/apps/v4/content/docs/components/human-review.mdxindex 809358a..39c1e2a 100644--- a/apps/v4/content/docs/components/human-review.mdx+++ b/apps/v4/content/docs/components/human-review.mdx@@ -47,7 +47,7 @@ import("@/components/ui/human-review").then((mod) => mod.HumanReviewPanel),<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/human-review.json+pnpm dlx shadcn@latest add @extend/human-review```</TabsContent>diff --git a/apps/v4/content/docs/components/ocr-blocks.mdx b/apps/v4/content/docs/components/ocr-blocks.mdxindex fde4f34..0802462 100644--- a/apps/v4/content/docs/components/ocr-blocks.mdx+++ b/apps/v4/content/docs/components/ocr-blocks.mdx@@ -21,7 +21,7 @@ See it composed with the PDF Viewer in the [OCR Blocks block](/blocks#ocr-blocks<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/ocr-blocks.json+pnpm dlx shadcn@latest add @extend/ocr-blocks```</TabsContent>diff --git a/apps/v4/content/docs/components/pdf-viewer.mdx b/apps/v4/content/docs/components/pdf-viewer.mdxindex a43642c..7a02b7d 100644--- a/apps/v4/content/docs/components/pdf-viewer.mdx+++ b/apps/v4/content/docs/components/pdf-viewer.mdx@@ -20,7 +20,7 @@ The React PDF Viewer is the core page-based document surface for document-heavy<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/pdf-viewer.json+pnpm dlx shadcn@latest add @extend/pdf-viewer```</TabsContent>diff --git a/apps/v4/content/docs/components/schema-builder.mdx b/apps/v4/content/docs/components/schema-builder.mdxindex f389d38..05a33ca 100644--- a/apps/v4/content/docs/components/schema-builder.mdx+++ b/apps/v4/content/docs/components/schema-builder.mdx@@ -20,7 +20,7 @@ types, descriptions, enums, nested objects, and arrays.<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/schema-builder.json+pnpm dlx shadcn@latest add @extend/schema-builder```</TabsContent>diff --git a/apps/v4/content/docs/components/xlsx-editor.mdx b/apps/v4/content/docs/components/xlsx-editor.mdxindex 6c7c1d6..0f1e959 100644--- a/apps/v4/content/docs/components/xlsx-editor.mdx+++ b/apps/v4/content/docs/components/xlsx-editor.mdx@@ -20,7 +20,7 @@ The React Excel Editor is an experimental spreadsheet editing surface built on t<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/xlsx-editor.json+pnpm dlx shadcn@latest add @extend/xlsx-editor```</TabsContent>@@ -41,7 +41,7 @@ npm install @base-ui/react@^1.4.1 @extend-ai/react-xlsx@^0.10.0 @hugeicons/core-</Step>```bash-npx shadcn@latest add https://ui.extend.ai/r/xlsx-viewer.json https://ui.extend.ai/r/group.json+pnpm dlx shadcn@latest add @extend/xlsx-viewer @extend/group```<Step>Copy and paste the following code into your project.</Step>diff --git a/apps/v4/content/docs/components/xlsx-viewer.mdx b/apps/v4/content/docs/components/xlsx-viewer.mdxindex 17218e2..a4c188e 100644--- a/apps/v4/content/docs/components/xlsx-viewer.mdx+++ b/apps/v4/content/docs/components/xlsx-viewer.mdx@@ -20,7 +20,7 @@ The React Excel Viewer is the core spreadsheet preview for XLSX workbooks, finan<TabsContent value="cli">```bash-npx shadcn@latest add https://ui.extend.ai/r/xlsx-viewer.json+pnpm dlx shadcn@latest add @extend/xlsx-viewer```</TabsContent>diff --git a/apps/v4/lib/pdf-viewer-blocks.ts b/apps/v4/lib/pdf-viewer-blocks.tsindex 3feda7e..8325db0 100644--- a/apps/v4/lib/pdf-viewer-blocks.ts+++ b/apps/v4/lib/pdf-viewer-blocks.ts@@ -1,5 +1,3 @@-import { siteConfig } from "@/lib/config"-type PdfViewerBlockConfig = {id: stringtitle: string@@ -13,7 +11,7 @@ type PdfViewerBlockConfig = {}function getRegistryAddCommand(name: string) {- return `npx shadcn@latest add ${siteConfig.url}/r/${name}.json`+ return `pnpm dlx shadcn@latest add @extend/${name}`}export const PDF_VIEWER_BLOCKS = [diff --git a/apps/v4/registry.json b/apps/v4/registry.jsonindex 9096c25..db94c9f 100644--- a/apps/v4/registry.json+++ b/apps/v4/registry.json@@ -522,11 +522,7 @@"@hugeicons/react@^1.1.6","border-beam@^1.0.1"],- "registryDependencies": [- "card",- "https://ui.extend.ai/r/file-thumbnail.json",- "utils"- ],+ "registryDependencies": ["card", "@extend/file-thumbnail", "utils"],"categories": ["documents"],"files": [{@@ -565,8 +561,8 @@],"registryDependencies": ["button",- "https://ui.extend.ai/r/document-viewer-sidebar.json",- "https://ui.extend.ai/r/file-thumbnail.json",+ "@extend/document-viewer-sidebar",+ "@extend/file-thumbnail","input","popover","scroll-area",@@ -596,8 +592,8 @@],"registryDependencies": ["button",- "https://ui.extend.ai/r/document-viewer-sidebar.json",- "https://ui.extend.ai/r/file-thumbnail.json",+ "@extend/document-viewer-sidebar",+ "@extend/file-thumbnail","scroll-area","select","separator",@@ -627,9 +623,9 @@],"registryDependencies": ["button",- "https://ui.extend.ai/r/document-viewer-sidebar.json",+ "@extend/document-viewer-sidebar","dropdown-menu",- "https://ui.extend.ai/r/file-thumbnail.json",+ "@extend/file-thumbnail","input","scroll-area","select",@@ -689,7 +685,7 @@],"registryDependencies": ["button",- "https://ui.extend.ai/r/group.json",+ "@extend/group","input","scroll-area","select",@@ -697,7 +693,7 @@"spinner","tooltip","utils",- "https://ui.extend.ai/r/xlsx-viewer.json"+ "@extend/xlsx-viewer"],"categories": ["documents"],"files": [@@ -743,10 +739,7 @@"title": "PDF Dropzone","description": "A PDF-only upload dropzone that opens the dropped file in the shared PDF viewer.","dependencies": ["@hugeicons/core-free-icons@^4.2.0"],- "registryDependencies": [- "https://ui.extend.ai/r/file-upload.json",- "https://ui.extend.ai/r/pdf-viewer.json"- ],+ "registryDependencies": ["@extend/file-upload", "@extend/pdf-viewer"],"categories": ["documents", "blocks"],"files": [{@@ -786,9 +779,9 @@"title": "OCR Blocks","description": "A structured OCR review block with confidence cards and PDF region overlays.","registryDependencies": [- "https://ui.extend.ai/r/ocr-blocks.json",- "https://ui.extend.ai/r/pdf-block-resizable-shell.json",- "https://ui.extend.ai/r/pdf-viewer.json"+ "@extend/ocr-blocks",+ "@extend/pdf-block-resizable-shell",+ "@extend/pdf-viewer"],"categories": ["documents", "blocks"],"files": [@@ -813,8 +806,8 @@"registryDependencies": ["button","dialog",- "https://ui.extend.ai/r/pdf-block-resizable-shell.json",- "https://ui.extend.ai/r/pdf-viewer.json",+ "@extend/pdf-block-resizable-shell",+ "@extend/pdf-viewer","scroll-area","utils"],@@ -892,9 +885,9 @@"title": "Human Review","description": "A human-in-the-loop extraction review block linked to source PDF evidence.","registryDependencies": [- "https://ui.extend.ai/r/human-review.json",- "https://ui.extend.ai/r/pdf-block-resizable-shell.json",- "https://ui.extend.ai/r/pdf-viewer.json"+ "@extend/human-review",+ "@extend/pdf-block-resizable-shell",+ "@extend/pdf-viewer"],"categories": ["documents", "blocks"],"files": [@@ -919,7 +912,7 @@],"registryDependencies": ["button",- "https://ui.extend.ai/r/file-thumbnail.json",+ "@extend/file-thumbnail","scroll-area","utils"],@@ -938,9 +931,9 @@"title": "Document Splits","description": "A split-group review block for organizing PDF pages into output documents.","registryDependencies": [- "https://ui.extend.ai/r/document-splits.json",- "https://ui.extend.ai/r/pdf-block-resizable-shell.json",- "https://ui.extend.ai/r/pdf-viewer.json"+ "@extend/document-splits",+ "@extend/pdf-block-resizable-shell",+ "@extend/pdf-viewer"],"categories": ["documents", "blocks"],"files": [@@ -957,11 +950,11 @@"title": "Excel Document Splits","description": "A workbook review block with sheet groups and the shared XLSX viewer.","registryDependencies": [- "https://ui.extend.ai/r/file-thumbnail.json",- "https://ui.extend.ai/r/pdf-block-resizable-shell.json",+ "@extend/file-thumbnail",+ "@extend/pdf-block-resizable-shell","scroll-area","utils",- "https://ui.extend.ai/r/xlsx-viewer.json"+ "@extend/xlsx-viewer"],"categories": ["documents", "blocks"],"files": [@@ -977,7 +970,7 @@"type": "registry:block","title": "DOCX Editor","description": "A full DOCX editor block with a Word-style toolbar, page thumbnails, and export controls.",- "registryDependencies": ["https://ui.extend.ai/r/docx-editor.json"],+ "registryDependencies": ["@extend/docx-editor"],"categories": ["documents", "blocks"],"files": [{