@beehexa/design-tokens 2611.3.2 → 2611.4.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @beehexa/design-tokens
2
2
 
3
- Source-checkout development package (`0.0.0`, `private: true`), not a registry release number. Managers must authorize a release before the GitHub runner stamps the real version. CI stages checked tarballs; npm maintainer approval with 2FA is required before publication.
3
+ Source-checkout development package (`0.0.0`, `private: true`), not a registry release number. Managers must authorize a release before the GitHub runner stamps the real version and publishes checked tarballs through npm Trusted Publishing/OIDC.
4
4
 
5
5
  ## Use the installed package
6
6
 
@@ -27,7 +27,9 @@ const spacing: TokenName = 'space.200';
27
27
  - `tokenInfo` is keyed by the same token names. It contains `name`, `path`, `type`, `description`, raw alias-bearing `value`, optional source `dark`/`vi` extensions, `cssVar`, and fully resolved `resolved`/`darkResolved`/`viResolved`. These descriptions explain individual decisions; they are not a replacement for the complete usage rules in `@beehexa/design-rules`.
28
28
  - Generated declarations preserve literal token keys and values. `TokenName` is `keyof typeof tokens.light`; a misspelled key is not widened into `Record<string, string>`.
29
29
  - `@beehexa/design-tokens/css` retains native `rem`. It defines `--bh-*` on `:root`, honors explicit `data-theme="light"`/`"dark"`, uses system dark preference only without an explicit light selection, and applies Vietnamese typography via `:lang(vi)` with resets on other explicit languages. It does not set the application's root font size.
30
- - `@beehexa/design-tokens/css/pixels` uses the identical generator and selectors, converting every `rem` literal to pixels at **16 px per rem**, including compound values. Import this instead of, not alongside, native CSS when integrating the dashboard's current 14px root. This compatibility choice is migration debt, not a 14px design-scale exemption or permission to change token values.
30
+ - `@beehexa/design-tokens/css/pixels` uses the identical generator and selectors, converting every `rem` literal to pixels at **16 px per rem**, including compound values. It is an optional numeric compatibility entrypoint, not the dashboard integration: use native CSS with a 16px root and `font.body.default` (14px) on the body. Never import both CSS variants.
31
+ - Both CSS subpaths include package-owned side-effect declarations, so strict TypeScript consumers with `noUncheckedSideEffectImports` need no ambient module shims. The runtime exports still resolve to the actual CSS files.
32
+ - Source `font.features` is `"cv05", "cv08"`. Generated CSS applies it universally with `!important`, preserving these features across semantic `font` shorthand resets. Add local opt-in features through `--bh-font-features`, not a competing feature property.
31
33
  - `@beehexa/design-tokens/dtcg/color.json` (and every other original `tokens/*.json`) exposes the unchanged source data.
32
34
  - `@beehexa/design-tokens/package.json` exposes installed origin/version metadata.
33
35
 
package/dist/css.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // CSS is imported for side effects only; no JavaScript bindings.
2
+ export {};
@@ -19,7 +19,7 @@
19
19
  "accent": {
20
20
  "$type": "dimension",
21
21
  "$value": "4px",
22
- "$description": "4 px. A status or emphasis bar on one edge: alerts, banners, rows with an error, callouts and quotes. Pair with a status or brand border colour."
22
+ "$description": "4 px. A status or emphasis bar on one edge: rows with an error, callouts and quotes. Pair with a status or brand border colour."
23
23
  }
24
24
  }
25
25
  }
