@devup-ui/vite-plugin 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,166 @@
1
+ <div align="center">
2
+ <img src="https://raw.githubusercontent.com/dev-five-git/devup-ui/main/media/logo.svg" alt="Devup UI logo" width="300" />
3
+ </div>
4
+
5
+ <h3 align="center">
6
+ Zero Config, Zero FOUC, Zero Runtime, CSS in JS Preprocessor
7
+ </h3>
8
+
9
+ ---
10
+
11
+ <div>
12
+ <img src='https://img.shields.io/npm/v/@devup-ui/react'>
13
+ <img src='https://img.shields.io/bundlephobia/minzip/@devup-ui/react'>
14
+ <img alt="Github Checks" src="https://badgen.net/github/checks/dev-five-git/devup-ui"/>
15
+ <img alt="Apache-2.0 License" src="https://img.shields.io/github/license/dev-five-git/devup-ui"/>
16
+ <a href="https://www.npmjs.com/package/@devup-ui/react">
17
+ <img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@devup-ui/react.svg?style=flat"/>
18
+ </a>
19
+ <a href="https://badgen.net/github/stars/dev-five-git/devup-ui">
20
+ <img alt="Github Stars" src="https://badgen.net/github/stars/dev-five-git/devup-ui" />
21
+ </a>
22
+ <a href="https://discord.gg/8zjcGc7cWh">
23
+ <img alt="Discord" src="https://img.shields.io/discord/1321362173619994644.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2" />
24
+ </a>
25
+ <a href="https://codecov.io/gh/dev-five-git/devup-ui" >
26
+ <img src="https://codecov.io/gh/dev-five-git/devup-ui/graph/badge.svg?token=8I5GMB2X5B"/>
27
+ </a>
28
+ </div>
29
+
30
+ ---
31
+
32
+ English | [한국어](README_ko.md)
33
+
34
+ ## Install
35
+
36
+ ```sh
37
+ npm install @devup-ui/react
38
+
39
+ # on next.js
40
+ npm install @devup-ui/next-plugin
41
+
42
+ # on vite
43
+ npm install @devup-ui/vite-plugin
44
+
45
+ # on rsbuild
46
+ npm install @devup-ui/rsbuild-plugin
47
+
48
+ # on webpack
49
+ npm install @devup-ui/webpack-plugin
50
+ ```
51
+
52
+ ## Features
53
+
54
+ - Preprocessor
55
+ - Zero Config
56
+ - Zero FOUC
57
+ - Zero Runtime
58
+ - RSC Support
59
+ - Must not use JavaScript, client-side logic, or hybrid solutions
60
+ - Support Library mode
61
+ - Zero Cost Dynamic Theme Support based on CSS Variables
62
+ - Theme with Typing
63
+ - Smallest size, fastest speed
64
+
65
+ ## Inspirations
66
+
67
+ - Styled System
68
+ - Chakra UI
69
+ - Theme UI
70
+ - Vanilla Extract
71
+ - Rainbow Sprinkles
72
+ - Kuma UI
73
+
74
+ ## Comparison Benchmarks
75
+
76
+ Next.js Build Time and Build Size (github action - ubuntu-latest)
77
+
78
+ | Library | Version | Build Time | Build Size |
79
+ | ---------------------- | ------- | ---------- | ----------------- |
80
+ | tailwindcss | 4.1.13 | 20.22s | 57,415,796 bytes |
81
+ | styleX | 0.15.4 | 38.97s | 76,257,820 bytes |
82
+ | vanilla-extract | 1.17.4 | 20.09s | 59,366,237 bytes |
83
+ | kuma-ui | 1.5.9 | 21.61s | 67,422,085 bytes |
84
+ | panda-css | 1.3.1 | 22.01s | 62,431,065 bytes |
85
+ | chakra-ui | 3.27.0 | 29.99s | 210,122,493 bytes |
86
+ | mui | 7.3.2 | 22.21s | 94,231,958 bytes |
87
+ | devup-ui(per-file css) | 1.0.18 | 18.23s | 57,440,953 bytes |
88
+ | devup-ui(single css) | 1.0.18 | 18.35s | 57,409,008 bytes |
89
+
90
+ ## How it works
91
+
92
+ Devup UI is a CSS in JS preprocessor that does not require runtime.
93
+ Devup UI eliminates the performance degradation of the browser through the CSS in JS preprocessor.
94
+ We develop a preprocessor that considers all grammatical cases.
95
+
96
+ ```tsx
97
+ const before = <Box bg="red" />
98
+
99
+ const after = <div className="d0" />
100
+ ```
101
+
102
+ Variables are fully supported.
103
+
104
+ ```tsx
105
+ const before = <Box bg={colorVariable} />
106
+
107
+ const after = (
108
+ <div
109
+ className="d0"
110
+ style={{
111
+ '--d0': colorVariable,
112
+ }}
113
+ />
114
+ )
115
+ ```
116
+
117
+ Various expressions and responsiveness are also fully supported.
118
+
119
+ ```tsx
120
+ const before = <Box bg={['red', 'blue', a > b ? 'yellow' : variable]} />
121
+
122
+ const after = (
123
+ <div
124
+ className={`d0 d1 ${a > b ? 'd2' : 'd3'}`}
125
+ style={{
126
+ '--d2': variable,
127
+ }}
128
+ />
129
+ )
130
+ ```
131
+
132
+ Support Theme with Typing
133
+
134
+ `devup.json`
135
+
136
+ ```json
137
+ {
138
+ "theme": {
139
+ "colors": {
140
+ "default": {
141
+ "text": "#000"
142
+ },
143
+ "dark": {
144
+ "text": "white"
145
+ }
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ ```tsx
152
+ // Type Safe
153
+ <Text color="$text" />
154
+ ```
155
+
156
+ Support Responsive And Pseudo Selector
157
+
158
+ You can use responsive and pseudo selector.
159
+
160
+ ```tsx
161
+ // Responsive with Selector
162
+ const box = <Box _hover={{ bg: ['red', 'blue'] }} />
163
+
164
+ // Same
165
+ const box = <Box _hover={[{ bg: 'red' }, { bg: 'blue' }]} />
166
+ ```
package/dist/plugin.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("node:fs"),l=require("node:fs/promises"),t=require("node:path"),o=require("@devup-ui/wasm");function T(r){return r.endsWith("devup-ui.css")?null:parseInt(r.split("devup-ui-")[1].split(".")[0])}async function F(r){var c;try{const n=p.existsSync(r.devupFile)?await l.readFile(r.devupFile,"utf-8"):void 0;if(n){o.registerTheme(((c=JSON.parse(n))==null?void 0:c.theme)??{});const a=o.getThemeInterface(r.package,"DevupThemeColors","DevupThemeTypography","DevupTheme");a&&await l.writeFile(t.join(r.distDir,"theme.d.ts"),a,"utf-8")}else o.registerTheme({})}catch(n){console.error(n),o.registerTheme({})}await Promise.all([p.existsSync(r.cssDir)?Promise.resolve():l.mkdir(r.cssDir,{recursive:!0}),r.singleCss?Promise.resolve():l.writeFile(t.join(r.cssDir,"devup-ui.css"),o.getCss(null,!1))])}function N({package:r="@devup-ui/react",devupFile:c="devup.json",distDir:n="df",cssDir:a=t.resolve(n,"devup-ui"),extractCss:m=!0,debug:S=!1,include:h=[],singleCss:d=!1}={}){o.setDebug(S);const f=new Map;return{name:"devup-ui",async configResolved(){p.existsSync(n)||await l.mkdir(n,{recursive:!0}),await l.writeFile(t.join(n,".gitignore"),"*","utf-8"),await F({package:r,cssDir:a,devupFile:c,distDir:n,singleCss:d})},config(){const i=o.getDefaultTheme(),e={};i&&(e["process.env.DEVUP_UI_DEFAULT_THEME"]=JSON.stringify(i));const s={server:{watch:{ignored:[`!${c}`]}},define:e,optimizeDeps:{exclude:h}};return m&&(s.build={rollupOptions:{output:{manualChunks(u){if(u.split("?")[0].endsWith("devup-ui.css"))return"devup-ui.css"}}}}),s},apply(){return!0},async watchChange(i){if(t.resolve(i)===t.resolve(c)&&p.existsSync(c))try{await F({package:r,cssDir:a,devupFile:c,distDir:n,singleCss:d})}catch(e){console.error(e)}},resolveId(i,e){var s;if(i.includes("devup-ui.css")&&t.resolve(e?t.join(t.dirname(e),i):i)===t.resolve(t.join(a,"devup-ui.css")))return t.join(a,`devup-ui.css?t=${Date.now().toString()+(((s=f.get(null))==null?void 0:s.length)??0)}`)},load(i){const e=t.basename(i).split("?")[0];if(e.startsWith("devup-ui")&&e.endsWith(".css")){const s=T(e),u=o.getCss(s,!1);return f.set(s,u),u}},enforce:"pre",async transform(i,e){if(!m)return;const s=e.split("?")[0];if(!/\.(tsx|ts|js|mjs|jsx)$/i.test(s)||new RegExp(`node_modules(?!.*(${["@devup-ui",...h].join("|").replaceAll("/","[\\/\\\\_]")})([\\/\\\\.]|$))`).test(s))return;let u=t.relative(t.dirname(e),a).replaceAll("\\","/");u.startsWith("./")||(u=`./${u}`);const{code:$,css:w="",map:_,cssFile:v,updatedBaseStyle:x}=o.codeExtract(s,i,r,u,d,!0,!1),g=[];if(x&&g.push(l.writeFile(t.join(a,"devup-ui.css"),o.getCss(null,!1),"utf-8")),v){const y=T(v),j=f.get(y);j&&j.length<w.length&&f.set(y,w),g.push(l.writeFile(t.join(a,t.basename(v)),`/* ${e} ${Date.now()} */`,"utf-8"))}return await Promise.all(g),{code:$,map:_}},async generateBundle(i,e){if(!m)return;const s=Object.keys(e).find(u=>e[u].name==="devup-ui.css");s&&"source"in e[s]&&(e[s].source=f.get(null))}}}exports.DevupUI=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("node:fs"),c=require("node:fs/promises"),t=require("node:path"),a=require("@devup-ui/wasm");function T(s){return s.endsWith("devup-ui.css")?null:parseInt(s.split("devup-ui-")[1].split(".")[0])}async function F(s){try{const u=f.existsSync(s.devupFile)?await c.readFile(s.devupFile,"utf-8"):void 0;if(u){a.registerTheme(JSON.parse(u)?.theme??{});const o=a.getThemeInterface(s.package,"DevupThemeColors","DevupThemeTypography","DevupTheme");o&&await c.writeFile(t.join(s.distDir,"theme.d.ts"),o,"utf-8")}else a.registerTheme({})}catch(u){console.error(u),a.registerTheme({})}await Promise.all([f.existsSync(s.cssDir)?Promise.resolve():c.mkdir(s.cssDir,{recursive:!0}),s.singleCss?Promise.resolve():c.writeFile(t.join(s.cssDir,"devup-ui.css"),a.getCss(null,!1))])}function E({package:s="@devup-ui/react",devupFile:u="devup.json",distDir:o="df",cssDir:l=t.resolve(o,"devup-ui"),extractCss:m=!0,debug:S=!1,include:v=[],singleCss:d=!1}={}){a.setDebug(S);const p=new Map;return{name:"devup-ui",async configResolved(){f.existsSync(o)||await c.mkdir(o,{recursive:!0}),await c.writeFile(t.join(o,".gitignore"),"*","utf-8"),await F({package:s,cssDir:l,devupFile:u,distDir:o,singleCss:d})},config(){const r=a.getDefaultTheme(),e={};r&&(e["process.env.DEVUP_UI_DEFAULT_THEME"]=JSON.stringify(r));const i={server:{watch:{ignored:[`!${u}`]}},define:e,optimizeDeps:{exclude:[...v,"@devup-ui/components"]},ssr:{noExternal:[...v,/@devup-ui/]}};return m&&(i.build={rollupOptions:{output:{manualChunks(n){if(n.split("?")[0].endsWith("devup-ui.css"))return"devup-ui.css"}}}}),i},apply(){return!0},async watchChange(r){if(t.resolve(r)===t.resolve(u)&&f.existsSync(u))try{await F({package:s,cssDir:l,devupFile:u,distDir:o,singleCss:d})}catch(e){console.error(e)}},resolveId(r,e){if(r.includes("devup-ui.css")&&t.resolve(e?t.join(t.dirname(e),r):r)===t.resolve(t.join(l,"devup-ui.css")))return t.join(l,`devup-ui.css?t=${Date.now().toString()+(p.get(null)?.length??0)}`)},load(r){const e=t.basename(r).split("?")[0];if(e.startsWith("devup-ui")&&e.endsWith(".css")){const i=T(e),n=a.getCss(i,!1);return p.set(i,n),n}},enforce:"pre",async transform(r,e){if(!m)return;const i=e.split("?")[0];if(!/\.(tsx|ts|js|mjs|jsx)$/i.test(i)||new RegExp(`node_modules(?!.*(${["@devup-ui",...v].join("|").replaceAll("/","[\\/\\\\_]")})([\\/\\\\.]|$))`).test(i))return;let n=t.relative(t.dirname(e),l).replaceAll("\\","/");n.startsWith("./")||(n=`./${n}`);const{code:$,css:w="",map:x,cssFile:g,updatedBaseStyle:_}=a.codeExtract(i,r,s,n,d,!0,!1),h=[];if(_&&h.push(c.writeFile(t.join(l,"devup-ui.css"),a.getCss(null,!1),"utf-8")),g){const y=T(g),j=p.get(y);j&&j.length<w.length&&p.set(y,w),h.push(c.writeFile(t.join(l,t.basename(g)),`/* ${e} ${Date.now()} */`,"utf-8"))}return await Promise.all(h),{code:$,map:x}},async generateBundle(r,e){if(!m)return;const i=Object.keys(e).find(n=>e[n].name==="devup-ui.css");i&&"source"in e[i]&&(e[i].source=p.get(null))}}}exports.DevupUI=E;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,MAAM,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;CACnB;AAgDD,wBAAgB,OAAO,CAAC,EACtB,OAAO,EAAE,UAA8B,EACvC,SAAwB,EACxB,OAAc,EACd,MAAqC,EACrC,UAAiB,EACjB,KAAa,EACb,OAAY,EACZ,SAAiB,GAClB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAAG,YAAY,CA0JnD"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,MAAM,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;CACnB;AAgDD,wBAAgB,OAAO,CAAC,EACtB,OAAO,EAAE,UAA8B,EACvC,SAAwB,EACxB,OAAc,EACd,MAAqC,EACrC,UAAiB,EACjB,KAAa,EACb,OAAY,EACZ,SAAiB,GAClB,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAAG,YAAY,CA6JnD"}
package/dist/plugin.js CHANGED
@@ -1,158 +1,159 @@
1
1
  import { existsSync as p } from "node:fs";
2
- import { writeFile as f, mkdir as k, readFile as W } from "node:fs/promises";
3
- import { relative as C, dirname as N, resolve as l, join as c, basename as E } from "node:path";
4
- import { setDebug as O, codeExtract as U, getCss as w, getDefaultTheme as A, registerTheme as g, getThemeInterface as B } from "@devup-ui/wasm";
5
- function F(s) {
6
- return s.endsWith("devup-ui.css") ? null : parseInt(s.split("devup-ui-")[1].split(".")[0]);
2
+ import { writeFile as f, mkdir as _, readFile as W } from "node:fs/promises";
3
+ import { relative as C, dirname as E, resolve as l, join as a, basename as N } from "node:path";
4
+ import { setDebug as O, codeExtract as U, getCss as y, getDefaultTheme as A, registerTheme as w, getThemeInterface as B } from "@devup-ui/wasm";
5
+ function x(t) {
6
+ return t.endsWith("devup-ui.css") ? null : parseInt(t.split("devup-ui-")[1].split(".")[0]);
7
7
  }
8
- async function _(s) {
9
- var a;
8
+ async function F(t) {
10
9
  try {
11
- const u = p(s.devupFile) ? await W(s.devupFile, "utf-8") : void 0;
12
- if (u) {
13
- g(((a = JSON.parse(u)) == null ? void 0 : a.theme) ?? {});
10
+ const n = p(t.devupFile) ? await W(t.devupFile, "utf-8") : void 0;
11
+ if (n) {
12
+ w(JSON.parse(n)?.theme ?? {});
14
13
  const i = B(
15
- s.package,
14
+ t.package,
16
15
  "DevupThemeColors",
17
16
  "DevupThemeTypography",
18
17
  "DevupTheme"
19
18
  );
20
19
  i && await f(
21
- c(s.distDir, "theme.d.ts"),
20
+ a(t.distDir, "theme.d.ts"),
22
21
  i,
23
22
  "utf-8"
24
23
  );
25
24
  } else
26
- g({});
27
- } catch (u) {
28
- console.error(u), g({});
25
+ w({});
26
+ } catch (n) {
27
+ console.error(n), w({});
29
28
  }
30
29
  await Promise.all([
31
- p(s.cssDir) ? Promise.resolve() : k(s.cssDir, { recursive: !0 }),
32
- s.singleCss ? Promise.resolve() : f(c(s.cssDir, "devup-ui.css"), w(null, !1))
30
+ p(t.cssDir) ? Promise.resolve() : _(t.cssDir, { recursive: !0 }),
31
+ t.singleCss ? Promise.resolve() : f(a(t.cssDir, "devup-ui.css"), y(null, !1))
33
32
  ]);
34
33
  }
35
34
  function z({
36
- package: s = "@devup-ui/react",
37
- devupFile: a = "devup.json",
38
- distDir: u = "df",
39
- cssDir: i = l(u, "devup-ui"),
35
+ package: t = "@devup-ui/react",
36
+ devupFile: n = "devup.json",
37
+ distDir: i = "df",
38
+ cssDir: o = l(i, "devup-ui"),
40
39
  extractCss: m = !0,
41
- debug: x = !1,
42
- include: y = [],
40
+ debug: k = !1,
41
+ include: v = [],
43
42
  singleCss: d = !1
44
43
  } = {}) {
45
- O(x);
46
- const o = /* @__PURE__ */ new Map();
44
+ O(k);
45
+ const c = /* @__PURE__ */ new Map();
47
46
  return {
48
47
  name: "devup-ui",
49
48
  async configResolved() {
50
- p(u) || await k(u, { recursive: !0 }), await f(c(u, ".gitignore"), "*", "utf-8"), await _({
51
- package: s,
52
- cssDir: i,
53
- devupFile: a,
54
- distDir: u,
49
+ p(i) || await _(i, { recursive: !0 }), await f(a(i, ".gitignore"), "*", "utf-8"), await F({
50
+ package: t,
51
+ cssDir: o,
52
+ devupFile: n,
53
+ distDir: i,
55
54
  singleCss: d
56
55
  });
57
56
  },
58
57
  config() {
59
- const r = A(), e = {};
60
- r && (e["process.env.DEVUP_UI_DEFAULT_THEME"] = JSON.stringify(r));
61
- const t = {
58
+ const s = A(), e = {};
59
+ s && (e["process.env.DEVUP_UI_DEFAULT_THEME"] = JSON.stringify(s));
60
+ const r = {
62
61
  server: {
63
62
  watch: {
64
- ignored: [`!${a}`]
63
+ ignored: [`!${n}`]
65
64
  }
66
65
  },
67
66
  define: e,
68
67
  optimizeDeps: {
69
- exclude: y
68
+ exclude: [...v, "@devup-ui/components"]
69
+ },
70
+ ssr: {
71
+ noExternal: [...v, /@devup-ui/]
70
72
  }
71
73
  };
72
- return m && (t.build = {
74
+ return m && (r.build = {
73
75
  rollupOptions: {
74
76
  output: {
75
- manualChunks(n) {
76
- if (n.split("?")[0].endsWith("devup-ui.css"))
77
+ manualChunks(u) {
78
+ if (u.split("?")[0].endsWith("devup-ui.css"))
77
79
  return "devup-ui.css";
78
80
  }
79
81
  }
80
82
  }
81
- }), t;
83
+ }), r;
82
84
  },
83
85
  apply() {
84
86
  return !0;
85
87
  },
86
- async watchChange(r) {
87
- if (l(r) === l(a) && p(a))
88
+ async watchChange(s) {
89
+ if (l(s) === l(n) && p(n))
88
90
  try {
89
- await _({
90
- package: s,
91
- cssDir: i,
92
- devupFile: a,
93
- distDir: u,
91
+ await F({
92
+ package: t,
93
+ cssDir: o,
94
+ devupFile: n,
95
+ distDir: i,
94
96
  singleCss: d
95
97
  });
96
98
  } catch (e) {
97
99
  console.error(e);
98
100
  }
99
101
  },
100
- resolveId(r, e) {
101
- var t;
102
- if (r.includes("devup-ui.css") && l(e ? c(N(e), r) : r) === l(c(i, "devup-ui.css")))
103
- return c(
104
- i,
105
- `devup-ui.css?t=${Date.now().toString() + (((t = o.get(null)) == null ? void 0 : t.length) ?? 0)}`
102
+ resolveId(s, e) {
103
+ if (s.includes("devup-ui.css") && l(e ? a(E(e), s) : s) === l(a(o, "devup-ui.css")))
104
+ return a(
105
+ o,
106
+ `devup-ui.css?t=${Date.now().toString() + (c.get(null)?.length ?? 0)}`
106
107
  );
107
108
  },
108
- load(r) {
109
- const e = E(r).split("?")[0];
109
+ load(s) {
110
+ const e = N(s).split("?")[0];
110
111
  if (e.startsWith("devup-ui") && e.endsWith(".css")) {
111
- const t = F(e), n = w(t, !1);
112
- return o.set(t, n), n;
112
+ const r = x(e), u = y(r, !1);
113
+ return c.set(r, u), u;
113
114
  }
114
115
  },
115
116
  enforce: "pre",
116
- async transform(r, e) {
117
+ async transform(s, e) {
117
118
  if (!m) return;
118
- const t = e.split("?")[0];
119
- if (!/\.(tsx|ts|js|mjs|jsx)$/i.test(t) || new RegExp(
120
- `node_modules(?!.*(${["@devup-ui", ...y].join("|").replaceAll("/", "[\\/\\\\_]")})([\\/\\\\.]|$))`
121
- ).test(t))
119
+ const r = e.split("?")[0];
120
+ if (!/\.(tsx|ts|js|mjs|jsx)$/i.test(r) || new RegExp(
121
+ `node_modules(?!.*(${["@devup-ui", ...v].join("|").replaceAll("/", "[\\/\\\\_]")})([\\/\\\\.]|$))`
122
+ ).test(r))
122
123
  return;
123
- let n = C(N(e), i).replaceAll("\\", "/");
124
- n.startsWith("./") || (n = `./${n}`);
124
+ let u = C(E(e), o).replaceAll("\\", "/");
125
+ u.startsWith("./") || (u = `./${u}`);
125
126
  const {
126
127
  code: D,
127
128
  css: T = "",
128
129
  map: I,
129
- cssFile: v,
130
+ cssFile: h,
130
131
  updatedBaseStyle: S
131
132
  // import main css in code
132
- } = U(t, r, s, n, d, !0, !1), h = [];
133
- if (S && h.push(
134
- f(c(i, "devup-ui.css"), w(null, !1), "utf-8")
135
- ), v) {
136
- const $ = F(v), j = o.get($);
137
- j && j.length < T.length && o.set($, T), h.push(
133
+ } = U(r, s, t, u, d, !0, !1), g = [];
134
+ if (S && g.push(
135
+ f(a(o, "devup-ui.css"), y(null, !1), "utf-8")
136
+ ), h) {
137
+ const $ = x(h), j = c.get($);
138
+ j && j.length < T.length && c.set($, T), g.push(
138
139
  f(
139
- c(i, E(v)),
140
+ a(o, N(h)),
140
141
  `/* ${e} ${Date.now()} */`,
141
142
  "utf-8"
142
143
  )
143
144
  );
144
145
  }
145
- return await Promise.all(h), {
146
+ return await Promise.all(g), {
146
147
  code: D,
147
148
  map: I
148
149
  };
149
150
  },
150
- async generateBundle(r, e) {
151
+ async generateBundle(s, e) {
151
152
  if (!m) return;
152
- const t = Object.keys(e).find(
153
- (n) => e[n].name === "devup-ui.css"
153
+ const r = Object.keys(e).find(
154
+ (u) => e[u].name === "devup-ui.css"
154
155
  );
155
- t && "source" in e[t] && (e[t].source = o.get(null));
156
+ r && "source" in e[r] && (e[r].source = c.get(null));
156
157
  }
157
158
  };
158
159
  }
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "vite"
19
19
  ],
20
20
  "type": "module",
21
- "version": "1.0.41",
21
+ "version": "1.0.43",
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "vite-plugin-dts": "^4.5.4",
43
- "typescript": "^5.9.2"
43
+ "typescript": "^5.9.3"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "vite": "*",