@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0
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/.agents/plugins/marketplace.json +1 -1
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +15 -4
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/README.md +185 -328
- package/SECURITY.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/bin/pixelcraft.mjs +431 -23
- package/docs/ARCHITECTURE.md +40 -37
- package/docs/DESIGN-RATIONALE.md +51 -3
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +16 -6
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/pixelcraft-accessibility.md +17 -0
- package/evals/pixelcraft-craft.md +16 -0
- package/evals/pixelcraft-dataviz.md +3 -3
- package/evals/pixelcraft-direction.md +17 -0
- package/evals/pixelcraft-game-ui.md +3 -3
- package/evals/pixelcraft-mobile.md +3 -3
- package/evals/pixelcraft-patterns.md +16 -0
- package/evals/pixelcraft-plan.md +65 -3
- package/evals/pixelcraft-review.md +3 -3
- package/evals/pixelcraft-visual-qa.md +11 -5
- package/evals/pixelcraft-web.md +21 -3
- package/evals/pixelcraft.md +4 -4
- package/gemini-extension.json +3 -2
- package/install.ps1 +57 -11
- package/install.sh +82 -7
- package/package.json +32 -4
- package/plugin.json +6 -1
- package/scripts/build-adapters.mjs +11 -13
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +14 -1
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +86 -7
- package/scripts/test-export-tokens.mjs +259 -3
- package/scripts/test-finish-gate.mjs +133 -10
- package/scripts/test-installers.mjs +155 -6
- package/scripts/test-shoot.mjs +23 -1
- package/scripts/test-slop-scan.mjs +390 -3
- package/scripts/test-style-inventory.mjs +23 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +82 -4
- package/scripts/validate-skills.mjs +149 -3
- package/skills/pixelcraft/SKILL.md +67 -47
- package/skills/pixelcraft/references/design-brief.md +2 -2
- package/skills/pixelcraft/references/floor.md +36 -19
- package/skills/pixelcraft/references/report-template.md +25 -11
- package/skills/pixelcraft/references/stack-detection.md +138 -67
- package/skills/pixelcraft/references/surface-acceptance.md +33 -21
- package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
- package/skills/pixelcraft-accessibility/SKILL.md +34 -13
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
- package/skills/pixelcraft-accessibility/references/verification.md +15 -10
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
- package/skills/pixelcraft-brandkit/SKILL.md +42 -30
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
- package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
- package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
- package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
- package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
- package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
- package/skills/pixelcraft-constrained/SKILL.md +21 -20
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
- package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
- package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
- package/skills/pixelcraft-craft/SKILL.md +29 -15
- package/skills/pixelcraft-craft/references/color.md +62 -6
- package/skills/pixelcraft-craft/references/layout.md +32 -0
- package/skills/pixelcraft-craft/references/motion.md +99 -12
- package/skills/pixelcraft-craft/references/typography.md +48 -9
- package/skills/pixelcraft-data-apps/SKILL.md +50 -31
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +87 -31
- package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
- package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
- package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
- package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
- package/skills/pixelcraft-data-apps/references/panel.md +69 -23
- package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
- package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
- package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
- package/skills/pixelcraft-dataviz/SKILL.md +21 -24
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
- package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
- package/skills/pixelcraft-desktop/SKILL.md +61 -39
- package/skills/pixelcraft-desktop/references/appkit.md +60 -26
- package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
- package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
- package/skills/pixelcraft-desktop/references/electron.md +68 -26
- package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
- package/skills/pixelcraft-desktop/references/gtk.md +74 -31
- package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
- package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
- package/skills/pixelcraft-desktop/references/tauri.md +80 -24
- package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
- package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
- package/skills/pixelcraft-desktop/references/working-context.md +82 -3
- package/skills/pixelcraft-direction/SKILL.md +48 -82
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +11 -1
- package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +3 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
- package/skills/pixelcraft-document/SKILL.md +27 -23
- package/skills/pixelcraft-document/references/archetypes.md +27 -4
- package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +96 -43
- package/skills/pixelcraft-document/references/slides.md +123 -27
- package/skills/pixelcraft-email/SKILL.md +42 -20
- package/skills/pixelcraft-email/references/client-quirks.md +101 -33
- package/skills/pixelcraft-email/references/html-tables.md +83 -22
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +13 -11
- package/skills/pixelcraft-email/references/react-email.md +76 -34
- package/skills/pixelcraft-extensions/SKILL.md +32 -27
- package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
- package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +90 -11
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
- package/skills/pixelcraft-game-ui/SKILL.md +45 -26
- package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
- package/skills/pixelcraft-game-ui/references/godot.md +100 -27
- package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
- package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
- package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +14 -13
- package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +20 -23
- package/skills/pixelcraft-media/references/banners-video.md +83 -65
- package/skills/pixelcraft-media/references/og-generation.md +110 -63
- package/skills/pixelcraft-media/references/social-cards.md +57 -58
- package/skills/pixelcraft-mobile/SKILL.md +53 -36
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
- package/skills/pixelcraft-mobile/references/flet.md +53 -26
- package/skills/pixelcraft-mobile/references/flutter.md +76 -32
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
- package/skills/pixelcraft-mobile/references/kivy.md +54 -31
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
- package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
- package/skills/pixelcraft-mobile/references/uikit.md +57 -23
- package/skills/pixelcraft-patterns/SKILL.md +30 -13
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +35 -16
- package/skills/pixelcraft-patterns/references/communication.md +34 -15
- package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +31 -19
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/settings.md +40 -12
- package/skills/pixelcraft-plan/SKILL.md +54 -18
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +44 -9
- package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
- package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
- package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
- package/skills/pixelcraft-review/SKILL.md +41 -19
- package/skills/pixelcraft-review/references/audit-report.md +20 -1
- package/skills/pixelcraft-review/references/heuristics.md +63 -18
- package/skills/pixelcraft-review/references/personas.md +41 -14
- package/skills/pixelcraft-review/references/polish.md +66 -26
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
- package/skills/pixelcraft-spatial/SKILL.md +16 -17
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
- package/skills/pixelcraft-spatial/references/platforms.md +123 -53
- package/skills/pixelcraft-tokens/SKILL.md +18 -14
- package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
- package/skills/pixelcraft-tokens/references/format.md +39 -9
- package/skills/pixelcraft-tokens/references/governance.md +1 -1
- package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
- package/skills/pixelcraft-tui/SKILL.md +41 -25
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +77 -28
- package/skills/pixelcraft-tui/references/ratatui.md +70 -30
- package/skills/pixelcraft-tui/references/rich.md +53 -33
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +75 -34
- package/skills/pixelcraft-ux/SKILL.md +22 -12
- package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
- package/skills/pixelcraft-ux/references/forms.md +57 -3
- package/skills/pixelcraft-ux/references/i18n.md +50 -12
- package/skills/pixelcraft-ux/references/laws.md +35 -14
- package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
- package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
- package/skills/pixelcraft-web/SKILL.md +105 -49
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
- package/skills/pixelcraft-web/references/angular.md +63 -16
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +64 -13
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +52 -17
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +144 -12
- package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +27 -18
- package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
- package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
- package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +6 -1
- package/skills/pixelcraft-web/references/qwik.md +51 -11
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +112 -13
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +106 -63
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +67 -16
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -11
- package/skills/pixelcraft-web/references/tailwind.md +40 -14
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -1,46 +1,73 @@
|
|
|
1
|
-
# Unreal UMG
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
# Unreal UMG, CommonUI, MVVM, and Slate
|
|
2
|
+
|
|
3
|
+
## Production architecture: CommonUI + UMG ViewModel (MVVM)
|
|
4
|
+
|
|
5
|
+
For any shipping PC/console/cross-platform Unreal game, pair **UMG** with the official **CommonUI** and **UMG ViewModel (`MVVM`)** plugins rather than raw `AddToViewport()` and per-frame Blueprint property bindings:
|
|
6
|
+
|
|
7
|
+
### CommonUI idioms
|
|
8
|
+
|
|
9
|
+
- **`UCommonActivatableWidget`**: base class for every screen, HUD overlay, and modal dialog. Manages explicit `NativeOnActivated()` / `NativeOnDeactivated()` lifecycle, input config (`GetDesiredInputConfig()`), and back-action handling.
|
|
10
|
+
- **`UCommonActivatableWidgetStack`**: manages layered UI stacks (HUD layer, Menu layer, Modal layer, System Prompt layer) with automatic focus handoff and back-button popping—never scatter `AddToViewport(ZOrder)` calls across Blueprints.
|
|
11
|
+
- **`NativeGetDesiredFocusTarget()`**: override on every `UCommonActivatableWidget` so opening or returning to a screen places controller/keyboard focus on a guaranteed valid widget instead of dropping focus to the viewport.
|
|
12
|
+
- **`UCommonInputSubsystem` & `UCommonActionWidget`**: automatically detects input method switches (`ECommonInputType::Gamepad`, `MouseAndKeyboard`, `Touch`) and swaps button prompt glyphs dynamically from `UCommonInputBaseControllerData` data tables (Xbox, PlayStation, Switch, Steam Deck, KBM) without hard-coded icon branches.
|
|
13
|
+
|
|
14
|
+
```cpp
|
|
15
|
+
// Header / implementation excerpt for a CommonUI menu screen
|
|
16
|
+
UWidget* USettingsScreen::NativeGetDesiredFocusTarget() const
|
|
17
|
+
{
|
|
18
|
+
if (PrimaryAudioSlider && PrimaryAudioSlider->IsVisible())
|
|
19
|
+
{
|
|
20
|
+
return PrimaryAudioSlider;
|
|
21
|
+
}
|
|
22
|
+
return Super::NativeGetDesiredFocusTarget();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
TOptional<FUIInputConfig> USettingsScreen::GetDesiredInputConfig() const
|
|
26
|
+
{
|
|
27
|
+
return FUIInputConfig(ECommonInputMode::Menu, EMouseCaptureMode::NoCapture);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
10
30
|
|
|
11
|
-
|
|
31
|
+
### UMG ViewModel (`MVVM`) plugin
|
|
12
32
|
|
|
13
|
-
|
|
33
|
+
- Replace Blueprint **tick-bound property functions** (which execute every Slate frame regardless of whether data changed!) with push-based **`UMVVMViewModelBase`** subclasses using `UPROPERTY(FieldNotify)` and `UE_MVVM_SET_PROPERTY_VALUE(Health, NewHealth)`.
|
|
34
|
+
- Keep gameplay actors decoupled from widgets: widgets subscribe to ViewModel field notifications, preventing circular hard references and per-frame UI CPU spikes.
|
|
14
35
|
|
|
15
|
-
|
|
36
|
+
### Enhanced Input UI routing
|
|
16
37
|
|
|
17
|
-
|
|
38
|
+
- Pair **Enhanced Input** (`UInputMappingContext` priority stacking) with CommonUI's `FUIInputConfig` (`ECommonInputMode::Game`, `Menu`, `All`) so opening a pause menu or radial wheel never leaks weapon firing/movement into gameplay or traps `Cancel`/`Back`.
|
|
18
39
|
|
|
19
|
-
##
|
|
40
|
+
## Slate (`SCompoundWidget` / `FSlateStyleSet`) vs UMG boundary
|
|
20
41
|
|
|
21
|
-
Use
|
|
42
|
+
| Use **UMG + CommonUI + MVVM** | Drop to **C++ Slate (`SCompoundWidget`, `FSlateStyleSet`)** |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Runtime game HUDs, menus, inventories, and artist-authored animations/layouts | Unreal Editor tools, custom debug inspectors, and viewport overlays |
|
|
45
|
+
| CommonUI style assets (`UCommonTextStyle`, `UCommonButtonStyle`, `UCommonBorderStyle`) | Pre-world loading screens (`IGameMoviePlayer`), ultra-hot custom `OnPaint` batching, or custom widgets wrapped by a `UWidget` host |
|
|
22
46
|
|
|
23
|
-
##
|
|
47
|
+
## Batching and performance (`InvalidationBox`, `RetainerBox`)
|
|
24
48
|
|
|
25
|
-
|
|
49
|
+
- **`UInvalidationBox`** (or project-wide Global Invalidation): caches Slate layout/geometry for static or rarely mutated subtrees so unchanging HUD frames skip per-frame pre-pass and paint.
|
|
50
|
+
- **`URetainerBox`**: renders a widget subtree into an offscreen render target for custom UI post-process materials (chromatic aberration, curved visor) or throttled refresh cadence (`Phase` / `PhaseCount`, e.g., updating a minimap every 2–4 frames). Profile VRAM and draw-call overhead—never wrap every panel in a `RetainerBox`.
|
|
26
51
|
|
|
27
|
-
##
|
|
52
|
+
## Layout, typography, accessibility, and states
|
|
28
53
|
|
|
29
|
-
|
|
54
|
+
- Use `SafeZone`, `Overlay`, `VerticalBox`, `HorizontalBox`, `GridPanel`, `SizeBox`, and `ScaleBox` deliberately; never anchor entire HUDs strictly inside `CanvasPanel` with fixed pixel offsets that break on 21:9/32:9 or handheld screens.
|
|
55
|
+
- Configure Composite Font assets with explicit script sub-fonts for CJK, Arabic, Thai, and Cyrillic; test DPI curve scaling, subtitle size/backdrop options, colorblind shaders/palettes, reduced-motion/flash settings, and virtual keyboard / platform auth flows.
|
|
56
|
+
- Model input-mode and interruption transitions (loading, disconnect, controller disconnect, death/respawn, cutscene, pending purchase) as explicit UI states.
|
|
30
57
|
|
|
31
58
|
## Do/don't pairs
|
|
32
59
|
|
|
33
60
|
| Do | Don't |
|
|
34
61
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
62
|
+
| Push screens onto `UCommonActivatableWidgetStack` and override `NativeGetDesiredFocusTarget()` | Scatter `AddToViewport()` calls and lose controller focus when closing modals |
|
|
63
|
+
| Use `UMVVMViewModelBase` (`FieldNotify`) push bindings | Bind Blueprint functions directly to widget text/progress properties evaluated every tick |
|
|
64
|
+
| Use `UCommonActionWidget` + `UCommonInputSubsystem` for live device glyph swapping | Hard-code `"Press [E]"` or Xbox-only textures across PC/PlayStation/Switch builds |
|
|
65
|
+
| Centralize tokens in `UCommonTextStyle` / `UCommonButtonStyle` / `FSlateStyleSet` | Copy raw colors and font settings across every individual Widget Blueprint |
|
|
66
|
+
| Wrap static subtrees in `InvalidationBox` and reserve `RetainerBox` for measured shader/throttle needs | Put every HUD widget inside a `RetainerBox`, blowing mobile/console VRAM |
|
|
40
67
|
|
|
41
68
|
## Known traps
|
|
42
69
|
|
|
43
|
-
Blueprint
|
|
70
|
+
Tick-bound Blueprint property bindings burning frame budget, `AddToViewport` Z-order/focus leaks without CommonUI stacks, input-mode mismatches trapping controller input or leaking gameplay actions, hard asset references loaded synchronously by HUD widgets, missing localized Composite Font sub-fonts, and PIE 16:9 testing hiding SafeZone/ultrawide clipping.
|
|
44
71
|
|
|
45
72
|
## Verification commands
|
|
46
73
|
|
|
@@ -50,4 +77,4 @@ Run the project's Unreal Automation / UAT build command against the repo `.uproj
|
|
|
50
77
|
RunUAT BuildCookRun -project="<PathToProject>.uproject" -build -unattended
|
|
51
78
|
```
|
|
52
79
|
|
|
53
|
-
|
|
80
|
+
Profile Slate/UMG with `stat Slate`, Widget Reflector, and Unreal Insights (`rendered`); test controller-only focus flows, device hot-swap glyphs, resolution/aspect/SafeZone matrix, pseudo-localized fonts, and interruption states on target platforms (`rendered`, labeling untested certification items `not-checked`).
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Web game engines, AAA/native UI middleware, and indie engines
|
|
2
|
+
|
|
3
|
+
Use this reference when game UI runs in HTML5/web engines, cross-engine native UI middleware, or C/C++/Lua/TypeScript indie engines. Pair with `references/hud-principles.md` for HUD legibility, controller focus, safe areas, HDR/ultrawide clamps, and accessibility floors.
|
|
4
|
+
|
|
5
|
+
## 1. HTML5 and Web Game Engines
|
|
6
|
+
|
|
7
|
+
| Engine | Primary UI idiom | Critical rules & accessibility notes |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Phaser (3 / 4)** | Parallel `HUDScene` (`scene.launch('HUDScene')`), `DOMElement` (`this.add.dom(...)`), or **RexUI** (`rexUI.add.sizer`, scrollable panels, dialogs) | Enable `dom: { createContainer: true }` in `Phaser.Game` config for accessible HTML forms/menus synced to the game viewport; set `pointer-events: none` on the overlay container and `pointer-events: auto` on interactive controls so canvas input stays intact. Keep `HUDScene` fixed with `setScrollFactor(0)` and handle `scale.on('resize')`. |
|
|
10
|
+
| **PixiJS (v8 + `@pixi/ui`)** | `@pixi/ui` (`FancyButton`, `Slider`, `ScrollBox`, `Input`, `List`) + `@pixi/layout` (Yoga Flexbox) or semantic HTML HUD overlay | Canvas-drawn widgets lack screen-reader semantics unless wired via PixiJS's `accessibility` plugin (`accessible`, `accessibleTitle`, `accessibleType`) or paired with an HTML/ARIA HUD layer. Size canvas cleanly with `autoDensity: true, resolution: window.devicePixelRatio`. |
|
|
11
|
+
| **Excalibur** | Semantic HTML/CSS HUD overlay bound to engine events; `ScreenElement` for in-canvas markers | Excalibur's own docs favor real HTML/CSS overlays for menus, inventories, forms, and localization so keyboard focus, RTL, screen readers, and responsive text work natively instead of fighting `<canvas>`. |
|
|
12
|
+
| **Kaplay** (Kaboom.js successor) | Fixed screen-space objects (`fixed()`, `z(100)`, `anchor(...)`, `area()`) + explicit scenes (`go('pause')`) | Kaplay has no built-in focus manager—implement explicit keyboard/gamepad selection state (`onKeyPress`, `onGamepadButtonPress`) and recompute UI anchors on `onResize(...)`. |
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
// Phaser 3/4: parallel HUDScene + accessible DOM overlay pattern
|
|
16
|
+
export class HudScene extends Phaser.Scene {
|
|
17
|
+
constructor() { super({ key: 'HudScene' }); }
|
|
18
|
+
|
|
19
|
+
create() {
|
|
20
|
+
const score = this.add.text(24, 20, 'SCORE 0', { fontFamily: 'Inter', fontSize: '24px', color: '#f8fafc' })
|
|
21
|
+
.setScrollFactor(0)
|
|
22
|
+
.setDepth(100);
|
|
23
|
+
|
|
24
|
+
// Accessible HTML pause button/form over the WebGL canvas
|
|
25
|
+
const pauseEl = this.add.dom(this.scale.width - 24, 24).createFromHTML(
|
|
26
|
+
'<button type="button" aria-label="Pause game" style="padding:8px 14px;">Pause</button>',
|
|
27
|
+
);
|
|
28
|
+
pauseEl.setOrigin(1, 0);
|
|
29
|
+
pauseEl.addListener('click').on('click', () => this.scene.launch('PauseScene'));
|
|
30
|
+
|
|
31
|
+
this.scale.on('resize', (gameSize: Phaser.Structs.Size) => {
|
|
32
|
+
pauseEl.setPosition(gameSize.width - 24, 24);
|
|
33
|
+
score.setPosition(24, 20);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 2. AAA and Native UI Middleware
|
|
40
|
+
|
|
41
|
+
| Middleware | Authoring model | Best for | Key constraints |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| **NoesisGUI** | Hardware-accelerated **XAML / MVVM** (C++ / C#; plugins for Unity, Unreal, custom engines) | AAA/AA cross-platform HUDs & menus with crisp GPU vector rendering, Blend designer workflow, resource dictionaries, and low memory | Keep ViewModels push-driven (`INotifyPropertyChanged`), load localized `ResourceDictionary` files per language, and profile vector tessellation on large animated paths |
|
|
44
|
+
| **RmlUi** | Open-source C++ **HTML/CSS (`RML`/`RCSS`)** with Flexbox & `DataModelConstructor` binding | Custom C++ engines (SDL, bgfx, Vulkan, DX12, OpenGL) wanting web-like layout without a browser process | RCSS is a curated CSS subset—do not assume arbitrary browser CSS; wire custom font-face loading (`Rml::LoadFontFace`) for CJK/Arabic and explicit gamepad focus navigation |
|
|
45
|
+
| **Coherent Gameface** | Commercial AAA **HTML5 / CSS / JS** game UI runtime (PC/console) | Studios building live-service HUDs/stores with web frontend teams at 60–120 fps | Supports a performance-hardened subset of CSS/DOM; avoid layout-thrashing DOM reads/writes per frame, pool lists to eliminate JS GC pauses, and split lightweight HUD views from heavy store/inventory views |
|
|
46
|
+
| **Dear ImGui** | Immediate-mode C++ UI (`ImGui::Begin`, docking, viewports) | In-game debug consoles, engine tools, and high-density simulation/strategy inspector HUDs | Enable `ImGuiConfigFlags_NavEnableKeyboard` + `ImGuiConfigFlags_NavEnableGamepad`, scale fonts and style (`ImGuiStyle::ScaleAllSizes`) for HiDPI/4K, and note lack of native OS screen-reader tree unless integrated with custom accessibility bridges |
|
|
47
|
+
|
|
48
|
+
```cpp
|
|
49
|
+
// RmlUi C++: bind reactive game state cleanly via DataModelConstructor (zero per-frame string DOM churn)
|
|
50
|
+
if (Rml::DataModelConstructor ctor = context->CreateDataModel("hud")) {
|
|
51
|
+
ctor.Bind("health", &playerState.health);
|
|
52
|
+
ctor.Bind("ammo", &playerState.ammo);
|
|
53
|
+
ctor.BindEventCallback("on_resume", [&](Rml::DataModelHandle, Rml::Event&, const Rml::VariantList&) {
|
|
54
|
+
game.Resume();
|
|
55
|
+
});
|
|
56
|
+
hudModelHandle = ctor.GetModelHandle();
|
|
57
|
+
}
|
|
58
|
+
// When health changes: hudModelHandle.DirtyVariable("health");
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 3. Native and Indie Engines
|
|
62
|
+
|
|
63
|
+
- **Raylib + `raygui`** (C/C++/multi-language):
|
|
64
|
+
- Pass `FLAG_WINDOW_HIGHDPI | FLAG_WINDOW_RESIZABLE` before `InitWindow`, scale layouts from `GetScreenWidth()`/`GetScreenHeight()`, load theme styles with `GuiLoadStyle(...)`, and load non-ASCII localization codepoints explicitly via `LoadFontEx(path, size, codepoints, count)` (default Raylib fonts load ASCII only!). Wire manual keyboard/gamepad focus indices since `raygui` is pointer-first.
|
|
65
|
+
- **SDL3 + `SDL_ttf` v3** (C/C++):
|
|
66
|
+
- Use `SDL_GetWindowDisplayScale(window)` and `SDL_GetDisplayUsableBounds(...)` for crisp HiDPI and safe-area sizing across macOS/Windows/Linux/mobile.
|
|
67
|
+
- Use **`SDL_ttf` v3** (`TTF_CreateText`, `TTF_CreateRendererTextEngine` / `TTF_CreateGPUTextEngine`) with built-in HarfBuzz shaping for accurate **Arabic/RTL, Indic, and CJK** rendering and text wrapping.
|
|
68
|
+
- Detect exact controller glyphs via **`SDL_GetGamepadType(gamepad)`** (`SDL_GAMEPAD_TYPE_PS5`, `XBOXONE`, `NINTENDO_SWITCH_PRO`, etc.) so button prompts match physical hardware automatically.
|
|
69
|
+
- **Defold** (Lua `.gui` / `.gui_script`):
|
|
70
|
+
- Set each GUI node's **Adjust Mode** deliberately (`FIT` for HUD elements preserving aspect ratio, `ZOOM` for full-bleed backdrops, `STRETCH` rarely), author responsive **Layout Profiles** (Landscape / Portrait) in `.gui`, use slice-9 textures for scalable frames, watch dynamic font-atlas page limits for CJK, and manage `acquire_input_focus` / `release_input_focus` explicitly so modal popups consume input before gameplay scripts.
|
|
71
|
+
- **Cocos Creator** (TypeScript):
|
|
72
|
+
- Anchor responsive HUD modules with **`Widget`** + **`Layout`** containers, attach **`SafeArea`** to the top-level HUD node for mobile/WeChat mini-game cutouts, tune `Label` **`CacheMode`** (`NONE` for rarely updated dynamic strings, `BITMAP` for static labels, `CHAR` for dense CJK text sharing a global glyph atlas to control VRAM), and verify `Button` focus/keyboard handling when targeting web or desktop.
|
|
73
|
+
- **Ebitengine** (Go 2D + **`ebitenui`**):
|
|
74
|
+
- Build menus, HUD panels, and lists with **`ebitenui`** (`widget.Container`, `widget.RowLayout`/`GridLayout`, `widget.Button`, `widget.List`) rather than raw `ebitenutil.DebugPrint` or manual rectangle hit-testing.
|
|
75
|
+
- Scale crisp HiDPI interfaces using `ebiten.Monitor().DeviceScaleFactor()` inside `LayoutF(outsideWidth, outsideHeight)`, render localized scripts with `text/v2` (`GoTextFaceSource` + fallback faces for CJK/RTL), and track keyboard/gamepad focus explicitly because `ebitenui` is pointer-first.
|
|
76
|
+
- **Macroquad** (Rust 2D lightweight UI):
|
|
77
|
+
- Switch back to screen-space HUD coordinates with `set_default_camera()`, read `screen_width()`/`screen_height()` and `screen_dpi_scale()`, and build menus/inspectors with `macroquad::ui` (`root_ui()` skins) or `egui-macroquad` instead of hand-rolled `draw_rectangle`/`draw_text` layout math. Load explicit TTF fonts (`load_ttf_font`) and wire keyboard/gamepad selection indices cleanly.
|
|
78
|
+
- **Flame** (Flutter / Dart 2D overlays):
|
|
79
|
+
- Keep menus, pause dialogs, inventories, HUD bars, and settings in **real Flutter widgets** mounted via **`GameWidget.overlayBuilderMap`** (`game.overlays.add('PauseMenu')` / `remove(...)`)—this gives TalkBack/VoiceOver semantics, Dynamic Type/`sp` scaling, RTL/localization, `SafeArea`, and keyboard/gamepad `FocusTraversalGroup` automatically. Reserve Flame canvas `PositionComponent`s strictly for diegetic world-space markers.
|
|
80
|
+
- **Pygame (`pygame-ce`) & Python Arcade**:
|
|
81
|
+
- **Pygame**: avoid raw `pygame.draw.rect` + `font.render` layout loops for structured menus—use **`pygame_gui`** (`UIManager`, JSON theme tokens, relative `anchors`, `process_events`/`update`/`draw_ui`, `set_window_resolution` on `VIDEORESIZE`) or `pygame-menu`, compute safe-area margins against logical display size, and wire explicit `JOYHATMOTION`/`JOYBUTTONDOWN` focus navigation.
|
|
82
|
+
- **Arcade**: use `arcade.gui.UIManager` with `UIAnchorLayout` / `UIBoxLayout` / `UIGridLayout` on a dedicated GUI `Camera2D` separate from the gameplay camera, and call `manager.enable()` / `manager.disable()` cleanly on `arcade.View` transitions so inactive menus never swallow gameplay input.
|
|
83
|
+
|
|
84
|
+
```c
|
|
85
|
+
// SDL3: scale HUD by HiDPI display factor and resolve physical gamepad glyph family
|
|
86
|
+
float scale = SDL_GetWindowDisplayScale(window);
|
|
87
|
+
SDL_GamepadType padType = SDL_GetGamepadType(gamepad);
|
|
88
|
+
const char *glyphSet =
|
|
89
|
+
(padType == SDL_GAMEPAD_TYPE_PS5 || padType == SDL_GAMEPAD_TYPE_PS4) ? "playstation" :
|
|
90
|
+
(padType == SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO) ? "nintendo" : "xbox";
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```dart
|
|
94
|
+
// Flame (Flutter/Dart): bridge accessible native Flutter widgets over the game loop
|
|
95
|
+
GameWidget<MyGame>(
|
|
96
|
+
game: game,
|
|
97
|
+
overlayBuilderMap: {
|
|
98
|
+
'PauseMenu': (context, game) => SafeArea(
|
|
99
|
+
child: Center(
|
|
100
|
+
child: FocusTraversalGroup(
|
|
101
|
+
child: PauseMenuCard(onResume: () => game.overlays.remove('PauseMenu')),
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
},
|
|
106
|
+
);
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Do/don't pairs
|
|
110
|
+
|
|
111
|
+
| Do | Don't |
|
|
112
|
+
|---|---|
|
|
113
|
+
| Pair HTML5 canvas engines (Phaser/PixiJS/Excalibur) with accessible HTML/DOM menus or explicit ARIA/accessibility bindings | Trap complex forms, settings, and screen-reader users inside an opaque `<canvas>` |
|
|
114
|
+
| Render Flame menus/HUDs as native Flutter widgets via `overlayBuilderMap` (`SafeArea` + semantics) | Hand-draw text menus onto Flame's canvas and lose VoiceOver/TalkBack, RTL, and text scaling |
|
|
115
|
+
| Use `ebitenui` (Go), `macroquad::ui`/`egui-macroquad` (Rust), and `pygame_gui`/`arcade.gui` (Python) | Hand-roll brittle `drawRect`/`fillText`/`pygame.draw.rect` layout and hit-test engines |
|
|
116
|
+
| Use data-bound MVVM/data-model updates in NoesisGUI, RmlUi, and Gameface | Rebuild entire XAML/RML/DOM subtrees or allocate JS objects every frame |
|
|
117
|
+
| Enable `NavEnableGamepad` + HiDPI `ScaleAllSizes` in Dear ImGui, and load non-ASCII codepoints in Raylib / HarfBuzz text engines in SDL3 `SDL_ttf` v3 | Assume ASCII-only bitmap fonts or 1× desktop mouse scaling work across locales and 4K/handhelds |
|
|
118
|
+
| Manage `Adjust Mode` + `acquire_input_focus` stacks in Defold and `SafeArea` + `Label` `CacheMode` in Cocos Creator | Let modal popups leak clicks to gameplay or blow mobile texture memory with uncached CJK labels |
|
|
119
|
+
|
|
120
|
+
## Verification commands
|
|
121
|
+
|
|
122
|
+
Run the project's native build/test command without suppressing errors (`npm run build` for Phaser/PixiJS/Excalibur/Kaplay/Cocos, `cmake --build build && ctest --test-dir build` for C++ RmlUi/SDL3/Raylib/ImGui, `go test ./...` for Ebitengine, `cargo test` for Macroquad, `flutter test` for Flame, `pytest` for Pygame/Arcade, or `bob` for Defold). Verify HiDPI scaling, ultrawide/mobile safe areas, controller-only menu navigation, device glyph detection, localized CJK/RTL glyph rendering, and frame-time impact during active play (`rendered`; label untested assistive-tech adapters `not-checked`).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-handoff
|
|
3
|
-
description: Translates approved designs, Figma
|
|
3
|
+
description: Translates approved designs, Figma MCP context, Code Connect bindings, Dev Mode specs, Penpot files, screenshots, mockups, and motion handoff prototypes into faithful implementation without losing existing architecture. Use for design-to-code translation, variable-to-token mapping, existing-component reuse, missing-state resolution, cross-stack implementation, ambiguity handling, and visual-fidelity checking with pixelcraft-visual-qa.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -14,7 +14,8 @@ Design handoff is translation under uncertainty, not screenshot copying. Visual
|
|
|
14
14
|
|
|
15
15
|
## References
|
|
16
16
|
|
|
17
|
-
- Read [references/design-translation.md](references/design-translation.md) for the translation contract, evidence hierarchy, component reuse, token mapping, stack-specific translation, missing states,
|
|
17
|
+
- Read [references/design-translation.md](references/design-translation.md) for the translation contract, evidence hierarchy, component reuse, token mapping, stack-specific translation, missing states, `< 10m` clean-clone setup, license/account ownership handoff, and the visual-qa fidelity loop.
|
|
18
|
+
- Read [references/motion-handoff.md](references/motion-handoff.md) when a design/prototype includes triggers, timing, easing, stagger, interruption, focus, or reduced-motion behavior.
|
|
18
19
|
- Read [references/fidelity-tolerance.md](references/fidelity-tolerance.md) before declaring acceptance tolerance, freezing fixtures, or interpreting visual diffs.
|
|
19
20
|
|
|
20
21
|
## Required workflow
|
|
@@ -22,28 +23,28 @@ Design handoff is translation under uncertainty, not screenshot copying. Visual
|
|
|
22
23
|
1. **Establish the contract.** Record provenance/version/frame or asset, approval state, target stack, breakpoint/mode/locale/input, exact scope, deterministic fixture requirements, and region-aware acceptance tolerance.
|
|
23
24
|
2. **Inspect implementation first.** Inventory existing components/tokens/routes/state/data ownership. Reuse is the default; divergence from architecture must be justified.
|
|
24
25
|
3. **Gather structured evidence.** Prefer semantic variables, component metadata, variants, constraints, comments, and production mappings over screenshot inference; use screenshots as visual evidence rather than sole truth.
|
|
25
|
-
4. **Map before generating.** Match elements to existing components, variables, assets, and platform primitives. Resolve missing hover/focus/disabled/loading/empty/error/overflow/localization states or label them assumptions.
|
|
26
|
-
5. **Translate idiomatically.** Map design variables into semantic project tokens through `pixelcraft-tokens`; implement in the actual target stack rather than copying generated markup or absolute geometry.
|
|
27
|
-
6. **Verify fidelity.** Hand off rendered evidence to `pixelcraft-visual-qa` for screenshot/crop/overlay/diff comparison within
|
|
26
|
+
4. **Map before generating.** Match elements to existing components, variables, assets, and platform primitives. Resolve missing hover/focus/disabled/loading/empty/error/overflow/localization/`IME` states or label them assumptions.
|
|
27
|
+
5. **Translate idiomatically.** Map design variables into semantic project tokens through `pixelcraft-tokens`; implement in the actual target stack with stack-native isolated state previews (`#Preview`, `@Preview`, Widgetbook, QML/TUI fixtures, or component stories) rather than copying generated markup or absolute geometry.
|
|
28
|
+
6. **Verify fidelity & commercial handoff readiness.** Hand off rendered evidence to `pixelcraft-visual-qa` for screenshot/crop/overlay/diff comparison within declared tolerance; verify `< 10m` clean-clone setup, commercial asset license manifest, owner-level account/key boundaries, and post-launch regression baselines.
|
|
28
29
|
|
|
29
30
|
## Non-negotiable rules
|
|
30
31
|
|
|
31
32
|
| Concern | Rule |
|
|
32
33
|
|---|---|
|
|
33
34
|
| evidence hierarchy | existing production behavior + semantic design metadata outrank generated code guesses; screenshots outrank nothing by themselves. |
|
|
34
|
-
| reuse | do not duplicate an existing component because
|
|
35
|
+
| reuse | do not duplicate an existing component because a design tool emitted literal markup. |
|
|
35
36
|
| architecture | preserve framework conventions, state ownership, accessibility semantics, routing, data loading, and localization. |
|
|
36
37
|
| ambiguity | unknown interaction/state/token meaning is a question or explicit assumption—not silent invention. |
|
|
37
38
|
| fidelity | visual similarity never excuses broken keyboard behavior, contrast, overflow, empty/error/loading states, or content scaling. |
|
|
38
|
-
| privacy/security |
|
|
39
|
+
| privacy/security & ownership | zero hardcoded secrets; client/owner holds root billing & admin for DNS, store accounts, analytics/error DSNs, and signing keys; commercial licenses verified for fonts/icons/media. |
|
|
39
40
|
| anti-slop | do not flatten design into static absolute positioning, rasterize text, copy placeholder copy, or mimic visual noise without semantic structure. |
|
|
40
41
|
|
|
41
42
|
## Pre-submit checklist
|
|
42
43
|
|
|
43
44
|
- [ ] exact frame/component/version and target breakpoint/mode are recorded;
|
|
44
|
-
- [ ] existing component/token reuse decisions are documented;
|
|
45
|
-
- [ ]
|
|
46
|
-
- [ ]
|
|
47
|
-
- [ ]
|
|
48
|
-
- [ ] rendered output
|
|
49
|
-
- [ ] intentional deviations and residual uncertainty are reported.
|
|
45
|
+
- [ ] existing component/token reuse decisions and semantic variable/mode mappings are documented;
|
|
46
|
+
- [ ] missing hover/focus/disabled/loading/error/empty/overflow/`IME` states are resolved (with stack-native isolated previews where supported) or labeled assumptions;
|
|
47
|
+
- [ ] reproducible `< 10m` clean-clone setup (lockfile, `.env.example`/config stub, strict active-language checks) verified;
|
|
48
|
+
- [ ] commercial license manifest (fonts, icon packs, stock/3D/audio rights) and owner-level account/key transfer boundaries (DNS, Store accounts, DSNs, signing certs) documented;
|
|
49
|
+
- [ ] rendered output compared at target sizes via `pixelcraft-visual-qa` with frozen post-launch regression baseline and declared region tolerances;
|
|
50
|
+
- [ ] intentional deviations and residual uncertainty are reported with honest evidence labels.
|
|
@@ -21,6 +21,19 @@ Record before coding:
|
|
|
21
21
|
|
|
22
22
|
Do not treat an entire page capture as a precise component contract when only one region was approved.
|
|
23
23
|
|
|
24
|
+
## 1b. Structured design-source intake (Figma MCP, Code Connect, Penpot)
|
|
25
|
+
|
|
26
|
+
Prefer machine-readable design metadata over eyeballing screenshots whenever tools are available:
|
|
27
|
+
|
|
28
|
+
| Source / tool | Operational workflow | What it establishes |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| **Figma MCP Server** | 1) Call `get_code_connect_map` to locate existing production component bindings; 2) call `get_variable_defs` to fetch bound semantic variables and mode values; 3) call `get_design_context` for Auto Layout hierarchy, constraints, and variants; 4) call `get_screenshot` as the visual verification reference. | Authoritative layout structure, variable tokens, and mapped codebase components (`artifact-observed`) |
|
|
31
|
+
| **Figma Code Connect** | Consume component imports/props directly from `*.figma.tsx`/`.ts`/`.swift`/`.kt` bindings; never re-implement a Code-Connected primitive as raw markup. | Verified component API reuse (`static`) |
|
|
32
|
+
| **Figma Variables REST API** | Pull collection/mode JSON via `GET /v1/files/:file_key/variables/local` into DTCG / Resolver files (`pixelcraft-tokens`) rather than hand-transcribing hex codes. | Canonical mode/token parity across light, dark, brand, and density |
|
|
33
|
+
| **Penpot & Tokens Studio** | Export W3C DTCG JSON / CSS tokens directly from Penpot Design Tokens or Tokens Studio Git sync; inspect flex/grid layout properties rather than absolute x/y coordinates. | Open-format tokens and semantic layout intent |
|
|
34
|
+
|
|
35
|
+
Treat any auto-generated HTML/CSS snippet emitted by Figma MCP or Dev Mode as a **structural reference**, never final production code—refactor into the repository's real components, semantic tokens, routing, and accessibility primitives.
|
|
36
|
+
|
|
24
37
|
## 2. Inventory implementation before generation
|
|
25
38
|
|
|
26
39
|
Reuse is the default. Build a mapping table before writing UI:
|
|
@@ -52,16 +65,21 @@ Capture collections/modes such as light/dark/brand/density/locale as explicit th
|
|
|
52
65
|
|
|
53
66
|
Preserve the target platform's architecture and idioms:
|
|
54
67
|
|
|
55
|
-
| Stack | Translation posture |
|
|
68
|
+
| Stack / Surface | Translation posture |
|
|
56
69
|
|---|---|
|
|
57
|
-
| React/Next/Solid/Qwik | compose existing components/hooks; preserve state ownership, server/client boundaries, routing, accessibility semantics, and CSS architecture |
|
|
58
|
-
| Vue/Nuxt | map props/slots/composables and template structure; preserve reactivity ownership rather than copying DOM literalism |
|
|
59
|
-
| Svelte/Angular/Lit/server-rendered web | use framework-native component contracts,
|
|
60
|
-
| Flutter | translate layout intent into widget composition/constraints, ThemeData
|
|
61
|
-
| SwiftUI/UIKit | use view composition/modifiers or existing view controllers, Dynamic Type, safe areas, trait/size classes, environment/theme propagation |
|
|
62
|
-
| Jetpack Compose/Multiplatform | use composables/slots/Modifier chains, Material or project theme tokens, density/insets, state hoisting, semantics |
|
|
63
|
-
| React Native/Expo | preserve native navigation/gesture expectations, StyleSheet/
|
|
64
|
-
|
|
|
70
|
+
| React / Next.js / TanStack Start / React Router v7 / Solid / Qwik | compose existing components/hooks/loaders; preserve state ownership, server/client boundaries, routing, accessibility semantics, and CSS architecture |
|
|
71
|
+
| Vue / Nuxt | map props/slots/composables and template structure; preserve reactivity ownership rather than copying DOM literalism |
|
|
72
|
+
| Svelte / Angular / Astro / htmx / Lit / server-rendered web | use framework-native component contracts, islands/partial hydration, server-driven HTML forms/swaps, Shadow DOM encapsulation, and CSS scoping |
|
|
73
|
+
| Flutter | translate layout intent into widget composition/constraints, `ThemeData`/tokens, `MediaQuery`/size classes, semantic widgets, and immutable state flow |
|
|
74
|
+
| SwiftUI / UIKit | use view composition/modifiers or existing view controllers, Dynamic Type, safe areas, trait/size classes, environment/theme propagation |
|
|
75
|
+
| Jetpack Compose / Multiplatform | use composables/slots/Modifier chains, Material or project theme tokens, density/insets, state hoisting, semantics |
|
|
76
|
+
| React Native / Expo / LynxJS | preserve native navigation/gesture expectations, StyleSheet/CSS tokens, safe areas, native accessibility attributes, and platform splitting only when justified |
|
|
77
|
+
| Desktop (Tauri, Electron, Qt, WinUI/WPF, Avalonia, Rust GPUI/Slint) | map layout into native windowing, menus, keyboard shortcuts, system theme/DPI scaling, and platform accessibility APIs (UI Automation / NSAccessibility / AccessKit) |
|
|
78
|
+
| Data apps (marimo, Streamlit, Gradio, Reflex, NiceGUI, Dash, Shiny, Observable) | map visual hierarchy onto framework-native layout containers, reactive state cells, and accessible chart/table outputs without fighting framework rerun lifecycles |
|
|
79
|
+
| Extensions (browser MV3, VS Code webviews, Raycast, Figma/Office) | isolate content-script styles inside Shadow DOM, bind host theme variables (`--vscode-*`), respect CSP, and fit compact popup/sidebar budgets |
|
|
80
|
+
| Spatial / XR (visionOS, Android XR, Horizon OS, WebXR, Unity XRI) | translate 2D frames into comfortable viewing depth, angular target sizes, gaze/hand/controller affordances, and passthrough-safe contrast surfaces |
|
|
81
|
+
| Media (Satori, Takumi, Remotion, Motion Canvas, FFmpeg) | respect explicit renderer subset limits (Flexbox-only Satori, deterministic frame math, bundled fonts, platform safe zones) |
|
|
82
|
+
| TUI / email / document / game / constrained | translate visual meaning into the medium's constraints; never pretend DOM/CSS capabilities exist |
|
|
65
83
|
|
|
66
84
|
Responsive behavior must be inferred from constraints and breakpoint evidence, not guessed from one desktop capture. If missing, implement the smallest defensible adaptation and label it an assumption.
|
|
67
85
|
|
|
@@ -99,6 +117,18 @@ Declare tolerance before comparing. Use the `pixelcraft-visual-qa` skill for the
|
|
|
99
117
|
|
|
100
118
|
Antialiasing, font shaping, platform rendering, and dynamic content make exact byte equality inappropriate. Use the region-aware tolerance schema, hard-failure rules, normalization requirements, and deterministic fixture contract in `references/fidelity-tolerance.md`. Record tolerances before inspecting the diff.
|
|
101
119
|
|
|
120
|
+
## 8. Commercial release, license manifest & ownership transfer
|
|
121
|
+
|
|
122
|
+
Studio-grade handoff means another engineer or client owner can build, verify, legally distribute, and operate the product without depending on the author's local machine or personal accounts:
|
|
123
|
+
|
|
124
|
+
| Handoff gate | Mandatory deliverable | Verification / failure boundary |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| **Reproducible `< 10m` clean-clone setup** | Committed lockfile/toolchain pins, `.env.example` (or native config template), and documented single-path bootstrap + verification commands | Clean checkout boots and passes strict active-language static checks (`rustc`/`clippy`, Swift strict concurrency, Kotlin/Dart analyzer, `mypy`/`pyright`, C# nullable, or `tsc --strict`) in `< 10 minutes` |
|
|
127
|
+
| **Stack-native component / screen catalog** | Isolated state previews where the target stack supports them (SwiftUI `#Preview`, Compose `@Preview`, Flutter Widgetbook, Qt/QML preview fixtures, TUI state snapshots, or Storybook/Ladle) | Exercises default, `loading`, `empty`, `error`, dark-mode, and `+50–100%` localized short-label states without live production backends |
|
|
128
|
+
| **Commercial license manifest** | Inventory of all shipped fonts (web/desktop/app embedding rights), icon packs, photography/illustrations, 3D models, shaders, audio clips, and copyleft/commercial packages | Every asset lists license type, redistribution scope, and seat/traffic bounds (`static`); trial/personal-only assets flagged `P0` blocker until replaced or procured |
|
|
129
|
+
| **Owner-level account & key transfer** | Root admin & billing ownership rests with the client/product owner for DNS/domains, Apple Developer / Google Play / Chrome Web Store / Steamworks accounts, OAuth apps, analytics/error `DSN`s, CMS, and signing certificates | Zero personal/agency root accounts left in production critical paths; zero hardcoded secrets or private keys in client source, bundles, or git history |
|
|
130
|
+
| **Post-launch warranty & regression baseline** | Frozen visual/behavioral QA baselines, documented waiver register, and clear defect-triage boundary distinguishing baseline regressions from new feature scope | Baselines reproducible via `pixelcraft-visual-qa` and native test suites |
|
|
131
|
+
|
|
102
132
|
## Acceptance report
|
|
103
133
|
|
|
104
|
-
Report: source/version/frame/mode/breakpoint; classification of specification versus inspiration; reused versus new components; token substitutions/exceptions; missing-state assumptions; rendered comparison evidence and tolerance; intentional deviations; and remaining `not-checked` surfaces.
|
|
134
|
+
Report: source/version/frame/mode/breakpoint; classification of specification versus inspiration; reused versus new components; token substitutions/exceptions; missing-state assumptions; rendered comparison evidence and tolerance; `< 10m` setup & isolated preview coverage; commercial license manifest & owner-account transfer status; post-launch regression baseline; intentional deviations; and remaining `not-checked` surfaces.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Motion handoff specification
|
|
2
|
+
|
|
3
|
+
When a Figma prototype, Rive state machine, Lottie file, or video reference includes motion, record the interaction contract separately from static appearance before implementing.
|
|
4
|
+
|
|
5
|
+
## Required fields
|
|
6
|
+
|
|
7
|
+
| Field | Meaning |
|
|
8
|
+
|---|---|
|
|
9
|
+
| trigger | user action, scroll threshold, route change, media event, or automatic event |
|
|
10
|
+
| initial/final state | semantic state and animated properties (`transform`, `opacity`, clip/top-layer) before/after |
|
|
11
|
+
| timing / physics | duration + curve, or spring parameters (`stiffness`/`damping`/`mass` or `duration`/`bounce`), delay, stagger, interruption |
|
|
12
|
+
| ownership | component/route and runtime that owns the animation |
|
|
13
|
+
| input | pointer, keyboard, touch, controller, or automatic |
|
|
14
|
+
| lifecycle | mount, unmount, resize, route transition, background/visibility |
|
|
15
|
+
| reduced motion | immediate/static/opacity-crossfade alternative |
|
|
16
|
+
| focus/semantics | focus placement, `inert` background handling, reading order, live announcement |
|
|
17
|
+
| evidence | prototype link/recording, rendered video/trace, or static inference |
|
|
18
|
+
|
|
19
|
+
## Concrete motion spec example
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
interaction: InspectorDrawer.openClose
|
|
23
|
+
trigger: Click/Enter on "Inspect record" button or Esc/backdrop click to dismiss
|
|
24
|
+
states:
|
|
25
|
+
closed: { opacity: 0, transform: "translateX(24px)", visibility: hidden }
|
|
26
|
+
open: { opacity: 1, transform: "translateX(0)", visibility: visible }
|
|
27
|
+
physics:
|
|
28
|
+
spatial: { token: motion.spring.snappy, stiffness: 420, damping: 32, mass: 1 }
|
|
29
|
+
effects: { token: motion.duration.fast, duration: 150ms, easing: ease-out }
|
|
30
|
+
interruption: Retarget immediately mid-flight from current velocity/position; never queue
|
|
31
|
+
input_parity: Pointer click, keyboard Enter/Space to open, Esc to dismiss, swipe-right on touch
|
|
32
|
+
focus_semantics: Focus moves to drawer heading on open; background marked inert; focus returns to trigger on close
|
|
33
|
+
reduced_motion: Opacity-only crossfade (100ms, zero translation); same focus contract
|
|
34
|
+
evidence: Figma prototype node 42:188 (artifact-observed); target verification via Playwright video + reduced-motion trace
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Source-to-runtime translation map
|
|
38
|
+
|
|
39
|
+
Translate design-tool primitives into idiomatic target runtimes rather than exporting bloated keyframe dumps:
|
|
40
|
+
|
|
41
|
+
| Design source | CSS (`linear()` / View Transitions) | Motion (React) / GSAP | SwiftUI | Jetpack Compose |
|
|
42
|
+
|---|---|---|---|---|
|
|
43
|
+
| **Figma Smart Animate** (shared layer across frames) | `@view-transition` / `document.startViewTransition()` + `view-transition-name` | Motion `layoutId` shared layout / GSAP `Flip.from()` | `.matchedGeometryEffect(id:in:)` | `SharedTransitionLayout` + `sharedElement()` |
|
|
44
|
+
| **Figma Spring** (`stiffness`, `damping`, `mass`) | Pre-sampled CSS `linear(...)` easing token + compositor-only `transform` | Motion `{ type: "spring", stiffness, damping, mass }` / GSAP custom ease | `.spring(duration:bounce:)` or `Spring(mass:stiffness:damping:)` | `spring(stiffness = ..., dampingRatio = ...)` |
|
|
45
|
+
| **Figma Smart Animate** (overlay enter/exit) | `<dialog>`/`[popover]` + `@starting-style` + `transition-behavior: allow-discrete` | Motion `<AnimatePresence>` / GSAP timeline with `clearProps` | `.transition(.opacity.combined(with: .move(...)))` | `AnimatedVisibility(enter = ..., exit = ...)` |
|
|
46
|
+
| **Rive state machine** (interactive vector inputs) | `@rive-app/canvas` / `@rive-app/webgl2` bound to semantic UI state + static SVG fallback | Control Rive state inputs (`SMIInput`) from app state; pause offscreen | `RiveViewModel` bound to `@State` + Reduce Motion freeze | `RiveAnimationView` bound to Compose state + static fallback |
|
|
47
|
+
| **Lottie** (authored vector playback) | Prefer CSS/SVG for simple icons; use `lottie-web` light/dotLottie only for rich authored spots with static final frame under reduced motion | Play/seek segments by state; never auto-loop > 5s without pause control | `LottieView` (`dotLottie`) respecting `accessibilityReduceMotion` | `LottieAnimation` (`lottie-compose`) honoring `ANIMATOR_DURATION_SCALE` |
|
|
48
|
+
|
|
49
|
+
## Translation rules
|
|
50
|
+
|
|
51
|
+
- Reuse the project's animation runtime and motion tokens (`pixelcraft-tokens`) rather than adding a second animation library for one screen.
|
|
52
|
+
- Do not copy a prototype's exact millisecond durations blindly—test with real content lengths, mid-tier hardware, and fast repeat clicks.
|
|
53
|
+
- Resolve missing keyboard, touch, interruption, and reduced-motion states explicitly; mark assumptions if the prototype omitted them.
|
|
54
|
+
- Verify the implemented transition with `pixelcraft-visual-qa` (`motion-capture.md`) alongside static visual fidelity.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-media
|
|
3
|
-
description: Designs and verifies social cards, Open Graph/Twitter images, repository banners, SVG posters, video frames, and motion graphics for external platforms. Use for OG/social preview generation, 1200×630 cards, GitHub 1280×640
|
|
3
|
+
description: Designs and verifies social cards, Open Graph/Twitter images, YouTube thumbnails, repository banners, SVG posters, video frames, and motion graphics for external platforms. Use for OG/social preview generation, 1200×630 cards, GitHub 1280×640 previews, Bluesky/Discord/WhatsApp/Slack/Telegram embeds, 16:9/9:16/1:1 media, platform safe zones, thumbnail legibility, Satori/@vercel/og/ImageResponse, Takumi, Resvg, Sharp, SVG banners, Remotion, Motion Canvas, Revideo, FFmpeg, dotLottie/Rive export, caching, and truthfulness review.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -16,37 +16,34 @@ Design the focal subject and minimum readable message for the smallest real crop
|
|
|
16
16
|
|
|
17
17
|
## References
|
|
18
18
|
|
|
19
|
-
- Read [references/social-cards.md](references/social-cards.md) for OG/platform dimensions,
|
|
20
|
-
- Read [references/og-generation.md](references/og-generation.md) for Satori, `@vercel/og`,
|
|
21
|
-
- Read [references/banners-video.md](references/banners-video.md) for SVG banners/posters, Remotion
|
|
19
|
+
- Read [references/social-cards.md](references/social-cards.md) for OG/platform dimensions (**Zalo**, Slack, iMessage, X, LinkedIn, WhatsApp, Discord, Telegram, Bluesky, YouTube, GitHub), the `1200×630` (`1000×500` safe zone) unfurl matrix, `1080×1920` (`9:16`) Reels/TikTok/Shorts pixel exclusion zones, JPEG/PNG unfurler fallbacks, and caching.
|
|
20
|
+
- Read [references/og-generation.md](references/og-generation.md) for Satori, `@vercel/og`, Next.js `ImageResponse`, Takumi, `@resvg/resvg-js`, Sharp, `@napi-rs/canvas`/`skia-canvas`, and Playwright HTML-to-screenshot OG pipelines.
|
|
21
|
+
- Read [references/banners-video.md](references/banners-video.md) for SVG banners/posters, Remotion v4+, Motion Canvas, Revideo, `0.0s` legible poster frames, FFmpeg (`-14 LUFS` loudness, `yuv420p`, `+faststart`), `dotLottie`/Rive vector exports, and `SRT`/`VTT` + burned-in captions.
|
|
22
|
+
|
|
23
|
+
For browser audio/video players and Web Audio DSP (`hls.js`, Shaka, Vidstack, Media Chrome, Video.js, Tone.js), use the `pixelcraft-web` skill.
|
|
22
24
|
|
|
23
25
|
## Required workflow
|
|
24
26
|
|
|
25
|
-
1. **Define placement.** Identify exact platforms/
|
|
26
|
-
2. **
|
|
27
|
-
3. **Reduce the message.** Use the minimum truthful content: product/name, one concrete
|
|
28
|
-
4. **
|
|
29
|
-
5. **Verify in context.** Inspect at
|
|
27
|
+
1. **Define placement.** Identify exact platforms/unfurlers, card type, feed context, static or animated media, localization, caption requirements, cache/update cadence, and click intent.
|
|
28
|
+
2. **Lock frame and pixel safe zones.** Keep `1200×630` (`1.91:1`) headlines/logos inside the **center `1000×500` safe box**, and keep `1080×1920` (`9:16`) vertical video copy clear of **`top >= 150–220 px`, `bottom >= 320–420 px`, and `right >= 120–160 px`** host UI rails.
|
|
29
|
+
3. **Reduce the message.** Use the minimum truthful content (`<= 6–8` words): product/name, one concrete claim or artifact, and recognizable visual evidence legible when downscaled to **`150–300 px` thumbnail width** in both light and dark social feeds.
|
|
30
|
+
4. **Ship unfurler-safe formats & `0.0s` video posters.** Serve absolute `https://` **PNG or JPEG** (`< 300 KB` for WhatsApp/Zalo, `< 1 MB` general, fast crawl TTFB) because SVG (`og:image`) is rejected universally and WebP still fails in legacy enterprise/chat unfurlers; render a legible **`0.0s` poster frame** and normalize social/web audio to **`-14 LUFS` (`-1.5 dBTP`)**.
|
|
31
|
+
5. **Verify in context & attach deliverables.** Inspect at `100%`, **`150–300 px` downscaled thumbnail crops** on both light and dark feed backgrounds, **live share-debugger preview captures (`Facebook`, `X`, `LinkedIn`, `Zalo`)**, `ffprobe` metadata (`static`), and an explicit **font/photo/music/footage asset license table**.
|
|
30
32
|
|
|
31
33
|
## Non-negotiable rules
|
|
32
34
|
|
|
33
35
|
| Concern | Rule |
|
|
34
36
|
|---|---|
|
|
35
|
-
| truthfulness | No invented user counts, screenshots, awards, logos, testimonials, benchmarks,
|
|
36
|
-
| legibility |
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
| accessibility | Provide meaningful alt text/link context where platforms support it; video needs captions/subtitles and must not autoplay sound by default. |
|
|
40
|
-
| cache awareness | Social platforms cache aggressively. Use validation/cache-busting/deployment sequencing consciously. |
|
|
37
|
+
| truthfulness & asset licensing | No invented user counts, screenshots, awards, logos, testimonials, or benchmarks; deliver a complete **asset license table** (fonts, stock/custom photography, icons, music, SFX, AI provenance) clearing commercial social/paid-ad distribution. |
|
|
38
|
+
| unfurler & `150–300 px` thumbnail legibility | Use `1200×630` (`1.91:1`, center **`1000×500` safe zone**), absolute `https://`, `< 300 KB` (WhatsApp/Zalo) / `< 1 MB` **PNG/JPEG `og:image`**, and verify headline/mark legibility at **`150–300 px` downscaled thumbnail width** in **both light and dark social feeds** + **live share-debugger previews (`Facebook`, `X`, `LinkedIn`, `Zalo`)**. |
|
|
39
|
+
| `9:16` vertical exclusion zones | On `1080×1920` Reels/TikTok/Shorts, keep all titles, faces, and open captions clear of **`top >= 150–220 px`**, **`bottom >= 320–420 px`** (caption/CTA drawer), and **`right >= 120–160 px`** (like/comment/share rail). |
|
|
40
|
+
| `0.0s` poster, captions & `-14 LUFS` | Frame `0` (`0.0s`) must render a legible poster immediately (never `opacity={0}` black frames); pair muted autoplay video with **burned-in safe-zone captions or synced `SRT`/`VTT`**, and normalize web/social audio to **`loudnorm=I=-14:TP=-1.5:LRA=11`** (`-16 LUFS` for podcasts only). |
|
|
41
41
|
| anti-slop | Avoid purple-blue gradients, floating browser chrome mockups, generic rocket/sparkle art, unreadable code screenshots, and badge clutter unrelated to the subject. |
|
|
42
42
|
|
|
43
43
|
## Pre-submit checklist
|
|
44
44
|
|
|
45
|
-
- [ ]
|
|
46
|
-
- [ ]
|
|
47
|
-
- [ ]
|
|
48
|
-
- [ ]
|
|
49
|
-
- [ ]
|
|
50
|
-
- [ ] absolute metadata URLs and cache behavior are correct;
|
|
51
|
-
- [ ] alt/caption/accessibility path exists where the platform supports it;
|
|
52
|
-
- [ ] final evidence states which platform previews were actually inspected versus `not-checked`.
|
|
45
|
+
- [ ] `1200×630` (`1000×500` center safe zone) or `1080×1920` (`top >= 150–220 px`, `bottom >= 320–420 px`, `right >= 120–160 px` clear) geometry verified;
|
|
46
|
+
- [ ] `og:image` uses absolute `https://`, **PNG/JPEG** unfurler-safe format, and `< 300 KB` (WhatsApp/Zalo) / `< 1 MB` byte budget with versioned cache-busting URL;
|
|
47
|
+
- [ ] **`150–300 px` downscaled thumbnail legibility** verified in **both light and dark social feeds**, plus **live share-debugger preview captures (`Facebook`, `X`, `LinkedIn`, `Zalo`)** (or labeled `not-checked` when offline/unhosted) and **asset license table** delivered;
|
|
48
|
+
- [ ] video exports render a legible **`0.0s` poster frame**, `yuv420p` + `+faststart`, **`-14 LUFS` (`-1.5 dBTP`)** audio, and **burned-in / `SRT` / `VTT` captions**;
|
|
49
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, rendered `150–300 px` / `0.0s` frame inspections, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/media legibility per `Rule #0.3`).
|