@cameronsjo/artificer 0.28.0 → 0.29.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/README.md +7 -7
- package/bin/artificer.mjs +341 -5
- package/bin/lint-core.mjs +3 -2
- package/dist/react/chrome.d.ts +6 -2
- package/dist/react/chrome.d.ts.map +1 -1
- package/dist/react/chrome.js +4 -4
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/interactive.d.ts +52 -0
- package/dist/react/interactive.d.ts.map +1 -0
- package/dist/react/interactive.js +210 -0
- package/dist/react/primitives.d.ts +20 -5
- package/dist/react/primitives.d.ts.map +1 -1
- package/dist/react/primitives.js +37 -9
- package/package.json +2 -1
- package/reference/SKILL.md +4 -1
- package/src/artificer-options.js +1 -1
- package/src/artificer-sploot.js +1 -1
- package/src/artificer-tailwind.css +92 -0
- package/src/artificer-theme.js +31 -4
- package/src/artificer-whimsy.js +1 -1
- package/src/artificer.css +131 -5
- package/src/primitives.json +44 -1
- package/src/theme-bootstrap.html +4 -2
- package/src/tokens.json +2 -2
package/src/artificer.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
-
ARTIFICER · Design tokens · v0.
|
|
2
|
+
ARTIFICER · Design tokens · v0.29.1 (apothecary × deco × speakeasy)
|
|
3
3
|
AuDHD-optimized, Ghostty-rooted, with warm Jazz-Age accents.
|
|
4
4
|
Default theme = dark. Add data-theme="light" on <html> for ivory paper mode.
|
|
5
5
|
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
--success: #4a8a5e; /* apothecary green — completed, merged, autoAccept */
|
|
146
146
|
--success-fill: #2d6644; /* deep apothecary fill — badges/dots, ivory-on 5.67 AA */
|
|
147
147
|
--steel: #b8cad4; /* honest middle; meta / secondary UI */
|
|
148
|
-
--steel-fill: #
|
|
148
|
+
--steel-fill: #4a6878; /* deep steel fill — ivory-on 4.96 / bone-on 4.75 AA (#496) */
|
|
149
149
|
|
|
150
150
|
/* Brand — personal signature (gold + purple = Cameron). Not semantic.
|
|
151
151
|
bare = deep, NOT a foreground role (chart series-3, whimsy gradient stop).
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
--z-toast: 3000; /* @kind other */ /* always-on-top notifications */
|
|
226
226
|
|
|
227
227
|
/* Artificer v0.10.1 — baseline contract: see CLAUDE.md § Baseline contract */
|
|
228
|
-
--art-version: "0.
|
|
228
|
+
--art-version: "0.29.1"; /* @kind other */
|
|
229
229
|
|
|
230
230
|
color-scheme: dark;
|
|
231
231
|
}
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
--success: #2a5a3a; /* deep apothecary green */
|
|
257
257
|
--success-fill: #2a5a3a; /* fill == bare success in light; ivory-on 6.70 AA */
|
|
258
258
|
--steel: #2e4a5a;
|
|
259
|
-
--steel-fill: #
|
|
259
|
+
--steel-fill: #4a6878;
|
|
260
260
|
|
|
261
261
|
--brand-purple: #4a25a0; /* deep — chart series-3, whimsy gradient stop · 8.51:1 on ivory */
|
|
262
262
|
--brand-purple-bright: #5a35b0; /* lifted — syntax keyword foreground · 6.83:1 on ivory · v0.10.1 */
|
|
@@ -327,8 +327,19 @@
|
|
|
327
327
|
:root { --dur-instant: 0ms; /* @kind other */ --dur-fast: 0ms; /* @kind other */ --dur-max: 0ms; /* @kind other */ }
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
/* Cascade layer (#112): declare Tailwind's standard layer order so Artificer
|
|
331
|
+
always sits above `@layer base` (Preflight) and below `@layer utilities`
|
|
332
|
+
regardless of whether `artificer.css` is imported before or after Tailwind.
|
|
333
|
+
`@font-face` and `:root` custom properties stay outside the layer, and
|
|
334
|
+
unlayered consumer CSS overrides cleanly without specificity wars. */
|
|
335
|
+
@layer theme, base, components, utilities;
|
|
336
|
+
@layer components {
|
|
337
|
+
|
|
330
338
|
/* ═══ Base ══════════════════════════════════════════════════════════════ */
|
|
331
339
|
*, *::before, *::after { box-sizing: border-box; }
|
|
340
|
+
/* Honor the standard HTML hidden attribute even on display-setting primitives
|
|
341
|
+
(.btn, .cluster, .stack, etc.), which otherwise beat the UA rule (#581). */
|
|
342
|
+
[hidden] { display: none !important; }
|
|
332
343
|
|
|
333
344
|
/* The root is NEVER overridden (#211). html stays at the browser preference
|
|
334
345
|
(100% of the user's setting; 16px by default) so every rem-bound --t-*-size
|
|
@@ -492,7 +503,10 @@ a:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offse
|
|
|
492
503
|
.btn:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
|
|
493
504
|
|
|
494
505
|
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
|
|
495
|
-
|
|
506
|
+
/* Lift the gold fill rather than swapping to --accent-bright (#866010 in light
|
|
507
|
+
mode dropped ink-on-hover to 2.76:1; brightness lift stays >= 6:1 in both
|
|
508
|
+
modes, matching .btn--destructive:hover — #575). */
|
|
509
|
+
.btn--primary:hover { filter: brightness(1.08); }
|
|
496
510
|
|
|
497
511
|
.btn--secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
|
|
498
512
|
.btn--secondary:hover { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent-bright); border-color: var(--accent-bright); }
|
|
@@ -565,6 +579,8 @@ a:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offse
|
|
|
565
579
|
transition: border-color var(--dur-fast) var(--ease);
|
|
566
580
|
}
|
|
567
581
|
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); }
|
|
582
|
+
/* Opt-in auto-growing textarea via CSS field-sizing (progressive enhancement, #586). */
|
|
583
|
+
.textarea--auto { field-sizing: content; }
|
|
568
584
|
.input::placeholder { color: var(--fg-disabled); }
|
|
569
585
|
.input[aria-invalid="true"] { border-color: var(--urgent); }
|
|
570
586
|
/* Custom indicator for .select — appearance:none lets iOS WebKit honour
|
|
@@ -853,6 +869,7 @@ hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--
|
|
|
853
869
|
width: 100%; max-width: 480px;
|
|
854
870
|
box-shadow: var(--shadow-overlay);
|
|
855
871
|
border: 1px solid var(--border);
|
|
872
|
+
overscroll-behavior: contain;
|
|
856
873
|
animation: modal-in var(--dur-fast) var(--ease);
|
|
857
874
|
}
|
|
858
875
|
.modal--lg { max-width: 720px; }
|
|
@@ -1726,6 +1743,7 @@ select:focus-visible,
|
|
|
1726
1743
|
padding: var(--s-md);
|
|
1727
1744
|
background: var(--bg-raised); border: 1px solid var(--border);
|
|
1728
1745
|
border-radius: var(--radius-md);
|
|
1746
|
+
overscroll-behavior: contain;
|
|
1729
1747
|
}
|
|
1730
1748
|
/* Group label. Hierarchy at scale (#94): a long spine of uniform 44px rows
|
|
1731
1749
|
reads flat with only the active row as an anchor, so the header is made to
|
|
@@ -1904,6 +1922,8 @@ select:focus-visible,
|
|
|
1904
1922
|
position: fixed; top: 0; bottom: 0; left: 0;
|
|
1905
1923
|
z-index: calc(var(--z-modal) + 1);
|
|
1906
1924
|
width: min(280px, 80vw); overflow-y: auto;
|
|
1925
|
+
overscroll-behavior: contain;
|
|
1926
|
+
scrollbar-gutter: stable;
|
|
1907
1927
|
transform: translateX(-100%);
|
|
1908
1928
|
transition: transform var(--dur-max) var(--ease);
|
|
1909
1929
|
}
|
|
@@ -2131,6 +2151,9 @@ select:focus-visible,
|
|
|
2131
2151
|
/* Every button is a touch target, classed or not — demo buttons, page-local
|
|
2132
2152
|
buttons, and library buttons all get the floor. Both dimensions per WCAG 2.5.5. */
|
|
2133
2153
|
button, .btn, .theme-toggle { min-height: 44px; min-width: 44px; }
|
|
2154
|
+
/* .figure__bar > .btn--icon shrinks to --s-xl (32px) on desktop with (0,2,0)
|
|
2155
|
+
specificity; explicitly restore the 44×44 touch floor on coarse pointers (#529). */
|
|
2156
|
+
.figure__bar > .btn--icon { width: 44px; height: 44px; min-width: 44px; }
|
|
2134
2157
|
/* All text-like inputs (text/search/email/number/password/date/url/tel...).
|
|
2135
2158
|
Width left to the layout (inputs fill their container; min-width here
|
|
2136
2159
|
would fight flex/grid shrink and break compact search bars). */
|
|
@@ -2307,6 +2330,21 @@ select:focus-visible,
|
|
|
2307
2330
|
min-width: 0; /* belt-and-suspenders with the minmax(0,1fr) main track */
|
|
2308
2331
|
overflow-x: clip; /* a rogue wide child clips here, never scrolls the page */
|
|
2309
2332
|
}
|
|
2333
|
+
/* Contained shell (#532): when .app-shell sits inside a .container (e.g. with
|
|
2334
|
+
.appbar/intro above it), drop the 100dvh floor so it stays content-sized. */
|
|
2335
|
+
.app-shell--contained { min-height: auto; }
|
|
2336
|
+
/* Flush content (#532): when an outer .container already supplies inline
|
|
2337
|
+
gutters, zero the bleed-grid's --s-lg side tracks without losing [bleed-*]
|
|
2338
|
+
lines, and expand the clip box by one focus ring so overflow-x: clip never
|
|
2339
|
+
slices focus outlines on leftmost controls. */
|
|
2340
|
+
.app-shell__content--flush {
|
|
2341
|
+
grid-template-columns:
|
|
2342
|
+
[bleed-start] 0
|
|
2343
|
+
[content-start] minmax(0, 1fr) [content-end]
|
|
2344
|
+
0 [bleed-end];
|
|
2345
|
+
padding-inline: calc(var(--focus-width) + var(--focus-offset));
|
|
2346
|
+
margin-inline: calc(-1 * (var(--focus-width) + var(--focus-offset)));
|
|
2347
|
+
}
|
|
2310
2348
|
@media (max-width: 800px) {
|
|
2311
2349
|
.app-shell { grid-template-columns: [main-start] minmax(0, 1fr) [main-end]; }
|
|
2312
2350
|
.app-shell > .sidenav { display: none; } /* the .nav-drawer takes over */
|
|
@@ -2671,3 +2709,91 @@ select:focus-visible,
|
|
|
2671
2709
|
/* motion suppressed → static low-opacity full track; the copy carries meaning */
|
|
2672
2710
|
.progress--indeterminate .progress__bar { animation: none; width: 100%; opacity: .4; }
|
|
2673
2711
|
}
|
|
2712
|
+
|
|
2713
|
+
/* ═══ Inline alert — static in-flow notice inside a card or form ════════
|
|
2714
|
+
Distinct from .banner (full-width page-level) and .notif (toast). Tiered
|
|
2715
|
+
by action required: --urgent (uses --urgent-text for AA title), --attention,
|
|
2716
|
+
--info (default), --success. */
|
|
2717
|
+
.alert {
|
|
2718
|
+
display: flex; align-items: flex-start; gap: var(--s-sm);
|
|
2719
|
+
padding: var(--s-sm) var(--s-md);
|
|
2720
|
+
background: var(--bg-raised);
|
|
2721
|
+
border: 1px solid var(--border);
|
|
2722
|
+
border-left: 3px solid var(--steel);
|
|
2723
|
+
border-radius: var(--radius-md);
|
|
2724
|
+
color: var(--fg);
|
|
2725
|
+
font-size: var(--t-body-md-size);
|
|
2726
|
+
line-height: var(--t-body-md-lh);
|
|
2727
|
+
}
|
|
2728
|
+
.alert__body { flex: 1; min-width: 0; }
|
|
2729
|
+
.alert__title {
|
|
2730
|
+
margin: 0;
|
|
2731
|
+
font-family: var(--font-interface);
|
|
2732
|
+
font-weight: 600;
|
|
2733
|
+
font-size: var(--t-label-md-size);
|
|
2734
|
+
line-height: var(--t-label-md-lh);
|
|
2735
|
+
}
|
|
2736
|
+
.alert__msg { margin: var(--s-xs) 0 0; color: var(--fg-secondary); }
|
|
2737
|
+
.alert--urgent { border-left-color: var(--urgent); }
|
|
2738
|
+
.alert--urgent .alert__title { color: var(--urgent-text); }
|
|
2739
|
+
.alert--attention { border-left-color: var(--attention); }
|
|
2740
|
+
.alert--info { border-left-color: var(--steel); }
|
|
2741
|
+
.alert--success { border-left-color: var(--success); }
|
|
2742
|
+
|
|
2743
|
+
/* ═══ Button group — joined/segmented control row ═══════════════════════
|
|
2744
|
+
Collapses interior radii and shares the dividing border. Focused buttons
|
|
2745
|
+
lift onto --z-raised so focus rings are never clipped by siblings. */
|
|
2746
|
+
.btn-group { display: inline-flex; align-items: stretch; }
|
|
2747
|
+
.btn-group > .btn { border-radius: 0; position: relative; }
|
|
2748
|
+
.btn-group > .btn:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
|
|
2749
|
+
.btn-group > .btn:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
|
|
2750
|
+
.btn-group > .btn:not(:first-child) { margin-left: -1px; }
|
|
2751
|
+
.btn-group > .btn:hover,
|
|
2752
|
+
.btn-group > .btn:focus-visible,
|
|
2753
|
+
.btn-group > .btn[aria-pressed="true"] { z-index: var(--z-raised); }
|
|
2754
|
+
|
|
2755
|
+
/* ═══ List group — bordered vertical stack of rows ══════════════════════ */
|
|
2756
|
+
.list-group {
|
|
2757
|
+
display: flex; flex-direction: column;
|
|
2758
|
+
margin: 0; padding: 0; list-style: none;
|
|
2759
|
+
background: var(--bg-raised);
|
|
2760
|
+
border: 1px solid var(--border);
|
|
2761
|
+
border-radius: var(--radius-md);
|
|
2762
|
+
overflow: hidden;
|
|
2763
|
+
}
|
|
2764
|
+
.list-group__item {
|
|
2765
|
+
display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm);
|
|
2766
|
+
padding: var(--s-sm) var(--s-md);
|
|
2767
|
+
color: var(--fg);
|
|
2768
|
+
text-decoration: none;
|
|
2769
|
+
background: transparent;
|
|
2770
|
+
border: 0;
|
|
2771
|
+
font: inherit;
|
|
2772
|
+
text-align: left;
|
|
2773
|
+
width: 100%;
|
|
2774
|
+
}
|
|
2775
|
+
.list-group__item + .list-group__item { border-top: 1px solid var(--border); }
|
|
2776
|
+
a.list-group__item,
|
|
2777
|
+
button.list-group__item {
|
|
2778
|
+
cursor: pointer;
|
|
2779
|
+
transition: background var(--dur-instant) var(--ease), color var(--dur-instant) var(--ease);
|
|
2780
|
+
}
|
|
2781
|
+
@media (hover: hover) {
|
|
2782
|
+
a.list-group__item:hover,
|
|
2783
|
+
button.list-group__item:hover { background: var(--bg-overlay); }
|
|
2784
|
+
}
|
|
2785
|
+
a.list-group__item:focus-visible,
|
|
2786
|
+
button.list-group__item:focus-visible {
|
|
2787
|
+
outline: var(--focus-width) solid var(--accent);
|
|
2788
|
+
outline-offset: var(--focus-offset-inset);
|
|
2789
|
+
}
|
|
2790
|
+
.list-group__item--active {
|
|
2791
|
+
background: var(--bg-overlay);
|
|
2792
|
+
box-shadow: inset 3px 0 0 var(--accent);
|
|
2793
|
+
}
|
|
2794
|
+
@media (pointer: coarse) {
|
|
2795
|
+
a.list-group__item,
|
|
2796
|
+
button.list-group__item { min-height: 44px; }
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
} /* end @layer components */
|
package/src/primitives.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schemaVersion": "1",
|
|
3
|
-
"$version": "0.
|
|
3
|
+
"$version": "0.29.1",
|
|
4
4
|
"$doc": "Primitive mint ledger (ADR 0037, #199). Provenance + adoption semantics for every shipped primitive. tokens.json owns token VALUES; scripts/css-token-set.baseline.json owns the token SET; this file owns grouping, vintage, recipes, and adoption signals. Gated by scripts/check-primitives.mjs (check:primitives). minted 'pending-backfill' marks an entry awaiting mechanical dating (all dated by #199 PR-3's backfill; the sentinel remains legal for future re-derivations); 'unreleased' marks a mint on a feature branch, swept to the release version by sync:primitives-vintage. The 'js' field names a VANILLA src/ behavior module (data- hook + window API); the 'react' field names the compiled React adapter component(s) for the primitive (@cameronsjo/artificer/react) — distinct fields because they are distinct consumption models.",
|
|
5
5
|
"primitives": {
|
|
6
6
|
"stack": {
|
|
@@ -1061,6 +1061,49 @@
|
|
|
1061
1061
|
"adoption": {
|
|
1062
1062
|
"supersedes": "hand-rolled --bg-raised + accent border-left note blocks"
|
|
1063
1063
|
}
|
|
1064
|
+
},
|
|
1065
|
+
"alert": {
|
|
1066
|
+
"kind": "component",
|
|
1067
|
+
"minted": "0.29.0",
|
|
1068
|
+
"classes": [
|
|
1069
|
+
"alert",
|
|
1070
|
+
"alert__body",
|
|
1071
|
+
"alert__title",
|
|
1072
|
+
"alert__msg",
|
|
1073
|
+
"alert--urgent",
|
|
1074
|
+
"alert--attention",
|
|
1075
|
+
"alert--info",
|
|
1076
|
+
"alert--success"
|
|
1077
|
+
],
|
|
1078
|
+
"react": [
|
|
1079
|
+
"Alert"
|
|
1080
|
+
],
|
|
1081
|
+
"recipe": "Inline static alert inside a card or form"
|
|
1082
|
+
},
|
|
1083
|
+
"btn-group": {
|
|
1084
|
+
"kind": "component",
|
|
1085
|
+
"minted": "0.29.0",
|
|
1086
|
+
"classes": [
|
|
1087
|
+
"btn-group"
|
|
1088
|
+
],
|
|
1089
|
+
"react": [
|
|
1090
|
+
"ButtonGroup"
|
|
1091
|
+
],
|
|
1092
|
+
"recipe": "Joined/segmented button row"
|
|
1093
|
+
},
|
|
1094
|
+
"list-group": {
|
|
1095
|
+
"kind": "component",
|
|
1096
|
+
"minted": "0.29.0",
|
|
1097
|
+
"classes": [
|
|
1098
|
+
"list-group",
|
|
1099
|
+
"list-group__item",
|
|
1100
|
+
"list-group__item--active"
|
|
1101
|
+
],
|
|
1102
|
+
"react": [
|
|
1103
|
+
"ListGroup",
|
|
1104
|
+
"ListGroupItem"
|
|
1105
|
+
],
|
|
1106
|
+
"recipe": "Bordered vertical stack of rows"
|
|
1064
1107
|
}
|
|
1065
1108
|
},
|
|
1066
1109
|
"versions": {
|
package/src/theme-bootstrap.html
CHANGED
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
var pinned = saved === 'light' || saved === 'dark';
|
|
18
18
|
var prefersLight = window.matchMedia &&
|
|
19
19
|
window.matchMedia('(prefers-color-scheme: light)').matches;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var theme = pinned ? saved : (prefersLight ? 'light' : 'dark');
|
|
21
|
+
document.documentElement.setAttribute('data-theme', theme);
|
|
22
|
+
var meta = document.querySelector && document.querySelector('meta[name="color-scheme"]');
|
|
23
|
+
if (meta) meta.setAttribute('content', pinned ? theme : 'light dark');
|
|
22
24
|
} catch (e) {
|
|
23
25
|
document.documentElement.setAttribute('data-theme', 'dark'); /* fail-safe to brand surface, never light */
|
|
24
26
|
}
|
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.29.1",
|
|
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.",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
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." },
|
|
39
39
|
|
|
40
40
|
"steel": { "dark": "#b8cad4", "light": "#2e4a5a", "use": "Steel blue — honest middle / chrome / secondary UI text / paths." },
|
|
41
|
-
"steelFill": { "dark": "#
|
|
41
|
+
"steelFill": { "dark": "#4a6878", "light": "#4a6878", "use": "Steel fill — meta badges." },
|
|
42
42
|
|
|
43
43
|
"diffAddBg": { "dark": "#1f3a28", "light": "#d8e4cc", "use": "Diff +added background. Derived tint of --success: same hue, knocked-down lightness." },
|
|
44
44
|
"diffDelBg": { "dark": "#3a1f1d", "light": "#ecd6d4", "use": "Diff -removed background. Derived tint of --urgent. Dimmer than diffAdd by design — destructive shouldn't out-shout success." }
|