@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
@@ -0,0 +1,121 @@
1
+ # HarmonyOS ArkUI, Elixir LiveView Native, Taro, & uni-app
2
+
3
+ Use this reference for **HarmonyOS NEXT (ArkUI / ArkTS)**, **Elixir LiveView Native** (server-driven native SwiftUI / Jetpack Compose), and cross-mini-app/mobile frameworks (**Taro**, **uni-app**). Never collapse distinct platform navigation, safe areas, or input models into lowest-common-denominator web-style markup.
4
+
5
+ ## HarmonyOS ArkUI / ArkTS
6
+
7
+ Build HarmonyOS NEXT interfaces with **State Management V2** (`@ComponentV2`, `@Local`, `@Param`, `@Event`, `@Computed`), semantic resource bundles, and multi-device breakpoints (phone, foldable, tablet, 2-in-1):
8
+
9
+ - **State V2**: prefer `@ComponentV2` with `@Local` (internal mutable state), `@Param` (parent-owned read-only input), and `@Event` callbacks over legacy V1 `@State`/`@Prop`/`@Link` where the project targets API 12+.
10
+ - **Tokens & dark mode**: store all semantic colors, dimensions, and localized strings in `resources/base/element/*.json` with matching `resources/dark/element/color.json` overrides and reference them via **`$r('app.color.*')`**, `$r('app.float.*')`, and `$r('app.string.*')`—never hardcode light-only hex values.
11
+ - **Responsive layout**: compose adaptive grids with **`GridRow` / `GridCol`** (`xs`, `sm`, `md`, `lg` breakpoints) and `Navigation` (`NavigationMode.Auto`) so phone single-column flows expand cleanly into split panes on foldables and tablets.
12
+ - **Font scaling, safe areas, & Accessibility Kit**: express text sizes in `fp` (honoring system `fontSizeScale`), avoid clipping by letting horizontal rows wrap or stack under large font scales, apply `.expandSafeArea(...)` deliberately for full-bleed backdrops while keeping primary actions inside safe bounds, and wire HarmonyOS Accessibility Kit attributes (`.accessibilityText(...)`, `.accessibilityDescription(...)`, `.accessibilityGroup(true)`, `.accessibilityLevel('yes' | 'no')`).
13
+
14
+ ```ts
15
+ // HarmonyOS ArkTS (API 12+ State V2 + GridRow/GridCol + semantic $r tokens + Accessibility Kit)
16
+ @Entry
17
+ @ComponentV2
18
+ struct InvoiceSummaryPage {
19
+ @Local activeFilter: string = 'unpaid';
20
+
21
+ build() {
22
+ Column({ space: 12 }) {
23
+ GridRow({
24
+ columns: { sm: 4, md: 8, lg: 12 },
25
+ gutter: { x: 12, y: 12 },
26
+ }) {
27
+ GridCol({ span: { sm: 4, md: 4, lg: 6 } }) {
28
+ InvoiceMetricCard({
29
+ label: $r('app.string.overdue_total'),
30
+ amount: '¥18,400',
31
+ onSelect: () => { this.activeFilter = 'overdue'; },
32
+ })
33
+ }
34
+ }
35
+ .padding({ left: 16, right: 16 })
36
+ }
37
+ .width('100%')
38
+ .height('100%')
39
+ .backgroundColor($r('app.color.semantic_surface'))
40
+ }
41
+ }
42
+
43
+ @ComponentV2
44
+ struct InvoiceMetricCard {
45
+ @Param @Require label: ResourceStr;
46
+ @Param @Require amount: string;
47
+ @Event onSelect: () => void = () => {};
48
+
49
+ build() {
50
+ Column({ space: 6 }) {
51
+ Text(this.label).fontSize(14).fontColor($r('app.color.semantic_text_muted'))
52
+ Text(this.amount).fontSize(24).fontWeight(FontWeight.SemiBold).fontColor($r('app.color.semantic_text'))
53
+ }
54
+ .width('100%')
55
+ .padding(16)
56
+ .borderRadius(12)
57
+ .backgroundColor($r('app.color.semantic_surface_raised'))
58
+ .accessibilityGroup(true)
59
+ .accessibilityText($r('app.string.overdue_card_a11y'))
60
+ .onClick(() => this.onSelect())
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## Elixir LiveView Native
66
+
67
+ **LiveView Native** renders genuine **SwiftUI** (`.swiftui.heex` / `~LVN`) and **Jetpack Compose** (`.jetpack.heex`) native controls driven by Phoenix LiveView server state over WebSockets:
68
+
69
+ - **Platform-idiomatic templates**: keep domain logic in the Phoenix LiveView module, but author distinct `.swiftui.heex` (SwiftUI `List`, `NavigationLink`, `ToolbarItem`, `.sheet`) and `.jetpack.heex` (Material 3 `Scaffold`, `TopAppBar`, `LazyColumn`) templates plus platform `LiveViewNative.Stylesheet` token rules—never force identical web-div markup onto both platforms.
70
+ - **Explicit network & offline boundary**: because events round-trip to the Phoenix server over a WebSocket, design visible reconnecting/offline states, prevent duplicate submits during latency, and **do not choose LiveView Native** for offline-first field apps, continuous 60–120 FPS gesture/canvas tools, or zero-latency local editing (choose native SwiftUI/Compose, KMP, or Flutter instead).
71
+
72
+ ```heex
73
+ <%# lib/my_app_web/live/invoices_live.swiftui.heex %>
74
+ <List>
75
+ <Section>
76
+ <Text template="header">Open invoices</Text>
77
+ <%= for invoice <- @invoices do %>
78
+ <HStack class="row-padding">
79
+ <VStack alignment="leading">
80
+ <Text class="row-title"><%= invoice.client %></Text>
81
+ <Text class="row-meta"><%= invoice.due_date %></Text>
82
+ </VStack>
83
+ <Spacer />
84
+ <Text class="row-amount"><%= invoice.total %></Text>
85
+ </HStack>
86
+ <% end %>
87
+ </Section>
88
+ </List>
89
+ ```
90
+
91
+ ## Taro & uni-app (cross-mini-app & mobile)
92
+
93
+ Use **Taro** (React/Vue/Solid over mini-programs, H5, RN, HarmonyOS) or **uni-app / uni-app x** (Vue/UTS over WeChat/Alipay/ByteDance mini-programs, iOS, Android, HarmonyOS) when multi-super-app distribution is an explicit product requirement:
94
+
95
+ - **Safe areas & mini-program capsule geometry**: query system window/capsule metrics (`Taro.getWindowInfo()` / `Taro.getMenuButtonBoundingClientRect()` or `uni.getWindowInfo()` + `env(safe-area-inset-bottom)`) whenever building a custom navigation bar so titles and action buttons never collide with the host mini-program's floating capsule menu or home indicator.
96
+ - **Platform conditional compilation (no lowest-common-denominator UX)**: branch platform-specific navigation, payment, share sheets, and pickers explicitly—`// #ifdef MP-WEIXIN` / `// #ifdef APP-PLUS` / `// #ifdef HARMONY` in **uni-app**, or `process.env.TARO_ENV` and `.weapp.tsx` / `.rn.tsx` / `.h5.tsx` file extensions in **Taro**.
97
+ - **Mini-program budgets & `setData` discipline**: keep the main package under the host super-app limit (typically 2 MB) using subpackages (`subPackages`), avoid pushing giant arrays through `setData` on scroll/input ticks, and verify accessibility focus/font scaling on real host clients rather than browser H5 preview alone.
98
+
99
+ ## Do/don't pairs
100
+
101
+ | Do | Don't |
102
+ |---|---|
103
+ | Use HarmonyOS `@ComponentV2`, `@Local`/`@Param`, `GridRow`/`GridCol`, and `$r('app.color.*')` | Hardcode hex colors and fixed phone widths that clip on HarmonyOS foldables and dark mode |
104
+ | Write separate `.swiftui.heex` and `.jetpack.heex` templates in LiveView Native with explicit offline banners | Treat LiveView Native as an offline-first architecture or force identical layouts across iOS and Android |
105
+ | Compute mini-program capsule bounds (`getMenuButtonBoundingClientRect`) and use `#ifdef` / `.weapp` platform branches in Taro/uni-app | Hardcode a 44px top header that collides with WeChat's capsule button or ship unsplit >2 MB mini-program main packages |
106
+ | Test real DevEco/Xcode/Android/WeChat DevTools builds and label untested hosts `not-checked` | Rely solely on an H5 web browser preview to verify HarmonyOS, LiveView Native, or mini-program behavior |
107
+
108
+ ## Verification commands
109
+
110
+ ```sh
111
+ # HarmonyOS ArkTS (DevEco / hvigor):
112
+ hvigorw assembleHap
113
+
114
+ # Elixir LiveView Native:
115
+ mix test
116
+
117
+ # Taro (target-specific build):
118
+ npm run build:weapp
119
+ ```
120
+
121
+ CLI builds and `mix test` are `static` / logic evidence. Inspect running apps in HarmonyOS DevEco Previewer/Emulator (dark mode, foldable breakpoints, font scale, ScreenReader), iOS Simulator / Android Emulator (LiveView Native reconnects + native navigation), and WeChat DevTools / physical devices (Taro/uni-app capsule alignment and subpackage size) for `rendered` evidence; label untested hosts `not-checked`.
@@ -1,55 +1,76 @@
1
1
  # Ionic / Capacitor
