@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
|
@@ -2,52 +2,109 @@
|
|
|
2
2
|
|
|
3
3
|
## Token mapping
|
|
4
4
|
|
|
5
|
-
Use
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
Use `ui.Theme` (backed by Bootstrap 5 / Bootswatch Sass compilation) for semantic colors, typography, and spacing, paired with `ui.input_dark_mode()` and scoped CSS files under `www/`. Synchronize Matplotlib/Plotly/Altair figure styles separately because plotting libraries do not automatically inherit Bootstrap CSS variables.
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from shiny import ui
|
|
9
|
+
|
|
10
|
+
app_theme = (
|
|
11
|
+
ui.Theme("flatly")
|
|
12
|
+
.add_defaults(
|
|
13
|
+
primary="#0074ca",
|
|
14
|
+
body_bg="#faf8f1",
|
|
15
|
+
body_color="#161b24",
|
|
16
|
+
)
|
|
17
|
+
.add_rules(".metric-note { font-variant-numeric: tabular-nums; }")
|
|
18
|
+
)
|
|
19
|
+
```
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
## Express vs Core architecture
|
|
22
|
+
|
|
23
|
+
Choose the API surface that matches app complexity rather than mixing them randomly:
|
|
24
|
+
|
|
25
|
+
| Mode | Entry idiom | Best fit | Trade-off |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| **Shiny Express** | `from shiny.express import input, render, ui` | Rapid single-file prototypes, notebook-like top-to-bottom apps | Implicit UI ordering makes large modular apps harder to test and share |
|
|
28
|
+
| **Shiny Core** | `App(app_ui, server)` + `@module.ui` / `@module.server` | Production multi-page dashboards, reusable modules, strict separation of layout and reactive server graph | Slightly more boilerplate for tiny demos |
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
# Shiny Core with non-blocking ExtendedTask and streaming ui.Chat
|
|
32
|
+
import asyncio
|
|
33
|
+
from shiny import App, reactive, render, ui
|
|
34
|
+
|
|
35
|
+
app_ui = ui.page_sidebar(
|
|
36
|
+
ui.sidebar(
|
|
37
|
+
ui.input_select("region", "Region", ["EMEA", "AMER", "APAC"]),
|
|
38
|
+
ui.input_task_button("run_forecast", "Run forecast"),
|
|
39
|
+
ui.input_dark_mode(),
|
|
40
|
+
),
|
|
41
|
+
ui.layout_columns(
|
|
42
|
+
ui.card(ui.card_header("Forecast"), ui.output_data_frame("forecast_tbl")),
|
|
43
|
+
ui.card(ui.card_header("Analyst assistant"), ui.chat_ui("assistant")),
|
|
44
|
+
),
|
|
45
|
+
title="Revenue Forecast",
|
|
46
|
+
theme=app_theme,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
def server(input, output, session):
|
|
50
|
+
@ui.bind_task_button(button_id="run_forecast")
|
|
51
|
+
@reactive.extended_task
|
|
52
|
+
async def compute_forecast(region: str):
|
|
53
|
+
await asyncio.sleep(0.1) # replace with async I/O or ThreadPoolExecutor work
|
|
54
|
+
return run_model_for_region(region)
|
|
55
|
+
|
|
56
|
+
@reactive.effect
|
|
57
|
+
@reactive.event(input.run_forecast)
|
|
58
|
+
def _start_forecast():
|
|
59
|
+
compute_forecast(input.region())
|
|
60
|
+
|
|
61
|
+
@render.data_frame
|
|
62
|
+
def forecast_tbl():
|
|
63
|
+
return render.DataGrid(compute_forecast.result())
|
|
64
|
+
|
|
65
|
+
chat = ui.Chat(id="assistant")
|
|
66
|
+
|
|
67
|
+
@chat.on_user_submit
|
|
68
|
+
async def _handle_chat(user_input: str):
|
|
69
|
+
await chat.append_message_stream(stream_llm_chunks(user_input))
|
|
70
|
+
|
|
71
|
+
app = App(app_ui, server)
|
|
72
|
+
```
|
|
18
73
|
|
|
19
|
-
##
|
|
74
|
+
## Layout, responsiveness, and Shinylive (WASM)
|
|
20
75
|
|
|
21
|
-
|
|
76
|
+
- Build responsive layouts with `ui.page_sidebar`, `ui.page_navbar`, `ui.layout_columns(col_widths=...)`, `ui.card(full_screen=True)`, and `ui.value_box`. Reserve stable heights for reactive outputs so charts do not jump on recalculation.
|
|
77
|
+
- For zero-server static distribution (docs, demos, public reports), export to **Shinylive (Pyodide/WebAssembly)** with `shinylive export app site`. Verify every dependency has a pure-Python or Pyodide wheel, keep all secrets out of client code, and show an honest loading state while the WASM runtime initializes.
|
|
22
78
|
|
|
23
|
-
##
|
|
79
|
+
## Typography, motion, and accessibility
|
|
24
80
|
|
|
25
|
-
|
|
81
|
+
Load custom fonts via `ui.Theme` / `ui.head_content` with explicit fallbacks and `tabular-nums` for KPIs. Prefer reactive busy indicators (`ui.input_task_button`, `ui.Progress`) over decorative motion, and honor `prefers-reduced-motion` in custom CSS. Ensure inputs have real labels, plots include text/table alternatives, and focus does not vanish when dynamic UI rerenders.
|
|
26
82
|
|
|
27
|
-
##
|
|
83
|
+
## States and forms idiom
|
|
28
84
|
|
|
29
|
-
|
|
85
|
+
Separate reactive calculations (`@reactive.calc`), side effects (`@reactive.effect`), and non-blocking jobs (`@reactive.extended_task`). Use `req(...)` or explicit empty/error UI panels so invalid filters never silently blank an output without explanation. Isolate per-user state inside `server(...)` (or `reactive.value` per session); never mutate module-level globals across concurrent users.
|
|
30
86
|
|
|
31
87
|
## Do/don't pairs
|
|
32
88
|
|
|
33
89
|
| Do | Don't |
|
|
34
90
|
|---|---|
|
|
35
|
-
|
|
|
36
|
-
| `
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
91
|
+
| `ui.Theme(...)` + `ui.input_dark_mode()` | Scattering inline CSS overrides across every component |
|
|
92
|
+
| `@reactive.extended_task` + `ui.input_task_button` for slow work | Blocking the shared asyncio loop with synchronous CPU/DB calls |
|
|
93
|
+
| Shiny Core + `@module.ui`/`@module.server` for multi-view apps | Growing a 1,500-line single-file Express script with name collisions |
|
|
94
|
+
| `ui.Chat` + `append_message_stream` for streaming responses | Re-rendering an entire markdown blob on every token |
|
|
95
|
+
| Explicit empty/error message when a query returns zero rows | Silent blank output caused by bare `req()` without user copy |
|
|
40
96
|
|
|
41
97
|
## Known traps
|
|
42
98
|
|
|
43
|
-
|
|
99
|
+
Blocking the event loop without `ExtendedTask`/executor offloading, mutating module globals across sessions, plot themes ignoring dark mode, Shinylive builds failing on C-extension packages or leaking credentials, and focus loss during dynamic `render.ui` redraws.
|
|
44
100
|
|
|
45
101
|
## Verification commands
|
|
46
102
|
|
|
47
103
|
```sh
|
|
48
|
-
shiny run app.py
|
|
49
|
-
python -m pytest
|
|
50
104
|
python -m compileall .
|
|
105
|
+
python -m pytest
|
|
106
|
+
shiny run app.py
|
|
107
|
+
shinylive export app site
|
|
51
108
|
```
|
|
52
109
|
|
|
53
|
-
|
|
110
|
+
Run `pytest` with Playwright (`shiny.playwright` / `shiny.pytest`) and inspect narrow/desktop layouts, dark mode, and empty/error states in a browser for `rendered` evidence; compilation alone is `static`.
|
|
@@ -1,65 +1,113 @@
|
|
|
1
1
|
# Streamlit
|
|
2
2
|
|
|
3
|
-
Evidence: current docs confirm `[theme]` keys including `primaryColor`, `backgroundColor`, `secondaryBackgroundColor`, `textColor`, `linkColor`, chart color arrays, `fontFaces`, `baseFontSize`, and light/dark/sidebar sections.
|
|
4
|
-
|
|
5
3
|
## Token mapping
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Configure `.streamlit/config.toml` first using `[theme]`, `[theme.sidebar]`, and light/dark sections (`primaryColor`, `backgroundColor`, `secondaryBackgroundColor`, `textColor`, `linkColor`, `font`, `fontFaces`, `baseFontSize`, chart palettes):
|
|
8
6
|
|
|
9
7
|
```toml
|
|
10
8
|
[theme]
|
|
11
9
|
base = "light"
|
|
12
10
|
primaryColor = "#0074ca"
|
|
13
11
|
backgroundColor = "#faf8f1"
|
|
12
|
+
secondaryBackgroundColor = "#f1eee4"
|
|
14
13
|
textColor = "#161b24"
|
|
14
|
+
linkColor = "#005a9e"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Map semantic tokens deliberately; primary color alone is not a design system. Reach for scoped custom CSS only when `.streamlit/config.toml` cannot express a structural requirement, and never rely on autogenerated emotion/st-emotion class hashes.
|
|
18
|
+
|
|
19
|
+
## Layout, navigation, and responsive idioms
|
|
20
|
+
|
|
21
|
+
Use `st.navigation` with `st.Page` for multipage apps so shared chrome, auth gates, and global filters live in one entrypoint instead of fragile `pages/` filename sorting:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import streamlit as st
|
|
25
|
+
|
|
26
|
+
nav = st.navigation({
|
|
27
|
+
"Analytics": [
|
|
28
|
+
st.Page("views/overview.py", title="Overview", default=True),
|
|
29
|
+
st.Page("views/cohorts.py", title="Cohorts"),
|
|
30
|
+
],
|
|
31
|
+
"Operations": [st.Page("views/audit.py", title="Audit Log")],
|
|
32
|
+
})
|
|
33
|
+
nav.run()
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Size dataframes, charts, buttons, and containers with `width="stretch"` or `width="content"` (or an explicit pixel integer) rather than the deprecated `use_container_width` argument:
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
st.dataframe(df, width="stretch", hide_index=True)
|
|
40
|
+
st.plotly_chart(fig, width="stretch")
|
|
41
|
+
st.button("Export CSV", width="content")
|
|
15
42
|
```
|
|
16
43
|
|
|
17
|
-
|
|
44
|
+
Avoid deeply nested `st.columns` that crush on narrow viewports. Keep `st.sidebar` focused on controls or navigation, never overloaded with both.
|
|
18
45
|
|
|
19
|
-
##
|
|
46
|
+
## Caching, connections, fragments, and chat
|
|
20
47
|
|
|
21
|
-
|
|
48
|
+
Separate serializable data caching from singleton resource caching, isolate high-frequency subtrees with `@st.fragment`, and stream conversational responses with `st.chat_message` + `st.write_stream`:
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
```python
|
|
51
|
+
import streamlit as st
|
|
24
52
|
|
|
25
|
-
|
|
53
|
+
conn = st.connection("warehouse", type="sql")
|
|
26
54
|
|
|
27
|
-
|
|
55
|
+
@st.cache_data(ttl=300, show_spinner="Loading daily metrics...")
|
|
56
|
+
def load_metrics(region: str):
|
|
57
|
+
return conn.query(
|
|
58
|
+
"SELECT day, revenue FROM daily_metrics WHERE region = :region",
|
|
59
|
+
params={"region": region},
|
|
60
|
+
)
|
|
28
61
|
|
|
29
|
-
|
|
62
|
+
@st.cache_resource
|
|
63
|
+
def load_model():
|
|
64
|
+
return init_heavy_embedding_model()
|
|
30
65
|
|
|
31
|
-
|
|
66
|
+
@st.fragment
|
|
67
|
+
def live_filter_panel():
|
|
68
|
+
region = st.selectbox("Region", ["EMEA", "AMER", "APAC"], key="region")
|
|
69
|
+
df = load_metrics(region)
|
|
70
|
+
if df.empty:
|
|
71
|
+
st.info("No rows for this region.")
|
|
72
|
+
return
|
|
73
|
+
st.dataframe(df, width="stretch")
|
|
74
|
+
|
|
75
|
+
with st.chat_message("assistant"):
|
|
76
|
+
st.write_stream(stream_answer_chunks(prompt))
|
|
77
|
+
```
|
|
32
78
|
|
|
33
|
-
Use
|
|
79
|
+
- Use `@st.fragment` (and optional `run_every="30s"` for polling) so interacting with one chart or table does not rerun the whole script. Call `st.rerun(scope="app")` only when a fragment must update outer state.
|
|
80
|
+
- Use `st.components.v2` (`st.components.v2.component`) for new bidirectional custom web components that need direct DOM/CSS integration and typed state hooks instead of legacy iframe-only v1 wrappers.
|
|
34
81
|
|
|
35
|
-
##
|
|
82
|
+
## Typography, motion, and accessibility
|
|
36
83
|
|
|
37
|
-
|
|
84
|
+
Use `fontFaces` / `baseFontSize` in `.streamlit/config.toml` for typography. Use `st.status`, `st.progress`, and `st.toast` truthfully for long-running work; custom CSS animation must honor `prefers-reduced-motion`. Always provide widget labels (use `label_visibility="collapsed"` rather than empty `""` so screen readers keep accessible names), pair charts with text takeaways or expandable data tables, and verify keyboard navigation and contrast in rendered output.
|
|
38
85
|
|
|
39
|
-
## Forms idiom
|
|
86
|
+
## Forms and states idiom
|
|
40
87
|
|
|
41
|
-
`st.
|
|
88
|
+
Every interaction triggers a rerun of either the fragment or the script. Initialize `st.session_state` explicitly, use stable `key`s, and wrap multi-field mutations in `st.form` so intermediate edits do not trigger expensive queries. Distinguish empty datasets (`df.empty`), missing credentials/secrets, validation errors, and stale cached results visibly.
|
|
42
89
|
|
|
43
90
|
## Do/don't pairs
|
|
44
91
|
|
|
45
92
|
| Do | Don't |
|
|
46
93
|
|---|---|
|
|
47
|
-
| `
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| `st.
|
|
94
|
+
| `st.dataframe(df, width="stretch")` / `width="content"` | Deprecated `use_container_width=True` |
|
|
95
|
+
| `@st.fragment` around interactive filters or polling widgets | Rerunning expensive top-level setup on every filter change |
|
|
96
|
+
| `st.cache_data(ttl=...)` for DataFrames; `st.cache_resource` for models/connections | Storing per-user mutable state in global `st.cache_resource` |
|
|
97
|
+
| `st.navigation([st.Page(...)])` for shared multipage framing | Duplicating auth and sidebar boilerplate across `pages/*.py` |
|
|
98
|
+
| `st.connection(...)` with parameterized SQL queries | Interpolating widget values directly into SQL strings |
|
|
99
|
+
| `st.status(..., expanded=True)` reflecting real execution steps | Fake progress bars or silent spinners after an exception |
|
|
52
100
|
|
|
53
101
|
## Known traps
|
|
54
102
|
|
|
55
|
-
|
|
103
|
+
Full-script reruns wiping unkeyed inputs, duplicate widget keys, mutating objects returned from `st.cache_resource` across sessions, leaking secrets into client state, brittle `.st-emotion-cache-*` CSS selectors, sidebar overload, and uploaded `UploadedFile` buffers not rewound (`seek(0)`) on reread.
|
|
56
104
|
|
|
57
105
|
## Verification commands
|
|
58
106
|
|
|
59
107
|
```sh
|
|
60
|
-
streamlit run app.py
|
|
61
|
-
python -m pytest
|
|
62
108
|
python -m compileall .
|
|
109
|
+
python -m pytest
|
|
110
|
+
streamlit run app.py
|
|
63
111
|
```
|
|
64
112
|
|
|
65
|
-
|
|
113
|
+
Write headless state and interaction tests with `streamlit.testing.v1.AppTest` (`AppTest.from_file("app.py").run()`) as `static`/logic evidence, and run Playwright or manual browser checks across narrow/desktop widths for `rendered` evidence.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-dataviz
|
|
3
|
-
description: Designs and verifies truthful, legible, accessible data visualization across any
|
|
3
|
+
description: Designs and verifies truthful, legible, accessible data visualization across any stack. Use for charts, plots, dashboards, analytics, scientific visualization, tables as visualization, streaming data, node graphs, maps/geospatial UI, rendering scale, and chart accessibility across D3, Observable Plot, Vega/Vega-Lite, ECharts, Chart.js, Highcharts, Recharts, Nivo, Tremor, visx, uPlot, Lightweight Charts, AntV, Plotly, MapLibre, Mapbox, Leaflet, deck.gl, Cesium, PMTiles, Turf, Cytoscape, Sigma.js, Cosmograph, Bokeh, Seaborn, matplotlib, Altair, Datashader, Perspective, Mosaic, ggplot2, Makie, Swift Charts, or Vico.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -12,14 +12,15 @@ Data visualization is evidence communication, not dashboard decoration. Start wi
|
|
|
12
12
|
|
|
13
13
|
## Surface craft
|
|
14
14
|
|
|
15
|
-
Start with the judgment the reader must make and expose its comparison baseline, units, uncertainty and missing values. Use annotations and ordered or small-multiple views when they remove comparison work. Verify the meaning survives monochrome, resizing and keyboard access; provide a data or text alternative for canvas or hover-only details.
|
|
15
|
+
Start with the judgment the reader must make and expose its comparison baseline, units, uncertainty, and missing values. Use annotations and ordered or small-multiple views when they remove comparison work. Verify the meaning survives monochrome, resizing, and keyboard access; provide a data or text alternative for canvas or hover-only details.
|
|
16
16
|
|
|
17
17
|
## References
|
|
18
18
|
|
|
19
19
|
- Read [references/chart-choice.md](references/chart-choice.md) when choosing among comparison, distribution, composition, relationship, time, flow, hierarchy, and geographic representations.
|
|
20
|
-
- Read [references/encoding-tables-dashboards.md](references/encoding-tables-dashboards.md)
|
|
21
|
-
- Read [references/color-accessibility.md](references/color-accessibility.md)
|
|
22
|
-
- Read [references/realtime-graphs-maps-scale.md](references/realtime-graphs-maps-scale.md)
|
|
20
|
+
- Read [references/encoding-tables-dashboards.md](references/encoding-tables-dashboards.md) when designing encoding hierarchy, axes, units, direct labeling, annotations, tables as visualization, and analytical dashboard layout/density.
|
|
21
|
+
- Read [references/color-accessibility.md](references/color-accessibility.md) when selecting colorblind-safe palettes, redundant encodings, contrast, text alternatives, keyboard navigation, sonification boundaries, and reduced motion.
|
|
22
|
+
- Read [references/realtime-graphs-maps-scale.md](references/realtime-graphs-maps-scale.md) when implementing streaming updates, node graphs (`@xyflow/react`, Cytoscape, Sigma.js, Cosmograph, AntV G6), and SVG/Canvas/WebGL/WASM scale tiers (Perspective, Mosaic/DuckDB-Wasm, Datashader).
|
|
23
|
+
- Read [references/maps-geospatial.md](references/maps-geospatial.md) when selecting or implementing mapping and geospatial engines (MapLibre GL JS, Mapbox GL JS, Leaflet, OpenLayers, CesiumJS, deck.gl, kepler.gl), Protomaps/PMTiles, Turf.js spatial ops, choropleth pitfalls, or accessible map alternatives.
|
|
23
24
|
- Read [references/libraries.md](references/libraries.md) when implementing in a specific charting library or language ecosystem.
|
|
24
25
|
|
|
25
26
|
## Required workflow
|
|
@@ -36,28 +37,24 @@ Start with the judgment the reader must make and expose its comparison baseline,
|
|
|
36
37
|
|
|
37
38
|
| Concern | Rule |
|
|
38
39
|
|---|---|
|
|
39
|
-
| truthfulness | Never fabricate data,
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
| accessibility | Every chart has a text equivalent: summary plus underlying data table/list or structured access appropriate to its complexity. |
|
|
40
|
+
| truthfulness & downsampling | Never fabricate data, truncate magnitude bars, or downsample `10k–1M+` time-series with naive `every-Nth` slicing that erases incident spikes—use **`LTTB` (Largest-Triangle-Three-Buckets)** or **`Min-Max` pixel envelopes**, re-querying raw detail on zoom. |
|
|
41
|
+
| latency & query resilience | Render the **primary chart shell in `< 1–2 s`**, keep **filter, hover, cross-filter, and brush responses within `100–200 ms`**, and handle **concurrent multi-user load + explicit query timeouts/cancellation** cleanly without frozen spinners. |
|
|
42
|
+
| numeric semantics & `0` vs `null` | Enforce `font-variant-numeric: tabular-nums`, **True Minus `U+2212` (`−`)** on negative values, right-aligned numeric columns, explicit unit headers (`$ USD`, `ms`, `%`), and **strict visual separation between measured `0` and missing `null / — / N/A`** (break lines or render muted `—`; never coerce `null` to `0`). |
|
|
43
|
+
| provenance, definitions & SLA freshness | Display **visible data source attribution**, **metric definitions** (formula, scope, exclusions), explicit timezone (`UTC` vs local IANA zone), and a **Data Freshness / SLA Staleness badge** (`Updated 12s ago` escalating to warning/stale state when ingestion lags SLA). |
|
|
44
|
+
| baseline & monochrome | Bar/area magnitude charts include zero unless an explicit indexed/delta baseline is labeled; color never carries meaning alone—pair Okabe–Ito / Viridis palettes with direct labels, dash style, shape, or pattern so charts survive grayscale/CVD. |
|
|
45
|
+
| PII redaction & export safety | Hover/tooltips are progressive enhancement. **Mask/redact PII on chart tooltips, QA screenshots, and downloadable CSV/XLSX exports**, and neutralize **OWASP CSV/XLSX formula injection** (`=`, `+`, `-`, `@`, `\t`, `\r` prefixes). |
|
|
46
|
+
| accessibility | Every chart ships a **screen-reader accessible data-table / text summary fallback** plus **composite keyboard data-point navigation** (`<= 1` `Tab` stop + arrow keys across series/points). |
|
|
47
47
|
|
|
48
48
|
## Anti-slop warnings
|
|
49
49
|
|
|
50
|
-
Avoid the default analytics collage: four KPI cards with invented deltas, a gradient area chart, a donut with unreadable slices, a purple-blue palette, unexplained
|
|
50
|
+
Avoid the default analytics collage: four KPI cards with invented deltas, unattributed metrics without definitions or source provenance, a gradient area chart, a donut with unreadable slices, a purple-blue palette, unexplained "live" badges without SLA timestamps, naive `every-Nth` downsampled lines hiding outages, `null` plotted as `0`, and legends forcing constant eye travel. Distinctiveness belongs in editorial judgment, annotation quality, composition, and domain-specific emphasis—not in distorting evidence.
|
|
51
51
|
|
|
52
52
|
## Pre-submit checklist
|
|
53
53
|
|
|
54
|
-
- [ ] analytical question, unit
|
|
55
|
-
- [ ] chart
|
|
56
|
-
- [ ]
|
|
57
|
-
- [ ] direct labels or
|
|
58
|
-
- [ ]
|
|
59
|
-
- [ ]
|
|
60
|
-
- [ ]
|
|
61
|
-
- [ ] update/rendering performance was measured or explicitly labeled `not-checked`;
|
|
62
|
-
- [ ] static export/print/responsive behavior preserves legibility;
|
|
63
|
-
- [ ] final claims separate rendered evidence from static inspection/model judgment.
|
|
54
|
+
- [ ] analytical question, unit (`$ USD`, `ms`, `%`), **visible data source attribution**, **metric definitions**, explicit timezone (`UTC` vs local), and **Data Freshness / SLA Staleness badge** are visible;
|
|
55
|
+
- [ ] **primary chart shell `< 1–2 s`**, **filter/hover/brush response `100–200 ms`**, **concurrent multi-user load + query timeout recovery**, and **`LTTB` / `Min-Max`** dense downsampling verified;
|
|
56
|
+
- [ ] numeric columns/labels enforce `tabular-nums`, right alignment, **True Minus `U+2212` (`−`)**, and strict **`0` vs `null / — / N/A`** distinction;
|
|
57
|
+
- [ ] direct labels or annotations carry the primary reading path; palette is CVD/grayscale-safe with redundant non-color encoding;
|
|
58
|
+
- [ ] **PII masking/redaction** enforced on screenshots and exports, and CSV/XLSX exports escape leading `=`, `+`, `-`, `@`, `\t`, `\r` against formula injection;
|
|
59
|
+
- [ ] **screen-reader accessible data-table / text summary fallback + keyboard data-point navigation** verified;
|
|
60
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence at real cardinality per `Rule #0.3`).
|
|
@@ -81,7 +81,7 @@ Interactive visualization must define:
|
|
|
81
81
|
- legend/filter/keyboard equivalent;
|
|
82
82
|
- focus restoration after zoom/filter/data refresh.
|
|
83
83
|
|
|
84
|
-
Do not construct hundreds of Tab stops. Prefer one composite widget with roving focus/internal arrow keys when point-by-point exploration is required.
|
|
84
|
+
Do not construct hundreds of Tab stops. Prefer one composite widget with roving focus/internal arrow keys when point-by-point exploration is required. **Highcharts' `accessibility` module** is a useful benchmark pattern for this interaction model: it provides composite roving keyboard navigation across series and points, auto-generated screen-reader descriptions, an optional synchronized data table, and high-contrast pattern fills.
|
|
85
85
|
|
|
86
86
|
## Screen readers and live data
|
|
87
87
|
|
|
@@ -92,7 +92,7 @@ Do not construct hundreds of Tab stops. Prefer one composite widget with roving
|
|
|
92
92
|
|
|
93
93
|
## Sonification boundary
|
|
94
94
|
|
|
95
|
-
Sonification can help users perceive trend
|
|
95
|
+
Sonification can help users perceive trend, rhythm, and outliers, but support varies widely and it is never a WCAG substitute for textual/tabular access. **Highcharts' `sonification` module** illustrates the right boundary: opt-in audio playback, explicit play/pause and speed controls, configurable pitch/instrument mapping, and spoken context cues, always paired with primary visual, keyboard, and tabular equivalents. Never autoplay sound.
|
|
96
96
|
|
|
97
97
|
## Motion and cognitive load
|
|
98
98
|
|
|
@@ -52,46 +52,56 @@ Annotation should answer “what should I notice?” Use sparse domain-specific
|
|
|
52
52
|
|
|
53
53
|
When two percentage series answer related but different questions, repeat their denominators in local labels rather than writing only “share” or distinguishing them by hue. If a comparison becomes a stack on phones, keep the order, date range, denominator and common domain close to each value. Verify that a reader can explain which group each percentage describes without hover or looking back to the desktop legend.
|
|
54
54
|
|
|
55
|
-
##
|
|
55
|
+
## Honest numeric semantics, timezone, and SLA freshness
|
|
56
56
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- Round for decision-making resolution, not cosmetic symmetry. Keep enough precision to distinguish consequential differences.
|
|
60
|
-
- Use consistent time zone/calendar labeling; mark incomplete trailing periods.
|
|
61
|
-
- Explain nulls/gaps. Zero is not missing.
|
|
62
|
-
- Use tabular numerals for changing or column-aligned numeric values.
|
|
57
|
+
- **Explicit unit headers & axis labels**: put exact units and currency codes in column headers or axis titles (`Revenue ($ USD)`, `P99 Latency (ms)`, `Error Rate (%)`), never hidden exclusively inside hover tooltips.
|
|
58
|
+
- **`tabular-nums` + True Minus `U+2212` (`−`)**: apply `font-variant-numeric: tabular-nums lining-nums` on every numeric column, KPI, tick, and live counter, and render negative numbers with **True Minus `U+2212` (`−`)** rather than ASCII hyphen-minus `U+002D` (`-`) so `−` matches `+` glyph width and optical crossbar height:
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
```ts
|
|
61
|
+
export function formatMetric(value: number | null | undefined, unit = ''): string {
|
|
62
|
+
if (value === null || value === undefined || Number.isNaN(value)) return '—'; // never coerce null to 0
|
|
63
|
+
const formatted = new Intl.NumberFormat('en-US', { maximumFractionDigits: 2 }).format(Math.abs(value));
|
|
64
|
+
const sign = value < 0 ? '\u2212' : '';
|
|
65
|
+
return `${sign}${formatted}${unit ? `\u00A0${unit}` : ''}`;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
- **Strict separation between `0` (measured zero) and `null / — / N/A` (missing/uncollected)**:
|
|
70
|
+
- **In tables/KPIs**: render measured zero as `0` / `0.00` in standard foreground ink; render missing/uncollected values as muted `—` or `N/A` (`aria-label="No data collected"`) with an explanatory tooltip (`Sensor offline 02:10–02:25 UTC`).
|
|
71
|
+
- **In line/area charts**: break the path across `null` intervals (`defined(d => d.value !== null)` in D3/Plot, `connectNulls: false` in ECharts/Recharts) or bridge only with an explicit dashed "missing interval" style—never drop `null` to the `0` baseline!
|
|
72
|
+
- **Explicit display timezone (`UTC` vs local) & Data Freshness / SLA Staleness badge**:
|
|
73
|
+
- Label the active timezone visibly (`2026-11-25 14:00 UTC` or `Local · America/New_York`) and provide a `UTC <-> Local` switch on operational incidents/logs.
|
|
74
|
+
- Pair every live or warehouse-backed region with a **Data Freshness / SLA Staleness badge** (`Updated 12s ago · SLA 60s` -> transitions to high-contrast warning `Stale · 14m behind SLA` when `now - max(event_ts) > sla_ms`).
|
|
75
|
+
|
|
76
|
+
## Tables as visualization & safe exports
|
|
77
|
+
|
|
78
|
+
Tables are often the sharpest visual representation. Design them as high-precision scanning instruments:
|
|
67
79
|
|
|
68
80
|
| Rule | Application |
|
|
69
81
|
|---|---|
|
|
70
|
-
| alignment | right-align numeric columns
|
|
71
|
-
| units | put shared units in headers (`Latency (ms)`); repeat only when
|
|
72
|
-
|
|
|
73
|
-
| comparison | use inline bars/sparklines only when scale
|
|
74
|
-
| state |
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
| overflow | truncation needs expansion/copy path; never truncate the only distinguishing part of IDs |
|
|
82
|
+
| alignment | right-align numeric/timestamp columns (`text-align: right; font-variant-numeric: tabular-nums`); left-align text/IDs |
|
|
83
|
+
| units | put shared units in column headers (`Latency (ms)`, `Cost ($ USD)`); repeat inline only when rows mix currencies/units |
|
|
84
|
+
| `0` vs `null` | `0.0` = observed zero; muted `—` / `N/A` = null/unreported (sort `null` consistently last regardless of `ASC`/`DESC`) |
|
|
85
|
+
| comparison | use inline bars/sparklines only when scale + zero/baseline are consistent and labeled across rows |
|
|
86
|
+
| state | pair text + icon/shape + color for status; never rely on red/green fill alone |
|
|
87
|
+
| overflow | never truncate the distinguishing suffix of IDs/hashes (`…9f4a` or middle-ellipsis + one-click copy) |
|
|
88
|
+
| CSV/XLSX export safety | neutralize **OWASP Formula Injection**: prefix string cells starting with `=`, `+`, `-`, `@`, `\t`, or `\r` with `'` before CSV/XLSX export (while exporting true numeric negatives as native numbers in XLSX) so opening exports in Excel/Sheets cannot trigger `DDE` or formula execution |
|
|
78
89
|
|
|
79
|
-
|
|
90
|
+
> **Cross-skill boundary:** `pixelcraft-dataviz` governs analytical tables, numeric alignment, visual encodings, inline sparklines, and dashboard information density. Operational table CRUD (row selection, bulk actions, inline editing, keyset pagination, saved URL filters) coordinates with `pixelcraft-data-apps` and `pixelcraft-patterns`.
|
|
80
91
|
|
|
81
92
|
## Dashboard layout and density
|
|
82
93
|
|
|
83
94
|
Start from decisions, not chart inventory.
|
|
84
95
|
|
|
85
|
-
1. Put system health/outliers/actions first; contextual trends second; exploratory detail later.
|
|
96
|
+
1. Put system health/outliers/actions and **Data Freshness / SLA status** first; contextual trends second; exploratory detail later.
|
|
86
97
|
2. Group by operational object or decision, not by chart type.
|
|
87
|
-
3. State time range, freshness, source scope,
|
|
88
|
-
4. Preserve drill-down context: selection, filter, sort, time range, scroll, and
|
|
98
|
+
3. State time range, explicit timezone (`UTC` vs local), freshness SLA, source scope, and URL-serialized filters once per coherent region.
|
|
99
|
+
4. Preserve drill-down context: selection, filter, sort, time range, timezone, scroll, and deep-link URL state.
|
|
89
100
|
5. Use unequal emphasis. Every metric in the same card size teaches users that nothing matters.
|
|
90
|
-
6. High-frequency operations favor dense tables and exception queues; infrequent executive overview favors fewer, larger comparisons.
|
|
91
|
-
7. Leave enough whitespace to separate regions. Density means information priority, not cramped padding.
|
|
101
|
+
6. High-frequency operations favor dense `tabular-nums` tables and exception queues; infrequent executive overview favors fewer, larger comparisons.
|
|
92
102
|
|
|
93
|
-
Required dashboard states: no data yet, partial ingestion, stale/offline
|
|
103
|
+
Required dashboard states: no data yet, partial ingestion, **SLA stale/offline**, source error, permission-limited, empty after filter, extreme cardinality, long entity names, and degraded real-time connection. Never fabricate sparklines or placeholder deltas.
|
|
94
104
|
|
|
95
105
|
## Anti-slop dashboard pattern
|
|
96
106
|
|
|
97
|
-
Reject the generic grid of four KPI cards, purple gradient area chart, donut, leaderboard table, and “AI insights” box unless each element answers a real question. Replace decorative KPI deltas with explicit comparison periods
|
|
107
|
+
Reject the generic grid of four KPI cards, purple gradient area chart, donut, leaderboard table, and “AI insights” box unless each element answers a real question. Replace decorative KPI deltas with explicit comparison periods, True Minus `−` formatting, and SLA freshness provenance.
|