@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,102 @@
1
+ # Component systems and UI libraries
2
+
3
+ Choose a component system by **code ownership, visual distinctiveness, accessibility burden, and framework fit**—never by popularity alone. Do not install two competing component libraries in the same application surface.
4
+
5
+ ## Three architectural models
6
+
7
+ | Model | Examples | Customization & brand control | Accessibility ownership | Upgrade & maintenance cost | Best fit |
8
+ |---|---|---|---|---|---|
9
+ | **Headless primitives** | **Base UI** (`@base-ui/react`), **Radix UI** (`radix-ui`), React Aria Components, Ark UI, Kobalte, Corvu, Reka UI, Bits UI, Headless UI, Ariakit | Full (zero opinionated CSS) | Library handles WAI-ARIA, keyboard, focus, roving tabindex | Low API churn; you own all styling | Custom design systems, distinctive brand products |
10
+ | **Source-first (copy-own)** | `shadcn/ui` (Radix or Base UI), `shadcn-svelte`, `shadcn-vue`, **Park UI** (Ark UI + Panda/Tailwind) | Full (source lives in your repo) | Delegated to underlying headless primitives (Base UI / Radix / Ark / Bits / Reka) | Manual diffing for upstream updates; zero version lock-in | Teams wanting fast velocity + full code ownership |
11
+ | **Styled & enterprise suites** | MUI, Ant Design, Mantine, Chakra UI v3, **Nuxt UI v3/v4**, HeroUI, Fluent UI, **React Spectrum S2**, Carbon, Vuetify, PrimeVue, Angular Material | Medium (theme tokens/overrides; fighting defaults is expensive) | Built-in per vendor spec | Package upgrades; larger baseline bundle | Internal tools, enterprise suites, ecosystems matching that design language |
12
+
13
+ ## Headless primitives comparison
14
+
15
+ | Library | Maintainer / Core | DOM composition idiom | Frameworks | Standout strength |
16
+ |---|---|---|---|---|
17
+ | **Base UI (`@base-ui/react`)** | MUI team (incl. Radix & Floating UI authors) | Explicit `render` prop (nestable) + `Positioner` CSS vars (`--anchor-width`, `--available-height`) | React | Predictable `render` API without fragile `asChild` ref-merging; strong RTL & active v1+ maintenance (renamed from `@base-ui-components/react`) |
18
+ | **Radix UI (`radix-ui`)** | WorkOS | `asChild` (`Slot`) prop merging | React | Mature, widely deployed; unified `radix-ui` package replaces dozens of separate `@radix-ui/react-*` installs |
19
+ | **React Aria Components** | Adobe | Render props + `data-*` states (`data-entering`/`data-exiting`) + `--trigger-width` | React | Gold-standard WAI-ARIA, i18n, date/number/RTL, and screen-reader testing; underpins **React Spectrum S2** (`@react-spectrum/s2`) |
20
+ | **Ark UI / Zag.js** | Chakra team (Zag.js state machines) | `asChild` + `RootProvider` (`Ark UI`) or framework-agnostic `useMachine` + `normalizeProps` (`Zag.js`) | React, Vue, Solid, Svelte | Single finite-state-machine core across frameworks; adopt **Zag.js** directly when authoring a multi-framework design system without wrapper lock-in |
21
+ | **Melt UI** | Svelte OSS | Svelte 5 rune class builders (`new Select(...)`, `new Dialog(...)`) spreading trigger/content attributes directly onto native elements | Svelte 5 | Zero-wrapper Svelte 5 ergonomics (`melt` v1/Next) preserving direct DOM control and full Tailwind/CSS flexibility |
22
+ | **Kobalte & Corvu** | Solid OSS | Fine-grained Solid signals + `as` polymorphic prop (`Kobalte`) / specialized drawers & popovers (`Corvu`) | Solid | Idiomatic zero-VDOM accessible primitives built directly for Solid/SolidStart |
23
+ | **Headless UI** | Tailwind Labs | Render props + `data-*` state attributes | React, Vue | Minimal API surface for common disclosure/dialog/menu/combobox patterns |
24
+ | **Ariakit** | OSS | Polymorphic `render` prop + store hooks (`useComboboxStore`, `useMenuStore`, `useCompositeStore`) | React | Low-level composability for complex composite widgets: menubars, grids, nested submenus, and `aria-activedescendant` virtual focus |
25
+
26
+ ```tsx
27
+ // Base UI (@base-ui/react): explicit `render` prop avoids hidden ref/event merging surprises
28
+ import { Menu } from '@base-ui/react/menu';
29
+
30
+ <Menu.Trigger render={<button type="button" className="btn-trigger" />}>
31
+ Actions
32
+ </Menu.Trigger>
33
+
34
+ // Radix UI (unified `radix-ui` package): `asChild` merges props/refs onto a single ref-accepting child
35
+ import { Dialog } from 'radix-ui';
36
+
37
+ <Dialog.Trigger asChild>
38
+ <button type="button" className="btn-trigger">Open</button>
39
+ </Dialog.Trigger>
40
+
41
+ // Ariakit: composite grid / combobox with explicit store and `render` composition
42
+ import * as Ariakit from '@ariakit/react';
43
+
44
+ <Ariakit.ComboboxProvider>
45
+ <Ariakit.Combobox placeholder="Filter workspace…" className="field-input" />
46
+ <Ariakit.ComboboxPopover gutter={6} className="popover-surface">
47
+ <Ariakit.ComboboxItem value="billing" className="popover-item" />
48
+ </Ariakit.ComboboxPopover>
49
+ </Ariakit.ComboboxProvider>
50
+ ```
51
+
52
+ ### Standalone Zag.js & Melt UI (Svelte 5) idioms
53
+
54
+ - **Zag.js standalone** (`@zag-js/dialog`, `@zag-js/combobox`, `@zag-js/tabs` + `@zag-js/react|vue|solid|svelte`): use when one team ships identical interactive state-machine behavior across React, Vue, Svelte, and Solid design-system packages. Call `useMachine(machine, { id: useId() })`, connect with `connect(service, normalizeProps)`, and spread `api.getTriggerProps()` / `api.getContentProps()` onto semantic HTML elements.
55
+ - **Melt UI (Svelte 5 / Melt Next)**: prefer rune-based builder classes (`const tabs = new Tabs({ value: () => active })` with `{...tabs.getTrigger('billing')}`) over legacy Svelte 4 store actions (`createTabs` + `use:melt`) so fine-grained `$state`/`$derived` reactivity stays clean and SSR-safe.
56
+
57
+ ## `shadcn/ui` anti-slop guardrail
58
+
59
+ `shadcn/ui` (and `shadcn-svelte` / `shadcn-vue`) is a **source-first scaffolding starter**, NOT a finished visual identity. Shipping untouched default zinc neutrals (`--background`, `--muted`, `--border`), default `0.5rem` card radii, identical hairline card grids, and stock Inter/Geist defaults produces immediately recognizable AI slop.
60
+
61
+ Before building feature screens with `shadcn/ui` or Park UI:
62
+ 1. Replace the generated CSS variables in `globals.css` with the project's semantic tokens from `pixelcraft-tokens` (surface hierarchy, ink contrast, brand accent, semantic radius scale, typography roles, and motion curve).
63
+ 2. Remove unused default card borders/shadows when direction calls for editorial rules, flat tonal surfaces, or denser operational chrome.
64
+ 3. Audit copied primitives (`components/ui/*`) for accessibility parity (dialog titles, focus rings, disabled contrast) and keep them aligned with the chosen underlying primitive (`@base-ui/react` or unified `radix-ui`).
65
+
66
+ ## Positioning: Floating UI vs native browser primitives
67
+
68
+ - Prefer **native HTML primitives** when target browser support allows: `[popover]` + CSS Anchor Positioning (`anchor-name`, `position-anchor`, `position-try-fallbacks`, plus `margin: 0` reset) for top-layer tooltips/menus, **Invoker Commands** (`<button commandfor="id" command="toggle-popover">`) for zero-JS declarative triggers, and **Customizable `<select>`** (`@supports (appearance: base-select)` + `::picker(select)`) for styled dropdowns that keep native keyboard, form, and accessibility semantics.
69
+ - Use **Floating UI** (`@floating-ui/dom` for positioning only, or `@floating-ui/react` which adds `useClick`, `useDismiss`, `useRole`, `useHover({ handleClose: safePolygon() })` for diagonal Safe-Triangle submenu corridors, `useInteractions`, and `FloatingFocusManager`) when you need virtual reference elements (cursor-following tooltips, text-selection popovers), cascading pointer submenus (if not already using `@base-ui/react`, `radix-ui`, or Ariakit `Menu.Sub`), custom collision boundaries, or legacy browser parity.
70
+ - **Critical `autoUpdate` lifecycle rule**: pass `whileElementsMounted: autoUpdate` to `useFloating()` **only** when the floating element is conditionally mounted/unmounted; if hidden via CSS (`display: none`), call `autoUpdate` inside an effect keyed on `isOpen` and return its cleanup function to avoid leaking scroll/resize listeners.
71
+
72
+ ## Ecosystem map by framework
73
+
74
+ | Framework | Headless / Source-first | Styled / Enterprise suites |
75
+ |---|---|---|
76
+ | **React** | **Base UI (`@base-ui/react`)**, **Radix UI (`radix-ui`)**, React Aria, Ark UI / **Zag.js**, **Ariakit**, **`shadcn/ui`** (supports both Radix & Base UI), **Park UI** | MUI, Ant Design, Mantine, Chakra UI v3, HeroUI; Enterprise: Fluent UI, **React Spectrum S2 (`@react-spectrum/s2`)**, IBM Carbon |
77
+ | **Vue / Nuxt** | Reka UI (successor to Radix Vue), Ark UI / **Zag.js**, Headless UI, `shadcn-vue`, **Park UI** | **Nuxt UI v3/v4** (Reka UI + Tailwind Variants), Vuetify, PrimeVue, Quasar, Element Plus, Naive UI |
78
+ | **Solid** | **Kobalte**, **Corvu**, **Ark UI** / **Zag.js**, **Park UI** | Solid UI / Kobalte-based design-system kits |
79
+ | **Svelte** | Bits UI, **Melt UI** (Svelte 5 builders), Ark UI / **Zag.js**, `shadcn-svelte` | Skeleton |
80
+ | **Angular** | Angular CDK (`@angular/cdk`), Spartan | Angular Material, PrimeNG, NG-ZORRO |
81
+
82
+ Verify current major versions and framework compatibility (e.g., React 19 ref-as-prop, Svelte 5 runes, Tailwind v4) against official docs before adopting.
83
+
84
+ ## Component contract rules
85
+
86
+ - **Controlled and uncontrolled parity**: support both `value` + `onValueChange` (controlled) and `defaultValue` (uncontrolled) on reusable inputs/tabs/dialogs; never switch between modes mid-lifecycle.
87
+ - **Compound components over prop explosion**: expose composable parts (`Dialog.Root`, `Dialog.Trigger`, `Dialog.Content`, `Dialog.Close`) instead of 30 boolean/config props on one monolith.
88
+ - **Portal, inert, and focus restoration**: overlays rendered in portals must trap/scope focus while modal, mark background inert, close on `Escape`, and restore focus to the exact trigger on close.
89
+ - **Deterministic SSR IDs**: generate `aria-controls` / `aria-labelledby` IDs with framework primitives (`useId()`, `$props.id()`, `createUniqueId()`), never `Math.random()` or module-level counters that cause hydration mismatches.
90
+ - **Token boundary**: map design tokens into the library's theme/CSS-variable layer rather than writing `!important` overrides against vendor class names.
91
+
92
+ ## Do/don't pairs
93
+
94
+ | Do | Don't |
95
+ |---|---|
96
+ | Wrap headless or styled primitives behind thin project-owned semantic wrappers (`Button`, `Dialog`) | Import raw third-party component internals in 100 feature files with ad-hoc overrides |
97
+ | Author project tokens (`pixelcraft-tokens`) before building on `shadcn/ui` or Park UI | Ship untouched `shadcn/ui` default zinc colors, `0.5rem` radius, and stock hairline borders |
98
+ | Use Zag.js for cross-framework state machines, Ariakit for composite grids/menubars, and Melt UI Svelte 5 builders | Reimplement `aria-activedescendant`, roving tabindex, or legacy Svelte 4 store actions by hand |
99
+ | Use current package names (`@base-ui/react`, unified `radix-ui`, `reka-ui`, `@react-spectrum/s2`) | Install deprecated `@base-ui-components/react`, `radix-vue`, or 20 mismatched `@radix-ui/react-*` versions |
100
+ | Pick one model (e.g., Base UI / Kobalte / Reka UI + semantic tokens) consistently per app | Mix MUI, Ant Design, and Radix portals on the same route (conflicting z-index/focus/CSS resets) |
101
+ | Keep semantic `<button>` / `<a>` elements when using `asChild` or `render` | Pass a non-interactive `<div>` into a trigger without keyboard/role semantics |
102
+ | Strip unused library theme layers and tree-shake icons/components | Ship a full enterprise suite CSS bundle just for one date picker |
@@ -0,0 +1,170 @@
1
+ # Component development and frontend testing
2
+
3
+ Choose the testing layer by what must be proved: logic contracts in unit tests, real layout/focus/ARIA behavior in browser component tests, end-to-end user journeys in E2E tests, and visual/accessibility regressions in dedicated snapshot and axe checks. Do not claim `rendered` visual or layout verification from `jsdom`/`happy-dom` tests (`jsdom` does not compute real layout, fonts, media queries, or CSS cascade).
4
+
5
+ ## Toolchain decision matrix
6
+
7
+ | Layer | Tools | Runs in real browser? | Best fit | Primary trap |
8
+ |---|---|---|---|---|
9
+ | **Component workshop** | **Storybook** (CSF 3 + `play` + Vitest addon + `addon-a11y`), **Histoire** (Vue/Svelte), **Ladle** (lightweight React/Vite) | Yes | Isolated component states, design system docs, interactive stories, visual baselines | Treating stories as static screenshots instead of executable state + interaction specs |
10
+ | **Unit & DOM tests** | **Vitest**, **Jest**, **Testing Library** (`@testing-library/*` + `user-event`) | No (unless Vitest Browser Mode) | Pure logic, reducers, formatters, schema validators, fast hook/DOM contracts | Asserting CSS layout, sticky positioning, or focus traps inside `jsdom` |
11
+ | **Real-browser component tests** | **Vitest Browser Mode** (`@vitest/browser-playwright`), **Storybook + Vitest**, **Playwright story gallery** (`@playwright/test`) | Yes | Component contracts that depend on real CSS, focus order, Shadow DOM, Popover/Dialog, or canvas | Relying on removed `@playwright/experimental-ct-*` packages (removed in Playwright 1.63+) |
12
+ | **E2E tests** | **Playwright**, **Cypress**, **WebdriverIO** | Yes | Critical multi-route flows, auth, network/SSR hydration, cross-browser checks | Sleeping (`waitForTimeout`) instead of auto-retrying web-first assertions |
13
+ | **Visual regression** | **Chromatic** (Storybook cloud), **Percy**, **Loki**, Playwright `toHaveScreenshot()` | Yes | Catching unintended spacing, typography, dark-mode, and responsive regressions | Unmasked dynamic dates/avatars/animations causing flaky diffs |
14
+ | **Accessibility regression** | **`@axe-core/playwright`**, **`@storybook/addon-a11y`**, **`vitest-axe` / `jest-axe`**, **pa11y** | Yes (Playwright/Storybook/pa11y); DOM-only (`jest-axe`) | Continuous WCAG 2.1/2.2 A/AA checks on every PR | Assuming zero axe violations equals full accessibility (axe catches ~30–50% of WCAG issues; keyboard/focus/screen-reader flows still need verification) |
15
+
16
+ ## Component workshop & interaction testing (Storybook CSF 3 + `@storybook/addon-vitest`)
17
+
18
+ Write stories for every required state (default, loading, empty, error, disabled, overflow/long text, RTL/dark mode) and attach `play` functions for interactive contracts.
19
+
20
+ - In Storybook 9/10+, import `expect`, `fn`, and `waitFor` from `'storybook/test'` and destructure `{ args, canvas, step, userEvent }` directly in `play`.
21
+ - Wire **`@storybook/addon-vitest`** so every story (and its `play` + `addon-a11y` checks) executes directly in Vitest Browser Mode on CI, or reuse stories in standalone test files via **`composeStories(stories)`** from `@storybook/react` / `@storybook/vue3` / `@storybook/svelte` so decorators and args never drift.
22
+ - Pair Storybook and Vitest with **MSW v2** (`http.get`, `HttpResponse.json`) for deterministic network states rather than mocking `fetch` globally.
23
+
24
+ ```ts
25
+ // Dialog.stories.ts (Storybook CSF 3)
26
+ import type { Meta, StoryObj } from '@storybook/react-vite';
27
+ import { expect, fn, waitFor } from 'storybook/test';
28
+ import { Dialog } from './Dialog';
29
+
30
+ const meta = {
31
+ component: Dialog,
32
+ args: { onConfirm: fn() },
33
+ } satisfies Meta<typeof Dialog>;
34
+ export default meta;
35
+
36
+ type Story = StoryObj<typeof meta>;
37
+
38
+ export const OpensAndConfirms: Story = {
39
+ play: async ({ args, canvas, step, userEvent }) => {
40
+ await step('Open dialog', async () => {
41
+ await userEvent.click(canvas.getByRole('button', { name: /delete item/i }));
42
+ await expect(canvas.getByRole('dialog')).toBeInTheDocument();
43
+ });
44
+
45
+ await step('Confirm action', async () => {
46
+ await userEvent.click(canvas.getByRole('button', { name: /confirm/i }));
47
+ await waitFor(() => expect(args.onConfirm).toHaveBeenCalledTimes(1));
48
+ });
49
+ },
50
+ };
51
+ ```
52
+
53
+ ```ts
54
+ // MSW v2 network handler (shared across Storybook, Vitest, and browser tests)
55
+ import { http, HttpResponse } from 'msw';
56
+
57
+ export const handlers = [
58
+ http.get('/api/invoices', ({ request }) => {
59
+ const q = new URL(request.url).searchParams.get('q') ?? '';
60
+ return HttpResponse.json({ items: q ? [] : [{ id: '1', number: 'INV-101' }] });
61
+ }),
62
+ ];
63
+ ```
64
+
65
+ ## Real-browser component testing (Vitest Browser Mode)
66
+
67
+ Use **Vitest Browser Mode** when a component relies on real layout, CSS custom properties, `@container` queries, Shadow DOM, or native `<dialog>`/Popover behavior.
68
+
69
+ - In Vitest 4+, import `playwright` from `'@vitest/browser-playwright'` and pass `provider: playwright()` (not the legacy string `'playwright'`).
70
+ - Use `page.getByRole()` / `page.getByLabelText()` locators with `await expect.element(locator)` for built-in retryability.
71
+
72
+ ```ts
73
+ // vitest.config.ts (Vitest 4+)
74
+ import { defineConfig } from 'vitest/config';
75
+ import { playwright } from '@vitest/browser-playwright';
76
+
77
+ export default defineConfig({
78
+ test: {
79
+ browser: {
80
+ enabled: true,
81
+ provider: playwright(),
82
+ instances: [{ browser: 'chromium' }],
83
+ },
84
+ },
85
+ });
86
+ ```
87
+
88
+ ```ts
89
+ // AlertBanner.browser.test.ts
90
+ import { expect, test } from 'vitest';
91
+ import { page } from 'vitest/browser';
92
+
93
+ test('announces error state accessibly', async () => {
94
+ renderErrorBanner();
95
+ const banner = page.getByRole('alert', { name: /error/i });
96
+ await expect.element(banner).toHaveTextContent('Connection lost');
97
+ });
98
+ ```
99
+
100
+ ## Testing Library query & interaction contract
101
+
102
+ Follow Testing Library's accessibility-first query priority so tests validate the accessibility tree simultaneously:
103
+
104
+ 1. `getByRole('button', { name: /submit/i })` — top preference; if an interactive control cannot be found by role + accessible name, fix the component's accessibility first.
105
+ 2. `getByLabelText(/email/i)` — preferred for form inputs.
106
+ 3. `getByPlaceholderText`, `getByText`, `getByDisplayValue` — for non-interactive copy or filled values.
107
+ 4. `getByTestId` — last resort only when no user-visible role or text exists.
108
+
109
+ Always initialize `const user = userEvent.setup()` and `await user.click(...)` / `await user.type(...)` instead of low-level `fireEvent`, which bypasses focus, disabled, and visibility checks.
110
+
111
+ ## Playwright E2E, Clock, ARIA snapshots, visual regression, and axe-core
112
+
113
+ - **Accessibility fixture**: share a pre-configured `AxeBuilder` fixture via `test.extend()` targeting `['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa']` and assert `expect(results.violations).toEqual([])`.
114
+ - **Playwright Clock (`page.clock`)**: freeze dates and fast-forward debounces, polling intervals, session timeouts, or OTP resend timers deterministically (`await page.clock.install({ time: new Date('2026-03-01T09:00:00Z') })`, `await page.clock.fastForward('00:30')`) instead of sleeping with `waitForTimeout`.
115
+ - **Semantic ARIA snapshots**: use `await expect(locator).toMatchAriaSnapshot(...)` (inline YAML or `.aria.yml` file) to lock down roles, accessible names, heading levels, and checked/expanded states without breaking on benign CSS refactors.
116
+ - **Visual snapshots**: stabilize `toHaveScreenshot()` by disabling/reducing animations (`animations: 'disabled'`), waiting for `document.fonts.ready`, and masking dynamic timestamps or charts (`mask: [page.locator('[data-dynamic]')]`).
117
+ - **Component testing on Playwright 1.63+**: `@playwright/experimental-ct-*` packages were removed in Playwright 1.63; mount component stories through the app's dev server (or Storybook) using standard `@playwright/test` fixtures, or use Vitest Browser Mode.
118
+
119
+ ```ts
120
+ // tests/fixtures/axe.ts
121
+ import { test as base, expect } from '@playwright/test';
122
+ import AxeBuilder from '@axe-core/playwright';
123
+
124
+ export const test = base.extend<{ makeAxeBuilder: () => AxeBuilder }>({
125
+ makeAxeBuilder: async ({ page }, use) => {
126
+ await use(() =>
127
+ new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa']),
128
+ );
129
+ },
130
+ });
131
+
132
+ export { expect };
133
+ ```
134
+
135
+ ```ts
136
+ // Playwright Clock + ARIA snapshot example
137
+ test('OTP resend unlocks after 30 seconds and preserves accessible structure', async ({ page }) => {
138
+ await page.clock.install({ time: new Date('2026-03-01T09:00:00Z') });
139
+ await page.goto('/verify');
140
+ await expect(page.getByRole('button', { name: /resend code/i })).toBeDisabled();
141
+ await page.clock.fastForward('00:30');
142
+ await expect(page.getByRole('form', { name: /verify/i })).toMatchAriaSnapshot(`
143
+ - form "Verify email":
144
+ - textbox "Verification code"
145
+ - button "Resend code"
146
+ - button "Continue"
147
+ `);
148
+ });
149
+ ```
150
+
151
+ ## Do/don't pairs
152
+
153
+ | Do | Don't |
154
+ |---|---|
155
+ | Query interactive elements with `getByRole` + accessible `name` | Scatter `data-testid` on every button and input while leaving labels broken |
156
+ | Use `const user = userEvent.setup()` for realistic interactions | Use `fireEvent.click` on disabled or hidden controls without noticing they are unreachable |
157
+ | Use MSW v2 (`http.get`, `HttpResponse.json`) and `page.clock` for deterministic async/timer tests | Monkey-patch `global.fetch` or sprinkle `waitForTimeout(5000)` in E2E suites |
158
+ | Run layout, focus-trap, and Shadow DOM tests in Vitest Browser Mode / `@storybook/addon-vitest` / Playwright | Assert visual layout or responsive breakpoints in `jsdom` and mark them `rendered` |
159
+ | Mask timestamps and set `animations: 'disabled'` in visual snapshots; lock structure with `toMatchAriaSnapshot` | Approve brittle full-page screenshots that flake on every CI run |
160
+ | Combine `AxeBuilder` (`wcag22aa`) scans with keyboard/focus-order assertions | Treat a passing `jest-axe` or `AxeBuilder` run as complete WCAG proof |
161
+ | Use `provider: playwright()` from `@vitest/browser-playwright` on Vitest 4+ | Copy legacy `provider: 'playwright'` string config or removed `@playwright/experimental-ct-*` on Playwright 1.63+ |
162
+
163
+ ## Verification commands
164
+
165
+ ```sh
166
+ npx vitest run
167
+ npx playwright test
168
+ ```
169
+
170
+ Report `jsdom`/unit runs as `static` (or DOM-unit) evidence and real-browser Playwright / Vitest Browser Mode / Chromatic runs as `rendered` evidence.
@@ -0,0 +1,59 @@
1
+ # Creative effects cookbook
2
+
3
+ | Effect | Useful implementation | Avoid |
4
+ |---|---|---|
5
+ | Particle field | Bounded particle pool, spatial field, seeded initialization, pointer force with capped radius | Unbounded arrays/allocations in each frame |
6
+ | Image displacement | One displacement map and shader pass, responsive texture, static original image | Hiding essential image detail behind an inaccessible effect |
7
+ | Noise field | Deterministic seeded noise, slow evolution, bounded amplitude | Rapid random flicker or high-contrast strobe |
8
+ | Liquid-like transition | Mask/displacement between two meaningful states, short duration, interruptible | Uncontrolled full-screen distortion on every navigation |
9
+ | SDF typography/shape | Distance-field rendering when crisp scalable GPU text/shape is needed | Putting actual UI copy only in a shader |
10
+ | Generative grid | Rule-based cell layout, limited palette, deterministic seed | Decorative patterns without a relationship to content |
11
+ | Audio-reactive field | Map smoothed frequency bands to a few visual parameters | Mapping raw audio noise directly to flashing brightness |
12
+ | Pointer response | Normalized pointer vector, low-pass smoothing, capped strength | Following pointer without a touch/focus equivalent |
13
+
14
+ ## Interaction contract
15
+
16
+ Every effect states what pointer/keyboard/touch input changes, how it can be stopped/reset, whether it continues while hidden, and what a static user sees. Prefer subtle reaction over large movement. On touch, use an explicit control rather than pretending hover exists.
17
+
18
+ ## Deterministic seed & reduced-motion runtime pattern
19
+
20
+ Avoid `Math.random()` inside particle pools or generative grids—it breaks screenshot baselines and visual regression. Seed a tiny deterministic PRNG (such as Mulberry32), honor optional QA query overrides (`?seed=42&t=0`), and listen to `prefers-reduced-motion` dynamically so toggling the OS preference pauses live evolution immediately:
21
+
22
+ ```ts
23
+ // Deterministic Mulberry32 PRNG + live prefers-reduced-motion gate
24
+ export function createSeededRng(seed: number): () => number {
25
+ let a = seed >>> 0;
26
+ return () => {
27
+ a = (a + 0x6d2b79f5) | 0;
28
+ let t = Math.imul(a ^ (a >>> 15), 1 | a);
29
+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
30
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
31
+ };
32
+ }
33
+
34
+ export function createEffectRuntime(renderStatic: (t: number) => void, startLoop: () => () => void) {
35
+ const params = new URLSearchParams(window.location.search);
36
+ const frozenTime = params.has('t') ? Number(params.get('t')) : null;
37
+ const mql = window.matchMedia('(prefers-reduced-motion: reduce)');
38
+ let stopLoop: (() => void) | null = null;
39
+
40
+ const sync = () => {
41
+ stopLoop?.();
42
+ stopLoop = null;
43
+ if (frozenTime !== null || mql.matches) {
44
+ renderStatic(frozenTime ?? 0);
45
+ } else {
46
+ stopLoop = startLoop();
47
+ }
48
+ };
49
+
50
+ sync();
51
+ mql.addEventListener('change', sync);
52
+ return () => {
53
+ stopLoop?.();
54
+ mql.removeEventListener('change', sync);
55
+ };
56
+ }
57
+ ```
58
+
59
+ Record asset provenance and never bundle third-party example textures/models without license verification.
@@ -0,0 +1,34 @@
1
+ # Creative runtime integration for web
2
+
3
+ Use this when a web project combines DOM UI with animation, canvas, 3D, graphics, or media. Preserve the existing stack and make the creative runtime an isolated enhancement.
4
+
5
+ ## SSR & island boundary (React, Vue/Nuxt, SvelteKit, Astro, SolidStart)
6
+
7
+ - Keep SEO, copy, forms, and stateful product UI server-rendered when possible.
8
+ - Isolate Motion, GSAP, Three.js/R3F/Threlte/TresJS, PixiJS, and Web Audio inside narrow client boundaries (`'use client'` + dynamic import in Next.js, `.client.vue` / `<ClientOnly>` in Nuxt, `onMount` in SvelteKit, `client:visible` in Astro, `clientOnly()` in SolidStart).
9
+ - Dynamically import heavyweight renderers and large scenes; render a sized poster/DOM fallback first so CLS stays near zero.
10
+ - Never convert an entire route into a client-only bundle for one interactive canvas or animated CTA.
11
+ - Ensure SSR output never depends on `window`, `Math.random()`, `Date.now()`, or GPU probing; initialize nondeterministic effects after mount or use a fixed seed (`creative-effects.md`).
12
+
13
+ ## Ownership matrix
14
+
15
+ | Surface | Primary owner | Keep in DOM |
16
+ |---|---|---|
17
+ | UI state, layout/gesture | CSS or Motion (`motion/react` / vanilla `motion`) | All controls, focus order, and state labels |
18
+ | Choreographed timeline | GSAP (`gsap.md`) | Headings, navigation, form controls |
19
+ | 3D scene | Three.js / R3F / Babylon / Threlte / TresJS / `<model-viewer>` | Product data, options, purchase/navigation |
20
+ | 2D GPU scene | PixiJS v8 / Canvas 2D / WebGL / WebGPU | Headings, CTAs, instructions, accessible summaries |
21
+ | Audio / video | HTML media / Web Audio / Vidstack / Media Chrome / Tone.js | Play/mute/pause, captions, transcript |
22
+
23
+ Avoid duplicate animation ownership on the same properties. Coordinate scroll engines with the single controller selected in the plan.
24
+
25
+ ## Loading and failure states
26
+
27
+ - Load scene code/assets on demand and avoid blocking first content.
28
+ - Show a poster/placeholder with stable dimensions.
29
+ - Handle unsupported APIs, missing assets, network failure, WebGL/WebGPU context loss, and media playback rejection.
30
+ - Keep ordinary navigation and content functional if the creative runtime fails.
31
+
32
+ ## Cross-skill handoff
33
+
34
+ Pair browser runtime implementation here with `pixelcraft-craft` (motion/color/typography budgets), `pixelcraft-patterns` (narrative/scrollytelling structure), `pixelcraft-accessibility` (reduced-motion and non-visual parity), and `pixelcraft-visual-qa` (timeline capture and device performance budgets). For embodied XR/VR/AR headset UX, route to `pixelcraft-spatial`.
@@ -0,0 +1,53 @@
1
+ # Elm
2
+
3
+ ## Token mapping
4
+
5
+ Use generated CSS variables and semantic HTML classes; Elm views should consume meaning (`ui-action-primary`) rather than hard-code colors. Shared constants can exist in Elm for dynamic behavior, but visual source of truth belongs in CSS/theme assets.
6
+
7
+ ## Layout and responsive idioms
8
+
9
+ Elm architecture is Model–Update–View. Use `Browser.element/document/application` according to ownership; use real HTML and CSS responsive layout rather than measuring viewport in Elm unless interaction truly depends on it. Route state belongs in URL/model for application pages.
10
+
11
+ ## Typography/custom fonts
12
+
13
+ Load fonts through static HTML/CSS with subsets/fallbacks. Keep text scaling and long localized strings fluid; compile-time type safety does not prevent clipping.
14
+
15
+ ## Motion/reduced motion
16
+
17
+ Prefer CSS transitions/animations and `@media (prefers-reduced-motion: reduce)`. Use ports/subscription to media query only when motion behavior must affect Elm state. Keep animation completion out of correctness-critical state transitions.
18
+
19
+ ## Accessibility specifics
20
+
21
+ Use `Html`, `Html.Attributes` and semantic elements; ARIA only where HTML cannot express meaning. Manage focus explicitly through `Browser.Dom.focus` tasks after route/dialog/list mutation. Elm's virtual DOM does not automatically produce names, roles, landmarks, or focus order.
22
+
23
+ ## States idiom
24
+
25
+ Model impossible states precisely: remote data as `NotAsked/Loading/Success/Failure` or richer state. Cover empty, partial, offline, unauthorized, optimistic rollback, retry, deep-link restore, and stale data in the model rather than ad hoc booleans.
26
+
27
+ ## Forms idiom
28
+
29
+ Use forms/labels/types/autocomplete/inputmode and preserve model input on failed validation/server submit. Validate at appropriate blur/submit boundaries; server errors map back to fields without clearing input. Use ports only when native browser behavior truly cannot do the job.
30
+
31
+ ## Do/don't pairs
32
+
33
+ | Do | Don't |
34
+ |---|---|
35
+ | `Html.label [ for "email" ] [ text "Email" ]` | unlabeled placeholder-only input |
36
+ | explicit `RemoteData` branches | nested Bool/Maybe soup with impossible states |
37
+ | `Browser.Dom.focus` after dialog opens | leaving focus in deleted virtual DOM |
38
+ | CSS reduced-motion media query | timer-driven decorative motion by default |
39
+
40
+ ## Known traps
41
+
42
+ Focus tasks requiring element IDs, ports bypassing Elm invariants, URL/model drift, inaccessible custom widgets, over-modeling visual state, runtime decoder failure causing blank/error screens, test-only happy paths.
43
+
44
+ ## Verification commands
45
+
46
+ ```sh
47
+ elm make src/Main.elm
48
+ elm-test
49
+ elm-review
50
+ npx playwright test
51
+ ```
52
+
53
+ Inspect browser rendering, keyboard/focus flow, route/deep-link restore, offline/server failure, screen reader semantics, text scaling, and reduced-motion emulation.
@@ -0,0 +1,138 @@
1
+ # Enterprise data tables, grids, virtualization, spreadsheets, and schedulers
2
+
3
+ Do not render 5,000 DOM table rows or hand-roll Excel-style cell editing, column pinning, and timezone-aware scheduling. Choose between headless tables, enterprise grids, spreadsheet engines, virtualizers, and calendar schedulers by data scale, editing density, and license budget.
4
+
5
+ ## Architecture decision matrix
6
+
7
+ | Need | Tools | Rendering / model | Best fit | Primary trade-off |
8
+ |---|---|---|---|---|
9
+ | **Headless data tables** | **TanStack Table (v8)** | Framework-agnostic headless state (React, Vue, Solid, Svelte, Angular) | Custom-styled SaaS tables, full design-system control, server-side sort/filter/page | You own markup, sticky headers, keyboard grid nav, and virtualization wiring |
10
+ | **Enterprise data grids** | **AG Grid (v33+)**, **MUI X Data Grid**, **Glide Data Grid** | Virtualized DOM (AG Grid, MUI X) or Canvas 2D (Glide) | AG Grid/MUI X: 100k+ rows, grouping, inline editing, Excel export; **Glide Data Grid**: millions of cells at 60fps | Commercial licenses for Pro/Enterprise tiers; Canvas grids like Glide require explicit accessibility/DOM overlay discipline |
11
+ | **Spreadsheet UI** | **Handsontable**, **Univer** | Formula engine (HyperFormula / Univer Sheets), cell ranges, clipboard matrix | Financial modeling, bulk tabular editing with Excel copy/paste & formulas (**Univer** is Apache-2.0 open-source core) | Heavier than standard tables; commercial licenses for Handsontable / Univer Pro plugins |
12
+ | **List & table virtualization** | **TanStack Virtual (v3)**, **React Virtuoso**, **react-window** | Windowed DOM recycling | Long feeds, chat logs, 10k+ row headless tables (`TanStack Table + TanStack Virtual`) | Dynamic row heights require `measureElement`; native `Ctrl+F` search cannot see unmounted rows |
13
+ | **Calendars & schedulers** | **FullCalendar (v6/v7)**, **Schedule-X**, **Bryntum**, **DayPilot**, **vis-timeline** | Time-grid / resource-timeline views | **Schedule-X**: modern open-source React/Vue/Angular/Svelte calendar; **FullCalendar**: mature calendar ecosystem; **Bryntum/DayPilot**: heavy Gantt/resource planning; **vis-timeline**: lightweight timeline | Resource timeline/Gantt views are commercial in FullCalendar/Bryntum/DayPilot |
14
+
15
+ ## Headless tables + virtualization (TanStack Table v8 + TanStack Virtual v3)
16
+
17
+ - **Stable IDs & references**: always supply `getRowId: (row) => row.id` so row selection, expansion, and inline editing stay bound to record IDs rather than row indices. Memoize `columns` and `data` (never pass `data ?? []` inline every render).
18
+ - **Server-side mode**: set `manualSorting: true`, `manualFiltering: true`, `manualPagination: true`, pass `rowCount` (or `pageCount`), and omit client-only row models (`getSortedRowModel`, `getPaginationRowModel`).
19
+ - **Dynamic-height virtualization**: when using `useVirtualizer` with variable row heights, attach **both** `data-index={virtualRow.index}` and `ref={virtualizer.measureElement}` on every rendered row.
20
+
21
+ ```tsx
22
+ // TanStack Table v8 (server-side sorting & pagination)
23
+ const table = useReactTable({
24
+ data,
25
+ columns,
26
+ getRowId: (row) => row.uuid,
27
+ getCoreRowModel: getCoreRowModel(),
28
+ manualSorting: true,
29
+ manualPagination: true,
30
+ rowCount: query.data?.totalCount,
31
+ state: { sorting, pagination },
32
+ onSortingChange: setSorting,
33
+ onPaginationChange: setPagination,
34
+ });
35
+ ```
36
+
37
+ ```tsx
38
+ // TanStack Virtual v3 dynamic measurement
39
+ <div
40
+ key={virtualRow.key}
41
+ data-index={virtualRow.index}
42
+ ref={virtualizer.measureElement}
43
+ style={{ transform: `translateY(${virtualRow.start}px)` }}
44
+ >
45
+ {renderRow(rows[virtualRow.index])}
46
+ </div>
47
+ ```
48
+
49
+ ## Enterprise data grids (AG Grid v33+, MUI X Data Grid, Glide Data Grid)
50
+
51
+ ### AG Grid v33+
52
+
53
+ - **Module registration**: register only needed feature modules via `ModuleRegistry.registerModules([ClientSideRowModelModule, ...])` for tree-shaking—`AllCommunityModule` is convenient for prototyping but disables tree-shaking.
54
+ - **Theming API**: customize themes via `themeQuartz.withParams({ spacing, accentColor })` referencing semantic CSS variables (never hardcoded hex literals) passed to `<AgGridReact theme={myTheme} />` instead of legacy CSS theme imports.
55
+ - **Stable row updates**: pass `getRowId={({ data }) => data.id}` so streaming/realtime transactions update cells in place without resetting focus, scroll, or selection.
56
+
57
+ ```tsx
58
+ import { ClientSideRowModelModule, ModuleRegistry, themeQuartz } from 'ag-grid-community';
59
+ import { AgGridReact } from 'ag-grid-react';
60
+
61
+ ModuleRegistry.registerModules([ClientSideRowModelModule]);
62
+
63
+ const gridTheme = themeQuartz.withParams({
64
+ spacing: 8,
65
+ accentColor: 'var(--semantic-color-action)',
66
+ backgroundColor: 'var(--semantic-color-background)',
67
+ foregroundColor: 'var(--semantic-color-foreground)',
68
+ });
69
+
70
+ <AgGridReact
71
+ theme={gridTheme}
72
+ rowData={rows}
73
+ columnDefs={colDefs}
74
+ getRowId={({ data }) => data.id}
75
+ />
76
+ ```
77
+
78
+ ### MUI X Data Grid (`@mui/x-data-grid`)
79
+
80
+ - Bind `getRowId={(row) => row.uuid}` when records do not have an `id` field, and keep `columns` referentially stable (defined outside render or memoized) so cell editors and focus do not reset.
81
+ - For server-backed datasets, set `paginationMode="server"`, `sortingMode="server"`, `filterMode="server"`, and `rowCount={totalRows}` (pass `-1` when unknown), plus `loading={isFetching}` and explicit `slots={{ noRowsOverlay, loadingOverlay }}`.
82
+ - For inline editing, implement `processRowUpdate={async (nextRow, prevRow) => ...}` paired with `onProcessRowUpdateError` so failed server saves roll back cleanly and announce the error.
83
+
84
+ ```tsx
85
+ import { DataGrid, type GridColDef } from '@mui/x-data-grid';
86
+
87
+ <DataGrid
88
+ rows={rows}
89
+ columns={columns}
90
+ getRowId={(row) => row.uuid}
91
+ rowCount={totalCount}
92
+ paginationMode="server"
93
+ sortingMode="server"
94
+ paginationModel={paginationModel}
95
+ onPaginationModelChange={setPaginationModel}
96
+ loading={isFetching}
97
+ processRowUpdate={saveRowMutation}
98
+ onProcessRowUpdateError={showRowError}
99
+ />
100
+ ```
101
+
102
+ ### Glide Data Grid & Univer
103
+
104
+ - **Glide Data Grid**: draws cells to Canvas 2D with DOM portals for active cell editors; ideal for 100k–1M+ cell sheets, but verify keyboard navigation, clipboard copy/paste, and screen-reader export/alternative view because canvas pixels are not automatically exposed to assistive tech.
105
+ - **Univer**: modular open-source spreadsheet/workbook engine (`@univerjs/presets`) when Excel-grade formulas, formatting, and multi-sheet workbooks are required without Handsontable's commercial license.
106
+
107
+ ## Calendars, schedulers, and timelines
108
+
109
+ - **FullCalendar v7 vs v6**: verify the installed major—v7 consolidates plugin imports under `@fullcalendar/react/*` (`@fullcalendar/react/daygrid`, `@fullcalendar/react/interaction`), removes `@fullcalendar/core` as a peer dependency, and requires `temporal-polyfill`.
110
+ - **Schedule-X**: lightweight open-source alternative (`@schedule-x/calendar` + framework wrappers) with Temporal-first APIs (`Temporal.ZonedDateTime` / `PlainDate`), clean CSS variable theming, and Day/Week/Month views out of the box.
111
+ - **Timezone safety**: always configure `timeZone` explicitly (e.g., `'UTC'` or an IANA zone like `'America/New_York'`). Because native JS `Date` objects only represent local or UTC time, read `info.dateStr` (ISO string) or `Temporal.ZonedDateTime` rather than `.toString()` when using a named timezone.
112
+ - **Accessible view fallback**: calendars and timelines with dense drag-to-reschedule interactions must provide a list/agenda view (`listPlugin` / list mode) and keyboard/click edit modal (WCAG 2.1.1 & 2.5.7).
113
+
114
+ ## Data table & grid accessibility rules
115
+
116
+ - Use native `<table>`, `<thead>`, `<tbody>`, `<th scope="col">`, and `aria-sort="ascending" | "descending" | "none"` for read-only/sortable tables.
117
+ - Reserve `role="grid"` with roving `tabindex` and arrow-key cell navigation for interactive/editable data grids; always set `aria-rowcount` and `aria-rowindex` (and `aria-colcount`/`aria-colindex`) on virtualized tables so screen readers know the true dataset size.
118
+ - Use `font-variant-numeric: tabular-nums` and logical end-alignment for numeric/currency columns.
119
+
120
+ ## Do/don't pairs
121
+
122
+ | Do | Don't |
123
+ |---|---|
124
+ | Pass `getRowId` in TanStack Table, AG Grid, and MUI X Data Grid | Key row selection or live updates by row index |
125
+ | Attach both `data-index` and `ref={virtualizer.measureElement}` for variable heights | Hardcode a single fixed row height on multi-line wrapping rows |
126
+ | Register granular AG Grid v33 modules + `themeQuartz.withParams()` using semantic CSS vars | Hardcode hex values in grid themes or bundle `AllCommunityModule` blindly |
127
+ | Pair MUI X `processRowUpdate` with `onProcessRowUpdateError` and server-side modes | Mutate local rows optimistically without rollback or ship 50k rows to client pagination |
128
+ | Set `aria-rowcount` and `aria-rowindex` on virtualized tables | Hide total row count from assistive technologies |
129
+ | Use `info.dateStr` / `Temporal.ZonedDateTime` + explicit IANA `timeZone` + agenda/list view | Assume browser-local `Date.toString()` matches the calendar's configured timezone |
130
+
131
+ ## Verification commands
132
+
133
+ ```sh
134
+ npm run build
135
+ npx playwright test
136
+ ```
137
+
138
+ Verify bundle size of grid/calendar chunks (`static`), and test 10k-row scroll smoothness, column resize, inline edit rollback, keyboard navigation, and timezone DST boundary rendering in a real browser (`rendered`).