@welcome-back/brand 0.15.0 → 0.16.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.
@@ -27,10 +27,10 @@ const ART = {
27
27
  [72, illustrationColours_js_1.ILLUSTRATION_COLOURS.green, 22, 12],
28
28
  ].map(([y, fill, a, b]) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "29", y: y, width: "11", height: "11", rx: "3", fill: fill, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 2, width: a, height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 7.5, width: b, height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted })] }, y)))] }), (0, jsx_runtime_1.jsx)("path", { d: "M80 52 q-3 -4 0 -8 q3 -4 0 -8 M89 52 q-3 -4 0 -8 q3 -4 0 -8", fill: "none", ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M72 64 H100 L96.5 96 H75.5 Z", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M73.6 75 H98.4 L97.5 85 H74.5 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }), (0, jsx_runtime_1.jsx)("rect", { x: "69", y: "57", width: "34", height: "7", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M14 26 l-5 -2 M16 18 l-3 -4 M24 14 l0 -5", ...SPARK })] })),
29
29
  // A phone with the digital menu and a delivery bag.
30
- canales: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-8 44 58)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "22", y: "14", width: "44", height: "80", rx: "8", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "19", width: "12", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "28", y: "28", width: "32", height: "10", rx: "3", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), [
31
- [44, illustrationColours_js_1.ILLUSTRATION_COLOURS.coral],
32
- [61, illustrationColours_js_1.ILLUSTRATION_COLOURS.green],
33
- ].map(([y, fill]) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "28", y: y, width: "13", height: "12", rx: "3", fill: fill, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 2, width: "14", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 7.5, width: "9", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted })] }, y))), (0, jsx_runtime_1.jsx)("rect", { x: "28", y: "80", width: "32", height: "8", rx: "4", fill: K })] }), (0, jsx_runtime_1.jsx)("path", { d: "M76 46 Q84 32 92 46", fill: "none", ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M66 52 H102 L98 96 H70 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M66 52 L70 46 H98 L102 52 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraft, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "84", cy: "73", r: "8.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M84 77 c-4 -3 -5 -5 -4 -6.5 c1 -1.3 3 -1 4 0.5 c1 -1.5 3 -1.8 4 -0.5 c1 1.5 0 3.5 -4 6.5z", fill: K }), (0, jsx_runtime_1.jsx)("path", { d: "M107 64 h5 M105 72 h8 M107 80 h4", ...SPARK })] })),
30
+ // The three channels (owner, 2026-11-18, Paper I.1 option A): the brand
31
+ // kiosk (the «kiosco» illustrated icon, smaller) behind, the POS on the
32
+ // left, the delivery bag on the right. No motion lines.
33
+ canales: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: "translate(60 59) scale(0.72) translate(-60 -54)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "38", y: "89", width: "44", height: "7", rx: "3", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperShade, ...line(2.6) }), (0, jsx_runtime_1.jsx)("path", { d: "M50 77 L48 89 H72 L70 77 Z", fill: W, ...line(2.6) }), (0, jsx_runtime_1.jsx)("rect", { x: "30", y: "12", width: "60", height: "68", rx: "8", fill: W, ...line(2.6) }), (0, jsx_runtime_1.jsx)("rect", { x: "35", y: "17", width: "50", height: "45", rx: "4", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "40", y: "22", width: "18", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "40", y: "29", width: "18", height: "13", rx: "3", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "62", y: "29", width: "18", height: "13", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "40", y: "45", width: "18", height: "13", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "62", y: "45", width: "18", height: "13", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "67", width: "22", height: "7", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperShade, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "66", y: "67", width: "16", height: "3.5", rx: "1.75", fill: K })] }), (0, jsx_runtime_1.jsx)("rect", { x: "10", y: "54", width: "36", height: "25", rx: "4", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "15", y: "59", width: "26", height: "15", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line(1.5) }), (0, jsx_runtime_1.jsx)("path", { d: "M24 79 L21 94 H35 L32 79", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M78 94 V64 a4 4 0 0 1 4-4 H106 a4 4 0 0 1 4 4 V94 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraft, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M86 60 a8 8 0 0 1 16 0", fill: "none", ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "85", y: "72", width: "18", height: "10", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line(1.5) })] })),
34
34
  // An open box with a bottle and bread.
