ui-ux-pro-max-cli 2.8.8
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 +99 -0
- package/assets/data/_sync_all.py +414 -0
- package/assets/data/app-interface.csv +31 -0
- package/assets/data/charts.csv +26 -0
- package/assets/data/colors.csv +162 -0
- package/assets/data/design.csv +1776 -0
- package/assets/data/draft.csv +1779 -0
- package/assets/data/google-fonts.csv +1924 -0
- package/assets/data/icons.csv +106 -0
- package/assets/data/landing.csv +35 -0
- package/assets/data/products.csv +162 -0
- package/assets/data/react-performance.csv +45 -0
- package/assets/data/stacks/angular.csv +51 -0
- package/assets/data/stacks/astro.csv +54 -0
- package/assets/data/stacks/flutter.csv +53 -0
- package/assets/data/stacks/html-tailwind.csv +56 -0
- package/assets/data/stacks/javafx.csv +76 -0
- package/assets/data/stacks/jetpack-compose.csv +53 -0
- package/assets/data/stacks/laravel.csv +51 -0
- package/assets/data/stacks/nextjs.csv +53 -0
- package/assets/data/stacks/nuxt-ui.csv +71 -0
- package/assets/data/stacks/nuxtjs.csv +59 -0
- package/assets/data/stacks/react-native.csv +52 -0
- package/assets/data/stacks/react.csv +54 -0
- package/assets/data/stacks/shadcn.csv +61 -0
- package/assets/data/stacks/svelte.csv +54 -0
- package/assets/data/stacks/swiftui.csv +51 -0
- package/assets/data/stacks/threejs.csv +54 -0
- package/assets/data/stacks/vue.csv +50 -0
- package/assets/data/styles.csv +85 -0
- package/assets/data/typography.csv +74 -0
- package/assets/data/ui-reasoning.csv +162 -0
- package/assets/data/ux-guidelines.csv +100 -0
- package/assets/scripts/core.py +263 -0
- package/assets/scripts/design_system.py +1157 -0
- package/assets/scripts/search.py +114 -0
- package/assets/skills/banner-design/SKILL.md +196 -0
- package/assets/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/brand/SKILL.md +97 -0
- package/assets/skills/brand/references/approval-checklist.md +169 -0
- package/assets/skills/brand/references/asset-organization.md +157 -0
- package/assets/skills/brand/references/brand-guideline-template.md +140 -0
- package/assets/skills/brand/references/color-palette-management.md +186 -0
- package/assets/skills/brand/references/consistency-checklist.md +94 -0
- package/assets/skills/brand/references/logo-usage-rules.md +185 -0
- package/assets/skills/brand/references/messaging-framework.md +85 -0
- package/assets/skills/brand/references/typography-specifications.md +214 -0
- package/assets/skills/brand/references/update.md +118 -0
- package/assets/skills/brand/references/visual-identity.md +96 -0
- package/assets/skills/brand/references/voice-framework.md +88 -0
- package/assets/skills/brand/scripts/extract-colors.cjs +341 -0
- package/assets/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/assets/skills/brand/scripts/sync-brand-to-tokens.cjs +266 -0
- package/assets/skills/brand/scripts/validate-asset.cjs +387 -0
- package/assets/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/assets/skills/design/SKILL.md +313 -0
- package/assets/skills/design/data/cip/deliverables.csv +51 -0
- package/assets/skills/design/data/cip/industries.csv +21 -0
- package/assets/skills/design/data/cip/mockup-contexts.csv +21 -0
- package/assets/skills/design/data/cip/styles.csv +21 -0
- package/assets/skills/design/data/icon/styles.csv +16 -0
- package/assets/skills/design/data/logo/colors.csv +56 -0
- package/assets/skills/design/data/logo/industries.csv +56 -0
- package/assets/skills/design/data/logo/styles.csv +56 -0
- package/assets/skills/design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/design/references/cip-deliverable-guide.md +95 -0
- package/assets/skills/design/references/cip-design.md +121 -0
- package/assets/skills/design/references/cip-prompt-engineering.md +84 -0
- package/assets/skills/design/references/cip-style-guide.md +68 -0
- package/assets/skills/design/references/design-routing.md +207 -0
- package/assets/skills/design/references/icon-design.md +122 -0
- package/assets/skills/design/references/logo-color-psychology.md +101 -0
- package/assets/skills/design/references/logo-design.md +92 -0
- package/assets/skills/design/references/logo-prompt-engineering.md +158 -0
- package/assets/skills/design/references/logo-style-guide.md +109 -0
- package/assets/skills/design/references/slides-copywriting-formulas.md +84 -0
- package/assets/skills/design/references/slides-create.md +4 -0
- package/assets/skills/design/references/slides-html-template.md +295 -0
- package/assets/skills/design/references/slides-layout-patterns.md +137 -0
- package/assets/skills/design/references/slides-strategies.md +94 -0
- package/assets/skills/design/references/slides.md +42 -0
- package/assets/skills/design/references/social-photos-design.md +329 -0
- package/assets/skills/design/scripts/cip/core.py +215 -0
- package/assets/skills/design/scripts/cip/generate.py +484 -0
- package/assets/skills/design/scripts/cip/render-html.py +424 -0
- package/assets/skills/design/scripts/cip/search.py +127 -0
- package/assets/skills/design/scripts/icon/generate.py +487 -0
- package/assets/skills/design/scripts/logo/core.py +175 -0
- package/assets/skills/design/scripts/logo/generate.py +362 -0
- package/assets/skills/design/scripts/logo/search.py +114 -0
- package/assets/skills/design-system/SKILL.md +244 -0
- package/assets/skills/design-system/data/slide-backgrounds.csv +11 -0
- package/assets/skills/design-system/data/slide-charts.csv +26 -0
- package/assets/skills/design-system/data/slide-color-logic.csv +14 -0
- package/assets/skills/design-system/data/slide-copy.csv +26 -0
- package/assets/skills/design-system/data/slide-layout-logic.csv +16 -0
- package/assets/skills/design-system/data/slide-layouts.csv +26 -0
- package/assets/skills/design-system/data/slide-strategies.csv +16 -0
- package/assets/skills/design-system/data/slide-typography.csv +15 -0
- package/assets/skills/design-system/references/component-specs.md +236 -0
- package/assets/skills/design-system/references/component-tokens.md +214 -0
- package/assets/skills/design-system/references/primitive-tokens.md +203 -0
- package/assets/skills/design-system/references/semantic-tokens.md +215 -0
- package/assets/skills/design-system/references/states-and-variants.md +241 -0
- package/assets/skills/design-system/references/tailwind-integration.md +251 -0
- package/assets/skills/design-system/references/token-architecture.md +224 -0
- package/assets/skills/design-system/scripts/embed-tokens.cjs +99 -0
- package/assets/skills/design-system/scripts/fetch-background.py +317 -0
- package/assets/skills/design-system/scripts/generate-slide.py +770 -0
- package/assets/skills/design-system/scripts/generate-tokens.cjs +205 -0
- package/assets/skills/design-system/scripts/html-token-validator.py +327 -0
- package/assets/skills/design-system/scripts/search-slides.py +218 -0
- package/assets/skills/design-system/scripts/slide-token-validator.py +35 -0
- package/assets/skills/design-system/scripts/slide_search_core.py +453 -0
- package/assets/skills/design-system/scripts/validate-tokens.cjs +251 -0
- package/assets/skills/design-system/templates/design-tokens-starter.json +143 -0
- package/assets/skills/slides/SKILL.md +40 -0
- package/assets/skills/slides/references/copywriting-formulas.md +84 -0
- package/assets/skills/slides/references/create.md +4 -0
- package/assets/skills/slides/references/html-template.md +295 -0
- package/assets/skills/slides/references/layout-patterns.md +137 -0
- package/assets/skills/slides/references/slide-strategies.md +94 -0
- package/assets/skills/ui-styling/LICENSE.txt +202 -0
- package/assets/skills/ui-styling/SKILL.md +324 -0
- package/assets/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/assets/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/assets/skills/ui-styling/references/shadcn-components.md +424 -0
- package/assets/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/assets/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/assets/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/assets/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/assets/skills/ui-styling/scripts/requirements.txt +17 -0
- package/assets/skills/ui-styling/scripts/shadcn_add.py +308 -0
- package/assets/skills/ui-styling/scripts/tailwind_config_gen.py +473 -0
- package/assets/skills/ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/assets/skills/ui-styling/scripts/tests/requirements.txt +3 -0
- package/assets/skills/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/assets/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/assets/templates/base/quick-reference.md +297 -0
- package/assets/templates/base/skill-content.md +368 -0
- package/assets/templates/platforms/agent.json +21 -0
- package/assets/templates/platforms/augment.json +18 -0
- package/assets/templates/platforms/claude.json +21 -0
- package/assets/templates/platforms/codebuddy.json +21 -0
- package/assets/templates/platforms/codex.json +21 -0
- package/assets/templates/platforms/continue.json +21 -0
- package/assets/templates/platforms/copilot.json +21 -0
- package/assets/templates/platforms/cursor.json +21 -0
- package/assets/templates/platforms/droid.json +21 -0
- package/assets/templates/platforms/gemini.json +21 -0
- package/assets/templates/platforms/kilocode.json +21 -0
- package/assets/templates/platforms/kiro.json +21 -0
- package/assets/templates/platforms/opencode.json +21 -0
- package/assets/templates/platforms/qoder.json +21 -0
- package/assets/templates/platforms/roocode.json +21 -0
- package/assets/templates/platforms/trae.json +21 -0
- package/assets/templates/platforms/warp.json +18 -0
- package/assets/templates/platforms/windsurf.json +21 -0
- package/dist/index.js +10630 -0
- package/package.json +51 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
shadcn/ui Component Installer
|
|
4
|
+
|
|
5
|
+
Add shadcn/ui components to project with automatic dependency handling.
|
|
6
|
+
Wraps shadcn CLI for programmatic component installation.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import json
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import List, Optional
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ShadcnInstaller:
|
|
18
|
+
"""Handle shadcn/ui component installation."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, project_root: Optional[Path] = None, dry_run: bool = False):
|
|
21
|
+
"""
|
|
22
|
+
Initialize installer.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
project_root: Project root directory (default: current directory)
|
|
26
|
+
dry_run: If True, show actions without executing
|
|
27
|
+
"""
|
|
28
|
+
self.project_root = project_root or Path.cwd()
|
|
29
|
+
self.dry_run = dry_run
|
|
30
|
+
self.components_json = self.project_root / "components.json"
|
|
31
|
+
|
|
32
|
+
def check_shadcn_config(self) -> bool:
|
|
33
|
+
"""
|
|
34
|
+
Check if shadcn is initialized in project.
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
True if components.json exists
|
|
38
|
+
"""
|
|
39
|
+
return self.components_json.exists()
|
|
40
|
+
|
|
41
|
+
def get_installed_components(self) -> List[str]:
|
|
42
|
+
"""
|
|
43
|
+
Get list of already installed components.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
List of installed component names
|
|
47
|
+
"""
|
|
48
|
+
if not self.check_shadcn_config():
|
|
49
|
+
return []
|
|
50
|
+
|
|
51
|
+
try:
|
|
52
|
+
with open(self.components_json) as f:
|
|
53
|
+
config = json.load(f)
|
|
54
|
+
|
|
55
|
+
components_dir = self.project_root / config.get("aliases", {}).get(
|
|
56
|
+
"components", "components"
|
|
57
|
+
).replace("@/", "")
|
|
58
|
+
ui_dir = components_dir / "ui"
|
|
59
|
+
|
|
60
|
+
if not ui_dir.exists():
|
|
61
|
+
return []
|
|
62
|
+
|
|
63
|
+
return [f.stem for f in ui_dir.glob("*.tsx") if f.is_file()]
|
|
64
|
+
except (json.JSONDecodeError, KeyError, OSError):
|
|
65
|
+
return []
|
|
66
|
+
|
|
67
|
+
def _get_shadcn_version(self) -> str:
|
|
68
|
+
"""Read shadcn version from project package.json; fall back to a pinned default."""
|
|
69
|
+
pkg_json = self.project_root / "package.json"
|
|
70
|
+
if pkg_json.exists():
|
|
71
|
+
try:
|
|
72
|
+
pkg = json.loads(pkg_json.read_text())
|
|
73
|
+
for section in ("dependencies", "devDependencies"):
|
|
74
|
+
version = pkg.get(section, {}).get("shadcn")
|
|
75
|
+
if version:
|
|
76
|
+
return version.lstrip("^~>=<").split()[0]
|
|
77
|
+
except (json.JSONDecodeError, KeyError):
|
|
78
|
+
pass
|
|
79
|
+
return "2.3.0" # pinned fallback; update when newer stable release is needed
|
|
80
|
+
|
|
81
|
+
def add_components(
|
|
82
|
+
self, components: List[str], overwrite: bool = False
|
|
83
|
+
) -> tuple[bool, str]:
|
|
84
|
+
"""
|
|
85
|
+
Add shadcn/ui components.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
components: List of component names to add
|
|
89
|
+
overwrite: If True, overwrite existing components
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
Tuple of (success, message)
|
|
93
|
+
"""
|
|
94
|
+
if not components:
|
|
95
|
+
return False, "No components specified"
|
|
96
|
+
|
|
97
|
+
if not self.check_shadcn_config():
|
|
98
|
+
return (
|
|
99
|
+
False,
|
|
100
|
+
"shadcn not initialized. Run 'npx shadcn@latest init' first",
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# Check which components already exist
|
|
104
|
+
installed = self.get_installed_components()
|
|
105
|
+
already_installed = [c for c in components if c in installed]
|
|
106
|
+
|
|
107
|
+
if already_installed and not overwrite:
|
|
108
|
+
return (
|
|
109
|
+
False,
|
|
110
|
+
f"Components already installed: {', '.join(already_installed)}. "
|
|
111
|
+
"Use --overwrite to reinstall",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
# Build command
|
|
115
|
+
shadcn_version = self._get_shadcn_version()
|
|
116
|
+
cmd = ["npx", f"shadcn@{shadcn_version}", "add"] + components
|
|
117
|
+
|
|
118
|
+
if overwrite:
|
|
119
|
+
cmd.append("--overwrite")
|
|
120
|
+
|
|
121
|
+
if self.dry_run:
|
|
122
|
+
return True, f"Would run: {' '.join(cmd)}"
|
|
123
|
+
|
|
124
|
+
# Execute command
|
|
125
|
+
try:
|
|
126
|
+
result = subprocess.run(
|
|
127
|
+
cmd,
|
|
128
|
+
cwd=self.project_root,
|
|
129
|
+
capture_output=True,
|
|
130
|
+
text=True,
|
|
131
|
+
check=True,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
success_msg = f"Successfully added components: {', '.join(components)}"
|
|
135
|
+
if result.stdout:
|
|
136
|
+
success_msg += f"\n\nOutput:\n{result.stdout}"
|
|
137
|
+
|
|
138
|
+
return True, success_msg
|
|
139
|
+
|
|
140
|
+
except subprocess.CalledProcessError as e:
|
|
141
|
+
error_msg = f"Failed to add components: {e.stderr or e.stdout or str(e)}"
|
|
142
|
+
return False, error_msg
|
|
143
|
+
except FileNotFoundError:
|
|
144
|
+
return False, "npx not found. Ensure Node.js is installed"
|
|
145
|
+
|
|
146
|
+
def add_all_components(self, overwrite: bool = False) -> tuple[bool, str]:
|
|
147
|
+
"""
|
|
148
|
+
Add all available shadcn/ui components.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
overwrite: If True, overwrite existing components
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
Tuple of (success, message)
|
|
155
|
+
"""
|
|
156
|
+
if not self.check_shadcn_config():
|
|
157
|
+
return (
|
|
158
|
+
False,
|
|
159
|
+
"shadcn not initialized. Run 'npx shadcn@latest init' first",
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
shadcn_version = self._get_shadcn_version()
|
|
163
|
+
cmd = ["npx", f"shadcn@{shadcn_version}", "add", "--all"]
|
|
164
|
+
|
|
165
|
+
if overwrite:
|
|
166
|
+
cmd.append("--overwrite")
|
|
167
|
+
|
|
168
|
+
if self.dry_run:
|
|
169
|
+
return True, f"Would run: {' '.join(cmd)}"
|
|
170
|
+
|
|
171
|
+
try:
|
|
172
|
+
result = subprocess.run(
|
|
173
|
+
cmd,
|
|
174
|
+
cwd=self.project_root,
|
|
175
|
+
capture_output=True,
|
|
176
|
+
text=True,
|
|
177
|
+
check=True,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
success_msg = "Successfully added all components"
|
|
181
|
+
if result.stdout:
|
|
182
|
+
success_msg += f"\n\nOutput:\n{result.stdout}"
|
|
183
|
+
|
|
184
|
+
return True, success_msg
|
|
185
|
+
|
|
186
|
+
except subprocess.CalledProcessError as e:
|
|
187
|
+
error_msg = f"Failed to add all components: {e.stderr or e.stdout or str(e)}"
|
|
188
|
+
return False, error_msg
|
|
189
|
+
except FileNotFoundError:
|
|
190
|
+
return False, "npx not found. Ensure Node.js is installed"
|
|
191
|
+
|
|
192
|
+
def list_installed(self) -> tuple[bool, str]:
|
|
193
|
+
"""
|
|
194
|
+
List installed components.
|
|
195
|
+
|
|
196
|
+
Returns:
|
|
197
|
+
Tuple of (success, message with component list)
|
|
198
|
+
"""
|
|
199
|
+
if not self.check_shadcn_config():
|
|
200
|
+
return False, "shadcn not initialized"
|
|
201
|
+
|
|
202
|
+
installed = self.get_installed_components()
|
|
203
|
+
|
|
204
|
+
if not installed:
|
|
205
|
+
return True, "No components installed"
|
|
206
|
+
|
|
207
|
+
return True, f"Installed components:\n" + "\n".join(f" - {c}" for c in sorted(installed))
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def main():
|
|
211
|
+
"""CLI entry point."""
|
|
212
|
+
parser = argparse.ArgumentParser(
|
|
213
|
+
description="Add shadcn/ui components to your project",
|
|
214
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
215
|
+
epilog="""
|
|
216
|
+
Examples:
|
|
217
|
+
# Add single component
|
|
218
|
+
python shadcn_add.py button
|
|
219
|
+
|
|
220
|
+
# Add multiple components
|
|
221
|
+
python shadcn_add.py button card dialog
|
|
222
|
+
|
|
223
|
+
# Add all components
|
|
224
|
+
python shadcn_add.py --all
|
|
225
|
+
|
|
226
|
+
# Overwrite existing components
|
|
227
|
+
python shadcn_add.py button --overwrite
|
|
228
|
+
|
|
229
|
+
# Dry run (show what would be done)
|
|
230
|
+
python shadcn_add.py button card --dry-run
|
|
231
|
+
|
|
232
|
+
# List installed components
|
|
233
|
+
python shadcn_add.py --list
|
|
234
|
+
""",
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
parser.add_argument(
|
|
238
|
+
"components",
|
|
239
|
+
nargs="*",
|
|
240
|
+
help="Component names to add (e.g., button, card, dialog)",
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
parser.add_argument(
|
|
244
|
+
"--all",
|
|
245
|
+
action="store_true",
|
|
246
|
+
help="Add all available components",
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
parser.add_argument(
|
|
250
|
+
"--overwrite",
|
|
251
|
+
action="store_true",
|
|
252
|
+
help="Overwrite existing components",
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
parser.add_argument(
|
|
256
|
+
"--dry-run",
|
|
257
|
+
action="store_true",
|
|
258
|
+
help="Show what would be done without executing",
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
parser.add_argument(
|
|
262
|
+
"--list",
|
|
263
|
+
action="store_true",
|
|
264
|
+
help="List installed components",
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
parser.add_argument(
|
|
268
|
+
"--project-root",
|
|
269
|
+
type=Path,
|
|
270
|
+
help="Project root directory (default: current directory)",
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
args = parser.parse_args()
|
|
274
|
+
|
|
275
|
+
# Initialize installer
|
|
276
|
+
installer = ShadcnInstaller(
|
|
277
|
+
project_root=args.project_root,
|
|
278
|
+
dry_run=args.dry_run,
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
# Handle list command
|
|
282
|
+
if args.list:
|
|
283
|
+
success, message = installer.list_installed()
|
|
284
|
+
print(message)
|
|
285
|
+
sys.exit(0 if success else 1)
|
|
286
|
+
|
|
287
|
+
# Handle add all command
|
|
288
|
+
if args.all:
|
|
289
|
+
success, message = installer.add_all_components(overwrite=args.overwrite)
|
|
290
|
+
print(message)
|
|
291
|
+
sys.exit(0 if success else 1)
|
|
292
|
+
|
|
293
|
+
# Handle add specific components
|
|
294
|
+
if not args.components:
|
|
295
|
+
parser.print_help()
|
|
296
|
+
sys.exit(1)
|
|
297
|
+
|
|
298
|
+
success, message = installer.add_components(
|
|
299
|
+
args.components,
|
|
300
|
+
overwrite=args.overwrite,
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
print(message)
|
|
304
|
+
sys.exit(0 if success else 1)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
if __name__ == "__main__":
|
|
308
|
+
main()
|