@code-sherpas/pharos-tokens 0.3.0 → 0.4.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.
- package/RULES.md +10 -0
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.js +1 -1
- package/dist/tokens.json +1 -1
- package/package.json +2 -2
- package/src/typography.tokens.json +2 -2
package/RULES.md
CHANGED
|
@@ -48,3 +48,13 @@ When picking which tokens to use, respect the defined pairs:
|
|
|
48
48
|
## 7. Extensions and overrides
|
|
49
49
|
|
|
50
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.
|
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ export const tokens = {
|
|
|
116
116
|
},
|
|
117
117
|
"font": {
|
|
118
118
|
"family": {
|
|
119
|
-
"sans": "\"
|
|
119
|
+
"sans": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
120
120
|
"mono": "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace"
|
|
121
121
|
},
|
|
122
122
|
"weight": {
|
package/dist/styles.css
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
--pharos-spacing-0-5: 0.125rem; /** 2px. */
|
|
81
81
|
--pharos-spacing-1-5: 0.375rem; /** 6px. */
|
|
82
82
|
--pharos-spacing-2-5: 0.625rem; /** 10px. */
|
|
83
|
-
--pharos-font-family-sans: "
|
|
83
|
+
--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. */
|
|
84
84
|
--pharos-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; /** Default monospace stack for code. */
|
|
85
85
|
--pharos-font-weight-regular: 400;
|
|
86
86
|
--pharos-font-weight-medium: 500;
|
package/dist/tokens.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ export const PharosSpacing05: string;
|
|
|
154
154
|
export const PharosSpacing15: string;
|
|
155
155
|
/** 10px. */
|
|
156
156
|
export const PharosSpacing25: string;
|
|
157
|
-
/** Default sans-serif stack. Inter
|
|
157
|
+
/** 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. */
|
|
158
158
|
export const PharosFontFamilySans: string;
|
|
159
159
|
/** Default monospace stack for code. */
|
|
160
160
|
export const PharosFontFamilyMono: string;
|
package/dist/tokens.js
CHANGED
|
@@ -88,7 +88,7 @@ export const PharosSpacing05 = "0.125rem"; // 2px.
|
|
|
88
88
|
export const PharosSpacing15 = "0.375rem"; // 6px.
|
|
89
89
|
export const PharosSpacing25 = "0.625rem"; // 10px.
|
|
90
90
|
export const PharosFontFamilySans =
|
|
91
|
-
'"
|
|
91
|
+
'"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.
|
|
92
92
|
export const PharosFontFamilyMono =
|
|
93
93
|
'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace'; // Default monospace stack for code.
|
|
94
94
|
export const PharosFontWeightRegular = "400";
|
package/dist/tokens.json
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"font": {
|
|
111
111
|
"family": {
|
|
112
|
-
"sans": "\"
|
|
112
|
+
"sans": "\"Outfit\", Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
113
113
|
"mono": "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace"
|
|
114
114
|
},
|
|
115
115
|
"weight": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-sherpas/pharos-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Design tokens de Code Sherpas — agnóstico de framework. DTCG + Style Dictionary + OKLCH.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./dtcg/*": "./src/*.tokens.json"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
33
|
+
"node": ">=22"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@changesets/cli": "^2.27.10",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"font": {
|
|
3
3
|
"family": {
|
|
4
4
|
"sans": {
|
|
5
|
-
"$value": "\"
|
|
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. Inter
|
|
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."
|
|
8
8
|
},
|
|
9
9
|
"mono": {
|
|
10
10
|
"$value": "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
|