@moonwitness/ui 0.1.0 → 7.1.1

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 (768) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +135 -260
  4. package/TOKENS.md +62 -0
  5. package/dist/cartoon/anime-avatar.d.ts +8 -0
  6. package/dist/cartoon/anime-avatar.js +135 -0
  7. package/dist/cartoon/anime-stage.d.ts +67 -0
  8. package/dist/cartoon/anime-stage.js +106 -0
  9. package/dist/cartoon/index.d.ts +113 -0
  10. package/dist/cartoon/index.js +119 -0
  11. package/dist/cartoon.d.ts +59 -0
  12. package/dist/cartoon.js +238 -0
  13. package/dist/characters.d.ts +71 -0
  14. package/dist/characters.js +543 -0
  15. package/dist/components/accordion.d.ts +11 -0
  16. package/dist/components/accordion.js +26 -0
  17. package/dist/components/alert.d.ts +14 -0
  18. package/dist/components/alert.js +36 -0
  19. package/dist/components/appearance-menu.d.ts +22 -0
  20. package/dist/components/appearance-menu.js +64 -0
  21. package/dist/components/artwork-frame.d.ts +10 -0
  22. package/dist/components/artwork-frame.js +12 -0
  23. package/dist/components/audio.d.ts +19 -0
  24. package/dist/components/audio.js +49 -0
  25. package/dist/components/avatar.d.ts +9 -0
  26. package/dist/components/avatar.js +28 -0
  27. package/dist/components/badge.d.ts +12 -0
  28. package/dist/components/badge.js +21 -0
  29. package/dist/components/brand-mark.d.ts +13 -0
  30. package/dist/components/brand-mark.js +32 -0
  31. package/dist/components/breadcrumbs.d.ts +15 -0
  32. package/dist/components/breadcrumbs.js +25 -0
  33. package/dist/components/button.d.ts +17 -0
  34. package/dist/components/button.js +119 -0
  35. package/dist/components/card.d.ts +20 -0
  36. package/dist/components/card.js +57 -0
  37. package/dist/components/character-badge.d.ts +9 -0
  38. package/dist/components/character-badge.js +19 -0
  39. package/dist/components/character-preview.d.ts +10 -0
  40. package/dist/components/character-preview.js +47 -0
  41. package/dist/components/character-stage.d.ts +54 -0
  42. package/dist/components/character-stage.js +38 -0
  43. package/dist/components/chart.d.ts +36 -0
  44. package/dist/components/chart.js +154 -0
  45. package/dist/components/checkbox.d.ts +7 -0
  46. package/dist/components/checkbox.js +15 -0
  47. package/dist/components/comic-panel.d.ts +17 -0
  48. package/dist/components/comic-panel.js +118 -0
  49. package/dist/components/comic-theater.d.ts +19 -0
  50. package/dist/components/comic-theater.js +54 -0
  51. package/dist/components/command.d.ts +32 -0
  52. package/dist/components/command.js +56 -0
  53. package/dist/components/confirm-dialog.d.ts +19 -0
  54. package/dist/components/confirm-dialog.js +32 -0
  55. package/dist/components/copy-button.d.ts +14 -0
  56. package/dist/components/copy-button.js +17 -0
  57. package/dist/components/date-picker.d.ts +21 -0
  58. package/dist/components/date-picker.js +45 -0
  59. package/dist/components/dialog.d.ts +20 -0
  60. package/dist/components/dialog.js +51 -0
  61. package/dist/components/dna-icon.d.ts +24 -0
  62. package/dist/components/dna-icon.js +14 -0
  63. package/dist/components/dropdown-menu.d.ts +13 -0
  64. package/dist/components/dropdown-menu.js +26 -0
  65. package/dist/components/effects.d.ts +143 -0
  66. package/dist/components/effects.js +248 -0
  67. package/dist/components/empty-state.d.ts +15 -0
  68. package/dist/components/empty-state.js +18 -0
  69. package/dist/components/epistemic-branch-panel.d.ts +10 -0
  70. package/dist/components/epistemic-branch-panel.js +45 -0
  71. package/dist/components/error-state.d.ts +20 -0
  72. package/dist/components/error-state.js +44 -0
  73. package/dist/components/field.d.ts +13 -0
  74. package/dist/components/field.js +35 -0
  75. package/dist/components/filter-facet-bar.d.ts +15 -0
  76. package/dist/components/filter-facet-bar.js +38 -0
  77. package/dist/components/inbox-popover.d.ts +28 -0
  78. package/dist/components/inbox-popover.js +14 -0
  79. package/dist/components/input.d.ts +7 -0
  80. package/dist/components/input.js +8 -0
  81. package/dist/components/kanban-board.d.ts +21 -0
  82. package/dist/components/kanban-board.js +38 -0
  83. package/dist/components/label.d.ts +6 -0
  84. package/dist/components/label.js +7 -0
  85. package/dist/components/layered-scene.d.ts +74 -0
  86. package/dist/components/layered-scene.js +316 -0
  87. package/dist/components/log-console.d.ts +29 -0
  88. package/dist/components/log-console.js +82 -0
  89. package/dist/components/metric-tile.d.ts +15 -0
  90. package/dist/components/metric-tile.js +30 -0
  91. package/dist/components/mode-picker.d.ts +9 -0
  92. package/dist/components/mode-picker.js +72 -0
  93. package/dist/components/motion-timeline.d.ts +56 -0
  94. package/dist/components/motion-timeline.js +215 -0
  95. package/dist/components/number-input.d.ts +29 -0
  96. package/dist/components/number-input.js +45 -0
  97. package/dist/components/page-header.d.ts +16 -0
  98. package/dist/components/page-header.js +48 -0
  99. package/dist/components/pagination.d.ts +10 -0
  100. package/dist/components/pagination.js +17 -0
  101. package/dist/components/panel.d.ts +18 -0
  102. package/dist/components/panel.js +28 -0
  103. package/dist/components/paper-note.d.ts +6 -0
  104. package/dist/components/paper-note.js +35 -0
  105. package/dist/components/popover.d.ts +11 -0
  106. package/dist/components/popover.js +29 -0
  107. package/dist/components/progress.d.ts +17 -0
  108. package/dist/components/progress.js +26 -0
  109. package/dist/components/quest-card.d.ts +82 -0
  110. package/dist/components/quest-card.js +89 -0
  111. package/dist/components/radio-group.d.ts +8 -0
  112. package/dist/components/radio-group.js +23 -0
  113. package/dist/components/riot-sticker.d.ts +28 -0
  114. package/dist/components/riot-sticker.js +61 -0
  115. package/dist/components/scene-particles.d.ts +31 -0
  116. package/dist/components/scene-particles.js +90 -0
  117. package/dist/components/scene-transitions.d.ts +16 -0
  118. package/dist/components/scene-transitions.js +51 -0
  119. package/dist/components/section-ribbon.d.ts +17 -0
  120. package/dist/components/section-ribbon.js +21 -0
  121. package/dist/components/select-field.d.ts +7 -0
  122. package/dist/components/select-field.js +8 -0
  123. package/dist/components/select.d.ts +14 -0
  124. package/dist/components/select.js +22 -0
  125. package/dist/components/separator.d.ts +9 -0
  126. package/dist/components/separator.js +12 -0
  127. package/dist/components/sheet.d.ts +14 -0
  128. package/dist/components/sheet.js +39 -0
  129. package/dist/components/skeleton.d.ts +7 -0
  130. package/dist/components/skeleton.js +11 -0
  131. package/dist/components/sketch-annotation.d.ts +22 -0
  132. package/dist/components/sketch-annotation.js +21 -0
  133. package/dist/components/smart-button-box.d.ts +24 -0
  134. package/dist/components/smart-button-box.js +26 -0
  135. package/dist/components/speech-bubble.d.ts +33 -0
  136. package/dist/components/speech-bubble.js +18 -0
  137. package/dist/components/spinner.d.ts +11 -0
  138. package/dist/components/spinner.js +10 -0
  139. package/dist/components/sprite-player.d.ts +50 -0
  140. package/dist/components/sprite-player.js +230 -0
  141. package/dist/components/status-bar.d.ts +14 -0
  142. package/dist/components/status-bar.js +16 -0
  143. package/dist/components/status-pill.d.ts +11 -0
  144. package/dist/components/status-pill.js +20 -0
  145. package/dist/components/switch.d.ts +15 -0
  146. package/dist/components/switch.js +16 -0
  147. package/dist/components/table.d.ts +15 -0
  148. package/dist/components/table.js +66 -0
  149. package/dist/components/tabs.d.ts +11 -0
  150. package/dist/components/tabs.js +24 -0
  151. package/dist/components/tag-input.d.ts +17 -0
  152. package/dist/components/tag-input.js +79 -0
  153. package/dist/components/textarea.d.ts +7 -0
  154. package/dist/components/textarea.js +8 -0
  155. package/dist/components/toast.d.ts +7 -0
  156. package/dist/components/toast.js +8 -0
  157. package/dist/components/toolbar.d.ts +8 -0
  158. package/dist/components/toolbar.js +11 -0
  159. package/dist/components/tooltip.d.ts +9 -0
  160. package/dist/components/tooltip.js +18 -0
  161. package/dist/components/update-banner.d.ts +14 -0
  162. package/dist/components/update-banner.js +39 -0
  163. package/dist/components/xv-primitives.d.ts +63 -0
  164. package/dist/components/xv-primitives.js +53 -0
  165. package/dist/dna.d.ts +26 -0
  166. package/dist/dna.js +79 -0
  167. package/dist/game/boss-hud.d.ts +73 -0
  168. package/dist/game/boss-hud.js +78 -0
  169. package/dist/game/index.d.ts +194 -0
  170. package/dist/game/index.js +222 -0
  171. package/dist/game/tactical.d.ts +41 -0
  172. package/dist/game/tactical.js +46 -0
  173. package/dist/game.d.ts +95 -0
  174. package/dist/game.js +263 -0
  175. package/dist/icons/activity.d.ts +7 -0
  176. package/dist/icons/activity.js +8 -0
  177. package/dist/icons/add.d.ts +7 -0
  178. package/dist/icons/add.js +8 -0
  179. package/dist/icons/addon.d.ts +7 -0
  180. package/dist/icons/addon.js +8 -0
  181. package/dist/icons/anime-anger.d.ts +7 -0
  182. package/dist/icons/anime-anger.js +8 -0
  183. package/dist/icons/anime-shock.d.ts +7 -0
  184. package/dist/icons/anime-shock.js +8 -0
  185. package/dist/icons/anime-sparkle.d.ts +7 -0
  186. package/dist/icons/anime-sparkle.js +8 -0
  187. package/dist/icons/anime-sweatdrop.d.ts +7 -0
  188. package/dist/icons/anime-sweatdrop.js +8 -0
  189. package/dist/icons/archive.d.ts +7 -0
  190. package/dist/icons/archive.js +8 -0
  191. package/dist/icons/arrow-left.d.ts +7 -0
  192. package/dist/icons/arrow-left.js +8 -0
  193. package/dist/icons/arrow-right.d.ts +7 -0
  194. package/dist/icons/arrow-right.js +8 -0
  195. package/dist/icons/attachment.d.ts +7 -0
  196. package/dist/icons/attachment.js +8 -0
  197. package/dist/icons/bank.d.ts +7 -0
  198. package/dist/icons/bank.js +8 -0
  199. package/dist/icons/bolt.d.ts +7 -0
  200. package/dist/icons/bolt.js +8 -0
  201. package/dist/icons/book-open.d.ts +7 -0
  202. package/dist/icons/book-open.js +8 -0
  203. package/dist/icons/bookmark.d.ts +7 -0
  204. package/dist/icons/bookmark.js +8 -0
  205. package/dist/icons/boss-skull.d.ts +7 -0
  206. package/dist/icons/boss-skull.js +8 -0
  207. package/dist/icons/calendar-clock.d.ts +7 -0
  208. package/dist/icons/calendar-clock.js +8 -0
  209. package/dist/icons/calendar.d.ts +7 -0
  210. package/dist/icons/calendar.js +8 -0
  211. package/dist/icons/check-circle.d.ts +7 -0
  212. package/dist/icons/check-circle.js +8 -0
  213. package/dist/icons/check-square.d.ts +7 -0
  214. package/dist/icons/check-square.js +8 -0
  215. package/dist/icons/check.d.ts +7 -0
  216. package/dist/icons/check.js +8 -0
  217. package/dist/icons/chevron-right.d.ts +7 -0
  218. package/dist/icons/chevron-right.js +8 -0
  219. package/dist/icons/chevrons-left.d.ts +7 -0
  220. package/dist/icons/chevrons-left.js +8 -0
  221. package/dist/icons/chevrons-right.d.ts +7 -0
  222. package/dist/icons/chevrons-right.js +8 -0
  223. package/dist/icons/clapperboard.d.ts +7 -0
  224. package/dist/icons/clapperboard.js +8 -0
  225. package/dist/icons/clock.d.ts +7 -0
  226. package/dist/icons/clock.js +8 -0
  227. package/dist/icons/close.d.ts +7 -0
  228. package/dist/icons/close.js +8 -0
  229. package/dist/icons/code.d.ts +7 -0
  230. package/dist/icons/code.js +8 -0
  231. package/dist/icons/columns.d.ts +7 -0
  232. package/dist/icons/columns.js +8 -0
  233. package/dist/icons/combo-flame.d.ts +7 -0
  234. package/dist/icons/combo-flame.js +8 -0
  235. package/dist/icons/company.d.ts +7 -0
  236. package/dist/icons/company.js +8 -0
  237. package/dist/icons/credit-card.d.ts +7 -0
  238. package/dist/icons/credit-card.js +8 -0
  239. package/dist/icons/critical-star.d.ts +7 -0
  240. package/dist/icons/critical-star.js +8 -0
  241. package/dist/icons/currency.d.ts +7 -0
  242. package/dist/icons/currency.js +8 -0
  243. package/dist/icons/delete.d.ts +7 -0
  244. package/dist/icons/delete.js +8 -0
  245. package/dist/icons/document.d.ts +7 -0
  246. package/dist/icons/document.js +8 -0
  247. package/dist/icons/download.d.ts +7 -0
  248. package/dist/icons/download.js +8 -0
  249. package/dist/icons/dpad.d.ts +7 -0
  250. package/dist/icons/dpad.js +8 -0
  251. package/dist/icons/edit.d.ts +7 -0
  252. package/dist/icons/edit.js +8 -0
  253. package/dist/icons/element-fire.d.ts +7 -0
  254. package/dist/icons/element-fire.js +8 -0
  255. package/dist/icons/element-ice.d.ts +7 -0
  256. package/dist/icons/element-ice.js +8 -0
  257. package/dist/icons/element-solar.d.ts +7 -0
  258. package/dist/icons/element-solar.js +8 -0
  259. package/dist/icons/element-void.d.ts +7 -0
  260. package/dist/icons/element-void.js +8 -0
  261. package/dist/icons/element-volt.d.ts +7 -0
  262. package/dist/icons/element-volt.js +8 -0
  263. package/dist/icons/element-wind.d.ts +7 -0
  264. package/dist/icons/element-wind.js +8 -0
  265. package/dist/icons/error.d.ts +7 -0
  266. package/dist/icons/error.js +8 -0
  267. package/dist/icons/external-link.d.ts +7 -0
  268. package/dist/icons/external-link.js +8 -0
  269. package/dist/icons/field.d.ts +7 -0
  270. package/dist/icons/field.js +8 -0
  271. package/dist/icons/file-spreadsheet.d.ts +7 -0
  272. package/dist/icons/file-spreadsheet.js +8 -0
  273. package/dist/icons/filter.d.ts +7 -0
  274. package/dist/icons/filter.js +8 -0
  275. package/dist/icons/gacha-ticket.d.ts +7 -0
  276. package/dist/icons/gacha-ticket.js +8 -0
  277. package/dist/icons/gamepad.d.ts +7 -0
  278. package/dist/icons/gamepad.js +8 -0
  279. package/dist/icons/globe.d.ts +7 -0
  280. package/dist/icons/globe.js +8 -0
  281. package/dist/icons/grid.d.ts +7 -0
  282. package/dist/icons/grid.js +8 -0
  283. package/dist/icons/hash.d.ts +7 -0
  284. package/dist/icons/hash.js +8 -0
  285. package/dist/icons/heart-hp.d.ts +7 -0
  286. package/dist/icons/heart-hp.js +8 -0
  287. package/dist/icons/history.d.ts +7 -0
  288. package/dist/icons/history.js +8 -0
  289. package/dist/icons/home.d.ts +7 -0
  290. package/dist/icons/home.js +8 -0
  291. package/dist/icons/image.d.ts +7 -0
  292. package/dist/icons/image.js +8 -0
  293. package/dist/icons/impact-slash.d.ts +7 -0
  294. package/dist/icons/impact-slash.js +8 -0
  295. package/dist/icons/inbox.d.ts +7 -0
  296. package/dist/icons/inbox.js +8 -0
  297. package/dist/icons/index.d.ts +120 -0
  298. package/dist/icons/index.js +120 -0
  299. package/dist/icons/info.d.ts +7 -0
  300. package/dist/icons/info.js +8 -0
  301. package/dist/icons/jobs.d.ts +7 -0
  302. package/dist/icons/jobs.js +8 -0
  303. package/dist/icons/katana.d.ts +7 -0
  304. package/dist/icons/katana.js +8 -0
  305. package/dist/icons/key.d.ts +7 -0
  306. package/dist/icons/key.js +8 -0
  307. package/dist/icons/keyboard.d.ts +7 -0
  308. package/dist/icons/keyboard.js +8 -0
  309. package/dist/icons/keyframe-diamond.d.ts +7 -0
  310. package/dist/icons/keyframe-diamond.js +8 -0
  311. package/dist/icons/knowledge.d.ts +7 -0
  312. package/dist/icons/knowledge.js +8 -0
  313. package/dist/icons/language.d.ts +7 -0
  314. package/dist/icons/language.js +8 -0
  315. package/dist/icons/lock.d.ts +7 -0
  316. package/dist/icons/lock.js +8 -0
  317. package/dist/icons/logout.d.ts +7 -0
  318. package/dist/icons/logout.js +8 -0
  319. package/dist/icons/loot-chest.d.ts +7 -0
  320. package/dist/icons/loot-chest.js +8 -0
  321. package/dist/icons/mail.d.ts +7 -0
  322. package/dist/icons/mail.js +8 -0
  323. package/dist/icons/mana-crystal.d.ts +7 -0
  324. package/dist/icons/mana-crystal.js +8 -0
  325. package/dist/icons/map-pin.d.ts +7 -0
  326. package/dist/icons/map-pin.js +8 -0
  327. package/dist/icons/mecha-helm.d.ts +7 -0
  328. package/dist/icons/mecha-helm.js +8 -0
  329. package/dist/icons/menu.d.ts +7 -0
  330. package/dist/icons/menu.js +8 -0
  331. package/dist/icons/message.d.ts +7 -0
  332. package/dist/icons/message.js +8 -0
  333. package/dist/icons/model.d.ts +7 -0
  334. package/dist/icons/model.js +8 -0
  335. package/dist/icons/moon.d.ts +7 -0
  336. package/dist/icons/moon.js +8 -0
  337. package/dist/icons/notification.d.ts +7 -0
  338. package/dist/icons/notification.js +8 -0
  339. package/dist/icons/partner.d.ts +7 -0
  340. package/dist/icons/partner.js +8 -0
  341. package/dist/icons/pause.d.ts +7 -0
  342. package/dist/icons/pause.js +8 -0
  343. package/dist/icons/phone.d.ts +7 -0
  344. package/dist/icons/phone.js +8 -0
  345. package/dist/icons/play.d.ts +7 -0
  346. package/dist/icons/play.js +8 -0
  347. package/dist/icons/potion-flask.d.ts +7 -0
  348. package/dist/icons/potion-flask.js +8 -0
  349. package/dist/icons/quest-scroll.d.ts +7 -0
  350. package/dist/icons/quest-scroll.js +8 -0
  351. package/dist/icons/radar-ping.d.ts +7 -0
  352. package/dist/icons/radar-ping.js +8 -0
  353. package/dist/icons/refresh.d.ts +7 -0
  354. package/dist/icons/refresh.js +8 -0
  355. package/dist/icons/relation.d.ts +7 -0
  356. package/dist/icons/relation.js +8 -0
  357. package/dist/icons/save.d.ts +7 -0
  358. package/dist/icons/save.js +8 -0
  359. package/dist/icons/search.d.ts +7 -0
  360. package/dist/icons/search.js +8 -0
  361. package/dist/icons/security.d.ts +7 -0
  362. package/dist/icons/security.js +8 -0
  363. package/dist/icons/send.d.ts +7 -0
  364. package/dist/icons/send.js +8 -0
  365. package/dist/icons/settings.d.ts +7 -0
  366. package/dist/icons/settings.js +8 -0
  367. package/dist/icons/shield-crest.d.ts +7 -0
  368. package/dist/icons/shield-crest.js +8 -0
  369. package/dist/icons/shuriken.d.ts +7 -0
  370. package/dist/icons/shuriken.js +8 -0
  371. package/dist/icons/signal-off.d.ts +7 -0
  372. package/dist/icons/signal-off.js +8 -0
  373. package/dist/icons/signal.d.ts +7 -0
  374. package/dist/icons/signal.js +8 -0
  375. package/dist/icons/skill-node.d.ts +7 -0
  376. package/dist/icons/skill-node.js +8 -0
  377. package/dist/icons/smartphone.d.ts +7 -0
  378. package/dist/icons/smartphone.js +8 -0
  379. package/dist/icons/sort-ascending.d.ts +7 -0
  380. package/dist/icons/sort-ascending.js +8 -0
  381. package/dist/icons/sort-descending.d.ts +7 -0
  382. package/dist/icons/sort-descending.js +8 -0
  383. package/dist/icons/sort.d.ts +7 -0
  384. package/dist/icons/sort.js +8 -0
  385. package/dist/icons/sparkle.d.ts +7 -0
  386. package/dist/icons/sparkle.js +8 -0
  387. package/dist/icons/speech-burst.d.ts +7 -0
  388. package/dist/icons/speech-burst.js +8 -0
  389. package/dist/icons/story.d.ts +7 -0
  390. package/dist/icons/story.js +8 -0
  391. package/dist/icons/sun.d.ts +7 -0
  392. package/dist/icons/sun.js +8 -0
  393. package/dist/icons/tag.d.ts +7 -0
  394. package/dist/icons/tag.js +8 -0
  395. package/dist/icons/team.d.ts +7 -0
  396. package/dist/icons/team.js +8 -0
  397. package/dist/icons/trophy-crown.d.ts +7 -0
  398. package/dist/icons/trophy-crown.js +8 -0
  399. package/dist/icons/upload.d.ts +7 -0
  400. package/dist/icons/upload.js +8 -0
  401. package/dist/icons/user.d.ts +7 -0
  402. package/dist/icons/user.js +8 -0
  403. package/dist/icons/users.d.ts +7 -0
  404. package/dist/icons/users.js +8 -0
  405. package/dist/icons/visibility-off.d.ts +7 -0
  406. package/dist/icons/visibility-off.js +8 -0
  407. package/dist/icons/visibility.d.ts +7 -0
  408. package/dist/icons/visibility.js +8 -0
  409. package/dist/icons/volume-off.d.ts +7 -0
  410. package/dist/icons/volume-off.js +8 -0
  411. package/dist/icons/volume.d.ts +7 -0
  412. package/dist/icons/volume.js +8 -0
  413. package/dist/icons/warning.d.ts +7 -0
  414. package/dist/icons/warning.js +8 -0
  415. package/dist/icons/workflow.d.ts +7 -0
  416. package/dist/icons/workflow.js +8 -0
  417. package/dist/icons.d.ts +124 -0
  418. package/dist/icons.js +361 -0
  419. package/dist/index.d.ts +81 -0
  420. package/dist/index.js +83 -0
  421. package/dist/lib/asset-registry.d.ts +104 -0
  422. package/dist/lib/asset-registry.js +328 -0
  423. package/dist/lib/audio-runtime.d.ts +23 -0
  424. package/dist/lib/audio-runtime.js +254 -0
  425. package/dist/lib/character-adapter.d.ts +63 -0
  426. package/dist/lib/character-adapter.js +232 -0
  427. package/dist/lib/character-registry.d.ts +159 -0
  428. package/dist/lib/character-registry.js +1950 -0
  429. package/dist/lib/cn.d.ts +2 -0
  430. package/dist/lib/cn.js +4 -0
  431. package/dist/lib/compose-refs.d.ts +7 -0
  432. package/dist/lib/compose-refs.js +14 -0
  433. package/dist/lib/sanitize-url.d.ts +6 -0
  434. package/dist/lib/sanitize-url.js +44 -0
  435. package/dist/lib/scene-camera.d.ts +70 -0
  436. package/dist/lib/scene-camera.js +317 -0
  437. package/dist/lib/scene-playback.d.ts +93 -0
  438. package/dist/lib/scene-playback.js +447 -0
  439. package/dist/lib/scene-soundscape.d.ts +35 -0
  440. package/dist/lib/scene-soundscape.js +117 -0
  441. package/dist/lib/scene-test-harness.d.ts +17 -0
  442. package/dist/lib/scene-test-harness.js +140 -0
  443. package/dist/lib/scene-timeline.d.ts +59 -0
  444. package/dist/lib/scene-timeline.js +280 -0
  445. package/dist/lib/use-animation-visibility.d.ts +7 -0
  446. package/dist/lib/use-animation-visibility.js +31 -0
  447. package/dist/lib/use-modal-focus.d.ts +6 -0
  448. package/dist/lib/use-modal-focus.js +211 -0
  449. package/dist/lib/use-reduced-motion.d.ts +5 -0
  450. package/dist/lib/use-reduced-motion.js +31 -0
  451. package/dist/motion/easing-presets.d.ts +21 -0
  452. package/dist/motion/easing-presets.js +207 -0
  453. package/dist/motion/index.d.ts +153 -0
  454. package/dist/motion/index.js +311 -0
  455. package/dist/motion/physics.d.ts +30 -0
  456. package/dist/motion/physics.js +178 -0
  457. package/dist/motion/timeline-math.d.ts +78 -0
  458. package/dist/motion/timeline-math.js +216 -0
  459. package/dist/motion.d.ts +76 -0
  460. package/dist/motion.js +316 -0
  461. package/dist/pixelfx-registry.d.ts +127 -0
  462. package/dist/pixelfx-registry.js +861 -0
  463. package/dist/pixelfx.d.ts +161 -0
  464. package/dist/pixelfx.js +510 -0
  465. package/dist/provider.d.ts +27 -0
  466. package/dist/provider.js +15 -0
  467. package/dist/skin-catalog.d.ts +20 -0
  468. package/dist/skin-catalog.js +215 -0
  469. package/dist/skin-tokens.d.ts +3 -0
  470. package/dist/skin-tokens.js +390 -0
  471. package/dist/tailwind-preset.css +109 -0
  472. package/dist/templates/battle-arena.d.ts +2 -0
  473. package/dist/templates/battle-arena.js +351 -0
  474. package/dist/templates/index.d.ts +3 -0
  475. package/dist/templates/index.js +77 -0
  476. package/dist/templates.d.ts +4 -0
  477. package/dist/templates.js +78 -0
  478. package/dist/themes/dna-presets.d.ts +18 -0
  479. package/dist/themes/dna-presets.js +84 -0
  480. package/dist/themes/index.d.ts +11 -0
  481. package/dist/themes/index.js +10 -0
  482. package/dist/themes/provider.d.ts +26 -0
  483. package/dist/themes/provider.js +96 -0
  484. package/dist/themes/types.d.ts +42 -0
  485. package/dist/themes/types.js +47 -0
  486. package/dist/themes.d.ts +2 -0
  487. package/dist/themes.js +2 -0
  488. package/dist/token-exporter.d.ts +5 -0
  489. package/dist/token-exporter.js +4 -0
  490. package/dist/token-exporters.d.ts +28 -0
  491. package/dist/token-exporters.js +257 -0
  492. package/dist/token-seeds.d.ts +38 -0
  493. package/dist/token-seeds.js +272 -0
  494. package/dist/token-snapshot.d.ts +21 -0
  495. package/dist/token-snapshot.js +131 -0
  496. package/dist/tokens.bundle.json +1669 -0
  497. package/dist/tokens.generated.css +599 -0
  498. package/dist/tokens.w3c.json +1931 -0
  499. package/dist/utils.d.ts +12 -0
  500. package/dist/utils.js +49 -0
  501. package/package.json +536 -43
  502. package/scripts/generate-icons.mjs +110 -0
  503. package/scripts/generate-token-artifacts.mjs +90 -0
  504. package/scripts/icon-svg-to-jsx.mjs +249 -0
  505. package/scripts/verification-diagnostics.mjs +40 -0
  506. package/scripts/verify-package.mjs +412 -0
  507. package/src/cartoon/anime-avatar.tsx +628 -0
  508. package/src/cartoon/anime-stage.tsx +458 -0
  509. package/src/cartoon/index.tsx +542 -0
  510. package/src/cartoon.tsx +645 -0
  511. package/src/characters.ts +625 -0
  512. package/src/components/accordion.tsx +77 -0
  513. package/src/components/alert.tsx +139 -0
  514. package/src/components/appearance-menu.tsx +181 -0
  515. package/src/components/artwork-frame.tsx +49 -0
  516. package/src/components/audio.tsx +97 -0
  517. package/src/components/avatar.tsx +75 -0
  518. package/src/components/badge.tsx +94 -0
  519. package/src/components/brand-mark.tsx +73 -0
  520. package/src/components/breadcrumbs.tsx +98 -0
  521. package/src/components/button.tsx +340 -0
  522. package/src/components/card.tsx +171 -0
  523. package/src/components/character-badge.tsx +58 -0
  524. package/src/components/character-preview.tsx +104 -0
  525. package/src/components/character-stage.tsx +225 -0
  526. package/src/components/chart.tsx +481 -0
  527. package/src/components/checkbox.tsx +64 -0
  528. package/src/components/comic-panel.tsx +301 -0
  529. package/src/components/comic-theater.tsx +170 -0
  530. package/src/components/command.tsx +189 -0
  531. package/src/components/confirm-dialog.tsx +129 -0
  532. package/src/components/copy-button.tsx +62 -0
  533. package/src/components/date-picker.tsx +126 -0
  534. package/src/components/dialog.tsx +164 -0
  535. package/src/components/dna-icon.tsx +77 -0
  536. package/src/components/dropdown-menu.tsx +87 -0
  537. package/src/components/effects.tsx +1021 -0
  538. package/src/components/empty-state.tsx +93 -0
  539. package/src/components/epistemic-branch-panel.tsx +101 -0
  540. package/src/components/error-state.tsx +137 -0
  541. package/src/components/field.tsx +96 -0
  542. package/src/components/filter-facet-bar.tsx +91 -0
  543. package/src/components/inbox-popover.tsx +146 -0
  544. package/src/components/input.tsx +25 -0
  545. package/src/components/kanban-board.tsx +190 -0
  546. package/src/components/label.tsx +19 -0
  547. package/src/components/layered-scene.tsx +555 -0
  548. package/src/components/log-console.tsx +261 -0
  549. package/src/components/metric-tile.tsx +99 -0
  550. package/src/components/mode-picker.tsx +149 -0
  551. package/src/components/motion-timeline.tsx +848 -0
  552. package/src/components/number-input.tsx +104 -0
  553. package/src/components/page-header.tsx +123 -0
  554. package/src/components/pagination.tsx +83 -0
  555. package/src/components/panel.tsx +121 -0
  556. package/src/components/paper-note.tsx +77 -0
  557. package/src/components/popover.tsx +72 -0
  558. package/src/components/progress.tsx +127 -0
  559. package/src/components/quest-card.tsx +319 -0
  560. package/src/components/radio-group.tsx +50 -0
  561. package/src/components/riot-sticker.tsx +151 -0
  562. package/src/components/scene-particles.tsx +196 -0
  563. package/src/components/scene-transitions.tsx +130 -0
  564. package/src/components/section-ribbon.tsx +94 -0
  565. package/src/components/select-field.tsx +27 -0
  566. package/src/components/select.tsx +81 -0
  567. package/src/components/separator.tsx +58 -0
  568. package/src/components/sheet.tsx +96 -0
  569. package/src/components/skeleton.tsx +35 -0
  570. package/src/components/sketch-annotation.tsx +87 -0
  571. package/src/components/smart-button-box.tsx +114 -0
  572. package/src/components/speech-bubble.tsx +116 -0
  573. package/src/components/spinner.tsx +69 -0
  574. package/src/components/sprite-player.tsx +412 -0
  575. package/src/components/status-bar.tsx +63 -0
  576. package/src/components/status-pill.tsx +68 -0
  577. package/src/components/switch.tsx +76 -0
  578. package/src/components/table.tsx +163 -0
  579. package/src/components/tabs.tsx +101 -0
  580. package/src/components/tag-input.tsx +170 -0
  581. package/src/components/textarea.tsx +25 -0
  582. package/src/components/toast.tsx +14 -0
  583. package/src/components/toolbar.tsx +39 -0
  584. package/src/components/tooltip.tsx +49 -0
  585. package/src/components/update-banner.tsx +220 -0
  586. package/src/components/xv-primitives.tsx +256 -0
  587. package/src/dna.tsx +137 -0
  588. package/src/game/boss-hud.tsx +384 -0
  589. package/src/game/index.tsx +886 -0
  590. package/src/game/tactical.tsx +245 -0
  591. package/src/game.tsx +770 -0
  592. package/src/icons/activity.tsx +38 -0
  593. package/src/icons/add.tsx +38 -0
  594. package/src/icons/addon.tsx +37 -0
  595. package/src/icons/anime-anger.tsx +37 -0
  596. package/src/icons/anime-shock.tsx +37 -0
  597. package/src/icons/anime-sparkle.tsx +38 -0
  598. package/src/icons/anime-sweatdrop.tsx +38 -0
  599. package/src/icons/archive.tsx +37 -0
  600. package/src/icons/arrow-left.tsx +37 -0
  601. package/src/icons/arrow-right.tsx +37 -0
  602. package/src/icons/attachment.tsx +38 -0
  603. package/src/icons/bank.tsx +37 -0
  604. package/src/icons/bolt.tsx +37 -0
  605. package/src/icons/book-open.tsx +37 -0
  606. package/src/icons/bookmark.tsx +37 -0
  607. package/src/icons/boss-skull.tsx +40 -0
  608. package/src/icons/calendar-clock.tsx +40 -0
  609. package/src/icons/calendar.tsx +38 -0
  610. package/src/icons/check-circle.tsx +38 -0
  611. package/src/icons/check-square.tsx +38 -0
  612. package/src/icons/check.tsx +37 -0
  613. package/src/icons/chevron-right.tsx +37 -0
  614. package/src/icons/chevrons-left.tsx +37 -0
  615. package/src/icons/chevrons-right.tsx +37 -0
  616. package/src/icons/clapperboard.tsx +38 -0
  617. package/src/icons/clock.tsx +38 -0
  618. package/src/icons/close.tsx +37 -0
  619. package/src/icons/code.tsx +37 -0
  620. package/src/icons/columns.tsx +38 -0
  621. package/src/icons/combo-flame.tsx +38 -0
  622. package/src/icons/company.tsx +38 -0
  623. package/src/icons/credit-card.tsx +38 -0
  624. package/src/icons/critical-star.tsx +37 -0
  625. package/src/icons/currency.tsx +38 -0
  626. package/src/icons/delete.tsx +37 -0
  627. package/src/icons/document.tsx +38 -0
  628. package/src/icons/download.tsx +37 -0
  629. package/src/icons/dpad.tsx +38 -0
  630. package/src/icons/edit.tsx +38 -0
  631. package/src/icons/element-fire.tsx +37 -0
  632. package/src/icons/element-ice.tsx +38 -0
  633. package/src/icons/element-solar.tsx +38 -0
  634. package/src/icons/element-void.tsx +38 -0
  635. package/src/icons/element-volt.tsx +38 -0
  636. package/src/icons/element-wind.tsx +37 -0
  637. package/src/icons/error.tsx +38 -0
  638. package/src/icons/external-link.tsx +38 -0
  639. package/src/icons/field.tsx +38 -0
  640. package/src/icons/file-spreadsheet.tsx +38 -0
  641. package/src/icons/filter.tsx +37 -0
  642. package/src/icons/gacha-ticket.tsx +38 -0
  643. package/src/icons/gamepad.tsx +40 -0
  644. package/src/icons/globe.tsx +38 -0
  645. package/src/icons/grid.tsx +40 -0
  646. package/src/icons/hash.tsx +37 -0
  647. package/src/icons/heart-hp.tsx +38 -0
  648. package/src/icons/history.tsx +37 -0
  649. package/src/icons/home.tsx +37 -0
  650. package/src/icons/image.tsx +39 -0
  651. package/src/icons/impact-slash.tsx +38 -0
  652. package/src/icons/inbox.tsx +38 -0
  653. package/src/icons/index.ts +120 -0
  654. package/src/icons/info.tsx +38 -0
  655. package/src/icons/jobs.tsx +38 -0
  656. package/src/icons/katana.tsx +38 -0
  657. package/src/icons/key.tsx +38 -0
  658. package/src/icons/keyboard.tsx +38 -0
  659. package/src/icons/keyframe-diamond.tsx +38 -0
  660. package/src/icons/knowledge.tsx +38 -0
  661. package/src/icons/language.tsx +39 -0
  662. package/src/icons/lock.tsx +38 -0
  663. package/src/icons/logout.tsx +37 -0
  664. package/src/icons/loot-chest.tsx +39 -0
  665. package/src/icons/mail.tsx +38 -0
  666. package/src/icons/mana-crystal.tsx +38 -0
  667. package/src/icons/map-pin.tsx +38 -0
  668. package/src/icons/mecha-helm.tsx +38 -0
  669. package/src/icons/menu.tsx +37 -0
  670. package/src/icons/message.tsx +38 -0
  671. package/src/icons/model.tsx +38 -0
  672. package/src/icons/moon.tsx +37 -0
  673. package/src/icons/notification.tsx +38 -0
  674. package/src/icons/partner.tsx +41 -0
  675. package/src/icons/pause.tsx +37 -0
  676. package/src/icons/phone.tsx +37 -0
  677. package/src/icons/play.tsx +37 -0
  678. package/src/icons/potion-flask.tsx +40 -0
  679. package/src/icons/quest-scroll.tsx +39 -0
  680. package/src/icons/radar-ping.tsx +40 -0
  681. package/src/icons/refresh.tsx +38 -0
  682. package/src/icons/relation.tsx +40 -0
  683. package/src/icons/save.tsx +38 -0
  684. package/src/icons/search.tsx +38 -0
  685. package/src/icons/security.tsx +38 -0
  686. package/src/icons/send.tsx +38 -0
  687. package/src/icons/settings.tsx +39 -0
  688. package/src/icons/shield-crest.tsx +38 -0
  689. package/src/icons/shuriken.tsx +38 -0
  690. package/src/icons/signal-off.tsx +37 -0
  691. package/src/icons/signal.tsx +37 -0
  692. package/src/icons/skill-node.tsx +40 -0
  693. package/src/icons/smartphone.tsx +38 -0
  694. package/src/icons/sort-ascending.tsx +37 -0
  695. package/src/icons/sort-descending.tsx +37 -0
  696. package/src/icons/sort.tsx +37 -0
  697. package/src/icons/sparkle.tsx +38 -0
  698. package/src/icons/speech-burst.tsx +37 -0
  699. package/src/icons/story.tsx +37 -0
  700. package/src/icons/sun.tsx +38 -0
  701. package/src/icons/tag.tsx +38 -0
  702. package/src/icons/team.tsx +40 -0
  703. package/src/icons/trophy-crown.tsx +39 -0
  704. package/src/icons/upload.tsx +37 -0
  705. package/src/icons/user.tsx +38 -0
  706. package/src/icons/users.tsx +39 -0
  707. package/src/icons/visibility-off.tsx +38 -0
  708. package/src/icons/visibility.tsx +38 -0
  709. package/src/icons/volume-off.tsx +37 -0
  710. package/src/icons/volume.tsx +37 -0
  711. package/src/icons/warning.tsx +38 -0
  712. package/src/icons/workflow.tsx +40 -0
  713. package/src/icons.tsx +965 -0
  714. package/src/index.ts +89 -0
  715. package/src/lib/asset-registry.ts +534 -0
  716. package/src/lib/audio-runtime.ts +314 -0
  717. package/src/lib/character-adapter.ts +370 -0
  718. package/src/lib/character-registry.ts +2368 -0
  719. package/src/lib/cn.ts +6 -0
  720. package/src/lib/compose-refs.ts +16 -0
  721. package/src/lib/sanitize-url.ts +51 -0
  722. package/src/lib/scene-camera.ts +483 -0
  723. package/src/lib/scene-playback.ts +622 -0
  724. package/src/lib/scene-soundscape.ts +151 -0
  725. package/src/lib/scene-test-harness.ts +200 -0
  726. package/src/lib/scene-timeline.ts +398 -0
  727. package/src/lib/use-animation-visibility.ts +45 -0
  728. package/src/lib/use-modal-focus.ts +270 -0
  729. package/src/lib/use-reduced-motion.ts +37 -0
  730. package/src/motion/easing-presets.ts +262 -0
  731. package/src/motion/index.tsx +894 -0
  732. package/src/motion/physics.ts +259 -0
  733. package/src/motion/timeline-math.ts +358 -0
  734. package/src/motion.tsx +639 -0
  735. package/src/pixelfx-registry.ts +1190 -0
  736. package/src/pixelfx-types.d.ts +73 -0
  737. package/src/pixelfx.tsx +994 -0
  738. package/src/provider.tsx +63 -0
  739. package/src/skin-catalog.ts +270 -0
  740. package/src/skin-tokens.ts +425 -0
  741. package/src/styles/components.css +8007 -0
  742. package/src/styles/tokens.css +952 -0
  743. package/src/styles/visual-universe.css +149 -0
  744. package/src/styles/xv-primitives.css +192 -0
  745. package/src/templates/battle-arena.tsx +688 -0
  746. package/src/templates/index.tsx +314 -0
  747. package/src/templates.tsx +225 -0
  748. package/src/themes/dna-presets.ts +119 -0
  749. package/src/themes/index.ts +43 -0
  750. package/src/themes/provider.tsx +162 -0
  751. package/src/themes/types.ts +111 -0
  752. package/src/themes.ts +9 -0
  753. package/src/token-exporter.ts +12 -0
  754. package/src/token-exporters.ts +343 -0
  755. package/src/token-seeds.ts +335 -0
  756. package/src/token-snapshot.ts +179 -0
  757. package/src/utils.ts +58 -0
  758. package/styles.css +3 -0
  759. package/src/components.d.ts +0 -588
  760. package/src/components.js +0 -2044
  761. package/src/index.d.ts +0 -3
  762. package/src/index.js +0 -13
  763. package/src/skins.d.ts +0 -4
  764. package/src/skins.js +0 -20
  765. package/src/styles.css +0 -587
  766. package/src/tailwind.css +0 -24
  767. package/src/theme.d.ts +0 -71
  768. package/src/theme.js +0 -257
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@moonwitness/ui` are documented in this file.
4
+
5
+ ## 1.0.0-rc.1
6
+
7
+ ### Security & SSR
8
+
9
+ - Added `sanitizeUrl()` helper (`@moonwitness/ui` and `@moonwitness/ui/lib/sanitize-url`) blocking unsafe URL schemes (`javascript:`, `data:`, `vbscript:`, control characters, and protocol-relative URLs) in `Breadcrumbs` and `UpdateBanner`.
10
+ - Added SSR document guard in `ToastHost` so server rendering never throws when `document` is undefined.
11
+ - Synchronized `ThemeProvider` and `createSkinInitScript()` around `DEFAULT_THEME_STORAGE_KEY` (`'mw-ui-theme'`), supporting `light`, `dark`, and `high-contrast` modes, `data-theme`, `data-skin`, `data-density`, `.dark`, `.high-contrast`, and legacy key fallback.
12
+
13
+ ### Standalone CSS & React Compatibility
14
+
15
+ - Migrated all remaining Tailwind-dependent overlays and controls (`Dialog`, `Sheet`, `Popover`, `Tooltip`, `Select`, `DropdownMenu`, `Command`, `Label`, `MetricTile`, `ModePicker`, `LogConsole`, `UpdateBanner`, `SoundToggle`) to pure scoped `.mw-ui-*` rules in `@moonwitness/ui/components.css`. Consumers no longer need Tailwind CSS to render any component.
16
+ - Added `'use client'` directives across all interactive and Radix-backed components for seamless React Server Components (Next.js App Router) adoption.
17
+ - Added `forwardRef` and `displayName` support across migrated controls and overlays.
18
+ - Expanded root barrel (`@moonwitness/ui`) to export all core primitives, overlays, form controls, theme utilities, and `sanitizeUrl`, while keeping optional peer-dependency modules (`Command` / `cmdk` and `ToastHost` / `sonner`) isolated to dedicated subpaths.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 A-L-L-A-H
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,273 +1,148 @@
1
- # Moonframe UI
1
+ # MoonWitness UI Bible
2
2
 
3
- > **One behavioral system. Fifteen distinct visual grammars. Thirty core appearances.**
3
+ This is the single design and implementation rulebook for `@moonwitness/ui`. `TOKENS.md` records the token contract and contrast requirements, and `CHANGELOG.md` tracks release changes. Product copy and feature truth stay in the app.
4
4
 
5
- Moonframe UI provides **70+ reusable React components & Level C composite blocks**, **15 distinct skins (each in Light and Dark)**, a persistent Next.js/SSR-safe theme runtime, original M10 geometric vector brand marks (`SkinBrandMark`), an opt-in WebAudio synthesizer runtime (`SFXProvider`), the **Moonframe CLI Scaffolder** (`pnpm run cli`), and the **`moonframe` Next.js 16 Showcase & Template Marketplace** (`apps/moonframe`) featuring **43 production page templates** and **8 Level E Multi-Route Starter Applications**.
5
+ ## Quickstart (Zero-Tailwind & SSR)
6
6
 
7
- ## Start using it
8
-
9
- Use **Node.js 24.22.1 LTS**, pinned in [.nvmrc](.nvmrc), and **pnpm** (`corepack enable`).
10
-
11
- ```sh
12
- pnpm install
13
- pnpm run dev
14
- ```
15
-
16
- Running `pnpm run dev` at the repository root launches the **`moonframe` Next.js 16 Showcase & Template Marketplace** (`apps/moonframe`) at `http://localhost:3000`:
17
- - **`/`** — Landing page, live 15-skin interactive wall, featured starters, templates, and quickstart
18
- - **`/starters` & `/starters/[id]`** — **8 Level E Multi-Route Starter Applications** with live multi-route workspace switcher and CLI generator
19
- - **`/skins` & `/skins/[id]`** — 15-skin gallery and deep-dive non-color visual grammar specs
20
- - **`/components` & `/components/[slug]`** — Interactive playground for all **70+ reusable components**, Level C composite blocks, and M10 vector/SFX suite
21
- - **`/templates` & `/templates/[id]`** — **43 production page templates (Wave A & B)** with responsive live preview (`Desktop` / `Tablet` / `Mobile`), Fullscreen mode (`/preview/[id]`), Download `.tsx`, and copyable CLI commands
22
- - **`/lab` & `/lab/behavior`** — Deterministic 15-skin comparison lab and keyboard/ARIA behavior test harness
23
- - **`/docs`** — Complete Next.js App Router, SSR anti-FOUC `ThemeScript`, Tailwind v4 bridge, CLI scaffolder guide, and interactive playground
24
-
25
- Build the production Next.js showcase with `pnpm run build`, or pack a local consumer tarball (`moonframe-ui-0.1.0.tgz`) with `pnpm run pack:local`:
7
+ `@moonwitness/ui` ships standalone scoped CSS (`@layer components` under `.mw-ui-*`) — **no Tailwind CSS configuration or runtime is required**.
26
8
 
