@thanhnguyxn/pixelcraft 0.0.0-stage → 0.1.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 +20 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +11 -0
- package/LICENSE +21 -0
- package/README.md +407 -2
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +444 -0
- package/docs/ARCHITECTURE.md +102 -0
- package/docs/DESIGN-RATIONALE.md +143 -0
- package/evals/README.md +27 -0
- package/evals/fixtures/README.md +36 -0
- package/evals/fixtures/direction-prototype-complexity.json +29 -0
- package/evals/fixtures/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -0
- package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
- package/evals/fixtures/plan-brownfield-evidence.json +28 -0
- package/evals/fixtures/visual-qa-task-evidence.json +29 -0
- package/evals/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +57 -0
- package/evals/pixelcraft-brandkit.md +58 -0
- package/evals/pixelcraft-chat-ui.md +55 -0
- package/evals/pixelcraft-constrained.md +55 -0
- package/evals/pixelcraft-craft.md +60 -0
- package/evals/pixelcraft-data-apps.md +55 -0
- package/evals/pixelcraft-dataviz.md +59 -0
- package/evals/pixelcraft-desktop.md +55 -0
- package/evals/pixelcraft-direction.md +60 -0
- package/evals/pixelcraft-document.md +55 -0
- package/evals/pixelcraft-email.md +55 -0
- package/evals/pixelcraft-extensions.md +55 -0
- package/evals/pixelcraft-game-ui.md +59 -0
- package/evals/pixelcraft-handoff.md +57 -0
- package/evals/pixelcraft-media.md +55 -0
- package/evals/pixelcraft-mobile.md +59 -0
- package/evals/pixelcraft-patterns.md +57 -0
- package/evals/pixelcraft-plan.md +65 -0
- package/evals/pixelcraft-review.md +63 -0
- package/evals/pixelcraft-spatial.md +55 -0
- package/evals/pixelcraft-tokens.md +57 -0
- package/evals/pixelcraft-tui.md +55 -0
- package/evals/pixelcraft-ux.md +59 -0
- package/evals/pixelcraft-visual-qa.md +80 -0
- package/evals/pixelcraft-web.md +71 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +5 -0
- package/install.ps1 +295 -0
- package/install.sh +437 -0
- package/package.json +63 -4
- package/plugin.json +24 -0
- package/scripts/build-adapters.mjs +290 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/test-build-adapters.mjs +48 -0
- package/scripts/test-distribution.mjs +124 -0
- package/scripts/test-export-tokens.mjs +105 -0
- package/scripts/test-finish-gate.mjs +148 -0
- package/scripts/test-installers.mjs +67 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +65 -0
- package/scripts/test-slop-scan.mjs +29 -0
- package/scripts/test-style-inventory.mjs +211 -0
- package/scripts/test-validate-skills.mjs +117 -0
- package/scripts/validate-skills.mjs +512 -0
- package/skills/pixelcraft/SKILL.md +135 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +73 -0
- package/skills/pixelcraft/references/report-template.md +35 -0
- package/skills/pixelcraft/references/stack-detection.md +155 -0
- package/skills/pixelcraft/references/surface-acceptance.md +40 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +29 -0
- package/skills/pixelcraft-accessibility/SKILL.md +33 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +51 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +58 -0
- package/skills/pixelcraft-accessibility/references/verification.md +59 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +66 -0
- package/skills/pixelcraft-brandkit/SKILL.md +115 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +125 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +80 -0
- package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
- package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
- package/skills/pixelcraft-brandkit/references/logo-methods.md +98 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +85 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +88 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +53 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +78 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +87 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +96 -0
- package/skills/pixelcraft-constrained/SKILL.md +51 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +66 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +84 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +63 -0
- package/skills/pixelcraft-craft/SKILL.md +44 -0
- package/skills/pixelcraft-craft/references/color.md +69 -0
- package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
- package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
- package/skills/pixelcraft-craft/references/layout.md +41 -0
- package/skills/pixelcraft-craft/references/motion.md +76 -0
- package/skills/pixelcraft-craft/references/typography.md +71 -0
- package/skills/pixelcraft-data-apps/SKILL.md +67 -0
- package/skills/pixelcraft-data-apps/references/dash.md +53 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +75 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +54 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +53 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +63 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +67 -0
- package/skills/pixelcraft-data-apps/references/panel.md +53 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +54 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +62 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +53 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +65 -0
- package/skills/pixelcraft-dataviz/SKILL.md +63 -0
- package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +97 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +57 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +99 -0
- package/skills/pixelcraft-desktop/SKILL.md +71 -0
- package/skills/pixelcraft-desktop/references/appkit.md +58 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +59 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +52 -0
- package/skills/pixelcraft-desktop/references/electron.md +54 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +54 -0
- package/skills/pixelcraft-desktop/references/gtk.md +54 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +52 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +61 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +65 -0
- package/skills/pixelcraft-desktop/references/tauri.md +54 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +52 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +58 -0
- package/skills/pixelcraft-desktop/references/working-context.md +5 -0
- package/skills/pixelcraft-direction/SKILL.md +154 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/direction-card.md +54 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +72 -0
- package/skills/pixelcraft-direction/references/movements.md +68 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +58 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +54 -0
- package/skills/pixelcraft-document/references/archetypes.md +83 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +154 -0
- package/skills/pixelcraft-document/references/print-css.md +134 -0
- package/skills/pixelcraft-document/references/slides.md +102 -0
- package/skills/pixelcraft-email/SKILL.md +58 -0
- package/skills/pixelcraft-email/references/client-quirks.md +45 -0
- package/skills/pixelcraft-email/references/html-tables.md +53 -0
- package/skills/pixelcraft-email/references/mjml.md +52 -0
- package/skills/pixelcraft-email/references/react-email.md +53 -0
- package/skills/pixelcraft-extensions/SKILL.md +51 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +31 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +23 -0
- package/skills/pixelcraft-extensions/references/raycast.md +19 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +26 -0
- package/skills/pixelcraft-game-ui/SKILL.md +61 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +52 -0
- package/skills/pixelcraft-game-ui/references/godot.md +57 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +38 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +51 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +52 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +65 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -0
- package/skills/pixelcraft-handoff/SKILL.md +49 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +104 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-media/SKILL.md +52 -0
- package/skills/pixelcraft-media/references/banners-video.md +112 -0
- package/skills/pixelcraft-media/references/og-generation.md +107 -0
- package/skills/pixelcraft-media/references/social-cards.md +72 -0
- package/skills/pixelcraft-mobile/SKILL.md +69 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +63 -0
- package/skills/pixelcraft-mobile/references/flet.md +53 -0
- package/skills/pixelcraft-mobile/references/flutter.md +69 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +65 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +61 -0
- package/skills/pixelcraft-mobile/references/kivy.md +59 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +60 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +71 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +70 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +5 -0
- package/skills/pixelcraft-mobile/references/uikit.md +58 -0
- package/skills/pixelcraft-patterns/SKILL.md +58 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +25 -0
- package/skills/pixelcraft-patterns/references/commerce.md +28 -0
- package/skills/pixelcraft-patterns/references/communication.md +26 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +29 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +31 -0
- package/skills/pixelcraft-patterns/references/marketing.md +32 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +74 -0
- package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +23 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +67 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- package/skills/pixelcraft-plan/references/plan-template.md +99 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +42 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +50 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +42 -0
- package/skills/pixelcraft-review/SKILL.md +64 -0
- package/skills/pixelcraft-review/references/audit-report.md +50 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +18 -0
- package/skills/pixelcraft-review/references/personas.md +26 -0
- package/skills/pixelcraft-review/references/polish.md +38 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
- package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
- package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
- package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +586 -0
- package/skills/pixelcraft-spatial/SKILL.md +52 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +98 -0
- package/skills/pixelcraft-spatial/references/platforms.md +77 -0
- package/skills/pixelcraft-tokens/SKILL.md +56 -0
- package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
- package/skills/pixelcraft-tokens/references/adoption.md +55 -0
- package/skills/pixelcraft-tokens/references/format.md +54 -0
- package/skills/pixelcraft-tokens/references/governance.md +80 -0
- package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
- package/skills/pixelcraft-tokens/references/theme-presets.md +94 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +285 -0
- package/skills/pixelcraft-tui/SKILL.md +60 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +60 -0
- package/skills/pixelcraft-tui/references/ink.md +60 -0
- package/skills/pixelcraft-tui/references/ratatui.md +62 -0
- package/skills/pixelcraft-tui/references/rich.md +62 -0
- package/skills/pixelcraft-tui/references/textual.md +67 -0
- package/skills/pixelcraft-ux/SKILL.md +46 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +30 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +97 -0
- package/skills/pixelcraft-ux/references/i18n.md +183 -0
- package/skills/pixelcraft-ux/references/laws.md +18 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +39 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +43 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +82 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +34 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +35 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +31 -0
- package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
- package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
- package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +65 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +135 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
- package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +513 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1154 -0
- package/skills/pixelcraft-web/SKILL.md +76 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +25 -0
- package/skills/pixelcraft-web/references/angular.md +61 -0
- package/skills/pixelcraft-web/references/astro.md +62 -0
- package/skills/pixelcraft-web/references/clojurescript.md +53 -0
- package/skills/pixelcraft-web/references/elm.md +53 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +53 -0
- package/skills/pixelcraft-web/references/html-css.md +88 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +53 -0
- package/skills/pixelcraft-web/references/java-web.md +52 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +53 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +54 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +61 -0
- package/skills/pixelcraft-web/references/pwa.md +225 -0
- package/skills/pixelcraft-web/references/qwik.md +54 -0
- package/skills/pixelcraft-web/references/react-next.md +69 -0
- package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/server-rendered.md +71 -0
- package/skills/pixelcraft-web/references/solid.md +60 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -0
- package/skills/pixelcraft-web/references/tailwind.md +73 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +62 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Email client quirks
|
|
2
|
+
|
|
3
|
+
Treat this as verification guidance, not immutable truth. Client behavior changes; recheck current support matrices before release.
|
|
4
|
+
|
|
5
|
+
## Outlook (Windows/Word rendering)
|
|
6
|
+
|
|
7
|
+
- Expect weak support for modern CSS, margin/precision layout, border radius/background images/flex/grid.
|
|
8
|
+
- Use table alignment, inline styles, explicit dimensions, MSO conditional comments only where justified.
|
|
9
|
+
- Buttons need bulletproof/fallback structure or robust table cells; decorative rounding is optional, meaning is not.
|
|
10
|
+
- Test dark mode/high contrast separately; color inversion can break imagery/logos.
|
|
11
|
+
|
|
12
|
+
## Gmail / Google clients
|
|
13
|
+
|
|
14
|
+
- Watch total HTML size because long messages may clip; keep source/content focused.
|
|
15
|
+
- Style stripping/embedded CSS support varies by client/surface; inline critical CSS.
|
|
16
|
+
- Image blocking/proxying affects dimensions/alt visibility/tracking.
|
|
17
|
+
- Promotions/threading/conversation grouping affect perceived order; subject/preheader/first visible copy matter.
|
|
18
|
+
|
|
19
|
+
## Apple Mail / iOS Mail
|
|
20
|
+
|
|
21
|
+
- Often supports more modern behavior but still test dark mode, remote content privacy, text scaling, notched/small screens, and image failure.
|
|
22
|
+
- Do not treat Apple-only rendering as proof because market/client mix differs.
|
|
23
|
+
|
|
24
|
+
## Dark mode
|
|
25
|
+
|
|
26
|
+
There is no single dark mode. Clients may invert colors partially, force backgrounds, leave images unchanged, or honor media queries inconsistently. Use transparent assets carefully, test logos/icons, avoid pure-black/white assumptions, and ensure semantic contrast survives mutation.
|
|
27
|
+
|
|
28
|
+
## Image blocking/privacy
|
|
29
|
+
|
|
30
|
+
- Assume images may not load initially or ever.
|
|
31
|
+
- Essential copy/CTA/date/amount/action must be real text.
|
|
32
|
+
- Alt text should communicate function/content, not filename.
|
|
33
|
+
- Do not use hidden tracking imagery as a substitute for consent-aware measurement; privacy features can distort metrics.
|
|
34
|
+
|
|
35
|
+
## Plaintext parity
|
|
36
|
+
|
|
37
|
+
Plaintext is a real interface: ordering, headings, URLs, list structure, dates/time zones, legal/footer links, preference/unsubscribe actions, and tone must make sense without HTML. Generate it from shared content where possible.
|
|
38
|
+
|
|
39
|
+
## RTL/localization/accessibility
|
|
40
|
+
|
|
41
|
+
Test expansion, bidi punctuation/mixed URLs/email addresses, locale formats, font fallback, alt translation, line wrapping, screen-reader reading order, link purpose, target size on touch clients, high contrast, and zoom. Never assume text direction inheritance is consistent across clients.
|
|
42
|
+
|
|
43
|
+
## Verification matrix
|
|
44
|
+
|
|
45
|
+
At minimum record: client/app/version, OS/device, light/dark, images on/off, viewport width, zoom/text size, plaintext/HTML, forwarded/not forwarded, link destination/expiry, clipping status. Anything not tested is `not-checked`; never claim “works in all clients.”
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Hand-authored HTML tables
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Email clients inconsistently support CSS variables. Treat generated token output as source-of-truth values but inline final literal colors/spacing into attributes/styles. Keep a build-time constants map so semantic names remain meaningful before compilation.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use table structure because it remains the most reliable baseline: outer background table, fixed/max-width container, single-column-first modules, aligned cells, inline CSS, `role="presentation"` where appropriate, MSO conditional comments only when justified. Design mobile behavior through width/max-width/fluid-hybrid techniques rather than modern grid assumptions.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use robust websafe fallback stacks. Custom fonts may be progressive enhancement in supporting clients only; never let meaning/layout depend on them. Use real text, explicit line-height/measure constraints, and localization expansion tolerance.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Assume animation is unsupported/inconsistent. Never require animation to communicate state or meaning. Static fallback is the baseline, not an alternate version.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Real text, meaningful alt text, empty alt for decorative imagery where honored, heading-like structure where clients permit, logical reading order, sufficient contrast, padded visible CTA hit area, descriptive links, plaintext parity. Tables should not expose layout noise to screen readers where roles are supported.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Email is mostly asynchronous communication, not live application state. Critical states are: images off, dark-mode inversion, clipped message, blocked/remote-content warning, plaintext-only, forwarded/quoted, print, narrow mobile viewport, high-contrast mode. Design each deliberately.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Do not depend on interactive forms inside email. Link to a preauthenticated/preferences page or clearly labeled web destination. Preserve user context safely; never expose sensitive tokens or require re-entering information already known when a secure flow can carry it.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| inline critical CSS plus table-based baseline | relying on external stylesheets/grid/flex support |
|
|
36
|
+
| real HTML text for primary copy/CTA | image-only hero containing essential content |
|
|
37
|
+
| explicit alt/plaintext fallback | blank white boxes when images are blocked |
|
|
38
|
+
| single-column-first information order | fragile multi-column design dependent on exact viewport |
|
|
39
|
+
| MSO conditional workaround narrowly scoped | Outlook hacks scattered through every module |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Outlook Word renderer, Gmail clipping/style stripping, image blocking, dark-mode color inversion, forwarding mutations, padding/margin inconsistency, button border-radius/background-image support, linked-image dimensions disappearing, plaintext divergence, tracking pixels misrepresenting engagement.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
Run the repository's email build/template validation pipeline without suppressing failures (for example, `npm run build` or your template compiler):
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use actual client previews/screenshots or a testing service; inspect source size/clipping, plaintext MIME, image-off rendering, dark mode, narrow/wide layouts, high contrast, links, spam/deliverability checks where available.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# MJML
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Keep semantic constants in a build-time theme/config or shared MJML attributes/variables depending toolchain. MJML compiles email-specific HTML; do not assume arbitrary CSS variables survive clients. Use tokens to set repeated colors/fonts/padding in components rather than hand-editing generated HTML.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use `mjml`, `mj-body`, `mj-section`, `mj-column`, and semantic components (`mj-text`, `mj-button`, `mj-image`, `mj-divider`) as intended. Single-column-first ordering remains essential. Do not fight the abstraction with deeply nested raw HTML unless a documented `mj-raw` escape is necessary—and isolate/comment why.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use robust fallback stacks. `mj-font` can register progressive-enhancement fonts but support is client-dependent. Real text/fallback metrics matter more than exact custom font rendering. Test expansion/RTL/plaintext behavior outside MJML assumptions.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Do not depend on motion. MJML is for resilient static-ish email; interactive/carousel hacks have inconsistent support and accessibility risk.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
MJML abstracts structure but does not guarantee meaningful email UX. Supply alt text, real text, semantic reading order, descriptive buttons/links, contrast-aware colors, plaintext counterpart, sensible preheader, and keyboard/touch target size on destination links/buttons where client capabilities permit.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Validate images off/blocked, dark mode, clipping, plaintext, forwarding, narrow viewport, high contrast, print, missing remote assets. Ensure CTA/meaning work if styling is degraded.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Do not depend on forms in email. Link to secure web flows with preauthenticated state where appropriate. Avoid asking users to reply with sensitive data.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| build reusable mj-section/component patterns | hand-editing compiled HTML after every build |
|
|
36
|
+
| `mj-button` with real text/href/fallback color | image-only CTA |
|
|
37
|
+
| isolated justified `mj-raw` escape hatch | raw HTML everywhere defeating MJML's purpose |
|
|
38
|
+
| concise alt text such as `alt="Monthly usage chart"` | missing/useless alt like `alt="image"` |
|
|
39
|
+
| inspect generated output/source size | assuming MJML abstraction guarantees client compatibility |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Compiled output divergence from mental model, raw escape overuse, custom font assumptions, section/column nesting errors, dark-mode mutation, image blocking, Gmail clipping due size, Outlook-specific rendering surprises, plaintext not generated from same content model.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npx mjml input.mjml -o output.html
|
|
49
|
+
npm run build 2>/dev/null || true
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Inspect compiled source and actual client previews. Validate image-off, dark mode, mobile width, plaintext, clipping, forwarding, links/UTM correctness, and accessibility manually or through a preview service.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# React Email
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use typed semantic constants in shared modules and pass them into components/styles. React Email compiles JSX to email-oriented HTML, but client CSS support remains fragmented; do not assume CSS variables/modern selectors survive. Shared constants preserve semantic token intent while final output inlines literal values.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use React Email components (`Html`, `Body`, `Container`, `Section`, `Row`, `Column`, `Text`, `Button`, `Img`, `Preview`) or project equivalents deliberately. Single-column-first ordering and resilient inline styles remain mandatory. Component abstraction does not make email a normal React web app.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use fallback font stacks and real text. Custom fonts are progressive enhancement only. Avoid layout that depends on exact metrics. Include plaintext generation using the same structured content where possible rather than hand-diverging copy.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Assume animation/interactivity is unsupported. Email meaning and CTA must work statically.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Real text, meaningful alt text, logical reading order, descriptive link/button copy, contrast-aware styling, plaintext parity, preheader text, no image-only essential content. Inspect rendered HTML because component names do not guarantee client semantics.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Test images blocked/off, dark mode inversion/mutation, Gmail clipping, plaintext-only, forwarding/quoting, narrow mobile view, print/high contrast, missing assets. Transactional email also needs expired-link/already-used/unauthorized destination states on the destination page, though the email itself cannot solve them.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Do not depend on embedded forms. Link to secure destination flows. Use correct preheader/copy so users understand consequence before clicking.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| shared typed content model feeding HTML + plaintext | manually maintaining divergent plaintext copy |
|
|
36
|
+
| real `Button`/link text with consequence verb | image-only or “Click here” CTA |
|
|
37
|
+
| semantic constants passed to inline styles | assuming CSS variables/classes work everywhere |
|
|
38
|
+
| preview/preheader written deliberately | first legal/footer text accidentally becoming preview |
|
|
39
|
+
| inspect compiled HTML/client rendering | trusting React component rendering in isolation |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Treating output like normal web React, inconsistent plaintext, missing alt/preheader, style prop assumptions, client-specific mutation, clipping due output weight, dark-mode logo disappearance, generated HTML bloat, local preview looking better than real clients.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm run lint
|
|
49
|
+
npm run build
|
|
50
|
+
npx email dev 2>/dev/null || true
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use local preview only as initial evidence. Validate compiled HTML/plaintext, image-off/dark/mobile/high-contrast rendering, actual client previews/test service, link destinations/expiry behavior, and clipping/source size.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-extensions
|
|
3
|
+
description: Designs and verifies host-constrained extension and plugin interfaces. Use for browser extensions, Manifest V3 popups/options/side panels/content-script UI, Shadow DOM isolation, host-theme adaptation, permission UX, VS Code webviews and CSP, Raycast commands, Figma plugins/widgets, Office add-ins/task panes, embedded panels, and compact host-controlled UI where platform constraints shape layout, security, and visual design.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pixelcraft extensions
|
|
10
|
+
|
|
11
|
+
Extension UI is embedded trust-sensitive UI. Respect the host's security model, theme, chrome, input conventions, and limited space. Do not import a full product shell or branding takeover into a popup, panel, webview, or plugin iframe.
|
|
12
|
+
|
|
13
|
+
## Surface craft
|
|
14
|
+
|
|
15
|
+
Use the host's smallest appropriate surface: command for a quick action, panel for recurring context, webview for needs the host cannot express. Preserve host tokens, zoom and keyboard conventions, show the object's context, and verify open/action/dismiss with focus restored. Do not import a site's navigation or modal system into the host.
|
|
16
|
+
|
|
17
|
+
## References
|
|
18
|
+
|
|
19
|
+
- Read [references/browser-extensions.md](references/browser-extensions.md) for MV3 popup/options/side panel/content-script UI, Shadow DOM, permissions, lifecycle, and browser constraints.
|
|
20
|
+
- Read [references/vscode-webviews.md](references/vscode-webviews.md) for VS Code webview isolation, `asWebviewUri`, CSP/nonces, theme variables, message passing, and editor UX.
|
|
21
|
+
- Read [references/raycast.md](references/raycast.md) for Raycast-native command UI, List/Grid/Detail/Form, ActionPanel, shortcuts, loading, and launcher constraints.
|
|
22
|
+
- Read [references/figma-office.md](references/figma-office.md) for Figma plugin iframe UI and Office task-pane/add-in constraints.
|
|
23
|
+
|
|
24
|
+
## Platform translation rules
|
|
25
|
+
|
|
26
|
+
1. Identify the surface type first: transient popup, persistent panel, embedded content UI, full options page, command palette item, canvas plugin, or host task pane.
|
|
27
|
+
2. Use host-native controls/tokens before custom branding. Match theme changes live rather than capturing a static palette.
|
|
28
|
+
3. Design for the actual viewport: narrow popup/panel, resizable webview/task pane, content-script overlay with unpredictable host CSS, or command-rendered native controls.
|
|
29
|
+
4. Make permissions contextual and reversible. Explain why each host/data permission is needed and provide degraded behavior when denied.
|
|
30
|
+
5. Treat security boundaries as design constraints: CSP, sandboxing, isolated worlds, postMessage validation, no remote code execution, no broad scraping by default.
|
|
31
|
+
6. Keep state truthful across lifecycle interrupts: popup close, host navigation, reload/update, workspace switch, document change, account/permission expiry.
|
|
32
|
+
|
|
33
|
+
## Hard rules
|
|
34
|
+
|
|
35
|
+
- Never inject visible content into arbitrary host pages before establishing origin/match scope and user intent.
|
|
36
|
+
- Never use broad host permissions because narrower APIs are harder.
|
|
37
|
+
- Never hardcode light colors or assume dark mode; read host theme variables/signals.
|
|
38
|
+
- Never rely on remote scripts or CSP bypasses in webviews/popups.
|
|
39
|
+
- Never use browser-extension popup lifetime as durable state storage.
|
|
40
|
+
- Never fake native launcher/editor behavior with unconstrained web UI when the platform supplies a structured component model.
|
|
41
|
+
|
|
42
|
+
## Pre-submit checklist
|
|
43
|
+
|
|
44
|
+
- [ ] correct surface type and host integration point chosen;
|
|
45
|
+
- [ ] permissions minimized, explained, versioned, and denied/error states designed;
|
|
46
|
+
- [ ] host light/dark/high-contrast theme and density respected;
|
|
47
|
+
- [ ] CSP/sandbox/origin/message validation constraints satisfied;
|
|
48
|
+
- [ ] keyboard/shortcut/focus behavior matches the host;
|
|
49
|
+
- [ ] resize/smallest width/height and panel collapse behavior verified;
|
|
50
|
+
- [ ] lifecycle interruption/update/reload states tested;
|
|
51
|
+
- [ ] screenshots or runtime inspection labeled by host/version/emulation status.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Browser extensions (Manifest V3)
|
|
2
|
+
|
|
3
|
+
Verified core integration points: `action.default_popup` for transient popup UI, `options_ui.page` for settings, `side_panel.default_path` plus the `sidePanel` permission for persistent panel UI, `background.service_worker` for event handling, and `content_scripts` matches/js/css or scripting injection for page context UI.
|
|
4
|
+
|
|
5
|
+
## Surface selection
|
|
6
|
+
|
|
7
|
+
| Surface | Use | Constraints |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| popup | quick status/action | ephemeral, narrow, closes on focus loss; no durable state assumption |
|
|
10
|
+
| side panel | persistent companion workflow | resizable/narrow; requires `sidePanel`; user controls side/pinning |
|
|
11
|
+
| options page | deep configuration | full document but browser settings context; deep-link/dirty state matter |
|
|
12
|
+
| content UI | contextual page augmentation | hostile/unknown CSS/layout; must not break host page |
|
|
13
|
+
|
|
14
|
+
## Content-script UI isolation
|
|
15
|
+
|
|
16
|
+
Attach a host element and use Shadow DOM for UI where supported. Load styles into the shadow root rather than relying on page globals. Reset inheritance deliberately: color scheme, font, line-height, box-sizing, direction. Use semantic HTML inside the shadow root because isolation does not create accessibility automatically. Never let host CSS selectors or extension CSS leak unintentionally; test on dense, dark, RTL, zoomed, and highly customized pages.
|
|
17
|
+
|
|
18
|
+
## Permissions UX
|
|
19
|
+
|
|
20
|
+
- Prefer `activeTab`/user invocation over broad `<all_urls>` host access when the task allows.
|
|
21
|
+
- Explain optional permissions at the moment of need; provide visible denied/skipped behavior.
|
|
22
|
+
- Version sensitive behavior in onboarding/release notes; trust erosion is a UX defect.
|
|
23
|
+
- Site access controls differ by browser; test Chromium and Firefox/mobile support honestly rather than claiming parity.
|
|
24
|
+
|
|
25
|
+
## State/lifecycle
|
|
26
|
+
|
|
27
|
+
Popup closure is not logout/submission. Persist state through extension storage/message passing deliberately. Service workers are event-driven and can restart; no hidden dependence on in-memory timers/state. Tab navigation/reload/frame changes must not duplicate injected UI.
|
|
28
|
+
|
|
29
|
+
## Verification
|
|
30
|
+
|
|
31
|
+
Test minimum popup width/height, side-panel resizing, zoom/text scaling, dark/light host theme, keyboard focus trap/escape, screen-reader names, content-script Shadow DOM isolation, denied permission, service-worker restart, extension update/reload, target-page navigation, CSP errors, and browser differences.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Figma plugins and Office add-ins
|
|
2
|
+
|
|
3
|
+
## Figma plugins
|
|
4
|
+
|
|
5
|
+
`figma.showUI(html, options)` creates an iframe-based modal/plugin UI. Relevant verified constraints: `visible` controls initial visibility, `width` defaults to 300 with a documented minimum around 70, and `figma.ui.resize(width, height)` can change dimensions later. Treat the iframe and sandbox/plugin controller as separate trusted boundaries; validate messages in both directions.
|
|
6
|
+
|
|
7
|
+
- Match Figma density, keyboard behavior, selection context, dark/light theme signals where exposed, and small-panel constraints.
|
|
8
|
+
- Make object selection/state explicit: nothing selected, unsupported mixed selection, missing permission/component/document change.
|
|
9
|
+
- Long operations need progress/cancellation because plugin execution is tied to document/user context.
|
|
10
|
+
- Do not mutate the canvas without clear user intent; destructive/bulk operations need scope preview and undo expectations.
|
|
11
|
+
|
|
12
|
+
## Office add-ins/task panes
|
|
13
|
+
|
|
14
|
+
Office task panes are embedded web applications running beside host documents. Use host-appropriate Fluent/platform conventions, theme tokens, responsive narrow widths, keyboard/focus behavior, and documented authentication/SSO/consent flows. Respect document-centric state: selection changes, file switching, coauthoring, offline mode, permission expiry, and host/version differences across Windows/Mac/web/mobile.
|
|
15
|
+
|
|
16
|
+
- Validate Office runtime APIs before use; label host/version fallback honestly.
|
|
17
|
+
- Never silently write into the document; preview insertion/range/format side effects.
|
|
18
|
+
- Preserve task-pane state through resize/hide/show without pretending it is persistent storage.
|
|
19
|
+
- Handle network, permission, expired token, unsupported host, and malformed document state as first-class UX.
|
|
20
|
+
|
|
21
|
+
## Verification
|
|
22
|
+
|
|
23
|
+
Test narrow/minimum width, resize, host dark/light theme, keyboard/screen reader, message spoofing/shape mismatch, permission denial, missing selection/document, long localized labels, offline/network interruption, update/reload lifecycle, and actual host versions rather than only browser-hosted UI.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Raycast extensions
|
|
2
|
+
|
|
3
|
+
Raycast renders a React declaration into native launcher UI. The API is a design system, not arbitrary HTML/CSS: use `List`, `Grid`, `Detail`, `Form`, and `ActionPanel` rather than fighting the host.
|
|
4
|
+
|
|
5
|
+
## Idioms
|
|
6
|
+
|
|
7
|
+
- Render quickly; use `isLoading` on top-level components while data loads.
|
|
8
|
+
- Choose List for dense repeated items, Grid for visual artifacts, Detail for inspection, Form for creation/input.
|
|
9
|
+
- Put contextual operations in `ActionPanel` and group them in semantic sections. Primary/secondary action order matters because default keyboard shortcuts derive from it.
|
|
10
|
+
- Keyboard-first means every essential operation has an action/shortcut; do not rely on hover or visual-only affordances.
|
|
11
|
+
- Use accessories, icons, subtitles, keywords, filtering, sections, and empty views to communicate structure instead of custom layout.
|
|
12
|
+
|
|
13
|
+
## UX constraints
|
|
14
|
+
|
|
15
|
+
Launcher commands are brief and interruptible. Preserve query/filter state where expected, make errors retryable, use toast/alert appropriate to severity, and cache only with explicit staleness semantics. Authentication/preferences need clear setup and recovery; secrets belong in supported preference/storage mechanisms, not copied into plaintext UI.
|
|
16
|
+
|
|
17
|
+
## Verification
|
|
18
|
+
|
|
19
|
+
Test empty/loading/error/offline/permission states, long titles/subtitles, dynamic filtering, keyboard-only invocation of every action, shortcut conflicts, theme/icon readability, large result sets, cancellation of stale requests, and behavior when the command is repeatedly launched or the item selection changes during async work.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# VS Code webviews
|
|
2
|
+
|
|
3
|
+
Webviews are isolated embedded documents inside the editor. Treat them as application UI constrained by VS Code security and theme systems.
|
|
4
|
+
|
|
5
|
+
## Security/resource rules
|
|
6
|
+
|
|
7
|
+
- Convert local resources with `webview.asWebviewUri`; do not hardcode legacy `vscode-resource:` paths.
|
|
8
|
+
- Use `webview.cspSource` in the Content Security Policy and nonce scripts/styles rather than broad unsafe directives.
|
|
9
|
+
- Enable scripts only when needed and constrain `localResourceRoots` to the smallest workspace/extension directories.
|
|
10
|
+
- Validate every `postMessage` payload by type/schema/origin context. Treat webview input as untrusted.
|
|
11
|
+
- Do not use remote scripts/CDNs as a shortcut around CSP or offline behavior.
|
|
12
|
+
|
|
13
|
+
## Theme integration
|
|
14
|
+
|
|
15
|
+
VS Code exposes theme colors as CSS variables in webviews. Use variables such as `--vscode-editor-background`, `--vscode-editor-foreground`, `--vscode-focusBorder`, `--vscode-button-background`, `--vscode-button-foreground`, `--vscode-input-background`, `--vscode-errorForeground`, and font-family/size variables where appropriate. Test themes rather than hardcoding light/dark detection. Respect high-contrast borders/focus and editor font scaling.
|
|
16
|
+
|
|
17
|
+
## Editor UX
|
|
18
|
+
|
|
19
|
+
- Choose webview panel vs sidebar/tree/custom editor based on workflow persistence and document ownership.
|
|
20
|
+
- Preserve view state across reveal/hide deliberately; document the cost of `retainContextWhenHidden` rather than enabling it blindly.
|
|
21
|
+
- Keyboard focus must enter/leave the webview without trapping users; command palette/menu paths remain available.
|
|
22
|
+
- Match editor density, iconography, terminology, split behavior, and workspace trust expectations.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
Inspect narrow sidebar width, split/editor resize, light/dark/high-contrast themes, font scaling, keyboard/screen-reader path, CSP console errors, offline behavior, workspace trust restricted mode, window reload, serialization/restoration, message schema errors, and Linux/macOS/Windows/web differences where claimed.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-game-ui
|
|
3
|
+
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into game interfaces across Unity UI Toolkit, Godot Control/UI, Unreal UMG, LÖVE2D, Bevy, and MonoGame. Use for HUDs, menus, inventory, controller/keyboard navigation, focus order, safe areas, subtitles, accessibility options, localization, legibility at distance, platform certification-style constraints, pause/settings flows, and game UI verification.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pixelcraft game UI
|
|
10
|
+
|
|
11
|
+
Use this skill when UI lives inside or around a game loop. Game UI must remain legible under motion, stress, distance, controller input, variable aspect ratios, localization expansion, and platform certification expectations.
|
|
12
|
+
|
|
13
|
+
## Surface craft
|
|
14
|
+
|
|
15
|
+
Separate always-needed survival information from inspect-on-demand stats. Preserve HUD anchors across resolution and safe-area changes; teach an action with its current input glyph, not a hard-coded device prompt. Test in motion against changing scene luminance, after swapping input, and from the target viewing distance. Do not infer readability from a paused screenshot.
|
|
16
|
+
|
|
17
|
+
## Detection signals
|
|
18
|
+
|
|
19
|
+
Unity `ProjectSettings/`, `.unity`, UXML/USS/UI Builder assets; Godot `project.godot`, `.tscn`, `.gd`, Control/Theme resources; Unreal `.uproject`, UMG widget assets/Blueprints; input maps, localization pipelines, platform target settings, safe-area/certification documentation.
|
|
20
|
+
|
|
21
|
+
## Translate direction to game idioms
|
|
22
|
+
|
|
23
|
+
1. Map semantic tokens to engine theme/style systems: Unity USS variables/selectors, Godot Theme resources, Unreal styles/brushes/materials.
|
|
24
|
+
2. Separate diegetic world presentation, HUD state, menu/settings, and cinematic narration. Do not let spectacle destroy critical state legibility.
|
|
25
|
+
3. Design focus/navigation for controller/keyboard before mouse/touch polish; every actionable element needs predictable spatial navigation and visible focus.
|
|
26
|
+
4. Reserve safe areas and platform-specific system overlays; verify aspect ratio, resolution scaling, split screen, handheld/TV distance, and stream/capture cropping.
|
|
27
|
+
5. Treat localization, accessibility options, input remapping, subtitles/captions, colorblind differentiation, and difficulty/assists as core UI systems—not post-launch patches.
|
|
28
|
+
|
|
29
|
+
## Platform-wide rules
|
|
30
|
+
|
|
31
|
+
- Critical HUD information survives motion, explosion/particle noise, low brightness, colorblindness, and glanceable viewing distance.
|
|
32
|
+
- Do not cover crosshair/objective/danger/state with decorative panels or tutorial prompts.
|
|
33
|
+
- Controller navigation must have sane initial focus, wrapping/dead-end behavior, back/cancel semantics, and no invisible focus traps.
|
|
34
|
+
- Text scaling/localization can break bitmap atlases, fixed-width labels, and glyph coverage; plan overflow/expansion early.
|
|
35
|
+
- Certification-style requirements vary by platform/version; treat them as constraints to verify against current official checklists, not universal law.
|
|
36
|
+
- UI audio/haptics/animation should reinforce state without masking gameplay-critical feedback.
|
|
37
|
+
|
|
38
|
+
## Common game-UI failures
|
|
39
|
+
|
|
40
|
+
- HUD designed on a static 1080p mockup but illegible in motion/at distance;
|
|
41
|
+
- menu navigation impossible without mouse or precise touch;
|
|
42
|
+
- focus jumping unpredictably after closing a popup;
|
|
43
|
+
- text clipped in German/Finnish or missing CJK/Arabic glyph atlases;
|
|
44
|
+
- color-only team/enemy/rarity/status encoding;
|
|
45
|
+
- tutorial modal blocking the mechanic it teaches;
|
|
46
|
+
- safe-area violation on TV/handheld/notched devices;
|
|
47
|
+
- remapping UI that cannot represent conflicts/chords/multiple devices.
|
|
48
|
+
|
|
49
|
+
## Verification options
|
|
50
|
+
|
|
51
|
+
Engine editor preview is not equivalent to runtime gameplay verification. Use playmode/device screenshots, controller-only walkthroughs, resolution/aspect matrices, localization pseudo-text/glyph tests, accessibility settings tests, and platform-specific validation where available. Label console/certification claims `not-checked` unless current official requirements were actually inspected.
|
|
52
|
+
|
|
53
|
+
## Framework routing
|
|
54
|
+
|
|
55
|
+
- Read [references/unity-ui-toolkit.md](references/unity-ui-toolkit.md) for Unity UI Toolkit/UXML/USS.
|
|
56
|
+
- Read [references/godot.md](references/godot.md) for Godot Control/UI/Theme/focus behavior.
|
|
57
|
+
- Read [references/unreal-umg.md](references/unreal-umg.md) for Unreal UMG/Slate-style UI.
|
|
58
|
+
- Read [references/hud-principles.md](references/hud-principles.md) for cross-engine HUD, controller navigation, safe-area, localization, accessibility, and certification-style constraints.
|
|
59
|
+
- Read [references/love2d.md](references/love2d.md) for LÖVE2D/Lua games.
|
|
60
|
+
- Read [references/bevy.md](references/bevy.md) for Bevy/Rust UI and AccessKit-oriented semantics.
|
|
61
|
+
- Read [references/monogame.md](references/monogame.md) for MonoGame/C# custom game UI.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Bevy UI (Rust)
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Use semantic Rust constants/resources/components for theme values and shared styles. Current Bevy UI uses ECS nodes/components; avoid raw repeated colors/fonts. Coordinate game-art color grading with UI token intent.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
Use `Node` layout properties/flex-like behavior, explicit hierarchy, camera/render-target scale, aspect/resolution changes, safe margins, HUD versus menu/world-space ownership. Verify resizing/window scaling rather than static editor assumptions.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Load font assets explicitly; validate glyph coverage/localization, scaling, bitmap/vector rendering, texture atlas behavior. Text size/readability at gameplay distance is a design constraint, not a default.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
Implement animation through systems/timers/tweens deliberately. Expose reduced-motion/flash-reduction options, handle pause/cancellation/interruption, and never make critical state dependent on animation completion.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
Bevy integrates AccessKit-oriented accessibility infrastructure in current versions; examples use `bevy::a11y::AccessibilityNode` with `accesskit::Role`. Add semantic nodes/roles/labels for custom UI and verify actual platform adapters/version support. ECS rendering does not automatically create usable focus/screen-reader behavior.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Use explicit ECS states/resources/events for loading/menu/pause/error/death/network/empty inventory/settings/remap/interruption. Model focus ownership and restoration after popups/scene/state transitions.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
Text input is low-level/custom unless using mature widgets/plugins. Validate keyboard focus, selection/caret/clipboard/IME behavior, remapping conflicts, virtual keyboard needs, validation timing, and recovery before using it for consequential input.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `AccessibilityNode(Accessible::new(Role::Button))` where custom semantics are needed | drawing text/rectangles and calling it a button |
|
|
36
|
+
| explicit state machine/menu focus ownership | focus disappearing after entity despawn |
|
|
37
|
+
| semantic theme resource | raw color constants in every spawn bundle |
|
|
38
|
+
| reduced flash/motion gameplay setting | assuming engine automatically honors OS settings |
|
|
39
|
+
|
|
40
|
+
## Known traps
|
|
41
|
+
|
|
42
|
+
Rapid API churn/version mismatch, entity despawn focus loss, accessibility adapter gaps, font glyph omissions, scaling/render-target mismatch, ECS event ordering bugs, custom input complexity.
|
|
43
|
+
|
|
44
|
+
## Verification commands
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
cargo test
|
|
48
|
+
cargo clippy -- -D warnings
|
|
49
|
+
cargo run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Run resolution/aspect/input matrix, keyboard/controller-only flow, actual accessibility tooling where supported, pause/interruption/resume, localization/glyph tests, screenshots/device targets.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Godot UI
|
|
2
|
+
|
|
3
|
+
Evidence: Godot docs confirm Control focus modes including keyboard/D-pad behavior, `add_theme_*_override` methods, theme inheritance, and dynamic font formats/size overrides.
|
|
4
|
+
|
|
5
|
+
## Token mapping
|
|
6
|
+
|
|
7
|
+
Use Theme resources for shared colors/fonts/styles/constants and scoped overrides only when necessary:
|
|
8
|
+
|
|
9
|
+
```gdscript
|
|
10
|
+
button.add_theme_color_override("font_color", pc_action_text)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Prefer theme types/items that express semantic roles. Do not duplicate styleboxes/fonts per control unless variation is intentional.
|
|
14
|
+
|
|
15
|
+
## Layout and responsive idioms
|
|
16
|
+
|
|
17
|
+
Use Control containers (`VBoxContainer`, `HBoxContainer`, `GridContainer`, `MarginContainer`, aspect/size flags/anchors) rather than absolute positioning everywhere. Handle window resizing/stretch mode/aspect ratio/safe area/controller distance. Separate HUD CanvasLayer from menu/control tree ownership.
|
|
18
|
+
|
|
19
|
+
## Typography/custom fonts
|
|
20
|
+
|
|
21
|
+
Use dynamic TTF/OTF/WOFF fonts where scaling/localization matter; bitmap fonts only for intentional pixel/bitmap systems. Since Godot 4 separates font resource and size override, define sizes semantically. Verify glyph coverage/fallbacks/localization expansion.
|
|
22
|
+
|
|
23
|
+
## Motion/reduced motion
|
|
24
|
+
|
|
25
|
+
Use Tweens/AnimationPlayer purposefully, pause/cancel behavior explicitly, and expose reduced-motion/flash-reduction options. Do not make critical state dependent on tween completion without interruption handling.
|
|
26
|
+
|
|
27
|
+
## Accessibility specifics
|
|
28
|
+
|
|
29
|
+
Use Control focus mode and focus neighbors/input map behavior deliberately. Focus visual appears for keyboard/gamepad/grab focus scenarios; do not hide it. Verify controller/keyboard navigation, colorblind differentiation, subtitle/caption sizing/background, remapping, scalable HUD/text, and platform screen-reader limitations honestly.
|
|
30
|
+
|
|
31
|
+
## States idiom
|
|
32
|
+
|
|
33
|
+
Model pause/loading/error/empty inventory/network/offline/death/respawn/dialogue/cutscene/permission states explicitly. Pause behavior/process mode affects UI; interruption/resume semantics are core game UX. Restore focus after popup/menu close/scene transition.
|
|
34
|
+
|
|
35
|
+
## Forms idiom
|
|
36
|
+
|
|
37
|
+
LineEdit/controls need labels/help, validation timing, virtual keyboard/platform input awareness, paste behavior where available, focus order, input preservation, and recovery copy. Settings/remapping UI must handle conflicts/device multiplicity.
|
|
38
|
+
|
|
39
|
+
## Do/don't pairs
|
|
40
|
+
|
|
41
|
+
| Do | Don't |
|
|
42
|
+
|---|---|
|
|
43
|
+
| shared Theme resource with scoped overrides | duplicating styleboxes/fonts across every Control |
|
|
44
|
+
| explicit `focus_neighbor_*`/initial focus | random controller navigation dead ends |
|
|
45
|
+
| containers/size flags for resize | absolute pixel layout only at 1080p |
|
|
46
|
+
| focus restoration after popup close | focus trapped in hidden/freed node |
|
|
47
|
+
| process mode/pause behavior explicit | menu hidden or input dead because pause ownership was unclear |
|
|
48
|
+
|
|
49
|
+
## Known traps
|
|
50
|
+
|
|
51
|
+
Mouse filter blocking input unintentionally, focus loss after node removal, theme item confusion because theme values are not ordinary object properties, localization glyph/overflow issues, stretch/aspect mismatch, safe-area neglect, controller/keyboard input map conflict, pause/process-mode bugs.
|
|
52
|
+
|
|
53
|
+
## Verification commands
|
|
54
|
+
|
|
55
|
+
Run the project's configured headless test runner and preserve its exit status and log. Launch the affected scene in the target engine version; a clean boot does not validate navigation or gameplay.
|
|
56
|
+
|
|
57
|
+
Use runtime screenshots/device tests, controller-only navigation, resize/aspect/safe-area matrix, localization pseudo-text/glyph checks, accessibility option tests, pause/interruption/reconnect flows, and platform export validation where applicable.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Cross-engine HUD principles
|
|
2
|
+
|
|
3
|
+
## Legibility under play
|
|
4
|
+
|
|
5
|
+
- Define criticality tiers: survival-critical, objective-critical, tactical/optional, ambient/flavor.
|
|
6
|
+
- Critical information must survive motion/particles/lighting, distance, low brightness, colorblindness, localization expansion, compression/streaming artifacts, and glance duration.
|
|
7
|
+
- Use redundancy: color + shape/icon/text/position/audio where appropriate.
|
|
8
|
+
- Do not cover crosshair/objective/danger/state with decorative panels/tutorial prompts.
|
|
9
|
+
- Test at actual worst-case distance/resolution/brightness, not only editor close-up.
|
|
10
|
+
|
|
11
|
+
## Controller/focus navigation
|
|
12
|
+
|
|
13
|
+
- Design initial focus for every screen/popup and restore focus after close/transaction/error/scene change.
|
|
14
|
+
- Spatial navigation must be predictable; avoid dead ends, invisible wrapping surprises, and focus jumping to hidden/disabled widgets.
|
|
15
|
+
- Back/cancel semantics must be consistent across menus/HUD/platform overlays.
|
|
16
|
+
- Every primary action must be possible without mouse/touch where controller/keyboard is supported.
|
|
17
|
+
- Input remapping UI must show device/context/chords/conflicts and preserve user mappings safely.
|
|
18
|
+
|
|
19
|
+
## Safe areas and platform constraints
|
|
20
|
+
|
|
21
|
+
Reserve safe areas for TV/handheld/notched/system overlay contexts. Test 16:9/ultrawide/portrait/steam-deck-like handheld/split screen where applicable. Certification-style constraints vary by console/platform/version and are often confidential or changing: label them as verification requirements to check in current official docs, never invent them here.
|
|
22
|
+
|
|
23
|
+
## Localization/accessibility options
|
|
24
|
+
|
|
25
|
+
- pseudo-localize early; budget expansion and test glyph coverage for target scripts;
|
|
26
|
+
- support text/HUD scaling, subtitle size/background/speaker/sound cues, colorblind-safe palettes, flash reduction, motion/camera comfort, input remapping/toggle/hold alternatives;
|
|
27
|
+
- localize button prompts/icons and input-device terminology rather than hard-coding one controller/layout;
|
|
28
|
+
- treat accessibility settings as persistent first-class UX with preview/reset/recovery.
|
|
29
|
+
|
|
30
|
+
## State hierarchy
|
|
31
|
+
|
|
32
|
+
Separate persistent HUD state, transient feedback, modal interruption, tutorial/coach marks, cinematic subtitles, network/system notifications, and debug overlays. Define priority/interruption rules; otherwise everything competes at once.
|
|
33
|
+
|
|
34
|
+
Give an acquisition or milestone two levels when the moment needs both: brief confirmation that does not interrupt active play, and a stable place in the inventory, objective log or pause screen to inspect the details later. Do not make the transient presentation the only record. Trigger it during a high-attention sequence and verify that the player can continue, look up the exact result after it disappears, and distinguish it without color or sound alone.
|
|
35
|
+
|
|
36
|
+
## Verification matrix
|
|
37
|
+
|
|
38
|
+
Record engine/version/platform/device, resolution/aspect/scale, input device, brightness/contrast/HDR setting, locale/script/text size, motion/flash/accessibility settings, network state, gameplay chaos level, and exact task. Editor screenshot alone is weak evidence; runtime chaos/distance/controller evidence is stronger.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# LÖVE2D (Lua)
|
|
2
|
+
|
|
3
|
+
## Token mapping
|
|
4
|
+
|
|
5
|
+
Centralize palette/type/scale in a Lua module. Return semantic values, not raw constants scattered through draw calls. Fonts/images are runtime assets; preload intentionally.
|
|
6
|
+
|
|
7
|
+
## Layout and responsive idioms
|
|
8
|
+
|
|
9
|
+
LÖVE is immediate-mode drawing with no built-in retained UI system. Define layout regions mathematically, handle `love.resize`, pixel scale/aspect, safe margins, keyboard/gamepad/touch differences. Separate HUD/state/menu layers.
|
|
10
|
+
|
|
11
|
+
## Typography/custom fonts
|
|
12
|
+
|
|
13
|
+
Use `love.graphics.newFont`/font assets with explicit sizes and fallback/licensing. Bitmap/pixel fonts must remain legible when scaled; validate glyph coverage for localization.
|
|
14
|
+
|
|
15
|
+
## Motion/reduced motion
|
|
16
|
+
|
|
17
|
+
All motion is game-loop owned. Provide reduced-motion/flash-intensity options, decouple critical state from tween completion, clamp delta time where needed, and avoid visual noise behind critical HUD.
|
|
18
|
+
|
|
19
|
+
## Accessibility specifics
|
|
20
|
+
|
|
21
|
+
There is no built-in screen-reader/focus system. Keyboard/gamepad remapping, colorblind-safe encoding, scalable text/contrast/subtitle presentation, input remapping, and reduced-flash/motion options are manual responsibilities. Do not claim platform accessibility integration that does not exist.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Use explicit state machines for loading/menu/pause/error/empty inventory/death/network/permission/cutscene/resume. Preserve focus/selection across push-pop state transitions. Loading must not freeze frame presentation without feedback.
|
|
26
|
+
|
|
27
|
+
## Forms idiom
|
|
28
|
+
|
|
29
|
+
`love.textinput`/`love.keyboard` are low-level. Validate focus, IME/composition limitations, paste behavior, caret/selection, virtual keyboard/platform constraints before using consequential text input. Prefer constrained selection UI where appropriate.
|
|
30
|
+
|
|
31
|
+
## Do/don't pairs
|
|
32
|
+
|
|
33
|
+
| Do | Don't |
|
|
34
|
+
|---|---|
|
|
35
|
+
| central `theme.lua` semantic palette | literal RGB tables in every draw call |
|
|
36
|
+
| explicit gamepad/keyboard focus model | mouse-only clickable hitboxes |
|
|
37
|
+
| `love.resize` adaptive layout | fixed 1920×1080 coordinate assumptions |
|
|
38
|
+
| reduced flash/motion options | uncontrolled particle noise behind HUD |
|
|
39
|
+
|
|
40
|
+
## Known traps
|
|
41
|
+
|
|
42
|
+
No built-in accessibility/UI semantics, glyph atlas gaps, coordinate scaling mistakes, input method complexity, delta-time-dependent motion bugs, focus loss between states, asset loading freezes.
|
|
43
|
+
|
|
44
|
+
## Verification commands
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
luacheck . 2>/dev/null || true
|
|
48
|
+
love .
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Run resolution/aspect/input matrix, controller-only flow, resize/window mode, localization glyph checks, pause/interruption/resume, reduced motion/flash settings, screenshots on target devices.
|