@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,61 +1,88 @@
|
|
|
1
|
-
# Qt /
|
|
1
|
+
# Qt 6 / PySide6 / QML
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this reference for **Qt 6, PySide6 (official Python bindings), Qt Quick / QML, and Kirigami**. For C++ CMake build chains, wxWidgets, FLTK 1.4, Dear ImGui, and lightweight C/Zig desktop GUIs, see `references/cpp-gui.md`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Token mapping, `styleHints.colorScheme`, & QSS caveat
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
- **Qt Quick / QML (preferred for bespoke & modern cross-platform UI)**: create a QML `pragma Singleton` theme object keyed to semantic roles and react directly to **`Application.styleHints.colorScheme`** (`Qt.ColorScheme.Dark` / `Light` / `Unknown` in Qt 6.5+):
|
|
8
|
+
|
|
9
|
+
```qml
|
|
10
|
+
pragma Singleton
|
|
11
|
+
import QtQuick
|
|
12
|
+
|
|
13
|
+
QtObject {
|
|
14
|
+
readonly property bool isDark: Application.styleHints.colorScheme === Qt.ColorScheme.Dark
|
|
15
|
+
readonly property color action: isDark ? "#5bb2ff" : "#0074ca"
|
|
16
|
+
readonly property color surface: isDark ? "#14161a" : "#ffffff"
|
|
17
|
+
readonly property int controlInline: 12
|
|
18
|
+
}
|
|
10
19
|
```
|
|
11
20
|
|
|
12
|
-
|
|
21
|
+
- **Qt Quick Controls 2 native styles**: select native platform styles (`FluentWinUI3` on Windows 11, `macOS` on macOS, `Fusion`/`Basic` fallback on Linux) via `QQuickStyle.setStyle(...)` / `qtquickcontrols2.conf` so dialogs, scrollbars, and focus rings match the host OS. For adaptive Linux/KDE/convergent apps, layer **Kirigami** (`Kirigami.PageRow`, `Kirigami.Action`, `Kirigami.PlaceholderMessage`) on top of Qt Quick Controls 2.
|
|
22
|
+
- **Qt Widgets / PySide6 QSS warning**: **heavy `setStyleSheet(...)` (QSS) breaks native platform widget styles** (`QStyle` falls back to `QStyleSheetStyle`, stripping native Windows 11 Fluent animations, macOS Aqua chrome, focus rings, and system high-contrast palettes). Prefer **`QPalette`**, **`QApplication.styleHints().colorScheme()`**, and targeted sub-control overrides over full-app QSS rewrites; where QSS is unavoidable, preprocess semantic `@token` placeholders at build time because QSS has no runtime CSS variables.
|
|
13
23
|
|
|
14
|
-
|
|
24
|
+
```python
|
|
25
|
+
from PySide6.QtCore import Qt
|
|
26
|
+
from PySide6.QtWidgets import QApplication
|
|
27
|
+
|
|
28
|
+
def is_system_dark(app: QApplication) -> bool:
|
|
29
|
+
return app.styleHints().colorScheme() == Qt.ColorScheme.Dark
|
|
30
|
+
```
|
|
15
31
|
|
|
16
|
-
|
|
32
|
+
## Layout, compilation (`qmltc`), & responsive idioms
|
|
17
33
|
|
|
18
|
-
|
|
34
|
+
- **Qt Widgets**: always use layout managers (`QVBoxLayout`, `QGridLayout`, `QFormLayout`, `QSplitter`) and `QSizePolicy`—never fixed geometry (`setGeometry`).
|
|
35
|
+
- **QML**: prefer `QtQuick.Layouts` (`RowLayout`, `ColumnLayout`, `GridLayout`) with `Layout.fillWidth` and explicit minimum window sizes. Use **`qmltc`** (QML Type Compiler) and `qmllint` on C++/Qt 6 projects to compile QML into C++ for startup performance and catch type/binding bugs statically.
|
|
36
|
+
- Handle fractional HiDPI scaling, multi-monitor DPI changes, and clamped window geometry restoration (`QSettings` / `restoreGeometry`).
|
|
19
37
|
|
|
20
|
-
|
|
38
|
+
## Typography, motion, & reduced motion
|
|
21
39
|
|
|
22
|
-
|
|
40
|
+
Load custom fonts via `QFontDatabase.addApplicationFont(...)` and verify platform fallback chains (CJK/RTL/emoji) and point-vs-pixel scaling. Keep QML `NumberAnimation` / `Behavior` and `QPropertyAnimation` brief and interruptible; because Qt does not expose one uniform cross-OS reduced-motion property across every desktop environment, query platform hooks or provide an explicit app-level reduced-motion preference so animations can be disabled cleanly.
|
|
23
41
|
|
|
24
|
-
|
|
42
|
+
## Accessibility, atomic `QSaveFile` storage, & states idioms
|
|
25
43
|
|
|
26
|
-
|
|
44
|
+
Use standard Qt/QML controls first (they implement `QAccessible` / platform UIA / NSAccessibility / AT-SPI peers automatically). Set `accessibleName` / `Accessible.name`, `Accessible.role`, `Accessible.description`, keyboard shortcuts (`QShortcut` / `Action`), mnemonics (`&Save`), and explicit `QWidget.setTabOrder` / `KeyNavigation` chains; verify with **`NVDA`/`JAWS`/`Narrator`**, **`VoiceOver`**, and **`Orca`**.
|
|
27
45
|
|
|
28
|
-
Qt
|
|
46
|
+
Never block the Qt GUI event loop (`QApplication.exec()`) with synchronous network or disk I/O—use `QThreadPool` + `QRunnable` / `QObject` worker signals (or Python `QtAsyncio` / `QProcess`) with cancellation, `< 400 ms` cold start, and `~0%` idle CPU when minimized. Resolve OS-standard directories via **`QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation / AppLocalDataLocation)`**, write user/config files atomically with **`QSaveFile`** (`open` → `write` → `commit()`, which performs `fsync` + atomic rename automatically), run local SQLite in `WAL` mode, clamp restored geometry (`QGuiApplication::screens()`) across mixed-DPI monitors ([working-context.md](working-context.md)), and intercept `closeEvent` to protect dirty documents. In forms, pair `QFormLayout` / labeled `TextField` controls with `QValidator` / post-edit validation text (not red borders alone) and preserve input on failed submits.
|
|
29
47
|
|
|
30
|
-
##
|
|
48
|
+
## PyQt6 & Qt Designer (`.ui` / `uic`)
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
- **PyQt6 vs PySide6**: both wrap Qt 6 with identical layout, palette, and `QAccessible` mechanics, but differ in licensing (PyQt6 is GPLv3/commercial; PySide6 is LGPLv3) and bindings (`pyqtSignal`/`pyqtSlot` + strict scoped enums like `Qt.AlignmentFlag.AlignCenter` in PyQt6 vs `Signal`/`Slot` in PySide6). Match whichever binding the repo already declares.
|
|
51
|
+
- **Qt Designer `.ui` workflow**: compile `.ui` forms ahead of time (`pyside6-uic form.ui -o ui_form.py` or `pyuic6`) for static typing and fast startup rather than runtime `QUiLoader` loading in packaged apps. **Never hand-edit generated `ui_*.py` files**—compose or subclass them (`self.ui = Ui_MainWindow(); self.ui.setupUi(self)`) so re-running `uic` never overwrites behavior. Inside Designer, always attach layout managers (`QVBoxLayout`/`QGridLayout`) and avoid pasting global QSS into root dialogs.
|
|
33
52
|
|
|
34
|
-
##
|
|
53
|
+
## Python desktop anti-lazy guard (`Tkinter` / `CustomTkinter` / `Dear PyGui`)
|
|
35
54
|
|
|
36
|
-
|
|
55
|
+
- **Do not default to plain `Tkinter` / `ttk` on greenfield Python desktop apps**: plain `Tkinter` ships dated widget chrome, inconsistent fractional HiDPI scaling, weak dark/high-contrast OS synchronization, and thin accessibility tooling. On greenfield projects, choose **PySide6 / Qt Quick**, **Flet**, **NiceGUI** (native mode), **Tauri** (with a Python sidecar), or **Textual** (for keyboard-first terminal utilities) instead.
|
|
56
|
+
- **Brownfield maintenance rules (`CustomTkinter` & `Dear PyGui`)**: when maintaining an existing app that already depends on `CustomTkinter` or `Dear PyGui`:
|
|
57
|
+
- **DPI & fonts**: enable OS DPI awareness on Windows, scale cleanly (`ctk.set_widget_scaling` / Dear PyGui `set_global_font_scale` + `dpg.add_font(...)` with a real TTF font instead of the default blurry bitmap font).
|
|
58
|
+
- **Non-blocking worker threads**: never perform HTTP, SQL, or ML work inside button callbacks or the Dear PyGui render loop—run work in a background `threading.Thread` / `ThreadPoolExecutor` and marshal UI updates safely back to the main thread (`queue.Queue` polled via `root.after(...)` in CustomTkinter, or thread-safe `dpg.set_value(...)` in Dear PyGui).
|
|
59
|
+
- **Theme sync & tokens**: sync `ctk.set_appearance_mode("System")` and centralize semantic `(light, dark)` color tuples or Dear PyGui `dpg.theme()` bindings rather than scattering raw hex values.
|
|
60
|
+
- **Keyboard focus & accessibility honesty**: wire explicit `Tab` order and shortcuts, and label screen-reader testing honestly (`not-checked` / `waived` on GPU-drawn `Dear PyGui` viewports rather than claiming native UIA/VoiceOver parity).
|
|
37
61
|
|
|
38
62
|
## Do/don't pairs
|
|
39
63
|
|
|
40
64
|
| Do | Don't |
|
|
41
65
|
|---|---|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
66
|
+
| Use `QPalette` / `styleHints().colorScheme()` or Qt Quick Controls 2 (`FluentWinUI3`/`macOS`) | Apply massive global QSS that disables native platform styling and High Contrast |
|
|
67
|
+
| Compile `.ui` files via `pyside6-uic`/`pyuic6` and compose them in a separate controller class | Hand-edit generated `ui_*.py` files or hard-code pixel positions inside Qt Designer |
|
|
68
|
+
| Choose PySide6/QML, Flet, NiceGUI, Tauri, or Textual for greenfield Python apps | Default to plain `Tkinter` on greenfield Python desktop projects |
|
|
69
|
+
| Marshal worker results via `queue.Queue` + `after(...)` and load real TTF fonts in brownfield CustomTkinter/Dear PyGui | Block the Tkinter/Dear PyGui main loop with network calls or ship blurry bitmap defaults |
|
|
70
|
+
| Run `qmllint` / `qmltc` and QML singleton semantic tokens | Scatter raw hex strings and untyped dynamic JS lookups across QML files |
|
|
71
|
+
| Offload I/O to worker threads/async tasks and guard `closeEvent` on dirty docs | Block the Qt main event loop and freeze window repainting |
|
|
72
|
+
| Set `Accessible.name`/`role` and verify VoiceOver, Narrator, and Orca | Custom-paint interactive `QWidget` or `Item` surfaces with zero accessibility |
|
|
47
73
|
|
|
48
74
|
## Known traps
|
|
49
75
|
|
|
50
|
-
QSS
|
|
76
|
+
Global QSS breaking native Windows 11/macOS chrome and High Contrast, PySide6 Python GC prematurely collecting unparented `QObject`/worker references, GUI-thread blocking, missing `qmllint` hiding runtime QML reference errors, fractional DPI blur on raster icons (use SVG/high-DPI pixmaps), custom `QPainter` widgets invisible to screen readers, and unmarshaled Tkinter calls from background threads crashing the interpreter.
|
|
51
77
|
|
|
52
78
|
## Verification commands
|
|
53
79
|
|
|
54
80
|
```sh
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
81
|
+
# Run the test & build commands matching your project (PySide6/PyQt6 vs C++/QML):
|
|
82
|
+
python -m pytest
|
|
83
|
+
qmllint qml/
|
|
84
|
+
qmltestrunner -input tests/qml
|
|
85
|
+
cmake --build build
|
|
59
86
|
```
|
|
60
87
|
|
|
61
|
-
|
|
88
|
+
Test runners and `qmllint` provide `static` / logic evidence. Launch the real desktop app across Windows/macOS/Linux to verify native styles (`FluentWinUI3`/`macOS`), Dark & High Contrast modes, fractional HiDPI, keyboard-only Tab/mnemonic completion, screen readers, and dirty `closeEvent` flows for `rendered` evidence; label untested OSes `not-checked`.
|
|
@@ -1,65 +1,83 @@
|
|
|
1
|
-
# Rust GUI:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
# Rust GUI: GPUI, Dioxus, Iced, Slint, egui, & emerging toolkits
|
|
2
|
+
|
|
3
|
+
Rust GUI frameworks have fundamentally different rendering, layout, and accessibility models—never treat “Rust GUI” as one uniform platform.
|
|
4
|
+
|
|
5
|
+
## Framework decision matrix
|
|
6
|
+
|
|
7
|
+
| Framework | Rendering & UI model | Key 2025–2026 idioms | Best fit |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| **GPUI** | Hybrid immediate/retained GPU (Metal/Vulkan/DX12, Taffy Flexbox, up to 120 FPS) | `gpui-component` widget kit, `Entity<T>`, `Render`, `FocusHandle`, `actions!` keymaps | Ultra-fast developer tools, editors, data workspaces (Zed ecosystem) |
|
|
10
|
+
| **Dioxus 0.6/0.7** | RSX reactive components over OS WebView **or** **Blitz** (pure-Rust native HTML/CSS renderer) | `dx` CLI, **Subsecond** live Rust hot-patching, fullstack/desktop/mobile sharing | Web-fluent Rust teams wanting fast iteration and optional zero-WebView Blitz |
|
|
11
|
+
| **Iced 0.13/0.14** | Elm-inspired functional reactive (`wgpu` / tiny-skia) | `iced::application(title, update, view)` and `iced::daemon` multi-window API | Cross-platform desktop apps, predictable state machines |
|
|
12
|
+
| **`libcosmic`** | COSMIC Desktop adaptive toolkit built on Iced + Wayland layer-shell | `cosmic::Application`, `cosmic::applet::run`, `nav_model`, `context_drawer`, live `cosmic-config` tokens | Linux / COSMIC Desktop native apps and panel applets with adaptive condensed/expanded layouts |
|
|
13
|
+
| **Slint** | Declarative `.slint` DSL compiled to native Rust/C++ | IDE / `slint-viewer` live preview, shared desktop + `#![no_std]` MCU codebases | Embedded HMIs and crisp lightweight native desktop utilities |
|
|
14
|
+
| **egui** | Pure immediate-mode (`eframe`, glow/wgpu) | Frame-local `egui::Ui`, `egui_plot`, retained app state outside UI closure | Engineering tools, debuggers, audio/CAD inspectors, internal utilities |
|
|
15
|
+
| **Relm4** | Idiomatic Rust Elm-style wrapper over **GTK4 / libadwaita** | Native Linux Wayland, AT-SPI accessibility, Blueprint/GTK widgets | Linux-first native desktop apps prioritizing full OS accessibility (see `gtk.md`) |
|
|
16
|
+
| **Vizia** | Reactive Lens-based tree + Morphorm layout + Femtovg/Skia | `#[derive(Lens)]`, hot-reloadable external CSS stylesheets with CSS custom properties, built-in AccessKit | Reactive CSS-styled desktop utilities and audio plugins (check release cadence before greenfield commitment) |
|
|
17
|
+
| **Floem** | Fine-grained reactive signals + Taffy Flexbox (Vger/tiny-skia) | Leptos-like signals without VDOM diffing (Lapce ecosystem) | Responsive native editors and reactive Rust desktop apps |
|
|
18
|
+
| **Xilem** | Linebender reactive stack: **Vello** (GPU 2D) + **Masonry** (widget tree) + **Parley** (text) | Modern GPU compute rendering + AccessKit-first architecture | Next-gen high-craft vector/text-heavy Rust apps (track API stability) |
|
|
19
|
+
| **Makepad** | GPU shader-first live-design DSL with instant hot reload | Custom SDF shaders, cross-platform desktop/mobile/WASM | Visually bespoke audio/creative/shader-driven tools |
|
|
20
|
+
| **Freya** | Dioxus RSX reactive components rendered directly via **Skia** | No WebView, CSS-like layout over Skia | Dioxus developers wanting native Skia rendering |
|
|
21
|
+
|
|
22
|
+
## Token mapping & idiomatic snippets
|
|
23
|
+
|
|
24
|
+
Centralize semantic theme values once—never scatter raw hex literals across render closures:
|
|
25
|
+
|
|
26
|
+
```rust
|
|
27
|
+
// Iced 0.13/0.14 functional application entry point:
|
|
28
|
+
pub fn main() -> iced::Result {
|
|
29
|
+
iced::application("Invoices", App::update, App::view)
|
|
30
|
+
.theme(App::theme)
|
|
31
|
+
.run()
|
|
32
|
+
}
|
|
33
|
+
```
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
- **`libcosmic` (COSMIC Desktop & adaptive applets)**: implement `cosmic::Application` (or `cosmic::applet::run::<MyApplet>(())` for Wayland panel applets with popups). Consume live user/system theme tokens via `cosmic::theme::active()` (`theme.cosmic().accent_color()`, `spacing()`, `corner_radii`) synced automatically through `cosmic-config` instead of hardcoding colors; use `nav_model()` + `context_drawer()` so windows collapse cleanly from expanded multi-pane desktop layouts to condensed narrow widths, and populate widget accessibility labels exposed through Iced/AccessKit on Wayland/AT-SPI.
|
|
36
|
+
- **Vizia**: bind reactive state with `#[derive(Lens)]` and map DTCG semantic roles into CSS custom properties inside loaded stylesheets (`cx.add_stylesheet(include_style!("src/tokens.css"))`) so light/dark theme classes swap without rebuilding widget code.
|
|
37
|
+
- **GPUI**: read a global `Theme` struct from `App` context (`cx.theme()`) and pair `gpui-component` primitives with semantic tokens rather than repeating `rgb(0x...)`.
|
|
38
|
+
- **Slint**: declare `export global Palette { in-out property <color> action; }` in `.slint` files for light/dark switching.
|
|
39
|
+
- **Dioxus**: map DTCG CSS custom properties directly in stylesheets (works across both WebView and Blitz).
|
|
40
|
+
- **egui**: configure `ctx.style_mut(...)` / `egui::Visuals` centrally; never mutate global style mid-frame unpredictably.
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
## Layout, typography, & power-aware motion
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+
- Use virtualized lists (`uniform_list` in GPUI, `ScrollArea::show_rows` in egui, virtualized views in Slint/Iced/`libcosmic`) for logs and large tables.
|
|
45
|
+
- Verify font registration, fallback chains (CJK/RTL/emoji via `cosmic-text` or `Parley`), and fractional HiDPI scaling per OS—custom GPU renderers often ship with missing glyph fallback ("tofu") unless bundled explicitly.
|
|
46
|
+
- Guard animations against wasted power: in immediate-mode (`egui`), drive repaints on events or `ctx.request_repaint_after(...)` rather than spinning 120 FPS idle loops. Provide an app-level reduced-motion toggle when OS integration is incomplete.
|
|
32
47
|
|
|
33
|
-
Accessibility
|
|
48
|
+
## Accessibility & AccessKit
|
|
34
49
|
|
|
35
|
-
|
|
50
|
+
**AccessKit** is the shared Rust accessibility bridge translating widget trees to **Windows UI Automation**, **macOS NSAccessibility**, and **Linux AT-SPI** (integrated in `egui`, `Slint`, `Masonry`/`Xilem`, `Floem`, `Iced`/`libcosmic`, and `Vizia`).
|
|
36
51
|
|
|
37
|
-
|
|
52
|
+
- AccessKit enables native screen-reader support, but **only** for widgets that actually populate roles, names, bounds, states, and focus actions—its presence in `Cargo.toml` is **not** proof of accessibility.
|
|
53
|
+
- For accessibility-mandated productivity apps on Linux/cross-platform where native screen-reader parity is non-negotiable, prefer **Relm4 (GTK4)**, **`libcosmic`** (on COSMIC/Wayland, verified with Orca), **Slint**, or **Dioxus** and verify live with VoiceOver, Narrator, and Orca; treat custom GPU/immediate-mode accessibility as `not-checked` until actually tested with assistive tech.
|
|
38
54
|
|
|
39
|
-
##
|
|
55
|
+
## States, atomic storage, & release signing idioms
|
|
40
56
|
|
|
41
|
-
|
|
57
|
+
Own async I/O on Tokio/async executors with explicit cancellation handles and bounded channels—never block the UI/render thread (`< 300 ms` cold start, `~0%` idle CPU when minimized/unfocused). Resolve OS-standard paths with the **`directories` (`ProjectDirs`)** crate (XDG / `~/Library/Application Support` / `%APPDATA%`), write config/workspace files atomically via **`tempfile::NamedTempFile`** (`as_file().sync_all()?` → `persist(target)?`), and configure local `rusqlite`/`sqlx` SQLite databases with `PRAGMA journal_mode = WAL;` and versioned migrations ([working-context.md](working-context.md)). When using **Dioxus WebView**, apply all 8 WebView Giveaway Killers (`cursor: default`, `user-select: none`, hidden dark cold start, custom titlebar drag/traffic-light inset, native menus/DnD—see [tauri.md](tauri.md)). Sign releases with macOS Developer ID + `notarytool` + `stapler`, Windows Azure Artifact Signing / HSM Authenticode, Linux Flatpak/AppStream, and `Ed25519`/`minisign` auto-updates. Handle dirty-document close interception, mixed-DPI bounds clamping, and multi-window focus cleanly, and prefer framework text-editing widgets (`gpui-component` input, Slint `TextInput`, `iced::widget::text_editor`, `cosmic::widget::text_input`) over hand-rolled keystroke buffers so IME composition, dead keys, selection, and clipboard paste work reliably.
|
|
42
58
|
|
|
43
59
|
## Do/don't pairs
|
|
44
60
|
|
|
45
61
|
| Do | Don't |
|
|
46
62
|
|---|---|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| verify
|
|
63
|
+
| Use `iced::application`/`daemon`, `libcosmic` `Application`/`applet` + `cosmic::theme::active()`, `dx` Subsecond, or `gpui-component` idioms | Copy obsolete pre-0.13 `Application` traits, hardcode COSMIC colors, or hand-roll custom text editors |
|
|
64
|
+
| Verify AccessKit output (including `libcosmic` and `Vizia`) with VoiceOver, Narrator, and Orca | Claim screen-reader compliance merely because AccessKit is a dependency |
|
|
65
|
+
| Request repaints on dirty state/events in `egui` / GPU renderers | Spin a continuous 120 FPS render loop while the window is idle |
|
|
66
|
+
| Centralize semantic `Theme`, Vizia CSS custom properties, or `.slint` `global` palettes | Scatter `Color32::from_rgb(...)` or `rgb(0x...)` literals across views |
|
|
67
|
+
| Bundle fallback fonts and verify CJK/RTL shaping & fractional DPI | Ship ASCII-only embedded fonts that turn localized text into tofu boxes |
|
|
52
68
|
|
|
53
69
|
## Known traps
|
|
54
70
|
|
|
55
|
-
|
|
71
|
+
Incomplete AccessKit widget semantics (missing names/focus/actions), IME & dead-key breakage in custom GPU text inputs, idle CPU/GPU battery drain from continuous repaints, fractional Wayland/Windows HiDPI blur, missing font fallbacks, blocking the render thread with synchronous disk/network calls, failing to restore or clamp multi-monitor window state.
|
|
56
72
|
|
|
57
73
|
## Verification commands
|
|
58
74
|
|
|
59
75
|
```sh
|
|
60
76
|
cargo test
|
|
61
|
-
cargo clippy -- -D warnings
|
|
77
|
+
cargo clippy --all-targets -- -D warnings
|
|
62
78
|
cargo run
|
|
79
|
+
# Dioxus live desktop iteration:
|
|
80
|
+
dx serve --platform desktop
|
|
63
81
|
```
|
|
64
82
|
|
|
65
|
-
|
|
83
|
+
`cargo test` and `cargo clippy` are `static` evidence. Run native binaries on each target OS across keyboard-only traversal, VoiceOver/Narrator/Orca (or label screen-reader testing `not-checked`), fractional HiDPI resize, dark/high-contrast themes, idle CPU/GPU usage, and dirty-close recovery for `rendered` evidence.
|
|
@@ -1,54 +1,110 @@
|
|
|
1
|
-
# Tauri
|
|
1
|
+
# Tauri (v2)
|
|
2
2
|
|
|
3
3
|
## Token mapping
|
|
4
4
|
|
|
5
|
-
Use generated CSS
|
|
5
|
+
Use generated DTCG CSS custom properties inside the WebView exactly as web UI, while mirroring semantic theme values for native shell surfaces (window background color on launch to prevent white flash in dark mode, native menus, tray icons, and dialogs) in Rust / `tauri.conf.json`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Tauri v2 IPC: commands, streaming `Channel`, & binary `Response`
|
|
8
8
|
|
|
9
|
-
Design
|
|
9
|
+
Design backend communication around explicit typed contracts and non-blocking async Rust commands:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- **`#[tauri::command]`**: declare `async fn` returning `Result<T, E>` (serialized errors) for I/O or CPU work so the UI never freezes and the frontend receives structured error states.
|
|
12
|
+
- **`tauri::ipc::Channel<T>`**: use `Channel` for ordered, high-throughput streaming (build logs, AI token streams, download progress) instead of broadcasting global `app.emit(...)` events across every window.
|
|
13
|
+
- **`tauri::ipc::Response`**: return `tauri::ipc::Response::new(bytes)` for binary payloads (images, audio buffers, Arrow/Parquet chunks) to bypass JSON serialization overhead.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
```rust
|
|
16
|
+
use tauri::ipc::{Channel, Response};
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
#[tauri::command]
|
|
19
|
+
async fn export_report(
|
|
20
|
+
id: String,
|
|
21
|
+
on_progress: Channel<u8>,
|
|
22
|
+
) -> Result<Response, String> {
|
|
23
|
+
on_progress.send(25).map_err(|e| e.to_string())?;
|
|
24
|
+
let pdf_bytes: Vec<u8> = generate_pdf(&id).await.map_err(|e| e.to_string())?;
|
|
25
|
+
on_progress.send(100).map_err(|e| e.to_string())?;
|
|
26
|
+
Ok(Response::new(pdf_bytes))
|
|
27
|
+
}
|
|
28
|
+
```
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
## Official v2 plugins & capability-based ACLs
|
|
31
|
+
|
|
32
|
+
- **Capabilities (`src-tauri/capabilities/*.json`)**: grant least-privilege permissions scoped explicitly by `windows` and `platforms` (`["linux", "macOS", "windows"]` vs `["iOS", "android"]`). Never open broad `remote.urls` wildcards unless audited.
|
|
33
|
+
- Prefer official Tauri v2 plugins for standard desktop behavior instead of hand-rolling fragile hacks:
|
|
34
|
+
- **`tauri-plugin-window-state`**: persists and safely clamps window size/position/maximized state across launches.
|
|
35
|
+
- **`tauri-plugin-store`**: lightweight persisted settings/preferences store.
|
|
36
|
+
- **`tauri-plugin-updater`**: signed in-app updates with explicit restart/defer UX.
|
|
37
|
+
- **`tauri-plugin-single-instance`**: focuses the existing window and forwards CLI/file-open args instead of spawning duplicate instances.
|
|
38
|
+
- **`tauri-plugin-deep-link`**: handles custom URL schemes (`myapp://...`) cleanly on both cold start and warm launch.
|
|
39
|
+
|
|
40
|
+
## The 8 WebView Giveaway Killers & Tauri v2 shell craft
|
|
41
|
+
|
|
42
|
+
Every Tauri v2 desktop app must eliminate the 8 browser-in-a-box giveaways so the app feels indistinguishable from native OS software:
|
|
43
|
+
|
|
44
|
+
1. **Arrow cursor on UI chrome**: set `cursor: default` across buttons, tabs, sidebar rows, menus, and headers—reserve `cursor: pointer` strictly for external web hyperlinks (`a[href^="http"]`).
|
|
45
|
+
2. **Non-selectable chrome**: apply `user-select: none; -webkit-user-select: none;` to all toolbars, sidebars, tabs, menus, and buttons; opt into `user-select: text` only inside editors, tables, logs, and message bodies.
|
|
46
|
+
3. **Suppress browser giveaways in production**: disable default WebView `contextmenu` ("Inspect Element" / "Reload") outside debug builds (`#[cfg(not(debug_assertions))]`), block accidental `Cmd/Ctrl+R` page reloads and rubber-band pinch-zoom, and set `overscroll-behavior: none` on `html, body`.
|
|
47
|
+
4. **Zero white flash on dark cold start**: configure `"visible": false` and a dark/theme-matched `"backgroundColor"` in `tauri.conf.json`, then call `window.show()` from a frontend-ready command (or after first paint) so dark-mode launches never flash `#ffffff` (`< 300–500 ms` cold start).
|
|
48
|
+
5. **Custom titlebar geometry & fullscreen traffic lights**: use `"titleBarStyle": "Overlay"` + `"hiddenTitle": true` on macOS with a `40–52 px` header band marked **`data-tauri-drag-region`** (keeping interactive child `<button>`/`<input>` controls outside drag capture), double-click titlebar to zoom/maximize per OS setting, and reserve **`72–80 px` left inset** for macOS traffic lights—collapsing that left inset when the window enters macOS fullscreen!
|
|
49
|
+
6. **Native OS materials + inactive-window dimming**: pair `window-vibrancy` (`NSVisualEffectView` / `Mica` / `Acrylic`) with a `tauri://focus` / `tauri://blur` (`data-window-focused="false"`) style that softens sidebar/titlebar contrast when unfocused so multi-window focus is unmistakable.
|
|
50
|
+
7. **Two-way native file drag-and-drop & dialogs**: listen to native `DragDropEvent` (`onDragDropEvent` with physical file paths + drop-target highlight—never relying solely on sandboxed HTML5 `File` blobs) and `tauri-plugin-drag` for dragging files out to Finder/Explorer, plus `tauri-plugin-dialog` for native open/save sheets.
|
|
51
|
+
8. **Native OS menu bar, platform modifiers & single-instance deep links**: register `tauri::menu::Menu` (`File/Edit/View/Window/Help`) with `CmdOrCtrl+...` accelerators, plus `tauri-plugin-single-instance` + `tauri-plugin-deep-link`.
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
/* Desktop WebView shell baseline */
|
|
55
|
+
html, body {
|
|
56
|
+
overscroll-behavior: none;
|
|
57
|
+
user-select: none;
|
|
58
|
+
-webkit-user-select: none;
|
|
59
|
+
cursor: default;
|
|
60
|
+
}
|
|
61
|
+
.selectable-pane, input, textarea, [contenteditable="true"] {
|
|
62
|
+
user-select: text;
|
|
63
|
+
-webkit-user-select: text;
|
|
64
|
+
cursor: auto;
|
|
65
|
+
}
|
|
66
|
+
a[href^="http"] { cursor: pointer; }
|
|
67
|
+
.titlebar {
|
|
68
|
+
block-size: 44px;
|
|
69
|
+
padding-inline-start: var(--macos-traffic-inset, 78px); /* set to 12px when fullscreen or non-macOS */
|
|
70
|
+
}
|
|
71
|
+
[data-window-focused="false"] .sidebar,
|
|
72
|
+
[data-window-focused="false"] .titlebar {
|
|
73
|
+
opacity: 0.78;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
22
76
|
|
|
23
|
-
##
|
|
77
|
+
## Storage, signing, & accessibility idioms
|
|
24
78
|
|
|
25
|
-
|
|
79
|
+
- **OS-standard paths & atomic writes**: resolve paths via `app.path().app_config_dir()` / `app_data_dir()` / `app_cache_dir()` (XDG / `~/Library/Application Support` / `%APPDATA%`); persist JSON/project files via `temp file → File::sync_all() → fs::rename` and run local SQLite in `WAL` mode ([working-context.md](working-context.md)).
|
|
80
|
+
- **2026 signing & `Ed25519` delta updates**: sign macOS Universal builds with Developer ID + Hardened Runtime + `notarytool` + `stapler`; sign Windows `.msi`/NSIS installers with Azure Artifact Signing / HSM Authenticode (building SmartScreen reputation consistently in CI); and sign `tauri-plugin-updater` artifacts with `minisign`/`Ed25519` keys.
|
|
81
|
+
- **Accessibility & idle CPU**: bundle local `.woff2` fonts, honor `prefers-reduced-motion`, pause background timers/animations when minimized (`~0%` idle CPU), guard unsaved work via `on_window_event(WindowEvent::CloseRequested)`, and verify native menus, dialogs, and WebView content with `VoiceOver`, `NVDA`/`Narrator`, and `Orca`.
|
|
26
82
|
|
|
27
|
-
##
|
|
83
|
+
## Tauri v2 mobile targets
|
|
28
84
|
|
|
29
|
-
|
|
85
|
+
When sharing a Tauri v2 codebase across desktop and iOS/Android, isolate mobile plugins (biometrics, NFC, haptics) in platform-scoped capability files and pair mobile WebView ergonomics with `pixelcraft-mobile` safe-area and touch-target rules.
|
|
30
86
|
|
|
31
87
|
## Do/don't pairs
|
|
32
88
|
|
|
33
89
|
| Do | Don't |
|
|
34
90
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
91
|
+
| Stream progress/logs via `tauri::ipc::Channel<T>` and binary data via `ipc::Response` | Serialize megabyte buffers as JSON arrays or spam global window events |
|
|
92
|
+
| Start window `"visible": false` with dark `backgroundColor`, `cursor: default`, `user-select: none`, and `overscroll-behavior: none` | Flash white on dark launch, show `cursor: pointer` on every button, or leave browser "Inspect Element" context menus in prod |
|
|
93
|
+
| Reserve `72–80 px` macOS traffic-light inset (resetting on fullscreen) + inactive-window dimming | Cover macOS traffic lights, swallow header clicks inside drag regions, or keep unfocused windows at full active contrast |
|
|
94
|
+
| Write config/DB to `app_config_dir()` / `app_data_dir()` atomically (`sync_all` + `rename`) + SQLite `WAL` | Write files next to the binary or overwrite user documents in place without `fsync` |
|
|
95
|
+
| Scope `src-tauri/capabilities/*.json`, intercept `CloseRequested`, and sign updates with `Ed25519` | Grant wildcard permissions, drop unsaved edits on close, or ship unsigned updaters |
|
|
40
96
|
|
|
41
97
|
## Known traps
|
|
42
98
|
|
|
43
|
-
|
|
99
|
+
WebView engine differences (WKWebView vs WebView2 vs WebKitGTK CSS/backdrop/font quirks), white launch flash when `visible: false` + `backgroundColor` is omitted, forgetting to collapse the `72–80 px` traffic-light padding in macOS fullscreen, `Cmd/Ctrl+R` reloading the SPA in production, synchronous `#[tauri::command]` blocking the main thread, cold-start deep links firing before frontend listeners mount.
|
|
44
100
|
|
|
45
101
|
## Verification commands
|
|
46
102
|
|
|
47
103
|
```sh
|
|
104
|
+
cargo tauri info
|
|
48
105
|
npm run build
|
|
49
106
|
cargo test --manifest-path src-tauri/Cargo.toml
|
|
50
|
-
cargo tauri dev
|
|
51
107
|
cargo tauri build
|
|
52
108
|
```
|
|
53
109
|
|
|
54
|
-
|
|
110
|
+
`cargo tauri info`, `npm run build`, and `cargo test` provide environment and `static` evidence. Run packaged builds on each target OS (macOS/Windows/Linux) to verify `< 500 ms` cold start, `~0%` idle CPU, all 8 WebView giveaway killers, native menus, mixed-DPI bounds clamping, screen readers (`VoiceOver`/`NVDA`/`Narrator`/`Orca`), and dirty-close behavior for `rendered` evidence; browser-only dev preview is inner-DOM evidence only—label untested OSes `not-checked`.
|
|
@@ -1,52 +1,71 @@
|
|
|
1
|
-
# Uno Platform
|
|
1
|
+
# Uno Platform (5 / 6)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Architecture: `Uno.Sdk` Single Project & Skia Desktop
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Modern Uno Platform 5/6 consolidates desktop, mobile, and web targets inside a single **`Uno.Sdk`** project (`<Project Sdk="Uno.Sdk">`) with feature flags (`<UnoFeatures>`) and a unified **Skia Desktop** renderer (`net9.0-desktop` / `net10.0-desktop`) shipping consistent rendering across Windows, macOS, and Linux from one Skia host alongside native WinUI (`net9.0-windows*`), iOS, Android, and WebAssembly targets:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```xml
|
|
8
|
+
<Project Sdk="Uno.Sdk">
|
|
9
|
+
<PropertyGroup>
|
|
10
|
+
<TargetFrameworks>net9.0-desktop;net9.0-windows10.0.22621;net9.0-ios;net9.0-android;net9.0-browserwasm</TargetFrameworks>
|
|
11
|
+
<UnoFeatures>Material;Toolkit;MVUX;SkiaRenderer</UnoFeatures>
|
|
12
|
+
</PropertyGroup>
|
|
13
|
+
</Project>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Shared XAML and Skia rendering do **not** erase host platform conventions: desktop windows still require native menus/shortcuts, minimum resize bounds, and keyboard acceleration; mobile targets still require safe areas, touch targets, and predictive/swipe back (`pixelcraft-mobile`).
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
## Token mapping & Uno Toolkit
|
|
10
19
|
|
|
11
|
-
|
|
20
|
+
Map DTCG semantic tokens into WinUI-compatible `ResourceDictionary.ThemeDictionaries` (`Default`, `Light`, `HighContrast`) consumed via `{ThemeResource ...}` rather than inline hex literals.
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Use **Uno Toolkit** (`Uno.Toolkit.UI`) layout and navigation primitives to avoid hand-rolling cross-target layout math:
|
|
23
|
+
- **`AutoLayout`** (Figma-aligned stack/spacing/alignment container with predictable padding/gap),
|
|
24
|
+
- **`SafeArea`** (`utu:SafeArea.Insets="VisibleBounds"` so mobile notches and desktop chrome stay clear),
|
|
25
|
+
- **`NavigationBar`** and **`DrawerControl`** adapting cleanly between narrow mobile panes and wider desktop layouts.
|
|
14
26
|
|
|
15
|
-
##
|
|
27
|
+
## State management: MVUX & MVVM
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
Alongside standard MVVM (`CommunityToolkit.Mvvm`), Uno provides **MVUX (Model-View-Update eXtended)**—immutable C# records + `IFeed<T>` / `IState<T>` + **`FeedView`** that automatically binds loading, data, empty, and error templates without boolean soup:
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
```csharp
|
|
32
|
+
public partial record InvoiceModel(IInvoiceService Service)
|
|
33
|
+
{
|
|
34
|
+
public IFeed<IImmutableList<Invoice>> Invoices => Feed.Async(Service.GetAllAsync);
|
|
35
|
+
public IState<string> Filter => State<string>.Value(this, () => string.Empty);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
20
38
|
|
|
21
|
-
|
|
39
|
+
Pair `FeedView` with explicit `ProgressTemplate`, `NoneTemplate` (empty state), and `ErrorTemplate` (with retry command) so every async branch is intentionally designed.
|
|
22
40
|
|
|
23
|
-
##
|
|
41
|
+
## Typography, motion, accessibility, & Hot Design
|
|
24
42
|
|
|
25
|
-
|
|
43
|
+
Bundle font assets in shared resources and verify glyph coverage, DPI scaling, and text rasterization separately on native WinUI vs Skia Desktop vs WebAssembly. Keep WinUI/XAML transitions concise and honor host reduced-motion preferences where exposed (or provide an app-level toggle on targets without OS hook parity).
|
|
26
44
|
|
|
27
|
-
|
|
45
|
+
Uno implements the WinUI UI Automation model (`AutomationProperties.Name`, `LabeledBy`, `HeadingLevel`, `LiveSetting`) with renderer-dependent maturity across WinUI, Skia Desktop (Windows/macOS/Linux), mobile, and WASM. Prefer standard controls with built-in automation peers and verify actual Narrator/VoiceOver/Orca/TalkBack trees per shipped target rather than extrapolating from Windows alone.
|
|
28
46
|
|
|
29
|
-
|
|
47
|
+
**Hot Design** (runtime visual designer + XAML/C# Hot Reload) accelerates layout iteration on a live running app, but tweaking spacing inside Hot Design is **not** verification for keyboard traversal, High Contrast, DPI scaling, or OS accessibility.
|
|
30
48
|
|
|
31
49
|
## Do/don't pairs
|
|
32
50
|
|
|
33
51
|
| Do | Don't |
|
|
34
52
|
|---|---|
|
|
35
|
-
| `
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
53
|
+
| Use `Uno.Sdk` Single Project + `<UnoFeatures>` + `ThemeDictionaries` | Duplicate per-platform head projects and inline hex brushes |
|
|
54
|
+
| Pair MVUX `IFeed<T>` with explicit `FeedView` error/empty/loading templates | Leave unhandled async exceptions or blank screens on empty feeds |
|
|
55
|
+
| Use Uno Toolkit `SafeArea` & adaptive desktop/mobile navigation | Ship a mobile bottom tab bar unchanged on 1440px Skia Desktop |
|
|
56
|
+
| Verify `AutomationProperties` and keyboard navigation on each target renderer | Assume WinUI accessibility automatically guarantees Skia Linux/WASM parity |
|
|
39
57
|
|
|
40
58
|
## Known traps
|
|
41
59
|
|
|
42
|
-
Renderer parity
|
|
60
|
+
Renderer parity differences between native WinUI, Skia Desktop, and WASM, missing `HighContrast` theme dictionary keys, unverified Skia font fallbacks on Linux, cold-start WASM payload bloat without AOT/trimming profiling, treating Hot Design previews as cross-OS QA.
|
|
43
61
|
|
|
44
62
|
## Verification commands
|
|
45
63
|
|
|
46
64
|
```sh
|
|
47
|
-
dotnet test
|
|
48
65
|
dotnet build
|
|
49
|
-
dotnet
|
|
66
|
+
dotnet test
|
|
67
|
+
# Run target framework explicitly (e.g., Skia Desktop or Windows):
|
|
68
|
+
dotnet run -f net9.0-desktop
|
|
50
69
|
```
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
`dotnet build` and `dotnet test` provide `static` evidence. Run each shipped target framework (Skia Desktop on macOS/Linux/Windows, native WinUI, mobile, or WASM) across keyboard navigation, screen readers, Dark/High Contrast modes, resize/DPI, and offline/resume states for `rendered` evidence; label untested targets `not-checked`.
|