@idealyst/mcp-server 1.0.84
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 +202 -0
- package/dist/data/cli-commands.d.ts +2 -0
- package/dist/data/cli-commands.d.ts.map +1 -0
- package/dist/data/cli-commands.js +100 -0
- package/dist/data/cli-commands.js.map +1 -0
- package/dist/data/components/Accordion.d.ts +15 -0
- package/dist/data/components/Accordion.d.ts.map +1 -0
- package/dist/data/components/Accordion.js +112 -0
- package/dist/data/components/Accordion.js.map +1 -0
- package/dist/data/components/ActivityIndicator.d.ts +15 -0
- package/dist/data/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/data/components/ActivityIndicator.js +82 -0
- package/dist/data/components/ActivityIndicator.js.map +1 -0
- package/dist/data/components/Alert.d.ts +15 -0
- package/dist/data/components/Alert.d.ts.map +1 -0
- package/dist/data/components/Alert.js +132 -0
- package/dist/data/components/Alert.js.map +1 -0
- package/dist/data/components/Avatar.d.ts +15 -0
- package/dist/data/components/Avatar.d.ts.map +1 -0
- package/dist/data/components/Avatar.js +93 -0
- package/dist/data/components/Avatar.js.map +1 -0
- package/dist/data/components/Badge.d.ts +15 -0
- package/dist/data/components/Badge.d.ts.map +1 -0
- package/dist/data/components/Badge.js +64 -0
- package/dist/data/components/Badge.js.map +1 -0
- package/dist/data/components/Breadcrumb.d.ts +15 -0
- package/dist/data/components/Breadcrumb.d.ts.map +1 -0
- package/dist/data/components/Breadcrumb.js +96 -0
- package/dist/data/components/Breadcrumb.js.map +1 -0
- package/dist/data/components/Button.d.ts +15 -0
- package/dist/data/components/Button.d.ts.map +1 -0
- package/dist/data/components/Button.js +87 -0
- package/dist/data/components/Button.js.map +1 -0
- package/dist/data/components/Card.d.ts +15 -0
- package/dist/data/components/Card.d.ts.map +1 -0
- package/dist/data/components/Card.js +67 -0
- package/dist/data/components/Card.js.map +1 -0
- package/dist/data/components/Checkbox.d.ts +15 -0
- package/dist/data/components/Checkbox.d.ts.map +1 -0
- package/dist/data/components/Checkbox.js +118 -0
- package/dist/data/components/Checkbox.js.map +1 -0
- package/dist/data/components/Chip.d.ts +15 -0
- package/dist/data/components/Chip.d.ts.map +1 -0
- package/dist/data/components/Chip.js +76 -0
- package/dist/data/components/Chip.js.map +1 -0
- package/dist/data/components/Dialog.d.ts +15 -0
- package/dist/data/components/Dialog.d.ts.map +1 -0
- package/dist/data/components/Dialog.js +137 -0
- package/dist/data/components/Dialog.js.map +1 -0
- package/dist/data/components/Divider.d.ts +15 -0
- package/dist/data/components/Divider.d.ts.map +1 -0
- package/dist/data/components/Divider.js +71 -0
- package/dist/data/components/Divider.js.map +1 -0
- package/dist/data/components/Icon.d.ts +15 -0
- package/dist/data/components/Icon.d.ts.map +1 -0
- package/dist/data/components/Icon.js +70 -0
- package/dist/data/components/Icon.js.map +1 -0
- package/dist/data/components/Image.d.ts +15 -0
- package/dist/data/components/Image.d.ts.map +1 -0
- package/dist/data/components/Image.js +122 -0
- package/dist/data/components/Image.js.map +1 -0
- package/dist/data/components/Input.d.ts +15 -0
- package/dist/data/components/Input.d.ts.map +1 -0
- package/dist/data/components/Input.js +109 -0
- package/dist/data/components/Input.js.map +1 -0
- package/dist/data/components/List.d.ts +15 -0
- package/dist/data/components/List.d.ts.map +1 -0
- package/dist/data/components/List.js +113 -0
- package/dist/data/components/List.js.map +1 -0
- package/dist/data/components/Menu.d.ts +15 -0
- package/dist/data/components/Menu.d.ts.map +1 -0
- package/dist/data/components/Menu.js +132 -0
- package/dist/data/components/Menu.js.map +1 -0
- package/dist/data/components/Popover.d.ts +15 -0
- package/dist/data/components/Popover.d.ts.map +1 -0
- package/dist/data/components/Popover.js +159 -0
- package/dist/data/components/Popover.js.map +1 -0
- package/dist/data/components/Pressable.d.ts +15 -0
- package/dist/data/components/Pressable.d.ts.map +1 -0
- package/dist/data/components/Pressable.js +125 -0
- package/dist/data/components/Pressable.js.map +1 -0
- package/dist/data/components/Progress.d.ts +15 -0
- package/dist/data/components/Progress.d.ts.map +1 -0
- package/dist/data/components/Progress.js +95 -0
- package/dist/data/components/Progress.js.map +1 -0
- package/dist/data/components/RadioButton.d.ts +15 -0
- package/dist/data/components/RadioButton.d.ts.map +1 -0
- package/dist/data/components/RadioButton.js +140 -0
- package/dist/data/components/RadioButton.js.map +1 -0
- package/dist/data/components/SVGImage.d.ts +15 -0
- package/dist/data/components/SVGImage.d.ts.map +1 -0
- package/dist/data/components/SVGImage.js +112 -0
- package/dist/data/components/SVGImage.js.map +1 -0
- package/dist/data/components/Screen.d.ts +15 -0
- package/dist/data/components/Screen.d.ts.map +1 -0
- package/dist/data/components/Screen.js +99 -0
- package/dist/data/components/Screen.js.map +1 -0
- package/dist/data/components/Select.d.ts +15 -0
- package/dist/data/components/Select.d.ts.map +1 -0
- package/dist/data/components/Select.js +146 -0
- package/dist/data/components/Select.js.map +1 -0
- package/dist/data/components/Skeleton.d.ts +15 -0
- package/dist/data/components/Skeleton.d.ts.map +1 -0
- package/dist/data/components/Skeleton.js +110 -0
- package/dist/data/components/Skeleton.js.map +1 -0
- package/dist/data/components/Slider.d.ts +15 -0
- package/dist/data/components/Slider.d.ts.map +1 -0
- package/dist/data/components/Slider.js +129 -0
- package/dist/data/components/Slider.js.map +1 -0
- package/dist/data/components/Switch.d.ts +15 -0
- package/dist/data/components/Switch.d.ts.map +1 -0
- package/dist/data/components/Switch.js +127 -0
- package/dist/data/components/Switch.js.map +1 -0
- package/dist/data/components/TabBar.d.ts +15 -0
- package/dist/data/components/TabBar.d.ts.map +1 -0
- package/dist/data/components/TabBar.js +145 -0
- package/dist/data/components/TabBar.js.map +1 -0
- package/dist/data/components/Table.d.ts +15 -0
- package/dist/data/components/Table.d.ts.map +1 -0
- package/dist/data/components/Table.js +151 -0
- package/dist/data/components/Table.js.map +1 -0
- package/dist/data/components/Tabs.d.ts +15 -0
- package/dist/data/components/Tabs.d.ts.map +1 -0
- package/dist/data/components/Tabs.js +150 -0
- package/dist/data/components/Tabs.js.map +1 -0
- package/dist/data/components/Text.d.ts +15 -0
- package/dist/data/components/Text.d.ts.map +1 -0
- package/dist/data/components/Text.js +85 -0
- package/dist/data/components/Text.js.map +1 -0
- package/dist/data/components/TextArea.d.ts +15 -0
- package/dist/data/components/TextArea.d.ts.map +1 -0
- package/dist/data/components/TextArea.js +155 -0
- package/dist/data/components/TextArea.js.map +1 -0
- package/dist/data/components/Tooltip.d.ts +15 -0
- package/dist/data/components/Tooltip.d.ts.map +1 -0
- package/dist/data/components/Tooltip.js +105 -0
- package/dist/data/components/Tooltip.js.map +1 -0
- package/dist/data/components/Video.d.ts +15 -0
- package/dist/data/components/Video.d.ts.map +1 -0
- package/dist/data/components/Video.js +168 -0
- package/dist/data/components/Video.js.map +1 -0
- package/dist/data/components/View.d.ts +15 -0
- package/dist/data/components/View.d.ts.map +1 -0
- package/dist/data/components/View.js +126 -0
- package/dist/data/components/View.js.map +1 -0
- package/dist/data/components/index.d.ts +37 -0
- package/dist/data/components/index.d.ts.map +1 -0
- package/dist/data/components/index.js +110 -0
- package/dist/data/components/index.js.map +1 -0
- package/dist/data/framework-guides.d.ts +2 -0
- package/dist/data/framework-guides.d.ts.map +1 -0
- package/dist/data/framework-guides.js +589 -0
- package/dist/data/framework-guides.js.map +1 -0
- package/dist/data/icon-guide.d.ts +2 -0
- package/dist/data/icon-guide.d.ts.map +1 -0
- package/dist/data/icon-guide.js +285 -0
- package/dist/data/icon-guide.js.map +1 -0
- package/dist/data/icons.json +7452 -0
- package/dist/data/navigation-guides.d.ts +2 -0
- package/dist/data/navigation-guides.d.ts.map +1 -0
- package/dist/data/navigation-guides.js +1196 -0
- package/dist/data/navigation-guides.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +422 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
- package/src/data/cli-commands.ts +103 -0
- package/src/data/components/Accordion.ts +106 -0
- package/src/data/components/ActivityIndicator.ts +82 -0
- package/src/data/components/Alert.ts +132 -0
- package/src/data/components/Avatar.ts +93 -0
- package/src/data/components/Badge.ts +63 -0
- package/src/data/components/Breadcrumb.ts +94 -0
- package/src/data/components/Button.ts +86 -0
- package/src/data/components/Card.ts +67 -0
- package/src/data/components/Checkbox.ts +117 -0
- package/src/data/components/Chip.ts +93 -0
- package/src/data/components/Dialog.ts +136 -0
- package/src/data/components/Divider.ts +70 -0
- package/src/data/components/Icon.ts +70 -0
- package/src/data/components/Image.ts +121 -0
- package/src/data/components/Input.ts +150 -0
- package/src/data/components/List.ts +103 -0
- package/src/data/components/Menu.ts +125 -0
- package/src/data/components/Popover.ts +159 -0
- package/src/data/components/Pressable.ts +123 -0
- package/src/data/components/Progress.ts +95 -0
- package/src/data/components/RadioButton.ts +130 -0
- package/src/data/components/SVGImage.ts +114 -0
- package/src/data/components/Screen.ts +103 -0
- package/src/data/components/Select.ts +140 -0
- package/src/data/components/Skeleton.ts +102 -0
- package/src/data/components/Slider.ts +150 -0
- package/src/data/components/Switch.ts +127 -0
- package/src/data/components/TabBar.ts +142 -0
- package/src/data/components/Table.ts +153 -0
- package/src/data/components/Tabs.ts +152 -0
- package/src/data/components/Text.ts +85 -0
- package/src/data/components/TextArea.ts +155 -0
- package/src/data/components/Tooltip.ts +105 -0
- package/src/data/components/Video.ts +168 -0
- package/src/data/components/View.ts +126 -0
- package/src/data/components/index.ts +109 -0
- package/src/data/framework-guides.ts +593 -0
- package/src/data/icon-guide.ts +284 -0
- package/src/data/icons.json +7452 -0
- package/src/data/navigation-guides.ts +1199 -0
- package/src/index.ts +473 -0
- package/test-client.js +86 -0
- package/tsconfig.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# @idealyst/mcp-server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server providing documentation, examples, and usage instructions for the Idealyst framework.
|
|
4
|
+
|
|
5
|
+
## What is this?
|
|
6
|
+
|
|
7
|
+
This MCP server allows AI assistants (like Claude) to access comprehensive documentation about the Idealyst framework, including:
|
|
8
|
+
|
|
9
|
+
- Component documentation and examples
|
|
10
|
+
- CLI usage instructions
|
|
11
|
+
- Framework setup guides
|
|
12
|
+
- Best practices and patterns
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# From the Idealyst monorepo
|
|
18
|
+
cd packages/mcp-server
|
|
19
|
+
yarn install
|
|
20
|
+
yarn build
|
|
21
|
+
|
|
22
|
+
# Or install globally
|
|
23
|
+
npm install -g @idealyst/mcp-server
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage with Claude Desktop
|
|
27
|
+
|
|
28
|
+
Add this server to your Claude Desktop configuration:
|
|
29
|
+
|
|
30
|
+
### macOS/Linux
|
|
31
|
+
|
|
32
|
+
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"idealyst": {
|
|
38
|
+
"command": "node",
|
|
39
|
+
"args": [
|
|
40
|
+
"/absolute/path/to/idealyst-framework/packages/mcp-server/dist/index.js"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Windows
|
|
48
|
+
|
|
49
|
+
Edit `%APPDATA%\Claude\claude_desktop_config.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"idealyst": {
|
|
55
|
+
"command": "node",
|
|
56
|
+
"args": [
|
|
57
|
+
"C:\\path\\to\\idealyst-framework\\packages\\mcp-server\\dist\\index.js"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
After adding the configuration, restart Claude Desktop.
|
|
65
|
+
|
|
66
|
+
## Available Tools
|
|
67
|
+
|
|
68
|
+
### list_components
|
|
69
|
+
|
|
70
|
+
List all available Idealyst components with brief descriptions.
|
|
71
|
+
|
|
72
|
+
**Example:**
|
|
73
|
+
```
|
|
74
|
+
List all Idealyst components
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### get_component_docs
|
|
78
|
+
|
|
79
|
+
Get detailed documentation for a specific component including props, usage, and examples.
|
|
80
|
+
|
|
81
|
+
**Parameters:**
|
|
82
|
+
- `component` (string): Component name (e.g., 'Button', 'Card', 'Input')
|
|
83
|
+
|
|
84
|
+
**Example:**
|
|
85
|
+
```
|
|
86
|
+
Get documentation for the Button component
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### get_component_example
|
|
90
|
+
|
|
91
|
+
Get code examples for a specific component.
|
|
92
|
+
|
|
93
|
+
**Parameters:**
|
|
94
|
+
- `component` (string): Component name
|
|
95
|
+
- `example_type` (optional): 'basic', 'variants', 'with-icons', or 'interactive'
|
|
96
|
+
|
|
97
|
+
**Example:**
|
|
98
|
+
```
|
|
99
|
+
Show me an interactive example of the Dialog component
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### get_cli_usage
|
|
103
|
+
|
|
104
|
+
Get information about Idealyst CLI commands.
|
|
105
|
+
|
|
106
|
+
**Parameters:**
|
|
107
|
+
- `command` (optional): Specific CLI command
|
|
108
|
+
|
|
109
|
+
**Example:**
|
|
110
|
+
```
|
|
111
|
+
How do I use the Idealyst CLI to create a new web app?
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### search_components
|
|
115
|
+
|
|
116
|
+
Search for components by name, category, or feature.
|
|
117
|
+
|
|
118
|
+
**Parameters:**
|
|
119
|
+
- `query` (optional): Search query
|
|
120
|
+
- `category` (optional): Filter by category ('layout', 'form', 'display', 'navigation', 'overlay', 'data')
|
|
121
|
+
|
|
122
|
+
**Example:**
|
|
123
|
+
```
|
|
124
|
+
Search for form components in Idealyst
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Available Resources
|
|
128
|
+
|
|
129
|
+
The server also provides framework guides as resources:
|
|
130
|
+
|
|
131
|
+
- **Getting Started**: Complete setup guide
|
|
132
|
+
- **Components Overview**: All available components organized by category
|
|
133
|
+
- **Theming Guide**: Customizing themes
|
|
134
|
+
- **CLI Reference**: Complete CLI documentation
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Install dependencies
|
|
140
|
+
yarn install
|
|
141
|
+
|
|
142
|
+
# Build
|
|
143
|
+
yarn build
|
|
144
|
+
|
|
145
|
+
# Watch mode
|
|
146
|
+
yarn dev
|
|
147
|
+
|
|
148
|
+
# Test the server
|
|
149
|
+
node dist/index.js
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Example Queries for Claude
|
|
153
|
+
|
|
154
|
+
Once the MCP server is connected to Claude, you can ask questions like:
|
|
155
|
+
|
|
156
|
+
- "List all Idealyst components"
|
|
157
|
+
- "Show me how to use the Button component with icons"
|
|
158
|
+
- "How do I create a new Idealyst workspace?"
|
|
159
|
+
- "What form components are available in Idealyst?"
|
|
160
|
+
- "Give me an example of using the Dialog component"
|
|
161
|
+
- "How do I customize the theme in Idealyst?"
|
|
162
|
+
|
|
163
|
+
## Architecture
|
|
164
|
+
|
|
165
|
+
The server exposes:
|
|
166
|
+
|
|
167
|
+
- **Tools**: Callable functions for querying component docs, examples, and CLI usage
|
|
168
|
+
- **Resources**: Static framework guides and documentation
|
|
169
|
+
|
|
170
|
+
All data is stored in TypeScript files under `src/data/`:
|
|
171
|
+
- `components.ts`: Component documentation and examples
|
|
172
|
+
- `cli-commands.ts`: CLI command reference
|
|
173
|
+
- `framework-guides.ts`: Framework setup and usage guides
|
|
174
|
+
|
|
175
|
+
## Adding New Components
|
|
176
|
+
|
|
177
|
+
To add documentation for a new component, edit `src/data/components.ts`:
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
export const components: Record<string, any> = {
|
|
181
|
+
YourComponent: {
|
|
182
|
+
category: "display",
|
|
183
|
+
description: "Brief description",
|
|
184
|
+
props: "Props documentation...",
|
|
185
|
+
features: ["Feature 1", "Feature 2"],
|
|
186
|
+
bestPractices: ["Practice 1", "Practice 2"],
|
|
187
|
+
usage: "Basic usage example...",
|
|
188
|
+
examples: {
|
|
189
|
+
basic: "Basic example code...",
|
|
190
|
+
variants: "Variants example code...",
|
|
191
|
+
"with-icons": "Icon example code...",
|
|
192
|
+
interactive: "Interactive example code...",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Then rebuild: `yarn build`
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-commands.d.ts","sourceRoot":"","sources":["../../src/data/cli-commands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAsG3C,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const cliCommands = {
|
|
2
|
+
init: {
|
|
3
|
+
description: "Initialize a new Idealyst workspace with monorepo structure",
|
|
4
|
+
usage: "idealyst init <workspace-name> [options]",
|
|
5
|
+
options: [
|
|
6
|
+
{
|
|
7
|
+
flag: "workspace-name",
|
|
8
|
+
description: "Name for the new workspace (required)",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
flag: "--git",
|
|
12
|
+
description: "Initialize git repository (default: true)",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
flag: "--install",
|
|
16
|
+
description: "Install dependencies after creation (default: true)",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
examples: [
|
|
20
|
+
"idealyst init my-app",
|
|
21
|
+
"idealyst init my-company-workspace --no-git",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
create: {
|
|
25
|
+
description: "Create a new package within the Idealyst workspace",
|
|
26
|
+
usage: "idealyst create <name> --type <type> [options]",
|
|
27
|
+
options: [
|
|
28
|
+
{
|
|
29
|
+
flag: "name",
|
|
30
|
+
description: "Name for the new package (required)",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
flag: "--type",
|
|
34
|
+
description: "Package type: web | native | api | database | shared (required)",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
flag: "--app-name",
|
|
38
|
+
description: "Display name for native app (required for native type)",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
flag: "--with-trpc",
|
|
42
|
+
description: "Include tRPC setup (for web/native)",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
flag: "--no-trpc",
|
|
46
|
+
description: "Exclude tRPC setup (for web/native)",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
examples: [
|
|
50
|
+
"idealyst create web --type web --with-trpc",
|
|
51
|
+
"idealyst create mobile --type native --app-name \"My App\" --with-trpc",
|
|
52
|
+
"idealyst create api --type api",
|
|
53
|
+
"idealyst create database --type database",
|
|
54
|
+
"idealyst create shared --type shared",
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
dev: {
|
|
58
|
+
description: "Start development server for a package",
|
|
59
|
+
usage: "cd packages/<name> && yarn dev",
|
|
60
|
+
options: [
|
|
61
|
+
{
|
|
62
|
+
flag: "--port",
|
|
63
|
+
description: "Port number for dev server (web only)",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
examples: [
|
|
67
|
+
"cd packages/web && yarn dev",
|
|
68
|
+
"cd packages/native && yarn dev",
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
build: {
|
|
72
|
+
description: "Build a package for production",
|
|
73
|
+
usage: "cd packages/<name> && yarn build",
|
|
74
|
+
options: [],
|
|
75
|
+
examples: [
|
|
76
|
+
"cd packages/web && yarn build",
|
|
77
|
+
"cd packages/api && yarn build",
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
test: {
|
|
81
|
+
description: "Run tests for packages",
|
|
82
|
+
usage: "yarn test [options]",
|
|
83
|
+
options: [
|
|
84
|
+
{
|
|
85
|
+
flag: "--watch",
|
|
86
|
+
description: "Run tests in watch mode",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
flag: "--coverage",
|
|
90
|
+
description: "Generate coverage report",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
examples: [
|
|
94
|
+
"yarn test",
|
|
95
|
+
"yarn test:watch",
|
|
96
|
+
"yarn test:coverage",
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=cli-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-commands.js","sourceRoot":"","sources":["../../src/data/cli-commands.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAwB;IAC9C,IAAI,EAAE;QACJ,WAAW,EAAE,6DAA6D;QAC1E,KAAK,EAAE,0CAA0C;QACjD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,uCAAuC;aACrD;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,2CAA2C;aACzD;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,qDAAqD;aACnE;SACF;QACD,QAAQ,EAAE;YACR,sBAAsB;YACtB,6CAA6C;SAC9C;KACF;IAED,MAAM,EAAE;QACN,WAAW,EAAE,oDAAoD;QACjE,KAAK,EAAE,gDAAgD;QACvD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iEAAiE;aAC/E;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,wDAAwD;aACtE;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,QAAQ,EAAE;YACR,4CAA4C;YAC5C,wEAAwE;YACxE,gCAAgC;YAChC,0CAA0C;YAC1C,sCAAsC;SACvC;KACF;IAED,GAAG,EAAE;QACH,WAAW,EAAE,wCAAwC;QACrD,KAAK,EAAE,gCAAgC;QACvC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;SACF;QACD,QAAQ,EAAE;YACR,6BAA6B;YAC7B,gCAAgC;SACjC;KACF;IAED,KAAK,EAAE;QACL,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,kCAAkC;QACzC,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE;YACR,+BAA+B;YAC/B,+BAA+B;SAChC;KACF;IAED,IAAI,EAAE;QACJ,WAAW,EAAE,wBAAwB;QACrC,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,yBAAyB;aACvC;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,0BAA0B;aACxC;SACF;QACD,QAAQ,EAAE;YACR,WAAW;YACX,iBAAiB;YACjB,oBAAoB;SACrB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Accordion: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/data/components/Accordion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAiHrB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export const Accordion = {
|
|
2
|
+
category: "display",
|
|
3
|
+
description: "Expandable/collapsible content sections with support for single or multiple open items",
|
|
4
|
+
props: `
|
|
5
|
+
- \`items\`: AccordionItem[] - Array of accordion items
|
|
6
|
+
- \`id\`: string - Unique identifier for the item
|
|
7
|
+
- \`title\`: string - Title text displayed in the header
|
|
8
|
+
- \`content\`: ReactNode - Content displayed when expanded
|
|
9
|
+
- \`disabled\`: boolean - Whether the item is disabled
|
|
10
|
+
- \`allowMultiple\`: boolean - Allow multiple items to be expanded simultaneously (default: false)
|
|
11
|
+
- \`defaultExpanded\`: string[] - Array of item IDs to expand by default
|
|
12
|
+
- \`variant\`: 'default' | 'separated' | 'bordered' - Visual style variant
|
|
13
|
+
- \`intent\`: 'primary' | 'neutral' | 'success' | 'error' | 'warning' - Color scheme
|
|
14
|
+
- \`size\`: 'small' | 'medium' | 'large' - Size of accordion items
|
|
15
|
+
- \`style\`: ViewStyle - Additional custom styles
|
|
16
|
+
- \`testID\`: string - Test identifier
|
|
17
|
+
`,
|
|
18
|
+
features: [
|
|
19
|
+
"Single or multiple item expansion modes",
|
|
20
|
+
"Default expanded items support",
|
|
21
|
+
"Three visual variants",
|
|
22
|
+
"Five intent colors",
|
|
23
|
+
"Three size options",
|
|
24
|
+
"Disabled item state",
|
|
25
|
+
"Controlled and uncontrolled modes",
|
|
26
|
+
],
|
|
27
|
+
bestPractices: [
|
|
28
|
+
"Use 'default' variant for standard content organization",
|
|
29
|
+
"Use 'separated' variant for distinct sections",
|
|
30
|
+
"Set allowMultiple to true for FAQs where users may need to compare answers",
|
|
31
|
+
"Keep accordion titles concise and descriptive",
|
|
32
|
+
"Use defaultExpanded sparingly to avoid overwhelming users",
|
|
33
|
+
],
|
|
34
|
+
usage: `
|
|
35
|
+
import { Accordion } from '@idealyst/components';
|
|
36
|
+
|
|
37
|
+
const items = [
|
|
38
|
+
{
|
|
39
|
+
id: '1',
|
|
40
|
+
title: 'What is Idealyst?',
|
|
41
|
+
content: <Text>Idealyst is a cross-platform React framework...</Text>,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: '2',
|
|
45
|
+
title: 'How do I get started?',
|
|
46
|
+
content: <Text>Install the CLI and create a new project...</Text>,
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
<Accordion
|
|
51
|
+
items={items}
|
|
52
|
+
variant="bordered"
|
|
53
|
+
defaultExpanded={['1']}
|
|
54
|
+
/>
|
|
55
|
+
`,
|
|
56
|
+
examples: {
|
|
57
|
+
basic: `import { Accordion, Text } from '@idealyst/components';
|
|
58
|
+
|
|
59
|
+
const items = [
|
|
60
|
+
{ id: '1', title: 'Section 1', content: <Text>Content 1</Text> },
|
|
61
|
+
{ id: '2', title: 'Section 2', content: <Text>Content 2</Text> },
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
<Accordion items={items} />`,
|
|
65
|
+
variants: `import { Accordion, Text } from '@idealyst/components';
|
|
66
|
+
|
|
67
|
+
const items = [
|
|
68
|
+
{ id: '1', title: 'Item', content: <Text>Content</Text> },
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
// Different variants
|
|
72
|
+
<Accordion items={items} variant="default" />
|
|
73
|
+
<Accordion items={items} variant="separated" />
|
|
74
|
+
<Accordion items={items} variant="bordered" />`,
|
|
75
|
+
"with-icons": `import { Accordion, View, Icon, Text } from '@idealyst/components';
|
|
76
|
+
|
|
77
|
+
const items = [
|
|
78
|
+
{
|
|
79
|
+
id: '1',
|
|
80
|
+
title: 'Account Settings',
|
|
81
|
+
content: (
|
|
82
|
+
<View spacing="sm">
|
|
83
|
+
<Icon name="account" size="md" />
|
|
84
|
+
<Text>Manage your account preferences</Text>
|
|
85
|
+
</View>
|
|
86
|
+
),
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
<Accordion items={items} intent="primary" />`,
|
|
91
|
+
interactive: `import { Accordion, Text } from '@idealyst/components';
|
|
92
|
+
import { useState } from 'react';
|
|
93
|
+
|
|
94
|
+
function Example() {
|
|
95
|
+
const items = [
|
|
96
|
+
{ id: '1', title: 'FAQ 1', content: <Text>Answer 1</Text> },
|
|
97
|
+
{ id: '2', title: 'FAQ 2', content: <Text>Answer 2</Text> },
|
|
98
|
+
{ id: '3', title: 'FAQ 3', content: <Text>Answer 3</Text> },
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<Accordion
|
|
103
|
+
items={items}
|
|
104
|
+
allowMultiple
|
|
105
|
+
defaultExpanded={['1']}
|
|
106
|
+
variant="bordered"
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
}`,
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/data/components/Accordion.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,wFAAwF;IACrG,KAAK,EAAE;;;;;;;;;;;;;CAaR;IACC,QAAQ,EAAE;QACR,yCAAyC;QACzC,gCAAgC;QAChC,uBAAuB;QACvB,oBAAoB;QACpB,oBAAoB;QACpB,qBAAqB;QACrB,mCAAmC;KACpC;IACD,aAAa,EAAE;QACb,yDAAyD;QACzD,+CAA+C;QAC/C,4EAA4E;QAC5E,+CAA+C;QAC/C,2DAA2D;KAC5D;IACD,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;CAqBR;IACC,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;;;4BAOiB;QAExB,QAAQ,EAAE;;;;;;;;;+CASiC;QAE3C,YAAY,EAAE;;;;;;;;;;;;;;;6CAe2B;QAEzC,WAAW,EAAE;;;;;;;;;;;;;;;;;;EAkBf;KACC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const ActivityIndicator: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ActivityIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityIndicator.d.ts","sourceRoot":"","sources":["../../../src/data/components/ActivityIndicator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAmF7B,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const ActivityIndicator = {
|
|
2
|
+
category: "feedback",
|
|
3
|
+
description: "Loading spinner/indicator for showing ongoing processes or loading states",
|
|
4
|
+
props: `
|
|
5
|
+
- \`animating\`: boolean - Whether the indicator is animating/visible (default: true)
|
|
6
|
+
- \`size\`: 'small' | 'medium' | 'large' | number - Size of the indicator (default: medium)
|
|
7
|
+
- \`intent\`: 'primary' | 'neutral' | 'success' | 'error' | 'warning' - Color scheme (default: primary)
|
|
8
|
+
- \`color\`: string - Custom color override (overrides intent)
|
|
9
|
+
- \`style\`: ViewStyle - Additional custom styles
|
|
10
|
+
- \`testID\`: string - Test identifier
|
|
11
|
+
- \`hidesWhenStopped\`: boolean - Hide indicator when not animating (default: true)
|
|
12
|
+
`,
|
|
13
|
+
features: [
|
|
14
|
+
"Animated loading spinner",
|
|
15
|
+
"Three predefined sizes plus custom numeric size",
|
|
16
|
+
"Five intent colors",
|
|
17
|
+
"Custom color support",
|
|
18
|
+
"Auto-hide when stopped",
|
|
19
|
+
"Cross-platform support",
|
|
20
|
+
],
|
|
21
|
+
bestPractices: [
|
|
22
|
+
"Use 'primary' intent for general loading states",
|
|
23
|
+
"Use 'small' size for inline loading indicators",
|
|
24
|
+
"Use 'large' size for full-screen loading overlays",
|
|
25
|
+
"Always provide context about what is loading",
|
|
26
|
+
"Consider using with overlay for blocking operations",
|
|
27
|
+
],
|
|
28
|
+
usage: `
|
|
29
|
+
import { ActivityIndicator, View, Text } from '@idealyst/components';
|
|
30
|
+
|
|
31
|
+
<View spacing="md">
|
|
32
|
+
<ActivityIndicator size="large" intent="primary" />
|
|
33
|
+
<Text>Loading data...</Text>
|
|
34
|
+
</View>
|
|
35
|
+
`,
|
|
36
|
+
examples: {
|
|
37
|
+
basic: `import { ActivityIndicator } from '@idealyst/components';
|
|
38
|
+
|
|
39
|
+
<ActivityIndicator />`,
|
|
40
|
+
variants: `import { ActivityIndicator, View } from '@idealyst/components';
|
|
41
|
+
|
|
42
|
+
<View spacing="md">
|
|
43
|
+
<ActivityIndicator size="small" />
|
|
44
|
+
<ActivityIndicator size="medium" />
|
|
45
|
+
<ActivityIndicator size="large" />
|
|
46
|
+
<ActivityIndicator size={48} />
|
|
47
|
+
</View>`,
|
|
48
|
+
"with-icons": `import { ActivityIndicator, View, Text } from '@idealyst/components';
|
|
49
|
+
|
|
50
|
+
<View spacing="sm" style={{ alignItems: 'center' }}>
|
|
51
|
+
<ActivityIndicator intent="success" size="large" />
|
|
52
|
+
<Text>Processing...</Text>
|
|
53
|
+
</View>`,
|
|
54
|
+
interactive: `import { ActivityIndicator, Button, View, Text } from '@idealyst/components';
|
|
55
|
+
import { useState } from 'react';
|
|
56
|
+
|
|
57
|
+
function Example() {
|
|
58
|
+
const [loading, setLoading] = useState(false);
|
|
59
|
+
|
|
60
|
+
const handleLoad = async () => {
|
|
61
|
+
setLoading(true);
|
|
62
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
63
|
+
setLoading(false);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<View spacing="md">
|
|
68
|
+
<Button onPress={handleLoad} disabled={loading}>
|
|
69
|
+
Load Data
|
|
70
|
+
</Button>
|
|
71
|
+
{loading && (
|
|
72
|
+
<View spacing="sm" style={{ alignItems: 'center' }}>
|
|
73
|
+
<ActivityIndicator size="large" />
|
|
74
|
+
<Text>Loading...</Text>
|
|
75
|
+
</View>
|
|
76
|
+
)}
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
79
|
+
}`,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=ActivityIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../../../src/data/components/ActivityIndicator.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,2EAA2E;IACxF,KAAK,EAAE;;;;;;;;CAQR;IACC,QAAQ,EAAE;QACR,0BAA0B;QAC1B,iDAAiD;QACjD,oBAAoB;QACpB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;KACzB;IACD,aAAa,EAAE;QACb,iDAAiD;QACjD,gDAAgD;QAChD,mDAAmD;QACnD,8CAA8C;QAC9C,qDAAqD;KACtD;IACD,KAAK,EAAE;;;;;;;CAOR;IACC,QAAQ,EAAE;QACR,KAAK,EAAE;;sBAEW;QAElB,QAAQ,EAAE;;;;;;;QAON;QAEJ,YAAY,EAAE;;;;;QAKV;QAEJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;EAyBf;KACC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const Alert: {
|
|
2
|
+
category: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: string;
|
|
5
|
+
features: string[];
|
|
6
|
+
bestPractices: string[];
|
|
7
|
+
usage: string;
|
|
8
|
+
examples: {
|
|
9
|
+
basic: string;
|
|
10
|
+
variants: string;
|
|
11
|
+
"with-icons": string;
|
|
12
|
+
interactive: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/data/components/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAqIjB,CAAC"}
|