2
2
 
3
- ## Token mapping
3
+ ## Token mapping & Ionic 8 palettes
4
4
 
5
- Ionic exposes CSS variables for theme and component customization. Bridge generated CSS variables into Ionic semantic variables in global CSS:
5
+ Ionic 8 supports modern CSS **`light-dark()`** and built-in **high-contrast palettes** (`@ionic/core/css/palettes/dark.system.css`, `high-contrast.system.css`, `high-contrast-dark.system.css`). Bridge DTCG semantic CSS custom properties into Ionic's documented `--ion-*` tokens rather than piercing Shadow DOM internals:
6
6
 
7
7
  ```css
8
+ @import '@ionic/core/css/palettes/dark.system.css';
9
+ @import '@ionic/core/css/palettes/high-contrast.system.css';
10
+ @import '@ionic/core/css/palettes/high-contrast-dark.system.css';
11
+
8
12
  :root {
9
- --ion-color-primary: var(--semantic-color-action);
10
- --ion-background-color: var(--semantic-color-background);
13
+ color-scheme: light dark;
14
+ --ion-color-primary: light-dark(var(--semantic-action-light), var(--semantic-action-dark));
15
+ --ion-background-color: var(--semantic-surface);
16
+ --ion-text-color: var(--semantic-on-surface);
11
17
  }
12
18
  ```
13
19
 
14
- Do not override internal shadow DOM with brittle selectors when documented CSS variables/parts exist.
20
+ Use documented `::part(...)` selectors and `--ion-*` variables; never rely on fragile shadow-root traversal hacks.
21
+
22
+ ## Capacitor 6–8 Android Edge-to-Edge & layout idioms
15
23
 
