@kortix/ui 0.0.0-bootstrap.0 → 0.14.3

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 (416) hide show
  1. package/README.md +153 -2
  2. package/dist/_vendor/kortix-shared.js +341 -0
  3. package/dist/chat/agent-picker.d.ts +8 -0
  4. package/dist/chat/agent-picker.js +18 -0
  5. package/dist/chat/composer.d.ts +31 -0
  6. package/dist/chat/composer.js +114 -0
  7. package/dist/chat/index.d.ts +22 -0
  8. package/dist/chat/index.js +22 -0
  9. package/dist/chat/markdown.d.ts +10 -0
  10. package/dist/chat/markdown.js +36 -0
  11. package/dist/chat/message-list.d.ts +25 -0
  12. package/dist/chat/message-list.js +73 -0
  13. package/dist/chat/message-view.d.ts +17 -0
  14. package/dist/chat/message-view.js +86 -0
  15. package/dist/chat/model-picker.d.ts +10 -0
  16. package/dist/chat/model-picker.js +68 -0
  17. package/dist/chat/permission-prompt.d.ts +10 -0
  18. package/dist/chat/permission-prompt.js +40 -0
  19. package/dist/chat/question-prompt.d.ts +8 -0
  20. package/dist/chat/question-prompt.js +60 -0
  21. package/dist/chat/send-failure.d.ts +9 -0
  22. package/dist/chat/send-failure.js +21 -0
  23. package/dist/chat/session-thread.d.ts +28 -0
  24. package/dist/chat/session-thread.js +47 -0
  25. package/dist/chat/streaming-markdown.d.ts +21 -0
  26. package/dist/chat/streaming-markdown.js +59 -0
  27. package/dist/chat/tool-call.d.ts +4 -0
  28. package/dist/chat/tool-call.js +150 -0
  29. package/dist/chat/user-message-parts.d.ts +6 -0
  30. package/dist/chat/user-message-parts.js +11 -0
  31. package/dist/components/ui/accordion.d.ts +7 -0
  32. package/dist/components/ui/accordion.js +18 -0
  33. package/dist/components/ui/alert-dialog.d.ts +19 -0
  34. package/dist/components/ui/alert-dialog.js +48 -0
  35. package/dist/components/ui/alert.d.ts +13 -0
  36. package/dist/components/ui/alert.js +67 -0
  37. package/dist/components/ui/avatar.d.ts +11 -0
  38. package/dist/components/ui/avatar.js +23 -0
  39. package/dist/components/ui/back-pill.d.ts +13 -0
  40. package/dist/components/ui/back-pill.js +18 -0
  41. package/dist/components/ui/badge.d.ts +10 -0
  42. package/dist/components/ui/badge.js +42 -0
  43. package/dist/components/ui/breadcrumb.d.ts +11 -0
  44. package/dist/components/ui/breadcrumb.js +28 -0
  45. package/dist/components/ui/bubble.d.ts +20 -0
  46. package/dist/components/ui/bubble.js +38 -0
  47. package/dist/components/ui/button-group.d.ts +9 -0
  48. package/dist/components/ui/button-group.js +32 -0
  49. package/dist/components/ui/button.d.ts +13 -0
  50. package/dist/components/ui/button.js +67 -0
  51. package/dist/components/ui/calendar.d.ts +4 -0
  52. package/dist/components/ui/calendar.js +39 -0
  53. package/dist/components/ui/card.d.ts +96 -0
  54. package/dist/components/ui/card.js +291 -0
  55. package/dist/components/ui/chain-of-thought.d.ts +75 -0
  56. package/dist/components/ui/chain-of-thought.js +66 -0
  57. package/dist/components/ui/chart.d.ts +65 -0
  58. package/dist/components/ui/chart.js +118 -0
  59. package/dist/components/ui/checkbox-group.d.ts +19 -0
  60. package/dist/components/ui/checkbox-group.js +41 -0
  61. package/dist/components/ui/checkbox.d.ts +14 -0
  62. package/dist/components/ui/checkbox.js +27 -0
  63. package/dist/components/ui/collapsible.d.ts +5 -0
  64. package/dist/components/ui/collapsible.js +14 -0
  65. package/dist/components/ui/command.d.ts +58 -0
  66. package/dist/components/ui/command.js +135 -0
  67. package/dist/components/ui/confirm-dialog.d.ts +19 -0
  68. package/dist/components/ui/confirm-dialog.js +30 -0
  69. package/dist/components/ui/context-menu.d.ts +45 -0
  70. package/dist/components/ui/context-menu.js +93 -0
  71. package/dist/components/ui/count-badge.d.ts +26 -0
  72. package/dist/components/ui/count-badge.js +26 -0
  73. package/dist/components/ui/data-grid.d.ts +24 -0
  74. package/dist/components/ui/data-grid.js +107 -0
  75. package/dist/components/ui/date-range-picker.d.ts +119 -0
  76. package/dist/components/ui/date-range-picker.js +190 -0
  77. package/dist/components/ui/definition-list.d.ts +15 -0
  78. package/dist/components/ui/definition-list.js +26 -0
  79. package/dist/components/ui/dialog.d.ts +29 -0
  80. package/dist/components/ui/dialog.js +52 -0
  81. package/dist/components/ui/disclosure.d.ts +121 -0
  82. package/dist/components/ui/disclosure.js +138 -0
  83. package/dist/components/ui/dot-matrix/dotm-3x3-10.d.ts +4 -0
  84. package/dist/components/ui/dot-matrix/dotm-3x3-10.js +29 -0
  85. package/dist/components/ui/dot-matrix/dotm-3x3-12.d.ts +4 -0
  86. package/dist/components/ui/dot-matrix/dotm-3x3-12.js +19 -0
  87. package/dist/components/ui/dot-matrix/dotm-3x3-13.d.ts +4 -0
  88. package/dist/components/ui/dot-matrix/dotm-3x3-13.js +19 -0
  89. package/dist/components/ui/dot-matrix/dotm-3x3-15.d.ts +4 -0
  90. package/dist/components/ui/dot-matrix/dotm-3x3-15.js +22 -0
  91. package/dist/components/ui/dot-matrix/dotm-3x3-16.d.ts +4 -0
  92. package/dist/components/ui/dot-matrix/dotm-3x3-16.js +5 -0
  93. package/dist/components/ui/dot-matrix/dotm-3x3-18.d.ts +4 -0
  94. package/dist/components/ui/dot-matrix/dotm-3x3-18.js +5 -0
  95. package/dist/components/ui/dot-matrix/dotm-3x3-19.d.ts +4 -0
  96. package/dist/components/ui/dot-matrix/dotm-3x3-19.js +5 -0
  97. package/dist/components/ui/dot-matrix/dotm-3x3-2.d.ts +4 -0
  98. package/dist/components/ui/dot-matrix/dotm-3x3-2.js +3 -0
  99. package/dist/components/ui/dot-matrix/dotm-3x3-20.d.ts +4 -0
  100. package/dist/components/ui/dot-matrix/dotm-3x3-20.js +5 -0
  101. package/dist/components/ui/dot-matrix/dotm-3x3-21.d.ts +4 -0
  102. package/dist/components/ui/dot-matrix/dotm-3x3-21.js +5 -0
  103. package/dist/components/ui/dot-matrix/dotm-3x3-3.d.ts +4 -0
  104. package/dist/components/ui/dot-matrix/dotm-3x3-3.js +3 -0
  105. package/dist/components/ui/dot-matrix/dotm-3x3-4.d.ts +4 -0
  106. package/dist/components/ui/dot-matrix/dotm-3x3-4.js +3 -0
  107. package/dist/components/ui/dot-matrix/dotm-3x3-5.d.ts +4 -0
  108. package/dist/components/ui/dot-matrix/dotm-3x3-5.js +3 -0
  109. package/dist/components/ui/dot-matrix/dotm-3x3-6.d.ts +4 -0
  110. package/dist/components/ui/dot-matrix/dotm-3x3-6.js +19 -0
  111. package/dist/components/ui/dot-matrix/dotm-3x3-7.d.ts +4 -0
  112. package/dist/components/ui/dot-matrix/dotm-3x3-7.js +19 -0
  113. package/dist/components/ui/dot-matrix/dotm-3x3-8.d.ts +4 -0
  114. package/dist/components/ui/dot-matrix/dotm-3x3-8.js +19 -0
  115. package/dist/components/ui/dot-matrix/dotm-3x3-9.d.ts +4 -0
  116. package/dist/components/ui/dot-matrix/dotm-3x3-9.js +23 -0
  117. package/dist/components/ui/dot-matrix/dotm-circular-1.d.ts +4 -0
  118. package/dist/components/ui/dot-matrix/dotm-circular-1.js +28 -0
  119. package/dist/components/ui/dot-matrix/dotm-circular-10.d.ts +4 -0
  120. package/dist/components/ui/dot-matrix/dotm-circular-10.js +40 -0
  121. package/dist/components/ui/dot-matrix/dotm-circular-11.d.ts +4 -0
  122. package/dist/components/ui/dot-matrix/dotm-circular-11.js +37 -0
  123. package/dist/components/ui/dot-matrix/dotm-circular-12.d.ts +4 -0
  124. package/dist/components/ui/dot-matrix/dotm-circular-12.js +42 -0
  125. package/dist/components/ui/dot-matrix/dotm-circular-14.d.ts +4 -0
  126. package/dist/components/ui/dot-matrix/dotm-circular-14.js +37 -0
  127. package/dist/components/ui/dot-matrix/dotm-circular-15.d.ts +4 -0
  128. package/dist/components/ui/dot-matrix/dotm-circular-15.js +49 -0
  129. package/dist/components/ui/dot-matrix/dotm-circular-17.d.ts +4 -0
  130. package/dist/components/ui/dot-matrix/dotm-circular-17.js +31 -0
  131. package/dist/components/ui/dot-matrix/dotm-circular-2.d.ts +4 -0
  132. package/dist/components/ui/dot-matrix/dotm-circular-2.js +37 -0
  133. package/dist/components/ui/dot-matrix/dotm-circular-3.d.ts +4 -0
  134. package/dist/components/ui/dot-matrix/dotm-circular-3.js +54 -0
  135. package/dist/components/ui/dot-matrix/dotm-circular-4.d.ts +4 -0
  136. package/dist/components/ui/dot-matrix/dotm-circular-4.js +35 -0
  137. package/dist/components/ui/dot-matrix/dotm-circular-5.d.ts +4 -0
  138. package/dist/components/ui/dot-matrix/dotm-circular-5.js +30 -0
  139. package/dist/components/ui/dot-matrix/dotm-circular-6.d.ts +4 -0
  140. package/dist/components/ui/dot-matrix/dotm-circular-6.js +37 -0
  141. package/dist/components/ui/dot-matrix/dotm-circular-7.d.ts +4 -0
  142. package/dist/components/ui/dot-matrix/dotm-circular-7.js +25 -0
  143. package/dist/components/ui/dot-matrix/dotm-circular-8.d.ts +4 -0
  144. package/dist/components/ui/dot-matrix/dotm-circular-8.js +26 -0
  145. package/dist/components/ui/dot-matrix/dotm-circular-9.d.ts +4 -0
  146. package/dist/components/ui/dot-matrix/dotm-circular-9.js +41 -0
  147. package/dist/components/ui/dot-matrix/dotm-square-1.d.ts +4 -0
  148. package/dist/components/ui/dot-matrix/dotm-square-1.js +27 -0
  149. package/dist/components/ui/dot-matrix/dotm-square-10.d.ts +4 -0
  150. package/dist/components/ui/dot-matrix/dotm-square-10.js +27 -0
  151. package/dist/components/ui/dot-matrix/dotm-square-11.d.ts +4 -0
  152. package/dist/components/ui/dot-matrix/dotm-square-11.js +25 -0
  153. package/dist/components/ui/dot-matrix/dotm-square-12.d.ts +4 -0
  154. package/dist/components/ui/dot-matrix/dotm-square-12.js +28 -0
  155. package/dist/components/ui/dot-matrix/dotm-square-13.d.ts +4 -0
  156. package/dist/components/ui/dot-matrix/dotm-square-13.js +45 -0
  157. package/dist/components/ui/dot-matrix/dotm-square-14.d.ts +4 -0
  158. package/dist/components/ui/dot-matrix/dotm-square-14.js +38 -0
  159. package/dist/components/ui/dot-matrix/dotm-square-15.d.ts +4 -0
  160. package/dist/components/ui/dot-matrix/dotm-square-15.js +31 -0
  161. package/dist/components/ui/dot-matrix/dotm-square-16.d.ts +4 -0
  162. package/dist/components/ui/dot-matrix/dotm-square-16.js +33 -0
  163. package/dist/components/ui/dot-matrix/dotm-square-17.d.ts +4 -0
  164. package/dist/components/ui/dot-matrix/dotm-square-17.js +27 -0
  165. package/dist/components/ui/dot-matrix/dotm-square-18.d.ts +4 -0
  166. package/dist/components/ui/dot-matrix/dotm-square-18.js +29 -0
  167. package/dist/components/ui/dot-matrix/dotm-square-19.d.ts +4 -0
  168. package/dist/components/ui/dot-matrix/dotm-square-19.js +74 -0
  169. package/dist/components/ui/dot-matrix/dotm-square-2.d.ts +4 -0
  170. package/dist/components/ui/dot-matrix/dotm-square-2.js +72 -0
  171. package/dist/components/ui/dot-matrix/dotm-square-20.d.ts +4 -0
  172. package/dist/components/ui/dot-matrix/dotm-square-20.js +79 -0
  173. package/dist/components/ui/dot-matrix/dotm-square-3.d.ts +4 -0
  174. package/dist/components/ui/dot-matrix/dotm-square-3.js +23 -0
  175. package/dist/components/ui/dot-matrix/dotm-square-4.d.ts +4 -0
  176. package/dist/components/ui/dot-matrix/dotm-square-4.js +41 -0
  177. package/dist/components/ui/dot-matrix/dotm-square-5.d.ts +4 -0
  178. package/dist/components/ui/dot-matrix/dotm-square-5.js +23 -0
  179. package/dist/components/ui/dot-matrix/dotm-square-6.d.ts +4 -0
  180. package/dist/components/ui/dot-matrix/dotm-square-6.js +20 -0
  181. package/dist/components/ui/dot-matrix/dotm-square-7.d.ts +4 -0
  182. package/dist/components/ui/dot-matrix/dotm-square-7.js +43 -0
  183. package/dist/components/ui/dot-matrix/dotm-square-8.d.ts +4 -0
  184. package/dist/components/ui/dot-matrix/dotm-square-8.js +57 -0
  185. package/dist/components/ui/dot-matrix/dotm-square-9.d.ts +4 -0
  186. package/dist/components/ui/dot-matrix/dotm-square-9.js +89 -0
  187. package/dist/components/ui/dot-matrix/session-dot-matrix.d.ts +46 -0
  188. package/dist/components/ui/dot-matrix/session-dot-matrix.js +153 -0
  189. package/dist/components/ui/drawer.d.ts +15 -0
  190. package/dist/components/ui/drawer.js +35 -0
  191. package/dist/components/ui/dropdown-menu.d.ts +49 -0
  192. package/dist/components/ui/dropdown-menu.js +113 -0
  193. package/dist/components/ui/emoji-picker.d.ts +15 -0
  194. package/dist/components/ui/emoji-picker.js +137 -0
  195. package/dist/components/ui/emoji-tint.d.ts +41 -0
  196. package/dist/components/ui/emoji-tint.js +131 -0
  197. package/dist/components/ui/empty.d.ts +11 -0
  198. package/dist/components/ui/empty.js +33 -0
  199. package/dist/components/ui/entity-avatar.d.ts +84 -0
  200. package/dist/components/ui/entity-avatar.js +106 -0
  201. package/dist/components/ui/faded-scroll-area.d.ts +8 -0
  202. package/dist/components/ui/faded-scroll-area.js +80 -0
  203. package/dist/components/ui/favicon-avatar.d.ts +32 -0
  204. package/dist/components/ui/favicon-avatar.js +18 -0
  205. package/dist/components/ui/field.d.ts +15 -0
  206. package/dist/components/ui/field.js +48 -0
  207. package/dist/components/ui/file-tree.d.ts +32 -0
  208. package/dist/components/ui/file-tree.js +30 -0
  209. package/dist/components/ui/glyph-face.d.ts +18 -0
  210. package/dist/components/ui/glyph-face.js +37 -0
  211. package/dist/components/ui/glyph-paths-source.d.ts +2 -0
  212. package/dist/components/ui/glyph-paths-source.js +40 -0
  213. package/dist/components/ui/glyph-paths.generated.d.ts +2 -0
  214. package/dist/components/ui/glyph-paths.generated.js +207 -0
  215. package/dist/components/ui/glyph-picker.d.ts +22 -0
  216. package/dist/components/ui/glyph-picker.js +118 -0
  217. package/dist/components/ui/glyph-registry.d.ts +36 -0
  218. package/dist/components/ui/glyph-registry.js +479 -0
  219. package/dist/components/ui/glyph-tint.d.ts +6 -0
  220. package/dist/components/ui/glyph-tint.js +93 -0
  221. package/dist/components/ui/hint.d.ts +14 -0
  222. package/dist/components/ui/hint.js +12 -0
  223. package/dist/components/ui/histogram-bars.d.ts +38 -0
  224. package/dist/components/ui/histogram-bars.js +93 -0
  225. package/dist/components/ui/hover-card.d.ts +28 -0
  226. package/dist/components/ui/hover-card.js +35 -0
  227. package/dist/components/ui/icon-provider.d.ts +23 -0
  228. package/dist/components/ui/icon-provider.js +30 -0
  229. package/dist/components/ui/info-banner.d.ts +14 -0
  230. package/dist/components/ui/info-banner.js +72 -0
  231. package/dist/components/ui/inline-meta.d.ts +6 -0
  232. package/dist/components/ui/inline-meta.js +8 -0
  233. package/dist/components/ui/input-group.d.ts +19 -0
  234. package/dist/components/ui/input-group.js +73 -0
  235. package/dist/components/ui/input.d.ts +26 -0
  236. package/dist/components/ui/input.js +23 -0
  237. package/dist/components/ui/item.d.ts +23 -0
  238. package/dist/components/ui/item.js +67 -0
  239. package/dist/components/ui/kbd.d.ts +3 -0
  240. package/dist/components/ui/kbd.js +20 -0
  241. package/dist/components/ui/kortix-asterisk.d.ts +6 -0
  242. package/dist/components/ui/kortix-asterisk.js +17 -0
  243. package/dist/components/ui/kortix-icons.d.ts +2 -0
  244. package/dist/components/ui/kortix-icons.js +17 -0
  245. package/dist/components/ui/kortix-loader.d.ts +76 -0
  246. package/dist/components/ui/kortix-loader.js +74 -0
  247. package/dist/components/ui/kortix-logo.d.ts +30 -0
  248. package/dist/components/ui/kortix-logo.js +47 -0
  249. package/dist/components/ui/label.d.ts +4 -0
  250. package/dist/components/ui/label.js +9 -0
  251. package/dist/components/ui/list.d.ts +15 -0
  252. package/dist/components/ui/list.js +25 -0
  253. package/dist/components/ui/loading.d.ts +19 -0
  254. package/dist/components/ui/loading.js +31 -0
  255. package/dist/components/ui/local-time.d.ts +34 -0
  256. package/dist/components/ui/local-time.js +60 -0
  257. package/dist/components/ui/map.d.ts +101 -0
  258. package/dist/components/ui/map.js +257 -0
  259. package/dist/components/ui/marker.d.ts +14 -0
  260. package/dist/components/ui/marker.js +28 -0
  261. package/dist/components/ui/menu-recipe.d.ts +102 -0
  262. package/dist/components/ui/menu-recipe.js +129 -0
  263. package/dist/components/ui/mermaid-render.d.ts +51 -0
  264. package/dist/components/ui/mermaid-render.js +65 -0
  265. package/dist/components/ui/mermaid-renderer.d.ts +13 -0
  266. package/dist/components/ui/mermaid-renderer.js +340 -0
  267. package/dist/components/ui/message.d.ts +15 -0
  268. package/dist/components/ui/message.js +26 -0
  269. package/dist/components/ui/modal.d.ts +104 -0
  270. package/dist/components/ui/modal.js +180 -0
  271. package/dist/components/ui/navigation-menu.d.ts +16 -0
  272. package/dist/components/ui/navigation-menu.js +35 -0
  273. package/dist/components/ui/page-search-bar.d.ts +11 -0
  274. package/dist/components/ui/page-search-bar.js +13 -0
  275. package/dist/components/ui/phone-input.d.ts +7 -0
  276. package/dist/components/ui/phone-input.js +59 -0
  277. package/dist/components/ui/pixel-kortix-mark.d.ts +13 -0
  278. package/dist/components/ui/pixel-kortix-mark.js +40 -0
  279. package/dist/components/ui/popover.d.ts +10 -0
  280. package/dist/components/ui/popover.js +38 -0
  281. package/dist/components/ui/portal.d.ts +5 -0
  282. package/dist/components/ui/portal.js +15 -0
  283. package/dist/components/ui/preview-image.d.ts +14 -0
  284. package/dist/components/ui/preview-image.js +58 -0
  285. package/dist/components/ui/progress-ring.d.ts +6 -0
  286. package/dist/components/ui/progress-ring.js +9 -0
  287. package/dist/components/ui/progress.d.ts +6 -0
  288. package/dist/components/ui/progress.js +8 -0
  289. package/dist/components/ui/radio-group.d.ts +12 -0
  290. package/dist/components/ui/radio-group.js +20 -0
  291. package/dist/components/ui/resizable.d.ts +24 -0
  292. package/dist/components/ui/resizable.js +16 -0
  293. package/dist/components/ui/scroll-area.d.ts +5 -0
  294. package/dist/components/ui/scroll-area.js +11 -0
  295. package/dist/components/ui/section-card.d.ts +37 -0
  296. package/dist/components/ui/section-card.js +14 -0
  297. package/dist/components/ui/section.d.ts +10 -0
  298. package/dist/components/ui/section.js +22 -0
  299. package/dist/components/ui/select.d.ts +25 -0
  300. package/dist/components/ui/select.js +59 -0
  301. package/dist/components/ui/separator.d.ts +4 -0
  302. package/dist/components/ui/separator.js +8 -0
  303. package/dist/components/ui/shader-safe.d.ts +48 -0
  304. package/dist/components/ui/shader-safe.js +74 -0
  305. package/dist/components/ui/sheet.d.ts +32 -0
  306. package/dist/components/ui/sheet.js +55 -0
  307. package/dist/components/ui/sidebar-context.d.ts +72 -0
  308. package/dist/components/ui/sidebar-context.js +36 -0
  309. package/dist/components/ui/sidebar-menu-primitives.d.ts +38 -0
  310. package/dist/components/ui/sidebar-menu-primitives.js +97 -0
  311. package/dist/components/ui/sidebar-panel.d.ts +36 -0
  312. package/dist/components/ui/sidebar-panel.js +265 -0
  313. package/dist/components/ui/sidebar-peek.d.ts +27 -0
  314. package/dist/components/ui/sidebar-peek.js +70 -0
  315. package/dist/components/ui/sidebar-width.d.ts +48 -0
  316. package/dist/components/ui/sidebar-width.js +62 -0
  317. package/dist/components/ui/sidebar.d.ts +18 -0
  318. package/dist/components/ui/sidebar.js +194 -0
  319. package/dist/components/ui/skeleton.d.ts +3 -0
  320. package/dist/components/ui/skeleton.js +6 -0
  321. package/dist/components/ui/slider-native.d.ts +7 -0
  322. package/dist/components/ui/slider-native.js +16 -0
  323. package/dist/components/ui/slider.d.ts +14 -0
  324. package/dist/components/ui/slider.js +48 -0
  325. package/dist/components/ui/sliding-tab-indicator.d.ts +61 -0
  326. package/dist/components/ui/sliding-tab-indicator.js +128 -0
  327. package/dist/components/ui/split-sheet.d.ts +61 -0
  328. package/dist/components/ui/split-sheet.js +239 -0
  329. package/dist/components/ui/spotlight-card.d.ts +8 -0
  330. package/dist/components/ui/spotlight-card.js +43 -0
  331. package/dist/components/ui/status-ring.d.ts +38 -0
  332. package/dist/components/ui/status-ring.js +38 -0
  333. package/dist/components/ui/status.d.ts +58 -0
  334. package/dist/components/ui/status.js +76 -0
  335. package/dist/components/ui/stepper.d.ts +28 -0
  336. package/dist/components/ui/stepper.js +73 -0
  337. package/dist/components/ui/switch.d.ts +8 -0
  338. package/dist/components/ui/switch.js +131 -0
  339. package/dist/components/ui/system-message.d.ts +23 -0
  340. package/dist/components/ui/system-message.js +51 -0
  341. package/dist/components/ui/table.d.ts +10 -0
  342. package/dist/components/ui/table.js +28 -0
  343. package/dist/components/ui/tabs.d.ts +73 -0
  344. package/dist/components/ui/tabs.js +207 -0
  345. package/dist/components/ui/tag.d.ts +7 -0
  346. package/dist/components/ui/tag.js +22 -0
  347. package/dist/components/ui/text-shimmer.d.ts +13 -0
  348. package/dist/components/ui/text-shimmer.js +91 -0
  349. package/dist/components/ui/textarea.d.ts +33 -0
  350. package/dist/components/ui/textarea.js +87 -0
  351. package/dist/components/ui/toast.d.ts +105 -0
  352. package/dist/components/ui/toast.js +233 -0
  353. package/dist/components/ui/toggle.d.ts +12 -0
  354. package/dist/components/ui/toggle.js +26 -0
  355. package/dist/components/ui/tooltip.d.ts +9 -0
  356. package/dist/components/ui/tooltip.js +16 -0
  357. package/dist/components/ui/trigger-variants.d.ts +14 -0
  358. package/dist/components/ui/trigger-variants.js +67 -0
  359. package/dist/components/ui/type-to-confirm-dialog.d.ts +88 -0
  360. package/dist/components/ui/type-to-confirm-dialog.js +101 -0
  361. package/dist/components/ui/typed-title-logic.d.ts +22 -0
  362. package/dist/components/ui/typed-title-logic.js +33 -0
  363. package/dist/components/ui/typed-title.d.ts +38 -0
  364. package/dist/components/ui/typed-title.js +66 -0
  365. package/dist/components/ui/typing-animation.d.ts +36 -0
  366. package/dist/components/ui/typing-animation.js +141 -0
  367. package/dist/components/ui/user-avatar.d.ts +47 -0
  368. package/dist/components/ui/user-avatar.js +46 -0
  369. package/dist/hooks/use-debounce.d.ts +4 -0
  370. package/dist/hooks/use-debounce.js +17 -0
  371. package/dist/hooks/use-is-dark.d.ts +2 -0
  372. package/dist/hooks/use-is-dark.js +27 -0
  373. package/dist/hooks/use-mobile.d.ts +2 -0
  374. package/dist/hooks/use-mobile.js +15 -0
  375. package/dist/hooks/use-proximity-hover.d.ts +52 -0
  376. package/dist/hooks/use-proximity-hover.js +232 -0
  377. package/dist/icons/close.d.ts +2 -0
  378. package/dist/icons/close.js +7 -0
  379. package/dist/icons/copy.d.ts +3 -0
  380. package/dist/icons/copy.js +6 -0
  381. package/dist/icons/sidebar-toggle.d.ts +13 -0
  382. package/dist/icons/sidebar-toggle.js +13 -0
  383. package/dist/index.d.ts +24 -0
  384. package/dist/index.js +33 -0
  385. package/dist/lib/dotmatrix-core.d.ts +113 -0
  386. package/dist/lib/dotmatrix-core.js +920 -0
  387. package/dist/lib/dotmatrix-hooks.d.ts +28 -0
  388. package/dist/lib/dotmatrix-hooks.js +151 -0
  389. package/dist/lib/favicon.d.ts +4 -0
  390. package/dist/lib/favicon.js +21 -0
  391. package/dist/lib/font-weight.d.ts +6 -0
  392. package/dist/lib/font-weight.js +6 -0
  393. package/dist/lib/icon-config.d.ts +33 -0
  394. package/dist/lib/icon-config.js +22 -0
  395. package/dist/lib/icon-context.d.ts +34 -0
  396. package/dist/lib/icon-context.js +81 -0
  397. package/dist/lib/portal-root.d.ts +8 -0
  398. package/dist/lib/portal-root.js +26 -0
  399. package/dist/lib/settle.d.ts +16 -0
  400. package/dist/lib/settle.js +29 -0
  401. package/dist/lib/springs.d.ts +31 -0
  402. package/dist/lib/springs.js +29 -0
  403. package/dist/lib/utils.d.ts +2 -0
  404. package/dist/lib/utils.js +5 -0
  405. package/dist/lib/z-stack.d.ts +55 -0
  406. package/dist/lib/z-stack.js +130 -0
  407. package/dist/providers/ui-provider.d.ts +141 -0
  408. package/dist/providers/ui-provider.js +93 -0
  409. package/dist/styles/dotmatrix-loader.css +1239 -0
  410. package/dist/styles/fonts.css +46 -0
  411. package/dist/styles/tailwind.css +10 -0
  412. package/dist/styles/theme.css +1019 -0
  413. package/dist/styles/tokens.css +146 -0
  414. package/dist/styles.css +2 -0
  415. package/package.json +874 -4
  416. package/skills/kortix-ui/SKILL.md +150 -0
