@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,114 @@
|
|
|
1
|
+
# Client-side PDF viewers (PDF.js) and programmatic PPTX decks (PptxGenJS)
|
|
2
|
+
|
|
3
|
+
For print CSS, Playwright/Gotenberg, WeasyPrint, React-PDF, Typst, LaTeX, Quarto, and web/Typst slide frameworks, read `references/pdf-tools.md` and `references/slides.md`. Use this reference when **rendering PDFs inside a web app (`pdfjs-dist`)** or **generating editable PowerPoint `.pptx` files (`pptxgenjs`)**.
|
|
4
|
+
|
|
5
|
+
## PDF.js (`pdfjs-dist` v4.2+ / v5) viewer idioms
|
|
6
|
+
|
|
7
|
+
- **Dedicated Web Worker**: configure `GlobalWorkerOptions.workerSrc` (or `GlobalWorkerOptions.workerPort`) pointing to a bundled/same-origin `pdf.worker.min.mjs` matching the exact `pdfjs-dist` version—never parse PDFs on the main thread.
|
|
8
|
+
- **HiDPI crispness (`devicePixelRatio` + `transform`)**: scale the `<canvas>` backing store (`canvas.width` / `canvas.height`) by `window.devicePixelRatio`, keep CSS width/height at logical viewport pixels, and pass `transform: dpr !== 1 ? [dpr, 0, 0, dpr, 0, 0] : undefined` into `page.render(...)` so glyphs stay razor-sharp on Retina/4K screens.
|
|
9
|
+
- **Selectable & accessible `TextLayer` (v4.2+ / v5)**: instantiate `new TextLayer({ textContentSource, container, viewport }).render()` and set `--scale-factor` and `--total-scale-factor` CSS custom properties on the page/text-layer container (imported with `pdfjs-dist/web/pdf_viewer.css`) so selectable spans align accurately with the rendered canvas.
|
|
10
|
+
- **Cancellation & teardown**: cancel superseded `page.render(...)` and `TextLayer` tasks (`renderTask.cancel()`, `textLayer.cancel()`, ignoring `RenderingCancelledException`) on rapid zoom/page turns, and call `await loadingTask.destroy()` on unmount to abort pending range fetches and terminate the worker.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { getDocument, GlobalWorkerOptions, TextLayer } from 'pdfjs-dist';
|
|
14
|
+
import 'pdfjs-dist/web/pdf_viewer.css';
|
|
15
|
+
|
|
16
|
+
GlobalWorkerOptions.workerSrc = new URL(
|
|
17
|
+
'pdfjs-dist/build/pdf.worker.min.mjs',
|
|
18
|
+
import.meta.url,
|
|
19
|
+
).toString();
|
|
20
|
+
|
|
21
|
+
const loadingTask = getDocument({ url: '/report.pdf' });
|
|
22
|
+
const pdf = await loadingTask.promise;
|
|
23
|
+
const page = await pdf.getPage(1);
|
|
24
|
+
|
|
25
|
+
const scale = 1.5;
|
|
26
|
+
const dpr = window.devicePixelRatio || 1;
|
|
27
|
+
const viewport = page.getViewport({ scale });
|
|
28
|
+
|
|
29
|
+
// 1. HiDPI canvas backing store + DPR transform
|
|
30
|
+
canvas.width = Math.floor(viewport.width * dpr);
|
|
31
|
+
canvas.height = Math.floor(viewport.height * dpr);
|
|
32
|
+
canvas.style.width = `${Math.floor(viewport.width)}px`;
|
|
33
|
+
canvas.style.height = `${Math.floor(viewport.height)}px`;
|
|
34
|
+
|
|
35
|
+
const renderTask = page.render({
|
|
36
|
+
canvasContext: ctx,
|
|
37
|
+
viewport,
|
|
38
|
+
transform: dpr !== 1 ? [dpr, 0, 0, dpr, 0, 0] : undefined,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// 2. Synchronized TextLayer (PDF.js v4.2+/v5 requires scale CSS vars)
|
|
42
|
+
pageContainer.style.setProperty('--scale-factor', String(viewport.scale));
|
|
43
|
+
pageContainer.style.setProperty('--total-scale-factor', String(viewport.scale));
|
|
44
|
+
textLayerDiv.replaceChildren();
|
|
45
|
+
const textLayer = new TextLayer({
|
|
46
|
+
textContentSource: page.streamTextContent(),
|
|
47
|
+
container: textLayerDiv,
|
|
48
|
+
viewport,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
await Promise.all([renderTask.promise, textLayer.render()]);
|
|
53
|
+
} catch (err) {
|
|
54
|
+
if ((err as Error).name !== 'RenderingCancelledException') throw err;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// On zoom/page change: renderTask.cancel(); textLayer.cancel();
|
|
58
|
+
// On unmount: await loadingTask.destroy();
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## PptxGenJS (v3/v4 programmatic `.pptx` generation)
|
|
62
|
+
|
|
63
|
+
- **Slide masters & physical inches**: set `pres.layout = 'LAYOUT_16x9'` (10" × 5.625") or `defineLayout(...)` in **inches**, and define reusable `defineSlideMaster({ title, background, objects, slideNumber })` templates so headers, footers, margins, and slide numbers stay consistent across every generated slide.
|
|
64
|
+
- **Native editable objects**: prefer `slide.addText(...)`, `slide.addTable(...)` (supports auto-paging across slides), and native `slide.addChart(...)` over rasterizing entire slides as PNG screenshots.
|
|
65
|
+
- **RTL localization**: set `pres.rtlMode = true` for Arabic/Hebrew/Persian decks and verify text alignment, chart axis direction, and slide-number anchor positions in PowerPoint/Impress.
|
|
66
|
+
- **Canonical Export API (v3/v4)**: use `await pres.writeFile({ fileName: 'deck.pptx' })` for direct file downloads/writes, or `await pres.write({ outputType: 'nodebuffer' })` in Node.js services (supported `outputType` values: `'nodebuffer' | 'stream' | 'blob' | 'base64' | 'arraybuffer' | 'uint8array'`). Do not pass deprecated string-only arguments to `writeFile` or call removed v2 streaming methods.
|
|
67
|
+
- **Font availability & scale floor**: PowerPoint substitutes missing fonts on recipients' machines—use cross-OS safe fonts (`Arial`, `Segoe UI`, `Calibri`, `Aptos`) or embed licensed subsetted fonts explicitly; enforce **`>= 24pt` body text for room projection** (`>= 18pt` only for dense read-alone leave-behind decks), pixel-snap `16:9` raster assets so the `.pptx` stays **`< 25–30 MB`** (email-safe), and verify **`PPTX <-> PDF` visual parity** at 100% scale.
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import PptxGenJS from 'pptxgenjs';
|
|
71
|
+
|
|
72
|
+
const pres = new PptxGenJS();
|
|
73
|
+
pres.layout = 'LAYOUT_16x9';
|
|
74
|
+
pres.rtlMode = false; // Set true for RTL locales (ar, he, fa)
|
|
75
|
+
|
|
76
|
+
pres.defineSlideMaster({
|
|
77
|
+
title: 'REPORT_MASTER',
|
|
78
|
+
background: { color: 'FFFFFF' },
|
|
79
|
+
slideNumber: { x: 9.2, y: 5.2, fontSize: 12, color: '555555' },
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const slide = pres.addSlide({ masterName: 'REPORT_MASTER' });
|
|
83
|
+
slide.addText('Quarterly Operations Review', { x: 0.6, y: 0.4, w: 8.8, fontSize: 28, bold: true });
|
|
84
|
+
slide.addChart(
|
|
85
|
+
pres.ChartType.bar,
|
|
86
|
+
[{ name: 'Uptime %', labels: ['Q1', 'Q2', 'Q3', 'Q4'], values: [99.8, 99.9, 99.95, 99.98] }],
|
|
87
|
+
{ x: 0.6, y: 1.2, w: 8.8, h: 3.6, showValue: true, barDir: 'col' },
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Server-side Buffer (or 'stream' | 'blob' for streaming/browser)
|
|
91
|
+
const buffer = (await pres.write({ outputType: 'nodebuffer' })) as Buffer;
|
|
92
|
+
// Or direct save: await pres.writeFile({ fileName: 'q4-review.pptx' });
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Do/don't pairs
|
|
96
|
+
|
|
97
|
+
| Do | Don't |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Set `GlobalWorkerOptions.workerSrc` and call `loadingTask.destroy()` in PDF.js | Parse multi-megabyte PDFs on the main thread or leak PDF workers on unmount |
|
|
100
|
+
| Scale backing canvas by `devicePixelRatio` with `transform: [dpr, 0, 0, dpr, 0, 0]` | Render 1× logical canvas pixels onto Retina screens, producing blurry text |
|
|
101
|
+
| Pair `new TextLayer({ textContentSource, container, viewport }).render()` with `--scale-factor` / `--total-scale-factor` | Ship an image-only PDF canvas or misaligned text overlay that breaks copy/search/a11y |
|
|
102
|
+
| Cancel in-flight `renderTask` and `textLayer` on zoom/page change and ignore `RenderingCancelledException` | Race concurrent `page.render()` calls onto the same `<canvas>` |
|
|
103
|
+
| Define `defineSlideMaster`, keep body `>= 24pt` (`>= 18pt` leave-behind), budget `.pptx` `< 25–30 MB`, and use native `addText`/`addTable`/`addChart` | Export flattened PNG-per-slide screenshots as `.pptx`, shrink text to `11pt`, or ship `90 MB` uncompressed hero bitmaps |
|
|
104
|
+
|
|
105
|
+
## Verification commands
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
npm run build
|
|
109
|
+
# Headless PPTX <-> PDF visual parity render (when LibreOffice + Poppler are installed)
|
|
110
|
+
soffice --headless --convert-to pdf q4-review.pptx
|
|
111
|
+
pdftoppm -png -r 150 q4-review.pdf slide-proof
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Verify PDF.js worker bundling and `.pptx` byte size `< 25–30 MB` (`static`), test HiDPI canvas + `TextLayer` selection alignment + zoom cancellation in a real browser (`rendered`), and compare exported `.pptx` against its rendered `.pdf` slides in PowerPoint / Keynote / LibreOffice Impress to confirm `PPTX <-> PDF` parity, chart legibility, RTL layout (when enabled), and zero text clipping or font substitution (`rendered`).
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Print CSS and CSS Paged Media
|
|
2
|
+
|
|
3
|
+
Browser print engines implement only part of CSS Paged Media. Chromium 131+ supports CSS `@page` margin boxes, whereas Firefox and Safari still lag; dedicated paged-media engines (PrinceXML, WeasyPrint, Vivliostyle, Paged.js) implement the deeper specification. Validate every feature in the actual renderer before depending on it.
|
|
4
|
+
|
|
5
|
+
## Core `@page` model
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
@page {
|
|
9
|
+
size: A4 portrait;
|
|
10
|
+
margin: 18mm 16mm 20mm 16mm;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@page cover {
|
|
14
|
+
margin: 0;
|
|
15
|
+
background: #102033;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.cover-page {
|
|
19
|
+
page: cover;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Useful forms:
|
|
24
|
+
|
|
25
|
+
| Feature | Example | Notes |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| explicit dimensions | `size: 210mm 297mm;` | width then height |
|
|
28
|
+
| standard size/orientation | `size: letter landscape;` | verify automatic orientation inversion per renderer |
|
|
29
|
+
| page margins | `margin: 18mm 15mm;` | physical margin inside paper edge |
|
|
30
|
+
| named pages | `page: invoice;` + `@page invoice` | assign from an element; renderer support is not universal |
|
|
31
|
+
| pseudo pages | `@page :first`, `:left`, `:right`, `:blank` | essential for duplex/book layouts; test in target engine |
|
|
32
|
+
| page counter | `counter(page)` | current page number inside `@page` margin boxes |
|
|
33
|
+
| total counter | `counter(pages)` | total page count inside `@page` margin boxes |
|
|
34
|
+
| margin boxes | `@bottom-right { content: counter(page) " / " counter(pages); }` | supported in Chromium 131+, PrinceXML, WeasyPrint, Vivliostyle, and Paged.js; Firefox/Safari still lag |
|
|
35
|
+
|
|
36
|
+
Margin boxes include `@top-left`, `@top-center`, `@top-right`, `@bottom-left`, `@bottom-center`, `@bottom-right`, and side margin boxes. Chromium 131+ (including Playwright/Puppeteer and Gotenberg Chromium) supports CSS `@page` margin boxes, while Firefox and Safari still lack full margin-box support. Do not rely on `@page` margin boxes for cross-browser native `window.print()`; use them confidently in controlled Chromium PDF pipelines, PrinceXML, WeasyPrint, Vivliostyle, or Paged.js.
|
|
37
|
+
|
|
38
|
+
## Modern CSS Paged Media idioms
|
|
39
|
+
|
|
40
|
+
These rules work in dedicated paged-media engines (PrinceXML, WeasyPrint, Vivliostyle, and partially Paged.js); native browser print does not support them reliably:
|
|
41
|
+
|
|
42
|
+
```css
|
|
43
|
+
/* 1. Dynamic running section headers via string-set + string() */
|
|
44
|
+
h1.chapter-title {
|
|
45
|
+
string-set: chapter content(text);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@page {
|
|
49
|
+
@top-center {
|
|
50
|
+
content: string(chapter, first); /* first | start | last | first-except */
|
|
51
|
+
font-size: 8.5pt;
|
|
52
|
+
color: #4b5563;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* 2. Automatic Table of Contents dot leaders and target page numbers */
|
|
57
|
+
nav.toc a::after {
|
|
58
|
+
content: " " leader('.') " " target-counter(attr(href url), page);
|
|
59
|
+
font-variant-numeric: tabular-nums;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* 3. True paged-media footnotes */
|
|
63
|
+
@page {
|
|
64
|
+
@footnote {
|
|
65
|
+
border-top: 0.5pt solid #9ca3af;
|
|
66
|
+
padding-top: 3mm;
|
|
67
|
+
margin-top: 4mm;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
span.fn {
|
|
72
|
+
float: footnote;
|
|
73
|
+
font-size: 8.5pt;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
::footnote-call {
|
|
77
|
+
content: counter(footnote);
|
|
78
|
+
vertical-align: super;
|
|
79
|
+
font-size: 75%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
::footnote-marker {
|
|
83
|
+
content: counter(footnote) ". ";
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Test `string()` edge cases on pages without headings, verify `target-counter()` resolves across multi-pass renders, and keep footnote density bounded so footnote blocks do not push body paragraphs into infinite page loops.
|
|
88
|
+
|
|
89
|
+
## Fragmentation control
|
|
90
|
+
|
|
91
|
+
Use modern properties plus legacy aliases only when needed by the target renderer:
|
|
92
|
+
|
|
93
|
+
```css
|
|
94
|
+
h1, h2, h3 {
|
|
95
|
+
break-after: avoid;
|
|
96
|
+
break-inside: avoid;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
thead {
|
|
100
|
+
display: table-header-group; /* repeat column headers at the top of every split page */
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
tfoot {
|
|
104
|
+
display: table-footer-group;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
tr, figure, .signature-block, .total-row {
|
|
108
|
+
break-inside: avoid;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
section.chapter {
|
|
112
|
+
break-before: page;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
table {
|
|
116
|
+
break-inside: auto;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
| Property | Meaning | Design rule |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `break-before: page` | force a break before the element | use for chapters/major sections, not every card |
|
|
123
|
+
| `break-after: avoid` | prevent a break immediately after | essential for headings before content |
|
|
124
|
+
| `break-inside: avoid` | keep a box together where possible | use for `tr`/figures/signatures/totals, never entire multi-page tables |
|
|
125
|
+
| `thead { display: table-header-group }` | repeat table header across page breaks | mandatory on multi-page financial, audit, and line-item tables |
|
|
126
|
+
| `orphans` / `widows` | minimum lines at bottom / carried to next page | set `orphans: 3; widows: 3;` and inspect real paragraph lengths |
|
|
127
|
+
|
|
128
|
+
## Physical units and typography
|
|
129
|
+
|
|
130
|
+
Exact relationships in CSS print:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
1in = 25.4mm = 72pt = 96 CSS px
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Use `mm`, `cm`, `in`, and `pt` for print-critical dimensions. Use `px` only for hairline rules or screen-first components whose conversion is intentional. Body copy for ordinary print often starts around 9–11pt depending on typeface, measure, and audience; legal/compact tables may go smaller only when tested at 100%. Verify x-height, paper, contrast, and reader needs rather than copying arbitrary numbers.
|
|
137
|
+
|
|
138
|
+
Design a type system:
|
|
139
|
+
|
|
140
|
+
- measure: often 60–90 characters for prose, narrower for dense reference matter;
|
|
141
|
+
- leading: enough for script/ascenders/diacritics; CJK/Indic/Arabic/Vietnamese stacked diacritics need generous leading;
|
|
142
|
+
- hyphenation/line breaking: language-dependent (`lang` attribute required for `hyphens: auto`) and renderer-dependent;
|
|
143
|
+
- font embedding, `ToUnicode` CMap, and license: verify `pdffonts` (`emb=yes`, `uni=yes`) so ligatures (`fi`, `fl`), Vietnamese, and CJK copy cleanly without `□` tofu.
|
|
144
|
+
|
|
145
|
+
## Dual print profiles: Office Grayscale vs Commercial Prepress (`PDF/X-4`)
|
|
146
|
+
|
|
147
|
+
Select and design against the exact target print profile rather than mixing screen RGB habits with print-shop assumptions:
|
|
148
|
+
|
|
149
|
+
| Dimension | Profile A — Digital & Office Grayscale Proof | Profile B — Commercial Prepress (`PDF/X-4`) |
|
|
150
|
+
|---|---|---|
|
|
151
|
+
| **Margins & bleed** | **`10–12mm` minimum safe outer margin** (office laser/inkjet unprintable gripper edge); `0mm` bleed | **`3mm` (`0.125"`) bleed on all 4 sides** (`TrimBox` + `BleedBox`) + **`5mm` inner trim safety inset** for all live text/logos |
|
|
152
|
+
| **Color & ink budget** | sRGB with `-webkit-print-color-adjust: exact` / `print-color-adjust: exact`, **verified in grayscale** and with backgrounds disabled (`>= 4.5:1` contrast on white paper; patterns/direct labels distinguish red vs green series without color ink) | Target CMYK ICC output intent (e.g. `FOGRA39` / `ISO Coated v2` or `GRACoL 2013`), **Total Area Coverage `TAC <= 300%`**; **body black text (`< 18–24pt`) strictly `100% K` overprint (`C0 M0 Y0 K100`)**—never 4-plate rich black (`C60 M40 Y40 K100`), which ghosts/halos from press plate misregistration |
|
|
153
|
+
| **Graphics & DPI** | Strict vector SVG/PDF primitives for charts/logos; `150–300 DPI` photos | Strict vector SVG/PDF primitives for charts/logos/type; **`>= 300 effective DPI` at final printed dimensions** for continuous-tone photography |
|
|
154
|
+
| **Navigation & compliance** | Clickable TOC outline/bookmarks, hyperlinks, and **`PDF/UA-1` / `PDF/UA-2`** tag tree | **`PDF/X-4`** output intent, crop/registration marks outside bleed box (`marks: crop cross`), embedded fonts (`100%` subset/full), flattened or `PDF/X-4` live transparency per print shop spec |
|
|
155
|
+
|
|
156
|
+
```css
|
|
157
|
+
/* Commercial Prepress (@page in PrinceXML / WeasyPrint / Vivliostyle) */
|
|
158
|
+
@page {
|
|
159
|
+
size: 210mm 297mm;
|
|
160
|
+
margin: 16mm; /* >= 5mm trim safety inset strictly respected */
|
|
161
|
+
bleed: 3mm;
|
|
162
|
+
marks: crop cross;
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Support for `bleed`, `marks`, and `cmyk()` / ICC profiles is renderer-specific (PrinceXML, WeasyPrint, Vivliostyle) and absent from native browser print. In Typst, verify pinned version flags or expand page dimensions (`width: 210mm + 6mm, height: 297mm + 6mm`) with explicit trim marks (see [pdf-tools.md](pdf-tools.md)).
|
|
167
|
+
|
|
168
|
+
## Browser print limitations
|
|
169
|
+
|
|
170
|
+
Native cross-browser `window.print()` is suitable for simple documents, but still has gaps:
|
|
171
|
+
|
|
172
|
+
- `@page` margin boxes work in Chromium 131+, while Firefox and Safari still lag;
|
|
173
|
+
- inconsistent named-page, `:blank`, and counter behavior across engines;
|
|
174
|
+
- no cross-browser support for `string-set`, `target-counter()`, `leader()`, or `@footnote` / `float: footnote`;
|
|
175
|
+
- page background and header/footer toggles remain under end-user print-dialog control;
|
|
176
|
+
- no reliable crop marks/bleed or PDF/A / PDF/X prepress profiles.
|
|
177
|
+
|
|
178
|
+
Use browser print when the user invokes print directly and simple pagination is acceptable. Use Playwright/Gotenberg, PrinceXML, Vivliostyle, Paged.js, WeasyPrint, Typst, LaTeX, or React-PDF when exact pagination is a product requirement.
|
|
179
|
+
|
|
180
|
+
## Verification protocol
|
|
181
|
+
|
|
182
|
+
1. Print-preview or generate PDF with real content length distribution.
|
|
183
|
+
2. Inspect every page at 100% zoom and physically printed scale when possible (`rendered`).
|
|
184
|
+
3. Test first/middle/last page, blank pages, duplex left/right, repeated table headers, footnotes, figures, and totals.
|
|
185
|
+
4. Text-select/search/extract output (`pdftotext`). Invisible vector text or rasterized type is an accessibility failure unless explicitly accepted.
|
|
186
|
+
5. Compare light/dark/backgrounds-disabled/grayscale outputs.
|
|
187
|
+
6. Label unavailable verification `not-checked`; do not infer correct pagination from screen layout.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Slides and presentation surfaces
|
|
2
|
+
|
|
3
|
+
Slides are performance aids viewed at distance. They are not dense reports pasted onto a projector. One slide carries one primary idea; speaker notes and handouts carry detail.
|
|
4
|
+
|
|
5
|
+
## Composition rules
|
|
6
|
+
|
|
7
|
+
| Concern | Practical rule |
|
|
8
|
+
|---|---|
|
|
9
|
+
| idea density | one claim/idea per slide; split sequences instead of shrinking everything |
|
|
10
|
+
| type scale | **`>= 24pt` body floor for live room projection** (`>= 36–60pt` key claims/titles); step down to **`>= 18pt` strictly for dense read-alone leave-behind decks**—never drop below `18pt` for body or axis labels |
|
|
11
|
+
| master slides | define reusable **Master Slide** layouts (`Title`, `Section`, `1-Col`, `2-Col Evidence`, `Stat/Quote`) for consistent margins, grid anchors, running footers, and slide numbers instead of nudging text boxes manually per slide |
|
|
12
|
+
| safe area & frame | author `16:9` (`1920×1080` or `10" × 5.625"`) with pixel-snapped assets inside the central `90–95%` safe zone; keep total `.pptx`/`.pdf` deck size **`< 25–30 MB`** so email attachments and corporate upload portals never reject the file |
|
|
13
|
+
| contrast & fonts | high contrast for washed-out venue projectors (`>= 7:1` preferred); embed licensed subsetted fonts or restrict editable `.pptx` decks to universal cross-OS fonts (`Aptos`/`Calibri`/`Arial`/`Segoe UI`) so line breaks never shift on the presenter laptop |
|
|
14
|
+
| motion | transitions only when they explain sequence/object constancy; export both presenter build and flattened-step static handout PDF |
|
|
15
|
+
| parity & accessibility | verify **`PPTX <-> PDF` visual parity** (convert `.pptx` via PowerPoint/LibreOffice to PDF and inspect every slide for reflow, font substitution, or clipped callouts), reading order, alt text, and color-independent chart labels |
|
|
16
|
+
|
|
17
|
+
Common slide sizes:
|
|
18
|
+
|
|
19
|
+
| Surface | Typical frame | Notes |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| presentation/projector | 16:9, often authored 1920×1080 or 1280×720 | current default in most venues |
|
|
22
|
+
| older projector/template | 4:3 | confirm before reusing master layouts |
|
|
23
|
+
| vertical social video | 9:16, often 1080×1920 | platform UI overlays need separate safe-area review |
|
|
24
|
+
| square embed | 1:1 | simplify hierarchy; avoid dense wide tables |
|
|
25
|
+
|
|
26
|
+
## Keynote-style craft
|
|
27
|
+
|
|
28
|
+
- Open with context or a visual question, not a logo-only title repeated throughout.
|
|
29
|
+
- Use scale contrast: large decisive statement/visual, restrained supporting text.
|
|
30
|
+
- Prefer image/diagram + spoken explanation over bullet paragraphs.
|
|
31
|
+
- Build complex diagrams in meaningful steps; never use animation as decoration alone.
|
|
32
|
+
- Put code on slides only when the exact line matters. Use large type, high contrast, and limited line length; link/provide full source elsewhere.
|
|
33
|
+
- End sections with orientation or decision, not a generic “Questions?” placeholder.
|
|
34
|
+
- Keep branding consistent but subordinate. Full-bleed color can be powerful when intentional; default corporate blue templates are slop.
|
|
35
|
+
|
|
36
|
+
## Slidev
|
|
37
|
+
|
|
38
|
+
Slidev uses Markdown-driven slides (`---` separators) with Vue components, MDC inline styling, and Shiki Magic Move code transitions:
|
|
39
|
+
|
|
40
|
+
````markdown
|
|
41
|
+
---
|
|
42
|
+
theme: default
|
|
43
|
+
title: Query Planner Walkthrough
|
|
44
|
+
mdc: true
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# Step-by-step index scan [v2.4]{.text-sm.px-2.py-0.5.rounded.bg-emerald-900.text-emerald-100}
|
|
48
|
+
|
|
49
|
+
````md magic-move
|
|
50
|
+
```sql
|
|
51
|
+
SELECT * FROM events WHERE org_id = $1;
|
|
52
|
+
```
|
|
53
|
+
```sql
|
|
54
|
+
SELECT id, created_at FROM events
|
|
55
|
+
WHERE org_id = $1
|
|
56
|
+
ORDER BY created_at DESC LIMIT 50;
|
|
57
|
+
```
|
|
58
|
+
````
|
|
59
|
+
|
|
60
|
+
<!--
|
|
61
|
+
Speaker notes: explain why the covering index eliminates heap fetches.
|
|
62
|
+
-->
|
|
63
|
+
````
|
|
64
|
+
|
|
65
|
+
Export commands (uses Playwright Chromium underneath—pin fonts and assets so headless export matches live preview):
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npx slidev export --format pdf --with-clicks --output deck.pdf
|
|
69
|
+
# WARNING: Slidev --format pptx exports flattened raster slide images, NOT editable PowerPoint text or Slide Masters!
|
|
70
|
+
npx slidev export --format pptx --output deck.pptx
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> **Editable `.pptx` handoff warning:** `slidev export --format pptx` screenshots each slide into a non-editable PNG inside PowerPoint. Never deliver a Slidev `.pptx` when executives or clients expect editable text, live charts, or native Slide Masters—use **`PptxGenJS`** (see [pdfjs-and-pptx.md](pdfjs-and-pptx.md)), **Quarto `--to pptx` with `reference-doc`**, or native PowerPoint/Keynote masters instead.
|
|
74
|
+
|
|
75
|
+
Rules:
|
|
76
|
+
|
|
77
|
+
- enable `mdc: true` in deck frontmatter only when MDC inline syntax is actually used, and keep Markdown readable without custom components;
|
|
78
|
+
- use `magic-move` to explain genuine code diffs across 2–4 concise steps rather than scrolling walls of 40-line files;
|
|
79
|
+
- validate syntax highlighting contrast and line wrapping in both light/dark exports (`--dark`) and live presenter mode;
|
|
80
|
+
- test keyboard navigation (`Space`, arrows, `o` overview) and click steps (`--with-clicks`) when exporting PDF handouts.
|
|
81
|
+
|
|
82
|
+
## reveal.js
|
|
83
|
+
|
|
84
|
+
reveal.js initializes a scalable slide deck in the browser:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
Reveal.initialize({
|
|
88
|
+
width: 1280,
|
|
89
|
+
height: 720,
|
|
90
|
+
margin: 0.04,
|
|
91
|
+
minScale: 0.2,
|
|
92
|
+
maxScale: 2.0,
|
|
93
|
+
center: false,
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Default sizing in reveal.js is `960×700`; explicitly set `width: 1280, height: 720` for modern 16:9 venues, and set `center: false` when fixed vertical alignment matters. `embedded: true` changes sizing for embedded decks and requires explicit layout responsibility.
|
|
98
|
+
|
|
99
|
+
Rules:
|
|
100
|
+
|
|
101
|
+
- test keyboard navigation, fragments, overflow scrolling, PDF export (`?print-pdf`), speaker view (`S`), and browser scaling;
|
|
102
|
+
- do not rely on automatic scaling to rescue overcrowded slides;
|
|
103
|
+
- fragments should reveal logic, not every bullet merely for rhythm;
|
|
104
|
+
- nested vertical slides need clear navigation cues so audiences do not lose orientation.
|
|
105
|
+
|
|
106
|
+
## Quarto RevealJS
|
|
107
|
+
|
|
108
|
+
Use Quarto RevealJS (`.qmd`) when slides embed live computational charts, tables, or code outputs from Python, R, Julia, or Observable:
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
---
|
|
112
|
+
title: "Latency Distribution Q4"
|
|
113
|
+
format:
|
|
114
|
+
revealjs:
|
|
115
|
+
width: 1280
|
|
116
|
+
height: 720
|
|
117
|
+
slide-number: true
|
|
118
|
+
smaller: false
|
|
119
|
+
theme: [default, custom.scss]
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## P99 tail latency {auto-animate=true}
|
|
123
|
+
|
|
124
|
+
```{python}
|
|
125
|
+
#| echo: true
|
|
126
|
+
#| code-line-numbers: "1-2|4"
|
|
127
|
+
import polars as pl
|
|
128
|
+
df = pl.read_parquet("metrics.parquet")
|
|
129
|
+
# Highlighted on step 2
|
|
130
|
+
p99 = df.select(pl.col("ms").quantile(0.99))
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
::: {.notes}
|
|
134
|
+
Speaker note: cite the exact dataset revision and sample size.
|
|
135
|
+
:::
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Render with `quarto render talk.qmd --to revealjs` and verify `quarto render` PDF print output (`?print-pdf` or DeckTape) so interactive widgets/plots have static fallbacks.
|
|
139
|
+
|
|
140
|
+
## Touying and Polylux (Typst slides)
|
|
141
|
+
|
|
142
|
+
Use **Touying** (recommended for Typst 0.12–0.14+) or **Polylux** when exact physical typography, vector math/diagrams (`CeTZ`), speaker notes, and deterministic browser-free PDF compilation matter:
|
|
143
|
+
|
|
144
|
+
```typst
|
|
145
|
+
#import "@preview/touying:0.6.1": *
|
|
146
|
+
#import themes.simple: *
|
|
147
|
+
|
|
148
|
+
#show: simple-theme.with(aspect-ratio: "16-9")
|
|
149
|
+
#set text(font: "Inter", size: 22pt)
|
|
150
|
+
|
|
151
|
+
= Architecture Trade-offs
|
|
152
|
+
|
|
153
|
+
== State Isolation
|
|
154
|
+
|
|
155
|
+
- Keep domain logic pure. #pause
|
|
156
|
+
- Push rendering and I/O to edges.
|
|
157
|
+
|
|
158
|
+
#speaker-note[Walk through the single failure trace from last week's incident.]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Rules:
|
|
162
|
+
|
|
163
|
+
- pin `@preview/touying` or `@preview/polylux` versions and bundle fonts via `typst compile --font-path ./fonts`;
|
|
164
|
+
- generate both presenter deck (with `#pause` progressive reveals) and static handout mode (`config-common(handout: true)` in Touying) so PDF readers do not click through 80 duplicate build frames;
|
|
165
|
+
- inspect exported PDF metadata, selectable text, and contrast at projection scale.
|
|
166
|
+
|
|
167
|
+
## Marp
|
|
168
|
+
|
|
169
|
+
Marp uses Markdown with directives in frontmatter:
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
---
|
|
173
|
+
marp: true
|
|
174
|
+
theme: default
|
|
175
|
+
paginate: true
|
|
176
|
+
size: 16:9
|
|
177
|
+
---
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Rules:
|
|
181
|
+
|
|
182
|
+
- choose or create a theme CSS (`--theme-set`) rather than accepting default typography by accident;
|
|
183
|
+
- use directives consistently (`paginate`, `header`, `footer`, `size`) and inspect actual output via `npx @marp-team/marp-cli deck.md --pdf --allow-local-files`;
|
|
184
|
+
- keep Markdown semantic; do not inject fragile raw HTML/CSS on every slide;
|
|
185
|
+
- test image resolution, math/syntax highlighting, and font availability in CI export containers.
|
|
186
|
+
|
|
187
|
+
## Export and live verification
|
|
188
|
+
|
|
189
|
+
- inspect slides at 100% authored frame and projected/scaled size (`rendered`);
|
|
190
|
+
- test first/middle/last slides, overflow, long titles, missing images/fonts, offline assets, presenter notes, and laser/pointer contrast;
|
|
191
|
+
- export PDF/PPTX/video using the real pipeline and inspect frame edges;
|
|
192
|
+
- verify embedded fonts/licenses (`pdffonts`) where applicable;
|
|
193
|
+
- test with a clicker/keyboard path rather than assuming mouse control;
|
|
194
|
+
- label accessibility and export verification honestly (`rendered` versus `not-checked`).
|
|
195
|
+
|
|
196
|
+
## Anti-slop warnings
|
|
197
|
+
|
|
198
|
+
Reject bullet-only decks, gradient title templates with no content hierarchy, unreadable full-screen screenshots, decorative 3D transitions, six-column agenda fragments, tiny chart axes copied from dashboards, and logo watermarks consuming safe area. Distinctiveness should come from editorial clarity, image choice, scale, timing, and domain-specific visual evidence.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pixelcraft-email
|
|
3
|
+
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into email that survives real clients. Use for HTML email, table-based email, MJML, React Email, Maizzle, Vue Email, Resend, Loops, AMP for Email, BIMI, transactional messages, newsletters, onboarding email, Outlook, Gmail clipping, dark mode, image blocking, plaintext parity, accessibility, localization, responsive behavior, client quirks, and deliverability-conscious design.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pixelcraft email
|
|
10
|
+
|
|
11
|
+
Use this skill when the rendering surface is an email client. Email is not the modern web: CSS support is fragmented, images may be blocked, dark mode may mutate colors, and forwarding/clipping/rendering are outside your control.
|
|
12
|
+
|
|
13
|
+
## Surface craft
|
|
14
|
+
|
|
15
|
+
Make the subject and opening live text state who sent the message, why it matters and what to do next; use image-led moments only if the same path survives images off. Inspect a sent message in representative clients, with dark mode, narrow width and plain-text fallback. An attractive browser preview does not prove that email clients preserve contrast or links.
|
|
16
|
+
|
|
17
|
+
## Detection signals
|
|
18
|
+
|
|
19
|
+
`.mjml`, React Email / Vue Email / Svelte Email packages, `maizzle.config.*`, table-heavy HTML email, inline CSS tooling, ESP templates (Resend, Loops, Postmark, Stripo), plaintext templates, MIME generation, email screenshots/previews, localization catalogs.
|
|
20
|
+
|
|
21
|
+
## Translate direction with constrained fidelity
|
|
22
|
+
|
|
23
|
+
1. Preserve concept through hierarchy, typography fallback, spacing, real copy, restrained color, and signature structure—not fragile pixel precision.
|
|
24
|
+
2. Map tokens manually into inline/table-compatible values or generator constants. CSS variables are unreliable across clients.
|
|
25
|
+
3. Choose implementation: hand-written tables for maximum control, MJML for responsive abstraction, React Email (or Vue/Svelte Email) for component workflow, or Maizzle for Tailwind CSS inlining and purging. Do not pretend they produce identical client support automatically.
|
|
26
|
+
4. Design image-off and plaintext as first-class variants, not fallbacks written afterward.
|
|
27
|
+
5. Use progressive enhancement: modern clients may receive polish; baseline must remain readable/actionable everywhere.
|
|
28
|
+
|
|
29
|
+
## Platform-wide rules
|
|
30
|
+
|
|
31
|
+
- **Zero external dependency for core meaning**: primary message and CTA must work without images, custom fonts, CSS backgrounds, animation, JavaScript, forms, or exact viewport control.
|
|
32
|
+
- **Pre-ESP HTML & `<style>` byte budgets + `GANGA` inline survival**: keep pre-ESP compiled HTML **`< 85–90 KB` target** (`< 80 KB` ideal headroom before ESP click-tracking link wrapping hits Gmail's **`102 KB`** hard clip); keep `<style>` **`<= 8–16 KB`** with **zero modern CSS (`@layer`, `@property`, CSS nesting)** inside `<style>` (any unsupported syntax causes Gmail to strip the **entire** `<style>` block!); and ensure **Gmail Non-Google Account (`GANGA` IMAP/POP)** survival where `<style>` is stripped completely so layout and `>= 4.5:1` contrast hold on inline CSS alone.
|
|
33
|
+
- **Merge-tag fallbacks, descriptive links & Dual-Engine CTAs**: define **explicit personalization merge-tag fallbacks** (e.g., `{{ first_name | default: "there" }}`—never rendering raw `{{name}}` or blank awkward gaps); write **self-describing link text** (**never `"click here"`**); pair `<!--[if mso]><v:roundrect>` with `<!--[if !mso]><!--><table role="presentation"><tr><td bgcolor="..." style="border-radius:..."><a>` for Classic + New Outlook; and pad hidden preheaders with 50–90 repeats (`~140+` chars) of `͏‌ `.
|
|
34
|
+
- **3-Regime Dark Mode survival**: design simultaneously for (1) **No change**, (2) **Partial inversion / CSS opt-in** (`Apple Mail`, `Outlook.com` / `New Outlook`, `Gmail iOS`), and (3) **Full forced inversion** (`Gmail Android`, `Classic Outlook Windows`). Declare `color-scheme: light dark`, wire `.light-img`/`.dark-img` swaps where supported, and add a **subtle light keyline/halo (`1–2px`) or translucent pill** around dark logos/icons so forced `#121212` backgrounds never swallow brand marks.
|
|
35
|
+
- **2025–2026 Bulk Sender Mandate (Gmail, Yahoo, Outlook.com)**:
|
|
36
|
+
- Authenticate with aligned **`SPF` + `DKIM` (`>= 2048-bit`) + `DMARC` (`p=quarantine` or `p=reject`)**; optionally add **`BIMI`** (`SVG Tiny-PS` + VMC/CMC) for verified sender avatars.
|
|
37
|
+
- Include **`List-Unsubscribe` + `List-Unsubscribe-Post: List-Unsubscribe=One-Click` (`RFC 8058`)** honored within **`<= 48h` with zero login wall** on all promotional/bulk mail, and keep transactional mail (receipts, OTPs, security alerts) strictly free of marketing upsells.
|
|
38
|
+
- Hold Postmaster spam complaint rates **`< 0.10%` target** (**`0.30%` hard block**).
|
|
39
|
+
- Account for **Apple Mail Privacy Protection (MPP)** proxy pre-fetches: never treat open pixels as human reads or gate workflows on opens; measure clicks, replies, and conversions.
|
|
40
|
+
- **Plaintext & accessibility parity**: ship a complete `text/plain` MIME companion matching HTML order, URLs, dates, and unsubscribe/legal text; set `lang`, `dir`, `<title>`, semantic `<h1>`–`<h3>`/`<p>`, `alt` text, descriptive anchor copy, and `role="presentation"` on every layout `<table>`.
|
|
41
|
+
|
|
42
|
+
## Anti-lazy-default & anti-slop guard
|
|
43
|
+
|
|
44
|
+
- **Never paste modern-CSS web layouts into email**: raw `display: flex`, CSS Grid, `position: fixed`, CSS custom properties, `@layer`/`@property`/nesting inside `<style>`, and uninlined utility sheets shatter in Classic Outlook, strip Gmail `<style>` blocks, fail `GANGA` IMAP/POP clients, and bloat past Gmail's `102 KB` clip threshold.
|
|
45
|
+
- **Pick an explicit email pipeline first**: commit to **MJML**, **React Email**, **Maizzle**, or hand-authored **HTML tables** (with MSO conditional comments) before writing markup.
|
|
46
|
+
- **Reject image-only hero blasts and bare `<a>` buttons**: never hide headlines, dates, prices, or CTAs inside a raster banner, never write vague `"click here"` links, and never ship a bare `<a style="padding:...">` CTA whose hit area and fill collapse in Classic Outlook.
|
|
47
|
+
|
|
48
|
+
## Common email failures
|
|
49
|
+
|
|
50
|
+
- beautiful hero image containing all essential copy, or generic `"click here"` link text;
|
|
51
|
+
- raw `{{name}}` merge tags leaking when recipient profile fields are null/empty;
|
|
52
|
+
- `@layer`, `@property`, or CSS nesting inside `<style>` causing Gmail to strip the entire `<style>` block, or uninlined styles collapsing in `GANGA` (IMAP/POP);
|
|
53
|
+
- bare `<a>` or VML-only CTA breaking in Classic Outlook or vanishing in New Outlook;
|
|
54
|
+
- dark logo/icon vanishing on forced `#121212` dark-mode backgrounds (`Gmail Android` / `Outlook Windows`);
|
|
55
|
+
- short 3-repeat preheader spacer leaking `"View in browser"` into 120-char inbox snippets;
|
|
56
|
+
- promotional mail missing `RFC 8058` one-click unsubscribe headers or gating unsubscribe behind a login wall;
|
|
57
|
+
- HTML exceeding `< 85–90 KB` pre-ESP (`102 KB` post-ESP) and clipping legal/unsubscribe footers, or missing `text/plain` parity.
|
|
58
|
+
|
|
59
|
+
## Verification options
|
|
60
|
+
|
|
61
|
+
Run `check-email.mjs` (`pixelcraft-visual-qa`) on compiled HTML + `text/plain` (`static`), then render across representative real clients or preview rigs (including `<style>`-stripped `GANGA` mode, all 3 dark-mode regimes, narrow mobile width, null-merge-tag fixture, and images-off mode) (`rendered`; **Rule #0.3** forbids counting browser-tab or `static` checks as client-rendered `pass`). Label untested clients `not-checked`.
|
|
62
|
+
|
|
63
|
+
## Pre-submit checklist
|
|
64
|
+
|
|
65
|
+
- [ ] zero `TODO`s, placeholder copy, raw `{{merge}}` leaks (**merge-tag fallbacks tested with null/empty data**), `"click here"` links, or dead CTA/unsubscribe URLs;
|
|
66
|
+
- [ ] explicit email pipeline used (MJML, React Email, Maizzle, or tested HTML tables)—no Flexbox/Grid/`var(--)` web markup;
|
|
67
|
+
- [ ] pre-ESP HTML **`< 85–90 KB` target** (`< 102 KB` post-ESP hard cap), `<style>` **`<= 8–16 KB`** with **zero `@layer` / `@property` / CSS nesting**, **`GANGA` (`<style>`-stripped) inline survival**, and `~140+`-char padded preheader (`50–90` `͏‌ ` repeats);
|
|
68
|
+
- [ ] Bulletproof Dual-Engine CTA (`<!--[if mso]><v:roundrect>` + `<td bgcolor>` HTML `<a>`) survives Classic & New Outlook;
|
|
69
|
+
- [ ] primary message, logos (with light halo/pill or `.dark-img` swap), descriptive links, and CTA survive images off and all 3 dark-mode regimes;
|
|
70
|
+
- [ ] bulk/promotional headers (`SPF`/`DKIM >= 2048-bit`/`DMARC`, `RFC 8058` one-click unsubscribe `<= 48h` no-login, `< 0.10%` complaint design, MPP-safe analytics) addressed;
|
|
71
|
+
- [ ] full `text/plain` MIME parity, `lang`/`dir`/`<title>`, and `role="presentation"` on every layout `<table>`;
|
|
72
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-email.mjs --plaintext --headers`, 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/client/a11y per `Rule #0.3`).
|
|
73
|
+
|
|
74
|
+
## Framework routing
|
|
75
|
+
|
|
76
|
+
- Read [references/html-tables.md](references/html-tables.md) for hand-authored table-based HTML email, Bulletproof Dual-Engine CTAs, and `< 80 KB` byte discipline.
|
|
77
|
+
- Read [references/mjml.md](references/mjml.md) for MJML.
|
|
78
|
+
- Read [references/react-email.md](references/react-email.md) for React Email.
|
|
79
|
+
- Read [references/maizzle.md](references/maizzle.md) for Maizzle (Tailwind CSS email build pipeline, inlining, purging, and Outlook parity).
|
|
80
|
+
- Read [references/client-quirks.md](references/client-quirks.md) whenever targeting Outlook, Gmail, Apple Mail, the 3-regime dark-mode matrix, 2025–2026 bulk-sender mandates, image blocking, clipping, or plaintext behavior.
|