@hanzo/ui 8.0.26 → 8.0.28

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 (1193) hide show
  1. package/README.md +1 -1
  2. package/dist/backends/gui/aspect-ratio.cjs +15 -0
  3. package/dist/backends/gui/aspect-ratio.d.ts +15 -0
  4. package/dist/backends/gui/aspect-ratio.d.ts.map +1 -0
  5. package/dist/backends/gui/aspect-ratio.js +13 -0
  6. package/dist/backends/gui/aspect-ratio.js.map +1 -0
  7. package/dist/backends/gui/avatar.cjs +20 -0
  8. package/dist/backends/gui/avatar.d.ts +17 -0
  9. package/dist/backends/gui/avatar.d.ts.map +1 -0
  10. package/dist/backends/gui/avatar.js +16 -0
  11. package/dist/backends/gui/avatar.js.map +1 -0
  12. package/dist/backends/gui/badge.cjs +80 -0
  13. package/dist/backends/gui/badge.d.ts +20 -0
  14. package/dist/backends/gui/badge.d.ts.map +1 -0
  15. package/dist/backends/gui/badge.js +76 -0
  16. package/dist/backends/gui/badge.js.map +1 -0
  17. package/dist/backends/gui/button.cjs +114 -0
  18. package/dist/backends/gui/button.d.ts +30 -0
  19. package/dist/backends/gui/button.d.ts.map +1 -0
  20. package/dist/backends/gui/button.js +111 -0
  21. package/dist/backends/gui/button.js.map +1 -0
  22. package/dist/backends/gui/card.cjs +49 -0
  23. package/dist/backends/gui/card.d.ts +45 -0
  24. package/dist/backends/gui/card.d.ts.map +1 -0
  25. package/dist/backends/gui/card.js +41 -0
  26. package/dist/backends/gui/card.js.map +1 -0
  27. package/dist/backends/gui/checkbox.cjs +16 -0
  28. package/dist/backends/gui/checkbox.d.ts +10 -0
  29. package/dist/backends/gui/checkbox.d.ts.map +1 -0
  30. package/dist/backends/gui/checkbox.js +14 -0
  31. package/dist/backends/gui/checkbox.js.map +1 -0
  32. package/dist/backends/gui/collapsible.cjs +15 -0
  33. package/dist/backends/gui/collapsible.d.ts +11 -0
  34. package/dist/backends/gui/collapsible.d.ts.map +1 -0
  35. package/dist/backends/gui/collapsible.js +11 -0
  36. package/dist/backends/gui/collapsible.js.map +1 -0
  37. package/dist/backends/gui/command.cjs +198 -0
  38. package/dist/backends/gui/command.d.ts +87 -0
  39. package/dist/backends/gui/command.d.ts.map +1 -0
  40. package/dist/backends/gui/command.js +188 -0
  41. package/dist/backends/gui/command.js.map +1 -0
  42. package/dist/backends/gui/command.logic.cjs +49 -0
  43. package/dist/backends/gui/command.logic.d.ts +21 -0
  44. package/dist/backends/gui/command.logic.d.ts.map +1 -0
  45. package/dist/backends/gui/command.logic.js +45 -0
  46. package/dist/backends/gui/command.logic.js.map +1 -0
  47. package/dist/backends/gui/dialog.cjs +41 -0
  48. package/dist/backends/gui/dialog.d.ts +28 -0
  49. package/dist/backends/gui/dialog.d.ts.map +1 -0
  50. package/dist/backends/gui/dialog.js +30 -0
  51. package/dist/backends/gui/dialog.js.map +1 -0
  52. package/dist/backends/gui/dropdown-menu.cjs +168 -0
  53. package/dist/backends/gui/dropdown-menu.d.ts +99 -0
  54. package/dist/backends/gui/dropdown-menu.d.ts.map +1 -0
  55. package/dist/backends/gui/dropdown-menu.js +119 -0
  56. package/dist/backends/gui/dropdown-menu.js.map +1 -0
  57. package/dist/backends/gui/gesture.cjs +74 -0
  58. package/dist/backends/gui/gesture.d.ts +68 -0
  59. package/dist/backends/gui/gesture.d.ts.map +1 -0
  60. package/dist/backends/gui/gesture.js +69 -0
  61. package/dist/backends/gui/gesture.js.map +1 -0
  62. package/dist/backends/gui/index.cjs +134 -0
  63. package/dist/backends/gui/index.d.ts +25 -2
  64. package/dist/backends/gui/index.d.ts.map +1 -0
  65. package/dist/backends/gui/index.js +41 -0
  66. package/dist/backends/gui/index.js.map +1 -0
  67. package/dist/backends/gui/ink.cjs +14 -0
  68. package/dist/backends/gui/ink.d.ts +8 -0
  69. package/dist/backends/gui/ink.d.ts.map +1 -0
  70. package/dist/backends/gui/ink.js +11 -0
  71. package/dist/backends/gui/ink.js.map +1 -0
  72. package/dist/backends/gui/input.cjs +39 -0
  73. package/dist/backends/gui/input.d.ts +20 -0
  74. package/dist/backends/gui/input.d.ts.map +1 -0
  75. package/dist/backends/gui/input.js +37 -0
  76. package/dist/backends/gui/input.js.map +1 -0
  77. package/dist/backends/gui/label.cjs +10 -0
  78. package/dist/backends/gui/label.d.ts +7 -0
  79. package/dist/backends/gui/label.d.ts.map +1 -0
  80. package/dist/backends/gui/label.js +8 -0
  81. package/dist/backends/gui/label.js.map +1 -0
  82. package/dist/backends/gui/popover.cjs +39 -0
  83. package/dist/backends/gui/popover.d.ts +23 -0
  84. package/dist/backends/gui/popover.d.ts.map +1 -0
  85. package/dist/backends/gui/popover.js +33 -0
  86. package/dist/backends/gui/popover.js.map +1 -0
  87. package/dist/backends/gui/progress.cjs +10 -0
  88. package/dist/backends/gui/progress.d.ts +7 -0
  89. package/dist/backends/gui/progress.d.ts.map +1 -0
  90. package/dist/backends/gui/progress.js +8 -0
  91. package/dist/backends/gui/progress.js.map +1 -0
  92. package/dist/backends/gui/resizable.cjs +174 -0
  93. package/dist/backends/gui/resizable.d.ts +54 -0
  94. package/dist/backends/gui/resizable.d.ts.map +1 -0
  95. package/dist/backends/gui/resizable.js +168 -0
  96. package/dist/backends/gui/resizable.js.map +1 -0
  97. package/dist/backends/gui/resizable.logic.cjs +46 -0
  98. package/dist/backends/gui/resizable.logic.d.ts +24 -0
  99. package/dist/backends/gui/resizable.logic.d.ts.map +1 -0
  100. package/dist/backends/gui/resizable.logic.js +43 -0
  101. package/dist/backends/gui/resizable.logic.js.map +1 -0
  102. package/dist/backends/gui/scroll-area.cjs +126 -0
  103. package/dist/backends/gui/scroll-area.d.ts +46 -0
  104. package/dist/backends/gui/scroll-area.d.ts.map +1 -0
  105. package/dist/backends/gui/scroll-area.js +123 -0
  106. package/dist/backends/gui/scroll-area.js.map +1 -0
  107. package/dist/backends/gui/select.cjs +54 -0
  108. package/dist/backends/gui/select.d.ts +31 -0
  109. package/dist/backends/gui/select.d.ts.map +1 -0
  110. package/dist/backends/gui/select.js +43 -0
  111. package/dist/backends/gui/select.js.map +1 -0
  112. package/dist/backends/gui/separator.cjs +10 -0
  113. package/dist/backends/gui/separator.d.ts +11 -0
  114. package/dist/backends/gui/separator.d.ts.map +1 -0
  115. package/dist/backends/gui/separator.js +8 -0
  116. package/dist/backends/gui/separator.js.map +1 -0
  117. package/dist/backends/gui/slider.cjs +13 -0
  118. package/dist/backends/gui/slider.d.ts +7 -0
  119. package/dist/backends/gui/slider.d.ts.map +1 -0
  120. package/dist/backends/gui/slider.js +11 -0
  121. package/dist/backends/gui/slider.js.map +1 -0
  122. package/dist/backends/gui/slot.cjs +10 -0
  123. package/dist/backends/gui/slot.d.ts +7 -0
  124. package/dist/backends/gui/slot.d.ts.map +1 -0
  125. package/dist/backends/gui/slot.js +7 -0
  126. package/dist/backends/gui/slot.js.map +1 -0
  127. package/dist/backends/gui/switch.cjs +13 -0
  128. package/dist/backends/gui/switch.d.ts +7 -0
  129. package/dist/backends/gui/switch.d.ts.map +1 -0
  130. package/dist/backends/gui/switch.js +11 -0
  131. package/dist/backends/gui/switch.js.map +1 -0
  132. package/dist/backends/gui/tabs.cjs +19 -0
  133. package/dist/backends/gui/tabs.d.ts +13 -0
  134. package/dist/backends/gui/tabs.d.ts.map +1 -0
  135. package/dist/backends/gui/tabs.js +14 -0
  136. package/dist/backends/gui/tabs.js.map +1 -0
  137. package/dist/backends/gui/textarea.cjs +58 -0
  138. package/dist/backends/gui/textarea.d.ts +12 -0
  139. package/dist/backends/gui/textarea.d.ts.map +1 -0
  140. package/dist/backends/gui/textarea.js +23 -0
  141. package/dist/backends/gui/textarea.js.map +1 -0
  142. package/dist/backends/gui/toaster.cjs +13 -0
  143. package/dist/backends/gui/toaster.d.ts +29 -0
  144. package/dist/backends/gui/toaster.d.ts.map +1 -0
  145. package/dist/backends/gui/toaster.js +10 -0
  146. package/dist/backends/gui/toaster.js.map +1 -0
  147. package/dist/backends/gui/tooltip.cjs +22 -0
  148. package/dist/backends/gui/tooltip.d.ts +13 -0
  149. package/dist/backends/gui/tooltip.d.ts.map +1 -0
  150. package/dist/backends/gui/tooltip.js +17 -0
  151. package/dist/backends/gui/tooltip.js.map +1 -0
  152. package/dist/canvas.cjs +27 -14
  153. package/dist/canvas.d.ts +1 -0
  154. package/dist/canvas.d.ts.map +1 -0
  155. package/dist/canvas.js +10 -1
  156. package/dist/canvas.js.map +1 -1
  157. package/dist/cd/layout.cjs +143 -0
  158. package/dist/cd/layout.d.ts +1 -0
  159. package/dist/cd/layout.d.ts.map +1 -0
  160. package/dist/cd/layout.js +141 -0
  161. package/dist/cd/layout.js.map +1 -0
  162. package/dist/cd/status.cjs +132 -0
  163. package/dist/cd/status.d.ts +2 -1
  164. package/dist/cd/status.d.ts.map +1 -0
  165. package/dist/cd/status.js +120 -0
  166. package/dist/cd/status.js.map +1 -0
  167. package/dist/cd/time.cjs +60 -0
  168. package/dist/cd/time.d.ts +1 -0
  169. package/dist/cd/time.d.ts.map +1 -0
  170. package/dist/cd/time.js +56 -0
  171. package/dist/cd/time.js.map +1 -0
  172. package/dist/cd/types.cjs +19 -0
  173. package/dist/cd/types.d.ts +1 -0
  174. package/dist/cd/types.d.ts.map +1 -0
  175. package/dist/cd/types.js +19 -0
  176. package/dist/cd/types.js.map +1 -0
  177. package/dist/core/cn.cjs +15 -0
  178. package/dist/core/cn.d.ts +5 -5
  179. package/dist/core/cn.d.ts.map +1 -0
  180. package/dist/core/cn.js +13 -0
  181. package/dist/core/cn.js.map +1 -0
  182. package/dist/core/fonts.cjs +26 -0
  183. package/dist/core/fonts.d.ts +1 -0
  184. package/dist/core/fonts.d.ts.map +1 -0
  185. package/dist/core/fonts.js +24 -0
  186. package/dist/core/fonts.js.map +1 -0
  187. package/dist/core/index.cjs +31 -0
  188. package/dist/core/index.d.ts +4 -3
  189. package/dist/core/index.d.ts.map +1 -0
  190. package/dist/core/index.js +9 -0
  191. package/dist/core/index.js.map +1 -0
  192. package/dist/core/tokens.cjs +35 -0
  193. package/dist/core/tokens.d.ts +1 -0
  194. package/dist/core/tokens.d.ts.map +1 -0
  195. package/dist/core/tokens.js +16 -0
  196. package/dist/core/tokens.js.map +1 -0
  197. package/dist/dashboard.cjs +24 -14
  198. package/dist/dashboard.d.ts +1 -0
  199. package/dist/dashboard.d.ts.map +1 -0
  200. package/dist/dashboard.js +7 -1
  201. package/dist/dashboard.js.map +1 -1
  202. package/dist/data.cjs +28 -14
  203. package/dist/data.d.ts +1 -0
  204. package/dist/data.d.ts.map +1 -0
  205. package/dist/data.js +11 -1
  206. package/dist/data.js.map +1 -1
  207. package/dist/framework/CollectionBuilder.cjs +77 -0
  208. package/dist/framework/CollectionBuilder.d.ts +3 -2
  209. package/dist/framework/CollectionBuilder.d.ts.map +1 -0
  210. package/dist/framework/CollectionBuilder.js +75 -0
  211. package/dist/framework/CollectionBuilder.js.map +1 -0
  212. package/dist/framework/CollectionsBrowser.cjs +107 -0
  213. package/dist/framework/CollectionsBrowser.d.ts +3 -2
  214. package/dist/framework/CollectionsBrowser.d.ts.map +1 -0
  215. package/dist/framework/CollectionsBrowser.js +105 -0
  216. package/dist/framework/CollectionsBrowser.js.map +1 -0
  217. package/dist/framework/DocTypeDetail.cjs +187 -0
  218. package/dist/framework/DocTypeDetail.d.ts +2 -1
  219. package/dist/framework/DocTypeDetail.d.ts.map +1 -0
  220. package/dist/framework/DocTypeDetail.js +185 -0
  221. package/dist/framework/DocTypeDetail.js.map +1 -0
  222. package/dist/framework/DocTypeRecords.cjs +130 -0
  223. package/dist/framework/DocTypeRecords.d.ts +4 -3
  224. package/dist/framework/DocTypeRecords.d.ts.map +1 -0
  225. package/dist/framework/DocTypeRecords.js +128 -0
  226. package/dist/framework/DocTypeRecords.js.map +1 -0
  227. package/dist/framework/MediaGrid.cjs +134 -0
  228. package/dist/framework/MediaGrid.d.ts +4 -3
  229. package/dist/framework/MediaGrid.d.ts.map +1 -0
  230. package/dist/framework/MediaGrid.js +132 -0
  231. package/dist/framework/MediaGrid.js.map +1 -0
  232. package/dist/framework/RecordCards.cjs +47 -0
  233. package/dist/framework/RecordCards.d.ts +1 -0
  234. package/dist/framework/RecordCards.d.ts.map +1 -0
  235. package/dist/framework/RecordCards.js +45 -0
  236. package/dist/framework/RecordCards.js.map +1 -0
  237. package/dist/framework/builder-logic.cjs +169 -0
  238. package/dist/framework/builder-logic.d.ts +2 -1
  239. package/dist/framework/builder-logic.d.ts.map +1 -0
  240. package/dist/framework/builder-logic.js +156 -0
  241. package/dist/framework/builder-logic.js.map +1 -0
  242. package/dist/framework/client.cjs +95 -0
  243. package/dist/framework/client.d.ts +2 -1
  244. package/dist/framework/client.d.ts.map +1 -0
  245. package/dist/framework/client.js +91 -0
  246. package/dist/framework/client.js.map +1 -0
  247. package/dist/framework/core.cjs +36 -212
  248. package/dist/framework/core.d.ts +7 -6
  249. package/dist/framework/core.d.ts.map +1 -0
  250. package/dist/framework/core.js +20 -2
  251. package/dist/framework/core.js.map +1 -1
  252. package/dist/framework/data.cjs +41 -0
  253. package/dist/framework/data.d.ts +3 -2
  254. package/dist/framework/data.d.ts.map +1 -0
  255. package/dist/framework/data.js +38 -0
  256. package/dist/framework/data.js.map +1 -0
  257. package/dist/framework/fields.cjs +358 -0
  258. package/dist/framework/fields.d.ts +2 -1
  259. package/dist/framework/fields.d.ts.map +1 -0
  260. package/dist/framework/fields.js +335 -0
  261. package/dist/framework/fields.js.map +1 -0
  262. package/dist/framework/index.cjs +58 -1339
  263. package/dist/framework/index.d.ts +10 -9
  264. package/dist/framework/index.d.ts.map +1 -0
  265. package/dist/framework/index.js +35 -1117
  266. package/dist/framework/index.js.map +1 -1
  267. package/dist/framework/media.cjs +133 -0
  268. package/dist/framework/media.d.ts +2 -1
  269. package/dist/framework/media.d.ts.map +1 -0
  270. package/dist/framework/media.js +124 -0
  271. package/dist/framework/media.js.map +1 -0
  272. package/dist/framework/parts.cjs +60 -0
  273. package/dist/framework/parts.d.ts +1 -0
  274. package/dist/framework/parts.d.ts.map +1 -0
  275. package/dist/framework/parts.js +51 -0
  276. package/dist/framework/parts.js.map +1 -0
  277. package/dist/framework/responsive.cjs +62 -0
  278. package/dist/framework/responsive.d.ts +1 -0
  279. package/dist/framework/responsive.d.ts.map +1 -0
  280. package/dist/framework/responsive.js +58 -0
  281. package/dist/framework/responsive.js.map +1 -0
  282. package/dist/framework/types.cjs +20 -0
  283. package/dist/framework/types.d.ts +1 -0
  284. package/dist/framework/types.d.ts.map +1 -0
  285. package/dist/framework/types.js +18 -0
  286. package/dist/framework/types.js.map +1 -0
  287. package/dist/gitops.cjs +21 -14
  288. package/dist/gitops.d.ts +1 -0
  289. package/dist/gitops.d.ts.map +1 -0
  290. package/dist/gitops.js +4 -1
  291. package/dist/gitops.js.map +1 -1
  292. package/dist/gui-config.cjs +145 -112
  293. package/dist/gui-config.d.ts +1 -0
  294. package/dist/gui-config.d.ts.map +1 -0
  295. package/dist/gui-config.js +140 -104
  296. package/dist/gui-config.js.map +1 -1
  297. package/dist/index.cjs +40 -1144
  298. package/dist/index.d.ts +3 -2
  299. package/dist/index.d.ts.map +1 -0
  300. package/dist/index.js +23 -1018
  301. package/dist/index.js.map +1 -1
  302. package/dist/models/ModelSelector.cjs +58 -0
  303. package/dist/models/ModelSelector.d.ts +10 -6
  304. package/dist/models/ModelSelector.d.ts.map +1 -0
  305. package/dist/models/ModelSelector.js +56 -0
  306. package/dist/models/ModelSelector.js.map +1 -0
  307. package/dist/models/catalog.cjs +191 -0
  308. package/dist/models/catalog.d.ts +2 -1
  309. package/dist/models/catalog.d.ts.map +1 -0
  310. package/dist/models/catalog.js +185 -0
  311. package/dist/models/catalog.js.map +1 -0
  312. package/dist/models/index.cjs +16 -0
  313. package/dist/models/index.d.ts +6 -5
  314. package/dist/models/index.d.ts.map +1 -0
  315. package/dist/models/index.js +8 -0
  316. package/dist/models/index.js.map +1 -0
  317. package/dist/models/types.cjs +8 -0
  318. package/dist/models/types.d.ts +1 -0
  319. package/dist/models/types.d.ts.map +1 -0
  320. package/dist/models/types.js +8 -0
  321. package/dist/models/types.js.map +1 -0
  322. package/dist/oss/blueprint.cjs +96 -0
  323. package/dist/oss/blueprint.d.ts +1 -0
  324. package/dist/oss/blueprint.d.ts.map +1 -0
  325. package/dist/oss/blueprint.js +94 -0
  326. package/dist/oss/blueprint.js.map +1 -0
  327. package/dist/oss/catalog.cjs +174 -0
  328. package/dist/oss/catalog.d.ts +1 -0
  329. package/dist/oss/catalog.d.ts.map +1 -0
  330. package/dist/oss/catalog.js +165 -0
  331. package/dist/oss/catalog.js.map +1 -0
  332. package/dist/oss.cjs +27 -188
  333. package/dist/oss.d.ts +3 -2
  334. package/dist/oss.d.ts.map +1 -0
  335. package/dist/oss.js +12 -178
  336. package/dist/oss.js.map +1 -1
  337. package/dist/primitives/AspectRatio.cjs +8 -0
  338. package/dist/primitives/AspectRatio.d.ts +2 -1
  339. package/dist/primitives/AspectRatio.d.ts.map +1 -0
  340. package/dist/primitives/AspectRatio.js +5 -0
  341. package/dist/primitives/AspectRatio.js.map +1 -0
  342. package/dist/primitives/Avatar.cjs +8 -0
  343. package/dist/primitives/Avatar.d.ts +2 -1
  344. package/dist/primitives/Avatar.d.ts.map +1 -0
  345. package/dist/primitives/Avatar.js +5 -0
  346. package/dist/primitives/Avatar.js.map +1 -0
  347. package/dist/primitives/AvatarFallback.cjs +8 -0
  348. package/dist/primitives/AvatarFallback.d.ts +2 -1
  349. package/dist/primitives/AvatarFallback.d.ts.map +1 -0
  350. package/dist/primitives/AvatarFallback.js +5 -0
  351. package/dist/primitives/AvatarFallback.js.map +1 -0
  352. package/dist/primitives/AvatarImage.cjs +8 -0
  353. package/dist/primitives/AvatarImage.d.ts +2 -1
  354. package/dist/primitives/AvatarImage.d.ts.map +1 -0
  355. package/dist/primitives/AvatarImage.js +5 -0
  356. package/dist/primitives/AvatarImage.js.map +1 -0
  357. package/dist/primitives/Badge.cjs +8 -0
  358. package/dist/primitives/Badge.d.ts +2 -1
  359. package/dist/primitives/Badge.d.ts.map +1 -0
  360. package/dist/primitives/Badge.js +5 -0
  361. package/dist/primitives/Badge.js.map +1 -0
  362. package/dist/primitives/Button.cjs +8 -0
  363. package/dist/primitives/Button.d.ts +2 -1
  364. package/dist/primitives/Button.d.ts.map +1 -0
  365. package/dist/primitives/Button.js +5 -0
  366. package/dist/primitives/Button.js.map +1 -0
  367. package/dist/primitives/Card.cjs +8 -0
  368. package/dist/primitives/Card.d.ts +2 -1
  369. package/dist/primitives/Card.d.ts.map +1 -0
  370. package/dist/primitives/Card.js +5 -0
  371. package/dist/primitives/Card.js.map +1 -0
  372. package/dist/primitives/CardAction.cjs +8 -0
  373. package/dist/primitives/CardAction.d.ts +2 -1
  374. package/dist/primitives/CardAction.d.ts.map +1 -0
  375. package/dist/primitives/CardAction.js +5 -0
  376. package/dist/primitives/CardAction.js.map +1 -0
  377. package/dist/primitives/CardContent.cjs +8 -0
  378. package/dist/primitives/CardContent.d.ts +2 -1
  379. package/dist/primitives/CardContent.d.ts.map +1 -0
  380. package/dist/primitives/CardContent.js +5 -0
  381. package/dist/primitives/CardContent.js.map +1 -0
  382. package/dist/primitives/CardDescription.cjs +8 -0
  383. package/dist/primitives/CardDescription.d.ts +2 -1
  384. package/dist/primitives/CardDescription.d.ts.map +1 -0
  385. package/dist/primitives/CardDescription.js +5 -0
  386. package/dist/primitives/CardDescription.js.map +1 -0
  387. package/dist/primitives/CardFooter.cjs +8 -0
  388. package/dist/primitives/CardFooter.d.ts +2 -1
  389. package/dist/primitives/CardFooter.d.ts.map +1 -0
  390. package/dist/primitives/CardFooter.js +5 -0
  391. package/dist/primitives/CardFooter.js.map +1 -0
  392. package/dist/primitives/CardHeader.cjs +8 -0
  393. package/dist/primitives/CardHeader.d.ts +2 -1
  394. package/dist/primitives/CardHeader.d.ts.map +1 -0
  395. package/dist/primitives/CardHeader.js +5 -0
  396. package/dist/primitives/CardHeader.js.map +1 -0
  397. package/dist/primitives/CardTitle.cjs +8 -0
  398. package/dist/primitives/CardTitle.d.ts +2 -1
  399. package/dist/primitives/CardTitle.d.ts.map +1 -0
  400. package/dist/primitives/CardTitle.js +5 -0
  401. package/dist/primitives/CardTitle.js.map +1 -0
  402. package/dist/primitives/Checkbox.cjs +8 -0
  403. package/dist/primitives/Checkbox.d.ts +2 -1
  404. package/dist/primitives/Checkbox.d.ts.map +1 -0
  405. package/dist/primitives/Checkbox.js +5 -0
  406. package/dist/primitives/Checkbox.js.map +1 -0
  407. package/dist/primitives/Collapsible.cjs +8 -0
  408. package/dist/primitives/Collapsible.d.ts +2 -1
  409. package/dist/primitives/Collapsible.d.ts.map +1 -0
  410. package/dist/primitives/Collapsible.js +5 -0
  411. package/dist/primitives/Collapsible.js.map +1 -0
  412. package/dist/primitives/CollapsibleContent.cjs +8 -0
  413. package/dist/primitives/CollapsibleContent.d.ts +2 -1
  414. package/dist/primitives/CollapsibleContent.d.ts.map +1 -0
  415. package/dist/primitives/CollapsibleContent.js +5 -0
  416. package/dist/primitives/CollapsibleContent.js.map +1 -0
  417. package/dist/primitives/CollapsibleTrigger.cjs +8 -0
  418. package/dist/primitives/CollapsibleTrigger.d.ts +2 -1
  419. package/dist/primitives/CollapsibleTrigger.d.ts.map +1 -0
  420. package/dist/primitives/CollapsibleTrigger.js +5 -0
  421. package/dist/primitives/CollapsibleTrigger.js.map +1 -0
  422. package/dist/primitives/Command.cjs +8 -0
  423. package/dist/primitives/Command.d.ts +2 -1
  424. package/dist/primitives/Command.d.ts.map +1 -0
  425. package/dist/primitives/Command.js +5 -0
  426. package/dist/primitives/Command.js.map +1 -0
  427. package/dist/primitives/CommandDialog.cjs +8 -0
  428. package/dist/primitives/CommandDialog.d.ts +2 -1
  429. package/dist/primitives/CommandDialog.d.ts.map +1 -0
  430. package/dist/primitives/CommandDialog.js +5 -0
  431. package/dist/primitives/CommandDialog.js.map +1 -0
  432. package/dist/primitives/CommandEmpty.cjs +8 -0
  433. package/dist/primitives/CommandEmpty.d.ts +2 -1
  434. package/dist/primitives/CommandEmpty.d.ts.map +1 -0
  435. package/dist/primitives/CommandEmpty.js +5 -0
  436. package/dist/primitives/CommandEmpty.js.map +1 -0
  437. package/dist/primitives/CommandGroup.cjs +8 -0
  438. package/dist/primitives/CommandGroup.d.ts +2 -1
  439. package/dist/primitives/CommandGroup.d.ts.map +1 -0
  440. package/dist/primitives/CommandGroup.js +5 -0
  441. package/dist/primitives/CommandGroup.js.map +1 -0
  442. package/dist/primitives/CommandInput.cjs +8 -0
  443. package/dist/primitives/CommandInput.d.ts +2 -1
  444. package/dist/primitives/CommandInput.d.ts.map +1 -0
  445. package/dist/primitives/CommandInput.js +5 -0
  446. package/dist/primitives/CommandInput.js.map +1 -0
  447. package/dist/primitives/CommandItem.cjs +8 -0
  448. package/dist/primitives/CommandItem.d.ts +2 -1
  449. package/dist/primitives/CommandItem.d.ts.map +1 -0
  450. package/dist/primitives/CommandItem.js +5 -0
  451. package/dist/primitives/CommandItem.js.map +1 -0
  452. package/dist/primitives/CommandList.cjs +8 -0
  453. package/dist/primitives/CommandList.d.ts +2 -1
  454. package/dist/primitives/CommandList.d.ts.map +1 -0
  455. package/dist/primitives/CommandList.js +5 -0
  456. package/dist/primitives/CommandList.js.map +1 -0
  457. package/dist/primitives/CommandSeparator.cjs +8 -0
  458. package/dist/primitives/CommandSeparator.d.ts +2 -1
  459. package/dist/primitives/CommandSeparator.d.ts.map +1 -0
  460. package/dist/primitives/CommandSeparator.js +5 -0
  461. package/dist/primitives/CommandSeparator.js.map +1 -0
  462. package/dist/primitives/CommandShortcut.cjs +8 -0
  463. package/dist/primitives/CommandShortcut.d.ts +2 -1
  464. package/dist/primitives/CommandShortcut.d.ts.map +1 -0
  465. package/dist/primitives/CommandShortcut.js +5 -0
  466. package/dist/primitives/CommandShortcut.js.map +1 -0
  467. package/dist/primitives/Dialog.cjs +8 -0
  468. package/dist/primitives/Dialog.d.ts +2 -1
  469. package/dist/primitives/Dialog.d.ts.map +1 -0
  470. package/dist/primitives/Dialog.js +5 -0
  471. package/dist/primitives/Dialog.js.map +1 -0
  472. package/dist/primitives/DialogClose.cjs +8 -0
  473. package/dist/primitives/DialogClose.d.ts +2 -1
  474. package/dist/primitives/DialogClose.d.ts.map +1 -0
  475. package/dist/primitives/DialogClose.js +5 -0
  476. package/dist/primitives/DialogClose.js.map +1 -0
  477. package/dist/primitives/DialogContent.cjs +8 -0
  478. package/dist/primitives/DialogContent.d.ts +2 -1
  479. package/dist/primitives/DialogContent.d.ts.map +1 -0
  480. package/dist/primitives/DialogContent.js +5 -0
  481. package/dist/primitives/DialogContent.js.map +1 -0
  482. package/dist/primitives/DialogDescription.cjs +8 -0
  483. package/dist/primitives/DialogDescription.d.ts +2 -1
  484. package/dist/primitives/DialogDescription.d.ts.map +1 -0
  485. package/dist/primitives/DialogDescription.js +5 -0
  486. package/dist/primitives/DialogDescription.js.map +1 -0
  487. package/dist/primitives/DialogFooter.cjs +8 -0
  488. package/dist/primitives/DialogFooter.d.ts +2 -1
  489. package/dist/primitives/DialogFooter.d.ts.map +1 -0
  490. package/dist/primitives/DialogFooter.js +5 -0
  491. package/dist/primitives/DialogFooter.js.map +1 -0
  492. package/dist/primitives/DialogHeader.cjs +8 -0
  493. package/dist/primitives/DialogHeader.d.ts +2 -1
  494. package/dist/primitives/DialogHeader.d.ts.map +1 -0
  495. package/dist/primitives/DialogHeader.js +5 -0
  496. package/dist/primitives/DialogHeader.js.map +1 -0
  497. package/dist/primitives/DialogOverlay.cjs +8 -0
  498. package/dist/primitives/DialogOverlay.d.ts +2 -1
  499. package/dist/primitives/DialogOverlay.d.ts.map +1 -0
  500. package/dist/primitives/DialogOverlay.js +5 -0
  501. package/dist/primitives/DialogOverlay.js.map +1 -0
  502. package/dist/primitives/DialogPortal.cjs +8 -0
  503. package/dist/primitives/DialogPortal.d.ts +2 -1
  504. package/dist/primitives/DialogPortal.d.ts.map +1 -0
  505. package/dist/primitives/DialogPortal.js +5 -0
  506. package/dist/primitives/DialogPortal.js.map +1 -0
  507. package/dist/primitives/DialogTitle.cjs +8 -0
  508. package/dist/primitives/DialogTitle.d.ts +2 -1
  509. package/dist/primitives/DialogTitle.d.ts.map +1 -0
  510. package/dist/primitives/DialogTitle.js +5 -0
  511. package/dist/primitives/DialogTitle.js.map +1 -0
  512. package/dist/primitives/DialogTrigger.cjs +8 -0
  513. package/dist/primitives/DialogTrigger.d.ts +2 -1
  514. package/dist/primitives/DialogTrigger.d.ts.map +1 -0
  515. package/dist/primitives/DialogTrigger.js +5 -0
  516. package/dist/primitives/DialogTrigger.js.map +1 -0
  517. package/dist/primitives/DropdownMenu.cjs +8 -0
  518. package/dist/primitives/DropdownMenu.d.ts +2 -1
  519. package/dist/primitives/DropdownMenu.d.ts.map +1 -0
  520. package/dist/primitives/DropdownMenu.js +5 -0
  521. package/dist/primitives/DropdownMenu.js.map +1 -0
  522. package/dist/primitives/DropdownMenuCheckboxItem.cjs +8 -0
  523. package/dist/primitives/DropdownMenuCheckboxItem.d.ts +2 -1
  524. package/dist/primitives/DropdownMenuCheckboxItem.d.ts.map +1 -0
  525. package/dist/primitives/DropdownMenuCheckboxItem.js +5 -0
  526. package/dist/primitives/DropdownMenuCheckboxItem.js.map +1 -0
  527. package/dist/primitives/DropdownMenuContent.cjs +8 -0
  528. package/dist/primitives/DropdownMenuContent.d.ts +2 -1
  529. package/dist/primitives/DropdownMenuContent.d.ts.map +1 -0
  530. package/dist/primitives/DropdownMenuContent.js +5 -0
  531. package/dist/primitives/DropdownMenuContent.js.map +1 -0
  532. package/dist/primitives/DropdownMenuGroup.cjs +8 -0
  533. package/dist/primitives/DropdownMenuGroup.d.ts +2 -1
  534. package/dist/primitives/DropdownMenuGroup.d.ts.map +1 -0
  535. package/dist/primitives/DropdownMenuGroup.js +5 -0
  536. package/dist/primitives/DropdownMenuGroup.js.map +1 -0
  537. package/dist/primitives/DropdownMenuItem.cjs +8 -0
  538. package/dist/primitives/DropdownMenuItem.d.ts +2 -1
  539. package/dist/primitives/DropdownMenuItem.d.ts.map +1 -0
  540. package/dist/primitives/DropdownMenuItem.js +5 -0
  541. package/dist/primitives/DropdownMenuItem.js.map +1 -0
  542. package/dist/primitives/DropdownMenuLabel.cjs +8 -0
  543. package/dist/primitives/DropdownMenuLabel.d.ts +2 -1
  544. package/dist/primitives/DropdownMenuLabel.d.ts.map +1 -0
  545. package/dist/primitives/DropdownMenuLabel.js +5 -0
  546. package/dist/primitives/DropdownMenuLabel.js.map +1 -0
  547. package/dist/primitives/DropdownMenuPortal.cjs +8 -0
  548. package/dist/primitives/DropdownMenuPortal.d.ts +2 -1
  549. package/dist/primitives/DropdownMenuPortal.d.ts.map +1 -0
  550. package/dist/primitives/DropdownMenuPortal.js +5 -0
  551. package/dist/primitives/DropdownMenuPortal.js.map +1 -0
  552. package/dist/primitives/DropdownMenuRadioGroup.cjs +8 -0
  553. package/dist/primitives/DropdownMenuRadioGroup.d.ts +2 -1
  554. package/dist/primitives/DropdownMenuRadioGroup.d.ts.map +1 -0
  555. package/dist/primitives/DropdownMenuRadioGroup.js +5 -0
  556. package/dist/primitives/DropdownMenuRadioGroup.js.map +1 -0
  557. package/dist/primitives/DropdownMenuRadioItem.cjs +8 -0
  558. package/dist/primitives/DropdownMenuRadioItem.d.ts +2 -1
  559. package/dist/primitives/DropdownMenuRadioItem.d.ts.map +1 -0
  560. package/dist/primitives/DropdownMenuRadioItem.js +5 -0
  561. package/dist/primitives/DropdownMenuRadioItem.js.map +1 -0
  562. package/dist/primitives/DropdownMenuSeparator.cjs +8 -0
  563. package/dist/primitives/DropdownMenuSeparator.d.ts +2 -1
  564. package/dist/primitives/DropdownMenuSeparator.d.ts.map +1 -0
  565. package/dist/primitives/DropdownMenuSeparator.js +5 -0
  566. package/dist/primitives/DropdownMenuSeparator.js.map +1 -0
  567. package/dist/primitives/DropdownMenuShortcut.cjs +8 -0
  568. package/dist/primitives/DropdownMenuShortcut.d.ts +2 -1
  569. package/dist/primitives/DropdownMenuShortcut.d.ts.map +1 -0
  570. package/dist/primitives/DropdownMenuShortcut.js +5 -0
  571. package/dist/primitives/DropdownMenuShortcut.js.map +1 -0
  572. package/dist/primitives/DropdownMenuSub.cjs +8 -0
  573. package/dist/primitives/DropdownMenuSub.d.ts +2 -1
  574. package/dist/primitives/DropdownMenuSub.d.ts.map +1 -0
  575. package/dist/primitives/DropdownMenuSub.js +5 -0
  576. package/dist/primitives/DropdownMenuSub.js.map +1 -0
  577. package/dist/primitives/DropdownMenuSubContent.cjs +8 -0
  578. package/dist/primitives/DropdownMenuSubContent.d.ts +2 -1
  579. package/dist/primitives/DropdownMenuSubContent.d.ts.map +1 -0
  580. package/dist/primitives/DropdownMenuSubContent.js +5 -0
  581. package/dist/primitives/DropdownMenuSubContent.js.map +1 -0
  582. package/dist/primitives/DropdownMenuSubTrigger.cjs +8 -0
  583. package/dist/primitives/DropdownMenuSubTrigger.d.ts +2 -1
  584. package/dist/primitives/DropdownMenuSubTrigger.d.ts.map +1 -0
  585. package/dist/primitives/DropdownMenuSubTrigger.js +5 -0
  586. package/dist/primitives/DropdownMenuSubTrigger.js.map +1 -0
  587. package/dist/primitives/DropdownMenuTrigger.cjs +8 -0
  588. package/dist/primitives/DropdownMenuTrigger.d.ts +2 -1
  589. package/dist/primitives/DropdownMenuTrigger.d.ts.map +1 -0
  590. package/dist/primitives/DropdownMenuTrigger.js +5 -0
  591. package/dist/primitives/DropdownMenuTrigger.js.map +1 -0
  592. package/dist/primitives/Input.cjs +8 -0
  593. package/dist/primitives/Input.d.ts +2 -1
  594. package/dist/primitives/Input.d.ts.map +1 -0
  595. package/dist/primitives/Input.js +5 -0
  596. package/dist/primitives/Input.js.map +1 -0
  597. package/dist/primitives/Label.cjs +8 -0
  598. package/dist/primitives/Label.d.ts +2 -1
  599. package/dist/primitives/Label.d.ts.map +1 -0
  600. package/dist/primitives/Label.js +5 -0
  601. package/dist/primitives/Label.js.map +1 -0
  602. package/dist/primitives/Popover.cjs +8 -0
  603. package/dist/primitives/Popover.d.ts +2 -1
  604. package/dist/primitives/Popover.d.ts.map +1 -0
  605. package/dist/primitives/Popover.js +5 -0
  606. package/dist/primitives/Popover.js.map +1 -0
  607. package/dist/primitives/PopoverAnchor.cjs +8 -0
  608. package/dist/primitives/PopoverAnchor.d.ts +2 -1
  609. package/dist/primitives/PopoverAnchor.d.ts.map +1 -0
  610. package/dist/primitives/PopoverAnchor.js +5 -0
  611. package/dist/primitives/PopoverAnchor.js.map +1 -0
  612. package/dist/primitives/PopoverClose.cjs +8 -0
  613. package/dist/primitives/PopoverClose.d.ts +2 -0
  614. package/dist/primitives/PopoverClose.d.ts.map +1 -0
  615. package/dist/primitives/PopoverClose.js +5 -0
  616. package/dist/primitives/PopoverClose.js.map +1 -0
  617. package/dist/primitives/PopoverContent.cjs +8 -0
  618. package/dist/primitives/PopoverContent.d.ts +2 -1
  619. package/dist/primitives/PopoverContent.d.ts.map +1 -0
  620. package/dist/primitives/PopoverContent.js +5 -0
  621. package/dist/primitives/PopoverContent.js.map +1 -0
  622. package/dist/primitives/PopoverTrigger.cjs +8 -0
  623. package/dist/primitives/PopoverTrigger.d.ts +2 -1
  624. package/dist/primitives/PopoverTrigger.d.ts.map +1 -0
  625. package/dist/primitives/PopoverTrigger.js +5 -0
  626. package/dist/primitives/PopoverTrigger.js.map +1 -0
  627. package/dist/primitives/Progress.cjs +8 -0
  628. package/dist/primitives/Progress.d.ts +2 -1
  629. package/dist/primitives/Progress.d.ts.map +1 -0
  630. package/dist/primitives/Progress.js +5 -0
  631. package/dist/primitives/Progress.js.map +1 -0
  632. package/dist/primitives/ResizableHandle.cjs +8 -0
  633. package/dist/primitives/ResizableHandle.d.ts +2 -0
  634. package/dist/primitives/ResizableHandle.d.ts.map +1 -0
  635. package/dist/primitives/ResizableHandle.js +5 -0
  636. package/dist/primitives/ResizableHandle.js.map +1 -0
  637. package/dist/primitives/ResizablePanel.cjs +8 -0
  638. package/dist/primitives/ResizablePanel.d.ts +2 -0
  639. package/dist/primitives/ResizablePanel.d.ts.map +1 -0
  640. package/dist/primitives/ResizablePanel.js +5 -0
  641. package/dist/primitives/ResizablePanel.js.map +1 -0
  642. package/dist/primitives/ResizablePanelGroup.cjs +8 -0
  643. package/dist/primitives/ResizablePanelGroup.d.ts +2 -0
  644. package/dist/primitives/ResizablePanelGroup.d.ts.map +1 -0
  645. package/dist/primitives/ResizablePanelGroup.js +5 -0
  646. package/dist/primitives/ResizablePanelGroup.js.map +1 -0
  647. package/dist/primitives/ScrollArea.cjs +8 -0
  648. package/dist/primitives/ScrollArea.d.ts +2 -1
  649. package/dist/primitives/ScrollArea.d.ts.map +1 -0
  650. package/dist/primitives/ScrollArea.js +5 -0
  651. package/dist/primitives/ScrollArea.js.map +1 -0
  652. package/dist/primitives/ScrollBar.cjs +8 -0
  653. package/dist/primitives/ScrollBar.d.ts +2 -1
  654. package/dist/primitives/ScrollBar.d.ts.map +1 -0
  655. package/dist/primitives/ScrollBar.js +5 -0
  656. package/dist/primitives/ScrollBar.js.map +1 -0
  657. package/dist/primitives/Select.cjs +8 -0
  658. package/dist/primitives/Select.d.ts +2 -1
  659. package/dist/primitives/Select.d.ts.map +1 -0
  660. package/dist/primitives/Select.js +5 -0
  661. package/dist/primitives/Select.js.map +1 -0
  662. package/dist/primitives/SelectContent.cjs +8 -0
  663. package/dist/primitives/SelectContent.d.ts +2 -1
  664. package/dist/primitives/SelectContent.d.ts.map +1 -0
  665. package/dist/primitives/SelectContent.js +5 -0
  666. package/dist/primitives/SelectContent.js.map +1 -0
  667. package/dist/primitives/SelectGroup.cjs +8 -0
  668. package/dist/primitives/SelectGroup.d.ts +2 -1
  669. package/dist/primitives/SelectGroup.d.ts.map +1 -0
  670. package/dist/primitives/SelectGroup.js +5 -0
  671. package/dist/primitives/SelectGroup.js.map +1 -0
  672. package/dist/primitives/SelectItem.cjs +8 -0
  673. package/dist/primitives/SelectItem.d.ts +2 -1
  674. package/dist/primitives/SelectItem.d.ts.map +1 -0
  675. package/dist/primitives/SelectItem.js +5 -0
  676. package/dist/primitives/SelectItem.js.map +1 -0
  677. package/dist/primitives/SelectLabel.cjs +8 -0
  678. package/dist/primitives/SelectLabel.d.ts +2 -1
  679. package/dist/primitives/SelectLabel.d.ts.map +1 -0
  680. package/dist/primitives/SelectLabel.js +5 -0
  681. package/dist/primitives/SelectLabel.js.map +1 -0
  682. package/dist/primitives/SelectScrollDownButton.cjs +8 -0
  683. package/dist/primitives/SelectScrollDownButton.d.ts +2 -1
  684. package/dist/primitives/SelectScrollDownButton.d.ts.map +1 -0
  685. package/dist/primitives/SelectScrollDownButton.js +5 -0
  686. package/dist/primitives/SelectScrollDownButton.js.map +1 -0
  687. package/dist/primitives/SelectScrollUpButton.cjs +8 -0
  688. package/dist/primitives/SelectScrollUpButton.d.ts +2 -1
  689. package/dist/primitives/SelectScrollUpButton.d.ts.map +1 -0
  690. package/dist/primitives/SelectScrollUpButton.js +5 -0
  691. package/dist/primitives/SelectScrollUpButton.js.map +1 -0
  692. package/dist/primitives/SelectSeparator.cjs +8 -0
  693. package/dist/primitives/SelectSeparator.d.ts +2 -1
  694. package/dist/primitives/SelectSeparator.d.ts.map +1 -0
  695. package/dist/primitives/SelectSeparator.js +5 -0
  696. package/dist/primitives/SelectSeparator.js.map +1 -0
  697. package/dist/primitives/SelectTrigger.cjs +8 -0
  698. package/dist/primitives/SelectTrigger.d.ts +2 -1
  699. package/dist/primitives/SelectTrigger.d.ts.map +1 -0
  700. package/dist/primitives/SelectTrigger.js +5 -0
  701. package/dist/primitives/SelectTrigger.js.map +1 -0
  702. package/dist/primitives/SelectValue.cjs +8 -0
  703. package/dist/primitives/SelectValue.d.ts +2 -1
  704. package/dist/primitives/SelectValue.d.ts.map +1 -0
  705. package/dist/primitives/SelectValue.js +5 -0
  706. package/dist/primitives/SelectValue.js.map +1 -0
  707. package/dist/primitives/Separator.cjs +8 -0
  708. package/dist/primitives/Separator.d.ts +2 -1
  709. package/dist/primitives/Separator.d.ts.map +1 -0
  710. package/dist/primitives/Separator.js +5 -0
  711. package/dist/primitives/Separator.js.map +1 -0
  712. package/dist/primitives/Slider.cjs +8 -0
  713. package/dist/primitives/Slider.d.ts +2 -1
  714. package/dist/primitives/Slider.d.ts.map +1 -0
  715. package/dist/primitives/Slider.js +5 -0
  716. package/dist/primitives/Slider.js.map +1 -0
  717. package/dist/primitives/Switch.cjs +8 -0
  718. package/dist/primitives/Switch.d.ts +2 -1
  719. package/dist/primitives/Switch.d.ts.map +1 -0
  720. package/dist/primitives/Switch.js +5 -0
  721. package/dist/primitives/Switch.js.map +1 -0
  722. package/dist/primitives/Tabs.cjs +8 -0
  723. package/dist/primitives/Tabs.d.ts +2 -1
  724. package/dist/primitives/Tabs.d.ts.map +1 -0
  725. package/dist/primitives/Tabs.js +5 -0
  726. package/dist/primitives/Tabs.js.map +1 -0
  727. package/dist/primitives/TabsContent.cjs +8 -0
  728. package/dist/primitives/TabsContent.d.ts +2 -1
  729. package/dist/primitives/TabsContent.d.ts.map +1 -0
  730. package/dist/primitives/TabsContent.js +5 -0
  731. package/dist/primitives/TabsContent.js.map +1 -0
  732. package/dist/primitives/TabsList.cjs +8 -0
  733. package/dist/primitives/TabsList.d.ts +2 -1
  734. package/dist/primitives/TabsList.d.ts.map +1 -0
  735. package/dist/primitives/TabsList.js +5 -0
  736. package/dist/primitives/TabsList.js.map +1 -0
  737. package/dist/primitives/TabsTrigger.cjs +8 -0
  738. package/dist/primitives/TabsTrigger.d.ts +2 -1
  739. package/dist/primitives/TabsTrigger.d.ts.map +1 -0
  740. package/dist/primitives/TabsTrigger.js +5 -0
  741. package/dist/primitives/TabsTrigger.js.map +1 -0
  742. package/dist/primitives/Textarea.cjs +8 -0
  743. package/dist/primitives/Textarea.d.ts +2 -1
  744. package/dist/primitives/Textarea.d.ts.map +1 -0
  745. package/dist/primitives/Textarea.js +5 -0
  746. package/dist/primitives/Textarea.js.map +1 -0
  747. package/dist/primitives/Toaster.cjs +8 -0
  748. package/dist/primitives/Toaster.d.ts +2 -1
  749. package/dist/primitives/Toaster.d.ts.map +1 -0
  750. package/dist/primitives/Toaster.js +5 -0
  751. package/dist/primitives/Toaster.js.map +1 -0
  752. package/dist/primitives/Tooltip.cjs +8 -0
  753. package/dist/primitives/Tooltip.d.ts +2 -1
  754. package/dist/primitives/Tooltip.d.ts.map +1 -0
  755. package/dist/primitives/Tooltip.js +5 -0
  756. package/dist/primitives/Tooltip.js.map +1 -0
  757. package/dist/primitives/TooltipContent.cjs +8 -0
  758. package/dist/primitives/TooltipContent.d.ts +2 -1
  759. package/dist/primitives/TooltipContent.d.ts.map +1 -0
  760. package/dist/primitives/TooltipContent.js +5 -0
  761. package/dist/primitives/TooltipContent.js.map +1 -0
  762. package/dist/primitives/TooltipProvider.cjs +8 -0
  763. package/dist/primitives/TooltipProvider.d.ts +2 -1
  764. package/dist/primitives/TooltipProvider.d.ts.map +1 -0
  765. package/dist/primitives/TooltipProvider.js +5 -0
  766. package/dist/primitives/TooltipProvider.js.map +1 -0
  767. package/dist/primitives/TooltipTrigger.cjs +8 -0
  768. package/dist/primitives/TooltipTrigger.d.ts +2 -1
  769. package/dist/primitives/TooltipTrigger.d.ts.map +1 -0
  770. package/dist/primitives/TooltipTrigger.js +5 -0
  771. package/dist/primitives/TooltipTrigger.js.map +1 -0
  772. package/dist/primitives/badgeVariants.cjs +8 -0
  773. package/dist/primitives/badgeVariants.d.ts +2 -1
  774. package/dist/primitives/badgeVariants.d.ts.map +1 -0
  775. package/dist/primitives/badgeVariants.js +5 -0
  776. package/dist/primitives/badgeVariants.js.map +1 -0
  777. package/dist/primitives/bases/data/index.cjs +28 -14
  778. package/dist/primitives/bases/data/index.d.ts +1 -0
  779. package/dist/primitives/bases/data/index.d.ts.map +1 -0
  780. package/dist/primitives/bases/data/index.js +11 -1
  781. package/dist/primitives/bases/data/index.js.map +1 -1
  782. package/dist/primitives/buttonVariants.cjs +8 -0
  783. package/dist/primitives/buttonVariants.d.ts +2 -1
  784. package/dist/primitives/buttonVariants.d.ts.map +1 -0
  785. package/dist/primitives/buttonVariants.js +5 -0
  786. package/dist/primitives/buttonVariants.js.map +1 -0
  787. package/dist/primitives/index.cjs +20 -0
  788. package/dist/primitives/index.d.ts +2 -1
  789. package/dist/primitives/index.d.ts.map +1 -0
  790. package/dist/primitives/index.js +5 -0
  791. package/dist/primitives/index.js.map +1 -0
  792. package/dist/primitives/toast.cjs +8 -0
  793. package/dist/primitives/toast.d.ts +2 -1
  794. package/dist/primitives/toast.d.ts.map +1 -0
  795. package/dist/primitives/toast.js +5 -0
  796. package/dist/primitives/toast.js.map +1 -0
  797. package/dist/product/AnimatedLogo.cjs +102 -0
  798. package/dist/product/AnimatedLogo.d.ts +2 -1
  799. package/dist/product/AnimatedLogo.d.ts.map +1 -0
  800. package/dist/product/AnimatedLogo.js +100 -0
  801. package/dist/product/AnimatedLogo.js.map +1 -0
  802. package/dist/product/AppHeader.cjs +55 -0
  803. package/dist/product/AppHeader.d.ts +2 -1
  804. package/dist/product/AppHeader.d.ts.map +1 -0
  805. package/dist/product/AppHeader.js +53 -0
  806. package/dist/product/AppHeader.js.map +1 -0
  807. package/dist/product/BackendState.cjs +80 -0
  808. package/dist/product/BackendState.d.ts +1 -0
  809. package/dist/product/BackendState.d.ts.map +1 -0
  810. package/dist/product/BackendState.js +76 -0
  811. package/dist/product/BackendState.js.map +1 -0
  812. package/dist/product/BrandMark.cjs +19 -0
  813. package/dist/product/BrandMark.d.ts +1 -0
  814. package/dist/product/BrandMark.d.ts.map +1 -0
  815. package/dist/product/BrandMark.js +17 -0
  816. package/dist/product/BrandMark.js.map +1 -0
  817. package/dist/product/Charts.cjs +243 -0
  818. package/dist/product/Charts.d.ts +1 -0
  819. package/dist/product/Charts.d.ts.map +1 -0
  820. package/dist/product/Charts.js +235 -0
  821. package/dist/product/Charts.js.map +1 -0
  822. package/dist/product/ComboBox.cjs +44 -0
  823. package/dist/product/ComboBox.d.ts +3 -2
  824. package/dist/product/ComboBox.d.ts.map +1 -0
  825. package/dist/product/ComboBox.js +42 -0
  826. package/dist/product/ComboBox.js.map +1 -0
  827. package/dist/product/CommerceResource.cjs +39 -0
  828. package/dist/product/CommerceResource.d.ts +2 -1
  829. package/dist/product/CommerceResource.d.ts.map +1 -0
  830. package/dist/product/CommerceResource.js +37 -0
  831. package/dist/product/CommerceResource.js.map +1 -0
  832. package/dist/product/ConfirmDelete.cjs +42 -0
  833. package/dist/product/ConfirmDelete.d.ts +1 -0
  834. package/dist/product/ConfirmDelete.d.ts.map +1 -0
  835. package/dist/product/ConfirmDelete.js +40 -0
  836. package/dist/product/ConfirmDelete.js.map +1 -0
  837. package/dist/product/DataTable.cjs +58 -0
  838. package/dist/product/DataTable.d.ts +1 -0
  839. package/dist/product/DataTable.d.ts.map +1 -0
  840. package/dist/product/DataTable.js +56 -0
  841. package/dist/product/DataTable.js.map +1 -0
  842. package/dist/product/Donut.cjs +25 -0
  843. package/dist/product/Donut.d.ts +1 -0
  844. package/dist/product/Donut.d.ts.map +1 -0
  845. package/dist/product/Donut.js +23 -0
  846. package/dist/product/Donut.js.map +1 -0
  847. package/dist/product/EmptyState.cjs +30 -0
  848. package/dist/product/EmptyState.d.ts +2 -1
  849. package/dist/product/EmptyState.d.ts.map +1 -0
  850. package/dist/product/EmptyState.js +28 -0
  851. package/dist/product/EmptyState.js.map +1 -0
  852. package/dist/product/FadeIn.cjs +9 -0
  853. package/dist/product/FadeIn.d.ts +1 -0
  854. package/dist/product/FadeIn.d.ts.map +1 -0
  855. package/dist/product/FadeIn.js +7 -0
  856. package/dist/product/FadeIn.js.map +1 -0
  857. package/dist/product/Field.cjs +111 -0
  858. package/dist/product/Field.d.ts +1 -0
  859. package/dist/product/Field.d.ts.map +1 -0
  860. package/dist/product/Field.js +104 -0
  861. package/dist/product/Field.js.map +1 -0
  862. package/dist/product/Filters.cjs +31 -0
  863. package/dist/product/Filters.d.ts +1 -0
  864. package/dist/product/Filters.d.ts.map +1 -0
  865. package/dist/product/Filters.js +28 -0
  866. package/dist/product/Filters.js.map +1 -0
  867. package/dist/product/HanzoMark.cjs +16 -0
  868. package/dist/product/HanzoMark.d.ts +1 -0
  869. package/dist/product/HanzoMark.d.ts.map +1 -0
  870. package/dist/product/HanzoMark.js +14 -0
  871. package/dist/product/HanzoMark.js.map +1 -0
  872. package/dist/product/Metric.cjs +96 -0
  873. package/dist/product/Metric.d.ts +1 -0
  874. package/dist/product/Metric.d.ts.map +1 -0
  875. package/dist/product/Metric.js +85 -0
  876. package/dist/product/Metric.js.map +1 -0
  877. package/dist/product/OrgMark.cjs +50 -0
  878. package/dist/product/OrgMark.d.ts +2 -1
  879. package/dist/product/OrgMark.d.ts.map +1 -0
  880. package/dist/product/OrgMark.js +47 -0
  881. package/dist/product/OrgMark.js.map +1 -0
  882. package/dist/product/OrgSwitcher.cjs +140 -0
  883. package/dist/product/OrgSwitcher.d.ts +2 -1
  884. package/dist/product/OrgSwitcher.d.ts.map +1 -0
  885. package/dist/product/OrgSwitcher.js +138 -0
  886. package/dist/product/OrgSwitcher.js.map +1 -0
  887. package/dist/product/PageHeader.cjs +15 -0
  888. package/dist/product/PageHeader.d.ts +1 -0
  889. package/dist/product/PageHeader.d.ts.map +1 -0
  890. package/dist/product/PageHeader.js +13 -0
  891. package/dist/product/PageHeader.js.map +1 -0
  892. package/dist/product/PrimaryButton.cjs +31 -0
  893. package/dist/product/PrimaryButton.d.ts +1 -0
  894. package/dist/product/PrimaryButton.d.ts.map +1 -0
  895. package/dist/product/PrimaryButton.js +29 -0
  896. package/dist/product/PrimaryButton.js.map +1 -0
  897. package/dist/product/ProductIcon.cjs +36 -0
  898. package/dist/product/ProductIcon.d.ts +2 -1
  899. package/dist/product/ProductIcon.d.ts.map +1 -0
  900. package/dist/product/ProductIcon.js +34 -0
  901. package/dist/product/ProductIcon.js.map +1 -0
  902. package/dist/product/ProviderLogo.cjs +84 -0
  903. package/dist/product/ProviderLogo.d.ts +1 -0
  904. package/dist/product/ProviderLogo.d.ts.map +1 -0
  905. package/dist/product/ProviderLogo.js +81 -0
  906. package/dist/product/ProviderLogo.js.map +1 -0
  907. package/dist/product/Reorder.cjs +82 -0
  908. package/dist/product/Reorder.d.ts +1 -0
  909. package/dist/product/Reorder.d.ts.map +1 -0
  910. package/dist/product/Reorder.js +78 -0
  911. package/dist/product/Reorder.js.map +1 -0
  912. package/dist/product/SelectMenu.cjs +19 -0
  913. package/dist/product/SelectMenu.d.ts +1 -0
  914. package/dist/product/SelectMenu.d.ts.map +1 -0
  915. package/dist/product/SelectMenu.js +17 -0
  916. package/dist/product/SelectMenu.js.map +1 -0
  917. package/dist/product/SiteFooter.cjs +17 -0
  918. package/dist/product/SiteFooter.d.ts +2 -1
  919. package/dist/product/SiteFooter.d.ts.map +1 -0
  920. package/dist/product/SiteFooter.js +15 -0
  921. package/dist/product/SiteFooter.js.map +1 -0
  922. package/dist/product/SiteNav.cjs +124 -0
  923. package/dist/product/SiteNav.d.ts +1 -0
  924. package/dist/product/SiteNav.d.ts.map +1 -0
  925. package/dist/product/SiteNav.js +122 -0
  926. package/dist/product/SiteNav.js.map +1 -0
  927. package/dist/product/SlideOver.cjs +129 -0
  928. package/dist/product/SlideOver.d.ts +2 -1
  929. package/dist/product/SlideOver.d.ts.map +1 -0
  930. package/dist/product/SlideOver.js +126 -0
  931. package/dist/product/SlideOver.js.map +1 -0
  932. package/dist/product/StatusTag.cjs +49 -0
  933. package/dist/product/StatusTag.d.ts +1 -0
  934. package/dist/product/StatusTag.d.ts.map +1 -0
  935. package/dist/product/StatusTag.js +47 -0
  936. package/dist/product/StatusTag.js.map +1 -0
  937. package/dist/product/ThemeToggle.cjs +120 -0
  938. package/dist/product/ThemeToggle.d.ts +1 -0
  939. package/dist/product/ThemeToggle.d.ts.map +1 -0
  940. package/dist/product/ThemeToggle.js +84 -0
  941. package/dist/product/ThemeToggle.js.map +1 -0
  942. package/dist/product/ThemeToggleNext.cjs +20 -0
  943. package/dist/product/ThemeToggleNext.d.ts +2 -1
  944. package/dist/product/ThemeToggleNext.d.ts.map +1 -0
  945. package/dist/product/ThemeToggleNext.js +19 -0
  946. package/dist/product/ThemeToggleNext.js.map +1 -0
  947. package/dist/product/Toast.cjs +90 -0
  948. package/dist/product/Toast.d.ts +1 -0
  949. package/dist/product/Toast.d.ts.map +1 -0
  950. package/dist/product/Toast.js +87 -0
  951. package/dist/product/Toast.js.map +1 -0
  952. package/dist/product/accent.cjs +97 -0
  953. package/dist/product/accent.d.ts +1 -0
  954. package/dist/product/accent.d.ts.map +1 -0
  955. package/dist/product/accent.js +90 -0
  956. package/dist/product/accent.js.map +1 -0
  957. package/dist/product/animatedLogo.logic.cjs +52 -0
  958. package/dist/product/animatedLogo.logic.d.ts +1 -0
  959. package/dist/product/animatedLogo.logic.d.ts.map +1 -0
  960. package/dist/product/animatedLogo.logic.js +47 -0
  961. package/dist/product/animatedLogo.logic.js.map +1 -0
  962. package/dist/product/brand.cjs +91 -0
  963. package/dist/product/brand.d.ts +1 -0
  964. package/dist/product/brand.d.ts.map +1 -0
  965. package/dist/product/brand.js +88 -0
  966. package/dist/product/brand.js.map +1 -0
  967. package/dist/product/color.cjs +6 -0
  968. package/dist/product/color.d.ts +1 -0
  969. package/dist/product/color.d.ts.map +1 -0
  970. package/dist/product/color.js +3 -0
  971. package/dist/product/color.js.map +1 -0
  972. package/dist/product/combobox/filter.cjs +31 -0
  973. package/dist/product/combobox/filter.d.ts +1 -0
  974. package/dist/product/combobox/filter.d.ts.map +1 -0
  975. package/dist/product/combobox/filter.js +28 -0
  976. package/dist/product/combobox/filter.js.map +1 -0
  977. package/dist/product/host.cjs +20 -0
  978. package/dist/product/host.d.ts +1 -0
  979. package/dist/product/host.d.ts.map +1 -0
  980. package/dist/product/host.js +16 -0
  981. package/dist/product/host.js.map +1 -0
  982. package/dist/product/index.cjs +120 -2240
  983. package/dist/product/index.d.ts +43 -41
  984. package/dist/product/index.d.ts.map +1 -0
  985. package/dist/product/index.js +88 -1912
  986. package/dist/product/index.js.map +1 -1
  987. package/dist/product/instrument.cjs +79 -0
  988. package/dist/product/instrument.d.ts +1 -0
  989. package/dist/product/instrument.d.ts.map +1 -0
  990. package/dist/product/instrument.js +72 -0
  991. package/dist/product/instrument.js.map +1 -0
  992. package/dist/product/menu/ContextMenu.cjs +26 -0
  993. package/dist/product/menu/ContextMenu.d.ts +2 -1
  994. package/dist/product/menu/ContextMenu.d.ts.map +1 -0
  995. package/dist/product/menu/ContextMenu.js +24 -0
  996. package/dist/product/menu/ContextMenu.js.map +1 -0
  997. package/dist/product/menu/FloatingMenu.cjs +87 -0
  998. package/dist/product/menu/FloatingMenu.d.ts +1 -0
  999. package/dist/product/menu/FloatingMenu.d.ts.map +1 -0
  1000. package/dist/product/menu/FloatingMenu.js +85 -0
  1001. package/dist/product/menu/FloatingMenu.js.map +1 -0
  1002. package/dist/product/menu/index.cjs +30 -0
  1003. package/dist/product/menu/index.d.ts +6 -5
  1004. package/dist/product/menu/index.d.ts.map +1 -0
  1005. package/dist/product/menu/index.js +19 -0
  1006. package/dist/product/menu/index.js.map +1 -0
  1007. package/dist/product/menu/items.cjs +92 -0
  1008. package/dist/product/menu/items.d.ts +2 -1
  1009. package/dist/product/menu/items.d.ts.map +1 -0
  1010. package/dist/product/menu/items.js +85 -0
  1011. package/dist/product/menu/items.js.map +1 -0
  1012. package/dist/product/menu/portal-theme.cjs +13 -0
  1013. package/dist/product/menu/portal-theme.d.ts +1 -0
  1014. package/dist/product/menu/portal-theme.d.ts.map +1 -0
  1015. package/dist/product/menu/portal-theme.js +12 -0
  1016. package/dist/product/menu/portal-theme.js.map +1 -0
  1017. package/dist/product/menu/roving.cjs +31 -0
  1018. package/dist/product/menu/roving.d.ts +1 -0
  1019. package/dist/product/menu/roving.d.ts.map +1 -0
  1020. package/dist/product/menu/roving.js +29 -0
  1021. package/dist/product/menu/roving.js.map +1 -0
  1022. package/dist/product/scope.cjs +102 -0
  1023. package/dist/product/scope.d.ts +1 -0
  1024. package/dist/product/scope.d.ts.map +1 -0
  1025. package/dist/product/scope.js +99 -0
  1026. package/dist/product/scope.js.map +1 -0
  1027. package/dist/product/social/CampaignCard.cjs +17 -0
  1028. package/dist/product/social/CampaignCard.d.ts +1 -0
  1029. package/dist/product/social/CampaignCard.d.ts.map +1 -0
  1030. package/dist/product/social/CampaignCard.js +15 -0
  1031. package/dist/product/social/CampaignCard.js.map +1 -0
  1032. package/dist/product/social/ChannelBadge.cjs +24 -0
  1033. package/dist/product/social/ChannelBadge.d.ts +2 -1
  1034. package/dist/product/social/ChannelBadge.d.ts.map +1 -0
  1035. package/dist/product/social/ChannelBadge.js +22 -0
  1036. package/dist/product/social/ChannelBadge.js.map +1 -0
  1037. package/dist/product/social/PostAgenda.cjs +40 -0
  1038. package/dist/product/social/PostAgenda.d.ts +2 -1
  1039. package/dist/product/social/PostAgenda.d.ts.map +1 -0
  1040. package/dist/product/social/PostAgenda.js +38 -0
  1041. package/dist/product/social/PostAgenda.js.map +1 -0
  1042. package/dist/product/social/PostCard.cjs +19 -0
  1043. package/dist/product/social/PostCard.d.ts +2 -1
  1044. package/dist/product/social/PostCard.d.ts.map +1 -0
  1045. package/dist/product/social/PostCard.js +17 -0
  1046. package/dist/product/social/PostCard.js.map +1 -0
  1047. package/dist/product/social/PostComposer.cjs +64 -0
  1048. package/dist/product/social/PostComposer.d.ts +2 -1
  1049. package/dist/product/social/PostComposer.d.ts.map +1 -0
  1050. package/dist/product/social/PostComposer.js +61 -0
  1051. package/dist/product/social/PostComposer.js.map +1 -0
  1052. package/dist/product/social/ProviderReadinessList.cjs +16 -0
  1053. package/dist/product/social/ProviderReadinessList.d.ts +2 -1
  1054. package/dist/product/social/ProviderReadinessList.d.ts.map +1 -0
  1055. package/dist/product/social/ProviderReadinessList.js +14 -0
  1056. package/dist/product/social/ProviderReadinessList.js.map +1 -0
  1057. package/dist/product/social/SocialResource.cjs +147 -0
  1058. package/dist/product/social/SocialResource.d.ts +2 -1
  1059. package/dist/product/social/SocialResource.d.ts.map +1 -0
  1060. package/dist/product/social/SocialResource.js +145 -0
  1061. package/dist/product/social/SocialResource.js.map +1 -0
  1062. package/dist/product/social/SocialSummaryBar.cjs +20 -0
  1063. package/dist/product/social/SocialSummaryBar.d.ts +2 -1
  1064. package/dist/product/social/SocialSummaryBar.d.ts.map +1 -0
  1065. package/dist/product/social/SocialSummaryBar.js +18 -0
  1066. package/dist/product/social/SocialSummaryBar.js.map +1 -0
  1067. package/dist/product/social/ViewToggle.cjs +23 -0
  1068. package/dist/product/social/ViewToggle.d.ts +1 -0
  1069. package/dist/product/social/ViewToggle.d.ts.map +1 -0
  1070. package/dist/product/social/ViewToggle.js +21 -0
  1071. package/dist/product/social/ViewToggle.js.map +1 -0
  1072. package/dist/product/social/api.cjs +137 -52
  1073. package/dist/product/social/api.d.ts +1 -0
  1074. package/dist/product/social/api.d.ts.map +1 -0
  1075. package/dist/product/social/api.js +126 -2
  1076. package/dist/product/social/api.js.map +1 -1
  1077. package/dist/product/social/format.cjs +39 -0
  1078. package/dist/product/social/format.d.ts +1 -0
  1079. package/dist/product/social/format.d.ts.map +1 -0
  1080. package/dist/product/social/format.js +34 -0
  1081. package/dist/product/social/format.js.map +1 -0
  1082. package/dist/product/social/index.cjs +38 -111
  1083. package/dist/product/social/index.d.ts +12 -11
  1084. package/dist/product/social/index.d.ts.map +1 -0
  1085. package/dist/product/social/index.js +22 -5
  1086. package/dist/product/social/index.js.map +1 -1
  1087. package/dist/product/surfaces.data.cjs +25 -0
  1088. package/dist/product/surfaces.data.d.ts +1 -0
  1089. package/dist/product/surfaces.data.d.ts.map +1 -0
  1090. package/dist/product/surfaces.data.js +22 -0
  1091. package/dist/product/surfaces.data.js.map +1 -0
  1092. package/dist/styles/hanzo-motion.css +188 -0
  1093. package/dist/telemetry.cjs +31 -14
  1094. package/dist/telemetry.d.ts +1 -0
  1095. package/dist/telemetry.d.ts.map +1 -0
  1096. package/dist/telemetry.js +14 -1
  1097. package/dist/telemetry.js.map +1 -1
  1098. package/dist/theme.css +185 -0
  1099. package/dist/usage.cjs +24 -14
  1100. package/dist/usage.d.ts +1 -0
  1101. package/dist/usage.d.ts.map +1 -0
  1102. package/dist/usage.js +7 -1
  1103. package/dist/usage.js.map +1 -1
  1104. package/package.json +35 -78
  1105. package/dist/ThemeToggleNext-AEDLHX5X.js +0 -4
  1106. package/dist/ThemeToggleNext-AEDLHX5X.js.map +0 -1
  1107. package/dist/ThemeToggleNext-N6ASYJ6J.cjs +0 -19
  1108. package/dist/ThemeToggleNext-N6ASYJ6J.cjs.map +0 -1
  1109. package/dist/backends/shadcn/aspect-ratio.d.ts +0 -4
  1110. package/dist/backends/shadcn/avatar.d.ts +0 -6
  1111. package/dist/backends/shadcn/badge.d.ts +0 -9
  1112. package/dist/backends/shadcn/button.d.ts +0 -19
  1113. package/dist/backends/shadcn/card.d.ts +0 -9
  1114. package/dist/backends/shadcn/checkbox.d.ts +0 -9
  1115. package/dist/backends/shadcn/collapsible.d.ts +0 -5
  1116. package/dist/backends/shadcn/command.d.ts +0 -80
  1117. package/dist/backends/shadcn/dialog.d.ts +0 -15
  1118. package/dist/backends/shadcn/dropdown-menu.d.ts +0 -34
  1119. package/dist/backends/shadcn/index.d.ts +0 -23
  1120. package/dist/backends/shadcn/input.d.ts +0 -11
  1121. package/dist/backends/shadcn/label.d.ts +0 -4
  1122. package/dist/backends/shadcn/popover.d.ts +0 -7
  1123. package/dist/backends/shadcn/progress.d.ts +0 -4
  1124. package/dist/backends/shadcn/scroll-area.d.ts +0 -5
  1125. package/dist/backends/shadcn/select.d.ts +0 -13
  1126. package/dist/backends/shadcn/separator.d.ts +0 -4
  1127. package/dist/backends/shadcn/slider.d.ts +0 -4
  1128. package/dist/backends/shadcn/switch.d.ts +0 -4
  1129. package/dist/backends/shadcn/tabs.d.ts +0 -7
  1130. package/dist/backends/shadcn/textarea.d.ts +0 -4
  1131. package/dist/backends/shadcn/toaster.d.ts +0 -10
  1132. package/dist/backends/shadcn/tooltip.d.ts +0 -7
  1133. package/dist/backends/shadcn/utils.d.ts +0 -8
  1134. package/dist/billing.cjs +0 -14
  1135. package/dist/billing.cjs.map +0 -1
  1136. package/dist/billing.d.ts +0 -1
  1137. package/dist/billing.js +0 -3
  1138. package/dist/billing.js.map +0 -1
  1139. package/dist/canvas.cjs.map +0 -1
  1140. package/dist/chunk-3NG33DV2.cjs +0 -606
  1141. package/dist/chunk-3NG33DV2.cjs.map +0 -1
  1142. package/dist/chunk-5CZOYONP.js +0 -342
  1143. package/dist/chunk-5CZOYONP.js.map +0 -1
  1144. package/dist/chunk-77AMCLN4.js +0 -99
  1145. package/dist/chunk-77AMCLN4.js.map +0 -1
  1146. package/dist/chunk-7XDEUEWI.cjs +0 -43
  1147. package/dist/chunk-7XDEUEWI.cjs.map +0 -1
  1148. package/dist/chunk-7ZNK6JSS.js +0 -830
  1149. package/dist/chunk-7ZNK6JSS.js.map +0 -1
  1150. package/dist/chunk-ARV3P4CE.cjs +0 -104
  1151. package/dist/chunk-ARV3P4CE.cjs.map +0 -1
  1152. package/dist/chunk-FVQXROBK.js +0 -36
  1153. package/dist/chunk-FVQXROBK.js.map +0 -1
  1154. package/dist/chunk-GVCOAJLO.js +0 -396
  1155. package/dist/chunk-GVCOAJLO.js.map +0 -1
  1156. package/dist/chunk-GWNNLYX4.cjs +0 -352
  1157. package/dist/chunk-GWNNLYX4.cjs.map +0 -1
  1158. package/dist/chunk-MWBFAV3D.cjs +0 -104
  1159. package/dist/chunk-MWBFAV3D.cjs.map +0 -1
  1160. package/dist/chunk-ONVERVFG.cjs +0 -850
  1161. package/dist/chunk-ONVERVFG.cjs.map +0 -1
  1162. package/dist/chunk-P2QU5MN5.js +0 -554
  1163. package/dist/chunk-P2QU5MN5.js.map +0 -1
  1164. package/dist/chunk-WHJR5S4L.cjs +0 -417
  1165. package/dist/chunk-WHJR5S4L.cjs.map +0 -1
  1166. package/dist/chunk-ZGTJCJ55.js +0 -92
  1167. package/dist/chunk-ZGTJCJ55.js.map +0 -1
  1168. package/dist/components.d.ts +0 -1
  1169. package/dist/dashboard.cjs.map +0 -1
  1170. package/dist/data.cjs.map +0 -1
  1171. package/dist/framework/core.cjs.map +0 -1
  1172. package/dist/framework/index.cjs.map +0 -1
  1173. package/dist/gitops.cjs.map +0 -1
  1174. package/dist/gui-config.cjs.map +0 -1
  1175. package/dist/index.cjs.map +0 -1
  1176. package/dist/network.cjs +0 -14
  1177. package/dist/network.cjs.map +0 -1
  1178. package/dist/network.d.ts +0 -1
  1179. package/dist/network.js +0 -3
  1180. package/dist/network.js.map +0 -1
  1181. package/dist/oss.cjs.map +0 -1
  1182. package/dist/primitives/bases/data/index.cjs.map +0 -1
  1183. package/dist/product/index.cjs.map +0 -1
  1184. package/dist/product/menu/DropdownMenu.d.ts +0 -29
  1185. package/dist/product/social/api.cjs.map +0 -1
  1186. package/dist/product/social/index.cjs.map +0 -1
  1187. package/dist/telemetry.cjs.map +0 -1
  1188. package/dist/usage.cjs.map +0 -1
  1189. package/dist/wallet.cjs +0 -14
  1190. package/dist/wallet.cjs.map +0 -1
  1191. package/dist/wallet.d.ts +0 -1
  1192. package/dist/wallet.js +0 -3
  1193. package/dist/wallet.js.map +0 -1
