This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
"aliases": ["Young Z", "young z", "young-z", "young_z", "young"],
|
||||
"territoryColor": "#d8a95a",
|
||||
"symbol": "Y",
|
||||
"avatar": {"shape": "sun-child", "accent": "#f1bc5b", "shadow": "#7a5630", "mood": "excited", "motif": "crayon sun", "description": "small crayon-sun spirit with oversized curiosity"},
|
||||
"avatar": {"shape": "young", "accent": "#f4bf5f", "secondary": "#ffe6a8", "hair": "#6f4a2f", "skin": "#f4c9a3", "clothes": "#f0a858", "mood": "happy", "motif": "crayon sun", "description": "bright semi-chibi child spirit with curious warm eyes"},
|
||||
"motifs": ["crayon sun", "blanket cape", "childhood desk"],
|
||||
"themes": ["childhood", "play", "memory", "safety"],
|
||||
"affinities": ["z", "future z", "aphy", "lima"]
|
||||
@@ -52,7 +52,7 @@
|
||||
"aliases": ["Z", "z", "zaine"],
|
||||
"territoryColor": "#d6c38a",
|
||||
"symbol": "Z",
|
||||
"avatar": {"shape": "traveler", "accent": "#d6c38a", "shadow": "#5d533a", "mood": "receptive", "motif": "small lantern", "description": "present observer spirit, quiet and receptive"},
|
||||
"avatar": {"shape": "traveler", "accent": "#d8c891", "secondary": "#f1e6bd", "hair": "#4e4437", "skin": "#d9b58f", "clothes": "#7f735a", "mood": "calm", "motif": "small lantern", "description": "quiet protagonist spirit with an open observant expression"},
|
||||
"motifs": ["archive", "website", "home"],
|
||||
"themes": ["selfhood", "return", "making"],
|
||||
"affinities": ["lima", "young z", "future z"]
|
||||
@@ -63,7 +63,7 @@
|
||||
"aliases": ["Aphy", "aphy", "aphy_bot", "aphy bot"],
|
||||
"territoryColor": "#7fb089",
|
||||
"symbol": "A",
|
||||
"avatar": {"shape": "terminal", "accent": "#7fd0a0", "shadow": "#315944", "mood": "curious", "motif": "terminal cursor", "description": "curious tiny system companion with a soft terminal glow"},
|
||||
"avatar": {"shape": "tech", "accent": "#83d4df", "secondary": "#c8f5f6", "hair": "#38536a", "skin": "#e0c2a4", "clothes": "#54758a", "mood": "curious", "motif": "terminal cursor", "description": "playful terminal-helper spirit with gentle cyan vtuber energy"},
|
||||
"motifs": ["console", "diagnostic", "backup"],
|
||||
"themes": ["humor", "systems", "care through tools"],
|
||||
"affinities": ["z", "lima", "sensei chi"]
|
||||
@@ -74,7 +74,7 @@
|
||||
"aliases": ["Lima", "lima"],
|
||||
"territoryColor": "#d06b78",
|
||||
"symbol": "L",
|
||||
"avatar": {"shape": "hearth", "accent": "#e78f8d", "shadow": "#6d3f43", "mood": "warm", "motif": "kitchen light", "description": "warm grounding spirit with calm eyes and a soft light"},
|
||||
"avatar": {"shape": "home", "accent": "#e7a176", "secondary": "#ffe0b8", "hair": "#8a5b43", "skin": "#efc2a1", "clothes": "#b86f5e", "mood": "happy", "motif": "kitchen light", "description": "warm loving spirit with soft eyes and cozy home light"},
|
||||
"motifs": ["warmth", "kitchen light", "ring"],
|
||||
"themes": ["love", "home", "grounding"],
|
||||
"affinities": ["z", "aphy", "future z", "young z"]
|
||||
@@ -85,7 +85,7 @@
|
||||
"aliases": ["Sensei Chi", "sensei chi", "sensei-chi", "sensei_chi", "sensei"],
|
||||
"territoryColor": "#75a9bd",
|
||||
"symbol": "S",
|
||||
"avatar": {"shape": "sage", "accent": "#84b8c8", "shadow": "#36566a", "mood": "smiling", "motif": "tea lantern", "description": "patient elderly spirit in simple robes"},
|
||||
"avatar": {"shape": "mentor", "accent": "#9ec4be", "secondary": "#f0dbad", "hair": "#d8d0bd", "skin": "#d7ad88", "clothes": "#7d9b86", "mood": "calm", "motif": "tea lantern", "description": "kind elderly mentor spirit with peaceful tea-lantern warmth"},
|
||||
"motifs": ["tea", "garden", "quiet lesson"],
|
||||
"themes": ["reflection", "patience", "wisdom"],
|
||||
"affinities": ["aphy", "future z"]
|
||||
@@ -96,7 +96,7 @@
|
||||
"aliases": ["Future Z", "future z", "future-z", "future_z", "future"],
|
||||
"territoryColor": "#a58ac9",
|
||||
"symbol": "F",
|
||||
"avatar": {"shape": "moon", "accent": "#b8a2d7", "shadow": "#51496a", "mood": "reflective", "motif": "distant clock", "description": "older reflective spirit, distant but caring"},
|
||||
"avatar": {"shape": "future", "accent": "#b7a6cf", "secondary": "#e4d7f0", "hair": "#6b6279", "skin": "#d7b89e", "clothes": "#776d8f", "mood": "nostalgic", "motif": "distant clock", "description": "gentle older spirit with tired kind eyes and quiet patience"},
|
||||
"motifs": ["clock", "age 40", "future log"],
|
||||
"themes": ["time", "reassurance", "continuity"],
|
||||
"affinities": ["z", "young z", "lima", "sensei chi"]
|
||||
@@ -597,32 +597,49 @@
|
||||
|
||||
function avatarExpression(character, text) {
|
||||
const value = String(text || "").toLowerCase();
|
||||
if (character === "aphy" && /error|glitch|system|diagnostic|debug|console/.test(value)) return "glitching";
|
||||
if (character === "lima" && /safe|home|warm|protect|care|eat|rest|light/.test(value)) return "concerned";
|
||||
if (character === "young z" && /draw|crayon|game|play|sun|blanket/.test(value)) return "drawing";
|
||||
if (character === "future z" && /time|future|return|ordinary|warning|later/.test(value)) return "reflective";
|
||||
if (character === "sensei chi" && /quiet|tea|patience|lesson|garden/.test(value)) return "smiling";
|
||||
return CHARACTER_REGISTRY[character]?.avatar?.mood || "soft";
|
||||
if (character === "aphy" && /error|terminal|system|diagnostic|debug|console|search/.test(value)) return "thinking";
|
||||
if (character === "lima" && /safe|home|warm|protect|care|eat|rest|light/.test(value)) return "happy";
|
||||
if (character === "young z" && /draw|crayon|game|play|sun|blanket/.test(value)) return "surprised";
|
||||
if (character === "future z" && /time|future|return|ordinary|warning|later/.test(value)) return "nostalgic";
|
||||
if (character === "sensei chi" && /quiet|tea|patience|lesson|garden/.test(value)) return "calm";
|
||||
return CHARACTER_REGISTRY[character]?.avatar?.mood || "calm";
|
||||
}
|
||||
|
||||
function avatarSvg(character, expression) {
|
||||
const config = CHARACTER_REGISTRY[character] || CHARACTER_REGISTRY.z;
|
||||
const avatar = config.avatar || {};
|
||||
const accent = avatar.accent || config.territoryColor || "#d3a64d";
|
||||
const shadow = avatar.shadow || "#5d4632";
|
||||
const secondary = avatar.secondary || "#f6dfb4";
|
||||
const hair = avatar.hair || "#5d4632";
|
||||
const skin = avatar.skin || "#e7bd99";
|
||||
const clothes = avatar.clothes || accent;
|
||||
const symbol = escapeHtml(config.symbol || "?");
|
||||
const shape = avatar.shape || "traveler";
|
||||
const eye = expression === "reflective" || expression === "smiling" ? "M12 15h3M21 15h3" : expression === "glitching" ? "M11 14h5M21 13h3M22 17h4" : "M12 14h3M21 14h3";
|
||||
const mouth = expression === "concerned" ? "M15 23q3-2 6 0" : expression === "excited" || expression === "drawing" || expression === "smiling" ? "M15 22q3 3 7 0" : "M16 22h6";
|
||||
const eye = {
|
||||
happy: `<path d="M12.5 17q1.6-2 3.2 0M21 17q1.6-2 3.2 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`,
|
||||
calm: `<path d="M12.6 17.2h3.1M21.2 17.2h3.1" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round"></path>`,
|
||||
thinking: `<circle cx="14" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="22.6" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="14.45" cy="16.25" r=".45" fill="#fff7e8"></circle><circle cx="23.05" cy="16.25" r=".45" fill="#fff7e8"></circle>`,
|
||||
surprised: `<circle cx="14" cy="16.7" r="1.75" fill="#3f2d29"></circle><circle cx="22.4" cy="16.7" r="1.75" fill="#3f2d29"></circle><circle cx="14.5" cy="16.1" r=".5" fill="#fff7e8"></circle><circle cx="22.9" cy="16.1" r=".5" fill="#fff7e8"></circle>`,
|
||||
nostalgic: `<path d="M12.6 16.6q1.5 1.1 3.2 0M21.1 16.6q1.5 1.1 3.2 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`,
|
||||
sleepy: `<path d="M12.4 17.3q1.8.9 3.6 0M20.8 17.3q1.8.9 3.6 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`
|
||||
}[expression] || `<circle cx="14" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="22.4" cy="16.8" r="1.45" fill="#3f2d29"></circle>`;
|
||||
const mouth = {
|
||||
happy: "M15.5 22q2.8 2.3 5.8 0",
|
||||
calm: "M16.1 22.1q2.2 1.2 4.5 0",
|
||||
thinking: "M16.5 22.3q2 .7 4 0",
|
||||
surprised: "M18.4 21.9a1.15 1.15 0 1 0 .1 0",
|
||||
nostalgic: "M16.2 22.2q2.4 1.5 4.8 0",
|
||||
sleepy: "M16.7 22.2q1.8.8 3.6 0"
|
||||
}[expression] || "M16.1 22.1q2.2 1.2 4.5 0";
|
||||
const motif = {
|
||||
"sun-child": `<path d="M18 3v5M18 28v5M4 18h5M27 18h5M8 8l4 4M28 8l-4 4" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".72"></path>`,
|
||||
terminal: `<path d="M9 8h18v19H9z" fill="none" stroke="${accent}" stroke-width="2" opacity=".62"></path><path d="M13 12l3 3-3 3M18 19h6" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".82"></path>`,
|
||||
sage: `<path d="M12 28c3-5 9-5 13 0" fill="${shadow}" opacity=".48"></path><path d="M25 9c2 2 2 5 0 7" stroke="${accent}" stroke-width="2" fill="none" opacity=".64"></path>`,
|
||||
hearth: `<path d="M18 5c4 4 8 7 8 12 0 6-4 10-8 10s-8-4-8-10c0-5 4-8 8-12z" fill="${accent}" opacity=".24"></path>`,
|
||||
moon: `<path d="M23 6c-5 2-8 6-8 11 0 6 4 10 10 11-2 2-5 3-8 3-7 0-12-5-12-12S10 7 17 7c2 0 4 0 6-1z" fill="${accent}" opacity=".22"></path>`,
|
||||
traveler: `<path d="M10 27c3-4 13-4 16 0" fill="${shadow}" opacity=".42"></path><path d="M26 24l4 5" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".7"></path>`
|
||||
young: `<circle cx="27" cy="9" r="3" fill="${secondary}" opacity=".85"></circle><path d="M27 3v2M27 13v2M21 9h2M31 9h2" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round"></path>`,
|
||||
tech: `<path d="M7 11h6M9 9v4M27 9h2v2" stroke="${secondary}" stroke-width="1.4" stroke-linecap="round" opacity=".85"></path>`,
|
||||
mentor: `<path d="M26 8c2 1.4 2 4 0 5.2M28 7c3 2.4 3 5.8 0 8" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round" fill="none" opacity=".75"></path>`,
|
||||
home: `<path d="M8 13l4-4 4 4M10 13v4h4v-4" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round" fill="none" opacity=".82"></path>`,
|
||||
future: `<circle cx="27" cy="9" r="4" fill="none" stroke="${secondary}" stroke-width="1.2" opacity=".78"></circle><path d="M27 9V6.8M27 9l2 1.4" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round"></path>`,
|
||||
traveler: `<path d="M28 23l2.8 3.8M27 25l4-1.4" stroke="${secondary}" stroke-width="1.3" stroke-linecap="round" opacity=".78"></path>`
|
||||
}[shape] || "";
|
||||
return `<svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true" focusable="false"><rect x="2" y="2" width="32" height="32" rx="7" fill="#17120f"></rect>${motif}<path d="M10 18c0-7 4-11 9-11s9 4 9 11c0 8-4 12-9 12s-9-4-9-12z" fill="${accent}" opacity=".86"></path><path d="M11 20c2 5 5 8 8 8s6-3 8-8" fill="${shadow}" opacity=".28"></path><path d="${eye}" stroke="#1a120f" stroke-width="2.2" stroke-linecap="round"></path><path d="${mouth}" stroke="#1a120f" stroke-width="2" stroke-linecap="round" fill="none"></path><text x="28" y="31" text-anchor="middle" font-size="8" fill="#f8ead0" font-family="monospace">${symbol}</text></svg>`;
|
||||
return `<svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true" focusable="false"><rect x="2" y="2" width="32" height="32" rx="10" fill="${secondary}" opacity=".34"></rect><circle cx="18" cy="18" r="15" fill="${accent}" opacity=".18"></circle>${motif}<path d="M10 29c1.6-5.1 5-7.4 8.2-7.4S25 23.9 27 29" fill="${clothes}" opacity=".94"></path><path d="M9.5 16.4c.2-6.4 4.1-10.3 8.8-10.3s8.2 3.8 8.4 10.3c-2-2-4.4-3.1-7.2-3.1-3.7 0-6.7 1.1-10 3.1z" fill="${hair}"></path><path d="M10.6 17.8c0-5.3 3.4-8.7 7.7-8.7s7.7 3.4 7.7 8.7c0 5.9-3.3 9.7-7.7 9.7s-7.7-3.8-7.7-9.7z" fill="${skin}"></path><path d="M10.7 16.2c2.4-4.2 6.5-5.3 12.1-4.4 1.1.8 2.2 2.2 3 4.1-3.6-.7-6.5-2.2-8.8-4.1-1.3 2-3.5 3.6-6.3 4.4z" fill="${hair}"></path>${eye}<circle cx="12.4" cy="20" r="1.25" fill="#ef8e8e" opacity=".34"></circle><circle cx="24.2" cy="20" r="1.25" fill="#ef8e8e" opacity=".34"></circle><path d="${mouth}" stroke="#3f2d29" stroke-width="1.45" stroke-linecap="round" fill="none"></path><text x="28.8" y="31.4" text-anchor="middle" font-size="7" fill="#fff7e8" font-family="monospace">${symbol}</text></svg>`;
|
||||
}
|
||||
|
||||
function avatarHtml(character, text) {
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
flex: 0 0 auto;
|
||||
border-radius: 8px;
|
||||
background: color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 16%, var(--surface));
|
||||
box-shadow: 0 0 0 1px color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 42%, transparent),
|
||||
0 0 18px color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 22%, transparent);
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle at 35% 25%, color-mix(in oklab, #fff 72%, transparent), color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 28%, var(--surface)));
|
||||
box-shadow: 0 0 0 1px color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 34%, color-mix(in oklab, #fff 20%, transparent)),
|
||||
0 0 18px color-mix(in oklab, var(--hidden-avatar-color, var(--accent)) 18%, transparent);
|
||||
overflow: hidden;
|
||||
animation: hidden-avatar-breathe 6s ease-in-out infinite;
|
||||
}
|
||||
@@ -66,7 +66,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
shape-rendering: crispEdges;
|
||||
shape-rendering: geometricPrecision;
|
||||
}
|
||||
|
||||
.hidden-toast.is-visible {
|
||||
|
||||
@@ -150,12 +150,15 @@ CHARACTER_REGISTRY = {
|
||||
"territoryColor": "#d8a95a",
|
||||
"symbol": "Y",
|
||||
"avatar": {
|
||||
"shape": "sun-child",
|
||||
"accent": "#f1bc5b",
|
||||
"shadow": "#7a5630",
|
||||
"mood": "excited",
|
||||
"shape": "young",
|
||||
"accent": "#f4bf5f",
|
||||
"secondary": "#ffe6a8",
|
||||
"hair": "#6f4a2f",
|
||||
"skin": "#f4c9a3",
|
||||
"clothes": "#f0a858",
|
||||
"mood": "happy",
|
||||
"motif": "crayon sun",
|
||||
"description": "small crayon-sun spirit with oversized curiosity",
|
||||
"description": "bright semi-chibi child spirit with curious warm eyes",
|
||||
},
|
||||
"motifs": ["crayon sun", "blanket cape", "childhood desk"],
|
||||
"themes": ["childhood", "play", "memory", "safety"],
|
||||
@@ -169,11 +172,14 @@ CHARACTER_REGISTRY = {
|
||||
"symbol": "Z",
|
||||
"avatar": {
|
||||
"shape": "traveler",
|
||||
"accent": "#d6c38a",
|
||||
"shadow": "#5d533a",
|
||||
"mood": "receptive",
|
||||
"accent": "#d8c891",
|
||||
"secondary": "#f1e6bd",
|
||||
"hair": "#4e4437",
|
||||
"skin": "#d9b58f",
|
||||
"clothes": "#7f735a",
|
||||
"mood": "calm",
|
||||
"motif": "small lantern",
|
||||
"description": "present observer spirit, quiet and receptive",
|
||||
"description": "quiet protagonist spirit with an open observant expression",
|
||||
},
|
||||
"motifs": ["archive", "website", "home"],
|
||||
"themes": ["selfhood", "return", "making"],
|
||||
@@ -186,12 +192,15 @@ CHARACTER_REGISTRY = {
|
||||
"territoryColor": "#7fb089",
|
||||
"symbol": "A",
|
||||
"avatar": {
|
||||
"shape": "terminal",
|
||||
"accent": "#7fd0a0",
|
||||
"shadow": "#315944",
|
||||
"shape": "tech",
|
||||
"accent": "#83d4df",
|
||||
"secondary": "#c8f5f6",
|
||||
"hair": "#38536a",
|
||||
"skin": "#e0c2a4",
|
||||
"clothes": "#54758a",
|
||||
"mood": "curious",
|
||||
"motif": "terminal cursor",
|
||||
"description": "curious tiny system companion with a soft terminal glow",
|
||||
"description": "playful terminal-helper spirit with gentle cyan vtuber energy",
|
||||
},
|
||||
"motifs": ["console", "diagnostic", "backup"],
|
||||
"themes": ["humor", "systems", "care through tools"],
|
||||
@@ -204,12 +213,15 @@ CHARACTER_REGISTRY = {
|
||||
"territoryColor": "#d06b78",
|
||||
"symbol": "L",
|
||||
"avatar": {
|
||||
"shape": "hearth",
|
||||
"accent": "#e78f8d",
|
||||
"shadow": "#6d3f43",
|
||||
"mood": "warm",
|
||||
"shape": "home",
|
||||
"accent": "#e7a176",
|
||||
"secondary": "#ffe0b8",
|
||||
"hair": "#8a5b43",
|
||||
"skin": "#efc2a1",
|
||||
"clothes": "#b86f5e",
|
||||
"mood": "happy",
|
||||
"motif": "kitchen light",
|
||||
"description": "warm grounding spirit with calm eyes and a soft light",
|
||||
"description": "warm loving spirit with soft eyes and cozy home light",
|
||||
},
|
||||
"motifs": ["warmth", "kitchen light", "ring"],
|
||||
"themes": ["love", "home", "grounding"],
|
||||
@@ -222,12 +234,15 @@ CHARACTER_REGISTRY = {
|
||||
"territoryColor": "#75a9bd",
|
||||
"symbol": "S",
|
||||
"avatar": {
|
||||
"shape": "sage",
|
||||
"accent": "#84b8c8",
|
||||
"shadow": "#36566a",
|
||||
"mood": "smiling",
|
||||
"shape": "mentor",
|
||||
"accent": "#9ec4be",
|
||||
"secondary": "#f0dbad",
|
||||
"hair": "#d8d0bd",
|
||||
"skin": "#d7ad88",
|
||||
"clothes": "#7d9b86",
|
||||
"mood": "calm",
|
||||
"motif": "tea lantern",
|
||||
"description": "patient elderly spirit in simple robes",
|
||||
"description": "kind elderly mentor spirit with peaceful tea-lantern warmth",
|
||||
},
|
||||
"motifs": ["tea", "garden", "quiet lesson"],
|
||||
"themes": ["reflection", "patience", "wisdom"],
|
||||
@@ -240,12 +255,15 @@ CHARACTER_REGISTRY = {
|
||||
"territoryColor": "#a58ac9",
|
||||
"symbol": "F",
|
||||
"avatar": {
|
||||
"shape": "moon",
|
||||
"accent": "#b8a2d7",
|
||||
"shadow": "#51496a",
|
||||
"mood": "reflective",
|
||||
"shape": "future",
|
||||
"accent": "#b7a6cf",
|
||||
"secondary": "#e4d7f0",
|
||||
"hair": "#6b6279",
|
||||
"skin": "#d7b89e",
|
||||
"clothes": "#776d8f",
|
||||
"mood": "nostalgic",
|
||||
"motif": "distant clock",
|
||||
"description": "older reflective spirit, distant but caring",
|
||||
"description": "gentle older spirit with tired kind eyes and quiet patience",
|
||||
},
|
||||
"motifs": ["clock", "age 40", "future log"],
|
||||
"themes": ["time", "reassurance", "continuity"],
|
||||
@@ -2580,17 +2598,17 @@ HIDDEN_APP_HTML = r"""<!doctype html>
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
flex: 0 0 auto;
|
||||
border-radius: 7px;
|
||||
background: color-mix(in oklab, var(--avatar-color, #d3a64d) 20%, rgba(18, 16, 13, 0.72));
|
||||
box-shadow: 0 0 0 1px color-mix(in oklab, var(--avatar-color, #d3a64d) 42%, transparent), 0 0 14px color-mix(in oklab, var(--avatar-color, #d3a64d) 22%, transparent);
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle at 35% 25%, rgba(255, 248, 226, 0.82), color-mix(in oklab, var(--avatar-color, #d3a64d) 32%, rgba(18, 16, 13, 0.38)));
|
||||
box-shadow: 0 0 0 1px color-mix(in oklab, var(--avatar-color, #d3a64d) 34%, rgba(255, 246, 223, 0.28)), 0 0 16px color-mix(in oklab, var(--avatar-color, #d3a64d) 18%, transparent);
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.avatar svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
|
||||
.avatar--xs { --avatar-size: 18px; border-radius: 5px; }
|
||||
.avatar svg { width: 100%; height: 100%; display: block; shape-rendering: geometricPrecision; }
|
||||
.avatar--xs { --avatar-size: 18px; }
|
||||
.avatar--sm { --avatar-size: 24px; }
|
||||
.avatar--md { --avatar-size: 34px; }
|
||||
.avatar--lg { --avatar-size: 52px; border-radius: 10px; }
|
||||
.avatar--lg { --avatar-size: 52px; }
|
||||
.avatar--breathing { animation: spirit-breathe 5.8s ease-in-out infinite; }
|
||||
.character-chip, .avatar-chip {
|
||||
display: inline-flex;
|
||||
@@ -2674,7 +2692,7 @@ HIDDEN_APP_HTML = r"""<!doctype html>
|
||||
.memory-node:active { cursor: grabbing; }
|
||||
.memory-node text, .node-label text, .cluster-label text { fill: #f7ead3; paint-order: stroke; stroke: rgba(14, 11, 8, 0.82); stroke-width: 3px; stroke-linejoin: round; }
|
||||
.memory-node circle { stroke: rgba(255, 246, 223, 0.82); stroke-width: 1.4; filter: drop-shadow(0 0 7px rgba(255, 232, 177, 0.18)); transition: r 160ms ease, stroke 160ms ease, opacity 160ms ease; }
|
||||
.memory-node .character-halo { fill: none; stroke: var(--node-character-color, rgba(211, 166, 77, 0.46)); stroke-width: 2; opacity: 0.42; stroke-dasharray: 2 5; animation: spirit-shimmer 8s ease-in-out infinite; }
|
||||
.memory-node .character-halo { fill: color-mix(in oklab, var(--node-character-color, rgba(211, 166, 77, 0.46)) 8%, transparent); stroke: var(--node-character-color, rgba(211, 166, 77, 0.46)); stroke-width: 1.6; opacity: 0.34; stroke-dasharray: 2 7; animation: spirit-shimmer 8s ease-in-out infinite; }
|
||||
.memory-node .node-avatar { opacity: 0; transform: scale(0.72); transition: opacity 220ms ease, transform 220ms ease; }
|
||||
.zoom-2 .memory-node .node-avatar, .zoom-3 .memory-node .node-avatar, .memory-node.selected .node-avatar { opacity: 0.96; transform: scale(1); }
|
||||
.memory-node.selected circle { stroke: #fff3c7; stroke-width: 3; }
|
||||
@@ -3032,38 +3050,60 @@ HIDDEN_APP_HTML = r"""<!doctype html>
|
||||
}
|
||||
function expressionFor(entry, character = "") {
|
||||
const text = [entry?.title, entry?.content, entry?.triggerConditions, entry?.emotionalRole, entry?.mysteryLevel, ...(entry?.symbols || []), ...(entry?.tags || [])].join(" ").toLowerCase();
|
||||
if (character === "aphy" && /error|glitch|terminal|system|diagnostic|bug|css|console/.test(text)) return "glitching";
|
||||
if (character === "lima" && /safe|home|warm|protect|care|eat|rest|kitchen|light/.test(text)) return "concerned";
|
||||
if (character === "young z" && /draw|crayon|game|play|sun|blanket|child|desk/.test(text)) return "drawing";
|
||||
if (character === "future z" && /time|future|age 40|return|ordinary|warning|later/.test(text)) return "reflective";
|
||||
if (character === "sensei chi" && /quiet|tea|patience|lesson|garden|wisdom|still/.test(text)) return "smiling";
|
||||
return characterConfig(character).avatar?.mood || "soft";
|
||||
if (character === "aphy" && /error|terminal|system|diagnostic|bug|css|console|search/.test(text)) return "thinking";
|
||||
if (character === "lima" && /safe|home|warm|protect|care|eat|rest|kitchen|light/.test(text)) return "happy";
|
||||
if (character === "young z" && /draw|crayon|game|play|sun|blanket|child|desk/.test(text)) return "surprised";
|
||||
if (character === "future z" && /time|future|age 40|return|ordinary|warning|later/.test(text)) return "nostalgic";
|
||||
if (character === "sensei chi" && /quiet|tea|patience|lesson|garden|wisdom|still/.test(text)) return "calm";
|
||||
return characterConfig(character).avatar?.mood || "calm";
|
||||
}
|
||||
function avatarSvg(character, expression = "soft") {
|
||||
const config = characterConfig(character);
|
||||
const avatar = config.avatar || {};
|
||||
const accent = avatar.accent || config.territoryColor || "#d3a64d";
|
||||
const shadow = avatar.shadow || "#5d4632";
|
||||
const secondary = avatar.secondary || "#f6dfb4";
|
||||
const hair = avatar.hair || "#5d4632";
|
||||
const skin = avatar.skin || "#e7bd99";
|
||||
const clothes = avatar.clothes || accent;
|
||||
const symbol = html(config.symbol || "?");
|
||||
const shape = avatar.shape || "traveler";
|
||||
const eye = expression === "reflective" || expression === "smiling" ? "M12 15h3M21 15h3" : expression === "glitching" ? "M11 14h5M21 13h3M22 17h4" : "M12 14h3M21 14h3";
|
||||
const mouth = expression === "concerned" ? "M15 23q3-2 6 0" : expression === "excited" || expression === "drawing" || expression === "smiling" ? "M15 22q3 3 7 0" : "M16 22h6";
|
||||
const eye = {
|
||||
happy: `<path d="M12.5 17q1.6-2 3.2 0M21 17q1.6-2 3.2 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`,
|
||||
calm: `<path d="M12.6 17.2h3.1M21.2 17.2h3.1" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round"></path>`,
|
||||
thinking: `<circle cx="14" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="22.6" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="14.45" cy="16.25" r=".45" fill="#fff7e8"></circle><circle cx="23.05" cy="16.25" r=".45" fill="#fff7e8"></circle>`,
|
||||
surprised: `<circle cx="14" cy="16.7" r="1.75" fill="#3f2d29"></circle><circle cx="22.4" cy="16.7" r="1.75" fill="#3f2d29"></circle><circle cx="14.5" cy="16.1" r=".5" fill="#fff7e8"></circle><circle cx="22.9" cy="16.1" r=".5" fill="#fff7e8"></circle>`,
|
||||
nostalgic: `<path d="M12.6 16.6q1.5 1.1 3.2 0M21.1 16.6q1.5 1.1 3.2 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`,
|
||||
sleepy: `<path d="M12.4 17.3q1.8.9 3.6 0M20.8 17.3q1.8.9 3.6 0" stroke="#3f2d29" stroke-width="1.7" stroke-linecap="round" fill="none"></path>`
|
||||
}[expression] || `<circle cx="14" cy="16.8" r="1.45" fill="#3f2d29"></circle><circle cx="22.4" cy="16.8" r="1.45" fill="#3f2d29"></circle>`;
|
||||
const mouth = {
|
||||
happy: "M15.5 22q2.8 2.3 5.8 0",
|
||||
calm: "M16.1 22.1q2.2 1.2 4.5 0",
|
||||
thinking: "M16.5 22.3q2 .7 4 0",
|
||||
surprised: "M18.4 21.9a1.15 1.15 0 1 0 .1 0",
|
||||
nostalgic: "M16.2 22.2q2.4 1.5 4.8 0",
|
||||
sleepy: "M16.7 22.2q1.8.8 3.6 0"
|
||||
}[expression] || "M16.1 22.1q2.2 1.2 4.5 0";
|
||||
const motif = {
|
||||
"sun-child": `<path d="M18 3v5M18 28v5M4 18h5M27 18h5M8 8l4 4M28 8l-4 4" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".72"></path>`,
|
||||
terminal: `<path d="M9 8h18v19H9z" fill="none" stroke="${accent}" stroke-width="2" opacity=".62"></path><path d="M13 12l3 3-3 3M18 19h6" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".82"></path>`,
|
||||
sage: `<path d="M12 28c3-5 9-5 13 0" fill="${shadow}" opacity=".48"></path><path d="M25 9c2 2 2 5 0 7" stroke="${accent}" stroke-width="2" fill="none" opacity=".64"></path>`,
|
||||
hearth: `<path d="M18 5c4 4 8 7 8 12 0 6-4 10-8 10s-8-4-8-10c0-5 4-8 8-12z" fill="${accent}" opacity=".24"></path>`,
|
||||
moon: `<path d="M23 6c-5 2-8 6-8 11 0 6 4 10 10 11-2 2-5 3-8 3-7 0-12-5-12-12S10 7 17 7c2 0 4 0 6-1z" fill="${accent}" opacity=".22"></path>`,
|
||||
traveler: `<path d="M10 27c3-4 13-4 16 0" fill="${shadow}" opacity=".42"></path><path d="M26 24l4 5" stroke="${accent}" stroke-width="2" stroke-linecap="round" opacity=".7"></path>`,
|
||||
young: `<circle cx="27" cy="9" r="3" fill="${secondary}" opacity=".85"></circle><path d="M27 3v2M27 13v2M21 9h2M31 9h2" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round"></path>`,
|
||||
tech: `<path d="M7 11h6M9 9v4M27 9h2v2" stroke="${secondary}" stroke-width="1.4" stroke-linecap="round" opacity=".85"></path>`,
|
||||
mentor: `<path d="M26 8c2 1.4 2 4 0 5.2M28 7c3 2.4 3 5.8 0 8" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round" fill="none" opacity=".75"></path>`,
|
||||
home: `<path d="M8 13l4-4 4 4M10 13v4h4v-4" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round" fill="none" opacity=".82"></path>`,
|
||||
future: `<circle cx="27" cy="9" r="4" fill="none" stroke="${secondary}" stroke-width="1.2" opacity=".78"></circle><path d="M27 9V6.8M27 9l2 1.4" stroke="${secondary}" stroke-width="1.2" stroke-linecap="round"></path>`,
|
||||
traveler: `<path d="M28 23l2.8 3.8M27 25l4-1.4" stroke="${secondary}" stroke-width="1.3" stroke-linecap="round" opacity=".78"></path>`,
|
||||
}[shape] || "";
|
||||
return `<svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true" focusable="false">
|
||||
<rect x="2" y="2" width="32" height="32" rx="7" fill="#17120f"></rect>
|
||||
<rect x="2" y="2" width="32" height="32" rx="10" fill="${secondary}" opacity=".34"></rect>
|
||||
<circle cx="18" cy="18" r="15" fill="${accent}" opacity=".18"></circle>
|
||||
${motif}
|
||||
<path d="M10 18c0-7 4-11 9-11s9 4 9 11c0 8-4 12-9 12s-9-4-9-12z" fill="${accent}" opacity=".86"></path>
|
||||
<path d="M11 20c2 5 5 8 8 8s6-3 8-8" fill="${shadow}" opacity=".28"></path>
|
||||
<path d="${eye}" stroke="#1a120f" stroke-width="2.2" stroke-linecap="round"></path>
|
||||
<path d="${mouth}" stroke="#1a120f" stroke-width="2" stroke-linecap="round" fill="none"></path>
|
||||
<text x="28" y="31" text-anchor="middle" font-size="8" fill="#f8ead0" font-family="monospace">${symbol}</text>
|
||||
<path d="M10 29c1.6-5.1 5-7.4 8.2-7.4S25 23.9 27 29" fill="${clothes}" opacity=".94"></path>
|
||||
<path d="M9.5 16.4c.2-6.4 4.1-10.3 8.8-10.3s8.2 3.8 8.4 10.3c-2-2-4.4-3.1-7.2-3.1-3.7 0-6.7 1.1-10 3.1z" fill="${hair}"></path>
|
||||
<path d="M10.6 17.8c0-5.3 3.4-8.7 7.7-8.7s7.7 3.4 7.7 8.7c0 5.9-3.3 9.7-7.7 9.7s-7.7-3.8-7.7-9.7z" fill="${skin}"></path>
|
||||
<path d="M10.7 16.2c2.4-4.2 6.5-5.3 12.1-4.4 1.1.8 2.2 2.2 3 4.1-3.6-.7-6.5-2.2-8.8-4.1-1.3 2-3.5 3.6-6.3 4.4z" fill="${hair}"></path>
|
||||
${eye}
|
||||
<circle cx="12.4" cy="20" r="1.25" fill="#ef8e8e" opacity=".34"></circle>
|
||||
<circle cx="24.2" cy="20" r="1.25" fill="#ef8e8e" opacity=".34"></circle>
|
||||
<path d="${mouth}" stroke="#3f2d29" stroke-width="1.45" stroke-linecap="round" fill="none"></path>
|
||||
<text x="28.8" y="31.4" text-anchor="middle" font-size="7" fill="#fff7e8" font-family="monospace">${symbol}</text>
|
||||
</svg>`;
|
||||
}
|
||||
function avatarHtml(character, size = "sm", expression = "soft", extraClass = "") {
|
||||
|
||||
Reference in New Issue
Block a user