From c40cf6ea4279687ab7b00a10881dc11cb1b7296a Mon Sep 17 00:00:00 2001
From: estel <690930@qq.com>
Date: Mon, 28 Jul 2025 20:09:54 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E6=89=80=E6=9C=89=20simple-i?=
=?UTF-8?q?cons?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/components/content/ColorModeSwitch.vue | 33 ++++
app/components/content/Stack.vue | 24 +++
content/1.简单文档/1.index.md | 42 +++++
content/1.简单文档/2.installation.md | 201 +++++++++++++++++++++
package.json | 4 +-
patch-ui-pro.zsh | 33 ++++
pnpm-lock.yaml | 11 ++
7 files changed, 347 insertions(+), 1 deletion(-)
create mode 100644 app/components/content/ColorModeSwitch.vue
create mode 100644 app/components/content/Stack.vue
create mode 100755 patch-ui-pro.zsh
diff --git a/app/components/content/ColorModeSwitch.vue b/app/components/content/ColorModeSwitch.vue
new file mode 100644
index 0000000..646d349
--- /dev/null
+++ b/app/components/content/ColorModeSwitch.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/components/content/Stack.vue b/app/components/content/Stack.vue
new file mode 100644
index 0000000..67a8e9a
--- /dev/null
+++ b/app/components/content/Stack.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/content/1.简单文档/1.index.md b/content/1.简单文档/1.index.md
index bb363e1..c84a8f1 100644
--- a/content/1.简单文档/1.index.md
+++ b/content/1.简单文档/1.index.md
@@ -6,6 +6,48 @@ navigation:
---
+::::code-group
+
+```bash [pnpm]
+pnpm add @nuxt/ui-pro@next
+```
+
+```bash [yarn]
+yarn add @nuxt/ui-pro@next
+```
+
+```bash [npm]
+npm install @nuxt/ui-pro@next
+```
+
+```bash [bun]
+bun add @nuxt/ui-pro@next
+```
+::::
+
+
+
+## Usage
+::note
+You can pass any property from the HTML `
` element such as `alt`, `loading`, etc.
+::
+
+::stack
+ ::div{class="p-4 space-x-2"}
+ :icon{name="lucide:box" class="size-6"}
+ :icon{name="vscode-icons:file-type-js-official" class="size-6"}
+ :icon{name="vscode-icons:file-type-vue" class="size-6"}
+ :icon{name="vscode-icons:file-type-nuxt" class="size-6"}
+ ::
+
+ ```mdc
+ :icon{name="lucide:box"}
+ :icon{name="vscode-icons:file-type-js-official"}
+ :icon{name="vscode-icons:file-type-vue"}
+ :icon{name="vscode-icons:file-type-nuxt" :size="30"}
+ ```
+::
+
::ETabs
::div{label="PostgreSQL" icon="lucide:database"}
### PostgreSQL column types
diff --git a/content/1.简单文档/2.installation.md b/content/1.简单文档/2.installation.md
index caf4208..7ada16e 100644
--- a/content/1.简单文档/2.installation.md
+++ b/content/1.简单文档/2.installation.md
@@ -5,6 +5,207 @@ navigation:
icon: lucide-download
---
+
+::ProseImg{src="https://lijue-me.oss-cn-chengdu.aliyuncs.com/20250727184358217.png"}
+::
+
+::stack
+ ::div{class="p-6 text-3xl font-bold"}
+ ✨ shadcn-docs-nuxt
+ ::
+
+ ```mdc
+ ---
+ title: Installation
+ description: How to install shadcn-docs-nuxt in your app.
+ icon: lucide:play
+ ---
+
+ ## Using the starter template
+ ```
+
+
+ :read-more{title="Installation" to="/getting-started/installation"}
+
+ ::card
+ ---
+ title: Components
+ icon: lucide:box
+ ---
+ See MDC components provided by **shadcn-docs-nuxt**.
+ ::
+::
+
+::field-group
+ ::field{name="withDefault" type="boolean" defaultValue="true"}
+ A field with a default value.
+ ::
+ ::field{name="requiredField" type="boolean" required}
+ A required field.
+ ::
+ ::field{name="clear (path?: string)" type="void"}
+ Clears form errors associated with a specific path. If no path is provided, clears all form errors.
+ ::
+ ::field{name="getErrors (path?: string)" type="FormError[]"}
+ Retrieves form errors associated with a specific path. If no path is provided, returns all form errors.
+ ::
+ ::field{name="setErrors (errors: FormError[], path?: string)" type="void"}
+ Sets form errors for a given path. If no path is provided, overrides all errors.
+ ::
+ ::field{name="errors" type="Ref"}
+ A reference to the array containing validation errors. Use this to access or manipulate the error information.
+ ::
+::
+::code-tree{defaultValue="nuxt.config.ts"}
+
+```css [app/assets/main.css]
+@import "tailwindcss" theme(static);
+@import "@nuxt/ui-pro";
+```
+
+```ts [app/app.config.ts]
+export default defineAppConfig({
+ ui: {
+ colors: {
+ primary: 'sky',
+ colors: 'slate'
+ }
+ }
+});
+```
+
+```vue [app/app.vue]
+
+
+
+
+
+```
+
+```json [package.json]
+{
+ "name": "nuxt-app",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "build": "nuxt build",
+ "dev": "nuxt dev",
+ "generate": "nuxt generate",
+ "preview": "nuxt preview",
+ "postinstall": "nuxt prepare",
+ "typecheck": "nuxt typecheck"
+ },
+ "dependencies": {
+ "@iconify-json/lucide": "^1.2.18",
+ "@nuxt/ui-pro": "3.0.0-alpha.10",
+ "nuxt": "^3.15.1"
+ },
+ "devDependencies": {
+ "typescript": "^5.7.2",
+ "vue-tsc": "^2.2.0"
+ }
+}
+```
+
+```json [tsconfig.json]
+{
+ "extends": "./.nuxt/tsconfig.json"
+}
+```
+
+```ts [nuxt.config.ts]
+export default defineNuxtConfig({
+ modules: ['@nuxt/ui-pro'],
+
+ future: {
+ compatibilityVersion: 4
+ },
+
+ css: ['~/assets/main.css']
+});
+```
+
+````md [README.md]
+# Nuxt 3 Minimal Starter
+
+Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
+
+## Setup
+
+Make sure to install the dependencies:
+
+```bash
+# npm
+npm install
+
+# pnpm
+pnpm install
+
+# yarn
+yarn install
+
+# bun
+bun install
+```
+
+## Development Server
+
+Start the development server on `http://localhost:3000`:
+
+```bash
+# npm
+npm run dev
+
+# pnpm
+pnpm run dev
+
+# yarn
+yarn dev
+
+# bun
+bun run dev
+```
+
+## Production
+
+Build the application for production:
+
+```bash
+# npm
+npm run build
+
+# pnpm
+pnpm run build
+
+# yarn
+yarn build
+
+# bun
+bun run build
+```
+
+Locally preview production build:
+
+```bash
+# npm
+npm run preview
+
+# pnpm
+pnpm run preview
+
+# yarn
+yarn preview
+
+# bun
+bun run preview
+```
+
+Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
+````
+
+::
+
+
::tip{target="_blank" to="https://content.nuxt.com/templates/docs"}
Use this template on Nuxt Studio and start your documentation in seconds.
::
diff --git a/package.json b/package.json
index fd24738..3b9ef04 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,8 @@
"better-sqlite3": "^12.2.0",
"nuxt": "^4.0.1",
"nuxt-llms": "0.1.3",
- "nuxt-og-image": "^5.1.9"
+ "nuxt-og-image": "^5.1.9",
+ "{collection_name}": "link:@iconify-json/{collection_name}"
},
"devDependencies": {
"@iconify-json/lucide": "^1.2.57",
@@ -28,6 +29,7 @@
"@nuxt/eslint": "^1.5.2",
"@vueuse/core": "^13.5.0",
"eslint": "^9.31.0",
+ "lucide": "^0.526.0",
"typescript": "^5.8.3",
"vue": "^3.5.17",
"vue-tsc": "^3.0.1"
diff --git a/patch-ui-pro.zsh b/patch-ui-pro.zsh
new file mode 100755
index 0000000..5ae2169
--- /dev/null
+++ b/patch-ui-pro.zsh
@@ -0,0 +1,33 @@
+# 绕过 UI Pro 的 License 验证
+set -euo pipefail
+
+# 1. 禁用 module.mjs 的调用
+MODULE="node_modules/@nuxt/ui-pro/dist/module.mjs"
+if [[ -f $MODULE ]]; then
+ sed -i.bak '/await validateLicense({.*rootDir })/s/^/\/\//; /^await validateLicense({.*rootDir })/s/^/\/\//' "$MODULE"
+ rm -f "$MODULE.bak"
+ echo "✅ module.mjs 已屏蔽"
+fi
+
+# 2. 直接“替换函数” fake 200
+SHARED="node_modules/@nuxt/ui-pro/dist/shared"
+JS=$(find "$SHARED" -maxdepth 1 -name 'ui-pro.*.mjs' | head -n1)
+[[ -z $JS || ! -f $JS ]] && { echo "⚠️ ui-pro.*.mjs 未找到"; exit 0; }
+
+cat <<'EOF' > tmp_func.mjs
+async function validateLicense(opts) {
+ /* --- patched --- */
+ return { status: 200 }
+}
+EOF
+
+sed -i.bak '/^async function validateLicense[^(]*(/,/^\}$/c\
+async function validateLicense(opts) {\
+ /* --- patched --- */\
+ return { status: 200 }\
+}\
+' "$JS"
+rm -f "$JS.bak" tmp_func.mjs
+
+echo "✅ $JS 已 mock 完成"
+echo "🎉 License ⛔ Done!"
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 436c621..2d84ef8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -38,6 +38,9 @@ importers:
nuxt-og-image:
specifier: ^5.1.9
version: 5.1.9(@unhead/vue@2.0.12(vue@3.5.17(typescript@5.8.3)))(magicast@0.3.5)(unstorage@1.16.1(@netlify/blobs@9.1.2)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.6.1))(vite@7.0.6(@types/node@24.0.7)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
+ '{collection_name}':
+ specifier: link:@iconify-json/{collection_name}
+ version: link:@iconify-json/{collection_name}
devDependencies:
'@iconify-json/lucide':
specifier: ^1.2.57
@@ -54,6 +57,9 @@ importers:
eslint:
specifier: ^9.31.0
version: 9.31.0(jiti@2.4.2)
+ lucide:
+ specifier: ^0.526.0
+ version: 0.526.0
typescript:
specifier: ^5.8.3
version: 5.8.3
@@ -4331,6 +4337,9 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+ lucide@0.526.0:
+ resolution: {integrity: sha512-qcefehq2iyryHABeJNDRPxHRtdzWYxB0XVyWnxNjpmO9FtTupLBBc0Q3PFHGyjlmZUxDWr4q1nNepBIkjHeIbA==}
+
luxon@3.6.1:
resolution: {integrity: sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==}
engines: {node: '>=12'}
@@ -11058,6 +11067,8 @@ snapshots:
dependencies:
yallist: 3.1.1
+ lucide@0.526.0: {}
+
luxon@3.6.1: {}
magic-regexp@0.10.0: