@thanhnguyxn/pixelcraft 0.0.0-stage → 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 +20 -0
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +22 -0
- 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/LICENSE +21 -0
- package/README.md +264 -2
- package/SECURITY.md +28 -0
- package/assets/README.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/assets/pixelcraft-logo-512.png +0 -0
- package/bin/pixelcraft.mjs +852 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/DESIGN-RATIONALE.md +191 -0
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +37 -0
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/README.md +36 -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/direction-prototype-complexity.json +29 -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/finish-gate-anti-slop.json +30 -0
- package/evals/fixtures/forms-accessibility-negative.json +29 -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/handoff-fidelity-tolerance.json +29 -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-brownfield-evidence.json +28 -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/visual-qa-task-evidence.json +29 -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/fixtures/workflow-checkpoints.json +30 -0
- package/evals/pixelcraft-accessibility.md +74 -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 +76 -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 +77 -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 +73 -0
- package/evals/pixelcraft-plan.md +127 -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 +86 -0
- package/evals/pixelcraft-web.md +89 -0
- package/evals/pixelcraft.md +70 -0
- package/gemini-extension.json +6 -0
- package/install.ps1 +341 -0
- package/install.sh +512 -0
- package/package.json +91 -4
- package/plugin.json +29 -0
- package/scripts/build-adapters.mjs +288 -0
- package/scripts/build-release-archives.mjs +61 -0
- package/scripts/build-skill-zips.mjs +94 -0
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +61 -0
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +203 -0
- package/scripts/test-export-tokens.mjs +361 -0
- package/scripts/test-finish-gate.mjs +271 -0
- package/scripts/test-installers.mjs +216 -0
- package/scripts/test-release-archives.mjs +42 -0
- package/scripts/test-shoot.mjs +87 -0
- package/scripts/test-slop-scan.mjs +416 -0
- package/scripts/test-style-inventory.mjs +234 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +195 -0
- package/scripts/validate-skills.mjs +658 -0
- package/skills/pixelcraft/SKILL.md +155 -0
- package/skills/pixelcraft/references/design-brief.md +75 -0
- package/skills/pixelcraft/references/floor.md +90 -0
- package/skills/pixelcraft/references/report-template.md +49 -0
- package/skills/pixelcraft/references/stack-detection.md +226 -0
- package/skills/pixelcraft/references/surface-acceptance.md +52 -0
- package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
- package/skills/pixelcraft-accessibility/SKILL.md +54 -0
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
- package/skills/pixelcraft-accessibility/references/verification.md +64 -0
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
- package/skills/pixelcraft-brandkit/SKILL.md +127 -0
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
- package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -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 +97 -0
- package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
- package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
- package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
- package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
- 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 +84 -0
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
- package/skills/pixelcraft-constrained/SKILL.md +52 -0
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
- package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
- package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
- package/skills/pixelcraft-craft/SKILL.md +58 -0
- package/skills/pixelcraft-craft/references/color.md +125 -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 +73 -0
- package/skills/pixelcraft-craft/references/motion.md +163 -0
- package/skills/pixelcraft-craft/references/typography.md +110 -0
- package/skills/pixelcraft-data-apps/SKILL.md +86 -0
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +109 -0
- package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
- package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
- package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
- package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
- package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
- package/skills/pixelcraft-data-apps/references/panel.md +99 -0
- package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
- package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
- package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
- package/skills/pixelcraft-dataviz/SKILL.md +60 -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 +107 -0
- package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
- package/skills/pixelcraft-desktop/SKILL.md +93 -0
- package/skills/pixelcraft-desktop/references/appkit.md +92 -0
- package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
- package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
- package/skills/pixelcraft-desktop/references/electron.md +96 -0
- package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/gtk.md +97 -0
- package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
- package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
- package/skills/pixelcraft-desktop/references/tauri.md +110 -0
- package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
- package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
- package/skills/pixelcraft-desktop/references/working-context.md +84 -0
- package/skills/pixelcraft-direction/SKILL.md +120 -0
- package/skills/pixelcraft-direction/references/composition-library.md +84 -0
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +64 -0
- package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +71 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
- package/skills/pixelcraft-direction/references/wildcards.md +47 -0
- package/skills/pixelcraft-document/SKILL.md +58 -0
- package/skills/pixelcraft-document/references/archetypes.md +106 -0
- package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +187 -0
- package/skills/pixelcraft-document/references/slides.md +198 -0
- package/skills/pixelcraft-email/SKILL.md +80 -0
- package/skills/pixelcraft-email/references/client-quirks.md +113 -0
- package/skills/pixelcraft-email/references/html-tables.md +114 -0
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +54 -0
- package/skills/pixelcraft-email/references/react-email.md +95 -0
- package/skills/pixelcraft-extensions/SKILL.md +56 -0
- package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
- package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +98 -0
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
- package/skills/pixelcraft-game-ui/SKILL.md +80 -0
- package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
- package/skills/pixelcraft-game-ui/references/godot.md +130 -0
- package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
- package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
- package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +50 -0
- package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
- package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +49 -0
- package/skills/pixelcraft-media/references/banners-video.md +130 -0
- package/skills/pixelcraft-media/references/og-generation.md +154 -0
- package/skills/pixelcraft-media/references/social-cards.md +71 -0
- package/skills/pixelcraft-mobile/SKILL.md +86 -0
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
- package/skills/pixelcraft-mobile/references/flet.md +80 -0
- package/skills/pixelcraft-mobile/references/flutter.md +113 -0
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
- package/skills/pixelcraft-mobile/references/kivy.md +82 -0
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
- 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 +106 -0
- package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
- package/skills/pixelcraft-mobile/references/uikit.md +92 -0
- package/skills/pixelcraft-patterns/SKILL.md +75 -0
- 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 +44 -0
- 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 +47 -0
- package/skills/pixelcraft-patterns/references/communication.md +45 -0
- package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +44 -0
- 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 +80 -0
- 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/search-filtering.md +42 -0
- package/skills/pixelcraft-patterns/references/settings.md +51 -0
- package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
- package/skills/pixelcraft-plan/SKILL.md +103 -0
- package/skills/pixelcraft-plan/references/design-input.md +69 -0
- 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 +134 -0
- package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
- package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
- package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
- package/skills/pixelcraft-review/SKILL.md +86 -0
- package/skills/pixelcraft-review/references/audit-report.md +69 -0
- package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
- package/skills/pixelcraft-review/references/heuristics.md +63 -0
- package/skills/pixelcraft-review/references/personas.md +53 -0
- package/skills/pixelcraft-review/references/polish.md +78 -0
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -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-longhand-removal.css +34 -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 +1233 -0
- package/skills/pixelcraft-spatial/SKILL.md +51 -0
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
- package/skills/pixelcraft-spatial/references/platforms.md +147 -0
- package/skills/pixelcraft-tokens/SKILL.md +60 -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 +84 -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 +122 -0
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
- package/skills/pixelcraft-tui/SKILL.md +76 -0
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +109 -0
- package/skills/pixelcraft-tui/references/ratatui.md +102 -0
- package/skills/pixelcraft-tui/references/rich.md +82 -0
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +108 -0
- package/skills/pixelcraft-ux/SKILL.md +56 -0
- package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
- package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
- package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
- package/skills/pixelcraft-ux/references/forms.md +151 -0
- package/skills/pixelcraft-ux/references/i18n.md +221 -0
- package/skills/pixelcraft-ux/references/laws.md +39 -0
- package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
- package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
- package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
- package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
- package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -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/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -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 +174 -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 +668 -0
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
- package/skills/pixelcraft-web/SKILL.md +132 -0
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
- package/skills/pixelcraft-web/references/angular.md +108 -0
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +113 -0
- 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 +88 -0
- 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/elm.md +53 -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 +54 -0
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +220 -0
- package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
- 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 +61 -0
- package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
- package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
- package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
- 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 +230 -0
- package/skills/pixelcraft-web/references/qwik.md +94 -0
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +168 -0
- 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/scala-laminar.md +53 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +114 -0
- 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 +111 -0
- 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 +111 -0
- package/skills/pixelcraft-web/references/tailwind.md +99 -0
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Email client quirks
|
|
2
|
+
|
|
3
|
+
Treat this as verification guidance, not immutable truth. Client engines evolve—recheck current support on Can I email (`caniemail.com`) and real client previews before release.
|
|
4
|
+
|
|
5
|
+
## Outlook: New Outlook vs Classic Outlook
|
|
6
|
+
|
|
7
|
+
Never treat "Outlook on Windows" as a single engine. During the 2026–2029 enterprise sunset transition, corporate inboxes split across two incompatible renderers:
|
|
8
|
+
|
|
9
|
+
| Client | Rendering engine | `<!--[if mso]>` & VML | Practical rule |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| **New Outlook for Windows** | WebView2 / Chromium (shares core with Outlook on the web) | **ignored** (comments stripped/skipped, VML does not render) | modern CSS mostly works, distinct dark-mode rewrites (`[data-ogsc]`/`[data-ogsb]`); never rely on VML-only buttons or backgrounds |
|
|
12
|
+
| **Classic Outlook for Windows** | Microsoft Word HTML engine (enterprise sunset 2026–2029) | **executed** | weak flex/grid/margin/`border-radius`/CSS-background support; requires table cells, explicit widths, inline CSS, and narrowly scoped MSO/VML fallbacks |
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
|
|
16
|
+
- **Dual-safe CTAs**: render a real styled HTML `<a>` inside a table cell for New Outlook and modern clients, wrapped in `<!--[if !mso]><!--> ... <!--<![endif]-->` only if a separate `<!--[if mso]>` VML `<v:roundrect>` fallback is needed—never hide the HTML fallback from New Outlook;
|
|
17
|
+
- test **both** New Outlook and Classic Outlook; a VML-only CTA or VML-only hero background renders as invisible or blank in New Outlook.
|
|
18
|
+
|
|
19
|
+
## Gmail / Google clients
|
|
20
|
+
|
|
21
|
+
- **102 KB clipping ceiling (`< 85–90 KB` pre-ESP target / `< 80 KB` ideal)**: Gmail clips the `text/html` MIME part strictly at **102 KB** (`104,448` UTF-8 bytes including whitespace, MSO comments, and ESP click-tracking URL rewrites), replacing the bottom of the email with `[Message clipped] View entire message` and hiding legal/unsubscribe footers plus open pixels. Keep **pre-ESP compiled HTML `< 85–90 KB`** so ESP link-wrapping never pushes final delivery over `102 KB`.
|
|
22
|
+
- **`<style>` size limit (`<= 8–16 KB`)**: Gmail webmail drops `<style>` blocks exceeding `~16 KB` and Gmail mobile apps drop around `~8 KB`; keep `<style>` **`<= 8–16 KB`** and inline critical layout/color properties.
|
|
23
|
+
- **Full `<style>` stripping on modern CSS (`@layer`, `@property`, CSS nesting)**: any unsupported at-rule or syntax inside `<style>`—specifically **`@layer`, `@property`, native CSS nesting (`& .child`), or unclosed declarations**—causes Gmail to discard the **entire** `<style>` block!
|
|
24
|
+
- **`GANGA` (Gmail Non-Google Account IMAP/POP) survival**: IMAP/POP accounts opened in Gmail iOS/Android strip `<style>` blocks completely; verify by deleting `<style>` in QA that **layout structure AND `>= 4.5:1` contrast remain intact on inline CSS alone**.
|
|
25
|
+
- **Image proxying & threading**: Gmail proxies remote images (requiring public HTTPS URLs) and groups threads; lead every message with clear subject, preheader, and opening live text.
|
|
26
|
+
|
|
27
|
+
## 3-Regime Dark Mode Matrix
|
|
28
|
+
|
|
29
|
+
Email clients handle dark mode across **three incompatible regimes**. Never assume `@media (prefers-color-scheme: dark)` works everywhere:
|
|
30
|
+
|
|
31
|
+
| Regime | Representative clients | Color behavior | `@media (prefers-color-scheme: dark)` | Survival strategy |
|
|
32
|
+
|---|---|---|---|---|
|
|
33
|
+
| **1. No change** | Gmail Web (default), Yahoo Mail Web, legacy desktop webmail | Renders authored light/dark hex colors verbatim | Ignored | Authored baseline palette must have `>= 4.5:1` contrast with zero reliance on dark-mode CSS |
|
|
34
|
+
| **2. Partial color inversion / CSS opt-in** | Apple Mail (macOS/iOS), `Outlook.com` / New Outlook, `Gmail iOS` (partial surface rewrite) | Inverts light surfaces & dark text selectively; Apple Mail honors CSS dark media queries; Outlook exposes `[data-ogsc]` / `[data-ogsb]` | Honored in Apple Mail; Outlook uses `[data-ogsc]` / `[data-ogsb]` | Declare `<meta name="color-scheme" content="light dark">`, `@media (prefers-color-scheme: dark)` overrides with `!important`, `[data-ogsc]`/`[data-ogsb]` hooks, and `.light-img` / `.dark-img` swaps |
|
|
35
|
+
| **3. Full forced inversion** | `Gmail Android`, `Classic Outlook for Windows` (Dark Mode) | Algorithmically inverts **all** light backgrounds to `#121212`–`#1e1e1e` and dark text to light gray, **ignoring CSS media queries** | **Ignored** | Avoid pure `#000000` / `#ffffff` glare (use `#111827` on `#f8fafc` / `#ffffff`), and protect dark transparent PNG logos/icons with a **`1–2px` light keyline/halo or translucent light pill** so they never vanish on forced `#121212` backgrounds |
|
|
36
|
+
|
|
37
|
+
Dark-mode head boilerplate + dual-logo swap (with MSO hide guard so Classic Outlook never renders duplicate logos, plus light-pill fallback on the default logo for Regime 3):
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<meta name="color-scheme" content="light dark">
|
|
41
|
+
<meta name="supported-color-schemes" content="light dark">
|
|
42
|
+
<style>
|
|
43
|
+
:root { color-scheme: light dark; supported-color-schemes: light dark; }
|
|
44
|
+
a[x-apple-data-detectors] {
|
|
45
|
+
color: inherit !important; text-decoration: none !important;
|
|
46
|
+
font-size: inherit !important; font-family: inherit !important;
|
|
47
|
+
font-weight: inherit !important; line-height: inherit !important;
|
|
48
|
+
}
|
|
49
|
+
@media (prefers-color-scheme: dark) {
|
|
50
|
+
.bg-page { background-color: #121417 !important; }
|
|
51
|
+
.bg-card { background-color: #1a1f26 !important; }
|
|
52
|
+
.text-body { color: #f1f5f9 !important; }
|
|
53
|
+
.light-img { display: none !important; }
|
|
54
|
+
.dark-img { display: block !important; width: auto !important; max-height: none !important; overflow: visible !important; }
|
|
55
|
+
}
|
|
56
|
+
[data-ogsc] .text-body { color: #f1f5f9 !important; }
|
|
57
|
+
[data-ogsb] .bg-card { background-color: #1a1f26 !important; }
|
|
58
|
+
[data-ogsc] .light-img { display: none !important; }
|
|
59
|
+
[data-ogsc] .dark-img { display: block !important; width: auto !important; max-height: none !important; overflow: visible !important; }
|
|
60
|
+
</style>
|
|
61
|
+
|
|
62
|
+
<!-- Default logo carries a subtle light keyline/pill so Regime 3 (Gmail Android / Classic Outlook) stays legible -->
|
|
63
|
+
<img class="light-img" src="https://example.com/logo-dark-with-keyline.png" width="132" height="32" alt="Acme" style="display:block;border:0;">
|
|
64
|
+
<!--[if !mso]><!-->
|
|
65
|
+
<div class="dark-img" style="display:none;overflow:hidden;width:0;max-height:0;mso-hide:all;">
|
|
66
|
+
<img src="https://example.com/logo-light.png" width="132" height="32" alt="Acme" style="display:block;border:0;">
|
|
67
|
+
</div>
|
|
68
|
+
<!--<![endif]-->
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- **Apple Intelligence inbox summaries**: iOS/macOS Mail generates AI summaries from opening live text, competing with manual preheaders. State sender, action, date, and amount plainly in the first real `<p>` instead of burying them in an image hero.
|
|
72
|
+
|
|
73
|
+
## 2025–2026 Bulk Sender Mandate (Gmail, Yahoo, Outlook.com)
|
|
74
|
+
|
|
75
|
+
Mailbox providers enforce strict protocol gates at the SMTP/inbox edge (especially at `>= 5,000` messages/day to Gmail/Yahoo/Outlook.com, and best practice for every production domain):
|
|
76
|
+
|
|
77
|
+
| Requirement | Concrete specification | Promotional / Bulk | Transactional (Receipts, OTPs, Alerts) |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| **Authentication & alignment** | `SPF` + `DKIM` (`>= 2048-bit` RSA or Ed25519) + `DMARC` (`p=quarantine` or `p=reject` recommended; strict/relaxed alignment with visible `RFC5322.From`), valid forward/reverse DNS (`PTR`) | Mandatory | Mandatory (isolate on a dedicated subdomain e.g. `tx.example.com` so marketing reputation never delays OTPs) |
|
|
80
|
+
| **One-click unsubscribe (`RFC 8058`)** | Both `List-Unsubscribe: <https://example.com/unsub?t=...>, <mailto:unsub@...>` AND `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, plus a visible 1-click footer link; process within **`<= 48h` with zero login wall or survey gate** | **Mandatory** | **Omit** `List-Unsubscribe` on security/OTP/receipt mail—and **never** inject promotional cross-sells that reclassify transactional mail as marketing |
|
|
81
|
+
| **Spam complaint rate** | Monitor Google Postmaster Tools, Yahoo Sender Hub, and Microsoft SNDS | **`< 0.10%` target** (`>= 0.30%` triggers bulk rejection/spam routing) | `< 0.05%` expected |
|
|
82
|
+
| **Apple MPP analytics** | Apple Mail Privacy Protection pre-fetches tracking pixels via relay proxies regardless of whether the human opened the email | Measure **verified link clicks, conversions, and replies**; never trigger drip branches or purge lists solely from open pixels | Never use open pixels as delivery/read proof for legal or billing notices |
|
|
83
|
+
| **BIMI (optional brand trust)** | Enforced `DMARC` (`p=quarantine` or `p=reject`), square **SVG Tiny-PS** logo over HTTPS, and **VMC** / **CMC** certificate | Recommended | Recommended |
|
|
84
|
+
|
|
85
|
+
## Preheaders, merge-tag fallbacks & interactive extensions
|
|
86
|
+
|
|
87
|
+
- **Preheader zero-width padding (`50–90` repeats / `~140+` chars)**: keep preview text concise (`40–90` chars) and follow it with **50–90 repeats** of `͏‌ ` (`~150–270` invisible characters). Repeating only 3–5 times pads ~12 characters and leaks `"View in browser"` or header `alt` text into 120–140 character inbox snippets:
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<div style="display:none;max-height:0;overflow:hidden;mso-hide:all;" aria-hidden="true">
|
|
91
|
+
Invoice #2026-041 due 15 Dec — €1,420.50͏‌ ͏‌ ͏‌ <!-- repeat ͏‌ 50–90 times (~140+ chars) in compiled output -->
|
|
92
|
+
</div>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- **Personalization merge-tag fallbacks**: guard every recipient variable (`{{ first_name | default: "there" }}`, Handlebars `{{#if firstName}}Hi {{firstName}},{{else}}Hello,{{/if}}`, or typed React Email props defaults) and test against a null/empty profile fixture so literal `{{name}}` or `"Hi ,"` never ships.
|
|
96
|
+
- **AMP for Email (`text/x-amp-html`)**: optional third MIME part (`text/plain`, `text/html`, `text/x-amp-html`) for interactive state in Gmail/Yahoo/Mail.ru. Requires SPF/DKIM/DMARC + sender approval, expires after ~30 days, and is ignored by Apple Mail and Outlook—always preserve full functional parity in `text/html` and `text/plain`.
|
|
97
|
+
|
|
98
|
+
## Email accessibility & link-copy rules
|
|
99
|
+
|
|
100
|
+
- Set `lang="en"` (or exact BCP-47 locale) and `dir="ltr"` / `"rtl"` on `<html>` AND repeat `dir` on the main container table (some webmail clients strip `<html>` attributes).
|
|
101
|
+
- Include a descriptive `<title>` (announced by screen readers in webmail and browser views).
|
|
102
|
+
- Add `role="presentation"` (or `role="none"`) to **every** layout `<table>` so assistive technologies do not announce table row/column grids; leave real tabular data tables with semantic `<th>` headers and no `role="presentation"`.
|
|
103
|
+
- Mark decorative spacer cells, zero-width preheader blocks, and visual dividers with `aria-hidden="true"`, and set `alt=""` on purely decorative images.
|
|
104
|
+
- Use real semantic headings (`<h1>`–`<h3>`), `<p>` elements with inline typography, and **descriptive anchor text (`"Download Invoice #2026-041"`, never `"click here"` or bare tracking URLs)**.
|
|
105
|
+
|
|
106
|
+
## Image blocking and plaintext parity
|
|
107
|
+
|
|
108
|
+
- Assume images may never load: essential copy, CTA, dates, amounts, and links must be live HTML text; alt text must convey meaning rather than filenames.
|
|
109
|
+
- Plaintext (`text/plain`) is a first-class surface: preserve reading order, absolute URLs, dates/time zones, merge-tag fallbacks, legal/preference/unsubscribe links, and clear section breaks generated from the same data model as HTML.
|
|
110
|
+
|
|
111
|
+
## Verification matrix
|
|
112
|
+
|
|
113
|
+
Record: client/app/version (**New Outlook** vs **Classic Outlook**, Gmail Web/iOS/Android + **`GANGA` `<style>`-stripped IMAP/POP**, Apple Mail), OS/device, all 3 dark-mode regimes, images on/off, null-merge-tag fallback test, viewport width, zoom/text size, pre-ESP HTML byte size vs **`< 85–90 KB` target** / `102 KB` cap, `<style>` `<= 8–16 KB` (`0` `@layer`/`@property`/nesting), plaintext parity, `RFC 8058` / `SPF` / `DKIM` / `DMARC` headers, and accessibility inspection (`rendered` vs `static` vs `not-checked`).
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Hand-authored HTML tables
|
|
2
|
+
|
|
3
|
+
## Accessible table skeleton
|
|
4
|
+
|
|
5
|
+
Always include `lang`, `dir`, `<title>`, dark-mode meta opt-in, a hidden preheader with zero-width padding, `role="presentation"` on every layout table, and semantic headings/paragraphs:
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!DOCTYPE html>
|
|
9
|
+
<html lang="en" dir="ltr" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
|
10
|
+
<head>
|
|
11
|
+
<meta charset="utf-8">
|
|
12
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
13
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
14
|
+
<meta name="color-scheme" content="light dark">
|
|
15
|
+
<meta name="supported-color-schemes" content="light dark">
|
|
16
|
+
<title>Invoice #2026-041 due 15 Dec</title>
|
|
17
|
+
</head>
|
|
18
|
+
<body style="margin:0;padding:0;background-color:#f4f5f7;">
|
|
19
|
+
<!-- Repeat ͏‌ 50–90 times (~140–200+ rendered chars); 3–5 repeats only pad ~9–15 chars and leak "View in browser" or logo alt text into 120-char inbox snippets -->
|
|
20
|
+
<div style="display:none;max-height:0;overflow:hidden;mso-hide:all;" aria-hidden="true">
|
|
21
|
+
Invoice #2026-041 due 15 Dec — €1,420.50͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌
|
|
22
|
+
</div>
|
|
23
|
+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" dir="ltr" style="background-color:#f4f5f7;">
|
|
24
|
+
<tr>
|
|
25
|
+
<td align="center" style="padding:24px 12px;">
|
|
26
|
+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="max-width:600px;background-color:#ffffff;border-radius:6px;">
|
|
27
|
+
<tr>
|
|
28
|
+
<td style="padding:28px 24px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;color:#111827;">
|
|
29
|
+
<h1 style="margin:0 0 12px;font-size:22px;line-height:1.3;">Invoice #2026-041</h1>
|
|
30
|
+
<p style="margin:0 0 20px;font-size:15px;line-height:1.5;">Amount due: €1,420.50 by 15 Dec 2026.</p>
|
|
31
|
+
<!-- Bulletproof Dual-Engine CTA: VML roundrect for Classic Outlook Word + table/td bgcolor + padded <a> for New Outlook, Gmail, and Apple Mail -->
|
|
32
|
+
<!--[if mso]>
|
|
33
|
+
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"
|
|
34
|
+
href="https://example.com/pay/2026-041"
|
|
35
|
+
style="height:44px;v-text-anchor:middle;width:220px;" arcsize="14%" stroke="f" fillcolor="#0f5132">
|
|
36
|
+
<w:anchorlock/>
|
|
37
|
+
<center style="color:#ffffff;font-family:'Segoe UI',Arial,sans-serif;font-size:15px;font-weight:600;">
|
|
38
|
+
Review and pay invoice
|
|
39
|
+
</center>
|
|
40
|
+
</v:roundrect>
|
|
41
|
+
<![endif]-->
|
|
42
|
+
<!--[if !mso]><!-->
|
|
43
|
+
<table role="presentation" cellspacing="0" cellpadding="0" border="0">
|
|
44
|
+
<tr>
|
|
45
|
+
<td align="center" bgcolor="#0f5132" style="border-radius:6px;background-color:#0f5132;">
|
|
46
|
+
<a href="https://example.com/pay/2026-041"
|
|
47
|
+
style="display:inline-block;padding:12px 24px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;font-size:15px;font-weight:600;line-height:20px;color:#ffffff;text-decoration:none;border-radius:6px;border:1px solid #0f5132;">
|
|
48
|
+
Review and pay invoice
|
|
49
|
+
</a>
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
</table>
|
|
53
|
+
<!--<![endif]-->
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</table>
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</table>
|
|
60
|
+
</body>
|
|
61
|
+
</html>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Token mapping
|
|
65
|
+
|
|
66
|
+
Email clients inconsistently support CSS variables. Treat generated token output as source-of-truth values, then inline final 6-digit hex colors and `px` measurements into attributes and `style` props. Keep a build-time constants map so semantic names remain meaningful before compilation.
|
|
67
|
+
|
|
68
|
+
## Layout and responsive idioms
|
|
69
|
+
|
|
70
|
+
Use table structure as the baseline: outer background table, `max-width: 600px` centered container, single-column-first modules, `role="presentation"` on every layout `<table>`, explicit `cellspacing="0" cellpadding="0" border="0"`, inline CSS, and narrowly scoped MSO conditional comments only when Classic Outlook requires them. Never hide the primary HTML button inside `<!--[if mso]>`—New Outlook ignores MSO comments and VML. Design mobile stacking through fluid-hybrid `max-width` + `display: inline-block` ghost tables rather than CSS Grid or Flexbox.
|
|
71
|
+
|
|
72
|
+
## Typography and custom fonts
|
|
73
|
+
|
|
74
|
+
Use robust websafe fallback stacks. Custom fonts are progressive enhancement only; never let meaning or layout depend on them. Set explicit `font-size`, `line-height`, and `color` directly on text containers (`<p>`, `<h1>`–`<h3>`, `<td>`) because Classic Outlook resets font inheritance across nested tables.
|
|
75
|
+
|
|
76
|
+
## Motion and reduced motion
|
|
77
|
+
|
|
78
|
+
Assume animation is unsupported or stripped. Never require animation to communicate state or meaning. Static fallback is the baseline.
|
|
79
|
+
|
|
80
|
+
## Accessibility & personalization specifics
|
|
81
|
+
|
|
82
|
+
- Always set `lang` and `dir` on `<html>` and repeat `dir` on the root content table.
|
|
83
|
+
- Always include `<title>` and `role="presentation"` on every layout table (never on real data tables).
|
|
84
|
+
- Mark decorative spacers with `aria-hidden="true"` and decorative images with `alt=""`.
|
|
85
|
+
- Use real `<h1>`–`<h3>` headings, `<p>` copy, **descriptive link text (never `"click here"`)**, **merge-tag fallbacks** (never outputting raw `{{name}}` when fields are empty), `4.5:1+` inline contrast, padded CTA hit areas, and matching `text/plain` MIME parity.
|
|
86
|
+
|
|
87
|
+
## States and forms
|
|
88
|
+
|
|
89
|
+
Critical email states are: images off, dark-mode inversion, **Gmail `GANGA` (IMAP/POP `<style>` stripped completely)**, Gmail `102 KB` clipping (`< 85–90 KB` pre-ESP target), null/empty personalization merge tags, remote-content warning, plaintext-only, forwarded/quoted, print, narrow mobile viewport, and high-contrast mode. Do not depend on embedded HTML forms—link to a secure, context-preserving web destination instead.
|
|
90
|
+
|
|
91
|
+
## Do/don't pairs
|
|
92
|
+
|
|
93
|
+
| Do | Don't |
|
|
94
|
+
|---|---|
|
|
95
|
+
| Set `lang`, `dir`, `<title>`, descriptive link copy, and `role="presentation"` on every layout `<table>` | Omit `role="presentation"` or write vague `"click here"` anchors |
|
|
96
|
+
| Inline 6-digit hex and `px` values so layout & contrast survive **`GANGA` (`<style>` stripped)**, keeping `<style>` **`<= 8–16 KB`** with **zero `@layer`, `@property`, or CSS nesting** | Emit `@layer` / `@property` / CSS nesting inside `<style>` (causing Gmail to strip the entire `<style>` block!) or rely on CSS variables, `oklch()`, Flexbox, or Grid |
|
|
97
|
+
| Use a Bulletproof Dual-Engine CTA (`<!--[if mso]><v:roundrect>` + `<!--[if !mso]><!--><table role="presentation"><tr><td bgcolor>` wrapping styled `<a>`) and explicit **merge-tag fallbacks** | Ship a bare `<a style="padding:...">`, a VML-only button, or unguarded `{{name}}` tags that leak raw syntax |
|
|
98
|
+
| Pad hidden preheaders with 50–90 repeats (`~140+` chars) of `͏‌ ` | Use 3–5 repeats that let `"View in browser"` or header alt text leak into 120-char inbox previews |
|
|
99
|
+
| Add a `1–2px` light keyline/halo or translucent pill to dark logos alongside `.light-img`/`.dark-img` swaps | Export pure black transparent PNG logos that vanish on forced `#121212` dark backgrounds (`Gmail Android` / `Outlook Windows`) |
|
|
100
|
+
| Keep pre-ESP compiled HTML **`< 85–90 KB`** (`< 102 KB` post-ESP hard Gmail clip cap) and wire `RFC 8058` one-click unsubscribe on promotional mail | Ship bloated nested tables that clip legal/unsubscribe footers after ESP link wrapping or gate unsubscribe behind a login wall |
|
|
101
|
+
|
|
102
|
+
## Known traps
|
|
103
|
+
|
|
104
|
+
New Outlook vs Classic Outlook divergence, Gmail `102 KB` clipping (`< 85–90 KB` pre-ESP headroom before ESP tracking URLs), Gmail stripping the entire `<style>` block on `@layer`/`@property`/nesting or `> 8–16 KB`, `GANGA` dropping `<style>` completely, raw `{{merge_tag}}` leaks, `"click here"` links, forced dark-mode logo disappearance, Apple MPP proxy open inflation, and plaintext divergence.
|
|
105
|
+
|
|
106
|
+
## Verification commands
|
|
107
|
+
|
|
108
|
+
Run the repository's email build/template validation pipeline without suppressing failures:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
npm run build
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Inspect pre-ESP HTML byte size (`< 85–90 KB` target / `< 102 KB` cap) and `<style>` size (`<= 8–16 KB`, zero `@layer`/`@property`/nesting, `static`), validate `lang`/`dir`/`role="presentation"`, merge-tag fallbacks, descriptive links, and plaintext parity (`static`), and test real client previews across New Outlook, Classic Outlook, Gmail (Web/iOS/Android + `<style>`-stripped `GANGA`), and Apple Mail across all 3 dark-mode regimes with images off (`rendered`).
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Maizzle (Tailwind CSS email build pipeline)
|
|
2
|
+
|
|
3
|
+
Use **Maizzle** when authoring HTML emails with Tailwind CSS utility workflows while still shipping table-safe, inlined, purged production HTML. Pair with `references/client-quirks.md` for New Outlook vs Classic Outlook, Gmail 102 KB clipping, dark mode, and plaintext parity.
|
|
4
|
+
|
|
5
|
+
## Production build configuration
|
|
6
|
+
|
|
7
|
+
- Enable CSS inlining (`css.inline: true`), unused CSS purging (`css.purge: true`), safe class names (`css.safe: true`), six-digit hex normalization (`css.sixHex: true`), and companion plaintext generation (`plaintext: true`) in `maizzle.config.ts`.
|
|
8
|
+
- Keep table-based outer layout containers (`role="presentation"`) with explicit `lang` and `dir` for Outlook Word-engine parity; do not rely on Tailwind `grid` or `flex` for multi-column email layouts.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
// maizzle.config.ts
|
|
12
|
+
import { defineConfig } from '@maizzle/framework';
|
|
13
|
+
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
plaintext: true, // emits companion .txt alongside compiled .html
|
|
16
|
+
css: {
|
|
17
|
+
inline: true,
|
|
18
|
+
purge: true,
|
|
19
|
+
safe: true,
|
|
20
|
+
shorthand: true,
|
|
21
|
+
sixHex: true,
|
|
22
|
+
preferUnitless: true,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Tailwind v3 vs v4 inlining caveats
|
|
28
|
+
|
|
29
|
+
- **Tailwind v3** (standard Maizzle baseline): generates hex/RGB utilities and predictable class rules that Maizzle's PostCSS + Juice inliner resolves cleanly into inline `style` attributes.
|
|
30
|
+
- **Tailwind v4 hazards**: Tailwind v4 emits CSS custom properties (`var(--color-*)`), `oklch()` / `color-mix()` color functions, `rem` defaults, native CSS nesting, and `@layer` wrappers. Gmail discards the **entire** `<style>` block on `@layer` or syntax errors, and Classic Outlook ignores `var()`, `oklch()`, and `rem`.
|
|
31
|
+
- If upgrading a Maizzle pipeline toward Tailwind v4, verify in compiled `.html` output (`static`) that **all** CSS variables are resolved to static values, `oklch()` is converted to 6-digit hex (`sixHex: true`), spacing/type use `px`, and zero `@layer` blocks remain in `<style>`.
|
|
32
|
+
|
|
33
|
+
## Email-specific Maizzle rules
|
|
34
|
+
|
|
35
|
+
- **New Outlook vs Classic Outlook**: wrap Classic Outlook-only VML fallbacks strictly in `<!--[if mso]>...<![endif]-->` and keep a real styled HTML `<a>` CTA outside `<!--[if mso]>` so New Outlook (which ignores MSO comments and VML) still renders a working button. Check that `css.purge` preserves dark-mode (`@media (prefers-color-scheme: dark)` / `[data-ogsc]`) classes.
|
|
36
|
+
- **Gmail 102 KB clipping**: keep compiled HTML well under 102 KB (`css.purge: true` + concise table markup) so Gmail does not clip legal footers and unsubscribe links.
|
|
37
|
+
- **Plaintext parity**: enable `plaintext: true` (or configure `plaintext: { destination: { path: 'build_production/text' } }`) and inspect the generated `.txt` file for clean link preservation and reading order.
|
|
38
|
+
|
|
39
|
+
## Do/don't pairs
|
|
40
|
+
|
|
41
|
+
| Do | Don't |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Enable `plaintext: true`, `css.inline`, `css.purge`, `css.safe`, and `css.sixHex` in production builds | Ship raw Tailwind classes, `var(--*)`, `oklch()`, `@layer`, or HTML-only emails without plaintext |
|
|
44
|
+
| Use `role="presentation"` tables with `lang`/`dir` for multi-column layouts inside Maizzle templates | Use CSS Grid or Flexbox for multi-column email structure |
|
|
45
|
+
| Check compiled HTML byte size against Gmail's 102 KB clipping threshold and verify zero `@layer` in `<style>` | Ignore bloated inline styles or Tailwind v4 syntax that causes Gmail to drop `<style>` |
|
|
46
|
+
| Test built output in real email clients (New Outlook, Classic Outlook, Gmail, Apple Mail; dark mode + images off) | Treat `maizzle serve` browser preview as proof of inbox rendering |
|
|
47
|
+
|
|
48
|
+
## Verification commands
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npx maizzle build production
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Inspect compiled HTML byte size, resolved inline hex/`px` values, absence of `@layer`/`oklch()`, and generated `.txt` plaintext parity (`static`), then test the sent email across real clients with dark mode and images disabled (`rendered`).
|
|
@@ -0,0 +1,54 @@
|
|
|
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 table markup (`role="presentation"` is emitted automatically on layout tables), but authors still own semantics: set `lang` and `dir` on `<mjml lang="en" dir="ltr">`, add `<mj-title>` and `<mj-preview>`, supply meaningful `alt` text (or `alt=""` for decorative images), use real `<h1>`–`<h3>` inside `<mj-text>`, maintain contrast under dark-mode inversion, and pair with a `text/plain` version.
|
|
22
|
+
|
|
23
|
+
## States idiom
|
|
24
|
+
|
|
25
|
+
Validate images off/blocked, dark mode, Gmail 102 KB clipping, plaintext, forwarding, narrow viewport, high contrast, print, and missing remote assets. Ensure CTA and core message survive if styling degrades.
|
|
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`/`mj-attributes` patterns with `<mjml lang="..." dir="...">` | hand-editing compiled HTML after every build |
|
|
36
|
+
| `mj-button` with real text, `href`, and solid fallback background color | image-only CTA |
|
|
37
|
+
| isolated, justified `mj-raw` escape hatch (keeping New Outlook & Classic Outlook working) | raw HTML everywhere defeating MJML's purpose |
|
|
38
|
+
| concise alt text such as `alt="Monthly usage chart"` | missing or useless alt like `alt="image"` |
|
|
39
|
+
| check compiled HTML byte size against Gmail's 102 KB clipping cap | assuming MJML output stays compact automatically |
|
|
40
|
+
|
|
41
|
+
## Known traps
|
|
42
|
+
|
|
43
|
+
Compiled output weight triggering Gmail 102 KB clipping, raw escape overuse breaking New Outlook vs Classic Outlook parity, custom font assumptions, section/column nesting errors, dark-mode mutation, image blocking, and plaintext not generated from the same content model.
|
|
44
|
+
|
|
45
|
+
## Verification commands
|
|
46
|
+
|
|
47
|
+
Compile with strict validation and run the repo build without suppressing failures:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx mjml input.mjml -o output.html --config.validationLevel strict
|
|
51
|
+
npm run build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Inspect compiled HTML byte size (`static`) and actual client previews across New Outlook, Classic Outlook, Gmail, and Apple Mail with image-off, dark mode, mobile width, plaintext, forwarding, and accessibility checks (`rendered`).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# React Email and component email ecosystems
|
|
2
|
+
|
|
3
|
+
## React Email (v3/v4+) core idioms
|
|
4
|
+
|
|
5
|
+
React Email compiles JSX primitives (`Html`, `Head`, `Body`, `Preview`, `Container`, `Section`, `Row`, `Column`, `Heading`, `Text`, `Button`, `Img`, `Font`, `CodeBlock`, `Markdown`, `Tailwind`) to table-safe HTML. Component abstraction does not turn email into browser React—CSS variables, Grid, and client-side hooks do not exist in inboxes.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Html, Head, Body, Preview, Container, Section,
|
|
10
|
+
Heading, Text, Button, Font, Tailwind, pixelBasedPreset, render,
|
|
11
|
+
} from '@react-email/components';
|
|
12
|
+
|
|
13
|
+
export function InvoiceEmail({ invoiceId, total }: { invoiceId: string; total: string }) {
|
|
14
|
+
return (
|
|
15
|
+
<Html lang="en" dir="ltr">
|
|
16
|
+
<Head>
|
|
17
|
+
<Font
|
|
18
|
+
fontFamily="Inter"
|
|
19
|
+
fallbackFontFamily="Arial"
|
|
20
|
+
webFont={{ url: 'https://example.com/fonts/inter-v18.woff2', format: 'woff2' }}
|
|
21
|
+
fontWeight={400}
|
|
22
|
+
fontStyle="normal"
|
|
23
|
+
/>
|
|
24
|
+
</Head>
|
|
25
|
+
<Preview>Invoice {invoiceId} due — {total}</Preview>
|
|
26
|
+
<Tailwind config={{ presets: [pixelBasedPreset] }}>
|
|
27
|
+
<Body className="bg-[#f4f5f7] font-sans m-0 p-6">
|
|
28
|
+
<Container className="bg-white max-w-[600px] p-6 rounded">
|
|
29
|
+
<Section>
|
|
30
|
+
<Heading as="h1" className="text-[22px] text-[#111827] m-0 mb-3">
|
|
31
|
+
Invoice {invoiceId}
|
|
32
|
+
</Heading>
|
|
33
|
+
<Text className="text-[15px] text-[#374151] m-0 mb-5">
|
|
34
|
+
Total due: {total}.
|
|
35
|
+
</Text>
|
|
36
|
+
<Button
|
|
37
|
+
href={`https://example.com/pay/${invoiceId}`}
|
|
38
|
+
className="bg-[#0f5132] text-white px-5 py-3 rounded font-semibold"
|
|
39
|
+
>
|
|
40
|
+
Review and pay invoice
|
|
41
|
+
</Button>
|
|
42
|
+
</Section>
|
|
43
|
+
</Container>
|
|
44
|
+
</Body>
|
|
45
|
+
</Tailwind>
|
|
46
|
+
</Html>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// React Email v3+: render() is async; generate HTML + plaintext from the exact same tree
|
|
51
|
+
const html = await render(<InvoiceEmail invoiceId="2026-041" total="€1,420.50" />);
|
|
52
|
+
const text = await render(<InvoiceEmail invoiceId="2026-041" total="€1,420.50" />, {
|
|
53
|
+
plainText: true,
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Key v3/v4+ patterns:
|
|
58
|
+
|
|
59
|
+
- **`<Tailwind>` + `pixelBasedPreset`**: Tailwind v4 defaults to `rem` units, CSS custom properties, and `oklch()` colors, which break Outlook and trigger Gmail `<style>` stripping. Pass `config={{ presets: [pixelBasedPreset] }}` so spacing/type emit `px` and colors emit email-safe hex/RGB.
|
|
60
|
+
- **Async `render()` + `{ plainText: true }`**: always `await render(element)` and derive the `text/plain` MIME part via `await render(element, { plainText: true })` from the same component tree so links, amounts, and legal text stay in sync.
|
|
61
|
+
- **`<Font fallbackFontFamily=...>`**: always specify a websafe `fallbackFontFamily` (`Arial`, `Helvetica`, `Georgia`, `Verdana`) because Classic Outlook and Gmail ignore `@font-face` and otherwise fall back to Times New Roman.
|
|
62
|
+
- **`<CodeBlock>` & `<Markdown>`**: use for developer notifications, release digests, or API key instructions while verifying line wrapping on 320px viewports and total HTML size against Gmail's 102 KB clipping limit.
|
|
63
|
+
|
|
64
|
+
## Related component frameworks and ESP platforms
|
|
65
|
+
|
|
66
|
+
- **Vue Email / Svelte Email**: in Vue/Nuxt or SvelteKit stacks, use `@vue-email/components` (Vue Email) or `svelte-email` / `better-svelte-email` with the same inline-style, table-baseline, and plaintext-parity rules rather than shipping raw SPA templates.
|
|
67
|
+
- **Sending & authoring platforms**: **Resend** accepts React Email components natively (`react: <InvoiceEmail />` alongside `text`); **Loops** targets SaaS lifecycle/transactional workflows with MJML/API templates; **Postmark** focuses on high-deliverability transactional streams with Mustachio templates; **Stripo** offers visual + code hybrid authoring with AMP and Outlook export. Regardless of ESP, inspect the **delivered** HTML after link-tracking rewrites.
|
|
68
|
+
- **Can I email (`caniemail.com`)**: check support matrices before using any non-trivial CSS property (`gap`, `border-radius`, `aspect-ratio`, `@media (prefers-color-scheme)`).
|
|
69
|
+
|
|
70
|
+
## Accessibility, states, and forms
|
|
71
|
+
|
|
72
|
+
- Set `lang` and `dir` on `<Html>`, use real `<Heading as="h1"|"h2">` and `<Text>`, meaningful `alt` on `<Img>`, explicit `<Preview>`, and verify rendered HTML contains `role="presentation"` on layout tables.
|
|
73
|
+
- Test images blocked, dark-mode inversion, Gmail 102 KB clipping, plaintext-only, forwarding/quoting, narrow mobile widths, and destination-page error states (expired/already-used transactional links).
|
|
74
|
+
- Never embed interactive forms inside email; link to a secure web route.
|
|
75
|
+
|
|
76
|
+
## Do/don't pairs
|
|
77
|
+
|
|
78
|
+
| Do | Don't |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Wrap `<Tailwind config={{ presets: [pixelBasedPreset] }}>` when using Tailwind utilities | Ship raw Tailwind v4 `rem`, `oklch()`, or `@layer` rules into email `<style>` blocks |
|
|
81
|
+
| Generate HTML and plaintext via `await render(el)` and `await render(el, { plainText: true })` | Manually maintain divergent plaintext templates or call v2 synchronous `render()` |
|
|
82
|
+
| Always set `fallbackFontFamily` on `<Font>` and `lang`/`dir` on `<Html>` | Let Classic Outlook collapse missing web fonts into Times New Roman |
|
|
83
|
+
| Inspect exported HTML byte size and real client renders (New Outlook + Classic Outlook + Gmail + Apple Mail) | Treat `npx email dev` local browser preview as proof of inbox rendering |
|
|
84
|
+
|
|
85
|
+
## Verification commands
|
|
86
|
+
|
|
87
|
+
Run static lint, build, and non-blocking static HTML export without suppressing failures:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
npm run lint
|
|
91
|
+
npm run build
|
|
92
|
+
npx email export
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Inspect exported HTML size against Gmail's 102 KB clipping threshold and validate plaintext output (`static`), then verify real client previews with dark mode and images off (`rendered`).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-extensions
|
|
3
|
+
description: Designs and verifies host-constrained extension and plugin interfaces. Use for Chrome, Firefox, and Safari browser extensions (Manifest V3, WXT, Plasmo, CRXJS, Shadow DOM, side panels, DevTools), VS Code extensions (webviews, CSP, Custom Editors, Chat Participants, MCP), JetBrains/IntelliJ/Jewel plugins, Obsidian plugins, Raycast commands/AI tools, Figma plugins/widgets, Office add-ins (Unified Manifest, Fluent UI), Shopify App Bridge/Polaris, Atlassian Forge, and Notion/Linear integrations.
|
|
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, threading rules, theme tokens, chrome, input conventions, and constrained viewport. Do not import a full standalone product shell or branding takeover into a popup, panel, webview, task pane, or plugin iframe.
|
|
12
|
+
|
|
13
|
+
## Surface craft
|
|
14
|
+
|
|
15
|
+
Use the host's smallest appropriate native surface: command or QuickPick for a quick action, TreeView or side panel for recurring context, Custom Editor/widget for document-bound state, and Webview/iframe only for needs native primitives cannot express. Preserve host tokens, zoom, and keyboard conventions, show the active object's context, and verify open/action/dismiss with focus restored.
|
|
16
|
+
|
|
17
|
+
## References
|
|
18
|
+
|
|
19
|
+
- Read [references/browser-extensions.md](references/browser-extensions.md) when building Chrome, Firefox, or Safari Manifest V3 extensions (WXT, Plasmo, CRXJS, popups, side panels, DevTools, Shadow DOM `rem` isolation, MV3 storage/alarms/offscreen).
|
|
20
|
+
- Read [references/vscode-webviews.md](references/vscode-webviews.md) when building VS Code extensions (native surface selection, Custom Editors, Chat Participants/LM Tools/MCP, webview CSP/nonces, `asWebviewUri`, `--vscode-*` tokens, Workspace Trust, `vscode.dev`).
|
|
21
|
+
- Read [references/raycast.md](references/raycast.md) when building Raycast extensions (`List`/`Grid`/`Detail`/`Form`, `ActionPanel`, `@raycast/utils`, `MenuBarExtra`, AI Extensions/Tools, no-view commands, macOS/Windows parity).
|
|
22
|
+
- Read [references/figma-office.md](references/figma-office.md) when building Figma plugins (`themeColors`, `dynamic-page`, Dev Mode/Code Connect), Figma Widgets (`useSyncedState`), or Microsoft Office add-ins (Unified Manifest, `Office.onReady`, Fluent UI v9, `displayDialogAsync` OAuth).
|
|
23
|
+
- Read [references/ide-and-saas-plugins.md](references/ide-and-saas-plugins.md) when building JetBrains Platform plugins (Kotlin UI DSL v2, Jewel, JCEF, EDT threading), Obsidian plugins, Shopify embedded apps (App Bridge v4 + Polaris), Atlassian Forge (UI Kit 2 vs Custom UI), or Notion/Linear integrations.
|
|
24
|
+
|
|
25
|
+
## Platform translation rules
|
|
26
|
+
|
|
27
|
+
1. Identify the surface type first: transient popup, persistent side panel, content-script Shadow DOM overlay, DevTools tab, native IDE tool window/editor, command palette/launcher, multiplayer canvas widget, or SaaS admin iframe.
|
|
28
|
+
2. Prefer host-native controls and live theme tokens (`--vscode-*`, `--figma-color-*`, Obsidian `--background-primary`, Polaris/App Bridge, Fluent UI v9, Jewel) before custom styling.
|
|
29
|
+
3. Design for the real viewport: 320 px popup/task pane, narrow sidebar, mobile Safari/Obsidian sheet, or hostile arbitrary web pages.
|
|
30
|
+
4. Minimize permissions and request optional scopes contextually at point of need, with truthful denied/restricted-mode fallback states.
|
|
31
|
+
5. Treat security and threading boundaries as UX constraints: CSP/nonces, isolated worlds, `postMessage` validation, OAuth dialog popups, session tokens, no remote code execution, and never blocking IDE UI threads.
|
|
32
|
+
6. Persist state cleanly across lifecycle interrupts: popup close, MV3 service-worker sleep, webview hide/reload, workspace trust change, and document switches.
|
|
33
|
+
|
|
34
|
+
## Hard rules
|
|
35
|
+
|
|
36
|
+
- **Chrome Web Store MV3 #1 Rejection Gate — Zero Remotely Hosted Code (`RHC`) & Safari packaging**: bundle 100% of executable JS/WASM inside the signed extension archive (zero remote `<script>`, `import("https://...")`, `eval()`, `new Function()`, or remote script strings); when Safari is in scope, package and verify the **Safari Web Extension macOS/iOS Xcode app-wrapper** (`xcrun safari-web-extension-converter`, native messaging/permission parity, and mobile Safari sheet sizing).
|
|
37
|
+
- **Ephemeral MV3 Service Workers & Webview `getState`/`setState` persistence**: persist MV3 state in `chrome.storage.session` / `chrome.storage.local` + `chrome.alarms` (never global RAM variables or `setInterval`), and serialize IDE/plugin **Webview state when hidden** (`acquireVsCodeApi().getState()` / `setState()` + `WebviewPanelSerializer`—avoiding `retainContextWhenHidden` RAM bloat unless strictly required).
|
|
38
|
+
- **Shadow DOM isolation & hostile-CSS host page testing**: wrap injected content-script UI in **Shadow DOM** (`all: initial` + `px`-normalized reset because `rem` resolves against the host's `<html>`!), **call `e.stopPropagation()` on `keydown`, `keyup`, and `keypress`** inside extension inputs (preserving `Escape` dismiss), and **test content scripts on hostile-CSS host pages** (aggressive `* { box-sizing: content-box !important }`, `z-index: 2147483647` overlays, `html { font-size: 62.5% }`, strict host CSPs, and dark/light mismatch).
|
|
39
|
+
- **Host startup (`< 50 ms`), `"*"` activation ban & remote/virtual workspaces**: **ban `"activationEvents": ["*"]`** in VS Code `package.json`, keep JetBrains/Obsidian startup off the UI/EDT thread, and declare/verify **remote & virtual workspace support** (**SSH Remote, GitHub Codespaces, Dev Containers, WSL, and `vscode.dev` `workspace.fs` URIs**—never assuming local POSIX `fs` paths).
|
|
40
|
+
- **Strict `OAuth 2.0 + PKCE (S256)` & OS `SecretStorage`**: authenticate public extension/plugin clients via **Authorization Code + PKCE (`S256`)** and store tokens in OS-encrypted **`context.secrets` (`SecretStorage`)** or `chrome.storage.session`—**never embed a `client_secret` inside distributed extension code**.
|
|
41
|
+
- **Mid-session host theme & locale hot-switching**: consume `--vscode-*`, `--figma-color-*`, Obsidian `--background-primary`, Polaris/App Bridge, Fluent UI v9, Raycast, and Jewel tokens across Light, Dark, and High-Contrast modes, and **hot-switch both host theme AND locale mid-session without requiring an extension reload or losing input state**.
|
|
42
|
+
|
|
43
|
+
## Anti-lazy-default & anti-slop guard
|
|
44
|
+
|
|
45
|
+
- **Smallest native host primitive first**: never reach for a heavy Webview, JCEF browser, or custom iframe when a host-native command, QuickPick, status-bar item, TreeView, Raycast `List`/`Detail`/`Form`, Atlassian Forge UI Kit 2 component, or Polaris/Fluent primitive solves the workflow cleanly.
|
|
46
|
+
- **Reject standalone SaaS shell slop**: never cram a full marketing hero, multi-level marketing nav bar, or brand-takeover theme into a 320 px browser popup, IDE side panel, Office task pane, or Figma plugin frame.
|
|
47
|
+
|
|
48
|
+
## Pre-submit checklist
|
|
49
|
+
|
|
50
|
+
- [ ] smallest appropriate native host surface chosen before falling back to Webview/iframe;
|
|
51
|
+
- [ ] **MV3 Zero RHC verified** (zero remote `<script>`, `eval`, `new Function`), ephemeral worker state in `chrome.storage.*`/`chrome.alarms`, `activeTab`/optional permissions scoped, and **Safari Web Extension macOS/iOS app-wrapper packaging** verified when Safari is in scope;
|
|
52
|
+
- [ ] content-script UI isolated in **Shadow DOM** (`px`-safe reset + `keydown`/`keyup`/`keypress` `stopPropagation()`) and **tested against hostile-CSS host pages** (`html { font-size: 62.5% }`, max `z-index`, aggressive resets, strict CSP);
|
|
53
|
+
- [ ] VS Code `package.json` contains **zero `"activationEvents": ["*"]`** (`< 50 ms` lazy activation), **Webview state persists when hidden (`getState`/`setState`)**, **remote/virtual workspaces (SSH / Codespaces / WSL / `workspace.fs`)** work cleanly, and JetBrains/IDE work stays off the EDT;
|
|
54
|
+
- [ ] auth uses **`OAuth 2.0 + PKCE (S256)`** + **`context.secrets` / session tokens** with **zero embedded `client_secret`**;
|
|
55
|
+
- [ ] **mid-session host theme (Light/Dark/High-Contrast) & locale hot-switching** without reload, narrow `320 px` viewports, and focus restoration verified (`rendered` vs `static` vs `not-checked`);
|
|
56
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, host extension/plugin tests, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Browser extensions (Manifest V3)
|
|
2
|
+
|
|
3
|
+
Choose the smallest Manifest V3 surface and build toolkit that matches your target browsers (**Chrome/Edge, Firefox, Safari**) rather than shipping ad hoc raw scripts with broken CSS or flaky service workers.
|
|
4
|
+
|
|
5
|
+
## Build toolkits and cross-browser matrix
|
|
6
|
+
|
|
7
|
+
| Toolkit | Best fit | Key trade-off |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **WXT** | Modern Vite-based default for Chrome, Firefox, and Safari MV3 with auto-generated manifest, HMR, and `createShadowRootUi` | Opinionated `entrypoints/` directory layout |
|
|
10
|
+
| **Plasmo** | React/TypeScript extensions wanting built-in CSUI anchoring and storage hooks | Tighter React coupling; slower adoption of newer browser-specific APIs |
|
|
11
|
+
| **CRXJS** | Existing Vite + React/Vue/Svelte apps adding a Chrome MV3 build | Primarily Chromium-focused; Firefox/Safari need extra manifest config |
|
|
12
|
+
| **`webextension-polyfill`** | Vanilla/custom builds normalizing `browser.*` Promise APIs across Chrome, Firefox, and Safari | Manual manifest and Shadow DOM packaging |
|
|
13
|
+
|
|
14
|
+
## Surface selection and browser divergence
|
|
15
|
+
|
|
16
|
+
| Surface | Use for | Cross-browser & UX constraints |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| **Popup** (`action.default_popup`) | Quick status or single-step action | Ephemeral, narrow (300–420 px), closes on blur; never rely on popup lifetime for durable writes |
|
|
19
|
+
| **Side Panel / Sidebar** | Persistent companion workflow | **Divergence**: Chrome/Edge use `side_panel.default_path` + `chrome.sidePanel.open()` (**must be called synchronously inside a user gesture**); Firefox uses `sidebar_action` (`browser.sidebarAction.open()`) |
|
|
20
|
+
| **Content-script UI** | Contextual on-page overlay | Host CSS is hostile; always isolate in **Shadow DOM** and never duplicate mounts on SPA navigations |
|
|
21
|
+
| **Options page** (`options_ui`) | Deep configuration | Full document; use explicit Save/Reset semantics and explain permission grants clearly |
|
|
22
|
+
| **DevTools Panel** (`devtools_page`) | Network/DOM/framework inspectors | Register via `chrome.devtools.panels.create(...)`, match `chrome.devtools.panels.themeName` (`'default' \| 'dark'`), and guard `inspectedWindow.eval` |
|
|
23
|
+
|
|
24
|
+
## Content-script Shadow DOM isolation, the `rem` trap, and host shortcut shielding
|
|
25
|
+
|
|
26
|
+
Host pages frequently override root `html { font-size: 62.5%; }` (`10px`) AND attach global window/document `keydown` listeners for single-key shortcuts (GitHub `s` / `/`, YouTube `k` / `f` / `m`, Gmail `c` / `#`, Linear `c`). Because CSS **`rem` inside a Shadow DOM resolves against the host's `<html>`**, and **composed keyboard events bubble out of the Shadow DOM to `document`**, unshielded overlays both shrink by 37% and trigger chaos on the underlying page while the user types!
|
|
27
|
+
|
|
28
|
+
- Fix the `rem` trap by compiling Shadow DOM CSS to `px` (`postcss-rem-to-pixel`) and setting `:host { all: initial; color-scheme: light dark; font-family: system-ui, sans-serif; font-size: 14px; }`.
|
|
29
|
+
- **Stop keyboard propagation at the Shadow Root boundary**: call `e.stopPropagation()` on `keydown`, `keyup`, and `keypress` inside extension inputs/overlays (handling `Escape` locally to close and restore focus):
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
// entrypoints/overlay.content.ts (WXT)
|
|
33
|
+
export default defineContentScript({
|
|
34
|
+
matches: ['https://*.example.com/*'],
|
|
35
|
+
cssInjectionMode: 'ui',
|
|
36
|
+
async main(ctx) {
|
|
37
|
+
const ui = await createShadowRootUi(ctx, {
|
|
38
|
+
name: 'pixelcraft-inspector',
|
|
39
|
+
position: 'inline',
|
|
40
|
+
anchor: 'body',
|
|
41
|
+
onMount(container) {
|
|
42
|
+
const root = document.createElement('section');
|
|
43
|
+
root.setAttribute('aria-label', 'Page inspector');
|
|
44
|
+
// Shield host-page single-key shortcuts (GitHub '/', YouTube 'k'/'f') when typing inside CSUI
|
|
45
|
+
for (const type of ['keydown', 'keyup', 'keypress'] as const) {
|
|
46
|
+
root.addEventListener(type, (e) => {
|
|
47
|
+
if (type === 'keydown' && (e as KeyboardEvent).key === 'Escape') {
|
|
48
|
+
root.remove();
|
|
49
|
+
}
|
|
50
|
+
e.stopPropagation();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const input = document.createElement('input');
|
|
54
|
+
input.placeholder = 'Filter elements…';
|
|
55
|
+
root.append(input);
|
|
56
|
+
container.append(root);
|
|
57
|
+
return root;
|
|
58
|
+
},
|
|
59
|
+
onRemove(root) {
|
|
60
|
+
root?.remove();
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
ui.mount();
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Chrome Web Store MV3 #1 Rejection Gate: Zero Remotely Hosted Code (`RHC`)
|
|
69
|
+
|
|
70
|
+
Chrome Web Store automated + human review immediately rejects any Manifest V3 submission that loads or executes code not present inside the signed `.zip` bundle:
|
|
71
|
+
|
|
72
|
+
- **Strictly banned**: `<script src="https://...">` (including Google Tag Manager, external Stripe/Firebase/Sentry CDN scripts, or remote UI bundles), dynamic `import("https://...")`, `eval()`, `new Function()`, string `setTimeout("...")`, or fetching JS/WASM payloads from an API to pass into `chrome.scripting.executeScript({ func })`.
|
|
73
|
+
- **Allowed**: bundling all SDKs locally at build time (`vite`/`wxt` Rollup bundle with `content_security_policy.extension_pages = "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"`), and fetching strictly declarative **JSON configuration / feature flags** validated against a local schema.
|
|
74
|
+
|
|
75
|
+
## MV3 runtime, storage, PKCE OAuth, and Safari Web Extensions
|
|
76
|
+
|
|
77
|
+
- **Service-worker lifecycle**: MV3 service workers terminate after ~30 s idle. Register all top-level listeners synchronously on boot, replace `setTimeout`/`setInterval` with **`chrome.alarms`**, and keep ephemeral tokens in **`chrome.storage.session`**, durable device state in **`chrome.storage.local`**, and tiny synced prefs in **`chrome.storage.sync`** (`100 KB` total / `8 KB` per key).
|
|
78
|
+
- **OAuth 2.0 Authorization Code + PKCE (`S256`)**: extension bundles are inspectable public clients—**never embed a `client_secret`**. Generate a 32-byte cryptographic `code_verifier` + SHA-256 base64url `code_challenge`, launch `chrome.identity.launchWebAuthFlow({ url, interactive: true })`, exchange the authorization code with `code_verifier`, and hold short-lived access tokens in `chrome.storage.session`.
|
|
79
|
+
- **Offscreen documents (`chrome.offscreen`)**: create a single-purpose offscreen doc (`DOM_PARSER`, `CLIPBOARD`, `AUDIO_PLAYBACK`) only when needed and close it when idle.
|
|
80
|
+
- **`chrome.scripting` worlds (`ISOLATED` vs `MAIN`)**: keep UI and `chrome.*` calls in `ISOLATED`; inject into `MAIN` only for minimal read-only inspection via schema-validated `postMessage`.
|
|
81
|
+
- **Safari Web Extensions**: test both macOS and **iOS Safari** (`>= 44 pt` touch targets, bottom-sheet popups) and feature-detect `sidePanel` / `offscreen`.
|
|
82
|
+
|
|
83
|
+
## Permissions UX
|
|
84
|
+
|
|
85
|
+
Prefer `activeTab` and `optional_host_permissions` over blanket `<all_urls>`. Request optional permissions via `chrome.permissions.request()` synchronously inside the user gesture that needs them, explain why in plain language, and render a calm degraded state if denied.
|
|
86
|
+
|
|
87
|
+
## Do/don't pairs
|
|
88
|
+
|
|
89
|
+
| Do | Don't |
|
|
90
|
+
|---|---|
|
|
91
|
+
| Bundle 100% of JS locally (`script-src 'self'`) and fetch only validated JSON | Load `<script src="https://cdn...">`, `eval()`, `new Function()`, or remote JS strings (CWS #1 rejection) |
|
|
92
|
+
| Convert `rem` to `px` and call `e.stopPropagation()` on `keydown`/`keyup`/`keypress` in Shadow DOM | Let typing inside an extension input trigger YouTube `k`/`f` or GitHub `/` shortcuts, or shrink on `font-size: 62.5%` |
|
|
93
|
+
| Authenticate via **OAuth 2.0 + PKCE (`S256`)** + `chrome.storage.session` with zero `client_secret` | Ship hardcoded OAuth `client_secret` or API keys inside extension source bundles |
|
|
94
|
+
| Use `chrome.alarms` + `chrome.storage.{session,local}` and synchronous `chrome.sidePanel.open()` | Store state in global service-worker RAM or `await` before `chrome.sidePanel.open()` |
|
|
95
|
+
| Scope `activeTab` + `optional_host_permissions` and handle denial gracefully | Request `<all_urls>` on install for a single-domain utility |
|
|
96
|
+
|
|
97
|
+
## Verification commands
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
npx wxt build
|
|
101
|
+
npx wxt build -b firefox
|
|
102
|
+
npx playwright test
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Inspect the built `.zip` / `manifest.json` for zero remote script URLs, `eval`, or `<all_urls>` (`static`), then load the unpacked extension in Chrome, Firefox, and Safari to verify Shadow DOM `rem` + `keydown` shortcut isolation on GitHub/YouTube, PKCE sign-in, service-worker sleep/wake, and denied permissions (`rendered`).
|