@usevyre/ai-context 0.2.0 → 0.2.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/dist/index.js +1 -1
- package/dist/tokens.json +1388 -0
- package/dist/tokens.md +180 -0
- package/dist/version-info.json +1 -1
- package/package.json +5 -3
- package/LICENSE +0 -21
package/dist/tokens.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# useVyre Token Reference for AI Agents
|
|
2
|
+
# Version: 0.1.2 | Generated: 2026-05-08
|
|
3
|
+
# Machine-readable version: @usevyre/tokens/ai (ai-tokens.json)
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
/* CSS */
|
|
9
|
+
@import "@usevyre/tokens/css";
|
|
10
|
+
color: var(--vyre-color-semantic-accent);
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
/* TypeScript/JS */
|
|
15
|
+
import { tokens, cssVar } from "@usevyre/tokens";
|
|
16
|
+
const accent = tokens["colorSemanticAccent"]; // resolved hex value
|
|
17
|
+
const css = cssVar("color-semantic-accent"); // "var(--vyre-color-semantic-accent)"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
1. NEVER use primitive tokens (--vyre-color-primitive-*) in components — use semantic tokens instead.
|
|
23
|
+
2. Semantic tokens adapt automatically to light/dark theme via [data-theme] attribute on <html>.
|
|
24
|
+
3. For interactive hover states, use the -hover suffix variant of the token.
|
|
25
|
+
4. For low-opacity backgrounds (badges, highlights), use -subtle suffix tokens.
|
|
26
|
+
5. Text hierarchy: text-primary > text-secondary > text-muted > text-disabled.
|
|
27
|
+
6. For text on accent/colored backgrounds, use text-inverse or accent-foreground.
|
|
28
|
+
7. Import CSS: @import "@usevyre/tokens/css". Import JS: import { tokens } from "@usevyre/tokens".
|
|
29
|
+
8. Use cssVar() helper to reference tokens in JS: cssVar('color-semantic-accent') → var(--vyre-color-semantic-accent).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Semantic Color Tokens
|
|
34
|
+
|
|
35
|
+
These are the tokens to use in all component styling. They switch automatically between light/dark.
|
|
36
|
+
|
|
37
|
+
| CSS Variable | Description | Light | Dark | Usage |
|
|
38
|
+
|---|---|---|---|---|
|
|
39
|
+
| `--vyre-color-semantic-background` | Page/app background. Deepest layer. | `#ffffff` | `#09090b` | Page/app root background, Layout wrapper background |
|
|
40
|
+
| `--vyre-color-semantic-surface` | Cards, panels, sidebars. | `#fafafa` | `#18181b` | Card background, Panel background |
|
|
41
|
+
| `--vyre-color-semantic-surface-raised` | Dropdowns, popovers, elevated cards. | `#f4f4f5` | `#27272a` | Dropdown background, Popover background |
|
|
42
|
+
| `--vyre-color-semantic-surface-overlay` | Modals, tooltips, highest elevation. | `#ffffff` | `#333338` | Modal background, Tooltip background |
|
|
43
|
+
| `--vyre-color-semantic-border` | Default border for cards, inputs, dividers. | `#e4e4e7` | `#3f3f46` | Card border, Input border |
|
|
44
|
+
| `--vyre-color-semantic-border-subtle` | Very low contrast border. Section dividers. | `#ebebec` | `#27272a` | Section divider, Low-contrast rule between rows |
|
|
45
|
+
| `--vyre-color-semantic-border-strong` | Focused inputs, selected states. | `#a1a1aa` | `#71717a` | Input focus ring, Selected item border |
|
|
46
|
+
| `--vyre-color-semantic-text-primary` | Headings, body text, primary content. | `#09090b` | `#fafafa` | Heading text, Body copy |
|
|
47
|
+
| `--vyre-color-semantic-text-secondary` | Subtitles, descriptions, supporting text. | `#52525b` | `#d1d1d6` | Subtitle, Description text |
|
|
48
|
+
| `--vyre-color-semantic-text-muted` | Placeholders, timestamps, helper text. | `#a1a1aa` | `#71717a` | Placeholder text, Timestamp |
|
|
49
|
+
| `--vyre-color-semantic-text-disabled` | Disabled state text. | `#d1d1d6` | `#52525b` | Disabled input text, Greyed-out label |
|
|
50
|
+
| `--vyre-color-semantic-text-inverse` | Text on dark/accent backgrounds. | `#ffffff` | `#09090b` | Text on dark/accent background, Text inside accent-colored badge |
|
|
51
|
+
| `--vyre-color-semantic-accent` | Primary brand accent. CTAs, highlights, focus rings. | `#7c3aed` | `#a78bfa` | Button primary background, Link active state |
|
|
52
|
+
| `--vyre-color-semantic-accent-hover` | Hover state for accent elements. | `#6d28d9` | `#c4b5fd` | Button primary hover state |
|
|
53
|
+
| `--vyre-color-semantic-accent-foreground` | Text color on accent background. | `#ffffff` | `#09090b` | Text/icon on accent-colored background |
|
|
54
|
+
| `--vyre-color-semantic-accent-subtle` | Low-opacity accent for badge backgrounds, highlights. | `#f5f3ff` | `rgba(139, 92, 246, 0.12)` | Accent badge background, Highlighted row background |
|
|
55
|
+
| `--vyre-color-semantic-accent-subtle-border` | Border for accent subtle containers. | `#ddd6fe` | `rgba(139, 92, 246, 0.25)` | Border of accent-subtle containers |
|
|
56
|
+
| `--vyre-color-semantic-teal` | Secondary accent. Code, AI-context indicators. | `#14b8a6` | `#2dd4bf` | Button teal variant, Code block accent |
|
|
57
|
+
| `--vyre-color-semantic-teal-hover` | Hover state for teal elements. | `#0d9488` | `#5eead4` | Teal button hover state |
|
|
58
|
+
| `--vyre-color-semantic-teal-subtle` | Low-opacity teal for badge backgrounds. | `rgba(20, 184, 166, 0.08)` | `rgba(45, 212, 191, 0.10)` | Teal badge background |
|
|
59
|
+
| `--vyre-color-semantic-success` | Success states, confirmations. | `#16a34a` | `#4ade80` | Success alert icon/text, Toast success border-left |
|
|
60
|
+
| `--vyre-color-semantic-success-subtle` | Success badge background. | `#f0fdf4` | `rgba(74, 222, 128, 0.10)` | Success alert background, Success badge background |
|
|
61
|
+
| `--vyre-color-semantic-success-subtle-border` | Border for success subtle containers. | `#dcfce7` | `rgba(74, 222, 128, 0.20)` | Success alert border |
|
|
62
|
+
| `--vyre-color-semantic-warning` | Warning states, beta indicators. | `#f59e0b` | `#fbbf24` | Warning alert icon/text, Toast warning border-left |
|
|
63
|
+
| `--vyre-color-semantic-warning-subtle` | Warning badge background. | `#fffbeb` | `rgba(251, 191, 36, 0.10)` | Warning alert background, Warning badge background |
|
|
64
|
+
| `--vyre-color-semantic-warning-subtle-border` | Border for warning subtle containers. | `#fef3c7` | `rgba(251, 191, 36, 0.20)` | Warning alert border |
|
|
65
|
+
| `--vyre-color-semantic-danger` | Error states, destructive actions. | `#dc2626` | `#f87171` | Button danger variant, Error alert icon/text |
|
|
66
|
+
| `--vyre-color-semantic-danger-hover` | Hover state for danger elements. | `#ef4444` | `#ef4444` | Danger button hover state |
|
|
67
|
+
| `--vyre-color-semantic-danger-subtle` | Error badge background. | `#fef2f2` | `rgba(248, 113, 113, 0.10)` | Error alert background, Danger badge background |
|
|
68
|
+
| `--vyre-color-semantic-danger-subtle-border` | Border for danger subtle containers. | `#fee2e2` | `rgba(248, 113, 113, 0.20)` | Error alert border |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Spacing (4px grid)
|
|
73
|
+
|
|
74
|
+
| CSS Variable | Value | Notes |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `--vyre-spacing-0` | `0` | |
|
|
77
|
+
| `--vyre-spacing-1` | `0.25rem` | 4px |
|
|
78
|
+
| `--vyre-spacing-2` | `0.5rem` | 8px |
|
|
79
|
+
| `--vyre-spacing-3` | `0.75rem` | 12px |
|
|
80
|
+
| `--vyre-spacing-4` | `1rem` | 16px |
|
|
81
|
+
| `--vyre-spacing-5` | `1.25rem` | 20px |
|
|
82
|
+
| `--vyre-spacing-6` | `1.5rem` | 24px |
|
|
83
|
+
| `--vyre-spacing-8` | `2rem` | 32px |
|
|
84
|
+
| `--vyre-spacing-10` | `2.5rem` | 40px |
|
|
85
|
+
| `--vyre-spacing-12` | `3rem` | 48px |
|
|
86
|
+
| `--vyre-spacing-16` | `4rem` | 64px |
|
|
87
|
+
| `--vyre-spacing-20` | `5rem` | 80px |
|
|
88
|
+
| `--vyre-spacing-24` | `6rem` | 96px |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Border Radius
|
|
93
|
+
|
|
94
|
+
| CSS Variable | Value | Notes |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| `--vyre-border-radius-none` | `0` | |
|
|
97
|
+
| `--vyre-border-radius-sm` | `0.375rem` | 6px. Tight corners. |
|
|
98
|
+
| `--vyre-border-radius-md` | `0.5rem` | 8px. Default component radius. |
|
|
99
|
+
| `--vyre-border-radius-lg` | `0.75rem` | 12px. Cards, panels. |
|
|
100
|
+
| `--vyre-border-radius-xl` | `1rem` | 16px. Large cards. |
|
|
101
|
+
| `--vyre-border-radius-2xl` | `1.5rem` | 24px. Modals, sheets. |
|
|
102
|
+
| `--vyre-border-radius-full` | `9999px` | Badges, pills, avatars. |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Typography — Font Sizes
|
|
107
|
+
|
|
108
|
+
| CSS Variable | Value | Notes |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `--vyre-typography-font-size-2xs` | `0.625rem` | 10px. Tiny labels only. |
|
|
111
|
+
| `--vyre-typography-font-size-xs` | `0.6875rem` | 11px. Badge text, captions. |
|
|
112
|
+
| `--vyre-typography-font-size-sm` | `0.8125rem` | 13px. Default UI text, buttons. |
|
|
113
|
+
| `--vyre-typography-font-size-md` | `0.9375rem` | 15px. Body text. |
|
|
114
|
+
| `--vyre-typography-font-size-lg` | `1.125rem` | 18px. Large body, small headings. |
|
|
115
|
+
| `--vyre-typography-font-size-xl` | `1.375rem` | 22px. Section headings. |
|
|
116
|
+
| `--vyre-typography-font-size-2xl` | `1.75rem` | 28px. Page headings. |
|
|
117
|
+
| `--vyre-typography-font-size-3xl` | `2.25rem` | 36px. Large headings. |
|
|
118
|
+
| `--vyre-typography-font-size-4xl` | `3rem` | 48px. Hero headings. |
|
|
119
|
+
| `--vyre-typography-font-size-5xl` | `4rem` | 64px. Display headings. |
|
|
120
|
+
|
|
121
|
+
**Font weights:** light (300), regular (400), medium (500), semibold (600), bold (700)
|
|
122
|
+
Use `--vyre-typography-font-weight-[name]`.
|
|
123
|
+
|
|
124
|
+
**Font families:**
|
|
125
|
+
- Display/Body: `--vyre-typography-font-family-display` / `--vyre-typography-font-family-body` → Geist, Inter, system-ui
|
|
126
|
+
- Mono: `--vyre-typography-font-family-mono` → Geist Mono, JetBrains Mono
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Shadows
|
|
131
|
+
|
|
132
|
+
| CSS Variable | Notes |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `--vyre-shadow-sm` | — |
|
|
135
|
+
| `--vyre-shadow-md` | — |
|
|
136
|
+
| `--vyre-shadow-lg` | — |
|
|
137
|
+
| `--vyre-shadow-xl` | — |
|
|
138
|
+
| `--vyre-shadow-sm-dark` | — |
|
|
139
|
+
| `--vyre-shadow-md-dark` | — |
|
|
140
|
+
| `--vyre-shadow-lg-dark` | — |
|
|
141
|
+
| `--vyre-shadow-xl-dark` | — |
|
|
142
|
+
| `--vyre-shadow-glow-accent` | — |
|
|
143
|
+
| `--vyre-shadow-glow-teal` | — |
|
|
144
|
+
|
|
145
|
+
Use `-dark` variants inside `[data-theme="dark"]`. `glow-accent` and `glow-teal` for focus glows.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Transitions — Duration
|
|
150
|
+
|
|
151
|
+
| CSS Variable | Value |
|
|
152
|
+
|---|---|
|
|
153
|
+
| `--vyre-transition-duration-instant` | `80ms` |
|
|
154
|
+
| `--vyre-transition-duration-fast` | `120ms` |
|
|
155
|
+
| `--vyre-transition-duration-normal` | `200ms` |
|
|
156
|
+
| `--vyre-transition-duration-slow` | `350ms` |
|
|
157
|
+
|
|
158
|
+
**Easing:** `--vyre-transition-easing-out` (default), `-in`, `-inout`, `-spring` (bounce)
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Z-Index Scale
|
|
163
|
+
|
|
164
|
+
| CSS Variable | Value | Layer |
|
|
165
|
+
|---|---|---|
|
|
166
|
+
| `--vyre-z-index-base` | `0` | |
|
|
167
|
+
| `--vyre-z-index-raised` | `10` | |
|
|
168
|
+
| `--vyre-z-index-sticky` | `100` | |
|
|
169
|
+
| `--vyre-z-index-overlay` | `200` | |
|
|
170
|
+
| `--vyre-z-index-modal` | `1000` | |
|
|
171
|
+
| `--vyre-z-index-toast` | `2000` | |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Common Mistakes
|
|
176
|
+
|
|
177
|
+
- ❌ Using raw hex values → ✅ Use `var(--vyre-color-semantic-accent)`
|
|
178
|
+
- ❌ `--vyre-color-primitive-violet-600` in a component → ✅ `--vyre-color-semantic-accent`
|
|
179
|
+
- ❌ Custom z-index numbers → ✅ Use `var(--vyre-z-index-modal)`
|
|
180
|
+
- ❌ Hardcoded px spacing → ✅ Use `var(--vyre-spacing-4)` (= 16px)
|
package/dist/version-info.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usevyre/ai-context",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "useVyre AI context — inject into LLM system prompts to eliminate UI hallucinations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"./schema": "./dist/schema.json",
|
|
27
27
|
"./anti-patterns": "./dist/anti-patterns.json",
|
|
28
28
|
"./version-info": "./dist/version-info.json",
|
|
29
|
-
"./cheat-sheets": "./dist/cheat-sheets/index.md"
|
|
29
|
+
"./cheat-sheets": "./dist/cheat-sheets/index.md",
|
|
30
|
+
"./tokens": "./dist/tokens.json",
|
|
31
|
+
"./tokens-md": "./dist/tokens.md"
|
|
30
32
|
},
|
|
31
33
|
"files": [
|
|
32
34
|
"dist"
|
|
@@ -35,4 +37,4 @@
|
|
|
35
37
|
"build": "node scripts/build.js",
|
|
36
38
|
"clean": "rm -rf dist"
|
|
37
39
|
}
|
|
38
|
-
}
|
|
40
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Galih Pranowo (gapra.dev)
|
|
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.
|