Initial commit
This commit is contained in:
347
skills/fluxwing-library-browser/SKILL.md
Normal file
347
skills/fluxwing-library-browser/SKILL.md
Normal file
@@ -0,0 +1,347 @@
|
||||
---
|
||||
name: Fluxwing Library Browser
|
||||
description: Browse and view all available uxscii components including bundled templates, user components, and screens. Use when working with .uxm files, when user wants to see, list, browse, or search .uxm components or screens.
|
||||
version: 0.0.1
|
||||
author: Trabian
|
||||
allowed-tools: Read, Glob, Grep
|
||||
---
|
||||
|
||||
# Fluxwing Library Browser
|
||||
|
||||
Browse all available uxscii components: bundled templates, user-created components, and complete screens.
|
||||
|
||||
## Data Location Rules
|
||||
|
||||
**READ from (bundled templates - reference only):**
|
||||
- `{SKILL_ROOT}/../uxscii-component-creator/templates/` - 11 component templates
|
||||
- `{SKILL_ROOT}/../uxscii-screen-scaffolder/templates/` - 2 screen examples (if available)
|
||||
- `{SKILL_ROOT}/docs/` - Documentation
|
||||
|
||||
**READ from (project workspace):**
|
||||
- `./fluxwing/components/` - Your created components
|
||||
- `./fluxwing/screens/` - Your created screens
|
||||
- `./fluxwing/library/` - Customized template copies
|
||||
|
||||
**NEVER write to skill directories - they are read-only!**
|
||||
|
||||
## Your Task
|
||||
|
||||
Show the user what uxscii components are available across **four sources**:
|
||||
1. **Bundled Templates** - 11 curated examples from skill templates (read-only reference)
|
||||
2. **Project Components** - User/agent-created reusable components in `./fluxwing/components/` (editable)
|
||||
3. **Project Library** - Customized template copies in `./fluxwing/library/` (editable)
|
||||
4. **Project Screens** - Complete screen compositions in `./fluxwing/screens/` (editable)
|
||||
|
||||
**Key Distinction**: Bundled templates are READ-ONLY reference materials. To customize them, copy to your project workspace first.
|
||||
|
||||
## Fast Browsing with Pre-Built Index
|
||||
|
||||
**IMPORTANT**: Use the pre-built template index for instant browsing (10x faster than globbing):
|
||||
|
||||
```typescript
|
||||
// Load the pre-built index (1 file read = instant results!)
|
||||
const index = JSON.parse(read('{SKILL_ROOT}/data/template-index.json'));
|
||||
|
||||
// Browse by type
|
||||
const buttons = index.by_type.button; // ["primary-button", "secondary-button"]
|
||||
const inputs = index.by_type.input; // ["email-input"]
|
||||
|
||||
// Search by tag
|
||||
const formComponents = index.by_tag.form; // All form-related components
|
||||
const interactiveComponents = index.by_tag.interactive; // All interactive components
|
||||
|
||||
// Get component info instantly (no file reads needed!)
|
||||
const buttonInfo = index.bundled_templates.find(t => t.id === "primary-button");
|
||||
console.log(buttonInfo.name); // "Primary Button"
|
||||
console.log(buttonInfo.description); // Full description
|
||||
console.log(buttonInfo.preview); // ASCII preview already extracted!
|
||||
console.log(buttonInfo.states); // ["default", "hover", "active", "disabled"]
|
||||
console.log(buttonInfo.props); // ["text", "variant", "size"]
|
||||
console.log(buttonInfo.tags); // ["button", "primary", "action", "interactive"]
|
||||
```
|
||||
|
||||
**Performance Benefits:**
|
||||
- ✅ **1 file read** vs **11+ file reads** (10x faster!)
|
||||
- ✅ **Instant type/tag filtering** (no parsing needed)
|
||||
- ✅ **Pre-extracted ASCII previews** (show immediately)
|
||||
- ✅ **Metadata summary** (no JSON parsing per component)
|
||||
|
||||
**Index Structure:**
|
||||
```json
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"generated": "2025-10-18T12:00:00Z",
|
||||
"template_count": 11,
|
||||
"bundled_templates": [ /* array of component metadata */ ],
|
||||
"by_type": { /* components grouped by type */ },
|
||||
"by_tag": { /* components grouped by tags */ }
|
||||
}
|
||||
```
|
||||
|
||||
**When to use full file reads:**
|
||||
- User requests detailed view of a specific component
|
||||
- User wants to copy a template (need full .uxm and .md content)
|
||||
- User searches for a very specific property not in the index
|
||||
|
||||
## Display Format
|
||||
|
||||
Present in a clear, hierarchical structure:
|
||||
|
||||
```
|
||||
🎁 BUNDLED TEMPLATES
|
||||
📁 Component Creator Templates
|
||||
─────────────────────────────────────────────────────
|
||||
These are starter templates you can copy and customize.
|
||||
|
||||
Buttons (2 variants)
|
||||
├─ primary-button.uxm
|
||||
│ └─ Standard clickable button with hover, focus, and disabled states
|
||||
│ ▓▓▓▓▓▓▓▓▓▓▓▓
|
||||
│ ▓ Click Me ▓
|
||||
│ ▓▓▓▓▓▓▓▓▓▓▓▓
|
||||
│
|
||||
└─ icon-button.uxm
|
||||
└─ Button with icon support for visual emphasis
|
||||
[🔍 Search]
|
||||
|
||||
Inputs (2 variants)
|
||||
├─ text-input.uxm
|
||||
│ └─ Basic text input with validation states
|
||||
│ [________________]
|
||||
│
|
||||
└─ email-input.uxm
|
||||
└─ Email-specific input with format validation
|
||||
[user@example.com ]
|
||||
|
||||
Cards (1 variant)
|
||||
└─ card.uxm
|
||||
└─ Container for grouping related content
|
||||
╭─────────────╮
|
||||
│ Card Title │
|
||||
├─────────────┤
|
||||
│ Content... │
|
||||
╰─────────────╯
|
||||
|
||||
Modals (1 variant)
|
||||
└─ modal.uxm
|
||||
└─ Overlay dialog for focused interactions
|
||||
╔═══════════════╗
|
||||
║ Modal Title ║
|
||||
╠═══════════════╣
|
||||
║ Content... ║
|
||||
╚═══════════════╝
|
||||
|
||||
Navigation (1 variant)
|
||||
└─ navigation.uxm
|
||||
└─ Primary navigation menu
|
||||
• Home • About • Contact
|
||||
|
||||
Feedback (2 variants)
|
||||
├─ alert.uxm
|
||||
│ └─ User notification with severity levels
|
||||
│ ⚠️ Warning: Action required
|
||||
│
|
||||
└─ badge.uxm
|
||||
└─ Small status indicator or label
|
||||
● New
|
||||
|
||||
Lists (1 variant)
|
||||
└─ list.uxm
|
||||
└─ Vertical list for displaying data
|
||||
• Item 1
|
||||
• Item 2
|
||||
• Item 3
|
||||
|
||||
─────────────────────────────────────────────────────
|
||||
|
||||
🎨 YOUR COMPONENTS
|
||||
📁 ./fluxwing/components/
|
||||
─────────────────────────────────────────────────────
|
||||
Components you've created for your project.
|
||||
|
||||
✓ submit-button.uxm
|
||||
└─ Custom submit button for forms
|
||||
Modified: 2024-10-11 14:23:00
|
||||
[ Submit Form ]
|
||||
|
||||
✓ password-input.uxm
|
||||
└─ Password input with show/hide toggle
|
||||
Modified: 2024-10-11 14:25:00
|
||||
[••••••••] 👁️
|
||||
|
||||
✓ user-card.uxm
|
||||
└─ Card displaying user profile information
|
||||
Modified: 2024-10-11 15:10:00
|
||||
╭──────────────────╮
|
||||
│ John Doe │
|
||||
│ @johndoe │
|
||||
╰──────────────────╯
|
||||
|
||||
─────────────────────────────────────────────────────
|
||||
|
||||
🖥️ YOUR SCREENS
|
||||
📁 ./fluxwing/screens/
|
||||
─────────────────────────────────────────────────────
|
||||
Complete screen compositions.
|
||||
|
||||
✓ login-screen.uxm
|
||||
└─ User authentication screen
|
||||
Components used: email-input, password-input, submit-button, error-alert
|
||||
Modified: 2024-10-11 15:45:00
|
||||
|
||||
✓ dashboard.uxm
|
||||
└─ Main application dashboard
|
||||
Components used: navigation, metric-card, data-table, sidebar
|
||||
Modified: 2024-10-11 16:20:00
|
||||
|
||||
─────────────────────────────────────────────────────
|
||||
Total: 10 templates, 3 components, 2 screens
|
||||
```
|
||||
|
||||
## Interactive Options
|
||||
|
||||
After displaying the library, offer these actions:
|
||||
|
||||
```
|
||||
What would you like to do?
|
||||
|
||||
1️⃣ View component details (ask me to "show me [name]")
|
||||
2️⃣ Copy a template to your project
|
||||
3️⃣ Create a new component (ask me to "create a [type]")
|
||||
4️⃣ Scaffold a new screen (ask me to "build a [screen type] screen")
|
||||
5️⃣ Search for a specific pattern (e.g., "button", "input", "card")
|
||||
```
|
||||
|
||||
## Detailed View
|
||||
|
||||
If user wants to see details of a specific component:
|
||||
|
||||
```
|
||||
User: Show me primary-button
|
||||
|
||||
You: 📄 PRIMARY-BUTTON.UXM
|
||||
─────────────────────────────────────────────────────
|
||||
ID: primary-button
|
||||
Type: button
|
||||
Version: 1.0.0
|
||||
Description: Standard clickable button with hover, focus, and disabled states
|
||||
|
||||
Props:
|
||||
- text: "Click me"
|
||||
- variant: "primary"
|
||||
- disabled: false
|
||||
|
||||
States:
|
||||
- default (solid border, white background)
|
||||
- hover (highlighted background)
|
||||
- focus (outline indicator)
|
||||
- disabled (grayed out)
|
||||
|
||||
Accessibility:
|
||||
- Role: button
|
||||
- Focusable: true
|
||||
- Keyboard: Space, Enter
|
||||
|
||||
ASCII Preview:
|
||||
|
||||
Default State:
|
||||
▓▓▓▓▓▓▓▓▓▓▓▓
|
||||
▓ Click Me ▓
|
||||
▓▓▓▓▓▓▓▓▓▓▓▓
|
||||
|
||||
Hover State:
|
||||
█████████████
|
||||
█ Click Me █
|
||||
█████████████
|
||||
|
||||
Location: {SKILL_ROOT}/../uxscii-component-creator/templates/primary-button.uxm
|
||||
|
||||
To customize: Copy to ./fluxwing/library/ for editing
|
||||
```
|
||||
|
||||
## Copy Template to Project
|
||||
|
||||
If user wants to customize a bundled template:
|
||||
|
||||
```
|
||||
User: Copy primary-button to my project
|
||||
|
||||
You: I'll copy primary-button to your library for customization.
|
||||
|
||||
[Copies .uxm and .md files]
|
||||
|
||||
✓ Copied to ./fluxwing/library/
|
||||
- primary-button.uxm
|
||||
- primary-button.md
|
||||
|
||||
You can now edit these files safely. Changes won't affect the original template.
|
||||
|
||||
Next steps:
|
||||
- Edit: Modify ./fluxwing/library/primary-button.uxm
|
||||
- Expand: Ask me to "add hover state to primary-button"
|
||||
- Use: Reference it in screens or other components
|
||||
```
|
||||
|
||||
## Search Functionality
|
||||
|
||||
Support component search:
|
||||
|
||||
```
|
||||
User: Find all button components
|
||||
|
||||
You: Found 3 button components:
|
||||
|
||||
🎁 Bundled Templates:
|
||||
- primary-button.uxm (standard clickable button)
|
||||
- icon-button.uxm (button with icon support)
|
||||
|
||||
🎨 Your Components:
|
||||
- submit-button.uxm (custom submit button for forms)
|
||||
|
||||
Would you like details on any of these?
|
||||
```
|
||||
|
||||
## Empty Library Handling
|
||||
|
||||
If user has no components yet:
|
||||
|
||||
```
|
||||
🎁 BUNDLED TEMPLATES
|
||||
📁 Component Creator Templates
|
||||
─────────────────────────────────────────────────────
|
||||
11 starter templates available
|
||||
|
||||
🎨 YOUR COMPONENTS
|
||||
📁 ./fluxwing/components/
|
||||
─────────────────────────────────────────────────────
|
||||
No components yet. Create your first component!
|
||||
|
||||
Try: "Create a submit button" or "Create an email input"
|
||||
|
||||
🖥️ YOUR SCREENS
|
||||
📁 ./fluxwing/screens/
|
||||
─────────────────────────────────────────────────────
|
||||
No screens yet. Scaffold your first screen!
|
||||
|
||||
Try: "Build a login screen" or "Create a dashboard"
|
||||
|
||||
─────────────────────────────────────────────────────
|
||||
Total: 11 templates, 0 components, 0 screens
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
- **Examples Guide**: See `{SKILL_ROOT}/docs/07-examples-guide.md` for detailed template documentation
|
||||
- **Component Creator**: Use when you want to create new components
|
||||
- **Screen Scaffolder**: Use when you want to build complete screens
|
||||
- **Component Viewer**: Use for detailed component information
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **Read-only templates**: Bundled templates cannot be modified directly
|
||||
2. **Copy before customize**: Copy templates to `./fluxwing/library/` to customize
|
||||
3. **Search**: Use Glob and Grep to find components by name or pattern
|
||||
4. **Organization**: Keep components in `./fluxwing/components/`, customized templates in `./fluxwing/library/`
|
||||
5. **Screens**: Screen files include `.uxm`, `.md`, and `.rendered.md` (three files)
|
||||
|
||||
You're helping users discover and navigate their uxscii component library!
|
||||
509
skills/fluxwing-library-browser/data/template-index.json
Normal file
509
skills/fluxwing-library-browser/data/template-index.json
Normal file
@@ -0,0 +1,509 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"generated": "2025-10-18T13:02:14.626427Z",
|
||||
"template_count": 11,
|
||||
"bundled_templates": [
|
||||
{
|
||||
"id": "alert",
|
||||
"type": "alert",
|
||||
"name": "Alert/Notification Component",
|
||||
"description": "Alert and notification messages for user feedback, system status, and important information display",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/alert.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/alert.md",
|
||||
"states": [
|
||||
"visible",
|
||||
"entering",
|
||||
"exiting",
|
||||
"hidden"
|
||||
],
|
||||
"props": [
|
||||
"title",
|
||||
"message",
|
||||
"variant",
|
||||
"icon",
|
||||
"dismissible",
|
||||
"persistent",
|
||||
"position",
|
||||
"duration",
|
||||
"actions",
|
||||
"showProgress",
|
||||
"bordered",
|
||||
"compact"
|
||||
],
|
||||
"tags": [
|
||||
"message",
|
||||
"notification",
|
||||
"alert",
|
||||
"feedback"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 \u2713 {{title}} \u2502\u2715\u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502\n\u2502 {{message}} \u2502",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "badge",
|
||||
"type": "badge",
|
||||
"name": "Badge/Tag Component",
|
||||
"description": "Status indicators, labels, and informational tags with various styles and interactive capabilities",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/badge.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/badge.md",
|
||||
"states": [
|
||||
"default",
|
||||
"hover",
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"props": [
|
||||
"text",
|
||||
"variant",
|
||||
"size",
|
||||
"removable",
|
||||
"clickable",
|
||||
"icon",
|
||||
"color",
|
||||
"outlined",
|
||||
"pill",
|
||||
"count",
|
||||
"maxCount",
|
||||
"dot"
|
||||
],
|
||||
"tags": [
|
||||
"badge",
|
||||
"tag",
|
||||
"label",
|
||||
"indicator",
|
||||
"status"
|
||||
],
|
||||
"preview": "\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\n\u2593 {{text}} \u2593 \u2591 Secondary \u2591 \u2593 Primary \u2593 \u2588 Success \u2588\n\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "card",
|
||||
"type": "card",
|
||||
"name": "Card Component",
|
||||
"description": "A flexible container for grouping related content with optional header, body, and footer sections",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/card.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/card.md",
|
||||
"states": [
|
||||
"default",
|
||||
"hover",
|
||||
"focus"
|
||||
],
|
||||
"props": [
|
||||
"title",
|
||||
"subtitle",
|
||||
"content",
|
||||
"footer",
|
||||
"elevated",
|
||||
"padding",
|
||||
"borderRadius",
|
||||
"maxWidth",
|
||||
"hasHeader",
|
||||
"hasFooter"
|
||||
],
|
||||
"tags": [
|
||||
"layout",
|
||||
"container",
|
||||
"card"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 {{title}} \u2502\n\u2502 {{subtitle}} \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "custom-widget",
|
||||
"type": "custom",
|
||||
"name": "Custom Widget",
|
||||
"description": "A specialized widget component that extends the basic card with custom properties",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/custom-widget.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/custom-widget.md",
|
||||
"states": [
|
||||
"loading",
|
||||
"error"
|
||||
],
|
||||
"props": [
|
||||
"widgetType",
|
||||
"data",
|
||||
"refreshable",
|
||||
"autoRefresh",
|
||||
"compact"
|
||||
],
|
||||
"tags": [
|
||||
"custom",
|
||||
"widget",
|
||||
"card"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 {{data.icon}} {{data.title}} \u2502\u27f3\u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502\n\u2502 {{data.value}} \u2502",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "email-input",
|
||||
"type": "input",
|
||||
"name": "Email Input Field",
|
||||
"description": "A specialized input field for email addresses with built-in validation",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/email-input.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/email-input.md",
|
||||
"states": [
|
||||
"default",
|
||||
"focus",
|
||||
"valid",
|
||||
"error",
|
||||
"disabled"
|
||||
],
|
||||
"props": [
|
||||
"label",
|
||||
"placeholder",
|
||||
"value",
|
||||
"disabled",
|
||||
"required",
|
||||
"autocomplete",
|
||||
"ariaLabel",
|
||||
"errorMessage",
|
||||
"helpText"
|
||||
],
|
||||
"tags": [
|
||||
"input",
|
||||
"validation",
|
||||
"email",
|
||||
"form"
|
||||
],
|
||||
"preview": "{{label}} *\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 {{value || placeholder}} \u2502 @\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n{{helpText}}",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "form",
|
||||
"type": "form",
|
||||
"name": "Form Container",
|
||||
"description": "A form container with field grouping, validation state management, and submission handling",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/form.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/form.md",
|
||||
"states": [
|
||||
"default",
|
||||
"valid",
|
||||
"invalid",
|
||||
"submitting"
|
||||
],
|
||||
"props": [
|
||||
"title",
|
||||
"method",
|
||||
"action",
|
||||
"fields",
|
||||
"submitText",
|
||||
"resetText",
|
||||
"showReset",
|
||||
"layout",
|
||||
"spacing"
|
||||
],
|
||||
"tags": [
|
||||
"container",
|
||||
"validation",
|
||||
"form"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 {{title}} \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502\n\u2502 {{fields[0].label}} {{fields[0].required ? '*' : ''}} \u2502",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "list",
|
||||
"type": "list",
|
||||
"name": "List Component",
|
||||
"description": "Ordered and unordered list component with various display patterns and interaction support",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/list.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/list.md",
|
||||
"states": [
|
||||
"default",
|
||||
"selected",
|
||||
"hover",
|
||||
"disabled"
|
||||
],
|
||||
"props": [
|
||||
"items",
|
||||
"type",
|
||||
"selectable",
|
||||
"multiSelect",
|
||||
"variant",
|
||||
"marker",
|
||||
"numbering",
|
||||
"compact",
|
||||
"bordered",
|
||||
"striped"
|
||||
],
|
||||
"tags": [
|
||||
"menu",
|
||||
"list",
|
||||
"navigation",
|
||||
"display"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 {{marker}} {{items[0].text}} \u2502\n\u2502 {{marker}} {{items[1].text}} \u2502\n\u2502 {{marker}} {{items[2].text}} \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "modal",
|
||||
"type": "modal",
|
||||
"name": "Modal Dialog",
|
||||
"description": "Modal dialog overlay with focus management, backdrop, and configurable content areas",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/modal.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/modal.md",
|
||||
"states": [
|
||||
"closed",
|
||||
"opening",
|
||||
"open",
|
||||
"closing"
|
||||
],
|
||||
"props": [
|
||||
"title",
|
||||
"content",
|
||||
"size",
|
||||
"showCloseButton",
|
||||
"closable",
|
||||
"backdrop",
|
||||
"backdropClosable",
|
||||
"centered",
|
||||
"buttons",
|
||||
"icon",
|
||||
"variant"
|
||||
],
|
||||
"tags": [
|
||||
"overlay",
|
||||
"popup",
|
||||
"modal",
|
||||
"dialog",
|
||||
"container"
|
||||
],
|
||||
"preview": "\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\n\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\n\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\n\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502 {{title}} \u2502\u2715\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\n\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "navigation",
|
||||
"type": "navigation",
|
||||
"name": "Navigation Menu",
|
||||
"description": "A horizontal or vertical navigation component with active state management",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/navigation.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/navigation.md",
|
||||
"states": [
|
||||
"default",
|
||||
"active",
|
||||
"hover"
|
||||
],
|
||||
"props": [
|
||||
"items",
|
||||
"orientation",
|
||||
"variant",
|
||||
"separator",
|
||||
"activeIndicator"
|
||||
],
|
||||
"tags": [
|
||||
"menu",
|
||||
"nav",
|
||||
"navigation"
|
||||
],
|
||||
"preview": "\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 [*] {{items[0].label}} {{separator}} {{items[1].label}} {{separator}} {{items[2].label}} \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "primary-button",
|
||||
"type": "button",
|
||||
"name": "Primary Button",
|
||||
"description": "A primary action button with emphasis styling for main user actions",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/primary-button.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/primary-button.md",
|
||||
"states": [
|
||||
"default",
|
||||
"hover",
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"props": [
|
||||
"text",
|
||||
"disabled",
|
||||
"size",
|
||||
"fullWidth",
|
||||
"ariaLabel"
|
||||
],
|
||||
"tags": [
|
||||
"button",
|
||||
"action",
|
||||
"primary",
|
||||
"form"
|
||||
],
|
||||
"preview": "\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\n\u2593 {{text}} \u2593\n\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
},
|
||||
{
|
||||
"id": "secondary-button",
|
||||
"type": "button",
|
||||
"name": "Secondary Button",
|
||||
"description": "A secondary action button with subtle styling for less prominent actions",
|
||||
"file": "{SKILL_ROOT}/../uxscii-component-creator/templates/secondary-button.uxm",
|
||||
"md_file": "{SKILL_ROOT}/../uxscii-component-creator/templates/secondary-button.md",
|
||||
"states": [
|
||||
"default",
|
||||
"hover",
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"props": [
|
||||
"text",
|
||||
"disabled",
|
||||
"size",
|
||||
"fullWidth",
|
||||
"ariaLabel"
|
||||
],
|
||||
"tags": [
|
||||
"secondary",
|
||||
"button",
|
||||
"action",
|
||||
"form"
|
||||
],
|
||||
"preview": "\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\n\u2591 {{text}} \u2591\n\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591",
|
||||
"interactive": false,
|
||||
"has_accessibility": false
|
||||
}
|
||||
],
|
||||
"by_type": {
|
||||
"alert": [
|
||||
"alert"
|
||||
],
|
||||
"badge": [
|
||||
"badge"
|
||||
],
|
||||
"card": [
|
||||
"card"
|
||||
],
|
||||
"custom": [
|
||||
"custom-widget"
|
||||
],
|
||||
"input": [
|
||||
"email-input"
|
||||
],
|
||||
"form": [
|
||||
"form"
|
||||
],
|
||||
"list": [
|
||||
"list"
|
||||
],
|
||||
"modal": [
|
||||
"modal"
|
||||
],
|
||||
"navigation": [
|
||||
"navigation"
|
||||
],
|
||||
"button": [
|
||||
"primary-button",
|
||||
"secondary-button"
|
||||
]
|
||||
},
|
||||
"by_tag": {
|
||||
"message": [
|
||||
"alert"
|
||||
],
|
||||
"notification": [
|
||||
"alert"
|
||||
],
|
||||
"alert": [
|
||||
"alert"
|
||||
],
|
||||
"feedback": [
|
||||
"alert"
|
||||
],
|
||||
"badge": [
|
||||
"badge"
|
||||
],
|
||||
"tag": [
|
||||
"badge"
|
||||
],
|
||||
"label": [
|
||||
"badge"
|
||||
],
|
||||
"indicator": [
|
||||
"badge"
|
||||
],
|
||||
"status": [
|
||||
"badge"
|
||||
],
|
||||
"layout": [
|
||||
"card"
|
||||
],
|
||||
"container": [
|
||||
"card",
|
||||
"form",
|
||||
"modal"
|
||||
],
|
||||
"card": [
|
||||
"card",
|
||||
"custom-widget"
|
||||
],
|
||||
"custom": [
|
||||
"custom-widget"
|
||||
],
|
||||
"widget": [
|
||||
"custom-widget"
|
||||
],
|
||||
"input": [
|
||||
"email-input"
|
||||
],
|
||||
"validation": [
|
||||
"email-input",
|
||||
"form"
|
||||
],
|
||||
"email": [
|
||||
"email-input"
|
||||
],
|
||||
"form": [
|
||||
"email-input",
|
||||
"form",
|
||||
"primary-button",
|
||||
"secondary-button"
|
||||
],
|
||||
"menu": [
|
||||
"list",
|
||||
"navigation"
|
||||
],
|
||||
"list": [
|
||||
"list"
|
||||
],
|
||||
"navigation": [
|
||||
"list",
|
||||
"navigation"
|
||||
],
|
||||
"display": [
|
||||
"list"
|
||||
],
|
||||
"overlay": [
|
||||
"modal"
|
||||
],
|
||||
"popup": [
|
||||
"modal"
|
||||
],
|
||||
"modal": [
|
||||
"modal"
|
||||
],
|
||||
"dialog": [
|
||||
"modal"
|
||||
],
|
||||
"nav": [
|
||||
"navigation"
|
||||
],
|
||||
"button": [
|
||||
"primary-button",
|
||||
"secondary-button"
|
||||
],
|
||||
"action": [
|
||||
"primary-button",
|
||||
"secondary-button"
|
||||
],
|
||||
"primary": [
|
||||
"primary-button"
|
||||
],
|
||||
"secondary": [
|
||||
"secondary-button"
|
||||
]
|
||||
}
|
||||
}
|
||||
77
skills/fluxwing-library-browser/docs/07-examples-guide.md
Normal file
77
skills/fluxwing-library-browser/docs/07-examples-guide.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# Component Examples
|
||||
|
||||
This directory contains **fully expanded** component examples showing complete interaction states.
|
||||
|
||||
## Important Note
|
||||
|
||||
**These examples show expanded components** - they include all interactive states (hover, focus, disabled, error, etc.).
|
||||
|
||||
When you create new components using `/fluxwing-create`, they will have **only the default state** for fast MVP prototyping. This is by design to optimize for speed and agile development.
|
||||
|
||||
## Two-Phase Creation Workflow
|
||||
|
||||
### Phase 1: Fast MVP Creation
|
||||
```bash
|
||||
/fluxwing-create my-button
|
||||
# Creates component with default state only
|
||||
```
|
||||
|
||||
**Result**: Minimal, MVP-ready component for quick prototyping and stakeholder discussions.
|
||||
|
||||
### Phase 2: Add Interactive Polish
|
||||
```bash
|
||||
/fluxwing-expand-component my-button
|
||||
# Adds hover, active, disabled states automatically
|
||||
```
|
||||
|
||||
**Result**: Fully interactive component like the examples in this directory.
|
||||
|
||||
## What's in This Directory
|
||||
|
||||
All examples are **production-ready templates** showing:
|
||||
- Complete state coverage (default, hover, focus, disabled, etc.)
|
||||
- Full metadata and accessibility attributes
|
||||
- Proper variable definitions
|
||||
- ASCII art for all states
|
||||
|
||||
These serve as:
|
||||
1. **Reference patterns** for component structure
|
||||
2. **Visual examples** of what expanded components look like
|
||||
3. **Templates** you can copy and customize
|
||||
|
||||
## Using These Examples
|
||||
|
||||
### View an Example
|
||||
```bash
|
||||
/fluxwing-get primary-button
|
||||
```
|
||||
|
||||
### Copy to Your Project
|
||||
```bash
|
||||
/fluxwing-library
|
||||
# Browse and copy bundled templates
|
||||
```
|
||||
|
||||
### Create from Scratch
|
||||
```bash
|
||||
/fluxwing-create my-component
|
||||
# Then expand when needed:
|
||||
/fluxwing-expand-component my-component
|
||||
```
|
||||
|
||||
## Available Examples
|
||||
|
||||
- **Buttons**: primary-button, secondary-button
|
||||
- **Inputs**: email-input, password-input, text-input
|
||||
- **Cards**: card, pricing-card
|
||||
- **Forms**: form components
|
||||
- **Navigation**: navigation components
|
||||
- **Feedback**: alert, badge components
|
||||
|
||||
All examples follow uxscii standards and best practices.
|
||||
|
||||
## Need More?
|
||||
|
||||
- **Component creation guide**: See `../docs/03-component-creation.md`
|
||||
- **ASCII patterns**: See `../docs/06-ascii-patterns.md`
|
||||
- **Quick start**: See `../docs/01-quick-start.md`
|
||||
172
skills/fluxwing-library-browser/scripts/build_index.py
Normal file
172
skills/fluxwing-library-browser/scripts/build_index.py
Normal file
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Build searchable index of all component templates.
|
||||
Run this when templates are added/updated.
|
||||
|
||||
Usage:
|
||||
python build_index.py [templates_dir] [output_file]
|
||||
|
||||
Defaults:
|
||||
templates_dir: ../uxscii-component-creator/templates/
|
||||
output_file: ../data/template-index.json
|
||||
"""
|
||||
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def extract_preview(md_file: Path, max_lines: int = 5) -> str:
|
||||
"""Extract ASCII preview from .md file."""
|
||||
if not md_file.exists():
|
||||
return ""
|
||||
|
||||
content = md_file.read_text()
|
||||
|
||||
# Find first code block after "## Default State"
|
||||
match = re.search(r'## Default State.*?```(.*?)```', content, re.DOTALL)
|
||||
if match:
|
||||
lines = match.group(1).strip().split('\n')
|
||||
return '\n'.join(lines[:max_lines])
|
||||
|
||||
# Fallback: find any code block
|
||||
match = re.search(r'```(.*?)```', content, re.DOTALL)
|
||||
if match:
|
||||
lines = match.group(1).strip().split('\n')
|
||||
return '\n'.join(lines[:max_lines])
|
||||
|
||||
return ""
|
||||
|
||||
|
||||
def infer_tags(component: dict) -> list:
|
||||
"""Infer searchable tags from component."""
|
||||
tags = [component["type"]]
|
||||
|
||||
# Add interactivity tags
|
||||
if component.get("behavior", {}).get("interactive"):
|
||||
tags.append("interactive")
|
||||
|
||||
# Add form-related tags
|
||||
if component["type"] in ["input", "button", "form", "checkbox", "radio", "select"]:
|
||||
tags.append("form")
|
||||
|
||||
# Add navigation tags
|
||||
if component["type"] in ["navigation", "breadcrumb", "pagination", "tabs"]:
|
||||
tags.append("navigation")
|
||||
|
||||
# Add container tags
|
||||
if component["type"] in ["card", "modal", "panel", "container"]:
|
||||
tags.append("container")
|
||||
|
||||
# Add from component metadata tags
|
||||
if "tags" in component.get("metadata", {}):
|
||||
tags.extend(component["metadata"]["tags"])
|
||||
|
||||
return list(set(tags)) # Remove duplicates
|
||||
|
||||
|
||||
def build_index(templates_dir: Path, output_file: Path):
|
||||
"""Build index from all .uxm files in directory."""
|
||||
index = {
|
||||
"version": "1.0.0",
|
||||
"generated": datetime.utcnow().isoformat() + "Z",
|
||||
"template_count": 0,
|
||||
"bundled_templates": [],
|
||||
"by_type": {},
|
||||
"by_tag": {}
|
||||
}
|
||||
|
||||
uxm_files = sorted(templates_dir.glob("*.uxm"))
|
||||
|
||||
if not uxm_files:
|
||||
print(f"⚠ Warning: No .uxm files found in {templates_dir}")
|
||||
return
|
||||
|
||||
for uxm_file in uxm_files:
|
||||
try:
|
||||
with open(uxm_file) as f:
|
||||
component = json.load(f)
|
||||
|
||||
md_file = uxm_file.with_suffix('.md')
|
||||
preview = extract_preview(md_file)
|
||||
|
||||
# Get states
|
||||
states = component.get("behavior", {}).get("states", [])
|
||||
state_names = [s["name"] if isinstance(s, dict) else s for s in states]
|
||||
|
||||
# Extract metadata
|
||||
template_info = {
|
||||
"id": component["id"],
|
||||
"type": component["type"],
|
||||
"name": component["metadata"]["name"],
|
||||
"description": component["metadata"].get("description", ""),
|
||||
"file": f"{{SKILL_ROOT}}/../uxscii-component-creator/templates/{uxm_file.name}",
|
||||
"md_file": f"{{SKILL_ROOT}}/../uxscii-component-creator/templates/{md_file.name}",
|
||||
"states": state_names,
|
||||
"props": list(component.get("props", {}).keys()),
|
||||
"tags": infer_tags(component),
|
||||
"preview": preview,
|
||||
"interactive": component.get("behavior", {}).get("interactive", False),
|
||||
"has_accessibility": bool(component.get("accessibility"))
|
||||
}
|
||||
|
||||
index["bundled_templates"].append(template_info)
|
||||
|
||||
# Index by type
|
||||
comp_type = component["type"]
|
||||
if comp_type not in index["by_type"]:
|
||||
index["by_type"][comp_type] = []
|
||||
index["by_type"][comp_type].append(component["id"])
|
||||
|
||||
# Index by tags
|
||||
for tag in template_info["tags"]:
|
||||
if tag not in index["by_tag"]:
|
||||
index["by_tag"][tag] = []
|
||||
index["by_tag"][tag].append(component["id"])
|
||||
|
||||
except Exception as e:
|
||||
print(f"✗ Error processing {uxm_file.name}: {e}")
|
||||
continue
|
||||
|
||||
index["template_count"] = len(index["bundled_templates"])
|
||||
|
||||
# Write index
|
||||
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(output_file, 'w') as f:
|
||||
json.dump(index, f, indent=2)
|
||||
|
||||
print(f"✓ Built index with {index['template_count']} templates")
|
||||
print(f" Types: {len(index['by_type'])} ({', '.join(sorted(index['by_type'].keys()))})")
|
||||
print(f" Tags: {len(index['by_tag'])} ({', '.join(sorted(index['by_tag'].keys()))})")
|
||||
print(f" Output: {output_file}")
|
||||
|
||||
|
||||
def main():
|
||||
# Determine paths
|
||||
script_dir = Path(__file__).parent
|
||||
|
||||
if len(sys.argv) >= 2:
|
||||
templates_dir = Path(sys.argv[1])
|
||||
else:
|
||||
templates_dir = script_dir.parent / "../uxscii-component-creator/templates"
|
||||
|
||||
if len(sys.argv) >= 3:
|
||||
output_file = Path(sys.argv[2])
|
||||
else:
|
||||
output_file = script_dir.parent / "data/template-index.json"
|
||||
|
||||
templates_dir = templates_dir.resolve()
|
||||
output_file = output_file.resolve()
|
||||
|
||||
if not templates_dir.exists():
|
||||
print(f"✗ Error: Templates directory not found: {templates_dir}")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Building index from: {templates_dir}")
|
||||
build_index(templates_dir, output_file)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user