From f51a8da08d287267f9d05de4845f702b7732bb64 Mon Sep 17 00:00:00 2001
From: LeeChan <114982593+rookie-orange@users.noreply.github.com>
Date: Sat, 13 Apr 2024 00:03:24 +0800
Subject: [PATCH 1/4] docs: add `vaul-vue` scale background note (#481)
---
apps/www/src/content/docs/components/drawer.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/apps/www/src/content/docs/components/drawer.md b/apps/www/src/content/docs/components/drawer.md
index 55b6f0c2..20dcf43c 100644
--- a/apps/www/src/content/docs/components/drawer.md
+++ b/apps/www/src/content/docs/components/drawer.md
@@ -53,6 +53,13 @@ import {
```
+### Scale Background
+
+If you want the background to have a zoom effect, you need to add the `vaul-drawer-wrapper` attribute to the root component.
+
+```html
+
+```
## Examples
From 798aa0ec24a0e9028a87d3bdb03f8a76a4327b18 Mon Sep 17 00:00:00 2001
From: Saeid Zareie <65568529+Saeid-Za@users.noreply.github.com>
Date: Sat, 13 Apr 2024 05:15:06 +0330
Subject: [PATCH 2/4] fix: oxc-parser wasm issue (#484)
---
apps/www/package.json | 2 +-
apps/www/src/lib/registry/registry.ts | 6 +-
packages/module/package.json | 2 +-
packages/module/src/module.ts | 8 +--
pnpm-lock.yaml | 81 +++------------------------
5 files changed, 16 insertions(+), 83 deletions(-)
diff --git a/apps/www/package.json b/apps/www/package.json
index 49249665..d72e725e 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -50,6 +50,7 @@
"@iconify-json/simple-icons": "^1.1.94",
"@iconify-json/tabler": "^1.1.106",
"@iconify/vue": "^4.1.1",
+ "@oxc-parser/wasm": "^0.1.0",
"@shikijs/transformers": "^1.3.0",
"@types/lodash.template": "^4.5.3",
"@types/node": "^20.12.7",
@@ -60,7 +61,6 @@
"@vue/tsconfig": "^0.5.1",
"autoprefixer": "^10.4.19",
"lodash.template": "^4.5.0",
- "oxc-parser": "^0.8.0",
"pathe": "^1.1.2",
"rimraf": "^5.0.5",
"shiki": "^1.3.0",
diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts
index 6c80707e..cd758c25 100644
--- a/apps/www/src/lib/registry/registry.ts
+++ b/apps/www/src/lib/registry/registry.ts
@@ -1,7 +1,7 @@
import { readFile, readdir } from 'node:fs/promises'
import { join, normalize, resolve } from 'pathe'
import { compileScript, parse } from 'vue/compiler-sfc'
-import oxc from 'oxc-parser'
+import { parseSync } from '@oxc-parser/wasm'
import type { Registry } from '../../lib/registry'
@@ -162,12 +162,12 @@ async function getDependencies(filename: string) {
}
if (filename.endsWith('.ts')) {
- const ast = oxc.parseSync(code, {
+ const ast = parseSync(code, {
sourceType: 'module',
sourceFilename: filename,
})
- const sources = JSON.parse(ast.program).body.filter((i: any) => i.type === 'ImportDeclaration').map((i: any) => i.source)
+ const sources = ast.program.body.filter((i: any) => i.type === 'ImportDeclaration').map((i: any) => i.source)
sources.forEach((source: any) => {
populateDeps(source.value)
})
diff --git a/packages/module/package.json b/packages/module/package.json
index ce95f83e..01fe7871 100644
--- a/packages/module/package.json
+++ b/packages/module/package.json
@@ -36,7 +36,7 @@
},
"dependencies": {
"@nuxt/kit": "^3.11.2",
- "oxc-parser": "^0.8.0"
+ "@oxc-parser/wasm": "^0.1.0"
},
"devDependencies": {
"@nuxt/devtools": "latest",
diff --git a/packages/module/src/module.ts b/packages/module/src/module.ts
index 34c742e7..4a6c8c5c 100644
--- a/packages/module/src/module.ts
+++ b/packages/module/src/module.ts
@@ -1,7 +1,7 @@
import { readFileSync, readdirSync } from 'node:fs'
import { join } from 'node:path'
import { addComponent, createResolver, defineNuxtModule } from '@nuxt/kit'
-import oxc from 'oxc-parser'
+import { parseSync } from '@oxc-parser/wasm'
// TODO: add test to make sure all registry is being parse correctly
// Module options TypeScript interface definition
@@ -44,14 +44,12 @@ export default defineNuxtModule({
try {
const filePath = await resolvePath(join(COMPONENT_DIR_PATH, dir, 'index'), { extensions: ['.ts', '.js'] })
const content = readFileSync(filePath, { encoding: 'utf8' })
- const ast = oxc.parseSync(content, {
+ const ast = parseSync(content, {
sourceType: 'module',
sourceFilename: filePath,
})
- const program = JSON.parse(ast.program)
- const exportedKeys: string[] = program.body
- // @ts-expect-error parse return any
+ const exportedKeys: string[] = ast.program.body
.filter(node => node.type === 'ExportNamedDeclaration')
// @ts-expect-error parse return any
.flatMap(node => node.specifiers.map(specifier => specifier.exported.name))
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ca32b1a2..2eeabebe 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -141,6 +141,9 @@ importers:
'@iconify/vue':
specifier: ^4.1.1
version: 4.1.1(vue@3.4.21)
+ '@oxc-parser/wasm':
+ specifier: ^0.1.0
+ version: 0.1.0
'@shikijs/transformers':
specifier: ^1.3.0
version: 1.3.0
@@ -171,9 +174,6 @@ importers:
lodash.template:
specifier: ^4.5.0
version: 4.5.0
- oxc-parser:
- specifier: ^0.8.0
- version: 0.8.0
pathe:
specifier: ^1.1.2
version: 1.1.2
@@ -310,9 +310,9 @@ importers:
'@nuxt/kit':
specifier: ^3.11.2
version: 3.11.2(rollup@3.29.4)
- oxc-parser:
- specifier: ^0.8.0
- version: 0.8.0
+ '@oxc-parser/wasm':
+ specifier: ^0.1.0
+ version: 0.1.0
devDependencies:
'@nuxt/devtools':
specifier: latest
@@ -3031,61 +3031,8 @@ packages:
- vue-tsc
dev: true
- /@oxc-parser/binding-darwin-arm64@0.8.0:
- resolution: {integrity: sha512-3Dws5Wzj9efojjqvhS4ZF+Abh0EoiI5ciOE2kdLifMzSg4fnmYAIOktoUnPEo87TNIb4SiFJ5JgPBgEyq42Eow==}
- cpu: [arm64]
- os: [darwin]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-darwin-x64@0.8.0:
- resolution: {integrity: sha512-DAUJ/mfq0Jn2VDYn69bhHTsIWj+aZ/viamexFwaLL7ntkIFmGpzAJZUlWofpY1IRJynKWW+P5AOLYXMllw4qUw==}
- cpu: [x64]
- os: [darwin]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-linux-arm64-gnu@0.8.0:
- resolution: {integrity: sha512-ZHQVey/O4K3zTIKtpfsbtJIE8MPTRHRxgY3dejaoeFQGf9C3HasgF132Yp4zN/jOUx+x8czKPVa/Af40ViyhGQ==}
- cpu: [arm64]
- os: [linux]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-linux-arm64-musl@0.8.0:
- resolution: {integrity: sha512-Diw+Tnf5v+zAYXzDoSKCZsMaroU6GoqZMS7smfDtFnZYTHWZrsTmPBLUQe7AFiG7O7tkhsCdcWjOYgbVkrSVOA==}
- cpu: [arm64]
- os: [linux]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-linux-x64-gnu@0.8.0:
- resolution: {integrity: sha512-WloqcRrtQUVEP/Sy8ZeEgF0HgBKQjOv3zLFZqbC5ipkerKriGcVbsq3fOIMOi/55AM6/UhIAjeZGnoeco72JjQ==}
- cpu: [x64]
- os: [linux]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-linux-x64-musl@0.8.0:
- resolution: {integrity: sha512-2j7BD9szwSXTvSj0Q8VE98UHGYvrgZzdLy4EyB0FilhQnopEfz+YV674rWGY2Il1VYxHJwGctrTJHvARolu37g==}
- cpu: [x64]
- os: [linux]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-win32-arm64-msvc@0.8.0:
- resolution: {integrity: sha512-mcomr1og17yCmnwn8Q7CRzrH9Va0HccWe4Ld3/u/elBsw0SEzYGVvECRzCyRglYAbKTtusz7as9Jee0RiMOMmg==}
- cpu: [arm64]
- os: [win32]
- requiresBuild: true
- optional: true
-
- /@oxc-parser/binding-win32-x64-msvc@0.8.0:
- resolution: {integrity: sha512-nIBkc1KZOVYUaHT3+U+gM354P3byMAIXMvlmLMbs0kWVRcI4vrzL8qwWpC6QdBQxWKZGqPEqGolv8H4dDYA9nQ==}
- cpu: [x64]
- os: [win32]
- requiresBuild: true
- optional: true
+ /@oxc-parser/wasm@0.1.0:
+ resolution: {integrity: sha512-oA7XhTbg9rRBJhIzxCNhJwYmON/9LFAH4GBQxl7HWmGSS6HTrb2t6Peq82nxY0W7knguH52neh9T7zs27FVvsQ==}
/@parcel/watcher-android-arm64@2.4.1:
resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==}
@@ -11405,18 +11352,6 @@ packages:
os-tmpdir: 1.0.2
dev: false
- /oxc-parser@0.8.0:
- resolution: {integrity: sha512-ObPeMkbDX7igb7NyyAC8CbVC3fY+YmlMsxsRQ2oyFBkpQtI5tjoyqSDKbS9A9EcJvt2q89C4UoC+HjVBdLYYJg==}
- optionalDependencies:
- '@oxc-parser/binding-darwin-arm64': 0.8.0
- '@oxc-parser/binding-darwin-x64': 0.8.0
- '@oxc-parser/binding-linux-arm64-gnu': 0.8.0
- '@oxc-parser/binding-linux-arm64-musl': 0.8.0
- '@oxc-parser/binding-linux-x64-gnu': 0.8.0
- '@oxc-parser/binding-linux-x64-musl': 0.8.0
- '@oxc-parser/binding-win32-arm64-msvc': 0.8.0
- '@oxc-parser/binding-win32-x64-msvc': 0.8.0
-
/p-finally@1.0.0:
resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==}
engines: {node: '>=4'}
From cedce319ba923dc96333178e115b3aba03aff5d9 Mon Sep 17 00:00:00 2001
From: Onur Usluca <51825926+onurusluca@users.noreply.github.com>
Date: Sun, 14 Apr 2024 19:10:16 +0900
Subject: [PATCH 3/4] docs: update popover.md (#491)
Description only had the closing tag and it was wrong. Added the opening tag, fixed the closing tag and some text.
---
apps/www/src/content/docs/components/popover.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/www/src/content/docs/components/popover.md b/apps/www/src/content/docs/components/popover.md
index 78263750..beded319 100644
--- a/apps/www/src/content/docs/components/popover.md
+++ b/apps/www/src/content/docs/components/popover.md
@@ -29,7 +29,9 @@ import {
Open popover
-
+
+ Some popover content
+
```
From f7e475f16a7dfa546ac64cf47dcc85b12370f623 Mon Sep 17 00:00:00 2001
From: Selemondev <106826371+selemondev@users.noreply.github.com>
Date: Sun, 14 Apr 2024 22:24:10 +0300
Subject: [PATCH 4/4] docs: use `nuxi` command for modules installation (#493)
---
apps/www/src/content/docs/installation/nuxt.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/www/src/content/docs/installation/nuxt.md b/apps/www/src/content/docs/installation/nuxt.md
index c5dc56ac..2e5567e1 100644
--- a/apps/www/src/content/docs/installation/nuxt.md
+++ b/apps/www/src/content/docs/installation/nuxt.md
@@ -23,7 +23,7 @@ npm install -D typescript
### Install TailwindCSS module
```bash
-npm install -D @nuxtjs/tailwindcss
+npx nuxi@latest module add @nuxtjs/tailwindcss
```
### Add `Nuxt` module
@@ -36,7 +36,7 @@ npm install -D @nuxtjs/tailwindcss
Install the package below.
```bash
- npm install -D shadcn-nuxt
+ npx nuxi@latest module add shadcn-nuxt
```