@locusgraph/tokens 0.1.1 → 0.3.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/README.md CHANGED
@@ -14,17 +14,58 @@ pnpm add @locusgraph/tokens
14
14
 
15
15
  `@locusgraph/components/theme.css` already imports both; import tokens directly only in an app that does not use the components.
16
16
 
17
+ Everything the theme defines is prefixed with `locus`: variables are `--locus-*` (light on `:root`, dark on `.dark`) and our classes, utilities and keyframes are `locus-*`. The Tailwind keys keep their names (`bg-surface`, `text-soft`, `bg-primary`, `text-muted-foreground`), now pointing at `--locus-*`. An app that also uses shadcn components and needs the shadcn variable names (`--background`, `--primary`, `--muted-foreground`, `--radius`, …) adds the optional aliases:
18
+
19
+ ```css
20
+ @import "@locusgraph/tokens/shadcn.css";
21
+ ```
22
+
17
23
  ## What `theme.css` holds
18
24
 
19
- - Palette: one white (`--surface`, also `--background`), text, muted, status colors and a dark set under `.dark`.
20
- - Hairlines: `--border` is 13% of the text color mixed into the surface.
25
+ - Palette: one white (`--locus-surface`, also `--locus-background`), text, muted, status colors and a dark set under `.dark`.
26
+ - Hairlines: `--locus-border` is 13% of the text color mixed into the surface.
21
27
  - Square containers: every radius token is 0. Use `rounded-full` for pills.
22
28
  - Fonts: Inter for text, Archivo for headings and the brand, Fira Code for mono labels.
23
29
  - Base: 17px root size, tight balanced headings, `text-pretty` paragraphs.
24
- - Effects: `brand-grid` and `brand-grid-quiet` backgrounds, `enter-cascade`, `rises`, `shimmer`, `scroll-fade-x`, `no-scrollbar`. Motion falls back to a fade under reduced motion.
30
+ - Effects: `locus-brand-grid` and `locus-brand-grid-quiet` backgrounds, `locus-enter-cascade`, `locus-rises`, `locus-shimmer`, `locus-scroll-fade-b`, `locus-scroll-fade-x`, `locus-no-scrollbar`, `locus-scrollbar-none`, `locus-scrollbar-thin`, `locus-scrollbar-gutter-stable`, the `locus-eyebrow` label, `locus-ignites` and `locus-tracked`. Motion falls back to a fade under reduced motion.
25
31
 
26
32
  `typeset.css` styles long-form content inside `.typeset`; it is vendored from shadcn/typeset.
27
33
 
34
+ ## Migrating from 0.2
35
+
36
+ Every CSS variable, class, utility and keyframe the theme defines now starts with `locus`, so it
37
+ cannot clash with an app's own names (a shadcn app's `--muted` is a background, ours was a text
38
+ color). Tailwind classes such as `bg-surface`, `text-soft`, `text-good`, `bg-btn`, `shadow-overlay`,
39
+ `bg-primary` and `text-muted-foreground` are unchanged.
40
+
41
+ | 0.2 | 0.3 |
42
+ |---|---|
43
+ | `--background`, `--surface`, `--foreground`, `--border`, `--muted`, `--faint` | `--locus-background`, `--locus-surface`, `--locus-foreground`, `--locus-border`, `--locus-muted`, `--locus-faint` |
44
+ | `--btn`, `--btn-ink`, `--ghost`, `--popover`, `--popover-foreground`, `--input` | `--locus-btn`, `--locus-btn-ink`, `--locus-ghost`, `--locus-popover`, `--locus-popover-foreground`, `--locus-input` |
45
+ | `--s1` … `--s8`, `--good`, `--bad`, `--info`, `--warn` | `--locus-s1` … `--locus-s8`, `--locus-good`, `--locus-bad`, `--locus-info`, `--locus-warn` |
46
+ | `--skeleton`, `--scrim`, `--overlay-shadow`, `--radius` | `--locus-skeleton`, `--locus-scrim`, `--locus-overlay-shadow`, `--locus-radius` |
47
+ | `--sidebar`, `--sidebar-*`, `--chart-1` … `--chart-5` | `--locus-sidebar`, `--locus-sidebar-*`, `--locus-chart-1` … `--locus-chart-5` |
48
+ | `--font-inter`, `--font-archivo`, `--font-fira-code` | `--locus-font-inter`, `--locus-font-archivo`, `--locus-font-fira-code` |
49
+ | `--brand-glow`, `--brand-loop`, `--brand-grid-image`, `--brand-grid-size` | `--locus-brand-glow`, `--locus-brand-loop`, `--locus-brand-grid-image`, `--locus-brand-grid-size` |
50
+ | `--shimmer-spread`, `--shimmer-color`, `--shimmer-duration` | `--locus-shimmer-spread`, `--locus-shimmer-color`, `--locus-shimmer-duration` |
51
+ | `--scroll-fade-size`, `--scroll-fade-reveal` | `--locus-scroll-fade-size`, `--locus-scroll-fade-reveal` |
52
+ | `--docs-header-height` (Docs shell) | `--locus-docs-header-height` |
53
+ | `eyebrow`, `rises`, `shimmer` | `locus-eyebrow`, `locus-rises`, `locus-shimmer` |
54
+ | `no-scrollbar`, `scrollbar-none`, `scrollbar-thin`, `scrollbar-gutter-stable` | `locus-no-scrollbar`, `locus-scrollbar-none`, `locus-scrollbar-thin`, `locus-scrollbar-gutter-stable` |
55
+ | `scroll-fade-b`, `scroll-fade-x` | `locus-scroll-fade-b`, `locus-scroll-fade-x` |
56
+ | `.brand-grid`, `.brand-grid-quiet`, `.ignites`, `.tracked` | `.locus-brand-grid`, `.locus-brand-grid-quiet`, `.locus-ignites`, `.locus-tracked` |
57
+ | `.enter-cascade`, `.typeset-docs` | `.locus-enter-cascade`, `.locus-typeset-docs` |
58
+ | keyframes `rise`, `sweep`, `ink`, `tip`, `tick`, `breathe`, `ignite` | `locus-rise`, `locus-sweep`, `locus-ink`, `locus-tip`, `locus-tick`, `locus-breathe`, `locus-ignite` |
59
+ | keyframes `tw-shimmer`, `enter-rise`, `enter-fade`, `brand-grid-halo`, `scroll-fade-reveal-*` | `locus-shimmer`, `locus-enter-rise`, `locus-enter-fade`, `locus-brand-grid-halo`, `locus-scroll-fade-reveal-*` |
60
+
61
+ The theme no longer defines the shadcn names (`--background`, `--primary`, `--muted-foreground`,
62
+ `--ring`, `--radius` and the rest). An app that also uses its own shadcn components, or reads those
63
+ variables, imports the aliases after the theme:
64
+
65
+ ```css
66
+ @import "@locusgraph/components/shadcn.css";
67
+ ```
68
+
28
69
  ## Values
