@wangs-ui/skills 1.3.0-alpha.13 → 1.3.0-alpha.15

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.
Files changed (64) hide show
  1. package/dist/bin.js +2 -2
  2. package/dist/index.js +1 -1
  3. package/dist/skills/{craft-theme → wangs-ui/craft-theme}/SKILL.md +1 -1
  4. package/dist/skills/{create-form → wangs-ui/create-form}/SKILL.md +11 -9
  5. package/dist/skills/{data-table → wangs-ui/data-table}/SKILL.md +8 -7
  6. package/dist/skills/{dialog-modal → wangs-ui/dialog-modal}/SKILL.md +5 -5
  7. package/dist/skills/{i18n-usage → wangs-ui/i18n-usage}/SKILL.md +7 -7
  8. package/dist/skills/wangs-ui/layout-navigation/SKILL.md +156 -0
  9. package/{skills → dist/skills/wangs-ui}/responsive-design/SKILL.md +19 -6
  10. package/{skills → dist/skills/wangs-ui}/universal-layout/SKILL.md +10 -18
  11. package/dist/skills/wangs-ui/wangs-ui-components/SKILL.md +104 -0
  12. package/dist/{src-DChgYbFi.js → src-jN6qaZYo.js} +127 -104
  13. package/package.json +1 -1
  14. package/skills/{craft-theme → wangs-ui/craft-theme}/SKILL.md +1 -1
  15. package/skills/{create-form → wangs-ui/create-form}/SKILL.md +11 -9
  16. package/skills/{data-table → wangs-ui/data-table}/SKILL.md +8 -7
  17. package/skills/{dialog-modal → wangs-ui/dialog-modal}/SKILL.md +5 -5
  18. package/skills/{i18n-usage → wangs-ui/i18n-usage}/SKILL.md +7 -7
  19. package/skills/wangs-ui/layout-navigation/SKILL.md +156 -0
  20. package/{dist/skills → skills/wangs-ui}/responsive-design/SKILL.md +19 -6
  21. package/{dist/skills → skills/wangs-ui}/universal-layout/SKILL.md +10 -18
  22. package/skills/wangs-ui/wangs-ui-components/SKILL.md +104 -0
  23. package/dist/skills/layout-navigation/SKILL.md +0 -70
  24. package/dist/skills/wangs-ui-components/SKILL.md +0 -117
  25. package/skills/layout-navigation/SKILL.md +0 -70
  26. package/skills/wangs-ui-components/SKILL.md +0 -117
  27. /package/dist/rules/{react19-checklist-and-reference.md → wangs-ui/react19-checklist-and-reference.md} +0 -0
  28. /package/dist/rules/{react19-compiler-render-patterns.md → wangs-ui/react19-compiler-render-patterns.md} +0 -0
  29. /package/dist/rules/{react19-naming-conventions.md → wangs-ui/react19-naming-conventions.md} +0 -0
  30. /package/dist/rules/{react19-no-manual-memoization.md → wangs-ui/react19-no-manual-memoization.md} +0 -0
  31. /package/dist/rules/{react19-primitives-typing.md → wangs-ui/react19-primitives-typing.md} +0 -0
  32. /package/dist/rules/{react19-props-typing.md → wangs-ui/react19-props-typing.md} +0 -0
  33. /package/dist/rules/{react19-purity-and-immutability.md → wangs-ui/react19-purity-and-immutability.md} +0 -0
  34. /package/dist/rules/{react19-tooling-and-opt-out.md → wangs-ui/react19-tooling-and-opt-out.md} +0 -0
  35. /package/dist/rules/{typescript-assertions-last-resort.md → wangs-ui/typescript-assertions-last-resort.md} +0 -0
  36. /package/dist/rules/{typescript-checklist-and-reference.md → wangs-ui/typescript-checklist-and-reference.md} +0 -0
  37. /package/dist/rules/{typescript-discriminated-unions.md → wangs-ui/typescript-discriminated-unions.md} +0 -0
  38. /package/dist/rules/{typescript-explicit-return-types.md → wangs-ui/typescript-explicit-return-types.md} +0 -0
  39. /package/dist/rules/{typescript-interface-vs-type.md → wangs-ui/typescript-interface-vs-type.md} +0 -0
  40. /package/dist/rules/{typescript-literal-unions-vs-enums.md → wangs-ui/typescript-literal-unions-vs-enums.md} +0 -0
  41. /package/dist/rules/{typescript-naming-conventions.md → wangs-ui/typescript-naming-conventions.md} +0 -0
  42. /package/dist/rules/{typescript-narrowing-over-casting.md → wangs-ui/typescript-narrowing-over-casting.md} +0 -0
  43. /package/dist/rules/{typescript-readonly-by-default.md → wangs-ui/typescript-readonly-by-default.md} +0 -0
  44. /package/dist/rules/{typescript-tsconfig-strictness.md → wangs-ui/typescript-tsconfig-strictness.md} +0 -0
  45. /package/dist/rules/{typescript-zero-any.md → wangs-ui/typescript-zero-any.md} +0 -0
  46. /package/rules/{react19-checklist-and-reference.md → wangs-ui/react19-checklist-and-reference.md} +0 -0
  47. /package/rules/{react19-compiler-render-patterns.md → wangs-ui/react19-compiler-render-patterns.md} +0 -0
  48. /package/rules/{react19-naming-conventions.md → wangs-ui/react19-naming-conventions.md} +0 -0
  49. /package/rules/{react19-no-manual-memoization.md → wangs-ui/react19-no-manual-memoization.md} +0 -0
  50. /package/rules/{react19-primitives-typing.md → wangs-ui/react19-primitives-typing.md} +0 -0
  51. /package/rules/{react19-props-typing.md → wangs-ui/react19-props-typing.md} +0 -0
  52. /package/rules/{react19-purity-and-immutability.md → wangs-ui/react19-purity-and-immutability.md} +0 -0
  53. /package/rules/{react19-tooling-and-opt-out.md → wangs-ui/react19-tooling-and-opt-out.md} +0 -0
  54. /package/rules/{typescript-assertions-last-resort.md → wangs-ui/typescript-assertions-last-resort.md} +0 -0
  55. /package/rules/{typescript-checklist-and-reference.md → wangs-ui/typescript-checklist-and-reference.md} +0 -0
  56. /package/rules/{typescript-discriminated-unions.md → wangs-ui/typescript-discriminated-unions.md} +0 -0
  57. /package/rules/{typescript-explicit-return-types.md → wangs-ui/typescript-explicit-return-types.md} +0 -0
  58. /package/rules/{typescript-interface-vs-type.md → wangs-ui/typescript-interface-vs-type.md} +0 -0
  59. /package/rules/{typescript-literal-unions-vs-enums.md → wangs-ui/typescript-literal-unions-vs-enums.md} +0 -0
  60. /package/rules/{typescript-naming-conventions.md → wangs-ui/typescript-naming-conventions.md} +0 -0
  61. /package/rules/{typescript-narrowing-over-casting.md → wangs-ui/typescript-narrowing-over-casting.md} +0 -0
  62. /package/rules/{typescript-readonly-by-default.md → wangs-ui/typescript-readonly-by-default.md} +0 -0
  63. /package/rules/{typescript-tsconfig-strictness.md → wangs-ui/typescript-tsconfig-strictness.md} +0 -0
  64. /package/rules/{typescript-zero-any.md → wangs-ui/typescript-zero-any.md} +0 -0
