@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,28 @@
1
+ import type { DotMatrixPhase } from './dotmatrix-core.js';
2
+ export declare function usePrefersReducedMotion(): boolean;
3
+ interface UseCyclePhaseOptions {
4
+ active: boolean;
5
+ cycleMsBase: number;
6
+ speed?: number;
7
+ }
8
+ export declare function useCyclePhase({ active, cycleMsBase, speed }: UseCyclePhaseOptions): number;
9
+ interface UseSteppedCycleOptions {
10
+ active: boolean;
11
+ cycleMsBase: number;
12
+ steps: number;
13
+ speed?: number;
14
+ idleStep?: number;
15
+ }
16
+ export declare function useSteppedCycle({ active, cycleMsBase, steps, speed, idleStep, }: UseSteppedCycleOptions): number;
17
+ interface UseDotMatrixPhasesOptions {
18
+ animated?: boolean;
19
+ hoverAnimated?: boolean;
20
+ speed?: number;
21
+ }
22
+ interface DotMatrixPhasesResult {
23
+ phase: DotMatrixPhase;
24
+ onMouseEnter: () => void;
25
+ onMouseLeave: () => void;
26
+ }
27
+ export declare function useDotMatrixPhases({ animated, hoverAnimated, speed, }: UseDotMatrixPhasesOptions): DotMatrixPhasesResult;
28
+ export {};
@@ -0,0 +1,151 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
+ export function usePrefersReducedMotion() {
4
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
5
+ useEffect(() => {
6
+ const query = window.matchMedia('(prefers-reduced-motion: reduce)');
7
+ const update = () => {
8
+ setPrefersReducedMotion(query.matches);
9
+ };
10
+ update();
11
+ query.addEventListener('change', update);
12
+ return () => {
13
+ query.removeEventListener('change', update);
14
+ };
15
+ }, []);
16
+ return prefersReducedMotion;
17
+ }
18
+ export function useCyclePhase({ active, cycleMsBase, speed = 1 }) {
19
+ const [phase, setPhase] = useState(0);
20
+ useEffect(() => {
21
+ if (!active) {
22
+ setPhase(0);
23
+ return;
24
+ }
25
+ const safeSpeed = speed > 0 ? speed : 1;
26
+ const raw = cycleMsBase / safeSpeed;
27
+ const cycleMs = raw > 0 && Number.isFinite(raw) ? raw : 1000;
28
+ const start = performance.now();
29
+ let rafId = 0;
30
+ const tick = (now) => {
31
+ const elapsed = (((now - start) % cycleMs) + cycleMs) % cycleMs;
32
+ setPhase(elapsed / cycleMs);
33
+ rafId = requestAnimationFrame(tick);
34
+ };
35
+ rafId = requestAnimationFrame(tick);
36
+ return () => cancelAnimationFrame(rafId);
37
+ }, [active, cycleMsBase, speed]);
38
+ return phase;
39
+ }
40
+ const listeners = new Set();
41
+ let rafId = null;
42
+ function emit(now) {
43
+ listeners.forEach((listener) => {
44
+ listener(now);
45
+ });
46
+ }
47
+ function tick(now) {
48
+ emit(now);
49
+ if (listeners.size > 0) {
50
+ rafId = window.requestAnimationFrame(tick);
51
+ }
52
+ else {
53
+ rafId = null;
54
+ }
55
+ }
56
+ function subscribeFrame(listener) {
57
+ listeners.add(listener);
58
+ if (rafId === null) {
59
+ rafId = window.requestAnimationFrame(tick);
60
+ }
61
+ return () => {
62
+ listeners.delete(listener);
63
+ if (listeners.size === 0 && rafId !== null) {
64
+ window.cancelAnimationFrame(rafId);
65
+ rafId = null;
66
+ }
67
+ };
68
+ }
69
+ export function useSteppedCycle({ active, cycleMsBase, steps, speed = 1, idleStep = 0, }) {
70
+ const safeSteps = Math.max(1, Math.floor(steps));
71
+ const safeSpeed = speed > 0 ? speed : 1;
72
+ const rawCycleMs = cycleMsBase / safeSpeed;
73
+ const rawStepMs = rawCycleMs / safeSteps;
74
+ const stepMs = rawStepMs > 0 && Number.isFinite(rawStepMs) ? rawStepMs : 1;
75
+ const cycleMs = stepMs * safeSteps;
76
+ const [step, setStep] = useState(() => (active ? 0 : idleStep));
77
+ const startMsRef = useRef(0);
78
+ const activeRef = useRef(false);
79
+ const currentStepRef = useRef(idleStep);
80
+ useEffect(() => {
81
+ if (!active) {
82
+ activeRef.current = false;
83
+ currentStepRef.current = idleStep;
84
+ setStep(idleStep);
85
+ return;
86
+ }
87
+ const updateStep = (now) => {
88
+ if (!activeRef.current) {
89
+ startMsRef.current = now;
90
+ activeRef.current = true;
91
+ }
92
+ const elapsed = Math.max(0, now - startMsRef.current);
93
+ const nextStep = Math.floor((elapsed % cycleMs) / stepMs) % safeSteps;
94
+ if (nextStep !== currentStepRef.current) {
95
+ currentStepRef.current = nextStep;
96
+ setStep(nextStep);
97
+ }
98
+ };
99
+ updateStep(performance.now());
100
+ return subscribeFrame(updateStep);
101
+ }, [active, cycleMs, idleStep, safeSteps, stepMs]);
102
+ return active ? step : idleStep;
103
+ }
104
+ export function useDotMatrixPhases({ animated = false, hoverAnimated = false, speed = 1, }) {
105
+ const safeSpeed = speed > 0 ? speed : 1;
106
+ const autoRun = Boolean(animated && !hoverAnimated);
107
+ const [hoverPhase, setHoverPhase] = useState('idle');
108
+ const timeouts = useRef([]);
109
+ const hoverGen = useRef(0);
110
+ const clearTimers = useCallback(() => {
111
+ for (let i = 0; i < timeouts.current.length; i += 1) {
112
+ window.clearTimeout(timeouts.current[i]);
113
+ }
114
+ timeouts.current = [];
115
+ }, []);
116
+ useEffect(() => {
117
+ hoverGen.current += 1;
118
+ clearTimers();
119
+ return clearTimers;
120
+ }, [autoRun, hoverAnimated, clearTimers]);
121
+ const onMouseEnter = useCallback(() => {
122
+ if (!hoverAnimated || autoRun) {
123
+ return;
124
+ }
125
+ clearTimers();
126
+ const gen = ++hoverGen.current;
127
+ setHoverPhase('collapse');
128
+ const collapseMs = Math.max(1, Math.round(300 / safeSpeed));
129
+ const id = window.setTimeout(() => {
130
+ if (hoverGen.current !== gen) {
131
+ return;
132
+ }
133
+ setHoverPhase('hoverRipple');
134
+ }, collapseMs);
135
+ timeouts.current.push(id);
136
+ }, [hoverAnimated, autoRun, safeSpeed, clearTimers]);
137
+ const onMouseLeave = useCallback(() => {
138
+ if (!hoverAnimated || autoRun) {
139
+ return;
140
+ }
141
+ hoverGen.current += 1;
142
+ clearTimers();
143
+ setHoverPhase('idle');
144
+ }, [hoverAnimated, autoRun, clearTimers]);
145
+ const phase = autoRun ? 'loadingRipple' : hoverAnimated ? hoverPhase : 'idle';
146
+ return useMemo(() => ({
147
+ phase,
148
+ onMouseEnter,
149
+ onMouseLeave,
150
+ }), [phase, onMouseEnter, onMouseLeave]);
151
+ }
@@ -0,0 +1,4 @@
1
+ export declare function faviconUrlForHostname(hostname: string): string;
2
+ export declare function faviconUrlForUrl(url: string): string | null;
3
+ /** Resolve a full URL or bare domain (e.g. google.com) to a favicon URL. */
4
+ export declare function faviconUrlForValue(value: string): string | null;
@@ -0,0 +1,21 @@
1
+ export function faviconUrlForHostname(hostname) {
2
+ const clean = hostname.replace(/^www\./, '');
3
+ return `https://www.google.com/s2/favicons?domain=${clean}&sz=128`;
4
+ }
5
+ export function faviconUrlForUrl(url) {
6
+ try {
7
+ return faviconUrlForHostname(new URL(url).hostname);
8
+ }
9
+ catch {
10
+ return null;
11
+ }
12
+ }
13
+ /** Resolve a full URL or bare domain (e.g. google.com) to a favicon URL. */
14
+ export function faviconUrlForValue(value) {
15
+ const trimmed = value.trim();
16
+ if (!trimmed)
17
+ return null;
18
+ if (trimmed.includes('://'))
19
+ return faviconUrlForUrl(trimmed);
20
+ return faviconUrlForHostname(trimmed);
21
+ }
@@ -0,0 +1,6 @@
1
+ export declare const fontWeights: {
2
+ readonly normal: "'wght' 400, 'opsz' 14";
3
+ readonly medium: "'wght' 450, 'opsz' 15";
4
+ readonly semibold: "'wght' 550, 'opsz' 20";
5
+ readonly bold: "'wght' 700, 'opsz' 25";
6
+ };
@@ -0,0 +1,6 @@
1
+ export const fontWeights = {
2
+ normal: "'wght' 400, 'opsz' 14",
3
+ medium: "'wght' 450, 'opsz' 15",
4
+ semibold: "'wght' 550, 'opsz' 20",
5
+ bold: "'wght' 700, 'opsz' 25",
6
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * THE icon weight for the whole app — dev and production alike.
3
+ *
4
+ * Change DEFAULT_ICON_WEIGHT, save, and every Phosphor icon in the app flips
5
+ * (thin | light | regular | bold | fill | duotone). Commit it and production
6
+ * renders the same weight. There is no runtime toggle and no environment
7
+ * branching: this constant is the single source of truth.
8
+ *
9
+ * How it reaches icons — you never pass a weight prop:
10
+ * • Client components → IconProvider (src/components/ui/icon-provider.tsx)
11
+ * feeds it to Phosphor's IconContext.
12
+ * • Server components → icons imported from '@phosphor-icons/react/ssr' have it
13
+ * pre-bound (RSC cannot use React context, so the weight is bound there).
14
+ *
15
+ * The only intentional exception is weight="fill" on solid/status icons
16
+ * (status tiles, success checks, destructive actions), which stay filled
17
+ * whatever this constant is set to.
18
+ *
19
+ * Compare the shipped weights side by side at /design-system → Icons.
20
+ */
21
+ import type { IconWeight } from '@phosphor-icons/react';
22
+ export declare const DEFAULT_ICON_WEIGHT: IconWeight;
23
+ export declare const ICON_WEIGHTS: readonly IconWeight[];
24
+ /**
25
+ * The weights the browser bundle carries. Phosphor ships all six weights of
26
+ * every icon in one module; `scripts/phosphor-weights-loader.cjs` (wired in
27
+ * next.config.ts) drops the rest, ~1/3 of every icon's bytes. An icon asked
28
+ * for a weight outside this list renders an empty <svg>, so
29
+ * icon-config.test.ts fails on any such weight literal in src/.
30
+ *
31
+ * Always contains DEFAULT_ICON_WEIGHT, so changing the default still works.
32
+ */
33
+ export declare const SHIPPED_ICON_WEIGHTS: readonly IconWeight[];
@@ -0,0 +1,22 @@
1
+ export const DEFAULT_ICON_WEIGHT = 'bold';
2
+ export const ICON_WEIGHTS = [
3
+ 'thin',
4
+ 'light',
5
+ 'regular',
6
+ 'bold',
7
+ 'fill',
8
+ 'duotone',
9
+ ];
10
+ /**
11
+ * The weights the browser bundle carries. Phosphor ships all six weights of
12
+ * every icon in one module; `scripts/phosphor-weights-loader.cjs` (wired in
13
+ * next.config.ts) drops the rest, ~1/3 of every icon's bytes. An icon asked
14
+ * for a weight outside this list renders an empty <svg>, so
15
+ * icon-config.test.ts fails on any such weight literal in src/.
16
+ *
17
+ * Always contains DEFAULT_ICON_WEIGHT, so changing the default still works.
18
+ */
19
+ export const SHIPPED_ICON_WEIGHTS = ICON_WEIGHTS.filter((weight) => weight === DEFAULT_ICON_WEIGHT ||
20
+ weight === 'regular' ||
21
+ weight === 'fill' ||
22
+ weight === 'duotone');
@@ -0,0 +1,34 @@
1
+ import { type ComponentType, type ReactNode } from 'react';
2
+ import { type IconProps } from '@phosphor-icons/react';
3
+ /**
4
+ * Phosphor's own prop contract — `size`, `color`, `weight`, `mirrored`, plus
5
+ * every `<svg>` attribute. Icons never take a `weight` here: the app-wide
6
+ * constant reaches them through Phosphor's IconContext, which
7
+ * the host's icon provider installs at the root (see `./icon-config.ts`).
8
+ *
9
+ * Phosphor fills a solid path rather than stroking an outline, so `strokeWidth`
10
+ * type-checks (it is a legal SVG attribute) but paints nothing.
11
+ */
12
+ export type IconComponentProps = IconProps;
13
+ export type IconComponent = ComponentType<IconComponentProps>;
14
+ export type IconName = 'chevron-right' | 'chevron-down' | 'x' | 'copy' | 'menu' | 'dot' | 'monitor' | 'sun' | 'moon' | 'rectangle-horizontal' | 'circle' | 'square-library' | 'clock' | 'star' | 'settings' | 'plus' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'search' | 'users' | 'lock' | 'mail' | 'bell' | 'shield' | 'palette' | 'lightbulb' | 'rocket' | 'heart' | 'paintbrush' | 'brain' | 'globe' | 'user' | 'image' | 'link' | 'check' | 'rotate-ccw' | 'play' | 'pause' | 'pipette' | 'home' | 'message-circle' | 'inbox' | 'pencil' | 'skip-forward' | 'corner-down-right';
15
+ export declare const defaultIcons: Record<IconName, IconComponent>;
16
+ /**
17
+ * Returns a single icon component for the given name.
18
+ * Falls back to the default (Phosphor) set if no provider is present.
19
+ */
20
+ declare function useIcon(name: IconName): IconComponent;
21
+ /**
22
+ * Returns the full icon map.
23
+ * Falls back to the default (Phosphor) set if no provider is present.
24
+ */
25
+ declare function useIcons(): Record<IconName, IconComponent>;
26
+ /**
27
+ * Swap some or all icons for components from another library.
28
+ * Names left out of `icons` keep their default (Phosphor) component.
29
+ */
30
+ declare function IconProvider({ children, icons, }: {
31
+ children: ReactNode;
32
+ icons?: Partial<Record<IconName, IconComponent>>;
33
+ }): import("react").JSX.Element;
34
+ export { IconProvider, useIcon, useIcons };
@@ -0,0 +1,81 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useMemo } from 'react';
4
+ import { ArrowCounterClockwiseIcon, ArrowElbowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BellIcon, BooksIcon, BrainIcon, CaretDownIcon, CaretRightIcon, ChatCircleIcon, CheckIcon, CircleIcon, ClockIcon, CopyIcon, DotIcon, EnvelopeIcon, EyedropperIcon, GearIcon, GlobeIcon, HeartIcon, HouseIcon, ImageIcon, LightbulbIcon, LinkIcon, ListIcon, LockIcon, MagnifyingGlassIcon, MonitorIcon, MoonIcon, PaintBrushIcon, PaletteIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RectangleIcon, RocketIcon, ShieldIcon, SkipForwardIcon, StarIcon, SunIcon, TrayIcon, UserIcon, UsersIcon, XIcon, } from '@phosphor-icons/react';
5
+ /* There is deliberately no "loader" entry. `Loading`
6
+ (@/components/ui/loading) is the codebase's only spinner, and no icon may
7
+ stand in for it. */
8
+ export const defaultIcons = {
9
+ 'chevron-right': CaretRightIcon,
10
+ 'chevron-down': CaretDownIcon,
11
+ pipette: EyedropperIcon,
12
+ x: XIcon,
13
+ copy: CopyIcon,
14
+ menu: ListIcon,
15
+ dot: DotIcon,
16
+ monitor: MonitorIcon,
17
+ sun: SunIcon,
18
+ moon: MoonIcon,
19
+ 'rectangle-horizontal': RectangleIcon,
20
+ circle: CircleIcon,
21
+ 'square-library': BooksIcon,
22
+ clock: ClockIcon,
23
+ star: StarIcon,
24
+ settings: GearIcon,
25
+ plus: PlusIcon,
26
+ 'arrow-left': ArrowLeftIcon,
27
+ 'arrow-right': ArrowRightIcon,
28
+ 'arrow-up': ArrowUpIcon,
29
+ search: MagnifyingGlassIcon,
30
+ users: UsersIcon,
31
+ lock: LockIcon,
32
+ mail: EnvelopeIcon,
33
+ bell: BellIcon,
34
+ shield: ShieldIcon,
35
+ palette: PaletteIcon,
36
+ lightbulb: LightbulbIcon,
37
+ rocket: RocketIcon,
38
+ heart: HeartIcon,
39
+ paintbrush: PaintBrushIcon,
40
+ brain: BrainIcon,
41
+ globe: GlobeIcon,
42
+ user: UserIcon,
43
+ image: ImageIcon,
44
+ link: LinkIcon,
45
+ check: CheckIcon,
46
+ 'rotate-ccw': ArrowCounterClockwiseIcon,
47
+ play: PlayIcon,
48
+ pause: PauseIcon,
49
+ home: HouseIcon,
50
+ 'message-circle': ChatCircleIcon,
51
+ inbox: TrayIcon,
52
+ pencil: PencilIcon,
53
+ 'skip-forward': SkipForwardIcon,
54
+ 'corner-down-right': ArrowElbowDownRightIcon,
55
+ };
56
+ const IconContext = createContext(null);
57
+ /**
58
+ * Returns a single icon component for the given name.
59
+ * Falls back to the default (Phosphor) set if no provider is present.
60
+ */
61
+ function useIcon(name) {
62
+ const icons = useContext(IconContext);
63
+ return (icons ?? defaultIcons)[name];
64
+ }
65
+ /**
66
+ * Returns the full icon map.
67
+ * Falls back to the default (Phosphor) set if no provider is present.
68
+ */
69
+ function useIcons() {
70
+ const icons = useContext(IconContext);
71
+ return icons ?? defaultIcons;
72
+ }
73
+ /**
74
+ * Swap some or all icons for components from another library.
75
+ * Names left out of `icons` keep their default (Phosphor) component.
76
+ */
77
+ function IconProvider({ children, icons, }) {
78
+ const value = useMemo(() => ({ ...defaultIcons, ...icons }), [icons]);
79
+ return _jsx(IconContext.Provider, { value: value, children: children });
80
+ }
81
+ export { IconProvider, useIcon, useIcons };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns a stable dedicated portal root for UI overlays.
3
+ *
4
+ * Avoids mounting dialogs directly into document.body, which can be fragile
5
+ * when multiple portals mount/unmount during redirects, modal nesting, or
6
+ * browser DOM mutations. A single dedicated root makes portal ordering stable.
7
+ */
8
+ export declare function getPortalRoot(): HTMLElement | null;
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ let portalRoot = null;
3
+ /**
4
+ * Returns a stable dedicated portal root for UI overlays.
5
+ *
6
+ * Avoids mounting dialogs directly into document.body, which can be fragile
7
+ * when multiple portals mount/unmount during redirects, modal nesting, or
8
+ * browser DOM mutations. A single dedicated root makes portal ordering stable.
9
+ */
10
+ export function getPortalRoot() {
11
+ if (typeof document === 'undefined')
12
+ return null;
13
+ if (portalRoot && document.body.contains(portalRoot))
14
+ return portalRoot;
15
+ const existing = document.getElementById('kortix-portal-root');
16
+ if (existing) {
17
+ portalRoot = existing;
18
+ return portalRoot;
19
+ }
20
+ const el = document.createElement('div');
21
+ el.id = 'kortix-portal-root';
22
+ el.setAttribute('data-kortix-portal-root', 'true');
23
+ document.body.appendChild(el);
24
+ portalRoot = el;
25
+ return portalRoot;
26
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * How long a streaming block's text must hold still before it is rendered in
3
+ * full: highlighted for code, drawn for a Mermaid diagram.
4
+ *
5
+ * The block that is still arriving changes on every paced render, and
6
+ * tokenizing it each time was the dominant cost of streaming a code answer
7
+ * (Shiki re-ran over the whole block per delta batch, and its cache never hit
8
+ * because the key moved with the text). A diagram re-ran `mermaid.render` per
9
+ * batch and flickered between its placeholder, an error card for each
10
+ * half-written prefix, and the SVG. A block renders its plain form while it
11
+ * grows and its full form once it stops — when its fence closes and the
12
+ * message moves on, or at once when the stream ends.
13
+ */
14
+ export declare const CODE_SETTLE_MS = 400;
15
+ /** `value` once it has held still for `delayMs` while `active`; `value` when not active; else null. */
16
+ export declare function useSettledValue(value: string, active: boolean, delayMs: number): string | null;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ /**
4
+ * How long a streaming block's text must hold still before it is rendered in
5
+ * full: highlighted for code, drawn for a Mermaid diagram.
6
+ *
7
+ * The block that is still arriving changes on every paced render, and
8
+ * tokenizing it each time was the dominant cost of streaming a code answer
9
+ * (Shiki re-ran over the whole block per delta batch, and its cache never hit
10
+ * because the key moved with the text). A diagram re-ran `mermaid.render` per
11
+ * batch and flickered between its placeholder, an error card for each
12
+ * half-written prefix, and the SVG. A block renders its plain form while it
13
+ * grows and its full form once it stops — when its fence closes and the
14
+ * message moves on, or at once when the stream ends.
15
+ */
16
+ export const CODE_SETTLE_MS = 400;
17
+ /** `value` once it has held still for `delayMs` while `active`; `value` when not active; else null. */
18
+ export function useSettledValue(value, active, delayMs) {
19
+ const [settled, setSettled] = useState(null);
20
+ useEffect(() => {
21
+ if (!active)
22
+ return;
23
+ const timer = setTimeout(() => setSettled(value), delayMs);
24
+ return () => clearTimeout(timer);
25
+ }, [value, active, delayMs]);
26
+ if (!active)
27
+ return value;
28
+ return settled === value ? value : null;
29
+ }
@@ -0,0 +1,31 @@
1
+ export declare const spring: {
2
+ readonly fast: {
3
+ readonly type: "spring";
4
+ readonly duration: 0.08;
5
+ readonly bounce: 0;
6
+ readonly exit: {
7
+ readonly duration: 0.06;
8
+ };
9
+ };
10
+ readonly moderate: {
11
+ readonly type: "spring";
12
+ readonly duration: 0.16;
13
+ readonly bounce: 0;
14
+ readonly exit: {
15
+ readonly duration: 0.12;
16
+ };
17
+ };
18
+ readonly slow: {
19
+ readonly type: "spring";
20
+ readonly duration: 0.24;
21
+ readonly bounce: 0.12;
22
+ readonly exit: {
23
+ readonly duration: 0.16;
24
+ };
25
+ };
26
+ };
27
+ export declare const exitFallbackMs: (tier: {
28
+ exit: {
29
+ duration: number;
30
+ };
31
+ }) => number;
@@ -0,0 +1,29 @@
1
+ export const spring = {
2
+ fast: {
3
+ type: 'spring',
4
+ duration: 0.08,
5
+ bounce: 0,
6
+ exit: { duration: 0.06 },
7
+ },
8
+ // Critically damped: same perceived speed as a bouncier tier, but lands
9
+ // exactly with no overshoot — for short travel and panels/sheets that must
10
+ // settle precisely (dropdowns, tabs, drawers, merged selection backgrounds).
11
+ moderate: {
12
+ type: 'spring',
13
+ duration: 0.16,
14
+ bounce: 0,
15
+ exit: { duration: 0.12 },
16
+ },
17
+ slow: {
18
+ type: 'spring',
19
+ duration: 0.24,
20
+ bounce: 0.12,
21
+ exit: { duration: 0.16 },
22
+ },
23
+ };
24
+ // Fallback delay (ms) for deferred-unmount timers that guard an exit tween:
25
+ // popups keep their portal mounted until onAnimationComplete fires, but a
26
+ // throttled/background tab can stall the animation, so a timer force-unmounts
27
+ // after the tier's exit duration plus a safety buffer. Deriving it here keeps
28
+ // the timers in step with the tokens above.
29
+ export const exitFallbackMs = (tier) => Math.round(tier.exit.duration * 1000) + 100;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,5 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ export declare function DialogDepthProvider({ depth, children, }: {
3
+ depth: number;
4
+ children: React.ReactNode;
5
+ }): React.JSX.Element;
6
+ export declare function useDialogDepth(): number;
7
+ /** Level held by `id`, or 0 when unregistered. Kept after close on purpose. */
8
+ export declare function dialogLayerLevel(id: string): number;
9
+ /**
10
+ * Mark `id` open and return its level. A layer that is already open keeps its
11
+ * level (it only rises to `minLevel`, its React-tree floor), so a sibling
12
+ * opening above it never reshuffles it. A layer that is opening takes the next
13
+ * level above every other open layer.
14
+ */
15
+ export declare function openDialogLayer(id: string, minLevel: number): number;
16
+ /**
17
+ * Mark `id` closed. Its level is kept so the exit animation stays above the
18
+ * layer beneath it; it just stops raising layers that open afterwards.
19
+ */
20
+ export declare function closeDialogLayer(id: string): void;
21
+ export declare function removeDialogLayer(id: string): void;
22
+ /**
23
+ * Depth for a layer that is `open`: its runtime level, never below the depth
24
+ * its React ancestors imply. Provide the result through `DialogDepthProvider`
25
+ * so nested selects, menus, and modals stack above it.
26
+ */
27
+ export declare function useDialogLayerDepth(open: boolean): number;
28
+ type DialogRootOpenProps = {
29
+ open?: boolean;
30
+ defaultOpen?: boolean;
31
+ onOpenChange?: (open: boolean) => void;
32
+ };
33
+ /**
34
+ * `useDialogLayerDepth` for a Radix dialog root. The stack needs the open state
35
+ * of uncontrolled roots too, so this owns it and hands Radix a controlled
36
+ * `open` / `onOpenChange` pair — observable behaviour is unchanged.
37
+ */
38
+ export declare function useDialogRootLayer({ open, defaultOpen, onOpenChange }: DialogRootOpenProps): {
39
+ depth: number;
40
+ open: boolean;
41
+ onOpenChange: (next: boolean) => void;
42
+ };
43
+ export declare function dialogOverlayZ(depth: number): number;
44
+ export declare function dialogContentZ(depth: number): number;
45
+ export declare function floatingZ(depth: number): number;
46
+ /** Portaled popovers/menus/selects rendered outside dialog DOM. */
47
+ export declare const FLOATING_LAYER_SELECTOR = "[role=\"menu\"],[role=\"listbox\"],[role=\"tooltip\"],[data-radix-popper-content-wrapper]";
48
+ export declare function isFloatingLayerTarget(target: EventTarget | null): boolean;
49
+ export declare function hasOpenFloatingLayer(): boolean;
50
+ /** Nested modals/sheets opened above the customize panel (or any parent dialog).
51
+ * Radix gives alerts `role="alertdialog"`, so confirm dialogs only count here
52
+ * if that role is matched too — miss it and Escape aimed at a confirm tears
53
+ * down the panel behind it. */
54
+ export declare function hasOpenNestedDialog(): boolean;
55
+ export {};