@octaviaflow/core 3.0.18-beta.0 → 3.0.18

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 (428) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +45 -0
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  3. package/dist/components/Accordion/index.d.ts +2 -0
  4. package/dist/components/Accordion/index.d.ts.map +1 -0
  5. package/dist/components/AgentCard/AgentCard.d.ts +53 -7
  6. package/dist/components/AgentCard/AgentCard.d.ts.map +1 -1
  7. package/dist/components/AlertCard/AlertCard.d.ts +76 -0
  8. package/dist/components/AlertCard/AlertCard.d.ts.map +1 -0
  9. package/dist/components/AlertCard/index.d.ts +2 -0
  10. package/dist/components/AlertCard/index.d.ts.map +1 -0
  11. package/dist/components/AuthCard/AuthCard.d.ts +29 -42
  12. package/dist/components/AuthCard/AuthCard.d.ts.map +1 -1
  13. package/dist/components/Avatar/Avatar.d.ts +48 -11
  14. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  15. package/dist/components/Avatar/index.d.ts +1 -1
  16. package/dist/components/Avatar/index.d.ts.map +1 -1
  17. package/dist/components/Badge/Badge.d.ts +46 -8
  18. package/dist/components/Badge/Badge.d.ts.map +1 -1
  19. package/dist/components/Badge/index.d.ts +1 -1
  20. package/dist/components/Badge/index.d.ts.map +1 -1
  21. package/dist/components/Banner/Banner.d.ts +53 -6
  22. package/dist/components/Banner/Banner.d.ts.map +1 -1
  23. package/dist/components/Banner/index.d.ts +1 -1
  24. package/dist/components/Banner/index.d.ts.map +1 -1
  25. package/dist/components/BarChart/BarChart.d.ts +62 -5
  26. package/dist/components/BarChart/BarChart.d.ts.map +1 -1
  27. package/dist/components/BarChart/index.d.ts +1 -1
  28. package/dist/components/BarChart/index.d.ts.map +1 -1
  29. package/dist/components/BlogCard/BlogCard.d.ts +39 -4
  30. package/dist/components/BlogCard/BlogCard.d.ts.map +1 -1
  31. package/dist/components/Button/Button.d.ts +23 -5
  32. package/dist/components/Button/Button.d.ts.map +1 -1
  33. package/dist/components/Calendar/Calendar.d.ts +53 -4
  34. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  35. package/dist/components/CalendarHeatmap/CalendarHeatmap.d.ts +47 -0
  36. package/dist/components/CalendarHeatmap/CalendarHeatmap.d.ts.map +1 -0
  37. package/dist/components/CalendarHeatmap/index.d.ts +2 -0
  38. package/dist/components/CalendarHeatmap/index.d.ts.map +1 -0
  39. package/dist/components/Callout/Callout.d.ts +33 -7
  40. package/dist/components/Callout/Callout.d.ts.map +1 -1
  41. package/dist/components/Callout/index.d.ts +1 -1
  42. package/dist/components/Callout/index.d.ts.map +1 -1
  43. package/dist/components/Card/Card.d.ts +49 -8
  44. package/dist/components/Card/Card.d.ts.map +1 -1
  45. package/dist/components/Card/index.d.ts +1 -1
  46. package/dist/components/Card/index.d.ts.map +1 -1
  47. package/dist/components/ChatBubble/ChatBubble.d.ts +32 -7
  48. package/dist/components/ChatBubble/ChatBubble.d.ts.map +1 -1
  49. package/dist/components/ChatBubble/index.d.ts +1 -1
  50. package/dist/components/ChatBubble/index.d.ts.map +1 -1
  51. package/dist/components/Checkbox/Checkbox.d.ts +16 -3
  52. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  53. package/dist/components/Checkbox/index.d.ts +1 -1
  54. package/dist/components/Checkbox/index.d.ts.map +1 -1
  55. package/dist/components/Chip/Chip.d.ts +28 -9
  56. package/dist/components/Chip/Chip.d.ts.map +1 -1
  57. package/dist/components/Chip/index.d.ts +1 -1
  58. package/dist/components/Chip/index.d.ts.map +1 -1
  59. package/dist/components/ChoiceCard/ChoiceCard.d.ts +44 -6
  60. package/dist/components/ChoiceCard/ChoiceCard.d.ts.map +1 -1
  61. package/dist/components/ChoiceCard/index.d.ts +1 -1
  62. package/dist/components/ChoiceCard/index.d.ts.map +1 -1
  63. package/dist/components/Coachmark/Coachmark.d.ts +52 -0
  64. package/dist/components/Coachmark/Coachmark.d.ts.map +1 -0
  65. package/dist/components/Coachmark/index.d.ts +2 -0
  66. package/dist/components/Coachmark/index.d.ts.map +1 -0
  67. package/dist/components/CodeEditor/CodeEditor.d.ts +10 -1
  68. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  69. package/dist/components/ColorPicker/ColorPicker.d.ts +25 -6
  70. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  71. package/dist/components/ColorPicker/index.d.ts +1 -1
  72. package/dist/components/ColorPicker/index.d.ts.map +1 -1
  73. package/dist/components/CommandPalette/CommandPalette.d.ts +64 -0
  74. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -0
  75. package/dist/components/CommandPalette/index.d.ts +2 -0
  76. package/dist/components/CommandPalette/index.d.ts.map +1 -0
  77. package/dist/components/ConditionBuilder/ConditionBuilder.d.ts +24 -4
  78. package/dist/components/ConditionBuilder/ConditionBuilder.d.ts.map +1 -1
  79. package/dist/components/ConfigPanel/ConfigPanel.d.ts +18 -12
  80. package/dist/components/ConfigPanel/ConfigPanel.d.ts.map +1 -1
  81. package/dist/components/ConfigPanel/index.d.ts +1 -1
  82. package/dist/components/ConfigPanel/index.d.ts.map +1 -1
  83. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +47 -0
  84. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
  85. package/dist/components/ConfirmDialog/index.d.ts +2 -0
  86. package/dist/components/ConfirmDialog/index.d.ts.map +1 -0
  87. package/dist/components/ConnectorCard/ConnectorCard.d.ts +49 -0
  88. package/dist/components/ConnectorCard/ConnectorCard.d.ts.map +1 -0
  89. package/dist/components/ConnectorCard/index.d.ts +2 -0
  90. package/dist/components/ConnectorCard/index.d.ts.map +1 -0
  91. package/dist/components/ContextMenu/ContextMenu.d.ts +46 -0
  92. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  93. package/dist/components/ContextMenu/index.d.ts +2 -0
  94. package/dist/components/ContextMenu/index.d.ts.map +1 -0
  95. package/dist/components/CountUp/CountUp.d.ts +35 -0
  96. package/dist/components/CountUp/CountUp.d.ts.map +1 -0
  97. package/dist/components/CountUp/index.d.ts +2 -0
  98. package/dist/components/CountUp/index.d.ts.map +1 -0
  99. package/dist/components/DataMapper/DataMapper.d.ts +3 -3
  100. package/dist/components/DataMapper/DataMapper.d.ts.map +1 -1
  101. package/dist/components/DataTable/DataTable.d.ts +35 -3
  102. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  103. package/dist/components/DatasetCard/DatasetCard.d.ts +55 -0
  104. package/dist/components/DatasetCard/DatasetCard.d.ts.map +1 -0
  105. package/dist/components/DatasetCard/index.d.ts +2 -0
  106. package/dist/components/DatasetCard/index.d.ts.map +1 -0
  107. package/dist/components/DatePicker/DatePicker.d.ts +18 -5
  108. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  109. package/dist/components/DatePicker/index.d.ts +1 -1
  110. package/dist/components/DatePicker/index.d.ts.map +1 -1
  111. package/dist/components/DescriptionList/DescriptionList.d.ts +10 -6
  112. package/dist/components/DescriptionList/DescriptionList.d.ts.map +1 -1
  113. package/dist/components/DescriptionList/index.d.ts +1 -1
  114. package/dist/components/DescriptionList/index.d.ts.map +1 -1
  115. package/dist/components/Dialog/Dialog.d.ts +13 -5
  116. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  117. package/dist/components/Dialog/index.d.ts +1 -1
  118. package/dist/components/Dialog/index.d.ts.map +1 -1
  119. package/dist/components/Divider/Divider.d.ts +24 -0
  120. package/dist/components/Divider/Divider.d.ts.map +1 -0
  121. package/dist/components/Divider/index.d.ts +2 -0
  122. package/dist/components/Divider/index.d.ts.map +1 -0
  123. package/dist/components/DonutChart/DonutChart.d.ts +32 -4
  124. package/dist/components/DonutChart/DonutChart.d.ts.map +1 -1
  125. package/dist/components/Drawer/Drawer.d.ts +12 -5
  126. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  127. package/dist/components/Drawer/index.d.ts +1 -1
  128. package/dist/components/Drawer/index.d.ts.map +1 -1
  129. package/dist/components/EmptyState/EmptyState.d.ts +16 -6
  130. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  131. package/dist/components/EmptyState/index.d.ts +1 -1
  132. package/dist/components/EmptyState/index.d.ts.map +1 -1
  133. package/dist/components/FeatureCard/FeatureCard.d.ts +29 -10
  134. package/dist/components/FeatureCard/FeatureCard.d.ts.map +1 -1
  135. package/dist/components/FileDropzone/FileDropzone.d.ts +3 -3
  136. package/dist/components/FileDropzone/FileDropzone.d.ts.map +1 -1
  137. package/dist/components/Gauge/Gauge.d.ts +46 -0
  138. package/dist/components/Gauge/Gauge.d.ts.map +1 -0
  139. package/dist/components/Gauge/index.d.ts +2 -0
  140. package/dist/components/Gauge/index.d.ts.map +1 -0
  141. package/dist/components/Grid/Grid.d.ts +46 -0
  142. package/dist/components/Grid/Grid.d.ts.map +1 -0
  143. package/dist/components/Grid/index.d.ts +2 -0
  144. package/dist/components/Grid/index.d.ts.map +1 -0
  145. package/dist/components/Heatmap/Heatmap.d.ts +54 -0
  146. package/dist/components/Heatmap/Heatmap.d.ts.map +1 -0
  147. package/dist/components/Heatmap/index.d.ts +2 -0
  148. package/dist/components/Heatmap/index.d.ts.map +1 -0
  149. package/dist/components/IconCard/IconCard.d.ts +24 -6
  150. package/dist/components/IconCard/IconCard.d.ts.map +1 -1
  151. package/dist/components/IconCard/index.d.ts +1 -1
  152. package/dist/components/IconCard/index.d.ts.map +1 -1
  153. package/dist/components/InlineMessage/InlineMessage.d.ts +24 -0
  154. package/dist/components/InlineMessage/InlineMessage.d.ts.map +1 -0
  155. package/dist/components/InlineMessage/index.d.ts +2 -0
  156. package/dist/components/InlineMessage/index.d.ts.map +1 -0
  157. package/dist/components/Input/Input.d.ts.map +1 -1
  158. package/dist/components/IntegrationCard/IntegrationCard.d.ts +69 -0
  159. package/dist/components/IntegrationCard/IntegrationCard.d.ts.map +1 -0
  160. package/dist/components/IntegrationCard/index.d.ts +2 -0
  161. package/dist/components/IntegrationCard/index.d.ts.map +1 -0
  162. package/dist/components/JsonViewer/JsonViewer.d.ts +10 -4
  163. package/dist/components/JsonViewer/JsonViewer.d.ts.map +1 -1
  164. package/dist/components/KanbanCard/KanbanCard.d.ts +40 -7
  165. package/dist/components/KanbanCard/KanbanCard.d.ts.map +1 -1
  166. package/dist/components/Kbd/Kbd.d.ts +8 -9
  167. package/dist/components/Kbd/Kbd.d.ts.map +1 -1
  168. package/dist/components/Kbd/index.d.ts +1 -1
  169. package/dist/components/Kbd/index.d.ts.map +1 -1
  170. package/dist/components/LineChart/LineChart.d.ts +42 -4
  171. package/dist/components/LineChart/LineChart.d.ts.map +1 -1
  172. package/dist/components/LineChart/index.d.ts +1 -1
  173. package/dist/components/LineChart/index.d.ts.map +1 -1
  174. package/dist/components/LinkButton/LinkButton.d.ts +16 -4
  175. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  176. package/dist/components/LinkButton/index.d.ts +1 -1
  177. package/dist/components/LinkButton/index.d.ts.map +1 -1
  178. package/dist/components/MetricCard/MetricCard.d.ts +71 -0
  179. package/dist/components/MetricCard/MetricCard.d.ts.map +1 -0
  180. package/dist/components/MetricCard/index.d.ts +2 -0
  181. package/dist/components/MetricCard/index.d.ts.map +1 -0
  182. package/dist/components/MonacoEditor/MonacoDiffEditor.d.ts +22 -5
  183. package/dist/components/MonacoEditor/MonacoDiffEditor.d.ts.map +1 -1
  184. package/dist/components/MonacoEditor/MonacoEditor.d.ts +28 -7
  185. package/dist/components/MonacoEditor/MonacoEditor.d.ts.map +1 -1
  186. package/dist/components/MonacoEditor/index.d.ts +2 -2
  187. package/dist/components/MonacoEditor/index.d.ts.map +1 -1
  188. package/dist/components/MultiSelect/MultiSelect.d.ts +23 -7
  189. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  190. package/dist/components/MultiSelect/index.d.ts +1 -1
  191. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  192. package/dist/components/NumberInput/NumberInput.d.ts +13 -7
  193. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  194. package/dist/components/NumberInput/index.d.ts +1 -1
  195. package/dist/components/NumberInput/index.d.ts.map +1 -1
  196. package/dist/components/OTPInput/OTPInput.d.ts +27 -4
  197. package/dist/components/OTPInput/OTPInput.d.ts.map +1 -1
  198. package/dist/components/OTPInput/index.d.ts +1 -1
  199. package/dist/components/OTPInput/index.d.ts.map +1 -1
  200. package/dist/components/Pagination/Pagination.d.ts +50 -0
  201. package/dist/components/Pagination/Pagination.d.ts.map +1 -0
  202. package/dist/components/Pagination/index.d.ts +2 -0
  203. package/dist/components/Pagination/index.d.ts.map +1 -0
  204. package/dist/components/PasswordInput/PasswordInput.d.ts +22 -7
  205. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
  206. package/dist/components/PasswordInput/index.d.ts +1 -1
  207. package/dist/components/PasswordInput/index.d.ts.map +1 -1
  208. package/dist/components/PhoneInput/PhoneInput.d.ts +19 -6
  209. package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -1
  210. package/dist/components/PhoneInput/countries.d.ts +15 -0
  211. package/dist/components/PhoneInput/countries.d.ts.map +1 -0
  212. package/dist/components/PhoneInput/index.d.ts +2 -1
  213. package/dist/components/PhoneInput/index.d.ts.map +1 -1
  214. package/dist/components/PipelineCard/PipelineCard.d.ts +100 -0
  215. package/dist/components/PipelineCard/PipelineCard.d.ts.map +1 -0
  216. package/dist/components/PipelineCard/index.d.ts +2 -0
  217. package/dist/components/PipelineCard/index.d.ts.map +1 -0
  218. package/dist/components/Popover/Popover.d.ts +5 -1
  219. package/dist/components/Popover/Popover.d.ts.map +1 -1
  220. package/dist/components/PricingCard/PricingCard.d.ts +28 -5
  221. package/dist/components/PricingCard/PricingCard.d.ts.map +1 -1
  222. package/dist/components/ProductCard/ProductCard.d.ts +35 -4
  223. package/dist/components/ProductCard/ProductCard.d.ts.map +1 -1
  224. package/dist/components/ProgressBar/ProgressBar.d.ts +28 -0
  225. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -0
  226. package/dist/components/ProgressBar/index.d.ts +2 -0
  227. package/dist/components/ProgressBar/index.d.ts.map +1 -0
  228. package/dist/components/ProgressRing/ProgressRing.d.ts +22 -5
  229. package/dist/components/ProgressRing/ProgressRing.d.ts.map +1 -1
  230. package/dist/components/ProgressRing/index.d.ts +1 -1
  231. package/dist/components/ProgressRing/index.d.ts.map +1 -1
  232. package/dist/components/PromptInput/PromptInput.d.ts +59 -16
  233. package/dist/components/PromptInput/PromptInput.d.ts.map +1 -1
  234. package/dist/components/PromptInput/index.d.ts +1 -1
  235. package/dist/components/PromptInput/index.d.ts.map +1 -1
  236. package/dist/components/Quote/Quote.d.ts +20 -6
  237. package/dist/components/Quote/Quote.d.ts.map +1 -1
  238. package/dist/components/Quote/index.d.ts +1 -1
  239. package/dist/components/Quote/index.d.ts.map +1 -1
  240. package/dist/components/Radio/Radio.d.ts +12 -5
  241. package/dist/components/Radio/Radio.d.ts.map +1 -1
  242. package/dist/components/Radio/RadioGroup.d.ts +16 -15
  243. package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
  244. package/dist/components/Radio/index.d.ts +2 -2
  245. package/dist/components/Radio/index.d.ts.map +1 -1
  246. package/dist/components/RangeSlider/RangeSlider.d.ts +18 -5
  247. package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  248. package/dist/components/RangeSlider/index.d.ts +1 -1
  249. package/dist/components/RangeSlider/index.d.ts.map +1 -1
  250. package/dist/components/Rating/BinaryRating.d.ts +40 -0
  251. package/dist/components/Rating/BinaryRating.d.ts.map +1 -0
  252. package/dist/components/Rating/Rating.d.ts +21 -6
  253. package/dist/components/Rating/Rating.d.ts.map +1 -1
  254. package/dist/components/Rating/index.d.ts +2 -1
  255. package/dist/components/Rating/index.d.ts.map +1 -1
  256. package/dist/components/Resizable/Resizable.d.ts +32 -36
  257. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  258. package/dist/components/Resizable/index.d.ts +1 -1
  259. package/dist/components/Resizable/index.d.ts.map +1 -1
  260. package/dist/components/Ribbon/Ribbon.d.ts +12 -6
  261. package/dist/components/Ribbon/Ribbon.d.ts.map +1 -1
  262. package/dist/components/Ribbon/index.d.ts +1 -1
  263. package/dist/components/Ribbon/index.d.ts.map +1 -1
  264. package/dist/components/Sankey/Sankey.d.ts +53 -0
  265. package/dist/components/Sankey/Sankey.d.ts.map +1 -0
  266. package/dist/components/Sankey/index.d.ts +2 -0
  267. package/dist/components/Sankey/index.d.ts.map +1 -0
  268. package/dist/components/ScrollArea/ScrollArea.d.ts +33 -0
  269. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
  270. package/dist/components/ScrollArea/index.d.ts +2 -0
  271. package/dist/components/ScrollArea/index.d.ts.map +1 -0
  272. package/dist/components/SegmentedControl/SegmentedControl.d.ts +38 -0
  273. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  274. package/dist/components/SegmentedControl/index.d.ts +2 -0
  275. package/dist/components/SegmentedControl/index.d.ts.map +1 -0
  276. package/dist/components/Select/Select.d.ts +19 -1
  277. package/dist/components/Select/Select.d.ts.map +1 -1
  278. package/dist/components/Sheet/Sheet.d.ts.map +1 -1
  279. package/dist/components/Show/Show.d.ts +35 -0
  280. package/dist/components/Show/Show.d.ts.map +1 -0
  281. package/dist/components/Show/index.d.ts +2 -0
  282. package/dist/components/Show/index.d.ts.map +1 -0
  283. package/dist/components/Sidebar/Sidebar.d.ts +7 -8
  284. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
  285. package/dist/components/Skeleton/Skeleton.d.ts +43 -5
  286. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  287. package/dist/components/Skeleton/index.d.ts +1 -1
  288. package/dist/components/Skeleton/index.d.ts.map +1 -1
  289. package/dist/components/Slider/Slider.d.ts +26 -7
  290. package/dist/components/Slider/Slider.d.ts.map +1 -1
  291. package/dist/components/Slider/index.d.ts +1 -1
  292. package/dist/components/Slider/index.d.ts.map +1 -1
  293. package/dist/components/SocialButton/SocialButton.d.ts +23 -5
  294. package/dist/components/SocialButton/SocialButton.d.ts.map +1 -1
  295. package/dist/components/SocialButton/index.d.ts +1 -1
  296. package/dist/components/SocialButton/index.d.ts.map +1 -1
  297. package/dist/components/Sortable/Sortable.d.ts +14 -6
  298. package/dist/components/Sortable/Sortable.d.ts.map +1 -1
  299. package/dist/components/Sparkline/Sparkline.d.ts +38 -3
  300. package/dist/components/Sparkline/Sparkline.d.ts.map +1 -1
  301. package/dist/components/Sparkline/index.d.ts +1 -1
  302. package/dist/components/Sparkline/index.d.ts.map +1 -1
  303. package/dist/components/Spinner/Spinner.d.ts +14 -5
  304. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  305. package/dist/components/Spinner/index.d.ts +1 -1
  306. package/dist/components/Spinner/index.d.ts.map +1 -1
  307. package/dist/components/Spotlight/Spotlight.d.ts +37 -0
  308. package/dist/components/Spotlight/Spotlight.d.ts.map +1 -0
  309. package/dist/components/Spotlight/index.d.ts +2 -0
  310. package/dist/components/Spotlight/index.d.ts.map +1 -0
  311. package/dist/components/Stack/Stack.d.ts +41 -0
  312. package/dist/components/Stack/Stack.d.ts.map +1 -0
  313. package/dist/components/Stack/index.d.ts +2 -0
  314. package/dist/components/Stack/index.d.ts.map +1 -0
  315. package/dist/components/Stat/Stat.d.ts +15 -6
  316. package/dist/components/Stat/Stat.d.ts.map +1 -1
  317. package/dist/components/Stat/index.d.ts +1 -1
  318. package/dist/components/Stat/index.d.ts.map +1 -1
  319. package/dist/components/StatusTiles/StatusTiles.d.ts +39 -0
  320. package/dist/components/StatusTiles/StatusTiles.d.ts.map +1 -0
  321. package/dist/components/StatusTiles/index.d.ts +2 -0
  322. package/dist/components/StatusTiles/index.d.ts.map +1 -0
  323. package/dist/components/Stepper/Stepper.d.ts +53 -0
  324. package/dist/components/Stepper/Stepper.d.ts.map +1 -0
  325. package/dist/components/Stepper/index.d.ts +2 -0
  326. package/dist/components/Stepper/index.d.ts.map +1 -0
  327. package/dist/components/Switch/Switch.d.ts +11 -6
  328. package/dist/components/Switch/Switch.d.ts.map +1 -1
  329. package/dist/components/Switch/index.d.ts +1 -1
  330. package/dist/components/Switch/index.d.ts.map +1 -1
  331. package/dist/components/Table/Table.d.ts +11 -5
  332. package/dist/components/Table/Table.d.ts.map +1 -1
  333. package/dist/components/TagsInput/TagsInput.d.ts +10 -5
  334. package/dist/components/TagsInput/TagsInput.d.ts.map +1 -1
  335. package/dist/components/TagsInput/index.d.ts +1 -1
  336. package/dist/components/TagsInput/index.d.ts.map +1 -1
  337. package/dist/components/TemplateCard/TemplateCard.d.ts +120 -0
  338. package/dist/components/TemplateCard/TemplateCard.d.ts.map +1 -0
  339. package/dist/components/TemplateCard/index.d.ts +2 -0
  340. package/dist/components/TemplateCard/index.d.ts.map +1 -0
  341. package/dist/components/TestimonialCard/TestimonialCard.d.ts +30 -5
  342. package/dist/components/TestimonialCard/TestimonialCard.d.ts.map +1 -1
  343. package/dist/components/Textarea/Textarea.d.ts +81 -7
  344. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  345. package/dist/components/Textarea/index.d.ts +1 -1
  346. package/dist/components/Textarea/index.d.ts.map +1 -1
  347. package/dist/components/TimePicker/TimePicker.d.ts +7 -5
  348. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  349. package/dist/components/TimePicker/index.d.ts +1 -1
  350. package/dist/components/TimePicker/index.d.ts.map +1 -1
  351. package/dist/components/Timeline/Timeline.d.ts +14 -5
  352. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  353. package/dist/components/Timeline/index.d.ts +1 -1
  354. package/dist/components/Timeline/index.d.ts.map +1 -1
  355. package/dist/components/TimezonePicker/TimezonePicker.d.ts +8 -5
  356. package/dist/components/TimezonePicker/TimezonePicker.d.ts.map +1 -1
  357. package/dist/components/TimezonePicker/index.d.ts +1 -1
  358. package/dist/components/TimezonePicker/index.d.ts.map +1 -1
  359. package/dist/components/Toast/Toast.d.ts +15 -0
  360. package/dist/components/Toast/Toast.d.ts.map +1 -1
  361. package/dist/components/Toggle/Toggle.d.ts +16 -6
  362. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  363. package/dist/components/Toggle/index.d.ts +1 -1
  364. package/dist/components/Toggle/index.d.ts.map +1 -1
  365. package/dist/components/ToolCard/ToolCard.d.ts +12 -10
  366. package/dist/components/ToolCard/ToolCard.d.ts.map +1 -1
  367. package/dist/components/Tooltip/Tooltip.d.ts +13 -2
  368. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  369. package/dist/components/Tooltip/index.d.ts +1 -1
  370. package/dist/components/Tooltip/index.d.ts.map +1 -1
  371. package/dist/components/TraceStep/TraceStep.d.ts +37 -8
  372. package/dist/components/TraceStep/TraceStep.d.ts.map +1 -1
  373. package/dist/components/TreeView/TreeView.d.ts +54 -0
  374. package/dist/components/TreeView/TreeView.d.ts.map +1 -0
  375. package/dist/components/TreeView/index.d.ts +2 -0
  376. package/dist/components/TreeView/index.d.ts.map +1 -0
  377. package/dist/components/UserCard/UserCard.d.ts +38 -5
  378. package/dist/components/UserCard/UserCard.d.ts.map +1 -1
  379. package/dist/components/XmlViewer/XmlViewer.d.ts +11 -6
  380. package/dist/components/XmlViewer/XmlViewer.d.ts.map +1 -1
  381. package/dist/components/YamlViewer/YamlViewer.d.ts +13 -6
  382. package/dist/components/YamlViewer/YamlViewer.d.ts.map +1 -1
  383. package/dist/hooks/useBanner.d.ts +27 -0
  384. package/dist/hooks/useBanner.d.ts.map +1 -0
  385. package/dist/hooks/useBreakpoint.d.ts +29 -0
  386. package/dist/hooks/useBreakpoint.d.ts.map +1 -0
  387. package/dist/hooks/useCallout.d.ts +32 -0
  388. package/dist/hooks/useCallout.d.ts.map +1 -0
  389. package/dist/hooks/useMediaQuery.d.ts +15 -0
  390. package/dist/hooks/useMediaQuery.d.ts.map +1 -0
  391. package/dist/hooks/usePasswordStrength.d.ts +37 -0
  392. package/dist/hooks/usePasswordStrength.d.ts.map +1 -0
  393. package/dist/hooks/useRating.d.ts +51 -0
  394. package/dist/hooks/useRating.d.ts.map +1 -0
  395. package/dist/hooks/useTextareaCommands.d.ts +55 -0
  396. package/dist/hooks/useTextareaCommands.d.ts.map +1 -0
  397. package/dist/hooks/useTextareaSelection.d.ts +34 -0
  398. package/dist/hooks/useTextareaSelection.d.ts.map +1 -0
  399. package/dist/hooks/useTextareaTools.d.ts +88 -0
  400. package/dist/hooks/useTextareaTools.d.ts.map +1 -0
  401. package/dist/hooks/useTimeline.d.ts +31 -0
  402. package/dist/hooks/useTimeline.d.ts.map +1 -0
  403. package/dist/hooks/useTraceTimeline.d.ts +54 -0
  404. package/dist/hooks/useTraceTimeline.d.ts.map +1 -0
  405. package/dist/index.cjs +22959 -10158
  406. package/dist/index.cjs.map +1 -1
  407. package/dist/index.d.ts +90 -47
  408. package/dist/index.d.ts.map +1 -1
  409. package/dist/index.js +23914 -10637
  410. package/dist/index.js.map +1 -1
  411. package/dist/monaco.cjs +359 -488
  412. package/dist/monaco.cjs.map +1 -1
  413. package/dist/monaco.d.ts +1 -1
  414. package/dist/monaco.d.ts.map +1 -1
  415. package/dist/monaco.js +381 -489
  416. package/dist/monaco.js.map +1 -1
  417. package/dist/stories/_shared/TestPage.d.ts +12 -0
  418. package/dist/stories/_shared/TestPage.d.ts.map +1 -0
  419. package/dist/styles.css +1 -1
  420. package/dist/utils/Slot.d.ts +7 -0
  421. package/dist/utils/Slot.d.ts.map +1 -0
  422. package/dist/utils/composeRefs.d.ts +7 -0
  423. package/dist/utils/composeRefs.d.ts.map +1 -0
  424. package/dist/utils/gradients.d.ts +77 -0
  425. package/dist/utils/gradients.d.ts.map +1 -0
  426. package/dist/utils/zIndex.d.ts +53 -0
  427. package/dist/utils/zIndex.d.ts.map +1 -0
  428. package/package.json +5 -5