@@ -1,117 +0,0 @@
1
- ---
2
- name: wangs-ui-components
3
- description: Foundational rules, subpath imports, design tokens, and the MCP Discovery Protocol for building React apps with Wangs UI.
4
- metadata:
5
- owner: wangs-ui
6
- ---
7
- # Skill: Wangs UI Component Fundamentals & MCP Protocol
8
-
9
- Use this skill whenever you write or modify UI components using Wangs UI (`@wangs-ui/react-core`, `@wangs-ui/react-icons`, `@wangs-ui/react-presets`, `@wangs-ui/foundation`).
10
-
11
- ---
12
-
13
- ## 1. The MCP Discovery Protocol (Mandatory Single Source of Truth)
14
-
15
- Do **NOT** guess component props, Pass-Through (`pt`) slots, or event names. Always query the MCP server dynamically to retrieve the current API signatures and live story implementations:
16
-
17
- ```mermaid
18
- graph TD
19
- A[Identify Component Needed] --> B[list_catalog to confirm the id]
20
- B --> C[get_component_api for the typed contract]
21
- C --> D{Need live story / variant code?}
22
- D -->|Yes| E[get_component_examples]
23
- D -->|No| F[get_documentation for curated guidance]
24
- E --> G[Check Graphify: query_graph]
25
- F --> G
26
- G --> H[Implement Component with Subpath Imports]
27
- ```
28
-
29
- ### Discovery Steps:
30
-
31
- 1. **Inspect Component Contract & Props**:
32
- ```json
33
- get_component_api({ "id": "button" })
34
- get_component_api({ "id": "input" })
35
- get_component_api({ "id": "datatable" })
36
- ```
37
- 2. **Inspect Curated Documentation**:
38
- ```json
39
- get_documentation({ "id": "button" })
40
- ```
41
- 3. **Inspect Live Usage & Story Variants**:
42
- ```json
43
- get_component_examples({ "component": "button", "variant": "Sizes" })
44
- get_component_examples({ "component": "datatable", "variant": "CursorPagination" })
45
- ```
46
- 4. **Inspect Relationships & Real Usages in Graph**:
47
- ```json
48
- query_graph({ "query": "DataTable" })
49
- query_graph({ "query": "usePT" })
50
- ```
51
-
52
- ---
53
-
54
- ## 2. Subpath Modular Imports (Mandatory)
55
-
56
- Always import via specific subpaths to guarantee tree-shaking and avoid bundling entire packages:
57
-
58
- ```tsx
59
- // Primitives (@wangs-ui/react-core/primitive/*)
60
- import Button from '@wangs-ui/react-core/primitive/button';
61
- import Input from '@wangs-ui/react-core/primitive/input';
62
- import NumberInput from '@wangs-ui/react-core/primitive/numberinput';
63
- import Select from '@wangs-ui/react-core/primitive/select';
64
- import Badge from '@wangs-ui/react-core/primitive/badge';
65
- import Card from '@wangs-ui/react-core/primitive/card';
66
- import DataTable from '@wangs-ui/react-core/primitive/datatable';
67
-
68
- // Blocks (@wangs-ui/react-core/blocks/*)
69
- import AppLayout from '@wangs-ui/react-core/blocks/applayout';
70
- import Sidebar from '@wangs-ui/react-core/blocks/sidebar';
71
-
72
- // Providers & System Hooks
73
- import { WangsUiProvider } from '@wangs-ui/react-core/api';
74
- import { useI18n } from '@wangs-ui/react-i18n';
75
- import { useTheme } from '@wangs-ui/foundation/theme';
76
-
77
- // Icons (@wangs-ui/react-icons)
78
- import { SearchLine, AddLine, DeleteBin6Line, CheckLine } from '@wangs-ui/react-icons';
79
- ```
80
-
81
- ---
82
-
83
- ## 3. Strict Primitive Substitution Rule
84
-
85
- Never write raw HTML elements when a Wangs UI primitive exists:
86
-
87
- | Forbidden Raw HTML | Mandatory Wangs UI Component | Subpath Import | MCP Documentation ID |
88
- | :------------------------ | :--------------------------- | :------------------------------------------- | :------------------- |
89
- | `<button>` | `Button` | `@wangs-ui/react-core/primitive/button` | `button` |
90
- | `<input type="text">` | `Input` | `@wangs-ui/react-core/primitive/input` | `input` |
91
- | `<input type="number">` | `NumberInput` | `@wangs-ui/react-core/primitive/numberinput` | `numberinput` |
92
- | `<input type="checkbox">` | `Checkbox` | `@wangs-ui/react-core/primitive/checkbox` | `checkbox` |
93
- | `<select>` | `Select` | `@wangs-ui/react-core/primitive/select` | `select` |
94
- | `<dialog>` / modal | `Dialog` / `Modal` | `@wangs-ui/react-core/primitive/dialog` | `dialog`, `modal` |
95
- | `<table>` | `DataTable` | `@wangs-ui/react-core/primitive/datatable` | `datatable` |
96
- | Container box | `Card` | `@wangs-ui/react-core/primitive/card` | `card` |
97
- | Pill badge / status | `Badge` | `@wangs-ui/react-core/primitive/badge` | `badge` |
98
-
99
- ---
100
-
101
- ## 4. Typography Scale & 4px Spacing Tokens
102
-
103
- ### Typography Helper Classes
104
-
105
- - `.heading-1` — Page title (22px, 600)
106
- - `.heading-2` — Section / Card title (18px, 600)
107
- - `.heading-3` — Sub-header (16px, 500)
108
- - `.heading-4` — Field label (14px, 500)
109
- - `.heading-5` — Small group header (12px, 600)
110
- - `.p` — Body copy (12px, 500)
111
-
112
- ### Spacing Tokens
113
-
114
- - Flat numeric scale, Tailwind-aligned (1 unit = 4px): `0`, `0.5`, `1`, `1.5`, `2`, `2.5`, `3`, `3.5`, `4`…`16` (e.g. `4` = 16px)
115
- - Web: use numeric utilities directly — Gap: `gap-4`, Padding: `px-4 py-1.5`
116
- - Native: read pixel values via `useTheme().spacing` (e.g. `spacing[4] === 16`)
117
- - Responsiveness via `ResponsiveValue<T>` size props and `<Show>`, not per-density spacing tokens
@@ -1,70 +0,0 @@
1
- ---
2
- name: layout-navigation
3
- description: Architecture, navigation hierarchies, and MCP discovery protocol for AppLayout, Sidebar, Breadcrumb, and Tabs in Wangs UI.
4
- metadata:
5
- owner: wangs-ui
6
- ---
7
- # Skill: Application Layout & Navigation Hierarchy
8
-
9
- Use this skill when constructing application shells, multi-level sidebars, page headers, breadcrumbs, or tabbed views with `@wangs-ui/react-core`.
10
-
11
- ---
12
-
13
- ## 1. MCP Inspection Protocol (Mandatory Single Source of Truth)
14
-
15
- Do **NOT** guess layout block slots, sidebar item interfaces, or breadcrumb props. Query the MCP server dynamically to inspect exact contracts and live story implementations:
16
-
17
- ### Inspect Layout & Navigation Contracts:
18
-
19
- ```json
20
- get_component_api({ "id": "applayout" })
21
- get_component_api({ "id": "sidebar" })
22
- get_component_api({ "id": "breadcrumb" })
23
- get_component_api({ "id": "tabs" })
24
- ```
25
-
26
- ### Read Curated Layout Documentation:
27
-
28
- ```json
29
- get_documentation({ "id": "applayout" })
30
- get_documentation({ "id": "sidebar" })
31
- ```
32
-
33
- ### Inspect Live Story Implementations:
34
-
35
- ```json
36
- get_component_examples({ "component": "applayout", "variant": "TopNavbar" })
37
- get_component_examples({ "component": "sidebar", "variant": "WithSubMenu" })
38
- get_component_examples({ "component": "breadcrumb", "variant": "Default" })
39
- get_component_examples({ "component": "tabs", "variant": "Default" })
40
- ```
41
-
42
- ### Inspect Knowledge Graph & Usages:
43
-
44
- ```json
45
- query_graph({ "query": "AppLayout" })
46
- query_graph({ "query": "Sidebar" })
47
- ```
48
-
49
- ---
50
-
51
- ## 2. Layout Architecture & Mental Model
52
-
53
- 1. **Top-Level App Shell (`AppLayout`)**:
54
- Provides structured slots for `sidebar`, `header`, and main content view, handling responsive viewport scaling and mobile navigation overlays.
55
- 2. **Hierarchical Menu (`Sidebar`)**:
56
- Renders single and nested navigation items, active route indicators, collapsible state, and notification badges.
57
- 3. **Breadcrumb Trail (`Breadcrumb`)**:
58
- Maintains clear navigational hierarchy on page headers.
59
- 4. **Tabbed Sub-Views (`Tabs`)**:
60
- Organizes complex entity detail views or multi-section settings into distinct tabbed panels.
61
-
62
- ---
63
-
64
- ## 3. Mandatory Implementation Rules
65
-
66
- 1. **Query MCP for Current Code Patterns**: Inspect `applayout` and `sidebar` stories via MCP before assembling the layout.
67
- 2. **Strict Subpath Imports**: Import layout blocks via `@wangs-ui/react-core/blocks/*` and primitives via `@wangs-ui/react-core/primitive/*`.
68
- 3. **Consistent Spacing Grid**: Use standard container padding (`p-6` or `p-3xl`) across page contents.
69
- 4. **Page Hierarchy Alignment**: Every page view inside the layout must provide a clear `.heading-1` hierarchy and synchronized breadcrumbs.
70
- 5. **Translate Navigation Labels**: Wrap all sidebar item labels and breadcrumb texts in `t('...')` from `@wangs-ui/react-i18n`.
@@ -1,117 +0,0 @@
1
- ---
2
- name: wangs-ui-components
3
- description: Foundational rules, subpath imports, design tokens, and the MCP Discovery Protocol for building React apps with Wangs UI.
4
- metadata:
5
- owner: wangs-ui
6
- ---
7
- # Skill: Wangs UI Component Fundamentals & MCP Protocol
8
-
9
- Use this skill whenever you write or modify UI components using Wangs UI (`@wangs-ui/react-core`, `@wangs-ui/react-icons`, `@wangs-ui/react-presets`, `@wangs-ui/foundation`).
10
-
11
- ---
12
-
13
- ## 1. The MCP Discovery Protocol (Mandatory Single Source of Truth)
14
-
15
- Do **NOT** guess component props, Pass-Through (`pt`) slots, or event names. Always query the MCP server dynamically to retrieve the current API signatures and live story implementations:
16
-
17
- ```mermaid
18
- graph TD
19
- A[Identify Component Needed] --> B[list_catalog to confirm the id]
20
- B --> C[get_component_api for the typed contract]
21
- C --> D{Need live story / variant code?}
22
- D -->|Yes| E[get_component_examples]
23
- D -->|No| F[get_documentation for curated guidance]
24
- E --> G[Check Graphify: query_graph]
25
- F --> G
26
- G --> H[Implement Component with Subpath Imports]
27
- ```
28
-
29
- ### Discovery Steps:
30
-
31
- 1. **Inspect Component Contract & Props**:
32
- ```json
33
- get_component_api({ "id": "button" })
34
- get_component_api({ "id": "input" })
35
- get_component_api({ "id": "datatable" })
36
- ```
37
- 2. **Inspect Curated Documentation**:
38
- ```json
39
- get_documentation({ "id": "button" })
40
- ```
41
- 3. **Inspect Live Usage & Story Variants**:
42
- ```json
43
- get_component_examples({ "component": "button", "variant": "Sizes" })
44
- get_component_examples({ "component": "datatable", "variant": "CursorPagination" })
45
- ```
46
- 4. **Inspect Relationships & Real Usages in Graph**:
47
- ```json
48
- query_graph({ "query": "DataTable" })
49
- query_graph({ "query": "usePT" })
50
- ```
51
-
52
- ---
53
-
54
- ## 2. Subpath Modular Imports (Mandatory)
55
-
56
- Always import via specific subpaths to guarantee tree-shaking and avoid bundling entire packages:
57
-
58
- ```tsx
59
- // Primitives (@wangs-ui/react-core/primitive/*)
60
- import Button from '@wangs-ui/react-core/primitive/button';
61
- import Input from '@wangs-ui/react-core/primitive/input';
62
- import NumberInput from '@wangs-ui/react-core/primitive/numberinput';
63
- import Select from '@wangs-ui/react-core/primitive/select';
64
- import Badge from '@wangs-ui/react-core/primitive/badge';
65
- import Card from '@wangs-ui/react-core/primitive/card';
66
- import DataTable from '@wangs-ui/react-core/primitive/datatable';
67
-
68
- // Blocks (@wangs-ui/react-core/blocks/*)
69
- import AppLayout from '@wangs-ui/react-core/blocks/applayout';
70
- import Sidebar from '@wangs-ui/react-core/blocks/sidebar';
71
-
72
- // Providers & System Hooks
73
- import { WangsUiProvider } from '@wangs-ui/react-core/api';
74
- import { useI18n } from '@wangs-ui/react-i18n';
75
- import { useTheme } from '@wangs-ui/foundation/theme';
76
-
77
- // Icons (@wangs-ui/react-icons)
78
- import { SearchLine, AddLine, DeleteBin6Line, CheckLine } from '@wangs-ui/react-icons';
79
- ```
80
-
81
- ---
82
-
83
- ## 3. Strict Primitive Substitution Rule
84
-
85
- Never write raw HTML elements when a Wangs UI primitive exists:
86
-
87
- | Forbidden Raw HTML | Mandatory Wangs UI Component | Subpath Import | MCP Documentation ID |
88
- | :------------------------ | :--------------------------- | :------------------------------------------- | :------------------- |
89
- | `<button>` | `Button` | `@wangs-ui/react-core/primitive/button` | `button` |
90
- | `<input type="text">` | `Input` | `@wangs-ui/react-core/primitive/input` | `input` |
91
- | `<input type="number">` | `NumberInput` | `@wangs-ui/react-core/primitive/numberinput` | `numberinput` |
92
- | `<input type="checkbox">` | `Checkbox` | `@wangs-ui/react-core/primitive/checkbox` | `checkbox` |
93
- | `<select>` | `Select` | `@wangs-ui/react-core/primitive/select` | `select` |
94
- | `<dialog>` / modal | `Dialog` / `Modal` | `@wangs-ui/react-core/primitive/dialog` | `dialog`, `modal` |
95
- | `<table>` | `DataTable` | `@wangs-ui/react-core/primitive/datatable` | `datatable` |
96
- | Container box | `Card` | `@wangs-ui/react-core/primitive/card` | `card` |
97
- | Pill badge / status | `Badge` | `@wangs-ui/react-core/primitive/badge` | `badge` |
98
-
99
- ---
100
-
101
- ## 4. Typography Scale & 4px Spacing Tokens
102
-
103
- ### Typography Helper Classes
104
-
105
- - `.heading-1` — Page title (22px, 600)
106
- - `.heading-2` — Section / Card title (18px, 600)
107
- - `.heading-3` — Sub-header (16px, 500)
108
- - `.heading-4` — Field label (14px, 500)
109
- - `.heading-5` — Small group header (12px, 600)
110
- - `.p` — Body copy (12px, 500)
111
-
112
- ### Spacing Tokens
113
-
114
- - Flat numeric scale, Tailwind-aligned (1 unit = 4px): `0`, `0.5`, `1`, `1.5`, `2`, `2.5`, `3`, `3.5`, `4`…`16` (e.g. `4` = 16px)
115
- - Web: use numeric utilities directly — Gap: `gap-4`, Padding: `px-4 py-1.5`
116
- - Native: read pixel values via `useTheme().spacing` (e.g. `spacing[4] === 16`)
117
- - Responsiveness via `ResponsiveValue<T>` size props and `<Show>`, not per-density spacing tokens