@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +1 -1
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +15 -4
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/README.md +185 -328
- package/SECURITY.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/bin/pixelcraft.mjs +431 -23
- package/docs/ARCHITECTURE.md +40 -37
- package/docs/DESIGN-RATIONALE.md +51 -3
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +16 -6
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/pixelcraft-accessibility.md +17 -0
- package/evals/pixelcraft-craft.md +16 -0
- package/evals/pixelcraft-dataviz.md +3 -3
- package/evals/pixelcraft-direction.md +17 -0
- package/evals/pixelcraft-game-ui.md +3 -3
- package/evals/pixelcraft-mobile.md +3 -3
- package/evals/pixelcraft-patterns.md +16 -0
- package/evals/pixelcraft-plan.md +65 -3
- package/evals/pixelcraft-review.md +3 -3
- package/evals/pixelcraft-visual-qa.md +11 -5
- package/evals/pixelcraft-web.md +21 -3
- package/evals/pixelcraft.md +4 -4
- package/gemini-extension.json +3 -2
- package/install.ps1 +57 -11
- package/install.sh +82 -7
- package/package.json +32 -4
- package/plugin.json +6 -1
- package/scripts/build-adapters.mjs +11 -13
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +14 -1
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +86 -7
- package/scripts/test-export-tokens.mjs +259 -3
- package/scripts/test-finish-gate.mjs +133 -10
- package/scripts/test-installers.mjs +155 -6
- package/scripts/test-shoot.mjs +23 -1
- package/scripts/test-slop-scan.mjs +390 -3
- package/scripts/test-style-inventory.mjs +23 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +82 -4
- package/scripts/validate-skills.mjs +149 -3
- package/skills/pixelcraft/SKILL.md +67 -47
- package/skills/pixelcraft/references/design-brief.md +2 -2
- package/skills/pixelcraft/references/floor.md +36 -19
- package/skills/pixelcraft/references/report-template.md +25 -11
- package/skills/pixelcraft/references/stack-detection.md +138 -67
- package/skills/pixelcraft/references/surface-acceptance.md +33 -21
- package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
- package/skills/pixelcraft-accessibility/SKILL.md +34 -13
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
- package/skills/pixelcraft-accessibility/references/verification.md +15 -10
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
- package/skills/pixelcraft-brandkit/SKILL.md +42 -30
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
- package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
- package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
- package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
- package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
- package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
- package/skills/pixelcraft-constrained/SKILL.md +21 -20
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
- package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
- package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
- package/skills/pixelcraft-craft/SKILL.md +29 -15
- package/skills/pixelcraft-craft/references/color.md +62 -6
- package/skills/pixelcraft-craft/references/layout.md +32 -0
- package/skills/pixelcraft-craft/references/motion.md +99 -12
- package/skills/pixelcraft-craft/references/typography.md +48 -9
- package/skills/pixelcraft-data-apps/SKILL.md +50 -31
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +87 -31
- package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
- package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
- package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
- package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
- package/skills/pixelcraft-data-apps/references/panel.md +69 -23
- package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
- package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
- package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
- package/skills/pixelcraft-dataviz/SKILL.md +21 -24
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
- package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
- package/skills/pixelcraft-desktop/SKILL.md +61 -39
- package/skills/pixelcraft-desktop/references/appkit.md +60 -26
- package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
- package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
- package/skills/pixelcraft-desktop/references/electron.md +68 -26
- package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
- package/skills/pixelcraft-desktop/references/gtk.md +74 -31
- package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
- package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
- package/skills/pixelcraft-desktop/references/tauri.md +80 -24
- package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
- package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
- package/skills/pixelcraft-desktop/references/working-context.md +82 -3
- package/skills/pixelcraft-direction/SKILL.md +48 -82
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +11 -1
- package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +3 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
- package/skills/pixelcraft-document/SKILL.md +27 -23
- package/skills/pixelcraft-document/references/archetypes.md +27 -4
- package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +96 -43
- package/skills/pixelcraft-document/references/slides.md +123 -27
- package/skills/pixelcraft-email/SKILL.md +42 -20
- package/skills/pixelcraft-email/references/client-quirks.md +101 -33
- package/skills/pixelcraft-email/references/html-tables.md +83 -22
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +13 -11
- package/skills/pixelcraft-email/references/react-email.md +76 -34
- package/skills/pixelcraft-extensions/SKILL.md +32 -27
- package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
- package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +90 -11
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
- package/skills/pixelcraft-game-ui/SKILL.md +45 -26
- package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
- package/skills/pixelcraft-game-ui/references/godot.md +100 -27
- package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
- package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
- package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +14 -13
- package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +20 -23
- package/skills/pixelcraft-media/references/banners-video.md +83 -65
- package/skills/pixelcraft-media/references/og-generation.md +110 -63
- package/skills/pixelcraft-media/references/social-cards.md +57 -58
- package/skills/pixelcraft-mobile/SKILL.md +53 -36
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
- package/skills/pixelcraft-mobile/references/flet.md +53 -26
- package/skills/pixelcraft-mobile/references/flutter.md +76 -32
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
- package/skills/pixelcraft-mobile/references/kivy.md +54 -31
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
- package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
- package/skills/pixelcraft-mobile/references/uikit.md +57 -23
- package/skills/pixelcraft-patterns/SKILL.md +30 -13
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +35 -16
- package/skills/pixelcraft-patterns/references/communication.md +34 -15
- package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +31 -19
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/settings.md +40 -12
- package/skills/pixelcraft-plan/SKILL.md +54 -18
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +44 -9
- package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
- package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
- package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
- package/skills/pixelcraft-review/SKILL.md +41 -19
- package/skills/pixelcraft-review/references/audit-report.md +20 -1
- package/skills/pixelcraft-review/references/heuristics.md +63 -18
- package/skills/pixelcraft-review/references/personas.md +41 -14
- package/skills/pixelcraft-review/references/polish.md +66 -26
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
- package/skills/pixelcraft-spatial/SKILL.md +16 -17
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
- package/skills/pixelcraft-spatial/references/platforms.md +123 -53
- package/skills/pixelcraft-tokens/SKILL.md +18 -14
- package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
- package/skills/pixelcraft-tokens/references/format.md +39 -9
- package/skills/pixelcraft-tokens/references/governance.md +1 -1
- package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
- package/skills/pixelcraft-tui/SKILL.md +41 -25
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +77 -28
- package/skills/pixelcraft-tui/references/ratatui.md +70 -30
- package/skills/pixelcraft-tui/references/rich.md +53 -33
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +75 -34
- package/skills/pixelcraft-ux/SKILL.md +22 -12
- package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
- package/skills/pixelcraft-ux/references/forms.md +57 -3
- package/skills/pixelcraft-ux/references/i18n.md +50 -12
- package/skills/pixelcraft-ux/references/laws.md +35 -14
- package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
- package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
- package/skills/pixelcraft-web/SKILL.md +105 -49
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
- package/skills/pixelcraft-web/references/angular.md +63 -16
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +64 -13
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +52 -17
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +144 -12
- package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +27 -18
- package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
- package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
- package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +6 -1
- package/skills/pixelcraft-web/references/qwik.md +51 -11
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +112 -13
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +106 -63
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +67 -16
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -11
- package/skills/pixelcraft-web/references/tailwind.md +40 -14
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -1,60 +1,86 @@
|
|
|
1
1
|
# Kotlin Multiplatform / Compose Multiplatform
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Architecture decision: shared logic + native UI vs shared UI
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Decide the sharing boundary explicitly before writing screens:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
| Dimension | KMP shared logic + native SwiftUI / Compose UI | Compose Multiplatform shared UI (iOS Stable 1.8+, Android, Desktop, Web) |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Platform fidelity** | Full access to iOS 26 Liquid Glass, SwiftUI `TabSection`, UIKit, and Android Material 3 Expressive natively. | High shared velocity via Skiko/Metal on iOS and native Compose on Android; iOS-specific chrome/materials require intentional platform adaptation or `UIKitView` interop. |
|
|
10
|
+
| **Swift interop** | Use **SKIE** (Touchlab) or **Kotlin Swift Export** so Kotlin `sealed class`, `Flow`, `suspend`, and default arguments feel idiomatic in Swift. | Minimal Swift surface needed (thin iOS host `ComposeUIViewController` + platform `expect`/`actual` bridges). |
|
|
11
|
+
| **Best fit** | Flagship consumer apps prioritizing native platform craft and separate iOS/Android UI teams. | Product/B2B/cross-platform apps prioritizing one UI codebase across Android, iOS, and Desktop with one Kotlin team. |
|
|
12
|
+
|
|
13
|
+
## Token mapping & Compose Resources (`Res.*`)
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Share semantic colors, spacing, typography scales, and typed assets in `commonMain`. Use **Compose Multiplatform Resources** (`composeResources/` generating `Res.string.*`, `Res.drawable.*`, `Res.font.*`) for localized strings, vector drawables, and bundled fonts:
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
```kotlin
|
|
18
|
+
// commonMain
|
|
19
|
+
object PcTokens {
|
|
20
|
+
val action = Color(0xFF0074CA)
|
|
21
|
+
val controlInline = 12.dp
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Composable
|
|
25
|
+
fun InvoiceHeader() {
|
|
26
|
+
Text(
|
|
27
|
+
text = stringResource(Res.string.invoices_title),
|
|
28
|
+
fontFamily = FontFamily(Font(Res.font.brand_semibold)),
|
|
29
|
+
color = MaterialTheme.colorScheme.onSurface,
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
```
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
Keep platform capabilities (haptics, biometrics, system reduced-motion, file pickers, dynamic platform colors) behind narrow `expect`/`actual` interfaces—never fake a single universal implementation where platforms diverge.
|
|
16
35
|
|
|
17
|
-
##
|
|
36
|
+
## Layout, Navigation, ViewModel, & Compose Hot Reload
|
|
18
37
|
|
|
19
|
-
|
|
38
|
+
- **Compose Multiplatform for iOS (Stable 1.8+)** supports native iOS predictive swipe-back gestures, platform scroll physics, `UIKitView` / `UIKitViewController` embedding, and safe-area insets (`WindowInsets.safeDrawing`). Still adapt navigation patterns per host (tab bar/back stack on mobile, split pane/menu bar on Desktop).
|
|
39
|
+
- Share navigation and lifecycle cleanly using JetBrains' multiplatform libraries: **`org.jetbrains.androidx.navigation:navigation-compose`**, **`lifecycle-viewmodel-compose`**, and **`SavedStateHandle`** in `commonMain`.
|
|
40
|
+
- Use **Compose Hot Reload** (JetBrains JVM desktop plugin/runtime) during UI iteration to inspect layout and state changes live without restarting the app—remember JVM desktop hot reload does not replace iOS Simulator or Android device verification.
|
|
20
41
|
|
|
21
|
-
##
|
|
42
|
+
## Kotlin/Wasm (`wasmJs`) & Desktop targets
|
|
22
43
|
|
|
23
|
-
|
|
44
|
+
- **Desktop (JVM)**: pair shared composables with desktop rules in `pixelcraft-desktop` (window minimum size, native menu bar, keyboard shortcuts, `F6` focus traversal, multi-monitor restore).
|
|
45
|
+
- **Web (`wasmJs` / WasmGC)**: Compose Multiplatform for Web renders onto HTML Canvas via Skiko/WasmGC (requires WasmGC-capable browsers). Like Flutter Web, canvas UI trades off native DOM semantics, SEO, and text-selection ergonomics; verify browser accessibility and compare a DOM surface in `pixelcraft-web` / `pixelcraft-plan` for public web products.
|
|
24
46
|
|
|
25
|
-
##
|
|
47
|
+
## Typography, motion, & reduced motion
|
|
26
48
|
|
|
27
|
-
|
|
49
|
+
Load custom fonts via `Res.font.*` and test glyph fallback and text scaling on **every** target (`sp` on Android, Dynamic Type on iOS, OS display scaling on Desktop).
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
Expose reduced-motion detection via an `expect` composable/provider (`Settings.Global.ANIMATOR_DURATION_SCALE == 0f` on Android; `UIAccessibilityIsReduceMotionEnabled()` on iOS; app toggle/OS query on Desktop) and switch transitions to instant/opacity updates when enabled.
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
## Accessibility, states, & forms idioms
|
|
32
54
|
|
|
33
|
-
|
|
55
|
+
Compose `Modifier.semantics` bridges to TalkBack (Android), VoiceOver (iOS accessibility tree), and desktop accessibility APIs, but traversal order, announcements, and custom actions still differ across targets—shared UI does **not** mean shared accessibility verification.
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
Own async work in multiplatform `ViewModel` (`viewModelScope` with structured coroutine cancellation and explicit `Dispatchers` injection). Use `TextFieldState` / Compose forms with per-platform testing for IME composition, autofill, password managers, paste, and hardware keyboards.
|
|
36
58
|
|
|
37
59
|
## Do/don't pairs
|
|
38
60
|
|
|
39
61
|
| Do | Don't |
|
|
40
62
|
|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
63
|
+
| Isolate reduced motion, haptics, and native pickers behind `expect`/`actual` | Pretend Android, iOS, and Desktop expose identical OS accessibility hooks |
|
|
64
|
+
| Use `Res.string.*` / `Res.font.*` from `composeResources/` | Duplicate raw strings and font bundles manually across Android and Xcode targets |
|
|
65
|
+
| Use SKIE or Kotlin Swift Export when exposing KMP logic to SwiftUI | Force SwiftUI views to consume awkward ObjC-erased `Flow` / sealed-class wrappers |
|
|
66
|
+
| Adapt chrome/navigation per platform (`pixelcraft-desktop` for JVM Desktop) | Ship a phone bottom tab bar unchanged inside a 1440px macOS window |
|
|
67
|
+
| Verify VoiceOver, TalkBack, and IME on each shipped OS | Assume one passing Android Compose test proves iOS and Desktop parity |
|
|
46
68
|
|
|
47
69
|
## Known traps
|
|
48
70
|
|
|
49
|
-
|
|
71
|
+
Coroutine cancellation/dispatcher mismatches when bridging Kotlin `suspend`/`Flow` into Swift concurrency, Compose/Kotlin/Skiko version matrix misalignment, `UIKitView` touch/z-order interop clipping, platform-specific IME & paste bugs, font fallback differences across Android/iOS/Desktop/Wasm, unverified iOS VoiceOver traversal order, oversized Wasm bundle startup on slow mobile networks.
|
|
50
72
|
|
|
51
73
|
## Verification commands
|
|
52
74
|
|
|
53
75
|
```sh
|
|
54
76
|
./gradlew build
|
|
55
77
|
./gradlew test
|
|
56
|
-
|
|
57
|
-
./gradlew
|
|
78
|
+
# Target-specific checks (run when matching SDK/toolchain is installed):
|
|
79
|
+
./gradlew :composeApp:lintDebug
|
|
80
|
+
./gradlew :composeApp:connectedDebugAndroidTest
|
|
81
|
+
./gradlew :composeApp:desktopTest
|
|
82
|
+
# For iOS targets on macOS:
|
|
83
|
+
xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -destination 'platform=iOS Simulator,name=<SimulatorName>' build
|
|
58
84
|
```
|
|
59
85
|
|
|
60
|
-
|
|
86
|
+
Gradle builds and unit tests are `static` evidence. Capture simulator/device/desktop runs across VoiceOver, TalkBack, font scaling, dark mode, safe areas, and back gestures for `rendered` evidence; mark unavailable OS targets `not-checked`.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Lynx / LynxJS (`@lynx-js/react`)
|
|
2
|
+
|
|
3
|
+
Use **Lynx** when shipping React + CSS interfaces built with **`@lynx-js/rspeedy`** (Rspack-based bundler) that compile to **native iOS, Android, HarmonyOS, and Web views** over a dual-threaded engine (no WebView wrapper).
|
|
4
|
+
|
|
5
|
+
## Dual-thread mental model
|
|
6
|
+
|
|
7
|
+
- **Background thread (default)**: React reconciliation, state updates, `useEffect`, standard `useRef`, network calls, and ordinary event handlers (`bindtap`, `bindscroll`) run off the UI thread so business logic does not drop frames.
|
|
8
|
+
- **Main Thread Scripting (MTS)**: high-frequency gestures, scroll-linked motion, and drag physics run synchronously on the main thread via the `"main thread";` directive, `useMainThreadRef`, `runOnMainThread`, and `main-thread:bind*` handlers (`main-thread:bindtouchmove`, `main-thread:bindscroll`). Commit gesture outcomes back to React state with **`runOnBackground`**.
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { runOnBackground, useMainThreadRef } from '@lynx-js/react';
|
|
12
|
+
import type { MainThread } from '@lynx-js/types';
|
|
13
|
+
|
|
14
|
+
export function TactileCard({ onCommit }: { onCommit: (dx: number) => void }) {
|
|
15
|
+
const cardRef = useMainThreadRef<MainThread.Element>(null);
|
|
16
|
+
|
|
17
|
+
function onTouchEnd(e: MainThread.TouchEvent) {
|
|
18
|
+
'main thread';
|
|
19
|
+
const dx = e.detail.x;
|
|
20
|
+
runOnBackground(onCommit)(dx);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<view
|
|
25
|
+
className="card"
|
|
26
|
+
accessibility-element={true}
|
|
27
|
+
accessibility-label="Open order 4821"
|
|
28
|
+
main-thread:ref={cardRef}
|
|
29
|
+
main-thread:bindtouchend={onTouchEnd}
|
|
30
|
+
>
|
|
31
|
+
<text className="card-title">Order #4821</text>
|
|
32
|
+
</view>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Token mapping
|
|
38
|
+
|
|
39
|
+
Lynx parses real CSS—export DTCG semantic tokens into CSS custom properties and switch light/dark/high-contrast themes via a root theme class or host-injected theme attribute:
|
|
40
|
+
|
|
41
|
+
```css
|
|
42
|
+
:root {
|
|
43
|
+
--pc-action: #0074ca;
|
|
44
|
+
--pc-surface: #ffffff;
|
|
45
|
+
--pc-space-inline: 12px;
|
|
46
|
+
}
|
|
47
|
+
.theme-dark {
|
|
48
|
+
--pc-action: #5bb2ff;
|
|
49
|
+
--pc-surface: #121417;
|
|
50
|
+
}
|
|
51
|
+
.card {
|
|
52
|
+
background-color: var(--pc-surface);
|
|
53
|
+
padding: var(--pc-space-inline);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Do not duplicate raw hex literals across component stylesheets or inline `style={{ ... }}` objects.
|
|
58
|
+
|
|
59
|
+
## Layout and responsive idioms
|
|
60
|
+
|
|
61
|
+
- Author strictly with Lynx native primitives (`<view>`, `<text>`, `<image>`, `<scroll-view>`, `<list>`, `<list-item>`)—browser tags (`<div>`, `<button>`, `<a>`) and DOM globals (`window`, `document`) do **not** exist in native Lynx runtimes.
|
|
62
|
+
- Use CSS Flexbox, Grid, and Linear layout. Consume host-provided safe-area insets (injected via `lynx.__globalProps` / native bridge or CSS env where supported by host) so headers and bottom actions clear notches, home indicators, and Android 15/16 gesture bars.
|
|
63
|
+
- Always virtualize long feeds/grids with `<list>` + `<list-item item-key={id} estimated-main-axis-size-px={...}>` for native view recycling instead of mapping hundreds of `<view>` nodes inside `<scroll-view>`.
|
|
64
|
+
|
|
65
|
+
## Typography & custom fonts
|
|
66
|
+
|
|
67
|
+
Register custom font files via `@font-face` / host resource loader (packaged in the bundle or native app assets so they work offline) and define fallback families. Respect host OS font scaling (`sp` / Dynamic Type forwarded by the Lynx host configuration) and avoid fixed `height` on `<view>` rows containing wrapped `<text>`.
|
|
68
|
+
|
|
69
|
+
## Motion & reduced motion
|
|
70
|
+
|
|
71
|
+
Drive discrete state transitions with CSS `transition` / `@keyframes`, and continuous gesture-driven physics on the main thread via MTS (`setStyleProperty` on `MainThread.Element`). Pass the host OS reduced-motion setting into initial props or a native module query so both CSS transitions and MTS spring/drag animations degrade to instant/opacity changes when reduced motion is active.
|
|
72
|
+
|
|
73
|
+
## Accessibility specifics
|
|
74
|
+
|
|
75
|
+
Lynx `<view>` elements are non-semantic by default. Expose explicit native accessibility metadata on every interactive or composite element:
|
|
76
|
+
|
|
77
|
+
- `accessibility-element={true}` to make a control focusable by VoiceOver / TalkBack,
|
|
78
|
+
- `accessibility-label="..."` for clear screen-reader names (never rely on an icon `<image>` alone),
|
|
79
|
+
- `accessibility-traits` (`"button"`, `"header"`, `"link"`, `"none"`, etc.) and `accessibility-elements` ordering where composite cards group children.
|
|
80
|
+
|
|
81
|
+
Verify minimum hit targets (`44×44 pt` iOS / `48×48 dp` Android) and real VoiceOver/TalkBack traversal inside the host native app.
|
|
82
|
+
|
|
83
|
+
## States & forms idioms
|
|
84
|
+
|
|
85
|
+
Keep authoritative async state (`loading`, `empty`, `error`, `offline`, `optimistic`) on the background React thread; use MTS only for immediate tactile response and reconcile back through `runOnBackground` with rollback on failure.
|
|
86
|
+
|
|
87
|
+
**Native input caveats**: Lynx core intentionally ships a lean primitive set—rich `<input>`, multiline text areas, date pickers, and IME composition often rely on host-registered custom native elements (`<x-input>` or `@lynx-js` element extensions). Verify focus handling, keyboard avoidance, IME/CJK composition, paste, autofill, and accessible error announcements on **both** iOS and Android host shells before shipping complex forms.
|
|
88
|
+
|
|
89
|
+
## Do/don't pairs
|
|
90
|
+
|
|
91
|
+
| Do | Don't |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Run drag/scroll animations in `"main thread";` and commit via `runOnBackground` | Round-trip every `touchmove` pixel through background React state |
|
|
94
|
+
| Use `<list>` + `<list-item item-key=...>` for long feeds | Render hundreds of unrecycled `<view>` nodes inside `<scroll-view>` |
|
|
95
|
+
| Add `accessibility-element={true}` + `accessibility-label` + `accessibility-traits` | Treat a bare `<view bindtap={...}>` as an accessible button |
|
|
96
|
+
| Verify host-provided native input elements for IME, paste, and keyboard avoidance | Assume browser `<input>` / DOM validation APIs exist natively |
|
|
97
|
+
| Pass reduced-motion and safe-area insets from the host shell | Hard-code notch padding or ignore OS accessibility settings |
|
|
98
|
+
|
|
99
|
+
## Known traps
|
|
100
|
+
|
|
101
|
+
Calling background-only JS APIs or React hooks inside `"main thread";` functions, assuming browser `window`/`document` globals exist, forgetting `accessibility-element={true}` on interactive `<view>`s, missing custom native `<input>` registrations in the host iOS/Android shell, unrecycled `<scroll-view>` memory spikes, safe-area or font-scale clipping from fixed pixel row heights.
|
|
102
|
+
|
|
103
|
+
## Verification commands
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
npx rspeedy build
|
|
107
|
+
npm run test -- --watch=false
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`npx rspeedy build` verifies dual-thread bundle compilation (`static`). Inspect the compiled bundle inside **Lynx Explorer** or the real iOS/Android host app build for gesture frame pacing, VoiceOver/TalkBack tree, safe-area insets, dark mode, reduced motion, and native input IME behavior (`rendered`; label untested native hosts `not-checked`).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# NativeScript and Skip (`skip.tools`)
|
|
2
|
+
|
|
3
|
+
Use this reference when targeting native iOS and Android UI via either **NativeScript** (direct JS/TS runtime marshaling to native platform APIs without a WebView) or **Skip** (Swift + SwiftUI apps targeting both iOS natively and Android via Jetpack Compose).
|
|
4
|
+
|
|
5
|
+
## Architecture decision table
|
|
6
|
+
|
|
7
|
+
| Approach | Language & UI authoring | Android runtime & UI | iOS runtime & UI | Best fit | Primary trade-off |
|
|
8
|
+
|---|---|---|---|---|---|
|
|
9
|
+
| **NativeScript** | TS/JS + Core XML, Angular, Vue, Solid, or Svelte | V8 runtime calling Android Java/Kotlin Views directly | V8/JavaScriptCore calling UIKit/ObjC/Swift APIs directly | Web/TS teams needing direct zero-bridge-boilerplate access to native iOS/Android SDKs without React Native's layer | Smaller widget ecosystem than RN/Flutter; platform layout differences require explicit testing |
|
|
10
|
+
| **Skip Lite** | Swift + SwiftUI | Transpiles Swift → Kotlin and SwiftUI → Material 3 Jetpack Compose (`skip-ui`) | 100% unmodified native Swift/SwiftUI | Apple-first SwiftUI teams shipping a true native Android Material 3 app with zero Android runtime overhead | Transpiled Swift subset (no arbitrary C/Swift-only binary deps without Kotlin equivalents) |
|
|
11
|
+
| **Skip Fuse** | Swift + SwiftUI | Compiles Swift natively via Swift SDK for Android (JNI) + bridges SwiftUI to Jetpack Compose | 100% unmodified native Swift/SwiftUI | Swift teams needing full Swift stdlib, SwiftPM/C packages, and Swift concurrency on Android alongside native Compose UI | Larger APK size from bundled Swift runtime; native JNI boundary to debug |
|
|
12
|
+
|
|
13
|
+
## NativeScript idioms
|
|
14
|
+
|
|
15
|
+
- **Token mapping**: define CSS custom properties in `app.css` (using `.ns-dark` / `.ns-light` root classes automatically applied by `@nativescript/core` for system theme changes) rather than repeating inline colors in templates.
|
|
16
|
+
- **Direct native interop**: NativeScript exposes native classes directly (`UIImpactFeedbackGenerator`, `android.view.HapticFeedbackConstants`) without writing glue modules—guard platform calls with `isIOS` / `isAndroid` (`@nativescript/core`).
|
|
17
|
+
- **Lists & layout**: use `GridLayout` / `FlexboxLayout` / `StackLayout` with `iosOverflowSafeArea` configured intentionally, and use `ListView` (or `@nativescript-community/ui-collectionview`) for native view recycling—never nest dozens of items inside a `ScrollView`.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { isAndroid, isIOS, Utils } from '@nativescript/core';
|
|
21
|
+
|
|
22
|
+
export function triggerConfirmHaptic(): void {
|
|
23
|
+
if (isIOS) {
|
|
24
|
+
const gen = UINotificationFeedbackGenerator.alloc().init();
|
|
25
|
+
gen.notificationOccurred(UINotificationFeedbackType.Success);
|
|
26
|
+
} else if (isAndroid) {
|
|
27
|
+
const view = Utils.android.getCurrentActivity()?.getWindow()?.getDecorView();
|
|
28
|
+
view?.performHapticFeedback(android.view.HapticFeedbackConstants.CONFIRM);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Accessibility**: set `accessible="true"`, `accessibilityLabel`, `accessibilityRole`, and `accessibilityLiveRegion` on interactive elements; verify VoiceOver and TalkBack because custom gesture-attached `<Label>` or `<StackLayout>` nodes do not announce as buttons automatically.
|
|
34
|
+
|
|
35
|
+
## Skip (`skip.tools`) idioms
|
|
36
|
+
|
|
37
|
+
- **Write idiomatic SwiftUI first**: Skip preserves standard SwiftUI on iOS untouched while mapping `NavigationStack`, `TabView`, `List`, `Form`, `Sheet`, Asset Catalog colors, and `Localizable.xcstrings` onto native Jetpack Compose Material 3 equivalents on Android (`skip-ui`).
|
|
38
|
+
- **Platform escape hatches**: isolate genuine Android-only or iOS-only differences with `#if os(Android)` / `#if SKIP` and embed custom Jetpack Compose UI directly inside SwiftUI via `ComposeView` when Android platform idioms (e.g., Material 3 Expressive components or Android 16 Live Updates) diverge from Apple HIG:
|
|
39
|
+
|
|
40
|
+
```swift
|
|
41
|
+
import SwiftUI
|
|
42
|
+
|
|
43
|
+
struct InvoiceScreen: View {
|
|
44
|
+
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
|
45
|
+
|
|
46
|
+
var body: some View {
|
|
47
|
+
NavigationStack {
|
|
48
|
+
List {
|
|
49
|
+
Text("Invoice #1042")
|
|
50
|
+
}
|
|
51
|
+
.navigationTitle("Invoices")
|
|
52
|
+
#if os(Android)
|
|
53
|
+
.toolbarBackground(.visible, for: .navigationBar)
|
|
54
|
+
#endif
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- **Token mapping & typography**: store semantic colors in Xcode Asset Catalogs and use SwiftUI text styles (`.body`, `.headline`) so iOS scales with Dynamic Type and Skip maps them to Compose Material typography (`sp` scaling) automatically.
|
|
61
|
+
|
|
62
|
+
## Do/don't pairs
|
|
63
|
+
|
|
64
|
+
| Do | Don't |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Guard NativeScript native API calls with `isIOS` / `isAndroid` | Call UIKit or `android.*` APIs unconditionally across platforms |
|
|
67
|
+
| Use `.ns-dark` CSS custom properties in NativeScript and Asset Catalog tokens in Skip | Hard-code hex literals across templates or views |
|
|
68
|
+
| Use `ListView` / `CollectionView` (NativeScript) or SwiftUI `List` / `LazyVStack` (Skip) | Render large feeds inside unrecycled `ScrollView` containers |
|
|
69
|
+
| Inspect Android Material 3 layout, back gesture, and TalkBack separately in Skip | Assume passing Xcode Previews proves Android Compose parity |
|
|
70
|
+
| Choose Skip Fuse when Android needs full SwiftPM/C libraries; Skip Lite for minimal APK | Fight Skip Lite transpiler limits with unsupported C-interop libraries |
|
|
71
|
+
|
|
72
|
+
## Known traps
|
|
73
|
+
|
|
74
|
+
- **NativeScript**: leaking native ObjC/Java references across closures, missing `accessible="true"` on tappable layouts, ignoring Android 15/16 edge-to-edge safe areas, mixing Vite/Webpack plugin configs inconsistently.
|
|
75
|
+
- **Skip**: using iOS-only modifiers (`glassEffect`, UIKit representables) without `#if !os(Android)` fallbacks, assuming every SwiftUI layout modifier behaves identically in Compose without testing on an Android emulator, oversized Skip Fuse APKs without ABI splitting.
|
|
76
|
+
|
|
77
|
+
## Verification commands
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
# NativeScript:
|
|
81
|
+
ns doctor
|
|
82
|
+
ns build ios
|
|
83
|
+
ns build android
|
|
84
|
+
# Skip (requires Xcode + Android SDK + skip CLI):
|
|
85
|
+
skip doctor
|
|
86
|
+
swift test
|
|
87
|
+
skip test
|
|
88
|
+
skip android build
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Compilation and unit tests (`swift test`, `ns build`) are `static` evidence. Run real iOS Simulator and Android Emulator/device builds (`ns run ios`/`android`, `skip android run`) to verify TalkBack, VoiceOver, safe areas, dark mode, text scaling, and platform back gestures for `rendered` evidence; label unavailable targets `not-checked`.
|
|
@@ -1,71 +1,106 @@
|
|
|
1
1
|
# React Native / Expo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Architecture baseline (New Architecture & Expo SDK 52–54+)
|
|
4
|
+
|
|
5
|
+
React Native's **New Architecture**—**Fabric** (synchronous C++ renderer), **TurboModules** (lazy native modules over **JSI**), **Bridgeless** mode, and **Hermes / Static Hermes**—is the default in Expo SDK 52–54+ and mandatory in React Native 0.82+ (legacy JSON Bridge removed). Performance regressions now come from JS-thread blocking, layout thrash, or excessive shadow-tree churn rather than bridge serialization.
|
|
6
|
+
|
|
7
|
+
- Prefer **Expo CNG** (`app.config.ts` + `npx expo prebuild` + config plugins) and **Expo Router** (file-based typed routes, native stacks/tabs, universal deep linking, `+not-found.tsx`).
|
|
8
|
+
- Use **Expo DOM (`"use dom"`)** selectively to embed an isolated web component (e.g., rich-text editor or chart library) inside a native screen without turning the whole app into a WebView.
|
|
9
|
+
- For high-frequency native interop beyond standard Expo Modules, **Nitro Modules** provide zero-overhead JSI bindings with compile-time TypeScript→Swift/Kotlin specs.
|
|
4
10
|
|
|
5
11
|
## Token mapping
|
|
6
12
|
|
|
7
|
-
Generate
|
|
13
|
+
Generate TypeScript/JSON design tokens during your build step (e.g., from DTCG JSON) and wire them once into your styling engine plus Expo Router / React Navigation `ThemeProvider`:
|
|
8
14
|
|
|
9
15
|
```ts
|
|
10
|
-
export const
|
|
16
|
+
export const lightTokens = {
|
|
17
|
+
color: { action: '#0074ca', surface: '#ffffff', danger: '#c62828' },
|
|
18
|
+
space: { controlInline: 12, sectionGap: 20 },
|
|
19
|
+
} as const;
|
|
11
20
|
```
|
|
12
21
|
|
|
13
|
-
Do not
|
|
22
|
+
Do not scatter raw hex literals across JSX props. Synchronize React Navigation / Expo Router header and tab-bar theme colors separately because native navigation chrome reads its own theme object.
|
|
14
23
|
|
|
15
|
-
##
|
|
24
|
+
## Styling engines & UI kits
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
Separate **styling engines** from **component kits** before choosing, and never combine two competing styling systems in one app:
|
|
18
27
|
|
|
19
|
-
|
|
28
|
+
| Tool | Layer | Trade-offs & best fit |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| **Uniwind** | Tailwind CSS v4 compiled natively for RN | Modern Tailwind v4 token/CSS-variable workflow with native binding performance; pair with accessible primitives. |
|
|
31
|
+
| **react-native-unistyles v3** | C++/JSI shadow-tree styling engine | Theme/breakpoint/adaptive-style updates directly in Fabric/C++ without React re-renders; strong for design-system teams. |
|
|
32
|
+
| **NativeWind v4 / v5** | Tailwind utility engine for RN | Familiar Tailwind mental model across web and mobile; verify exact Expo SDK & New Architecture compatibility. |
|
|
33
|
+
| **Tamagui** | Static compiler + tokens + UI kit | Strong RN+Web monorepo extraction performance; higher Metro/Babel/bundler config complexity. |
|
|
34
|
+
| **gluestack-ui** | Universal headless primitives + styled kit | Accessible RN+Web component baselines without heavy compiler coupling; profile dense lists. |
|
|
35
|
+
| **React Native Paper** | Material Design 3 component kit | Fast MD3 baseline for Android-first or internal tools; resists bespoke or Cupertino iOS aesthetics. |
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
## Layout, lists, media, & keyboard idioms
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
- Layout runs on Yoga (Flexbox). Always consume `react-native-safe-area-context` (`useSafeAreaInsets` / `SafeAreaView`) and honor iOS vs Android back/navigation idioms even when screens share code.
|
|
40
|
+
- **Virtualized lists**: prefer **FlashList v2** (built for the New Architecture without manual item size estimates) or **LegendList** (drop-in high-performance virtualization) over `FlatList` for large or dynamic-height feeds; always supply stable item IDs.
|
|
41
|
+
- **Keyboard handling**: use **`react-native-keyboard-controller`** (`KeyboardAvoidingView`, `KeyboardAwareScrollView`, `useReanimatedKeyboardAnimation`) for frame-synced 60/120fps keyboard tracking across both iOS and Android edge-to-edge.
|
|
42
|
+
- **Images**: use **`expo-image`** for native disk/memory caching, BlurHash/ThumbHash placeholders, content-fit transitions, and WebP/AVIF support.
|
|
24
43
|
|
|
25
|
-
|
|
44
|
+
## Typography & custom fonts
|
|
26
45
|
|
|
27
|
-
|
|
28
|
-
AccessibilityInfo.isReduceMotionEnabled();
|
|
29
|
-
AccessibilityInfo.addEventListener('reduceMotionChanged', handler);
|
|
30
|
-
```
|
|
46
|
+
Load custom fonts via `expo-font` config plugin (embedded natively at build time rather than waiting for async runtime load flash). Respect platform font scaling (`allowFontScaling` defaults to `true`); reflow horizontal rows at large font scales instead of setting fixed heights or `maxFontSizeMultiplier={1}`.
|
|
31
47
|
|
|
32
|
-
|
|
48
|
+
## Motion, gestures, Skia, & reduced motion
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
- Use **Reanimated 4** (supporting both declarative CSS Transitions/Animations syntax and UI-thread worklets) paired with **`react-native-gesture-handler`** for native-threaded drag, sheet, and swipe physics.
|
|
51
|
+
- Use **React Native Skia** (`@shopify/react-native-skia`) for custom GPU 2D charts, shaders, or canvas drawing—never for standard buttons or forms that need native accessibility trees.
|
|
52
|
+
- Query and subscribe to system reduced motion, replacing spatial motion with instant or opacity transitions when enabled:
|
|
35
53
|
|
|
36
|
-
|
|
54
|
+
```ts
|
|
55
|
+
import { useEffect, useState } from 'react';
|
|
56
|
+
import { AccessibilityInfo } from 'react-native';
|
|
57
|
+
|
|
58
|
+
export function useReducedMotion(): boolean {
|
|
59
|
+
const [reduced, setReduced] = useState(false);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
AccessibilityInfo.isReduceMotionEnabled().then(setReduced);
|
|
62
|
+
const sub = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduced);
|
|
63
|
+
return () => sub.remove();
|
|
64
|
+
}, []);
|
|
65
|
+
return reduced;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
37
68
|
|
|
38
|
-
##
|
|
69
|
+
## Accessibility, states, & forms idioms
|
|
39
70
|
|
|
40
|
-
|
|
71
|
+
Use `Pressable`, `accessibilityRole`, `accessibilityLabel`, `accessibilityState`, `accessibilityHint` (sparingly), and `accessibilityLiveRegion`. Keep hit areas ≥ `44 pt` (iOS) / `48 dp` (Android) using `hitSlop` when visual icons are compact.
|
|
41
72
|
|
|
42
|
-
|
|
73
|
+
Model async state explicitly (`loading`, `refreshing`, `empty`, `error`, `offline`, `optimistic`) with idempotent mutations, visible offline sync queues, and persisted router/draft recovery across OS background process death (`adb shell am kill` / iOS eviction via `react-native-mmkv` or SQLite—never assuming JS memory survives backgrounding). Set **`keyboardDismissMode="interactive"`** alongside `react-native-keyboard-controller`, pass gesture `velocity` into Reanimated 4 `withSpring`, and configure `keyboardType`, `autoComplete`, `textContentType`, `returnKeyType`, unobstructed paste/password-manager support, and post-blur validation.
|
|
43
74
|
|
|
44
|
-
|
|
75
|
+
## 2026 App Store & Google Play submission gates
|
|
76
|
+
|
|
77
|
+
- **Secrets in Keychain / Android Keystore**: store auth/refresh tokens solely in **`expo-secure-store`** (or `react-native-keychain`)—**never** in plaintext `AsyncStorage` or unencrypted MMKV.
|
|
78
|
+
- **iOS (Xcode 26 SDK)**: declare `ios.privacyManifests` in `app.config.ts` (`PrivacyInfo.xcprivacy` covering app + native modules), enable `CADisableMinimumFrameDurationOnPhone: true` in `ios.infoPlist` for `120fps` ProMotion (`< 8.33 ms`/frame), include **`expo-apple-authentication`** whenever any social login exists, wire real **in-app Account Deletion**, and use zero-permission `expo-image-picker` (`PHPicker`) with `Linking.openSettings()` recovery when camera/mic/location is denied.
|
|
79
|
+
- **Android (`targetSdkVersion 36`, `.aab`)**: enable `edgeToEdgeEnabled: true` (`react-native-edge-to-edge`) + Predictive Back, unlock `sw >= 600dp` tablet/foldable orientations (`expo-screen-orientation` / adaptive layouts rather than hard-locking portrait), ship Android **Baseline Profiles** to keep cold start `< 1.2 s`, and ensure RN + every native JSI/C++ module compiles with **NDK r28+ for `16 KB` memory page alignment** (verify release builds with `zipalign -c -P 16`). Upload Hermes/ProGuard/R8 & dSYM symbols in CI (`>= 99.5%` crash-free, `0` ANRs).
|
|
45
80
|
|
|
46
81
|
## Do/don't pairs
|
|
47
82
|
|
|
48
83
|
| Do | Don't |
|
|
49
84
|
|---|---|
|
|
50
|
-
| `<Pressable accessibilityRole="button" accessibilityLabel="Save invoice">` |
|
|
51
|
-
| `
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
85
|
+
| `<Pressable accessibilityRole="button" accessibilityLabel="Save invoice">` | Tap-only `<Text>` or unlabeled `<TouchableOpacity>` icon |
|
|
86
|
+
| `FlashList` v2 or `LegendList` with stable keys for large feeds | Mapping hundreds of items inside `<ScrollView>` |
|
|
87
|
+
| `react-native-keyboard-controller` + `keyboardDismissMode="interactive"` + `useSafeAreaInsets()` | Hard-coded `KeyboardAvoidingView` magic `keyboardVerticalOffset` |
|
|
88
|
+
| Reanimated 4 UI-thread springs seeded with gesture `velocity` + `CADisableMinimumFrameDurationOnPhone` | JS-coupled scroll listeners, `setInterval` animations, or `60 Hz`-capped ProMotion |
|
|
89
|
+
| Store tokens in `expo-secure-store`, configure `privacyManifests`, `targetSdk 36`, and `16 KB` `.so` alignment | Save JWTs in `AsyncStorage`, ship `4 KB`-aligned native `.so` modules, or link Account Deletion to email |
|
|
90
|
+
| `expo-image` + build-time `expo-font` config plugin | Uncached `<Image>` flickering or runtime font flash on every launch |
|
|
55
91
|
|
|
56
92
|
## Known traps
|
|
57
93
|
|
|
58
|
-
|
|
94
|
+
JS-thread blocking / excessive Fabric shadow-tree updates, native modules bundling `4 KB`-aligned `.so` binaries rejected on Android 15/16 (`16 KB` page requirement), storing tokens in `AsyncStorage`, state wiped on `adb shell am kill`, double safe-area padding with Expo Router headers, Android 16 edge-to-edge keyboard overlap, controlled `TextInput` cursor jumps, font scaling clipped by fixed row heights.
|
|
59
95
|
|
|
60
96
|
## Verification commands
|
|
61
97
|
|
|
62
98
|
```sh
|
|
63
99
|
npm run lint
|
|
64
100
|
npm run test -- --watch=false
|
|
65
|
-
npx expo start
|
|
66
101
|
CI=1 npx expo install --check
|
|
102
|
+
# Verify 16 KB ELF alignment on Android release APK:
|
|
103
|
+
zipalign -c -P 16 -v 4 android/app/build/outputs/apk/release/app-release.apk
|
|
67
104
|
```
|
|
68
105
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Use the project's native build command for the affected device. Use device/emulator inspection, React Navigation state, React Native DevTools where supported, VoiceOver/TalkBack, font scaling, dark mode, offline/throttled network, and platform back/gesture tests.
|
|
106
|
+
Use the project's locally installed Expo CLI (`static` dependency verification via `CI=1 npx expo install --check` and `zipalign -c -P 16`). Run native release/dev builds (`npx expo run:ios` / `npx expo run:android`) across `>= 2` physical iOS devices and `>= 3` physical Android devices (Pixel + OEM skins) checking VoiceOver/TalkBack, `200%` font scaling, Dark Mode, `adb shell am kill` process-death restoration, offline sync, and Android predictive back / iOS swipe-back for `rendered` evidence; label untested devices `not-checked`.
|