@godxjp/ui 13.16.0 → 13.16.2

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.
@@ -20,7 +20,7 @@ function AppShell({
20
20
  ] });
21
21
  return /* @__PURE__ */ jsxs("div", { className: "app-root", "data-collapsed": sidebarCollapsed ? "true" : void 0, children: [
22
22
  /* @__PURE__ */ jsx("aside", { className: "app-sidebar", "aria-label": t("layout.appShell.sidebarLabel"), children: sidebar }),
23
- /* @__PURE__ */ jsx("header", { className: "app-topbar", "aria-label": t("layout.appShell.headerLabel"), children: resolvedTopbar }),
23
+ /* @__PURE__ */ jsx("header", { className: "app-topbar ui-scale-fixed", "aria-label": t("layout.appShell.headerLabel"), children: resolvedTopbar }),
24
24
  /* @__PURE__ */ jsxs("main", { className: "app-main", "aria-label": t("layout.appShell.mainLabel"), children: [
25
25
  breadcrumb !== void 0 && /* @__PURE__ */ jsx("div", { className: "app-breadcrumb", children: breadcrumb }),
26
26
  children
@@ -35,6 +35,9 @@
35
35
 
36
36
  .app-topbar {
37
37
  grid-area: topbar;
38
+ /* Persistent navigation chrome stays a FIXED size regardless of density — the
39
+ * AppShell adds `.ui-scale-fixed` to this <header> (resets the whole size-token
40
+ * set to baseline; --scaling:1 alone is not enough — see foundation.css). */
38
41
  display: flex;
39
42
  min-width: 0;
40
43
  align-items: center;
@@ -93,11 +93,17 @@
93
93
  0 20px 25px -5px rgb(var(--shadow-color) / 0.1), 0 8px 10px -6px rgb(var(--shadow-color) / 0.1);
94
94
  --shadow-2xl: 0 25px 50px -12px rgb(var(--shadow-color) / 0.25);
95
95
 
96
- /* Typography scaleM PLUS 2 (JIS L1+L2 kanji, Vietnamese subset), one notch
97
- * larger than the JP-dense base for comfortable reading (body 14px). */
96
+ /* Sans stackscript-aware per the international convention for mixed
97
+ * Latin/CJK UI: native Latin system fonts FIRST (clean, familiar English &
98
+ * Vietnamese on every OS), then the bundled "M PLUS 2" + Hiragino / Noto Sans JP
99
+ * as the CJK fallback. Browsers resolve fonts per-glyph, so Latin renders in the
100
+ * system sans while 日本語 falls through to M PLUS 2 (still shipped, so JP is
101
+ * consistent across machines). Listing M PLUS 2 first — its Latin glyphs are
102
+ * tuned to harmonise with kana, not for standalone English — made English read
103
+ * oddly; Latin-first fixes that without losing the bundled JP face. */
98
104
  --font-family-sans:
99
- "M PLUS 2", "Be Vietnam Pro", "Hiragino Sans", "Noto Sans JP", -apple-system,
100
- BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
105
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
106
+ system-ui, "M PLUS 2", "Hiragino Sans", "Noto Sans JP", "Be Vietnam Pro", sans-serif;
101
107
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
102
108
  /* ── Type scale — GOLDEN-RATIO modular scale (Ant/Tailwind model). ONE base + ONE ratio; every
103
109
  * step is base × ratioⁿ, so the whole scale stays in golden proportion. `--font-size-ratio` is
@@ -174,6 +180,62 @@
174
180
  --phi-p2: calc(var(--phi-p1) * var(--ratio-phi));
175
181
  }
176
182
 
183
+ /* SCALE-FIXED — pin a subtree to the baseline size (--scaling 1) so persistent
184
+ * chrome (the AppShell topbar, the global search palette, …) does NOT resize with
185
+ * the density axis. Setting only --scaling:1 is insufficient: the size tokens were
186
+ * already substituted at :root and inherit baked, so each --scaling-derived token
187
+ * (and every semantic token that aliases the spacing grid) is RE-DECLARED here to
188
+ * re-resolve at baseline. Apply via `className="… ui-scale-fixed"`. Must list every
189
+ * scaled token — the scale-fixed coverage test guards against drift. */
190
+ .ui-scale-fixed {
191
+ --scaling: 1;
192
+ --space-1: 0.25rem;
193
+ --space-2: 0.5rem;
194
+ --space-3: 0.75rem;
195
+ --space-4: 1rem;
196
+ --space-5: 1.25rem;
197
+ --space-6: 1.5rem;
198
+ --space-8: 2rem;
199
+ --space-10: 2.5rem;
200
+ --space-12: 3rem;
201
+ --radius: 0.375rem;
202
+ --control-height: var(--control-height-default);
203
+ /* baseline tier values (2rem ∓ step) as literals — keeps the control-sizing
204
+ * guard happy and avoids re-deriving from the (baked) active --control-height. */
205
+ --control-height-sm: 1.75rem;
206
+ --control-height-lg: 2.25rem;
207
+ --control-height-xs: 1.5rem;
208
+ --control-icon-size: 1rem;
209
+ --control-icon-size-sm: 0.875rem;
210
+ --control-padding-x: var(--space-3);
211
+ --control-gap: var(--space-2);
212
+ --control-gap-sm: var(--space-1);
213
+ --checkbox-size: 1rem;
214
+ --switch-width: 2.25rem;
215
+ --switch-height: 1.25rem;
216
+ --switch-thumb-size: 1rem;
217
+ --switch-thumb-translate: 1rem;
218
+ --table-row-height: var(--table-row-height-default);
219
+ --table-cell-padding-y: var(--space-2);
220
+ --phi-unit: var(--space-4);
221
+ --space-page-x: var(--space-6);
222
+ --space-page-y: var(--space-6);
223
+ --space-section: var(--space-4);
224
+ --space-stack-xs: var(--space-1);
225
+ --space-stack-sm: var(--space-2);
226
+ --space-stack-md: var(--space-4);
227
+ --space-stack-lg: var(--space-6);
228
+ --space-stack-xl: var(--space-10);
229
+ --space-inline-xs: var(--space-1);
230
+ --space-inline-sm: var(--space-2);
231
+ --space-inline-md: var(--space-3);
232
+ --space-inline-lg: var(--space-4);
233
+ --space-chrome-x: var(--space-6);
234
+ --space-chrome-y: var(--space-4);
235
+ --space-chrome-gap: var(--space-2);
236
+ --field-label-gap: var(--space-2);
237
+ }
238
+
177
239
  .dark,
178
240
  :root[data-theme="dark"] {
179
241
  /* Warm-tinted dark spine — keeps the hue-60 character at low lightness.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "13.16.0",
3
+ "version": "13.16.2",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@10.29.1",
6
6
  "sideEffects": false,