@thanhnguyxn/pixelcraft 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +20 -0
  4. package/.claude-plugin/plugin.json +22 -0
  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/LICENSE +21 -0
  13. package/README.md +264 -2
  14. package/SECURITY.md +28 -0
  15. package/assets/README.md +28 -0
  16. package/assets/pixelcraft-logo-128.png +0 -0
  17. package/assets/pixelcraft-logo-256.png +0 -0
  18. package/assets/pixelcraft-logo-512.png +0 -0
  19. package/bin/pixelcraft.mjs +852 -0
  20. package/docs/ARCHITECTURE.md +105 -0
  21. package/docs/DESIGN-RATIONALE.md +191 -0
  22. package/docs/INSTALL.md +221 -0
  23. package/evals/README.md +37 -0
  24. package/evals/fixtures/3d-web-engineering.json +69 -0
  25. package/evals/fixtures/README.md +36 -0
  26. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  27. package/evals/fixtures/ai-ui-libraries.json +53 -0
  28. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  29. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  30. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  31. package/evals/fixtures/build-and-architecture.json +53 -0
  32. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  33. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  34. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  35. package/evals/fixtures/component-systems.json +53 -0
  36. package/evals/fixtures/component-testing.json +53 -0
  37. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  38. package/evals/fixtures/creative-code-rendering.json +69 -0
  39. package/evals/fixtures/creative-reference-evidence.json +67 -0
  40. package/evals/fixtures/data-app-python-marimo.json +49 -0
  41. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  42. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  43. package/evals/fixtures/desktop-native-workspace.json +48 -0
  44. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  45. package/evals/fixtures/direction-prototype-complexity.json +29 -0
  46. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  47. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  48. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  49. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  50. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  51. package/evals/fixtures/enterprise-data-ui.json +53 -0
  52. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  53. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  54. package/evals/fixtures/file-upload-media-ui.json +53 -0
  55. package/evals/fixtures/finish-gate-anti-slop.json +30 -0
  56. package/evals/fixtures/forms-accessibility-negative.json +29 -0
  57. package/evals/fixtures/forms-validation.json +53 -0
  58. package/evals/fixtures/game-go-ebitengine.json +49 -0
  59. package/evals/fixtures/game-godot-gdscript.json +49 -0
  60. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  61. package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
  62. package/evals/fixtures/i18n-engineering.json +53 -0
  63. package/evals/fixtures/local-first-sync.json +53 -0
  64. package/evals/fixtures/lynxjs.json +53 -0
  65. package/evals/fixtures/maizzle-email.json +53 -0
  66. package/evals/fixtures/maps-geospatial.json +53 -0
  67. package/evals/fixtures/media-og-and-video-export.json +43 -0
  68. package/evals/fixtures/media-players.json +53 -0
  69. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  70. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  71. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  72. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  73. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  74. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  75. package/evals/fixtures/motion-engineering.json +69 -0
  76. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  77. package/evals/fixtures/plan-brownfield-evidence.json +28 -0
  78. package/evals/fixtures/plan-discovery-interview.json +31 -0
  79. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  80. package/evals/fixtures/reactive-data-apps.json +53 -0
  81. package/evals/fixtures/review-evidence-audit.json +43 -0
  82. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  83. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  84. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  85. package/evals/fixtures/state-architecture.json +53 -0
  86. package/evals/fixtures/styling-ecosystem.json +53 -0
  87. package/evals/fixtures/token-tooling.json +53 -0
  88. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  89. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  90. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  91. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  92. package/evals/fixtures/visual-qa-task-evidence.json +29 -0
  93. package/evals/fixtures/web-3d-engines.json +53 -0
  94. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  95. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  96. package/evals/fixtures/workflow-checkpoints.json +30 -0
  97. package/evals/pixelcraft-accessibility.md +74 -0
  98. package/evals/pixelcraft-brandkit.md +58 -0
  99. package/evals/pixelcraft-chat-ui.md +55 -0
  100. package/evals/pixelcraft-constrained.md +55 -0
  101. package/evals/pixelcraft-craft.md +76 -0
  102. package/evals/pixelcraft-data-apps.md +55 -0
  103. package/evals/pixelcraft-dataviz.md +59 -0
  104. package/evals/pixelcraft-desktop.md +55 -0
  105. package/evals/pixelcraft-direction.md +77 -0
  106. package/evals/pixelcraft-document.md +55 -0
  107. package/evals/pixelcraft-email.md +55 -0
  108. package/evals/pixelcraft-extensions.md +55 -0
  109. package/evals/pixelcraft-game-ui.md +59 -0
  110. package/evals/pixelcraft-handoff.md +57 -0
  111. package/evals/pixelcraft-media.md +55 -0
  112. package/evals/pixelcraft-mobile.md +59 -0
  113. package/evals/pixelcraft-patterns.md +73 -0
  114. package/evals/pixelcraft-plan.md +127 -0
  115. package/evals/pixelcraft-review.md +63 -0
  116. package/evals/pixelcraft-spatial.md +55 -0
  117. package/evals/pixelcraft-tokens.md +57 -0
  118. package/evals/pixelcraft-tui.md +55 -0
  119. package/evals/pixelcraft-ux.md +59 -0
  120. package/evals/pixelcraft-visual-qa.md +86 -0
  121. package/evals/pixelcraft-web.md +89 -0
  122. package/evals/pixelcraft.md +70 -0
  123. package/gemini-extension.json +6 -0
  124. package/install.ps1 +341 -0
  125. package/install.sh +512 -0
  126. package/package.json +91 -4
  127. package/plugin.json +29 -0
  128. package/scripts/build-adapters.mjs +288 -0
  129. package/scripts/build-release-archives.mjs +61 -0
  130. package/scripts/build-skill-zips.mjs +94 -0
  131. package/scripts/run-evals.mjs +397 -0
  132. package/scripts/sync-docs.mjs +381 -0
  133. package/scripts/test-build-adapters.mjs +61 -0
  134. package/scripts/test-cross-platform-qa.mjs +359 -0
  135. package/scripts/test-distribution.mjs +203 -0
  136. package/scripts/test-export-tokens.mjs +361 -0
  137. package/scripts/test-finish-gate.mjs +271 -0
  138. package/scripts/test-installers.mjs +216 -0
  139. package/scripts/test-release-archives.mjs +42 -0
  140. package/scripts/test-shoot.mjs +87 -0
  141. package/scripts/test-slop-scan.mjs +416 -0
  142. package/scripts/test-style-inventory.mjs +234 -0
  143. package/scripts/test-sync-docs.mjs +140 -0
  144. package/scripts/test-validate-skills.mjs +195 -0
  145. package/scripts/validate-skills.mjs +658 -0
  146. package/skills/pixelcraft/SKILL.md +155 -0
  147. package/skills/pixelcraft/references/design-brief.md +75 -0
  148. package/skills/pixelcraft/references/floor.md +90 -0
  149. package/skills/pixelcraft/references/report-template.md +49 -0
  150. package/skills/pixelcraft/references/stack-detection.md +226 -0
  151. package/skills/pixelcraft/references/surface-acceptance.md +52 -0
  152. package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
  153. package/skills/pixelcraft-accessibility/SKILL.md +54 -0
  154. package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
  155. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  156. package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
  157. package/skills/pixelcraft-accessibility/references/verification.md +64 -0
  158. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
  159. package/skills/pixelcraft-brandkit/SKILL.md +127 -0
  160. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
  161. package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
  162. package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
  163. package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
  164. package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
  165. package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
  166. package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
  167. package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
  168. package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
  169. package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
  170. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  171. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  172. package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
  173. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
  174. package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
  175. package/skills/pixelcraft-constrained/SKILL.md +52 -0
  176. package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
  177. package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
  178. package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
  179. package/skills/pixelcraft-craft/SKILL.md +58 -0
  180. package/skills/pixelcraft-craft/references/color.md +125 -0
  181. package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
  182. package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
  183. package/skills/pixelcraft-craft/references/layout.md +73 -0
  184. package/skills/pixelcraft-craft/references/motion.md +163 -0
  185. package/skills/pixelcraft-craft/references/typography.md +110 -0
  186. package/skills/pixelcraft-data-apps/SKILL.md +86 -0
  187. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  188. package/skills/pixelcraft-data-apps/references/dash.md +109 -0
  189. package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
  190. package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
  191. package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
  192. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
  193. package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
  194. package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
  195. package/skills/pixelcraft-data-apps/references/panel.md +99 -0
  196. package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
  197. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  198. package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
  199. package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
  200. package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
  201. package/skills/pixelcraft-dataviz/SKILL.md +60 -0
  202. package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
  203. package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
  204. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
  205. package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
  206. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  207. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
  208. package/skills/pixelcraft-desktop/SKILL.md +93 -0
  209. package/skills/pixelcraft-desktop/references/appkit.md +92 -0
  210. package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
  211. package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
  212. package/skills/pixelcraft-desktop/references/electron.md +96 -0
  213. package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
  214. package/skills/pixelcraft-desktop/references/gtk.md +97 -0
  215. package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
  216. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
  217. package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
  218. package/skills/pixelcraft-desktop/references/tauri.md +110 -0
  219. package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
  220. package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
  221. package/skills/pixelcraft-desktop/references/working-context.md +84 -0
  222. package/skills/pixelcraft-direction/SKILL.md +120 -0
  223. package/skills/pixelcraft-direction/references/composition-library.md +84 -0
  224. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  225. package/skills/pixelcraft-direction/references/direction-card.md +64 -0
  226. package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
  227. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  228. package/skills/pixelcraft-direction/references/movements.md +71 -0
  229. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  230. package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
  231. package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
  232. package/skills/pixelcraft-direction/references/wildcards.md +47 -0
  233. package/skills/pixelcraft-document/SKILL.md +58 -0
  234. package/skills/pixelcraft-document/references/archetypes.md +106 -0
  235. package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
  236. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  237. package/skills/pixelcraft-document/references/print-css.md +187 -0
  238. package/skills/pixelcraft-document/references/slides.md +198 -0
  239. package/skills/pixelcraft-email/SKILL.md +80 -0
  240. package/skills/pixelcraft-email/references/client-quirks.md +113 -0
  241. package/skills/pixelcraft-email/references/html-tables.md +114 -0
  242. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  243. package/skills/pixelcraft-email/references/mjml.md +54 -0
  244. package/skills/pixelcraft-email/references/react-email.md +95 -0
  245. package/skills/pixelcraft-extensions/SKILL.md +56 -0
  246. package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
  247. package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
  248. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  249. package/skills/pixelcraft-extensions/references/raycast.md +98 -0
  250. package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
  251. package/skills/pixelcraft-game-ui/SKILL.md +80 -0
  252. package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
  253. package/skills/pixelcraft-game-ui/references/godot.md +130 -0
  254. package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
  255. package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
  256. package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
  257. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  258. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
  259. package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
  260. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  261. package/skills/pixelcraft-handoff/SKILL.md +50 -0
  262. package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
  263. package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
  264. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  265. package/skills/pixelcraft-media/SKILL.md +49 -0
  266. package/skills/pixelcraft-media/references/banners-video.md +130 -0
  267. package/skills/pixelcraft-media/references/og-generation.md +154 -0
  268. package/skills/pixelcraft-media/references/social-cards.md +71 -0
  269. package/skills/pixelcraft-mobile/SKILL.md +86 -0
  270. package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
  271. package/skills/pixelcraft-mobile/references/flet.md +80 -0
  272. package/skills/pixelcraft-mobile/references/flutter.md +113 -0
  273. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  274. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
  275. package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
  276. package/skills/pixelcraft-mobile/references/kivy.md +82 -0
  277. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
  278. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  279. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  280. package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
  281. package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
  282. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  283. package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
  284. package/skills/pixelcraft-mobile/references/uikit.md +92 -0
  285. package/skills/pixelcraft-patterns/SKILL.md +75 -0
  286. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  287. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  288. package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
  289. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  290. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  291. package/skills/pixelcraft-patterns/references/commerce.md +47 -0
  292. package/skills/pixelcraft-patterns/references/communication.md +45 -0
  293. package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
  294. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  295. package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
  296. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  297. package/skills/pixelcraft-patterns/references/marketing.md +44 -0
  298. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  299. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  300. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  301. package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
  302. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  303. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  304. package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
  305. package/skills/pixelcraft-patterns/references/settings.md +51 -0
  306. package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
  307. package/skills/pixelcraft-plan/SKILL.md +103 -0
  308. package/skills/pixelcraft-plan/references/design-input.md +69 -0
  309. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  310. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  311. package/skills/pixelcraft-plan/references/plan-template.md +134 -0
  312. package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
  313. package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
  314. package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
  315. package/skills/pixelcraft-review/SKILL.md +86 -0
  316. package/skills/pixelcraft-review/references/audit-report.md +69 -0
  317. package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
  318. package/skills/pixelcraft-review/references/heuristics.md +63 -0
  319. package/skills/pixelcraft-review/references/personas.md +53 -0
  320. package/skills/pixelcraft-review/references/polish.md +78 -0
  321. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  322. package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
  323. package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
  324. package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
  325. package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
  326. package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
  327. package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
  328. package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
  329. package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
  330. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  331. package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
  332. package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
  333. package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
  334. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
  335. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
  336. package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
  337. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
  338. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
  339. package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
  340. package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
  341. package/skills/pixelcraft-spatial/SKILL.md +51 -0
  342. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
  343. package/skills/pixelcraft-spatial/references/platforms.md +147 -0
  344. package/skills/pixelcraft-tokens/SKILL.md +60 -0
  345. package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
  346. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
  347. package/skills/pixelcraft-tokens/references/adoption.md +55 -0
  348. package/skills/pixelcraft-tokens/references/format.md +84 -0
  349. package/skills/pixelcraft-tokens/references/governance.md +80 -0
  350. package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
  351. package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
  352. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  353. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
  354. package/skills/pixelcraft-tui/SKILL.md +76 -0
  355. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
  356. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  357. package/skills/pixelcraft-tui/references/ink.md +109 -0
  358. package/skills/pixelcraft-tui/references/ratatui.md +102 -0
  359. package/skills/pixelcraft-tui/references/rich.md +82 -0
  360. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  361. package/skills/pixelcraft-tui/references/textual.md +108 -0
  362. package/skills/pixelcraft-ux/SKILL.md +56 -0
  363. package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
  364. package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
  365. package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
  366. package/skills/pixelcraft-ux/references/forms.md +151 -0
  367. package/skills/pixelcraft-ux/references/i18n.md +221 -0
  368. package/skills/pixelcraft-ux/references/laws.md +39 -0
  369. package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
  370. package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
  371. package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
  372. package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
  373. package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
  374. package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
  375. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
  376. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  377. package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
  378. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
  379. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
  380. package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
  381. package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
  382. package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
  383. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  384. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
  385. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  386. package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
  387. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  388. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  389. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  390. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  391. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
  392. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
  393. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
  394. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
  395. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
  396. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
  397. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
  398. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
  399. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
  400. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
  401. package/skills/pixelcraft-web/SKILL.md +132 -0
  402. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  403. package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
  404. package/skills/pixelcraft-web/references/angular.md +108 -0
  405. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  406. package/skills/pixelcraft-web/references/astro.md +113 -0
  407. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  408. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  409. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  410. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  411. package/skills/pixelcraft-web/references/clojurescript.md +88 -0
  412. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  413. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  414. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  415. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  416. package/skills/pixelcraft-web/references/elm.md +53 -0
  417. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  418. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  419. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  420. package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
  421. package/skills/pixelcraft-web/references/gsap.md +102 -0
  422. package/skills/pixelcraft-web/references/html-css.md +220 -0
  423. package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
  424. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  425. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  426. package/skills/pixelcraft-web/references/java-web.md +61 -0
  427. package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
  428. package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
  429. package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
  430. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  431. package/skills/pixelcraft-web/references/media-players.md +104 -0
  432. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  433. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  434. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  435. package/skills/pixelcraft-web/references/pwa.md +230 -0
  436. package/skills/pixelcraft-web/references/qwik.md +94 -0
  437. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  438. package/skills/pixelcraft-web/references/react-next.md +168 -0
  439. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  440. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  441. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  442. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  443. package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
  444. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  445. package/skills/pixelcraft-web/references/server-rendered.md +114 -0
  446. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  447. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  448. package/skills/pixelcraft-web/references/solid.md +111 -0
  449. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  450. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  451. package/skills/pixelcraft-web/references/svelte.md +111 -0
  452. package/skills/pixelcraft-web/references/tailwind.md +99 -0
  453. package/skills/pixelcraft-web/references/video-media.md +69 -0
  454. package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
  455. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -0,0 +1,80 @@
