@actioneer/ads-mcp 0.5.7 → 0.5.8
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/README.md +6 -2
- package/manifest.json +240 -31
- package/package.json +1 -1
- package/src/tools.mjs +5 -3
package/README.md
CHANGED
|
@@ -19,11 +19,15 @@ All five tools read the L1 catalog (`ads-manifest.json`).
|
|
|
19
19
|
| Tool | Purpose |
|
|
20
20
|
|---|---|
|
|
21
21
|
| `search_components(query, kind?, limit?)` | Enumerate what exists by name or purpose → exact export names, families, kinds, descriptions. |
|
|
22
|
-
| `get_component(name)` | Full record for one EXACT export:
|
|
22
|
+
| `get_component(name)` | Full record for one EXACT export: exact import, props, variants, showcase URL, usage example, and the mandatory motion contract. Returns an error (never invents) on an unknown name. |
|
|
23
23
|
| `get_token(role)` | The semantic token(s) for a role/utility/purpose (`brand`, `bg-danger`, `muted text`) so the agent references a token, not a literal ads-lint would reject. |
|
|
24
|
-
| `get_principles(id?, enforcedByLint?)` | The
|
|
24
|
+
| `get_principles(id?, enforcedByLint?)` | The 11 ADS design principles, including the required Animate UI-derived motion contract. Each flags whether `ads-lint` auto-checks it. |
|
|
25
25
|
| `lint_snippet(code)` | Runs a snippet through `@actioneer/ads-lint` (consumer mode) and returns the verdict — deep imports, aliasing, external-UI, literals, weak motion. |
|
|
26
26
|
|
|
27
|
+
Every component lookup carries principle 3 automatically. Imported ADS
|
|
28
|
+
components keep their built-in motion; consumer-authored state motion imports a
|
|
29
|
+
named role preset from `@actioneer/ads`. Raw spring parameters are lint errors.
|
|
30
|
+
|
|
27
31
|
## Wiring it into Claude Code / Cursor (`.mcp.json`)
|
|
28
32
|
|
|
29
33
|
**Installed as a package** (recommended for consumer repos):
|
package/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actioneer/ads",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"importPath": "@actioneer/ads",
|
|
5
5
|
"styleImport": "@import \"@actioneer/ads/styles.css\";",
|
|
6
6
|
"families": [
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"Chat"
|
|
17
17
|
],
|
|
18
18
|
"counts": {
|
|
19
|
-
"total":
|
|
19
|
+
"total": 818,
|
|
20
20
|
"component": 357,
|
|
21
|
-
"type":
|
|
21
|
+
"type": 349,
|
|
22
22
|
"hook": 10,
|
|
23
|
-
"util":
|
|
23
|
+
"util": 102
|
|
24
24
|
},
|
|
25
25
|
"tokens": [
|
|
26
26
|
{
|
|
@@ -208,6 +208,16 @@
|
|
|
208
208
|
],
|
|
209
209
|
"description": "Quiet fill — secondary buttons, avatars, chips"
|
|
210
210
|
},
|
|
211
|
+
{
|
|
212
|
+
"name": "--color-artifact-canvas",
|
|
213
|
+
"role": "artifact-canvas",
|
|
214
|
+
"utilities": [
|
|
215
|
+
"bg-artifact-canvas",
|
|
216
|
+
"text-artifact-canvas",
|
|
217
|
+
"border-artifact-canvas"
|
|
218
|
+
],
|
|
219
|
+
"description": ""
|
|
220
|
+
},
|
|
211
221
|
{
|
|
212
222
|
"name": "--color-accent",
|
|
213
223
|
"role": "accent",
|
|
@@ -235,7 +245,7 @@
|
|
|
235
245
|
"text-success",
|
|
236
246
|
"border-success"
|
|
237
247
|
],
|
|
238
|
-
"description": ""
|
|
248
|
+
"description": "success-700 on white = 5.48:1 (600 was 3.77:1, failed AA)."
|
|
239
249
|
},
|
|
240
250
|
{
|
|
241
251
|
"name": "--color-success-foreground",
|
|
@@ -244,7 +254,7 @@
|
|
|
244
254
|
"text-success-foreground",
|
|
245
255
|
"bg-success-foreground"
|
|
246
256
|
],
|
|
247
|
-
"description": ""
|
|
257
|
+
"description": "success-700 on white = 5.48:1 (600 was 3.77:1, failed AA)."
|
|
248
258
|
},
|
|
249
259
|
{
|
|
250
260
|
"name": "--color-warning",
|
|
@@ -254,7 +264,7 @@
|
|
|
254
264
|
"text-warning",
|
|
255
265
|
"border-warning"
|
|
256
266
|
],
|
|
257
|
-
"description": ""
|
|
267
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
258
268
|
},
|
|
259
269
|
{
|
|
260
270
|
"name": "--color-warning-foreground",
|
|
@@ -263,7 +273,7 @@
|
|
|
263
273
|
"text-warning-foreground",
|
|
264
274
|
"bg-warning-foreground"
|
|
265
275
|
],
|
|
266
|
-
"description": ""
|
|
276
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
267
277
|
},
|
|
268
278
|
{
|
|
269
279
|
"name": "--color-danger",
|
|
@@ -273,7 +283,7 @@
|
|
|
273
283
|
"text-danger",
|
|
274
284
|
"border-danger"
|
|
275
285
|
],
|
|
276
|
-
"description": ""
|
|
286
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
277
287
|
},
|
|
278
288
|
{
|
|
279
289
|
"name": "--color-danger-foreground",
|
|
@@ -282,7 +292,7 @@
|
|
|
282
292
|
"text-danger-foreground",
|
|
283
293
|
"bg-danger-foreground"
|
|
284
294
|
],
|
|
285
|
-
"description": ""
|
|
295
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
286
296
|
},
|
|
287
297
|
{
|
|
288
298
|
"name": "--color-info",
|
|
@@ -292,7 +302,7 @@
|
|
|
292
302
|
"text-info",
|
|
293
303
|
"border-info"
|
|
294
304
|
],
|
|
295
|
-
"description": ""
|
|
305
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
296
306
|
},
|
|
297
307
|
{
|
|
298
308
|
"name": "--color-info-foreground",
|
|
@@ -301,7 +311,7 @@
|
|
|
301
311
|
"text-info-foreground",
|
|
302
312
|
"bg-info-foreground"
|
|
303
313
|
],
|
|
304
|
-
"description": ""
|
|
314
|
+
"description": "Amber-500 fill kept (it IS the caution signal); dark ink foreground"
|
|
305
315
|
},
|
|
306
316
|
{
|
|
307
317
|
"name": "--color-border-primary",
|
|
@@ -398,6 +408,20 @@
|
|
|
398
408
|
"importPath": "@actioneer/ads",
|
|
399
409
|
"module": "interactive"
|
|
400
410
|
},
|
|
411
|
+
{
|
|
412
|
+
"name": "backdropVariants",
|
|
413
|
+
"family": "Primitives / utilities",
|
|
414
|
+
"kind": "util",
|
|
415
|
+
"importPath": "@actioneer/ads",
|
|
416
|
+
"module": "motion"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "checkDrawTransition",
|
|
420
|
+
"family": "Primitives / utilities",
|
|
421
|
+
"kind": "util",
|
|
422
|
+
"importPath": "@actioneer/ads",
|
|
423
|
+
"module": "motion"
|
|
424
|
+
},
|
|
401
425
|
{
|
|
402
426
|
"name": "cn",
|
|
403
427
|
"family": "Primitives / utilities",
|
|
@@ -405,6 +429,34 @@
|
|
|
405
429
|
"importPath": "@actioneer/ads",
|
|
406
430
|
"module": "cn"
|
|
407
431
|
},
|
|
432
|
+
{
|
|
433
|
+
"name": "drawerBackdropVariants",
|
|
434
|
+
"family": "Primitives / utilities",
|
|
435
|
+
"kind": "util",
|
|
436
|
+
"importPath": "@actioneer/ads",
|
|
437
|
+
"module": "motion"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "drawerOffset",
|
|
441
|
+
"family": "Primitives / utilities",
|
|
442
|
+
"kind": "util",
|
|
443
|
+
"importPath": "@actioneer/ads",
|
|
444
|
+
"module": "motion"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "fadeTransition",
|
|
448
|
+
"family": "Primitives / utilities",
|
|
449
|
+
"kind": "util",
|
|
450
|
+
"importPath": "@actioneer/ads",
|
|
451
|
+
"module": "motion"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "floatVariants",
|
|
455
|
+
"family": "Primitives / utilities",
|
|
456
|
+
"kind": "util",
|
|
457
|
+
"importPath": "@actioneer/ads",
|
|
458
|
+
"module": "motion"
|
|
459
|
+
},
|
|
408
460
|
{
|
|
409
461
|
"name": "interactive",
|
|
410
462
|
"family": "Primitives / utilities",
|
|
@@ -412,6 +464,125 @@
|
|
|
412
464
|
"importPath": "@actioneer/ads",
|
|
413
465
|
"module": "interactive"
|
|
414
466
|
},
|
|
467
|
+
{
|
|
468
|
+
"name": "menuVariants",
|
|
469
|
+
"family": "Primitives / utilities",
|
|
470
|
+
"kind": "util",
|
|
471
|
+
"importPath": "@actioneer/ads",
|
|
472
|
+
"module": "motion"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "modalPanelVariants",
|
|
476
|
+
"family": "Primitives / utilities",
|
|
477
|
+
"kind": "util",
|
|
478
|
+
"importPath": "@actioneer/ads",
|
|
479
|
+
"module": "motion"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "screenVariants",
|
|
483
|
+
"family": "Primitives / utilities",
|
|
484
|
+
"kind": "util",
|
|
485
|
+
"importPath": "@actioneer/ads",
|
|
486
|
+
"module": "motion"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"name": "springCarousel",
|
|
490
|
+
"family": "Primitives / utilities",
|
|
491
|
+
"kind": "util",
|
|
492
|
+
"importPath": "@actioneer/ads",
|
|
493
|
+
"module": "motion"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"name": "springControl",
|
|
497
|
+
"family": "Primitives / utilities",
|
|
498
|
+
"kind": "util",
|
|
499
|
+
"importPath": "@actioneer/ads",
|
|
500
|
+
"module": "motion"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "springDialog",
|
|
504
|
+
"family": "Primitives / utilities",
|
|
505
|
+
"kind": "util",
|
|
506
|
+
"importPath": "@actioneer/ads",
|
|
507
|
+
"module": "motion"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "springDisclosure",
|
|
511
|
+
"family": "Primitives / utilities",
|
|
512
|
+
"kind": "util",
|
|
513
|
+
"importPath": "@actioneer/ads",
|
|
514
|
+
"module": "motion"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "springEffect",
|
|
518
|
+
"family": "Primitives / utilities",
|
|
519
|
+
"kind": "util",
|
|
520
|
+
"importPath": "@actioneer/ads",
|
|
521
|
+
"module": "motion"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "springHighlight",
|
|
525
|
+
"family": "Primitives / utilities",
|
|
526
|
+
"kind": "util",
|
|
527
|
+
"importPath": "@actioneer/ads",
|
|
528
|
+
"module": "motion"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "springOverlay",
|
|
532
|
+
"family": "Primitives / utilities",
|
|
533
|
+
"kind": "util",
|
|
534
|
+
"importPath": "@actioneer/ads",
|
|
535
|
+
"module": "motion"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "springProgress",
|
|
539
|
+
"family": "Primitives / utilities",
|
|
540
|
+
"kind": "util",
|
|
541
|
+
"importPath": "@actioneer/ads",
|
|
542
|
+
"module": "motion"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "springRadio",
|
|
546
|
+
"family": "Primitives / utilities",
|
|
547
|
+
"kind": "util",
|
|
548
|
+
"importPath": "@actioneer/ads",
|
|
549
|
+
"module": "motion"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"name": "springSheet",
|
|
553
|
+
"family": "Primitives / utilities",
|
|
554
|
+
"kind": "util",
|
|
555
|
+
"importPath": "@actioneer/ads",
|
|
556
|
+
"module": "motion"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "springSidebar",
|
|
560
|
+
"family": "Primitives / utilities",
|
|
561
|
+
"kind": "util",
|
|
562
|
+
"importPath": "@actioneer/ads",
|
|
563
|
+
"module": "motion"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "springSwitch",
|
|
567
|
+
"family": "Primitives / utilities",
|
|
568
|
+
"kind": "util",
|
|
569
|
+
"importPath": "@actioneer/ads",
|
|
570
|
+
"module": "motion"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "toastVariants",
|
|
574
|
+
"family": "Primitives / utilities",
|
|
575
|
+
"kind": "util",
|
|
576
|
+
"importPath": "@actioneer/ads",
|
|
577
|
+
"module": "motion"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "tooltipVariants",
|
|
581
|
+
"family": "Primitives / utilities",
|
|
582
|
+
"kind": "util",
|
|
583
|
+
"importPath": "@actioneer/ads",
|
|
584
|
+
"module": "motion"
|
|
585
|
+
},
|
|
415
586
|
{
|
|
416
587
|
"name": "AudioWaveform",
|
|
417
588
|
"family": "Foundations",
|
|
@@ -544,7 +715,9 @@
|
|
|
544
715
|
"description",
|
|
545
716
|
"error",
|
|
546
717
|
"required",
|
|
547
|
-
"htmlFor"
|
|
718
|
+
"htmlFor",
|
|
719
|
+
"errorId",
|
|
720
|
+
"descriptionId"
|
|
548
721
|
]
|
|
549
722
|
},
|
|
550
723
|
{
|
|
@@ -740,20 +913,22 @@
|
|
|
740
913
|
"kind": "component",
|
|
741
914
|
"importPath": "@actioneer/ads",
|
|
742
915
|
"module": "spinner",
|
|
743
|
-
"description": "Use for
|
|
916
|
+
"description": "Use the nine-squircle Spinner for indeterminate work; choose its variant by work scope and use Progress or ProgressCircle when completion can be measured.",
|
|
744
917
|
"showcaseUrl": "https://ads.actioneer.dev/#/spinner",
|
|
745
918
|
"variants": {
|
|
746
919
|
"size": {
|
|
747
920
|
"values": [
|
|
921
|
+
"xs",
|
|
748
922
|
"sm",
|
|
749
923
|
"md",
|
|
750
924
|
"lg"
|
|
751
925
|
],
|
|
752
926
|
"default": "md",
|
|
753
927
|
"options": {
|
|
754
|
-
"
|
|
755
|
-
"
|
|
756
|
-
"
|
|
928
|
+
"xs": "Dense 14px control slot, reserved for the tightest inline UI.",
|
|
929
|
+
"sm": "Standard 16px icon slot for buttons, rows, fields, and modal copy.",
|
|
930
|
+
"md": "Default 24px standalone loading state inside a bounded region.",
|
|
931
|
+
"lg": "Prominent 32px state for a blocked surface or page."
|
|
757
932
|
}
|
|
758
933
|
},
|
|
759
934
|
"color": {
|
|
@@ -766,6 +941,7 @@
|
|
|
766
941
|
}
|
|
767
942
|
},
|
|
768
943
|
"props": [
|
|
944
|
+
"variant",
|
|
769
945
|
"label"
|
|
770
946
|
]
|
|
771
947
|
},
|
|
@@ -959,6 +1135,13 @@
|
|
|
959
1135
|
"importPath": "@actioneer/ads",
|
|
960
1136
|
"module": "spinner"
|
|
961
1137
|
},
|
|
1138
|
+
{
|
|
1139
|
+
"name": "SpinnerVariant",
|
|
1140
|
+
"family": "Foundations",
|
|
1141
|
+
"kind": "type",
|
|
1142
|
+
"importPath": "@actioneer/ads",
|
|
1143
|
+
"module": "spinner"
|
|
1144
|
+
},
|
|
962
1145
|
{
|
|
963
1146
|
"name": "StepperProps",
|
|
964
1147
|
"family": "Foundations",
|
|
@@ -1029,6 +1212,13 @@
|
|
|
1029
1212
|
"importPath": "@actioneer/ads",
|
|
1030
1213
|
"module": "setting-row"
|
|
1031
1214
|
},
|
|
1215
|
+
{
|
|
1216
|
+
"name": "SPINNER_VARIANTS",
|
|
1217
|
+
"family": "Foundations",
|
|
1218
|
+
"kind": "util",
|
|
1219
|
+
"importPath": "@actioneer/ads",
|
|
1220
|
+
"module": "spinner"
|
|
1221
|
+
},
|
|
1032
1222
|
{
|
|
1033
1223
|
"name": "stepperMarkerVariants",
|
|
1034
1224
|
"family": "Foundations",
|
|
@@ -1170,7 +1360,7 @@
|
|
|
1170
1360
|
"kind": "component",
|
|
1171
1361
|
"importPath": "@actioneer/ads",
|
|
1172
1362
|
"module": "segmented",
|
|
1173
|
-
"description": "Use for a small set (2-4) of mutually exclusive, always-visible options — like a range or view-mode switcher — not for navigation or long lists.",
|
|
1363
|
+
"description": "Use for a small set (2-4) of mutually exclusive, always-visible options — like a range or view-mode switcher — not for navigation or long lists. Radius follows control size: 4px at sm and 8px at md/lg; tracks and options are never fully rounded.",
|
|
1174
1364
|
"showcaseUrl": "https://ads.actioneer.dev/#/segmented",
|
|
1175
1365
|
"variants": {
|
|
1176
1366
|
"size": {
|
|
@@ -1589,6 +1779,7 @@
|
|
|
1589
1779
|
"startContent",
|
|
1590
1780
|
"danger",
|
|
1591
1781
|
"disabled",
|
|
1782
|
+
"restoreFocus",
|
|
1592
1783
|
"onSelect"
|
|
1593
1784
|
]
|
|
1594
1785
|
},
|
|
@@ -3100,7 +3291,8 @@
|
|
|
3100
3291
|
"sortDescriptor",
|
|
3101
3292
|
"onSortChange",
|
|
3102
3293
|
"allowsSorting",
|
|
3103
|
-
"isStatic"
|
|
3294
|
+
"isStatic",
|
|
3295
|
+
"resizableColumns"
|
|
3104
3296
|
]
|
|
3105
3297
|
},
|
|
3106
3298
|
{
|
|
@@ -3263,7 +3455,7 @@
|
|
|
3263
3455
|
"kind": "component",
|
|
3264
3456
|
"importPath": "@actioneer/ads",
|
|
3265
3457
|
"module": "tabs",
|
|
3266
|
-
"description": "Use Tabs to switch between mutually exclusive views/sections that share the same page context, not for page-level navigation. Always reach for the primary
|
|
3458
|
+
"description": "Use Tabs to switch between mutually exclusive views/sections that share the same page context, not for page-level navigation. Always reach for the primary recessed-track variant — it is the default; use secondary only when explicitly asked for it. Tab radius follows control size (4px sm, 8px md/lg), never rounded-full. When Tabs and a scoped search field coexist, compose one responsive control row with tabs leading and search trailing; do not stack search above tabs at widths where both fit.",
|
|
3267
3459
|
"showcaseUrl": "https://ads.actioneer.dev/#/tabs",
|
|
3268
3460
|
"variants": {
|
|
3269
3461
|
"variant": {
|
|
@@ -3274,8 +3466,8 @@
|
|
|
3274
3466
|
],
|
|
3275
3467
|
"default": "primary",
|
|
3276
3468
|
"options": {
|
|
3277
|
-
"primary": "Filled muted
|
|
3278
|
-
"secondary": "No
|
|
3469
|
+
"primary": "Filled muted track with tabs sliding behind a shared elevated segment. The house default — use it for every tab surface unless the underline is explicitly requested.",
|
|
3470
|
+
"secondary": "No track background — a thin neutral-ink underline (or side rail when vertical) slides beneath the active tab against a hairline rail; use for flush, lower-emphasis section tabs."
|
|
3279
3471
|
}
|
|
3280
3472
|
},
|
|
3281
3473
|
"orientation": {
|
|
@@ -4652,7 +4844,12 @@
|
|
|
4652
4844
|
"state",
|
|
4653
4845
|
"interactive",
|
|
4654
4846
|
"size",
|
|
4847
|
+
"tileGridSize",
|
|
4848
|
+
"eyeScale",
|
|
4849
|
+
"eyeColor",
|
|
4850
|
+
"animateOnMount",
|
|
4655
4851
|
"color",
|
|
4852
|
+
"colorPreset",
|
|
4656
4853
|
"trackPointer"
|
|
4657
4854
|
]
|
|
4658
4855
|
},
|
|
@@ -4917,6 +5114,13 @@
|
|
|
4917
5114
|
"circle"
|
|
4918
5115
|
]
|
|
4919
5116
|
},
|
|
5117
|
+
{
|
|
5118
|
+
"name": "AgentIconColorPreset",
|
|
5119
|
+
"family": "Feedback",
|
|
5120
|
+
"kind": "type",
|
|
5121
|
+
"importPath": "@actioneer/ads",
|
|
5122
|
+
"module": "agent-icon"
|
|
5123
|
+
},
|
|
4920
5124
|
{
|
|
4921
5125
|
"name": "AgentIconName",
|
|
4922
5126
|
"family": "Feedback",
|
|
@@ -8688,7 +8892,7 @@
|
|
|
8688
8892
|
"title": "Elevation = actionability",
|
|
8689
8893
|
"rule": "The single shadow-elevation token is an affordance: it goes ONLY on surfaces the user can act on. Never elevate something that can't be clicked. There is no shadow scale.",
|
|
8690
8894
|
"do": [
|
|
8691
|
-
"Elevate actionable surfaces: pressable/hoverable cards, primary CTAs, control thumbs (Switch, Slider, active
|
|
8895
|
+
"Elevate actionable surfaces: pressable/hoverable cards, primary CTAs, control thumbs (Switch, Slider, active tab segments), and interactive floating layers (Modal, Drawer, Popover, Dropdown, listboxes, Toast).",
|
|
8692
8896
|
"Keep static surfaces flat: Panel, plain Card, Kbd, Navbar, headers, rails, docs boxes, Tooltip, InlineDrawer — they read by fill/color.",
|
|
8693
8897
|
"Ask 'can the user click this surface?' — if no, it's flat."
|
|
8694
8898
|
],
|
|
@@ -8701,23 +8905,28 @@
|
|
|
8701
8905
|
{
|
|
8702
8906
|
"id": "motion-follows-guide",
|
|
8703
8907
|
"number": 3,
|
|
8704
|
-
"title": "Motion follows the
|
|
8705
|
-
"rule": "
|
|
8908
|
+
"title": "Motion follows the interaction",
|
|
8909
|
+
"rule": "Component motion follows the closest Animate UI interaction pattern, using role-specific presets defined in src/lib/motion.ts and exported from the ADS root barrel. Direct manipulation stays immediate, small CSS feedback stays local, and reduced motion is respected everywhere.",
|
|
8706
8910
|
"do": [
|
|
8707
|
-
"
|
|
8708
|
-
"
|
|
8709
|
-
"
|
|
8911
|
+
"Treat motion as part of every ADS component import: preserve the component's built-in motion, and import any composition-level preset from the ADS root barrel.",
|
|
8912
|
+
"Map the component family before choosing motion: tabs/segments use control; checkbox/radio/switch use selection; menus use highlight; popovers/tooltips use overlay; modal/drawer use dialog/sheet; accordion/collapsible use disclosure; progress, carousel, and sidebar use their matching presets.",
|
|
8913
|
+
"Keep sliders, drag-resize, scrolling, and other pointer-following interactions immediate; motion begins after the committed value or destination changes.",
|
|
8914
|
+
"Give pressable elements local active feedback (text/link exempt); start entrances ≥ scale 0.95 with opacity.",
|
|
8915
|
+
"Wrap Motion components in MotionConfig reducedMotion='user'; keep useful opacity/color feedback and drop spatial movement."
|
|
8710
8916
|
],
|
|
8711
8917
|
"dont": [
|
|
8712
|
-
"
|
|
8713
|
-
"
|
|
8918
|
+
"Invent raw spring values inside a component, recreate a global duration/easing token scale, use an unbounded all-property transition, or start an entrance at scale zero.",
|
|
8919
|
+
"Override or duplicate the motion already shipped inside an imported ADS component.",
|
|
8920
|
+
"Animate keyboard-initiated or 100×/day actions (e.g. a command-palette toggle).",
|
|
8921
|
+
"Add motion to a component only because it is visible; static structure and decorative chrome stay still."
|
|
8714
8922
|
],
|
|
8715
8923
|
"enforcedByLint": true,
|
|
8716
8924
|
"lintRules": [
|
|
8717
8925
|
"unbounded-transition",
|
|
8718
8926
|
"sluggish-easing",
|
|
8719
8927
|
"zero-scale-entrance",
|
|
8720
|
-
"undersized-zoom-entrance"
|
|
8928
|
+
"undersized-zoom-entrance",
|
|
8929
|
+
"raw-spring-config"
|
|
8721
8930
|
]
|
|
8722
8931
|
},
|
|
8723
8932
|
{
|
package/package.json
CHANGED
package/src/tools.mjs
CHANGED
|
@@ -14,7 +14,8 @@ export function createTools({ manifest }) {
|
|
|
14
14
|
description:
|
|
15
15
|
"Search the ADS catalog for components/utilities/hooks by name or purpose. " +
|
|
16
16
|
"Returns exact export names (import from '@actioneer/ads'), families, kinds, and descriptions. " +
|
|
17
|
-
"Use this first to discover what exists before importing
|
|
17
|
+
"Use this first to discover what exists before importing; every component use must preserve " +
|
|
18
|
+
"its built-in motion and apply the required motion contract returned by get_component.",
|
|
18
19
|
inputSchema: {
|
|
19
20
|
type: "object",
|
|
20
21
|
properties: {
|
|
@@ -29,7 +30,8 @@ export function createTools({ manifest }) {
|
|
|
29
30
|
name: "get_component",
|
|
30
31
|
description:
|
|
31
32
|
"Get the full record for one ADS export by its EXACT name: the exact import statement, " +
|
|
32
|
-
"props, variant/size vocabulary, showcase URL,
|
|
33
|
+
"props, variant/size vocabulary, showcase URL, a copy-paste usage example, and the mandatory " +
|
|
34
|
+
"Animate UI-derived motion contract for components. " +
|
|
33
35
|
"Returns an error if the name is not an exact export (never invents one).",
|
|
34
36
|
inputSchema: {
|
|
35
37
|
type: "object",
|
|
@@ -98,7 +100,7 @@ export function createTools({ manifest }) {
|
|
|
98
100
|
(r) => `- ${r.name} (${r.kind}, ${r.family})${r.description ? ` — ${r.description}` : ""}`
|
|
99
101
|
);
|
|
100
102
|
return text(
|
|
101
|
-
`${results.length} match(es) — import from "${manifest.importPath}":\n${lines.join("\n")}
|
|
103
|
+
`${results.length} match(es) — import from "${manifest.importPath}":\n${lines.join("\n")}\n\nBefore using a component, call get_component for its required motion contract.`
|
|
102
104
|
);
|
|
103
105
|
},
|
|
104
106
|
|