16
- ## Layout and responsive idioms
24
+ Android 15/16 enforces edge-to-edge rendering. Configure Capacitor 6–8's **`SystemBars`** plugin / `adjustMarginsForEdgeToEdge` setting (or `@capacitor/status-bar` + explicit safe-area insets) alongside `<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0">` and CSS `env(safe-area-inset-*)` so headers, bottom tabs, and CTAs never collide with cutouts or gesture bars.
17
25
 
18
- Use Ionic page/content/header/footer/menu/router outlet idioms. Respect safe areas, split pane behavior, hardware/software back semantics, keyboard inset behavior, and mobile navigation rather than treating the app as a responsive website in a shell. Web responsive layout remains relevant inside content.
26
+ Use Ionic's `<ion-app>`, `<ion-page>`, `<ion-header>`, `<ion-content>`, `<ion-footer>`, `<ion-split-pane>`, and `<ion-router-outlet>` so swipe-back, hardware back, and scroll-to-top follow host conventions. Choose `mode` (`ios` / `md`) per host platform by default rather than locking Android users into iOS chrome or vice versa.
19
27
 
20
- ## Typography/custom fonts
28
+ ## Capacitor without Ionic (plain web frameworks + Konsta / Tailwind)
21
29
 
22
- Use web font loading plus platform-appropriate fallbacks. Ionic mode (`ios`/`md`) affects typography/platform behavior; choose intentionally rather than forcing one mode blindly everywhere. Text zoom/reflow must survive WebView settings and device font scaling.
30
+ You do **not** need Ionic Framework to ship a Capacitor app. Teams using React, Vue, Svelte, Solid, or Angular with **Tailwind CSS** (optionally paired with **Konsta UI** for iOS/Material Tailwind primitives) can target Capacitor directly without Ionic's Web Components / Shadow DOM layer. When opting out of Ionic, you explicitly own:
23
31
 
24
- ## Motion/reduced motion
32
+ - iOS swipe-back and Android hardware/predictive back handling (`@capacitor/app` `backButton` listener),
33
+ - safe-area and keyboard inset padding (`@capacitor/keyboard` + `env(safe-area-inset-*)`),
34
+ - native-feeling sheet/modal focus traps and scroll-container momentum,
35
+ - 44pt / 48dp touch targets and tap-highlight suppression (`-webkit-tap-highlight-color: transparent` paired with intentional `:active` feedback).
25
36
 
26
- Use Ionic component transitions/navigation idioms and CSS motion honoring `prefers-reduced-motion`. Capacitor plugins/native APIs may expose additional behavior, but do not fake system haptics/animation everywhere.
37
+ ## Forms idiom (Ionic 7/8 `label` / `labelPlacement`)
27
38
 
28
- ## Accessibility specifics
39
+ Legacy standalone `<ion-label>` inside `<ion-item>` around form controls is **deprecated in Ionic 7/8**. Pass **`label`** and **`labelPlacement`** (`"stacked"`, `"floating"`, `"fixed"`, `"start"`) directly on `<ion-input>`, `<ion-textarea>`, `<ion-select>`, `<ion-toggle>`, `<ion-checkbox>`, and `<ion-radio>`, paired with `helper-text` and `error-text`:
29
40
 
30
- Ionic components carry useful semantics but still require labels/names/focus management. Router transitions and modal/popover dismissal need focus restoration. Capacitor apps need real device testing because web accessibility behavior does not cover native shell/permissions/keyboards.
41
+ ```html
42
+ <ion-input
43
+ label="Work email"
44
+ label-placement="stacked"
45
+ type="email"
46
+ autocomplete="email"
47
+ inputmode="email"
48
+ helper-text="Receipts are sent here."
49
+ error-text="Enter a valid email address."
50
+ ></ion-input>
51
+ ```
31
52
 
32
- ## States idiom
53
+ Prefer `label-placement="stacked"` for dense or localized forms so long labels do not overlap values or clip on narrow screens.
33
54
 
34
- Treat web data state and native device state separately: network offline/online, permission denied, background/resume, keyboard open/closed, deep link/app URL open, push notification cold start. Loading/empty/error/offline/optimistic states follow web rules plus native interruption recovery.
55
+ ## Typography, motion, accessibility, & states idioms
35
56
 
36
- ## Forms idiom
57
+ Bundle fonts locally (offline-ready) with platform fallbacks and ensure text reflows cleanly under WebView / OS text zoom. Honor `@media (prefers-reduced-motion: reduce)` in CSS and disable non-essential Ionic page transitions when requested.
37
58
 
38
- Ionic inputs need persistent labels (`ion-label` or modern input label APIs), correct type/autocomplete/inputmode, clear helper/error copy, paste/autofill support, keyboard behavior, and validation timing. Do not use floating labels as the only memory aid in long forms without checking overlap/truncation.
59
+ Manage focus explicitly on router navigation and modal/sheet dismissal (WebViews do not automatically restore focus reliably). Model both web data state (loading/empty/error/offline/optimistic) and native shell state (permission denied, `@capacitor/network` offline, `@capacitor/app` background/resume, deep-link cold start, keyboard open/closed).
39
60
 
40
61
  ## Do/don't pairs
41
62
 
42
63
  | Do | Don't |
43
64
  |---|---|
