Skip to content

Commit 75d5944

Browse files
authored
Merge pull request #4754 from udecode/templates/52
2 parents 7855104 + a17dcfa commit 75d5944

File tree

253 files changed

+11809
-19761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+11809
-19761
lines changed

.claude/ruler.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ enabled = true
2828

2929
# MCP (Model Context Protocol) server configuration
3030
[mcp]
31-
enabled = false
32-
# merge_strategy = "merge"
31+
enabled = true
32+
merge_strategy = "merge"
3333

3434
# --- MCP Server Definitions ---
35-
[mcp_servers.plate]
35+
[mcp_servers.registries]
3636
command = "npx"
37-
args = ["-y", "shadcn@canary", "registry:mcp"]
37+
args = ["-y", "shadcn@latest", "mcp"]
3838

3939
[mcp_servers.plate.env]
4040
REGISTRY_URL = "http://localhost:3000/rd/registry.json"

.github/workflows/ci-templates.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Templates
1+
name: CI Templates
22

33
on:
44
push:
@@ -19,8 +19,8 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22-
build:
23-
name: build
22+
ci:
23+
name: Lint, Typecheck, Build
2424
runs-on: ubuntu-latest
2525
strategy:
2626
fail-fast: false
@@ -32,31 +32,32 @@ jobs:
3232
run:
3333
working-directory: templates/${{ matrix.template }}
3434
steps:
35-
- uses: actions/checkout@v4
35+
- name: Checkout
36+
uses: actions/checkout@v5
3637

37-
- uses: pnpm/action-setup@v2.4.1
38-
name: Install pnpm
38+
- uses: oven-sh/setup-bun@v2
39+
name: Install bun
3940
with:
40-
version: 8.6.1
41-
run_install: false
41+
bun-version: latest
4242

43-
- name: Setup Node.js
43+
- name: Use Node.js
4444
uses: actions/setup-node@v4
4545
with:
4646
node-version: 22
47-
cache: 'pnpm'
48-
cache-dependency-path: '**/pnpm-lock.yaml'
4947

50-
- name: Setup pnpm cache
51-
uses: actions/cache@v4
48+
- uses: actions/cache@v4
49+
name: ♻️ Setup bun cache
5250
with:
53-
path: $(pnpm store path)
54-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
51+
path: ~/.bun/install/cache
52+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
5553
restore-keys: |
56-
${{ runner.os }}-pnpm-
54+
${{ runner.os }}-bun-
5755
58-
- name: 📥 Install dependencies
59-
run: pnpm install --no-frozen-lockfile
56+
- name: 📥 Install
57+
run: bun install --frozen-lockfile
6058

61-
- name: 🏗 Build
62-
run: pnpm build
59+
- name: 🔬 Run Biome & ESLint
60+
run: bun lint
61+
62+
- name: 🕵️ Typecheck & Build
63+
run: bun run build

.github/workflows/lint-typecheck.yml renamed to .github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
uses: ./.github/actions/yarn-nm-install
6969

7070
- name: 🔬 Lint
71-
run: yarn check
71+
run: yarn lint
7272

7373
- name: ♻️ Restore packages cache
7474
uses: actions/cache@v4

.github/workflows/sync-templates.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- main
77
paths:
88
- '.github/actions/**'
9-
- '.github/workflows/sync-templates.yml'
10-
- 'tooling/scripts/sync-templates.sh'
9+
- '.github/workflows/push-templates.yml'
10+
- 'tooling/scripts/push-templates.sh'
1111
- 'templates/**'
1212

1313
jobs:
@@ -71,5 +71,5 @@ jobs:
7171
- name: 🔄 Sync Templates
7272
env:
7373
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
74-
run: ./tooling/scripts/sync-templates.sh "templates/${{ matrix.template }}"
74+
run: ./tooling/scripts/push-templates.sh "templates/${{ matrix.template }}"
7575
shell: bash

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ CLAUDE.local.md
137137
# START Ruler Generated Files
138138
/.claude/skills
139139
/.codex/config.toml
140+
/.cursor/mcp.json
140141
/.cursor/rules
142+
/.mcp.json
141143
/.skillz
142144
/AGENTS.md
143145
/CLAUDE.md

