@code-sherpas/pharos-tokens 0.7.0 → 0.8.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.
package/README.md CHANGED
@@ -73,7 +73,7 @@ import colorDtcg from '@code-sherpas/pharos-tokens/dtcg/color';
73
73
 
74
74
  ## Rules for consumers
75
75
 
76
- See [RULES.md](./RULES.md) — published with the package.
76
+ See [the rules for consumers](https://app.notion.com/p/4071751eee1081b2b000e212c80761b4) in Notion (Programa Pharos), where Pharos keeps its documentation (decision D27).
77
77
 
78
78
  ## Token structure
79
79
 
package/dist/index.js CHANGED
@@ -223,6 +223,13 @@ export const tokens = {
223
223
  "lineHeight": "1.25",
224
224
  "letterSpacing": "0"
225
225
  },
226
+ "h4": {
227
+ "fontFamily": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
228
+ "fontSize": "1.25rem",
229
+ "fontWeight": "600",
230
+ "lineHeight": "1.25",
231
+ "letterSpacing": "0"
232
+ },
226
233
  "lesson-title": {
227
234
  "fontFamily": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
228
235
  "fontSize": "1.25rem",
package/dist/styles.css CHANGED
@@ -16,16 +16,16 @@
16
16
  --pharos-color-neutral-800: oklch(24.5% 0.02 248.83); /** Ink ramp step between 700 and 900 (fixed: no longer lighter than 700). */
17
17
  --pharos-color-neutral-900: oklch(20.50% 0.02 248.83); /** Brand navy #101820. Primary text, icons and headlines on paper-* and white; the primary Button fill. */
18
18
  --pharos-color-neutral-950: oklch(14.69% 0.0225 248.83); /** Deepest ink; press state of the primary Button. */
19
- --pharos-color-primary-50: oklch(95.94% 0.0164 274.82); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
20
- --pharos-color-primary-100: oklch(91.35% 0.0374 275.69); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
21
- --pharos-color-primary-200: oklch(82.70% 0.0785 274.99); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
22
- --pharos-color-primary-300: oklch(74.07% 0.1205 273.68); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
23
- --pharos-color-primary-400: oklch(65.40% 0.1582 271.71); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
24
- --pharos-color-primary-500: oklch(57.34% 0.1996 269.61); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
25
- --pharos-color-primary-600: oklch(49.83% 0.2417 267.34); /** Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI/copilot. */
26
- --pharos-color-primary-700: oklch(42.19% 0.2111 267.20); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
27
- --pharos-color-primary-800: oklch(34.32% 0.1726 267.54); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
28
- --pharos-color-primary-900: oklch(25.97% 0.1317 268.18); /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
19
+ --pharos-color-primary-50: oklch(95.94% 0.0164 274.82); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
20
+ --pharos-color-primary-100: oklch(91.35% 0.0374 275.69); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
21
+ --pharos-color-primary-200: oklch(82.70% 0.0785 274.99); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
22
+ --pharos-color-primary-300: oklch(74.07% 0.1205 273.68); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
23
+ --pharos-color-primary-400: oklch(65.40% 0.1582 271.71); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
24
+ --pharos-color-primary-500: oklch(57.34% 0.1996 269.61); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
25
+ --pharos-color-primary-600: oklch(49.83% 0.2417 267.34); /** Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI. */
26
+ --pharos-color-primary-700: oklch(42.19% 0.2111 267.20); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
27
+ --pharos-color-primary-800: oklch(34.32% 0.1726 267.54); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
28
+ --pharos-color-primary-900: oklch(25.97% 0.1317 268.18); /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
29
29
  --pharos-color-semantic-success-fg: oklch(52% 0.136 152); /** System state only: success fill and success text colour; pair with semantic-success-on on the fill (WCAG AA). #027E3F — chroma clamped to the sRGB gamut edge. */
30
30
  --pharos-color-semantic-success-bg: oklch(52% 0.136 152 / 0.063); /** System state only: tinted success background (fg at 6.3%). */
31
31
  --pharos-color-semantic-error-fg: oklch(54% 0.22 27.48); /** System state only: error fill and error text colour; pair with semantic-error-on on the fill (WCAG AA). Single red (laser-red merged); also the destructive Button fill and its focus ring. */
@@ -80,9 +80,9 @@
80
80
  --pharos-z-drawer: 10000; /** DEPRECATED: use --pharos-z-index-modal (decision D29). Removed in the next major. */
81
81
  --pharos-z-dropdown: 10001; /** DEPRECATED: use --pharos-z-index-popover (decision D29). Removed in the next major. */
82
82
  --pharos-z-tooltip: 10002; /** DEPRECATED: use --pharos-z-index-tooltip (decision D29). Removed in the next major. */
83
- --pharos-duration-fast: 100ms; /** Micro interactions (hover). */
84
- --pharos-duration-normal: 200ms; /** Default transitions. */
85
- --pharos-duration-slow: 300ms; /** Panel slide, overlay fade. */
83
+ --pharos-duration-fast: 0.1s; /** Micro interactions (hover). */
84
+ --pharos-duration-normal: 0.2s; /** Default transitions. */
85
+ --pharos-duration-slow: 0.3s; /** Panel slide, overlay fade. */
86
86
  --pharos-easing-in: cubic-bezier(0.4, 0, 1, 1);
87
87
  --pharos-easing-out: cubic-bezier(0, 0, 0.2, 1);
88
88
  --pharos-easing-in-out: cubic-bezier(0.4, 0, 0.2, 1);
@@ -103,7 +103,7 @@
103
103
  --pharos-spacing-0-5: 0.125rem; /** 2px step of the rem scale. */
104
104
  --pharos-spacing-1-5: 0.375rem; /** 6px step of the rem scale. */
105
105
  --pharos-spacing-2-5: 0.625rem; /** 10px step of the rem scale. */
106
- --pharos-font-family-sans: "Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /** Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — see RULES.md §8. */
106
+ --pharos-font-family-sans: "Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /** Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — rule 8 of the consumer rules linked from the README. */
107
107
  --pharos-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; /** Default monospace stack for code. */
108
108
  --pharos-font-weight-regular: 400;
109
109
  --pharos-font-weight-medium: 500;
@@ -159,11 +159,16 @@
159
159
  --pharos-type-h3-font-weight: var(--pharos-font-weight-semibold); /** H3 / large titles (2xl). */
160
160
  --pharos-type-h3-line-height: var(--pharos-font-line-height-tight); /** H3 / large titles (2xl). */
161
161
  --pharos-type-h3-letter-spacing: var(--pharos-font-letter-spacing-normal); /** H3 / large titles (2xl). */
162
- --pharos-type-lesson-title-font-family: var(--pharos-font-family-sans); /** Lesson titles (xl). */
163
- --pharos-type-lesson-title-font-size: var(--pharos-font-size-xl); /** Lesson titles (xl). */
164
- --pharos-type-lesson-title-font-weight: var(--pharos-font-weight-semibold); /** Lesson titles (xl). */
165
- --pharos-type-lesson-title-line-height: var(--pharos-font-line-height-tight); /** Lesson titles (xl). */
166
- --pharos-type-lesson-title-letter-spacing: var(--pharos-font-letter-spacing-normal); /** Lesson titles (xl). */
162
+ --pharos-type-h4-font-family: var(--pharos-font-family-sans); /** H4 (xl). */
163
+ --pharos-type-h4-font-size: var(--pharos-font-size-xl); /** H4 (xl). */
164
+ --pharos-type-h4-font-weight: var(--pharos-font-weight-semibold); /** H4 (xl). */
165
+ --pharos-type-h4-line-height: var(--pharos-font-line-height-tight); /** H4 (xl). */
166
+ --pharos-type-h4-letter-spacing: var(--pharos-font-letter-spacing-normal); /** H4 (xl). */
167
+ --pharos-type-lesson-title-font-family: var(--pharos-font-family-sans); /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
168
+ --pharos-type-lesson-title-font-size: var(--pharos-font-size-xl); /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
169
+ --pharos-type-lesson-title-font-weight: var(--pharos-font-weight-semibold); /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
170
+ --pharos-type-lesson-title-line-height: var(--pharos-font-line-height-tight); /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
171
+ --pharos-type-lesson-title-letter-spacing: var(--pharos-font-letter-spacing-normal); /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
167
172
  --pharos-type-subtitle-font-family: var(--pharos-font-family-sans); /** Subtitles (lg). */
168
173
  --pharos-type-subtitle-font-size: var(--pharos-font-size-lg); /** Subtitles (lg). */
169
174
  --pharos-type-subtitle-font-weight: var(--pharos-font-weight-medium); /** Subtitles (lg). */
package/dist/tokens.d.ts CHANGED
@@ -28,25 +28,25 @@ export const PharosColorNeutral800: string;
28
28
  export const PharosColorNeutral900: string;
29
29
  /** Deepest ink; press state of the primary Button. */
30
30
  export const PharosColorNeutral950: string;
31
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
31
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
32
32
  export const PharosColorPrimary50: string;
33
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
33
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
34
34
  export const PharosColorPrimary100: string;
35
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
35
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
36
36
  export const PharosColorPrimary200: string;
37
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
37
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
38
38
  export const PharosColorPrimary300: string;
39
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
39
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
40
40
  export const PharosColorPrimary400: string;
41
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
41
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
42
42
  export const PharosColorPrimary500: string;
43
- /** Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI/copilot. */
43
+ /** Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI. */
44
44
  export const PharosColorPrimary600: string;
45
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
45
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
46
46
  export const PharosColorPrimary700: string;
47
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
47
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
48
48
  export const PharosColorPrimary800: string;
49
- /** Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome. */
49
+ /** Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome. */
50
50
  export const PharosColorPrimary900: string;
51
51
  /** System state only: success fill and success text colour; pair with semantic-success-on on the fill (WCAG AA). #027E3F — chroma clamped to the sRGB gamut edge. */
52
52
  export const PharosColorSemanticSuccessFg: string;
@@ -223,7 +223,7 @@ export const PharosSpacing05: string;
223
223
  export const PharosSpacing15: string;
224
224
  /** 10px step of the rem scale. */
225
225
  export const PharosSpacing25: string;
226
- /** Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — see RULES.md §8. */
226
+ /** Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — rule 8 of the consumer rules linked from the README. */
227
227
  export const PharosFontFamilySans: string;
228
228
  /** Default monospace stack for code. */
229
229
  export const PharosFontFamilyMono: string;
@@ -298,15 +298,25 @@ export const PharosTypeH3FontWeight: string;
298
298
  export const PharosTypeH3LineHeight: string;
299
299
  /** H3 / large titles (2xl). */
300
300
  export const PharosTypeH3LetterSpacing: string;
301
- /** Lesson titles (xl). */
301
+ /** H4 (xl). */
302
+ export const PharosTypeH4FontFamily: string;
303
+ /** H4 (xl). */
304
+ export const PharosTypeH4FontSize: string;
305
+ /** H4 (xl). */
306
+ export const PharosTypeH4FontWeight: string;
307
+ /** H4 (xl). */
308
+ export const PharosTypeH4LineHeight: string;
309
+ /** H4 (xl). */
310
+ export const PharosTypeH4LetterSpacing: string;
311
+ /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
302
312
  export const PharosTypeLessonTitleFontFamily: string;
303
- /** Lesson titles (xl). */
313
+ /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
304
314
  export const PharosTypeLessonTitleFontSize: string;
305
- /** Lesson titles (xl). */
315
+ /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
306
316
  export const PharosTypeLessonTitleFontWeight: string;
307
- /** Lesson titles (xl). */
317
+ /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
308
318
  export const PharosTypeLessonTitleLineHeight: string;
309
- /** Lesson titles (xl). */
319
+ /** DEPRECATED: use --pharos-type-h4. Removed in the next major. */
310
320
  export const PharosTypeLessonTitleLetterSpacing: string;
311
321
  /** Subtitles (lg). */
312
322
  export const PharosTypeSubtitleFontFamily: string;
package/dist/tokens.js CHANGED
@@ -15,16 +15,16 @@ export const PharosColorNeutral700 = "oklch(29.52% 0.02 248.83)"; // Ink: labels
15
15
  export const PharosColorNeutral800 = "oklch(24.5% 0.02 248.83)"; // Ink ramp step between 700 and 900 (fixed: no longer lighter than 700).
16
16
  export const PharosColorNeutral900 = "oklch(20.50% 0.02 248.83)"; // Brand navy #101820. Primary text, icons and headlines on paper-* and white; the primary Button fill.
17
17
  export const PharosColorNeutral950 = "oklch(14.69% 0.0225 248.83)"; // Deepest ink; press state of the primary Button.
18
- export const PharosColorPrimary50 = "oklch(95.94% 0.0164 274.82)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
19
- export const PharosColorPrimary100 = "oklch(91.35% 0.0374 275.69)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
20
- export const PharosColorPrimary200 = "oklch(82.70% 0.0785 274.99)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
21
- export const PharosColorPrimary300 = "oklch(74.07% 0.1205 273.68)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
22
- export const PharosColorPrimary400 = "oklch(65.40% 0.1582 271.71)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
23
- export const PharosColorPrimary500 = "oklch(57.34% 0.1996 269.61)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
24
- export const PharosColorPrimary600 = "oklch(49.83% 0.2417 267.34)"; // Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI/copilot.
25
- export const PharosColorPrimary700 = "oklch(42.19% 0.2111 267.20)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
26
- export const PharosColorPrimary800 = "oklch(34.32% 0.1726 267.54)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
27
- export const PharosColorPrimary900 = "oklch(25.97% 0.1317 268.18)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome.
18
+ export const PharosColorPrimary50 = "oklch(95.94% 0.0164 274.82)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
19
+ export const PharosColorPrimary100 = "oklch(91.35% 0.0374 275.69)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
20
+ export const PharosColorPrimary200 = "oklch(82.70% 0.0785 274.99)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
21
+ export const PharosColorPrimary300 = "oklch(74.07% 0.1205 273.68)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
22
+ export const PharosColorPrimary400 = "oklch(65.40% 0.1582 271.71)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
23
+ export const PharosColorPrimary500 = "oklch(57.34% 0.1996 269.61)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
24
+ export const PharosColorPrimary600 = "oklch(49.83% 0.2417 267.34)"; // Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI.
25
+ export const PharosColorPrimary700 = "oklch(42.19% 0.2111 267.20)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
26
+ export const PharosColorPrimary800 = "oklch(34.32% 0.1726 267.54)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
27
+ export const PharosColorPrimary900 = "oklch(25.97% 0.1317 268.18)"; // Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome.
28
28
  export const PharosColorSemanticSuccessFg = "oklch(52% 0.136 152)"; // System state only: success fill and success text colour; pair with semantic-success-on on the fill (WCAG AA). #027E3F — chroma clamped to the sRGB gamut edge.
29
29
  export const PharosColorSemanticSuccessBg = "oklch(52% 0.136 152 / 0.063)"; // System state only: tinted success background (fg at 6.3%).
30
30
  export const PharosColorSemanticSuccessOn = "oklch(100% 0 0)"; // Text and icons on a semantic-success-fg fill.
@@ -119,7 +119,7 @@ export const PharosSpacing05 = "0.125rem"; // 2px step of the rem scale.
119
119
  export const PharosSpacing15 = "0.375rem"; // 6px step of the rem scale.
120
120
  export const PharosSpacing25 = "0.625rem"; // 10px step of the rem scale.
121
121
  export const PharosFontFamilySans =
122
- '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — see RULES.md §8.
122
+ '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — rule 8 of the consumer rules linked from the README.
123
123
  export const PharosFontFamilyMono =
124
124
  'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'; // Default monospace stack for code.
125
125
  export const PharosFontWeightRegular = "400";
@@ -167,12 +167,18 @@ export const PharosTypeH3FontSize = "1.5rem"; // H3 / large titles (2xl).
167
167
  export const PharosTypeH3FontWeight = "600"; // H3 / large titles (2xl).
168
168
  export const PharosTypeH3LineHeight = "1.25"; // H3 / large titles (2xl).
169
169
  export const PharosTypeH3LetterSpacing = "0"; // H3 / large titles (2xl).
170
+ export const PharosTypeH4FontFamily =
171
+ '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // H4 (xl).
172
+ export const PharosTypeH4FontSize = "1.25rem"; // H4 (xl).
173
+ export const PharosTypeH4FontWeight = "600"; // H4 (xl).
174
+ export const PharosTypeH4LineHeight = "1.25"; // H4 (xl).
175
+ export const PharosTypeH4LetterSpacing = "0"; // H4 (xl).
170
176
  export const PharosTypeLessonTitleFontFamily =
171
- '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // Lesson titles (xl).
172
- export const PharosTypeLessonTitleFontSize = "1.25rem"; // Lesson titles (xl).
173
- export const PharosTypeLessonTitleFontWeight = "600"; // Lesson titles (xl).
174
- export const PharosTypeLessonTitleLineHeight = "1.25"; // Lesson titles (xl).
175
- export const PharosTypeLessonTitleLetterSpacing = "0"; // Lesson titles (xl).
177
+ '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // DEPRECATED: use --pharos-type-h4. Removed in the next major.
178
+ export const PharosTypeLessonTitleFontSize = "1.25rem"; // DEPRECATED: use --pharos-type-h4. Removed in the next major.
179
+ export const PharosTypeLessonTitleFontWeight = "600"; // DEPRECATED: use --pharos-type-h4. Removed in the next major.
180
+ export const PharosTypeLessonTitleLineHeight = "1.25"; // DEPRECATED: use --pharos-type-h4. Removed in the next major.
181
+ export const PharosTypeLessonTitleLetterSpacing = "0"; // DEPRECATED: use --pharos-type-h4. Removed in the next major.
176
182
  export const PharosTypeSubtitleFontFamily =
177
183
  '"Outfit", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; // Subtitles (lg).
178
184
  export const PharosTypeSubtitleFontSize = "1.125rem"; // Subtitles (lg).
package/dist/tokens.json CHANGED
@@ -216,6 +216,13 @@
216
216
  "lineHeight": "1.25",
217
217
  "letterSpacing": "0"
218
218
  },
219
+ "h4": {
220
+ "fontFamily": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
221
+ "fontSize": "1.25rem",
222
+ "fontWeight": "600",
223
+ "lineHeight": "1.25",
224
+ "letterSpacing": "0"
225
+ },
219
226
  "lesson-title": {
220
227
  "fontFamily": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
221
228
  "fontSize": "1.25rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-sherpas/pharos-tokens",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Design tokens de Code Sherpas — agnóstico de framework. DTCG + Style Dictionary + OKLCH.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,8 +18,7 @@
18
18
  "type": "module",
19
19
  "files": [
20
20
  "dist",
21
- "src",
22
- "RULES.md"
21
+ "src"
23
22
  ],
24
23
  "exports": {
25
24
  ".": {
@@ -30,7 +29,8 @@
30
29
  "./dtcg/*": "./src/*.tokens.json"
31
30
  },
32
31
  "engines": {
33
- "node": ">=22"
32
+ "node": ">=22",
33
+ "pnpm": "10.33.0"
34
34
  },
35
35
  "lint-staged": {
36
36
  "*.{ts,tsx,js,mjs,cjs,json,md,mdx,css,yml,yaml}": "prettier --write"
@@ -53,8 +53,8 @@
53
53
  "vitest": "^4.1.4"
54
54
  },
55
55
  "scripts": {
56
- "build": "node build/style-dictionary.config.mjs",
57
- "test": "vitest run",
56
+ "build": "bash scripts/check-node-version.sh && node build/style-dictionary.config.mjs",
57
+ "test": "bash scripts/check-node-version.sh && vitest run",
58
58
  "test:watch": "vitest",
59
59
  "typecheck": "tsc --noEmit",
60
60
  "lint": "eslint .",
@@ -73,52 +73,52 @@
73
73
  "50": {
74
74
  "$value": "oklch(95.94% 0.0164 274.82)",
75
75
  "$type": "color",
76
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
76
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
77
77
  },
78
78
  "100": {
79
79
  "$value": "oklch(91.35% 0.0374 275.69)",
80
80
  "$type": "color",
81
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
81
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
82
82
  },
83
83
  "200": {
84
84
  "$value": "oklch(82.70% 0.0785 274.99)",
85
85
  "$type": "color",
86
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
86
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
87
87
  },
88
88
  "300": {
89
89
  "$value": "oklch(74.07% 0.1205 273.68)",
90
90
  "$type": "color",
91
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
91
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
92
92
  },
93
93
  "400": {
94
94
  "$value": "oklch(65.40% 0.1582 271.71)",
95
95
  "$type": "color",
96
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
96
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
97
97
  },
98
98
  "500": {
99
99
  "$value": "oklch(57.34% 0.1996 269.61)",
100
100
  "$type": "color",
101
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
101
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
102
102
  },
103
103
  "600": {
104
104
  "$value": "oklch(49.83% 0.2417 267.34)",
105
105
  "$type": "color",
106
- "$description": "Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI/copilot."
106
+ "$description": "Seablue, the brand hue (≈ #2A48E9). The one blue anchor per view: action, focus ring (2px white halo + 4px primary-600), selection, links, AI."
107
107
  },
108
108
  "700": {
109
109
  "$value": "oklch(42.19% 0.2111 267.20)",
110
110
  "$type": "color",
111
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
111
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
112
112
  },
113
113
  "800": {
114
114
  "$value": "oklch(34.32% 0.1726 267.54)",
115
115
  "$type": "color",
116
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
116
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
117
117
  },
118
118
  "900": {
119
119
  "$value": "oklch(25.97% 0.1317 268.18)",
120
120
  "$type": "color",
121
- "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI/copilot. Never structural chrome."
121
+ "$description": "Seablue ramp: signature and signal — action, focus, selection, links, AI. Never structural chrome."
122
122
  }
123
123
  },
124
124
  "semantic": {
@@ -4,7 +4,7 @@
4
4
  "sans": {
5
5
  "$value": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
6
6
  "$type": "fontFamily",
7
- "$description": "Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — see RULES.md §8."
7
+ "$description": "Default sans-serif stack. Outfit is the primary face (Decision D8); Inter is the fallback before system fonts. Loading Outfit is the consumer's responsibility — rule 8 of the consumer rules linked from the README."
8
8
  },
9
9
  "mono": {
10
10
  "$value": "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
@@ -160,6 +160,17 @@
160
160
  },
161
161
  "$description": "H3 / large titles (2xl)."
162
162
  },
163
+ "h4": {
164
+ "$type": "typography",
165
+ "$value": {
166
+ "fontFamily": "{font.family.sans}",
167
+ "fontSize": "{font.size.xl}",
168
+ "fontWeight": "{font.weight.semibold}",
169
+ "lineHeight": "{font.lineHeight.tight}",
170
+ "letterSpacing": "{font.letterSpacing.normal}"
171
+ },
172
+ "$description": "H4 (xl)."
173
+ },
163
174
  "lesson-title": {
164
175
  "$type": "typography",
165
176
  "$value": {
@@ -169,7 +180,8 @@
169
180
  "lineHeight": "{font.lineHeight.tight}",
170
181
  "letterSpacing": "{font.letterSpacing.normal}"
171
182
  },
172
- "$description": "Lesson titles (xl)."
183
+ "$description": "DEPRECATED: use --pharos-type-h4. Removed in the next major.",
184
+ "$deprecated": "Use --pharos-type-h4: Pharos names text styles by their level, not by one product's content. Removed in the next major."
173
185
  },
174
186
  "subtitle": {
175
187
  "$type": "typography",
package/RULES.md DELETED
@@ -1,60 +0,0 @@
1
- # Rules for consumers of `@code-sherpas/pharos-tokens`
2
-
3
- This file ships with the package (`files` includes `RULES.md`). Every
4
- consumer — `pharos-react`, `alexandria-web-application`,
5
- and any future app — must follow these rules.
6
-
7
- ## 1. Do not redefine values locally
8
-
9
- Tokens are the single source of truth. Forbidden:
10
-
11
- - Hardcoded hex for colors that have an equivalent token (e.g. `#101820` when `--pharos-color-neutral-900` exists).
12
- - Raw `rem`/`px` values for spacing when `--pharos-spacing-*` exists.
13
- - Ad-hoc local shadows.
14
-
15
- If a value has no token, open an issue in this repo. Do not improvise.
16
-
17
- ## 2. Do not invent colors outside the system
18
-
19
- The system is: `color.neutral.*`, `color.primary.*`, `color.semantic.{success,error,warning,info}.*`, `color.base.{white,black}`. If you need a new accent (purple, amber, etc.) with clear semantics, open an issue — do not add it locally.
20
-
21
- ## 3. Use CSS vars or the JS object
22
-
23
- **Web**: import `@code-sherpas/pharos-tokens/css` at your entry point and use `var(--pharos-*)` or Tailwind arbitrary values (`bg-[var(--pharos-color-primary-600)]`).
24
-
25
- **Programmatic** (JS/TS): `import { tokens } from '@code-sherpas/pharos-tokens'` → `tokens.color.neutral['900']`.
26
-
27
- **DTCG source** (for custom pipelines): `import dtcg from '@code-sherpas/pharos-tokens/dtcg/color'`.
28
-
29
- ## 4. Do not mutate values after importing
30
-
31
- Forbidden: `tokens.color.primary['600'] = '#new'`. The object is frozen in spirit even if JS does not enforce it. Changes go through a PR to this repo.
32
-
33
- ## 5. Respect semver
34
-
35
- - Breaking change in this repo → major bump → consumers upgrade explicitly.
36
- - New token → minor bump → consumers may adopt without breaking anything.
37
- - Value adjustment without renaming → patch → consumers receive visual improvements automatically.
38
-
39
- ## 6. Accessibility
40
-
41
- When picking which tokens to use, respect the defined pairs:
42
-
43
- - Text over `color.neutral.50`/`100`/`200`: use `color.neutral.900` or darker.
44
- - Text over `color.primary.600`+: use `color.base.white`.
45
- - Text over `color.semantic.{success,error,info}.fg` (filled): use `.on` from the same group.
46
- - Text over `color.semantic.warning.fg`: `.on` is `color.neutral.900` (warning is light).
47
-
48
- ## 7. Extensions and overrides
49
-
50
- **Do not** publish a new package `@yourorg/pharos-tokens-extended`. If a product needs its own tokens (e.g. co-branded identities), implement them as additional CSS vars in the consumer under your own namespace (`--myapp-*`) and document it.
51
-
52
- ## 8. Font loading is the consumer's responsibility
53
-
54
- `pharos-tokens` declares the font stack (e.g. `"Outfit", Inter, system-ui, ...`) but does **not** ship font files. The package stays framework-agnostic and cannot assume how the consumer serves assets. Each consumer is responsible for loading the primary face before the UI renders:
55
-
56
- - **Next.js**: `next/font/google` with `Outfit` (and optionally `Inter`) in the root layout.
57
- - **Vite / CRA / generic web**: `@fontsource/outfit` + `@fontsource/inter`, or a `<link>` tag to Google Fonts.
58
- - **Emails / PDFs**: the renderer falls back through the stack; declare `Outfit` as the primary face only if the renderer can embed it, otherwise the fallback chain kicks in.
59
-
60
- If the primary face is not loaded, the stack falls back through `Inter → system-ui → ...`, so the UI degrades gracefully — but the intended design requires the primary face.