sheleg-design-skill 1.66.5 → 1.67.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +8 -7
  3. package/bin/cli.js +4 -1
  4. package/cursor/rules/sheleg-design.mdc +7 -1
  5. package/kits/phosphor/.design-sync/config.json +14 -0
  6. package/kits/phosphor/.design-sync/conventions.md +48 -0
  7. package/kits/phosphor/README.md +37 -0
  8. package/kits/phosphor/package.json +29 -0
  9. package/kits/phosphor/src/Balloon.md +18 -0
  10. package/kits/phosphor/src/Balloon.tsx +24 -0
  11. package/kits/phosphor/src/Button.md +24 -0
  12. package/kits/phosphor/src/Button.tsx +34 -0
  13. package/kits/phosphor/src/Card.md +17 -0
  14. package/kits/phosphor/src/Card.tsx +23 -0
  15. package/kits/phosphor/src/ChatLine.md +18 -0
  16. package/kits/phosphor/src/ChatLine.tsx +42 -0
  17. package/kits/phosphor/src/Chip.md +12 -0
  18. package/kits/phosphor/src/Chip.tsx +25 -0
  19. package/kits/phosphor/src/Connector.md +14 -0
  20. package/kits/phosphor/src/Connector.tsx +17 -0
  21. package/kits/phosphor/src/Duotone.md +16 -0
  22. package/kits/phosphor/src/Duotone.tsx +38 -0
  23. package/kits/phosphor/src/Empty.md +11 -0
  24. package/kits/phosphor/src/Empty.tsx +17 -0
  25. package/kits/phosphor/src/Glass.md +21 -0
  26. package/kits/phosphor/src/Glass.tsx +30 -0
  27. package/kits/phosphor/src/Heading.md +14 -0
  28. package/kits/phosphor/src/Heading.tsx +32 -0
  29. package/kits/phosphor/src/Panel.md +20 -0
  30. package/kits/phosphor/src/Panel.tsx +41 -0
  31. package/kits/phosphor/src/Prompt.md +13 -0
  32. package/kits/phosphor/src/Prompt.tsx +18 -0
  33. package/kits/phosphor/src/Rain.md +20 -0
  34. package/kits/phosphor/src/Rain.tsx +120 -0
  35. package/kits/phosphor/src/Rule.md +11 -0
  36. package/kits/phosphor/src/Rule.tsx +12 -0
  37. package/kits/phosphor/src/Stat.md +11 -0
  38. package/kits/phosphor/src/Stat.tsx +17 -0
  39. package/kits/phosphor/src/Waiting.md +15 -0
  40. package/kits/phosphor/src/Waiting.tsx +15 -0
  41. package/kits/phosphor/src/index.ts +35 -0
  42. package/kits/phosphor/src/styles.css +573 -0
  43. package/kits/phosphor/tsconfig.json +15 -0
  44. package/package.json +2 -2
  45. package/plugins/sheleg-design/.claude-plugin/plugin.json +2 -2
  46. package/plugins/sheleg-design/commands/sheleg-design.md +2 -2
  47. package/plugins/sheleg-design/skills/sheleg-design/APPLYING.md +1 -1
  48. package/plugins/sheleg-design/skills/sheleg-design/COMPONENT_LAYER.md +3 -3
  49. package/plugins/sheleg-design/skills/sheleg-design/CREATIVE_DIRECTOR.md +61 -59
  50. package/plugins/sheleg-design/skills/sheleg-design/DESIGN_SYNC_BRIDGE.md +8 -9
  51. package/plugins/sheleg-design/skills/sheleg-design/FIGMA_BRIDGE.md +1 -1
  52. package/plugins/sheleg-design/skills/sheleg-design/MOBILE_SURFACES.md +2 -2
  53. package/plugins/sheleg-design/skills/sheleg-design/SKILL.md +10 -10
  54. package/plugins/sheleg-design/skills/sheleg-design/STYLE_PACK_INDEX.md +3 -2
  55. package/plugins/sheleg-design/skills/sheleg-design/SURFACE_COMPOSITION.md +4 -3
  56. package/plugins/sheleg-design/skills/sheleg-design/VISUAL_REVIEW.md +3 -3
  57. package/plugins/sheleg-design/skills/sheleg-design/styles/STYLE_PACK_TEMPLATE.md +1 -1
  58. package/plugins/sheleg-design/skills/sheleg-design/styles/instrument-console.md +8 -0
  59. package/plugins/sheleg-design/skills/sheleg-design/styles/patchbay.md +11 -0
  60. package/plugins/sheleg-design/skills/sheleg-design/styles/phosphor.md +393 -0
  61. package/plugins/sheleg-design/skills/sheleg-design/styles/tenor.md +1 -1
  62. package/plugins/sheleg-design/skills/sheleg-design/styles/tokens/phosphor.css +192 -0
  63. package/plugins/sheleg-design/skills/sheleg-design/templates/director-record.md +21 -21
