@orangecheck/design 0.20.0 → 0.22.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 CHANGED
@@ -21,10 +21,14 @@ Canonical design + rollout plan: `~/Projects/ochk/DESIGN-SYSTEM-PLAN.md`.
21
21
 
22
22
  - **Mode** — `light | dark`, owned by `next-themes` via the `.dark` class. Toggle
23
23
  with `<ThemeToggle />`. Unchanged from today.
24
- - **Skin** — a named theme (`orangecheck` default, `midnight`, …), owned by
25
- `<OcThemeProvider>` via the `data-oc-theme` attribute, persisted in the
26
- `oc_skin` cookie at `Domain=.ochk.io` so a choice carries across every family
27
- site. Pick with `<OcThemePicker />`.
24
+ - **Skin** — a named theme, owned by `<OcThemeProvider>` via the `data-oc-theme`
25
+ attribute, persisted in the `oc_skin` cookie at `Domain=.ochk.io` so a choice
26
+ carries across every family site. Pick with `<OcThemePicker />`. Five skins
27
+ ship: **`ember`** — the family **default** (a warm, rounded consumer skin:
28
+ terracotta, 1rem radius, pill buttons, self-hosted Hanken Grotesk; owns the
29
+ bare `:root`/`.dark` base) — plus `orangecheck`, `phosphor`, `lightning`,
30
+ `gold` (the four sharp/flat Bitcoin-ethos alternates, attribute-only arms). A
31
+ skin re-skins color, radius, type, and elevation — not just hue.
28
32
 
29
33
  The two compose: any skin renders in both modes.
30
34
 
@@ -65,15 +69,32 @@ Header (gate the picker behind a flag during staged rollout):
65
69
  ```
66
70
 
67
71
  Fonts are still loaded by the app via `next/font` into `--font-sans-display`
68
- and `--font-mono-display`, exactly as before.
72
+ and `--font-mono-display`, exactly as before — the default skins defer to them.
73
+ A skin may instead **self-host its own font in-package**: `ember` ships Hanken
74
+ Grotesk as a variable woff2 under `src/styles/fonts/`, declared in
75
+ `src/styles/fonts.css` (imported first by `styles.css`). Tailwind v4 (Lightning
76
+ CSS) rebases the relative `url()` on `@import`, so the woff2 emits through every
77
+ consumer's build with **zero per-site `next/font` wiring**; the browser only
78
+ fetches it when ember is the active skin.
69
79
 
70
80
  ## Adding a skin
71
81
 
72
82
  1. Add `src/styles/themes/<id>.css` declaring the full token set for both modes
73
- (under `[data-oc-theme='<id>']` and `[data-oc-theme='<id>'].dark`).
83
+ (under `[data-oc-theme='<id>']` and `[data-oc-theme='<id>'].dark`). Scope every
84
+ selector to the two `[data-oc-theme='<id>']` arms — never touch bare `:root`/
85
+ `.dark`, or you re-skin the default.
74
86
  2. `@import` it from `src/styles/themes.css`.
75
- 3. Add a row to `OC_THEMES` in `src/tokens/themes.ts`.
76
- 4. Publish. Every site picks it up on the next Renovate bump — no per-site edits.
87
+ 3. Add a row to `OC_THEMES` in `src/tokens/themes.ts` (this auto-populates the
88
+ appearance menu, picker, Storybook toolbar, and favicon recolor).
89
+ 4. Add the id to the hardcoded `SKINS` arrays in `scripts/verify-themes.mjs` +
90
+ `scripts/verify-contrast.mjs`, then `yarn verify` (asserts the skin is
91
+ distinct and AA-clean in both modes).
92
+ 5. (Optional) self-host a font: see the Hanken Grotesk note above.
93
+ 6. Publish. Every site picks it up on the next Renovate bump — no per-site edits.
94
+
95
+ A skin is **opt-in** by default — shipping one makes it a picker option, not the
96
+ default. Changing `DEFAULT_OC_THEME` (family-wide) or a per-site
97
+ `<OcThemeProvider defaultSkin>` is a separate, deliberate flip.
77
98
 
78
99
  ## Build
79
100
 
package/dist/chrome.d.mts CHANGED
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { DisplayIdentity, OcSignOutScope, DisplayIdentityKind, OcAccountSummary } from '@orangecheck/auth-client';
4
4
 
5
- type EcosystemSlug = 'home' | 'docs' | 'fleet' | 'me' | 'vault' | 'chat' | 'cosign' | 'attest' | 'lock' | 'vote' | 'stamp' | 'agent' | 'pledge' | 'analytics' | 'bot' | 'forge';
5
+ type EcosystemSlug = 'home' | 'docs' | 'fleet' | 'me' | 'vault' | 'chat' | 'cosign' | 'btc' | 'attest' | 'lock' | 'vote' | 'stamp' | 'agent' | 'pledge' | 'analytics' | 'bot' | 'forge';
6
6
  interface EcosystemSwitcherProps {
7
7
  current: EcosystemSlug;
8
8
  className?: string;
package/dist/chrome.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { DisplayIdentity, OcSignOutScope, DisplayIdentityKind, OcAccountSummary } from '@orangecheck/auth-client';
4
4
 
5
- type EcosystemSlug = 'home' | 'docs' | 'fleet' | 'me' | 'vault' | 'chat' | 'cosign' | 'attest' | 'lock' | 'vote' | 'stamp' | 'agent' | 'pledge' | 'analytics' | 'bot' | 'forge';
5
+ type EcosystemSlug = 'home' | 'docs' | 'fleet' | 'me' | 'vault' | 'chat' | 'cosign' | 'btc' | 'attest' | 'lock' | 'vote' | 'stamp' | 'agent' | 'pledge' | 'analytics' | 'bot' | 'forge';
6
6
  interface EcosystemSwitcherProps {
7
7
  current: EcosystemSlug;
8
8
  className?: string;
package/dist/chrome.js CHANGED
@@ -79,6 +79,13 @@ var ENTRIES = [
79
79
  sub: "cofound \u2014 get behind builders",
80
80
  docsHref: "https://docs.ochk.io/cosign"
81
81
  },
82
+ {
83
+ slug: "btc",
84
+ href: "https://btc.ochk.io",
85
+ label: "oc\xB7btc",
86
+ sub: "read \u2014 bitcoin desk",
87
+ docsHref: "https://btc.ochk.io/data"
88
+ },
82
89
  {
83
90
  slug: "attest",
84
91
  href: "https://attest.ochk.io",
@@ -437,6 +444,15 @@ var FAMILY_PROPERTIES = [
437
444
  docsHref: "https://docs.ochk.io/cosign",
438
445
  category: "product"
439
446
  },
447
+ {
448
+ slug: "btc",
449
+ origin: "https://btc.ochk.io",
450
+ hostname: "btc.ochk.io",
451
+ label: "oc\xB7btc",
452
+ sub: "read \u2014 bitcoin desk",
453
+ docsHref: "https://btc.ochk.io/data",
454
+ category: "product"
455
+ },
440
456
  {
441
457
  slug: "attest",
442
458
  origin: "https://attest.ochk.io",