27
9
  ```tsx
28
- import { ThemeProvider, ThemeScript, Button } from '@moonframe/ui';
29
- import '@moonframe/ui/styles.css';
10
+ import "@moonwitness/ui/styles/tokens.css";
11
+ import "@moonwitness/ui/components.css";
12
+ import { Button, Card, CardContent, ThemeProvider } from "@moonwitness/ui";
30
13
 
31
- export default function App() {
14
+ export function App() {
32
15
  return (
33
- <ThemeProvider defaultSkin="moonpunk" defaultMode="system" syncDocumentElement>
34
- <Button>Start building</Button>
16
+ <ThemeProvider
17
+ defaultMode="dark"
18
+ defaultSkin="signal-riot"
19
+ defaultDensity="comfortable"
20
+ >
21
+ <Card variant="elevated">
22
+ <CardContent>
23
+ <Button variant="magenta">Launch dispatch</Button>
24
+ </CardContent>
25
+ </Card>
35
26
  </ThemeProvider>
36
27
  );
37
28
  }
38
29
  ```
39
30
 
40
- [Usage and component API](docs/runtime-usage.md) · [Implementation status](docs/implementation-status.md) · [TODO and delivery status](TODO.md) · [Node runtime policy](docs/architecture/node-runtime.md)
41
-
42
- ## Implementation and review status
43
-
44
- The repository is structured as a **pnpm workspace** combining the `@moonframe/ui` runtime library (`src/`) and the `moonframe` Next.js 16 showcase application (`apps/moonframe`). It remains private (`"private": true`) and has not been published to npm. The larger historical specifications below also cover future catalog items, optional original assets, and formal release reviews. Their 105 formal skin-pair review records are not automatically approved by implementation or screenshots.
45
-
46
- **Development runtime:** Node.js 24.22.1 LTS, pinned in [.nvmrc](.nvmrc) and used by [CI](.github/workflows/contract-validation.yml).
47
-
48
- ## Original planning references
49
-
50
- - [Master integration audit](docs/audit/master-integration-audit.md) records the original documentation-only baseline.
51
- - [Root TODO.md](TODO.md) tracks implemented runtime work and the broader roadmap.
52
- - [M0 Local Coding Agent Prompt](docs/handoff/moonframe-local-coding-agent-execution-prompt.md) is historical.
53
- - [Release Train & Adoption](docs/architecture/release-train-and-adoption.md) describes public release gates.
54
- - [Canonical source-of-truth registry](docs/architecture/decisions-and-governance.md#master-integration-registry--cross-domain-ownership-2026-10-25) records policy owners.
55
- - [Master Integration Issue Bible](docs/backlog/master-integration-issue-bible.md) and [Implementation roadmap](docs/implementation-roadmap.md) retain the full planned scope.
56
-
57
- ## Product promise
58
-
59
- - **15 skins**, each intentionally different in layout grammar, geometry, typography, component recipes, navigation, media treatment, and motion signature.
60
- - **Light + Dark** for every skin: 30 baseline appearances. `system` resolves to Light or Dark and is not another skin.
61
- - One shared behavioral/accessibility contract and one public component API.
62
- - Skin, color appearance, density, motion preference, and contrast preference remain independent axes.
63
- - Optional original vector/bitmap assets and opt-in sound effects are designed and governed as separate asset packs.
64
-
65
- ## The 15 skin catalog
66
-
67
- | # | Skin | Exclusive visual territory |
68
- |---:|---|---|
69
- | 01 | Moonpunk | Acid-lime manga punk; neo-brutalist impact; torn-edge accents; hard offset shadows |
70
- | 02 | Moonriot | Riot/editorial cyberpunk; red signal marks; angular split compositions |
71
- | 03 | Moonzine | Underground zine; collage; paper artifacts; editorial asymmetry |
72
- | 04 | Moonhalftone | Manga screentone; monochrome ink; raster fields; panel pacing |
73
- | 05 | Moonglitch | Terminal/cybernetic; signal interruption; scanline and telemetry motifs |
74
- | 06 | Moonsmash | Kinetic impact; oversized display type; radial bursts and explosive transitions |
75
- | 07 | Moonink | Brush-ink illustration; hand-painted strokes; expressive negative space |
76
- | 08 | Mooncrash | Industrial hazard; mechanical plates; warning markings and rugged utility |
77
- | 09 | Moonpanel | Modular comic-panel composition; strict framing and deliberate grids |
78
- | 10 | Moonscrawl | Sketchbook and hand annotation; loose linework; draft-like visual marks |
79
- | 11 | Moonraw | Raw/minimal brutalism; exposed structure; reduced decoration; rigid geometry |
80
- | 12 | Moonchrome | Futuristic metallic surfaces; reflective contours; controlled spectral highlights |
81
- | 13 | Classic | Familiar shadcn-style baseline; restrained surfaces and predictable hierarchy |
82
- | 14 | Moonquest | RPG / adventure UI; quest journal, inventory, progression and game-like framing |
83
- | 15 | Moonledger | Professional ERP; dense and precise data workspaces; compact but accessible controls |
84
-
85
- Classic is a proposed Moonframe visual reference informed by dated shadcn documentation; it is not a claim of source compatibility or product affiliation. See the [Classic baseline and reference boundary](docs/research/classic-baseline.md). Upstream generated source is not copied. The local runtime uses native HTML semantics; the advanced-provider comparison remains open research.
86
-
87
- ## Documentation
88
-
89
- ### Package Architecture & Developer Experience (2026-10-25)
90
-
91
- - [Audited live repo and P0–P3 package/DX findings](docs/audit/package-architecture-dx-audit.md)
92
- - [Verified package/DX research delivery report and CI evidence](docs/audit/package-architecture-dx-delivery-2026-10-25.md)
93
- - [Official npm/Node/TS/Vite/Tailwind/registry/OIDC research](docs/research/package-architecture-dx-research-log.md)
94
- - [Canonical Package Architecture & Developer Experience Bible](docs/architecture/package-architecture-dx-bible.md)
95
- - [ADR-0009 — Package topology, single runtime candidate](docs/adr/0009-package-topology.md)
96
- - [ADR-0010 — npm runtime vs source-owned registry](docs/adr/0010-package-distribution.md)
97
- - [Proposed package exports/metadata/distribution machine contract](contracts/moonframe-package-architecture-v0.1.json)
98
- - [11 planned developer journeys and 13 diagnostics](contracts/moonframe-developer-experience-v0.1.json)
99
- - [Bounded proposed package JSON Schema](schemas/moonframe-package-architecture.schema.json) and [16 invalid contract fixtures](contracts/fixtures/package-architecture-dx-v0.1.json)
100
- - [16 small issue-ready DX/package tasks (no GitHub issues created)](docs/backlog/package-architecture-dx-atomic-issues.md)
101
-
102
-
103
- ### Accessibility & Visual QA (2026-10-25)
104
-
105
- - [Live repository accessibility/visual QA audit](docs/audit/accessibility-visual-qa-baseline.md)
106
- - [Accessibility & Visual QA delivery report and verified CI evidence](docs/audit/accessibility-visual-qa-delivery-2026-10-25.md)
107
- - [WCAG/ACT/axe/Storybook/Playwright primary-source research](docs/research/accessibility-visual-qa-research-log.md)
108
- - [Accessibility & Visual QA Bible — canonical methodology](docs/qa/accessibility-visual-qa-bible.md)
109
- - [51 WCAG criteria and evidence/verification mapping](contracts/moonframe-accessibility-requirements-v0.1.json)
110
- - [151 component QA profiles joined to the canonical state/keyboard inventory](contracts/moonframe-component-qa-profiles-v0.1.json)
111
- - [270 unrendered baseline slots — nine reference screens × 30 appearances](contracts/moonframe-visual-baseline-matrix-v0.1.json)
112
- - [Empty QA/waiver/defect evidence ledger](contracts/moonframe-accessibility-qa-evidence-v0.1.json)
113
- - [Proposed conditional QA evidence JSON Schema](schemas/moonframe-accessibility-qa-record.schema.json)
114
- - [14 synthetic invalid QA evidence fixtures](contracts/fixtures/accessibility-visual-qa-v0.1.json)
115
- - [ADR-0008 — testing tools and browser/AT decision pending](docs/adr/0008-accessibility-visual-qa-tooling.md)
116
- - [16 issue-ready QA tasks](docs/backlog/accessibility-visual-qa-atomic-issues.md)
117
-
118
-
119
- ### Motion, Interaction & SFX (2026-10-25)
120
-
121
- - [Repository audit and P0–P3 evidence](docs/audit/motion-interaction-sfx-audit.md)
122
- - [Verified Motion / Interaction / SFX delivery and CI report](docs/audit/motion-interaction-sfx-delivery-2026-10-25.md)
123
- - [Primary WCAG, browser motion and sound research](docs/research/motion-interaction-sfx-research-log.md)
124
- - [Motion, Interaction & SFX Bible](docs/motion/motion-interaction-sfx-bible.md)
125
- - [25 named motion recipes, interrupt and reduced fallbacks](contracts/moonframe-motion-recipes-v0.1.json)
126
- - [18 cross-component interaction patterns](contracts/moonframe-motion-interactions-v0.1.json)
127
- - [15 distinct but behavior-stable motion directions](contracts/moonframe-motion-skin-matrix-v0.1.json)
128
- - [Existing canonical six-event SFX contract, enriched safely](contracts/moonframe-sfx-contract-v0.1.json)
129
- - [180 unrendered motion/interaction appearance QA cells](contracts/moonframe-motion-qa-coverage-v0.1.json)
130
- - [Proposed motion recipe schema](schemas/moonframe-motion-recipe.schema.json) and [12 negative fixtures](contracts/fixtures/motion-interaction-sfx-v0.1.json)
131
- - [ADR-0007 — native CSS / WAAPI / View Transition / Motion and audio engine options](docs/adr/0007-motion-and-optional-audio-engines.md)
132
- - [QA/release validation plan](docs/qa/motion-interaction-sfx-validation-plan.md) and [14 atomic tasks](docs/backlog/motion-interaction-sfx-atomic-issues.md)
133
-
134
-
135
- ### Original Asset & Brand (2026-10-25)
136
-
137
- - [Live asset inventory, provenance gaps and P0–P3 audit](docs/audit/original-asset-brand-audit.md)
138
- - [Original Asset & Brand delivery, validation and owner-decision report](docs/audit/original-asset-brand-delivery-2026-10-25.md)
139
- - [Original Asset & Brand Bible — canonical identity and rights policy](docs/brand/original-asset-brand-bible.md)
140
- - [Research log: SVG 2, SVGO, fonts/OFL, licensing, formats, autoplay](docs/research/original-asset-brand-research-log.md)
141
- - [Existing asset manifest, clarified as planned candidate pool](contracts/moonframe-asset-manifest-v0.1.json)
142
- - [15 written skin asset briefs and anti-overlap constraints](contracts/moonframe-skin-asset-briefs-v0.1.json)
143
- - [120 unrendered review cells across 30 Light/Dark appearances](contracts/moonframe-asset-qa-coverage-v0.1.json)
144
- - [Conditional proposed Draft 2020-12 asset-record schema](schemas/moonframe-asset-record.schema.json)
145
- - [Planned metadata and 10 synthetic invalid fixtures](contracts/fixtures/original-asset-v0.1.json)
146
- - [ADR-0006 shared Moonframe brand and provenance pipeline — proposed](docs/adr/0006-original-asset-pipeline-and-brand.md)
147
- - [Original asset-specific QA and provenance gates](docs/qa/original-asset-validation-plan.md)
148
- - [15 issue-ready small follow-up tasks](docs/backlog/original-asset-atomic-issues.md)
149
-
150
-
151
- ### Auth & Security UI Integration (2026-10-25)
152
-
153
- - [Auth/Security UI repository audit](docs/audit/auth-security-ui-audit.md)
154
- - [Auth & Security UI delivery report and CI evidence](docs/audit/auth-security-ui-delivery-2026-10-25.md)
155
- - [Current security standards and provider research](docs/research/auth-security-ui-research-log.md)
156
- - [Expanded canonical Auth & Security UI Bible](docs/premium/auth-ui-suite.md)
157
- - [62 flow contracts, 20 states and 26 guarded transitions](contracts/moonframe-auth-flow-contract-v0.1.json)
158
- - [Six providers × 14 documented feature statuses](contracts/moonframe-auth-provider-capability-matrix-v0.1.json)
159
- - [20 threat-informed acceptance cases](contracts/moonframe-auth-threat-model-v0.1.json)
160
- - [240 planned Light/Dark auth skin specimens](contracts/moonframe-auth-skin-coverage-v0.1.json)
161
- - [Safe UI event JSON Schema](schemas/moonframe-auth-safe-event.schema.json) and [synthetic fixtures](contracts/fixtures/auth-security-v0.1.json)
162
- - [ADR-0005 provider-neutral integration](docs/adr/0005-auth-provider-neutral-ui-integration.md)
163
- - [Auth QA and acceptance strategy](docs/qa/auth-security-ui-validation-plan.md)
164
- - [14 atomic tasks for later implementation](docs/backlog/auth-security-ui-issues.md)
165
-
166
-
167
- ### Advanced Data Workspace (2026-10-25)
168
-
169
- - [Repository audit and P0–P3 findings](docs/audit/advanced-data-workspace-audit.md)
170
- - [Advanced Data Workspace final delivery and CI report](docs/audit/advanced-data-workspace-delivery-2026-10-25.md)
171
- - [Canonical existing Data Workspace Bible — expanded](docs/premium/data-workspace.md)
172
- - [Primary-source research and comparison](docs/research/advanced-data-workspace-research-log.md)
173
- - [ADR-0004 — engine choice proposed, not approved](docs/adr/0004-data-workspace-engine.md)
174
- - [Data model, query, selection, saved-view and export contract](contracts/moonframe-data-workspace-contract-v0.1.json)
175
- - [30 appearance / 15 data workspace recipes and 180 pending cases](contracts/moonframe-data-skin-coverage-v0.1.json)
176
- - [8 domain-neutral presets referencing existing blocks/pages](contracts/moonframe-data-preset-catalog-v0.1.json)
177
- - [Proposed query/selection/export JSON Schema](schemas/moonframe-data-query.schema.json) and [fixture cases](contracts/fixtures/data-workspace-v0.1.json)
178
- - [Data Workspace QA strategy](docs/qa/data-workspace-validation-plan.md) and [14 atomic tasks](docs/backlog/advanced-data-workspace-issues.md)
179
-
180
-
181
- ### Component API & Behavior (2026-10-25)
182
-
183
- - [Component API delivery report with CI evidence](docs/audit/component-api-delivery-2026-10-25.md)
184
-
185
- - [Live component behavior audit](docs/audit/component-api-behavior-audit.md)
186
- - [Current primary-source research log](docs/research/component-api-research-log.md)
187
- - [Component API & Behavior Bible — canonical API convention](docs/component-api-behavior-bible.md)
188
- - [151 component-level API proposals](contracts/moonframe-component-api-contract-v0.1.json)
189
- - [151 × 24 state applicability matrix](contracts/moonframe-component-state-matrix-v0.1.json)
190
- - [37 keyboard patterns + 151 mappings](contracts/moonframe-keyboard-interaction-matrix-v0.1.json)
191
- - [Component behavior/schema draft](schemas/moonframe-component-behavior.schema.json) and [state schema](schemas/moonframe-component-matrix.schema.json)
192
- - [Component testing and release evidence plan](docs/qa/component-testing-strategy.md)
193
- - [12 small issue-ready tasks](docs/backlog/component-api-atomic-issues.md)
194
-
195
-
196
- ### Token Architecture & Theme Engine (2026-10-25)
197
-
198
- - [Live token/theme audit](docs/audit/token-theme-engine-audit.md)
199
- - [Token/theme delivery and verification report](docs/audit/token-theme-engine-delivery-2026-10-25.md)
200
- - [Token/theme primary-source research](docs/research/token-theme-engine-research.md)
201
- - [Authoritative token pipeline & runtime spec](docs/architecture/token-pipeline.md)
202
- - [ADR-0002 bounded DTCG format and generator (proposed)](docs/adr/0002-token-format-and-generator.md)
203
- - [ADR-0003 theme precedence/CSS/SSR (proposed)](docs/adr/0003-theme-runtime-and-css-output.md)
204
- - [Token/theme QA plan](docs/qa/token-theme-validation-plan.md)
205
- - [Token subset structural schema](schemas/moonframe-token-subset.schema.json)
206
- - [Theme preference structural schema](schemas/moonframe-theme-preferences.schema.json)
207
- - [10 atomic token/theme tasks](docs/backlog/token-theme-atomic-issues.md)
208
-
209
- ### Premium package specifications (2026-10-25)
210
-
211
- - [Premium scope delivery report — verified commits, tests, issues](docs/audit/premium-scope-delivery-2026-10-25.md)
212
-
213
- - [Premium Scope Bible — six levels A–F](docs/premium/premium-scope-bible.md)
214
- - [Premium scope audit with P0–P3 findings](docs/audit/premium-scope-audit-2026-10-25.md)
215
- - [Research and competitive analysis](docs/research/premium-competitive-analysis.md)
216
- - [Authentication UI suite](docs/premium/auth-ui-suite.md) and [Auth flow references](contracts/moonframe-auth-ui-catalog-v0.1.json)
217
- - [Four-tier Data Workspace](docs/premium/data-workspace.md) and [Data contract](contracts/moonframe-data-workspace-contract-v0.1.json)
218
- - [151 proposed components](contracts/moonframe-component-manifest-v0.1.json), [144 block records (13 families + 131 concrete)](contracts/moonframe-block-manifest-v0.1.json)
219
- - [72 page templates](contracts/moonframe-page-template-manifest-v0.1.json), [8 starter applications](contracts/moonframe-starter-manifest-v0.1.json)
220
- - [16 optional integrations](contracts/moonframe-integration-manifest-v0.1.json), [660 pending reference specimens](contracts/moonframe-premium-coverage-v0.1.json)
221
- - [10 atomic issue-ready premium tasks](docs/backlog/premium-catalog-atomic-issues.md)
222
-
223
- - [Baseline repository audit](docs/audit/repository-baseline-audit.md)
224
- - [Refinement delivery report](docs/audit/refinement-delivery-2026-10-25.md)
225
- - [Primary-source research log](docs/research/research-log.md)
226
- - [Primitive provider ADR (open)](docs/adr/0001-primitive-provider.md)
227
- - [Architecture, ownership and governance](docs/architecture/decisions-and-governance.md)
228
- - [Token pipeline and 30 pending coverage slots](docs/architecture/token-pipeline.md)
229
- - [QA strategy and release gates](docs/qa/validation-strategy.md)
230
- - [Initial small-task backlog](docs/backlog/initial-issues.md)
231
- - [Full skin recipes](contracts/moonframe-skin-specifications-v1.0.json)
232
- - [Component manifest (103 proposed entries)](contracts/moonframe-component-manifest-v0.1.json)
233
- - [Blocks and template manifest (13 proposed entries)](contracts/moonframe-block-manifest-v0.1.json)
234
- - [Token source/coverage plan](contracts/moonframe-token-source-plan-v0.1.json)
235
- - [Asset contract](contracts/moonframe-asset-manifest-v0.1.json)
236
- - [SFX contract](contracts/moonframe-sfx-contract-v0.1.json)
237
- - [Contract validation (Node, no installed packages)](scripts/validate-contracts.mjs)
238
- - [Contract CI](.github/workflows/contract-validation.yml)
239
-
240
- - [Design System Bible v1.3](docs/moonframe-ui-design-system-bible-v1.3.md)
241
- - [Skin Grammar Contract v1.0](contracts/moonframe-skin-grammar-contract-v1.0.json)
242
- - [Theme Contract v1.3](contracts/moonframe-theme-contract-v1.3.json)
243
- - [Token Dictionary Contract v0.1](contracts/moonframe-token-dictionary-v0.1.json)
244
- - [Implementation Roadmap](docs/implementation-roadmap.md)
245
-
246
- ## Non-negotiable design laws
247
-
248
- 1. **Skin ≠ palette.** Every skin changes the visual grammar and must be recognizable in grayscale and with decorative artwork removed.
249
- 2. **One behavior, many skins.** Skin selection never changes component semantics, keyboard behavior, or business logic.
250
- 3. **No duplicate component forks.** Differences use semantic tokens and approved skin recipes; a behavioral fork requires an architecture decision record.
251
- 4. **Accessible by contract.** Focus, keyboard, screen-reader semantics, contrast, target size, forced-colors and reduced-motion are tested—not left to art direction.
252
- 5. **No fake completion.** Contracts and mockups are specifications only. Production status requires code, tests, review, and consumer validation.
253
- 6. **Original assets require provenance.** Each logo, vector, PNG, icon, texture, and sound effect must have a source/creator, license/status, format, intended use, and review record.
254
- 7. **Sound is opt-in.** No automatic audio; sound can be muted and never carries meaning unavailable visually or to assistive technology.
255
-
256
- ## Initial implementation strategy
257
-
258
- 1. Audit the target repository and current React/Tailwind/shadcn setup.
259
- 2. Lock token names, semantic roles, component contracts, and visual primitives.
260
- 3. Prototype Classic, Moonpunk, Moonzine, and Moonledger on the same reference screens.
261
- 4. Validate theme switching and shared behavior before scaling to all 15 skins.
262
- 5. Build the Skin Lab and test 30 baseline appearances plus risk-based state/density/viewport combinations.
263
- 6. Develop remaining skins, premium blocks/templates, original asset packs, and optional SFX.
264
- 7. Publish only after release gates pass.
265
-
266
- ## Scope boundaries
267
-
268
- Moonframe provides UI components, layouts, tokens, themes, motion, asset contracts, and optional UI feedback sounds. It does **not** own Moonships infrastructure behavior, Moonradio messaging behavior, RPG rules, ERP/accounting logic, authentication policy, authorization policy, or product-specific data models.
269
-
270
- ## Versioning
271
-
272
- The numbered contracts are versioned independently. Any breaking public API, token rename, skin ID change, or behavior change requires a migration note and an explicit versioning decision. Skin IDs are stable identifiers; display names may evolve only through a documented change.
31
+ - **Prevent SSR theme flash**: embed `createSkinInitScript()` (matching `DEFAULT_THEME_STORAGE_KEY = 'mw-ui-theme'`) in your HTML `<head>` so `light`, `dark`, and `high-contrast` modes, `data-skin`, and `data-density` hydrate before first paint.
32
+ - **Root barrel vs optional subpaths**: core primitives, overlays (`Dialog`, `Sheet`, `Popover`, `Tooltip`, `DropdownMenu`, `Select`, `Tabs`), forms, tables, and `sanitizeUrl` are exported from `@moonwitness/ui`. Optional peer-dependency components stay scoped to their subpaths (`@moonwitness/ui/components/command` for `cmdk` and `@moonwitness/ui/components/toast` for `sonner`).
33
+ - **React Server Components**: every interactive and Radix-backed component includes a top-level `'use client'` directive.
34
+ - **URL safety**: `Breadcrumbs` and `UpdateBanner` automatically validate dynamic links via `sanitizeUrl()`.
35
+
36
+ ## Art direction from the references
37
+
38
+ - **Reference 1** supplies detail language for the homepage: story cards, captions, notes, orbit paths, moon phases, arrows, and collage fragments.
39
+ - **Reference 2** is the homepage composition: narrow masthead, dominant manga city hero, three editorial panels, connection/map band, illustrated process strip, and a high contrast closing CTA.
40
+ - **Reference 3** guides the internal story workbench: navigator on the left, readable editor/preview in the center, and a compact inspector on the right.
41
+ - **Reference 4** guides the Board shell: brand masthead, persistent left navigation, metric strip, and dense operational panels.
42
+ - **The supplied “Enter the Shadow” login reference** guides the authentication composition: at desktop widths, keep the crown/brush header above a left-side ink form and right-side moon/city artwork; on mobile, show a deliberate artwork crop before the form without covering its controls. Use the canonical brand lockup and shared `Panel`, `Label`, `Input`, `Button`, and `LoadingSpinner`. Keep headline, labels, helper text, errors, and submit status as accessible HTML. While auth is pending, disable the submit action, set `aria-busy`, and keep an explicit “Entering the shadow…” or “Creating account…” label beside the decorative spinner. Treat “Remember me”, “Forgot password?”, and footer links as concepts to verify against real product behavior; never add unsupported auth features.
43
+
44
+ The shared visual vocabulary uses ink black, warm paper, brush lettering, manga/city artwork, rough frames, tape, halftone, hand marks, and deliberate magenta, cyan, and yellow accents. It should feel assembled and editorial rather than like a clean admin template with a dark background. Artwork creates atmosphere; HTML remains responsible for every heading, label, number, control, and status. Do not use a complete mockup screenshot as a page background.
45
+
46
+ To maintain gritty zine continuity across Home, auth, Board, and Story Workbench without breaking user light/dark theme preferences:
47
+
48
+ - Treat distressed ink black (`--mw-ink-black` / dark surfaces) as the signature high-contrast canvas and use fixed `--mw-paper-cream` as torn paper scraps, stickers, and KPI notes rather than rendering operational dashboards as flat straight-bordered beige boxes. Keep light mode fully legible as an intentional paper-zine theme.
49
+ - Replace rigid straight-line boxes on expressive and editorial panels with canonical xerox/dry-brush scuffed borders, torn-edge dividers, corner ink splatters, and low-opacity halftone/speckle overlays (`pointer-events: none`, `aria-hidden="true"`).
50
+ - Allow short expressive headings to use two-tone split brush lettering (paper + `--mw-magenta` / `--mw-yellow` brush-swipe backing) and neon icon tiles/status borders, while strictly obeying `TOKENS.md` WCAG AA contrast (`>= 4.5:1`, dark `--mw-on-magenta` on `#ff2e88`, no app-local color literals).
51
+ - Use the Board sidebar footer and non-interactive panel margins for deterministic zine collage fragments (monochrome manga-eye crop, tape note, crown/lightning/star doodles) that never block navigation, focus rings, or hit targets.
52
+
53
+ Use `Road Rage` (`--mw-font-brush`) for short expressive headings, `Anton` (`--mw-font-display`) for compact section labels and large metrics, `Space Grotesk` (`--mw-font-sans`) for controls and prose, and `JetBrains Mono` (`--mw-font-mono`) for technical identifiers and timestamps. Brush lettering is not for paragraphs, long titles that must wrap predictably, or dense data. Check localized copy with Indonesian diacritics, long compound words, punctuation, and numeric formats at narrow widths; allow prose to wrap without forcing the page to overflow. Every local face must retain its system fallback stack so copy remains legible if a font request fails. Keep first viewport geometry flexible and validate delayed font swaps against the catalog layout-shift budget (`CLS < 0.1`). The logo is custom vector artwork and does not depend on a font at runtime.
54
+
55
+ ## Brand and imagery
56
+
57
+ The crown and hand-drawn `MOONWITNESS` mark are the current primary identity. The editable canonical SVG source is `@moonwitness/assets/brand/source/moonwitness-master.svg`; generated symbol, wordmark, lockup, favicon, and social assets must be rebuilt from this source. Do not recreate the old crescent as a competing primary mark. Use a lockup where it fits, the crown symbol in compact rails, and the simplified favicon at tiny sizes. Keep clear space around the mark at least equal to the crown's central spike height; never stretch or rotate the logo. For digital use, keep the crown at least 16 px high and the wordmark at least 20 px high; below that, use the simplified crown favicon.
58
+
59
+ In the Board shell, pair the compact crown with a readable `MOONWITNESS` wordmark in the sidebar header. Mark the crown decorative when adjacent text already names the product. The active navigation item uses a straight magenta rail and a rectangular accent surface with `aria-current="page"`; preserve the readable dark foreground, keyboard focus, and a no-tilt treatment. Use the same compact lockup in the mobile navigation sheet.
60
+
61
+ Canonical interface icons live in `@moonwitness/assets/icons` on a 24×24 grid and are generated as individually imported typed React wrappers by the UI package. Interactive icons must have a recognizable action and accessible name via their control; decorative marks are separate, hidden from assistive technology, and cannot take focus or pointer input. Never paste inline SVG paths into app screens or substitute Unicode glyphs for a canonical icon.
62
+
63
+ Application code imports icons from the public `@moonwitness/ui/icons/*` subpaths; it does not import third-party icon libraries directly. When an action or concept has no matching canonical symbol, add a provenance-recorded SVG to the assets package and generate its typed wrapper before migrating the consumer. Reuse an existing icon only when both its meaning and silhouette fit the call site. Loading feedback belongs to a shared loading component/effect, not an unrelated icon glyph.
64
+
65
+ Complex manga scenes and collage art are optimized raster assets. Keep editable high-quality masters and provenance in the assets package; export WebP crops for desktop, mobile, and masthead use. Every image has an intentional focal crop and is marked decorative or given accurate alt text. Never generate embedded UI copy, statistics, logos, or fake product controls into artwork.
66
+
67
+ Material assets include torn edges, ink frames, paper notes, tape, halftone, speckle, and hand-drawn arrows. Keep texture on a decorative layer with `pointer-events: none`; it must not lower text contrast, cover a focus ring, or make a control's click target irregular. Prefer deterministic SVG/CSS pattern assets and restrained opacity over repeated expensive filters. Rendered brand marks, interface icons, and other SVG content must remain inside their `viewBox`; intentional decorative bleed must be named and documented, as with the orbit rings on the social card.
68
+
69
+ Interaction icons have one canonical vector source in `@moonwitness/assets/icons`; `@moonwitness/ui/icons/*` wrappers are generated from those SVGs and must never be hand-maintained copies. Choose an icon by meaning and silhouette, use a public typed export, and add a canonical source only when the existing set has no appropriate symbol. Icons are decorative by default; controls still need visible text or an accessible name. Keep decorative doodles out of interaction icon slots. Review the icon contact sheet at 16, 20, 24, and 32 px on both light and dark surfaces before accepting a new symbol.
70
+
71
+ ## Decoration intensity
72
+
73
+ | Surface | Intensity | Allowed treatment |
74
+ | ----------------------------------- | ---------------- | ----------------------------------------------------------------------------- |
75
+ | Public hero / closing CTA | Expressive | Large art, layered brush headings, torn color strips, a few notes and doodles |
76
+ | Editorial cards / catalog specimens | Balanced | One image, one accent, light frame texture, concise caption |
77
+ | Board table / workbench / forms | Restrained | Strong hierarchy, small accent marks, mostly square readable panels |
78
+ | Errors / access / empty / loading | Functional first | Clear state text and action; illustration or motion stays secondary |
79
+
80
+ Do not rotate tables, forms, paragraphs, dashboard figures, or interactive panels. Tiny rotation belongs only to non-interactive paper notes, tape, and artwork. A motif that decorates a hero should not be repeated behind every row of a dense dashboard.
81
+
82
+ ## Component layers and ownership
83
+
84
+ Build upward only where repeated behavior requires it:
85
+
86
+ 1. **Foundation** — semantic color, typography, spacing, shape, depth, layer, and motion tokens in `styles/tokens.css`.
87
+ 2. **Primitive** — one accessible behavior: `Button` (`treatment="solid|brush"`), `Input`, `Checkbox` (with indeterminate support), `Select` / `SelectField`, `Textarea`, `Badge`, `Avatar`, `Switch`, and `Skeleton`.
88
+ 3. **Composition** — reusable arrangements: `Field`, `Panel` (`surface="paper|ink|default"`, `frame="line|torn|scuffed"`, `density="comfortable|compact|micro|spacious"`, `contentClassName`, `headingLevel`), `ConfirmDialog` (`warningBanner`, `consequence`, `destructive`, `busy`, `error`), `ErrorState` (`code`, `stateSlug`, `onRetry`, `retrying`), `Breadcrumbs` (`items`, `renderLink`, `onNavigate`), `InboxPopover` (`unreadCount`, `loading`, `error`, `onRetry`, `isEmpty`), `BrandMark` (`variant="lockup|symbol|wordmark"`, `tone`, `basePath`), `ComicPanel` / `MangaFrame` (`panelNumber`, `kicker`, `surface`, `frame`, `accent`, `halftone`), `Toolbar`, `Table` (`density="comfortable|compact"`, `scrollLabel`), `Pagination` (`trailing`), `KanbanBoard` (`onCardMove`, keyboard `ArrowLeft`/`ArrowRight`), `PageHeader` (`treatment="display|brush"`, `scale="default|hero"`, `accentTitle`, `accent`, `headingLevel`), `Dialog`, `Sheet`, `Popover`, `DropdownMenu`, `Command`, `EmptyState` (`illustration`, `basePath`, `headingLevel`), and progression primitives (`QuestCard`, `AchievementBadge`, `RewardPanel`).
89
+ 4. **Pattern/effect** — reusable editorial frame, `SectionRibbon` (`surface="paper|ink"`, `frame="line|torn|scuffed"`, `size="sm|md|lg"`, `treatment="display|brush"`), `PaperNote`, `ArtworkFrame` (`frame="line|torn|scuffed"`), `MetricTile` (`surface="default|paper|ink"`, `frame="line|torn|scuffed"`, `size="compact|default|hero"`, `interactive`, `accent="magenta|cyan|yellow|green|violet"`), `SpeechBubble` / `StickerBadge`, `CharacterDisplay` / `CharacterReaction` (wired via `@moonwitness/ui/lib/asset-registry`), `Doodle` (`star|bolt|smiley|arrow|crown`), `DecorativeMotif` (`underline|cross-out|orbit|globe-grid|moon-phases|eye-target`), `LiveIndicator` (`active`, `variant="live|on-air"`), `SignalOrbit`, progress state, compact `LoadingSpinner`, and sound behavior (`SoundProvider`, `SoundToggle`, `useSfx`). Use the spinner and `LiveIndicator` only for real pending/live state; keep an accessible action label on the control and honor reduced motion.
90
+
91
+ `@moonwitness/ui` owns presentation and reusable interaction mechanics. `@moonwitness/assets` owns source and generated media, fonts, sounds, inventory, and provenance. Neither package owns app routes, auth, API access, permission, persisted product data, analytics meaning, or workflow rules. A component belongs in the shared package when multiple surfaces need it, or one surface needs an accessibility primitive that cannot safely be duplicated.
92
+
93
+ Use the shared `SignalOrbit` for a quiet, decorative connection motif around content such as the homepage relationship band. Keep orbit rings and nodes outside interactive targets, hide them from assistive technology, and do not use them to imply live locations, counts, or product data. Keep opacity low enough that orbit lines never compete with text.
94
+
95
+ Import through public subpaths such as `@moonwitness/ui/components/button`, `@moonwitness/ui/icons/search`, `@moonwitness/ui/themes`, and `@moonwitness/ui/components.css`. Never import `dist` or package internals. Import styles once with tokens before component styles. Board pages must use shared buttons, inputs, selects, textareas, checkboxes, and shared table compositions; do not add new raw native JSX controls. Preserve the existing controlled state, labels, validation, disabled behavior, keyboard use, file input behavior, indeterminate checkboxes, sorting, and row propagation.
96
+
97
+ The package supports React 18 and 19. `react`, `react-dom`, and `radix-ui` are required peers because the public runtime imports them; `cmdk` and `sonner` are optional and only needed by consumers that render their respective Command or Toast compositions. DOM-forwarding components and generated icons accept object and callback refs on both React versions. The packed-package verifier runs isolated consumers against exact React 18 and React 19 dependency sets rather than relying on the workspace's hoisted dependencies.
98
+
99
+ `Button asChild` preserves the child link's navigation semantics. When disabled, it sets `aria-disabled`, removes the child from sequential keyboard focus, and suppresses click/Enter/Space activation—including child click handlers. Prefer a real button with `disabled` when the action does not navigate.
100
+
101
+ Use `Table`'s optional `scrollLabel` when a table can overflow horizontally. It makes the overflow wrapper a named, keyboard-focusable region while leaving the nested native table semantics intact. When the region itself is focused, Arrow Left/Right pans and Home/End moves to either edge; controls inside the table retain their normal key behavior. The whole page must not acquire horizontal overflow.
102
+
103
+ All shared primitives — including `Dialog`, `Sheet`, `Popover`, `Tooltip`, `Select`, `DropdownMenu`, `Command`, `Switch`, `Checkbox`, `ModePicker`, `LogConsole`, `MetricTile`, and `UpdateBanner` — ship complete standalone styles inside `@moonwitness/ui/components.css` scoped under `@layer components`. Consumers do not need Tailwind CSS to render any component; Tailwind v4 consumers can import `@moonwitness/ui/styles/tokens.css` and `@moonwitness/ui/components.css` alongside Tailwind without conflicts.
104
+
105
+ When adding a component: first record its behavior and accessibility contract; build it from existing tokens and helpers; expose a narrow public subpath; add a catalog specimen and relevant package checks; then use it from the product surface. Do not add a duplicate “manga” component when an existing primitive can accept a visual treatment.
106
+
107
+ ## Accessibility, responsive behavior, and states
108
+
109
+ Dialog centering is defined once inside `.mw-ui-dialog-content` in `@moonwitness/ui/components.css` (`position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%)`). Avoid stacking a second centering transform on top of `DialogContent` so narrow viewports remain centered and bounded. Verify dialog bounds at narrow widths and preserve visible truncation for long metadata inside command items.
110
+
111
+ - Body text, data, and control labels stay high contrast. Normal text pairs meet WCAG AA (4.5:1); focus and non-text boundaries target at least 3:1 against adjacent surfaces. Saturated pink, cyan, and yellow are accents; use their paired dark foreground for text.
112
+ - `SectionRibbon` declares `surface="paper|ink"`; its accent number chooses a theme- and surface-readable color rather than relying on the bright accent over every background.
113
+ - Every keyboard-operable control has a visible `:focus-visible` treatment that remains above rough frames and texture. Headings retain semantic order; decorative art is ignored by screen readers.
114
+ - Status uses text and shape as well as color. Charts keep labels, markers or an accessible table.
115
+ - Desktop composition may be dense; mobile must be deliberately reordered. Navigation collapses into an operable menu/sheet, side inspectors become sheets or accordions, card rows stack, and tables own their horizontal scroll region. At 200% zoom content must remain reachable without whole-page horizontal overflow.
116
+ - A horizontally scrolling editorial filmstrip has a named, keyboard-focusable region, visible focus, Arrow Left/Right movement, and Home/End navigation. Include concise screen reader instructions; keep the scroll inside the strip, and use instant movement when reduced motion is requested.
117
+ - Controls retain a stable hit area behind brush-shaped visuals. Do not let torn edges create inaccessible click targets.
118
+ - Distinguish loading, refreshing, empty, zero, unavailable, and failed data. Loading UI appears only while a real operation is pending, always describes it in text, and stops when it settles. Keep user work and a retry action after recoverable failure.
119
+
120
+ ## Motion and sound
121
+
122
+ Motion is brief, purposeful, and never required to understand a state. Use shared motion tokens for hover/press feedback, active navigation markers, overlays, and status transitions. For a card that contains a real action, opt into the shared `mw-ui-interactive-surface`, `mw-ui-interactive-marker`, and `mw-ui-interactive-title` classes; set `--mw-interactive-accent` to a semantic brand accent. Expressive interactive cards and brush CTAs may use tactile stamp-pop hover (`--mw-motion-ease-emphasis` with neon hard-offset shadow swap), and decorative doodles/crowns attached to hovered cards may use a bounded 2–3 frame stepped micro-jitter (`steps(1)`) on hover-capable pointers only — never jitter tables, forms, body text, metrics, or interactive hit targets. Hover motion is available only to hover-capable pointers when reduced motion is not requested. Keep keyboard focus visible and preserve a static focus-within border. Toast entry/dismissal uses the normal motion token; the shared host provides a visible close action and semantic success/error colors. The homepage hero may reveal its HTML copy once over the 220 ms slow-motion token; do not animate the headline as artwork or delay its content under reduced motion. LoadingSpinner and progress indicators animate only while a real operation is pending; their text labels carry the state. Animated UI primitives use the internal `useAnimationVisibility` observer to pause CSS animation while offscreen and resume it when visible; keep this behavior on spinners, progress, skeletons, and decorative effects. Respect `prefers-reduced-motion` in CSS and JavaScript by stopping nonessential movement and leaving a legible static state. Avoid perpetual parallax, animated texture, or hidden/off-screen work. Effects never intercept input. Keep focus rings and hit areas stable through transitions. Prefer CSS/SVG; add canvas/WebGL only for a measured need with an explicit performance budget. Screenshot checks should use deterministic content and avoid capturing midway through unrelated transitions.
123
+
124
+ Use `SoundProvider`, `useSfx`, and `SoundToggle` from the audio public subpath. Default to muted. Sound is available only after a user interaction and an explicit unmuted preference, stored locally. Load a named short cue only when an approved success, important alert, or explicit media action occurs. Never sound on hover, scrolling, or every click. Allow one cue to play at a time; drop new cues while the current cue is active. Release the playback slot after completion or failure. Audio failure cannot affect the product action, and visual/text status remains complete when sound is unavailable.
125
+
126
+ ## Quick visual examples
127
+
128
+ | Prefer | Avoid |
129
+ | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
130
+ | A short brush heading such as “FOLLOW THE SIGNAL”, with body copy in the UI font | Brush lettering for a paragraph, long record title, or dense table |
131
+ | Dark ink text on yellow and a visible focus ring outside the rough frame | White text on saturated pink, or a torn edge that hides keyboard focus |
132
+ | Halftone on a separate decorative layer with `pointer-events: none` | Texture baked over labels, controls, or information that needs to remain selectable |
133
+ | Explicit “No data available” or an error message with retry | Replacing missing, zero, or failed values with an invented metric |
134
+ | A chart with labels and a text/table alternative | A chart that communicates meaning through color alone |
135
+
136
+ ## Review against the mockups
137
+
138
+ Before calling a visual change complete, compare an implementation screenshot with the supplied reference at the same viewport. Check, in order: overall silhouette and density; hero/artwork scale and focal point; type scale and wrapping; paper/ink material; section spacing; then icons, captions, badges, arrows, notes, focus and responsive details. Record remaining visible gaps and review them again after corrections. A green build, a neon palette, or added noise alone does not establish visual similarity. Do not report a numeric “similarity score” for AI mockups.
139
+
140
+ Use real product copy and data on production pages. Dashboard percentage trends require historical comparison data; otherwise show the current value and its label without an invented change. The mockups are visual direction, not evidence that public stories, crew directories, a publishing pipeline, audience metrics, or live location maps exist. Fictional examples are allowed only in the UI Catalog and must say “contoh desain”.
141
+
142
+ ## Checks
143
+
144
+ - `npm run lint` verifies `'use client'` directives, zero Tailwind leakage in `packages/ui/src/components`, URL sanitization on dynamic links, token hygiene, and `package.json` export parity.
145
+ - `npm run typecheck`, `npm run test`, and `npm run test:e2e` validate TypeScript types, package unit/accessibility contracts, and Playwright browser integration tests.
146
+ - Visual acceptance uses reviewed screenshots and responsive specimens in `apps/ui-catalog`.
273
147
 
148
+ See [`TOKENS.md`](./TOKENS.md) for semantic token values, theme behavior, typography, and contrast targets, and [`CHANGELOG.md`](./CHANGELOG.md) for release notes.
package/TOKENS.md ADDED
@@ -0,0 +1,62 @@
1
+ # MoonWitness UI token contract
2
+
3
+ `@moonwitness/ui/styles/tokens.css` is the source of truth for shared visual values. Import it once before component styles. App-specific theme files should map these tokens, not introduce another palette or spacing scale. The [`README.md`](./README.md) is the design Bible; this file documents the technical values and contrast contract.
4
+
5
+ ## Color roles
6
+
7
+ | Role | Token | Value / behavior |
8
+ | ----------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
9
+ | Fixed brand paper | `--mw-paper-cream` | `#f3efe4`; remains warm cream in either theme |
10
+ | Fixed brand ink | `--mw-ink-black` | `#0d0d0d`; remains available on paper and accents |
11
+ | Dark panel | `--mw-ink-panel` | `#17171a` |
12
+ | Semantic page | `--mw-background` / `--mw-foreground` | Theme-aware page surface and text |
13
+ | Semantic raised surface | `--mw-surface` / `--mw-surface-foreground` | Theme-aware panels and controls |
14
+ | Brand yellow | `--mw-yellow` | `#ffe031`; use paired dark ink for text |
15
+ | Brand magenta | `--mw-magenta` | `#ff2e88`; use `--mw-on-magenta` for text |
16
+ | Brand cyan | `--mw-signal-blue` | `#00b8f0`; decorative accent unless paired contrast is checked |
17
+ | Brand violet | `--mw-violet` | `#c084fc`; use `--mw-on-violet` (`#0d0d0d`) for text |
18
+ | Editorial accent text | `--mw-magenta-readable`, `--mw-cyan-readable`, `--mw-yellow-readable`, `--mw-violet-readable` | Darker palette-matched values on paper surfaces; bright brand accents on dark surfaces |
19
+ | Semantic state | `--mw-success`, `--mw-warning`, `--mw-info`, `--mw-error` / `--mw-destructive` | Status colors have distinct semantic tokens, separate from brand magenta, and pair with text/shape |
20
+
21
+ All legacy `--mw-lime` and `--mw-pink` migration aliases have been removed in favor of semantic tokens (`--mw-primary`, `--mw-accent`, `--mw-yellow`, `--mw-magenta`, `--mw-error`, `--mw-destructive`). `--mw-paper` and `--mw-ink` are theme-aware surface tokens; use the fixed brand tokens when a design needs paper or ink to stay unchanged in dark mode.
22
+
23
+ ## Contrast and state
24
+
25
+ Normal text pairs meet WCAG AA at 4.5:1. Non-text control boundaries and focus indicators target at least 3:1 against adjacent surfaces. The package contrast test calculates luminance from token values for both light and `.dark` mappings. Do not use white text on `#ff2e88`; use `--mw-on-magenta` (`#0d0d0d`). Use `--mw-on-accent` for yellow. Error/destructive feedback uses the error semantic, not the brand magenta. Status and chart meaning must not depend on color alone; include labels, shapes, markers, line style, or an accessible data table.
26
+
27
+ ## Typography
28
+
29
+ | Token | Stack | Use |
30
+ | ------------------- | ---------------------------------------------- | --------------------------------------- |
31
+ | `--mw-font-grunge` | MoonWitness Grunge, Road Rage, Impact fallback | Proprietary grunge/funky Gen-Z display |
32
+ | `--mw-font-brush` | Road Rage, MoonWitness Grunge, Impact fallback | Short expressive headings and ribbons |
33
+ | `--mw-font-display` | Anton, MoonWitness Grunge, Impact fallback | Metrics, section titles, compact labels |
34
+ | `--mw-font-sans` | Space Grotesk, system fallback | Body, navigation, controls, tables |
35
+ | `--mw-font-mono` | JetBrains Mono, monospace fallback | Technical IDs, timestamps, code |
36
+
37
+ Fonts are self-hosted by the consuming app from `@moonwitness/assets/fonts.css`; no remote font request belongs in this stylesheet. Road Rage is subsetted for short editorial headings. Do not fake unavailable font weights. Keep meaningful text readable if a font fails or loads late.
38
+
39
+ ## Layout, material, depth, and motion
40
+
41
+ Use `--mw-space-*` for general spacing; `--mw-panel-gap-compact`, `--mw-panel-gap-comfortable`, and matching panel padding for dense editorial panels. `--mw-frame-width` and `--mw-torn-safe-inset` reserve room for textured edges; focus outlines must remain visible outside that inset. `--mw-decorative-rotation` is for notes, tape, stickers, or artwork only. Keep controls, body copy, tables, charts, and data panels aligned.
42
+
43
+ Use the shared radius, hard-shadow, layer, and motion tokens rather than introducing local scales. Comic panels and speech bubbles use `--mw-comic-border-width` (`2px`), `--mw-comic-gutter` (`0.75rem`), `--mw-shadow-comic` (`4px 4px 0 0 var(--mw-ink)`), and `--mw-motion-pop` (`180ms`, zeroed under `prefers-reduced-motion: reduce`). Motion uses `--mw-motion-fast` (120 ms) for control feedback, `--mw-motion-normal` (160 ms) for overlays and toast entry/dismissal, and `--mw-motion-slow` (220 ms) for a single decorative entrance. Use `--mw-motion-ease` for standard movement and `--mw-motion-ease-emphasis` only for brief decorative emphasis. `--mw-motion-draw`, `--mw-motion-delay`, and `--mw-motion-effect` define finite underline and speed-line accents. The `--mw-motion-pulse`, `--mw-motion-progress`, and `--mw-motion-spin` durations belong only to their matching loading/effect patterns. The fixed cream and ink tokens support paper scraps and dark ink against a Board dark theme. Halftone and speckle belong on a non-interactive decoration layer; they must not reduce text contrast or intercept pointer/focus.
44
+
45
+ The `.dark` class remaps semantic page/surface tokens while retaining fixed brand paper, ink, and accents. Theme persistence and selection are app-owned. Under `prefers-reduced-motion: reduce`, transition duration tokens become zero; components and app-specific effects must also disable keyframes and preserve state information without movement. Loading indicators may become static while their textual status remains visible.
46
+
47
+ ## Skin & Theme Engine (`@moonwitness/ui/themes`)
48
+
49
+ Skins layer semantic overrides on top of `:root` and `.dark` using `[data-skin='<id>']`, `[data-skin='<id>'].dark`, and `[data-density='compact']` selectors with zero runtime CSS-in-JS:
50
+
51
+ | Skin ID | Label | Default mode | Default density | Purpose |
52
+ | --------------------------- | ------------------------- | ------------ | --------------- | --------------------------------------------------------------------- |
53
+ | `moonwitness-ink` | MoonWitness Ink | `light` | `comfortable` | Default zine/manga editorial aesthetic with warm paper and bold ink |
54
+ | `moonwitness-compact` | MoonWitness Compact | `light` | `compact` | Dense operational layout with crisp neutral surfaces and cyan primary |
55
+ | `moonwitness-high-contrast` | MoonWitness High Contrast | `light` | `comfortable` | Maximum legibility accessibility skin with reinforced focus borders |
56
+ | `moonwitness-riot` | MoonWitness Riot | `dark` | `comfortable` | High-impact punk zine & comic skin with electric neon accents |
57
+
58
+ - Import `themeRegistry`, `createThemeRegistry`, `BUILTIN_SKINS`, and `DEFAULT_SKIN_ID` from `@moonwitness/ui/themes`.
59
+ - Register custom skins via `createThemeRegistry` or `themeRegistry.register(metadata)`. Duplicate or non-slug IDs are rejected, and unknown IDs safely fall back to `DEFAULT_SKIN_ID`.
60
+ - Every supported skin × color mode pair is verified against WCAG AA (≥ 4.5:1 text contrast, ≥ 3:1 control border and focus contrast) in `packages/ui/tests/themes.test.mjs`.
61
+
62
+ The token stylesheet has no global element selectors, external font requests, framework dependencies, or application side effects.
@@ -0,0 +1,8 @@
1
+ import { type CharacterMood } from "../lib/character-registry.js";
2
+ import type { LipSyncPhoneme } from "../motion/index.js";
3
+ export interface AnimeCharacterSvgProps {
4
+ readonly characterId?: string;
5
+ readonly mood: CharacterMood;
6
+ readonly phoneme: LipSyncPhoneme;
7
+ }
8
+ export declare function AnimeCharacterSvg({ characterId, mood, phoneme, }: AnimeCharacterSvgProps): import("react").JSX.Element;