@godxjp/ui 32.0.0 → 32.0.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.
@@ -3,7 +3,7 @@
3
3
  You are about to write code against a design system you did not author. This file is the whole
4
4
  contract. Read it before you write JSX.
5
5
 
6
- **This catalog describes `@godxjp/ui` 32.0.0.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 32.0.1.** If the project you are editing has a different
7
7
  version in its `package.json`, read the pinned catalog for THAT version instead
8
8
  (`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
9
9
  not exist yet; older, and it hides props that do. Neither failure announces itself.
@@ -10,7 +10,7 @@
10
10
  "type": "string (BCP-47)"
11
11
  },
12
12
  {
13
- "description": "Product defaults the host opts into — `import { godxPreset } from \"@godxjp/ui/themes/godx\"` (pair it with `@godxjp/ui/themes/godx.css` after the base stylesheet). Its `defaultLocale` and `timeZone` fill only what the props leave unset, its `brandMark` is what an `AuthIdentity` with no `brand` draws, and its `name` is written to `<html data-preset>`. Omit for the neutral defaults (ink primary, `en`, no product mark).",
13
+ "description": "Product defaults the host opts into — `import { godxPreset } from \"@godxjp/ui/themes/godx\"` (pair it with `@godxjp/ui/themes/godx.css` after the base stylesheet; a shadow root that embeds `@godxjp/ui/styles/core` takes the font-free `@godxjp/ui/themes/godx-tokens.css` instead, since `@font-face` must live in the document). Its `defaultLocale` and `timeZone` fill only what the props leave unset, its `brandMark` is what an `AuthIdentity` with no `brand` draws, and its `name` is written to `<html data-preset>`. Omit for the neutral defaults (ink primary, `en`, no product mark).",
14
14
  "name": "preset",
15
15
  "type": "AppPreset"
16
16
  },
@@ -8566,7 +8566,7 @@
8566
8566
  "type": "string (BCP-47)"
8567
8567
  },
8568
8568
  {
8569
- "description": "Product defaults the host opts into — `import { godxPreset } from \"@godxjp/ui/themes/godx\"` (pair it with `@godxjp/ui/themes/godx.css` after the base stylesheet). Its `defaultLocale` and `timeZone` fill only what the props leave unset, its `brandMark` is what an `AuthIdentity` with no `brand` draws, and its `name` is written to `<html data-preset>`. Omit for the neutral defaults (ink primary, `en`, no product mark).",
8569
+ "description": "Product defaults the host opts into — `import { godxPreset } from \"@godxjp/ui/themes/godx\"` (pair it with `@godxjp/ui/themes/godx.css` after the base stylesheet; a shadow root that embeds `@godxjp/ui/styles/core` takes the font-free `@godxjp/ui/themes/godx-tokens.css` instead, since `@font-face` must live in the document). Its `defaultLocale` and `timeZone` fill only what the props leave unset, its `brandMark` is what an `AuthIdentity` with no `brand` draws, and its `name` is written to `<html data-preset>`. Omit for the neutral defaults (ink primary, `en`, no product mark).",
8570
8570
  "name": "preset",
8571
8571
  "type": "AppPreset"
8572
8572
  },
package/agent/index.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
49
49
  "read": {
50
50
  "live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
51
- "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.0.0/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.0.1/agent/index.json"
52
52
  },
53
53
  "source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
54
54
  "start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
@@ -62,5 +62,5 @@
62
62
  "foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
63
63
  "semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
64
64
  },
65
- "version": "32.0.0"
65
+ "version": "32.0.1"
66
66
  }
package/agent/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # @godxjp/ui
2
2
 
3
3
  > A Japanese-enterprise React design system: 161 components, 2183 design tokens,
4
- > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.0.0.
4
+ > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.0.1.
5
5
 
6
6
  If your client can run a process, do not read these files — run the MCP server instead
