@monoharada/wcf-mcp 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/core.mjs +428 -24
- package/data/component-selector-guide.json +102 -0
- package/data/design-tokens.json +1 -1
- package/data/guidelines-index.json +1 -1
- package/data/pattern-registry.json +155 -36
- package/package.json +1 -1
- package/server.mjs +1 -0
- package/validator.mjs +88 -26
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ claude mcp add wcf -- npx @monoharada/wcf-mcp
|
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
## 提供機能(
|
|
81
|
+
## 提供機能(16 tools + 1 prompt + 4 resources)
|
|
82
82
|
|
|
83
83
|
### ガードレール
|
|
84
84
|
|
|
@@ -92,7 +92,7 @@ claude mcp add wcf -- npx @monoharada/wcf-mcp
|
|
|
92
92
|
|--------|------|
|
|
93
93
|
| `list_components` | カテゴリ/クエリ/limit/offset でコンポーネントを段階的に取得(デフォルト20件。全件取得は `limit: 200`) |
|
|
94
94
|
| `search_icons` | アイコン名をキーワード検索し、usage example を返す |
|
|
95
|
-
| `get_component_api` | tagName or className で属性・スロット・イベント・CSS Parts・CSS Custom Properties
|
|
95
|
+
| `get_component_api` | tagName or className で属性・スロット・イベント・CSS Parts・CSS Custom Properties を取得。`components` 配列でバッチ取得可能(最大10件) |
|
|
96
96
|
| `generate_usage_snippet` | コンポーネントの最小限 HTML スニペットを生成 |
|
|
97
97
|
| `get_install_recipe` | componentId・依存関係・define関数・インストールコマンドを取得 |
|
|
98
98
|
|
|
@@ -117,6 +117,8 @@ claude mcp add wcf -- npx @monoharada/wcf-mcp
|
|
|
117
117
|
| `tokenMisuse` | warning | inline style でのトークン誤用 | `color: #000` → `var(--color-*)` |
|
|
118
118
|
| `ariaLiveNotRecommended` | warning | `aria-live` の使用(DADS 非推奨) | `aria-live="polite"` |
|
|
119
119
|
| `roleAlertNotRecommended` | warning | `role="alert"` の使用(DADS 非推奨) | `role="alert"` |
|
|
120
|
+
| `emptyLabel` | error | 空の `label` 属性(アクセシビリティ違反) | `<dads-input-text label="">` |
|
|
121
|
+
| `emptyAriaLabel` | error | 空の `aria-label` 属性(アクセシビリティ違反) | `<dads-button aria-label="">` |
|
|
120
122
|
| `forbiddenAttribute` | warning | 禁止属性 | `placeholder` |
|
|
121
123
|
|
|
122
124
|
### UI パターン
|
|
@@ -126,6 +128,13 @@ claude mcp add wcf -- npx @monoharada/wcf-mcp
|
|
|
126
128
|
| `list_patterns` | 利用可能な UI パターン(レシピ)を一覧表示 |
|
|
127
129
|
| `get_pattern_recipe` | パターンの完全レシピ(必要コンポーネント・依存解決・HTML)を取得 |
|
|
128
130
|
| `generate_pattern_snippet` | パターンの HTML スニペットを生成 |
|
|
131
|
+
| `generate_full_page_html` | HTML フラグメントを `<!DOCTYPE html>` + importmap + boot script 付きの完全ページに変換 |
|
|
132
|
+
|
|
133
|
+
### コンポーネント選択支援
|
|
134
|
+
|
|
135
|
+
| ツール | 説明 |
|
|
136
|
+
|--------|------|
|
|
137
|
+
| `get_component_selector_guide` | カテゴリ・ユースケースでコンポーネントを選択支援(6カテゴリ: Form, Actions, Navigation, Content, Display, Layout) |
|
|
129
138
|
|
|
130
139
|
### トークン・ガイドライン検索
|
|
131
140
|
|
|
@@ -372,6 +381,27 @@ Claude Desktop 設定例:
|
|
|
372
381
|
prefix: "myui" → dads-button → myui-button
|
|
373
382
|
```
|
|
374
383
|
|
|
384
|
+
## v0.4.0 新機能
|
|
385
|
+
|
|
386
|
+
### 新ツール
|
|
387
|
+
- **`generate_full_page_html`** — HTML フラグメントを完全な HTML ページに変換(importmap, boot script, tokens CSS 付き)
|
|
388
|
+
- **`get_component_selector_guide`** — カテゴリ・ユースケースキーワードでコンポーネント選択を支援
|
|
389
|
+
|
|
390
|
+
### 改善
|
|
391
|
+
- **空ラベル検出** — `label=""` / `aria-label=""` を error として検出(`emptyLabel`, `emptyAriaLabel`)
|
|
392
|
+
- **属性プリフィル** — `generate_usage_snippet` で CEM デフォルト値を自動挿入
|
|
393
|
+
- **アイコンエイリアス** — `search_icons` で `"trash"` → `"delete"` 等のエイリアス展開
|
|
394
|
+
- **ガイドライン拡充** — spacing token, `::part()`, div-soup, form-validation の検索対応
|
|
395
|
+
- **パターンビヘイビア** — `get_pattern_recipe` に JS コード例(`behavior` フィールド)を追加
|
|
396
|
+
- **コンポーネントトークン参照** — `get_design_token_detail` に `componentReferencedBy` フィールド追加
|
|
397
|
+
- **バッチ対応** — `get_component_api` に `components` 配列パラメータ(最大10件)
|
|
398
|
+
- **vendor path 統一** — `setupInfo` のパスを `<dir>` プレースホルダに統一
|
|
399
|
+
|
|
400
|
+
### Breaking Changes
|
|
401
|
+
- `setupInfo.vendorRuntimePath` の値が `vendor-runtime/` から `<dir>/` ベースに変更
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
375
405
|
## v0.3.0 新機能 — ランタイムセットアップ情報
|
|
376
406
|
|
|
377
407
|
v0.3.0 では、AI エージェントが CDN 非対応の vendor-local 配信モデルを正しく理解できるよう、3つのツールにランタイムセットアップ情報を追加しました。
|