package/CHANGELOG.md CHANGED
@@ -1,3 +1,68 @@
1
+ ## 1.67.0 (2026-11-18): the fortieth pack, a lit terminal with rain behind the glass
2
+
3
+ - **`phosphor`, the fortieth style pack** (widened, all thirteen headings), extracted from
4
+ the story landing at `assessment.passioncode.ai` on the operator's request to mark its
5
+ green, schematic look in the collection. A green-black field that is never neutral,
6
+ one phosphor `#00ff66` that fills, writes, rules and glows (15.04:1 on the field), a
7
+ mono voice for everything the machine says, digital rain on a canvas behind glass
8
+ windows (the signature element), comic story panels with hard offsets, a light speech
9
+ balloon outlined in a pure-black keyline, drawn connectors and duotone portraits.
10
+ Named per ADR-0001 for the register, with `terminal`, `rainfall` and `comicbook`
11
+ weighed and rejected.
12
+ - **Measured, not invented.** Every value was read with `getComputedStyle` through CDP at
13
+ 1440x900, an emulated 768x1024x2 and an emulated 390x844x2, plus reduced motion, and
14
+ cross-checked against the page's one authored palette block; the rain from its canvas
15
+ script, the duotone from its SVG filter. Ratios were computed with the palette gate.
16
+ - **Corrections the pack makes to its reference**, each recorded in its Gotchas or
17
+ Bans: the balloons paint pale text on a pale fill at 1.01:1 (a later `.panel p` rule
18
+ outranks the declared ink), so the pack pins `--on-balloon` with a selector a panel
19
+ cannot outrank; there is no focus-visible ring anywhere, so the pack adds a 2px
20
+ phosphor outline; `100vh` becomes `100dvh`; gradient text, overshoot curves and
21
+ `scale(0)` entries are banned; the pure-black comic ink is renamed `--keyline`
22
+ because this library's `--ink` is the text colour. `--warn` is a measured gold given
23
+ the warn role, `--ok` aliases the phosphor, and status is never by colour alone.
24
+ - **`kits/phosphor`**: the six-name spine plus `Rain`, `Glass`, `ChatLine`, `Balloon`,
25
+ `Panel` with `Cells`, `Connector`, `Duotone`, `Prompt`, `Waiting` and `Empty`, the token
26
+ layer copied byte for byte, and the `@adapter` block. Rendered at all three widths and
27
+ under reduced motion with computed values read back (CONTRIBUTING step 8): button 37px
28
+ (44px on a coarse pointer), large button 55px, panel padding 26/28px then 18/16px below
29
+ 860px, cells four then two columns by the panel's width, chat lines 19px in a 640px
30
+ window and 16px under 560px, balloon text `rgb(6, 17, 11)` inside a panel, focus ring
31
+ 2px phosphor at a 2px offset, no horizontal overflow; under reduced motion the rain is
32
+ `display: none` and the cursor is paused.
33
+ - **Routing**: `STYLE_PACK_INDEX.md`, the README table, the Cursor rule, the CLI banner,
34
+ the command's fast path and both derived manifest descriptions; reciprocal forks in
35
+ `patchbay` and `instrument-console`; the status map in `SURFACE_COMPOSITION.md`; counts
36
+ moved from thirty-nine to forty.
37
+ - **Scenario T38** (phosphor against patchbay) ran blind on two fresh contexts and both
38
+ branches passed. The first read's ten fixable findings on `phosphor` are fixed here;
39
+ two findings on the library are filed as B-148 (`patchbay`) and B-149 (`@adapter`).
40
+
41
+ ## 1.66.6 (2026-11-11): the short path first, retired sources out
42
+
43
+ Family audit 2026-11-11 (SD1, SD2, SD4, SD5, SD7). The description is unchanged.
44
+
45
+ - **Small work reads one section, not the whole decision layer** (SD1). `SKILL.md` sends an
46
+ update or a bounded fix straight to [Focused visual work](plugins/sheleg-design/skills/sheleg-design/CREATIVE_DIRECTOR.md#focused-visual-work),
47
+ and that section now opens `CREATIVE_DIRECTOR.md` (it sat at line 444 of 524). Every rule is
48
+ kept; this is a reordering, plus one line saying new work goes on to Act 1.
49
+ - **Lazyweb is gone from the live text** (SD2): its MCP is retired. The reference servers are
50
+ Refero and Mobbin in `SKILL.md`, `CREATIVE_DIRECTOR.md`, `APPLYING.md`,
51
+ `DESIGN_SYNC_BRIDGE.md` §4 (heading and validator pin together), `MOBILE_SURFACES.md` (Refero
52
+ takes the table row), the director-record template, the Cursor rule (which named only Lazyweb),
53
+ the README, the live release scenarios and two sample records. Dated records keep their wording.
54
+ - **The Chromium fallback names runnable routes** (SD4): Chrome Dev or the agent's own headless
55
+ Chromium, with the Lighthouse CLI, instead of the chrome-devtools MCP. WebKit stays first;
56
+ `test/audit_regressions/safari-first.py` pins the new wording.
57
+ - **The component kit is recorded, not asked** (SD5): `shadcn/ui` is recorded once per project
58
+ with a one-line notice; the question is asked only when an existing component layer conflicts.
59
+ `COMPONENT_LAYER.md` says the same.
60
+ - **The director-record template carries no em dash** (SD7): 20 replaced by colons, commas and
61
+ parentheses; `--check-record` accepts both forms. The style-pack template is filed as B-147.
62
+ - Body 4,740 of 4,750 tokens (`audit_skill.py --house`). The Figma survey figures in *The craft
63
+ bar* were checked against the published report on 2026-11-11 (n=906; 58, 47, 36, 35, 15 per
64
+ cent) and are unchanged.
65
+
1
66
  ## 1.66.5 (2026-10-27): route misses join the Triggers section
2
67
 
3
68
  - **Route misses join `## Triggers`** (hub board row B-267), each inside its existing entry:
package/README.md CHANGED
@@ -31,7 +31,7 @@ problem — invented colors, six accent hues, dark mode retrofitted later.
31
31
 
32
32
  This skill is the taste layer. It gives a coding agent **one motion
33
33
  methodology** for cinematic, scroll-driven pages, **a motion doctrine** that
34
- decides whether to animate before it decides how, and **thirty-nine locked style
34
+ decides whether to animate before it decides how, and **forty locked style
35
35
  packs** with ready-made design tokens, so what it builds reads as one system
36
36
  instead of a pile of effects.
37
37
 
@@ -79,6 +79,7 @@ into the cinematic layer, and says so in its own *Motion flavor* section.
79
79
  | `test-drive` | warm paper and white cards where **the live product runs inside drawn browser chrome** — traffic-light dots, a real address, the engine on — one coral in two tokens (the brand hue lights, fills and blinks; a darker step carries every body-size word), every control lit by a four-layer shadow in its own hue, a handwritten face and a yellow marker annotating from the margin | **self-serve SaaS sold by handing over the running product** — analytics, dashboards, developer tools with a visible console, indie SaaS (standalone) |
80
80
  | `surveyor` | peach paper where **an unseen terrain is mapped** — fine contour lines as the one texture, flat white and tinted cards with no shadow anywhere, a teal whose text-bearing steps are the reference's own hover ladder, a pink that answers but may not speak, and the product appearing only as flat portraits | **visibility, monitoring and benchmark tools** — AI-search and SEO trackers, share-of-voice and brand-listening platforms sold to marketing teams (standalone) |
81
81
  | `chorus` | warm off-white paper under **a construction grid that never switches off** — two 1px verticals crossed by horizontals with a small plus at every intersection, continued across the dark band — where the set piece is **somebody else's question** in a cut-corner bubble, 24px on three corners and 0 on the top right, set in the display face; white cards with a hairline and no shadow, near-black slabs cut 30px into the sheet, one coral that fills but may never be a word | **AI-search visibility, brand monitoring and community marketing** — answer-engine and share-of-voice trackers, social listening, review and reputation tools whose proof is other people's conversations (standalone) |
82
+ | `phosphor` | a green-black terminal **with digital rain falling behind glass windows**: one phosphor green that fills, writes, rules and glows, a mono voice for everything the machine says, story panels with a hard comic offset, schematic connectors drawn in one stroke, and portraits pushed through a green duotone | **products told as a story about machines doing the work**: agent products, automation and AI operations, onboarding narratives and story-told launches (standalone) |
82
83
  | `outrank` | white field with one violet that carries text in both directions, a 5px light ring standing in for a button shadow, and two type families split by how long a thing is read | SEO and growth SaaS, agent-run back-office — the pack for a product that ships a landing and a dashboard at once |
83
84
  | `orchard` | warm oat field of rounded slabs, sage brand + one candy-orange action, rounded geometric display, soft-3D pills built from inset light | friendly consumer biotech, DTC wellness, testing kits & supplements |
84
85
  | `field-notes` | warm green-cast paper ruled by hairlines, one rust accent, a hero that dissolves into the page instead of ending, numbered mono eyebrows, crop marks, colour that encodes how a claim is known | open-source & developer tools sold on auditability — code intelligence, provenance, evals, agent memory |
@@ -183,7 +184,7 @@ skills.
183
184
  | `DESIGN_SYNC_BRIDGE.md` | The Claude Design contract: what a pack sends to claude.ai/design and in what shape, the rule for each of the four reference types, and the border motion does not cross |
184
185
  | `FIGMA_BRIDGE.md` | The design↔code contract: the family's token-tier model, how a pack's tokens map onto Figma variables (collections, modes, code syntax, scopes), how to implement a design without importing raw values, what cannot cross the border, and where it overrides Figma's own guidance |
185
186
  | `AI_PRODUCT_PATTERNS.md` | The surfaces a model drives: the five states of a call, streaming instead of spinners, latency, provenance and uncertainty, agent confirmations, and the bans that keep it honest |
186
- | `styles/*.md` | The thirty-nine style packs — palette, type, texture, motion tokens, motifs, bans, and the traps each one carries |
187
+ | `styles/*.md` | The forty style packs — palette, type, texture, motion tokens, motifs, bans, and the traps each one carries |
187
188
  | `styles/tokens/*.css` | The ready-made token layer per pack, copied verbatim instead of transcribed (`workbench` and `field-notes` each ship a light `:root` plus a `data-theme="dark"` twin) |
188
189
  | `styles/STYLE_PACK_TEMPLATE.md` | The pack contract as a skeleton, so a new style is authored against the same headings rather than improvised |
189
190
 
@@ -301,7 +302,7 @@ cd ./ds-workbench && npm install && npm run build
301
302
  then `/design-sync` in that directory, from Claude Code. Three layers cross: the
302
303
  pack's **bans** as the design system's own README, `styles.css` built from
303
304
  `tokens/<pack>.css` verbatim, and the components — a six-name spine that is
304
- identical in all thirty-nine kits, so switching packs swaps identity rather than API,
305
+ identical in all forty kits, so switching packs swaps identity rather than API,
305
306
  plus each pack's signature parts. **Motion does not cross**, exactly as it does
306
307
  not cross into Figma: a kit is the static half of a pack, and saying so is what
307
308
  stops an agent inventing motion to fill the silence.
@@ -309,13 +310,13 @@ stops an agent inventing motion to fill the silence.
309
310
  The kits are not part of the install. `--kit` fetches one on demand, which is how
310
311
  the skill stays documentation while still having real components to hand.
311
312
 
312
- ## Reference sweeps (Refero, Lazyweb, Mobbin)
313
+ ## Reference sweeps (Refero, Mobbin)
313
314
 
314
315
  A style pack locks *how it looks*. It says nothing about what a good version of
315
316
  the screen you're about to build actually **contains**. For a new design or a
316
317
  redesign of a brand or flagship surface the sweep is not optional: through
317
- whichever reference servers are connected — Refero, [Lazyweb](https://www.lazyweb.com),
318
- Mobbin where the account is authorized — the skill looks at five or more shipped
318
+ whichever reference servers are connected (Refero, and Mobbin where the account
319
+ is authorized) the skill looks at five or more shipped
319
320
  products for the target screen (signup, onboarding, paywall, pricing, checkout,
320
321
  dashboard, settings) before laying anything out, and records what it takes from
321
322
  each. An empty sweep is recorded as `none found` with where it looked.
@@ -366,7 +367,7 @@ a pack's four widened sections used to make two gates *quieter* and still green.
366
367
  One honest limit: the npx installer is checked by asserting its runtime bundle
367
368
  walker exists, not by reading a file list — it has none by design. What proves
368
369
  it ships the right files is CI, which installs the bundle through **both**
369
- installers and `diff -r`s the result against the source, then builds all thirty-nine
370
+ installers and `diff -r`s the result against the source, then builds all forty
370
371
  kits.
371
372
 
372
373
  `test/scenarios.md` (T1–T34) is the behavioral harness: fresh subagents given a
package/bin/cli.js CHANGED
@@ -377,7 +377,7 @@ ${c("bold", "What it installs")}
377
377
  DESIGN_SYNC_BRIDGE.md the Claude Design contract (what a pack sends, and
378
378
  what does not cross)
379
379
  AI_PRODUCT_PATTERNS.md chat / agent / streaming surfaces (honest state)
380
- styles/ thirty-nine style packs — instrument-console (dark console),
380
+ styles/ forty style packs — instrument-console (dark console),
381
381
  editorial-luxury (warm editorial), workbench (light/dark
382
382
  product UI), briefing-room (dark 16:9 presentation deck),
383
383
  atrium (warm cream consumer health), patchbay (dark live
@@ -405,6 +405,9 @@ ${c("bold", "What it installs")}
405
405
  cut-corner bubble carrying somebody else's
406
406
  question, near-black slabs cut into the sheet, one
407
407
  coral that fills but never writes),
408
+ phosphor (a green-black terminal with digital rain
409
+ behind glass windows, one phosphor green that fills,
410
+ writes and glows, comic panels and duotone portraits),
408
411
  babylove (white +
409
412
  one orange, seven tokens over Tailwind defaults),
410
413
  outrank (white +
@@ -146,6 +146,11 @@ white cards with no shadow and a hairline edge, near-black slabs cut 30px into t
146
146
  sheet, one coral that fills but may never be a word, and a periwinkle that only exists
147
147
  in a gradient or on the dark, for AI-search visibility, brand monitoring, social
148
148
  listening and community marketing whose proof is other people's conversations;
149
+ phosphor: a green-black terminal with digital rain falling behind glass windows, one
150
+ phosphor green (#00ff66) that fills, writes, rules and glows, a mono voice for every
151
+ line the machine says, story panels with a hard comic offset, schematic connectors
152
+ drawn in one stroke and portraits pushed through a green duotone, for agent products,
153
+ automation and story-told launches read as a sequence of scenes;
149
154
  otherwise follow the contract below (self-contained on purpose).
150
155
 
151
156
  ## Whether to animate at all — before how
@@ -260,7 +265,8 @@ The cinematic layer is out of scope here; only the style half applies.
260
265
  nothing scroll-driven, transitions off under `prefers-reduced-motion`.
261
266
  - Honest state: no fake "connected", no optimistic spinner where live state
262
267
  exists; degraded renders visibly degraded.
263
- - If Lazyweb MCP tools (`mcp__lazyweb__*`) are available, sweep real-world
268
+ - If reference MCP tools are available (Refero `mcp__refero__*`, Mobbin
269
+ `mcp__mobbin__*` where the account is authorized), sweep real-world
264
270
  references for the target screen before laying it out — they inform layout,
265
271
  hierarchy and content order only; palette, type and motion stay the pack's.
266
272
  Optional: absent the tools, work from the pack alone.
@@ -0,0 +1,14 @@
1
+ {
2
+ "pkg": "@sheleg-design/phosphor",
3
+ "globalName": "ShelegPhosphor",
4
+ "shape": "package",
5
+ "buildCmd": "npm run build",
6
+ "srcDir": "src",
7
+ "tsconfig": "tsconfig.json",
8
+ "cssEntry": "src/styles.css",
9
+ "docsDir": "src",
10
+ "readmeHeader": ".design-sync/conventions.md",
11
+ "guidelinesGlob": [
12
+ "guidelines/*.md"
13
+ ]
14
+ }
@@ -0,0 +1,48 @@
1
+ # Phosphor: conventions for a design agent
2
+
3
+ This kit is the built form of the Phosphor style pack. Read these before generating
4
+ anything with it; they are the pack's bans, stated where a design tool will see them.
5
+
6
+ ## Colour
7
+
8
+ - **One phosphor green does every job.** `--accent` (#00ff66) fills the action, sets a
9
+ mono headline, draws a connector, rings the focus and glows. It is 15.04:1 on the
10
+ field, so it may be a word. A filled phosphor takes `--on-accent` (#001a09, 13.45:1);
11
+ **a white label on the phosphor is banned**.
12
+ - **The field is a green-black, never neutral.** `--bg` #020604, steps `--panel` and
13
+ `--panel-raised`. There is no light theme and no light section.
14
+ - **The balloon is the one light object.** `--balloon` with `--on-balloon` (18.34:1).
15
+ Pin its text colour with a selector a surrounding panel cannot outrank.
16
+ - **`--keyline` is pure black and is never text**: an outline and a hard offset only.
17
+ - **Status is never by colour alone.** `--ok` is the phosphor itself, `--warn` the
18
+ gold, `--danger` the red; the phosphor and the gold sit inside a dichromat's
19
+ confusion range, so every status carries a word or an arrow. There is no info role.
20
+ - No second interface hue: no blue, no purple, no cyan.
21
+
22
+ ## Light, surface and edge
23
+
24
+ - Elevation is light, not shadow: a raised thing has a brighter edge and a glow. The
25
+ only downward shadows are the comic offsets, hard and unblurred, down and right.
26
+ - Glass (`Glass`) only over the rain, where it lets the rain stay visible behind a
27
+ window that must be read. Glass over a still field is banned.
28
+ - Glow only on the lit things: a control, a live figure, a mono headline, a connector.
29
+ Never on body copy, never on every card.
30
+ - No scanlines, no CRT curvature, no chromatic aberration. The terminal feel comes
31
+ from the mono voice, the stepped timing and the prompt glyphs.
32
+
33
+ ## Type
34
+
35
+ - Inter is the human voice (the hero headline at 800, body, balloons, buttons). The
36
+ system mono is the machine voice (panel titles, captions, chips, tags, figures).
37
+ - No gradient text anywhere. The emphasis is `--accent` with `--glow-text`.
38
+ - Mono measures in `ch`, never px: the mono is the platform's own and varies.
39
+
40
+ ## Motion
41
+
42
+ - Terminal timing is stepped: a typed headline on `steps(24)`, the cursor on
43
+ `steps(2)`. Interface motion is one curve, `--ease-ui`, at 120 and 180ms.
44
+ - No overshoot easing and nothing entering from `scale(0)`.
45
+ - `Rain` is the signature element and the page's only ambient layer: mount it once.
46
+ - The reduced-motion contract has a JavaScript half: `Rain` never starts its loop under
47
+ `prefers-reduced-motion: reduce`, and the stylesheet hides the canvas. A reveal
48
+ observer must also read the query and mount at the final state.
@@ -0,0 +1,37 @@
1
+ # @sheleg-design/phosphor
2
+
3
+ The React reference kit for the **Phosphor** style pack: a green-black terminal with
4
+ digital rain falling behind glass windows, one phosphor green that fills, writes and
5
+ glows, comic story panels, and portraits pushed through a green duotone.
6
+
7
+ The pack itself is the authority:
8
+ [`styles/phosphor.md`](../../plugins/sheleg-design/skills/sheleg-design/styles/phosphor.md).
9
+ This kit is one built reading of it, not a second source of truth. `src/styles.css`
10
+ opens with the pack's token layer copied byte for byte from
11
+ `styles/tokens/phosphor.css`; everything below the `/* ── components ── */` marker
12
+ consumes `var(--…)` and contains no colour literal.
13
+
14
+ ## Build
15
+
16
+ ```bash
17
+ npm install
18
+ npm run build # tsc only: no bundler, no runtime dependency but React
19
+ ```
20
+
21
+ ## What is here
22
+
23
+ The six-name spine every SHELEG kit shares (`Button`, `Card`, `Chip`, `Stat`,
24
+ `Heading`, `Rule`) with identical props everywhere, so switching packs swaps identity
25
+ rather than API. Then this pack's own: `Rain` (the signature element), `Glass`,
26
+ `ChatLine`, `Balloon`, `Panel` with `Cells`, `Connector`, `Duotone`, `Prompt`,
27
+ `Waiting` (the loader) and `Empty`.
28
+
29
+ Each component carries a `.md` beside it with its category and the numbers that
30
+ license its colours.
31
+
32
+ ## The three rules that are easiest to break
33
+
34
+ 1. A white label on the phosphor, at any size.
35
+ 2. A second ambient layer beside `Rain`, or glass with nothing moving behind it.
36
+ 3. The reduced-motion contract has a JavaScript half; see
37
+ `.design-sync/conventions.md`.
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@sheleg-design/phosphor",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "src"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.json"
21
+ },
22
+ "peerDependencies": {
23
+ "react": ">=18"
24
+ },
25
+ "devDependencies": {
26
+ "typescript": "^5.6.0",
27
+ "@types/react": "^18.3.0"
28
+ }
29
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ category: Signature
3
+ ---
4
+
5
+ The one light object in the pack: a comic speech balloon. `--balloon` fill, a 2px
6
+ `--keyline` outline, `--r-balloon` (18px), `--offset-keyline` (a hard 4px black offset),
7
+ `10px 16px` padding and a tail drawn in `--keyline` pointing at the speaker. The line is
8
+ Inter 18px/1.35 in `--on-balloon` (18.34:1); the speaker label is mono 11px/700 caps at
9
+ 0.08em in `--balloon-who` (6.18:1 on the fill).
10
+
11
+ **The text colour is pinned with a selector that outranks any surrounding panel.** The
12
+ live reference declares this colour and then loses it to a later `.panel p` rule, so
13
+ its balloons paint pale text on a pale fill at 1.01:1. The kit's `.ph-balloon
14
+ .ph-balloon__text` cannot be overridden by `.ph-panel p`.
15
+
16
+ ```tsx
17
+ <Balloon who="Guide" side="left">Every task has an owner now. Watch.</Balloon>
18
+ ```
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface BalloonProps {
4
+ /** Speaker label, mono caps above the line. */
5
+ who?: string;
6
+ /** Which side the tail points to: the speaker's side. */
7
+ side?: 'left' | 'right';
8
+ /** A portrait or a Duotone beside the balloon. */
9
+ avatar?: ReactNode;
10
+ children: ReactNode;
11
+ className?: string;
12
+ }
13
+
14
+ export function Balloon({ who, side = 'left', avatar, children, className }: BalloonProps) {
15
+ return (
16
+ <div className={['ph-say', side === 'right' ? 'ph-say--right' : null, className].filter(Boolean).join(' ')}>
17
+ {avatar}
18
+ <div className="ph-balloon">
19
+ {who && <span className="ph-balloon__who">{who}</span>}
20
+ <p className="ph-balloon__text">{children}</p>
21
+ </div>
22
+ </div>
23
+ );
24
+ }
@@ -0,0 +1,24 @@
1
+ ---
2
+ category: Actions
3
+ ---
4
+
5
+ A pill. `primary` is the reference's action: `--accent` fill, an `--on-accent` label
6
+ (13.45:1), Inter 14px/700, `8px 14px`, 37px tall, wearing a 2px `--keyline` ring, a hard
7
+ `--offset-keyline` and `--glow-action`. Hover moves the fill to
8
+ `--accent-hover` over `--dur-hover`; the press sits the button into its own offset over
9
+ the same 120ms, which is inside the doctrine's press band. **A white label on the
10
+ phosphor is banned at every size.**
11
+
12
+ `secondary` is the ghost: no fill, a 1px `--line-strong` border, an `--ink` label;
13
+ hover lights border and label to `--accent`. `ghost` is a bare text link in `--ink`
14
+ that lights on hover.
15
+
16
+ `lg` is the hero size: 18px, `14px 22px`, 55px tall. On a coarse pointer every size
17
+ grows to the 44px tap floor (a pack decision; the reference's bar button is 37px).
18
+
19
+ Disabled: `--panel-raised` fill, `--ink-muted` label, no offset and no glow.
20
+
21
+ ```tsx
22
+ <Button size="lg">Start the story</Button>
23
+ <Button variant="secondary">See how it runs</Button>
24
+ ```
@@ -0,0 +1,34 @@
1
+ import { forwardRef } from 'react';
2
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
3
+
4
+ export interface ButtonProps
5
+ extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
6
+ /** `primary` is the phosphor fill with the near-black green label, never a white one. */
7
+ variant?: 'primary' | 'secondary' | 'ghost';
8
+ size?: 'sm' | 'md' | 'lg';
9
+ children: ReactNode;
10
+ className?: string;
11
+ }
12
+
13
+ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(
14
+ { variant = 'primary', size = 'md', className, type, children, ...rest },
15
+ ref,
16
+ ) {
17
+ return (
18
+ <button
19
+ ref={ref}
20
+ // default is `button`, but an explicit caller `type` (submit, reset) wins:
21
+ // a design default must never silently erase a prop the caller set.
22
+ type={type ?? 'button'}
23
+ className={['ph-btn', `ph-btn--${variant}`, `ph-btn--${size}`, className]
24
+ .filter(Boolean)
25
+ .join(' ')}
26
+ // native + ARIA + state pass through: aria-label for icon-only buttons,
27
+ // aria-controls / aria-expanded for trigger controls, disabled, and onClick
28
+ // with its real event. The spine forwards, it does not swallow.
29
+ {...rest}
30
+ >
31
+ {children}
32
+ </button>
33
+ );
34
+ });
@@ -0,0 +1,17 @@
1
+ ---
2
+ category: Surfaces
3
+ ---
4
+
5
+ The solid instrument card: `--panel` with a 1px `--accent` border at `--r-cell`, `12px
6
+ 14px` padding, no shadow. The title is mono 13px/700 in `--accent`; the meta is mono
7
+ 12px in `--ink-muted` (9.32:1 on the panel).
8
+
9
+ A card sits on the field or inside a `Panel`. Over the rain, use `Glass` instead: a
10
+ solid card over moving glyphs hides them, which is the one thing the signature element
11
+ must not lose.
12
+
13
+ ```tsx
14
+ <Card title="Live services" meta="4 of 4 up">
15
+ Billing, support, ads and analytics answer.
16
+ </Card>
17
+ ```
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface CardProps {
4
+ title?: string;
5
+ /** Right-aligned metadata on the title row: a source, a count, a date. */
6
+ meta?: string;
7
+ children: ReactNode;
8
+ className?: string;
9
+ }
10
+
11
+ export function Card({ title, meta, children, className }: CardProps) {
12
+ return (
13
+ <div className={['ph-card', className].filter(Boolean).join(' ')}>
14
+ {(title || meta) && (
15
+ <div className="ph-card__head">
16
+ {title && <h3 className="ph-card__title">{title}</h3>}
17
+ {meta && <span className="ph-card__meta">{meta}</span>}
18
+ </div>
19
+ )}
20
+ <div className="ph-card__body">{children}</div>
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ category: Signature
3
+ ---
4
+
5
+ One line in a `Glass` window: an initials disc (`--face` with `--ink-bright`, 12.40:1)
6
+ or a portrait, the speaker in mono 13px/600 `--ink-muted`, and the line itself in Inter
7
+ 19px/1.4 on `--panel-raised` with a 1px `--line` border and the radius `4px 14px 14px
8
+ 14px`, whose sharp corner points at the speaker.
9
+
10
+ `agent` moves the border to `--accent` and adds a `0 0 18px --accent-trace` glow: the
11
+ machine's lines are the lit ones. `system` drops the bubble for a centred mono line in
12
+ `--accent`.
13
+
14
+ ```tsx
15
+ <ChatLine who="Mila" initials="MK">Can someone own onboarding this week?</ChatLine>
16
+ <ChatLine who="Agent" agent>Taking it. Plan in ten minutes.</ChatLine>
17
+ <ChatLine who="" system>Agent joined the channel</ChatLine>
18
+ ```
@@ -0,0 +1,42 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface ChatLineProps {
4
+ /** Speaker name, set in mono above the line. */
5
+ who: string;
6
+ /** Initials for the disc when no portrait is passed. */
7
+ initials?: string;
8
+ /** A portrait or a Duotone in place of the initials disc. */
9
+ avatar?: ReactNode;
10
+ /** An agent's line takes the phosphor border and its glow. */
11
+ agent?: boolean;
12
+ /** A system notice: centred mono phosphor, no bubble. */
13
+ system?: boolean;
14
+ children: ReactNode;
15
+ className?: string;
16
+ }
17
+
18
+ export function ChatLine({ who, initials, avatar, agent = false, system = false, children, className }: ChatLineProps) {
19
+ const cls = ['ph-line', agent ? 'ph-line--agent' : null, system ? 'ph-line--system' : null, className]
20
+ .filter(Boolean)
21
+ .join(' ');
22
+ if (system) {
23
+ return (
24
+ <div className={cls}>
25
+ <p className="ph-line__text">{children}</p>
26
+ </div>
27
+ );
28
+ }
29
+ return (
30
+ <div className={cls}>
31
+ {avatar ?? (
32
+ <span className="ph-line__face" aria-hidden="true">
33
+ {initials ?? who.slice(0, 2).toUpperCase()}
34
+ </span>
35
+ )}
36
+ <div>
37
+ <b className="ph-line__who">{who}</b>
38
+ <p className="ph-line__text">{children}</p>
39
+ </div>
40
+ </div>
41
+ );
42
+ }
@@ -0,0 +1,12 @@
1
+ ---
2
+ category: Actions
3
+ ---
4
+
5
+ The eyebrow and the tag: mono 12px/600 caps at 0.08em in `--ink-muted`, a 1px
6
+ `--accent-rim` border, `--r-pill`, `6px 12px`, on `--panel`. `accent` lights the label
7
+ to `--accent` (14.27:1 on the panel); selected adds `--glow`.
8
+
9
+ ```tsx
10
+ <Chip>Demo</Chip>
11
+ <Chip tone="accent" selected>Live</Chip>
12
+ ```
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ export interface ChipProps {
4
+ children: ReactNode;
5
+ selected?: boolean;
6
+ tone?: 'neutral' | 'accent';
7
+ className?: string;
8
+ }
9
+
10
+ export function Chip({ children, selected = false, tone = 'neutral', className }: ChipProps) {
11
+ return (
12
+ <span
13
+ className={[
14
+ 'ph-chip',
15
+ `ph-chip--${tone}`,
16
+ selected ? 'is-selected' : null,
17
+ className,
18
+ ]
19
+ .filter(Boolean)
20
+ .join(' ')}
21
+ >
22
+ {children}
23
+ </span>
24
+ );
25
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ category: Signature
3
+ ---
4
+
5
+ The schematic connector between two story panels: one path at a 3px stroke in
6
+ `--accent`, round caps and joins, a soft phosphor drop-shadow, and a mono 13px/600 label
7
+ in `--accent` naming what it carries. It draws itself once with a dash offset over
8
+ `--dur-draw` (1s) when it enters; under reduced motion it renders fully drawn.
9
+
10
+ One stroke, never a double line, never an arrowhead filled in a second colour.
11
+
12
+ ```tsx
13
+ <Connector carries="the plan, with an owner per task" />
14
+ ```
@@ -0,0 +1,17 @@
1
+ export interface ConnectorProps {
2
+ /** What the connector carries to the next panel, set in mono beside it. */
3
+ carries?: string;
4
+ className?: string;
5
+ }
6
+
7
+ /** The drawn arrow between two panels: one 3px stroke, round caps, a soft phosphor drop-shadow. */
8
+ export function Connector({ carries, className }: ConnectorProps) {
9
+ return (
10
+ <div className={['ph-connector', className].filter(Boolean).join(' ')}>
11
+ <svg className="ph-connector__arrow" viewBox="0 0 120 110" aria-hidden="true">
12
+ <path d="M20 8 C 70 20, 96 50, 82 96 M66 84 L82 98 L96 82" pathLength="240" />
13
+ </svg>
14
+ {carries && <span className="ph-connector__carries">{carries}</span>}
15
+ </div>
16
+ );
17
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ category: Signature
3
+ ---
4
+
5
+ Every photograph in this pack is made of the page's own light: desaturated, then
6
+ mapped through three stops, the field (near-black), `--accent` and `--ink-bright`, with
7
+ `contrast(1.15)`. The stops are SVG `feFuncR/G/B` table values (0.01, 0, 0.84 / 0.02, 1,
8
+ 1 / 0.02, 0.4, 0.89), measured off the reference's filter. A custom property cannot feed
9
+ an SVG filter, so a token change has to be carried into these numbers by hand.
10
+
11
+ `round` is a chat avatar (a circle); `tile` is a large portrait at `--r-balloon` with a
12
+ 2px `--accent` ring and the window glow.
13
+
14
+ ```tsx
15
+ <Duotone src="/team/lead.jpg" alt="The team lead" shape="tile" size={240} />
16
+ ```
@@ -0,0 +1,38 @@
1
+ import { useId } from 'react';
2
+
3
+ export interface DuotoneProps {
4
+ src: string;
5
+ alt: string;
6
+ size?: number;
7
+ /** `round` for a chat avatar, `tile` for a large portrait. */
8
+ shape?: 'round' | 'tile';
9
+ className?: string;
10
+ }
11
+
12
+ /**
13
+ * A photograph pushed through the pack's green duotone: desaturated, then mapped
14
+ * through three stops (the field, the phosphor, the pale ink). The table values are
15
+ * those stops written as fractions; an SVG filter cannot read a custom property, so
16
+ * they move with the tokens by hand (see the pack's Gotchas).
17
+ */
18
+ export function Duotone({ src, alt, size = 112, shape = 'tile', className }: DuotoneProps) {
19
+ const id = `ph-duo-${useId().replace(/:/g, '')}`;
20
+ return (
21
+ <span
22
+ className={['ph-duotone', `ph-duotone--${shape}`, className].filter(Boolean).join(' ')}
23
+ style={{ width: size, height: size }}
24
+ >
25
+ <svg width="0" height="0" aria-hidden="true" focusable="false" style={{ position: 'absolute' }}>
26
+ <filter id={id} colorInterpolationFilters="sRGB">
27
+ <feColorMatrix type="saturate" values="0" />
28
+ <feComponentTransfer>
29
+ <feFuncR type="table" tableValues="0.01 0 0.84" />
30
+ <feFuncG type="table" tableValues="0.02 1 1" />
31
+ <feFuncB type="table" tableValues="0.02 0.4 0.89" />
32
+ </feComponentTransfer>
33
+ </filter>
34
+ </svg>
35
+ <img src={src} alt={alt} style={{ filter: `url(#${id}) contrast(1.15)` }} />
36
+ </span>
37
+ );
38
+ }