35
35
  operaciones: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M24 56 L38 46 H98 L84 56 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraftDark, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M44 52 V30 q0 -4 4 -6 V16 h7 v8 q4 2 4 6 V52", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "44", y: "34", width: "15", height: "9", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), (0, jsx_runtime_1.jsxs)("g", { transform: "rotate(32 74 36)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "68", y: "12", width: "13", height: "46", rx: "6.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M71 22 l7 -3 M71 32 l7 -3 M71 42 l7 -3", fill: "none", ...line(1.5) })] }), (0, jsx_runtime_1.jsx)("path", { d: "M24 56 H84 V94 H24 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M84 56 L98 46 V84 L84 94 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraft, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M24 56 L12 66 L22 72 L34 56", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "34", y: "68", width: "28", height: "16", rx: "2", fill: W, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "72", width: "14", height: "2.5", rx: "1.25", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "77.5", width: "18", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsx)("path", { d: "M18 36 l-4 -3 M26 30 l-1 -5", ...SPARK })] })),
36
36
  // The stamp card, from the weekly email.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ILLUSTRATION_COLOURS = void 0;
3
+ exports.ILLUSTRATION_COLOURS_DARK = exports.ILLUSTRATION_COLOURS = void 0;
4
+ exports.moduleIconDarkCss = moduleIconDarkCss;
4
5
  /**
5
6
  * Colours of the illustrated icons (Paper 01M72Y4K1ZCAWQ5WGA3CD16CFN, style of
6
7
  * the weekly product email). The same values are the `--color-illus-*` tokens
@@ -25,3 +26,30 @@ exports.ILLUSTRATION_COLOURS = {
25
26
  kraft: "#E3BE7A",
26
27
  kraftDark: "#C9A060",
27
28
  };
29
+ /**
30
+ * Dark mode of the module icons (Paper 01M6SCB9QBX9A2DGSX70XB4AH6, frame
31
+ * «Íconos en modo oscuro», option B): dark tile, light lines, whites become
32
+ * dark grey. Yellow, green, coral and the food colours stay.
33
+ */
34
+ exports.ILLUSTRATION_COLOURS_DARK = {
35
+ ink: "#EDE8DC",
36
+ paper: "#2B2722",
37
+ paperBorder: "#3A352D",
38
+ paperShade: "#4A443A",
39
+ shadow: "#00000059",
40
+ muted: "#EDE8DC66",
41
+ white: "#3A352D",
42
+ };
43
+ /**
44
+ * CSS that repaints every `.wb-module-icon` under `scope` with the dark
45
+ * colours. A CSS rule beats an SVG presentation attribute, so the art keeps
46
+ * one drawing.
47
+ */
48
+ function moduleIconDarkCss(scope = ".dark") {
49
+ return Object.entries(exports.ILLUSTRATION_COLOURS_DARK)
50
+ .flatMap(([name, dark]) => {
51
+ const light = exports.ILLUSTRATION_COLOURS[name];
52
+ return ["fill", "stroke"].map((p) => `${scope} .wb-module-icon [${p}="${light}" i] { ${p}: ${dark}; }`);
53
+ })
54
+ .join("\n") + "\n";
55
+ }
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.productImageKeptArea = exports.productImageAspectRatio = exports.PRODUCT_IMAGE_FRAMES = exports.categorySlotForIndex = exports.DEFAULT_CATEGORY_SLOT = exports.CATEGORY_PALETTE_TOKENS = exports.CATEGORY_PALETTE_DARK_TOKENS = exports.CATEGORY_PALETTE_DARK = exports.CATEGORY_PALETTE = exports.posTokensCss = exports.posDarkTokensCss = exports.POS_WIDE_MIN_WIDTH = exports.POS_TOKENS = exports.POS_DARK_TOKENS = exports.POS_DARK_CLASS = exports.ILLUSTRATION_COLOURS = exports.ILLUSTRATED_ICONS = exports.IllustratedIcon = exports.MODULE_ICON_NAMES = exports.ModuleIcon = exports.RunnerLoader = void 0;
3
+ exports.productImageKeptArea = exports.productImageAspectRatio = exports.PRODUCT_IMAGE_FRAMES = exports.categorySlotForIndex = exports.DEFAULT_CATEGORY_SLOT = exports.CATEGORY_PALETTE_TOKENS = exports.CATEGORY_PALETTE_DARK_TOKENS = exports.CATEGORY_PALETTE_DARK = exports.CATEGORY_PALETTE = exports.posTokensCss = exports.posDarkTokensCss = exports.POS_WIDE_MIN_WIDTH = exports.POS_TOKENS = exports.POS_DARK_TOKENS = exports.POS_DARK_CLASS = exports.moduleIconDarkCss = exports.ILLUSTRATION_COLOURS_DARK = exports.ILLUSTRATION_COLOURS = exports.ILLUSTRATED_ICONS = exports.IllustratedIcon = exports.MODULE_ICON_NAMES = exports.ModuleIcon = exports.RunnerLoader = void 0;
4
4
  var RunnerLoader_js_1 = require("./RunnerLoader.js");
