@decantr/css 1.0.1 → 1.0.3
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 +6 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +6 -0
- package/package.json +13 -6
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @decantr/css
|
|
2
2
|
|
|
3
|
+
Support status: `core-supported`
|
|
4
|
+
Release channel: `stable`
|
|
5
|
+
|
|
3
6
|
Framework-agnostic CSS atoms runtime for Decantr projects.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
@@ -119,13 +122,15 @@ Mobile-first breakpoints: `_sm:` (640px), `_md:` (768px), `_lg:` (1024px), `_xl:
|
|
|
119
122
|
When you scaffold a project with `@decantr/cli`, it generates:
|
|
120
123
|
|
|
121
124
|
- `src/styles/tokens.css` - Theme tokens (colors, spacing, radii)
|
|
122
|
-
- `src/styles/
|
|
125
|
+
- `src/styles/treatments.css` - Visual treatment classes (interactive, surface, data, control, section, annotation)
|
|
126
|
+
- `src/styles/decorators.css` - Optional decorator classes
|
|
123
127
|
|
|
124
128
|
Import these alongside @decantr/css:
|
|
125
129
|
|
|
126
130
|
```js
|
|
127
131
|
import { css } from '@decantr/css';
|
|
128
132
|
import './styles/tokens.css';
|
|
133
|
+
import './styles/treatments.css';
|
|
129
134
|
import './styles/decorators.css';
|
|
130
135
|
```
|
|
131
136
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Decantr CSS - Main css() function.
|
|
3
|
-
* Ported from decantr-framework/src/css/index.js
|
|
4
3
|
*/
|
|
5
4
|
/**
|
|
6
5
|
* Process atom strings and inject CSS.
|
|
@@ -17,7 +16,6 @@ declare function define(name: string, declaration: string): void;
|
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* Decantr CSS Runtime - CSS injection and extraction.
|
|
20
|
-
* Ported from decantr-framework/src/css/runtime.js
|
|
21
19
|
*/
|
|
22
20
|
/** Responsive breakpoints (mobile-first, min-width) */
|
|
23
21
|
declare const BREAKPOINTS: {
|
|
@@ -85,7 +83,6 @@ declare function reset(): void;
|
|
|
85
83
|
|
|
86
84
|
/**
|
|
87
85
|
* Decantr CSS Atoms - Direct atom definitions and algorithmic resolution.
|
|
88
|
-
* Ported from decantr-framework/src/css/atoms.js
|
|
89
86
|
*/
|
|
90
87
|
/**
|
|
91
88
|
* Resolve an atom name to its CSS declaration.
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,8 @@ var DIRECT = {
|
|
|
77
77
|
minh0: "min-height:0",
|
|
78
78
|
maxwfull: "max-width:100%",
|
|
79
79
|
maxhfull: "max-height:100%",
|
|
80
|
+
mw640: "max-width:40rem",
|
|
81
|
+
mw480: "max-width:30rem",
|
|
80
82
|
// Overflow
|
|
81
83
|
overhidden: "overflow:hidden",
|
|
82
84
|
overauto: "overflow:auto",
|
|
@@ -104,6 +106,8 @@ var DIRECT = {
|
|
|
104
106
|
fontsemi: "font-weight:600",
|
|
105
107
|
fontbold: "font-weight:700",
|
|
106
108
|
fontextrabold: "font-weight:800",
|
|
109
|
+
// Font family
|
|
110
|
+
fontmono: "font-family:var(--d-font-mono,ui-monospace,monospace)",
|
|
107
111
|
// Font style
|
|
108
112
|
italic: "font-style:italic",
|
|
109
113
|
notitalic: "font-style:normal",
|
|
@@ -341,6 +345,8 @@ var COLOR_ATOMS = {
|
|
|
341
345
|
bgsurface0: "background:var(--d-surface-0,var(--d-bg))",
|
|
342
346
|
bgsurface1: "background:var(--d-surface-1,var(--d-surface))",
|
|
343
347
|
bgsurface2: "background:var(--d-surface-2,var(--d-surface-raised))",
|
|
348
|
+
bgsurf: "background:var(--d-surface)",
|
|
349
|
+
bgsurfraised: "background:var(--d-surface-raised)",
|
|
344
350
|
bgmuted: "background:var(--d-muted,var(--d-surface))",
|
|
345
351
|
bgbg: "background:var(--d-bg)",
|
|
346
352
|
bgtransparent: "background:transparent",
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/css",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Framework-agnostic CSS
|
|
5
|
-
"author": "Decantr",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Framework-agnostic CSS atom runtime for Decantr projects",
|
|
5
|
+
"author": "Decantr AI",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/decantr-ai/decantr/issues"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/decantr/decantr
|
|
11
|
+
"url": "git+https://github.com/decantr-ai/decantr.git",
|
|
9
12
|
"directory": "packages/css"
|
|
10
13
|
},
|
|
11
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://decantr.ai",
|
|
12
15
|
"type": "module",
|
|
13
16
|
"main": "./dist/index.js",
|
|
14
17
|
"types": "./dist/index.d.ts",
|
|
@@ -21,6 +24,9 @@
|
|
|
21
24
|
"files": [
|
|
22
25
|
"dist"
|
|
23
26
|
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
24
30
|
"scripts": {
|
|
25
31
|
"build": "tsup src/index.ts --format esm --dts",
|
|
26
32
|
"test": "vitest run",
|
|
@@ -31,7 +37,8 @@
|
|
|
31
37
|
"decantr",
|
|
32
38
|
"css",
|
|
33
39
|
"atoms",
|
|
34
|
-
"utility-css"
|
|
40
|
+
"utility-css",
|
|
41
|
+
"design-intelligence"
|
|
35
42
|
],
|
|
36
43
|
"license": "MIT",
|
|
37
44
|
"devDependencies": {
|