@lace-cloud/design-tokens 0.37.1 → 0.38.0

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
@@ -55,6 +55,38 @@ import { darkTheme, lightTheme, themeDeclarations } from '@lace-cloud/design-tok
55
55
  const css = `:root{${themeDeclarations(darkTheme)}}[data-theme="light"]{${themeDeclarations(lightTheme)}}`;
56
56
  ```
57
57
 
58
+ ## Text roles and type sets
59
+
60
+ Nine text roles, `display`, `title`, `heading`, `body`, `control`, `caption`,
61
+ `label`, `code` and `note`, each a `font` shorthand and its tracking:
62
+
63
+ ```css
64
+ .heading {
65
+ font: var(--lace-text-heading);
66
+ letter-spacing: var(--lace-text-heading-tracking);
67
+ }
68
+ ```
69
+
70
+ `data-lace-type-set` picks their sizes and lines; weight, family and tracking
71
+ are one in every set, and no primitive changes with it. A region declares the
72
+ set of the kind of region it is:
73
+
74
+ | Set | For | Body | Declared by |
75
+ |---|---|---|---|
76
+ | `compact` | the canvas, and every host that declares none (`:root`) | 13/18 | the canvas's root; the extension's webviews and the API's server-rendered pages read the default |
77
+ | `comfortable` | product UI (Carbon's productive set) | 14/20 | the portal's document root |
78
+ | `expressive` | prose (Carbon's expressive set) | 16/24 | the `editorial` and `article` templates, on their prose regions only |
79
+
80
+ The expressive display, title and heading are fluid: each is one `clamp()`
81
+ from its size at the viewport's `--lace-size-viewport-sm` (320px) to its size
82
+ at 1584px (Carbon's max breakpoint), both ends steps of the font-size
83
+ scale, its slope written as two numbers (the size span over the viewport
84
+ span) so the role holds in every browser that has `clamp()`. A set's root nested in another declares its own roles, so the canvas
85
+ stays compact inside the comfortable portal and a container beside a prose
86
+ region keeps the page's set. `--lace-font-sans` leads with Instrument Sans,
87
+ `--lace-font-serif` is Instrument Serif and `--lace-font-mono` IBM Plex Mono;
88
+ a host without a face falls back through the rest of its stack.
89
+
58
90
  ## High contrast
59
91
 
60
92
  `data-theme="high-contrast"` and `"high-contrast-light"` (`THEMES` lists all four
package/dist/index.cjs CHANGED
@@ -18,16 +18,20 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ PAPERS: () => PAPERS,
24
+ PRODUCT_TYPE_SET: () => PRODUCT_TYPE_SET,
23
25
  THEMES: () => THEMES,
26
+ TYPE_SETS: () => TYPE_SETS,
24
27
  brand: () => brand,
25
28
  darkTheme: () => darkTheme,
26
29
  lightTheme: () => lightTheme,
27
30
  pin: () => pin,
31
+ textRoles: () => textRoles,
28
32
  themeDeclarations: () => themeDeclarations
29
33
  });
30
- module.exports = __toCommonJS(index_exports);
34
+ module.exports = __toCommonJS(src_exports);
31
35
 
32
36
  // src/themes.gen.ts
33
37
  var darkTheme = {
@@ -36,72 +40,134 @@ var darkTheme = {
36
40
  "--lace-color-bg-surface-alt": "#252526",
37
41
  "--lace-color-bg-input": "#0f0f0f",
38
42
  "--lace-color-bg-context-menu": "#1a1a1a",
39
- "--lace-color-border-default": "#333333",
43
+ "--lace-color-border-default": "rgba(255, 255, 255, 0.08)",
40
44
  "--lace-color-border-subtle": "#3c3c3c",
41
- "--lace-color-border-input": "#555555",
45
+ "--lace-color-border-input": "rgba(255, 255, 255, 0.15)",
46
+ "--lace-color-border-control": "#757575",
42
47
  "--lace-color-border-input-hover": "#888888",
43
48
  "--lace-color-text-primary": "#ecefed",
44
49
  "--lace-color-text-label": "#e6e6e6",
45
- "--lace-color-text-muted": "#999999",
46
- "--lace-color-text-description": "#9ca3af",
47
- "--lace-color-text-accent": "#cefe65",
48
- "--lace-color-text-link": "#60a5fa",
50
+ "--lace-color-text-muted": "#8f9691",
51
+ "--lace-color-text-description": "#b3bab5",
49
52
  "--lace-color-text-danger": "#e5484d",
50
53
  "--lace-color-text-danger-soft": "#f87171",
51
- "--lace-color-text-faint": "#8c8f8c",
52
54
  "--lace-color-row-hover": "rgba(255, 255, 255, 0.025)",
53
- "--lace-color-badge-purple": "#c084fc",
54
- "--lace-color-badge-purple-bg": "rgba(192, 132, 252, 0.1)",
55
55
  "--lace-color-accent": "#cefe65",
56
56
  "--lace-color-text-on-accent": "#111111",
57
+ "--lace-color-accent-edge": "#cefe65",
58
+ "--lace-color-ink": "#cefe65",
57
59
  "--lace-color-accent-alpha-subtle": "rgba(206, 254, 101, 0.1)",
58
60
  "--lace-color-accent-alpha-medium": "rgba(206, 254, 101, 0.2)",
59
61
  "--lace-color-accent-strong": "#e0ff8a",
60
62
  "--lace-color-success": "#4ade80",
61
63
  "--lace-color-success-hover": "#22c55e",
62
- "--lace-color-success-strong": "#16a34a",
63
64
  "--lace-color-danger": "#e5484d",
64
65
  "--lace-color-danger-bg-soft": "rgba(248, 113, 113, 0.12)",
65
66
  "--lace-color-danger-fg": "#f87171",
66
67
  "--lace-color-warning-bg": "#3b2507",
67
68
  "--lace-color-warning-fg": "#fbbf24",
68
- "--lace-color-focus-ring": "#cefe65"
69
+ "--lace-color-info": "#9ecbff",
70
+ "--lace-color-focus-ring": "#cefe65",
71
+ "--lace-color-series-1": "#95e7ff",
72
+ "--lace-color-series-2": "#b084f0",
73
+ "--lace-color-series-3": "#f5a623",
74
+ "--lace-color-series-4": "#f288c6",
75
+ "--lace-color-series-5": "#ff8a4c",
76
+ "--lace-color-series-6": "#cefe65"
69
77
  };
70
78
  var lightTheme = {
71
- "--lace-color-bg-canvas": "#ffffff",
72
- "--lace-color-bg-surface": "#f8fafc",
73
- "--lace-color-bg-surface-alt": "#f1f5f9",
79
+ "--lace-color-bg-canvas": "#f6f7f5",
80
+ "--lace-color-bg-surface": "#ffffff",
81
+ "--lace-color-bg-surface-alt": "#f1f3f0",
74
82
  "--lace-color-bg-input": "#ffffff",
75
83
  "--lace-color-bg-context-menu": "#ffffff",
76
- "--lace-color-border-default": "#cbd5e1",
84
+ "--lace-color-border-default": "rgba(22, 22, 22, 0.1)",
77
85
  "--lace-color-border-subtle": "#e2e8f0",
78
- "--lace-color-border-input": "#cbd5e1",
79
- "--lace-color-border-input-hover": "#94a3b8",
80
- "--lace-color-text-primary": "#0f172a",
86
+ "--lace-color-border-input": "rgba(22, 22, 22, 0.2)",
87
+ "--lace-color-border-control": "#7a7a7a",
88
+ "--lace-color-border-input-hover": "#4b5563",
89
+ "--lace-color-text-primary": "#161616",
81
90
  "--lace-color-text-label": "#1f2937",
82
- "--lace-color-text-muted": "#64748b",
83
- "--lace-color-text-description": "#475569",
84
- "--lace-color-text-accent": "#3d6600",
85
- "--lace-color-text-link": "#2563eb",
91
+ "--lace-color-text-muted": "#5c635e",
92
+ "--lace-color-text-description": "#454b47",
86
93
  "--lace-color-text-danger": "#dc2626",
87
94
  "--lace-color-text-danger-soft": "#ef4444",
88
- "--lace-color-text-faint": "#94a3b8",
89
95
  "--lace-color-row-hover": "rgba(0, 0, 0, 0.02)",
90
- "--lace-color-badge-purple": "#7c3aed",
91
- "--lace-color-badge-purple-bg": "#faf5ff",
92
- "--lace-color-accent": "#3d6600",
96
+ "--lace-color-ink": "#4a6e12",
93
97
  "--lace-color-accent-alpha-subtle": "rgba(132, 204, 22, 0.08)",
94
98
  "--lace-color-accent-alpha-medium": "rgba(132, 204, 22, 0.16)",
95
99
  "--lace-color-accent-strong": "#2d4a00",
96
100
  "--lace-color-success": "#047857",
97
101
  "--lace-color-success-hover": "#065f46",
98
- "--lace-color-success-strong": "#064e3b",
99
102
  "--lace-color-danger": "#dc2626",
100
103
  "--lace-color-danger-bg-soft": "#fef2f2",
101
104
  "--lace-color-danger-fg": "#b91c1c",
102
105
  "--lace-color-warning-bg": "#fffbeb",
103
106
  "--lace-color-warning-fg": "#b45309",
104
- "--lace-color-focus-ring": "#3d6600"
107
+ "--lace-color-info": "#2563eb",
108
+ "--lace-color-focus-ring": "#4a6e12",
109
+ "--lace-color-series-1": "#2c9db9",
110
+ "--lace-color-series-2": "#5c3e9a",
111
+ "--lace-color-series-3": "#8a5a10",
112
+ "--lace-color-series-4": "#8a2e5c",
113
+ "--lace-color-series-5": "#8a3a10",
114
+ "--lace-color-series-6": "#5e8a1a"
115
+ };
116
+ var textRoles = {
117
+ "--lace-text-display-size": "22px",
118
+ "--lace-text-display-line": "28px",
119
+ "--lace-text-title-size": "16px",
120
+ "--lace-text-title-line": "22px",
121
+ "--lace-text-heading-size": "14px",
122
+ "--lace-text-heading-line": "20px",
123
+ "--lace-text-body-size": "13px",
124
+ "--lace-text-body-line": "18px",
125
+ "--lace-text-control-size": "12px",
126
+ "--lace-text-control-line": "16px",
127
+ "--lace-text-caption-size": "11px",
128
+ "--lace-text-caption-line": "14px",
129
+ "--lace-text-label-size": "10px",
130
+ "--lace-text-label-line": "14px",
131
+ "--lace-text-code-size": "12px",
132
+ "--lace-text-code-line": "16px",
133
+ "--lace-text-note-size": "14px",
134
+ "--lace-text-note-line": "20px",
135
+ "--lace-text-display-weight": "600",
136
+ "--lace-text-display-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
137
+ "--lace-text-display-tracking": "-0.01em",
138
+ "--lace-text-title-weight": "600",
139
+ "--lace-text-title-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
140
+ "--lace-text-title-tracking": "0",
141
+ "--lace-text-heading-weight": "600",
142
+ "--lace-text-heading-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
143
+ "--lace-text-heading-tracking": "0",
144
+ "--lace-text-body-weight": "400",
145
+ "--lace-text-body-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
146
+ "--lace-text-body-tracking": "0",
147
+ "--lace-text-control-weight": "500",
148
+ "--lace-text-control-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
149
+ "--lace-text-control-tracking": "0",
150
+ "--lace-text-caption-weight": "400",
151
+ "--lace-text-caption-family": '"Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
152
+ "--lace-text-caption-tracking": "0",
153
+ "--lace-text-label-weight": "500",
154
+ "--lace-text-label-family": '"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
155
+ "--lace-text-label-tracking": "0.06em",
156
+ "--lace-text-code-weight": "400",
157
+ "--lace-text-code-family": '"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
158
+ "--lace-text-code-tracking": "0",
159
+ "--lace-text-note-weight": "400",
160
+ "--lace-text-note-family": '"Instrument Serif", Georgia, "Times New Roman", serif',
161
+ "--lace-text-note-tracking": "0",
162
+ "--lace-text-display": '600 22px / 28px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
163
+ "--lace-text-title": '600 16px / 22px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
164
+ "--lace-text-heading": '600 14px / 20px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
165
+ "--lace-text-body": '400 13px / 18px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
166
+ "--lace-text-control": '500 12px / 16px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
167
+ "--lace-text-caption": '400 11px / 14px "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
168
+ "--lace-text-label": '500 10px / 14px "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
169
+ "--lace-text-code": '400 12px / 16px "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
170
+ "--lace-text-note": 'italic 400 14px / 20px "Instrument Serif", Georgia, "Times New Roman", serif'
105
171
  };
106
172
 
107
173
  // src/index.ts
@@ -124,16 +190,23 @@ var pin = {
124
190
  any: { fill: "#9BA19E", stroke: "#4A4F4C" }
125
191
  };
126
192
  var THEMES = ["dark", "light", "high-contrast", "high-contrast-light"];
193
+ var TYPE_SETS = ["compact", "comfortable", "expressive"];
194
+ var PRODUCT_TYPE_SET = "comfortable";
195
+ var PAPERS = ["blueprint"];
127
196
  function themeDeclarations(theme) {
128
197
  return Object.entries(theme).map(([name, value]) => `${name}:${value}`).join(";");
129
198
  }
130
199
  // Annotate the CommonJS export names for ESM import in node:
131
200
  0 && (module.exports = {
201
+ PAPERS,
202
+ PRODUCT_TYPE_SET,
132
203
  THEMES,
204
+ TYPE_SETS,
133
205
  brand,
134
206
  darkTheme,
135
207
  lightTheme,
136
208
  pin,
209
+ textRoles,
137
210
  themeDeclarations
138
211
  });
139
212
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/themes.gen.ts"],"sourcesContent":["// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours, generated from tokens.css at build\n// (`src/themes-source.ts`): `darkTheme` and `lightTheme`, for a consumer that\n// cannot load the stylesheet.\nexport { darkTheme, lightTheme } from './themes.gen';\n\n/** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,\n * the rest are `[data-theme=\"<name>\"]` blocks. A host maps its own theme names onto these. */\nexport const THEMES = ['dark', 'light', 'high-contrast', 'high-contrast-light'] as const;\n\n/** A theme's colours as the declarations of one CSS rule, `name:value` joined\n * by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n","// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': '#333333',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': '#555555',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#999999',\n '--lace-color-text-description': '#9ca3af',\n '--lace-color-text-accent': '#cefe65',\n '--lace-color-text-link': '#60a5fa',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-text-faint': '#8c8f8c',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-badge-purple': '#c084fc',\n '--lace-color-badge-purple-bg': 'rgba(192, 132, 252, 0.1)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-success-strong': '#16a34a',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-focus-ring': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#ffffff',\n '--lace-color-bg-surface': '#f8fafc',\n '--lace-color-bg-surface-alt': '#f1f5f9',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': '#cbd5e1',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': '#cbd5e1',\n '--lace-color-border-input-hover': '#94a3b8',\n '--lace-color-text-primary': '#0f172a',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#64748b',\n '--lace-color-text-description': '#475569',\n '--lace-color-text-accent': '#3d6600',\n '--lace-color-text-link': '#2563eb',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-text-faint': '#94a3b8',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-badge-purple': '#7c3aed',\n '--lace-color-badge-purple-bg': '#faf5ff',\n '--lace-color-accent': '#3d6600',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-success-strong': '#064e3b',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-focus-ring': '#3d6600',\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,4BAA4B;AAAA,EAC5B,iCAAiC;AAAA,EACjC,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,gCAAgC;AAAA,EAChC,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,+BAA+B;AAAA,EAC/B,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,2BAA2B;AAC7B;AAOO,IAAM,aAAa;AAAA,EACxB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAA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AAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/themes.gen.ts"],"sourcesContent":["// @lace-cloud/design-tokens — JS/TS token exports\n// Primary distribution is tokens.css; use this for JS/TS consumers that\n// need programmatic access to token values (e.g., pinColor.ts).\n\nexport const brand = {\n green: '#CEFE65',\n greenBright: '#e0ff8a',\n gunmetal: '#153238',\n gunmetalLight: '#1a3f47',\n night: '#161616',\n cyan: '#95E7FF',\n grey: '#ECEFED',\n} as const;\n\nexport const pin = {\n string: { fill: '#95E7FF', stroke: '#2C9DB9' },\n number: { fill: '#F5A623', stroke: '#8A5A10' },\n bool: { fill: '#B084F0', stroke: '#5C3E9A' },\n list: { fill: '#CEFE65', stroke: '#5E8A1A' },\n map: { fill: '#F288C6', stroke: '#8A2E5C' },\n object: { fill: '#FF8A4C', stroke: '#8A3A10' },\n any: { fill: '#9BA19E', stroke: '#4A4F4C' },\n} as const;\n\n// The themes' semantic colours and the compact text roles, generated from\n// tokens.css at build (`src/themes-source.ts`): `darkTheme`, `lightTheme` and\n// `textRoles`, for a consumer that cannot load the stylesheet.\nexport { darkTheme, lightTheme, textRoles } from './themes.gen';\n\nimport type { textRoles } from './themes.gen';\n\n/** A text role tokens.css declares, by the name in its `--lace-text-<role>` custom properties. */\nexport type TextRole = keyof typeof textRoles extends infer Name\n ? Name extends `--lace-text-${infer Role}-size`\n ? Role\n : never\n : never;\n\n/** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,\n * the rest are `[data-theme=\"<name>\"]` blocks. A host maps its own theme names onto these. */\nexport const THEMES = ['dark', 'light', 'high-contrast', 'high-contrast-light'] as const;\n\n/** The type sets tokens.css declares, read through `data-lace-type-set` on a region's root: each\n * sizes the text roles for one kind of region. `compact` is the default (`:root`) and the\n * canvas's own root; `comfortable` is product UI, the portal's document root; `expressive` is\n * prose, the editorial and article templates' prose regions. */\nexport const TYPE_SETS = ['compact', 'comfortable', 'expressive'] as const;\n\n/** A type set, the value of a region's `data-lace-type-set`. */\nexport type TypeSet = (typeof TYPE_SETS)[number];\n\n/** The type set product UI reads: the one the portal's document root declares. */\nexport const PRODUCT_TYPE_SET = 'comfortable' satisfies TypeSet;\n\n/** The papers tokens.css declares beside the paper of now (`:root`), read through\n * `data-lace-paper` on a region's root: `blueprint` is the paper a page drawn as of an earlier\n * revision is drawn on, its ground, threads and ink in one blue in every theme. */\nexport const PAPERS = ['blueprint'] as const;\n\n/** A paper, the value of a region's `data-lace-paper`. */\nexport type Paper = (typeof PAPERS)[number];\n\n/** Custom properties (a theme's colours, the text roles) as the declarations of one CSS rule,\n * `name:value` joined by `;`, for a page that declares the tokens in a rule of its own. */\nexport function themeDeclarations(theme: Readonly<Record<string, string>>): string {\n return Object.entries(theme)\n .map(([name, value]) => `${name}:${value}`)\n .join(';');\n}\n","// Generated from tokens.css by scripts/gen-themes.mjs; `pnpm --filter @lace-cloud/design-tokens build`\n// rewrites it. Edit tokens.css, never this file.\n\n/**\n * The dark theme's semantic colours — every `--lace-color-*` of tokens.css's semantic tier, at the\n * value it resolves to in the default (dark) theme — for a consumer that cannot load tokens.css: a\n * server-rendered page declares them in its own `:root` and reads them by the names the\n * stylesheet uses.\n */\nexport const darkTheme = {\n '--lace-color-bg-canvas': '#161616',\n '--lace-color-bg-surface': '#1e1e1e',\n '--lace-color-bg-surface-alt': '#252526',\n '--lace-color-bg-input': '#0f0f0f',\n '--lace-color-bg-context-menu': '#1a1a1a',\n '--lace-color-border-default': 'rgba(255, 255, 255, 0.08)',\n '--lace-color-border-subtle': '#3c3c3c',\n '--lace-color-border-input': 'rgba(255, 255, 255, 0.15)',\n '--lace-color-border-control': '#757575',\n '--lace-color-border-input-hover': '#888888',\n '--lace-color-text-primary': '#ecefed',\n '--lace-color-text-label': '#e6e6e6',\n '--lace-color-text-muted': '#8f9691',\n '--lace-color-text-description': '#b3bab5',\n '--lace-color-text-danger': '#e5484d',\n '--lace-color-text-danger-soft': '#f87171',\n '--lace-color-row-hover': 'rgba(255, 255, 255, 0.025)',\n '--lace-color-accent': '#cefe65',\n '--lace-color-text-on-accent': '#111111',\n '--lace-color-accent-edge': '#cefe65',\n '--lace-color-ink': '#cefe65',\n '--lace-color-accent-alpha-subtle': 'rgba(206, 254, 101, 0.1)',\n '--lace-color-accent-alpha-medium': 'rgba(206, 254, 101, 0.2)',\n '--lace-color-accent-strong': '#e0ff8a',\n '--lace-color-success': '#4ade80',\n '--lace-color-success-hover': '#22c55e',\n '--lace-color-danger': '#e5484d',\n '--lace-color-danger-bg-soft': 'rgba(248, 113, 113, 0.12)',\n '--lace-color-danger-fg': '#f87171',\n '--lace-color-warning-bg': '#3b2507',\n '--lace-color-warning-fg': '#fbbf24',\n '--lace-color-info': '#9ecbff',\n '--lace-color-focus-ring': '#cefe65',\n '--lace-color-series-1': '#95e7ff',\n '--lace-color-series-2': '#b084f0',\n '--lace-color-series-3': '#f5a623',\n '--lace-color-series-4': '#f288c6',\n '--lace-color-series-5': '#ff8a4c',\n '--lace-color-series-6': '#cefe65',\n} as const;\n\n/**\n * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme=\"light\"]`\n * block overrides, at the value it resolves to there — declared after `darkTheme` under the\n * page's own `[data-theme=\"light\"]`.\n */\nexport const lightTheme = {\n '--lace-color-bg-canvas': '#f6f7f5',\n '--lace-color-bg-surface': '#ffffff',\n '--lace-color-bg-surface-alt': '#f1f3f0',\n '--lace-color-bg-input': '#ffffff',\n '--lace-color-bg-context-menu': '#ffffff',\n '--lace-color-border-default': 'rgba(22, 22, 22, 0.1)',\n '--lace-color-border-subtle': '#e2e8f0',\n '--lace-color-border-input': 'rgba(22, 22, 22, 0.2)',\n '--lace-color-border-control': '#7a7a7a',\n '--lace-color-border-input-hover': '#4b5563',\n '--lace-color-text-primary': '#161616',\n '--lace-color-text-label': '#1f2937',\n '--lace-color-text-muted': '#5c635e',\n '--lace-color-text-description': '#454b47',\n '--lace-color-text-danger': '#dc2626',\n '--lace-color-text-danger-soft': '#ef4444',\n '--lace-color-row-hover': 'rgba(0, 0, 0, 0.02)',\n '--lace-color-ink': '#4a6e12',\n '--lace-color-accent-alpha-subtle': 'rgba(132, 204, 22, 0.08)',\n '--lace-color-accent-alpha-medium': 'rgba(132, 204, 22, 0.16)',\n '--lace-color-accent-strong': '#2d4a00',\n '--lace-color-success': '#047857',\n '--lace-color-success-hover': '#065f46',\n '--lace-color-danger': '#dc2626',\n '--lace-color-danger-bg-soft': '#fef2f2',\n '--lace-color-danger-fg': '#b91c1c',\n '--lace-color-warning-bg': '#fffbeb',\n '--lace-color-warning-fg': '#b45309',\n '--lace-color-info': '#2563eb',\n '--lace-color-focus-ring': '#4a6e12',\n '--lace-color-series-1': '#2c9db9',\n '--lace-color-series-2': '#5c3e9a',\n '--lace-color-series-3': '#8a5a10',\n '--lace-color-series-4': '#8a2e5c',\n '--lace-color-series-5': '#8a3a10',\n '--lace-color-series-6': '#5e8a1a',\n} as const;\n\n/**\n * The text roles in the default (compact) type set — each `--lace-text-<role>` `font` shorthand\n * and its `-size`, `-line`, `-weight`, `-family` and `-tracking`, resolved — for a consumer\n * that cannot load tokens.css: it declares them in its own `:root` and sets a run's type with\n * `font: var(--lace-text-<role>)` and `letter-spacing: var(--lace-text-<role>-tracking)`.\n */\nexport const textRoles = {\n '--lace-text-display-size': '22px',\n '--lace-text-display-line': '28px',\n '--lace-text-title-size': '16px',\n '--lace-text-title-line': '22px',\n '--lace-text-heading-size': '14px',\n '--lace-text-heading-line': '20px',\n '--lace-text-body-size': '13px',\n '--lace-text-body-line': '18px',\n '--lace-text-control-size': '12px',\n '--lace-text-control-line': '16px',\n '--lace-text-caption-size': '11px',\n '--lace-text-caption-line': '14px',\n '--lace-text-label-size': '10px',\n '--lace-text-label-line': '14px',\n '--lace-text-code-size': '12px',\n '--lace-text-code-line': '16px',\n '--lace-text-note-size': '14px',\n '--lace-text-note-line': '20px',\n '--lace-text-display-weight': '600',\n '--lace-text-display-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-display-tracking': '-0.01em',\n '--lace-text-title-weight': '600',\n '--lace-text-title-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-title-tracking': '0',\n '--lace-text-heading-weight': '600',\n '--lace-text-heading-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-heading-tracking': '0',\n '--lace-text-body-weight': '400',\n '--lace-text-body-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-body-tracking': '0',\n '--lace-text-control-weight': '500',\n '--lace-text-control-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-control-tracking': '0',\n '--lace-text-caption-weight': '400',\n '--lace-text-caption-family': '\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-caption-tracking': '0',\n '--lace-text-label-weight': '500',\n '--lace-text-label-family': '\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n '--lace-text-label-tracking': '0.06em',\n '--lace-text-code-weight': '400',\n '--lace-text-code-family': '\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n '--lace-text-code-tracking': '0',\n '--lace-text-note-weight': '400',\n '--lace-text-note-family': '\"Instrument Serif\", Georgia, \"Times New Roman\", serif',\n '--lace-text-note-tracking': '0',\n '--lace-text-display': '600 22px / 28px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-title': '600 16px / 22px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-heading': '600 14px / 20px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-body': '400 13px / 18px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-control': '500 12px / 16px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-caption': '400 11px / 14px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif',\n '--lace-text-label': '500 10px / 14px \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n '--lace-text-code': '400 12px / 16px \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n '--lace-text-note': 'italic 400 14px / 20px \"Instrument Serif\", Georgia, \"Times New Roman\", serif',\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,YAAY;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,4BAA4B;AAAA,EAC5B,iCAAiC;AAAA,EACjC,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,oCAAoC;AAAA,EACpC,oCAAoC;AAAA,EACpC,8BAA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,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,MAAM,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC3C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC1C,QAAQ,EAAE,MAAM,WAAW,QAAQ,UAAU;AAAA,EAC7C,KAAK,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC5C;AAkBO,IAAM,SAAS,CAAC,QAAQ,SAAS,iBAAiB,qBAAqB;AAMvE,IAAM,YAAY,CAAC,WAAW,eAAe,YAAY;AAMzD,IAAM,mBAAmB;AAKzB,IAAM,SAAS,CAAC,WAAW;AAO3B,SAAS,kBAAkB,OAAiD;AACjF,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,KAAK,EAAE,EACzC,KAAK,GAAG;AACb;","names":[]}
package/dist/index.d.cts CHANGED
@@ -10,36 +10,40 @@ declare const darkTheme: {
10
10
  readonly '--lace-color-bg-surface-alt': "#252526";
11
11
  readonly '--lace-color-bg-input': "#0f0f0f";
12
12
  readonly '--lace-color-bg-context-menu': "#1a1a1a";
13
- readonly '--lace-color-border-default': "#333333";
13
+ readonly '--lace-color-border-default': "rgba(255, 255, 255, 0.08)";
14
14
  readonly '--lace-color-border-subtle': "#3c3c3c";
15
- readonly '--lace-color-border-input': "#555555";
15
+ readonly '--lace-color-border-input': "rgba(255, 255, 255, 0.15)";
16
+ readonly '--lace-color-border-control': "#757575";
16
17
  readonly '--lace-color-border-input-hover': "#888888";
17
18
  readonly '--lace-color-text-primary': "#ecefed";
18
19
  readonly '--lace-color-text-label': "#e6e6e6";
19
- readonly '--lace-color-text-muted': "#999999";
20
- readonly '--lace-color-text-description': "#9ca3af";
21
- readonly '--lace-color-text-accent': "#cefe65";
22
- readonly '--lace-color-text-link': "#60a5fa";
20
+ readonly '--lace-color-text-muted': "#8f9691";
21
+ readonly '--lace-color-text-description': "#b3bab5";
23
22
  readonly '--lace-color-text-danger': "#e5484d";
24
23
  readonly '--lace-color-text-danger-soft': "#f87171";
25
- readonly '--lace-color-text-faint': "#8c8f8c";
26
24
  readonly '--lace-color-row-hover': "rgba(255, 255, 255, 0.025)";
27
- readonly '--lace-color-badge-purple': "#c084fc";
28
- readonly '--lace-color-badge-purple-bg': "rgba(192, 132, 252, 0.1)";
29
25
  readonly '--lace-color-accent': "#cefe65";
30
26
  readonly '--lace-color-text-on-accent': "#111111";
27
+ readonly '--lace-color-accent-edge': "#cefe65";
28
+ readonly '--lace-color-ink': "#cefe65";
31
29
  readonly '--lace-color-accent-alpha-subtle': "rgba(206, 254, 101, 0.1)";
32
30
  readonly '--lace-color-accent-alpha-medium': "rgba(206, 254, 101, 0.2)";
33
31
  readonly '--lace-color-accent-strong': "#e0ff8a";
34
32
  readonly '--lace-color-success': "#4ade80";
35
33
  readonly '--lace-color-success-hover': "#22c55e";
36
- readonly '--lace-color-success-strong': "#16a34a";
37
34
  readonly '--lace-color-danger': "#e5484d";
38
35
  readonly '--lace-color-danger-bg-soft': "rgba(248, 113, 113, 0.12)";
39
36
  readonly '--lace-color-danger-fg': "#f87171";
40
37
  readonly '--lace-color-warning-bg': "#3b2507";
41
38
  readonly '--lace-color-warning-fg': "#fbbf24";
39
+ readonly '--lace-color-info': "#9ecbff";
42
40
  readonly '--lace-color-focus-ring': "#cefe65";
41
+ readonly '--lace-color-series-1': "#95e7ff";
42
+ readonly '--lace-color-series-2': "#b084f0";
43
+ readonly '--lace-color-series-3': "#f5a623";
44
+ readonly '--lace-color-series-4': "#f288c6";
45
+ readonly '--lace-color-series-5': "#ff8a4c";
46
+ readonly '--lace-color-series-6': "#cefe65";
43
47
  };
