diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e04e1c0b..0f6ffc70 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -26,6 +26,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + fetch-depth: 0 # Run a build step here - name: Setup Node.js environment @@ -60,25 +63,30 @@ jobs: # Run a action to publish docs - name: Publish to Cloudflare Pages - uses: unlike-ltd/github-actions-cloudflare-pages@v1.1.2 + uses: zernonia/cloudflare-pages-action@v0.0.7 with: cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }} cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} cloudflare-project-name: shadcn-vue directory: .vitepress/dist + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + # Optional: Switch what branch you are publishing to. + # By default this will be the branch which triggered this workflow + branch: ${{ github.ref == 'refs/heads/dev' && 'dev' || format('refs/pull/{0}/merge', github.event.number) }} + # Optional: Change the working directory + workingDirectory: apps/www + wranglerVersion: '3' + + - name: Remove label + if: ${{ github.event_name == 'pull_request_target' && contains(github.event.label.name, '🚀request-deploy') }} + uses: actions/github-script@v6 + with: github-token: ${{ secrets.GITHUB_TOKEN }} - github-environment: ${{ github.event.pull_request.head.ref }} - # uses: cloudflare/pages-action@v1.5.0 - # with: - # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - # accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - # projectName: shadcn-vue - # directory: .vitepress/dist - # # Optional: Enable this if you want to have GitHub Deployments triggered - # gitHubToken: ${{ secrets.GITHUB_TOKEN }} - # # Optional: Switch what branch you are publishing to. - # # By default this will be the branch which triggered this workflow - # branch: refs/pull/${{ github.event.number }}/merge - # # Optional: Change the working directory - # workingDirectory: apps/www - # wranglerVersion: '3' + script: | + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: ['🚀request-deploy'] + }) \ No newline at end of file diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index 42998819..0e2a62c3 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -3,9 +3,17 @@ import { defineConfig } from 'vitepress' import Icons from 'unplugin-icons/vite' import tailwind from 'tailwindcss' import autoprefixer from 'autoprefixer' +import { createCssVariablesTheme } from 'shikiji' import { siteConfig } from './theme/config/site' import ComponentPreviewPlugin from './theme/plugins/previewer' +const cssVariables = createCssVariablesTheme({ + name: 'css-variables', + variablePrefix: '--shiki-', + variableDefaults: {}, + fontStyle: true, +}) + // https://vitepress.dev/reference/site-config export default defineConfig({ title: siteConfig.name, @@ -50,7 +58,7 @@ export default defineConfig({ srcDir: path.resolve(__dirname, '../src'), markdown: { - theme: 'css-variables', + theme: cssVariables, config(md) { md.use(ComponentPreviewPlugin) }, diff --git a/apps/www/.vitepress/theme/styles/shiki.css b/apps/www/.vitepress/theme/styles/shiki.css index 0ede8ffb..89c8ff24 100644 --- a/apps/www/.vitepress/theme/styles/shiki.css +++ b/apps/www/.vitepress/theme/styles/shiki.css @@ -1,5 +1,5 @@ :root { - --shiki-color-text: #EEEEEE; + --shiki-foreground: #EEEEEE; --shiki-color-background: #ffffff; --shiki-token-constant: #ffffff; --shiki-token-string: #ffffff88; diff --git a/apps/www/package.json b/apps/www/package.json index 85f2a22d..83ca3d93 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -15,28 +15,28 @@ "build:registry-strict": "pnpm typecheck:registry && tsx ./scripts/build-registry.ts" }, "dependencies": { - "@formkit/auto-animate": "^0.8.0", + "@formkit/auto-animate": "^0.8.1", "@morev/vue-transitions": "^2.3.6", "@radix-icons/vue": "^1.0.0", "@stackblitz/sdk": "^1.9.0", - "@tanstack/vue-table": "^8.10.7", - "@unovis/ts": "^1.2.3", - "@unovis/vue": "1.3.0-beta.3", - "@vee-validate/zod": "^4.12.3", - "@vueuse/core": "^10.5.0", + "@tanstack/vue-table": "^8.11.6", + "@unovis/ts": "^1.3.1", + "@unovis/vue": "^1.3.1", + "@vee-validate/zod": "^4.12.4", + "@vueuse/core": "^10.7.2", "class-variance-authority": "^0.7.0", - "clsx": "^2.0.0", + "clsx": "^2.1.0", "codesandbox": "^2.2.3", "date-fns": "^2.30.0", "embla-carousel": "8.0.0-rc19", "embla-carousel-autoplay": "8.0.0-rc19", "embla-carousel-vue": "8.0.0-rc19", "lucide-vue-next": "^0.276.0", - "radix-vue": "^1.3.0", + "radix-vue": "^1.3.2", "tailwindcss-animate": "^1.0.7", "v-calendar": "^3.1.2", - "vee-validate": "4.12.3", - "vue": "^3.4.7", + "vee-validate": "4.12.4", + "vue": "^3.4.14", "vue-wrap-balancer": "^1.1.3", "zod": "^3.22.4" }, @@ -47,22 +47,23 @@ "@iconify/vue": "^4.1.1", "@types/lodash.template": "^4.5.2", "@types/node": "^20.8.10", - "@vitejs/plugin-vue": "^4.4.0", - "@vitejs/plugin-vue-jsx": "^3.0.2", - "@vue/compiler-core": "^3.3.7", - "@vue/compiler-dom": "^3.3.7", + "@vitejs/plugin-vue": "^5.0.3", + "@vitejs/plugin-vue-jsx": "^3.1.0", + "@vue/compiler-core": "^3.4.14", + "@vue/compiler-dom": "^3.4.14", "@vue/tsconfig": "^0.5.1", "autoprefixer": "^10.4.16", "lodash.template": "^4.5.0", "pathe": "^1.1.2", "rimraf": "^5.0.5", - "tailwind-merge": "^2.0.0", - "tailwindcss": "^3.3.5", + "shikiji": "^0.10.0-beta.2", + "tailwind-merge": "^2.2.0", + "tailwindcss": "^3.4.1", "tsx": "^4.7.0", "typescript": "^5.3.3", "unplugin-icons": "^0.17.1", - "vite": "^4.5.0", - "vitepress": "^1.0.0-rc.24", + "vite": "^5.0.11", + "vitepress": "^1.0.0-rc.37", "vue-tsc": "^1.8.27" } } diff --git a/apps/www/src/content/docs/components/form.md b/apps/www/src/content/docs/components/form.md index 3dd47c3e..cf275dcc 100644 --- a/apps/www/src/content/docs/components/form.md +++ b/apps/www/src/content/docs/components/form.md @@ -173,7 +173,7 @@ const formSchema = toTypedSchema(z.object({ ### Define a form -Use the `useForm` composable from `vee-validate` or use `
` component to create a from. +Use the `useForm` composable from `vee-validate` or use `` component to create a form. diff --git a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue index 64f8cf3f..9415ce64 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -68,7 +68,7 @@ onMounted(async () => { diff --git a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue index 409b07f7..182ad770 100644 --- a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue @@ -67,7 +67,7 @@ onMounted(async () => {