5
5
  Object.defineProperty(exports, "RunnerLoader", { enumerable: true, get: function () { return RunnerLoader_js_1.RunnerLoader; } });
6
6
  var ModuleIcon_js_1 = require("./ModuleIcon.js");
@@ -11,6 +11,8 @@ Object.defineProperty(exports, "IllustratedIcon", { enumerable: true, get: funct
11
11
  Object.defineProperty(exports, "ILLUSTRATED_ICONS", { enumerable: true, get: function () { return IllustratedIcon_js_1.ILLUSTRATED_ICONS; } });
12
12
  var illustrationColours_js_1 = require("./illustrationColours.js");
13
13
  Object.defineProperty(exports, "ILLUSTRATION_COLOURS", { enumerable: true, get: function () { return illustrationColours_js_1.ILLUSTRATION_COLOURS; } });
14
+ Object.defineProperty(exports, "ILLUSTRATION_COLOURS_DARK", { enumerable: true, get: function () { return illustrationColours_js_1.ILLUSTRATION_COLOURS_DARK; } });
15
+ Object.defineProperty(exports, "moduleIconDarkCss", { enumerable: true, get: function () { return illustrationColours_js_1.moduleIconDarkCss; } });
14
16
  var posTokens_js_1 = require("./posTokens.js");
15
17
  Object.defineProperty(exports, "POS_DARK_CLASS", { enumerable: true, get: function () { return posTokens_js_1.POS_DARK_CLASS; } });
16
18
  Object.defineProperty(exports, "POS_DARK_TOKENS", { enumerable: true, get: function () { return posTokens_js_1.POS_DARK_TOKENS; } });
@@ -23,10 +23,10 @@ const ART = {
23
23
  [72, C.green, 22, 12],
24
24
  ].map(([y, fill, a, b]) => (_jsxs("g", { children: [_jsx("rect", { x: "29", y: y, width: "11", height: "11", rx: "3", fill: fill, ...line(1.5) }), _jsx("rect", { x: "45", y: y + 2, width: a, height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "45", y: y + 7.5, width: b, height: "2.5", rx: "1.25", fill: C.muted })] }, y)))] }), _jsx("path", { d: "M80 52 q-3 -4 0 -8 q3 -4 0 -8 M89 52 q-3 -4 0 -8 q3 -4 0 -8", fill: "none", ...line(1.75) }), _jsx("path", { d: "M72 64 H100 L96.5 96 H75.5 Z", fill: W, ...line() }), _jsx("path", { d: "M73.6 75 H98.4 L97.5 85 H74.5 Z", fill: C.yellow, ...line(1.75) }), _jsx("rect", { x: "69", y: "57", width: "34", height: "7", rx: "3", fill: W, ...line() }), _jsx("path", { d: "M14 26 l-5 -2 M16 18 l-3 -4 M24 14 l0 -5", ...SPARK })] })),
25
25
  // A phone with the digital menu and a delivery bag.