package/dist/monaco.cjs CHANGED
@@ -39,6 +39,7 @@ module.exports = __toCommonJS(monaco_exports);
39
39
 
40
40
  // src/components/MonacoEditor/MonacoDiffEditor.tsx
41
41
  var import_react = require("react");
42
+ var import_icons = require("@octaviaflow/icons");
42
43
 
43
44
  // src/utils/cn.ts
44
45
  var import_clsx = require("clsx");
@@ -140,7 +141,13 @@ var import_jsx_runtime = require("react/jsx-runtime");
140
141
  var DiffEditor = (0, import_react.lazy)(
141
142
  () => import("@monaco-editor/react").then((mod) => ({ default: mod.DiffEditor }))
142
143
  );
143
- function MonacoDiffEditor({
144
+ function LoadingPlaceholder() {
145
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__loading", children: [
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.RenewIcon, {}) }),
147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Loading diff\u2026" })
148
+ ] });
149
+ }
150
+ var MonacoDiffEditor = (0, import_react.forwardRef)(function MonacoDiffEditor2({
144
151
  original,
145
152
  modified,
146
153
  onModifiedChange,
@@ -155,15 +162,29 @@ function MonacoDiffEditor({
155
162
  toolbar,
156
163
  options,
157
164
  onMount,
158
- style,
159
165
  className,
160
166
  theme,
161
- hideToolbar = false
162
- }) {
167
+ hideToolbar = false,
168
+ ...rest
169
+ }, ref) {
163
170
  const editorRef = (0, import_react.useRef)(null);
171
+ const monacoRef = (0, import_react.useRef)(null);
164
172
  const [sideBySide, setSideBySide] = (0, import_react.useState)(renderSideBySide);
173
+ (0, import_react.useImperativeHandle)(
174
+ ref,
175
+ () => ({
176
+ focus: () => editorRef.current?.getModifiedEditor().focus(),
177
+ getDiffEditor: () => editorRef.current,
178
+ getMonaco: () => monacoRef.current,
179
+ getOriginalValue: () => editorRef.current?.getOriginalEditor().getValue() ?? "",
180
+ getModifiedValue: () => editorRef.current?.getModifiedEditor().getValue() ?? "",
181
+ setModifiedValue: (v) => editorRef.current?.getModifiedEditor().setValue(v)
182
+ }),
183
+ []
184
+ );
165
185
  const handleMount = (diffEditor, monaco) => {
166
186
  editorRef.current = diffEditor;
187
+ monacoRef.current = monaco;
167
188
  monaco.editor.defineTheme(OCTAVIAFLOW_THEME_ID, OCTAVIAFLOW_LIGHT);
168
189
  monaco.editor.setTheme(theme ?? OCTAVIAFLOW_THEME_ID);
169
190
  const modifiedEditor = diffEditor.getModifiedEditor();
@@ -203,91 +224,46 @@ function MonacoDiffEditor({
203
224
  },
204
225
  ...options
205
226
  };
206
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("ods-monaco-diff", `ods-monaco-diff--${language}`, className), style, children: [
207
- !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__toolbar", children: [
208
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__toolbar-left", children: [
209
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ods-monaco__lang", children: [
210
- "DIFF \xB7 ",
211
- language.toUpperCase()
212
- ] }),
213
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ods-monaco-diff__labels", children: [
214
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--orig", children: originalLabel }),
215
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__arrow", "aria-hidden": "true", children: "\u2192" }),
216
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--mod", children: modifiedLabel })
217
- ] }),
218
- toolbar
219
- ] }),
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ods-monaco__toolbar-right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
221
- "button",
222
- {
223
- type: "button",
224
- className: cn("ods-monaco__btn", sideBySide && "ods-monaco__btn--active"),
225
- onClick: () => setSideBySide((s) => !s),
226
- "aria-pressed": sideBySide,
227
- "aria-label": "Toggle side-by-side",
228
- title: sideBySide ? "Inline" : "Side-by-side",
229
- children: sideBySide ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
231
- "rect",
232
- {
233
- x: "1.5",
234
- y: "2",
235
- width: "5",
236
- height: "10",
237
- rx: "0.5",
238
- stroke: "currentColor",
239
- strokeWidth: "1.3"
240
- }
241
- ),
242
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
243
- "rect",
244
- {
245
- x: "7.5",
246
- y: "2",
247
- width: "5",
248
- height: "10",
249
- rx: "0.5",
250
- stroke: "currentColor",
251
- strokeWidth: "1.3"
252
- }
253
- )
254
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
255
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
256
- "rect",
257
- {
258
- x: "1.5",
259
- y: "2",
260
- width: "11",
261
- height: "10",
262
- rx: "0.5",
263
- stroke: "currentColor",
264
- strokeWidth: "1.3"
265
- }
266
- ),
267
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M1.5 7h11", stroke: "currentColor", strokeWidth: "1.3" })
268
- ] })
269
- }
270
- ) })
271
- ] }),
272
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
273
- import_react.Suspense,
274
- {
275
- fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__loading", children: [
276
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
277
- "circle",
227
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
228
+ "div",
229
+ {
230
+ ...rest,
231
+ className: cn(
232
+ "ods-monaco-diff",
233
+ `ods-monaco-diff--${language}`,
234
+ className
235
+ ),
236
+ children: [
237
+ !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__toolbar", children: [
238
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__toolbar-left", children: [
239
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ods-monaco__lang", children: [
240
+ "DIFF \xB7 ",
241
+ language.toUpperCase()
242
+ ] }),
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ods-monaco-diff__labels", children: [
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--orig", children: originalLabel }),
245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__arrow", "aria-hidden": "true", children: "\u2192" }),
246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--mod", children: modifiedLabel })
247
+ ] }),
248
+ toolbar
249
+ ] }),
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ods-monaco__toolbar-right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
251
+ "button",
278
252
  {
279
- cx: "7",
280
- cy: "7",
281
- r: "5",
282
- stroke: "currentColor",
283
- strokeWidth: "1.4",
284
- strokeDasharray: "4 18",
285
- strokeLinecap: "round"
253
+ type: "button",
254
+ className: cn(
255
+ "ods-monaco__btn",
256
+ sideBySide && "ods-monaco__btn--active"
257
+ ),
258
+ onClick: () => setSideBySide((s) => !s),
259
+ "aria-pressed": sideBySide,
260
+ "aria-label": sideBySide ? "Switch to inline diff" : "Switch to side-by-side",
261
+ title: sideBySide ? "Inline" : "Side-by-side",
262
+ children: sideBySide ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SplitIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SquareOutlineIcon, {})
286
263
  }