@@ -0,0 +1,920 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useCyclePhase, useDotMatrixPhases, usePrefersReducedMotion, useSteppedCycle } from './dotmatrix-hooks.js';
4
+ import { useMemo } from 'react';
5
+ const DOT_MATRIX_COLOR_PRESETS = {
6
+ 'solid-theme': {
7
+ fill: 'var(--color-dot-on)',
8
+ glow: 'var(--color-dot-on)',
9
+ },
10
+ 'solid-mint': {
11
+ fill: '#34d399',
12
+ glow: '#34d399',
13
+ },
14
+ 'grad-sunset': {
15
+ fill: 'linear-gradient(135deg, #ff5f6d 0%, #ffc371 52%, #ffe29a 100%)',
16
+ glow: '#ff8b73',
17
+ },
18
+ 'grad-ocean': {
19
+ fill: 'linear-gradient(140deg, #00c6ff 0%, #0072ff 48%, #4facfe 100%)',
20
+ glow: '#2f8fff',
21
+ },
22
+ 'grad-neon': {
23
+ fill: 'linear-gradient(145deg, #b4ff39 0%, #39ffb6 46%, #00d4ff 100%)',
24
+ glow: '#59ffc8',
25
+ },
26
+ 'grad-aurora': {
27
+ fill: 'linear-gradient(145deg, #ff3cac 0%, #784ba0 45%, #2b86c5 100%)',
28
+ glow: '#9c64bf',
29
+ },
30
+ 'grad-fire': {
31
+ fill: 'linear-gradient(145deg, #ff512f 0%, #dd2476 45%, #ffb347 100%)',
32
+ glow: '#f96a5f',
33
+ },
34
+ 'grad-prism': {
35
+ fill: 'linear-gradient(145deg, #12c2e9 0%, #c471ed 45%, #f64f59 100%)',
36
+ glow: '#9e7de8',
37
+ },
38
+ };
39
+ function resolveDmxColorTokens(color, colorPreset) {
40
+ if (!colorPreset) {
41
+ return { resolvedColor: color, dotFill: color };
42
+ }
43
+ const preset = DOT_MATRIX_COLOR_PRESETS[colorPreset];
44
+ if (!preset) {
45
+ return { resolvedColor: color, dotFill: color };
46
+ }
47
+ return { resolvedColor: preset.glow, dotFill: preset.fill };
48
+ }
49
+ /** Multiplies `size` and `dotSize`. Values `<= 0` fall back to `1`. */
50
+ function applyDotMatrixScale(size, dotSize, scale) {
51
+ const factor = scale != null && scale > 0 ? scale : 1;
52
+ return { size: size * factor, dotSize: dotSize * factor };
53
+ }
54
+ export function cx(...values) {
55
+ return values.filter(Boolean).join(' ');
56
+ }
57
+ export const MATRIX_SIZE = 5;
58
+ const CENTER = Math.floor(MATRIX_SIZE / 2);
59
+ const RANGE = Array.from({ length: MATRIX_SIZE }, (_, index) => index);
60
+ const MAX_RADIUS = Math.hypot(CENTER, CENTER);
61
+ const FULL_INDEXES = RANGE.flatMap((row) => RANGE.map((col) => rowMajorIndex(row, col)));
62
+ const DIAMOND_INDEXES = FULL_INDEXES.filter((index) => {
63
+ const { row, col } = indexToCoord(index);
64
+ return Math.abs(row - CENTER) + Math.abs(col - CENTER) <= 2;
65
+ });
66
+ const OUTLINE_INDEXES = FULL_INDEXES.filter((index) => {
67
+ const { row, col } = indexToCoord(index);
68
+ return row === 0 || row === MATRIX_SIZE - 1 || col === 0 || col === MATRIX_SIZE - 1;
69
+ });
70
+ const CROSS_INDEXES = FULL_INDEXES.filter((index) => {
71
+ const { row, col } = indexToCoord(index);
72
+ return row === CENTER || col === CENTER;
73
+ });
74
+ const RINGS_INDEXES = FULL_INDEXES.filter((index) => {
75
+ const { row, col } = indexToCoord(index);
76
+ const radius = Math.hypot(row - CENTER, col - CENTER);
77
+ return Math.round(radius) === 1 || Math.round(radius) === 2;
78
+ });
79
+ const ROSE_INDEXES = FULL_INDEXES.filter((index) => {
80
+ const { row, col } = indexToCoord(index);
81
+ const dx = col - CENTER;
82
+ const dy = row - CENTER;
83
+ const angle = Math.atan2(dy, dx);
84
+ const radius = Math.hypot(dx, dy);
85
+ const rose = Math.abs(Math.sin(3 * angle));
86
+ return rose > 0.6 && radius >= 1;
87
+ });
88
+ const PATTERN_INDEXES = {
89
+ diamond: DIAMOND_INDEXES,
90
+ full: FULL_INDEXES,
91
+ outline: OUTLINE_INDEXES,
92
+ rose: ROSE_INDEXES,
93
+ cross: CROSS_INDEXES,
94
+ rings: RINGS_INDEXES,
95
+ };
96
+ function getPatternIndexes(pattern = 'diamond') {
97
+ return PATTERN_INDEXES[pattern];
98
+ }
99
+ export function rowMajorIndex(row, col) {
100
+ return row * MATRIX_SIZE + col;
101
+ }
102
+ function indexToCoord(index) {
103
+ return {
104
+ row: Math.floor(index / MATRIX_SIZE),
105
+ col: index % MATRIX_SIZE,
106
+ };
107
+ }
108
+ export function distanceFromCenter(index) {
109
+ const { row, col } = indexToCoord(index);
110
+ return Math.hypot(row - CENTER, col - CENTER);
111
+ }
112
+ export function rowDistance(index) {
113
+ const { row } = indexToCoord(index);
114
+ return Math.abs(row - CENTER);
115
+ }
116
+ function polarAngle(index) {
117
+ const { row, col } = indexToCoord(index);
118
+ return Math.atan2(row - CENTER, col - CENTER);
119
+ }
120
+ function normalizedRadius(index) {
121
+ const { row, col } = indexToCoord(index);
122
+ return Math.hypot(row - CENTER, col - CENTER) / MAX_RADIUS;
123
+ }
124
+ export function manhattanDistance(index) {
125
+ const { row, col } = indexToCoord(index);
126
+ return Math.abs(row - CENTER) + Math.abs(col - CENTER);
127
+ }
128
+ const N = MATRIX_SIZE;
129
+ const CELLS = N * N;
130
+ const MAX_TRBL = (N - 1) * 2;
131
+ export function trBlPathNormFromIndex(index) {
132
+ const { row, col } = indexToCoord(index);
133
+ return (row + (N - 1 - col)) / MAX_TRBL;
134
+ }
135
+ function buildSpiralInwardOrderToIndexMap() {
136
+ const order = new Array(CELLS);
137
+ let top = 0;
138
+ let bottom = N - 1;
139
+ let left = 0;
140
+ let right = N - 1;
141
+ let t = 0;
142
+ while (top <= bottom && left <= right) {
143
+ for (let col = left; col <= right; col += 1) {
144
+ order[rowMajorIndex(top, col)] = t;
145
+ t += 1;
146
+ }
147
+ for (let row = top + 1; row <= bottom; row += 1) {
148
+ order[rowMajorIndex(row, right)] = t;
149
+ t += 1;
150
+ }
151
+ if (top < bottom) {
152
+ for (let col = right - 1; col >= left; col -= 1) {
153
+ order[rowMajorIndex(bottom, col)] = t;
154
+ t += 1;
155
+ }
156
+ }
157
+ if (left < right) {
158
+ for (let row = bottom - 1; row > top; row -= 1) {
159
+ order[rowMajorIndex(row, left)] = t;
160
+ t += 1;
161
+ }
162
+ }
163
+ top += 1;
164
+ bottom -= 1;
165
+ left += 1;
166
+ right -= 1;
167
+ }
168
+ return order;
169
+ }
170
+ const SPIRAL_INWARD_ORDER = buildSpiralInwardOrderToIndexMap();
171
+ export function spiralInwardNormFromIndex(index) {
172
+ return SPIRAL_INWARD_ORDER[index] / (CELLS - 1);
173
+ }
174
+ export function spiralInwardOrderValue(index) {
175
+ return SPIRAL_INWARD_ORDER[index];
176
+ }
177
+ function buildOuterRingClockwiseOrderToIndexMap() {
178
+ const order = new Array(CELLS).fill(-1);
179
+ const coords = [
180
+ [0, 0],
181
+ [0, 1],
182
+ [0, 2],
183
+ [0, 3],
184
+ [0, 4],
185
+ [1, 4],
186
+ [2, 4],
187
+ [3, 4],
188
+ [4, 4],
189
+ [4, 3],
190
+ [4, 2],
191
+ [4, 1],
192
+ [4, 0],
193
+ [3, 0],
194
+ [2, 0],
195
+ [1, 0],
196
+ ];
197
+ for (let t = 0; t < coords.length; t += 1) {
198
+ const [row, col] = coords[t];
199
+ order[rowMajorIndex(row, col)] = t;
200
+ }
201
+ return order;
202
+ }
203
+ function buildMiddleRingAntiClockwiseOrderToIndexMap() {
204
+ const order = new Array(CELLS).fill(-1);
205
+ const coords = [
206
+ [1, 1],
207
+ [2, 1],
208
+ [3, 1],
209
+ [3, 2],
210
+ [3, 3],
211
+ [2, 3],
212
+ [1, 3],
213
+ [1, 2],
214
+ ];
215
+ for (let t = 0; t < coords.length; t += 1) {
216
+ const [row, col] = coords[t];
217
+ order[rowMajorIndex(row, col)] = t;
218
+ }
219
+ return order;
220
+ }
221
+ const OUTER_RING_CLOCKWISE_ORDER = buildOuterRingClockwiseOrderToIndexMap();
222
+ const MIDDLE_RING_ANTI_CLOCKWISE_ORDER = buildMiddleRingAntiClockwiseOrderToIndexMap();
223
+ export function outerRingClockwiseOrderValue(index) {
224
+ return OUTER_RING_CLOCKWISE_ORDER[index];
225
+ }
226
+ export function outerRingClockwiseNormFromIndex(index) {
227
+ const order = outerRingClockwiseOrderValue(index);
228
+ return order >= 0 ? order / 15 : 0;
229
+ }
230
+ export function middleRingAntiClockwiseOrderValue(index) {
231
+ return MIDDLE_RING_ANTI_CLOCKWISE_ORDER[index];
232
+ }
233
+ export function middleRingAntiClockwiseNormFromIndex(index) {
234
+ const order = middleRingAntiClockwiseOrderValue(index);
235
+ return order >= 0 ? order / 7 : 0;
236
+ }
237
+ function buildDiagonalSnakeOrderToIndexMap() {
238
+ const order = new Array(CELLS);
239
+ let t = 0;
240
+ for (let diagonal = 0; diagonal <= (N - 1) * 2; diagonal += 1) {
241
+ const rowStart = Math.max(0, diagonal - (N - 1));
242
+ const rowEnd = Math.min(N - 1, diagonal);
243
+ if (diagonal % 2 === 0) {
244
+ for (let row = rowEnd; row >= rowStart; row -= 1) {
245
+ const col = diagonal - row;
246
+ order[rowMajorIndex(row, col)] = t;
247
+ t += 1;
248
+ }
249
+ }
250
+ else {
251
+ for (let row = rowStart; row <= rowEnd; row += 1) {
252
+ const col = diagonal - row;
253
+ order[rowMajorIndex(row, col)] = t;
254
+ t += 1;
255
+ }
256
+ }
257
+ }
258
+ return order;
259
+ }
260
+ const DIAGONAL_SNAKE_ORDER = buildDiagonalSnakeOrderToIndexMap();
261
+ export function diagonalSnakeOrderValue(index) {
262
+ return DIAGONAL_SNAKE_ORDER[index];
263
+ }
264
+ export function diagonalSnakeNormFromIndex(index) {
265
+ return DIAGONAL_SNAKE_ORDER[index] / (CELLS - 1);
266
+ }
267
+ const CORNER_COORDS = new Set(['0,0', '0,4', '4,0', '4,4']);
268
+ export function isWithinCircularMask(row, col) {
269
+ return !CORNER_COORDS.has(`${row},${col}`);
270
+ }
271
+ const SOURCE_BASE_OPACITY = 0.08;
272
+ const SOURCE_MID_OPACITY = 0.34;
273
+ const SOURCE_PEAK_OPACITY = 0.94;
274
+ function lerpDmx(start, end, progress) {
275
+ return start + (end - start) * progress;
276
+ }
277
+ function normalizeProgressDmx(value, start, end) {
278
+ const span = end - start;
279
+ if (Math.abs(span) < Number.EPSILON) {
280
+ return 0;
281
+ }
282
+ return Math.min(1, Math.max(0, (value - start) / span));
283
+ }
284
+ function coerceOpacityDmx(value) {
285
+ if (value == null || !Number.isFinite(value)) {
286
+ return undefined;
287
+ }
288
+ return Math.min(1, Math.max(0, value));
289
+ }
290
+ function remapOpacityToTriplet(opacity, opacityBase, opacityMid, opacityPeak) {
291
+ if (!Number.isFinite(opacity)) {
292
+ return opacity;
293
+ }
294
+ const hasOverrides = opacityBase !== undefined || opacityMid !== undefined || opacityPeak !== undefined;
295
+ const safeOpacity = Math.min(1, Math.max(0, opacity));
296
+ if (!hasOverrides) {
297
+ return safeOpacity;
298
+ }
299
+ const targetBase = coerceOpacityDmx(opacityBase) ?? SOURCE_BASE_OPACITY;
300
+ const targetMid = coerceOpacityDmx(opacityMid) ?? SOURCE_MID_OPACITY;
301
+ const targetPeak = coerceOpacityDmx(opacityPeak) ?? SOURCE_PEAK_OPACITY;
302
+ if (safeOpacity <= SOURCE_BASE_OPACITY) {
303
+ const progress = normalizeProgressDmx(safeOpacity, 0, SOURCE_BASE_OPACITY);
304
+ return Math.min(1, Math.max(0, lerpDmx(0, targetBase, progress)));
305
+ }
306
+ if (safeOpacity <= SOURCE_MID_OPACITY) {
307
+ const progress = normalizeProgressDmx(safeOpacity, SOURCE_BASE_OPACITY, SOURCE_MID_OPACITY);
308
+ return Math.min(1, Math.max(0, lerpDmx(targetBase, targetMid, progress)));
309
+ }
310
+ if (safeOpacity <= SOURCE_PEAK_OPACITY) {
311
+ const progress = normalizeProgressDmx(safeOpacity, SOURCE_MID_OPACITY, SOURCE_PEAK_OPACITY);
312
+ return Math.min(1, Math.max(0, lerpDmx(targetMid, targetPeak, progress)));
313
+ }
314
+ const progress = normalizeProgressDmx(safeOpacity, SOURCE_PEAK_OPACITY, 1);
315
+ return Math.min(1, Math.max(0, lerpDmx(targetPeak, 1, progress)));
316
+ }
317
+ /** Remapped opacity where bloom begins (weakest glow); scales linearly to full bloom at 1. */
318
+ const DMX_BLOOM_OPACITY_MIN = 0.6;
319
+ function opacityToBloomLevel(remappedOpacity) {
320
+ return Math.max(0, Math.min(1, (remappedOpacity - DMX_BLOOM_OPACITY_MIN) / (1 - DMX_BLOOM_OPACITY_MIN)));
321
+ }
322
+ function remappedOpacityQualifiesForBloom(remappedOpacity) {
323
+ return remappedOpacity >= DMX_BLOOM_OPACITY_MIN;
324
+ }
325
+ function clampHalo(value) {
326
+ if (value == null || !Number.isFinite(value)) {
327
+ return 0;
328
+ }
329
+ return Math.min(1, Math.max(0, value));
330
+ }
331
+ function dmxBloomRootActive(bloom, halo) {
332
+ return bloom || clampHalo(halo) > 0;
333
+ }
334
+ /** Root class when `halo` > 0 — CSS widens drop-shadow falloff for a softer, more diffuse glow. */
335
+ function dmxBloomHaloSpreadClass(halo) {
336
+ return clampHalo(halo) > 0 ? 'dmx-bloom-halo' : false;
337
+ }
338
+ /**
339
+ * Bloom level and dot class for one cell. `curveOpacity` is the loader’s logical opacity **before**
340
+ * `remapOpacityToTriplet` (same as `bloom` uses today).
341
+ */
342
+ function dmxDotBloomParts(isActive, curveOpacity, bloom, halo, ob, om, op) {
343
+ const haloN = clampHalo(halo);
344
+ if (!isActive) {
345
+ return { level: 0, bloomDot: false };
346
+ }
347
+ const remapped = remapOpacityToTriplet(curveOpacity, ob, om, op);
348
+ const fromBloom = bloom ? opacityToBloomLevel(remapped) : 0;
349
+ return {
350
+ level: fromBloom,
351
+ bloomDot: haloN > 0 || (bloom && remappedOpacityQualifiesForBloom(remapped)),
352
+ };
353
+ }
354
+ function getMatrix5Layout(size, dotSize, cellPadding) {
355
+ const n = MATRIX_SIZE;
356
+ if (cellPadding != null) {
357
+ const g = Math.max(0, cellPadding);
358
+ const matrixSpan = dotSize * n + g * (n - 1);
359
+ return { gap: g, matrixSpan };
360
+ }
361
+ const g = Math.max(1, Math.floor((size - dotSize * n) / (n - 1)));
362
+ return { gap: g, matrixSpan: size };
363
+ }
364
+ function resolveDmxBoxOuterDim(options) {
365
+ const b = options?.boxSize;
366
+ const hasBox = b != null && b > 0 && Number.isFinite(b);
367
+ if (!hasBox) {
368
+ return { outerDim: 0, useWrapper: false };
369
+ }
370
+ const m = options?.minSize;
371
+ if (m != null && m > 0 && Number.isFinite(m)) {
372
+ return { outerDim: Math.max(b, m), useWrapper: true };
373
+ }
374
+ return { outerDim: b, useWrapper: true };
375
+ }
376
+ function clamp01Dmx(n) {
377
+ if (n == null) {
378
+ return;
379
+ }
380
+ if (!Number.isFinite(n)) {
381
+ return;
382
+ }
383
+ return Math.min(1, Math.max(0, n));
384
+ }
385
+ export function DotMatrixBase({ scale: scaleProp, size: sizeProp = 24, dotSize: dotSizeProp = 3, color = 'currentColor', colorPreset, speed = 1, ariaLabel = 'Loading', className, pattern = 'diamond', dotShape = 'circle', muted = false, bloom = false, halo = 0, dotClassName, phase, reducedMotion = false, onMouseEnter, onMouseLeave, animationResolver, opacityBase, opacityMid, opacityPeak, cellPadding, boxSize, minSize, }) {
386
+ const { size, dotSize } = applyDotMatrixScale(sizeProp, dotSizeProp, scaleProp);
387
+ const patternIndexes = new Set(getPatternIndexes(pattern));
388
+ const safeSpeed = speed > 0 ? speed : 1;
389
+ const speedScale = 1 / safeSpeed;
390
+ const { gap, matrixSpan } = getMatrix5Layout(size, dotSize, cellPadding);
391
+ const { outerDim, useWrapper } = resolveDmxBoxOuterDim({ boxSize, minSize });
392
+ const boxScale = useWrapper && matrixSpan > 0 ? outerDim / matrixSpan : 1;
393
+ const center = Math.floor(MATRIX_SIZE / 2);
394
+ const ob = clamp01Dmx(opacityBase);
395
+ const om = clamp01Dmx(opacityMid);
396
+ const op = clamp01Dmx(opacityPeak);
397
+ const unit = dotSize + gap;
398
+ const { resolvedColor, dotFill } = resolveDmxColorTokens(color, colorPreset);
399
+ const dmxVarStyle = {
400
+ width: matrixSpan,
401
+ height: matrixSpan,
402
+ '--dmx-speed': speedScale,
403
+ ['--dmx-dot-size']: `${dotSize}px`,
404
+ ['--dmx-halo-level']: halo,
405
+ ['--dmx-dot-fill']: dotFill,
406
+ color: resolvedColor,
407
+ ...(ob !== undefined && { ['--dmx-opacity-base']: ob }),
408
+ ...(om !== undefined && { ['--dmx-opacity-mid']: om }),
409
+ ...(op !== undefined && { ['--dmx-opacity-peak']: op }),
410
+ ...(useWrapper
411
+ ? {
412
+ transform: `scale(${boxScale})`,
413
+ transformOrigin: 'center center',
414
+ }
415
+ : { minWidth: minSize, minHeight: minSize }),
416
+ };
417
+ const dots = Array.from({ length: MATRIX_SIZE * MATRIX_SIZE }).map((_, index) => {
418
+ const { row, col } = indexToCoord(index);
419
+ const isActive = patternIndexes.has(index);
420
+ const distance = distanceFromCenter(index);
421
+ const angle = polarAngle(index);
422
+ const radiusNormalizedValue = normalizedRadius(index);
423
+ const manhattan = manhattanDistance(index);
424
+ const deltaX = (col - center) * unit;
425
+ const deltaY = (row - center) * unit;
426
+ const animationState = animationResolver
427
+ ? animationResolver({
428
+ index,
429
+ row,
430
+ col,
431
+ distanceFromCenter: distance,
432
+ angleFromCenter: angle,
433
+ radiusNormalized: radiusNormalizedValue,
434
+ manhattanDistance: manhattan,
435
+ phase,
436
+ isActive,
437
+ reducedMotion,
438
+ })
439
+ : {};
440
+ const resolvedAnimationStyle = animationState.style ? { ...animationState.style } : undefined;
441
+ let isBloomDot = false;
442
+ let stylePatch = resolvedAnimationStyle;
443
+ if (isActive) {
444
+ const rawOpacity = stylePatch?.opacity;
445
+ if (stylePatch != null && typeof rawOpacity === 'number') {
446
+ const remappedOpacity = remapOpacityToTriplet(rawOpacity, ob, om, op);
447
+ stylePatch = { ...stylePatch, opacity: remappedOpacity };
448
+ const parts = dmxDotBloomParts(true, rawOpacity, bloom, halo, ob, om, op);
449
+ stylePatch['--dmx-bloom-level'] =
450
+ parts.level;
451
+ isBloomDot = parts.bloomDot;
452
+ }
453
+ else {
454
+ const parts = dmxDotBloomParts(true, 0, bloom, halo, ob, om, op);
455
+ if (parts.level > 0) {
456
+ stylePatch = {
457
+ ...(stylePatch ?? {}),
458
+ ['--dmx-bloom-level']: parts.level,
459
+ };
460
+ }
461
+ isBloomDot = parts.bloomDot;
462
+ }
463
+ }
464
+ const dotStyle = {
465
+ width: dotSize,
466
+ height: dotSize,
467
+ '--dmx-distance': distance,
468
+ '--dmx-row': row,
469
+ '--dmx-col': col,
470
+ '--dmx-x': `${deltaX}px`,
471
+ '--dmx-y': `${deltaY}px`,
472
+ '--dmx-angle': angle,
473
+ '--dmx-radius': radiusNormalizedValue,
474
+ '--dmx-manhattan': manhattan,
475
+ ...stylePatch,
476
+ ...(!isActive
477
+ ? {
478
+ opacity: 0,
479
+ visibility: 'hidden',
480
+ pointerEvents: 'none',
481
+ animation: 'none',
482
+ }
483
+ : {}),
484
+ };
485
+ return (_jsx("span", { "aria-hidden": "true", className: cx('dmx-dot', !isActive && 'dmx-inactive', isBloomDot && 'dmx-bloom-dot', dotClassName, animationState.className), style: dotStyle }, index));
486
+ });
487
+ const matrix = (_jsx("div", { className: cx('dmx-root', `dmx-dot-shape-${dotShape}`, muted && 'dmx-muted', dmxBloomRootActive(bloom, halo) && 'dmx-bloom', dmxBloomHaloSpreadClass(halo), !useWrapper && className), style: dmxVarStyle, children: _jsx("div", { className: "dmx-grid", style: { gap }, children: dots }) }));
488
+ if (useWrapper) {
489
+ return (_jsx("div", { role: "status", "aria-live": "polite", "aria-label": ariaLabel, className: className, style: {
490
+ display: 'inline-flex',
491
+ alignItems: 'center',
492
+ justifyContent: 'center',
493
+ width: outerDim,
494
+ height: outerDim,
495
+ minWidth: minSize,
496
+ minHeight: minSize,
497
+ overflow: 'hidden',
498
+ }, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: matrix }));
499
+ }
500
+ return (_jsx("div", { role: "status", "aria-live": "polite", "aria-label": ariaLabel, className: cx('dmx-root', `dmx-dot-shape-${dotShape}`, muted && 'dmx-muted', dmxBloomRootActive(bloom, halo) && 'dmx-bloom', dmxBloomHaloSpreadClass(halo), className), style: dmxVarStyle, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: _jsx("div", { className: "dmx-grid", style: { gap }, children: dots }) }));
501
+ }
502
+ const MATRIX_SIZE_3 = 3;
503
+ const CENTER_3 = Math.floor(MATRIX_SIZE_3 / 2);
504
+ const RANGE_3 = Array.from({ length: MATRIX_SIZE_3 }, (_, index) => index);
505
+ const MAX_RADIUS_3 = Math.hypot(CENTER_3, CENTER_3);
506
+ const FULL_INDEXES_3 = RANGE_3.flatMap((row) => RANGE_3.map((col) => rowMajorIndex3(row, col)));
507
+ const OUTLINE_INDEXES_3 = FULL_INDEXES_3.filter((index) => {
508
+ const { row, col } = indexToCoord3(index);
509
+ return row === 0 || row === MATRIX_SIZE_3 - 1 || col === 0 || col === MATRIX_SIZE_3 - 1;
510
+ });
511
+ const DIAMOND_INDEXES_3 = FULL_INDEXES_3.filter((index) => {
512
+ const { row, col } = indexToCoord3(index);
513
+ return Math.abs(row - CENTER_3) + Math.abs(col - CENTER_3) <= 1;
514
+ });
515
+ const CROSS_INDEXES_3 = FULL_INDEXES_3.filter((index) => {
516
+ const { row, col } = indexToCoord3(index);
517
+ return row === CENTER_3 || col === CENTER_3;
518
+ });
519
+ const RINGS_INDEXES_3 = FULL_INDEXES_3.filter((index) => {
520
+ const { row, col } = indexToCoord3(index);
521
+ return Math.round(Math.hypot(row - CENTER_3, col - CENTER_3)) === 1;
522
+ });
523
+ const ROSE_INDEXES_3 = FULL_INDEXES_3.filter((index) => {
524
+ const { row, col } = indexToCoord3(index);
525
+ const dx = col - CENTER_3;
526
+ const dy = row - CENTER_3;
527
+ const angle = Math.atan2(dy, dx);
528
+ const radius = Math.hypot(dx, dy);
529
+ const rose = Math.abs(Math.sin(3 * angle));
530
+ return rose > 0.55 && radius >= 0.75;
531
+ });
532
+ const PATTERN_INDEXES_3 = {
533
+ diamond: DIAMOND_INDEXES_3,
534
+ full: FULL_INDEXES_3,
535
+ outline: OUTLINE_INDEXES_3,
536
+ rose: ROSE_INDEXES_3,
537
+ cross: CROSS_INDEXES_3,
538
+ rings: RINGS_INDEXES_3,
539
+ };
540
+ function getPattern3Indexes(pattern = 'full') {
541
+ return PATTERN_INDEXES_3[pattern];
542
+ }
543
+ function rowMajorIndex3(row, col) {
544
+ return row * MATRIX_SIZE_3 + col;
545
+ }
546
+ function indexToCoord3(index) {
547
+ return {
548
+ row: Math.floor(index / MATRIX_SIZE_3),
549
+ col: index % MATRIX_SIZE_3,
550
+ };
551
+ }
552
+ function distanceFromCenter3(index) {
553
+ const { row, col } = indexToCoord3(index);
554
+ return Math.hypot(row - CENTER_3, col - CENTER_3);
555
+ }
556
+ function manhattanDistance3(index) {
557
+ const { row, col } = indexToCoord3(index);
558
+ return Math.abs(row - CENTER_3) + Math.abs(col - CENTER_3);
559
+ }
560
+ const MAX_DIAGONAL_3 = (MATRIX_SIZE_3 - 1) * 2;
561
+ function trBlPath3NormFromIndex(index) {
562
+ const { row, col } = indexToCoord3(index);
563
+ return (row + (MATRIX_SIZE_3 - 1 - col)) / MAX_DIAGONAL_3;
564
+ }
565
+ function tlBrPath3NormFromIndex(index) {
566
+ const { row, col } = indexToCoord3(index);
567
+ return (row + col) / MAX_DIAGONAL_3;
568
+ }
569
+ function brTlPath3NormFromIndex(index) {
570
+ const { row, col } = indexToCoord3(index);
571
+ return (MAX_DIAGONAL_3 - row - col) / MAX_DIAGONAL_3;
572
+ }
573
+ function blTrPath3NormFromIndex(index) {
574
+ const { row, col } = indexToCoord3(index);
575
+ return (MAX_DIAGONAL_3 - row - (MATRIX_SIZE_3 - 1 - col)) / MAX_DIAGONAL_3;
576
+ }
577
+ const DIAGONAL_PATH_3 = {
578
+ 'tr-bl': trBlPath3NormFromIndex,
579
+ 'tl-br': tlBrPath3NormFromIndex,
580
+ 'br-tl': brTlPath3NormFromIndex,
581
+ 'bl-tr': blTrPath3NormFromIndex,
582
+ };
583
+ function diagonalWave3PathNormFromIndex(index, direction) {
584
+ return DIAGONAL_PATH_3[direction](index);
585
+ }
586
+ function buildSnakeOrderToIndexMap3() {
587
+ const N = MATRIX_SIZE_3;
588
+ const order = new Array(N * N);
589
+ let t = 0;
590
+ for (let row = 0; row < N; row += 1) {
591
+ if (row % 2 === 0) {
592
+ for (let col = 0; col < N; col += 1) {
593
+ order[rowMajorIndex3(row, col)] = t;
594
+ t += 1;
595
+ }
596
+ }
597
+ else {
598
+ for (let col = N - 1; col >= 0; col -= 1) {
599
+ order[rowMajorIndex3(row, col)] = t;
600
+ t += 1;
601
+ }
602
+ }
603
+ }
604
+ return order;
605
+ }
606
+ const SNAKE_ORDER_3 = buildSnakeOrderToIndexMap3();
607
+ export function snakePath3NormFromIndex(index) {
608
+ return SNAKE_ORDER_3[index] / (MATRIX_SIZE_3 * MATRIX_SIZE_3 - 1);
609
+ }
610
+ export function snakePath3OrderValue(index) {
611
+ return SNAKE_ORDER_3[index];
612
+ }
613
+ function buildOuterRingClockwiseOrder3() {
614
+ const order = new Array(MATRIX_SIZE_3 * MATRIX_SIZE_3).fill(-1);
615
+ const path = [
616
+ [0, 0],
617
+ [0, 1],
618
+ [0, 2],
619
+ [1, 2],
620
+ [2, 2],
621
+ [2, 1],
622
+ [2, 0],
623
+ [1, 0],
624
+ ];
625
+ path.forEach(([row, col], step) => {
626
+ order[rowMajorIndex3(row, col)] = step;
627
+ });
628
+ return order;
629
+ }
630
+ const OUTER_RING_CLOCKWISE_ORDER_3 = buildOuterRingClockwiseOrder3();
631
+ export function outerRingClockwise3OrderValue(index) {
632
+ return OUTER_RING_CLOCKWISE_ORDER_3[index];
633
+ }
634
+ export function outerRingClockwise3NormFromIndex(index) {
635
+ const order = OUTER_RING_CLOCKWISE_ORDER_3[index];
636
+ if (order < 0) {
637
+ return 0;
638
+ }
639
+ return order / 7;
640
+ }
641
+ export function isCenterCell3(row, col) {
642
+ const center = Math.floor(MATRIX_SIZE_3 / 2);
643
+ return row === center && col === center;
644
+ }
645
+ export function rowWave3NormFromRow(row) {
646
+ return row / (MATRIX_SIZE_3 - 1);
647
+ }
648
+ export function colWave3NormFromCol(col) {
649
+ return col / (MATRIX_SIZE_3 - 1);
650
+ }
651
+ export function colWave3NormFromColReverse(col) {
652
+ return (MATRIX_SIZE_3 - 1 - col) / (MATRIX_SIZE_3 - 1);
653
+ }
654
+ export function wave3PathOpacityFromNorm(norm, base = 0.06, mid = 0.38, peak = 0.88) {
655
+ const t = Math.min(1, Math.max(0, norm));
656
+ if (t <= 0.5) {
657
+ return base + (t / 0.5) * (mid - base);
658
+ }
659
+ return mid + ((t - 0.5) / 0.5) * (peak - mid);
660
+ }
661
+ function getMatrix3Layout(size, dotSize, cellPadding) {
662
+ const n = MATRIX_SIZE_3;
663
+ if (cellPadding != null) {
664
+ const g = Math.max(0, cellPadding);
665
+ const matrixSpan = dotSize * n + g * (n - 1);
666
+ return { gap: g, matrixSpan };
667
+ }
668
+ const g = Math.max(0, Math.floor((size - dotSize * n) / (n - 1)));
669
+ return { gap: g, matrixSpan: size };
670
+ }
671
+ function DotMatrix3Base({ scale: scaleProp, size: sizeProp = 24, dotSize: dotSizeProp = 3, color = 'currentColor', colorPreset, speed = 1, ariaLabel = 'Loading', className, pattern = 'full', dotShape = 'circle', muted = false, bloom = false, halo = 0, dotClassName, phase, reducedMotion = false, onMouseEnter, onMouseLeave, animationResolver, opacityBase = 0.06, opacityMid, opacityPeak, cellPadding = 1, boxSize, minSize, }) {
672
+ const { size, dotSize } = applyDotMatrixScale(sizeProp, dotSizeProp, scaleProp);
673
+ const patternIndexes = new Set(getPattern3Indexes(pattern));
674
+ const safeSpeed = speed > 0 ? speed : 1;
675
+ const speedScale = 1 / safeSpeed;
676
+ const { gap, matrixSpan } = getMatrix3Layout(size, dotSize, cellPadding);
677
+ const { outerDim, useWrapper } = resolveDmxBoxOuterDim({ boxSize, minSize });
678
+ const boxScale = useWrapper && matrixSpan > 0 ? outerDim / matrixSpan : 1;
679
+ const center = CENTER_3;
680
+ const ob = clamp01Dmx(opacityBase);
681
+ const om = clamp01Dmx(opacityMid);
682
+ const op = clamp01Dmx(opacityPeak);
683
+ const unit = dotSize + gap;
684
+ const { resolvedColor, dotFill } = resolveDmxColorTokens(color, colorPreset);
685
+ const dmxVarStyle = {
686
+ width: matrixSpan,
687
+ height: matrixSpan,
688
+ '--dmx-speed': speedScale,
689
+ ['--dmx-dot-size']: `${dotSize}px`,
690
+ ['--dmx-halo-level']: halo,
691
+ ['--dmx-dot-fill']: dotFill,
692
+ color: resolvedColor,
693
+ ...(ob !== undefined && { ['--dmx-opacity-base']: ob }),
694
+ ...(om !== undefined && { ['--dmx-opacity-mid']: om }),
695
+ ...(op !== undefined && { ['--dmx-opacity-peak']: op }),
696
+ ...(useWrapper
697
+ ? {
698
+ transform: `scale(${boxScale})`,
699
+ transformOrigin: 'center center',
700
+ }
701
+ : { minWidth: minSize, minHeight: minSize }),
702
+ };
703
+ const gridStyle = {
704
+ gap,
705
+ gridTemplateColumns: `repeat(${MATRIX_SIZE_3}, minmax(0, 1fr))`,
706
+ gridTemplateRows: `repeat(${MATRIX_SIZE_3}, minmax(0, 1fr))`,
707
+ };
708
+ const dots = Array.from({ length: MATRIX_SIZE_3 * MATRIX_SIZE_3 }).map((_, index) => {
709
+ const { row, col } = indexToCoord3(index);
710
+ const isActive = patternIndexes.has(index);
711
+ const distance = distanceFromCenter3(index);
712
+ const angle = Math.atan2(row - center, col - center);
713
+ const radiusNormalizedValue = Math.hypot(row - center, col - center) / MAX_RADIUS_3;
714
+ const manhattan = manhattanDistance3(index);
715
+ const deltaX = (col - center) * unit;
716
+ const deltaY = (row - center) * unit;
717
+ const animationState = animationResolver
718
+ ? animationResolver({
719
+ index,
720
+ row,
721
+ col,
722
+ distanceFromCenter: distance,
723
+ angleFromCenter: angle,
724
+ radiusNormalized: radiusNormalizedValue,
725
+ manhattanDistance: manhattan,
726
+ phase,
727
+ isActive,
728
+ reducedMotion,
729
+ })
730
+ : {};
731
+ const resolvedAnimationStyle = animationState.style ? { ...animationState.style } : undefined;
732
+ let isBloomDot = false;
733
+ let stylePatch = resolvedAnimationStyle;
734
+ if (isActive) {
735
+ const rawOpacity = stylePatch?.opacity;
736
+ if (stylePatch != null && typeof rawOpacity === 'number') {
737
+ const remappedOpacity = remapOpacityToTriplet(rawOpacity, ob, om, op);
738
+ stylePatch = { ...stylePatch, opacity: remappedOpacity };
739
+ const parts = dmxDotBloomParts(true, rawOpacity, bloom, halo, ob, om, op);
740
+ stylePatch['--dmx-bloom-level'] =
741
+ parts.level;
742
+ isBloomDot = parts.bloomDot;
743
+ }
744
+ else {
745
+ const parts = dmxDotBloomParts(true, 0, bloom, halo, ob, om, op);
746
+ if (parts.level > 0) {
747
+ stylePatch = {
748
+ ...(stylePatch ?? {}),
749
+ ['--dmx-bloom-level']: parts.level,
750
+ };
751
+ }
752
+ isBloomDot = parts.bloomDot;
753
+ }
754
+ }
755
+ const dotStyle = {
756
+ width: dotSize,
757
+ height: dotSize,
758
+ '--dmx-distance': distance,
759
+ '--dmx-row': row,
760
+ '--dmx-col': col,
761
+ '--dmx-x': `${deltaX}px`,
762
+ '--dmx-y': `${deltaY}px`,
763
+ '--dmx-angle': angle,
764
+ '--dmx-radius': radiusNormalizedValue,
765
+ '--dmx-manhattan': manhattan,
766
+ ...stylePatch,
767
+ ...(!isActive
768
+ ? {
769
+ opacity: 0,
770
+ visibility: 'hidden',
771
+ pointerEvents: 'none',
772
+ animation: 'none',
773
+ }
774
+ : {}),
775
+ };
776
+ return (_jsx("span", { "aria-hidden": "true", className: cx('dmx-dot', !isActive && 'dmx-inactive', isBloomDot && 'dmx-bloom-dot', dotClassName, animationState.className), style: dotStyle }, index));
777
+ });
778
+ const matrix = (_jsx("div", { className: cx('dmx-root', 'dmx-matrix-3', `dmx-dot-shape-${dotShape}`, muted && 'dmx-muted', dmxBloomRootActive(bloom, halo) && 'dmx-bloom', dmxBloomHaloSpreadClass(halo), !useWrapper && className), style: dmxVarStyle, children: _jsx("div", { className: "dmx-grid", style: gridStyle, children: dots }) }));
779
+ if (useWrapper) {
780
+ return (_jsx("div", { role: "status", "aria-live": "polite", "aria-label": ariaLabel, className: className, style: {
781
+ display: 'inline-flex',
782
+ alignItems: 'center',
783
+ justifyContent: 'center',
784
+ width: outerDim,
785
+ height: outerDim,
786
+ minWidth: minSize,
787
+ minHeight: minSize,
788
+ overflow: 'hidden',
789
+ }, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: matrix }));
790
+ }
791
+ return (_jsx("div", { role: "status", "aria-live": "polite", "aria-label": ariaLabel, className: cx('dmx-root', 'dmx-matrix-3', `dmx-dot-shape-${dotShape}`, muted && 'dmx-muted', dmxBloomRootActive(bloom, halo) && 'dmx-bloom', dmxBloomHaloSpreadClass(halo), className), style: dmxVarStyle, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: _jsx("div", { className: "dmx-grid", style: gridStyle, children: dots }) }));
792
+ }
793
+ function createDiagonalWave3Resolver(direction) {
794
+ return ({ isActive, index, reducedMotion, phase }) => {
795
+ if (!isActive) {
796
+ return { className: 'dmx-inactive' };
797
+ }
798
+ const path = diagonalWave3PathNormFromIndex(index, direction);
799
+ const style = { '--dmx-path': path };
800
+ if (reducedMotion || phase === 'idle') {
801
+ return {
802
+ style: {
803
+ ...style,
804
+ opacity: path * 0.88,
805
+ },
806
+ };
807
+ }
808
+ return { className: 'dmx-path-3', style };
809
+ };
810
+ }
811
+ export function createDiagonalWave3Component(displayName, direction) {
812
+ const resolve = createDiagonalWave3Resolver(direction);
813
+ function DiagonalWave3Component({ pattern = 'full', animated = true, hoverAnimated = false, speed = 1.15, ...rest }) {
814
+ const reducedMotion = usePrefersReducedMotion();
815
+ const { phase: matrixPhase, onMouseEnter, onMouseLeave, } = useDotMatrixPhases({
816
+ animated: Boolean(animated && !reducedMotion),
817
+ hoverAnimated: Boolean(hoverAnimated && !reducedMotion),
818
+ speed,
819
+ });
820
+ return (_jsx(DotMatrix3Base, { ...rest, speed: speed, pattern: pattern, animated: animated, phase: matrixPhase, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, reducedMotion: reducedMotion, animationResolver: resolve }));
821
+ }
822
+ DiagonalWave3Component.displayName = displayName;
823
+ return DiagonalWave3Component;
824
+ }
825
+ export function createDotm3x3Component(displayName, animationResolver, defaultSpeed = 1.15) {
826
+ function Dotm3x3Component({ pattern = 'full', dotShape = 'circle', animated = true, hoverAnimated = false, speed = defaultSpeed, ...rest }) {
827
+ const reducedMotion = usePrefersReducedMotion();
828
+ const { phase: matrixPhase, onMouseEnter, onMouseLeave, } = useDotMatrixPhases({
829
+ animated: Boolean(animated && !reducedMotion),
830
+ hoverAnimated: Boolean(hoverAnimated && !reducedMotion),
831
+ speed,
832
+ });
833
+ return (_jsx(DotMatrix3Base, { ...rest, speed: speed, pattern: pattern, dotShape: dotShape, animated: animated, phase: matrixPhase, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, reducedMotion: reducedMotion, animationResolver: animationResolver }));
834
+ }
835
+ Dotm3x3Component.displayName = displayName;
836
+ return Dotm3x3Component;
837
+ }
838
+ export function createDotm5x5Component(displayName, makeResolver, config) {
839
+ function Dotm5x5Component({ pattern = 'full', animated = true, hoverAnimated = false, speed = config.speed, size = config.size ?? 36, dotSize = config.dotSize ?? 5, ...rest }) {
840
+ const reducedMotion = usePrefersReducedMotion();
841
+ const { phase, onMouseEnter, onMouseLeave } = useDotMatrixPhases({
842
+ animated: Boolean(animated && !reducedMotion),
843
+ hoverAnimated: Boolean(hoverAnimated && !reducedMotion),
844
+ speed,
845
+ });
846
+ const active = !reducedMotion && phase !== 'idle';
847
+ const cyclePhase = useCyclePhase({ active: active && config.steps == null && config.cycleMsBase != null, cycleMsBase: config.cycleMsBase ?? 1000, speed });
848
+ const step = useSteppedCycle({ active: active && config.steps != null, cycleMsBase: config.cycleMsBase ?? 1000, steps: config.steps ?? 1, idleStep: config.idleStep, speed });
849
+ const animationResolver = useMemo(() => makeResolver(config.steps == null ? cyclePhase : step, reducedMotion), [cyclePhase, step, reducedMotion]);
850
+ return (_jsx(DotMatrixBase, { ...rest, size: size, dotSize: dotSize, speed: speed, pattern: config.lockedPattern ?? pattern, animated: animated, phase: phase, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, reducedMotion: reducedMotion, animationResolver: animationResolver }));
851
+ }
852
+ Dotm5x5Component.displayName = displayName;
853
+ return Dotm5x5Component;
854
+ }
855
+ const GLYPH_SPIN_BASE_OPACITY = 0.09;
856
+ const GLYPH_SPIN_PEAK_OPACITY = 0.88;
857
+ const GLYPH_SPIN_STEP_MS = 180;
858
+ const GLYPH_SPIN_ROTATION_STEPS = 4;
859
+ const GLYPH_SPIN_CYCLE_MS_BASE = GLYPH_SPIN_STEP_MS * GLYPH_SPIN_ROTATION_STEPS;
860
+ function glyphSpinSmoothstep(value) {
861
+ const t = Math.min(1, Math.max(0, value));
862
+ return t * t * (3 - 2 * t);
863
+ }
864
+ function rotate3x3(pattern, turns) {
865
+ const t = ((turns % GLYPH_SPIN_ROTATION_STEPS) + GLYPH_SPIN_ROTATION_STEPS) % GLYPH_SPIN_ROTATION_STEPS;
866
+ if (t === 0) {
867
+ return pattern;
868
+ }
869
+ let out = [...pattern];
870
+ for (let k = 0; k < t; k += 1) {
871
+ const next = new Array(9).fill(0);
872
+ for (let i = 0; i < 9; i += 1) {
873
+ const r = Math.floor(i / 3);
874
+ const c = i % 3;
875
+ const nr = c;
876
+ const nc = 2 - r;
877
+ next[nr * 3 + nc] = out[i];
878
+ }
879
+ out = next;
880
+ }
881
+ return out;
882
+ }
883
+ function glyphSpinOpacity(current, next, index, t) {
884
+ const weight = (current[index] ?? 0) * (1 - t) + (next[index] ?? 0) * t;
885
+ return GLYPH_SPIN_BASE_OPACITY + weight * (GLYPH_SPIN_PEAK_OPACITY - GLYPH_SPIN_BASE_OPACITY);
886
+ }
887
+ export function createGlyphSpin3Component(displayName, glyph, defaultSpeed = 1) {
888
+ function GlyphSpin3Component({ speed = defaultSpeed, pattern = 'full', dotShape = 'circle', animated = true, hoverAnimated = false, ...rest }) {
889
+ const reducedMotion = usePrefersReducedMotion();
890
+ const { phase: matrixPhase, onMouseEnter, onMouseLeave, } = useDotMatrixPhases({
891
+ animated: Boolean(animated && !reducedMotion),
892
+ hoverAnimated: Boolean(hoverAnimated && !reducedMotion),
893
+ speed,
894
+ });
895
+ const cyclePhase = useCyclePhase({
896
+ active: !reducedMotion && matrixPhase !== 'idle',
897
+ cycleMsBase: GLYPH_SPIN_CYCLE_MS_BASE,
898
+ speed,
899
+ });
900
+ const animationResolver = useMemo(() => {
901
+ const scaledPhase = cyclePhase * GLYPH_SPIN_ROTATION_STEPS;
902
+ const turns = Math.floor(scaledPhase) % GLYPH_SPIN_ROTATION_STEPS;
903
+ const segmentT = glyphSpinSmoothstep(scaledPhase - Math.floor(scaledPhase));
904
+ const current = rotate3x3(glyph, turns);
905
+ const next = rotate3x3(glyph, turns + 1);
906
+ return ({ isActive, index, reducedMotion: rm, phase }) => {
907
+ if (!isActive) {
908
+ return { className: 'dmx-inactive' };
909
+ }
910
+ if (rm || phase === 'idle') {
911
+ return { style: { opacity: glyphSpinOpacity(glyph, glyph, index, 0) } };
912
+ }
913
+ return { style: { opacity: glyphSpinOpacity(current, next, index, segmentT) } };
914
+ };
915
+ }, [cyclePhase]);
916
+ return (_jsx(DotMatrix3Base, { ...rest, speed: speed, pattern: pattern, dotShape: dotShape, animated: animated, phase: matrixPhase, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, reducedMotion: reducedMotion, animationResolver: animationResolver }));
917
+ }
918
+ GlyphSpin3Component.displayName = displayName;
919
+ return GlyphSpin3Component;
920
+ }