@theme-registry/refract-css 0.1.0 → 0.1.2
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 +25 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @theme-registry/refract-css
|
|
2
|
+
|
|
3
|
+
The **CSS adapter** for [refract](https://www.npmjs.com/package/@theme-registry/refract) — lowers a
|
|
4
|
+
theme Model to `:root` custom properties + class rules. The batteries-included default adapter.
|
|
5
|
+
|
|
6
|
+
**Docs, live playground & API:** <https://theme-registry.github.io/refract/>
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install @theme-registry/refract @theme-registry/refract-css
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { createTheme } from "@theme-registry/refract";
|
|
14
|
+
import { createCssAdapter } from "@theme-registry/refract-css";
|
|
15
|
+
|
|
16
|
+
const theme = createTheme(raw, { adapter: createCssAdapter() });
|
|
17
|
+
theme.css; // full stylesheet — :root vars + .classes
|
|
18
|
+
theme.classes; // recipe → className map
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Emit modes (`single` / `split` / `subsystem` / `components`), inline value baking, scope namespacing,
|
|
22
|
+
an opt-in cascade `@layer`, and naming overrides — see the [CSS adapter docs](https://theme-registry.github.io/refract/a-css).
|
|
23
|
+
Peer-depends on `@theme-registry/refract`.
|
|
24
|
+
|
|
25
|
+
MIT © Petyo Stoyanov
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theme-registry/refract-css",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The CSS output adapter for @theme-registry/refract — lowers a ThemeModel to CSS custom properties + class rules.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petyo Stoyanov",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@theme-registry/refract": "^0.1.
|
|
35
|
+
"@theme-registry/refract": "^0.1.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
43
43
|
"typescript": "^5.4.2",
|
|
44
44
|
"vitest": "^4.1.10",
|
|
45
|
-
"@theme-registry/
|
|
46
|
-
"@theme-registry/
|
|
45
|
+
"@theme-registry/refract": "^0.1.2",
|
|
46
|
+
"@theme-registry/theme-fixtures": "^0.0.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "rollup -c",
|