@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.
Files changed (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -1,60 +1,86 @@
1
1
  # Kotlin Multiplatform / Compose Multiplatform
2
2
 
3
- ## Token mapping
3
+ ## Architecture decision: shared logic + native UI vs shared UI
4
4
 
5
- Share token objects in common code as semantic `expect`/plain Kotlin structures where possible, while platform-specific implementations resolve resources/capabilities:
5
+ Decide the sharing boundary explicitly before writing screens:
6
6
 
7
- ```kotlin
8
- object PcTokens { val action = Color(0xff0074ca) }
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
- Keep platform channels for assets, fonts, haptics, accessibility settings, and system color behavior. Do not hide platform divergence behind fake universal behavior.
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
- ## Layout and responsive idioms
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
- Compose Multiplatform layout follows Compose idioms, but target platform conventions still differ. Put shared visual composition in common UI; put navigation/back/window/insets/accessibility behavior in platform-aware layers. Desktop windows, Android devices, iOS surfaces, and web targets need different adaptation logic.
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
- ## Typography/custom fonts
36
+ ## Layout, Navigation, ViewModel, & Compose Hot Reload
18
37
 
19
- Package/load fonts per target and expose semantic typography in shared theme. Verify glyph coverage and scaling per platform; sp/Dynamic Type behavior is not automatically equivalent across targets.
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
- ## Motion/reduced motion
42
+ ## Kotlin/Wasm (`wasmJs`) & Desktop targets
22
43
 
23
- Shared Compose animation can be reused, but reduced-motion detection is platform-specific. On Android use animator/transition scale proxies; on Apple platforms use native reduce-motion environment/API. Expose a small platform abstraction rather than pretending one universal hook exists.
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
- ## Accessibility specifics
47
+ ## Typography, motion, & reduced motion
26
48
 
27
- Shared semantics modifiers help, but actual accessibility tree behavior differs by target. Verify TalkBack, VoiceOver, desktop keyboard/screen-reader APIs, focus traversal, target sizing, and platform-specific state descriptions. Shared UI does not mean shared verification coverage.
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
- ## States idiom
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
- Shared view models can own async/task state, but lifecycle/process death/connectivity/navigation semantics remain platform-specific. Make source-of-truth and cancellation behavior explicit. Do not leak mutable state across platforms/users.
53
+ ## Accessibility, states, & forms idioms
32
54
 
33
- ## Forms idiom
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
- Keyboard options/focus behavior can be shared in part, but IME composition, autofill, secure input, paste, validation timing, and virtual keyboard behavior require platform verification. Preserve input through platform lifecycle events.
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
- | isolate platform capability behind `expect` interface | pretending Android/iOS/desktop reduced-motion APIs are identical |
42
- | share semantic theme roles in common code | scattering target-specific hex constants through shared composables |
43
- | adapt navigation/back per host platform | forcing mobile navigation model onto desktop windows |
44
- | test semantics on each target | assuming one passing Compose test proves every platform tree |
45
- | explicit lifecycle/cancellation ownership | shared singleton mutable state without user/session scope |
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
- Resource packaging mismatch, target-specific font/glyph behavior, memory-model/concurrency surprises, lifecycle mismatch, accessibility API gaps, hidden platform branching, desktop/mobile input assumptions, dependency version alignment across Compose/Kotlin targets.
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
- ./gradlew connectedDebugAndroidTest 2>/dev/null || true
57
- ./gradlew lint 2>/dev/null || true
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
- Run target-specific simulator/device/desktop checks. Cross-platform compilation is static evidence, not rendered evidence.
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
- Evidence: `AccessibilityInfo.isReduceMotionEnabled()` and `reduceMotionChanged` are documented RN APIs.
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 JS/TS constants or consume the Python-dict/JSON form through build generation, then create typed semantic theme context/navigation themes:
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 theme = { colors: { action: '#0074ca' }, spacing: { controlInline: 12 } };
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 copy hex constants into component style props. Map navigation/tab/header colors separately because React Navigation themes are not identical to component themes.
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
- ## Layout and responsive idioms
24
+ ## Styling engines & UI kits
16
25
 
17
- Yoga/flex layout is the default. Use safe-area context/insets, keyboard avoiding behavior deliberately, orientation/window dimensions, platform-specific files/props sparingly, and scroll/flat-list semantics. Respect iOS vs Android navigation/back/gesture differences even when visuals share code.
26
+ Separate **styling engines** from **component kits** before choosing, and never combine two competing styling systems in one app:
18
27
 
19
- ## Typography/custom fonts
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
- Load fonts through Expo font/asset pipeline or native linkage; configure fallback/weight behavior. Use scalable text and respect platform font scaling unless a bounded exception is intentional. Never use fixed-height clipping for essential localized copy.
37
+ ## Layout, lists, media, & keyboard idioms
22
38
 
23
- ## Motion/reduced motion
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
- Use Reanimated/native driver or platform primitives intentionally. Query and subscribe:
44
+ ## Typography & custom fonts
26
45
 
27
- ```ts
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
- Provide reduced/static behavior. JS-thread blocking can turn even correct animation specs into jank.
48
+ ## Motion, gestures, Skia, & reduced motion
33
49
 
34
- ## Accessibility specifics
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
- Use `accessibilityRole`, `accessibilityLabel`, `accessibilityHint` sparingly, `accessibilityState`, live region props where supported, focus/traversal behavior, and native control equivalents. Do not use `TouchableOpacity` around text as a substitute for a properly labeled control. Minimum target expectations follow host platform (44pt/48dp).
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
- ## States idiom
69
+ ## Accessibility, states, & forms idioms
39
70
 
40
- Represent query/mutation lifecycle explicitly: loading/refreshing/empty/error/offline/optimistic/permission. Preserve input/navigation state across backgrounding/reload where expected. FlatList keys, pagination, refresh, scroll position, and memory pressure are UX state, not implementation trivia.
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
- ## Forms idiom
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
- Use correct keyboard type, return key, auto-capitalization/correction, text content type/autocomplete, secure entry/password manager behavior, paste support, focus sequencing, validation timing, and keyboard occlusion handling. Preserve values through failed submit/navigation.
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">` | tap-only `<Text>` pretending to be a button |
51
- | `useSafeAreaInsets()` for bottom action placement | hard-coded bottom padding copied from one emulator |
52
- | stable `keyExtractor={item => item.id}` | array-index keys for mutable rows |
53
- | reduced-motion listener controlling animation state | unconditional looping animation |
54
- | correct `autoComplete="email" keyboardType="email-address"` | blocking paste/custom keyboard behavior |
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
- Bridge/JS-thread jank, Hermes/runtime differences, Expo/native module mismatch, safe-area double padding, keyboard avoiding inconsistency, controlled text input cursor loss, navigation header/custom header duplication, platform shadow/elevation mismatch, font scaling clipped, optimistic state rollback absent.
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
- For Expo projects, use the locally installed Expo CLI and compare the installed Expo SDK/React Native pairing with the matching SDK docs. Run the dependency check in CI mode to report mismatches without prompting to install replacements. If the local CLI is unavailable, mark the command `not-checked` rather than letting `npx` fetch a different version. Run `expo install --fix` only when dependency changes are authorized.
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`.