@insymetri/styleguide 0.1.88 → 0.1.89

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.
@@ -1,41 +1,67 @@
1
- // Semantic typography scale (matches TOTM conventions).
1
+ // Semantic typography scale.
2
2
  // With 62.5% base (1rem = 10px), rem values read as pixels: 2.4rem = 24px.
3
- // TW4's extended fontSize format bundles size + lineHeight + fontWeight
4
- // into a single class — e.g. `text-h1` sets all three properties.
3
+ // TW4's extended fontSize format bundles size + lineHeight + weight + tracking
4
+ // into a single class — e.g. `text-h1` sets all four properties.
5
+ //
6
+ // Tuned to the artifact type system. Three things define that look, and they
7
+ // matter more than the raw sizes:
8
+ //
9
+ // 1. Tracking tightens as size grows — body sits at -0.005em, headings run
10
+ // to -0.03em. At these sizes an untracked heading sprawls; this pulls it
11
+ // together. Not tied to one typeface — it was first tuned against Geist,
12
+ // and Inter, which measures ~5% WIDER at the same size, wants it at least
13
+ // as much.
14
+ // 2. Headings are 600, never 700. Emphasis in running text is 500. The jump
15
+ // from 400 to 700 reads as shouting at these sizes.
16
+ // 3. Body line-height is 1.5 and headings are 1.15–1.3 — tight enough that a
17
+ // two-line title still reads as one object.
18
+ //
19
+ // The half-pixel sizes (1.05rem, 1.15rem, 1.25rem, 1.35rem) are deliberate:
20
+ // they are what the artifacts use for dense metadata, and at 62.5% base they
21
+ // land on exact half-pixels rather than rounding artifacts.
22
+ //
23
+ // The loosened body leading is the biggest change here, not the weights, which
24
+ // did not move: 13px text went from a 16px line box to 19.5px, and `tiny` from
25
+ // 12px to 15px. Headings tightened the other way so a two-line title reads as
26
+ // one object.
5
27
  export const fontSize = {
6
- // Headings — semibold (600)
7
- h1: ['2.4rem', { lineHeight: '3.2rem', fontWeight: '600' }], // 24px
8
- h2: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '600' }], // 20px
9
- h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600' }], // 18px
10
- h4: ['1.6rem', { lineHeight: '2.0rem', fontWeight: '600' }], // 16px
11
- h5: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '600' }], // 14px
12
- h6: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '600' }], // 13px
13
- // Medium — light weight display text (300)
14
- m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300' }], // 20px
15
- m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300' }], // 16px
16
- 'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500' }], // 16px
17
- m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300' }], // 14px
18
- 'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500' }], // 13px
19
- 'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400' }], // 13px
20
- // Body — large (16px)
21
- large: ['1.6rem', { lineHeight: '2.0rem', fontWeight: '400' }],
22
- 'large-emphasis': ['1.6rem', { lineHeight: '2.0rem', fontWeight: '500' }],
23
- // Body — default (13px)
24
- default: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '400' }],
25
- emphasis: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '500' }],
26
- strong: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '600' }],
27
- // Body — small (12px)
28
- small: ['1.2rem', { lineHeight: '1.6rem', fontWeight: '400' }],
29
- 'small-emphasis': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '500' }],
30
- 'small-strong': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '600' }],
31
- // Body — tiny (11px)
32
- tiny: ['1.1rem', { lineHeight: '1.2rem', fontWeight: '400' }],
33
- 'tiny-emphasis': ['1.1rem', { lineHeight: '1.2rem', fontWeight: '500' }],
34
- 'tiny-strong': ['1.1rem', { lineHeight: '1.2rem', fontWeight: '600' }],
35
- // Special — numeric uses monospace font (pair with font-mono class)
36
- numeric: ['1.4rem', { lineHeight: '1.6rem', fontWeight: '400' }], // 14px
37
- // Display — hero/feature sizes (no bundled weight)
38
- 'display-lg': ['4.0rem', { lineHeight: '1.1' }], // 40px
39
- 'display-md': ['3.0rem', { lineHeight: '1.2' }], // 30px
40
- 'display-sm': ['2.4rem', { lineHeight: '1.2', fontWeight: '500' }], // 24px
28
+ // Headings — semibold (600), tracking tightening with size
29
+ h1: ['2.6rem', { lineHeight: '3.0rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 26px
30
+ h2: ['2.0rem', { lineHeight: '2.6rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 20px
31
+ h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 18px
32
+ h4: ['1.5rem', { lineHeight: '2.0rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 15px
33
+ h5: ['1.4rem', { lineHeight: '1.9rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 14px
34
+ h6: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '600', letterSpacing: '-0.005em' }], // 13px
35
+ // Medium — light display text (300)
36
+ m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300', letterSpacing: '-0.02em' }], // 20px
37
+ m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300', letterSpacing: '-0.01em' }], // 16px
38
+ 'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500', letterSpacing: '-0.01em' }], // 16px
39
+ m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300', letterSpacing: '-0.005em' }], // 14px
40
+ 'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500', letterSpacing: '-0.005em' }], // 13px
41
+ 'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400', letterSpacing: '-0.005em' }], // 13px
42
+ // Body — large (15px). The artifacts' lead/description size.
43
+ large: ['1.5rem', { lineHeight: '2.2rem', fontWeight: '400', letterSpacing: '-0.01em' }],
44
+ 'large-emphasis': ['1.5rem', { lineHeight: '2.2rem', fontWeight: '500', letterSpacing: '-0.01em' }],
45
+ // Body — default (13px), the base size the whole system is set in
46
+ default: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '400', letterSpacing: '-0.005em' }],
47
+ emphasis: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '500', letterSpacing: '-0.005em' }],
48
+ strong: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '600', letterSpacing: '-0.005em' }],
49
+ // Body — small (12.5px), for secondary/meta lines beside body text
50
+ small: ['1.25rem', { lineHeight: '1.7rem', fontWeight: '400', letterSpacing: '0' }],
51
+ 'small-emphasis': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '500', letterSpacing: '0' }],
52
+ 'small-strong': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '600', letterSpacing: '0' }],
53
+ // Body — tiny (11.5px), for timestamps, hints and counts
54
+ tiny: ['1.15rem', { lineHeight: '1.5rem', fontWeight: '400', letterSpacing: '0' }],
55
+ 'tiny-emphasis': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '500', letterSpacing: '0' }],
56
+ 'tiny-strong': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '600', letterSpacing: '0' }],
57
+ // Micro (10.5px) — the uppercase section label. Pair with `tracking-label`
58
+ // and `uppercase`; the positive tracking is what keeps caps legible small.
59
+ micro: ['1.05rem', { lineHeight: '1.575rem', fontWeight: '500', letterSpacing: '0.06em' }], // 10.5px × 1.5
60
+ // Special — numeric. Pair with `font-mono` for tabular figures.
61
+ numeric: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '400', letterSpacing: '0' }], // 13px
62
+ // Display — hero/feature sizes. `amount` is the artifacts' big figure.
63
+ amount: ['2.6rem', { lineHeight: '2.9rem', fontWeight: '600', letterSpacing: '-0.03em' }], // 26px
64
+ 'display-lg': ['4.0rem', { lineHeight: '1.1', letterSpacing: '-0.03em' }], // 40px
65
+ 'display-md': ['3.0rem', { lineHeight: '1.2', letterSpacing: '-0.025em' }], // 30px
66
+ 'display-sm': ['2.4rem', { lineHeight: '1.2', fontWeight: '500', letterSpacing: '-0.02em' }], // 24px
41
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insymetri/styleguide",
3
- "version": "0.1.88",
3
+ "version": "0.1.89",
4
4
  "description": "Insymetri shared UI component library built with Svelte 5",
5
5
  "type": "module",
6
6
  "scripts": {