@333eco/brand 1.12.0 → 1.12.1

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/brand.lock CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.12.0",
2
+ "version": "1.12.1",
3
3
  "files": {
4
4
  "css/metta.css": "9bfe986c46c303bf9a48be85322d68e3d626571a424ef3a8aa81faaf5c866692",
5
5
  "css/motion.css": "9bfbe39c0de6a9dfaf9fdc2c61e327b3c8e70221c34dff9befd85da448b9e0c2",
@@ -13,6 +13,6 @@
13
13
  "qr/bqr-card.ts": "55b4cf3d742bb758f789fd18f91737e8da1169610b6b953ad71e95d8bb713168",
14
14
  "qr/bqr.ts": "a5561877ddebefa170d7962b37485ac5b822c1c7454e153e11526fa199f0a99d",
15
15
  "qr/fingerprint.ts": "4a587cdb3b5ff6026262f995889c329466a2513044a68c0b5d2fa31c2bdd45a3",
16
- "qr/looks.ts": "1743eed03e7d49f329cc7f69086cc0017af286bdb0a99a175c72b154fbda64d3"
16
+ "qr/looks.ts": "3853e04503f42e9d8b70b656469ae9645c35ae0fcd5b927b59f92b2f55a9fb2f"
17
17
  }
18
18
  }
package/data/brand.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "into brand.lock, which is vendored byte-identical into every consumer,",
9
9
  "so 'which sites are on which brand version' is answerable by grep."
10
10
  ],
11
- "version": "1.12.0",
11
+ "version": "1.12.1",
12
12
  "wordmark": {
13
13
  "$comment": [
14
14
  "The composition has an internal short-name as of 2026-09-20: B-Wordmark",
package/dist/Brand.kt CHANGED
@@ -18,7 +18,7 @@ import androidx.compose.ui.graphics.lerp
18
18
  import androidx.compose.ui.unit.dp
19
19
 
20
20
  object Brand {
21
- const val VERSION = "1.12.0"
21
+ const val VERSION = "1.12.1"
22
22
 
23
23
  /** The B-Gem media-type palette. A colour here MEANS a medium.
24
24
  * Not a site palette, and not the six-TLD rainbow. */
package/dist/Brand.swift CHANGED
@@ -14,7 +14,7 @@
14
14
  import SwiftUI
15
15
 
16
16
  public enum Brand {
17
- public static let version = "1.12.0"
17
+ public static let version = "1.12.1"
18
18
 
19
19
  /// The B-Gem media-type palette. A colour here MEANS a medium.
20
20
  /// ⚠️ Not a site palette, and not the six-TLD rainbow. Using a gem as an
package/dist/tokens.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "GENERATED by scripts/generate.mjs. Do not edit. Values are parsed from css/tokens.css, which is canonical; semantics come from data/. Run `node scripts/generate.mjs --check` to prove this file is current.",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "gems": [
5
5
  {
6
6
  "name": "ruby",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@333eco/brand",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "The canonical brand layer for the institution — design tokens, themes, motion, and the B-Emblem. A READ-ONLY MIRROR; institution repos vendor this layer, they do not install it.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Thon Ly",
package/qr/looks.ts CHANGED
@@ -26,18 +26,26 @@ export const SYMBOL = { size: 0.3, gap: 0.2 } as const;
26
26
  /** The ink a person's own hand is drawn in when the caller names none: Space's, as every mark of 333.eco (the body palette, `MA`). */
27
27
  export const LOOK_INK = bqrOwnerInk("MA");
28
28
 
29
+ /** Where the silhouette stands in the square `size` at (x, y): its scale and offset, from the emblem's painted box (as `bqrPlacement`, unpadded). */
30
+ export function silhouettePlacement(size: number, x = 0, y = 0): { k: number; tx: number; ty: number } {
31
+ const k = size / Math.max(EMBLEM_BOX.w, EMBLEM_BOX.h);
32
+ return { k, tx: x + (size - EMBLEM_BOX.w * k) / 2 - EMBLEM_BOX.x * k, ty: y + (size - EMBLEM_BOX.h * k) / 2 - EMBLEM_BOX.y * k };
33
+ }
34
+ /** ⭐ v1.12.1 — the autograph's box on a silhouette in the square `size` at (x, y), in the context's own units, so a caller can read the
35
+ * picture under it and choose the ink before painting (origin does). */
36
+ export function silhouetteAutographBox(size: number, x = 0, y = 0) {
37
+ const { k, tx, ty } = silhouettePlacement(size, x, y), A = SILHOUETTE_AUTOGRAPH;
38
+ return { x: tx + A.x * k, y: ty + A.y * k, w: A.w * k, h: A.h * k };
39
+ }
29
40
  /** Paint the SILHOUETTE into the square `size` at (x, y), its autograph on it when one is given. Clears nothing: it is drawn ON a picture. */
30
41
  export function paintSilhouette(g: CanvasRenderingContext2D, o: { size: number; x?: number; y?: number; white?: number; edgeInk?: string; autograph?: BqrAutograph; ink?: string }): void {
31
42
  if (o.autograph !== undefined && !isAutograph(o.autograph)) throw new Error("silhouette: an autograph is a person's own strokes.");
32
- const X = o.x ?? 0, Y = o.y ?? 0, k = o.size / Math.max(EMBLEM_BOX.w, EMBLEM_BOX.h);
33
- const tx = X + (o.size - EMBLEM_BOX.w * k) / 2 - EMBLEM_BOX.x * k, ty = Y + (o.size - EMBLEM_BOX.h * k) / 2 - EMBLEM_BOX.y * k;
34
- const path = new Path2D(EMBLEM_D);
43
+ const { k, tx, ty } = silhouettePlacement(o.size, o.x, o.y), path = new Path2D(EMBLEM_D);
35
44
  g.save(); g.translate(tx, ty); g.scale(k, k);
36
45
  g.fillStyle = `rgba(255,255,255,${o.white ?? SILHOUETTE.white})`; g.fill(path);
37
46
  g.globalAlpha = SILHOUETTE.edge; g.strokeStyle = o.edgeInk ?? LOOK_INK; g.lineWidth = SILHOUETTE.line; g.lineJoin = "round"; g.stroke(path);
38
- g.globalAlpha = 1;
39
- if (o.autograph) paintAutograph(g, o.autograph, SILHOUETTE_AUTOGRAPH, o.ink ?? LOOK_INK);
40
47
  g.restore();
48
+ if (o.autograph) paintAutograph(g, o.autograph, silhouetteAutographBox(o.size, o.x, o.y), o.ink ?? LOOK_INK);
41
49
  }
42
50
 
43
51
  /** Where a B-Symbol lands for an autograph fitted to `box`: the ink, the emblem beside it, and the whole. Pure: nothing is drawn. */