@citron-systems/citron-ds 1.0.0 → 1.0.2

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.
Files changed (63) hide show
  1. package/README.md +218 -149
  2. package/cli/citron-mascot.mjs +117 -0
  3. package/dist/ai/inkblot-ai-reference.json +582 -570
  4. package/dist/ai/inkblot-tokens-resolved.json +25 -0
  5. package/dist/ai/inkblot-tokens-schema.json +54 -54
  6. package/dist/brand/citron-mascot-mono.svg +17 -0
  7. package/dist/brand/citron-mascot.svg +21 -0
  8. package/dist/brand/readme-hero.svg +61 -0
  9. package/dist/bundle/README.md +28 -0
  10. package/dist/bundle/ai-reference.json +582 -0
  11. package/dist/bundle/brand/citron-mascot-mono.svg +17 -0
  12. package/dist/bundle/brand/citron-mascot.svg +21 -0
  13. package/dist/bundle/brand/readme-hero.svg +61 -0
  14. package/dist/bundle/preview/mascot.html +72 -0
  15. package/dist/bundle/system/ai.json +168 -0
  16. package/dist/bundle/system/cli.json +340 -0
  17. package/dist/bundle/system/components.json +304 -0
  18. package/dist/bundle/system/content.json +168 -0
  19. package/dist/bundle/system/devtools.json +95 -0
  20. package/dist/bundle/system/foundations.json +121 -0
  21. package/dist/bundle/system/grid.json +101 -0
  22. package/dist/bundle/system/icons.json +507 -0
  23. package/dist/bundle/system/index.json +57 -0
  24. package/dist/bundle/system/inkblot-ai-reference.json +582 -0
  25. package/dist/bundle/system/motion.json +159 -0
  26. package/dist/bundle/tokens/primitive/breakpoint.tokens.json +14 -0
  27. package/dist/bundle/tokens/primitive/color.tokens.json +71 -0
  28. package/dist/bundle/tokens/primitive/devtools.palette.tokens.json +55 -0
  29. package/dist/bundle/tokens/primitive/duration.tokens.json +38 -0
  30. package/dist/bundle/tokens/primitive/grid.tokens.json +34 -0
  31. package/dist/bundle/tokens/primitive/radius.tokens.json +26 -0
  32. package/dist/bundle/tokens/primitive/shadow.tokens.json +41 -0
  33. package/dist/bundle/tokens/primitive/spacing.tokens.json +38 -0
  34. package/dist/bundle/tokens/primitive/typography.tokens.json +60 -0
  35. package/dist/bundle/tokens/primitive/zindex.tokens.json +19 -0
  36. package/dist/bundle/tokens/semantic/dark.tokens.json +43 -0
  37. package/dist/bundle/tokens/semantic/devtools.semantic.tokens.json +79 -0
  38. package/dist/bundle/tokens/semantic/inkblot.semantic.tokens.json +140 -0
  39. package/dist/bundle/tokens-schema.json +54 -0
  40. package/dist/bundle/tokens.flat.json +224 -0
  41. package/dist/bundle/tokens.resolved.json +224 -0
  42. package/dist/bundle/variables.css +228 -0
  43. package/dist/bundle/variables.scss +225 -0
  44. package/dist/css/inkblot-variables.css +25 -0
  45. package/dist/index.html +956 -0
  46. package/dist/js/inkblot-tokens.js +25 -0
  47. package/dist/js/inkblot-tokens.json +25 -0
  48. package/dist/preview/mascot.html +72 -0
  49. package/dist/scss/_inkblot-variables.scss +25 -0
  50. package/package.json +73 -61
  51. package/tokens/primitive/breakpoint.tokens.json +14 -14
  52. package/tokens/primitive/color.tokens.json +71 -71
  53. package/tokens/primitive/devtools.palette.tokens.json +55 -0
  54. package/tokens/primitive/duration.tokens.json +38 -38
  55. package/tokens/primitive/grid.tokens.json +34 -34
  56. package/tokens/primitive/radius.tokens.json +26 -26
  57. package/tokens/primitive/shadow.tokens.json +41 -41
  58. package/tokens/primitive/spacing.tokens.json +38 -38
  59. package/tokens/primitive/typography.tokens.json +60 -60
  60. package/tokens/primitive/zindex.tokens.json +19 -19
  61. package/tokens/semantic/dark.tokens.json +43 -43
  62. package/tokens/semantic/devtools.semantic.tokens.json +79 -0
  63. package/tokens/semantic/inkblot.semantic.tokens.json +140 -140
