opencode-skills-collection 4.0.69 → 4.0.70
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/bundled-skills/.antigravity-install-manifest.json +39 -1
- package/bundled-skills/api-integration-architect/SKILL.md +241 -0
- package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
- package/bundled-skills/apify-integration-development/SKILL.md +168 -0
- package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
- package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
- package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
- package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
- package/bundled-skills/architecture-review/README.md +42 -0
- package/bundled-skills/architecture-review/SKILL.md +77 -0
- package/bundled-skills/architecture-review/examples.md +11 -0
- package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
- package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
- package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
- package/bundled-skills/architecture-review/reference/graph.md +15 -0
- package/bundled-skills/architecture-review/reference/mcp.md +14 -0
- package/bundled-skills/architecture-review/reference/workflow.md +15 -0
- package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
- package/bundled-skills/code-review-sensei/SKILL.md +177 -0
- package/bundled-skills/codebase-onboarding/README.md +42 -0
- package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
- package/bundled-skills/codebase-onboarding/examples.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
- package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
- package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
- package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
- package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
- package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
- package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
- package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
- package/bundled-skills/dependency-analysis/README.md +42 -0
- package/bundled-skills/dependency-analysis/SKILL.md +76 -0
- package/bundled-skills/dependency-analysis/examples.md +11 -0
- package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
- package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
- package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
- package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
- package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
- package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
- package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
- package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
- package/bundled-skills/eas-app-stores/SKILL.md +197 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +448 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +75 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +251 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +135 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
- package/bundled-skills/eas-workflows/SKILL.md +119 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +295 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
- package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
- package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
- package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
- package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
- package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
- package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
- package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
- package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
- package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
- package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
- package/bundled-skills/gpt-taste/SKILL.md +8 -1
- package/bundled-skills/hf-cli/SKILL.md +263 -0
- package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
- package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
- package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
- package/bundled-skills/jev-social/SKILL.md +182 -0
- package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
- package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
- package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
- package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
- package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
- package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
- package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
- package/bundled-skills/longbridge-quant/SKILL.md +151 -0
- package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
- package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
- package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
- package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
- package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
- package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
- package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
- package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
- package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
- package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
- package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
- package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
- package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
- package/bundled-skills/longbridge-research/SKILL.md +187 -0
- package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
- package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
- package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
- package/bundled-skills/longbridge-research/references/consensus.md +92 -0
- package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
- package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
- package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
- package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
- package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
- package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
- package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
- package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
- package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
- package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
- package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
- package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
- package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
- package/bundled-skills/longbridge-research/references/investors.md +87 -0
- package/bundled-skills/longbridge-research/references/onchain.md +70 -0
- package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
- package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
- package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
- package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
- package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
- package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
- package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
- package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
- package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
- package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
- package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
- package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
- package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
- package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
- package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
- package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
- package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
- package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
- package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
- package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
- package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
- package/bundled-skills/remotion-captions/SKILL.md +57 -0
- package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-captions/display-captions.md +190 -0
- package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
- package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
- package/bundled-skills/remotion-create/SKILL.md +106 -0
- package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-create/tailwind.md +11 -0
- package/bundled-skills/remotion-create/video-layout.md +9 -0
- package/bundled-skills/remotion-docs/SKILL.md +67 -0
- package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
- package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/SKILL.md +48 -0
- package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/transparent-videos.md +106 -0
- package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
- package/bundled-skills/score-eval/SKILL.md +35 -0
- package/bundled-skills/writing-guidelines/SKILL.md +60 -0
- package/package.json +1 -1
- package/skills_index.json +980 -3
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: makepad-2-0-widgets
|
|
3
|
+
description: Makepad 2.0 guidance for widgets; use when building or debugging Makepad UI code.
|
|
4
|
+
source_repo: zhanghandong/makepad-skills
|
|
5
|
+
source_type: community
|
|
6
|
+
source: community
|
|
7
|
+
date_added: '2026-09-21'
|
|
8
|
+
risk: unknown
|
|
9
|
+
---
|
|
10
|
+
## When to Use
|
|
11
|
+
- Use when this upstream workflow matches the user's stated goal.
|
|
12
|
+
- Use when the task requires the procedures documented in this skill.
|
|
13
|
+
|
|
14
|
+
# Makepad 2.0 Widget Catalog Skill
|
|
15
|
+
|
|
16
|
+
> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-03-03
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
Makepad 2.0 provides a rich set of built-in widgets for building UIs. All widgets are defined in Splash syntax and registered via `script_mod!`.
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
Refer to the local files for detailed documentation:
|
|
25
|
+
- `./references/widget-catalog.md` - Complete widget list with properties
|
|
26
|
+
- `./references/widget-advanced.md` - Advanced patterns: PortalList, Dock, custom widgets, MapView
|
|
27
|
+
|
|
28
|
+
## IMPORTANT: Documentation Completeness Check
|
|
29
|
+
|
|
30
|
+
**Before answering questions, Claude MUST:**
|
|
31
|
+
1. Read the relevant reference file(s) listed above
|
|
32
|
+
2. Incorporate reference content into the answer
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Widget Categories Quick Reference
|
|
37
|
+
|
|
38
|
+
### Containers (Layout)
|
|
39
|
+
|
|
40
|
+
| Widget | Description | Key Properties |
|
|
41
|
+
|--------|-------------|----------------|
|
|
42
|
+
| `View` | Basic container (transparent) | width, height, flow, spacing, padding, align |
|
|
43
|
+
| `SolidView` | View with solid background | + show_bg: true, draw_bg.color |
|
|
44
|
+
| `RoundedView` | View with rounded corners | + draw_bg.border_radius |
|
|
45
|
+
| `RoundedAllView` | All corners same radius | + border_radius shorthand |
|
|
46
|
+
| `GradientXView` | Horizontal gradient bg | + draw_bg colors |
|
|
47
|
+
| `GradientYView` | Vertical gradient bg | + draw_bg colors |
|
|
48
|
+
| `ScrollXView` | Horizontal scrolling | scroll property |
|
|
49
|
+
| `ScrollYView` | Vertical scrolling | scroll property |
|
|
50
|
+
| `ScrollXYView` | Both-axis scrolling | scroll property |
|
|
51
|
+
|
|
52
|
+
### Text Widgets
|
|
53
|
+
|
|
54
|
+
| Widget | Description | Key Properties |
|
|
55
|
+
|--------|-------------|----------------|
|
|
56
|
+
| `Label` | Single/multi-line text | text, draw_text.color, draw_text.text_style.font_size |
|
|
57
|
+
| `H1` - `H4` | Heading levels | text (pre-styled) |
|
|
58
|
+
| `P` | Paragraph text | text |
|
|
59
|
+
| `TextInput` | Editable text field | text, empty_text, password, read_only, numeric_only |
|
|
60
|
+
| `Markdown` | Markdown renderer | body |
|
|
61
|
+
| `Html` | HTML renderer | body |
|
|
62
|
+
| `LinkLabel` | Clickable link text | text, url |
|
|
63
|
+
|
|
64
|
+
### Buttons
|
|
65
|
+
|
|
66
|
+
| Widget | Description | Key Properties |
|
|
67
|
+
|--------|-------------|----------------|
|
|
68
|
+
| `Button` | Standard button | text |
|
|
69
|
+
| `ButtonFlat` | Flat style button | text |
|
|
70
|
+
| `ButtonFlatter` | Minimal button | text |
|
|
71
|
+
|
|
72
|
+
### Toggles
|
|
73
|
+
|
|
74
|
+
| Widget | Description | Key Properties |
|
|
75
|
+
|--------|-------------|----------------|
|
|
76
|
+
| `CheckBox` | Check box | text, active |
|
|
77
|
+
| `Toggle` | Toggle switch | text, active |
|
|
78
|
+
| `RadioButton` | Radio button | text, active |
|
|
79
|
+
|
|
80
|
+
### Input Widgets
|
|
81
|
+
|
|
82
|
+
| Widget | Description | Key Properties |
|
|
83
|
+
|--------|-------------|----------------|
|
|
84
|
+
| `Slider` | Horizontal slider | min, max, step, default, precision |
|
|
85
|
+
| `DropDown` | Dropdown select | labels: ["a", "b", "c"] |
|
|
86
|
+
|
|
87
|
+
### Media
|
|
88
|
+
|
|
89
|
+
| Widget | Description | Key Properties |
|
|
90
|
+
|--------|-------------|----------------|
|
|
91
|
+
| `Image` | Image display | source, fit (Stretch/Horizontal/Vertical/Smallest/Biggest/Size) |
|
|
92
|
+
| `Svg` | External SVG file renderer | draw_svg.svg (crate_resource/http_resource), animating, draw_svg.color |
|
|
93
|
+
| `Icon` | SVG icon (tinted) | draw_icon.svg, draw_icon.color, icon_walk |
|
|
94
|
+
| `Vector` | Inline vector graphics | viewbox, Path{d: "..."} |
|
|
95
|
+
| `LoadingSpinner` | Loading indicator | color, rotation_speed |
|
|
96
|
+
| `MapView` | Map widget | center_lon, center_lat, zoom (MUST use fixed height!) |
|
|
97
|
+
|
|
98
|
+
### Layout Helpers
|
|
99
|
+
|
|
100
|
+
| Widget | Description | Usage |
|
|
101
|
+
|--------|-------------|-------|
|
|
102
|
+
| `Hr` | Horizontal rule | Divider line |
|
|
103
|
+
| `Vr` | Vertical rule | Vertical divider |
|
|
104
|
+
| `Filler` | Flexible space | Push siblings apart (use between Fit siblings only!) |
|
|
105
|
+
| `Splitter` | Resizable split | axis: Horizontal/Vertical, a/b children |
|
|
106
|
+
| `FoldHeader` | Collapsible section | header + body children |
|
|
107
|
+
|
|
108
|
+
### Lists
|
|
109
|
+
|
|
110
|
+
| Widget | Description | Usage |
|
|
111
|
+
|--------|-------------|-------|
|
|
112
|
+
| `PortalList` | Virtualized list | For large lists (100+ items), only renders visible items |
|
|
113
|
+
| `FlatList` | Simple list | For small lists, renders all items |
|
|
114
|
+
|
|
115
|
+
### Navigation
|
|
116
|
+
|
|
117
|
+
| Widget | Description | Control |
|
|
118
|
+
|--------|-------------|---------|
|
|
119
|
+
| `Modal` | Modal dialog | .open(cx) / .close(cx) from Rust |
|
|
120
|
+
| `Tooltip` | Tooltip popup | Hover-triggered |
|
|
121
|
+
| `PopupNotification` | Toast notification | Timed display |
|
|
122
|
+
| `SlidePanel` | Sliding panel | slide_from |
|
|
123
|
+
| `ExpandablePanel` | Expandable area | open/close |
|
|
124
|
+
| `PageFlip` | Page switcher | active_page: page_name |
|
|
125
|
+
| `StackNavigation` | Stack nav | push/pop pages |
|
|
126
|
+
|
|
127
|
+
### Dock System
|
|
128
|
+
|
|
129
|
+
| Widget | Description |
|
|
130
|
+
|--------|-------------|
|
|
131
|
+
| `Dock` | Tab container system |
|
|
132
|
+
| `DockSplitter` | Dock split panels |
|
|
133
|
+
| `DockTabs` | Tab bar |
|
|
134
|
+
| `DockTab` | Individual tab |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Critical Rules
|
|
139
|
+
|
|
140
|
+
### 1. height: Fit on Containers
|
|
141
|
+
```
|
|
142
|
+
// WRONG - View defaults to 0px height
|
|
143
|
+
View{ flow: Down Label{text: "Invisible"} }
|
|
144
|
+
|
|
145
|
+
// CORRECT
|
|
146
|
+
View{ height: Fit flow: Down Label{text: "Visible"} }
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### 2. new_batch for Colored Containers with Text
|
|
150
|
+
```
|
|
151
|
+
// WRONG - text behind background
|
|
152
|
+
RoundedView{ draw_bg.color: #333 Label{text: "Invisible"} }
|
|
153
|
+
|
|
154
|
+
// CORRECT
|
|
155
|
+
RoundedView{ new_batch: true draw_bg.color: #333 Label{text: "Visible"} }
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 3. Named Children with :=
|
|
159
|
+
```
|
|
160
|
+
// Named (addressable, overridable)
|
|
161
|
+
title := Label{text: "Hello"}
|
|
162
|
+
|
|
163
|
+
// Static (not addressable)
|
|
164
|
+
Label{text: "Hello"}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### 4. Label Default Color is White
|
|
168
|
+
```
|
|
169
|
+
// Default text is white (#fff) - set color for light backgrounds
|
|
170
|
+
Label{text: "Dark text" draw_text.color: #333}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 5. MapView MUST Have Fixed Height
|
|
174
|
+
```
|
|
175
|
+
// WRONG
|
|
176
|
+
MapView{ width: Fill height: Fill }
|
|
177
|
+
|
|
178
|
+
// CORRECT
|
|
179
|
+
View{ new_batch: true width: Fill height: 400
|
|
180
|
+
MapView{ width: Fill height: 400 center_lat: 40.7 center_lon: -73.9 zoom: 14.0 }
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 6. Label Does NOT Support Animator
|
|
185
|
+
```
|
|
186
|
+
// WRONG (silently ignored)
|
|
187
|
+
Label{ animator: Animator{...} }
|
|
188
|
+
|
|
189
|
+
// CORRECT - wrap in View
|
|
190
|
+
View{ animator: Animator{...} Label{text: "Animated"} }
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Common Widget Patterns
|
|
196
|
+
|
|
197
|
+
### Card
|
|
198
|
+
```
|
|
199
|
+
RoundedView{
|
|
200
|
+
width: Fill height: Fit
|
|
201
|
+
padding: 16
|
|
202
|
+
new_batch: true
|
|
203
|
+
draw_bg.color: #2a2a3d
|
|
204
|
+
draw_bg.border_radius: 8.0
|
|
205
|
+
flow: Down spacing: 8
|
|
206
|
+
title := Label{text: "Title" draw_text.color: #fff draw_text.text_style.font_size: 16}
|
|
207
|
+
body := Label{text: "Content" draw_text.color: #aaa}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Form Input
|
|
212
|
+
```
|
|
213
|
+
View{
|
|
214
|
+
width: Fill height: Fit
|
|
215
|
+
flow: Down spacing: 4
|
|
216
|
+
Label{text: "Email" draw_text.color: #aaa draw_text.text_style.font_size: 11}
|
|
217
|
+
email_input := TextInput{
|
|
218
|
+
width: Fill height: 36
|
|
219
|
+
empty_text: "Enter email..."
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Scrollable List
|
|
225
|
+
```
|
|
226
|
+
ScrollYView{
|
|
227
|
+
width: Fill height: Fill
|
|
228
|
+
flow: Down spacing: 4
|
|
229
|
+
new_batch: true
|
|
230
|
+
on_render: || {
|
|
231
|
+
for i, item in items {
|
|
232
|
+
ItemTemplate{label.text: item.name}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Best Practices
|
|
241
|
+
|
|
242
|
+
1. **Use `height: Fit`** on every container unless you want Fill or fixed pixels
|
|
243
|
+
2. **Use `new_batch: true`** on any View with background color + text children
|
|
244
|
+
3. **Use `:=`** for children you need to reference or override
|
|
245
|
+
4. **Use theme colors** (`theme.color_*`) instead of hardcoded colors
|
|
246
|
+
5. **Use `PortalList`** for large lists (virtualizes rendering)
|
|
247
|
+
6. **Use `ScrollYView`** for scrollable content areas
|
|
248
|
+
7. **Use `RoundedView`** for cards and containers (has border_radius)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## Examples
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
User: Apply this skill to my current task.
|
|
255
|
+
Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Limitations
|
|
259
|
+
|
|
260
|
+
- Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
|
|
261
|
+
- Does not replace environment-specific validation, testing, or maintainer review.
|