7
- (`npx @godxjp/ui-mcp@32.0.0`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@32.0.1`). It is searchable and version-locked. These files exist for agents
8
8
  that can only fetch URLs.
9
9
 
10
10
  ## Start
@@ -26,7 +26,7 @@ that can only fetch URLs.
26
26
  ## Pinning
27
27
 
28
28
  Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
29
- the tag: `.../godx-jp/godxjp-ui/v32.0.0/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v32.0.1/agent/...`. A catalog that does not match the installed
30
30
  package describes props that are absent, or hides props that are present, and says nothing either way.
31
31
 
32
32
  Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
3
- "version": "32.0.0",
3
+ "version": "32.0.1",
4
4
  "targetSize": {
5
5
  "standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
6
6
  "min": 24,
@@ -41,3 +41,10 @@ export declare const EMAIL_COLORS: Readonly<Record<EmailColorToken, EmailHex>>;
41
41
  * that honour it — never as the only palette, since most clients do not.
42
42
  */
43
43
  export declare const EMAIL_COLORS_DARK: Readonly<Record<EmailColorToken, EmailHex>>;
44
+ /**
45
+ * The GoDX preset's email palette (v32.0.1, gh#1228): the same roles as {@link EMAIL_COLORS}, with
46
+ * primary / brand / focus taken from `src/themes/godx-tokens.css` — what the GoDX web preset paints.
47
+ */
48
+ export declare const EMAIL_COLORS_GODX: Readonly<Record<EmailColorToken, EmailHex>>;
49
+ /** The GoDX preset's dark email palette. */
50
+ export declare const EMAIL_COLORS_GODX_DARK: Readonly<Record<EmailColorToken, EmailHex>>;
@@ -1,4 +1,9 @@
1
- import { EMAIL_COLOR_SOURCE, EMAIL_COLOR_SOURCE_DARK } from "./tokens.generated.js";
1
+ import {
2
+ EMAIL_COLOR_SOURCE,
3
+ EMAIL_COLOR_SOURCE_DARK,
4
+ EMAIL_COLOR_SOURCE_GODX,
5
+ EMAIL_COLOR_SOURCE_GODX_DARK
6
+ } from "./tokens.generated.js";
2
7
  const TRIPLET = /^\s*(-?\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s*$/;
3
8
  const channel = (n) => Math.round(Math.min(255, Math.max(0, n * 255))).toString(16).padStart(2, "0");
4
9
  function hslToHex(triplet) {
@@ -30,8 +35,16 @@ const EMAIL_COLORS = resolve(
30
35
  const EMAIL_COLORS_DARK = resolve(
31
36
  EMAIL_COLOR_SOURCE_DARK
32
37
  );
38
+ const EMAIL_COLORS_GODX = resolve(
39
+ EMAIL_COLOR_SOURCE_GODX
40
+ );
41
+ const EMAIL_COLORS_GODX_DARK = resolve(
42
+ EMAIL_COLOR_SOURCE_GODX_DARK
43
+ );
33
44
  export {
34
45
  EMAIL_COLORS,
35
46
  EMAIL_COLORS_DARK,
47
+ EMAIL_COLORS_GODX,
48
+ EMAIL_COLORS_GODX_DARK,
36
49
  hslToHex
37
50
  };
@@ -5,12 +5,12 @@
5
5
  * data export of literal `#rrggbb` / `px` values plus the canonical brand-mark markup. ## The
6
6
  * no-drift guarantee Nothing here is hand-typed.
7
7
  */
8
- export { hslToHex, EMAIL_COLORS, EMAIL_COLORS_DARK, type EmailColorToken, type EmailHex, } from "./color.js";
8
+ export { hslToHex, EMAIL_COLORS, EMAIL_COLORS_DARK, EMAIL_COLORS_GODX, EMAIL_COLORS_GODX_DARK, type EmailColorToken, type EmailHex, } from "./color.js";
9
9
  export { EMAIL_SHELL, EMAIL_TYPOGRAPHY, EMAIL_CTA, EMAIL_FOOTER, EMAIL_FOCUS, EMAIL_MOBILE, type EmailTokenName, type EmailShellTokens, type EmailTypographyTokens, type EmailCtaTokens, type EmailFooterTokens, type EmailFocusTokens, type EmailMobileTokens, } from "./geometry.js";
10
10
  export { EMAIL_BRAND_MARK, EMAIL_BRAND_MARK_VIEWBOX, EMAIL_BRAND_MARK_CAPSULE, EMAIL_BRAND_MARK_GLYPH, emailBrandMarkSvg, emailBrandMarkDataUri, emailBrandMarkTableHtml, roundedRectPath, type EmailBrandMark, type EmailBrandMarkOptions, type EmailBrandMarkRect, } from "./brand-mark.js";
11
11
  export { emailInlineStyle, type EmailStyleDeclarations } from "./inline-style.js";
12
12
  export { EMAIL_URGENCY, EMAIL_URGENCY_DARK, type EmailUrgencyTokens } from "./urgency.js";
13
- export { EMAIL_COLOR_SOURCE, EMAIL_COLOR_SOURCE_DARK, EMAIL_GEOMETRY_SOURCE, type EmailColorSource, } from "./tokens.generated.js";
13
+ export { EMAIL_COLOR_SOURCE, EMAIL_COLOR_SOURCE_DARK, EMAIL_COLOR_SOURCE_GODX, EMAIL_COLOR_SOURCE_GODX_DARK, EMAIL_GEOMETRY_SOURCE, type EmailColorSource, } from "./tokens.generated.js";
14
14
  import { EMAIL_COLORS, EMAIL_COLORS_DARK } from "./color.js";
15
15
  import { EMAIL_SHELL, EMAIL_TYPOGRAPHY, EMAIL_CTA, EMAIL_FOOTER, EMAIL_FOCUS, EMAIL_MOBILE } from "./geometry.js";
16
16
  import { EMAIL_BRAND_MARK } from "./brand-mark.js";
@@ -36,4 +36,12 @@ export declare const EMAIL_TOKENS: EmailTokens;
36
36
  * cannot import ES modules (Blade, Twig, Liquid, Handlebars on another runtime). Write it to a
37
37
  * file in the build step and read it from the template layer.
38
38
  */
39
+ /**
40
+ * The GoDX preset for email (v32.0.1, gh#1228): the email counterpart of `godxPreset` +
41
+ * `themes/godx.css`. Same geometry; colours from {@link EMAIL_COLORS_GODX}. The brand mark's label
42
+ * has no default since v32 — pass {@link EMAIL_BRAND_LABEL_GODX} as `label` for the GoDX mark.
43
+ */
44
+ export declare const EMAIL_TOKENS_GODX: EmailTokens;
45
+ /** The GoDX mark's accessible name: `emailBrandMarkSvg({ label: EMAIL_BRAND_LABEL_GODX, color: EMAIL_COLORS_GODX.brand })`. */
46
+ export declare const EMAIL_BRAND_LABEL_GODX = "GoDX";
39
47
  export declare const EMAIL_TOKENS_JSON: string;
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  hslToHex,
3
3
  EMAIL_COLORS,
4
- EMAIL_COLORS_DARK
4
+ EMAIL_COLORS_DARK,
5
+ EMAIL_COLORS_GODX,
6
+ EMAIL_COLORS_GODX_DARK
5
7
  } from "./color.js";
