@tangle-network/brand 0.7.0 → 0.8.1
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/CHANGELOG.md +17 -0
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/styles/index.css +1 -0
- package/src/styles/themes.css +148 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d18fce7: Fix `[data-theme]` scopes not re-skinning components, and lift the aubergine palette off near-black so it reads as purple.
|
|
8
|
+
|
|
9
|
+
The named themes changed `--hsl-*` spine vars, but Tailwind utilities (`bg-card`, `bg-primary`, `border-border`, `bg-surface-container*`) read the `--color-*` layer, which is declared only at `:root` — so its computed neutral value was inherited by themed subtrees regardless of the spine override (a double-indirection custom-property inheritance trap). Each `[data-theme]` scope now redeclares the `--color-*` layer directly, forcing it to recompute from that element's own `--hsl-*`. Aubergine's base lightness is raised (~7%→12–20% L, higher saturation) so surfaces read aubergine-purple instead of black.
|
|
10
|
+
|
|
11
|
+
## 0.8.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 46592b3: Calmer chat/run design + named multi-theme system.
|
|
16
|
+
|
|
17
|
+
- `ChatMessage`/`RunGroup`: role labels move above the bubble (plain text-xs), avatar circles removed (`avatar`/`hideAvatar` are deprecated no-ops), `InlineToolItem` rows are taller with quiet inline failed/running text instead of uppercase pills. `ToolCallStep`/`ToolCallFeed` stories leave Storybook (source adapters remain).
|
|
18
|
+
- `@tangle-network/brand` adds `themes.css`: `[data-theme]` scopes (`aubergine`, `aubergine-light`, `arena`, `arena-light`, `tangle-light`) that re-skin every component through the `@theme` semantic mappings, plus a `Foundations/Theme Showcase` story.
|
|
19
|
+
|
|
3
20
|
## 0.7.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Single source of truth for the Tangle design system. Design tokens, logo, and a Tailwind v4 theme preset, shared across every Tangle app (`tangle-website`, `sandbox-ui`, `evals`, `agent-builder`, product surfaces).
|
|
4
4
|
|
|
5
|
-
**Scope:** tokens, not components.
|
|
5
|
+
**Scope:** tokens, not components. Shared components live in `@tangle-network/ui`; product-specific components stay in their product repos.
|
|
6
|
+
|
|
7
|
+
For the broader visual, copy, graphic, and component standards, see the repo-level [brand guidelines](../../docs/brand-guidelines.md).
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
package/package.json
CHANGED
package/src/styles/index.css
CHANGED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* Named brand themes. Each scope overrides only the spine tokens in tokens.css;
|
|
2
|
+
* components re-skin automatically because they reference the semantic tokens
|
|
3
|
+
* (bg-card / border-border / surface-container, mapped in theme.css). Apply with
|
|
4
|
+
* data-theme="<name>" on a wrapper (or <html>). The default :root / .dark spine
|
|
5
|
+
* is the neutral "tangle" theme; "<name>-light" scopes are the light variants. */
|
|
6
|
+
|
|
7
|
+
/* Bridge — the actual re-skin mechanism. Tailwind utilities read the --color-*
|
|
8
|
+
* layer (theme.css @theme: `bg-card` → var(--color-card) = hsl(var(--card))).
|
|
9
|
+
* Both --color-* and its --card/--hsl-card source are declared only at :root, so
|
|
10
|
+
* a descendant [data-theme] that changes --hsl-card never re-substitutes the
|
|
11
|
+
* :root-computed --color-card the utility consumes — the value is frozen at the
|
|
12
|
+
* root color (double-indirection inheritance trap). Redeclaring the --color-*
|
|
13
|
+
* layer directly on any themed element forces each one to recompute from that
|
|
14
|
+
* element's own --hsl-*. Tokens a theme doesn't override fall back to the
|
|
15
|
+
* inherited neutral --hsl-* (all defined at :root), so this is always valid. */
|
|
16
|
+
[data-theme] {
|
|
17
|
+
--color-background: hsl(var(--hsl-background));
|
|
18
|
+
--color-foreground: hsl(var(--hsl-foreground));
|
|
19
|
+
--color-card: hsl(var(--hsl-card));
|
|
20
|
+
--color-card-foreground: hsl(var(--hsl-card-foreground));
|
|
21
|
+
--color-popover: hsl(var(--hsl-popover));
|
|
22
|
+
--color-popover-foreground: hsl(var(--hsl-popover-foreground));
|
|
23
|
+
--color-primary: hsl(var(--hsl-primary));
|
|
24
|
+
--color-primary-foreground: hsl(var(--hsl-primary-foreground));
|
|
25
|
+
--color-secondary: hsl(var(--hsl-secondary));
|
|
26
|
+
--color-secondary-foreground: hsl(var(--hsl-secondary-foreground));
|
|
27
|
+
--color-muted: hsl(var(--hsl-muted));
|
|
28
|
+
--color-muted-foreground: hsl(var(--hsl-muted-foreground));
|
|
29
|
+
--color-accent: hsl(var(--hsl-accent));
|
|
30
|
+
--color-accent-foreground: hsl(var(--hsl-accent-foreground));
|
|
31
|
+
--color-destructive: hsl(var(--hsl-destructive));
|
|
32
|
+
--color-destructive-foreground: hsl(var(--hsl-destructive-foreground));
|
|
33
|
+
--color-border: hsl(var(--hsl-border));
|
|
34
|
+
--color-input: hsl(var(--hsl-input));
|
|
35
|
+
--color-ring: hsl(var(--hsl-ring));
|
|
36
|
+
--color-surface-container-lowest: var(--md3-surface-container-lowest);
|
|
37
|
+
--color-surface-container-low: var(--md3-surface-container-low);
|
|
38
|
+
--color-surface-container: var(--md3-surface-container);
|
|
39
|
+
--color-surface-container-high: var(--md3-surface-container-high);
|
|
40
|
+
--color-surface-container-highest: var(--md3-surface-container-highest);
|
|
41
|
+
--color-fg: var(--text-primary);
|
|
42
|
+
--color-fg-muted: var(--text-muted);
|
|
43
|
+
--color-fg-dim: var(--text-dim);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ───────────────────────── Aubergine (bazaar) — dark purple ──────────────── */
|
|
47
|
+
[data-theme="aubergine"] {
|
|
48
|
+
/* Base lifted off near-black: at ~7% L the 258 hue read black; ~13-20% L with
|
|
49
|
+
* higher saturation makes the surfaces read unmistakably aubergine-purple. */
|
|
50
|
+
--hsl-background: 258 44% 12%; --hsl-foreground: 258 50% 97%;
|
|
51
|
+
--hsl-card: 258 40% 20%; --hsl-card-foreground: 258 50% 97%;
|
|
52
|
+
--hsl-popover: 258 40% 24%; --hsl-popover-foreground: 258 50% 97%;
|
|
53
|
+
--hsl-primary: 250 100% 76%; --hsl-primary-foreground: 258 45% 10%;
|
|
54
|
+
--hsl-secondary: 258 38% 17%; --hsl-muted: 258 38% 17%;
|
|
55
|
+
--hsl-muted-foreground: 258 26% 70%;
|
|
56
|
+
--hsl-accent: 258 40% 24%; --hsl-border: 258 32% 30%;
|
|
57
|
+
--hsl-input: 258 38% 17%; --hsl-ring: 250 100% 76%;
|
|
58
|
+
--depth-1: #1a1230; --depth-2: #241a42; --depth-3: #2f2253; --depth-4: #3d2d68;
|
|
59
|
+
--bg-root: #1a1230; --bg-card: var(--depth-3); --bg-input: var(--depth-2);
|
|
60
|
+
--md3-surface-container-lowest: #150e28; --md3-surface-container-low: #241a42;
|
|
61
|
+
--md3-surface-container: #2a1f4c; --md3-surface-container-high: #2f2253;
|
|
62
|
+
--md3-surface-container-highest: #3d2d68; --md3-outline-variant: #463571;
|
|
63
|
+
--border-subtle: rgba(183,157,255,0.12); --border-default: rgba(183,157,255,0.22);
|
|
64
|
+
--border-hover: rgba(183,157,255,0.40); --accent-text: #c4b0ff;
|
|
65
|
+
--brand-primary: #8f8bff; --brand-glow: #c4b0ff;
|
|
66
|
+
--text-primary: #f4f1fd; --text-secondary: #cec4e8; --text-muted: #a99fc8; --text-dim: #786d99;
|
|
67
|
+
}
|
|
68
|
+
[data-theme="aubergine-light"] {
|
|
69
|
+
--hsl-background: 258 60% 96%; --hsl-foreground: 258 45% 11%;
|
|
70
|
+
--hsl-card: 0 0% 100%; --hsl-card-foreground: 258 45% 11%;
|
|
71
|
+
--hsl-popover: 0 0% 100%; --hsl-popover-foreground: 258 45% 11%;
|
|
72
|
+
--hsl-primary: 258 70% 50%; --hsl-primary-foreground: 0 0% 100%;
|
|
73
|
+
--hsl-secondary: 258 45% 92%; --hsl-muted: 258 45% 92%;
|
|
74
|
+
--hsl-muted-foreground: 258 18% 42%;
|
|
75
|
+
--hsl-accent: 258 45% 92%; --hsl-border: 258 30% 88%;
|
|
76
|
+
--hsl-input: 258 30% 88%; --hsl-ring: 258 70% 50%;
|
|
77
|
+
--depth-1: #f4f1fc; --depth-2: #ece6f8; --depth-3: #ffffff; --depth-4: #ffffff;
|
|
78
|
+
--bg-root: #f4f1fc; --bg-card: #ffffff; --bg-input: #ece6f8;
|
|
79
|
+
--md3-surface-container-lowest: #ffffff; --md3-surface-container-low: #faf8fe;
|
|
80
|
+
--md3-surface-container: #f4f1fc; --md3-surface-container-high: #ece6f8;
|
|
81
|
+
--md3-surface-container-highest: #e4dcf4; --md3-outline-variant: #e0d8f0;
|
|
82
|
+
--border-subtle: rgba(60,32,110,0.10); --border-default: rgba(60,32,110,0.16);
|
|
83
|
+
--border-hover: rgba(60,32,110,0.30); --accent-text: #6d28d9;
|
|
84
|
+
--brand-primary: #6d28d9; --brand-glow: #8b5cf6;
|
|
85
|
+
--text-primary: #160f22; --text-secondary: #3f3460; --text-muted: #6c6289; --text-dim: #8a82a6;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ───────────────────────── Arena — emerald / green accent ────────────────── */
|
|
89
|
+
[data-theme="arena"] {
|
|
90
|
+
--hsl-background: 160 16% 6%; --hsl-foreground: 150 20% 96%;
|
|
91
|
+
--hsl-card: 158 14% 12%; --hsl-card-foreground: 150 20% 96%;
|
|
92
|
+
--hsl-popover: 158 13% 16%; --hsl-popover-foreground: 150 20% 96%;
|
|
93
|
+
--hsl-primary: 160 84% 39%; --hsl-primary-foreground: 160 60% 8%;
|
|
94
|
+
--hsl-secondary: 158 12% 12%; --hsl-muted: 158 12% 12%;
|
|
95
|
+
--hsl-muted-foreground: 152 12% 62%;
|
|
96
|
+
--hsl-accent: 158 14% 14%; --hsl-border: 158 14% 18%;
|
|
97
|
+
--hsl-input: 158 12% 12%; --hsl-ring: 160 84% 45%;
|
|
98
|
+
--depth-1: #0a0f0c; --depth-2: #131b16; --depth-3: #1b261f; --depth-4: #233328;
|
|
99
|
+
--bg-root: #0a0f0c; --bg-card: var(--depth-3); --bg-input: var(--depth-2);
|
|
100
|
+
--md3-surface-container-lowest: #070b08; --md3-surface-container-low: #131b16;
|
|
101
|
+
--md3-surface-container: #182019; --md3-surface-container-high: #1b261f;
|
|
102
|
+
--md3-surface-container-highest: #233328; --md3-outline-variant: #2a3a31;
|
|
103
|
+
--border-subtle: rgba(52,211,153,0.10); --border-default: rgba(52,211,153,0.18);
|
|
104
|
+
--border-hover: rgba(52,211,153,0.32); --accent-text: #34d399;
|
|
105
|
+
--brand-primary: #10b981; --brand-glow: #34d399;
|
|
106
|
+
--text-primary: #ecfdf5; --text-secondary: #c2e8d6; --text-muted: #8fb6a3; --text-dim: #5f8472;
|
|
107
|
+
}
|
|
108
|
+
[data-theme="arena-light"] {
|
|
109
|
+
--hsl-background: 150 30% 96%; --hsl-foreground: 158 30% 10%;
|
|
110
|
+
--hsl-card: 0 0% 100%; --hsl-card-foreground: 158 30% 10%;
|
|
111
|
+
--hsl-popover: 0 0% 100%; --hsl-popover-foreground: 158 30% 10%;
|
|
112
|
+
--hsl-primary: 160 84% 30%; --hsl-primary-foreground: 0 0% 100%;
|
|
113
|
+
--hsl-secondary: 150 25% 92%; --hsl-muted: 150 25% 92%;
|
|
114
|
+
--hsl-muted-foreground: 158 14% 40%;
|
|
115
|
+
--hsl-accent: 150 25% 92%; --hsl-border: 150 20% 86%;
|
|
116
|
+
--hsl-input: 150 20% 86%; --hsl-ring: 160 84% 30%;
|
|
117
|
+
--depth-1: #f0f6f2; --depth-2: #e6f0ea; --depth-3: #ffffff; --depth-4: #ffffff;
|
|
118
|
+
--bg-root: #f0f6f2; --bg-card: #ffffff; --bg-input: #e6f0ea;
|
|
119
|
+
--md3-surface-container-lowest: #ffffff; --md3-surface-container-low: #f6fbf8;
|
|
120
|
+
--md3-surface-container: #f0f6f2; --md3-surface-container-high: #e6f0ea;
|
|
121
|
+
--md3-surface-container-highest: #dcebe2; --md3-outline-variant: #d7e8de;
|
|
122
|
+
--border-subtle: rgba(6,95,70,0.10); --border-default: rgba(6,95,70,0.16);
|
|
123
|
+
--border-hover: rgba(6,95,70,0.30); --accent-text: #047857;
|
|
124
|
+
--brand-primary: #059669; --brand-glow: #10b981;
|
|
125
|
+
--text-primary: #06231a; --text-secondary: #285048; --text-muted: #5f8472; --text-dim: #82a699;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ───────────────────────── Tangle (neutral) — light variant alias ─────────── */
|
|
129
|
+
/* dark = default :root spine; this is its light mode for the showcase. */
|
|
130
|
+
[data-theme="tangle-light"] {
|
|
131
|
+
--hsl-background: 240 33% 98%; --hsl-foreground: 245 32% 14%;
|
|
132
|
+
--hsl-card: 0 0% 100%; --hsl-card-foreground: 245 32% 14%;
|
|
133
|
+
--hsl-popover: 0 0% 100%; --hsl-popover-foreground: 245 32% 14%;
|
|
134
|
+
--hsl-primary: 239 84% 60%; --hsl-primary-foreground: 0 0% 100%;
|
|
135
|
+
--hsl-secondary: 240 30% 95%; --hsl-muted: 240 28% 95%;
|
|
136
|
+
--hsl-muted-foreground: 240 8% 42%;
|
|
137
|
+
--hsl-accent: 240 30% 95%; --hsl-border: 240 20% 90%;
|
|
138
|
+
--hsl-input: 240 20% 90%; --hsl-ring: 239 84% 60%;
|
|
139
|
+
--depth-1: #f4f4f9; --depth-2: #edecf4; --depth-3: #ffffff; --depth-4: #ffffff;
|
|
140
|
+
--bg-root: #f4f4f9; --bg-card: #ffffff; --bg-input: #edecf4;
|
|
141
|
+
--md3-surface-container-lowest: #ffffff; --md3-surface-container-low: #f8f8fc;
|
|
142
|
+
--md3-surface-container: #f4f4f9; --md3-surface-container-high: #edecf4;
|
|
143
|
+
--md3-surface-container-highest: #e5e4ee; --md3-outline-variant: #e2e1ec;
|
|
144
|
+
--border-subtle: rgba(20,20,40,0.08); --border-default: rgba(20,20,40,0.14);
|
|
145
|
+
--border-hover: rgba(20,20,40,0.26); --accent-text: #4f46e5;
|
|
146
|
+
--brand-primary: #6366f1; --brand-glow: #818cf8;
|
|
147
|
+
--text-primary: #15131f; --text-secondary: #3f3a52; --text-muted: #6a6680; --text-dim: #9490a6;
|
|
148
|
+
}
|