@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,84 +1,134 @@
|
|
|
1
1
|
# TV, console, and wearable interfaces
|
|
2
2
|
|
|
3
|
-
## TV
|
|
3
|
+
## TV & 10-foot fundamentals
|
|
4
4
|
|
|
5
|
-
Verified constraints:
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- Apple's current typography table lists tvOS default text size **29pt** and minimum **23pt**; watchOS default **16pt** and minimum **12pt**. Treat platform guidance as minimum legibility input, not proof.
|
|
5
|
+
Verified baseline constraints:
|
|
6
|
+
- **Viewing distance**: typical **3 meter / 10-foot** lean-back surface.
|
|
7
|
+
- **Overscan safe zones (`5%` / `10%`)**: keep interactive chrome inside the **`5%` action-safe inset** (`48 dp` L/R, `27 dp` T/B at `960×540` MDPI; `96 px` / `54 px` at `1080p`) and critical typography/logos inside the **`10%` title-safe inset** where legacy broadcast overscan or curved bezels apply; background art may bleed edge-to-edge.
|
|
8
|
+
- **Typography floors**: Apple's typography table lists tvOS default **29 pt** (minimum **23 pt**) and watchOS default **16 pt** (minimum **12 pt**). Treat minimums as floors—prefer larger sizes for critical glance labels.
|
|
9
|
+
- **QR Code / `RFC 8628` OAuth 2.0 Device Authorization Grant**: **never force users to peck a 32-character email + password on an on-screen TV remote keyboard** as the primary login! Render a scannable **QR code + short activation URL & 6–8 char user code (`RFC 8628`)** polling in the background, keeping on-screen keyboard entry strictly as a secondary fallback.
|
|
11
10
|
|
|
12
11
|
TV rules:
|
|
12
|
+
- Pair every focused tile with an unmistakable **focus halo** (**`scale(1.04–1.08)`** transform + `>= 3:1` high-contrast border/ring + elevation shadow; drop scale to `1.0` with thicker ring under `prefers-reduced-motion`).
|
|
13
|
+
- Move metadata into a focused preview panel rather than cramming paragraphs onto every grid card.
|
|
14
|
+
- Remember exact rail/item position when returning from detail or video playback.
|
|
15
|
+
- Never ship hover-only menus, tiny tooltips, right-click triggers, or dense multi-column desktop tables.
|
|
13
16
|
|
|
14
|
-
-
|
|
15
|
-
- reduce reading volume; move detail into a focused panel/modal only when necessary;
|
|
16
|
-
- design horizontal rows/grids around directional scanning, not pointer hover;
|
|
17
|
-
- instant feedback on every D-pad press; long latency without focus movement feels broken;
|
|
18
|
-
- remember row/column position when returning from detail/playback;
|
|
19
|
-
- never use tiny web-style tooltips, hover-only affordance, right-click menus, or dense tables.
|
|
20
|
-
|
|
21
|
-
## D-pad spatial navigation and focus engines
|
|
22
|
-
|
|
23
|
-
Model focus as explicit state:
|
|
17
|
+
## D-pad spatial navigation & focus engines
|
|
24
18
|
|
|
25
|
-
|
|
|
19
|
+
| Focus state | Required behavior |
|
|
26
20
|
|---|---|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
21
|
+
| **Initial entry** | Predictable useful default (resume watching / primary rail), never an arbitrary hidden top-left node. |
|
|
22
|
+
| **Directional move & column memory** | Build a deterministic **4-way (`Up/Down/Left/Right`) spatial graph** with **column-index / horizontal-coordinate memory across vertical rows** (pressing `Down` from column 4 into a 2-item hero banner and `Down` again restores column 4 in the next rail rather than resetting to column 1!). |
|
|
23
|
+
| **Boundary** | Stop visibly, wrap only when intentional, or transition predictably to sidebar/top navigation chrome. |
|
|
24
|
+
| **Content refresh** | Preserve focused item by stable ID; if removed, move to nearest neighbor—never drop focus to `null`. |
|
|
25
|
+
| **Modal / overlay** | Trap focus inside the modal while open and restore focus to the invoking trigger on `Back`. |
|
|
26
|
+
| **Scroll container** | Scroll smoothly enough to reveal focused card and context without overshooting or fighting fast held-down key repeats. |
|
|
27
|
+
|
|
28
|
+
## TV platforms & concrete idioms
|
|
29
|
+
|
|
30
|
+
### Roku BrightScript / SceneGraph
|
|
31
|
+
- Compose rails and grids with virtualized SceneGraph nodes (**`RowList`**, **`MarkupGrid`**) rather than manually instantiating hundreds of `Poster`/`Group` nodes.
|
|
32
|
+
- Handle D-pad, `back`, `options` (`*`), and playback transport keys explicitly in **`onKeyEvent(key as String, press as Boolean) as Boolean`**, returning `true` only when consumed so unhandled `back` presses bubble cleanly:
|
|
33
|
+
|
|
34
|
+
```brightscript
|
|
35
|
+
function onKeyEvent(key as String, press as Boolean) as Boolean
|
|
36
|
+
if not press then return false
|
|
37
|
+
if key = "options"
|
|
38
|
+
showOptionsDialog()
|
|
39
|
+
return true
|
|
40
|
+
else if key = "back" and m.optionsDialog.visible
|
|
41
|
+
hideOptionsDialog()
|
|
42
|
+
return true
|
|
43
|
+
end if
|
|
44
|
+
return false
|
|
45
|
+
end function
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **Strict texture/RAM budgets**: low-end Roku sticks enforce tight graphics-memory caps. Request appropriately sized poster bitmaps (`loadWidth`/`loadHeight`, `loadDisplayMode="scaleToFit"`), unload off-screen art, and profile texture memory in Roku's BrightScript debug console.
|
|
49
|
+
|
|
50
|
+
### Compose for TV (`androidx.tv:tv-material`) & Leanback
|
|
51
|
+
- For new Android TV / Google TV apps, use **Compose for TV** (`androidx.tv:tv-material`: `Card`, `StandardCardContainer`, `Carousel`, `NavigationDrawer`, `Surface` with focus border/glow) and **`Modifier.focusRestorer()`** on lazy rails so returning from detail restores the exact focused card. **Leanback** (`androidx.leanback`) is legacy/maintenance—keep only in existing View-based apps.
|
|
52
|
+
|
|
53
|
+
```kotlin
|
|
54
|
+
val rowRequester = remember { FocusRequester() }
|
|
55
|
+
LazyRow(
|
|
56
|
+
modifier = Modifier.focusRestorer { rowRequester },
|
|
57
|
+
horizontalArrangement = Arrangement.spacedBy(20.dp),
|
|
58
|
+
) {
|
|
59
|
+
itemsIndexed(titles, key = { _, item -> item.id }) { index, item ->
|
|
60
|
+
Card(
|
|
61
|
+
onClick = { onSelect(item) },
|
|
62
|
+
modifier = if (index == 0) Modifier.focusRequester(rowRequester) else Modifier,
|
|
63
|
+
) { PosterTile(item) }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### tvOS (26)
|
|
69
|
+
- Drive focus declaratively in SwiftUI with **`@FocusState`**, **`.focusSection()`** (bridging sparse regions across gaps), **`.prefersDefaultFocus(_:in:)`**, and **`.onMoveCommand`**—never hack manual coordinates.
|
|
70
|
+
- On **tvOS 26**, apply **Liquid Glass** (`.glassEffect`) only to floating chrome/transport controls over artwork or video, verifying 10-foot contrast under Reduce Transparency and Increase Contrast; preserve system focus elevation/scale unless replaced with an equally unmistakable highlight.
|
|
71
|
+
|
|
72
|
+
```swift
|
|
73
|
+
@FocusState private var focusedID: String?
|
|
74
|
+
@Namespace private var heroScope
|
|
75
|
+
|
|
76
|
+
HStack(spacing: 32) {
|
|
77
|
+
ForEach(items) { item in
|
|
78
|
+
Button { play(item) } label: { PosterCard(item: item) }
|
|
79
|
+
.focused($focusedID, equals: item.id)
|
|
80
|
+
.prefersDefaultFocus(item.id == items.first?.id, in: heroScope)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.focusSection()
|
|
84
|
+
.focusScope(heroScope)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Fire TV / Vega OS, React Native TV, LightningJS, webOS, & Tizen
|
|
88
|
+
- **Fire TV / Vega OS**: Fire TV spans Android-based Fire OS **and** Linux-based **Vega OS** (built around React Native for Vega / Kepler SDK). Verify the target Fire TV hardware/OS generation before assuming Android Compose/Leanback availability.
|
|
89
|
+
- **React Native TV & LightningJS**: use **`react-native-tvos`** (`TVFocusGuideView`, `hasTVPreferredFocus`, `nextFocusUp/Down/Left/Right`) for React Native TV targets, or **LightningJS / Lightning 3** (WebGL canvas renderer) on memory-constrained smart TVs and set-top boxes where DOM reflows drop frames.
|
|
90
|
+
- **LG webOS & Samsung Tizen**: on LG webOS, prefer **Enact** (`@enact/sandstone` + `@enact/spotlight` spatial focus engine). On Samsung Tizen, explicitly register hardware remote keys via **`tizen.tvinputdevice.registerKey('MediaPlayPause')`** (and color/channel keys)—unregistered keys never fire JS `keydown` events! Never assume desktop Chromium CSS/RAM parity on multi-year smart TV web engines.
|
|
91
|
+
|
|
92
|
+
### Console / game UI
|
|
93
|
+
Treat gamepads as continuous directional/stick input with explicit dead zones, held-stick acceleration, audio/haptic focus cues, console safe-area settings, and platform certification checklists (TRCs/XRs/Lotcheck)—never force virtual mouse cursors for core menus.
|
|
94
|
+
|
|
95
|
+
## Wearables: Compose for Wear OS & watchOS
|
|
96
|
+
|
|
97
|
+
Wearables are **`<= 2–3 second` single-glance** micro-task surfaces:
|
|
98
|
+
- **True `#000000` OLED canvas & `< 15–20%` AOD On-Pixel Ratio (`OPR`)**: render backgrounds as pure `#000000` so unlit OLED pixels draw zero current and blend seamlessly into watch bezels; in Always-On / ambient mode (`isLuminanceReduced`), strip filled cards to outlines/text so **`< 15–20%` of pixels remain lit**, preventing burn-in and battery drain.
|
|
99
|
+
- **One primary CTA per screen**: cap every screen at **`1` primary action** (`EdgeButton` or bottom pill) plus optional cancel/secondary action; expose rotary **Crown / Bezel scrolling with crisp haptic detents**. Prefer a complication, Tile, or Smart Stack widget over deep app navigation.
|
|
100
|
+
|
|
101
|
+
### Compose for Wear OS Material 3 Expressive (Wear OS 5 / 6)
|
|
102
|
+
- Build screens on **`AppScaffold`** + **`ScreenScaffold`** + **`TimeText`** (curved top clock), **`TransformingLazyColumn`** (automatically scales/morphs items around circular bezels), and **`EdgeButton`** (bezel-hugging curved bottom primary action).
|
|
103
|
+
- Bind rotating crown/bezel scrolling via **`Modifier.rotaryScrollable`** (with `RotaryScrollableDefaults.behavior(scrollableState)` and haptic detents), and adopt **Horologist** helpers where audio/media/layout utilities apply.
|
|
104
|
+
- Surface at-a-glance content via **Tiles (`ProtoLayout`)** and build watch faces strictly in declarative **Watch Face Format (WFF)** XML (mandatory on modern Wear OS—legacy Kotlin canvas watch faces are deprecated).
|
|
105
|
+
|
|
106
|
+
```kotlin
|
|
107
|
+
ScreenScaffold(scrollState = listState) {
|
|
108
|
+
TransformingLazyColumn(
|
|
109
|
+
state = listState,
|
|
110
|
+
modifier = Modifier.rotaryScrollable(
|
|
111
|
+
behavior = RotaryScrollableDefaults.behavior(listState),
|
|
112
|
+
focusRequester = focusRequester,
|
|
113
|
+
),
|
|
114
|
+
) {
|
|
115
|
+
items(items, key = { it.id }) { item -> TaskChip(item) }
|
|
116
|
+
item { EdgeButton(onClick = onStart) { Text("Start") } }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### watchOS (10–26)
|
|
122
|
+
- Design around **Smart Stack** widgets (`WidgetKit`) and full-screen vertical paging (**`.tabViewStyle(.verticalPage)`**) rather than cramped multi-button grids.
|
|
123
|
+
- Support Digital Crown input (**`.digitalCrownRotation(...)`** with haptic detents) and **Double Tap** primary gestures (**`.handGestureShortcut(.primaryAction)`**).
|
|
124
|
+
- Read **`@Environment(\.isLuminanceReduced)`** for Always-On Display: enforce `< 15–20%` OPR on `#000000`, pause sub-minute animations/timers, and keep the critical value readable at low power.
|
|
125
|
+
- On **watchOS 26**, verify **Liquid Glass** toolbar/pill controls remain sharp on small round-cornered OLED screens under Reduce Transparency and wrist-glare conditions.
|
|
75
126
|
|
|
76
127
|
## Verification matrix
|
|
77
128
|
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
- real hardware or `not-checked` label.
|
|
129
|
+
Verify on real hardware or faithful device emulators (`rendered`; label untested hardware `not-checked`):
|
|
130
|
+
- 10-foot viewing distance, `5%` action / `10%` title overscan safe zones, `scale 1.04–1.08` focus halo, and **`RFC 8628` QR Device Authorization** sign-in;
|
|
131
|
+
- 4-way D-pad **column-index memory across vertical rows**, rapid held-down repeat, empty rows, and focus restoration after `Back`/playback;
|
|
132
|
+
- Wearables `#000000` OLED canvas, **`< 15–20%` AOD On-Pixel Ratio**, `<= 2–3 s` single-CTA task completion, circular mask clipping, and Crown/bezel haptic detents;
|
|
133
|
+
- Roku texture-memory caps, Tizen `registerKey` remote transport keys, and low-RAM smart TV scroll frame pacing;
|
|
134
|
+
- reduced motion, high contrast, text scaling, and offline/phone-companion disconnect recovery.
|
|
@@ -1,46 +1,77 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Voice is transient, linear, and invisible
|
|
4
|
-
|
|
5
|
-
## Conversation model
|
|
6
|
-
|
|
7
|
-
- state
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
# Voice UI, Realtime Voice AI agents, and platform assistants
|
|
2
|
+
|
|
3
|
+
Voice is transient, linear, and invisible—users cannot visually scan a menu. Keep turns brief, state explicit, latency bounded, and recovery inexpensive across classic IVR/SSML, 2025–2026 Realtime Voice AI agents, and OS assistant surfaces.
|
|
4
|
+
|
|
5
|
+
## Conversation model & prompt design
|
|
6
|
+
|
|
7
|
+
- **Strict turn budget (`<= 3` options, `< 10–12 s` spoken duration)**: working memory collapses on long audio lists—lead with **state/result first**, cap every spoken prompt under **`10–12 seconds`** (~25–30 words), and present **at most `3` options** per turn:
|
|
8
|
+
- Bad: *"Welcome to the Acme productivity assistant. How can I help you today?"*
|
|
9
|
+
- Better: *"Three invoices are ready. Review them, approve urgent, or say a supplier name."*
|
|
10
|
+
- Ask one question per turn; preserve conversational context across corrections (*"the second one"* resolves against mentioned/visible candidates).
|
|
11
|
+
- Distinguish **no-input** (silence timeout) from **no-match** (recognition/intent miss), ambiguity (*"Acme Corp or Acme Labs?"*), backend failure, and microphone/permission failure.
|
|
12
|
+
- Escalate no-input / no-match recovery progressively—never loop the identical prompt:
|
|
13
|
+
1. Targeted reprompt naming valid examples,
|
|
14
|
+
2. Simplified binary yes/no choice,
|
|
15
|
+
3. **Multimodal transcript / visual card fallback** (selectable list or text input),
|
|
16
|
+
4. Warm handoff preserving captured slots.
|
|
17
|
+
- Never make voice the sole path for critical functionality unless hardware mandates it.
|
|
18
|
+
|
|
19
|
+
## Realtime Voice AI & WebRTC voice agents (2025–2026)
|
|
20
|
+
|
|
21
|
+
Modern speech-to-speech and streaming pipelines (**OpenAI Realtime API**, **Gemini Live API**, **LiveKit Agents**, **Pipecat**, **ElevenLabs Conversational AI**) replace turn-locked IVR trees with low-latency full-duplex audio—creating distinct UX failure modes that must be engineered explicitly:
|
|
22
|
+
|
|
23
|
+
| Concern | Concrete engineering & UX rule |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **Transport (WebRTC vs WebSocket)** | Use **WebRTC** (Opus, adaptive jitter buffer, UDP/ICE) between end-user devices and the voice server/edge for low latency and packet-loss resilience; keep raw WebSockets strictly on reliable server-to-model hops. |
|
|
26
|
+
| **Acoustic VAD vs semantic turn detection** | Pure acoustic VAD (e.g., Silero energy/speech silence timeout) frequently cuts users off mid-sentence while pausing to think or read a number. Pair acoustic VAD with **semantic end-of-turn (EOT)** detection and tune silence timeouts per task (tight for commands, generous for dictating IDs/addresses). |
|
|
27
|
+
| **`< 300 ms` local barge-in cutoff & transcript truncation** | Detect speech onset locally on the client VAD and **halt local speaker output in `< 300 ms`** (never wait for a server round-trip to silence audio!), **AND** send `conversation.item.truncate` with exact played-audio milliseconds so the LLM never assumes the user heard unplayed words. |
|
|
28
|
+
| **AEC & mic privacy indicators** | Enable WebRTC/OS Acoustic Echo Cancellation (`echoCancellation: true`, `noiseSuppression: true`, `autoGainControl: true`) so speaker output never self-triggers false barge-in. Display an unmistakable, non-color-only state indicator (`Muted`, `Listening`, `Thinking`, `Speaking`) plus an always-reachable single-tap Mute / End Call control. |
|
|
29
|
+
| **Latency masking during tool calls** | When a backend tool call exceeds ~500–800 ms, emit one concise truthful status cue (*"Checking order 4821 now…"*) or subtle non-looping earcon—never leave >1.5 s of dead silence (users assume disconnection and repeat themselves) and never spam synthetic filler chatter. |
|
|
30
|
+
| **Irreversible-action read-back confirmation** | Before executing payment, deletion, booking, or external-message tools, perform an **explicit spoken read-back** of the exact entity, amount, and recipient (*"Send $420 to Northwind Supplies—say confirm or cancel"*) or require on-screen tap confirmation. Treat retrieved web/tool text as untrusted data against prompt injection. |
|
|
31
|
+
|
|
32
|
+
## Platform assistant integrations
|
|
33
|
+
|
|
34
|
+
### Apple Siri & App Intents
|
|
35
|
+
Expose structured app actions natively via **`AppIntent`** and zero-setup natural phrases via **`AppShortcutsProvider`**, returning concise spoken **`IntentDialog`** paired with a glanceable SwiftUI **`ShowsSnippetView`** for multimodal devices:
|
|
36
|
+
|
|
37
|
+
```swift
|
|
38
|
+
import AppIntents
|
|
39
|
+
import SwiftUI
|
|
40
|
+
|
|
41
|
+
struct CheckNextInvoiceIntent: AppIntent {
|
|
42
|
+
static let title: LocalizedStringResource = "Check Next Invoice"
|
|
43
|
+
|
|
44
|
+
func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
|
|
45
|
+
let invoice = try await InvoiceStore.shared.nextDue()
|
|
46
|
+
return .result(
|
|
47
|
+
dialog: "Invoice \(invoice.number) for \(invoice.formattedAmount) is due \(invoice.dueLabel).",
|
|
48
|
+
view: InvoiceSnippetView(invoice: invoice)
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
struct InvoiceShortcuts: AppShortcutsProvider {
|
|
54
|
+
static var appShortcuts: [AppShortcut] {
|
|
55
|
+
AppShortcut(
|
|
56
|
+
intent: CheckNextInvoiceIntent(),
|
|
57
|
+
phrases: ["Check my next invoice in \(.applicationName)"],
|
|
58
|
+
shortTitle: "Next Invoice",
|
|
59
|
+
systemImageName: "doc.text"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
33
64
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
4. graceful handoff/end state preserving progress.
|
|
65
|
+
### Amazon Alexa / APL / Alexa+
|
|
66
|
+
- Pair voice responses with **Alexa Presentation Language (APL)** responsive templates on Echo Show / Fire TV screens while ensuring every primary flow still completes cleanly on screenless Echo speakers.
|
|
67
|
+
- For **Alexa+** agentic/LLM-backed skills and actions, publish strict typed tool/action schemas with unambiguous confirmation rules for stateful actions and concise structured outputs the assistant can summarize naturally.
|
|
38
68
|
|
|
39
|
-
|
|
69
|
+
### Google Gemini App Functions (Android)
|
|
70
|
+
- Expose typed app capabilities via Android **AppFunctions** (`@AppFunction` / `androidx.appfunctions`) so on-device and Gemini assistants invoke deterministic, permission-scoped app actions directly rather than relying on fragile UI screen scraping.
|
|
40
71
|
|
|
41
|
-
## SSML basics
|
|
72
|
+
## SSML basics (classic TTS & telephony)
|
|
42
73
|
|
|
43
|
-
SSML
|
|
74
|
+
SSML (W3C Speech Synthesis Markup Language) controls pronunciation, pacing, and data formatting in classic TTS/IVR engines. Validate every tag on the exact target engine—tag support varies widely across Polly, Azure Speech, Google Cloud TTS, and telephony gateways:
|
|
44
75
|
|
|
45
76
|
```xml
|
|
46
77
|
<speak>
|
|
@@ -52,12 +83,22 @@ SSML is an XML vocabulary for speech synthesis control standardized by the W3C.
|
|
|
52
83
|
</speak>
|
|
53
84
|
```
|
|
54
85
|
|
|
55
|
-
Use `say-as` for
|
|
86
|
+
Use `say-as` for digits/characters/dates/currencies, `break` for breathing rhythm, `sub` for acronym pronunciation, `lang` for inline language switches, and `emphasis`/`phoneme` sparingly.
|
|
87
|
+
|
|
88
|
+
## Do/don't pairs
|
|
89
|
+
|
|
90
|
+
| Do | Don't |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Flush audio AND truncate unplayed assistant text from LLM context on barge-in | Leave interrupted sentences in transcript history causing phantom confirmations |
|
|
93
|
+
| Use WebRTC + AEC + semantic EOT turn detection for live voice agents | Rely on raw silence timers over lossy WebSockets that cut users off mid-number |
|
|
94
|
+
| Restate concrete parameters and require confirmation for irreversible tool calls | Execute payments, deletes, or emails silently from noisy ASR or tool data |
|
|
95
|
+
| Expose native `AppIntent` / `AppShortcutsProvider` / Android `@AppFunction` hooks | Force users through brittle screen-scraping or multi-level IVR menus |
|
|
96
|
+
| Emit a brief truthful cue when tool latency exceeds ~600 ms | Leave 3 seconds of dead silence or endlessly loop *"Hold on…"* filler |
|
|
56
97
|
|
|
57
98
|
## Verification
|
|
58
99
|
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
100
|
+
Test live audio paths on target hardware/networks (`rendered`; label untested acoustics/telephony `not-checked`):
|
|
101
|
+
- measure **TTFA** (time to first audio) from end-of-speech under normal and 3G/jittery networks;
|
|
102
|
+
- verify **barge-in truncation** (interrupt mid-sentence, then ask *"What did you just say?"*—the agent must only recall words actually played);
|
|
103
|
+
- test speakerphone **AEC** (verify agent audio does not trigger false self-interruption), background noise, accents, microphone permission denial, and mute toggle honesty;
|
|
104
|
+
- verify irreversible-action confirmations, multimodal screen fallback (APL / Siri snippet / in-app UI), and SSML rendering on the actual speech engine.
|
|
@@ -12,17 +12,17 @@ Craft is controlled decision-making under constraints. Apply the committed direc
|
|
|
12
12
|
|
|
13
13
|
## References
|
|
14
14
|
|
|
15
|
-
- Read [references/typography.md](references/typography.md) when selecting type
|
|
16
|
-
- Read [references/color.md](references/color.md) when
|
|
17
|
-
- Read [references/layout.md](references/layout.md) when designing grids,
|
|
15
|
+
- Read [references/typography.md](references/typography.md) when selecting type (`≤ 2` families + `1` mono), setting `45–75ch` prose measure, enforcing cross-platform tabular numerals (`B6`) and `U+2212` minus, or handling script fallbacks.
|
|
16
|
+
- Read [references/color.md](references/color.md) when building OKLCH ramps, semantic roles, dark-surface `+5–8%` lightness steps & `1px` specular edges (`B4`), vibrancy fallbacks, or checking WCAG + APCA contrast.
|
|
17
|
+
- Read [references/layout.md](references/layout.md) when designing grids, optical icon centroids & concentric corner radii (`B2`), invisible hit-slop, Safe Triangle submenus & slider pointer capture (`B5`), or responsive adaptation.
|
|
18
18
|
- Read [references/layout-quality.md](references/layout-quality.md) before accepting a layout or judging rendered spacing/complexity.
|
|
19
|
-
- Read [references/motion.md](references/motion.md) when
|
|
20
|
-
- Read [references/imagery-icons.md](references/imagery-icons.md) when using photography, illustration, generated media, diagrams, or icon systems.
|
|
19
|
+
- Read [references/motion.md](references/motion.md) when calibrating motion by action frequency & warm tooltip chains (`B1`), origin-aware `0.95→1.0` scaling & faster exits (`B3`), damped springs, or reduced-motion paths.
|
|
20
|
+
- Read [references/imagery-icons.md](references/imagery-icons.md) when using photography, illustration, generated media, diagrams, or unified icon systems.
|
|
21
21
|
|
|
22
22
|
## Operating rules
|
|
23
23
|
|
|
24
24
|
1. Translate the direction card into a small set of repeatable decisions. If every component is special, nothing is.
|
|
25
|
-
2. Use semantic roles rather than raw values: surface/ink/accent/state/data; display/body/ui/caption/data type; spacing rhythm; motion intent.
|
|
25
|
+
2. Use semantic roles rather than raw values: surface/ink/accent/state/data; display/body/ui/caption/data type (`≤ 2` font families + `1` mono unless brief-justified; `45–75ch` reading measure); spacing rhythm; motion intent.
|
|
26
26
|
3. Preserve existing project tokens and component conventions unless explicitly asked to redesign them.
|
|
27
27
|
4. Test choices against real content: long and short strings, empty/error/loading states, dark/light themes, text scaling, RTL/script coverage, and the actual input modality.
|
|
28
28
|
5. Let mode control intensity. Operate prioritizes scanability and consistency; Persuade/Experience can carry stronger composition and imagery; Communicate must survive constrained renderers.
|
|
@@ -30,15 +30,29 @@ Craft is controlled decision-making under constraints. Apply the committed direc
|
|
|
30
30
|
7. Keep platform translation idiomatic: CSS pixels are not pt/dp/sp/native units; desktop windows are not mobile screens; terminal cells and email clients are not browsers.
|
|
31
31
|
8. Measure a craft choice in its own units: text scaling or terminal cells for hierarchy, actual output/client crop for geometry and color, and input-to-feedback or frame stability for motion. A web corpus range is not a quota for native or exported surfaces.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Studio Invisible Craft (`B1–B6`)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
| Law | Mandatory micro-craft bar | Reference |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **`B1` Frequency-calibrated motion** | `0–100ms` high-frequency actions (`0ms` key-repeat & warm tooltip chains), `150–220ms` drawers/modals, `300–500ms` non-blocking expressive moments | `references/motion.md` |
|
|
38
|
+
| **`B2` Optical alignment & concentric radii** | `+1–2` unit optical centroid offset on asymmetric glyphs (play, chevron, arrow), concentric radii (`R_outer = R_inner + padding`, clamped `≥ 0`), balanced vertical text padding | `references/layout.md` |
|
|
39
|
+
| **`B3` Origin-aware & asymmetric overlays** | Subtle `0.95 → 1.0` scale anchored to trigger origin (never `0 → 1` center balloon), faster exit (`100–130ms`) than enter (`160–200ms`), non-bouncy springs (`ζ ≥ 0.85`) | `references/motion.md` |
|
|
40
|
+
| **`B4` Dark-surface luminance & edges** | Elevate dark layers via `+5% to +8%` OKLCH `L` steps (never `#000000` drop shadows), `1px` top/inner specular edge (`7–12%` white), lifted/desaturated accents, vibrancy + opaque reduced-transparency fallback | `references/color.md` |
|
|
41
|
+
| **`B5` Forgiving pointer & touch mechanics** | `+6–10` unit invisible hit-slop around compact `24–28` unit icons, Safe Triangle diagonal submenu corridor (or `120–180ms` grace), pointer capture on sliders/splitters + `Shift`/arrow fine-step | `references/layout.md` |
|
|
42
|
+
| **`B6` Tabular numerals & true minus** | Cross-platform tabular figures (`tabular-nums` / `.monospacedDigit()` / `"tnum"` / `FontFeature.tabularFigures()`) on every counter/timer/price/table column + `U+2212` `−` | `references/typography.md` |
|
|
36
43
|
|
|
37
|
-
-
|
|
38
|
-
- Which single element carries the signature? What stays quiet around it?
|
|
39
|
-
- What are the exact semantic color/type/spacing roles? Which raw values are intentionally absent?
|
|
40
|
-
- How does composition change at narrow, wide, text-scaled, RTL, and dense states?
|
|
41
|
-
- What motion communicates causality or feedback? What is its reduced-motion equivalent?
|
|
42
|
-
- What imagery/icon provenance is real, licensed, generated, or missing?
|
|
44
|
+
## Anti-slop craft guard
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
- **No untouched library defaults:** never ship stock framework themes (untouched starter zinc, uncalibrated default purple, stock desktop widget chrome, default sans everywhere without reason) unless the existing project explicitly locks that system.
|
|
47
|
+
- **No decorative clutter:** ban tinted `40×40` rounded-square icon badges on feature cards, universal `rounded-2xl` + heavy drop shadows, card-inside-card nesting, ambient purple-pink mesh gradients, glowing border beams, pulsing hero pills, and decorative entrance animations on every scroll block.
|
|
48
|
+
- Hierarchy comes from scale, weight, measure, contrast, whitespace, and alignment—never extra chrome.
|
|
49
|
+
|
|
50
|
+
## Pre-submit checklist
|
|
51
|
+
|
|
52
|
+
- [ ] First fixation point and 5-second scan path are established by scale, position, spacing, and contrast (`≤ 2` font families + `1` mono; `45–75ch` prose measure).
|
|
53
|
+
- [ ] Exactly one subject-derived signature element carries expression; surrounding chrome and unified icon stroke/corner language stay quiet for the mode.
|
|
54
|
+
- [ ] All color, type, spacing, elevation, and motion decisions map to semantic roles/tokens—zero untouched starter defaults or arbitrary raw-value sprawl.
|
|
55
|
+
- [ ] Invisible Craft `B1–B6` verified: frequency-calibrated timing & warm tooltips, optical icon centroids & concentric radii, trigger-anchored `0.95→1.0` overlays with faster exits, dark `+5–8%` lightness steps & `1px` specular edges, invisible hit-slop + Safe Triangle + pointer capture, and tabular numerals + `U+2212` minus.
|
|
56
|
+
- [ ] Composition, type measure, and density adapt cleanly across narrow, wide, text-scaled (`200%`), RTL, dark/light, reduced-motion, and reduced-transparency states.
|
|
57
|
+
- [ ] Imagery and icons share one coherent system with verified commercial provenance (real, licensed, generated, or visibly marked user-requested placeholder).
|
|
58
|
+
- [ ] Every visual-craft claim is labeled with its actual evidence (`rendered`, `static`, `model-judgment`, or `not-checked`).
|
|
@@ -44,13 +44,69 @@ accent core L .58 C .16 / hover L .52 C .17 / soft-fill L .91 C .05
|
|
|
44
44
|
dark surface L .20 C .02 / dark raised L .26 C .025 / dark accent L .72 C .11
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## B4 — Dark-surface luminance elevation, specular edges & vibrancy
|
|
48
|
+
|
|
49
|
+
Never build dark mode by mechanically inverting light tokens or dropping `#000000` shadows onto dark cards (black drop shadows vanish on dark surfaces or muddy surrounding pixels):
|
|
50
|
+
|
|
51
|
+
| Rule | Concrete specification | Cross-platform idioms |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| **Luminance-stepped elevation (`+5% to +8%` OKLCH `L`)** | Elevate higher z-layers by stepping surface lightness upward in **`+0.05` to `+0.08` OKLCH `L` increments** (e.g., base canvas `L ≈ 0.14–0.17` → raised card/sidebar `L ≈ 0.20–0.23` → floating popover/dialog `L ≈ 0.26–0.31`). Reserve pure `#000000` (`L = 0`) for OLED wearable/battery-saver modes, high-contrast accessibility themes, or explicit brief direction. | CSS `oklch()` surface tokens (`surface-0`, `surface-1`, `surface-2`); SwiftUI elevated `Color` asset variants; Compose tonal/luminance surface ramp; Flutter `ColorScheme` surface containers |
|
|
54
|
+
| **`1px` subtle top/inner specular edge** | Separate stacked dark cards, modals, and command palettes with a **`1px` top or inner rim highlight** at **`rgba(255, 255, 255, 0.07–0.12)`** (`oklch(1 0 0 / 8%–12%)`) instead of heavy outer shadows. | **Web:** `box-shadow: inset 0 1px 0 oklch(1 0 0 / 10%)` + `1px solid oklch(1 0 0 / 8%)`<br>**SwiftUI:** `.overlay(RoundedRectangle(...).strokeBorder(LinearGradient(...)))`<br>**Compose / Flutter:** `Modifier.border(1.dp, Brush.verticalGradient(...))` |
|
|
55
|
+
| **Desaturated & lifted semantic accents** | Pull chroma down slightly and lift lightness on status/accent fills and foregrounds in dark mode so saturated reds, blues, and greens do not vibrate or halate against dark backgrounds. | Test focus, selection, caret, placeholder, disabled, pressed, visited, chart grid, and error text independently in both modes (`WCAG 2.2 AA` + `APCA |Lc|`) |
|
|
56
|
+
| **Vibrancy saturation boost + opaque fallback** | Plain Gaussian blur over dark/colorful content looks muddy gray; pair blur with **`160–180%` saturation boost** or native OS vibrancy, and switch to a **solid opaque raised surface** under Reduced Transparency. | **Web:** `backdrop-filter: blur(16px) saturate(170%)` + `@media (prefers-reduced-transparency: reduce)` solid fallback<br>**Apple / Windows / Android:** `NSVisualEffectView`, `.ultraThinMaterial` (`accessibilityReduceTransparency`), Windows `Mica`/`Acrylic`, Android `RenderEffect` |
|
|
57
|
+
|
|
58
|
+
Honor `prefers-contrast`, `forced-colors`, and platform high-contrast modes; never strip system-controlled boundaries.
|
|
59
|
+
|
|
60
|
+
### CSS Color 5, wide-gamut P3, and `forced-colors` idioms
|
|
61
|
+
|
|
62
|
+
On modern web surfaces, derive state colors and modes systematically while keeping sRGB and Windows High Contrast (`forced-colors`) intact:
|
|
63
|
+
|
|
64
|
+
```css
|
|
65
|
+
:root {
|
|
66
|
+
color-scheme: light dark;
|
|
67
|
+
--accent: oklch(0.56 0.16 245);
|
|
68
|
+
/* Light/dark semantic pairing without duplicated media-query blocks */
|
|
69
|
+
--surface: light-dark(oklch(0.98 0.008 90), oklch(0.19 0.015 250));
|
|
70
|
+
--ink: light-dark(oklch(0.22 0.015 250), oklch(0.93 0.01 90));
|
|
71
|
+
/* Perceptual hover/tint states via CSS Color 5 color-mix() and relative color syntax */
|
|
72
|
+
--accent-hover: oklch(from var(--accent) calc(l - 0.07) c h);
|
|
73
|
+
--accent-soft: color-mix(in oklch, var(--accent) 14%, var(--surface));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Progressive wide-gamut Display P3 chroma boost when hardware supports it */
|
|
77
|
+
@media (color-gamut: p3) {
|
|
78
|
+
:root {
|
|
79
|
+
--accent: oklch(0.58 0.22 245);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Forced Colors / Windows High Contrast: preserve boundaries via transparent borders & system colors */
|
|
84
|
+
.button,
|
|
85
|
+
.panel {
|
|
86
|
+
border: 1px solid transparent; /* invisible on normal displays; rendered in ButtonBorder under forced-colors */
|
|
87
|
+
}
|
|
88
|
+
@media (forced-colors: active) {
|
|
89
|
+
.button:focus-visible {
|
|
90
|
+
outline: 2px solid Highlight;
|
|
91
|
+
outline-offset: 2px;
|
|
92
|
+
}
|
|
93
|
+
.status-dot {
|
|
94
|
+
forced-color-adjust: none; /* opt out ONLY when a swatch carries semantic status paired with text */
|
|
95
|
+
border: 1px solid CanvasText;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Perceptual contrast (APCA) and dark-mode halation
|
|
48
101
|
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
102
|
+
WCAG 2.2 luminance ratios (`4.5:1` / `3:1`) remain the mandatory legal/accessibility floor, but they ignore polarity and font weight—creating **dark-mode false passes** where gray text on dark surfaces passes `4.5:1` mathematically yet dissolves visually from halation. Pair WCAG 2.2 AA with **APCA Lightness Contrast (`|Lc|`)** checks tied to font size and weight:
|
|
103
|
+
|
|
104
|
+
| Role | Typical size & weight | Supplemental APCA target | Notes |
|
|
105
|
+
|---|---|---|---|
|
|
106
|
+
| Regular body copy | `16px`, weight `400` | `|Lc| ≥ 75` | Push dark-mode body tokens lighter than light-mode inversions |
|
|
107
|
+
| Bold body / lead | `16px`, weight `700` | `|Lc| ≥ 60` | Lower threshold only when weight/size increases together |
|
|
108
|
+
| Subheadings / UI labels | `18–24px`, weight `600–700` | `|Lc| ≥ 45` | Never drop muted labels below WCAG AA + readable `Lc` |
|
|
109
|
+
| Large display / non-text icons | `36px+` bold or icons/borders | `|Lc| ≥ 30`–`45` | Verify final composited pixels including ancestor opacity |
|
|
54
110
|
|
|
55
111
|
## Cultural and content checks
|
|
56
112
|
|
|
@@ -36,6 +36,38 @@
|
|
|
36
36
|
- Test landscape/portrait, split window, dynamic text, RTL mirroring, safe area, virtual keyboard, controller focus order, and minimum terminal size as applicable.
|
|
37
37
|
- Horizontal scrolling can be correct for data tables/timelines, but never accidental page overflow.
|
|
38
38
|
|
|
39
|
+
## Modern CSS layout primitives
|
|
40
|
+
|
|
41
|
+
Prefer native CSS layout primitives over JS resize observers or hardcoded breakpoint duplication when targeting modern browsers:
|
|
42
|
+
|
|
43
|
+
| Primitive | Use for | Concrete idiom / guardrail |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| **Container Queries** (`@container`, `cqi`/`cqb`, style queries) | Component-level layout restructuring inside sidebars, split panes, and multi-column grids independent of viewport width | Declare `container-type: inline-size` on wrappers; size type/padding fluidly with `cqi`/`cqb`; use `@container style(--density: compact)` for token-driven density shifts |
|
|
46
|
+
| **CSS Subgrid** (`grid-template-rows: subgrid` / `columns: subgrid`) | Aligning internal headings, metadata rows, and footers across sibling grid items without rigid fixed heights | Inherit parent tracks so multi-line localized titles stay baseline-aligned across rows |
|
|
47
|
+
| **CSS Anchor Positioning** (`anchor-name`, `position-anchor`, `position-area`, `position-try-fallbacks`) | Tooltips, popovers, and menus tethered to triggers with automatic viewport collision flipping | Pair with Popover API; include `position-try-fallbacks: flip-block, flip-inline` and feature-detect (`@supports (anchor-name: --a)`) with fallback positioning for older browsers |
|
|
48
|
+
| **Dynamic viewport units** (`svh`, `dvh`, `lvh`) | Full-height mobile shells, sticky composers, and hero frames with collapsible mobile browser toolbars | Use `svh` for stable initial-paint heights that must not jump as toolbars retract; reserve `dvh` for active interactive workspaces (e.g., chat input bars) where real-time bottom-edge fit matters; avoid `100vh` on mobile |
|
|
49
|
+
| **Intrinsic sizing animation** (`interpolate-size: allow-keywords` / `calc-size()`) | Smooth disclosure, accordion, and `<details>` height transitions to/from `auto` without measuring `scrollHeight` in JS | Opt in via `interpolate-size: allow-keywords` (or `calc-size(auto, size)`) and gate motion under `prefers-reduced-motion` |
|
|
50
|
+
|
|
51
|
+
## B2 — Optical alignment, concentric geometry & text-box balance
|
|
52
|
+
|
|
53
|
+
Numeric bounding-box math produces subtly crooked interfaces; align by optical mass and curvature:
|
|
54
|
+
|
|
55
|
+
| Law | Defect when ignored | Concrete rule & cross-platform idiom |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| **Asymmetric icon centroid offset** | Play triangles (`▶`), chevrons (`›`/`‹`), back/forward arrows, and paper-plane send glyphs centered by bounding box look pushed away from their tip inside circular/square buttons | Shift glyph **`+1–2` units (`px`/`pt`/`dp`) toward its visual center of mass** (e.g., play triangle nudged `+1.5px` inline-end inside a circular button) or author optical padding directly inside the `24×24` icon frame |
|
|
58
|
+
| **Concentric corner radii** | Giving nested cards and inner media/buttons the exact same border radius (`16px` inside `16px`) creates pinched, lumpy corner walls | Enforce **`R_outer = R_inner + padding`** (`R_inner = max(0, R_outer - padding)`). Clamp `R_inner` to `0` when `padding >= R_outer`. Use CSS `calc(var(--r-outer) - var(--pad))`, SwiftUI `ConcentricRectangle` / container-relative shapes, or tokenized inner/outer radius pairs |
|
|
59
|
+
| **Optical vertical text balance** | Font em-boxes reserve descender space below the alphabetic baseline, making symmetric top/bottom padding look bottom-heavy on buttons, pills, and single-line headers | Trim or compensate vertical metrics: CSS `text-box-trim: trim-both; text-box-edge: cap alphabetic`, Compose/SwiftUI/Qt `FirstBaseline` alignment, or `-1` to `-2` unit bottom padding compensation where trim APIs are unavailable |
|
|
60
|
+
|
|
61
|
+
## B5 — Forgiving pointer, invisible hit-slop, Safe Triangle & pointer capture
|
|
62
|
+
|
|
63
|
+
Decouple compact visual density from physical pointer/touch ergonomics so fast movement never mis-fires:
|
|
64
|
+
|
|
65
|
+
| Mechanism | Required behavior | Cross-platform idioms |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| **Invisible hit-slop expansion** | Compact `24–28` unit icon controls (`px`/`pt`/`dp`) keep crisp visual bounds while expanding their interactive hit box by **`+6–10` units per side** (meeting `≥ 40–48` unit comfort targets without colliding with neighbors) | **Web:** `position: relative` + `::before { content: ""; position: absolute; inset: -8px; }`<br>**SwiftUI / UIKit:** `.padding(8).contentShape(Rectangle())` or override `point(inside:with:)`<br>**Android / Compose:** `TouchDelegate` or `Modifier.minimumInteractiveComponentSize()`<br>**Flutter / Desktop / Game:** `HitTestBehavior.translucent` padded box, Qt hit-margin, or expanded HUD rect |
|
|
68
|
+
| **Safe Triangle submenu corridor** | Cascading hover submenus, flyouts, and megamenus must survive diagonal cursor travel from trigger row to child pane without collapsing across sibling items | Compute a dynamic **Safe Triangle** from cursor exit `(x, y)` to the open submenu's near top and bottom corners (or hold a `120–180ms` directional-intent grace timer while pointer moves toward the submenu); always preserve click/Enter/Arrow keyboard parity |
|
|
69
|
+
| **Slider, scrubber & splitter pointer capture** | Dragging a timeline scrubber, range slider, color Loupe, or pane splitter continues smoothly until release even when the pointer drifts outside the narrow track | **Web:** call `el.setPointerCapture(e.pointerId)` on `pointerdown` and release on `pointerup`/`pointercancel`<br>**SwiftUI / Compose / Flutter:** `DragGesture` / `pointerInput { detectDragGestures }` continuous capture<br>**Desktop / Game:** Qt `grabMouse()`, Win32/XAML `CapturePointer` + **`Escape` cancel** + **`Shift`/Arrow fine-stepping** |
|
|
70
|
+
|
|
39
71
|
## Hierarchy checks
|
|
40
72
|
|
|
41
73
|
Squint test: primary/secondary/tertiary grouping should remain visible when detail blurs. Remove one visual property at a time; if hierarchy disappears only when color is removed, color-only dependence is likely. Compare real content lengths rather than lorem ipsum symmetry.
|