@welcome-back/brand 0.7.2 → 0.8.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
@@ -338,8 +338,9 @@ colours, slot for slot, and passes the same contrast test on the dark card.
338
338
  Square tiles show white text on a photo or on a category colour.
339
339
  `--wb-on-media` / `--wb-on-media-muted` (text), `--wb-media-ink` (badge fill),
340
340
  `--wb-media-veil` (sold-out wash) and `--wb-media-scrim` (the bottom gradient)
341
- are the same in light and dark. The scrim keeps white text at 4.5:1 or more on
342
- a pure white photo up to half the tile height.
341
+ are the same in light and dark. The scrim goes on the text block only, never
342
+ the whole tile: a band behind the text (white text >= 4.7:1 even on a pure
343
+ white photo) that fades out over the block's 28 px top padding.
343
344
 
344
345
  ### Category colours
345
346
 
@@ -459,8 +460,8 @@ React, and then hooks fail with "Invalid hook call".
459
460
  | To change | Edit | Note |
460
461
  |---|---|---|
461
462
  | Speed | `--wb-runner-step-default` in `src/runnerCss.ts` | Apps can already override it per use with `--wb-runner-step` |
462
- | Stride length (swing angles) | `@keyframes wb-runner-swing-front` / `-back` in `src/runnerCss.ts` | Angles are measured from each leg drawing's rest pose. The front leg is vertical at `-36deg`, the back leg at `39deg`. Keep forward and back swings equal around those values. |
463
- | Where the legs join the body | `@keyframes wb-runner-hip-front` / `-back` | Values are in the art's coordinates (the 1500×1500 PDF page) |
463
+ | Stride length (swing angles) | `@keyframes wb-runner-swing-front` / `-back` in `src/runnerCss.ts` | Angles are measured from each leg drawing's rest pose. The legs cross at `-36deg` (front) and `39deg` (back). The swings are not equal: they are tuned so both shoes reach the same spot forward and back. The crossing keyframes sit at 17% / 83% so each leg moves at an even speed; if you change an end angle, check that both still hold. |
464
+ | Where the legs join the body | `@keyframes wb-runner-hip-front` / `-back` | Values are in the art's coordinates (the 1500×1500 PDF page). The front hip rises at the crossing so its shoe stays inside the viewBox. |
464
465
  | What is hidden behind the W | `LEGS_CLIP` / `BODY_CLIP` in `src/runnerArt.ts` | See [Source art](#source-art) |
465
466
  | A new prop | `src/RunnerLoader.tsx`, plus a test and a row in the props table | |
466
467
  | A new asset (logo, icon, token) | A new file in `src/`, exported from `src/index.ts`, plus a test and a README section | |
@@ -59,13 +59,14 @@ exports.POS_TOKENS = {
59
59
  "--wb-ring-soft": "rgba(23, 23, 23, 0.5)",
60
60
  // Text and marks on a photo or a category colour (square tiles, owner
61
61
  // 2026-10-21). The same in light and dark: a photo does not change. The
62
- // scrim keeps white text >= 4.5:1 even on a pure white photo, up to half
63
- // the tile height (two-line name).
62
+ // scrim sits behind the text block only, never the whole tile (owner,
63
+ // 2026-10-21: lighter): a 0.6 -> 0.55 band keeps white text >= 4.7:1 even on
64
+ // a pure white photo, then fades out over the block's 28 px top padding.
64
65
  "--wb-on-media": "#ffffff",
65
66
  "--wb-on-media-muted": "rgba(255, 255, 255, 0.85)",
66
67
  "--wb-media-ink": "#000000",
67
68
  "--wb-media-veil": "rgba(255, 255, 255, 0.35)",
68
- "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0) 85%)",
69
+ "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) calc(100% - 28px), rgba(0, 0, 0, 0) 100%)",
69
70
  // The brand tone. Same as the primary: the POS is monochrome.
70
71
  "--wb-brand": "#171717",
71
72
  // 12 px everywhere like the dashboard, 6 px for items inside a control
@@ -5,8 +5,9 @@ exports.RUNNER_CSS = void 0;
5
5
  * RunnerLoader cycle, shipped inside the SVG as a <style> element so apps need
6
6
  * no CSS import. One step = --wb-runner-step; a full stride is two steps.
7
7
  * Each leg keeps its own drawing and swings through the other: they meet under
8
- * the body at 25% / 75%, overlap, then separate. Rotations are about each hip.
9
- * Swing from vertical: front leg 66° forward / 66° back, back leg 84° / 84°.
8
+ * the body at 17% / 83%, overlap, then separate. Rotations are about each hip.
9
+ * Swing from the crossing pose: front leg 52° forward / 92° back, back leg 62° / 131°.
10
+ * The ends are tuned by eye: the bent leg reaches far forward, the straight leg far back.
10
11
  * Every instance repeats the same rules; the duplicates are identical.
11
12
  */
12
13
  exports.RUNNER_CSS = `
@@ -17,15 +18,15 @@ exports.RUNNER_CSS = `
17
18
  .wb-runner-hip-back{animation:wb-runner-hip-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
18
19
  .wb-runner-swing-front{animation:wb-runner-swing-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
19
20
  .wb-runner-swing-back{animation:wb-runner-swing-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
20
- @keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(790px,805px)}}
21
- @keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}
22
- @keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(30deg) scale(1,1)}25%,75%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-102deg) scale(.85,.85)}}
23
- @keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-45deg)}25%,75%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(123deg)}}
21
+ @keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,740px)}50%{animation-timing-function:ease-in;transform:translate(790px,795px)}}
22
+ @keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}
23
+ @keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(16deg) scale(1,1)}17%,83%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-128deg) scale(.85,.85)}}
24
+ @keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-23deg)}17%,83%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(170deg)}}
24
25
  @keyframes wb-runner-bob{0%,100%{transform:translateY(-14px)}50%{transform:translateY(6px)}}
