@citron-systems/citron-ds 1.0.0 → 1.0.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.
Files changed (61) hide show
  1. package/README.md +163 -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/bundle/README.md +28 -0
  9. package/dist/bundle/ai-reference.json +582 -0
  10. package/dist/bundle/brand/citron-mascot-mono.svg +17 -0
  11. package/dist/bundle/brand/citron-mascot.svg +21 -0
  12. package/dist/bundle/preview/mascot.html +72 -0
  13. package/dist/bundle/system/ai.json +168 -0
  14. package/dist/bundle/system/cli.json +340 -0
  15. package/dist/bundle/system/components.json +304 -0
  16. package/dist/bundle/system/content.json +168 -0
  17. package/dist/bundle/system/devtools.json +95 -0
  18. package/dist/bundle/system/foundations.json +121 -0
  19. package/dist/bundle/system/grid.json +101 -0
  20. package/dist/bundle/system/icons.json +507 -0
  21. package/dist/bundle/system/index.json +57 -0
  22. package/dist/bundle/system/inkblot-ai-reference.json +582 -0
  23. package/dist/bundle/system/motion.json +159 -0
  24. package/dist/bundle/tokens/primitive/breakpoint.tokens.json +14 -0
  25. package/dist/bundle/tokens/primitive/color.tokens.json +71 -0
  26. package/dist/bundle/tokens/primitive/devtools.palette.tokens.json +55 -0
  27. package/dist/bundle/tokens/primitive/duration.tokens.json +38 -0
  28. package/dist/bundle/tokens/primitive/grid.tokens.json +34 -0
  29. package/dist/bundle/tokens/primitive/radius.tokens.json +26 -0
  30. package/dist/bundle/tokens/primitive/shadow.tokens.json +41 -0
  31. package/dist/bundle/tokens/primitive/spacing.tokens.json +38 -0
  32. package/dist/bundle/tokens/primitive/typography.tokens.json +60 -0
  33. package/dist/bundle/tokens/primitive/zindex.tokens.json +19 -0
  34. package/dist/bundle/tokens/semantic/dark.tokens.json +43 -0
  35. package/dist/bundle/tokens/semantic/devtools.semantic.tokens.json +79 -0
  36. package/dist/bundle/tokens/semantic/inkblot.semantic.tokens.json +140 -0
  37. package/dist/bundle/tokens-schema.json +54 -0
  38. package/dist/bundle/tokens.flat.json +224 -0
  39. package/dist/bundle/tokens.resolved.json +224 -0
  40. package/dist/bundle/variables.css +228 -0
  41. package/dist/bundle/variables.scss +225 -0
  42. package/dist/css/inkblot-variables.css +25 -0
  43. package/dist/index.html +956 -0
  44. package/dist/js/inkblot-tokens.js +25 -0
  45. package/dist/js/inkblot-tokens.json +25 -0
  46. package/dist/preview/mascot.html +72 -0
  47. package/dist/scss/_inkblot-variables.scss +25 -0
  48. package/package.json +73 -61
  49. package/tokens/primitive/breakpoint.tokens.json +14 -14
  50. package/tokens/primitive/color.tokens.json +71 -71
  51. package/tokens/primitive/devtools.palette.tokens.json +55 -0
  52. package/tokens/primitive/duration.tokens.json +38 -38
  53. package/tokens/primitive/grid.tokens.json +34 -34
  54. package/tokens/primitive/radius.tokens.json +26 -26
  55. package/tokens/primitive/shadow.tokens.json +41 -41
  56. package/tokens/primitive/spacing.tokens.json +38 -38
  57. package/tokens/primitive/typography.tokens.json +60 -60
  58. package/tokens/primitive/zindex.tokens.json +19 -19
  59. package/tokens/semantic/dark.tokens.json +43 -43
  60. package/tokens/semantic/devtools.semantic.tokens.json +79 -0
  61. package/tokens/semantic/inkblot.semantic.tokens.json +140 -140
package/README.md CHANGED
@@ -1,149 +1,163 @@
1
- # @citron-systems/citron-ds
2
-
3
- > Inkblot Studio design token system — Apple-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
+ # @citron-systems/citron-ds
2
+
3
+ > Inkblot Studio design token system — Apple-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
+ ## Deploy preview to Vercel
146
+
147
+ 1. Push to GitHub and [import the repo](https://vercel.com/new) in Vercel.
148
+ 2. Vercel will auto-detect the build from `vercel.json`.
149
+ 3. Deploy the preview site will be live.
150
+
151
+ Or deploy from the CLI:
152
+
153
+ ```bash
154
+ npm install -g vercel
155
+ npm run build:deploy
156
+ vercel --prod
157
+ ```
158
+
159
+ ---
160
+
161
+ ## License
162
+
163
+ 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
+ });