@wangs-ui/skills 1.3.0-alpha.14 → 1.3.0-alpha.16
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/bin.js +2 -2
- package/dist/index.js +1 -1
- package/dist/skills/wangs-ui/wangs-ui-components/SKILL.md +104 -0
- package/dist/{src-ilzo-M7u.js → src-t3vXV084.js} +119 -96
- package/package.json +1 -1
- package/skills/wangs-ui/wangs-ui-components/SKILL.md +104 -0
- package/dist/skills/wangs-ui-components/SKILL.md +0 -202
- package/skills/wangs-ui-components/SKILL.md +0 -202
- /package/dist/rules/{react19-checklist-and-reference.md → wangs-ui/react19-checklist-and-reference.md} +0 -0
- /package/dist/rules/{react19-compiler-render-patterns.md → wangs-ui/react19-compiler-render-patterns.md} +0 -0
- /package/dist/rules/{react19-naming-conventions.md → wangs-ui/react19-naming-conventions.md} +0 -0
- /package/dist/rules/{react19-no-manual-memoization.md → wangs-ui/react19-no-manual-memoization.md} +0 -0
- /package/dist/rules/{react19-primitives-typing.md → wangs-ui/react19-primitives-typing.md} +0 -0
- /package/dist/rules/{react19-props-typing.md → wangs-ui/react19-props-typing.md} +0 -0
- /package/dist/rules/{react19-purity-and-immutability.md → wangs-ui/react19-purity-and-immutability.md} +0 -0
- /package/dist/rules/{react19-tooling-and-opt-out.md → wangs-ui/react19-tooling-and-opt-out.md} +0 -0
- /package/dist/rules/{typescript-assertions-last-resort.md → wangs-ui/typescript-assertions-last-resort.md} +0 -0
- /package/dist/rules/{typescript-checklist-and-reference.md → wangs-ui/typescript-checklist-and-reference.md} +0 -0
- /package/dist/rules/{typescript-discriminated-unions.md → wangs-ui/typescript-discriminated-unions.md} +0 -0
- /package/dist/rules/{typescript-explicit-return-types.md → wangs-ui/typescript-explicit-return-types.md} +0 -0
- /package/dist/rules/{typescript-interface-vs-type.md → wangs-ui/typescript-interface-vs-type.md} +0 -0
- /package/dist/rules/{typescript-literal-unions-vs-enums.md → wangs-ui/typescript-literal-unions-vs-enums.md} +0 -0
- /package/dist/rules/{typescript-naming-conventions.md → wangs-ui/typescript-naming-conventions.md} +0 -0
- /package/dist/rules/{typescript-narrowing-over-casting.md → wangs-ui/typescript-narrowing-over-casting.md} +0 -0
- /package/dist/rules/{typescript-readonly-by-default.md → wangs-ui/typescript-readonly-by-default.md} +0 -0
- /package/dist/rules/{typescript-tsconfig-strictness.md → wangs-ui/typescript-tsconfig-strictness.md} +0 -0
- /package/dist/rules/{typescript-zero-any.md → wangs-ui/typescript-zero-any.md} +0 -0
- /package/dist/skills/{craft-theme → wangs-ui/craft-theme}/SKILL.md +0 -0
- /package/dist/skills/{create-form → wangs-ui/create-form}/SKILL.md +0 -0
- /package/dist/skills/{data-table → wangs-ui/data-table}/SKILL.md +0 -0
- /package/dist/skills/{dialog-modal → wangs-ui/dialog-modal}/SKILL.md +0 -0
- /package/dist/skills/{i18n-usage → wangs-ui/i18n-usage}/SKILL.md +0 -0
- /package/dist/skills/{layout-navigation → wangs-ui/layout-navigation}/SKILL.md +0 -0
- /package/dist/skills/{responsive-design → wangs-ui/responsive-design}/SKILL.md +0 -0
- /package/dist/skills/{universal-layout → wangs-ui/universal-layout}/SKILL.md +0 -0
- /package/rules/{react19-checklist-and-reference.md → wangs-ui/react19-checklist-and-reference.md} +0 -0
- /package/rules/{react19-compiler-render-patterns.md → wangs-ui/react19-compiler-render-patterns.md} +0 -0
- /package/rules/{react19-naming-conventions.md → wangs-ui/react19-naming-conventions.md} +0 -0
- /package/rules/{react19-no-manual-memoization.md → wangs-ui/react19-no-manual-memoization.md} +0 -0
- /package/rules/{react19-primitives-typing.md → wangs-ui/react19-primitives-typing.md} +0 -0
- /package/rules/{react19-props-typing.md → wangs-ui/react19-props-typing.md} +0 -0
- /package/rules/{react19-purity-and-immutability.md → wangs-ui/react19-purity-and-immutability.md} +0 -0
- /package/rules/{react19-tooling-and-opt-out.md → wangs-ui/react19-tooling-and-opt-out.md} +0 -0
- /package/rules/{typescript-assertions-last-resort.md → wangs-ui/typescript-assertions-last-resort.md} +0 -0
- /package/rules/{typescript-checklist-and-reference.md → wangs-ui/typescript-checklist-and-reference.md} +0 -0
- /package/rules/{typescript-discriminated-unions.md → wangs-ui/typescript-discriminated-unions.md} +0 -0
- /package/rules/{typescript-explicit-return-types.md → wangs-ui/typescript-explicit-return-types.md} +0 -0
- /package/rules/{typescript-interface-vs-type.md → wangs-ui/typescript-interface-vs-type.md} +0 -0
- /package/rules/{typescript-literal-unions-vs-enums.md → wangs-ui/typescript-literal-unions-vs-enums.md} +0 -0
- /package/rules/{typescript-naming-conventions.md → wangs-ui/typescript-naming-conventions.md} +0 -0
- /package/rules/{typescript-narrowing-over-casting.md → wangs-ui/typescript-narrowing-over-casting.md} +0 -0
- /package/rules/{typescript-readonly-by-default.md → wangs-ui/typescript-readonly-by-default.md} +0 -0
- /package/rules/{typescript-tsconfig-strictness.md → wangs-ui/typescript-tsconfig-strictness.md} +0 -0
- /package/rules/{typescript-zero-any.md → wangs-ui/typescript-zero-any.md} +0 -0
- /package/skills/{craft-theme → wangs-ui/craft-theme}/SKILL.md +0 -0
- /package/skills/{create-form → wangs-ui/create-form}/SKILL.md +0 -0
- /package/skills/{data-table → wangs-ui/data-table}/SKILL.md +0 -0
- /package/skills/{dialog-modal → wangs-ui/dialog-modal}/SKILL.md +0 -0
- /package/skills/{i18n-usage → wangs-ui/i18n-usage}/SKILL.md +0 -0
- /package/skills/{layout-navigation → wangs-ui/layout-navigation}/SKILL.md +0 -0
- /package/skills/{responsive-design → wangs-ui/responsive-design}/SKILL.md +0 -0
- /package/skills/{universal-layout → wangs-ui/universal-layout}/SKILL.md +0 -0
package/dist/bin.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as listSkills, n as updateSkills, r as addSkills, t as removeSkills } from "./src-
|
|
2
|
+
import { i as listSkills, n as updateSkills, r as addSkills, t as removeSkills } from "./src-t3vXV084.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
//#region bin.ts
|
|
6
|
-
var VERSION = "1.3.0-alpha.
|
|
6
|
+
var VERSION = "1.3.0-alpha.15";
|
|
7
7
|
var HELP_TEXT = `
|
|
8
8
|
\x1b[1m\x1b[36m🚀 Wangs UI Skills & Rules CLI\x1b[0m
|
|
9
9
|
Install, update, and manage modular AI agent skills and rules for Wangs UI React applications.
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as loadAllRules, a as getAgentRuleDirs, c as getInstalledSkills, d as isRuleInstalled, f as isSkillInstalled, g as getSkill, h as getRule, i as listSkills, l as installRule, m as removeSkill, n as updateSkills, o as getAgentSkillDirs, p as removeRule, r as addSkills, s as getInstalledRules, t as removeSkills, u as installSkill, v as loadAllSkills } from "./src-
|
|
1
|
+
import { _ as loadAllRules, a as getAgentRuleDirs, c as getInstalledSkills, d as isRuleInstalled, f as isSkillInstalled, g as getSkill, h as getRule, i as listSkills, l as installRule, m as removeSkill, n as updateSkills, o as getAgentSkillDirs, p as removeRule, r as addSkills, s as getInstalledRules, t as removeSkills, u as installSkill, v as loadAllSkills } from "./src-t3vXV084.js";
|
|
2
2
|
export { addSkills, getAgentRuleDirs, getAgentSkillDirs, getInstalledRules, getInstalledSkills, getRule, getSkill, installRule, installSkill, isRuleInstalled, isSkillInstalled, listSkills, loadAllRules, loadAllSkills, removeRule, removeSkill, removeSkills, updateSkills };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wangs-ui-components
|
|
3
|
+
description: MCP Discovery Protocol, modular subpath import map, and primitive substitution map for Wangs UI applications.
|
|
4
|
+
metadata:
|
|
5
|
+
owner: wangs-ui
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill: Wangs UI Component Fundamentals & MCP Protocol
|
|
9
|
+
|
|
10
|
+
Use this skill to navigate the Wangs UI ecosystem. **MCP is the single source of truth** for all component APIs, props, variants, slots, and examples. Do not hardcode or assume props — always query MCP dynamically.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. The MCP Discovery Protocol (Single Source of Truth)
|
|
15
|
+
|
|
16
|
+
Do **NOT** guess component props, Pass-Through (`pt`) slots, or event names. Always query the MCP server dynamically:
|
|
17
|
+
|
|
18
|
+
```mermaid
|
|
19
|
+
graph TD
|
|
20
|
+
A[Identify Component / Primitive Needed] --> B[list_catalog to confirm name/id]
|
|
21
|
+
B --> C[get_component_api for typed contract]
|
|
22
|
+
B --> D[get_documentation for curated guidance]
|
|
23
|
+
C --> E{Need live story / variant code?}
|
|
24
|
+
D --> E
|
|
25
|
+
E -->|Yes| F[get_component_examples]
|
|
26
|
+
E -->|No| G[Implement with Subpath Import Map]
|
|
27
|
+
F --> G
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Discovery Steps:
|
|
31
|
+
|
|
32
|
+
1. **Discover Catalog Entries**:
|
|
33
|
+
```json
|
|
34
|
+
list_catalog({ "query": "button" })
|
|
35
|
+
list_catalog({ "category": "component" })
|
|
36
|
+
```
|
|
37
|
+
2. **Inspect Typed Contracts & Props** (`component` parameter):
|
|
38
|
+
```json
|
|
39
|
+
get_component_api({ "component": "button" })
|
|
40
|
+
get_component_api({ "component": "datatable" })
|
|
41
|
+
get_component_api({ "component": "field" })
|
|
42
|
+
```
|
|
43
|
+
3. **Read Curated Narrative Documentation** (`id` parameter):
|
|
44
|
+
```json
|
|
45
|
+
get_documentation({ "id": "button" })
|
|
46
|
+
get_documentation({ "id": "foundation" })
|
|
47
|
+
get_documentation({ "id": "form" })
|
|
48
|
+
```
|
|
49
|
+
4. **Fetch Live Storybook TSX Examples**:
|
|
50
|
+
```json
|
|
51
|
+
get_component_examples({ "component": "button", "variant": "Sizes" })
|
|
52
|
+
get_component_examples({ "component": "datatable", "variant": "Basic" })
|
|
53
|
+
```
|
|
54
|
+
5. **Explore Knowledge Graph Relationships**:
|
|
55
|
+
```json
|
|
56
|
+
query_graph({ "query": "DataTable" })
|
|
57
|
+
query_graph({ "query": "useForm" })
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 2. Modular Subpath Import Map
|
|
63
|
+
|
|
64
|
+
Always import via specific subpath modules to guarantee tree-shaking and avoid bundling entire packages:
|
|
65
|
+
|
|
66
|
+
| Ecosystem Layer | Subpath Pattern | Example Imports |
|
|
67
|
+
| :--- | :--- | :--- |
|
|
68
|
+
| **Core Primitives** | `@wangs-ui/react-core/primitive/<name>` | `Button`, `Input`, `Select`, `DataTable`, `Dialog`, `Modal`, `Field`, `Form`, `Card`, `Badge` |
|
|
69
|
+
| **Layout Primitives** | `@wangs-ui/foundation/layout` | `Stack`, `HStack`, `VStack`, `Flex`, `Grid`, `Box`, `Container`, `Section`, `ScrollArea` |
|
|
70
|
+
| **Typography Primitives** | `@wangs-ui/foundation/theme` | `Text`, `Code`, `Kbd`, `Link`, `Blockquote`, `List`, `Mark` |
|
|
71
|
+
| **Blocks & Shells** | `@wangs-ui/react-core/blocks/<name>` | `AppLayout`, `Sidebar`, `TableToolbar` |
|
|
72
|
+
| **Form Engine** | `@wangs-ui/form/core`, `@wangs-ui/form/react` | Headless form state, hooks, validation adapters |
|
|
73
|
+
| **Universal Navigation** | `@wangs-ui/react-navigation/web`, `@wangs-ui/react-navigation/native` | `buildGraph`, `paramRoute`, platform router bridges |
|
|
74
|
+
| **Theme & Providers** | `@wangs-ui/react-core/api`, `@wangs-ui/foundation/theme` | `WangsUiProvider`, `ThemeProvider`, `useTheme` |
|
|
75
|
+
| **Vector Icons** | `@wangs-ui/react-icons` | `SearchLine`, `AddLine`, `DeleteBin6Line`, `CheckLine` |
|
|
76
|
+
| **i18n & Localization** | `@wangs-ui/react-i18n` | `useI18n`, `t`, `WangsUiI18nProvider` |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 3. Primitive Substitution Map
|
|
81
|
+
|
|
82
|
+
Zero raw HTML elements. Never write raw HTML tags when a Wangs UI primitive exists:
|
|
83
|
+
|
|
84
|
+
| Forbidden Raw HTML | Mandatory Wangs UI Primitive | Import Path | MCP Catalog / Doc ID |
|
|
85
|
+
| :--- | :--- | :--- | :--- |
|
|
86
|
+
| `<button>` | `Button` | `@wangs-ui/react-core/primitive/button` | `button` |
|
|
87
|
+
| `<input type="text">` | `Input` | `@wangs-ui/react-core/primitive/input` | `input` |
|
|
88
|
+
| `<input type="number">` | `NumberInput` | `@wangs-ui/react-core/primitive/numberinput` | `numberinput` |
|
|
89
|
+
| `<input type="checkbox">` | `Checkbox` | `@wangs-ui/react-core/primitive/checkbox` | `checkbox` |
|
|
90
|
+
| `<select>` | `Select` / `MultiSelect` | `@wangs-ui/react-core/primitive/select` | `select`, `multiselect` |
|
|
91
|
+
| `<textarea>` | `Textarea` | `@wangs-ui/react-core/primitive/textarea` | `textarea` |
|
|
92
|
+
| `<form>` | `Form` / `DialogForm` | `@wangs-ui/react-core/primitive/form` | `form`, `dialogform` |
|
|
93
|
+
| `<dialog>` / alert modal | `Modal` / `Dialog` | `@wangs-ui/react-core/primitive/modal` | `modal`, `dialog` |
|
|
94
|
+
| `<table>` | `DataTable` | `@wangs-ui/react-core/primitive/datatable` | `datatable` |
|
|
95
|
+
| `<div>` (layout / flex / grid) | `Stack`, `HStack`, `Flex`, `Grid`, `Box` | `@wangs-ui/foundation/layout` | `universal-layout` |
|
|
96
|
+
| `<div>` (surface card) | `Card` | `@wangs-ui/react-core/primitive/card` | `card` |
|
|
97
|
+
| Pill / status chip | `Badge` | `@wangs-ui/react-core/primitive/badge` | `badge` |
|
|
98
|
+
| `<h1>` - `<h6>` | `<Text variant="...">` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
99
|
+
| `<p>`, `<span>` (body text) | `<Text variant="...">` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
100
|
+
| `<a>` | `Link` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
101
|
+
| `<code>` | `Code` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
102
|
+
| `<kbd>` | `Kbd` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
103
|
+
| `<blockquote>` | `Blockquote` | `@wangs-ui/foundation/theme` | `foundation` |
|
|
104
|
+
| `<ul>`, `<ol>` | `List` | `@wangs-ui/foundation/theme` | `foundation` |
|