287
- ) }) }),
288
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Loading diff\u2026" })
264
+ ) })
289
265
  ] }),
290
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
266
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingPlaceholder, {}), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
291
267
  DiffEditor,
292
268
  {
293
269
  original,
@@ -297,431 +273,326 @@ function MonacoDiffEditor({
297
273
  theme: theme ?? OCTAVIAFLOW_THEME_ID,
298
274
  options: mergedOptions,
299
275
  onMount: handleMount,
300
- loading: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ods-monaco__loading", children: [
301
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
302
- "circle",
303
- {
304
- cx: "7",
305
- cy: "7",
306
- r: "5",
307
- stroke: "currentColor",
308
- strokeWidth: "1.4",
309
- strokeDasharray: "4 18",
310
- strokeLinecap: "round"
311
- }
312
- ) }) }),
313
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Loading diff\u2026" })
314
- ] })
276
+ loading: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingPlaceholder, {})
315
277
  }
316
- )
317
- }
318
- ) })
319
- ] });
320
- }
278
+ ) }) })
279
+ ]
280
+ }
281
+ );
282
+ });
283
+ MonacoDiffEditor.displayName = "MonacoDiffEditor";
321
284
 
322
285
  // src/components/MonacoEditor/MonacoEditor.tsx
323
286
  var import_react2 = require("react");
