@locusgraph/tokens 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/base.css +65 -0
- package/dist/effects/brand.css +142 -0
- package/dist/effects/enter.css +36 -0
- package/dist/effects/keyframes.css +97 -0
- package/dist/effects/scroll-fade.css +76 -0
- package/dist/effects/utilities.css +56 -0
- package/dist/mapping.css +57 -0
- package/dist/palette.css +66 -0
- package/dist/theme.css +11 -0
- package/dist/typeset.css +1 -0
- package/dist/values/colors.d.ts +6 -0
- package/dist/values/colors.js +37 -0
- package/dist/values/index.d.ts +2 -0
- package/dist/values/index.js +2 -0
- package/dist/values/type.d.ts +13 -0
- package/dist/values/type.js +10 -0
- package/dist/vendor/typeset.css +490 -0
- package/package.json +45 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LocusGraph
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @locusgraph/tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The LocusGraph theme for Tailwind CSS 4, and the same values as TypeScript for places CSS cannot reach, such as email.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @locusgraph/tokens
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```css
|
|
10
|
+
@import "tailwindcss";
|
|
11
|
+
@import "@locusgraph/tokens/theme.css";
|
|
12
|
+
@import "@locusgraph/tokens/typeset.css";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`@locusgraph/components/theme.css` already imports both; import tokens directly only in an app that does not use the components.
|
|
16
|
+
|
|
17
|
+
## What `theme.css` holds
|
|
18
|
+
|
|
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.
|
|
21
|
+
- Square containers: every radius token is 0. Use `rounded-full` for pills.
|
|
22
|
+
- Fonts: Inter for text, Archivo for headings and the brand, Fira Code for mono labels.
|
|
23
|
+
- 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.
|
|
25
|
+
|
|
26
|
+
`typeset.css` styles long-form content inside `.typeset`; it is vendored from shadcn/typeset.
|
|
27
|
+
|
|
28
|
+
## Values
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { darkColors, fonts, hairline, lightColors, radius } from "@locusgraph/tokens";
|
|
32
|
+
|
|
33
|
+
hairline(lightColors);
|
|
34
|
+
```
|
package/dist/base.css
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@layer base {
|
|
2
|
+
* {
|
|
3
|
+
@apply border-border outline-ring/50;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
font-family: var(--font-sans);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(code, pre, kbd, samp) {
|
|
11
|
+
font-variant-ligatures: none;
|
|
12
|
+
font-feature-settings:
|
|
13
|
+
"liga" 0,
|
|
14
|
+
"calt" 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(h1, h2, h3) {
|
|
18
|
+
font-family: var(--font-heading);
|
|
19
|
+
letter-spacing: -0.02em;
|
|
20
|
+
text-wrap: balance;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(p) {
|
|
24
|
+
text-wrap: pretty;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
html {
|
|
29
|
+
font-size: 17px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
body {
|
|
33
|
+
background: var(--background);
|
|
34
|
+
color: var(--foreground);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.typeset-docs {
|
|
38
|
+
--typeset-font-body: var(--font-sans);
|
|
39
|
+
--typeset-font-heading: var(--font-heading);
|
|
40
|
+
--typeset-font-mono: var(--font-mono);
|
|
41
|
+
--typeset-size: 15px;
|
|
42
|
+
--typeset-leading: 1.75;
|
|
43
|
+
--typeset-flow: 1.25em;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@utility no-scrollbar {
|
|
47
|
+
scrollbar-width: none;
|
|
48
|
+
-ms-overflow-style: none;
|
|
49
|
+
&::-webkit-scrollbar {
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-rehype-pretty-code-figure] code span {
|
|
55
|
+
color: var(--shiki-light);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dark [data-rehype-pretty-code-figure] code span {
|
|
59
|
+
color: var(--shiki-dark);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-rehype-pretty-code-figure] [data-highlighted-line] {
|
|
63
|
+
background: var(--ghost);
|
|
64
|
+
box-shadow: inset 2px 0 var(--line);
|
|
65
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.brand-grid {
|
|
12
|
+
position: relative;
|
|
13
|
+
isolation: isolate;
|
|
14
|
+
background-color: var(--background);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.brand-grid::before,
|
|
18
|
+
.brand-grid::after {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
z-index: -1;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.brand-grid::before {
|
|
26
|
+
inset: 0;
|
|
27
|
+
background-image: var(--brand-grid-image);
|
|
28
|
+
background-size: var(--brand-grid-size);
|
|
29
|
+
-webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 18%, transparent 76%);
|
|
30
|
+
mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000 18%, transparent 76%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.brand-grid::after {
|
|
34
|
+
left: 50%;
|
|
35
|
+
top: 46%;
|
|
36
|
+
width: min(44rem, 92vw);
|
|
37
|
+
aspect-ratio: 1;
|
|
38
|
+
transform: translate(-50%, -50%) scale(0.98);
|
|
39
|
+
transform-origin: center;
|
|
40
|
+
background: radial-gradient(circle, color-mix(in oklch, var(--brand-glow) 16%, transparent), transparent 62%);
|
|
41
|
+
filter: blur(14px);
|
|
42
|
+
opacity: 0.55;
|
|
43
|
+
animation: brand-grid-halo var(--brand-loop) ease-in-out infinite;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes brand-grid-halo {
|
|
47
|
+
0%,
|
|
48
|
+
46% {
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
transform: translate(-50%, -50%) scale(0.98);
|
|
51
|
+
}
|
|
52
|
+
60% {
|
|
53
|
+
opacity: 0.86;
|
|
54
|
+
transform: translate(-50%, -50%) scale(1.03);
|
|
55
|
+
}
|
|
56
|
+
66% {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
transform: translate(-50%, -50%) scale(1.07);
|
|
59
|
+
}
|
|
60
|
+
80% {
|
|
61
|
+
opacity: 0.72;
|
|
62
|
+
transform: translate(-50%, -50%) scale(1.02);
|
|
63
|
+
}
|
|
64
|
+
100% {
|
|
65
|
+
opacity: 0.5;
|
|
66
|
+
transform: translate(-50%, -50%) scale(0.98);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.brand-grid-quiet {
|
|
71
|
+
position: relative;
|
|
72
|
+
isolation: isolate;
|
|
73
|
+
background-color: var(--background);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.brand-grid-quiet::before {
|
|
77
|
+
content: "";
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0 0 auto;
|
|
80
|
+
height: 40rem;
|
|
81
|
+
z-index: -1;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
background-image: radial-gradient(circle, color-mix(in oklch, var(--foreground) 22%, transparent) 0.8px, transparent 1px);
|
|
84
|
+
background-size: 16px 16px;
|
|
85
|
+
background-position: 8px 8px;
|
|
86
|
+
-webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
|
|
87
|
+
mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 75%);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.brand-grid-quiet::after {
|
|
91
|
+
content: "";
|
|
92
|
+
position: absolute;
|
|
93
|
+
z-index: -1;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
left: 50%;
|
|
96
|
+
top: min(34%, 18rem);
|
|
97
|
+
width: min(40rem, 70%);
|
|
98
|
+
aspect-ratio: 1;
|
|
99
|
+
transform: translate(-50%, -50%);
|
|
100
|
+
background: radial-gradient(circle, color-mix(in oklch, var(--brand-glow) 9%, transparent), transparent 66%);
|
|
101
|
+
opacity: 0.4;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes ignite {
|
|
105
|
+
0% {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
transform: scale(0.4) rotate(-10deg);
|
|
108
|
+
filter: blur(4px);
|
|
109
|
+
}
|
|
110
|
+
60% {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
transform: scale(1.08) rotate(0deg);
|
|
113
|
+
filter: blur(0) drop-shadow(0 0 16px var(--brand-glow));
|
|
114
|
+
}
|
|
115
|
+
100% {
|
|
116
|
+
opacity: 1;
|
|
117
|
+
transform: scale(1) rotate(0deg);
|
|
118
|
+
filter: drop-shadow(0 0 7px color-mix(in oklch, var(--brand-glow) 55%, transparent));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ignites {
|
|
123
|
+
animation: ignite 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.tracked {
|
|
127
|
+
letter-spacing: 0.32em;
|
|
128
|
+
text-transform: uppercase;
|
|
129
|
+
font-size: 10px;
|
|
130
|
+
color: color-mix(in oklch, var(--foreground) 55%, transparent);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (prefers-reduced-motion: reduce) {
|
|
134
|
+
.ignites {
|
|
135
|
+
animation: none;
|
|
136
|
+
opacity: 1;
|
|
137
|
+
}
|
|
138
|
+
.brand-grid::after {
|
|
139
|
+
animation: none;
|
|
140
|
+
opacity: 0.6;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@keyframes enter-rise {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
transform: translateY(6px);
|
|
5
|
+
filter: blur(2px);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@keyframes enter-fade {
|
|
10
|
+
from {
|
|
11
|
+
opacity: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.enter-cascade > * {
|
|
16
|
+
animation: enter-rise 300ms cubic-bezier(0.23, 1, 0.32, 1) both;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.enter-cascade > :nth-child(2) {
|
|
20
|
+
animation-delay: 50ms;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.enter-cascade > :nth-child(3) {
|
|
24
|
+
animation-delay: 100ms;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.enter-cascade > :nth-child(n + 4) {
|
|
28
|
+
animation-delay: 150ms;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (prefers-reduced-motion: reduce) {
|
|
32
|
+
.enter-cascade > * {
|
|
33
|
+
animation: enter-fade 150ms ease-out both;
|
|
34
|
+
animation-delay: 0ms;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@keyframes rise {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
transform: translateY(6px);
|
|
5
|
+
}
|
|
6
|
+
to {
|
|
7
|
+
opacity: 1;
|
|
8
|
+
transform: none;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@utility rises {
|
|
13
|
+
animation: rise 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-reduced-motion: reduce) {
|
|
17
|
+
@keyframes rise {
|
|
18
|
+
from,
|
|
19
|
+
to {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
transform: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes sweep {
|
|
27
|
+
0%,
|
|
28
|
+
100% {
|
|
29
|
+
transform: translate(-1.5px, 0);
|
|
30
|
+
}
|
|
31
|
+
50% {
|
|
32
|
+
transform: translate(1.5px, -1px);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes ink {
|
|
37
|
+
0% {
|
|
38
|
+
stroke-dashoffset: 22;
|
|
39
|
+
}
|
|
40
|
+
55%,
|
|
41
|
+
100% {
|
|
42
|
+
stroke-dashoffset: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes tip {
|
|
47
|
+
0%,
|
|
48
|
+
100% {
|
|
49
|
+
transform: rotate(-9deg);
|
|
50
|
+
}
|
|
51
|
+
50% {
|
|
52
|
+
transform: rotate(9deg);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes tick {
|
|
57
|
+
0%,
|
|
58
|
+
100% {
|
|
59
|
+
opacity: 0.25;
|
|
60
|
+
}
|
|
61
|
+
40% {
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes breathe {
|
|
67
|
+
0%,
|
|
68
|
+
100% {
|
|
69
|
+
transform: scale(0.9);
|
|
70
|
+
opacity: 0.55;
|
|
71
|
+
}
|
|
72
|
+
50% {
|
|
73
|
+
transform: scale(1.05);
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (prefers-reduced-motion: reduce) {
|
|
79
|
+
@keyframes sweep {
|
|
80
|
+
}
|
|
81
|
+
@keyframes tip {
|
|
82
|
+
}
|
|
83
|
+
@keyframes breathe {
|
|
84
|
+
}
|
|
85
|
+
@keyframes tick {
|
|
86
|
+
0%,
|
|
87
|
+
100% {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
@keyframes ink {
|
|
92
|
+
0%,
|
|
93
|
+
100% {
|
|
94
|
+
stroke-dashoffset: 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@property --scroll-fade-b {
|
|
2
|
+
syntax: "<length-percentage>";
|
|
3
|
+
inherits: false;
|
|
4
|
+
initial-value: 0px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@property --scroll-fade-s {
|
|
8
|
+
syntax: "<length-percentage>";
|
|
9
|
+
inherits: false;
|
|
10
|
+
initial-value: 0px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@property --scroll-fade-e {
|
|
14
|
+
syntax: "<length-percentage>";
|
|
15
|
+
inherits: false;
|
|
16
|
+
initial-value: 0px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@theme inline {
|
|
20
|
+
@keyframes scroll-fade-reveal-b {
|
|
21
|
+
from {
|
|
22
|
+
--scroll-fade-b: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
|
|
23
|
+
}
|
|
24
|
+
to {
|
|
25
|
+
--scroll-fade-b: 0px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
@keyframes scroll-fade-reveal-s {
|
|
29
|
+
from {
|
|
30
|
+
--scroll-fade-s: 0px;
|
|
31
|
+
}
|
|
32
|
+
to {
|
|
33
|
+
--scroll-fade-s: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
@keyframes scroll-fade-reveal-e {
|
|
37
|
+
from {
|
|
38
|
+
--scroll-fade-e: var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)));
|
|
39
|
+
}
|
|
40
|
+
to {
|
|
41
|
+
--scroll-fade-e: 0px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@utility scroll-fade-b {
|
|
47
|
+
mask-image: linear-gradient(to bottom, #000 calc(100% - var(--scroll-fade-b, 0px)), transparent 100%);
|
|
48
|
+
mask-repeat: no-repeat;
|
|
49
|
+
|
|
50
|
+
@supports (animation-timeline: scroll()) {
|
|
51
|
+
animation: scroll-fade-reveal-b 1ms ease-in-out both;
|
|
52
|
+
animation-timeline: scroll(self y);
|
|
53
|
+
animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@utility scroll-fade-x {
|
|
58
|
+
mask-image: linear-gradient(
|
|
59
|
+
to right,
|
|
60
|
+
transparent 0,
|
|
61
|
+
#000 var(--scroll-fade-s, 0px),
|
|
62
|
+
#000 calc(100% - var(--scroll-fade-e, 0px)),
|
|
63
|
+
transparent 100%
|
|
64
|
+
);
|
|
65
|
+
mask-repeat: no-repeat;
|
|
66
|
+
|
|
67
|
+
@supports (animation-timeline: scroll()) {
|
|
68
|
+
animation:
|
|
69
|
+
scroll-fade-reveal-s 1ms ease-in-out both,
|
|
70
|
+
scroll-fade-reveal-e 1ms ease-in-out both;
|
|
71
|
+
animation-timeline: scroll(self inline), scroll(self inline);
|
|
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%;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@theme inline {
|
|
2
|
+
@keyframes tw-shimmer {
|
|
3
|
+
from {
|
|
4
|
+
background-position: 100% 0;
|
|
5
|
+
}
|
|
6
|
+
to {
|
|
7
|
+
background-position: 0 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@utility shimmer {
|
|
13
|
+
--_spread: var(--shimmer-spread, calc(3ch + 40px));
|
|
14
|
+
--_base: currentColor;
|
|
15
|
+
--_highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha * 0.2)));
|
|
16
|
+
background-image: linear-gradient(
|
|
17
|
+
90deg,
|
|
18
|
+
var(--_base) calc(50% - var(--_spread)),
|
|
19
|
+
color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% - var(--_spread) * 0.5),
|
|
20
|
+
var(--_highlight) 50%,
|
|
21
|
+
color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% + var(--_spread) * 0.5),
|
|
22
|
+
var(--_base) calc(50% + var(--_spread))
|
|
23
|
+
);
|
|
24
|
+
background-repeat: no-repeat;
|
|
25
|
+
background-size: calc(200% + var(--_spread) * 2) 100%;
|
|
26
|
+
background-clip: text;
|
|
27
|
+
-webkit-background-clip: text;
|
|
28
|
+
-webkit-text-fill-color: transparent;
|
|
29
|
+
animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
|
|
30
|
+
|
|
31
|
+
@variant dark {
|
|
32
|
+
--_highlight: var(--shimmer-color, oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4)));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: reduce) {
|
|
36
|
+
animation: none;
|
|
37
|
+
background-image: none;
|
|
38
|
+
-webkit-text-fill-color: currentColor;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@utility scrollbar-none {
|
|
43
|
+
scrollbar-width: none;
|
|
44
|
+
|
|
45
|
+
&::-webkit-scrollbar {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@utility scrollbar-thin {
|
|
51
|
+
scrollbar-width: thin;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@utility scrollbar-gutter-stable {
|
|
55
|
+
scrollbar-gutter: stable;
|
|
56
|
+
}
|
package/dist/mapping.css
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
}
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import "@fontsource-variable/inter";
|
|
2
|
+
@import "@fontsource-variable/archivo";
|
|
3
|
+
@import "@fontsource-variable/fira-code";
|
|
4
|
+
@import "./palette.css";
|
|
5
|
+
@import "./mapping.css";
|
|
6
|
+
@import "./base.css";
|
|
7
|
+
@import "./effects/keyframes.css";
|
|
8
|
+
@import "./effects/utilities.css";
|
|
9
|
+
@import "./effects/scroll-fade.css";
|
|
10
|
+
@import "./effects/enter.css";
|
|
11
|
+
@import "./effects/brand.css";
|
package/dist/typeset.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "./vendor/typeset.css";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type ColorName = "surface" | "foreground" | "muted" | "faint" | "btn" | "btnInk" | "ghost" | "good" | "bad" | "info" | "warn" | "brandGlow";
|
|
2
|
+
export type Palette = Record<ColorName, string>;
|
|
3
|
+
export declare const lightColors: Palette;
|
|
4
|
+
export declare const darkColors: Palette;
|
|
5
|
+
export declare const hairlineMix = 0.13;
|
|
6
|
+
export declare function hairline(palette: Palette): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const lightColors = {
|
|
2
|
+
surface: "#ffffff",
|
|
3
|
+
foreground: "#09090b",
|
|
4
|
+
muted: "#71717a",
|
|
5
|
+
faint: "#a1a1aa",
|
|
6
|
+
btn: "#18181b",
|
|
7
|
+
btnInk: "#fafafa",
|
|
8
|
+
ghost: "#f4f4f5",
|
|
9
|
+
good: "#006300",
|
|
10
|
+
bad: "#d03b3b",
|
|
11
|
+
info: "#1f6fd1",
|
|
12
|
+
warn: "#a15c00",
|
|
13
|
+
brandGlow: "#0099ff",
|
|
14
|
+
};
|
|
15
|
+
export const darkColors = {
|
|
16
|
+
surface: "#101011",
|
|
17
|
+
foreground: "#ededed",
|
|
18
|
+
muted: "#a1a1aa",
|
|
19
|
+
faint: "#71717a",
|
|
20
|
+
btn: "#ededed",
|
|
21
|
+
btnInk: "#0a0a0a",
|
|
22
|
+
ghost: "#1b1b1d",
|
|
23
|
+
good: "#0ca30c",
|
|
24
|
+
bad: "#e66767",
|
|
25
|
+
info: "#5b9df0",
|
|
26
|
+
warn: "#e0a400",
|
|
27
|
+
brandGlow: "#0099ff",
|
|
28
|
+
};
|
|
29
|
+
export const hairlineMix = 0.13;
|
|
30
|
+
export function hairline(palette) {
|
|
31
|
+
return mixHex(palette.foreground, palette.surface, hairlineMix);
|
|
32
|
+
}
|
|
33
|
+
function mixHex(top, base, amount) {
|
|
34
|
+
const channel = (hex, index) => Number.parseInt(hex.slice(1 + index * 2, 3 + index * 2), 16);
|
|
35
|
+
const mixed = [0, 1, 2].map((index) => Math.round(channel(top, index) * amount + channel(base, index) * (1 - amount)));
|
|
36
|
+
return `#${mixed.map((value) => value.toString(16).padStart(2, "0")).join("")}`;
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const fonts: {
|
|
2
|
+
readonly sans: '"Inter Variable", ui-sans-serif, system-ui, sans-serif';
|
|
3
|
+
readonly heading: '"Archivo Variable", ui-sans-serif, system-ui, sans-serif';
|
|
4
|
+
readonly mono: '"Fira Code Variable", ui-monospace, monospace';
|
|
5
|
+
readonly emailSafeSans: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif";
|
|
6
|
+
readonly emailSafeMono: "'Fira Code', SFMono-Regular, Menlo, Consolas, monospace";
|
|
7
|
+
};
|
|
8
|
+
export declare const radius: {
|
|
9
|
+
readonly container: 0;
|
|
10
|
+
readonly pill: 9999;
|
|
11
|
+
};
|
|
12
|
+
export declare const headingTracking = "-0.02em";
|
|
13
|
+
export declare const labelSize = "11.5px";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const fonts = {
|
|
2
|
+
sans: '"Inter Variable", ui-sans-serif, system-ui, sans-serif',
|
|
3
|
+
heading: '"Archivo Variable", ui-sans-serif, system-ui, sans-serif',
|
|
4
|
+
mono: '"Fira Code Variable", ui-monospace, monospace',
|
|
5
|
+
emailSafeSans: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",
|
|
6
|
+
emailSafeMono: "'Fira Code', SFMono-Regular, Menlo, Consolas, monospace",
|
|
7
|
+
};
|
|
8
|
+
export const radius = { container: 0, pill: 9999 };
|
|
9
|
+
export const headingTracking = "-0.02em";
|
|
10
|
+
export const labelSize = "11.5px";
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* shadcn/typeset
|
|
3
|
+
* https://ui.shadcn.com/docs/typeset.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
.typeset {
|
|
8
|
+
--typeset-font-body: inherit;
|
|
9
|
+
--typeset-font-heading: var(--font-heading);
|
|
10
|
+
--typeset-font-mono: var(--font-mono);
|
|
11
|
+
--typeset-size: 1em;
|
|
12
|
+
--typeset-leading: 1.75;
|
|
13
|
+
--typeset-flow: 1.25em;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@layer components {
|
|
18
|
+
.typeset {
|
|
19
|
+
font-family: var(--typeset-font-body);
|
|
20
|
+
font-size: calc(var(--typeset-size) * 1.125);
|
|
21
|
+
line-height: var(--typeset-leading);
|
|
22
|
+
color: var(--color-foreground, currentColor);
|
|
23
|
+
overflow-wrap: break-word;
|
|
24
|
+
margin-trim: block-start;
|
|
25
|
+
|
|
26
|
+
@media (min-width: 48rem), print {
|
|
27
|
+
font-size: var(--typeset-size);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
--typeset-muted: var(
|
|
31
|
+
--color-muted-foreground,
|
|
32
|
+
color-mix(in oklab, currentColor 60%, transparent)
|
|
33
|
+
);
|
|
34
|
+
--typeset-rule: var(
|
|
35
|
+
--color-border,
|
|
36
|
+
color-mix(in oklab, currentColor 20%, transparent)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.typeset
|
|
41
|
+
*:not(
|
|
42
|
+
:where(
|
|
43
|
+
.not-typeset,
|
|
44
|
+
[data-not-typeset],
|
|
45
|
+
.not-typeset *,
|
|
46
|
+
[data-not-typeset] *
|
|
47
|
+
)
|
|
48
|
+
) {
|
|
49
|
+
/* Paragraphs. */
|
|
50
|
+
&:where(p) {
|
|
51
|
+
margin-block-start: var(--typeset-flow);
|
|
52
|
+
margin-block-end: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Headings. */
|
|
56
|
+
&:where(h1, h2, h3, h4, h5, h6) {
|
|
57
|
+
color: var(--color-foreground, currentColor);
|
|
58
|
+
font-family: var(--typeset-font-heading);
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
margin-block-end: 0;
|
|
61
|
+
}
|
|
62
|
+
&:where(h1) {
|
|
63
|
+
font-size: 1.75em;
|
|
64
|
+
line-height: 1.3;
|
|
65
|
+
margin-block-start: var(--typeset-flow);
|
|
66
|
+
}
|
|
67
|
+
&:where(h2) {
|
|
68
|
+
font-size: 1.25em;
|
|
69
|
+
line-height: 1.4;
|
|
70
|
+
margin-block-start: calc(var(--typeset-flow) * 1.4);
|
|
71
|
+
}
|
|
72
|
+
&:where(h3) {
|
|
73
|
+
font-size: 1.125em;
|
|
74
|
+
line-height: 1.45;
|
|
75
|
+
margin-block-start: var(--typeset-flow);
|
|
76
|
+
}
|
|
77
|
+
&:where(h4) {
|
|
78
|
+
font-size: 1em;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
margin-block-start: var(--typeset-flow);
|
|
81
|
+
}
|
|
82
|
+
&:where(h5) {
|
|
83
|
+
font-size: 0.875em;
|
|
84
|
+
line-height: 1.5;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
color: var(--typeset-muted);
|
|
87
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
88
|
+
}
|
|
89
|
+
&:where(h6) {
|
|
90
|
+
font-size: 0.8125em;
|
|
91
|
+
line-height: 1.5;
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
letter-spacing: 0.08em;
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
color: var(--typeset-muted);
|
|
96
|
+
margin-block-start: calc(var(--typeset-flow) / 0.8125);
|
|
97
|
+
}
|
|
98
|
+
/* Anchors. */
|
|
99
|
+
&:where([id]) {
|
|
100
|
+
scroll-margin-block-start: var(--typeset-flow);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Headings own the space below them. */
|
|
104
|
+
&:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
|
|
105
|
+
margin-block-start: 1em;
|
|
106
|
+
}
|
|
107
|
+
&:where(:is(h1, h2, h3, h4) :is(code)) {
|
|
108
|
+
font-size: 0.9em;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Links. */
|
|
112
|
+
&:where(a) {
|
|
113
|
+
color: inherit;
|
|
114
|
+
font-weight: 500;
|
|
115
|
+
text-decoration-line: underline;
|
|
116
|
+
text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
|
|
117
|
+
}
|
|
118
|
+
&:where(a:hover) {
|
|
119
|
+
text-decoration-color: currentColor;
|
|
120
|
+
}
|
|
121
|
+
&:where(a:focus-visible) {
|
|
122
|
+
outline: 2px solid var(--color-ring, currentColor);
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
border-radius: 0.125em;
|
|
125
|
+
}
|
|
126
|
+
&:where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {
|
|
127
|
+
font-weight: inherit;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Inline semantics. */
|
|
131
|
+
&:where(strong, b) {
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
}
|
|
134
|
+
&:where(:is(h1, h2, h3, h4) :is(strong, b)) {
|
|
135
|
+
font-weight: 600;
|
|
136
|
+
}
|
|
137
|
+
&:where(mark) {
|
|
138
|
+
background-color: color-mix(
|
|
139
|
+
in oklab,
|
|
140
|
+
oklch(0.86 0.17 95) 40%,
|
|
141
|
+
transparent
|
|
142
|
+
);
|
|
143
|
+
color: inherit;
|
|
144
|
+
padding: 0.05em 0.15em;
|
|
145
|
+
border-radius: 0.2em;
|
|
146
|
+
}
|
|
147
|
+
&:where(abbr[title]) {
|
|
148
|
+
text-decoration-line: underline;
|
|
149
|
+
text-decoration-style: dotted;
|
|
150
|
+
text-underline-offset: 0.2em;
|
|
151
|
+
cursor: help;
|
|
152
|
+
}
|
|
153
|
+
&:where(del, s) {
|
|
154
|
+
color: var(--typeset-muted);
|
|
155
|
+
text-decoration-line: line-through;
|
|
156
|
+
}
|
|
157
|
+
&:where(sup, sub) {
|
|
158
|
+
font-size: 0.75em;
|
|
159
|
+
line-height: 0;
|
|
160
|
+
position: relative;
|
|
161
|
+
vertical-align: baseline;
|
|
162
|
+
}
|
|
163
|
+
&:where(sup) {
|
|
164
|
+
top: -0.5em;
|
|
165
|
+
}
|
|
166
|
+
&:where(sub) {
|
|
167
|
+
bottom: -0.25em;
|
|
168
|
+
}
|
|
169
|
+
&:where(sup a) {
|
|
170
|
+
text-decoration-line: none;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Lists. */
|
|
175
|
+
&:where(ul) {
|
|
176
|
+
list-style-type: disc;
|
|
177
|
+
}
|
|
178
|
+
&:where(ol) {
|
|
179
|
+
list-style-type: decimal;
|
|
180
|
+
}
|
|
181
|
+
&:where(ul ul) {
|
|
182
|
+
list-style-type: circle;
|
|
183
|
+
}
|
|
184
|
+
&:where(ul ul ul) {
|
|
185
|
+
list-style-type: square;
|
|
186
|
+
}
|
|
187
|
+
&:where(ol[type="a" i]) {
|
|
188
|
+
list-style-type: lower-alpha;
|
|
189
|
+
}
|
|
190
|
+
&:where(ol[type="i" i]) {
|
|
191
|
+
list-style-type: lower-roman;
|
|
192
|
+
}
|
|
193
|
+
&:where(ol[type="A" s]) {
|
|
194
|
+
list-style-type: upper-alpha;
|
|
195
|
+
}
|
|
196
|
+
&:where(ol[type="I" s]) {
|
|
197
|
+
list-style-type: upper-roman;
|
|
198
|
+
}
|
|
199
|
+
&:where(ul, ol) {
|
|
200
|
+
margin-block-start: var(--typeset-flow);
|
|
201
|
+
margin-block-end: 0;
|
|
202
|
+
padding-inline-start: 1.5em;
|
|
203
|
+
}
|
|
204
|
+
&:where(li) {
|
|
205
|
+
margin-block-start: 0.5em;
|
|
206
|
+
padding-inline-start: 0.4em;
|
|
207
|
+
}
|
|
208
|
+
&:where(li > p, li > ul, li > ol) {
|
|
209
|
+
margin-block-start: 0.5em;
|
|
210
|
+
}
|
|
211
|
+
&:where(ul > li)::marker {
|
|
212
|
+
color: var(--typeset-muted);
|
|
213
|
+
}
|
|
214
|
+
&:where(ol > li)::marker {
|
|
215
|
+
color: var(--typeset-muted);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* GFM task lists. */
|
|
219
|
+
&:where(ul.contains-task-list) {
|
|
220
|
+
list-style-type: none;
|
|
221
|
+
padding-inline-start: 0.25em;
|
|
222
|
+
}
|
|
223
|
+
&:where(li.task-list-item > input[type="checkbox"]) {
|
|
224
|
+
margin-inline-end: 0.5em;
|
|
225
|
+
vertical-align: -0.1em;
|
|
226
|
+
accent-color: var(--color-primary, currentColor);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Disclosures. */
|
|
230
|
+
&:where(details) {
|
|
231
|
+
margin-block-start: var(--typeset-flow);
|
|
232
|
+
margin-block-end: 0;
|
|
233
|
+
}
|
|
234
|
+
&:where(summary) {
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
font-weight: 500;
|
|
237
|
+
}
|
|
238
|
+
&:where(summary)::marker {
|
|
239
|
+
color: var(--typeset-muted);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Keyboard keys. */
|
|
243
|
+
&:where(kbd) {
|
|
244
|
+
font-family: inherit;
|
|
245
|
+
font-size: 0.85em;
|
|
246
|
+
font-weight: 500;
|
|
247
|
+
border: 1px solid var(--typeset-rule);
|
|
248
|
+
border-block-end-width: 2px;
|
|
249
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
250
|
+
padding: 0.0625em 0.35em;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Definition lists. */
|
|
254
|
+
&:where(dl) {
|
|
255
|
+
margin-block-start: var(--typeset-flow);
|
|
256
|
+
margin-block-end: 0;
|
|
257
|
+
}
|
|
258
|
+
&:where(dt) {
|
|
259
|
+
font-weight: 500;
|
|
260
|
+
margin-block-start: 1em;
|
|
261
|
+
}
|
|
262
|
+
&:where(dt + dt) {
|
|
263
|
+
margin-block-start: 0.25em;
|
|
264
|
+
}
|
|
265
|
+
&:where(dd) {
|
|
266
|
+
margin-block-start: 0.25em;
|
|
267
|
+
margin-inline-start: 0;
|
|
268
|
+
padding-inline-start: 1em;
|
|
269
|
+
color: var(--typeset-muted);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* Inline code. */
|
|
273
|
+
&:where(:not(pre) > code) {
|
|
274
|
+
background-color: var(
|
|
275
|
+
--color-muted,
|
|
276
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
277
|
+
);
|
|
278
|
+
font-family: var(--typeset-font-mono);
|
|
279
|
+
font-size: 0.85em;
|
|
280
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
281
|
+
padding: 0.125em 0.3em;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Code blocks. */
|
|
285
|
+
&:where(pre) {
|
|
286
|
+
background-color: var(
|
|
287
|
+
--color-muted,
|
|
288
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
289
|
+
);
|
|
290
|
+
font-family: var(--typeset-font-mono);
|
|
291
|
+
font-size: 0.875em;
|
|
292
|
+
line-height: 1.5;
|
|
293
|
+
tab-size: 2;
|
|
294
|
+
direction: ltr;
|
|
295
|
+
border-radius: var(--radius, 0.5em);
|
|
296
|
+
padding: 0.75em 1em;
|
|
297
|
+
overflow-x: auto;
|
|
298
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
299
|
+
margin-block-end: 0;
|
|
300
|
+
}
|
|
301
|
+
&:where(pre code) {
|
|
302
|
+
background-color: transparent;
|
|
303
|
+
font-family: inherit;
|
|
304
|
+
font-size: inherit;
|
|
305
|
+
padding: 0;
|
|
306
|
+
border-radius: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Blockquote. */
|
|
310
|
+
&:where(blockquote) {
|
|
311
|
+
border-inline-start: 2px solid var(--typeset-rule);
|
|
312
|
+
padding-inline-start: 1em;
|
|
313
|
+
margin-block-start: var(--typeset-flow);
|
|
314
|
+
margin-block-end: 0;
|
|
315
|
+
margin-inline: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Dividers. */
|
|
319
|
+
&:where(hr) {
|
|
320
|
+
border: 0;
|
|
321
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
322
|
+
margin-block-start: calc(var(--typeset-flow) * 2.4);
|
|
323
|
+
margin-block-end: 0;
|
|
324
|
+
}
|
|
325
|
+
&:where(hr + h1, hr + h2, hr + h3, hr + h4) {
|
|
326
|
+
margin-block-start: var(--typeset-flow);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* GFM footnotes. */
|
|
330
|
+
&:where(.footnotes, [data-footnotes]) {
|
|
331
|
+
margin-block-start: calc(var(--typeset-flow) * 2);
|
|
332
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
333
|
+
padding-block-start: var(--typeset-flow);
|
|
334
|
+
font-size: 0.875em;
|
|
335
|
+
color: var(--typeset-muted);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Math. */
|
|
339
|
+
&:where(math[display="block"]) {
|
|
340
|
+
margin-block-start: var(--typeset-flow);
|
|
341
|
+
margin-block-end: 0;
|
|
342
|
+
overflow-x: auto;
|
|
343
|
+
overflow-y: hidden;
|
|
344
|
+
padding-block: 0.25em;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Media. */
|
|
348
|
+
&:where(img, video) {
|
|
349
|
+
border-radius: var(--radius, 0.5em);
|
|
350
|
+
max-width: 100%;
|
|
351
|
+
height: auto;
|
|
352
|
+
margin-block-start: var(--typeset-flow);
|
|
353
|
+
margin-block-end: 0;
|
|
354
|
+
}
|
|
355
|
+
&:where(p img) {
|
|
356
|
+
margin-block-start: 0;
|
|
357
|
+
}
|
|
358
|
+
&:where(figure) {
|
|
359
|
+
margin-block-start: var(--typeset-flow);
|
|
360
|
+
margin-block-end: 0;
|
|
361
|
+
margin-inline: 0;
|
|
362
|
+
}
|
|
363
|
+
&:where(figcaption, caption) {
|
|
364
|
+
color: var(--typeset-muted);
|
|
365
|
+
font-size: 0.875em;
|
|
366
|
+
text-align: center;
|
|
367
|
+
margin-block-start: calc(0.75em / 0.875);
|
|
368
|
+
}
|
|
369
|
+
&:where(caption) {
|
|
370
|
+
caption-side: bottom;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Tables. Separators sit on cells, not tr:last-child: append-safe.
|
|
374
|
+
Bare tables stay real tables (keep their semantics) and wrap to fit. */
|
|
375
|
+
&:where(table) {
|
|
376
|
+
max-width: 100%;
|
|
377
|
+
font-size: 1em;
|
|
378
|
+
line-height: 1.5;
|
|
379
|
+
font-variant-numeric: tabular-nums;
|
|
380
|
+
border-collapse: separate;
|
|
381
|
+
border-spacing: 0;
|
|
382
|
+
border-block-end: 1px solid var(--typeset-rule);
|
|
383
|
+
margin-block-start: var(--typeset-flow);
|
|
384
|
+
margin-block-end: 0;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* Horizontal scroll for any wide block. Wrap it and the wrapper owns the
|
|
388
|
+
flow margin. Tables shrink to fit, so widen the table to make it scroll
|
|
389
|
+
instead of compress. */
|
|
390
|
+
&:where(.typeset-scroll) {
|
|
391
|
+
overflow-x: auto;
|
|
392
|
+
margin-block-start: var(--typeset-flow);
|
|
393
|
+
}
|
|
394
|
+
&:where(.typeset-scroll > *) {
|
|
395
|
+
margin-block-start: 0;
|
|
396
|
+
}
|
|
397
|
+
&:where(.typeset-scroll table) {
|
|
398
|
+
width: max-content;
|
|
399
|
+
max-width: none;
|
|
400
|
+
}
|
|
401
|
+
&:where(thead th) {
|
|
402
|
+
font-weight: 500;
|
|
403
|
+
text-align: start;
|
|
404
|
+
white-space: nowrap;
|
|
405
|
+
padding: 0.65em 1em;
|
|
406
|
+
}
|
|
407
|
+
&:where(:is(tbody, tfoot) :is(td, th)) {
|
|
408
|
+
padding: 0.75em 1em;
|
|
409
|
+
text-align: start;
|
|
410
|
+
vertical-align: top;
|
|
411
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
412
|
+
}
|
|
413
|
+
&:where(tbody th, tfoot th) {
|
|
414
|
+
font-weight: 500;
|
|
415
|
+
}
|
|
416
|
+
&:where(th:first-child, td:first-child) {
|
|
417
|
+
padding-inline-start: 0;
|
|
418
|
+
}
|
|
419
|
+
&:where(th[align="center"], td[align="center"]) {
|
|
420
|
+
text-align: center;
|
|
421
|
+
}
|
|
422
|
+
&:where(th[align="right"], td[align="right"]) {
|
|
423
|
+
text-align: end;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* Blocks inside list items keep the list's tighter rhythm. */
|
|
427
|
+
&:where(li > blockquote, li > table, li > figure) {
|
|
428
|
+
margin-block-start: 0.5em;
|
|
429
|
+
}
|
|
430
|
+
&:where(li > pre) {
|
|
431
|
+
margin-block-start: calc(0.5em / 0.875);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
@media print {
|
|
435
|
+
&:where(pre, table, blockquote, figure) {
|
|
436
|
+
break-inside: avoid;
|
|
437
|
+
}
|
|
438
|
+
&:where(h1, h2, h3, h4) {
|
|
439
|
+
break-after: avoid;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/* Forced colors strips the code background, so give it a border. */
|
|
444
|
+
@media (forced-colors: active) {
|
|
445
|
+
&:where(:not(pre) > code) {
|
|
446
|
+
border: 1px solid;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* First child adds no space above. Last so it wins ties. */
|
|
452
|
+
.typeset
|
|
453
|
+
> :where(:first-child):not(
|
|
454
|
+
:where(
|
|
455
|
+
.not-typeset,
|
|
456
|
+
[data-not-typeset],
|
|
457
|
+
.not-typeset *,
|
|
458
|
+
[data-not-typeset] *
|
|
459
|
+
)
|
|
460
|
+
),
|
|
461
|
+
.typeset
|
|
462
|
+
> :where(:first-child)
|
|
463
|
+
> :where(:first-child):not(
|
|
464
|
+
:where(
|
|
465
|
+
.not-typeset,
|
|
466
|
+
[data-not-typeset],
|
|
467
|
+
.not-typeset *,
|
|
468
|
+
[data-not-typeset] *
|
|
469
|
+
)
|
|
470
|
+
),
|
|
471
|
+
.typeset
|
|
472
|
+
:where(
|
|
473
|
+
li > :first-child,
|
|
474
|
+
blockquote > :first-child,
|
|
475
|
+
td > :first-child,
|
|
476
|
+
th > :first-child,
|
|
477
|
+
dd > :first-child,
|
|
478
|
+
figure > :first-child,
|
|
479
|
+
figure > picture > img
|
|
480
|
+
):not(
|
|
481
|
+
:where(
|
|
482
|
+
.not-typeset,
|
|
483
|
+
[data-not-typeset],
|
|
484
|
+
.not-typeset *,
|
|
485
|
+
[data-not-typeset] *
|
|
486
|
+
)
|
|
487
|
+
) {
|
|
488
|
+
margin-block-start: 0;
|
|
489
|
+
}
|
|
490
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusgraph/tokens",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/locusgraph/design.git",
|
|
9
|
+
"directory": "packages/tokens"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://design.locusgraph.com",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/values/index.d.ts",
|
|
22
|
+
"default": "./dist/values/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./theme.css": "./dist/theme.css",
|
|
25
|
+
"./typeset.css": "./dist/typeset.css"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"registry": "https://registry.npmjs.org",
|
|
29
|
+
"access": "public",
|
|
30
|
+
"provenance": true
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@fontsource-variable/archivo": "^5.3.0",
|
|
34
|
+
"@fontsource-variable/fira-code": "^5.3.0",
|
|
35
|
+
"@fontsource-variable/inter": "^5.3.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@locusgraph/config": "0.1.0",
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"typescript": "^7.0.2",
|
|
41
|
+
"vitest": "^5.0.3"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && rsync -a --include='*/' --include='*.css' --exclude='*' src/ dist/",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"test": "vitest run"
|
|
47
|
+
}
|
|
6
48
|
}
|