@cameronsjo/artificer 0.18.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -6
- package/bin/artificer.mjs +655 -0
- package/bin/lint-core.mjs +151 -0
- package/package.json +11 -3
- package/reference/SKILL.md +407 -0
- package/src/artificer-editorial.css +40 -0
- package/src/artificer-icons.js +122 -45
- package/src/artificer-theme.js +115 -25
- package/src/artificer-whimsy.css +15 -1
- package/src/artificer-whimsy.js +155 -12
- package/src/artificer.css +85 -8
- package/src/primitives.json +1084 -0
- package/src/theme-bootstrap.html +6 -3
- package/src/tokens.json +7 -4
package/src/theme-bootstrap.html
CHANGED
|
@@ -7,15 +7,18 @@
|
|
|
7
7
|
This is part of the Artificer v0.9.0 Baseline contract — see CLAUDE.md
|
|
8
8
|
§ Baseline contract. The localStorage key 'artificer.theme' MUST match
|
|
9
9
|
the key artificer-theme.js reads/writes; do not rename without aligning.
|
|
10
|
+
Only a pinned 'dark'/'light' applies verbatim — 'auto' (or anything
|
|
11
|
+
else) follows the OS preference, matching the module's mode model.
|
|
10
12
|
Fail-safe defaults to dark (the system's primary surface), never light. -->
|
|
11
13
|
<script>
|
|
12
14
|
(function () {
|
|
13
15
|
try {
|
|
14
16
|
var saved = localStorage.getItem('artificer.theme');
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
+
var pinned = saved === 'light' || saved === 'dark';
|
|
18
|
+
var prefersLight = window.matchMedia &&
|
|
19
|
+
window.matchMedia('(prefers-color-scheme: light)').matches;
|
|
17
20
|
document.documentElement.setAttribute(
|
|
18
|
-
'data-theme', saved
|
|
21
|
+
'data-theme', pinned ? saved : (prefersLight ? 'light' : 'dark'));
|
|
19
22
|
} catch (e) {
|
|
20
23
|
document.documentElement.setAttribute('data-theme', 'dark'); /* fail-safe to brand surface, never light */
|
|
21
24
|
}
|
package/src/tokens.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://design-tokens.org/schema.json",
|
|
3
3
|
"$description": "Artificer · Cameron's personal design system. Machine-readable token export. Mirrors artificer.css. Source of truth lives in the CSS — regenerate this file if tokens change there.",
|
|
4
|
-
"$version": "0.
|
|
4
|
+
"$version": "0.21.0",
|
|
5
5
|
|
|
6
6
|
"color": {
|
|
7
7
|
"$description": "All colors paired with their dark/light values. AAA-tuned where indicated. v0.6 palette: apothecary × deco × speakeasy.",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
"semantic": {
|
|
26
26
|
"accent": { "dark": "#dbbb6f", "light": "#7a5a10", "use": "Burnished gold — interactive text/icons. Links, focus, secondary-button border." },
|
|
27
|
-
"accentBright": { "dark": "#e3c885", "light": "#
|
|
27
|
+
"accentBright": { "dark": "#e3c885", "light": "#866010", "use": "Hover state for accent." },
|
|
28
28
|
"accentFill": { "dark": "#c4932a", "light": "#c4932a", "use": "Deep gold fill — primary button background, badge fill, selection bg. Pair with --on-accent text." },
|
|
29
29
|
|
|
30
30
|
"attention": { "dark": "#c4808a", "light": "#8a6618", "use": "Dusty rose — \"look when you can\" text/icons. Promoted from light pink in v0.6." },
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
"urgent": { "dark": "#a04540", "light": "#8a2418", "use": "Brick — destructive, errors, blocking. Replaced vermillion in v0.6 (better separation from gold)." },
|
|
34
34
|
"urgentFill": { "dark": "#a04540", "light": "#a04540", "use": "Brick fill — destructive buttons, urgent badges. Pair with --on-urgent text." },
|
|
35
|
+
"urgentText": { "dark": "#e6a8a2", "light": "#8a2418", "use": "Lifted error-text red for body copy — bare urgent fails AA as text. Dark #e6a8a2 (bg 6.98 / bgRaised 6.12 / bgOverlay 5.08); light #8a2418 (= urgent) on ivory 7.49. Bound to --urgent-text, consumed by .field>.error. Minted v0.19.0 (#122-B)." },
|
|
35
36
|
|
|
36
37
|
"success": { "dark": "#4a8a5e", "light": "#2a5a3a", "use": "Apothecary green — completed states, success badges, autoAccept, merged. Replaced olive in v0.6." },
|
|
37
38
|
"successFill": { "dark": "#2d6644", "light": "#2a5a3a", "use": "Deep apothecary fill — success badges/dots/chips; deeper than bare success so ivory-on clears AA (5.67:1 dark / 6.70:1 light). Pair with --on-success text." },
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
|
|
60
61
|
"onColor": {
|
|
61
62
|
"$description": "Text color to use when content sits on a colored fill. Pre-checked for AAA where possible.",
|
|
62
|
-
"onAccent": { "dark": "#20203e", "light": "#
|
|
63
|
+
"onAccent": { "dark": "#20203e", "light": "#20203e", "use": "Text on --accent-fill. Ink on gold — light flipped ivory→ink v0.19.0 (#122-A): 2.32→5.65:1." },
|
|
63
64
|
"onAttention": { "dark": "#20203e", "light": "#20203e", "use": "Text on --attention-fill." },
|
|
64
65
|
"onUrgent": { "dark": "#f5ead0", "light": "#f5ead0", "use": "Text on --urgent-fill. Ivory on brick." },
|
|
65
66
|
"onSuccess": { "dark": "#f5ead0", "light": "#f5ead0", "use": "Text on --success. Ivory on apothecary green." }
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"bodyMd": { "size": "0.875rem", "lineHeight": 1.6, "weight": 400, "family": "sans" },
|
|
80
81
|
"labelMd": { "size": "0.8125rem", "lineHeight": 1.3, "weight": 500, "family": "sans" },
|
|
81
82
|
"labelSm": { "size": "0.75rem", "lineHeight": 1.3, "weight": 400, "family": "sans" },
|
|
83
|
+
"labelXs": { "size": "0.6875rem", "lineHeight": 1.3, "weight": 500, "family": "sans" },
|
|
82
84
|
"code": { "size": "0.875rem", "lineHeight": 1.5, "weight": 400, "family": "mono" }
|
|
83
85
|
},
|
|
84
86
|
"letterSpacing": "0.01em",
|
|
@@ -91,7 +93,8 @@
|
|
|
91
93
|
"md": "16px",
|
|
92
94
|
"lg": "24px",
|
|
93
95
|
"xl": "32px",
|
|
94
|
-
"2xl": "48px"
|
|
96
|
+
"2xl": "48px",
|
|
97
|
+
"3xl": "96px"
|
|
95
98
|
},
|
|
96
99
|
|
|
97
100
|
"breakpoint": {
|