25
26
  @media (prefers-reduced-motion:reduce){
26
27
  .wb-runner *{animation:none!important}
27
28
  .wb-runner-hip-front{transform:translate(700px,780px)}
28
29
  .wb-runner-hip-back{transform:translate(800px,810px)}
29
- .wb-runner-swing-front{transform:rotate(30deg)}
30
- .wb-runner-swing-back{transform:rotate(-45deg)}
30
+ .wb-runner-swing-front{transform:rotate(16deg)}
31
+ .wb-runner-swing-back{transform:rotate(-23deg)}
31
32
  }`;
@@ -62,7 +62,7 @@ export declare const POS_TOKENS: {
62
62
  readonly "--wb-on-media-muted": "rgba(255, 255, 255, 0.85)";
63
63
  readonly "--wb-media-ink": "#000000";
64
64
  readonly "--wb-media-veil": "rgba(255, 255, 255, 0.35)";
65
- readonly "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0) 85%)";
65
+ readonly "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) calc(100% - 28px), rgba(0, 0, 0, 0) 100%)";
66
66
  readonly "--wb-brand": "#171717";
67
67
  readonly "--wb-radius": "12px";
68
68
  readonly "--wb-radius-lg": "12px";
@@ -54,13 +54,14 @@ export const POS_TOKENS = {
54
54
  "--wb-ring-soft": "rgba(23, 23, 23, 0.5)",
55
55
  // Text and marks on a photo or a category colour (square tiles, owner
56
56
  // 2026-10-21). The same in light and dark: a photo does not change. The
57
- // scrim keeps white text >= 4.5:1 even on a pure white photo, up to half
58
- // the tile height (two-line name).
57
+ // scrim sits behind the text block only, never the whole tile (owner,
58
+ // 2026-10-21: lighter): a 0.6 -> 0.55 band keeps white text >= 4.7:1 even on
59
+ // a pure white photo, then fades out over the block's 28 px top padding.
59
60
  "--wb-on-media": "#ffffff",
60
61
  "--wb-on-media-muted": "rgba(255, 255, 255, 0.85)",
61
62
  "--wb-media-ink": "#000000",
62
63
  "--wb-media-veil": "rgba(255, 255, 255, 0.35)",
63
- "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0) 85%)",
64
+ "--wb-media-scrim": "linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) calc(100% - 28px), rgba(0, 0, 0, 0) 100%)",
64
65
  // The brand tone. Same as the primary: the POS is monochrome.
65
66
  "--wb-brand": "#171717",
66
67
  // 12 px everywhere like the dashboard, 6 px for items inside a control
@@ -1 +1 @@
1
- export declare const RUNNER_CSS = "\n.wb-runner{--wb-runner-step-default:0.32s}\n.wb-runner-pants{fill:var(--wb-runner-pants,Canvas)}\n.wb-runner-bob{animation:wb-runner-bob var(--wb-runner-step,var(--wb-runner-step-default)) ease-in-out infinite}\n.wb-runner-hip-front{animation:wb-runner-hip-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-hip-back{animation:wb-runner-hip-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-swing-front{animation:wb-runner-swing-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-swing-back{animation:wb-runner-swing-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n@keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(790px,805px)}}\n@keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}\n@keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(30deg) scale(1,1)}25%,75%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-102deg) scale(.85,.85)}}\n@keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-45deg)}25%,75%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(123deg)}}\n@keyframes wb-runner-bob{0%,100%{transform:translateY(-14px)}50%{transform:translateY(6px)}}\n@media (prefers-reduced-motion:reduce){\n.wb-runner *{animation:none!important}\n.wb-runner-hip-front{transform:translate(700px,780px)}\n.wb-runner-hip-back{transform:translate(800px,810px)}\n.wb-runner-swing-front{transform:rotate(30deg)}\n.wb-runner-swing-back{transform:rotate(-45deg)}\n}";
1
+ export declare const RUNNER_CSS = "\n.wb-runner{--wb-runner-step-default:0.32s}\n.wb-runner-pants{fill:var(--wb-runner-pants,Canvas)}\n.wb-runner-bob{animation:wb-runner-bob var(--wb-runner-step,var(--wb-runner-step-default)) ease-in-out infinite}\n.wb-runner-hip-front{animation:wb-runner-hip-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-hip-back{animation:wb-runner-hip-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-swing-front{animation:wb-runner-swing-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n.wb-runner-swing-back{animation:wb-runner-swing-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}\n@keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,740px)}50%{animation-timing-function:ease-in;transform:translate(790px,795px)}}\n@keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}\n@keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(16deg) scale(1,1)}17%,83%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-128deg) scale(.85,.85)}}\n@keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-23deg)}17%,83%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(170deg)}}\n@keyframes wb-runner-bob{0%,100%{transform:translateY(-14px)}50%{transform:translateY(6px)}}\n@media (prefers-reduced-motion:reduce){\n.wb-runner *{animation:none!important}\n.wb-runner-hip-front{transform:translate(700px,780px)}\n.wb-runner-hip-back{transform:translate(800px,810px)}\n.wb-runner-swing-front{transform:rotate(16deg)}\n.wb-runner-swing-back{transform:rotate(-23deg)}\n}";
@@ -2,8 +2,9 @@
2
2
  * RunnerLoader cycle, shipped inside the SVG as a <style> element so apps need
3
3
  * no CSS import. One step = --wb-runner-step; a full stride is two steps.
4
4
  * Each leg keeps its own drawing and swings through the other: they meet under
5
- * the body at 25% / 75%, overlap, then separate. Rotations are about each hip.
6
- * Swing from vertical: front leg 66° forward / 66° back, back leg 84° / 84°.
5
+ * the body at 17% / 83%, overlap, then separate. Rotations are about each hip.
6
+ * Swing from the crossing pose: front leg 52° forward / 92° back, back leg 62° / 131°.
7
+ * The ends are tuned by eye: the bent leg reaches far forward, the straight leg far back.
7
8
  * Every instance repeats the same rules; the duplicates are identical.
8
9
  */
9
10
  export const RUNNER_CSS = `