29
70
 
30
71
  ```ts
package/dist/base.css CHANGED
@@ -30,11 +30,11 @@ html {
30
30
  }
31
31
 
32
32
  body {
33
- background: var(--background);
34
- color: var(--foreground);
33
+ background: var(--locus-background);
34
+ color: var(--locus-foreground);
35
35
  }
36
36
 
37
- .typeset-docs {
37
+ .locus-typeset-docs {
38
38
  --typeset-font-body: var(--font-sans);
39
39
  --typeset-font-heading: var(--font-heading);
40
40
  --typeset-font-mono: var(--font-mono);
@@ -43,7 +43,7 @@ body {
43
43
  --typeset-flow: 1.25em;
44
44
  }
45
45
 
46
- @utility no-scrollbar {
46
+ @utility locus-no-scrollbar {
47
47
  scrollbar-width: none;
48
48
  -ms-overflow-style: none;
49
49
  &::-webkit-scrollbar {
@@ -60,6 +60,6 @@ body {
60
60
  }
61
61
 
62
62
  [data-rehype-pretty-code-figure] [data-highlighted-line] {
63
- background: var(--ghost);
64
- box-shadow: inset 2px 0 var(--line);
63
+ background: var(--locus-ghost);
64
+ box-shadow: inset 2px 0 var(--locus-border);
65
65
  }
@@ -1,49 +1,49 @@
1
1
  :root {
2
- --brand-glow: #0099ff;
3
- --brand-loop: 7s;
4
- --brand-grid-image:
5
- radial-gradient(circle, color-mix(in oklch, var(--foreground) 7%, transparent) 1.5px, transparent 1.5px),
6
- repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in oklch, var(--foreground) 3%, transparent) 23px 24px),
7
- repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in oklch, var(--foreground) 3%, transparent) 23px 24px);
8
- --brand-grid-size: 24px 24px, 24px 24px, 24px 24px;
2
+ --locus-brand-glow: #0099ff;
3
+ --locus-brand-loop: 7s;
4
+ --locus-brand-grid-image:
5
+ radial-gradient(circle, color-mix(in oklch, var(--locus-foreground) 7%, transparent) 1.5px, transparent 1.5px),
6
+ repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in oklch, var(--locus-foreground) 3%, transparent) 23px 24px),
7
+ repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in oklch, var(--locus-foreground) 3%, transparent) 23px 24px);
8
+ --locus-brand-grid-size: 24px 24px, 24px 24px, 24px 24px;
9
9
  }
10
10
 
11
- .brand-grid {
11
+ .locus-brand-grid {
12
12
  position: relative;
13
13
  isolation: isolate;
14
- background-color: var(--background);
14
+ background-color: var(--locus-background);
15
15
  }
16
16
 
17
- .brand-grid::before,
18
- .brand-grid::after {
17
+ .locus-brand-grid::before,
18
+ .locus-brand-grid::after {
19
19
  content: "";
20
20
  position: absolute;
21
21
  z-index: -1;
22
22
  pointer-events: none;
23
23
  }
24
24
 
25
- .brand-grid::before {
25
+ .locus-brand-grid::before {
26
26
  inset: 0;
27
- background-image: var(--brand-grid-image);
28
- background-size: var(--brand-grid-size);
27
+ background-image: var(--locus-brand-grid-image);
28
+ background-size: var(--locus-brand-grid-size);
29
29
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 18%, transparent 76%);
30
30
  mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 18%, transparent 76%);
31
31
  }
32
32
 
33
- .brand-grid::after {
33
+ .locus-brand-grid::after {
34
34
  left: 50%;
35
35
  top: 46%;
36
36
  width: min(44rem, 92vw);
37
37
  aspect-ratio: 1;
38
38
  transform: translate(-50%, -50%) scale(0.98);
39
39
  transform-origin: center;
40
- background: radial-gradient(circle, color-mix(in oklch, var(--brand-glow) 16%, transparent), transparent 62%);
40
+ background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow) 16%, transparent), transparent 62%);
41
41
  filter: blur(14px);
42
42
  opacity: 0.55;
43
- animation: brand-grid-halo var(--brand-loop) ease-in-out infinite;
43
+ animation: locus-brand-grid-halo var(--locus-brand-loop) ease-in-out infinite;
44
44
  }
45
45
 
46
- @keyframes brand-grid-halo {
46
+ @keyframes locus-brand-grid-halo {
47
47
  0%,
48
48
  46% {
49
49
  opacity: 0.5;
@@ -67,27 +67,27 @@
67
67
  }
68
68
  }
69
69
 
70
- .brand-grid-quiet {
70
+ .locus-brand-grid-quiet {
71
71
  position: relative;
72
72
  isolation: isolate;
73
- background-color: var(--background);
73
+ background-color: var(--locus-background);
74
74
  }
75
75
 
76
- .brand-grid-quiet::before {
76
+ .locus-brand-grid-quiet::before {
77
77
  content: "";
78
78
  position: absolute;
79
79
  inset: 0 0 auto;
80
80
  height: 40rem;
81
81
  z-index: -1;
82
82
  pointer-events: none;
83
- background-image: radial-gradient(circle, color-mix(in oklch, var(--foreground) 22%, transparent) 0.8px, transparent 1px);
83
+ background-image: radial-gradient(circle, color-mix(in oklch, var(--locus-foreground) 22%, transparent) 0.8px, transparent 1px);
84
84
  background-size: 16px 16px;
85
85
  background-position: 8px 8px;
86
86
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
87
87
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
88
88
  }
89
89
 
90
- .brand-grid-quiet::after {
90
+ .locus-brand-grid-quiet::after {
91
91
  content: "";
92
92
  position: absolute;
93
93
  z-index: -1;
@@ -97,11 +97,11 @@
97
97
  width: min(40rem, 70%);
98
98
  aspect-ratio: 1;
99
99
  transform: translate(-50%, -50%);
100
- background: radial-gradient(circle, color-mix(in oklch, var(--brand-glow) 9%, transparent), transparent 66%);
100
+ background: radial-gradient(circle, color-mix(in oklch, var(--locus-brand-glow) 9%, transparent), transparent 66%);
101
101
  opacity: 0.4;
102
102
  }
103
103
 
104
- @keyframes ignite {
104
+ @keyframes locus-ignite {
105
105
  0% {
106
106
  opacity: 0;
107
107
  transform: scale(0.4) rotate(-10deg);
@@ -110,32 +110,32 @@
110
110
  60% {
111
111
  opacity: 1;
112
112
  transform: scale(1.08) rotate(0deg);
113
- filter: blur(0) drop-shadow(0 0 16px var(--brand-glow));
113
+ filter: blur(0) drop-shadow(0 0 16px var(--locus-brand-glow));
114
114
  }
115
115
  100% {
116
116
  opacity: 1;
117
117
  transform: scale(1) rotate(0deg);
118
- filter: drop-shadow(0 0 7px color-mix(in oklch, var(--brand-glow) 55%, transparent));
118
+ filter: drop-shadow(0 0 7px color-mix(in oklch, var(--locus-brand-glow) 55%, transparent));
119
119
  }
120
120
  }
121
121
 
122
- .ignites {
123
- animation: ignite 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
122
+ .locus-ignites {
123
+ animation: locus-ignite 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
124
124
  }
125
125
 
126
- .tracked {
126
+ .locus-tracked {
127
127
  letter-spacing: 0.32em;
128
128
  text-transform: uppercase;
129
129
  font-size: 10px;
130
- color: color-mix(in oklch, var(--foreground) 55%, transparent);
130
+ color: color-mix(in oklch, var(--locus-foreground) 55%, transparent);
131
131
  }
132
132
 
133
133
  @media (prefers-reduced-motion: reduce) {
134
- .ignites {
134
+ .locus-ignites {
135
135
  animation: none;
136
136
  opacity: 1;
137
137
  }
138
- .brand-grid::after {
138
+ .locus-brand-grid::after {
139
139
  animation: none;
140
140
  opacity: 0.6;
141
141
  }
@@ -1,4 +1,4 @@
1
- @keyframes enter-rise {
1
+ @keyframes locus-enter-rise {
2
2
  from {
3
3
  opacity: 0;
4
4
  transform: translateY(6px);
@@ -6,31 +6,31 @@
6
6
  }
7
7
  }
8
8
 
9
- @keyframes enter-fade {
9
+ @keyframes locus-enter-fade {
10
10
  from {
11
11
  opacity: 0;
12
12
  }
13
13
  }
14
14
 
15
- .enter-cascade > * {
16
- animation: enter-rise 300ms cubic-bezier(0.23, 1, 0.32, 1) both;
15
+ .locus-enter-cascade > * {
16
+ animation: locus-enter-rise 300ms cubic-bezier(0.23, 1, 0.32, 1) both;
17
17
  }
18
18
 
19
- .enter-cascade > :nth-child(2) {
19
+ .locus-enter-cascade > :nth-child(2) {
20
20
  animation-delay: 50ms;
21
21
  }
22
22
 
23
- .enter-cascade > :nth-child(3) {
23
+ .locus-enter-cascade > :nth-child(3) {
24
24
  animation-delay: 100ms;
25
25
  }
26
26
 
27
- .enter-cascade > :nth-child(n + 4) {
27
+ .locus-enter-cascade > :nth-child(n + 4) {
28
28
  animation-delay: 150ms;
29
29
  }
30
30
 
31
31
  @media (prefers-reduced-motion: reduce) {
32
- .enter-cascade > * {
33
- animation: enter-fade 150ms ease-out both;
32
+ .locus-enter-cascade > * {
33
+ animation: locus-enter-fade 150ms ease-out both;
34
34
  animation-delay: 0ms;
35
35
  }
36
36
  }
@@ -1,4 +1,4 @@
1
- @keyframes rise {
1
+ @keyframes locus-rise {
2
2
  from {
3
3
  opacity: 0;
4
4
  transform: translateY(6px);
@@ -9,12 +9,12 @@
9
9
  }
10
10
  }
11
11
 
12
- @utility rises {
13
- animation: rise 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
12
+ @utility locus-rises {
13
+ animation: locus-rise 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
14
14
  }
15
15
 
16
16
  @media (prefers-reduced-motion: reduce) {
17
- @keyframes rise {
17
+ @keyframes locus-rise {
18
18
  from,
19
19
  to {
20
20
  opacity: 1;
@@ -23,7 +23,7 @@
23
23
  }
24
24
  }
25
25
 
26
- @keyframes sweep {
26
+ @keyframes locus-sweep {
27
27
  0%,
28
28
  100% {
29
29
  transform: translate(-1.5px, 0);
@@ -33,7 +33,7 @@
33
33
  }
34
34
  }
35
35
 
36
- @keyframes ink {
36
+ @keyframes locus-ink {
37
37
  0% {
38
38
  stroke-dashoffset: 22;
39
39
  }
@@ -43,7 +43,7 @@
43
43
  }
44
44
  }
45
45
 
46
- @keyframes tip {
46
+ @keyframes locus-tip {
47
47
  0%,
48
48
  100% {
49
49
  transform: rotate(-9deg);
@@ -53,7 +53,7 @@
53
53
  }
54
54
  }
55
55
 
56
- @keyframes tick {
56
+ @keyframes locus-tick {
57
57
  0%,
58
58
  100% {
59
59
  opacity: 0.25;
@@ -63,7 +63,7 @@
63
63
  }
64
64
  }
65
65
 
66
- @keyframes breathe {
66
+ @keyframes locus-breathe {
67
67
  0%,
68
68
  100% {
69
69
  transform: scale(0.9);
@@ -76,19 +76,19 @@
76
76
  }
77
77
 
78
78
  @media (prefers-reduced-motion: reduce) {
79
- @keyframes sweep {
79
+ @keyframes locus-sweep {
80
80
  }
81
- @keyframes tip {
81
+ @keyframes locus-tip {
82
82
  }
83
- @keyframes breathe {
83
+ @keyframes locus-breathe {
84
84
  }
85
- @keyframes tick {
85
+ @keyframes locus-tick {
86
86
  0%,
87
87
  100% {
88
88
  opacity: 1;
89
89
  }
90
90
  }
91
- @keyframes ink {
91
+ @keyframes locus-ink {
92
92
  0%,
93
93
  100% {
94
94
  stroke-dashoffset: 0;
@@ -1,76 +1,76 @@
1
- @property --scroll-fade-b {
1
+ @property --locus-scroll-fade-b {
2
2
  syntax: "<length-percentage>";
3
3
  inherits: false;
4
4
  initial-value: 0px;
5
5
  }
6
6
 
7
- @property --scroll-fade-s {
7
+ @property --locus-scroll-fade-s {
8
8
  syntax: "<length-percentage>";
9
9
  inherits: false;
10
10
  initial-value: 0px;
11
11
  }
12
12
 
13
- @property --scroll-fade-e {
13
+ @property --locus-scroll-fade-e {
14
14
  syntax: "<length-percentage>";
15
15
  inherits: false;
16
16
  initial-value: 0px;
17
17
  }
18
18
 
19
19
  @theme inline {
20
- @keyframes scroll-fade-reveal-b {
20
+ @keyframes locus-scroll-fade-reveal-b {
21
21
  from {
22
- --scroll-fade-b: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
22
+ --locus-scroll-fade-b: var(--locus-scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
23
23
  }
24
24
  to {
25
- --scroll-fade-b: 0px;
25
+ --locus-scroll-fade-b: 0px;
26
26
  }
27
27
  }
28
- @keyframes scroll-fade-reveal-s {
28
+ @keyframes locus-scroll-fade-reveal-s {
29
29
  from {
30
- --scroll-fade-s: 0px;
30
+ --locus-scroll-fade-s: 0px;
31
31
  }
32
32
  to {
33
- --scroll-fade-s: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
33
+ --locus-scroll-fade-s: var(--locus-scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
34
34
  }
35
35
  }
36
- @keyframes scroll-fade-reveal-e {
36
+ @keyframes locus-scroll-fade-reveal-e {
37
37
  from {
38
- --scroll-fade-e: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
38
+ --locus-scroll-fade-e: var(--locus-scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
39
39
  }
40
40
  to {
41
- --scroll-fade-e: 0px;
41
+ --locus-scroll-fade-e: 0px;
42
42
  }
43
43
  }
44
44
  }
45
45
 
46
- @utility scroll-fade-b {
47
- mask-image: linear-gradient(to bottom, #000 calc(100% - var(--scroll-fade-b, 0px)), transparent 100%);
46
+ @utility locus-scroll-fade-b {
47
+ mask-image: linear-gradient(to bottom, #000 calc(100% - var(--locus-scroll-fade-b, 0px)), transparent 100%);
48
48
  mask-repeat: no-repeat;
49
49
 
50
50
  @supports (animation-timeline: scroll()) {
51
- animation: scroll-fade-reveal-b 1ms ease-in-out both;
51
+ animation: locus-scroll-fade-reveal-b 1ms ease-in-out both;
52
52
  animation-timeline: scroll(self y);
53
- animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
53
+ animation-range: calc(100% - var(--locus-scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
54
54
  }
55
55
  }
56
56
 
57
- @utility scroll-fade-x {
57
+ @utility locus-scroll-fade-x {
58
58
  mask-image: linear-gradient(
59
59
  to right,
60
60
  transparent 0,
61
- #000 var(--scroll-fade-s, 0px),
62
- #000 calc(100% - var(--scroll-fade-e, 0px)),
61
+ #000 var(--locus-scroll-fade-s, 0px),
62
+ #000 calc(100% - var(--locus-scroll-fade-e, 0px)),
63
63
  transparent 100%
64
64
  );
65
65
  mask-repeat: no-repeat;
66
66
 
67
67
  @supports (animation-timeline: scroll()) {
68
68
  animation:
69
- scroll-fade-reveal-s 1ms ease-in-out both,
70
- scroll-fade-reveal-e 1ms ease-in-out both;
69
+ locus-scroll-fade-reveal-s 1ms ease-in-out both,
70
+ locus-scroll-fade-reveal-e 1ms ease-in-out both;
71
71
  animation-timeline: scroll(self inline), scroll(self inline);
72
72
  animation-range:
73
- 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
74
- calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
73
+ 0 var(--locus-scroll-fade-reveal, calc(var(--spacing) * 24)),
74
+ calc(100% - var(--locus-scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
75
75
  }
76
76
  }
@@ -1,5 +1,5 @@
1
1
  @theme inline {
2
- @keyframes tw-shimmer {
2
+ @keyframes locus-shimmer {
3
3
  from {
4
4
  background-position: 100% 0;
5
5
  }
@@ -9,10 +9,10 @@
9
9
  }
10
10
  }
11
11
 
12
- @utility shimmer {
13
- --_spread: var(--shimmer-spread, calc(3ch + 40px));
12
+ @utility locus-shimmer {
13
+ --_spread: var(--locus-shimmer-spread, calc(3ch + 40px));
14
14
  --_base: currentColor;
15
- --_highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha * 0.2)));
15
+ --_highlight: var(--locus-shimmer-color, oklch(from currentColor l c h / calc(alpha * 0.2)));
16
16
  background-image: linear-gradient(
17
17
  90deg,
18
18
  var(--_base) calc(50% - var(--_spread)),
@@ -26,10 +26,10 @@
26
26
  background-clip: text;
27
27
  -webkit-background-clip: text;
28
28
  -webkit-text-fill-color: transparent;
29
- animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
29
+ animation: locus-shimmer var(--locus-shimmer-duration, 2s) linear infinite;
30
30
 
31
31
  @variant dark {
32
- --_highlight: var(--shimmer-color, oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4)));
32
+ --_highlight: var(--locus-shimmer-color, oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4)));
33
33
  }
34
34
 
35
35
  @media (prefers-reduced-motion: reduce) {
@@ -39,7 +39,7 @@
39
39
  }
40
40
  }
41
41
 
42
- @utility scrollbar-none {
42
+ @utility locus-scrollbar-none {
43
43
  scrollbar-width: none;
44
44
 
45
45
  &::-webkit-scrollbar {
@@ -47,10 +47,19 @@
47
47
  }
48
48
  }
49
49
 
50
- @utility scrollbar-thin {
50
+ @utility locus-scrollbar-thin {
51
51
  scrollbar-width: thin;
52
52
  }
53
53
 
54
- @utility scrollbar-gutter-stable {
54
+ @utility locus-scrollbar-gutter-stable {
55
55
  scrollbar-gutter: stable;
56
56
  }
57
+
58
+ @utility locus-eyebrow {
59
+ font-family: var(--font-mono);
60
+ font-size: 11px;
61
+ line-height: 1rem;
62
+ letter-spacing: 0.05em;
63
+ text-transform: uppercase;
64
+ color: var(--locus-muted);
65
+ }
package/dist/theme.css CHANGED
@@ -1,8 +1,8 @@
1
1
  @import "@fontsource-variable/inter";
2
2
  @import "@fontsource-variable/archivo";
3
3
  @import "@fontsource-variable/fira-code";
4
- @import "./palette.css";
5
- @import "./mapping.css";
4
+ @import "./variables/palette.css";
5
+ @import "./variables/mapping.css";
6
6
  @import "./base.css";
7
7
  @import "./effects/keyframes.css";
8
8
  @import "./effects/utilities.css";
package/dist/typeset.css CHANGED
@@ -1 +1,5 @@
1
1
  @import "./vendor/typeset.css";
2
+
3
+ .typeset {
4
+ --radius: var(--locus-radius);
5
+ }
@@ -1,6 +1,6 @@
1
- export type ColorName = "surface" | "foreground" | "muted" | "faint" | "btn" | "btnInk" | "ghost" | "good" | "bad" | "info" | "warn" | "brandGlow";
1
+ export type ColorName = "surface" | "background" | "foreground" | "muted" | "faint" | "btn" | "btnInk" | "ghost" | "good" | "bad" | "info" | "warn" | "brandGlow";
2
2
  export type Palette = Record<ColorName, string>;
3
3
  export declare const lightColors: Palette;
4
4
  export declare const darkColors: Palette;
5
- export declare const hairlineMix = 0.13;
5
+ export declare const hairlineMix = 0.09;
6
6
  export declare function hairline(palette: Palette): string;
@@ -1,5 +1,6 @@
1
1
  export const lightColors = {
2
2
  surface: "#ffffff",
3
+ background: "#fafafa",
3
4
  foreground: "#09090b",
4
5
  muted: "#71717a",
5
6
  faint: "#a1a1aa",
@@ -13,7 +14,8 @@ export const lightColors = {
13
14
  brandGlow: "#0099ff",
14
15
  };
15
16
  export const darkColors = {
16
- surface: "#101011",
17
+ surface: "#111113",
18
+ background: "#0c0c0d",
17
19
  foreground: "#ededed",
18
20
  muted: "#a1a1aa",
19
21
  faint: "#71717a",
@@ -26,7 +28,7 @@ export const darkColors = {
26
28
  warn: "#e0a400",
27
29
  brandGlow: "#0099ff",
28
30
  };
29
- export const hairlineMix = 0.13;
31
+ export const hairlineMix = 0.09;
30
32
  export function hairline(palette) {
31
33
  return mixHex(palette.foreground, palette.surface, hairlineMix);
32
34
  }
@@ -0,0 +1,60 @@
1
+ @custom-variant dark (&:is(.dark *));
2
+
3
+ @theme inline {
4
+ --color-background: var(--locus-background);
5
+ --color-surface: var(--locus-surface);
6
+ --color-line: var(--locus-border);
7
+ --color-foreground: var(--locus-foreground);
8
+ --color-soft: var(--locus-muted);
9
+ --color-faint: var(--locus-faint);
10
+ --color-btn: var(--locus-btn);
11
+ --color-btn-ink: var(--locus-btn-ink);
12
+ --color-ghost: var(--locus-ghost);
13
+ --color-s1: var(--locus-s1);
14
+ --color-s2: var(--locus-s2);
15
+ --color-s3: var(--locus-s3);
16
+ --color-good: var(--locus-good);
17
+ --color-bad: var(--locus-bad);
18
+ --color-info: var(--locus-info);
19
+ --color-warn: var(--locus-warn);
20
+ --color-border: var(--locus-border);
21
+ --color-input: var(--locus-input);
22
+ --color-skeleton: var(--locus-skeleton);
23
+ --color-scrim: var(--locus-scrim);
24
+ --color-ring: var(--locus-s1);
25
+ --color-primary: var(--locus-btn);
26
+ --color-primary-foreground: var(--locus-btn-ink);
27
+ --color-secondary: var(--locus-ghost);
28
+ --color-secondary-foreground: var(--locus-foreground);
29
+ --color-accent: var(--locus-ghost);
30
+ --color-accent-foreground: var(--locus-foreground);
31
+ --color-muted: var(--locus-ghost);
32
+ --color-muted-foreground: var(--locus-muted);
33
+ --color-popover: var(--locus-popover);
34
+ --color-popover-foreground: var(--locus-foreground);
35
+ --color-card: var(--locus-surface);
36
+ --color-card-foreground: var(--locus-foreground);
37
+ --color-destructive: var(--locus-bad);
38
+ --color-destructive-foreground: #ffffff;
39
+ --color-sidebar: var(--locus-sidebar);
40
+ --color-sidebar-foreground: var(--locus-sidebar-foreground);
41
+ --color-sidebar-primary: var(--locus-sidebar-primary);
42
+ --color-sidebar-primary-foreground: var(--locus-sidebar-primary-foreground);
43
+ --color-sidebar-accent: var(--locus-sidebar-accent);
44
+ --color-sidebar-accent-foreground: var(--locus-sidebar-accent-foreground);
45
+ --color-sidebar-border: var(--locus-sidebar-border);
46
+ --color-sidebar-ring: var(--locus-sidebar-ring);
47
+ --font-sans: var(--locus-font-inter);
48
+ --font-heading: var(--locus-font-archivo);
49
+ --font-mono: var(--locus-font-fira-code);
50
+ --font-brand: var(--locus-font-archivo);
51
+ --shadow-overlay: var(--locus-overlay-shadow);
52
+ --radius-xs: 0px;
53
+ --radius-sm: 0px;
54
+ --radius-md: 0px;
55
+ --radius-lg: 0px;
56
+ --radius-xl: 0px;
57
+ --radius-2xl: 0px;
58
+ --radius-3xl: 0px;
59
+ --radius-4xl: 0px;
60
+ }
@@ -0,0 +1,75 @@
1
+ :root {
2
+ --locus-surface: #ffffff;
3
+ --locus-background: #fafafa;
4
+ --locus-foreground: #09090b;
5
+ --locus-border: color-mix(in oklch, var(--locus-foreground) 9%, var(--locus-surface));
6
+ --locus-muted: #71717a;
7
+ --locus-faint: #a1a1aa;
8
+ --locus-btn: #18181b;
9
+ --locus-btn-ink: #fafafa;
10
+ --locus-ghost: #f4f4f5;
11
+ --locus-s1: #2a78d6;
12
+ --locus-s2: #eb6834;
13
+ --locus-s3: #1baf7a;
14
+ --locus-s4: #eda100;
15
+ --locus-s5: #e87ba4;
16
+ --locus-s6: #008300;
17
+ --locus-s7: #4a3aa7;
18
+ --locus-s8: #e34948;
19
+ --locus-good: #006300;
20
+ --locus-bad: #d03b3b;
21
+ --locus-info: #1f6fd1;
22
+ --locus-warn: #a15c00;
23
+ --locus-popover: var(--locus-surface);
24
+ --locus-input: color-mix(in oklch, var(--locus-foreground) 26%, var(--locus-surface));
25
+ --locus-skeleton: color-mix(in oklch, var(--locus-foreground) 9%, var(--locus-surface));
26
+ --locus-scrim: rgb(0 0 0 / 0.28);
27
+ --locus-overlay-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 28px -6px rgb(0 0 0 / 0.16);
28
+ --locus-popover-foreground: var(--locus-foreground);
29
+ --locus-radius: 0px;
30
+ --locus-sidebar: var(--locus-surface);
31
+ --locus-sidebar-foreground: var(--locus-foreground);
32
+ --locus-sidebar-primary: var(--locus-btn);
33
+ --locus-sidebar-primary-foreground: var(--locus-btn-ink);
34
+ --locus-sidebar-accent: var(--locus-ghost);
35
+ --locus-sidebar-accent-foreground: var(--locus-foreground);
36
+ --locus-sidebar-border: var(--locus-border);
37
+ --locus-sidebar-ring: var(--locus-s1);
38
+ --locus-font-inter: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
39
+ --locus-font-archivo: "Archivo Variable", ui-sans-serif, system-ui, sans-serif;
40
+ --locus-font-fira-code: "Fira Code Variable", ui-monospace, monospace;
41
+ --locus-chart-1: var(--color-blue-300);
42
+ --locus-chart-2: var(--color-blue-500);
43
+ --locus-chart-3: var(--color-blue-600);
44
+ --locus-chart-4: var(--color-blue-700);
45
+ --locus-chart-5: var(--color-blue-800);
46
+ }
47
+
48
+ .dark {
49
+ --locus-surface: #111113;
50
+ --locus-background: #0c0c0d;
51
+ --locus-foreground: #ededed;
52
+ --locus-border: color-mix(in oklch, var(--locus-foreground) 10%, var(--locus-surface));
53
+ --locus-muted: #a1a1aa;
54
+ --locus-faint: #71717a;
55
+ --locus-btn: #ededed;
56
+ --locus-btn-ink: #0a0a0a;
57
+ --locus-ghost: #1b1b1d;
58
+ --locus-s1: #3987e5;
59
+ --locus-s2: #d95926;
60
+ --locus-s3: #199e70;
61
+ --locus-s4: #c98500;
62
+ --locus-s5: #d55181;
63
+ --locus-s6: #008300;
64
+ --locus-s7: #9085e9;
65
+ --locus-s8: #e66767;
66
+ --locus-good: #0ca30c;
67
+ --locus-bad: #e66767;
68
+ --locus-info: #5b9df0;
69
+ --locus-warn: #e0a400;
70
+ --locus-input: color-mix(in oklch, var(--locus-foreground) 24%, var(--locus-surface));
71
+ --locus-skeleton: color-mix(in oklch, var(--locus-foreground) 11%, var(--locus-surface));
72
+ --locus-popover: #18181a;
73
+ --locus-scrim: rgb(0 0 0 / 0.62);
74
+ --locus-overlay-shadow: 0 0 0 1px rgb(255 255 255 / 0.04), 0 16px 40px -8px rgb(0 0 0 / 0.7);
75
+ }
@@ -0,0 +1,35 @@
1
+ :root,
2
+ .dark {
3
+ --background: var(--locus-background);
4
+ --foreground: var(--locus-foreground);
5
+ --card: var(--locus-surface);
6
+ --card-foreground: var(--locus-foreground);
7
+ --popover: var(--locus-popover);
8
+ --popover-foreground: var(--locus-popover-foreground);
9
+ --primary: var(--locus-btn);
10
+ --primary-foreground: var(--locus-btn-ink);
11
+ --secondary: var(--locus-ghost);
12
+ --secondary-foreground: var(--locus-foreground);
13
+ --muted: var(--locus-ghost);
14
+ --muted-foreground: var(--locus-muted);
15
+ --accent: var(--locus-ghost);
16
+ --accent-foreground: var(--locus-foreground);
17
+ --destructive: var(--locus-bad);
18
+ --border: var(--locus-border);
19
+ --input: var(--locus-input);
20
+ --ring: var(--locus-s1);
21
+ --radius: var(--locus-radius);
22
+ --sidebar: var(--locus-sidebar);
23
+ --sidebar-foreground: var(--locus-sidebar-foreground);
24
+ --sidebar-primary: var(--locus-sidebar-primary);
25
+ --sidebar-primary-foreground: var(--locus-sidebar-primary-foreground);
26
+ --sidebar-accent: var(--locus-sidebar-accent);
27
+ --sidebar-accent-foreground: var(--locus-sidebar-accent-foreground);
28
+ --sidebar-border: var(--locus-sidebar-border);
29
+ --sidebar-ring: var(--locus-sidebar-ring);
30
+ --chart-1: var(--locus-chart-1);
31
+ --chart-2: var(--locus-chart-2);
32
+ --chart-3: var(--locus-chart-3);
33
+ --chart-4: var(--locus-chart-4);
34
+ --chart-5: var(--locus-chart-5);
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusgraph/tokens",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "LocusGraph design tokens: theme CSS for Tailwind v4, typography, brand effects and motion, plus the color and type values for places CSS cannot reach.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,7 +22,8 @@
22
22
  "default": "./dist/values/index.js"
23
23
  },
24
24
  "./theme.css": "./dist/theme.css",
25
- "./typeset.css": "./dist/typeset.css"
25
+ "./typeset.css": "./dist/typeset.css",
26
+ "./shadcn.css": "./dist/variables/shadcn.css"
26
27
  },
27
28
  "publishConfig": {
28
29
  "registry": "https://registry.npmjs.org",
@@ -35,7 +36,7 @@
35
36
  "@fontsource-variable/inter": "^5.3.0"
36
37
  },
37
38
  "devDependencies": {
38
- "@locusgraph/config": "0.1.0",
39
+ "@locusgraph/config": "0.1.1",
39
40
  "@types/node": "^22.0.0",
40
41
  "typescript": "^7.0.2",
41
42
  "vitest": "^5.0.3"
package/dist/mapping.css DELETED
@@ -1,57 +0,0 @@
1
- @custom-variant dark (&:is(.dark *));
2
-
3
- @theme inline {
4
- --color-background: var(--background);
5
- --color-surface: var(--surface);
6
- --color-line: var(--border);
7
- --color-foreground: var(--foreground);
8
- --color-soft: var(--muted);
9
- --color-faint: var(--faint);
10
- --color-btn: var(--btn);
11
- --color-btn-ink: var(--btn-ink);
12
- --color-ghost: var(--ghost);
13
- --color-s1: var(--s1);
14
- --color-s2: var(--s2);
15
- --color-s3: var(--s3);
16
- --color-good: var(--good);
17
- --color-bad: var(--bad);
18
- --color-info: var(--info);
19
- --color-warn: var(--warn);
20
- --color-border: var(--border);
21
- --color-input: var(--border);
22
- --color-ring: var(--s1);
23
- --color-primary: var(--btn);
24
- --color-primary-foreground: var(--btn-ink);
25
- --color-secondary: var(--ghost);
26
- --color-secondary-foreground: var(--foreground);
27
- --color-accent: var(--ghost);
28
- --color-accent-foreground: var(--foreground);
29
- --color-muted: var(--ghost);
30
- --color-muted-foreground: var(--muted);
31
- --color-popover: var(--surface);
32
- --color-popover-foreground: var(--foreground);
33
- --color-card: var(--surface);
34
- --color-card-foreground: var(--foreground);
35
- --color-destructive: var(--bad);
36
- --color-destructive-foreground: #ffffff;
37
- --color-sidebar: var(--sidebar);
38
- --color-sidebar-foreground: var(--sidebar-foreground);
39
- --color-sidebar-primary: var(--sidebar-primary);
40
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
41
- --color-sidebar-accent: var(--sidebar-accent);
42
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
43
- --color-sidebar-border: var(--sidebar-border);
44
- --color-sidebar-ring: var(--sidebar-ring);
45
- --font-sans: var(--font-inter);
46
- --font-heading: var(--font-archivo);
47
- --font-mono: var(--font-fira-code);
48
- --font-brand: var(--font-archivo);
49
- --radius-xs: 0px;
50
- --radius-sm: 0px;
51
- --radius-md: 0px;
52
- --radius-lg: 0px;
53
- --radius-xl: 0px;
54
- --radius-2xl: 0px;
55
- --radius-3xl: 0px;
56
- --radius-4xl: 0px;
57
- }
package/dist/palette.css DELETED
@@ -1,66 +0,0 @@
1
- :root {
2
- --surface: #ffffff;
3
- --background: var(--surface);
4
- --foreground: #09090b;
5
- --border: color-mix(in oklch, var(--foreground) 13%, var(--surface));
6
- --muted: #71717a;
7
- --faint: #a1a1aa;
8
- --btn: #18181b;
9
- --btn-ink: #fafafa;
10
- --ghost: #f4f4f5;
11
- --s1: #2a78d6;
12
- --s2: #eb6834;
13
- --s3: #1baf7a;
14
- --s4: #eda100;
15
- --s5: #e87ba4;
16
- --s6: #008300;
17
- --s7: #4a3aa7;
18
- --s8: #e34948;
19
- --good: #006300;
20
- --bad: #d03b3b;
21
- --info: #1f6fd1;
22
- --warn: #a15c00;
23
- --popover: var(--surface);
24
- --popover-foreground: var(--foreground);
25
- --radius: 0px;
26
- --sidebar: var(--surface);
27
- --sidebar-foreground: var(--foreground);
28
- --sidebar-primary: var(--btn);
29
- --sidebar-primary-foreground: var(--btn-ink);
30
- --sidebar-accent: var(--ghost);
31
- --sidebar-accent-foreground: var(--foreground);
32
- --sidebar-border: var(--border);
33
- --sidebar-ring: var(--s1);
34
- --font-inter: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
35
- --font-archivo: "Archivo Variable", ui-sans-serif, system-ui, sans-serif;
36
- --font-fira-code: "Fira Code Variable", ui-monospace, monospace;
37
- --chart-1: var(--color-blue-300);
38
- --chart-2: var(--color-blue-500);
39
- --chart-3: var(--color-blue-600);
40
- --chart-4: var(--color-blue-700);
41
- --chart-5: var(--color-blue-800);
42
- }
43
-
44
- .dark {
45
- --surface: #101011;
46
- --background: var(--surface);
47
- --foreground: #ededed;
48
- --border: color-mix(in oklch, var(--foreground) 13%, var(--surface));
49
- --muted: #a1a1aa;
50
- --faint: #71717a;
51
- --btn: #ededed;
52
- --btn-ink: #0a0a0a;
53
- --ghost: #1b1b1d;
54
- --s1: #3987e5;
55
- --s2: #d95926;
56
- --s3: #199e70;
57
- --s4: #c98500;
58
- --s5: #d55181;
59
- --s6: #008300;
60
- --s7: #9085e9;
61
- --s8: #e66767;
62
- --good: #0ca30c;
63
- --bad: #e66767;
64
- --info: #5b9df0;
65
- --warn: #e0a400;
66
- }