@vertesia/ui 0.24.0-dev.202601221707

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 (1854) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +105 -0
  3. package/lib/esm/core/components/Avatar.js +31 -0
  4. package/lib/esm/core/components/Avatar.js.map +1 -0
  5. package/lib/esm/core/components/Badge.js +62 -0
  6. package/lib/esm/core/components/Badge.js.map +1 -0
  7. package/lib/esm/core/components/Button.js +32 -0
  8. package/lib/esm/core/components/Button.js.map +1 -0
  9. package/lib/esm/core/components/Center.js +6 -0
  10. package/lib/esm/core/components/Center.js.map +1 -0
  11. package/lib/esm/core/components/ComboBox.js +356 -0
  12. package/lib/esm/core/components/ComboBox.js.map +1 -0
  13. package/lib/esm/core/components/ConfirmModal.js +10 -0
  14. package/lib/esm/core/components/ConfirmModal.js.map +1 -0
  15. package/lib/esm/core/components/DeleteModal.js +28 -0
  16. package/lib/esm/core/components/DeleteModal.js.map +1 -0
  17. package/lib/esm/core/components/Divider.js +6 -0
  18. package/lib/esm/core/components/Divider.js.map +1 -0
  19. package/lib/esm/core/components/Dropdown.js +16 -0
  20. package/lib/esm/core/components/Dropdown.js.map +1 -0
  21. package/lib/esm/core/components/DropdownList.js +9 -0
  22. package/lib/esm/core/components/DropdownList.js.map +1 -0
  23. package/lib/esm/core/components/EmptyCollection.js +7 -0
  24. package/lib/esm/core/components/EmptyCollection.js.map +1 -0
  25. package/lib/esm/core/components/FileUpload.js +119 -0
  26. package/lib/esm/core/components/FileUpload.js.map +1 -0
  27. package/lib/esm/core/components/FormItem.js +9 -0
  28. package/lib/esm/core/components/FormItem.js.map +1 -0
  29. package/lib/esm/core/components/InputList.js +61 -0
  30. package/lib/esm/core/components/InputList.js.map +1 -0
  31. package/lib/esm/core/components/Link.js +13 -0
  32. package/lib/esm/core/components/Link.js.map +1 -0
  33. package/lib/esm/core/components/MenuList.js +20 -0
  34. package/lib/esm/core/components/MenuList.js.map +1 -0
  35. package/lib/esm/core/components/MessageBox.js +66 -0
  36. package/lib/esm/core/components/MessageBox.js.map +1 -0
  37. package/lib/esm/core/components/Modal.js +26 -0
  38. package/lib/esm/core/components/Modal.js.map +1 -0
  39. package/lib/esm/core/components/NumberInput.js +43 -0
  40. package/lib/esm/core/components/NumberInput.js.map +1 -0
  41. package/lib/esm/core/components/Overlay.js +57 -0
  42. package/lib/esm/core/components/Overlay.js.map +1 -0
  43. package/lib/esm/core/components/Panel.js +8 -0
  44. package/lib/esm/core/components/Panel.js.map +1 -0
  45. package/lib/esm/core/components/Portal.js +28 -0
  46. package/lib/esm/core/components/Portal.js.map +1 -0
  47. package/lib/esm/core/components/RadioGroup.js +34 -0
  48. package/lib/esm/core/components/RadioGroup.js.map +1 -0
  49. package/lib/esm/core/components/SelectBox.js +67 -0
  50. package/lib/esm/core/components/SelectBox.js.map +1 -0
  51. package/lib/esm/core/components/SelectList.js +52 -0
  52. package/lib/esm/core/components/SelectList.js.map +1 -0
  53. package/lib/esm/core/components/SelectStack.js +8 -0
  54. package/lib/esm/core/components/SelectStack.js.map +1 -0
  55. package/lib/esm/core/components/SidePanel.js +33 -0
  56. package/lib/esm/core/components/SidePanel.js.map +1 -0
  57. package/lib/esm/core/components/Spinner.js +18 -0
  58. package/lib/esm/core/components/Spinner.js.map +1 -0
  59. package/lib/esm/core/components/Switch.js +12 -0
  60. package/lib/esm/core/components/Switch.js.map +1 -0
  61. package/lib/esm/core/components/TagsInput.js +194 -0
  62. package/lib/esm/core/components/TagsInput.js.map +1 -0
  63. package/lib/esm/core/components/index.js +36 -0
  64. package/lib/esm/core/components/index.js.map +1 -0
  65. package/lib/esm/core/components/libs/utils.js +6 -0
  66. package/lib/esm/core/components/libs/utils.js.map +1 -0
  67. package/lib/esm/core/components/libs/visuallyHidden.js +16 -0
  68. package/lib/esm/core/components/libs/visuallyHidden.js.map +1 -0
  69. package/lib/esm/core/components/popup/Popup.js +60 -0
  70. package/lib/esm/core/components/popup/Popup.js.map +1 -0
  71. package/lib/esm/core/components/popup/PopupController.js +149 -0
  72. package/lib/esm/core/components/popup/PopupController.js.map +1 -0
  73. package/lib/esm/core/components/popup/index.js +4 -0
  74. package/lib/esm/core/components/popup/index.js.map +1 -0
  75. package/lib/esm/core/components/popup/position.js +221 -0
  76. package/lib/esm/core/components/popup/position.js.map +1 -0
  77. package/lib/esm/core/components/popup/utils.js +74 -0
  78. package/lib/esm/core/components/popup/utils.js.map +1 -0
  79. package/lib/esm/core/components/shadcn/breadcrumb.js +51 -0
  80. package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -0
  81. package/lib/esm/core/components/shadcn/button.js +76 -0
  82. package/lib/esm/core/components/shadcn/button.js.map +1 -0
  83. package/lib/esm/core/components/shadcn/calendar.js +13 -0
  84. package/lib/esm/core/components/shadcn/calendar.js.map +1 -0
  85. package/lib/esm/core/components/shadcn/card.js +17 -0
  86. package/lib/esm/core/components/shadcn/card.js.map +1 -0
  87. package/lib/esm/core/components/shadcn/checkbox.js +9 -0
  88. package/lib/esm/core/components/shadcn/checkbox.js.map +1 -0
  89. package/lib/esm/core/components/shadcn/command.js +29 -0
  90. package/lib/esm/core/components/shadcn/command.js.map +1 -0
  91. package/lib/esm/core/components/shadcn/dialog.js +74 -0
  92. package/lib/esm/core/components/shadcn/dialog.js.map +1 -0
  93. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
  94. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
  95. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js +23 -0
  96. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js.map +1 -0
  97. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +129 -0
  98. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -0
  99. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +46 -0
  100. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -0
  101. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +23 -0
  102. package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -0
  103. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js +28 -0
  104. package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js.map +1 -0
  105. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js +5 -0
  106. package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js.map +1 -0
  107. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js +98 -0
  108. package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js.map +1 -0
  109. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js +24 -0
  110. package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +1 -0
  111. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js +21 -0
  112. package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js.map +1 -0
  113. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +161 -0
  114. package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +1 -0
  115. package/lib/esm/core/components/shadcn/filters/filter-styles.js +88 -0
  116. package/lib/esm/core/components/shadcn/filters/filter-styles.js.map +1 -0
  117. package/lib/esm/core/components/shadcn/filters/filterBar.js +242 -0
  118. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -0
  119. package/lib/esm/core/components/shadcn/filters/filters.js +57 -0
  120. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -0
  121. package/lib/esm/core/components/shadcn/filters/index.js +6 -0
  122. package/lib/esm/core/components/shadcn/filters/index.js.map +1 -0
  123. package/lib/esm/core/components/shadcn/filters/types.js +10 -0
  124. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -0
  125. package/lib/esm/core/components/shadcn/heading.js +17 -0
  126. package/lib/esm/core/components/shadcn/heading.js.map +1 -0
  127. package/lib/esm/core/components/shadcn/index.js +23 -0
  128. package/lib/esm/core/components/shadcn/index.js.map +1 -0
  129. package/lib/esm/core/components/shadcn/input.js +41 -0
  130. package/lib/esm/core/components/shadcn/input.js.map +1 -0
  131. package/lib/esm/core/components/shadcn/label.js +10 -0
  132. package/lib/esm/core/components/shadcn/label.js.map +1 -0
  133. package/lib/esm/core/components/shadcn/popover.js +50 -0
  134. package/lib/esm/core/components/shadcn/popover.js.map +1 -0
  135. package/lib/esm/core/components/shadcn/resizeable.js +15 -0
  136. package/lib/esm/core/components/shadcn/resizeable.js.map +1 -0
  137. package/lib/esm/core/components/shadcn/selectBox.js +152 -0
  138. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -0
  139. package/lib/esm/core/components/shadcn/separator.js +8 -0
  140. package/lib/esm/core/components/shadcn/separator.js.map +1 -0
  141. package/lib/esm/core/components/shadcn/tabs.js +132 -0
  142. package/lib/esm/core/components/shadcn/tabs.js.map +1 -0
  143. package/lib/esm/core/components/shadcn/text.js +30 -0
  144. package/lib/esm/core/components/shadcn/text.js.map +1 -0
  145. package/lib/esm/core/components/shadcn/textarea.js +7 -0
  146. package/lib/esm/core/components/shadcn/textarea.js.map +1 -0
  147. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js +39 -0
  148. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js.map +1 -0
  149. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +13 -0
  150. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -0
  151. package/lib/esm/core/components/shadcn/tooltip.js +14 -0
  152. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -0
  153. package/lib/esm/core/components/styles.js +10 -0
  154. package/lib/esm/core/components/styles.js.map +1 -0
  155. package/lib/esm/core/components/table/index.js +24 -0
  156. package/lib/esm/core/components/table/index.js.map +1 -0
  157. package/lib/esm/core/components/tabs/Tabs.js +78 -0
  158. package/lib/esm/core/components/tabs/Tabs.js.map +1 -0
  159. package/lib/esm/core/components/tabs/TabsContext.js +7 -0
  160. package/lib/esm/core/components/tabs/TabsContext.js.map +1 -0
  161. package/lib/esm/core/components/tabs/index.js +3 -0
  162. package/lib/esm/core/components/tabs/index.js.map +1 -0
  163. package/lib/esm/core/components/toast/NotificationPanel.js +43 -0
  164. package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -0
  165. package/lib/esm/core/components/toast/ToastContext.js +7 -0
  166. package/lib/esm/core/components/toast/ToastContext.js.map +1 -0
  167. package/lib/esm/core/components/toast/ToastProps.js +2 -0
  168. package/lib/esm/core/components/toast/ToastProps.js.map +1 -0
  169. package/lib/esm/core/components/toast/ToastProvider.js +13 -0
  170. package/lib/esm/core/components/toast/ToastProvider.js.map +1 -0
  171. package/lib/esm/core/components/toast/index.js +3 -0
  172. package/lib/esm/core/components/toast/index.js.map +1 -0
  173. package/lib/esm/core/hooks/CompositeState.js +256 -0
  174. package/lib/esm/core/hooks/CompositeState.js.map +1 -0
  175. package/lib/esm/core/hooks/PortalContainerProvider.js +44 -0
  176. package/lib/esm/core/hooks/PortalContainerProvider.js.map +1 -0
  177. package/lib/esm/core/hooks/SharedState.js +64 -0
  178. package/lib/esm/core/hooks/SharedState.js.map +1 -0
  179. package/lib/esm/core/hooks/index.js +16 -0
  180. package/lib/esm/core/hooks/index.js.map +1 -0
  181. package/lib/esm/core/hooks/useClickOutside.js +29 -0
  182. package/lib/esm/core/hooks/useClickOutside.js.map +1 -0
  183. package/lib/esm/core/hooks/useCopyToClipboard.js +23 -0
  184. package/lib/esm/core/hooks/useCopyToClipboard.js.map +1 -0
  185. package/lib/esm/core/hooks/useDarkMode.js +11 -0
  186. package/lib/esm/core/hooks/useDarkMode.js.map +1 -0
  187. package/lib/esm/core/hooks/useDebounce.js +14 -0
  188. package/lib/esm/core/hooks/useDebounce.js.map +1 -0
  189. package/lib/esm/core/hooks/useEventSource.js +31 -0
  190. package/lib/esm/core/hooks/useEventSource.js.map +1 -0
  191. package/lib/esm/core/hooks/useFetch.js +40 -0
  192. package/lib/esm/core/hooks/useFetch.js.map +1 -0
  193. package/lib/esm/core/hooks/useFlag.js +13 -0
  194. package/lib/esm/core/hooks/useFlag.js.map +1 -0
  195. package/lib/esm/core/hooks/useIntersectionObserver.js +34 -0
  196. package/lib/esm/core/hooks/useIntersectionObserver.js.map +1 -0
  197. package/lib/esm/core/hooks/useIsFistRendering.js +14 -0
  198. package/lib/esm/core/hooks/useIsFistRendering.js.map +1 -0
  199. package/lib/esm/core/hooks/useSafeLayoutEffect.js +4 -0
  200. package/lib/esm/core/hooks/useSafeLayoutEffect.js.map +1 -0
  201. package/lib/esm/core/hooks/useScrollableSearch.js +92 -0
  202. package/lib/esm/core/hooks/useScrollableSearch.js.map +1 -0
  203. package/lib/esm/core/hooks/useSharedValue.js +21 -0
  204. package/lib/esm/core/hooks/useSharedValue.js.map +1 -0
  205. package/lib/esm/core/index.js +4 -0
  206. package/lib/esm/core/index.js.map +1 -0
  207. package/lib/esm/core/utils/cn.js +6 -0
  208. package/lib/esm/core/utils/cn.js.map +1 -0
  209. package/lib/esm/core/utils/index.js +2 -0
  210. package/lib/esm/core/utils/index.js.map +1 -0
  211. package/lib/esm/env/index.js +75 -0
  212. package/lib/esm/env/index.js.map +1 -0
  213. package/lib/esm/features/activity-doc/ActivityDoc.js +71 -0
  214. package/lib/esm/features/activity-doc/ActivityDoc.js.map +1 -0
  215. package/lib/esm/features/activity-doc/index.js +2 -0
  216. package/lib/esm/features/activity-doc/index.js.map +1 -0
  217. package/lib/esm/features/agent/PayloadBuilder.js +269 -0
  218. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
  219. package/lib/esm/features/agent/chat/AgentChart.js +246 -0
  220. package/lib/esm/features/agent/chat/AgentChart.js.map +1 -0
  221. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
  222. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
  223. package/lib/esm/features/agent/chat/AskUserWidget.js +113 -0
  224. package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -0
  225. package/lib/esm/features/agent/chat/ImageLightbox.js +33 -0
  226. package/lib/esm/features/agent/chat/ImageLightbox.js.map +1 -0
  227. package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
  228. package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
  229. package/lib/esm/features/agent/chat/ModernAgentConversation.js +888 -0
  230. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
  231. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +273 -0
  232. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
  233. package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +88 -0
  234. package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -0
  235. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +62 -0
  236. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
  237. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
  238. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
  239. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +95 -0
  240. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
  241. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +197 -0
  242. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
  243. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +245 -0
  244. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
  245. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
  246. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
  247. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +63 -0
  248. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
  249. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
  250. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
  251. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +52 -0
  252. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
  253. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
  254. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
  255. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
  256. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
  257. package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +214 -0
  258. package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -0
  259. package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +302 -0
  260. package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -0
  261. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
  262. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
  263. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +412 -0
  264. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
  265. package/lib/esm/features/agent/chat/SkillWidgetProvider.js +90 -0
  266. package/lib/esm/features/agent/chat/SkillWidgetProvider.js.map +1 -0
  267. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
  268. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
  269. package/lib/esm/features/agent/chat/VegaLiteChart.js +778 -0
  270. package/lib/esm/features/agent/chat/VegaLiteChart.js.map +1 -0
  271. package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
  272. package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
  273. package/lib/esm/features/agent/chat/index.js +17 -0
  274. package/lib/esm/features/agent/chat/index.js.map +1 -0
  275. package/lib/esm/features/agent/chat/useArtifactUrlCache.js +62 -0
  276. package/lib/esm/features/agent/chat/useArtifactUrlCache.js.map +1 -0
  277. package/lib/esm/features/agent/createChartTool.js +632 -0
  278. package/lib/esm/features/agent/createChartTool.js.map +1 -0
  279. package/lib/esm/features/agent/examples.js +295 -0
  280. package/lib/esm/features/agent/examples.js.map +1 -0
  281. package/lib/esm/features/agent/index.js +5 -0
  282. package/lib/esm/features/agent/index.js.map +1 -0
  283. package/lib/esm/features/agent/visualization.js +165 -0
  284. package/lib/esm/features/agent/visualization.js.map +1 -0
  285. package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
  286. package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
  287. package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
  288. package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
  289. package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
  290. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
  291. package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
  292. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
  293. package/lib/esm/features/errors/index.js +5 -0
  294. package/lib/esm/features/errors/index.js.map +1 -0
  295. package/lib/esm/features/facets/CollectionsFacetsNav.js +89 -0
  296. package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -0
  297. package/lib/esm/features/facets/DocumentsFacetsNav.js +147 -0
  298. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -0
  299. package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
  300. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
  301. package/lib/esm/features/facets/InteractionsFacetsNav.js +88 -0
  302. package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -0
  303. package/lib/esm/features/facets/PromptsFacetsNav.js +80 -0
  304. package/lib/esm/features/facets/PromptsFacetsNav.js.map +1 -0
  305. package/lib/esm/features/facets/RunsFacetsNav.js +157 -0
  306. package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -0
  307. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +100 -0
  308. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -0
  309. package/lib/esm/features/facets/index.js +15 -0
  310. package/lib/esm/features/facets/index.js.map +1 -0
  311. package/lib/esm/features/facets/utils/SearchInterface.js +2 -0
  312. package/lib/esm/features/facets/utils/SearchInterface.js.map +1 -0
  313. package/lib/esm/features/facets/utils/StringFacet.js +12 -0
  314. package/lib/esm/features/facets/utils/StringFacet.js.map +1 -0
  315. package/lib/esm/features/facets/utils/StringListFacet.js +11 -0
  316. package/lib/esm/features/facets/utils/StringListFacet.js.map +1 -0
  317. package/lib/esm/features/facets/utils/TypeFacet.js +42 -0
  318. package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -0
  319. package/lib/esm/features/facets/utils/VEnvironmentFacet.js +25 -0
  320. package/lib/esm/features/facets/utils/VEnvironmentFacet.js.map +1 -0
  321. package/lib/esm/features/facets/utils/VInteractionFacet.js +45 -0
  322. package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -0
  323. package/lib/esm/features/facets/utils/VStringFacet.js +20 -0
  324. package/lib/esm/features/facets/utils/VStringFacet.js.map +1 -0
  325. package/lib/esm/features/facets/utils/VTypeFacet.js +61 -0
  326. package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -0
  327. package/lib/esm/features/facets/utils/VUserFacet.js +31 -0
  328. package/lib/esm/features/facets/utils/VUserFacet.js.map +1 -0
  329. package/lib/esm/features/facets/utils/utils.js +7 -0
  330. package/lib/esm/features/facets/utils/utils.js.map +1 -0
  331. package/lib/esm/features/index.js +12 -0
  332. package/lib/esm/features/index.js.map +1 -0
  333. package/lib/esm/features/layout/GenericPageNavHeader.js +74 -0
  334. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
  335. package/lib/esm/features/layout/NotFoundView.js +5 -0
  336. package/lib/esm/features/layout/NotFoundView.js.map +1 -0
  337. package/lib/esm/features/layout/index.js +3 -0
  338. package/lib/esm/features/layout/index.js.map +1 -0
  339. package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js +268 -0
  340. package/lib/esm/features/magic-pdf/AnnotatedImageSlider.js.map +1 -0
  341. package/lib/esm/features/magic-pdf/DownloadPopover.js +28 -0
  342. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
  343. package/lib/esm/features/magic-pdf/ExtractedContentView.js +77 -0
  344. package/lib/esm/features/magic-pdf/ExtractedContentView.js.map +1 -0
  345. package/lib/esm/features/magic-pdf/MagicPdfProvider.js +242 -0
  346. package/lib/esm/features/magic-pdf/MagicPdfProvider.js.map +1 -0
  347. package/lib/esm/features/magic-pdf/MagicPdfView.js +61 -0
  348. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
  349. package/lib/esm/features/magic-pdf/index.js +2 -0
  350. package/lib/esm/features/magic-pdf/index.js.map +1 -0
  351. package/lib/esm/features/magic-pdf/types.js +2 -0
  352. package/lib/esm/features/magic-pdf/types.js.map +1 -0
  353. package/lib/esm/features/pdf-viewer/PdfPageRenderer.js +261 -0
  354. package/lib/esm/features/pdf-viewer/PdfPageRenderer.js.map +1 -0
  355. package/lib/esm/features/pdf-viewer/PdfPageSlider.js +276 -0
  356. package/lib/esm/features/pdf-viewer/PdfPageSlider.js.map +1 -0
  357. package/lib/esm/features/pdf-viewer/SimplePdfViewer.js +71 -0
  358. package/lib/esm/features/pdf-viewer/SimplePdfViewer.js.map +1 -0
  359. package/lib/esm/features/pdf-viewer/index.js +4 -0
  360. package/lib/esm/features/pdf-viewer/index.js.map +1 -0
  361. package/lib/esm/features/permissions/SecureButton.js +13 -0
  362. package/lib/esm/features/permissions/SecureButton.js.map +1 -0
  363. package/lib/esm/features/permissions/SecureSidebarItem.js +14 -0
  364. package/lib/esm/features/permissions/SecureSidebarItem.js.map +1 -0
  365. package/lib/esm/features/permissions/UserPermissionsProvider.js +87 -0
  366. package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -0
  367. package/lib/esm/features/permissions/helpers.js +12 -0
  368. package/lib/esm/features/permissions/helpers.js.map +1 -0
  369. package/lib/esm/features/permissions/index.js +5 -0
  370. package/lib/esm/features/permissions/index.js.map +1 -0
  371. package/lib/esm/features/store/collections/BrowseCollectionView.js +40 -0
  372. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
  373. package/lib/esm/features/store/collections/CollectionsTable.js +64 -0
  374. package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
  375. package/lib/esm/features/store/collections/CreateCollection.js +87 -0
  376. package/lib/esm/features/store/collections/CreateCollection.js.map +1 -0
  377. package/lib/esm/features/store/collections/EditCollectionView.js +183 -0
  378. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
  379. package/lib/esm/features/store/collections/SelectCollection.js +119 -0
  380. package/lib/esm/features/store/collections/SelectCollection.js.map +1 -0
  381. package/lib/esm/features/store/collections/SharedPropsEditor.js +39 -0
  382. package/lib/esm/features/store/collections/SharedPropsEditor.js.map +1 -0
  383. package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js +35 -0
  384. package/lib/esm/features/store/collections/SyncMemberHeadsToggle.js.map +1 -0
  385. package/lib/esm/features/store/collections/index.js +8 -0
  386. package/lib/esm/features/store/collections/index.js.map +1 -0
  387. package/lib/esm/features/store/index.js +4 -0
  388. package/lib/esm/features/store/index.js.map +1 -0
  389. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +147 -0
  390. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
  391. package/lib/esm/features/store/objects/DocumentSearchResults.js +204 -0
  392. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
  393. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
  394. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
  395. package/lib/esm/features/store/objects/DocumentTable.js +278 -0
  396. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
  397. package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
  398. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
  399. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
  400. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
  401. package/lib/esm/features/store/objects/components/ContentOverview.js +629 -0
  402. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
  403. package/lib/esm/features/store/objects/components/DocumentIcon.js +33 -0
  404. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
  405. package/lib/esm/features/store/objects/components/DocumentInput.js +51 -0
  406. package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
  407. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +171 -0
  408. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
  409. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +53 -0
  410. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
  411. package/lib/esm/features/store/objects/components/SelectDocument.js +55 -0
  412. package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
  413. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
  414. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
  415. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +90 -0
  416. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
  417. package/lib/esm/features/store/objects/components/index.js +10 -0
  418. package/lib/esm/features/store/objects/components/index.js.map +1 -0
  419. package/lib/esm/features/store/objects/components/useContentPanelHooks.js +169 -0
  420. package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -0
  421. package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
  422. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
  423. package/lib/esm/features/store/objects/index.js +11 -0
  424. package/lib/esm/features/store/objects/index.js.map +1 -0
  425. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +86 -0
  426. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
  427. package/lib/esm/features/store/objects/layout/documentLayout.js +15 -0
  428. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
  429. package/lib/esm/features/store/objects/layout/index.js +3 -0
  430. package/lib/esm/features/store/objects/layout/index.js.map +1 -0
  431. package/lib/esm/features/store/objects/layout/renderers.js +157 -0
  432. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
  433. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +175 -0
  434. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
  435. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +39 -0
  436. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
  437. package/lib/esm/features/store/objects/search/index.js +3 -0
  438. package/lib/esm/features/store/objects/search/index.js.map +1 -0
  439. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +150 -0
  440. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
  441. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
  442. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
  443. package/lib/esm/features/store/objects/selection/SelectionActions.js +69 -0
  444. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
  445. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +81 -0
  446. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
  447. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
  448. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
  449. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
  450. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
  451. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +84 -0
  452. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
  453. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
  454. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
  455. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
  456. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
  457. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
  458. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
  459. package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
  460. package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
  461. package/lib/esm/features/store/objects/selection/index.js +5 -0
  462. package/lib/esm/features/store/objects/selection/index.js.map +1 -0
  463. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +519 -0
  464. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
  465. package/lib/esm/features/store/objects/upload/index.js +4 -0
  466. package/lib/esm/features/store/objects/upload/index.js.map +1 -0
  467. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +195 -0
  468. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
  469. package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
  470. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
  471. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +81 -0
  472. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
  473. package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
  474. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
  475. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
  476. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
  477. package/lib/esm/features/store/types/ObjectSchemaEditor.js +103 -0
  478. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
  479. package/lib/esm/features/store/types/SelectContentType.js +43 -0
  480. package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
  481. package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
  482. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
  483. package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
  484. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
  485. package/lib/esm/features/store/types/index.js +9 -0
  486. package/lib/esm/features/store/types/index.js.map +1 -0
  487. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
  488. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
  489. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
  490. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
  491. package/lib/esm/features/store/types/search/index.js +3 -0
  492. package/lib/esm/features/store/types/search/index.js.map +1 -0
  493. package/lib/esm/features/user/UserAvatar.js +18 -0
  494. package/lib/esm/features/user/UserAvatar.js.map +1 -0
  495. package/lib/esm/features/user/UserInfo.js +121 -0
  496. package/lib/esm/features/user/UserInfo.js.map +1 -0
  497. package/lib/esm/features/user/index.js +3 -0
  498. package/lib/esm/features/user/index.js.map +1 -0
  499. package/lib/esm/features/utils/index.js +6 -0
  500. package/lib/esm/features/utils/index.js.map +1 -0
  501. package/lib/esm/features/utils/mimeType.js +17 -0
  502. package/lib/esm/features/utils/mimeType.js.map +1 -0
  503. package/lib/esm/features/utils/print.js +181 -0
  504. package/lib/esm/features/utils/print.js.map +1 -0
  505. package/lib/esm/features/utils/rendition.js +67 -0
  506. package/lib/esm/features/utils/rendition.js.map +1 -0
  507. package/lib/esm/features/utils/text.js +10 -0
  508. package/lib/esm/features/utils/text.js.map +1 -0
  509. package/lib/esm/features/utils/workflowStatus.js +43 -0
  510. package/lib/esm/features/utils/workflowStatus.js.map +1 -0
  511. package/lib/esm/layout/AppLayout.js +46 -0
  512. package/lib/esm/layout/AppLayout.js.map +1 -0
  513. package/lib/esm/layout/FullHeightLayout.js +18 -0
  514. package/lib/esm/layout/FullHeightLayout.js.map +1 -0
  515. package/lib/esm/layout/Navbar.js +40 -0
  516. package/lib/esm/layout/Navbar.js.map +1 -0
  517. package/lib/esm/layout/Sidebar.js +45 -0
  518. package/lib/esm/layout/Sidebar.js.map +1 -0
  519. package/lib/esm/layout/SidebarContext.js +10 -0
  520. package/lib/esm/layout/SidebarContext.js.map +1 -0
  521. package/lib/esm/layout/TitleBar.js +5 -0
  522. package/lib/esm/layout/TitleBar.js.map +1 -0
  523. package/lib/esm/layout/index.js +7 -0
  524. package/lib/esm/layout/index.js.map +1 -0
  525. package/lib/esm/router/FixLinks.js +23 -0
  526. package/lib/esm/router/FixLinks.js.map +1 -0
  527. package/lib/esm/router/HistoryNavigator.js +192 -0
  528. package/lib/esm/router/HistoryNavigator.js.map +1 -0
  529. package/lib/esm/router/Nav.js +26 -0
  530. package/lib/esm/router/Nav.js.map +1 -0
  531. package/lib/esm/router/NestedNavigationContext.js +19 -0
  532. package/lib/esm/router/NestedNavigationContext.js.map +1 -0
  533. package/lib/esm/router/NestedRouterProvider.js +44 -0
  534. package/lib/esm/router/NestedRouterProvider.js.map +1 -0
  535. package/lib/esm/router/PathMatcher.js +159 -0
  536. package/lib/esm/router/PathMatcher.js.map +1 -0
  537. package/lib/esm/router/PathWithParams.js +34 -0
  538. package/lib/esm/router/PathWithParams.js.map +1 -0
  539. package/lib/esm/router/Route404.js +18 -0
  540. package/lib/esm/router/Route404.js.map +1 -0
  541. package/lib/esm/router/RouteComponent.js +32 -0
  542. package/lib/esm/router/RouteComponent.js.map +1 -0
  543. package/lib/esm/router/Router.js +161 -0
  544. package/lib/esm/router/Router.js.map +1 -0
  545. package/lib/esm/router/RouterProvider.js +41 -0
  546. package/lib/esm/router/RouterProvider.js.map +1 -0
  547. package/lib/esm/router/index.js +11 -0
  548. package/lib/esm/router/index.js.map +1 -0
  549. package/lib/esm/router/path.js +140 -0
  550. package/lib/esm/router/path.js.map +1 -0
  551. package/lib/esm/session/TypeRegistry.js +24 -0
  552. package/lib/esm/session/TypeRegistry.js.map +1 -0
  553. package/lib/esm/session/UserSession.js +192 -0
  554. package/lib/esm/session/UserSession.js.map +1 -0
  555. package/lib/esm/session/UserSessionProvider.js +179 -0
  556. package/lib/esm/session/UserSessionProvider.js.map +1 -0
  557. package/lib/esm/session/auth/composable.js +255 -0
  558. package/lib/esm/session/auth/composable.js.map +1 -0
  559. package/lib/esm/session/auth/firebase.js +158 -0
  560. package/lib/esm/session/auth/firebase.js.map +1 -0
  561. package/lib/esm/session/auth/useAuthState.js +46 -0
  562. package/lib/esm/session/auth/useAuthState.js.map +1 -0
  563. package/lib/esm/session/auth/useCurrentTenant.js +63 -0
  564. package/lib/esm/session/auth/useCurrentTenant.js.map +1 -0
  565. package/lib/esm/session/constants.js +3 -0
  566. package/lib/esm/session/constants.js.map +1 -0
  567. package/lib/esm/session/index.js +9 -0
  568. package/lib/esm/session/index.js.map +1 -0
  569. package/lib/esm/session/useUXTracking.js +29 -0
  570. package/lib/esm/session/useUXTracking.js.map +1 -0
  571. package/lib/esm/shell/SplashScreen.js +26 -0
  572. package/lib/esm/shell/SplashScreen.js.map +1 -0
  573. package/lib/esm/shell/VertesiaShell.js +10 -0
  574. package/lib/esm/shell/VertesiaShell.js.map +1 -0
  575. package/lib/esm/shell/apps/AppInstallationProvider.js +13 -0
  576. package/lib/esm/shell/apps/AppInstallationProvider.js.map +1 -0
  577. package/lib/esm/shell/apps/AppProjectSelector.js +36 -0
  578. package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -0
  579. package/lib/esm/shell/apps/StandaloneApp.js +87 -0
  580. package/lib/esm/shell/apps/StandaloneApp.js.map +1 -0
  581. package/lib/esm/shell/apps/index.js +4 -0
  582. package/lib/esm/shell/apps/index.js.map +1 -0
  583. package/lib/esm/shell/index.js +8 -0
  584. package/lib/esm/shell/index.js.map +1 -0
  585. package/lib/esm/shell/login/EnterpriseSigninButton.js +84 -0
  586. package/lib/esm/shell/login/EnterpriseSigninButton.js.map +1 -0
  587. package/lib/esm/shell/login/GitHubSignInButton.js +24 -0
  588. package/lib/esm/shell/login/GitHubSignInButton.js.map +1 -0
  589. package/lib/esm/shell/login/GoogleSignInButton.js +25 -0
  590. package/lib/esm/shell/login/GoogleSignInButton.js.map +1 -0
  591. package/lib/esm/shell/login/InviteAcceptModal.js +62 -0
  592. package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -0
  593. package/lib/esm/shell/login/MicrosoftSigninButton.js +19 -0
  594. package/lib/esm/shell/login/MicrosoftSigninButton.js.map +1 -0
  595. package/lib/esm/shell/login/PreviewIcon.js +23 -0
  596. package/lib/esm/shell/login/PreviewIcon.js.map +1 -0
  597. package/lib/esm/shell/login/SignInModal.js +9 -0
  598. package/lib/esm/shell/login/SignInModal.js.map +1 -0
  599. package/lib/esm/shell/login/SigninScreen.js +64 -0
  600. package/lib/esm/shell/login/SigninScreen.js.map +1 -0
  601. package/lib/esm/shell/login/SignupForm.js +91 -0
  602. package/lib/esm/shell/login/SignupForm.js.map +1 -0
  603. package/lib/esm/shell/login/TerminalLogin.js +208 -0
  604. package/lib/esm/shell/login/TerminalLogin.js.map +1 -0
  605. package/lib/esm/shell/login/UserInfo.js +41 -0
  606. package/lib/esm/shell/login/UserInfo.js.map +1 -0
  607. package/lib/esm/shell/login/UserSessionMenu.js +37 -0
  608. package/lib/esm/shell/login/UserSessionMenu.js.map +1 -0
  609. package/lib/esm/shell/utils.js +6 -0
  610. package/lib/esm/shell/utils.js.map +1 -0
  611. package/lib/esm/widgets/Progress.js +5 -0
  612. package/lib/esm/widgets/Progress.js.map +1 -0
  613. package/lib/esm/widgets/SvgIcon.js +36 -0
  614. package/lib/esm/widgets/SvgIcon.js.map +1 -0
  615. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +103 -0
  616. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -0
  617. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js +33 -0
  618. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js.map +1 -0
  619. package/lib/esm/widgets/codemirror/MonacoEditor.js +128 -0
  620. package/lib/esm/widgets/codemirror/MonacoEditor.js.map +1 -0
  621. package/lib/esm/widgets/codemirror/index.js +3 -0
  622. package/lib/esm/widgets/codemirror/index.js.map +1 -0
  623. package/lib/esm/widgets/form/Form.js +100 -0
  624. package/lib/esm/widgets/form/Form.js.map +1 -0
  625. package/lib/esm/widgets/form/FormContext.js +31 -0
  626. package/lib/esm/widgets/form/FormContext.js.map +1 -0
  627. package/lib/esm/widgets/form/ManagedObject.js +287 -0
  628. package/lib/esm/widgets/form/ManagedObject.js.map +1 -0
  629. package/lib/esm/widgets/form/fields.js +12 -0
  630. package/lib/esm/widgets/form/fields.js.map +1 -0
  631. package/lib/esm/widgets/form/index.js +7 -0
  632. package/lib/esm/widgets/form/index.js.map +1 -0
  633. package/lib/esm/widgets/form/inputs.js +38 -0
  634. package/lib/esm/widgets/form/inputs.js.map +1 -0
  635. package/lib/esm/widgets/form/schema.js +197 -0
  636. package/lib/esm/widgets/form/schema.js.map +1 -0
  637. package/lib/esm/widgets/index.js +12 -0
  638. package/lib/esm/widgets/index.js.map +1 -0
  639. package/lib/esm/widgets/json-view/JSONCode.js +157 -0
  640. package/lib/esm/widgets/json-view/JSONCode.js.map +1 -0
  641. package/lib/esm/widgets/json-view/JSONDisplay.js +10 -0
  642. package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -0
  643. package/lib/esm/widgets/json-view/JSONView.js +106 -0
  644. package/lib/esm/widgets/json-view/JSONView.js.map +1 -0
  645. package/lib/esm/widgets/json-view/index.js +4 -0
  646. package/lib/esm/widgets/json-view/index.js.map +1 -0
  647. package/lib/esm/widgets/json-view/types.js +2 -0
  648. package/lib/esm/widgets/json-view/types.js.map +1 -0
  649. package/lib/esm/widgets/markdown/CodeBlockRendering.js +38 -0
  650. package/lib/esm/widgets/markdown/CodeBlockRendering.js.map +1 -0
  651. package/lib/esm/widgets/markdown/MarkdownRenderer.js +424 -0
  652. package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -0
  653. package/lib/esm/widgets/markdown/MermaidDiagram.js +71 -0
  654. package/lib/esm/widgets/markdown/MermaidDiagram.js.map +1 -0
  655. package/lib/esm/widgets/markdown/index.js +3 -0
  656. package/lib/esm/widgets/markdown/index.js.map +1 -0
  657. package/lib/esm/widgets/popover/Popover.js +73 -0
  658. package/lib/esm/widgets/popover/Popover.js.map +1 -0
  659. package/lib/esm/widgets/popover/context.js +7 -0
  660. package/lib/esm/widgets/popover/context.js.map +1 -0
  661. package/lib/esm/widgets/popover/index.js +3 -0
  662. package/lib/esm/widgets/popover/index.js.map +1 -0
  663. package/lib/esm/widgets/popover/slots.js +22 -0
  664. package/lib/esm/widgets/popover/slots.js.map +1 -0
  665. package/lib/esm/widgets/properties/PropertiesView.js +8 -0
  666. package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
  667. package/lib/esm/widgets/properties/index.js +2 -0
  668. package/lib/esm/widgets/properties/index.js.map +1 -0
  669. package/lib/esm/widgets/schema-editor/ManagedSchema.js +300 -0
  670. package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -0
  671. package/lib/esm/widgets/schema-editor/editor/Editable.js +110 -0
  672. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -0
  673. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js +8 -0
  674. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -0
  675. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +81 -0
  676. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -0
  677. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +7 -0
  678. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -0
  679. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js +9 -0
  680. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js.map +1 -0
  681. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +84 -0
  682. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -0
  683. package/lib/esm/widgets/schema-editor/index.js +7 -0
  684. package/lib/esm/widgets/schema-editor/index.js.map +1 -0
  685. package/lib/esm/widgets/schema-editor/json-schema4-utils.js +188 -0
  686. package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -0
  687. package/lib/esm/widgets/schema-editor/type-signature.js +30 -0
  688. package/lib/esm/widgets/schema-editor/type-signature.js.map +1 -0
  689. package/lib/esm/widgets/upload/DropZone.js +175 -0
  690. package/lib/esm/widgets/upload/DropZone.js.map +1 -0
  691. package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
  692. package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
  693. package/lib/esm/widgets/upload/UploadSummary.js +30 -0
  694. package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
  695. package/lib/esm/widgets/upload/index.js +4 -0
  696. package/lib/esm/widgets/upload/index.js.map +1 -0
  697. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js +11 -0
  698. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js.map +1 -0
  699. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js +8 -0
  700. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js.map +1 -0
  701. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js +11 -0
  702. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js.map +1 -0
  703. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js +11 -0
  704. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js.map +1 -0
  705. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js +9 -0
  706. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js.map +1 -0
  707. package/lib/esm/widgets/xml-viewer/components/Elements/index.js +36 -0
  708. package/lib/esm/widgets/xml-viewer/components/Elements/index.js.map +1 -0
  709. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js +5 -0
  710. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js.map +1 -0
  711. package/lib/esm/widgets/xml-viewer/components/Tag/index.js +13 -0
  712. package/lib/esm/widgets/xml-viewer/components/Tag/index.js.map +1 -0
  713. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js +13 -0
  714. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js.map +1 -0
  715. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js +39 -0
  716. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js.map +1 -0
  717. package/lib/esm/widgets/xml-viewer/components/types.js +2 -0
  718. package/lib/esm/widgets/xml-viewer/components/types.js.map +1 -0
  719. package/lib/esm/widgets/xml-viewer/constants/index.js +27 -0
  720. package/lib/esm/widgets/xml-viewer/constants/index.js.map +1 -0
  721. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js +10 -0
  722. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js.map +1 -0
  723. package/lib/esm/widgets/xml-viewer/helpers/index.js +40 -0
  724. package/lib/esm/widgets/xml-viewer/helpers/index.js.map +1 -0
  725. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js +22 -0
  726. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js.map +1 -0
  727. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js +31 -0
  728. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -0
  729. package/lib/esm/widgets/xml-viewer/index.js +3 -0
  730. package/lib/esm/widgets/xml-viewer/index.js.map +1 -0
  731. package/lib/esm/widgets/xml-viewer/types/index.js +2 -0
  732. package/lib/esm/widgets/xml-viewer/types/index.js.map +1 -0
  733. package/lib/tsconfig.tsbuildinfo +1 -0
  734. package/lib/types/core/components/Avatar.d.ts +16 -0
  735. package/lib/types/core/components/Avatar.d.ts.map +1 -0
  736. package/lib/types/core/components/Badge.d.ts +21 -0
  737. package/lib/types/core/components/Badge.d.ts.map +1 -0
  738. package/lib/types/core/components/Button.d.ts +14 -0
  739. package/lib/types/core/components/Button.d.ts.map +1 -0
  740. package/lib/types/core/components/Center.d.ts +8 -0
  741. package/lib/types/core/components/Center.d.ts.map +1 -0
  742. package/lib/types/core/components/ComboBox.d.ts +124 -0
  743. package/lib/types/core/components/ComboBox.d.ts.map +1 -0
  744. package/lib/types/core/components/ConfirmModal.d.ts +11 -0
  745. package/lib/types/core/components/ConfirmModal.d.ts.map +1 -0
  746. package/lib/types/core/components/DeleteModal.d.ts +11 -0
  747. package/lib/types/core/components/DeleteModal.d.ts.map +1 -0
  748. package/lib/types/core/components/Divider.d.ts +6 -0
  749. package/lib/types/core/components/Divider.d.ts.map +1 -0
  750. package/lib/types/core/components/Dropdown.d.ts +15 -0
  751. package/lib/types/core/components/Dropdown.d.ts.map +1 -0
  752. package/lib/types/core/components/DropdownList.d.ts +13 -0
  753. package/lib/types/core/components/DropdownList.d.ts.map +1 -0
  754. package/lib/types/core/components/EmptyCollection.d.ts +9 -0
  755. package/lib/types/core/components/EmptyCollection.d.ts.map +1 -0
  756. package/lib/types/core/components/FileUpload.d.ts +29 -0
  757. package/lib/types/core/components/FileUpload.d.ts.map +1 -0
  758. package/lib/types/core/components/FormItem.d.ts +13 -0
  759. package/lib/types/core/components/FormItem.d.ts.map +1 -0
  760. package/lib/types/core/components/InputList.d.ts +12 -0
  761. package/lib/types/core/components/InputList.d.ts.map +1 -0
  762. package/lib/types/core/components/Link.d.ts +7 -0
  763. package/lib/types/core/components/Link.d.ts.map +1 -0
  764. package/lib/types/core/components/MenuList.d.ts +14 -0
  765. package/lib/types/core/components/MenuList.d.ts.map +1 -0
  766. package/lib/types/core/components/MessageBox.d.ts +36 -0
  767. package/lib/types/core/components/MessageBox.d.ts.map +1 -0
  768. package/lib/types/core/components/Modal.d.ts +30 -0
  769. package/lib/types/core/components/Modal.d.ts.map +1 -0
  770. package/lib/types/core/components/NumberInput.d.ts +16 -0
  771. package/lib/types/core/components/NumberInput.d.ts.map +1 -0
  772. package/lib/types/core/components/Overlay.d.ts +25 -0
  773. package/lib/types/core/components/Overlay.d.ts.map +1 -0
  774. package/lib/types/core/components/Panel.d.ts +11 -0
  775. package/lib/types/core/components/Panel.d.ts.map +1 -0
  776. package/lib/types/core/components/Portal.d.ts +6 -0
  777. package/lib/types/core/components/Portal.d.ts.map +1 -0
  778. package/lib/types/core/components/RadioGroup.d.ts +26 -0
  779. package/lib/types/core/components/RadioGroup.d.ts.map +1 -0
  780. package/lib/types/core/components/SelectBox.d.ts +36 -0
  781. package/lib/types/core/components/SelectBox.d.ts.map +1 -0
  782. package/lib/types/core/components/SelectList.d.ts +19 -0
  783. package/lib/types/core/components/SelectList.d.ts.map +1 -0
  784. package/lib/types/core/components/SelectStack.d.ts +13 -0
  785. package/lib/types/core/components/SelectStack.d.ts.map +1 -0
  786. package/lib/types/core/components/SidePanel.d.ts +11 -0
  787. package/lib/types/core/components/SidePanel.d.ts.map +1 -0
  788. package/lib/types/core/components/Spinner.d.ts +7 -0
  789. package/lib/types/core/components/Spinner.d.ts.map +1 -0
  790. package/lib/types/core/components/Switch.d.ts +11 -0
  791. package/lib/types/core/components/Switch.d.ts.map +1 -0
  792. package/lib/types/core/components/TagsInput.d.ts +16 -0
  793. package/lib/types/core/components/TagsInput.d.ts.map +1 -0
  794. package/lib/types/core/components/index.d.ts +40 -0
  795. package/lib/types/core/components/index.d.ts.map +1 -0
  796. package/lib/types/core/components/libs/utils.d.ts +3 -0
  797. package/lib/types/core/components/libs/utils.d.ts.map +1 -0
  798. package/lib/types/core/components/libs/visuallyHidden.d.ts +7 -0
  799. package/lib/types/core/components/libs/visuallyHidden.d.ts.map +1 -0
  800. package/lib/types/core/components/popup/Popup.d.ts +26 -0
  801. package/lib/types/core/components/popup/Popup.d.ts.map +1 -0
  802. package/lib/types/core/components/popup/PopupController.d.ts +41 -0
  803. package/lib/types/core/components/popup/PopupController.d.ts.map +1 -0
  804. package/lib/types/core/components/popup/index.d.ts +4 -0
  805. package/lib/types/core/components/popup/index.d.ts.map +1 -0
  806. package/lib/types/core/components/popup/position.d.ts +59 -0
  807. package/lib/types/core/components/popup/position.d.ts.map +1 -0
  808. package/lib/types/core/components/popup/utils.d.ts +30 -0
  809. package/lib/types/core/components/popup/utils.d.ts.map +1 -0
  810. package/lib/types/core/components/shadcn/breadcrumb.d.ts +15 -0
  811. package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -0
  812. package/lib/types/core/components/shadcn/button.d.ts +27 -0
  813. package/lib/types/core/components/shadcn/button.d.ts.map +1 -0
  814. package/lib/types/core/components/shadcn/calendar.d.ts +11 -0
  815. package/lib/types/core/components/shadcn/calendar.d.ts.map +1 -0
  816. package/lib/types/core/components/shadcn/card.d.ts +9 -0
  817. package/lib/types/core/components/shadcn/card.d.ts.map +1 -0
  818. package/lib/types/core/components/shadcn/checkbox.d.ts +5 -0
  819. package/lib/types/core/components/shadcn/checkbox.d.ts.map +1 -0
  820. package/lib/types/core/components/shadcn/command.d.ts +17 -0
  821. package/lib/types/core/components/shadcn/command.d.ts.map +1 -0
  822. package/lib/types/core/components/shadcn/dialog.d.ts +38 -0
  823. package/lib/types/core/components/shadcn/dialog.d.ts.map +1 -0
  824. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +9 -0
  825. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts.map +1 -0
  826. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts +7 -0
  827. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts.map +1 -0
  828. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts +6 -0
  829. package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts.map +1 -0
  830. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +9 -0
  831. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -0
  832. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts +6 -0
  833. package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts.map +1 -0
  834. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts +6 -0
  835. package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts.map +1 -0
  836. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts +5 -0
  837. package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts.map +1 -0
  838. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts +12 -0
  839. package/lib/types/core/components/shadcn/filters/filter/SelectFilter.d.ts.map +1 -0
  840. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts +11 -0
  841. package/lib/types/core/components/shadcn/filters/filter/StringListFilter.d.ts.map +1 -0
  842. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts +13 -0
  843. package/lib/types/core/components/shadcn/filters/filter/TextFilter.d.ts.map +1 -0
  844. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts +14 -0
  845. package/lib/types/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -0
  846. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts +2 -0
  847. package/lib/types/core/components/shadcn/filters/filter-styles.d.ts.map +1 -0
  848. package/lib/types/core/components/shadcn/filters/filterBar.d.ts +20 -0
  849. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -0
  850. package/lib/types/core/components/shadcn/filters/filters.d.ts +10 -0
  851. package/lib/types/core/components/shadcn/filters/filters.d.ts.map +1 -0
  852. package/lib/types/core/components/shadcn/filters/index.d.ts +6 -0
  853. package/lib/types/core/components/shadcn/filters/index.d.ts.map +1 -0
  854. package/lib/types/core/components/shadcn/filters/types.d.ts +35 -0
  855. package/lib/types/core/components/shadcn/filters/types.d.ts.map +1 -0
  856. package/lib/types/core/components/shadcn/heading.d.ts +6 -0
  857. package/lib/types/core/components/shadcn/heading.d.ts.map +1 -0
  858. package/lib/types/core/components/shadcn/index.d.ts +23 -0
  859. package/lib/types/core/components/shadcn/index.d.ts.map +1 -0
  860. package/lib/types/core/components/shadcn/input.d.ts +17 -0
  861. package/lib/types/core/components/shadcn/input.d.ts.map +1 -0
  862. package/lib/types/core/components/shadcn/label.d.ts +10 -0
  863. package/lib/types/core/components/shadcn/label.d.ts.map +1 -0
  864. package/lib/types/core/components/shadcn/popover.d.ts +24 -0
  865. package/lib/types/core/components/shadcn/popover.d.ts.map +1 -0
  866. package/lib/types/core/components/shadcn/resizeable.d.ts +9 -0
  867. package/lib/types/core/components/shadcn/resizeable.d.ts.map +1 -0
  868. package/lib/types/core/components/shadcn/selectBox.d.ts +36 -0
  869. package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -0
  870. package/lib/types/core/components/shadcn/separator.d.ts +6 -0
  871. package/lib/types/core/components/shadcn/separator.d.ts.map +1 -0
  872. package/lib/types/core/components/shadcn/tabs.d.ts +36 -0
  873. package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -0
  874. package/lib/types/core/components/shadcn/text.d.ts +11 -0
  875. package/lib/types/core/components/shadcn/text.d.ts.map +1 -0
  876. package/lib/types/core/components/shadcn/textarea.d.ts +4 -0
  877. package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -0
  878. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts +15 -0
  879. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts.map +1 -0
  880. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +10 -0
  881. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts.map +1 -0
  882. package/lib/types/core/components/shadcn/tooltip.d.ts +21 -0
  883. package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -0
  884. package/lib/types/core/components/styles.d.ts +7 -0
  885. package/lib/types/core/components/styles.d.ts.map +1 -0
  886. package/lib/types/core/components/table/index.d.ts +19 -0
  887. package/lib/types/core/components/table/index.d.ts.map +1 -0
  888. package/lib/types/core/components/tabs/Tabs.d.ts +25 -0
  889. package/lib/types/core/components/tabs/Tabs.d.ts.map +1 -0
  890. package/lib/types/core/components/tabs/TabsContext.d.ts +17 -0
  891. package/lib/types/core/components/tabs/TabsContext.d.ts.map +1 -0
  892. package/lib/types/core/components/tabs/index.d.ts +3 -0
  893. package/lib/types/core/components/tabs/index.d.ts.map +1 -0
  894. package/lib/types/core/components/toast/NotificationPanel.d.ts +8 -0
  895. package/lib/types/core/components/toast/NotificationPanel.d.ts.map +1 -0
  896. package/lib/types/core/components/toast/ToastContext.d.ts +6 -0
  897. package/lib/types/core/components/toast/ToastContext.d.ts.map +1 -0
  898. package/lib/types/core/components/toast/ToastProps.d.ts +7 -0
  899. package/lib/types/core/components/toast/ToastProps.d.ts.map +1 -0
  900. package/lib/types/core/components/toast/ToastProvider.d.ts +6 -0
  901. package/lib/types/core/components/toast/ToastProvider.d.ts.map +1 -0
  902. package/lib/types/core/components/toast/index.d.ts +3 -0
  903. package/lib/types/core/components/toast/index.d.ts.map +1 -0
  904. package/lib/types/core/hooks/CompositeState.d.ts +137 -0
  905. package/lib/types/core/hooks/CompositeState.d.ts.map +1 -0
  906. package/lib/types/core/hooks/PortalContainerProvider.d.ts +7 -0
  907. package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +1 -0
  908. package/lib/types/core/hooks/SharedState.d.ts +10 -0
  909. package/lib/types/core/hooks/SharedState.d.ts.map +1 -0
  910. package/lib/types/core/hooks/index.d.ts +16 -0
  911. package/lib/types/core/hooks/index.d.ts.map +1 -0
  912. package/lib/types/core/hooks/useClickOutside.d.ts +8 -0
  913. package/lib/types/core/hooks/useClickOutside.d.ts.map +1 -0
  914. package/lib/types/core/hooks/useCopyToClipboard.d.ts +5 -0
  915. package/lib/types/core/hooks/useCopyToClipboard.d.ts.map +1 -0
  916. package/lib/types/core/hooks/useDarkMode.d.ts +2 -0
  917. package/lib/types/core/hooks/useDarkMode.d.ts.map +1 -0
  918. package/lib/types/core/hooks/useDebounce.d.ts +2 -0
  919. package/lib/types/core/hooks/useDebounce.d.ts.map +1 -0
  920. package/lib/types/core/hooks/useEventSource.d.ts +2 -0
  921. package/lib/types/core/hooks/useEventSource.d.ts.map +1 -0
  922. package/lib/types/core/hooks/useFetch.d.ts +24 -0
  923. package/lib/types/core/hooks/useFetch.d.ts.map +1 -0
  924. package/lib/types/core/hooks/useFlag.d.ts +9 -0
  925. package/lib/types/core/hooks/useFlag.d.ts.map +1 -0
  926. package/lib/types/core/hooks/useIntersectionObserver.d.ts +14 -0
  927. package/lib/types/core/hooks/useIntersectionObserver.d.ts.map +1 -0
  928. package/lib/types/core/hooks/useIsFistRendering.d.ts +2 -0
  929. package/lib/types/core/hooks/useIsFistRendering.d.ts.map +1 -0
  930. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts +4 -0
  931. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts.map +1 -0
  932. package/lib/types/core/hooks/useScrollableSearch.d.ts +82 -0
  933. package/lib/types/core/hooks/useScrollableSearch.d.ts.map +1 -0
  934. package/lib/types/core/hooks/useSharedValue.d.ts +12 -0
  935. package/lib/types/core/hooks/useSharedValue.d.ts.map +1 -0
  936. package/lib/types/core/index.d.ts +4 -0
  937. package/lib/types/core/index.d.ts.map +1 -0
  938. package/lib/types/core/utils/cn.d.ts +3 -0
  939. package/lib/types/core/utils/cn.d.ts.map +1 -0
  940. package/lib/types/core/utils/index.d.ts +2 -0
  941. package/lib/types/core/utils/index.d.ts.map +1 -0
  942. package/lib/types/env/index.d.ts +76 -0
  943. package/lib/types/env/index.d.ts.map +1 -0
  944. package/lib/types/features/activity-doc/ActivityDoc.d.ts +14 -0
  945. package/lib/types/features/activity-doc/ActivityDoc.d.ts.map +1 -0
  946. package/lib/types/features/activity-doc/index.d.ts +2 -0
  947. package/lib/types/features/activity-doc/index.d.ts.map +1 -0
  948. package/lib/types/features/agent/PayloadBuilder.d.ts +68 -0
  949. package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -0
  950. package/lib/types/features/agent/chat/AgentChart.d.ts +75 -0
  951. package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -0
  952. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +38 -0
  953. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts.map +1 -0
  954. package/lib/types/features/agent/chat/AskUserWidget.d.ts +84 -0
  955. package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -0
  956. package/lib/types/features/agent/chat/ImageLightbox.d.ts +18 -0
  957. package/lib/types/features/agent/chat/ImageLightbox.d.ts.map +1 -0
  958. package/lib/types/features/agent/chat/JumpingDots.d.ts +7 -0
  959. package/lib/types/features/agent/chat/JumpingDots.d.ts.map +1 -0
  960. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +56 -0
  961. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -0
  962. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +29 -0
  963. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -0
  964. package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts +10 -0
  965. package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -0
  966. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +25 -0
  967. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -0
  968. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +11 -0
  969. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts.map +1 -0
  970. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +18 -0
  971. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -0
  972. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +61 -0
  973. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -0
  974. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +30 -0
  975. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -0
  976. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +15 -0
  977. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts.map +1 -0
  978. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +9 -0
  979. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -0
  980. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +11 -0
  981. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts.map +1 -0
  982. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +8 -0
  983. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts.map +1 -0
  984. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +10 -0
  985. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -0
  986. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +8 -0
  987. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts.map +1 -0
  988. package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +26 -0
  989. package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -0
  990. package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +12 -0
  991. package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -0
  992. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +22 -0
  993. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -0
  994. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +107 -0
  995. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -0
  996. package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts +11 -0
  997. package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts.map +1 -0
  998. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +18 -0
  999. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -0
  1000. package/lib/types/features/agent/chat/VegaLiteChart.d.ts +18 -0
  1001. package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -0
  1002. package/lib/types/features/agent/chat/WaitingMessages.d.ts +2 -0
  1003. package/lib/types/features/agent/chat/WaitingMessages.d.ts.map +1 -0
  1004. package/lib/types/features/agent/chat/index.d.ts +17 -0
  1005. package/lib/types/features/agent/chat/index.d.ts.map +1 -0
  1006. package/lib/types/features/agent/chat/useArtifactUrlCache.d.ts +28 -0
  1007. package/lib/types/features/agent/chat/useArtifactUrlCache.d.ts.map +1 -0
  1008. package/lib/types/features/agent/createChartTool.d.ts +178 -0
  1009. package/lib/types/features/agent/createChartTool.d.ts.map +1 -0
  1010. package/lib/types/features/agent/examples.d.ts +59 -0
  1011. package/lib/types/features/agent/examples.d.ts.map +1 -0
  1012. package/lib/types/features/agent/index.d.ts +5 -0
  1013. package/lib/types/features/agent/index.d.ts.map +1 -0
  1014. package/lib/types/features/agent/visualization.d.ts +95 -0
  1015. package/lib/types/features/agent/visualization.d.ts.map +1 -0
  1016. package/lib/types/features/errors/PanelErrorBoundary.d.ts +5 -0
  1017. package/lib/types/features/errors/PanelErrorBoundary.d.ts.map +1 -0
  1018. package/lib/types/features/errors/RowErrorBoundary.d.ts +8 -0
  1019. package/lib/types/features/errors/RowErrorBoundary.d.ts.map +1 -0
  1020. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +12 -0
  1021. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts.map +1 -0
  1022. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +5 -0
  1023. package/lib/types/features/errors/WidgetErrorBoundary.d.ts.map +1 -0
  1024. package/lib/types/features/errors/index.d.ts +5 -0
  1025. package/lib/types/features/errors/index.d.ts.map +1 -0
  1026. package/lib/types/features/facets/CollectionsFacetsNav.d.ts +14 -0
  1027. package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -0
  1028. package/lib/types/features/facets/DocumentsFacetsNav.d.ts +17 -0
  1029. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -0
  1030. package/lib/types/features/facets/EnvironmentFacet.d.ts +10 -0
  1031. package/lib/types/features/facets/EnvironmentFacet.d.ts.map +1 -0
  1032. package/lib/types/features/facets/InteractionsFacetsNav.d.ts +14 -0
  1033. package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -0
  1034. package/lib/types/features/facets/PromptsFacetsNav.d.ts +15 -0
  1035. package/lib/types/features/facets/PromptsFacetsNav.d.ts.map +1 -0
  1036. package/lib/types/features/facets/RunsFacetsNav.d.ts +20 -0
  1037. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -0
  1038. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +14 -0
  1039. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -0
  1040. package/lib/types/features/facets/index.d.ts +15 -0
  1041. package/lib/types/features/facets/index.d.ts.map +1 -0
  1042. package/lib/types/features/facets/utils/SearchInterface.d.ts +14 -0
  1043. package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -0
  1044. package/lib/types/features/facets/utils/StringFacet.d.ts +11 -0
  1045. package/lib/types/features/facets/utils/StringFacet.d.ts.map +1 -0
  1046. package/lib/types/features/facets/utils/StringListFacet.d.ts +11 -0
  1047. package/lib/types/features/facets/utils/StringListFacet.d.ts.map +1 -0
  1048. package/lib/types/features/facets/utils/TypeFacet.d.ts +16 -0
  1049. package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -0
  1050. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts +12 -0
  1051. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts.map +1 -0
  1052. package/lib/types/features/facets/utils/VInteractionFacet.d.ts +15 -0
  1053. package/lib/types/features/facets/utils/VInteractionFacet.d.ts.map +1 -0
  1054. package/lib/types/features/facets/utils/VStringFacet.d.ts +21 -0
  1055. package/lib/types/features/facets/utils/VStringFacet.d.ts.map +1 -0
  1056. package/lib/types/features/facets/utils/VTypeFacet.d.ts +12 -0
  1057. package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -0
  1058. package/lib/types/features/facets/utils/VUserFacet.d.ts +11 -0
  1059. package/lib/types/features/facets/utils/VUserFacet.d.ts.map +1 -0
  1060. package/lib/types/features/facets/utils/utils.d.ts +4 -0
  1061. package/lib/types/features/facets/utils/utils.d.ts.map +1 -0
  1062. package/lib/types/features/index.d.ts +12 -0
  1063. package/lib/types/features/index.d.ts.map +1 -0
  1064. package/lib/types/features/layout/GenericPageNavHeader.d.ts +14 -0
  1065. package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -0
  1066. package/lib/types/features/layout/NotFoundView.d.ts +5 -0
  1067. package/lib/types/features/layout/NotFoundView.d.ts.map +1 -0
  1068. package/lib/types/features/layout/index.d.ts +3 -0
  1069. package/lib/types/features/layout/index.d.ts.map +1 -0
  1070. package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts +13 -0
  1071. package/lib/types/features/magic-pdf/AnnotatedImageSlider.d.ts.map +1 -0
  1072. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +7 -0
  1073. package/lib/types/features/magic-pdf/DownloadPopover.d.ts.map +1 -0
  1074. package/lib/types/features/magic-pdf/ExtractedContentView.d.ts +8 -0
  1075. package/lib/types/features/magic-pdf/ExtractedContentView.d.ts.map +1 -0
  1076. package/lib/types/features/magic-pdf/MagicPdfProvider.d.ts +58 -0
  1077. package/lib/types/features/magic-pdf/MagicPdfProvider.d.ts.map +1 -0
  1078. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +7 -0
  1079. package/lib/types/features/magic-pdf/MagicPdfView.d.ts.map +1 -0
  1080. package/lib/types/features/magic-pdf/index.d.ts +2 -0
  1081. package/lib/types/features/magic-pdf/index.d.ts.map +1 -0
  1082. package/lib/types/features/magic-pdf/types.d.ts +2 -0
  1083. package/lib/types/features/magic-pdf/types.d.ts.map +1 -0
  1084. package/lib/types/features/pdf-viewer/PdfPageRenderer.d.ts +83 -0
  1085. package/lib/types/features/pdf-viewer/PdfPageRenderer.d.ts.map +1 -0
  1086. package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts +29 -0
  1087. package/lib/types/features/pdf-viewer/PdfPageSlider.d.ts.map +1 -0
  1088. package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts +19 -0
  1089. package/lib/types/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -0
  1090. package/lib/types/features/pdf-viewer/index.d.ts +4 -0
  1091. package/lib/types/features/pdf-viewer/index.d.ts.map +1 -0
  1092. package/lib/types/features/permissions/SecureButton.d.ts +8 -0
  1093. package/lib/types/features/permissions/SecureButton.d.ts.map +1 -0
  1094. package/lib/types/features/permissions/SecureSidebarItem.d.ts +8 -0
  1095. package/lib/types/features/permissions/SecureSidebarItem.d.ts.map +1 -0
  1096. package/lib/types/features/permissions/UserPermissionsProvider.d.ts +21 -0
  1097. package/lib/types/features/permissions/UserPermissionsProvider.d.ts.map +1 -0
  1098. package/lib/types/features/permissions/helpers.d.ts +5 -0
  1099. package/lib/types/features/permissions/helpers.d.ts.map +1 -0
  1100. package/lib/types/features/permissions/index.d.ts +5 -0
  1101. package/lib/types/features/permissions/index.d.ts.map +1 -0
  1102. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +7 -0
  1103. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -0
  1104. package/lib/types/features/store/collections/CollectionsTable.d.ts +6 -0
  1105. package/lib/types/features/store/collections/CollectionsTable.d.ts.map +1 -0
  1106. package/lib/types/features/store/collections/CreateCollection.d.ts +13 -0
  1107. package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -0
  1108. package/lib/types/features/store/collections/EditCollectionView.d.ts +8 -0
  1109. package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -0
  1110. package/lib/types/features/store/collections/SelectCollection.d.ts +20 -0
  1111. package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -0
  1112. package/lib/types/features/store/collections/SharedPropsEditor.d.ts +7 -0
  1113. package/lib/types/features/store/collections/SharedPropsEditor.d.ts.map +1 -0
  1114. package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts +7 -0
  1115. package/lib/types/features/store/collections/SyncMemberHeadsToggle.d.ts.map +1 -0
  1116. package/lib/types/features/store/collections/index.d.ts +8 -0
  1117. package/lib/types/features/store/collections/index.d.ts.map +1 -0
  1118. package/lib/types/features/store/index.d.ts +4 -0
  1119. package/lib/types/features/store/index.d.ts.map +1 -0
  1120. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +8 -0
  1121. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -0
  1122. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +20 -0
  1123. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -0
  1124. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +33 -0
  1125. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts.map +1 -0
  1126. package/lib/types/features/store/objects/DocumentTable.d.ts +25 -0
  1127. package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -0
  1128. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +12 -0
  1129. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -0
  1130. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +9 -0
  1131. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -0
  1132. package/lib/types/features/store/objects/components/ContentOverview.d.ts +9 -0
  1133. package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -0
  1134. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +18 -0
  1135. package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -0
  1136. package/lib/types/features/store/objects/components/DocumentInput.d.ts +8 -0
  1137. package/lib/types/features/store/objects/components/DocumentInput.d.ts.map +1 -0
  1138. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +9 -0
  1139. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -0
  1140. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +9 -0
  1141. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -0
  1142. package/lib/types/features/store/objects/components/SelectDocument.d.ts +9 -0
  1143. package/lib/types/features/store/objects/components/SelectDocument.d.ts.map +1 -0
  1144. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +9 -0
  1145. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts.map +1 -0
  1146. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +12 -0
  1147. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts.map +1 -0
  1148. package/lib/types/features/store/objects/components/index.d.ts +10 -0
  1149. package/lib/types/features/store/objects/components/index.d.ts.map +1 -0
  1150. package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts +30 -0
  1151. package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -0
  1152. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +4 -0
  1153. package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -0
  1154. package/lib/types/features/store/objects/index.d.ts +11 -0
  1155. package/lib/types/features/store/objects/index.d.ts.map +1 -0
  1156. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +18 -0
  1157. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -0
  1158. package/lib/types/features/store/objects/layout/documentLayout.d.ts +20 -0
  1159. package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -0
  1160. package/lib/types/features/store/objects/layout/index.d.ts +3 -0
  1161. package/lib/types/features/store/objects/layout/index.d.ts.map +1 -0
  1162. package/lib/types/features/store/objects/layout/renderers.d.ts +3 -0
  1163. package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -0
  1164. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +52 -0
  1165. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -0
  1166. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +14 -0
  1167. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts.map +1 -0
  1168. package/lib/types/features/store/objects/search/index.d.ts +3 -0
  1169. package/lib/types/features/store/objects/search/index.d.ts.map +1 -0
  1170. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +26 -0
  1171. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -0
  1172. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +28 -0
  1173. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -0
  1174. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +6 -0
  1175. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -0
  1176. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +4 -0
  1177. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts.map +1 -0
  1178. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +4 -0
  1179. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -0
  1180. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +16 -0
  1181. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts.map +1 -0
  1182. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +5 -0
  1183. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -0
  1184. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +4 -0
  1185. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -0
  1186. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +4 -0
  1187. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts.map +1 -0
  1188. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +4 -0
  1189. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +1 -0
  1190. package/lib/types/features/store/objects/selection/actions/index.d.ts +8 -0
  1191. package/lib/types/features/store/objects/selection/actions/index.d.ts.map +1 -0
  1192. package/lib/types/features/store/objects/selection/index.d.ts +5 -0
  1193. package/lib/types/features/store/objects/selection/index.d.ts.map +1 -0
  1194. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +39 -0
  1195. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -0
  1196. package/lib/types/features/store/objects/upload/index.d.ts +4 -0
  1197. package/lib/types/features/store/objects/upload/index.d.ts.map +1 -0
  1198. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +30 -0
  1199. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -0
  1200. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +50 -0
  1201. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts.map +1 -0
  1202. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +6 -0
  1203. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -0
  1204. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +8 -0
  1205. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts.map +1 -0
  1206. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +15 -0
  1207. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts.map +1 -0
  1208. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +8 -0
  1209. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -0
  1210. package/lib/types/features/store/types/SelectContentType.d.ts +11 -0
  1211. package/lib/types/features/store/types/SelectContentType.d.ts.map +1 -0
  1212. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +33 -0
  1213. package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -0
  1214. package/lib/types/features/store/types/TableLayoutEditor.d.ts +9 -0
  1215. package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -0
  1216. package/lib/types/features/store/types/index.d.ts +9 -0
  1217. package/lib/types/features/store/types/index.d.ts.map +1 -0
  1218. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +36 -0
  1219. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -0
  1220. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +11 -0
  1221. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts.map +1 -0
  1222. package/lib/types/features/store/types/search/index.d.ts +3 -0
  1223. package/lib/types/features/store/types/search/index.d.ts.map +1 -0
  1224. package/lib/types/features/user/UserAvatar.d.ts +9 -0
  1225. package/lib/types/features/user/UserAvatar.d.ts.map +1 -0
  1226. package/lib/types/features/user/UserInfo.d.ts +48 -0
  1227. package/lib/types/features/user/UserInfo.d.ts.map +1 -0
  1228. package/lib/types/features/user/index.d.ts +3 -0
  1229. package/lib/types/features/user/index.d.ts.map +1 -0
  1230. package/lib/types/features/utils/index.d.ts +6 -0
  1231. package/lib/types/features/utils/index.d.ts.map +1 -0
  1232. package/lib/types/features/utils/mimeType.d.ts +6 -0
  1233. package/lib/types/features/utils/mimeType.d.ts.map +1 -0
  1234. package/lib/types/features/utils/print.d.ts +10 -0
  1235. package/lib/types/features/utils/print.d.ts.map +1 -0
  1236. package/lib/types/features/utils/rendition.d.ts +4 -0
  1237. package/lib/types/features/utils/rendition.d.ts.map +1 -0
  1238. package/lib/types/features/utils/text.d.ts +3 -0
  1239. package/lib/types/features/utils/text.d.ts.map +1 -0
  1240. package/lib/types/features/utils/workflowStatus.d.ts +10 -0
  1241. package/lib/types/features/utils/workflowStatus.d.ts.map +1 -0
  1242. package/lib/types/layout/AppLayout.d.ts +13 -0
  1243. package/lib/types/layout/AppLayout.d.ts.map +1 -0
  1244. package/lib/types/layout/FullHeightLayout.d.ts +27 -0
  1245. package/lib/types/layout/FullHeightLayout.d.ts.map +1 -0
  1246. package/lib/types/layout/Navbar.d.ts +33 -0
  1247. package/lib/types/layout/Navbar.d.ts.map +1 -0
  1248. package/lib/types/layout/Sidebar.d.ts +31 -0
  1249. package/lib/types/layout/Sidebar.d.ts.map +1 -0
  1250. package/lib/types/layout/SidebarContext.d.ts +9 -0
  1251. package/lib/types/layout/SidebarContext.d.ts.map +1 -0
  1252. package/lib/types/layout/TitleBar.d.ts +6 -0
  1253. package/lib/types/layout/TitleBar.d.ts.map +1 -0
  1254. package/lib/types/layout/index.d.ts +7 -0
  1255. package/lib/types/layout/index.d.ts.map +1 -0
  1256. package/lib/types/router/FixLinks.d.ts +7 -0
  1257. package/lib/types/router/FixLinks.d.ts.map +1 -0
  1258. package/lib/types/router/HistoryNavigator.d.ts +59 -0
  1259. package/lib/types/router/HistoryNavigator.d.ts.map +1 -0
  1260. package/lib/types/router/Nav.d.ts +30 -0
  1261. package/lib/types/router/Nav.d.ts.map +1 -0
  1262. package/lib/types/router/NestedNavigationContext.d.ts +9 -0
  1263. package/lib/types/router/NestedNavigationContext.d.ts.map +1 -0
  1264. package/lib/types/router/NestedRouterProvider.d.ts +14 -0
  1265. package/lib/types/router/NestedRouterProvider.d.ts.map +1 -0
  1266. package/lib/types/router/PathMatcher.d.ts +36 -0
  1267. package/lib/types/router/PathMatcher.d.ts.map +1 -0
  1268. package/lib/types/router/PathWithParams.d.ts +9 -0
  1269. package/lib/types/router/PathWithParams.d.ts.map +1 -0
  1270. package/lib/types/router/Route404.d.ts +4 -0
  1271. package/lib/types/router/Route404.d.ts.map +1 -0
  1272. package/lib/types/router/RouteComponent.d.ts +6 -0
  1273. package/lib/types/router/RouteComponent.d.ts.map +1 -0
  1274. package/lib/types/router/Router.d.ts +74 -0
  1275. package/lib/types/router/Router.d.ts.map +1 -0
  1276. package/lib/types/router/RouterProvider.d.ts +15 -0
  1277. package/lib/types/router/RouterProvider.d.ts.map +1 -0
  1278. package/lib/types/router/index.d.ts +11 -0
  1279. package/lib/types/router/index.d.ts.map +1 -0
  1280. package/lib/types/router/path.d.ts +8 -0
  1281. package/lib/types/router/path.d.ts.map +1 -0
  1282. package/lib/types/session/TypeRegistry.d.ts +10 -0
  1283. package/lib/types/session/TypeRegistry.d.ts.map +1 -0
  1284. package/lib/types/session/UserSession.d.ts +40 -0
  1285. package/lib/types/session/UserSession.d.ts.map +1 -0
  1286. package/lib/types/session/UserSessionProvider.d.ts +7 -0
  1287. package/lib/types/session/UserSessionProvider.d.ts.map +1 -0
  1288. package/lib/types/session/auth/composable.d.ts +26 -0
  1289. package/lib/types/session/auth/composable.d.ts.map +1 -0
  1290. package/lib/types/session/auth/firebase.d.ts +10 -0
  1291. package/lib/types/session/auth/firebase.d.ts.map +1 -0
  1292. package/lib/types/session/auth/useAuthState.d.ts +10 -0
  1293. package/lib/types/session/auth/useAuthState.d.ts.map +1 -0
  1294. package/lib/types/session/auth/useCurrentTenant.d.ts +15 -0
  1295. package/lib/types/session/auth/useCurrentTenant.d.ts.map +1 -0
  1296. package/lib/types/session/constants.d.ts +3 -0
  1297. package/lib/types/session/constants.d.ts.map +1 -0
  1298. package/lib/types/session/index.d.ts +9 -0
  1299. package/lib/types/session/index.d.ts.map +1 -0
  1300. package/lib/types/session/useUXTracking.d.ts +6 -0
  1301. package/lib/types/session/useUXTracking.d.ts.map +1 -0
  1302. package/lib/types/shell/SplashScreen.d.ts +7 -0
  1303. package/lib/types/shell/SplashScreen.d.ts.map +1 -0
  1304. package/lib/types/shell/VertesiaShell.d.ts +10 -0
  1305. package/lib/types/shell/VertesiaShell.d.ts.map +1 -0
  1306. package/lib/types/shell/apps/AppInstallationProvider.d.ts +12 -0
  1307. package/lib/types/shell/apps/AppInstallationProvider.d.ts.map +1 -0
  1308. package/lib/types/shell/apps/AppProjectSelector.d.ts +12 -0
  1309. package/lib/types/shell/apps/AppProjectSelector.d.ts.map +1 -0
  1310. package/lib/types/shell/apps/StandaloneApp.d.ts +23 -0
  1311. package/lib/types/shell/apps/StandaloneApp.d.ts.map +1 -0
  1312. package/lib/types/shell/apps/index.d.ts +4 -0
  1313. package/lib/types/shell/apps/index.d.ts.map +1 -0
  1314. package/lib/types/shell/index.d.ts +8 -0
  1315. package/lib/types/shell/index.d.ts.map +1 -0
  1316. package/lib/types/shell/login/EnterpriseSigninButton.d.ts +6 -0
  1317. package/lib/types/shell/login/EnterpriseSigninButton.d.ts.map +1 -0
  1318. package/lib/types/shell/login/GitHubSignInButton.d.ts +6 -0
  1319. package/lib/types/shell/login/GitHubSignInButton.d.ts.map +1 -0
  1320. package/lib/types/shell/login/GoogleSignInButton.d.ts +6 -0
  1321. package/lib/types/shell/login/GoogleSignInButton.d.ts.map +1 -0
  1322. package/lib/types/shell/login/InviteAcceptModal.d.ts +2 -0
  1323. package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -0
  1324. package/lib/types/shell/login/MicrosoftSigninButton.d.ts +6 -0
  1325. package/lib/types/shell/login/MicrosoftSigninButton.d.ts.map +1 -0
  1326. package/lib/types/shell/login/PreviewIcon.d.ts +6 -0
  1327. package/lib/types/shell/login/PreviewIcon.d.ts.map +1 -0
  1328. package/lib/types/shell/login/SignInModal.d.ts +7 -0
  1329. package/lib/types/shell/login/SignInModal.d.ts.map +1 -0
  1330. package/lib/types/shell/login/SigninScreen.d.ts +9 -0
  1331. package/lib/types/shell/login/SigninScreen.d.ts.map +1 -0
  1332. package/lib/types/shell/login/SignupForm.d.ts +8 -0
  1333. package/lib/types/shell/login/SignupForm.d.ts.map +1 -0
  1334. package/lib/types/shell/login/TerminalLogin.d.ts +2 -0
  1335. package/lib/types/shell/login/TerminalLogin.d.ts.map +1 -0
  1336. package/lib/types/shell/login/UserInfo.d.ts +6 -0
  1337. package/lib/types/shell/login/UserInfo.d.ts.map +1 -0
  1338. package/lib/types/shell/login/UserSessionMenu.d.ts +9 -0
  1339. package/lib/types/shell/login/UserSessionMenu.d.ts.map +1 -0
  1340. package/lib/types/shell/utils.d.ts +2 -0
  1341. package/lib/types/shell/utils.d.ts.map +1 -0
  1342. package/lib/types/widgets/Progress.d.ts +6 -0
  1343. package/lib/types/widgets/Progress.d.ts.map +1 -0
  1344. package/lib/types/widgets/SvgIcon.d.ts +7 -0
  1345. package/lib/types/widgets/SvgIcon.d.ts.map +1 -0
  1346. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts +24 -0
  1347. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts.map +1 -0
  1348. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts +15 -0
  1349. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts.map +1 -0
  1350. package/lib/types/widgets/codemirror/MonacoEditor.d.ts +38 -0
  1351. package/lib/types/widgets/codemirror/MonacoEditor.d.ts.map +1 -0
  1352. package/lib/types/widgets/codemirror/index.d.ts +5 -0
  1353. package/lib/types/widgets/codemirror/index.d.ts.map +1 -0
  1354. package/lib/types/widgets/form/Form.d.ts +22 -0
  1355. package/lib/types/widgets/form/Form.d.ts.map +1 -0
  1356. package/lib/types/widgets/form/FormContext.d.ts +20 -0
  1357. package/lib/types/widgets/form/FormContext.d.ts.map +1 -0
  1358. package/lib/types/widgets/form/ManagedObject.d.ts +82 -0
  1359. package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -0
  1360. package/lib/types/widgets/form/fields.d.ts +16 -0
  1361. package/lib/types/widgets/form/fields.d.ts.map +1 -0
  1362. package/lib/types/widgets/form/index.d.ts +7 -0
  1363. package/lib/types/widgets/form/index.d.ts.map +1 -0
  1364. package/lib/types/widgets/form/inputs.d.ts +8 -0
  1365. package/lib/types/widgets/form/inputs.d.ts.map +1 -0
  1366. package/lib/types/widgets/form/schema.d.ts +47 -0
  1367. package/lib/types/widgets/form/schema.d.ts.map +1 -0
  1368. package/lib/types/widgets/index.d.ts +12 -0
  1369. package/lib/types/widgets/index.d.ts.map +1 -0
  1370. package/lib/types/widgets/json-view/JSONCode.d.ts +22 -0
  1371. package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -0
  1372. package/lib/types/widgets/json-view/JSONDisplay.d.ts +8 -0
  1373. package/lib/types/widgets/json-view/JSONDisplay.d.ts.map +1 -0
  1374. package/lib/types/widgets/json-view/JSONView.d.ts +7 -0
  1375. package/lib/types/widgets/json-view/JSONView.d.ts.map +1 -0
  1376. package/lib/types/widgets/json-view/index.d.ts +5 -0
  1377. package/lib/types/widgets/json-view/index.d.ts.map +1 -0
  1378. package/lib/types/widgets/json-view/types.d.ts +8 -0
  1379. package/lib/types/widgets/json-view/types.d.ts.map +1 -0
  1380. package/lib/types/widgets/markdown/CodeBlockRendering.d.ts +22 -0
  1381. package/lib/types/widgets/markdown/CodeBlockRendering.d.ts.map +1 -0
  1382. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts +26 -0
  1383. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -0
  1384. package/lib/types/widgets/markdown/MermaidDiagram.d.ts +23 -0
  1385. package/lib/types/widgets/markdown/MermaidDiagram.d.ts.map +1 -0
  1386. package/lib/types/widgets/markdown/index.d.ts +3 -0
  1387. package/lib/types/widgets/markdown/index.d.ts.map +1 -0
  1388. package/lib/types/widgets/popover/Popover.d.ts +38 -0
  1389. package/lib/types/widgets/popover/Popover.d.ts.map +1 -0
  1390. package/lib/types/widgets/popover/context.d.ts +8 -0
  1391. package/lib/types/widgets/popover/context.d.ts.map +1 -0
  1392. package/lib/types/widgets/popover/index.d.ts +3 -0
  1393. package/lib/types/widgets/popover/index.d.ts.map +1 -0
  1394. package/lib/types/widgets/popover/slots.d.ts +5 -0
  1395. package/lib/types/widgets/popover/slots.d.ts.map +1 -0
  1396. package/lib/types/widgets/properties/PropertiesView.d.ts +11 -0
  1397. package/lib/types/widgets/properties/PropertiesView.d.ts.map +1 -0
  1398. package/lib/types/widgets/properties/index.d.ts +2 -0
  1399. package/lib/types/widgets/properties/index.d.ts.map +1 -0
  1400. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +75 -0
  1401. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -0
  1402. package/lib/types/widgets/schema-editor/editor/Editable.d.ts +40 -0
  1403. package/lib/types/widgets/schema-editor/editor/Editable.d.ts.map +1 -0
  1404. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +8 -0
  1405. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +1 -0
  1406. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts +5 -0
  1407. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts.map +1 -0
  1408. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts +4 -0
  1409. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts.map +1 -0
  1410. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts +3 -0
  1411. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts.map +1 -0
  1412. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts +9 -0
  1413. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -0
  1414. package/lib/types/widgets/schema-editor/index.d.ts +7 -0
  1415. package/lib/types/widgets/schema-editor/index.d.ts.map +1 -0
  1416. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts +16 -0
  1417. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts.map +1 -0
  1418. package/lib/types/widgets/schema-editor/type-signature.d.ts +19 -0
  1419. package/lib/types/widgets/schema-editor/type-signature.d.ts.map +1 -0
  1420. package/lib/types/widgets/upload/DropZone.d.ts +41 -0
  1421. package/lib/types/widgets/upload/DropZone.d.ts.map +1 -0
  1422. package/lib/types/widgets/upload/UploadResultCategory.d.ts +26 -0
  1423. package/lib/types/widgets/upload/UploadResultCategory.d.ts.map +1 -0
  1424. package/lib/types/widgets/upload/UploadSummary.d.ts +38 -0
  1425. package/lib/types/widgets/upload/UploadSummary.d.ts.map +1 -0
  1426. package/lib/types/widgets/upload/index.d.ts +4 -0
  1427. package/lib/types/widgets/upload/index.d.ts.map +1 -0
  1428. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts +6 -0
  1429. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts.map +1 -0
  1430. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts +8 -0
  1431. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts.map +1 -0
  1432. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts +5 -0
  1433. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts.map +1 -0
  1434. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts +9 -0
  1435. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts.map +1 -0
  1436. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts +8 -0
  1437. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts.map +1 -0
  1438. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts +8 -0
  1439. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts.map +1 -0
  1440. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts +2 -0
  1441. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts.map +1 -0
  1442. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts +13 -0
  1443. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts.map +1 -0
  1444. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts +8 -0
  1445. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts.map +1 -0
  1446. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts +3 -0
  1447. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts.map +1 -0
  1448. package/lib/types/widgets/xml-viewer/components/types.d.ts +104 -0
  1449. package/lib/types/widgets/xml-viewer/components/types.d.ts.map +1 -0
  1450. package/lib/types/widgets/xml-viewer/constants/index.d.ts +27 -0
  1451. package/lib/types/widgets/xml-viewer/constants/index.d.ts.map +1 -0
  1452. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts +4 -0
  1453. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts.map +1 -0
  1454. package/lib/types/widgets/xml-viewer/helpers/index.d.ts +13 -0
  1455. package/lib/types/widgets/xml-viewer/helpers/index.d.ts.map +1 -0
  1456. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts +15 -0
  1457. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts.map +1 -0
  1458. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts +10 -0
  1459. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -0
  1460. package/lib/types/widgets/xml-viewer/index.d.ts +3 -0
  1461. package/lib/types/widgets/xml-viewer/index.d.ts.map +1 -0
  1462. package/lib/types/widgets/xml-viewer/types/index.d.ts +16 -0
  1463. package/lib/types/widgets/xml-viewer/types/index.d.ts.map +1 -0
  1464. package/lib/vertesia-ui-core.js +2 -0
  1465. package/lib/vertesia-ui-core.js.map +1 -0
  1466. package/lib/vertesia-ui-env.js +2 -0
  1467. package/lib/vertesia-ui-env.js.map +1 -0
  1468. package/lib/vertesia-ui-features.js +2 -0
  1469. package/lib/vertesia-ui-features.js.map +1 -0
  1470. package/lib/vertesia-ui-layout.js +2 -0
  1471. package/lib/vertesia-ui-layout.js.map +1 -0
  1472. package/lib/vertesia-ui-router.js +2 -0
  1473. package/lib/vertesia-ui-router.js.map +1 -0
  1474. package/lib/vertesia-ui-session.js +2 -0
  1475. package/lib/vertesia-ui-session.js.map +1 -0
  1476. package/lib/vertesia-ui-shell.js +2 -0
  1477. package/lib/vertesia-ui-shell.js.map +1 -0
  1478. package/lib/vertesia-ui-widgets.js +2 -0
  1479. package/lib/vertesia-ui-widgets.js.map +1 -0
  1480. package/llms.txt +494 -0
  1481. package/package.json +189 -0
  1482. package/src/core/components/Avatar.tsx +67 -0
  1483. package/src/core/components/Badge.tsx +118 -0
  1484. package/src/core/components/Button.tsx +63 -0
  1485. package/src/core/components/Center.tsx +12 -0
  1486. package/src/core/components/ComboBox.tsx +488 -0
  1487. package/src/core/components/ConfirmModal.tsx +51 -0
  1488. package/src/core/components/DeleteModal.tsx +45 -0
  1489. package/src/core/components/Divider.tsx +11 -0
  1490. package/src/core/components/Dropdown.tsx +63 -0
  1491. package/src/core/components/DropdownList.tsx +72 -0
  1492. package/src/core/components/EmptyCollection.tsx +41 -0
  1493. package/src/core/components/FileUpload.tsx +196 -0
  1494. package/src/core/components/FormItem.tsx +36 -0
  1495. package/src/core/components/InputList.tsx +112 -0
  1496. package/src/core/components/Link.tsx +16 -0
  1497. package/src/core/components/MenuList.tsx +41 -0
  1498. package/src/core/components/MessageBox.tsx +101 -0
  1499. package/src/core/components/Modal.tsx +144 -0
  1500. package/src/core/components/NumberInput.tsx +64 -0
  1501. package/src/core/components/Overlay.tsx +129 -0
  1502. package/src/core/components/Panel.tsx +34 -0
  1503. package/src/core/components/Portal.tsx +33 -0
  1504. package/src/core/components/RadioGroup.tsx +100 -0
  1505. package/src/core/components/SelectBox.tsx +188 -0
  1506. package/src/core/components/SelectList.tsx +95 -0
  1507. package/src/core/components/SelectStack.tsx +63 -0
  1508. package/src/core/components/SidePanel.tsx +114 -0
  1509. package/src/core/components/Spinner.tsx +33 -0
  1510. package/src/core/components/Switch.tsx +30 -0
  1511. package/src/core/components/TagsInput.tsx +388 -0
  1512. package/src/core/components/index.ts +41 -0
  1513. package/src/core/components/libs/utils.tsx +6 -0
  1514. package/src/core/components/libs/visuallyHidden.tsx +25 -0
  1515. package/src/core/components/popup/Popup.tsx +94 -0
  1516. package/src/core/components/popup/PopupController.ts +182 -0
  1517. package/src/core/components/popup/index.ts +3 -0
  1518. package/src/core/components/popup/position.ts +277 -0
  1519. package/src/core/components/popup/utils.ts +82 -0
  1520. package/src/core/components/shadcn/breadcrumb.tsx +193 -0
  1521. package/src/core/components/shadcn/button.tsx +156 -0
  1522. package/src/core/components/shadcn/calendar.tsx +29 -0
  1523. package/src/core/components/shadcn/card.tsx +76 -0
  1524. package/src/core/components/shadcn/checkbox.tsx +28 -0
  1525. package/src/core/components/shadcn/command.tsx +176 -0
  1526. package/src/core/components/shadcn/dialog.tsx +266 -0
  1527. package/src/core/components/shadcn/filters/DynamicLabel.tsx +44 -0
  1528. package/src/core/components/shadcn/filters/animateChangeInHeight.tsx +41 -0
  1529. package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +211 -0
  1530. package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +145 -0
  1531. package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +76 -0
  1532. package/src/core/components/shadcn/filters/comboBox/TextCombobox.tsx +81 -0
  1533. package/src/core/components/shadcn/filters/comboBox/comboBox.tsx +4 -0
  1534. package/src/core/components/shadcn/filters/filter/SelectFilter.tsx +161 -0
  1535. package/src/core/components/shadcn/filters/filter/StringListFilter.tsx +58 -0
  1536. package/src/core/components/shadcn/filters/filter/TextFilter.tsx +69 -0
  1537. package/src/core/components/shadcn/filters/filter/dateFilter.tsx +256 -0
  1538. package/src/core/components/shadcn/filters/filter-styles.ts +87 -0
  1539. package/src/core/components/shadcn/filters/filterBar.tsx +375 -0
  1540. package/src/core/components/shadcn/filters/filters.tsx +141 -0
  1541. package/src/core/components/shadcn/filters/index.ts +5 -0
  1542. package/src/core/components/shadcn/filters/types.ts +38 -0
  1543. package/src/core/components/shadcn/heading.tsx +23 -0
  1544. package/src/core/components/shadcn/index.ts +23 -0
  1545. package/src/core/components/shadcn/input.tsx +92 -0
  1546. package/src/core/components/shadcn/label.tsx +31 -0
  1547. package/src/core/components/shadcn/popover.tsx +115 -0
  1548. package/src/core/components/shadcn/resizeable.tsx +54 -0
  1549. package/src/core/components/shadcn/selectBox.tsx +337 -0
  1550. package/src/core/components/shadcn/separator.tsx +31 -0
  1551. package/src/core/components/shadcn/tabs.tsx +302 -0
  1552. package/src/core/components/shadcn/text.tsx +33 -0
  1553. package/src/core/components/shadcn/textarea.tsx +21 -0
  1554. package/src/core/components/shadcn/theme/ThemeProvider.tsx +75 -0
  1555. package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +35 -0
  1556. package/src/core/components/shadcn/tooltip.tsx +59 -0
  1557. package/src/core/components/styles.ts +11 -0
  1558. package/src/core/components/table/index.tsx +70 -0
  1559. package/src/core/components/tabs/Tabs.tsx +132 -0
  1560. package/src/core/components/tabs/TabsContext.ts +25 -0
  1561. package/src/core/components/tabs/index.ts +2 -0
  1562. package/src/core/components/toast/NotificationPanel.tsx +107 -0
  1563. package/src/core/components/toast/ToastContext.ts +12 -0
  1564. package/src/core/components/toast/ToastProps.ts +6 -0
  1565. package/src/core/components/toast/ToastProvider.tsx +26 -0
  1566. package/src/core/components/toast/index.ts +2 -0
  1567. package/src/core/hooks/CompositeState.tsx +292 -0
  1568. package/src/core/hooks/PortalContainerProvider.tsx +59 -0
  1569. package/src/core/hooks/SharedState.tsx +69 -0
  1570. package/src/core/hooks/index.ts +15 -0
  1571. package/src/core/hooks/useClickOutside.tsx +29 -0
  1572. package/src/core/hooks/useCopyToClipboard.tsx +28 -0
  1573. package/src/core/hooks/useDarkMode.ts +11 -0
  1574. package/src/core/hooks/useDebounce.tsx +15 -0
  1575. package/src/core/hooks/useEventSource.ts +35 -0
  1576. package/src/core/hooks/useFetch.ts +51 -0
  1577. package/src/core/hooks/useFlag.tsx +13 -0
  1578. package/src/core/hooks/useIntersectionObserver.tsx +40 -0
  1579. package/src/core/hooks/useIsFistRendering.ts +17 -0
  1580. package/src/core/hooks/useSafeLayoutEffect.ts +5 -0
  1581. package/src/core/hooks/useScrollableSearch.tsx +193 -0
  1582. package/src/core/hooks/useSharedValue.ts +22 -0
  1583. package/src/core/index.ts +3 -0
  1584. package/src/core/utils/cn.ts +6 -0
  1585. package/src/core/utils/index.ts +1 -0
  1586. package/src/env/index.ts +126 -0
  1587. package/src/features/activity-doc/ActivityDoc.tsx +199 -0
  1588. package/src/features/activity-doc/index.ts +1 -0
  1589. package/src/features/agent/CHART_INSTRUCTIONS.md +228 -0
  1590. package/src/features/agent/PayloadBuilder.tsx +319 -0
  1591. package/src/features/agent/chat/AgentChart.tsx +702 -0
  1592. package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
  1593. package/src/features/agent/chat/AskUserWidget.tsx +362 -0
  1594. package/src/features/agent/chat/ImageLightbox.tsx +99 -0
  1595. package/src/features/agent/chat/JumpingDots.tsx +16 -0
  1596. package/src/features/agent/chat/ModernAgentConversation.tsx +1465 -0
  1597. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +483 -0
  1598. package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +228 -0
  1599. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
  1600. package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
  1601. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +271 -0
  1602. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +550 -0
  1603. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +512 -0
  1604. package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +63 -0
  1605. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +124 -0
  1606. package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
  1607. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
  1608. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +97 -0
  1609. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
  1610. package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
  1611. package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +323 -0
  1612. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +583 -0
  1613. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
  1614. package/src/features/agent/chat/ModernAgentOutput/utils.ts +527 -0
  1615. package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
  1616. package/src/features/agent/chat/SkillWidgetProvider.tsx +106 -0
  1617. package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
  1618. package/src/features/agent/chat/VegaLiteChart.tsx +1081 -0
  1619. package/src/features/agent/chat/WaitingMessages.ts +66 -0
  1620. package/src/features/agent/chat/applyParameterValues.test.ts +258 -0
  1621. package/src/features/agent/chat/index.ts +35 -0
  1622. package/src/features/agent/chat/useArtifactUrlCache.tsx +92 -0
  1623. package/src/features/agent/createChartTool.ts +643 -0
  1624. package/src/features/agent/examples.ts +321 -0
  1625. package/src/features/agent/index.ts +4 -0
  1626. package/src/features/agent/visualization.ts +227 -0
  1627. package/src/features/errors/PanelErrorBoundary.tsx +30 -0
  1628. package/src/features/errors/RowErrorBoundary.tsx +28 -0
  1629. package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
  1630. package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
  1631. package/src/features/errors/index.ts +4 -0
  1632. package/src/features/facets/CollectionsFacetsNav.tsx +119 -0
  1633. package/src/features/facets/DocumentsFacetsNav.tsx +184 -0
  1634. package/src/features/facets/EnvironmentFacet.tsx +53 -0
  1635. package/src/features/facets/InteractionsFacetsNav.tsx +121 -0
  1636. package/src/features/facets/PromptsFacetsNav.tsx +110 -0
  1637. package/src/features/facets/RunsFacetsNav.tsx +209 -0
  1638. package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +134 -0
  1639. package/src/features/facets/index.ts +16 -0
  1640. package/src/features/facets/utils/SearchInterface.tsx +12 -0
  1641. package/src/features/facets/utils/StringFacet.tsx +23 -0
  1642. package/src/features/facets/utils/StringListFacet.tsx +22 -0
  1643. package/src/features/facets/utils/TypeFacet.tsx +59 -0
  1644. package/src/features/facets/utils/VEnvironmentFacet.tsx +43 -0
  1645. package/src/features/facets/utils/VInteractionFacet.tsx +73 -0
  1646. package/src/features/facets/utils/VStringFacet.tsx +41 -0
  1647. package/src/features/facets/utils/VTypeFacet.tsx +81 -0
  1648. package/src/features/facets/utils/VUserFacet.tsx +50 -0
  1649. package/src/features/facets/utils/utils.tsx +9 -0
  1650. package/src/features/index.ts +11 -0
  1651. package/src/features/layout/GenericPageNavHeader.tsx +122 -0
  1652. package/src/features/layout/NotFoundView.tsx +11 -0
  1653. package/src/features/layout/index.ts +2 -0
  1654. package/src/features/magic-pdf/AnnotatedImageSlider.tsx +482 -0
  1655. package/src/features/magic-pdf/DownloadPopover.tsx +70 -0
  1656. package/src/features/magic-pdf/ExtractedContentView.tsx +132 -0
  1657. package/src/features/magic-pdf/MagicPdfProvider.tsx +297 -0
  1658. package/src/features/magic-pdf/MagicPdfView.tsx +221 -0
  1659. package/src/features/magic-pdf/index.ts +1 -0
  1660. package/src/features/magic-pdf/types.ts +1 -0
  1661. package/src/features/pdf-viewer/PdfPageRenderer.tsx +612 -0
  1662. package/src/features/pdf-viewer/PdfPageSlider.tsx +473 -0
  1663. package/src/features/pdf-viewer/SimplePdfViewer.tsx +142 -0
  1664. package/src/features/pdf-viewer/index.ts +3 -0
  1665. package/src/features/permissions/SecureButton.tsx +18 -0
  1666. package/src/features/permissions/SecureSidebarItem.tsx +19 -0
  1667. package/src/features/permissions/UserPermissionsProvider.tsx +103 -0
  1668. package/src/features/permissions/helpers.ts +16 -0
  1669. package/src/features/permissions/index.ts +4 -0
  1670. package/src/features/store/collections/BrowseCollectionView.tsx +49 -0
  1671. package/src/features/store/collections/CollectionsTable.tsx +125 -0
  1672. package/src/features/store/collections/CreateCollection.tsx +140 -0
  1673. package/src/features/store/collections/EditCollectionView.tsx +294 -0
  1674. package/src/features/store/collections/SelectCollection.tsx +231 -0
  1675. package/src/features/store/collections/SharedPropsEditor.tsx +60 -0
  1676. package/src/features/store/collections/SyncMemberHeadsToggle.tsx +48 -0
  1677. package/src/features/store/collections/index.ts +7 -0
  1678. package/src/features/store/index.ts +3 -0
  1679. package/src/features/store/objects/DocumentPreviewPanel.tsx +414 -0
  1680. package/src/features/store/objects/DocumentSearchResults.tsx +382 -0
  1681. package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
  1682. package/src/features/store/objects/DocumentTable.tsx +419 -0
  1683. package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
  1684. package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
  1685. package/src/features/store/objects/components/ContentOverview.tsx +1362 -0
  1686. package/src/features/store/objects/components/DocumentIcon.tsx +134 -0
  1687. package/src/features/store/objects/components/DocumentInput.tsx +89 -0
  1688. package/src/features/store/objects/components/PropertiesEditorModal.tsx +257 -0
  1689. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +146 -0
  1690. package/src/features/store/objects/components/SelectDocument.tsx +109 -0
  1691. package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
  1692. package/src/features/store/objects/components/VectorSearchWidget.tsx +143 -0
  1693. package/src/features/store/objects/components/index.ts +9 -0
  1694. package/src/features/store/objects/components/useContentPanelHooks.ts +185 -0
  1695. package/src/features/store/objects/components/useDownloadObject.ts +29 -0
  1696. package/src/features/store/objects/index.ts +10 -0
  1697. package/src/features/store/objects/layout/DocumentTableColumn.tsx +99 -0
  1698. package/src/features/store/objects/layout/documentLayout.tsx +69 -0
  1699. package/src/features/store/objects/layout/index.ts +2 -0
  1700. package/src/features/store/objects/layout/knowledge.md +239 -0
  1701. package/src/features/store/objects/layout/renderers.tsx +185 -0
  1702. package/src/features/store/objects/search/DocumentSearchContext.ts +215 -0
  1703. package/src/features/store/objects/search/DocumentSearchProvider.tsx +50 -0
  1704. package/src/features/store/objects/search/index.ts +2 -0
  1705. package/src/features/store/objects/selection/ObjectsActionContext.tsx +197 -0
  1706. package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
  1707. package/src/features/store/objects/selection/SelectionActions.tsx +150 -0
  1708. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +137 -0
  1709. package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
  1710. package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
  1711. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +97 -0
  1712. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
  1713. package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
  1714. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
  1715. package/src/features/store/objects/selection/actions/index.ts +7 -0
  1716. package/src/features/store/objects/selection/index.ts +4 -0
  1717. package/src/features/store/objects/upload/DocumentUploadModal.tsx +927 -0
  1718. package/src/features/store/objects/upload/index.ts +3 -0
  1719. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +245 -0
  1720. package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
  1721. package/src/features/store/types/ContentObjectTypesSearch.tsx +115 -0
  1722. package/src/features/store/types/ContentObjectTypesTable.tsx +41 -0
  1723. package/src/features/store/types/CreateOrUpdateTypeModal.tsx +63 -0
  1724. package/src/features/store/types/ObjectSchemaEditor.tsx +141 -0
  1725. package/src/features/store/types/SelectContentType.tsx +88 -0
  1726. package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
  1727. package/src/features/store/types/TableLayoutEditor.tsx +104 -0
  1728. package/src/features/store/types/index.ts +8 -0
  1729. package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
  1730. package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
  1731. package/src/features/store/types/search/index.ts +2 -0
  1732. package/src/features/user/UserAvatar.tsx +34 -0
  1733. package/src/features/user/UserInfo.tsx +282 -0
  1734. package/src/features/user/index.ts +2 -0
  1735. package/src/features/utils/index.ts +5 -0
  1736. package/src/features/utils/mimeType.ts +18 -0
  1737. package/src/features/utils/print.ts +189 -0
  1738. package/src/features/utils/rendition.ts +97 -0
  1739. package/src/features/utils/text.ts +10 -0
  1740. package/src/features/utils/workflowStatus.ts +44 -0
  1741. package/src/layout/AppLayout.tsx +132 -0
  1742. package/src/layout/FullHeightLayout.tsx +74 -0
  1743. package/src/layout/Navbar.tsx +127 -0
  1744. package/src/layout/Sidebar.tsx +139 -0
  1745. package/src/layout/SidebarContext.ts +17 -0
  1746. package/src/layout/TitleBar.tsx +7 -0
  1747. package/src/layout/index.ts +6 -0
  1748. package/src/router/FixLinks.tsx +28 -0
  1749. package/src/router/HistoryNavigator.ts +237 -0
  1750. package/src/router/Nav.tsx +56 -0
  1751. package/src/router/NestedNavigationContext.tsx +32 -0
  1752. package/src/router/NestedRouterProvider.tsx +64 -0
  1753. package/src/router/PathMatcher.ts +166 -0
  1754. package/src/router/PathWithParams.ts +34 -0
  1755. package/src/router/Route404.tsx +18 -0
  1756. package/src/router/RouteComponent.tsx +41 -0
  1757. package/src/router/Router.tsx +216 -0
  1758. package/src/router/RouterProvider.tsx +55 -0
  1759. package/src/router/index.ts +10 -0
  1760. package/src/router/path.ts +154 -0
  1761. package/src/session/TypeRegistry.ts +27 -0
  1762. package/src/session/UserSession.ts +228 -0
  1763. package/src/session/UserSessionProvider.tsx +189 -0
  1764. package/src/session/auth/composable.ts +295 -0
  1765. package/src/session/auth/firebase.ts +168 -0
  1766. package/src/session/auth/useAuthState.ts +57 -0
  1767. package/src/session/auth/useCurrentTenant.ts +73 -0
  1768. package/src/session/constants.ts +2 -0
  1769. package/src/session/index.ts +8 -0
  1770. package/src/session/useUXTracking.tsx +38 -0
  1771. package/src/shell/SplashScreen.tsx +74 -0
  1772. package/src/shell/VertesiaShell.tsx +29 -0
  1773. package/src/shell/apps/AppInstallationProvider.tsx +22 -0
  1774. package/src/shell/apps/AppProjectSelector.tsx +58 -0
  1775. package/src/shell/apps/StandaloneApp.tsx +174 -0
  1776. package/src/shell/apps/index.ts +3 -0
  1777. package/src/shell/index.tsx +7 -0
  1778. package/src/shell/login/EnterpriseSigninButton.tsx +109 -0
  1779. package/src/shell/login/GitHubSignInButton.tsx +40 -0
  1780. package/src/shell/login/GoogleSignInButton.tsx +36 -0
  1781. package/src/shell/login/InviteAcceptModal.tsx +94 -0
  1782. package/src/shell/login/MicrosoftSigninButton.tsx +30 -0
  1783. package/src/shell/login/PreviewIcon.tsx +29 -0
  1784. package/src/shell/login/SignInModal.tsx +28 -0
  1785. package/src/shell/login/SigninScreen.tsx +162 -0
  1786. package/src/shell/login/SignupForm.tsx +179 -0
  1787. package/src/shell/login/TerminalLogin.tsx +338 -0
  1788. package/src/shell/login/UserInfo.tsx +78 -0
  1789. package/src/shell/login/UserSessionMenu.tsx +92 -0
  1790. package/src/shell/utils.tsx +7 -0
  1791. package/src/vite-env.d.ts +2 -0
  1792. package/src/widgets/Progress.tsx +10 -0
  1793. package/src/widgets/SvgIcon.tsx +44 -0
  1794. package/src/widgets/codemirror/CodeMirrorEditor.tsx +122 -0
  1795. package/src/widgets/codemirror/CodemirrorStateSingleton.tsx +39 -0
  1796. package/src/widgets/codemirror/MonacoEditor.tsx +200 -0
  1797. package/src/widgets/codemirror/index.ts +6 -0
  1798. package/src/widgets/form/Form.tsx +180 -0
  1799. package/src/widgets/form/FormContext.ts +41 -0
  1800. package/src/widgets/form/ManagedObject.ts +336 -0
  1801. package/src/widgets/form/fields.tsx +36 -0
  1802. package/src/widgets/form/index.ts +6 -0
  1803. package/src/widgets/form/inputs.tsx +45 -0
  1804. package/src/widgets/form/schema.ts +222 -0
  1805. package/src/widgets/index.ts +11 -0
  1806. package/src/widgets/json-view/JSONCode.tsx +176 -0
  1807. package/src/widgets/json-view/JSONDisplay.tsx +24 -0
  1808. package/src/widgets/json-view/JSONView.tsx +183 -0
  1809. package/src/widgets/json-view/index.ts +4 -0
  1810. package/src/widgets/json-view/types.ts +5 -0
  1811. package/src/widgets/markdown/CodeBlockRendering.tsx +56 -0
  1812. package/src/widgets/markdown/MarkdownRenderer.tsx +588 -0
  1813. package/src/widgets/markdown/MermaidDiagram.tsx +115 -0
  1814. package/src/widgets/markdown/index.ts +2 -0
  1815. package/src/widgets/popover/Popover.tsx +171 -0
  1816. package/src/widgets/popover/context.ts +15 -0
  1817. package/src/widgets/popover/index.ts +2 -0
  1818. package/src/widgets/popover/slots.ts +24 -0
  1819. package/src/widgets/properties/PropertiesView.tsx +34 -0
  1820. package/src/widgets/properties/index.ts +1 -0
  1821. package/src/widgets/schema-editor/ManagedSchema.ts +337 -0
  1822. package/src/widgets/schema-editor/editor/Editable.tsx +251 -0
  1823. package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +15 -0
  1824. package/src/widgets/schema-editor/editor/PropertyEditor.tsx +150 -0
  1825. package/src/widgets/schema-editor/editor/PropertyViewer.tsx +15 -0
  1826. package/src/widgets/schema-editor/editor/SchemaContext.tsx +9 -0
  1827. package/src/widgets/schema-editor/editor/SchemaEditor.test.ts +48 -0
  1828. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +161 -0
  1829. package/src/widgets/schema-editor/index.ts +6 -0
  1830. package/src/widgets/schema-editor/json-schema4-utils.ts +187 -0
  1831. package/src/widgets/schema-editor/type-signature.ts +39 -0
  1832. package/src/widgets/upload/DropZone.tsx +259 -0
  1833. package/src/widgets/upload/UploadResultCategory.tsx +81 -0
  1834. package/src/widgets/upload/UploadSummary.tsx +115 -0
  1835. package/src/widgets/upload/index.ts +3 -0
  1836. package/src/widgets/xml-viewer/components/Attributes/index.tsx +27 -0
  1837. package/src/widgets/xml-viewer/components/CDataTag/index.tsx +21 -0
  1838. package/src/widgets/xml-viewer/components/CollapseIcon/index.tsx +32 -0
  1839. package/src/widgets/xml-viewer/components/CommentTag/index.tsx +30 -0
  1840. package/src/widgets/xml-viewer/components/DeclarationTag/index.tsx +23 -0
  1841. package/src/widgets/xml-viewer/components/Elements/index.tsx +83 -0
  1842. package/src/widgets/xml-viewer/components/InvalidXml/index.tsx +3 -0
  1843. package/src/widgets/xml-viewer/components/Tag/index.tsx +47 -0
  1844. package/src/widgets/xml-viewer/components/TextElement/index.tsx +28 -0
  1845. package/src/widgets/xml-viewer/components/XMLViewer.tsx +65 -0
  1846. package/src/widgets/xml-viewer/components/types.ts +104 -0
  1847. package/src/widgets/xml-viewer/constants/index.ts +28 -0
  1848. package/src/widgets/xml-viewer/context/xml-viewer-context.ts +12 -0
  1849. package/src/widgets/xml-viewer/helpers/index.ts +56 -0
  1850. package/src/widgets/xml-viewer/hooks/useCollapsible.ts +28 -0
  1851. package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +34 -0
  1852. package/src/widgets/xml-viewer/index.ts +2 -0
  1853. package/src/widgets/xml-viewer/types/index.ts +21 -0
  1854. package/tsconfig.dist.json +20 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertesia-ui-widgets.js","sources":["esm/widgets/codemirror/CodemirrorStateSingleton.js","esm/widgets/codemirror/CodeMirrorEditor.js","esm/widgets/codemirror/MonacoEditor.js","esm/widgets/form/FormContext.js","esm/widgets/form/inputs.js","esm/widgets/form/Form.js","esm/widgets/form/schema.js","esm/widgets/form/ManagedObject.js","esm/widgets/form/fields.js","esm/widgets/json-view/JSONCode.js","esm/widgets/json-view/JSONView.js","esm/widgets/json-view/JSONDisplay.js","esm/widgets/markdown/CodeBlockRendering.js","esm/core/components/libs/utils.js","esm/session/UserSession.js","esm/features/agent/chat/useArtifactUrlCache.js","esm/features/agent/chat/VegaLiteChart.js","esm/features/agent/chat/AgentChart.js","esm/features/agent/chat/AskUserWidget.js","esm/widgets/markdown/MermaidDiagram.js","esm/widgets/markdown/MarkdownRenderer.js","esm/widgets/popover/context.js","esm/widgets/popover/slots.js","esm/widgets/popover/Popover.js","esm/widgets/Progress.js","esm/widgets/properties/PropertiesView.js","esm/widgets/schema-editor/type-signature.js","esm/widgets/schema-editor/json-schema4-utils.js","esm/widgets/schema-editor/ManagedSchema.js","esm/widgets/schema-editor/editor/EditableSchemaProperty.js","esm/widgets/schema-editor/editor/PropertyEditor.js","esm/widgets/schema-editor/editor/PropertyViewer.js","esm/widgets/schema-editor/editor/SchemaContext.js","esm/widgets/schema-editor/editor/Editable.js","esm/widgets/schema-editor/editor/SchemaEditor.js","esm/widgets/SvgIcon.js","esm/widgets/upload/DropZone.js","esm/widgets/upload/UploadResultCategory.js","esm/widgets/upload/UploadSummary.js","esm/widgets/xml-viewer/constants/index.js","esm/widgets/xml-viewer/context/xml-viewer-context.js","esm/widgets/xml-viewer/hooks/useXMLViewer.js","esm/widgets/xml-viewer/components/CDataTag/index.js","esm/widgets/xml-viewer/components/CollapseIcon/index.js","esm/widgets/xml-viewer/hooks/useCollapsible.js","esm/widgets/xml-viewer/components/CommentTag/index.js","esm/widgets/xml-viewer/components/Attributes/index.js","esm/widgets/xml-viewer/components/DeclarationTag/index.js","esm/widgets/xml-viewer/helpers/index.js","esm/widgets/xml-viewer/components/Tag/index.js","esm/widgets/xml-viewer/components/TextElement/index.js","esm/widgets/xml-viewer/components/Elements/index.js","esm/widgets/xml-viewer/components/InvalidXml/index.js","esm/widgets/xml-viewer/components/XMLViewer.js"],"sourcesContent":["import { EditorState, Text } from '@codemirror/state';\nlet stateInstance = null;\n/**\n * Returns a shared instance of CodeMirror's EditorState.\n * If the instance doesn't exist, it creates one with the given initial content.\n *\n * @param initialDoc - The initial content for the editor, either as a `string` or `Text`.\n * @param extensions - Optional extensions to be applied to the editor.\n * @returns The shared EditorState instance.\n**/\nexport const getSharedEditorState = (initialDoc = \"\", extensions = []) => {\n const doc = typeof initialDoc === \"string\" ? Text.of(initialDoc.split(\"\\n\")) : initialDoc;\n if (!stateInstance) {\n stateInstance = EditorState.create({\n doc,\n extensions,\n });\n }\n else if (stateInstance.doc.toString() !== doc.toString()) {\n stateInstance = EditorState.create({\n doc,\n extensions,\n });\n }\n return stateInstance;\n};\n/**\n * Resets the singleton instance (useful for testing or reinitializing).\n**/\nexport const resetSharedEditorState = () => {\n stateInstance = null;\n};\n//# sourceMappingURL=CodemirrorStateSingleton.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport debounce from 'debounce';\nimport { useEffect, useMemo, useRef } from 'react';\nimport { EditorView } from '@codemirror/view';\nimport { useSafeLayoutEffect } from '@vertesia/ui/core';\nimport { getSharedEditorState } from './CodemirrorStateSingleton';\nexport class EditorApi {\n editor;\n constructor(editor) {\n this.editor = editor;\n }\n setValue(value) {\n this.editor.dispatch({\n changes: {\n from: 0,\n to: this.editor.state.doc.length,\n insert: value || \"\",\n },\n });\n }\n getValue() {\n return this.editor.state.doc.toString();\n }\n}\nconst customTheme = EditorView.theme({\n \"&\": { fontSize: \"14px\", fontFamily: \"monospace\" },\n \".cm-content\": { fontFamily: \"inherit\" },\n \".cm-scroller\": { fontFamily: \"inherit\" },\n \".cm-gutters\": { backgroundColor: \"transparent\", color: \"#ddd\" },\n \".cm-focused\": { outline: \"none\" },\n \".cm-cursor\": {\n borderLeft: \"2px solid #808080\",\n borderLeftColor: \"#808080\",\n animation: \"blink 1.2s step-start infinite\"\n },\n \"@keyframes blink\": { \"50%\": { opacity: 0 } }\n});\nconst baseExtensions = [\n customTheme,\n EditorView.lineWrapping,\n];\nfunction updateListenerExtension(cb) {\n return EditorView.updateListener.of((update) => {\n if (update.docChanged) {\n cb(update);\n }\n });\n}\n;\n/**\n * The className is only used on the first rendering - the editor class will not be updated if the property changes\n**/\nexport function CodeMirrorEditor({ onChange, value, className, editorRef, extensions, debounceTimeout = 0 }) {\n const ref = useRef(null);\n // the onChange property may change so we need to store it in a\n // reference to be able to update it when it changes without\n // re-registering the listener on codemirror since codemirror can only register\n // listeners at creation\n const onChangeRef = useRef(undefined);\n useEffect(() => {\n if (onChange) {\n onChangeRef.current = debounceTimeout > 0\n ? debounce(onChange, debounceTimeout)\n : onChange;\n return () => {\n // WE MUST NOT CANCEL THE DEBOUNCE even if we unset the onChange impl\n // otherwise some updates will never happens\n onChangeRef.current = undefined;\n };\n }\n }, [onChange, debounceTimeout]);\n const component = useMemo(() => _jsx(\"div\", { ref: ref, className: className }), [className]);\n useSafeLayoutEffect(() => {\n if (ref.current) {\n let actualExtensions = [...baseExtensions, updateListenerExtension((update) => {\n onChangeRef.current?.(update);\n })];\n if (Array.isArray(extensions)) {\n actualExtensions = actualExtensions.concat(extensions);\n }\n else if (extensions) {\n actualExtensions.push(extensions);\n }\n const sharedState = getSharedEditorState(value, actualExtensions);\n const editor = new EditorView({\n state: sharedState,\n parent: ref.current,\n });\n const api = new EditorApi(editor);\n if (editorRef) {\n editorRef.current = api;\n }\n return () => {\n editor.destroy();\n if (editorRef) {\n editorRef.current = undefined;\n }\n };\n }\n }, [component, extensions]);\n return component;\n}\n//# sourceMappingURL=CodeMirrorEditor.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Editor } from '@monaco-editor/react';\nimport { useTheme } from '@vertesia/ui/core';\nimport debounce from 'debounce';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nexport class VEditorApi {\n VgetValue;\n VsetValue;\n constructor(VgetValue, VsetValue) {\n this.VgetValue = VgetValue;\n this.VsetValue = VsetValue;\n }\n getValue() {\n return this.VgetValue();\n }\n setValue(value) {\n this.VsetValue(value || '');\n }\n}\nexport function MonacoEditor({ onChange, value = '', className, editorRef, language = 'javascript', debounceTimeout = 0, options = {}, beforeMount, onMount, defaultValue }) {\n const [editorValue, setEditorValue] = useState(value);\n const editorInstanceRef = useRef(null);\n const { theme } = useTheme();\n const getValueRef = useRef(() => editorValue);\n const setValueRef = useRef((newValue) => {\n setEditorValue(newValue);\n if (editorInstanceRef.current) {\n editorInstanceRef.current.setValue(newValue);\n }\n });\n useEffect(() => {\n getValueRef.current = () => editorValue;\n }, [editorValue]);\n useEffect(() => {\n if (editorRef) {\n editorRef.current = new VEditorApi(() => getValueRef.current(), (value) => setValueRef.current(value));\n }\n return () => {\n if (editorRef) {\n editorRef.current = undefined;\n }\n };\n }, [editorRef]);\n const debouncedOnChange = useMemo(() => {\n if (!onChange)\n return undefined;\n if (debounceTimeout > 0) {\n return debounce((update) => onChange(update), debounceTimeout);\n }\n else {\n return onChange;\n }\n }, [onChange, debounceTimeout]);\n const handleEditorChange = useCallback((newValue) => {\n const actualValue = newValue || '';\n setEditorValue(actualValue);\n if (debouncedOnChange) {\n const update = {\n docChanged: true,\n state: {\n doc: {\n toString: () => actualValue,\n length: actualValue.length\n }\n }\n };\n // Using type assertion through unknown to avoid complex type mocking\n debouncedOnChange(update);\n }\n }, [debouncedOnChange]);\n const handleEditorDidMount = useCallback((editor, monacoInstance) => {\n editorInstanceRef.current = editor;\n // Update the setValue ref to use the actual editor instance\n setValueRef.current = (newValue) => {\n setEditorValue(newValue);\n editor.setValue(newValue);\n };\n // Set up custom theme for better error line highlighting\n monacoInstance.editor.defineTheme('errorLineTheme', {\n base: theme === 'dark' ? 'vs-dark' : 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editorError.background': '#ffebee',\n 'editorError.border': '#f44336',\n },\n });\n monacoInstance.editor.setTheme('errorLineTheme');\n // Call custom onMount if provided\n onMount?.(editor);\n }, [language, onMount, theme]);\n // Update editor value when prop changes\n useEffect(() => {\n if (value !== editorValue) {\n setEditorValue(value);\n if (editorInstanceRef.current) {\n editorInstanceRef.current.setValue(value);\n }\n }\n }, [value]);\n const defaultOptions = {\n fontSize: 14,\n fontFamily: 'monospace',\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n wordWrap: 'on',\n lineNumbers: 'on',\n folding: false,\n lineDecorationsWidth: 0,\n lineNumbersMinChars: 3,\n automaticLayout: true,\n glyphMargin: true, // Enable better error reporting\n renderValidationDecorations: 'on', // Show error squiggles\n renderLineHighlight: 'line', // Highlight entire line for errors\n hover: {\n enabled: true,\n delay: 100\n }, // Enable hover for error messages\n quickSuggestions: {\n other: true,\n comments: true,\n strings: true\n }, // Show problems panel information\n ...options\n };\n return (_jsx(\"div\", { className: className, children: _jsx(Editor, { height: \"100%\", theme: theme === 'dark' ? 'vs-dark' : 'light', language: language, value: editorValue, onChange: handleEditorChange, onMount: handleEditorDidMount, beforeMount: beforeMount, options: defaultOptions, defaultValue: defaultValue || '' }) }));\n}\n//# sourceMappingURL=MonacoEditor.js.map","import { createContext, useContext } from \"react\";\nconst FieldSetContext = createContext(undefined);\nconst FieldSetContextProvider = FieldSetContext.Provider;\nexport function useFieldSet() {\n const ctx = useContext(FieldSetContext);\n if (!ctx) {\n throw new Error('useFieldSet must be used within a Form or FieldSet element');\n }\n return ctx;\n}\nexport class FormContext {\n object;\n components;\n disabled;\n constructor(object, components = {}, disabled = false) {\n this.object = object;\n this.components = components;\n this.disabled = disabled;\n }\n}\nconst _FormContext = createContext(undefined);\nexport function useForm() {\n const ctx = useContext(_FormContext);\n if (!ctx) {\n throw new Error('useForm must be used within a Form element');\n }\n return ctx;\n}\nconst FormContextProvider = _FormContext.Provider;\nexport { FieldSetContextProvider, FormContextProvider };\n//# sourceMappingURL=FormContext.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport React, { useState } from \"react\";\nimport { Styles } from \"@vertesia/ui/core\";\nconst Input = React.forwardRef(({ object, type = 'text', onChange, ...props }, ref) => {\n const [actualValue, setValue] = useState(object.value != null ? String(object.value) : '');\n const [booleanValue, setBooleanValue] = useState(object.schema.isBoolean && object.value === true);\n if (props.className) {\n props.className = clsx(Styles.INPUT, props.className);\n }\n else {\n props.className = Styles.INPUT;\n }\n const _onChange = (ev) => {\n if (props.disabled)\n return;\n setValue(ev.target.value);\n if (object.schema.isBoolean) {\n object.value = ev.target.checked;\n setBooleanValue(object.value);\n }\n else {\n object.value = ev.target.value;\n }\n onChange && onChange(ev);\n };\n if (type === 'textarea') {\n return (_jsx(\"textarea\", { ref: ref, ...props, value: actualValue, onChange: _onChange }));\n }\n else if (type === 'checkbox') {\n return (_jsx(\"input\", { ref: ref, ...props, type: \"checkbox\", checked: booleanValue, onChange: _onChange, className: \"form-check-input\" }));\n }\n else {\n return (_jsx(\"input\", { ref: ref, ...props, type: type, value: actualValue, onChange: _onChange }));\n }\n});\nexport { Input };\n//# sourceMappingURL=inputs.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, FormItem } from \"@vertesia/ui/core\";\nimport clsx from \"clsx\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { FormContext, FormContextProvider, useForm } from \"./FormContext.js\";\nimport { Input } from \"./inputs.js\";\nexport function Form({ object, components, onSubmit, children, onChange, disabled }) {\n const _onSubmit = (evt) => {\n evt.stopPropagation();\n evt.preventDefault();\n onSubmit && onSubmit(object.value);\n };\n object.observer = onChange;\n return (_jsx(FormContextProvider, { value: new FormContext(object, components || {}, disabled ?? false), children: _jsx(\"form\", { className: \"w-full\", onSubmit: _onSubmit, children: children }) }));\n}\nfunction GeneratedFormFields() {\n const ctx = useForm();\n return (_jsx(\"div\", { className: 'flex flex-col gap-4 w-full', children: ctx.object.properties.map(renderProperty) }));\n}\nexport function GeneratedForm({ children, ...props }) {\n return (_jsxs(Form, { ...props, children: [_jsx(GeneratedFormFields, {}), children] }));\n}\nfunction renderProperty(prop) {\n if (prop.isList) {\n return _jsx(ListField, { object: prop }, prop.name);\n }\n else if (prop.isObject) {\n return _jsx(CompositeField, { object: prop }, prop.name);\n }\n else {\n return _jsx(ScalarField, { object: prop }, prop.name);\n }\n}\nfunction renderItemProperty(prop, editor) {\n if (prop.isList) {\n return _jsx(ListField, { object: prop });\n }\n else if (prop.isObject) {\n return _jsx(CompositeField, { object: prop });\n }\n else {\n return _jsx(ScalarField, { object: prop, editor: editor });\n }\n}\nexport function ScalarField({ object, editor, inline = false }) {\n if (!editor) {\n editor = object.schema.editor;\n }\n const { components, disabled } = useForm();\n const Component = (editor && components[editor]) || Input;\n const inputType = object.getInputType();\n if (inputType === 'checkbox') {\n inline = true;\n }\n const handleOnChange = (event) => {\n if (disabled)\n return;\n if (object.schema.isBoolean) {\n object.value = event.target.checked;\n }\n else if (object.schema.isNumber) {\n object.value = parseFloat(event.target.value);\n }\n else {\n object.value = event.target.value;\n }\n };\n if (object.isListItem) {\n // List items don't need the FormItem wrapper (no label, description, etc.)\n return _jsx(Component, { object: object, type: inputType, onChange: handleOnChange, disabled: disabled });\n }\n return (_jsx(FormItem, { label: object.title, required: object.schema.isRequired, description: object.schema.description, className: clsx('flex', inline ? 'flex-row items-center' : 'flex-col'), children: _jsx(Component, { object: object, type: inputType, onChange: handleOnChange, disabled: disabled }) }));\n}\nfunction CompositeField({ object }) {\n return (_jsxs(\"div\", { className: \"flex flex-col gap-4 my-4 py-2 pl-4 border-l-4 border-l-solid border-l-slate-100 dark:border-l-slate-600\", children: [!object.isListItem && _jsx(\"div\", { className: 'text-gray-900 dark:text-gray-200 font-semibold', children: object.title }), object.properties.map(renderProperty)] }));\n}\nfunction ListField({ object }) {\n const [value, setValue] = useState(object.value || []);\n const { disabled } = useForm();\n const addItem = () => {\n if (disabled)\n return;\n object.add();\n setValue([...object.value]);\n };\n const deleteItem = (index) => {\n if (disabled)\n return;\n object.remove(index);\n setValue([...object.value]);\n };\n return (_jsxs(\"div\", { className: \"flex flex-col gap-4 my-4 py-2 pl-4 border-l-4 border-l-solid border-l-slate-100 darK:border-l-slate-600\", children: [!object.isListItem && _jsx(\"div\", { className: 'text-gray-900 dark:text-gray-200 font-semibold', children: object.title }), object.items.map((item, index) => {\n return _jsx(ListItem, { object: item, list: object, onDelete: () => deleteItem(index), disabled: disabled }, `${index}-${value[index] ?? ''}`);\n }), _jsx(\"div\", { children: _jsxs(Button, { variant: 'secondary', onClick: addItem, disabled: disabled, children: [_jsx(Plus, { className: \"size-6\" }), \" Add\"] }) })] }));\n}\nfunction ListItem({ list, object, onDelete, disabled }) {\n return (_jsxs(\"div\", { className: 'flex gap-2 w-full', children: [_jsx(\"div\", { className: \"flex-1\", children: renderItemProperty(object, list.schema.arraySchema.editor) }), _jsx(Button, { variant: 'secondary', onClick: onDelete, disabled: disabled, children: _jsx(Trash2, { className: 'size-4' }) })] }));\n}\n//# sourceMappingURL=Form.js.map","import Ajv from \"ajv\";\nfunction createSchemaFromType(type) {\n if (type === 'object') {\n return { type: 'object', properties: {} };\n }\n else if (type === 'array') {\n return { type: 'array', items: {} };\n }\n else {\n return { type };\n }\n}\nexport class Schema {\n schema;\n properties = {};\n _validator;\n constructor(schema) {\n this.schema = schema || { type: 'object', properties: {} };\n this.load();\n }\n get validator() {\n if (!this._validator) {\n const ajv = new Ajv({ allErrors: true, strict: false });\n this._validator = ajv.compile(this.schema);\n }\n return this._validator;\n }\n load() {\n if (this.schema.properties) {\n const properties = this.schema.properties;\n Object.keys(properties).forEach(name => {\n this.loadProperty(name, properties[name]);\n });\n }\n }\n hasProperties() {\n return Object.keys(this.properties).length > 0;\n }\n get title() {\n return this.schema.title || this.schema.name;\n }\n get description() {\n return this.schema.description;\n }\n loadProperty(name, propertySchema) {\n let property;\n if (propertySchema.type === 'array') {\n property = new ArrayPropertySchema(this, name, propertySchema);\n }\n else {\n property = new PropertySchema(this, name, propertySchema);\n }\n this.properties[name] = property;\n return property;\n }\n get type() {\n return this.schema.type;\n }\n validate(value) {\n if (!this.validator(value)) {\n return this.validator.errors || [];\n }\n else {\n return null;\n }\n }\n addProperty(name, typeOrSchema, isRequired = false) {\n if (this.schema.type !== 'object') {\n this.schema.type = 'object';\n }\n if (!this.schema.properties) {\n this.schema.properties = {};\n }\n const propertySchema = typeof typeOrSchema === 'string' ? createSchemaFromType(typeOrSchema) : typeOrSchema;\n const property = this.loadProperty(name, propertySchema);\n this.schema.properties[property.name] = property.schema;\n if (isRequired) {\n property.isRequired = true;\n }\n return property;\n }\n removeProperty(name) {\n if (this.schema.properties) {\n delete this.schema.properties[name];\n if (Array.isArray(this.schema.required)) {\n this.schema.required = this.schema.required.filter(x => x !== name);\n }\n }\n delete this.properties[name];\n }\n getProperty(name) {\n return this.properties[name];\n }\n get editor() {\n return this.schema.editor;\n }\n}\nexport class PropertySchema extends Schema {\n parent;\n name;\n constructor(parent, name, schema) {\n super(schema);\n this.parent = parent;\n this.name = name;\n if (schema.type === 'array') {\n throw new Error(\"Array property must be instantiated using ArrayPropertySchema\");\n }\n if (schema.type === 'object' && !schema.properties) {\n schema.properties = {};\n }\n }\n get isMulti() {\n return false;\n }\n get isReadOnly() {\n return !!this.schema.readOnly;\n }\n set isReadOnly(value) {\n this.schema.readOnly = value;\n }\n get defaultValue() {\n return this.schema.default;\n }\n set defaultValue(value) {\n this.schema.default = value;\n }\n get enum() {\n return this.schema.enum;\n }\n set enum(values) {\n this.schema.enum = values;\n }\n get isRequired() {\n const required = this.parent.schema.required;\n return required ? required.includes(this.name) : false;\n }\n set isRequired(value) {\n let required = Array.isArray(this.parent.schema.required) ? this.parent.schema.required : [];\n if (value) {\n required = required.concat(this.name);\n }\n else {\n required = required.filter(x => x !== this.name);\n }\n this.parent.schema.required = required;\n }\n get type() {\n return this.schema.type;\n }\n set type(value) {\n if (this.schema.type !== value) {\n this.schema.type = value;\n if (value !== 'object') { // remove sub properties\n this.properties = {};\n this.schema.properties = undefined;\n }\n }\n }\n remove() {\n this.parent.removeProperty(this.name);\n }\n get isBoolean() {\n return this.type === 'boolean';\n }\n get isString() {\n return this.type === 'string';\n }\n get isNumber() {\n return this.type === 'number' || this.type === 'integer';\n }\n get isObject() {\n return this.type === 'object';\n }\n}\nfunction getArrayElementType(schema) {\n if (schema.type !== 'array') {\n throw new Error('Expecting an array schema');\n }\n if (!schema.items) {\n schema.items = {};\n }\n else if (Array.isArray(schema.items)) {\n throw new Error('Tuple arrays are not supported');\n }\n return schema.items;\n}\nexport class ArrayPropertySchema extends PropertySchema {\n arraySchema;\n constructor(parent, name, schema) {\n super(parent, name, getArrayElementType(schema));\n this.arraySchema = schema;\n }\n get isMulti() {\n return true;\n }\n}\n//# sourceMappingURL=schema.js.map","import { Schema } from \"./schema.js\";\nexport function computeTitleFromName(name) {\n name = name.replace(/_/g, ' ').replace(/([a-z0-9])&([A-Z])/g, \"$1 $2\");\n return name[0].toUpperCase() + name.slice(1);\n}\nfunction getInputType(_name, schema) {\n if (schema.editor) {\n return schema.editor;\n }\n // Check format as fallback (e.g., \"document\", \"media\", \"date\", etc.)\n if (schema.schema.format) {\n return schema.schema.format;\n }\n switch (schema.type) {\n case 'number':\n case 'integer':\n return 'number';\n case 'boolean':\n return 'checkbox';\n case 'string':\n return \"text\";\n default:\n return 'text';\n }\n}\nexport class Node {\n parent;\n schema;\n name;\n // change observer\n observer; // return false to stop bubbling\n constructor(parent, schema, name) {\n this.parent = parent;\n this.schema = schema;\n this.name = name;\n }\n get isRoot() {\n return !this.parent;\n }\n get root() {\n return this.parent ? this.parent.root : this;\n }\n get path() {\n return this.parent ? this.parent.path.concat(this.name) : [];\n }\n get isScalar() {\n return false;\n }\n get isListItem() {\n return false;\n }\n get isObject() {\n return false;\n }\n get isList() {\n return false;\n }\n get title() {\n return this.schema.title || computeTitleFromName(this.name);\n }\n onChange(node) {\n if (this.observer) {\n if (this.observer(this) === false) {\n return;\n }\n ;\n }\n this.parent && this.parent.onChange(node);\n }\n}\nexport class ManagedObjectBase extends Node {\n constructor(parent, schema, name) {\n super(parent, schema, name);\n }\n get isObject() {\n return true;\n }\n getProperty(name) {\n const schema = this.schema.properties[name];\n if (schema.isMulti) {\n return new ManagedListProperty(this, schema, this.getOrInitArrayProperty(name));\n }\n else if (schema.isObject) {\n return new ManagedObjectProperty(this, schema, schema.name, this.getOrInitObjectProperty(name));\n }\n else {\n return new ManagedProperty(this, schema);\n }\n }\n getOrInitObjectProperty(name) {\n let value = this.value[name];\n if (!value) {\n this.value[name] = value = {};\n }\n return value;\n }\n getOrInitArrayProperty(name) {\n let value = this.value[name];\n if (!value) {\n this.value[name] = value = [];\n }\n return value;\n }\n setPropertyValue(name, value) {\n if (this.value[name] !== value) {\n this.value[name] = value;\n return true;\n }\n return false;\n }\n getPropertyValue(name) {\n return this.value[name];\n }\n get properties() {\n const out = [];\n for (const schema of Object.values(this.schema.properties)) {\n if (schema.isMulti) {\n out.push(new ManagedListProperty(this, schema, this.getOrInitArrayProperty(schema.name)));\n }\n else if (schema.isObject) {\n out.push(new ManagedObjectProperty(this, schema, schema.name, this.getOrInitObjectProperty(schema.name)));\n }\n else {\n out.push(new ManagedProperty(this, schema));\n }\n }\n return out;\n }\n [Symbol.iterator]() {\n return this.properties[Symbol.iterator]();\n }\n}\nexport class ManagedObject extends ManagedObjectBase {\n value;\n constructor(schema, value = {}) {\n super(null, schema instanceof Schema ? schema : new Schema(schema), '#root');\n this.value = value;\n }\n}\nexport class ManagedObjectProperty extends ManagedObjectBase {\n value;\n constructor(parent, schema, name, value) {\n super(parent, schema, name);\n this.value = value;\n }\n}\nexport class ManagedProperty extends Node {\n constructor(parent, schema) {\n super(parent, schema, schema.name);\n if (parent.value[this.name] === undefined && schema.defaultValue !== undefined) {\n parent.value[this.name] = schema.defaultValue;\n }\n }\n get isScalar() {\n return true;\n }\n set value(value) {\n const changed = this.parent.setPropertyValue(this.name, value);\n if (changed) {\n this.onChange(this);\n }\n }\n get value() {\n return this.parent.getPropertyValue(this.name);\n }\n getInputType() {\n return getInputType(this.name, this.schema);\n }\n}\nexport class ManagedListProperty extends Node {\n value;\n items = [];\n constructor(parent, schema, value) {\n super(parent, schema, schema.name);\n this.value = value;\n for (const _v of this.value) {\n this.add();\n }\n }\n get isList() {\n return true;\n }\n newItem(index) {\n if (this.schema.isObject) {\n return new ManageObjectEntry(this, index);\n }\n else {\n return new ManagedScalarEntry(this, index);\n }\n }\n add() {\n const item = this.newItem(this.items.length);\n this.items.push(item);\n return item;\n }\n //TODO change is fired even if the removed item is transient\n // how to mark an item as transient (an added item not yet set by the user)\n remove(index) {\n const value = this.value;\n if (index >= 0 && index < this.items.length) {\n this.items.splice(index, 1);\n // update indexes\n for (let i = 0, l = this.items.length; i < l; i++) {\n const item = this.items[i];\n item.index = i;\n item.name = String(i);\n }\n }\n if (Array.isArray(value) && index >= 0 && index < value.length) {\n value.splice(index, 1);\n // TODO trigger onChange only if this item isn't transient\n this.onChange(this);\n }\n }\n [Symbol.iterator]() {\n return this.items[Symbol.iterator]();\n }\n item(index) {\n if (index < 0 || index >= this.value.length) {\n return undefined;\n }\n const item = this.value[index];\n if (this.schema.isObject) {\n return new ManagedObjectProperty(this, this.schema, String(index), item);\n }\n else {\n return new ManagedScalarEntry(this, index);\n }\n }\n /**\n * remove undefined items from the end of the list if any\n */\n trim() {\n while (this.items[this.items.length - 1] === undefined) {\n this.items.pop();\n }\n }\n}\nexport class ManageObjectEntry extends ManagedObjectBase {\n index;\n key;\n constructor(parent, index) {\n super(parent, parent.schema, String(index));\n this.index = index;\n if (parent.value[index] === undefined) {\n parent.value[index] = {};\n }\n this.key = this.name + '@' + Date.now();\n }\n get isListItem() {\n return true;\n }\n set value(value) {\n this.parent.value[this.index] = value;\n }\n get value() {\n return this.parent.value[this.index];\n }\n}\nexport class ManagedScalarEntry extends Node {\n index;\n key;\n constructor(parent, index) {\n super(parent, parent.schema, String(index));\n this.index = index;\n if (parent.value[index] === undefined && parent.schema.defaultValue !== undefined) {\n parent.value[index] = parent.schema.defaultValue;\n }\n this.key = this.name + '@' + Date.now();\n }\n get isScalar() {\n return true;\n }\n get isListItem() {\n return true;\n }\n set value(value) {\n this.parent.value[this.index] = value;\n }\n get value() {\n return this.parent.value[this.index];\n }\n getInputType() {\n return getInputType(this.name, this.schema);\n }\n}\n//# sourceMappingURL=ManagedObject.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { FormItem } from \"@vertesia/ui/core\";\nexport function FormLabel({ label, required, children }) {\n return (_jsx(FormItem, { label: label, required: required, children: children }));\n}\nexport function FormHelper({ children }) {\n return (_jsx(\"p\", { className: \"mt-2 text-sm text-gray-500\", children: children }));\n}\nexport function FormError({ children }) {\n return (_jsx(\"p\", { className: \"mt-2 text-sm text-red-600\", children: children }));\n}\n//# sourceMappingURL=fields.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ObjectWalker } from \"@vertesia/json\";\nimport { useEffect, useState } from \"react\";\nconst st_code = \"bg-gray-100 dark:bg-slate-800 whitespace-pre-wrap p-4 rounded-lg font-mono\";\nconst st_punct = \"text-pink-500 dark:text-pink-400\";\nconst st_symbol = \"text-purple-500 dark:text-purple-400\";\nconst st_number = \"text-green-500 dark:text-green-400\";\nconst st_string = \"text-orange-500 dark:text-orange-400\";\nconst st_key = \"text-blue-500 dark:text-blue-400\";\nconst defaultClassMap = {\n code: st_code,\n comma: st_punct,\n assign: st_punct,\n startObject: st_punct,\n endObject: st_punct,\n startArray: st_punct,\n endArray: st_punct,\n boolean: st_symbol,\n null: st_symbol,\n key: st_key,\n index: st_key,\n string: st_string,\n number: st_number,\n};\nclass Block {\n renderer;\n parent;\n key;\n indent;\n result = [];\n constructor(renderer, parent, key, indent) {\n this.renderer = renderer;\n this.parent = parent;\n this.key = key;\n this.indent = indent;\n }\n get classMap() {\n return this.renderer.classMap;\n }\n writeKey(key) {\n const type = typeof key;\n if (type === 'string') {\n if (this.result.length > 0) {\n this.result.push(`<span class='${this.classMap.comma}'>,\\n</span>`);\n }\n this.indent && this.result.push(this.indent);\n this.result.push(`<span class=\"${this.classMap.key}\">\"${key}\"</span><span class='${this.classMap.assign}'>: </span>`);\n }\n else if (type === 'number') {\n if (this.result.length > 0) {\n this.result.push(`<span class='${this.classMap.comma}'>,\\n</span>`);\n }\n this.indent && this.result.push(this.indent);\n }\n }\n pushValue(key, value) {\n this.writeKey(key);\n if (value === null) {\n this.result.push(`<span class='${this.classMap.null}'>null</span>`);\n }\n else if (value instanceof Block) {\n this.result.push(value.renderStart() + value.renderValue() + value.renderEnd());\n }\n else {\n let valueClass;\n const type = typeof value;\n if (type === 'string') {\n value = `\"${value}\"`;\n value = value.replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\");\n valueClass = this.classMap.string;\n }\n else if (type === 'number') {\n valueClass = this.classMap.number;\n }\n else if (type === 'boolean') {\n valueClass = this.classMap.boolean;\n }\n this.result.push(`<span class='${valueClass}'>${value}</span>`);\n }\n }\n renderValue() {\n return this.result.join('');\n }\n}\nclass ObjectBlock extends Block {\n constructor(renderer, parent, key, indent) {\n super(renderer, parent, key, indent);\n }\n renderStart() {\n return `<span class='${this.classMap.startObject}'>{\\n</span>`;\n }\n renderEnd() {\n const NL = this.result.length > 0 ? '\\n' : '';\n return `<span class='${this.classMap.endObject}'>${NL}${this.parent?.indent || ''}}</span>`;\n }\n}\nclass ArrayBlock extends Block {\n constructor(renderer, parent, key, indent) {\n super(renderer, parent, key, indent);\n }\n renderStart() {\n return `<span class='${this.classMap.startArray}'>[\\n</span>`;\n }\n renderEnd() {\n const NL = this.result.length > 0 ? '\\n' : '';\n return `<span class='${this.classMap.endArray}'>${NL}${this.parent?.indent || ''}]</span>`;\n }\n}\nclass JsonRenderer {\n classMap;\n tab;\n stack = [];\n block = new ObjectBlock(this, undefined, '', '');\n constructor(classMap = defaultClassMap, tab = ' ') {\n this.classMap = classMap;\n this.tab = tab;\n }\n onStartObject(key) {\n const nested = new ObjectBlock(this, this.block, key, this.block.indent + this.tab);\n this.stack.push(this.block);\n this.block = nested;\n }\n onEndObject() {\n const currentBlock = this.block;\n this.block = this.stack.pop();\n this.block.pushValue(currentBlock.key, currentBlock);\n }\n onStartIteration(key) {\n const nested = new ArrayBlock(this, this.block, key, this.block.indent + this.tab);\n this.stack.push(this.block);\n this.block = nested;\n }\n onEndIteration() {\n const currentBlock = this.block;\n this.block = this.stack.pop();\n this.block.pushValue(currentBlock.key, currentBlock);\n }\n onValue(key, value) {\n this.block.pushValue(key, value);\n }\n}\nfunction renderJson(json, classMap, className) {\n const renderer = new JsonRenderer(classMap);\n new ObjectWalker().walk(json, renderer);\n const out = renderer.block.renderValue();\n return _jsx(\"div\", { className: className, dangerouslySetInnerHTML: { __html: `<div class='${renderer.classMap.code}' style='overflow-x: scroll'>${out}</div>` } });\n}\nexport function JSONCode({ data, className, classMap }) {\n const [element, setElement] = useState();\n useEffect(() => {\n setElement(renderJson(data, classMap, className));\n }, [data]);\n return element;\n}\n//# sourceMappingURL=JSONCode.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { DotBadge } from \"@vertesia/ui/core\";\nimport clsx from \"clsx\";\nimport { computeTitleFromName } from \"../form/ManagedObject.js\";\nexport function JSONView({ value }) {\n return _jsx(\"div\", { className: \"flex flex-col gap-4\", children: Object.entries(value).map(([key, value]) => _jsx(PropertyElement, { name: key, value: value }, key)) });\n}\nfunction PropertyTitle({ name }) {\n return (_jsx(\"div\", { className: 'text-md font-semibold', children: computeTitleFromName(name) }));\n}\nfunction BlockElement({ children, className }) {\n return (_jsx(\"div\", { className: clsx('flex flex-col gap-4 py-2 pl-4 border-l-4 border-l-solid border-l-slate-100 dark:border-l-slate-600', className), children: children }));\n}\nfunction PropertyElement({ name, value }) {\n const info = getValueInfo(value);\n switch (info.type) {\n case ValueType.Inline:\n return (_jsxs(\"div\", { className: 'w-full flex gap-2', children: [_jsx(PropertyTitle, { name: name + ':' }), _jsx(\"p\", { children: info.value })] }));\n case ValueType.Paragraph:\n return (_jsxs(\"div\", { children: [_jsx(PropertyTitle, { name: name }), _jsx(\"p\", { children: info.value })] }));\n case ValueType.Prose:\n return (_jsxs(\"div\", { className: \"prose dark:prose-invert\", children: [_jsx(PropertyTitle, { name: name }), _jsx(\"div\", { className: 'vprose dark:prose-invert', children: info.value })] }));\n case ValueType.Array:\n return (_jsx(ArrayProperty, { name: name, value: value }));\n case ValueType.Object:\n return (_jsxs(\"div\", { children: [_jsx(PropertyTitle, { name: name }), _jsx(BlockElement, { className: 'mt-2', children: Object.entries(value).map(([key, value]) => _jsx(PropertyElement, { name: key, value: value }, key)) })] }));\n }\n}\nfunction ArrayProperty({ name, value }) {\n const inlineLength = value.join(' ').length;\n const itemMediumLength = inlineLength / value.length;\n const isInline = (typeof value[0] === 'string') && (inlineLength < 80 || inlineLength < 400 && itemMediumLength < 32);\n const useBullet = value.length > 9;\n return isInline ? (_jsxs(\"div\", { className: 'flex gap-2 flex-wrap', children: [name && _jsx(PropertyTitle, { name: name + ':' }), value.map((item, index) => _jsx(DotBadge, { children: String(item) }, index))] })) : (_jsxs(\"div\", { children: [name && _jsx(PropertyTitle, { name: name }), _jsx(\"div\", { className: 'flex flex-col gap-2', children: value.map((value, index) => _jsx(ItemProperty, { index: index, value: value, useBullet: useBullet }, index)) })] }));\n}\nfunction ItemProperty({ index, value, useBullet }) {\n const bullet = useBullet ? _jsx(\"span\", { className: 'text-xl', children: \"\\u2022\" }) : _jsxs(\"span\", { children: [index + 1, \".\"] });\n const info = getValueInfo(value);\n let content;\n switch (info.type) {\n case ValueType.Object:\n content = _jsx(BlockElement, { children: Object.entries(value).map(([key, value]) => _jsx(PropertyElement, { name: key, value: value }, key)) });\n break;\n case ValueType.Array:\n content = _jsx(ArrayProperty, { value: value });\n break;\n case ValueType.Prose:\n content = _jsx(\"div\", { className: \"prose dark:prose-invert\", children: info.value });\n break;\n default:\n content = _jsx(\"div\", { children: info.value });\n break;\n }\n return (_jsxs(\"div\", { className: 'flex gap-4 hover:bg-slate-50 dark:hover:bg-slate-800 py-2 pr-2 pl-4', children: [_jsx(\"div\", { className: 'font-semibold text-gray-600 dark:text-gray-400', children: bullet }), _jsx(\"div\", { children: content })] }));\n}\nvar ValueType;\n(function (ValueType) {\n ValueType[ValueType[\"Inline\"] = 0] = \"Inline\";\n ValueType[ValueType[\"Paragraph\"] = 1] = \"Paragraph\";\n ValueType[ValueType[\"Prose\"] = 2] = \"Prose\";\n ValueType[ValueType[\"Array\"] = 3] = \"Array\";\n ValueType[ValueType[\"Object\"] = 4] = \"Object\";\n})(ValueType || (ValueType = {}));\nfunction getValueInfo(value) {\n if (value == null) {\n return {\n value: '-',\n type: ValueType.Inline\n };\n }\n if (Array.isArray(value)) {\n return {\n value,\n type: ValueType.Array\n };\n }\n const type = typeof value;\n if (type === 'string') {\n const len = value.length;\n let type;\n if (len < 80) {\n type = ValueType.Inline;\n }\n else if (len > 400) {\n type = ValueType.Prose;\n }\n else {\n type = ValueType.Paragraph;\n value = value.replace(/(?:\\n\\n)+/g, '\\n\\n');\n }\n return { type, value };\n }\n else if (type === 'number' || type === 'boolean') {\n return {\n value: String(value),\n type: ValueType.Inline\n };\n }\n else {\n return {\n value,\n type: ValueType.Object\n };\n }\n}\n//# sourceMappingURL=JSONView.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { JSONCode } from './JSONCode.js';\nimport { JSONView } from './JSONView.js';\nexport function JSONDisplay({ value, viewCode = false }) {\n if (!value) {\n return (_jsx(\"pre\", { className: \"whitespace-pre-wrap\", children: \"No Data to display\" }));\n }\n return (_jsx(\"div\", { className: 'relative w-full', children: viewCode ? _jsx(JSONCode, { data: value }) : _jsx(JSONView, { value: value }) }));\n}\n//# sourceMappingURL=JSONDisplay.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { createContext, useContext, useMemo } from \"react\";\nexport class CodeBlockRendererRegistry {\n components = {};\n registerComponent(language, component) {\n this.components[language] = component;\n }\n getComponent(language) {\n return this.components[language];\n }\n}\nconst Context = createContext(null);\n/**\n * the compoennts must be memoized to avoid rerendering the provider unnecessarily\n * @param param0\n * @returns\n */\nexport function CodeBlockRendererProvider({ components, children }) {\n const registry = useMemo(() => {\n const registry = new CodeBlockRendererRegistry();\n for (const [language, component] of Object.entries(components)) {\n registry.registerComponent(language, component);\n }\n return registry;\n }, [components]);\n return (_jsx(_Fragment, { children: _jsx(Context.Provider, { value: registry, children: children }) }));\n}\nexport function useCodeBlockRendererRegistry() {\n return useContext(Context);\n}\nexport function useCodeBlockComponent(language) {\n const registry = useContext(Context);\n if (registry) {\n return registry.getComponent(language);\n }\n return undefined;\n}\n//# sourceMappingURL=CodeBlockRendering.js.map","import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nexport function cn(...inputs) {\n return twMerge(clsx(inputs));\n}\n//# sourceMappingURL=utils.js.map","import { jwtDecode } from 'jwt-decode';\nimport { createContext, useContext } from 'react';\nimport { VertesiaClient } from '@vertesia/client';\nimport { Env } from '@vertesia/ui/env';\nimport { getComposableToken } from './auth/composable';\nimport { getFirebaseAuth } from './auth/firebase';\nimport { TypeRegistry } from './TypeRegistry';\nimport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from './constants';\nexport { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY };\nclass UserSession {\n isLoading = true;\n client;\n authError;\n authToken;\n typeRegistry;\n setSession;\n lastSelectedAccount;\n lastSelectedProject;\n onboardingComplete;\n constructor(client, setSession) {\n if (client) {\n this.client = client;\n }\n else {\n this.client = new VertesiaClient({\n serverUrl: Env.endpoints.studio,\n storeUrl: Env.endpoints.zeno,\n tokenServerUrl: Env.endpoints.sts\n });\n }\n if (setSession) {\n this.setSession = setSession;\n }\n this.logout = this.logout.bind(this);\n }\n get store() {\n return this.client.store;\n }\n get user() {\n return this.authToken;\n }\n get account() {\n return this.authToken?.account;\n }\n get project() {\n return this.authToken?.project;\n }\n get accounts() {\n return this.authToken?.accounts;\n }\n get authCallback() {\n return this.rawAuthToken.then(token => `Bearer ${token}`);\n }\n get rawAuthToken() {\n return getComposableToken().then(res => {\n const token = res?.rawToken;\n if (!token) {\n throw new Error('No token available');\n }\n this.authToken = jwtDecode(token);\n return token;\n });\n }\n signOut() {\n this.logout();\n }\n getAccount() {\n return this.authToken?.account;\n }\n async login(token) {\n this.authError = undefined;\n this.isLoading = false;\n this.client.withAuthCallback(() => this.authCallback);\n this.authToken = jwtDecode(token);\n console.log(`Logging in as ${this.authToken?.name} with account ${this.authToken?.account.name} (${this.authToken?.account.id}, and project ${this.authToken?.project?.name} (${this.authToken?.project?.id})`);\n //store selected account in local storage\n localStorage.setItem(LastSelectedAccountId_KEY, this.authToken.account.id);\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + this.authToken.account.id, this.authToken.project?.id ?? '');\n // notify the host app of the login\n Env.onLogin?.(this.authToken);\n // Independent async calls\n await Promise.all([\n this._loadTypes(),\n this.fetchOnboardingStatus(),\n ]);\n return Promise.resolve();\n }\n isLoggedIn() {\n return !!this.authToken;\n }\n logout() {\n console.log('Logging out');\n if (this.authToken) {\n getFirebaseAuth().signOut();\n }\n this.authError = undefined;\n this.isLoading = false;\n this.authToken = undefined;\n this.typeRegistry = undefined;\n this.setSession = undefined;\n this.client.withAuthCallback(undefined);\n }\n async switchAccount(targetAccountId) {\n localStorage.setItem(LastSelectedAccountId_KEY, targetAccountId);\n if (this) {\n if (this.account && this.project) {\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + this.account.id, this.project.id);\n }\n else if (this.account) {\n localStorage.removeItem(LastSelectedProjectId_KEY + '-' + this.account.id);\n }\n }\n window.location.replace('/?a=' + targetAccountId);\n }\n async switchProject(targetProjectId) {\n if (this.account) {\n localStorage.setItem(LastSelectedProjectId_KEY + '-' + this.account.id, targetProjectId);\n }\n window.location.replace('/?a=' + this.account?.id + '&p=' + targetProjectId);\n }\n async _loadTypes() {\n if (this.project) {\n return this.store.types.list({}, { layout: true }).then(types => this.typeRegistry = new TypeRegistry(types)).catch(err => {\n console.error('Failed to fetch object types', err);\n throw err;\n });\n }\n else {\n console.log('No project selected');\n }\n }\n async reloadTypes() {\n return this._loadTypes().then(() => {\n this.setSession?.(this.clone());\n });\n }\n async fetchAccounts() {\n return this.client.accounts.list().then(accounts => {\n if (!this.authToken) {\n throw new Error('No token available');\n }\n this.authToken.accounts = accounts;\n this.setSession?.(this.clone());\n }).catch(err => {\n console.error('Failed to fetch accounts', err);\n throw err;\n });\n }\n async fetchOnboardingStatus() {\n if (this.onboardingComplete) {\n console.log('Onboarding already completed');\n return false;\n }\n const previousStatus = this.onboardingComplete;\n try {\n const onboarding = await this.client.account.onboardingProgress();\n this.onboardingComplete = Object.values(onboarding).every(value => value === true);\n if (previousStatus !== this.onboardingComplete) {\n return true;\n }\n this.setSession?.(this.clone());\n }\n catch (error) {\n console.error('Error fetching onboarding status:', error);\n this.onboardingComplete = false;\n this.setSession?.(this.clone());\n }\n return false;\n }\n clone() {\n const session = new UserSession(this.client);\n session.isLoading = this.isLoading;\n session.authError = this.authError;\n session.authToken = this.authToken;\n session.setSession = this.setSession;\n session.lastSelectedAccount = this.lastSelectedAccount;\n session.switchAccount = this.switchAccount;\n session.typeRegistry = this.typeRegistry;\n session.onboardingComplete = this.onboardingComplete;\n return session;\n }\n}\nconst UserSessionContext = createContext(undefined);\nexport function useUserSession() {\n const session = useContext(UserSessionContext);\n if (!session) {\n throw new Error('useUserSession must be used within a UserSessionProvider');\n }\n return session;\n}\nexport { UserSession, UserSessionContext };\n//# sourceMappingURL=UserSession.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { createContext, useContext, useCallback, useRef } from \"react\";\nconst ArtifactUrlCacheContext = createContext(null);\n/**\n * Provider component that maintains a cache of resolved artifact URLs.\n * This prevents re-fetching the same artifact URL multiple times during re-renders.\n */\nexport function ArtifactUrlCacheProvider({ children }) {\n const cacheRef = useRef(new Map());\n const pendingRef = useRef(new Map());\n const getUrl = useCallback((key) => {\n return cacheRef.current.get(key);\n }, []);\n const setUrl = useCallback((key, url) => {\n cacheRef.current.set(key, url);\n }, []);\n const getOrFetch = useCallback(async (key, fetcher) => {\n // Return cached URL if available\n const cached = cacheRef.current.get(key);\n if (cached) {\n return cached;\n }\n // Return pending promise if a fetch is already in progress\n const pending = pendingRef.current.get(key);\n if (pending) {\n return pending;\n }\n // Start new fetch and cache the promise\n const promise = fetcher().then((url) => {\n cacheRef.current.set(key, url);\n pendingRef.current.delete(key);\n return url;\n }).catch((err) => {\n pendingRef.current.delete(key);\n throw err;\n });\n pendingRef.current.set(key, promise);\n return promise;\n }, []);\n const value = React.useMemo(() => ({ getUrl, setUrl, getOrFetch }), [getUrl, setUrl, getOrFetch]);\n return (_jsx(ArtifactUrlCacheContext.Provider, { value: value, children: children }));\n}\n/**\n * Hook to access the artifact URL cache.\n * Returns null if used outside of ArtifactUrlCacheProvider.\n */\nexport function useArtifactUrlCache() {\n return useContext(ArtifactUrlCacheContext);\n}\n/**\n * Generate a cache key for an artifact URL.\n */\nexport function getArtifactCacheKey(runId, path, disposition = \"inline\") {\n return `artifact:${runId}:${path}:${disposition}`;\n}\n/**\n * Generate a cache key for a file URL.\n */\nexport function getFileCacheKey(path) {\n return `file:${path}`;\n}\n//# sourceMappingURL=useArtifactUrlCache.js.map","import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Check, Copy, Download, Loader2, Maximize2, Minimize2, X } from 'lucide-react';\nimport Papa from 'papaparse';\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { VegaEmbed } from 'react-vega';\nimport { cn } from '../../../core/components/libs/utils';\nimport { useUserSession } from '../../../session';\nimport { getArtifactCacheKey, getFileCacheKey, useArtifactUrlCache } from './useArtifactUrlCache';\n// Constants\nconst DEFAULT_CHART_HEIGHT = 280;\nconst DEFAULT_DASHBOARD_HEIGHT = 500;\n// Error display component\nfunction VegaErrorDisplay({ error, chartTitle }) {\n return (_jsx(\"div\", { className: \"flex items-center justify-center h-full bg-red-50 dark:bg-red-950 rounded-md p-4\", children: _jsxs(\"div\", { className: \"text-center\", children: [_jsxs(\"p\", { className: \"text-sm font-medium text-red-600 dark:text-red-400\", children: [\"Cannot render \", chartTitle || 'Vega-Lite', \" chart\"] }), _jsx(\"p\", { className: \"text-xs text-red-500 dark:text-red-500 mt-1 max-w-xs truncate\", children: error })] }) }));\n}\n// Fullscreen dialog component with smooth animations\nfunction FullscreenDialog({ isOpen, onClose, title, description, children, }) {\n return (_jsx(DialogPrimitive.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: \"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm transition-all duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\" }), _jsxs(DialogPrimitive.Content, { className: \"fixed inset-2 sm:inset-4 z-50 flex flex-col bg-white dark:bg-gray-900 rounded-xl shadow-2xl transition-all duration-300 ease-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-98 data-[state=closed]:slide-out-to-bottom-2 data-[state=open]:slide-in-from-bottom-2\", onEscapeKeyDown: onClose, children: [_jsx(DialogPrimitive.Close, { asChild: true, children: _jsx(\"button\", { onClick: onClose, className: \"absolute top-3 right-3 z-10 p-2 rounded-lg bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors duration-150 shadow-sm\", \"aria-label\": \"Close fullscreen\", children: _jsx(X, { className: \"w-5 h-5 text-gray-600 dark:text-gray-300\" }) }) }), _jsx(\"div\", { className: \"flex-1 overflow-auto p-4 sm:p-6 animate-in fade-in-0 duration-500 delay-150\", children: children }), _jsx(\"div\", { className: \"flex items-center justify-between px-4 sm:px-6 py-3 border-t border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/50 rounded-b-xl\", children: _jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(DialogPrimitive.Title, { className: \"text-base font-semibold text-gray-900 dark:text-gray-100\", children: title || 'Dashboard' }), description && (_jsx(DialogPrimitive.Description, { className: \"text-sm text-gray-500 dark:text-gray-400 mt-0.5\", children: description }))] }) })] })] }) }));\n}\n// Calculate height based on spec complexity\nfunction calculateAutoHeight(spec, mode) {\n if (mode === 'chart') {\n return DEFAULT_CHART_HEIGHT;\n }\n // For dashboard mode, try to calculate based on spec structure\n let rowCount = 1;\n if (spec.vconcat) {\n rowCount = Array.isArray(spec.vconcat) ? spec.vconcat.length : 1;\n }\n else if (spec.concat) {\n const columns = spec.columns || 2;\n const items = Array.isArray(spec.concat) ? spec.concat.length : 1;\n rowCount = Math.ceil(items / columns);\n }\n else if (spec.facet) {\n // Faceted charts - estimate based on data\n rowCount = 2; // Default estimate\n }\n // Base height per row + padding\n return Math.max(DEFAULT_DASHBOARD_HEIGHT, rowCount * 280 + 40);\n}\n// Modern color palette - vibrant but professional\nconst CHART_COLORS = {\n // Primary palette - vibrant gradients\n categorical: [\n '#6366f1', // indigo\n '#8b5cf6', // violet\n '#ec4899', // pink\n '#f43f5e', // rose\n '#f97316', // orange\n '#eab308', // yellow\n '#22c55e', // green\n '#14b8a6', // teal\n '#06b6d4', // cyan\n '#3b82f6', // blue\n ],\n // Sequential schemes\n blues: ['#dbeafe', '#93c5fd', '#3b82f6', '#1d4ed8', '#1e3a8a'],\n purples: ['#f3e8ff', '#c4b5fd', '#8b5cf6', '#6d28d9', '#4c1d95'],\n greens: ['#dcfce7', '#86efac', '#22c55e', '#15803d', '#14532d'],\n // Diverging\n diverging: ['#ef4444', '#fca5a5', '#fef3c7', '#86efac', '#22c55e'],\n};\n/**\n * Preprocess a Vega-Lite spec to fix duplicate signal names that occur\n * when params with selections are used in vconcat/hconcat layouts.\n *\n * The issue: Vega-Lite creates internal signals like `paramName_tuple` for\n * point selections. When a param is defined at the root level of a vconcat/hconcat\n * spec, Vega-Lite's compiler creates duplicate signals when propagating the\n * selection to sub-views.\n *\n * Solution: Move selection params from the root level to the first sub-view\n * (where selections typically originate). Cross-view references are preserved\n * so that clicking in one view filters other views.\n */\nfunction fixVegaLiteSelectionParams(spec) {\n // Deep clone the spec to avoid mutations\n const result = JSON.parse(JSON.stringify(spec));\n // Check if this is a concatenated spec with root-level selection params\n const concatKeys = ['vconcat', 'hconcat', 'concat'];\n const hasConcatViews = concatKeys.some(key => Array.isArray(result[key]));\n if (!hasConcatViews) {\n // Not a concatenated spec, no special handling needed\n return result;\n }\n // Check for selection params at the root level\n const rootSelectionParams = [];\n if (Array.isArray(result.params)) {\n for (const param of result.params) {\n if (param && typeof param === 'object' && param.name && param.select) {\n rootSelectionParams.push({ name: param.name, param });\n }\n }\n }\n if (rootSelectionParams.length === 0) {\n // No selection params at root level, no special handling needed\n return result;\n }\n // Strategy: Move the selection param to the first sub-view that has an\n // encoding field matching the selection. Keep cross-view references intact\n // so filtering works across views.\n for (const { name: paramName, param } of rootSelectionParams) {\n const selectFields = param.select?.fields || [];\n const hasLegendBinding = param.select?.bind === 'legend';\n // Find the concat array\n let concatArray = null;\n for (const key of concatKeys) {\n if (Array.isArray(result[key])) {\n concatArray = result[key];\n break;\n }\n }\n if (!concatArray || concatArray.length === 0)\n continue;\n // Find the first view that has the selection field in its encoding\n // This is typically where users click to make selections\n let targetViewIndex = 0;\n for (let i = 0; i < concatArray.length; i++) {\n const view = concatArray[i];\n if (viewHasField(view, selectFields) || (hasLegendBinding && viewHasColorEncoding(view, selectFields))) {\n targetViewIndex = i;\n break;\n }\n }\n // Move the param to the target view\n const targetView = concatArray[targetViewIndex];\n if (!targetView.params) {\n targetView.params = [];\n }\n targetView.params.push(param);\n // Remove the param from root level\n result.params = result.params.filter((p) => p.name !== paramName);\n // Cross-view references are kept intact - Vega-Lite handles signal\n // propagation from the view where the selection is defined to other views\n }\n // Clean up empty params array at root\n if (Array.isArray(result.params) && result.params.length === 0) {\n delete result.params;\n }\n return result;\n}\n/**\n * Apply parameter values to a Vega-Lite spec.\n * Updates the 'value' field of named params, allowing models to set\n * initial values for interactive controls (sliders, dropdowns, etc.).\n * @exported for testing\n */\nexport function applyParameterValues(spec, parameterValues) {\n if (!parameterValues || Object.keys(parameterValues).length === 0) {\n return spec;\n }\n const result = JSON.parse(JSON.stringify(spec));\n // Helper to update params in a view\n const updateParams = (params) => {\n for (const param of params) {\n if (param && typeof param === 'object' && param.name && param.name in parameterValues) {\n param.value = parameterValues[param.name];\n }\n }\n };\n // Update root-level params\n if (Array.isArray(result.params)) {\n updateParams(result.params);\n }\n // Update params in nested views (vconcat, hconcat, concat)\n const updateNestedViews = (views) => {\n if (!Array.isArray(views))\n return;\n for (const view of views) {\n if (view && Array.isArray(view.params)) {\n updateParams(view.params);\n }\n // Recursively handle nested concatenations\n if (view.vconcat)\n updateNestedViews(view.vconcat);\n if (view.hconcat)\n updateNestedViews(view.hconcat);\n if (view.concat)\n updateNestedViews(view.concat);\n // Handle layers\n if (Array.isArray(view.layer)) {\n for (const layer of view.layer) {\n if (layer && Array.isArray(layer.params)) {\n updateParams(layer.params);\n }\n }\n }\n }\n };\n if (result.vconcat)\n updateNestedViews(result.vconcat);\n if (result.hconcat)\n updateNestedViews(result.hconcat);\n if (result.concat)\n updateNestedViews(result.concat);\n if (Array.isArray(result.layer)) {\n for (const layer of result.layer) {\n if (layer && Array.isArray(layer.params)) {\n updateParams(layer.params);\n }\n }\n }\n return result;\n}\n/**\n * Check if a view has encoding using any of the specified fields.\n */\nfunction viewHasField(view, fields) {\n if (!view || !view.encoding)\n return false;\n for (const field of fields) {\n for (const channel of Object.values(view.encoding)) {\n if (channel && typeof channel === 'object' && channel.field === field) {\n return true;\n }\n }\n }\n // Also check nested layers\n if (Array.isArray(view.layer)) {\n for (const layer of view.layer) {\n if (viewHasField(layer, fields))\n return true;\n }\n }\n return false;\n}\n/**\n * Check if a view has color encoding using any of the specified fields.\n */\nfunction viewHasColorEncoding(view, fields) {\n if (!view)\n return false;\n const checkEncoding = (encoding) => {\n if (!encoding)\n return false;\n const colorField = encoding.color?.field;\n return colorField && fields.includes(colorField);\n };\n if (checkEncoding(view.encoding))\n return true;\n // Check nested layers\n if (Array.isArray(view.layer)) {\n for (const layer of view.layer) {\n if (checkEncoding(layer.encoding))\n return true;\n }\n }\n return false;\n}\n/**\n * Walk the Vega-Lite spec and find all artifact: URL references in data.url fields.\n * Returns an array of references with their paths in the spec tree.\n */\nfunction findArtifactReferences(spec, currentPath = []) {\n const references = [];\n if (!spec || typeof spec !== 'object') {\n return references;\n }\n // Check if this object has a data.url that's an artifact reference\n if (spec.data && typeof spec.data === 'object') {\n const url = spec.data.url;\n if (typeof url === 'string' && url.startsWith('artifact:')) {\n references.push({\n path: [...currentPath, 'data'],\n artifactPath: url.replace(/^artifact:/, '').trim(),\n });\n }\n }\n // Recursively check nested objects (layer, vconcat, hconcat, concat, spec, etc.)\n const nestedKeys = ['layer', 'vconcat', 'hconcat', 'concat', 'spec', 'repeat', 'facet'];\n for (const key of nestedKeys) {\n if (key in spec) {\n const value = spec[key];\n if (Array.isArray(value)) {\n value.forEach((item, index) => {\n references.push(...findArtifactReferences(item, [...currentPath, key, String(index)]));\n });\n }\n else if (typeof value === 'object' && value !== null) {\n references.push(...findArtifactReferences(value, [...currentPath, key]));\n }\n }\n }\n return references;\n}\n/**\n * Deep clone and update the spec by replacing artifact URLs with resolved data values.\n */\nfunction replaceArtifactData(spec, resolvedData) {\n const result = JSON.parse(JSON.stringify(spec));\n for (const [pathKey, data] of resolvedData) {\n const path = pathKey.split('.');\n let current = result;\n console.log(`Replacing artifact data at path: ${pathKey}, path parts:`, path);\n // Navigate to the parent of the data object\n for (let i = 0; i < path.length - 1; i++) {\n if (current[path[i]] === undefined) {\n console.warn(`Path navigation failed at step ${i}, key \"${path[i]}\" not found in:`, Object.keys(current));\n break;\n }\n current = current[path[i]];\n }\n // Replace data.url with data.values\n const lastKey = path[path.length - 1];\n if (current[lastKey] && typeof current[lastKey] === 'object') {\n const oldUrl = current[lastKey].url;\n delete current[lastKey].url;\n current[lastKey].values = data;\n console.log(`Replaced artifact URL \"${oldUrl}\" with ${data.length} data rows`);\n }\n else {\n console.warn(`Could not find data object at path ${pathKey}. current[${lastKey}]:`, current[lastKey]);\n }\n }\n return result;\n}\n// Get dark mode config for Vega with enhanced styling\nfunction getDarkModeConfig(isDark) {\n const baseConfig = {\n background: 'transparent',\n view: { stroke: 'transparent' },\n // Modern color range\n range: {\n category: CHART_COLORS.categorical,\n diverging: CHART_COLORS.diverging,\n heatmap: CHART_COLORS.purples,\n ramp: CHART_COLORS.blues,\n },\n // Enable tooltips by default for all mark types with enhanced styling\n mark: { tooltip: true },\n bar: {\n tooltip: true,\n cornerRadiusTopLeft: 4,\n cornerRadiusTopRight: 4,\n },\n line: {\n tooltip: true,\n strokeWidth: 2.5,\n strokeCap: 'round',\n },\n point: {\n tooltip: true,\n size: 60,\n filled: true,\n },\n area: {\n tooltip: true,\n fillOpacity: 0.7,\n line: true,\n },\n rect: {\n tooltip: true,\n cornerRadius: 2,\n },\n arc: {\n tooltip: true,\n cornerRadius: 4,\n },\n circle: {\n tooltip: true,\n size: 80,\n },\n };\n if (isDark) {\n return {\n ...baseConfig,\n axis: {\n labelColor: '#a1a1aa',\n titleColor: '#e4e4e7',\n gridColor: '#3f3f46',\n domainColor: '#52525b',\n tickColor: '#52525b',\n labelFont: 'Inter, system-ui, sans-serif',\n titleFont: 'Inter, system-ui, sans-serif',\n labelFontSize: 11,\n titleFontSize: 12,\n titleFontWeight: 500,\n },\n legend: {\n labelColor: '#a1a1aa',\n titleColor: '#e4e4e7',\n labelFont: 'Inter, system-ui, sans-serif',\n titleFont: 'Inter, system-ui, sans-serif',\n labelFontSize: 11,\n titleFontSize: 12,\n symbolSize: 100,\n },\n title: {\n color: '#fafafa',\n font: 'Inter, system-ui, sans-serif',\n fontSize: 14,\n fontWeight: 600,\n },\n };\n }\n return {\n ...baseConfig,\n axis: {\n labelColor: '#71717a',\n titleColor: '#3f3f46',\n gridColor: '#e4e4e7',\n domainColor: '#d4d4d8',\n tickColor: '#d4d4d8',\n labelFont: 'Inter, system-ui, sans-serif',\n titleFont: 'Inter, system-ui, sans-serif',\n labelFontSize: 11,\n titleFontSize: 12,\n titleFontWeight: 500,\n },\n legend: {\n labelColor: '#71717a',\n titleColor: '#3f3f46',\n labelFont: 'Inter, system-ui, sans-serif',\n titleFont: 'Inter, system-ui, sans-serif',\n labelFontSize: 11,\n titleFontSize: 12,\n symbolSize: 100,\n },\n title: {\n color: '#18181b',\n font: 'Inter, system-ui, sans-serif',\n fontSize: 14,\n fontWeight: 600,\n },\n };\n}\nexport const VegaLiteChart = memo(function VegaLiteChart({ spec, artifactRunId }) {\n const { title, description, spec: vegaSpec, options } = spec;\n const [isExporting, setIsExporting] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const [error, setError] = useState(null);\n const [isFullscreen, setIsFullscreen] = useState(false);\n const viewRef = useRef(null);\n const fullscreenViewRef = useRef(null);\n const containerRef = useRef(null);\n // Artifact resolution state\n const { client } = useUserSession();\n const urlCache = useArtifactUrlCache();\n const [resolvedSpec, setResolvedSpec] = useState(null);\n const [isLoadingArtifacts, setIsLoadingArtifacts] = useState(false);\n const [artifactError, setArtifactError] = useState(null);\n // Determine mode and settings\n const mode = options?.mode || 'chart';\n const isDashboard = mode === 'dashboard';\n const showFullscreenButton = options?.enableFullscreen ?? isDashboard;\n // Calculate height\n const baseHeight = options?.height || calculateAutoHeight(vegaSpec, mode);\n // Resolve artifact URLs in the spec\n useEffect(() => {\n const references = findArtifactReferences(vegaSpec);\n // If no artifact references, use original spec\n if (references.length === 0) {\n setResolvedSpec(vegaSpec);\n setIsLoadingArtifacts(false);\n setArtifactError(null);\n return;\n }\n let cancelled = false;\n setIsLoadingArtifacts(true);\n setArtifactError(null);\n const resolveArtifacts = async () => {\n const resolvedData = new Map();\n for (const ref of references) {\n try {\n const pathKey = ref.path.join('.');\n let url;\n // Determine if this is a shorthand path or full path\n if (artifactRunId && !ref.artifactPath.startsWith('agents/')) {\n // Shorthand path - use artifact API\n const cacheKey = getArtifactCacheKey(artifactRunId, ref.artifactPath, 'inline');\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, ref.artifactPath, 'inline');\n return result.url;\n });\n }\n else {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, ref.artifactPath, 'inline');\n url = result.url;\n }\n }\n else {\n // Full path - use files API\n const cacheKey = getFileCacheKey(ref.artifactPath);\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getDownloadUrl(ref.artifactPath);\n return result.url;\n });\n }\n else {\n const result = await client.files.getDownloadUrl(ref.artifactPath);\n url = result.url;\n }\n }\n // Fetch the data from the resolved URL\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to fetch artifact data: ${response.statusText}`);\n }\n // Detect CSV files by artifact path extension\n const isCsv = ref.artifactPath.toLowerCase().endsWith('.csv');\n let data;\n if (isCsv) {\n // Parse CSV to JSON array\n const csvText = await response.text();\n const parseResult = Papa.parse(csvText, {\n header: true,\n skipEmptyLines: true,\n dynamicTyping: true, // Auto-convert numbers and booleans\n });\n if (parseResult.errors.length > 0) {\n console.warn(`CSV parse warnings for ${ref.artifactPath}:`, parseResult.errors);\n }\n data = parseResult.data;\n }\n else {\n // Parse as JSON\n const jsonData = await response.json();\n data = Array.isArray(jsonData) ? jsonData : [jsonData];\n }\n // Log for debugging\n console.log(`Artifact ${ref.artifactPath}: loaded ${data.length} rows`);\n // Check for empty data\n if (!data || data.length === 0) {\n console.warn(`Artifact ${ref.artifactPath}: returned empty data`);\n }\n resolvedData.set(pathKey, data);\n }\n catch (err) {\n console.error(`Failed to resolve artifact: ${ref.artifactPath}`, err);\n if (!cancelled) {\n setArtifactError(`Failed to load data from artifact: ${ref.artifactPath}`);\n }\n return;\n }\n }\n if (!cancelled) {\n const newSpec = replaceArtifactData(vegaSpec, resolvedData);\n // Log the resolved spec for debugging\n console.log('Resolved spec with artifact data:', JSON.stringify(newSpec).slice(0, 500) + '...');\n setResolvedSpec(newSpec);\n setIsLoadingArtifacts(false);\n }\n };\n resolveArtifacts();\n return () => {\n cancelled = true;\n };\n }, [vegaSpec, artifactRunId, client, urlCache]);\n // Detect dark mode\n const [isDarkMode, setIsDarkMode] = useState(false);\n useEffect(() => {\n const checkDarkMode = () => {\n setIsDarkMode(document.documentElement.classList.contains('dark'));\n };\n checkDarkMode();\n const observer = new MutationObserver(checkDarkMode);\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });\n return () => observer.disconnect();\n }, []);\n // Track container width for responsive sizing\n const [containerWidth, setContainerWidth] = useState(0);\n useEffect(() => {\n if (!containerRef.current)\n return;\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContainerWidth(entry.contentRect.width);\n }\n });\n resizeObserver.observe(containerRef.current);\n // Initial width\n setContainerWidth(containerRef.current.clientWidth);\n return () => resizeObserver.disconnect();\n }, []);\n // Check if there are artifact references that need resolution\n const hasArtifactReferences = useMemo(() => {\n return findArtifactReferences(vegaSpec).length > 0;\n }, [vegaSpec]);\n // Memoize the processed spec to fix Vega-Lite selection param issues\n // This handles the duplicate signal problem in concatenated views\n const processedSpec = useMemo(() => {\n // If there are artifact references, we must wait for resolvedSpec\n // Don't fall back to vegaSpec which contains artifact: URLs\n if (hasArtifactReferences && !resolvedSpec) {\n return null;\n }\n let specToUse = resolvedSpec || vegaSpec;\n if (!specToUse)\n return null;\n // Apply parameter values if provided (allows model to set initial slider/dropdown values)\n if (options?.parameterValues) {\n specToUse = applyParameterValues(specToUse, options.parameterValues);\n }\n return fixVegaLiteSelectionParams(specToUse);\n }, [resolvedSpec, vegaSpec, hasArtifactReferences, options?.parameterValues]);\n // Scale widths in concatenated views to fit container\n const scaleSpecWidths = useCallback((spec, availableWidth) => {\n if (!spec || typeof spec !== 'object')\n return spec;\n // Handle hconcat - distribute width among children\n if (spec.hconcat && Array.isArray(spec.hconcat)) {\n const childCount = spec.hconcat.length;\n const spacing = spec.spacing ?? 10;\n const totalSpacing = spacing * (childCount - 1);\n const widthPerChild = Math.floor((availableWidth - totalSpacing) / childCount);\n return {\n ...spec,\n hconcat: spec.hconcat.map((child) => scaleSpecWidths(child, widthPerChild)),\n };\n }\n // Handle vconcat - each child gets full width\n if (spec.vconcat && Array.isArray(spec.vconcat)) {\n return {\n ...spec,\n vconcat: spec.vconcat.map((child) => scaleSpecWidths(child, availableWidth)),\n };\n }\n // Handle generic concat with columns\n if (spec.concat && Array.isArray(spec.concat)) {\n const columns = spec.columns ?? spec.concat.length;\n const spacing = spec.spacing ?? 10;\n const totalSpacing = spacing * (columns - 1);\n const widthPerChild = Math.floor((availableWidth - totalSpacing) / columns);\n return {\n ...spec,\n concat: spec.concat.map((child) => scaleSpecWidths(child, widthPerChild)),\n };\n }\n // For leaf views, set width if it's \"container\" or larger than available\n const currentWidth = spec.width;\n if (currentWidth === 'container' || (typeof currentWidth === 'number' && currentWidth > availableWidth)) {\n return { ...spec, width: availableWidth };\n }\n return spec;\n }, []);\n // Build the full Vega-Lite spec with defaults\n const buildFullSpec = useCallback((height, forFullscreen = false) => {\n if (!processedSpec)\n return null;\n const config = getDarkModeConfig(isDarkMode);\n // Use measured container width, window width for fullscreen (capped), or fallback\n const calculatedWidth = forFullscreen\n ? (typeof window !== 'undefined' ? Math.min(window.innerWidth - 80, 1400) : 1200)\n : (containerWidth > 0 ? containerWidth - 24 : 500);\n // Check if this is a concatenated view - autosize 'fit' only works for single/layered views\n const isConcatenatedView = 'vconcat' in processedSpec || 'hconcat' in processedSpec || 'concat' in processedSpec;\n // For concatenated views, use 'pad' which works correctly; for single views use 'fit'\n const autosize = isConcatenatedView\n ? { type: 'pad', contains: 'padding' }\n : { type: 'fit', contains: 'padding' };\n // Scale widths for concatenated views to fit container\n let scaledSpec = processedSpec;\n if (isConcatenatedView && calculatedWidth) {\n scaledSpec = scaleSpecWidths(processedSpec, calculatedWidth);\n }\n // Replace \"container\" width with our measured width - \"container\" relies on CSS which may not be ready\n const specWidth = scaledSpec.width;\n const width = isConcatenatedView ? undefined : (specWidth === 'container' ? calculatedWidth : (specWidth ?? calculatedWidth));\n // Destructure to remove width from spec so we can control it (only for non-concat views)\n const { width: _specWidth, ...specWithoutWidth } = scaledSpec;\n return {\n $schema: 'https://vega.github.io/schema/vega-lite/v6.json',\n ...(!isConcatenatedView && width ? { width } : {}),\n height: forFullscreen ? undefined : height,\n autosize,\n ...(isConcatenatedView ? scaledSpec : specWithoutWidth),\n // Override title if provided at top level\n ...(title && !processedSpec.title ? { title } : {}),\n // Apply theme config\n config: {\n ...config,\n ...processedSpec.config,\n },\n };\n }, [processedSpec, title, isDarkMode, containerWidth, scaleSpecWidths]);\n const handleCopy = useCallback(async () => {\n const view = isFullscreen ? fullscreenViewRef.current : viewRef.current;\n if (!view || isCopied)\n return;\n try {\n const canvas = await view.toCanvas(2);\n canvas.toBlob(async (blob) => {\n if (blob) {\n await navigator.clipboard.write([\n new ClipboardItem({ 'image/png': blob })\n ]);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }\n }, 'image/png');\n }\n catch (err) {\n console.error('Failed to copy chart:', err);\n }\n }, [isCopied, isFullscreen]);\n const handleExport = useCallback(async () => {\n const view = isFullscreen ? fullscreenViewRef.current : viewRef.current;\n if (!view || isExporting)\n return;\n setIsExporting(true);\n try {\n const url = await view.toImageURL('png', 2);\n const link = document.createElement('a');\n link.download = `${title || 'chart'}.png`;\n link.href = url;\n link.click();\n }\n catch (err) {\n console.error('Failed to export chart:', err);\n }\n finally {\n setIsExporting(false);\n }\n }, [title, isExporting, isFullscreen]);\n const handleNewView = useCallback((view) => {\n viewRef.current = view;\n setError(null);\n }, []);\n const handleFullscreenNewView = useCallback((view) => {\n fullscreenViewRef.current = view;\n }, []);\n const handleError = useCallback((err) => {\n console.error('Vega-Lite rendering error:', err);\n setError(err instanceof Error ? err.message : 'Unknown error');\n }, []);\n const toggleFullscreen = useCallback(() => {\n setIsFullscreen(prev => !prev);\n }, []);\n // Clear error when spec changes\n useEffect(() => {\n setError(null);\n }, [vegaSpec]);\n // Toolbar component (reused in both views)\n const Toolbar = ({ className }) => (_jsxs(\"div\", { className: cn(\"flex items-center gap-2\", className), children: [_jsxs(\"button\", { onClick: handleCopy, disabled: isCopied, className: \"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 flex items-center gap-1\", title: \"Copy to clipboard\", children: [isCopied ? _jsx(Check, { className: \"w-3 h-3\" }) : _jsx(Copy, { className: \"w-3 h-3\" }), isCopied ? 'Copied' : 'Copy'] }), _jsxs(\"button\", { onClick: handleExport, disabled: isExporting, className: \"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1\", title: \"Export as PNG\", children: [_jsx(Download, { className: \"w-3 h-3\" }), isExporting ? 'Exporting...' : 'Export'] }), showFullscreenButton && (_jsxs(\"button\", { onClick: toggleFullscreen, className: \"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors flex items-center gap-1\", title: isFullscreen ? \"Exit fullscreen\" : \"Fullscreen\", children: [isFullscreen ? _jsx(Minimize2, { className: \"w-3 h-3\" }) : _jsx(Maximize2, { className: \"w-3 h-3\" }), isFullscreen ? 'Exit' : 'Fullscreen'] }))] }));\n // Show loading state when resolving artifacts\n // Also show loading if we have artifact refs but haven't resolved them yet\n // (covers the gap before the effect runs)\n if (isLoadingArtifacts || (hasArtifactReferences && !resolvedSpec)) {\n return (_jsx(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm\", children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-3\", children: [_jsx(\"div\", { className: \"flex items-center justify-between\", children: _jsx(\"span\", { className: \"font-medium text-sm text-gray-900 dark:text-gray-100\", children: title || 'Chart' }) }), _jsx(\"div\", { className: \"flex items-center justify-center bg-gray-50 dark:bg-gray-800 rounded\", style: { width: '100%', height: baseHeight }, children: _jsxs(\"div\", { className: \"flex items-center gap-2 text-gray-500 dark:text-gray-400\", children: [_jsx(Loader2, { className: \"w-5 h-5 animate-spin\" }), _jsx(\"span\", { className: \"text-sm\", children: \"Loading data from artifacts...\" })] }) })] }) }));\n }\n // Show artifact error state\n if (artifactError) {\n return (_jsx(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm\", children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-3\", children: [_jsx(\"div\", { className: \"flex items-center justify-between\", children: _jsx(\"span\", { className: \"font-medium text-sm text-gray-900 dark:text-gray-100\", children: title || 'Chart' }) }), _jsx(\"div\", { style: { width: '100%', height: baseHeight }, children: _jsx(VegaErrorDisplay, { error: artifactError, chartTitle: title }) })] }) }));\n }\n if (error) {\n return (_jsx(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm\", children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-3\", children: [_jsx(\"div\", { className: \"flex items-center justify-between\", children: _jsx(\"span\", { className: \"font-medium text-sm text-gray-900 dark:text-gray-100\", children: title || 'Chart' }) }), _jsx(\"div\", { style: { width: '100%', height: baseHeight }, children: _jsx(VegaErrorDisplay, { error: error, chartTitle: title }) })] }) }));\n }\n // Build spec for rendering\n const chartSpec = buildFullSpec(baseHeight);\n const fullscreenSpec = buildFullSpec(0, true);\n // Handle case when spec isn't ready yet\n if (!chartSpec) {\n return null;\n }\n // Debug: Log the final spec being rendered\n console.log('VegaLite rendering with spec:', {\n title,\n hasData: !!chartSpec.data?.values,\n dataLength: chartSpec.data?.values?.length,\n spec: JSON.stringify(chartSpec).slice(0, 1000) + '...'\n });\n // Check if spec has data\n const specData = chartSpec.data;\n const hasNoData = specData && !specData.values && !specData.url;\n if (hasNoData) {\n console.warn('VegaLite spec has no data:', chartSpec);\n }\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: cn(\"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm\", isDashboard && \"border-2\"), children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-3\", children: [_jsxs(\"div\", { className: \"flex items-center justify-between\", children: [_jsxs(\"div\", { className: \"flex items-center gap-2\", children: [_jsx(\"span\", { className: \"font-medium text-sm text-gray-900 dark:text-gray-100\", children: title || (isDashboard ? 'Dashboard' : 'Chart') }), isDashboard && (_jsx(\"span\", { className: \"text-xs px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-300\", children: \"Interactive\" }))] }), _jsx(Toolbar, {})] }), description && (_jsx(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: description })), _jsx(\"div\", { ref: containerRef, className: \"bg-white dark:bg-gray-900 rounded overflow-hidden\", style: { width: '100%', height: baseHeight, minWidth: 0 }, children: _jsx(VegaEmbed, { spec: chartSpec, onEmbed: (result) => handleNewView(result.view), onError: handleError, options: { renderer: options?.renderer || 'canvas', actions: false } }) })] }) }), _jsxs(FullscreenDialog, { isOpen: isFullscreen, onClose: () => setIsFullscreen(false), title: title || (isDashboard ? 'Dashboard' : 'Chart'), description: description, children: [_jsx(\"div\", { className: \"w-full h-full min-h-[calc(100vh-200px)]\", children: fullscreenSpec && (_jsx(VegaEmbed, { spec: fullscreenSpec, onEmbed: (result) => handleFullscreenNewView(result.view), onError: handleError, options: { renderer: options?.renderer || 'canvas', actions: false } })) }), _jsx(\"div\", { className: \"absolute bottom-6 right-6\", children: _jsx(Toolbar, { className: \"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-2 border border-gray-200 dark:border-gray-700\" }) })] })] }));\n}, (prevProps, nextProps) => {\n // Deep compare the spec to prevent re-renders when data hasn't changed\n return JSON.stringify(prevProps.spec) === JSON.stringify(nextProps.spec) &&\n prevProps.artifactRunId === nextProps.artifactRunId;\n});\n//# sourceMappingURL=VegaLiteChart.js.map","import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Component, memo, useState, useRef, useCallback } from 'react';\nimport { toPng } from 'html-to-image';\nimport { Download, Copy, Check } from 'lucide-react';\nimport { VegaLiteChart } from './VegaLiteChart';\nimport { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ComposedChart, Funnel, FunnelChart, LabelList, Legend, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, Tooltip, Treemap, XAxis, YAxis, } from 'recharts';\n// Default color palette for charts\nconst COLORS = ['#4f46e5', '#06b6d4', '#22c55e', '#f59e0b', '#ef4444', '#8b5cf6', '#ec4899', '#14b8a6'];\nclass ChartErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n static getDerivedStateFromError(error) {\n return { hasError: true, error };\n }\n componentDidCatch(error, errorInfo) {\n console.error(`Chart rendering error (${this.props.chartType}):`, error, errorInfo);\n }\n render() {\n if (this.state.hasError) {\n return (_jsx(\"div\", { className: \"flex items-center justify-center h-full bg-red-50 dark:bg-red-950 rounded-md p-4\", children: _jsxs(\"div\", { className: \"text-center\", children: [_jsxs(\"p\", { className: \"text-sm font-medium text-red-600 dark:text-red-400\", children: [\"Cannot render \", this.props.chartType, \" chart\"] }), _jsx(\"p\", { className: \"text-xs text-red-500 dark:text-red-500 mt-1 max-w-xs truncate\", children: this.state.error?.message || 'Unknown error' })] }) }));\n }\n return this.props.children;\n }\n}\n// Type guard to check if spec is Vega-Lite\nexport function isVegaLiteSpec(spec) {\n return spec.library === 'vega-lite';\n}\n// Type guard to check if spec is Recharts (default)\nexport function isRechartsSpec(spec) {\n return (spec.library === 'recharts' || spec.library === undefined) && !('spec' in spec);\n}\nfunction formatNumber(n) {\n if (!isFinite(n))\n return String(n);\n const abs = Math.abs(n);\n if (abs >= 1_000_000_000)\n return (n / 1_000_000_000).toFixed(1) + 'B';\n if (abs >= 1_000_000)\n return (n / 1_000_000).toFixed(1) + 'M';\n if (abs >= 1_000)\n return (n / 1_000).toFixed(1) + 'K';\n return n.toLocaleString();\n}\n// Router component that delegates to the appropriate chart renderer\nexport const AgentChart = memo(function AgentChart({ spec, artifactRunId }) {\n // Route to VegaLiteChart for Vega-Lite specs\n if (isVegaLiteSpec(spec)) {\n return _jsx(VegaLiteChart, { spec: spec, artifactRunId: artifactRunId });\n }\n // Route to RechartsChart for Recharts specs\n return _jsx(RechartsChart, { spec: spec });\n}, (prevProps, nextProps) => {\n // Deep compare the spec to prevent re-renders when data hasn't changed\n return JSON.stringify(prevProps.spec) === JSON.stringify(nextProps.spec) &&\n prevProps.artifactRunId === nextProps.artifactRunId;\n});\n// Map alternative chart type names to our standard names\nfunction normalizeChartType(spec) {\n // If 'chart' is provided, use it directly\n if (spec.chart)\n return spec.chart;\n // Map 'type' field (e.g., \"BarChart\" -> \"bar\")\n const typeMap = {\n 'BarChart': 'bar',\n 'LineChart': 'line',\n 'AreaChart': 'area',\n 'PieChart': 'pie',\n 'ScatterChart': 'scatter',\n 'RadarChart': 'radar',\n 'FunnelChart': 'funnel',\n 'Treemap': 'treemap',\n 'ComposedChart': 'composed',\n 'RadialBarChart': 'radialBar',\n };\n if (spec.type && typeMap[spec.type]) {\n return typeMap[spec.type];\n }\n return 'bar'; // default\n}\n// Recharts implementation component\nconst RechartsChart = memo(function RechartsChart({ spec }) {\n // Normalize spec to handle alternative formats from agents\n const normalizedSpec = {\n ...spec,\n chart: normalizeChartType(spec),\n // Handle x_axis.data_key -> xKey\n xKey: spec.xKey || spec.x_axis?.data_key || 'name',\n // Handle bars/lines -> series\n series: spec.series || spec.bars?.map((b) => ({\n key: b.data_key || b.dataKey,\n color: b.fill || b.color,\n label: b.name,\n })) || spec.lines?.map((l) => ({\n key: l.data_key || l.dataKey,\n color: l.stroke || l.color,\n label: l.name,\n })) || [],\n };\n const { chart, title, description, data, xKey, series, yAxis, options, nameKey, valueKey, yKey, zKey: _zKey, axisKey, dataKey, } = normalizedSpec;\n const [isExporting, setIsExporting] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const chartRef = useRef(null);\n const handleCopy = useCallback(async () => {\n if (!chartRef.current || isCopied)\n return;\n try {\n const dataUrl = await toPng(chartRef.current, {\n backgroundColor: '#ffffff',\n pixelRatio: 2,\n });\n const response = await fetch(dataUrl);\n const blob = await response.blob();\n await navigator.clipboard.write([\n new ClipboardItem({ 'image/png': blob })\n ]);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n }\n catch (err) {\n console.error('Failed to copy chart:', err);\n }\n }, [isCopied]);\n const handleExport = useCallback(async () => {\n if (!chartRef.current || isExporting)\n return;\n setIsExporting(true);\n try {\n const dataUrl = await toPng(chartRef.current, {\n backgroundColor: '#ffffff',\n pixelRatio: 2,\n });\n const link = document.createElement('a');\n link.download = `${title || 'chart'}.png`;\n link.href = dataUrl;\n link.click();\n }\n catch (err) {\n console.error('Failed to export chart:', err);\n }\n finally {\n setIsExporting(false);\n }\n }, [title, isExporting]);\n // Safe arrays - default to empty array if undefined\n const safeSeries = series || [];\n const safeData = data || [];\n const commonAxes = (_jsxs(_Fragment, { children: [_jsx(XAxis, { dataKey: xKey, tick: { fontSize: 12 } }), _jsx(YAxis, { yAxisId: \"left\", tickFormatter: formatNumber, label: yAxis?.left?.label ? { value: yAxis.left.label, angle: -90, position: 'insideLeft' } : undefined }), safeSeries.some((s) => s.yAxisId === 'right') && (_jsx(YAxis, { yAxisId: \"right\", orientation: \"right\", tickFormatter: formatNumber, label: yAxis?.right?.label ? { value: yAxis.right.label, angle: -90, position: 'insideRight' } : undefined }))] }));\n const commonOverlays = (_jsxs(_Fragment, { children: [_jsx(CartesianGrid, { strokeDasharray: \"3 3\" }), _jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsx(Legend, {}), options?.referenceZero && _jsx(ReferenceLine, { y: 0, stroke: \"#999\", strokeDasharray: \"3 3\" })] }));\n const renderSeries = () => safeSeries.map((s, idx) => {\n const color = s.color || COLORS[idx % COLORS.length];\n const yAxisId = s.yAxisId || 'left';\n if (chart === 'line') {\n return (_jsx(Line, { type: \"monotone\", dataKey: s.key, name: s.label || s.key, stroke: color, dot: s.dot ?? false, yAxisId: yAxisId }, s.key));\n }\n if (chart === 'area') {\n return (_jsx(Area, { type: \"monotone\", dataKey: s.key, name: s.label || s.key, stroke: color, fill: color, fillOpacity: 0.3, stackId: options?.stacked ? (s.stackId || 'stack') : undefined, yAxisId: yAxisId }, s.key));\n }\n if (chart === 'bar' || s.type === 'bar') {\n return (_jsx(Bar, { dataKey: s.key, name: s.label || s.key, fill: color, stackId: options?.stacked ? (s.stackId || 'stack') : undefined, yAxisId: yAxisId }, s.key));\n }\n if (s.type === 'area') {\n return (_jsx(Area, { type: \"monotone\", dataKey: s.key, name: s.label || s.key, stroke: color, fill: color, fillOpacity: 0.3, stackId: options?.stacked ? (s.stackId || 'stack') : undefined, yAxisId: yAxisId }, s.key));\n }\n // default to line in composed\n return (_jsx(Line, { type: \"monotone\", dataKey: s.key, name: s.label || s.key, stroke: color, dot: s.dot ?? false, yAxisId: yAxisId }, s.key));\n });\n // Render Pie Chart\n const renderPieChart = () => {\n const nKey = nameKey || 'name';\n const vKey = valueKey || 'value';\n const innerRadius = options?.innerRadius || 0;\n return (_jsxs(PieChart, { children: [_jsx(Pie, { data: safeData, dataKey: vKey, nameKey: nKey, cx: \"50%\", cy: \"50%\", innerRadius: innerRadius, outerRadius: 100, label: options?.showLabels !== false, children: safeData.map((_, index) => (_jsx(Cell, { fill: COLORS[index % COLORS.length] }, `cell-${index}`))) }), _jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsx(Legend, {})] }));\n };\n // Render Scatter Chart\n const renderScatterChart = () => {\n const xDataKey = xKey;\n const yDataKey = yKey || 'y';\n return (_jsxs(ScatterChart, { children: [_jsx(CartesianGrid, { strokeDasharray: \"3 3\" }), _jsx(XAxis, { dataKey: xDataKey, name: xDataKey, tick: { fontSize: 12 } }), _jsx(YAxis, { dataKey: yDataKey, name: yDataKey, tickFormatter: formatNumber }), _jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsx(Legend, {}), safeSeries.length > 0 ? (safeSeries.map((s, idx) => (_jsx(Scatter, { name: s.label || s.key, data: safeData, fill: s.color || COLORS[idx % COLORS.length] }, s.key)))) : (_jsx(Scatter, { name: \"Data\", data: safeData, fill: COLORS[0] }))] }));\n };\n // Render Radar Chart\n const renderRadarChart = () => {\n const aKey = axisKey || xKey || 'axis';\n return (_jsxs(RadarChart, { cx: \"50%\", cy: \"50%\", outerRadius: 100, data: safeData, children: [_jsx(PolarGrid, {}), _jsx(PolarAngleAxis, { dataKey: aKey, tick: { fontSize: 11 } }), _jsx(PolarRadiusAxis, { tickFormatter: formatNumber }), safeSeries.map((s, idx) => (_jsx(Radar, { name: s.label || s.key, dataKey: s.key, stroke: s.color || COLORS[idx % COLORS.length], fill: s.color || COLORS[idx % COLORS.length], fillOpacity: 0.3 }, s.key))), _jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsx(Legend, {})] }));\n };\n // Render RadialBar Chart\n const renderRadialBarChart = () => {\n const nKey = nameKey || 'name';\n const vKey = valueKey || 'value';\n const startAngle = options?.startAngle ?? 180;\n const endAngle = options?.endAngle ?? 0;\n const innerRadius = options?.innerRadius ?? 30;\n return (_jsxs(RadialBarChart, { cx: \"50%\", cy: \"50%\", innerRadius: innerRadius, outerRadius: 100, barSize: 15, data: safeData, startAngle: startAngle, endAngle: endAngle, children: [_jsx(RadialBar, { label: { position: 'insideStart', fill: '#fff', fontSize: 11 }, background: true, dataKey: vKey, children: safeData.map((_, index) => (_jsx(Cell, { fill: COLORS[index % COLORS.length] }, `cell-${index}`))) }), _jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsx(Legend, { iconSize: 10, layout: \"vertical\", verticalAlign: \"middle\", align: \"right\", formatter: (value, entry) => {\n const item = safeData.find((d) => d[nKey] === value || d[vKey] === entry.payload?.value);\n return item ? item[nKey] : value;\n } })] }));\n };\n // Render Funnel Chart\n const renderFunnelChart = () => {\n const nKey = nameKey || 'name';\n const vKey = valueKey || 'value';\n return (_jsxs(FunnelChart, { children: [_jsx(Tooltip, { formatter: (value) => (typeof value === 'number' ? formatNumber(value) : String(value)) }), _jsxs(Funnel, { dataKey: vKey, data: safeData, isAnimationActive: true, children: [safeData.map((_, index) => (_jsx(Cell, { fill: COLORS[index % COLORS.length] }, `cell-${index}`))), options?.showLabels !== false && (_jsx(LabelList, { position: \"center\", fill: \"#fff\", stroke: \"none\", dataKey: nKey }))] })] }));\n };\n // Render Treemap\n const renderTreemap = () => {\n const dKey = dataKey || valueKey || 'value';\n return (_jsx(Treemap, { data: safeData, dataKey: dKey, aspectRatio: 4 / 3, stroke: \"#fff\", fill: \"#4f46e5\", content: ({ x, y, width, height, name, value, index }) => {\n const fill = COLORS[index % COLORS.length];\n return (_jsxs(\"g\", { children: [_jsx(\"rect\", { x: x, y: y, width: width, height: height, style: { fill, stroke: '#fff', strokeWidth: 2 } }), width > 50 && height > 30 && (_jsxs(_Fragment, { children: [_jsx(\"text\", { x: x + width / 2, y: y + height / 2 - 7, textAnchor: \"middle\", fill: \"#fff\", fontSize: 12, children: name }), _jsx(\"text\", { x: x + width / 2, y: y + height / 2 + 10, textAnchor: \"middle\", fill: \"#fff\", fontSize: 11, children: formatNumber(value) })] }))] }));\n } }));\n };\n // Render chart based on type\n const renderChart = () => {\n switch (chart) {\n case 'bar':\n return (_jsxs(BarChart, { data: safeData, children: [commonAxes, commonOverlays, renderSeries()] }));\n case 'line':\n return (_jsxs(LineChart, { data: safeData, children: [commonAxes, commonOverlays, renderSeries()] }));\n case 'area':\n return (_jsxs(AreaChart, { data: safeData, children: [commonAxes, commonOverlays, renderSeries()] }));\n case 'composed':\n return (_jsxs(ComposedChart, { data: safeData, children: [commonAxes, commonOverlays, renderSeries()] }));\n case 'pie':\n return renderPieChart();\n case 'scatter':\n return renderScatterChart();\n case 'radar':\n return renderRadarChart();\n case 'radialBar':\n return renderRadialBarChart();\n case 'funnel':\n return renderFunnelChart();\n case 'treemap':\n return renderTreemap();\n default:\n return (_jsxs(ComposedChart, { data: safeData, children: [commonAxes, commonOverlays, renderSeries()] }));\n }\n };\n return (_jsx(\"div\", { className: \"bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 shadow-sm\", children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-3\", children: [_jsxs(\"div\", { className: \"flex items-center justify-between\", children: [_jsx(\"span\", { className: \"font-medium text-sm text-gray-900 dark:text-gray-100\", children: title || 'Chart' }), _jsxs(\"div\", { className: \"flex items-center gap-2 print:hidden chart-actions\", children: [_jsxs(\"button\", { onClick: handleCopy, disabled: isCopied, className: \"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 flex items-center gap-1\", title: \"Copy to clipboard\", children: [isCopied ? _jsx(Check, { className: \"w-3 h-3\" }) : _jsx(Copy, { className: \"w-3 h-3\" }), isCopied ? 'Copied' : 'Copy'] }), _jsxs(\"button\", { onClick: handleExport, disabled: isExporting, className: \"text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1\", title: \"Export as PNG\", children: [_jsx(Download, { className: \"w-3 h-3\" }), isExporting ? 'Exporting...' : 'Export'] })] })] }), description && (_jsx(\"span\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: description })), _jsx(\"div\", { ref: chartRef, className: \"bg-white dark:bg-gray-900 rounded\", style: { width: '100%', height: 280, minWidth: 0 }, children: _jsx(ChartErrorBoundary, { chartType: chart, children: _jsx(ResponsiveContainer, { width: \"100%\", height: \"100%\", children: renderChart() }) }) })] }) }));\n}, (prevProps, nextProps) => {\n // Deep compare the spec to prevent re-renders when data hasn't changed\n return JSON.stringify(prevProps.spec) === JSON.stringify(nextProps.spec);\n});\n//# sourceMappingURL=AgentChart.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { Button, VTooltip } from \"@vertesia/ui/core\";\nimport { MessageSquare, CheckCircle, XCircle, AlertCircle, HelpCircle, Send } from \"lucide-react\";\nconst VARIANT_STYLES = {\n default: {\n border: \"border-l-attention\",\n bg: \"bg-amber-50 dark:bg-amber-900/20\",\n icon: \"text-attention\",\n },\n warning: {\n border: \"border-l-destructive\",\n bg: \"bg-red-50 dark:bg-red-900/20\",\n icon: \"text-destructive\",\n },\n info: {\n border: \"border-l-info\",\n bg: \"bg-blue-50 dark:bg-blue-900/20\",\n icon: \"text-info\",\n },\n success: {\n border: \"border-l-success\",\n bg: \"bg-green-50 dark:bg-green-900/20\",\n icon: \"text-success\",\n },\n};\nconst VARIANT_ICONS = {\n default: HelpCircle,\n warning: AlertCircle,\n info: MessageSquare,\n success: CheckCircle,\n};\n/**\n * AskUserWidget - A styled component for displaying agent prompts/questions to users\n *\n * Use this when the agent needs user input, confirmation, or selection from options.\n * Supports both option selection and free-form text input.\n */\nexport function AskUserWidget({ question, description, options, onSelect, onMultiSelect, onSubmit, allowFreeResponse = false, multiSelect = false, placeholder = \"Type your response...\", isLoading = false, icon, variant = \"default\", hideIcon = false, hideBorder = false, \n// Styling props\nclassName, cardClassName, headerClassName, iconClassName, questionClassName, descriptionClassName, optionsClassName, buttonClassName, inputContainerClassName, inputClassName, submitButtonClassName, }) {\n const [inputValue, setInputValue] = React.useState(\"\");\n const [selectedOptions, setSelectedOptions] = React.useState(new Set());\n const inputRef = React.useRef(null);\n const styles = VARIANT_STYLES[variant];\n const DefaultIcon = VARIANT_ICONS[variant];\n const toggleOption = (optionId) => {\n setSelectedOptions((prev) => {\n const next = new Set(prev);\n if (next.has(optionId)) {\n next.delete(optionId);\n }\n else {\n next.add(optionId);\n }\n return next;\n });\n };\n const handleMultiSubmit = () => {\n if (selectedOptions.size > 0 && onMultiSelect) {\n onMultiSelect(Array.from(selectedOptions));\n setSelectedOptions(new Set());\n }\n };\n const handleSubmit = () => {\n if (inputValue.trim() && onSubmit) {\n onSubmit(inputValue.trim());\n setInputValue(\"\");\n }\n };\n const handleKeyDown = (e) => {\n if (e.key === \"Enter\" && !e.shiftKey) {\n e.preventDefault();\n handleSubmit();\n }\n };\n const borderClass = hideBorder ? \"\" : `border-l-4 ${styles.border}`;\n return (_jsx(\"div\", { className: `my-4 ${className || \"\"}`, children: _jsxs(\"div\", { className: `${borderClass} ${styles.bg} rounded-r-lg shadow-sm ${cardClassName || \"\"}`, children: [_jsx(\"div\", { className: `px-4 py-3 ${headerClassName || \"\"}`, children: _jsxs(\"div\", { className: \"flex items-start gap-3\", children: [!hideIcon && (_jsx(\"div\", { className: `flex-shrink-0 mt-0.5 ${styles.icon} ${iconClassName || \"\"}`, children: icon || _jsx(DefaultIcon, { className: \"size-5\" }) })), _jsxs(\"div\", { className: \"flex-1 min-w-0\", children: [_jsx(\"h4\", { className: `text-sm font-semibold text-gray-900 dark:text-gray-100 ${questionClassName || \"\"}`, children: question }), description && (_jsx(\"p\", { className: `mt-1 text-sm text-gray-600 dark:text-gray-400 ${descriptionClassName || \"\"}`, children: description }))] })] }) }), options && options.length > 0 && (_jsx(\"div\", { className: `px-4 pb-3 pt-1 ${optionsClassName || \"\"}`, children: multiSelect ? (\n /* Multi-select mode with checkboxes */\n _jsxs(\"div\", { className: \"space-y-2\", children: [options.map((option) => {\n const checkbox = (_jsxs(\"label\", { className: `flex items-center gap-3 px-3 py-2 rounded-md cursor-pointer transition-colors\n ${selectedOptions.has(option.id)\n ? \"bg-blue-50 dark:bg-blue-900/30 border border-blue-300 dark:border-blue-700\"\n : \"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700\"}\n ${isLoading ? \"opacity-50 cursor-not-allowed\" : \"\"}`, children: [_jsx(\"input\", { type: \"checkbox\", checked: selectedOptions.has(option.id), onChange: () => toggleOption(option.id), disabled: isLoading, className: \"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700\" }), _jsxs(\"span\", { className: \"flex items-center gap-2 text-sm text-gray-900 dark:text-gray-100\", children: [option.icon, option.label] })] }));\n return option.description ? (_jsx(VTooltip, { description: option.description, placement: \"right\", asChild: true, children: checkbox }, option.id)) : (_jsx(React.Fragment, { children: checkbox }, option.id));\n }), _jsx(\"div\", { className: \"pt-2\", children: _jsxs(Button, { size: \"sm\", onClick: handleMultiSubmit, disabled: isLoading || selectedOptions.size === 0, className: \"flex items-center gap-2\", children: [_jsx(Send, { className: \"size-4\" }), \"Submit Selection\", selectedOptions.size > 0 ? ` (${selectedOptions.size})` : \"\"] }) })] })) : (\n /* Single-select mode with buttons */\n _jsx(\"div\", { className: \"flex flex-wrap gap-2\", children: options.map((option) => {\n const button = (_jsxs(Button, { variant: \"outline\", size: \"sm\", onClick: () => onSelect?.(option.id), disabled: isLoading, className: `flex items-center gap-2 ${buttonClassName || \"\"}`, children: [option.icon, option.label] }));\n return option.description ? (_jsx(VTooltip, { description: option.description, placement: \"top\", asChild: true, children: button }, option.id)) : (_jsx(React.Fragment, { children: button }, option.id));\n }) })) })), allowFreeResponse && (_jsx(\"div\", { className: `px-4 pb-3 pt-1 ${inputContainerClassName || \"\"}`, children: _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(\"input\", { ref: inputRef, type: \"text\", value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, placeholder: placeholder, disabled: isLoading, className: `flex-1 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 focus:ring-2 focus:ring-blue-500 focus:border-transparent ${inputClassName || \"\"}` }), _jsx(Button, { size: \"sm\", onClick: handleSubmit, disabled: isLoading || !inputValue.trim(), className: submitButtonClassName, children: isLoading ? \"...\" : \"Send\" })] }) }))] }) }));\n}\nexport function ConfirmationWidget({ question, description, onConfirm, onCancel, confirmLabel = \"Yes\", cancelLabel = \"No\", isLoading = false, variant = \"default\", className, }) {\n return (_jsx(AskUserWidget, { question: question, description: description, variant: variant, isLoading: isLoading, className: className, options: [\n {\n id: \"confirm\",\n label: confirmLabel,\n icon: _jsx(CheckCircle, { className: \"size-4\" }),\n },\n {\n id: \"cancel\",\n label: cancelLabel,\n icon: _jsx(XCircle, { className: \"size-4\" }),\n },\n ], onSelect: (id) => {\n if (id === \"confirm\")\n onConfirm();\n else\n onCancel();\n } }));\n}\n//# sourceMappingURL=AskUserWidget.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useRef, useState, useId } from 'react';\nimport mermaid from 'mermaid';\n// Initialize mermaid with default config\nmermaid.initialize({\n startOnLoad: false,\n theme: 'default',\n securityLevel: 'loose',\n fontFamily: 'inherit',\n});\n/**\n * MermaidDiagram - Renders mermaid diagram code as SVG\n *\n * Supports all mermaid diagram types including:\n * - flowchart/graph\n * - sequence\n * - class\n * - state\n * - er (entity relationship)\n * - gantt\n * - pie\n * - mindmap\n * - timeline\n * - and more\n */\nexport function MermaidDiagram({ code, className }) {\n const containerRef = useRef(null);\n const [svg, setSvg] = useState(null);\n const [error, setError] = useState(null);\n const uniqueId = useId().replace(/:/g, '_');\n useEffect(() => {\n let cancelled = false;\n const renderDiagram = async () => {\n if (!code.trim()) {\n setSvg(null);\n setError(null);\n return;\n }\n try {\n // Reset error state\n setError(null);\n // Generate unique ID for this render\n const id = `mermaid-${uniqueId}-${Date.now()}`;\n // Render the diagram\n const { svg: renderedSvg } = await mermaid.render(id, code.trim());\n if (!cancelled) {\n setSvg(renderedSvg);\n }\n }\n catch (err) {\n if (!cancelled) {\n const message = err instanceof Error ? err.message : 'Failed to render mermaid diagram';\n setError(message);\n setSvg(null);\n }\n }\n };\n renderDiagram();\n return () => {\n cancelled = true;\n };\n }, [code, uniqueId]);\n if (error) {\n return (_jsxs(\"div\", { className: `my-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg ${className || ''}`, children: [_jsx(\"div\", { className: \"text-sm font-medium text-red-800 dark:text-red-200 mb-2\", children: \"Mermaid Diagram Error\" }), _jsx(\"pre\", { className: \"text-xs text-red-600 dark:text-red-300 whitespace-pre-wrap overflow-x-auto\", children: error }), _jsxs(\"details\", { className: \"mt-2\", children: [_jsx(\"summary\", { className: \"text-xs text-red-500 dark:text-red-400 cursor-pointer\", children: \"Show diagram code\" }), _jsx(\"pre\", { className: \"mt-2 p-2 bg-red-100 dark:bg-red-900/30 rounded text-xs overflow-x-auto\", children: code })] })] }));\n }\n if (!svg) {\n return (_jsx(\"div\", { className: `my-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg animate-pulse ${className || ''}`, children: _jsx(\"div\", { className: \"h-32 bg-gray-200 dark:bg-gray-700 rounded\" }) }));\n }\n return (_jsx(\"div\", { ref: containerRef, className: `my-4 overflow-x-auto ${className || ''}`, dangerouslySetInnerHTML: { __html: svg } }));\n}\n//# sourceMappingURL=MermaidDiagram.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useUserSession } from \"@vertesia/ui/session\";\nimport { useCodeBlockRendererRegistry } from \"./CodeBlockRendering\";\nimport React from \"react\";\nimport Markdown, { defaultUrlTransform } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport { SKIP, visit } from \"unist-util-visit\";\nimport { AgentChart } from \"../../features/agent/chat/AgentChart\";\nimport { AskUserWidget } from \"../../features/agent/chat/AskUserWidget\";\nimport { useArtifactUrlCache, getArtifactCacheKey, getFileCacheKey } from \"../../features/agent/chat/useArtifactUrlCache.js\";\nimport { MermaidDiagram } from \"./MermaidDiagram\";\n// Custom URL schemes that we handle in our components\nconst ALLOWED_CUSTOM_SCHEMES = [\n 'artifact:',\n 'image:',\n 'store:',\n 'document:',\n 'document://',\n 'collection:',\n];\n/**\n * Custom URL transform that allows our custom schemes while using\n * the default transform for standard URLs (which sanitizes unsafe schemes).\n */\nfunction customUrlTransform(url) {\n // Allow our custom schemes - they're handled by our custom components\n if (ALLOWED_CUSTOM_SCHEMES.some(scheme => url.startsWith(scheme))) {\n return url;\n }\n // Fall back to default sanitization for other URLs\n return defaultUrlTransform(url);\n}\nfunction remarkRemoveComments() {\n return (tree) => {\n visit(tree, 'html', (node, index, parent) => {\n if (node.value && /<!--[\\s\\S]*?-->/.test(node.value)) {\n if (parent && typeof index === 'number' && parent.children) {\n parent.children.splice(index, 1);\n return [SKIP, index];\n }\n }\n });\n };\n}\nexport function MarkdownRenderer({ children, components, remarkPlugins = [], removeComments = true, artifactRunId, className, codeClassName, inlineCodeClassName, linkClassName, imageClassName, onProposalSelect, onProposalSubmit, }) {\n const { client } = useUserSession();\n const urlCache = useArtifactUrlCache();\n const codeBlockRegistry = useCodeBlockRendererRegistry();\n const plugins = [remarkGfm, ...remarkPlugins];\n if (removeComments) {\n plugins.push(remarkRemoveComments);\n }\n const componentsWithCharts = React.useMemo(() => {\n const baseComponents = components || {};\n const ExistingCode = baseComponents.code;\n const ExistingLink = baseComponents.a;\n const ExistingImg = baseComponents.img;\n const CodeComponent = ({ node, className, children, ...props }) => {\n const match = /language-([\\w-]+)/.exec(className || \"\");\n const isInline = !match;\n const language = match ? match[1] : \"\";\n // Check if there's a custom renderer for this language\n if (!isInline && language && codeBlockRegistry) {\n const CustomComponent = codeBlockRegistry.getComponent(language);\n if (CustomComponent) {\n const code = String(children || \"\").trim();\n return _jsx(CustomComponent, { code: code });\n }\n }\n if (!isInline && (language === \"chart\" || className?.includes(\"language-chart\"))) {\n try {\n let raw = String(children || \"\").trim();\n // Extract just the JSON object - handle cases where extra content is appended\n const jsonStart = raw.indexOf('{');\n const jsonEnd = raw.lastIndexOf('}');\n if (jsonStart !== -1 && jsonEnd > jsonStart) {\n raw = raw.slice(jsonStart, jsonEnd + 1);\n }\n const spec = JSON.parse(raw);\n // Support Vega-Lite, Recharts, and native Vega-Lite JSON with $schema\n if (spec) {\n // Detect Vega-Lite by $schema containing \"vega\"\n const hasVegaSchema = typeof spec.$schema === 'string' && spec.$schema.includes('vega');\n const isVegaLite = spec.library === 'vega-lite' && 'spec' in spec;\n // Recharts: check for 'chart' property OR library === 'recharts' with data\n const isRecharts = (('chart' in spec || 'type' in spec || spec.library === 'recharts') &&\n 'data' in spec &&\n Array.isArray(spec.data));\n if (hasVegaSchema || isVegaLite || isRecharts) {\n // Wrap native Vega-Lite spec in expected format\n const chartSpec = hasVegaSchema && !isVegaLite\n ? { library: 'vega-lite', spec }\n : spec;\n return _jsx(AgentChart, { spec: chartSpec, artifactRunId: artifactRunId });\n }\n }\n }\n catch (e) {\n // Not valid JSON or not a chart - fall through to regular code rendering\n }\n }\n // Detect proposal/askuser blocks\n if (!isInline && (language === \"proposal\" || language === \"askuser\")) {\n try {\n const raw = String(children || \"\").trim();\n const spec = JSON.parse(raw);\n if (spec.options && (spec.question || spec.title)) {\n const widgetProps = {\n question: spec.question || spec.title || '',\n description: spec.description,\n options: Array.isArray(spec.options)\n ? spec.options.map((opt) => ({\n id: opt.id || opt.value || '',\n label: opt.label || '',\n description: opt.description,\n }))\n : undefined,\n allowFreeResponse: spec.allowFreeResponse ?? spec.multiple,\n variant: spec.variant,\n onSelect: onProposalSelect,\n onSubmit: onProposalSubmit,\n };\n if (widgetProps.question && widgetProps.options && widgetProps.options.length > 0) {\n return _jsx(AskUserWidget, { ...widgetProps });\n }\n }\n }\n catch (e) {\n // Not valid JSON or not a proposal - fall through to regular code rendering\n }\n }\n // Detect mermaid diagram blocks\n if (!isInline && (language === \"mermaid\" || className?.includes(\"language-mermaid\"))) {\n const code = String(children || \"\").trim();\n if (code) {\n return _jsx(MermaidDiagram, { code: code });\n }\n }\n if (typeof ExistingCode === \"function\") {\n return _jsx(ExistingCode, { node: node, className: className, ...props, children: children });\n }\n const baseInlineClass = \"px-1.5 py-0.5 rounded\";\n const baseCodeClass = \"text-muted\";\n return (_jsx(\"code\", { ...props, className: isInline\n ? `${baseInlineClass} ${inlineCodeClassName || \"\"}`\n : `${baseCodeClass} ${codeClassName || \"\"}`, children: children }));\n };\n const LinkComponent = (props) => {\n const { node, href, children, ...rest } = props;\n const rawHref = href || \"\";\n const isArtifactLink = rawHref.startsWith(\"artifact:\");\n const artifactPath = isArtifactLink ? rawHref.replace(/^artifact:/, \"\").trim() : \"\";\n const isImageLink = rawHref.startsWith(\"image:\");\n const imagePath = isImageLink ? rawHref.replace(/^image:/, \"\").trim() : \"\";\n const [resolvedHref, setResolvedHref] = React.useState(() => {\n // Initialize from cache if available\n if (urlCache) {\n if (isArtifactLink && artifactRunId && !artifactPath.startsWith(\"agents/\")) {\n return urlCache.getUrl(getArtifactCacheKey(artifactRunId, artifactPath, \"attachment\"));\n }\n else if (isArtifactLink) {\n return urlCache.getUrl(getFileCacheKey(artifactPath));\n }\n else if (isImageLink) {\n return urlCache.getUrl(getFileCacheKey(imagePath));\n }\n }\n return undefined;\n });\n React.useEffect(() => {\n // Skip if already resolved from cache\n if (resolvedHref)\n return;\n let cancelled = false;\n const resolve = async () => {\n if (!isArtifactLink && !isImageLink) {\n setResolvedHref(undefined);\n return;\n }\n try {\n if (isArtifactLink) {\n // If we have a run id and the path looks like a shorthand (e.g. out/...), use artifact API.\n if (artifactRunId && !artifactPath.startsWith(\"agents/\")) {\n const cacheKey = getArtifactCacheKey(artifactRunId, artifactPath, \"attachment\");\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, artifactPath, \"attachment\");\n return result.url;\n });\n }\n else {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, artifactPath, \"attachment\");\n url = result.url;\n }\n if (!cancelled) {\n setResolvedHref(url);\n }\n }\n else {\n // Otherwise, treat it as a direct file path.\n const cacheKey = getFileCacheKey(artifactPath);\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getDownloadUrl(artifactPath);\n return result.url;\n });\n }\n else {\n const result = await client.files.getDownloadUrl(artifactPath);\n url = result.url;\n }\n if (!cancelled) {\n setResolvedHref(url);\n }\n }\n }\n else if (isImageLink) {\n // image:<path> is treated as a direct file path resolved via files API\n const cacheKey = getFileCacheKey(imagePath);\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getDownloadUrl(imagePath);\n return result.url;\n });\n }\n else {\n const result = await client.files.getDownloadUrl(imagePath);\n url = result.url;\n }\n if (!cancelled) {\n setResolvedHref(url);\n }\n }\n }\n catch (err) {\n const contextPath = isArtifactLink ? artifactPath : imagePath;\n console.error(\"Failed to resolve link in MarkdownRenderer:\", contextPath, err);\n if (!cancelled) {\n setResolvedHref(undefined);\n }\n }\n };\n resolve();\n return () => {\n cancelled = true;\n };\n }, [isArtifactLink, artifactPath, isImageLink, imagePath, artifactRunId, client, resolvedHref, urlCache]);\n // Handle document://<id> links by mapping them to /store/objects/<id>\n if (rawHref.startsWith(\"document://\")) {\n const id = rawHref.replace(/^document:\\/\\//, \"\").trim();\n const mappedHref = id ? `/store/objects/${id}` : rawHref;\n if (typeof ExistingLink === \"function\") {\n return _jsx(ExistingLink, { node: node, href: mappedHref, ...rest, children: children });\n }\n return (_jsx(\"a\", { href: mappedHref, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n }\n // Handle store:<id> links by mapping them to /store/objects/<id>\n if (rawHref.startsWith(\"store:\")) {\n const id = rawHref.replace(/^store:/, \"\").trim();\n const mappedHref = id ? `/store/objects/${id}` : rawHref;\n if (typeof ExistingLink === \"function\") {\n return _jsx(ExistingLink, { node: node, href: mappedHref, ...rest, children: children });\n }\n return (_jsx(\"a\", { href: mappedHref, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n }\n // Handle collection:<id> links by mapping them to /store/collections/<id>\n if (rawHref.startsWith(\"collection:\")) {\n const id = rawHref.replace(/^collection:/, \"\").trim();\n const mappedHref = id ? `/store/collections/${id}` : rawHref;\n if (typeof ExistingLink === \"function\") {\n return _jsx(ExistingLink, { node: node, href: mappedHref, ...rest, children: children });\n }\n return (_jsx(\"a\", { href: mappedHref, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n }\n // Defer to existing link component if provided and not an artifact: URL\n if (!isArtifactLink && !isImageLink && typeof ExistingLink === \"function\") {\n return _jsx(ExistingLink, { node: node, href: href, ...rest, children: children });\n }\n // Handle artifact: links generically by resolving to a signed URL when possible.\n if (isArtifactLink) {\n const finalHref = resolvedHref || \"#\";\n return (_jsx(\"a\", { href: finalHref, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n }\n // Handle image: links by resolving to a signed URL when possible.\n if (isImageLink) {\n const finalHref = resolvedHref || \"#\";\n return (_jsx(\"a\", { href: finalHref, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n }\n // Default link behavior\n return (_jsx(\"a\", { href: href, ...rest, className: linkClassName, target: \"_blank\", rel: \"noopener noreferrer\", children: children }));\n };\n const ImageComponent = (props) => {\n const { node, src, alt, ...rest } = props;\n const rawSrc = src || \"\";\n const isArtifactRef = rawSrc.startsWith(\"artifact:\");\n const isImageRef = rawSrc.startsWith(\"image:\");\n const isArtifactOrImageRef = isArtifactRef || isImageRef;\n const path = isArtifactOrImageRef ? rawSrc.replace(/^artifact:/, \"\").replace(/^image:/, \"\").trim() : \"\";\n const [resolvedSrc, setResolvedSrc] = React.useState(() => {\n // Initialize from cache if available\n if (urlCache && isArtifactOrImageRef) {\n if (isArtifactRef && artifactRunId && !path.startsWith(\"agents/\")) {\n return urlCache.getUrl(getArtifactCacheKey(artifactRunId, path, \"inline\"));\n }\n else if (isArtifactRef) {\n return urlCache.getUrl(getFileCacheKey(path));\n }\n else if (isImageRef) {\n return urlCache.getUrl(getFileCacheKey(path));\n }\n }\n return undefined;\n });\n React.useEffect(() => {\n // Skip if already resolved from cache\n if (resolvedSrc)\n return;\n let cancelled = false;\n const resolve = async () => {\n if (!isArtifactOrImageRef) {\n setResolvedSrc(undefined);\n return;\n }\n try {\n if (isArtifactRef) {\n // Allow shorthand artifact paths when we have a run id\n if (artifactRunId && !path.startsWith(\"agents/\")) {\n const cacheKey = getArtifactCacheKey(artifactRunId, path, \"inline\");\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, path, \"inline\");\n return result.url;\n });\n }\n else {\n const result = await client.files.getArtifactDownloadUrl(artifactRunId, path, \"inline\");\n url = result.url;\n }\n if (!cancelled) {\n setResolvedSrc(url);\n }\n }\n else {\n const cacheKey = getFileCacheKey(path);\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getDownloadUrl(path);\n return result.url;\n });\n }\n else {\n const result = await client.files.getDownloadUrl(path);\n url = result.url;\n }\n if (!cancelled) {\n setResolvedSrc(url);\n }\n }\n }\n else if (isImageRef) {\n // image:<path> is always resolved via files API\n const cacheKey = getFileCacheKey(path);\n let url;\n if (urlCache) {\n url = await urlCache.getOrFetch(cacheKey, async () => {\n const result = await client.files.getDownloadUrl(path);\n return result.url;\n });\n }\n else {\n const result = await client.files.getDownloadUrl(path);\n url = result.url;\n }\n if (!cancelled) {\n setResolvedSrc(url);\n }\n }\n }\n catch (err) {\n console.error(\"Failed to resolve image link in MarkdownRenderer:\", path, err);\n if (!cancelled) {\n setResolvedSrc(undefined);\n }\n }\n };\n resolve();\n return () => {\n cancelled = true;\n };\n }, [isArtifactOrImageRef, path, artifactRunId, client, resolvedSrc, urlCache]);\n // If a custom img component was passed and this is not an artifact:/image: URL, delegate.\n if (!isArtifactOrImageRef && typeof ExistingImg === \"function\") {\n return _jsx(ExistingImg, { node: node, src: src, alt: alt, ...rest });\n }\n if (isArtifactOrImageRef) {\n if (!resolvedSrc) {\n // Render nothing or a minimal placeholder until resolved\n return null;\n }\n return (_jsx(\"img\", { src: resolvedSrc, alt: alt, className: imageClassName, ...rest }));\n }\n // Default image behavior\n return (_jsx(\"img\", { src: src, alt: alt, className: imageClassName, ...rest }));\n };\n return {\n ...baseComponents,\n code: CodeComponent,\n a: LinkComponent,\n img: ImageComponent,\n };\n }, [components, client, artifactRunId, urlCache, codeClassName, inlineCodeClassName, linkClassName, imageClassName, onProposalSelect, onProposalSubmit]);\n const markdownContent = (_jsx(Markdown, { remarkPlugins: plugins, components: componentsWithCharts, urlTransform: customUrlTransform, children: children }));\n // Wrap in a div if className is provided, otherwise return Markdown directly\n if (className) {\n return _jsx(\"div\", { className: className, children: markdownContent });\n }\n return markdownContent;\n}\n//# sourceMappingURL=MarkdownRenderer.js.map","import { createContext, useContext } from \"react\";\nconst PopoverContext = createContext(undefined);\nexport function usePopoverContext() {\n return useContext(PopoverContext);\n}\nexport { PopoverContext };\n//# sourceMappingURL=context.js.map","import { Children, isValidElement } from \"react\";\nconst __SLOT_NAME = Symbol('__SLOT_NAME');\nexport function processOneSlot(child, out, slots) {\n let slotName;\n if (isValidElement(child) && (slotName = child.type[__SLOT_NAME])) {\n slots[slotName] = child;\n }\n else {\n out.push(child);\n }\n}\nexport function processSlots(children, slots) {\n const out = [];\n Children.forEach(children, child => {\n processOneSlot(child, out, slots);\n });\n return out.length > 1 ? out : out[0];\n}\nexport function defineSlot(name, component) {\n component[__SLOT_NAME] = name;\n}\n//# sourceMappingURL=slots.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { flip, offset, shift } from \"@floating-ui/dom\";\nimport { FloatingFocusManager, FloatingPortal, autoUpdate, safePolygon, useClick, useDismiss, useFloating, useHover, useInteractions, useTransitionStyles } from \"@floating-ui/react\";\nimport clsx from \"clsx\";\nimport { useState } from \"react\";\nimport { PopoverContext } from \"./context\";\nimport { defineSlot, processSlots } from \"./slots\";\nfunction computeElementProps(value) {\n if (!value)\n return { enabled: false };\n return (typeof value === 'boolean' ? { enabled: value } : value);\n}\nfunction getHoverProps(props) {\n return props?.hover === true ? {\n enabled: true,\n handleClose: safePolygon({ blockPointerEvents: true }),\n restMs: 0,\n } : props?.hover;\n}\nfunction getClickProps(props) {\n return props && !props.hover && !props.click ? {\n enabled: true,\n } : props?.click;\n}\n/**\n * The component is instantiated when all interactions are known\n * @param param0\n * @returns\n */\nexport function Popover(props) {\n const slots = {};\n processSlots(props.children, slots);\n if (!slots.content) {\n throw new Error('Popover must provide a content slot');\n }\n const triggerProps = slots.trigger?.props;\n const contentProps = slots.content.props;\n // wait for the trigger to be defined\n return _jsx(ResolvedPopover, { ...props, trigger: triggerProps, content: contentProps });\n}\nfunction ResolvedPopover({ middleware, offset: defaultOffset, trigger, dismiss = true, content, placement, strategy, zIndex = 40 }) {\n const [isOpen, setIsOpen] = useState(false);\n const floating = useFloating({\n open: isOpen,\n placement,\n strategy,\n onOpenChange: setIsOpen,\n middleware: middleware || [offset(defaultOffset || 4), shift(), flip()],\n whileElementsMounted: autoUpdate // stick to the anchor when resizing / scrolling\n });\n const { floatingStyles, refs: { setReference, setFloating }, context, } = floating;\n const dismissInteraction = useDismiss(context, computeElementProps(dismiss));\n const clickInteraction = useClick(context, computeElementProps(getClickProps(trigger)));\n const hoverInteraction = useHover(context, computeElementProps(getHoverProps(trigger)));\n const { getReferenceProps, getFloatingProps, } = useInteractions([dismissInteraction, clickInteraction, hoverInteraction]);\n const { isMounted, styles: transitionStyles } = useTransitionStyles(context, content.transition);\n return (_jsxs(PopoverContext.Provider, { value: {\n ...floating,\n close: () => setIsOpen(false)\n }, children: [trigger &&\n _jsx(\"div\", { className: clsx(trigger.className, \"inline-block\"), ref: setReference, ...getReferenceProps(), children: trigger.children }), _jsx(FloatingPortal, { children: isMounted && (_jsx(\"div\", { ref: setFloating, style: { ...floatingStyles, zIndex: zIndex }, ...getFloatingProps(), children: _jsx(FloatingFocusManager, { context: context, children: _jsx(\"div\", { className: clsx(content.className, \"bg-popover rounded-md text-popover-foreground max-w-md\"), style: transitionStyles, children: content.children }) }) })) })] }));\n}\nfunction PopoverTrigger(_props) {\n return null;\n}\ndefineSlot('trigger', PopoverTrigger);\nfunction PopoverContent(_props) {\n return null;\n}\ndefineSlot('content', PopoverContent);\nPopover.Trigger = PopoverTrigger;\nPopover.Content = PopoverContent;\n//# sourceMappingURL=Popover.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport function Progress({ percent }) {\n return (_jsx(\"div\", { className: \"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700\", children: _jsx(\"div\", { className: \"bg-blue-600 h-2.5 rounded-full\", style: { width: `${percent}%` } }) }));\n}\n//# sourceMappingURL=Progress.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Table, VTooltip } from \"@vertesia/ui/core\";\nimport { Info } from \"lucide-react\";\nexport function PropertiesView({ className, properties }) {\n return (_jsx(Table, { className: className, children: _jsx(\"tbody\", { children: properties.map((property) => (_jsxs(\"tr\", { children: [_jsxs(\"td\", { className: 'w-1/3 font-semibold gap-2', children: [_jsx(\"span\", { children: property.name }), property.description &&\n _jsx(VTooltip, { description: property.description, placement: \"top\", children: _jsx(Info, { className: \"size-3 ml-2 text-muted-foreground\" }) })] }), _jsx(\"td\", { className: 'w-2/3', children: property.value ?? 'undefined' })] }, property.name))) }) }));\n}\n//# sourceMappingURL=PropertiesView.js.map","export var TypeNames;\n(function (TypeNames) {\n TypeNames[\"string\"] = \"string\";\n TypeNames[\"number\"] = \"number\";\n TypeNames[\"integer\"] = \"integer\";\n TypeNames[\"boolean\"] = \"boolean\";\n TypeNames[\"object\"] = \"object\";\n TypeNames[\"any\"] = \"any\";\n TypeNames[\"text\"] = \"text\";\n TypeNames[\"media\"] = \"media\";\n TypeNames[\"document\"] = \"document\";\n})(TypeNames || (TypeNames = {}));\nexport function parseTypeSignature(text) {\n text = text.trim();\n let isArray = false, isNullable = false;\n if (text.endsWith('?')) {\n isNullable = true;\n text = text.substring(0, text.length - 1).trim();\n }\n if (text.endsWith('[]')) {\n isArray = true;\n text = text.substring(0, text.length - 2).trim();\n }\n const name = TypeNames[text];\n if (!name) {\n throw new Error(`Unknown type \"${text}\"`);\n }\n return { name, isArray, isNullable, isObject: name === TypeNames.object };\n}\n//# sourceMappingURL=type-signature.js.map","export function setPropertyName(schema, name, newName) {\n if (schema.properties) {\n const properties = schema.properties;\n const newProperties = {};\n for (const key of Object.keys(properties)) {\n const value = properties[key];\n if (key === name) {\n newProperties[newName] = value;\n }\n else {\n newProperties[key] = value;\n }\n }\n schema.properties = newProperties;\n }\n if (schema.required) {\n schema.required = schema.required.map(x => x === name ? newName : x);\n }\n}\nexport function setRequireProperty(schema, name, isRequired) {\n if (Array.isArray(schema.required)) {\n const index = schema.required.indexOf(name);\n if (isRequired) {\n if (index < 0) {\n schema.required.push(name);\n }\n }\n else {\n if (index > -1) {\n schema.required.splice(index, 1);\n }\n }\n }\n else if (isRequired) {\n schema.required = [name];\n }\n}\nexport function setPropertyType(schema, type) {\n const isAny = type.name === \"any\";\n let typeObj = isAny ?\n undefined\n : (type.isNullable ?\n [type.name, \"null\"]\n : type.name);\n if (type.isArray) {\n schema.type = \"array\";\n schema.properties = undefined;\n if (!schema.items || Array.isArray(schema.items)) {\n schema.items = {\n type: typeObj,\n properties: type.isObject ? {} : undefined\n };\n }\n else {\n const items = schema.items;\n items.type = typeObj;\n if (type.isObject && !items.properties) {\n items.properties = {};\n }\n }\n }\n else {\n schema.type = typeObj;\n schema.items = undefined;\n if (type.isObject) {\n if (!schema.properties) {\n schema.properties = {};\n }\n }\n else {\n schema.properties = undefined;\n }\n }\n}\nexport function removeProperty(schema, name) {\n if (schema.properties) {\n delete schema.properties[name];\n if (Array.isArray(schema.required)) {\n schema.required = schema.required.filter(x => x !== name);\n }\n }\n}\n/**\n * Create a new property in the schema\n * @param schema\n * @param name\n * @param type\n * @param isRequired\n */\nexport function addProperty(schema, name, type, isRequired = false) {\n if (schema.type !== \"object\") {\n throw new Error(\"Cannot add property to a non-object schema\");\n }\n if (!schema.properties) {\n schema.properties = {};\n }\n const newSchema = {};\n setPropertyType(newSchema, type);\n schema.properties[name] = newSchema;\n if (isRequired) {\n if (Array.isArray(schema.required)) {\n addRequired(schema.required, name);\n }\n else {\n schema.required = [name];\n }\n }\n return newSchema;\n}\nexport function getTypeSignature(schema) {\n let isNullable = false, isArray = false;\n let typeName;\n const type = schema.type;\n if (Array.isArray(type)) {\n for (const t of type) {\n if (t === \"null\") {\n isNullable = true;\n }\n else if (!typeName) {\n typeName = t;\n }\n }\n }\n else {\n typeName = type;\n }\n if (!typeName) {\n typeName = \"any\";\n }\n if (typeName === 'array') {\n isArray = true;\n typeName = getItemTypeName(schema.items);\n }\n let displayTypeName = typeName;\n switch (schema.editor) {\n case 'textarea': {\n displayTypeName = 'text';\n break;\n }\n case 'media': {\n displayTypeName = 'media';\n break;\n }\n case 'document': {\n displayTypeName = 'document';\n break;\n }\n }\n return {\n isNullable,\n isArray,\n isObject: typeName === \"object\",\n name: displayTypeName\n };\n}\n// TODO we don't support array of arrays\n// for array of multiple type we get the first type\nfunction getItemTypeName(schema) {\n if (!schema) {\n return \"any\";\n }\n let name;\n if (Array.isArray(schema)) {\n name = getFirstNotNullType(schema[0].type);\n }\n else {\n name = getFirstNotNullType(schema.type);\n }\n if (name === \"array\" || name === \"null\") {\n name = \"any\";\n }\n return name;\n}\nfunction getFirstNotNullType(type) {\n if (!type) {\n return \"any\";\n }\n if (Array.isArray(type)) {\n return type.find(x => x !== \"null\") || \"any\";\n }\n return type;\n}\nfunction addRequired(required, name) {\n if (!required.includes(name)) {\n required.push(name);\n }\n}\n//# sourceMappingURL=json-schema4-utils.js.map","import { TypeNames, parseTypeSignature } from \"./type-signature.js\";\nimport { addProperty, getTypeSignature, removeProperty, setPropertyName, setPropertyType, setRequireProperty } from \"./json-schema4-utils.js\";\nlet new_prop_name_cnt = 0;\nexport class ManagedSchema {\n // the schema source contains information about where the schema was loaded\n // the uri serves to retrieve the schema and for now only store:ID URIs are supported\n source;\n onChange = () => { };\n schema;\n root;\n constructor(schema, title) {\n if (!schema) {\n this.schema = {\n title: title,\n type: \"object\",\n properties: {},\n };\n }\n else if (typeof schema === 'string') {\n this.schema = JSON.parse(schema);\n }\n else {\n this.schema = schema;\n }\n if (!this.schema.properties) {\n this.schema.properties = {};\n }\n this.root = new SchemaNode(\"\", this.schema, this);\n this.root.loadChildren();\n }\n get isEmpty() {\n return !this.root.children || this.root.children.length === 0;\n }\n get children() {\n return this.root.children;\n }\n reload() {\n this.root = new SchemaNode(\"\", this.schema, this);\n this.root.loadChildren();\n this.onChange?.(this);\n return this;\n }\n withSource(name, uri) {\n this.source = {\n uri,\n name\n };\n return this;\n }\n withChangeListener(cb) {\n this.onChange = cb;\n return this;\n }\n replaceSchema(schema) {\n if (!schema) {\n this.schema = {\n title: this.schema.title,\n type: \"object\",\n properties: {},\n };\n }\n else {\n this.schema = schema;\n }\n this.reload();\n }\n clone() {\n const clone = new ManagedSchema(this.schema);\n clone.source = this.source;\n if (this.onChange) {\n clone.withChangeListener(this.onChange);\n }\n return clone;\n }\n}\nexport class SchemaNode {\n schema;\n loader;\n parent;\n name;\n isRequired = false;\n type;\n children;\n constructor(name, schema, loader, parent) {\n this.schema = schema;\n this.loader = loader;\n this.parent = parent;\n this.name = name;\n this.type = getTypeSignature(schema);\n if (this.parent) {\n let required = this.parent._getPropertiesSchema().required;\n this.isRequired = required && Array.isArray(required) ? required.includes(name) : false;\n }\n }\n get title() {\n return this.schema.title;\n }\n set title(value) {\n this.schema.title = value;\n }\n get description() {\n return this.schema.description;\n }\n set description(value) {\n this.schema.description = value;\n }\n get isParent() {\n return this.type.isObject;\n }\n // the isNew is a hack to preserve the open state in UI after a node is created and the tree reloaded\n get isNew() {\n return !!this.schema.isNew;\n }\n set isNew(value) {\n if (value) {\n this.schema.isNew = true;\n }\n else {\n delete this.schema.isNew;\n }\n }\n resetIsNew() {\n const isNew = this.isNew;\n this.isNew = false;\n return isNew;\n }\n // end hack\n getNameSignature() {\n return `${this.name}${this.isRequired ? '' : '?'}`;\n }\n getTypeSignature() {\n return `${this.type.name}${this.type.isArray ? '[]' : ''}${this.type.isNullable ? '?' : ''}`;\n }\n getSignature() {\n return `${this.getNameSignature()}: ${this.getTypeSignature()}`;\n }\n reloadTree() {\n this.loader.reload();\n }\n loadChildren() {\n this.children = [];\n if (this.schema.items && this.schema.items.properties) {\n this._loadChildren(this.schema.items.properties);\n }\n else if (this.schema.properties) {\n this._loadChildren(this.schema.properties);\n }\n }\n _loadChildren(properties) {\n for (const name of Object.keys(properties)) {\n const childSchema = properties[name];\n const child = new SchemaNode(name, childSchema, this.loader, this);\n this.children.push(child);\n if (child.isParent) {\n child.loadChildren();\n }\n }\n }\n _getPropertiesSchema() {\n if (this.type.isArray && this.type.isObject) {\n return this.schema.items;\n }\n else {\n return this.schema;\n }\n }\n findAvailableChildName(prefix) {\n const properties = this._getPropertiesSchema().properties || {};\n let name;\n do {\n name = prefix + (++new_prop_name_cnt);\n } while (properties[name]);\n return name;\n }\n /**\n * Add a new child node\n */\n addChild(name, type, isRequired = false) {\n if (!this.type.isObject) {\n throw new Error(\"Cannot add child to a non object node\");\n }\n if (!this.children) {\n this.children = [];\n }\n let schema = this._getPropertiesSchema();\n const childSchema = addProperty(schema, name, type, isRequired);\n const child = new SchemaNode(name, childSchema, this.loader, this);\n this.children.push(child);\n return child;\n }\n /**\n * Remove this node\n */\n remove() {\n if (this.parent && this.parent.type.isObject) {\n const schema = this.parent._getPropertiesSchema();\n removeProperty(schema, this.name);\n if (this.parent.children) {\n this.parent.children = this.parent.children.filter(c => c.name !== this.name);\n }\n return true;\n }\n return false;\n }\n update(data) {\n let updated = false;\n if (data.name != null && this.name !== data.name) {\n if (this.parent) {\n setPropertyName(this.parent._getPropertiesSchema(), this.name, data.name);\n }\n this.name = data.name;\n updated = true;\n }\n if (data.isRequired != null && this.isRequired !== data.isRequired) {\n if (this.parent) {\n setRequireProperty(this.parent._getPropertiesSchema(), this.name, data.isRequired);\n }\n this.isRequired = data.isRequired;\n updated = true;\n }\n let actualType = data.type?.name;\n if (actualType === \"any\") {\n actualType = undefined;\n }\n const typeChanged = actualType !== this.schema.type;\n if (data.type) {\n setPropertyType(this.schema, data.type);\n this.type = data.type;\n if (this.type.isObject) {\n if (!this.children) {\n this.children = [];\n }\n }\n else {\n this.children = undefined;\n }\n updated = true;\n }\n // update editor field\n if (this.schema.editor && data.editor === null) {\n // explicitly set to null => delete current editor\n this.schema.editor = undefined;\n updated = true;\n }\n else if (data.editor) { // a new editor is set\n this.schema.editor = data.editor;\n updated = true;\n }\n else if (typeChanged) {\n // preserve editor only if the type didn't change\n this.schema.editor = undefined;\n updated = true;\n }\n if (data.description !== this.description) {\n this.description = data.description;\n updated = true;\n }\n return updated;\n }\n getUpdateFromNameAndTypeSignature(nameSig, typeSig) {\n let name = nameSig.trim();\n let isRequired = true;\n if (name.endsWith('?')) {\n name = name.substring(0, name.length - 1).trim();\n isRequired = false;\n }\n const type = parseTypeSignature(typeSig);\n let editor;\n if (type.name === 'text') {\n type.name = TypeNames.string;\n editor = 'textarea';\n }\n else if (type.name === 'media') {\n type.name = TypeNames.any;\n editor = 'media';\n }\n else if (type.name === 'document') {\n type.name = TypeNames.any;\n editor = 'document';\n }\n else {\n editor = null; // remove custom editor\n }\n return { name, type, isRequired, editor };\n }\n updateFromNameAndTypeSignature(nameSig, typeSig) {\n return this.update(this.getUpdateFromNameAndTypeSignature(nameSig, typeSig));\n }\n updateFromSignature(text) {\n text = text.trim();\n const index = text.indexOf(':');\n if (index < 0) {\n throw new Error(\"Expecting a name and a type separated by a colon\");\n }\n const nameSig = text.substring(0, index);\n const typeSig = text.substring(index + 1);\n return this.updateFromNameAndTypeSignature(nameSig, typeSig);\n }\n}\n//# sourceMappingURL=ManagedSchema.js.map","export function getEditableSchemaProperty(schema) {\n return {\n name: schema.getNameSignature(),\n type: schema.getTypeSignature(),\n description: schema.description\n };\n}\n//# sourceMappingURL=EditableSchemaProperty.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useRef, useState } from 'react';\nimport { AlignLeft } from 'lucide-react';\nimport { Button, VModal, ModalBody, ModalFooter, VModalTitle, Styles, VSelectBox } from '@vertesia/ui/core';\nimport { TypeNames } from '../type-signature.js';\nfunction makeTypeOptions() {\n const types = Object.values(TypeNames);\n const options = [...types];\n for (const type of types) {\n options.push(type + '[]');\n }\n types.sort();\n return options;\n}\nconst TYPE_OPTIONS = makeTypeOptions();\nexport function PropertyEditor({ value, onChange, onCancel, onSave }) {\n const [isModalOpen, setModalOpen] = useState(false);\n if (!value)\n return null;\n const onNameChange = (text) => {\n onChange({ ...value, name: text });\n };\n const onTypeChange = (text) => {\n onChange({ ...value, type: text });\n };\n const onDescriptionChange = (text) => {\n if (text !== undefined && typeof text === 'string') {\n onChange({ ...value, description: text }, true);\n }\n setModalOpen(false);\n };\n return (_jsxs(\"div\", { className: \"flex items-center\", children: [_jsx(\"div\", { className: \"flex-1\", children: _jsx(PropertyNameEditor, { value: value.name, onChange: onNameChange, onCancel: onCancel, onSave: onSave }) }), _jsx(\"div\", { className: \"px-1 font-semibold\", children: \":\" }), _jsx(\"div\", { className: \"flex-1\", children: _jsx(PropertyTypeEditor, { value: value.type, onChange: onTypeChange, onCancel: onCancel, onSave: onSave }) }), _jsxs(\"div\", { children: [_jsx(Button, { variant: \"ghost\", size: \"xs\", onClick: () => setModalOpen(true), title: \"Edit description\", children: _jsx(AlignLeft, { className: \"size-4\" }) }), _jsx(EditDescriptionModal, { value: value.description, isOpen: isModalOpen, onClose: onDescriptionChange })] })] }));\n}\nexport function PropertyNameEditor({ value, onChange, onCancel, onSave }) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current?.focus();\n }, []);\n const onKeyUp = (e) => {\n switch (e.key) {\n case \"Enter\":\n onSave?.();\n break;\n case \"Escape\":\n onCancel?.();\n break;\n }\n };\n const _onChange = (e) => {\n onChange(e.target.value);\n };\n return (_jsx(\"input\", { onKeyUp: onKeyUp, ref: ref, value: value, onChange: _onChange, className: Styles.INPUT_UNSTYLED, style: { fontSize: \"inherit\", width: \"\", display: \"inline\" } }));\n}\nfunction PropertyTypeEditor({ value, onChange, onCancel, onSave }) {\n const onBlur = () => {\n onSave?.();\n };\n const onKeyDown = (e, isOpen) => {\n if (!isOpen) {\n if (e.key === 'Enter') {\n onSave?.();\n }\n else if (e.key === 'Escape') {\n onCancel?.();\n }\n }\n };\n return (_jsx(VSelectBox, { className: Styles.INPUT_UNSTYLED, options: TYPE_OPTIONS, value: value || '', onBlur: onBlur, onChange: onChange, onKeyDown: onKeyDown, popupClass: \"schema-type-suggest-popup z-90\" }));\n}\nfunction EditDescriptionModal({ value, isOpen, onClose }) {\n return (_jsxs(VModal, { isOpen: isOpen, onClose: onClose, children: [_jsx(VModalTitle, { children: \"Edit description\" }), _jsx(EditDescriptionModalForm, { value: value, onSave: onClose })] }));\n}\nfunction EditDescriptionModalForm({ value, onSave }) {\n const ref = useRef(null);\n const [currentValue, setCurrentValue] = useState(value || '');\n useEffect(() => {\n ref.current && ref.current.focus();\n }, [ref.current]);\n return (_jsxs(_Fragment, { children: [_jsx(ModalBody, { className: \"h-max\", children: _jsx(\"textarea\", { ref: ref, className: \"dark:bg-gray-800 w-full h-full dark:text-white\", value: currentValue, onChange: (e) => setCurrentValue(e.target.value) }) }), _jsx(ModalFooter, { children: _jsx(Button, { onClick: () => onSave(currentValue), children: \"Save Changes\" }) })] }));\n}\n//# sourceMappingURL=PropertyEditor.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function PropertyViewer({ value }) {\n if (!value)\n return null;\n return (_jsxs(\"div\", { className: 'w-full flex items-baseline', children: [_jsx(\"div\", { children: value.name || '' }), _jsx(\"div\", { className: 'ml-2 text-sm text-muted', children: value.type || '' })] }));\n}\n//# sourceMappingURL=PropertyViewer.js.map","import { useState } from \"react\";\nimport { ManagedSchema } from \"../ManagedSchema.js\";\nexport function useSchema(jsonSchema) {\n const [schema, setSchema] = useState(new ManagedSchema(jsonSchema || { type: \"object\", properties: {} }).withChangeListener((schema) => {\n setSchema(schema.clone());\n }));\n return schema;\n}\n//# sourceMappingURL=SchemaContext.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\nimport { SquarePen, Trash2 } from 'lucide-react';\nimport { Button, Styles, useClickOutside, useFlag } from '@vertesia/ui/core';\nconst VIEW_BOX = \"block text-sm sm:leading-6 rounded-md border-0 py-1.5 px-4\";\nconst VIEW_BOX_HOVER = `${VIEW_BOX} hover:shadow-xs hover:ring-1 hover:ring-inset hover:ring-ring`;\nconst EDIT_BOX = `${VIEW_BOX} shadow-xs ring-1 ring-inset ring-ring`;\nexport function Editable({ value, onChange, onDelete, outlineOnHover = false, editOnClick = true, placeholder, viewer, editor, skipClickOutside, isEditing = false, readonly = false, onValidate, }) {\n const { on, off, isOn } = useFlag(isEditing);\n const [validationError, setValidationError] = useState();\n const _onChange = (value) => {\n if (onValidate) {\n const err = onValidate(value);\n if (err) {\n setValidationError(err);\n return; // don't save\n }\n else {\n setValidationError(undefined);\n }\n }\n if (onChange(value)) {\n off();\n }\n };\n const _skipClickOutside = (e) => {\n if (skipClickOutside) {\n return skipClickOutside(e);\n }\n return false;\n };\n return (_jsxs(\"div\", { className: \"\", children: [isOn && !readonly ?\n _jsx(DataEdit, { value: value, onSave: _onChange, onCancel: off, editor: editor, skipClickOutside: _skipClickOutside })\n : _jsx(DataView, { value: value, onEdit: on, viewer: viewer, placeholder: placeholder, outlineOnHover: outlineOnHover, editOnClick: editOnClick, onDelete: onDelete, readonly: readonly }), validationError &&\n _jsx(\"div\", { className: \"text-red-500 text-sm\", children: validationError })] }));\n}\nfunction DataView({ viewer: Viewer, value, onEdit, editOnClick, outlineOnHover, placeholder, onDelete, readonly }) {\n const onClick = () => {\n editOnClick && onEdit();\n };\n const onKeyUp = (e) => {\n if (e.key === \"Enter\") {\n onEdit();\n }\n };\n const btnStyle = 'invisible group-hover:visible';\n return (_jsxs(\"div\", { tabIndex: 0, onKeyUp: onKeyUp, onClick: onClick, className: clsx(\"flex justify-start items-center group\", outlineOnHover ? VIEW_BOX_HOVER : VIEW_BOX, { 'cursor-pointer': editOnClick }), children: [_jsx(Viewer, { value: value, placeholder: placeholder }), _jsxs(\"div\", { className: 'ml-auto flex space-x-2', children: [!readonly && onDelete &&\n _jsx(Button, { variant: \"ghost\", size: \"sm\", className: btnStyle, onClick: onDelete, children: _jsx(Trash2, { className: \"size-4\" }) }), !readonly ?\n _jsx(Button, { variant: \"ghost\", size: \"sm\", className: btnStyle, onClick: onEdit, children: _jsx(SquarePen, { className: \"size-4\" }) })\n : null] })] }));\n}\nfunction DataEdit({ editor: Editor, value, onSave, onCancel, skipClickOutside }) {\n const [actualValue, setActualValue] = useState(value);\n const latestValue = useRef(value);\n const [debounceTimer, setDebounceTimer] = useState(null);\n const handleSave = () => {\n onSave(latestValue.current);\n };\n const ref = useClickOutside(handleSave, skipClickOutside);\n const _onChange = (value, autoSave = false) => {\n setActualValue(value);\n latestValue.current = value;\n if (autoSave) {\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n setDebounceTimer(setTimeout(() => { onSave(value); }, 500));\n }\n };\n return (_jsx(\"div\", { ref: ref, children: _jsx(\"div\", { className: EDIT_BOX, children: _jsx(\"div\", { className: \"w-full\", onClick: (e) => e.stopPropagation(), children: _jsx(Editor, { value: actualValue, onChange: _onChange, onSave: handleSave, onCancel: onCancel }) }) }) }));\n}\nexport function TextDataViewer({ value, placeholder }) {\n if (!value) {\n return (_jsx(\"span\", { className: 'text-gray-400', children: placeholder || 'Missing value' }));\n }\n else {\n return (_jsx(\"span\", { children: value == null ? '' : value.toString() }));\n }\n}\nexport function TextDataEditor({ value, onChange, onCancel, onSave }) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current?.focus();\n }, []);\n const onKeyUp = (e) => {\n switch (e.key) {\n case \"Enter\":\n onSave?.();\n break;\n case \"Escape\":\n onCancel?.();\n break;\n }\n };\n const _onChange = (e) => {\n onChange(e.target.value);\n };\n return (_jsx(\"input\", { onKeyUp: onKeyUp, ref: ref, value: value, onChange: _onChange, className: Styles.INPUT_UNSTYLED, style: { fontSize: \"inherit\" } }));\n}\nexport function EditableText(props) {\n if (!props.viewer) {\n props.viewer = TextDataViewer;\n }\n if (!props.editor) {\n props.editor = TextDataEditor;\n }\n return (_jsx(Editable, { ...props }));\n}\n//# sourceMappingURL=Editable.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport { ChevronDown, ChevronRight, Plus } from 'lucide-react';\nimport { Button, useToast } from '@vertesia/ui/core';\nimport { TypeNames } from '../type-signature.js';\nimport { Editable } from './Editable.js';\nimport { getEditableSchemaProperty } from './EditableSchemaProperty.js';\nimport { PropertyEditor } from './PropertyEditor.js';\nimport { PropertyViewer } from './PropertyViewer.js';\n// do not exit edit mode when user is clicking inside the type suggestion popup\nfunction skipClickOutside(e) {\n const target = e.target;\n return !!(target.closest && target.closest('.schema-type-suggest-popup'));\n}\n;\nexport function SchemaEditor({ schema, readonly = false }) {\n return (_jsxs(\"ul\", { className: \"\", children: [schema.children.map(prop => {\n return renderProperty(prop, readonly);\n }), !readonly ? _jsx(AddPropertyButton, { parent: schema.root }) : null] }));\n}\nfunction renderProperty(node, readonly) {\n return (node.isParent ?\n _jsx(ParentItem, { property: node, readonly: readonly }, node.name)\n :\n _jsx(SimpleItem, { node: node, readonly: readonly }, node.name));\n}\nfunction SimpleItem({ node, readonly }) {\n return (_jsx(\"li\", { children: _jsx(PropertyTitleBar, { property: node, readonly: readonly }) }));\n}\nfunction ParentItem({ property, readonly }) {\n const [isOpen, setOpen] = useState(true);\n const Icon = isOpen ? ChevronDown : ChevronRight;\n return (_jsxs(\"li\", { children: [_jsxs(\"div\", { className: 'flex items-center w-full', children: [_jsx(\"button\", { onClick: () => setOpen(!isOpen), children: _jsx(Icon, { className: \"size-4\" }) }), _jsx(\"div\", { className: 'flex-1', children: _jsx(PropertyTitleBar, { property: property, readonly: readonly }) })] }), isOpen &&\n _jsxs(\"ul\", { className: \"ml-4 border-l border-gray-400 border-dashed\", children: [(property.children || []).map(prop => renderProperty(prop, readonly)), !readonly ? _jsx(AddPropertyButton, { parent: property }) : null] })] }));\n}\nexport function validatePropertyName(propertyName) {\n if (!propertyName) {\n return 'Name is required';\n }\n if (/^[a-zA-Z0-9_]+[?]?$/.test(propertyName)) {\n return undefined; // valid\n }\n return 'Only letters, numbers, underscores or question mark are allowed (a-zA-Z0-9_?)';\n}\nfunction PropertyTitleBar({ property, readonly }) {\n const toast = useToast();\n const onChange = (value) => {\n try {\n if (value.description && typeof value.description !== 'string') {\n value.description = undefined;\n }\n const update = property.getUpdateFromNameAndTypeSignature(value.name, value.type);\n if (property.update({ ...update, description: value.description })) {\n property.reloadTree();\n }\n }\n catch (err) {\n toast({\n status: 'error',\n title: 'Invalid property declaration',\n description: err.message,\n duration: 9000\n });\n return false;\n }\n return true;\n };\n const isNew = property.resetIsNew();\n const editableProp = getEditableSchemaProperty(property);\n return (_jsx(Editable, { value: editableProp, onChange: onChange, onDelete: () => {\n property.remove();\n property.reloadTree();\n }, editor: PropertyEditor, viewer: PropertyViewer, outlineOnHover: true, isEditing: isNew, skipClickOutside: skipClickOutside, readonly: readonly, onValidate: (property) => validatePropertyName(property.name) }));\n}\nfunction AddPropertyButton({ parent }) {\n const add = () => {\n const name = parent.findAvailableChildName(\"new_property_\");\n const child = parent.addChild(name, { isObject: false, isArray: false, isNullable: false, name: TypeNames.string }, true);\n child.isNew = true;\n parent.reloadTree();\n };\n return (_jsxs(Button, { variant: \"ghost\", onClick: add, children: [_jsx(Plus, { className: 'size-4' }), \"Add property\"] }));\n}\n//# sourceMappingURL=SchemaEditor.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect, useRef } from \"react\";\nexport function SvgIcon({ content, ...props }) {\n const containerRef = useRef(null);\n useEffect(() => {\n if (!containerRef.current)\n return;\n // Parse the SVG string\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, 'image/svg+xml');\n const svgEl = doc.querySelector('svg');\n if (!svgEl) {\n console.warn('SvgIcon: No <svg> element found in provided string');\n containerRef.current.innerHTML = '';\n return;\n }\n // Apply all passed props to the SVG element\n props && Object.entries(props).forEach(([key, value]) => {\n if (value == null)\n return;\n const attrName = key === 'className' ? 'class' : key;\n svgEl.setAttribute(attrName, String(value));\n });\n // Clear and append the new SVG\n containerRef.current.innerHTML = '';\n containerRef.current.appendChild(svgEl);\n }, [content, props]);\n return _jsx(\"span\", { ref: containerRef });\n}\nexport function createSvgIcon(content) {\n const IconComponent = (props) => {\n return _jsx(SvgIcon, { content: content, ...props });\n };\n return IconComponent;\n}\n//# sourceMappingURL=SvgIcon.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState, useRef } from \"react\";\nimport { UploadIcon } from \"lucide-react\";\nimport { Button } from \"@vertesia/ui/core\";\n/**\n * A reusable drop zone component for file uploads\n *\n * @example\n * <DropZone\n * onDrop={handleFileSelect}\n * message=\"Drag and drop files here\"\n * buttonLabel=\"Select Files\"\n * />\n */\nexport function DropZone({ onDrop, message, buttonLabel = \"Upload Files\", allowFolders = true, className = \"\" }) {\n const [isDragging, setIsDragging] = useState(false);\n const dropZoneRef = useRef(null);\n const handleDragOver = (e) => {\n e.preventDefault();\n if (e.dataTransfer.types.includes('Files')) {\n setIsDragging(true);\n }\n };\n const handleDragLeave = (e) => {\n e.preventDefault();\n // Only set dragging to false if leaving the container (not entering a child)\n if (dropZoneRef.current && !dropZoneRef.current.contains(e.relatedTarget)) {\n setIsDragging(false);\n }\n };\n const handleDrop = async (e) => {\n e.preventDefault();\n setIsDragging(false);\n if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {\n // Handle folders using the DataTransferItemList API which supports directory reading\n const items = Array.from(e.dataTransfer.items);\n const files = [];\n const folders = new Set();\n const processEntry = async (entry) => {\n if (entry.isFile) {\n // Get file\n const file = await new Promise((resolve) => {\n entry.file((file) => {\n // Store full path in the file object for location use\n Object.defineProperty(file, \"webkitRelativePath\", {\n writable: true,\n value: entry.fullPath.substring(1), // Remove leading slash\n });\n resolve(file);\n });\n });\n // Skip hidden files\n if (!file.name.startsWith(\".\") && file.size > 0) {\n files.push(file);\n }\n // Add folder path to tracking\n const folderPath = entry.fullPath.substring(1).split(\"/\").slice(0, -1).join(\"/\");\n if (folderPath) {\n folders.add(folderPath);\n }\n }\n else if (entry.isDirectory) {\n // Get folder reader\n const reader = entry.createReader();\n const entries = await new Promise((resolve) => {\n reader.readEntries((entries) => {\n resolve(entries);\n });\n });\n // Process all entries\n await Promise.all(entries.map(processEntry));\n // Add this folder to tracking\n const folderPath = entry.fullPath.substring(1);\n if (folderPath) {\n folders.add(folderPath);\n }\n }\n };\n try {\n // Process all dropped items\n await Promise.all(items.map((item) => {\n const entry = item.webkitGetAsEntry ? item.webkitGetAsEntry() : item;\n if (entry) {\n return processEntry(entry);\n }\n return Promise.resolve();\n }));\n if (files.length > 0) {\n const topLevelFolders = new Set(Array.from(folders)\n .map((path) => path.split(\"/\")[0])\n .filter(Boolean));\n const folderCount = topLevelFolders.size;\n const fileCount = files.length;\n let message = \"\";\n if (folderCount > 0) {\n message =\n folderCount === 1\n ? `Preparing to upload 1 folder with ${fileCount} files...`\n : `Preparing to upload ${folderCount} folders with ${fileCount} files...`;\n }\n else {\n message = `Preparing to upload ${fileCount} file${fileCount === 1 ? \"\" : \"s\"}...`;\n }\n onDrop(files, { count: files.length, message });\n }\n }\n catch (error) {\n console.error(\"Error processing dropped files:\", error);\n // Fallback to simple file array if folder processing fails\n const fileArray = Array.from(e.dataTransfer.files);\n if (fileArray.length > 0) {\n onDrop(fileArray);\n }\n }\n }\n else if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {\n // Fallback for browsers that don't support items API\n const fileArray = Array.from(e.dataTransfer.files);\n onDrop(fileArray);\n }\n };\n const handleChange = (e) => {\n if (e.target.files && e.target.files.length > 0) {\n const fileArray = Array.from(e.target.files);\n // Check if there are directories (with webkitRelativePath)\n const hasDirectories = fileArray.some((file) => file.webkitRelativePath && file.webkitRelativePath.includes(\"/\"));\n if (hasDirectories) {\n // Count the unique top-level directories\n const topLevelDirs = new Set(fileArray.map((file) => file.webkitRelativePath?.split(\"/\")[0]).filter(Boolean));\n const folderCount = topLevelDirs.size;\n const fileCount = fileArray.length;\n // Create custom message with folder info\n const formattedMessage = folderCount === 1\n ? `Preparing to upload 1 folder with ${fileCount} files...`\n : `Preparing to upload ${folderCount} folders with ${fileCount} files...`;\n const customMessage = {\n count: fileArray.length,\n message: formattedMessage,\n };\n onDrop(fileArray, customMessage);\n }\n else {\n // Regular file upload\n const feedback = {\n count: fileArray.length,\n message: `Preparing to upload ${fileArray.length} file${fileArray.length === 1 ? \"\" : \"s\"}...`,\n };\n onDrop(fileArray, feedback);\n }\n }\n };\n const selectFile = () => {\n const fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.multiple = true;\n fileInput.accept = \"*\";\n fileInput?.click();\n fileInput.onchange = (event) => {\n handleChange(event);\n };\n };\n const selectFolder = () => {\n const folderInput = document.createElement(\"input\");\n folderInput.type = \"file\";\n folderInput.multiple = true;\n folderInput.accept = \"*\";\n folderInput.webkitdirectory = true; // webkitdirectory is not standard but widely supported\n folderInput?.click();\n folderInput.onchange = (event) => {\n handleChange(event);\n };\n };\n return (_jsxs(\"div\", { className: `flex flex-col items-center justify-center py-12 border-2 rounded-lg transition-colors ${isDragging ? \"border-color-primary bg-color-primary/10\" : \"border-dashed border-color-border\"} ${className}`, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [_jsx(UploadIcon, { className: `h-12 w-12 mb-3 transition-colors ${isDragging ? \"text-primary\" : \"text-muted/50\"}` }), _jsx(\"p\", { className: \"text-muted\", children: message }), _jsxs(\"div\", { className: \"flex gap-2 justify-center mt-2\", children: [_jsx(Button, { onClick: selectFile, children: buttonLabel }), allowFolders && (_jsx(Button, { onClick: selectFolder, children: \"Select Folder\" }))] })] }));\n}\n//# sourceMappingURL=DropZone.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { CheckCircleIcon } from \"lucide-react\";\nimport { useState } from \"react\";\n/**\n * Displays a collapsible category of upload results\n *\n * @example\n * <UploadResultCategory\n * title=\"Successfully Uploaded\"\n * count={3}\n * icon={<CheckCircleIcon className=\"h-4 w-4 text-green-500\" />}\n * items={[\"document1.pdf\", \"document2.pdf\", \"document3.pdf\"]}\n * />\n */\nexport function UploadResultCategory({ title, count, icon = _jsx(CheckCircleIcon, { className: \"h-4 w-4 text-green-500\" }), items }) {\n const [isExpanded, setIsExpanded] = useState(false);\n return (_jsxs(\"div\", { className: \"border border-color-border rounded-md overflow-hidden\", children: [_jsxs(\"div\", { className: \"flex items-center justify-between p-3 bg-color-muted/10 cursor-pointer\", onClick: () => setIsExpanded(!isExpanded), children: [_jsxs(\"div\", { className: \"flex items-center\", children: [_jsx(\"span\", { className: \"mr-2\", children: icon }), _jsx(\"span\", { className: \"font-medium\", children: title }), _jsx(\"span\", { className: \"ml-2 px-2 py-0.5 bg-color-muted/20 rounded-full text-xs\", children: count })] }), _jsx(\"button\", { className: \"text-muted\", children: _jsx(\"svg\", { className: `h-5 w-5 transition-transform ${isExpanded ? 'transform rotate-180' : ''}`, fill: \"none\", viewBox: \"0 0 24 24\", stroke: \"currentColor\", children: _jsx(\"path\", { strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: 2, d: \"M19 9l-7 7-7-7\" }) }) })] }), isExpanded && (_jsx(\"div\", { className: \"p-3 border-t border-color-border max-h-48 overflow-y-auto\", children: items.length > 0 ? (_jsx(\"ul\", { className: \"space-y-1\", children: items.map((item, index) => (_jsx(\"li\", { className: \"text-sm py-1 px-2 rounded hover:bg-color-muted/10\", children: item }, index))) })) : (_jsx(\"div\", { className: \"text-sm text-muted py-2\", children: \"No items to display\" })) }))] }));\n}\n//# sourceMappingURL=UploadResultCategory.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { CheckCircleIcon, AlertCircleIcon, XCircleIcon } from \"lucide-react\";\nimport { UploadResultCategory } from \"./UploadResultCategory\";\n/**\n * Displays a summary of upload results with collapsible categories\n *\n * @example\n * <UploadSummary\n * files={[\n * { name: \"document1.pdf\", status: \"success\" },\n * { name: \"document2.pdf\", status: \"skipped\" }\n * ]}\n * location=\"/reports/2023\"\n * />\n */\nexport function UploadSummary({ files, className = \"\", location, collection }) {\n // Group files by status\n const successFiles = files.filter(f => f.status === 'success');\n const updatedFiles = files.filter(f => f.status === 'updated');\n const skippedFiles = files.filter(f => f.status === 'skipped');\n const failedFiles = files.filter(f => f.status === 'failed');\n // Calculate counts\n const successCount = successFiles.length;\n const updatedCount = updatedFiles.length;\n const skippedCount = skippedFiles.length;\n const failedCount = failedFiles.length;\n const totalCount = files.length;\n return (_jsxs(\"div\", { className: `flex flex-col py-2 ${className}`, children: [_jsxs(\"div\", { className: \"flex items-center mb-4\", children: [_jsx(\"div\", { className: \"size-8 mr-4 rounded-full bg-success/10 flex items-center justify-center\", children: _jsx(CheckCircleIcon, { className: \"size-4 text-success\" }) }), _jsx(\"div\", { children: _jsxs(\"p\", { className: \"text-muted\", children: [totalCount, \" file\", totalCount !== 1 ? \"s\" : \"\", \" processed\", collection ? ` in collection '${collection}'` : \"\", location ? ` in folder '${location}'` : \"\"] }) })] }), _jsxs(\"div\", { className: \"space-y-3 mt-2\", children: [successCount > 0 && (_jsx(UploadResultCategory, { title: \"Successfully Uploaded\", count: successCount, icon: _jsx(CheckCircleIcon, { className: \"h-4 w-4 text-green-500\" }), items: successFiles.map(f => f.name) })), updatedCount > 0 && (_jsx(UploadResultCategory, { title: \"Successfully Updated\", count: updatedCount, icon: _jsx(CheckCircleIcon, { className: \"h-4 w-4 text-blue-500\" }), items: updatedFiles.map(f => f.name) })), skippedCount > 0 && (_jsx(UploadResultCategory, { title: \"Skipped (Already Existed)\", count: skippedCount, icon: _jsx(AlertCircleIcon, { className: \"h-4 w-4 text-amber-500\" }), items: skippedFiles.map(f => f.name) })), failedCount > 0 && (_jsx(UploadResultCategory, { title: \"Failed to Upload\", count: failedCount, icon: _jsx(XCircleIcon, { className: \"h-4 w-4 text-red-500\" }), items: failedFiles.map(f => f.name) }))] })] }));\n}\n//# sourceMappingURL=UploadSummary.js.map","export const ATTRIBUTE_GROUP_KEY = ':@';\nexport const ATTRIBUTE_TEXT = '#text';\nexport const ATTRIBUTE_COMMENT = '#comment';\nexport const ATTRIBUTE_CDATA = '#cdata';\nexport const DECLARATION_TAG = 'DECLARATION_TAG';\nexport const TAG = 'TAG';\nexport const defaultTheme = {\n tagColor: '#d43900',\n textColor: '#333',\n attributeKeyColor: '#2a7ab0',\n attributeValueColor: '#008000',\n separatorColor: '#333',\n commentColor: '#aaa',\n cdataColor: '#1d781d',\n fontFamily: 'monospace',\n};\nexport const darkTheme = {\n attributeKeyColor: '#FFD700',\n attributeValueColor: '#FF4500',\n tagColor: '#87CEFA',\n textColor: '#00FF00',\n separatorColor: '#FFD700',\n commentColor: '#BEBEBE',\n cdataColor: '#33CC66',\n fontFamily: 'monospace',\n};\n//# sourceMappingURL=index.js.map","import { createContext, useContext } from 'react';\nimport { defaultTheme } from '../constants';\nconst defaultState = {\n theme: defaultTheme,\n collapsible: false,\n indentSize: 2,\n};\nexport const XMLViewerContext = createContext(defaultState);\nexport const useXMLViewerContext = () => useContext(XMLViewerContext);\n//# sourceMappingURL=xml-viewer-context.js.map","import { XMLParser, XMLValidator } from 'fast-xml-parser';\nimport { useMemo } from 'react';\nimport { ATTRIBUTE_CDATA, ATTRIBUTE_COMMENT } from '../constants';\nconst parser = new XMLParser({\n preserveOrder: true,\n ignoreAttributes: false,\n attributeNamePrefix: '',\n allowBooleanAttributes: true,\n commentPropName: ATTRIBUTE_COMMENT,\n cdataPropName: ATTRIBUTE_CDATA,\n parseTagValue: false,\n});\nexport default function useXMLViewer(xml) {\n return useMemo(() => {\n try {\n if (!XMLValidator.validate(xml)) {\n throw new Error('Invalid XML!');\n }\n const json = parser.parse(xml);\n if (typeof xml === 'string' && xml.trim().length > 0 && json.length === 0) {\n throw new Error('Invalid XML!');\n }\n return { json, valid: true };\n }\n catch (e) {\n const error = e;\n return { json: null, valid: false, errorMessage: `Fail to parse: ${error.message}` };\n }\n }, [xml]);\n}\n//# sourceMappingURL=useXMLViewer.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nexport function CDataTag(props) {\n const { indentation, children, isInline } = props;\n const { theme } = useXMLViewerContext();\n return (_jsxs(\"div\", { style: { color: theme.cdataColor }, children: [_jsx(\"span\", { children: `${indentation}<![CDATA[` }), children, _jsx(\"span\", { children: `${isInline ? '' : indentation}]]>` })] }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nexport function CollapseIcon(props) {\n const { collapsible, theme } = useXMLViewerContext();\n const { collapsed } = props;\n return collapsible ? (_jsx(\"span\", { style: { position: 'relative' }, children: _jsx(\"span\", { style: { position: 'absolute', right: '0', border: 0, padding: 0, background: 'none' }, children: _jsx(Caret, { fill: theme.separatorColor, style: { transform: `rotate(${collapsed ? 0 : 90}deg)`, transition: 'transform 0.2s' } }) }) })) : null;\n}\nfunction Caret({ ...attrs }) {\n return (_jsx(\"svg\", { width: \"16px\", height: \"16px\", viewBox: \"0 0 24 24\", ...attrs, children: _jsx(\"path\", { d: \"M9 17.898C9 18.972 10.2649 19.546 11.0731 18.8388L17.3838 13.3169C18.1806 12.6197 18.1806 11.3801 17.3838 10.6829L11.0731 5.16108C10.2649 4.45388 9 5.02785 9 6.1018V17.898Z\" }) }));\n}\n//# sourceMappingURL=index.js.map","import { isNil } from 'lodash-es';\nimport { useEffect, useState } from 'react';\nimport { useXMLViewerContext } from '../context/xml-viewer-context';\nexport function useCollapsible(level) {\n const { collapsible, initialCollapsedDepth } = useXMLViewerContext();\n const [collapsed, setCollapsed] = useState(() => isNil(initialCollapsedDepth) || !collapsible ? false : level >= initialCollapsedDepth);\n const toggleCollapsed = () => setCollapsed((currentCollapsed) => !currentCollapsed);\n useEffect(() => {\n setCollapsed(isNil(initialCollapsedDepth) || !collapsible ? false : level >= initialCollapsedDepth);\n }, [initialCollapsedDepth, level, collapsible]);\n return {\n collapsed,\n buttonProps: !collapsible\n ? {}\n : {\n onClick: toggleCollapsed,\n role: 'button',\n style: { cursor: 'pointer' },\n },\n };\n}\n//# sourceMappingURL=useCollapsible.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { CollapseIcon } from '../../components/CollapseIcon';\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nimport { useCollapsible } from '../../hooks/useCollapsible';\nexport function CommentTag(props) {\n const { indentation, children, isInline, level } = props;\n const { theme } = useXMLViewerContext();\n const { collapsed, buttonProps } = useCollapsible(level);\n return (_jsxs(\"div\", { style: { color: theme.commentColor }, children: [_jsxs(\"span\", { ...buttonProps, children: [_jsx(\"span\", { children: indentation }), _jsx(CollapseIcon, { collapsed: collapsed }), _jsx(\"span\", { children: '<!-- ' })] }), !collapsed && children, collapsed && '...', _jsx(\"span\", { children: `${isInline || collapsed ? ' ' : indentation}-->` })] }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nexport function Attributes(props) {\n const { attributes } = props;\n const { theme } = useXMLViewerContext();\n if (!attributes) {\n return null;\n }\n return (_jsx(\"span\", { children: Object.entries(attributes).map(([key, value]) => (_jsxs(\"span\", { children: [_jsx(\"span\", { style: { color: theme.attributeKeyColor }, children: ` ${key}` }), _jsx(\"span\", { style: { color: theme.separatorColor }, children: \"=\" }), _jsx(\"span\", { style: { color: theme.attributeValueColor }, children: `\"${value}\"` })] }, `attribute-${key}`))) }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Attributes } from '../../components/Attributes';\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nexport function DeclarationTag(props) {\n const { indentation, tagKey, attributes } = props;\n const { theme } = useXMLViewerContext();\n return (_jsxs(\"div\", { children: [_jsx(\"span\", { style: { color: theme.separatorColor }, children: `${indentation}<?` }), _jsx(\"span\", { style: { color: theme.tagColor }, children: `${tagKey.slice(1)}` }), _jsx(Attributes, { attributes: attributes }), _jsx(\"span\", { style: { color: theme.separatorColor }, children: '?>' })] }));\n}\n//# sourceMappingURL=index.js.map","import { omit } from 'lodash-es';\nimport { ATTRIBUTE_CDATA, ATTRIBUTE_COMMENT, ATTRIBUTE_GROUP_KEY, ATTRIBUTE_TEXT, DECLARATION_TAG, TAG, } from '../constants';\nexport function getIndentationString(size, level) {\n return new Array(level * size + 1).join(' ');\n}\nexport function hasBreakLines(elements) {\n return typeof elements === 'string' && elements.includes('\\n');\n}\nexport function isInlineTextElement(elements) {\n if (typeof elements === 'string') {\n return false;\n }\n return (elements.length === 1 &&\n ATTRIBUTE_TEXT in elements[0] &&\n !hasBreakLines(elements[0][ATTRIBUTE_TEXT]));\n}\nexport function getTagType(tagKey) {\n switch (tagKey) {\n case ATTRIBUTE_TEXT:\n case ATTRIBUTE_CDATA:\n case ATTRIBUTE_COMMENT:\n return tagKey;\n default:\n return tagKey.startsWith('?') ? DECLARATION_TAG : TAG;\n }\n}\nexport function getTagProps(element) {\n const attributes = element[ATTRIBUTE_GROUP_KEY];\n const elementWithoutAttributes = omit(element, ATTRIBUTE_GROUP_KEY);\n const [[tagKey, subElements]] = Object.entries(elementWithoutAttributes);\n const type = getTagType(tagKey);\n return { attributes, tagKey, subElements, type };\n}\nexport function hasAttributes(attributes) {\n if (!attributes) {\n return false;\n }\n return Object.keys(attributes).length > 0;\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Attributes } from '../../components/Attributes';\nimport { CollapseIcon } from '../../components/CollapseIcon';\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nimport { hasAttributes } from '../../helpers';\nimport { useCollapsible } from '../../hooks/useCollapsible';\nexport function Tag(props) {\n const { indentation, tagKey, attributes, children, isInline, hasChildren, level } = props;\n const { collapsed, buttonProps } = useCollapsible(level);\n const { theme } = useXMLViewerContext();\n return (_jsxs(\"div\", { children: [_jsxs(\"span\", { ...buttonProps, children: [_jsx(\"span\", { children: indentation }), _jsx(CollapseIcon, { collapsed: collapsed }), _jsx(\"span\", { style: { color: theme.separatorColor }, children: '<' }), _jsx(\"span\", { style: { color: theme.tagColor }, children: `${tagKey}` }), !collapsed && _jsx(Attributes, { attributes: attributes }), collapsed && hasAttributes(attributes) && ' ...', _jsx(\"span\", { style: { color: theme.separatorColor }, children: !hasChildren ? ' />' : '>' })] }), hasChildren && (_jsxs(_Fragment, { children: [!collapsed && children, collapsed && '...', _jsx(\"span\", { style: { color: theme.separatorColor }, children: `${isInline || collapsed ? '' : indentation}</` }), _jsx(\"span\", { style: { color: theme.tagColor }, children: `${tagKey}` }), _jsx(\"span\", { style: { color: theme.separatorColor }, children: '>' })] }))] }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nimport { hasBreakLines } from '../../helpers';\nexport function TextElement(props) {\n const { hasSiblings, text, indentation, isText } = props;\n const { theme } = useXMLViewerContext();\n const style = isText ? { color: theme.textColor } : undefined;\n return hasBreakLines(text) || hasSiblings ? (_jsx(\"div\", { style: style, children: text\n .split('\\n')\n .filter((element) => !!element.trim())\n .map((line, index) => (_jsx(\"div\", { children: `${indentation}${line.trim()}` }, `${index}`))) })) : (_jsx(\"span\", { style: style, children: text }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { CDataTag } from '../../components/CDataTag';\nimport { CommentTag } from '../../components/CommentTag';\nimport { DeclarationTag } from '../../components/DeclarationTag';\nimport { Tag } from '../../components/Tag';\nimport { TextElement } from '../../components/TextElement';\nimport { ATTRIBUTE_CDATA, ATTRIBUTE_COMMENT, ATTRIBUTE_TEXT, DECLARATION_TAG } from '../../constants';\nimport { useXMLViewerContext } from '../../context/xml-viewer-context';\nimport { getIndentationString, getTagProps, isInlineTextElement } from '../../helpers';\nexport function Elements(props) {\n const { elements, level = 0, isText = true } = props;\n const { indentSize } = useXMLViewerContext();\n if (!Array.isArray(elements) || elements.length === 0) {\n return null;\n }\n return (_jsx(_Fragment, { children: elements.map((element, index) => {\n const { tagKey, attributes, subElements, type } = getTagProps(element);\n const hasSiblings = elements.length > 1;\n const indentation = getIndentationString(indentSize, level);\n const key = `${level}-${index}`;\n const isInline = isInlineTextElement(subElements);\n switch (type) {\n case ATTRIBUTE_TEXT:\n return (_jsx(TextElement, { text: subElements, indentation: indentation, hasSiblings: hasSiblings, isText: isText }, key));\n case ATTRIBUTE_COMMENT:\n return (_jsx(CommentTag, { isInline: isInline, indentation: indentation, level: level, children: _jsx(Elements, { elements: subElements, level: level + 1, isText: false }) }, key));\n case ATTRIBUTE_CDATA:\n return (_jsx(CDataTag, { indentation: indentation, isInline: isInline, children: _jsx(Elements, { elements: subElements, level: level + 1, isText: false }) }, key));\n case DECLARATION_TAG:\n return (_jsx(DeclarationTag, { indentation: indentation, tagKey: tagKey, attributes: attributes }, key));\n default:\n return (_jsx(Tag, { indentation: indentation, tagKey: tagKey, attributes: attributes, isInline: isInline, hasChildren: subElements.length > 0, level: level, children: _jsx(Elements, { elements: subElements, level: level + 1 }) }, key));\n }\n }) }));\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport function InvalidXml() {\n return _jsx(\"div\", { children: \"Invalid XML!\" });\n}\n//# sourceMappingURL=index.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect, useMemo, useState } from 'react';\nimport { darkTheme, defaultTheme } from '../constants';\nimport { XMLViewerContext } from '../context/xml-viewer-context';\nimport useXMLViewer from '../hooks/useXMLViewer';\nimport { Elements } from './Elements';\nimport { InvalidXml } from './InvalidXml';\nexport function XMLViewer(props) {\n const { theme: customTheme, xml, collapsible = false, indentSize = 2, invalidXml, initalCollapsedDepth, initialCollapsedDepth, } = props;\n // Detect dark mode from document root class (set by ThemeProvider)\n const [isDarkMode, setIsDarkMode] = useState(() => {\n return document.documentElement.classList.contains('dark');\n });\n useEffect(() => {\n const root = document.documentElement;\n const observer = new MutationObserver(() => {\n setIsDarkMode(root.classList.contains('dark'));\n });\n observer.observe(root, { attributes: true, attributeFilter: ['class'] });\n return () => observer.disconnect();\n }, []);\n // Compute theme based on dark mode, then apply custom overrides\n const theme = useMemo(() => {\n const baseTheme = isDarkMode ? darkTheme : defaultTheme;\n return { ...baseTheme, ...customTheme };\n }, [isDarkMode, customTheme]);\n const { json, valid } = useXMLViewer(xml);\n const context = useMemo(() => ({\n theme,\n collapsible,\n indentSize,\n initialCollapsedDepth: initialCollapsedDepth ?? initalCollapsedDepth,\n }), [theme, collapsible, indentSize, initalCollapsedDepth, initialCollapsedDepth]);\n if (!valid) {\n return invalidXml ? invalidXml : _jsx(InvalidXml, {});\n }\n return (_jsx(XMLViewerContext.Provider, { value: context, children: _jsx(\"div\", { className: \"rxv-container\", style: { whiteSpace: 'pre-wrap', fontFamily: theme.fontFamily, overflowWrap: 'break-word' }, children: _jsx(Elements, { elements: json }) }) }));\n}\n//# sourceMappingURL=XMLViewer.js.map"],"names":["stateInstance","EditorApi","editor","constructor","this","setValue","value","dispatch","changes","from","to","state","doc","length","insert","getValue","toString","baseExtensions","EditorView","theme","fontSize","fontFamily","backgroundColor","color","outline","borderLeft","borderLeftColor","animation","opacity","lineWrapping","CodeMirrorEditor","onChange","className","editorRef","extensions","debounceTimeout","ref","useRef","onChangeRef","undefined","useEffect","current","debounce","component","useMemo","_jsx","useSafeLayoutEffect","actualExtensions","cb","update","updateListener","of","docChanged","Array","isArray","concat","push","sharedState","initialDoc","Text","split","EditorState","create","getSharedEditorState","parent","api","destroy","VEditorApi","VgetValue","VsetValue","MonacoEditor","language","options","beforeMount","onMount","defaultValue","editorValue","setEditorValue","useState","editorInstanceRef","useTheme","getValueRef","setValueRef","newValue","debouncedOnChange","handleEditorChange","useCallback","actualValue","handleEditorDidMount","monacoInstance","defineTheme","base","inherit","rules","colors","setTheme","defaultOptions","minimap","enabled","scrollBeyondLastLine","wordWrap","lineNumbers","folding","lineDecorationsWidth","lineNumbersMinChars","automaticLayout","glyphMargin","renderValidationDecorations","renderLineHighlight","hover","delay","quickSuggestions","other","comments","strings","children","Editor","height","FieldSetContext","createContext","FieldSetContextProvider","Provider","useFieldSet","ctx","useContext","Error","FormContext","object","components","disabled","_FormContext","useForm","FormContextProvider","Input","React","forwardRef","type","props","String","booleanValue","setBooleanValue","schema","isBoolean","clsx","Styles","INPUT","_onChange","ev","target","checked","Form","onSubmit","observer","evt","stopPropagation","preventDefault","GeneratedFormFields","properties","map","renderProperty","GeneratedForm","_jsxs","prop","isList","ListField","name","isObject","CompositeField","ScalarField","inline","Component","inputType","getInputType","handleOnChange","event","isNumber","parseFloat","isListItem","FormItem","label","title","required","isRequired","description","items","item","index","ListItem","list","onDelete","remove","deleteItem","Button","variant","onClick","add","Plus","arraySchema","Trash2","Schema","_validator","load","validator","ajv","Ajv","allErrors","strict","compile","Object","keys","forEach","loadProperty","hasProperties","propertySchema","property","ArrayPropertySchema","PropertySchema","validate","errors","addProperty","typeOrSchema","removeProperty","filter","x","getProperty","super","isMulti","isReadOnly","readOnly","default","enum","values","includes","isString","getArrayElementType","computeTitleFromName","replace","toUpperCase","slice","_name","format","Node","isRoot","root","path","isScalar","node","ManagedObjectBase","ManagedListProperty","getOrInitArrayProperty","ManagedObjectProperty","getOrInitObjectProperty","ManagedProperty","setPropertyValue","getPropertyValue","out","Symbol","iterator","ManagedObject","_v","newItem","ManageObjectEntry","ManagedScalarEntry","splice","i","l","trim","pop","key","Date","now","FormLabel","FormHelper","FormError","st_punct","st_symbol","st_key","defaultClassMap","code","comma","assign","startObject","endObject","startArray","endArray","boolean","null","string","number","Block","renderer","indent","result","classMap","writeKey","pushValue","renderStart","renderValue","renderEnd","valueClass","join","ObjectBlock","NL","ArrayBlock","JsonRenderer","tab","stack","block","onStartObject","nested","onEndObject","currentBlock","onStartIteration","onEndIteration","onValue","JSONCode","data","element","setElement","json","ObjectWalker","walk","dangerouslySetInnerHTML","__html","renderJson","JSONView","entries","PropertyElement","PropertyTitle","BlockElement","info","getValueInfo","ValueType","Inline","Paragraph","Prose","ArrayProperty","inlineLength","itemMediumLength","isInline","useBullet","DotBadge","ItemProperty","bullet","content","len","JSONDisplay","viewCode","CodeBlockRendererRegistry","registerComponent","getComponent","Context","CodeBlockRendererProvider","registry","_Fragment","useCodeBlockRendererRegistry","useCodeBlockComponent","cn","inputs","twMerge","UserSessionContext","ArtifactUrlCacheContext","useArtifactUrlCache","getArtifactCacheKey","runId","disposition","getFileCacheKey","VegaErrorDisplay","error","chartTitle","FullscreenDialog","isOpen","onClose","DialogPrimitive","Root","open","onOpenChange","Portal","Overlay","Content","onEscapeKeyDown","Close","asChild","X","Title","Description","CHART_COLORS","categorical","blues","purples","diverging","viewHasField","view","fields","encoding","field","channel","layer","viewHasColorEncoding","checkEncoding","colorField","findArtifactReferences","spec","currentPath","references","url","startsWith","artifactPath","nestedKeys","VegaLiteChart","memo","artifactRunId","vegaSpec","isExporting","setIsExporting","isCopied","setIsCopied","setError","isFullscreen","setIsFullscreen","viewRef","fullscreenViewRef","containerRef","client","session","useUserSession","urlCache","resolvedSpec","setResolvedSpec","isLoadingArtifacts","setIsLoadingArtifacts","artifactError","setArtifactError","mode","isDashboard","showFullscreenButton","enableFullscreen","baseHeight","rowCount","vconcat","columns","Math","ceil","facet","max","calculateAutoHeight","cancelled","async","resolvedData","Map","pathKey","cacheKey","getOrFetch","files","getArtifactDownloadUrl","getDownloadUrl","response","fetch","ok","statusText","toLowerCase","endsWith","csvText","text","parseResult","Papa","parse","header","skipEmptyLines","dynamicTyping","console","warn","jsonData","log","set","err","newSpec","JSON","stringify","lastKey","oldUrl","replaceArtifactData","resolveArtifacts","isDarkMode","setIsDarkMode","checkDarkMode","document","documentElement","classList","contains","MutationObserver","observe","attributes","attributeFilter","disconnect","containerWidth","setContainerWidth","resizeObserver","ResizeObserver","entry","contentRect","width","clientWidth","hasArtifactReferences","processedSpec","specToUse","parameterValues","updateParams","params","param","updateNestedViews","views","hconcat","applyParameterValues","concatKeys","some","rootSelectionParams","select","paramName","selectFields","hasLegendBinding","bind","concatArray","targetViewIndex","targetView","p","fixVegaLiteSelectionParams","scaleSpecWidths","availableWidth","childCount","totalSpacing","spacing","widthPerChild","floor","child","currentWidth","buildFullSpec","forFullscreen","config","isDark","baseConfig","background","stroke","range","category","heatmap","ramp","mark","tooltip","bar","cornerRadiusTopLeft","cornerRadiusTopRight","line","strokeWidth","strokeCap","point","size","filled","area","fillOpacity","rect","cornerRadius","arc","circle","axis","labelColor","titleColor","gridColor","domainColor","tickColor","labelFont","titleFont","labelFontSize","titleFontSize","titleFontWeight","legend","symbolSize","font","fontWeight","getDarkModeConfig","calculatedWidth","window","min","innerWidth","isConcatenatedView","autosize","scaledSpec","specWidth","_specWidth","specWithoutWidth","$schema","handleCopy","toCanvas","toBlob","blob","navigator","clipboard","write","ClipboardItem","setTimeout","handleExport","toImageURL","link","createElement","download","href","click","handleNewView","handleFullscreenNewView","handleError","message","toggleFullscreen","prev","Toolbar","Check","Copy","Download","Minimize2","Maximize2","style","Loader2","chartSpec","fullscreenSpec","hasData","dataLength","specData","minWidth","VegaEmbed","onEmbed","onError","actions","prevProps","nextProps","COLORS","ChartErrorBoundary","hasError","getDerivedStateFromError","componentDidCatch","errorInfo","chartType","render","formatNumber","n","isFinite","abs","toFixed","toLocaleString","AgentChart","library","isVegaLiteSpec","RechartsChart","normalizeChartType","chart","typeMap","BarChart","LineChart","AreaChart","PieChart","ScatterChart","RadarChart","FunnelChart","Treemap","ComposedChart","RadialBarChart","normalizedSpec","xKey","x_axis","data_key","series","bars","b","dataKey","fill","lines","yAxis","nameKey","valueKey","yKey","axisKey","chartRef","dataUrl","toPng","pixelRatio","safeSeries","safeData","commonAxes","XAxis","tick","YAxis","yAxisId","tickFormatter","left","angle","position","s","orientation","right","commonOverlays","CartesianGrid","strokeDasharray","Tooltip","formatter","Legend","referenceZero","ReferenceLine","y","renderSeries","idx","Line","dot","Area","stackId","stacked","Bar","ResponsiveContainer","Pie","cx","cy","innerRadius","outerRadius","showLabels","_","Cell","xDataKey","yDataKey","Scatter","renderScatterChart","aKey","PolarGrid","PolarAngleAxis","PolarRadiusAxis","Radar","renderRadarChart","nKey","vKey","startAngle","endAngle","barSize","RadialBar","iconSize","layout","verticalAlign","align","find","d","payload","renderRadialBarChart","Funnel","isAnimationActive","LabelList","renderFunnelChart","aspectRatio","textAnchor","renderChart","VARIANT_STYLES","border","bg","icon","warning","success","VARIANT_ICONS","HelpCircle","AlertCircle","MessageSquare","CheckCircle","AskUserWidget","question","onSelect","onMultiSelect","allowFreeResponse","multiSelect","placeholder","isLoading","hideIcon","hideBorder","cardClassName","headerClassName","iconClassName","questionClassName","descriptionClassName","optionsClassName","buttonClassName","inputContainerClassName","inputClassName","submitButtonClassName","inputValue","setInputValue","selectedOptions","setSelectedOptions","Set","inputRef","styles","DefaultIcon","handleSubmit","borderClass","option","checkbox","has","id","toggleOption","optionId","next","delete","VTooltip","placement","Fragment","Send","button","e","onKeyDown","shiftKey","MermaidDiagram","svg","setSvg","uniqueId","useId","renderedSvg","mermaid","renderDiagram","initialize","startOnLoad","securityLevel","ALLOWED_CUSTOM_SCHEMES","customUrlTransform","scheme","defaultUrlTransform","remarkRemoveComments","tree","visit","test","SKIP","MarkdownRenderer","remarkPlugins","removeComments","codeClassName","inlineCodeClassName","linkClassName","imageClassName","onProposalSelect","onProposalSubmit","codeBlockRegistry","plugins","remarkGfm","componentsWithCharts","baseComponents","ExistingCode","ExistingLink","a","ExistingImg","img","match","exec","CustomComponent","raw","jsonStart","indexOf","jsonEnd","lastIndexOf","hasVegaSchema","isVegaLite","isRecharts","widgetProps","opt","multiple","rest","rawHref","isArtifactLink","isImageLink","imagePath","resolvedHref","setResolvedHref","getUrl","contextPath","resolve","mappedHref","rel","src","alt","rawSrc","isArtifactRef","isImageRef","isArtifactOrImageRef","resolvedSrc","setResolvedSrc","markdownContent","Markdown","urlTransform","PopoverContext","usePopoverContext","__SLOT_NAME","processSlots","slots","Children","slotName","isValidElement","processOneSlot","defineSlot","computeElementProps","Popover","triggerProps","trigger","contentProps","ResolvedPopover","middleware","offset","defaultOffset","dismiss","strategy","zIndex","setIsOpen","floating","useFloating","shift","flip","whileElementsMounted","autoUpdate","floatingStyles","refs","setReference","setFloating","context","dismissInteraction","useDismiss","clickInteraction","useClick","hoverInteraction","useHover","handleClose","safePolygon","blockPointerEvents","restMs","getHoverProps","getReferenceProps","getFloatingProps","useInteractions","isMounted","transitionStyles","useTransitionStyles","transition","close","FloatingPortal","FloatingFocusManager","PopoverTrigger","_props","PopoverContent","Progress","percent","PropertiesView","Table","Info","TypeNames","setPropertyType","typeObj","isNullable","getTypeSignature","typeName","t","getFirstNotNullType","getItemTypeName","displayTypeName","Trigger","new_prop_name_cnt","ManagedSchema","source","SchemaNode","loadChildren","isEmpty","reload","withSource","uri","withChangeListener","replaceSchema","clone","loader","_getPropertiesSchema","isParent","isNew","resetIsNew","getNameSignature","getSignature","reloadTree","_loadChildren","childSchema","findAvailableChildName","prefix","addChild","newSchema","addRequired","c","updated","newName","newProperties","setPropertyName","setRequireProperty","actualType","typeChanged","getUpdateFromNameAndTypeSignature","nameSig","typeSig","substring","parseTypeSignature","any","updateFromNameAndTypeSignature","updateFromSignature","getEditableSchemaProperty","TYPE_OPTIONS","types","sort","makeTypeOptions","PropertyEditor","onCancel","onSave","isModalOpen","setModalOpen","PropertyNameEditor","PropertyTypeEditor","AlignLeft","EditDescriptionModal","focus","onKeyUp","INPUT_UNSTYLED","display","VSelectBox","onBlur","popupClass","VModal","VModalTitle","EditDescriptionModalForm","currentValue","setCurrentValue","ModalBody","ModalFooter","PropertyViewer","useSchema","jsonSchema","setSchema","VIEW_BOX","VIEW_BOX_HOVER","EDIT_BOX","Editable","outlineOnHover","editOnClick","viewer","skipClickOutside","isEditing","readonly","onValidate","on","off","isOn","useFlag","validationError","setValidationError","DataEdit","DataView","onEdit","Viewer","btnStyle","tabIndex","SquarePen","setActualValue","latestValue","debounceTimer","setDebounceTimer","handleSave","useClickOutside","autoSave","clearTimeout","closest","SchemaEditor","AddPropertyButton","ParentItem","SimpleItem","PropertyTitleBar","setOpen","ChevronDown","ChevronRight","validatePropertyName","propertyName","toast","useToast","editableProp","status","duration","SvgIcon","svgEl","DOMParser","parseFromString","querySelector","innerHTML","attrName","setAttribute","appendChild","createSvgIcon","DropZone","onDrop","buttonLabel","allowFolders","isDragging","setIsDragging","dropZoneRef","handleChange","fileArray","file","webkitRelativePath","folderCount","Boolean","fileCount","formattedMessage","customMessage","count","feedback","onDragOver","dataTransfer","onDragLeave","relatedTarget","folders","processEntry","isFile","Promise","defineProperty","writable","fullPath","folderPath","isDirectory","reader","createReader","readEntries","all","webkitGetAsEntry","UploadIcon","fileInput","accept","onchange","folderInput","webkitdirectory","UploadResultCategory","CheckCircleIcon","isExpanded","setIsExpanded","viewBox","strokeLinecap","strokeLinejoin","UploadSummary","location","collection","successFiles","f","updatedFiles","skippedFiles","failedFiles","successCount","updatedCount","skippedCount","failedCount","totalCount","AlertCircleIcon","XCircleIcon","ATTRIBUTE_TEXT","ATTRIBUTE_COMMENT","ATTRIBUTE_CDATA","DECLARATION_TAG","defaultTheme","tagColor","textColor","attributeKeyColor","attributeValueColor","separatorColor","commentColor","cdataColor","darkTheme","XMLViewerContext","collapsible","indentSize","useXMLViewerContext","parser","XMLParser","preserveOrder","ignoreAttributes","attributeNamePrefix","allowBooleanAttributes","commentPropName","cdataPropName","parseTagValue","CDataTag","indentation","CollapseIcon","collapsed","padding","Caret","transform","attrs","useCollapsible","level","initialCollapsedDepth","setCollapsed","isNil","buttonProps","currentCollapsed","role","cursor","CommentTag","Attributes","DeclarationTag","tagKey","hasBreakLines","elements","getTagProps","elementWithoutAttributes","omit","subElements","getTagType","hasAttributes","Tag","hasChildren","TextElement","hasSiblings","isText","Elements","getIndentationString","isInlineTextElement","InvalidXml","XMLViewer","customTheme","xml","invalidXml","initalCollapsedDepth","valid","XMLValidator","errorMessage","useXMLViewer","whiteSpace","overflowWrap"],"mappings":"0jFACA,IAAIA,GAAgB,KCKb,MAAMC,GACTC,OACA,WAAAC,CAAYD,GACRE,KAAKF,OAASA,CAClB,CACA,QAAAG,CAASC,GACLF,KAAKF,OAAOK,SAAS,CACjBC,QAAS,CACLC,KAAM,EACNC,GAAIN,KAAKF,OAAOS,MAAMC,IAAIC,OAC1BC,OAAQR,GAAS,KAG7B,CACA,QAAAS,GACI,OAAOX,KAAKF,OAAOS,MAAMC,IAAII,UACjC,EAEJ,MAaMC,GAAiB,CAbHC,EAAWC,MAAM,CACjC,IAAK,CAAEC,SAAU,OAAQC,WAAY,aACrC,cAAe,CAAEA,WAAY,WAC7B,eAAgB,CAAEA,WAAY,WAC9B,cAAe,CAAEC,gBAAiB,cAAeC,MAAO,QACxD,cAAe,CAAEC,QAAS,QAC1B,aAAc,CACVC,WAAY,oBACZC,gBAAiB,UACjBC,UAAW,kCAEf,mBAAoB,CAAE,MAAO,CAAEC,QAAS,MAIxCV,EAAWW,cAaR,SAASC,IAAiBC,SAAEA,EAAQzB,MAAEA,EAAK0B,UAAEA,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