1
+ # Flet
2
+
3
+ ## Token mapping
4
+
5
+ Store semantic colors, spacing, and typography roles in a Python module and wire them into `page.theme` and `page.dark_theme` (`ft.Theme` + `ft.ColorScheme`) once rather than passing hex literals to every control. Flet 0.25–1.0 evolved rapidly (introducing declarative `@ft.component` + hooks in 1.0 alongside imperative `page.add` / `page.update` in 0.25–0.28); inspect the installed `flet` version before choosing constructor names.
6
+
7
+ ```python
8
+ import flet as ft
9
+
10
+ class PcTokens:
11
+ ACTION = "#0074CA"
12
+ CONTROL_INLINE = 12
13
+
14
+ # Declarative idiom (Flet 1.0+):
15
+ @ft.component
16
+ def InvoiceActions(on_save):
17
+ saving, set_saving = ft.use_state(False)
18
+ return ft.SafeArea(
19
+ ft.Column(
20
+ spacing=PcTokens.CONTROL_INLINE,
21
+ controls=[
22
+ ft.FilledButton(
23
+ "Save invoice" if not saving else "Saving...",
24
+ disabled=saving,
25
+ on_click=lambda _: (set_saving(True), on_save()),
26
+ ),
27
+ ],
28
+ )
29
+ )
30
+
31
+ def main(page: ft.Page):
32
+ page.adaptive = True # renders Cupertino controls on iOS/macOS, Material on Android/Windows/Linux
33
+ page.theme = ft.Theme(color_scheme_seed=PcTokens.ACTION)
34
+ page.theme_mode = ft.ThemeMode.SYSTEM
35
+ page.render(lambda: InvoiceActions(on_save=lambda: None))
36
+ ```
37
+
38
+ ## Layout, adaptive controls, & SafeArea
39
+
40
+ - Always wrap top-level mobile screens in **`ft.SafeArea(...)`** so notches, Dynamic Island, status bars, and gesture navigation bars do not clip content or bottom actions.
41
+ - Enable **`page.adaptive = True`** (or opt into `ft.CupertinoButton`, `ft.CupertinoNavigationBar`, `ft.CupertinoAlertDialog`, `ft.CupertinoSlidingSegmentedButton` explicitly on Apple targets) so iOS/macOS users do not receive foreign Material chrome.
42
+ - Handle window/viewport resizing (`page.on_resized`) explicitly because Flet renders via Flutter across iOS, Android, macOS, Windows, Linux, and Web—do not freeze one desktop wireframe across every target.
43
+
44
+ ## Typography, motion, & reduced motion
45
+
46
+ Register custom font files via `page.fonts = {"Brand": "/fonts/Brand.ttf"}` and verify glyph coverage and fallback fonts on the actual target OS. Avoid fixed pixel `height` on text containers so localized or scaled copy does not clip.
47
+
48
+ Keep `animate`, `animate_opacity`, and `animate_position` durations brief and interruptible. Because system reduced-motion forwarding varies across Flutter/Flet hosts, expose an app-level reduced-motion toggle when animations carry motion and never use animation as the sole state cue.
49
+
50
+ ## Accessibility, states, & forms idioms
51
+
52
+ Use real interactive controls (`FilledButton`, `IconButton`, `Switch`, `Checkbox`, `TextField`) with `tooltip`, `label`, and `semantics_label` (`ft.Semantics`) rather than wrapping styled `ft.Text` in `ft.GestureDetector` or clickable `ft.Container`. Verify keyboard Tab order and VoiceOver/TalkBack/Narrator output on the shipped platform.
53
+
54
+ Model async state (`loading`, `empty`, `error`, `offline`) explicitly via reactive state or page controls with cancellation and duplicate-submit guards—never launch untracked `asyncio.create_task` loops that mutate detached controls. In forms, pair `ft.TextField` with persistent `label`, `keyboard_type`, `error_text` validated after completion/submit, and draft preservation across `page.views` / route changes.
55
+
56
+ ## Do/don't pairs
57
+
58
+ | Do | Don't |
59
+ |---|---|
60
+ | Centralize tokens in `page.theme` / `page.dark_theme` + `ft.SafeArea` | Scatter raw hex strings and forget safe-area padding on iOS/Android |
61
+ | Enable `page.adaptive = True` or `ft.Cupertino*` on Apple surfaces | Ship identical Material-only dialogs and controls to iOS users |
62
+ | Use real `ft.FilledButton` / `ft.IconButton` + `ft.Semantics` | Build primary actions from `ft.Container(on_click=...)` with no semantics |
63
+ | Track async tasks cleanly and guard against double-submit | Fire unawaited background coroutines that fail silently or race |
64
+ | Preserve form values in state across route transitions | Re-instantiate blank `ft.TextField` controls on every route push |
65
+
66
+ ## Known traps
67
+
68
+ API differences between Flet 0.25–0.28 imperative apps and Flet 1.0 declarative `@ft.component` apps, forgetting `ft.SafeArea` on Android 15/16 edge-to-edge or notched iPhones, packaging failures in `flet build` when native Python C-extensions are not compiled for mobile ABIs, missing `page.update()` in imperative mode, unverified screen-reader trees on target OS.
69
+
70
+ ## Verification commands
71
+
72
+ ```sh
73
+ python -m compileall .
74
+ python -m pytest
75
+ # Interactive run and mobile/desktop packaging (requires Flutter SDK for flet build):
76
+ flet run app.py
77
+ flet build apk # or: flet build ipa / flet build macos / flet build linux
78
+ ```
79
+
80
+ `compileall` and `pytest` provide `static` / logic evidence only. Inspect actual `flet run` and packaged `flet build` outputs on target devices/OSes for safe areas, adaptive Cupertino/Material parity, dark mode, text scaling, and screen-reader behavior (`rendered`; label untested platforms `not-checked`).
@@ -0,0 +1,113 @@
1
+ # Flutter
2
+
3
+ ## Token mapping
4
+
5
+ Map DTCG tokens into `ColorScheme`, `ThemeData`, `TextTheme`, component themes, and typed `ThemeExtension` subclasses for semantic roles outside Material defaults (spacing, semantic status surfaces, radii):
6
+
7
+ ```dart
8
+ @immutable
9
+ class PcSpacing extends ThemeExtension<PcSpacing> {
10
+ const PcSpacing({required this.controlInline, required this.sectionGap});
11
+ final double controlInline;
12
+ final double sectionGap;
13
+
14
+ @override
15
+ PcSpacing copyWith({double? controlInline, double? sectionGap}) => PcSpacing(
16
+ controlInline: controlInline ?? this.controlInline,
17
+ sectionGap: sectionGap ?? this.sectionGap,
18
+ );
19
+
20
+ @override
21
+ PcSpacing lerp(PcSpacing? other, double t) => other == null
22
+ ? this
23
+ : PcSpacing(
24
+ controlInline: lerpDouble(controlInline, other.controlInline, t)!,
25
+ sectionGap: lerpDouble(sectionGap, other.sectionGap, t)!,
26
+ );
27
+ }
28
+
29
+ final lightTheme = ThemeData(
30
+ colorScheme: ColorScheme.fromSeed(seedColor: PcTokens.brandSeed),
31
+ extensions: const [PcSpacing(controlInline: 12, sectionGap: 20)],
32
+ );
33
+ ```
34
+
35
+ Never scatter raw `Color(0xff…)` or hard-coded padding numbers across widgets.
36
+
37
+ ## Rendering engine (Impeller) & platform adaptation
38
+
39
+ - **Impeller** is Flutter's default renderer on iOS and Android (API 29+ via Vulkan with OpenGLES fallback on older/unsupported GPUs), eliminating Skia shader-compilation jank. Still profile custom fragment shaders, backdrop blurs, and heavy `saveLayer` clipping on mid-tier Android hardware rather than assuming desktop/simulator frame pacing.
40
+ - Respect host platform conventions rather than forcing identical chrome on iOS and Android: use adaptive widgets (`Switch.adaptive`, `Slider.adaptive`, `CircularProgressIndicator.adaptive`, `AlertDialog.adaptive`), iOS-idiomatic **`CupertinoSheetRoute` / `showCupertinoSheet`** for stacked modal sheets on Apple devices, and Material navigation/predictive back on Android.
41
+
42
+ ## Navigation (`GoRouter`) & state (`Riverpod 3`)
43
+
44
+ - Use **`GoRouter`** with **`StatefulShellRoute.indexedStack`** for persistent multi-tab state, typed deep-link routes, redirect guards, and Android predictive back integration:
45
+
46
+ ```dart
47
+ StatefulShellRoute.indexedStack(
48
+ builder: (context, state, navShell) => AppShell(navigationShell: navShell),
49
+ branches: [
50
+ StatefulShellBranch(routes: [GoRoute(path: '/invoices', builder: (_, __) => const InvoicesScreen())]),
51
+ StatefulShellBranch(routes: [GoRoute(path: '/settings', builder: (_, __) => const SettingsScreen())]),
52
+ ],
53
+ );
54
+ ```
55
+
56
+ - Model async state explicitly (`AsyncValue` / sealed state) with **`Riverpod 3`** (`@riverpod` codegen, built-in retry/offline persistence primitives, automatic `Ref` disposal) or your project's established `Bloc`/`ValueNotifier` architecture. Never rely on uncoordinated boolean flags (`isLoading && !hasError`).
57
+
58
+ ## Typography, accessibility, & reduced motion
59
+
60
+ Declare font families in `pubspec.yaml` with localization fallbacks. Read platform scaling, contrast, and motion preferences explicitly through `MediaQuery` and `AccessibilityFeatures`:
61
+
62
+ ```dart
63
+ final textScaler = MediaQuery.textScalerOf(context);
64
+ final highContrast = MediaQuery.highContrastOf(context);
65
+ final reduceMotion =
66
+ MediaQuery.disableAnimationsOf(context) ||
67
+ View.of(context).platformDispatcher.accessibilityFeatures.reduceMotion;
68
+ final largeText = textScaler.scale(16) >= 24;
69
+ ```
70
+
71
+ - Reflow horizontal label/value rows into `Column` layouts when `largeText` is true rather than clipping in fixed-height `SizedBox` containers.
72
+ - Dispose every `AnimationController` and skip non-essential spatial transitions when `reduceMotion` is true.
73
+ - Wrap custom visuals with `Semantics(label:, button:, liveRegion:)` and exclude decorative icons with `ExcludeSemantics`. Maintain ≥ `48×48 dp` (Android) / `44×44 pt` (iOS) targets (`kMinInteractiveDimension`). Verify semantic trees in TalkBack and VoiceOver.
74
+
75
+ ## Forms, restoration & 2026 store gates
76
+
77
+ Use `Form` + `TextFormField` with explicit `keyboardType`, `textInputAction`, `autofillHints` (`AutofillHints.email`, etc.), `FocusNode` traversal, `ScrollViewKeyboardDismissBehavior.onDrag` for interactive keyboard dismissal, and `AutovalidateMode.onUnfocus` (or on-submit) so errors do not scold mid-keystroke.
78
+
79
+ - **OS process-death restoration**: set `restorationScopeId: 'app'` on `MaterialApp.router` / `CupertinoApp.router` and persist active tab/route and unsent form inputs with `RestorationMixin` (`RestorableTextEditingController`, `RestorableInt`) or Riverpod persisted storage so `adb shell am kill` and iOS RAM eviction never wipe active tasks.
80
+ - **`120fps` ProMotion & `< 1.2 s` cold start**: enable `<key>CADisableMinimumFrameDurationOnPhone</key><true/>` in `ios/Runner/Info.plist` so Impeller drives `120 Hz` ProMotion (`< 8.33 ms`/frame), seed release gestures into `SpringSimulation(..., velocity)`, and defer heavy plugin init past `runApp()`.
81
+ - **2026 App Store & Google Play compliance**:
82
+ - **iOS**: build with **Xcode 26 SDK**, ship `PrivacyInfo.xcprivacy` (auditing every CocoaPod/SPM plugin's privacy manifest), store tokens solely in Keychain via `flutter_secure_storage` (never `shared_preferences`), offer **Sign in with Apple** parity whenever social login exists, wire real **in-app Account Deletion**, and use zero-permission system photo pickers (`image_picker` PHPicker / Android Photo Picker).
83
+ - **Android**: target **`targetSdk = 36`** (`.aab`), call `SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge)` while consuming `MediaQuery.paddingOf(context)` / `viewInsetsOf(context)`, keep `sw >= 600dp` tablets/foldables unlocked across orientations/postures, enable Predictive Back (`android:enableOnBackInvokedCallback="true"` + `PopScope`), store secrets in Android Keystore (`flutter_secure_storage`), and compile all FFI/plugin native `.so` binaries with **NDK r28+** (`16 KB` ELF page alignment verified via `zipalign -c -P 16`).
84
+
85
+ ## Flutter web (WasmGC / Skwasm) note
86
+
87
+ Flutter 3.29 removed the legacy HTML renderer; Flutter Web now compiles to **WasmGC (`Skwasm`)** (`flutter build web --wasm`) or CanvasKit (`JS`). Canvas-rendered web apps require explicit `SemanticsBinding.instance.ensureSemantics()` / accessibility verification and still trade off native browser text selection, bundle startup size, and SEO. For browser-dominant or content/SEO products, apply `pixelcraft-web` verification and compare a DOM-rendered alternative in `pixelcraft-plan` before committing.
88
+
89
+ ## Do/don't pairs
90
+
91
+ | Do | Don't |
92
+ |---|---|
93
+ | `FilledButton(onPressed: save, child: const Text('Save invoice'))` | `GestureDetector` wrapping styled `Text` as a primary control |
94
+ | Check both `MediaQuery.disableAnimationsOf(context)` and `accessibilityFeatures.reduceMotion` | Assume Flutter disables custom `AnimationController` loops automatically |
95
+ | Set `CADisableMinimumFrameDurationOnPhone = true`, `targetSdk = 36`, NDK r28+ (`16 KB` `.so`), and `flutter_secure_storage` | Cap ProMotion at `60fps`, ship `4 KB`-aligned `.so` plugins, or store auth tokens in `shared_preferences` |
96
+ | Wire `restorationScopeId` + `RestorationMixin`, `PrivacyInfo.xcprivacy`, and real in-app Account Deletion | Lose form drafts on `adb shell am kill` or punt account deletion to a support email |
97
+ | `StatefulShellRoute.indexedStack` + `Switch.adaptive` / `CupertinoSheetRoute` | Rebuild tab roots on every tap or force identical Android dialogs onto iOS |
98
+
99
+ ## Known traps
100
+
101
+ Using `BuildContext` across `async` gaps without `context.mounted` checks, `AnimationController`/`TextEditingController` disposal leaks, fixed-height `Container` clipping `TextScaler` at `200%`, outdated FFI plugins bundling `4 KB`-aligned Android `.so` binaries, storing tokens in `shared_preferences`, missing `Semantics` labels on custom `CustomPainter` views, brittle golden tests using fake single-word fixtures.
102
+
103
+ ## Verification commands
104
+
105
+ ```sh
106
+ flutter analyze
107
+ flutter test
108
+ flutter build appbundle --release
109
+ # Verify 16 KB native library alignment on Android release artifact:
110
+ zipalign -c -P 16 -v 4 build/app/outputs/flutter-apk/app-release.apk
111
+ ```
112
+
113
+ `flutter analyze`, unit/widget tests, and `zipalign -c -P 16` are `static` evidence. Inspect real iOS (`>= 2`) and Android (`>= 3` across Pixel + OEM skins) devices across TalkBack/VoiceOver, `TextScaler` `200%`, Dark Mode, High Contrast, Reduce Motion, `adb shell am kill` restoration, and predictive/swipe back for `rendered` evidence; label untested targets `not-checked`.
@@ -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`.
@@ -0,0 +1,87 @@
1
+ # Ionic / Capacitor
2
+
3
+ ## Token mapping & Ionic 8 palettes
4
+
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
+
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
+
12
+ :root {
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);
17
+ }
18
+ ```
19
+
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
23
+
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.
25
+
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.
27
+
28
+ ## Capacitor without Ionic (plain web frameworks + Konsta / Tailwind)
29
+
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:
31
+
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).
36
+
37
+ ## Forms idiom (Ionic 7/8 `label` / `labelPlacement`)
38
+
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`:
40
+
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
+ ```
52
+
53
+ Prefer `label-placement="stacked"` for dense or localized forms so long labels do not overlap values or clip on narrow screens.
54
+
55
+ ## Typography, motion, accessibility, & states idioms
56
+
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.
58
+
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).
60
+
61
+ ## Do/don't pairs
62
+
63
+ | Do | Don't |
64
+ |---|---|
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 |
70
+
71
+ ## Known traps
72
+
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.
74
+
75
+ ## Verification commands
76
+
77
+ ```sh
78
+ npm run lint
79
+ npm run test -- --watch=false
80
+ npm run build
81
+ npx cap sync
82
+ # Run on real device/emulator when Xcode or Android SDK is installed:
83
+ npx cap run ios
84
+ npx cap run android
85
+ ```
86
+
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`).
@@ -0,0 +1,129 @@
1
+ # Jetpack Compose
2
+
3
+ ## Token mapping & Material 3 Expressive
4
+
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
+
7
+ ```kotlin
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
+ }
22
+ ```
23
+
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).
25
+
26
+ ## Edge-to-Edge (Android 15/16) & responsive adaptive layouts
27
+
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:
29
+
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
+ ```
60
+
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).
62
+
63
+ ## Typography & custom fonts
64
+
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.
72
+
73
+ ## Accessibility specifics
74
+
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`)
78
+
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.
80
+
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
+ ```
95
+
96
+ ## 2026 Google Play submission, 16 KB page alignment & Baseline Profiles
97
+
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.
102
+
103
+ ## Do/don't pairs
104
+
105
+ | Do | Don't |
106
+ |---|---|
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 |
113
+
114
+ ## Known traps
115
+
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.
117
+
118
+ ## Verification commands
119
+
120
+ ```sh
121
+ ./gradlew assembleRelease
122
+ ./gradlew testDebugUnitTest
123
+ ./gradlew connectedDebugAndroidTest
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
127
+ ```
128
+
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`.
@@ -0,0 +1,82 @@
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
32
+ ```
33
+
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.
35
+
36
+ ## Layout and responsive idioms
37
+
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"`).
39
+
40
+ ## Typography, motion, & reduced motion
41
+
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).
43
+
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.
45
+
46
+ ## Accessibility, states, & forms idioms
47
+
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.
49
+
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.
51
+
52
+ ## Mobile packaging: Buildozer & `kivy-ios`
53
+
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.
56
+
57
+ ## Do/don't pairs
58
+
59
+ | Do | Don't |
60
+ |---|---|
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 |
66
+
67
+ ## Known traps
68
+
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.
70
+
71
+ ## Verification commands
72
+
73
+ ```sh
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
80
+ ```
81
+
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`.