@@ -1,1913 +1,89 @@
1
- import { ThemeToggle } from '../chunk-77AMCLN4.js';
2
- export { AgnosticThemeToggle, ThemeToggle, ThemeToggleNext } from '../chunk-77AMCLN4.js';
3
- import { DataTable, asColor } from '../chunk-7ZNK6JSS.js';
4
- export { COMPOSE_MODES, CampaignCard, ChannelBadge, DataTable, PostAgenda, PostCard, PostComposer, ProviderReadinessList, LG as SLIDEOVER_LG, SlideOver, SocialResource, SocialSummaryBar, StatusTag, ViewToggle, asColor, formatPostTime, parsePostTime, postDayBucket, postPreview } from '../chunk-7ZNK6JSS.js';
5
- export { ACCOUNT_STATUSES, POST_STATUSES, PROVIDERS, createSocialApi, normalizeAccount, normalizeAccounts, normalizePost, normalizePosts, normalizeProviderCapability, normalizeProviders, normalizeSummary } from '../chunk-ZGTJCJ55.js';
6
- import { FloatingMenu, MenuItemView, renderMenuItems } from '../chunk-5CZOYONP.js';
7
- export { DropdownMenu, FloatingMenu, MenuItemView, MenuLabelView, MenuPanel, MenuSeparatorView, PortalTheme, SelectMenu, renderMenuItems } from '../chunk-5CZOYONP.js';
8
- import { classifyBackend, PageHeader, BackendStateCard } from '../chunk-GVCOAJLO.js';
9
- export { BackendStateCard, EmptyState, FieldRow, FieldSelect, FieldSlider, FieldSwitch, FieldText, FieldTextArea, HostProvider, PageHeader, PrimaryButton, accentFor, classifyBackend, classifyRead, contrastText, isHexColor, resolveAccent, setOrgAccent, useAccent, useHost } from '../chunk-GVCOAJLO.js';
10
- import { useEmit, textSize } from '../chunk-FVQXROBK.js';
11
- export { InstrumentSurface, emit, labelOf, textSize, useEmit, useSurface } from '../chunk-FVQXROBK.js';
12
- import { createContext, useRef, useState, useEffect, useCallback, useMemo, cloneElement, useLayoutEffect, useContext } from 'react';
13
- import { useTheme, XStack, Text, YStack, Card, Input, Button, Spinner, Popover, Separator } from '@hanzo/gui';
14
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
15
- import { ChevronDown, RefreshCw, Grip, CreditCard, Users, Bot, MessageCircle, AppWindow, LayoutGrid, Sparkles, UserRound, Settings2, LogOut, ChevronsUpDown, Plus, Search, Check, Trash2, Cpu, Globe, Server, Info, CircleX, CircleCheck, X } from '@hanzogui/lucide-icons-2';
16
- export { Boxes as CustomModelMark } from '@hanzogui/lucide-icons-2';
17
- import { surfaceById } from '@hanzo/products';
18
- import { HanzoLogo } from '@hanzo/logo/react';
19
- import { createPortal } from 'react-dom';
20
-
21
- var CHART_PALETTE = [
22
- "#7c5cff",
23
- "#23c562",
24
- "#ff9f45",
25
- "#3aa0ff",
26
- "#ff5d8f",
27
- "#16c0c8",
28
- "#c084fc",
29
- "#f4c245"
30
- ];
31
- var CHART_OTHER = "#64748b";
32
- var ACCENT = CHART_PALETTE[0];
33
- var GRID = "rgba(148,163,184,0.16)";
34
- var AXIS = "rgba(148,163,184,0.85)";
35
- var tone = (theme, key, fallback) => {
36
- const v = theme[key];
37
- const got = v?.get?.();
38
- return typeof got === "string" ? got : fallback;
39
- };
40
- var rampOpacity = (i, n) => n <= 1 ? 0.9 : 0.95 - i / (n - 1) * 0.62;
41
- function useContainerWidth() {
42
- const ref = useRef(null);
43
- const [w, setW] = useState(0);
44
- useEffect(() => {
45
- const el = ref.current;
46
- if (!el) return;
47
- const measure = () => setW(el.clientWidth);
48
- measure();
49
- const ro = new ResizeObserver(measure);
50
- ro.observe(el);
51
- return () => ro.disconnect();
52
- }, []);
53
- return { ref, w };
54
- }
55
- function Sparkline({
56
- values,
57
- width = 120,
58
- height = 36,
59
- color
60
- }) {
61
- const theme = useTheme();
62
- const clean = (values ?? []).filter((v) => Number.isFinite(v));
63
- if (clean.length < 2) return null;
64
- const stroke = color ?? tone(theme, "color11", "currentColor");
65
- const max = Math.max(...clean);
66
- const min = Math.min(...clean);
67
- const span = max - min || 1;
68
- const n = clean.length;
69
- const px = (i) => i / (n - 1) * (width - 2) + 1;
70
- const py = (v) => height - 2 - (v - min) / span * (height - 4);
71
- const line = clean.map((v, i) => `${i === 0 ? "M" : "L"}${px(i).toFixed(1)},${py(v).toFixed(1)}`).join(" ");
72
- const area = `${line} L${(width - 1).toFixed(1)},${height} L1,${height} Z`;
73
- return /* @__PURE__ */ jsxs("svg", { width, height, "aria-hidden": true, style: { display: "block" }, children: [
74
- /* @__PURE__ */ jsx("path", { d: area, fill: stroke, fillOpacity: 0.12 }),
75
- /* @__PURE__ */ jsx("path", { d: line, fill: "none", stroke, strokeWidth: 1.5, strokeLinejoin: "round", strokeLinecap: "round" })
76
- ] });
77
- }
78
- function Tooltip({ x, height, label, value }) {
79
- const left = Math.max(0, x - 60);
80
- return /* @__PURE__ */ jsx(
81
- "div",
82
- {
83
- style: {
84
- position: "absolute",
85
- left,
86
- top: 0,
87
- height,
88
- pointerEvents: "none",
89
- display: "flex",
90
- alignItems: "flex-start"
91
- },
92
- children: /* @__PURE__ */ jsxs(
93
- "div",
94
- {
95
- style: {
96
- background: "rgba(15,17,21,0.94)",
97
- border: "1px solid rgba(148,163,184,0.25)",
98
- borderRadius: 8,
99
- padding: "6px 9px",
100
- fontSize: 11,
101
- lineHeight: 1.35,
102
- color: "#e2e8f0",
103
- whiteSpace: "nowrap",
104
- boxShadow: "0 4px 16px rgba(0,0,0,0.4)"
105
- },
106
- children: [
107
- /* @__PURE__ */ jsx("div", { style: { color: AXIS }, children: label }),
108
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 700 }, children: value })
109
- ]
110
- }
111
- )
112
- }
113
- );
114
- }
115
- function nearestIndex(clientX, rect, padL, innerW, n) {
116
- if (n <= 1) return 0;
117
- const mx = clientX - rect.left - padL;
118
- const i = Math.round(mx / (innerW || 1) * (n - 1));
119
- return Math.max(0, Math.min(n - 1, i));
120
- }
121
- function axisTicks(data) {
122
- const n = data.length;
123
- if (n === 0) return [];
124
- if (n === 1) return [{ i: 0, label: data[0].label, anchor: "middle" }];
125
- const mid = Math.floor((n - 1) / 2);
126
- const out = [
127
- { i: 0, label: data[0].label, anchor: "start" },
128
- { i: n - 1, label: data[n - 1].label, anchor: "end" }
129
- ];
130
- if (n >= 5) out.splice(1, 0, { i: mid, label: data[mid].label, anchor: "middle" });
131
- return out;
132
- }
133
- function LineChart({
134
- data,
135
- height = 210,
136
- color = ACCENT,
137
- formatValue = (v) => String(v)
138
- }) {
139
- const { ref, w } = useContainerWidth();
140
- const [hover, setHover] = useState(null);
141
- const padL = 10;
142
- const padR = 10;
143
- const padT = 12;
144
- const padB = 24;
145
- const n = data.length;
146
- const innerW = Math.max(1, w - padL - padR);
147
- const innerH = Math.max(1, height - padT - padB);
148
- const max = Math.max(...data.map((d) => d.value), 1);
149
- const x = (i) => padL + (n <= 1 ? innerW / 2 : i / (n - 1) * innerW);
150
- const y = (v) => padT + innerH - v / max * innerH;
151
- const line = data.map((d, i) => `${i === 0 ? "M" : "L"}${x(i).toFixed(1)},${y(d.value).toFixed(1)}`).join(" ");
152
- const area = n >= 2 ? `${line} L${x(n - 1).toFixed(1)},${(padT + innerH).toFixed(1)} L${x(0).toFixed(1)},${(padT + innerH).toFixed(1)} Z` : "";
153
- const ticks = axisTicks(data);
154
- return /* @__PURE__ */ jsxs("div", { ref, style: { position: "relative", width: "100%" }, children: [
155
- w > 0 ? /* @__PURE__ */ jsxs(
156
- "svg",
157
- {
158
- width: w,
159
- height,
160
- style: { display: "block" },
161
- onMouseMove: (e) => setHover(nearestIndex(e.clientX, e.currentTarget.getBoundingClientRect(), padL, innerW, n)),
162
- onMouseLeave: () => setHover(null),
163
- children: [
164
- [0, 0.5, 1].map((g) => /* @__PURE__ */ jsx("line", { x1: padL, x2: w - padR, y1: padT + innerH * g, y2: padT + innerH * g, stroke: GRID, strokeWidth: 1 }, g)),
165
- area ? /* @__PURE__ */ jsx("path", { d: area, fill: color, fillOpacity: 0.1 }) : null,
166
- n >= 2 ? /* @__PURE__ */ jsx("path", { d: line, fill: "none", stroke: color, strokeWidth: 2, strokeLinejoin: "round", strokeLinecap: "round" }) : null,
167
- hover != null && data[hover] ? /* @__PURE__ */ jsxs(Fragment, { children: [
168
- /* @__PURE__ */ jsx("line", { x1: x(hover), x2: x(hover), y1: padT, y2: padT + innerH, stroke: AXIS, strokeWidth: 1, strokeDasharray: "3 3" }),
169
- /* @__PURE__ */ jsx("circle", { cx: x(hover), cy: y(data[hover].value), r: 4, fill: color, stroke: "#0f1115", strokeWidth: 2 })
170
- ] }) : null,
171
- ticks.map((t) => /* @__PURE__ */ jsx("text", { x: x(t.i), y: height - 7, fontSize: 10, fill: AXIS, textAnchor: t.anchor, children: t.label }, t.i))
172
- ]
173
- }
174
- ) : null,
175
- hover != null && data[hover] ? /* @__PURE__ */ jsx(Tooltip, { x: x(hover), height, label: data[hover].label, value: formatValue(data[hover].value) }) : null
176
- ] });
177
- }
178
- function BarChart({
179
- data,
180
- height = 210,
181
- color = ACCENT,
182
- formatValue = (v) => String(v)
183
- }) {
184
- const { ref, w } = useContainerWidth();
185
- const [hover, setHover] = useState(null);
186
- const padL = 10;
187
- const padR = 10;
188
- const padT = 12;
189
- const padB = 24;
190
- const n = data.length;
191
- const innerW = Math.max(1, w - padL - padR);
192
- const innerH = Math.max(1, height - padT - padB);
193
- const max = Math.max(...data.map((d) => d.value), 1);
194
- const slot = innerW / Math.max(1, n);
195
- const barW = Math.max(1, Math.min(slot * 0.62, 36));
196
- const cx = (i) => padL + slot * i + slot / 2;
197
- const ticks = axisTicks(data);
198
- return /* @__PURE__ */ jsxs("div", { ref, style: { position: "relative", width: "100%" }, children: [
199
- w > 0 ? /* @__PURE__ */ jsxs(
200
- "svg",
201
- {
202
- width: w,
203
- height,
204
- style: { display: "block" },
205
- onMouseMove: (e) => {
206
- const rect = e.currentTarget.getBoundingClientRect();
207
- const i = Math.floor((e.clientX - rect.left - padL) / (slot || 1));
208
- setHover(Math.max(0, Math.min(n - 1, i)));
209
- },
210
- onMouseLeave: () => setHover(null),
211
- children: [
212
- [0, 0.5, 1].map((g) => /* @__PURE__ */ jsx("line", { x1: padL, x2: w - padR, y1: padT + innerH * g, y2: padT + innerH * g, stroke: GRID, strokeWidth: 1 }, g)),
213
- data.map((d, i) => {
214
- const h = d.value / max * innerH;
215
- return /* @__PURE__ */ jsx(
216
- "rect",
217
- {
218
- x: cx(i) - barW / 2,
219
- y: padT + innerH - h,
220
- width: barW,
221
- height: Math.max(0, h),
222
- rx: Math.min(3, barW / 2),
223
- fill: color,
224
- fillOpacity: hover === i ? 1 : 0.78
225
- },
226
- i
227
- );
228
- }),
229
- ticks.map((t) => /* @__PURE__ */ jsx("text", { x: cx(t.i), y: height - 7, fontSize: 10, fill: AXIS, textAnchor: "middle", children: t.label }, t.i))
230
- ]
231
- }
232
- ) : null,
233
- hover != null && data[hover] ? /* @__PURE__ */ jsx(Tooltip, { x: cx(hover), height, label: data[hover].label, value: formatValue(data[hover].value) }) : null
234
- ] });
235
- }
236
- function Donut({
237
- slices,
238
- size = 160,
239
- thickness = 22,
240
- center,
241
- legend = false
242
- }) {
243
- const theme = useTheme();
244
- const fg = tone(theme, "color12", "currentColor");
245
- const positive = slices.filter((s) => s.value > 0);
246
- const total = positive.reduce((sum, s) => sum + s.value, 0);
247
- const r = size / 2;
248
- const rInner = r - thickness;
249
- const mid = (r + rInner) / 2;
250
- if (total <= 0) {
251
- return /* @__PURE__ */ jsx(XStack, { items: "center", justify: "center", height: size, children: /* @__PURE__ */ jsx(Text, { fontSize: "$6", color: "$color10", children: "\u2014" }) });
252
- }
253
- const ring = /* @__PURE__ */ jsxs("div", { style: { position: "relative", width: size, height: size }, children: [
254
- /* @__PURE__ */ jsx("svg", { width: size, height: size, style: { display: "block" }, children: positive.length === 1 ? /* @__PURE__ */ jsx(
255
- "circle",
256
- {
257
- cx: r,
258
- cy: r,
259
- r: mid,
260
- fill: "none",
261
- stroke: positive[0].color ?? fg,
262
- strokeOpacity: positive[0].color ? 1 : 0.9,
263
- strokeWidth: thickness
264
- }
265
- ) : renderArcs(positive, total, r, rInner, fg) }),
266
- center ? /* @__PURE__ */ jsx(
267
- "div",
268
- {
269
- style: {
270
- position: "absolute",
271
- inset: 0,
272
- display: "flex",
273
- flexDirection: "column",
274
- alignItems: "center",
275
- justifyContent: "center",
276
- textAlign: "center",
277
- pointerEvents: "none"
278
- },
279
- children: center
280
- }
281
- ) : null
282
- ] });
283
- if (!legend) return ring;
284
- return /* @__PURE__ */ jsxs(XStack, { gap: "$4", items: "center", flexWrap: "wrap", children: [
285
- ring,
286
- /* @__PURE__ */ jsx(YStack, { gap: "$1.5", flex: 1, minW: 150, children: positive.map((s, i) => /* @__PURE__ */ jsxs(XStack, { gap: "$2", items: "center", children: [
287
- /* @__PURE__ */ jsx(
288
- "div",
289
- {
290
- style: {
291
- width: 10,
292
- height: 10,
293
- borderRadius: 2,
294
- backgroundColor: s.color ?? AXIS,
295
- opacity: s.color ? 1 : rampOpacity(i, positive.length)
296
- }
297
- }
298
- ),
299
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", flex: 1, numberOfLines: 1, children: s.label }),
300
- /* @__PURE__ */ jsxs(Text, { fontSize: "$2", color: "$color12", fontWeight: "600", children: [
301
- Math.round(s.value / total * 100),
302
- "%"
303
- ] })
304
- ] }, s.label)) })
305
- ] });
306
- }
307
- function renderArcs(slices, total, rOuter, rInner, fg) {
308
- let a0 = -Math.PI / 2;
309
- const paths = [];
310
- slices.forEach((s, idx) => {
311
- const frac = Math.max(0, s.value) / total;
312
- if (frac <= 0) return;
313
- const a1 = a0 + frac * Math.PI * 2;
314
- paths.push(
315
- /* @__PURE__ */ jsx(
316
- "path",
317
- {
318
- d: annularArc(rOuter, rOuter, rOuter, rInner, a0, Math.min(a1, a0 + Math.PI * 1.9999)),
319
- fill: s.color ?? fg,
320
- fillOpacity: s.color ? 1 : rampOpacity(idx, slices.length)
321
- },
322
- s.label || idx
323
- )
324
- );
325
- a0 = a1;
326
- });
327
- return /* @__PURE__ */ jsx(Fragment, { children: paths });
328
- }
329
- function polar(cx, cy, rad, a) {
330
- return [cx + rad * Math.cos(a), cy + rad * Math.sin(a)];
331
- }
332
- function annularArc(cx, cy, rOuter, rInner, a0, a1) {
333
- const large = a1 - a0 > Math.PI ? 1 : 0;
334
- const [x0, y0] = polar(cx, cy, rOuter, a0);
335
- const [x1, y1] = polar(cx, cy, rOuter, a1);
336
- const [x2, y2] = polar(cx, cy, rInner, a1);
337
- const [x3, y3] = polar(cx, cy, rInner, a0);
338
- return `M${x0},${y0} A${rOuter},${rOuter} 0 ${large} 1 ${x1},${y1} L${x2},${y2} A${rInner},${rInner} 0 ${large} 0 ${x3},${y3} Z`;
339
- }
340
- function BarRows({ bars }) {
341
- const max = Math.max(0, ...bars.map((b) => b.value));
342
- if (max <= 0) {
343
- return /* @__PURE__ */ jsx(Text, { fontSize: "$3", color: "$color10", children: "\u2014" });
344
- }
345
- return /* @__PURE__ */ jsx(YStack, { gap: "$2.5", children: bars.map((b) => /* @__PURE__ */ jsxs(XStack, { gap: "$3", items: "center", children: [
346
- /* @__PURE__ */ jsx(Text, { width: 64, fontSize: "$2", color: "$color11", text: "right", children: b.label }),
347
- /* @__PURE__ */ jsx(YStack, { flex: 1, height: 10, bg: "$color3", rounded: "$2", overflow: "hidden", children: /* @__PURE__ */ jsx(YStack, { height: 10, width: `${Math.max(2, b.value / max * 100)}%`, bg: "$color9", rounded: "$2" }) }),
348
- /* @__PURE__ */ jsx(Text, { width: 56, fontSize: "$2", color: "$color12", fontWeight: "600", children: b.value.toLocaleString() })
349
- ] }, b.label)) });
350
- }
351
- var SERIES = ["#6ea8fe", "#7ee787", "#f0a868", "#c792ea", "#56d4c4", "#e879a6", "#d6c15a", "#8b9bb4"];
352
- var colorForIndex = (i) => SERIES[i % SERIES.length];
353
- var TRACK = "rgba(128,128,128,0.18)";
354
- function utilColor(pct) {
355
- if (pct >= 90) return "#e5534b";
356
- if (pct >= 70) return "#f0a868";
357
- return "#7ee787";
358
- }
359
- function Sparkline2({
360
- points,
361
- width = 104,
362
- height = 30,
363
- color = SERIES[0]
364
- }) {
365
- if (!points || points.length < 2) return null;
366
- const min = Math.min(...points);
367
- const max = Math.max(...points);
368
- const span = max - min || 1;
369
- const stepX = width / (points.length - 1);
370
- const y = (v) => height - 2 - (v - min) / span * (height - 4);
371
- const d = points.map((p, i) => `${i === 0 ? "M" : "L"}${(i * stepX).toFixed(1)},${y(p).toFixed(1)}`).join(" ");
372
- return /* @__PURE__ */ jsx("svg", { width, height, viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": "trend", children: /* @__PURE__ */ jsx("path", { d, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinejoin: "round", strokeLinecap: "round" }) });
373
- }
374
- function MiniBars({
375
- bars,
376
- width = 320,
377
- height = 96,
378
- color = SERIES[0]
379
- }) {
380
- if (!bars.length) return null;
381
- const max = Math.max(...bars.map((b) => b.value), 1);
382
- const gap = 4;
383
- const bw = (width - gap * (bars.length - 1)) / bars.length;
384
- return /* @__PURE__ */ jsx("svg", { width: "100%", height, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", role: "img", "aria-label": "bars", children: bars.map((b, i) => {
385
- const h = Math.max(1, b.value / max * (height - 2));
386
- return /* @__PURE__ */ jsx("rect", { x: i * (bw + gap), y: height - h, width: bw, height: h, rx: 2, fill: color, opacity: 0.85, children: /* @__PURE__ */ jsx("title", { children: `${b.label}: ${b.value}` }) }, b.label + i);
387
- }) });
388
- }
389
- function UtilBar({ value, width = 120, color }) {
390
- const v = Math.max(0, Math.min(100, value));
391
- return /* @__PURE__ */ jsxs("svg", { width, height: 8, viewBox: `0 0 ${width} 8`, role: "img", "aria-label": `${Math.round(v)}%`, children: [
392
- /* @__PURE__ */ jsx("rect", { x: 0, y: 1, width, height: 6, rx: 3, fill: TRACK }),
393
- /* @__PURE__ */ jsx("rect", { x: 0, y: 1, width: v / 100 * width, height: 6, rx: 3, fill: color ?? utilColor(v) })
394
- ] });
395
- }
396
- function LegendDot({ color, label, value }) {
397
- return /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", justify: "space-between", children: [
398
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", children: [
399
- /* @__PURE__ */ jsx(YStack, { width: 10, height: 10, rounded: "$1", bg: color }),
400
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", children: label })
401
- ] }),
402
- value != null ? /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", fontWeight: "500", className: "hz-mono", children: value }) : null
403
- ] });
404
- }
405
- function MetricCard({
406
- icon,
407
- label,
408
- value,
409
- caption,
410
- spark,
411
- sparkColor,
412
- delta
413
- }) {
414
- const up = delta ? delta.pct >= 0 : false;
415
- return /* @__PURE__ */ jsxs(Card, { p: "$3.5", gap: "$2", borderWidth: 1, borderColor: "$borderColor", flex: 1, minW: 172, children: [
416
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", justify: "space-between", children: [
417
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", children: [
418
- icon,
419
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", fontWeight: "500", children: label })
420
- ] }),
421
- delta ? /* @__PURE__ */ jsxs(Text, { fontSize: "$1", color: up ? "#7ee787" : "#e5534b", children: [
422
- up ? "\u25B2" : "\u25BC",
423
- " ",
424
- Math.abs(delta.pct),
425
- "%"
426
- ] }) : null
427
- ] }),
428
- /* @__PURE__ */ jsxs(XStack, { items: "flex-end", justify: "space-between", gap: "$2", children: [
429
- /* @__PURE__ */ jsx(Text, { fontSize: "$8", fontWeight: "500", color: "$color12", numberOfLines: 1, className: "hz-mono", children: value }),
430
- spark && spark.length >= 2 ? /* @__PURE__ */ jsx(Sparkline2, { points: spark, color: sparkColor ?? SERIES[0] }) : null
431
- ] }),
432
- caption ? /* @__PURE__ */ jsx(Text, { fontSize: "$1", color: "$color10", numberOfLines: 1, children: caption }) : null
433
- ] });
434
- }
435
- function HintButton({
436
- icon,
437
- iconAfter,
438
- children,
439
- onPress,
440
- disabled,
441
- hint,
442
- theme
443
- }) {
444
- const btn = /* @__PURE__ */ jsx(
445
- Button,
446
- {
447
- size: "$2",
448
- theme,
449
- icon,
450
- iconAfter,
451
- disabled,
452
- onPress: disabled ? void 0 : onPress,
453
- children
454
- }
455
- );
456
- if (!hint) return btn;
457
- return /* @__PURE__ */ jsx("span", { title: hint, style: { display: "inline-flex" }, children: btn });
458
- }
459
- function Panel({
460
- title,
461
- right,
462
- children,
463
- minW = 280,
464
- grow = true
465
- }) {
466
- return /* @__PURE__ */ jsxs(Card, { p: "$4", gap: "$3", borderWidth: 1, borderColor: "$borderColor", flex: grow ? 1 : void 0, minW, width: grow ? void 0 : "100%", children: [
467
- /* @__PURE__ */ jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", children: [
468
- /* @__PURE__ */ jsx(Text, { fontSize: "$4", fontWeight: "500", color: "$color12", children: title }),
469
- right
470
- ] }),
471
- children
472
- ] });
473
- }
474
- function Donut2({
475
- segments,
476
- size = 160,
477
- thickness = 18,
478
- centerValue,
479
- centerLabel,
480
- trackColor = "#2a2d2e",
481
- valueColor = "#ecedee",
482
- labelColor = "#9ba1a6"
483
- }) {
484
- const total = segments.reduce((n, s) => n + Math.max(0, s.value), 0);
485
- if (total <= 0) return null;
486
- const r = (size - thickness) / 2;
487
- const cx = size / 2;
488
- const cy = size / 2;
489
- const circ = 2 * Math.PI * r;
490
- let offset = 0;
491
- const arcs = segments.filter((s) => s.value > 0).map((s) => {
492
- const frac = s.value / total;
493
- const dash = frac * circ;
494
- const node = /* @__PURE__ */ jsx(
495
- "circle",
496
- {
497
- cx,
498
- cy,
499
- r,
500
- fill: "none",
501
- stroke: s.color,
502
- strokeWidth: thickness,
503
- strokeDasharray: `${dash} ${circ - dash}`,
504
- strokeDashoffset: -offset
505
- },
506
- s.label
507
- );
508
- offset += dash;
509
- return node;
510
- });
511
- return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": "Donut chart", children: [
512
- /* @__PURE__ */ jsx("circle", { cx, cy, r, fill: "none", stroke: trackColor, strokeWidth: thickness }),
513
- /* @__PURE__ */ jsx("g", { transform: `rotate(-90 ${cx} ${cy})`, children: arcs }),
514
- centerValue ? /* @__PURE__ */ jsx("text", { x: cx, y: cy - 2, textAnchor: "middle", fontSize: size * 0.2, fontWeight: "800", fill: valueColor, children: centerValue }) : null,
515
- centerLabel ? /* @__PURE__ */ jsx("text", { x: cx, y: cy + size * 0.13, textAnchor: "middle", fontSize: size * 0.08, fill: labelColor, children: centerLabel }) : null
516
- ] });
517
- }
518
-
519
- // src/product/combobox/filter.ts
520
- var hay = (o) => `${o.value} ${o.label ?? ""} ${o.hint ?? ""}`.toLowerCase();
521
- function filterOptions(options, query) {
522
- const q = query.trim().toLowerCase();
523
- if (!q) return options;
524
- return options.filter((o) => hay(o).includes(q));
525
- }
526
- function isKnownOption(options, value) {
527
- return options.some((o) => o.value === value);
528
- }
529
- function ComboBox({
530
- value,
531
- onChange,
532
- options,
533
- loading = false,
534
- error = null,
535
- onRetry,
536
- placeholder,
537
- disabled,
538
- emptyText = "No matches \u2014 press to use what you typed.",
539
- minWidth = 240
540
- }) {
541
- const [open, setOpen] = useState(false);
542
- const rowRef = useRef(null);
543
- const anchorRect = useCallback(() => rowRef.current?.getBoundingClientRect() ?? null, []);
544
- const anchorEl = useCallback(() => rowRef.current, []);
545
- const filtered = useMemo(() => filterOptions(options, value), [options, value]);
546
- const track = useEmit();
547
- const pick = (v) => {
548
- track({ component: "ComboBox", action: "select", id: v, value: filtered.length });
549
- onChange(v);
550
- setOpen(false);
551
- };
552
- return /* @__PURE__ */ jsxs(Fragment, { children: [
553
- /* @__PURE__ */ jsxs(XStack, { ref: rowRef, items: "center", gap: "$2", minW: minWidth, children: [
554
- /* @__PURE__ */ jsx(
555
- Input,
556
- {
557
- flex: 1,
558
- value,
559
- onChangeText: (v) => {
560
- onChange(v);
561
- if (!open) setOpen(true);
562
- },
563
- onFocus: () => setOpen(true),
564
- disabled,
565
- placeholder,
566
- autoCapitalize: "none"
567
- }
568
- ),
569
- /* @__PURE__ */ jsx(
570
- Button,
571
- {
572
- size: "$2",
573
- chromeless: true,
574
- disabled,
575
- icon: /* @__PURE__ */ jsx(ChevronDown, { size: 16, opacity: 0.7 }),
576
- onPress: () => {
577
- track({ component: "ComboBox", action: open ? "close" : "open" });
578
- setOpen((o) => !o);
579
- },
580
- "aria-label": "Show options"
581
- }
582
- )
583
- ] }),
584
- /* @__PURE__ */ jsx(
585
- FloatingMenu,
586
- {
587
- open,
588
- onClose: () => setOpen(false),
589
- anchorRect,
590
- anchorEl,
591
- autoFocus: false,
592
- minWidth,
593
- maxHeight: 300,
594
- children: loading ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
595
- /* @__PURE__ */ jsx(Spinner, { size: "small", color: "$color11" }),
596
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color10", children: "Loading options\u2026" })
597
- ] }) : error ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
598
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color10", flex: 1, numberOfLines: 2, children: error }),
599
- onRetry ? /* @__PURE__ */ jsx(Button, { size: "$1", chromeless: true, icon: /* @__PURE__ */ jsx(RefreshCw, { size: 12 }), onPress: onRetry, "aria-label": "Retry" }) : null
600
- ] }) : filtered.length === 0 ? /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color10", px: "$2", py: "$2", children: emptyText }) : filtered.map((o) => /* @__PURE__ */ jsx(
601
- MenuItemView,
602
- {
603
- label: o.label ?? o.value,
604
- description: o.hint,
605
- selected: o.value === value,
606
- onSelect: () => pick(o.value)
607
- },
608
- o.value
609
- ))
610
- }
611
- )
612
- ] });
613
- }
614
- var ORDER = ["ai", "console", "app", "chat", "bot", "team", "billing"];
615
- var SURFACES = ORDER.map((id) => {
616
- const s = surfaceById(id);
617
- return { id, label: s.label, href: s.href, hint: s.domain };
618
- });
619
- function otherSurfaces(current) {
620
- return current ? SURFACES.filter((s) => s.id !== current) : SURFACES;
621
- }
622
- function HanzoMark({ size = 22, color = "currentColor" }) {
623
- return /* @__PURE__ */ jsxs(
624
- "svg",
625
- {
626
- width: size,
627
- height: size,
628
- viewBox: "0 0 67 67",
629
- role: "img",
630
- "aria-label": "Hanzo",
631
- fill: color,
632
- style: { display: "block", flexShrink: 0 },
633
- children: [
634
- /* @__PURE__ */ jsx("path", { d: "M22.21 67V44.6369H0V67H22.21Z" }),
635
- /* @__PURE__ */ jsx("path", { opacity: 0.55, d: "M0 44.6369L22.21 46.8285V44.6369H0Z" }),
636
- /* @__PURE__ */ jsx("path", { d: "M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" }),
637
- /* @__PURE__ */ jsx("path", { d: "M22.21 0H0V22.3184H22.21V0Z" }),
638
- /* @__PURE__ */ jsx("path", { d: "M66.7198 0H44.5098V22.3184H66.7198V0Z" }),
639
- /* @__PURE__ */ jsx("path", { opacity: 0.55, d: "M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" }),
640
- /* @__PURE__ */ jsx("path", { d: "M66.7198 67V44.6369H44.5098V67H66.7198Z" })
641
- ]
642
- }
643
- );
644
- }
645
- function BrandMark({
646
- size = 20,
647
- wordmark = "Hanzo",
648
- animated = true
649
- }) {
650
- if (!animated) return /* @__PURE__ */ jsx(HanzoMark, { size });
651
- return /* @__PURE__ */ jsx(HanzoLogo, { animated: true, size, wordmark });
652
- }
653
- var SURFACE_ICON = {
654
- ai: Sparkles,
655
- console: LayoutGrid,
656
- app: AppWindow,
657
- chat: MessageCircle,
658
- bot: Bot,
659
- team: Users,
660
- billing: CreditCard
661
- };
662
- var openHref = (href) => {
663
- if (typeof window !== "undefined") window.open(href, "_blank", "noopener");
664
- };
665
- function MenuRow({ icon, label, onPress }) {
666
- return /* @__PURE__ */ jsxs(XStack, { onPress, cursor: "pointer", items: "center", gap: "$2.5", px: "$2", py: "$2", rounded: "$3", hoverStyle: { bg: "$color5" }, children: [
667
- icon,
668
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", children: label })
669
- ] });
670
- }
671
- function AppHeader({
672
- brand,
673
- wordmark = "Hanzo",
674
- onBrand,
675
- org,
676
- children,
677
- current,
678
- surfaces,
679
- open,
680
- user,
681
- menu,
682
- theme,
683
- onProfile,
684
- onTeam,
685
- onBilling,
686
- onSignOut
687
- }) {
688
- const [appsOpen, setAppsOpen] = useState(false);
689
- const [menuOpen, setMenuOpen] = useState(false);
690
- const items = surfaces ?? otherSurfaces(current);
691
- const launch = (s) => {
692
- setAppsOpen(false);
693
- if (open) open(s);
694
- else openHref(s.href);
695
- };
696
- return /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$3", height: 52, borderBottomWidth: 1, borderColor: "$borderColor", bg: "$background", children: [
697
- /* @__PURE__ */ jsx(XStack, { items: "center", cursor: onBrand ? "pointer" : void 0, onPress: onBrand, children: brand ?? /* @__PURE__ */ jsx(BrandMark, { wordmark }) }),
698
- org ? /* @__PURE__ */ jsx(XStack, { items: "center", minW: 0, children: org }) : null,
699
- /* @__PURE__ */ jsx(XStack, { flex: 1, items: "center", minW: 0, children }),
700
- items.length > 0 ? /* @__PURE__ */ jsxs(Popover, { open: appsOpen, onOpenChange: setAppsOpen, placement: "bottom-end", children: [
701
- /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "$2", chromeless: true, icon: /* @__PURE__ */ jsx(Grip, { size: 16 }), "aria-label": "Apps" }) }),
702
- /* @__PURE__ */ jsx(Popover.Content, { bordered: true, elevate: true, p: "$2", width: 230, bg: "$color2", borderColor: "$borderColor", children: /* @__PURE__ */ jsx(YStack, { gap: "$1", children: items.map((s) => {
703
- const Icon = SURFACE_ICON[s.id];
704
- return /* @__PURE__ */ jsxs(XStack, { onPress: () => launch(s), cursor: "pointer", items: "center", gap: "$2.5", px: "$2", py: "$2", rounded: "$3", hoverStyle: { bg: "$color5" }, children: [
705
- /* @__PURE__ */ jsx(Icon, { size: 16 }),
706
- /* @__PURE__ */ jsx(Text, { flex: 1, fontSize: "$2", fontWeight: "600", color: "$color12", children: s.label }),
707
- s.hint ? /* @__PURE__ */ jsx(Text, { fontSize: "$1", color: "$color10", children: s.hint }) : null
708
- ] }, s.id);
709
- }) }) })
710
- ] }) : null,
711
- /* @__PURE__ */ jsxs(Popover, { open: menuOpen, onOpenChange: setMenuOpen, placement: "bottom-end", children: [
712
- /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "$2", chromeless: true, icon: /* @__PURE__ */ jsx(UserRound, { size: 16 }), "aria-label": "Account", children: user ? /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", numberOfLines: 1, maxW: 140, children: user }) : null }) }),
713
- /* @__PURE__ */ jsx(Popover.Content, { bordered: true, elevate: true, p: "$2", width: 220, bg: "$color2", borderColor: "$borderColor", children: menu ?? /* @__PURE__ */ jsxs(YStack, { gap: "$1", children: [
714
- onProfile ? /* @__PURE__ */ jsx(MenuRow, { icon: /* @__PURE__ */ jsx(UserRound, { size: 15 }), label: "Profile", onPress: () => (setMenuOpen(false), onProfile()) }) : null,
715
- theme !== null ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2.5", px: "$2", py: "$1", rounded: "$3", children: [
716
- /* @__PURE__ */ jsx(Text, { flex: 1, fontSize: "$2", color: "$color12", children: "Theme" }),
717
- theme ?? /* @__PURE__ */ jsx(ThemeToggle, {})
718
- ] }) : null,
719
- onTeam ? /* @__PURE__ */ jsx(MenuRow, { icon: /* @__PURE__ */ jsx(Settings2, { size: 15 }), label: "Team settings", onPress: () => (setMenuOpen(false), onTeam()) }) : null,
720
- onBilling ? /* @__PURE__ */ jsx(MenuRow, { icon: /* @__PURE__ */ jsx(CreditCard, { size: 15 }), label: "Billing", onPress: () => (setMenuOpen(false), onBilling()) }) : null,
721
- onSignOut ? /* @__PURE__ */ jsxs(Fragment, { children: [
722
- /* @__PURE__ */ jsx(Separator, { borderColor: "$borderColor", my: "$1" }),
723
- /* @__PURE__ */ jsx(MenuRow, { icon: /* @__PURE__ */ jsx(LogOut, { size: 15 }), label: "Sign out", onPress: () => (setMenuOpen(false), onSignOut()) })
724
- ] }) : null
725
- ] }) })
726
- ] })
727
- ] });
728
- }
729
- function monogram(name) {
730
- const words = name.trim().split(/[\s._/-]+/).filter(Boolean);
731
- const letters = words.slice(0, 2).map((w) => w[0] ?? "").join("");
732
- return (letters || name.trim().slice(0, 2)).toUpperCase();
733
- }
734
- function OrgMark({ org, size = 22, maxW }) {
735
- if (org.logo) {
736
- return /* @__PURE__ */ jsx(
737
- "img",
738
- {
739
- src: org.logo,
740
- alt: "",
741
- style: {
742
- height: size,
743
- width: maxW ? "auto" : size,
744
- maxWidth: maxW ?? size,
745
- objectFit: "contain",
746
- display: "block",
747
- borderRadius: 6,
748
- flexShrink: 0
749
- }
750
- }
751
- );
752
- }
753
- return /* @__PURE__ */ jsx(
754
- YStack,
755
- {
756
- width: size,
757
- height: size,
758
- rounded: "$3",
759
- bg: "$color4",
760
- items: "center",
761
- justify: "center",
762
- style: { flexShrink: 0 },
763
- children: /* @__PURE__ */ jsx(Text, { fontSize: Math.round(size * 0.4), fontWeight: "800", color: "$color12", children: monogram(org.displayName || org.name) })
764
- }
765
- );
766
- }
767
-
768
- // src/product/scope.ts
769
- function browserStorage() {
770
- if (typeof window === "undefined") return null;
771
- try {
772
- return window.localStorage;
773
- } catch {
774
- return null;
775
- }
776
- }
777
- function orgScope(config) {
778
- const key = config.key ?? "hanzo.org";
779
- const selectedKey = `${key}.selected`;
780
- const store = () => config.storage ?? browserStorage();
781
- const read = (k) => {
782
- try {
783
- return store()?.getItem(k) ?? null;
784
- } catch {
785
- return null;
786
- }
787
- };
788
- const write = (k, v) => {
789
- try {
790
- if (v === null) store()?.removeItem(k);
791
- else store()?.setItem(k, v);
792
- } catch {
793
- }
794
- };
795
- const goHome = () => {
796
- if (config.navigate) return config.navigate("/");
797
- if (typeof window !== "undefined") window.location.assign("/");
798
- };
799
- const doReload = () => {
800
- if (config.reload) return config.reload();
801
- if (typeof window !== "undefined") window.location.reload();
802
- };
803
- const scope = {
804
- currentOrg: () => read(key) || config.brandOrg,
805
- setCurrentOrg: (org) => write(key, !org || org === config.brandOrg ? null : org),
806
- isScopedAway: () => scope.currentOrg() !== config.brandOrg,
807
- hasSelectedOrg: () => read(selectedKey) === "1",
808
- enterOrg: (org) => {
809
- if (!org) return;
810
- scope.setCurrentOrg(org);
811
- write(selectedKey, "1");
812
- goHome();
813
- },
814
- leaveOrg: () => {
815
- write(selectedKey, null);
816
- scope.setCurrentOrg(config.brandOrg);
817
- goHome();
818
- },
819
- switchOrg: (org) => {
820
- if (!org || org === scope.currentOrg()) return;
821
- scope.setCurrentOrg(org);
822
- write(selectedKey, "1");
823
- doReload();
824
- }
825
- };
826
- return scope;
827
- }
828
- function filterOrgs(orgs, query) {
829
- const q = query.trim().toLowerCase();
830
- if (!q) return orgs;
831
- return orgs.filter(
832
- (o) => o.name.toLowerCase().includes(q) || (o.displayName ?? "").toLowerCase().includes(q)
833
- );
834
- }
835
- var titleCase = (s) => s ? s[0].toUpperCase() + s.slice(1) : s;
836
- function OrgSwitcher({ scope, orgs, pageSize = 20, current: given, create, picker = false }) {
837
- const currentId = scope.currentOrg();
838
- const [open, setOpen] = useState(false);
839
- const [query, setQuery] = useState("");
840
- const [debounced, setDebounced] = useState("");
841
- const [rows, setRows] = useState([]);
842
- const [loading, setLoading] = useState(false);
843
- const [loadingMore, setLoadingMore] = useState(false);
844
- const [hasMore, setHasMore] = useState(false);
845
- const [creating, setCreating] = useState(false);
846
- const [newName, setNewName] = useState("");
847
- const [busy, setBusy] = useState(false);
848
- const [err, setErr] = useState(null);
849
- const pageRef = useRef(0);
850
- const reqRef = useRef(0);
851
- useEffect(() => {
852
- const id = setTimeout(() => setDebounced(query.trim()), 250);
853
- return () => clearTimeout(id);
854
- }, [query]);
855
- const fetchPage = useCallback(
856
- async (page, q, append) => {
857
- if (!orgs) return;
858
- const token = ++reqRef.current;
859
- append ? setLoadingMore(true) : setLoading(true);
860
- try {
861
- const incoming = await orgs(page, q);
862
- if (token !== reqRef.current) return;
863
- pageRef.current = page;
864
- setRows((prev) => {
865
- const merged = append ? [...prev] : [];
866
- const seen = new Set(merged.map((o) => o.name));
867
- for (const o of incoming) if (!seen.has(o.name)) merged.push(o);
868
- return merged;
869
- });
870
- setHasMore(incoming.length >= pageSize);
871
- } catch {
872
- if (token !== reqRef.current) return;
873
- if (!append) setRows([]);
874
- setHasMore(false);
875
- } finally {
876
- if (token === reqRef.current) {
877
- setLoading(false);
878
- setLoadingMore(false);
879
- }
880
- }
881
- },
882
- [orgs, pageSize]
883
- );
884
- useEffect(() => {
885
- if (!open || !orgs) return;
886
- void fetchPage(0, debounced, false);
887
- }, [open, debounced, fetchPage, orgs]);
888
- const loadMore = useCallback(() => {
889
- if (loading || loadingMore || !hasMore) return;
890
- void fetchPage(pageRef.current + 1, debounced, true);
891
- }, [loading, loadingMore, hasMore, debounced, fetchPage]);
892
- const visible = useMemo(() => {
893
- if (orgs) return filterOrgs(rows, query);
894
- return [{ name: currentId, displayName: titleCase(currentId) }];
895
- }, [orgs, rows, query, currentId]);
896
- const current = useMemo(() => {
897
- if (given && given.name === currentId) return given;
898
- return rows.find((o) => o.name === currentId) ?? { name: currentId, displayName: titleCase(currentId) };
899
- }, [given, rows, currentId]);
900
- const currentLabel = current.displayName || titleCase(current.name);
901
- const track = useEmit();
902
- const select = useCallback(
903
- (org) => {
904
- track({ component: "OrgSwitcher", action: "select", id: org });
905
- setOpen(false);
906
- scope.switchOrg(org);
907
- },
908
- [scope, track]
909
- );
910
- const submitCreate = async () => {
911
- const name = newName.trim();
912
- if (!name || !create) return;
913
- setBusy(true);
914
- setErr(null);
915
- try {
916
- const org = await create(name);
917
- scope.switchOrg(org);
918
- } catch (e) {
919
- setErr(e instanceof Error ? e.message : "Could not create the organization.");
920
- setBusy(false);
921
- }
922
- };
923
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, placement: "bottom-start", children: [
924
- /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { chromeless: true, height: 44, px: "$2", justify: "flex-start", "aria-label": `${currentLabel} \xB7 switch organization`, children: /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2.5", flex: 1, minW: 0, children: [
925
- /* @__PURE__ */ jsx(OrgMark, { org: current, size: 30 }),
926
- /* @__PURE__ */ jsx(Text, { flex: 1, minW: 0, fontSize: "$4", fontWeight: "800", color: "$color12", numberOfLines: 1, children: currentLabel }),
927
- /* @__PURE__ */ jsx(ChevronsUpDown, { size: 15, color: "$color9" })
928
- ] }) }) }),
929
- /* @__PURE__ */ jsx(Popover.Content, { bordered: true, elevate: true, p: "$2", width: 300, bg: "$color2", borderColor: "$borderColor", children: creating ? /* @__PURE__ */ jsxs(YStack, { gap: "$2", children: [
930
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", fontWeight: "700", children: "Create organization" }),
931
- /* @__PURE__ */ jsx(
932
- Input,
933
- {
934
- size: "$3",
935
- placeholder: "Organization name",
936
- value: newName,
937
- onChangeText: setNewName,
938
- autoCapitalize: "words",
939
- onSubmitEditing: () => void submitCreate()
940
- }
941
- ),
942
- err ? /* @__PURE__ */ jsx(Text, { fontSize: "$1", color: "$red10", children: err }) : null,
943
- /* @__PURE__ */ jsxs(XStack, { gap: "$2", justify: "flex-end", children: [
944
- /* @__PURE__ */ jsx(Button, { size: "$2", chromeless: true, onPress: () => setCreating(false), disabled: busy, children: "Cancel" }),
945
- /* @__PURE__ */ jsx(
946
- Button,
947
- {
948
- size: "$2",
949
- onPress: () => void submitCreate(),
950
- disabled: busy || !newName.trim(),
951
- icon: busy ? /* @__PURE__ */ jsx(Spinner, { size: "small" }) : /* @__PURE__ */ jsx(Plus, { size: 14 }),
952
- children: "Create"
953
- }
954
- )
955
- ] })
956
- ] }) : /* @__PURE__ */ jsxs(YStack, { gap: "$1", children: [
957
- orgs ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$2", py: "$1", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", children: [
958
- /* @__PURE__ */ jsx(Search, { size: 13, opacity: 0.6 }),
959
- /* @__PURE__ */ jsx(
960
- Input,
961
- {
962
- flex: 1,
963
- size: "$2",
964
- borderWidth: 0,
965
- bg: "transparent",
966
- placeholder: "Find organization\u2026",
967
- value: query,
968
- onChangeText: setQuery,
969
- autoCapitalize: "none",
970
- autoCorrect: false
971
- }
972
- )
973
- ] }) : null,
974
- /* @__PURE__ */ jsxs(
975
- "div",
976
- {
977
- style: { maxHeight: 300, overflowY: "auto", display: "flex", flexDirection: "column" },
978
- onScroll: (e) => {
979
- const el = e.currentTarget;
980
- if (el.scrollHeight - el.scrollTop - el.clientHeight < 48) loadMore();
981
- },
982
- children: [
983
- loading ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$2", py: "$3", children: [
984
- /* @__PURE__ */ jsx(Spinner, { size: "small", color: "$color11" }),
985
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color10", children: "Loading organizations\u2026" })
986
- ] }) : visible.length === 0 ? /* @__PURE__ */ jsx(Text, { px: "$2", py: "$2", fontSize: "$2", color: "$color10", children: query.trim() ? `No organizations match \u201C${query.trim()}\u201D.` : "No organizations yet." }) : visible.map((org) => /* @__PURE__ */ jsxs(
987
- XStack,
988
- {
989
- onPress: () => select(org.name),
990
- cursor: "pointer",
991
- items: "center",
992
- gap: "$2.5",
993
- px: "$2",
994
- py: "$2",
995
- rounded: "$3",
996
- bg: org.name === currentId ? "$color4" : "transparent",
997
- hoverStyle: { bg: "$color5" },
998
- children: [
999
- /* @__PURE__ */ jsx(OrgMark, { org }),
1000
- /* @__PURE__ */ jsx(Text, { flex: 1, fontSize: "$2", color: "$color12", numberOfLines: 1, children: org.displayName || org.name }),
1001
- org.name === currentId ? /* @__PURE__ */ jsx(Check, { size: 15 }) : null
1002
- ]
1003
- },
1004
- org.name
1005
- )),
1006
- loadingMore ? /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", px: "$2", py: "$2", children: [
1007
- /* @__PURE__ */ jsx(Spinner, { size: "small", color: "$color11" }),
1008
- /* @__PURE__ */ jsx(Text, { fontSize: "$1", color: "$color10", children: "Loading more\u2026" })
1009
- ] }) : hasMore ? /* @__PURE__ */ jsx(XStack, { onPress: loadMore, cursor: "pointer", items: "center", justify: "center", px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, children: /* @__PURE__ */ jsx(Text, { fontSize: "$1", color: "$color11", fontWeight: "600", children: "Load more" }) }) : null
1010
- ]
1011
- }
1012
- ),
1013
- create ? /* @__PURE__ */ jsxs(
1014
- XStack,
1015
- {
1016
- onPress: () => {
1017
- setCreating(true);
1018
- setErr(null);
1019
- },
1020
- cursor: "pointer",
1021
- items: "center",
1022
- gap: "$2.5",
1023
- px: "$2",
1024
- py: "$2",
1025
- mt: "$1",
1026
- rounded: "$3",
1027
- borderTopWidth: 1,
1028
- borderColor: "$borderColor",
1029
- hoverStyle: { bg: "$color5" },
1030
- children: [
1031
- /* @__PURE__ */ jsx(YStack, { width: 22, height: 22, rounded: "$3", bg: "$color3", items: "center", justify: "center", children: /* @__PURE__ */ jsx(Plus, { size: 14 }) }),
1032
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", children: "Create organization" })
1033
- ]
1034
- }
1035
- ) : null,
1036
- picker ? /* @__PURE__ */ jsxs(
1037
- XStack,
1038
- {
1039
- onPress: () => {
1040
- setOpen(false);
1041
- scope.leaveOrg();
1042
- },
1043
- cursor: "pointer",
1044
- items: "center",
1045
- gap: "$2.5",
1046
- px: "$2",
1047
- py: "$2",
1048
- rounded: "$3",
1049
- hoverStyle: { bg: "$color5" },
1050
- children: [
1051
- /* @__PURE__ */ jsx(YStack, { width: 22, height: 22, rounded: "$3", bg: "$color3", items: "center", justify: "center", children: /* @__PURE__ */ jsx(LayoutGrid, { size: 14 }) }),
1052
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", children: "All organizations" })
1053
- ]
1054
- }
1055
- ) : null
1056
- ] }) })
1057
- ] });
1058
- }
1059
- function ContextMenu({ children, items, disabled, minWidth = 200, maxHeight }) {
1060
- const [state, setState] = useState({ open: false, x: 0, y: 0 });
1061
- const close = useCallback(() => setState((s) => s.open ? { ...s, open: false } : s), []);
1062
- const anchorRect = useCallback(
1063
- () => ({ left: state.x, top: state.y, right: state.x, bottom: state.y, width: 0, height: 0 }),
1064
- [state.x, state.y]
1065
- );
1066
- const childOnContextMenu = children.props.onContextMenu;
1067
- const target = cloneElement(children, {
1068
- onContextMenu: (e) => {
1069
- childOnContextMenu?.(e);
1070
- if (disabled) return;
1071
- e.preventDefault();
1072
- e.stopPropagation();
1073
- setState({ open: true, x: e.clientX, y: e.clientY });
1074
- }
1075
- });
1076
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1077
- target,
1078
- /* @__PURE__ */ jsx(FloatingMenu, { open: state.open, onClose: close, anchorRect, gap: 0, minWidth, maxHeight, children: renderMenuItems(items, close) })
1079
- ] });
1080
- }
1081
- var isExternal = (href) => /^https?:\/\//.test(href);
1082
- var defaultLink = ({ href, children, onNavigate }) => /* @__PURE__ */ jsx(
1083
- "a",
1084
- {
1085
- href,
1086
- onClick: onNavigate,
1087
- ...isExternal(href) ? { target: "_blank", rel: "noopener noreferrer" } : null,
1088
- style: { textDecoration: "none", color: "inherit", display: "block" },
1089
- children
1090
- }
1091
- );
1092
- function ProductCell({ product, link, icon, close }) {
1093
- const glyph = icon?.(product.id);
1094
- return /* @__PURE__ */ jsx(YStack, { minW: 200, flex: 1, flexBasis: 200, children: link({
1095
- href: product.url,
1096
- onNavigate: close,
1097
- children: /* @__PURE__ */ jsxs(XStack, { gap: "$2.5", items: "flex-start", p: "$2.5", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$color4" }, children: [
1098
- glyph ? /* @__PURE__ */ jsx(YStack, { pt: "$0.5", children: glyph }) : null,
1099
- /* @__PURE__ */ jsxs(YStack, { minW: 0, gap: "$0.5", children: [
1100
- product.verb ? /* @__PURE__ */ jsx(Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.4, children: product.verb }) : null,
1101
- /* @__PURE__ */ jsx(Text, { fontSize: "$3", color: "$color12", children: product.name }),
1102
- /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "$color10", lineHeight: 16, children: product.job })
1103
- ] })
1104
- ] })
1105
- }) });
1106
- }
1107
- function Column({ title, links, link, icon, close }) {
1108
- return /* @__PURE__ */ jsxs(YStack, { minW: 160, flex: 1, gap: "$1", children: [
1109
- /* @__PURE__ */ jsx(Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.5, px: "$2", pb: "$1", children: title }),
1110
- links.map((l) => /* @__PURE__ */ jsxs(XStack, { px: "$2", py: "$1", rounded: "$3", hoverStyle: { bg: "$color4" }, gap: "$2", items: "center", children: [
1111
- icon?.(l.id) ?? null,
1112
- link({
1113
- href: l.href,
1114
- onNavigate: close,
1115
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", children: l.label })
1116
- })
1117
- ] }, l.id))
1118
- ] });
1119
- }
1120
- function Launcher({ menu, link, icon, close }) {
1121
- return /* @__PURE__ */ jsxs(
1122
- YStack,
1123
- {
1124
- position: "absolute",
1125
- t: 52,
1126
- l: 0,
1127
- r: 0,
1128
- z: 50,
1129
- bg: "$background",
1130
- borderBottomWidth: 1,
1131
- borderColor: "$borderColor",
1132
- px: "$4",
1133
- py: "$4",
1134
- gap: "$3",
1135
- maxH: "80vh",
1136
- overflow: "scroll",
1137
- children: [
1138
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [
1139
- /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", children: menu.eyebrow }),
1140
- /* @__PURE__ */ jsx(XStack, { ml: "auto", children: link({
1141
- href: menu.allProducts.href,
1142
- onNavigate: close,
1143
- children: /* @__PURE__ */ jsxs(Text, { fontSize: "$2", color: "$color12", children: [
1144
- menu.allProducts.label,
1145
- " \u2192"
1146
- ] })
1147
- }) })
1148
- ] }),
1149
- /* @__PURE__ */ jsx(XStack, { gap: "$2.5", flexWrap: "wrap", children: menu.products.map((p) => /* @__PURE__ */ jsx(ProductCell, { product: p, link, icon, close }, p.id)) }),
1150
- /* @__PURE__ */ jsx(Separator, {}),
1151
- /* @__PURE__ */ jsxs(XStack, { gap: "$4", flexWrap: "wrap", items: "flex-start", children: [
1152
- /* @__PURE__ */ jsx(Column, { title: "Platform", links: menu.utilities, link, icon, close }),
1153
- /* @__PURE__ */ jsx(Column, { title: "Install", links: menu.installs, link, icon, close })
1154
- ] })
1155
- ]
1156
- }
1157
- );
1158
- }
1159
- function Cta({ action, link }) {
1160
- return /* @__PURE__ */ jsx(XStack, { bg: "$color12", px: "$3", py: "$1.5", rounded: "$3", hoverStyle: { opacity: 0.9 }, children: link({
1161
- href: action.href,
1162
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$background", children: action.label })
1163
- }) });
1164
- }
1165
- function MobilePanel({ header, menu, link, icon, close }) {
1166
- return /* @__PURE__ */ jsxs(
1167
- YStack,
1168
- {
1169
- position: "absolute",
1170
- t: 52,
1171
- l: 0,
1172
- r: 0,
1173
- z: 50,
1174
- bg: "$background",
1175
- borderBottomWidth: 1,
1176
- borderColor: "$borderColor",
1177
- px: "$3",
1178
- py: "$3",
1179
- gap: "$3",
1180
- maxH: "80vh",
1181
- overflow: "scroll",
1182
- children: [
1183
- /* @__PURE__ */ jsx(YStack, { gap: "$1", children: header.localNav.map((l) => /* @__PURE__ */ jsx(XStack, { px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, children: link({
1184
- href: l.href,
1185
- onNavigate: close,
1186
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$3", color: "$color12", children: l.label })
1187
- }) }, l.id)) }),
1188
- menu ? /* @__PURE__ */ jsxs(Fragment, { children: [
1189
- /* @__PURE__ */ jsx(Separator, {}),
1190
- /* @__PURE__ */ jsx(YStack, { gap: "$1", children: menu.products.map((p) => /* @__PURE__ */ jsxs(XStack, { px: "$2", py: "$1.5", rounded: "$3", hoverStyle: { bg: "$color4" }, gap: "$2", items: "center", children: [
1191
- icon?.(p.id) ?? null,
1192
- link({
1193
- href: p.url,
1194
- onNavigate: close,
1195
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$3", color: "$color12", children: p.name })
1196
- })
1197
- ] }, p.id)) }),
1198
- /* @__PURE__ */ jsx(Separator, {}),
1199
- /* @__PURE__ */ jsx(Column, { title: "Platform", links: menu.utilities, link, icon, close }),
1200
- /* @__PURE__ */ jsx(Column, { title: "Install", links: menu.installs, link, icon, close })
1201
- ] }) : null
1202
- ]
1203
- }
1204
- );
1205
- }
1206
- function SiteNav({ header, menu, brand, actions, link = defaultLink, icon, active, meetLabel = "Meet Hanzo" }) {
1207
- const [launcher, setLauncher] = useState(false);
1208
- const [mobile, setMobile] = useState(false);
1209
- const root = useRef(null);
1210
- useEffect(() => {
1211
- if (!launcher && !mobile) return;
1212
- const dismiss = () => {
1213
- setLauncher(false);
1214
- setMobile(false);
1215
- };
1216
- const onKey = (e) => {
1217
- if (e.key === "Escape") dismiss();
1218
- };
1219
- const onDown = (e) => {
1220
- if (root.current && !root.current.contains(e.target)) dismiss();
1221
- };
1222
- document.addEventListener("keydown", onKey);
1223
- document.addEventListener("mousedown", onDown);
1224
- return () => {
1225
- document.removeEventListener("keydown", onKey);
1226
- document.removeEventListener("mousedown", onDown);
1227
- };
1228
- }, [launcher, mobile]);
1229
- return /* @__PURE__ */ jsxs(YStack, { ref: root, position: "relative", bg: "$background", children: [
1230
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$1", px: "$3", height: 52, borderBottomWidth: 1, borderColor: "$borderColor", children: [
1231
- brand ? /* @__PURE__ */ jsx(XStack, { items: "center", pr: "$2", children: brand }) : null,
1232
- menu ? /* @__PURE__ */ jsx(
1233
- XStack,
1234
- {
1235
- cursor: "pointer",
1236
- px: "$2.5",
1237
- py: "$1.5",
1238
- rounded: "$3",
1239
- bg: launcher ? "$color4" : "transparent",
1240
- hoverStyle: { bg: "$color4" },
1241
- onPress: () => setLauncher(!launcher),
1242
- accessibilityRole: "button",
1243
- "aria-expanded": launcher,
1244
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", children: meetLabel })
1245
- }
1246
- ) : null,
1247
- /* @__PURE__ */ jsx(XStack, { items: "center", gap: "$0.5", flex: 1, minW: 0, $sm: { display: "none" }, children: header.localNav.map((l) => /* @__PURE__ */ jsx(
1248
- XStack,
1249
- {
1250
- px: "$2.5",
1251
- py: "$1.5",
1252
- rounded: "$3",
1253
- hoverStyle: { bg: "$color4" },
1254
- onMouseEnter: () => launcher && setLauncher(false),
1255
- children: link({
1256
- href: l.href,
1257
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: active === l.id ? "$color12" : "$color11", children: l.label })
1258
- })
1259
- },
1260
- l.id
1261
- )) }),
1262
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$2", ml: "auto", children: [
1263
- actions,
1264
- /* @__PURE__ */ jsx(Cta, { action: header.action, link }),
1265
- /* @__PURE__ */ jsx(
1266
- XStack,
1267
- {
1268
- display: "none",
1269
- $sm: { display: "flex" },
1270
- cursor: "pointer",
1271
- px: "$2",
1272
- py: "$1.5",
1273
- rounded: "$3",
1274
- hoverStyle: { bg: "$color4" },
1275
- onPress: () => setMobile(!mobile),
1276
- accessibilityRole: "button",
1277
- "aria-label": mobile ? "Close menu" : "Open menu",
1278
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color12", children: mobile ? "Close" : "Menu" })
1279
- }
1280
- )
1281
- ] })
1282
- ] }),
1283
- launcher && menu ? /* @__PURE__ */ jsx(Launcher, { menu, link, icon, close: () => setLauncher(false) }) : null,
1284
- mobile ? /* @__PURE__ */ jsx(MobilePanel, { header, menu, link, icon, close: () => setMobile(false) }) : null
1285
- ] });
1286
- }
1287
- var isExternal2 = (href) => /^https?:\/\//.test(href);
1288
- var defaultLink2 = ({ href, children }) => /* @__PURE__ */ jsx(
1289
- "a",
1290
- {
1291
- href,
1292
- ...isExternal2(href) ? { target: "_blank", rel: "noopener noreferrer" } : null,
1293
- style: { textDecoration: "none", color: "inherit" },
1294
- children
1295
- }
1296
- );
1297
- function SiteFooter({ footer, brand, tagline, meta, link = defaultLink2 }) {
1298
- return /* @__PURE__ */ jsxs(YStack, { borderTopWidth: 1, borderColor: "$borderColor", bg: "$background", px: "$4", py: "$5", gap: "$4", children: [
1299
- /* @__PURE__ */ jsxs(XStack, { gap: "$5", flexWrap: "wrap", items: "flex-start", children: [
1300
- brand || tagline ? /* @__PURE__ */ jsxs(YStack, { gap: "$2", minW: 200, flex: 1, children: [
1301
- brand,
1302
- tagline ? /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "$color10", lineHeight: 18, maxW: 280, children: tagline }) : null
1303
- ] }) : null,
1304
- footer.columns.map((column) => /* @__PURE__ */ jsxs(YStack, { gap: "$1.5", minW: 140, children: [
1305
- /* @__PURE__ */ jsx(Text, { fontSize: 11, color: "$color10", textTransform: "uppercase", letterSpacing: 0.5, pb: "$1", children: column.title }),
1306
- column.links.map((l) => /* @__PURE__ */ jsx(XStack, { hoverStyle: { opacity: 0.7 }, children: link({
1307
- href: l.href,
1308
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", children: l.label })
1309
- }) }, l.id))
1310
- ] }, column.id))
1311
- ] }),
1312
- /* @__PURE__ */ jsx(Separator, {}),
1313
- /* @__PURE__ */ jsxs(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [
1314
- /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "$color10", children: footer.legal.copyright }),
1315
- /* @__PURE__ */ jsx(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: footer.legal.links.map((l) => /* @__PURE__ */ jsx(XStack, { hoverStyle: { opacity: 0.7 }, children: link({
1316
- href: l.href,
1317
- children: /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "$color10", children: l.label })
1318
- }) }, l.id)) }),
1319
- meta ? /* @__PURE__ */ jsx(XStack, { ml: "auto", items: "center", gap: "$3", children: meta }) : null
1320
- ] })
1321
- ] });
1322
- }
1323
- function CommerceResource({
1324
- title,
1325
- subtitle,
1326
- load,
1327
- columns,
1328
- rowKey,
1329
- empty,
1330
- hint,
1331
- actions
1332
- }) {
1333
- const [state, setState] = useState({ phase: "loading" });
1334
- const loadRef = useRef(load);
1335
- loadRef.current = load;
1336
- const reload = useCallback(() => {
1337
- setState({ phase: "loading" });
1338
- loadRef.current().then((r) => setState({ phase: "ready", data: r.rows })).catch((e) => setState({ phase: "error", error: classifyBackend(e) }));
1339
- }, []);
1340
- useEffect(() => {
1341
- reload();
1342
- }, [reload]);
1343
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1344
- /* @__PURE__ */ jsx(
1345
- PageHeader,
1346
- {
1347
- title,
1348
- subtitle,
1349
- actions: /* @__PURE__ */ jsxs(XStack, { gap: "$2", children: [
1350
- actions?.(reload),
1351
- /* @__PURE__ */ jsx(Button, { size: "$2", icon: /* @__PURE__ */ jsx(RefreshCw, { size: 15 }), onPress: reload, children: "Refresh" })
1352
- ] })
1353
- }
1354
- ),
1355
- state.phase === "error" ? /* @__PURE__ */ jsx(BackendStateCard, { state: state.error, onRetry: reload, hint }) : /* @__PURE__ */ jsx(
1356
- DataTable,
1357
- {
1358
- columns,
1359
- rows: state.phase === "ready" ? state.data : [],
1360
- loading: state.phase === "loading",
1361
- rowKey,
1362
- empty
1363
- }
1364
- )
1365
- ] });
1366
- }
1367
- function ConfirmDelete({
1368
- message,
1369
- confirmLabel,
1370
- run,
1371
- onDone
1372
- }) {
1373
- const [busy, setBusy] = useState(false);
1374
- const [err, setErr] = useState(null);
1375
- const track = useEmit();
1376
- const go = async () => {
1377
- setBusy(true);
1378
- setErr(null);
1379
- track({ component: "ConfirmDelete", action: "confirm", id: confirmLabel });
1380
- try {
1381
- await run();
1382
- onDone();
1383
- } catch (e) {
1384
- const message2 = classifyBackend(e).message || "Failed to delete.";
1385
- track({ component: "ConfirmDelete", action: "error", id: confirmLabel, value: message2 });
1386
- setErr(message2);
1387
- setBusy(false);
1388
- }
1389
- };
1390
- return /* @__PURE__ */ jsxs(YStack, { gap: "$3", children: [
1391
- /* @__PURE__ */ jsx(Text, { fontSize: "$3", color: "$color11", children: message }),
1392
- err ? /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$red10", children: err }) : null,
1393
- /* @__PURE__ */ jsxs(XStack, { gap: "$2", flexWrap: "wrap", children: [
1394
- /* @__PURE__ */ jsx(
1395
- Button,
1396
- {
1397
- onPress: go,
1398
- disabled: busy,
1399
- icon: /* @__PURE__ */ jsx(Trash2, { size: 15 }),
1400
- style: { backgroundColor: "#dc2626", borderColor: "#dc2626", color: "#fff" },
1401
- children: busy ? "Deleting\u2026" : confirmLabel
1402
- }
1403
- ),
1404
- /* @__PURE__ */ jsx(
1405
- Button,
1406
- {
1407
- chromeless: true,
1408
- onPress: () => {
1409
- track({ component: "ConfirmDelete", action: "cancel", id: confirmLabel });
1410
- onDone();
1411
- },
1412
- disabled: busy,
1413
- children: "Cancel"
1414
- }
1415
- )
1416
- ] })
1417
- ] });
1418
- }
1419
- function Segmented({
1420
- options,
1421
- value,
1422
- onChange,
1423
- size = "$2",
1424
- name
1425
- }) {
1426
- const track = useEmit();
1427
- return /* @__PURE__ */ jsx(XStack, { gap: "$1", flexWrap: "wrap", items: "center", children: options.map((o) => {
1428
- const active = o.value === value;
1429
- return /* @__PURE__ */ jsx(
1430
- Button,
1431
- {
1432
- size,
1433
- bg: active ? "$color5" : "transparent",
1434
- borderWidth: 1,
1435
- borderColor: active ? "$color7" : "$borderColor",
1436
- "aria-pressed": active,
1437
- onPress: () => {
1438
- track({ component: "Segmented", action: "filter", id: name, value: o.value });
1439
- onChange(o.value);
1440
- },
1441
- children: /* @__PURE__ */ jsx(Text, { fontSize: "$2", fontWeight: active ? "700" : "500", color: active ? "$color12" : "$color11", children: o.label })
1442
- },
1443
- o.value
1444
- );
1445
- }) });
1446
- }
1447
- function SearchInput({
1448
- value,
1449
- onChange,
1450
- placeholder,
1451
- name
1452
- }) {
1453
- const track = useEmit();
1454
- const onChangeTracked = (v) => {
1455
- track({ component: "SearchInput", action: "search", id: name, value: textSize(v) });
1456
- onChange(v);
1457
- };
1458
- return /* @__PURE__ */ jsxs(XStack, { flex: 1, minW: 180, items: "center", gap: "$2", px: "$3", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$color1", children: [
1459
- /* @__PURE__ */ jsx(Search, { size: 15, color: "$color10" }),
1460
- /* @__PURE__ */ jsx(Input, { flex: 1, value, onChangeText: onChangeTracked, placeholder, borderWidth: 0, bg: "transparent", px: "$0", fontSize: "$3" })
1461
- ] });
1462
- }
1463
-
1464
- // src/product/brand.ts
1465
- var HANZO_MARK_CONTENT = '<path d="M22.21 67V44.6369H0V67H22.21Z"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/><path d="M22.21 0H0V22.3184H22.21V0Z"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>';
1466
- var HANZO = {
1467
- id: "hanzo",
1468
- name: "Hanzo",
1469
- viewBox: "0 0 67 67",
1470
- content: HANZO_MARK_CONTENT,
1471
- href: "https://hanzo.ai"
1472
- };
1473
- var LUX = {
1474
- id: "lux",
1475
- name: "Lux",
1476
- viewBox: "0 0 100 100",
1477
- content: '<path d="M50 85 L15 25 L85 25 Z"/>',
1478
- href: "https://lux.network"
1479
- };
1480
- var ZOO = {
1481
- id: "zoo",
1482
- name: "Zoo",
1483
- viewBox: "0 0 1024 1024",
1484
- fullColor: true,
1485
- content: '<defs><clipPath id="zooClip"><circle cx="512" cy="511" r="270"/></clipPath><clipPath id="zooGClip"><circle cx="513" cy="369" r="234"/></clipPath><clipPath id="zooRClip"><circle cx="365" cy="595" r="234"/></clipPath></defs><g clip-path="url(#zooClip)"><circle cx="513" cy="369" r="234" fill="#00A652"/><circle cx="365" cy="595" r="234" fill="#ED1C24"/><circle cx="643" cy="595" r="234" fill="#2E3192"/><g clip-path="url(#zooGClip)"><circle cx="365" cy="595" r="234" fill="#FCF006"/><circle cx="643" cy="595" r="234" fill="#01ACF1"/></g><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#EA018E"/></g><g clip-path="url(#zooGClip)"><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#FFFFFF"/></g></g></g>',
1486
- href: "https://zoo.ngo"
1487
- };
1488
- var PARS = {
1489
- id: "pars",
1490
- name: "Pars",
1491
- viewBox: "-120 -120 240 240",
1492
- content: '<path d="M0,-100 L30,-60 L100,-40 L60,0 L100,40 L30,60 L0,100 L-30,60 L-100,40 L-60,0 L-100,-40 L-30,-60 Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"/><path d="M0,-70 L22,-42 L70,-28 L42,0 L70,28 L22,42 L0,70 L-22,42 L-70,28 L-42,0 L-70,-28 L-22,-42 Z" fill="currentColor" fill-opacity="0.15" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/><circle r="55" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="35" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="8" fill="currentColor"/>',
1493
- href: "https://pars.network"
1494
- };
1495
- var BRANDS = { hanzo: HANZO, lux: LUX, zoo: ZOO, pars: PARS };
1496
- function resolveBrand(id) {
1497
- return id && BRANDS[id] || HANZO;
1498
- }
1499
-
1500
- // src/product/animatedLogo.logic.ts
1501
- var HOUSE_EASE = "cubic-bezier(0.16, 1, 0.3, 1)";
1502
- var DEFAULT_DURATION_MS = 360;
1503
- var DEFAULT_INTRO_MS = 1500;
1504
- var DEFAULT_GAP = 8;
1505
- function wordmarkText(name, surface) {
1506
- const s = surface?.trim();
1507
- return s ? `${name} ${s}` : name;
1508
- }
1509
- function isExpanded(s) {
1510
- return s.hovered || s.focused || s.introShowing;
1511
- }
1512
- function wordmarkStyle(i) {
1513
- return {
1514
- width: i.expanded ? i.naturalWidth ?? "auto" : 0,
1515
- opacity: i.expanded ? 1 : 0,
1516
- marginLeft: i.expanded ? i.gap : 0,
1517
- transition: i.reduce ? "none" : `width ${i.durationMs}ms ${i.easing}, opacity ${i.durationMs}ms ${i.easing}, margin-left ${i.durationMs}ms ${i.easing}`
1518
- };
1519
- }
1520
- function usePrefersReducedMotion() {
1521
- const [reduce, setReduce] = useState(false);
1522
- useEffect(() => {
1523
- if (typeof window === "undefined" || !window.matchMedia) return;
1524
- const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
1525
- const sync = () => setReduce(mq.matches);
1526
- sync();
1527
- mq.addEventListener("change", sync);
1528
- return () => mq.removeEventListener("change", sync);
1529
- }, []);
1530
- return reduce;
1531
- }
1532
- function AnimatedLogo({
1533
- surface,
1534
- brand = HANZO,
1535
- size = 22,
1536
- gap = DEFAULT_GAP,
1537
- introMs = DEFAULT_INTRO_MS,
1538
- durationMs = DEFAULT_DURATION_MS,
1539
- easing = HOUSE_EASE,
1540
- href,
1541
- onClick,
1542
- component,
1543
- className,
1544
- style,
1545
- "aria-label": ariaLabel
1546
- }) {
1547
- const reduce = usePrefersReducedMotion();
1548
- const label = ariaLabel ?? wordmarkText(brand.name, surface);
1549
- const [hovered, setHovered] = useState(false);
1550
- const [focused, setFocused] = useState(false);
1551
- const [introShowing, setIntroShowing] = useState(introMs > 0);
1552
- const [naturalWidth, setNaturalWidth] = useState(void 0);
1553
- const wordRef = useRef(null);
1554
- useEffect(() => {
1555
- if (introMs <= 0) return;
1556
- if (reduce) {
1557
- setIntroShowing(false);
1558
- return;
1559
- }
1560
- const t = setTimeout(() => setIntroShowing(false), introMs);
1561
- return () => clearTimeout(t);
1562
- }, [introMs, reduce]);
1563
- useLayoutEffect(() => {
1564
- const el = wordRef.current;
1565
- if (!el) return;
1566
- const measure = () => setNaturalWidth(el.scrollWidth);
1567
- measure();
1568
- const fonts = typeof document !== "undefined" && document.fonts || null;
1569
- if (fonts?.ready) fonts.ready.then(measure).catch(() => {
1570
- });
1571
- }, [brand.name, surface]);
1572
- const expanded = isExpanded({ hovered, focused, introShowing });
1573
- const ws = wordmarkStyle({ expanded, naturalWidth, gap, durationMs, easing, reduce });
1574
- const Root = component ?? "a";
1575
- const isAnchor = Root === "a";
1576
- return /* @__PURE__ */ jsxs(
1577
- Root,
1578
- {
1579
- ...isAnchor ? { href: href ?? brand.href ?? "/" } : { href: href ?? brand.href },
1580
- onClick,
1581
- "aria-label": label,
1582
- title: label,
1583
- className,
1584
- onMouseEnter: () => setHovered(true),
1585
- onMouseLeave: () => setHovered(false),
1586
- onFocus: () => setFocused(true),
1587
- onBlur: () => setFocused(false),
1588
- style: {
1589
- display: "inline-flex",
1590
- alignItems: "center",
1591
- textDecoration: "none",
1592
- color: "inherit",
1593
- cursor: "pointer",
1594
- ...style
1595
- },
1596
- children: [
1597
- /* @__PURE__ */ jsx(
1598
- "svg",
1599
- {
1600
- width: size,
1601
- height: size,
1602
- viewBox: brand.viewBox,
1603
- "aria-hidden": "true",
1604
- focusable: "false",
1605
- fill: brand.fullColor ? void 0 : "currentColor",
1606
- style: { display: "block", flexShrink: 0 },
1607
- dangerouslySetInnerHTML: { __html: brand.content }
1608
- }
1609
- ),
1610
- /* @__PURE__ */ jsx(
1611
- "span",
1612
- {
1613
- ref: wordRef,
1614
- "aria-hidden": "true",
1615
- style: {
1616
- display: "inline-block",
1617
- overflow: "hidden",
1618
- whiteSpace: "nowrap",
1619
- fontWeight: 600,
1620
- fontSize: 15,
1621
- letterSpacing: "-0.01em",
1622
- lineHeight: 1,
1623
- width: ws.width,
1624
- opacity: ws.opacity,
1625
- marginLeft: ws.marginLeft,
1626
- transition: ws.transition
1627
- },
1628
- children: label
1629
- }
1630
- )
1631
- ]
1632
- }
1633
- );
1634
- }
1635
- function FadeIn({
1636
- children,
1637
- index = 0,
1638
- step = 50,
1639
- delayMs,
1640
- style
1641
- }) {
1642
- const delay = delayMs ?? index * step;
1643
- return /* @__PURE__ */ jsx("div", { className: "hz-fade-up", style: { animationDelay: `${delay}ms`, ...style }, children });
1644
- }
1645
- function ProductIcon({
1646
- icon: Icon,
1647
- color,
1648
- size = 24
1649
- }) {
1650
- const radius = Math.round(size * 0.28);
1651
- const glyph = Math.round(size * 0.58);
1652
- const tinted = typeof color === "string" && color.trim() !== "";
1653
- if (tinted) {
1654
- return /* @__PURE__ */ jsx(
1655
- XStack,
1656
- {
1657
- width: size,
1658
- height: size,
1659
- items: "center",
1660
- justify: "center",
1661
- rounded: radius,
1662
- style: { backgroundColor: color },
1663
- children: /* @__PURE__ */ jsx(Icon, { size: glyph, color: asColor("#ffffff") })
1664
- }
1665
- );
1666
- }
1667
- return /* @__PURE__ */ jsx(XStack, { width: size, height: size, items: "center", justify: "center", rounded: radius, bg: "$color12", children: /* @__PURE__ */ jsx(Icon, { size: glyph, color: "$color1" }) });
1668
- }
1669
- var KNOWN = {
1670
- openrouter: Globe,
1671
- nvidia: Cpu
1672
- };
1673
- var isFirstParty = (provider) => {
1674
- const p = provider.trim().toLowerCase();
1675
- return p === "hanzo" || p === "zen";
1676
- };
1677
- function EnsoMark({ size, color }) {
1678
- return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 100 100", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M66.22 83.26 A37 37 0 1 1 85.57 60.20", fill: "none", stroke: color, strokeWidth: 11, strokeLinecap: "round" }) });
1679
- }
1680
- var HANZO_PATHS = [
1681
- "M22.21 67V44.6369H0V67H22.21Z",
1682
- "M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",
1683
- "M22.21 0H0V22.3184H22.21V0Z",
1684
- "M66.7198 0H44.5098V22.3184H66.7198V0Z",
1685
- "M66.7198 67V44.6369H44.5098V67H66.7198Z"
1686
- ];
1687
- function HanzoHMark({ size, color }) {
1688
- return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 67 67", "aria-hidden": "true", children: HANZO_PATHS.map((d) => /* @__PURE__ */ jsx("path", { d, fill: color }, d)) });
1689
- }
1690
- function providerInitials(provider) {
1691
- const name = provider.trim();
1692
- if (!name) return "\u2022";
1693
- const words = name.split(/[\s/_-]+/).filter(Boolean);
1694
- if (words.length >= 2) return (words[0][0] + words[1][0]).toUpperCase();
1695
- return name.slice(0, 2).toUpperCase();
1696
- }
1697
- function ProviderLogo({ provider, size = 24 }) {
1698
- const theme = useTheme();
1699
- const radius = Math.round(size * 0.28);
1700
- const iconSize = Math.round(size * 0.56);
1701
- if (isFirstParty(provider)) {
1702
- const fg = theme.color1?.get() ?? "#000000";
1703
- const markSize = Math.round(size * 0.66);
1704
- const isZen = provider.trim().toLowerCase() === "zen";
1705
- return /* @__PURE__ */ jsx(XStack, { width: size, height: size, items: "center", justify: "center", rounded: radius, bg: "$color12", children: isZen ? /* @__PURE__ */ jsx(EnsoMark, { size: markSize, color: fg }) : /* @__PURE__ */ jsx(HanzoHMark, { size: Math.round(size * 0.56), color: fg }) });
1706
- }
1707
- const Known = KNOWN[provider.trim().toLowerCase()];
1708
- if (Known) {
1709
- return /* @__PURE__ */ jsx(
1710
- XStack,
1711
- {
1712
- width: size,
1713
- height: size,
1714
- items: "center",
1715
- justify: "center",
1716
- rounded: radius,
1717
- bg: "$color3",
1718
- borderWidth: 1,
1719
- borderColor: "$borderColor",
1720
- children: /* @__PURE__ */ jsx(Known, { size: iconSize, color: "$color11" })
1721
- }
1722
- );
1723
- }
1724
- return /* @__PURE__ */ jsx(
1725
- XStack,
1726
- {
1727
- width: size,
1728
- height: size,
1729
- items: "center",
1730
- justify: "center",
1731
- rounded: radius,
1732
- bg: "$color3",
1733
- borderWidth: 1,
1734
- borderColor: "$borderColor",
1735
- children: /* @__PURE__ */ jsx(Text, { fontSize: Math.round(size * 0.4), fontWeight: "800", color: "$color11", children: providerInitials(provider) })
1736
- }
1737
- );
1738
- }
1739
- function GenericLogo({ size = 24 }) {
1740
- return /* @__PURE__ */ jsx(XStack, { width: size, height: size, items: "center", justify: "center", rounded: Math.round(size * 0.28), bg: "$color3", borderWidth: 1, borderColor: "$borderColor", children: /* @__PURE__ */ jsx(Server, { size: Math.round(size * 0.56), color: "$color11" }) });
1741
- }
1742
- function targetIndex(from, dy, rowH, count) {
1743
- if (rowH <= 0 || count <= 0) return from;
1744
- const raw = from + Math.round(dy / rowH);
1745
- return Math.max(0, Math.min(raw, count - 1));
1746
- }
1747
- function rowShift(i, from, to, dy, rowH) {
1748
- if (i === from) return dy;
1749
- if (from < to && i > from && i <= to) return -rowH;
1750
- if (from > to && i < from && i >= to) return rowH;
1751
- return 0;
1752
- }
1753
- function Reorder({
1754
- items,
1755
- keyOf,
1756
- rowHeight = 44,
1757
- onReorder,
1758
- renderItem
1759
- }) {
1760
- const [drag, setDrag] = useState(null);
1761
- const startRef = useRef(null);
1762
- const to = drag ? targetIndex(drag.from, drag.dy, rowHeight, items.length) : -1;
1763
- const begin = useCallback(
1764
- (index) => (e) => {
1765
- const startY = e.clientY ?? e.nativeEvent?.clientY ?? 0;
1766
- startRef.current = { from: index, startY };
1767
- setDrag({ from: index, dy: 0 });
1768
- const move = (ev) => {
1769
- if (!startRef.current) return;
1770
- setDrag({ from: startRef.current.from, dy: ev.clientY - startRef.current.startY });
1771
- };
1772
- const end = () => {
1773
- const s = startRef.current;
1774
- window.removeEventListener("pointermove", move);
1775
- window.removeEventListener("pointerup", end);
1776
- window.removeEventListener("pointercancel", end);
1777
- startRef.current = null;
1778
- setDrag((d) => {
1779
- if (s && d) {
1780
- const t = targetIndex(s.from, d.dy, rowHeight, items.length);
1781
- if (t !== s.from) onReorder(s.from, t);
1782
- }
1783
- return null;
1784
- });
1785
- };
1786
- window.addEventListener("pointermove", move);
1787
- window.addEventListener("pointerup", end);
1788
- window.addEventListener("pointercancel", end);
1789
- },
1790
- [items.length, rowHeight, onReorder]
1791
- );
1792
- return /* @__PURE__ */ jsx(YStack, { children: items.map((item, i) => {
1793
- const dragging = drag?.from === i;
1794
- const shift = drag && to >= 0 ? rowShift(i, drag.from, to, drag.dy, rowHeight) : 0;
1795
- return /* @__PURE__ */ jsx(
1796
- YStack,
1797
- {
1798
- height: rowHeight,
1799
- justify: "center",
1800
- className: "hz-drag-item",
1801
- style: {
1802
- transform: `translateY(${shift}px)`,
1803
- zIndex: dragging ? 2 : 1,
1804
- ...dragging ? { transition: "none", boxShadow: "0 8px 24px rgba(0,0,0,0.28)" } : null
1805
- },
1806
- children: renderItem(item, { onPointerDown: begin(i) }, dragging)
1807
- },
1808
- keyOf(item)
1809
- );
1810
- }) });
1811
- }
1812
- var ToastContext = createContext(null);
1813
- var ACCENT2 = {
1814
- success: "$green10",
1815
- error: "$red10",
1816
- info: "$color11"
1817
- };
1818
- var ICON = {
1819
- success: CircleCheck,
1820
- error: CircleX,
1821
- info: Info
1822
- };
1823
- function ToastCard({ t, onClose }) {
1824
- const Icon = ICON[t.kind];
1825
- const accent = ACCENT2[t.kind];
1826
- return /* @__PURE__ */ jsx(
1827
- Card,
1828
- {
1829
- width: 360,
1830
- maxWidth: "90%",
1831
- p: "$3",
1832
- gap: "$2",
1833
- bg: "$color2",
1834
- borderWidth: 1,
1835
- borderColor: "$borderColor",
1836
- borderLeftWidth: 3,
1837
- borderLeftColor: accent,
1838
- rounded: "$4",
1839
- elevation: "$2",
1840
- children: /* @__PURE__ */ jsxs(XStack, { gap: "$2.5", items: "flex-start", children: [
1841
- /* @__PURE__ */ jsx(YStack, { pt: 1, children: /* @__PURE__ */ jsx(Icon, { size: 18, color: accent }) }),
1842
- /* @__PURE__ */ jsxs(YStack, { flex: 1, gap: "$1", children: [
1843
- /* @__PURE__ */ jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$color12", children: t.title }),
1844
- t.description ? /* @__PURE__ */ jsx(Text, { fontSize: "$2", color: "$color11", children: t.description }) : null
1845
- ] }),
1846
- /* @__PURE__ */ jsx(Button, { size: "$1", chromeless: true, icon: /* @__PURE__ */ jsx(X, { size: 14 }), onPress: onClose, "aria-label": "Dismiss" })
1847
- ] })
1848
- }
1849
- );
1850
- }
1851
- function ToastViewport({ toasts, dismiss }) {
1852
- const [mounted, setMounted] = useState(false);
1853
- useEffect(() => setMounted(true), []);
1854
- if (!mounted || typeof document === "undefined") return null;
1855
- return createPortal(
1856
- /* @__PURE__ */ jsx("div", { style: { position: "fixed", top: 16, right: 16, zIndex: 1e5, pointerEvents: "none" }, children: /* @__PURE__ */ jsx(YStack, { gap: "$2", items: "flex-end", children: toasts.map((t) => /* @__PURE__ */ jsx(YStack, { pointerEvents: "auto", children: /* @__PURE__ */ jsx(ToastCard, { t, onClose: () => dismiss(t.id) }) }, t.id)) }) }),
1857
- document.body
1858
- );
1859
- }
1860
- function ToastProvider({ children }) {
1861
- const track = useEmit();
1862
- const [toasts, setToasts] = useState([]);
1863
- const timers = useRef(/* @__PURE__ */ new Map());
1864
- const seq = useRef(0);
1865
- const dismiss = useCallback((id) => {
1866
- setToasts((ts) => ts.filter((t) => t.id !== id));
1867
- const timer = timers.current.get(id);
1868
- if (timer) {
1869
- clearTimeout(timer);
1870
- timers.current.delete(id);
1871
- }
1872
- }, []);
1873
- const toast = useCallback(
1874
- (input) => {
1875
- const id = ++seq.current;
1876
- const kind = input.kind ?? "info";
1877
- const durationMs = input.durationMs ?? (kind === "error" ? 6e3 : 3500);
1878
- track({ component: "Toast", action: kind === "error" ? "error" : "view", id: input.title, value: kind });
1879
- setToasts((ts) => [...ts, { id, kind, title: input.title, description: input.description, durationMs }]);
1880
- if (durationMs > 0) {
1881
- timers.current.set(
1882
- id,
1883
- setTimeout(() => dismiss(id), durationMs)
1884
- );
1885
- }
1886
- },
1887
- [dismiss, track]
1888
- );
1889
- useEffect(() => {
1890
- const map = timers.current;
1891
- return () => map.forEach((t) => clearTimeout(t));
1892
- }, []);
1893
- const api = {
1894
- toast,
1895
- success: (title, description) => toast({ title, description, kind: "success" }),
1896
- error: (title, description) => toast({ title, description, kind: "error" }),
1897
- info: (title, description) => toast({ title, description, kind: "info" }),
1898
- dismiss
1899
- };
1900
- return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
1901
- children,
1902
- /* @__PURE__ */ jsx(ToastViewport, { toasts, dismiss })
1903
- ] });
1904
- }
1905
- function useToast() {
1906
- const ctx = useContext(ToastContext);
1907
- if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
1908
- return ctx;
1909
- }
1910
-
1911
- export { AnimatedLogo, AppHeader, BRANDS, BarChart, BarRows, BrandMark, CHART_OTHER, CHART_PALETTE, ComboBox, CommerceResource, ConfirmDelete, ContextMenu, Donut, Donut2 as DonutRing, FadeIn, GenericLogo, HANZO, HANZO_MARK_CONTENT, HanzoMark, HintButton, LUX, LegendDot, LineChart, MetricCard, Sparkline2 as MetricSparkline, MiniBars, OrgMark, OrgSwitcher, PARS, Panel, ProductIcon, ProviderLogo, Reorder, SERIES, SURFACES, SearchInput, Segmented, SiteFooter, SiteNav, Sparkline, ToastProvider, UtilBar, ZOO, colorForIndex, filterOptions, filterOrgs, isKnownOption, monogram, orgScope, otherSurfaces, providerInitials, resolveBrand, rowShift, targetIndex, useContainerWidth, useToast, utilColor };
1912
- //# sourceMappingURL=index.js.map
1
+ 'use client';// @hanzo/ui/product the product/app component layer on @hanzo/gui.
2
+ //
3
+ // Charts, metrics, page headers, status tags, rich empty states, combobox,
4
+ // slide-over, toasts, drag-reorder, labeled field rows, provider/product marks,
5
+ // theme toggle. Presentational + host-agnostic: data and effects are INJECTED as
6
+ // props nothing here imports an app's `~/lib`. Cross-platform (web + native +
7
+ // desktop) because it builds only on @hanzo/gui primitives. Clean-room.
8
+ //
9
+ // Single collision-free namespace: where a name exists in two files the canonical
10
+ // (Charts) keeps the name and the variant is aliased, so NOTHING is dropped.
11
+ // Charts the canonical Sparkline + Donut live here (dependency-free inline SVG:
12
+ // hover tooltips, axis ticks, honest null under 2 real points).
13
+ export * from './Charts.js';
14
+ // Metric resource-console stat tiles/panels/bars. Its own near-identical
15
+ // Sparkline is preserved as `MetricSparkline` (zero loss; see CONSOLIDATION.md
16
+ // for the eventual single-Sparkline dedup).
17
+ export { SERIES, colorForIndex, utilColor, Sparkline as MetricSparkline, MiniBars, UtilBar, LegendDot, MetricCard, HintButton, Panel, } from './Metric.js';
18
+ // Standalone dependency-free ring aliased to avoid the Charts.Donut clash.
19
+ export { Donut as DonutRing } from './Donut.js';
20
+ // ComboBox — the typeable select. `ComboOption` comes from the ONE pure filter
21
+ // module (ReDoS-safe literal substring), so export the component here and the
22
+ // option type + matchers from there.
23
+ export { ComboBox } from './ComboBox.js';
24
+ export * from './combobox/filter.js';
25
+ // The shared shell — brand mark, org scope + switcher, app header (the
26
+ // console's org-scope contract + switcher hoisted here; hanzoai/ui#36).
27
+ // `surfaces.data` is the ONE canonical cross-surface list every launcher consumes.
28
+ export * from './surfaces.data.js';
29
+ export * from './AppHeader.js';
30
+ export * from './BrandMark.js';
31
+ export * from './OrgMark.js';
32
+ export * from './OrgSwitcher.js';
33
+ export * from './scope.js';
34
+ // Menu the ONE menu system: portal-theme-safe DropdownMenu (click) + ContextMenu
35
+ // (right-click), both rendering the SAME item spec (MenuPanel/MenuItemView) so every
36
+ // menu across the fleet is pixel-identical. SelectMenu/ComboBox share the same spec.
37
+ export * from './menu/index.js';
38
+ // Site chrome the RENDERER for @hanzo/products' header/launcher/footer models.
39
+ // That package decides what the navigation is; these two draw it, so every
40
+ // property shares one bar and one footer instead of a hand-written copy each.
41
+ export * from './SiteNav.js';
42
+ export * from './SiteFooter.js';
43
+ // Admin surface the honest-state + list layer every admin console renders.
44
+ // `host` is the ONE seam an app injects its router/auth effects through;
45
+ // `CommerceResource` is the ONE store-list surface (console Store + Commerce admin).
46
+ export * from './host.js';
47
+ export * from './BackendState.js';
48
+ export * from './CommerceResource.js';
49
+ export * from './ConfirmDelete.js';
50
+ export * from './Filters.js';
51
+ // Instrumentation the ONE place a shared component reports what a user did.
52
+ // Every component above already emits through it, so a product gets the whole
53
+ // interaction vocabulary by rendering the library. Apps only need the optional
54
+ // `<InstrumentSurface value="billing">` to name the area, and `emit` for the
55
+ // one-off moments no shared component can observe.
56
+ export * from './instrument.js';
57
+ // The rest — every exported name below is unique across the layer.
58
+ export * from './AnimatedLogo.js';
59
+ export * from './brand.js';
60
+ export * from './DataTable.js';
61
+ export * from './EmptyState.js';
62
+ export * from './FadeIn.js';
63
+ export * from './Field.js';
64
+ export * from './HanzoMark.js';
65
+ export * from './PageHeader.js';
66
+ export * from './PrimaryButton.js';
67
+ export * from './ProductIcon.js';
68
+ export * from './ProviderLogo.js';
69
+ export * from './Reorder.js';
70
+ export * from './SelectMenu.js';
71
+ export * from './SlideOver.js';
72
+ export * from './StatusTag.js';
73
+ export * from './ThemeToggle.js';
74
+ export { ThemeToggleNext } from './ThemeToggleNext.js';
75
+ export * from './Toast.js';
76
+ export * from './accent.js';
77
+ export * from './color.js';
78
+ // Usage — the canonical AI-usage surface (totals, chart, spend-by-model, activity)
79
+ // now lives in ONE home: `@hanzo/usage/panel` (<UsagePanel>). The former meter/card/
80
+ // dashboard kit here was orphaned (zero consumers) and folded into it.
81
+ // Social — the publish surface (social.hanzo.ai) as parts: channel/post/campaign
82
+ // cards, the summary bar, the list↔calendar toggle, the agenda, the composer, and
83
+ // the provider-readiness list, over one pure time/preview module.
84
+ export * from './social/index.js';
85
+ // The gui/product theme object + tag tones (one source of truth, from
86
+ // @hanzo/data) — the theme this layer renders against. Design-token PRIMITIVES
87
+ // (colors, dark/light, radii, spacing) are the runtime-free `@hanzo/ui/core`.
88
+ export { tokens, TAG_TONES, tagTone } from '@hanzo/data';
1913
89
  //# sourceMappingURL=index.js.map