26
- canales: (_jsxs(_Fragment, { children: [_jsxs("g", { transform: "rotate(-8 44 58)", children: [_jsx("rect", { x: "22", y: "14", width: "44", height: "80", rx: "8", fill: W, ...line() }), _jsx("rect", { x: "38", y: "19", width: "12", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "28", y: "28", width: "32", height: "10", rx: "3", fill: C.yellow, ...line(1.5) }), [
27
- [44, C.coral],
28
- [61, C.green],
29
- ].map(([y, fill]) => (_jsxs("g", { children: [_jsx("rect", { x: "28", y: y, width: "13", height: "12", rx: "3", fill: fill, ...line(1.5) }), _jsx("rect", { x: "45", y: y + 2, width: "14", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "45", y: y + 7.5, width: "9", height: "2.5", rx: "1.25", fill: C.muted })] }, y))), _jsx("rect", { x: "28", y: "80", width: "32", height: "8", rx: "4", fill: K })] }), _jsx("path", { d: "M76 46 Q84 32 92 46", fill: "none", ...line() }), _jsx("path", { d: "M66 52 H102 L98 96 H70 Z", fill: C.crust, ...line() }), _jsx("path", { d: "M66 52 L70 46 H98 L102 52 Z", fill: C.kraft, ...line() }), _jsx("circle", { cx: "84", cy: "73", r: "8.5", fill: C.yellow, ...line(1.75) }), _jsx("path", { d: "M84 77 c-4 -3 -5 -5 -4 -6.5 c1 -1.3 3 -1 4 0.5 c1 -1.5 3 -1.8 4 -0.5 c1 1.5 0 3.5 -4 6.5z", fill: K }), _jsx("path", { d: "M107 64 h5 M105 72 h8 M107 80 h4", ...SPARK })] })),
26
+ // The three channels (owner, 2026-11-18, Paper I.1 option A): the brand
27
+ // kiosk (the «kiosco» illustrated icon, smaller) behind, the POS on the
28
+ // left, the delivery bag on the right. No motion lines.
29
+ canales: (_jsxs(_Fragment, { children: [_jsxs("g", { transform: "translate(60 59) scale(0.72) translate(-60 -54)", children: [_jsx("rect", { x: "38", y: "89", width: "44", height: "7", rx: "3", fill: C.paperShade, ...line(2.6) }), _jsx("path", { d: "M50 77 L48 89 H72 L70 77 Z", fill: W, ...line(2.6) }), _jsx("rect", { x: "30", y: "12", width: "60", height: "68", rx: "8", fill: W, ...line(2.6) }), _jsx("rect", { x: "35", y: "17", width: "50", height: "45", rx: "4", fill: C.paper, ...line() }), _jsx("rect", { x: "40", y: "22", width: "18", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "40", y: "29", width: "18", height: "13", rx: "3", fill: C.yellow, ...line() }), _jsx("rect", { x: "62", y: "29", width: "18", height: "13", rx: "3", fill: W, ...line() }), _jsx("rect", { x: "40", y: "45", width: "18", height: "13", rx: "3", fill: W, ...line() }), _jsx("rect", { x: "62", y: "45", width: "18", height: "13", rx: "3", fill: W, ...line() }), _jsx("rect", { x: "38", y: "67", width: "22", height: "7", rx: "2", fill: C.paperShade, ...line() }), _jsx("rect", { x: "66", y: "67", width: "16", height: "3.5", rx: "1.75", fill: K })] }), _jsx("rect", { x: "10", y: "54", width: "36", height: "25", rx: "4", fill: W, ...line() }), _jsx("rect", { x: "15", y: "59", width: "26", height: "15", rx: "2", fill: C.green, ...line(1.5) }), _jsx("path", { d: "M24 79 L21 94 H35 L32 79", fill: W, ...line() }), _jsx("path", { d: "M78 94 V64 a4 4 0 0 1 4-4 H106 a4 4 0 0 1 4 4 V94 Z", fill: C.kraft, ...line() }), _jsx("path", { d: "M86 60 a8 8 0 0 1 16 0", fill: "none", ...line() }), _jsx("rect", { x: "85", y: "72", width: "18", height: "10", rx: "2", fill: C.coral, ...line(1.5) })] })),
30
30
  // An open box with a bottle and bread.