@@ -1166,7 +1166,7 @@
1166
1166
  "$root": {
1167
1167
  "$type": "color",
1168
1168
  "$value": "{color.brand.white}",
1169
- "$description": "Cards, panels, dialogs. One step lighter than the page in dark.",
1169
+ "$description": "Cards and panels. One step lighter than the page in dark.",
1170
1170
  "$extensions": {
1171
1171
  "design.beehexa": {
1172
1172
  "dark": "{color.graphite.2}"
@@ -1186,12 +1186,66 @@
1186
1186
  "subtle": {
1187
1187
  "$type": "color",
1188
1188
  "$value": "{color.graphite.2}",
1189
- "$description": "Sidebars, table headers, quiet areas."
1189
+ "$description": "Shared global header/sidebar shell surface, mobile navigation drawer, table headers and quiet areas."
1190
+ },
1191
+ "overlay": {
1192
+ "$root": {
1193
+ "$type": "color",
1194
+ "$value": "{color.brand.white}",
1195
+ "$description": "Menus, popovers, select lists, toasts, dialogs and drawers. One step lighter than color.surface in dark, so a floating layer reads above cards.",
1196
+ "$extensions": {
1197
+ "design.beehexa": {
1198
+ "dark": "{color.graphite.3}"
1199
+ }
1200
+ }
1201
+ },
1202
+ "hover": {
1203
+ "$type": "color",
1204
+ "$value": "{color.graphite.2}",
1205
+ "$description": "Menu item or option on hover, inside color.surface.overlay.",
1206
+ "$extensions": {
1207
+ "design.beehexa": {
1208
+ "dark": "{color.graphite.4}"
1209
+ }
1210
+ }
1211
+ },
1212
+ "pressed": {
1213
+ "$type": "color",
1214
+ "$value": "{color.graphite.3}",
1215
+ "$description": "Menu item or option when pressed, inside color.surface.overlay.",
1216
+ "$extensions": {
1217
+ "design.beehexa": {
1218
+ "dark": "{color.graphite.5}"
1219
+ }
1220
+ }
1221
+ },
1222
+ "selected": {
1223
+ "$root": {
1224
+ "$type": "color",
1225
+ "$value": "{color.graphite.3}",
1226
+ "$description": "Selected option inside color.surface.overlay. Always add a second cue: a check or bold text.",
1227
+ "$extensions": {
1228
+ "design.beehexa": {
1229
+ "dark": "{color.graphite.5}"
1230
+ }
1231
+ }
1232
+ },
1233
+ "hover": {
1234
+ "$type": "color",
1235
+ "$value": "{color.graphite.4}",
1236
+ "$description": "Selected option on hover, inside color.surface.overlay. In dark it stays on graphite 5, as graphite 6 fails text and border contrast; the check mark carries the state.",
1237
+ "$extensions": {
1238
+ "design.beehexa": {
1239
+ "dark": "{color.graphite.5}"
1240
+ }
1241
+ }
1242
+ }
1243
+ }
1190
1244
  },
1191
1245
  "inverse": {
1192
1246
  "$type": "color",
1193
1247
  "$value": "{color.graphite.12}",
1194
- "$description": "Inverse surface: tooltips, toasts. Text on top: text.inverse."
1248
+ "$description": "Inverse surface: tooltips. Text on top: text.inverse."
1195
1249
  },
1196
1250
  "scrim": {
1197
1251
  "$type": "color",
@@ -0,0 +1,19 @@
1
+ {
2
+ "content": {
3
+ "$description": "Reusable application-content identity and empty-state geometry. Identity colours never encode operational status.",
4
+ "partner-logo": {
5
+ "size": { "$type": "dimension", "$value": "2.5rem", "$description": "Neutral square partner-logo tile; preserves the brand image aspect ratio." },
6
+ "image-size": { "$type": "dimension", "$value": "1.75rem", "$description": "Maximum contained partner mark inside the standard partner-logo tile." }
7
+ },
8
+ "avatar": {
9
+ "size": { "$type": "dimension", "$value": "2.5rem", "$description": "Default person or permission-member identity avatar; a visual identity, not a hit target." }
10
+ },
11
+ "identity-mark": {
12
+ "size": { "$type": "dimension", "$value": "2.75rem", "$description": "System/provider identity container when shown beside content labels." },
13
+ "image-size": { "$type": "dimension", "$value": "1.5rem", "$description": "Contained system/provider identity glyph within the identity-mark container." }
14
+ },
15
+ "empty-illustration": {
16
+ "size": { "$type": "dimension", "$value": "6rem", "$description": "Empty-state illustration container. Standard icons inside retain their own source icon sizes." }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "diagram": {
3
+ "$description": "Operational execution diagrams. Descriptive states are not business statuses; selection is an independent outer ring. See tools/mermaid.",
4
+ "canvas": { "$type": "color", "$value": "{color.surface.page}", "$description": "Opaque drawing and image-export sheet; pair with node and edge text." },
5
+ "node-fill": { "$type": "color", "$value": "{color.surface}", "$description": "Default and indeterminate node fill." },
6
+ "node-border": { "$type": "color", "$value": "{color.border.bold}", "$description": "Meaningful default and indeterminate node boundary." },
7
+ "node-title": { "$type": "color", "$value": "{color.text}", "$description": "Node title on node-fill." },
8
+ "node-desc": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Descriptive node and inspector text on neutral surfaces." },
9
+ "tile-bg": { "$type": "color", "$value": "{color.background.neutral}", "$description": "Step-category glyph plate; not a status." },
10
+ "tile-glyph": { "$type": "color", "$value": "{color.icon}", "$description": "Step-category glyph on tile-bg." },
11
+ "state-ran-ok": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Solid boundary of a step that ran without a reported failure. Descriptive completion evidence, not success green or warning orange." },
12
+ "ran-ok-fill": { "$type": "color", "$value": "{color.surface}", "$description": "Ran step fill; retain text and completion marker as non-colour cues." },
13
+ "fail-stroke": { "$type": "color", "$value": "{color.border.danger}", "$description": "Failed node boundary; pair with fail-fill and a failure marker." },
14
+ "fail-fill": { "$type": "color", "$value": "{color.background.danger.subtle}", "$description": "Failed execution node fill." },
15
+ "fail-title": { "$type": "color", "$value": "{color.text.danger}", "$description": "Failure title on fail-fill." },
16
+ "fail-desc": { "$type": "color", "$value": "{color.text.danger}", "$description": "Failure description on fail-fill." },
17
+ "unreached-fill": { "$type": "color", "$value": "{color.surface.subtle}", "$description": "Never-reached node fill; not a disabled control." },
18
+ "unreached-stroke": { "$type": "color", "$value": "{color.border.bold}", "$description": "Solid never-reached boundary with an explicit state label." },
19
+ "unreached-title": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Never-reached title on unreached-fill." },
20
+ "unreached-desc": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Never-reached description on unreached-fill." },
21
+ "nottaken-stroke": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Dashed not-taken boundary; dashes and label distinguish it from never reached." },
22
+ "nottaken-fill": { "$type": "color", "$value": "{color.surface}", "$description": "Not-taken branch fill." },
23
+ "nottaken-title": { "$type": "color", "$value": "{color.text}", "$description": "Not-taken title on nottaken-fill." },
24
+ "nottaken-desc": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Not-taken description on nottaken-fill." },
25
+ "badge-bg": { "$type": "color", "$value": "{color.surface}", "$description": "Repeat-count plate; repetition alone is not a warning." },
26
+ "badge-text": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Descriptive repeat count on badge-bg." },
27
+ "badge-border": { "$type": "color", "$value": "{color.border.bold}", "$description": "Repeat-count outline." },
28
+ "edge": { "$type": "color", "$value": "{color.border.bold}", "$description": "Meaningful neutral relation line and arrow." },
29
+ "edge-label-text": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Relation label on edge-label-bg." },
30
+ "edge-label-bg": { "$type": "color", "$value": "{color.surface.page}", "$description": "Opaque relation label plate." },
31
+ "panel-bg": { "$type": "color", "$value": "{color.surface}", "$description": "Inspector evidence surface." },
32
+ "panel-border": { "$type": "color", "$value": "{color.border}", "$description": "Decorative inspector divider, not an interactive boundary." },
33
+ "code-bg": { "$type": "color", "$value": "{color.surface}", "$description": "Structured key/value evidence surface; full code blocks use color.code roles." },
34
+ "code-key": { "$type": "color", "$value": "{color.text.subtle}", "$description": "Evidence field label on code-bg; not a link." },
35
+ "code-value": { "$type": "color", "$value": "{color.text}", "$description": "Evidence field value on code-bg." },
36
+ "selection-ring": { "$type": "color", "$value": "{color.border.focus}", "$description": "Independent outer selection/hover ring on canvas; never replace run-state paint." },
37
+ "node-font": { "$type": "font", "$value": "{font.body.default}", "$description": "Default Mermaid node label; inherits Vietnamese line-height." },
38
+ "card-width": { "$type": "dimension", "$value": "15rem", "$description": "240px measurable execution-step label card width; preserve fixed layout topology." },
39
+ "tile-size": { "$type": "dimension", "$value": "2.75rem", "$description": "44px step-category glyph tile inside execution-card labels, not an interaction target." },
40
+ "glyph-size": { "$type": "dimension", "$value": "2rem", "$description": "32px category symbol ink size within tile-size; this is a glyph, not display text." },
41
+ "preview-height": { "$type": "dimension", "$value": "45rem", "$description": "720px embedded authoring preview budget shared by the diagram and adjacent step-detail panel; fullscreen fills its host instead." },
42
+ "minimum-height": { "$type": "dimension", "$value": "20rem", "$description": "320px minimum authoring-preview viewport budget. Read-only split diagrams instead shrink with their enclosing pane." },
43
+ "evidence-height": { "$type": "dimension", "$value": "13.75rem", "$description": "220px embedded structured-result viewer height; content scrolls within this budget." },
44
+ "evidence-minimum-height": { "$type": "dimension", "$value": "12rem", "$description": "192px minimum pane budget for multiple request bodies so one expanded part does not hide another." },
45
+ "padding": { "$type": "dimension", "$value": "{space.100}", "$description": "Internal Mermaid node padding." },
46
+ "export-padding": { "$type": "dimension", "$value": "{space.300}", "$description": "Breathing room around fitted and exported drawing bounds." }
47
+ }
48
+ }
@@ -0,0 +1,129 @@
1
+ {
2
+ "editor": {
3
+ "background": {
4
+ "$type": "color",
5
+ "$value": "{color.surface}",
6
+ "$description": "Editor code canvas; pair with editor.text and syntax roles."
7
+ },
8
+ "text": {
9
+ "$type": "color",
10
+ "$value": "{color.text}",
11
+ "$description": "Editor default code foreground."
12
+ },
13
+ "gutter": {
14
+ "$type": "color",
15
+ "$value": "{color.surface.subtle}",
16
+ "$description": "Line-number gutter surface."
17
+ },
18
+ "lineNumber": {
19
+ "$type": "color",
20
+ "$value": "{color.text.subtlest}",
21
+ "$description": "Line numbers on the gutter."
22
+ },
23
+ "selection": {
24
+ "$type": "color",
25
+ "$value": "{color.background.selected}",
26
+ "$description": "Selected code range, with native selection/caret cues."
27
+ },
28
+ "lineHighlight": {
29
+ "$type": "color",
30
+ "$value": "{color.surface.subtle}",
31
+ "$description": "Current editor line; caret and gutter provide additional cues."
32
+ },
33
+ "cursor": {
34
+ "$type": "color",
35
+ "$value": "{color.text}",
36
+ "$description": "Insertion caret."
37
+ },
38
+ "border": {
39
+ "$type": "color",
40
+ "$value": "{color.border}",
41
+ "$description": "Editor frame."
42
+ },
43
+ "syntax": {
44
+ "comment": {
45
+ "$type": "color",
46
+ "$value": "{color.text.subtlest}",
47
+ "$description": "Comments: neutral, readable, no dimming."
48
+ },
49
+ "string": {
50
+ "$type": "color",
51
+ "$value": "{color.text.success}",
52
+ "$description": "String literals, not success state indicators."
53
+ },
54
+ "number": {
55
+ "$type": "color",
56
+ "$value": "{color.text.warning}",
57
+ "$description": "Numeric literals, not warning state indicators."
58
+ },
59
+ "keyword": {
60
+ "$type": "color",
61
+ "$value": "{color.text.info}",
62
+ "$description": "Language keywords, not info state indicators."
63
+ },
64
+ "type": {
65
+ "$type": "color",
66
+ "$value": "{color.text}",
67
+ "$description": "Types and identifiers."
68
+ },
69
+ "delimiter": {
70
+ "$type": "color",
71
+ "$value": "{color.text.subtle}",
72
+ "$description": "Punctuation and delimiters."
73
+ }
74
+ },
75
+ "diff": {
76
+ "inserted": {
77
+ "background": {
78
+ "$type": "color",
79
+ "$value": "{color.background.success.subtle}",
80
+ "$description": "Inserted diff text and lines; show + gutter marker."
81
+ },
82
+ "text": {
83
+ "$type": "color",
84
+ "$value": "{color.text.success}",
85
+ "$description": "Inserted diff annotation; + or inserted label required."
86
+ }
87
+ },
88
+ "removed": {
89
+ "background": {
90
+ "$type": "color",
91
+ "$value": "{color.background.danger.subtle}",
92
+ "$description": "Removed diff text and lines; show − gutter marker."
93
+ },
94
+ "text": {
95
+ "$type": "color",
96
+ "$value": "{color.text.danger}",
97
+ "$description": "Removed diff annotation; − or removed label required."
98
+ }
99
+ }
100
+ },
101
+ "font": {
102
+ "family": {
103
+ "$type": "fontFamily",
104
+ "$value": "{font.family.mono}",
105
+ "$description": "Editor numeric API family from code.default."
106
+ },
107
+ "size": {
108
+ "$type": "dimension",
109
+ "$value": "{font.size.200}",
110
+ "$description": "Editor numeric API size from code.default: 14px nominal."
111
+ },
112
+ "lineHeight": {
113
+ "$type": "dimension",
114
+ "$value": "1.25rem",
115
+ "$description": "Editor numeric API line height: 20px nominal; Vietnamese 24px.",
116
+ "$extensions": {
117
+ "design.beehexa": {
118
+ "vi": "1.5rem"
119
+ }
120
+ }
121
+ },
122
+ "weight": {
123
+ "$type": "fontWeight",
124
+ "$value": "{font.weight.regular}",
125
+ "$description": "Editor code weight."
126
+ }
127
+ }
128
+ }
129
+ }
@@ -4,7 +4,7 @@
4
4
  "raised": {
5
5
  "$type": "shadow",
6
6
  "$value": "0 1px 2px rgb(43 42 40 / 8%), 0 1px 3px rgb(43 42 40 / 6%)",
7
- "$description": "Cards that sit on the page.",
7
+ "$description": "Cards, including cards that only show content, and a card being dragged. Stronger in dark mode.",
8
8
  "$extensions": {
9
9
  "design.beehexa": {
10
10
  "dark": "0 1px 2px rgb(0 0 0 / 40%), 0 1px 3px rgb(0 0 0 / 30%)"
@@ -13,14 +13,24 @@
13
13
  },
14
14
  "overlay": {
15
15
  "$type": "shadow",
16
- "$value": "0 24px 80px rgb(43 42 40 / 14%)",
17
- "$description": "Dropdowns, popovers and dialogs.",
16
+ "$value": "0 4px 12px rgb(43 42 40 / 15%)",
17
+ "$description": "Dropdowns, menus, popovers, select lists and toasts. Pair with color.surface.overlay.",
18
18
  "$extensions": {
19
19
  "design.beehexa": {
20
- "dark": "0 24px 80px rgb(0 0 0 / 50%)"
20
+ "dark": "0 4px 12px rgb(0 0 0 / 50%)"
21
+ }
22
+ }
23
+ },
24
+ "modal": {
25
+ "$type": "shadow",
26
+ "$value": "0 8px 24px rgb(43 42 40 / 15%)",
27
+ "$description": "Dialogs, drawers and full sheets that sit on the scrim. Pair with color.surface.overlay.",
28
+ "$extensions": {
29
+ "design.beehexa": {
30
+ "dark": "0 8px 24px rgb(0 0 0 / 50%)"
21
31
  }
22
32
  }
23
33
  }
24
34
  }
25
35
  }
26
- }
36
+ }