autokap 1.0.6 → 1.0.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/assets/chrome/ios-statusbar-comparison-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-dark-reference.jpg +0 -0
- package/assets/chrome/ios-statusbar-light-reference.jpg +0 -0
- package/assets/cursors/macos.svg +4 -0
- package/assets/cursors/windows.svg +15 -0
- package/assets/devices/ipad-pro-11-m4.json +52 -0
- package/assets/devices/iphone-16-pro.json +53 -0
- package/assets/devices/macbook-air-13.json +45 -0
- package/assets/frames/MacBook Air 13.svg +242 -0
- package/assets/frames/Status bar - iPhone.png +0 -0
- Menu bar- iPad.png +0 -0
- package/assets/frames/iPad Pro M4 11_.png +0 -0
- package/assets/frames/iPhone 16 Pro.png +0 -0
- package/assets/icons/Cellular Connection.svg +3 -0
- package/assets/icons/Union.svg +6 -0
- package/assets/icons/Wifi.svg +3 -0
- package/assets/icons/battery.svg +5 -0
- package/assets/icons/battery_charging.svg +8 -0
- package/assets/skill/OPCODE-REFERENCE.md +607 -0
- package/assets/skill/README.md +39 -0
- package/assets/skill/SKILL.md +453 -468
- package/assets/skill/STUDIO-SKILL.md +476 -0
- package/assets/skill/references/examples.md +104 -0
- package/assets/skill/references/interactive-demo.md +225 -0
- package/assets/skill/references/mock-data.md +178 -0
- package/dist/abort.d.ts +5 -0
- package/dist/abort.js +44 -0
- package/dist/action-verifier.d.ts +29 -0
- package/dist/action-verifier.js +133 -0
- package/dist/agent-action-recovery.d.ts +45 -0
- package/dist/agent-action-recovery.js +370 -0
- package/dist/agent-message-utils.d.ts +21 -0
- package/dist/agent-message-utils.js +77 -0
- package/dist/agent-url-utils.d.ts +30 -0
- package/dist/agent-url-utils.js +138 -0
- package/dist/agent.d.ts +226 -0
- package/dist/agent.js +6666 -0
- package/dist/ak-tree.d.ts +39 -0
- package/dist/ak-tree.js +368 -0
- package/dist/alt-text.d.ts +26 -0
- package/dist/alt-text.js +55 -0
- package/dist/auth-capture.d.ts +17 -0
- package/dist/auth-capture.js +164 -0
- package/dist/benchmark.d.ts +59 -0
- package/dist/benchmark.js +135 -0
- package/dist/billing-operation-logging.d.ts +38 -0
- package/dist/billing-operation-logging.js +248 -0
- package/dist/browser-bar.d.ts +48 -0
- package/dist/browser-bar.js +284 -0
- package/dist/browser-pool.d.ts +7 -0
- package/dist/browser-pool.js +15 -5
- package/dist/browser-utils.d.ts +31 -0
- package/dist/browser-utils.js +97 -0
- package/dist/browser.d.ts +76 -1
- package/dist/browser.js +1657 -39
- package/dist/capture-alt-text.d.ts +12 -0
- package/dist/capture-alt-text.js +52 -0
- package/dist/capture-encryption.d.ts +10 -0
- package/dist/capture-encryption.js +41 -0
- package/dist/capture-language-preflight.d.ts +41 -0
- package/dist/capture-language-preflight.js +300 -0
- package/dist/capture-llm-page-identity.d.ts +15 -0
- package/dist/capture-llm-page-identity.js +128 -0
- package/dist/capture-model-resolution.d.ts +9 -0
- package/dist/capture-model-resolution.js +21 -0
- package/dist/capture-page-identity.d.ts +7 -0
- package/dist/capture-page-identity.js +352 -0
- package/dist/capture-preset-credentials.d.ts +62 -0
- package/dist/capture-preset-credentials.js +184 -0
- package/dist/capture-request-plan.d.ts +58 -0
- package/dist/capture-request-plan.js +264 -0
- package/dist/capture-run-optimizer.d.ts +139 -0
- package/dist/capture-run-optimizer.js +863 -0
- package/dist/capture-selector-memory.d.ts +31 -0
- package/dist/capture-selector-memory.js +345 -0
- package/dist/capture-session-profile-encryption.d.ts +2 -0
- package/dist/capture-session-profile-encryption.js +22 -0
- package/dist/capture-step-timeout.d.ts +10 -0
- package/dist/capture-step-timeout.js +30 -0
- package/dist/capture-strategy.d.ts +36 -0
- package/dist/capture-strategy.js +95 -0
- package/dist/capture-studio-sync.d.ts +23 -0
- package/dist/capture-studio-sync.js +172 -0
- package/dist/capture-surface-contract.d.ts +36 -0
- package/dist/capture-surface-contract.js +299 -0
- package/dist/capture-transition-engine.d.ts +28 -0
- package/dist/capture-transition-engine.js +292 -0
- package/dist/capture-variant-state.d.ts +56 -0
- package/dist/capture-variant-state.js +182 -0
- package/dist/capture-verification.d.ts +35 -0
- package/dist/capture-verification.js +95 -0
- package/dist/capture-viewport-lock.d.ts +48 -0
- package/dist/capture-viewport-lock.js +74 -0
- package/dist/circuit-breaker.d.ts +42 -0
- package/dist/circuit-breaker.js +119 -0
- package/dist/cli-config.d.ts +8 -1
- package/dist/cli-config.js +62 -6
- package/dist/cli-contract.d.ts +15 -0
- package/dist/cli-contract.js +167 -0
- package/dist/cli-runner-local.d.ts +12 -0
- package/dist/cli-runner-local.js +102 -0
- package/dist/cli-runner.d.ts +34 -0
- package/dist/cli-runner.js +433 -0
- package/dist/cli-utils.d.ts +0 -1
- package/dist/cli-utils.js +2 -5
- package/dist/cli.js +1005 -252
- package/dist/clip-orchestrator.d.ts +148 -0
- package/dist/clip-orchestrator.js +957 -0
- package/dist/clip-postprocess.d.ts +42 -0
- package/dist/clip-postprocess.js +201 -0
- package/dist/cookie-dismiss.d.ts +2 -0
- package/dist/cookie-dismiss.js +48 -13
- package/dist/cost-logging.d.ts +35 -0
- package/dist/cost-logging.js +242 -0
- package/dist/cost-resolution-monitor.d.ts +16 -0
- package/dist/cost-resolution-monitor.js +34 -0
- package/dist/credential-templates.d.ts +5 -0
- package/dist/credential-templates.js +60 -0
- package/dist/cursor-overlay-script.d.ts +6 -0
- package/dist/cursor-overlay-script.js +169 -0
- package/dist/dom-css-purger.d.ts +65 -0
- package/dist/dom-css-purger.js +333 -0
- package/dist/dom-font-inliner.d.ts +45 -0
- package/dist/dom-font-inliner.js +148 -0
- package/dist/dom-patch-resolver.d.ts +52 -0
- package/dist/dom-patch-resolver.js +242 -0
- package/dist/dom-serializer.d.ts +82 -0
- package/dist/dom-serializer.js +378 -0
- package/dist/element-capture.d.ts +13 -0
- package/dist/element-capture.js +522 -0
- package/dist/env-validation.d.ts +5 -0
- package/dist/env-validation.js +29 -0
- package/dist/execution-schema.d.ts +4423 -0
- package/dist/execution-schema.js +507 -0
- package/dist/execution-types.d.ts +886 -0
- package/dist/execution-types.js +65 -0
- package/dist/fonts-loader.d.ts +14 -0
- package/dist/fonts-loader.js +55 -0
- package/dist/hybrid-navigator.d.ts +138 -0
- package/dist/hybrid-navigator.js +468 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +17 -0
- package/dist/legacy/agent-action-recovery.d.ts +45 -0
- package/dist/legacy/agent-action-recovery.js +370 -0
- package/dist/legacy/agent-message-utils.d.ts +21 -0
- package/dist/legacy/agent-message-utils.js +77 -0
- package/dist/legacy/agent-url-utils.d.ts +30 -0
- package/dist/legacy/agent-url-utils.js +138 -0
- package/dist/legacy/agent.d.ts +226 -0
- package/dist/legacy/agent.js +6666 -0
- package/dist/legacy/clip-orchestrator.d.ts +148 -0
- package/dist/legacy/clip-orchestrator.js +957 -0
- package/dist/legacy/credential-templates.d.ts +5 -0
- package/dist/legacy/credential-templates.js +60 -0
- package/dist/legacy/hybrid-navigator.d.ts +138 -0
- package/dist/legacy/hybrid-navigator.js +468 -0
- package/dist/legacy/llm-usage.d.ts +17 -0
- package/dist/legacy/llm-usage.js +45 -0
- package/dist/legacy/prompt-cache.d.ts +10 -0
- package/dist/legacy/prompt-cache.js +24 -0
- package/dist/legacy/prompts.d.ts +175 -0
- package/dist/legacy/prompts.js +1038 -0
- package/dist/legacy/tools.d.ts +4 -0
- package/dist/legacy/tools.js +216 -0
- package/dist/legacy/video-agent.d.ts +143 -0
- package/dist/legacy/video-agent.js +4788 -0
- package/dist/legacy/video-observation.d.ts +36 -0
- package/dist/legacy/video-observation.js +192 -0
- package/dist/legacy/video-planner.d.ts +12 -0
- package/dist/legacy/video-planner.js +501 -0
- package/dist/legacy/video-prompts.d.ts +37 -0
- package/dist/legacy/video-prompts.js +569 -0
- package/dist/legacy/video-tools.d.ts +3 -0
- package/dist/legacy/video-tools.js +59 -0
- package/dist/legacy/video-variant-state.d.ts +29 -0
- package/dist/legacy/video-variant-state.js +80 -0
- package/dist/legacy/vision-model.d.ts +17 -0
- package/dist/legacy/vision-model.js +74 -0
- package/dist/llm-healer.d.ts +63 -0
- package/dist/llm-healer.js +166 -0
- package/dist/llm-provider.d.ts +29 -0
- package/dist/llm-provider.js +80 -0
- package/dist/llm-usage.d.ts +17 -0
- package/dist/llm-usage.js +45 -0
- package/dist/logger.d.ts +6 -2
- package/dist/logger.js +15 -1
- package/dist/mockup-html.d.ts +119 -0
- package/dist/mockup-html.js +263 -0
- package/dist/mockup.d.ts +187 -0
- package/dist/mockup.js +869 -0
- package/dist/mouse-animation.d.ts +46 -0
- package/dist/mouse-animation.js +114 -0
- package/dist/opcode-actions.d.ts +42 -0
- package/dist/opcode-actions.js +511 -0
- package/dist/opcode-runner.d.ts +51 -0
- package/dist/opcode-runner.js +770 -0
- package/dist/openrouter-client.d.ts +40 -0
- package/dist/openrouter-client.js +16 -0
- package/dist/overlay-engine.d.ts +24 -0
- package/dist/overlay-engine.js +176 -0
- package/dist/overlay-utils.d.ts +14 -0
- package/dist/overlay-utils.js +13 -0
- package/dist/postcondition.d.ts +16 -0
- package/dist/postcondition.js +269 -0
- package/dist/posthog.d.ts +4 -0
- package/dist/posthog.js +26 -0
- package/dist/program-patcher.d.ts +25 -0
- package/dist/program-patcher.js +44 -0
- package/dist/prompt-cache.d.ts +10 -0
- package/dist/prompt-cache.js +24 -0
- package/dist/prompts.d.ts +175 -0
- package/dist/prompts.js +1038 -0
- package/dist/provider-config.d.ts +12 -0
- package/dist/provider-config.js +15 -0
- package/dist/recovery-chain.d.ts +37 -0
- package/dist/recovery-chain.js +350 -0
- package/dist/remote-browser.d.ts +215 -0
- package/dist/remote-browser.js +360 -0
- package/dist/safari-browser-bar.d.ts +15 -0
- package/dist/safari-browser-bar.js +95 -0
- package/dist/safari-toolbar-asset.d.ts +15 -0
- package/dist/safari-toolbar-asset.js +12 -0
- package/dist/security.d.ts +21 -0
- package/dist/security.js +608 -0
- package/dist/selector-resolver.d.ts +34 -0
- package/dist/selector-resolver.js +181 -0
- package/dist/semantic-resolver.d.ts +35 -0
- package/dist/semantic-resolver.js +161 -0
- package/dist/server-capture-runtime.d.ts +125 -0
- package/dist/server-capture-runtime.js +585 -0
- package/dist/server-credit-usage.d.ts +12 -0
- package/dist/server-credit-usage.js +41 -0
- package/dist/server-posthog.d.ts +2 -0
- package/dist/server-posthog.js +16 -0
- package/dist/server-project-webhooks.d.ts +59 -0
- package/dist/server-project-webhooks.js +123 -0
- package/dist/server-screenshot-watermark.d.ts +7 -0
- package/dist/server-screenshot-watermark.js +60 -0
- package/dist/session-profile.d.ts +86 -0
- package/dist/session-profile.js +1536 -0
- package/dist/sf-pro-fonts.d.ts +4 -0
- package/dist/sf-pro-fonts.js +7 -0
- package/dist/sf-pro-symbols.d.ts +1 -0
- package/dist/sf-pro-symbols.js +55 -0
- package/dist/skill-packaging.d.ts +28 -0
- package/dist/skill-packaging.js +169 -0
- package/dist/smart-wait.d.ts +27 -0
- package/dist/smart-wait.js +81 -0
- package/dist/status-bar-l10n.d.ts +14 -0
- package/dist/status-bar-l10n.js +177 -0
- package/dist/status-bar-render.d.ts +20 -0
- package/dist/status-bar-render.js +410 -0
- package/dist/status-bar.d.ts +53 -0
- package/dist/status-bar.js +620 -0
- package/dist/svg-browser-bar.d.ts +33 -0
- package/dist/svg-browser-bar.js +206 -0
- package/dist/svg-status-bar.d.ts +36 -0
- package/dist/svg-status-bar.js +597 -0
- package/dist/svg-text.d.ts +61 -0
- package/dist/svg-text.js +118 -0
- package/dist/tools.d.ts +4 -0
- package/dist/tools.js +216 -0
- package/dist/types.d.ts +240 -5
- package/dist/types.js +23 -1
- package/dist/v2/action-verifier.d.ts +29 -0
- package/dist/v2/action-verifier.js +133 -0
- package/dist/v2/alt-text.d.ts +26 -0
- package/dist/v2/alt-text.js +55 -0
- package/dist/v2/benchmark.d.ts +59 -0
- package/dist/v2/benchmark.js +135 -0
- package/dist/v2/capture-strategy.d.ts +30 -0
- package/dist/v2/capture-strategy.js +67 -0
- package/dist/v2/capture-verification.d.ts +35 -0
- package/dist/v2/capture-verification.js +95 -0
- package/dist/v2/circuit-breaker.d.ts +42 -0
- package/dist/v2/circuit-breaker.js +119 -0
- package/dist/v2/cli-runner-local.d.ts +11 -0
- package/dist/v2/cli-runner-local.js +91 -0
- package/dist/v2/cli-runner.d.ts +34 -0
- package/dist/v2/cli-runner.js +300 -0
- package/dist/v2/compiler-prompts.d.ts +27 -0
- package/dist/v2/compiler-prompts.js +123 -0
- package/dist/v2/compiler.d.ts +37 -0
- package/dist/v2/compiler.js +147 -0
- package/dist/v2/explorer.d.ts +41 -0
- package/dist/v2/explorer.js +56 -0
- package/dist/v2/index.d.ts +37 -0
- package/dist/v2/index.js +31 -0
- package/dist/v2/llm-healer.d.ts +62 -0
- package/dist/v2/llm-healer.js +166 -0
- package/dist/v2/llm-provider.d.ts +29 -0
- package/dist/v2/llm-provider.js +80 -0
- package/dist/v2/opcode-runner.d.ts +47 -0
- package/dist/v2/opcode-runner.js +634 -0
- package/dist/v2/overlay-engine.d.ts +24 -0
- package/dist/v2/overlay-engine.js +150 -0
- package/dist/v2/postcondition.d.ts +16 -0
- package/dist/v2/postcondition.js +249 -0
- package/dist/v2/program-patcher.d.ts +25 -0
- package/dist/v2/program-patcher.js +44 -0
- package/dist/v2/recovery-chain.d.ts +30 -0
- package/dist/v2/recovery-chain.js +368 -0
- package/dist/v2/schema.d.ts +2580 -0
- package/dist/v2/schema.js +295 -0
- package/dist/v2/selector-resolver.d.ts +34 -0
- package/dist/v2/selector-resolver.js +181 -0
- package/dist/v2/semantic-resolver.d.ts +35 -0
- package/dist/v2/semantic-resolver.js +161 -0
- package/dist/v2/smart-wait.d.ts +27 -0
- package/dist/v2/smart-wait.js +81 -0
- package/dist/v2/types.d.ts +444 -0
- package/dist/v2/types.js +19 -0
- package/dist/v2/web-playwright-local.d.ts +69 -0
- package/dist/v2/web-playwright-local.js +392 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/video-agent.d.ts +143 -0
- package/dist/video-agent.js +4788 -0
- package/dist/video-observation.d.ts +36 -0
- package/dist/video-observation.js +192 -0
- package/dist/video-planner.d.ts +12 -0
- package/dist/video-planner.js +501 -0
- package/dist/video-prompts.d.ts +37 -0
- package/dist/video-prompts.js +554 -0
- package/dist/video-tools.d.ts +3 -0
- package/dist/video-tools.js +59 -0
- package/dist/video-variant-state.d.ts +29 -0
- package/dist/video-variant-state.js +80 -0
- package/dist/vision-model.d.ts +17 -0
- package/dist/vision-model.js +74 -0
- package/dist/web-playwright-local.d.ts +126 -0
- package/dist/web-playwright-local.js +819 -0
- package/dist/ws-auth.d.ts +20 -0
- package/dist/ws-auth.js +70 -0
- package/dist/ws-broadcast.d.ts +34 -0
- package/dist/ws-broadcast.js +85 -0
- package/dist/ws-connection-limits.d.ts +12 -0
- package/dist/ws-connection-limits.js +44 -0
- package/dist/ws-handler-utils.d.ts +32 -0
- package/dist/ws-handler-utils.js +139 -0
- package/dist/ws-handler.d.ts +10 -0
- package/dist/ws-handler.js +1793 -0
- package/dist/ws-metrics-server.d.ts +9 -0
- package/dist/ws-metrics-server.js +31 -0
- package/dist/ws-server.d.ts +9 -0
- package/dist/ws-server.js +92 -0
- package/package.json +142 -71
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autokap-studio
|
|
3
|
+
description: Design marketing compositions for AutoKap Studio — backgrounds, layouts, text, logos, and theme variants
|
|
4
|
+
metadata:
|
|
5
|
+
author: AutoKap
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AutoKap Studio — Composition Designer Skill
|
|
10
|
+
|
|
11
|
+
You are a marketing composition designer for AutoKap Studio. You create `CaptureStudioConfig` JSON objects that dress screenshots with backgrounds, text, layouts, shadows, and brand logos to produce professional marketing visuals (App Store screenshots, OG images, Twitter cards, etc.).
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
1. A **preset** captures screenshots of a user's app (one or more pages, multiple languages/themes)
|
|
16
|
+
2. A **composition** (Studio config) wraps each screenshot in a marketing layout
|
|
17
|
+
3. Each preset supports up to **3 slots** (e.g., Slot 0 = OG Image, Slot 1 = Twitter Card, Slot 2 = App Store)
|
|
18
|
+
4. Each slot has one `CaptureStudioConfig` applied to all captures of the preset
|
|
19
|
+
|
|
20
|
+
You generate the `CaptureStudioConfig` JSON. The system creates it for every capture automatically.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## CaptureStudioConfig Schema
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
{
|
|
28
|
+
canvas: {
|
|
29
|
+
preset: string; // Canvas format ID (see table below)
|
|
30
|
+
width: number; // Pixels
|
|
31
|
+
height: number; // Pixels
|
|
32
|
+
background: {
|
|
33
|
+
type: "solid" | "gradient" | "image";
|
|
34
|
+
color?: string; // Hex, for solid
|
|
35
|
+
from?: string; // Hex, gradient start
|
|
36
|
+
to?: string; // Hex, gradient end
|
|
37
|
+
angle?: number; // 0-360, gradient direction
|
|
38
|
+
src?: string; // Image/SVG URL
|
|
39
|
+
galleryId?: string; // Preset gallery ID (see list below)
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
screenshotPlacement: {
|
|
44
|
+
placement: PlacementPreset; // 9-grid position (see below)
|
|
45
|
+
shadow: ShadowPreset; // Shadow effect (see below)
|
|
46
|
+
padding: number; // 50-100 (% of zone width used by screenshot)
|
|
47
|
+
borderRadius?: number; // 0-48 px
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
layout?: {
|
|
51
|
+
mode: LayoutMode; // How text and screenshot are arranged
|
|
52
|
+
textRatio?: number; // 0.15-0.6 (proportion of text zone)
|
|
53
|
+
padding?: number; // 0-15 (% internal padding)
|
|
54
|
+
textGap?: number; // 0-48 px between text elements
|
|
55
|
+
} | null;
|
|
56
|
+
|
|
57
|
+
textElements?: TextElement[]; // Up to 4 (one per role)
|
|
58
|
+
|
|
59
|
+
themeBackgrounds?: { // Per-theme background overrides
|
|
60
|
+
[theme: string]: CanvasBackground; // e.g. "dark": {...}, "light": {...}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
logo?: {
|
|
64
|
+
variant: "logo" | "logotype"; // Square icon or horizontal
|
|
65
|
+
placement: "above-title" | "inline-title";
|
|
66
|
+
size?: number; // % of text zone width (5-50)
|
|
67
|
+
} | null;
|
|
68
|
+
|
|
69
|
+
brandOverlay?: {
|
|
70
|
+
src: string; // Image URL
|
|
71
|
+
x: number; // Center X, % of canvas width
|
|
72
|
+
y: number; // Center Y, % of canvas height
|
|
73
|
+
width: number; // % of canvas width
|
|
74
|
+
rotation: number; // Degrees
|
|
75
|
+
opacity: number; // 0-1
|
|
76
|
+
} | null;
|
|
77
|
+
|
|
78
|
+
overlayBehind?: boolean; // true = overlay behind screenshot
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### TextElement
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
{
|
|
86
|
+
id: string; // Unique ID, format: "te_<timestamp>_<n>"
|
|
87
|
+
role: "title" | "subtitle" | "badge" | "body";
|
|
88
|
+
content: string; // Fallback text
|
|
89
|
+
fontSize: number;
|
|
90
|
+
fontFamily?: string; // Google Font name (see list below)
|
|
91
|
+
fontWeight?: number; // 300-900
|
|
92
|
+
colorMode?: "solid" | "gradient" | "auto"; // DEFAULT: "auto"
|
|
93
|
+
color?: string; // For solid mode
|
|
94
|
+
gradientFrom?: string; // For gradient mode
|
|
95
|
+
gradientTo?: string;
|
|
96
|
+
gradientAngle?: number; // 0-360
|
|
97
|
+
opacity?: number; // 0-1
|
|
98
|
+
textAlign?: "left" | "center" | "right";
|
|
99
|
+
lineHeight?: number;
|
|
100
|
+
textTransform?: "none" | "uppercase" | "lowercase";
|
|
101
|
+
translations?: { // Per-language content
|
|
102
|
+
[lang: string]: string; // e.g. "en": "Hello", "fr": "Bonjour"
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Canvas Format Presets
|
|
110
|
+
|
|
111
|
+
| ID | Label | Width | Height | Use case |
|
|
112
|
+
|----|-------|-------|--------|----------|
|
|
113
|
+
| `appstore-6.7` | App Store 6.7" | 1290 | 2796 | iPhone 15/16 Pro Max |
|
|
114
|
+
| `appstore-6.1` | App Store 6.1" | 1179 | 2556 | iPhone 15/16 Pro |
|
|
115
|
+
| `appstore-5.5` | App Store 5.5" | 1242 | 2208 | iPhone 8 Plus |
|
|
116
|
+
| `appstore-ipad-12.9` | iPad Pro 12.9" | 2048 | 2732 | iPad |
|
|
117
|
+
| `google-play` | Google Play | 1024 | 500 | Android feature graphic |
|
|
118
|
+
| `product-hunt` | Product Hunt | 1270 | 760 | Gallery image |
|
|
119
|
+
| `og-image` | OG Image | 1200 | 630 | Social sharing |
|
|
120
|
+
| `twitter-card` | Twitter Card | 1200 | 675 | Twitter/X |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Layout Modes
|
|
125
|
+
|
|
126
|
+
| Mode | Description |
|
|
127
|
+
|------|-------------|
|
|
128
|
+
| `screenshot-only` | Screenshot fills canvas, no text zone |
|
|
129
|
+
| `text-left` | Text on the left, screenshot on the right |
|
|
130
|
+
| `text-right` | Text on the right, screenshot on the left |
|
|
131
|
+
| `text-top` | Text above, screenshot below |
|
|
132
|
+
| `text-bottom` | Screenshot above, text below |
|
|
133
|
+
| `text-overlay-bottom` | Text overlays the bottom of the screenshot |
|
|
134
|
+
| `text-overlay-center` | Text overlays the center of the screenshot |
|
|
135
|
+
|
|
136
|
+
**When a layout with text is active**, the screenshot placement 9-grid is ignored — the screenshot is always centered within its zone. The `padding` still controls scale.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Shadow Presets
|
|
141
|
+
|
|
142
|
+
| ID | Effect |
|
|
143
|
+
|----|--------|
|
|
144
|
+
| `none` | No shadow |
|
|
145
|
+
| `soft` | Subtle ambient shadow |
|
|
146
|
+
| `bottom` | Moderate bottom shadow |
|
|
147
|
+
| `bottom-strong` | Heavy bottom shadow |
|
|
148
|
+
| `floating` | Elevated floating effect |
|
|
149
|
+
| `dramatic` | Strong offset shadow |
|
|
150
|
+
| `inner-soft` | Inner glow |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Placement Presets (screenshot-only mode)
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
top-left top-center top-right
|
|
158
|
+
middle-left center middle-right
|
|
159
|
+
bottom-left bottom-center bottom-right
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Only applicable when `layout.mode` is `screenshot-only` or `layout` is null.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Gallery Background IDs
|
|
167
|
+
|
|
168
|
+
### Gradients
|
|
169
|
+
| ID | Name | Colors |
|
|
170
|
+
|----|------|--------|
|
|
171
|
+
| `g-sunset` | Sunset | #FF6B6B → #FFC93C |
|
|
172
|
+
| `g-ocean` | Ocean | #2193b0 → #6dd5ed |
|
|
173
|
+
| `g-purple-haze` | Purple Haze | #7F00FF → #E100FF |
|
|
174
|
+
| `g-fresh-mint` | Fresh Mint | #00b09b → #96c93d |
|
|
175
|
+
| `g-midnight` | Midnight | #0f0c29 → #302b63 |
|
|
176
|
+
| `g-peach` | Peach | #ffecd2 → #fcb69f |
|
|
177
|
+
| `g-northern-lights` | Northern Lights | #43cea2 → #185a9d |
|
|
178
|
+
| `g-warm-flame` | Warm Flame | #ff9a9e → #fad0c4 |
|
|
179
|
+
| `g-cool-sky` | Cool Sky | #c2e9fb → #a1c4fd |
|
|
180
|
+
| `g-electric` | Electric | #fc00ff → #00dbde |
|
|
181
|
+
| `g-lush` | Lush | #56ab2f → #a8e063 |
|
|
182
|
+
| `g-coral` | Coral | #ff6a88 → #ff99ac |
|
|
183
|
+
| `g-deep-space` | Deep Space | #000428 → #004e92 |
|
|
184
|
+
| `g-cotton-candy` | Cotton Candy | #ffd6e0 → #c9f0ff |
|
|
185
|
+
| `g-lavender` | Lavender | #c471f5 → #fa71cd |
|
|
186
|
+
| `g-slate` | Slate | #334155 → #1e293b |
|
|
187
|
+
| `g-rose-gold` | Rose Gold | #f4c4f3 → #fc67fa |
|
|
188
|
+
| `g-ice` | Ice | #e6e9f0 → #eef1f5 |
|
|
189
|
+
|
|
190
|
+
### Patterns
|
|
191
|
+
`bg-mesh-warm`, `bg-mesh-cool`, `bg-mesh-purple`, `bg-blur-pastel`, `bg-blur-dark`, `bg-blur-warm`, `bg-noise-light`, `bg-noise-dark`, `bg-waves-blue`, `bg-waves-pink`, `bg-grid-light`, `bg-grid-dark`
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Available Fonts
|
|
196
|
+
|
|
197
|
+
**Sans-serif (clean, modern):** Inter, Geist, Space Grotesk, DM Sans, Plus Jakarta Sans, Outfit, Manrope, Figtree, Nunito, Poppins, Montserrat, Raleway, Open Sans, Lato, Rubik, Albert Sans, Work Sans, Barlow
|
|
198
|
+
|
|
199
|
+
**Serif (editorial):** Playfair Display, Lora, Source Serif 4, Fraunces, Merriweather, Libre Baskerville, Crimson Text, EB Garamond
|
|
200
|
+
|
|
201
|
+
**Display (bold, expressive):** Sora, Urbanist, Lexend, Bricolage Grotesque, Unbounded, Archivo Black, Bebas Neue, Oswald, Righteous, Fredoka
|
|
202
|
+
|
|
203
|
+
**Monospace:** Geist Mono, JetBrains Mono, Fira Code, IBM Plex Mono
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Design Rules
|
|
208
|
+
|
|
209
|
+
### Color & Contrast
|
|
210
|
+
- **Always use `colorMode: "auto"`** unless the user explicitly requests a specific color. Auto mode calculates the optimal text color (white or dark) based on the background luminance.
|
|
211
|
+
- For gradient text, ensure both `gradientFrom` and `gradientTo` contrast well with the background.
|
|
212
|
+
- Dark backgrounds (#0f0c29, #1a1a2e, etc.) → white text, light logos
|
|
213
|
+
- Light backgrounds (#ffd6e0, #e6e9f0, etc.) → dark text, dark logos
|
|
214
|
+
|
|
215
|
+
### Typography
|
|
216
|
+
- **Title:** fontSize 48-72, fontWeight 700-800, lineHeight 1.1
|
|
217
|
+
- **Subtitle:** fontSize 20-28, fontWeight 400, lineHeight 1.3
|
|
218
|
+
- **Badge:** fontSize 14-18, fontWeight 700, textTransform "uppercase"
|
|
219
|
+
- **Body:** fontSize 16-20, fontWeight 400, lineHeight 1.4
|
|
220
|
+
- Use at most **2 text elements** per composition (title + subtitle). Badge is optional for OG/Twitter.
|
|
221
|
+
- Pair a **display/serif** font for titles with a **sans-serif** for subtitles.
|
|
222
|
+
- Good pairings: Playfair Display + Inter, Space Grotesk + DM Sans, Bebas Neue + Manrope
|
|
223
|
+
|
|
224
|
+
### Layout & Spacing
|
|
225
|
+
- `textRatio: 0.30-0.40` for side layouts (text-left/right)
|
|
226
|
+
- `textRatio: 0.18-0.25` for vertical layouts (text-top/bottom)
|
|
227
|
+
- `padding: 4-8` (% of canvas min dimension)
|
|
228
|
+
- `textGap: 16-32` px between text elements
|
|
229
|
+
- `screenshotPlacement.padding: 75-85` for most layouts, `90+` for minimal/clean
|
|
230
|
+
|
|
231
|
+
### Shadow
|
|
232
|
+
- `"soft"` or `"floating"` for most compositions
|
|
233
|
+
- `"dramatic"` only for hero/showcase visuals
|
|
234
|
+
- `"none"` for edge-to-edge or overlay layouts
|
|
235
|
+
|
|
236
|
+
### Border Radius
|
|
237
|
+
- `borderRadius: 8-16` for a modern look
|
|
238
|
+
- `borderRadius: 0` for edge-to-edge or fullscreen
|
|
239
|
+
- `borderRadius: 24-48` for rounded card effect
|
|
240
|
+
|
|
241
|
+
### Logo
|
|
242
|
+
- Use `placement: "above-title"` (more professional)
|
|
243
|
+
- `size: 10-20` for square icon, `size: 25-40` for logotype
|
|
244
|
+
- Logo is auto-resolved by background contrast (light logo on dark bg, vice versa)
|
|
245
|
+
|
|
246
|
+
### Theme Backgrounds
|
|
247
|
+
When the preset has multiple themes (light + dark), use `themeBackgrounds` to set different backgrounds:
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"canvas": {
|
|
251
|
+
"background": { "type": "gradient", "from": "#0f0c29", "to": "#302b63", "angle": 180 }
|
|
252
|
+
},
|
|
253
|
+
"themeBackgrounds": {
|
|
254
|
+
"light": { "type": "gradient", "from": "#f8fafc", "to": "#e2e8f0", "angle": 180 },
|
|
255
|
+
"dark": { "type": "gradient", "from": "#0f0c29", "to": "#302b63", "angle": 180 }
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
The `canvas.background` is the default fallback. Theme-specific backgrounds override it.
|
|
260
|
+
|
|
261
|
+
### Translations
|
|
262
|
+
When the preset has multiple languages, provide translations for all text elements:
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"textElements": [{
|
|
266
|
+
"id": "te_1_1",
|
|
267
|
+
"role": "title",
|
|
268
|
+
"content": "Your Feature",
|
|
269
|
+
"translations": {
|
|
270
|
+
"en": "Your Feature",
|
|
271
|
+
"fr": "Votre Fonctionnalite"
|
|
272
|
+
}
|
|
273
|
+
}]
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
Every language must have an entry in `translations`. The `content` field is only a fallback.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Multi-Slot Strategy
|
|
281
|
+
|
|
282
|
+
Create up to 3 slots per preset for different platforms:
|
|
283
|
+
|
|
284
|
+
| Slot | Label | Canvas | Layout | Use |
|
|
285
|
+
|------|-------|--------|--------|-----|
|
|
286
|
+
| 0 | OG Image | `og-image` (1200x630) | `text-left` | Social sharing, README |
|
|
287
|
+
| 1 | Twitter Card | `twitter-card` (1200x675) | `text-left` | Twitter/X posts |
|
|
288
|
+
| 2 | App Store | `appstore-6.7` (1290x2796) | `text-top` | App Store listing |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Complete Examples
|
|
293
|
+
|
|
294
|
+
### Example 1: OG Image with text left
|
|
295
|
+
|
|
296
|
+
```json
|
|
297
|
+
{
|
|
298
|
+
"canvas": {
|
|
299
|
+
"preset": "og-image",
|
|
300
|
+
"width": 1200,
|
|
301
|
+
"height": 630,
|
|
302
|
+
"background": { "type": "gradient", "from": "#7F00FF", "to": "#E100FF", "angle": 135 }
|
|
303
|
+
},
|
|
304
|
+
"screenshotPlacement": {
|
|
305
|
+
"placement": "center",
|
|
306
|
+
"shadow": "soft",
|
|
307
|
+
"padding": 80,
|
|
308
|
+
"borderRadius": 12
|
|
309
|
+
},
|
|
310
|
+
"layout": {
|
|
311
|
+
"mode": "text-left",
|
|
312
|
+
"textRatio": 0.38,
|
|
313
|
+
"padding": 6,
|
|
314
|
+
"textGap": 20
|
|
315
|
+
},
|
|
316
|
+
"textElements": [
|
|
317
|
+
{
|
|
318
|
+
"id": "te_1_1",
|
|
319
|
+
"role": "title",
|
|
320
|
+
"content": "Ship faster",
|
|
321
|
+
"fontSize": 48,
|
|
322
|
+
"fontFamily": "Space Grotesk",
|
|
323
|
+
"fontWeight": 800,
|
|
324
|
+
"colorMode": "auto",
|
|
325
|
+
"lineHeight": 1.1,
|
|
326
|
+
"textAlign": "left",
|
|
327
|
+
"translations": { "en": "Ship faster", "fr": "Livrez plus vite" }
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"id": "te_1_2",
|
|
331
|
+
"role": "subtitle",
|
|
332
|
+
"content": "Marketing visuals that update themselves.",
|
|
333
|
+
"fontSize": 22,
|
|
334
|
+
"fontFamily": "Inter",
|
|
335
|
+
"fontWeight": 400,
|
|
336
|
+
"colorMode": "auto",
|
|
337
|
+
"lineHeight": 1.3,
|
|
338
|
+
"textAlign": "left",
|
|
339
|
+
"translations": { "en": "Marketing visuals that update themselves.", "fr": "Des visuels marketing qui se mettent a jour." }
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"logo": {
|
|
343
|
+
"variant": "logo",
|
|
344
|
+
"placement": "above-title",
|
|
345
|
+
"size": 15
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Example 2: App Store with text top
|
|
351
|
+
|
|
352
|
+
```json
|
|
353
|
+
{
|
|
354
|
+
"canvas": {
|
|
355
|
+
"preset": "appstore-6.7",
|
|
356
|
+
"width": 1290,
|
|
357
|
+
"height": 2796,
|
|
358
|
+
"background": { "type": "gradient", "from": "#2193b0", "to": "#6dd5ed", "angle": 180 }
|
|
359
|
+
},
|
|
360
|
+
"screenshotPlacement": {
|
|
361
|
+
"placement": "center",
|
|
362
|
+
"shadow": "floating",
|
|
363
|
+
"padding": 80,
|
|
364
|
+
"borderRadius": 16
|
|
365
|
+
},
|
|
366
|
+
"layout": {
|
|
367
|
+
"mode": "text-top",
|
|
368
|
+
"textRatio": 0.20,
|
|
369
|
+
"padding": 5,
|
|
370
|
+
"textGap": 16
|
|
371
|
+
},
|
|
372
|
+
"textElements": [
|
|
373
|
+
{
|
|
374
|
+
"id": "te_2_1",
|
|
375
|
+
"role": "title",
|
|
376
|
+
"content": "Beautiful Dashboard",
|
|
377
|
+
"fontSize": 56,
|
|
378
|
+
"fontFamily": "DM Sans",
|
|
379
|
+
"fontWeight": 800,
|
|
380
|
+
"colorMode": "auto",
|
|
381
|
+
"lineHeight": 1.1,
|
|
382
|
+
"textAlign": "center"
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Example 3: Minimal screenshot-only with dark theme override
|
|
389
|
+
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"canvas": {
|
|
393
|
+
"preset": "og-image",
|
|
394
|
+
"width": 1200,
|
|
395
|
+
"height": 630,
|
|
396
|
+
"background": { "type": "gradient", "from": "#f8fafc", "to": "#e2e8f0", "angle": 180 }
|
|
397
|
+
},
|
|
398
|
+
"screenshotPlacement": {
|
|
399
|
+
"placement": "center",
|
|
400
|
+
"shadow": "floating",
|
|
401
|
+
"padding": 85,
|
|
402
|
+
"borderRadius": 12
|
|
403
|
+
},
|
|
404
|
+
"themeBackgrounds": {
|
|
405
|
+
"light": { "type": "gradient", "from": "#f8fafc", "to": "#e2e8f0", "angle": 180 },
|
|
406
|
+
"dark": { "type": "gradient", "from": "#0f172a", "to": "#1e293b", "angle": 180 }
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Example 4: Twitter Card with badge + gradient text
|
|
412
|
+
|
|
413
|
+
```json
|
|
414
|
+
{
|
|
415
|
+
"canvas": {
|
|
416
|
+
"preset": "twitter-card",
|
|
417
|
+
"width": 1200,
|
|
418
|
+
"height": 675,
|
|
419
|
+
"background": { "type": "gradient", "from": "#0d1117", "to": "#161b22", "angle": 180 }
|
|
420
|
+
},
|
|
421
|
+
"screenshotPlacement": {
|
|
422
|
+
"placement": "center",
|
|
423
|
+
"shadow": "soft",
|
|
424
|
+
"padding": 75,
|
|
425
|
+
"borderRadius": 12
|
|
426
|
+
},
|
|
427
|
+
"layout": {
|
|
428
|
+
"mode": "text-left",
|
|
429
|
+
"textRatio": 0.35,
|
|
430
|
+
"padding": 6,
|
|
431
|
+
"textGap": 16
|
|
432
|
+
},
|
|
433
|
+
"textElements": [
|
|
434
|
+
{
|
|
435
|
+
"id": "te_4_1",
|
|
436
|
+
"role": "badge",
|
|
437
|
+
"content": "NEW",
|
|
438
|
+
"fontSize": 14,
|
|
439
|
+
"fontFamily": "Inter",
|
|
440
|
+
"fontWeight": 700,
|
|
441
|
+
"colorMode": "auto",
|
|
442
|
+
"textTransform": "uppercase"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"id": "te_4_2",
|
|
446
|
+
"role": "title",
|
|
447
|
+
"content": "Next-gen analytics",
|
|
448
|
+
"fontSize": 36,
|
|
449
|
+
"fontFamily": "Space Grotesk",
|
|
450
|
+
"fontWeight": 800,
|
|
451
|
+
"colorMode": "gradient",
|
|
452
|
+
"gradientFrom": "#667eea",
|
|
453
|
+
"gradientTo": "#764ba2",
|
|
454
|
+
"gradientAngle": 135,
|
|
455
|
+
"lineHeight": 1.1,
|
|
456
|
+
"textAlign": "left"
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Output Format
|
|
465
|
+
|
|
466
|
+
When asked to create a composition, output the raw JSON object (the `CaptureStudioConfig`). Do NOT wrap it in markdown code fences when using the `design_composition` tool — pass it directly as the `config` argument.
|
|
467
|
+
|
|
468
|
+
Include:
|
|
469
|
+
- `canvas` with appropriate preset and background
|
|
470
|
+
- `screenshotPlacement` with shadow and padding
|
|
471
|
+
- `layout` if text is needed
|
|
472
|
+
- `textElements` with proper translations for all preset languages
|
|
473
|
+
- `logo` if the project has brand logos uploaded
|
|
474
|
+
- `themeBackgrounds` if the preset has multiple themes
|
|
475
|
+
|
|
476
|
+
Generate unique IDs for text elements using format: `te_<slot>_<n>` (e.g., `te_0_1`, `te_0_2`).
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Complete Examples Reference
|
|
2
|
+
|
|
3
|
+
Use these examples as structural templates only. Adapt routes, selectors,
|
|
4
|
+
variants, auth handling, and persistence to the user's actual codebase.
|
|
5
|
+
|
|
6
|
+
## Example 1 — Anonymous screenshot preset
|
|
7
|
+
|
|
8
|
+
Good for:
|
|
9
|
+
|
|
10
|
+
- marketing homepage
|
|
11
|
+
- pricing page
|
|
12
|
+
- public docs landing page
|
|
13
|
+
|
|
14
|
+
Pattern:
|
|
15
|
+
|
|
16
|
+
1. `NAVIGATE`
|
|
17
|
+
2. `DISMISS_OVERLAYS`
|
|
18
|
+
3. optional `SET_LOCALE`
|
|
19
|
+
4. optional `SET_THEME`
|
|
20
|
+
5. `WAIT_FOR`
|
|
21
|
+
6. `CAPTURE_SCREENSHOT`
|
|
22
|
+
|
|
23
|
+
## Example 2 — Authenticated screenshot preset
|
|
24
|
+
|
|
25
|
+
Good for:
|
|
26
|
+
|
|
27
|
+
- dashboards
|
|
28
|
+
- settings pages
|
|
29
|
+
- project lists behind auth
|
|
30
|
+
|
|
31
|
+
Pattern:
|
|
32
|
+
|
|
33
|
+
1. hardcode the real login URL
|
|
34
|
+
2. `NAVIGATE` to login
|
|
35
|
+
3. `DISMISS_OVERLAYS`
|
|
36
|
+
4. `WAIT_FOR` login fields
|
|
37
|
+
5. `TYPE` `{{email}}`
|
|
38
|
+
6. `TYPE` `{{password}}`
|
|
39
|
+
7. `CLICK` submit
|
|
40
|
+
8. `WAIT_FOR` the protected surface
|
|
41
|
+
9. capture the full page or an `elementSelector`
|
|
42
|
+
|
|
43
|
+
Never use `{{loginUrl}}`.
|
|
44
|
+
|
|
45
|
+
## Example 3 — Clip preset
|
|
46
|
+
|
|
47
|
+
Good for:
|
|
48
|
+
|
|
49
|
+
- short product walkthroughs
|
|
50
|
+
- showing a lightweight interaction
|
|
51
|
+
- demo GIFs / MP4s
|
|
52
|
+
|
|
53
|
+
Pattern:
|
|
54
|
+
|
|
55
|
+
1. perform setup before recording
|
|
56
|
+
2. `BEGIN_CLIP`
|
|
57
|
+
3. run only the user-visible interaction sequence
|
|
58
|
+
4. `END_CLIP`
|
|
59
|
+
|
|
60
|
+
Prefer short, deterministic flows.
|
|
61
|
+
|
|
62
|
+
## Example 4 — Interactive demo preset
|
|
63
|
+
|
|
64
|
+
Good for:
|
|
65
|
+
|
|
66
|
+
- embeddable product demos
|
|
67
|
+
- focused feature loops
|
|
68
|
+
- local UI swaps and fragment-driven demos
|
|
69
|
+
|
|
70
|
+
Pattern:
|
|
71
|
+
|
|
72
|
+
1. `mediaMode: "dom"`
|
|
73
|
+
2. capture a small number of base states with `CAPTURE_DOM`
|
|
74
|
+
3. capture overlays/local subtrees with `CAPTURE_FRAGMENT`
|
|
75
|
+
4. wire `interactiveDemo.script`
|
|
76
|
+
5. use fragments, model bindings, and small `code` blocks for reconstruction
|
|
77
|
+
|
|
78
|
+
## Example 5 — Mock data preset
|
|
79
|
+
|
|
80
|
+
Good for:
|
|
81
|
+
|
|
82
|
+
- empty dashboards
|
|
83
|
+
- empty card grids
|
|
84
|
+
- empty tables
|
|
85
|
+
- charts that need seeded values for a compelling screenshot
|
|
86
|
+
|
|
87
|
+
Pattern:
|
|
88
|
+
|
|
89
|
+
1. add `data-ak` markers to the template and every variable child
|
|
90
|
+
2. add hidden trigger/input receivers when the app can re-render the widget
|
|
91
|
+
3. declare `mockDataInjection.groups`
|
|
92
|
+
4. emit `INJECT_MOCK_DATA` before the screenshot
|
|
93
|
+
|
|
94
|
+
## Final reminder
|
|
95
|
+
|
|
96
|
+
These examples are reference shapes, not recipes to copy blindly.
|
|
97
|
+
|
|
98
|
+
Before using one:
|
|
99
|
+
|
|
100
|
+
- inspect the codebase
|
|
101
|
+
- verify auth requirements
|
|
102
|
+
- verify locale/theme handling
|
|
103
|
+
- add authored selectors
|
|
104
|
+
- persist the preset via API so the user can run `autokap run <preset-id>`
|