@@ -14,15 +15,15 @@ export const RUNNER_CSS = `
14
15
  .wb-runner-hip-back{animation:wb-runner-hip-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
15
16
  .wb-runner-swing-front{animation:wb-runner-swing-front calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
16
17
  .wb-runner-swing-back{animation:wb-runner-swing-back calc(var(--wb-runner-step,var(--wb-runner-step-default)) * 2) linear infinite}
17
- @keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(790px,805px)}}
18
- @keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}25%,75%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}
19
- @keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(30deg) scale(1,1)}25%,75%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-102deg) scale(.85,.85)}}
20
- @keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-45deg)}25%,75%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(123deg)}}
18
+ @keyframes wb-runner-hip-front{0%,100%{animation-timing-function:ease-in;transform:translate(700px,780px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,740px)}50%{animation-timing-function:ease-in;transform:translate(790px,795px)}}
19
+ @keyframes wb-runner-hip-back{0%,100%{animation-timing-function:ease-in;transform:translate(800px,810px)}17%,83%{animation-timing-function:ease-out;transform:translate(750px,795px)}50%{animation-timing-function:ease-in;transform:translate(710px,785px)}}
20
+ @keyframes wb-runner-swing-front{0%,100%{animation-timing-function:ease-in;transform:rotate(16deg) scale(1,1)}17%,83%{animation-timing-function:ease-out;transform:rotate(-36deg) scale(1,.82)}50%{animation-timing-function:ease-in;transform:rotate(-128deg) scale(.85,.85)}}
21
+ @keyframes wb-runner-swing-back{0%,100%{animation-timing-function:ease-in;transform:rotate(-23deg)}17%,83%{animation-timing-function:ease-out;transform:rotate(39deg)}50%{animation-timing-function:ease-in;transform:rotate(170deg)}}
21
22
  @keyframes wb-runner-bob{0%,100%{transform:translateY(-14px)}50%{transform:translateY(6px)}}
22
23
  @media (prefers-reduced-motion:reduce){
23
24
  .wb-runner *{animation:none!important}
24
25
  .wb-runner-hip-front{transform:translate(700px,780px)}
25
26
  .wb-runner-hip-back{transform:translate(800px,810px)}
26
- .wb-runner-swing-front{transform:rotate(30deg)}
27
- .wb-runner-swing-back{transform:rotate(-45deg)}
27
+ .wb-runner-swing-front{transform:rotate(16deg)}
28
+ .wb-runner-swing-back{transform:rotate(-23deg)}
28
29
  }`;
@@ -31,7 +31,7 @@
31
31
  --wb-on-media-muted: rgba(255, 255, 255, 0.85);
32
32
  --wb-media-ink: #000000;
33
33
  --wb-media-veil: rgba(255, 255, 255, 0.35);
34
- --wb-media-scrim: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0) 85%);
34
+ --wb-media-scrim: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) calc(100% - 28px), rgba(0, 0, 0, 0) 100%);
35
35
  --wb-brand: #171717;
36
36
  --wb-radius: 12px;
37
37
  --wb-radius-lg: 12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@welcome-back/brand",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "WelcomeBack brand assets for React apps: the running-W loader and the POS design tokens.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {