trae-starter 0.0.1
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 +45 -0
- package/bin/cli.js +33 -0
- package/package.json +25 -0
- package/public/app.js +263 -0
- package/public/index.html +123 -0
- package/server/api.js +181 -0
- package/server/index.js +38 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/SKILL.md +659 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/_sync_all.py +414 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/app-interface.csv +31 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/colors.csv +162 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/design.csv +1776 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/draft.csv +1779 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/google-fonts.csv +1924 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/icons.csv +106 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/landing.csv +35 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/products.csv +162 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/styles.csv +85 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/typography.csv +74 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/core.py +247 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/templates/proto/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/templates/proto/.trae/skills/preview-manager/SKILL.md +37 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/SKILL.md +659 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/_sync_all.py +414 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/app-interface.csv +31 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/colors.csv +162 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/design.csv +1776 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/draft.csv +1779 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/google-fonts.csv +1924 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/icons.csv +106 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/landing.csv +35 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/products.csv +162 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/styles.csv +85 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/typography.csv +74 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/core.py +247 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/templates/proto/.trae/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/templates/proto/README.md +77 -0
- package/templates/proto/agent.md +361 -0
- package/templates/proto/eslint.config.js +23 -0
- package/templates/proto/index.html +13 -0
- package/templates/proto/package.json +39 -0
- package/templates/proto/pnpm-lock.yaml +2401 -0
- package/templates/proto/postcss.config.js +6 -0
- package/templates/proto/public/favicon.svg +1 -0
- package/templates/proto/public/icons.svg +24 -0
- package/templates/proto/skills-lock.json +10 -0
- package/templates/proto/src/App.css +184 -0
- package/templates/proto/src/App.tsx +15 -0
- package/templates/proto/src/assets/hero.png +0 -0
- package/templates/proto/src/assets/react.svg +1 -0
- package/templates/proto/src/assets/vite.svg +1 -0
- package/templates/proto/src/components/ui/SampleButton/sampleButton.css +4 -0
- package/templates/proto/src/components/ui/SampleButton/sampleButton.tsx +14 -0
- package/templates/proto/src/data/mock/products.csv +4 -0
- package/templates/proto/src/data/mock/users.json +16 -0
- package/templates/proto/src/data/types.ts +17 -0
- package/templates/proto/src/index.css +64 -0
- package/templates/proto/src/main.tsx +13 -0
- package/templates/proto/src/pages/Demo/components/DemoHeader/demoHeader.tsx +20 -0
- package/templates/proto/src/pages/Demo/components/FeatureGrid/featureGrid.tsx +18 -0
- package/templates/proto/src/pages/Demo/index.tsx +29 -0
- package/templates/proto/src/pages/Home/components/FeatureCard/featureCard.tsx +15 -0
- package/templates/proto/src/pages/Home/components/HeroSection/heroSection.tsx +28 -0
- package/templates/proto/src/pages/Home/components/InteractiveControls/interactiveControls.tsx +27 -0
- package/templates/proto/src/pages/Home/index.tsx +39 -0
- package/templates/proto/src/utils/format.ts +7 -0
- package/templates/proto/tailwind.config.js +11 -0
- package/templates/proto/tsconfig.app.json +28 -0
- package/templates/proto/tsconfig.json +7 -0
- package/templates/proto/tsconfig.node.json +26 -0
- package/templates/proto/vite.config.ts +10 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
|
5
|
+
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
|
8
|
+
|
|
9
|
+
Domains: style, prompt, color, chart, landing, product, ux, typography, google-fonts
|
|
10
|
+
Stacks: html-tailwind, react, nextjs
|
|
11
|
+
|
|
12
|
+
Persistence (Master + Overrides pattern):
|
|
13
|
+
--persist Save design system to design-system/MASTER.md
|
|
14
|
+
--page Also create a page-specific override file in design-system/pages/
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import sys
|
|
19
|
+
import io
|
|
20
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
|
21
|
+
from design_system import generate_design_system, persist_design_system
|
|
22
|
+
|
|
23
|
+
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
|
24
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
25
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
26
|
+
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
|
27
|
+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def format_output(result):
|
|
31
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
32
|
+
if "error" in result:
|
|
33
|
+
return f"Error: {result['error']}"
|
|
34
|
+
|
|
35
|
+
output = []
|
|
36
|
+
if result.get("stack"):
|
|
37
|
+
output.append(f"## UI Pro Max Stack Guidelines")
|
|
38
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
39
|
+
else:
|
|
40
|
+
output.append(f"## UI Pro Max Search Results")
|
|
41
|
+
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
|
42
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
43
|
+
|
|
44
|
+
for i, row in enumerate(result['results'], 1):
|
|
45
|
+
output.append(f"### Result {i}")
|
|
46
|
+
for key, value in row.items():
|
|
47
|
+
value_str = str(value)
|
|
48
|
+
if len(value_str) > 300:
|
|
49
|
+
value_str = value_str[:300] + "..."
|
|
50
|
+
output.append(f"- **{key}:** {value_str}")
|
|
51
|
+
output.append("")
|
|
52
|
+
|
|
53
|
+
return "\n".join(output)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
58
|
+
parser.add_argument("query", help="Search query")
|
|
59
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
60
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
|
|
61
|
+
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
|
62
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
63
|
+
# Design system generation
|
|
64
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
65
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
66
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
|
67
|
+
# Persistence (Master + Overrides pattern)
|
|
68
|
+
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
|
|
69
|
+
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
|
|
70
|
+
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
|
|
71
|
+
|
|
72
|
+
args = parser.parse_args()
|
|
73
|
+
|
|
74
|
+
# Design system takes priority
|
|
75
|
+
if args.design_system:
|
|
76
|
+
result = generate_design_system(
|
|
77
|
+
args.query,
|
|
78
|
+
args.project_name,
|
|
79
|
+
args.format,
|
|
80
|
+
persist=args.persist,
|
|
81
|
+
page=args.page,
|
|
82
|
+
output_dir=args.output_dir
|
|
83
|
+
)
|
|
84
|
+
print(result)
|
|
85
|
+
|
|
86
|
+
# Print persistence confirmation
|
|
87
|
+
if args.persist:
|
|
88
|
+
project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
|
|
89
|
+
print("\n" + "=" * 60)
|
|
90
|
+
print(f"✅ Design system persisted to design-system/{project_slug}/")
|
|
91
|
+
print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
|
|
92
|
+
if args.page:
|
|
93
|
+
page_filename = args.page.lower().replace(' ', '-')
|
|
94
|
+
print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
|
|
95
|
+
print("")
|
|
96
|
+
print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
|
|
97
|
+
print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
|
|
98
|
+
print("=" * 60)
|
|
99
|
+
# Stack search
|
|
100
|
+
elif args.stack:
|
|
101
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
102
|
+
if args.json:
|
|
103
|
+
import json
|
|
104
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
105
|
+
else:
|
|
106
|
+
print(format_output(result))
|
|
107
|
+
# Domain search
|
|
108
|
+
else:
|
|
109
|
+
result = search(args.query, args.domain, args.max_results)
|
|
110
|
+
if args.json:
|
|
111
|
+
import json
|
|
112
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
113
|
+
else:
|
|
114
|
+
print(format_output(result))
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "preview-manager"
|
|
3
|
+
description: "Manages local preview servers. Invoke when user wants to preview the app, check available routes, or get the local IP address for device testing."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Preview Manager
|
|
7
|
+
|
|
8
|
+
This skill helps manage local preview servers, ensuring we don't start duplicate processes, and provides useful information like available routes and local network access links.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
When invoked, follow these steps exactly:
|
|
13
|
+
|
|
14
|
+
### 1. Check Existing Server
|
|
15
|
+
First, use the `RunCommand` tool (or shell commands like `lsof -i :<port>` or `ps aux | grep node`) to check if a development server (e.g., Vite, Next.js, Webpack) is already running.
|
|
16
|
+
- **If running:** Acknowledge it and skip to Step 3.
|
|
17
|
+
- **If not running:** Proceed to Step 2.
|
|
18
|
+
|
|
19
|
+
### 2. Start the Server
|
|
20
|
+
If no server is running, use `RunCommand` (with `blocking: false` so it runs in the background) to execute the `dev` command from `package.json` (usually `npm run dev`, `pnpm run dev`, or `yarn dev`).
|
|
21
|
+
Wait briefly to ensure it starts successfully.
|
|
22
|
+
|
|
23
|
+
### 3. Analyze Routes
|
|
24
|
+
Read the project's routing configuration to find available pages.
|
|
25
|
+
- For React Router (like this project): Read `src/App.tsx` or similar files containing `<Route>` definitions.
|
|
26
|
+
- For Next.js: List directories in `pages/` or `app/`.
|
|
27
|
+
- Provide a brief description of what each route does based on its component name or content.
|
|
28
|
+
|
|
29
|
+
### 4. Get Local IP
|
|
30
|
+
Use the `RunCommand` tool to get the machine's local IP address (e.g., using `ipconfig` on Windows, or `ifconfig | grep "inet " | grep -v 127.0.0.1` on macOS/Linux).
|
|
31
|
+
|
|
32
|
+
### 5. Final Output
|
|
33
|
+
Present the information to the user in a clear format:
|
|
34
|
+
1. **Server Status:** Mention if a new server was started or an existing one was used.
|
|
35
|
+
2. **Local Link:** Provide the `http://localhost:<port>` link.
|
|
36
|
+
3. **Network Link:** Provide the `http://<local-ip>:<port>` link for testing on other devices.
|
|
37
|
+
4. **Available Routes:** List the discovered routes and their brief descriptions.
|