@wizeworks/silicaui-mcp 0.42.0 → 0.43.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/data/components.json +113 -16
- package/dist/data/tokens.json +54 -0
- package/dist/server.js +29 -3
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -10930,6 +10930,8 @@
|
|
|
10930
10930
|
"alert-warning",
|
|
10931
10931
|
"alert-error"
|
|
10932
10932
|
],
|
|
10933
|
+
"colorPattern": "alert-<color>",
|
|
10934
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `alert-<color>` accepts any color the app registers (see get_tokens → customColors). `alert-brand` is as real as `alert-primary` once `brand` is declared.",
|
|
10933
10935
|
"compoundSelectors": [
|
|
10934
10936
|
".alert-dismiss[data-closed]"
|
|
10935
10937
|
]
|
|
@@ -11032,6 +11034,8 @@
|
|
|
11032
11034
|
"avatar-warning",
|
|
11033
11035
|
"avatar-error"
|
|
11034
11036
|
],
|
|
11037
|
+
"colorPattern": "avatar-<color>",
|
|
11038
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `avatar-<color>` accepts any color the app registers (see get_tokens → customColors). `avatar-brand` is as real as `avatar-primary` once `brand` is declared.",
|
|
11035
11039
|
"compoundSelectors": [
|
|
11036
11040
|
".avatar-online::after, .avatar-offline::after",
|
|
11037
11041
|
".avatar-online::after",
|
|
@@ -11077,6 +11081,8 @@
|
|
|
11077
11081
|
"badge-warning",
|
|
11078
11082
|
"badge-error"
|
|
11079
11083
|
],
|
|
11084
|
+
"colorPattern": "badge-<color>",
|
|
11085
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `badge-<color>` accepts any color the app registers (see get_tokens → customColors). `badge-brand` is as real as `badge-primary` once `brand` is declared.",
|
|
11080
11086
|
"compoundSelectors": [
|
|
11081
11087
|
".badge:has(svg)"
|
|
11082
11088
|
]
|
|
@@ -11135,6 +11141,8 @@
|
|
|
11135
11141
|
"btn-warning",
|
|
11136
11142
|
"btn-error"
|
|
11137
11143
|
],
|
|
11144
|
+
"colorPattern": "btn-<color>",
|
|
11145
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `btn-<color>` accepts any color the app registers (see get_tokens → customColors). `btn-brand` is as real as `btn-primary` once `brand` is declared.",
|
|
11138
11146
|
"compoundSelectors": [
|
|
11139
11147
|
".btn:has(svg)"
|
|
11140
11148
|
]
|
|
@@ -11180,6 +11188,8 @@
|
|
|
11180
11188
|
"calendar-warning",
|
|
11181
11189
|
"calendar-error"
|
|
11182
11190
|
],
|
|
11191
|
+
"colorPattern": "calendar-<color>",
|
|
11192
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `calendar-<color>` accepts any color the app registers (see get_tokens → customColors). `calendar-brand` is as real as `calendar-primary` once `brand` is declared.",
|
|
11183
11193
|
"compoundSelectors": [
|
|
11184
11194
|
".date-field[data-placeholder] .date-field-value"
|
|
11185
11195
|
]
|
|
@@ -11296,6 +11306,18 @@
|
|
|
11296
11306
|
"chat-header",
|
|
11297
11307
|
"chat-image"
|
|
11298
11308
|
],
|
|
11309
|
+
"colorVariants": [
|
|
11310
|
+
"chat-bubble-primary",
|
|
11311
|
+
"chat-bubble-secondary",
|
|
11312
|
+
"chat-bubble-accent",
|
|
11313
|
+
"chat-bubble-neutral",
|
|
11314
|
+
"chat-bubble-info",
|
|
11315
|
+
"chat-bubble-success",
|
|
11316
|
+
"chat-bubble-warning",
|
|
11317
|
+
"chat-bubble-error"
|
|
11318
|
+
],
|
|
11319
|
+
"colorPattern": "chat-bubble-<color>",
|
|
11320
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `chat-bubble-<color>` accepts any color the app registers (see get_tokens → customColors). `chat-bubble-brand` is as real as `chat-bubble-primary` once `brand` is declared.",
|
|
11299
11321
|
"compoundSelectors": [
|
|
11300
11322
|
".chat > *:not(.chat-image)",
|
|
11301
11323
|
".chat-end > *:not(.chat-image)",
|
|
@@ -11348,7 +11370,9 @@
|
|
|
11348
11370
|
"checkbox-success",
|
|
11349
11371
|
"checkbox-warning",
|
|
11350
11372
|
"checkbox-error"
|
|
11351
|
-
]
|
|
11373
|
+
],
|
|
11374
|
+
"colorPattern": "checkbox-<color>",
|
|
11375
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `checkbox-<color>` accepts any color the app registers (see get_tokens → customColors). `checkbox-brand` is as real as `checkbox-primary` once `brand` is declared."
|
|
11352
11376
|
},
|
|
11353
11377
|
{
|
|
11354
11378
|
"name": "collapse",
|
|
@@ -11514,6 +11538,8 @@
|
|
|
11514
11538
|
"data-table-warning",
|
|
11515
11539
|
"data-table-error"
|
|
11516
11540
|
],
|
|
11541
|
+
"colorPattern": "data-table-<color>",
|
|
11542
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `data-table-<color>` accepts any color the app registers (see get_tokens → customColors). `data-table-brand` is as real as `data-table-primary` once `brand` is declared.",
|
|
11517
11543
|
"compoundSelectors": [
|
|
11518
11544
|
".data-table-sticky .data-table-scroll",
|
|
11519
11545
|
".data-table-sticky thead th",
|
|
@@ -11604,7 +11630,9 @@
|
|
|
11604
11630
|
"dock-success",
|
|
11605
11631
|
"dock-warning",
|
|
11606
11632
|
"dock-error"
|
|
11607
|
-
]
|
|
11633
|
+
],
|
|
11634
|
+
"colorPattern": "dock-<color>",
|
|
11635
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `dock-<color>` accepts any color the app registers (see get_tokens → customColors). `dock-brand` is as real as `dock-primary` once `brand` is declared."
|
|
11608
11636
|
},
|
|
11609
11637
|
{
|
|
11610
11638
|
"name": "drawer",
|
|
@@ -11704,9 +11732,6 @@
|
|
|
11704
11732
|
"select",
|
|
11705
11733
|
"textarea"
|
|
11706
11734
|
],
|
|
11707
|
-
"colorVariants": [
|
|
11708
|
-
"field-error"
|
|
11709
|
-
],
|
|
11710
11735
|
"compoundSelectors": [
|
|
11711
11736
|
".input[data-invalid], .select[data-invalid], .textarea[data-invalid]",
|
|
11712
11737
|
".input[data-status=\"error\"], .select[data-status=\"error\"], .textarea[data-status=\"error\"]",
|
|
@@ -11799,7 +11824,9 @@
|
|
|
11799
11824
|
"filter-success",
|
|
11800
11825
|
"filter-warning",
|
|
11801
11826
|
"filter-error"
|
|
11802
|
-
]
|
|
11827
|
+
],
|
|
11828
|
+
"colorPattern": "filter-<color>",
|
|
11829
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `filter-<color>` accepts any color the app registers (see get_tokens → customColors). `filter-brand` is as real as `filter-primary` once `brand` is declared."
|
|
11803
11830
|
},
|
|
11804
11831
|
{
|
|
11805
11832
|
"name": "footer",
|
|
@@ -11897,7 +11924,9 @@
|
|
|
11897
11924
|
"input-success",
|
|
11898
11925
|
"input-warning",
|
|
11899
11926
|
"input-error"
|
|
11900
|
-
]
|
|
11927
|
+
],
|
|
11928
|
+
"colorPattern": "input-<color>",
|
|
11929
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `input-<color>` accepts any color the app registers (see get_tokens → customColors). `input-brand` is as real as `input-primary` once `brand` is declared."
|
|
11901
11930
|
},
|
|
11902
11931
|
{
|
|
11903
11932
|
"name": "join",
|
|
@@ -12004,7 +12033,9 @@
|
|
|
12004
12033
|
"link-success",
|
|
12005
12034
|
"link-warning",
|
|
12006
12035
|
"link-error"
|
|
12007
|
-
]
|
|
12036
|
+
],
|
|
12037
|
+
"colorPattern": "link-<color>",
|
|
12038
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `link-<color>` accepts any color the app registers (see get_tokens → customColors). `link-brand` is as real as `link-primary` once `brand` is declared."
|
|
12008
12039
|
},
|
|
12009
12040
|
{
|
|
12010
12041
|
"name": "list",
|
|
@@ -12145,6 +12176,8 @@
|
|
|
12145
12176
|
"meter-warning",
|
|
12146
12177
|
"meter-error"
|
|
12147
12178
|
],
|
|
12179
|
+
"colorPattern": "meter-<color>",
|
|
12180
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `meter-<color>` accepts any color the app registers (see get_tokens → customColors). `meter-brand` is as real as `meter-primary` once `brand` is declared.",
|
|
12148
12181
|
"compoundSelectors": [
|
|
12149
12182
|
".meter-xs .meter-track",
|
|
12150
12183
|
".meter-sm .meter-track",
|
|
@@ -12211,6 +12244,8 @@
|
|
|
12211
12244
|
"multi-select-warning",
|
|
12212
12245
|
"multi-select-error"
|
|
12213
12246
|
],
|
|
12247
|
+
"colorPattern": "multi-select-<color>",
|
|
12248
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `multi-select-<color>` accepts any color the app registers (see get_tokens → customColors). `multi-select-brand` is as real as `multi-select-primary` once `brand` is declared.",
|
|
12214
12249
|
"compoundSelectors": [
|
|
12215
12250
|
".multi-select:focus-within",
|
|
12216
12251
|
".multi-select[data-disabled]"
|
|
@@ -12347,7 +12382,9 @@
|
|
|
12347
12382
|
"pagination-success",
|
|
12348
12383
|
"pagination-warning",
|
|
12349
12384
|
"pagination-error"
|
|
12350
|
-
]
|
|
12385
|
+
],
|
|
12386
|
+
"colorPattern": "pagination-<color>",
|
|
12387
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `pagination-<color>` accepts any color the app registers (see get_tokens → customColors). `pagination-brand` is as real as `pagination-primary` once `brand` is declared."
|
|
12351
12388
|
},
|
|
12352
12389
|
{
|
|
12353
12390
|
"name": "phone-input",
|
|
@@ -12383,7 +12420,19 @@
|
|
|
12383
12420
|
"pin-input-cell-warning",
|
|
12384
12421
|
"pin-input-cell-xl",
|
|
12385
12422
|
"pin-input-cell-xs"
|
|
12386
|
-
]
|
|
12423
|
+
],
|
|
12424
|
+
"colorVariants": [
|
|
12425
|
+
"pin-input-cell-primary",
|
|
12426
|
+
"pin-input-cell-secondary",
|
|
12427
|
+
"pin-input-cell-accent",
|
|
12428
|
+
"pin-input-cell-neutral",
|
|
12429
|
+
"pin-input-cell-info",
|
|
12430
|
+
"pin-input-cell-success",
|
|
12431
|
+
"pin-input-cell-warning",
|
|
12432
|
+
"pin-input-cell-error"
|
|
12433
|
+
],
|
|
12434
|
+
"colorPattern": "pin-input-cell-<color>",
|
|
12435
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `pin-input-cell-<color>` accepts any color the app registers (see get_tokens → customColors). `pin-input-cell-brand` is as real as `pin-input-cell-primary` once `brand` is declared."
|
|
12387
12436
|
},
|
|
12388
12437
|
{
|
|
12389
12438
|
"name": "popover",
|
|
@@ -12488,7 +12537,9 @@
|
|
|
12488
12537
|
"progress-success",
|
|
12489
12538
|
"progress-warning",
|
|
12490
12539
|
"progress-error"
|
|
12491
|
-
]
|
|
12540
|
+
],
|
|
12541
|
+
"colorPattern": "progress-<color>",
|
|
12542
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `progress-<color>` accepts any color the app registers (see get_tokens → customColors). `progress-brand` is as real as `progress-primary` once `brand` is declared."
|
|
12492
12543
|
},
|
|
12493
12544
|
{
|
|
12494
12545
|
"name": "prose",
|
|
@@ -12563,7 +12614,9 @@
|
|
|
12563
12614
|
"radio-success",
|
|
12564
12615
|
"radio-warning",
|
|
12565
12616
|
"radio-error"
|
|
12566
|
-
]
|
|
12617
|
+
],
|
|
12618
|
+
"colorPattern": "radio-<color>",
|
|
12619
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `radio-<color>` accepts any color the app registers (see get_tokens → customColors). `radio-brand` is as real as `radio-primary` once `brand` is declared."
|
|
12567
12620
|
},
|
|
12568
12621
|
{
|
|
12569
12622
|
"name": "range",
|
|
@@ -12597,6 +12650,8 @@
|
|
|
12597
12650
|
"range-warning",
|
|
12598
12651
|
"range-error"
|
|
12599
12652
|
],
|
|
12653
|
+
"colorPattern": "range-<color>",
|
|
12654
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `range-<color>` accepts any color the app registers (see get_tokens → customColors). `range-brand` is as real as `range-primary` once `brand` is declared.",
|
|
12600
12655
|
"compoundSelectors": [
|
|
12601
12656
|
".range[data-disabled] .range-thumb"
|
|
12602
12657
|
]
|
|
@@ -12636,6 +12691,8 @@
|
|
|
12636
12691
|
"rating-warning",
|
|
12637
12692
|
"rating-error"
|
|
12638
12693
|
],
|
|
12694
|
+
"colorPattern": "rating-<color>",
|
|
12695
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `rating-<color>` accepts any color the app registers (see get_tokens → customColors). `rating-brand` is as real as `rating-primary` once `brand` is declared.",
|
|
12639
12696
|
"compoundSelectors": [
|
|
12640
12697
|
".rating-readonly .rating-item"
|
|
12641
12698
|
]
|
|
@@ -12756,6 +12813,8 @@
|
|
|
12756
12813
|
"segment-field-warning",
|
|
12757
12814
|
"segment-field-error"
|
|
12758
12815
|
],
|
|
12816
|
+
"colorPattern": "segment-field-<color>",
|
|
12817
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `segment-field-<color>` accepts any color the app registers (see get_tokens → customColors). `segment-field-brand` is as real as `segment-field-primary` once `brand` is declared.",
|
|
12759
12818
|
"compoundSelectors": [
|
|
12760
12819
|
".segment-field:focus-within",
|
|
12761
12820
|
".segment-field[data-disabled]"
|
|
@@ -12819,7 +12878,9 @@
|
|
|
12819
12878
|
"select-success",
|
|
12820
12879
|
"select-warning",
|
|
12821
12880
|
"select-error"
|
|
12822
|
-
]
|
|
12881
|
+
],
|
|
12882
|
+
"colorPattern": "select-<color>",
|
|
12883
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `select-<color>` accepts any color the app registers (see get_tokens → customColors). `select-brand` is as real as `select-primary` once `brand` is declared."
|
|
12823
12884
|
},
|
|
12824
12885
|
{
|
|
12825
12886
|
"name": "selection-list",
|
|
@@ -12881,6 +12942,8 @@
|
|
|
12881
12942
|
"sidebar-warning",
|
|
12882
12943
|
"sidebar-error"
|
|
12883
12944
|
],
|
|
12945
|
+
"colorPattern": "sidebar-<color>",
|
|
12946
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `sidebar-<color>` accepts any color the app registers (see get_tokens → customColors). `sidebar-brand` is as real as `sidebar-primary` once `brand` is declared.",
|
|
12884
12947
|
"compoundSelectors": [
|
|
12885
12948
|
".sidebar[data-side=\"right\"]",
|
|
12886
12949
|
".sidebar[data-collapsed]",
|
|
@@ -12947,6 +13010,8 @@
|
|
|
12947
13010
|
"slider-warning",
|
|
12948
13011
|
"slider-error"
|
|
12949
13012
|
],
|
|
13013
|
+
"colorPattern": "slider-<color>",
|
|
13014
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `slider-<color>` accepts any color the app registers (see get_tokens → customColors). `slider-brand` is as real as `slider-primary` once `brand` is declared.",
|
|
12950
13015
|
"compoundSelectors": [
|
|
12951
13016
|
".slider[data-orientation=\"vertical\"]",
|
|
12952
13017
|
".slider-control[data-orientation=\"vertical\"]",
|
|
@@ -13042,6 +13107,8 @@
|
|
|
13042
13107
|
"status-warning",
|
|
13043
13108
|
"status-error"
|
|
13044
13109
|
],
|
|
13110
|
+
"colorPattern": "status-<color>",
|
|
13111
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `status-<color>` accepts any color the app registers (see get_tokens → customColors). `status-brand` is as real as `status-primary` once `brand` is declared.",
|
|
13045
13112
|
"compoundSelectors": [
|
|
13046
13113
|
"@keyframes silica-ping",
|
|
13047
13114
|
"@media (prefers-reduced-motion: reduce)"
|
|
@@ -13076,6 +13143,8 @@
|
|
|
13076
13143
|
"step-warning",
|
|
13077
13144
|
"step-error"
|
|
13078
13145
|
],
|
|
13146
|
+
"colorPattern": "step-<color>",
|
|
13147
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `step-<color>` accepts any color the app registers (see get_tokens → customColors). `step-brand` is as real as `step-primary` once `brand` is declared.",
|
|
13079
13148
|
"compoundSelectors": [
|
|
13080
13149
|
".step::before",
|
|
13081
13150
|
".step[data-content]::before",
|
|
@@ -13145,6 +13214,8 @@
|
|
|
13145
13214
|
"switch-warning",
|
|
13146
13215
|
"switch-error"
|
|
13147
13216
|
],
|
|
13217
|
+
"colorPattern": "switch-<color>",
|
|
13218
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `switch-<color>` accepts any color the app registers (see get_tokens → customColors). `switch-brand` is as real as `switch-primary` once `brand` is declared.",
|
|
13148
13219
|
"compoundSelectors": [
|
|
13149
13220
|
".switch[data-checked] .switch-thumb"
|
|
13150
13221
|
]
|
|
@@ -13201,6 +13272,8 @@
|
|
|
13201
13272
|
"tabs-warning",
|
|
13202
13273
|
"tabs-error"
|
|
13203
13274
|
],
|
|
13275
|
+
"colorPattern": "tabs-<color>",
|
|
13276
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `tabs-<color>` accepts any color the app registers (see get_tokens → customColors). `tabs-brand` is as real as `tabs-primary` once `brand` is declared.",
|
|
13204
13277
|
"compoundSelectors": [
|
|
13205
13278
|
".tabs-boxed .tabs-list",
|
|
13206
13279
|
".tabs-boxed .tabs-tab",
|
|
@@ -13249,6 +13322,8 @@
|
|
|
13249
13322
|
"tag-input-warning",
|
|
13250
13323
|
"tag-input-error"
|
|
13251
13324
|
],
|
|
13325
|
+
"colorPattern": "tag-input-<color>",
|
|
13326
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `tag-input-<color>` accepts any color the app registers (see get_tokens → customColors). `tag-input-brand` is as real as `tag-input-primary` once `brand` is declared.",
|
|
13252
13327
|
"compoundSelectors": [
|
|
13253
13328
|
".tag-input:focus-within",
|
|
13254
13329
|
".tag-input[data-disabled]"
|
|
@@ -13286,7 +13361,9 @@
|
|
|
13286
13361
|
"textarea-success",
|
|
13287
13362
|
"textarea-warning",
|
|
13288
13363
|
"textarea-error"
|
|
13289
|
-
]
|
|
13364
|
+
],
|
|
13365
|
+
"colorPattern": "textarea-<color>",
|
|
13366
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `textarea-<color>` accepts any color the app registers (see get_tokens → customColors). `textarea-brand` is as real as `textarea-primary` once `brand` is declared."
|
|
13290
13367
|
},
|
|
13291
13368
|
{
|
|
13292
13369
|
"name": "timeline",
|
|
@@ -13341,6 +13418,18 @@
|
|
|
13341
13418
|
"toast-title",
|
|
13342
13419
|
"toast-viewport"
|
|
13343
13420
|
],
|
|
13421
|
+
"colorVariants": [
|
|
13422
|
+
"toast[data-type=\"primary\"]",
|
|
13423
|
+
"toast[data-type=\"secondary\"]",
|
|
13424
|
+
"toast[data-type=\"accent\"]",
|
|
13425
|
+
"toast[data-type=\"neutral\"]",
|
|
13426
|
+
"toast[data-type=\"info\"]",
|
|
13427
|
+
"toast[data-type=\"success\"]",
|
|
13428
|
+
"toast[data-type=\"warning\"]",
|
|
13429
|
+
"toast[data-type=\"error\"]"
|
|
13430
|
+
],
|
|
13431
|
+
"colorPattern": "toast[data-type=\"<color>\"]",
|
|
13432
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `toast[data-type=\"<color>\"]` accepts any color the app registers (see get_tokens → customColors). `toast[data-type=\"brand\"]` is as real as `toast[data-type=\"primary\"]` once `brand` is declared.",
|
|
13344
13433
|
"compoundSelectors": [
|
|
13345
13434
|
".toast[data-type=\"primary\"]",
|
|
13346
13435
|
".toast[data-type=\"secondary\"]",
|
|
@@ -13386,6 +13475,8 @@
|
|
|
13386
13475
|
"toggle-group-warning",
|
|
13387
13476
|
"toggle-group-error"
|
|
13388
13477
|
],
|
|
13478
|
+
"colorPattern": "toggle-group-<color>",
|
|
13479
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `toggle-group-<color>` accepts any color the app registers (see get_tokens → customColors). `toggle-group-brand` is as real as `toggle-group-primary` once `brand` is declared.",
|
|
13389
13480
|
"compoundSelectors": [
|
|
13390
13481
|
".toggle-group-xs .toggle-group-item",
|
|
13391
13482
|
".toggle-group-sm .toggle-group-item",
|
|
@@ -13426,7 +13517,9 @@
|
|
|
13426
13517
|
"toggle-success",
|
|
13427
13518
|
"toggle-warning",
|
|
13428
13519
|
"toggle-error"
|
|
13429
|
-
]
|
|
13520
|
+
],
|
|
13521
|
+
"colorPattern": "toggle-<color>",
|
|
13522
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `toggle-<color>` accepts any color the app registers (see get_tokens → customColors). `toggle-brand` is as real as `toggle-primary` once `brand` is declared."
|
|
13430
13523
|
},
|
|
13431
13524
|
{
|
|
13432
13525
|
"name": "toolbar",
|
|
@@ -13584,6 +13677,8 @@
|
|
|
13584
13677
|
"wizard-warning",
|
|
13585
13678
|
"wizard-error"
|
|
13586
13679
|
],
|
|
13680
|
+
"colorPattern": "wizard-<color>",
|
|
13681
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `wizard-<color>` accepts any color the app registers (see get_tokens → customColors). `wizard-brand` is as real as `wizard-primary` once `brand` is declared.",
|
|
13587
13682
|
"compoundSelectors": [
|
|
13588
13683
|
".wizard-step[data-clickable]",
|
|
13589
13684
|
".wizard-step[data-disabled]",
|
|
@@ -13626,7 +13721,9 @@
|
|
|
13626
13721
|
"wordmark-success",
|
|
13627
13722
|
"wordmark-warning",
|
|
13628
13723
|
"wordmark-error"
|
|
13629
|
-
]
|
|
13724
|
+
],
|
|
13725
|
+
"colorPattern": "wordmark-<color>",
|
|
13726
|
+
"colorNote": "The eight above are the DEFAULT roles, not the whole set — `wordmark-<color>` accepts any color the app registers (see get_tokens → customColors). `wordmark-brand` is as real as `wordmark-primary` once `brand` is declared."
|
|
13630
13727
|
},
|
|
13631
13728
|
{
|
|
13632
13729
|
"name": "color-utilities",
|
package/dist/data/tokens.json
CHANGED
|
@@ -9,6 +9,60 @@
|
|
|
9
9
|
"warning",
|
|
10
10
|
"error"
|
|
11
11
|
],
|
|
12
|
+
"semanticColorsNote": "These eight are the DEFAULT roles, not a closed list — see customColors. An app can register any number of extra roles, and they work everywhere a built-in one does.",
|
|
13
|
+
"customColors": {
|
|
14
|
+
"summary": "Silica's core promise: N named colors cascade through everything. A color you register gets the full utility trio AND every component variant, with no codegen step and no safelist.",
|
|
15
|
+
"howToDeclare": "@plugin \"@wizeworks/silicaui\" { colors: primary, secondary, accent, neutral, info, success, warning, error, brand; }\n@theme { --color-brand: #7c3aed; }",
|
|
16
|
+
"declareNote": "The `colors:` list REPLACES the default set, so re-list the built-ins you still want. Using a `*-brand` class without registering `brand` leaves it unstyled; the plugin warns at build time (warn-unregistered-colors.js).",
|
|
17
|
+
"contentNote": "`--color-brand-content` (the legible ink ON brand) is optional — omit it and Silica auto-derives black/white by measured contrast. Declare it only to override that choice.",
|
|
18
|
+
"utilities": [
|
|
19
|
+
"text-<color>",
|
|
20
|
+
"bg-<color>",
|
|
21
|
+
"border-<color>",
|
|
22
|
+
"text-<color>-content",
|
|
23
|
+
"bg-<color>-content",
|
|
24
|
+
"border-<color>-content"
|
|
25
|
+
],
|
|
26
|
+
"componentPatterns": [
|
|
27
|
+
"alert-<color>",
|
|
28
|
+
"avatar-<color>",
|
|
29
|
+
"badge-<color>",
|
|
30
|
+
"btn-<color>",
|
|
31
|
+
"calendar-<color>",
|
|
32
|
+
"chat-bubble-<color>",
|
|
33
|
+
"checkbox-<color>",
|
|
34
|
+
"data-table-<color>",
|
|
35
|
+
"dock-<color>",
|
|
36
|
+
"filter-<color>",
|
|
37
|
+
"input-<color>",
|
|
38
|
+
"link-<color>",
|
|
39
|
+
"meter-<color>",
|
|
40
|
+
"multi-select-<color>",
|
|
41
|
+
"pagination-<color>",
|
|
42
|
+
"pin-input-cell-<color>",
|
|
43
|
+
"progress-<color>",
|
|
44
|
+
"radio-<color>",
|
|
45
|
+
"range-<color>",
|
|
46
|
+
"rating-<color>",
|
|
47
|
+
"segment-field-<color>",
|
|
48
|
+
"select-<color>",
|
|
49
|
+
"sidebar-<color>",
|
|
50
|
+
"slider-<color>",
|
|
51
|
+
"status-<color>",
|
|
52
|
+
"step-<color>",
|
|
53
|
+
"switch-<color>",
|
|
54
|
+
"tabs-<color>",
|
|
55
|
+
"tag-input-<color>",
|
|
56
|
+
"textarea-<color>",
|
|
57
|
+
"toast[data-type=\"<color>\"]",
|
|
58
|
+
"toggle-<color>",
|
|
59
|
+
"toggle-group-<color>",
|
|
60
|
+
"wizard-<color>",
|
|
61
|
+
"wordmark-<color>"
|
|
62
|
+
],
|
|
63
|
+
"componentPatternsNote": "Every colorable component, as a selector template — substitute a registered color name. Most are `<root>-<color>`; chat, pin-input and toast are not, so read the pattern rather than assuming.",
|
|
64
|
+
"builderNote": "In @wizeworks/silicaui-builder, a color invented live in the theme editor is generated at runtime (scoped to the canvas) from these same patterns, so it behaves identically to a build-time-declared one without a rebuild."
|
|
65
|
+
},
|
|
12
66
|
"light": {
|
|
13
67
|
"base-100": "oklch(98% 0.003 250)",
|
|
14
68
|
"base-200": "oklch(95% 0.004 250)",
|
package/dist/server.js
CHANGED
|
@@ -44,8 +44,8 @@ var INSTRUCTIONS = `Silica UI is ONE design system delivered through THREE paths
|
|
|
44
44
|
Path 3 fails SILENTLY where the others fail loudly \u2014 an unlisted tag becomes a <div>, an unlisted attribute is dropped, an invented binding field is not persisted, and the output still looks plausible. Look it up.
|
|
45
45
|
|
|
46
46
|
Rules that hold on every path:
|
|
47
|
-
- Never invent a class, prop,
|
|
48
|
-
- Colors are semantic tokens (get_tokens), never hex.
|
|
47
|
+
- Never invent a class, prop, or block key. Everything this server returns is extracted from Silica's source at release time \u2014 look it up rather than guessing, including when you are fairly confident.
|
|
48
|
+
- Colors are semantic tokens (get_tokens), never hex \u2014 but the eight built-in roles are a DEFAULT, not a closed set. Silica's core promise is that N named colors cascade through everything: an app registers extra roles (get_tokens \u2192 customColors for the two-line syntax) and each works everywhere a built-in does, so \`btn-brand\` is exactly as real as \`btn-primary\`. Read a component's \`colorPattern\` (get_component) and substitute the registered name \u2014 most are \`<root>-<color>\`, but chat, pin-input and toast are not. A REGISTERED color is the one name you may use that this catalog does not list literally; an unregistered one is still an invention, and renders unstyled.
|
|
49
49
|
- Do not re-skin a component with inline styles or arbitrary hex \u2014 it defeats theming and light/dark.
|
|
50
50
|
- The same name can exist on more than one path with a different shape. get_component with no \`package\` returns every path's answer at once; pass \`package\` to narrow.
|
|
51
51
|
- Don't know the name? search_docs first. Unsure what to install? list_packages.
|
|
@@ -209,7 +209,7 @@ function createServer() {
|
|
|
209
209
|
"get_tokens",
|
|
210
210
|
{
|
|
211
211
|
title: "Get Silica UI design tokens",
|
|
212
|
-
description: "Get the semantic color list and their light/dark OKLCH values, the typography token model, and the scalar theme tokens (radius/border/depth/noise/focus/disabled-opacity) with defaults, ranges, and what each one actually affects.",
|
|
212
|
+
description: "Get the semantic color list and their light/dark OKLCH values, the typography token model, and the scalar theme tokens (radius/border/depth/noise/focus/disabled-opacity) with defaults, ranges, and what each one actually affects. Also returns `customColors`: how to register extra color roles beyond the built-in eight, and the selector pattern for every component a registered color reaches \u2014 call this before concluding a color like `brand` is unavailable.",
|
|
213
213
|
inputSchema: {}
|
|
214
214
|
},
|
|
215
215
|
async () => ({ content: [{ type: "text", text: JSON.stringify(tokens, null, 2) }] })
|
|
@@ -416,6 +416,31 @@ function createServer() {
|
|
|
416
416
|
([component, classes]) => classes.filter((cls) => cls.toLowerCase().includes(q)).map((cls) => ({ kind: "class", component, class: cls }))
|
|
417
417
|
);
|
|
418
418
|
const matchedTokens = tokens.semanticColors.filter((name) => name.toLowerCase().includes(q)).map((name) => ({ kind: "token", name }));
|
|
419
|
+
const COLOR_CONCEPT = [
|
|
420
|
+
"custom color",
|
|
421
|
+
"custom colors",
|
|
422
|
+
"color role",
|
|
423
|
+
"n-color",
|
|
424
|
+
"brand",
|
|
425
|
+
"register",
|
|
426
|
+
"registered",
|
|
427
|
+
"declare",
|
|
428
|
+
"@plugin",
|
|
429
|
+
"plugin",
|
|
430
|
+
"@theme",
|
|
431
|
+
"palette",
|
|
432
|
+
"extra color",
|
|
433
|
+
"new color"
|
|
434
|
+
];
|
|
435
|
+
const matchedColorConcept = COLOR_CONCEPT.some((k) => k.includes(q) || q.includes(k)) ? [
|
|
436
|
+
{
|
|
437
|
+
kind: "concept",
|
|
438
|
+
name: "custom colors (N-color)",
|
|
439
|
+
summary: tokens.customColors.summary,
|
|
440
|
+
tool: "get_tokens",
|
|
441
|
+
field: "customColors"
|
|
442
|
+
}
|
|
443
|
+
] : [];
|
|
419
444
|
const matchedBindings = schema.dataBindings.filter(
|
|
420
445
|
(b) => b.kind.toLowerCase().includes(q) || b.doc.toLowerCase().includes(q) || b.fields.some((f) => f.name.toLowerCase().includes(q))
|
|
421
446
|
).map((b) => ({ kind: "data-binding", binding: b.kind, tool: "get_node_schema" }));
|
|
@@ -433,6 +458,7 @@ function createServer() {
|
|
|
433
458
|
...matchedBehaviors,
|
|
434
459
|
...matchedClasses,
|
|
435
460
|
...matchedTokens,
|
|
461
|
+
...matchedColorConcept,
|
|
436
462
|
...matchedBindings,
|
|
437
463
|
...matchedNodeKinds,
|
|
438
464
|
...matchedTags,
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server.ts"],"names":[],"mappings":";;;;;;;;AAOA,IAAM,OAAO,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AACxD,IAAM,OAAA,GAAU,IAAA,CAAK,IAAA,CAAK,IAAA,EAAM,MAAM,CAAA;AAEtC,SAAS,SAAY,IAAA,EAAiB;AACpC,EAAA,OAAO,IAAA,CAAK,KAAA,CAAM,YAAA,CAAa,IAAA,CAAK,IAAA,CAAK,OAAA,EAAS,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,CAAA,EAAG,MAAM,CAAC,CAAA;AAC5E;AAiBA,SAAS,cAAA,GAAyB;AAGhC,EAAA,IAAI;AACF,IAAA,MAAM,MAAM,IAAA,CAAK,KAAA;AAAA,MACf,aAAa,IAAA,CAAK,IAAA,CAAK,MAAM,IAAA,EAAM,cAAc,GAAG,MAAM;AAAA,KAC5D;AACA,IAAA,IAAI,OAAO,GAAA,CAAI,OAAA,KAAY,YAAY,GAAA,CAAI,OAAA,SAAgB,GAAA,CAAI,OAAA;AAC/D,IA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AAA,CAAO,QAAQ,SAAS,CAAA;AAChC","file":"server.js","sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\n\nconst here = path.dirname(fileURLToPath(import.meta.url));\nconst dataDir = path.join(here, \"data\");\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(path.join(dataDir, `${name}.json`), \"utf8\")) as T;\n}\n\n/**\n * The version this catalog documents, read from our OWN package.json at\n * startup rather than baked into the generated catalog.\n *\n * Every package in the family is released in lockstep — they're all listed in\n * `fixed` in .changeset/config.json, so their versions are identical by\n * construction — which makes our own version the right answer for all of them.\n *\n * This used to be snapshotted into `packages.json` at catalog-generation time,\n * but `gen` isn't part of `build` or the release, so the number froze at\n * whichever version happened to be current the last time someone ran it by\n * hand, and the server reported 0.26.0 while npm served 0.29.0. Reading it at\n * runtime makes that drift structurally impossible instead of a step someone\n * has to remember.\n */\nfunction readOwnVersion(): string {\n // `here` is dist/ in a build and src/ in dev; package.json sits one level up\n // from both, and npm always includes it in the published tarball.\n try {\n const pkg = JSON.parse(\n readFileSync(path.join(here, \"..\", \"package.json\"), \"utf8\"),\n ) as { version?: unknown };\n if (typeof pkg.version === \"string\" && pkg.version) return pkg.version;\n console.error(\n \"[silicaui-mcp] package.json has no usable `version`; reporting 'unknown'.\",\n );\n } catch (err) {\n console.error(\n `[silicaui-mcp] could not read own package.json (${(err as Error).message}); reporting 'unknown'.`,\n );\n }\n return \"unknown\";\n}\n\nconst VERSION = readOwnVersion();\n\ninterface PackageMeta {\n name: string;\n purpose: string;\n install: string | null;\n private?: boolean;\n}\n\ninterface TokensData {\n semanticColors: string[];\n light: Record<string, string>;\n dark: Record<string, string>;\n typography: { baseFontSize: string; fontFamilyTokens: string[]; note: string };\n}\n\ninterface PropMember {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\ninterface PropsInterface {\n name: string;\n extends?: string;\n members: PropMember[];\n}\n\n/**\n * The routing preamble every connecting client receives from `initialize`,\n * before it calls a single tool.\n *\n * Silica ships one design system through three delivery paths, and the choice\n * between them is made BEFORE any tool call — by which point per-tool\n * descriptions are too late to help. Without this, an agent got ten tools in a\n * bag and inferred the architecture from their names; the standard failure was\n * reaching for `@wizeworks/silicaui-react` while emitting non-React output, or\n * shipping node-tree markup with no behavior runtime and wondering why nothing\n * opened.\n *\n * Deliberately names no counts and no version — those drift. Package names are\n * asserted against the real catalog by verify.mjs.\n */\nconst INSTRUCTIONS = `Silica UI is ONE design system delivered through THREE paths. Decide which path matches the code you are writing BEFORE writing any markup — the paths share a class vocabulary but are not interchangeable, and mixing them is the most common way an integration breaks.\n\n1. CSS — \\`@wizeworks/silicaui\\`\n A Tailwind v4 plugin. You write plain HTML and put Silica's classes on it: \\`<button class=\"btn btn-primary\">\\`. No JavaScript ships, so nothing is interactive — a dialog styled this way will not open. Use it for static markup, server-rendered templates (Rails, Django, PHP, Go, …), email, or any framework at all. It is the floor the other two paths stand on.\n → get_component(name, package \"@wizeworks/silicaui\") for a family's root class, its parts, and its color variants; list_classes for the literal names.\n\n2. React — \\`@wizeworks/silicaui-react\\`\n Typed React components over those same classes, with Base UI supplying real behavior and accessibility: \\`<Button color=\"primary\" size=\"lg\">\\`. Use it whenever the output is React or Next.js.\n → get_component(name, package \"@wizeworks/silicaui-react\") for real props (extracted from the TypeScript source) and a working usage example.\n\n3. HTML / node-tree — \\`@wizeworks/silicaui-html\\` + \\`@wizeworks/silicaui-behaviors\\`\n A framework-neutral node-tree schema that projects to HTML — for generated or user-authored documents: site builders, CMS output, static export. Component macros expand to element subtrees carrying \\`data-sui-*\\` markers, which the zero-dependency \\`@wizeworks/silicaui-behaviors\\` runtime hydrates at load. That runtime is what makes path 3 interactive; without it you have path 1.\n → get_node_schema FIRST for the tree's own shape: the node kinds, the data-binding vocabulary (how a node draws live content, repeats over a collection, or hides itself), the resolution contract, and the tag/attribute allowlist \\`toHtml\\` enforces. Then get_component(name, package \"@wizeworks/silicaui-html\") for the macro; list_blocks / get_block for composed sections; list_behaviors for the marker contract.\n Path 3 fails SILENTLY where the others fail loudly — an unlisted tag becomes a <div>, an unlisted attribute is dropped, an invented binding field is not persisted, and the output still looks plausible. Look it up.\n\nRules that hold on every path:\n- Never invent a class, prop, color, or block key. Everything this server returns is extracted from Silica's source at release time — look it up rather than guessing, including when you are fairly confident.\n- Colors are semantic tokens (get_tokens), never hex. An app can declare extra color roles; those work everywhere a built-in one does.\n- Do not re-skin a component with inline styles or arbitrary hex — it defeats theming and light/dark.\n- The same name can exist on more than one path with a different shape. get_component with no \\`package\\` returns every path's answer at once; pass \\`package\\` to narrow.\n- Don't know the name? search_docs first. Unsure what to install? list_packages.\n\nAuthoring an EMAIL through \\`@wizeworks/silicaui-builder/email\\`? That is a separate surface, not a fourth path: a CLOSED document schema of typed nodes that projects to table-based inline-styled HTML. Its kinds, fields, and nesting rules are enforced — an invented kind or an illegal nesting is dropped silently, with no error to read — so call list_email_nodes / get_email_node rather than reasoning from the paths above. Classes and components do not apply there; colors are literal hex.\n\nSigns you are on the wrong path: importing @wizeworks/silicaui-react into output that is not React; hand-writing \\`data-sui-*\\` markers (they come from macro expansion, never from you); shipping path-3 markup without loading @wizeworks/silicaui-behaviors; expecting path 1 alone to open a dialog.`;\n\ninterface ComponentData {\n name: string;\n package: string;\n category: string;\n sourceFile: string;\n /** silicaui-react entries: extracted from source via TS AST. silicaui-html\n * macros carry no static description (never hand-authored — see label/icon\n * instead) and omit these two fields. */\n description?: string;\n props?: PropsInterface[];\n usageExample?: string | null;\n /** silicaui-html macros only: palette label/icon, whether it's a container,\n * and the BehaviorType(s) its expansion carries (found by actually calling\n * expand(), not guessed — see get_behavior for the marker contract). */\n label?: string;\n icon?: string;\n container?: boolean;\n behaviors?: string[];\n /** silicaui (CSS) entries only: the family's root class (null when it has\n * none — see familyPrefix/rootNote), every literal class it generates, its\n * color variants, and any compound selector that reveals required structure. */\n root?: string | null;\n familyPrefix?: string;\n rootNote?: string;\n classes?: string[];\n colorVariants?: string[];\n compoundSelectors?: string[];\n}\n\ninterface BlockSlot {\n name: string;\n [key: string]: unknown;\n}\n\ninterface BlockData {\n key: string;\n name: string;\n category: string;\n version: string;\n description: string;\n tags?: string[];\n colors: string[];\n behaviors: string[];\n emailEligible: boolean;\n slots: BlockSlot[];\n root: unknown;\n preview?: unknown;\n}\n\ninterface BehaviorData {\n type: string;\n description: string;\n}\n\ninterface EmailFieldData {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\ninterface EmailKindData {\n kind: string;\n typeName: string;\n doc: string;\n isContent: boolean;\n container: boolean;\n holds: string[];\n allowedParents: string[];\n fields: EmailFieldData[];\n binding: { default?: string; fields: Record<string, string> } | null;\n sourceFile: string;\n}\n\ninterface EmailData {\n entrypoint: string;\n reactEntrypoint: string;\n note: string;\n sharedFields: EmailFieldData[];\n bindingNote: string;\n /** The envelope around the node tree — EmailDocument/EmailProject/\n * EmailColorDefaults and friends. A kind list alone can't answer \"what do I\n * wrap this in\". */\n documentTypes: Array<{ typeName: string; doc: string; fields: EmailFieldData[] }>;\n kinds: EmailKindData[];\n palette: Array<{ key: string; label: string; hint: string; icon: string; kind: string }>;\n}\n\ninterface FieldData {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\n/** Path 3's DOCUMENT schema — the node tree itself, as opposed to what you put\n * in it. Generated from silicaui-html's own source; see gen-catalog's\n * schema.json section for why each part is extracted rather than described. */\ninterface SchemaData {\n entrypoint: string;\n behaviorRuntime: string;\n sourceFile: string;\n note: string;\n child: string;\n nodeBase: FieldData[];\n kinds: Array<{ kind: string; typeName: string; doc: string; sharedFields: boolean; fields: FieldData[] }>;\n bindingNote: string;\n dataBindings: Array<{ kind: string; doc: string; fields: Array<{ name: string; optional: boolean; type: string }> }>;\n resolution: {\n note: string;\n honesty: string;\n host: FieldData[];\n resolved: FieldData[];\n scope: FieldData[];\n options: FieldData[];\n diagnostic: FieldData[];\n };\n elementFloor: {\n note: string;\n globalAttrs: string[];\n tags: Array<{ tag: string; group: string; void: boolean; attrs: string[] }>;\n };\n}\n\nconst packages = loadJson<PackageMeta[]>(\"packages\");\nconst tokens = loadJson<TokensData>(\"tokens\");\nconst classesByComponent = loadJson<Record<string, string[]>>(\"classes\");\nconst blocks = loadJson<BlockData[]>(\"blocks\");\nconst behaviors = loadJson<BehaviorData[]>(\"behaviors\");\nconst components = loadJson<ComponentData[]>(\"components\");\nconst email = loadJson<EmailData>(\"email\");\nconst schema = loadJson<SchemaData>(\"schema\");\n\n/** CSS → React → HTML: the order the instructions introduce the paths in, so a\n * multi-path get_component answer reads the same way every time. Packages not\n * listed (the wrappers) sort last via indexOf's -1... which sorts them FIRST,\n * so map those to a large index instead. */\nconst PATH_ORDER_LIST = [\n \"@wizeworks/silicaui\",\n \"@wizeworks/silicaui-react\",\n \"@wizeworks/silicaui-html\",\n];\nconst PATH_ORDER = {\n indexOf(pkg: string): number {\n const i = PATH_ORDER_LIST.indexOf(pkg);\n return i === -1 ? PATH_ORDER_LIST.length : i;\n },\n};\n\nfunction toKebab(name: string): string {\n return name\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction blockSummary(b: BlockData) {\n const { root: _root, ...summary } = b;\n return summary;\n}\n\nexport function createServer(): McpServer {\n const server = new McpServer(\n {\n name: \"@wizeworks/silicaui-mcp\",\n version: VERSION,\n },\n { instructions: INSTRUCTIONS },\n );\n\n server.registerTool(\n \"list_packages\",\n {\n title: \"List Silica UI packages\",\n description:\n \"List every package in the Silica UI family (@wizeworks/silicaui, @wizeworks/silicaui-react, @wizeworks/silicaui-html, @wizeworks/silicaui-behaviors, and the wrapper packages), with purpose, install command, and version.\",\n inputSchema: {},\n },\n async () => ({\n content: [\n {\n type: \"text\",\n // Version is stamped here, not stored in the catalog — see VERSION.\n text: JSON.stringify(\n packages.map((p) => ({ ...p, version: VERSION })),\n null,\n 2,\n ),\n },\n ],\n }),\n );\n\n server.registerTool(\n \"list_components\",\n {\n title: \"List Silica UI components\",\n description:\n \"List component names, categories, and source packages — spans ALL THREE delivery paths: @wizeworks/silicaui (CSS class families for plain HTML), @wizeworks/silicaui-react (typed React components), and @wizeworks/silicaui-html (framework-neutral ComponentDef macros for generated/non-React output). The same component usually exists on more than one path with a completely different shape; get_component returns every path's answer unless you pass a package. Filter here with the package param (e.g. '@wizeworks/silicaui', '@wizeworks/silicaui-react', '@wizeworks/silicaui-html', '@wizeworks/silicaui-charts').\",\n inputSchema: {\n package: z.string().optional().describe(\"Filter to one package name, e.g. '@wizeworks/silicaui-react'.\"),\n },\n },\n async ({ package: pkg }) => {\n const filtered = pkg ? components.filter((c) => c.package === pkg) : components;\n const summary = filtered.map(({ name, package: p, category, sourceFile }) => ({\n name,\n package: p,\n category,\n sourceFile,\n }));\n return { content: [{ type: \"text\", text: JSON.stringify(summary, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_component\",\n {\n title: \"Get a Silica UI component's real shape\",\n description:\n \"Get a component's real definition on whichever delivery path you're building on — for @wizeworks/silicaui (CSS): the family's root class, every literal class it generates, its color variants, and any compound selector that reveals required markup structure; for @wizeworks/silicaui-react: props (name, type, optional, doc — extracted from its actual TypeScript source) plus a real, working usage example; for @wizeworks/silicaui-html: its palette category/label/icon, whether it's a container, and the BehaviorType(s) it carries (cross-reference get_behavior for the marker contract). Use this instead of guessing class names, prop names, or shapes. Omit package to see every path's answer side by side; pass it to get just one.\",\n inputSchema: {\n name: z.string().describe(\"Component name, e.g. 'Button', 'DataTable', 'Dialog'.\"),\n package: z.string().optional().describe(\"Disambiguate when the name exists in more than one package, e.g. '@wizeworks/silicaui-html'.\"),\n },\n },\n async ({ name, package: pkg }) => {\n let matches = components.filter((c) => c.name.toLowerCase() === name.toLowerCase());\n if (pkg) matches = matches.filter((c) => c.package === pkg);\n if (!matches.length) {\n return {\n content: [\n {\n type: \"text\",\n text: `No component named \"${name}\"${pkg ? ` in ${pkg}` : \"\"}. Call list_components to see valid names.`,\n },\n ],\n isError: true,\n };\n }\n // A name on more than one path used to be an isError telling the caller\n // to pick a package — which costs a round trip and, worse, asks for a\n // choice the caller can't make yet: it doesn't know how the shapes\n // differ, which is the very thing it's asking about. Returning all of\n // them answers the question AND demonstrates the three paths at the one\n // moment the distinction actually matters.\n if (matches.length > 1) {\n const ordered = [...matches].sort(\n (a, b) => PATH_ORDER.indexOf(a.package) - PATH_ORDER.indexOf(b.package),\n );\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n name: ordered[0]?.name ?? name,\n note:\n `\"${name}\" exists on ${ordered.length} delivery paths, listed below with their real (different) shapes: ` +\n `${ordered.map((c) => c.package).join(\", \")}. Use the one matching the code you're writing — ` +\n `they are not interchangeable. Pass \\`package\\` to get just one.`,\n paths: ordered,\n },\n null,\n 2,\n ),\n },\n ],\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(matches[0], null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_classes\",\n {\n title: \"List real Silica UI CSS class names\",\n description:\n \"List the exact, literal CSS class names Silica UI generates for a core component (e.g. 'button', 'card', 'badge') — or all components if none given. These are extracted directly from the class generators, so they are never hallucinated. Also covers 'color-utilities' (text-*/bg-*/border-* for every declared color). This returns a flat list; for the CSS path's STRUCTURE — which class is the root, which are its parts, which are color variants — call get_component with package '@wizeworks/silicaui'.\",\n inputSchema: {\n component: z\n .string()\n .optional()\n .describe(\"A core @wizeworks/silicaui component name, e.g. 'button'. Omit to list every component's classes.\"),\n },\n },\n async ({ component }) => {\n if (!component) {\n return { content: [{ type: \"text\", text: JSON.stringify(classesByComponent, null, 2) }] };\n }\n const key = toKebab(component);\n const classes = classesByComponent[key];\n if (!classes) {\n return {\n content: [\n {\n type: \"text\",\n text: `No class data for \"${component}\". Known components: ${Object.keys(classesByComponent).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify({ component: key, classes }, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_tokens\",\n {\n title: \"Get Silica UI design tokens\",\n description:\n \"Get the semantic color list and their light/dark OKLCH values, the typography token model, and the scalar theme tokens (radius/border/depth/noise/focus/disabled-opacity) with defaults, ranges, and what each one actually affects.\",\n inputSchema: {},\n },\n async () => ({ content: [{ type: \"text\", text: JSON.stringify(tokens, null, 2) }] }),\n );\n\n server.registerTool(\n \"list_blocks\",\n {\n title: \"List Silica UI composed blocks\",\n description:\n \"List composed page blocks from @wizeworks/silicaui-html (hero sections, FAQs, feature grids, …) without their full node tree. Optionally filter by category or tag.\",\n inputSchema: {\n category: z.string().optional(),\n tag: z.string().optional(),\n },\n },\n async ({ category, tag }) => {\n const filtered = blocks.filter(\n (b) => (!category || b.category === category) && (!tag || (b.tags ?? []).includes(tag)),\n );\n return { content: [{ type: \"text\", text: JSON.stringify(filtered.map(blockSummary), null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_block\",\n {\n title: \"Get a Silica UI block's full node tree\",\n description:\n \"Get one composed block's full definition, including its node tree — the real, validated structure to reuse or adapt, not a guess.\",\n inputSchema: {\n key: z.string().describe(\"The block's stable key, e.g. 'hero_split_cta'.\"),\n },\n },\n async ({ key }) => {\n const block = blocks.find((b) => b.key === key);\n if (!block) {\n return {\n content: [\n {\n type: \"text\",\n text: `No block \"${key}\". Known keys: ${blocks.map((b) => b.key).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(block, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_behaviors\",\n {\n title: \"List Silica UI behavior types\",\n description:\n \"List the closed set of interactive behaviors that @wizeworks/silicaui-behaviors hydrates from data-sui-* markers (the vanilla-JS runtime for non-React output). Each type is also the BehaviorType a @wizeworks/silicaui-html ComponentDef macro carries — cross-reference with get_component. Call this to see the current set rather than assuming a fixed list; it grows over time.\",\n inputSchema: {},\n },\n async () => ({ content: [{ type: \"text\", text: JSON.stringify(behaviors, null, 2) }] }),\n );\n\n server.registerTool(\n \"get_behavior\",\n {\n title: \"Get one Silica UI behavior's contract\",\n description: \"Get the marker contract and semantics for one behavior type.\",\n inputSchema: {\n type: z.string().describe(\"Behavior type, e.g. 'disclosure'.\"),\n },\n },\n async ({ type }) => {\n const behavior = behaviors.find((b) => b.type === type);\n if (!behavior) {\n return {\n content: [\n {\n type: \"text\",\n text: `No behavior \"${type}\". Known types: ${behaviors.map((b) => b.type).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(behavior, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_email_nodes\",\n {\n title: \"List the email builder's node kinds\",\n description:\n \"List every node kind an email document can contain (@wizeworks/silicaui-builder/email) with its nesting rules — what each kind may HOLD and which kinds may hold IT — plus the insertable palette presets. This schema is CLOSED and enforced: `EmailEditor.insert` returns undefined for an illegal kind or nesting, silently, so check here rather than assuming a site/HTML structure carries over. Email nodes carry typed fields, not classes, and literal hex colors, not tokens. Call get_email_node for one kind's real fields.\",\n inputSchema: {},\n },\n async () => ({\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n entrypoint: email.entrypoint,\n reactEntrypoint: email.reactEntrypoint,\n note: email.note,\n bindingNote: email.bindingNote,\n kinds: email.kinds.map(({ kind, typeName, isContent, container, holds, allowedParents, binding }) => ({\n kind,\n typeName,\n isContent,\n container,\n holds,\n allowedParents,\n bindableFields: binding ? Object.keys(binding.fields) : [],\n defaultBindTarget: binding?.default ?? null,\n })),\n palette: email.palette,\n // The envelope, in full: it's small, and a caller that has the\n // kinds but not `EmailDocument` still can't produce a document.\n documentTypes: email.documentTypes,\n },\n null,\n 2,\n ),\n },\n ],\n }),\n );\n\n server.registerTool(\n \"get_email_node\",\n {\n title: \"Get an email node kind's real fields\",\n description:\n \"Get one email node kind's full definition: every typed field with its TypeScript type, whether it's optional, and its source doc comment; the fields shared by every node (id/ord/data/locked); its nesting rules; and its data-binding contract — which `attr` a `value` bind may target and which one a bind with no `attr` fills. Use this instead of guessing field names: an unknown field is dropped by the engine and an unknown bind target is inert, neither with an error.\",\n inputSchema: {\n kind: z.string().describe(\"Node kind, e.g. 'link', 'image', 'section'. See list_email_nodes.\"),\n },\n },\n async ({ kind }) => {\n const node = email.kinds.find((k) => k.kind === kind.toLowerCase());\n if (!node) {\n return {\n content: [\n {\n type: \"text\",\n text: `No email node kind \"${kind}\". Known kinds: ${email.kinds.map((k) => k.kind).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n ...node,\n sharedFields: email.sharedFields,\n bindingNote: email.bindingNote,\n palette: email.palette.filter((p) => p.kind === node.kind),\n },\n null,\n 2,\n ),\n },\n ],\n };\n },\n );\n\n server.registerTool(\n \"get_node_schema\",\n {\n title: \"Get the Silica UI node-tree schema (path 3)\",\n description:\n \"Get the DOCUMENT schema for @wizeworks/silicaui-html — the shape of the tree itself, as opposed to what you put in it. Covers the four node kinds and their fields, the typed system-metadata band every node carries (data / slot / behavior / part / locked / instanceOf), the DATA-BINDING vocabulary with every field, the resolution contract a host implements, and the raw-element/attribute allowlist `toHtml` enforces. Call this before authoring or generating a node tree: the failures here are SILENT — an unlisted tag is downgraded to <div>, an unlisted attribute is dropped, an invented binding field is not persisted — so none of it can be inferred from output that looks like it worked. Not needed for path 1 (CSS classes on your own HTML) or path 2 (React).\",\n inputSchema: {\n section: z\n .enum([\"all\", \"nodes\", \"bindings\", \"resolution\", \"elements\"])\n .optional()\n .describe(\n \"Narrow the answer: 'nodes' (kinds + the shared metadata band), 'bindings' (the data vocabulary), 'resolution' (the host hooks and their honesty contract), 'elements' (the tag/attribute floor). Omit for everything.\",\n ),\n },\n },\n async ({ section }) => {\n const head = {\n entrypoint: schema.entrypoint,\n behaviorRuntime: schema.behaviorRuntime,\n sourceFile: schema.sourceFile,\n note: schema.note,\n };\n const sections: Record<string, unknown> = {\n nodes: { child: schema.child, nodeBase: schema.nodeBase, kinds: schema.kinds },\n bindings: { bindingNote: schema.bindingNote, dataBindings: schema.dataBindings },\n resolution: schema.resolution,\n elements: schema.elementFloor,\n };\n const body =\n !section || section === \"all\"\n ? { ...sections.nodes as object, ...sections.bindings as object, resolution: schema.resolution, elementFloor: schema.elementFloor }\n : sections[section];\n return { content: [{ type: \"text\", text: JSON.stringify({ ...head, ...(body as object) }, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"search_docs\",\n {\n title: \"Search Silica UI catalog data\",\n description:\n \"Full-text search across everything this server knows: component names/descriptions, block names/descriptions, behavior descriptions, literal CSS class names, design tokens, and the email builder's node kinds + their fields. Use this when you don't know the exact name to look up.\",\n inputSchema: {\n query: z.string().describe(\"Search term, case-insensitive.\"),\n },\n },\n async ({ query }) => {\n const q = query.toLowerCase();\n const matchedComponents = components\n .filter((c) => c.name.toLowerCase().includes(q) || (c.description ?? \"\").toLowerCase().includes(q) || (c.label ?? \"\").toLowerCase().includes(q))\n .map((c) => ({ kind: \"component\", name: c.name, package: c.package }));\n const matchedBlocks = blocks\n .filter((b) => b.name.toLowerCase().includes(q) || b.description.toLowerCase().includes(q))\n .map((b) => ({ kind: \"block\", key: b.key, name: b.name }));\n const matchedBehaviors = behaviors\n .filter((b) => b.type.toLowerCase().includes(q) || b.description.toLowerCase().includes(q))\n .map((b) => ({ kind: \"behavior\", type: b.type }));\n const matchedClasses = Object.entries(classesByComponent).flatMap(([component, classes]) =>\n classes\n .filter((cls) => cls.toLowerCase().includes(q))\n .map((cls) => ({ kind: \"class\" as const, component, class: cls })),\n );\n const matchedTokens = tokens.semanticColors\n .filter((name) => name.toLowerCase().includes(q))\n .map((name) => ({ kind: \"token\" as const, name }));\n // The node-tree vocabulary. Without this, \"repeat\", \"limit\", \"srcset\" and\n // \"conditional\" found nothing here and an agent concluded the concept did\n // not exist — the exact failure a searchable catalog is meant to prevent.\n const matchedBindings = schema.dataBindings\n .filter(\n (b) =>\n b.kind.toLowerCase().includes(q) ||\n b.doc.toLowerCase().includes(q) ||\n b.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((b) => ({ kind: \"data-binding\" as const, binding: b.kind, tool: \"get_node_schema\" }));\n const matchedNodeKinds = schema.kinds\n .filter((k) => k.kind.toLowerCase().includes(q) || k.typeName.toLowerCase().includes(q) || k.doc.toLowerCase().includes(q))\n .map((k) => ({ kind: \"node-kind\" as const, node: k.kind, tool: \"get_node_schema\" }));\n const matchedTags = schema.elementFloor.tags\n .filter((t) => t.tag.toLowerCase() === q || t.attrs.some((a) => a.toLowerCase() === q))\n .map((t) => ({ kind: \"element-tag\" as const, tag: t.tag, group: t.group, tool: \"get_node_schema\" }));\n // Email node kinds match on their own name, their doc, or any field they\n // declare — \"href\" should find the `link` group even though no component\n // or class is called that.\n const matchedEmail = email.kinds\n .filter(\n (k) =>\n k.kind.includes(q) ||\n k.typeName.toLowerCase().includes(q) ||\n k.doc.toLowerCase().includes(q) ||\n k.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((k) => ({ kind: \"email-node\" as const, node: k.kind, typeName: k.typeName }));\n const matchedEmailTypes = email.documentTypes\n .filter(\n (t) =>\n t.typeName.toLowerCase().includes(q) ||\n t.doc.toLowerCase().includes(q) ||\n t.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((t) => ({ kind: \"email-type\" as const, typeName: t.typeName }));\n const results = [\n ...matchedComponents,\n ...matchedBlocks,\n ...matchedBehaviors,\n ...matchedClasses,\n ...matchedTokens,\n ...matchedBindings,\n ...matchedNodeKinds,\n ...matchedTags,\n ...matchedEmail,\n ...matchedEmailTypes,\n ];\n return { content: [{ type: \"text\", text: JSON.stringify(results, null, 2) }] };\n },\n );\n\n return server;\n}\n\nexport async function main(): Promise<void> {\n const server = createServer();\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/server.ts"],"names":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SAAS,YAAA,EAAa;AAC5B,EAAA,MAAM,SAAA,GAAY,IAAI,oBAAA,EAAqB;AAC3C,EAAA,MAAM,MAAA,CAAO,QAAQ,SAAS,CAAA;AAChC","file":"server.js","sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\n\nconst here = path.dirname(fileURLToPath(import.meta.url));\nconst dataDir = path.join(here, \"data\");\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(path.join(dataDir, `${name}.json`), \"utf8\")) as T;\n}\n\n/**\n * The version this catalog documents, read from our OWN package.json at\n * startup rather than baked into the generated catalog.\n *\n * Every package in the family is released in lockstep — they're all listed in\n * `fixed` in .changeset/config.json, so their versions are identical by\n * construction — which makes our own version the right answer for all of them.\n *\n * This used to be snapshotted into `packages.json` at catalog-generation time,\n * but `gen` isn't part of `build` or the release, so the number froze at\n * whichever version happened to be current the last time someone ran it by\n * hand, and the server reported 0.26.0 while npm served 0.29.0. Reading it at\n * runtime makes that drift structurally impossible instead of a step someone\n * has to remember.\n */\nfunction readOwnVersion(): string {\n // `here` is dist/ in a build and src/ in dev; package.json sits one level up\n // from both, and npm always includes it in the published tarball.\n try {\n const pkg = JSON.parse(\n readFileSync(path.join(here, \"..\", \"package.json\"), \"utf8\"),\n ) as { version?: unknown };\n if (typeof pkg.version === \"string\" && pkg.version) return pkg.version;\n console.error(\n \"[silicaui-mcp] package.json has no usable `version`; reporting 'unknown'.\",\n );\n } catch (err) {\n console.error(\n `[silicaui-mcp] could not read own package.json (${(err as Error).message}); reporting 'unknown'.`,\n );\n }\n return \"unknown\";\n}\n\nconst VERSION = readOwnVersion();\n\ninterface PackageMeta {\n name: string;\n purpose: string;\n install: string | null;\n private?: boolean;\n}\n\ninterface TokensData {\n semanticColors: string[];\n /** How an app registers extra color roles, and everything one reaches once declared. */\n customColors: {\n summary: string;\n howToDeclare: string;\n declareNote: string;\n contentNote: string;\n utilities: string[];\n componentPatterns: string[];\n componentPatternsNote: string;\n builderNote: string;\n };\n light: Record<string, string>;\n dark: Record<string, string>;\n typography: { baseFontSize: string; fontFamilyTokens: string[]; note: string };\n}\n\ninterface PropMember {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\ninterface PropsInterface {\n name: string;\n extends?: string;\n members: PropMember[];\n}\n\n/**\n * The routing preamble every connecting client receives from `initialize`,\n * before it calls a single tool.\n *\n * Silica ships one design system through three delivery paths, and the choice\n * between them is made BEFORE any tool call — by which point per-tool\n * descriptions are too late to help. Without this, an agent got ten tools in a\n * bag and inferred the architecture from their names; the standard failure was\n * reaching for `@wizeworks/silicaui-react` while emitting non-React output, or\n * shipping node-tree markup with no behavior runtime and wondering why nothing\n * opened.\n *\n * Deliberately names no counts and no version — those drift. Package names are\n * asserted against the real catalog by verify.mjs.\n */\nconst INSTRUCTIONS = `Silica UI is ONE design system delivered through THREE paths. Decide which path matches the code you are writing BEFORE writing any markup — the paths share a class vocabulary but are not interchangeable, and mixing them is the most common way an integration breaks.\n\n1. CSS — \\`@wizeworks/silicaui\\`\n A Tailwind v4 plugin. You write plain HTML and put Silica's classes on it: \\`<button class=\"btn btn-primary\">\\`. No JavaScript ships, so nothing is interactive — a dialog styled this way will not open. Use it for static markup, server-rendered templates (Rails, Django, PHP, Go, …), email, or any framework at all. It is the floor the other two paths stand on.\n → get_component(name, package \"@wizeworks/silicaui\") for a family's root class, its parts, and its color variants; list_classes for the literal names.\n\n2. React — \\`@wizeworks/silicaui-react\\`\n Typed React components over those same classes, with Base UI supplying real behavior and accessibility: \\`<Button color=\"primary\" size=\"lg\">\\`. Use it whenever the output is React or Next.js.\n → get_component(name, package \"@wizeworks/silicaui-react\") for real props (extracted from the TypeScript source) and a working usage example.\n\n3. HTML / node-tree — \\`@wizeworks/silicaui-html\\` + \\`@wizeworks/silicaui-behaviors\\`\n A framework-neutral node-tree schema that projects to HTML — for generated or user-authored documents: site builders, CMS output, static export. Component macros expand to element subtrees carrying \\`data-sui-*\\` markers, which the zero-dependency \\`@wizeworks/silicaui-behaviors\\` runtime hydrates at load. That runtime is what makes path 3 interactive; without it you have path 1.\n → get_node_schema FIRST for the tree's own shape: the node kinds, the data-binding vocabulary (how a node draws live content, repeats over a collection, or hides itself), the resolution contract, and the tag/attribute allowlist \\`toHtml\\` enforces. Then get_component(name, package \"@wizeworks/silicaui-html\") for the macro; list_blocks / get_block for composed sections; list_behaviors for the marker contract.\n Path 3 fails SILENTLY where the others fail loudly — an unlisted tag becomes a <div>, an unlisted attribute is dropped, an invented binding field is not persisted, and the output still looks plausible. Look it up.\n\nRules that hold on every path:\n- Never invent a class, prop, or block key. Everything this server returns is extracted from Silica's source at release time — look it up rather than guessing, including when you are fairly confident.\n- Colors are semantic tokens (get_tokens), never hex — but the eight built-in roles are a DEFAULT, not a closed set. Silica's core promise is that N named colors cascade through everything: an app registers extra roles (get_tokens → customColors for the two-line syntax) and each works everywhere a built-in does, so \\`btn-brand\\` is exactly as real as \\`btn-primary\\`. Read a component's \\`colorPattern\\` (get_component) and substitute the registered name — most are \\`<root>-<color>\\`, but chat, pin-input and toast are not. A REGISTERED color is the one name you may use that this catalog does not list literally; an unregistered one is still an invention, and renders unstyled.\n- Do not re-skin a component with inline styles or arbitrary hex — it defeats theming and light/dark.\n- The same name can exist on more than one path with a different shape. get_component with no \\`package\\` returns every path's answer at once; pass \\`package\\` to narrow.\n- Don't know the name? search_docs first. Unsure what to install? list_packages.\n\nAuthoring an EMAIL through \\`@wizeworks/silicaui-builder/email\\`? That is a separate surface, not a fourth path: a CLOSED document schema of typed nodes that projects to table-based inline-styled HTML. Its kinds, fields, and nesting rules are enforced — an invented kind or an illegal nesting is dropped silently, with no error to read — so call list_email_nodes / get_email_node rather than reasoning from the paths above. Classes and components do not apply there; colors are literal hex.\n\nSigns you are on the wrong path: importing @wizeworks/silicaui-react into output that is not React; hand-writing \\`data-sui-*\\` markers (they come from macro expansion, never from you); shipping path-3 markup without loading @wizeworks/silicaui-behaviors; expecting path 1 alone to open a dialog.`;\n\ninterface ComponentData {\n name: string;\n package: string;\n category: string;\n sourceFile: string;\n /** silicaui-react entries: extracted from source via TS AST. silicaui-html\n * macros carry no static description (never hand-authored — see label/icon\n * instead) and omit these two fields. */\n description?: string;\n props?: PropsInterface[];\n usageExample?: string | null;\n /** silicaui-html macros only: palette label/icon, whether it's a container,\n * and the BehaviorType(s) its expansion carries (found by actually calling\n * expand(), not guessed — see get_behavior for the marker contract). */\n label?: string;\n icon?: string;\n container?: boolean;\n behaviors?: string[];\n /** silicaui (CSS) entries only: the family's root class (null when it has\n * none — see familyPrefix/rootNote), every literal class it generates, its\n * color variants, and any compound selector that reveals required structure. */\n root?: string | null;\n familyPrefix?: string;\n rootNote?: string;\n classes?: string[];\n colorVariants?: string[];\n /** Selector template for the color axis, e.g. `btn-<color>` — substitute any registered color. */\n colorPattern?: string;\n colorNote?: string;\n compoundSelectors?: string[];\n}\n\ninterface BlockSlot {\n name: string;\n [key: string]: unknown;\n}\n\ninterface BlockData {\n key: string;\n name: string;\n category: string;\n version: string;\n description: string;\n tags?: string[];\n colors: string[];\n behaviors: string[];\n emailEligible: boolean;\n slots: BlockSlot[];\n root: unknown;\n preview?: unknown;\n}\n\ninterface BehaviorData {\n type: string;\n description: string;\n}\n\ninterface EmailFieldData {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\ninterface EmailKindData {\n kind: string;\n typeName: string;\n doc: string;\n isContent: boolean;\n container: boolean;\n holds: string[];\n allowedParents: string[];\n fields: EmailFieldData[];\n binding: { default?: string; fields: Record<string, string> } | null;\n sourceFile: string;\n}\n\ninterface EmailData {\n entrypoint: string;\n reactEntrypoint: string;\n note: string;\n sharedFields: EmailFieldData[];\n bindingNote: string;\n /** The envelope around the node tree — EmailDocument/EmailProject/\n * EmailColorDefaults and friends. A kind list alone can't answer \"what do I\n * wrap this in\". */\n documentTypes: Array<{ typeName: string; doc: string; fields: EmailFieldData[] }>;\n kinds: EmailKindData[];\n palette: Array<{ key: string; label: string; hint: string; icon: string; kind: string }>;\n}\n\ninterface FieldData {\n name: string;\n optional: boolean;\n type: string;\n doc: string;\n}\n\n/** Path 3's DOCUMENT schema — the node tree itself, as opposed to what you put\n * in it. Generated from silicaui-html's own source; see gen-catalog's\n * schema.json section for why each part is extracted rather than described. */\ninterface SchemaData {\n entrypoint: string;\n behaviorRuntime: string;\n sourceFile: string;\n note: string;\n child: string;\n nodeBase: FieldData[];\n kinds: Array<{ kind: string; typeName: string; doc: string; sharedFields: boolean; fields: FieldData[] }>;\n bindingNote: string;\n dataBindings: Array<{ kind: string; doc: string; fields: Array<{ name: string; optional: boolean; type: string }> }>;\n resolution: {\n note: string;\n honesty: string;\n host: FieldData[];\n resolved: FieldData[];\n scope: FieldData[];\n options: FieldData[];\n diagnostic: FieldData[];\n };\n elementFloor: {\n note: string;\n globalAttrs: string[];\n tags: Array<{ tag: string; group: string; void: boolean; attrs: string[] }>;\n };\n}\n\nconst packages = loadJson<PackageMeta[]>(\"packages\");\nconst tokens = loadJson<TokensData>(\"tokens\");\nconst classesByComponent = loadJson<Record<string, string[]>>(\"classes\");\nconst blocks = loadJson<BlockData[]>(\"blocks\");\nconst behaviors = loadJson<BehaviorData[]>(\"behaviors\");\nconst components = loadJson<ComponentData[]>(\"components\");\nconst email = loadJson<EmailData>(\"email\");\nconst schema = loadJson<SchemaData>(\"schema\");\n\n/** CSS → React → HTML: the order the instructions introduce the paths in, so a\n * multi-path get_component answer reads the same way every time. Packages not\n * listed (the wrappers) sort last via indexOf's -1... which sorts them FIRST,\n * so map those to a large index instead. */\nconst PATH_ORDER_LIST = [\n \"@wizeworks/silicaui\",\n \"@wizeworks/silicaui-react\",\n \"@wizeworks/silicaui-html\",\n];\nconst PATH_ORDER = {\n indexOf(pkg: string): number {\n const i = PATH_ORDER_LIST.indexOf(pkg);\n return i === -1 ? PATH_ORDER_LIST.length : i;\n },\n};\n\nfunction toKebab(name: string): string {\n return name\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction blockSummary(b: BlockData) {\n const { root: _root, ...summary } = b;\n return summary;\n}\n\nexport function createServer(): McpServer {\n const server = new McpServer(\n {\n name: \"@wizeworks/silicaui-mcp\",\n version: VERSION,\n },\n { instructions: INSTRUCTIONS },\n );\n\n server.registerTool(\n \"list_packages\",\n {\n title: \"List Silica UI packages\",\n description:\n \"List every package in the Silica UI family (@wizeworks/silicaui, @wizeworks/silicaui-react, @wizeworks/silicaui-html, @wizeworks/silicaui-behaviors, and the wrapper packages), with purpose, install command, and version.\",\n inputSchema: {},\n },\n async () => ({\n content: [\n {\n type: \"text\",\n // Version is stamped here, not stored in the catalog — see VERSION.\n text: JSON.stringify(\n packages.map((p) => ({ ...p, version: VERSION })),\n null,\n 2,\n ),\n },\n ],\n }),\n );\n\n server.registerTool(\n \"list_components\",\n {\n title: \"List Silica UI components\",\n description:\n \"List component names, categories, and source packages — spans ALL THREE delivery paths: @wizeworks/silicaui (CSS class families for plain HTML), @wizeworks/silicaui-react (typed React components), and @wizeworks/silicaui-html (framework-neutral ComponentDef macros for generated/non-React output). The same component usually exists on more than one path with a completely different shape; get_component returns every path's answer unless you pass a package. Filter here with the package param (e.g. '@wizeworks/silicaui', '@wizeworks/silicaui-react', '@wizeworks/silicaui-html', '@wizeworks/silicaui-charts').\",\n inputSchema: {\n package: z.string().optional().describe(\"Filter to one package name, e.g. '@wizeworks/silicaui-react'.\"),\n },\n },\n async ({ package: pkg }) => {\n const filtered = pkg ? components.filter((c) => c.package === pkg) : components;\n const summary = filtered.map(({ name, package: p, category, sourceFile }) => ({\n name,\n package: p,\n category,\n sourceFile,\n }));\n return { content: [{ type: \"text\", text: JSON.stringify(summary, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_component\",\n {\n title: \"Get a Silica UI component's real shape\",\n description:\n \"Get a component's real definition on whichever delivery path you're building on — for @wizeworks/silicaui (CSS): the family's root class, every literal class it generates, its color variants, and any compound selector that reveals required markup structure; for @wizeworks/silicaui-react: props (name, type, optional, doc — extracted from its actual TypeScript source) plus a real, working usage example; for @wizeworks/silicaui-html: its palette category/label/icon, whether it's a container, and the BehaviorType(s) it carries (cross-reference get_behavior for the marker contract). Use this instead of guessing class names, prop names, or shapes. Omit package to see every path's answer side by side; pass it to get just one.\",\n inputSchema: {\n name: z.string().describe(\"Component name, e.g. 'Button', 'DataTable', 'Dialog'.\"),\n package: z.string().optional().describe(\"Disambiguate when the name exists in more than one package, e.g. '@wizeworks/silicaui-html'.\"),\n },\n },\n async ({ name, package: pkg }) => {\n let matches = components.filter((c) => c.name.toLowerCase() === name.toLowerCase());\n if (pkg) matches = matches.filter((c) => c.package === pkg);\n if (!matches.length) {\n return {\n content: [\n {\n type: \"text\",\n text: `No component named \"${name}\"${pkg ? ` in ${pkg}` : \"\"}. Call list_components to see valid names.`,\n },\n ],\n isError: true,\n };\n }\n // A name on more than one path used to be an isError telling the caller\n // to pick a package — which costs a round trip and, worse, asks for a\n // choice the caller can't make yet: it doesn't know how the shapes\n // differ, which is the very thing it's asking about. Returning all of\n // them answers the question AND demonstrates the three paths at the one\n // moment the distinction actually matters.\n if (matches.length > 1) {\n const ordered = [...matches].sort(\n (a, b) => PATH_ORDER.indexOf(a.package) - PATH_ORDER.indexOf(b.package),\n );\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n name: ordered[0]?.name ?? name,\n note:\n `\"${name}\" exists on ${ordered.length} delivery paths, listed below with their real (different) shapes: ` +\n `${ordered.map((c) => c.package).join(\", \")}. Use the one matching the code you're writing — ` +\n `they are not interchangeable. Pass \\`package\\` to get just one.`,\n paths: ordered,\n },\n null,\n 2,\n ),\n },\n ],\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(matches[0], null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_classes\",\n {\n title: \"List real Silica UI CSS class names\",\n description:\n \"List the exact, literal CSS class names Silica UI generates for a core component (e.g. 'button', 'card', 'badge') — or all components if none given. These are extracted directly from the class generators, so they are never hallucinated. Also covers 'color-utilities' (text-*/bg-*/border-* for every declared color). This returns a flat list; for the CSS path's STRUCTURE — which class is the root, which are its parts, which are color variants — call get_component with package '@wizeworks/silicaui'.\",\n inputSchema: {\n component: z\n .string()\n .optional()\n .describe(\"A core @wizeworks/silicaui component name, e.g. 'button'. Omit to list every component's classes.\"),\n },\n },\n async ({ component }) => {\n if (!component) {\n return { content: [{ type: \"text\", text: JSON.stringify(classesByComponent, null, 2) }] };\n }\n const key = toKebab(component);\n const classes = classesByComponent[key];\n if (!classes) {\n return {\n content: [\n {\n type: \"text\",\n text: `No class data for \"${component}\". Known components: ${Object.keys(classesByComponent).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify({ component: key, classes }, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_tokens\",\n {\n title: \"Get Silica UI design tokens\",\n description:\n \"Get the semantic color list and their light/dark OKLCH values, the typography token model, and the scalar theme tokens (radius/border/depth/noise/focus/disabled-opacity) with defaults, ranges, and what each one actually affects. Also returns `customColors`: how to register extra color roles beyond the built-in eight, and the selector pattern for every component a registered color reaches — call this before concluding a color like `brand` is unavailable.\",\n inputSchema: {},\n },\n async () => ({ content: [{ type: \"text\", text: JSON.stringify(tokens, null, 2) }] }),\n );\n\n server.registerTool(\n \"list_blocks\",\n {\n title: \"List Silica UI composed blocks\",\n description:\n \"List composed page blocks from @wizeworks/silicaui-html (hero sections, FAQs, feature grids, …) without their full node tree. Optionally filter by category or tag.\",\n inputSchema: {\n category: z.string().optional(),\n tag: z.string().optional(),\n },\n },\n async ({ category, tag }) => {\n const filtered = blocks.filter(\n (b) => (!category || b.category === category) && (!tag || (b.tags ?? []).includes(tag)),\n );\n return { content: [{ type: \"text\", text: JSON.stringify(filtered.map(blockSummary), null, 2) }] };\n },\n );\n\n server.registerTool(\n \"get_block\",\n {\n title: \"Get a Silica UI block's full node tree\",\n description:\n \"Get one composed block's full definition, including its node tree — the real, validated structure to reuse or adapt, not a guess.\",\n inputSchema: {\n key: z.string().describe(\"The block's stable key, e.g. 'hero_split_cta'.\"),\n },\n },\n async ({ key }) => {\n const block = blocks.find((b) => b.key === key);\n if (!block) {\n return {\n content: [\n {\n type: \"text\",\n text: `No block \"${key}\". Known keys: ${blocks.map((b) => b.key).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(block, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_behaviors\",\n {\n title: \"List Silica UI behavior types\",\n description:\n \"List the closed set of interactive behaviors that @wizeworks/silicaui-behaviors hydrates from data-sui-* markers (the vanilla-JS runtime for non-React output). Each type is also the BehaviorType a @wizeworks/silicaui-html ComponentDef macro carries — cross-reference with get_component. Call this to see the current set rather than assuming a fixed list; it grows over time.\",\n inputSchema: {},\n },\n async () => ({ content: [{ type: \"text\", text: JSON.stringify(behaviors, null, 2) }] }),\n );\n\n server.registerTool(\n \"get_behavior\",\n {\n title: \"Get one Silica UI behavior's contract\",\n description: \"Get the marker contract and semantics for one behavior type.\",\n inputSchema: {\n type: z.string().describe(\"Behavior type, e.g. 'disclosure'.\"),\n },\n },\n async ({ type }) => {\n const behavior = behaviors.find((b) => b.type === type);\n if (!behavior) {\n return {\n content: [\n {\n type: \"text\",\n text: `No behavior \"${type}\". Known types: ${behaviors.map((b) => b.type).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return { content: [{ type: \"text\", text: JSON.stringify(behavior, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"list_email_nodes\",\n {\n title: \"List the email builder's node kinds\",\n description:\n \"List every node kind an email document can contain (@wizeworks/silicaui-builder/email) with its nesting rules — what each kind may HOLD and which kinds may hold IT — plus the insertable palette presets. This schema is CLOSED and enforced: `EmailEditor.insert` returns undefined for an illegal kind or nesting, silently, so check here rather than assuming a site/HTML structure carries over. Email nodes carry typed fields, not classes, and literal hex colors, not tokens. Call get_email_node for one kind's real fields.\",\n inputSchema: {},\n },\n async () => ({\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n entrypoint: email.entrypoint,\n reactEntrypoint: email.reactEntrypoint,\n note: email.note,\n bindingNote: email.bindingNote,\n kinds: email.kinds.map(({ kind, typeName, isContent, container, holds, allowedParents, binding }) => ({\n kind,\n typeName,\n isContent,\n container,\n holds,\n allowedParents,\n bindableFields: binding ? Object.keys(binding.fields) : [],\n defaultBindTarget: binding?.default ?? null,\n })),\n palette: email.palette,\n // The envelope, in full: it's small, and a caller that has the\n // kinds but not `EmailDocument` still can't produce a document.\n documentTypes: email.documentTypes,\n },\n null,\n 2,\n ),\n },\n ],\n }),\n );\n\n server.registerTool(\n \"get_email_node\",\n {\n title: \"Get an email node kind's real fields\",\n description:\n \"Get one email node kind's full definition: every typed field with its TypeScript type, whether it's optional, and its source doc comment; the fields shared by every node (id/ord/data/locked); its nesting rules; and its data-binding contract — which `attr` a `value` bind may target and which one a bind with no `attr` fills. Use this instead of guessing field names: an unknown field is dropped by the engine and an unknown bind target is inert, neither with an error.\",\n inputSchema: {\n kind: z.string().describe(\"Node kind, e.g. 'link', 'image', 'section'. See list_email_nodes.\"),\n },\n },\n async ({ kind }) => {\n const node = email.kinds.find((k) => k.kind === kind.toLowerCase());\n if (!node) {\n return {\n content: [\n {\n type: \"text\",\n text: `No email node kind \"${kind}\". Known kinds: ${email.kinds.map((k) => k.kind).join(\", \")}`,\n },\n ],\n isError: true,\n };\n }\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(\n {\n ...node,\n sharedFields: email.sharedFields,\n bindingNote: email.bindingNote,\n palette: email.palette.filter((p) => p.kind === node.kind),\n },\n null,\n 2,\n ),\n },\n ],\n };\n },\n );\n\n server.registerTool(\n \"get_node_schema\",\n {\n title: \"Get the Silica UI node-tree schema (path 3)\",\n description:\n \"Get the DOCUMENT schema for @wizeworks/silicaui-html — the shape of the tree itself, as opposed to what you put in it. Covers the four node kinds and their fields, the typed system-metadata band every node carries (data / slot / behavior / part / locked / instanceOf), the DATA-BINDING vocabulary with every field, the resolution contract a host implements, and the raw-element/attribute allowlist `toHtml` enforces. Call this before authoring or generating a node tree: the failures here are SILENT — an unlisted tag is downgraded to <div>, an unlisted attribute is dropped, an invented binding field is not persisted — so none of it can be inferred from output that looks like it worked. Not needed for path 1 (CSS classes on your own HTML) or path 2 (React).\",\n inputSchema: {\n section: z\n .enum([\"all\", \"nodes\", \"bindings\", \"resolution\", \"elements\"])\n .optional()\n .describe(\n \"Narrow the answer: 'nodes' (kinds + the shared metadata band), 'bindings' (the data vocabulary), 'resolution' (the host hooks and their honesty contract), 'elements' (the tag/attribute floor). Omit for everything.\",\n ),\n },\n },\n async ({ section }) => {\n const head = {\n entrypoint: schema.entrypoint,\n behaviorRuntime: schema.behaviorRuntime,\n sourceFile: schema.sourceFile,\n note: schema.note,\n };\n const sections: Record<string, unknown> = {\n nodes: { child: schema.child, nodeBase: schema.nodeBase, kinds: schema.kinds },\n bindings: { bindingNote: schema.bindingNote, dataBindings: schema.dataBindings },\n resolution: schema.resolution,\n elements: schema.elementFloor,\n };\n const body =\n !section || section === \"all\"\n ? { ...sections.nodes as object, ...sections.bindings as object, resolution: schema.resolution, elementFloor: schema.elementFloor }\n : sections[section];\n return { content: [{ type: \"text\", text: JSON.stringify({ ...head, ...(body as object) }, null, 2) }] };\n },\n );\n\n server.registerTool(\n \"search_docs\",\n {\n title: \"Search Silica UI catalog data\",\n description:\n \"Full-text search across everything this server knows: component names/descriptions, block names/descriptions, behavior descriptions, literal CSS class names, design tokens, and the email builder's node kinds + their fields. Use this when you don't know the exact name to look up.\",\n inputSchema: {\n query: z.string().describe(\"Search term, case-insensitive.\"),\n },\n },\n async ({ query }) => {\n const q = query.toLowerCase();\n const matchedComponents = components\n .filter((c) => c.name.toLowerCase().includes(q) || (c.description ?? \"\").toLowerCase().includes(q) || (c.label ?? \"\").toLowerCase().includes(q))\n .map((c) => ({ kind: \"component\", name: c.name, package: c.package }));\n const matchedBlocks = blocks\n .filter((b) => b.name.toLowerCase().includes(q) || b.description.toLowerCase().includes(q))\n .map((b) => ({ kind: \"block\", key: b.key, name: b.name }));\n const matchedBehaviors = behaviors\n .filter((b) => b.type.toLowerCase().includes(q) || b.description.toLowerCase().includes(q))\n .map((b) => ({ kind: \"behavior\", type: b.type }));\n const matchedClasses = Object.entries(classesByComponent).flatMap(([component, classes]) =>\n classes\n .filter((cls) => cls.toLowerCase().includes(q))\n .map((cls) => ({ kind: \"class\" as const, component, class: cls })),\n );\n const matchedTokens = tokens.semanticColors\n .filter((name) => name.toLowerCase().includes(q))\n .map((name) => ({ kind: \"token\" as const, name }));\n // Custom colors are a CONCEPT, not a literal name, so nothing above could\n // ever match them: \"brand\", \"custom color\", \"register\" and \"@plugin\" all\n // returned empty and an agent reasonably concluded the 8 semantic roles\n // were the whole set — then refused to write `badge-brand`. Same failure\n // mode the data-binding entry below was added for.\n const COLOR_CONCEPT = [\n \"custom color\",\n \"custom colors\",\n \"color role\",\n \"n-color\",\n \"brand\",\n \"register\",\n \"registered\",\n \"declare\",\n \"@plugin\",\n \"plugin\",\n \"@theme\",\n \"palette\",\n \"extra color\",\n \"new color\",\n ];\n const matchedColorConcept = COLOR_CONCEPT.some((k) => k.includes(q) || q.includes(k))\n ? [\n {\n kind: \"concept\" as const,\n name: \"custom colors (N-color)\",\n summary: tokens.customColors.summary,\n tool: \"get_tokens\",\n field: \"customColors\",\n },\n ]\n : [];\n // The node-tree vocabulary. Without this, \"repeat\", \"limit\", \"srcset\" and\n // \"conditional\" found nothing here and an agent concluded the concept did\n // not exist — the exact failure a searchable catalog is meant to prevent.\n const matchedBindings = schema.dataBindings\n .filter(\n (b) =>\n b.kind.toLowerCase().includes(q) ||\n b.doc.toLowerCase().includes(q) ||\n b.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((b) => ({ kind: \"data-binding\" as const, binding: b.kind, tool: \"get_node_schema\" }));\n const matchedNodeKinds = schema.kinds\n .filter((k) => k.kind.toLowerCase().includes(q) || k.typeName.toLowerCase().includes(q) || k.doc.toLowerCase().includes(q))\n .map((k) => ({ kind: \"node-kind\" as const, node: k.kind, tool: \"get_node_schema\" }));\n const matchedTags = schema.elementFloor.tags\n .filter((t) => t.tag.toLowerCase() === q || t.attrs.some((a) => a.toLowerCase() === q))\n .map((t) => ({ kind: \"element-tag\" as const, tag: t.tag, group: t.group, tool: \"get_node_schema\" }));\n // Email node kinds match on their own name, their doc, or any field they\n // declare — \"href\" should find the `link` group even though no component\n // or class is called that.\n const matchedEmail = email.kinds\n .filter(\n (k) =>\n k.kind.includes(q) ||\n k.typeName.toLowerCase().includes(q) ||\n k.doc.toLowerCase().includes(q) ||\n k.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((k) => ({ kind: \"email-node\" as const, node: k.kind, typeName: k.typeName }));\n const matchedEmailTypes = email.documentTypes\n .filter(\n (t) =>\n t.typeName.toLowerCase().includes(q) ||\n t.doc.toLowerCase().includes(q) ||\n t.fields.some((f) => f.name.toLowerCase().includes(q)),\n )\n .map((t) => ({ kind: \"email-type\" as const, typeName: t.typeName }));\n const results = [\n ...matchedComponents,\n ...matchedBlocks,\n ...matchedBehaviors,\n ...matchedClasses,\n ...matchedTokens,\n ...matchedColorConcept,\n ...matchedBindings,\n ...matchedNodeKinds,\n ...matchedTags,\n ...matchedEmail,\n ...matchedEmailTypes,\n ];\n return { content: [{ type: \"text\", text: JSON.stringify(results, null, 2) }] };\n },\n );\n\n return server;\n}\n\nexport async function main(): Promise<void> {\n const server = createServer();\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wizeworks/silicaui-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"description": "A local MCP server that lets AI coding assistants query the Silica UI design system — real class names, component props, blocks, and behaviors — instead of guessing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|