diff --git a/.changeset/modern-kids-obey.md b/.changeset/modern-kids-obey.md new file mode 100644 index 00000000..18c4fff8 --- /dev/null +++ b/.changeset/modern-kids-obey.md @@ -0,0 +1,5 @@ +--- +"@devup-ui/wasm": patch +--- + +Optimize keyframe name diff --git a/.changeset/neat-donuts-fix.md b/.changeset/neat-donuts-fix.md new file mode 100644 index 00000000..540a24c2 --- /dev/null +++ b/.changeset/neat-donuts-fix.md @@ -0,0 +1,10 @@ +--- +"@devup-ui/rsbuild-plugin": patch +"@devup-ui/webpack-plugin": patch +"@devup-ui/wasm": patch +"@devup-ui/next-plugin": patch +"@devup-ui/vite-plugin": patch +"@devup-ui/components": patch +--- + +Feat split css diff --git a/.changeset/petite-dragons-carry.md b/.changeset/petite-dragons-carry.md new file mode 100644 index 00000000..8cea4206 --- /dev/null +++ b/.changeset/petite-dragons-carry.md @@ -0,0 +1,8 @@ +--- +"@devup-ui/rsbuild-plugin": patch +"@devup-ui/webpack-plugin": patch +"@devup-ui/next-plugin": patch +"@devup-ui/vite-plugin": patch +--- + +Update option diff --git a/Cargo.lock b/Cargo.lock index 10606525..87f4ef92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,6 +45,15 @@ dependencies = [ "vsimd", ] +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "2.9.1" @@ -252,8 +261,9 @@ checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" name = "css" version = "0.1.0" dependencies = [ + "bimap", "once_cell", - "phf 0.13.1", + "phf", "regex", "rstest", "serde", @@ -264,6 +274,7 @@ dependencies = [ name = "devup-ui-wasm" version = "0.1.0" dependencies = [ + "bimap", "console_error_panic_hook", "css", "extractor", @@ -316,7 +327,7 @@ dependencies = [ "oxc_parser", "oxc_span", "oxc_syntax", - "phf 0.13.1", + "phf", "rstest", "serial_test", "strum", @@ -647,9 +658,9 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e887a8496b18a4bce4a760ae2dbd50e5137fa2a27ee99087797d7b8e860a7b5c" +checksum = "1dad79355dfb8a36a772d2aa758e429ae02f533d33c314f538d20ef188db0147" dependencies = [ "allocator-api2", "bumpalo", @@ -660,9 +671,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931e1fae25d9669204681577381f6e90d2c9fe502d306c862f46ff72bcef8cf7" +checksum = "a9987f0e42aef7eb2deccec8dec26b17c658c8616bb7260a53037b765db708f0" dependencies = [ "bitflags", "oxc_allocator", @@ -676,11 +687,11 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5958a8ac69a955048dabcfcbf8af791dbb7f598bbea5bae33243240f3846457c" +checksum = "08b4b00b34d96543ca44ce82e2e48098197b651b639ff211df48d1725215db08" dependencies = [ - "phf 0.12.1", + "phf", "proc-macro2", "quote", "syn", @@ -688,9 +699,9 @@ dependencies = [ [[package]] name = "oxc_ast_visit" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d2ce2cb5be550d7a94fc3b927d4247d69aea57943baafbf6547362831e69a5" +checksum = "522d1393ad48548702a8ff9b747100e9c0959dbd37cd677e12d9ffb5eb7f6490" dependencies = [ "oxc_allocator", "oxc_ast", @@ -700,9 +711,9 @@ dependencies = [ [[package]] name = "oxc_cfg" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d950f4f67648b1995c836bd96ae423cdf6800b2332d1ba5b18fd81166daad2f1" +checksum = "0bdf2665550303cfdc9843e4a7f6d88f3216075f42e38b2c2cc0224bf0ba1632" dependencies = [ "bitflags", "itertools 0.14.0", @@ -715,9 +726,9 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e252dc98109ed7ee39120255f566ee13f8e6016d86fa38137e99768165f60e7" +checksum = "081b3d96db8e9f1677d56a959873f971285bf565276c11d61e7b61affee15790" dependencies = [ "bitflags", "cow-utils", @@ -737,15 +748,15 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b3258dc882e0348934e2a9973cd0d9e3c465642b729842320d23abf835175a" +checksum = "e2d124d0e1498479cd9410b494fe12d4018a1db55400508c0f8d9d0817934dc6" [[package]] name = "oxc_diagnostics" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc24fdf0407c9ecb202efb99fa9870f3623994ae8daae56e696a511894d67ba" +checksum = "0befbac8654a5a1cef8ee9b31ff6cf669c9abde763f30fb12c2c284993c86498" dependencies = [ "cow-utils", "oxc-miette", @@ -754,9 +765,9 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfc9801af5b0068e11061ff8100fb38c2ca0875c696aa405b5505d212b5e2f" +checksum = "1c59f9f0cfb236ae7b1e8f1be956f3585078256d8a4f8881cbe3b02edd7c57b1" dependencies = [ "cow-utils", "num-bigint", @@ -769,9 +780,9 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac265e2cd8c77ac8d4230f1538e8ff9f6f5d9e41b9107af58f8d3c4626b028" +checksum = "70bffad4cb83abd3db5310ccdb5f298b19377244d43eda7ec3912b544452bcb2" [[package]] name = "oxc_index" @@ -781,9 +792,9 @@ checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392" [[package]] name = "oxc_parser" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b4427e7c4d4507bb4561c113e25bbbb737d03355f311d3fb606f0029fdcb3f6" +checksum = "90a651f61f532b9c5485c65786363b42c3a711ba60871746740409f381b49bea" dependencies = [ "bitflags", "cow-utils", @@ -804,25 +815,25 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ec07cb1081ed5798e2ef7d3e10154784cd1bf47c5170ff3d519d44bc97ad07" +checksum = "8b97261c926b800200a07309eefc7b5801432ed3a91b76b5ea9780f97fc961d4" dependencies = [ "bitflags", "oxc_allocator", "oxc_ast_macros", "oxc_diagnostics", "oxc_span", - "phf 0.12.1", + "phf", "rustc-hash", "unicode-id-start", ] [[package]] name = "oxc_semantic" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8191888545927293275ff32593584327dbd2c5805345abba1236f6febe55b567" +checksum = "b594d9a93b359ba5421118c0cc2664795138e171ffb60c345e621fc8ea4cf4dd" dependencies = [ "itertools 0.14.0", "oxc_allocator", @@ -835,7 +846,7 @@ dependencies = [ "oxc_index", "oxc_span", "oxc_syntax", - "phf 0.12.1", + "phf", "rustc-hash", "self_cell", ] @@ -856,9 +867,9 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008d14e804d79adac31c5cb5b27fbfde52055a0cf86276c9b822cfa40b24d75c" +checksum = "1948fe931738f956b2c673804bce7f93b3dc8fcb4575485ef65adc15fcae3d92" dependencies = [ "compact_str", "oxc-miette", @@ -869,9 +880,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.82.3" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675313926fe94e71b9cdf6ed0338e0bfb40e827e2b5fd0c65a059aff002e7fa2" +checksum = "ad28a43d5b4ccf4f286b68f377d364790c098128729b44a52421cf9de2ce3ec0" dependencies = [ "bitflags", "cow-utils", @@ -883,7 +894,7 @@ dependencies = [ "oxc_estree", "oxc_index", "oxc_span", - "phf 0.12.1", + "phf", "rustc-hash", "unicode-id-start", ] @@ -929,38 +940,17 @@ dependencies = [ "serde", ] -[[package]] -name = "phf" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" -dependencies = [ - "phf_macros 0.12.1", - "phf_shared 0.12.1", - "serde", -] - [[package]] name = "phf" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_macros 0.13.1", - "phf_shared 0.13.1", + "phf_macros", + "phf_shared", "serde", ] -[[package]] -name = "phf_generator" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cbb1126afed61dd6368748dae63b1ee7dc480191c6262a3b4ff1e29d86a6c5b" -dependencies = [ - "fastrand", - "phf_shared 0.12.1", -] - [[package]] name = "phf_generator" version = "0.13.1" @@ -968,20 +958,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ "fastrand", - "phf_shared 0.13.1", -] - -[[package]] -name = "phf_macros" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713258393a82f091ead52047ca779d37e5766226d009de21696c4e667044368" -dependencies = [ - "phf_generator 0.12.1", - "phf_shared 0.12.1", - "proc-macro2", - "quote", - "syn", + "phf_shared", ] [[package]] @@ -990,22 +967,13 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ - "phf_generator 0.13.1", - "phf_shared 0.13.1", + "phf_generator", + "phf_shared", "proc-macro2", "quote", "syn", ] -[[package]] -name = "phf_shared" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" -dependencies = [ - "siphasher", -] - [[package]] name = "phf_shared" version = "0.13.1" diff --git a/apps/landing/next.config.ts b/apps/landing/next.config.ts index b676aed5..43b915ec 100644 --- a/apps/landing/next.config.ts +++ b/apps/landing/next.config.ts @@ -10,11 +10,8 @@ const withMDX = createMDX({ }) export default withMDX( - DevupUI( - { - pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'], - output: 'export', - }, - { include: ['@devup-ui/components', '@devup-ui/reset-css'] }, - ), + DevupUI({ + pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'], + output: 'export', + }), ) diff --git a/apps/landing/package.json b/apps/landing/package.json index e5c7229a..dbdd0c7a 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -16,15 +16,15 @@ "@devup-ui/reset-css": "workspace:*", "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", - "@next/mdx": "^15.5.0", + "@next/mdx": "^15.5.2", "@types/mdx": "^2.0.13", "body-scroll-lock": "3.1.5", "clsx": "^2.1.1", - "next": "^15.5.0", + "next": "^15.5.2", "react": "^19.1.1", "react-dom": "^19.1.1", "react-markdown": "^10.1.0", - "react-syntax-highlighter": "^15.6.1", + "react-syntax-highlighter": "^15.6.6", "remark-gfm": "^4.0.1" }, "devDependencies": { diff --git a/apps/next/package.json b/apps/next/package.json index 77dc77ba..bb6490a7 100644 --- a/apps/next/package.json +++ b/apps/next/package.json @@ -12,7 +12,7 @@ "dependencies": { "react": "^19.1.1", "react-dom": "^19.1.1", - "next": "^15.5.0", + "next": "^15.5.2", "@devup-ui/react": "workspace:*" }, "devDependencies": { diff --git a/apps/rsbuild/package.json b/apps/rsbuild/package.json index 1d7b4c02..372902aa 100644 --- a/apps/rsbuild/package.json +++ b/apps/rsbuild/package.json @@ -15,8 +15,8 @@ "@devup-ui/react": "workspace:*" }, "devDependencies": { - "@rsbuild/core": "^1.4.15", - "@rsbuild/plugin-react": "^1.3.5", + "@rsbuild/core": "^1.5.1", + "@rsbuild/plugin-react": "^1.4.0", "@devup-ui/rsbuild-plugin": "workspace:*" } } \ No newline at end of file diff --git a/apps/rsbuild/rsbuild.config.mjs b/apps/rsbuild/rsbuild.config.mjs index bbf18ab0..761daf4c 100644 --- a/apps/rsbuild/rsbuild.config.mjs +++ b/apps/rsbuild/rsbuild.config.mjs @@ -1,7 +1,7 @@ -import { defineConfig } from '@rsbuild/core'; -import { pluginReact } from '@rsbuild/plugin-react'; -import { DevupUIRsbuildPlugin } from '@devup-ui/rsbuild-plugin'; +import { DevupUI } from '@devup-ui/rsbuild-plugin' +import { defineConfig } from '@rsbuild/core' +import { pluginReact } from '@rsbuild/plugin-react' export default defineConfig({ - plugins: [pluginReact(), DevupUIRsbuildPlugin()], -}); + plugins: [pluginReact(), DevupUI()], +}) diff --git a/apps/vite-lib/package.json b/apps/vite-lib/package.json index de0727b6..04ba5b10 100644 --- a/apps/vite-lib/package.json +++ b/apps/vite-lib/package.json @@ -18,7 +18,7 @@ "devDependencies": { "vite-plugin-dts": "^4.5.4", "@devup-ui/vite-plugin": "workspace:*", - "@vitejs/plugin-react": "^5.0.1", + "@vitejs/plugin-react": "^5.0.2", "vite": "^7.1.3", "typescript": "^5", "@types/node": "^24", diff --git a/apps/vite/package.json b/apps/vite/package.json index 7560f723..1a0829da 100644 --- a/apps/vite/package.json +++ b/apps/vite/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@devup-ui/vite-plugin": "workspace:*", "vite": "^7.1.3", - "@vitejs/plugin-react": "^5.0.1", + "@vitejs/plugin-react": "^5.0.2", "typescript": "^5", "@types/node": "^24", "@types/react": "^19", diff --git a/apps/vite/src/App.tsx b/apps/vite/src/App.tsx index 88f55b93..cd1263fb 100644 --- a/apps/vite/src/App.tsx +++ b/apps/vite/src/App.tsx @@ -14,7 +14,7 @@ export default function App() { hello - + wf typo diff --git a/apps/vite/vite.config.ts b/apps/vite/vite.config.ts index b41e40a9..456eed06 100644 --- a/apps/vite/vite.config.ts +++ b/apps/vite/vite.config.ts @@ -8,6 +8,7 @@ export default defineConfig({ react(), DevupUI({ include: ['vite-lib-example'], + // singleCss: true, }), ], }) diff --git a/benchmark.js b/benchmark.js index 01f8a8ce..be81bf39 100644 --- a/benchmark.js +++ b/benchmark.js @@ -20,6 +20,11 @@ function clearBuildFile() { recursive: true, force: true, }) + if (existsSync('./benchmark/next-devup-ui-single/.next')) + rmSync('./benchmark/next-devup-ui-single/.next', { + recursive: true, + force: true, + }) if (existsSync('./benchmark/next-mui/.next')) rmSync('./benchmark/next-mui/.next', { recursive: true, @@ -30,6 +35,11 @@ function clearBuildFile() { recursive: true, force: true, }) + if (existsSync('./benchmark/next-devup-ui-single/df')) + rmSync('./benchmark/next-devup-ui-single/df', { + recursive: true, + force: true, + }) } function checkDirSize(path) { @@ -81,3 +91,13 @@ execSync('pnpm -F next-devup-ui-benchmark build', { }) console.timeEnd('devup-ui') console.info('devup-ui', checkDirSize('./benchmark/next-devup-ui/.next')) + +console.time('devup-ui-single') +execSync('pnpm -F next-devup-ui-single-benchmark build', { + stdio: 'inherit', +}) +console.timeEnd('devup-ui-single') +console.info( + 'devup-ui-single', + checkDirSize('./benchmark/next-devup-ui-single/.next'), +) diff --git a/benchmark/next-chakra-ui/package.json b/benchmark/next-chakra-ui/package.json index 6b8d7c04..57b17791 100644 --- a/benchmark/next-chakra-ui/package.json +++ b/benchmark/next-chakra-ui/package.json @@ -10,9 +10,9 @@ "lint": "next lint" }, "dependencies": { - "@chakra-ui/react": "^3.25.0", + "@chakra-ui/react": "^3.26.0", "@emotion/react": "^11.14.0", - "next": "^15.5.0", + "next": "^15.5.2", "next-themes": "^0.4.6", "react": "^19.1.1", "react-dom": "^19.1.1", diff --git a/benchmark/next-devup-ui-single/.gitignore b/benchmark/next-devup-ui-single/.gitignore new file mode 100644 index 00000000..5ef6a520 --- /dev/null +++ b/benchmark/next-devup-ui-single/.gitignore @@ -0,0 +1,41 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/benchmark/next-devup-ui-single/README.md b/benchmark/next-devup-ui-single/README.md new file mode 100644 index 00000000..665152ea --- /dev/null +++ b/benchmark/next-devup-ui-single/README.md @@ -0,0 +1 @@ +## Nextjs App diff --git a/benchmark/next-devup-ui-single/next.config.ts b/benchmark/next-devup-ui-single/next.config.ts new file mode 100644 index 00000000..9e94bd9b --- /dev/null +++ b/benchmark/next-devup-ui-single/next.config.ts @@ -0,0 +1,7 @@ +import { DevupUI } from '@devup-ui/next-plugin' + +const nextConfig = { + /* config options here */ +} + +export default DevupUI(nextConfig, { singleCss: true }) diff --git a/benchmark/next-devup-ui-single/package.json b/benchmark/next-devup-ui-single/package.json new file mode 100644 index 00000000..7488e9b4 --- /dev/null +++ b/benchmark/next-devup-ui-single/package.json @@ -0,0 +1,25 @@ +{ + "name": "next-devup-ui-single-benchmark", + "version": "0.1.0", + "type": "module", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build --experimental-debug-memory-usage", + "start": "next start", + "lint": "eslint" + }, + "dependencies": { + "react": "^19.1.1", + "react-dom": "^19.1.1", + "next": "^15.5.2", + "@devup-ui/react": "workspace:*" + }, + "devDependencies": { + "@devup-ui/next-plugin": "workspace:*", + "typescript": "^5", + "@types/node": "^24", + "@types/react": "^19", + "@types/react-dom": "^19" + } +} \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/public/file.svg b/benchmark/next-devup-ui-single/public/file.svg new file mode 100644 index 00000000..004145cd --- /dev/null +++ b/benchmark/next-devup-ui-single/public/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/public/globe.svg b/benchmark/next-devup-ui-single/public/globe.svg new file mode 100644 index 00000000..567f17b0 --- /dev/null +++ b/benchmark/next-devup-ui-single/public/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/public/next.svg b/benchmark/next-devup-ui-single/public/next.svg new file mode 100644 index 00000000..5174b28c --- /dev/null +++ b/benchmark/next-devup-ui-single/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/public/vercel.svg b/benchmark/next-devup-ui-single/public/vercel.svg new file mode 100644 index 00000000..77053960 --- /dev/null +++ b/benchmark/next-devup-ui-single/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/public/window.svg b/benchmark/next-devup-ui-single/public/window.svg new file mode 100644 index 00000000..b2b2a44f --- /dev/null +++ b/benchmark/next-devup-ui-single/public/window.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/benchmark/next-devup-ui-single/src/app/favicon.ico b/benchmark/next-devup-ui-single/src/app/favicon.ico new file mode 100644 index 00000000..718d6fea Binary files /dev/null and b/benchmark/next-devup-ui-single/src/app/favicon.ico differ diff --git a/benchmark/next-devup-ui-single/src/app/layout.tsx b/benchmark/next-devup-ui-single/src/app/layout.tsx new file mode 100644 index 00000000..6b8b4518 --- /dev/null +++ b/benchmark/next-devup-ui-single/src/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from 'next' + +export const metadata: Metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + {children} + + ) +} diff --git a/benchmark/next-devup-ui-single/src/app/page.tsx b/benchmark/next-devup-ui-single/src/app/page.tsx new file mode 100644 index 00000000..ab9216cc --- /dev/null +++ b/benchmark/next-devup-ui-single/src/app/page.tsx @@ -0,0 +1,51 @@ +'use client' + +import { Box, Text } from '@devup-ui/react' +import { useState } from 'react' + +export default function HomePage() { + const [color, setColor] = useState('yellow') + const [enabled, setEnabled] = useState(false) + + return ( +
+

+ Track & field champions: +

+ + hello + hello + + text + + hello + + hello + +
+ ) +} diff --git a/benchmark/next-devup-ui-single/tsconfig.json b/benchmark/next-devup-ui-single/tsconfig.json new file mode 100644 index 00000000..426d9c2d --- /dev/null +++ b/benchmark/next-devup-ui-single/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": [ + "./src/*" + ] + } + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "df/*.d.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/benchmark/next-devup-ui/package.json b/benchmark/next-devup-ui/package.json index 88e8e973..ade75d14 100644 --- a/benchmark/next-devup-ui/package.json +++ b/benchmark/next-devup-ui/package.json @@ -12,7 +12,7 @@ "dependencies": { "react": "^19.1.1", "react-dom": "^19.1.1", - "next": "^15.5.0", + "next": "^15.5.2", "@devup-ui/react": "workspace:*" }, "devDependencies": { diff --git a/benchmark/next-kuma-ui/package.json b/benchmark/next-kuma-ui/package.json index 2d20bf33..d9d248a2 100644 --- a/benchmark/next-kuma-ui/package.json +++ b/benchmark/next-kuma-ui/package.json @@ -12,7 +12,7 @@ "dependencies": { "react": "^19.1.1", "react-dom": "^19.1.1", - "next": "^15.5.0", + "next": "^15.5.2", "@kuma-ui/core": "^1.5.9" }, "devDependencies": { diff --git a/benchmark/next-mui/package.json b/benchmark/next-mui/package.json index 9cd01cc8..8d0ea7bb 100644 --- a/benchmark/next-mui/package.json +++ b/benchmark/next-mui/package.json @@ -13,7 +13,7 @@ "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", "@mui/material": "7.3.1", - "next": "^15.5.0", + "next": "^15.5.2", "next-themes": "^0.4.6", "react": "^19.1.1", "react-dom": "^19.1.1", diff --git a/bindings/devup-ui-wasm/Cargo.toml b/bindings/devup-ui-wasm/Cargo.toml index 8fbdd2cd..b8502e0d 100644 --- a/bindings/devup-ui-wasm/Cargo.toml +++ b/bindings/devup-ui-wasm/Cargo.toml @@ -29,6 +29,7 @@ once_cell = "1.21.3" js-sys = "0.3.77" serde_json = "1.0.143" serde-wasm-bindgen = "0.6.5" +bimap = { version = "0.6.3", features = ["serde"] } [dev-dependencies] wasm-bindgen-test = "0.3.50" diff --git a/bindings/devup-ui-wasm/src/lib.rs b/bindings/devup-ui-wasm/src/lib.rs index 930cd73f..1e81040d 100644 --- a/bindings/devup-ui-wasm/src/lib.rs +++ b/bindings/devup-ui-wasm/src/lib.rs @@ -1,4 +1,5 @@ use css::class_map::{get_class_map, set_class_map}; +use css::file_map::{get_file_map, get_filename_by_file_num, set_file_map}; use extractor::extract_style::ExtractStyleProperty; use extractor::extract_style::extract_style_value::ExtractStyleValue; use extractor::extract_style::style_property::StyleProperty; @@ -18,6 +19,9 @@ pub struct Output { styles: HashSet, map: Option, default_collected: bool, + single_css: bool, + filename: String, + css_file: String, } #[wasm_bindgen] extern "C" { @@ -39,6 +43,11 @@ impl Output { self.code.clone() } + #[wasm_bindgen(getter)] + pub fn css_file(&self) -> String { + self.css_file.clone() + } + #[wasm_bindgen(getter)] pub fn map(&self) -> Option { self.map.clone() @@ -52,7 +61,11 @@ impl Output { for style in self.styles.iter() { match style { ExtractStyleValue::Static(st) => { - let (cls, _) = match style.extract() { + let (cls, _) = match style.extract(if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }) { Some(StyleProperty::ClassName(cls)) => (cls, None), Some(StyleProperty::Variable { class_name, @@ -68,12 +81,21 @@ impl Output { st.value(), st.selector(), st.style_order(), + if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }, ) { collected = true; } } ExtractStyleValue::Dynamic(dy) => { - let (cls, variable) = match style.extract() { + let (cls, variable) = match style.extract(if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }) { Some(StyleProperty::ClassName(cls)) => (cls, None), Some(StyleProperty::Variable { class_name, @@ -89,6 +111,11 @@ impl Output { &format!("var({})", variable.unwrap()), dy.selector(), dy.style_order(), + if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }, ) { collected = true; } @@ -96,7 +123,13 @@ impl Output { ExtractStyleValue::Keyframes(keyframes) => { if sheet.add_keyframes( - &keyframes.extract().to_string(), + &keyframes + .extract(if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }) + .to_string(), keyframes .keyframes .iter() @@ -115,6 +148,11 @@ impl Output { ) }) .collect(), + if !self.single_css { + Some(self.filename.as_str()) + } else { + None + }, ) { collected = true; } @@ -138,7 +176,11 @@ impl Output { return None; } - Some(sheet.create_css()) + Some(sheet.create_css(if !self.single_css { + Some(&self.filename) + } else { + None + })) } } @@ -155,28 +197,42 @@ pub fn is_debug() -> bool { #[wasm_bindgen(js_name = "importSheet")] pub fn import_sheet(sheet_object: JsValue) -> Result<(), JsValue> { *GLOBAL_STYLE_SHEET.lock().unwrap() = serde_wasm_bindgen::from_value(sheet_object) - .map_err(|e| JsValue::from_str(e.to_string().as_str()))?; + .map_err(|e| JsValue::from_str(&e.to_string()))?; Ok(()) } #[wasm_bindgen(js_name = "exportSheet")] pub fn export_sheet() -> Result { serde_json::to_string(&*GLOBAL_STYLE_SHEET.lock().unwrap()) - .map_err(|e| JsValue::from_str(e.to_string().as_str())) + .map_err(|e| JsValue::from_str(&e.to_string())) } #[wasm_bindgen(js_name = "importClassMap")] pub fn import_class_map(sheet_object: JsValue) -> Result<(), JsValue> { set_class_map( serde_wasm_bindgen::from_value(sheet_object) - .map_err(|e| JsValue::from_str(e.to_string().as_str()))?, + .map_err(|e| JsValue::from_str(&e.to_string()))?, ); Ok(()) } #[wasm_bindgen(js_name = "exportClassMap")] pub fn export_class_map() -> Result { - serde_json::to_string(&get_class_map()).map_err(|e| JsValue::from_str(e.to_string().as_str())) + serde_json::to_string(&get_class_map()).map_err(|e| JsValue::from_str(&e.to_string())) +} + +#[wasm_bindgen(js_name = "importFileMap")] +pub fn import_file_map(sheet_object: JsValue) -> Result<(), JsValue> { + set_file_map( + serde_wasm_bindgen::from_value(sheet_object) + .map_err(|e| JsValue::from_str(&e.to_string()))?, + ); + Ok(()) +} + +#[wasm_bindgen(js_name = "exportFileMap")] +pub fn export_file_map() -> Result { + serde_json::to_string(&get_file_map()).map_err(|e| JsValue::from_str(&e.to_string())) } #[wasm_bindgen(js_name = "codeExtract")] @@ -184,7 +240,8 @@ pub fn code_extract( filename: &str, code: &str, package: &str, - css_file: &str, + css_dir: String, + single_css: bool, ) -> Result { let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); @@ -193,7 +250,8 @@ pub fn code_extract( code, ExtractOption { package: package.to_string(), - css_file: Some(css_file.to_string()), + css_dir, + single_css, }, ) { Ok(output) => Ok(Output { @@ -201,6 +259,9 @@ pub fn code_extract( styles: output.styles, map: output.map, default_collected: sheet.rm_global_css(filename), + single_css, + filename: filename.to_string(), + css_file: output.css_file, }), Err(error) => Err(JsValue::from_str(error.to_string().as_str())), } @@ -222,9 +283,9 @@ pub fn get_default_theme() -> Result, JsValue> { } #[wasm_bindgen(js_name = "getCss")] -pub fn get_css() -> Result { +pub fn get_css(file_num: Option) -> Result { let sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); - Ok(sheet.create_css()) + Ok(sheet.create_css(file_num.map(get_filename_by_file_num).as_deref())) } #[wasm_bindgen(js_name = "getThemeInterface")] @@ -259,7 +320,7 @@ mod tests { let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); *sheet = StyleSheet::default(); } - assert_eq!(get_css().unwrap(), ""); + assert_eq!(get_css(None).unwrap(), ""); { let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap(); @@ -274,7 +335,7 @@ mod tests { sheet.set_theme(theme); } - assert_debug_snapshot!(get_css().unwrap()); + assert_debug_snapshot!(get_css(None).unwrap()); } #[test] diff --git a/libs/css/Cargo.toml b/libs/css/Cargo.toml index 038ce372..b5c66528 100644 --- a/libs/css/Cargo.toml +++ b/libs/css/Cargo.toml @@ -9,6 +9,7 @@ phf = { version = "0.13", features = ["macros"] } serial_test = "3.2.0" serde = { version = "1.0.219", features = ["derive"] } regex = "1.11.2" +bimap = { version = "0.6.3" } [dev-dependencies] rstest = "0.26.1" diff --git a/libs/css/src/class_map.rs b/libs/css/src/class_map.rs index 1d396173..ed30c15b 100644 --- a/libs/css/src/class_map.rs +++ b/libs/css/src/class_map.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::Mutex}; use once_cell::sync::Lazy; -pub(crate) static GLOBAL_CLASS_MAP: Lazy>> = +pub(crate) static GLOBAL_CLASS_MAP: Lazy>>> = Lazy::new(|| Mutex::new(HashMap::new())); /// for test @@ -11,12 +11,12 @@ pub fn reset_class_map() { map.clear(); } -pub fn set_class_map(map: HashMap) { +pub fn set_class_map(map: HashMap>) { let mut global_map = GLOBAL_CLASS_MAP.lock().unwrap(); *global_map = map; } -pub fn get_class_map() -> HashMap { +pub fn get_class_map() -> HashMap> { GLOBAL_CLASS_MAP.lock().unwrap().clone() } @@ -30,17 +30,17 @@ mod tests { #[serial] fn test_set_and_get_class_map() { let mut test_map = HashMap::new(); - test_map.insert("test-key".to_string(), 42); + test_map.insert("".to_string(), HashMap::new()); set_class_map(test_map.clone()); let got = get_class_map(); - assert_eq!(got.get("test-key"), Some(&42)); + assert_eq!(got.get(""), Some(&HashMap::new())); } #[test] #[serial] fn test_reset_class_map() { let mut test_map = HashMap::new(); - test_map.insert("reset-key".to_string(), 1); + test_map.insert("".to_string(), HashMap::new()); set_class_map(test_map); reset_class_map(); let got = get_class_map(); diff --git a/libs/css/src/constant.rs b/libs/css/src/constant.rs index 348ac726..ba095ff8 100644 --- a/libs/css/src/constant.rs +++ b/libs/css/src/constant.rs @@ -168,7 +168,7 @@ pub(super) static N_BASE_ARRAY: [char; 27] = [ 't', 'u', 'v', 'w', 'x', 'y', 'z', '_', ]; -pub(super) static M_BASE_ARRAY: [char; 38] = [ +pub(super) static M_BASE_ARRAY: [char; 37] = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', ]; diff --git a/libs/css/src/file_map.rs b/libs/css/src/file_map.rs new file mode 100644 index 00000000..0af29426 --- /dev/null +++ b/libs/css/src/file_map.rs @@ -0,0 +1,68 @@ +use bimap::BiHashMap; +use std::sync::Mutex; + +use once_cell::sync::Lazy; + +pub(crate) static GLOBAL_FILE_MAP: Lazy>> = + Lazy::new(|| Mutex::new(BiHashMap::new())); + +/// for test +pub fn reset_file_map() { + let mut map = GLOBAL_FILE_MAP.lock().unwrap(); + map.clear(); +} + +pub fn set_file_map(map: BiHashMap) { + let mut global_map = GLOBAL_FILE_MAP.lock().unwrap(); + *global_map = map; +} + +pub fn get_file_map() -> BiHashMap { + GLOBAL_FILE_MAP.lock().unwrap().clone() +} + +pub fn get_file_num_by_filename(filename: &str) -> usize { + let mut map = GLOBAL_FILE_MAP.lock().unwrap(); + let len = map.len(); + if !map.contains_left(filename) { + map.insert(filename.to_string(), len); + } + *map.get_by_left(filename).unwrap() +} + +pub fn get_filename_by_file_num(file_num: usize) -> String { + let map = GLOBAL_FILE_MAP.lock().unwrap(); + map.get_by_right(&file_num) + .map(|s| s.as_str()) + .unwrap_or_default() + .to_string() +} + +#[cfg(test)] +mod tests { + use serial_test::serial; + + use super::*; + + #[test] + #[serial] + fn test_set_and_get_file_map() { + let mut test_map = BiHashMap::new(); + test_map.insert("test-key".to_string(), 42); + set_file_map(test_map.clone()); + let got = get_file_map(); + assert_eq!(got.get_by_left("test-key"), Some(&42)); + assert_eq!(got.get_by_right(&42), Some(&"test-key".to_string())); + } + + #[test] + #[serial] + fn test_reset_file_map() { + let mut test_map = BiHashMap::new(); + test_map.insert("reset-key".to_string(), 1); + set_file_map(test_map); + reset_file_map(); + let got = get_file_map(); + assert!(got.is_empty()); + } +} diff --git a/libs/css/src/lib.rs b/libs/css/src/lib.rs index d7895179..c2481f0a 100644 --- a/libs/css/src/lib.rs +++ b/libs/css/src/lib.rs @@ -1,6 +1,7 @@ pub mod class_map; mod constant; pub mod debug; +pub mod file_map; pub mod is_special_property; mod num_to_nm_base; pub mod optimize_multi_css_value; @@ -15,6 +16,7 @@ use std::hash::{DefaultHasher, Hash, Hasher}; use crate::class_map::GLOBAL_CLASS_MAP; use crate::constant::{COLOR_HASH, F_SPACE_RE, GLOBAL_STYLE_PROPERTY, ZERO_RE}; use crate::debug::is_debug; +use crate::file_map::get_file_num_by_filename; use crate::num_to_nm_base::num_to_nm_base; use crate::optimize_value::optimize_value; use crate::style_selector::StyleSelector; @@ -63,17 +65,33 @@ pub fn disassemble_property(property: &str) -> Vec { }) } -pub fn keyframes_to_keyframes_name(keyframes: &str) -> String { +pub fn keyframes_to_keyframes_name(keyframes: &str, filename: Option<&str>) -> String { if is_debug() { format!("k-{keyframes}") } else { let key = format!("k-{keyframes}"); let mut map = GLOBAL_CLASS_MAP.lock().unwrap(); - map.get(&key).map(|v| format!("k{v}")).unwrap_or_else(|| { - let len = map.len(); - map.insert(key, len as i32); - format!("k{}", map.len() - 1) - }) + let filename = filename.unwrap_or_default().to_string(); + let class_num = map + .entry(filename.to_string()) + .or_default() + .get(&key) + .map(|v| num_to_nm_base(*v).to_string()) + .unwrap_or_else(|| { + let m = map.entry(filename.to_string()).or_default(); + let len = m.len(); + m.insert(key, len); + num_to_nm_base(len).to_string() + }); + if !filename.is_empty() { + format!( + "{}-{}", + num_to_nm_base(get_file_num_by_filename(&filename)), + class_num + ) + } else { + class_num + } } } @@ -83,11 +101,12 @@ pub fn sheet_to_classname( value: Option<&str>, selector: Option<&str>, style_order: Option, + filename: Option<&str>, ) -> String { if is_debug() { let selector = selector.unwrap_or_default().trim(); format!( - "{}-{}-{}-{}-{}", + "{}-{}-{}-{}-{}{}", property.trim(), level, optimize_value(value.unwrap_or_default()), @@ -98,25 +117,45 @@ pub fn sheet_to_classname( selector.hash(&mut hasher); hasher.finish().to_string() }, - style_order.unwrap_or(255) + style_order.unwrap_or(255), + filename + .map(|v| format!("-{}", get_file_num_by_filename(v))) + .unwrap_or_default(), ) } else { let key = format!( - "{}-{}-{}-{}-{}", + "{}-{}-{}-{}-{}{}", property.trim(), level, optimize_value(value.unwrap_or_default()), selector.unwrap_or_default().trim(), - style_order.unwrap_or(255) + style_order.unwrap_or(255), + filename + .map(|v| format!("-{}", get_file_num_by_filename(v))) + .unwrap_or_default(), ); let mut map = GLOBAL_CLASS_MAP.lock().unwrap(); - map.get(&key) - .map(|v| num_to_nm_base(*v as usize)) + let filename = filename.map(|v| v.to_string()).unwrap_or_default(); + let clas_num = map + .entry(filename.to_string()) + .or_default() + .get(&key) + .map(|v| num_to_nm_base(*v)) .unwrap_or_else(|| { - let len = map.len(); - map.insert(key, len as i32); - num_to_nm_base(map.len() - 1) - }) + let m = map.entry(filename.to_string()).or_default(); + let len = m.len(); + m.insert(key, len); + num_to_nm_base(len) + }); + if !filename.is_empty() { + format!( + "{}-{}", + num_to_nm_base(get_file_num_by_filename(&filename)), + clas_num + ) + } else { + clas_num + } } } @@ -143,12 +182,15 @@ pub fn sheet_to_variable_name(property: &str, level: u8, selector: Option<&str>) selector.unwrap_or_default().trim() ); let mut map = GLOBAL_CLASS_MAP.lock().unwrap(); - map.get(&key) - .map(|v| format!("--{}", num_to_nm_base(*v as usize))) + map.entry("".to_string()) + .or_default() + .get(&key) + .map(|v| format!("--{}", num_to_nm_base(*v))) .unwrap_or_else(|| { - let len = map.len(); - map.insert(key, len as i32); - format!("--{}", num_to_nm_base(map.len() - 1)) + let m = map.entry("".to_string()).or_default(); + let len = m.len(); + m.insert(key, len); + format!("--{}", num_to_nm_base(len)) }) } } @@ -210,83 +252,113 @@ mod tests { set_debug(false); reset_class_map(); assert_eq!( - sheet_to_classname("background", 0, Some("red"), None, None), + sheet_to_classname("background", 0, Some("red"), None, None, None), "a" ); assert_eq!( - sheet_to_classname("background", 0, Some("red"), Some("hover"), None), + sheet_to_classname("background", 0, Some("red"), Some("hover"), None, None), "b" ); - assert_eq!(sheet_to_classname("background", 1, None, None, None), "c"); assert_eq!( - sheet_to_classname("background", 1, None, Some("hover"), None), + sheet_to_classname("background", 1, None, None, None, None), + "c" + ); + assert_eq!( + sheet_to_classname("background", 1, None, Some("hover"), None, None), "d" ); reset_class_map(); assert_eq!( - sheet_to_classname("background", 0, None, None, None), - sheet_to_classname("background", 0, None, None, None) + sheet_to_classname("background", 0, None, None, None, None), + sheet_to_classname("background", 0, None, None, None, None) ); assert_eq!( - sheet_to_classname("background", 0, Some("red"), None, None), - sheet_to_classname("background", 0, Some("red"), None, None), + sheet_to_classname("background", 0, Some("red"), None, None, None), + sheet_to_classname("background", 0, Some("red"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("red"), None, None), - sheet_to_classname(" background ", 0, Some(" red "), None, None), + sheet_to_classname("background", 0, Some("red"), None, None, None), + sheet_to_classname(" background ", 0, Some(" red "), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("red"), None, None), - sheet_to_classname(" background ", 0, Some("red;"), None, None), + sheet_to_classname("background", 0, Some("red"), None, None, None), + sheet_to_classname(" background ", 0, Some("red;"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("rgba(255, 0, 0, 0.5)"), None, None), - sheet_to_classname("background", 0, Some("rgba(255,0,0,0.5)"), None, None), + sheet_to_classname( + "background", + 0, + Some("rgba(255, 0, 0, 0.5)"), + None, + None, + None + ), + sheet_to_classname("background", 0, Some("rgba(255,0,0,0.5)"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("rgba(255, 0, 0, 0.5)"), None, None), - sheet_to_classname("background", 0, Some("rgba(255,0,0,.5)"), None, None), + sheet_to_classname( + "background", + 0, + Some("rgba(255, 0, 0, 0.5)"), + None, + None, + None + ), + sheet_to_classname("background", 0, Some("rgba(255,0,0,.5)"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("rgba(255, 0, 0, 0.5)"), None, None), - sheet_to_classname("background", 0, Some("#FF000080"), None, None), + sheet_to_classname( + "background", + 0, + Some("rgba(255, 0, 0, 0.5)"), + None, + None, + None + ), + sheet_to_classname("background", 0, Some("#FF000080"), None, None, None), ); { let map = GLOBAL_CLASS_MAP.lock().unwrap(); - assert_eq!(map.get("background-0-#FF000080--255"), Some(&2)); + assert_eq!( + map.get("").unwrap().get("background-0-#FF000080--255"), + Some(&2) + ); } assert_eq!( - sheet_to_classname("background", 0, Some("#fff"), None, None), - sheet_to_classname(" background ", 0, Some("#FFF"), None, None), + sheet_to_classname("background", 0, Some("#fff"), None, None, None), + sheet_to_classname(" background ", 0, Some("#FFF"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("#ffffff"), None, None), - sheet_to_classname("background", 0, Some("#FFF"), None, None), + sheet_to_classname("background", 0, Some("#ffffff"), None, None, None), + sheet_to_classname("background", 0, Some("#FFF"), None, None, None), ); { let map = GLOBAL_CLASS_MAP.lock().unwrap(); - assert_eq!(map.get("background-0-#FFF--255"), Some(&3)); + assert_eq!(map.get("").unwrap().get("background-0-#FFF--255"), Some(&3)); } assert_eq!( - sheet_to_classname("background", 0, Some("#ffffff"), None, None), - sheet_to_classname("background", 0, Some("#FFFFFF"), None, None), + sheet_to_classname("background", 0, Some("#ffffff"), None, None, None), + sheet_to_classname("background", 0, Some("#FFFFFF"), None, None, None), ); assert_eq!( - sheet_to_classname("background", 0, Some("#ffffffAA"), None, None), - sheet_to_classname("background", 0, Some("#FFFFFFaa"), None, None), + sheet_to_classname("background", 0, Some("#ffffffAA"), None, None, None), + sheet_to_classname("background", 0, Some("#FFFFFFaa"), None, None, None), ); { let map = GLOBAL_CLASS_MAP.lock().unwrap(); - assert_eq!(map.get("background-0-#FFFA--255"), Some(&4)); + assert_eq!( + map.get("").unwrap().get("background-0-#FFFA--255"), + Some(&4) + ); } assert_eq!( sheet_to_classname( @@ -294,6 +366,7 @@ mod tests { 0, Some("color-mix(in srgb,var(--primary) 80%, #000 20%)"), None, + None, None ), sheet_to_classname( @@ -301,110 +374,146 @@ mod tests { 0, Some("color-mix(in srgb, var(--primary) 80%, #000000 20%)"), None, + None, None ), ); reset_class_map(); - assert_eq!(sheet_to_classname("background", 0, None, None, None), "a"); assert_eq!( - sheet_to_classname("background", 0, None, None, Some(1)), + sheet_to_classname("background", 0, None, None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("background", 0, None, None, Some(1), None), "b" ); reset_class_map(); - assert_eq!(sheet_to_classname("width", 0, Some("0px"), None, None), "a"); - assert_eq!(sheet_to_classname("width", 0, Some("0em"), None, None), "a"); assert_eq!( - sheet_to_classname("width", 0, Some("0rem"), None, None), + sheet_to_classname("width", 0, Some("0px"), None, None, None), "a" ); - assert_eq!(sheet_to_classname("width", 0, Some("0vh"), None, None), "a"); - assert_eq!(sheet_to_classname("width", 0, Some("0%"), None, None), "a"); assert_eq!( - sheet_to_classname("width", 0, Some("0dvh"), None, None), + sheet_to_classname("width", 0, Some("0em"), None, None, None), "a" ); assert_eq!( - sheet_to_classname("width", 0, Some("0dvw"), None, None), + sheet_to_classname("width", 0, Some("0rem"), None, None, None), "a" ); - assert_eq!(sheet_to_classname("width", 0, Some("0vw"), None, None), "a"); - assert_eq!(sheet_to_classname("width", 0, Some("0"), None, None), "a"); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0px red"), None, None), + sheet_to_classname("width", 0, Some("0vh"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("width", 0, Some("0%"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("width", 0, Some("0dvh"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("width", 0, Some("0dvw"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("width", 0, Some("0vw"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("width", 0, Some("0"), None, None, None), + "a" + ); + assert_eq!( + sheet_to_classname("border", 0, Some("solid 0px red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0% red"), None, None), + sheet_to_classname("border", 0, Some("solid 0% red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0em red"), None, None), + sheet_to_classname("border", 0, Some("solid 0em red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0rem red"), None, None), + sheet_to_classname("border", 0, Some("solid 0rem red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0vh red"), None, None), + sheet_to_classname("border", 0, Some("solid 0vh red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0vw red"), None, None), + sheet_to_classname("border", 0, Some("solid 0vw red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0dvh red"), None, None), + sheet_to_classname("border", 0, Some("solid 0dvh red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("border", 0, Some("solid 0dvw red"), None, None), + sheet_to_classname("border", 0, Some("solid 0dvw red"), None, None, None), "b" ); assert_eq!( - sheet_to_classname("test", 0, Some("0px 0"), None, None), + sheet_to_classname("test", 0, Some("0px 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0em 0"), None, None), + sheet_to_classname("test", 0, Some("0em 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0rem 0"), None, None), + sheet_to_classname("test", 0, Some("0rem 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0vh 0"), None, None), + sheet_to_classname("test", 0, Some("0vh 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0vw 0"), None, None), + sheet_to_classname("test", 0, Some("0vw 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0dvh 0"), None, None), + sheet_to_classname("test", 0, Some("0dvh 0"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0 0vh"), None, None), + sheet_to_classname("test", 0, Some("0 0vh"), None, None, None), "c" ); assert_eq!( - sheet_to_classname("test", 0, Some("0 0vw"), None, None), + sheet_to_classname("test", 0, Some("0 0vw"), None, None, None), "c" ); reset_class_map(); assert_eq!( - sheet_to_classname("transition", 0, Some("all 0.3s ease-in-out"), None, None), + sheet_to_classname( + "transition", + 0, + Some("all 0.3s ease-in-out"), + None, + None, + None + ), "a" ); assert_eq!( - sheet_to_classname("transition", 0, Some("all .3s ease-in-out"), None, None), + sheet_to_classname( + "transition", + 0, + Some("all .3s ease-in-out"), + None, + None, + None + ), "a" ); } @@ -414,19 +523,19 @@ mod tests { fn test_debug_sheet_to_classname() { set_debug(true); assert_eq!( - sheet_to_classname("background", 0, None, None, None), + sheet_to_classname("background", 0, None, None, None, None), "background-0---255" ); assert_eq!( - sheet_to_classname("background", 0, Some("red"), Some("hover"), None), + sheet_to_classname("background", 0, Some("red"), Some("hover"), None, None), "background-0-red-12448419602614487988-255" ); assert_eq!( - sheet_to_classname("background", 1, None, None, None), + sheet_to_classname("background", 1, None, None, None, None), "background-1---255" ); assert_eq!( - sheet_to_classname("background", 1, Some("red"), Some("hover"), None), + sheet_to_classname("background", 1, Some("red"), Some("hover"), None, None), "background-1-red-12448419602614487988-255" ); } @@ -503,7 +612,10 @@ mod tests { #[serial] fn test_set_class_map() { let mut map = HashMap::new(); - map.insert("background-0-rgba(255,0,0,0.5)-".to_string(), 1); + map.insert("".to_string(), HashMap::new()); + map.get_mut("") + .unwrap() + .insert("background-0-rgba(255,0,0,0.5)-".to_string(), 1); set_class_map(map); assert_eq!(get_class_map().len(), 1); } @@ -513,12 +625,15 @@ mod tests { fn test_keyframes_to_keyframes_name() { reset_class_map(); set_debug(false); - assert_eq!(keyframes_to_keyframes_name("spin"), "k0"); - assert_eq!(keyframes_to_keyframes_name("spin"), "k0"); - assert_eq!(keyframes_to_keyframes_name("spin2"), "k1"); + assert_eq!(keyframes_to_keyframes_name("spin", None), num_to_nm_base(0)); + assert_eq!(keyframes_to_keyframes_name("spin", None), num_to_nm_base(0)); + assert_eq!( + keyframes_to_keyframes_name("spin2", None), + num_to_nm_base(1) + ); reset_class_map(); set_debug(true); - assert_eq!(keyframes_to_keyframes_name("spin"), "k-spin"); - assert_eq!(keyframes_to_keyframes_name("spin1"), "k-spin1"); + assert_eq!(keyframes_to_keyframes_name("spin", None), "k-spin"); + assert_eq!(keyframes_to_keyframes_name("spin1", None), "k-spin1"); } } diff --git a/libs/css/src/num_to_nm_base.rs b/libs/css/src/num_to_nm_base.rs index 681b2300..d8fdc525 100644 --- a/libs/css/src/num_to_nm_base.rs +++ b/libs/css/src/num_to_nm_base.rs @@ -96,38 +96,37 @@ mod tests { #[case(60, "a7")] #[case(61, "a8")] #[case(62, "a9")] - #[case(63, "a-")] - #[case(64, "a_")] - #[case(65, "ba")] - #[case(66, "bb")] - #[case(67, "bc")] - #[case(68, "bd")] - #[case(69, "be")] - #[case(70, "bf")] - #[case(71, "bg")] - #[case(72, "bh")] - #[case(73, "bi")] - #[case(74, "bj")] - #[case(75, "bk")] - #[case(76, "bl")] - #[case(77, "bm")] - #[case(78, "bn")] - #[case(79, "bo")] - #[case(80, "bp")] - #[case(81, "bq")] - #[case(82, "br")] - #[case(83, "bs")] - #[case(84, "bt")] - #[case(85, "bu")] - #[case(86, "bv")] - #[case(87, "bw")] - #[case(88, "bx")] - #[case(89, "by")] - #[case(90, "bz")] - #[case(91, "b0")] - #[case(92, "b1")] - #[case(1052, "__")] - #[case(1053, "aaa")] + #[case(63, "a_")] + #[case(64, "ba")] + #[case(65, "bb")] + #[case(66, "bc")] + #[case(67, "bd")] + #[case(68, "be")] + #[case(69, "bf")] + #[case(70, "bg")] + #[case(71, "bh")] + #[case(72, "bi")] + #[case(73, "bj")] + #[case(74, "bk")] + #[case(75, "bl")] + #[case(76, "bm")] + #[case(77, "bn")] + #[case(78, "bo")] + #[case(79, "bp")] + #[case(80, "bq")] + #[case(81, "br")] + #[case(82, "bs")] + #[case(83, "bt")] + #[case(84, "bu")] + #[case(85, "bv")] + #[case(86, "bw")] + #[case(87, "bx")] + #[case(88, "by")] + #[case(89, "bz")] + #[case(90, "b0")] + #[case(91, "b1")] + #[case(1025, "__")] + #[case(1026, "aaa")] fn test_num_to_nm_base_rstest(#[case] input: usize, #[case] expected: &str) { assert_eq!(num_to_nm_base(input), expected); } diff --git a/libs/extractor/Cargo.toml b/libs/extractor/Cargo.toml index a0214628..2b20bc78 100644 --- a/libs/extractor/Cargo.toml +++ b/libs/extractor/Cargo.toml @@ -4,13 +4,13 @@ version = "0.1.0" edition = "2024" [dependencies] -oxc_parser = "0.82.3" -oxc_syntax = "0.82.3" -oxc_span = "0.82.3" -oxc_allocator = "0.82.3" -oxc_ast = "0.82.3" -oxc_ast_visit = "0.82.3" -oxc_codegen = "0.82.3" +oxc_parser = "0.83.0" +oxc_syntax = "0.83.0" +oxc_span = "0.83.0" +oxc_allocator = "0.83.0" +oxc_ast = "0.83.0" +oxc_ast_visit = "0.83.0" +oxc_codegen = "0.83.0" css = { path = "../css" } phf = "0.13" strum = "0.27.2" diff --git a/libs/extractor/src/extract_style/extract_dynamic_style.rs b/libs/extractor/src/extract_style/extract_dynamic_style.rs index 2308357e..bb896e4f 100644 --- a/libs/extractor/src/extract_style/extract_dynamic_style.rs +++ b/libs/extractor/src/extract_style/extract_dynamic_style.rs @@ -59,7 +59,7 @@ impl ExtractDynamicStyle { } impl ExtractStyleProperty for ExtractDynamicStyle { - fn extract(&self) -> StyleProperty { + fn extract(&self, filename: Option<&str>) -> StyleProperty { let selector = self.selector.clone().map(|s| s.to_string()); StyleProperty::Variable { class_name: sheet_to_classname( @@ -68,6 +68,7 @@ impl ExtractStyleProperty for ExtractDynamicStyle { None, selector.as_deref(), self.style_order, + filename, ), variable_name: sheet_to_variable_name( self.property.as_str(), diff --git a/libs/extractor/src/extract_style/extract_keyframes.rs b/libs/extractor/src/extract_style/extract_keyframes.rs index 66f8f39a..d3479f84 100644 --- a/libs/extractor/src/extract_style/extract_keyframes.rs +++ b/libs/extractor/src/extract_style/extract_keyframes.rs @@ -15,10 +15,10 @@ pub struct ExtractKeyframes { } impl ExtractStyleProperty for ExtractKeyframes { - fn extract(&self) -> StyleProperty { + fn extract(&self, filename: Option<&str>) -> StyleProperty { let mut hasher = DefaultHasher::new(); self.keyframes.hash(&mut hasher); let hash_key = hasher.finish().to_string(); - StyleProperty::ClassName(keyframes_to_keyframes_name(&hash_key)) + StyleProperty::ClassName(keyframes_to_keyframes_name(&hash_key, filename)) } } diff --git a/libs/extractor/src/extract_style/extract_static_style.rs b/libs/extractor/src/extract_style/extract_static_style.rs index 2f9be507..73d2f119 100644 --- a/libs/extractor/src/extract_style/extract_static_style.rs +++ b/libs/extractor/src/extract_style/extract_static_style.rs @@ -96,7 +96,7 @@ impl ExtractStaticStyle { } impl ExtractStyleProperty for ExtractStaticStyle { - fn extract(&self) -> StyleProperty { + fn extract(&self, filename: Option<&str>) -> StyleProperty { let s = self.selector.clone().map(|s| s.to_string()); let v = optimize_value(&if MAINTAIN_VALUE_PROPERTIES.contains(&self.property) { self.value.to_string() @@ -114,6 +114,7 @@ impl ExtractStyleProperty for ExtractStaticStyle { Some(&v), s.as_deref(), self.style_order, + filename, )) } } diff --git a/libs/extractor/src/extract_style/extract_style_value.rs b/libs/extractor/src/extract_style/extract_style_value.rs index cd377a78..8e8fbad5 100644 --- a/libs/extractor/src/extract_style/extract_style_value.rs +++ b/libs/extractor/src/extract_style/extract_style_value.rs @@ -17,11 +17,11 @@ pub enum ExtractStyleValue { } impl ExtractStyleValue { - pub fn extract(&self) -> Option { + pub fn extract(&self, filename: Option<&str>) -> Option { match self { - ExtractStyleValue::Static(style) => Some(style.extract()), - ExtractStyleValue::Dynamic(style) => Some(style.extract()), - ExtractStyleValue::Keyframes(keyframes) => Some(keyframes.extract()), + ExtractStyleValue::Static(style) => Some(style.extract(filename)), + ExtractStyleValue::Dynamic(style) => Some(style.extract(filename)), + ExtractStyleValue::Keyframes(keyframes) => Some(keyframes.extract(filename)), ExtractStyleValue::Typography(typo) => { Some(StyleProperty::ClassName(format!("typo-{typo}"))) } @@ -68,33 +68,33 @@ mod tests { fn test_extract() { let style = ExtractStaticStyle::new("margin", "10px", 0, None); let value = ExtractStyleValue::Static(style); - let extracted = value.extract(); + let extracted = value.extract(None); assert!(matches!(extracted, Some(StyleProperty::ClassName(_)))); let style = ExtractDynamicStyle::new("margin", 0, "10px", None); let value = ExtractStyleValue::Dynamic(style); - let extracted = value.extract(); + let extracted = value.extract(None); assert!(matches!(extracted, Some(StyleProperty::Variable { .. }))); let keyframes = ExtractKeyframes::default(); let value = ExtractStyleValue::Keyframes(keyframes); - let extracted = value.extract(); + let extracted = value.extract(None); assert!(matches!(extracted, Some(StyleProperty::ClassName(_)))); let value = ExtractStyleValue::Typography("body1".to_string()); - let extracted = value.extract(); + let extracted = value.extract(None); assert!(matches!(extracted, Some(StyleProperty::ClassName(_)))); let value = ExtractStyleValue::Css(ExtractCss { css: "".to_string(), file: "".to_string(), }); - assert!(value.extract().is_none()); + assert!(value.extract(None).is_none()); let value = ExtractStyleValue::Import(ExtractImport { url: "".to_string(), file: "".to_string(), }); - assert!(value.extract().is_none()); + assert!(value.extract(None).is_none()); } } diff --git a/libs/extractor/src/extract_style/mod.rs b/libs/extractor/src/extract_style/mod.rs index 6bbb6872..2d02c05b 100644 --- a/libs/extractor/src/extract_style/mod.rs +++ b/libs/extractor/src/extract_style/mod.rs @@ -12,5 +12,5 @@ use crate::extract_style::style_property::StyleProperty; pub trait ExtractStyleProperty { /// extract style properties - fn extract(&self) -> StyleProperty; + fn extract(&self, filename: Option<&str>) -> StyleProperty; } diff --git a/libs/extractor/src/gen_class_name.rs b/libs/extractor/src/gen_class_name.rs index b49f9d61..42869aa9 100644 --- a/libs/extractor/src/gen_class_name.rs +++ b/libs/extractor/src/gen_class_name.rs @@ -11,12 +11,13 @@ pub fn gen_class_names<'a>( ast_builder: &AstBuilder<'a>, style_props: &mut [ExtractStyleProp<'a>], style_order: Option, + filename: Option<&str>, ) -> Option> { merge_expression_for_class_name( ast_builder, style_props .iter_mut() - .filter_map(|st| gen_class_name(ast_builder, st, style_order)) + .filter_map(|st| gen_class_name(ast_builder, st, style_order, filename)) .rev() .collect(), ) @@ -26,13 +27,14 @@ fn gen_class_name<'a>( ast_builder: &AstBuilder<'a>, style_prop: &mut ExtractStyleProp<'a>, style_order: Option, + filename: Option<&str>, ) -> Option> { match style_prop { ExtractStyleProp::Static(st) => { if let Some(style_order) = style_order { st.set_style_order(style_order); } - let target = st.extract(); + let target = st.extract(filename); Some(ast_builder.expression_string_literal( SPAN, @@ -47,7 +49,7 @@ fn gen_class_name<'a>( ExtractStyleProp::StaticArray(res) => merge_expression_for_class_name( ast_builder, res.iter_mut() - .filter_map(|st| gen_class_name(ast_builder, st, style_order)) + .filter_map(|st| gen_class_name(ast_builder, st, style_order, filename)) .collect(), ), ExtractStyleProp::Conditional { @@ -58,12 +60,14 @@ fn gen_class_name<'a>( } => { let consequent = consequent .as_mut() - .and_then(|ref mut con| gen_class_name(ast_builder, con.as_mut(), style_order)) + .and_then(|ref mut con| { + gen_class_name(ast_builder, con.as_mut(), style_order, filename) + }) .unwrap_or_else(|| ast_builder.expression_string_literal(SPAN, "", None)); let alternate = alternate .as_mut() - .and_then(|ref mut alt| gen_class_name(ast_builder, alt, style_order)) + .and_then(|ref mut alt| gen_class_name(ast_builder, alt, style_order, filename)) .unwrap_or_else(|| ast_builder.expression_string_literal(SPAN, "", None)); if is_same_expression(&consequent, &alternate) { Some(consequent) @@ -87,21 +91,25 @@ fn gen_class_name<'a>( ast_builder.expression_object( SPAN, ast_builder.vec_from_iter(map.iter_mut().filter_map(|(key, value)| { - gen_class_name(ast_builder, value.as_mut(), style_order).map(|expr| { - ast_builder.object_property_kind_object_property( - SPAN, - PropertyKind::Init, - PropertyKey::StringLiteral(ast_builder.alloc_string_literal( + gen_class_name(ast_builder, value.as_mut(), style_order, filename).map( + |expr| { + ast_builder.object_property_kind_object_property( SPAN, - ast_builder.atom(key), - None, - )), - expr, - false, - false, - false, - ) - }) + PropertyKind::Init, + PropertyKey::StringLiteral( + ast_builder.alloc_string_literal( + SPAN, + ast_builder.atom(key), + None, + ), + ), + expr, + false, + false, + false, + ) + }, + ) })), ), expression.clone_in(ast_builder.allocator), diff --git a/libs/extractor/src/gen_style.rs b/libs/extractor/src/gen_style.rs index 3fab89b2..5e2ac607 100644 --- a/libs/extractor/src/gen_style.rs +++ b/libs/extractor/src/gen_style.rs @@ -8,13 +8,14 @@ use std::collections::BTreeMap; pub fn gen_styles<'a>( ast_builder: &AstBuilder<'a>, style_props: &[ExtractStyleProp<'a>], + filename: Option<&str>, ) -> Option> { if style_props.is_empty() { return None; } let properties: Vec<_> = style_props .iter() - .flat_map(|style| gen_style(ast_builder, style)) + .flat_map(|style| gen_style(ast_builder, style, filename)) .rev() .collect(); if properties.is_empty() { @@ -28,6 +29,7 @@ pub fn gen_styles<'a>( fn gen_style<'a>( ast_builder: &AstBuilder<'a>, style: &ExtractStyleProp<'a>, + filename: Option<&str>, ) -> Vec> { let mut properties = vec![]; match style { @@ -36,7 +38,7 @@ fn gen_style<'a>( variable_name, identifier, .. - }) = st.extract() + }) = st.extract(filename) { properties.push(ast_builder.object_property_kind_object_property( SPAN, @@ -57,7 +59,7 @@ fn gen_style<'a>( properties.append( &mut res .iter() - .flat_map(|r| gen_style(ast_builder, r)) + .flat_map(|r| gen_style(ast_builder, r, filename)) .rev() .collect(), ); @@ -71,48 +73,52 @@ fn gen_style<'a>( return vec![]; } (None, Some(c)) => { - gen_style(ast_builder, c).into_iter().for_each(|p| { - if let ObjectPropertyKind::ObjectProperty(p) = p { - properties.push(ast_builder.object_property_kind_object_property( - SPAN, - PropertyKind::Init, - p.key.clone_in(ast_builder.allocator), - ast_builder.expression_conditional( + gen_style(ast_builder, c, filename) + .into_iter() + .for_each(|p| { + if let ObjectPropertyKind::ObjectProperty(p) = p { + properties.push(ast_builder.object_property_kind_object_property( SPAN, - condition.clone_in(ast_builder.allocator), - ast_builder.expression_identifier(SPAN, "undefined"), - p.value.clone_in(ast_builder.allocator), - ), - false, - false, - false, - )) - } - }); + PropertyKind::Init, + p.key.clone_in(ast_builder.allocator), + ast_builder.expression_conditional( + SPAN, + condition.clone_in(ast_builder.allocator), + ast_builder.expression_identifier(SPAN, "undefined"), + p.value.clone_in(ast_builder.allocator), + ), + false, + false, + false, + )) + } + }); } (Some(c), None) => { - gen_style(ast_builder, c).into_iter().for_each(|p| { - if let ObjectPropertyKind::ObjectProperty(p) = p { - properties.push(ast_builder.object_property_kind_object_property( - SPAN, - PropertyKind::Init, - p.key.clone_in(ast_builder.allocator), - ast_builder.expression_conditional( + gen_style(ast_builder, c, filename) + .into_iter() + .for_each(|p| { + if let ObjectPropertyKind::ObjectProperty(p) = p { + properties.push(ast_builder.object_property_kind_object_property( SPAN, - condition.clone_in(ast_builder.allocator), - p.value.clone_in(ast_builder.allocator), - ast_builder.expression_identifier(SPAN, "undefined"), - ), - false, - false, - false, - )) - } - }); + PropertyKind::Init, + p.key.clone_in(ast_builder.allocator), + ast_builder.expression_conditional( + SPAN, + condition.clone_in(ast_builder.allocator), + p.value.clone_in(ast_builder.allocator), + ast_builder.expression_identifier(SPAN, "undefined"), + ), + false, + false, + false, + )) + } + }); } (Some(c), Some(a)) => { - let collect_c = gen_style(ast_builder, c); - let collect_a = gen_style(ast_builder, a); + let collect_c = gen_style(ast_builder, c, filename); + let collect_a = gen_style(ast_builder, a, filename); if collect_c.is_empty() && collect_a.is_empty() { return vec![]; } @@ -189,7 +195,7 @@ fn gen_style<'a>( variable_name, identifier, .. - }) = style.extract() + }) = style.extract(filename) { properties.push(ast_builder.object_property_kind_object_property( SPAN, @@ -215,7 +221,7 @@ fn gen_style<'a>( variable_name, identifier, .. - }) = style.extract() + }) = style.extract(filename) { tmp_map .entry(variable_name) diff --git a/libs/extractor/src/lib.rs b/libs/extractor/src/lib.rs index 543ebd7d..f9932c50 100644 --- a/libs/extractor/src/lib.rs +++ b/libs/extractor/src/lib.rs @@ -10,6 +10,7 @@ mod utils; mod visit; use crate::extract_style::extract_style_value::ExtractStyleValue; use crate::visit::DevupVisitor; +use css::file_map::get_file_num_by_filename; use oxc_allocator::Allocator; use oxc_ast::ast::Expression; use oxc_ast_visit::VisitMut; @@ -76,11 +77,13 @@ pub struct ExtractOutput { pub code: String, pub map: Option, + pub css_file: String, } pub struct ExtractOption { pub package: String, - pub css_file: Option, + pub css_dir: String, + pub single_css: bool, } pub fn extract( @@ -89,12 +92,22 @@ pub fn extract( option: ExtractOption, ) -> Result> { let source_type = SourceType::from_path(filename)?; + let css_file = if option.single_css { + format!("{}/devup-ui.css", option.css_dir) + } else { + format!( + "{}/devup-ui-{}.css", + option.css_dir, + get_file_num_by_filename(filename) + ) + }; if !code.contains(option.package.as_str()) { // skip if not using package return Ok(ExtractOutput { styles: HashSet::new(), code: code.to_string(), map: None, + css_file, }); } let allocator = Allocator::default(); @@ -111,9 +124,12 @@ pub fn extract( &allocator, filename, &option.package, - &option - .css_file - .unwrap_or(format!("{}/devup-ui.css", option.package)), + &css_file, + if !option.single_css { + Some(filename.to_string()) + } else { + None + }, ); visitor.visit_program(&mut program); let result = Codegen::new() @@ -127,6 +143,7 @@ pub fn extract( styles: visitor.styles, code: result.code, map: result.map.map(|m| m.to_json_string()), + css_file, }) } @@ -171,7 +188,8 @@ mod tests { "const a = 1;", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true }, ) .unwrap() @@ -184,7 +202,8 @@ mod tests { "", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true }, ) .unwrap() @@ -200,7 +219,11 @@ mod tests { r#"import {Box} from '@devup-ui/core' {}} aria-valuenow={24} key={2} tabIndex={1} id="id" /> "#, - ExtractOption { package: "@devup-ui/core".to_string(), css_file: None } + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: true, + } ) .unwrap() )); @@ -214,7 +237,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -233,7 +257,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -248,7 +273,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -261,7 +287,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -276,7 +303,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -289,7 +317,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -352,7 +381,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -366,7 +396,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -380,7 +411,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -395,7 +427,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -410,7 +443,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -425,7 +459,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -446,7 +481,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -468,7 +504,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -489,7 +526,8 @@ mod tests { ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -508,7 +546,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -523,7 +562,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -538,7 +578,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -553,7 +594,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -567,7 +609,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -588,7 +631,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -603,7 +647,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -622,7 +667,8 @@ mod tests { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -655,7 +701,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -674,7 +721,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -692,7 +740,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -705,7 +754,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -724,7 +774,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -739,7 +790,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -754,7 +806,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -769,7 +822,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -788,7 +842,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -803,7 +858,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -818,7 +874,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -837,7 +894,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -852,7 +910,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -867,7 +926,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -882,7 +942,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -897,7 +958,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -916,7 +978,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -935,7 +998,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -954,7 +1018,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -969,7 +1034,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -988,7 +1054,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1003,7 +1070,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1022,7 +1090,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1037,7 +1106,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1052,7 +1122,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1067,7 +1138,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1082,7 +1154,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1097,7 +1170,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1112,7 +1186,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1127,7 +1202,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1142,7 +1218,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1161,7 +1238,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1176,7 +1254,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1191,7 +1270,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1206,7 +1286,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1221,7 +1302,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1236,7 +1318,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1255,7 +1338,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1270,7 +1354,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1289,7 +1374,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1304,7 +1390,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1319,7 +1406,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1334,7 +1422,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1349,7 +1438,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1364,7 +1454,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1379,7 +1470,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1394,7 +1486,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1413,7 +1506,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1428,7 +1522,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1443,7 +1538,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1458,7 +1554,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1477,7 +1574,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1492,7 +1590,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1507,7 +1606,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1522,7 +1622,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1540,7 +1641,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1555,7 +1657,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1576,7 +1679,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1610,7 +1714,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1629,7 +1734,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1648,7 +1754,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1667,7 +1774,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1686,7 +1794,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1705,7 +1814,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1722,7 +1832,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1746,7 +1857,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1765,7 +1877,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1780,7 +1893,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1795,7 +1909,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1810,7 +1925,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1825,7 +1941,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1840,7 +1957,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1855,7 +1973,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1876,7 +1995,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1895,7 +2015,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1917,7 +2038,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1938,7 +2060,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1962,7 +2085,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -1985,7 +2109,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2007,7 +2132,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2035,7 +2161,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2058,7 +2185,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2083,7 +2211,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2108,7 +2237,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2133,7 +2263,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2158,7 +2289,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2179,7 +2311,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2196,7 +2329,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2211,7 +2345,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2229,7 +2364,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2250,7 +2386,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2269,7 +2406,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2290,7 +2428,8 @@ import clsx from 'clsx' ", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2311,7 +2450,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2328,7 +2468,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2346,7 +2487,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2363,7 +2505,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2383,7 +2526,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2398,7 +2542,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2413,7 +2558,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2428,7 +2574,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2448,7 +2595,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2474,7 +2622,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2489,7 +2638,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2504,7 +2654,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2520,7 +2671,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2535,7 +2687,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2550,7 +2703,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2565,7 +2719,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2590,7 +2745,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2614,7 +2770,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2633,7 +2790,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2652,7 +2810,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2667,7 +2826,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2682,7 +2842,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2701,7 +2862,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2716,7 +2878,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2731,7 +2894,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2749,7 +2913,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2764,7 +2929,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2779,7 +2945,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2799,7 +2966,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2816,7 +2984,8 @@ import clsx from 'clsx' "const a = 1;", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true }, ) .unwrap_err() @@ -2831,7 +3000,8 @@ import clsx from 'clsx' "import {} '@devup-ui/core';\na a = 1;", ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true }, ) .unwrap_err() @@ -2851,7 +3021,8 @@ import clsx from 'clsx' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2866,7 +3037,8 @@ useTheme(); "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2904,7 +3076,8 @@ export { };"#, ExtractOption { package: "@devup-ui/react".to_string(), - css_file: None + css_dir: "@devup-ui/react".to_string(), + single_css: true } ) .unwrap() @@ -2938,7 +3111,8 @@ export { };"#, ExtractOption { package: "@devup-ui/react".to_string(), - css_file: None + css_dir: "@devup-ui/react".to_string(), + single_css: true } ) .unwrap() @@ -2954,7 +3128,8 @@ e(o, { className: "a", bg: "red" }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2970,7 +3145,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" } }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2986,7 +3162,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -2997,16 +3174,16 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) #[serial] fn support_transpile_cjs() { reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_file: None }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const {jsx:e1, jsxs:e2}=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e2("div",{children:[e1(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e1(r.Text,{typography:"header",children:"typo"}),e1(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_file: None }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.cjs", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const {jsx:e1, jsxs:e2}=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e2("div",{children:[e1(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e1(r.Text,{typography:"header",children:"typo"}),e1(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_file: None }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:"header",children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); reset_class_map(); - assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:`header`,children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_file: None }).unwrap())); + assert_debug_snapshot!(ToBTreeSet::from(extract("test.js", r#""use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@devup-ui/react");function t(){return e.jsxs("div",{children:[e.jsx(r.Box,{_hover:{bg:"blue"},bg:"$text",color:"red",children:"hello"}),e.jsx(r.Text,{typography:`header`,children:"typo"}),e.jsx(r.Flex,{as:"section",mt:2,children:"section"})]})}exports.Lib=t;"#, ExtractOption { package: "@devup-ui/react".to_string(), css_dir: "@devup-ui/react".to_string(),single_css:true }).unwrap())); } #[test] @@ -3019,7 +3196,11 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) r#"import {Flex} from '@devup-ui/core' "#, - ExtractOption { package: "@devup-ui/core".to_string(), css_file: None } + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: true, + } ) .unwrap() )); @@ -3037,7 +3218,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3052,7 +3234,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3067,7 +3250,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3086,7 +3270,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3101,7 +3286,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3116,7 +3302,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3135,7 +3322,8 @@ e(o, { className: "a", bg: variable, style: { color: "blue" }, ...props }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3169,7 +3357,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3188,7 +3377,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3203,7 +3393,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3218,7 +3409,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3233,7 +3425,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3248,7 +3441,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3266,7 +3460,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3281,7 +3476,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3296,7 +3492,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3311,7 +3508,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3326,7 +3524,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3341,7 +3540,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3356,7 +3556,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3375,7 +3576,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3390,7 +3592,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3405,7 +3608,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3420,7 +3624,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3443,7 +3648,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3458,7 +3664,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3477,7 +3684,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3492,7 +3700,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3507,7 +3716,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3522,7 +3732,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3540,7 +3751,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3555,7 +3767,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3570,7 +3783,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3609,7 +3823,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3628,7 +3843,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3643,7 +3859,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3658,7 +3875,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3673,7 +3891,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3692,7 +3911,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3706,7 +3926,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3725,7 +3946,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3740,7 +3962,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3758,7 +3981,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3777,7 +4001,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3792,7 +4017,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3810,7 +4036,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3825,7 +4052,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3844,7 +4072,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3863,7 +4092,8 @@ export default function Card({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3886,7 +4116,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3905,7 +4136,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3920,7 +4152,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3939,7 +4172,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3958,7 +4192,8 @@ PROCESS_DATA.map(({ id, title, content }, idx) => ( "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -3979,7 +4214,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4001,7 +4237,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4019,7 +4256,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4038,7 +4276,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4069,7 +4308,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4088,7 +4328,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4103,7 +4344,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4118,7 +4360,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4133,7 +4376,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4148,7 +4392,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4167,7 +4412,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4186,7 +4432,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4200,7 +4447,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4222,7 +4470,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4245,7 +4494,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4264,7 +4514,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4283,7 +4534,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4306,7 +4558,8 @@ import {Button} from '@devup/ui' "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4341,7 +4594,8 @@ export { };"#, ExtractOption { package: "@devup-ui/react".to_string(), - css_file: None + css_dir: "@devup-ui/react".to_string(), + single_css: true } ) .unwrap() @@ -4356,7 +4610,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4371,7 +4626,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4386,7 +4642,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4408,7 +4665,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4431,7 +4689,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4446,7 +4705,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4472,7 +4732,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4494,7 +4755,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4516,7 +4778,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4537,7 +4800,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4554,7 +4818,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4572,7 +4837,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4589,7 +4855,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4606,7 +4873,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4623,7 +4891,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4640,7 +4909,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4657,7 +4927,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4677,7 +4948,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4692,7 +4964,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4711,7 +4984,8 @@ export { "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4731,7 +5005,8 @@ e(o, { styleVars: { c: "yellow" } }) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4754,7 +5029,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4773,7 +5049,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4792,7 +5069,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4811,7 +5089,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4830,7 +5109,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4849,7 +5129,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4868,7 +5149,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4883,7 +5165,8 @@ globalCss(...{}) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4898,7 +5181,8 @@ globalCss(...{div: {bg: "red"}}) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4914,7 +5198,8 @@ globalCss(...{div: {bg: "red"}, ...{span: {bg: "blue"}}}) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4937,7 +5222,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4952,7 +5238,8 @@ globalCss() "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4967,7 +5254,8 @@ globalCss(1) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -4995,7 +5283,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5027,7 +5316,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5059,7 +5349,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5099,7 +5390,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5122,7 +5414,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5139,7 +5432,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5156,7 +5450,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5174,7 +5469,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5194,7 +5490,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5209,7 +5506,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5224,7 +5522,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5240,7 +5539,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5261,7 +5561,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5278,7 +5579,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5295,7 +5597,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5327,7 +5630,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5350,7 +5654,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5372,7 +5677,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5393,7 +5699,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5416,7 +5723,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5439,7 +5747,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5477,7 +5786,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5498,7 +5808,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5515,7 +5826,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5536,7 +5848,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5554,7 +5867,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5571,7 +5885,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5589,7 +5904,8 @@ globalCss({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5604,7 +5920,8 @@ globalCss({}) "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5619,7 +5936,8 @@ globalCss() "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5641,7 +5959,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5660,7 +5979,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5679,7 +5999,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5698,7 +6019,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5717,7 +6039,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5736,7 +6059,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5755,7 +6079,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5774,7 +6099,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5809,7 +6135,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5828,7 +6155,8 @@ keyframes(...{ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5850,7 +6178,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5893,7 +6222,8 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true } ) .unwrap() @@ -5938,7 +6268,71 @@ keyframes({ "#, ExtractOption { package: "@devup-ui/core".to_string(), - css_file: None + css_dir: "@devup-ui/core".to_string(), + single_css: true + } + ) + .unwrap() + )); + } + + #[test] + #[serial] + fn extract_just_tsx_in_multiple_files() { + reset_class_map(); + assert_debug_snapshot!(ToBTreeSet::from( + extract( + "test.tsx", + r"import {Box} from '@devup-ui/core' + /> + ", + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: false + } + ) + .unwrap() + )); + assert_debug_snapshot!(ToBTreeSet::from( + extract( + "test.tsx", + r"import {Box as C} from '@devup-ui/core' + + ", + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: false + } + ) + .unwrap() + )); + + assert_debug_snapshot!(ToBTreeSet::from( + extract( + "test1.tsx", + r"import {Box} from '@devup-ui/core' + /> + ", + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: false + } + ) + .unwrap() + )); + assert_debug_snapshot!(ToBTreeSet::from( + extract( + "test1.tsx", + r"import {Box as C} from '@devup-ui/core' + + ", + ExtractOption { + package: "@devup-ui/core".to_string(), + css_dir: "@devup-ui/core".to_string(), + single_css: false } ) .unwrap() diff --git a/libs/extractor/src/prop_modify_utils.rs b/libs/extractor/src/prop_modify_utils.rs index b3444736..990ce197 100644 --- a/libs/extractor/src/prop_modify_utils.rs +++ b/libs/extractor/src/prop_modify_utils.rs @@ -18,6 +18,7 @@ pub fn modify_prop_object<'a>( styles: &mut [ExtractStyleProp<'a>], style_order: Option, style_vars: Option>, + filename: Option<&str>, ) { let mut class_name_prop = None; let mut style_prop = None; @@ -54,6 +55,7 @@ pub fn modify_prop_object<'a>( styles, style_order, &spread_props, + filename, ) { props.push(ast_builder.object_property_kind_object_property( SPAN, @@ -65,9 +67,14 @@ pub fn modify_prop_object<'a>( false, )); } - if let Some(ex) = - get_style_expression(ast_builder, &style_prop, styles, &style_vars, &spread_props) - { + if let Some(ex) = get_style_expression( + ast_builder, + &style_prop, + styles, + &style_vars, + &spread_props, + filename, + ) { props.push(ast_builder.object_property_kind_object_property( SPAN, PropertyKind::Init, @@ -86,6 +93,7 @@ pub fn modify_props<'a>( styles: &mut [ExtractStyleProp<'a>], style_order: Option, style_vars: Option>, + filename: Option<&str>, ) { let mut class_name_prop = None; let mut style_prop = None; @@ -131,6 +139,7 @@ pub fn modify_props<'a>( styles, style_order, &spread_props, + filename, ) { props.push(ast_builder.jsx_attribute_item_attribute( SPAN, @@ -142,9 +151,14 @@ pub fn modify_props<'a>( }), )); } - if let Some(ex) = - get_style_expression(ast_builder, &style_prop, styles, &style_vars, &spread_props) - { + if let Some(ex) = get_style_expression( + ast_builder, + &style_prop, + styles, + &style_vars, + &spread_props, + filename, + ) { props.push(ast_builder.jsx_attribute_item_attribute( SPAN, ast_builder.jsx_attribute_name_identifier(SPAN, "style"), @@ -159,6 +173,7 @@ pub fn get_class_name_expression<'a>( styles: &mut [ExtractStyleProp<'a>], style_order: Option, spread_props: &[Expression<'a>], + filename: Option<&str>, ) -> Option> { // should modify class name prop merge_string_expressions( @@ -167,7 +182,7 @@ pub fn get_class_name_expression<'a>( class_name_prop .as_ref() .map(|class_name| convert_class_name(ast_builder, class_name)), - gen_class_names(ast_builder, styles, style_order), + gen_class_names(ast_builder, styles, style_order, filename), ] .into_iter() .flatten() @@ -202,11 +217,12 @@ pub fn get_style_expression<'a>( styles: &[ExtractStyleProp<'a>], style_vars: &Option>, spread_props: &[Expression<'a>], + filename: Option<&str>, ) -> Option> { merge_object_expressions( ast_builder, [ - gen_styles(ast_builder, styles), + gen_styles(ast_builder, styles, filename), style_vars .as_ref() .map(|style_vars| convert_style_vars(ast_builder, style_vars)), diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap new file mode 100644 index 00000000..2b941ba9 --- /dev/null +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-2.snap @@ -0,0 +1,27 @@ +--- +source: libs/extractor/src/lib.rs +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +--- +ToBTreeSet { + styles: { + Static( + ExtractStaticStyle { + property: "margin", + value: "12px", + level: 0, + selector: None, + style_order: None, + }, + ), + Static( + ExtractStaticStyle { + property: "padding", + value: "8px", + level: 0, + selector: None, + style_order: None, + }, + ), + }, + code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", +} diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap new file mode 100644 index 00000000..2638f0f7 --- /dev/null +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-3.snap @@ -0,0 +1,27 @@ +--- +source: libs/extractor/src/lib.rs +expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +--- +ToBTreeSet { + styles: { + Static( + ExtractStaticStyle { + property: "margin", + value: "8px", + level: 0, + selector: None, + style_order: None, + }, + ), + Static( + ExtractStaticStyle { + property: "padding", + value: "4px", + level: 0, + selector: None, + style_order: None, + }, + ), + }, + code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", +} diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap new file mode 100644 index 00000000..ed263de1 --- /dev/null +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files-4.snap @@ -0,0 +1,27 @@ +--- +source: libs/extractor/src/lib.rs +expression: "ToBTreeSet::from(extract(\"test1.tsx\",\nr\"import {Box as C} from '@devup-ui/core'\n \n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +--- +ToBTreeSet { + styles: { + Static( + ExtractStaticStyle { + property: "margin", + value: "12px", + level: 0, + selector: None, + style_order: None, + }, + ), + Static( + ExtractStaticStyle { + property: "padding", + value: "8px", + level: 0, + selector: None, + style_order: None, + }, + ), + }, + code: "import \"@devup-ui/core/devup-ui-1.css\";\n
;\n", +} diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap new file mode 100644 index 00000000..b8aa1795 --- /dev/null +++ b/libs/extractor/src/snapshots/extractor__tests__extract_just_tsx_in_multiple_files.snap @@ -0,0 +1,27 @@ +--- +source: libs/extractor/src/lib.rs +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr\"import {Box} from '@devup-ui/core'\n />\n \",\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, split_css: true\n}).unwrap())" +--- +ToBTreeSet { + styles: { + Static( + ExtractStaticStyle { + property: "margin", + value: "8px", + level: 0, + selector: None, + style_order: None, + }, + ), + Static( + ExtractStaticStyle { + property: "padding", + value: "4px", + level: 0, + selector: None, + style_order: None, + }, + ), + }, + code: "import \"@devup-ui/core/devup-ui-0.css\";\n
;\n", +} diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap index b12be96b..f16d7429 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-10.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes(...{\n [`0%`]: { opacity: 0, ...{color: \"red\"} },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes(...{\n [`0%`]: { opacity: 0, ...{color: \"red\"} },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -45,5 +45,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap index bb7c4755..63f6616f 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-2.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": { opacity: 0 },\n \"50%\": { opacity: 0.5 },\n \"100%\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": { opacity: 0 },\n \"50%\": { opacity: 0.5 },\n \"100%\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap index 2c2536ce..72c5dbea 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-3.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0\": { opacity: 0 },\n \"50\": { opacity: 0.5 },\n \"100\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0\": { opacity: 0 },\n \"50\": { opacity: 0.5 },\n \"100\": { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap index 8e92ff23..7cee23eb 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-4.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [\"0\"]: { opacity: 0 },\n [\"50\"]: { opacity: 0.5 },\n [\"100\"]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [\"0\"]: { opacity: 0 },\n [\"50\"]: { opacity: 0.5 },\n [\"100\"]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap index 59758203..30dbafca 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-5.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [0]: { opacity: 0 },\n [50]: { opacity: 0.5 },\n [100]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [0]: { opacity: 0 },\n [50]: { opacity: 0.5 },\n [100]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap index 94129fb1..c3db1ef8 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-6.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n 0: { opacity: 0 },\n 50: { opacity: 0.5 },\n 100: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n 0: { opacity: 0 },\n 50: { opacity: 0.5 },\n 100: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap index ef8c4a9a..21cbd09b 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-7.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap index 06c4f541..fc13a89a 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-8.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -38,5 +38,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap index 661aaa02..6544c112 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs-9.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\n\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`1%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 1 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\n\nkeyframes({\n [`0`]: { opacity: 0 },\n [`50`]: { opacity: 0.5 },\n [`100`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`1%`]: { opacity: 0 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n});\nkeyframes({\n [`0%`]: { opacity: 1 },\n [`50%`]: { opacity: 0.5 },\n [`100%`]: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -104,5 +104,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n\"k0\";\n\"k1\";\n\"k2\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n\"a\";\n\"b\";\n\"c\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap index d19b80f8..f81d0881 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n to: { opacity: 1 }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n to: { opacity: 1 }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -29,5 +29,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap index 075670de..0720f40c 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal-2.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": `\n background-color: red;\n color: blue;\n `,\n \"100%\": `\n background-color: blue;\n color: red;\n `\n})\n\nkeyframes`\n 0% {\n background-color: red;\n color: blue;\n }\n 100% {\n background-color: blue;\n color: red;\n }\n`\nkeyframes({\n \"0%\": {\n backgroundColor: \"red\",\n color: \"blue\"\n },\n \"100%\": {\n backgroundColor: \"blue\",\n color: \"red\"\n }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n \"0%\": `\n background-color: red;\n color: blue;\n `,\n \"100%\": `\n background-color: blue;\n color: red;\n `\n})\n\nkeyframes`\n 0% {\n background-color: red;\n color: blue;\n }\n 100% {\n background-color: blue;\n color: red;\n }\n`\nkeyframes({\n \"0%\": {\n backgroundColor: \"red\",\n color: \"blue\"\n },\n \"100%\": {\n backgroundColor: \"blue\",\n color: \"red\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -43,5 +43,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n\"k0\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n\"a\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap index 411f8408..9af1b2c3 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_keyframs_literal.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: `\n background-color: red;\n `,\n to: `\n background-color: blue;\n `\n})\n\nkeyframes`\n from {\n background-color: red;\n }\n to {\n background-color: blue;\n }\n`\nkeyframes({\n from: {\n backgroundColor: \"red\"\n },\n to: {\n backgroundColor: \"blue\"\n }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: `\n background-color: red;\n `,\n to: `\n background-color: blue;\n `\n})\n\nkeyframes`\n from {\n background-color: red;\n }\n to {\n background-color: blue;\n }\n`\nkeyframes({\n from: {\n backgroundColor: \"red\"\n },\n to: {\n backgroundColor: \"blue\"\n }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -29,5 +29,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n\"k0\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n\"a\";\n\"a\";\n", } diff --git a/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap b/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap index 8ec12b32..be151bf8 100644 --- a/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap +++ b/libs/extractor/src/snapshots/extractor__tests__extract_wrong_keyframs.snap @@ -1,6 +1,6 @@ --- source: libs/extractor/src/lib.rs -expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n [true]: { opacity: 0.5 },\n to: { opacity: 1, color: dy }\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())" +expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { keyframes } from \"@devup-ui/core\";\nkeyframes({\n from: { opacity: 0 },\n [true]: { opacity: 0.5 },\n to: { opacity: 1, color: dy }\n})\n\"#,\nExtractOption\n{\n package: \"@devup-ui/core\".to_string(), css_file: None, single_css: true\n}).unwrap())" --- ToBTreeSet { styles: { @@ -29,5 +29,5 @@ ToBTreeSet { }, ), }, - code: "import \"@devup-ui/core/devup-ui.css\";\n\"k0\";\n", + code: "import \"@devup-ui/core/devup-ui.css\";\n\"a\";\n", } diff --git a/libs/extractor/src/visit.rs b/libs/extractor/src/visit.rs index 6b2ea4d7..aeb5f029 100644 --- a/libs/extractor/src/visit.rs +++ b/libs/extractor/src/visit.rs @@ -48,12 +48,19 @@ pub struct DevupVisitor<'a> { util_imports: HashMap>, jsx_object: Option, package: String, + split_filename: Option, pub css_file: String, pub styles: HashSet, } impl<'a> DevupVisitor<'a> { - pub fn new(allocator: &'a Allocator, filename: &str, package: &str, css_file: &str) -> Self { + pub fn new( + allocator: &'a Allocator, + filename: &str, + package: &str, + css_file: &str, + split_filename: Option, + ) -> Self { Self { ast: AstBuilder::new(allocator), filename: filename.to_string(), @@ -65,6 +72,7 @@ impl<'a> DevupVisitor<'a> { import_object: None, jsx_object: None, util_imports: HashMap::new(), + split_filename, } } } @@ -168,8 +176,12 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { .expression_string_literal(SPAN, self.ast.atom(""), None) } else { // css can not reachable - let class_name = - gen_class_names(&self.ast, &mut styles, style_order); + let class_name = gen_class_names( + &self.ast, + &mut styles, + style_order, + self.split_filename.as_deref(), + ); // already set style order self.styles @@ -197,7 +209,9 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { }, ); - let name = keyframes.extract().to_string(); + let name = keyframes + .extract(self.split_filename.as_deref()) + .to_string(); self.styles.insert(ExtractStyleValue::Keyframes(keyframes)); self.ast .expression_string_literal(SPAN, self.ast.atom(&name), None) @@ -249,6 +263,7 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { }) .collect::>(), None, + self.split_filename.as_deref(), ); if let Some(cls) = class_name { @@ -266,7 +281,9 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { let keyframes = ExtractKeyframes { keyframes: keyframes_to_keyframes_style(&css_str), }; - let name = keyframes.extract().to_string(); + let name = keyframes + .extract(self.split_filename.as_deref()) + .to_string(); self.styles.insert(ExtractStyleValue::Keyframes(keyframes)); *it = self @@ -363,6 +380,7 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { &mut props_styles, style_order, style_vars, + self.split_filename.as_deref(), ); } @@ -551,7 +569,14 @@ impl<'a> VisitMut<'a> for DevupVisitor<'a> { .rev() .for_each(|ex| props_styles.push(ExtractStyleProp::Static(ex))); - modify_props(&self.ast, attrs, &mut props_styles, style_order, style_vars); + modify_props( + &self.ast, + attrs, + &mut props_styles, + style_order, + style_vars, + self.split_filename.as_deref(), + ); props_styles .iter() diff --git a/libs/sheet/src/lib.rs b/libs/sheet/src/lib.rs index 7026c331..0eb41012 100644 --- a/libs/sheet/src/lib.rs +++ b/libs/sheet/src/lib.rs @@ -101,24 +101,31 @@ impl ExtractStyle for StyleSheetCss { } type PropertyMap = BTreeMap>>; +type KeyframesMap = BTreeMap>>>; -fn deserialize_btree_map_u8<'de, D>(deserializer: D) -> Result +fn deserialize_btree_map_u8<'de, D>( + deserializer: D, +) -> Result, D::Error> where D: Deserializer<'de>, { - let mut result = BTreeMap::new(); - for (key, value) in - BTreeMap::>>::deserialize( - deserializer, - )? + let mut result: BTreeMap = BTreeMap::new(); + for (key, value) in BTreeMap::< + String, + BTreeMap>>, + >::deserialize(deserializer)? { - let mut tmp_map = BTreeMap::new(); + let mut tmp_map: PropertyMap = BTreeMap::new(); for (key, value) in value.into_iter() { - tmp_map.insert(key.parse().map_err(Error::custom)?, value); + let mut inner_tmp_map = BTreeMap::new(); + for (key, value) in value.into_iter() { + inner_tmp_map.insert(key.parse().map_err(Error::custom)?, value); + } + tmp_map.insert(key.parse().map_err(Error::custom)?, inner_tmp_map); } - result.insert(key.parse().map_err(Error::custom)?, tmp_map); + result.insert(key, tmp_map); } Ok(result) @@ -126,10 +133,10 @@ where #[derive(Default, Deserialize, Serialize, Debug)] pub struct StyleSheet { #[serde(deserialize_with = "deserialize_btree_map_u8")] - pub properties: PropertyMap, + pub properties: BTreeMap, pub css: BTreeMap>, #[serde(default)] - pub keyframes: BTreeMap>>, + pub keyframes: KeyframesMap, #[serde(default)] pub global_css_files: BTreeSet, #[serde(default)] @@ -141,6 +148,7 @@ pub struct StyleSheet { } impl StyleSheet { + #[allow(clippy::too_many_arguments)] pub fn add_property( &mut self, class_name: &str, @@ -149,6 +157,7 @@ impl StyleSheet { value: &str, selector: Option<&StyleSelector>, style_order: Option, + filename: Option<&str>, ) -> bool { // register global css file for cache if let Some(StyleSelector::Global(_, file)) = selector { @@ -156,6 +165,8 @@ impl StyleSheet { } self.properties + .entry(filename.unwrap_or_default().to_string()) + .or_default() .entry(style_order.unwrap_or(255)) .or_default() .entry(level) @@ -198,8 +209,14 @@ impl StyleSheet { &mut self, name: &str, keyframes: BTreeMap>, + filename: Option<&str>, ) -> bool { - let map = self.keyframes.entry(name.to_string()).or_default(); + let map = self + .keyframes + .entry(filename.unwrap_or_default().to_string()) + .or_default() + .entry(name.to_string()) + .or_default(); if map == &keyframes { return false; } @@ -217,7 +234,12 @@ impl StyleSheet { self.font_faces.remove(file); - for map in self.properties.values_mut() { + for map in self + .properties + .entry("".to_string()) + .or_default() + .values_mut() + { for props in map.values_mut() { props.retain(|prop| { if let Some(StyleSelector::Global(_, f)) = prop.selector.as_ref() { @@ -285,160 +307,174 @@ impl StyleSheet { } } - pub fn create_css(&self) -> String { + pub fn create_css(&self, filename: Option<&str>) -> String { let mut css = self .imports .values() .flatten() .map(|import| format!("@import \"{import}\";")) .collect::(); - css.push_str(&self.theme.to_css()); - - for (name, map) in self.keyframes.iter() { - css.push_str(&format!( - "@keyframes {name}{{{}}}", - map.iter() - .map(|(key, props)| format!( - "{key}{{{}}}", - props + + let write_global = filename.is_none(); + + if write_global { + css.push_str(&self.theme.to_css()); + for (_, font_faces) in self.font_faces.iter() { + for font_face in font_faces.iter() { + css.push_str(&format!( + "@font-face{{{}}}", + font_face .iter() .map(|(key, value)| format!("{key}:{value}")) .collect::>() .join(";") - )) - .collect::() - )); - } + )); + } + } - for (_, font_faces) in self.font_faces.iter() { - for font_face in font_faces.iter() { - css.push_str(&format!( - "@font-face{{{}}}", - font_face - .iter() - .map(|(key, value)| format!("{key}:{value}")) - .collect::>() - .join(";") - )); + // global css + for (_, _css) in self.css.iter() { + for _css in _css.iter() { + css.push_str(&_css.extract()); + } } + } else { + // import global css + css.push_str("@import \"./devup-ui.css\";"); } - for (_, _css) in self.css.iter() { - for _css in _css.iter() { - css.push_str(&_css.extract()); + if let Some(keyframes) = self.keyframes.get(filename.unwrap_or_default()) { + for (name, map) in keyframes { + css.push_str(&format!( + "@keyframes {name}{{{}}}", + map.iter() + .map(|(key, props)| format!( + "{key}{{{}}}", + props + .iter() + .map(|(key, value)| format!("{key}:{value}")) + .collect::>() + .join(";") + )) + .collect::() + )); } } // order - for (_, map) in self.properties.iter() { - for (level, props) in map.iter() { - let (mut global_props, rest): (Vec<_>, Vec<_>) = props - .iter() - .partition(|prop| matches!(prop.selector, Some(StyleSelector::Global(_, _)))); - global_props.sort(); - let (mut medias, mut sorted_props): (Vec<&StyleSheetProperty>, Vec<_>) = - rest.iter().partition(|prop| { - matches!( - prop.selector, - Some(StyleSelector::Media { - query: _, - selector: _ - }) + if let Some(maps) = self.properties.get(filename.unwrap_or_default()) { + for (_, map) in maps.iter() { + for (level, props) in map.iter() { + let (mut global_props, rest): (Vec<_>, Vec<_>) = + props.iter().partition(|prop| { + matches!(prop.selector, Some(StyleSelector::Global(_, _))) + }); + global_props.sort(); + let (mut medias, mut sorted_props): (Vec<&StyleSheetProperty>, Vec<_>) = + rest.iter().partition(|prop| { + matches!( + prop.selector, + Some(StyleSelector::Media { + query: _, + selector: _ + }) + ) + }); + sorted_props.sort(); + medias.sort(); + let medias = { + let mut map = BTreeMap::new(); + for prop in medias { + if let Some(StyleSelector::Media { query, .. }) = &prop.selector { + map.entry(query).or_insert_with(Vec::new).push(prop); + } + } + map + }; + + let break_point = if *level == 0 { + None + } else { + Some( + self.theme + .breakpoints + .iter() + .enumerate() + .find(|(idx, _)| (*idx as u8) == *level) + .map(|(_, bp)| *bp) + .unwrap_or_else(|| { + self.theme.breakpoints.last().cloned().unwrap_or(0) + }), ) - }); - sorted_props.sort(); - medias.sort(); - let medias = { - let mut map = BTreeMap::new(); - for prop in medias { - if let Some(StyleSelector::Media { query, .. }) = &prop.selector { - map.entry(query).or_insert_with(Vec::new).push(prop); + }; + + if !global_props.is_empty() { + let mut selector_map: BTreeMap<_, Vec<_>> = BTreeMap::new(); + for prop in global_props { + if let Some(StyleSelector::Global(selector, _)) = &prop.selector { + selector_map.entry(selector.clone()).or_default().push(prop); + } } - } - map - }; - - let break_point = if *level == 0 { - None - } else { - Some( - self.theme - .breakpoints - .iter() - .enumerate() - .find(|(idx, _)| (*idx as u8) == *level) - .map(|(_, bp)| *bp) - .unwrap_or_else(|| self.theme.breakpoints.last().cloned().unwrap_or(0)), - ) - }; - - if !global_props.is_empty() { - // 같은 selector 끼리 모아서 CSS를 생성해야 함 - use std::collections::BTreeMap; - let mut selector_map: BTreeMap<_, Vec<_>> = BTreeMap::new(); - for prop in global_props { - if let Some(StyleSelector::Global(selector, _)) = &prop.selector { - selector_map.entry(selector.clone()).or_default().push(prop); + let mut inner_css = String::new(); + for (selector, props) in selector_map { + inner_css.push_str(&format!( + "{}{{{}}}", + selector, + props + .into_iter() + .map(|prop| format!("{}:{}", prop.property, prop.value)) + .collect::>() + .join(";") + )); } + css.push_str( + if let Some(break_point) = break_point { + format!("@media(min-width:{break_point}px){{{inner_css}}}") + } else { + inner_css + } + .as_str(), + ); } - let mut inner_css = String::new(); - for (selector, props) in selector_map { - // props는 같은 selector를 가진 property들의 Vec - inner_css.push_str(&format!( - "{}{{{}}}", - selector, - props - .into_iter() - .map(|prop| format!("{}:{}", prop.property, prop.value)) - .collect::>() - .join(";") - )); - } - css.push_str( - if let Some(break_point) = break_point { - format!("@media(min-width:{break_point}px){{{inner_css}}}") - } else { - inner_css - } - .as_str(), - ); - } - if !sorted_props.is_empty() { - let inner_css = sorted_props - .into_iter() - .map(ExtractStyle::extract) - .collect::(); - css.push_str( - if let Some(break_point) = break_point { - format!("@media(min-width:{break_point}px){{{inner_css}}}") - } else { - inner_css - } - .as_str(), - ); - } - for (media, props) in medias { - let inner_css = props - .into_iter() - .map(ExtractStyle::extract) - .collect::(); - css.push_str( - if let Some(break_point) = break_point { - format!("@media(min-width:{break_point}px)and {media}{{{inner_css}}}") - } else { - format!( - "@media{}{{{}}}", - if media.starts_with("(") { - media.clone() - } else { - format!(" {media}") - }, - inner_css.as_str() - ) - } - .as_str(), - ); + if !sorted_props.is_empty() { + let inner_css = sorted_props + .into_iter() + .map(ExtractStyle::extract) + .collect::(); + css.push_str( + if let Some(break_point) = break_point { + format!("@media(min-width:{break_point}px){{{inner_css}}}") + } else { + inner_css + } + .as_str(), + ); + } + for (media, props) in medias { + let inner_css = props + .into_iter() + .map(ExtractStyle::extract) + .collect::(); + css.push_str( + if let Some(break_point) = break_point { + format!( + "@media(min-width:{break_point}px)and {media}{{{inner_css}}}" + ) + } else { + format!( + "@media{}{{{}}}", + if media.starts_with("(") { + media.clone() + } else { + format!(" {media}") + }, + inner_css.as_str() + ) + } + .as_str(), + ); + } } } } @@ -472,14 +508,14 @@ mod tests { #[test] fn test_create_css_sort_test() { let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background-color", 1, "red", None, None); - sheet.add_property("test", "background", 1, "some", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background-color", 1, "red", None, None, None); + sheet.add_property("test", "background", 1, "some", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "border", 0, "1px solid", None, None); - sheet.add_property("test", "border-color", 0, "red", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "border", 0, "1px solid", None, None, None); + sheet.add_property("test", "border-color", 0, "red", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] fn test_create_css_with_selector_sort_test() { @@ -491,12 +527,13 @@ mod tests { "red", Some(&"hover".into()), None, + None, ); - sheet.add_property("test", "background-color", 1, "some", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background-color", 1, "some", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background-color", 1, "red", None, None); + sheet.add_property("test", "background-color", 1, "red", None, None, None); sheet.add_property( "test", "background-color", @@ -504,30 +541,31 @@ mod tests { "some", Some(&"hover".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background-color", 1, "red", None, None); - sheet.add_property("test", "background", 1, "some", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background-color", 1, "red", None, None, None); + sheet.add_property("test", "background", 1, "some", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] fn test_create_css_with_basic_sort_test() { let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background-color", 1, "red", None, Some(0)); - sheet.add_property("test", "background", 1, "some", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background-color", 1, "red", None, Some(0), None); + sheet.add_property("test", "background", 1, "some", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "border", 0, "1px solid", None, None); - sheet.add_property("test", "border-color", 0, "red", None, Some(0)); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "border", 0, "1px solid", None, None, None); + sheet.add_property("test", "border-color", 0, "red", None, Some(0), None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "display", 0, "flex", None, Some(0)); - sheet.add_property("test", "display", 0, "block", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "display", 0, "flex", None, Some(0), None); + sheet.add_property("test", "display", 0, "block", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -540,33 +578,42 @@ mod tests { "red", Some(&"hover".into()), None, + None, ); - sheet.add_property("test", "background-color", 1, "some", None, Some(0)); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background-color", 1, "some", None, Some(0), None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "display", 0, "flex", None, Some(0)); - sheet.add_property("test", "display", 0, "none", None, None); - sheet.add_property("test", "display", 2, "flex", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "display", 0, "flex", None, Some(0), None); + sheet.add_property("test", "display", 0, "none", None, None, None); + sheet.add_property("test", "display", 2, "flex", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] fn test_create_css() { let mut sheet = StyleSheet::default(); - sheet.add_property("test", "margin", 1, "40px", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "margin", 1, "40px", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_css("test.tsx", "div {display:flex;}"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "margin", 2, "40px", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "margin", 2, "40px", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background", 0, "red", Some(&"hover".into()), None); + sheet.add_property( + "test", + "background", + 0, + "red", + Some(&"hover".into()), + None, + None, + ); sheet.add_property( "test", "background", @@ -574,8 +621,9 @@ mod tests { "blue", Some(&"active".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -585,6 +633,7 @@ mod tests { "red", Some(&StyleSelector::from("group-focus-visible")), None, + None, ); sheet.add_property( "test", @@ -593,8 +642,9 @@ mod tests { "blue", Some(&StyleSelector::from("group-focus-visible")), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -604,6 +654,7 @@ mod tests { "red", Some(&StyleSelector::from("group-focus-visible")), None, + None, ); sheet.add_property( "test", @@ -612,8 +663,9 @@ mod tests { "blue", Some(&StyleSelector::from("hover")), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -623,6 +675,7 @@ mod tests { "red", Some(&"*:hover &".into()), None, + None, ); sheet.add_property( "test", @@ -631,8 +684,9 @@ mod tests { "blue", Some(&StyleSelector::from("group-focus-visible")), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -642,8 +696,9 @@ mod tests { "red", Some(&["theme-dark", "hover"].into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -653,8 +708,9 @@ mod tests { "red", Some(&["wrong", "hover"].into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -664,8 +720,9 @@ mod tests { "red", Some(&"*[disabled='true'] &:hover".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -675,8 +732,9 @@ mod tests { "red", Some(&"&[disabled='true']".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -686,8 +744,9 @@ mod tests { "red", Some(&"&[disabled='true'], &[disabled='true']".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -695,51 +754,51 @@ mod tests { let mut sheet = StyleSheet::default(); sheet.add_css("test.tsx", "div {display:flex;}"); sheet.add_css("test2.tsx", "div {display:flex;}"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); sheet.rm_global_css("wrong.tsx"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] fn test_style_order_create_css() { let mut sheet = StyleSheet::default(); - sheet.add_property("test", "margin-left", 0, "40px", None, Some(1)); - sheet.add_property("test", "margin-right", 0, "40px", None, Some(1)); - - sheet.add_property("test", "margin-left", 1, "40px", None, Some(1)); - sheet.add_property("test", "margin-right", 1, "40px", None, Some(1)); - sheet.add_property("test", "margin-left", 1, "44px", None, Some(1)); - sheet.add_property("test", "margin-right", 1, "44px", None, Some(1)); - sheet.add_property("test", "margin-left", 1, "40px", None, Some(1)); - sheet.add_property("test", "margin-right", 1, "44px", None, Some(1)); - sheet.add_property("test", "margin-left", 1, "44px", None, Some(1)); - sheet.add_property("test", "margin-right", 1, "44px", None, Some(1)); - sheet.add_property("test", "margin-left", 1, "50px", None, Some(2)); - sheet.add_property("test", "margin-right", 1, "50px", None, Some(2)); - sheet.add_property("test", "margin-left", 1, "60px", None, None); - sheet.add_property("test", "margin-right", 1, "60px", None, None); - sheet.add_property("test", "margin-left", 0, "70px", None, None); - sheet.add_property("test", "margin-right", 0, "70px", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "margin-left", 0, "40px", None, Some(1), None); + sheet.add_property("test", "margin-right", 0, "40px", None, Some(1), None); + + sheet.add_property("test", "margin-left", 1, "40px", None, Some(1), None); + sheet.add_property("test", "margin-right", 1, "40px", None, Some(1), None); + sheet.add_property("test", "margin-left", 1, "44px", None, Some(1), None); + sheet.add_property("test", "margin-right", 1, "44px", None, Some(1), None); + sheet.add_property("test", "margin-left", 1, "40px", None, Some(1), None); + sheet.add_property("test", "margin-right", 1, "44px", None, Some(1), None); + sheet.add_property("test", "margin-left", 1, "44px", None, Some(1), None); + sheet.add_property("test", "margin-right", 1, "44px", None, Some(1), None); + sheet.add_property("test", "margin-left", 1, "50px", None, Some(2), None); + sheet.add_property("test", "margin-right", 1, "50px", None, Some(2), None); + sheet.add_property("test", "margin-left", 1, "60px", None, None, None); + sheet.add_property("test", "margin-right", 1, "60px", None, None, None); + sheet.add_property("test", "margin-left", 0, "70px", None, None, None); + sheet.add_property("test", "margin-right", 0, "70px", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); - sheet.add_property("test", "background", 0, "red", None, Some(3)); - sheet.add_property("test", "background", 0, "blue", None, Some(17)); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "background", 0, "red", None, Some(3), None); + sheet.add_property("test", "background", 0, "blue", None, Some(17), None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] fn wrong_breakpoint() { let mut sheet = StyleSheet::default(); - sheet.add_property("test", "margin-left", 10, "40px", None, None); - sheet.add_property("test", "margin-right", 10, "40px", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "margin-left", 10, "40px", None, None, None); + sheet.add_property("test", "margin-right", 10, "40px", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -752,6 +811,7 @@ mod tests { "40px", Some(&"group-hover".into()), None, + None, ); sheet.add_property( "test", @@ -760,6 +820,7 @@ mod tests { "40px", Some(&"group-hover".into()), None, + None, ); sheet.add_property( "test", @@ -768,6 +829,7 @@ mod tests { "50px", Some(&"group-hover".into()), None, + None, ); sheet.add_property( "test", @@ -776,8 +838,9 @@ mod tests { "50px", Some(&"group-hover".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -790,6 +853,7 @@ mod tests { "40px", Some(&"theme-dark".into()), None, + None, ); sheet.add_property( "test", @@ -798,6 +862,7 @@ mod tests { "40px", Some(&"theme-dark".into()), None, + None, ); sheet.add_property( "test", @@ -806,6 +871,7 @@ mod tests { "40px", Some(&"theme-dark".into()), None, + None, ); sheet.add_property( "test", @@ -814,6 +880,7 @@ mod tests { "40px", Some(&"theme-dark".into()), None, + None, ); sheet.add_property( "test", @@ -822,6 +889,7 @@ mod tests { "50px", Some(&"theme-light".into()), None, + None, ); sheet.add_property( "test", @@ -830,8 +898,9 @@ mod tests { "50px", Some(&"theme-light".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -841,6 +910,7 @@ mod tests { "50px", Some(&"theme-light".into()), None, + None, ); sheet.add_property( "test", @@ -849,9 +919,10 @@ mod tests { "50px", Some(&"theme-light".into()), None, + None, ); - sheet.add_property("test", "margin-left", 0, "41px", None, None); - sheet.add_property("test", "margin-right", 0, "41px", None, None); + sheet.add_property("test", "margin-left", 0, "41px", None, None, None); + sheet.add_property("test", "margin-right", 0, "41px", None, None, None); sheet.add_property( "test", "margin-left", @@ -859,6 +930,7 @@ mod tests { "51px", Some(&"theme-light".into()), None, + None, ); sheet.add_property( "test", @@ -867,10 +939,11 @@ mod tests { "51px", Some(&"theme-light".into()), None, + None, ); - sheet.add_property("test", "margin-left", 0, "42px", None, None); - sheet.add_property("test", "margin-right", 0, "42px", None, None); - assert_debug_snapshot!(sheet.create_css()); + sheet.add_property("test", "margin-left", 0, "42px", None, None, None); + sheet.add_property("test", "margin-right", 0, "42px", None, None, None); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -880,6 +953,7 @@ mod tests { "50px", Some(&["theme-light", "active"].into()), None, + None, ); sheet.add_property( "test", @@ -888,6 +962,7 @@ mod tests { "50px", Some(&["theme-light", "active"].into()), None, + None, ); sheet.add_property( "test", @@ -896,6 +971,7 @@ mod tests { "50px", Some(&["theme-light", "hover"].into()), None, + None, ); sheet.add_property( "test", @@ -904,8 +980,9 @@ mod tests { "50px", Some(&["theme-light", "hover"].into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -918,6 +995,7 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); sheet.add_property( "test", @@ -926,8 +1004,17 @@ mod tests { "40px", Some(&"print".into()), None, + None, + ); + sheet.add_property( + "test", + "margin-top", + 0, + "40px", + Some(&"print".into()), + None, + None, ); - sheet.add_property("test", "margin-top", 0, "40px", Some(&"print".into()), None); sheet.add_property( "test", "margin-bottom", @@ -935,6 +1022,7 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); sheet.add_property( @@ -944,6 +1032,7 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); sheet.add_property( "test", @@ -952,8 +1041,17 @@ mod tests { "40px", Some(&"print".into()), None, + None, + ); + sheet.add_property( + "test", + "margin-top", + 1, + "40px", + Some(&"print".into()), + None, + None, ); - sheet.add_property("test", "margin-top", 1, "40px", Some(&"print".into()), None); sheet.add_property( "test", "margin-bottom", @@ -961,8 +1059,9 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -972,6 +1071,7 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); sheet.add_property( "test", @@ -980,11 +1080,12 @@ mod tests { "40px", Some(&"print".into()), None, + None, ); - sheet.add_property("test", "margin-top", 0, "40px", None, None); - sheet.add_property("test", "margin-bottom", 0, "40px", None, None); + sheet.add_property("test", "margin-top", 0, "40px", None, None, None); + sheet.add_property("test", "margin-bottom", 0, "40px", None, None, None); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -1000,6 +1101,7 @@ mod tests { selector: Some("&:hover".to_string()), }), None, + None, ); sheet.add_property( "test", @@ -1011,9 +1113,10 @@ mod tests { selector: Some("&:hover".to_string()), }), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -1022,16 +1125,18 @@ mod tests { let sheet: StyleSheet = serde_json::from_str( r##"{ "properties": { - "255": { - "0": [ - { - "className": "test", - "property": "mx", - "value": "40px", - "selector": null, - "basic": false - } - ] + "": { + "255": { + "0": [ + { + "className": "test", + "property": "mx", + "value": "40px", + "selector": null, + "basic": false + } + ] + } } }, "css": {}, @@ -1101,8 +1206,9 @@ mod tests { "test.tsx".to_string(), )), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( "test", @@ -1114,8 +1220,9 @@ mod tests { "test.tsx".to_string(), )), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); @@ -1129,6 +1236,7 @@ mod tests { "test.tsx".to_string(), )), None, + None, ); sheet.add_property( "test", @@ -1140,8 +1248,9 @@ mod tests { "test.tsx".to_string(), )), None, + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1154,6 +1263,7 @@ mod tests { "test.tsx".to_string(), )), Some(0), + None, ); sheet.add_property( "test", @@ -1165,8 +1275,9 @@ mod tests { "test.tsx".to_string(), )), Some(255), + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); sheet.add_property( "test", @@ -1178,6 +1289,7 @@ mod tests { "test2.tsx".to_string(), )), Some(255), + None, ); sheet.add_property( @@ -1187,10 +1299,11 @@ mod tests { "red", Some(&StyleSelector::Selector("&:hover".to_string())), Some(255), + None, ); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1203,6 +1316,7 @@ mod tests { "test.tsx".to_string(), )), Some(0), + None, ); sheet.add_property( "test", @@ -1214,12 +1328,13 @@ mod tests { "test.tsx".to_string(), )), Some(0), + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); let mut sheet = StyleSheet::default(); sheet.add_property( @@ -1232,6 +1347,7 @@ mod tests { "test.tsx".to_string(), )), Some(0), + None, ); sheet.add_property( "test", @@ -1243,12 +1359,13 @@ mod tests { "test2.tsx".to_string(), )), Some(0), + None, ); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); sheet.rm_global_css("test.tsx"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } #[test] @@ -1259,19 +1376,19 @@ mod tests { sheet.add_import("test2.tsx", "@devup-ui/core/css/global2.css"); sheet.add_import("test3.tsx", "@devup-ui/core/css/global3.css"); sheet.add_import("test4.tsx", "@devup-ui/core/css/global4.css"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } { let mut sheet = StyleSheet::default(); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); sheet.add_import("test.tsx", "@devup-ui/core/css/new-global.css"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } { let mut sheet = StyleSheet::default(); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); sheet.add_import("test.tsx", "@devup-ui/core/css/global.css"); - assert_debug_snapshot!(sheet.create_css()); + assert_debug_snapshot!(sheet.create_css(None)); } } @@ -1361,8 +1478,8 @@ mod tests { vec![(String::from("opacity"), String::from("1"))], ); - sheet.add_keyframes("fadeIn", keyframes); - let past = sheet.create_css(); + sheet.add_keyframes("fadeIn", keyframes, None); + let past = sheet.create_css(None); assert_debug_snapshot!(past); let mut keyframes: BTreeMap> = BTreeMap::new(); @@ -1390,9 +1507,9 @@ mod tests { vec![(String::from("opacity"), String::from("1"))], ); - sheet.add_keyframes("fadeIn", keyframes); + sheet.add_keyframes("fadeIn", keyframes, None); - let now = sheet.create_css(); + let now = sheet.create_css(None); assert_debug_snapshot!(now); assert_eq!(past, now); } @@ -1410,7 +1527,7 @@ mod tests { sheet.add_font_face("test.tsx", &font_face_props); - let css = sheet.create_css(); + let css = sheet.create_css(None); assert!(css.contains("@font-face")); assert!(css.contains("font-family:Roboto")); assert!(css.contains("src:url('/fonts/Roboto-Regular.ttf')")); diff --git a/libs/sheet/src/snapshots/sheet__tests__deserialize.snap b/libs/sheet/src/snapshots/sheet__tests__deserialize.snap index a4d88a1f..0b11d02d 100644 --- a/libs/sheet/src/snapshots/sheet__tests__deserialize.snap +++ b/libs/sheet/src/snapshots/sheet__tests__deserialize.snap @@ -4,13 +4,15 @@ expression: sheet --- StyleSheet { properties: { - 255: { - 0: { - StyleSheetProperty { - class_name: "test", - property: "mx", - value: "40px", - selector: None, + "": { + 255: { + 0: { + StyleSheetProperty { + class_name: "test", + property: "mx", + value: "40px", + selector: None, + }, }, }, }, diff --git a/package.json b/package.json index 471894b6..d8874be0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "eslint-plugin-devup": "^2.0.5", - "eslint": "^9.33.0", + "eslint": "^9.34.0", "vitest": "^3.2.4", "@vitest/coverage-v8": "^3.2.4", "@changesets/cli": "^2.29.6", diff --git a/packages/components/package.json b/packages/components/package.json index 0177c593..7a50e04f 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -49,13 +49,13 @@ }, "devDependencies": { "@devup-ui/vite-plugin": "workspace:*", - "@storybook/addon-docs": "^9.1.2", - "@storybook/addon-onboarding": "^9.1.2", - "@storybook/react-vite": "^9.1.2", - "@types/react": "^19.1.10", - "eslint-plugin-storybook": "^9.1.2", + "@storybook/addon-docs": "^9.1.3", + "@storybook/addon-onboarding": "^9.1.3", + "@storybook/react-vite": "^9.1.3", + "@types/react": "^19.1.12", + "eslint-plugin-storybook": "^9.1.3", "rollup-plugin-preserve-directives": "^0.4.0", - "storybook": "^9.1.2", + "storybook": "^9.1.3", "typescript": "^5.9.2", "vite": "^7.1.3", "vite-plugin-dts": "^4.5.4", diff --git a/packages/next-plugin/src/__tests__/plugin.test.ts b/packages/next-plugin/src/__tests__/plugin.test.ts index 43c259a6..c64abd12 100644 --- a/packages/next-plugin/src/__tests__/plugin.test.ts +++ b/packages/next-plugin/src/__tests__/plugin.test.ts @@ -8,7 +8,7 @@ import { DevupUI } from '../plugin' vi.mock('@devup-ui/webpack-plugin') vi.mock('node:fs') -describe('plugin', () => { +describe('DevupUINextPlugin', () => { describe('webpack', () => { it('should apply webpack plugin', async () => { const ret = DevupUI({}) @@ -16,7 +16,7 @@ describe('plugin', () => { ret.webpack!({ plugins: [] }, { buildId: 'tmpBuildId' } as any) expect(DevupUIWebpackPlugin).toHaveBeenCalledWith({ - cssFile: resolve('.next/cache', 'devup-ui_tmpBuildId.css'), + cssDir: resolve('.next/cache', 'devup-ui_tmpBuildId'), }) }) @@ -26,7 +26,7 @@ describe('plugin', () => { ret.webpack!({ plugins: [] }, { buildId: 'tmpBuildId', dev: true } as any) expect(DevupUIWebpackPlugin).toHaveBeenCalledWith({ - cssFile: resolve('df', 'devup-ui_tmpBuildId.css'), + cssDir: resolve('df', 'devup-ui_tmpBuildId'), watch: true, }) }) @@ -43,7 +43,7 @@ describe('plugin', () => { expect(DevupUIWebpackPlugin).toHaveBeenCalledWith({ package: 'new-package', - cssFile: resolve('.next/cache', 'devup-ui_tmpBuildId.css'), + cssDir: resolve('.next/cache', 'devup-ui_tmpBuildId'), }) }) @@ -62,7 +62,7 @@ describe('plugin', () => { expect(DevupUIWebpackPlugin).toHaveBeenCalledWith({ package: 'new-package', - cssFile: resolve('.next/cache', 'devup-ui_tmpBuildId.css'), + cssDir: resolve('.next/cache', 'devup-ui_tmpBuildId'), }) expect(webpack).toHaveBeenCalled() }) @@ -76,7 +76,7 @@ describe('plugin', () => { expect(ret).toEqual({ turbopack: { rules: { - 'devup-ui.css': [ + 'devup-ui': [ { loader: '@devup-ui/webpack-plugin/css-loader', options: { @@ -89,10 +89,12 @@ describe('plugin', () => { loader: '@devup-ui/webpack-plugin/loader', options: { package: '@devup-ui/react', - cssFile: resolve('df', 'devup-ui.css'), + cssDir: resolve('df', 'devup-ui'), sheetFile: join('df', 'sheet.json'), classMapFile: join('df', 'classMap.json'), + fileMapFile: join('df', 'fileMap.json'), watch: false, + singleCss: false, }, }, ], @@ -110,7 +112,7 @@ describe('plugin', () => { expect(ret).toEqual({ turbopack: { rules: { - 'devup-ui.css': [ + 'devup-ui': [ { loader: '@devup-ui/webpack-plugin/css-loader', options: { @@ -123,10 +125,12 @@ describe('plugin', () => { loader: '@devup-ui/webpack-plugin/loader', options: { package: '@devup-ui/react', - cssFile: resolve('df', 'devup-ui.css'), + cssDir: resolve('df', 'devup-ui'), sheetFile: join('df', 'sheet.json'), classMapFile: join('df', 'classMap.json'), + fileMapFile: join('df', 'fileMap.json'), watch: false, + singleCss: false, }, }, ], @@ -134,10 +138,6 @@ describe('plugin', () => { }, }) expect(mkdirSync).toHaveBeenCalledWith('df') - expect(writeFileSync).toHaveBeenCalledWith( - resolve('df', 'devup-ui.css'), - '/* devup-ui */', - ) expect(writeFileSync).toHaveBeenCalledWith(join('df', '.gitignore'), '*') }) }) diff --git a/packages/next-plugin/src/plugin.ts b/packages/next-plugin/src/plugin.ts index bdb07c40..0265be7c 100644 --- a/packages/next-plugin/src/plugin.ts +++ b/packages/next-plugin/src/plugin.ts @@ -29,18 +29,20 @@ export function DevupUI( config.turbopack.rules ??= {} const { package: libPackage = '@devup-ui/react', - interfacePath = 'df', - cssFile = resolve(interfacePath, 'devup-ui.css'), + distDir = 'df', + cssDir = resolve(distDir, 'devup-ui'), + singleCss = false, } = options - const sheetFile = join(interfacePath, 'sheet.json') - const classMapFile = join(interfacePath, 'classMap.json') - const gitignoreFile = join(interfacePath, '.gitignore') - if (!existsSync(interfacePath)) mkdirSync(interfacePath) - if (!existsSync(cssFile)) writeFileSync(cssFile, '/* devup-ui */') + const sheetFile = join(distDir, 'sheet.json') + const classMapFile = join(distDir, 'classMap.json') + const fileMapFile = join(distDir, 'fileMap.json') + const gitignoreFile = join(distDir, '.gitignore') + if (!existsSync(distDir)) mkdirSync(distDir) + if (!existsSync(cssDir)) mkdirSync(cssDir) if (!existsSync(gitignoreFile)) writeFileSync(gitignoreFile, '*') const rules: NonNullable = { - [basename(cssFile)]: [ + [basename(cssDir)]: [ { loader: '@devup-ui/webpack-plugin/css-loader', options: { @@ -53,10 +55,12 @@ export function DevupUI( loader: '@devup-ui/webpack-plugin/loader', options: { package: libPackage, - cssFile: cssFile, + cssDir, sheetFile, classMapFile, + fileMapFile, watch: process.env.NODE_ENV === 'development', + singleCss, }, }, ], @@ -67,9 +71,9 @@ export function DevupUI( const { webpack } = config config.webpack = (config, _options) => { - options.cssFile ??= resolve( - _options.dev ? (options.interfacePath ?? 'df') : '.next/cache', - `devup-ui_${_options.buildId}.css`, + options.cssDir ??= resolve( + _options.dev ? (options.distDir ?? 'df') : '.next/cache', + `devup-ui_${_options.buildId}`, ) config.plugins.push( new DevupUIWebpackPlugin({ diff --git a/packages/rsbuild-plugin/package.json b/packages/rsbuild-plugin/package.json index faa8c1a3..e51660f1 100644 --- a/packages/rsbuild-plugin/package.json +++ b/packages/rsbuild-plugin/package.json @@ -56,7 +56,7 @@ "@rsbuild/core": "*" }, "devDependencies": { - "@rsbuild/core": "^1.4.15", + "@rsbuild/core": "^1.5.1", "vite": "^7.1.3", "vite-plugin-dts": "^4.5.4", "vitest": "^3.2.4", diff --git a/packages/rsbuild-plugin/src/__tests__/index.test.ts b/packages/rsbuild-plugin/src/__tests__/index.test.ts index 5cdfcadf..66ebd170 100644 --- a/packages/rsbuild-plugin/src/__tests__/index.test.ts +++ b/packages/rsbuild-plugin/src/__tests__/index.test.ts @@ -2,7 +2,7 @@ describe('export', () => { it('should export DevupUIVitePlugin', async () => { const index = await import('../index') expect({ ...index }).toEqual({ - DevupUIRsbuildPlugin: expect.any(Function), + DevupUI: expect.any(Function), }) }) }) diff --git a/packages/rsbuild-plugin/src/__tests__/plugin.test.ts b/packages/rsbuild-plugin/src/__tests__/plugin.test.ts index e2c2b0d5..539054f1 100644 --- a/packages/rsbuild-plugin/src/__tests__/plugin.test.ts +++ b/packages/rsbuild-plugin/src/__tests__/plugin.test.ts @@ -1,19 +1,21 @@ -import { mkdir, writeFile } from 'node:fs/promises' -import { resolve } from 'node:path' +import { existsSync } from 'node:fs' +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { join, resolve } from 'node:path' -import { codeExtract } from '@devup-ui/wasm' +import { + codeExtract, + getDefaultTheme, + getThemeInterface, + registerTheme, +} from '@devup-ui/wasm' import { vi } from 'vitest' -import { DevupUIRsbuildPlugin } from '../plugin' +import { DevupUI } from '../plugin' // Mock dependencies vi.mock('node:fs/promises') -vi.mock('@devup-ui/wasm', () => ({ - codeExtract: vi.fn().mockReturnValue({ - code: '', - css: '', - }), -})) +vi.mock('node:fs') +vi.mock('@devup-ui/wasm') describe('DevupUIRsbuildPlugin', () => { beforeEach(() => { @@ -23,28 +25,65 @@ describe('DevupUIRsbuildPlugin', () => { }) it('should export DevupUIRsbuildPlugin', () => { - expect(DevupUIRsbuildPlugin).toBeDefined() + expect(DevupUI).toBeDefined() }) it('should be a function', () => { - expect(DevupUIRsbuildPlugin).toBeInstanceOf(Function) + expect(DevupUI).toBeInstanceOf(Function) }) it('should return a plugin object with correct name', async () => { - const plugin = DevupUIRsbuildPlugin() + const plugin = DevupUI() expect(plugin).toBeDefined() expect(plugin.name).toBe('devup-ui-rsbuild-plugin') expect(typeof plugin.setup).toBe('function') const transform = vi.fn() + const modifyRsbuildConfig = vi.fn() await plugin.setup({ transform, + modifyRsbuildConfig, } as any) expect(transform).toHaveBeenCalled() }) + it('should write data files', async () => { + vi.mocked(readFile).mockResolvedValueOnce(JSON.stringify({})) + vi.mocked(getThemeInterface).mockReturnValue('interface code') + vi.mocked(existsSync).mockImplementation((path) => { + if (path === 'devup.json') return true + return false + }) + const plugin = DevupUI() + expect(plugin).toBeDefined() + expect(plugin.setup).toBeDefined() + const transform = vi.fn() + const modifyRsbuildConfig = vi.fn() + await plugin.setup({ + transform, + modifyRsbuildConfig, + } as any) + }) + + it('should error when write data files', async () => { + vi.mocked(readFile).mockRejectedValueOnce(new Error('error')) + vi.mocked(existsSync).mockImplementation((path) => { + if (path === 'devup.json') return true + return false + }) + const plugin = DevupUI() + expect(plugin).toBeDefined() + expect(plugin.setup).toBeDefined() + const transform = vi.fn() + const modifyRsbuildConfig = vi.fn() + await plugin.setup({ + transform, + modifyRsbuildConfig, + } as any) + }) + it('should not register css transform', async () => { - const plugin = DevupUIRsbuildPlugin({ + const plugin = DevupUI({ extractCss: false, }) expect(plugin).toBeDefined() @@ -67,22 +106,24 @@ describe('DevupUIRsbuildPlugin', () => { include: ['src/**/*'], } - const plugin = DevupUIRsbuildPlugin(customOptions) + const plugin = DevupUI(customOptions) expect(plugin).toBeDefined() expect(plugin.name).toBe('devup-ui-rsbuild-plugin') }) it('should transform css', async () => { - const plugin = DevupUIRsbuildPlugin() + const plugin = DevupUI() expect(plugin).toBeDefined() expect(plugin.setup).toBeDefined() const transform = vi.fn() + const modifyRsbuildConfig = vi.fn() await plugin.setup({ transform, + modifyRsbuildConfig, } as any) expect(transform).toHaveBeenCalled() expect(transform).toHaveBeenCalledWith( { - test: resolve('df', 'devup-ui.css'), + test: /\.(tsx|ts|js|mjs|jsx)$/, }, expect.any(Function), ) @@ -98,12 +139,14 @@ describe('DevupUIRsbuildPlugin', () => { ).toBe('') }) it('should transform code', async () => { - const plugin = DevupUIRsbuildPlugin() + const plugin = DevupUI() expect(plugin).toBeDefined() expect(plugin.setup).toBeDefined() const transform = vi.fn() + const modifyRsbuildConfig = vi.fn() await plugin.setup({ transform, + modifyRsbuildConfig, } as any) expect(transform).toHaveBeenCalled() expect(transform).toHaveBeenCalledWith( @@ -122,6 +165,7 @@ describe('DevupUIRsbuildPlugin', () => { vi.mocked(codeExtract).mockReturnValue({ code: '
', css: '', + css_file: 'devup-ui.css', } as any) await expect( transform.mock.calls[1][1]({ @@ -133,9 +177,19 @@ const App = () => `, code: '
', map: undefined, }) + await expect( + transform.mock.calls[1][1]({ + code: `import { Box } from '@devup-ui/react' +const App = () => `, + resourcePath: 'node_modules/@wrong-ui/react/index.tsx', + }), + ).resolves.toEqual( + `import { Box } from '@devup-ui/react' +const App = () => `, + ) }) it('should transform with include', async () => { - const plugin = DevupUIRsbuildPlugin({ + const plugin = DevupUI({ include: ['lib'], }) expect(plugin).toBeDefined() @@ -143,6 +197,7 @@ const App = () => `, const transform = vi.fn() await plugin.setup({ transform, + modifyRsbuildConfig: vi.fn(), } as any) expect(transform).toHaveBeenCalled() expect(transform).toHaveBeenCalledWith( @@ -154,6 +209,7 @@ const App = () => `, vi.mocked(codeExtract).mockReturnValue({ code: '
', css: '.devup-ui-1 { color: red; }', + css_file: 'devup-ui.css', } as any) const ret = await transform.mock.calls[1][1]({ code: `import { Box } from '@devup-ui/react' @@ -165,11 +221,9 @@ const App = () => `, map: undefined, }) expect(writeFile).toHaveBeenCalledWith( - resolve('df', 'devup-ui.css'), + resolve('df', 'devup-ui', 'devup-ui.css'), expect.stringMatching(/\/\* src\/App\.tsx \d+ \*\//), - { - encoding: 'utf-8', - }, + 'utf-8', ) const ret1 = await transform.mock.calls[1][1]({ @@ -177,7 +231,110 @@ const App = () => `, const App = () => `, resourcePath: 'node_modules/@devup-ui/react/index.tsx', }) - expect(ret1).toBe(`import { Box } from '@devup-ui/react' -const App = () => `) + expect(ret1).toEqual({ + code: `
`, + map: undefined, + }) + }) + it.each( + createTestMatrix({ + watch: [true, false], + existsDevupFile: [true, false], + existsDistDir: [true, false], + existsSheetFile: [true, false], + existsClassMapFile: [true, false], + existsFileMapFile: [true, false], + existsCssDir: [true, false], + getDefaultTheme: ['theme', ''], + singleCss: [true, false], + }), + )('should write data files', async (options) => { + vi.mocked(writeFile).mockResolvedValueOnce(undefined) + vi.mocked(readFile).mockResolvedValueOnce(JSON.stringify({})) + vi.mocked(getThemeInterface).mockReturnValue('interface code') + vi.mocked(getDefaultTheme).mockReturnValue(options.getDefaultTheme) + vi.mocked(existsSync).mockImplementation((path) => { + if (path === 'devup.json') return options.existsDevupFile + if (path === 'df') return options.existsDistDir + if (path === resolve('df', 'devup-ui')) return options.existsCssDir + if (path === join('df', 'sheet.json')) return options.existsSheetFile + if (path === join('df', 'classMap.json')) + return options.existsClassMapFile + if (path === join('df', 'fileMap.json')) return options.existsFileMapFile + return false + }) + const plugin = DevupUI({ singleCss: options.singleCss }) + await (plugin as any).setup({ + transform: vi.fn(), + renderChunk: vi.fn(), + generateBundle: vi.fn(), + closeBundle: vi.fn(), + resolve: vi.fn(), + load: vi.fn(), + modifyRsbuildConfig: vi.fn(), + watchChange: vi.fn(), + resolveId: vi.fn(), + } as any) + if (options.existsDevupFile) { + expect(readFile).toHaveBeenCalledWith('devup.json', 'utf-8') + expect(registerTheme).toHaveBeenCalledWith({}) + expect(getThemeInterface).toHaveBeenCalledWith( + '@devup-ui/react', + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) + expect(writeFile).toHaveBeenCalledWith( + join('df', 'theme.d.ts'), + 'interface code', + 'utf-8', + ) + } else { + expect(registerTheme).toHaveBeenCalledWith({}) + } + + const modifyRsbuildConfig = vi.fn() + await (plugin as any).setup({ + transform: vi.fn(), + renderChunk: vi.fn(), + generateBundle: vi.fn(), + closeBundle: vi.fn(), + resolve: vi.fn(), + modifyRsbuildConfig, + load: vi.fn(), + watchChange: vi.fn(), + resolveId: vi.fn(), + } as any) + if (options.getDefaultTheme) { + expect(modifyRsbuildConfig).toHaveBeenCalledWith(expect.any(Function)) + const config = { + source: { + define: {}, + }, + } + modifyRsbuildConfig.mock.calls[0][0](config) + expect(config).toEqual({ + source: { + define: { + 'process.env.DEVUP_UI_DEFAULT_THEME': JSON.stringify( + options.getDefaultTheme, + ), + }, + }, + }) + } else { + expect(modifyRsbuildConfig).toHaveBeenCalledWith(expect.any(Function)) + const config = { + source: { + define: {}, + }, + } + modifyRsbuildConfig.mock.calls[0][0](config) + expect(config).toEqual({ + source: { + define: {}, + }, + }) + } }) }) diff --git a/packages/rsbuild-plugin/src/index.ts b/packages/rsbuild-plugin/src/index.ts index ddbd8397..46c6e437 100644 --- a/packages/rsbuild-plugin/src/index.ts +++ b/packages/rsbuild-plugin/src/index.ts @@ -1,4 +1 @@ -export { - DevupUIRsbuildPlugin, - type DevupUIRsbuildPluginOptions, -} from './plugin' +export { DevupUI, type DevupUIRsbuildPluginOptions } from './plugin' diff --git a/packages/rsbuild-plugin/src/plugin.ts b/packages/rsbuild-plugin/src/plugin.ts index bb6edfc6..873985c5 100644 --- a/packages/rsbuild-plugin/src/plugin.ts +++ b/packages/rsbuild-plugin/src/plugin.ts @@ -1,72 +1,147 @@ -import { mkdir, writeFile } from 'node:fs/promises' -import { join, resolve } from 'node:path' +import { existsSync } from 'node:fs' +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { basename, join, resolve } from 'node:path' -import { codeExtract } from '@devup-ui/wasm' +import { + codeExtract, + getCss, + getDefaultTheme, + getThemeInterface, + registerTheme, + setDebug, +} from '@devup-ui/wasm' import type { RsbuildPlugin } from '@rsbuild/core' export interface DevupUIRsbuildPluginOptions { package: string - cssFile: string - devupPath: string - interfacePath: string + cssDir: string + devupFile: string + distDir: string extractCss: boolean debug: boolean include: string[] + singleCss: boolean } let globalCss = '' -export const DevupUIRsbuildPlugin = ({ +async function writeDataFiles( + options: Omit< + DevupUIRsbuildPluginOptions, + 'extractCss' | 'debug' | 'include' + >, +) { + try { + const content = existsSync(options.devupFile) + ? await readFile(options.devupFile, 'utf-8') + : undefined + + if (content) { + registerTheme(JSON.parse(content)?.['theme'] ?? {}) + const interfaceCode = getThemeInterface( + options.package, + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) + + if (interfaceCode) { + await writeFile( + join(options.distDir, 'theme.d.ts'), + interfaceCode, + 'utf-8', + ) + } + } else { + registerTheme({}) + } + } catch (error) { + console.error(error) + registerTheme({}) + } + await Promise.all([ + !existsSync(options.cssDir) + ? mkdir(options.cssDir, { recursive: true }) + : Promise.resolve(), + !options.singleCss + ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss()) + : Promise.resolve(), + ]) +} + +export const DevupUI = ({ include = [], package: libPackage = '@devup-ui/react', extractCss = true, - interfacePath = 'df', - cssFile = resolve(interfacePath, 'devup-ui.css'), + distDir = 'df', + cssDir = resolve(distDir, 'devup-ui'), + devupFile = 'devup.json', + debug = false, + singleCss = false, }: Partial = {}): RsbuildPlugin => ({ name: 'devup-ui-rsbuild-plugin', - async setup(api) { - if (!extractCss) return - await mkdir(interfacePath, { recursive: true }) - await writeFile(join(interfacePath, '.gitignore'), '*', { - encoding: 'utf-8', + setDebug(debug) + + if (!existsSync(distDir)) await mkdir(distDir, { recursive: true }) + await writeFile(join(distDir, '.gitignore'), '*', 'utf-8') + + await writeDataFiles({ + package: libPackage, + cssDir, + devupFile, + distDir, + singleCss, }) - await writeFile(cssFile, '') + if (!extractCss) return api.transform( { - test: cssFile, + test: cssDir, }, () => globalCss, ) + api.modifyRsbuildConfig((config) => { + const theme = getDefaultTheme() + if (theme) { + config.source ??= {} + config.source.define = { + 'process.env.DEVUP_UI_DEFAULT_THEME': + JSON.stringify(getDefaultTheme()), + ...config.source.define, + } + } + return config + }) + api.transform( { test: /\.(tsx|ts|js|mjs|jsx)$/, }, async ({ code, resourcePath }) => { if ( - include.length - ? new RegExp( - `node_modules(?!(${include - .map((i) => `.*${i}`) - .join('|') - .replaceAll('/', '[\\/\\\\_]')})([\\/\\\\.]|$))`, - ).test(resourcePath) - : resourcePath.includes('node_modules') + new RegExp( + `node_modules(?!.*(${['@devup-ui', ...include] + .join('|') + .replaceAll('/', '[\\/\\\\_]')})([\\/\\\\.]|$))`, + ).test(resourcePath) ) return code const { code: retCode, css, map, - } = codeExtract(resourcePath, code, libPackage, cssFile) + css_file, + } = codeExtract(resourcePath, code, libPackage, cssDir, singleCss) - if (css && globalCss.length < css.length) { - globalCss = css - await writeFile(cssFile, `/* ${resourcePath} ${Date.now()} */`, { - encoding: 'utf-8', - }) + if (css) { + if (globalCss.length < css.length) globalCss = css + await writeFile( + join(cssDir, basename(css_file)), + `/* ${resourcePath} ${Date.now()} */`, + 'utf-8', + ) } return { code: retCode, diff --git a/packages/rsbuild-plugin/tsconfig.json b/packages/rsbuild-plugin/tsconfig.json index 4c6e75be..30053bb9 100644 --- a/packages/rsbuild-plugin/tsconfig.json +++ b/packages/rsbuild-plugin/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "types": ["vite/client", "vitest/importMeta", "vitest/globals"], + "types": [ + "vite/client", + "vitest/importMeta", + "vitest/globals" + ], "strict": true, "target": "ESNext", "declaration": true, @@ -22,5 +26,14 @@ "noEmit": true, "baseUrl": ".", "jsx": "react-jsx" - } -} + }, + "include": [ + "src", + "vite.config.ts", + "../../vitest.setup.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] +} \ No newline at end of file diff --git a/packages/vite-plugin/src/__tests__/plugin.test.ts b/packages/vite-plugin/src/__tests__/plugin.test.ts index 32fe9bf8..9c4371ba 100644 --- a/packages/vite-plugin/src/__tests__/plugin.test.ts +++ b/packages/vite-plugin/src/__tests__/plugin.test.ts @@ -1,5 +1,5 @@ -import { existsSync, readFileSync, writeFileSync } from 'node:fs' -import { writeFile } from 'node:fs/promises' +import { existsSync } from 'node:fs' +import { mkdir, readFile, writeFile } from 'node:fs/promises' import { dirname, join, resolve } from 'node:path' import { fileURLToPath } from 'node:url' @@ -8,6 +8,8 @@ import { getCss, getDefaultTheme, getThemeInterface, + registerTheme, + setDebug, } from '@devup-ui/wasm' import { describe } from 'vitest' @@ -23,443 +25,218 @@ beforeEach(() => { vi.resetAllMocks() }) -describe('devupUIPlugin', () => { +describe('devupUIVitePlugin', () => { console.error = vi.fn() - it('should write data files', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) - vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - } - const plugin = DevupUI(options) + it('should apply default options', () => { + const plugin = DevupUI({}) expect(plugin).toEqual({ name: 'devup-ui', - load: expect.any(Function), - resolveId: expect.any(Function), config: expect.any(Function), + load: expect.any(Function), watchChange: expect.any(Function), enforce: 'pre', transform: expect.any(Function), apply: expect.any(Function), generateBundle: expect.any(Function), + configResolved: expect.any(Function), }) - expect(existsSync).toHaveBeenCalledWith(devupPath) - expect(getThemeInterface).toHaveBeenCalledWith( - libPackage, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) - expect(readFileSync).toHaveBeenCalledWith(devupPath, 'utf-8') - expect(existsSync).toHaveBeenCalledWith(interfacePath) - expect((plugin as any).config()).toEqual({ - define: { - 'process.env.DEVUP_UI_DEFAULT_THEME': JSON.stringify(getDefaultTheme()), - }, - server: { - watch: { - ignored: [`!${devupPath}`], - }, - }, - optimizeDeps: { - exclude: [], - }, - build: { - rollupOptions: { - output: { - manualChunks: expect.any(Function), - }, - }, - }, - }) - vi.clearAllMocks() - vi.mocked(existsSync).mockReturnValue(true) - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - ;(plugin as any).watchChange(devupPath) - expect(readFileSync).toBeCalledTimes(1) + expect((plugin as any).apply()).toBe(true) + }) + it.each( + globalThis.createTestMatrix({ + debug: [true, false], + singleCss: [true, false], + extractCss: [true, false], + }), + )('should apply options', async (options) => { + const plugin = DevupUI(options) + expect(setDebug).toHaveBeenCalledWith(options.debug) + if (options.extractCss) { + expect( + (plugin as any) + .config() + .build.rollupOptions.output.manualChunks('devup-ui.css', 'code'), + ).toEqual(options.singleCss ? 'devup-ui.css' : undefined) + } else { + expect((plugin as any).config().build).toBeUndefined() + } + }) - vi.clearAllMocks() - vi.mocked(existsSync).mockReturnValue(true) - ;(plugin as any).watchChange('dif') - expect(readFileSync).toBeCalledTimes(0) + it.each( + createTestMatrix({ + watch: [true, false], + existsDevupFile: [true, false], + existsDistDir: [true, false], + existsSheetFile: [true, false], + existsClassMapFile: [true, false], + existsFileMapFile: [true, false], + existsCssDir: [true, false], + getDefaultTheme: ['theme', ''], + singleCss: [true, false], + }), + )('should write data files', async (options) => { + vi.mocked(writeFile).mockResolvedValueOnce(undefined) + vi.mocked(readFile).mockResolvedValueOnce(JSON.stringify({})) + vi.mocked(getThemeInterface).mockReturnValue('interface code') + vi.mocked(getDefaultTheme).mockReturnValue(options.getDefaultTheme) + vi.mocked(existsSync).mockImplementation((path) => { + if (path === 'devup.json') return options.existsDevupFile + if (path === 'df') return options.existsDistDir + if (path === resolve('df', 'devup-ui')) return options.existsCssDir + if (path === join('df', 'sheet.json')) return options.existsSheetFile + if (path === join('df', 'classMap.json')) + return options.existsClassMapFile + if (path === join('df', 'fileMap.json')) return options.existsFileMapFile + return false + }) + const plugin = DevupUI({ singleCss: options.singleCss }) + await (plugin as any).configResolved() + if (options.existsDevupFile) { + expect(readFile).toHaveBeenCalledWith('devup.json', 'utf-8') + expect(registerTheme).toHaveBeenCalledWith({}) + expect(getThemeInterface).toHaveBeenCalledWith( + '@devup-ui/react', + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) + expect(writeFile).toHaveBeenCalledWith( + join('df', 'theme.d.ts'), + 'interface code', + 'utf-8', + ) + } else { + expect(registerTheme).toHaveBeenCalledWith({}) + } - vi.clearAllMocks() - vi.mocked(existsSync).mockReturnValue(false) - ;(plugin as any).watchChange(devupPath) - expect(readFileSync).toBeCalledTimes(0) + const config = (plugin as any).config() + if (options.getDefaultTheme) { + expect(config.define).toEqual({ + 'process.env.DEVUP_UI_DEFAULT_THEME': JSON.stringify( + options.getDefaultTheme, + ), + }) + } else { + expect(config.define).toEqual({}) + } + }) - vi.clearAllMocks() + it('should reset data files when load error', async () => { + vi.mocked(writeFile).mockResolvedValueOnce(undefined) + vi.mocked(getThemeInterface).mockReturnValue('interface code') vi.mocked(existsSync).mockReturnValue(true) - vi.mocked(readFileSync).mockImplementation(() => { + vi.mocked(readFile).mockImplementation(() => { throw new Error('error') }) - ;(plugin as any).watchChange(devupPath) - expect(readFileSync).toBeCalledTimes(1) - - vi.clearAllMocks() - ;(plugin as any).transform('code', 'file') - expect(readFileSync).toBeCalledTimes(0) - - vi.clearAllMocks() - ;(plugin as any).transform('code', 'node_modules') - expect(readFileSync).toBeCalledTimes(0) - - vi.clearAllMocks() - ;(plugin as any).transform('code', 'wrong.css') - expect(readFileSync).toBeCalledTimes(0) - - vi.clearAllMocks() - vi.mocked(codeExtract).mockReturnValueOnce({ - css: 'css code', - code: 'code', - } as any) - ;(plugin as any).transform('code', 'correct.ts') - expect(writeFile).toBeCalledTimes(1) - - vi.clearAllMocks() - vi.mocked(codeExtract).mockReturnValueOnce({ - css: undefined, - code: 'code', - } as any) - ;(plugin as any).transform('code', 'correct.ts') - expect(writeFile).toBeCalledTimes(0) - ;(plugin as any).apply({}, { command: 'serve' }) - vi.clearAllMocks() - vi.mocked(codeExtract).mockReturnValueOnce({ - css: 'css code next', - code: 'code', - } as any) - ;(plugin as any).transform('code', 'correct.ts') - expect(writeFile).toBeCalledTimes(1) - }) - it('should transform code', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) - vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - } - const plugin = DevupUI(options) - expect(plugin).toEqual({ - name: 'devup-ui', - load: expect.any(Function), - resolveId: expect.any(Function), - config: expect.any(Function), - watchChange: expect.any(Function), - enforce: 'pre', - transform: expect.any(Function), - apply: expect.any(Function), - generateBundle: expect.any(Function), - }) - expect(existsSync).toHaveBeenCalledWith(devupPath) - expect(getThemeInterface).toHaveBeenCalledWith( - libPackage, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', + const plugin = DevupUI({}) + await (plugin as any).configResolved() + expect(registerTheme).toHaveBeenCalledWith({}) + expect(writeFile).toHaveBeenCalledWith( + join('df', '.gitignore'), + '*', + 'utf-8', ) - expect(readFileSync).toHaveBeenCalledWith(devupPath, 'utf-8') - expect(existsSync).toHaveBeenCalledWith(interfacePath) - vi.clearAllMocks() - vi.mocked(codeExtract).mockReturnValueOnce({ - css: 'css code 1223444', - code: 'code', - } as any) - // eslint-disable-next-line prefer-spread - ;(plugin as any).apply(null, { - command: 'serve', - }) - vi.stubEnv('NODE_ENV', 'development') - ;(plugin as any).transform('code', 'correct.ts') - expect(writeFile).toBeCalledTimes(1) }) - it('should not extract code', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) + + it('should watch change', async () => { + vi.mocked(writeFile).mockResolvedValueOnce(undefined) vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - extractCss: false, - } - const plugin = DevupUI(options) - expect(plugin).toEqual({ - name: 'devup-ui', - load: expect.any(Function), - resolveId: expect.any(Function), - config: expect.any(Function), - watchChange: expect.any(Function), - enforce: 'pre', - transform: expect.any(Function), - apply: expect.any(Function), - generateBundle: expect.any(Function), - }) - expect(existsSync).toHaveBeenCalledWith(devupPath) - expect(getThemeInterface).toHaveBeenCalledWith( - libPackage, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', + vi.mocked(existsSync).mockReturnValue(true) + vi.mocked(readFile).mockResolvedValueOnce( + JSON.stringify({ theme: 'theme' }), ) - expect(readFileSync).toHaveBeenCalledWith(devupPath, 'utf-8') - expect(existsSync).toHaveBeenCalledWith(interfacePath) - vi.clearAllMocks() - ;(plugin as any).transform('code', 'correct.tsx') - expect(readFileSync).toBeCalledTimes(0) + const plugin = DevupUI({}) + await (plugin as any).watchChange('devup.json') + expect(writeFile).toHaveBeenCalledWith( + join('df', 'theme.d.ts'), + 'interface code', + 'utf-8', + ) + + await (plugin as any).watchChange('wrong') }) - it('should catch error', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) + + it('should print error when watch change error', async () => { + vi.mocked(writeFile).mockResolvedValueOnce(undefined) vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - vi.mocked(writeFileSync).mockImplementation(() => { + vi.mocked(existsSync).mockReturnValueOnce(true).mockReturnValueOnce(false) + vi.mocked(mkdir).mockImplementation(() => { throw new Error('error') }) - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - } - const plugin = DevupUI(options) - expect(plugin).toEqual({ - name: 'devup-ui', - load: expect.any(Function), - resolveId: expect.any(Function), - config: expect.any(Function), - watchChange: expect.any(Function), - enforce: 'pre', - transform: expect.any(Function), - apply: expect.any(Function), - generateBundle: expect.any(Function), - }) - expect(existsSync).toHaveBeenCalledWith(devupPath) - expect(getThemeInterface).toHaveBeenCalledWith( - libPackage, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) - expect(readFileSync).toHaveBeenCalledWith(devupPath, 'utf-8') - expect(existsSync).toHaveBeenCalledWith(interfacePath) + const plugin = DevupUI({}) + await (plugin as any).watchChange('devup.json') + expect(console.error).toHaveBeenCalledWith(expect.any(Error)) }) - it('should return true on apply', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) - vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - } - const plugin = DevupUI(options) - expect(plugin).toEqual({ - name: 'devup-ui', - config: expect.any(Function), - load: expect.any(Function), - resolveId: expect.any(Function), - watchChange: expect.any(Function), - enforce: 'pre', - transform: expect.any(Function), - apply: expect.any(Function), - generateBundle: expect.any(Function), - }) - expect(existsSync).toHaveBeenCalledWith(devupPath) - expect(getThemeInterface).toHaveBeenCalledWith( - libPackage, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) - expect(readFileSync).toHaveBeenCalledWith(devupPath, 'utf-8') - expect(existsSync).toHaveBeenCalledWith(interfacePath) - expect((plugin as any).apply({}, { command: 'build' })).toBe(true) + it('should load', () => { + vi.mocked(getCss).mockReturnValue('css code') + const plugin = DevupUI({}) + expect((plugin as any).load('devup-ui.css')).toEqual(expect.any(String)) + expect((plugin as any).load('devup-ui-10.css')).toEqual(expect.any(String)) }) - it('should include', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - const plugin = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - include: ['@devup/product-system'], - }) + it.each( + createTestMatrix({ + extractCss: [true, false], + }), + )('should transform', async (options) => { + vi.mocked(getCss).mockReturnValue('css code') vi.mocked(codeExtract).mockReturnValue({ css: 'css code', code: 'code', + css_file: 'devup-ui.css', } as any) - ;(plugin as any).transform('code', 'node_modules/@devup/test/dist/index.js') - expect(codeExtract).toBeCalledTimes(0) - ;(plugin as any).transform( - 'code', - 'node_modules/@devup/product-system/dist/index.js', - ) - expect(codeExtract).toHaveBeenCalledWith( - 'node_modules/@devup/product-system/dist/index.js', - 'code', - libPackage, - cssFile, - ) - ;(plugin as any).transform( - 'code', - 'C:/devfive/minions-front/apps/vendor/node_modules/.vite/deps/@devup_product-system.js?v=63f19272', - ) - expect(codeExtract).toHaveBeenCalledWith( - 'C:/devfive/minions-front/apps/vendor/node_modules/.vite/deps/@devup_product-system.js', - 'code', - libPackage, - cssFile, - ) - }) - describe('basic', () => { - const devupPath = 'devup.json' - const interfacePath = 'df' - const cssFile = join(_dirname, 'devup-ui.css') - const libPackage = '@devup-ui/react' - vi.mocked(existsSync).mockReturnValueOnce(false).mockReturnValueOnce(true) - vi.mocked(getThemeInterface).mockReturnValue('interface code') - vi.mocked(readFileSync).mockReturnValueOnce('{"theme": {}}') - const options = { - package: libPackage, - cssFile, - devupPath, - interfacePath, - } const plugin = DevupUI(options) - it('should merge chunks', () => { - expect( - (plugin as any) - .config() - .build.rollupOptions.output.manualChunks('code', 'code'), - ).toBeUndefined() - expect( - (plugin as any) - .config() - .build.rollupOptions.output.manualChunks('devup-ui.css', 'code'), - ).toEqual('devup-ui.css') - expect( - (plugin as any) - .config() - .build.rollupOptions.output.manualChunks('devup-ui.css?v=1', 'code'), - ).toEqual('devup-ui.css') + expect(await (plugin as any).transform('code', 'devup-ui.wrong')).toEqual( + undefined, + ) + expect(await (plugin as any).transform('code', 'devup-ui.tsx')).toEqual( + options.extractCss ? { code: 'code' } : undefined, + ) - const plugin1 = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - extractCss: false, - }) - expect((plugin1 as any).config().build).toBeUndefined() - }) - it('should resolveId', () => { - expect((plugin as any).resolveId('code', 'code')).toBeUndefined() + if (options.extractCss) { expect( - (plugin as any) - .resolveId(cssFile, 'code') - .startsWith('devup-ui.css?t='), - ).toBe(true) - }) - it('should load', () => { - Date.now = () => 1 - expect((plugin as any).load('code')).toBeUndefined() - expect((plugin as any).load(cssFile)).toBeUndefined() - vi.mocked(getCss).mockReturnValueOnce('css code') + await (plugin as any).transform('code', 'node_modules/test/index.tsx'), + ).toEqual(undefined) expect( - (plugin as any).load('devup-ui.css?v=some').length.toString(), - ).toBe('css code'.length.toString()) - }) - it('should generate bundle', () => { - const plugin = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - }) - const bundle = { - 'devup-ui.css': { - source: 'css code', - }, - } as any - ;(plugin as any).generateBundle({}, bundle) - expect(bundle['devup-ui.css'].source).toBe('css code') - }) - - it('should generate bundle without extractCss', () => { - const plugin = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - extractCss: false, - }) - const bundle = { - 'devup-ui.css': { - source: 'no', - }, - } as any - ;(plugin as any).generateBundle({}, bundle) - expect(bundle['devup-ui.css'].source).toBe('no') - }) - - it('should define process.env.DEVUP_UI_DEFAULT_THEME', () => { - vi.mocked(getDefaultTheme).mockReturnValue('defaultTheme') - const plugin = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - }) - expect((plugin as any).config().define).toEqual({ - 'process.env.DEVUP_UI_DEFAULT_THEME': '"defaultTheme"', - }) - }) + await (plugin as any).transform( + 'code', + 'node_modules/@devup-ui/hello/index.tsx', + ), + ).toEqual({ code: 'code' }) + + vi.mocked(codeExtract).mockReturnValue({ + css: 'css code test next', + code: 'code', + css_file: 'devup-ui.css', + } as any) + expect( + await (plugin as any).transform( + 'code', + 'node_modules/@devup-ui/hello/index.tsx', + ), + ).toEqual({ code: 'code' }) + } + }) - it('should undefine process.env.DEVUP_UI_DEFAULT_THEME', () => { - vi.mocked(getDefaultTheme).mockReturnValue(undefined) - const plugin = DevupUI({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - }) - expect((plugin as any).config().define).toStrictEqual({}) - }) + it.each( + createTestMatrix({ + extractCss: [true, false], + }), + )('should generateBundle', async (options) => { + vi.mocked(getCss).mockReturnValue('css code test') + const plugin = DevupUI({ extractCss: options.extractCss, singleCss: true }) + const bundle = { + 'devup-ui.css': { source: 'css code' }, + } as any + ;(plugin as any).load('devup-ui.css') + await (plugin as any).generateBundle({}, bundle) + if (options.extractCss) { + expect(bundle['devup-ui.css'].source).toEqual('css code test') + } else { + expect(bundle['devup-ui.css'].source).toEqual('css code') + } }) }) diff --git a/packages/vite-plugin/src/plugin.ts b/packages/vite-plugin/src/plugin.ts index 30aa64f2..e7da96e2 100644 --- a/packages/vite-plugin/src/plugin.ts +++ b/packages/vite-plugin/src/plugin.ts @@ -1,6 +1,6 @@ -import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs' -import { writeFile } from 'node:fs/promises' -import { join, resolve } from 'node:path' +import { existsSync } from 'node:fs' +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { basename, dirname, join, relative, resolve } from 'node:path' import { codeExtract, @@ -10,76 +10,91 @@ import { registerTheme, setDebug, } from '@devup-ui/wasm' -import { normalizePath, type PluginOption, type UserConfig } from 'vite' +import { type PluginOption, type UserConfig } from 'vite' export interface DevupUIPluginOptions { package: string - cssFile: string - devupPath: string - interfacePath: string + cssDir: string + devupFile: string + distDir: string extractCss: boolean debug: boolean include: string[] + singleCss: boolean } -function writeDataFiles( +function getFileNumByFilename(filename: string) { + if (filename.endsWith('devup-ui.css')) return null + return parseInt(filename.split('devup-ui-')[1].split('.')[0]) +} + +async function writeDataFiles( options: Omit, ) { - if (!existsSync(options.interfacePath)) mkdirSync(options.interfacePath) - if (existsSync(options.devupPath)) { - registerTheme( - JSON.parse(readFileSync(options.devupPath, 'utf-8'))?.['theme'], - ) - const interfaceCode = getThemeInterface( - options.package, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) - if (interfaceCode) { - writeFileSync(join(options.interfacePath, 'theme.d.ts'), interfaceCode, { - encoding: 'utf-8', - }) + try { + const content = existsSync(options.devupFile) + ? await readFile(options.devupFile, 'utf-8') + : undefined + + if (content) { + registerTheme(JSON.parse(content)?.['theme'] ?? {}) + const interfaceCode = getThemeInterface( + options.package, + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) + + if (interfaceCode) { + await writeFile( + join(options.distDir, 'theme.d.ts'), + interfaceCode, + 'utf-8', + ) + } + } else { + registerTheme({}) } + } catch (error) { + console.error(error) + registerTheme({}) } - if (!existsSync(options.cssFile)) - writeFileSync(options.cssFile, '', { - encoding: 'utf-8', - }) - writeFileSync(join(options.interfacePath, '.gitignore'), '*', { - encoding: 'utf-8', - }) + await Promise.all([ + !existsSync(options.cssDir) + ? mkdir(options.cssDir, { recursive: true }) + : Promise.resolve(), + !options.singleCss + ? writeFile(join(options.cssDir, 'devup-ui.css'), getCss()) + : Promise.resolve(), + ]) } -let globalCss = '' +const cssMap: Map = new Map() export function DevupUI({ package: libPackage = '@devup-ui/react', - devupPath = 'devup.json', - interfacePath = 'df', - cssFile = resolve(interfacePath, 'devup-ui.css'), + devupFile = 'devup.json', + distDir = 'df', + cssDir = resolve(distDir, 'devup-ui'), extractCss = true, debug = false, include = [], + singleCss = false, }: Partial = {}): PluginOption { setDebug(debug) - try { - writeDataFiles({ - package: libPackage, - cssFile, - devupPath, - interfacePath, - }) - } catch (error) { - console.error(error) - } - const theme = getDefaultTheme() - const define: Record = {} - if (theme) { - define['process.env.DEVUP_UI_DEFAULT_THEME'] = JSON.stringify(theme) - } return { name: 'devup-ui', + async configResolved() { + if (!existsSync(distDir)) await mkdir(distDir, { recursive: true }) + await writeFile(join(distDir, '.gitignore'), '*', 'utf-8') + await writeDataFiles({ + package: libPackage, + cssDir, + devupFile, + distDir, + singleCss, + }) + }, config() { const theme = getDefaultTheme() const define: Record = {} @@ -89,7 +104,7 @@ export function DevupUI({ const ret: Omit = { server: { watch: { - ignored: [`!${devupPath}`], + ignored: [`!${devupFile}`], }, }, define, @@ -103,7 +118,7 @@ export function DevupUI({ output: { manualChunks(id) { // merge devup css files - if (id.startsWith('devup-ui.css')) { + if (singleCss && id.endsWith('devup-ui.css')) { return `devup-ui.css` } }, @@ -116,61 +131,68 @@ export function DevupUI({ apply() { return true }, - watchChange(id) { - if (resolve(id) !== resolve(devupPath)) return - if (existsSync(devupPath)) { + async watchChange(id) { + if (resolve(id) !== resolve(devupFile)) return + if (existsSync(devupFile)) { try { - writeDataFiles({ + await writeDataFiles({ package: libPackage, - cssFile, - devupPath, - interfacePath, + cssDir, + devupFile, + distDir, + singleCss, }) } catch (error) { console.error(error) } } }, - resolveId(id) { - if (normalizePath(id) === normalizePath(cssFile)) - return `devup-ui.css?t=${Date.now().toString() + globalCss.length}` - }, load(id) { - if (id.split('?')[0] === 'devup-ui.css') - // for no share env like storybook - return (globalCss = getCss()) + const fileName = basename(id).split('?')[0] + if (fileName.startsWith('devup-ui') && fileName.endsWith('.css')) { + const fileNum = getFileNumByFilename(id) + const css = getCss(fileNum) + cssMap.set(fileNum, css) + return css + } }, enforce: 'pre', async transform(code, id) { if (!extractCss) return const fileName = id.split('?')[0] + if (!/\.(tsx|ts|js|mjs|jsx)$/i.test(fileName)) return if ( - include.length - ? new RegExp( - `node_modules(?!(${include - .map((i) => `.*${i}`) - .join('|') - .replaceAll('/', '[\\/\\\\_]')})([\\/\\\\.]|$))`, - ).test(fileName) - : id.includes('node_modules') + new RegExp( + `node_modules(?!.*(${['@devup-ui', ...include] + .join('|') + .replaceAll('/', '[\\/\\\\_]')})([\\/\\\\.]|$))`, + ).test(fileName) ) { return } - if (!/\.(tsx|ts|js|mjs|jsx)$/i.test(fileName)) return + + let rel = relative(dirname(id), cssDir).replaceAll('\\', '/') + if (!rel.startsWith('./')) rel = `./${rel}` const { code: retCode, css, map, - } = codeExtract(fileName, code, libPackage, cssFile) + css_file, + } = codeExtract(fileName, code, libPackage, rel, singleCss) - if (css && globalCss.length < css.length) { - globalCss = css - await writeFile(cssFile, `/* ${id} ${Date.now()} */`, { - encoding: 'utf-8', - }) + if (css) { + const fileNum = getFileNumByFilename(css_file) + const prevCss = cssMap.get(fileNum) + if (prevCss && prevCss.length < css.length) cssMap.set(fileNum, css) + await writeFile( + join(cssDir, basename(css_file)), + `/* ${id} ${Date.now()} */`, + 'utf-8', + ) } + // console.log('transform', retCode) return { code: retCode, map, @@ -183,7 +205,9 @@ export function DevupUI({ (file) => file.includes('devup-ui') && file.endsWith('.css'), ) if (cssFile && 'source' in bundle[cssFile]) { - bundle[cssFile].source = globalCss + const fileNum = getFileNumByFilename(cssFile) + const css = cssMap.get(fileNum) + if (css) bundle[cssFile].source = css } }, } diff --git a/packages/vite-plugin/tsconfig.json b/packages/vite-plugin/tsconfig.json index 4c6e75be..30053bb9 100644 --- a/packages/vite-plugin/tsconfig.json +++ b/packages/vite-plugin/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "types": ["vite/client", "vitest/importMeta", "vitest/globals"], + "types": [ + "vite/client", + "vitest/importMeta", + "vitest/globals" + ], "strict": true, "target": "ESNext", "declaration": true, @@ -22,5 +26,14 @@ "noEmit": true, "baseUrl": ".", "jsx": "react-jsx" - } -} + }, + "include": [ + "src", + "vite.config.ts", + "../../vitest.setup.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] +} \ No newline at end of file diff --git a/packages/webpack-plugin/src/__tests__/css-loader.test.ts b/packages/webpack-plugin/src/__tests__/css-loader.test.ts index 1cbc2fb2..965842a0 100644 --- a/packages/webpack-plugin/src/__tests__/css-loader.test.ts +++ b/packages/webpack-plugin/src/__tests__/css-loader.test.ts @@ -20,6 +20,7 @@ describe('devupUICssLoader', () => { devupUICssLoader.bind({ callback, addContextDependency, + resourcePath: 'devup-ui.css', getOptions: () => ({ watch: false }), } as any)(Buffer.from('data'), '') expect(callback).toBeCalledWith(null, 'get css') @@ -34,6 +35,7 @@ describe('devupUICssLoader', () => { callback, addContextDependency, getOptions: () => ({ watch: true }), + resourcePath: 'devup-ui.css', } as any)(Buffer.from('data'), '') expect(callback).toBeCalledWith(null, 'get css', '', undefined) expect(getCss).toBeCalledTimes(1) @@ -42,6 +44,7 @@ describe('devupUICssLoader', () => { callback, addContextDependency, getOptions: () => ({ watch: true }), + resourcePath: 'devup-ui.css', } as any)(Buffer.from('data'), '') expect(getCss).toBeCalledTimes(0) @@ -55,6 +58,7 @@ describe('devupUICssLoader', () => { __DEVUP_CACHE: 'data', }, getOptions: () => ({ watch: true }), + resourcePath: 'devup-ui-10.css', } as any)(Buffer.from(''), '') expect(getCss).toBeCalledTimes(0) diff --git a/packages/webpack-plugin/src/__tests__/loader.test.ts b/packages/webpack-plugin/src/__tests__/loader.test.ts index 1b5e981f..3e38903a 100644 --- a/packages/webpack-plugin/src/__tests__/loader.test.ts +++ b/packages/webpack-plugin/src/__tests__/loader.test.ts @@ -1,6 +1,12 @@ import { writeFile } from 'node:fs/promises' +import { join } from 'node:path' -import { codeExtract, exportClassMap, exportSheet } from '@devup-ui/wasm' +import { + codeExtract, + exportClassMap, + exportFileMap, + exportSheet, +} from '@devup-ui/wasm' import devupUILoader from '../loader' @@ -20,10 +26,12 @@ describe('devupUILoader', () => { const t = { getOptions: () => ({ package: 'package', - cssFile: 'cssFile', + cssDir: 'cssFile', sheetFile: 'sheetFile', classMapFile: 'classMapFile', + fileMapFile: 'fileMapFile', watch: true, + singleCss: true, }), async: vi.fn().mockReturnValue(vi.fn()), resourcePath: 'index.tsx', @@ -32,12 +40,14 @@ describe('devupUILoader', () => { } vi.mocked(exportSheet).mockReturnValue('sheet') vi.mocked(exportClassMap).mockReturnValue('classMap') + vi.mocked(exportFileMap).mockReturnValue('fileMap') vi.mocked(codeExtract).mockReturnValue({ code: 'code', css: 'css', free: vi.fn(), map: '{}', + css_file: 'cssFile', }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -47,13 +57,18 @@ describe('devupUILoader', () => { 'code', 'package', './cssFile', + true, ) await vi.waitFor(() => { expect(t.async()).toHaveBeenCalledWith(null, 'code', {}) + expect(writeFile).toHaveBeenCalledWith( + join('cssFile', 'cssFile'), + '/* index.tsx 0 */', + ) + expect(writeFile).toHaveBeenCalledWith('sheetFile', 'sheet') + expect(writeFile).toHaveBeenCalledWith('classMapFile', 'classMap') + expect(writeFile).toHaveBeenCalledWith('fileMapFile', 'fileMap') }) - expect(writeFile).toHaveBeenCalledWith('cssFile', '/* index.tsx 0 */') - expect(writeFile).toHaveBeenCalledWith('sheetFile', 'sheet') - expect(writeFile).toHaveBeenCalledWith('classMapFile', 'classMap') expect(t._compiler.__DEVUP_CACHE).toBe('index.tsx 0') }) @@ -62,8 +77,9 @@ describe('devupUILoader', () => { const t = { getOptions: () => ({ package: 'package', - cssFile: 'cssFile', + cssDir: 'cssFile', watch: false, + singleCss: true, }), async: vi.fn().mockReturnValue(vi.fn()), resourcePath: 'index.tsx', @@ -74,6 +90,7 @@ describe('devupUILoader', () => { css: undefined, free: vi.fn(), map: undefined, + css_file: 'cssFile', }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -83,6 +100,7 @@ describe('devupUILoader', () => { 'code', 'package', './cssFile', + true, ) expect(t.async()).toHaveBeenCalledWith(null, 'code', null) expect(writeFile).not.toHaveBeenCalledWith('cssFile', 'css', { @@ -94,8 +112,9 @@ describe('devupUILoader', () => { const t = { getOptions: () => ({ package: 'package', - cssFile: 'cssFile', + cssDir: 'cssFile', watch: false, + singleCss: true, }), async: vi.fn().mockReturnValue(vi.fn()), resourcePath: 'index.tsx', @@ -114,8 +133,9 @@ describe('devupUILoader', () => { const t = { getOptions: () => ({ package: 'package', - cssFile: 'cssFile', + cssDir: 'cssFile', watch: true, + singleCss: true, }), async: vi.fn().mockReturnValue(vi.fn()), resourcePath: 'index.tsx', @@ -126,6 +146,7 @@ describe('devupUILoader', () => { css: 'css', free: vi.fn(), map: undefined, + css_file: 'cssFile', }) devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') @@ -135,6 +156,29 @@ describe('devupUILoader', () => { 'code', 'package', './cssFile', + true, ) }) + + it('should load with nowatch', () => { + const t = { + getOptions: () => ({ + package: 'package', + cssDir: 'cssFile', + watch: false, + singleCss: true, + }), + async: vi.fn().mockReturnValue(vi.fn()), + resourcePath: 'index.tsx', + addDependency: vi.fn(), + } + vi.mocked(codeExtract).mockReturnValue({ + code: 'code', + css: 'css', + free: vi.fn(), + map: undefined, + css_file: 'cssFile', + }) + devupUILoader.bind(t as any)(Buffer.from('code'), 'index.tsx') + }) }) diff --git a/packages/webpack-plugin/src/__tests__/plugin.test.ts b/packages/webpack-plugin/src/__tests__/plugin.test.ts index 67c0664c..4571dc3c 100644 --- a/packages/webpack-plugin/src/__tests__/plugin.test.ts +++ b/packages/webpack-plugin/src/__tests__/plugin.test.ts @@ -1,17 +1,16 @@ -import { - existsSync, - mkdirSync, - readFileSync, - stat, - writeFileSync, -} from 'node:fs' +import { existsSync } from 'node:fs' +import { mkdir, readFile, stat, writeFile } from 'node:fs/promises' import { join, resolve } from 'node:path' import { getCss, getDefaultTheme, getThemeInterface, + importClassMap, + importFileMap, + importSheet, registerTheme, + setDebug, } from '@devup-ui/wasm' import { describe } from 'vitest' @@ -19,6 +18,7 @@ import { DevupUIWebpackPlugin } from '../plugin' vi.mock('@devup-ui/wasm') vi.mock('node:fs') +vi.mock('node:fs/promises') beforeEach(() => { vi.resetAllMocks() @@ -26,343 +26,320 @@ beforeEach(() => { afterAll(() => { vi.restoreAllMocks() }) +function createCompiler() { + return { + options: { + module: { + rules: [], + }, + plugins: [], + }, + webpack: { + DefinePlugin: vi.fn(), + }, + hooks: { + watchRun: { + tapPromise: vi.fn(), + }, + beforeRun: { + tapPromise: vi.fn(), + }, + done: { + tapPromise: vi.fn(), + }, + afterCompile: { + tap: vi.fn(), + }, + }, + } as any +} -describe('devupUIPlugin', () => { +describe('devupUIWebpackPlugin', () => { console.error = vi.fn() - describe('no watch', () => { - it('should apply default options', () => { - import.meta.resolve = vi.fn().mockReturnValue('resolved') - expect(new DevupUIWebpackPlugin({}).options).toEqual({ - include: [], - package: '@devup-ui/react', - cssFile: resolve('df', 'devup-ui.css'), - devupPath: 'devup.json', - interfacePath: 'df', - watch: false, - debug: false, - }) - }) - it('should apply custom options', () => { - import.meta.resolve = vi.fn().mockReturnValue('resolved') - expect( - new DevupUIWebpackPlugin({ - package: 'new-package', - cssFile: 'new-css-file', - devupPath: 'new-devup-path', - interfacePath: 'new-interface-path', - watch: false, - }).options, - ).toEqual({ - include: [], - package: 'new-package', - cssFile: 'new-css-file', - devupPath: 'new-devup-path', - interfacePath: 'new-interface-path', - watch: false, - debug: false, - }) + it('should apply default options', () => { + expect(new DevupUIWebpackPlugin({}).options).toEqual({ + include: [], + package: '@devup-ui/react', + cssDir: resolve('df', 'devup-ui'), + devupFile: 'devup.json', + distDir: 'df', + watch: false, + debug: false, + singleCss: false, }) + }) - it('should write data files', () => { - vi.mocked(readFileSync).mockReturnValue('{"theme": "theme"}') - vi.mocked(getThemeInterface).mockReturnValue('interfaceCode') - vi.mocked(getCss).mockReturnValue('css') - vi.mocked(existsSync).mockReturnValue(false) - vi.mocked(writeFileSync).mockReturnValue() - vi.mocked(mkdirSync) - - const plugin = new DevupUIWebpackPlugin({}) - plugin.writeDataFiles() - - expect(readFileSync).toHaveBeenCalledWith('devup.json', 'utf-8') - expect(registerTheme).toHaveBeenCalledWith('theme') - expect(getThemeInterface).toHaveBeenCalledWith( - '@devup-ui/react', - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) - expect(writeFileSync).toHaveBeenCalledWith( - join('df', 'theme.d.ts'), - 'interfaceCode', - { - encoding: 'utf-8', - }, - ) + describe.each( + globalThis.createTestMatrix({ + watch: [true, false], + debug: [true, false], + singleCss: [true, false], + include: [['lib'], []], + package: ['@devup-ui/react', '@devup-ui/core'], + cssDir: [resolve('df', 'devup-ui'), resolve('df', 'devup-ui-core')], + devupFile: ['devup.json', 'devup-core.json'], + distDir: ['df', 'df-core'], + }), + )('options', (options) => { + it('should apply options', () => { + expect(new DevupUIWebpackPlugin(options).options).toEqual(options) }) - it('should catch error', () => { - vi.mocked(existsSync).mockReturnValue(true) - vi.mocked(stat).mockImplementation((_, callback) => { - ;(callback as any)(new Error('error'), null) - }) - vi.mocked(readFileSync).mockImplementation(() => { - throw new Error('error') - }) - const plugin = new DevupUIWebpackPlugin({ - devupPath: 'custom-devup.json', - }) - - vi.mocked(getCss).mockReturnValue('css') - const compiler = { - options: { - module: { - rules: [], - }, - plugins: [], - }, - hooks: { - afterCompile: { - tap: vi.fn(), - }, - done: { - tap: vi.fn(), - }, - watchRun: { - tapAsync: vi.fn(), - }, - }, - webpack: { - DefinePlugin: vi.fn(), - }, - } as any - plugin.apply(compiler) - // asyncCompile - const add = vi.fn() - vi.mocked(compiler.hooks.afterCompile.tap).mock.calls[0][1]({ - fileDependencies: { - add, - }, - }) - expect(add).toHaveBeenCalledWith(resolve('custom-devup.json')) - expect(compiler.hooks.done.tap).toHaveBeenCalled() - - vi.mocked(compiler.hooks.done.tap).mock.calls[0][1]({ - hasErrors: () => true, - }) + it.each( + createTestMatrix({ + readFile: [{ theme: 'theme' }, { theme: 'theme-core' }, undefined], + getThemeInterface: ['interfaceCode', ''], + getCss: ['css', 'css-core'], + }), + )('should write data files', async (_options) => { + vi.mocked(readFile).mockResolvedValue(JSON.stringify(_options.readFile)) + vi.mocked(getThemeInterface).mockReturnValue(_options.getThemeInterface) + vi.mocked(getCss).mockReturnValue(_options.getCss) + vi.mocked(existsSync).mockReturnValueOnce(_options.readFile !== undefined) + vi.mocked(writeFile).mockResolvedValue() + vi.mocked(mkdir) - vi.mocked(compiler.hooks.done.tap).mock.calls[0][1]({ - hasErrors: () => false, - }) - expect(writeFileSync).toHaveBeenCalledWith( - resolve('df', 'devup-ui.css'), - 'css', - { - encoding: 'utf-8', - }, - ) - }) + const plugin = new DevupUIWebpackPlugin(options) + await plugin.writeDataFiles() - it('should skip writing css file', () => { - vi.mocked(readFileSync).mockReturnValue('{"theme": "theme"}') - vi.mocked(getThemeInterface).mockReturnValue('interfaceCode') - vi.mocked(getCss).mockReturnValue('css') - vi.mocked(existsSync).mockReturnValue(false) - vi.mocked(writeFileSync).mockReturnValue() - vi.mocked(mkdirSync) + if (_options.readFile !== undefined) { + expect(readFile).toHaveBeenCalledWith(options.devupFile, 'utf-8') - const plugin = new DevupUIWebpackPlugin({ - cssFile: 'css', - }) - plugin.apply({ - options: { - module: { - rules: [], - }, - plugins: [], - }, - hooks: { - afterCompile: { - tap: vi.fn(), - }, - done: { - tap: vi.fn(), - }, - watchRun: { - tapAsync: vi.fn(), - }, - }, - webpack: { - DefinePlugin: vi.fn(), - }, - } as any) - - expect(writeFileSync).toHaveBeenCalledWith('css', '', { - encoding: 'utf-8', - }) + expect(registerTheme).toHaveBeenCalledWith( + _options.readFile?.theme ?? {}, + ) + expect(getThemeInterface).toHaveBeenCalledWith( + options.package, + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) + if (_options.getThemeInterface) + expect(writeFile).toHaveBeenCalledWith( + join(options.distDir, 'theme.d.ts'), + _options.getThemeInterface, + { + encoding: 'utf-8', + }, + ) + else expect(writeFile).toHaveBeenCalledTimes(options.watch ? 1 : 0) + } else expect(readFile).not.toHaveBeenCalled() + if (options.watch) + expect(writeFile).toHaveBeenCalledWith( + join(options.cssDir, 'devup-ui.css'), + _options.getCss, + ) + else + expect(writeFile).toHaveBeenCalledTimes( + _options.getThemeInterface && _options.readFile !== undefined ? 1 : 0, + ) }) }) - describe('watch', () => { - it('should write css file', () => { - vi.mocked(readFileSync).mockReturnValue('{"theme": "theme"}') - vi.mocked(getThemeInterface).mockReturnValue('interfaceCode') - vi.mocked(getCss).mockReturnValue('css') - vi.mocked(writeFileSync).mockReturnValue() - vi.mocked(mkdirSync) - const plugin = new DevupUIWebpackPlugin({ - watch: true, - }) - const compiler = { - options: { - module: { - rules: [], - }, - plugins: [], - }, - hooks: { - afterCompile: { - tap: vi.fn(), - }, - done: { - tap: vi.fn(), - }, - watchRun: { - tapAsync: vi.fn(), - }, + it.each( + createTestMatrix({ + include: [ + { + input: ['lib'], + output: new RegExp('node_modules(?!.*(@devup-ui|lib)([\\/\\\\.]|$))'), }, - webpack: { - DefinePlugin: vi.fn(), + { + input: [], + output: new RegExp('node_modules(?!.*(@devup-ui)([\\/\\\\.]|$))'), }, - } as any - plugin.apply(compiler) - - expect(writeFileSync).toHaveBeenCalledWith( - resolve('df', 'devup-ui.css'), - '', { - encoding: 'utf-8', + input: ['lib', 'lib2'], + output: new RegExp( + 'node_modules(?!.*(@devup-ui|lib|lib2)([\\/\\\\.]|$))', + ), }, - ) - expect(compiler.hooks.done.tap).not.toHaveBeenCalled() + ], + }), + )('should set include', async (options) => { + const plugin = new DevupUIWebpackPlugin({ + include: options.include.input, }) - it('should register devup watch', () => { - const plugin = new DevupUIWebpackPlugin({ - watch: true, - }) - const compiler = { - options: { - module: { - rules: [], - }, - plugins: [], - }, - hooks: { - afterCompile: { - tap: vi.fn(), - }, - done: { - tap: vi.fn(), - }, - watchRun: { - tapAsync: vi.fn(), - }, - }, - webpack: { - DefinePlugin: vi.fn(), - }, - } as any - vi.mocked(existsSync).mockReturnValue(true) - plugin.apply(compiler) - // watchRun - const callback = vi.fn() - vi.mocked(compiler.hooks.watchRun.tapAsync).mock.calls[0][1]( - null, - callback, - ) - expect(callback).toHaveBeenCalled() - expect(registerTheme).toBeCalledTimes(0) + vi.mocked(existsSync).mockReturnValue(false) + vi.mocked(mkdir) + vi.mocked(writeFile) + vi.mocked(readFile) + vi.mocked(getThemeInterface) + vi.mocked(getCss) + vi.mocked(registerTheme) + vi.mocked(stat) + vi.mocked(readFile) - vi.mocked(stat).mockImplementation((_, callback) => { - ;(callback as any)(null, { mtimeMs: 1 }) - }) - vi.mocked(readFileSync).mockReturnValue('{"theme": "theme"}') - vi.mocked(writeFileSync).mockReturnValue() - vi.mocked(registerTheme).mockReturnValue() - vi.mocked(stat).mockImplementation((_, callback) => { - ;(callback as any)(null, { mtimeMs: 2 }) - }) - vi.mocked(console.error).mockReturnValue() + const compiler = createCompiler() + await plugin.apply(compiler) + expect(compiler.options.module.rules.length).toBe(2) - plugin.apply(compiler as any) + expect(compiler.options.module.rules[0].exclude).toEqual( + options.include.output, + ) + }) - vi.mocked(compiler.hooks.watchRun.tapAsync).mock.calls[0][1]( - null, - callback, - ) - expect(registerTheme).toHaveBeenCalled() - vi.mocked(stat).mockImplementation((_, callback) => { - ;(callback as any)(null, { mtimeMs: 3 }) - }) - expect(registerTheme).toBeCalledTimes(1) - vi.mocked(compiler.hooks.watchRun.tapAsync).mock.calls[0][1]( - null, - callback, - ) - expect(registerTheme).toBeCalledTimes(2) + it.each( + createTestMatrix({ + debug: [true, false], + }), + )('should set debug', async (options) => { + const plugin = new DevupUIWebpackPlugin(options) - vi.mocked(stat).mockImplementation((_, callback) => { - ;(callback as any)(1) - }) + const compiler = createCompiler() - plugin.apply(compiler as any) - - vi.mocked(compiler.hooks.watchRun.tapAsync).mock.calls[0][1]( - null, - callback, - ) + await plugin.apply(compiler) + expect(setDebug).toHaveBeenCalledWith(options.debug) + }) - expect(console.error).toHaveBeenCalledWith( - 'Error checking devup.json:', - 1, - ) + it('should reset data files when load error', async () => { + const plugin = new DevupUIWebpackPlugin({ + watch: true, + }) + const compiler = createCompiler() + vi.mocked(readFile).mockImplementation(() => { + throw new Error('error') }) + vi.mocked(existsSync).mockReturnValue(true) + plugin.apply(compiler as any) + await compiler.hooks.watchRun.tapPromise.mock.calls[0][1]() + expect(importSheet).toHaveBeenCalledWith({}) + expect(importClassMap).toHaveBeenCalledWith({}) + expect(importFileMap).toHaveBeenCalledWith({}) }) - it('should include lib', () => { - vi.mocked(readFileSync).mockReturnValue('{"theme": "theme"}') - vi.mocked(getThemeInterface).mockReturnValue('interfaceCode') - vi.mocked(getCss).mockReturnValue('css') - vi.mocked(writeFileSync).mockReturnValue() - vi.mocked(mkdirSync) - + it.each( + createTestMatrix({ + watch: [true, false], + existsDevupFile: [true, false], + existsDistDir: [true, false], + existsSheetFile: [true, false], + existsClassMapFile: [true, false], + existsFileMapFile: [true, false], + existsCssDir: [true, false], + }), + )('should apply', async (options) => { const plugin = new DevupUIWebpackPlugin({ - include: ['lib'], + watch: options.watch, }) - const compiler = { - options: { - module: { - rules: [], - }, - plugins: [], - }, - hooks: { - afterCompile: { - tap: vi.fn(), - }, - done: { - tap: vi.fn(), - }, - watchRun: { - tapAsync: vi.fn(), - }, - }, - webpack: { - DefinePlugin: vi.fn(), - }, - } as any + const compiler = createCompiler() + + vi.mocked(existsSync).mockImplementation((path) => { + if (path === plugin.options.devupFile) return options.existsDevupFile + if (path === plugin.options.distDir) return options.existsDistDir + if (path === plugin.options.cssDir) return options.existsCssDir + if (path === join(plugin.options.distDir, 'sheet.json')) + return options.existsSheetFile + if (path === join(plugin.options.distDir, 'classMap.json')) + return options.existsClassMapFile + if (path === join(plugin.options.distDir, 'fileMap.json')) + return options.existsFileMapFile + return false + }) + vi.mocked(getDefaultTheme).mockReturnValue('defaultTheme') + vi.mocked(stat).mockResolvedValueOnce({ + mtimeMs: 1, + } as any) + vi.mocked(stat).mockResolvedValueOnce({ + mtimeMs: 2, + } as any) + vi.mocked(mkdir) + if (options.existsSheetFile) + vi.mocked(readFile).mockResolvedValueOnce('{"sheet": "sheet"}') + if (options.existsClassMapFile) + vi.mocked(readFile).mockResolvedValueOnce('{"classMap": "classMap"}') + if (options.existsFileMapFile) + vi.mocked(readFile).mockResolvedValueOnce('{"fileMap": "fileMap"}') + plugin.apply(compiler) + await compiler.hooks[ + options.watch ? 'watchRun' : 'beforeRun' + ].tapPromise.mock.calls[0][1]() + await compiler.hooks[ + options.watch ? 'watchRun' : 'beforeRun' + ].tapPromise.mock.calls[0][1]() - expect(writeFileSync).toHaveBeenCalledWith( - resolve('df', 'devup-ui.css'), - '', - { - encoding: 'utf-8', - }, + if (options.existsDistDir) + expect(mkdir).not.toHaveBeenCalledWith(plugin.options.distDir, { + recursive: true, + }) + else + expect(mkdir).toHaveBeenCalledWith(plugin.options.distDir, { + recursive: true, + }) + expect(writeFile).toHaveBeenCalledWith( + join(plugin.options.distDir, '.gitignore'), + '*', + 'utf-8', ) + if (options.watch) { + if (options.existsSheetFile) + expect(importSheet).toHaveBeenCalledWith( + JSON.parse('{"sheet": "sheet"}'), + ) + if (options.existsClassMapFile) + expect(importClassMap).toHaveBeenCalledWith( + JSON.parse('{"classMap": "classMap"}'), + ) + if (options.existsFileMapFile) + expect(importFileMap).toHaveBeenCalledWith( + JSON.parse('{"fileMap": "fileMap"}'), + ) + expect(compiler.hooks.watchRun.tapPromise).toHaveBeenCalled() + + await compiler.hooks.watchRun.tapPromise.mock.calls[1][1]() + if (options.existsDevupFile) { + expect(stat).toHaveBeenCalledWith(plugin.options.devupFile) + await compiler.hooks.watchRun.tapPromise.mock.calls[1][1]() + } else { + expect(stat).not.toHaveBeenCalled() + } + } else expect(compiler.hooks.watchRun.tapPromise).not.toHaveBeenCalled() + if (options.existsDevupFile) { + expect(compiler.hooks.afterCompile.tap).toHaveBeenCalled() + const add = vi.fn() + compiler.hooks.afterCompile.tap.mock.calls[0][1]({ + fileDependencies: { + add, + }, + }) + expect(add).toHaveBeenCalledWith(resolve(plugin.options.devupFile)) + } else expect(compiler.hooks.afterCompile.tap).not.toHaveBeenCalled() + if (options.existsCssDir) { + expect(mkdir).not.toHaveBeenCalledWith(plugin.options.cssDir, { + recursive: true, + }) + } else { + expect(mkdir).toHaveBeenCalledWith(plugin.options.cssDir, { + recursive: true, + }) + } + expect(compiler.webpack.DefinePlugin).toHaveBeenCalledWith({ 'process.env.DEVUP_UI_DEFAULT_THEME': JSON.stringify(getDefaultTheme()), }) + + if (!options.watch) { + expect(compiler.hooks.done.tapPromise).toHaveBeenCalled() + compiler.hooks.done.tapPromise.mock.calls[0][1]({ + hasErrors: () => true, + }) + expect(writeFile).not.toHaveBeenCalledWith( + join(plugin.options.cssDir, 'devup-ui.css'), + getCss(), + 'utf-8', + ) + + await compiler.hooks.done.tapPromise.mock.calls[0][1]({ + hasErrors: () => false, + }) + expect(writeFile).toHaveBeenCalledWith( + join(plugin.options.cssDir, 'devup-ui.css'), + getCss(), + 'utf-8', + ) + } else { + expect(compiler.hooks.done.tapPromise).not.toHaveBeenCalled() + } }) }) diff --git a/packages/webpack-plugin/src/css-loader.ts b/packages/webpack-plugin/src/css-loader.ts index 3503ea30..916b8f67 100644 --- a/packages/webpack-plugin/src/css-loader.ts +++ b/packages/webpack-plugin/src/css-loader.ts @@ -4,11 +4,17 @@ import type { RawLoaderDefinitionFunction } from 'webpack' let prevData = '' let prevTime = '' +function getFileNumByFilename(filename: string) { + if (filename.endsWith('devup-ui.css')) return null + return parseInt(filename.split('devup-ui-')[1].split('.')[0]) +} + const devupUICssLoader: RawLoaderDefinitionFunction<{ watch: boolean }> = function (source, map, meta) { const { watch } = this.getOptions() - if (!watch) return this.callback(null, getCss()) + const fileNum = getFileNumByFilename(this.resourcePath) + if (!watch) return this.callback(null, getCss(fileNum)) const stringSource = (this._compiler as any)?.__DEVUP_CACHE || source.toString() @@ -17,6 +23,6 @@ const devupUICssLoader: RawLoaderDefinitionFunction<{ return } prevTime = stringSource - this.callback(null, (prevData = getCss()), map, meta) + this.callback(null, (prevData = getCss(fileNum)), map, meta) } export default devupUICssLoader diff --git a/packages/webpack-plugin/src/loader.ts b/packages/webpack-plugin/src/loader.ts index 752d57a4..6b5830fb 100644 --- a/packages/webpack-plugin/src/loader.ts +++ b/packages/webpack-plugin/src/loader.ts @@ -1,15 +1,22 @@ import { writeFile } from 'node:fs/promises' -import { dirname, relative } from 'node:path' +import { basename, dirname, join, relative } from 'node:path' -import { codeExtract, exportClassMap, exportSheet } from '@devup-ui/wasm' +import { + codeExtract, + exportClassMap, + exportFileMap, + exportSheet, +} from '@devup-ui/wasm' import type { RawLoaderDefinitionFunction } from 'webpack' export interface DevupUILoaderOptions { package: string - cssFile: string + cssDir: string sheetFile: string classMapFile: string + fileMapFile: string watch: boolean + singleCss: boolean } const devupUILoader: RawLoaderDefinitionFunction = @@ -17,34 +24,43 @@ const devupUILoader: RawLoaderDefinitionFunction = const { watch, package: libPackage, - cssFile, + cssDir, sheetFile, classMapFile, + fileMapFile, + singleCss, } = this.getOptions() const callback = this.async() const id = this.resourcePath try { - let rel = relative(dirname(this.resourcePath), cssFile).replaceAll( + let rel = relative(dirname(this.resourcePath), cssDir).replaceAll( '\\', '/', ) + if (!rel.startsWith('./')) rel = `./${rel}` - const { code, css, map } = codeExtract( + const { code, css, map, css_file } = codeExtract( id, source.toString(), libPackage, rel, + singleCss, ) const sourceMap = map ? JSON.parse(map) : null - if (css && watch) { + if (css) { const content = `${this.resourcePath} ${Date.now()}` - if (this._compiler) (this._compiler as any).__DEVUP_CACHE = content + if (watch && this._compiler) + (this._compiler as any).__DEVUP_CACHE = content // should be reset css Promise.all([ - writeFile(cssFile, `/* ${content} */`), - writeFile(sheetFile, exportSheet()), - writeFile(classMapFile, exportClassMap()), + writeFile( + join(cssDir, basename(css_file)), + watch ? `/* ${content} */` : css, + ), + watch ? writeFile(sheetFile, exportSheet()) : null, + watch ? writeFile(classMapFile, exportClassMap()) : null, + watch ? writeFile(fileMapFile, exportFileMap()) : null, ]) .catch(console.error) .finally(() => callback(null, code, sourceMap)) diff --git a/packages/webpack-plugin/src/plugin.ts b/packages/webpack-plugin/src/plugin.ts index f67512e4..3e54ca33 100644 --- a/packages/webpack-plugin/src/plugin.ts +++ b/packages/webpack-plugin/src/plugin.ts @@ -1,10 +1,5 @@ -import { - existsSync, - mkdirSync, - readFileSync, - stat, - writeFileSync, -} from 'node:fs' +import { existsSync } from 'node:fs' +import { mkdir, readFile, stat, writeFile } from 'node:fs/promises' import { createRequire } from 'node:module' import { join, resolve } from 'node:path' @@ -13,6 +8,7 @@ import { getDefaultTheme, getThemeInterface, importClassMap, + importFileMap, importSheet, registerTheme, setDebug, @@ -21,123 +17,152 @@ import { type Compiler } from 'webpack' export interface DevupUIWebpackPluginOptions { package: string - cssFile: string - devupPath: string - interfacePath: string + cssDir: string + devupFile: string + distDir: string watch: boolean debug: boolean include: string[] + singleCss: boolean } export class DevupUIWebpackPlugin { options: DevupUIWebpackPluginOptions + sheetFile: string + classMapFile: string + fileMapFile: string constructor({ package: libPackage = '@devup-ui/react', - devupPath = 'devup.json', - interfacePath = 'df', - cssFile = resolve(interfacePath, 'devup-ui.css'), + devupFile = 'devup.json', + distDir = 'df', + cssDir = resolve(distDir, 'devup-ui'), watch = false, debug = false, include = [], + singleCss = false, }: Partial = {}) { this.options = { package: libPackage, - cssFile, - devupPath, - interfacePath, + cssDir, + devupFile, + distDir, watch, debug, include, + singleCss, } + + this.sheetFile = join(this.options.distDir, 'sheet.json') + this.classMapFile = join(this.options.distDir, 'classMap.json') + this.fileMapFile = join(this.options.distDir, 'fileMap.json') } - writeDataFiles() { - registerTheme( - JSON.parse(readFileSync(this.options.devupPath, 'utf-8'))?.['theme'], - ) - const interfaceCode = getThemeInterface( - this.options.package, - 'DevupThemeColors', - 'DevupThemeTypography', - 'DevupTheme', - ) + async writeDataFiles() { + try { + const content = existsSync(this.options.devupFile) + ? await readFile(this.options.devupFile, 'utf-8') + : undefined - if (interfaceCode) { - writeFileSync( - join(this.options.interfacePath, 'theme.d.ts'), - interfaceCode, - { - encoding: 'utf-8', - }, - ) - } + if (content) { + registerTheme(JSON.parse(content)?.['theme'] ?? {}) + const interfaceCode = getThemeInterface( + this.options.package, + 'DevupThemeColors', + 'DevupThemeTypography', + 'DevupTheme', + ) - if (this.options.watch) { - writeFileSync(this.options.cssFile, `/* ${Date.now()} */`, { - encoding: 'utf-8', - }) + if (interfaceCode) { + await writeFile( + join(this.options.distDir, 'theme.d.ts'), + interfaceCode, + { + encoding: 'utf-8', + }, + ) + } + } else { + registerTheme({}) + } + } catch (error) { + console.error(error) + registerTheme({}) } + + await Promise.all([ + !existsSync(this.options.cssDir) + ? mkdir(this.options.cssDir, { recursive: true }) + : Promise.resolve(), + this.options.watch + ? writeFile(join(this.options.cssDir, 'devup-ui.css'), getCss()) + : Promise.resolve(), + ]) } apply(compiler: Compiler) { setDebug(this.options.debug) - // read devup.json - const existsDevup = existsSync(this.options.devupPath) + let initialized = false + const existsDevup = existsSync(this.options.devupFile) + compiler.hooks[this.options.watch ? 'watchRun' : 'beforeRun'].tapPromise( + 'DevupUIWebpackPlugin', + async () => { + if (initialized) return + initialized = true + // read devup.json + if (!existsSync(this.options.distDir)) + await mkdir(this.options.distDir, { recursive: true }) + await writeFile(join(this.options.distDir, '.gitignore'), '*', 'utf-8') - if (!existsSync(this.options.interfacePath)) - mkdirSync(this.options.interfacePath) - - writeFileSync(join(this.options.interfacePath, '.gitignore'), '*', { - encoding: 'utf-8', - }) + if (this.options.watch) { + try { + // load sheet + await Promise.all([ + existsSync(this.sheetFile) + ? readFile(this.sheetFile, 'utf-8').then((content) => + importSheet(JSON.parse(content)), + ) + : Promise.resolve(), + existsSync(this.classMapFile) + ? readFile(this.classMapFile, 'utf-8').then((content) => + importClassMap(JSON.parse(content)), + ) + : Promise.resolve(), + existsSync(this.fileMapFile) + ? readFile(this.fileMapFile, 'utf-8').then((content) => + importFileMap(JSON.parse(content)), + ) + : Promise.resolve(), + ]) + } catch (error) { + console.error(error) + importSheet({}) + importClassMap({}) + importFileMap({}) + } + } + await this.writeDataFiles() + }, + ) - const sheetFile = join(this.options.interfacePath, 'sheet.json') - const classMapFile = join(this.options.interfacePath, 'classMap.json') if (this.options.watch) { - try { - // load sheet - if (existsSync(sheetFile)) - importSheet(JSON.parse(readFileSync(sheetFile, 'utf-8'))) - if (existsSync(classMapFile)) - importClassMap(JSON.parse(readFileSync(classMapFile, 'utf-8'))) - } catch (error) { - console.error(error) - } let lastModifiedTime: number | null = null - compiler.hooks.watchRun.tapAsync( - 'DevupUIWebpackPlugin', - (_, callback) => { - if (existsDevup) - stat(this.options.devupPath, (err, stats) => { - if (err) { - console.error(`Error checking ${this.options.devupPath}:`, err) - return - } - - const modifiedTime = stats.mtimeMs - if (lastModifiedTime && lastModifiedTime !== modifiedTime) - this.writeDataFiles() - - lastModifiedTime = modifiedTime - }) - callback() - }, - ) + compiler.hooks.watchRun.tapPromise('DevupUIWebpackPlugin', async () => { + if (existsDevup) { + const stats = await stat(this.options.devupFile) + + const modifiedTime = stats.mtimeMs + if (lastModifiedTime && lastModifiedTime !== modifiedTime) + await this.writeDataFiles() + + lastModifiedTime = modifiedTime + } + }) } - if (existsDevup) { - try { - this.writeDataFiles() - } catch (error) { - console.error(error) - } + if (existsDevup) compiler.hooks.afterCompile.tap('DevupUIWebpackPlugin', (compilation) => { - compilation.fileDependencies.add(resolve(this.options.devupPath)) + compilation.fileDependencies.add(resolve(this.options.devupFile)) }) - } - // Create an empty CSS file - if (!existsSync(this.options.cssFile)) - writeFileSync(this.options.cssFile, '', { encoding: 'utf-8' }) compiler.options.plugins.push( new compiler.webpack.DefinePlugin({ @@ -145,10 +170,14 @@ export class DevupUIWebpackPlugin { }), ) if (!this.options.watch) { - compiler.hooks.done.tap('DevupUIWebpackPlugin', (stats) => { + compiler.hooks.done.tapPromise('DevupUIWebpackPlugin', async (stats) => { if (!stats.hasErrors()) { // write css file - writeFileSync(this.options.cssFile, getCss(), { encoding: 'utf-8' }) + await writeFile( + join(this.options.cssDir, 'devup-ui.css'), + getCss(), + 'utf-8', + ) } }) } @@ -157,9 +186,9 @@ export class DevupUIWebpackPlugin { { test: /\.(tsx|ts|js|mjs|jsx)$/, exclude: new RegExp( - this.options.include.length - ? `node_modules(?!.*(${this.options.include.join('|').replaceAll('/', '[\\/\\\\]')})([\\/\\\\]|$))` - : 'node_modules', + `node_modules(?!.*(${['@devup-ui', ...this.options.include] + .join('|') + .replaceAll('/', '[\\/\\\\_]')})([\\/\\\\.]|$))`, ), enforce: 'pre', use: [ @@ -169,16 +198,18 @@ export class DevupUIWebpackPlugin { ), options: { package: this.options.package, - cssFile: this.options.cssFile, - sheetFile, - classMapFile, + cssDir: this.options.cssDir, + sheetFile: this.sheetFile, + classMapFile: this.classMapFile, + fileMapFile: this.fileMapFile, watch: this.options.watch, + singleCss: this.options.singleCss, }, }, ], }, { - test: this.options.cssFile, + test: this.options.cssDir, enforce: 'pre', use: [ { diff --git a/packages/webpack-plugin/tsconfig.json b/packages/webpack-plugin/tsconfig.json index 4c6e75be..30053bb9 100644 --- a/packages/webpack-plugin/tsconfig.json +++ b/packages/webpack-plugin/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "types": ["vite/client", "vitest/importMeta", "vitest/globals"], + "types": [ + "vite/client", + "vitest/importMeta", + "vitest/globals" + ], "strict": true, "target": "ESNext", "declaration": true, @@ -22,5 +26,14 @@ "noEmit": true, "baseUrl": ".", "jsx": "react-jsx" - } -} + }, + "include": [ + "src", + "vite.config.ts", + "../../vitest.setup.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 40c5af20..9eea54f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 6.8.0 '@testing-library/react': specifier: ^16.3.0 - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.1.8(@types/react@19.1.11))(@types/react@19.1.11)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@types/node': specifier: ^24.3.0 version: 24.3.0 @@ -30,7 +30,7 @@ importers: specifier: ^3.2.4 version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1)) eslint: - specifier: ^9.33.0 + specifier: ^9.34.0 version: 9.34.0(jiti@2.5.1) eslint-plugin-devup: specifier: ^2.0.5 @@ -58,10 +58,10 @@ importers: version: 3.1.0(acorn@8.15.0)(webpack@5.101.3) '@mdx-js/react': specifier: ^3.1.0 - version: 3.1.0(@types/react@19.1.11)(react@19.1.1) + version: 3.1.0(@types/react@19.1.12)(react@19.1.1) '@next/mdx': - specifier: ^15.5.0 - version: 15.5.0(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.11)(react@19.1.1)) + specifier: ^15.5.2 + version: 15.5.2(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1)) '@types/mdx': specifier: ^2.0.13 version: 2.0.13 @@ -72,8 +72,8 @@ importers: specifier: ^2.1.1 version: 2.1.1 next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: specifier: ^19.1.1 version: 19.1.1 @@ -82,9 +82,9 @@ importers: version: 19.1.1(react@19.1.1) react-markdown: specifier: ^10.1.0 - version: 10.1.0(@types/react@19.1.11)(react@19.1.1) + version: 10.1.0(@types/react@19.1.12)(react@19.1.1) react-syntax-highlighter: - specifier: ^15.6.1 + specifier: ^15.6.6 version: 15.6.6(react@19.1.1) remark-gfm: specifier: ^4.0.1 @@ -101,10 +101,10 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) '@types/react-syntax-highlighter': specifier: ^15.5.13 version: 15.5.13 @@ -124,8 +124,8 @@ importers: specifier: workspace:* version: link:../../packages/react next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: specifier: ^19.1.1 version: 19.1.1 @@ -141,10 +141,10 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) typescript: specifier: ^5 version: 5.9.2 @@ -165,11 +165,11 @@ importers: specifier: workspace:* version: link:../../packages/rsbuild-plugin '@rsbuild/core': - specifier: ^1.4.15 - version: 1.4.16 + specifier: ^1.5.1 + version: 1.5.1 '@rsbuild/plugin-react': - specifier: ^1.3.5 - version: 1.3.5(@rsbuild/core@1.4.16) + specifier: ^1.4.0 + version: 1.4.0(@rsbuild/core@1.5.1) apps/vite: dependencies: @@ -194,13 +194,13 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) '@vitejs/plugin-react': - specifier: ^5.0.1 - version: 5.0.1(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + specifier: ^5.0.2 + version: 5.0.2(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) typescript: specifier: ^5 version: 5.9.2 @@ -225,10 +225,10 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@vitejs/plugin-react': - specifier: ^5.0.1 - version: 5.0.1(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + specifier: ^5.0.2 + version: 5.0.2(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) typescript: specifier: ^5 version: 5.9.2 @@ -237,19 +237,19 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) benchmark/next-chakra-ui: dependencies: '@chakra-ui/react': - specifier: ^3.25.0 - version: 3.25.0(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^3.26.0 + version: 3.26.0(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@emotion/react': specifier: ^11.14.0 - version: 11.14.0(@types/react@19.1.11)(react@19.1.1) + version: 11.14.0(@types/react@19.1.12)(react@19.1.1) next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next-themes: specifier: ^0.4.6 version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -268,10 +268,10 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) typescript: specifier: ^5 version: 5.9.2 @@ -282,8 +282,8 @@ importers: specifier: workspace:* version: link:../../packages/react next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: specifier: ^19.1.1 version: 19.1.1 @@ -299,10 +299,41 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) + typescript: + specifier: ^5 + version: 5.9.2 + + benchmark/next-devup-ui-single: + dependencies: + '@devup-ui/react': + specifier: workspace:* + version: link:../../packages/react + next: + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + react: + specifier: ^19.1.1 + version: 19.1.1 + react-dom: + specifier: ^19.1.1 + version: 19.1.1(react@19.1.1) + devDependencies: + '@devup-ui/next-plugin': + specifier: workspace:* + version: link:../../packages/next-plugin + '@types/node': + specifier: ^24 + version: 24.3.0 + '@types/react': + specifier: ^19 + version: 19.1.12 + '@types/react-dom': + specifier: ^19 + version: 19.1.9(@types/react@19.1.12) typescript: specifier: ^5 version: 5.9.2 @@ -311,10 +342,10 @@ importers: dependencies: '@kuma-ui/core': specifier: ^1.5.9 - version: 1.5.9(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + version: 1.5.9(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: specifier: ^19.1.1 version: 19.1.1 @@ -324,16 +355,16 @@ importers: devDependencies: '@kuma-ui/next-plugin': specifier: ^1.3.3 - version: 1.3.3(@babel/core@7.28.3)(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3) + version: 1.3.3(@babel/core@7.28.3)(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3) '@types/node': specifier: ^24 version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) typescript: specifier: ^5 version: 5.9.2 @@ -342,16 +373,16 @@ importers: dependencies: '@emotion/react': specifier: ^11.14.0 - version: 11.14.0(@types/react@19.1.11)(react@19.1.1) + version: 11.14.0(@types/react@19.1.12)(react@19.1.1) '@emotion/styled': specifier: ^11.14.1 - version: 11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1) + version: 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) '@mui/material': specifier: 7.3.1 - version: 7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next: - specifier: ^15.5.0 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^15.5.2 + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next-themes: specifier: ^0.4.6 version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -370,10 +401,10 @@ importers: version: 24.3.0 '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.8(@types/react@19.1.11) + version: 19.1.9(@types/react@19.1.12) typescript: specifier: ^5 version: 5.9.2 @@ -399,25 +430,25 @@ importers: specifier: workspace:* version: link:../vite-plugin '@storybook/addon-docs': - specifier: ^9.1.2 - version: 9.1.3(@types/react@19.1.11)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) + specifier: ^9.1.3 + version: 9.1.3(@types/react@19.1.12)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) '@storybook/addon-onboarding': - specifier: ^9.1.2 + specifier: ^9.1.3 version: 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) '@storybook/react-vite': - specifier: ^9.1.2 - version: 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.48.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + specifier: ^9.1.3 + version: 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) '@types/react': - specifier: ^19.1.10 - version: 19.1.11 + specifier: ^19.1.12 + version: 19.1.12 eslint-plugin-storybook: - specifier: ^9.1.2 + specifier: ^9.1.3 version: 9.1.3(eslint@9.34.0(jiti@2.5.1))(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) rollup-plugin-preserve-directives: specifier: ^0.4.0 - version: 0.4.0(rollup@4.48.1) + version: 0.4.0(rollup@4.49.0) storybook: - specifier: ^9.1.2 + specifier: ^9.1.3 version: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) typescript: specifier: ^5.9.2 @@ -427,7 +458,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) @@ -439,10 +470,10 @@ importers: version: link:../webpack-plugin browserslist: specifier: latest - version: 4.25.3 + version: 4.25.4 next: specifier: ^15.5 - version: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) devDependencies: '@types/webpack': specifier: ^5.28.5 @@ -455,7 +486,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) @@ -471,10 +502,10 @@ importers: devDependencies: '@types/react': specifier: ^19 - version: 19.1.11 + version: 19.1.12 rollup-plugin-preserve-directives: specifier: ^0.4.0 - version: 0.4.0(rollup@4.48.1) + version: 0.4.0(rollup@4.49.0) typescript: specifier: ^5.9.2 version: 5.9.2 @@ -483,7 +514,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) packages/reset-css: dependencies: @@ -493,7 +524,7 @@ importers: devDependencies: rollup-plugin-preserve-directives: specifier: ^0.4.0 - version: 0.4.0(rollup@4.48.1) + version: 0.4.0(rollup@4.49.0) typescript: specifier: ^5.9.2 version: 5.9.2 @@ -502,7 +533,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) packages/rsbuild-plugin: dependencies: @@ -511,8 +542,8 @@ importers: version: link:../../bindings/devup-ui-wasm devDependencies: '@rsbuild/core': - specifier: ^1.4.15 - version: 1.4.16 + specifier: ^1.5.1 + version: 1.5.1 typescript: specifier: ^5.9.2 version: 5.9.2 @@ -521,7 +552,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) @@ -540,7 +571,7 @@ importers: version: 5.9.2 vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) packages/webpack-plugin: dependencies: @@ -559,7 +590,7 @@ importers: version: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) vite-plugin-dts: specifier: ^4.5.4 - version: 4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) + version: 4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) vitest: specifier: ^3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@24.3.0)(happy-dom@18.0.1)(jiti@2.5.1)(terser@5.43.1) @@ -573,8 +604,8 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@ark-ui/react@5.20.0': - resolution: {integrity: sha512-nvvVjA8uWpTYdNNafRADd7ygUd65zFbJ4zegwp/I7y2Q5Y3otIdoqiJilcA2APuyRckUB/IEQPX/exDFEtRkxQ==} + '@ark-ui/react@5.22.0': + resolution: {integrity: sha512-cH3xVhKRn0ZsP2Jg2RZAziI38obIfTMC3Q6ZWtWeYL5k9fq6K8sa1XjdJclBRSD0vYYvR1ynHG9ThicWKKANtQ==} peerDependencies: react: '>=18.0.0' react-dom: '>=18.0.0' @@ -1144,8 +1175,8 @@ packages: resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} - '@chakra-ui/react@3.25.0': - resolution: {integrity: sha512-RYScSA7WGA8lz5fAKo/7mpagm2M+GLcgzSlPCy7rlFaC6XpfCdcqvqyNF9LOWEiwaSB87hK9wmXm7BbiiNFEIQ==} + '@chakra-ui/react@3.26.0': + resolution: {integrity: sha512-VuhFMLklzrjTWIst1B+uQggxOn9+GxVd+0LHLtsQKA+JtKUDqNfKymeWlb1/pKrmqH184+gwZJRjTtr6/+0cIQ==} peerDependencies: '@emotion/react': '>=11' react: '>=18' @@ -1206,14 +1237,14 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - '@emnapi/core@1.4.5': - resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} + '@emnapi/core@1.5.0': + resolution: {integrity: sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==} - '@emnapi/runtime@1.4.5': - resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==} + '@emnapi/runtime@1.5.0': + resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==} - '@emnapi/wasi-threads@1.0.4': - resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} + '@emnapi/wasi-threads@1.1.0': + resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} '@emotion/babel-plugin@11.13.5': resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==} @@ -1598,8 +1629,8 @@ packages: '@floating-ui/core@1.7.3': resolution: {integrity: sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==} - '@floating-ui/dom@1.7.3': - resolution: {integrity: sha512-uZA413QEpNuhtb3/iIKoYMSK07keHPYeXF02Zhd6e213j+d1NamLix/mCLxBUDW/Gx52sPH2m+chlUsyaBs/Ag==} + '@floating-ui/dom@1.7.4': + resolution: {integrity: sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==} '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} @@ -1881,23 +1912,23 @@ packages: '@microsoft/tsdoc@0.15.1': resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} - '@module-federation/error-codes@0.17.1': - resolution: {integrity: sha512-n6Elm4qKSjwAPxLUGtwnl7qt4y1dxB8OpSgVvXBIzqI9p27a3ZXshLPLnumlpPg1Qudaj8sLnSnFtt9yGpt5yQ==} + '@module-federation/error-codes@0.18.0': + resolution: {integrity: sha512-Woonm8ehyVIUPXChmbu80Zj6uJkC0dD9SJUZ/wOPtO8iiz/m+dkrOugAuKgoiR6qH4F+yorWila954tBz4uKsQ==} - '@module-federation/runtime-core@0.17.1': - resolution: {integrity: sha512-LCtIFuKgWPQ3E+13OyrVpuTPOWBMI/Ggwsq1Q874YeT8Px28b8tJRCj09DjyRFyhpSPyV/uG80T6iXPAUoLIfQ==} + '@module-federation/runtime-core@0.18.0': + resolution: {integrity: sha512-ZyYhrDyVAhUzriOsVfgL6vwd+5ebYm595Y13KeMf6TKDRoUHBMTLGQ8WM4TDj8JNsy7LigncK8C03fn97of0QQ==} - '@module-federation/runtime-tools@0.17.1': - resolution: {integrity: sha512-4kr6zTFFwGywJx6whBtxsc84V+COAuuBpEdEbPZN//YLXhNB0iz2IGsy9r9wDl+06h84bD+3dQ05l9euRLgXzQ==} + '@module-federation/runtime-tools@0.18.0': + resolution: {integrity: sha512-fSga9o4t1UfXNV/Kh6qFvRyZpPp3EHSPRISNeyT8ZoTpzDNiYzhtw0BPUSSD8m6C6XQh2s/11rI4g80UY+d+hA==} - '@module-federation/runtime@0.17.1': - resolution: {integrity: sha512-vKEN32MvUbpeuB/s6UXfkHDZ9N5jFyDDJnj83UTJ8n4N1jHIJu9VZ6Yi4/Ac8cfdvU8UIK9bIbfVXWbUYZUDsw==} + '@module-federation/runtime@0.18.0': + resolution: {integrity: sha512-+C4YtoSztM7nHwNyZl6dQKGUVJdsPrUdaf3HIKReg/GQbrt9uvOlUWo2NXMZ8vDAnf/QRrpSYAwXHmWDn9Obaw==} - '@module-federation/sdk@0.17.1': - resolution: {integrity: sha512-nlUcN6UTEi+3HWF+k8wPy7gH0yUOmCT+xNatihkIVR9REAnr7BUvHFGlPJmx7WEbLPL46+zJUbtQHvLzXwFhng==} + '@module-federation/sdk@0.18.0': + resolution: {integrity: sha512-Lo/Feq73tO2unjmpRfyyoUkTVoejhItXOk/h5C+4cistnHbTV8XHrW/13fD5e1Iu60heVdAhhelJd6F898Ve9A==} - '@module-federation/webpack-bundler-runtime@0.17.1': - resolution: {integrity: sha512-Swspdgf4PzcbvS9SNKFlBzfq8h/Qxwqjq/xRSqw1pqAZWondZQzwTTqPXhgrg0bFlz7qWjBS/6a8KuH/gRvGaQ==} + '@module-federation/webpack-bundler-runtime@0.18.0': + resolution: {integrity: sha512-TEvErbF+YQ+6IFimhUYKK3a5wapD90d90sLsNpcu2kB3QGT7t4nIluE25duXuZDVUKLz86tEPrza/oaaCWTpvQ==} '@mui/core-downloads-tracker@7.3.1': resolution: {integrity: sha512-+mIK1Z0BhOaQ0vCgOkT1mSrIpEHLo338h4/duuL4TBLXPvUMit732mnwJY3W40Avy30HdeSfwUAAGRkKmwRaEQ==} @@ -1982,11 +2013,11 @@ packages: '@napi-rs/wasm-runtime@1.0.3': resolution: {integrity: sha512-rZxtMsLwjdXkMUGC3WwsPwLNVqVqnTJT6MNIB6e+5fhMcSCPP0AOsNWuMQ5mdCq6HNjs/ZeWAEchpqeprqBD2Q==} - '@next/env@15.5.0': - resolution: {integrity: sha512-sDaprBAfzCQiOgo2pO+LhnV0Wt2wBgartjrr+dpcTORYVnnXD0gwhHhiiyIih9hQbq+JnbqH4odgcFWhqCGidw==} + '@next/env@15.5.2': + resolution: {integrity: sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg==} - '@next/mdx@15.5.0': - resolution: {integrity: sha512-TxfWpIDHx9Xy/GgZwegrl+HxjzeQml0bTclxX72SqJLi83IhJaFiglQbfMTotB2hDRbxCGKpPYh0X20+r1Trtw==} + '@next/mdx@15.5.2': + resolution: {integrity: sha512-Lz9mdoKRfSNc7T1cSk3gzryhRcc7ErsiAWba1HBoInCX4ZpGUQXmiZLAAyrIgDl7oS/UHxsgKtk2qp/Df4gKBg==} peerDependencies: '@mdx-js/loader': '>=0.15.0' '@mdx-js/react': '>=0.15.0' @@ -1996,50 +2027,50 @@ packages: '@mdx-js/react': optional: true - '@next/swc-darwin-arm64@15.5.0': - resolution: {integrity: sha512-v7Jj9iqC6enxIRBIScD/o0lH7QKvSxq2LM8UTyqJi+S2w2QzhMYjven4vgu/RzgsdtdbpkyCxBTzHl/gN5rTRg==} + '@next/swc-darwin-arm64@15.5.2': + resolution: {integrity: sha512-8bGt577BXGSd4iqFygmzIfTYizHb0LGWqH+qgIF/2EDxS5JsSdERJKA8WgwDyNBZgTIIA4D8qUtoQHmxIIquoQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@15.5.0': - resolution: {integrity: sha512-s2Nk6ec+pmYmAb/utawuURy7uvyYKDk+TRE5aqLRsdnj3AhwC9IKUBmhfnLmY/+P+DnwqpeXEFIKe9tlG0p6CA==} + '@next/swc-darwin-x64@15.5.2': + resolution: {integrity: sha512-2DjnmR6JHK4X+dgTXt5/sOCu/7yPtqpYt8s8hLkHFK3MGkka2snTv3yRMdHvuRtJVkPwCGsvBSwmoQCHatauFQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@15.5.0': - resolution: {integrity: sha512-mGlPJMZReU4yP5fSHjOxiTYvZmwPSWn/eF/dcg21pwfmiUCKS1amFvf1F1RkLHPIMPfocxLViNWFvkvDB14Isg==} + '@next/swc-linux-arm64-gnu@15.5.2': + resolution: {integrity: sha512-3j7SWDBS2Wov/L9q0mFJtEvQ5miIqfO4l7d2m9Mo06ddsgUK8gWfHGgbjdFlCp2Ek7MmMQZSxpGFqcC8zGh2AA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@15.5.0': - resolution: {integrity: sha512-biWqIOE17OW/6S34t1X8K/3vb1+svp5ji5QQT/IKR+VfM3B7GvlCwmz5XtlEan2ukOUf9tj2vJJBffaGH4fGRw==} + '@next/swc-linux-arm64-musl@15.5.2': + resolution: {integrity: sha512-s6N8k8dF9YGc5T01UPQ08yxsK6fUow5gG1/axWc1HVVBYQBgOjca4oUZF7s4p+kwhkB1bDSGR8QznWrFZ/Rt5g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@15.5.0': - resolution: {integrity: sha512-zPisT+obYypM/l6EZ0yRkK3LEuoZqHaSoYKj+5jiD9ESHwdr6QhnabnNxYkdy34uCigNlWIaCbjFmQ8FY5AlxA==} + '@next/swc-linux-x64-gnu@15.5.2': + resolution: {integrity: sha512-o1RV/KOODQh6dM6ZRJGZbc+MOAHww33Vbs5JC9Mp1gDk8cpEO+cYC/l7rweiEalkSm5/1WGa4zY7xrNwObN4+Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@15.5.0': - resolution: {integrity: sha512-+t3+7GoU9IYmk+N+FHKBNFdahaReoAktdOpXHFIPOU1ixxtdge26NgQEEkJkCw2dHT9UwwK5zw4mAsURw4E8jA==} + '@next/swc-linux-x64-musl@15.5.2': + resolution: {integrity: sha512-/VUnh7w8RElYZ0IV83nUcP/J4KJ6LLYliiBIri3p3aW2giF+PAVgZb6mk8jbQSB3WlTai8gEmCAr7kptFa1H6g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@15.5.0': - resolution: {integrity: sha512-d8MrXKh0A+c9DLiy1BUFwtg3Hu90Lucj3k6iKTUdPOv42Ve2UiIG8HYi3UAb8kFVluXxEfdpCoPPCSODk5fDcw==} + '@next/swc-win32-arm64-msvc@15.5.2': + resolution: {integrity: sha512-sMPyTvRcNKXseNQ/7qRfVRLa0VhR0esmQ29DD6pqvG71+JdVnESJaHPA8t7bc67KD5spP3+DOCNLhqlEI2ZgQg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@15.5.0': - resolution: {integrity: sha512-Fe1tGHxOWEyQjmygWkkXSwhFcTJuimrNu52JEuwItrKJVV4iRjbWp9I7zZjwqtiNnQmxoEvoisn8wueFLrNpvQ==} + '@next/swc-win32-x64-msvc@15.5.2': + resolution: {integrity: sha512-W5VvyZHnxG/2ukhZF/9Ikdra5fdNftxI6ybeVKYvBPDtyx7x4jPPSNduUkfH5fo3zG0JQ0bPxgy41af2JX5D4Q==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2070,8 +2101,8 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@rolldown/pluginutils@1.0.0-beta.32': - resolution: {integrity: sha512-QReCdvxiUZAPkvp1xpAg62IeNzykOFA6syH2CnClif4YmALN1XKpB39XneL80008UbtMShthSVDKmrx05N1q/g==} + '@rolldown/pluginutils@1.0.0-beta.34': + resolution: {integrity: sha512-LyAREkZHP5pMom7c24meKmJCdhf2hEyvam2q0unr3or9ydwDL+DJ8chTF6Av/RFPb3rH8UFBdMzO5MxTZW97oA==} '@rollup/pluginutils@5.2.0': resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==} @@ -2082,171 +2113,171 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.48.1': - resolution: {integrity: sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==} + '@rollup/rollup-android-arm-eabi@4.49.0': + resolution: {integrity: sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.48.1': - resolution: {integrity: sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==} + '@rollup/rollup-android-arm64@4.49.0': + resolution: {integrity: sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.48.1': - resolution: {integrity: sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==} + '@rollup/rollup-darwin-arm64@4.49.0': + resolution: {integrity: sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.48.1': - resolution: {integrity: sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==} + '@rollup/rollup-darwin-x64@4.49.0': + resolution: {integrity: sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.48.1': - resolution: {integrity: sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==} + '@rollup/rollup-freebsd-arm64@4.49.0': + resolution: {integrity: sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.48.1': - resolution: {integrity: sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==} + '@rollup/rollup-freebsd-x64@4.49.0': + resolution: {integrity: sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': - resolution: {integrity: sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.49.0': + resolution: {integrity: sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.48.1': - resolution: {integrity: sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==} + '@rollup/rollup-linux-arm-musleabihf@4.49.0': + resolution: {integrity: sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.48.1': - resolution: {integrity: sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==} + '@rollup/rollup-linux-arm64-gnu@4.49.0': + resolution: {integrity: sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.48.1': - resolution: {integrity: sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==} + '@rollup/rollup-linux-arm64-musl@4.49.0': + resolution: {integrity: sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': - resolution: {integrity: sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.49.0': + resolution: {integrity: sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.48.1': - resolution: {integrity: sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==} + '@rollup/rollup-linux-ppc64-gnu@4.49.0': + resolution: {integrity: sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.48.1': - resolution: {integrity: sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==} + '@rollup/rollup-linux-riscv64-gnu@4.49.0': + resolution: {integrity: sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.48.1': - resolution: {integrity: sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==} + '@rollup/rollup-linux-riscv64-musl@4.49.0': + resolution: {integrity: sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.48.1': - resolution: {integrity: sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==} + '@rollup/rollup-linux-s390x-gnu@4.49.0': + resolution: {integrity: sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.48.1': - resolution: {integrity: sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==} + '@rollup/rollup-linux-x64-gnu@4.49.0': + resolution: {integrity: sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.48.1': - resolution: {integrity: sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==} + '@rollup/rollup-linux-x64-musl@4.49.0': + resolution: {integrity: sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.48.1': - resolution: {integrity: sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==} + '@rollup/rollup-win32-arm64-msvc@4.49.0': + resolution: {integrity: sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.48.1': - resolution: {integrity: sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==} + '@rollup/rollup-win32-ia32-msvc@4.49.0': + resolution: {integrity: sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.48.1': - resolution: {integrity: sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==} + '@rollup/rollup-win32-x64-msvc@4.49.0': + resolution: {integrity: sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==} cpu: [x64] os: [win32] - '@rsbuild/core@1.4.16': - resolution: {integrity: sha512-t2684BBkqAh+dw/v00ySQc5P5SMul4a428L1qHwwIWFPAZ0bnus/hw/wI8nM2AQpMcKfJPkdyVSGm4ueCYPtPw==} - engines: {node: '>=16.10.0'} + '@rsbuild/core@1.5.1': + resolution: {integrity: sha512-ScXC3nm1drXDyT9OahHxXJ8Tg+1oE5IN2+ZwJzNl0cLJD8Jmbjl4zMUN7zZdRPqjaTCz67IAjws+HN+PSKHBaw==} + engines: {node: '>=18.12.0'} hasBin: true - '@rsbuild/plugin-react@1.3.5': - resolution: {integrity: sha512-L/GoHgJV4j+EQbI4KOhe5EscM0OHgnSat1eR0Nt5P3JZxpJV2ryO5Yfx5jElPWOkYZZCuk+EWhHWDQ4CkeC5BQ==} + '@rsbuild/plugin-react@1.4.0': + resolution: {integrity: sha512-YhhOUOonJBjnKpUf7E4iXKidldPWAGmYBRtDjQgcSmW4tbW0DasFpNCqLn5870Q2Ly6oCU06sLv+8G597I36+w==} peerDependencies: '@rsbuild/core': 1.x - '@rspack/binding-darwin-arm64@1.4.11': - resolution: {integrity: sha512-PrmBVhR8MC269jo6uQ+BMy1uwIDx0HAJYLQRQur8gXiehWabUBCRg/d4U9KR7rLzdaSScRyc5JWXR52T7/4MfA==} + '@rspack/binding-darwin-arm64@1.5.0': + resolution: {integrity: sha512-7909YLNnKf0BYxiCpCWOk13WyWS4493Kxk1NQwy9KPLY9ydQExk84KVsix2NuNBaI8Pnk3aVLBPJiSNXtHLjnA==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@1.4.11': - resolution: {integrity: sha512-YIV8Wzy+JY0SoSsVtN4wxFXOjzxxVPnVXNswrrfqVUTPr9jqGOFYUWCGpbt8lcCgfuBFm6zN8HpOsKm1xUNsVA==} + '@rspack/binding-darwin-x64@1.5.0': + resolution: {integrity: sha512-poGuQsGKCMQqSswgrz8X+frqMVTdmtzUDyvi/p9BLwW+2DwWgmywU8jwE+BYtjfWp1tErBSTlLxmEPQTdcIQgQ==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@1.4.11': - resolution: {integrity: sha512-ms6uwECUIcu+6e82C5HJhRMHnfsI+l33v7XQezntzRPN0+sG3EpikEoT7SGbgt4vDwaWLR7wS20suN4qd5r3GA==} + '@rspack/binding-linux-arm64-gnu@1.5.0': + resolution: {integrity: sha512-Bvmk8h3tRhN9UgOtH+vK0SgFM3qEO36eJz7oddOl4lJQxBf2GNA87bGtkMtX+AVPz/PUn7r82uWxrlVNQHAbFg==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.4.11': - resolution: {integrity: sha512-9evq0DOdxMN/H8VM8ZmyY9NSuBgILNVV6ydBfVPMHPx4r1E7JZGpWeKDegZcS5Erw3sS9kVSIxyX78L5PDzzKw==} + '@rspack/binding-linux-arm64-musl@1.5.0': + resolution: {integrity: sha512-bH7UwkbACDYT37YnN9kkhaF9niFFK9ndcdNvYFFr1oUT4W9Ie3V9b41EXijqp3pyh0mDSeeLPFY0aEx1t3e7Pw==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-x64-gnu@1.4.11': - resolution: {integrity: sha512-bHYFLxPPYBOSaHdQbEoCYGMQ1gOrEWj7Mro/DLfSHZi1a0okcQ2Q1y0i1DczReim3ZhLGNrK7k1IpFXCRbAobQ==} + '@rspack/binding-linux-x64-gnu@1.5.0': + resolution: {integrity: sha512-xZ5dwNrE5KtpQyMd9israpJTcTQ3UYUUq23fTcNc79xE5aspkGixDFAYoql4YkhO0O+JWRmdSaFAn6jD+IQWQA==} cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.4.11': - resolution: {integrity: sha512-wrm4E7q2k4+cwT6Uhp6hIQ3eUe/YoaUttj6j5TqHYZX6YeLrNPtD9+ne6lQQ17BV8wmm6NZsmoFIJ5xIptpRhQ==} + '@rspack/binding-linux-x64-musl@1.5.0': + resolution: {integrity: sha512-mv65jYvcyYPkPZJ9kjSvTAcH0o7C5jfICWCQcMmN1tCGD3b8gmf9GqSZ8e+W/JkuvrJ05qTo/PvEq9nhu+pNIg==} cpu: [x64] os: [linux] - '@rspack/binding-wasm32-wasi@1.4.11': - resolution: {integrity: sha512-hiYxHZjaZ17wQtXyLCK0IdtOvMWreGVTiGsaHCxyeT+SldDG+r16bXNjmlqfZsjlfl1mkAqKz1dg+mMX28OTqw==} + '@rspack/binding-wasm32-wasi@1.5.0': + resolution: {integrity: sha512-8rVpl6xfaAFJgo1wCd+emksfl+/8nlehrtkmjY9bj79Ou+kp07L9e1B+UU0jfs8e7aLPntQuF68kzLHwYLzWIQ==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@1.4.11': - resolution: {integrity: sha512-+HF/mnjmTr8PC1dccRt1bkrD2tPDGeqvXC1BBLYd/Klq1VbtIcnrhfmvQM6KaXbiLcY9VWKzcZPOTmnyZ8TaHQ==} + '@rspack/binding-win32-arm64-msvc@1.5.0': + resolution: {integrity: sha512-dWSmNm+GR6WSkOwbhlUcot4Oqwyon+1PRZ9E0vIMFHKGvESf9CQjgHAX0QE9G0kJmRM5x3I16J4x44Kw3W/98Q==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.4.11': - resolution: {integrity: sha512-EU2fQGwrRfwFd/tcOInlD0jy6gNQE4Q3Ayj0Is+cX77sbhPPyyOz0kZDEaQ4qaN2VU8w4Hu/rrD7c0GAKLFvCw==} + '@rspack/binding-win32-ia32-msvc@1.5.0': + resolution: {integrity: sha512-YtOrFEkwhO3Y3sY6Jq0OOYPY7NBTNYuwJ6epTgzPEDGs2cBnwZfzhq0jmD/koWtv1L9+twX95vKosBdauF0tNA==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@1.4.11': - resolution: {integrity: sha512-1Nc5ZzWqfvE+iJc47qtHFzYYnHsC3awavXrCo74GdGip1vxtksM3G30BlvAQHHVtEmULotWqPbjZpflw/Xk9Ag==} + '@rspack/binding-win32-x64-msvc@1.5.0': + resolution: {integrity: sha512-V4fcPVYWJgDkIkSsFwmUdwC9lkL8+1dzDOwyTWe6KW2MYHF2D148WPHNyVVE6gum12TShpbIsh0j4NiiMhkMtw==} cpu: [x64] os: [win32] - '@rspack/binding@1.4.11': - resolution: {integrity: sha512-maGl/zRwnl0QVwkBCkgjn5PH20L9HdlRIdkYhEsfTepy5x2QZ0ti/0T49djjTJQrqb+S1i6wWQymMMMMMsxx6Q==} + '@rspack/binding@1.5.0': + resolution: {integrity: sha512-UGXQmwEu2gdO+tnGv2q4rOWJdWioy6dlLXeZOLYAZVh3mrfKJhZWtDEygX9hCdE5thWNRTlEvx30QQchJAszIQ==} - '@rspack/core@1.4.11': - resolution: {integrity: sha512-JtKnL6p7Kc/YgWQJF3Woo4OccbgKGyT/4187W4dyex8BMkdQcbqCNIdi6dFk02hwQzxpOOxRSBI4hlGRbz7oYQ==} - engines: {node: '>=16.0.0'} + '@rspack/core@1.5.0': + resolution: {integrity: sha512-eEtiKV+CUcAtnt1K+eiHDzmBXQcNM8CfCXOzr0+gHGp4w4Zks2B8RF36sYD03MM2bg8VRXXsf0MicQ8FvRMCOg==} + engines: {node: '>=18.12.0'} peerDependencies: '@swc/helpers': '>=0.5.1' peerDependenciesMeta: @@ -2257,8 +2288,8 @@ packages: resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==} engines: {node: '>=16.0.0'} - '@rspack/plugin-react-refresh@1.4.3': - resolution: {integrity: sha512-wZx4vWgy5oMEvgyNGd/oUKcdnKaccYWHCRkOqTdAPJC3WcytxhTX+Kady8ERurSBiLyQpoMiU3Iyd+F1Y2Arbw==} + '@rspack/plugin-react-refresh@1.5.0': + resolution: {integrity: sha512-pYOmc1mrK8Ui/7VWUgjKt9YqrxFn4woURTgGpFYWwsFvJxmWm05zog4fUbChvErbaBHkx1aA+KHxIvM/6tFODg==} peerDependencies: react-refresh: '>=0.10.0 <1.0.0' webpack-hot-middleware: 2.x @@ -2471,8 +2502,8 @@ packages: '@types/prop-types@15.7.15': resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==} - '@types/react-dom@19.1.8': - resolution: {integrity: sha512-xG7xaBMJCpcK0RpN8jDbAACQo54ycO6h4dSSmgv8+fu6ZIAdANkx/WsawASUjVXYfy+J9AbUpRMNNEsXCDfDBQ==} + '@types/react-dom@19.1.9': + resolution: {integrity: sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==} peerDependencies: '@types/react': ^19.0.0 @@ -2484,8 +2515,8 @@ packages: peerDependencies: '@types/react': '*' - '@types/react@19.1.11': - resolution: {integrity: sha512-lr3jdBw/BGj49Eps7EvqlUaoeA0xpj3pc0RoJkHpYaCHkVK7i28dKyImLQb3JVlqs3aYSXf7qYuWOW/fgZnTXQ==} + '@types/react@19.1.12': + resolution: {integrity: sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w==} '@types/resolve@1.20.6': resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} @@ -2567,8 +2598,8 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@vitejs/plugin-react@5.0.1': - resolution: {integrity: sha512-DE4UNaBXwtVoDJ0ccBdLVjFTWL70NRuWNCxEieTI3lrq9ORB9aOCQEKstwDXBl87NvFdbqh/p7eINGyj0BthJA==} + '@vitejs/plugin-react@5.0.2': + resolution: {integrity: sha512-tmyFgixPZCx2+e6VO9TNITWcCQl8+Nl/E8YbAyPVv85QCc7/A3JrdfG2A8gIzvVhWuzMOVrFW1aReaNxrI6tbw==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: vite: ^6 @@ -2691,221 +2722,224 @@ packages: '@xtuc/long@4.2.2': resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - '@zag-js/accordion@1.21.7': - resolution: {integrity: sha512-pRgo78OwzpvnPsXBVPCEaLPoL+hbmAWk5MFbT86VhcSKkJt4SGGpBcpFxXxCwvLEB/+/8dNXn1Q37MkONhY41g==} + '@zag-js/accordion@1.22.1': + resolution: {integrity: sha512-P3jsauxnAGKBhuqs9gdivjEiSu7N7KnKRlgWlIpyti35askz8swHsqxsfkc2ASs9tcPKnPvuZDHIxXmJmZSLuQ==} - '@zag-js/anatomy@1.21.7': - resolution: {integrity: sha512-efILCL7IvlAkwU+FEeInSYHrvObDPnTJAMF5XNOhYkL7LtSlGl2lcWKrWg6I3zWYElQr3q2B8nrkI+FYx2mnlg==} + '@zag-js/anatomy@1.22.1': + resolution: {integrity: sha512-I5OvOuJBt6hEqbpqVkWCOEoDfGMnKuLx+S0h7Un5SyAwnif3F1dSqDYujU28bCy8FtKs36vsq/izxufXyiXSEg==} - '@zag-js/angle-slider@1.21.7': - resolution: {integrity: sha512-D4mbQVtvNfmHik87VhxPEXC1SHB373EfHDA7aO26/u823sl6LgdbfK8dzf/vF42sfLaFrpFxyULdMEwSXulg1Q==} + '@zag-js/angle-slider@1.22.1': + resolution: {integrity: sha512-Nitjwwo2NVUEK+PabDnOfqizErnFIZZKThtcpQikAhE1J4MX3H128MANu1hJXNkvVYXyZmhTvzjt6XZc2j7YyQ==} - '@zag-js/aria-hidden@1.21.7': - resolution: {integrity: sha512-vgumdnvbRhNf4o1tg2iuYS9wMWy9EdrDnsAKv6wslS9hgEAKunYI8phbrlxd7v8Va9PVJMYdEUIbaUKs6VqQuQ==} + '@zag-js/aria-hidden@1.22.1': + resolution: {integrity: sha512-vPfAE35BfYPS1UbYRcNw8/kMl7uayE7LyRncK/gPMnoQMjmEKW0nXmD5WlCHFLdGX9WFGYTIde8k4U8ay+oqcg==} - '@zag-js/auto-resize@1.21.7': - resolution: {integrity: sha512-gcG0rXYuFa9lnzpsaXgpoVVV016jg9rU6YKXgs9qtLk+JBWWrJn+NH8LWfCr/QHlpBSyZEqXYz0L1zzhCi7v7Q==} + '@zag-js/async-list@1.22.1': + resolution: {integrity: sha512-/evBfhDW3Rj3An5fHW8SYINM/pkxeOe/Uk7rRlBreHVn2PdAay4sj1gax4hlUUFEbqyvBgbHpR/atwfdxSuWYQ==} - '@zag-js/avatar@1.21.7': - resolution: {integrity: sha512-P+vc2QB9eRKcNOce2gi7rTq0ylM5tRsIOemXewCaIhhXOqqLPlxaTJIih0mx8Qd0+qBN+lSW2MhrDLg7zMK3cw==} + '@zag-js/auto-resize@1.22.1': + resolution: {integrity: sha512-O+tKmqwLko74DCmwdouxBZqEtIQB6Rt2pyXdlyBXLB7UnYXEIvEUzf8XK39I5AHXp6NlLqx77GtLn1qiBtKrkQ==} - '@zag-js/carousel@1.21.7': - resolution: {integrity: sha512-/J/uNGYXwM9v3oHQOnuYx/9Q1aFyg/S6dHZZ09dYLj7npUtBBKhq3gFrE/xive2jcmIChuKICmaTFTUDEj0w0g==} + '@zag-js/avatar@1.22.1': + resolution: {integrity: sha512-SAz9XaFD8jg4LODkS51s6KrNcYF/PvAcRkCE9TDiuiCeFdgB6+JFKBNk0iM9og8Tk4Doe/3qIA/I12qKNW9pAw==} - '@zag-js/checkbox@1.21.7': - resolution: {integrity: sha512-CeMlEHgvYMj8SnlCOXRwvcTnumEbpdCSnpb2emn+2KUrZsBNYRhoPPAdBO0qlK2u0PRz2WtiPwh4jLPt9Y8arQ==} + '@zag-js/carousel@1.22.1': + resolution: {integrity: sha512-bFbCRe5xarBtD3NnozHmCmrGJ+nLRhqLQFq+RG13fl1hlhUJaJ5AsS7e8L1r2ZLdbVVrsB0lUuW/ocfJ/G4MSw==} - '@zag-js/clipboard@1.21.7': - resolution: {integrity: sha512-NjdHwMyfoT93sTcKfFEsRGMaL36fxwFzXNMS6cOInwan5KYEg/0Jyq6cxr50Nb9C9WgBAMsXJ2TMlfJbN+YtxQ==} + '@zag-js/checkbox@1.22.1': + resolution: {integrity: sha512-A/cZb89Aeb2k/KGl3ITS2fuLBXwq6Rnq9aFirfKs/UHrY16fopRbRjfqOxF6wm8lWoFk3gqmRGgybo8qsIfxog==} - '@zag-js/collapsible@1.21.7': - resolution: {integrity: sha512-B1GC/hqDi5N+aWRHVDbHFDlfAzl/co87aDBLPYrwOBVfZFAJzqS+o5JLBVrBCfl2E6yWtquNq4klpoUaM56fSQ==} + '@zag-js/clipboard@1.22.1': + resolution: {integrity: sha512-rKTPRKvLtcJ1c/CDvnWDRpqAteFS20UQe+mQpO83ACMCRZAfkXP3UOzBL53mh59+LIVlDxgZbMlwRiNiqqKhmA==} - '@zag-js/collection@1.21.7': - resolution: {integrity: sha512-KzxLN30/S4zH9gaut8WlIzx2MNcA46QuKpPMglj+OrKCdT1jiK9zARvISwRGSziFQXxgn5Aw6yzYvNwbYGIp9A==} + '@zag-js/collapsible@1.22.1': + resolution: {integrity: sha512-vKfDe/fzm3ndDfaueqW/XgGaWCHVD8MuLFtRRyv3jX3ubdNYn5R/j7ftQURdYyqRlPI3Si50FWSAtOqtvs4y9Q==} - '@zag-js/color-picker@1.21.7': - resolution: {integrity: sha512-xKukVvj1v/mf9T54qYW3KA1uaw+lDPBCHvrMEEGb58mNmaL0rDFJlyFTYOhP8+Sg4yvlgEQLph9jarAf385vxQ==} + '@zag-js/collection@1.22.1': + resolution: {integrity: sha512-jjeSKALTH3iK2vTI6uAh2NCtS9n+e2r1cGERKCfNkbt86U6VSp9xiXqalUsEI4ovNIPcgg0+/nzixoVwFO1Vgg==} - '@zag-js/color-utils@1.21.7': - resolution: {integrity: sha512-4YfyGfCvlIb0K0Sr9A7izuCA59pSRSuXX7su5QCyGS7r+HOv0ehkJeIZ2S1+AWn2gWRFk9A24CPHnHAZDgiEdQ==} + '@zag-js/color-picker@1.22.1': + resolution: {integrity: sha512-vUx8Ef0CZ/VPARIPh2ur76HH1AL3FVObNgtX64kPNUDUI+Z/L/q6CBfIeGcElVQ/Y6QowrqAXjVyPGArmmohmw==} - '@zag-js/combobox@1.21.7': - resolution: {integrity: sha512-XkK+y2XkfWAIUdYJEN66bBs7NeVq1TiWwJAh+jR4C0l2ZAuGMQcsGBVAhKQBfya9byrndLFx1ybPXphgWk1ZRQ==} + '@zag-js/color-utils@1.22.1': + resolution: {integrity: sha512-Bee1KvYOV0yWQbODN+O2zPmdUaH+rymEmIHLfKNipPo5GVmxWqAe8oTQDyquzsUtoPE5MFgW5avg8tgSlCFcBA==} - '@zag-js/core@1.21.7': - resolution: {integrity: sha512-mFaygzRqRty/tKo6bAvSioFQevFXJ/9LEKUovObEzriNBgrIFwxdrRhHmua26fpFimZJQeVZk5qePBKLy6xvGQ==} + '@zag-js/combobox@1.22.1': + resolution: {integrity: sha512-N4tGTmezfHGaKB0+aDB5yMuVzBv2ShgsAx1uizom6ElcvlYD2rsQTr3xLc4wyOR7fx0z6fFDo1+63/Dt3y0t4A==} - '@zag-js/date-picker@1.21.7': - resolution: {integrity: sha512-STMxblsONzYzvaRFCkeNIQCEDSEFix9D9gLTqCdSrG7fmhjoKz1lIGpRCTj20hlwhPn6J6B0cwxcocdZxxaLUA==} + '@zag-js/core@1.22.1': + resolution: {integrity: sha512-4BNrwO9Tadq2Z0d2xSSQs4O/o3OarEHzXM2FQqx46vrwSE57qUghnZex429ZQ51fuk8AL5Lowt26a9JxE9sVPg==} + + '@zag-js/date-picker@1.22.1': + resolution: {integrity: sha512-ja482LloO7AGfFYXTfGV+qV484QWUM1cnF3hWtROd4Vdx/NONwn0w7TEJH+XbO3HaoUC5XpeacWLFQugGCsRjg==} peerDependencies: '@internationalized/date': '>=3.0.0' - '@zag-js/date-utils@1.21.7': - resolution: {integrity: sha512-HR1ZsoQoiZL5Jtgfs+MGh0eJ33lHwMQa9d0yhBmjeOy7yuwNvD77wjn4oFiLi7qFkwQKRsimJluDIDblXRtJQg==} + '@zag-js/date-utils@1.22.1': + resolution: {integrity: sha512-OWIWxihfFFyQDEaA35a/Fdfp3+GyGUgTUbutMD3BrbnPjKNLm0RyvAgZiq0zPTY7CzpYRbZ2J98GDU+CTERCjA==} peerDependencies: '@internationalized/date': '>=3.0.0' - '@zag-js/dialog@1.21.7': - resolution: {integrity: sha512-nS4FO0580Ijp8xjaOnyv8/VEfcd8MZ2X/3UEo7Y+A1paryXpvfgJ1GyhHpSXA/HWEW9g/TYG30Vj8sgVyDxZIA==} + '@zag-js/dialog@1.22.1': + resolution: {integrity: sha512-b5KwMPYKc9RenZwxrAAHu6aHPz7tqPy4Mxa/YR5zo1pXBV4amA7u2xnqyncRaK65Z7y5QKmpmDuBp+0PnXxNIA==} - '@zag-js/dismissable@1.21.7': - resolution: {integrity: sha512-hAJkAycdFfIYcv/lx28s4Kpo1PM1ZwV7n/fCa5w+r11NEMVdEKsqnIl/k/icI7HwkRivB7mePW2CCTkJCuMiLw==} + '@zag-js/dismissable@1.22.1': + resolution: {integrity: sha512-0DzbykJu9QoXYw4Zcjte69Mtk6ThNRCXWxxCKBf930V8Bw3Ha7vfY5bgdb4RFT5K+BQP3E8vLT+PzIaDINn2Xw==} - '@zag-js/dom-query@1.21.7': - resolution: {integrity: sha512-3oU6tbauM3D4558CCHULgbw872YHZ537pHDOdr9Q3rzUgFkEvSlxKpDAomsCwLSmgSkeUxLikiep8WV1ZXaYDw==} + '@zag-js/dom-query@1.22.1': + resolution: {integrity: sha512-mtvGj2z3rkl40mkjd+QwoOHvxqpiOkY4mtVjzNzgzcbVtUN63Mz7giW8OZB+KLy37hwFX0B8JfiQncU8IOHNpw==} - '@zag-js/editable@1.21.7': - resolution: {integrity: sha512-25GI8BopcVjKMwATzXjAgXDLazZiD6e7ZVoPE+YrRO0TTsU6QNN0sGjrst5TsOQXx7oORcA6xR9kjElZjzY6Ag==} + '@zag-js/editable@1.22.1': + resolution: {integrity: sha512-NY7VeKYuNLQzi+yZYmWliif0Qd/2PTKtDeqtnVypv8XSHqTbVeS2N9dqTru1g4RP+eGQWx0za12hjmCVU4DuMQ==} - '@zag-js/file-upload@1.21.7': - resolution: {integrity: sha512-Ngber4zUw7CAylxTvtDBV0bhrgh6LwTBdYRph12Z9W+f2AVVBKyhlG1Y7nYJ03nrmhCcu9d43YwVE9x18jSF1Q==} + '@zag-js/file-upload@1.22.1': + resolution: {integrity: sha512-4iKpqxVLafLbQejcPoZcygtNURsezIlWRigHvVPd2pLsXPa8erbdcEZ8X4QvGp77xcW2QTkuSxB+BSCrEEAotA==} - '@zag-js/file-utils@1.21.7': - resolution: {integrity: sha512-cT4Z+W3iQ7kjOeuC8ASvgrgyrePtkWvy3daMZBrkJALS/pU6TCTsS8qm8u/3bjb/GzKLxxsi4UccMrxCAmXgIQ==} + '@zag-js/file-utils@1.22.1': + resolution: {integrity: sha512-cZAJ5MAZCe7IfHfN+3xSNb9e6mA812U8BPJr/jNPN+qLQh/PkQDwKaGM33o2Me50r18iGTAswEkETnaFZt3wkw==} - '@zag-js/floating-panel@1.21.7': - resolution: {integrity: sha512-dhK3hrugUVHoDS5Y27RLAn1dNrsOw2CTA0U6RWGx7oedzM20/PqO/DTuU/F+7gtbteLmW98PvXBRbV2uPyJTJA==} + '@zag-js/floating-panel@1.22.1': + resolution: {integrity: sha512-YGjLoYt2xSk4pkTgsR0z/7U7V5OdaicSOZa0HDtskH4MkKPxQxrgf2G4e8dNsw8hnQwfVuoc0RGPGW0BArVr6A==} - '@zag-js/focus-trap@1.21.7': - resolution: {integrity: sha512-I4coXNhqtnkBOv7HFu3YOUceK+t3wzb1Fj1farFhkLmAMEnF45wpmdUHdXIZD2IUO8KusvHybMNfAgiB3PncKQ==} + '@zag-js/focus-trap@1.22.1': + resolution: {integrity: sha512-6W9cG0LEVICt0srVfWSpamKzsnRxXMdl3gV+GQ5HvkCCk1Sw6Io4tc3QvSSvaWcfyhM07feerOsa2ah7qiT/ig==} - '@zag-js/focus-visible@1.21.7': - resolution: {integrity: sha512-0rcXo3QhHN3wbv+fQ+JTCSRv89PRMCs4NjnYi/6smXpEQ4dcsLpN8od+hp1JhiSvYUcoVqF5Gb2Jtj5ICWCxfA==} + '@zag-js/focus-visible@1.22.1': + resolution: {integrity: sha512-TuBEux3UTivo9VXPPe79q9JfTwaP/uIshL1KPifg51ofGYesWjMGeE5S5MAuaSzUmH9+3CpnwP7h7f65s3D0kw==} - '@zag-js/highlight-word@1.21.7': - resolution: {integrity: sha512-WlD9QH+EWy0qI/mJ3GH1Bbg3dvUnMaw23y1gtS5UXP3axMnGUwtXn56rdfVwB9HUaTC/dnHQ/IlFeUZEY3a/6w==} + '@zag-js/highlight-word@1.22.1': + resolution: {integrity: sha512-mcPg4/ED3MNDzj5b3t4EEIKkvdyvVUJ9pqbyRUoj76KI+ZWXXJIw5PNAkG5vUVVUXKKjfzPVninIqWv1Bh9Bvg==} - '@zag-js/hover-card@1.21.7': - resolution: {integrity: sha512-5NldOslgsUkKAnQsdlaGbSLbOdc/XdhR14dTrjAyEhOTUpeJv6tNnVxJJxTWgOi1/76tfTZ7eytpjQGu0p5GMQ==} + '@zag-js/hover-card@1.22.1': + resolution: {integrity: sha512-sGcWASPrt0f8oOpBdyDyka0Mkya4TdlBEOvB9qOvnkcIX2bc6YFUtWQN1L1M/K6nv8D0wSZK0p18JBaqGlHmBQ==} - '@zag-js/i18n-utils@1.21.7': - resolution: {integrity: sha512-s+dxmQZ4F5whWtcRXzEZ/Gi0H6fbJNkVcri1nLfa3w/dXIX/O7CTYbD2WA4ilxgDpq2K50LdmKOiy1FyAggCuw==} + '@zag-js/i18n-utils@1.22.1': + resolution: {integrity: sha512-45KUYB9tu1br6NmgtaNW9NviozYCYUxJ8aZTI/Y6vKotXK/Pn3bIlaiOaq4Zel7TalGYT8gVnwgPe2E6H5sqTg==} - '@zag-js/interact-outside@1.21.7': - resolution: {integrity: sha512-Kyk1NiezatK8JXrTnErCtj3T2/VD+VgtntXbMQyaxd181KIHaeE9kcV7Y+FhGJ4XOCOeIm4C1Irn1gGo7IJwmQ==} + '@zag-js/interact-outside@1.22.1': + resolution: {integrity: sha512-+iZ3xHC9+jVo2FCC4B9c9ntcXv19shVOqQGDr2cD30Hwmwtm9kCOdVydMqv3Lp3UhR8a105MXEVUAKg53WbCoA==} - '@zag-js/json-tree-utils@1.21.7': - resolution: {integrity: sha512-hepOzIbGZd2WX4/ZKydQsspVj/pmWW7UsiB5OnrKV4CAsdP0XIo1QB8xdOwGAez58huhWIr7l1oN+pTSaClC8A==} + '@zag-js/json-tree-utils@1.22.1': + resolution: {integrity: sha512-z/15CTtXJHGUvecAAlPnUAaAK83Wxh5WlW9qEpgXlXdB5k7gnWVzH4qN9vDwlSShyZgqaFVqn+muxqaCTYv8Zg==} - '@zag-js/listbox@1.21.7': - resolution: {integrity: sha512-M6rEZ1QLAFg8GUnw6vcwBLoSzjizcF9JhYK0fcz7sWSSRCw1g4q3UxDvUjWnRvLPxm6ijpnuzGRoGMnaQ4uFbA==} + '@zag-js/listbox@1.22.1': + resolution: {integrity: sha512-M017Oq0s9PRR5ZwlJkmLhQHucEta/DZ5eHl/t+9yQqHnYRwWKo2ZXLyXquC1wihbHk81E0a1veDw8vBYpfRovA==} - '@zag-js/live-region@1.21.7': - resolution: {integrity: sha512-xvjAjx+aMP3QypMWz8broq1s1EDDYt94VBemrOgrM3eLE5KumZ4lTI1o0Jmh2gNxzJoO65BBk26/ePrhdEjphg==} + '@zag-js/live-region@1.22.1': + resolution: {integrity: sha512-xjrlCbcgIw+iXxSXnjXAv+WX9r/bMwp4HOIxWOD99360XvatQ2ZGhLH9lfixiXeHLvm6hjWsP92MjYefSLDFSA==} - '@zag-js/menu@1.21.7': - resolution: {integrity: sha512-xc+AhLtpgXaoVMwVaNU0A4N/WJBmp179y4UxrkqV0c+Maaou6CIFO1B1t5K+I9ts5X+jLPz8uMu7Rl16ybU1gg==} + '@zag-js/menu@1.22.1': + resolution: {integrity: sha512-a5pgQgcpVTVyY6JM8k1WGqelHVKSPwV2CwOv2oGjHWXIr2fpRCAKqZRtytE5PvUP/CZArk8bCjatmgOWe1RdPQ==} - '@zag-js/number-input@1.21.7': - resolution: {integrity: sha512-klF1oqWO0+w/AKNN/2iUZ5WMAGfElxawLHiHF5EosfMJSTNPmrwbiqW45/apHsafoCteE+rYoiTffXr1iieJXw==} + '@zag-js/number-input@1.22.1': + resolution: {integrity: sha512-E4DROYvSo5TFJMkSmnq+f75wSTL/N7SK6MR8ssNlA2oQp69iVWXhIlFLe4knekX02QJzK1MF97aVU332kAYTeQ==} - '@zag-js/pagination@1.21.7': - resolution: {integrity: sha512-tOF86rSLK+iSD5wdsDR4LcxdbPM0jozQzyQ4gMpvPnD5DNstx4p16tE66UErt0tJPXA66Tpxq/PYZ5z9ZYIZQA==} + '@zag-js/pagination@1.22.1': + resolution: {integrity: sha512-Jeix+sXcfMPm5jer2W4PHSUCgu9a11aC/AOBk6dkxbX8XL23fYXJu5YyOVVq0iQIDWzX4Uij1N/vBha64ARmcA==} - '@zag-js/password-input@1.21.7': - resolution: {integrity: sha512-ouSI8ick5bVH+VMHN3AeOVWxicnU/RAseQgnMnaDbFhQpH4D1KKlxkvtYkTjJsHEiLYnKjKXwJ6v890UgXg+oA==} + '@zag-js/password-input@1.22.1': + resolution: {integrity: sha512-EcCH0V2tbJbexy62nVDUXCMg/XVEcd0PGcBgUfziyaLlDnJz2HWkfe0MzpEiidJwfJfhvvf2DapX9mAyqzZhhw==} - '@zag-js/pin-input@1.21.7': - resolution: {integrity: sha512-c8LivZNcj/A/XBDATBJATFUgZty4fANjZUKRMplXhv8x8Ug1Keyxl6ZWN2h85SrL7vVi3wFhWK6RKtGk7gxuQQ==} + '@zag-js/pin-input@1.22.1': + resolution: {integrity: sha512-tyI5mVi+zmsDEVuZZTOA7fVyxxGwmD8A2snF6nRkFK11o5xnnZaXt44Z7XrPeljTMSLKt+rdF0y/9Q05Auc4tg==} - '@zag-js/popover@1.21.7': - resolution: {integrity: sha512-Iz8Uz3iBEvND9ijLhdglQTosrahLqqA8l7kAfezjsaZdQk3P4XrjJmILzwIr4E9S7aunyDBvra4oAG8qu+bBDQ==} + '@zag-js/popover@1.22.1': + resolution: {integrity: sha512-27VVkhaEOtiHJYj2j++AzYlAzpMcW0ED05TV9wIT1q0EYzASWxweSBajbnCiQf9TIYzCImDiNVDaCMl5D+TamQ==} - '@zag-js/popper@1.21.7': - resolution: {integrity: sha512-Y017a4+eKNTeJhdgkrZMOhpEoLsr7RklRWM0J2A29w/pAcvDny6HERAJJQRwaWU8W305dNrfrUYgMjzCGfPnQQ==} + '@zag-js/popper@1.22.1': + resolution: {integrity: sha512-vBI5WpvE/3ugsimjZaNisOwcECiYfzc+3LIJwaU8od62kInZ1XF6m096BvV7JGwP0FjkMPJrgjcv7weDtY2iDQ==} - '@zag-js/presence@1.21.7': - resolution: {integrity: sha512-0yuQx7182boWzwZ28rTL3dtryIfBixggoSdH/6772O1eiAw/M3bWV5F+Zs/4ox0AqViznrM9/08m4S0OV7BsGw==} + '@zag-js/presence@1.22.1': + resolution: {integrity: sha512-9+pkKnjcHbNxk/80HzLdDjpiKGV/I208wAe0Njmej6q6Z79ED6cb7tXiOgAS7w/ZLWxwQW7B9oMJ3guVflBHwQ==} - '@zag-js/progress@1.21.7': - resolution: {integrity: sha512-BQZ+f6BV9rHxfuaLVUJqF24wTaLNHASxDq91LVbxz9F94wCL48tf4cHYsRA7tP0CvK6UZM2rCPlSKe+u5hSukA==} + '@zag-js/progress@1.22.1': + resolution: {integrity: sha512-2U1IJLb1mhBLEgac8x8qaEv3qgr+pHdw6pn9mCCJVBcyFaSqliWps6X+vi+qKokFLrpjCjdAKuuf48ItNfFFcw==} - '@zag-js/qr-code@1.21.7': - resolution: {integrity: sha512-rS9oF+YKuUXReCqX+eUkyISe+Zz7481QSll2ITWKXjWleV3HEKjB9QAX/Ta1b98GuRiiegEvnstYc607g7MrlQ==} + '@zag-js/qr-code@1.22.1': + resolution: {integrity: sha512-HIRlNsPNcp5buiTZx7DrX/gCtouGAH4VJc8Q6HBUkaBbiiijVEuYN0aNAjZIdm2pDtrh4KaYjMPuIH8IrV554Q==} - '@zag-js/radio-group@1.21.7': - resolution: {integrity: sha512-L8Ufz2x/OyWYkHv93vKPo6DDmpBJcxnEy2+paymPtSvtQtDB4Co8TyKZffX8s6mp8WAguR0kWBGa4P/bD+Avlw==} + '@zag-js/radio-group@1.22.1': + resolution: {integrity: sha512-eqvY1y/Ui4nQOU8XE9tGShOCbI/YdSHFeH/tDJe2Yy+1kqO4bENxFJ3R1P097KusJgeb2SYzhID27whUslOq7g==} - '@zag-js/rating-group@1.21.7': - resolution: {integrity: sha512-0shQctnULQ+uMv/Rod8qczksugPZJ2ggMQ58l7j2HuE+Y3+a8qMx9SIRMqLaHeQ03CYgZP9BjGNX68Jxp45UYg==} + '@zag-js/rating-group@1.22.1': + resolution: {integrity: sha512-QxBK+hpfkQ4yFHUr1YOSwEQ3LuTrdS32J9zV8UyHu8HbgwzfR7L8ZAa1PUUmG65tupzua2pbn1NioOkMvDmBOQ==} - '@zag-js/react@1.21.7': - resolution: {integrity: sha512-gnJcR+IYXhFG1LTHCC7XXnhWqD8wP7zutmJEncNltNLNAgGzv6OMcIwMJIIYL55Rb/okNjpGDnDMMH5JuxkR3A==} + '@zag-js/react@1.22.1': + resolution: {integrity: sha512-TcIKkNo9EFel+d92nb7104voKJNDiMkqq9nn7Ozq/TE8A62JPf5zk8y8zqoxTbGDTTk+tDjW7Sm1IKb4r6rX4w==} peerDependencies: react: '>=18.0.0' react-dom: '>=18.0.0' - '@zag-js/rect-utils@1.21.7': - resolution: {integrity: sha512-KTgUksXH3TlC2sLl5np8bhPQp2P7x+qPj8CHQg2xwA4e9XkjwI29mXOZlz1Ww3uj1yNBabomBsIQpPQJW+Jf+g==} + '@zag-js/rect-utils@1.22.1': + resolution: {integrity: sha512-jtI03SR9kF0AcBffoFI/TKXn5KyhjNCtsGlqbWw0dKbhWTNy1v432FDC5opmmnH8W5LjjWebIzo4QtO5+632QQ==} - '@zag-js/remove-scroll@1.21.7': - resolution: {integrity: sha512-RzbyAVuvMz2sQH0Drti7v3ac7KIqr3NbltzMl5cQ+apsmr/PTjZzk/VO5lf3ma8Y4ERgn90fX+f2lZgv0USBNQ==} + '@zag-js/remove-scroll@1.22.1': + resolution: {integrity: sha512-2TrS8ljp8SADX5xRB/+KGBCBYbYTeH0k5IEalG2rt8ReNyNAW1JfCrm53KCVoCg9YmxKF3MrxPgPT83MNFsJhQ==} - '@zag-js/scroll-area@1.21.7': - resolution: {integrity: sha512-ge8CD2wXi2T1Zk+DvgnHNOCG0mKJb6hx2XoEHxiqVYsRdyLXS2hBnCxRA7HYIoJ3P82YWOPVEXq0jjw8UTJylw==} + '@zag-js/scroll-area@1.22.1': + resolution: {integrity: sha512-BuWKGR3n1yMktYqfTx+U9iwpXkJJhDXW4yin7u/lLMAE0DXR4byyo8aollCkuzZdZbK7NmUG2zVQHUMZ1QaR6w==} - '@zag-js/scroll-snap@1.21.7': - resolution: {integrity: sha512-I89BpSlxHAD9oTsSB2j+10eCvl7lO8eiryDXPinyWINqQ383dmQKsC4Shas5FRbmIdT2TghpN7JPS6ydbNppuw==} + '@zag-js/scroll-snap@1.22.1': + resolution: {integrity: sha512-kctqJiteALaavoHEpYBDSPgUErIdwAoY5jcrU4Mq5L8FjtI4tSNr8BWcXzSBK2UVqaKN+vDo+PDcj7XIXTUQJA==} - '@zag-js/select@1.21.7': - resolution: {integrity: sha512-EpzJSDxhd1rYyg7xmrWgYH94LRl4eurxdFprZA7J/h/exQoNkYg7txfHkD1vmFVJYUpnbB7DR7/lVy7IAhWbWg==} + '@zag-js/select@1.22.1': + resolution: {integrity: sha512-sWq0RqlJvmj0heJDpfS3OfM1ynSSCW+fYY5v3T/QyH4qneqB8OJjgh8EEBaHlOkbqv/oBsk855U8/o6jegfUxw==} - '@zag-js/signature-pad@1.21.7': - resolution: {integrity: sha512-b7aWctlrKR8QM0TYUsCSqPr7s6PcFT3Fh9p3cI4HYn0thhJjkW7XnIdiljlTAta3MsC9uK8x/IvlwJ8SQMgj8A==} + '@zag-js/signature-pad@1.22.1': + resolution: {integrity: sha512-iD8tBCHSmRI6kdtHO8dNRZrfjGTxfWgweLlNXKu5JV2JkzPBhDCxpthHI9k8LJ0cgUM5/EW4HdEpjO9h47FsaA==} - '@zag-js/slider@1.21.7': - resolution: {integrity: sha512-luZdHZVvqgLCyWyQ2vsgBPXT8iEqEXk6ZGP1Y9sLwZrlg+iWTAZXaqVFNPjMw+xcFc3985lG6bn3qld/WkO0jA==} + '@zag-js/slider@1.22.1': + resolution: {integrity: sha512-aricrX99r21RAS9TyPNTJL8gE8mNRSQMy7TIXTa9aoeRjN0Cf6+PSksKfmPdP9l249/nplGqvC25Ck7XUVJn6A==} - '@zag-js/splitter@1.21.7': - resolution: {integrity: sha512-Ub327Wu8myap1N15lF8fVgrgZ8dprnRPbYWXCPRy8m6L/YQerSlFwBnLZQok/AaNnZzydNx4DjyoGGoZByDjsA==} + '@zag-js/splitter@1.22.1': + resolution: {integrity: sha512-ZMuFlVvqO2WYD7AECEB51iiFpN7A30Q28NfkIVR98xugwUX1OJq1IizKRSbLgC/LmseHPp3OvotxjZX6FqkK4Q==} - '@zag-js/steps@1.21.7': - resolution: {integrity: sha512-pvYGlWKMZCh/h12101AJCdMAJ0zyx3k5cv0SbCxzzxuXUsaWPIOPzAwTIudmDuiR72TiqEOUOCZc5eTJGJub4Q==} + '@zag-js/steps@1.22.1': + resolution: {integrity: sha512-eJCHbHG9aGAbzb/IQCqpmk6fmwSmIfocAxNKVTljroD6OHkBtqgaZQVS3q4xyjz61nB/d/0ZlsvpCVjm1EhwBw==} - '@zag-js/store@1.21.7': - resolution: {integrity: sha512-NSB3B9w1jZRr+j4RiSsEIavq0Q5KVcuQtITAst6XvBdrr4ZXkezOw6OA9MovGeaGrgUfRhzCHruMDiNHUtlUcQ==} + '@zag-js/store@1.22.1': + resolution: {integrity: sha512-KrMWi/Fa4cqOjx2zDSMIu6vztFYik+V3K6VPWRVONM4FkboLpTqAEayzwgTTNqMK9iYYZIYjhiPhAVLW9iLuBg==} - '@zag-js/switch@1.21.7': - resolution: {integrity: sha512-DWfiKm7qp6HZZGn3VWEvsB2sWJ539sBPzpETEG/QGgcrSNxlFjM09/p94ROw+WIazxQAJXvi6erkvPXUdgnzpg==} + '@zag-js/switch@1.22.1': + resolution: {integrity: sha512-ipmBHEqtcrPYr5WS5Juj5dt4GFIqr81NYVNe8RHMW8jIHgHhRCRj3TokGXVlZ7HdseCKTTNNrcvRFBr1sJBbOw==} - '@zag-js/tabs@1.21.7': - resolution: {integrity: sha512-v+zKTBGrcejghKynXHIMVeNfKBdzzwy1bu+/xFNCUb4OUOHL0sFJjWEdmfew+++qluSRj/u+zNlPDX7AhQewxg==} + '@zag-js/tabs@1.22.1': + resolution: {integrity: sha512-B0WHW36uuR+pu/24X0yI4eyvSwo7WmqOc5C3ohZHOf03zkmMJdtMtVQSotKr7qhGMt5updCgs68MR7jAmmc1Lw==} - '@zag-js/tags-input@1.21.7': - resolution: {integrity: sha512-3XAipb/mzPTAALv4UeOEJqiAiQDpma0CoTXq43of1JsIcvrEDMRUgFGFrYRDLojh3vHbzSPNxJX8mq1KioYvGg==} + '@zag-js/tags-input@1.22.1': + resolution: {integrity: sha512-/56pCeSIW+g+ish3Gjed7iNcPSbQEsBCBsCn6FU/JfjwyhLM0sAtn1vkE/eR92hvDX3klV12XzEMBGe4Egr3GQ==} - '@zag-js/time-picker@1.21.7': - resolution: {integrity: sha512-MGr93OZXnDwkpVO9fuZon5LoL33RlL7R2R0vhc33Ti270uJqR+wlCEmzaaDmZZKh3IVyfwFvQtdTEdiD/2KcvA==} + '@zag-js/time-picker@1.22.1': + resolution: {integrity: sha512-7fqCtyDbuaelffLZ8q9infns+HQKqFMjL4k2V5zALAWdYu2NzvlMYHgj2Ue9AI4VI5QaE1nnwV6hxwS4Zpglvg==} peerDependencies: '@internationalized/date': '>=3.0.0' - '@zag-js/timer@1.21.7': - resolution: {integrity: sha512-3AW+KpnZI7xRJWazInrr6jxgvtGcOhi1oQCSJus5znfcGFh6QD/xtrdxjjCfcI9TaIK2VNyHrWbKyBYTGGyRPA==} + '@zag-js/timer@1.22.1': + resolution: {integrity: sha512-VmXnXjecuF4tXFdBRuMHxO8mQX3/vxagE4vx0M0gKwbGoGrXnhYGvULiPL3RlJj8OR8pIfYuP2lbCrt8XM625A==} - '@zag-js/toast@1.21.7': - resolution: {integrity: sha512-Eoi0kxoscujf4AeHgOkyElCrwYXQsYlsX6swjmpDGXYDRaVBQX0n/3J7AX2qMfuHBr6YkbXYJEbjS1VoFR2HbA==} + '@zag-js/toast@1.22.1': + resolution: {integrity: sha512-cxcfbMftA//ggOAlxG3q04WZVL/mMVklvtQ2rSyj3oRmnwocJPYXtJzKIRazWBjji3u3BOA+ZeOI1AcGrfp/TQ==} - '@zag-js/toggle-group@1.21.7': - resolution: {integrity: sha512-oB/+LVu4mrRGTgj/6kAg/2QTOFGrAwnrx3TObFWjWg/naK0pQAeccX937J4IvKDsE1s4q+w+qi3oO11hEPagQA==} + '@zag-js/toggle-group@1.22.1': + resolution: {integrity: sha512-StxnGsPwzB60pGHTD7sNOqIMXjEPMl3lYQk0i2F5MIQWlTRkYdp4ivh73xBRYVtqK15gqacuWXw87EDzKcNwcA==} - '@zag-js/toggle@1.21.7': - resolution: {integrity: sha512-8lLHYjhAu9xBSmlxpsuOgsppjcEzcvk/k9sCHuJ9gHDLK/Ds2+V22JeKLfxKR2KxbApVmlAulWL0PLcfhyVYcg==} + '@zag-js/toggle@1.22.1': + resolution: {integrity: sha512-KK9VK8ZkA/ep7KxQFaeVE/zHVm90fkp9q6q4inyQkUdURUg0vovTFI3c5q/c1zm9/g51vbNf5qCXWU4m9sQK8A==} - '@zag-js/tooltip@1.21.7': - resolution: {integrity: sha512-FpnzcVWvc0NbIbvX4yCsr5+hv0z3vLrE3H9UVNpz/JDE29I2LRp0bpazxpE5TpXsSRM0EBqlM4MgYdGMokwk4g==} + '@zag-js/tooltip@1.22.1': + resolution: {integrity: sha512-0ub0p22CzYnaXv0prAnWNjqUBkdw4nO4yGk5qntaodajpLNQ4gSdq7Hj4afHzJqwbKAkwb3KzJFqcqIm9Y/dfw==} - '@zag-js/tour@1.21.7': - resolution: {integrity: sha512-bIcYg8dBL2k/ubc1JljZL5mfuJ3PX6VMLPJVy8puK7KbU0TszW6kgoj0x3ckqCfI5IlpuMvRuLyXjIFEtVCuyw==} + '@zag-js/tour@1.22.1': + resolution: {integrity: sha512-VhHC65NgBaCjlVsw1M4Me0P6PCtmD9oi9gRzN2fEUESdpM/QT5Yw6PAAPP1AEo5okv+V2rRBgSKOu9ZyYHa+IQ==} - '@zag-js/tree-view@1.21.7': - resolution: {integrity: sha512-OfzGcdO1sV4KU+GOlLYKSa92ryhmMKJeOfxjwaD+ursb86iBzZtThE7V9I+SV/X2jry0GBUJwgPwc6nTlDwuvw==} + '@zag-js/tree-view@1.22.1': + resolution: {integrity: sha512-AQmOn1mB+nLJEaq0xdSVnTI8Vt3nB3OweqdB12jkbdIOcWI9eY0RfhiNHC0k0mgAw+dMjyn84op/gOd9VVdtmA==} - '@zag-js/types@1.21.7': - resolution: {integrity: sha512-9LfflObSapy3SNiB2EX8bXjf0nqj/QJka7y3wftkXfNYI/U3urp7hL4d3MQlcChuu+NCxkpG3GnjkhCLFsWkHw==} + '@zag-js/types@1.22.1': + resolution: {integrity: sha512-lvpDSMR96e7H7TdwOiVpMzj6css5Ydix1nBi7BlmjME6v5OPR0KZwVDGD6h5UtTeVjPq8dPaqM8TJWw+QwbQSw==} - '@zag-js/utils@1.21.7': - resolution: {integrity: sha512-XARSLvc/W/3EGJ+q203ulcvFWCCebLu2wvBNZwSLtL1Zk/9TpmmPXye3/m6GYMeo5vVOrVM/qJ/653PnJFJSYw==} + '@zag-js/utils@1.22.1': + resolution: {integrity: sha512-VXY4gjHaTENHW+wjnKKENZ2jcaW0vnG2a5lYEMuZR4dpNCKH217yFr/bCNrI44y2s1W3LWhWmpEjfZluP6udYg==} acorn-import-phases@1.0.4: resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} @@ -3044,8 +3078,8 @@ packages: resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} engines: {node: '>=4'} - ast-v8-to-istanbul@0.3.4: - resolution: {integrity: sha512-cxrAnZNLBnQwBPByK4CeDaw5sWZtMilJE/Q3iDA0aamgaIVNDF9T6K2/8DfYDZEejZ2jNnDrG9m8MY72HFd0KA==} + ast-v8-to-istanbul@0.3.5: + resolution: {integrity: sha512-9SdXjNheSiE8bALAQCQQuT6fgQaoxJh7IRYrRGZ8/9nv8WhJeC1aXAwN8TbaOssGOukUvyvnkgD9+Yuykvl1aA==} astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} @@ -3117,8 +3151,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - browserslist@4.25.3: - resolution: {integrity: sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ==} + browserslist@4.25.4: + resolution: {integrity: sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3361,8 +3395,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.209: - resolution: {integrity: sha512-Xoz0uMrim9ZETCQt8UgM5FxQF9+imA7PBpokoGcZloA1uw2LeHzTlip5cb5KOAsXZLjh/moN2vReN3ZjJmjI9A==} + electron-to-chromium@1.5.211: + resolution: {integrity: sha512-IGBvimJkotaLzFnwIVgW9/UD/AOJ2tByUmeOrtqBfACSbAw5b1G0XpvdaieKyc7ULmbwXVx+4e4Be8pOPBrYkw==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -4476,8 +4510,8 @@ packages: react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc - next@15.5.0: - resolution: {integrity: sha512-N1lp9Hatw3a9XLt0307lGB4uTKsXDhyOKQo7uYMzX4i0nF/c27grcGXkLdb7VcT8QPYLBa8ouIyEoUQJ2OyeNQ==} + next@15.5.2: + resolution: {integrity: sha512-H8Otr7abj1glFhbGnvUt3gz++0AF1+QoCXEBmd/6aKbfdFwrn0LpA836Ed5+00va/7HQSDD+mOoVhn3tNy3e/Q==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: @@ -4896,8 +4930,8 @@ packages: peerDependencies: rollup: 2.x || 3.x || 4.x - rollup@4.48.1: - resolution: {integrity: sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==} + rollup@4.49.0: + resolution: {integrity: sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5558,68 +5592,69 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.30 - '@ark-ui/react@5.20.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@ark-ui/react@5.22.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@internationalized/date': 3.8.2 - '@zag-js/accordion': 1.21.7 - '@zag-js/anatomy': 1.21.7 - '@zag-js/angle-slider': 1.21.7 - '@zag-js/auto-resize': 1.21.7 - '@zag-js/avatar': 1.21.7 - '@zag-js/carousel': 1.21.7 - '@zag-js/checkbox': 1.21.7 - '@zag-js/clipboard': 1.21.7 - '@zag-js/collapsible': 1.21.7 - '@zag-js/collection': 1.21.7 - '@zag-js/color-picker': 1.21.7 - '@zag-js/color-utils': 1.21.7 - '@zag-js/combobox': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/date-picker': 1.21.7(@internationalized/date@3.8.2) - '@zag-js/date-utils': 1.21.7(@internationalized/date@3.8.2) - '@zag-js/dialog': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/editable': 1.21.7 - '@zag-js/file-upload': 1.21.7 - '@zag-js/file-utils': 1.21.7 - '@zag-js/floating-panel': 1.21.7 - '@zag-js/focus-trap': 1.21.7 - '@zag-js/highlight-word': 1.21.7 - '@zag-js/hover-card': 1.21.7 - '@zag-js/i18n-utils': 1.21.7 - '@zag-js/json-tree-utils': 1.21.7 - '@zag-js/listbox': 1.21.7 - '@zag-js/menu': 1.21.7 - '@zag-js/number-input': 1.21.7 - '@zag-js/pagination': 1.21.7 - '@zag-js/password-input': 1.21.7 - '@zag-js/pin-input': 1.21.7 - '@zag-js/popover': 1.21.7 - '@zag-js/presence': 1.21.7 - '@zag-js/progress': 1.21.7 - '@zag-js/qr-code': 1.21.7 - '@zag-js/radio-group': 1.21.7 - '@zag-js/rating-group': 1.21.7 - '@zag-js/react': 1.21.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@zag-js/scroll-area': 1.21.7 - '@zag-js/select': 1.21.7 - '@zag-js/signature-pad': 1.21.7 - '@zag-js/slider': 1.21.7 - '@zag-js/splitter': 1.21.7 - '@zag-js/steps': 1.21.7 - '@zag-js/switch': 1.21.7 - '@zag-js/tabs': 1.21.7 - '@zag-js/tags-input': 1.21.7 - '@zag-js/time-picker': 1.21.7(@internationalized/date@3.8.2) - '@zag-js/timer': 1.21.7 - '@zag-js/toast': 1.21.7 - '@zag-js/toggle': 1.21.7 - '@zag-js/toggle-group': 1.21.7 - '@zag-js/tooltip': 1.21.7 - '@zag-js/tour': 1.21.7 - '@zag-js/tree-view': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/accordion': 1.22.1 + '@zag-js/anatomy': 1.22.1 + '@zag-js/angle-slider': 1.22.1 + '@zag-js/async-list': 1.22.1 + '@zag-js/auto-resize': 1.22.1 + '@zag-js/avatar': 1.22.1 + '@zag-js/carousel': 1.22.1 + '@zag-js/checkbox': 1.22.1 + '@zag-js/clipboard': 1.22.1 + '@zag-js/collapsible': 1.22.1 + '@zag-js/collection': 1.22.1 + '@zag-js/color-picker': 1.22.1 + '@zag-js/color-utils': 1.22.1 + '@zag-js/combobox': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/date-picker': 1.22.1(@internationalized/date@3.8.2) + '@zag-js/date-utils': 1.22.1(@internationalized/date@3.8.2) + '@zag-js/dialog': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/editable': 1.22.1 + '@zag-js/file-upload': 1.22.1 + '@zag-js/file-utils': 1.22.1 + '@zag-js/floating-panel': 1.22.1 + '@zag-js/focus-trap': 1.22.1 + '@zag-js/highlight-word': 1.22.1 + '@zag-js/hover-card': 1.22.1 + '@zag-js/i18n-utils': 1.22.1 + '@zag-js/json-tree-utils': 1.22.1 + '@zag-js/listbox': 1.22.1 + '@zag-js/menu': 1.22.1 + '@zag-js/number-input': 1.22.1 + '@zag-js/pagination': 1.22.1 + '@zag-js/password-input': 1.22.1 + '@zag-js/pin-input': 1.22.1 + '@zag-js/popover': 1.22.1 + '@zag-js/presence': 1.22.1 + '@zag-js/progress': 1.22.1 + '@zag-js/qr-code': 1.22.1 + '@zag-js/radio-group': 1.22.1 + '@zag-js/rating-group': 1.22.1 + '@zag-js/react': 1.22.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@zag-js/scroll-area': 1.22.1 + '@zag-js/select': 1.22.1 + '@zag-js/signature-pad': 1.22.1 + '@zag-js/slider': 1.22.1 + '@zag-js/splitter': 1.22.1 + '@zag-js/steps': 1.22.1 + '@zag-js/switch': 1.22.1 + '@zag-js/tabs': 1.22.1 + '@zag-js/tags-input': 1.22.1 + '@zag-js/time-picker': 1.22.1(@internationalized/date@3.8.2) + '@zag-js/timer': 1.22.1 + '@zag-js/toast': 1.22.1 + '@zag-js/toggle': 1.22.1 + '@zag-js/toggle-group': 1.22.1 + '@zag-js/tooltip': 1.22.1 + '@zag-js/tour': 1.22.1 + '@zag-js/tree-view': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 react: 19.1.1 react-dom: 19.1.1(react@19.1.1) @@ -5667,7 +5702,7 @@ snapshots: dependencies: '@babel/compat-data': 7.28.0 '@babel/helper-validator-option': 7.27.1 - browserslist: 4.25.3 + browserslist: 4.25.4 lru-cache: 5.1.1 semver: 6.3.1 @@ -6362,11 +6397,11 @@ snapshots: '@bcoe/v8-coverage@1.0.2': {} - '@chakra-ui/react@3.25.0(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@chakra-ui/react@3.26.0(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: - '@ark-ui/react': 5.20.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@ark-ui/react': 5.22.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@emotion/is-prop-valid': 1.3.1 - '@emotion/react': 11.14.0(@types/react@19.1.11)(react@19.1.1) + '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) '@emotion/serialize': 1.3.3 '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.1.1) '@emotion/utils': 1.4.2 @@ -6520,18 +6555,18 @@ snapshots: human-id: 4.1.1 prettier: 2.8.8 - '@emnapi/core@1.4.5': + '@emnapi/core@1.5.0': dependencies: - '@emnapi/wasi-threads': 1.0.4 + '@emnapi/wasi-threads': 1.1.0 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.4.5': + '@emnapi/runtime@1.5.0': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.0.4': + '@emnapi/wasi-threads@1.1.0': dependencies: tslib: 2.8.1 optional: true @@ -6568,7 +6603,7 @@ snapshots: '@emotion/memoize@0.9.0': {} - '@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1)': + '@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@emotion/babel-plugin': 11.13.5 @@ -6580,7 +6615,7 @@ snapshots: hoist-non-react-statics: 3.3.2 react: 19.1.1 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 transitivePeerDependencies: - supports-color @@ -6594,18 +6629,18 @@ snapshots: '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1)': + '@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@emotion/babel-plugin': 11.13.5 '@emotion/is-prop-valid': 1.3.1 - '@emotion/react': 11.14.0(@types/react@19.1.11)(react@19.1.1) + '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) '@emotion/serialize': 1.3.3 '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.1.1) '@emotion/utils': 1.4.2 react: 19.1.1 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 transitivePeerDependencies: - supports-color @@ -6811,7 +6846,7 @@ snapshots: dependencies: '@floating-ui/utils': 0.2.10 - '@floating-ui/dom@1.7.3': + '@floating-ui/dom@1.7.4': dependencies: '@floating-ui/core': 1.7.3 '@floating-ui/utils': 0.2.10 @@ -6905,7 +6940,7 @@ snapshots: '@img/sharp-wasm32@0.34.3': dependencies: - '@emnapi/runtime': 1.4.5 + '@emnapi/runtime': 1.5.0 optional: true '@img/sharp-win32-arm64@0.34.3': @@ -6977,10 +7012,10 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@kuma-ui/babel-plugin@1.2.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': + '@kuma-ui/babel-plugin@1.2.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': dependencies: '@babel/core': 7.28.3 - '@kuma-ui/core': 1.5.9(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + '@kuma-ui/core': 1.5.9(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) '@kuma-ui/sheet': 1.3.1 '@kuma-ui/system': 1.7.6 transitivePeerDependencies: @@ -6989,11 +7024,11 @@ snapshots: - react - supports-color - '@kuma-ui/compiler@1.3.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': + '@kuma-ui/compiler@1.3.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': dependencies: '@babel/core': 7.28.3 - '@kuma-ui/babel-plugin': 1.2.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - '@kuma-ui/core': 1.5.9(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + '@kuma-ui/babel-plugin': 1.2.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + '@kuma-ui/core': 1.5.9(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) '@kuma-ui/sheet': 1.3.1 '@kuma-ui/system': 1.7.6 '@kuma-ui/wasm': 1.0.3 @@ -7004,7 +7039,7 @@ snapshots: - react - supports-color - '@kuma-ui/core@1.5.9(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': + '@kuma-ui/core@1.5.9(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': dependencies: '@kuma-ui/sheet': 1.3.1 '@kuma-ui/system': 1.7.6 @@ -7012,23 +7047,23 @@ snapshots: react: 19.1.1 stylis: 4.3.6 optionalDependencies: - '@types/react': 19.1.11 - next: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@types/react': 19.1.12 + next: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@kuma-ui/next-plugin@1.3.3(@babel/core@7.28.3)(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3)': + '@kuma-ui/next-plugin@1.3.3(@babel/core@7.28.3)(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3)': dependencies: '@babel/preset-env': 7.28.3(@babel/core@7.28.3) '@babel/preset-react': 7.27.1(@babel/core@7.28.3) '@babel/preset-typescript': 7.27.1(@babel/core@7.28.3) - '@kuma-ui/core': 1.5.9(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - '@kuma-ui/webpack-plugin': 1.4.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3) + '@kuma-ui/core': 1.5.9(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + '@kuma-ui/webpack-plugin': 1.4.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3) babel-loader: 9.2.1(@babel/core@7.28.3)(webpack@5.101.3) browserslist: 4.21.5 - next: 15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + next: 15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 webpack: 5.101.3 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 transitivePeerDependencies: - '@babel/core' - supports-color @@ -7044,9 +7079,9 @@ snapshots: '@kuma-ui/wasm@1.0.3': {} - '@kuma-ui/webpack-plugin@1.4.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3)': + '@kuma-ui/webpack-plugin@1.4.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(webpack@5.101.3)': dependencies: - '@kuma-ui/compiler': 1.3.3(@types/react@19.1.11)(next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + '@kuma-ui/compiler': 1.3.3(@types/react@19.1.12)(next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) '@kuma-ui/sheet': 1.3.1 '@kuma-ui/system': 1.7.6 esbuild: 0.18.20 @@ -7114,10 +7149,10 @@ snapshots: - acorn - supports-color - '@mdx-js/react@3.1.0(@types/react@19.1.11)(react@19.1.1)': + '@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1)': dependencies: '@types/mdx': 2.0.13 - '@types/react': 19.1.11 + '@types/react': 19.1.12 react: 19.1.1 '@microsoft/api-extractor-model@7.30.7(@types/node@24.3.0)': @@ -7155,42 +7190,42 @@ snapshots: '@microsoft/tsdoc@0.15.1': {} - '@module-federation/error-codes@0.17.1': {} + '@module-federation/error-codes@0.18.0': {} - '@module-federation/runtime-core@0.17.1': + '@module-federation/runtime-core@0.18.0': dependencies: - '@module-federation/error-codes': 0.17.1 - '@module-federation/sdk': 0.17.1 + '@module-federation/error-codes': 0.18.0 + '@module-federation/sdk': 0.18.0 - '@module-federation/runtime-tools@0.17.1': + '@module-federation/runtime-tools@0.18.0': dependencies: - '@module-federation/runtime': 0.17.1 - '@module-federation/webpack-bundler-runtime': 0.17.1 + '@module-federation/runtime': 0.18.0 + '@module-federation/webpack-bundler-runtime': 0.18.0 - '@module-federation/runtime@0.17.1': + '@module-federation/runtime@0.18.0': dependencies: - '@module-federation/error-codes': 0.17.1 - '@module-federation/runtime-core': 0.17.1 - '@module-federation/sdk': 0.17.1 + '@module-federation/error-codes': 0.18.0 + '@module-federation/runtime-core': 0.18.0 + '@module-federation/sdk': 0.18.0 - '@module-federation/sdk@0.17.1': {} + '@module-federation/sdk@0.18.0': {} - '@module-federation/webpack-bundler-runtime@0.17.1': + '@module-federation/webpack-bundler-runtime@0.18.0': dependencies: - '@module-federation/runtime': 0.17.1 - '@module-federation/sdk': 0.17.1 + '@module-federation/runtime': 0.18.0 + '@module-federation/sdk': 0.18.0 '@mui/core-downloads-tracker@7.3.1': {} - '@mui/material@7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@mui/material@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@mui/core-downloads-tracker': 7.3.1 - '@mui/system': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1) - '@mui/types': 7.4.5(@types/react@19.1.11) - '@mui/utils': 7.3.1(@types/react@19.1.11)(react@19.1.1) + '@mui/system': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) + '@mui/types': 7.4.5(@types/react@19.1.12) + '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) '@popperjs/core': 2.11.8 - '@types/react-transition-group': 4.4.12(@types/react@19.1.11) + '@types/react-transition-group': 4.4.12(@types/react@19.1.12) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 @@ -7199,20 +7234,20 @@ snapshots: react-is: 19.1.1 react-transition-group: 4.4.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.1.11)(react@19.1.1) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1) - '@types/react': 19.1.11 + '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) + '@types/react': 19.1.12 - '@mui/private-theming@7.3.1(@types/react@19.1.11)(react@19.1.1)': + '@mui/private-theming@7.3.1(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/utils': 7.3.1(@types/react@19.1.11)(react@19.1.1) + '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) prop-types: 15.8.1 react: 19.1.1 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 - '@mui/styled-engine@7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(react@19.1.1)': + '@mui/styled-engine@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@emotion/cache': 11.14.0 @@ -7222,81 +7257,81 @@ snapshots: prop-types: 15.8.1 react: 19.1.1 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.1.11)(react@19.1.1) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1) + '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) - '@mui/system@7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1)': + '@mui/system@7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/private-theming': 7.3.1(@types/react@19.1.11)(react@19.1.1) - '@mui/styled-engine': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1))(react@19.1.1) - '@mui/types': 7.4.5(@types/react@19.1.11) - '@mui/utils': 7.3.1(@types/react@19.1.11)(react@19.1.1) + '@mui/private-theming': 7.3.1(@types/react@19.1.12)(react@19.1.1) + '@mui/styled-engine': 7.3.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@emotion/styled@11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1))(react@19.1.1) + '@mui/types': 7.4.5(@types/react@19.1.12) + '@mui/utils': 7.3.1(@types/react@19.1.12)(react@19.1.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 react: 19.1.1 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.1.11)(react@19.1.1) - '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.11)(react@19.1.1))(@types/react@19.1.11)(react@19.1.1) - '@types/react': 19.1.11 + '@emotion/react': 11.14.0(@types/react@19.1.12)(react@19.1.1) + '@emotion/styled': 11.14.1(@emotion/react@11.14.0(@types/react@19.1.12)(react@19.1.1))(@types/react@19.1.12)(react@19.1.1) + '@types/react': 19.1.12 - '@mui/types@7.4.5(@types/react@19.1.11)': + '@mui/types@7.4.5(@types/react@19.1.12)': dependencies: '@babel/runtime': 7.28.3 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 - '@mui/utils@7.3.1(@types/react@19.1.11)(react@19.1.1)': + '@mui/utils@7.3.1(@types/react@19.1.12)(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 - '@mui/types': 7.4.5(@types/react@19.1.11) + '@mui/types': 7.4.5(@types/react@19.1.12) '@types/prop-types': 15.7.15 clsx: 2.1.1 prop-types: 15.8.1 react: 19.1.1 react-is: 19.1.1 optionalDependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 '@napi-rs/wasm-runtime@1.0.3': dependencies: - '@emnapi/core': 1.4.5 - '@emnapi/runtime': 1.4.5 + '@emnapi/core': 1.5.0 + '@emnapi/runtime': 1.5.0 '@tybys/wasm-util': 0.10.0 optional: true - '@next/env@15.5.0': {} + '@next/env@15.5.2': {} - '@next/mdx@15.5.0(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.11)(react@19.1.1))': + '@next/mdx@15.5.2(@mdx-js/loader@3.1.0(acorn@8.15.0)(webpack@5.101.3))(@mdx-js/react@3.1.0(@types/react@19.1.12)(react@19.1.1))': dependencies: source-map: 0.7.6 optionalDependencies: '@mdx-js/loader': 3.1.0(acorn@8.15.0)(webpack@5.101.3) - '@mdx-js/react': 3.1.0(@types/react@19.1.11)(react@19.1.1) + '@mdx-js/react': 3.1.0(@types/react@19.1.12)(react@19.1.1) - '@next/swc-darwin-arm64@15.5.0': + '@next/swc-darwin-arm64@15.5.2': optional: true - '@next/swc-darwin-x64@15.5.0': + '@next/swc-darwin-x64@15.5.2': optional: true - '@next/swc-linux-arm64-gnu@15.5.0': + '@next/swc-linux-arm64-gnu@15.5.2': optional: true - '@next/swc-linux-arm64-musl@15.5.0': + '@next/swc-linux-arm64-musl@15.5.2': optional: true - '@next/swc-linux-x64-gnu@15.5.0': + '@next/swc-linux-x64-gnu@15.5.2': optional: true - '@next/swc-linux-x64-musl@15.5.0': + '@next/swc-linux-x64-musl@15.5.2': optional: true - '@next/swc-win32-arm64-msvc@15.5.0': + '@next/swc-win32-arm64-msvc@15.5.2': optional: true - '@next/swc-win32-x64-msvc@15.5.0': + '@next/swc-win32-x64-msvc@15.5.2': optional: true '@nodelib/fs.scandir@2.1.5': @@ -7320,148 +7355,148 @@ snapshots: '@popperjs/core@2.11.8': {} - '@rolldown/pluginutils@1.0.0-beta.32': {} + '@rolldown/pluginutils@1.0.0-beta.34': {} - '@rollup/pluginutils@5.2.0(rollup@4.48.1)': + '@rollup/pluginutils@5.2.0(rollup@4.49.0)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: - rollup: 4.48.1 + rollup: 4.49.0 - '@rollup/rollup-android-arm-eabi@4.48.1': + '@rollup/rollup-android-arm-eabi@4.49.0': optional: true - '@rollup/rollup-android-arm64@4.48.1': + '@rollup/rollup-android-arm64@4.49.0': optional: true - '@rollup/rollup-darwin-arm64@4.48.1': + '@rollup/rollup-darwin-arm64@4.49.0': optional: true - '@rollup/rollup-darwin-x64@4.48.1': + '@rollup/rollup-darwin-x64@4.49.0': optional: true - '@rollup/rollup-freebsd-arm64@4.48.1': + '@rollup/rollup-freebsd-arm64@4.49.0': optional: true - '@rollup/rollup-freebsd-x64@4.48.1': + '@rollup/rollup-freebsd-x64@4.49.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': + '@rollup/rollup-linux-arm-gnueabihf@4.49.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.48.1': + '@rollup/rollup-linux-arm-musleabihf@4.49.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.48.1': + '@rollup/rollup-linux-arm64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.48.1': + '@rollup/rollup-linux-arm64-musl@4.49.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': + '@rollup/rollup-linux-loongarch64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.48.1': + '@rollup/rollup-linux-ppc64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.48.1': + '@rollup/rollup-linux-riscv64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.48.1': + '@rollup/rollup-linux-riscv64-musl@4.49.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.48.1': + '@rollup/rollup-linux-s390x-gnu@4.49.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.48.1': + '@rollup/rollup-linux-x64-gnu@4.49.0': optional: true - '@rollup/rollup-linux-x64-musl@4.48.1': + '@rollup/rollup-linux-x64-musl@4.49.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.48.1': + '@rollup/rollup-win32-arm64-msvc@4.49.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.48.1': + '@rollup/rollup-win32-ia32-msvc@4.49.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.48.1': + '@rollup/rollup-win32-x64-msvc@4.49.0': optional: true - '@rsbuild/core@1.4.16': + '@rsbuild/core@1.5.1': dependencies: - '@rspack/core': 1.4.11(@swc/helpers@0.5.17) + '@rspack/core': 1.5.0(@swc/helpers@0.5.17) '@rspack/lite-tapable': 1.0.1 '@swc/helpers': 0.5.17 core-js: 3.45.1 jiti: 2.5.1 - '@rsbuild/plugin-react@1.3.5(@rsbuild/core@1.4.16)': + '@rsbuild/plugin-react@1.4.0(@rsbuild/core@1.5.1)': dependencies: - '@rsbuild/core': 1.4.16 - '@rspack/plugin-react-refresh': 1.4.3(react-refresh@0.17.0) + '@rsbuild/core': 1.5.1 + '@rspack/plugin-react-refresh': 1.5.0(react-refresh@0.17.0) react-refresh: 0.17.0 transitivePeerDependencies: - webpack-hot-middleware - '@rspack/binding-darwin-arm64@1.4.11': + '@rspack/binding-darwin-arm64@1.5.0': optional: true - '@rspack/binding-darwin-x64@1.4.11': + '@rspack/binding-darwin-x64@1.5.0': optional: true - '@rspack/binding-linux-arm64-gnu@1.4.11': + '@rspack/binding-linux-arm64-gnu@1.5.0': optional: true - '@rspack/binding-linux-arm64-musl@1.4.11': + '@rspack/binding-linux-arm64-musl@1.5.0': optional: true - '@rspack/binding-linux-x64-gnu@1.4.11': + '@rspack/binding-linux-x64-gnu@1.5.0': optional: true - '@rspack/binding-linux-x64-musl@1.4.11': + '@rspack/binding-linux-x64-musl@1.5.0': optional: true - '@rspack/binding-wasm32-wasi@1.4.11': + '@rspack/binding-wasm32-wasi@1.5.0': dependencies: '@napi-rs/wasm-runtime': 1.0.3 optional: true - '@rspack/binding-win32-arm64-msvc@1.4.11': + '@rspack/binding-win32-arm64-msvc@1.5.0': optional: true - '@rspack/binding-win32-ia32-msvc@1.4.11': + '@rspack/binding-win32-ia32-msvc@1.5.0': optional: true - '@rspack/binding-win32-x64-msvc@1.4.11': + '@rspack/binding-win32-x64-msvc@1.5.0': optional: true - '@rspack/binding@1.4.11': + '@rspack/binding@1.5.0': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.4.11 - '@rspack/binding-darwin-x64': 1.4.11 - '@rspack/binding-linux-arm64-gnu': 1.4.11 - '@rspack/binding-linux-arm64-musl': 1.4.11 - '@rspack/binding-linux-x64-gnu': 1.4.11 - '@rspack/binding-linux-x64-musl': 1.4.11 - '@rspack/binding-wasm32-wasi': 1.4.11 - '@rspack/binding-win32-arm64-msvc': 1.4.11 - '@rspack/binding-win32-ia32-msvc': 1.4.11 - '@rspack/binding-win32-x64-msvc': 1.4.11 - - '@rspack/core@1.4.11(@swc/helpers@0.5.17)': - dependencies: - '@module-federation/runtime-tools': 0.17.1 - '@rspack/binding': 1.4.11 + '@rspack/binding-darwin-arm64': 1.5.0 + '@rspack/binding-darwin-x64': 1.5.0 + '@rspack/binding-linux-arm64-gnu': 1.5.0 + '@rspack/binding-linux-arm64-musl': 1.5.0 + '@rspack/binding-linux-x64-gnu': 1.5.0 + '@rspack/binding-linux-x64-musl': 1.5.0 + '@rspack/binding-wasm32-wasi': 1.5.0 + '@rspack/binding-win32-arm64-msvc': 1.5.0 + '@rspack/binding-win32-ia32-msvc': 1.5.0 + '@rspack/binding-win32-x64-msvc': 1.5.0 + + '@rspack/core@1.5.0(@swc/helpers@0.5.17)': + dependencies: + '@module-federation/runtime-tools': 0.18.0 + '@rspack/binding': 1.5.0 '@rspack/lite-tapable': 1.0.1 optionalDependencies: '@swc/helpers': 0.5.17 '@rspack/lite-tapable@1.0.1': {} - '@rspack/plugin-react-refresh@1.4.3(react-refresh@0.17.0)': + '@rspack/plugin-react-refresh@1.5.0(react-refresh@0.17.0)': dependencies: error-stack-parser: 2.1.4 html-entities: 2.6.0 @@ -7501,9 +7536,9 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@storybook/addon-docs@9.1.3(@types/react@19.1.11)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': + '@storybook/addon-docs@9.1.3(@types/react@19.1.12)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.1.11)(react@19.1.1) + '@mdx-js/react': 3.1.0(@types/react@19.1.12)(react@19.1.1) '@storybook/csf-plugin': 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) '@storybook/icons': 1.4.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@storybook/react-dom-shim': 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))) @@ -7543,10 +7578,10 @@ snapshots: react-dom: 19.1.1(react@19.1.1) storybook: 9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) - '@storybook/react-vite@9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.48.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@storybook/react-vite@9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rollup@4.49.0)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': dependencies: '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.1(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) - '@rollup/pluginutils': 5.2.0(rollup@4.48.1) + '@rollup/pluginutils': 5.2.0(rollup@4.49.0) '@storybook/builder-vite': 9.1.3(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)) '@storybook/react': 9.1.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(storybook@9.1.3(@testing-library/dom@10.4.1)(prettier@3.6.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)))(typescript@5.9.2) find-up: 7.0.0 @@ -7609,15 +7644,15 @@ snapshots: picocolors: 1.1.1 redent: 3.0.0 - '@testing-library/react@16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.1.8(@types/react@19.1.11))(@types/react@19.1.11)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@testing-library/react@16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@babel/runtime': 7.28.3 '@testing-library/dom': 10.4.1 react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.11 - '@types/react-dom': 19.1.8(@types/react@19.1.11) + '@types/react': 19.1.12 + '@types/react-dom': 19.1.9(@types/react@19.1.12) '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.1)': dependencies: @@ -7722,19 +7757,19 @@ snapshots: '@types/prop-types@15.7.15': {} - '@types/react-dom@19.1.8(@types/react@19.1.11)': + '@types/react-dom@19.1.9(@types/react@19.1.12)': dependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 '@types/react-syntax-highlighter@15.5.13': dependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 - '@types/react-transition-group@4.4.12(@types/react@19.1.11)': + '@types/react-transition-group@4.4.12(@types/react@19.1.12)': dependencies: - '@types/react': 19.1.11 + '@types/react': 19.1.12 - '@types/react@19.1.11': + '@types/react@19.1.12': dependencies: csstype: 3.1.3 @@ -7854,12 +7889,12 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@vitejs/plugin-react@5.0.1(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': + '@vitejs/plugin-react@5.0.2(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1))': dependencies: '@babel/core': 7.28.3 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.3) '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.3) - '@rolldown/pluginutils': 1.0.0-beta.32 + '@rolldown/pluginutils': 1.0.0-beta.34 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 vite: 6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1) @@ -7870,7 +7905,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 - ast-v8-to-istanbul: 0.3.4 + ast-v8-to-istanbul: 0.3.5 debug: 4.4.1 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -8052,514 +8087,518 @@ snapshots: '@xtuc/long@4.2.2': {} - '@zag-js/accordion@1.21.7': + '@zag-js/accordion@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/anatomy@1.21.7': {} + '@zag-js/anatomy@1.22.1': {} - '@zag-js/angle-slider@1.21.7': + '@zag-js/angle-slider@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/rect-utils': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/rect-utils': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/aria-hidden@1.22.1': {} - '@zag-js/aria-hidden@1.21.7': {} + '@zag-js/async-list@1.22.1': + dependencies: + '@zag-js/core': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/auto-resize@1.21.7': + '@zag-js/auto-resize@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/avatar@1.21.7': + '@zag-js/avatar@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/carousel@1.21.7': + '@zag-js/carousel@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/scroll-snap': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/scroll-snap': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/checkbox@1.21.7': + '@zag-js/checkbox@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-visible': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-visible': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/clipboard@1.21.7': + '@zag-js/clipboard@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/collapsible@1.21.7': + '@zag-js/collapsible@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/collection@1.21.7': + '@zag-js/collection@1.22.1': dependencies: - '@zag-js/utils': 1.21.7 + '@zag-js/utils': 1.22.1 - '@zag-js/color-picker@1.21.7': + '@zag-js/color-picker@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/color-utils': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/color-utils': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/color-utils@1.21.7': + '@zag-js/color-utils@1.22.1': dependencies: - '@zag-js/utils': 1.21.7 + '@zag-js/utils': 1.22.1 - '@zag-js/combobox@1.21.7': + '@zag-js/combobox@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/aria-hidden': 1.21.7 - '@zag-js/collection': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/aria-hidden': 1.22.1 + '@zag-js/collection': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/core@1.21.7': + '@zag-js/core@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/dom-query': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/date-picker@1.21.7(@internationalized/date@3.8.2)': + '@zag-js/date-picker@1.22.1(@internationalized/date@3.8.2)': dependencies: '@internationalized/date': 3.8.2 - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/date-utils': 1.21.7(@internationalized/date@3.8.2) - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/live-region': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/date-utils@1.21.7(@internationalized/date@3.8.2)': + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/date-utils': 1.22.1(@internationalized/date@3.8.2) + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/live-region': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/date-utils@1.22.1(@internationalized/date@3.8.2)': dependencies: '@internationalized/date': 3.8.2 - '@zag-js/dialog@1.21.7': + '@zag-js/dialog@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/aria-hidden': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-trap': 1.21.7 - '@zag-js/remove-scroll': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/aria-hidden': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-trap': 1.22.1 + '@zag-js/remove-scroll': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/dismissable@1.21.7': + '@zag-js/dismissable@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 - '@zag-js/interact-outside': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/dom-query': 1.22.1 + '@zag-js/interact-outside': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/dom-query@1.21.7': + '@zag-js/dom-query@1.22.1': dependencies: - '@zag-js/types': 1.21.7 + '@zag-js/types': 1.22.1 - '@zag-js/editable@1.21.7': + '@zag-js/editable@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/interact-outside': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/interact-outside': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/file-upload@1.21.7': + '@zag-js/file-upload@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/file-utils': 1.21.7 - '@zag-js/i18n-utils': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/file-utils': 1.22.1 + '@zag-js/i18n-utils': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/file-utils@1.21.7': + '@zag-js/file-utils@1.22.1': dependencies: - '@zag-js/i18n-utils': 1.21.7 + '@zag-js/i18n-utils': 1.22.1 - '@zag-js/floating-panel@1.21.7': + '@zag-js/floating-panel@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/rect-utils': 1.21.7 - '@zag-js/store': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/rect-utils': 1.22.1 + '@zag-js/store': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/focus-trap@1.21.7': + '@zag-js/focus-trap@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/focus-visible@1.21.7': + '@zag-js/focus-visible@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/highlight-word@1.21.7': {} + '@zag-js/highlight-word@1.22.1': {} - '@zag-js/hover-card@1.21.7': + '@zag-js/hover-card@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/i18n-utils@1.21.7': + '@zag-js/i18n-utils@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/interact-outside@1.21.7': + '@zag-js/interact-outside@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/dom-query': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/json-tree-utils@1.21.7': {} + '@zag-js/json-tree-utils@1.22.1': {} - '@zag-js/listbox@1.21.7': + '@zag-js/listbox@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/collection': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-visible': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/collection': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-visible': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/live-region@1.21.7': {} + '@zag-js/live-region@1.22.1': {} - '@zag-js/menu@1.21.7': + '@zag-js/menu@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/rect-utils': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/rect-utils': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/number-input@1.21.7': + '@zag-js/number-input@1.22.1': dependencies: '@internationalized/number': 3.6.4 - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/pagination@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/password-input@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/pin-input@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/popover@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/aria-hidden': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-trap': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/remove-scroll': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/popper@1.21.7': - dependencies: - '@floating-ui/dom': 1.7.3 - '@zag-js/dom-query': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/presence@1.21.7': - dependencies: - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - - '@zag-js/progress@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/qr-code@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/pagination@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/password-input@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/pin-input@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/popover@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/aria-hidden': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-trap': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/remove-scroll': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/popper@1.22.1': + dependencies: + '@floating-ui/dom': 1.7.4 + '@zag-js/dom-query': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/presence@1.22.1': + dependencies: + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + + '@zag-js/progress@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/qr-code@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 proxy-memoize: 3.0.1 uqr: 0.1.2 - '@zag-js/radio-group@1.21.7': + '@zag-js/radio-group@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-visible': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-visible': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/rating-group@1.21.7': + '@zag-js/rating-group@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/react@1.21.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@zag-js/react@1.22.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: - '@zag-js/core': 1.21.7 - '@zag-js/store': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/core': 1.22.1 + '@zag-js/store': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@zag-js/rect-utils@1.21.7': {} + '@zag-js/rect-utils@1.22.1': {} - '@zag-js/remove-scroll@1.21.7': + '@zag-js/remove-scroll@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/scroll-area@1.21.7': + '@zag-js/scroll-area@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/scroll-snap@1.21.7': + '@zag-js/scroll-snap@1.22.1': dependencies: - '@zag-js/dom-query': 1.21.7 + '@zag-js/dom-query': 1.22.1 - '@zag-js/select@1.21.7': + '@zag-js/select@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/collection': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/collection': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/signature-pad@1.21.7': + '@zag-js/signature-pad@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 perfect-freehand: 1.2.2 - '@zag-js/slider@1.21.7': + '@zag-js/slider@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/splitter@1.21.7': + '@zag-js/splitter@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/steps@1.21.7': + '@zag-js/steps@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/store@1.21.7': + '@zag-js/store@1.22.1': dependencies: proxy-compare: 3.0.1 - '@zag-js/switch@1.21.7': + '@zag-js/switch@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-visible': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-visible': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/tabs@1.21.7': + '@zag-js/tabs@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/tags-input@1.21.7': + '@zag-js/tags-input@1.22.1': dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/auto-resize': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/interact-outside': 1.21.7 - '@zag-js/live-region': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 + '@zag-js/anatomy': 1.22.1 + '@zag-js/auto-resize': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/interact-outside': 1.22.1 + '@zag-js/live-region': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 - '@zag-js/time-picker@1.21.7(@internationalized/date@3.8.2)': + '@zag-js/time-picker@1.22.1(@internationalized/date@3.8.2)': dependencies: '@internationalized/date': 3.8.2 - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/timer@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/toast@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/toggle-group@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/toggle@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/tooltip@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-visible': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/store': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/tour@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dismissable': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/focus-trap': 1.21.7 - '@zag-js/interact-outside': 1.21.7 - '@zag-js/popper': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/tree-view@1.21.7': - dependencies: - '@zag-js/anatomy': 1.21.7 - '@zag-js/collection': 1.21.7 - '@zag-js/core': 1.21.7 - '@zag-js/dom-query': 1.21.7 - '@zag-js/types': 1.21.7 - '@zag-js/utils': 1.21.7 - - '@zag-js/types@1.21.7': + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/timer@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/toast@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/toggle-group@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/toggle@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/tooltip@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-visible': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/tour@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dismissable': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/focus-trap': 1.22.1 + '@zag-js/interact-outside': 1.22.1 + '@zag-js/popper': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/tree-view@1.22.1': + dependencies: + '@zag-js/anatomy': 1.22.1 + '@zag-js/collection': 1.22.1 + '@zag-js/core': 1.22.1 + '@zag-js/dom-query': 1.22.1 + '@zag-js/types': 1.22.1 + '@zag-js/utils': 1.22.1 + + '@zag-js/types@1.22.1': dependencies: csstype: 3.1.3 - '@zag-js/utils@1.21.7': {} + '@zag-js/utils@1.22.1': {} acorn-import-phases@1.0.4(acorn@8.15.0): dependencies: @@ -8709,7 +8748,7 @@ snapshots: dependencies: tslib: 2.8.1 - ast-v8-to-istanbul@0.3.4: + ast-v8-to-istanbul@0.3.5: dependencies: '@jridgewell/trace-mapping': 0.3.30 estree-walker: 3.0.3 @@ -8790,16 +8829,16 @@ snapshots: browserslist@4.21.5: dependencies: caniuse-lite: 1.0.30001737 - electron-to-chromium: 1.5.209 + electron-to-chromium: 1.5.211 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.21.5) - browserslist@4.25.3: + browserslist@4.25.4: dependencies: caniuse-lite: 1.0.30001737 - electron-to-chromium: 1.5.209 + electron-to-chromium: 1.5.211 node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.25.3) + update-browserslist-db: 1.1.3(browserslist@4.25.4) buffer-from@1.1.2: {} @@ -8911,7 +8950,7 @@ snapshots: core-js-compat@3.45.1: dependencies: - browserslist: 4.25.3 + browserslist: 4.25.4 core-js@3.45.1: {} @@ -9019,7 +9058,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.209: {} + electron-to-chromium@1.5.211: {} emoji-regex@8.0.0: {} @@ -10587,9 +10626,9 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - next@15.5.0(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.5.2(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: - '@next/env': 15.5.0 + '@next/env': 15.5.2 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001737 postcss: 8.4.31 @@ -10597,14 +10636,14 @@ snapshots: react-dom: 19.1.1(react@19.1.1) styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) optionalDependencies: - '@next/swc-darwin-arm64': 15.5.0 - '@next/swc-darwin-x64': 15.5.0 - '@next/swc-linux-arm64-gnu': 15.5.0 - '@next/swc-linux-arm64-musl': 15.5.0 - '@next/swc-linux-x64-gnu': 15.5.0 - '@next/swc-linux-x64-musl': 15.5.0 - '@next/swc-win32-arm64-msvc': 15.5.0 - '@next/swc-win32-x64-msvc': 15.5.0 + '@next/swc-darwin-arm64': 15.5.2 + '@next/swc-darwin-x64': 15.5.2 + '@next/swc-linux-arm64-gnu': 15.5.2 + '@next/swc-linux-arm64-musl': 15.5.2 + '@next/swc-linux-x64-gnu': 15.5.2 + '@next/swc-linux-x64-musl': 15.5.2 + '@next/swc-win32-arm64-msvc': 15.5.2 + '@next/swc-win32-x64-msvc': 15.5.2 sharp: 0.34.3 transitivePeerDependencies: - '@babel/core' @@ -10887,11 +10926,11 @@ snapshots: react-is@19.1.1: {} - react-markdown@10.1.0(@types/react@19.1.11)(react@19.1.1): + react-markdown@10.1.0(@types/react@19.1.12)(react@19.1.1): dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - '@types/react': 19.1.11 + '@types/react': 19.1.12 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.6 html-url-attributes: 3.0.1 @@ -11104,36 +11143,36 @@ snapshots: reusify@1.1.0: {} - rollup-plugin-preserve-directives@0.4.0(rollup@4.48.1): + rollup-plugin-preserve-directives@0.4.0(rollup@4.49.0): dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.48.1) + '@rollup/pluginutils': 5.2.0(rollup@4.49.0) magic-string: 0.30.18 - rollup: 4.48.1 + rollup: 4.49.0 - rollup@4.48.1: + rollup@4.49.0: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.48.1 - '@rollup/rollup-android-arm64': 4.48.1 - '@rollup/rollup-darwin-arm64': 4.48.1 - '@rollup/rollup-darwin-x64': 4.48.1 - '@rollup/rollup-freebsd-arm64': 4.48.1 - '@rollup/rollup-freebsd-x64': 4.48.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.48.1 - '@rollup/rollup-linux-arm-musleabihf': 4.48.1 - '@rollup/rollup-linux-arm64-gnu': 4.48.1 - '@rollup/rollup-linux-arm64-musl': 4.48.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.48.1 - '@rollup/rollup-linux-ppc64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-musl': 4.48.1 - '@rollup/rollup-linux-s390x-gnu': 4.48.1 - '@rollup/rollup-linux-x64-gnu': 4.48.1 - '@rollup/rollup-linux-x64-musl': 4.48.1 - '@rollup/rollup-win32-arm64-msvc': 4.48.1 - '@rollup/rollup-win32-ia32-msvc': 4.48.1 - '@rollup/rollup-win32-x64-msvc': 4.48.1 + '@rollup/rollup-android-arm-eabi': 4.49.0 + '@rollup/rollup-android-arm64': 4.49.0 + '@rollup/rollup-darwin-arm64': 4.49.0 + '@rollup/rollup-darwin-x64': 4.49.0 + '@rollup/rollup-freebsd-arm64': 4.49.0 + '@rollup/rollup-freebsd-x64': 4.49.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.49.0 + '@rollup/rollup-linux-arm-musleabihf': 4.49.0 + '@rollup/rollup-linux-arm64-gnu': 4.49.0 + '@rollup/rollup-linux-arm64-musl': 4.49.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.49.0 + '@rollup/rollup-linux-ppc64-gnu': 4.49.0 + '@rollup/rollup-linux-riscv64-gnu': 4.49.0 + '@rollup/rollup-linux-riscv64-musl': 4.49.0 + '@rollup/rollup-linux-s390x-gnu': 4.49.0 + '@rollup/rollup-linux-x64-gnu': 4.49.0 + '@rollup/rollup-linux-x64-musl': 4.49.0 + '@rollup/rollup-win32-arm64-msvc': 4.49.0 + '@rollup/rollup-win32-ia32-msvc': 4.49.0 + '@rollup/rollup-win32-x64-msvc': 4.49.0 fsevents: 2.3.3 run-parallel@1.2.0: @@ -11660,9 +11699,9 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - update-browserslist-db@1.1.3(browserslist@4.25.3): + update-browserslist-db@1.1.3(browserslist@4.25.4): dependencies: - browserslist: 4.25.3 + browserslist: 4.25.4 escalade: 3.2.0 picocolors: 1.1.1 @@ -11703,10 +11742,10 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.5.4(@types/node@24.3.0)(rollup@4.48.1)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)): + vite-plugin-dts@4.5.4(@types/node@24.3.0)(rollup@4.49.0)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)): dependencies: '@microsoft/api-extractor': 7.52.11(@types/node@24.3.0) - '@rollup/pluginutils': 5.2.0(rollup@4.48.1) + '@rollup/pluginutils': 5.2.0(rollup@4.49.0) '@volar/typescript': 2.4.23 '@vue/language-core': 2.2.0(typescript@5.9.2) compare-versions: 6.1.1 @@ -11728,7 +11767,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.48.1 + rollup: 4.49.0 tinyglobby: 0.2.14 optionalDependencies: '@types/node': 24.3.0 @@ -11800,7 +11839,7 @@ snapshots: '@webassemblyjs/wasm-parser': 1.14.1 acorn: 8.15.0 acorn-import-phases: 1.0.4(acorn@8.15.0) - browserslist: 4.25.3 + browserslist: 4.25.4 chrome-trace-event: 1.0.4 enhanced-resolve: 5.18.3 es-module-lexer: 1.7.0 diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..2c8f4962 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "strict": true, + "target": "ESNext", + "declaration": true, + "declarationMap": true, + "removeComments": true, + "sourceMap": true, + "useDefineForClassFields": true, + "allowJs": false, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "baseUrl": "." + } +} \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index c42b1f14..c474ab61 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,6 +24,7 @@ export default defineConfig({ include: ['packages/*/src/**/__tests__/**/*.test.{ts,tsx}'], exclude: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'], globals: true, + setupFiles: ['./vitest.setup.ts'], environment: 'node', }, }, @@ -34,11 +35,12 @@ export default defineConfig({ environment: 'happy-dom', globals: true, css: true, - setupFiles: ['@testing-library/jest-dom/vitest'], + setupFiles: ['./vitest.setup.ts', '@testing-library/jest-dom/vitest'], }, plugins: [ DevupUI({ debug: true, + singleCss: true, }), ], }, diff --git a/vitest.setup.ts b/vitest.setup.ts new file mode 100644 index 00000000..442648f6 --- /dev/null +++ b/vitest.setup.ts @@ -0,0 +1,36 @@ +function cartesianProduct(arrays: T) { + return arrays.reduce( + (acc, curr) => acc.flatMap((x) => curr.map((y) => [...x, y])), + [[]], + ) +} + +function createTestMatrix>( + optionsMap: T, +): { + [K in keyof T]: T[K] extends (infer U)[] ? U : never +}[] { + const keys = Object.keys(optionsMap) + const values = Object.values(optionsMap) + + return cartesianProduct(values).map<{ + [K in keyof T]: T[K] extends (infer U)[] ? U : never + }>( + (combination) => + Object.fromEntries(keys.map((key, i) => [key, combination[i]])) as { + [K in keyof T]: T[K] extends (infer U)[] ? U : never + }, + ) +} + +globalThis.createTestMatrix = createTestMatrix + +declare global { + function createTestMatrix>( + optionsMap: T, + ): { + [K in keyof T]: T[K] extends (infer U)[] ? U : never + }[] +} + +export {}