jig-ui 0.4.0 → 0.5.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.
@@ -28,9 +28,27 @@
28
28
  --text-body: 16px; --leading-body: 1.5; /* UI text: labels, controls */
29
29
  --text-prose: 18px; --leading-prose: 1.6; /* LONG-FORM text. Never below 18. */
30
30
  --text-lead: 20px; --leading-lead: 1.5;
31
+
32
+ /* H1 and H2 are FLUID: they interpolate with viewport width instead of
33
+ switching at a breakpoint, which is why this system defines no breakpoint
34
+ token. Each clamp is the line through (360px viewport, min) and (1024px,
35
+ max); outside that range it saturates at the bounds.
36
+
37
+ The `rem` term is not decoration. `clamp(32px, 8vw, 48px)` would ignore a
38
+ reader who has set a larger default font size — page zoom scales `vw`, a
39
+ font-size preference does not — which fails WCAG 1.4.4. Keeping every term
40
+ in `rem` plus `vw` means the whole curve moves with the user's setting.
41
+
42
+ Only headings. Body and prose stay fixed: readability is absolute, set by
43
+ the eye and viewing distance, while heading size is relative — it exists to
44
+ contrast with body, and that contrast can compress on a narrow screen. A
45
+ fluid `--text-prose` would also breach the 18px floor (B-75, T20).
46
+
47
+ The minimums land on rungs the ladder already has rather than on new
48
+ values. Line heights are unitless, so they follow the size for free. */
31
49
  --text-h3: 24px; --leading-h3: 1.333;
32
- --text-h2: 32px; --leading-h2: 1.25;
33
- --text-h1: 48px; --leading-h1: 1.1;
50
+ --text-h2: clamp(1.5rem, 1.229rem + 1.205vw, 2rem); --leading-h2: 1.25; /* 24 → 32 */
51
+ --text-h1: clamp(2rem, 1.458rem + 2.41vw, 3rem); --leading-h1: 1.1; /* 32 → 48 */
34
52
 
35
53
  /* Two weights only. More adds noise and is hard to apply consistently. */
36
54
  --font-weight-regular: 400;
@@ -66,8 +84,32 @@
66
84
  --duration-fast: 150ms; --duration-base: 250ms; --duration-slow: 300ms;
67
85
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
68
86
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
87
+
88
+ /* Ambient motion (P-13). Decorative looping movement, editorial only —
89
+ `product` and `operator` define none of these, deliberately.
90
+
91
+ THE THREE VALUES ARE NOT A LADDER, THEY ARE A CHORD. Ambient motion is
92
+ layered: several small movements running at once. If their periods share a
93
+ factor they re-align, and the whole composition pulses in unison — the one
94
+ thing ambient motion must never do. So the periods are mutually prime in
95
+ tenths of a second (30, 47, 71), which puts the first full re-alignment of
96
+ all three past two hours. Round numbers like 3/4/6s would re-align every
97
+ twelve seconds. That is why these look arbitrary; they are not.
98
+
99
+ Pick a different one per layer. Which is which carries no meaning beyond
100
+ speed — unlike the interaction durations above, there is no "this is the
101
+ one for a state change". */
102
+ --duration-ambient-fast: 3s;
103
+ --duration-ambient-base: 4.7s;
104
+ --duration-ambient-slow: 7.1s;
69
105
  }
70
106
 
71
107
  @media (prefers-reduced-motion: reduce) {
108
+ /* The ambient periods are deliberately NOT collapsed to 1ms here. These drive
109
+ infinite loops, so 1ms would spin them at a thousand cycles a second rather
110
+ than stop them — the opposite of what was asked for. P-13 requires the whole
111
+ ambient declaration to sit inside `prefers-reduced-motion: no-preference`,
112
+ so under a reduce preference the animation never starts and there is nothing
113
+ to shorten. Absence, not speed. */
72
114
  :root { --duration-fast: 1ms; --duration-base: 1ms; --duration-slow: 1ms; }
73
115
  }
@@ -27,8 +27,19 @@
27
27
  Line heights UNITLESS. FLOOR: 1.5 holds even here. */
28
28
  --text-caption: 12px; --leading-caption: 1.5;
