PageSourceSearch

https://app.replicants.ai/js/maya-figure.js?v=20260825ff3

js replicants.ai collected 2026-10-05 12:30:16 UTC 5,581 bytes, 96 lines download raw bytes

1/**
2 * src/public/js/maya-figure.js — Maya's mark. ONE definition, every surface.
3 *
4 * ── WHAT THIS IS ─────────────────────────────────────────────────────────
5 * A letter M in our logo colours. That is the whole brief.
6 *
7 * Alex, 2026-08-25, after rejecting two figurative versions: *"I'm not happy
8 * with Mayer's mark… I'd rather you just go back to an M, a simple M with our
9 * logo colours on it."*
10 *
11 * ⚠️ TWO FIGURATIVE VERSIONS WERE REJECTED BEFORE THIS ONE. Keep the record so
12 * nobody re-proposes them:
13 *   · v1, a full-body figure — *"it looked like a toilet lady icon."*
14 *   · v2, a head with a call-centre headset, halo and shimmer — built to his
15 *     own description and still rejected.
16 * The pattern across both: a depicted person invites judgement of the person.
17 * A letterform does not. Do not draw a face here again without him asking.
18 *
19 * ── OUR LOGO COLOURS, VERIFIED NOT GUESSED ───────────────────────────────
20 * Read from the design system, not from taste: `src/public/app-shell.css`
21 * defines --accent #6a4cf1, --accent-2 #8b6dff, --accent-deep #4a32b8. The two
22 * logo files (img/logo-replicants.png, img/logo-ci.png) are white knockouts and
23 * carry no colour at all, so the tokens ARE the brand palette.
24 *
25 * ⚠️ THIS ALSO CLOSES A STANDARDS VIOLATION. The previous badge was
26 * #8B5CF6 → #3B82F6 → #22D3EE → #EC4899: violet, blue, cyan, pink, not one of
27 * them ours. CODING-STANDARDS makes app-shell the styling canon. The disc now
28 * reads from the tokens with the hex only as a fallback, so a rebrand is one
29 * file and dark mode follows the theme.
30 *
31 * ── WHAT SURVIVED FROM THE REJECTED VERSION, AND WHY ──────────────────────
32 *  · THE SLOW SHEEN STAYS. He asked for it by name — *"a very slow, very slow
33 *    shimmer over it"* — and never retracted it. 9s and low opacity: at avatar
34 *    size anything faster reads as a loading spinner.
35 *  · THE PINK BLOOM IS GONE. It belonged to the "electric futuristic head"
36 *    brief and it is the loudest thing on the mark; "simple" rules it out. The
37 *    hairline gap + thin accent ring stay, so the disc still sits cleanly on a
38 *    coloured surface. One line in maya-hq.css brings the bloom back if he
39 *    wants it.
40 *
41 * ── WHY A STROKE AND NOT A FILLED LETTERFORM ──────────────────────────────
42 * She appears at 26px in chat and 18px in the nav rail. A filled M at that size
43 * closes up its counters and reads as a blob; a 2.8-weight stroke with round
44 * joins holds its shape all the way down. Rendered at 18/26/56 and read back as
45 * PNGs before this was committed.
46 *
47 * ── ONE DEFINITION, AND ONLY THE GLYPH ────────────────────────────────────
48 * `line()` returns the bare M in `currentColor`, and that is all this file
49 * does now.
50 *
51 * 🔻 RESTORED 2026-08-25 AFTER I DELETED IT. Mounting the shared assistant
52 * panel (BB) swapped Maya's mark for the component's plain letter "M", on every
53 * HQ surface at once, and it went unremarked in that commit. Alex: *"You had an
54 * M that you were using before, the logo of Maya, like a more pointy M. I
55 * preferred that and then why did you remove that…? Put that back please."*
56 *
57 * ⚠️ THE DISC IS NOT THIS FILE'S ANY MORE, AND THAT IS THE POINT OF THE
58 * RESTORE. The old `badge()` drew its own gradient disc, ring and sheen. The
59 * shared component already draws that disc (`.rc-ava`, `.rc-maya-av` in
60 * assistant-panel.css), so bringing badge() back would put a disc inside a
61 * disc — the exact "build a fourth copy" mistake the panel extraction exists to
62 * stop. The component owns the disc; this file owns the letterform; `line()`
63 * inherits the disc's own `color`, so it comes out white on the gradient with
64 * nothing to keep in step.
65 *
66 * Loaded before sidebar-nav.js and maya-hq.js in app.html.
67 */
68
69(function () {
70  'use strict';
71
72  /* The M. Box 4.6→19.4 wide, 6→18 tall, so its optical centre is (12, 12) and
73     it sits centred without a transform. Round caps/joins because square ones
74     go ragged once the browser hints them below 20px.
75     The stroke attributes live ON THE PATH, not in CSS: the nav rail and the
76     badge style their SVGs differently and a fill-based glyph inherited the
77     wrong one of the two. */
78  /* ⚠️ ALL-ABSOLUTE COMMANDS ON PURPOSE (M/V/L/V, never m/v/l). The relative
79     form is two characters shorter and unreadable: its numbers are deltas, so
80     both a human and the test that checks this shape read them as points and
81     silently agree with the wrong picture. The test pins the absolute form. */
82  var MARK = '<path d="M4.6 18V6L12 14.8L19.4 6V18" fill="none" stroke="currentColor" '
83           + 'stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>';
84
85  function glyph() { return MARK; }
86
87  /** The bare mark for the nav rail — inherits the row's colour. */
88  function line(cls) {
89    return '<svg class="' + (cls || 'ico') + '" viewBox="0 0 24 24" fill="none" '
90      + 'aria-hidden="true">' + glyph() + '</svg>';
91  }
92
93  var api = { MARK: MARK, glyph: glyph, line: line };
94  if (typeof window !== 'undefined') window.MayaFigure = api;
95  if (typeof module !== 'undefined' && module.exports) module.exports = api;
96})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.