287
+ var import_icons2 = require("@octaviaflow/icons");
324
288
  var import_jsx_runtime2 = require("react/jsx-runtime");
325
- var Editor = (0, import_react2.lazy)(() => import("@monaco-editor/react").then((mod) => ({ default: mod.Editor })));
289
+ var Editor = (0, import_react2.lazy)(
290
+ () => import("@monaco-editor/react").then((mod) => ({ default: mod.Editor }))
291
+ );
326
292
  var MARKER_SEVERITY = {
327
293
  hint: 1,
328
294
  info: 2,
329
295
  warning: 4,
330
296
  error: 8
331
297
  };
332
- function MonacoEditor({
333
- value,
334
- onChange,
335
- language = "plaintext",
336
- readOnly = false,
337
- height = 320,
338
- minHeight = 120,
339
- toolbar,
340
- status,
341
- hideToolbar = false,
342
- hideFooter = false,
343
- showCopy = true,
344
- showFormat = true,
345
- showWordWrapToggle = true,
346
- showMinimapToggle = true,
347
- wordWrap: wordWrapProp,
348
- minimap: minimapProp,
349
- showLineNumbers = true,
350
- markers,
351
- options,
352
- onMount,
353
- style,
354
- className,
355
- ariaLabel = "Code editor",
356
- theme
357
- }) {
358
- const editorRef = (0, import_react2.useRef)(null);
359
- const monacoRef = (0, import_react2.useRef)(null);
360
- const [wordWrap, setWordWrap] = (0, import_react2.useState)(wordWrapProp ?? false);
361
- const [minimap, setMinimap] = (0, import_react2.useState)(minimapProp ?? false);
362
- const [copied, setCopied] = (0, import_react2.useState)(false);
363
- const [cursor, setCursor] = (0, import_react2.useState)({ line: 1, column: 1 });
364
- const [selection, setSelection] = (0, import_react2.useState)({ chars: 0, lines: 0 });
365
- const [lineCount, setLineCount] = (0, import_react2.useState)(value.split("\n").length);
366
- (0, import_react2.useEffect)(() => {
367
- if (wordWrapProp !== void 0) setWordWrap(wordWrapProp);
368
- }, [wordWrapProp]);
369
- (0, import_react2.useEffect)(() => {
370
- if (minimapProp !== void 0) setMinimap(minimapProp);
371
- }, [minimapProp]);
372
- (0, import_react2.useEffect)(() => {
373
- editorRef.current?.updateOptions({
374
- wordWrap: wordWrap ? "on" : "off",
375
- minimap: { enabled: minimap }
376
- });
377
- }, [wordWrap, minimap]);
378
- (0, import_react2.useEffect)(() => {
379
- const editor = editorRef.current;
380
- const monaco = monacoRef.current;
381
- if (!editor || !monaco || !markers) return;
382
- const model = editor.getModel();
383
- if (!model) return;
384
- monaco.editor.setModelMarkers(
385
- model,
386
- "octaviaflow",
387
- markers.map((m) => ({
388
- severity: MARKER_SEVERITY[m.severity ?? "error"],
389
- message: m.message,
390
- startLineNumber: m.line,
391
- startColumn: m.column ?? 1,
392
- endLineNumber: m.endLine ?? m.line,
393
- endColumn: m.endColumn ?? (m.column ?? 1) + 1,
394
- source: m.source
395
- }))
298
+ function LoadingPlaceholder2({ label }) {
299
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__loading", children: [
300
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.RenewIcon, {}) }),
301
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: label })
302
+ ] });
303
+ }
304
+ var MonacoEditor = (0, import_react2.forwardRef)(
305
+ function MonacoEditor2({
306
+ value,
307
+ onChange,
308
+ language = "plaintext",
309
+ readOnly = false,
310
+ height = 320,
311
+ minHeight = 120,
312
+ toolbar,
313
+ status,
314
+ hideToolbar = false,
315
+ hideFooter = false,
316
+ showCopy = true,
317
+ showFormat = true,
318
+ showWordWrapToggle = true,
319
+ showMinimapToggle = true,
320
+ wordWrap: wordWrapProp,
321
+ minimap: minimapProp,
322
+ showLineNumbers = true,
323
+ markers,
324
+ options,
325
+ onMount,
326
+ onCopy,
327
+ copySuccessTimeoutMs = 1200,
328
+ className,
329
+ ariaLabel = "Code editor",
330
+ theme,
331
+ ...rest
332
+ }, ref) {
333
+ const editorRef = (0, import_react2.useRef)(null);
334
+ const monacoRef = (0, import_react2.useRef)(null);
335
+ const [wordWrap, setWordWrap] = (0, import_react2.useState)(wordWrapProp ?? false);
336
+ const [minimap, setMinimap] = (0, import_react2.useState)(minimapProp ?? false);
337
+ const [copied, setCopied] = (0, import_react2.useState)(false);
338
+ const [cursor, setCursor] = (0, import_react2.useState)({ line: 1, column: 1 });
339
+ const [selection, setSelection] = (0, import_react2.useState)({ chars: 0, lines: 0 });
340
+ const [lineCount, setLineCount] = (0, import_react2.useState)(value.split("\n").length);
341
+ (0, import_react2.useImperativeHandle)(
342
+ ref,
343
+ () => ({
344
+ focus: () => editorRef.current?.focus(),
345
+ getEditor: () => editorRef.current,
346
+ getMonaco: () => monacoRef.current,
347
+ getValue: () => editorRef.current?.getValue() ?? "",
348
+ setValue: (v) => editorRef.current?.setValue(v),
349
+ format: () => editorRef.current?.getAction("editor.action.formatDocument")?.run()
350
+ }),
351
+ []
396
352
  );
397
- }, [markers]);
398
- const handleMount = (0, import_react2.useCallback)(
399
- (editor, monaco) => {
400
- editorRef.current = editor;
401
- monacoRef.current = monaco;
402
- monaco.editor.defineTheme(OCTAVIAFLOW_THEME_ID, OCTAVIAFLOW_LIGHT);
403
- monaco.editor.setTheme(theme ?? OCTAVIAFLOW_THEME_ID);
404
- editor.onDidChangeCursorPosition((e) => {
405
- setCursor({ line: e.position.lineNumber, column: e.position.column });
353
+ (0, import_react2.useEffect)(() => {
354
+ if (wordWrapProp !== void 0) setWordWrap(wordWrapProp);
355
+ }, [wordWrapProp]);
356
+ (0, import_react2.useEffect)(() => {
357
+ if (minimapProp !== void 0) setMinimap(minimapProp);
358
+ }, [minimapProp]);
359
+ (0, import_react2.useEffect)(() => {
360
+ editorRef.current?.updateOptions({
361
+ wordWrap: wordWrap ? "on" : "off",
362
+ minimap: { enabled: minimap }
406
363
  });
407
- editor.onDidChangeCursorSelection((e) => {
408
- const sel = e.selection;
409
- if (sel.isEmpty()) {
410
- setSelection({ chars: 0, lines: 0 });
411
- return;
412
- }
413
- const model2 = editor.getModel();
414
- if (!model2) return;
415
- const text = model2.getValueInRange(sel);
416
- setSelection({
417
- chars: text.length,
418
- lines: text.split("\n").length
364
+ }, [wordWrap, minimap]);
365
+ (0, import_react2.useEffect)(() => {
366
+ const ed = editorRef.current;
367
+ const monaco = monacoRef.current;
368
+ if (!ed || !monaco || !markers) return;
369
+ const model = ed.getModel();
370
+ if (!model) return;
371
+ monaco.editor.setModelMarkers(
372
+ model,
373
+ "octaviaflow",
374
+ markers.map((m) => ({
375
+ severity: MARKER_SEVERITY[m.severity ?? "error"],
376
+ message: m.message,
377
+ startLineNumber: m.line,
378
+ startColumn: m.column ?? 1,
379
+ endLineNumber: m.endLine ?? m.line,
380
+ endColumn: m.endColumn ?? (m.column ?? 1) + 1,
381
+ source: m.source
382
+ }))
383
+ );
384
+ }, [markers]);
385
+ const handleMount = (0, import_react2.useCallback)(
386
+ (ed, monaco) => {
387
+ editorRef.current = ed;
388
+ monacoRef.current = monaco;
389
+ monaco.editor.defineTheme(OCTAVIAFLOW_THEME_ID, OCTAVIAFLOW_LIGHT);
390
+ monaco.editor.setTheme(theme ?? OCTAVIAFLOW_THEME_ID);
391
+ ed.onDidChangeCursorPosition((e) => {
392
+ setCursor({ line: e.position.lineNumber, column: e.position.column });
419
393
  });
420
- });
421
- const model = editor.getModel();
422
- if (model) {
423
- setLineCount(model.getLineCount());
424
- model.onDidChangeContent(() => setLineCount(model.getLineCount()));
394
+ ed.onDidChangeCursorSelection((e) => {
395
+ const sel = e.selection;
396
+ if (sel.isEmpty()) {
397
+ setSelection({ chars: 0, lines: 0 });
398
+ return;
399
+ }
400
+ const model2 = ed.getModel();
401
+ if (!model2) return;
402
+ const text = model2.getValueInRange(sel);
403
+ setSelection({
404
+ chars: text.length,
405
+ lines: text.split("\n").length
406
+ });
407
+ });
408
+ const model = ed.getModel();
409
+ if (model) {
410
+ setLineCount(model.getLineCount());
411
+ model.onDidChangeContent(() => setLineCount(model.getLineCount()));
412
+ }
413
+ onMount?.(ed, monaco);
414
+ },
415
+ [onMount, theme]
416
+ );
417
+ const handleCopy = async () => {
418
+ if (typeof navigator === "undefined") return;
419
+ try {
420
+ await navigator.clipboard.writeText(value);
421
+ setCopied(true);
422
+ onCopy?.(value);
423
+ setTimeout(() => setCopied(false), copySuccessTimeoutMs);
424
+ } catch {
425
425
  }
426
- onMount?.(editor, monaco);
427
- },
428
- [onMount, theme]
429
- );
430
- const handleCopy = async () => {
431
- if (typeof navigator === "undefined") return;
432
- try {
433
- await navigator.clipboard.writeText(value);
434
- setCopied(true);
435
- setTimeout(() => setCopied(false), 1200);
436
- } catch {
437
- }
438
- };
439
- const handleFormat = () => {
440
- editorRef.current?.getAction("editor.action.formatDocument")?.run();
441
- };
442
- const mergedOptions = {
443
- readOnly,
444
- fontFamily: "ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace",
445
- fontSize: 13,
446
- fontLigatures: true,
447
- lineHeight: 20,
448
- lineNumbers: showLineNumbers ? "on" : "off",
449
- lineNumbersMinChars: 3,
450
- lineDecorationsWidth: 6,
451
- folding: true,
452
- glyphMargin: false,
453
- minimap: { enabled: minimap },
454
- wordWrap: wordWrap ? "on" : "off",
455
- scrollBeyondLastLine: false,
456
- smoothScrolling: true,
457
- cursorBlinking: "smooth",
458
- cursorSmoothCaretAnimation: "on",
459
- renderLineHighlight: "line",
460
- padding: { top: 8, bottom: 8 },
461
- bracketPairColorization: { enabled: true },
462
- guides: { bracketPairs: true, indentation: true },
463
- automaticLayout: true,
464
- tabSize: 2,
465
- insertSpaces: true,
466
- scrollbar: {
467
- verticalScrollbarSize: 8,
468
- horizontalScrollbarSize: 8,
469
- useShadows: false
470
- },
471
- fixedOverflowWidgets: true,
472
- contextmenu: true,
473
- suggestOnTriggerCharacters: true,
474
- quickSuggestions: { other: true, comments: false, strings: false },
475
- formatOnPaste: false,
476
- formatOnType: false,
477
- "semanticHighlighting.enabled": true,
478
- ...options
479
- };
480
- const showWrapBtn = showWordWrapToggle && wordWrapProp === void 0;
481
- const showMinimapBtn = showMinimapToggle && minimapProp === void 0;
482
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
483
- "div",
484
- {
485
- className: cn(
486
- "ods-monaco",
487
- `ods-monaco--${language}`,
488
- readOnly && "ods-monaco--readonly",
489
- className
490
- ),
491
- style,
492
- children: [
493
- !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar", children: [
494
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar-left", children: [
495
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__lang", children: language.toUpperCase() }),
496
- toolbar
497
- ] }),
498
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar-right", children: [
499
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__lines", children: [
500
- lineCount,
501
- " line",
502
- lineCount === 1 ? "" : "s"
426
+ };
427
+ const handleFormat = () => {
428
+ editorRef.current?.getAction("editor.action.formatDocument")?.run();
429
+ };
430
+ const mergedOptions = {
431
+ readOnly,
432
+ fontFamily: "ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace",
433
+ fontSize: 13,
434
+ fontLigatures: true,
435
+ lineHeight: 20,
436
+ lineNumbers: showLineNumbers ? "on" : "off",
437
+ lineNumbersMinChars: 3,
438
+ lineDecorationsWidth: 6,
439
+ folding: true,
440
+ glyphMargin: false,
441
+ minimap: { enabled: minimap },
442
+ wordWrap: wordWrap ? "on" : "off",
443
+ scrollBeyondLastLine: false,
444
+ smoothScrolling: true,
445
+ cursorBlinking: "smooth",
446
+ cursorSmoothCaretAnimation: "on",
447
+ renderLineHighlight: "line",
448
+ padding: { top: 8, bottom: 8 },
449
+ bracketPairColorization: { enabled: true },
450
+ guides: { bracketPairs: true, indentation: true },
451
+ automaticLayout: true,
452
+ tabSize: 2,
453
+ insertSpaces: true,
454
+ scrollbar: {
455
+ verticalScrollbarSize: 8,
456
+ horizontalScrollbarSize: 8,
457
+ useShadows: false
458
+ },
459
+ fixedOverflowWidgets: true,
460
+ contextmenu: true,
461
+ suggestOnTriggerCharacters: true,
462
+ quickSuggestions: { other: true, comments: false, strings: false },
463
+ formatOnPaste: false,
464
+ formatOnType: false,
465
+ "semanticHighlighting.enabled": true,
466
+ ...options
467
+ };
468
+ const showWrapBtn = showWordWrapToggle && wordWrapProp === void 0;
469
+ const showMinimapBtn = showMinimapToggle && minimapProp === void 0;
470
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
471
+ "div",
472
+ {
473
+ ...rest,
474
+ className: cn(
475
+ "ods-monaco",
476
+ `ods-monaco--${language}`,
477
+ readOnly && "ods-monaco--readonly",
478
+ className
479
+ ),
480
+ children: [
481
+ !hideToolbar && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar", children: [
482
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar-left", children: [
483
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__lang", children: language.toUpperCase() }),
484
+ toolbar
503
485
  ] }),
504
- status && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__status", children: status }),
505
- showWrapBtn && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
506
- "button",
507
- {
508
- type: "button",
509
- className: cn("ods-monaco__btn", wordWrap && "ods-monaco__btn--active"),
510
- onClick: () => setWordWrap((w) => !w),
511
- "aria-pressed": wordWrap,
512
- "aria-label": "Toggle word wrap",
513
- title: "Word wrap",
514
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
515
- "path",
516
- {
517
- d: "M2 3.5h10M2 7h7.5a2 2 0 1 1 0 4H8m0 0 1.5-1.5M8 11l1.5 1.5M2 10.5h3",
518
- stroke: "currentColor",
519
- strokeWidth: "1.2",
520
- strokeLinecap: "round",
521
- strokeLinejoin: "round"
522
- }
523
- ) })
524
- }
525
- ),
526
- showMinimapBtn && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
527
- "button",
528
- {
529
- type: "button",
530
- className: cn("ods-monaco__btn", minimap && "ods-monaco__btn--active"),
531
- onClick: () => setMinimap((m) => !m),
532
- "aria-pressed": minimap,
533
- "aria-label": "Toggle minimap",
534
- title: "Minimap",
535
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
536
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
537
- "rect",
538
- {
539
- x: "2",
540
- y: "2.5",
541
- width: "6",
542
- height: "9",
543
- rx: "0.5",
544
- stroke: "currentColor",
545
- strokeWidth: "1.2"
546
- }
547
- ),
548
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
549
- "rect",
550
- {
551
- x: "9",
552
- y: "2.5",
553
- width: "3",
554
- height: "9",
555
- rx: "0.5",
556
- fill: "currentColor",
557
- opacity: "0.25"
558
- }
559
- ),
560
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
561
- "path",
562
- {
563
- d: "M3.5 4.5h3M3.5 6.5h3M3.5 8.5h2",
564
- stroke: "currentColor",
565
- strokeWidth: "1",
566
- strokeLinecap: "round"
567
- }
568
- )
569
- ] })
570
- }
571
- ),
572
- showFormat && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
573
- "button",
574
- {
575
- type: "button",
576
- className: "ods-monaco__btn",
577
- onClick: handleFormat,
578
- "aria-label": "Format document",
579
- title: "Format (Shift+Alt+F)",
580
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
581
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
582
- "path",
583
- {
584
- d: "M2.5 4h9M4 7h7.5M5.5 10H11",
585
- stroke: "currentColor",
586
- strokeWidth: "1.3",
587
- strokeLinecap: "round"
588
- }
486
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__toolbar-right", children: [
487
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__lines", children: [
488
+ lineCount,
489
+ " line",
490
+ lineCount === 1 ? "" : "s"
491
+ ] }),
492
+ status && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__status", children: status }),
493
+ showWrapBtn && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
494
+ "button",
495
+ {
496
+ type: "button",
497
+ className: cn(
498
+ "ods-monaco__btn",
499
+ wordWrap && "ods-monaco__btn--active"
589
500
  ),
590
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
591
- "path",
592
- {
593
- d: "M2.5 7 3.5 6 2.5 5",
594
- stroke: "currentColor",
595
- strokeWidth: "1.2",
596
- strokeLinecap: "round",
597
- strokeLinejoin: "round"
598
- }
599
- )
600
- ] })
601
- }
602
- ),
603
- showCopy && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
604
- "button",
605
- {
606
- type: "button",
607
- className: cn("ods-monaco__btn", copied && "ods-monaco__btn--success"),
608
- onClick: handleCopy,
609
- "aria-label": "Copy",
610
- title: "Copy",
611
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
612
- "path",
613
- {
614
- d: "m3 7 3 3 5-6",
615
- stroke: "currentColor",
616
- strokeWidth: "1.6",
617
- strokeLinecap: "round",
618
- strokeLinejoin: "round"
619
- }
620
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
621
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
622
- "rect",
623
- {
624
- x: "3",
625
- y: "3",
626
- width: "8",
627
- height: "8",
628
- rx: "1",
629
- stroke: "currentColor",
630
- strokeWidth: "1.3"
631
- }
501
+ onClick: () => setWordWrap((w) => !w),
502
+ "aria-pressed": wordWrap,
503
+ "aria-label": "Toggle word wrap",
504
+ title: "Word wrap",
505
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.TextWrapIcon, {})
506
+ }
507
+ ),
508
+ showMinimapBtn && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
509
+ "button",
510
+ {
511
+ type: "button",
512
+ className: cn(
513
+ "ods-monaco__btn",
514
+ minimap && "ods-monaco__btn--active"
632
515
  ),
633
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
634
- "path",
635
- {
636
- d: "M5 1.5h6V8",
637
- stroke: "currentColor",
638
- strokeWidth: "1.3",
639
- strokeLinecap: "round"
640
- }
641
- )
642
- ] })
643
- }
644
- )
645
- ] })
646
- ] }),
647
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
648
- import_react2.Suspense,
649
- {
650
- fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__loading", children: [
651
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
652
- "circle",
516
+ onClick: () => setMinimap((m) => !m),
517
+ "aria-pressed": minimap,
518
+ "aria-label": "Toggle minimap",
519
+ title: "Minimap",
520
+ children: minimap ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.MinimapOnIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.MinimapOffIcon, {})
521
+ }
522
+ ),
523
+ showFormat && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
524
+ "button",
653
525
  {
654
- cx: "7",
655
- cy: "7",
656
- r: "5",
657
- stroke: "currentColor",
658
- strokeWidth: "1.4",
659
- strokeDasharray: "4 18",
660
- strokeLinecap: "round"
526
+ type: "button",
527
+ className: "ods-monaco__btn",
528
+ onClick: handleFormat,
529
+ "aria-label": "Format document",
530
+ title: "Format (Shift+Alt+F)",
531
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.MagicWandIcon, {})
661
532
  }
