@cameronsjo/artificer 0.12.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/LICENSE +202 -0
- package/README.md +260 -0
- package/package.json +46 -0
- package/src/artificer-editorial.css +136 -0
- package/src/artificer-focus.js +47 -0
- package/src/artificer-icons.js +163 -0
- package/src/artificer-tabs.js +169 -0
- package/src/artificer-theme.js +63 -0
- package/src/artificer-whimsy.css +317 -0
- package/src/artificer-whimsy.js +184 -0
- package/src/artificer.css +1478 -0
- package/src/assets/favicon.svg +9 -0
- package/src/assets/fonts/ia-writer-quattro-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-400.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-700-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-700.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-400.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-700-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-s-700.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-v-400-italic.woff2 +0 -0
- package/src/assets/fonts/ia-writer-quattro-v-400.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-400.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-500.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-700.woff2 +0 -0
- package/src/assets/og-image.png +0 -0
- package/src/assets/og-image.svg +54 -0
- package/src/print.css +167 -0
- package/src/theme-bootstrap.html +23 -0
- package/src/tokens.json +169 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Artificer · Design System Handoff
|
|
2
|
+
|
|
3
|
+
Cameron's personal design system, packaged for use in real codebases.
|
|
4
|
+
**v0.8.0 · 2026** — Whimsy layer added; syntax palette ratified at v0.7.2 (new `fgMuted` role). See `CHANGELOG.md` for what changed.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## What this is
|
|
9
|
+
|
|
10
|
+
A complete, self-contained design system you can drop into any project. Five files do the heavy lifting:
|
|
11
|
+
|
|
12
|
+
| File | What it gives you |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `src/artificer.css` | All tokens (color, type, space, radius, motion, z) + every component class. **Just add this stylesheet and you have the system.** |
|
|
15
|
+
| `src/artificer-theme.js` | Persistent dark/cream theme toggle, reads `localStorage`, respects `prefers-color-scheme` on first load. |
|
|
16
|
+
| `src/artificer-focus.js` | `ArtificerFocus.trap(el, {onEscape})` — focus-trap helper for modals, dialogs, command palettes. |
|
|
17
|
+
| `src/artificer-icons.js` | Lucide-rooted icon set. Hydrates `<i data-icon="search">` placeholders into inline SVG. |
|
|
18
|
+
| `src/tokens.json` | Machine-readable token export. For Tailwind, Figma, Style Dictionary, anything non-CSS. |
|
|
19
|
+
|
|
20
|
+
Plus `src/print.css` (paper-mode for PDF/print) and two SVG assets (favicon, OG card).
|
|
21
|
+
|
|
22
|
+
The optional **Whimsy** layer (`src/artificer-whimsy.css` + `src/artificer-whimsy.js`) is the *one sanctioned exception* to the no-looping-decoration / no-raw-color rules — a flowing burnished rainbow on text, for **user-defined fun elements** and whimsical operations only. Opt-in; load it after `artificer.css`. Full doctrine in `CLAUDE.md` § Whimsy; interactive reference + playground at `live-spec/whimsy.html`.
|
|
23
|
+
|
|
24
|
+
The full live spec for every component lives at the project URL (the HTML pages — `colors.html`, `typography.html`, `components.html`, etc). This bundle ships the source; visit the live system for the visual reference.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## What Artificer is for
|
|
29
|
+
|
|
30
|
+
**Use it for** — internal tools, dashboards, IDE-adjacent UI, terminals, dev/devops products, configuration UIs, productivity apps targeting power users.
|
|
31
|
+
|
|
32
|
+
**Don't use it for** — marketing sites, hero/landing pages, kid-facing UI, lifestyle/consumer-emotional brands. It's deliberately serious.
|
|
33
|
+
|
|
34
|
+
If you're not sure: Artificer treats the user as a peer with a job to do. If your audience is closer to "delight me" than "stop wasting my time," reach for a different system.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Install — three integration paths
|
|
39
|
+
|
|
40
|
+
### Path A · Vanilla HTML / static site (zero build)
|
|
41
|
+
|
|
42
|
+
Copy the `src/` folder into your project, then:
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<!doctype html>
|
|
46
|
+
<html lang="en" data-theme="dark">
|
|
47
|
+
<head>
|
|
48
|
+
<link rel="stylesheet" href="/artificer/artificer.css" />
|
|
49
|
+
<link rel="stylesheet" href="/artificer/print.css" media="print" />
|
|
50
|
+
<link rel="icon" type="image/svg+xml" href="/artificer/favicon.svg" />
|
|
51
|
+
<script src="/artificer/artificer-theme.js" defer></script>
|
|
52
|
+
<script src="/artificer/artificer-icons.js" defer></script>
|
|
53
|
+
</head>
|
|
54
|
+
<body>
|
|
55
|
+
<a href="#main" class="skip-link">Skip to content</a>
|
|
56
|
+
<button class="theme-toggle" data-theme-toggle aria-label="Toggle theme">
|
|
57
|
+
<span class="dot"></span><span data-theme-label>Dark</span>
|
|
58
|
+
</button>
|
|
59
|
+
<main id="main" class="container container--md">…</main>
|
|
60
|
+
</body>
|
|
61
|
+
</html>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
That's it. Use the utility classes (`.btn`, `.card`, `.stack`, `.cluster`, etc.).
|
|
65
|
+
|
|
66
|
+
### Path B · Modern bundler (Vite / Webpack / Next / Nuxt)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Drop src/ into your design system folder
|
|
70
|
+
cp -r src/ packages/artificer/
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
// In your app entry (e.g. src/main.ts, app/layout.tsx)
|
|
75
|
+
import 'artificer/artificer.css'
|
|
76
|
+
import 'artificer/artificer-theme.js'
|
|
77
|
+
import 'artificer/artificer-focus.js' // only if using modals
|
|
78
|
+
import 'artificer/artificer-icons.js' // only if using <i data-icon>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The CSS uses CSS custom properties (variables) and `data-theme` attribute — no preprocessing needed.
|
|
82
|
+
|
|
83
|
+
### Path C · Tailwind / utility-first
|
|
84
|
+
|
|
85
|
+
The CSS already provides utility classes for layout (`.stack`, `.cluster`, `.grid-auto`, `.container`). For Tailwind shops, see `framework-adapters/tailwind.config.js` — it imports `tokens.json` so your Tailwind utilities use Artificer values.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## The non-negotiable rules
|
|
90
|
+
|
|
91
|
+
These came from research on AuDHD users; they are the system's spine. Don't refactor them away.
|
|
92
|
+
|
|
93
|
+
1. **Dark is default.** Cream/light is a paper alternative. Never auto-switch on system theme without storing user preference.
|
|
94
|
+
2. **One primary CTA per screen.** Always. If you need two equal-weight actions, you have a flow problem, not a design problem.
|
|
95
|
+
3. **Lists ≤ 7 items.** Beyond that: progressive disclosure, search, or grouping. Default to 5.
|
|
96
|
+
4. **Bold anchor words** in body copy — 3–5 per paragraph. They are the primary scan mechanism.
|
|
97
|
+
5. **Tier notifications by *action required*, not severity.** A blocking error and a casual heads-up are not the same shape.
|
|
98
|
+
6. **Active state is dramatic.** Inactive panes drop to 55% opacity + desaturated. Subtle differences fail the squint test.
|
|
99
|
+
7. **Tabular numbers everywhere.** `font-variant-numeric: tabular-nums` on every numeric column.
|
|
100
|
+
8. **Honor reduced-motion.** Already wired — durations collapse to 0ms. Don't re-introduce hard-coded transitions.
|
|
101
|
+
9. **WCAG 2.2 AA floor, AAA on body text.** Every contrast pairing is pre-measured. Don't introduce new color combos without checking.
|
|
102
|
+
10. **Pass the squint test.** If a visual hierarchy disappears at squint, the contrast is wrong.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## The decision recipe
|
|
107
|
+
|
|
108
|
+
When you need to build something, find it here first instead of improvising:
|
|
109
|
+
|
|
110
|
+
| You're building… | Reach for… |
|
|
111
|
+
|---|---|
|
|
112
|
+
| A page with sidebar + main | `.page-shell` + `.container--{sm,md,lg}` |
|
|
113
|
+
| Stacking children vertically | `.stack` (with `--xs/sm/md/lg/xl/2xl`) |
|
|
114
|
+
| Horizontal toolbar / chip row | `.cluster` |
|
|
115
|
+
| Card grid | `.grid-auto` with `--min: 240px` |
|
|
116
|
+
| Form field | `<div class="field">` with `.field__label` + `.input` + `.field__hint` |
|
|
117
|
+
| Validation error | `.field--invalid` + `aria-invalid="true"` + `aria-describedby` |
|
|
118
|
+
| Modal / dialog | `.scrim` + `.modal`, wire `ArtificerFocus.trap()` |
|
|
119
|
+
| Tooltip (label) | `.tooltip` |
|
|
120
|
+
| Popover (body content) | `.popover` |
|
|
121
|
+
| Toast / notification | `.notif` + tier modifier (`--urgent`, `--attention`, `--info`, `--background`) |
|
|
122
|
+
| Status pill | `.badge` + tier + `.dot` inside |
|
|
123
|
+
| Table of data | `.table` (add `.table--zebra` for dense data) |
|
|
124
|
+
| Headline number | Stat card pattern (see `data-display.html` in the live spec) |
|
|
125
|
+
| Empty state | `.empty-state` + `.empty-state__title` + `.empty-state__body` |
|
|
126
|
+
| Loading | Pick by *duration*: nothing → disabled label → `.skeleton` → `.progress` → background notification |
|
|
127
|
+
| Icon | `<i data-icon="name" aria-hidden="true"></i>` |
|
|
128
|
+
| Animation | `var(--dur-fast) var(--ease)`. Don't invent durations. |
|
|
129
|
+
| z-index | Six rungs only: `--z-{base,raised,overlay,popover,modal,toast}` |
|
|
130
|
+
| Print/PDF output | Add `<link rel="stylesheet" href="print.css" media="print">` |
|
|
131
|
+
|
|
132
|
+
For the full surface area (every component, every variant, voice & tone, accessibility checklist) read the live system or `reference/SKILL.md`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Framework adapters
|
|
137
|
+
|
|
138
|
+
The `framework-adapters/` folder has minimal starting points:
|
|
139
|
+
|
|
140
|
+
- `tailwind.config.js` — pulls `tokens.json` into Tailwind's theme. Use Artificer values via `bg-bg`, `text-fg`, `text-accent`, `font-mono`, `rounded-md`, etc.
|
|
141
|
+
- `react-components.tsx` — typed React wrappers for the most common patterns (Button, Field, Stack, Cluster, Modal, Notification). Thin — they just emit the right classes.
|
|
142
|
+
- `vue-components.vue` — same, for Vue 3 SFC.
|
|
143
|
+
|
|
144
|
+
These are starters, not the whole system. They cover the 80% case; for new patterns, write the markup directly and use the CSS classes.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Fonts
|
|
149
|
+
|
|
150
|
+
Artificer ships with two SIL OFL typefaces, self-hosted as WOFF2 in `src/assets/fonts/`. **Pick the body face by surface kind** (see CLAUDE.md → "First decision — what surface is this?"):
|
|
151
|
+
|
|
152
|
+
- **JetBrains Mono** (weights 400 / 500 / 700) — body face on **tool surfaces** (dashboards, consoles, terminals, settings panels, data tables). Always used for code, identifiers, file paths, and numerals — even in document surfaces.
|
|
153
|
+
- **iA Writer Quattro** (weights 400 / 700, with italics) — body face on **document surfaces** (writeups, READMEs, reports, design docs). On tool surfaces, used for labels, hints, microcopy. Designed by Bold Monday for iA Writer; humanist sans tuned to share rhythm with monospace.
|
|
154
|
+
|
|
155
|
+
A useful rule of thumb: if the page has more than ~3 paragraphs of running prose, it's a document — set body in Quattro. If it's mostly chrome around data, it's a tool — set body in JetBrains Mono. Mixing within a project is normal: the settings page is a tool, the README explaining it is a document.
|
|
156
|
+
|
|
157
|
+
JetBrains Mono is on Google Fonts; Quattro is **not** — that's why we self-host. The CSS `@font-face` chain points at the bundled WOFF2 files and falls back through the iA Writer Quattro variants → Iowan Old Style → Charter → Source Sans 3 → system-ui, so the page still renders if fonts haven't loaded yet.
|
|
158
|
+
|
|
159
|
+
If you want the **iA Writer Quattro S** variant (proportional sans with tabular numerals, ideal for stacked dashboard data) or **Quattro V** (display variant), download them from [iaolo/iA-Fonts](https://github.com/iaolo/iA-Fonts) and drop the WOFF2 into `src/assets/fonts/`. The CSS already prefers them.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Accessibility — what's already wired
|
|
164
|
+
|
|
165
|
+
You don't need to reinvent any of this. Just don't undo it.
|
|
166
|
+
|
|
167
|
+
- AAA contrast on all body text (12.8:1 dark, 11.4:1 cream)
|
|
168
|
+
- Focus-visible outlines on every interactive element (2px `--accent`, 2px offset)
|
|
169
|
+
- `:focus-visible` not `:focus` — no rings on mouse clicks
|
|
170
|
+
- `prefers-reduced-motion: reduce` collapses all durations to 0ms
|
|
171
|
+
- `prefers-color-scheme` honored on first load (overridable via toggle)
|
|
172
|
+
- Skip-link styled, just include it on every page
|
|
173
|
+
- `.sr-only` for screen-reader-only text
|
|
174
|
+
- Custom checkbox/radio/toggle keyboard-navigable, focus-ringed
|
|
175
|
+
- Selection color (`::selection`) themed
|
|
176
|
+
- Scrollbar styled to match (Webkit + Firefox)
|
|
177
|
+
|
|
178
|
+
The `reference/a11y.html` page (in the live system) has the 12-point shipping checklist.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Theming
|
|
183
|
+
|
|
184
|
+
```html
|
|
185
|
+
<html data-theme="dark"> <!-- default; reads from localStorage -->
|
|
186
|
+
<html data-theme="light"> <!-- cream paper mode -->
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`artificer-theme.js` handles persistence. To toggle programmatically:
|
|
190
|
+
|
|
191
|
+
```js
|
|
192
|
+
document.documentElement.setAttribute('data-theme', 'light');
|
|
193
|
+
localStorage.setItem('artificer.theme', 'light');
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
To read theme preference:
|
|
197
|
+
|
|
198
|
+
```js
|
|
199
|
+
const theme = document.documentElement.getAttribute('data-theme'); // 'dark' | 'light'
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The CSS uses `color-scheme: dark` / `light` so form controls and scrollbars match without extra work.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## What's NOT in this bundle
|
|
207
|
+
|
|
208
|
+
- **Live preview pages.** Open the project URL to see every component rendered, with code samples next to each.
|
|
209
|
+
- **Logo files** in raster formats. Logo is `assets/cameron-logo.jpg` in the project; not included here because it's Cameron's personal mark, not a system component.
|
|
210
|
+
- **Storybook config.** Add your own — Artificer is framework-agnostic.
|
|
211
|
+
- **Tests.** Add your own — components are CSS classes, test what you build with them.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Editor & terminal themes
|
|
216
|
+
|
|
217
|
+
Artificer also ships as themes for the surfaces where Cameron actually
|
|
218
|
+
lives — same palette, four installs:
|
|
219
|
+
|
|
220
|
+
- **Claude Code** — `themes/claude-code/artificer-{dark,light}.json`
|
|
221
|
+
- **Ghostty** — `themes/ghostty/artificer-{dark,light}`
|
|
222
|
+
- **VS Code / Cursor** — `themes/vscode/` (sideload or `vsce package`)
|
|
223
|
+
- **Obsidian** — `themes/obsidian/Artificer/` (drop-in theme folder, hand-authored sister)
|
|
224
|
+
|
|
225
|
+
Claude Code, Ghostty, and VS Code are generated from `themes/_palette.json`.
|
|
226
|
+
To re-tune any color across those three surfaces in lockstep:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# 1. Edit the hex in themes/_palette.json
|
|
230
|
+
# 2. Regenerate the three generated surfaces:
|
|
231
|
+
node themes/build.mjs
|
|
232
|
+
# 3. Manually re-check obsidian/Artificer/theme.css (--art-* tokens at top)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Obsidian is hand-authored because its aesthetic is intentionally distinct
|
|
236
|
+
(gold-as-primary instead of steel, Ghostty-grey background instead of
|
|
237
|
+
indigo-ink, dramatic 0.55/0.6 inactive-pane recession). The palette
|
|
238
|
+
tokens stay in sync manually.
|
|
239
|
+
|
|
240
|
+
See `themes/README.md` for install instructions per surface.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Where to ask
|
|
245
|
+
|
|
246
|
+
- **Live system** — every page is a live spec. Read first, then code.
|
|
247
|
+
- **`docs/STATE.md`** — the maturity baseline: where each layer of the system honestly sits (clay / materials / rooms / trust), known gaps, and the backlog policy. Re-assessed each minor version.
|
|
248
|
+
- **`reference/SKILL.md`** — the AI-handoff version of these instructions, dense and machine-readable. If you're using Claude Code, point it at that file.
|
|
249
|
+
- **`reference/CLAUDE.md`** — drop into your repo root; Claude Code reads it automatically and will follow Artificer's rules from then on.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Versioning
|
|
254
|
+
|
|
255
|
+
- **v0.1** · 2026 · personal use, no license required for Cameron's projects. For external use: Apache-2.0 (see LICENSE).
|
|
256
|
+
- Any change to a token value is a **minor version bump**. Adding a new token or component is a **patch**. Removing a token is a **major** (breaking).
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
*This handoff package was generated from the Cameron Personal Design System project.*
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cameronsjo/artificer",
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "Cameron's personal design system — AuDHD-friendly, dark-first, for tools and dashboards. Apache-2.0 but Cameron-first: published for my own reuse, unsupported, no stability guarantees implied.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Cameron Sjo <csjo00@gmail.com>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cameronsjo/artificer.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"*.css"
|
|
14
|
+
],
|
|
15
|
+
"style": "./src/artificer.css",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./artificer.css": "./src/artificer.css",
|
|
18
|
+
"./whimsy.css": "./src/artificer-whimsy.css",
|
|
19
|
+
"./editorial.css": "./src/artificer-editorial.css",
|
|
20
|
+
"./print.css": "./src/print.css",
|
|
21
|
+
"./theme.js": "./src/artificer-theme.js",
|
|
22
|
+
"./focus.js": "./src/artificer-focus.js",
|
|
23
|
+
"./tabs.js": "./src/artificer-tabs.js",
|
|
24
|
+
"./icons.js": "./src/artificer-icons.js",
|
|
25
|
+
"./whimsy.js": "./src/artificer-whimsy.js",
|
|
26
|
+
"./tokens.json": "./src/tokens.json",
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build:themes": "node themes/build.mjs",
|
|
37
|
+
"build:livespec": "node scripts/build-livespec.mjs",
|
|
38
|
+
"check:livespec": "node scripts/build-livespec.mjs --check",
|
|
39
|
+
"check:contrast": "node scripts/check-syntax-contrast.mjs",
|
|
40
|
+
"lint:palette": "node scripts/lint-css-palette.mjs",
|
|
41
|
+
"check:version": "node scripts/sync-version.mjs --check",
|
|
42
|
+
"sync:version": "node scripts/sync-version.mjs",
|
|
43
|
+
"sri": "node scripts/gen-sri.mjs",
|
|
44
|
+
"test": "node --test scripts/*.test.mjs"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
ARTIFICER · Editorial — the document surface's expressive tier v0.9.0
|
|
3
|
+
───────────────────────────────────────────────────────────────────────────
|
|
4
|
+
Opt-in. Load AFTER artificer.css. Canonical home for long-form reading
|
|
5
|
+
surfaces (blog, essays, release notes) — the expressive counterpart to
|
|
6
|
+
.surface-tool. Promoted v0.9.0 from blog/homepage's copied global.css.
|
|
7
|
+
|
|
8
|
+
Baseline contract: requires the core palette (--bg, --fg, --fg-secondary,
|
|
9
|
+
--border, --accent) + --ease. See CLAUDE.md § Baseline contract.
|
|
10
|
+
|
|
11
|
+
Reuses the canonical --t-* type ramp and --s-* spacing scale. The ONLY new
|
|
12
|
+
token is --editorial-measure. Nothing here re-declares a color, size, or
|
|
13
|
+
duration the core already owns.
|
|
14
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
15
|
+
|
|
16
|
+
:root {
|
|
17
|
+
--editorial-measure: 66ch; /* prose line-length cap — the one mint */
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ─── Surface scope ────────────────────────────────────────────────────────
|
|
21
|
+
The document default is already sans; editorial adds measure + reading
|
|
22
|
+
rhythm. Wrap a long-form page in <body class="surface-editorial"> (or any
|
|
23
|
+
container). It is the inverse of .surface-tool — never combine the two. */
|
|
24
|
+
.surface-editorial {
|
|
25
|
+
font-family: var(--font-sans);
|
|
26
|
+
color: var(--fg);
|
|
27
|
+
line-height: var(--t-body-lg-lh);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ─── Prose — long-form vertical rhythm ────────────────────────────────────
|
|
31
|
+
Block flow with a measured column and generous, even spacing. Drop .prose
|
|
32
|
+
on the article body; children inherit the rhythm without per-element margins. */
|
|
33
|
+
.prose {
|
|
34
|
+
max-width: var(--editorial-measure);
|
|
35
|
+
font-size: var(--t-body-lg-size);
|
|
36
|
+
line-height: var(--t-body-lg-lh);
|
|
37
|
+
text-wrap: pretty;
|
|
38
|
+
}
|
|
39
|
+
.prose > * + * { margin-top: var(--s-lg); }
|
|
40
|
+
.prose h2, .prose h3 { margin-top: var(--s-2xl); line-height: var(--t-headline-md-lh); color: var(--fg); }
|
|
41
|
+
.prose h2 { font-size: var(--t-headline-md-size); font-weight: 700; }
|
|
42
|
+
.prose h3 { font-size: var(--t-body-lg-size); font-weight: 700; letter-spacing: .01em; }
|
|
43
|
+
.prose a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
|
|
44
|
+
.prose a:hover { color: var(--accent-bright); }
|
|
45
|
+
.prose strong, .prose b { color: var(--fg); font-weight: 700; }
|
|
46
|
+
.prose blockquote {
|
|
47
|
+
margin-left: 0; padding-left: var(--s-lg);
|
|
48
|
+
border-left: 2px solid var(--border);
|
|
49
|
+
color: var(--fg-secondary); font-style: italic;
|
|
50
|
+
}
|
|
51
|
+
.prose code {
|
|
52
|
+
font-family: var(--font-mono); font-size: 0.92em;
|
|
53
|
+
color: var(--accent); background: var(--bg-raised);
|
|
54
|
+
padding: 1px 5px; border-radius: var(--radius-sm);
|
|
55
|
+
}
|
|
56
|
+
.prose hr { border: none; border-top: 1px solid var(--border); margin: var(--s-2xl) 0; }
|
|
57
|
+
.prose ul, .prose ol { padding-left: var(--s-lg); }
|
|
58
|
+
.prose li + li { margin-top: var(--s-sm); }
|
|
59
|
+
|
|
60
|
+
/* ─── Editorial hero — the standfirst block at the top of a piece ───────────
|
|
61
|
+
Namespaced so it never collides with a product .hero. Big display title +
|
|
62
|
+
a secondary standfirst line. */
|
|
63
|
+
.editorial-hero {
|
|
64
|
+
max-width: var(--editorial-measure);
|
|
65
|
+
margin-bottom: var(--s-2xl);
|
|
66
|
+
}
|
|
67
|
+
.editorial-hero__kicker {
|
|
68
|
+
font-family: var(--font-mono);
|
|
69
|
+
font-size: var(--t-label-xs-size); /* from v0.9.0 micro tier */
|
|
70
|
+
letter-spacing: .14em; text-transform: uppercase;
|
|
71
|
+
color: var(--fg-secondary);
|
|
72
|
+
margin-bottom: var(--s-md);
|
|
73
|
+
}
|
|
74
|
+
.editorial-hero__title {
|
|
75
|
+
font-family: var(--font-sans); font-weight: 700;
|
|
76
|
+
font-size: var(--t-headline-lg-size);
|
|
77
|
+
line-height: var(--t-headline-lg-lh);
|
|
78
|
+
letter-spacing: var(--t-headline-lg-ls);
|
|
79
|
+
color: var(--fg); margin: 0;
|
|
80
|
+
}
|
|
81
|
+
.editorial-hero__standfirst {
|
|
82
|
+
font-size: var(--t-body-lg-size);
|
|
83
|
+
line-height: var(--t-body-lg-lh);
|
|
84
|
+
color: var(--fg-secondary);
|
|
85
|
+
margin-top: var(--s-md);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ─── Entry index — the article list (blog/essays archive) ─────────────────
|
|
89
|
+
A stack of linked entries: title, meta row (date · reading time), excerpt. */
|
|
90
|
+
.entries { display: flex; flex-direction: column; gap: var(--s-2xl); max-width: var(--editorial-measure); }
|
|
91
|
+
.entry { display: flex; flex-direction: column; gap: var(--s-sm); }
|
|
92
|
+
.entry__title {
|
|
93
|
+
font-family: var(--font-sans); font-weight: 700;
|
|
94
|
+
font-size: var(--t-headline-md-size); line-height: var(--t-headline-md-lh);
|
|
95
|
+
color: var(--fg); margin: 0; text-decoration: none;
|
|
96
|
+
}
|
|
97
|
+
a.entry__title:hover { color: var(--accent); }
|
|
98
|
+
.entry__meta {
|
|
99
|
+
font-family: var(--font-mono); font-size: var(--t-label-xs-size);
|
|
100
|
+
letter-spacing: .04em; color: var(--fg-secondary);
|
|
101
|
+
display: flex; gap: var(--s-sm); align-items: center;
|
|
102
|
+
}
|
|
103
|
+
.entry__excerpt { color: var(--fg-secondary); line-height: var(--t-body-md-lh); margin: 0; }
|
|
104
|
+
|
|
105
|
+
/* ─── Grain — a faint paper texture overlay ────────────────────────────────
|
|
106
|
+
Utility, not a token: a tuned fractal-noise wash at very low opacity. Apply
|
|
107
|
+
.grain to a positioned container; it lays a non-interactive layer on top.
|
|
108
|
+
The texture is procedural (feTurbulence), not imagery. */
|
|
109
|
+
.grain { position: relative; }
|
|
110
|
+
.grain::after {
|
|
111
|
+
content: ""; position: absolute; inset: 0; z-index: 1;
|
|
112
|
+
pointer-events: none; opacity: .035; mix-blend-mode: multiply;
|
|
113
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
|
114
|
+
}
|
|
115
|
+
:root[data-theme="dark"] .grain::after { mix-blend-mode: screen; opacity: .025; }
|
|
116
|
+
|
|
117
|
+
/* ─── Reveal — the ONE sanctioned arrival animation ────────────────────────
|
|
118
|
+
CARVE: breaks the global "never animate arrival" rule, scoped to editorial.
|
|
119
|
+
Doctrine in CLAUDE.md § Motion. Bounds: opacity + ≤8px rise, --dur-max
|
|
120
|
+
ceiling, single --ease curve, one per view, suppressed under reduced-motion,
|
|
121
|
+
NEVER on .surface-tool / errors / status / data. */
|
|
122
|
+
@keyframes editorial-reveal {
|
|
123
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
124
|
+
to { opacity: 1; transform: none; }
|
|
125
|
+
}
|
|
126
|
+
.reveal { animation: editorial-reveal var(--dur-max) var(--ease) both; }
|
|
127
|
+
|
|
128
|
+
/* Sunset condition for the carve: if a second arrival-animation need appears,
|
|
129
|
+
do not add a second keyframe — revisit whether editorial arrival motion
|
|
130
|
+
earns its exception at all. One reveal, or none. */
|
|
131
|
+
|
|
132
|
+
@media (prefers-reduced-motion: reduce) {
|
|
133
|
+
.reveal { animation: none; }
|
|
134
|
+
}
|
|
135
|
+
/* Belt-and-braces: arrival motion never runs on tool surfaces. */
|
|
136
|
+
.surface-tool .reveal { animation: none; }
|