29
29
  --text-body: 14px; --leading-body: 1.5;
30
- --text-prose: 16px; --leading-prose: 1.6; /* LONG-FORM text only */
30
+ /* 18px, not 16px, and not negotiable by density. `B-75` names 18px as the
31
+ floor for sustained reading, and the reference agrees — "make long body
32
+ text at least 18px". This token sat at 16px, which made our own rule false
33
+ in the one mode most likely to be read for long stretches by someone who
34
+ has been at it all day. Sustained readability is an accessibility floor
35
+ like `--size-touch-target`, not a density dial. Long prose is rare in an
36
+ operator surface; when it appears, it is legible. */
37
+ --text-prose: 18px; --leading-prose: 1.6; /* LONG-FORM text only */
31
38
  --text-lead: 16px; --leading-lead: 1.5;
39
+ /* No fluid headings here, unlike editorial and product. This mode's largest
40
+ heading is 22px, which already fits ~28 characters per line on a 360px
41
+ screen — fluid sizing would have nothing to do. The mechanism is absent
42
+ because the problem is, not by oversight. */
32
43
  --text-h3: 16px; --leading-h3: 1.5;
33
44
  --text-h2: 18px; --leading-h2: 1.4;
34
45
  --text-h1: 22px; --leading-h1: 1.333;
@@ -67,6 +78,10 @@
67
78
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
68
79
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
69
80
 
81
+ /* No ambient duration tokens here, deliberately. Ambient motion is
82
+ editorial only (P-13) — a surface someone works in all day must not
83
+ have anything moving on it that they did not cause. */
84
+
70
85
  --font-numeric: var(--font-numeric-features);
71
86
  }
72
87
 
@@ -27,9 +27,27 @@
27
27
  --text-body: 16px; --leading-body: 1.5;
28
28
  --text-prose: 18px; --leading-prose: 1.6; /* LONG-FORM text only */
29
29
  --text-lead: 20px; --leading-lead: 1.5;
30
+
31
+ /* H1 and H2 are FLUID: they interpolate with viewport width instead of
32
+ switching at a breakpoint, which is why this system defines no breakpoint
33
+ token. Each clamp is the line through (360px viewport, min) and (1024px,
34
+ max); outside that range it saturates at the bounds.
35
+
36
+ The `rem` term is not decoration. `clamp(32px, 8vw, 48px)` would ignore a
37
+ reader who has set a larger default font size — page zoom scales `vw`, a
38
+ font-size preference does not — which fails WCAG 1.4.4. Keeping every term
39
+ in `rem` plus `vw` means the whole curve moves with the user's setting.
40
+
41
+ Only headings. Body and prose stay fixed: readability is absolute, set by
42
+ the eye and viewing distance, while heading size is relative — it exists to
43
+ contrast with body, and that contrast can compress on a narrow screen. A
44
+ fluid `--text-prose` would also breach the 18px floor (B-75, T20).
45
+
46
+ The minimums land on rungs the ladder already has rather than on new
47
+ values. Line heights are unitless, so they follow the size for free. */
30
48
  --text-h3: 20px; --leading-h3: 1.4;
31
- --text-h2: 24px; --leading-h2: 1.333;
32
- --text-h1: 32px; --leading-h1: 1.25;
49
+ --text-h2: clamp(1.25rem, 1.114rem + 0.602vw, 1.5rem); --leading-h2: 1.333; /* 20 → 24 */
50
+ --text-h1: clamp(1.5rem, 1.229rem + 1.205vw, 2rem); --leading-h1: 1.25; /* 24 → 32 */
33
51
 
34
52
  --font-weight-regular: 400;
35
53
  --font-weight-bold: 600;
@@ -63,6 +81,10 @@
63
81
  --duration-fast: 100ms; --duration-base: 150ms; --duration-slow: 200ms;
64
82
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
65
83
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
84
+
85
+ /* No ambient duration tokens here, deliberately. Ambient motion is
86
+ editorial only (P-13) — a surface someone works in all day must not
87
+ have anything moving on it that they did not cause. */
66
88
  }
67
89
 
68
90
  @media (prefers-reduced-motion: reduce) {