@vuer-ai/vuer-uikit 0.0.96 → 0.0.98

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 (341) hide show
  1. package/README.md +106 -7
  2. package/cli/dial-cli.js +49 -7
  3. package/dist/SyncScroll/SyncScroll.cjs +10 -10
  4. package/dist/SyncScroll/SyncScroll.mjs +3 -3
  5. package/dist/SyncScroll/index.cjs +10 -10
  6. package/dist/SyncScroll/index.mjs +3 -3
  7. package/dist/chunk-3HEZVWRW.mjs +62 -0
  8. package/dist/chunk-4KWGGESI.cjs +494 -0
  9. package/dist/{chunk-CCMKL2OA.cjs → chunk-7GWDO25E.cjs} +2 -2
  10. package/dist/chunk-A5LCX2UQ.cjs +208 -0
  11. package/dist/chunk-BEJIZ56L.mjs +300 -0
  12. package/dist/chunk-C7VGRU3O.mjs +283 -0
  13. package/dist/{chunk-LONOMMFA.cjs → chunk-LJMNHTTG.cjs} +21 -21
  14. package/dist/chunk-O66RESRR.cjs +285 -0
  15. package/dist/{chunk-RINTUFYQ.cjs → chunk-RMK6W774.cjs} +24 -19
  16. package/dist/{chunk-BFQ2WL5U.mjs → chunk-TTYSYGVE.mjs} +2 -2
  17. package/dist/chunk-VA3PEYFM.mjs +489 -0
  18. package/dist/chunk-VBBJSIY7.cjs +308 -0
  19. package/dist/{chunk-AIINOWEH.mjs → chunk-W4JCKCW7.mjs} +5 -5
  20. package/dist/chunk-WWGF6TBZ.mjs +206 -0
  21. package/dist/chunk-ZGN4UEJR.cjs +679 -0
  22. package/dist/chunk-ZQLRMOUW.mjs +661 -0
  23. package/dist/dial/DialPanel.cjs +24 -24
  24. package/dist/dial/DialPanel.mjs +23 -23
  25. package/dist/dial/DialProvider.cjs +3 -3
  26. package/dist/dial/DialProvider.d.cts +1 -0
  27. package/dist/dial/DialProvider.d.ts +1 -0
  28. package/dist/dial/DialProvider.example.cjs +72 -0
  29. package/dist/dial/DialProvider.example.d.cts +7 -0
  30. package/dist/dial/DialProvider.example.d.ts +7 -0
  31. package/dist/dial/DialProvider.example.mjs +68 -0
  32. package/dist/dial/DialProvider.mjs +1 -1
  33. package/dist/dial/index.cjs +42 -42
  34. package/dist/dial/index.mjs +23 -23
  35. package/dist/dial/wrapped-inputs/ControlledInputs.cjs +27 -27
  36. package/dist/dial/wrapped-inputs/ControlledInputs.mjs +23 -23
  37. package/dist/dial/wrapped-inputs/DialInputs.cjs +34 -34
  38. package/dist/dial/wrapped-inputs/DialInputs.mjs +23 -23
  39. package/dist/dial/wrapped-inputs/DialVectorInput.cjs +24 -24
  40. package/dist/dial/wrapped-inputs/DialVectorInput.mjs +23 -23
  41. package/dist/dial/wrapped-inputs/index.cjs +39 -39
  42. package/dist/dial/wrapped-inputs/index.mjs +23 -23
  43. package/dist/highlight-cursor/cursor-provider.cjs +3 -3
  44. package/dist/highlight-cursor/cursor-provider.mjs +2 -2
  45. package/dist/highlight-cursor/enhanced-components.cjs +10 -10
  46. package/dist/highlight-cursor/enhanced-components.mjs +5 -5
  47. package/dist/highlight-cursor/index.cjs +16 -16
  48. package/dist/highlight-cursor/index.mjs +6 -6
  49. package/dist/hooks/index.cjs +5 -5
  50. package/dist/hooks/index.mjs +1 -1
  51. package/dist/index.cjs +190 -190
  52. package/dist/index.mjs +23 -23
  53. package/dist/ui/UIKitBadge.cjs +6 -6
  54. package/dist/ui/UIKitBadge.mjs +2 -2
  55. package/dist/ui/avatar.cjs +1 -1
  56. package/dist/ui/avatar.mjs +1 -1
  57. package/dist/ui/badge.cjs +1 -1
  58. package/dist/ui/badge.d.cts +1 -1
  59. package/dist/ui/badge.d.ts +1 -1
  60. package/dist/ui/badge.mjs +1 -1
  61. package/dist/ui/button.cjs +1 -1
  62. package/dist/ui/button.mjs +1 -1
  63. package/dist/ui/card.cjs +1 -1
  64. package/dist/ui/card.mjs +1 -1
  65. package/dist/ui/checkbox.cjs +1 -1
  66. package/dist/ui/checkbox.mjs +1 -1
  67. package/dist/ui/collapsible.cjs +1 -1
  68. package/dist/ui/collapsible.mjs +1 -1
  69. package/dist/ui/drawer.cjs +1 -1
  70. package/dist/ui/drawer.mjs +1 -1
  71. package/dist/ui/dropdown.cjs +1 -1
  72. package/dist/ui/dropdown.mjs +1 -1
  73. package/dist/ui/index.cjs +107 -107
  74. package/dist/ui/index.mjs +17 -17
  75. package/dist/ui/inputs/color-input.cjs +1 -1
  76. package/dist/ui/inputs/color-input.mjs +1 -1
  77. package/dist/ui/inputs/index.cjs +11 -11
  78. package/dist/ui/inputs/index.mjs +3 -3
  79. package/dist/ui/inputs/input-numbers.cjs +1 -1
  80. package/dist/ui/inputs/input-numbers.mjs +1 -1
  81. package/dist/ui/inputs/input.cjs +1 -1
  82. package/dist/ui/inputs/input.d.cts +1 -1
  83. package/dist/ui/inputs/input.d.ts +1 -1
  84. package/dist/ui/inputs/input.mjs +1 -1
  85. package/dist/ui/inputs/number-inputs/CmInput.cjs +1 -1
  86. package/dist/ui/inputs/number-inputs/CmInput.mjs +1 -1
  87. package/dist/ui/inputs/number-inputs/DegInput.cjs +1 -1
  88. package/dist/ui/inputs/number-inputs/DegInput.mjs +1 -1
  89. package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +1 -1
  90. package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +1 -1
  91. package/dist/ui/inputs/number-inputs/EulerInput.cjs +1 -1
  92. package/dist/ui/inputs/number-inputs/EulerInput.mjs +1 -1
  93. package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +1 -1
  94. package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +1 -1
  95. package/dist/ui/inputs/number-inputs/InchInput.cjs +1 -1
  96. package/dist/ui/inputs/number-inputs/InchInput.mjs +1 -1
  97. package/dist/ui/inputs/number-inputs/IntInput.cjs +1 -1
  98. package/dist/ui/inputs/number-inputs/IntInput.mjs +1 -1
  99. package/dist/ui/inputs/number-inputs/KVectorInput.cjs +1 -1
  100. package/dist/ui/inputs/number-inputs/KVectorInput.mjs +1 -1
  101. package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +1 -1
  102. package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +1 -1
  103. package/dist/ui/inputs/number-inputs/RadInput.cjs +1 -1
  104. package/dist/ui/inputs/number-inputs/RadInput.mjs +1 -1
  105. package/dist/ui/inputs/number-inputs/TimeInput.cjs +1 -1
  106. package/dist/ui/inputs/number-inputs/TimeInput.mjs +1 -1
  107. package/dist/ui/inputs/number-inputs/Vec3Input.cjs +1 -1
  108. package/dist/ui/inputs/number-inputs/Vec3Input.mjs +1 -1
  109. package/dist/ui/inputs/number-inputs/VectorInput.cjs +1 -1
  110. package/dist/ui/inputs/number-inputs/VectorInput.mjs +1 -1
  111. package/dist/ui/inputs/number-inputs/index.cjs +11 -11
  112. package/dist/ui/inputs/number-inputs/index.mjs +3 -3
  113. package/dist/ui/inputs/presets-input.cjs +1 -1
  114. package/dist/ui/inputs/presets-input.mjs +1 -1
  115. package/dist/ui/label.cjs +1 -1
  116. package/dist/ui/label.mjs +1 -1
  117. package/dist/ui/layout.cjs +1 -1
  118. package/dist/ui/layout.mjs +1 -1
  119. package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +1 -1
  120. package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +1 -1
  121. package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +1 -1
  122. package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +1 -1
  123. package/dist/ui/layouts/dock-layout/index.cjs +1 -1
  124. package/dist/ui/layouts/dock-layout/index.mjs +1 -1
  125. package/dist/ui/layouts/index.cjs +2 -2
  126. package/dist/ui/layouts/index.mjs +2 -2
  127. package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +1 -1
  128. package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +1 -1
  129. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +1 -1
  130. package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +1 -1
  131. package/dist/ui/layouts/liquid-layout/index.cjs +1 -1
  132. package/dist/ui/layouts/liquid-layout/index.mjs +1 -1
  133. package/dist/ui/modal.cjs +1 -1
  134. package/dist/ui/modal.mjs +1 -1
  135. package/dist/ui/navigation.cjs +1 -1
  136. package/dist/ui/navigation.mjs +1 -1
  137. package/dist/ui/pagination.cjs +1 -1
  138. package/dist/ui/pagination.mjs +1 -1
  139. package/dist/ui/panel.cjs +1 -1
  140. package/dist/ui/panel.mjs +1 -1
  141. package/dist/ui/popover.cjs +1 -1
  142. package/dist/ui/popover.mjs +1 -1
  143. package/dist/ui/radio-group.cjs +1 -1
  144. package/dist/ui/radio-group.mjs +1 -1
  145. package/dist/ui/resizable.cjs +1 -1
  146. package/dist/ui/resizable.mjs +1 -1
  147. package/dist/ui/select.cjs +1 -1
  148. package/dist/ui/select.d.cts +1 -1
  149. package/dist/ui/select.d.ts +1 -1
  150. package/dist/ui/select.mjs +1 -1
  151. package/dist/ui/separator.cjs +1 -1
  152. package/dist/ui/separator.mjs +1 -1
  153. package/dist/ui/sheet.cjs +1 -1
  154. package/dist/ui/sheet.mjs +1 -1
  155. package/dist/ui/sidebar.cjs +26 -26
  156. package/dist/ui/sidebar.mjs +2 -2
  157. package/dist/ui/simple-tree-view.cjs +1 -1
  158. package/dist/ui/simple-tree-view.mjs +1 -1
  159. package/dist/ui/skeleton.cjs +1 -1
  160. package/dist/ui/skeleton.mjs +1 -1
  161. package/dist/ui/slider.cjs +1 -1
  162. package/dist/ui/slider.mjs +1 -1
  163. package/dist/ui/switch.cjs +1 -1
  164. package/dist/ui/switch.mjs +1 -1
  165. package/dist/ui/table.cjs +1 -1
  166. package/dist/ui/table.mjs +1 -1
  167. package/dist/ui/tabs.cjs +1 -1
  168. package/dist/ui/tabs.mjs +1 -1
  169. package/dist/ui/textarea.cjs +1 -1
  170. package/dist/ui/textarea.d.cts +1 -1
  171. package/dist/ui/textarea.d.ts +1 -1
  172. package/dist/ui/textarea.mjs +1 -1
  173. package/dist/ui/theme/ThemeToggles.cjs +1 -1
  174. package/dist/ui/theme/ThemeToggles.mjs +1 -1
  175. package/dist/ui/theme/index.cjs +1 -1
  176. package/dist/ui/theme/index.mjs +1 -1
  177. package/dist/ui/toggle-buttons.cjs +1 -1
  178. package/dist/ui/toggle-buttons.mjs +1 -1
  179. package/dist/ui/toggle-group.cjs +1 -1
  180. package/dist/ui/toggle-group.mjs +1 -1
  181. package/dist/ui/toggle.cjs +1 -1
  182. package/dist/ui/toggle.mjs +1 -1
  183. package/dist/ui/toolbar.cjs +1 -1
  184. package/dist/ui/toolbar.mjs +1 -1
  185. package/dist/ui/tooltip.cjs +1 -1
  186. package/dist/ui/tooltip.mjs +1 -1
  187. package/dist/ui/tree-view/TreeSearchBar.cjs +1 -1
  188. package/dist/ui/tree-view/TreeSearchBar.mjs +1 -1
  189. package/dist/ui/tree-view/TreeView.cjs +1 -1
  190. package/dist/ui/tree-view/TreeView.mjs +1 -1
  191. package/dist/ui/tree-view/index.cjs +6 -6
  192. package/dist/ui/tree-view/index.mjs +2 -2
  193. package/dist/ui/tree-view-legacy.cjs +9 -9
  194. package/dist/ui/tree-view-legacy.mjs +5 -5
  195. package/dist/ui/waterfall/CursorOverlay.cjs +1 -1
  196. package/dist/ui/waterfall/CursorOverlay.mjs +1 -1
  197. package/dist/ui/waterfall/TimelineEvent.cjs +1 -1
  198. package/dist/ui/waterfall/TimelineEvent.mjs +1 -1
  199. package/dist/ui/waterfall/TimelineProcessBar.cjs +1 -1
  200. package/dist/ui/waterfall/TimelineProcessBar.mjs +1 -1
  201. package/dist/ui/waterfall/Wedges.cjs +1 -1
  202. package/dist/ui/waterfall/Wedges.mjs +1 -1
  203. package/dist/ui/waterfall/index.cjs +8 -8
  204. package/dist/ui/waterfall/index.mjs +7 -7
  205. package/package.json +28 -2
  206. package/src/SyncScroll/README.md +283 -0
  207. package/src/SyncScroll/SyncScroll.tsx +361 -0
  208. package/src/SyncScroll/index.ts +22 -0
  209. package/src/SyncScroll/useSyncScroll.tsx +226 -0
  210. package/src/cli/dial-cli.ts +1133 -0
  211. package/src/dial/DialPanel.tsx +208 -0
  212. package/src/dial/DialProvider.example.tsx +80 -0
  213. package/src/dial/DialProvider.tsx +138 -0
  214. package/src/dial/index.ts +26 -0
  215. package/src/dial/wrapped-inputs/ControlledInputs.tsx +176 -0
  216. package/src/dial/wrapped-inputs/DialInputs.tsx +401 -0
  217. package/src/dial/wrapped-inputs/DialVectorInput.tsx +125 -0
  218. package/src/dial/wrapped-inputs/index.ts +25 -0
  219. package/src/highlight-cursor/cursor-context.tsx +23 -0
  220. package/src/highlight-cursor/cursor-provider.tsx +264 -0
  221. package/src/highlight-cursor/enhanced-components.tsx +16 -0
  222. package/src/highlight-cursor/index.ts +21 -0
  223. package/src/highlight-cursor/tabs-cursor-context.tsx +121 -0
  224. package/src/highlight-cursor/types.ts +40 -0
  225. package/src/highlight-cursor/with-cursor.tsx +144 -0
  226. package/src/hooks/clientOnly.tsx +54 -0
  227. package/src/hooks/cn.ts +33 -0
  228. package/src/hooks/index.ts +9 -0
  229. package/src/hooks/useDocument.tsx +18 -0
  230. package/src/hooks/useDragSelect.ts +116 -0
  231. package/src/hooks/useIsMobile.ts +35 -0
  232. package/src/hooks/useLocalStorage.ts +122 -0
  233. package/src/hooks/useLocation.tsx +95 -0
  234. package/src/hooks/useQueryParams.tsx +31 -0
  235. package/src/hooks/useWindow.tsx +18 -0
  236. package/src/index.css +5 -0
  237. package/src/index.ts +5 -0
  238. package/src/styles/.editorconfig +0 -0
  239. package/src/styles/theme.css +152 -0
  240. package/src/styles/toast.css +67 -0
  241. package/src/styles/variables.css +229 -0
  242. package/src/ui/UIKitBadge.tsx +171 -0
  243. package/src/ui/avatar.tsx +221 -0
  244. package/src/ui/badge.tsx +74 -0
  245. package/src/ui/button.tsx +143 -0
  246. package/src/ui/card.tsx +146 -0
  247. package/src/ui/checkbox.tsx +78 -0
  248. package/src/ui/collapsible.tsx +43 -0
  249. package/src/ui/drag-selectable/DragSelectProvider.tsx +178 -0
  250. package/src/ui/drag-selectable/createSelectable.tsx +43 -0
  251. package/src/ui/drag-selectable/index.ts +2 -0
  252. package/src/ui/drawer.tsx +137 -0
  253. package/src/ui/dropdown.tsx +707 -0
  254. package/src/ui/icons/MouseCursorIcons.tsx +39 -0
  255. package/src/ui/icons/cursor.tsx +38 -0
  256. package/src/ui/icons/index.ts +2 -0
  257. package/src/ui/index.ts +45 -0
  258. package/src/ui/inputs/color-input.tsx +61 -0
  259. package/src/ui/inputs/index.tsx +5 -0
  260. package/src/ui/inputs/input-numbers.tsx +394 -0
  261. package/src/ui/inputs/input.tsx +155 -0
  262. package/src/ui/inputs/number-inputs/CmInput.tsx +26 -0
  263. package/src/ui/inputs/number-inputs/DegInput.tsx +26 -0
  264. package/src/ui/inputs/number-inputs/EulerDegInput.tsx +14 -0
  265. package/src/ui/inputs/number-inputs/EulerInput.tsx +30 -0
  266. package/src/ui/inputs/number-inputs/EulerRadInput.tsx +14 -0
  267. package/src/ui/inputs/number-inputs/InchInput.tsx +26 -0
  268. package/src/ui/inputs/number-inputs/IntInput.tsx +46 -0
  269. package/src/ui/inputs/number-inputs/KVectorInput.tsx +20 -0
  270. package/src/ui/inputs/number-inputs/QuaternionInput.tsx +27 -0
  271. package/src/ui/inputs/number-inputs/RadInput.tsx +26 -0
  272. package/src/ui/inputs/number-inputs/TimeInput.tsx +26 -0
  273. package/src/ui/inputs/number-inputs/Vec3Input.tsx +26 -0
  274. package/src/ui/inputs/number-inputs/VectorInput.tsx +38 -0
  275. package/src/ui/inputs/number-inputs/index.ts +38 -0
  276. package/src/ui/inputs/presets-input.tsx +59 -0
  277. package/src/ui/label.tsx +35 -0
  278. package/src/ui/layout.tsx +43 -0
  279. package/src/ui/layouts/dock-layout/DockLayoutView.tsx +128 -0
  280. package/src/ui/layouts/dock-layout/LayoutSlots.tsx +85 -0
  281. package/src/ui/layouts/dock-layout/index.tsx +2 -0
  282. package/src/ui/layouts/index.ts +2 -0
  283. package/src/ui/layouts/liquid-layout/LayoutSlots.tsx +82 -0
  284. package/src/ui/layouts/liquid-layout/LiquidLayoutView.tsx +76 -0
  285. package/src/ui/layouts/liquid-layout/index.ts +1 -0
  286. package/src/ui/modal.tsx +211 -0
  287. package/src/ui/navigation.tsx +86 -0
  288. package/src/ui/pagination.tsx +129 -0
  289. package/src/ui/panel.tsx +146 -0
  290. package/src/ui/popover.tsx +112 -0
  291. package/src/ui/radio-group.tsx +63 -0
  292. package/src/ui/resizable.tsx +52 -0
  293. package/src/ui/select.tsx +365 -0
  294. package/src/ui/separator.tsx +26 -0
  295. package/src/ui/sheet.tsx +257 -0
  296. package/src/ui/sidebar.tsx +695 -0
  297. package/src/ui/simple-tree-view.tsx +604 -0
  298. package/src/ui/skeleton.tsx +15 -0
  299. package/src/ui/slider.tsx +204 -0
  300. package/src/ui/switch.tsx +45 -0
  301. package/src/ui/table.tsx +99 -0
  302. package/src/ui/tabs.tsx +192 -0
  303. package/src/ui/textarea.tsx +55 -0
  304. package/src/ui/theme/ThemeProvider.tsx +319 -0
  305. package/src/ui/theme/ThemeToggles.tsx +84 -0
  306. package/src/ui/theme/index.ts +21 -0
  307. package/src/ui/theme/themeScript.tsx +179 -0
  308. package/src/ui/theme/types.ts +61 -0
  309. package/src/ui/toast.tsx +30 -0
  310. package/src/ui/toggle-buttons.tsx +290 -0
  311. package/src/ui/toggle-group.tsx +236 -0
  312. package/src/ui/toggle.tsx +94 -0
  313. package/src/ui/toolbar.tsx +54 -0
  314. package/src/ui/tooltip.tsx +171 -0
  315. package/src/ui/tree-view/TreeSearchBar.tsx +88 -0
  316. package/src/ui/tree-view/TreeView.tsx +232 -0
  317. package/src/ui/tree-view/hooks.tsx +289 -0
  318. package/src/ui/tree-view/index.ts +4 -0
  319. package/src/ui/tree-view/types.ts +23 -0
  320. package/src/ui/tree-view-legacy.tsx +644 -0
  321. package/src/ui/version-badge.tsx +0 -0
  322. package/src/ui/waterfall/CursorOverlay.tsx +96 -0
  323. package/src/ui/waterfall/NavigationControls.tsx +42 -0
  324. package/src/ui/waterfall/Tick.tsx +51 -0
  325. package/src/ui/waterfall/TimeRuleEventDot.tsx +19 -0
  326. package/src/ui/waterfall/TimelineEvent.tsx +60 -0
  327. package/src/ui/waterfall/TimelineProcessBar.tsx +207 -0
  328. package/src/ui/waterfall/Wedges.tsx +67 -0
  329. package/src/ui/waterfall/WheelZoomContext.tsx +128 -0
  330. package/src/ui/waterfall/hooks/useTimelineState.tsx +134 -0
  331. package/src/ui/waterfall/hooks/useViewport.tsx +293 -0
  332. package/src/ui/waterfall/index.tsx +326 -0
  333. package/src/ui/waterfall/types.ts +20 -0
  334. package/src/ui/waterfall/utils.ts +91 -0
  335. package/dist/chunk-W2YAQV5N.mjs +0 -57
  336. package/dist/{chunk-QLCEHV4Q.mjs → chunk-2OZK5DY5.mjs} +2 -2
  337. package/dist/{chunk-Z35DNFRZ.cjs → chunk-7IS37C3P.cjs} +2 -2
  338. package/dist/{chunk-4AOAH77D.mjs → chunk-A2PCEL5S.mjs} +2 -2
  339. package/dist/{chunk-K4VD5PPY.mjs → chunk-BIUDC66P.mjs} +1 -1
  340. package/dist/{chunk-RKJR6RZU.cjs → chunk-OYNLQTHW.cjs} +1 -1
  341. package/dist/{chunk-VE3XLQLO.cjs → chunk-QUFZWF4E.cjs} +2 -2