44
- | use documented `--ion-*` variables/parts | piercing shadow internals with fragile selectors |
45
- | platform-aware navigation/back behavior | forcing one navigation model because codebase is shared |
46
- | explicit focus restoration after modal close | assuming WebView automatically chooses correct focus |
47
- | device permission primer/fallback flow | looping the native permission prompt with no escape |
48
- | test keyboard-safe bottom action | placing fixed CTA beneath keyboard/home indicator |
65
+ | `<ion-input label="Email" label-placement="stacked" error-text="...">` | Deprecated `<ion-item><ion-label>…</ion-label><ion-input /></ion-item>` |
66
+ | Import Ionic 8 `dark.system.css` & `high-contrast.system.css` palettes | Hard-code light-only colors that wash out in high-contrast or dark mode |
67
+ | Configure Capacitor `SystemBars` + `viewport-fit=cover` + `env(safe-area-inset-*)` | Leave Android 15/16 status/gesture bars overlapping app headers or tabs |
68
+ | Documented `--ion-*` custom properties and `::part()` | Fragile selectors attempting to pierce internal Shadow DOM markup |
69
+ | Handle `@capacitor/app` `backButton` and focus restoration explicitly | Assume browser history handles Android hardware back and modal escape |
49
70
 
50
71
  ## Known traps
51
72
 
52
- WebView version fragmentation, safe-area/keyboard mismatch, shadow DOM styling frustration, forced MD/iOS mode alien to users, native plugin permission lifecycle, hardware back duplication, deep-link cold start state, offline cache staleness, confusing PWA/mobile behavior.
73
+ Android System WebView fragmentation, Android 15/16 edge-to-edge overlap when `SystemBars` / safe-area insets are unconfigured, fixed-bottom CTAs buried under the soft keyboard, stale `npx cap sync` native assets after web builds, permission prompt loops with no denied-state recovery, cold-start deep links dropping route state, Capacitor-without-Ionic apps missing hardware back handlers.
53
74
 
54
75
  ## Verification commands
55
76
 
@@ -58,8 +79,9 @@ npm run lint
58
79
  npm run test -- --watch=false
59
80
  npm run build
60
81
  npx cap sync
61
- npx cap run ios 2>/dev/null || true
62
- npx cap run android 2>/dev/null || true
82
+ # Run on real device/emulator when Xcode or Android SDK is installed:
83
+ npx cap run ios
84
+ npx cap run android
63
85
  ```
64
86
 
65
- Use browser inspection for DOM plus real device/emulator tests for native shell, keyboard, permissions, back, gestures, screen readers, and offline behavior.
87
+ Web build/unit tests provide `static` evidence; desktop browser DevTools verifies inner DOM only. Run real iOS/Android device or emulator builds to verify Android 15/16 edge-to-edge, keyboard insets, hardware/swipe back, native plugin permissions, VoiceOver/TalkBack, and offline recovery (`rendered`; mark unavailable targets `not-checked`).
@@ -1,61 +1,129 @@
1
1
  # Jetpack Compose
2
2
 
3
- ## Token mapping
3
+ ## Token mapping & Material 3 Expressive
4
4
 
5
- Map generated Kotlin values into `ColorScheme`, typography, shapes, spacing object, and `CompositionLocal` only when Material/theme APIs cannot express the role:
5
+ Map DTCG semantic tokens into `ColorScheme`, `Typography`, `Shapes`, `MotionScheme`, and a typed spacing `CompositionLocal` only when Material theme slots cannot express the role. On Material 3 Expressive (`material3` 1.4+), use **`MaterialExpressiveTheme`** and **`MotionScheme.expressive()`** rather than scattering raw `Color(0xff…)` or ad-hoc spring specs:
6
6
 
7
7
  ```kotlin