package/README.md CHANGED
@@ -1,149 +1,218 @@
1
- # @citron-systems/citron-ds
2
-
3
- > Inkblot Studio design token systemApple-inspired, accessible, AI-ready. The **Citron** design language: warmly minimal, quietly distinctive.
4
-
5
- [![npm version](https://img.shields.io/npm/v/@citron-systems/citron-ds.svg)](https://www.npmjs.com/package/@citron-systems/citron-ds)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
-
8
- ---
9
-
10
- ## Install
11
-
12
- ```bash
13
- npm install @citron-systems/citron-ds
14
- ```
15
-
16
- ### CDN (no build step)
17
-
18
- ```html
19
- <link rel="stylesheet" href="https://unpkg.com/@citron-systems/citron-ds/dist/css/inkblot-variables.css">
20
- ```
21
-
22
- ---
23
-
24
- ## Quick Start
25
-
26
- ### CSS (recommended)
27
-
28
- ```css
29
- @import '@citron-systems/citron-ds/css';
30
-
31
- .button {
32
- background: var(--inkblot-semantic-color-interactive-primary);
33
- color: var(--inkblot-semantic-color-text-inverse);
34
- padding: var(--inkblot-spacing-3) var(--inkblot-spacing-6);
35
- border-radius: var(--inkblot-radius-lg);
36
- font-weight: var(--inkblot-typography-font-weight-medium);
37
- min-height: var(--inkblot-size-touch-target-min);
38
- transition: all var(--inkblot-duration-fast) var(--inkblot-easing-default);
39
- }
40
- ```
41
-
42
- ### SCSS
43
-
44
- ```scss
45
- @use '@citron-systems/citron-ds/scss' as *;
46
-
47
- .card {
48
- background: var(--inkblot-semantic-color-background-secondary);
49
- border: 1px solid var(--inkblot-semantic-color-border-default);
50
- border-radius: var(--inkblot-radius-xl);
51
- padding: var(--inkblot-spacing-6);
52
- }
53
- ```
54
-
55
- ### JavaScript / ESM
56
-
57
- ```javascript
58
- import {
59
- InkblotColorAccentCitron500,
60
- InkblotSpacing4,
61
- InkblotRadiusLg,
62
- } from '@citron-systems/citron-ds';
63
-
64
- // Use in JS-driven styling (e.g. React inline, Canvas, etc.)
65
- const styles = {
66
- backgroundColor: InkblotColorAccentCitron500,
67
- padding: InkblotSpacing4,
68
- borderRadius: InkblotRadiusLg,
69
- };
70
- ```
71
-
72
- ### JSON (for tooling, build scripts, AI)
73
-
74
- ```javascript
75
- import tokens from '@citron-systems/citron-ds/tokens';
76
- // Flat resolved values: { "inkblot.color.accent.citron.500": "#c4a030", ... }
77
- ```
78
-
79
- ---
80
-
81
- ## Package Exports
82
-
83
- | Import path | Contents |
84
- |-------------|----------|
85
- | `@citron-systems/citron-ds` | ESM JS tokens (default) |
86
- | `@citron-systems/citron-ds/css` | CSS variables (`:root`) |
87
- | `@citron-systems/citron-ds/scss` | SCSS variables |
88
- | `@citron-systems/citron-ds/tokens` | Flat JSON (resolved values) |
89
- | `@citron-systems/citron-ds/ai-reference` | AI agent reference (token map, patterns, rules) |
90
-
91
- ---
92
-
93
- ## Principles
94
-
95
- - **Radical Clarity** One correct interpretation per rule. No ambiguity.
96
- - **Composable Independence** — Every component is self-contained and works in isolation.
97
- - **Universal Access** WCAG AAA. 7:1 contrast. 44px touch targets. Full keyboard nav.
98
- - **AI-First** Every token, component, and rule is machine-parseable JSON.
99
- - **Deliberate Restraint** Minimum visual complexity. Every element earns its place.
100
-
101
- ---
102
-
103
- ## Color Modes
104
-
105
- Light mode is default. Dark mode activates via:
106
-
107
- - `[data-theme="dark"]` on a parent element, or
108
- - `prefers-color-scheme: dark` (system preference)
109
-
110
- ---
111
-
112
- ## For AI Agents
113
-
114
- **Primary reference** (include in context): `@citron-systems/citron-ds/ai-reference`
115
-
116
- - CSS variable map for all semantic tokens
117
- - Composite patterns (form, card, modal, table, list item)
118
- - Breakpoints, grid, easing (in CSS format)
119
- - Icon semantics, CSS snippets, component spacing
120
- - Validation and ARIA patterns
121
-
122
- **Rule**: Always use semantic tokens (`var(--inkblot-semantic-color-*)`), never primitives.
123
-
124
- ---
125
-
126
- ## Standards
127
-
128
- - **Tokens**: [W3C Design Tokens Community Group](https://www.designtokens.org/)
129
- - **Build**: [Style Dictionary](https://styledictionary.com/) v4
130
- - **Accessibility**: WCAG 2.2 AAA
131
- - **Contrast**: 7:1 normal text, 4.5:1 large text, 3:1 UI components
132
-
133
- ---
134
-
135
- ## Development
136
-
137
- ```bash
138
- git clone https://github.com/GHDryanovski19/inkblot-studio-design-tokens.git
139
- cd inkblot-studio-design-tokens
140
- npm install
141
- npm run build
142
- npm run dev # Live preview at localhost:5173
143
- ```
144
-
145
- ---
146
-
147
- ## License
148
-
149
- MIT © Inkblot Studio
1
+ <div align="center">
2
+
3
+ <img src="assets/brand/readme-hero.svg" width="100%" alt="Citron Design Systemmascot and wordmark on citron-toned dark background" />
4
+
5
+ <br />
6
+
7
+ [![npm](https://img.shields.io/npm/v/@citron-systems/citron-ds?style=flat-square&logo=npm&logoColor=white&color=c4a030)](https://www.npmjs.com/package/@citron-systems/citron-ds)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-c4a030?style=flat-square)](https://opensource.org/licenses/MIT)
9
+ [![GitHub](https://img.shields.io/badge/repo-Inkblot--Studio%2Fcitron--ds-1a1814?style=flat-square&logo=github&logoColor=f5f0e6)](https://github.com/Inkblot-Studio/citron-ds)
10
+
11
+ **Citron** — Apple-inspired, accessible, AI-ready design tokens. Warmly minimal, quietly distinctive.
12
+
13
+ [Repository](https://github.com/Inkblot-Studio/citron-ds) · [npm package](https://www.npmjs.com/package/@citron-systems/citron-ds)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install @citron-systems/citron-ds
23
+ ```
24
+
25
+ ### CDN (no build step)
26
+
27
+ ```html
28
+ <link rel="stylesheet" href="https://unpkg.com/@citron-systems/citron-ds/dist/css/inkblot-variables.css">
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Quick Start
34
+
35
+ ### CSS (recommended)
36
+
37
+ ```css
38
+ @import '@citron-systems/citron-ds/css';
39
+
40
+ .button {
41
+ background: var(--inkblot-semantic-color-interactive-primary);
42
+ color: var(--inkblot-semantic-color-text-inverse);
43
+ padding: var(--inkblot-spacing-3) var(--inkblot-spacing-6);
44
+ border-radius: var(--inkblot-radius-lg);
45
+ font-weight: var(--inkblot-typography-font-weight-medium);
46
+ min-height: var(--inkblot-size-touch-target-min);
47
+ transition: all var(--inkblot-duration-fast) var(--inkblot-easing-default);
48
+ }
49
+ ```
50
+
51
+ ### SCSS
52
+
53
+ ```scss
54
+ @use '@citron-systems/citron-ds/scss' as *;
55
+
56
+ .card {
57
+ background: var(--inkblot-semantic-color-background-secondary);
58
+ border: 1px solid var(--inkblot-semantic-color-border-default);
59
+ border-radius: var(--inkblot-radius-xl);
60
+ padding: var(--inkblot-spacing-6);
61
+ }
62
+ ```
63
+
64
+ ### JavaScript / ESM
65
+
66
+ ```javascript
67
+ import {
68
+ InkblotColorAccentCitron500,
69
+ InkblotSpacing4,
70
+ InkblotRadiusLg,
71
+ } from '@citron-systems/citron-ds';
72
+
73
+ // Use in JS-driven styling (e.g. React inline, Canvas, etc.)
74
+ const styles = {
75
+ backgroundColor: InkblotColorAccentCitron500,
76
+ padding: InkblotSpacing4,
77
+ borderRadius: InkblotRadiusLg,
78
+ };
79
+ ```
80
+
81
+ ### JSON (for tooling, build scripts, AI)
82
+
83
+ ```javascript
84
+ import tokens from '@citron-systems/citron-ds/tokens';
85
+ // Flat resolved values: { "inkblot.color.accent.citron.500": "#c4a030", ... }
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Package exports
91
+
92
+ | Import path | Contents |
93
+ |-------------|----------|
94
+ | `@citron-systems/citron-ds` | ESM JS tokens (default) |
95
+ | `@citron-systems/citron-ds/css` | CSS variables (`:root`) |
96
+ | `@citron-systems/citron-ds/scss` | SCSS variables |
97
+ | `@citron-systems/citron-ds/tokens` | Flat JSON (resolved values) |
98
+ | `@citron-systems/citron-ds/ai-reference` | AI agent reference (token map, patterns, rules) |
99
+ | `@citron-systems/citron-ds/brand/citron-mascot.svg` | Citron mascot (full color; optional `--citron-mascot-fill`) |
100
+ | `@citron-systems/citron-ds/brand/citron-mascot-mono.svg` | Mascot lockup (`currentColor`) |
101
+ | `@citron-systems/citron-ds/bundle` | Bundle entry (`dist/bundle/README.md`) |
102
+ | `@citron-systems/citron-ds/bundle/*` | Resolved tokens, CSS/SCSS bundles, system JSON, etc. |
103
+ | `@citron-systems/citron-ds/preview/mascot.html` | Static mascot preview page |
104
+
105
+ ---
106
+
107
+ ## Brand assets
108
+
109
+ Source SVGs live in `assets/brand/`; `npm run build` copies them into `dist/brand/` for publishing. Import from the package as in the table above, or copy from `dist/brand/` in a checkout.
110
+
111
+ | File | Use |
112
+ |------|-----|
113
+ | `citron-mascot.svg` | Full-color mark (`#c4a030` citron **500**) |
114
+ | `citron-mascot-mono.svg` | Single-color / `currentColor` lockups |
115
+ | `readme-hero.svg` | README banner (warm dark + citron accent **900→950**) |
116
+
117
+ **GitHub (maintainers):** Set the repository **Social preview** (Settings General) to a **1280×640** image exported from `readme-hero.svg` (or a wider crop). Use `citron-mascot-mono.svg` for the repo or org avatar so the mark stays clear at small sizes.
118
+
119
+ ---
120
+
121
+ ## CLI
122
+
123
+ The **citron-mascot** binary prints the ASCII Citron mascot (with a short color animation in supported terminals).
124
+
125
+ From a project that already depends on this package:
126
+
127
+ ```bash
128
+ npx citron-mascot
129
+ ```
130
+
131
+ One-off without adding a dependency:
132
+
133
+ ```bash
134
+ npx --package=@citron-systems/citron-ds citron-mascot
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Principles
140
+
141
+ - **Radical Clarity** — One correct interpretation per rule. No ambiguity.
142
+ - **Composable Independence** Every component is self-contained and works in isolation.
143
+ - **Universal Access** — WCAG AAA. 7:1 contrast. 44px touch targets. Full keyboard nav.
144
+ - **AI-First** — Every token, component, and rule is machine-parseable JSON.
145
+ - **Deliberate Restraint** — Minimum visual complexity. Every element earns its place.
146
+
147
+ ---
148
+
149
+ ## Color modes
150
+
151
+ Light mode is default. Dark mode activates via:
152
+
153
+ - `[data-theme="dark"]` on a parent element, or
154
+ - `prefers-color-scheme: dark` (system preference)
155
+
156
+ ---
157
+
158
+ ## For AI agents
159
+
160
+ **Primary reference** (include in context): `@citron-systems/citron-ds/ai-reference`
161
+
162
+ - CSS variable map for all semantic tokens
163
+ - Composite patterns (form, card, modal, table, list item)
164
+ - Breakpoints, grid, easing (in CSS format)
165
+ - Icon semantics, CSS snippets, component spacing
166
+ - Validation and ARIA patterns
167
+
168
+ **Rule**: Always use semantic tokens (`var(--inkblot-semantic-color-*)`), never primitives.
169
+
170
+ ---
171
+
172
+ ## Standards
173
+
174
+ - **Tokens**: [W3C Design Tokens Community Group](https://www.designtokens.org/)
175
+ - **Build**: [Style Dictionary](https://styledictionary.com/) v4
176
+ - **Accessibility**: WCAG 2.2 AAA
177
+ - **Contrast**: 7:1 normal text, 4.5:1 large text, 3:1 UI components
178
+
179
+ ---
180
+
181
+ ## Development
182
+
183
+ ```bash
184
+ git clone https://github.com/Inkblot-Studio/citron-ds.git
185
+ cd citron-ds
186
+ npm install
187
+ npm run build
188
+ npm run dev # Live preview at localhost:5173
189
+ ```
190
+
191
+ - **`npm run build`** — Style Dictionary outputs plus copy steps for brand assets, mascot preview, and desktop bundle (`dist/`).
192
+ - **`prepublishOnly`** runs `npm run build` before `npm publish`.
193
+
194
+ ### Publish note (maintainers)
195
+
196
+ If you publish with **npm provenance** from GitHub Actions, `package.json` **`repository.url`** must point at the **same** GitHub repository as the workflow (otherwise the registry returns `422` provenance validation errors). Run `npm pkg fix` if npm warns about normalized fields during publish.
197
+
198
+ ---
199
+
200
+ ## Deploy preview to Vercel
201
+
202
+ 1. Push to GitHub and [import the repo](https://vercel.com/new) in Vercel.
203
+ 2. Vercel will auto-detect the build from `vercel.json`.
204
+ 3. Deploy — the preview site will be live.
205
+
206
+ Or deploy from the CLI:
207
+
208
+ ```bash
209
+ npm install -g vercel
210
+ npm run build:deploy
211
+ vercel --prod
212
+ ```
213
+
214
+ ---
215
+
216
+ ## License
217
+
218
+ MIT © Inkblot Studio
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from 'node:fs';
3
+ import { dirname, join } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const pkgPath = join(__dirname, '..', 'package.json');
8
+ const version = JSON.parse(readFileSync(pkgPath, 'utf8')).version ?? '0.0.0';
9
+
10
+ const CITRON = '\x1b[38;2;196;160;48m';
11
+ const DIM = '\x1b[2m';
12
+ const RESET = '\x1b[0m';
13
+
14
+ /**
15
+ * Compact ASCII: small pause eyes + stepped block smile (diagonal “wings”, solid base only).
16
+ * No extra rows that cross the mouth — avoids a busy / intersecting look. All lines = CANVAS_W.
17
+ */
18
+ export const MASCOT_CANVAS_W = 28;
19
+
20
+ export const SMILE_FRAMES = [
21
+ [
22
+ '',
23
+ '',
24
+ '',
25
+ ' ██ ██ ',
26
+ ' ██ ██ ',
27
+ ' ██ ██ ',
28
+ ' ██ ██ ',
29
+ ' ██████████ ',
30
+ '',
31
+ ' Citron ',
32
+ '',
33
+ ],
34
+ [
35
+ '',
36
+ '',
37
+ '',
38
+ ' ██ ██ ',
39
+ ' ██ ██ ',
40
+ '',
41
+ ' ██ ██ ',
42
+ ' ██ ██ ',
43
+ ' ██████████ ',
44
+ '',
45
+ ' Citron ',
46
+ '',
47
+ ],
48
+ ];
49
+
50
+ const ASCII = SMILE_FRAMES[0];
51
+
52
+ function usage() {
53
+ return `citron-mascot — Citron mascot in the terminal (${version})
54
+
55
+ Usage:
56
+ citron-mascot [options]
57
+ npm run mascot (in this repo)
58
+ npx --package @citron-systems/citron-ds citron-mascot
59
+
60
+ Options:
61
+ --animate Alternate smile frames a few times (TTY: clears screen between frames)
62
+ --no-color Plain text (also respects NO_COLOR=1)
63
+ --help, -h Show this message
64
+
65
+ Browser preview (no terminal): open dist/preview/mascot.html, or after npm install:
66
+ node_modules/@citron-systems/citron-ds/dist/preview/mascot.html
67
+ `;
68
+ }
69
+
70
+ function printMascot(lines, noColor) {
71
+ for (const line of lines) {
72
+ if (line === '' || noColor) {
73
+ process.stdout.write(line + '\n');
74
+ continue;
75
+ }
76
+ if (line.includes('Citron')) {
77
+ process.stdout.write(DIM + line + RESET + '\n');
78
+ continue;
79
+ }
80
+ process.stdout.write(CITRON + line + RESET + '\n');
81
+ }
82
+ }
83
+
84
+ async function main() {
85
+ const argv = process.argv.slice(2);
86
+ if (argv.includes('--help') || argv.includes('-h')) {
87
+ process.stdout.write(usage());
88
+ process.exit(0);
89
+ }
90
+
91
+ const noColor =
92
+ argv.includes('--no-color') ||
93
+ process.env.NO_COLOR === '1' ||
94
+ process.env.NO_COLOR === 'true' ||
95
+ !process.stdout.isTTY;
96
+
97
+ if (argv.includes('--animate')) {
98
+ const cycles = SMILE_FRAMES.length * 5;
99
+ for (let i = 0; i < cycles; i++) {
100
+ if (process.stdout.isTTY && !noColor) {
101
+ process.stdout.write('\x1b[2J\x1b[H');
102
+ }
103
+ printMascot(SMILE_FRAMES[i % SMILE_FRAMES.length], noColor);
104
+ if (i < cycles - 1) {
105
+ await new Promise((r) => setTimeout(r, 380));
106
+ }
107
+ }
108
+ return;
109
+ }
110
+
111
+ printMascot(ASCII, noColor);
112
+ }
113
+
114
+ main().catch((err) => {
115
+ process.stderr.write(String(err) + '\n');
116
+ process.exit(1);
117
+ });