31
31
  operaciones: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M24 56 L38 46 H98 L84 56 Z", fill: C.kraftDark, ...line() }), _jsx("path", { d: "M44 52 V30 q0 -4 4 -6 V16 h7 v8 q4 2 4 6 V52", fill: W, ...line() }), _jsx("rect", { x: "44", y: "34", width: "15", height: "9", fill: C.yellow, ...line(1.5) }), _jsxs("g", { transform: "rotate(32 74 36)", children: [_jsx("rect", { x: "68", y: "12", width: "13", height: "46", rx: "6.5", fill: C.crust, ...line() }), _jsx("path", { d: "M71 22 l7 -3 M71 32 l7 -3 M71 42 l7 -3", fill: "none", ...line(1.5) })] }), _jsx("path", { d: "M24 56 H84 V94 H24 Z", fill: C.crust, ...line() }), _jsx("path", { d: "M84 56 L98 46 V84 L84 94 Z", fill: C.kraft, ...line() }), _jsx("path", { d: "M24 56 L12 66 L22 72 L34 56", fill: C.crust, ...line() }), _jsx("rect", { x: "34", y: "68", width: "28", height: "16", rx: "2", fill: W, ...line(1.5) }), _jsx("rect", { x: "38", y: "72", width: "14", height: "2.5", rx: "1.25", fill: K }), _jsx("rect", { x: "38", y: "77.5", width: "18", height: "2.5", rx: "1.25", fill: C.muted }), _jsx("path", { d: "M18 36 l-4 -3 M26 30 l-1 -5", ...SPARK })] })),
32
32
  // The stamp card, from the weekly email.
@@ -23,3 +23,23 @@ export declare const ILLUSTRATION_COLOURS: {
23
23
  readonly kraftDark: "#C9A060";
24
24
  };
25
25
  export type IllustrationColour = keyof typeof ILLUSTRATION_COLOURS;
26
+ /**
27
+ * Dark mode of the module icons (Paper 01M6SCB9QBX9A2DGSX70XB4AH6, frame
28
+ * «Íconos en modo oscuro», option B): dark tile, light lines, whites become
29
+ * dark grey. Yellow, green, coral and the food colours stay.
30
+ */
31
+ export declare const ILLUSTRATION_COLOURS_DARK: {
32
+ readonly ink: "#EDE8DC";
33
+ readonly paper: "#2B2722";
34
+ readonly paperBorder: "#3A352D";
35
+ readonly paperShade: "#4A443A";
36
+ readonly shadow: "#00000059";
37
+ readonly muted: "#EDE8DC66";
38
+ readonly white: "#3A352D";
39
+ };
40
+ /**
41
+ * CSS that repaints every `.wb-module-icon` under `scope` with the dark
42
+ * colours. A CSS rule beats an SVG presentation attribute, so the art keeps
43
+ * one drawing.
44
+ */
45
+ export declare function moduleIconDarkCss(scope?: string): string;
@@ -22,3 +22,30 @@ export const ILLUSTRATION_COLOURS = {
22
22
  kraft: "#E3BE7A",
23
23
  kraftDark: "#C9A060",
24
24
  };
25
+ /**
26
+ * Dark mode of the module icons (Paper 01M6SCB9QBX9A2DGSX70XB4AH6, frame
27
+ * «Íconos en modo oscuro», option B): dark tile, light lines, whites become
28
+ * dark grey. Yellow, green, coral and the food colours stay.
29
+ */
30
+ export const ILLUSTRATION_COLOURS_DARK = {
31
+ ink: "#EDE8DC",
32
+ paper: "#2B2722",
33
+ paperBorder: "#3A352D",
34
+ paperShade: "#4A443A",
35
+ shadow: "#00000059",
36
+ muted: "#EDE8DC66",
37
+ white: "#3A352D",
38
+ };
39
+ /**
40
+ * CSS that repaints every `.wb-module-icon` under `scope` with the dark
41
+ * colours. A CSS rule beats an SVG presentation attribute, so the art keeps
42
+ * one drawing.
43
+ */
44
+ export function moduleIconDarkCss(scope = ".dark") {
45
+ return Object.entries(ILLUSTRATION_COLOURS_DARK)
46
+ .flatMap(([name, dark]) => {
47
+ const light = ILLUSTRATION_COLOURS[name];
48
+ return ["fill", "stroke"].map((p) => `${scope} .wb-module-icon [${p}="${light}" i] { ${p}: ${dark}; }`);
49
+ })
50
+ .join("\n") + "\n";
51
+ }
@@ -4,7 +4,7 @@ export { ModuleIcon, MODULE_ICON_NAMES } from "./ModuleIcon.js";
4
4
  export type { ModuleIconName, ModuleIconProps } from "./ModuleIcon.js";