8
- val LightColors = lightColorScheme(primary = SemanticAction)
9
- val spacing = LocalSpacing.current
8
+ @OptIn(ExperimentalMaterial3ExpressiveApi::class)
9
+ @Composable
10
+ fun PixelcraftTheme(
11
+ darkTheme: Boolean = isSystemInDarkTheme(),
12
+ content: @Composable () -> Unit,
13
+ ) {
14
+ val colors = if (darkTheme) DarkSemanticColors else LightSemanticColors
15
+ MaterialExpressiveTheme(
16
+ colorScheme = colors,
17
+ motionScheme = MotionScheme.expressive(),
18
+ typography = SemanticTypography,
19
+ content = content,
20
+ )
21
+ }
10
22
  ```
11
23
 
12
- Use generated `.dp`/`.sp` output semantically. Do not scatter raw `Color(0xff…)` or hard-coded dimensions in composables.
24
+ Adopt Material 3 Expressive components where they clarify action hierarchy: **`FloatingToolbar`** (horizontal/vertical contextual toolbars), **`SplitButtonLayout`** (primary action + attached menu), **`ButtonGroup`** (connected option clusters), and **`LoadingIndicator` / `ContainedLoadingIndicator`** (shape-morphing indeterminate progress).
13
25
 
14
- ## Layout and responsive idioms
26
+ ## Edge-to-Edge (Android 15/16) & responsive adaptive layouts
15
27
 
16
- Use `Column`/`Row`/lazy layouts/box/grid constraints deliberately; measure with constraints and adapt through window size classes/pane scaffold where relevant. Handle predictive back, system bars, display cutouts, foldables, landscape, keyboard insets, and content padding. Do not hard-code screen width buckets copied from web breakpoints.
28
+ Android 15 (API 35) enforces edge-to-edge by default and Android 16 (API 36) removes the opt-out window flag. Call **`enableEdgeToEdge()`** before `setContent` in `ComponentActivity`, and consume insets deliberately so content never hides behind status bars, display cutouts, gesture navigation bars, or the soft keyboard:
17
29
 
18
- ## Typography/custom fonts
30
+ ```kotlin
31
+ enableEdgeToEdge()
32
+ setContent {
33
+ PixelcraftTheme {
34
+ Scaffold(
35
+ contentWindowInsets = WindowInsets.safeDrawing,
36
+ bottomBar = { ActionBar(Modifier.imePadding()) },
37
+ ) { innerPadding ->
38
+ ContentList(Modifier.padding(innerPadding).consumeWindowInsets(innerPadding))
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ For tablets, foldables, and ChromeOS/desktop windows (`sw >= 600dp`), Android 16 (`targetSdk 36`) **ignores fixed `screenOrientation="portrait"` and non-resizable manifest locks**. Never hard-lock portrait on large screens: use **`material3-adaptive`** (`ListDetailPaneScaffold`, `SupportingPaneScaffold`, `NavigationSuiteScaffold`, `currentWindowAdaptiveInfo()`) and survive live fold/unfold posture transitions (`FoldingFeature.State.HALF_OPENED` / `FLAT`) without losing form input, scroll offset, or media playback.
45
+
46
+ ## Navigation 3 & Predictive Back
47
+
48
+ - **Predictive Back**: declare `android:enableOnBackInvokedCallback="true"` in `AndroidManifest.xml` and handle custom interruptible back gestures with **`PredictiveBackHandler`** (consuming `progress: Flow<BackEventCompat>`, cleaning up on `CancellationException` when the user aborts the swipe, and committing only on completion):
49
+
50
+ ```kotlin
51
+ PredictiveBackHandler(enabled = hasUnsavedDraft) { progress: Flow<BackEventCompat> ->
52
+ try {
53
+ progress.collect { backEvent -> previewDismissProgress = backEvent.progress }
54
+ discardOrPromptDraft()
55
+ } catch (_: CancellationException) {
56
+ previewDismissProgress = 0f
57
+ }
58
+ }
59
+ ```
19
60
 
20
- Use Material typography roles and `sp` scaling. Font resources/downloadable fonts must declare fallbacks/weights correctly. Respect user font scale; avoid fixed-height single-line text for essential content unless truncation/expansion behavior is deliberate.
61
+ - **Navigation 3 (`androidx.navigation3`)**: for new Compose-first architectures, prefer Navigation 3's user-owned back stack (`rememberNavBackStack` / `SnapshotStateList`), `NavDisplay`, `entryProvider`, and multi-pane `SceneStrategy` (retaining Navigation 2 where an existing codebase already standardizes on it).
21
62
 
22
- ## Motion/reduced motion
63
+ ## Typography & custom fonts
23
64
 
24
- Compose animation APIs since 1.2 generally honor Android Remove animations for Animator-based behavior, but custom/Lottie/progress motion may need explicit checks. Use `Settings.Global.ANIMATOR_DURATION_SCALE` (and transition scale where appropriate) as a proxy; zero means animations disabled. Provide static/opacity alternatives.
65
+ Use Material typography roles and `sp` scaling. Declare bundled or downloadable font weights and fallbacks explicitly. Test at `200%` font scale and large display size; switch horizontal rows to vertical stacks instead of single-line clipping essential values.
66
+
67
+ ## Motion, springs, & reduced motion
68
+
69
+ `MotionScheme` separates **spatial springs** (`defaultSpatialSpec` / `fastSpatialSpec` — position, size, bounds, allowed subtle overshoot) from **effects springs** (`defaultEffectsSpec` — color, alpha, elevation, critically damped with zero overshoot). Seed gesture-driven `Animatable.animateTo(..., initialVelocity = velocity)` with finger release velocity, and use **`SharedTransitionLayout`** (`Modifier.sharedElement` / `Modifier.sharedBounds`) for continuity between list and detail views.
70
+
71
+ Check `Settings.Global.ANIMATOR_DURATION_SCALE` (`0f` = Remove animations enabled) for custom loops, Lottie animations, or shared transitions, falling back to instant/crossfade state changes.
25
72
 
26
73
  ## Accessibility specifics
27
74
 
28
- Use semantics modifiers: `semantics`, `contentDescription`, `role`, `stateDescription`, `progressBarRangeInfo`, custom actions, traversal ordering. Do not label decorative images. Test TalkBack order/action semantics. Touch target baseline is 48×48 dp; use size/minimum touch target behavior rather than visual-only padding illusions.
75
+ Use `Modifier.semantics` (`contentDescription`, `stateDescription`, `role`, `heading()`, `liveRegion`, `customActions`, `isTraversalGroup`, `traversalIndex`). Pass `contentDescription = null` for purely decorative vectors. Keep touch targets ≥ `48×48 dp` (`minimumInteractiveComponentSize()`). Verify TalkBack focus order on a real device/emulator.
76
+
77
+ ## States, process-death restoration, & Forms (`TextFieldState`)
29
78
 
30
- ## States idiom
79
+ Hoist explicit sealed UI state (`Loading`, `Content`, `Empty`, `Error`, `Offline`) from `ViewModel` via `collectAsStateWithLifecycle()`. Provide stable keys in `LazyColumn`/`LazyRow` (`items(rows, key = { it.id })`) and attach **`Modifier.imeNestedScroll()`** (`WindowInsetsAnimationCompat`) so scrolling interactively drags the soft keyboard open/closed at display refresh rate.
31
80
 
32
- State hoisting/recomposition ownership must be explicit. Represent loading/refreshing/empty/error/offline/permission/optimistic state in UI state rather than boolean soup. Use stable keys in lazy lists; preserve/restore state with lifecycle-aware primitives. Duplicate clicks/recomposition/network retry need idempotent behavior.
81
+ **Strong Skipping Mode** is enabled by default in Kotlin 2.0.20+ Compose compilers, yet stable immutable models, explicit lazy item keys, and **OS process-death restoration** (`rememberSaveable` for UI state + `SavedStateHandle` in `ViewModel` for route IDs/filters/drafts, verified via `adb shell am kill <package>` while backgrounded) remain mandatory.
82
+
83
+ For text input, prefer **`TextFieldState` + `BasicTextField` v2** (and Material `TextField(state = ...)` overloads) over legacy `value`/`onValueChange` to eliminate async IME/cursor race conditions:
84
+
85
+ ```kotlin
86
+ val emailState = rememberTextFieldState()
87
+ OutlinedTextField(
88
+ state = emailState,
89
+ label = { Text("Work email") },
90
+ lineLimits = TextFieldLineLimits.SingleLine,
91
+ keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email, imeAction = ImeAction.Next),
92
+ inputTransformation = InputTransformation.maxLength(120),
93
+ )
94
+ ```
33
95
 
34
- ## Forms idiom
96
+ ## 2026 Google Play submission, 16 KB page alignment & Baseline Profiles
35
97
 
36
- Use `KeyboardOptions`, `KeyboardActions`, correct `keyboardType`/`imeAction`, capitalization/autocorrect where exposed, focus requester/order, validation after completion, and input preservation through process/state changes. Do not clear text field state because recomposition recreated it incorrectly.
98
+ - **`targetSdk 36` & signed `.aab`**: compile and target **API 36 (Android 16)**, ship signed Android App Bundles (`.aab`) with Play App Signing, and upload R8/ProGuard mapping files + native debug symbols on every release to hold **`>= 99.5%` crash-free sessions** and **`0` ANRs**.
99
+ - **Mandatory `16 KB` memory page size native `.so` alignment**: Google Play requires all apps with native code (`.so` from C/C++/Rust/JNI or third-party SDKs) targeting Android 15/16+ to support **16 KB ELF segment alignment**. Build with **NDK r28+** (default 16 KB alignment) + **AGP 8.5.1+** (uncompressed shared libs), or pass `-Wl,-z,max-page-size=16384` on NDK r27, and verify every bundled `.so` before upload (`zipalign -c -P 16 -v 4 app-release.apk`).
100
+ - **Baseline Profiles & `< 800 ms–1.2 s` cold start**: generate Macrobenchmark **Baseline Profiles** (`androidx.profileinstaller`) for startup and critical scroll/navigation journeys, and initialize non-essential SDKs asynchronously via `androidx.startup` / background dispatchers so cold TTID stays `< 1.2 s` (hard ceiling `< 2.0 s`) on mid-tier Android hardware.
101
+ - **Android Keystore encrypted storage & Photo Picker**: store tokens and secrets with **Jetpack Tink (`AndroidKeysetManager`)** + DataStore (or Keystore-backed `EncryptedSharedPreferences` where maintained)—**never** plaintext `SharedPreferences`. Use the system **Android Photo Picker** (`PickVisualMedia`) instead of requesting broad `READ_MEDIA_IMAGES` permissions, and provide in-app + web Account Deletion parity per Google Play Data Safety rules.
37
102
 
38
103
  ## Do/don't pairs
39
104
 
40
105
  | Do | Don't |
41
106
  |---|---|
42
- | `Button(onClick = { save() }) { Text("Save invoice") }` | clickable `Text` masquerading as a button |
43
- | stable lazy item key `items(items, key = { it.id })` | index-only reuse causing wrong focus/scroll/state |
44
- | consume `WindowInsets` / scaffold padding deliberately | CTA hidden behind gesture navigation/keyboard |
45
- | validate after field completion/submit with recovery copy | error every keystroke before input is finished |
46
- | `Modifier.semantics { contentDescription = "Delete invoice" }` | trash-can vector as sole accessible meaning |
107
+ | `enableEdgeToEdge()` + `WindowInsets.safeDrawing` + `Modifier.imePadding()` + `imeNestedScroll()` | Assume system bars reserve space on Android 15/16 or hard-code `24.dp` status-bar padding |
108
+ | `PredictiveBackHandler` handling cancellation gracefully | Intercept `BackHandler` unconditionally and break Android predictive back preview |
109
+ | `ListDetailPaneScaffold` / `NavigationSuiteScaffold` unlocked across postures on `sw >= 600dp` | Hard-lock `android:screenOrientation="portrait"` (ignored on Android 16 large screens) or lose state on unfold |
110
+ | Build native libs with NDK r28+ (`16 KB` ELF alignment), ship Baseline Profiles, and encrypt tokens via Keystore/Tink | Ship `4 KB`-aligned `.so` binaries rejected by Google Play or store JWTs in plaintext `SharedPreferences` |
111
+ | Persist route/draft keys in `SavedStateHandle` + `rememberSaveable` and test `adb shell am kill` | Hold critical screen state only in `remember` or unpersisted `ViewModel` fields |
112
+ | `TextFieldState` + `rememberTextFieldState()` and `items(invoices, key = { it.id })` | Legacy `StateFlow` `value`/`onValueChange` IME cursor loops or index-keyed lazy lists |
47
113
 
48
114
  ## Known traps
49
115
 
50
- Recomposition caused by unstable inputs, state loss across process death, incorrect `remember` keys, lazy list focus/reuse, inset double padding, gesture conflicts/nested scroll, accessibility traversal order, custom theme bypassing Material state layers, assuming all animation automatically respects Remove animations.
116
+ Double-applying `WindowInsets` padding, uncancelled `PredictiveBackHandler` leaving partial swipe offsets stuck, third-party AARs bundling unaligned `4 KB` `.so` files, state loss on foldable posture change or `adb shell am kill`, plaintext `SharedPreferences` token leaks, custom animations ignoring `ANIMATOR_DURATION_SCALE == 0f`, skipping TalkBack verification on OEM skins.
51
117
 
52
118
  ## Verification commands
53
119
 
54
120
  ```sh
55
- ./gradlew assembleDebug
121
+ ./gradlew assembleRelease
56
122
  ./gradlew testDebugUnitTest
57
123
  ./gradlew connectedDebugAndroidTest
58
124
  ./gradlew lint
125
+ # Verify 16 KB ELF page alignment on release APK extracted from bundle:
126
+ zipalign -c -P 16 -v 4 app/build/outputs/apk/release/app-release.apk
59
127
  ```
60
128
 
61
- Use emulator/device screenshots, Layout Inspector, Accessibility Scanner, TalkBack, font scale/display size, dark mode, landscape/foldable/split-screen, network throttling, and Remove animations settings for evidence.
129
+ Build/unit tests and `zipalign -c -P 16` provide `static` evidence. Capture real-device/emulator runs (`>= 3` Android devices across Pixel + Samsung One UI / Xiaomi / OPPO OEM skins) with TalkBack, `200%` font scale, Dark Mode, foldable posture changes, `adb shell am kill` background restoration, Android 16 edge-to-edge + predictive back, and Remove animations enabled for `rendered` evidence; label untested hardware `not-checked`.
@@ -1,59 +1,82 @@
1
- # Kivy
2
-
3
- ## Token mapping
4
-
5
- Kivy has no universal modern design-token pipeline. Encode semantic constants in Python/KV variables and apply them through reusable styles/classes:
6
-
7
- ```kv
8
- #:set pc_action (0.0, 0.455, 0.792, 1)
1
+ # Kivy & KivyMD
2
+
3
+ ## Token mapping & density units (`dp` / `sp`)
4
+
5
+ Encode semantic colors, spacing, and typography scales once in Python and KV rather than scattering raw normalized RGBA tuples `(0.0, 0.455, 0.792, 1)` across screens. Always measure layout dimensions in density-independent **`dp`** and text in scale-independent **`sp`** from `kivy.metrics`:
6
+
7
+ ```python
8
+ from kivy.metrics import dp, sp
9
+ from kivymd.app import MDApp
10
+ from kivymd.uix.button import MDButton, MDButtonText
11
+ from kivymd.uix.boxlayout import MDBoxLayout
12
+
13
+ class PcTokens:
14
+ CONTROL_INLINE = dp(12)
15
+ MIN_TOUCH_TARGET = dp(48)
16
+ BODY_SIZE = sp(16)
17
+
18
+ class InvoiceApp(MDApp):
19
+ def build(self):
20
+ self.theme_cls.theme_style = "Dark" # switchable Light / Dark
21
+ self.theme_cls.primary_palette = "Blue"
22
+ root = MDBoxLayout(orientation="vertical", padding=PcTokens.CONTROL_INLINE, spacing=dp(8))
23
+ root.add_widget(
24
+ MDButton(
25
+ MDButtonText(text="Save invoice"),
26
+ style="filled",
27
+ size_hint=(None, None),
28
+ height=PcTokens.MIN_TOUCH_TARGET,
29
+ )
30
+ )
31
+ return root
9
32
  ```
10
33
 
11
- Keep color units/channel conventions explicit. Do not scatter raw RGBA arrays through KV/rules.
34
+ For apps targeting Material Design 3 aesthetics and structured mobile widgets, use **KivyMD 2.x** (`MDApp`, `MDButton`, `MDTextField`, `MDNavigationBar`, `MDTopAppBar`, `theme_cls.theme_style`, `theme_cls.primary_palette`) instead of hand-styling low-level Kivy `Button` canvases.
12
35
 
13
36
  ## Layout and responsive idioms
14
37
 
15
- Use Box/Grid/Relative/Float/Anchor layouts intentionally, KV size hints, dp/sp units, window resize behavior, orientation/density, and scroll views. Do not use absolute pixel coordinates for everything. Canvas drawing is powerful but must be recomputed on resize/scale.
16
-
17
- ## Typography/custom fonts
18
-
19
- Register custom fonts and use sp-based sizing. Verify glyph coverage/fallback because Kivy font behavior differs by platform. Do not fixed-size clip localized or scaled text; measure texture constraints where custom layout matters.
38
+ Use `BoxLayout`, `GridLayout`, `AnchorLayout`, `RecycleView` (for virtualized long lists—never add hundreds of rows directly into a `ScrollView`), `size_hint`, and `dp`/`sp` metrics. Recompute custom `canvas` instructions on `pos`/`size` bindings so resizing, rotation, and foldable transitions never leave stale geometry. Account for system bars and mobile keyboard height (`Window.softinput_mode = "below_target"` or `"pan"`).
20
39
 
21
- ## Motion/reduced motion
40
+ ## Typography, motion, & reduced motion
22
41
 
23
- Use `kivy.animation.Animation` purposefully, cancel animations on lifecycle/navigation, and avoid motion-only feedback. System reduced-motion integration is not uniform; expose an app-level reduced-motion option where necessary.
42
+ Register custom TTF/OTF fonts via `LabelBase.register(...)` and verify glyph coverage for every target locale (Kivy does not automatically cascade OS fallback fonts cleanly for CJK/RTL/emoji without explicit shaping/font config—verify HarfBuzz/Pango text provider where RTL or complex scripts matter).
24
43
 
25
- ## Accessibility specifics
44
+ Use `kivy.animation.Animation` sparingly and call `Animation.cancel_all(widget)` on screen exit (`on_leave`). Because Kivy does not automatically mirror OS reduced-motion preferences across all platforms, expose an in-app reduced-motion toggle and never rely on animation as the only status cue.
26
45
 
27
- Kivy accessibility support is limited/platform-dependent compared with native UI frameworks. Keyboard input/focus behavior must be explicit; touch target sizing and non-color state are critical. Treat screen-reader support as uncertain until verified on target. Do not make essential UI canvas-only without semantic/navigation alternatives.
46
+ ## Accessibility, states, & forms idioms
28
47
 
29
- ## States idiom
48
+ **Honest accessibility limit**: Kivy's OpenGL/canvas widget tree has minimal built-in screen-reader (TalkBack/VoiceOver/Narrator) integration compared to native SwiftUI, Jetpack Compose, or Flutter. Treat screen-reader compliance as `not-checked` or unsupported until explicitly bridged and verified on device; enforce explicit keyboard focus (`FocusBehavior`), ≥ `48 dp` touch targets, high contrast, and text+icon (non-color-only) state encoding.
30
49
 
31
- Use properties/event binding/state machine explicitness. Loading/empty/error/offline/permission/background-operation states must be represented in widget tree. Clock scheduling/threading needs lifecycle cancellation and duplicate protection. Preserve user input across screen manager transitions.
50
+ Own state via Kivy `Property` bindings (`StringProperty`, `BooleanProperty`, `ListProperty`) so UI updates stay reactive. Cancel `Clock.schedule_*` callbacks on screen leave and marshal background-thread results onto the main thread with `@mainthread` or `Clock.schedule_once`. Preserve form drafts across `ScreenManager` transitions and verify mobile soft-keyboard occlusion and paste behavior on real devices.
32
51
 
33
- ## Forms idiom
52
+ ## Mobile packaging: Buildozer & `kivy-ios`
34
53
 
35
- Use labeled inputs, focus order, keyboard behavior, validation timing, paste/input-method capabilities verification, and input preservation. Mobile keyboard occlusion and scrolling need deliberate testing.
54
+ - **Android (`Buildozer` / `python-for-android`)**: pin `android.api` / `android.minapi` / `android.ndk`, target `arm64-v8a` (required by Google Play), list every pure-Python and compiled recipe explicitly in `buildozer.spec` (`requirements = python3,kivy,kivymd,...`), declare runtime permissions truthfully, and test APK/AAB size and cold-start time on real Android hardware.
55
+ - **iOS (`kivy-ios`)**: compile Python and native recipes via `toolchain build python3 kivy ...`, generate the Xcode project via `toolchain create`, and verify iOS privacy manifests, code signing, safe-area insets, and background audio/network suspension inside Xcode on a real iPhone.
36
56
 
37
57
  ## Do/don't pairs
38
58
 
39
59
  | Do | Don't |
40
60
  |---|---|
41
- | real `Button` behavior where control semantics matter | drawing a fake button on canvas with only touch coordinates |
42
- | dp/sp units and resize-aware layout | absolute pixels copied from one mockup |
43
- | cancel/complete Clock/thread work explicitly | background thread mutating UI/state after screen destruction |
44
- | explicit keyboard/focus order | assuming tab/screen-reader behavior exists automatically |
45
- | non-color/icon/text state cues | color-only validation or status |
61
+ | Use `dp()` / `sp()` metrics and `RecycleView` for long lists | Hard-code raw pixels or dump 500 widgets into a `ScrollView` |
62
+ | Use KivyMD 2.x `MDApp` / `theme_cls` for Material 3 mobile UI | Hand-draw buttons with raw `canvas` rectangles and touch math |
63
+ | Marshal worker results via `@mainthread` and cancel `Clock` jobs in `on_leave` | Mutate Kivy widgets directly from a Python background thread |
64
+ | Set `Window.softinput_mode` and test keyboard occlusion on device | Assume desktop window layout works when the Android IME opens |
65
+ | Disclose Kivy's screen-reader limitations honestly | Claim VoiceOver/TalkBack compliance from a desktop launch |
46
66
 
47
67
  ## Known traps
48
68
 
49
- Canvas redraw/resize bugs, touch target inconsistency, platform packaging differences, text scaling/glyph coverage, weak screen-reader support, thread/UI lifecycle mistakes, keyboard occlusion, accidental absolute positioning, animation cancellation leaks.
69
+ Missing CJK/RTL/emoji font glyphs without HarfBuzz/Pango text provider, `canvas` instructions not bound to `pos`/`size`, mutating graphics from background threads causing GL crashes, Buildozer NDK/recipe version conflicts for C-extension packages, `kivy-ios` missing iOS privacy manifest or safe-area handling, keyboard hiding `TextInput` fields, uncancelled `Clock` timers leaking screens.
50
70
 
51
71
  ## Verification commands
52
72
 
53
73
  ```sh
54
- python main.py
55
- python -m pytest
56
74
  python -m compileall .
75
+ python -m pytest
76
+ python main.py
77
+ # Android / iOS packaging (run on configured Linux/macOS build hosts):
78
+ buildozer android debug
79
+ toolchain build python3 kivy
57
80
  ```
58
81
 
59
- Use actual desktop/device runs at multiple sizes/input modes. Kivy behavior cannot be verified meaningfully by compile/tests alone.
82
+ `compileall` and `pytest` provide `static` / logic evidence. Run the packaged app on actual Android/iOS/desktop targets across resize, soft-keyboard input, dark/light theme, and cold-start packaging checks for `rendered` evidence; mark untested mobile targets and screen-reader parity `not-checked`.