@devup-ui/next-plugin 1.0.42 → 1.0.44
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 +166 -0
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.js +26 -27
- package/package.json +4 -4
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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("node:fs"),r=require("node:path"),b=require("@devup-ui/webpack-plugin");function k(s,n={}){if(process.env.TURBOPACK==="1"){s??={},s.turbopack??={},s.turbopack.rules??={};const{package:i="@devup-ui/react",distDir:e="df",cssDir:u=r.resolve(e,"devup-ui"),singleCss:l=!1}=n,p=r.join(e,"sheet.json"),o=r.join(e,"classMap.json"),d=r.join(e,"fileMap.json"),a=r.join(e,".gitignore");t.existsSync(e)||t.mkdirSync(e),t.existsSync(u)||t.mkdirSync(u),t.existsSync(a)||t.writeFileSync(a,"*");const v={[r.basename(u)]:[{loader:"@devup-ui/webpack-plugin/css-loader",options:{watch:process.env.NODE_ENV==="development"}}],"*.{tsx,ts,js,mjs}":[{loader:"@devup-ui/webpack-plugin/loader",options:{package:i,cssDir:u,sheetFile:p,classMapFile:o,fileMapFile:d,watch:process.env.NODE_ENV==="development",singleCss:l}}]};return Object.assign(s.turbopack.rules,v),s}const{webpack:c}=s;return s.webpack=(i,e)=>(n.cssDir??=r.resolve(e.dev?n.distDir??"df":".next/cache",`devup-ui_${e.buildId}`),i.plugins.push(new b.DevupUIWebpackPlugin({...n,watch:e.dev})),typeof c=="function"?c(i,e):i),s}exports.DevupUI=k;
|
package/dist/plugin.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { existsSync as
|
|
2
|
-
import { resolve as n, join as
|
|
3
|
-
import { DevupUIWebpackPlugin as
|
|
4
|
-
function
|
|
5
|
-
var c;
|
|
1
|
+
import { existsSync as u, mkdirSync as l, writeFileSync as m } from "node:fs";
|
|
2
|
+
import { resolve as n, join as i, basename as w } from "node:path";
|
|
3
|
+
import { DevupUIWebpackPlugin as D } from "@devup-ui/webpack-plugin";
|
|
4
|
+
function g(s, t = {}) {
|
|
6
5
|
if (process.env.TURBOPACK === "1") {
|
|
7
|
-
s
|
|
6
|
+
s ??= {}, s.turbopack ??= {}, s.turbopack.rules ??= {};
|
|
8
7
|
const {
|
|
9
|
-
package:
|
|
8
|
+
package: r = "@devup-ui/react",
|
|
10
9
|
distDir: e = "df",
|
|
11
|
-
cssDir:
|
|
12
|
-
singleCss:
|
|
13
|
-
} =
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
[
|
|
10
|
+
cssDir: a = n(e, "devup-ui"),
|
|
11
|
+
singleCss: o = !1
|
|
12
|
+
} = t, d = i(e, "sheet.json"), v = i(e, "classMap.json"), b = i(e, "fileMap.json"), c = i(e, ".gitignore");
|
|
13
|
+
u(e) || l(e), u(a) || l(a), u(c) || m(c, "*");
|
|
14
|
+
const k = {
|
|
15
|
+
[w(a)]: [
|
|
17
16
|
{
|
|
18
17
|
loader: "@devup-ui/webpack-plugin/css-loader",
|
|
19
18
|
options: {
|
|
@@ -25,30 +24,30 @@ function E(s, r = {}) {
|
|
|
25
24
|
{
|
|
26
25
|
loader: "@devup-ui/webpack-plugin/loader",
|
|
27
26
|
options: {
|
|
28
|
-
package:
|
|
29
|
-
cssDir:
|
|
30
|
-
sheetFile:
|
|
31
|
-
classMapFile:
|
|
32
|
-
fileMapFile:
|
|
27
|
+
package: r,
|
|
28
|
+
cssDir: a,
|
|
29
|
+
sheetFile: d,
|
|
30
|
+
classMapFile: v,
|
|
31
|
+
fileMapFile: b,
|
|
33
32
|
watch: process.env.NODE_ENV === "development",
|
|
34
|
-
singleCss:
|
|
33
|
+
singleCss: o
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
]
|
|
38
37
|
};
|
|
39
|
-
return Object.assign(s.turbopack.rules,
|
|
38
|
+
return Object.assign(s.turbopack.rules, k), s;
|
|
40
39
|
}
|
|
41
40
|
const { webpack: p } = s;
|
|
42
|
-
return s.webpack = (
|
|
43
|
-
e.dev ?
|
|
41
|
+
return s.webpack = (r, e) => (t.cssDir ??= n(
|
|
42
|
+
e.dev ? t.distDir ?? "df" : ".next/cache",
|
|
44
43
|
`devup-ui_${e.buildId}`
|
|
45
|
-
)
|
|
46
|
-
new
|
|
47
|
-
...
|
|
44
|
+
), r.plugins.push(
|
|
45
|
+
new D({
|
|
46
|
+
...t,
|
|
48
47
|
watch: e.dev
|
|
49
48
|
})
|
|
50
|
-
), typeof p == "function" ? p(
|
|
49
|
+
), typeof p == "function" ? p(r, e) : r), s;
|
|
51
50
|
}
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
g as DevupUI
|
|
54
53
|
};
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"webpack"
|
|
20
20
|
],
|
|
21
21
|
"type": "module",
|
|
22
|
-
"version": "1.0.
|
|
22
|
+
"version": "1.0.44",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"next": "^15.5",
|
|
41
41
|
"browserslist": "latest",
|
|
42
|
-
"@devup-ui/webpack-plugin": "1.0.
|
|
42
|
+
"@devup-ui/webpack-plugin": "1.0.43"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"vite": "^7.1.
|
|
45
|
+
"vite": "^7.1.7",
|
|
46
46
|
"vite-plugin-dts": "^4.5.4",
|
|
47
47
|
"vitest": "^3.2.4",
|
|
48
|
-
"typescript": "^5.9.
|
|
48
|
+
"typescript": "^5.9.3",
|
|
49
49
|
"@types/webpack": "^5.28.5"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|