@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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-mobile
|
|
3
|
-
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into idiomatic mobile UI across SwiftUI, UIKit, Jetpack Compose, Flutter, React Native/Expo, Kotlin Multiplatform, Ionic/Capacitor, .NET MAUI, Flet, and Kivy. Use for native or cross-platform app screens,
|
|
3
|
+
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into idiomatic mobile UI across SwiftUI (incl. TCA), UIKit, Jetpack Compose, Flutter, React Native/Expo, Expo Router, LynxJS, Kotlin Multiplatform, NativeScript, Skip, HarmonyOS ArkUI, Elixir LiveView Native, Taro/uni-app, Ionic/Capacitor, .NET MAUI, Flet, and Kivy. Use for native or cross-platform app screens, iOS 26 Liquid Glass, Material 3 Expressive, safe areas, Dynamic Type/sp scaling, touch targets, bottom sheets, gestures, haptics, Live Activities, forms, states, accessibility, and device verification.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
# Pixelcraft mobile
|
|
10
10
|
|
|
11
|
-
Use this skill when the surface is a phone/tablet/foldable/watch-adjacent app. Respect the host platform: iOS uses Apple HIG idioms, Android uses Material behavior, and cross-platform runtimes must translate rather than average them.
|
|
11
|
+
Use this skill when the surface is a phone/tablet/foldable/watch-adjacent app. Respect the host platform: iOS uses Apple HIG idioms (including iOS 26 Liquid Glass with contrast/transparency fallbacks), Android uses Material 3 / Material 3 Expressive behavior with edge-to-edge and predictive back, and cross-platform runtimes must translate rather than average them.
|
|
12
12
|
|
|
13
13
|
## Surface craft
|
|
14
14
|
|
|
@@ -16,54 +16,71 @@ Give the primary task a short route with native back/dismiss behavior; add delig
|
|
|
16
16
|
|
|
17
17
|
## Detection signals
|
|
18
18
|
|
|
19
|
-
`Package.swift`, Xcode projects/workspaces, SwiftUI/UIKit imports, `build.gradle(.kts)` Compose dependencies, `pubspec.yaml`, React Native/Expo config, KMP
|
|
19
|
+
`Package.swift`, Xcode projects/workspaces, SwiftUI/UIKit/TCA imports, `build.gradle(.kts)` Compose/Material3 dependencies, `pubspec.yaml`, React Native/Expo config (`app.config.*`, Expo Router `app/_layout.tsx`), LynxJS (`@lynx-js/react`, `lynx.config.*`, `rspeedy`), KMP/Compose Multiplatform (`composeResources/`, `commonMain`), NativeScript (`nativescript.config.ts`), Skip (`Skip/skip.yml`), HarmonyOS (`oh-package.json5`, `build-profile.json5`, `.ets` ArkTS), LiveView Native (`.swiftui.heex`/`.jetpack.heex`), Taro/uni-app (`config/index.*`, `pages.json`, `manifest.json`), Ionic/Capacitor config (`capacitor.config.*`), `.csproj` MAUI references, Flet controls/page setup, Kivy/KivyMD KV/App classes, platform folders (`ios/`, `android/`), and target/device family declarations.
|
|
20
20
|
|
|
21
21
|
## Translate direction to mobile idioms
|
|
22
22
|
|
|
23
|
-
1. Map DTCG semantic roles to native theme systems: SwiftUI
|
|
24
|
-
2. Recompose for touch and reach: primary actions
|
|
25
|
-
3. Use platform navigation rather than web metaphors:
|
|
26
|
-
4. Scale type using Dynamic Type
|
|
27
|
-
5. Keep targets at least 44×44 pt iOS and 48×48 dp Android unless a documented platform exception applies.
|
|
28
|
-
6. Map motion to native spring/transition idioms and honor Reduce Motion/Remove animations. Haptics confirm meaningful physical/input moments only.
|
|
23
|
+
1. Map DTCG semantic roles to native theme systems: SwiftUI `ColorResource` Asset Catalogs/`@Entry`, UIKit trait-aware colors, Compose `MaterialExpressiveTheme`/`ColorScheme`, Flutter `ThemeData`/`ThemeExtension`, RN styling engines (`Uniwind`, `unistyles`, `NativeWind`), LynxJS CSS custom properties, HarmonyOS `$r('app.color.*')`, Ionic 8 `light-dark()` variables, NativeScript `.ns-dark` CSS, Skip Asset Catalogs, MAUI `AppThemeBinding`, Flet `ft.Theme`, or KivyMD `theme_cls`.
|
|
24
|
+
2. Recompose for touch and reach: primary actions in the lower thumb zone, no desktop hover dependence, dense information only where expert use justifies it.
|
|
25
|
+
3. Use platform navigation rather than web metaphors: `NavigationStack`/`Tab`/`TabSection`/sheets on iOS; Navigation 3 or Compose Navigation + predictive back + Material 3 adaptive panes on Android; Expo Router native stacks/tabs on RN; `GoRouter` `StatefulShellRoute` on Flutter; `Navigation` + `GridRow`/`GridCol` on HarmonyOS.
|
|
26
|
+
4. Scale type using Dynamic Type (`.font(.custom(..., relativeTo:))`), Android `sp`, or HarmonyOS `fp` scaling; restructure horizontal rows instead of truncating essential content at accessibility sizes.
|
|
27
|
+
5. Keep targets at least `44×44 pt` iOS and `48×48 dp` Android unless a documented platform exception applies.
|
|
28
|
+
6. Map motion to native spring/transition idioms (`MotionScheme.expressive()` spatial vs effects springs, Reanimated 4, SwiftUI springs) and honor Reduce Motion/Remove animations/Reduce Transparency. Haptics confirm meaningful physical/input moments only.
|
|
29
29
|
|
|
30
30
|
## Platform-wide rules
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
32
|
+
- **2026 App Store (iOS / Xcode 26 SDK) gates**: ship `PrivacyInfo.xcprivacy` covering first-party code and every embedded third-party SDK (Required Reason APIs + tracking domains); store tokens exclusively in **Keychain** (never `UserDefaults` / `AsyncStorage`); offer **Sign in with Apple** parity whenever 3rd-party social login exists; provide discoverable **in-app Account Deletion** that actually deletes/schedules deletion (never linking to a support email); and use contextual just-in-time permission priming, zero-permission `PhotosPicker`/`PHPickerViewController` (plus `.limited` photo support), and inline Settings deep-link recovery when denied.
|
|
33
|
+
- **2026 Google Play (`targetSdk 36` / Android 16 `.aab`) gates**: enforce mandatory **Edge-to-Edge** (`enableEdgeToEdge()` / `WindowCompat.setDecorFitsSystemWindows(window, false)` / `WindowInsets.ime`); never hard-lock portrait on `sw >= 600dp` tablets/foldables and survive fold/unfold posture transitions without state loss; compile all native `.so` libraries for **`16 KB` memory page size** (NDK r28+ / `-Wl,-z,max-page-size=16384`, verified via `zipalign -c -P 16`); store secrets in **Android Keystore** (Jetpack Tink / `EncryptedSharedPreferences`, never plaintext `SharedPreferences`); and wire **Predictive Back** (`OnBackInvokedCallback` / `PredictiveBackHandler`).
|
|
34
|
+
- **Tactile safety & cross-platform split**: enforce **`>= 8 pt/dp` minimum spacing** between destructive actions and safe controls, an **explicit visible `Close` button on bottom sheets** for users who cannot drag gestures, **zero custom horizontal swipe gestures inside OS back-gesture edge zones**, and an **explicitly documented shared-vs-platform-native UI split** on cross-platform stacks (Flutter, React Native, KMP, `.NET MAUI`).
|
|
35
|
+
- **Physics, memory/energy, install budget & rollout gates**: hit **`< 800 ms–1.2 s`** cold start on mid-tier hardware (hard ceiling `< 2.0 s`) via **Android Baseline Profiles** and deferred SDK init; unlock **`120fps` ProMotion (`< 8.33 ms`/frame)** via `CADisableMinimumFrameDurationOnPhone = true` with UI/Impeller-thread animations, interactive keyboard dismissal, and `panVelocity` spring handover; pass a **20–30× primary-flow repetition memory-leak check** (`LeakCanary` / Xcode `Instruments`), **Energy / Battery Historian / Xcode Energy Impact** check, and agreed **install-size ceiling** (e.g., `<= 50–80 MB` download); and ship a **staged rollout + force-update / min-supported-version gate** for breaking API changes.
|
|
36
|
+
- **4-tier haptics, process-death & 3-tier real-device matrix**: restrict haptics to 4 semantic tiers; survive OS background RAM eviction (`adb shell am kill <pkg>` / Xcode termination) via `SavedStateHandle`/`rememberSaveable`/`@SceneStorage`/`RestorationMixin`; expose visible offline mutation sync queues; maintain **`>= 99.5%` crash-free sessions** (`0` ANRs) with automated dSYM/R8/ProGuard symbolication; and attach profiler, crash-free, VoiceOver, and TalkBack deliverables across a **3-tier real-device matrix** (**`compact 4.7–5.4" + standard + Pro Max/Plus` iOS** and **`low-RAM 3–4 GB + mid-tier + flagship` Android** across **oldest + newest supported OS** at default and **`200%` (`AX3`)** font scale).
|
|
37
|
+
|
|
38
|
+
## Anti-lazy-default & anti-slop guard
|
|
39
|
+
|
|
40
|
+
- **Reject lazy wrappers on greenfield mobile apps**: do not wrap a web SPA in Ionic/Capacitor/WebView or default to Python Kivy merely out of habit when native **SwiftUI**, **Jetpack Compose**, **Flutter**, **KMP**, or **React Native New Architecture** fits the product's gesture fidelity, offline durability, and platform expectations. Use Capacitor/Kivy/LiveView Native/Taro only when their trade-offs match explicit team or distribution constraints.
|
|
41
|
+
- **Reject transplanted web slop**: never drop centered web marketing heroes, hover-only tooltips, floating 3-card SaaS grids, or custom fake nav bars onto native mobile screens.
|
|
42
|
+
- **Do not hand-roll native primitives**: use native sheets/detents, date pickers, autofill, predictive back, and swipe-back gestures instead of brittle custom overlays.
|
|
38
43
|
|
|
39
44
|
## Common mobile-specific failures
|
|
40
45
|
|
|
41
|
-
- fixed-height rows clipping Dynamic Type or sp scaling;
|
|
42
|
-
- bottom CTAs hidden by home indicator, keyboard, or
|
|
43
|
-
- custom
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
- scroll
|
|
48
|
-
- cross-platform UI forced to look identical at the expense of both platforms.
|
|
46
|
+
- fixed-height rows clipping Dynamic Type (`AX3`) or `200%` `sp` scaling, or hard-locked portrait breaking `sw >= 600dp` foldables/tablets on Android 16;
|
|
47
|
+
- bottom CTAs hidden by home indicator, soft keyboard, or Android 15/16 edge-to-edge gesture bar, or bottom sheets missing an explicit `Close` button;
|
|
48
|
+
- `< 8 pt/dp` spacing beside destructive taps, or custom horizontal swipes inside OS back-gesture edge zones;
|
|
49
|
+
- `4 KB`-aligned native `.so` binaries rejected by Google Play, missing `PrivacyInfo.xcprivacy`, tokens in `UserDefaults`/`SharedPreferences`, or fake "email us to delete account" links;
|
|
50
|
+
- animations capped at `60 Hz` on ProMotion iPhones, memory leaks after 20–30× flow repeats, missing min-supported-version gate, or state lost on `adb shell am kill` eviction;
|
|
51
|
+
- Liquid Glass stacked on reading content or unreadable under Reduce Transparency / Increase Contrast;
|
|
52
|
+
- haptics buzzing on every routine tap/scroll rather than the 4 semantic tiers.
|
|
49
53
|
|
|
50
54
|
## Verification options
|
|
51
55
|
|
|
52
|
-
Rendered verification
|
|
56
|
+
Rendered verification requires simulator/emulator/device tooling or runtime UI tests (**Rule #0.3**: compilation or preview generation alone is `static`, never `rendered`). Attach profiler traces (`Instruments` / `LeakCanary` / Energy Impact), install-size reports, crash-free/ANR config, and VoiceOver/TalkBack captures across the 3-tier iOS + Android matrix; label unavailable physical devices `not-checked`.
|
|
57
|
+
|
|
58
|
+
## Pre-submit checklist
|
|
59
|
+
|
|
60
|
+
- [ ] zero `TODO`s, placeholder stubs, invented copy, or dead tap/gesture handlers;
|
|
61
|
+
- [ ] App Store & Google Play gates met: Xcode 26 SDK, `PrivacyInfo.xcprivacy`, Keychain/Keystore-only tokens, Sign in with Apple parity, real in-app Account Deletion, `targetSdk 36` `.aab`, Edge-to-Edge + `WindowInsets.ime`, `sw >= 600dp` foldable posture, `16 KB` `.so` alignment (`zipalign -c -P 16`), Predictive Back;
|
|
62
|
+
- [ ] `>= 8 pt/dp` destructive spacing, explicit visible `Close` button on bottom sheets, zero custom swipes in OS back-gesture edge zones, and documented shared-vs-platform-native UI split (on Flutter/RN/KMP/MAUI) verified;
|
|
63
|
+
- [ ] `< 800 ms–1.2 s` cold start (Baseline Profiles), `120fps` ProMotion, interactive keyboard drag, `panVelocity` spring handover, 4-tier haptics, **20–30× primary-flow memory-leak check** (`LeakCanary`/`Instruments`), **Energy/Battery Historian/Energy Impact** check, agreed **install-size ceiling** (`<= 50–80 MB`), and **staged rollout + force-update/min-version gate** verified;
|
|
64
|
+
- [ ] OS process-death (`adb shell am kill` / background eviction) restoration, visible offline sync queue, dSYM/R8 symbolication (`>= 99.5%` crash-free, `0` ANRs), and `44 pt` / `48 dp` targets at Dynamic Type `AX3` / `200%` `sp` verified;
|
|
65
|
+
- [ ] Dark Mode, Increase Contrast, Reduce Transparency, Reduce Motion, and VoiceOver + TalkBack deliverables across the **3-tier real-device matrix** (`compact 4.7–5.4" + standard + Pro Max/Plus` iOS; `low-RAM 3–4 GB + mid-tier + flagship` Android across oldest + newest OS) checked or labeled `not-checked`;
|
|
66
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, native/simulator tests, 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/perf/a11y per `Rule #0.3`).
|
|
53
67
|
|
|
54
68
|
## Framework routing
|
|
55
69
|
|
|
56
|
-
- Read [references/task-state-composition.md](references/task-state-composition.md)
|
|
57
|
-
|
|
58
|
-
- Read [references/swiftui.md](references/swiftui.md)
|
|
59
|
-
- Read [references/uikit.md](references/uikit.md)
|
|
60
|
-
- Read [references/jetpack-compose.md](references/jetpack-compose.md)
|
|
61
|
-
- Read [references/flutter.md](references/flutter.md)
|
|
62
|
-
- Read [references/react-native-expo.md](references/react-native-expo.md)
|
|
63
|
-
- Read [references/
|
|
64
|
-
- Read [references/
|
|
65
|
-
- Read [references/
|
|
66
|
-
- Read [references/
|
|
67
|
-
- Read [references/
|
|
70
|
+
- Read [references/task-state-composition.md](references/task-state-composition.md) when designing timers, capture/recording flows, delivery/ride trackers, iOS Live Activities, or Android Live Updates with distinct setup/active/complete stages.
|
|
71
|
+
- Read [references/tactile-interactions.md](references/tactile-interactions.md) when implementing bottom sheet detents, scroll handover, thumb-zone ergonomics, semantic haptics, swipe-to-act with undo, offline queues, or Dynamic Type/`sp` reflow.
|
|
72
|
+
- Read [references/swiftui.md](references/swiftui.md) when building SwiftUI iOS/iPadOS/watchOS-adjacent apps, iOS 26 Liquid Glass chrome, iOS 18–26 declarative Apple APIs, or The Composable Architecture (TCA).
|
|
73
|
+
- Read [references/uikit.md](references/uikit.md) when maintaining or building imperative UIKit apps, `UIGlassEffect`, `UIHostingConfiguration`, or Swift 6 `@MainActor` view controllers.
|
|
74
|
+
- Read [references/jetpack-compose.md](references/jetpack-compose.md) when building Android Compose UI, Material 3 Expressive, Android 15/16 edge-to-edge, Predictive Back, Navigation 3, or `TextFieldState`.
|
|
75
|
+
- Read [references/flutter.md](references/flutter.md) when building Flutter/Dart mobile or embedded UI with Impeller, Cupertino adaptive controls, GoRouter, or Riverpod 3.
|
|
76
|
+
- Read [references/react-native-expo.md](references/react-native-expo.md) when building React Native New Architecture or Expo SDK 52–54+ apps with Expo Router, Uniwind/Unistyles/NativeWind, Reanimated 4, Skia, or FlashList v2.
|
|
77
|
+
- Read [references/lynxjs.md](references/lynxjs.md) when building Lynx / LynxJS (`@lynx-js/react`, `@lynx-js/rspeedy`) dual-threaded native mobile UI.
|
|
78
|
+
- Read [references/kotlin-multiplatform.md](references/kotlin-multiplatform.md) when sharing business logic via KMP/SKIE or sharing UI via Compose Multiplatform (iOS Stable 1.8+, Android, Desktop, Wasm).
|
|
79
|
+
- Read [references/nativescript-and-skip.md](references/nativescript-and-skip.md) when building native cross-platform mobile apps with NativeScript (JS/TS direct native APIs) or Skip (`skip.tools` Swift/SwiftUI to Android Compose).
|
|
80
|
+
- Read [references/harmonyos-and-emerging-mobile.md](references/harmonyos-and-emerging-mobile.md) when building HarmonyOS ArkUI/ArkTS apps, Elixir LiveView Native (SwiftUI/Compose over Phoenix), or cross-mini-app Taro / uni-app interfaces.
|
|
81
|
+
- Read [references/ionic-capacitor.md](references/ionic-capacitor.md) when building Ionic 7/8 or Capacitor 6–8 hybrid apps (including Capacitor without Ionic).
|
|
82
|
+
- Read [references/dotnet-maui.md](references/dotnet-maui.md) when building .NET MAUI (`net9.0`/`net10.0`), Blazor Hybrid, or `HybridWebView` mobile/desktop apps.
|
|
83
|
+
- Read [references/flet.md](references/flet.md) when building Python Flet (`0.25–1.0`) cross-platform mobile/desktop UI.
|
|
84
|
+
- Read [references/kivy.md](references/kivy.md) when building Python Kivy or KivyMD cross-platform apps packaged with Buildozer or `kivy-ios`.
|
|
68
85
|
|
|
69
86
|
For watchOS/Wear OS wearables and tvOS/10-foot living-room surfaces, use `pixelcraft-constrained` as the primary surface skill alongside framework idioms here; for visionOS/XR spatial surfaces, use `pixelcraft-spatial`.
|
|
@@ -2,62 +2,90 @@
|
|
|
2
2
|
|
|
3
3
|
## Token mapping
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Define semantic colors, spacing, and styles once in XAML `ResourceDictionary` files and pair them with **`{AppThemeBinding Light=..., Dark=...}`** (or dynamic theme dictionaries) so light, dark, and high-contrast themes resolve cleanly without inline hex literals:
|
|
6
6
|
|
|
7
7
|
```xml
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
</
|
|
8
|
+
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
9
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
|
10
|
+
<Color x:Key="ActionLight">#0074CA</Color>
|
|
11
|
+
<Color x:Key="ActionDark">#5BB2FF</Color>
|
|
12
|
+
<Color x:Key="SurfaceLight">#FFFFFF</Color>
|
|
13
|
+
<Color x:Key="SurfaceDark">#121417</Color>
|
|
14
|
+
|
|
15
|
+
<Style TargetType="Button" x:Key="PrimaryActionButton">
|
|
16
|
+
<Setter Property="BackgroundColor"
|
|
17
|
+
Value="{AppThemeBinding Light={StaticResource ActionLight}, Dark={StaticResource ActionDark}}" />
|
|
18
|
+
<Setter Property="MinimumHeightRequest" Value="48" />
|
|
19
|
+
</Style>
|
|
20
|
+
</ResourceDictionary>
|
|
12
21
|
```
|
|
13
22
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## Layout
|
|
17
|
-
|
|
18
|
-
Use
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
Enable compiled bindings (`x:DataType="vm:InvoiceViewModel"`) on every page and `DataTemplate` so binding typos fail at compile time rather than silently failing at runtime.
|
|
24
|
+
|
|
25
|
+
## Layout, handlers, hybrid surfaces, & desktop chrome
|
|
26
|
+
|
|
27
|
+
- Use `Grid`, `VerticalStackLayout`, `HorizontalStackLayout`, `FlexLayout`, and `Shell` intentionally; Shell's default flyout/tabs are not automatically the right IA for every app. Respect iOS safe areas (`ios:Page.UseSafeArea="True"`), Android edge-to-edge insets, and platform back behavior.
|
|
28
|
+
- **`CollectionViewHandler2`** (.NET 9/10 iOS & Mac Catalyst): use the modernized `UICollectionView`-backed handler (`ConfigureMauiHandlers` on .NET 9 or default on .NET 10) to avoid legacy scroll-sizing, header/footer, and cell-recycling glitches in `CollectionView`.
|
|
29
|
+
- **Desktop `TitleBar` (.NET 9+)**: on Windows and Mac Catalyst, use the native `Window.TitleBar` control (`TitleBar` with `LeadingContent`, `Content`, `TrailingContent`, and `PassthroughElements`) instead of hacking frameless windows or hiding system window buttons.
|
|
30
|
+
- **Hybrid web targets**:
|
|
31
|
+
- Use **`BlazorWebView`** (Blazor Hybrid) to share Razor components across mobile, desktop, and web with native C# access.
|
|
32
|
+
- Use **`HybridWebView`** (.NET 9+) to host existing JS/HTML/CSS SPAs (React/Vue/Svelte) inside MAUI with structured bidirectional JS↔C# `InvokeJavaScriptAsync` / `SendRawMessage` interop.
|
|
33
|
+
|
|
34
|
+
## State management (`CommunityToolkit.Mvvm` & `CommunityToolkit.Maui`)
|
|
35
|
+
|
|
36
|
+
Adopt **`CommunityToolkit.Mvvm`** (`[ObservableProperty]`, `[RelayCommand(IncludeCancelCommand = true)]`, `ObservableObject`) for zero-reflection source-generated MVVM with explicit cancellation, and **`CommunityToolkit.Maui`** for production behaviors, popups, status-bar styling, converters, and animations:
|
|
37
|
+
|
|
38
|
+
```csharp
|
|
39
|
+
public partial class InvoiceViewModel(IInvoiceService service) : ObservableObject
|
|
40
|
+
{
|
|
41
|
+
[ObservableProperty] private bool isBusy;
|
|
42
|
+
[ObservableProperty] private string? errorMessage;
|
|
43
|
+
|
|
44
|
+
[RelayCommand(IncludeCancelCommand = true)]
|
|
45
|
+
private async Task SaveAsync(CancellationToken ct)
|
|
46
|
+
{
|
|
47
|
+
ErrorMessage = null;
|
|
48
|
+
IsBusy = true;
|
|
49
|
+
try { await service.SaveAsync(ct); }
|
|
50
|
+
catch (OperationCanceledException) { }
|
|
51
|
+
catch (Exception ex) { ErrorMessage = ex.Message; }
|
|
52
|
+
finally { IsBusy = false; }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
Never fire unawaited `async void` mutations from button clicks.
|
|
31
58
|
|
|
32
|
-
##
|
|
59
|
+
## Typography, motion, accessibility, & forms idioms
|
|
33
60
|
|
|
34
|
-
|
|
61
|
+
Register custom fonts via `ConfigureFonts(...)` in `MauiProgram.cs` and keep `FontAutoScalingEnabled="True"` on essential text; avoid fixed `HeightRequest` on labels that clip at `200%` font scale.
|
|
35
62
|
|
|
36
|
-
|
|
63
|
+
MAUI animations (`FadeTo`, `TranslateTo`) do not automatically query every OS reduced-motion flag—abstract reduced motion per platform (`UIAccessibility.IsReduceMotionEnabled` on iOS, `ANIMATOR_DURATION_SCALE` on Android, `UISettings.AnimationsEnabled` on Windows) and cancel in-flight animations on `OnDisappearing`.
|
|
37
64
|
|
|
38
|
-
|
|
65
|
+
Set `SemanticProperties.Description`, `SemanticProperties.Hint` (sparingly), and `SemanticProperties.HeadingLevel` on interactive and structural controls, and test TalkBack, VoiceOver, and Narrator separately—shared XAML does not guarantee equivalent native accessibility trees. In forms, configure `Keyboard`, `ReturnType`, focus order, validation after completion with text recovery copy (not red borders alone), and preserve input across navigation.
|
|
39
66
|
|
|
40
67
|
## Do/don't pairs
|
|
41
68
|
|
|
42
69
|
| Do | Don't |
|
|
43
70
|
|---|---|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
71
|
+
| `{AppThemeBinding Light=..., Dark=...}` + `x:DataType` compiled bindings | Inline hex literals and untyped runtime-only bindings |
|
|
72
|
+
| `[RelayCommand(IncludeCancelCommand = true)]` via `CommunityToolkit.Mvvm` | Fire-and-forget `async void` event handlers with silent failures |
|
|
73
|
+
| `CollectionViewHandler2` on iOS/Mac Catalyst for complex lists | Ship legacy iOS `CollectionView` layout glitches without profiling |
|
|
74
|
+
| Native `Window.TitleBar` on Windows/Mac Catalyst (.NET 9+) | Custom borderless titlebar hacks missing drag or window buttons |
|
|
75
|
+
| `SemanticProperties.Description` & `HeadingLevel` verified per OS | Tap gesture recognizer on a `Label` masquerading as a button |
|
|
49
76
|
|
|
50
77
|
## Known traps
|
|
51
78
|
|
|
52
|
-
|
|
79
|
+
EOL target frameworks (`net8.0-*`—upgrade to `net9.0-*` or `net10.0-*`), silent XAML binding errors without `x:DataType`, `async void` crash/lifecycle leaks, legacy iOS `CollectionView` measurement glitches, fixed-height clipping under font scaling, platform-divergent safe-area insets on Android 15/16, unverified accessibility trees across iOS/Android/Windows.
|
|
53
80
|
|
|
54
81
|
## Verification commands
|
|
55
82
|
|
|
56
83
|
```sh
|
|
57
84
|
dotnet build
|
|
58
85
|
dotnet test
|
|
59
|
-
|
|
60
|
-
dotnet build -t:Run -f
|
|
86
|
+
# Run target platform builds when matching workloads & simulators/emulators are installed:
|
|
87
|
+
dotnet build -t:Run -f net9.0-android # or net10.0-android
|
|
88
|
+
dotnet build -t:Run -f net9.0-ios # or net10.0-ios
|
|
61
89
|
```
|
|
62
90
|
|
|
63
|
-
|
|
91
|
+
`dotnet build` and `dotnet test` provide `static` evidence. Inspect real Android/iOS/Windows/Mac Catalyst runs with TalkBack/VoiceOver/Narrator, Dark Mode, High Contrast, font scaling, orientation/resize, and offline recovery for `rendered` evidence; label unavailable targets `not-checked`.
|
|
@@ -2,52 +2,79 @@
|
|
|
2
2
|
|
|
3
3
|
## Token mapping
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
Store semantic colors, spacing, and typography roles in a Python module and wire them into `page.theme` and `page.dark_theme` (`ft.Theme` + `ft.ColorScheme`) once rather than passing hex literals to every control. Flet 0.25–1.0 evolved rapidly (introducing declarative `@ft.component` + hooks in 1.0 alongside imperative `page.add` / `page.update` in 0.25–0.28); inspect the installed `flet` version before choosing constructor names.
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import flet as ft
|
|
9
|
+
|
|
10
|
+
class PcTokens:
|
|
11
|
+
ACTION = "#0074CA"
|
|
12
|
+
CONTROL_INLINE = 12
|
|
13
|
+
|
|
14
|
+
# Declarative idiom (Flet 1.0+):
|
|
15
|
+
@ft.component
|
|
16
|
+
def InvoiceActions(on_save):
|
|
17
|
+
saving, set_saving = ft.use_state(False)
|
|
18
|
+
return ft.SafeArea(
|
|
19
|
+
ft.Column(
|
|
20
|
+
spacing=PcTokens.CONTROL_INLINE,
|
|
21
|
+
controls=[
|
|
22
|
+
ft.FilledButton(
|
|
23
|
+
"Save invoice" if not saving else "Saving...",
|
|
24
|
+
disabled=saving,
|
|
25
|
+
on_click=lambda _: (set_saving(True), on_save()),
|
|
26
|
+
),
|
|
27
|
+
],
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
def main(page: ft.Page):
|
|
32
|
+
page.adaptive = True # renders Cupertino controls on iOS/macOS, Material on Android/Windows/Linux
|
|
33
|
+
page.theme = ft.Theme(color_scheme_seed=PcTokens.ACTION)
|
|
34
|
+
page.theme_mode = ft.ThemeMode.SYSTEM
|
|
35
|
+
page.render(lambda: InvoiceActions(on_save=lambda: None))
|
|
36
|
+
```
|
|
14
37
|
|
|
15
|
-
##
|
|
38
|
+
## Layout, adaptive controls, & SafeArea
|
|
16
39
|
|
|
17
|
-
|
|
40
|
+
- Always wrap top-level mobile screens in **`ft.SafeArea(...)`** so notches, Dynamic Island, status bars, and gesture navigation bars do not clip content or bottom actions.
|
|
41
|
+
- Enable **`page.adaptive = True`** (or opt into `ft.CupertinoButton`, `ft.CupertinoNavigationBar`, `ft.CupertinoAlertDialog`, `ft.CupertinoSlidingSegmentedButton` explicitly on Apple targets) so iOS/macOS users do not receive foreign Material chrome.
|
|
42
|
+
- Handle window/viewport resizing (`page.on_resized`) explicitly because Flet renders via Flutter across iOS, Android, macOS, Windows, Linux, and Web—do not freeze one desktop wireframe across every target.
|
|
18
43
|
|
|
19
|
-
##
|
|
44
|
+
## Typography, motion, & reduced motion
|
|
20
45
|
|
|
21
|
-
|
|
46
|
+
Register custom font files via `page.fonts = {"Brand": "/fonts/Brand.ttf"}` and verify glyph coverage and fallback fonts on the actual target OS. Avoid fixed pixel `height` on text containers so localized or scaled copy does not clip.
|
|
22
47
|
|
|
23
|
-
|
|
48
|
+
Keep `animate`, `animate_opacity`, and `animate_position` durations brief and interruptible. Because system reduced-motion forwarding varies across Flutter/Flet hosts, expose an app-level reduced-motion toggle when animations carry motion and never use animation as the sole state cue.
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
## Accessibility, states, & forms idioms
|
|
26
51
|
|
|
27
|
-
|
|
52
|
+
Use real interactive controls (`FilledButton`, `IconButton`, `Switch`, `Checkbox`, `TextField`) with `tooltip`, `label`, and `semantics_label` (`ft.Semantics`) rather than wrapping styled `ft.Text` in `ft.GestureDetector` or clickable `ft.Container`. Verify keyboard Tab order and VoiceOver/TalkBack/Narrator output on the shipped platform.
|
|
28
53
|
|
|
29
|
-
|
|
54
|
+
Model async state (`loading`, `empty`, `error`, `offline`) explicitly via reactive state or page controls with cancellation and duplicate-submit guards—never launch untracked `asyncio.create_task` loops that mutate detached controls. In forms, pair `ft.TextField` with persistent `label`, `keyboard_type`, `error_text` validated after completion/submit, and draft preservation across `page.views` / route changes.
|
|
30
55
|
|
|
31
56
|
## Do/don't pairs
|
|
32
57
|
|
|
33
58
|
| Do | Don't |
|
|
34
59
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
60
|
+
| Centralize tokens in `page.theme` / `page.dark_theme` + `ft.SafeArea` | Scatter raw hex strings and forget safe-area padding on iOS/Android |
|
|
61
|
+
| Enable `page.adaptive = True` or `ft.Cupertino*` on Apple surfaces | Ship identical Material-only dialogs and controls to iOS users |
|
|
62
|
+
| Use real `ft.FilledButton` / `ft.IconButton` + `ft.Semantics` | Build primary actions from `ft.Container(on_click=...)` with no semantics |
|
|
63
|
+
| Track async tasks cleanly and guard against double-submit | Fire unawaited background coroutines that fail silently or race |
|
|
64
|
+
| Preserve form values in state across route transitions | Re-instantiate blank `ft.TextField` controls on every route push |
|
|
40
65
|
|
|
41
66
|
## Known traps
|
|
42
67
|
|
|
43
|
-
|
|
68
|
+
API differences between Flet 0.25–0.28 imperative apps and Flet 1.0 declarative `@ft.component` apps, forgetting `ft.SafeArea` on Android 15/16 edge-to-edge or notched iPhones, packaging failures in `flet build` when native Python C-extensions are not compiled for mobile ABIs, missing `page.update()` in imperative mode, unverified screen-reader trees on target OS.
|
|
44
69
|
|
|
45
70
|
## Verification commands
|
|
46
71
|
|
|
47
72
|
```sh
|
|
48
|
-
flet run app.py 2>/dev/null || python app.py
|
|
49
|
-
python -m pytest
|
|
50
73
|
python -m compileall .
|
|
74
|
+
python -m pytest
|
|
75
|
+
# Interactive run and mobile/desktop packaging (requires Flutter SDK for flet build):
|
|
76
|
+
flet run app.py
|
|
77
|
+
flet build apk # or: flet build ipa / flet build macos / flet build linux
|
|
51
78
|
```
|
|
52
79
|
|
|
53
|
-
|
|
80
|
+
`compileall` and `pytest` provide `static` / logic evidence only. Inspect actual `flet run` and packaged `flet build` outputs on target devices/OSes for safe areas, adaptive Cupertino/Material parity, dark mode, text scaling, and screen-reader behavior (`rendered`; label untested platforms `not-checked`).
|
|
@@ -1,69 +1,113 @@
|
|
|
1
1
|
# Flutter
|
|
2
2
|
|
|
3
|
-
Evidence: current Flutter docs confirm `MediaQuery.disableAnimationsOf(context)` corresponds to Android Remove animations; iOS reduce motion is exposed separately through accessibility features/reduceMotion in newer APIs.
|
|
4
|
-
|
|
5
3
|
## Token mapping
|
|
6
4
|
|
|
7
|
-
Map
|
|
5
|
+
Map DTCG tokens into `ColorScheme`, `ThemeData`, `TextTheme`, component themes, and typed `ThemeExtension` subclasses for semantic roles outside Material defaults (spacing, semantic status surfaces, radii):
|
|
8
6
|
|
|
9
7
|
```dart
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
@immutable
|
|
9
|
+
class PcSpacing extends ThemeExtension<PcSpacing> {
|
|
10
|
+
const PcSpacing({required this.controlInline, required this.sectionGap});
|
|
11
|
+
final double controlInline;
|
|
12
|
+
final double sectionGap;
|
|
13
|
+
|
|
14
|
+
@override
|
|
15
|
+
PcSpacing copyWith({double? controlInline, double? sectionGap}) => PcSpacing(
|
|
16
|
+
controlInline: controlInline ?? this.controlInline,
|
|
17
|
+
sectionGap: sectionGap ?? this.sectionGap,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
@override
|
|
21
|
+
PcSpacing lerp(PcSpacing? other, double t) => other == null
|
|
22
|
+
? this
|
|
23
|
+
: PcSpacing(
|
|
24
|
+
controlInline: lerpDouble(controlInline, other.controlInline, t)!,
|
|
25
|
+
sectionGap: lerpDouble(sectionGap, other.sectionGap, t)!,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
final lightTheme = ThemeData(
|
|
30
|
+
colorScheme: ColorScheme.fromSeed(seedColor: PcTokens.brandSeed),
|
|
31
|
+
extensions: const [PcSpacing(controlInline: 12, sectionGap: 20)],
|
|
12
32
|
);
|
|
13
33
|
```
|
|
14
34
|
|
|
15
|
-
|
|
35
|
+
Never scatter raw `Color(0xff…)` or hard-coded padding numbers across widgets.
|
|
16
36
|
|
|
17
|
-
##
|
|
37
|
+
## Rendering engine (Impeller) & platform adaptation
|
|
18
38
|
|
|
19
|
-
|
|
39
|
+
- **Impeller** is Flutter's default renderer on iOS and Android (API 29+ via Vulkan with OpenGLES fallback on older/unsupported GPUs), eliminating Skia shader-compilation jank. Still profile custom fragment shaders, backdrop blurs, and heavy `saveLayer` clipping on mid-tier Android hardware rather than assuming desktop/simulator frame pacing.
|
|
40
|
+
- Respect host platform conventions rather than forcing identical chrome on iOS and Android: use adaptive widgets (`Switch.adaptive`, `Slider.adaptive`, `CircularProgressIndicator.adaptive`, `AlertDialog.adaptive`), iOS-idiomatic **`CupertinoSheetRoute` / `showCupertinoSheet`** for stacked modal sheets on Apple devices, and Material navigation/predictive back on Android.
|
|
20
41
|
|
|
21
|
-
##
|
|
42
|
+
## Navigation (`GoRouter`) & state (`Riverpod 3`)
|
|
22
43
|
|
|
23
|
-
|
|
44
|
+
- Use **`GoRouter`** with **`StatefulShellRoute.indexedStack`** for persistent multi-tab state, typed deep-link routes, redirect guards, and Android predictive back integration:
|
|
24
45
|
|
|
25
|
-
|
|
46
|
+
```dart
|
|
47
|
+
StatefulShellRoute.indexedStack(
|
|
48
|
+
builder: (context, state, navShell) => AppShell(navigationShell: navShell),
|
|
49
|
+
branches: [
|
|
50
|
+
StatefulShellBranch(routes: [GoRoute(path: '/invoices', builder: (_, __) => const InvoicesScreen())]),
|
|
51
|
+
StatefulShellBranch(routes: [GoRoute(path: '/settings', builder: (_, __) => const SettingsScreen())]),
|
|
52
|
+
],
|
|
53
|
+
);
|
|
54
|
+
```
|
|
26
55
|
|
|
27
|
-
|
|
56
|
+
- Model async state explicitly (`AsyncValue` / sealed state) with **`Riverpod 3`** (`@riverpod` codegen, built-in retry/offline persistence primitives, automatic `Ref` disposal) or your project's established `Bloc`/`ValueNotifier` architecture. Never rely on uncoordinated boolean flags (`isLoading && !hasError`).
|
|
28
57
|
|
|
29
|
-
##
|
|
58
|
+
## Typography, accessibility, & reduced motion
|
|
30
59
|
|
|
31
|
-
|
|
60
|
+
Declare font families in `pubspec.yaml` with localization fallbacks. Read platform scaling, contrast, and motion preferences explicitly through `MediaQuery` and `AccessibilityFeatures`:
|
|
32
61
|
|
|
33
|
-
|
|
62
|
+
```dart
|
|
63
|
+
final textScaler = MediaQuery.textScalerOf(context);
|
|
64
|
+
final highContrast = MediaQuery.highContrastOf(context);
|
|
65
|
+
final reduceMotion =
|
|
66
|
+
MediaQuery.disableAnimationsOf(context) ||
|
|
67
|
+
View.of(context).platformDispatcher.accessibilityFeatures.reduceMotion;
|
|
68
|
+
final largeText = textScaler.scale(16) >= 24;
|
|
69
|
+
```
|
|
34
70
|
|
|
35
|
-
|
|
71
|
+
- Reflow horizontal label/value rows into `Column` layouts when `largeText` is true rather than clipping in fixed-height `SizedBox` containers.
|
|
72
|
+
- Dispose every `AnimationController` and skip non-essential spatial transitions when `reduceMotion` is true.
|
|
73
|
+
- Wrap custom visuals with `Semantics(label:, button:, liveRegion:)` and exclude decorative icons with `ExcludeSemantics`. Maintain ≥ `48×48 dp` (Android) / `44×44 pt` (iOS) targets (`kMinInteractiveDimension`). Verify semantic trees in TalkBack and VoiceOver.
|
|
36
74
|
|
|
37
|
-
## Forms
|
|
75
|
+
## Forms, restoration & 2026 store gates
|
|
38
76
|
|
|
39
|
-
Use `Form
|
|
77
|
+
Use `Form` + `TextFormField` with explicit `keyboardType`, `textInputAction`, `autofillHints` (`AutofillHints.email`, etc.), `FocusNode` traversal, `ScrollViewKeyboardDismissBehavior.onDrag` for interactive keyboard dismissal, and `AutovalidateMode.onUnfocus` (or on-submit) so errors do not scold mid-keystroke.
|
|
78
|
+
|
|
79
|
+
- **OS process-death restoration**: set `restorationScopeId: 'app'` on `MaterialApp.router` / `CupertinoApp.router` and persist active tab/route and unsent form inputs with `RestorationMixin` (`RestorableTextEditingController`, `RestorableInt`) or Riverpod persisted storage so `adb shell am kill` and iOS RAM eviction never wipe active tasks.
|
|
80
|
+
- **`120fps` ProMotion & `< 1.2 s` cold start**: enable `<key>CADisableMinimumFrameDurationOnPhone</key><true/>` in `ios/Runner/Info.plist` so Impeller drives `120 Hz` ProMotion (`< 8.33 ms`/frame), seed release gestures into `SpringSimulation(..., velocity)`, and defer heavy plugin init past `runApp()`.
|
|
81
|
+
- **2026 App Store & Google Play compliance**:
|
|
82
|
+
- **iOS**: build with **Xcode 26 SDK**, ship `PrivacyInfo.xcprivacy` (auditing every CocoaPod/SPM plugin's privacy manifest), store tokens solely in Keychain via `flutter_secure_storage` (never `shared_preferences`), offer **Sign in with Apple** parity whenever social login exists, wire real **in-app Account Deletion**, and use zero-permission system photo pickers (`image_picker` PHPicker / Android Photo Picker).
|
|
83
|
+
- **Android**: target **`targetSdk = 36`** (`.aab`), call `SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge)` while consuming `MediaQuery.paddingOf(context)` / `viewInsetsOf(context)`, keep `sw >= 600dp` tablets/foldables unlocked across orientations/postures, enable Predictive Back (`android:enableOnBackInvokedCallback="true"` + `PopScope`), store secrets in Android Keystore (`flutter_secure_storage`), and compile all FFI/plugin native `.so` binaries with **NDK r28+** (`16 KB` ELF page alignment verified via `zipalign -c -P 16`).
|
|
84
|
+
|
|
85
|
+
## Flutter web (WasmGC / Skwasm) note
|
|
86
|
+
|
|
87
|
+
Flutter 3.29 removed the legacy HTML renderer; Flutter Web now compiles to **WasmGC (`Skwasm`)** (`flutter build web --wasm`) or CanvasKit (`JS`). Canvas-rendered web apps require explicit `SemanticsBinding.instance.ensureSemantics()` / accessibility verification and still trade off native browser text selection, bundle startup size, and SEO. For browser-dominant or content/SEO products, apply `pixelcraft-web` verification and compare a DOM-rendered alternative in `pixelcraft-plan` before committing.
|
|
40
88
|
|
|
41
89
|
## Do/don't pairs
|
|
42
90
|
|
|
43
91
|
| Do | Don't |
|
|
44
92
|
|---|---|
|
|
45
|
-
| `FilledButton(onPressed: save, child: Text('Save invoice'))` | `GestureDetector`
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
| `
|
|
50
|
-
|
|
51
|
-
## Flutter web note
|
|
52
|
-
|
|
53
|
-
Flutter can target web, but choose rendering mode deliberately. Canvas-heavy Flutter web does not automatically provide normal browser semantics, text selection, SEO, deep-link behavior, or accessibility parity. For browser-dominant products, apply `pixelcraft-web` verification and compare a DOM/server-rendered alternative in `pixelcraft-plan` before committing.
|
|
93
|
+
| `FilledButton(onPressed: save, child: const Text('Save invoice'))` | `GestureDetector` wrapping styled `Text` as a primary control |
|
|
94
|
+
| Check both `MediaQuery.disableAnimationsOf(context)` and `accessibilityFeatures.reduceMotion` | Assume Flutter disables custom `AnimationController` loops automatically |
|
|
95
|
+
| Set `CADisableMinimumFrameDurationOnPhone = true`, `targetSdk = 36`, NDK r28+ (`16 KB` `.so`), and `flutter_secure_storage` | Cap ProMotion at `60fps`, ship `4 KB`-aligned `.so` plugins, or store auth tokens in `shared_preferences` |
|
|
96
|
+
| Wire `restorationScopeId` + `RestorationMixin`, `PrivacyInfo.xcprivacy`, and real in-app Account Deletion | Lose form drafts on `adb shell am kill` or punt account deletion to a support email |
|
|
97
|
+
| `StatefulShellRoute.indexedStack` + `Switch.adaptive` / `CupertinoSheetRoute` | Rebuild tab roots on every tap or force identical Android dialogs onto iOS |
|
|
54
98
|
|
|
55
99
|
## Known traps
|
|
56
100
|
|
|
57
|
-
|
|
101
|
+
Using `BuildContext` across `async` gaps without `context.mounted` checks, `AnimationController`/`TextEditingController` disposal leaks, fixed-height `Container` clipping `TextScaler` at `200%`, outdated FFI plugins bundling `4 KB`-aligned Android `.so` binaries, storing tokens in `shared_preferences`, missing `Semantics` labels on custom `CustomPainter` views, brittle golden tests using fake single-word fixtures.
|
|
58
102
|
|
|
59
103
|
## Verification commands
|
|
60
104
|
|
|
61
105
|
```sh
|
|
62
106
|
flutter analyze
|
|
63
107
|
flutter test
|
|
64
|
-
flutter
|
|
65
|
-
|
|
66
|
-
|
|
108
|
+
flutter build appbundle --release
|
|
109
|
+
# Verify 16 KB native library alignment on Android release artifact:
|
|
110
|
+
zipalign -c -P 16 -v 4 build/app/outputs/flutter-apk/app-release.apk
|
|
67
111
|
```
|
|
68
112
|
|
|
69
|
-
|
|
113
|
+
`flutter analyze`, unit/widget tests, and `zipalign -c -P 16` are `static` evidence. Inspect real iOS (`>= 2`) and Android (`>= 3` across Pixel + OEM skins) devices across TalkBack/VoiceOver, `TextScaler` `200%`, Dark Mode, High Contrast, Reduce Motion, `adb shell am kill` restoration, and predictive/swipe back for `rendered` evidence; label untested targets `not-checked`.
|