From 33951a649b222715458bbb5e1f64298475f63e4d Mon Sep 17 00:00:00 2001 From: folinhilo Date: Mon, 11 May 2026 05:30:03 +0800 Subject: [PATCH] mm --- apps/ui-site/.npmrc | 1 - apps/ui-site/.vscode/settings.json | 8 - apps/ui-site/index.html | 11 - apps/ui-site/package.json | 47 -- apps/ui-site/src/App.tsx | 16 - apps/ui-site/src/main.tsx | 8 - apps/ui-site/tsconfig.base.json | 12 - apps/ui-site/tsconfig.json | 8 - apps/ui-site/vite.config.ts | 31 - apps/vite-project/public/favicon.svg | 1 - apps/vite-project/public/icons.svg | 24 - apps/vite-project/src/App.css | 184 ------ apps/vite-project/src/assets/hero.png | Bin 13057 -> 0 bytes apps/vite-project/src/assets/react.svg | 1 - apps/vite-project/src/assets/vite.svg | 1 - .../src/common/CommonProps.ts | 0 .../src/common/InnerWrapper.tsx | 0 .../src/common/OuterWrapper.tsx | 0 .../src/gallery/ButtonGallery.tsx | 0 apps/vite-project/src/index.css | 111 ---- apps/vite-project/src/main.tsx | 1 - .../src/types/css.d.ts | 0 .../src/types/env.d.ts | 0 package.json | 2 +- packages/css/package.json | 6 +- packages/css/scripts/gen-index.ts | 8 +- packages/css/src/index.css | 37 -- packages/css/src/index.ts | 5 +- packages/css/src/recipe/itemSizeRecipe.ts | 89 +++ .../utility/size-insensitive/flex-wrap.css | 6 +- .../css/src/utility/size-sensitive/height.css | 2 + .../utility/size-sensitive/padding-short.css | 4 +- packages/css/src/utils/cpm.ts | 11 +- packages/css/src/utils/cvr.ts | 24 +- packages/css/src/utils/prefix-list.ts | 2 +- packages/css/tsconfig.build.json | 4 +- packages/ui-web-headless/common/Slot.tsx | 33 ++ .../componnets/button/Button.tsx | 18 + packages/ui-web-headless/package.json | 44 ++ packages/ui-web-headless/scripts/gen-index.ts | 147 +++++ .../ui-web-headless}/tsconfig.build.json | 24 +- packages/ui-web-headless/tsconfig.json | 26 + packages/ui-web-headless/utils/mergeProps.ts | 103 ++++ packages/ui-web-headless/vite.config.ts | 39 ++ packages/ui-web-tw/package.json | 2 +- pnpm-lock.yaml | 545 +++--------------- templates/vite-react-lib/package.json | 4 +- templates/vite-react-lib/scripts/gen-index.ts | 8 +- 48 files changed, 640 insertions(+), 1018 deletions(-) delete mode 100644 apps/ui-site/.npmrc delete mode 100644 apps/ui-site/.vscode/settings.json delete mode 100644 apps/ui-site/index.html delete mode 100644 apps/ui-site/package.json delete mode 100644 apps/ui-site/src/App.tsx delete mode 100644 apps/ui-site/src/main.tsx delete mode 100644 apps/ui-site/tsconfig.base.json delete mode 100644 apps/ui-site/tsconfig.json delete mode 100644 apps/ui-site/vite.config.ts delete mode 100644 apps/vite-project/public/favicon.svg delete mode 100644 apps/vite-project/public/icons.svg delete mode 100644 apps/vite-project/src/App.css delete mode 100644 apps/vite-project/src/assets/hero.png delete mode 100644 apps/vite-project/src/assets/react.svg delete mode 100644 apps/vite-project/src/assets/vite.svg rename apps/{ui-site => vite-project}/src/common/CommonProps.ts (100%) rename apps/{ui-site => vite-project}/src/common/InnerWrapper.tsx (100%) rename apps/{ui-site => vite-project}/src/common/OuterWrapper.tsx (100%) rename apps/{ui-site => vite-project}/src/gallery/ButtonGallery.tsx (100%) delete mode 100644 apps/vite-project/src/index.css rename apps/{ui-site => vite-project}/src/types/css.d.ts (100%) rename apps/{ui-site => vite-project}/src/types/env.d.ts (100%) create mode 100644 packages/css/src/recipe/itemSizeRecipe.ts create mode 100644 packages/ui-web-headless/common/Slot.tsx create mode 100644 packages/ui-web-headless/componnets/button/Button.tsx create mode 100644 packages/ui-web-headless/package.json create mode 100644 packages/ui-web-headless/scripts/gen-index.ts rename {apps/ui-site => packages/ui-web-headless}/tsconfig.build.json (59%) create mode 100644 packages/ui-web-headless/tsconfig.json create mode 100644 packages/ui-web-headless/utils/mergeProps.ts create mode 100644 packages/ui-web-headless/vite.config.ts diff --git a/apps/ui-site/.npmrc b/apps/ui-site/.npmrc deleted file mode 100644 index 8b02f75..0000000 --- a/apps/ui-site/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry = https://registry.npmmirror.com/ \ No newline at end of file diff --git a/apps/ui-site/.vscode/settings.json b/apps/ui-site/.vscode/settings.json deleted file mode 100644 index 772343c..0000000 --- a/apps/ui-site/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "json.schemas": [ - { - "fileMatch": ["/tsconfig.build.json", "/tsconfig.base.json"], - "schema": {} - } - ] -} diff --git a/apps/ui-site/index.html b/apps/ui-site/index.html deleted file mode 100644 index cffe571..0000000 --- a/apps/ui-site/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - DefGov UI Web - - -
- - - diff --git a/apps/ui-site/package.json b/apps/ui-site/package.json deleted file mode 100644 index 87fe009..0000000 --- a/apps/ui-site/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ui-site", - "version": "0.0.0", - "private": true, - "type": "module", - "sideEffects": [ - "*.css" - ], - "module": "./dist/index.es.js", - "main": "./dist/index.cjs.js", - "types": "./dist/index.d.ts", - "style": "./dist/index.css", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.es.js", - "require": "./dist/index.cjs.js" - }, - "./index.css": "./dist/index.css" - }, - "files": [ - "dist" - ], - "scripts": { - "dev": "vite", - "build": "tsc -p tsconfig.build.json && vite build" - }, - "devDependencies": { - "@rollup/plugin-typescript": "^12.3.0", - "@types/node": "^25.6.0", - "@types/react": "^19.2.14", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "~5.2.0", - "glob": "^13.0.6", - "tailwind-merge": "^3.5.0", - "tailwind-variants": "^3.2.2", - "ts-node": "^10.9.2", - "typescript": "~6.0.3", - "vite": "~7.3.2", - "vite-plugin-dts": "^4.5.4" - }, - "dependencies": { - "@defgov/ui-web-tw": "workspace:*", - "react": "^19.2.5", - "react-dom": "^19.2.5" - } -} diff --git a/apps/ui-site/src/App.tsx b/apps/ui-site/src/App.tsx deleted file mode 100644 index 0ce0eac..0000000 --- a/apps/ui-site/src/App.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { clsm } from "@defgov/ui-web-tw"; -import { ButtonGallery } from "./gallery/ButtonGallery"; -import { cn } from "tailwind-variants"; - -export default function App() { - const s1 = "hta-xs"; - const s2 = "hta-sm"; - const sm = clsm(s1, s2); - console.log(sm); // 应该输出 hta-sm - // 合并逻辑是,第一个短横线“-”之前的,如果相同,就意味着是冲突项,后面的覆盖前面的 - return ( - <> - - - ); -} diff --git a/apps/ui-site/src/main.tsx b/apps/ui-site/src/main.tsx deleted file mode 100644 index d1fea26..0000000 --- a/apps/ui-site/src/main.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { createRoot } from "react-dom/client"; -import App from "./App"; -import "@defgov/ui-web/index.css"; - -const container = document.getElementById("root")!; -const root = createRoot(container); - -root.render(); diff --git a/apps/ui-site/tsconfig.base.json b/apps/ui-site/tsconfig.base.json deleted file mode 100644 index a7f1b39..0000000 --- a/apps/ui-site/tsconfig.base.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "module": "es2022", - "moduleResolution": "bundler", - "lib": ["ES2025", "DOM", "DOM.Iterable"], - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "isolatedModules": true, - "verbatimModuleSyntax": true - } -} diff --git a/apps/ui-site/tsconfig.json b/apps/ui-site/tsconfig.json deleted file mode 100644 index 1f65a23..0000000 --- a/apps/ui-site/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx", - "noEmit": true - }, - "include": ["."] -} diff --git a/apps/ui-site/vite.config.ts b/apps/ui-site/vite.config.ts deleted file mode 100644 index 969388a..0000000 --- a/apps/ui-site/vite.config.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; -import dts from "vite-plugin-dts"; -import typescript from "@rollup/plugin-typescript"; - -export default defineConfig({ - plugins: [ - react(), - dts({ - insertTypesEntry: true, - }), - ], - - esbuild: false, - - build: { - rollupOptions: { - plugins: [typescript({ tsconfig: "./tsconfig.build.json" })], - external: ["react", "react-dom", "react/jsx-runtime"], - output: { - globals: { - react: "React", - "react-dom": "ReactDOM", - }, - }, - }, - - sourcemap: true, - cssCodeSplit: true, - }, -}); diff --git a/apps/vite-project/public/favicon.svg b/apps/vite-project/public/favicon.svg deleted file mode 100644 index 6893eb1..0000000 --- a/apps/vite-project/public/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/vite-project/public/icons.svg b/apps/vite-project/public/icons.svg deleted file mode 100644 index e952219..0000000 --- a/apps/vite-project/public/icons.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/vite-project/src/App.css b/apps/vite-project/src/App.css deleted file mode 100644 index f90339d..0000000 --- a/apps/vite-project/src/App.css +++ /dev/null @@ -1,184 +0,0 @@ -.counter { - font-size: 16px; - padding: 5px 10px; - border-radius: 5px; - color: var(--accent); - background: var(--accent-bg); - border: 2px solid transparent; - transition: border-color 0.3s; - margin-bottom: 24px; - - &:hover { - border-color: var(--accent-border); - } - &:focus-visible { - outline: 2px solid var(--accent); - outline-offset: 2px; - } -} - -.hero { - position: relative; - - .base, - .framework, - .vite { - inset-inline: 0; - margin: 0 auto; - } - - .base { - width: 170px; - position: relative; - z-index: 0; - } - - .framework, - .vite { - position: absolute; - } - - .framework { - z-index: 1; - top: 34px; - height: 28px; - transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg) - scale(1.4); - } - - .vite { - z-index: 0; - top: 107px; - height: 26px; - width: auto; - transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg) - scale(0.8); - } -} - -#center { - display: flex; - flex-direction: column; - gap: 25px; - place-content: center; - place-items: center; - flex-grow: 1; - - @media (max-width: 1024px) { - padding: 32px 20px 24px; - gap: 18px; - } -} - -#next-steps { - display: flex; - border-top: 1px solid var(--border); - text-align: left; - - & > div { - flex: 1 1 0; - padding: 32px; - @media (max-width: 1024px) { - padding: 24px 20px; - } - } - - .icon { - margin-bottom: 16px; - width: 22px; - height: 22px; - } - - @media (max-width: 1024px) { - flex-direction: column; - text-align: center; - } -} - -#docs { - border-right: 1px solid var(--border); - - @media (max-width: 1024px) { - border-right: none; - border-bottom: 1px solid var(--border); - } -} - -#next-steps ul { - list-style: none; - padding: 0; - display: flex; - gap: 8px; - margin: 32px 0 0; - - .logo { - height: 18px; - } - - a { - color: var(--text-h); - font-size: 16px; - border-radius: 6px; - background: var(--social-bg); - display: flex; - padding: 6px 12px; - align-items: center; - gap: 8px; - text-decoration: none; - transition: box-shadow 0.3s; - - &:hover { - box-shadow: var(--shadow); - } - .button-icon { - height: 18px; - width: 18px; - } - } - - @media (max-width: 1024px) { - margin-top: 20px; - flex-wrap: wrap; - justify-content: center; - - li { - flex: 1 1 calc(50% - 8px); - } - - a { - width: 100%; - justify-content: center; - box-sizing: border-box; - } - } -} - -#spacer { - height: 88px; - border-top: 1px solid var(--border); - @media (max-width: 1024px) { - height: 48px; - } -} - -.ticks { - position: relative; - width: 100%; - - &::before, - &::after { - content: ''; - position: absolute; - top: -4.5px; - border: 5px solid transparent; - } - - &::before { - left: 0; - border-left-color: var(--border); - } - &::after { - right: 0; - border-right-color: var(--border); - } -} diff --git a/apps/vite-project/src/assets/hero.png b/apps/vite-project/src/assets/hero.png deleted file mode 100644 index 02251f4b956c55af2d76fd0788124d7eee2b45eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13057 zcmV+cGycqpP)V|)f$;Qooc7=_G zlYe)HToTQIc!$)^+J1M1y0*T%w!p~7%ux`!eRhO?c80XDxKQ*R^lUUMnA>6NT^?feoZ8xxvP32D&s-9ow zqjcM}eesrC)NeDmsf)*P7wJ|K!&xP%Zy4iI8lF)Tv2!reW)tCzg_1=PmOwd1SQfxa z8;58t!=z~Ba7CYlNWVG>he8aRPY|+-JmozNhn!#9i#77Aa_Edt$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xHCq{R-Gdr-`hN zF=1sxl&mBoK+#qRLl9#CEN|Fg8>nbmsTg3a1;#M9enQ$RgWk}kp#-5wh=EF&1tl%mJln2V^8o%Qv(*=zEuO7y z=m*8?xpUn-*@h5Cl_3BK3joiGkyaScK+>|MWdMRWm@RT!Q1piAlv5hL@B6>3&GI8) zP!xBc6}ZNIpJLL%2a8Y!+(<=f%WX>_uWVxlga9!D*oYt$l0cxRDMvqfU;Kq_mLK5k z)dvqYcgLa_Lz?3HyeF)@$%$&6lI?r4I>6W#M*<)vq{?&Oqrx``d`mhpVPr> z#q078F6gw_X<=?KR>8%^t%@wbITvNMu!hKiTSkCTJkw>1!e*Y{%31#_yMf=LW7{RJ zYoC^w$6%3cBtVG5)x#{Hg6IVTh9XEcM{gQwXk!R^y95^f-hZ`d{aVa+xW1EO4wDV4 zB?JgD7*?qkvc|$nIykTvNl2x0j3Q!MXoLL^)~}d7jcYf(H8D~c+?$pKL(px>Z3`eb z04RzS6_AgFT6Pn#iZAg$Sl_j8#;6ShF%&(Fag#E2asU@@LaN;=b=Wf7sgPKhfzhBM zC@eFL8^MrnA*9&Khe*Ab@CC9*uyJGXyi(;y2>lQLJZt;ShtJi?3Yf_t`F+$hY!+Q2Ndsx=U+bjTiAy7djLji>7k%k`$9&--f<*BNA3Hy&ZrHH|4 zG5H&9cB?O#zI1_OOf0Ce%mDfQxdtp3vU%(iY6yji3iISS61XLv#z|!zI_sZqza@B+ zyu9st5-h+`H7QUKx9}3w@oU@EO}&cEzG?fu!!bLO->%zkcg;i9^j`S~=WKMnDi1f= P00000NkvXXu0mjft=yBf diff --git a/apps/vite-project/src/assets/react.svg b/apps/vite-project/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/apps/vite-project/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/vite-project/src/assets/vite.svg b/apps/vite-project/src/assets/vite.svg deleted file mode 100644 index 5101b67..0000000 --- a/apps/vite-project/src/assets/vite.svg +++ /dev/null @@ -1 +0,0 @@ -Vite diff --git a/apps/ui-site/src/common/CommonProps.ts b/apps/vite-project/src/common/CommonProps.ts similarity index 100% rename from apps/ui-site/src/common/CommonProps.ts rename to apps/vite-project/src/common/CommonProps.ts diff --git a/apps/ui-site/src/common/InnerWrapper.tsx b/apps/vite-project/src/common/InnerWrapper.tsx similarity index 100% rename from apps/ui-site/src/common/InnerWrapper.tsx rename to apps/vite-project/src/common/InnerWrapper.tsx diff --git a/apps/ui-site/src/common/OuterWrapper.tsx b/apps/vite-project/src/common/OuterWrapper.tsx similarity index 100% rename from apps/ui-site/src/common/OuterWrapper.tsx rename to apps/vite-project/src/common/OuterWrapper.tsx diff --git a/apps/ui-site/src/gallery/ButtonGallery.tsx b/apps/vite-project/src/gallery/ButtonGallery.tsx similarity index 100% rename from apps/ui-site/src/gallery/ButtonGallery.tsx rename to apps/vite-project/src/gallery/ButtonGallery.tsx diff --git a/apps/vite-project/src/index.css b/apps/vite-project/src/index.css deleted file mode 100644 index 5fb3313..0000000 --- a/apps/vite-project/src/index.css +++ /dev/null @@ -1,111 +0,0 @@ -:root { - --text: #6b6375; - --text-h: #08060d; - --bg: #fff; - --border: #e5e4e7; - --code-bg: #f4f3ec; - --accent: #aa3bff; - --accent-bg: rgba(170, 59, 255, 0.1); - --accent-border: rgba(170, 59, 255, 0.5); - --social-bg: rgba(244, 243, 236, 0.5); - --shadow: - rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; - - --sans: system-ui, 'Segoe UI', Roboto, sans-serif; - --heading: system-ui, 'Segoe UI', Roboto, sans-serif; - --mono: ui-monospace, Consolas, monospace; - - font: 18px/145% var(--sans); - letter-spacing: 0.18px; - color-scheme: light dark; - color: var(--text); - background: var(--bg); - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - @media (max-width: 1024px) { - font-size: 16px; - } -} - -@media (prefers-color-scheme: dark) { - :root { - --text: #9ca3af; - --text-h: #f3f4f6; - --bg: #16171d; - --border: #2e303a; - --code-bg: #1f2028; - --accent: #c084fc; - --accent-bg: rgba(192, 132, 252, 0.15); - --accent-border: rgba(192, 132, 252, 0.5); - --social-bg: rgba(47, 48, 58, 0.5); - --shadow: - rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; - } - - #social .button-icon { - filter: invert(1) brightness(2); - } -} - -#root { - width: 1126px; - max-width: 100%; - margin: 0 auto; - text-align: center; - border-inline: 1px solid var(--border); - min-height: 100svh; - display: flex; - flex-direction: column; - box-sizing: border-box; -} - -body { - margin: 0; -} - -h1, -h2 { - font-family: var(--heading); - font-weight: 500; - color: var(--text-h); -} - -h1 { - font-size: 56px; - letter-spacing: -1.68px; - margin: 32px 0; - @media (max-width: 1024px) { - font-size: 36px; - margin: 20px 0; - } -} -h2 { - font-size: 24px; - line-height: 118%; - letter-spacing: -0.24px; - margin: 0 0 8px; - @media (max-width: 1024px) { - font-size: 20px; - } -} -p { - margin: 0; -} - -code, -.counter { - font-family: var(--mono); - display: inline-flex; - border-radius: 4px; - color: var(--text-h); -} - -code { - font-size: 15px; - line-height: 135%; - padding: 4px 8px; - background: var(--code-bg); -} diff --git a/apps/vite-project/src/main.tsx b/apps/vite-project/src/main.tsx index bef5202..4aff025 100644 --- a/apps/vite-project/src/main.tsx +++ b/apps/vite-project/src/main.tsx @@ -1,6 +1,5 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' -import './index.css' import App from './App.tsx' createRoot(document.getElementById('root')!).render( diff --git a/apps/ui-site/src/types/css.d.ts b/apps/vite-project/src/types/css.d.ts similarity index 100% rename from apps/ui-site/src/types/css.d.ts rename to apps/vite-project/src/types/css.d.ts diff --git a/apps/ui-site/src/types/env.d.ts b/apps/vite-project/src/types/env.d.ts similarity index 100% rename from apps/ui-site/src/types/env.d.ts rename to apps/vite-project/src/types/env.d.ts diff --git a/package.json b/package.json index 345db59..d82bb25 100644 --- a/package.json +++ b/package.json @@ -12,5 +12,5 @@ "engines": { "node": ">=20" }, - "packageManager": "pnpm@11.0.0-rc.5+sha512.c469fb6aa13a99e57aec935cd7b86ff422701f4602ecac2231d3dc20910586ebfb6b50a7b455d0778ec22ae56912d8d8e88e9f9e0a03c0875a6a41783a94a1bd" + "packageManager": "pnpm@11.0.9+sha512.34ce82e6780233cf9cad8685029a8f81d2e06196c5a9bad98879f7424940c6817c4e4524fb7d38b8553ceed48b9758b8ebaf1abd3600c232c4c8cf7366086f38" } diff --git a/packages/css/package.json b/packages/css/package.json index 30134c3..cb7c9a6 100644 --- a/packages/css/package.json +++ b/packages/css/package.json @@ -30,10 +30,12 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-react": "^6.0.1", - "glob": "^13.0.6", + "tinyglobby": "^0.2.16", "ts-node": "^10.9.2", "typescript": "^6.0.3", - "vite": "^8.0.10" + "vite": "^8.0.10", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3" }, "peerDependencies": { "react": "^19", diff --git a/packages/css/scripts/gen-index.ts b/packages/css/scripts/gen-index.ts index e03849c..64433db 100644 --- a/packages/css/scripts/gen-index.ts +++ b/packages/css/scripts/gen-index.ts @@ -1,6 +1,7 @@ import fs from "fs"; import path from "path"; -import { globSync } from "glob"; +// 1. 引入 tinyglobby +import { globSync } from "tinyglobby"; interface Config { outputDir: string; @@ -77,13 +78,12 @@ function generateIndexFile(config: Config) { // ------ scanDirs forEach start ------------------------ config.scanDirs.forEach((dir) => { + // 2. 路径模式保持不变,tinyglobby 能够正确处理 const scanPattern = path.resolve(currentPath, dir, "**", "*.*"); const allFilePath = globSync(scanPattern, { absolute: true, - windowsPathsNoEscape: true, - dot: false, - follow: true, + // 3. 移除了 windowsPathsNoEscape,tinyglobby 默认处理路径更智能 }); const validFiles = allFilePath.filter((filePath) => { diff --git a/packages/css/src/index.css b/packages/css/src/index.css index b3733dd..e69de29 100644 --- a/packages/css/src/index.css +++ b/packages/css/src/index.css @@ -1,37 +0,0 @@ -@import './base/root.css'; -@import './utility/size-insensitive/align-content.css'; -@import './utility/size-insensitive/align-items.css'; -@import './utility/size-insensitive/align-self.css'; -@import './utility/size-insensitive/animation.css'; -@import './utility/size-insensitive/box-decoration.css'; -@import './utility/size-insensitive/box-inside.css'; -@import './utility/size-insensitive/box-sizing.css'; -@import './utility/size-insensitive/brand.css'; -@import './utility/size-insensitive/break-after.css'; -@import './utility/size-insensitive/break-before.css'; -@import './utility/size-insensitive/cursor.css'; -@import './utility/size-insensitive/display.css'; -@import './utility/size-insensitive/drop-shadow.css'; -@import './utility/size-insensitive/flex-direction.css'; -@import './utility/size-insensitive/flex-wrap.css'; -@import './utility/size-insensitive/font-family.css'; -@import './utility/size-insensitive/justify-content.css'; -@import './utility/size-insensitive/justify-items.css'; -@import './utility/size-insensitive/justify-self.css'; -@import './utility/size-insensitive/overflow.css'; -@import './utility/size-insensitive/overscroll-behavior.css'; -@import './utility/size-insensitive/position.css'; -@import './utility/size-insensitive/screen-reader.css'; -@import './utility/size-insensitive/theme.css'; -@import './utility/size-insensitive/user-select.css'; -@import './utility/size-insensitive/z-index.css'; -@import './utility/size-sensitive/border-radius.css'; -@import './utility/size-sensitive/font-size.css'; -@import './utility/size-sensitive/font-weight.css'; -@import './utility/size-sensitive/gap.css'; -@import './utility/size-sensitive/height.css'; -@import './utility/size-sensitive/margin-block.css'; -@import './utility/size-sensitive/margin-inline.css'; -@import './utility/size-sensitive/padding-long.css'; -@import './utility/size-sensitive/padding-short.css'; -@import './utility/size-sensitive/width.css'; \ No newline at end of file diff --git a/packages/css/src/index.ts b/packages/css/src/index.ts index 606b735..7505b6f 100644 --- a/packages/css/src/index.ts +++ b/packages/css/src/index.ts @@ -1,4 +1 @@ -import "./index.css"; -export * from "./utils/cpm.ts"; -export * from "./utils/cvr.ts"; -export * from "./utils/prefix-list.ts"; +import './index.css' \ No newline at end of file diff --git a/packages/css/src/recipe/itemSizeRecipe.ts b/packages/css/src/recipe/itemSizeRecipe.ts new file mode 100644 index 0000000..3b1b4da --- /dev/null +++ b/packages/css/src/recipe/itemSizeRecipe.ts @@ -0,0 +1,89 @@ +import { cvr } from "../utils/cvr"; + +export const itemSizeRecipe = cvr({ + base: "relative select-none flex flex-nowrap justify-center items-center", + variants: { + size: { + xs: "text-xs h-item-xs gap-xs px-xs", + sm: "text-sm h-item-sm gap-sm px-sm", + md: "text-md h-item-md gap-md px-md", + lg: "text-lg h-item-lg gap-lg px-lg", + xl: "text-xl h-item-xl gap-xl px-xl", + "2xl": "text-2xl h-item-2xl gap-2xl px-2xl", + }, + shape: { + square: "rounded-none", + rounded: "", + circle: "rounded-full", + }, + iconOnly: { + true: "px-none", + false: "", + }, + }, + compoundVariants: [ + { iconOnly: false, size: "xs", class: "px-xs" }, + { iconOnly: false, size: "sm", class: "px-sm" }, + { iconOnly: false, size: "md", class: "px-md" }, + { iconOnly: false, size: "lg", class: "px-lg" }, + { iconOnly: false, size: "xl", class: "px-xl" }, + { iconOnly: false, size: "2xl", class: "px-2xl" }, + { shape: "rounded", size: "xs", class: "rounded-sm" }, + { + shape: "rounded", + size: "sm", + class: "rounded-md", + }, + { + shape: "rounded", + size: "md", + class: "rounded-lg", + }, + { + shape: "rounded", + size: "lg", + class: "rounded-xl", + }, + { + shape: "rounded", + size: "xl", + class: "rounded-2xl", + }, + { + shape: "rounded", + size: "2xl", + class: "rounded-3xl", + }, + // -------------------------------------------------- + { + iconOnly: true, + size: "xs", + class: "w-item-xs", + }, + { + iconOnly: true, + size: "sm", + class: "w-item-sm", + }, + { + iconOnly: true, + size: "md", + class: "w-item-md", + }, + { + iconOnly: true, + size: "lg", + class: "w-item-lg", + }, + { + iconOnly: true, + size: "xl", + class: "w-item-xl", + }, + { + iconOnly: true, + size: "2xl", + class: "w-item-2xl", + }, + ], +}); diff --git a/packages/css/src/utility/size-insensitive/flex-wrap.css b/packages/css/src/utility/size-insensitive/flex-wrap.css index 5cecb8d..53e8c7d 100644 --- a/packages/css/src/utility/size-insensitive/flex-wrap.css +++ b/packages/css/src/utility/size-insensitive/flex-wrap.css @@ -1,13 +1,13 @@ @layer utility { - .flex-wrap-nowrap { + .flex-nowrap { flex-wrap: nowrap; } - .flex-wrap-wrap { + .flex-wrap { flex-wrap: wrap; } - .flex-wrap-wrap-reverse { + .flex-wrap-reverse { flex-wrap: wrap-reverse; } } diff --git a/packages/css/src/utility/size-sensitive/height.css b/packages/css/src/utility/size-sensitive/height.css index 406a828..c377814 100644 --- a/packages/css/src/utility/size-sensitive/height.css +++ b/packages/css/src/utility/size-sensitive/height.css @@ -25,9 +25,11 @@ } /* -------------- */ .h-inline-xs { + /* 16px */ height: calc(var(--font-size-xs) * var(--line-height-xs)); } .h-inline-sm { + /* 20px */ height: calc(var(--font-size-sm) * var(--line-height-sm)); } .h-inline-md { diff --git a/packages/css/src/utility/size-sensitive/padding-short.css b/packages/css/src/utility/size-sensitive/padding-short.css index 5d3ba50..28ca845 100644 --- a/packages/css/src/utility/size-sensitive/padding-short.css +++ b/packages/css/src/utility/size-sensitive/padding-short.css @@ -3,11 +3,11 @@ padding-inline: 0px; } .px-xs { - /* 6px */ + /* 4px, 24px - 16px = 8px */ padding-inline: var(--padding-xs); } .px-sm { - /* 8px */ + /* 4px, 28px - 20px = 8px */ padding-inline: var(--padding-sm); } .px-md { diff --git a/packages/css/src/utils/cpm.ts b/packages/css/src/utils/cpm.ts index c4f05ab..94a8456 100644 --- a/packages/css/src/utils/cpm.ts +++ b/packages/css/src/utils/cpm.ts @@ -14,23 +14,22 @@ function matchLongestPrefix(cls: string, prefixList: string[]): string { } // 重载 1 -export function cpm(...classes: Array): string; +export function cpm(...classes: Array): string; // 重载 2 export function cpm( options: { extendedPrefixList?: string[] }, - ...classes: Array + ...classes: Array ): string; export function cpm( - arg1: { extendedPrefixList?: string[] } | string | readonly string[], - ...rest: Array + arg1: { extendedPrefixList?: string[] } | string | string[], + ...rest: Array ): string { const map = new Map(); - // ✅ 明确拆分 options / classes let options: { extendedPrefixList?: string[] } = {}; - let classes: Array; + let classes: Array; if (typeof arg1 === "object" && !Array.isArray(arg1)) { options = arg1 as { extendedPrefixList?: string[] }; diff --git a/packages/css/src/utils/cvr.ts b/packages/css/src/utils/cvr.ts index a325cc8..ee73442 100644 --- a/packages/css/src/utils/cvr.ts +++ b/packages/css/src/utils/cvr.ts @@ -1,15 +1,21 @@ import { cpm } from "./cpm"; +// 1. 允许变体值的键可以是字符串,也可以是布尔值(为了开发体验,允许传 true/false) +// 但底层存储我们统一视为字符串处理 +type VariantValue = string | boolean; + type VariantsConfig>> = { base?: string; variants?: V; compoundVariants?: Array< - Partial<{ [K in keyof V]: keyof V[K] }> & { class: string } + // 修改这里:允许 compoundVariants 的值是 VariantValue,而不仅仅是 keyof V[K] + Partial<{ [K in keyof V]: VariantValue }> & { class: string } >; }; +// 2. 修改 Props 定义,允许传入 boolean,因为 JS 对象 key 访问时,boolean 会被转为 string type VariantProps>> = Partial<{ - [K in keyof V]: keyof V[K]; + [K in keyof V]: keyof V[K] | boolean; }>; export function cvr>>( @@ -21,10 +27,12 @@ export function cvr>>( if (config.base) classes.push(config.base); if (config.variants) { - for (const [key, map] of Object.entries(config.variants) as any) { + for (const [key, map] of Object.entries(config.variants)) { const value = props[key]; - if (value && map[value]) { - classes.push(map[value]); + // 运行时修复:如果传入的是 boolean true,需要转为字符串 "true" 才能匹配 map + const stringifiedValue = String(value); + if (value && map[stringifiedValue]) { + classes.push(map[stringifiedValue]); } } } @@ -33,7 +41,11 @@ export function cvr>>( for (const cv of config.compoundVariants) { const match = Object.entries(cv) .filter(([k]) => k !== "class") - .every(([k, v]) => props[k] === v); + .every(([k, v]) => { + const propValue = props[k as keyof V]; + // 运行时修复:统一转为字符串比较,确保 "true" === true 能匹配(虽然不建议混用,但要兼容) + return String(propValue) === String(v); + }); if (match && cv.class) { classes.push(cv.class); diff --git a/packages/css/src/utils/prefix-list.ts b/packages/css/src/utils/prefix-list.ts index 64ecfc5..93f1806 100644 --- a/packages/css/src/utils/prefix-list.ts +++ b/packages/css/src/utils/prefix-list.ts @@ -13,7 +13,7 @@ export const defaultPrefixList = [ "cursor", "display", "flex-direction", - "flex-wrap", + "flex", "font-family", "font-weight", "text", diff --git a/packages/css/tsconfig.build.json b/packages/css/tsconfig.build.json index a5bcc27..4581f3b 100644 --- a/packages/css/tsconfig.build.json +++ b/packages/css/tsconfig.build.json @@ -4,9 +4,9 @@ "noEmit": false, "emitDeclarationOnly": true, "declaration": true, + "declarationDir": "./dist", "rootDir": "./src", - "outDir": "./dist", - "declarationDir": "./dist" + "outDir": "./dist" }, "include": ["src"], "exclude": [ diff --git a/packages/ui-web-headless/common/Slot.tsx b/packages/ui-web-headless/common/Slot.tsx new file mode 100644 index 0000000..4bee4a7 --- /dev/null +++ b/packages/ui-web-headless/common/Slot.tsx @@ -0,0 +1,33 @@ +import { mergeProps } from "@base-ui/react"; +import * as React from "react"; +import { cn } from "tailwind-variants"; + +export interface SlotProps extends React.HTMLAttributes { + children: React.ReactNode; +} + +export const Slot = React.forwardRef( + ({ children, className: externalClassName, ...restProps }, ref) => { + if (!React.isValidElement(children)) { + return null; + } + + const child = children as React.ReactElement>; + const childProps = child.props || {}; + + const mergedClassName = cn( + childProps.className as string | undefined, + externalClassName, + ); + + const otherMergedProps = mergeProps(childProps, restProps); + + return React.cloneElement(child, { + ...otherMergedProps, + className: mergedClassName, + ref, + }); + }, +); + +Slot.displayName = "Slot"; diff --git a/packages/ui-web-headless/componnets/button/Button.tsx b/packages/ui-web-headless/componnets/button/Button.tsx new file mode 100644 index 0000000..10fa46b --- /dev/null +++ b/packages/ui-web-headless/componnets/button/Button.tsx @@ -0,0 +1,18 @@ +import { ComponentPropsWithRef, forwardRef, ReactNode } from "react"; + +export type ButtonState = { + loading?: boolean; + disabled?: boolean; +}; + +export type ButtonProps = { + size?: "xs" | "sm" | "md" | "lg"; + shape?: "circle" | "rounded" | "square"; + iconSvg?: ReactNode; + iconOnly?: boolean; + hideIcon?: boolean; + loadingIconSvg?: ReactNode; +} & ButtonState & + ComponentPropsWithRef<"button">; + +export const Button = forwardRef(); diff --git a/packages/ui-web-headless/package.json b/packages/ui-web-headless/package.json new file mode 100644 index 0000000..c749b6f --- /dev/null +++ b/packages/ui-web-headless/package.json @@ -0,0 +1,44 @@ +{ + "name": "@defgov/ui-web-headless", + "version": "0.0.0", + "private": true, + "type": "module", + "sideEffects": [ + "*.css" + ], + "module": "./dist/index.es.js", + "main": "./dist/index.cjs.js", + "types": "./dist/index.d.ts", + "style": "./dist/index.css", + "exports": { + ".": { + "import": "./dist/index.es.js", + "require": "./dist/index.cjs.js", + "types": "./dist/index.d.ts" + }, + "./index.css": "./dist/index.css" + }, + "files": [ + "dist" + ], + "scripts": { + "gen-index": "ts-node scripts/gen-index.ts", + "gen-dts": "tsc -p tsconfig.build.json", + "dev": "pnpm gen-index && vite build --watch", + "build": "pnpm gen-index && vite build && pnpm gen-dts" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-react": "^6.0.1", + "tinyglobby": "^0.2.16", + "ts-node": "^10.9.2", + "typescript": "^6.0.3", + "vite": "^8.0.10", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3" + }, + "peerDependencies": { + "react": "^19", + "react-dom": "^19" + } +} diff --git a/packages/ui-web-headless/scripts/gen-index.ts b/packages/ui-web-headless/scripts/gen-index.ts new file mode 100644 index 0000000..64433db --- /dev/null +++ b/packages/ui-web-headless/scripts/gen-index.ts @@ -0,0 +1,147 @@ +import fs from "fs"; +import path from "path"; +// 1. 引入 tinyglobby +import { globSync } from "tinyglobby"; + +interface Config { + outputDir: string; + outputFilenameWithExt: string; + scanDirs: string[]; + importPrefix: string; + predefineStatements: string[]; + includeExtensions: string[]; + excludeDirs: string[]; + excludeFileExtensions: string[]; + excludePatterns: RegExp[]; +} + +const cssConfig: Config = { + outputDir: "src", + outputFilenameWithExt: "index.css", + scanDirs: ["src"], + importPrefix: "@import", + predefineStatements: [], + includeExtensions: [".css"], + excludeDirs: ["__tests__", "tests", "story", "stories", "types"], + excludeFileExtensions: [], + excludePatterns: [/^index\.(css)$/, /\.(test|spec)\./, /\.(story|stories)\./], +}; + +const tsConfig: Config = { + outputDir: "src", + outputFilenameWithExt: "index.ts", + scanDirs: ["src"], + importPrefix: "export * from", + predefineStatements: ["import './index.css'"], + includeExtensions: [".ts", "tsx", "js", "jsx"], + excludeDirs: ["__tests__", "tests", "story", "stories", "types"], + excludeFileExtensions: [".d.ts"], + excludePatterns: [ + /^index\.(ts|tsx|js|jsx)$/, + /\.(test|spec)\./, + /\.(story|stories)\./, + ], +}; + +const normalizePath = (p: string) => p.replace(/\\/g, "/"); + +const isExcludeDir = (filePath: string, excludeDirs: string[]) => { + const normalized = normalizePath(filePath); + return excludeDirs.some((dir) => normalized.includes(`/${dir}/`)); +}; + +const isExcludeFileExtensions = ( + filePath: string, + excludeFileExtensions: string[], +) => excludeFileExtensions.some((ext) => filePath.endsWith(ext)); + +const isExcludePattern = (fileName: string, excludePatterns: RegExp[]) => + excludePatterns.some((pattern) => pattern.test(fileName)); + +// ---------------------------------------- +function isValidFile(filePath: string, config: Config): boolean { + const fileName = filePath.split(/[\\/]/).pop()!; + + if (isExcludeDir(filePath, config.excludeDirs)) return false; + if (isExcludeFileExtensions(filePath, config.excludeFileExtensions)) + return false; + if (isExcludePattern(fileName, config.excludePatterns)) return false; + + const ext = path.extname(filePath); + return config.includeExtensions.includes(ext); +} +// ----------------------------------------- +function generateIndexFile(config: Config) { + const currentPath = process.cwd(); + const outputPath = path.resolve(currentPath, config.outputDir); + let exportStatements: string[] = []; + + // ------ scanDirs forEach start ------------------------ + config.scanDirs.forEach((dir) => { + // 2. 路径模式保持不变,tinyglobby 能够正确处理 + const scanPattern = path.resolve(currentPath, dir, "**", "*.*"); + + const allFilePath = globSync(scanPattern, { + absolute: true, + // 3. 移除了 windowsPathsNoEscape,tinyglobby 默认处理路径更智能 + }); + + const validFiles = allFilePath.filter((filePath) => { + return isValidFile(filePath, config); + }); + + if (validFiles.length === 0) { + console.log( + `⚠️ 未找到符合条件的文件,跳过生成 ${config.outputFilenameWithExt}`, + ); + return; + } + + validFiles.sort(); + + validFiles.forEach((file) => { + const relativePath = path.relative(outputPath, file); + const importPath = `./${relativePath.replace(/\\/g, "/")}`; + exportStatements.push(`${config.importPrefix} '${importPath}';`); + }); + }); + + // --------- scanDirs forEach end ---------------- + + const indexFileContent = ` +${config.predefineStatements.join("\n")} +${exportStatements.join("\n")} +`.trim(); + + const indexFilePath = path.resolve( + currentPath, + config.outputDir, + config.outputFilenameWithExt, + ); + + // ✅ 内容比对,避免重复写入 + if (fs.existsSync(indexFilePath)) { + const old = fs.readFileSync(indexFilePath, "utf8"); + if (old === indexFileContent) { + console.log( + `✅ ${config.outputFilenameWithExt} 内容无变化,无需重新生成`, + ); + return; + } + } + + fs.writeFileSync(indexFilePath, indexFileContent, "utf8"); + console.log(`✅ 成功生成 ${config.outputFilenameWithExt}: ${indexFilePath}`); +} + +// -------------------------------------------------- + +try { + console.log(`🚀 [gen-index] 开始扫描`); + generateIndexFile(cssConfig); + generateIndexFile(tsConfig); +} catch (err) { + const msg = err instanceof Error ? err.message : String(err); + console.error(`❌ [gen-index] 执行失败: ${msg}`); + process.exit(1); +} diff --git a/apps/ui-site/tsconfig.build.json b/packages/ui-web-headless/tsconfig.build.json similarity index 59% rename from apps/ui-site/tsconfig.build.json rename to packages/ui-web-headless/tsconfig.build.json index 60d26ca..4581f3b 100644 --- a/apps/ui-site/tsconfig.build.json +++ b/packages/ui-web-headless/tsconfig.build.json @@ -1,28 +1,24 @@ { - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "./dist", + "noEmit": false, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "./dist", "rootDir": "./src", - "jsx": "react-jsx", - "declaration": true + "outDir": "./dist" }, "include": ["src"], "exclude": [ "node_modules", "dist", - - // ---------- build / cache ---------- ".turbo/**/*", ".cache/**/*", ".vite/**/*", - - // ---------- 配置文件 ---------- "vite.config.ts", "*.config.ts", "*.config.js", "tsconfig.*.json", - - // ---------- 测试相关 ---------- "__tests__/**/*", "test/**/*", "tests/**/*", @@ -30,22 +26,14 @@ "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx", - - // ---------- Storybook ---------- ".storybook/**/*", "stories/**/*", - - // ---------- 示例 / 脚本 ---------- "example/**/*", "examples/**/*", "scripts/**/*", - - // ---------- 环境与静态资源 ---------- ".env", ".env.*", "public/**/*", - - // ---------- 文档 ---------- "docs/**/*", "README.md", "LICENSE" diff --git a/packages/ui-web-headless/tsconfig.json b/packages/ui-web-headless/tsconfig.json new file mode 100644 index 0000000..eb90b48 --- /dev/null +++ b/packages/ui-web-headless/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es2025", + "lib": ["ES2025", "DOM", "DOM.Iterable"], + "module": "ESNext", + "types": ["node", "vite/client"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src", "scripts", "vite.config.ts"] +} diff --git a/packages/ui-web-headless/utils/mergeProps.ts b/packages/ui-web-headless/utils/mergeProps.ts new file mode 100644 index 0000000..4387c2f --- /dev/null +++ b/packages/ui-web-headless/utils/mergeProps.ts @@ -0,0 +1,103 @@ +function innerClassMergeFn(...classes: string[]): string { + return classes + .map((str) => str.trim()) + .filter(Boolean) + .join(" ") + .trim(); +} + +// 重载1 +export function mergeProps( + ...propsN: Record[] +): Record; + +// 重载2 +export function mergeProps( + options: { classMergeFn: Function }, + ...propsN: Record[] +): Record; + +// 实现 +export function mergeProps( + arg1: { classMergeFn: Function } | Record, + ...rest: Record[] +) { + let options: { classMergeFn: Function } = { + classMergeFn: innerClassMergeFn, + }; + let propsN: Record[]; + + if ( + arg1 && + typeof arg1 === "object" && + !Array.isArray(arg1) && + "classMergeFn" in arg1 && + typeof (arg1 as any).classMergeFn === "function" + ) { + options = arg1 as { classMergeFn: Function }; + propsN = rest; + } else { + propsN = [arg1 as Record, ...rest]; + } + // -------------------------------- + const result: any = {}; + const eventHandlerMap = new Map(); + const refs: any[] = []; + + propsN.forEach((props) => { + if (!props) return; + + if (props.className) { + result.className = options.classMergeFn( + result.className || "", + props.className, + ); + } + + if (props.style) { + result.style = { ...(result.style || {}), ...props.style }; + } + + if (props.ref) { + refs.push(props.ref); + } + + Object.keys(props).forEach((key) => { + if (key.startsWith("on") && typeof props[key] === "function") { + if (!eventHandlerMap.has(key)) { + eventHandlerMap.set(key, []); + } + eventHandlerMap.get(key)!.push(props[key]); + } else if (key !== "ref" && key !== "className" && key !== "style") { + // 其他普通属性,后面的覆盖前面的 + result[key] = props[key]; + } + }); + }); + + // 合并 Refs + if (refs.length > 0) { + if (refs.length === 1) { + result.ref = refs[0]; + } else { + result.ref = (node: any) => { + refs.forEach((ref) => { + if (typeof ref === "function") { + ref(node); + } else if (ref) { + ref.current = node; + } + }); + }; + } + } + + // 合并事件处理器 + eventHandlerMap.forEach((handlers, key) => { + result[key] = (...args: any[]) => { + handlers.forEach((handler) => handler(...args)); + }; + }); + + return result; +} diff --git a/packages/ui-web-headless/vite.config.ts b/packages/ui-web-headless/vite.config.ts new file mode 100644 index 0000000..c632b6e --- /dev/null +++ b/packages/ui-web-headless/vite.config.ts @@ -0,0 +1,39 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import path from "path"; + +export default defineConfig({ + // d.ts 由 tsc 完成,使用专门配置 tsconfig.build.json + // 转换由 oxc 完成 + // 打包由 rolldown 完成 + plugins: [react()], + + build: { + cssMinify: false, + lib: { + entry: path.resolve(import.meta.dirname, "src/index.ts"), + // 不写 vite 默认是 index.mjs 和 index.js,不方便识别 + formats: ["es", "cjs"], + // package.json 管别人怎么使用, + // build.lib 管怎么打包,生成什么 + // 如果不一致,就会报错,指向文件不存在 + fileName: (format) => `index.${format}.js`, + }, + rolldownOptions: { + // 避免这些被打包,peerDependencies 对 rolldown 是无效的,不会自动 external + external: ["react", "react-dom", "react/jsx-runtime"], + // 专门给 UMD / IIFE​ 的映射表 + output: { + globals: { + react: "React", + "react-dom": "ReactDOM", + }, + }, + }, + + emptyOutDir: true, // 防止旧产物残留 + sourcemap: true, // 方便调试 + cssCodeSplit: false, // 合并成一个css文件 + outDir: "dist", // 专管打包输出目录,tsconfig.build.json 中的 outDir 管的是 d.ts 输出目录 + }, +}); diff --git a/packages/ui-web-tw/package.json b/packages/ui-web-tw/package.json index 20f068c..c90e3c1 100644 --- a/packages/ui-web-tw/package.json +++ b/packages/ui-web-tw/package.json @@ -35,7 +35,7 @@ "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "~5.2.0", - "glob": "^13.0.6", + "tinyglobby": "^0.2.16", "ts-node": "^10.9.2", "typescript": "~6.0.3", "vite": "~7.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e92330..2ef64d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,55 +12,6 @@ importers: specifier: ^2.8.0 version: 2.9.7 - apps/ui-site: - dependencies: - '@defgov/ui-web-tw': - specifier: workspace:* - version: link:../../packages/ui-web-tw - react: - specifier: ^19.2.5 - version: 19.2.5 - react-dom: - specifier: ^19.2.5 - version: 19.2.5(react@19.2.5) - devDependencies: - '@rollup/plugin-typescript': - specifier: ^12.3.0 - version: 12.3.0(rollup@4.60.2)(tslib@2.8.1)(typescript@6.0.3) - '@types/node': - specifier: ^25.6.0 - version: 25.6.0 - '@types/react': - specifier: ^19.2.14 - version: 19.2.14 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.14) - '@vitejs/plugin-react': - specifier: ~5.2.0 - version: 5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) - glob: - specifier: ^13.0.6 - version: 13.0.6 - tailwind-merge: - specifier: ^3.5.0 - version: 3.5.0 - tailwind-variants: - specifier: ^3.2.2 - version: 3.2.2(tailwind-merge@3.5.0)(tailwindcss@4.2.4) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@25.6.0)(typescript@6.0.3) - typescript: - specifier: ~6.0.3 - version: 6.0.3 - vite: - specifier: ~7.3.2 - version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) - vite-plugin-dts: - specifier: ^4.5.4 - version: 4.5.4(@types/node@25.6.0)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) - apps/vite-project: dependencies: react: @@ -141,12 +92,52 @@ importers: '@types/node': specifier: ^25.6.0 version: 25.6.0 + '@types/react': + specifier: ^19.2.14 + version: 19.2.14 + '@types/react-dom': + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react': specifier: ^6.0.1 version: 6.0.1(vite@8.0.10(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)) - glob: - specifier: ^13.0.6 - version: 13.0.6 + tinyglobby: + specifier: ^0.2.16 + version: 0.2.16 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@25.6.0)(typescript@6.0.3) + typescript: + specifier: ^6.0.3 + version: 6.0.3 + vite: + specifier: ^8.0.10 + version: 8.0.10(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1) + + packages/ui-web-headless: + dependencies: + react: + specifier: ^19 + version: 19.2.5 + react-dom: + specifier: ^19 + version: 19.2.5(react@19.2.5) + devDependencies: + '@types/node': + specifier: ^25.6.0 + version: 25.6.0 + '@types/react': + specifier: ^19.2.14 + version: 19.2.14 + '@types/react-dom': + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.14) + '@vitejs/plugin-react': + specifier: ^6.0.1 + version: 6.0.1(vite@8.0.10(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)) + tinyglobby: + specifier: ^0.2.16 + version: 0.2.16 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@25.6.0)(typescript@6.0.3) @@ -196,9 +187,9 @@ importers: '@vitejs/plugin-react': specifier: ~5.2.0 version: 5.2.0(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) - glob: - specifier: ^13.0.6 - version: 13.0.6 + tinyglobby: + specifier: ^0.2.16 + version: 0.2.16 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@25.6.0)(typescript@6.0.3) @@ -210,7 +201,41 @@ importers: version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) vite-plugin-dts: specifier: ^5.0.0 - version: 5.0.0(@microsoft/api-extractor@7.58.7(@types/node@25.6.0))(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) + version: 5.0.0(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) + + templates/vite-react-lib: + dependencies: + react: + specifier: ^19 + version: 19.2.5 + react-dom: + specifier: ^19 + version: 19.2.5(react@19.2.5) + devDependencies: + '@types/node': + specifier: ^25.6.0 + version: 25.6.0 + '@types/react': + specifier: ^19.2.14 + version: 19.2.14 + '@types/react-dom': + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.14) + '@vitejs/plugin-react': + specifier: ^6.0.1 + version: 6.0.1(vite@8.0.10(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1)) + tinyglobby: + specifier: ^0.2.16 + version: 0.2.16 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@25.6.0)(typescript@6.0.3) + typescript: + specifier: ^6.0.3 + version: 6.0.3 + vite: + specifier: ^8.0.10 + version: 8.0.10(@types/node@25.6.0)(esbuild@0.27.7)(jiti@2.6.1) packages: @@ -594,19 +619,6 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@microsoft/api-extractor-model@7.33.8': - resolution: {integrity: sha512-aIcoQggPyer3B6Ze3usz0YWC/oBwUHfRH5ETUsr+oT2BRA6SfTJl7IKPcPZkX4UR+PohowzW4uMxsvjrn8vm+w==} - - '@microsoft/api-extractor@7.58.7': - resolution: {integrity: sha512-yK6OycD46gIzLRpj6ueVUWPk1ACSpkN1LBo05gY1qPTylbWyUCanXfH7+VgkI5LJrJoRSQR5F04XuCffCXLOBw==} - hasBin: true - - '@microsoft/tsdoc-config@0.18.1': - resolution: {integrity: sha512-9brPoVdfN9k9g0dcWkFeA7IH9bbcttzDJlXvkf8b2OBzd5MueR1V2wkKBL0abn0otvmkHJC6aapBOTJDDeMCZg==} - - '@microsoft/tsdoc@0.16.0': - resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} - '@napi-rs/wasm-runtime@1.1.4': resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} peerDependencies: @@ -884,36 +896,6 @@ packages: cpu: [x64] os: [win32] - '@rushstack/node-core-library@5.23.1': - resolution: {integrity: sha512-wlKmIKIYCKuCASbITvOxLZXepPbwXvrv7S6ig6XNWFchSyhL/E2txmVXspHY49Wu2dzf7nI27a2k/yV5BA3EiA==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/problem-matcher@0.2.1': - resolution: {integrity: sha512-gulfhBs6n+I5b7DvjKRfhMGyUejtSgOHTclF/eONr8hcgF1APEDjhxIsfdUYYMzC3rvLwGluqLjbwCFZ8nxrog==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/rig-package@0.7.3': - resolution: {integrity: sha512-aAA518n6wxxjCfnTAOjQnm7ngNE0FVHxHAw2pxKlIhxrMn0XQjGcXKF0oKWpjBgJOmsaJpVob/v+zr3zxgPWuA==} - - '@rushstack/terminal@0.24.0': - resolution: {integrity: sha512-8ZQS4MMaGsv27EXCBiH7WMPkRZrffeDoIevs6z9TM5dzqiY6+Hn4evfK/G+gvgBTjfvfkHIZPQQmalmI2sM4TQ==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/ts-command-line@5.3.9': - resolution: {integrity: sha512-GIHqU+sRGQ3LGWAZu1O+9Yh++qwtyNIIGuNbcWHJjBTm2qRez0cwINUHZ+pQLR8UuzZDcMajrDaNbUYoaL/XtQ==} - '@tailwindcss/node@4.2.4': resolution: {integrity: sha512-Ai7+yQPxz3ddrDQzFfBKdHEVBg0w3Zl83jnjuwxnZOsnH9pGn93QHQtpU0p/8rYWxvbFZHneni6p1BSLK4DkGA==} @@ -1053,9 +1035,6 @@ packages: '@tybys/wasm-util@0.10.2': resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} - '@types/argparse@1.0.38': - resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} - '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -1196,26 +1175,6 @@ packages: '@volar/typescript@2.4.28': resolution: {integrity: sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==} - '@vue/compiler-core@3.5.33': - resolution: {integrity: sha512-3PZLQwFw4Za3TC8t0FvTy3wI16Kt+pmwcgNZca4Pj9iWL2E72a/gZlpBtAJvEdDMdCxdG/qq0C7PN0bsJuv0Rw==} - - '@vue/compiler-dom@3.5.33': - resolution: {integrity: sha512-PXq0yrfCLzzL07rbXO4awtXY1Z06LG2eu6Adg3RJFa/j3Cii217XxxLXG22N330gw7GmALCY0Z8RgXEviwgpjA==} - - '@vue/compiler-vue2@2.7.16': - resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} - - '@vue/language-core@2.2.0': - resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@vue/shared@3.5.33': - resolution: {integrity: sha512-5vR2QIlmaLG77Ygd4pMP6+SGQ5yox9VhtnbDWTy9DzMzdmeLxZ1QqxrywEZ9sa1AVubfIJyaCG3ytyWU81ufcQ==} - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1230,31 +1189,9 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - ajv-draft-04@1.0.0: - resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} - peerDependencies: - ajv: ^8.5.0 - peerDependenciesMeta: - ajv: - optional: true - - ajv-formats@3.0.1: - resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ajv@8.18.0: - resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} - - alien-signals@0.4.9: - resolution: {integrity: sha512-piRGlMgQ65uRiY06mGU7I432AwPwAGf64TK1RXtM1Px4pPfLMTGI9TmsHTfioW1GukZRsNzkVQ/uHjhhd231Ow==} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1274,9 +1211,6 @@ packages: arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - balanced-match@1.0.0: resolution: {integrity: sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==} @@ -1333,9 +1267,6 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - de-indent@1.0.2: - resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} - debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -1356,10 +1287,6 @@ packages: resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} engines: {node: '>=0.3.1'} - diff@8.0.4: - resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} - engines: {node: '>=0.3.1'} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -1376,10 +1303,6 @@ packages: resolution: {integrity: sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA==} engines: {node: '>=10.13.0'} - entities@7.0.1: - resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} - engines: {node: '>=0.12'} - es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -1465,9 +1388,6 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.1.0: - resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} - fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -1496,10 +1416,6 @@ packages: resolution: {integrity: sha512-lXeSPRCndWPaipZbtI4CkvTZpF6OPsy19dkvf7+5AHeJD+w+iAKPc9Q78xWBmX4SdR+8xrtY9jTXs/YDv8q+Ug==} engines: {node: '>=14'} - fs-extra@11.3.4: - resolution: {integrity: sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==} - engines: {node: '>=14.14'} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1521,10 +1437,6 @@ packages: deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true - glob@13.0.6: - resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} - engines: {node: 18 || 20 || >=22} - globals@17.6.0: resolution: {integrity: sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==} engines: {node: '>=18'} @@ -1532,18 +1444,10 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - hasown@2.0.3: resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==} engines: {node: '>= 0.4'} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - hermes-estree@0.25.1: resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} @@ -1558,10 +1462,6 @@ packages: resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} - import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -1593,9 +1493,6 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true - jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1610,9 +1507,6 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -1621,9 +1515,6 @@ packages: engines: {node: '>=6'} hasBin: true - jsonfile@6.2.1: - resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==} - keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -1720,10 +1611,6 @@ packages: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} - lru-cache@11.3.5: - resolution: {integrity: sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw==} - engines: {node: 20 || >=22} - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -1733,10 +1620,6 @@ packages: make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - minimatch@10.2.3: - resolution: {integrity: sha512-Rwi3pnapEqirPSbWbrZaa6N3nmqq4Xer/2XooiOKyV3q12ML06f7MOuc5DVH8ONZIFhwIYQ3yzPH4nt7iWHaTg==} - engines: {node: 18 || 20 || >=22} - minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} @@ -1755,9 +1638,6 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - muggle-string@0.4.1: - resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} - nanoid@3.3.12: resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1806,10 +1686,6 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - path-scurry@2.0.2: - resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} - engines: {node: 18 || 20 || >=22} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -1858,10 +1734,6 @@ packages: resolution: {integrity: sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==} engines: {node: '>=0.10.0'} - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - reselect@5.1.1: resolution: {integrity: sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==} @@ -1913,17 +1785,6 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - - string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - string-width@4.2.0: resolution: {integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==} engines: {node: '>=8'} @@ -1940,10 +1801,6 @@ packages: resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -2010,11 +1867,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -2029,10 +1881,6 @@ packages: undici-types@7.19.2: resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==} - universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} - engines: {node: '>= 10.0.0'} - unplugin-dts@1.0.0: resolution: {integrity: sha512-qz+U1lCscwq+t8Mkaxy5Esa7IQ5wWV18b4mnioOXSdnPaNiJ0+qgE3I+KL6UkXYZWxxGo2qdGone8LEQ52Sfkw==} peerDependencies: @@ -2084,15 +1932,6 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - vite-plugin-dts@4.5.4: - resolution: {integrity: sha512-d4sOM8M/8z7vRXHHq/ebbblfaxENjogAAekcfcDCCwAyvGqnPrc7f4NZbvItS+g4WTgerW0xDwSz5qz11JT3vg==} - peerDependencies: - typescript: '*' - vite: '*' - peerDependenciesMeta: - vite: - optional: true - vite-plugin-dts@5.0.0: resolution: {integrity: sha512-VLNAUttBq7pLxxL/m/ztjd5zj5yiviiC7ijfPFVLK5c45FLcibvieBsdjSka3a4ag1qdrAF9K3OysH4/lW+rPQ==} peerDependencies: @@ -2569,41 +2408,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@microsoft/api-extractor-model@7.33.8(@types/node@25.6.0)': - dependencies: - '@microsoft/tsdoc': 0.16.0 - '@microsoft/tsdoc-config': 0.18.1 - '@rushstack/node-core-library': 5.23.1(@types/node@25.6.0) - transitivePeerDependencies: - - '@types/node' - - '@microsoft/api-extractor@7.58.7(@types/node@25.6.0)': - dependencies: - '@microsoft/api-extractor-model': 7.33.8(@types/node@25.6.0) - '@microsoft/tsdoc': 0.16.0 - '@microsoft/tsdoc-config': 0.18.1 - '@rushstack/node-core-library': 5.23.1(@types/node@25.6.0) - '@rushstack/rig-package': 0.7.3 - '@rushstack/terminal': 0.24.0(@types/node@25.6.0) - '@rushstack/ts-command-line': 5.3.9(@types/node@25.6.0) - diff: 8.0.4 - minimatch: 10.2.3 - resolve: 1.22.12 - semver: 7.7.4 - source-map: 0.6.1 - typescript: 5.9.3 - transitivePeerDependencies: - - '@types/node' - - '@microsoft/tsdoc-config@0.18.1': - dependencies: - '@microsoft/tsdoc': 0.16.0 - ajv: 8.18.0 - jju: 1.4.0 - resolve: 1.22.12 - - '@microsoft/tsdoc@0.16.0': {} - '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: '@emnapi/core': 1.10.0 @@ -2763,45 +2567,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.60.2': optional: true - '@rushstack/node-core-library@5.23.1(@types/node@25.6.0)': - dependencies: - ajv: 8.18.0 - ajv-draft-04: 1.0.0(ajv@8.18.0) - ajv-formats: 3.0.1(ajv@8.18.0) - fs-extra: 11.3.4 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.12 - semver: 7.7.4 - optionalDependencies: - '@types/node': 25.6.0 - - '@rushstack/problem-matcher@0.2.1(@types/node@25.6.0)': - optionalDependencies: - '@types/node': 25.6.0 - - '@rushstack/rig-package@0.7.3': - dependencies: - jju: 1.4.0 - resolve: 1.22.12 - - '@rushstack/terminal@0.24.0(@types/node@25.6.0)': - dependencies: - '@rushstack/node-core-library': 5.23.1(@types/node@25.6.0) - '@rushstack/problem-matcher': 0.2.1(@types/node@25.6.0) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 25.6.0 - - '@rushstack/ts-command-line@5.3.9(@types/node@25.6.0)': - dependencies: - '@rushstack/terminal': 0.24.0(@types/node@25.6.0) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.2 - transitivePeerDependencies: - - '@types/node' - '@tailwindcss/node@4.2.4': dependencies: '@jridgewell/remapping': 2.3.5 @@ -2901,8 +2666,6 @@ snapshots: tslib: 2.8.1 optional: true - '@types/argparse@1.0.38': {} - '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.29.3 @@ -3088,39 +2851,6 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.1.0 - '@vue/compiler-core@3.5.33': - dependencies: - '@babel/parser': 7.29.3 - '@vue/shared': 3.5.33 - entities: 7.0.1 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - - '@vue/compiler-dom@3.5.33': - dependencies: - '@vue/compiler-core': 3.5.33 - '@vue/shared': 3.5.33 - - '@vue/compiler-vue2@2.7.16': - dependencies: - de-indent: 1.0.2 - he: 1.2.0 - - '@vue/language-core@2.2.0(typescript@6.0.3)': - dependencies: - '@volar/language-core': 2.4.28 - '@vue/compiler-dom': 3.5.33 - '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.5.33 - alien-signals: 0.4.9 - minimatch: 9.0.9 - muggle-string: 0.4.1 - path-browserify: 1.0.1 - optionalDependencies: - typescript: 6.0.3 - - '@vue/shared@3.5.33': {} - acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 @@ -3131,14 +2861,6 @@ snapshots: acorn@8.16.0: {} - ajv-draft-04@1.0.0(ajv@8.18.0): - optionalDependencies: - ajv: 8.18.0 - - ajv-formats@3.0.1(ajv@8.18.0): - optionalDependencies: - ajv: 8.18.0 - ajv@6.15.0: dependencies: fast-deep-equal: 3.1.3 @@ -3146,15 +2868,6 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ajv@8.18.0: - dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.1.0 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - - alien-signals@0.4.9: {} - ansi-regex@5.0.1: {} ansi-regex@6.2.2: {} @@ -3167,10 +2880,6 @@ snapshots: arg@4.1.3: {} - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - balanced-match@1.0.0: {} balanced-match@4.0.4: {} @@ -3219,8 +2928,6 @@ snapshots: csstype@3.2.3: {} - de-indent@1.0.2: {} - debug@4.4.3: dependencies: ms: 2.1.3 @@ -3231,8 +2938,6 @@ snapshots: diff@4.0.4: {} - diff@8.0.4: {} - eastasianwidth@0.2.0: {} electron-to-chromium@1.5.349: {} @@ -3246,8 +2951,6 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.3.3 - entities@7.0.1: {} - es-errors@1.3.0: {} esbuild@0.27.7: @@ -3374,8 +3077,6 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@3.1.0: {} - fdir@6.5.0(picomatch@4.0.4): optionalDependencies: picomatch: 4.0.4 @@ -3402,12 +3103,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fs-extra@11.3.4: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.2.1 - universalify: 2.0.1 - fsevents@2.3.3: optional: true @@ -3428,24 +3123,14 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 - glob@13.0.6: - dependencies: - minimatch: 10.2.5 - minipass: 7.1.3 - path-scurry: 2.0.2 - globals@17.6.0: {} graceful-fs@4.2.11: {} - has-flag@4.0.0: {} - hasown@2.0.3: dependencies: function-bind: 1.1.2 - he@1.2.0: {} - hermes-estree@0.25.1: {} hermes-parser@0.25.1: @@ -3456,8 +3141,6 @@ snapshots: ignore@7.0.5: {} - import-lazy@4.0.0: {} - imurmurhash@0.1.4: {} is-core-module@2.16.1: @@ -3482,8 +3165,6 @@ snapshots: jiti@2.6.1: {} - jju@1.4.0: {} - js-tokens@4.0.0: {} jsesc@3.1.0: {} @@ -3492,18 +3173,10 @@ snapshots: json-schema-traverse@0.4.1: {} - json-schema-traverse@1.0.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} json5@2.2.3: {} - jsonfile@6.2.1: - dependencies: - universalify: 2.0.1 - optionalDependencies: - graceful-fs: 4.2.11 - keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -3576,8 +3249,6 @@ snapshots: lru-cache@10.2.0: {} - lru-cache@11.3.5: {} - lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -3588,10 +3259,6 @@ snapshots: make-error@1.3.6: {} - minimatch@10.2.3: - dependencies: - brace-expansion: 5.0.5 - minimatch@10.2.5: dependencies: brace-expansion: 5.0.5 @@ -3611,8 +3278,6 @@ snapshots: ms@2.1.3: {} - muggle-string@0.4.1: {} - nanoid@3.3.12: {} natural-compare@1.4.0: {} @@ -3653,11 +3318,6 @@ snapshots: lru-cache: 10.2.0 minipass: 7.1.3 - path-scurry@2.0.2: - dependencies: - lru-cache: 11.3.5 - minipass: 7.1.3 - pathe@2.0.3: {} picocolors@1.1.1: {} @@ -3703,8 +3363,6 @@ snapshots: react@19.2.5: {} - require-from-string@2.0.2: {} - reselect@5.1.1: {} resolve@1.22.12: @@ -3786,12 +3444,6 @@ snapshots: source-map-js@1.2.1: {} - source-map@0.6.1: {} - - sprintf-js@1.0.3: {} - - string-argv@0.3.2: {} - string-width@4.2.0: dependencies: emoji-regex: 8.0.0 @@ -3812,10 +3464,6 @@ snapshots: dependencies: ansi-regex: 6.2.2 - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} tailwind-merge@3.5.0: {} @@ -3884,8 +3532,6 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@5.9.3: {} - typescript@6.0.3: {} ufo@1.6.4: {} @@ -3894,9 +3540,7 @@ snapshots: undici-types@7.19.2: {} - universalify@2.0.1: {} - - unplugin-dts@1.0.0(@microsoft/api-extractor@7.58.7(@types/node@25.6.0))(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): + unplugin-dts@1.0.0(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.60.2) '@volar/typescript': 2.4.28 @@ -3908,7 +3552,6 @@ snapshots: typescript: 6.0.3 unplugin: 2.3.2 optionalDependencies: - '@microsoft/api-extractor': 7.58.7(@types/node@25.6.0) esbuild: 0.27.7 rollup: 4.60.2 vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) @@ -3937,30 +3580,10 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - vite-plugin-dts@4.5.4(@types/node@25.6.0)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): + vite-plugin-dts@5.0.0(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): dependencies: - '@microsoft/api-extractor': 7.58.7(@types/node@25.6.0) - '@rollup/pluginutils': 5.3.0(rollup@4.60.2) - '@volar/typescript': 2.4.28 - '@vue/language-core': 2.2.0(typescript@6.0.3) - compare-versions: 6.1.1 - debug: 4.4.3 - kolorist: 1.8.0 - local-pkg: 1.1.2 - magic-string: 0.30.21 - typescript: 6.0.3 + unplugin-dts: 1.0.0(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) optionalDependencies: - vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-plugin-dts@5.0.0(@microsoft/api-extractor@7.58.7(@types/node@25.6.0))(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)): - dependencies: - unplugin-dts: 1.0.0(@microsoft/api-extractor@7.58.7(@types/node@25.6.0))(esbuild@0.27.7)(rollup@4.60.2)(typescript@6.0.3)(vite@7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0)) - optionalDependencies: - '@microsoft/api-extractor': 7.58.7(@types/node@25.6.0) rollup: 4.60.2 vite: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.32.0) transitivePeerDependencies: diff --git a/templates/vite-react-lib/package.json b/templates/vite-react-lib/package.json index 5c912a2..00fa40e 100644 --- a/templates/vite-react-lib/package.json +++ b/templates/vite-react-lib/package.json @@ -29,8 +29,10 @@ }, "devDependencies": { "@types/node": "^25.6.0", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^6.0.1", - "glob": "^13.0.6", + "tinyglobby": "^0.2.16", "ts-node": "^10.9.2", "typescript": "^6.0.3", "vite": "^8.0.10" diff --git a/templates/vite-react-lib/scripts/gen-index.ts b/templates/vite-react-lib/scripts/gen-index.ts index e03849c..64433db 100644 --- a/templates/vite-react-lib/scripts/gen-index.ts +++ b/templates/vite-react-lib/scripts/gen-index.ts @@ -1,6 +1,7 @@ import fs from "fs"; import path from "path"; -import { globSync } from "glob"; +// 1. 引入 tinyglobby +import { globSync } from "tinyglobby"; interface Config { outputDir: string; @@ -77,13 +78,12 @@ function generateIndexFile(config: Config) { // ------ scanDirs forEach start ------------------------ config.scanDirs.forEach((dir) => { + // 2. 路径模式保持不变,tinyglobby 能够正确处理 const scanPattern = path.resolve(currentPath, dir, "**", "*.*"); const allFilePath = globSync(scanPattern, { absolute: true, - windowsPathsNoEscape: true, - dot: false, - follow: true, + // 3. 移除了 windowsPathsNoEscape,tinyglobby 默认处理路径更智能 }); const validFiles = allFilePath.filter((filePath) => {