662
- ) }) }),
663
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Loading editor\u2026" })
664
- ] }),
665
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
666
- Editor,
667
- {
668
- value,
669
- onChange: (v) => onChange?.(v ?? ""),
670
- language,
671
- height,
672
- theme: theme ?? OCTAVIAFLOW_THEME_ID,
673
- options: mergedOptions,
674
- onMount: handleMount,
675
- loading: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__loading", children: [
676
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
677
- "circle",
678
- {
679
- cx: "7",
680
- cy: "7",
681
- r: "5",
682
- stroke: "currentColor",
683
- strokeWidth: "1.4",
684
- strokeDasharray: "4 18",
685
- strokeLinecap: "round"
686
- }
687
- ) }) }),
688
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Loading editor\u2026" })
689
- ] }),
690
- "aria-label": ariaLabel
691
- }
692
- )
693
- }
694
- ) }),
695
- !hideFooter && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__footer", children: [
696
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__pos", children: [
697
- "Ln ",
698
- cursor.line,
699
- ", Col ",
700
- cursor.column,
701
- selection.chars > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
702
- " ",
703
- "\xB7 ",
704
- selection.chars,
705
- " char",
706
- selection.chars === 1 ? "" : "s",
707
- selection.lines > 1 && ` \xB7 ${selection.lines} lines`
533
+ ),
534
+ showCopy && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
535
+ "button",
536
+ {
537
+ type: "button",
538
+ className: cn(
539
+ "ods-monaco__btn",
540
+ copied && "ods-monaco__btn--success"
541
+ ),
542
+ onClick: handleCopy,
543
+ "aria-label": copied ? "Copied" : "Copy",
544
+ title: copied ? "Copied" : "Copy",
545
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.CheckmarkIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons2.CopyIcon, {})
546
+ }
547
+ )
708
548
  ] })