apps/www/public/r/components-changelog-docs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/www/public/r/emoji-toolbar-button.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/www/public/r/installation-docs-docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"files": [
88
{
99
"path": "../../docs/installation/docs.mdx",
10-
"content": "---\ntitle: Local Docs\ndescription: Set up Plate's documentation locally for version-controlled, AI-enhanced development.\n---\n\nHost Plate's documentation locally to integrate it directly with your project. This setup ensures your team works with documentation that matches your Plate version while enabling AI tools to better understand and assist with your codebase.\n\n## Why Host Documentation Locally?\n\nLocal documentation provides distinct advantages over external sites:\n\n* **Version Lock-In:** Keep documentation synchronized with your project's Plate version. Avoid confusion from features or APIs in newer, unadopted Plate releases.\n* **AI-Ready Development:**\n * **Better than `llms.txt`:** While dumping docs into a single text file is common for LLM context, this breaks down with large documentation (exceeding typical 100k token limits). Our structured, local setup lets AI tools access exactly what they need.\n * **Direct Access for AI Tools:** Your AI-assisted IDE gets direct access to version-specific documentation, enabling accurate code generation and contextual help with your Plate setup.\n * **Structured for AI Tasks:** AI tools can help with tasks like translating docs, creating summaries, or updating documentation between Plate versions.\n* **Customization & Control:** Modify documentation appearance and structure to match your project needs.\n* **Easy Updates:** Treat documentation like code - review, update, and version control it with your codebase.\n* **Fast Access:** Get reliable, quick access to documentation.\n* **Central Hub:** Keep Plate docs alongside documentation for other libraries in one place.\n\n## Setup Guide\n\nThere are two ways to set up local documentation:\n\n### Option 1: Docs App\n\nThis option sets up a complete documentation site using Fumadocs, providing a searchable, navigable interface.\n\n<Steps>\n\n#### Create Fumadocs App\n\nSet up a Fumadocs app which provides the Next.js-based framework for your documentation site:\n\n```bash\npnpm create fumadocs-app\n```\n\nDuring setup:\n- **Name:** Enter `docs` when prompted\n- **Choose your preferred options** (defaults work well)\n- The wizard will create a `docs` directory with all necessary files\n\nNavigate to your newly created `docs` directory:\n\n```bash\ncd docs\n```\n\nFor detailed Fumadocs setup, see the [Fumadocs UI documentation](https://fumadocs.dev/docs/ui).\n\n#### Create `components.json`\n\nIn your docs directory, create a `components.json` file. You have two options:\n\n**Option A: Command line**\n\n```bash\necho '{\\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\\n \"style\": \"new-york\",\\n \"rsc\": true,\\n \"tsx\": true,\\n \"tailwind\": {\\n \"config\": \"\",\\n \"css\": \"app/global.css\",\\n \"baseColor\": \"neutral\",\\n \"cssVariables\": true,\\n \"prefix\": \"\"\\n },\\n \"aliases\": {\\n \"components\": \"@/components\",\\n \"utils\": \"@/lib/utils\",\\n \"ui\": \"@/components/ui\",\\n \"lib\": \"@/lib\",\\n \"hooks\": \"@/hooks\"\\n },\\n \"iconLibrary\": \"lucide\"\\n}' > components.json\n```\n\n**Option B: Copy and paste**\n\nCreate a new file called `components.json` in your docs directory with this content:\n\n```json\n{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"new-york\",\n \"rsc\": true,\n \"tsx\": true,\n \"tailwind\": {\n \"config\": \"\",\n \"css\": \"app/global.css\",\n \"baseColor\": \"neutral\",\n \"cssVariables\": true,\n \"prefix\": \"\"\n },\n \"aliases\": {\n \"components\": \"@/components\",\n \"utils\": \"@/lib/utils\",\n \"ui\": \"@/components/ui\",\n \"lib\": \"@/lib\",\n \"hooks\": \"@/hooks\"\n },\n \"iconLibrary\": \"lucide\"\n}\n```\n\n#### Add Plate Documentation\n\nNow, fetch the Plate documentation files and necessary MDX components.\n\n```bash\nnpx shadcn@latest add https://platejs.org/r/fumadocs\n```\n\n<Callout type=\"warning\" title=\"Version-Specific Documentation\">\n The command above installs the **latest** Plate documentation. For projects on older Plate versions (minimum `v48.0.0`), specify your version:\n\n 1. Go to [Plate's public registry on GitHub](https://github.com/udecode/plate/tree/main/apps/www/public/r).\n 2. Use the tag switcher to select your Plate version.\n 3. Copy the versioned URL (e.g., [v48](https://github.com/udecode/plate/tree/%40udecode/plate%4048.0.5/apps/www/public/r)).\n 4. Replace `https://platejs.org/r/` in the `shadcn` command with this URL.\n</Callout>\n\n#### Run Fumadocs App\n\nStart the development server:\n\n```bash\npnpm run dev\n```\n\nYour documentation site will be available at:\n- Plate docs: `http://localhost:3000/docs/plate`\n\n#### Customize\n\nEnhance your docs with [Fumadocs features](https://fumadocs.dev/docs/ui#writing-content).\n\n</Steps>\n\n### Option 2: MDX Files Only\n\nIf you just want the documentation files without setting up a full site, you can add them directly to your existing project:\n\n```bash\n# Run from your project root (wherever you want the docs)\nnpx shadcn@latest add https://platejs.org/r/docs\n```\n\nThis will:\n- Install MDX documentation files in your project (typically in a `docs/` or similar directory)\n- Skip the Fumadocs setup entirely\n- Give you raw MDX files to use however you need\n\nUse cases:\n- Reference documentation directly in your codebase\n- Integrate with your existing documentation setup\n- Make docs available to AI tools for better context\n\n## Advanced Integration\n\n### MCP Integration\n\nEnable AI tools to work with your local documentation by adding the Plate server to your `.cursor/mcp.json` (or equivalent).\n\n```json\n{\n \"mcpServers\": {\n \"plate\": {\n \"description\": \"Plate editors, plugins, components and documentation\",\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"-y\", \"shadcn@canary\", \"registry:mcp\"],\n \"env\": {\n \"REGISTRY_URL\": \"https://platejs.org/r/registry.json\"\n }\n }\n }\n}\n```\n\nYour AI tools can then:\n* Access documentation context for better code assistance\n* Help manage and update documentation\n* Generate code with proper imports and configurations\n* Assist with editor setup and feature integration\n\nSee the [MCP Guide](/docs/installation/mcp) for more details.\n\n<Callout>\n Once configured, try asking your AI:\n ```bash\n \"Help me understand how the Plate AI plugin works\"\n \"How to create a custom plugin?\"\n \"What's new in the latest Plate version?\"\n ```\n</Callout>\n\n### Centralizing Multiple Documentations\n\nYour `content/docs/` directory can host documentation for multiple libraries. Replicate the process for Plate to add docs for other internal or external tools:\n\n```plaintext\ncontent/\n└── docs/\n ├── plate/ # Plate documentation\n │ └── ...\n ├── other-library/ # Documentation for another library\n │ └── ...\n └── index.mdx # Main landing page for all docs\n```\n\nThis creates a unified, version-controlled knowledge base for your project stack.",
10+
"content": "---\ntitle: Local Docs\ndescription: Set up Plate's documentation locally for version-controlled, AI-enhanced development.\n---\n\nHost Plate's documentation locally to integrate it directly with your project. This setup ensures your team works with documentation that matches your Plate version while enabling AI tools to better understand and assist with your codebase.\n\n## Why Host Documentation Locally?\n\nLocal documentation provides distinct advantages over external sites:\n\n* **Version Lock-In:** Keep documentation synchronized with your project's Plate version. Avoid confusion from features or APIs in newer, unadopted Plate releases.\n* **AI-Ready Development:**\n * **Better than `llms.txt`:** While dumping docs into a single text file is common for LLM context, this breaks down with large documentation (exceeding typical 100k token limits). Our structured, local setup lets AI tools access exactly what they need.\n * **Direct Access for AI Tools:** Your AI-assisted IDE gets direct access to version-specific documentation, enabling accurate code generation and contextual help with your Plate setup.\n * **Structured for AI Tasks:** AI tools can help with tasks like translating docs, creating summaries, or updating documentation between Plate versions.\n* **Customization & Control:** Modify documentation appearance and structure to match your project needs.\n* **Easy Updates:** Treat documentation like code - review, update, and version control it with your codebase.\n* **Fast Access:** Get reliable, quick access to documentation.\n* **Central Hub:** Keep Plate docs alongside documentation for other libraries in one place.\n\n## Setup Guide\n\nThere are two ways to set up local documentation:\n\n### Option 1: Docs App\n\nThis option sets up a complete documentation site using Fumadocs, providing a searchable, navigable interface.\n\n<Steps>\n\n#### Create Fumadocs App\n\nSet up a Fumadocs app which provides the Next.js-based framework for your documentation site:\n\n```bash\npnpm create fumadocs-app\n```\n\nDuring setup:\n- **Name:** Enter `docs` when prompted\n- **Choose your preferred options** (defaults work well)\n- The wizard will create a `docs` directory with all necessary files\n\nNavigate to your newly created `docs` directory:\n\n```bash\ncd docs\n```\n\nFor detailed Fumadocs setup, see the [Fumadocs UI documentation](https://fumadocs.dev/docs/ui).\n\n#### Create `components.json`\n\nIn your docs directory, create a `components.json` file. You have two options:\n\n**Option A: Command line**\n\n```bash\necho '{\\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\\n \"style\": \"new-york\",\\n \"rsc\": true,\\n \"tsx\": true,\\n \"tailwind\": {\\n \"config\": \"\",\\n \"css\": \"app/global.css\",\\n \"baseColor\": \"neutral\",\\n \"cssVariables\": true,\\n \"prefix\": \"\"\\n },\\n \"aliases\": {\\n \"components\": \"@/components\",\\n \"utils\": \"@/lib/utils\",\\n \"ui\": \"@/components/ui\",\\n \"lib\": \"@/lib\",\\n \"hooks\": \"@/hooks\"\\n },\\n \"iconLibrary\": \"lucide\"\\n}' > components.json\n```\n\n**Option B: Copy and paste**\n\nCreate a new file called `components.json` in your docs directory with this content:\n\n```json\n{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"new-york\",\n \"rsc\": true,\n \"tsx\": true,\n \"tailwind\": {\n \"config\": \"\",\n \"css\": \"app/global.css\",\n \"baseColor\": \"neutral\",\n \"cssVariables\": true,\n \"prefix\": \"\"\n },\n \"aliases\": {\n \"components\": \"@/components\",\n \"utils\": \"@/lib/utils\",\n \"ui\": \"@/components/ui\",\n \"lib\": \"@/lib\",\n \"hooks\": \"@/hooks\"\n },\n \"iconLibrary\": \"lucide\"\n}\n```\n\n#### Add Plate Documentation\n\nNow, fetch the Plate documentation files and necessary MDX components.\n\n```bash\nnpx shadcn@latest add @plate/fumadocs\n```\n\n<Callout type=\"warning\" title=\"Version-Specific Documentation\">\n The command above installs the **latest** Plate documentation. For projects on older Plate versions (minimum `v48.0.0`), specify your version:\n\n 1. Go to [Plate's public registry on GitHub](https://github.com/udecode/plate/tree/main/apps/www/public/r).\n 2. Use the tag switcher to select your Plate version.\n 3. Copy the versioned URL (e.g., [v48](https://github.com/udecode/plate/tree/%40udecode/plate%4048.0.5/apps/www/public/r)).\n 4. Replace `https://platejs.org/r/` in the `shadcn` command with this URL.\n</Callout>\n\n#### Run Fumadocs App\n\nStart the development server:\n\n```bash\npnpm run dev\n```\n\nYour documentation site will be available at:\n- Plate docs: `http://localhost:3000/docs/plate`\n\n#### Customize\n\nEnhance your docs with [Fumadocs features](https://fumadocs.dev/docs/ui#writing-content).\n\n</Steps>\n\n### Option 2: MDX Files Only\n\nIf you just want the documentation files without setting up a full site, you can add them directly to your existing project:\n\n```bash\n# Run from your project root (wherever you want the docs)\nnpx shadcn@latest add @plate/docs\n```\n\nThis will:\n- Install MDX documentation files in your project (typically in a `docs/` or similar directory)\n- Skip the Fumadocs setup entirely\n- Give you raw MDX files to use however you need\n\nUse cases:\n- Reference documentation directly in your codebase\n- Integrate with your existing documentation setup\n- Make docs available to AI tools for better context\n\n## Advanced Integration\n\n### MCP Integration\n\nEnable AI tools to work with your local documentation by adding the Plate server to your `.cursor/mcp.json` (or equivalent).\n\n```json\n{\n \"mcpServers\": {\n \"shadcn\": {\n \"description\": \"Shadcn and Plate MCP\",\n \"command\": \"npx\",\n \"args\": [\n \"shadcn@latest\",\n \"mcp\"\n ]\n }\n }\n}\n```\n\nYour AI tools can then:\n* Access documentation context for better code assistance\n* Help manage and update documentation\n* Generate code with proper imports and configurations\n* Assist with editor setup and feature integration\n\nSee the [MCP Guide](/docs/installation/mcp) for more details.\n\n<Callout>\n Once configured, try asking your AI:\n ```bash\n \"Help me understand how the Plate AI plugin works\"\n \"How to create a custom plugin?\"\n \"What's new in the latest Plate version?\"\n ```\n</Callout>\n\n### Centralizing Multiple Documentations\n\nYour `content/docs/` directory can host documentation for multiple libraries. Replicate the process for Plate to add docs for other internal or external tools:\n\n```plaintext\ncontent/\n└── docs/\n ├── plate/ # Plate documentation\n │ └── ...\n ├── other-library/ # Documentation for another library\n │ └── ...\n └── index.mdx # Main landing page for all docs\n```\n\nThis creates a unified, version-controlled knowledge base for your project stack.",
1111
"type": "registry:file",
1212
"target": "content/docs/plate/installation/docs.mdx"
1313
}

0 commit comments

Comments
 (0)