@dataimago/tokens-neutral 0.1.0-alpha.10
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 +69 -0
- package/dist/colors.json +134 -0
- package/dist/components.json +44 -0
- package/dist/effects.json +54 -0
- package/dist/frequent.json +51 -0
- package/dist/index.cjs +439 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.mjs +438 -0
- package/dist/spacing.json +56 -0
- package/dist/theme-colors.json +112 -0
- package/dist/tokens.css +196 -0
- package/dist/tokens.dtcg.json +644 -0
- package/dist/tokens.scss +196 -0
- package/dist/tokens.studio.json +497 -0
- package/dist/tokens.w3c.dtcg.json +617 -0
- package/dist/typography.json +168 -0
- package/package.json +55 -0
- package/src/colors.json +44 -0
- package/src/theme-colors.json +76 -0
- package/src/typography.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @dataimago/tokens-neutral
|
|
2
|
+
|
|
3
|
+
Neutral-identity design tokens — sensible defaults for externally-owned consumers (Level-3 user apps generated by `apps/template/` in `dataimago-ai`; future third-party Level-2 hubs).
|
|
4
|
+
|
|
5
|
+
**Identity:** Noto Sans throughout (no Josefin Sans). Neutral palette (ink, stone, paper, functional only — no forest, copper, accent, or presentation-blue). Interactive accent role maps to a quiet ink-700/ink-200 by default; owners customize from there.
|
|
6
|
+
|
|
7
|
+
**Non-identity tokens** (spacing, radius, motion, shadows, ethical thresholds) are read from `@dataimago/tokens` at build time and stay in lockstep — no duplication, no drift.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @dataimago/tokens-neutral
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```css
|
|
18
|
+
/* globals.css — import CSS custom properties */
|
|
19
|
+
@import '@dataimago/tokens-neutral/css';
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
// Tailwind: pair with @dataimago/css-neutral preset
|
|
24
|
+
module.exports = {
|
|
25
|
+
presets: [require('@dataimago/css-neutral/tailwind-preset')],
|
|
26
|
+
content: [/* your app */],
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// JS/TS: typed runtime access
|
|
32
|
+
import { color, font } from '@dataimago/tokens-neutral';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## When to use this vs `@dataimago/tokens`
|
|
36
|
+
|
|
37
|
+
| Consumer | Use |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `dataimago.ai` (Level-1 hub) | `@dataimago/tokens` (dataimago house identity) |
|
|
40
|
+
| `dissertation.ai`, `sgpc.ai`, `rpkg.ai` (Level-2 hubs — dataimago-owned) | `@dataimago/tokens` (dataimago house identity) |
|
|
41
|
+
| `apps/template/` (per-user Level-3 apps generated by the framework) | `@dataimago/tokens-neutral` |
|
|
42
|
+
| Third-party Level-2 hubs (future) | `@dataimago/tokens-neutral` as the starting point; owner customizes |
|
|
43
|
+
|
|
44
|
+
## Architectural notes
|
|
45
|
+
|
|
46
|
+
This package implements **Variant A** of the two-tier identity pattern proposed during the iteration-3 scope-contraction amendment (2026-05-14):
|
|
47
|
+
|
|
48
|
+
- **Variant A (current):** additive neutral sibling. `@dataimago/tokens` keeps the dataimago house identity; `@dataimago/tokens-neutral` ships sensible neutral defaults. Non-breaking.
|
|
49
|
+
- **Variant B (iteration-4 target):** neutral-as-base. `@dataimago/tokens` would be refactored to ship the neutral foundation; the dataimago house identity would move into a new `@dataimago/dataimago-theme` overlay package. Breaking change; deferred until dissertation-ai (iteration-3 D.1+) validates the framework.
|
|
50
|
+
|
|
51
|
+
See [`wiki/decisions/tokens-neutral-sibling.md`](../../wiki/decisions/tokens-neutral-sibling.md) for the full rationale + deprecation path.
|
|
52
|
+
|
|
53
|
+
## Build
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
pnpm --filter @dataimago/tokens-neutral build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Emits:
|
|
60
|
+
- `dist/tokens.css` — CSS custom properties (light + dark theme variants)
|
|
61
|
+
- `dist/tokens.scss` — same, as SCSS
|
|
62
|
+
- `dist/index.{mjs,cjs,d.ts}` — typed JS modules
|
|
63
|
+
- `dist/tokens.dtcg.json` — additive DTCG-style export for tools and agents
|
|
64
|
+
- `dist/{spacing,effects,frequent,components}.json` — inherited non-identity token files copied from `@dataimago/tokens` so public subpath exports resolve from this package
|
|
65
|
+
|
|
66
|
+
## Related
|
|
67
|
+
|
|
68
|
+
- [`@dataimago/tokens`](../tokens) — dataimago house identity
|
|
69
|
+
- [`@dataimago/css-neutral`](../css-neutral) — compiled CSS + Tailwind preset built from this package
|
package/dist/colors.json
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"color": {
|
|
3
|
+
"palette": {
|
|
4
|
+
"ink": {
|
|
5
|
+
"50": {
|
|
6
|
+
"value": "#f5f5f4",
|
|
7
|
+
"description": "Ink scale — warmest near-white"
|
|
8
|
+
},
|
|
9
|
+
"100": {
|
|
10
|
+
"value": "#e7e5e4",
|
|
11
|
+
"description": "Ink scale — subtle neutral surface tint"
|
|
12
|
+
},
|
|
13
|
+
"200": {
|
|
14
|
+
"value": "#d6d3d1",
|
|
15
|
+
"description": "Ink scale — borders, dividers on light surfaces"
|
|
16
|
+
},
|
|
17
|
+
"300": {
|
|
18
|
+
"value": "#a8a29e",
|
|
19
|
+
"description": "Ink scale — muted text on dark surfaces"
|
|
20
|
+
},
|
|
21
|
+
"400": {
|
|
22
|
+
"value": "#78716c",
|
|
23
|
+
"description": "Ink scale — secondary text on dark surfaces"
|
|
24
|
+
},
|
|
25
|
+
"500": {
|
|
26
|
+
"value": "#57534e",
|
|
27
|
+
"description": "Ink scale — secondary text on light surfaces"
|
|
28
|
+
},
|
|
29
|
+
"600": {
|
|
30
|
+
"value": "#44403c",
|
|
31
|
+
"description": "Ink scale — primary text on mid surfaces"
|
|
32
|
+
},
|
|
33
|
+
"700": {
|
|
34
|
+
"value": "#292524",
|
|
35
|
+
"description": "Ink scale — primary text, high contrast; neutral interactive primary"
|
|
36
|
+
},
|
|
37
|
+
"800": {
|
|
38
|
+
"value": "#1c1917",
|
|
39
|
+
"description": "Ink scale — surfaces in dark mode"
|
|
40
|
+
},
|
|
41
|
+
"900": {
|
|
42
|
+
"value": "#0c0a09",
|
|
43
|
+
"description": "Ink scale — near-black; primary dark surface and text color"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"stone": {
|
|
47
|
+
"50": {
|
|
48
|
+
"value": "#f7f7f6",
|
|
49
|
+
"description": "Stone scale — lightest cool-neutral surface; cards/modals one step above page"
|
|
50
|
+
},
|
|
51
|
+
"100": {
|
|
52
|
+
"value": "#ededeb",
|
|
53
|
+
"description": "Stone scale — canonical page background (light mode)"
|
|
54
|
+
},
|
|
55
|
+
"200": {
|
|
56
|
+
"value": "#dcdcda",
|
|
57
|
+
"description": "Stone scale — borders, dividers"
|
|
58
|
+
},
|
|
59
|
+
"300": {
|
|
60
|
+
"value": "#c1c1bf",
|
|
61
|
+
"description": "Stone scale — pressed border / disabled chrome"
|
|
62
|
+
},
|
|
63
|
+
"400": {
|
|
64
|
+
"value": "#a0a0a0",
|
|
65
|
+
"description": "Stone scale — disabled text, muted icons"
|
|
66
|
+
},
|
|
67
|
+
"500": {
|
|
68
|
+
"value": "#7c7c7c",
|
|
69
|
+
"description": "Stone scale — secondary text"
|
|
70
|
+
},
|
|
71
|
+
"600": {
|
|
72
|
+
"value": "#5e5e5c",
|
|
73
|
+
"description": "Stone scale — caption / metadata text on light surfaces"
|
|
74
|
+
},
|
|
75
|
+
"700": {
|
|
76
|
+
"value": "#424240",
|
|
77
|
+
"description": "Stone scale — primary text on light surfaces"
|
|
78
|
+
},
|
|
79
|
+
"800": {
|
|
80
|
+
"value": "#292927",
|
|
81
|
+
"description": "Stone scale — high-contrast headings on light surfaces"
|
|
82
|
+
},
|
|
83
|
+
"900": {
|
|
84
|
+
"value": "#14140f",
|
|
85
|
+
"description": "Stone scale — body text on light surfaces"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"paper": {
|
|
89
|
+
"50": {
|
|
90
|
+
"value": "#fefdfb",
|
|
91
|
+
"description": "Paper scale — lightest warm surface; elevated cards/modals when warm tint is desired"
|
|
92
|
+
},
|
|
93
|
+
"100": {
|
|
94
|
+
"value": "#fdf9f2",
|
|
95
|
+
"description": "Paper scale — warm page-background option"
|
|
96
|
+
},
|
|
97
|
+
"200": {
|
|
98
|
+
"value": "#faf2e3",
|
|
99
|
+
"description": "Paper scale — code-block and pull-quote background"
|
|
100
|
+
},
|
|
101
|
+
"300": {
|
|
102
|
+
"value": "#f5e8cf",
|
|
103
|
+
"description": "Paper scale — call-out / emphasised panel background"
|
|
104
|
+
},
|
|
105
|
+
"400": {
|
|
106
|
+
"value": "#edd9b3",
|
|
107
|
+
"description": "Paper scale — muted warm accent"
|
|
108
|
+
},
|
|
109
|
+
"500": {
|
|
110
|
+
"value": "#e0c088",
|
|
111
|
+
"description": "Paper scale — strong warm accent; wheat"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"functional": {
|
|
116
|
+
"success": {
|
|
117
|
+
"value": "#27AE60",
|
|
118
|
+
"description": "Success states and positive actions"
|
|
119
|
+
},
|
|
120
|
+
"warning": {
|
|
121
|
+
"value": "#F39C12",
|
|
122
|
+
"description": "Warning states and caution"
|
|
123
|
+
},
|
|
124
|
+
"error": {
|
|
125
|
+
"value": "#E74C3C",
|
|
126
|
+
"description": "Error states and critical issues"
|
|
127
|
+
},
|
|
128
|
+
"info": {
|
|
129
|
+
"value": "#3498DB",
|
|
130
|
+
"description": "Informational content"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"card": {
|
|
3
|
+
"background": "surface.elevated",
|
|
4
|
+
"padding": "spacing.component.padding",
|
|
5
|
+
"radius": "radius.component",
|
|
6
|
+
"shadow": "shadow.moderate",
|
|
7
|
+
"border": "border.subtle",
|
|
8
|
+
"description": "Card component tokens - references semantic tokens"
|
|
9
|
+
},
|
|
10
|
+
"button": {
|
|
11
|
+
"padding-x": "spacing.component.padding",
|
|
12
|
+
"padding-y": "spacing.micro.normal",
|
|
13
|
+
"radius": "radius.component",
|
|
14
|
+
"font-weight": "typography.weight.medium",
|
|
15
|
+
"primary": {
|
|
16
|
+
"background": "interactive.primary",
|
|
17
|
+
"text": "content.inverse",
|
|
18
|
+
"hover": "interactive.hover"
|
|
19
|
+
},
|
|
20
|
+
"secondary": {
|
|
21
|
+
"background": "surface.elevated",
|
|
22
|
+
"text": "content.primary",
|
|
23
|
+
"hover": "surface.page"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"navbar": {
|
|
27
|
+
"background": "surface.navbar",
|
|
28
|
+
"background-scrolled": "surface.navbar-scrolled",
|
|
29
|
+
"text": "content.secondary",
|
|
30
|
+
"text-hover": "interactive.accent",
|
|
31
|
+
"transition": "transition.smooth"
|
|
32
|
+
},
|
|
33
|
+
"navigation": {
|
|
34
|
+
"item-spacing": "spacing.micro.loose",
|
|
35
|
+
"hover-background": {
|
|
36
|
+
"light": "rgba(20, 20, 16, 0.05)",
|
|
37
|
+
"dark": "rgba(237, 237, 235, 0.05)"
|
|
38
|
+
},
|
|
39
|
+
"active-background": {
|
|
40
|
+
"light": "rgba(20, 20, 16, 0.1)",
|
|
41
|
+
"dark": "rgba(237, 237, 235, 0.1)"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shadow": {
|
|
3
|
+
"subtle": {
|
|
4
|
+
"light": "0 1px 2px 0 rgb(20 20 16 / 0.05)",
|
|
5
|
+
"dark": "0 1px 2px 0 rgb(237 237 235 / 0.03)",
|
|
6
|
+
"description": "Subtle elevation - barely perceptible"
|
|
7
|
+
},
|
|
8
|
+
"moderate": {
|
|
9
|
+
"light": "0 4px 6px -1px rgb(20 20 16 / 0.1)",
|
|
10
|
+
"dark": "0 4px 6px -1px rgb(237 237 235 / 0.05)",
|
|
11
|
+
"description": "Moderate elevation - cards, dropdowns"
|
|
12
|
+
},
|
|
13
|
+
"prominent": {
|
|
14
|
+
"light": "0 10px 15px -3px rgb(20 20 16 / 0.1)",
|
|
15
|
+
"dark": "0 10px 15px -3px rgb(237 237 235 / 0.4)",
|
|
16
|
+
"description": "Strong elevation - modals, floating elements"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"border": {
|
|
20
|
+
"subtle": {
|
|
21
|
+
"light": "rgba(20, 20, 16, 0.47)",
|
|
22
|
+
"dark": "rgba(237, 237, 235, 0.47)",
|
|
23
|
+
"description": "Subtle borders - element separation. THE ALPHA IS THE ROLE. Distinct from color.border.subtle: this family has its own base (20,20,16 / 237,237,235), so it needs a DIFFERENT alpha to render the same. 0.47 here matches 0.45 there at 3.07:1 on the worst surface; copying 0.45 would land at 2.90:1 and fail WCAG 1.4.11. Gated by tools/contrast-check.mjs."
|
|
24
|
+
},
|
|
25
|
+
"moderate": {
|
|
26
|
+
"light": "rgba(20, 20, 16, 0.63)",
|
|
27
|
+
"dark": "rgba(237, 237, 235, 0.63)",
|
|
28
|
+
"description": "Moderate borders - defined boundaries. 0.63 here matches color.border.moderate 0.60 in rendered contrast; see border.subtle on why the numbers differ between the two families."
|
|
29
|
+
},
|
|
30
|
+
"focus": {
|
|
31
|
+
"light": "#3498DB",
|
|
32
|
+
"dark": "#4FC3F7",
|
|
33
|
+
"description": "Focus indicators - accessibility"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"transition": {
|
|
37
|
+
"quick": {
|
|
38
|
+
"value": "0.15s ease",
|
|
39
|
+
"description": "Snap-fast micro-interactions — hover lifts, focus rings, immediate-feedback affordances"
|
|
40
|
+
},
|
|
41
|
+
"standard": {
|
|
42
|
+
"value": "0.25s ease-in-out",
|
|
43
|
+
"description": "Default for most state changes — toggles, button states, card hovers"
|
|
44
|
+
},
|
|
45
|
+
"smooth": {
|
|
46
|
+
"value": "0.35s ease",
|
|
47
|
+
"description": "Theme transitions, navbar collapse/expand, layout shifts that should feel deliberate"
|
|
48
|
+
},
|
|
49
|
+
"logo": {
|
|
50
|
+
"value": "0.3s",
|
|
51
|
+
"description": "Reserved for the dataimago wordmark / brand-mark transitions; do not borrow for general UI"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spacing": {
|
|
3
|
+
"component": {
|
|
4
|
+
"padding": "1rem",
|
|
5
|
+
"margin": "1.5rem",
|
|
6
|
+
"gap": "0.75rem",
|
|
7
|
+
"description": "Most frequently adjusted spacing - component internals"
|
|
8
|
+
},
|
|
9
|
+
"layout": {
|
|
10
|
+
"section": "3rem",
|
|
11
|
+
"container": "2rem",
|
|
12
|
+
"comfortable": "1rem",
|
|
13
|
+
"description": "Layout-level spacing - between major elements"
|
|
14
|
+
},
|
|
15
|
+
"micro": {
|
|
16
|
+
"tight": "0.25rem",
|
|
17
|
+
"normal": "0.5rem",
|
|
18
|
+
"loose": "1rem",
|
|
19
|
+
"description": "Fine-tuning spacing - when things feel cramped or loose"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"radius": {
|
|
23
|
+
"component": "0.5rem",
|
|
24
|
+
"subtle": "0.25rem",
|
|
25
|
+
"prominent": "0.75rem",
|
|
26
|
+
"full": "9999px",
|
|
27
|
+
"description": "Border radius values - component rounding"
|
|
28
|
+
},
|
|
29
|
+
"contrast": {
|
|
30
|
+
"high": {
|
|
31
|
+
"light": "rgb(20, 20, 16)",
|
|
32
|
+
"dark": "rgb(237, 237, 235)",
|
|
33
|
+
"description": "Maximum contrast text - accessibility focus"
|
|
34
|
+
},
|
|
35
|
+
"readable": {
|
|
36
|
+
"light": "rgb(20, 20, 16)",
|
|
37
|
+
"dark": "rgb(237, 237, 235)",
|
|
38
|
+
"description": "Comfortable reading contrast - primary text"
|
|
39
|
+
},
|
|
40
|
+
"medium": {
|
|
41
|
+
"light": "#7c7c7c",
|
|
42
|
+
"dark": "#83838f",
|
|
43
|
+
"description": "Medium emphasis - secondary information"
|
|
44
|
+
},
|
|
45
|
+
"subtle": {
|
|
46
|
+
"light": "#7c7c7c",
|
|
47
|
+
"dark": "#83838f",
|
|
48
|
+
"description": "De-emphasized text - captions, meta info"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|