44
48
  /**
45
49
  * The light theme's semantic colours — every `--lace-color-*` tokens.css's `[data-theme="light"]`
@@ -47,40 +51,104 @@ declare const darkTheme: {
47
51
  * page's own `[data-theme="light"]`.
48
52
  */
49
53
  declare const lightTheme: {
50
- readonly '--lace-color-bg-canvas': "#ffffff";
51
- readonly '--lace-color-bg-surface': "#f8fafc";
52
- readonly '--lace-color-bg-surface-alt': "#f1f5f9";
54
+ readonly '--lace-color-bg-canvas': "#f6f7f5";
55
+ readonly '--lace-color-bg-surface': "#ffffff";
56
+ readonly '--lace-color-bg-surface-alt': "#f1f3f0";
53
57
  readonly '--lace-color-bg-input': "#ffffff";
54
58
  readonly '--lace-color-bg-context-menu': "#ffffff";
55
- readonly '--lace-color-border-default': "#cbd5e1";
59
+ readonly '--lace-color-border-default': "rgba(22, 22, 22, 0.1)";
56
60
  readonly '--lace-color-border-subtle': "#e2e8f0";
57
- readonly '--lace-color-border-input': "#cbd5e1";
58
- readonly '--lace-color-border-input-hover': "#94a3b8";
59
- readonly '--lace-color-text-primary': "#0f172a";
61
+ readonly '--lace-color-border-input': "rgba(22, 22, 22, 0.2)";
62
+ readonly '--lace-color-border-control': "#7a7a7a";
63
+ readonly '--lace-color-border-input-hover': "#4b5563";
64
+ readonly '--lace-color-text-primary': "#161616";
60
65
  readonly '--lace-color-text-label': "#1f2937";
61
- readonly '--lace-color-text-muted': "#64748b";
62
- readonly '--lace-color-text-description': "#475569";
63
- readonly '--lace-color-text-accent': "#3d6600";
64
- readonly '--lace-color-text-link': "#2563eb";
66
+ readonly '--lace-color-text-muted': "#5c635e";
67
+ readonly '--lace-color-text-description': "#454b47";
65
68
  readonly '--lace-color-text-danger': "#dc2626";
66
69
  readonly '--lace-color-text-danger-soft': "#ef4444";
67
- readonly '--lace-color-text-faint': "#94a3b8";
68
70
  readonly '--lace-color-row-hover': "rgba(0, 0, 0, 0.02)";
69
- readonly '--lace-color-badge-purple': "#7c3aed";
70
- readonly '--lace-color-badge-purple-bg': "#faf5ff";
71
- readonly '--lace-color-accent': "#3d6600";
71
+ readonly '--lace-color-ink': "#4a6e12";
72
72
  readonly '--lace-color-accent-alpha-subtle': "rgba(132, 204, 22, 0.08)";
73
73
  readonly '--lace-color-accent-alpha-medium': "rgba(132, 204, 22, 0.16)";
74
74
  readonly '--lace-color-accent-strong': "#2d4a00";
75
75
  readonly '--lace-color-success': "#047857";
76
76
  readonly '--lace-color-success-hover': "#065f46";
77
- readonly '--lace-color-success-strong': "#064e3b";
78
77
  readonly '--lace-color-danger': "#dc2626";
79
78
  readonly '--lace-color-danger-bg-soft': "#fef2f2";
80
79
  readonly '--lace-color-danger-fg': "#b91c1c";
81
80
  readonly '--lace-color-warning-bg': "#fffbeb";
82
81
  readonly '--lace-color-warning-fg': "#b45309";
83
- readonly '--lace-color-focus-ring': "#3d6600";
82
+ readonly '--lace-color-info': "#2563eb";
83
+ readonly '--lace-color-focus-ring': "#4a6e12";
84
+ readonly '--lace-color-series-1': "#2c9db9";
85
+ readonly '--lace-color-series-2': "#5c3e9a";
86
+ readonly '--lace-color-series-3': "#8a5a10";
87
+ readonly '--lace-color-series-4': "#8a2e5c";
88
+ readonly '--lace-color-series-5': "#8a3a10";
89
+ readonly '--lace-color-series-6': "#5e8a1a";
90
+ };
91
+ /**
92
+ * The text roles in the default (compact) type set — each `--lace-text-<role>` `font` shorthand
93
+ * and its `-size`, `-line`, `-weight`, `-family` and `-tracking`, resolved — for a consumer
94
+ * that cannot load tokens.css: it declares them in its own `:root` and sets a run's type with
95
+ * `font: var(--lace-text-<role>)` and `letter-spacing: var(--lace-text-<role>-tracking)`.
96
+ */
97
+ declare const textRoles: {
98
+ readonly '--lace-text-display-size': "22px";
99
+ readonly '--lace-text-display-line': "28px";
100
+ readonly '--lace-text-title-size': "16px";
101
+ readonly '--lace-text-title-line': "22px";
102
+ readonly '--lace-text-heading-size': "14px";
103
+ readonly '--lace-text-heading-line': "20px";
104
+ readonly '--lace-text-body-size': "13px";
105
+ readonly '--lace-text-body-line': "18px";
106
+ readonly '--lace-text-control-size': "12px";
107
+ readonly '--lace-text-control-line': "16px";
108
+ readonly '--lace-text-caption-size': "11px";
109
+ readonly '--lace-text-caption-line': "14px";
110
+ readonly '--lace-text-label-size': "10px";
111
+ readonly '--lace-text-label-line': "14px";
112
+ readonly '--lace-text-code-size': "12px";
113
+ readonly '--lace-text-code-line': "16px";
114
+ readonly '--lace-text-note-size': "14px";
115
+ readonly '--lace-text-note-line': "20px";
116
+ readonly '--lace-text-display-weight': "600";
117
+ readonly '--lace-text-display-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
118
+ readonly '--lace-text-display-tracking': "-0.01em";
119
+ readonly '--lace-text-title-weight': "600";
120
+ readonly '--lace-text-title-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
121
+ readonly '--lace-text-title-tracking': "0";
122
+ readonly '--lace-text-heading-weight': "600";
123
+ readonly '--lace-text-heading-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
124
+ readonly '--lace-text-heading-tracking': "0";
125
+ readonly '--lace-text-body-weight': "400";
126
+ readonly '--lace-text-body-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
127
+ readonly '--lace-text-body-tracking': "0";
128
+ readonly '--lace-text-control-weight': "500";
129
+ readonly '--lace-text-control-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
130
+ readonly '--lace-text-control-tracking': "0";
131
+ readonly '--lace-text-caption-weight': "400";
132
+ readonly '--lace-text-caption-family': "\"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
133
+ readonly '--lace-text-caption-tracking': "0";
134
+ readonly '--lace-text-label-weight': "500";
135
+ readonly '--lace-text-label-family': "\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace";
136
+ readonly '--lace-text-label-tracking': "0.06em";
137
+ readonly '--lace-text-code-weight': "400";
138
+ readonly '--lace-text-code-family': "\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace";
139
+ readonly '--lace-text-code-tracking': "0";
140
+ readonly '--lace-text-note-weight': "400";
141
+ readonly '--lace-text-note-family': "\"Instrument Serif\", Georgia, \"Times New Roman\", serif";
142
+ readonly '--lace-text-note-tracking': "0";
143
+ readonly '--lace-text-display': "600 22px / 28px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
144
+ readonly '--lace-text-title': "600 16px / 22px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
145
+ readonly '--lace-text-heading': "600 14px / 20px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
146
+ readonly '--lace-text-body': "400 13px / 18px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
147
+ readonly '--lace-text-control': "500 12px / 16px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
148
+ readonly '--lace-text-caption': "400 11px / 14px \"Instrument Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
149
+ readonly '--lace-text-label': "500 10px / 14px \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace";
150
+ readonly '--lace-text-code': "400 12px / 16px \"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace";
151
+ readonly '--lace-text-note': "italic 400 14px / 20px \"Instrument Serif\", Georgia, \"Times New Roman\", serif";
84
152
  };
