@wallarm-org/design-system 4.17.0 → 4.18.0-rc-feat-WDS-208.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/dist/components/AgentLookBuilder/kit.d.ts +1 -1
- package/dist/lib/agent-characters/data.gen.d.ts +5 -3
- package/dist/lib/agent-characters/data.gen.js +151 -32
- package/dist/lib/agent-characters/engine.js +4 -0
- package/dist/lib/agent-characters/look.js +2 -1
- package/dist/lib/agent-characters/motion.js +56 -1
- package/dist/lib/agent-characters/props.js +70 -1
- package/dist/metadata/components.json +24 -31
- package/dist/metadata/guidelines.json +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
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 (18 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
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.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type AgentShapeId = 'dome' | 'gumdrop' | 'cushion' | 'pebble' | 'capsule' | 'cloud' | 'egg' | 'mochi' | 'kettle' | 'mug' | 'padlock' | 'safe';
|
|
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';
|
|
2
|
+
export type AgentColorId = 'coral' | 'cobalt' | 'sky' | 'cyan' | 'lilac' | 'heather' | 'pink' | 'crimson' | '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' | 'quill' | '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' | 'flag' | 'bolt' | 'none';
|
|
5
|
+
export type AgentCharacterId = 'wally' | 'radar' | 'sift' | 'trim' | 'tune' | 'lens' | 'bard' | 'replay' | 'patch' | 'seek';
|
|
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 {
|
|
@@ -18,6 +18,8 @@ export interface AgentPreset extends Omit<AgentLook, 'v'> {
|
|
|
18
18
|
name: string;
|
|
19
19
|
role: string;
|
|
20
20
|
templateId: string | null;
|
|
21
|
+
/** Planned, not live yet: show «· planned» after the role. */
|
|
22
|
+
planned: boolean;
|
|
21
23
|
}
|
|
22
24
|
export interface AgentShapeDef {
|
|
23
25
|
id: AgentShapeId;
|
|
@@ -20,6 +20,7 @@ const COLOR_IDS = [
|
|
|
20
20
|
"lilac",
|
|
21
21
|
"heather",
|
|
22
22
|
"pink",
|
|
23
|
+
"crimson",
|
|
23
24
|
"sand",
|
|
24
25
|
"toffee",
|
|
25
26
|
"powder",
|
|
@@ -59,6 +60,8 @@ const PROP_IDS = [
|
|
|
59
60
|
"windkey",
|
|
60
61
|
"monocle",
|
|
61
62
|
"quill",
|
|
63
|
+
"flag",
|
|
64
|
+
"bolt",
|
|
62
65
|
"none"
|
|
63
66
|
];
|
|
64
67
|
const SHAPES = [
|
|
@@ -294,6 +297,12 @@ const COLORS = [
|
|
|
294
297
|
hex: "#E373A8",
|
|
295
298
|
g: "warm"
|
|
296
299
|
},
|
|
300
|
+
{
|
|
301
|
+
id: "crimson",
|
|
302
|
+
name: "crimson",
|
|
303
|
+
hex: "#D42A45",
|
|
304
|
+
g: "warm"
|
|
305
|
+
},
|
|
297
306
|
{
|
|
298
307
|
id: "sand",
|
|
299
308
|
name: "sand",
|
|
@@ -502,6 +511,14 @@ const PROPS = [
|
|
|
502
511
|
"quill",
|
|
503
512
|
"Quill"
|
|
504
513
|
],
|
|
514
|
+
[
|
|
515
|
+
"flag",
|
|
516
|
+
"Red flag"
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
"bolt",
|
|
520
|
+
"Lightning"
|
|
521
|
+
],
|
|
505
522
|
[
|
|
506
523
|
"none",
|
|
507
524
|
"No prop"
|
|
@@ -515,14 +532,17 @@ const GLYPH_PROPS = new Set([
|
|
|
515
532
|
"pennant",
|
|
516
533
|
"sprout",
|
|
517
534
|
"windkey",
|
|
518
|
-
"quill"
|
|
535
|
+
"quill",
|
|
536
|
+
"flag",
|
|
537
|
+
"bolt"
|
|
519
538
|
]);
|
|
520
539
|
const CAST = [
|
|
521
540
|
{
|
|
522
541
|
id: "wally",
|
|
523
542
|
name: "Wally",
|
|
524
|
-
role: "Assistant",
|
|
543
|
+
role: "In-Product Assistant",
|
|
525
544
|
templateId: null,
|
|
545
|
+
planned: false,
|
|
526
546
|
shape: "dome",
|
|
527
547
|
color: "coral",
|
|
528
548
|
eyes: "oval",
|
|
@@ -531,8 +551,9 @@ const CAST = [
|
|
|
531
551
|
{
|
|
532
552
|
id: "radar",
|
|
533
553
|
name: "Radar",
|
|
534
|
-
role: "
|
|
554
|
+
role: "Anomaly Investigation Agent",
|
|
535
555
|
templateId: "attack-anomaly-investigation",
|
|
556
|
+
planned: false,
|
|
536
557
|
shape: "gumdrop",
|
|
537
558
|
color: "cobalt",
|
|
538
559
|
eyes: "tall",
|
|
@@ -541,38 +562,42 @@ const CAST = [
|
|
|
541
562
|
{
|
|
542
563
|
id: "sift",
|
|
543
564
|
name: "Sift",
|
|
544
|
-
role: "False
|
|
565
|
+
role: "False Positive Analyzer",
|
|
545
566
|
templateId: "fp-marking",
|
|
567
|
+
planned: false,
|
|
546
568
|
shape: "cushion",
|
|
547
569
|
color: "lilac",
|
|
548
570
|
eyes: "round",
|
|
549
571
|
prop: "glasses"
|
|
550
572
|
},
|
|
551
|
-
{
|
|
552
|
-
id: "acquit",
|
|
553
|
-
name: "Acquit",
|
|
554
|
-
role: "False Positive Resolver",
|
|
555
|
-
templateId: "fp-resolver",
|
|
556
|
-
shape: "pebble",
|
|
557
|
-
color: "sand",
|
|
558
|
-
eyes: "sleepy",
|
|
559
|
-
prop: "seam"
|
|
560
|
-
},
|
|
561
573
|
{
|
|
562
574
|
id: "trim",
|
|
563
575
|
name: "Trim",
|
|
564
|
-
role: "Ruleset
|
|
576
|
+
role: "Ruleset Optimization",
|
|
565
577
|
templateId: "ruleset-optimizer",
|
|
578
|
+
planned: false,
|
|
566
579
|
shape: "capsule",
|
|
567
580
|
color: "cyan",
|
|
568
581
|
eyes: "oval",
|
|
569
582
|
prop: "windkey"
|
|
570
583
|
},
|
|
584
|
+
{
|
|
585
|
+
id: "tune",
|
|
586
|
+
name: "Tune",
|
|
587
|
+
role: "Policy Tuning Agent",
|
|
588
|
+
templateId: null,
|
|
589
|
+
planned: false,
|
|
590
|
+
shape: "safe",
|
|
591
|
+
color: "butter",
|
|
592
|
+
eyes: "oval",
|
|
593
|
+
prop: "none"
|
|
594
|
+
},
|
|
571
595
|
{
|
|
572
596
|
id: "lens",
|
|
573
597
|
name: "Lens",
|
|
574
|
-
role: "API Posture
|
|
598
|
+
role: "API Posture Review Agent",
|
|
575
599
|
templateId: null,
|
|
600
|
+
planned: false,
|
|
576
601
|
shape: "mochi",
|
|
577
602
|
color: "mint",
|
|
578
603
|
eyes: "tall",
|
|
@@ -581,12 +606,46 @@ const CAST = [
|
|
|
581
606
|
{
|
|
582
607
|
id: "bard",
|
|
583
608
|
name: "Bard",
|
|
584
|
-
role: "Security Posture
|
|
609
|
+
role: "Security Posture Briefing Agent",
|
|
585
610
|
templateId: null,
|
|
611
|
+
planned: false,
|
|
586
612
|
shape: "cloud",
|
|
587
613
|
color: "powder",
|
|
588
614
|
eyes: "oval",
|
|
589
615
|
prop: "quill"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
id: "replay",
|
|
619
|
+
name: "Replay",
|
|
620
|
+
role: "Attack Rechecker",
|
|
621
|
+
templateId: null,
|
|
622
|
+
planned: true,
|
|
623
|
+
shape: "pebble",
|
|
624
|
+
color: "petrol",
|
|
625
|
+
eyes: "tall",
|
|
626
|
+
prop: "bolt"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: "patch",
|
|
630
|
+
name: "Patch",
|
|
631
|
+
role: "Virtual Patch Agent",
|
|
632
|
+
templateId: null,
|
|
633
|
+
planned: true,
|
|
634
|
+
shape: "pebble",
|
|
635
|
+
color: "oat",
|
|
636
|
+
eyes: "sleepy",
|
|
637
|
+
prop: "plaster"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
id: "seek",
|
|
641
|
+
name: "Seek",
|
|
642
|
+
role: "Red Team Agent",
|
|
643
|
+
templateId: null,
|
|
644
|
+
planned: true,
|
|
645
|
+
shape: "egg",
|
|
646
|
+
color: "graphite",
|
|
647
|
+
eyes: "sleepy",
|
|
648
|
+
prop: "flag"
|
|
590
649
|
}
|
|
591
650
|
];
|
|
592
651
|
const PRESET_PROPS = {
|
|
@@ -660,21 +719,6 @@ const PRESET_PROPS = {
|
|
|
660
719
|
py: 27.5
|
|
661
720
|
}
|
|
662
721
|
},
|
|
663
|
-
"pebble|#D8B68A|seam": {
|
|
664
|
-
layers: [],
|
|
665
|
-
deco: [
|
|
666
|
-
{
|
|
667
|
-
clip: true,
|
|
668
|
-
s: "<path d=\"M26.5 57Q60 47 93.5 57\" stroke=\"#877258\" stroke-width=\"1.3\" fill=\"none\"/><path class=\"stitch\" d=\"M26.5 57Q60 47 93.5 57\" stroke=\"#F4EEE4\" stroke-width=\"3.4\" stroke-dasharray=\"1.6 4.4\" stroke-linecap=\"round\" fill=\"none\"/>"
|
|
669
|
-
}
|
|
670
|
-
],
|
|
671
|
-
anim: null,
|
|
672
|
-
fid: {
|
|
673
|
-
k: "none",
|
|
674
|
-
px: 60,
|
|
675
|
-
py: 40
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
722
|
"capsule|#2BA6BF|windkey": {
|
|
679
723
|
layers: [
|
|
680
724
|
{
|
|
@@ -700,6 +744,16 @@ const PRESET_PROPS = {
|
|
|
700
744
|
py: 10
|
|
701
745
|
}
|
|
702
746
|
},
|
|
747
|
+
"safe|#F2D57E|none": {
|
|
748
|
+
layers: [],
|
|
749
|
+
deco: [],
|
|
750
|
+
anim: null,
|
|
751
|
+
fid: {
|
|
752
|
+
k: "bob",
|
|
753
|
+
px: 60,
|
|
754
|
+
py: 30
|
|
755
|
+
}
|
|
756
|
+
},
|
|
703
757
|
"mochi|#A8DCC8|periscope": {
|
|
704
758
|
layers: [
|
|
705
759
|
{
|
|
@@ -754,6 +808,71 @@ const PRESET_PROPS = {
|
|
|
754
808
|
px: 60,
|
|
755
809
|
py: 48
|
|
756
810
|
}
|
|
811
|
+
},
|
|
812
|
+
"pebble|#2D6E8E|bolt": {
|
|
813
|
+
layers: [
|
|
814
|
+
{
|
|
815
|
+
d: "M69.78 13.36L50.14 28.82L64.23 31.81L60 44L79.64 28.55L65.56 25.55Z",
|
|
816
|
+
col: "#F6C12C",
|
|
817
|
+
mat: "vinyl"
|
|
818
|
+
}
|
|
819
|
+
],
|
|
820
|
+
deco: [],
|
|
821
|
+
anim: {
|
|
822
|
+
type: "zap",
|
|
823
|
+
px: 60,
|
|
824
|
+
py: 44
|
|
825
|
+
},
|
|
826
|
+
fid: {
|
|
827
|
+
k: "zap",
|
|
828
|
+
px: 60,
|
|
829
|
+
py: 44
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
"pebble|#E9E0D0|plaster": {
|
|
833
|
+
layers: [
|
|
834
|
+
{
|
|
835
|
+
d: "M34.09 58.28L50.47 46.81L53.91 51.72L37.53 63.19ZM37.53 46.81L53.91 58.28L50.47 63.19L34.09 51.72Z",
|
|
836
|
+
col: "#E9D2B5",
|
|
837
|
+
mat: null
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
deco: [
|
|
841
|
+
{
|
|
842
|
+
s: "<g fill=\"#B79C7D\" opacity=\".7\"><circle cx=\"42.5\" cy=\"55\" r=\".7\"/><circle cx=\"45.5\" cy=\"55\" r=\".7\"/><circle cx=\"44\" cy=\"53.5\" r=\".7\"/><circle cx=\"44\" cy=\"56.5\" r=\".7\"/></g>"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
anim: null,
|
|
846
|
+
fid: {
|
|
847
|
+
k: "none",
|
|
848
|
+
px: 60,
|
|
849
|
+
py: 40
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"egg|#4C5463|flag": {
|
|
853
|
+
layers: [
|
|
854
|
+
{
|
|
855
|
+
d: "M62.01 24.89L65.01 -1.11A1 1 0 0 1 66.99 -0.89L63.99 25.11A1 1 0 0 1 62.01 24.89Z",
|
|
856
|
+
col: "#262A36",
|
|
857
|
+
mat: "vinyl"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
d: "M66 -1L83 4L66 10Z",
|
|
861
|
+
col: "#E5484D",
|
|
862
|
+
mat: null
|
|
863
|
+
}
|
|
864
|
+
],
|
|
865
|
+
deco: [],
|
|
866
|
+
anim: {
|
|
867
|
+
type: "wave",
|
|
868
|
+
px: 66,
|
|
869
|
+
py: 5
|
|
870
|
+
},
|
|
871
|
+
fid: {
|
|
872
|
+
k: "flutter",
|
|
873
|
+
px: 63,
|
|
874
|
+
py: 25
|
|
875
|
+
}
|
|
757
876
|
}
|
|
758
877
|
};
|
|
759
878
|
const STATES = [
|
|
@@ -1158,6 +1158,10 @@ class Character {
|
|
|
1158
1158
|
else if ('wave' === a) ang = 9 * w * Math.sin(2 * t * Math.PI / 0.8);
|
|
1159
1159
|
else if ('wind' === a) ang = 0;
|
|
1160
1160
|
else if ('rock' === a) ang = 2.5 * w * Math.sin(2 * t * Math.PI / 2.4);
|
|
1161
|
+
else if ('zap' === a) {
|
|
1162
|
+
const ph = t % 1.3;
|
|
1163
|
+
ang = ph < 0.3 ? 6 * w * Math.sin(2 * ph * Math.PI / 0.1) * (1 - ph / 0.3) : 0;
|
|
1164
|
+
}
|
|
1161
1165
|
let sxk = 1;
|
|
1162
1166
|
let sk = 1;
|
|
1163
1167
|
if ('wind' === a && w > 0.001) {
|
|
@@ -21,7 +21,8 @@ const BLUE = new Set([
|
|
|
21
21
|
function lookIssues(look, { isWally, others }) {
|
|
22
22
|
const out = [];
|
|
23
23
|
if ('coral' === look.color && !isWally) out.push('coral-not-wally');
|
|
24
|
-
|
|
24
|
+
const inCast = CAST.some((k)=>k.shape === look.shape && k.color === look.color && k.prop === look.prop);
|
|
25
|
+
if (!inCast && ('cloud' === look.shape && BLUE.has(look.color) && 'beanie' === look.prop || 'butter' === look.color && ('glasses' === look.prop || 'monocle' === look.prop) || ('mint' === look.color || 'sage' === look.color) && ('pebble' === look.shape || 'capsule' === look.shape || 'egg' === look.shape))) out.push('dots-look-alike');
|
|
25
26
|
if (!isWally && 'dome' === look.shape && 'antennae' === look.prop) out.push('reads-as-wally');
|
|
26
27
|
for (const o of others){
|
|
27
28
|
if (o.shape === look.shape && o.color === look.color) out.push('glyph-twin');
|
|
@@ -331,6 +331,14 @@ const HELLO_PROP = {
|
|
|
331
331
|
pb: 0
|
|
332
332
|
})
|
|
333
333
|
],
|
|
334
|
+
zap: osc('pa', 250, [
|
|
335
|
+
12,
|
|
336
|
+
-12,
|
|
337
|
+
10,
|
|
338
|
+
-9,
|
|
339
|
+
7,
|
|
340
|
+
-4
|
|
341
|
+
], 200, 1300),
|
|
334
342
|
bob: [
|
|
335
343
|
kx(0, {
|
|
336
344
|
pb: 0
|
|
@@ -503,6 +511,52 @@ const FIDDLE = {
|
|
|
503
511
|
pw: 720
|
|
504
512
|
}, E_INOUT)
|
|
505
513
|
],
|
|
514
|
+
zap: [
|
|
515
|
+
kx(0, {
|
|
516
|
+
pa: 0,
|
|
517
|
+
pb: 0
|
|
518
|
+
}),
|
|
519
|
+
kx(50, {
|
|
520
|
+
pa: 8,
|
|
521
|
+
pb: -1.4
|
|
522
|
+
}, E_LIN),
|
|
523
|
+
kx(100, {
|
|
524
|
+
pa: -7,
|
|
525
|
+
pb: 0
|
|
526
|
+
}, E_LIN),
|
|
527
|
+
kx(150, {
|
|
528
|
+
pa: 6,
|
|
529
|
+
pb: -1
|
|
530
|
+
}, E_LIN),
|
|
531
|
+
kx(200, {
|
|
532
|
+
pa: -4,
|
|
533
|
+
pb: 0
|
|
534
|
+
}, E_LIN),
|
|
535
|
+
kx(260, {
|
|
536
|
+
pa: 0,
|
|
537
|
+
pb: 0
|
|
538
|
+
}, E_LIN),
|
|
539
|
+
kx(700, {
|
|
540
|
+
pa: 0,
|
|
541
|
+
pb: 0
|
|
542
|
+
}),
|
|
543
|
+
kx(750, {
|
|
544
|
+
pa: 7,
|
|
545
|
+
pb: -1.4
|
|
546
|
+
}, E_LIN),
|
|
547
|
+
kx(800, {
|
|
548
|
+
pa: -6,
|
|
549
|
+
pb: 0
|
|
550
|
+
}, E_LIN),
|
|
551
|
+
kx(860, {
|
|
552
|
+
pa: 3,
|
|
553
|
+
pb: 0
|
|
554
|
+
}, E_LIN),
|
|
555
|
+
kx(950, {
|
|
556
|
+
pa: 0,
|
|
557
|
+
pb: 0
|
|
558
|
+
}, E_SETTLE)
|
|
559
|
+
],
|
|
506
560
|
slip: [
|
|
507
561
|
kx(0, {
|
|
508
562
|
pb: 0,
|
|
@@ -551,7 +605,8 @@ const FIDDLE = {
|
|
|
551
605
|
const FAST = new Set([
|
|
552
606
|
'twitch',
|
|
553
607
|
'flutter',
|
|
554
|
-
'flicker'
|
|
608
|
+
'flicker',
|
|
609
|
+
'zap'
|
|
555
610
|
]);
|
|
556
611
|
const ACTS = {
|
|
557
612
|
bored: ()=>[
|
|
@@ -14,7 +14,9 @@ const PROP_FID = {
|
|
|
14
14
|
monocle: 'slip',
|
|
15
15
|
quill: 'sway',
|
|
16
16
|
seam: 'none',
|
|
17
|
-
plaster: 'none'
|
|
17
|
+
plaster: 'none',
|
|
18
|
+
flag: 'flutter',
|
|
19
|
+
bolt: 'zap'
|
|
18
20
|
};
|
|
19
21
|
const fidKind = (p)=>PROP_FID[p] || 'bob';
|
|
20
22
|
function propDef(kind, S, col) {
|
|
@@ -328,6 +330,69 @@ function propDef(kind, S, col) {
|
|
|
328
330
|
};
|
|
329
331
|
break;
|
|
330
332
|
}
|
|
333
|
+
case 'flag':
|
|
334
|
+
add(tube([
|
|
335
|
+
[
|
|
336
|
+
tx + 3,
|
|
337
|
+
ty + 5
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
tx + 6,
|
|
341
|
+
ty - 21
|
|
342
|
+
]
|
|
343
|
+
], 2), 'ink');
|
|
344
|
+
add(`M${tx + 6} ${ty - 21}L${tx + 23} ${ty - 16}L${tx + 6} ${ty - 10}Z`, '#E5484D');
|
|
345
|
+
anim = {
|
|
346
|
+
type: 'wave',
|
|
347
|
+
px: tx + 6,
|
|
348
|
+
py: ty - 15
|
|
349
|
+
};
|
|
350
|
+
break;
|
|
351
|
+
case 'bolt':
|
|
352
|
+
{
|
|
353
|
+
const k = 1.6;
|
|
354
|
+
const th = 12 * Math.PI / 180;
|
|
355
|
+
const c = Math.cos(th);
|
|
356
|
+
const s = Math.sin(th);
|
|
357
|
+
const bx = tx;
|
|
358
|
+
const by = ty + 4;
|
|
359
|
+
const pts = [
|
|
360
|
+
[
|
|
361
|
+
2,
|
|
362
|
+
-20
|
|
363
|
+
],
|
|
364
|
+
[
|
|
365
|
+
-8,
|
|
366
|
+
-8
|
|
367
|
+
],
|
|
368
|
+
[
|
|
369
|
+
1,
|
|
370
|
+
-8
|
|
371
|
+
],
|
|
372
|
+
[
|
|
373
|
+
0,
|
|
374
|
+
0
|
|
375
|
+
],
|
|
376
|
+
[
|
|
377
|
+
10,
|
|
378
|
+
-12
|
|
379
|
+
],
|
|
380
|
+
[
|
|
381
|
+
1,
|
|
382
|
+
-12
|
|
383
|
+
]
|
|
384
|
+
];
|
|
385
|
+
add(poly(pts.map(([x, y])=>[
|
|
386
|
+
bx + k * (x * c - y * s),
|
|
387
|
+
by + k * (x * s + y * c)
|
|
388
|
+
])), '#F6C12C', 'vinyl');
|
|
389
|
+
anim = {
|
|
390
|
+
type: 'zap',
|
|
391
|
+
px: bx,
|
|
392
|
+
py: by
|
|
393
|
+
};
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
331
396
|
default:
|
|
332
397
|
break;
|
|
333
398
|
}
|
|
@@ -364,6 +429,10 @@ function propDef(kind, S, col) {
|
|
|
364
429
|
spin: [
|
|
365
430
|
tx,
|
|
366
431
|
ty - 10
|
|
432
|
+
],
|
|
433
|
+
zap: [
|
|
434
|
+
tx,
|
|
435
|
+
ty + 4
|
|
367
436
|
]
|
|
368
437
|
};
|
|
369
438
|
const fp = FP[fk] || (anim && 'slip' === fk ? [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
3
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"version": "4.17.0",
|
|
3
|
+
"generatedAt": "2026-11-13T11:49:38.778Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -507,28 +507,21 @@
|
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
"name": "Cast",
|
|
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='
|
|
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='start' wrap='wrap'>\n {CAST.map(p => (\n <VStack key={p.id} gap={4} align='center' className='w-120 text-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 <Text size='xs' color='secondary'>\n {p.planned ? `${p.role} · planned` : p.role}\n </Text>\n </VStack>\n ))}\n </HStack>\n);",
|
|
511
511
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
512
512
|
"storyTitle": "AI/AgentAvatar",
|
|
513
|
-
"description": "The cast on duty at the team-card size. Each is told apart by its shape, colour and prop."
|
|
513
|
+
"description": "The cast of ten on duty at the team-card size. Each is told apart by its shape, colour and prop; a planned agent says so after its role."
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
"name": "States",
|
|
517
|
-
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport {
|
|
517
|
+
"code": "import { Fragment } from 'react';\nimport { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Text } from '@wallarm-org/design-system/Text';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const States = () => (\n <div className='grid grid-cols-[repeat(10,auto)] items-center gap-x-16 gap-y-8'>\n <span />\n {STATES.map(state => (\n <Text key={state} size='xs' color='secondary' align='center'>\n {STATE_LABELS[state]}\n </Text>\n ))}\n {CAST.map(p => (\n <Fragment key={p.id}>\n <Text size='sm'>{p.name}</Text>\n {STATES.map(state => (\n <AgentAvatar\n key={state}\n data-testid={`agent-avatar-${p.id}-${state}`}\n agent={p.id}\n seed={p.id}\n size={72}\n state={state}\n />\n ))}\n </Fragment>\n ))}\n </div>\n);",
|
|
518
518
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
519
519
|
"storyTitle": "AI/AgentAvatar",
|
|
520
|
-
"description": "Every state frame of
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
"name": "Places",
|
|
524
|
-
"code": "import { AgentAvatar, type AgentAvatarProps } from '@wallarm-org/design-system/AgentAvatar';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { PLACES } from '../../lib/agent-characters/places';\n\nexport const Places = () => (\n <HStack gap={32} align='end'>\n {Object.entries(PLACES)\n .filter(([, p]) => p.renderer === '3d')\n .map(([name, p]) => (\n <VStack key={name} gap={8} align='center'>\n <AgentAvatar\n data-testid={`agent-avatar-place-${name}`}\n agent='trim'\n seed='trim'\n size={p.size as AgentAvatarProps['size']}\n shadow={p.shadow}\n />\n </VStack>\n ))}\n </HStack>\n);",
|
|
525
|
-
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
526
|
-
"storyTitle": "AI/AgentAvatar",
|
|
527
|
-
"description": "Each place in the product with its size and shadow."
|
|
520
|
+
"description": "Every state frame of the cast. The eyes and a few body cues carry the state; red and crosses never appear."
|
|
528
521
|
},
|
|
529
522
|
{
|
|
530
523
|
"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.
|
|
524
|
+
"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} wrap='wrap'>\n {CAST.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
525
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
533
526
|
"storyTitle": "AI/AgentAvatar",
|
|
534
527
|
"description": "Partial coverage: the agent covers only some of its applications, so the top of its head stays in grey felt."
|
|
@@ -549,35 +542,35 @@
|
|
|
549
542
|
},
|
|
550
543
|
{
|
|
551
544
|
"name": "LiveStates",
|
|
552
|
-
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport {
|
|
545
|
+
"code": "import { Fragment } from 'react';\nimport { AgentAvatar, AgentAvatarGroup } from '@wallarm-org/design-system/AgentAvatar';\nimport { 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 LiveStates = () => (\n <AgentAvatarGroup>\n <div className='grid grid-cols-[repeat(8,auto)] items-center gap-x-16 gap-y-8'>\n <span />\n {LIVE_STATES.map(state => (\n <Text key={state} size='xs' color='secondary' align='center'>\n {STATE_LABELS[state]}\n </Text>\n ))}\n {CAST.map(p => (\n <Fragment key={p.id}>\n <VStack gap={0}>\n <Text size='sm'>{p.name}</Text>\n <Text size='xs' color='secondary'>\n {p.planned ? `${p.role} · planned` : p.role}\n </Text>\n </VStack>\n {LIVE_STATES.map(state => (\n <AgentAvatar\n key={state}\n data-testid={`agent-avatar-live-${p.id}-${state}`}\n agent={p.id}\n seed={`${p.id}-${state}`}\n size={72}\n state={state}\n live\n />\n ))}\n </Fragment>\n ))}\n </div>\n </AgentAvatarGroup>\n);",
|
|
553
546
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
554
547
|
"storyTitle": "AI/AgentAvatar",
|
|
555
|
-
"description": "Every persistent state, live. On duty plays its idle repertoire; Needs you is the only one that hops."
|
|
548
|
+
"description": "Every persistent state of the cast, live, in one group. On duty plays its idle repertoire and glances at the\n neighbours; Needs you is the only one that hops."
|
|
556
549
|
},
|
|
557
550
|
{
|
|
558
551
|
"name": "Beats",
|
|
559
|
-
"code": "import {
|
|
552
|
+
"code": "import { createRef, useState } from 'react';\nimport { AgentAvatar, AgentAvatarGroup, type AgentAvatarHandle } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Beats = () => {\n const [handles] = useState(() => CAST.map(() => createRef<AgentAvatarHandle>()));\n const [ended, setEnded] = useState('');\n const sayHello = () => handles.forEach(h => h.current?.play('hello'));\n const finishRun = () => handles.forEach(h => h.current?.play('done'));\n const onBeatEnd = (beat: string) => setEnded(beat);\n return (\n <VStack gap={16} align='center'>\n <AgentAvatarGroup>\n <HStack gap={24} wrap='wrap'>\n {CAST.map((p, i) => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-beats-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n live\n handleRef={handles[i]}\n onBeatEnd={onBeatEnd}\n />\n ))}\n </HStack>\n </AgentAvatarGroup>\n <HStack gap={8}>\n <Button\n data-testid='agent-avatar-beats-hello'\n variant='outline'\n size='small'\n onClick={sayHello}\n >\n Hello\n </Button>\n <Button\n data-testid='agent-avatar-beats-done'\n variant='outline'\n size='small'\n onClick={finishRun}\n >\n Done\n </Button>\n </HStack>\n </VStack>\n );\n};",
|
|
560
553
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
561
554
|
"storyTitle": "AI/AgentAvatar",
|
|
562
555
|
"description": "Hello (from On duty) and Done are one-shots: they play in full, then the character shows its state again."
|
|
563
556
|
},
|
|
564
557
|
{
|
|
565
558
|
"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}
|
|
559
|
+
"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';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Inviting = () => {\n const cue = useRef<HTMLButtonElement>(null);\n return (\n <VStack gap={24} align='center'>\n <HStack gap={24} wrap='wrap'>\n {CAST.map(p => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-invite-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n state='invite'\n live\n cueRef={cue}\n />\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
560
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
568
561
|
"storyTitle": "AI/AgentAvatar",
|
|
569
562
|
"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
563
|
},
|
|
571
564
|
{
|
|
572
565
|
"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
|
|
566
|
+
"code": "import { useState } from 'react';\nimport { AgentAvatar, type AgentAvatarState } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\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 <HStack gap={24} wrap='wrap'>\n {CAST.map(p => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-activation-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n live\n state={state}\n />\n ))}\n </HStack>\n <Button data-testid='agent-avatar-activation-toggle' size='small' onClick={toggle}>\n {state === 'box' ? 'Activate' : 'Reset'}\n </Button>\n </VStack>\n );\n};",
|
|
574
567
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
575
568
|
"storyTitle": "AI/AgentAvatar",
|
|
576
569
|
"description": "Activate: from Not set up the ghost lands, the colour fills from the floor and the eyes power on (1.15 s)."
|
|
577
570
|
},
|
|
578
571
|
{
|
|
579
572
|
"name": "Coverage",
|
|
580
|
-
"code": "import { useRef, useState } from 'react';\nimport { AgentAvatar, type AgentAvatarHandle } 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 Coverage = () => {\n const
|
|
573
|
+
"code": "import { createRef, useRef, useState } from 'react';\nimport { AgentAvatar, type AgentAvatarHandle } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Coverage = () => {\n const [handles] = useState(() => CAST.map(() => createRef<AgentAvatarHandle>()));\n const cue = useRef<HTMLButtonElement>(null);\n const [coverage, setCoverage] = useState<'full' | 'partial'>('partial');\n const coverAll = () => handles.forEach(h => h.current?.coverAll());\n const onBeatEnd = () => setCoverage('full');\n const reset = () => setCoverage('partial');\n return (\n <VStack gap={16} align='center'>\n <HStack gap={24} wrap='wrap'>\n {CAST.map((p, i) => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-coverage-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n live\n hasApplications\n coverage={coverage}\n handleRef={handles[i]}\n cueRef={cue}\n onBeatEnd={onBeatEnd}\n />\n ))}\n </HStack>\n <HStack gap={8}>\n <Button ref={cue} data-testid='agent-avatar-coverage-all' size='small' onClick={coverAll}>\n Cover all applications\n </Button>\n <Button\n data-testid='agent-avatar-coverage-reset'\n variant='outline'\n size='small'\n onClick={reset}\n >\n Reset\n </Button>\n </HStack>\n </VStack>\n );\n};",
|
|
581
574
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
582
575
|
"storyTitle": "AI/AgentAvatar",
|
|
583
576
|
"description": "Cover all applications: the grey crown fills to the top in 480 ms and the agent plays Done. Hover or focus on the\n button raises the line first."
|
|
@@ -591,7 +584,7 @@
|
|
|
591
584
|
},
|
|
592
585
|
{
|
|
593
586
|
"name": "ReducedMotion",
|
|
594
|
-
"code": "import { useEffect, useState } from 'react';\nimport { AgentAvatar, setAgentMotion, useAgentMotion } 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 ReducedMotion = () => {\n const motion = useAgentMotion();\n const [off, setOff] = useState(false);\n useEffect(() => {\n setAgentMotion(!off);\n return () => setAgentMotion(true);\n }, [off]);\n const toggle = () => setOff(!off);\n return (\n <VStack gap={16} align='center'>\n <HStack gap={24}>\n {
|
|
587
|
+
"code": "import { useEffect, useState } from 'react';\nimport { AgentAvatar, setAgentMotion, useAgentMotion } from '@wallarm-org/design-system/AgentAvatar';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const ReducedMotion = () => {\n const motion = useAgentMotion();\n const [off, setOff] = useState(false);\n useEffect(() => {\n setAgentMotion(!off);\n return () => setAgentMotion(true);\n }, [off]);\n const toggle = () => setOff(!off);\n return (\n <VStack gap={16} align='center'>\n <HStack gap={24} wrap='wrap'>\n {CAST.map((p, i) => (\n <AgentAvatar\n key={p.id}\n data-testid={`agent-avatar-motion-${p.id}`}\n agent={p.id}\n seed={p.id}\n size={72}\n state={LIVE_STATES[i % 4]}\n live\n />\n ))}\n </HStack>\n <Button\n data-testid='agent-avatar-motion-toggle'\n variant='outline'\n size='small'\n onClick={toggle}\n >\n {off ? 'Turn motion on' : 'Turn motion off'}\n </Button>\n </VStack>\n );\n};",
|
|
595
588
|
"storyFile": "AgentAvatar/AgentAvatar.stories.tsx",
|
|
596
589
|
"storyTitle": "AI/AgentAvatar",
|
|
597
590
|
"description": "With motion off (the user's setting, or reduced motion in the system) every live agent shows its static frame."
|
|
@@ -716,10 +709,10 @@
|
|
|
716
709
|
},
|
|
717
710
|
{
|
|
718
711
|
"name": "Sizes",
|
|
719
|
-
"code": "import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Sizes = () => (\n <HStack gap={24} align='end'>\n {([16, 20, 24, 32] as const).map(size => (\n <VStack key={size} gap={8} align='center'>\n <AgentGlyph
|
|
712
|
+
"code": "import { AgentGlyph } from '@wallarm-org/design-system/AgentGlyph';\nimport { HStack, VStack } from '@wallarm-org/design-system/Stack';\nimport { CAST } from '../../lib/agent-characters/data.gen';\n\nexport const Sizes = () => (\n <HStack gap={24} align='end'>\n {([16, 20, 24, 32] as const).map(size => (\n <VStack key={size} gap={8} align='center'>\n {CAST.map(p => (\n <AgentGlyph\n key={p.id}\n data-testid={`agent-glyph-${size}-${p.id}`}\n agent={p.id}\n size={size}\n align='box'\n />\n ))}\n </VStack>\n ))}\n </HStack>\n);",
|
|
720
713
|
"storyFile": "AgentGlyph/AgentGlyph.stories.tsx",
|
|
721
714
|
"storyTitle": "AI/AgentGlyph",
|
|
722
|
-
"description": "The four glyph sizes. 16 px is the floor; above 32 px the 3D AgentAvatar takes over."
|
|
715
|
+
"description": "The four glyph sizes for the cast. 16 px is the floor; above 32 px the 3D AgentAvatar takes over."
|
|
723
716
|
},
|
|
724
717
|
{
|
|
725
718
|
"name": "InlineWithText",
|
|
@@ -730,7 +723,7 @@
|
|
|
730
723
|
},
|
|
731
724
|
{
|
|
732
725
|
"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.
|
|
726
|
+
"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} wrap='wrap'>\n {CAST.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
727
|
"storyFile": "AgentGlyph/AgentGlyph.stories.tsx",
|
|
735
728
|
"storyTitle": "AI/AgentGlyph",
|
|
736
729
|
"description": "Partial coverage: an agent whose template has applications, covering only some of them, shows a grey crown while on duty."
|
|
@@ -1934,7 +1927,7 @@
|
|
|
1934
1927
|
},
|
|
1935
1928
|
{
|
|
1936
1929
|
"name": "WithRequester",
|
|
1937
|
-
"code": "import { ApprovalCard, ApprovalCardActions, ApprovalCardContent } from '@wallarm-org/design-system/ApprovalCard';\nimport { AgentItem, AvatarContent, AvatarDescription, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Button } from '@wallarm-org/design-system/Button';\n\nexport const WithRequester = () => (\n <ApprovalCard data-testid='approval-card'>\n <ApprovalCardContent>\n <AgentItem agent='
|
|
1930
|
+
"code": "import { ApprovalCard, ApprovalCardActions, ApprovalCardContent } from '@wallarm-org/design-system/ApprovalCard';\nimport { AgentItem, AvatarContent, AvatarDescription, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Button } from '@wallarm-org/design-system/Button';\n\nexport const WithRequester = () => (\n <ApprovalCard data-testid='approval-card'>\n <ApprovalCardContent>\n <AgentItem agent='sift' size={40} live data-testid='approval-card-requester'>\n <AvatarContent>\n <AvatarName>Sift</AvatarName>\n <AvatarDescription>False Positive Analyzer</AvatarDescription>\n </AvatarContent>\n </AgentItem>\n <p>Mark 12 requests to /api/search as false positives and add an exception rule</p>\n </ApprovalCardContent>\n <ApprovalCardActions>\n <Button>Allow</Button>\n <Button variant='secondary' color='neutral'>\n Reject\n </Button>\n </ApprovalCardActions>\n </ApprovalCard>\n);",
|
|
1938
1931
|
"storyFile": "ApprovalCard/ApprovalCard.stories.tsx",
|
|
1939
1932
|
"storyTitle": "AI/ApprovalCard",
|
|
1940
1933
|
"description": "An agent's request: its live 40px `AgentItem` (the 3D character, name and role, no plate) opens the content."
|
|
@@ -3271,7 +3264,7 @@
|
|
|
3271
3264
|
},
|
|
3272
3265
|
{
|
|
3273
3266
|
"name": "AgentValue",
|
|
3274
|
-
"code": "import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, Avatar, AvatarContent, AvatarFallback, AvatarName } from '@wallarm-org/design-system/Avatar';\n\nexport const AgentValue = () => (\n <div className='w-[400px] flex flex-col gap-16'>\n <Attribute data-testid='attr-run-by'>\n <AttributeLabel>Run by</AttributeLabel>\n <AttributeValue>\n <AgentItem agent='radar' data-testid='attr-run-by-agent'>\n <AvatarContent>\n <AvatarName>Radar</AvatarName>\n </AvatarContent>\n </AgentItem>\n </AttributeValue>\n </Attribute>\n <Attribute orientation='horizontal' data-testid='attr-proposed-by'>\n <AttributeLabel>Proposed by</AttributeLabel>\n <AttributeValue>\n <AgentItem agent='
|
|
3267
|
+
"code": "import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, Avatar, AvatarContent, AvatarFallback, AvatarName } from '@wallarm-org/design-system/Avatar';\n\nexport const AgentValue = () => (\n <div className='w-[400px] flex flex-col gap-16'>\n <Attribute data-testid='attr-run-by'>\n <AttributeLabel>Run by</AttributeLabel>\n <AttributeValue>\n <AgentItem agent='radar' data-testid='attr-run-by-agent'>\n <AvatarContent>\n <AvatarName>Radar</AvatarName>\n </AvatarContent>\n </AgentItem>\n </AttributeValue>\n </Attribute>\n <Attribute orientation='horizontal' data-testid='attr-proposed-by'>\n <AttributeLabel>Proposed by</AttributeLabel>\n <AttributeValue>\n <AgentItem agent='tune' data-testid='attr-proposed-by-agent'>\n <AvatarContent>\n <AvatarName>Tune</AvatarName>\n </AvatarContent>\n </AgentItem>\n </AttributeValue>\n </Attribute>\n <Attribute orientation='horizontal' data-testid='attr-approved-by'>\n <AttributeLabel>Approved by</AttributeLabel>\n <AttributeValue>\n <Avatar size='sm' data-testid='attr-approved-by-person'>\n <AvatarFallback name='Artem Miskevich' />\n <AvatarContent>\n <AvatarName>Artem Miskevich</AvatarName>\n </AvatarContent>\n </Avatar>\n </AttributeValue>\n </Attribute>\n </div>\n);",
|
|
3275
3268
|
"storyFile": "Attribute/Attribute.stories.tsx",
|
|
3276
3269
|
"storyTitle": "Data Display/Attribute",
|
|
3277
3270
|
"description": "An agent as the value — Run by, Proposed by: `AgentItem` at 20 px beside the text-sm value, the agent's glyph with\nno plate, where a person gets the `Avatar` plate."
|
|
@@ -3886,7 +3879,7 @@
|
|
|
3886
3879
|
},
|
|
3887
3880
|
{
|
|
3888
3881
|
"name": "Agent",
|
|
3889
|
-
"code": "import { AgentItem, Avatar, AvatarContent, AvatarDescription, AvatarFallback, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Agent = () => (\n <VStack gap={16} align='start' data-testid='avatar'>\n <Avatar size='sm' data-testid='avatar-person'>\n <AvatarFallback name='Artem Miskevich' />\n <AvatarContent>\n <AvatarName>Artem Miskevich</AvatarName>\n </AvatarContent>\n </Avatar>\n {([20, 24, 16] as const).map(size => (\n <AgentItem key={size} agent='radar' size={size} data-testid={`avatar-agent-${size}`}>\n <AvatarContent>\n <AvatarName>Radar</AvatarName>\n </AvatarContent>\n </AgentItem>\n ))}\n <AgentItem agent='sift' data-testid='avatar-agent-description'>\n <AvatarContent>\n <AvatarName>Sift</AvatarName>\n <AvatarDescription>False
|
|
3882
|
+
"code": "import { AgentItem, Avatar, AvatarContent, AvatarDescription, AvatarFallback, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { VStack } from '@wallarm-org/design-system/Stack';\n\nexport const Agent = () => (\n <VStack gap={16} align='start' data-testid='avatar'>\n <Avatar size='sm' data-testid='avatar-person'>\n <AvatarFallback name='Artem Miskevich' />\n <AvatarContent>\n <AvatarName>Artem Miskevich</AvatarName>\n </AvatarContent>\n </Avatar>\n {([20, 24, 16] as const).map(size => (\n <AgentItem key={size} agent='radar' size={size} data-testid={`avatar-agent-${size}`}>\n <AvatarContent>\n <AvatarName>Radar</AvatarName>\n </AvatarContent>\n </AgentItem>\n ))}\n <AgentItem agent='sift' data-testid='avatar-agent-description'>\n <AvatarContent>\n <AvatarName>Sift</AvatarName>\n <AvatarDescription>False Positive Analyzer</AvatarDescription>\n </AvatarContent>\n </AgentItem>\n <div className='w-120'>\n <AgentItem agent='tune' data-testid='avatar-agent-truncated'>\n <AvatarContent>\n <AvatarName>Tune, the policy tuning agent</AvatarName>\n </AvatarContent>\n </AgentItem>\n </div>\n </VStack>\n);",
|
|
3890
3883
|
"storyFile": "Avatar/Avatar.stories.tsx",
|
|
3891
3884
|
"storyTitle": "Data Display/Avatar",
|
|
3892
3885
|
"description": "An AI agent's user item: `AgentItem` puts the agent's glyph where the plate goes, with no plate and no circle, and\ntakes the same `AvatarContent`. 20 px beside the text-sm name, 24 px for roomier rows, 16 px beside text-xs."
|
|
@@ -6630,7 +6623,7 @@
|
|
|
6630
6623
|
},
|
|
6631
6624
|
{
|
|
6632
6625
|
"name": "WithAgent",
|
|
6633
|
-
"code": "import { AgentGlyph, defaultLook } from '@wallarm-org/design-system/AgentGlyph';\nimport { ChainOfThought, ChainOfThoughtStep } from '@wallarm-org/design-system/ChainOfThought';\nimport { Bot, Brain, Radar, Search, Wrench } from '@wallarm-org/design-system/icons';\n\nexport const WithAgent = () => (\n <ChainOfThought data-testid='cot'>\n <ChainOfThoughtStep icon={<Brain />} label='Thought for 5s' />\n <ChainOfThoughtStep\n icon={<AgentGlyph agent='radar' size={16} />}\n label='Ran Radar,
|
|
6626
|
+
"code": "import { AgentGlyph, defaultLook } from '@wallarm-org/design-system/AgentGlyph';\nimport { ChainOfThought, ChainOfThoughtStep } from '@wallarm-org/design-system/ChainOfThought';\nimport { Bot, Brain, Radar, Search, Wrench } from '@wallarm-org/design-system/icons';\n\nexport const WithAgent = () => (\n <ChainOfThought data-testid='cot'>\n <ChainOfThoughtStep icon={<Brain />} label='Thought for 5s' />\n <ChainOfThoughtStep\n icon={<AgentGlyph agent='radar' size={16} />}\n label='Ran Radar, Anomaly Investigation Agent'\n defaultOpen\n data-testid='cot-agent'\n >\n <ChainOfThought>\n <ChainOfThoughtStep icon={<Search />} label='Searched for anomalous requests' />\n <ChainOfThoughtStep icon={<Wrench />} label='Called get_attacks' />\n </ChainOfThought>\n </ChainOfThoughtStep>\n <ChainOfThoughtStep\n icon={<AgentGlyph agent='sift' size={16} />}\n label='Ran Sift, False Positive Analyzer'\n />\n <ChainOfThoughtStep\n icon={<AgentGlyph look={defaultLook('agent-7f3a')} size={16} />}\n label='Ran Tune'\n />\n <ChainOfThoughtStep icon={<Bot />} label='Ran an unknown subagent' />\n </ChainOfThought>\n);",
|
|
6634
6627
|
"storyFile": "ChainOfThought/ChainOfThought.stories.tsx",
|
|
6635
6628
|
"storyTitle": "AI/ChainOfThought",
|
|
6636
6629
|
"description": "A sub-agent step shows the sub-agent's 16px `AgentGlyph` in the `icon` slot when the agent is known, a custom\nagent its `defaultLook(uid)`; the label names it. `Bot` stays the fallback for an unknown agent."
|
|
@@ -13910,7 +13903,7 @@
|
|
|
13910
13903
|
},
|
|
13911
13904
|
{
|
|
13912
13905
|
"name": "WithAgents",
|
|
13913
|
-
"code": "import { AgentGlyph, defaultLook } from '@wallarm-org/design-system/AgentGlyph';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';\nimport { UserPlus } from '@wallarm-org/design-system/icons';\n\nexport const WithAgents = () => (\n <DropdownMenu data-testid='dropdown-menu'>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <UserPlus />\n Assign to\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph agent='radar' size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Radar</DropdownMenuItemText>\n <DropdownMenuItemDescription>
|
|
13906
|
+
"code": "import { AgentGlyph, defaultLook } from '@wallarm-org/design-system/AgentGlyph';\nimport { Button } from '@wallarm-org/design-system/Button';\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';\nimport { UserPlus } from '@wallarm-org/design-system/icons';\n\nexport const WithAgents = () => (\n <DropdownMenu data-testid='dropdown-menu'>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <UserPlus />\n Assign to\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph agent='radar' size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Radar</DropdownMenuItemText>\n <DropdownMenuItemDescription>Anomaly Investigation Agent</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph agent='sift' size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Sift</DropdownMenuItemText>\n <DropdownMenuItemDescription>False Positive Analyzer</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph agent='lens' size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemText>Lens</DropdownMenuItemText>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph agent='bard' size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemText>Bard</DropdownMenuItemText>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <AgentGlyph look={defaultLook('agent-7f3a')} size={16} />\n </DropdownMenuItemIcon>\n <DropdownMenuItemText>Night watch</DropdownMenuItemText>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n);",
|
|
13914
13907
|
"storyFile": "DropdownMenu/DropdownMenu.stories.tsx",
|
|
13915
13908
|
"storyTitle": "Actions/DropdownMenu",
|
|
13916
13909
|
"description": "An agent takes the icon's place: a 16 px `AgentGlyph` in `DropdownMenuItemIcon`, beside the agent's\nvisible name — the glyph is decorative and never announced. A custom agent passes its stored look\n(`defaultLook(uid)` until it has one)."
|
|
@@ -20418,7 +20411,7 @@
|
|
|
20418
20411
|
"examples": [
|
|
20419
20412
|
{
|
|
20420
20413
|
"name": "Agent",
|
|
20421
|
-
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, AvatarContent, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Badge } from '@wallarm-org/design-system/Badge';\nimport { HoverCard, HoverCardAction, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger } from '@wallarm-org/design-system/HoverCard';\nimport { Zap } from '@wallarm-org/design-system/icons';\nimport { Link } from '@wallarm-org/design-system/Link';\nimport { Separator } from '@wallarm-org/design-system/Separator';\nimport { HStack } from '@wallarm-org/design-system/Stack';\nimport { Tag } from '@wallarm-org/design-system/Tag';\n\nexport const Agent = () => {\n return (\n <HoverCard data-testid='agent-card'>\n <AgentItem agent='radar' size={20}>\n <AvatarContent>\n <AvatarName>\n <HoverCardTrigger data-testid='agent-card--trigger'>\n <Link href='#' size='md'>\n Radar\n </Link>\n </HoverCardTrigger>\n </AvatarName>\n </AvatarContent>\n </AgentItem>\n <HoverCardContent>\n <HoverCardHeader>\n <AgentAvatar agent='radar' size={56} state='working' live seed='radar' />\n <HoverCardTitle variant='agent'>Radar</HoverCardTitle>\n <Badge variant='dotted' type='secondary' color='blue'>\n Working\n </Badge>\n <HoverCardDescription>
|
|
20414
|
+
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, AvatarContent, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Badge } from '@wallarm-org/design-system/Badge';\nimport { HoverCard, HoverCardAction, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger } from '@wallarm-org/design-system/HoverCard';\nimport { Zap } from '@wallarm-org/design-system/icons';\nimport { Link } from '@wallarm-org/design-system/Link';\nimport { Separator } from '@wallarm-org/design-system/Separator';\nimport { HStack } from '@wallarm-org/design-system/Stack';\nimport { Tag } from '@wallarm-org/design-system/Tag';\n\nexport const Agent = () => {\n return (\n <HoverCard data-testid='agent-card'>\n <AgentItem agent='radar' size={20}>\n <AvatarContent>\n <AvatarName>\n <HoverCardTrigger data-testid='agent-card--trigger'>\n <Link href='#' size='md'>\n Radar\n </Link>\n </HoverCardTrigger>\n </AvatarName>\n </AvatarContent>\n </AgentItem>\n <HoverCardContent>\n <HoverCardHeader>\n <AgentAvatar agent='radar' size={56} state='working' live seed='radar' />\n <HoverCardTitle variant='agent'>Radar</HoverCardTitle>\n <Badge variant='dotted' type='secondary' color='blue'>\n Working\n </Badge>\n <HoverCardDescription>Anomaly Investigation Agent</HoverCardDescription>\n </HoverCardHeader>\n <Separator spacing={6} />\n <Attribute orientation='horizontal' data-testid='agent-card--runs'>\n <AttributeLabel>Runs</AttributeLabel>\n <AttributeValue>\n <HStack gap={4} wrap='wrap' className='min-w-0'>\n <Tag>\n <Zap />\n On attack spikes\n </Tag>\n </HStack>\n </AttributeValue>\n </Attribute>\n <Attribute orientation='horizontal' data-testid='agent-card--latest-run'>\n <AttributeLabel>Latest run</AttributeLabel>\n <AttributeValue>\n <Link href='#' size='md'>\n Run at 00:00\n </Link>\n </AttributeValue>\n </Attribute>\n <Attribute orientation='horizontal' data-testid='agent-card--approvals'>\n <AttributeLabel>Approvals</AttributeLabel>\n <AttributeValue>\n <Link href='#' size='md'>\n 5 pending\n </Link>\n </AttributeValue>\n </Attribute>\n <HoverCardAction asChild>\n <a href='/agents/radar'>View agent</a>\n </HoverCardAction>\n </HoverCardContent>\n </HoverCard>\n );\n};",
|
|
20422
20415
|
"storyFile": "HoverCard/HoverCard.stories.tsx",
|
|
20423
20416
|
"storyTitle": "Overlay/HoverCard",
|
|
20424
20417
|
"description": "An agent, from the timeline or history: the live character with no plate, the name in pixel\ntype, how it runs, its latest run and its pending approvals."
|
|
@@ -20474,7 +20467,7 @@
|
|
|
20474
20467
|
},
|
|
20475
20468
|
{
|
|
20476
20469
|
"name": "Analytics",
|
|
20477
|
-
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, AvatarContent, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Badge } from '@wallarm-org/design-system/Badge';\nimport { HoverCard, HoverCardAction, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger } from '@wallarm-org/design-system/HoverCard';\nimport { Link } from '@wallarm-org/design-system/Link';\nimport { Separator } from '@wallarm-org/design-system/Separator';\n\nexport const Analytics = () => (\n <HoverCard data-testid='analytics-card'>\n <AgentItem agent='radar' size={20}>\n <AvatarContent>\n <AvatarName>\n <HoverCardTrigger data-testid='analytics-card--trigger'>\n <Link href='#' size='md' data-analytics-id='history.agent'>\n Radar\n </Link>\n </HoverCardTrigger>\n </AvatarName>\n </AvatarContent>\n </AgentItem>\n <HoverCardContent>\n <HoverCardHeader>\n <AgentAvatar agent='radar' size={56} state='working' live seed='radar' />\n <HoverCardTitle variant='agent'>Radar</HoverCardTitle>\n <Badge variant='dotted' type='secondary' color='blue'>\n Working\n </Badge>\n <HoverCardDescription>
|
|
20470
|
+
"code": "import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';\nimport { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';\nimport { AgentItem, AvatarContent, AvatarName } from '@wallarm-org/design-system/Avatar';\nimport { Badge } from '@wallarm-org/design-system/Badge';\nimport { HoverCard, HoverCardAction, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger } from '@wallarm-org/design-system/HoverCard';\nimport { Link } from '@wallarm-org/design-system/Link';\nimport { Separator } from '@wallarm-org/design-system/Separator';\n\nexport const Analytics = () => (\n <HoverCard data-testid='analytics-card'>\n <AgentItem agent='radar' size={20}>\n <AvatarContent>\n <AvatarName>\n <HoverCardTrigger data-testid='analytics-card--trigger'>\n <Link href='#' size='md' data-analytics-id='history.agent'>\n Radar\n </Link>\n </HoverCardTrigger>\n </AvatarName>\n </AvatarContent>\n </AgentItem>\n <HoverCardContent>\n <HoverCardHeader>\n <AgentAvatar agent='radar' size={56} state='working' live seed='radar' />\n <HoverCardTitle variant='agent'>Radar</HoverCardTitle>\n <Badge variant='dotted' type='secondary' color='blue'>\n Working\n </Badge>\n <HoverCardDescription>Anomaly Investigation Agent</HoverCardDescription>\n </HoverCardHeader>\n <Separator spacing={6} />\n <Attribute orientation='horizontal' data-testid='analytics-card--latest-run'>\n <AttributeLabel>Latest run</AttributeLabel>\n <AttributeValue>\n <Link href='#' size='md' data-analytics-id='agent-card.latest-run'>\n Run at 00:00\n </Link>\n </AttributeValue>\n </Attribute>\n <HoverCardAction asChild data-analytics-id='agent-card.view'>\n <a href='/agents/radar'>View agent</a>\n </HoverCardAction>\n </HoverCardContent>\n </HoverCard>\n);",
|
|
20478
20471
|
"storyFile": "HoverCard/HoverCard.stories.tsx",
|
|
20479
20472
|
"storyTitle": "Overlay/HoverCard",
|
|
20480
20473
|
"description": "Analytics attributes go on the elements themselves: the trigger's child, each row `Link` and\n`HoverCardAction`. The card adds no seam of its own, so each `data-analytics-id` lands on the\nreal `<a>` or `<button>`."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
2
|
+
"version": "4.17.0",
|
|
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
|
{
|
package/package.json
CHANGED