@wallarm-org/design-system 4.12.4 → 4.13.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/dist/components/AgentLookBuilder/kit.d.ts +2 -2
- package/dist/lib/agent-characters/data.gen.d.ts +4 -4
- package/dist/lib/agent-characters/data.gen.js +62 -21
- package/dist/lib/agent-characters/look.d.ts +1 -1
- package/dist/lib/agent-characters/props.js +51 -1
- package/dist/metadata/components.json +9 -9
- package/dist/metadata/guidelines.json +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type AgentColorDef, type AgentColorId, type AgentEyeStyle, type AgentPropId, type AgentShapeId } from '../../lib/agent-characters/data.gen.js';
|
|
2
2
|
/**
|
|
3
|
-
* Loads the full prop library (
|
|
3
|
+
* Loads the full prop library (16 props on any shape) for every DS copy on the page. Any app that renders stored
|
|
4
4
|
* custom looks calls it once at start-up — the cards, rows and tables that show them, not only the picker.
|
|
5
|
-
* Without it only the
|
|
5
|
+
* Without it only the presets' props are drawn. Mounted glyphs pick it up on their next render; a mounted 3D
|
|
6
6
|
* character keeps what it drew until its look changes or it remounts, so call it before the first render.
|
|
7
7
|
*/
|
|
8
8
|
export declare function enableAgentLookLibrary(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type AgentShapeId = 'dome' | 'gumdrop' | 'cushion' | 'pebble' | 'capsule' | 'cloud' | 'egg' | 'mochi' | 'kettle' | 'mug' | 'padlock' | 'safe';
|
|
2
2
|
export type AgentColorId = 'coral' | 'cobalt' | 'sky' | 'cyan' | 'lilac' | 'heather' | 'pink' | 'sand' | 'toffee' | 'powder' | 'lavender' | 'blush' | 'butter' | 'mint' | 'sage' | 'petrol' | 'plum' | 'cocoa' | 'olive' | 'graphite' | 'stone' | 'oat';
|
|
3
3
|
export type AgentEyeStyle = 'round' | 'oval' | 'tall' | 'sleepy';
|
|
4
|
-
export type AgentPropId = 'antennae' | 'dish' | 'glasses' | 'seam' | 'beanie' | 'headlamp' | 'periscope' | 'magnifier' | 'pennant' | 'flowerclip' | 'plaster' | 'sprout' | 'badge' | 'windkey' | 'monocle' | 'none';
|
|
5
|
-
export type AgentCharacterId = 'wally' | 'radar' | 'sift' | '
|
|
4
|
+
export type AgentPropId = 'antennae' | 'dish' | 'glasses' | 'seam' | 'beanie' | 'headlamp' | 'periscope' | 'magnifier' | 'pennant' | 'flowerclip' | 'plaster' | 'sprout' | 'badge' | 'windkey' | 'monocle' | 'quill' | 'none';
|
|
5
|
+
export type AgentCharacterId = 'wally' | 'radar' | 'sift' | 'acquit' | 'trim' | 'lens' | 'bard';
|
|
6
6
|
export type AgentToneId = 'metal' | 'ink' | 'leaf' | 'wood' | 'oat' | 'honey' | 'brass' | 'cocoa' | 'glass' | 'beige';
|
|
7
7
|
/** A stored look: four ids and a schema version, so a later kit change can migrate stored looks. */
|
|
8
8
|
export interface AgentLook {
|
|
@@ -12,7 +12,7 @@ export interface AgentLook {
|
|
|
12
12
|
eyes: AgentEyeStyle;
|
|
13
13
|
prop: AgentPropId;
|
|
14
14
|
}
|
|
15
|
-
/** A preset: a look plus its default name, role and template (null: Wally, and
|
|
15
|
+
/** A preset: a look plus its default name, role and template (null: Wally, and an agent whose template does not exist yet). */
|
|
16
16
|
export interface AgentPreset extends Omit<AgentLook, 'v'> {
|
|
17
17
|
id: AgentCharacterId;
|
|
18
18
|
name: string;
|
|
@@ -85,7 +85,7 @@ export declare const EYE_BASE: Record<AgentEyeStyle, EyeBase>;
|
|
|
85
85
|
export declare const PROPS: [AgentPropId, string][];
|
|
86
86
|
export declare const GLYPH_PROPS: ReadonlySet<string>;
|
|
87
87
|
export declare const CAST: AgentPreset[];
|
|
88
|
-
/** propDef() for the
|
|
88
|
+
/** propDef() for the presets, keyed `shape|hex|prop`; any other look needs the AgentLookBuilder entry. */
|
|
89
89
|
export declare const PRESET_PROPS: Partial<Record<string, PropDef>>;
|
|
90
90
|
export declare const STATES: {
|
|
91
91
|
key: string;
|
|
@@ -58,6 +58,7 @@ const PROP_IDS = [
|
|
|
58
58
|
"badge",
|
|
59
59
|
"windkey",
|
|
60
60
|
"monocle",
|
|
61
|
+
"quill",
|
|
61
62
|
"none"
|
|
62
63
|
];
|
|
63
64
|
const SHAPES = [
|
|
@@ -497,6 +498,10 @@ const PROPS = [
|
|
|
497
498
|
"monocle",
|
|
498
499
|
"Monocle"
|
|
499
500
|
],
|
|
501
|
+
[
|
|
502
|
+
"quill",
|
|
503
|
+
"Quill"
|
|
504
|
+
],
|
|
500
505
|
[
|
|
501
506
|
"none",
|
|
502
507
|
"No prop"
|
|
@@ -509,7 +514,8 @@ const GLYPH_PROPS = new Set([
|
|
|
509
514
|
"periscope",
|
|
510
515
|
"pennant",
|
|
511
516
|
"sprout",
|
|
512
|
-
"windkey"
|
|
517
|
+
"windkey",
|
|
518
|
+
"quill"
|
|
513
519
|
]);
|
|
514
520
|
const CAST = [
|
|
515
521
|
{
|
|
@@ -543,8 +549,8 @@ const CAST = [
|
|
|
543
549
|
prop: "glasses"
|
|
544
550
|
},
|
|
545
551
|
{
|
|
546
|
-
id: "
|
|
547
|
-
name: "
|
|
552
|
+
id: "acquit",
|
|
553
|
+
name: "Acquit",
|
|
548
554
|
role: "False Positive Resolver",
|
|
549
555
|
templateId: "fp-resolver",
|
|
550
556
|
shape: "pebble",
|
|
@@ -563,14 +569,24 @@ const CAST = [
|
|
|
563
569
|
prop: "windkey"
|
|
564
570
|
},
|
|
565
571
|
{
|
|
566
|
-
id: "
|
|
567
|
-
name: "
|
|
568
|
-
role: "
|
|
572
|
+
id: "lens",
|
|
573
|
+
name: "Lens",
|
|
574
|
+
role: "API Posture Reviewer",
|
|
569
575
|
templateId: null,
|
|
570
|
-
shape: "
|
|
571
|
-
color: "
|
|
572
|
-
eyes: "
|
|
573
|
-
prop: "
|
|
576
|
+
shape: "mochi",
|
|
577
|
+
color: "mint",
|
|
578
|
+
eyes: "tall",
|
|
579
|
+
prop: "periscope"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
id: "bard",
|
|
583
|
+
name: "Bard",
|
|
584
|
+
role: "Security Posture Briefer",
|
|
585
|
+
templateId: null,
|
|
586
|
+
shape: "cloud",
|
|
587
|
+
color: "powder",
|
|
588
|
+
eyes: "oval",
|
|
589
|
+
prop: "quill"
|
|
574
590
|
}
|
|
575
591
|
];
|
|
576
592
|
const PRESET_PROPS = {
|
|
@@ -684,34 +700,59 @@ const PRESET_PROPS = {
|
|
|
684
700
|
py: 10
|
|
685
701
|
}
|
|
686
702
|
},
|
|
687
|
-
"
|
|
703
|
+
"mochi|#A8DCC8|periscope": {
|
|
688
704
|
layers: [
|
|
689
705
|
{
|
|
690
|
-
d: "
|
|
691
|
-
col: "#
|
|
706
|
+
d: "M59 54L59 33A3 3 0 0 1 65 33L65 54A3 3 0 0 1 59 54Z",
|
|
707
|
+
col: "#A3ABBB",
|
|
692
708
|
mat: "vinyl"
|
|
693
709
|
},
|
|
694
710
|
{
|
|
695
|
-
d: "
|
|
711
|
+
d: "M62.5 23H69.5A3.5 3.5 0 0 1 73 26.5V29.5A3.5 3.5 0 0 1 69.5 33H62.5A3.5 3.5 0 0 1 59 29.5V26.5A3.5 3.5 0 0 1 62.5 23Z",
|
|
696
712
|
col: "#A3ABBB",
|
|
697
713
|
mat: "vinyl"
|
|
698
714
|
},
|
|
699
715
|
{
|
|
700
|
-
d: "
|
|
701
|
-
col: "#
|
|
716
|
+
d: "M67.8 28A2.2 3.2 0 1 1 72.2 28A2.2 3.2 0 1 1 67.8 28Z",
|
|
717
|
+
col: "#262A36",
|
|
702
718
|
mat: "vinyl"
|
|
703
719
|
}
|
|
704
720
|
],
|
|
705
|
-
deco: [
|
|
721
|
+
deco: [],
|
|
722
|
+
anim: {
|
|
723
|
+
type: "sway",
|
|
724
|
+
px: 62,
|
|
725
|
+
py: 54
|
|
726
|
+
},
|
|
727
|
+
fid: {
|
|
728
|
+
k: "turn",
|
|
729
|
+
px: 62,
|
|
730
|
+
py: 54
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
"cloud|#B9D7F0|quill": {
|
|
734
|
+
layers: [
|
|
735
|
+
{
|
|
736
|
+
d: "M66.35 40.76L68.24 39.85L69.7 38.82L70.9 37.7L71.93 36.51L72.82 35.25L73.61 33.92L74.31 32.52L74.95 31.06L75.54 29.53L76.09 27.94L76.63 26.3L77.15 24.6L77.67 22.84L78.18 21.02L78.67 19.13L79 17L79 17L77.21 17.74L75.57 18.66L74 19.68L72.49 20.78L71.05 21.95L69.67 23.2L68.36 24.51L67.15 25.89L66.03 27.33L65.01 28.84L64.12 30.42L63.37 32.06L62.78 33.75L62.37 35.51L62.2 37.33L62.38 39.24Z",
|
|
737
|
+
col: "#E8B54E",
|
|
738
|
+
mat: null
|
|
739
|
+
},
|
|
706
740
|
{
|
|
707
|
-
|
|
741
|
+
d: "M60.3 51.93L60.46 50.41L60.68 48.87L60.96 47.32L61.31 45.77L61.7 44.22L62.16 42.67L62.67 41.11L63.23 39.57L63.85 38.02L64.52 36.48L65.24 34.95L66 33.43L66.82 31.92L67.68 30.42L68.58 28.93L69.53 27.46L70.52 26.01L71.55 24.58L72.62 23.17L73.72 21.79L74.87 20.43L76.04 19.1A0.7 0.7 0 0 1 77.09 20.02L75.93 21.34L74.81 22.67L73.72 24.03L72.67 25.42L71.66 26.82L70.69 28.24L69.77 29.68L68.88 31.13L68.04 32.6L67.25 34.07L66.5 35.56L65.8 37.06L65.14 38.56L64.54 40.06L63.99 41.57L63.5 43.08L63.05 44.59L62.67 46.1L62.34 47.6L62.06 49.09L61.85 50.58L61.7 52.07A0.7 0.7 0 0 1 60.3 51.93Z",
|
|
742
|
+
col: "#5B3E33",
|
|
743
|
+
mat: null
|
|
708
744
|
}
|
|
709
745
|
],
|
|
710
|
-
|
|
746
|
+
deco: [],
|
|
747
|
+
anim: {
|
|
748
|
+
type: "sway",
|
|
749
|
+
px: 61,
|
|
750
|
+
py: 52
|
|
751
|
+
},
|
|
711
752
|
fid: {
|
|
712
|
-
k: "
|
|
753
|
+
k: "sway",
|
|
713
754
|
px: 60,
|
|
714
|
-
py:
|
|
755
|
+
py: 48
|
|
715
756
|
}
|
|
716
757
|
}
|
|
717
758
|
};
|
|
@@ -17,7 +17,7 @@ export declare function lookIssues(look: Look, { isWally, others }: {
|
|
|
17
17
|
}): LookIssue[];
|
|
18
18
|
/**
|
|
19
19
|
* A first look for an agent without a preset, the same on every client for the same uid.
|
|
20
|
-
* `others`: the
|
|
20
|
+
* `others`: the presets until looks can be stored (B3), then the tenant's stored looks.
|
|
21
21
|
* `propPool`: no prop by default (P10), since a custom agent's job is not known.
|
|
22
22
|
*/
|
|
23
23
|
export declare function defaultLook(agentId: string, others?: readonly Look[], propPool?: readonly AgentPropId[]): AgentLook;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mix } from "./color.js";
|
|
2
2
|
import { HARD, TONE } from "./data.gen.js";
|
|
3
3
|
import { geom } from "./geom.js";
|
|
4
|
-
import { ell, polar, qpts, r2, rotRect, rr, tube } from "./paths.js";
|
|
4
|
+
import { cpts, ell, polar, poly, qpts, r2, rotRect, rr, tube } from "./paths.js";
|
|
5
5
|
const PROP_FID = {
|
|
6
6
|
antennae: 'twitch',
|
|
7
7
|
dish: 'scan',
|
|
@@ -12,6 +12,7 @@ const PROP_FID = {
|
|
|
12
12
|
headlamp: 'flicker',
|
|
13
13
|
windkey: 'spin',
|
|
14
14
|
monocle: 'slip',
|
|
15
|
+
quill: 'sway',
|
|
15
16
|
seam: 'none',
|
|
16
17
|
plaster: 'none'
|
|
17
18
|
};
|
|
@@ -278,6 +279,55 @@ function propDef(kind, S, col) {
|
|
|
278
279
|
};
|
|
279
280
|
break;
|
|
280
281
|
}
|
|
282
|
+
case 'quill':
|
|
283
|
+
{
|
|
284
|
+
const q = cpts([
|
|
285
|
+
tx + 1,
|
|
286
|
+
ty + 7
|
|
287
|
+
], [
|
|
288
|
+
tx + 2,
|
|
289
|
+
ty - 5
|
|
290
|
+
], [
|
|
291
|
+
tx + 9,
|
|
292
|
+
ty - 18
|
|
293
|
+
], [
|
|
294
|
+
tx + 19,
|
|
295
|
+
ty - 28
|
|
296
|
+
], 24);
|
|
297
|
+
const n = q.length - 1;
|
|
298
|
+
const A = [];
|
|
299
|
+
const Z = [];
|
|
300
|
+
for(let i = 0; i <= n; i++){
|
|
301
|
+
const u = (i / n - 0.3) / 0.7;
|
|
302
|
+
if (u < 0) continue;
|
|
303
|
+
const a = q[Math.max(0, i - 1)];
|
|
304
|
+
const b = q[Math.min(n, i + 1)];
|
|
305
|
+
const p = q[i];
|
|
306
|
+
const l = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1;
|
|
307
|
+
const nx = -(b[1] - a[1]) / l;
|
|
308
|
+
const ny = (b[0] - a[0]) / l;
|
|
309
|
+
const w = Math.sin(Math.PI * u ** 0.72) ** 0.8;
|
|
310
|
+
A.push([
|
|
311
|
+
p[0] + nx * w * 6.2,
|
|
312
|
+
p[1] + ny * w * 6.2
|
|
313
|
+
]);
|
|
314
|
+
Z.push([
|
|
315
|
+
p[0] - nx * w * 3.8,
|
|
316
|
+
p[1] - ny * w * 3.8
|
|
317
|
+
]);
|
|
318
|
+
}
|
|
319
|
+
add(poly([
|
|
320
|
+
...A,
|
|
321
|
+
...Z.reverse()
|
|
322
|
+
]), 'honey');
|
|
323
|
+
add(tube(q.slice(0, Math.round(0.97 * n)), 1.4), 'cocoa');
|
|
324
|
+
anim = {
|
|
325
|
+
type: 'sway',
|
|
326
|
+
px: tx + 1,
|
|
327
|
+
py: ty + 7
|
|
328
|
+
};
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
281
331
|
default:
|
|
282
332
|
break;
|
|
283
333
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.12.
|
|
3
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"version": "4.12.4",
|
|
3
|
+
"generatedAt": "2026-11-11T10:14:21.672Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { Text } from '@wallarm-org/design-system/Text';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Cast = () => (\n <HStack gap={24} align='end'>\n {CAST.map(p => (\n <VStack key={p.id} gap={8} align='center'>\n <AgentAvatar data-testid={`agent-avatar-${p.id}`} agent={p.id} seed={p.id} size={72} />\n <Text size='sm'>{p.name}</Text>\n </VStack>\n ))}\n </HStack>\n);",
|
|
511
511
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
512
512
|
"storyTitle": "AI/AgentAvatar",
|
|
513
|
-
"description": "The
|
|
513
|
+
"description": "The cast on duty at the team-card size. Each is told apart by its shape, colour and prop."
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
"name": "States",
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
530
|
"name": "PartialCoverage",
|
|
531
|
-
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { HStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const PartialCoverage = () => (\n <HStack gap={24}>\n {CAST.filter(p => p.id === 'radar' || p.id === 'sift' || p.id === '
|
|
531
|
+
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { HStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const PartialCoverage = () => (\n <HStack gap={24}>\n {CAST.filter(p => p.id === 'radar' || p.id === 'sift' || p.id === 'acquit').map(p => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-partial-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n hasApplications\n coverage='partial'\n />\n ))}\n </HStack>\n);",
|
|
532
532
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
533
533
|
"storyTitle": "AI/AgentAvatar",
|
|
534
534
|
"description": "Partial coverage: the agent covers only some of its applications, so the top of its head stays in grey felt."
|
|
@@ -563,14 +563,14 @@
|
|
|
563
563
|
},
|
|
564
564
|
{
|
|
565
565
|
"name": "Inviting",
|
|
566
|
-
"code": "import { useRef } from 'react';\nimport { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Inviting = () => {\n const cue = useRef<HTMLButtonElement>(null);\n return (\n <VStack gap={24} align='center'>\n <HStack gap={24}>\n <AgentAvatar\n data-testid='agent-avatar-invite-
|
|
566
|
+
"code": "import { useRef } from 'react';\nimport { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Inviting = () => {\n const cue = useRef<HTMLButtonElement>(null);\n return (\n <VStack gap={24} align='center'>\n <HStack gap={24}>\n <AgentAvatar\n data-testid='agent-avatar-invite-acquit'\n agent='acquit'\n seed='acquit'\n size={72}\n state='invite'\n live\n cueRef={cue}\n />\n <AgentAvatar\n data-testid='agent-avatar-invite-sift'\n agent='sift'\n seed='sift'\n size={72}\n state='invite'\n live\n cueRef={cue}\n />\n </HStack>\n <Button ref={cue} data-testid='agent-avatar-invite-setup' size='small'>\n Set up\n </Button>\n </VStack>\n );\n};",
|
|
567
567
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
568
568
|
"storyTitle": "AI/AgentAvatar",
|
|
569
569
|
"description": "Not set up, inviting: one agent on the page invites at a time, glancing at Set up; hover or focus on it and the\n agent turns to it."
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
"name": "Activation",
|
|
573
|
-
"code": "import { useState } from 'react';\nimport { AgentAvatar, type AgentAvatarState } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Activation = () => {\n const [state, setState] = useState<AgentAvatarState>('box');\n const toggle = () => setState(state === 'box' ? 'idle' : 'box');\n return (\n <VStack gap={16} align='center'>\n <AgentAvatar\n data-testid='agent-avatar-activation'\n agent='
|
|
573
|
+
"code": "import { useState } from 'react';\nimport { AgentAvatar, type AgentAvatarState } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Activation = () => {\n const [state, setState] = useState<AgentAvatarState>('box');\n const toggle = () => setState(state === 'box' ? 'idle' : 'box');\n return (\n <VStack gap={16} align='center'>\n <AgentAvatar\n data-testid='agent-avatar-activation'\n agent='bard'\n seed='bard'\n size={120}\n shadow\n live\n state={state}\n />\n <Button data-testid='agent-avatar-activation-toggle' size='small' onClick={toggle}>\n {state === 'box' ? 'Activate' : 'Reset'}\n </Button>\n </VStack>\n );\n};",
|
|
574
574
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
575
575
|
"storyTitle": "AI/AgentAvatar",
|
|
576
576
|
"description": "Activate: from Not set up the ghost lands, the colour fills from the floor and the eyes power on (1.15 s)."
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
"code": "import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { Text } from '@wallarm-org/design-system/Text';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Cast = () => (\n <VStack gap={12}>\n <HStack gap={16}>\n {CAST.map(p => (\n <span key={p.id} className='sb-annotation w-64'>\n {p.name.toLowerCase()}\n </span>\n ))}\n </HStack>\n {STATES.map(state => (\n <HStack key={state} gap={16} align='center'>\n <span className='w-120'>\n <Text size='sm'>{STATE_LABELS[state]}</Text>\n </span>\n {CAST.map(p => (\n <span key={p.id} className='w-64'>\n <AgentGlyph\n data-testid={`agent-glyph-${p.id}-${state}`}\n agent={p.id}\n size={20}\n state={state}\n align='box'\n />\n </span>\n ))}\n </HStack>\n ))}\n </VStack>\n);",
|
|
713
713
|
"storyFile": "AgentGlyph/AgentGlyph.stories.tsx",
|
|
714
714
|
"storyTitle": "AI/AgentGlyph",
|
|
715
|
-
"description": "The
|
|
715
|
+
"description": "The cast in every state frame, at 20 px. Colour and eyes carry the state; red and crosses never appear."
|
|
716
716
|
},
|
|
717
717
|
{
|
|
718
718
|
"name": "Sizes",
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
},
|
|
731
731
|
{
|
|
732
732
|
"name": "PartialCoverage",
|
|
733
|
-
"code": "import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { Text } from '@wallarm-org/design-system/Text';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const PartialCoverage = () => (\n <HStack gap={24}>\n {CAST.filter(p => p.id === 'radar' || p.id === 'sift' || p.id === '
|
|
733
|
+
"code": "import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { Text } from '@wallarm-org/design-system/Text';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const PartialCoverage = () => (\n <HStack gap={24}>\n {CAST.filter(p => p.id === 'radar' || p.id === 'sift' || p.id === 'acquit').map(p => (\n <VStack key={p.id} gap={8} align='center'>\n <AgentGlyph\n data-testid={`agent-glyph-partial-${p.id}`}\n agent={p.id}\n size={32}\n hasApplications\n coverage='partial'\n align='box'\n />\n <Text size='sm'>{p.name}</Text>\n </VStack>\n ))}\n </HStack>\n);",
|
|
734
734
|
"storyFile": "AgentGlyph/AgentGlyph.stories.tsx",
|
|
735
735
|
"storyTitle": "AI/AgentGlyph",
|
|
736
736
|
"description": "Partial coverage: an agent whose template has applications, covering only some of them, shows a grey crown while on duty."
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
},
|
|
747
747
|
{
|
|
748
748
|
"name": "AgentLookBuilder",
|
|
749
|
-
"description": "The builder entry: everything a product needs to let admins pick an agent’s look. It holds the kit with display names (`AGENT_SHAPES`, `AGENT_COLORS`, `AGENT_EYES`, `AGENT_PROPS`), `lookIssues` for the combinations to avoid and `defaultLook` for a first look. `enableAgentLookLibrary()` loads the full prop library. Any app that renders stored custom looks calls it once at start-up — the cards, rows and tables that show them, not only the picker. Without it `AgentAvatar` and `AgentGlyph` draw only the
|
|
749
|
+
"description": "The builder entry: everything a product needs to let admins pick an agent’s look. It holds the kit with display names (`AGENT_SHAPES`, `AGENT_COLORS`, `AGENT_EYES`, `AGENT_PROPS`), `lookIssues` for the combinations to avoid and `defaultLook` for a first look. `enableAgentLookLibrary()` loads the full prop library. Any app that renders stored custom looks calls it once at start-up — the cards, rows and tables that show them, not only the picker. Without it `AgentAvatar` and `AgentGlyph` draw only the presets’ props, and any other prop is left out with a warning in development. Mounted glyphs pick it up on their next render; a mounted 3D character keeps what it drew until its look changes or it remounts, so call it before the first render. It ships no picker UI; the stories build one from DS `Select`s. `lookIssues` only warns, never blocks; coral is Wally’s and is not offered.",
|
|
750
750
|
"importPath": "@wallarm-org/design-system/AgentLookBuilder",
|
|
751
751
|
"props": [],
|
|
752
752
|
"variants": [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.12.
|
|
2
|
+
"version": "4.12.4",
|
|
3
3
|
"rules": "Every numeric utility is in px, not 4px steps: p-16 is 16px, p-4 is 4px. Translate Tailwind habits (p-4 → p-16, gap-6 → gap-24, w-64 → w-256).\n\nBefore composing a screen, call get_guideline for the pattern (app shell, list page, table, drawer, form, dialog, filters, empty state, settings, auth). Wrong → right:\n\n- p-5, gap-3, p-10 → stay on the scale: 1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 40, 48, 64…\n- space-y-4, margins per child → <VStack gap={16}>, <HStack gap={8}>\n- Padded page wrapper → PageHeader / PageToolbar / PageContent own the 24px gutter\n- p-* on Card, DrawerBody, DialogBody, PageToolbar, Table → none; they own their padding\n- className on Text, Heading, Field, Drawer/Dialog Header/Body/Footer → wrap in your own element\n- Raw <h1>, <p>, <label> → <Heading as=\"h2\" size=\"lg\">, <Text size=\"sm\">, Field\n- <Text> default (16px) for body → size=\"sm\"\n- leading-none (0px), leading-5 (5px) → leading-sm, leading-20\n- weight=\"semibold\" → weight is light|regular|medium|bold (medium = 450)\n- bg-primary, text-muted, bg-card, bg-white → bg-bg-primary, text-text-secondary, bg-bg-surface-1\n- text-error, bg-red-500 → danger tokens; categorical color → Badge color\n- dark: variant, setting data-theme → semantic tokens, useTheme().setTheme()\n- rounded-lg, rounded, rounded-[15px] → rounded-8 (controls), rounded-12 (panels)\n- shadow-* on DS components, z-* on overlays → never; they own both\n- focus:ring → focus-visible:ring-3 ring-focus-primary outline-none\n- size, DIALOG/DRAWER_SIZES → width: Dialog 400 confirm, 560 default, 960 picker; Drawer 640 default, 700 Timeline form\n- Dialog, useToast from the root → @wallarm-org/design-system/Dialog, /Toast\n- Field invalid → error on the control + FieldError\n- Table actions column → meta.renderMenuAction on the master column\n- Hand-built side menu → RemoteShell config={NavConfig}\n- ConfirmDialog, FilterBar, Combobox → compose Dialog parts, PageToolbar + FilterDropdown, Select + useSelectSearch\n- data-slot in tests → data-testid\n",
|
|
4
4
|
"guidelines": [
|
|
5
5
|
{
|