85
153
 
86
154
  declare const brand: {
@@ -123,11 +191,29 @@ declare const pin: {
123
191
  };
124
192
  };
125
193
 
194
+ /** A text role tokens.css declares, by the name in its `--lace-text-<role>` custom properties. */
195
+ type TextRole = keyof typeof textRoles extends infer Name ? Name extends `--lace-text-${infer Role}-size` ? Role : never : never;
126
196
  /** The themes tokens.css declares, read through `data-theme` on <html>: `dark` is the default,
127
197
  * the rest are `[data-theme="<name>"]` blocks. A host maps its own theme names onto these. */
128
198
  declare const THEMES: readonly ["dark", "light", "high-contrast", "high-contrast-light"];
129
- /** A theme's colours as the declarations of one CSS rule, `name:value` joined
130
- * by `;`, for a page that declares the tokens in a rule of its own. */
199
+ /** The type sets tokens.css declares, read through `data-lace-type-set` on a region's root: each
200
+ * sizes the text roles for one kind of region. `compact` is the default (`:root`) and the
201
+ * canvas's own root; `comfortable` is product UI, the portal's document root; `expressive` is
202
+ * prose, the editorial and article templates' prose regions. */
203
+ declare const TYPE_SETS: readonly ["compact", "comfortable", "expressive"];
204
+ /** A type set, the value of a region's `data-lace-type-set`. */
205
+ type TypeSet = (typeof TYPE_SETS)[number];
206
+ /** The type set product UI reads: the one the portal's document root declares. */
207
+ declare const PRODUCT_TYPE_SET = "comfortable";
208
+ /** The papers tokens.css declares beside the paper of now (`:root`), read through
209
+ * `data-lace-paper` on a region's root: `blueprint` is the paper a page drawn as of an earlier
210
+ * revision is drawn on, its ground, threads and ink in one blue in every theme. */
211
+ declare const PAPERS: readonly ["blueprint"];
212
+ /** A paper, the value of a region's `data-lace-paper`. */
213
+ type Paper = (typeof PAPERS)[number];
214
+ /** Custom properties (a theme's colours, the text roles) as the declarations of one CSS rule,
215
+ * `name:value` joined by `;`, for a page that declares the tokens in a rule of its own. */
131
216
  declare function themeDeclarations(theme: Readonly<Record<string, string>>): string;
132
217
 
133
- export { THEMES, brand, darkTheme, lightTheme, pin, themeDeclarations };
218
+ export { PAPERS, PRODUCT_TYPE_SET, THEMES, TYPE_SETS, brand, darkTheme, lightTheme, pin, textRoles, themeDeclarations };
219
+ export type { Paper, TextRole, TypeSet };