@encore-os/tokens 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/dist/tokens.ts ADDED
@@ -0,0 +1,83 @@
1
+ export const lightTokens = {
2
+ "background": "#f2f5f8",
3
+ "foreground": "#0f1624",
4
+ "muted": "#e6edf6",
5
+ "mutedForeground": "#4c5d76",
6
+ "surface": "#ffffff",
7
+ "border": "#c8ced8",
8
+ "ring": "#0ea5e9",
9
+ "primary": "#101f41",
10
+ "primaryForeground": "#ffffff",
11
+ "secondary": "#f3f5f7",
12
+ "secondaryForeground": "#0f1624",
13
+ "card": "#ffffff",
14
+ "cardForeground": "#0f1624",
15
+ "popover": "#ffffff",
16
+ "popoverForeground": "#0f1624",
17
+ "input": "#c8ced8",
18
+ "destructiveForeground": "#f9fafb",
19
+ "accent": "#0a7db2",
20
+ "accentForeground": "#ffffff",
21
+ "destructive": "#d92626",
22
+ "success": "#279b57",
23
+ "warning": "#e9980c",
24
+ "info": "#0a5adb"
25
+ } as const;
26
+ export const darkTokens = {
27
+ "background": "#0b1220",
28
+ "foreground": "#e6edf6",
29
+ "muted": "#172238",
30
+ "mutedForeground": "#90a1ba",
31
+ "surface": "#111c30",
32
+ "border": "#243349",
33
+ "ring": "#38bdf8",
34
+ "primary": "#0ea5e9",
35
+ "primaryForeground": "#04141f",
36
+ "secondary": "#1b2740",
37
+ "secondaryForeground": "#c5d2e6",
38
+ "card": "#111c30",
39
+ "cardForeground": "#e6edf6",
40
+ "popover": "#0f1a2c",
41
+ "popoverForeground": "#e6edf6",
42
+ "input": "#1d2a42",
43
+ "destructiveForeground": "#1a0606",
44
+ "accent": "#38bdf8",
45
+ "accentForeground": "#04141f",
46
+ "destructive": "#f04848",
47
+ "success": "#3ddc84",
48
+ "warning": "#f5b133",
49
+ "info": "#4f8ff5"
50
+ } as const;
51
+ export type TokenName = keyof typeof lightTokens;
52
+
53
+ export const fontFamily = {
54
+ "sans": "Inter, ui-sans-serif, system-ui, -apple-system, sans-serif",
55
+ "mono": "'JetBrains Mono', ui-monospace, SFMono-Regular, monospace"
56
+ } as const;
57
+ export const fontSize = {
58
+ "xs": "0.75rem",
59
+ "sm": "0.875rem",
60
+ "base": "1rem",
61
+ "lg": "1.125rem",
62
+ "xl": "1.25rem",
63
+ "2xl": "1.5rem",
64
+ "3xl": "1.875rem",
65
+ "4xl": "2.25rem"
66
+ } as const;
67
+ export const fontWeight = {
68
+ "normal": 400,
69
+ "medium": 500,
70
+ "semibold": 600,
71
+ "bold": 700
72
+ } as const;
73
+ export const lineHeight = {
74
+ "tight": 1.25,
75
+ "snug": 1.375,
76
+ "normal": 1.5,
77
+ "relaxed": 1.625
78
+ } as const;
79
+ export const typography = { fontFamily, fontSize, fontWeight, lineHeight } as const;
80
+ export type FontFamily = keyof typeof fontFamily;
81
+ export type FontSize = keyof typeof fontSize;
82
+ export type FontWeight = keyof typeof fontWeight;
83
+ export type LineHeight = keyof typeof lineHeight;
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@encore-os/tokens",
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org",
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ "./tokens.css": "./dist/tokens.css",
14
+ ".": {
15
+ "types": "./dist/tokens.d.ts",
16
+ "import": "./dist/tokens.ts"
17
+ },
18
+ "./tokens.json": "./dist/tokens.json"
19
+ },
20
+ "scripts": {
21
+ "build": "bun run scripts/build.ts",
22
+ "parity": "bun run scripts/check-parity.ts",
23
+ "test": "vitest run",
24
+ "lint": "tsc --noEmit -p ."
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^24",
28
+ "style-dictionary": "^4.3.0"
29
+ }
30
+ }