@tangle-network/brand 1.13.1 → 1.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 085e657: Add `--scrim`, `--scrim-strong` and `--on-media` tokens, with `bg-scrim`, `bg-scrim-strong` and `text-on-media` Tailwind colors, for modal backdrops and text on photos.
8
+
3
9
  ## 1.13.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/brand",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "Tangle brand system — design tokens, logo, Tailwind v4 theme. Single source of truth for every Tangle app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  /* GENERATED by scripts/gen-compat.mjs. Do not edit.
2
2
  * Source: tokens.css + named-themes.css
3
- * SHA-256: 4c1924fc1546f474d5006dc2ea3670fb9c74c7ee0ccebc058b310fbed7a9757e
3
+ * SHA-256: c09b4b2d488a4b0bbe7ace4523e27d9cc9bba99013b95b2d361ab476bd61ebf2
4
4
  * Light-default compatibility; all explicit modes remain canonical.
5
5
  */
6
6
  :where(:root),
@@ -268,6 +268,9 @@
268
268
  --shadow-accent: 0 1px 2px rgba(0, 0, 0, 0.3);
269
269
  --shadow-overlay: 0 2px 6px hsl(var(--hsl-foreground) / 0.1),
270
270
  0 16px 40px hsl(var(--hsl-foreground) / 0.16);
271
+ --scrim: rgb(0 0 0 / 0.4);
272
+ --scrim-strong: rgb(0 0 0 / 0.72);
273
+ --on-media: #ffffff;
271
274
  --shadow-status-running: none;
272
275
  --shadow-status-creating: none;
273
276
  --shadow-status-error: none;
@@ -757,6 +760,9 @@
757
760
  --text-page: var(--font-size-3xl);
758
761
  --text-section: var(--font-size-xl);
759
762
  --text-eyebrow: var(--font-size-sm);
763
+ --color-scrim: var(--scrim);
764
+ --color-scrim-strong: var(--scrim-strong);
765
+ --color-on-media: var(--on-media);
760
766
  --color-depth-1: var(--depth-1);
761
767
  --color-depth-2: var(--depth-2);
762
768
  --color-depth-3: var(--depth-3);
@@ -19,6 +19,9 @@
19
19
  --text-page: var(--font-size-3xl);
20
20
  --text-section: var(--font-size-xl);
21
21
  --text-eyebrow: var(--font-size-sm);
22
+ --color-scrim: var(--scrim);
23
+ --color-scrim-strong: var(--scrim-strong);
24
+ --color-on-media: var(--on-media);
22
25
  --color-depth-1: var(--depth-1);
23
26
  --color-depth-2: var(--depth-2);
24
27
  --color-depth-3: var(--depth-3);
@@ -0,0 +1,19 @@
1
+ import { readFileSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { describe, expect, it } from "vitest";
4
+ import { blockIn } from "./css-test-utils";
5
+
6
+ const read = (name: string) =>
7
+ readFileSync(path.resolve(import.meta.dirname, name), "utf8");
8
+ const tokens = read("tokens.css");
9
+
10
+ describe("scrim and media ink", () => {
11
+ it("are declared once on the shared baseline, so every theme dims the same way", () => {
12
+ const baseline = blockIn(tokens, ".dark");
13
+ expect(baseline).toMatch(/--scrim:\s*rgb\(0 0 0 \/ 0\.4\);/);
14
+ expect(baseline).toMatch(/--scrim-strong:\s*rgb\(0 0 0 \/ 0\.72\);/);
15
+ expect(baseline).toMatch(/--on-media:\s*#ffffff;/);
16
+ expect(blockIn(tokens, ".light")).not.toMatch(/^\s*--(scrim|on-media)[\w-]*\s*:/m);
17
+ expect(read("named-themes.css")).not.toMatch(/^\s*--(scrim|on-media)[\w-]*\s*:/m);
18
+ });
19
+ });
@@ -61,6 +61,9 @@
61
61
  --text-section: var(--font-size-xl);
62
62
  --text-eyebrow: var(--font-size-sm);
63
63
 
64
+ --color-scrim: var(--scrim);
65
+ --color-scrim-strong: var(--scrim-strong);
66
+ --color-on-media: var(--on-media);
64
67
  --color-depth-1: var(--depth-1);
65
68
  --color-depth-2: var(--depth-2);
66
69
  --color-depth-3: var(--depth-3);
@@ -411,6 +411,13 @@
411
411
  --shadow-overlay:
412
412
  0 2px 6px hsl(var(--hsl-foreground) / 0.1),
413
413
  0 16px 40px hsl(var(--hsl-foreground) / 0.16);
414
+ /* Scrim and media ink. A scrim dims the page behind a modal or sheet, or
415
+ darkens a photo under its caption. It is black in every theme: a dimming
416
+ layer that inverted in dark mode would brighten the page it covers.
417
+ --on-media is the ink for text set directly on a photo or a scrim. */
418
+ --scrim: rgb(0 0 0 / 0.4);
419
+ --scrim-strong: rgb(0 0 0 / 0.72);
420
+ --on-media: #ffffff;
414
421
  --shadow-status-running: none;
415
422
  --shadow-status-creating: none;
416
423
  --shadow-status-error: none;