@cameronsjo/artificer 0.25.0 → 0.28.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 +14 -12
- package/dist/artificer-chromium-dark.zip +0 -0
- package/dist/artificer-chromium-light.zip +0 -0
- package/dist/artificer-firefox.zip +0 -0
- package/package.json +5 -1
- package/reference/SKILL.md +30 -24
- package/src/artificer-editorial.css +3 -1
- package/src/artificer-sploot.js +303 -0
- package/src/artificer-texture.css +129 -23
- package/src/artificer-whimsy.css +209 -30
- package/src/artificer-whimsy.js +227 -5
- package/src/artificer.css +334 -117
- package/src/assets/app-icon-1024.png +0 -0
- package/src/assets/app-icon.svg +1 -0
- package/src/assets/favicon-16.png +0 -0
- package/src/assets/favicon-180.png +0 -0
- package/src/assets/favicon-32.png +0 -0
- package/src/assets/favicon-48.png +0 -0
- package/src/assets/favicon-512.png +0 -0
- package/src/assets/favicon-legacy.svg +5 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/favicon.svg +1 -5
- package/src/assets/fonts/bricolage-grotesque-variable.woff2 +0 -0
- package/src/assets/fonts/jetbrains-mono-blocks.woff2 +0 -0
- package/src/assets/fonts/recursive-variable.woff2 +0 -0
- package/src/assets/og-image.png +0 -0
- package/src/assets/og-image.svg +14 -20
- package/src/primitives.json +77 -4
- package/src/print.css +4 -3
- package/src/tokens.json +4 -4
- package/types/sploot.d.ts +48 -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/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Artificer · Design System Handoff
|
|
2
2
|
|
|
3
3
|
Cameron's personal design system, packaged for use in real codebases.
|
|
4
|
-
**v0.
|
|
4
|
+
**v0.28.0 · 2026** — new type: Recursive for interface chrome and Bricolage Grotesque for body prose, both variable so every weight is real, and the Obsidian theme follows. Sploot the corgi joins as the system's critter, drawn in block glyphs. A generated theme for the herdr desktop app, a first-class Obsidian mobile layer, and Obsidian callouts that match the system `.callout`. See `CHANGELOG.md` for what changed.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -136,6 +136,7 @@ import 'artificer/artificer-icons.js' // only if using <i data-icon>
|
|
|
136
136
|
import 'artificer/artificer-tabs.js' // only if using .tabs (ships the APG keyboard model)
|
|
137
137
|
import 'artificer/artificer-options.js' // only if using .menu/.listbox/.palette (option navigation)
|
|
138
138
|
import 'artificer/artificer-tree.js' // only if using .tree (ships the APG tree keyboard)
|
|
139
|
+
import 'artificer/artificer-sploot.js' // only if drawing Sploot (<span data-sploot>)
|
|
139
140
|
```
|
|
140
141
|
|
|
141
142
|
The CSS uses CSS custom properties (variables) and `data-theme` attribute — no preprocessing needed.
|
|
@@ -221,19 +222,19 @@ These are starters, not the whole system. They cover the 80% case; for new patte
|
|
|
221
222
|
|
|
222
223
|
## Fonts
|
|
223
224
|
|
|
224
|
-
Artificer ships three SIL OFL font
|
|
225
|
+
Artificer ships three SIL OFL font families, self-hosted as WOFF2 in `src/assets/fonts/`. **Pick the face by role** (see CLAUDE.md → "First decision — what surface is this?"):
|
|
225
226
|
|
|
226
227
|
- **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.
|
|
227
|
-
- **
|
|
228
|
-
- **
|
|
228
|
+
- **Bricolage Grotesque** — `--font-body`, the prose face on **document surfaces** (writeups, READMEs, reports, design docs). One variable file, weights 200–800, with an optical-size axis that tightens headlines automatically.
|
|
229
|
+
- **Recursive** — `--font-interface`, the chrome face: labels, controls, badges, form fields, nav, tabular UI numerals — on **both** tool and document surfaces. One variable file, weights 300–1000, with a slant axis for italics; its digits are fixed-width by default.
|
|
229
230
|
|
|
230
|
-
Both
|
|
231
|
+
Both replaced iA Writer Quattro S/V (ADR 0046). `--font-sans` remains resolvable as a legacy alias of `--font-body`.
|
|
231
232
|
|
|
232
|
-
A useful rule of thumb: if the page has more than ~3 paragraphs of running prose, it's a document — set body in
|
|
233
|
+
A useful rule of thumb: if the page has more than ~3 paragraphs of running prose, it's a document — set body in `--font-body`. 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.
|
|
233
234
|
|
|
234
|
-
|
|
235
|
+
All three are self-hosted from the bundled WOFF2 files (they are also on Google Fonts and Fontsource). The stacks fall back through Source Sans 3 → system-ui, so the page still renders if fonts haven't loaded yet.
|
|
235
236
|
|
|
236
|
-
Full loading recipes
|
|
237
|
+
Full loading recipes and the axis notes: **[`FONTS.md`](FONTS.md)**. Upstream sources: [arrowtype/recursive](https://github.com/arrowtype/recursive) and [ateliertriay/bricolage](https://github.com/ateliertriay/bricolage).
|
|
237
238
|
|
|
238
239
|
---
|
|
239
240
|
|
|
@@ -252,7 +253,7 @@ You don't need to reinvent any of this. Just don't undo it.
|
|
|
252
253
|
- Selection color (`::selection`) themed
|
|
253
254
|
- Scrollbar styled to match (Webkit + Firefox)
|
|
254
255
|
|
|
255
|
-
The `live-spec/a11y.html` page (in the live system) has the
|
|
256
|
+
The `live-spec/a11y.html` page (in the live system) has the 13-point shipping checklist.
|
|
256
257
|
|
|
257
258
|
---
|
|
258
259
|
|
|
@@ -298,6 +299,7 @@ lives — same palette, every surface. The editors and agent CLIs:
|
|
|
298
299
|
- **VS Code / Cursor** — `themes/vscode/` (sideload or `vsce package`)
|
|
299
300
|
- **Helix** — `themes/helix/artificer-{dark,light}.toml` (+ `-opaque` twins)
|
|
300
301
|
- **Neovim** — `themes/neovim/colors/artificer.lua` (one file, both modes)
|
|
302
|
+
- **Zed** — `themes/zed/artificer.json` (one theme family, both variants)
|
|
301
303
|
- **JetBrains IDEs** — `themes/jetbrains/` (IntelliJ Platform theme plugin; `npm run pack:jetbrains` → install the jar from disk)
|
|
302
304
|
- **Codex CLI** — `themes/codex/artificer-{dark,light}.tmTheme`
|
|
303
305
|
- **Obsidian** — `themes/obsidian/Artificer/` (drop-in theme folder, hand-authored sister)
|
|
@@ -310,9 +312,9 @@ And the browser:
|
|
|
310
312
|
`npm run pack:browser` builds the store zips; sideload straight from the
|
|
311
313
|
directory without packing at all.
|
|
312
314
|
|
|
313
|
-
Plus the terminal and TUI surfaces around them — Ghostty, tmux, gitmux, cmux,
|
|
314
|
-
bat/delta, glamour, gum, fzf, eza, starship, yazi, lazygit, gh-dash, herdr,
|
|
315
|
-
flux. **`themes/README.md` carries the full list**; it is the one place that
|
|
315
|
+
Plus the terminal and TUI surfaces around them — Ghostty, WezTerm, tmux, gitmux, cmux,
|
|
316
|
+
bat/delta, glamour, gum, fzf, eza, starship, yazi, lazygit, gh-dash, herdr, the
|
|
317
|
+
herdr desktop app, and flux. **`themes/README.md` carries the full list**; it is the one place that
|
|
316
318
|
enumerates them, so this section never has to be counted again.
|
|
317
319
|
|
|
318
320
|
Everything except Obsidian is generated from `themes/_palette.json`. To re-tune
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cameronsjo/artificer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
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
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Cameron Sjo",
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
"types": "./types/whimsy.d.ts",
|
|
52
52
|
"default": "./src/artificer-whimsy.js"
|
|
53
53
|
},
|
|
54
|
+
"./sploot.js": {
|
|
55
|
+
"types": "./types/sploot.d.ts",
|
|
56
|
+
"default": "./src/artificer-sploot.js"
|
|
57
|
+
},
|
|
54
58
|
"./react": {
|
|
55
59
|
"types": "./dist/react/index.d.ts",
|
|
56
60
|
"default": "./dist/react/index.js"
|
package/reference/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: Artificer
|
|
|
3
3
|
description: Cameron's personal design system. AuDHD-optimized, Ghostty-rooted, dark-first with a paper-stock light mode and a Jazz Age Deco palette (burnished gold + royal purple). Use for tools, dashboards, agent UIs, terminals, settings panels — anything that must stay calm until something demands action. Do NOT use for marketing sites, kid-facing UI, or anywhere the goal is delight-via-stimulation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Artificer · v0.
|
|
6
|
+
# Artificer · v0.28.0
|
|
7
7
|
|
|
8
8
|
A neurodivergent-first design system for Cameron. Every token and rule here exists to reduce cognitive load for an AuDHD brain that **scans instead of reads** and holds **3–4 items** in working memory.
|
|
9
9
|
|
|
@@ -31,7 +31,6 @@ Don't use Artificer for:
|
|
|
31
31
|
|---|---|
|
|
32
32
|
| `artificer.css` | All tokens + utility classes. The only stylesheet you need. |
|
|
33
33
|
| `artificer-theme.js` | Persistent theme control — dark / light / auto (auto follows the OS live); hydrates the empty canonical `.theme-toggle` button. |
|
|
34
|
-
| `assets/cameron-logo.jpg` | Personal mark — only used on Cameron-branded surfaces. |
|
|
35
34
|
| `README.html` | System overview, principles, do/don't. |
|
|
36
35
|
| `colors.html` · `typography.html` · `spacing.html` | Foundations specs. |
|
|
37
36
|
| `components.html` · `patterns.html` · `notifications.html` | Live component specs. |
|
|
@@ -41,14 +40,14 @@ Don't use Artificer for:
|
|
|
41
40
|
| `forms-extended.html` | Field anatomy, validation, fieldsets, helper/error text. The twelve non-negotiable rules. |
|
|
42
41
|
| `data-display.html` | Tables, key-value lists, stat cards, progress. Tabular-nums everywhere. |
|
|
43
42
|
| `states.html` | Empty, loading, error — by duration. Skeleton sizing rules. |
|
|
44
|
-
| `a11y.html` | WCAG 2.2 audit, contrast ratios, focus rings, the
|
|
43
|
+
| `a11y.html` | WCAG 2.2 audit, contrast ratios, focus rings, the a11y shipping checklist. |
|
|
45
44
|
| `artificer-icons.js` | Lucide-rooted icon set, Lucide-canonical names (legacy names alias; unknown names render a dashed placeholder). Auto-hydrates `<i data-icon="…">` placeholders. |
|
|
46
45
|
| `artificer-focus.js` | `ArtificerFocus.trap(el, {onEscape})` — focus-trap helper for modals/dialogs. |
|
|
47
46
|
| `icons.html` | Icon catalog + usage rules (16px viewBox, 1.5 stroke, inherit color). |
|
|
48
47
|
| `voice-and-tone.html` | Microcopy spec — empty states, errors, success, loading. 7-point checklist. |
|
|
49
48
|
| `tokens.json` | Machine-readable token export (for Tailwind, Figma, non-CSS consumers). |
|
|
50
49
|
| `print.css` | Print stylesheet. Forces ivory/navy paper mode, strips chrome. Load `media="print"`. |
|
|
51
|
-
| `assets/favicon.svg` · `assets/og-image.
|
|
50
|
+
| `assets/favicon.svg` · `assets/og-image.png` | Favicon (32px, SVG) and Open Graph card (1200×630, PNG; `og-image.svg` is its source). |
|
|
52
51
|
|
|
53
52
|
---
|
|
54
53
|
|
|
@@ -65,7 +64,7 @@ Don't use Artificer for:
|
|
|
65
64
|
light. Key 'artificer.theme' (dot); dark-first. See QUICKSTART.md. -->
|
|
66
65
|
<script>(function(){try{var s=localStorage.getItem('artificer.theme');var p=s==='light'||s==='dark';var l=window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches;document.documentElement.setAttribute('data-theme',p?s:(l?'light':'dark'));}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
|
|
67
66
|
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg" />
|
|
68
|
-
<meta property="og:image" content="assets/og-image.
|
|
67
|
+
<meta property="og:image" content="assets/og-image.png" />
|
|
69
68
|
<link rel="stylesheet" href="artificer.css" />
|
|
70
69
|
<link rel="stylesheet" href="print.css" media="print" />
|
|
71
70
|
<script src="artificer-theme.js" defer></script>
|
|
@@ -73,7 +72,7 @@ Don't use Artificer for:
|
|
|
73
72
|
</head>
|
|
74
73
|
<body>
|
|
75
74
|
<button class="theme-toggle" data-theme-toggle aria-label="Toggle theme"></button>
|
|
76
|
-
<main
|
|
75
|
+
<main class="container container--md container--page">
|
|
77
76
|
<!-- your content -->
|
|
78
77
|
</main>
|
|
79
78
|
</body>
|
|
@@ -102,7 +101,7 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
|
|
|
102
101
|
| Confirmation dialog / modal | `overlay.html` — `.scrim` + `.modal`, wire `ArtificerFocus.trap()` for focus-trap |
|
|
103
102
|
| Tooltip / popover | `overlay.html` — `.tooltip` (label) or `.popover` (body content). Reveal on hover + keyboard focus: wrap trigger + `.tooltip` in `.has-tooltip`; place/arrow via `.tooltip--top/bottom/left/right`. Bare `.tooltip` stays a static box |
|
|
104
103
|
| Horizontal bar / meter / usage bar | `charts.html` — `.bar` + `.bar__track` + `.bar__fill` (width inline; fill bg any semantic token; fill bakes `display:block;height:100%` so it never collapses). Determinate % → `.progress` |
|
|
105
|
-
| Page layout (sidebar/main) | `layout.html` — `.page-shell`, `.container` + `.container--{sm\|md\|lg}` (the base class is required — it carries width, centering, and inline padding; the size modifier only sets max-width) |
|
|
104
|
+
| Page layout (sidebar/main) | `layout.html` — `.page-shell`, `.container` + `.container--{sm\|md\|lg}` (the base class is required — it carries width, centering, and inline padding; the size modifier only sets max-width; add `.container--page` on a top-level `<main>` for page block padding) |
|
|
106
105
|
| Blog / editorial / document top nav / masthead | `.masthead` (`artificer-editorial.css`) — non-sticky, no border; document counterpart to `.appbar`. Brand via `.wordmark`, toggle via `.theme-toggle--inline` — `navigation.html` |
|
|
107
106
|
| Stacking children | `layout.html` — `.stack` (vertical), `.cluster` (horizontal wrap) |
|
|
108
107
|
| Card grid | `layout.html` — `.grid-auto` with `--min: 240px`, never hand-rolled flexbox |
|
|
@@ -123,7 +122,7 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
|
|
|
123
122
|
| Pagination | `.pagination` + `.pagination__gap`; `[aria-current=page]` marks the page; prev/next disable at ends; counted ranges only — `components-extended.html` |
|
|
124
123
|
| Persistent page banner | `.banner` + `--info/attention/urgent/success` + `.banner__body`/`.banner__actions` — a standing layout band, NOT the transient `.notif` — `components-extended.html` |
|
|
125
124
|
| Footer / colophon / fine print / attribution | **Three zones, in order — 1 and 3 optional, the spine always present.** (1) a `.grid-auto` of `.colophon__label` sections; (2) `.colophon__spine` — three POSITIONAL slots: **identity · sign-off · links**, first child starts, last ends, middle centres on the page; (3) `.colophon__fine` for the legal tier. A site with only a sign-off and a site with a full disclosure grid use the same primitive and differ only in which zones they fill. Any slot may be empty — keep the element to hold its column. Links slot: `<a>` for navigation, `<button class="btn btn--link">` for a control that ACTS (an SPA switching views) — never an `<a>` with a click handler. Prose auto-sans even inside `.surface-tool`; `.surface-document` flips any other prose island back — `layout.html` |
|
|
126
|
-
| Selected card / selected row / active choice | `.card--active` (`background: var(--bg)` + accent
|
|
125
|
+
| Selected card / selected row / active choice | `.card--active` (`background: var(--bg)` + a full 1px accent ring) for a card, `.is-active` (`background: var(--bg-raised)`) for a list row — never `--accent-fill` as a large surface bg, its only rated text color is `--on-accent` — `components.html` |
|
|
127
126
|
| Split pane / master-detail | `.split-pane` + `.pane--active`/`.pane--inactive`; recession marks the unfocused pane — `composition.html` |
|
|
128
127
|
| Text workbench / editor panes / paste target | `.workbench` + `.workbench__pane` (`.workbench__header` + `.workbench__editor`); label lives in `.workbench__header` as a real `<label for>`, not a placeholder — a `.dash` BODY, not a sixth dash recipe — `composition.html` |
|
|
129
128
|
| Status pill | `.badge--{tier}` with a `.dot--{tier}` inside — dot AND text, never color alone |
|
|
@@ -137,6 +136,8 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
|
|
|
137
136
|
| Wide table / diff / wider-than-phone block | `<div class="scroll-x" tabindex="0">…</div>` — content scrolls inside, never the page; `tabindex="0"` is load-bearing (axe scrollable-region-focusable). `.scroll-x--fade` adds self-hiding edge shadows — `keyboard.html` |
|
|
138
137
|
| Wide comparison matrix (tools × features) | Row-per-item + glyph/text cells → `.table--responsive` cards; interactive/score grids (cell buttons, heatmaps) → stay a table in `.scroll-x.scroll-x--fade` + `.table--sticky-col` (pins `tbody th:first-child` too). Never both below 640px — `data-display.html` |
|
|
139
138
|
| Key-value list | `.kv`; mono `<dl>` grid for metadata pairs, `.table` for real data — `data-display.html` |
|
|
139
|
+
| Properties / metadata block | `.kv.kv--props`; icon per key, divider per row, `.badge--steel` tags — `data-display.html#props` |
|
|
140
|
+
| Embedded diagram / media card | `.figure.figure--frame` + `.figure__bar` (`.eyebrow` + reset) + `.figure__body` — `diagrams.html#embed` |
|
|
140
141
|
| Live data indicator | `.live-tick` (pulsing dot) + `.last-updated` (timestamp); auto-updating regions still need an in-UI pause — `composition.html` |
|
|
141
142
|
| Stat card / KPI strip / headline numbers (KPIs) | `.stat` — `.stat__label` + `.stat__value` (mono, tabular) + `.stat__row` + `.stat__delta`(`.down`); the cell of a `.kpi-strip`, max 4 per row — `data-display.html` |
|
|
142
143
|
| Dashboard shell | `.dash` + `.dash__topbar` (`.dash__title` + `.dash__actions`) — one frame, five recipes — `composition.html` |
|
|
@@ -144,20 +145,25 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
|
|
|
144
145
|
| Architecture / flow diagram | `.dia-node`/`.dia-edge` on inline SVG — `diagrams.html` |
|
|
145
146
|
| Syntax-highlighted code block | `.code-block` + the `.tok-*` roles — `components-extended.html` |
|
|
146
147
|
| Brand wordmark | `.wordmark` (renders `artificer.`) — `README.html` |
|
|
148
|
+
| Brand critter / mascot / Sploot | `<span data-sploot="pose">` + `artificer-sploot.js` — the corgi in block glyphs; stand/droopy/sleep/sniff/mini, `.sploot--sm`/`--lg`, `data-sploot-helmet`; one per view — `sploot.html` |
|
|
147
149
|
| Theme toggle | empty `<button class="theme-toggle" data-theme-toggle aria-label="Toggle theme">` — the module injects the glyph |
|
|
148
150
|
| Tabular number | `.num` utility — sets `font-variant-numeric: tabular-nums`; drop on the cell, or the parent for a whole table — `data-display.html` |
|
|
149
151
|
| Short hint paragraph under a figure or field | `.note` — sister of `.meta`, smaller (label-sm); inherits the body face, mono on tool surfaces / sans on document surfaces |
|
|
150
|
-
|
|
|
152
|
+
| Eyebrow / overline label | `.eyebrow` (+ `.eyebrow--accent`) — uppercase label over a heading, block, or demo — `typography.html#doc-chrome` |
|
|
153
|
+
| Doc-page subsection header | `<h3 class="subsection-title">` — mono 700 body-md; sibling under `.section-title` — `typography.html#doc-chrome` |
|
|
154
|
+
| Callout / standing note | `.callout` + `.callout__title` (+ `--steel`/`--attention`/`--urgent`) — an inset tier rule inside a bordered raised box (never a `border-left` on a rounded box); the title names the tier in text — `typography.html#doc-chrome` |
|
|
155
|
+
| Doc-page section header | `<h2 class="section-title">` — mono 500, mixed case, `--fg`, border-bottom rule; doc/spec chrome (uppercase tracking is for small labels only) — `data-display.html` |
|
|
151
156
|
| Live-spec / doc-page example container | `<figure class="figure">` + `<figcaption class="meta">…</figcaption>` — `.figure--frame`/`--flush` modifiers — `data-display.html` |
|
|
152
|
-
| Make it fun / playful / celebratory / rainbow | The sanctioned `.whimsy` layer, opt-in, one per view; never on chrome/status/data/errors — `whimsy.html` |
|
|
153
|
-
|
|
|
157
|
+
| Make it fun / playful / celebratory / rainbow | The sanctioned `.whimsy` layer, opt-in, one per view; never on chrome/status/data/errors. Palettes: spectrum (default), `.whimsy--brand`, `.whimsy--signature` (gold + purple), `.whimsy--silver`, `.whimsy--gold`. Pick by the "Which one?" table — `whimsy.html` |
|
|
158
|
+
| Night sky behind a hero or header band | `data-whimsy="sky"` / `.whimsy-sky` + `Whimsy.starfield()` — flowing brand field + seeded stars, dark only, rests with its wordmark on one timer; never behind data/status/errors/body copy — `whimsy.html` pattern 10 |
|
|
159
|
+
| Make it feel like paper / give it grain / material / texture / depth | `.tex-grain` / `.tex-dots` / `.tex-line` (`--hatch`/`--cross`/`--flute`/`--pinstripe`/`--arc`/`--ray`) / `.tex-paper` / `.tex-raised`, plus the drafting set `.tex-grid` (tool canvas), `.tex-ruled` (notes), `.tex-perf` (receipt card), `.tex-deboss` (decorative only); hueless + motionless, never on data/status/errors — `texture.html` |
|
|
154
160
|
| Empty state / error / loading copy | `voice-and-tone.html` — never improvise microcopy |
|
|
155
161
|
| Loading state / UI | `states.html` — pick by *duration*: nothing → disabled label → skeleton → progress → background |
|
|
156
162
|
| Long wait, nothing to count | `.progress--indeterminate` + `role="progressbar"` + `aria-label` with concrete copy, NO `aria-valuenow/min/max` — `states.html` |
|
|
157
163
|
| Refreshing a value in place | `.live-value[data-refreshing]` recedes the stale value + `.live-value__dot` pulses — NOT `.skeleton` (would blank it) — `composition.html` |
|
|
158
164
|
| Animation / transition | `motion.html` — `--dur-fast` + `--ease`. Don't invent durations. |
|
|
159
165
|
| z-index | `motion.html` / `overlay.html` — six rungs only: `--z-{base\|raised\|overlay\|popover\|modal\|toast}` |
|
|
160
|
-
| Pre-ship a11y check | `a11y.html` —
|
|
166
|
+
| Pre-ship a11y check | `a11y.html` — a11y shipping checklist before merging |
|
|
161
167
|
| Token in non-CSS context | Read `tokens.json` |
|
|
162
168
|
| PDF / print output | Add `<link rel="stylesheet" href="print.css" media="print">` |
|
|
163
169
|
| Hero/landing page | **Don't** — wrong system. Suggest a brand-marketing system instead. |
|
|
@@ -196,11 +202,11 @@ use the lifecycle API:
|
|
|
196
202
|
1. **Dark is default.** Light mode is a paper alternative, not the primary.
|
|
197
203
|
2. **Max 2 semantic colors on screen at once.** Brand purple + gold = one "Cameron" signal, doesn't count.
|
|
198
204
|
3. **Bold 3–5 anchor words per paragraph.** Use `class="anchor"` or `<b>`. Primary scanning mechanism. When prose arrives as data, mark anchors as `**…**` in the source and promote each marked span to `<b class="anchor">` at render — single-level only, never nested.
|
|
199
|
-
4. **
|
|
205
|
+
4. **At most one primary CTA per screen** — zero is valid. Everything else is `.btn--secondary` or `.btn--ghost`.
|
|
200
206
|
5. **5–7 items max** in any list/palette/menu before progressive disclosure.
|
|
201
207
|
6. **No pure black.** `#1D1F21` is the darkest value in the system.
|
|
202
208
|
7. **Honor `prefers-reduced-motion`** — durations collapse to 0ms (already wired in CSS).
|
|
203
|
-
8. **WCAG
|
|
209
|
+
8. **WCAG 2.2 AA floor** — 4.5:1 for body text. Run `scripts/contrast.mjs` on any new pairing.
|
|
204
210
|
9. **Never mix rounded and sharp corners** in one view.
|
|
205
211
|
10. **Voice is literal, direct, lightly deadpan.** No metaphor, sarcasm, or figurative copy. Autism demands clarity.
|
|
206
212
|
|
|
@@ -233,18 +239,18 @@ budgets-with-exemptions, not exceptions that swallow the rule:
|
|
|
233
239
|
SURFACES --bg / --bg-raised / --bg-overlay / --bg-inactive
|
|
234
240
|
TEXT --fg / --fg-secondary / --fg-muted / --fg-disabled / --border
|
|
235
241
|
|
|
236
|
-
INTERACTIVE --accent gold text
|
|
242
|
+
INTERACTIVE --accent gold text — links, focus, secondary buttons
|
|
237
243
|
--accent-bright hover state
|
|
238
244
|
--accent-fill gold background — SMALL controls only (buttons, badges);
|
|
239
245
|
never a selected-card/surface bg, pairs only with --on-accent
|
|
240
246
|
|
|
241
|
-
ATTENTION --attention rose text
|
|
247
|
+
ATTENTION --attention dusty rose text — "look when you can"
|
|
242
248
|
--attention-fill rose background
|
|
243
249
|
|
|
244
|
-
URGENT --urgent
|
|
245
|
-
--urgent-fill
|
|
250
|
+
URGENT --urgent brick red text — errors, blocking
|
|
251
|
+
--urgent-fill brick red background
|
|
246
252
|
|
|
247
|
-
SUCCESS --success
|
|
253
|
+
SUCCESS --success apothecary green — completed
|
|
248
254
|
META --steel / --steel-fill — chrome, secondary UI
|
|
249
255
|
|
|
250
256
|
BRAND --brand-purple / --brand-purple-fill — wordmarks, masthead, NOT semantic
|
|
@@ -254,10 +260,10 @@ TYPE --font-mono JetBrains Mono
|
|
|
254
260
|
terminals, data tables, settings panels)
|
|
255
261
|
· ALWAYS for code, identifiers, file paths,
|
|
256
262
|
numerals — including inside documents
|
|
257
|
-
--font-body
|
|
263
|
+
--font-body Bricolage Grotesque
|
|
258
264
|
· BODY FACE for document surfaces (writeups,
|
|
259
265
|
READMEs, reports, design docs)
|
|
260
|
-
--font-interface
|
|
266
|
+
--font-interface Recursive
|
|
261
267
|
· Labels, controls, badges, form fields, nav
|
|
262
268
|
— on both tool AND document surfaces
|
|
263
269
|
· --font-sans is a legacy alias of --font-body
|
|
@@ -298,7 +304,7 @@ BADGES .badge + .badge--accent | --attention | --urgent | --success | --ghost
|
|
|
298
304
|
tint, never a solid steel fill; no text clears AA on solid steel)
|
|
299
305
|
DOTS .dot + .dot--accent | --attention | --urgent | --success
|
|
300
306
|
|
|
301
|
-
PANES .pane--active (
|
|
307
|
+
PANES .pane--active (inset 1px accent outline) · .pane--inactive (55% opacity, desaturated)
|
|
302
308
|
|
|
303
309
|
KBD <kbd>⌘ ↵</kbd>
|
|
304
310
|
THEME <button class="theme-toggle" data-theme-toggle aria-label="Toggle theme"></button>
|
|
@@ -401,7 +407,7 @@ there is no `.dash-*` class):
|
|
|
401
407
|
- **9 nodes ceiling.** Group beyond that.
|
|
402
408
|
- **Mermaid:** initialize with `theme:'base'` + `themeVariables` reading CSS vars (snippet in `live-spec/diagrams.html`).
|
|
403
409
|
- **React Flow:** wrap in `.rf-artificer`.
|
|
404
|
-
- **Excalidraw palette:** strokes
|
|
410
|
+
- **Excalidraw palette:** take stroke and fill hexes from the dark block of `tokens.json` (strokes `fg`, `fgSecondary`, `accent`, `attention`; fills `bg`, `bgRaised`, `bgOverlay`). "Architect" roughness for system maps; "artist" for sketches.
|
|
405
411
|
- **`<defs>` ids are document-scoped.** Namespace per instance (`arrow-<id>`) when repeating a diagram component; never hard-code one inside it.
|
|
406
412
|
- **Interactive nodes:** `tabindex="0"` + `role="button"` + `aria-label` + Enter/Space. Focus ring free from the global catch-all.
|
|
407
413
|
|
|
@@ -422,4 +428,4 @@ there is no `.dash-*` class):
|
|
|
422
428
|
- **v0.1** · 2026 · personal use, no license required for Cameron's projects.
|
|
423
429
|
- Palette inspired by 1920s–50s Jazz Age Deco screen-print posters.
|
|
424
430
|
- Surface scale rooted in [Ghostty](https://ghostty.org) terminal defaults.
|
|
425
|
-
-
|
|
431
|
+
- Contrast values are pre-tuned; don't substitute hexes without re-running contrast checks.
|
|
@@ -50,7 +50,9 @@
|
|
|
50
50
|
color: var(--fg-secondary); text-decoration: none;
|
|
51
51
|
transition: color var(--dur-fast) var(--ease);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
.masthead__nav a:hover { color: var(--fg); }
|
|
55
|
+
}
|
|
54
56
|
.masthead__nav a[aria-current="page"] {
|
|
55
57
|
color: var(--accent);
|
|
56
58
|
box-shadow: inset 0 -2px 0 var(--accent); /* active band — mirrors .sidenav's rail, rotated for a horizontal nav */
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
ARTIFICER · Sploot
|
|
3
|
+
The system's critter: a Pembroke corgi, named for the flat-out,
|
|
4
|
+
back-legs-behind lounge corgis are known for. Drawn as real text — quadrant
|
|
5
|
+
block glyphs, 2×2 pixels per character — so it renders in JetBrains Mono
|
|
6
|
+
and copy-pastes into a terminal intact. Gold (--accent), single-tone,
|
|
7
|
+
static. Styles live in artificer.css (.sploot); doctrine in CLAUDE.md
|
|
8
|
+
§ Brand; reference page live-spec/sploot.html.
|
|
9
|
+
|
|
10
|
+
The pixel grids below are the ONE source for every pose. Everything else
|
|
11
|
+
(text layers here, SVG rects on a stats card, a favicon) derives from them.
|
|
12
|
+
Quadrant pixels render tall (about 0.3 × 0.65 em), so a grid reads about
|
|
13
|
+
twice as wide as it looks in source: keep the body ~3× longer than tall,
|
|
14
|
+
the ears wide-based triangles, the legs one row.
|
|
15
|
+
|
|
16
|
+
Hook: <span data-sploot="stand"></span>
|
|
17
|
+
data-sploot stand | droopy | sleep | sniff | mini
|
|
18
|
+
data-sploot-helmet fishbowl space helmet over the head
|
|
19
|
+
data-sploot-decorative aria-hidden (another element carries the meaning)
|
|
20
|
+
class="sploot--sm" size (--mini / --sm / default / --lg)
|
|
21
|
+
API: window.ArtificerSploot = { POSES, SCARF, toGlyphs, markup, build,
|
|
22
|
+
hydrate, observe, season }
|
|
23
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
24
|
+
|
|
25
|
+
(function () {
|
|
26
|
+
'use strict';
|
|
27
|
+
|
|
28
|
+
// `#` is a pixel; anything else is empty. Every pose but `mini` is 30×8, so
|
|
29
|
+
// poses swap in place without the layout moving.
|
|
30
|
+
var POSES = {
|
|
31
|
+
// Ears up, fox snout, eye, long loaf, fluffy rump, four stubby legs.
|
|
32
|
+
stand: [
|
|
33
|
+
'....................#...#.....',
|
|
34
|
+
'...................###.###....',
|
|
35
|
+
'...................#######....',
|
|
36
|
+
'.####################.######..',
|
|
37
|
+
'##############################',
|
|
38
|
+
'##########################....',
|
|
39
|
+
'.#######################......',
|
|
40
|
+
'...##..##..........##..##.....',
|
|
41
|
+
],
|
|
42
|
+
// Ears flopped forward, a little lower in the shoulders.
|
|
43
|
+
droopy: [
|
|
44
|
+
'..............................',
|
|
45
|
+
'..............................',
|
|
46
|
+
'....................##..##....',
|
|
47
|
+
'...................#######....',
|
|
48
|
+
'.####################.######..',
|
|
49
|
+
'##############################',
|
|
50
|
+
'#########################.....',
|
|
51
|
+
'...##..##..........##..##.....',
|
|
52
|
+
],
|
|
53
|
+
// The namesake: belly down, eyes shut, back legs stretched out behind.
|
|
54
|
+
sleep: [
|
|
55
|
+
'..............................',
|
|
56
|
+
'..............................',
|
|
57
|
+
'....................#...#.....',
|
|
58
|
+
'...................###.###....',
|
|
59
|
+
'...########################...',
|
|
60
|
+
'..##########################..',
|
|
61
|
+
'..#########################...',
|
|
62
|
+
'############################..',
|
|
63
|
+
],
|
|
64
|
+
// Nose down: the standing body with the head lowered two rows, tail up.
|
|
65
|
+
sniff: [
|
|
66
|
+
'..............................',
|
|
67
|
+
'..............................',
|
|
68
|
+
'.##.................#...#.....',
|
|
69
|
+
'.#####################.###....',
|
|
70
|
+
'##########################....',
|
|
71
|
+
'#####################.######..',
|
|
72
|
+
'.#############################',
|
|
73
|
+
'...##..##...........##..##....',
|
|
74
|
+
],
|
|
75
|
+
// Two text rows — a marker (e.g. beside the current table-of-contents
|
|
76
|
+
// entry). Pair with .sploot--mini.
|
|
77
|
+
mini: [
|
|
78
|
+
'...........#.#..',
|
|
79
|
+
'..........#####.',
|
|
80
|
+
'.###########.###',
|
|
81
|
+
'..#..#.....#..#.',
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Winter scarf for `stand`: a band around the neck, the end flying back
|
|
86
|
+
// over the shoulders. Its own layer so it can take --brand-purple.
|
|
87
|
+
var SCARF = [
|
|
88
|
+
'..............................',
|
|
89
|
+
'..............................',
|
|
90
|
+
'............#######...........',
|
|
91
|
+
'..................###.........',
|
|
92
|
+
'..................###.........',
|
|
93
|
+
'..................###.........',
|
|
94
|
+
'..............................',
|
|
95
|
+
'..............................',
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
// Text overlays, already in glyph rows (they're characters, not pixels).
|
|
99
|
+
var TEXT_OVERLAYS = {
|
|
100
|
+
sleep: { cls: 'sploot__zzz', rows: [' z', ' z'] },
|
|
101
|
+
sniff: { cls: 'sploot__scent', rows: [' ', ' ', ' ', ' · ·'] },
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var HELMET = [
|
|
105
|
+
' ╭──────╮',
|
|
106
|
+
' │ │',
|
|
107
|
+
' │ │',
|
|
108
|
+
' ╰──────╯',
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
var DESCRIBE = {
|
|
112
|
+
stand: 'Sploot the corgi',
|
|
113
|
+
droopy: 'Sploot the corgi, ears drooping',
|
|
114
|
+
sleep: 'Sploot the corgi, asleep',
|
|
115
|
+
sniff: 'Sploot the corgi, sniffing the ground',
|
|
116
|
+
mini: 'Sploot the corgi',
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// Index = TL | TR<<1 | BL<<2 | BR<<3 over each 2×2 pixel block.
|
|
120
|
+
var GLYPH = [' ', '▘', '▝', '▀', '▖', '▌', '▞', '▛',
|
|
121
|
+
'▗', '▚', '▐', '▜', '▄', '▙', '▟', '█'];
|
|
122
|
+
|
|
123
|
+
// Pixel grid → rows of quadrant glyphs. Trailing blanks are trimmed; an
|
|
124
|
+
// all-blank row becomes one space so the row keeps its line box.
|
|
125
|
+
function toGlyphs(grid) {
|
|
126
|
+
var width = 0;
|
|
127
|
+
grid.forEach(function (row) { if (row.length > width) width = row.length; });
|
|
128
|
+
var at = function (x, y) { return grid[y] && grid[y].charAt(x) === '#' ? 1 : 0; };
|
|
129
|
+
var rows = [];
|
|
130
|
+
for (var y = 0; y < grid.length; y += 2) {
|
|
131
|
+
var line = '';
|
|
132
|
+
for (var x = 0; x < width; x += 2) {
|
|
133
|
+
line += GLYPH[at(x, y) | (at(x + 1, y) << 1) | (at(x, y + 1) << 2) | (at(x + 1, y + 1) << 3)];
|
|
134
|
+
}
|
|
135
|
+
rows.push(line.replace(/\s+$/, '') || ' ');
|
|
136
|
+
}
|
|
137
|
+
return rows;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Northern-hemisphere meteorological seasons, from a Date (default: now).
|
|
141
|
+
function season(date) {
|
|
142
|
+
var m = (date || new Date()).getMonth();
|
|
143
|
+
if (m === 11 || m <= 1) return 'winter';
|
|
144
|
+
if (m <= 4) return 'spring';
|
|
145
|
+
if (m <= 7) return 'summer';
|
|
146
|
+
return 'autumn';
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
var warned = {};
|
|
150
|
+
function resolvePose(pose) {
|
|
151
|
+
if (pose && Object.prototype.hasOwnProperty.call(POSES, pose)) return pose;
|
|
152
|
+
if (pose && !warned[pose] && typeof console !== 'undefined') {
|
|
153
|
+
warned[pose] = true;
|
|
154
|
+
console.warn('[ArtificerSploot] unknown pose "' + pose + '"; drawing "stand"');
|
|
155
|
+
}
|
|
156
|
+
return 'stand';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// The layers for a pose, in paint order: body, then pose overlay, then
|
|
160
|
+
// helmet. With a helmet every layer drops one row to make room for the dome.
|
|
161
|
+
function layers(pose, opts) {
|
|
162
|
+
var helmet = !!(opts && opts.helmet);
|
|
163
|
+
var lift = function (rows) { return helmet ? [' '].concat(rows) : rows; };
|
|
164
|
+
var out = [{ cls: 'sploot__body', rows: lift(toGlyphs(POSES[pose])) }];
|
|
165
|
+
if (pose === 'stand') out.push({ cls: 'sploot__scarf', rows: lift(toGlyphs(SCARF)) });
|
|
166
|
+
if (TEXT_OVERLAYS[pose]) out.push({ cls: TEXT_OVERLAYS[pose].cls, rows: lift(TEXT_OVERLAYS[pose].rows) });
|
|
167
|
+
if (helmet) out.push({ cls: 'sploot__helmet', rows: HELMET });
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function describe(pose, opts) {
|
|
172
|
+
return DESCRIBE[pose] + (opts && opts.helmet ? ', in a fishbowl space helmet' : '') + ', drawn in block characters';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function escapeHtml(s) {
|
|
176
|
+
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Server-side / build-time rendering: the same element build() makes, as an
|
|
180
|
+
// HTML string. Needs no DOM, so a static-site build can import this module
|
|
181
|
+
// for effect and render Sploot with JavaScript off in the browser.
|
|
182
|
+
function markup(pose, opts) {
|
|
183
|
+
opts = opts || {};
|
|
184
|
+
var p = resolvePose(pose);
|
|
185
|
+
var cls = ['sploot'];
|
|
186
|
+
if (opts.size) cls.push('sploot--' + escapeHtml(opts.size));
|
|
187
|
+
else if (p === 'mini') cls.push('sploot--mini');
|
|
188
|
+
if (opts.className) cls.push(escapeHtml(opts.className));
|
|
189
|
+
var a11y = opts.decorative
|
|
190
|
+
? ' aria-hidden="true"'
|
|
191
|
+
: ' role="img" aria-label="' + escapeHtml(opts.label || describe(p, opts)) + '"';
|
|
192
|
+
var inner = layers(p, opts).map(function (l) {
|
|
193
|
+
return '<span class="sploot__layer ' + l.cls + '">' + escapeHtml(l.rows.join('\n')) + '</span>';
|
|
194
|
+
}).join('');
|
|
195
|
+
return '<span class="' + cls.join(' ') + '"' + a11y + '>' + inner + '</span>';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Fill an existing host element (the data-sploot hook) or a fresh span.
|
|
199
|
+
function build(pose, opts, host) {
|
|
200
|
+
opts = opts || {};
|
|
201
|
+
var p = resolvePose(pose);
|
|
202
|
+
var el = host || document.createElement('span');
|
|
203
|
+
el.classList.add('sploot');
|
|
204
|
+
if (opts.size) el.classList.add('sploot--' + opts.size);
|
|
205
|
+
else if (p === 'mini' && !/\bsploot--/.test(el.className)) el.classList.add('sploot--mini');
|
|
206
|
+
if (opts.decorative) {
|
|
207
|
+
el.setAttribute('aria-hidden', 'true');
|
|
208
|
+
el.removeAttribute('role');
|
|
209
|
+
} else {
|
|
210
|
+
el.removeAttribute('aria-hidden');
|
|
211
|
+
el.setAttribute('role', 'img');
|
|
212
|
+
// Keep an author's label; refresh one we generated, so a re-posed
|
|
213
|
+
// Sploot never announces its previous pose.
|
|
214
|
+
if (opts.label) {
|
|
215
|
+
el.setAttribute('aria-label', opts.label);
|
|
216
|
+
el.removeAttribute('data-sploot-auto-label');
|
|
217
|
+
} else if (!el.hasAttribute('aria-label') || el.hasAttribute('data-sploot-auto-label')) {
|
|
218
|
+
el.setAttribute('aria-label', describe(p, opts));
|
|
219
|
+
el.setAttribute('data-sploot-auto-label', '');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
while (el.firstChild) el.removeChild(el.firstChild);
|
|
223
|
+
layers(p, opts).forEach(function (l) {
|
|
224
|
+
var span = document.createElement('span');
|
|
225
|
+
span.className = 'sploot__layer ' + l.cls;
|
|
226
|
+
span.textContent = l.rows.join('\n');
|
|
227
|
+
el.appendChild(span);
|
|
228
|
+
});
|
|
229
|
+
return el;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function hydrate(root) {
|
|
233
|
+
var scope = root || document;
|
|
234
|
+
if (!scope.querySelectorAll) return;
|
|
235
|
+
var hosts = scope.querySelectorAll('[data-sploot]:not([data-sploot-hydrated])');
|
|
236
|
+
Array.prototype.forEach.call(hosts, function (el) {
|
|
237
|
+
build(el.getAttribute('data-sploot'), {
|
|
238
|
+
helmet: el.hasAttribute('data-sploot-helmet'),
|
|
239
|
+
decorative: el.hasAttribute('data-sploot-decorative'),
|
|
240
|
+
}, el);
|
|
241
|
+
el.setAttribute('data-sploot-hydrated', '');
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Hydrate now, then watch for inserted or re-posed hosts (SPA). Returns a
|
|
246
|
+
// disconnect fn.
|
|
247
|
+
function observe(root) {
|
|
248
|
+
var target = root || document.body;
|
|
249
|
+
hydrate(target);
|
|
250
|
+
if (typeof MutationObserver === 'undefined') return function () {};
|
|
251
|
+
var scheduled = false;
|
|
252
|
+
// rAF must be called as a method — a detached reference throws "Illegal
|
|
253
|
+
// invocation" — so wrap it rather than pick the function by ||.
|
|
254
|
+
var schedule = typeof window.requestAnimationFrame === 'function'
|
|
255
|
+
? function (fn) { window.requestAnimationFrame(fn); }
|
|
256
|
+
: function (fn) { setTimeout(fn, 16); };
|
|
257
|
+
var mo = new MutationObserver(function (mutations) {
|
|
258
|
+
mutations.forEach(function (m) {
|
|
259
|
+
if (m.type === 'attributes') m.target.removeAttribute('data-sploot-hydrated');
|
|
260
|
+
});
|
|
261
|
+
if (scheduled) return;
|
|
262
|
+
scheduled = true;
|
|
263
|
+
schedule(function () { scheduled = false; hydrate(target); });
|
|
264
|
+
});
|
|
265
|
+
mo.observe(target, {
|
|
266
|
+
childList: true,
|
|
267
|
+
subtree: true,
|
|
268
|
+
attributes: true,
|
|
269
|
+
attributeFilter: ['data-sploot', 'data-sploot-helmet', 'data-sploot-decorative'],
|
|
270
|
+
});
|
|
271
|
+
return function () { mo.disconnect(); };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
var api = {
|
|
275
|
+
POSES: POSES,
|
|
276
|
+
SCARF: SCARF,
|
|
277
|
+
toGlyphs: toGlyphs,
|
|
278
|
+
markup: markup,
|
|
279
|
+
build: build,
|
|
280
|
+
hydrate: hydrate,
|
|
281
|
+
observe: observe,
|
|
282
|
+
season: season,
|
|
283
|
+
};
|
|
284
|
+
// globalThis === window in a browser; in Node it lets a unit test or a
|
|
285
|
+
// static-site build import this file and call toGlyphs()/markup().
|
|
286
|
+
if (typeof window !== 'undefined') window.ArtificerSploot = api;
|
|
287
|
+
else if (typeof globalThis !== 'undefined') globalThis.ArtificerSploot = api;
|
|
288
|
+
|
|
289
|
+
if (typeof document === 'undefined') return;
|
|
290
|
+
|
|
291
|
+
// Stamp the season once, unless the page already did (a pre-paint script
|
|
292
|
+
// can set it to avoid any flash; Sploot itself hydrates after load anyway).
|
|
293
|
+
function autoInit() {
|
|
294
|
+
var html = document.documentElement;
|
|
295
|
+
if (!html.hasAttribute('data-season')) html.setAttribute('data-season', season());
|
|
296
|
+
observe(document.body);
|
|
297
|
+
}
|
|
298
|
+
if (document.readyState === 'loading') {
|
|
299
|
+
document.addEventListener('DOMContentLoaded', autoInit);
|
|
300
|
+
} else {
|
|
301
|
+
autoInit();
|
|
302
|
+
}
|
|
303
|
+
})();
|