@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +1 -1
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +15 -4
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/README.md +185 -328
- package/SECURITY.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/bin/pixelcraft.mjs +431 -23
- package/docs/ARCHITECTURE.md +40 -37
- package/docs/DESIGN-RATIONALE.md +51 -3
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +16 -6
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/pixelcraft-accessibility.md +17 -0
- package/evals/pixelcraft-craft.md +16 -0
- package/evals/pixelcraft-dataviz.md +3 -3
- package/evals/pixelcraft-direction.md +17 -0
- package/evals/pixelcraft-game-ui.md +3 -3
- package/evals/pixelcraft-mobile.md +3 -3
- package/evals/pixelcraft-patterns.md +16 -0
- package/evals/pixelcraft-plan.md +65 -3
- package/evals/pixelcraft-review.md +3 -3
- package/evals/pixelcraft-visual-qa.md +11 -5
- package/evals/pixelcraft-web.md +21 -3
- package/evals/pixelcraft.md +4 -4
- package/gemini-extension.json +3 -2
- package/install.ps1 +57 -11
- package/install.sh +82 -7
- package/package.json +32 -4
- package/plugin.json +6 -1
- package/scripts/build-adapters.mjs +11 -13
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +14 -1
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +86 -7
- package/scripts/test-export-tokens.mjs +259 -3
- package/scripts/test-finish-gate.mjs +133 -10
- package/scripts/test-installers.mjs +155 -6
- package/scripts/test-shoot.mjs +23 -1
- package/scripts/test-slop-scan.mjs +390 -3
- package/scripts/test-style-inventory.mjs +23 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +82 -4
- package/scripts/validate-skills.mjs +149 -3
- package/skills/pixelcraft/SKILL.md +67 -47
- package/skills/pixelcraft/references/design-brief.md +2 -2
- package/skills/pixelcraft/references/floor.md +36 -19
- package/skills/pixelcraft/references/report-template.md +25 -11
- package/skills/pixelcraft/references/stack-detection.md +138 -67
- package/skills/pixelcraft/references/surface-acceptance.md +33 -21
- package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
- package/skills/pixelcraft-accessibility/SKILL.md +34 -13
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
- package/skills/pixelcraft-accessibility/references/verification.md +15 -10
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
- package/skills/pixelcraft-brandkit/SKILL.md +42 -30
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
- package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
- package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
- package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
- package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
- package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
- package/skills/pixelcraft-constrained/SKILL.md +21 -20
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
- package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
- package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
- package/skills/pixelcraft-craft/SKILL.md +29 -15
- package/skills/pixelcraft-craft/references/color.md +62 -6
- package/skills/pixelcraft-craft/references/layout.md +32 -0
- package/skills/pixelcraft-craft/references/motion.md +99 -12
- package/skills/pixelcraft-craft/references/typography.md +48 -9
- package/skills/pixelcraft-data-apps/SKILL.md +50 -31
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +87 -31
- package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
- package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
- package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
- package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
- package/skills/pixelcraft-data-apps/references/panel.md +69 -23
- package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
- package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
- package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
- package/skills/pixelcraft-dataviz/SKILL.md +21 -24
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
- package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
- package/skills/pixelcraft-desktop/SKILL.md +61 -39
- package/skills/pixelcraft-desktop/references/appkit.md +60 -26
- package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
- package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
- package/skills/pixelcraft-desktop/references/electron.md +68 -26
- package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
- package/skills/pixelcraft-desktop/references/gtk.md +74 -31
- package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
- package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
- package/skills/pixelcraft-desktop/references/tauri.md +80 -24
- package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
- package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
- package/skills/pixelcraft-desktop/references/working-context.md +82 -3
- package/skills/pixelcraft-direction/SKILL.md +48 -82
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +11 -1
- package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +3 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
- package/skills/pixelcraft-document/SKILL.md +27 -23
- package/skills/pixelcraft-document/references/archetypes.md +27 -4
- package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +96 -43
- package/skills/pixelcraft-document/references/slides.md +123 -27
- package/skills/pixelcraft-email/SKILL.md +42 -20
- package/skills/pixelcraft-email/references/client-quirks.md +101 -33
- package/skills/pixelcraft-email/references/html-tables.md +83 -22
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +13 -11
- package/skills/pixelcraft-email/references/react-email.md +76 -34
- package/skills/pixelcraft-extensions/SKILL.md +32 -27
- package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
- package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +90 -11
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
- package/skills/pixelcraft-game-ui/SKILL.md +45 -26
- package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
- package/skills/pixelcraft-game-ui/references/godot.md +100 -27
- package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
- package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
- package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +14 -13
- package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +20 -23
- package/skills/pixelcraft-media/references/banners-video.md +83 -65
- package/skills/pixelcraft-media/references/og-generation.md +110 -63
- package/skills/pixelcraft-media/references/social-cards.md +57 -58
- package/skills/pixelcraft-mobile/SKILL.md +53 -36
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
- package/skills/pixelcraft-mobile/references/flet.md +53 -26
- package/skills/pixelcraft-mobile/references/flutter.md +76 -32
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
- package/skills/pixelcraft-mobile/references/kivy.md +54 -31
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
- package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
- package/skills/pixelcraft-mobile/references/uikit.md +57 -23
- package/skills/pixelcraft-patterns/SKILL.md +30 -13
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +35 -16
- package/skills/pixelcraft-patterns/references/communication.md +34 -15
- package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +31 -19
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/settings.md +40 -12
- package/skills/pixelcraft-plan/SKILL.md +54 -18
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +44 -9
- package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
- package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
- package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
- package/skills/pixelcraft-review/SKILL.md +41 -19
- package/skills/pixelcraft-review/references/audit-report.md +20 -1
- package/skills/pixelcraft-review/references/heuristics.md +63 -18
- package/skills/pixelcraft-review/references/personas.md +41 -14
- package/skills/pixelcraft-review/references/polish.md +66 -26
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
- package/skills/pixelcraft-spatial/SKILL.md +16 -17
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
- package/skills/pixelcraft-spatial/references/platforms.md +123 -53
- package/skills/pixelcraft-tokens/SKILL.md +18 -14
- package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
- package/skills/pixelcraft-tokens/references/format.md +39 -9
- package/skills/pixelcraft-tokens/references/governance.md +1 -1
- package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
- package/skills/pixelcraft-tui/SKILL.md +41 -25
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +77 -28
- package/skills/pixelcraft-tui/references/ratatui.md +70 -30
- package/skills/pixelcraft-tui/references/rich.md +53 -33
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +75 -34
- package/skills/pixelcraft-ux/SKILL.md +22 -12
- package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
- package/skills/pixelcraft-ux/references/forms.md +57 -3
- package/skills/pixelcraft-ux/references/i18n.md +50 -12
- package/skills/pixelcraft-ux/references/laws.md +35 -14
- package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
- package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
- package/skills/pixelcraft-web/SKILL.md +105 -49
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
- package/skills/pixelcraft-web/references/angular.md +63 -16
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +64 -13
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +52 -17
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +144 -12
- package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +27 -18
- package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
- package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
- package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +6 -1
- package/skills/pixelcraft-web/references/qwik.md +51 -11
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +112 -13
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +106 -63
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +67 -16
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -11
- package/skills/pixelcraft-web/references/tailwind.md +40 -14
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-desktop
|
|
3
|
-
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into desktop applications across Tauri, Electron, Qt/
|
|
3
|
+
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into desktop applications across Tauri, Electron, Electrobun, Qt 6/PySide6/PyQt6/QML, WinUI 3/WPF, AppKit, SwiftUI macOS, GTK4/libadwaita, Avalonia, Rust GUI (GPUI, Dioxus, Iced, libcosmic, Vizia, Slint, egui, AccessKit), JavaFX/Swing, C++/C/Zig GUI (JUCE, GTKmm, FLTK, wxWidgets, Dear ImGui, Nuklear, Ultralight), Go GUI (Wails v3, Fyne, Gio), and Uno Platform. Use for window/menu design, keyboard shortcuts, resizing, multi-monitor restore, high-DPI, native/custom chrome, platform accessibility, and desktop verification.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -16,56 +16,78 @@ Organize persistent navigation, working content and one contextual inspector aro
|
|
|
16
16
|
|
|
17
17
|
## Detection signals
|
|
18
18
|
|
|
19
|
-
`src-tauri/tauri.conf.json`, Electron main/preload
|
|
19
|
+
`src-tauri/tauri.conf.json`, Electron main/preload configs, `electrobun.config.*`, Qt 6 `.pro`/CMake/PySide6/PyQt6/`.ui`/QML/Kirigami imports, `.csproj` WinUI 3/WPF/Avalonia/Uno (`Uno.Sdk`) references, Xcode AppKit or SwiftUI macOS scenes (`WindowGroup`/`DocumentGroup`/`MenuBarExtra`), GTK4/libadwaita/GTKmm/Blueprint (`.blp`) definitions, Rust `gpui`/`egui`/`slint`/`dioxus`/`iced`/`libcosmic`/`vizia`/`floem`/`relm4`/`xilem` dependencies, Go `wails3`/`wails`/`fyne`/`gio` modules, JavaFX/Swing/FlatLaf, C++/C/Zig `JUCE`/`FLTK`/`wxWidgets`/`imgui`/`nuklear`/`ultralight`/`dvui`/`clay`, installers/bundles, menu/shortcut registration, multi-window architecture.
|
|
20
20
|
|
|
21
21
|
## Translate direction to desktop idioms
|
|
22
22
|
|
|
23
|
-
1. Map tokens to native or webview theme resources while respecting system light/dark/high-contrast modes.
|
|
24
|
-
2. Decide whether chrome is native, custom, or hybrid before layout. Never hide essential window controls or break drag/resize/minimize behavior.
|
|
25
|
-
3. Design for keyboard/mouse precision and acceleration: shortcuts, focus traversal, context menus, multiple selection, undo, drag/drop, scroll behavior, toolbar density.
|
|
26
|
-
4. Handle window state: resize, minimum size, split panes, maximized/fullscreen, multiple windows/monitors, DPI changes
|
|
27
|
-
5. Respect platform conventions: macOS menu bar vs Windows/Linux window menus, close/quit semantics, document modified state, notifications, taskbar/dock integration.
|
|
28
|
-
6. Use web idioms inside Tauri/Electron only after honoring desktop shell behavior.
|
|
23
|
+
1. Map tokens to native or webview theme resources while respecting system light/dark/high-contrast modes and platform accent/vibrancy/glass fallbacks.
|
|
24
|
+
2. Decide whether chrome is native, custom, or hybrid before layout. Never hide essential window controls or break drag/resize/minimize/Snap Layouts behavior.
|
|
25
|
+
3. Design for keyboard/mouse precision and acceleration: shortcuts, `F6`/pane focus traversal, context menus, multiple selection, undo, drag/drop, scroll behavior, toolbar density.
|
|
26
|
+
4. Handle window state: resize, minimum size, split panes, maximized/fullscreen, multiple windows/monitors, invalid-bounds clamping on restore, DPI changes (and Wayland's no-global-positioning model).
|
|
27
|
+
5. Respect platform conventions: macOS menu bar vs Windows/Linux window menus, close/quit semantics, document modified state, notifications, taskbar/dock/tray integration.
|
|
28
|
+
6. Use web idioms inside Tauri/Electron/Electrobun/Wails only after honoring desktop shell behavior and security boundaries.
|
|
29
29
|
|
|
30
30
|
## Platform-wide rules
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
32
|
+
- **Startup, idle CPU & 30-minute active RAM envelope**: hit **`< 300–500 ms`** cold start on Native/Tauri/Rust/C++/Qt/AppKit/WinUI/GTK apps or **`< 1.0–1.2 s`** on Electron (explicitly justifying Chromium's footprint in the brief); hold **`~0%` idle CPU** when minimized or unfocused; **measure RSS/private RAM after 30 minutes of active usage** against the agreed memory ceiling (verifying zero unbounded leaks); and offload heavy I/O to worker threads/processes.
|
|
33
|
+
- **Full workspace session restoration & mixed-DPI clamping**: never trap users in fixed-size windows unless truly modal; restore the **full workspace session across restarts** (open windows, tabs, split ratios, scroll/cursor context, and active/unsaved documents), preserve bounds across mixed-DPI (`100%` ↔ `200%`) monitors, and **clamp off-screen coordinates** onto a connected display's work area when external monitors disconnect (respecting Wayland's size-only model).
|
|
34
|
+
- **OS-standard paths, atomic persistence, clean uninstall & support logs**: store config, caches, DBs, and logs in XDG / `~/Library/Application Support` / `%APPDATA%` (never beside the executable); write files atomically (**write temp → `fsync` → atomic rename**) and run SQLite in **`WAL` mode** with versioned migrations; ship a **clean uninstaller** (leaving zero leftover daemons, LaunchAgents, Services, or registry bloat—with explicit user choice on keeping vs removing user data) and an **opt-in support/diagnostic log export** bundle (PII/token redacted).
|
|
35
|
+
- **Keyboard acceleration, high-contrast modes & multi-window hygiene**: every primary workflow completes without a mouse (`Tab`, `F6` pane cycle, platform `Cmd` vs `Ctrl` accelerators, `Escape`); honor **Windows `forced-colors` / High Contrast themes and macOS `Increase Contrast` + `Reduce Transparency`**; guard dirty documents on close/quit; soften unfocused window chrome so active focus across multiple windows is unmistakable.
|
|
36
|
+
- **2026 code signing, clean-VM install proof & live `v(N-1) -> vN` auto-update rollback**: macOS Developer ID + Hardened Runtime + `xcrun notarytool` + `stapler` + **clean-VM install screenshot** confirming zero Gatekeeper warning; Windows Authenticode via **Azure Artifact Signing (Trusted Signing)** or HSM OV/EV + **clean-VM SmartScreen/install capture** (noting EV certs no longer grant instant SmartScreen bypass since 2024); Linux `.deb`/`.rpm`/Flatpak/GPG AppImage; **`Ed25519`/`minisign`-signed delta auto-updates + rollback verified live across 2 consecutive versions (`v(N-1) -> vN`)**; screen-reader verification across **`NVDA`/`JAWS`/`Narrator`**, **`VoiceOver`**, and **`Orca`** (AT-SPI/AccessKit).
|
|
37
|
+
|
|
38
|
+
## The 8 WebView Giveaway Killers (mandatory for Tauri / Electron / Wails / WebView2)
|
|
39
|
+
|
|
40
|
+
1. **`cursor: default`** on buttons, tabs, sidebar rows, menus, and chrome—reserve `cursor: pointer` strictly for external web links.
|
|
41
|
+
2. **`user-select: none`** on all toolbars, sidebars, tabs, menus, and buttons (selectable strictly inside editor/content/log panes).
|
|
42
|
+
3. **Block browser tells in production**: suppress raw browser `contextmenu` ("Inspect Element"), `Cmd/Ctrl+R` page reload, `Cmd/Ctrl +`/`-` accidental pinch-zoom, and rubber-band `overscroll-behavior` on outer chrome.
|
|
43
|
+
4. **Zero white flash on dark cold start**: create hidden native window (`show: false` / `visible: false`) with dark/theme-matched native `backgroundColor` before first paint, revealing on ready.
|
|
44
|
+
5. **Custom `40–52 px` titlebar geometry**: dedicated drag region (`data-tauri-drag-region` / `-webkit-app-region: drag`) excluding interactive buttons, double-click to maximize/zoom per OS setting, and **`72–80 px` left inset** for macOS traffic lights (collapsed on fullscreen).
|
|
45
|
+
6. **Native OS materials + inactive-window dimming**: pair `NSVisualEffectView` / `Mica` / `Acrylic` / libadwaita backdrops (plus High Contrast / Reduce Transparency fallbacks) with `:window-inactive` / focus-state dimming on unfocused sidebars/titlebars.
|
|
46
|
+
7. **Two-way native OS file drag-and-drop & dialogs**: support dropping files from Finder/Explorer with visual drop targets, dragging files out to Desktop/apps, and native OS file open/save dialogs.
|
|
47
|
+
8. **Native OS menu bar & single-instance deep links**: register real `File/Edit/View/Window/Help` menus with `Cmd`/`Ctrl` shortcuts and single-instance deep-link activation.
|
|
48
|
+
|
|
49
|
+
## Anti-lazy-default & anti-slop guard
|
|
50
|
+
|
|
51
|
+
- **Never default to plain `Tkinter` on greenfield Python desktop apps**: choose **PySide6 / Qt Quick**, **Flet**, **NiceGUI**, **Tauri** (Python sidecar), or **Textual** instead; apply strict DPI/threading/theme hygiene when inheriting brownfield `CustomTkinter` or `Dear PyGui`.
|
|
52
|
+
- **Reject unjustified ~200 MB Electron web-SPA wrappers**: when targeting a single OS, prefer native **SwiftUI/AppKit** (macOS), **WinUI 3** (Windows), or **GTK4 + libadwaita** (Linux); when cross-platform efficiency matters, evaluate **Tauri v2**, **Qt 6**, **Avalonia**, **Slint**, or **GPUI** before bundling Chromium.
|
|
53
|
+
- **Reject web-page chrome masquerading as a desktop app**: never paste an unadapted browser SPA into a desktop window without all 8 WebView Giveaway Killers, native menus, keyboard shortcuts, dirty-document close confirmation, and multi-monitor restore.
|
|
38
54
|
|
|
39
55
|
## Common desktop failures
|
|
40
56
|
|
|
41
|
-
-
|
|
42
|
-
- custom titlebar
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- hidden focus because custom controls never implement keyboard behavior;
|
|
47
|
-
- modal dialogs chains blocking unrelated windows;
|
|
48
|
-
- ignoring multi-instance/file association/deep-link startup state.
|
|
57
|
+
- WebView shell leaking `cursor: pointer`, selectable button text, white dark-mode launch flash, `Ctrl+R` reload, or browser "Inspect Element" menus;
|
|
58
|
+
- custom titlebar colliding with macOS traffic lights (`< 72 px` inset or stuck inset in fullscreen), swallowing button clicks, or breaking Windows Snap Layouts;
|
|
59
|
+
- restoring a window at off-screen coordinates after an external monitor is unplugged, losing open tabs/documents on restart, or blurring across `100%` ↔ `200%` mixed-DPI displays;
|
|
60
|
+
- writing `config.json`/SQLite next to the binary, leaving orphan background helpers/registry keys on uninstall, or truncating project files non-atomically without `fsync` + `rename`;
|
|
61
|
+
- assuming Windows EV certs still grant instant SmartScreen bypass or shipping untested auto-updaters.
|
|
49
62
|
|
|
50
63
|
## Verification options
|
|
51
64
|
|
|
52
|
-
Rendered verification requires running the actual app/windowing stack or platform-specific UI tests.
|
|
65
|
+
Rendered verification requires running the actual app/windowing stack or platform-specific UI tests (**Rule #0.3**: inner WebView DOM checks or compilation alone never count as `rendered` desktop verification). Attach 30-minute RAM/CPU profiler readings, clean-VM install screenshots, `v(N-1) -> vN` update/rollback logs, and `NVDA`/`JAWS`/`Narrator`/`VoiceOver`/`Orca` + High Contrast captures; label untested OSes `not-checked`.
|
|
66
|
+
|
|
67
|
+
## Pre-submit checklist
|
|
68
|
+
|
|
69
|
+
- [ ] zero `TODO`s, placeholder stubs, invented copy, or dead menu/toolbar/shortcut handlers;
|
|
70
|
+
- [ ] all 8 WebView Giveaway Killers enforced (if Tauri/Electron/Wails/WebView2), `< 300–500 ms` (`< 1.2 s` Electron) cold start, `~0%` idle CPU when minimized/unfocused, and **RAM measured after 30 minutes of active usage** within budget;
|
|
71
|
+
- [ ] **full workspace session restoration** (open windows, tabs, splits, active documents), `100%` ↔ `200%` mixed-DPI scaling, and unplugged-monitor on-screen clamping verified;
|
|
72
|
+
- [ ] OS-standard storage paths (XDG / `Application Support` / `%APPDATA%`), atomic `temp → fsync → rename` writes, SQLite `WAL` migrations, dirty-close protection, **clean uninstaller** (zero leftover files/daemons/registry), and **opt-in redacted support log export** wired;
|
|
73
|
+
- [ ] every primary workflow completes by keyboard (`Tab`, `F6` pane focus, `Cmd`/`Ctrl` menu shortcuts, `Escape`), and **Windows `forced-colors` / High Contrast + macOS `Increase Contrast`** render cleanly;
|
|
74
|
+
- [ ] 2026 signing/notarization + **clean-VM Gatekeeper/SmartScreen install screenshot**, **live `v(N-1) -> vN` auto-update + rollback**, and `NVDA`/`JAWS`/`Narrator`/`VoiceOver`/`Orca` checked or honestly labeled `not-checked`;
|
|
75
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, desktop UI/build tests, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
|
|
53
76
|
|
|
54
77
|
## Framework routing
|
|
55
78
|
|
|
56
|
-
- Read [references/working-context.md](references/working-context.md)
|
|
57
|
-
|
|
58
|
-
- Read [references/
|
|
59
|
-
- Read [references/
|
|
60
|
-
- Read [references/
|
|
61
|
-
- Read [references/
|
|
62
|
-
- Read [references/
|
|
63
|
-
- Read [references/
|
|
64
|
-
- Read [references/
|
|
65
|
-
- Read [references/
|
|
66
|
-
- Read [references/
|
|
67
|
-
- Read [references/
|
|
68
|
-
- Read [references/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
For Flet or Kivy desktop targets, use the canonical framework reference in `pixelcraft-mobile` together with the desktop window/menu/high-DPI rules in this skill; do not duplicate those framework files here.
|
|
79
|
+
- Read [references/working-context.md](references/working-context.md) when designing editors, debuggers, inspectors, linked source/canvas panes, `F6` focus traversal, workspace persistence, or multi-monitor bounds clamping.
|
|
80
|
+
- Read [references/tauri.md](references/tauri.md) when building Tauri v2 desktop apps, Rust IPC/`Channel`/`Response`, capability ACLs, v2 plugins, or macOS Overlay chrome.
|
|
81
|
+
- Read [references/electron.md](references/electron.md) when building Electron (`WebContentsView`, `safeStorage`, `@electron/fuses`, `titleBarOverlay`, Mica) or evaluating **Electrobun** (Bun + Zig + OS WebView).
|
|
82
|
+
- Read [references/qt-pyside-qml.md](references/qt-pyside-qml.md) when building Qt 6 Widgets, PySide6, PyQt6 / Qt Designer (`.ui`), Qt Quick/QML (`FluentWinUI3`/`macOS`, `qmltc`), Kirigami, or maintaining brownfield CustomTkinter/Dear PyGui apps.
|
|
83
|
+
- Read [references/winui-wpf.md](references/winui-wpf.md) when building WinUI 3 (Windows App SDK, `x:Bind`, `MicaBackdrop`) or .NET 9/10 WPF (`ThemeMode="System"` Fluent Theme) Windows apps.
|
|
84
|
+
- Read [references/appkit.md](references/appkit.md) when building **AppKit** (`NSDocument`, `NSStatusItem`, `NSGlassEffectView`) or **SwiftUI for macOS** (`WindowGroup`, `DocumentGroup`, `MenuBarExtra`, `Settings`, macOS 26 Tahoe Liquid Glass).
|
|
85
|
+
- Read [references/gtk.md](references/gtk.md) when building GTK4 / libadwaita 1.4–1.8 Linux UI, Blueprint (`.blp`), XDG Desktop Portals/Flatpak, and Wayland windows.
|
|
86
|
+
- Read [references/avalonia.md](references/avalonia.md) when building Avalonia 11+ apps with `ControlTheme`, `ThemeVariant`, `x:CompileBindings`, `TopLevel` services, and `Avalonia.Headless`.
|
|
87
|
+
- Read [references/rust-gui.md](references/rust-gui.md) when building Rust desktop UIs across **GPUI**, **Dioxus** (Subsecond/Blitz), **Iced**, **`libcosmic`**, **Vizia**, **Slint**, **egui**, **Floem**, **Makepad**, **Xilem**, **Freya**, **Relm4**, and **AccessKit**.
|
|
88
|
+
- Read [references/javafx-swing.md](references/javafx-swing.md) when building JavaFX 22+ (`Platform.Preferences`, AtlantaFX, `jpackage`) or Swing (**FlatLaf**) desktop apps.
|
|
89
|
+
- Read [references/cpp-gui.md](references/cpp-gui.md) when building C++/C/Zig desktop UIs across Qt C++, **JUCE** (VST3/AU/CLAP audio plugins), **GTKmm**, wxWidgets, **FLTK 1.4**, Dear ImGui, **Nuklear**, **Ultralight**, **DVUI**, **Clay**, and **raygui**.
|
|
90
|
+
- Read [references/go-gui.md](references/go-gui.md) when building Go desktop apps with **Wails v3**/v2, **Fyne**, or **Gio**.
|
|
91
|
+
- Read [references/uno-platform.md](references/uno-platform.md) when building Uno Platform 5/6 (`Uno.Sdk` Single Project, Skia Desktop, MVUX, Uno Toolkit) desktop apps.
|
|
92
|
+
|
|
93
|
+
For **Compose Multiplatform Desktop**, **Flutter Desktop**, **Flet**, or **Kivy** desktop targets, use the canonical framework reference in `pixelcraft-mobile` together with the desktop window/menu/high-DPI/multi-monitor rules in this skill; do not duplicate those framework files here.
|
|
@@ -1,58 +1,92 @@
|
|
|
1
|
-
# AppKit
|
|
1
|
+
# AppKit & SwiftUI for macOS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
macOS desktop craft depends on menu-bar architecture, multi-window/document lifecycle, keyboard acceleration, and platform chrome—whether authored in **AppKit**, **SwiftUI for macOS**, or a hybrid (`NSHostingView` / `NSViewRepresentable`).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Token mapping
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
enum PCSemantic { static let action = NSColor(named: "Semantic/Action") }
|
|
9
|
-
```
|
|
7
|
+
Store light, dark, and increased-contrast colors in Asset Catalogs and access them via Xcode-generated `ColorResource` symbols (`NSColor(resource: .semanticAction)` / `Color(.semanticAction)`). Respect system vibrancy (`NSVisualEffectView` / `.background(.ultraThinMaterial)`), system accent colors (`NSColor.controlAccentColor`), and **macOS 26 Tahoe Liquid Glass** (`NSGlassEffectView` in AppKit; `.glassEffect(_:in:)` + `GlassEffectContainer` in SwiftUI) for floating toolbars, sidebars, and controls—never apply translucent glass to primary reading/editing canvases.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
## SwiftUI for macOS scene & command idioms
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Use native macOS scene primitives instead of hand-rolling single-window shells:
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
- **`WindowGroup`** (multi-window data views) and **`DocumentGroup`** (file-based apps with open/save/recent-documents/titlebar proxy icon).
|
|
14
|
+
- **`Settings`** scene (`Cmd+,` automatically wired into the app menu).
|
|
15
|
+
- **`MenuBarExtra`** (`.menu` style for quick status menus; `.window` style for compact interactive popovers).
|
|
16
|
+
- **`.commands` + `CommandMenu` + `@FocusedValue` / `@FocusedBinding`** so menu-bar commands route cleanly to whichever document window currently owns focus:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
```swift
|
|
19
|
+
@main
|
|
20
|
+
struct InvoiceStudioApp: App {
|
|
21
|
+
var body: some Scene {
|
|
22
|
+
DocumentGroup(newDocument: InvoiceDocument()) { file in
|
|
23
|
+
InvoiceEditorView(document: file.$document)
|
|
24
|
+
}
|
|
25
|
+
.commands {
|
|
26
|
+
CommandGroup(after: .newItem) {
|
|
27
|
+
ExportCommands()
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
Settings { SettingsView() }
|
|
31
|
+
MenuBarExtra("Sync Status", systemImage: "arrow.triangle.2.circlepath") {
|
|
32
|
+
SyncPopoverView()
|
|
33
|
+
}
|
|
34
|
+
.menuBarExtraStyle(.window)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
18
38
|
|
|
19
|
-
|
|
39
|
+
On macOS 26 Tahoe, combine `.glassEffect(.regular, in: .capsule)` / `NSGlassEffectView` with explicit Reduce Transparency and Increase Contrast fallbacks so floating controls stay legible over dense documents.
|
|
20
40
|
|
|
21
|
-
##
|
|
41
|
+
## AppKit idioms (`NSDocument`, `NSStatusItem`, `NSWorkspace`)
|
|
22
42
|
|
|
23
|
-
Use
|
|
43
|
+
- Use **`NSDocument` / `NSDocumentController`** for automatic autosave-in-place, Versions browser, dirty close dot (`isDocumentEdited`), and safe Quit/Logout prompting.
|
|
44
|
+
- Use **`NSStatusItem`** (`NSStatusBar.system.statusItem(withLength:)`) with vector SF Symbols (`isTemplate = true`) for menu-bar utility agents; always provide a discoverable Quit item and keyboard shortcut.
|
|
45
|
+
- Read macOS accessibility display preferences directly from **`NSWorkspace.shared`** (and observe `NSWorkspace.accessibilityDisplayOptionsDidChangeNotification`) to adapt motion, glass/vibrancy, and contrast:
|
|
24
46
|
|
|
25
|
-
|
|
47
|
+
```swift
|
|
48
|
+
let ws = NSWorkspace.shared
|
|
49
|
+
let reduceMotion = ws.accessibilityDisplayShouldReduceMotion
|
|
50
|
+
let reduceTransparency = ws.accessibilityDisplayShouldReduceTransparency
|
|
51
|
+
let increaseContrast = ws.accessibilityDisplayShouldIncreaseContrast
|
|
52
|
+
```
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
In SwiftUI for macOS, read `@Environment(\.accessibilityReduceMotion)`, `@Environment(\.accessibilityReduceTransparency)`, and `@Environment(\.colorSchemeContrast)`.
|
|
28
55
|
|
|
29
|
-
##
|
|
56
|
+
## Layout, typography, & accessibility specifics
|
|
30
57
|
|
|
31
|
-
|
|
58
|
+
- Use `NSSplitViewController` / `NavigationSplitView`, unified `NSToolbar` / `.toolbar`, minimum window sizes (`window.minSize` / `.frame(minWidth:minHeight:)`), `NSWindow.frameAutosaveName`, and Spaces/Fullscreen support. Never transplant an iOS bottom tab bar into a macOS window.
|
|
59
|
+
- Use macOS semantic text styles (`.body`, `.headline`, `.callout`) and verify Retina vector/SF Symbol sharpness.
|
|
60
|
+
- Implement `NSAccessibility` roles, labels, and custom actions on custom AppKit views; never suppress the system keyboard focus ring (`focusRingType = .none`) without a high-contrast replacement. Verify **Full Keyboard Access** (`System Settings → Keyboard → Keyboard navigation`) and **VoiceOver** across toolbars, sidebars, sheets, and modals.
|
|
32
61
|
|
|
33
|
-
##
|
|
62
|
+
## Storage, notarization, & `Ed25519` auto-updates
|
|
34
63
|
|
|
35
|
-
|
|
64
|
+
- **OS-standard paths & atomic writes**: store app support files in `FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)` (`~/Library/Application Support/<BundleId>`), caches in `~/Library/Caches`, and logs in `~/Library/Logs`—never inside `.app` bundles. Persist project/config files atomically (`try data.write(to: url, options: .atomic)` or temp file + `fsync` + `replaceItemAt`) and configure local SQLite in `WAL` mode with versioned migrations ([working-context.md](working-context.md)).
|
|
65
|
+
- **Two-way Finder drag-and-drop & inactive window dimming**: support dragging files in from and out to Finder/Desktop (`NSDraggingDestination` / `NSDraggingSource`, SwiftUI `.draggable` / `.dropDestination`), dim sidebar/toolbar prominence when `appearsActive == false` (`@Environment(\.controlActiveState)`), and maintain `< 300 ms` cold start + `~0%` idle CPU when occluded (`NSWindow.occlusionState`).
|
|
66
|
+
- **Sandbox, Universal binaries & notarization**: under **App Sandbox**, request minimal entitlements (`com.apple.security.files.user-selected.read-write`) and persist user-granted folder access with **security-scoped bookmarks**. For direct distribution outside the Mac App Store, build Universal (`arm64 + x86_64`) or explicit-arch bundles, enable **Hardened Runtime**, sign with **Developer ID Application**, notarize (`xcrun notarytool submit --wait`), staple (`xcrun stapler staple`), and ship **Sparkle 2** (`Ed25519` / `EdDSA`-signed) background delta updates that roll back cleanly on launch failure.
|
|
36
67
|
|
|
37
68
|
## Do/don't pairs
|
|
38
69
|
|
|
39
70
|
| Do | Don't |
|
|
40
71
|
|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
72
|
+
| `DocumentGroup` / `NSDocument` with dirty dot, atomic `.atomic` saves, and Save prompt on close | Overwrite files non-atomically in place or discard edits on close |
|
|
73
|
+
| Wire active-window menu items via `.commands` + `@FocusedValue` or Responder Chain | Hard-code menu actions to a singleton window reference |
|
|
74
|
+
| Check `accessibilityDisplayShouldReduceTransparency` & `IncreaseContrast` around `NSGlassEffectView`/`.glassEffect` | Ship unreadable translucent glass toolbars over high-contrast documents |
|
|
75
|
+
| Sign Developer ID + Hardened Runtime + `notarytool` + `stapler` + Sparkle 2 `Ed25519` updates | Ship unnotarized `.dmg`s blocked by Gatekeeper or unsigned auto-updaters |
|
|
76
|
+
| Persist folder access via security-scoped bookmarks and store app data in `~/Library/Application Support` | Assume raw POSIX paths survive relaunch under App Sandbox |
|
|
46
77
|
|
|
47
78
|
## Known traps
|
|
48
79
|
|
|
49
|
-
|
|
80
|
+
Menu items staying enabled when no document window is key (missing `NSMenuItemValidation` / `@FocusedValue`), AppKit/SwiftUI `NSHostingView` sizing loops inside `NSTableView` cells, custom `NSWindow` titlebar removing drag/double-click zoom, keyboard shortcuts colliding with macOS system/IME bindings, unnotarized binaries failing Gatekeeper, unguarded `NSGlassEffectView` failing Reduce Transparency.
|
|
50
81
|
|
|
51
82
|
## Verification commands
|
|
52
83
|
|
|
53
84
|
```sh
|
|
54
85
|
xcodebuild -scheme App -destination 'platform=macOS' build
|
|
55
86
|
xcodebuild test -scheme App -destination 'platform=macOS'
|
|
87
|
+
# For Developer ID release validation:
|
|
88
|
+
codesign --verify --deep --strict build/App.app
|
|
89
|
+
spctl --assess --type execute --verbose build/App.app
|
|
56
90
|
```
|
|
57
91
|
|
|
58
|
-
|
|
92
|
+
`xcodebuild` and unit tests are `static` evidence. Run on real macOS across VoiceOver, Accessibility Inspector, Full Keyboard Access, Dark Mode, Increase Contrast, Reduce Transparency, Reduce Motion, multi-monitor/Retina resize, and document dirty-close flows for `rendered` evidence; label unavailable hardware/macOS versions `not-checked`.
|
|
@@ -1,59 +1,95 @@
|
|
|
1
|
-
# Avalonia
|
|
1
|
+
# Avalonia (11+)
|
|
2
2
|
|
|
3
|
-
## Token mapping
|
|
3
|
+
## Token mapping: `ThemeVariant` & `ControlTheme`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Map DTCG semantic tokens into `ResourceDictionary.ThemeDictionaries` keyed by **`ThemeVariant`** (`Default`, `Light`, `Dark`, and custom high-contrast variants) and reference them via `{DynamicResource ...}` so live theme switching updates without restarting windows.
|
|
6
|
+
|
|
7
|
+
In Avalonia 11+, style templated controls with **`ControlTheme`** (explicitly scoped, predictable overrides) rather than cascading global `<Style Selector="...">` hacks, and enforce **`x:CompileBindings="True"`** + `x:DataType` across views so binding typos fail at compile time:
|
|
6
8
|
|
|
7
9
|
```xml
|
|
8
|
-
<
|
|
10
|
+
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
11
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
12
|
+
<ResourceDictionary.ThemeDictionaries>
|
|
13
|
+
<ResourceDictionary x:Key="Light">
|
|
14
|
+
<SolidColorBrush x:Key="PcActionBrush" Color="#0074CA" />
|
|
15
|
+
</ResourceDictionary>
|
|
16
|
+
<ResourceDictionary x:Key="Dark">
|
|
17
|
+
<SolidColorBrush x:Key="PcActionBrush" Color="#5BB2FF" />
|
|
18
|
+
</ResourceDictionary>
|
|
19
|
+
</ResourceDictionary.ThemeDictionaries>
|
|
20
|
+
|
|
21
|
+
<ControlTheme x:Key="PrimaryButtonTheme" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
22
|
+
<Setter Property="Background" Value="{DynamicResource PcActionBrush}" />
|
|
23
|
+
<Setter Property="MinHeight" Value="36" />
|
|
24
|
+
</ControlTheme>
|
|
25
|
+
</ResourceDictionary>
|
|
9
26
|
```
|
|
10
27
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
## Layout, `TopLevel` services, & custom window chrome
|
|
29
|
+
|
|
30
|
+
- Use `Grid`, `DockPanel`, `StackPanel`, `SplitView`, `ItemsRepeater` / `ListBox` virtualization, minimum window dimensions (`MinWidth`, `MinHeight`), and cross-platform DPI awareness.
|
|
31
|
+
- **Platform services via `TopLevel`**: never instantiate deprecated `OpenFileDialog` / `SaveFileDialog`. Resolve **`TopLevel.GetTopLevel(this)`** to access **`StorageProvider`** (native file/folder pickers + bookmarks), **`Clipboard`**, **`Launcher`**, and **`InsetsManager`**:
|
|
32
|
+
|
|
33
|
+
```csharp
|
|
34
|
+
var topLevel = TopLevel.GetTopLevel(this);
|
|
35
|
+
if (topLevel?.StorageProvider is { CanOpen: true } storage)
|
|
36
|
+
{
|
|
37
|
+
var files = await storage.OpenFilePickerAsync(new FilePickerOpenOptions
|
|
38
|
+
{
|
|
39
|
+
Title = "Import invoices",
|
|
40
|
+
AllowMultiple = false,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
```
|
|
18
44
|
|
|
19
|
-
|
|
45
|
+
- **Custom titlebars**: when extending content into chrome with **`ExtendClientAreaToDecorationsHint="True"`**, configure `ExtendClientAreaChromeHints` intentionally and bind header padding to **`WindowDecorationMargin`** / `OffScreenMargin` so macOS traffic lights and Windows caption buttons never overlap interactive controls, and preserve drag + double-click maximize behavior.
|
|
20
46
|
|
|
21
|
-
##
|
|
47
|
+
## Typography, motion, accessibility, states, & forms
|
|
22
48
|
|
|
23
|
-
|
|
49
|
+
Register bundled fonts via `FontManagerOptions` / `avares://` font URIs with explicit fallbacks and verify glyph coverage and DPI rasterization on Windows, macOS, and Linux separately.
|
|
24
50
|
|
|
25
|
-
|
|
51
|
+
Keep Avalonia `Transitions` and keyframe animations concise and interruptible; expose an explicit reduced-motion setting where host OS preference propagation is uncertain.
|
|
26
52
|
|
|
27
|
-
|
|
53
|
+
Set `AutomationProperties.Name`, `AutomationProperties.LabeledBy`, `AutomationProperties.HelpText`, keyboard `HotKey` / `KeyBindings`, and visible `:focus-visible` styles on real interactive controls. Verify Windows UIA (Narrator), macOS VoiceOver, and Linux AT-SPI separately—shared Skia rendering does not guarantee identical screen-reader behavior across OSes.
|
|
28
54
|
|
|
29
|
-
|
|
55
|
+
Drive state via `CommunityToolkit.Mvvm` or `ReactiveUI` with explicit async cancellation and dirty-close interception (`Window.Closing`). In forms, use `DataValidationErrors` + inline recovery text, preserve input across validation errors, and test IME/paste on all target OSes.
|
|
30
56
|
|
|
31
|
-
|
|
57
|
+
## Headless UI verification (`Avalonia.Headless`)
|
|
32
58
|
|
|
33
|
-
|
|
59
|
+
Use **`Avalonia.Headless`** (`Avalonia.Headless.XUnit` or `Avalonia.Headless.NUnit`) to run fast deterministic UI tests driving real layout passes, `KeyPressQwerty`, `MouseDown`, focus traversal, and `CaptureRenderedFrame()` without needing an OS display server:
|
|
34
60
|
|
|
35
|
-
|
|
61
|
+
```csharp
|
|
62
|
+
[AvaloniaFact]
|
|
63
|
+
public void Escape_Returns_Focus_From_Inspector()
|
|
64
|
+
{
|
|
65
|
+
var window = new MainWindow { DataContext = new MainViewModel() };
|
|
66
|
+
window.Show();
|
|
67
|
+
window.KeyPressQwerty(PhysicalKey.F6, RawInputModifiers.None);
|
|
68
|
+
window.KeyPressQwerty(PhysicalKey.Escape, RawInputModifiers.None);
|
|
69
|
+
Assert.True(window.CanvasControl.IsFocused);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
36
72
|
|
|
37
73
|
## Do/don't pairs
|
|
38
74
|
|
|
39
75
|
| Do | Don't |
|
|
40
76
|
|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
77
|
+
| Enable `x:CompileBindings="True"` + `x:DataType` and `ControlTheme` + `ThemeVariant` | Rely on untyped runtime bindings and fragile global style selectors |
|
|
78
|
+
| Use `TopLevel.GetTopLevel(this)?.StorageProvider` & `Clipboard` | Call deprecated `OpenFileDialog` or OS-specific Win32/NSOpenPanel hacks |
|
|
79
|
+
| Bind `ExtendClientAreaToDecorationsHint` chrome to `WindowDecorationMargin` | Overlap macOS traffic lights or break Windows maximize/drag regions |
|
|
80
|
+
| Write `Avalonia.Headless` keyboard/focus/layout tests alongside OS runs | Rely solely on `dotnet build` or visual glances on one OS |
|
|
81
|
+
| Guard `Window.Closing` for unsaved documents and cancel async commands | Use `async void` handlers or discard edits silently on close |
|
|
46
82
|
|
|
47
83
|
## Known traps
|
|
48
84
|
|
|
49
|
-
|
|
85
|
+
Silent runtime binding failures when `x:CompileBindings` is omitted, `{StaticResource}` failing to update when `RequestedThemeVariant` switches at runtime, `TopLevel.GetTopLevel(this)` returning `null` before `OnAttachedToVisualTree`, broken window drag/caption buttons under `ExtendClientAreaToDecorationsHint`, OS-divergent screen-reader maturity across Windows/macOS/Linux, missing font fallbacks on minimal Linux distros.
|
|
50
86
|
|
|
51
87
|
## Verification commands
|
|
52
88
|
|
|
53
89
|
```sh
|
|
54
90
|
dotnet build
|
|
55
|
-
dotnet test
|
|
56
|
-
dotnet run --project <AppProject>
|
|
91
|
+
dotnet test # includes Avalonia.Headless UI tests when configured
|
|
92
|
+
dotnet run --project <AppProject>
|
|
57
93
|
```
|
|
58
94
|
|
|
59
|
-
|
|
95
|
+
`dotnet build` is `static` evidence; `Avalonia.Headless` tests verify layout/focus/input deterministically (`static`/headless). Run native desktop binaries on each shipped OS (Windows/macOS/Linux) for screen-reader, HiDPI, dark/high-contrast, custom-chrome, and multi-monitor restore checks (`rendered`; label untested OSes `not-checked`).
|
|
@@ -1,52 +1,129 @@
|
|
|
1
|
-
# C
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Qt
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
# C++, C, & Zig desktop GUIs: Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, & Zig toolkits
|
|
2
|
+
|
|
3
|
+
**Boundary note**: use this reference for **C++ / C / Zig native toolchains** (CMake + Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, DVUI, Clay, raygui). For **Qt 6 / PySide6 / QML** styling rules, `styleHints.colorScheme`, Qt Quick Controls 2 (`FluentWinUI3`/`macOS`), `qmltc`, Kirigami, and the QSS native-style warning, read `references/qt-pyside-qml.md` alongside this file.
|
|
4
|
+
|
|
5
|
+
## Toolkit decision matrix
|
|
6
|
+
|
|
7
|
+
| Toolkit | Language | UI model | Strengths | Accessibility / IME reality |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| **Qt 6 (C++ / QML)** | C++ | Retained native/QML (`cmake`, `qmltc`) | Full enterprise desktop maturity, native styles, i18n, HiDPI | Mature `QAccessible` / UIA / NSAccessibility / AT-SPI + full IME |
|
|
10
|
+
| **JUCE** | C++ | Retained vector/GPU component tree for VST3/AU/CLAP/standalone audio | Realtime audio plugin & DAW industry standard, `APVTS`, `LookAndFeel`, scalable vector paths | Built-in `juce::AccessibilityHandler` (VoiceOver/Narrator/UIA)—must populate titles, descriptions, and focus order |
|
|
11
|
+
| **GTKmm (`gtkmm-4.0`)** | C++20 | Idiomatic RAII C++ bindings over GTK4 / `libadwaita` | Native Linux/Wayland craft, `Gtk::Builder`/Blueprint, zero raw GObject boilerplate | Full native AT-SPI screen-reader & IME parity (follow `references/gtk.md`) |
|
|
12
|
+
| **wxWidgets** | C++ | Native OS control wrapper (`wxSizer`) | True native Windows/macOS/GTK controls, small footprint | Strong via OS native controls; custom `wxPanel` drawing needs manual bridges |
|
|
13
|
+
| **FLTK 1.4** | C++ | Lightweight retained (`Fl_Flex`, `Fl_Grid`) | Tiny static binary, native **Wayland** backend, per-monitor **HiDPI** scaling | Basic keyboard nav; limited screen-reader exposure—verify before accessibility claims |
|
|
14
|
+
| **Dear ImGui** | C++ | Immediate-mode GPU (`ImGui::Begin`) | Unmatched speed for game/engine/DSP debuggers and in-app tools | No built-in screen-reader tree; low-level IME—not for screen-reader-mandated apps |
|
|
15
|
+
| **Nuklear** | ANSI C (single-header) | Immediate-mode renderer-agnostic (`nk_begin`) | Tiny zero-dep C footprint for embedded tools and custom GPU engines | No built-in screen-reader tree or complex IME; dev/embedded scope only |
|
|
16
|
+
| **Ultralight** | C++ + HTML/CSS/JS | Lightweight commercial WebKit-derived renderer | Smaller footprint than Chromium/Electron for custom C++ apps & game UI | Commercial license; verify IME/screen-reader support per target OS before productivity use |
|
|
17
|
+
| **DVUI** | Zig | Immediate-mode native (`dvui` over SDL/Raylib/Web) | Zero-bloat Zig ergonomics, retained scroll/text state, HiDPI, single binary | Basic keyboard focus; limited native screen-reader bridge (verify/label `not-checked`) |
|
|
18
|
+
| **Clay** | C (single-header) | Zero-allocation Flexbox layout engine (renderer-agnostic) | Microsecond deterministic layout for C/C++/Zig/WASM custom renderers | Layout only—you own widget semantics, text shaping, focus, and accessibility |
|
|
19
|
+
| **raygui** | C | Immediate-mode UI over Raylib | Rapid prototyping of Raylib level editors, audio tools, dev overlays | Dev-tool focus; no native OS accessibility or complex IME |
|
|
20
|
+
|
|
21
|
+
## JUCE (VST3 / AU / CLAP audio plugins & DAW UI)
|
|
22
|
+
|
|
23
|
+
Audio UIs have a hard real-time constraint: glitches on the audio thread ruin recordings.
|
|
24
|
+
|
|
25
|
+
- **Strict audio-thread vs message-thread separation**: NEVER allocate heap memory, acquire a `std::mutex`, lock the `MessageManager`, or call `repaint()` inside `processBlock()`. Bind controls via **`juce::AudioProcessorValueTreeState` (`APVTS`)** attachments (`SliderAttachment`, `ButtonAttachment`, `ComboBoxAttachment`), exchange meter levels via `std::atomic<float>` polled on a `juce::Timer` (30–60 Hz), and stream waveforms/spectra across lock-free `juce::AbstractFifo` ring buffers.
|
|
26
|
+
- **Custom `LookAndFeel` & cleanup**: centralize semantic palette tokens in a `juce::LookAndFeel_V4` subclass (`setColour(...)`), draw knobs/meters with resolution-independent `juce::Path` vectors for crisp HiDPI scaling, and **always call `setLookAndFeel(nullptr)` in the editor destructor** before destroying the LookAndFeel member (dangling `LookAndFeel*` asserts/crashes on close).
|
|
27
|
+
- **Resizing & host DAW scaling**: enable `setResizable(true, true)` + `setResizeLimits(minW, minH, maxW, maxH)` and compute child bounds in `resized()` using `juce::FlexBox` / `juce::Grid` / `Rectangle::removeFromTop(...)` rather than fixed coordinates.
|
|
28
|
+
- **Keyboard & accessibility**: set `setTitle(...)`, `setDescription(...)`, `setWantsKeyboardFocus(true)`, and expose custom controls through `juce::AccessibilityHandler` (value + units, e.g., `-6.0 dB`) so VoiceOver/Narrator users can operate plugin parameters in DAWs.
|
|
29
|
+
|
|
30
|
+
```cpp
|
|
31
|
+
// JUCE AudioProcessorEditor: lock-free APVTS attachment, LookAndFeel lifecycle, & a11y metadata
|
|
32
|
+
class GainEditor final : public juce::AudioProcessorEditor {
|
|
33
|
+
public:
|
|
34
|
+
GainEditor(GainProcessor& proc, juce::AudioProcessorValueTreeState& apvts)
|
|
35
|
+
: AudioProcessorEditor(&proc), apvts_(apvts) {
|
|
36
|
+
setLookAndFeel(&laf_);
|
|
37
|
+
gainSlider_.setSliderStyle(juce::Slider::RotaryHorizontalVerticalDrag);
|
|
38
|
+
gainSlider_.setTextBoxStyle(juce::Slider::TextBoxBelow, false, 72, 22);
|
|
39
|
+
gainSlider_.setTitle("Output Gain");
|
|
40
|
+
gainSlider_.setDescription("Adjusts output level in decibels");
|
|
41
|
+
gainSlider_.setWantsKeyboardFocus(true);
|
|
42
|
+
addAndMakeVisible(gainSlider_);
|
|
43
|
+
gainAttachment_ = std::make_unique<juce::AudioProcessorValueTreeState::SliderAttachment>(
|
|
44
|
+
apvts_, "gainDb", gainSlider_);
|
|
45
|
+
|
|
46
|
+
setResizable(true, true);
|
|
47
|
+
setResizeLimits(320, 220, 960, 660);
|
|
48
|
+
setSize(420, 280);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
~GainEditor() override {
|
|
52
|
+
setLookAndFeel(nullptr); // Mandatory before laf_ is destroyed
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
void resized() override {
|
|
56
|
+
gainSlider_.setBounds(getLocalBounds().reduced(24));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private:
|
|
60
|
+
StudioLookAndFeel laf_;
|
|
61
|
+
juce::AudioProcessorValueTreeState& apvts_;
|
|
62
|
+
juce::Slider gainSlider_;
|
|
63
|
+
std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> gainAttachment_;
|
|
64
|
+
};
|
|
65
|
+
```
|
|
12
66
|
|
|
13
|
-
|
|
67
|
+
## Token mapping & idiomatic snippets
|
|
14
68
|
|
|
15
|
-
|
|
69
|
+
Centralize semantic theme values once—never scatter raw RGB integers through paint or frame callbacks:
|
|
16
70
|
|
|
17
|
-
|
|
71
|
+
- **Qt C++**: bind semantic tokens via `QPalette` / QML `pragma Singleton` (avoid massive global QSS that strips native styles; see `references/qt-pyside-qml.md`).
|
|
72
|
+
- **GTKmm (`gtkmm-4.0`)**: load semantic CSS variables via `Gtk::CssProvider`, pair with `libadwaita` adaptive widgets (`Adw::NavigationSplitView`, `Adw::Dialog`), and rely on RAII `Gtk::make_managed<T>()` + `sigc::trackable` so disconnected signals never dangle.
|
|
73
|
+
- **wxWidgets**: query `wxSystemSettings::GetColour(...)` and `GetAppearance().IsDark()` so native dark/high-contrast themes stay intact.
|
|
74
|
+
- **FLTK 1.4**: compose responsive layouts with **`Fl_Flex`** and **`Fl_Grid`** (introduced in 1.4 alongside native Wayland and per-monitor scaling) rather than fixed pixel coordinates.
|
|
75
|
+
- **Nuklear & Ultralight**: in **Nuklear**, drive colors from a central `nk_style` table and bake Unicode font ranges into `nk_font_atlas`; in **Ultralight**, keep HTML/CSS tokens in local bundled assets (`FileSystem`), validate C++↔JS bridge calls, pass OS display scale cleanly, and check licensing before commercial use.
|
|
76
|
+
- **DVUI (Zig)**: read semantic colors from `dvui.themeGet()` and build responsive rows cleanly without manual pixel math:
|
|
18
77
|
|
|
19
|
-
|
|
78
|
+
```zig
|
|
79
|
+
// Zig + DVUI responsive row using active theme tokens:
|
|
80
|
+
var hbox = try dvui.box(@src(), .horizontal, .{ .expand = .horizontal });
|
|
81
|
+
defer hbox.deinit();
|
|
20
82
|
|
|
21
|
-
|
|
83
|
+
if (try dvui.button(@src(), "Save invoice", .{}, .{
|
|
84
|
+
.color_fill = dvui.themeGet().color_accent,
|
|
85
|
+
})) {
|
|
86
|
+
try saveInvoice();
|
|
87
|
+
}
|
|
88
|
+
```
|
|
22
89
|
|
|
23
|
-
##
|
|
90
|
+
## Layout, typography, & power-aware motion
|
|
24
91
|
|
|
25
|
-
|
|
92
|
+
- Use **Qt layouts**, **JUCE `FlexBox`/`Grid`**, **GTKmm boxes/grids**, **wxWidgets sizers** (`wxBoxSizer`/`wxFlexGridSizer`), **FLTK 1.4 `Fl_Flex`/`Fl_Grid`**, or **Clay** Flexbox declarations—never hard-code pixel rectangles assuming 96 DPI.
|
|
93
|
+
- Verify font loading and glyph coverage explicitly: Qt, GTKmm, JUCE, and wxWidgets inherit OS text shaping/fallbacks, whereas **Dear ImGui**, **Nuklear**, **raygui**, and custom **Clay** renderers require explicit font-atlas glyph ranges (Latin, Cyrillic, CJK, symbols) or missing characters render as `?`/tofu.
|
|
94
|
+
- Avoid draining laptop batteries in immediate-mode loops (**Dear ImGui**, **Nuklear**, **DVUI**, **raygui**): wait on OS input/window events (`SDL_WaitEventTimeout` / `glfwWaitEventsTimeout`) when idle instead of spinning an uncapped 120 FPS render loop. Expose an app-level reduced-motion toggle where OS preference hooks are absent.
|
|
26
95
|
|
|
27
|
-
##
|
|
96
|
+
## Accessibility, states, & forms idioms
|
|
28
97
|
|
|
29
|
-
|
|
98
|
+
- Choose **Qt 6**, **GTKmm**, **wxWidgets**, or **JUCE** (for audio) when full screen-reader support (VoiceOver/Narrator/Orca), complex CJK/RTL IME composition, and High Contrast compliance are mandatory.
|
|
99
|
+
- For immediate-mode/lightweight C/C++/Zig toolkits (**Dear ImGui**, **Nuklear**, **FLTK**, **DVUI**, **Clay**, **raygui**), be honest about accessibility boundaries: either integrate **AccessKit** (C ABI `accesskit-c`) and verify live screen-reader output, or scope the UI strictly to dev/engineering/embedded tooling and record screen-reader verification accurately (`not-checked` / `waived` per project floor).
|
|
100
|
+
- Keep durable document state, dirty-close checks, and cancellable background worker threads outside frame/paint loops, marshaling completion back to the UI thread safely (`QMetaObject::invokeMethod`, `wxQueueEvent`, `Fl::awake`, `juce::MessageManager::callAsync`, or lock-free queues).
|
|
30
101
|
|
|
31
102
|
## Do/don't pairs
|
|
32
103
|
|
|
33
104
|
| Do | Don't |
|
|
34
105
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
106
|
+
| Bind JUCE UI controls via `APVTS` attachments / atomics + `Timer`, and call `setLookAndFeel(nullptr)` in `~Editor()` | Touch `juce::Component`, allocate memory, or lock mutexes inside `processBlock()`, or leak `LookAndFeel*` |
|
|
107
|
+
| Use Qt layouts, JUCE `FlexBox`/`Grid`, GTKmm containers, `wxSizer`, FLTK 1.4 `Fl_Flex`/`Fl_Grid`, or Clay Flexbox | Hard-code fixed pixel coordinates for one 1080p monitor |
|
|
108
|
+
| Wait on OS events when idle in Dear ImGui / Nuklear / DVUI / raygui | Spin an uncapped `while (true)` GPU loop burning battery while idle |
|
|
109
|
+
| Choose Qt 6, GTKmm, wxWidgets, or JUCE `AccessibilityHandler` (or bridge `accesskit-c`) for accessible apps | Ship a raw Dear ImGui, Nuklear, or raygui form and claim screen-reader compliance |
|
|
110
|
+
| Marshal background worker completion safely (`Fl::awake`, `wxQueueEvent`, `invokeMethod`, `callAsync`) | Mutate UI widgets directly from worker or realtime audio threads |
|
|
111
|
+
| Load explicit Unicode/CJK/RTL glyph ranges or HarfBuzz shaping in GPU font atlases | Rely on default ASCII-only bitmap font atlases for localized apps |
|
|
39
112
|
|
|
40
113
|
## Known traps
|
|
41
114
|
|
|
42
|
-
|
|
115
|
+
Audio-thread allocations or mutex locks in JUCE `processBlock()`, dangling `LookAndFeel*` on JUCE editor teardown, dangling `QObject`/widget pointers across threads, uncapped immediate-mode GPU frame loops, missing glyph ranges in ImGui/Nuklear/raygui font atlases, FLTK 1.3 vs 1.4 confusion, Ultralight commercial-licensing oversight, ABI/CRT linkage mismatches on packaging, and claiming accessibility for immediate-mode canvas tools without testing VoiceOver/Narrator/Orca.
|
|
43
116
|
|
|
44
117
|
## Verification commands
|
|
45
118
|
|
|
46
119
|
```sh
|
|
120
|
+
# C++ (CMake — Qt, JUCE, GTKmm, wxWidgets, FLTK, ImGui):
|
|
47
121
|
cmake --build build
|
|
48
|
-
ctest --test-dir build
|
|
122
|
+
ctest --test-dir build --output-on-failure
|
|
49
123
|
./build/<app>
|
|
124
|
+
# Zig (DVUI / Clay):
|
|
125
|
+
zig build test
|
|
126
|
+
zig build run
|
|
50
127
|
```
|
|
51
128
|
|
|
52
|
-
Run
|
|
129
|
+
Build and test suites provide `static` / logic evidence. Run native binaries (and for JUCE plugins, host DAW validation such as `pluginval` across AU/VST3/CLAP) on each shipped OS across Wayland/X11/Windows/macOS fractional HiDPI scaling, resize/minimum bounds, idle CPU/GPU power draw, keyboard traversal, screen readers (where supported), and dirty-close recovery for `rendered` evidence; label untested OSes and unsupported assistive-tech surfaces `not-checked`.
|