@@ -0,0 +1,661 @@
1
+ import { QuaternionInput } from './chunk-6J7ZVRSY.mjs';
2
+ import { RadInput } from './chunk-GPV4XELL.mjs';
3
+ import { TimeInput } from './chunk-7R2ZBAE6.mjs';
4
+ import { Vec3Input } from './chunk-PIXIN3IG.mjs';
5
+ import { CmInput } from './chunk-SQQXY4AY.mjs';
6
+ import { DegInput } from './chunk-CZ2YNM7Y.mjs';
7
+ import { EulerDegInput } from './chunk-OJUK6WJ5.mjs';
8
+ import { EulerInput } from './chunk-5TXABUNC.mjs';
9
+ import { InchInput } from './chunk-ZZLF2YWP.mjs';
10
+ import { IntInput } from './chunk-NT5ZTF56.mjs';
11
+ import { VectorInput } from './chunk-6CM4GYJU.mjs';
12
+ import { Slider } from './chunk-Y6WGGVT2.mjs';
13
+ import { Switch } from './chunk-AZBJB6KC.mjs';
14
+ import { FormLayout } from './chunk-NRQJX772.mjs';
15
+ import { Label } from './chunk-42UBHC2D.mjs';
16
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-CX6OFX5Z.mjs';
17
+ import { InputRoot, InputSlot } from './chunk-4XUJBMDE.mjs';
18
+ import { useDialSchema } from './chunk-3HEZVWRW.mjs';
19
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
+
21
+ var DialInputWrapper = ({ label, children }) => {
22
+ if (!label) {
23
+ return /* @__PURE__ */ jsx(Fragment, { children });
24
+ }
25
+ return /* @__PURE__ */ jsxs(FormLayout, { orientation: "label-top", children: [
26
+ /* @__PURE__ */ jsx(Label, { size: "sm", children: label }),
27
+ children
28
+ ] });
29
+ };
30
+ var DialVec3Input = ({
31
+ name,
32
+ label,
33
+ size = "sm",
34
+ step,
35
+ labelPosition
36
+ }) => {
37
+ const { getValue, setValue } = useDialSchema();
38
+ const value = getValue(name) ?? [0, 0, 0];
39
+ if (labelPosition === "inline") {
40
+ return /* @__PURE__ */ jsx(
41
+ Vec3Input,
42
+ {
43
+ value,
44
+ onValuesChange: (val) => setValue(name, val),
45
+ size,
46
+ step,
47
+ prefix: label ? [label, "", ""] : void 0
48
+ }
49
+ );
50
+ } else {
51
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(
52
+ Vec3Input,
53
+ {
54
+ value,
55
+ onValuesChange: (val) => setValue(name, val),
56
+ size,
57
+ step
58
+ }
59
+ ) });
60
+ }
61
+ };
62
+ var DialEulerInput = ({
63
+ name,
64
+ label,
65
+ size = "sm",
66
+ step,
67
+ labelPosition
68
+ }) => {
69
+ const { getValue, setValue } = useDialSchema();
70
+ const value = getValue(name) ?? [0, 0, 0];
71
+ if (labelPosition === "inline") {
72
+ return /* @__PURE__ */ jsx(
73
+ EulerInput,
74
+ {
75
+ value,
76
+ onValuesChange: (val) => setValue(name, val),
77
+ size,
78
+ step,
79
+ prefix: label ? [label, "", ""] : void 0
80
+ }
81
+ );
82
+ } else {
83
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(
84
+ EulerInput,
85
+ {
86
+ value,
87
+ onValuesChange: (val) => setValue(name, val),
88
+ size,
89
+ step
90
+ }
91
+ ) });
92
+ }
93
+ };
94
+ var DialEulerDegInput = ({
95
+ name,
96
+ label,
97
+ size = "sm",
98
+ step,
99
+ labelPosition
100
+ }) => {
101
+ const { getValue, setValue } = useDialSchema();
102
+ const value = getValue(name) ?? [0, 0, 0];
103
+ if (labelPosition === "inline") {
104
+ return /* @__PURE__ */ jsx(
105
+ EulerDegInput,
106
+ {
107
+ value,
108
+ onValuesChange: (val) => setValue(name, val),
109
+ size,
110
+ step,
111
+ prefix: label ? [label, "", ""] : void 0
112
+ }
113
+ );
114
+ } else {
115
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(
116
+ EulerDegInput,
117
+ {
118
+ value,
119
+ onValuesChange: (val) => setValue(name, val),
120
+ size,
121
+ step
122
+ }
123
+ ) });
124
+ }
125
+ };
126
+ var DialQuaternionInput = ({
127
+ name,
128
+ label,
129
+ size = "sm",
130
+ step,
131
+ labelPosition
132
+ }) => {
133
+ const { getValue, setValue } = useDialSchema();
134
+ const value = getValue(name) ?? [1, 0, 0, 0];
135
+ if (labelPosition === "inline") {
136
+ return /* @__PURE__ */ jsx(
137
+ QuaternionInput,
138
+ {
139
+ value,
140
+ onValuesChange: (val) => setValue(name, val),
141
+ size,
142
+ step,
143
+ prefix: label ? [label, "", "", ""] : void 0
144
+ }
145
+ );
146
+ } else {
147
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(
148
+ QuaternionInput,
149
+ {
150
+ value,
151
+ onValuesChange: (val) => setValue(name, val),
152
+ size,
153
+ step
154
+ }
155
+ ) });
156
+ }
157
+ };
158
+ var DialVectorInput = ({
159
+ name,
160
+ label,
161
+ size = "sm",
162
+ step,
163
+ dimensions = 3,
164
+ labelPosition
165
+ }) => {
166
+ const { getValue, setValue } = useDialSchema();
167
+ const value = getValue(name) ?? new Array(dimensions).fill(0);
168
+ if (labelPosition === "inline") {
169
+ return /* @__PURE__ */ jsx(
170
+ VectorInput,
171
+ {
172
+ value,
173
+ onValuesChange: (val) => setValue(name, val),
174
+ size,
175
+ step,
176
+ prefix: label ? [label, ...new Array(value.length - 1).fill("")] : void 0
177
+ }
178
+ );
179
+ } else {
180
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(
181
+ VectorInput,
182
+ {
183
+ value,
184
+ onValuesChange: (val) => setValue(name, val),
185
+ size,
186
+ step
187
+ }
188
+ ) });
189
+ }
190
+ };
191
+ var DialIntInput = ({
192
+ name,
193
+ label,
194
+ size = "sm",
195
+ step = 1,
196
+ labelPosition
197
+ }) => {
198
+ const { getValue, setValue } = useDialSchema();
199
+ const value = getValue(name) ?? 0;
200
+ if (labelPosition === "inline") {
201
+ return /* @__PURE__ */ jsx(
202
+ IntInput,
203
+ {
204
+ value,
205
+ prefix: label ? [label] : void 0,
206
+ onChange: (val) => setValue(name, val),
207
+ size,
208
+ step
209
+ }
210
+ );
211
+ } else {
212
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(IntInput, { value, onChange: (val) => setValue(name, val), size, step }) });
213
+ }
214
+ };
215
+ var DialDegInput = ({
216
+ name,
217
+ label,
218
+ size = "sm",
219
+ step,
220
+ labelPosition
221
+ }) => {
222
+ const { getValue, setValue } = useDialSchema();
223
+ const value = getValue(name) ?? 0;
224
+ if (labelPosition === "inline") {
225
+ return /* @__PURE__ */ jsx(
226
+ DegInput,
227
+ {
228
+ value,
229
+ onChange: (val) => setValue(name, val),
230
+ size,
231
+ step,
232
+ prefix: label ? [label] : void 0
233
+ }
234
+ );
235
+ } else {
236
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(DegInput, { value, onChange: (val) => setValue(name, val), size, step }) });
237
+ }
238
+ };
239
+ var DialRadInput = ({
240
+ name,
241
+ label,
242
+ size = "sm",
243
+ step,
244
+ labelPosition
245
+ }) => {
246
+ const { getValue, setValue } = useDialSchema();
247
+ const value = getValue(name) ?? 0;
248
+ if (labelPosition === "inline") {
249
+ return /* @__PURE__ */ jsx(
250
+ RadInput,
251
+ {
252
+ value,
253
+ onChange: (val) => setValue(name, val),
254
+ size,
255
+ step,
256
+ prefix: label ? [label] : void 0
257
+ }
258
+ );
259
+ } else {
260
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(RadInput, { value, onChange: (val) => setValue(name, val), size, step }) });
261
+ }
262
+ };
263
+ var DialCmInput = ({
264
+ name,
265
+ label,
266
+ size = "sm",
267
+ step,
268
+ labelPosition
269
+ }) => {
270
+ const { getValue, setValue } = useDialSchema();
271
+ const value = getValue(name) ?? 0;
272
+ if (labelPosition === "inline") {
273
+ return /* @__PURE__ */ jsx(
274
+ CmInput,
275
+ {
276
+ value,
277
+ onChange: (val) => setValue(name, val),
278
+ size,
279
+ step,
280
+ prefix: label ? [label] : void 0
281
+ }
282
+ );
283
+ } else {
284
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(CmInput, { value, onChange: (val) => setValue(name, val), size, step }) });
285
+ }
286
+ };
287
+ var DialInchInput = ({
288
+ name,
289
+ label,
290
+ size = "sm",
291
+ step,
292
+ labelPosition
293
+ }) => {
294
+ const { getValue, setValue } = useDialSchema();
295
+ const value = getValue(name) ?? 0;
296
+ if (labelPosition === "inline") {
297
+ return /* @__PURE__ */ jsx(
298
+ InchInput,
299
+ {
300
+ value,
301
+ onChange: (val) => setValue(name, val),
302
+ size,
303
+ step,
304
+ prefix: label ? [label] : void 0
305
+ }
306
+ );
307
+ } else {
308
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(InchInput, { value, onChange: (val) => setValue(name, val), size, step }) });
309
+ }
310
+ };
311
+ var DialTimeInput = ({
312
+ name,
313
+ label,
314
+ size = "sm",
315
+ step,
316
+ labelPosition
317
+ }) => {
318
+ const { getValue, setValue } = useDialSchema();
319
+ const value = getValue(name) ?? 0;
320
+ if (labelPosition === "inline") {
321
+ return /* @__PURE__ */ jsx(
322
+ TimeInput,
323
+ {
324
+ value,
325
+ onChange: (val) => setValue(name, val),
326
+ size,
327
+ step,
328
+ prefix: label ? [label] : void 0
329
+ }
330
+ );
331
+ } else {
332
+ return /* @__PURE__ */ jsx(DialInputWrapper, { label, children: /* @__PURE__ */ jsx(TimeInput, { value, onChange: (val) => setValue(name, val), size, step }) });
333
+ }
334
+ };
335
+ var DialVectorInput2 = ({
336
+ name,
337
+ label,
338
+ size = "sm"
339
+ }) => {
340
+ const { getValue, setValue, schemas } = useDialSchema();
341
+ const schema = schemas.find((s) => s.name === name);
342
+ if (!schema) {
343
+ return null;
344
+ }
345
+ const value = getValue(name) || [];
346
+ const dimensions = schema.dimensions || schema.placeholders?.length || schema.dtypes?.length || (Array.isArray(value) ? value.length : 6);
347
+ const placeholders = schema.placeholders || [];
348
+ const dtypes = schema.dtypes || [];
349
+ const steps = schema.steps || [];
350
+ const tags = schema.tags || {};
351
+ let gridAutoFlow;
352
+ let gridColumns;
353
+ let gridRows;
354
+ if (typeof tags.col === "number") {
355
+ gridAutoFlow = "column";
356
+ gridRows = tags.col;
357
+ gridColumns = void 0;
358
+ } else if (typeof tags.row === "number") {
359
+ gridAutoFlow = "row";
360
+ gridColumns = tags.row;
361
+ gridRows = void 0;
362
+ } else {
363
+ gridAutoFlow = "row";
364
+ gridColumns = void 0;
365
+ gridRows = void 0;
366
+ }
367
+ console.log("the grid-flow is", gridAutoFlow, gridColumns, gridRows);
368
+ const vectorValue = Array.isArray(value) ? value.concat(Array(Math.max(0, dimensions - value.length)).fill(0)) : Array(dimensions).fill(0);
369
+ const inputSteps = Array.from({ length: dimensions }, (_, i) => {
370
+ if (steps[i] !== void 0) {
371
+ return steps[i];
372
+ }
373
+ const dtype = dtypes[i];
374
+ return dtype === "number-int" ? 1 : 1e-3;
375
+ });
376
+ const labels = placeholders.length > 0 ? placeholders.map((p) => /* @__PURE__ */ jsx("span", { className: "text-xs", children: p })) : void 0;
377
+ const handleValuesChange = (newValues) => {
378
+ setValue(name, newValues);
379
+ };
380
+ const inputComponent = /* @__PURE__ */ jsx(
381
+ VectorInput,
382
+ {
383
+ value: vectorValue,
384
+ onValuesChange: handleValuesChange,
385
+ size,
386
+ step: inputSteps,
387
+ labels,
388
+ gridAutoFlow,
389
+ columns: gridColumns,
390
+ rows: gridRows
391
+ }
392
+ );
393
+ if (!label) {
394
+ return inputComponent;
395
+ }
396
+ return /* @__PURE__ */ jsxs(FormLayout, { orientation: "label-top", children: [
397
+ /* @__PURE__ */ jsx(Label, { size: "sm", children: label }),
398
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2", children: [
399
+ schema.helpText && /* @__PURE__ */ jsx(
400
+ "span",
401
+ {
402
+ className: "text-text-secondary cursor-help text-xs",
403
+ title: schema.helpText,
404
+ children: "\u24D8"
405
+ }
406
+ ),
407
+ inputComponent
408
+ ] })
409
+ ] });
410
+ };
411
+ var DialPanel = ({ schemas, groups: groupConfigs }) => {
412
+ const groupConfigMap = {};
413
+ if (groupConfigs) {
414
+ groupConfigs.forEach((config) => {
415
+ groupConfigMap[config.name] = config;
416
+ });
417
+ }
418
+ schemas.forEach((schema) => {
419
+ const grouping = schema.tags?.grouping;
420
+ if (grouping && !groupConfigMap[grouping]) {
421
+ groupConfigMap[grouping] = { name: grouping };
422
+ }
423
+ if (grouping && schema.tags?.noWrap && groupConfigMap[grouping]) {
424
+ groupConfigMap[grouping].noWrap = true;
425
+ }
426
+ });
427
+ const groupedSchemas = {};
428
+ const ungrouped = [];
429
+ schemas.forEach((schema) => {
430
+ const grouping = schema.tags?.grouping;
431
+ if (grouping) {
432
+ if (!groupedSchemas[grouping]) {
433
+ groupedSchemas[grouping] = [];
434
+ }
435
+ groupedSchemas[grouping].push(schema);
436
+ } else {
437
+ ungrouped.push(schema);
438
+ }
439
+ });
440
+ const renderSchemaInput = (schema) => {
441
+ const { name, dtype, min, max, step, options, tags } = schema;
442
+ const labelPosition = tags?.labelPosition;
443
+ const label = name.charAt(0).toUpperCase() + name.slice(1);
444
+ switch (dtype) {
445
+ case "vector3":
446
+ return /* @__PURE__ */ jsx(
447
+ DialVec3Input,
448
+ {
449
+ name,
450
+ label,
451
+ step,
452
+ labelPosition
453
+ },
454
+ name
455
+ );
456
+ case "euler":
457
+ return /* @__PURE__ */ jsx(
458
+ DialEulerDegInput,
459
+ {
460
+ name,
461
+ label,
462
+ step,
463
+ labelPosition
464
+ },
465
+ name
466
+ );
467
+ case "vector":
468
+ case "vector-6":
469
+ case "number-group":
470
+ return /* @__PURE__ */ jsx(DialVectorInput2, { name, label }, name);
471
+ case "boolean":
472
+ return /* @__PURE__ */ jsx(DialBooleanInput, { name, label, labelPosition }, name);
473
+ case "number-int":
474
+ return /* @__PURE__ */ jsx(
475
+ DialIntInput,
476
+ {
477
+ name,
478
+ label,
479
+ step: step || 1,
480
+ labelPosition
481
+ },
482
+ name
483
+ );
484
+ case "number":
485
+ if (min !== void 0 && max !== void 0 && !options) {
486
+ return /* @__PURE__ */ jsx(
487
+ DialSliderInput,
488
+ {
489
+ name,
490
+ label,
491
+ min,
492
+ max,
493
+ step,
494
+ labelPosition
495
+ },
496
+ name
497
+ );
498
+ }
499
+ if (options && options.length > 0) {
500
+ return /* @__PURE__ */ jsx(
501
+ DialSelectInput,
502
+ {
503
+ name,
504
+ label,
505
+ options,
506
+ labelPosition
507
+ },
508
+ name
509
+ );
510
+ }
511
+ return /* @__PURE__ */ jsx(
512
+ DialNumberInput,
513
+ {
514
+ name,
515
+ label,
516
+ min,
517
+ max,
518
+ step,
519
+ labelPosition
520
+ },
521
+ name
522
+ );
523
+ case "string":
524
+ if (options && options.length > 0) {
525
+ return /* @__PURE__ */ jsx(
526
+ DialSelectInput,
527
+ {
528
+ name,
529
+ label,
530
+ options,
531
+ labelPosition
532
+ },
533
+ name
534
+ );
535
+ }
536
+ return null;
537
+ default:
538
+ return null;
539
+ }
540
+ };
541
+ return /* @__PURE__ */ jsxs("div", { className: "dial-schema-renderer space-y-4", children: [
542
+ Object.entries(groupedSchemas).map(([name, schemaList]) => {
543
+ const groupConfig = groupConfigMap[name];
544
+ const hasNoWrap = groupConfig?.noWrap;
545
+ const wrapClass = hasNoWrap ? "" : "flex-wrap";
546
+ return /* @__PURE__ */ jsxs("div", { className: "dial-group", children: [
547
+ /* @__PURE__ */ jsx("div", { className: "text-text-primary mb-2 font-medium", children: name }),
548
+ /* @__PURE__ */ jsx("div", { className: `dial-row flex flex-row ${wrapClass} gap-4`, children: schemaList.map(renderSchemaInput) })
549
+ ] }, name);
550
+ }),
551
+ ungrouped.length > 0 && /* @__PURE__ */ jsx("div", { className: "dial-group", children: /* @__PURE__ */ jsx("div", { className: "dial-row flex flex-row flex-wrap gap-4", children: ungrouped.map(renderSchemaInput) }) })
552
+ ] });
553
+ };
554
+ var DialInputWrapper2 = ({ label, children }) => {
555
+ if (!label) {
556
+ return /* @__PURE__ */ jsx(Fragment, { children });
557
+ }
558
+ return /* @__PURE__ */ jsxs(FormLayout, { orientation: "label-top", children: [
559
+ /* @__PURE__ */ jsx(Label, { size: "sm", children: label }),
560
+ children
561
+ ] });
562
+ };
563
+ var DialNumberInput = ({
564
+ name,
565
+ min,
566
+ max,
567
+ step = 1,
568
+ label,
569
+ labelPosition,
570
+ size = "sm"
571
+ }) => {
572
+ const { getValue, setValue } = useDialSchema();
573
+ const value = getValue(name) ?? 0;
574
+ const inputProps = {
575
+ type: "number",
576
+ value,
577
+ min,
578
+ max,
579
+ step,
580
+ onChange: (e) => setValue(name, parseFloat(e.target.value)),
581
+ size
582
+ };
583
+ if (labelPosition === "inline") {
584
+ return /* @__PURE__ */ jsx(InputRoot, { ...inputProps, children: label ? /* @__PURE__ */ jsx(InputSlot, { side: "left", children: label }) : null });
585
+ } else {
586
+ return /* @__PURE__ */ jsx(DialInputWrapper2, { label, children: /* @__PURE__ */ jsx(InputRoot, { ...inputProps }) });
587
+ }
588
+ };
589
+ var DialBooleanInput = ({ name, label, labelPosition }) => {
590
+ const { getValue, setValue } = useDialSchema();
591
+ const value = getValue(name) ?? false;
592
+ const switchProps = {
593
+ checked: value,
594
+ onCheckedChange: (checked) => setValue(name, checked)
595
+ };
596
+ if (!label) {
597
+ return /* @__PURE__ */ jsx(Switch, { ...switchProps });
598
+ }
599
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center gap-2", children: [
600
+ /* @__PURE__ */ jsx(Label, { size: "sm", children: label }),
601
+ /* @__PURE__ */ jsx(Switch, { ...switchProps })
602
+ ] });
603
+ };
604
+ var DialSelectInput = ({
605
+ name,
606
+ options = [],
607
+ label,
608
+ labelPosition,
609
+ size = "sm"
610
+ }) => {
611
+ const { getValue, setValue } = useDialSchema();
612
+ const value = getValue(name);
613
+ const selectComponent = /* @__PURE__ */ jsxs(
614
+ Select,
615
+ {
616
+ value: String(value),
617
+ onValueChange: (val) => {
618
+ const parsed = !isNaN(Number(val)) ? Number(val) : val;
619
+ setValue(name, parsed);
620
+ },
621
+ children: [
622
+ /* @__PURE__ */ jsx(SelectTrigger, { size, children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an option" }) }),
623
+ /* @__PURE__ */ jsx(SelectContent, { children: options.map((opt, i) => /* @__PURE__ */ jsx(SelectItem, { value: String(opt), children: String(opt) }, i)) })
624
+ ]
625
+ }
626
+ );
627
+ if (!label) {
628
+ return selectComponent;
629
+ }
630
+ return /* @__PURE__ */ jsx(DialInputWrapper2, { label, children: selectComponent });
631
+ };
632
+ var DialSliderInput = ({
633
+ name,
634
+ min = 0,
635
+ max = 100,
636
+ step = 1,
637
+ label,
638
+ labelPosition,
639
+ size = "sm"
640
+ }) => {
641
+ const { getValue, setValue } = useDialSchema();
642
+ const value = getValue(name) ?? min;
643
+ const sliderProps = {
644
+ value: [value],
645
+ onValueChange: ([val]) => setValue(name, val),
646
+ min,
647
+ max,
648
+ step,
649
+ className: "flex-1"
650
+ };
651
+ const sliderComponent = /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-2", children: [
652
+ /* @__PURE__ */ jsx(Slider, { ...sliderProps }),
653
+ /* @__PURE__ */ jsx("span", { className: "text-text-secondary w-12 text-right text-sm", children: value })
654
+ ] });
655
+ if (!label) {
656
+ return sliderComponent;
657
+ }
658
+ return /* @__PURE__ */ jsx(DialInputWrapper2, { label, children: sliderComponent });
659
+ };
660
+
661
+ export { DialBooleanInput, DialCmInput, DialDegInput, DialEulerDegInput, DialEulerInput, DialInchInput, DialIntInput, DialNumberInput, DialPanel, DialQuaternionInput, DialRadInput, DialSelectInput, DialSliderInput, DialTimeInput, DialVec3Input, DialVectorInput, DialVectorInput2 };