5
5
  export { IllustratedIcon, ILLUSTRATED_ICONS } from "./IllustratedIcon.js";
6
6
  export type { IllustratedIconName, IllustratedIconProps } from "./IllustratedIcon.js";
7
- export { ILLUSTRATION_COLOURS } from "./illustrationColours.js";
7
+ export { ILLUSTRATION_COLOURS, ILLUSTRATION_COLOURS_DARK, moduleIconDarkCss } from "./illustrationColours.js";
8
8
  export type { IllustrationColour } from "./illustrationColours.js";
9
9
  export { POS_DARK_CLASS, POS_DARK_TOKENS, POS_TOKENS, POS_WIDE_MIN_WIDTH, posDarkTokensCss, posTokensCss, } from "./posTokens.js";
10
10
  export type { PosToken } from "./posTokens.js";
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { RunnerLoader } from "./RunnerLoader.js";
2
2
  export { ModuleIcon, MODULE_ICON_NAMES } from "./ModuleIcon.js";
3
3
  export { IllustratedIcon, ILLUSTRATED_ICONS } from "./IllustratedIcon.js";
4
- export { ILLUSTRATION_COLOURS } from "./illustrationColours.js";
4
+ export { ILLUSTRATION_COLOURS, ILLUSTRATION_COLOURS_DARK, moduleIconDarkCss } from "./illustrationColours.js";
5
5
  export { POS_DARK_CLASS, POS_DARK_TOKENS, POS_TOKENS, POS_WIDE_MIN_WIDTH, posDarkTokensCss, posTokensCss, } from "./posTokens.js";
6
6
  export { CATEGORY_PALETTE, CATEGORY_PALETTE_DARK, CATEGORY_PALETTE_DARK_TOKENS, CATEGORY_PALETTE_TOKENS, DEFAULT_CATEGORY_SLOT, categorySlotForIndex, } from "./categoryPalette.js";
7
7
  export { PRODUCT_IMAGE_FRAMES, productImageAspectRatio, productImageKeptArea, } from "./productImageFrames.js";
@@ -0,0 +1,15 @@
1
+ /* Generated from src/illustrationColours.ts by scripts/write-pos-tokens-css.mjs. Do not edit. */
2
+ .dark .wb-module-icon [fill="#1D1D1F" i] { fill: #EDE8DC; }
3
+ .dark .wb-module-icon [stroke="#1D1D1F" i] { stroke: #EDE8DC; }
4
+ .dark .wb-module-icon [fill="#FFFAF0" i] { fill: #2B2722; }
5
+ .dark .wb-module-icon [stroke="#FFFAF0" i] { stroke: #2B2722; }
6
+ .dark .wb-module-icon [fill="#EDEADE" i] { fill: #3A352D; }
7
+ .dark .wb-module-icon [stroke="#EDEADE" i] { stroke: #3A352D; }
8
+ .dark .wb-module-icon [fill="#F1EADB" i] { fill: #4A443A; }
9
+ .dark .wb-module-icon [stroke="#F1EADB" i] { stroke: #4A443A; }
10
+ .dark .wb-module-icon [fill="#1D1D1F12" i] { fill: #00000059; }
11
+ .dark .wb-module-icon [stroke="#1D1D1F12" i] { stroke: #00000059; }
12
+ .dark .wb-module-icon [fill="#1D1D1F55" i] { fill: #EDE8DC66; }
13
+ .dark .wb-module-icon [stroke="#1D1D1F55" i] { stroke: #EDE8DC66; }
14
+ .dark .wb-module-icon [fill="#FFFFFF" i] { fill: #3A352D; }
15
+ .dark .wb-module-icon [stroke="#FFFFFF" i] { stroke: #3A352D; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@welcome-back/brand",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "WelcomeBack brand assets for React apps: the running-W loader, the module icons, 108 illustrated icons and the POS design tokens.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -18,7 +18,8 @@
18
18
  "import": "./dist/esm/index.js",
19
19
  "require": "./dist/cjs/index.js"
20
20
  },
21
- "./pos-tokens.css": "./dist/pos-tokens.css"
21
+ "./pos-tokens.css": "./dist/pos-tokens.css",
22
+ "./module-icon-dark.css": "./dist/module-icon-dark.css"
22
23
  },
23
24
  "files": [
24
25
  "dist"