@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,87 +1,77 @@
|
|
|
1
|
-
# Telegram, Zalo, WhatsApp, and
|
|
1
|
+
# Telegram, Zalo, WhatsApp, Teams, LINE, and WeChat
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Verify exact schema versions and host API availability against current official docs before releasing; mobile and business super-app runtimes update rapidly.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Telegram Bots and Mini Apps (Bot API 8.x–9.x)
|
|
6
6
|
|
|
7
|
-
| Constraint |
|
|
7
|
+
| Constraint | Documented limit / rule |
|
|
8
8
|
|---|---|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
9
|
+
| Text message length | 1–4,096 characters after entity parsing |
|
|
10
|
+
| Media caption length | 0–1,024 characters after entity parsing |
|
|
11
|
+
| Inline button `callback_data` | **1–64 UTF-8 bytes** (CJK/Vietnamese/emoji take 2–4 bytes each—measure byte length, never JS `.length`) |
|
|
12
|
+
| Callback acknowledgement | **Always call `answerCallbackQuery`** on every inline tap to dismiss the client loading spinner |
|
|
13
|
+
| Entity nesting | Respect Telegram nesting rules; blockquotes cannot nest; prefer explicit entities or escaped HTML |
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
- **Keyboards**: Attach inline keyboards to message-scoped actions; make reply keyboards `one_time_keyboard` or explicitly removable so they do not hijack the composer indefinitely.
|
|
16
|
+
- **Mini App (`Telegram.WebApp`) modern capabilities (Bot API 8.0–9.x)**:
|
|
17
|
+
- Use **`MainButton`** (primary action) paired with **`SecondaryButton`** (secondary/cancel action) and **`BackButton`** instead of duplicating fixed bottom bars inside the WebView.
|
|
18
|
+
- Honor safe areas using **`--tg-safe-area-inset-top/bottom/left/right`** and **`--tg-content-safe-area-inset-*`** CSS variables, especially when using **`requestFullscreen()` / `exitFullscreen()`** on mobile.
|
|
19
|
+
- Feature-detect **`addToHomeScreen()`**, **`BiometricManager`** (auth gate with graceful fallback), **`CloudStorage` / `SecureStorage`** (bot-scoped client persistence), and **Telegram Stars** digital goods checkout via `openInvoice(url)` (currency `XTR`).
|
|
20
|
+
- Always verify **`initData`** HMAC signature server-side with the bot token; never trust client-provided `initDataUnsafe` user IDs for authorization. Bind UI colors to `themeParams` rather than hardcoding a single theme.
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
## Zalo Mini Apps, ZaUI, and Zalo OA (ZNS)
|
|
17
23
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- URL/deep-link buttons must be clearly labeled by destination.
|
|
24
|
+
- Configure pages, header style, status bar, and safe areas in **`app-config.json`**, use **`zmp-ui`** (`zmp-ui/zaui.css` + `<App theme="light" | "dark">`) for ZDS-compliant components, and access host APIs through **`zmp-sdk`** (`authorize`, `getUserInfo`, `openChat`, `getStorage`/`setStorage`, `getSystemInfo`).
|
|
25
|
+
- Design for embedded Vietnamese phone viewports (account for stacked diacritics and line height), intermittent mobile networks, permission-denial recovery, and server-side token exchange.
|
|
26
|
+
- For proactive business notifications outside active user chat sessions, use approved **Zalo OA / ZNS (Zalo Notification Service)** transactional templates with parameterized fields rather than unauthorized free-form pushes.
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
## WhatsApp Business Interactive Messages and Flows
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
| Constraint | Documented limit |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Interactive body text | up to **1,024 characters** |
|
|
33
|
+
| Reply buttons | up to 3 buttons, **max 20 characters per title** |
|
|
34
|
+
| List message | up to 10 rows total; section & row title **max 24 chars**, description **max 72 chars** |
|
|
35
|
+
| CTA URL button (`cta_url`) | single external link button with explicit display text (max 20 chars) |
|
|
36
|
+
| Carousel templates | pre-approved multi-card media templates with identical button count/types across every card |
|
|
37
|
+
| Service window | Interactive list/reply messages require an open 24-hour user-initiated window; proactive outreach requires approved templates or Flows |
|
|
38
|
+
|
|
39
|
+
- **WhatsApp Flows (JSON multi-screen forms)**: Use Flows for structured appointment booking, lead capture, or checkout instead of forcing 8 back-and-forth text turns. Define typed `screens` (`Form`, `TextInput`, `Dropdown`, `DatePicker`, `Footer` with `data_exchange` or `complete`), implement **RSA-OAEP + AES-GCM payload encryption/decryption** on your data-exchange endpoint, return clear field-level validation errors on the active screen, and test narrow truncation on 20-char button labels.
|
|
40
|
+
|
|
41
|
+
## Microsoft Teams Adaptive Cards, Dialogs, and Teams AI Library
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
- Teams desktop/web/mobile and Microsoft Copilot Chat target **Adaptive Cards schema 1.5** (supporting **`Carousel`**, **`CodeBlock`**, and **`Chart.*`** elements where host-verified—always test in the actual target client, not just the web designer, because Outlook Actionable Messages and Bot Framework Web Chat diverge).
|
|
44
|
+
- Use **`Action.Execute`** with `refresh` payloads so cards transition cleanly from actionable to completed/expired state across channel viewers, provide concise `speak` text, and respect HostConfig rather than fighting Teams typography or dark/high-contrast themes.
|
|
45
|
+
- **Teams AI Library**: For LLM agents in Teams, use native streaming responses (`streamer.emit(...)`), **`setGeneratedByAI` / AI disclosure badges**, sensitivity labels, inline numbered citations, and feedback-loop buttons.
|
|
46
|
+
- **Teams Dialogs (Task Modules) & Tabs**: Use `@microsoft/teams-js` (`dialog.url.open` / `app.notifySuccess`) for complex multi-step forms or auth popups that exceed Adaptive Card input limits.
|
|
33
47
|
|
|
34
|
-
|
|
48
|
+
## LINE LIFF and Flex Messages
|
|
35
49
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- the `App` container supplies shared context/theme, with documented `"light"` and `"dark"` theme values.
|
|
50
|
+
- **Flex Messages**: Compose rich cards via JSON `bubble` (single card with `header`, `hero`, `body`, `footer` boxes) or `carousel` (up to 12 horizontally scrollable bubbles). Every Flex Message **must include a concise `altText`** (max 400 chars) shown in chat lists, push notifications, and unsupported clients.
|
|
51
|
+
- **Quick Replies**: Attach up to 13 transient action chips (`message`, `postback`, `datetimepicker`, `camera`, `location`) at the bottom of a message for single-tap next replies; they disappear once tapped.
|
|
52
|
+
- **LIFF SDK v2**: Initialize with `await liff.init({ liffId })`, verify `liff.getIDToken()` server-side against LINE's verify endpoint (never trust decoded JWTs unverified), respect configured sheet height (`compact`, `tall`, `full`), check `liff.isInClient()` before calling `liff.sendMessages()` or `liff.closeWindow()`, and provide a clean browser fallback when opened outside LINE.
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
## WeChat Mini Program (`WXML` / `WXSS` / `wx.*`)
|
|
42
55
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- use
|
|
46
|
-
- verify current package/runtime versions and host API availability rather than relying on community tutorials;
|
|
47
|
-
- handle login/permission denial and expired session explicitly.
|
|
56
|
+
- Build layouts in **`WXML`** and **`WXSS`** using responsive **`rpx`** units (750 rpx = screen width), calculate custom navigation bar clearance from **`wx.getMenuButtonBoundingClientRect()`** and `wx.getWindowInfo()` safe-area insets so controls never collide with WeChat's floating capsule button.
|
|
57
|
+
- Authenticate via `wx.login()` -> send ephemeral `code` to your server -> exchange via `code2Session` (never expose `AppSecret` in Mini Program code); handle `wx.requestPayment` failures/cancellations idempotently.
|
|
58
|
+
- Respect hard **2 MB main-package size budgets** via `subpackages` lazy loading, and use **Official Account / Subscription Message templates** strictly with explicit user opt-in (`wx.requestSubscribeMessage`) and truthful transactional content.
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
## Cross-platform bot webhook & interaction reliability (`Slack`, `Discord`, `Telegram`, `Zalo`, `WhatsApp`, `Teams`, `LINE`, `WeChat`)
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
- **Fast webhook `ack` (`< 2–3 s`) + async progress state**: acknowledge every incoming webhook, slash command, button tap, or callback query within **`< 2–3 s`** (`HTTP 200`, `deferReply`, `answerCallbackQuery`, or `Action.Execute` interim card), push heavy LLM/API work to an async queue, and update the placeholder message in place with progress/results so host timeouts never show `"This interaction failed"`.
|
|
63
|
+
- **Idempotent event deduplication**: messaging hosts retry webhooks on transient `5xx` or slow edges (`X-Slack-Retry-Num`, Telegram `update_id`, WhatsApp `messages[].id`, LINE `webhookEventId`, WeChat `MsgId`). Deduplicate on a short-TTL idempotency key before executing mutations or sending replies so users never get double-charged or duplicate bot messages.
|
|
64
|
+
- **Edited & deleted message handling**: subscribe to `message_changed`/`edited_message` and `message_deleted`/recall events—abort in-flight generations for deleted prompts, avoid crashing when editing/replying to a user-deleted message (`400 message to edit not found`), and clearly mark or refresh bot answers when the source prompt was edited.
|
|
65
|
+
- **Invalid command & missing-parameter guidance**: when a slash/text command has malformed syntax or missing required arguments, reply ephemerally with concise usage examples, valid option chips/buttons, or pre-filled modal/Flow launchers—never dump raw parser tracebacks or stay silent.
|
|
52
66
|
|
|
53
|
-
|
|
67
|
+
## Do/don't pairs
|
|
54
68
|
|
|
55
|
-
|
|
|
69
|
+
| Do | Don't |
|
|
56
70
|
|---|---|
|
|
57
|
-
|
|
|
58
|
-
| reply
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
Rules:
|
|
65
|
-
|
|
66
|
-
- use reply buttons for 1–3 immediate mutually exclusive decisions;
|
|
67
|
-
- use lists for bounded larger choices, not deep browsing;
|
|
68
|
-
- write labels that fit the host truncation limits and remain distinguishable when truncated;
|
|
69
|
-
- do not encode state in user-visible text; validate webhook payloads server-side;
|
|
70
|
-
- account for unsupported platforms/clients and template fallback;
|
|
71
|
-
- do not use marketing pressure or ambiguous confirmation in a high-trust messaging surface;
|
|
72
|
-
- preserve message ordering/idempotency because users can reopen earlier interactions.
|
|
73
|
-
|
|
74
|
-
## Microsoft Teams Adaptive Cards
|
|
75
|
-
|
|
76
|
-
Current Microsoft agent-design documentation lists Teams desktop/web/mobile and Microsoft Copilot Chat at Adaptive Cards schema **1.5**, Dynamics 365 live chat at 1.5, Bot Framework Web Chat at 1.6 with `Action.Execute` unsupported, and Outlook Actionable Messages on a separate 1.0–1.2 track. Verify before release because host support changes.
|
|
77
|
-
|
|
78
|
-
Rules:
|
|
79
|
-
|
|
80
|
-
- set the card `version` deliberately and test in the real target host, not only the designer;
|
|
81
|
-
- HostConfig controls spacing/fonts/colors/actions/interactivity; Teams/host styling is not yours to override arbitrarily;
|
|
82
|
-
- prefer `Action.Execute` where supported for a unified invoke model, but verify host support and provide appropriate fallback behavior;
|
|
83
|
-
- use inputs only when the interaction truly requires structured data; validate server-side because client input is not trustworthy;
|
|
84
|
-
- use `refresh`/card update semantics deliberately so cards reflect completed/expired state;
|
|
85
|
-
- keep cards narrow-friendly; Teams mobile reflow can reorder/stack visual assumptions;
|
|
86
|
-
- provide meaningful `speak`/text equivalents for important visual content where the schema supports them;
|
|
87
|
-
- never assume full CSS, arbitrary HTML, or web-like layout control exists inside Adaptive Cards.
|
|
71
|
+
| Return webhook `ack` in `< 2–3 s` + async progress state and deduplicate `update_id` / `webhookEventId` / `MsgId` idempotently | Run a `12 s` synchronous LLM call inside the webhook handler or execute duplicate mutations on host retries |
|
|
72
|
+
| Handle edited/deleted user messages gracefully and show actionable usage examples + quick-reply pickers on invalid/incomplete commands | Crash on `message not found` when a user deletes a prompt or fail silently on missing command parameters |
|
|
73
|
+
| Measure UTF-8 bytes for Telegram's 64-byte `callback_data` and always call `answerCallbackQuery` | Check `.length` on multibyte strings or leave Telegram buttons spinning |
|
|
74
|
+
| Validate `initData` HMAC (Telegram), `getIDToken()` (LINE), and `wx.login` code (WeChat) server-side | Trust client-passed user IDs from Mini App JS globals |
|
|
75
|
+
| Use WhatsApp Flows (with RSA/AES data-exchange encryption) for multi-field collection | Force 10 sequential free-text chat turns for a booking form |
|
|
76
|
+
| Provide mandatory `altText` (LINE Flex), `speak` (Teams), and safe-area insets (Telegram/WeChat/Zalo) | Assume rich cards render identically in push notifications or fullscreen notches |
|
|
77
|
+
| Keep Teams Adaptive Cards narrow-friendly and verified on mobile + high contrast | Rely solely on the desktop Adaptive Card designer preview |
|
|
@@ -1,96 +1,80 @@
|
|
|
1
1
|
# Slack Block Kit and Discord
|
|
2
2
|
|
|
3
|
-
Exact limits
|
|
3
|
+
Exact limits and component capabilities evolve. Verify against current official platform docs before shipping schema changes.
|
|
4
4
|
|
|
5
5
|
## Slack Block Kit
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
| Constraint |
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
| `plain_text
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
- put the primary action in a native button/select; links are secondary;
|
|
39
|
-
- label buttons by outcome (`Approve request`, not `OK`);
|
|
40
|
-
- use stable `action_id`/`block_id` values for interaction routing, but do not put secrets in them;
|
|
41
|
-
- acknowledge interaction quickly and update/respond asynchronously where needed;
|
|
42
|
-
- design already-handled/expired interaction states because messages can outlive the action validity or backend state.
|
|
7
|
+
### Core payload limits and timeouts
|
|
8
|
+
|
|
9
|
+
| Constraint | Documented limit / rule |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Blocks in one message | 50 |
|
|
12
|
+
| Blocks in a Modal or Home tab | 100 |
|
|
13
|
+
| `plain_text` / `mrkdwn` text object | 1–3,000 characters |
|
|
14
|
+
| `header` block `plain_text` | up to 150 characters |
|
|
15
|
+
| `button` label text | **up to 75 characters** |
|
|
16
|
+
| Section `fields` | up to 10 objects (2,000 chars each) |
|
|
17
|
+
| `block_id` / `action_id` | up to 255 characters; unique per message/view |
|
|
18
|
+
| **Interaction `ack()` timeout** | **Must return HTTP 200 within 3 seconds** (post slow work asynchronously via `response_url` or Web API) |
|
|
19
|
+
|
|
20
|
+
### Modern blocks (`rich_text`, native `table`, `header`) and AI Assistant surfaces
|
|
21
|
+
|
|
22
|
+
- Prefer **`rich_text`** blocks for structured nested lists, quotes, inline code, and styled text—avoiding `mrkdwn` escaping edge cases.
|
|
23
|
+
- Use Slack's native **`table` block** for compact tabular summaries instead of broken monospace ASCII tables.
|
|
24
|
+
- Use `header` (`plain_text`, <= 150 chars) for scannable card titles paired with concise `context` metadata.
|
|
25
|
+
- **Slack AI Assistants & Agents surfaces**: When building an app enabled as a Slack AI Assistant (split-pane DM/thread experience), use:
|
|
26
|
+
- `assistant.threads.setTitle` (auto-name the thread from the user's question),
|
|
27
|
+
- `assistant.threads.setStatus` (honest progress copy like `"Searching billing records…"`),
|
|
28
|
+
- `assistant.threads.setSuggestedPrompts` (up to 4 concrete starter prompts),
|
|
29
|
+
- native streaming via **`chat.startStream`**, **`chat.appendStream`**, and **`chat.stopStream`** instead of spamming `chat.update` rate limits, and
|
|
30
|
+
- **`feedback_buttons`** context/action elements for thumbs-up/down evaluation hooks.
|
|
31
|
+
|
|
32
|
+
### Surface model and `mrkdwn` safety
|
|
33
|
+
|
|
34
|
+
- **Messages**: Persistent or ephemeral channel/DM payloads. Always include a concise top-level `text` field for push notifications, screen readers, and degraded clients.
|
|
35
|
+
- **Modals**: Focused bounded multi-field views (`views.open` requires a fresh `trigger_id` valid for 3 seconds). Never rebuild a full SaaS app inside chained modals.
|
|
36
|
+
- **Home tabs**: Persistent per-user workspace (`views.publish`); design explicit loading, empty, and error states.
|
|
37
|
+
- **`mrkdwn` escaping**: Slack `mrkdwn` is neither CommonMark nor HTML—escape `&`, `<`, and `>` on all untrusted user text before interpolating into `mrkdwn`, and never put secrets in `action_id`, `block_id`, or button `value`.
|
|
43
38
|
|
|
44
39
|
## Discord
|
|
45
40
|
|
|
46
|
-
###
|
|
47
|
-
|
|
48
|
-
Documented embed limits include:
|
|
41
|
+
### Legacy embeds vs Components V2
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|---|---:|
|
|
52
|
-
| title | 256 characters |
|
|
53
|
-
| description | 4096 characters |
|
|
54
|
-
| fields per embed | 25 |
|
|
55
|
-
| field name | 256 characters |
|
|
56
|
-
| field value | 1024 characters |
|
|
57
|
-
| footer text | 2048 characters |
|
|
58
|
-
| author name | 256 characters |
|
|
59
|
-
| combined title/description/field/footer/author text | 6000 characters |
|
|
60
|
-
| embeds per message | 10 |
|
|
43
|
+
Documented legacy embed limits: title 256, description 4,096, 25 fields (name 256 / value 1,024), footer 2,048, author 256, combined text 6,000, max 10 embeds per message. Never split one logical response across 10 embeds.
|
|
61
44
|
|
|
62
|
-
|
|
45
|
+
**Components V2** is opt-in per message via flag `IS_COMPONENTS_V2 = 1 << 15` (`32768`). Setting this flag is irreversible for that message and replaces `content`/`embeds`/`poll`/`stickers` with up to **40 total components**:
|
|
63
46
|
|
|
64
|
-
|
|
47
|
+
- **Layout & display components**: `Container` (accent color, spoiler flag), `Section` (text + accessory), `Text Display`, `Media Gallery`, `Separator`, **`Thumbnail`** (type 11, Section accessory), and **`File`** (type 13, exposing uploaded `attachment://` files inline).
|
|
48
|
+
- **Interactive components**: `Action Row` holds up to 5 buttons **or** 1 select menu (`String`, `User`, `Role`, `Channel`, `Mentionable`); every interactive component needs a unique per-message `custom_id`.
|
|
49
|
+
- Use Components V2 when structured containers, inline files, and section thumbnails materially improve clarity; keep standard messages/embeds for simple bot responses needing legacy compatibility.
|
|
65
50
|
|
|
66
|
-
|
|
51
|
+
### Expanded Modals (2025–2026) and interaction timeouts
|
|
67
52
|
|
|
68
|
-
- `
|
|
69
|
-
-
|
|
70
|
-
- `
|
|
71
|
-
-
|
|
53
|
+
- **Expanded Modal components**: Discord modals are no longer limited to bare `TextInput` fields—modern modals support **`Label`** wrappers with descriptions, **Select Menus** (String/User/Role/Channel/Mentionable), **File Upload**, and **Radio / Checkbox** inputs alongside short/paragraph text inputs. Verify exact field limits and component type numbers against current Discord API docs before shipping.
|
|
54
|
+
- **Mandatory timing rules**:
|
|
55
|
+
- **3-second initial acknowledgement**: Respond to every slash command, button, select, or modal submit within **3 seconds** (or immediately defer with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` / `DEFERRED_UPDATE_MESSAGE`).
|
|
56
|
+
- **15-minute interaction token expiry**: Webhook follow-ups and edits using the interaction token expire after **15 minutes**—design explicit expiration/disabled states or transition to channel/bot-token updates for longer workflows.
|
|
57
|
+
- Always enforce invoker ownership server-side and send private validation/permission errors as ephemeral replies (`EPHEMERAL = 1 << 6`).
|
|
72
58
|
|
|
73
|
-
|
|
59
|
+
### Discord Embedded App SDK (Activities)
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
- Text Display, Media Gallery, Section, Separator, and Container compose static structure;
|
|
77
|
-
- interactive components need unique per-message `custom_id` values;
|
|
78
|
-
- Text Input is modal-only. Modal examples document `max_length` up to 4000 for paragraph input, but validate exact field-level constraints in the current reference before depending on them.
|
|
61
|
+
When a rich interactive experience (multiplayer canvas, collaborative board, game, complex configurator) exceeds message components, launch an **Activity** inside Discord's iframe sandbox using **`@discord/embedded-app-sdk`**:
|
|
79
62
|
|
|
80
|
-
|
|
63
|
+
- Initialize `new DiscordSDK(clientId)`, await `discordSdk.ready()`, exchange the OAuth2 `code` on your backend server (never expose `client_secret` in the iframe), and call `discordSdk.commands.authenticate({ access_token })`.
|
|
64
|
+
- Route third-party external assets/APIs through Discord's URL proxy (`patchUrlMappings`) so CSP does not silently block fonts, images, or APIs.
|
|
65
|
+
- Design for variable embedded sizes (narrow PiP / voice tile, desktop panel, mobile portrait) and respect Discord channel participant presence honestly.
|
|
81
66
|
|
|
82
|
-
|
|
67
|
+
## Do/don't pairs
|
|
83
68
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
69
|
+
| Do | Don't |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Ack Slack & Discord interactions within `< 2–3 s`, defer slow work with async progress status, and deduplicate `X-Slack-Retry-Num` / `event_id` / `interaction.id` idempotently | Wait on an LLM/DB call before HTTP 200 or execute duplicate mutations on webhook retries |
|
|
72
|
+
| Handle `message_changed` / `message_deleted` (`MESSAGE_UPDATE` / `MESSAGE_DELETE`) and return ephemeral usage guidance + pickers on invalid/missing command parameters | Crash when editing a deleted message or fail silently on incomplete slash/text commands |
|
|
73
|
+
| Stream Slack AI Assistant replies with `chat.startStream`/`appendStream`/`stopStream` | Hammer `chat.update` on every token until rate-limited |
|
|
74
|
+
| Use Slack native `table` and `rich_text` blocks + top-level fallback `text` | Render monospace ASCII tables that shatter on mobile |
|
|
75
|
+
| Use Discord Components V2 `Section` + `Thumbnail` / `File` intentionally | Enable `IS_COMPONENTS_V2` and still pass ignored `content` / `embeds` |
|
|
76
|
+
| Expire or disable Discord buttons after the 15-min token / task window | Leave dead buttons returning `"This interaction failed"` |
|
|
90
77
|
|
|
91
|
-
##
|
|
78
|
+
## Verification
|
|
92
79
|
|
|
93
|
-
|
|
94
|
-
- count Unicode characters/bytes according to the platform definition, not JavaScript string assumptions alone;
|
|
95
|
-
- inspect desktop/mobile compactness, dark/light themes, long usernames/localized strings, screen-reader output where accessible, and permission-denied interactions;
|
|
96
|
-
- keep a plain-text summary or fallback path for clients/automation that cannot render the rich surface.
|
|
80
|
+
Validate Block Kit / Discord JSON payloads before send, count UTF-8 characters accurately (especially localized labels approaching Slack's 75-char button limit), test `< 2–3 s` `ack` deferral, idempotent retry deduplication, edited/deleted message events, invalid-command guidance, and 15-minute expiry paths, and inspect desktop, mobile, light/dark themes, and fallback notifications (`rendered` where tested in real clients; `static` for JSON schema tests).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-constrained
|
|
3
|
-
description: "Designs and verifies interfaces for constrained or nonstandard surfaces: TV/console/10-foot UI, D-pad
|
|
3
|
+
description: "Designs and verifies interfaces for constrained or nonstandard surfaces: TV/console/10-foot UI (Roku/BrightScript, Fire TV/Vega OS, tvOS, Compose for TV, webOS/Tizen), D-pad spatial focus, watchOS/Compose for Wear OS, e-ink displays, POS/ISA-101 HMI/kiosks, embedded MCU UI (LVGL, Slint MCU, TouchGFX, Qt for MCUs, embedded-graphics), automotive CarPlay/Android Auto/AAOS, and Realtime Voice AI/WebRTC voice agents/Siri App Intents/Alexa+. Use when viewing distance, input hardware, refresh physics, memory budgets, or safety fundamentally constrains the interface."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -14,38 +14,39 @@ Constraint is the primary design material. Do not shrink a desktop/mobile interf
|
|
|
14
14
|
|
|
15
15
|
Prioritize the one task the physical situation allows: visible spatial focus from the sofa, an at-a-glance answer on the wrist, or a static acknowledgment on low-refresh displays. Verify at the actual viewing distance, input device and refresh class. If effects compete with guidance, remove the effects; do not infer hardware readiness from web emulation.
|
|
16
16
|
|
|
17
|
+
## Detection signals
|
|
18
|
+
|
|
19
|
+
Roku `manifest`/`.brs`/SceneGraph XML, Fire TV / Vega OS (`KeplerScript`, React Native for Vega), `react-native-tvos` / LightningJS, Android TV (`androidx.tv:tv-material`, `FEATURE_LEANBACK`, Leanback), tvOS SwiftUI/UIKit (`@FocusState`, `.focusSection`), LG webOS (`appinfo.json`, `@enact/sandstone`), Samsung Tizen (`config.xml`, `tizen.tvinputdevice`), Wear OS (`androidx.wear.compose`, `TileService`, Watch Face Format XML), watchOS (`WatchKit`, SwiftUI Watch, `WidgetKit` Smart Stack), E-Ink EPD vendor SDKs (Boox/Kindle/reMarkable), POS/kiosk lockdown (`LockTask`, Assigned Access, Single App Mode), ISA-101 HMI specs, embedded UI (`lv_conf.h` LVGL v9, Slint `#![no_std]` MCU, `embedded-graphics`, `.touchgfx` TouchGFX, `Qt Quick Ultralite` Qt for MCUs), automotive (`CPTemplateApplicationSceneDelegate`, CarPlay Ultra, `CarAppService`, `CarUxRestrictionsManager`), Realtime Voice AI (`@openai/realtime`, Gemini Live, LiveKit Agents, Pipecat, ElevenLabs), Apple `AppIntents`, Alexa APL/Alexa+, Google `AppFunctions`, and SSML templates.
|
|
20
|
+
|
|
17
21
|
## References
|
|
18
22
|
|
|
19
|
-
- Read [references/tv-wearables.md](references/tv-wearables.md)
|
|
20
|
-
- Read [references/specialized-hardware.md](references/specialized-hardware.md) for
|
|
21
|
-
- Read [references/voice-ui.md](references/voice-ui.md)
|
|
23
|
+
- Read [references/tv-wearables.md](references/tv-wearables.md) when building 10-foot TV/console UIs (Roku BrightScript, Fire TV/Vega OS, React Native TV/LightningJS, Compose for TV, tvOS 26, webOS Enact, Tizen), D-pad focus engines, Compose for Wear OS 5/6 Material 3 Expressive, or watchOS 10–26.
|
|
24
|
+
- Read [references/specialized-hardware.md](references/specialized-hardware.md) when designing for E-Ink (Boox/Kaleido 3/Gallery 3), POS & ISA-101 industrial HMIs, kiosk lockdown, embedded MCUs (LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, Qt for MCUs), or automotive CarPlay/CarPlay Ultra/Android Auto/AAOS.
|
|
25
|
+
- Read [references/voice-ui.md](references/voice-ui.md) when building classic SSML/IVR voice flows, 2025–2026 Realtime Voice AI / WebRTC voice agents (OpenAI Realtime, Gemini Live, LiveKit, Pipecat, ElevenLabs), Apple Siri App Intents, Alexa APL/Alexa+, or Google Gemini App Functions.
|
|
22
26
|
|
|
23
27
|
## Required workflow
|
|
24
28
|
|
|
25
29
|
1. **Measure the constraint.** Record viewing distance, screen size/resolution/color depth/refresh behavior, input sensors/buttons, orientation, environment noise/lighting, user posture, network/compute/memory budget, and safety/regulatory context.
|
|
26
|
-
2. **Choose the interaction model.** Spatial focus, direct touch, rotary/crown, physical buttons, voice, remote/
|
|
30
|
+
2. **Choose the interaction model.** Spatial focus, direct touch, rotary/crown, physical buttons, voice, remote/controller, template host, passive glance, or multimodal hybrid. Do not emulate pointer semantics where none exist.
|
|
27
31
|
3. **Reduce scope per glance/turn.** Define the minimum usable task unit, default action, persistent escape/back path, and recoverable error state.
|
|
28
32
|
4. **Design focus/state explicitly.** Every interactive surface needs initial focus, directional movement, focus visibility, trapping prevention, idle/timeout behavior, disabled/loading/error states, and restoration after interruption.
|
|
29
33
|
5. **Verify on hardware or faithful emulation.** Simulator rendering is not evidence for legibility, focus, motion comfort, refresh artifacts, or physical reach. Label unavailable hardware checks `not-checked`.
|
|
30
34
|
|
|
31
35
|
## Non-negotiable rules
|
|
32
36
|
|
|
33
|
-
|
|
|
37
|
+
| Domain | Mandatory hardware & human-factors contract |
|
|
34
38
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| anti-slop | Do not port dense dashboards, tiny text, hover-only menus, decorative motion, carousels without position control, or desktop dialogs onto constrained surfaces. |
|
|
39
|
+
| **10-Foot TV** | Deterministic 4-way D-pad spatial graph with **column-index memory across vertical rows**, visible focus halo (`scale 1.04–1.08` + high-contrast ring), **`5%` action / `10%` title overscan safe zones**, and **QR Code / `RFC 8628` Device Authorization Flow** (never force 32-char remote password entry). |
|
|
40
|
+
| **Wearables** | True **`#000000` OLED** canvas (**`< 15–20%` On-Pixel Ratio** in Always-On Display), **`<= 2–3 s` single-glance micro-task**, **`1` primary CTA per screen**, rotary Crown/Bezel haptic detents, and **graceful Watch standalone operation when the companion phone is away/disconnected** (local cache/queue + truthful offline badge rather than a dead `"Connect phone"` wall). |
|
|
41
|
+
| **Kiosk & POS (`ADA` / `EN 301 549`)** | Wheelchair reach **`38–122 cm` (`15–48"`)** or persistent **"Lower Screen / Reachability Mode"** toggle, **`>= 60×60 px` (`12–15 mm`)** touch targets, tactile audio-jack keypad nav with **auto volume/locale reset between sessions**, **`30–60 s` idle timeout with `"Still there?"` countdown (`WCAG 2.2.1`) before purging PII/cart state**, receipt-printer paper-low/offline queue, **power-loss / sudden-reboot safe transactional state recovery**, and **`72 h+` zero-leak soak stability**. |
|
|
42
|
+
| **Automotive IVI (`NHTSA` / `ISO 15005`)** | **`< 2.0 s` single glance / `< 12.0 s` cumulative glance** budget, **`>= 15×15 mm`** touch targets, **lock complex typing/video while `speed > 0`** (handoff to voice/wheel controls), and **instant zero-flash Day <-> Night theme switch** on tunnel ambient-light transitions. |
|
|
43
|
+
| **Embedded MCU, E-Ink & Regulated Safety** | Compile-time static `Flash`/`SRAM` budget (**`0` runtime heap fragmentation**) verified on the **lowest-spec target hardware SKU**, **`VSYNC` / Tearing-Effect (`TE`) double-buffered DMA transfer**, `15–30 ms` physical button debounce, **power-loss / brownout-safe dual-bank / journaled state recovery**, scheduled E-Ink waveforms, and an **explicit regulated-industry certification boundary (`IEC 62304` medical / `ISO 26262` automotive / `ISA-101` / `DO-178C` certified vs uncertified prototype scope)**. |
|
|
44
|
+
| **Voice UI (`VUI`)** | **`< 300 ms` local barge-in audio cutoff** + assistant transcript truncation on user speech, **`<= 3` options / `< 10–12 s` spoken turns**, explicit read-back confirmation before irreversible actions, progressive reprompts, and multimodal transcript fallback. |
|
|
42
45
|
|
|
43
46
|
## Pre-submit checklist
|
|
44
47
|
|
|
45
|
-
- [ ] physical
|
|
46
|
-
- [ ]
|
|
47
|
-
- [ ]
|
|
48
|
-
- [ ]
|
|
49
|
-
- [ ]
|
|
50
|
-
- [ ] real hardware/emulator behavior was tested or explicitly labeled `not-checked`;
|
|
51
|
-
- [ ] empty/loading/error/offline/interruption states preserve orientation and input.
|
|
48
|
+
- [ ] physical distance, input modality, refresh physics, **lowest-target-hardware `Flash`/`SRAM`/CPU contract**, and **explicit regulated-industry certification boundary (certified vs uncertified)** documented;
|
|
49
|
+
- [ ] **TV / Wearables**: 4-way D-pad column memory + `scale 1.04–1.08` focus halo + `5%/10%` safe zone + `RFC 8628` QR login (TV); `#000000` OLED `< 15–20%` AOD OPR + `1` CTA + rotary detents + **Watch standalone operation when phone is away** (Wear);
|
|
50
|
+
- [ ] **Kiosk / POS / IVI**: `38–122 cm` reachability toggle + `>= 60×60 px` targets + `"Still there?"` PII wipe + `72 h+` soak (Kiosk); `< 2 s / < 12 s` glance + `>= 15×15 mm` targets + `speed > 0` lockout + zero-flash tunnel Day/Night switch (IVI);
|
|
51
|
+
- [ ] **MCU / E-Ink / Power-Loss / Voice**: `0` runtime heap churn + `VSYNC`/`TE` DMA + `15–30 ms` button debounce + **power-loss / sudden-reboot safe state recovery** + E-Ink waveform schedule; `< 300 ms` VUI barge-in cutoff + `<= 3` options / `< 10–12 s` turns + read-back confirmation;
|
|
52
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, hardware/emulator tests on lowest-target specs, 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`).
|
|
@@ -1,66 +1,90 @@
|
|
|
1
|
-
# E-ink,
|
|
1
|
+
# E-ink, POS, industrial HMI, kiosks, embedded MCUs, and automotive surfaces
|
|
2
2
|
|
|
3
|
-
## E-ink / electronic paper
|
|
3
|
+
## E-ink / electronic paper & color EPD specifics
|
|
4
4
|
|
|
5
|
-
E-ink is a stateful
|
|
5
|
+
E-ink is a stateful, reflective, bistable display—never treat it as a slow LCD:
|
|
6
6
|
|
|
7
|
-
- full refreshes flash
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- test ghosting, temperature effects, grayscale banding, touch latency, and actual partial/full refresh behavior on target hardware.
|
|
7
|
+
- **Refresh & waveform modes**: full refreshes invert/flash to clear ghosting; fast partial modes (**Boox EPD** `Speed` / `A2` / `X` vs crisp `Normal` / `Regal`) reduce latency at the cost of lower grayscale fidelity and accumulated ghosting. Switch to fast mode only during brief pan/zoom or typing, then trigger a clean `Regal`/full refresh on stop—and expose a manual full-refresh action.
|
|
8
|
+
- **Color e-ink physics**:
|
|
9
|
+
- **Kaleido 3 (e.g., Kindle Colorsoft, Boox Color)**: passive color filter array over a 300 PPI B&W panel yields **~150 PPI color** with a noticeably darker white point and muted pastel gamut. Keep small body text pure crisp black-on-white; reserve color for high-contrast highlights, tags, and coarse charts.
|
|
10
|
+
- **Gallery 3 (e.g., reMarkable Paper Pro)**: multi-pigment capsules deliver richer color at higher native resolution, but full color transitions require noticeably slower multi-stage flashes. Batch updates tightly and avoid continuous hover/scroll repaints.
|
|
11
|
+
- **Dithering & anti-patterns**: apply intentional ordered or Floyd-Steinberg dithering for photography/illustrations; avoid subtle gray gradients, animated spinners, smooth momentum scrolling (prefer crisp pagination), and live per-second counters. Remember the last rendered frame persists when the device sleeps—display honest timestamped status (`Updated 14:20`, not `Live`).
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## POS, industrial HMI (ISA-101), & kiosk lockdown
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
### Point-of-Sale (POS)
|
|
16
|
+
- **Dual cashier + customer displays**: show itemized totals, discounts, tax, and clear tap/insert prompts on the customer-facing display while keeping staff-only overrides, PIN fields, and back-office actions strictly on the cashier screen.
|
|
17
|
+
- **EMV / NFC tap idempotency**: attach an idempotency key to every card-present authorization and lock the payment state machine while awaiting terminal response so a network timeout or double-tap **never** double-charges a customer.
|
|
18
|
+
- **Fixed muscle-memory grids**: keep high-frequency item/tender buttons in deterministic, fixed screen positions—never dynamically reorder cashier grids by "trending" or recent popularity.
|
|
19
|
+
- **Offline store-and-forward**: visibly badge queued offline orders (`Offline queue: 3 pending`), enforce configured offline floor limits, and reconcile cleanly upon reconnect.
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### Industrial HMI (**ISA-101 High-Performance HMI**)
|
|
22
|
+
- **Muted normal state**: render normal operating equipment, pipes, and backgrounds in low-saturation neutral grays—**never** bright animated 3D gradients or saturated green pumps everywhere (which obscure real faults).
|
|
23
|
+
- **Reserved alarm colors + redundant encoding**: reserve high-chroma red, amber/yellow, and cyan strictly for active abnormal/alarm priorities, always paired with a unique geometric shape, priority number (`P1`/`P2`), and concise text so color-blind operators recognize severity instantly under harsh plant lighting.
|
|
24
|
+
- **Physical E-stop supersedes software**: software "Stop" controls assist normal sequencing only; never label or rely on a touchscreen button as a safety-rated emergency stop (E-stop).
|
|
25
|
+
- **Stale / bad-quality telemetry**: when a PLC/OPC-UA/Modbus tag loses communication or exceeds freshness TTL, immediately replace normal numeric values with a distinct bad-quality state (dashed frame, `?` / `STALE`, last-good timestamp)—never leave frozen stale readings styled as live normal state.
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **failure:** paper jam/payment/network/scanner failure needs plain-language recovery and staff/support path;
|
|
26
|
-
- **environment:** glare, noise, wet/gloved hands, cleaning damage, camera/keyboard occlusion, and unstable mounting matter.
|
|
27
|
+
### Public kiosks (`ADA §308 / §707` & `EN 301 549`) & terminal reliability
|
|
28
|
+
- **Wheelchair reach (`38–122 cm` / `15–48"`) & Reachability Mode**: place all interactive controls within **`38–122 cm` (`15–48"`)** above the finished floor, **OR** render a persistent, high-contrast **"Lower Screen / Reachability Mode"** button anchored inside the bottom reach zone that shifts upper interactive controls down into reach.
|
|
29
|
+
- **Touch target floor & tactile audio-jack navigation**: size touch buttons **`>= 60×60 px` (`12–15 mm` physical)** with generous spacing against Parallax/gloved taps; support **tactile keypad / `3.5 mm` audio-jack spoken navigation** (`ADA §707` / `EN 301 549`) and **automatically reset audio volume, speech rate, and UI language to default** at the end of every customer session.
|
|
30
|
+
- **Idle timeout (`30–60 s`) + `"Still there?"` countdown (`WCAG 2.2.1`) & PII wipe**: after `30–60 s` of inactivity, display an accessible **`"Still there?"` countdown modal** (`>= 20 s` to extend session); if unanswered or when a user taps `Finish`/`Cancel`, **atomically purge all PII, auth tokens, form inputs, cached receipts, and cart state** before returning to the non-audio-dependent attract loop.
|
|
31
|
+
- **Hardware telemetry & `72 h+` soak gate**: monitor receipt-printer **paper-low / cover-open / cutter-jam** states (degrading gracefully to SMS/QR digital receipt or queued offline print rather than freezing checkout), lock OS chrome (`LockTask` / `Single App Mode` / `Assigned Access`), and pass a **`72 h+` continuous automated session-loop soak test** with zero heap/DOM/WebGL memory leaks.
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
## Embedded MCUs: LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, & Qt for MCUs
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
Measure real framebuffer bytes, **compile-time static `Flash` / `SRAM` budgets**, DMA2D/GPU acceleration, worst-case input latency, and thermal limits before selecting a toolkit:
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
| Framework | Language | Rendering & footprint | Best fit |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| **LVGL v9** | C (C++/Rust/MicroPython bindings) | Retained `lv_obj_t` tree, partial draw buffers (`1/10` screen RAM), ~32–64 KB RAM floor | Broadest MCU/RTOS ecosystem (ESP32, STM32, Zephyr, NuttX) |
|
|
40
|
+
| **Slint MCU** | Rust (`#![no_std]`) / C++ + `.slint` DSL | Static-allocation declarative UI compiled ahead-of-time, line-by-line renderer | Safety/Rust teams sharing clean declarative UI across desktop + MCU |
|
|
41
|
+
| **`embedded-graphics`** | Rust (`#![no_std]`) | Zero-allocation immediate draw primitives (`DrawTarget`, bitmaps, mono fonts) | Ultra-tiny monochrome OLEDs, e-paper tags, bare-metal sensors (<16 KB RAM) |
|
|
42
|
+
| **TouchGFX** | C++ (STM32) | Hardware-accelerated STM32 Chrom-ART (DMA2D) / NeoChrom GPU | High-FPS 60fps appliance/medical displays on STM32 MCUs |
|
|
43
|
+
| **Qt for MCUs** | QML subset → C++ (`Qt Quick Ultralite`) | Static compiled QML engine with hardware acceleration | Teams standardizing on Qt/QML across Linux MPU and RTOS MCU product lines |
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
**LVGL v9 concrete idiom** (double-buffered DMA, reusable static `lv_style_t`, and `lv_group_t` for rotary encoder / physical keypad navigation):
|
|
35
46
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- design for monochrome/low color depth with redundant shape/text encoding;
|
|
42
|
-
- avoid alpha blending/rotation/anti-aliasing assumptions until profiled;
|
|
43
|
-
- display state honestly when sensors are stale/disconnected/failing.
|
|
47
|
+
```c
|
|
48
|
+
static lv_style_t style_focus;
|
|
49
|
+
lv_style_init(&style_focus);
|
|
50
|
+
lv_style_set_outline_width(&style_focus, 3);
|
|
51
|
+
lv_style_set_outline_color(&style_focus, lv_color_hex(0x0074CA));
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
lv_display_t *disp = lv_display_create(320, 240);
|
|
54
|
+
/* Synchronize double-buffered DMA flush to panel VSYNC / Tearing-Effect (TE) pin */
|
|
55
|
+
lv_display_set_buffers(disp, draw_buf1, draw_buf2, sizeof(draw_buf1), LV_DISPLAY_RENDER_MODE_PARTIAL);
|
|
46
56
|
|
|
47
|
-
|
|
57
|
+
lv_group_t *group = lv_group_create();
|
|
58
|
+
lv_obj_t *btn = lv_button_create(lv_screen_active());
|
|
59
|
+
lv_obj_add_style(btn, &style_focus, LV_STATE_FOCUSED);
|
|
60
|
+
lv_group_add_obj(group, btn); // binds rotary encoder / debounced physical keypad focus
|
|
61
|
+
```
|
|
48
62
|
|
|
49
|
-
|
|
63
|
+
MCU & E-Ink engineering gates:
|
|
64
|
+
- **`0` runtime heap fragmentation**: allocate widgets, glyph bitmaps, and framebuffers statically at boot/compile time (`LV_STDLIB_BUILTIN` fixed pool or `#![no_std]` static structs)—never `malloc`/`free` dynamically per frame.
|
|
65
|
+
- **Tear-free `VSYNC` / `TE` double-buffered DMA**: synchronize SPI/RGB/MIPI-DSI DMA buffer swaps to the panel's hardware **Tearing-Effect (`TE`)** or **`VSYNC`** interrupt so horizontal motion never shears diagonally.
|
|
66
|
+
- **Physical button & rotary debounce (`15–30 ms`)**: apply hardware RC or deterministic **`15–30 ms` software state-machine debounce** on tactile switches and quadrature encoders so contact bounce never double-submits confirmations; on `1-bit`/`4-bit` E-Ink, use pure black-on-white crisp bitmap/hinted typography without gradient soup.
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
## Automotive IVI: CarPlay, Android Auto, AAOS (`NHTSA` / `ISO 15005`)
|
|
52
69
|
|
|
53
|
-
|
|
70
|
+
Driver distraction is a physical safety hazard—enforce **NHTSA Visual-Manual Guidelines** and **ISO 15005** glance budgets strictly:
|
|
54
71
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
72
|
+
- **Glance & target floor**: every driving-accessible task must complete within **`< 2.0 s` per single glance** and **`< 12.0 s` cumulative glance time**, using physical touch targets **`>= 15×15 mm`** with high-contrast labels (`>= 4.5:1`–`7:1` under direct sunlight).
|
|
73
|
+
- **`speed > 0` motion interlocks**: the instant vehicle speed leaves `0` / `Park`, **lock complex QWERTY typing, long-list scrolling, settings setup, and video playback** (`CarUxRestrictionsManager`), handing off seamlessly to **voice (`PTT`) and steering-wheel switches** without losing context.
|
|
74
|
+
- **Instant zero-flash Day <-> Night tunnel switch**: pre-load both Day and Night token palettes in GPU/RAM so entering or exiting a dark highway tunnel switches themes in **`1` frame with zero white-screen flash** (never reload stylesheets or flash `#FFFFFF` into a night-adapted driver's eyes!).
|
|
75
|
+
|
|
76
|
+
### Apple CarPlay & CarPlay Ultra
|
|
77
|
+
- Build apps exclusively on Apple's category-entitled **CarPlay templates** (**`CPListTemplate`**, **`CPMapTemplate`**, **`CPTabBarTemplate`**, **`CPInformationTemplate`**, **`CPNowPlayingTemplate`**, **`CPGridTemplate`**) plus iOS 26 glanceable CarPlay widgets/Live Activities.
|
|
78
|
+
- **CarPlay Ultra** (instrument cluster + center console): respect strict cluster glance budgets, instant Day/Night luminance parity, and OEM telltale priority.
|
|
79
|
+
|
|
80
|
+
### Android Auto & Android Automotive OS (AAOS)
|
|
81
|
+
- **Car App Library (`androidx.car.app`) 5-template task quota**: cap flows at **5 templates**, ending on a documented terminal template (`NavigationTemplate`, `PaneTemplate`, `MessageTemplate`, `MediaPlaybackTemplate`, `SignInTemplate`, `LongMessageTemplate`).
|
|
82
|
+
- **AAOS Distraction Optimization (`CarUxRestrictionsManager`)**: declare `<meta-data android:name="distractionOptimized" android:value="true" />` and obey `UX_RESTRICTIONS_NO_KEYBOARD`, `UX_RESTRICTIONS_LIMIT_STRING_LENGTH`, `UX_RESTRICTIONS_LIMIT_CONTENT`, and `UX_RESTRICTIONS_NO_SETUP` live; keep passenger-zone screens strictly isolated from the driver display.
|
|
63
83
|
|
|
64
84
|
## Shared hardware verification
|
|
65
85
|
|
|
66
|
-
|
|
86
|
+
Never certify hardware surfaces from desktop browser screenshots. Verify on target devices (`rendered`; label missing hardware or regulatory sign-off `not-checked`):
|
|
87
|
+
- E-Ink partial vs full waveform schedule, `1-bit`/`4-bit` pure B&W crispness, and sleep-screen timestamp honesty;
|
|
88
|
+
- POS/Kiosk `38–122 cm` reachability mode, `>= 60×60 px` (`12–15 mm`) targets, audio-jack volume reset, `30–60 s` `"Still there?"` PII purge, printer paper-low/offline queue, and `72 h+` soak memory stability;
|
|
89
|
+
- MCU static `Flash`/`SRAM` map (`0` runtime heap churn), `VSYNC`/`TE` DMA tear check, and `15–30 ms` button debounce;
|
|
90
|
+
- Automotive `< 2.0 s` single / `< 12.0 s` cumulative glance timing, `>= 15×15 mm` targets, `speed > 0` `CarUxRestrictions` lockouts, and zero-flash tunnel Day <-> Night transitions.
|