6
8
  import {
7
9
  EMAIL_SHELL,
@@ -26,9 +28,16 @@ import { EMAIL_URGENCY, EMAIL_URGENCY_DARK } from "./urgency.js";
26
28
  import {
27
29
  EMAIL_COLOR_SOURCE,
28
30
  EMAIL_COLOR_SOURCE_DARK,
31
+ EMAIL_COLOR_SOURCE_GODX,
32
+ EMAIL_COLOR_SOURCE_GODX_DARK,
29
33
  EMAIL_GEOMETRY_SOURCE
30
34
  } from "./tokens.generated.js";
31
- import { EMAIL_COLORS as EMAIL_COLORS2, EMAIL_COLORS_DARK as EMAIL_COLORS_DARK2 } from "./color.js";
35
+ import {
36
+ EMAIL_COLORS as EMAIL_COLORS2,
37
+ EMAIL_COLORS_DARK as EMAIL_COLORS_DARK2,
38
+ EMAIL_COLORS_GODX as EMAIL_COLORS_GODX2,
39
+ EMAIL_COLORS_GODX_DARK as EMAIL_COLORS_GODX_DARK2
40
+ } from "./color.js";
32
41
  import {
33
42
  EMAIL_SHELL as EMAIL_SHELL2,
34
43
  EMAIL_TYPOGRAPHY as EMAIL_TYPOGRAPHY2,
@@ -52,16 +61,27 @@ const EMAIL_TOKENS = Object.freeze({
52
61
  mobile: EMAIL_MOBILE2,
53
62
  brandMark: EMAIL_BRAND_MARK2
54
63
  });
64
+ const EMAIL_TOKENS_GODX = Object.freeze({
65
+ ...EMAIL_TOKENS,
66
+ colors: EMAIL_COLORS_GODX2,
67
+ colorsDark: EMAIL_COLORS_GODX_DARK2
68
+ });
69
+ const EMAIL_BRAND_LABEL_GODX = "GoDX";
55
70
  const EMAIL_TOKENS_JSON = JSON.stringify(EMAIL_TOKENS, null, 2);
56
71
  export {
72
+ EMAIL_BRAND_LABEL_GODX,
57
73
  EMAIL_BRAND_MARK,
58
74
  EMAIL_BRAND_MARK_CAPSULE,
59
75
  EMAIL_BRAND_MARK_GLYPH,
60
76
  EMAIL_BRAND_MARK_VIEWBOX,
61
77
  EMAIL_COLORS,
62
78
  EMAIL_COLORS_DARK,
79
+ EMAIL_COLORS_GODX,
80
+ EMAIL_COLORS_GODX_DARK,
63
81
  EMAIL_COLOR_SOURCE,
64
82
  EMAIL_COLOR_SOURCE_DARK,
83
+ EMAIL_COLOR_SOURCE_GODX,
84
+ EMAIL_COLOR_SOURCE_GODX_DARK,
65
85
  EMAIL_CTA,
66
86
  EMAIL_FOCUS,
67
87
  EMAIL_FOOTER,
@@ -69,6 +89,7 @@ export {
69
89
  EMAIL_MOBILE,
70
90
  EMAIL_SHELL,
71
91
  EMAIL_TOKENS,
92
+ EMAIL_TOKENS_GODX,
72
93
  EMAIL_TOKENS_JSON,
73
94
  EMAIL_TYPOGRAPHY,
74
95
  EMAIL_URGENCY,
@@ -123,6 +123,124 @@ export declare const EMAIL_COLOR_SOURCE_DARK: {
123
123
  readonly hsl: "48 9% 9%";
124
124
  };
125
125
  };
126
+ /** The GoDX preset's palette for email: foundation :root with src/themes/godx-tokens.css laid over it. */
127
+ export declare const EMAIL_COLOR_SOURCE_GODX: {
128
+ readonly background: {
129
+ readonly cssVar: "--background";
130
+ readonly hsl: "60 33% 99%";
131
+ };
132
+ readonly foreground: {
133
+ readonly cssVar: "--foreground";
134
+ readonly hsl: "48 8% 13%";
135
+ };
136
+ readonly surface: {
137
+ readonly cssVar: "--card";
138
+ readonly hsl: "60 33% 99%";
139
+ };
140
+ readonly surfaceForeground: {
141
+ readonly cssVar: "--card-foreground";
142
+ readonly hsl: "48 8% 13%";
143
+ };
144
+ readonly muted: {
145
+ readonly cssVar: "--muted";
146
+ readonly hsl: "45 15% 95%";
147
+ };
148
+ readonly mutedForeground: {
149
+ readonly cssVar: "--muted-foreground";
150
+ readonly hsl: "44 5% 39%";
151
+ };
152
+ readonly border: {
153
+ readonly cssVar: "--border";
154
+ readonly hsl: "30 7% 93%";
155
+ };
156
+ readonly primary: {
157
+ readonly cssVar: "--primary";
158
+ readonly hsl: "268.7 100% 50%";
159
+ };
160
+ readonly primaryForeground: {
161
+ readonly cssVar: "--primary-foreground";
162
+ readonly hsl: "60 33% 99%";
163
+ };
164
+ readonly focus: {
165
+ readonly cssVar: "--primary";
166
+ readonly hsl: "268.7 100% 50%";
167
+ };
168
+ readonly brand: {
169
+ readonly cssVar: "--brand";
170
+ readonly hsl: "268.7 100% 50%";
171
+ };
172
+ readonly brandForeground: {
173
+ readonly cssVar: "--brand-foreground";
174
+ readonly hsl: "60 33% 99%";
175
+ };
176
+ readonly urgency: {
177
+ readonly cssVar: "--attention";
178
+ readonly hsl: "25 99% 46%";
179
+ };
180
+ readonly urgencyForeground: {
181
+ readonly cssVar: "--attention-foreground";
182
+ readonly hsl: "48 8% 13%";
183
+ };
184
+ };
185
+ /** The GoDX preset's dark palette for email. */
186
+ export declare const EMAIL_COLOR_SOURCE_GODX_DARK: {
187
+ readonly background: {
188
+ readonly cssVar: "--background";
189
+ readonly hsl: "48 9% 9%";
190
+ };
191
+ readonly foreground: {
192
+ readonly cssVar: "--foreground";
193
+ readonly hsl: "60 20% 96%";
194
+ };
195
+ readonly surface: {
196
+ readonly cssVar: "--card";
197
+ readonly hsl: "48 8% 12%";
198
+ };
199
+ readonly surfaceForeground: {
200
+ readonly cssVar: "--card-foreground";
201
+ readonly hsl: "60 20% 96%";
202
+ };
203
+ readonly muted: {
204
+ readonly cssVar: "--muted";
205
+ readonly hsl: "45 6% 18%";
206
+ };
207
+ readonly mutedForeground: {
208
+ readonly cssVar: "--muted-foreground";
209
+ readonly hsl: "44 6% 64%";
210
+ };
211
+ readonly border: {
212
+ readonly cssVar: "--border";
213
+ readonly hsl: "45 6% 19%";
214
+ };
215
+ readonly primary: {
216
+ readonly cssVar: "--primary";
217
+ readonly hsl: "268.7 100% 86.9%";
218
+ };
219
+ readonly primaryForeground: {
220
+ readonly cssVar: "--primary-foreground";
221
+ readonly hsl: "48 9% 9%";
222
+ };
223
+ readonly focus: {
224
+ readonly cssVar: "--primary";
225
+ readonly hsl: "268.7 100% 86.9%";
226
+ };
227
+ readonly brand: {
228
+ readonly cssVar: "--brand";
229
+ readonly hsl: "268.7 100% 86.9%";
230
+ };
231
+ readonly brandForeground: {
232
+ readonly cssVar: "--brand-foreground";
233
+ readonly hsl: "48 9% 9%";
234
+ };
235
+ readonly urgency: {
236
+ readonly cssVar: "--attention";
237
+ readonly hsl: "25 95% 56%";
238
+ };
239
+ readonly urgencyForeground: {
240
+ readonly cssVar: "--attention-foreground";
241
+ readonly hsl: "48 9% 9%";
242
+ };
243
+ };
126
244
  /** Raw `--email-*` declarations from the component token tier, verbatim. */
127
245
  export declare const EMAIL_GEOMETRY_SOURCE: {
128
246
  readonly "--email-shell-width": "480px";
@@ -114,6 +114,122 @@ const EMAIL_COLOR_SOURCE_DARK = {
114
114
  "hsl": "48 9% 9%"
115
115
  }
116
116
  };
117
+ const EMAIL_COLOR_SOURCE_GODX = {
118
+ "background": {
119
+ "cssVar": "--background",
120
+ "hsl": "60 33% 99%"
121
+ },
122
+ "foreground": {
123
+ "cssVar": "--foreground",
124
+ "hsl": "48 8% 13%"
125
+ },
126
+ "surface": {
127
+ "cssVar": "--card",
128
+ "hsl": "60 33% 99%"
129
+ },
130
+ "surfaceForeground": {
131
+ "cssVar": "--card-foreground",
132
+ "hsl": "48 8% 13%"
133
+ },
134
+ "muted": {
135
+ "cssVar": "--muted",
136
+ "hsl": "45 15% 95%"
137
+ },
138
+ "mutedForeground": {
139
+ "cssVar": "--muted-foreground",
140
+ "hsl": "44 5% 39%"
141
+ },
142
+ "border": {
143
+ "cssVar": "--border",
144
+ "hsl": "30 7% 93%"
145
+ },
146
+ "primary": {
147
+ "cssVar": "--primary",
148
+ "hsl": "268.7 100% 50%"
149
+ },
150
+ "primaryForeground": {
151
+ "cssVar": "--primary-foreground",
152
+ "hsl": "60 33% 99%"
153
+ },
154
+ "focus": {
155
+ "cssVar": "--primary",
156
+ "hsl": "268.7 100% 50%"
157
+ },
158
+ "brand": {
159
+ "cssVar": "--brand",
160
+ "hsl": "268.7 100% 50%"
161
+ },
162
+ "brandForeground": {
163
+ "cssVar": "--brand-foreground",
164
+ "hsl": "60 33% 99%"
165
+ },
166
+ "urgency": {
167
+ "cssVar": "--attention",
168
+ "hsl": "25 99% 46%"
169
+ },
170
+ "urgencyForeground": {
171
+ "cssVar": "--attention-foreground",
172
+ "hsl": "48 8% 13%"
173
+ }
174
+ };
175
+ const EMAIL_COLOR_SOURCE_GODX_DARK = {
176
+ "background": {
177
+ "cssVar": "--background",
178
+ "hsl": "48 9% 9%"
179
+ },
180
+ "foreground": {
181
+ "cssVar": "--foreground",
182
+ "hsl": "60 20% 96%"
183
+ },
184
+ "surface": {
185
+ "cssVar": "--card",
186
+ "hsl": "48 8% 12%"
187
+ },
188
+ "surfaceForeground": {
189
+ "cssVar": "--card-foreground",
190
+ "hsl": "60 20% 96%"
191
+ },
192
+ "muted": {
193
+ "cssVar": "--muted",
194
+ "hsl": "45 6% 18%"
195
+ },
196
+ "mutedForeground": {
197
+ "cssVar": "--muted-foreground",
198
+ "hsl": "44 6% 64%"
199
+ },
200
+ "border": {
201
+ "cssVar": "--border",
202
+ "hsl": "45 6% 19%"
203
+ },
204
+ "primary": {
205
+ "cssVar": "--primary",
206
+ "hsl": "268.7 100% 86.9%"
207
+ },
208
+ "primaryForeground": {
209
+ "cssVar": "--primary-foreground",
210
+ "hsl": "48 9% 9%"
211
+ },
212
+ "focus": {
213
+ "cssVar": "--primary",
214
+ "hsl": "268.7 100% 86.9%"
215
+ },
216
+ "brand": {
217
+ "cssVar": "--brand",
218
+ "hsl": "268.7 100% 86.9%"
219
+ },
220
+ "brandForeground": {
221
+ "cssVar": "--brand-foreground",
222
+ "hsl": "48 9% 9%"
223
+ },
224
+ "urgency": {
225
+ "cssVar": "--attention",
226
+ "hsl": "25 95% 56%"
227
+ },
228
+ "urgencyForeground": {
229
+ "cssVar": "--attention-foreground",
230
+ "hsl": "48 9% 9%"
231
+ }
232
+ };
117
233
  const EMAIL_GEOMETRY_SOURCE = {
118
234
  "--email-shell-width": "480px",
119
235
  "--email-shell-padding": "32px",
@@ -164,6 +280,8 @@ const EMAIL_MARK_SOURCE = {
164
280
  export {
165
281
  EMAIL_COLOR_SOURCE,
166
282
  EMAIL_COLOR_SOURCE_DARK,
283
+ EMAIL_COLOR_SOURCE_GODX,
284
+ EMAIL_COLOR_SOURCE_GODX_DARK,
167
285
  EMAIL_GEOMETRY_SOURCE,
168
286
  EMAIL_MARK_SOURCE
169
287
  };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "32.0.0",
2
+ "version": "32.0.1",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -0,0 +1,41 @@
1
+
2
+ :root {
3
+
4
+ --primary: 268.7 100% 50%;
5
+ --primary-foreground: 60 33% 99%;
6
+
7
+ --brand: 268.7 100% 50%;
8
+ --brand-foreground: 60 33% 99%;
9
+ }
10
+
11
+ .dark,
12
+ :root[data-theme="dark"] {
13
+
14
+ --primary: 268.7 100% 86.9%;
15
+ --primary-foreground: 48 9% 9%;
16
+ --brand: 268.7 100% 86.9%;
17
+ --brand-foreground: 48 9% 9%;
18
+ }
19
+
20
+ @supports not (color: hsl(from red h s l)) {
21
+ :root {
22
+ --primary-hover: 268.7 100% 41.6%;
23
+ --primary-active: 268.7 100% 34.5%;
24
+ --primary-border: 268.7 68% 66%;
25
+ --control-outline: 268.7 100% 44.7%;
26
+ --text-link: 268.7 100% 41.6%;
27
+ --text-brand: 268.7 100% 41.6%;
28
+ --text-primary: 268.7 100% 34.5%;
29
+ }
30
+
31
+ .dark,
32
+ :root[data-theme="dark"] {
33
+ --primary-hover: 268.7 100% 92.7%;
34
+ --primary-active: 268.7 100% 81.1%;
35
+ --primary-border: 268.7 46.7% 23.5%;
36
+ --control-outline: 268.7 99% 61.8%;
37
+ --text-link: 268.7 100% 86.9%;
38
+ --text-brand: 268.7 100% 86.9%;
39
+ --text-primary: 268.7 100% 92.7%;
40
+ }
41
+ }
@@ -1,43 +1,3 @@
1
1
 
2
2
  @import "../styles/fonts.css";
3
-
4
- :root {
5
-
6
- --primary: 268.7 100% 50%;
7
- --primary-foreground: 60 33% 99%;
8
-
9
- --brand: 268.7 100% 50%;
10
- --brand-foreground: 60 33% 99%;
11
- }
12
-
13
- .dark,
14
- :root[data-theme="dark"] {
15
-
16
- --primary: 268.7 100% 86.9%;
17
- --primary-foreground: 48 9% 9%;
18
- --brand: 268.7 100% 86.9%;
19
- --brand-foreground: 48 9% 9%;
20
- }
21
-
22
- @supports not (color: hsl(from red h s l)) {
23
- :root {
24
- --primary-hover: 268.7 100% 41.6%;
25
- --primary-active: 268.7 100% 34.5%;
26
- --primary-border: 268.7 68% 66%;
27
- --control-outline: 268.7 100% 44.7%;
28
- --text-link: 268.7 100% 41.6%;
29
- --text-brand: 268.7 100% 41.6%;
30
- --text-primary: 268.7 100% 34.5%;
31
- }
32
-
33
- .dark,
34
- :root[data-theme="dark"] {
35
- --primary-hover: 268.7 100% 92.7%;
36
- --primary-active: 268.7 100% 81.1%;
37
- --primary-border: 268.7 46.7% 23.5%;
38
- --control-outline: 268.7 99% 61.8%;
39
- --text-link: 268.7 100% 86.9%;
40
- --text-brand: 268.7 100% 86.9%;
41
- --text-primary: 268.7 100% 92.7%;
42
- }
43
- }
3
+ @import "./godx-tokens.css";
@@ -8,6 +8,9 @@ import type { AppPreset } from "../app/preset.js";
8
8
  * import { godxPreset } from "@godxjp/ui/themes/godx";
9
9
  * <AppProvider preset={godxPreset}>…</AppProvider>
10
10
  *
11
+ * A shadow root that embeds `@godxjp/ui/styles/core` adds `@godxjp/ui/themes/godx-tokens.css` (the
12
+ * same colours without the fonts) instead.
13
+ *
11
14
  * Core never imports this module, which is what keeps the GoDX artwork out of a neutral bundle.
12
15
  */
13
16
  export declare const godxPreset: AppPreset;
@@ -28,6 +28,11 @@ Off-cycle approved: owner, 2026-10-09 — the single v32 batch decided on godx-j
28
28
  renders none.
29
29
  - The email brand mark has no default label.
30
30
  - The GoDX look ships as `godxPreset` (`@godxjp/ui/themes/godx`) plus `@godxjp/ui/themes/godx.css`.
31
+ - Since 32.0.1, `@godxjp/ui/themes/godx-tokens.css` holds the GoDX colours without the fonts, for a
32
+ shadow root that embeds `@godxjp/ui/styles/core` (`@font-face` only works in the document). Add it
33
+ after `styles/core` there; `godx.css` imports it, so a page needs only `godx.css`.
34
+ - Emails: since 32.0.1, `EMAIL_TOKENS_GODX` (with `EMAIL_COLORS_GODX` / `EMAIL_COLORS_GODX_DARK`)
35
+ and `EMAIL_BRAND_LABEL_GODX` from `@godxjp/ui/email` keep the GoDX violet and the "GoDX" label.
31
36
 
32
37
  ### Locale defaults and open localization (#1219)
33
38
 
@@ -82,9 +87,11 @@ deprecated re-exports and will be removed in a later major.
82
87
 
83
88
  ## How to upgrade
84
89
 
85
- 1. Upgrade all six packages to 32.0.0 together (`@godxjp/chat` only if you use the chat components).
90
+ 1. Upgrade all six packages to the latest 32.0.x together (`@godxjp/chat` only if you use the chat components).
86
91
  2. Run `npx godxjp-ui codemod v32 <src> --dry-run`, review, then run it without `--dry-run`. Use
87
92
  `--godx` for GoDX products.
93
+ The 32.0.0 codemod imported the fonts twice under `--godx` (`fonts.css` and `godx.css`, which
94
+ already imports them). Re-running the 32.0.1 codemod removes the extra `fonts.css` import.
88
95
  3. Finish every `note` the codemod printed (a component move that changes props, an `AppProvider`
89
96
  that relied on the old `vi` default).
90
97
  4. Install the font packages if you keep the Japanese fonts.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "32.0.0",
4
- "godxUiMcp": "32.0.0",
3
+ "version": "32.0.1",
4
+ "godxUiMcp": "32.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -70,6 +70,7 @@
70
70
  "import": "./dist/themes/godx.js"
71
71
  },
72
72
  "./themes/godx.css": "./dist/themes/godx.css",
73
+ "./themes/godx-tokens.css": "./dist/themes/godx-tokens.css",
73
74
  "./lab": {
74
75
  "types": "./dist/lab/index.d.ts",
75
76
  "import": "./dist/lab/index.js"
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by scripts/gen-email-tokens.mjs — do not edit.
2
- // Source: src/tokens/foundation.css + src/themes/godx.css (the LIGHT scheme of each).
2
+ // Source: src/tokens/foundation.css + src/themes/godx-tokens.css (the LIGHT scheme of each).
3
3
  // Run `node scripts/gen-email-tokens.mjs` (guard: `node scripts/gen-email-tokens.mjs --check`).
4
4
 
5
5
  /**
@@ -35,6 +35,6 @@ export const SHIPPED_BRAND_ACCENTS = [
35
35
  "g": 0,
36
36
  "b": 255
37
37
  },
38
- "source": "src/themes/godx.css"
38
+ "source": "src/themes/godx-tokens.css"
39
39
  }
40
40
  ];
@@ -300,26 +300,46 @@ const STYLE_IMPORT_CSS = /^([ \t]*)@import\s+(["'])@godxjp\/ui\/styles\2\s*;[ \t
300
300
  const STYLE_IMPORT_JS = /^([ \t]*)import\s+(["'])@godxjp\/ui\/styles\2\s*;?[ \t]*$/m;
301
301
  const FONTS = "@godxjp/ui/styles/fonts.css";
302
302
  const GODX_CSS = "@godxjp/ui/themes/godx.css";
303
+ const GODX_TOKENS_CSS = "@godxjp/ui/themes/godx-tokens.css";
304
+ const CORE_IMPORT_CSS = /^([ \t]*)@import\s+(["'])@godxjp\/ui\/styles\/core\2\s*;[ \t]*$/m;
305
+ const CORE_IMPORT_JS = /^([ \t]*)import\s+(["'])@godxjp\/ui\/styles\/core\2\s*;?[ \t]*$/m;
303
306
 
304
307
  export function transformSource(file, source, { godx = false } = {}) {
305
308
  let out = source;
306
309
  const notes = [];
307
310
  const isCss = file.endsWith(".css");
308
311
  const styleImport = isCss ? STYLE_IMPORT_CSS : STYLE_IMPORT_JS;
312
+ const coreImport = isCss ? CORE_IMPORT_CSS : CORE_IMPORT_JS;
313
+ const written = (indent, q, spec) =>
314
+ isCss ? `${indent}@import ${q}${spec}${q};` : `${indent}import ${q}${spec}${q};`;
309
315
  const m = out.match(styleImport);
310
316
  if (m) {
311
317
  const [line, indent, q] = m;
312
318
  const add = [];
313
- if (!out.includes(FONTS) && !out.includes("@godxjp/ui/styles/fonts")) add.push(FONTS);
314
- if (godx && !out.includes(GODX_CSS)) add.push(GODX_CSS);
315
- if (add.length) {
316
- const extra = add
317
- .map((spec) =>
318
- isCss ? `${indent}@import ${q}${spec}${q};` : `${indent}import ${q}${spec}${q};`,
319
- )
320
- .join("\n");
321
- out = out.replace(line, `${line}\n${extra}`);
319
+ // gh#1228: godx.css already imports the fonts. Under --godx add only the preset sheet; adding
320
+ // fonts.css too shipped every @font-face twice (735 → 1470 rules, 178 → 489 kB gzip measured).
321
+ if (godx) {
322
+ if (!out.includes(GODX_CSS)) add.push(GODX_CSS);
323
+ } else if (!out.includes(FONTS) && !out.includes("@godxjp/ui/styles/fonts")) {
324
+ add.push(FONTS);
322
325
  }
326
+ if (add.length)
327
+ out = out.replace(line, `${line}\n${add.map((spec) => written(indent, q, spec)).join("\n")}`);
328
+ }
329
+ // styles/core (a shadow root or an app with its own fonts): the colour tokens, never the fonts.
330
+ const c = out.match(coreImport);
331
+ if (c && godx && !out.includes(GODX_TOKENS_CSS) && !out.includes(GODX_CSS)) {
332
+ const [line, indent, q] = c;
333
+ out = out.replace(line, `${line}\n${written(indent, q, GODX_TOKENS_CSS)}`);
334
+ }
335
+ // A file the 32.0.0 codemod already touched carries BOTH godx.css and fonts.css: drop the second.
336
+ if (out.includes(GODX_CSS)) {
337
+ out = out.replace(
338
+ isCss
339
+ ? /^[ \t]*@import\s+["']@godxjp\/ui\/styles\/fonts(?:\.css)?["']\s*;[ \t]*\n/m
340
+ : /^[ \t]*import\s+["']@godxjp\/ui\/styles\/fonts(?:\.css)?["']\s*;?[ \t]*\n/m,
341
+ "",
342
+ );
323
343
  }
324
344
  if (!isCss && /<AppProvider\b/.test(out)) {
325
345
  const tags = out.match(/<AppProvider\b[^>]*>/g) ?? [];