709
549
  ] }),
710
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__shortcut-hint", children: [
711
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "\u2318F" }),
712
- " find",
713
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__sep", children: "\xB7" }),
714
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "\u2318\u21E7F" }),
715
- " replace",
716
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__sep", children: "\xB7" }),
717
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "F1" }),
718
- " commands"
550
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react2.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingPlaceholder2, { label: "Loading editor\u2026" }), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
551
+ Editor,
552
+ {
553
+ value,
554
+ onChange: (v) => onChange?.(v ?? ""),
555
+ language,
556
+ height,
557
+ theme: theme ?? OCTAVIAFLOW_THEME_ID,
558
+ options: mergedOptions,
559
+ onMount: handleMount,
560
+ loading: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingPlaceholder2, { label: "Loading editor\u2026" }),
561
+ "aria-label": ariaLabel
562
+ }
563
+ ) }) }),
564
+ !hideFooter && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "ods-monaco__footer", children: [
565
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__pos", children: [
566
+ "Ln ",
567
+ cursor.line,
568
+ ", Col ",
569
+ cursor.column,
570
+ selection.chars > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
571
+ " ",
572
+ "\xB7 ",
573
+ selection.chars,
574
+ " char",
575
+ selection.chars === 1 ? "" : "s",
576
+ selection.lines > 1 && ` \xB7 ${selection.lines} lines`
577
+ ] })
578
+ ] }),
579
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "ods-monaco__shortcut-hint", children: [
580
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "\u2318F" }),
581
+ " find",
582
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__sep", children: "\xB7" }),
583
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "\u2318\u21E7F" }),
584
+ " replace",
585
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ods-monaco__sep", children: "\xB7" }),
586
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { className: "ods-monaco__kbd", children: "F1" }),
587
+ " commands"
588
+ ] })
719
589
  ] })
720
- ] })
721
- ]
722
- }
723
- );
724
- }
590
+ ]
591
+ }
592
+ );
593
+ }
594
+ );
595
+ MonacoEditor.displayName = "MonacoEditor";
725
596
  // Annotate the CommonJS export names for ESM import in node:
726
597
  0 && (module.exports = {
727
598
  MonacoDiffEditor,