diff --git a/.changeset/large-clubs-strive.md b/.changeset/large-clubs-strive.md
new file mode 100644
index 00000000..007635ca
--- /dev/null
+++ b/.changeset/large-clubs-strive.md
@@ -0,0 +1,8 @@
+---
+"@devup-ui/rsbuild-plugin": patch
+"@devup-ui/webpack-plugin": patch
+"@devup-ui/next-plugin": patch
+"@devup-ui/vite-plugin": patch
+---
+
+Change temp dir
diff --git a/.changeset/little-ways-sneeze.md b/.changeset/little-ways-sneeze.md
new file mode 100644
index 00000000..2760c7e2
--- /dev/null
+++ b/.changeset/little-ways-sneeze.md
@@ -0,0 +1,5 @@
+---
+"@devup-ui/wasm": patch
+---
+
+Implement globalCss, Fix ?? operator issue
diff --git a/.changeset/tidy-buses-float.md b/.changeset/tidy-buses-float.md
new file mode 100644
index 00000000..303d84d6
--- /dev/null
+++ b/.changeset/tidy-buses-float.md
@@ -0,0 +1,5 @@
+---
+"@devup-ui/react": patch
+---
+
+Add globalCss
diff --git a/.df/devup-ui.css b/.df/devup-ui.css
new file mode 100644
index 00000000..62c487cc
--- /dev/null
+++ b/.df/devup-ui.css
@@ -0,0 +1 @@
+/* C:/Users/owjs3/Desktop/projects/devup-ui/packages/components/src/components/Button/__tests__/index.browser.test.tsx 1752471792555 */
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index a8102526..3563db9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,6 @@ node_modules
target
*.*.timestamp-*
coverage
-.df
build_rs_cov.profraw
tsconfig.tsbuildinfo
codecov
diff --git a/Cargo.lock b/Cargo.lock
index 87ca9eaf..a48f69f8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -53,9 +53,9 @@ checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
[[package]]
name = "bumpalo"
-version = "3.17.0"
+version = "3.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
+checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
dependencies = [
"allocator-api2",
]
@@ -255,6 +255,7 @@ dependencies = [
"once_cell",
"phf",
"regex",
+ "rstest",
"serde",
"serial_test",
]
@@ -309,6 +310,7 @@ dependencies = [
"oxc_span",
"oxc_syntax",
"phf",
+ "rstest",
"serial_test",
"strum",
"strum_macros",
@@ -380,6 +382,17 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+[[package]]
+name = "futures-macro"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "futures-sink"
version = "0.3.31"
@@ -392,6 +405,12 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+[[package]]
+name = "futures-timer"
+version = "3.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
+
[[package]]
name = "futures-util"
version = "0.3.31"
@@ -401,6 +420,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-io",
+ "futures-macro",
"futures-sink",
"futures-task",
"memchr",
@@ -409,6 +429,12 @@ dependencies = [
"slab",
]
+[[package]]
+name = "glob"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
+
[[package]]
name = "half"
version = "2.6.0"
@@ -623,9 +649,9 @@ dependencies = [
[[package]]
name = "oxc_allocator"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0ca46541ac8f29e31319b130e39a795b0bb72767c508d70e17843458b47c4f1"
+checksum = "fdbeef2a832aa69e8ca20a8ef9e37da18d1a827cf34d682685a09fe2b6caaef1"
dependencies = [
"allocator-api2",
"bumpalo",
@@ -636,9 +662,9 @@ dependencies = [
[[package]]
name = "oxc_ast"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e20bc7d2bc9ff195fb30745be6f85bbe9a3355f25fb9e27f7dd1ba2f4125e90"
+checksum = "b8135343afd05522ca069c33c663b71f4836f5aa8f951384327126febead4c30"
dependencies = [
"bitflags",
"oxc_allocator",
@@ -652,9 +678,9 @@ dependencies = [
[[package]]
name = "oxc_ast_macros"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "743cfd932620544d8a5f6556120a589fea39fa964f262b98e14cad600fcb1221"
+checksum = "8c33f44b3c4e5e473fcac4e0319f51b44a800b99d8a421d0a9e96e123b2cc1a6"
dependencies = [
"phf",
"proc-macro2",
@@ -664,9 +690,9 @@ dependencies = [
[[package]]
name = "oxc_ast_visit"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1b03354e570cc071bca9cd16cacaffb2c040ef5eb28a785c7b5f17713947101"
+checksum = "9266313d0d04b48898f7243fb05a03c10aab1c854d5f2efb41b201bed1e8ef1a"
dependencies = [
"oxc_allocator",
"oxc_ast",
@@ -676,9 +702,9 @@ dependencies = [
[[package]]
name = "oxc_cfg"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d81491e60ed2308848475d5c1393df1d9870a42570d0c4c02e86dd25d1aa7b09"
+checksum = "297c81043bd8adb4712e25ddeb6559703a8f6667ffa9b1968c089f53d41dbbaf"
dependencies = [
"bitflags",
"itertools 0.14.0",
@@ -691,9 +717,9 @@ dependencies = [
[[package]]
name = "oxc_codegen"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba472ac12faeb6e90fbb15a3f9fe0b94111b5fe5bef17ff0334290cd94b75744"
+checksum = "28369f773f38efa0e0377a789a1aaed9eae4f9c90abeb2f91aa6de343eda29e8"
dependencies = [
"bitflags",
"cow-utils",
@@ -712,28 +738,29 @@ dependencies = [
[[package]]
name = "oxc_data_structures"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acca986d8bc723d8f65cf4111242a9d8fa77b6674a47fc7e2f972c1cd3c681e4"
+checksum = "5514bed9595363bfa66bfcf6dcecedb0ed5c40f162c429a70893edb825dba9db"
dependencies = [
"rustversion",
]
[[package]]
name = "oxc_diagnostics"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df31a0ef7abc29fa3e1e1fbac9dc14a9fbb062961d265d7a77f3a6e39a0a5de8"
+checksum = "29e47cf799dd9d84be89dd3af9a110232fa6f9b305bf32f65df364c3a85dec76"
dependencies = [
"cow-utils",
"oxc-miette",
+ "percent-encoding",
]
[[package]]
name = "oxc_ecmascript"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d80328b98091673e95d2a8e1d8378271e42d7efcff9982477cfcaf54bd799564"
+checksum = "8da2043abf37c986c29fa44470b7f41f94d147c626d2db8e9edc69b867a07b8b"
dependencies = [
"num-bigint",
"num-traits",
@@ -744,9 +771,9 @@ dependencies = [
[[package]]
name = "oxc_estree"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4f30ee2c1758598f22bb6578c8cda33557a74ce7a53bdebac9b75a0aed909b5"
+checksum = "11c7b19dfa467408ae3e1f8a52bdf0b79e421f0811bef9d57df44369ff5f14a8"
[[package]]
name = "oxc_index"
@@ -756,9 +783,9 @@ checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392"
[[package]]
name = "oxc_parser"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "298a69b099cf433e2cd2ca15e786afdd1dc944cc413bbfcd8b64c499d9fecb38"
+checksum = "760adcacb436921e78a256ed467fa3cc4cd27147542ac0f94bcaf4a900a4002a"
dependencies = [
"bitflags",
"cow-utils",
@@ -779,9 +806,9 @@ dependencies = [
[[package]]
name = "oxc_regular_expression"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4288439a580f3c2b10c3ba20922908756aee61316fab82fcb209377e1d85099"
+checksum = "6af8abf0a50098480239f588f6f997148c48e0f062b78b32aedf9a7a380442cb"
dependencies = [
"bitflags",
"oxc_allocator",
@@ -795,9 +822,9 @@ dependencies = [
[[package]]
name = "oxc_semantic"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b01414db4c8ca38f005c4b3f41910ceda600261c7ed7c45fda4f0738b64a8558"
+checksum = "f67db9a6930a4dfcc849ee5cc95825882e50783f4e4e2550db4cd67f2f486121"
dependencies = [
"itertools 0.14.0",
"oxc_allocator",
@@ -831,9 +858,9 @@ dependencies = [
[[package]]
name = "oxc_span"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6eb726c595d18fe5a7f66bf7f449883608a4c7bfd50097d49db3225d22cd45b6"
+checksum = "a9be736965e94fed8a096679f493ef794718821ffc6a3e509cf6dc6c10f5d38a"
dependencies = [
"compact_str",
"oxc-miette",
@@ -844,9 +871,9 @@ dependencies = [
[[package]]
name = "oxc_syntax"
-version = "0.75.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c43d293457dacafd89fd73f9e933cc021cbb5ed1f615b21150cf727bc05b9cc6"
+checksum = "4d69df31e7fc11197b27a3edfb316d0f9bf51778f824b1dafbca68c8fac59898"
dependencies = [
"bitflags",
"cow-utils",
@@ -886,6 +913,12 @@ dependencies = [
"windows-targets",
]
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
[[package]]
name = "petgraph"
version = "0.8.2"
@@ -981,6 +1014,15 @@ dependencies = [
"plotters-backend",
]
+[[package]]
+name = "proc-macro-crate"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35"
+dependencies = [
+ "toml_edit",
+]
+
[[package]]
name = "proc-macro2"
version = "1.0.94"
@@ -1057,12 +1099,57 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+[[package]]
+name = "relative-path"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2"
+
+[[package]]
+name = "rstest"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fc39292f8613e913f7df8fa892b8944ceb47c247b78e1b1ae2f09e019be789d"
+dependencies = [
+ "futures-timer",
+ "futures-util",
+ "rstest_macros",
+ "rustc_version",
+]
+
+[[package]]
+name = "rstest_macros"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f168d99749d307be9de54d23fd226628d99768225ef08f6ffb52e0182a27746"
+dependencies = [
+ "cfg-if",
+ "glob",
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "relative-path",
+ "rustc_version",
+ "syn",
+ "unicode-ident",
+]
+
[[package]]
name = "rustc-hash"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
[[package]]
name = "rustversion"
version = "1.0.20"
@@ -1117,6 +1204,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"
+[[package]]
+name = "semver"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
+
[[package]]
name = "seq-macro"
version = "0.3.6"
@@ -1320,6 +1413,23 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "toml_datetime"
+version = "0.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
+
+[[package]]
+name = "toml_edit"
+version = "0.22.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
+dependencies = [
+ "indexmap",
+ "toml_datetime",
+ "winnow",
+]
+
[[package]]
name = "unicode-id-start"
version = "1.3.1"
@@ -1546,3 +1656,12 @@ name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95"
+dependencies = [
+ "memchr",
+]
diff --git a/apps/landing/.gitignore b/apps/landing/.gitignore
index 9a792a1f..cee5b2f0 100644
--- a/apps/landing/.gitignore
+++ b/apps/landing/.gitignore
@@ -6,7 +6,6 @@ public/search.json
/.pnp
.pnp.*
.yarn/*
-.df
!.yarn/patches
!.yarn/plugins
!.yarn/releases
diff --git a/apps/landing/src/app/layout.tsx b/apps/landing/src/app/layout.tsx
index bf8fcb7d..0962c4b1 100644
--- a/apps/landing/src/app/layout.tsx
+++ b/apps/landing/src/app/layout.tsx
@@ -1,7 +1,6 @@
-import './markdown.css'
import 'sanitize.css'
-import { css, ThemeScript } from '@devup-ui/react'
+import { css, globalCss, ThemeScript } from '@devup-ui/react'
import type { Metadata } from 'next'
import { Footer } from '../components/Footer'
@@ -25,6 +24,37 @@ export const metadata: Metadata = {
},
}
+globalCss({
+ imports: ['https://cdn.jsdelivr.net/gh/joungkyun/font-d2coding/d2coding.css'],
+ table: {
+ borderCollapse: 'collapse',
+ borderSpacing: 0,
+ border: '1px solid var(--text)',
+ color: 'var(--text, #2F2F2F)',
+ fontFamily: 'Pretendard',
+ fontSize: '16px',
+ fontStyle: 'normal',
+ fontWeight: 400,
+ lineHeight: '150%',
+ letterSpacing: '-0.48px',
+ },
+ code: {
+ fontFamily: 'D2Coding',
+ fontSize: ['13px', '15px'],
+ fontStyle: 'normal',
+ fontWeight: 700,
+ lineHeight: '1.5',
+ letterSpacing: '-0.03em',
+ },
+ 'th, td': {
+ border: '1px solid var(--text)',
+ padding: '6px 13px',
+ },
+ pre: {
+ borderRadius: '10px',
+ },
+})
+
export default function RootLayout({
children,
}: Readonly<{
diff --git a/apps/landing/src/app/markdown.css b/apps/landing/src/app/markdown.css
deleted file mode 100644
index 4cf3eb56..00000000
--- a/apps/landing/src/app/markdown.css
+++ /dev/null
@@ -1,40 +0,0 @@
-@import url(https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css);
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
- border: 1px solid var(--text);
- color: var(--text, #2F2F2F);
-
- /* Desktop/bodyReg */
- font-family: Pretendard;
- font-size: 16px;
- font-style: normal;
- font-weight: 400;
- line-height: 150%; /* 24px */
- letter-spacing: -0.48px;
-}
-
-code {
- font-family: D2Coding;
- font-size: 13px;
- font-style: normal;
- font-weight: 700;
- line-height: 1.5;
- letter-spacing: -0.03em;
-}
-
-@media (min-width: 1280px) {
- code {
- font-size: 15px;
- }
-}
-
-th, td {
- border: 1px solid var(--text);
- padding: 6px 13px;
-}
-
-pre {
- border-radius: 10px;
-}
diff --git a/apps/landing/tsconfig.json b/apps/landing/tsconfig.json
index ab49c986..426d9c2d 100644
--- a/apps/landing/tsconfig.json
+++ b/apps/landing/tsconfig.json
@@ -33,9 +33,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/apps/next/.gitignore b/apps/next/.gitignore
index ebe99d6c..5ef6a520 100644
--- a/apps/next/.gitignore
+++ b/apps/next/.gitignore
@@ -5,7 +5,6 @@
/.pnp
.pnp.*
.yarn/*
-.df
!.yarn/patches
!.yarn/plugins
!.yarn/releases
diff --git a/apps/next/src/app/layout.tsx b/apps/next/src/app/layout.tsx
index 209436c2..ec4bfaae 100644
--- a/apps/next/src/app/layout.tsx
+++ b/apps/next/src/app/layout.tsx
@@ -1,4 +1,4 @@
-import { Box } from '@devup-ui/react'
+import { Box, globalCss } from '@devup-ui/react'
import type { Metadata } from 'next'
import { Geist, Geist_Mono } from 'next/font/google'
@@ -17,6 +17,14 @@ export const metadata: Metadata = {
description: 'Generated by create next app',
}
+// eslint-disable-next-line @typescript-eslint/no-unused-expressions
+globalCss`
+ body {
+ background-color: #040 !important;
+ color: #248 !important;
+ }
+`
+
export default function RootLayout({
children,
}: Readonly<{
@@ -25,7 +33,7 @@ export default function RootLayout({
return (
- hello
+ hello
{children}
diff --git a/apps/next/tsconfig.json b/apps/next/tsconfig.json
index ab49c986..426d9c2d 100644
--- a/apps/next/tsconfig.json
+++ b/apps/next/tsconfig.json
@@ -33,9 +33,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/apps/vite-lib/tsconfig.json b/apps/vite-lib/tsconfig.json
index 09085d3e..2d26fac1 100644
--- a/apps/vite-lib/tsconfig.json
+++ b/apps/vite-lib/tsconfig.json
@@ -26,9 +26,9 @@
"include": [
"**/*.ts",
"**/*.tsx",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/apps/vite-lib/vite.config.ts b/apps/vite-lib/vite.config.ts
index 2357486e..2f372f09 100644
--- a/apps/vite-lib/vite.config.ts
+++ b/apps/vite-lib/vite.config.ts
@@ -20,7 +20,7 @@ export default defineConfig({
'**/*.test-d.(tsx|ts|js|jsx)',
'vite.config.ts',
],
- include: ['**/src/**/*.(ts|tsx)', '.df/*.d.ts'],
+ include: ['**/src/**/*.(ts|tsx)', 'df/*.d.ts'],
copyDtsFiles: true,
compilerOptions: {
isolatedModules: false,
diff --git a/apps/vite/tsconfig.json b/apps/vite/tsconfig.json
index 09085d3e..2d26fac1 100644
--- a/apps/vite/tsconfig.json
+++ b/apps/vite/tsconfig.json
@@ -26,9 +26,9 @@
"include": [
"**/*.ts",
"**/*.tsx",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/benchmark.js b/benchmark.js
index 9a124a0b..7b1006c5 100644
--- a/benchmark.js
+++ b/benchmark.js
@@ -20,8 +20,8 @@ function clearBuildFile() {
recursive: true,
force: true,
})
- if (existsSync('./benchmark/next-devup-ui/.df'))
- rmSync('./benchmark/next-devup-ui/.df', {
+ if (existsSync('./benchmark/next-devup-ui/df'))
+ rmSync('./benchmark/next-devup-ui/df', {
recursive: true,
force: true,
})
diff --git a/benchmark/next-chakra-ui/.gitignore b/benchmark/next-chakra-ui/.gitignore
index ebe99d6c..5ef6a520 100644
--- a/benchmark/next-chakra-ui/.gitignore
+++ b/benchmark/next-chakra-ui/.gitignore
@@ -5,7 +5,6 @@
/.pnp
.pnp.*
.yarn/*
-.df
!.yarn/patches
!.yarn/plugins
!.yarn/releases
diff --git a/benchmark/next-chakra-ui/tsconfig.json b/benchmark/next-chakra-ui/tsconfig.json
index ab49c986..426d9c2d 100644
--- a/benchmark/next-chakra-ui/tsconfig.json
+++ b/benchmark/next-chakra-ui/tsconfig.json
@@ -33,9 +33,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/benchmark/next-devup-ui/.gitignore b/benchmark/next-devup-ui/.gitignore
index ebe99d6c..5ef6a520 100644
--- a/benchmark/next-devup-ui/.gitignore
+++ b/benchmark/next-devup-ui/.gitignore
@@ -5,7 +5,6 @@
/.pnp
.pnp.*
.yarn/*
-.df
!.yarn/patches
!.yarn/plugins
!.yarn/releases
diff --git a/benchmark/next-devup-ui/tsconfig.json b/benchmark/next-devup-ui/tsconfig.json
index ab49c986..426d9c2d 100644
--- a/benchmark/next-devup-ui/tsconfig.json
+++ b/benchmark/next-devup-ui/tsconfig.json
@@ -33,9 +33,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/benchmark/next-kuma-ui/.gitignore b/benchmark/next-kuma-ui/.gitignore
index ebe99d6c..5ef6a520 100644
--- a/benchmark/next-kuma-ui/.gitignore
+++ b/benchmark/next-kuma-ui/.gitignore
@@ -5,7 +5,6 @@
/.pnp
.pnp.*
.yarn/*
-.df
!.yarn/patches
!.yarn/plugins
!.yarn/releases
diff --git a/benchmark/next-kuma-ui/tsconfig.json b/benchmark/next-kuma-ui/tsconfig.json
index ab49c986..426d9c2d 100644
--- a/benchmark/next-kuma-ui/tsconfig.json
+++ b/benchmark/next-kuma-ui/tsconfig.json
@@ -33,9 +33,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
- ".df/*.d.ts"
+ "df/*.d.ts"
],
"exclude": [
"node_modules"
]
-}
+}
\ No newline at end of file
diff --git a/bindings/devup-ui-wasm/src/lib.rs b/bindings/devup-ui-wasm/src/lib.rs
index 16e60098..7a4014fe 100644
--- a/bindings/devup-ui-wasm/src/lib.rs
+++ b/bindings/devup-ui-wasm/src/lib.rs
@@ -1,5 +1,5 @@
-use css::{get_class_map, set_class_map};
-use extractor::extract_style::ExtractStyleValue;
+use css::class_map::{get_class_map, set_class_map};
+use extractor::extract_style::extract_style_value::ExtractStyleValue;
use extractor::{ExtractOption, StyleProperty, extract};
use once_cell::sync::Lazy;
use sheet::StyleSheet;
@@ -22,6 +22,10 @@ extern "C" {
fn log(s: &JsValue);
#[wasm_bindgen(js_namespace = console, js_name = log)]
fn log_str(s: &str);
+ #[wasm_bindgen(js_namespace = console, js_name = time)]
+ fn time(s: &str);
+ #[wasm_bindgen(js_namespace = console, js_name = timeEnd)]
+ fn time_end(s: &str);
}
#[wasm_bindgen]
@@ -43,16 +47,17 @@ impl Output {
let mut sheet = GLOBAL_STYLE_SHEET.lock().unwrap();
let mut collected = false;
for style in self.styles.iter() {
- let (cls, variable) = match style.extract() {
- StyleProperty::ClassName(cls) => (cls, None),
- StyleProperty::Variable {
- class_name,
- variable_name,
- ..
- } => (class_name, Some(variable_name)),
- };
match style {
ExtractStyleValue::Static(st) => {
+ let (cls, _) = match style.extract() {
+ Some(StyleProperty::ClassName(cls)) => (cls, None),
+ Some(StyleProperty::Variable {
+ class_name,
+ variable_name,
+ ..
+ }) => (class_name, Some(variable_name)),
+ None => continue,
+ };
if sheet.add_property(
&cls,
st.property(),
@@ -65,6 +70,15 @@ impl Output {
}
}
ExtractStyleValue::Dynamic(dy) => {
+ let (cls, variable) = match style.extract() {
+ Some(StyleProperty::ClassName(cls)) => (cls, None),
+ Some(StyleProperty::Variable {
+ class_name,
+ variable_name,
+ ..
+ }) => (class_name, Some(variable_name)),
+ None => continue,
+ };
if sheet.add_property(
&cls,
dy.property(),
@@ -77,13 +91,17 @@ impl Output {
}
}
ExtractStyleValue::Css(cs) => {
- if sheet.add_css(&cls, &cs.css) {
+ if sheet.add_css(&cs.file, &cs.css) {
collected = true;
}
}
ExtractStyleValue::Typography(_) => {}
+ ExtractStyleValue::Import(st) => {
+ sheet.add_import(&st.file, &st.url);
+ }
}
}
+
if !collected {
return None;
}
@@ -94,12 +112,12 @@ impl Output {
#[wasm_bindgen(js_name = "setDebug")]
pub fn set_debug(debug: bool) {
- css::set_debug(debug);
+ css::debug::set_debug(debug);
}
#[wasm_bindgen(js_name = "isDebug")]
pub fn is_debug() {
- css::is_debug();
+ css::debug::is_debug();
}
#[wasm_bindgen(js_name = "importSheet")]
@@ -136,6 +154,9 @@ pub fn code_extract(
package: &str,
css_file: &str,
) -> Result