@octaviaflow/core 3.0.14 → 3.0.17-beta.0

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 (231) hide show
  1. package/dist/chunk-2AWVQFSC.js +2456 -0
  2. package/dist/chunk-2AWVQFSC.js.map +1 -0
  3. package/dist/chunk-2K7IQR2F.js +2432 -0
  4. package/dist/chunk-2K7IQR2F.js.map +1 -0
  5. package/dist/chunk-2YUWZPIT.js +2483 -0
  6. package/dist/chunk-2YUWZPIT.js.map +1 -0
  7. package/dist/chunk-4VCRGPYQ.js +2452 -0
  8. package/dist/chunk-4VCRGPYQ.js.map +1 -0
  9. package/dist/chunk-4WU5YAL2.js +2470 -0
  10. package/dist/chunk-4WU5YAL2.js.map +1 -0
  11. package/dist/chunk-5L4TGL74.js +2448 -0
  12. package/dist/chunk-5L4TGL74.js.map +1 -0
  13. package/dist/chunk-7M5HFY2J.js +2483 -0
  14. package/dist/chunk-7M5HFY2J.js.map +1 -0
  15. package/dist/chunk-AJ4556EH.js +2490 -0
  16. package/dist/chunk-AJ4556EH.js.map +1 -0
  17. package/dist/chunk-AOL365B3.js +2448 -0
  18. package/dist/chunk-AOL365B3.js.map +1 -0
  19. package/dist/chunk-D4X7RMGF.js +2481 -0
  20. package/dist/chunk-D4X7RMGF.js.map +1 -0
  21. package/dist/chunk-DCGXCPD4.js +2389 -0
  22. package/dist/chunk-DCGXCPD4.js.map +1 -0
  23. package/dist/chunk-DG35MIV3.js +2480 -0
  24. package/dist/chunk-DG35MIV3.js.map +1 -0
  25. package/dist/chunk-DRZ73Q5X.js +2503 -0
  26. package/dist/chunk-DRZ73Q5X.js.map +1 -0
  27. package/dist/chunk-DRZMET2G.js +2458 -0
  28. package/dist/chunk-DRZMET2G.js.map +1 -0
  29. package/dist/chunk-DYCW4TYB.js +2546 -0
  30. package/dist/chunk-DYCW4TYB.js.map +1 -0
  31. package/dist/chunk-E7WR7DMP.js +2451 -0
  32. package/dist/chunk-E7WR7DMP.js.map +1 -0
  33. package/dist/chunk-ELNQQAHD.js +2454 -0
  34. package/dist/chunk-ELNQQAHD.js.map +1 -0
  35. package/dist/chunk-FN3MFN6C.js +2389 -0
  36. package/dist/chunk-FN3MFN6C.js.map +1 -0
  37. package/dist/chunk-IBTEGHFT.js +10 -0
  38. package/dist/chunk-IBTEGHFT.js.map +1 -0
  39. package/dist/chunk-JCPM7YF2.js +2474 -0
  40. package/dist/chunk-JCPM7YF2.js.map +1 -0
  41. package/dist/chunk-JLPCCZKG.js +2459 -0
  42. package/dist/chunk-JLPCCZKG.js.map +1 -0
  43. package/dist/chunk-KY4JHPIE.js +2546 -0
  44. package/dist/chunk-KY4JHPIE.js.map +1 -0
  45. package/dist/chunk-LCQMQAWJ.js +2461 -0
  46. package/dist/chunk-LCQMQAWJ.js.map +1 -0
  47. package/dist/chunk-LSDAQCUJ.js +2546 -0
  48. package/dist/chunk-LSDAQCUJ.js.map +1 -0
  49. package/dist/chunk-LW4ZHQKL.js +2432 -0
  50. package/dist/chunk-LW4ZHQKL.js.map +1 -0
  51. package/dist/chunk-MMZW3Q26.js +2442 -0
  52. package/dist/chunk-MMZW3Q26.js.map +1 -0
  53. package/dist/chunk-MXJR2WHG.js +2470 -0
  54. package/dist/chunk-MXJR2WHG.js.map +1 -0
  55. package/dist/chunk-OK2CUIKQ.js +2447 -0
  56. package/dist/chunk-OK2CUIKQ.js.map +1 -0
  57. package/dist/chunk-OSOP2WPT.js +2456 -0
  58. package/dist/chunk-OSOP2WPT.js.map +1 -0
  59. package/dist/chunk-PNBZLLWT.js +2529 -0
  60. package/dist/chunk-PNBZLLWT.js.map +1 -0
  61. package/dist/chunk-PULX2GK5.js +2447 -0
  62. package/dist/chunk-PULX2GK5.js.map +1 -0
  63. package/dist/chunk-QDT45KF4.js +2480 -0
  64. package/dist/chunk-QDT45KF4.js.map +1 -0
  65. package/dist/chunk-QI3ITHAZ.js +2450 -0
  66. package/dist/chunk-QI3ITHAZ.js.map +1 -0
  67. package/dist/chunk-QSGJ3DNA.js +2475 -0
  68. package/dist/chunk-QSGJ3DNA.js.map +1 -0
  69. package/dist/chunk-RDGJWRHM.js +2490 -0
  70. package/dist/chunk-RDGJWRHM.js.map +1 -0
  71. package/dist/chunk-SDE3ARKY.js +2451 -0
  72. package/dist/chunk-SDE3ARKY.js.map +1 -0
  73. package/dist/chunk-SX7WRJGD.js +2441 -0
  74. package/dist/chunk-SX7WRJGD.js.map +1 -0
  75. package/dist/chunk-TZ56MSYM.js +2452 -0
  76. package/dist/chunk-TZ56MSYM.js.map +1 -0
  77. package/dist/chunk-UEQLKS2B.js +2445 -0
  78. package/dist/chunk-UEQLKS2B.js.map +1 -0
  79. package/dist/chunk-UNU6YNTL.js +2452 -0
  80. package/dist/chunk-UNU6YNTL.js.map +1 -0
  81. package/dist/chunk-UUG6XYUC.js +2482 -0
  82. package/dist/chunk-UUG6XYUC.js.map +1 -0
  83. package/dist/chunk-VEY3BP5E.js +2447 -0
  84. package/dist/chunk-VEY3BP5E.js.map +1 -0
  85. package/dist/chunk-WBTXV3Q2.js +2482 -0
  86. package/dist/chunk-WBTXV3Q2.js.map +1 -0
  87. package/dist/chunk-WILVB7XA.js +2512 -0
  88. package/dist/chunk-WILVB7XA.js.map +1 -0
  89. package/dist/chunk-WQCHABP3.js +2441 -0
  90. package/dist/chunk-WQCHABP3.js.map +1 -0
  91. package/dist/chunk-WUFAW3TB.js +2512 -0
  92. package/dist/chunk-WUFAW3TB.js.map +1 -0
  93. package/dist/chunk-WYBJKALZ.js +2458 -0
  94. package/dist/chunk-WYBJKALZ.js.map +1 -0
  95. package/dist/chunk-XZ7FELMT.js +2448 -0
  96. package/dist/chunk-XZ7FELMT.js.map +1 -0
  97. package/dist/chunk-YATCRJVF.js +2458 -0
  98. package/dist/chunk-YATCRJVF.js.map +1 -0
  99. package/dist/chunk-YSSD2T4M.js +2451 -0
  100. package/dist/chunk-YSSD2T4M.js.map +1 -0
  101. package/dist/chunk-YW6ZOYCG.js +2451 -0
  102. package/dist/chunk-YW6ZOYCG.js.map +1 -0
  103. package/dist/components/ActionsDrawer/ActionsDrawer.d.ts +89 -0
  104. package/dist/components/ActionsDrawer/ActionsDrawer.d.ts.map +1 -0
  105. package/dist/components/ActionsDrawer/index.d.ts +2 -0
  106. package/dist/components/ActionsDrawer/index.d.ts.map +1 -0
  107. package/dist/components/AgentCard/AgentCard.d.ts +1 -1
  108. package/dist/components/AgentCard/AgentCard.d.ts.map +1 -1
  109. package/dist/components/AuthCard/AuthCard.d.ts.map +1 -1
  110. package/dist/components/Button/Button.d.ts.map +1 -1
  111. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  112. package/dist/components/CodeEditor/index.d.ts +1 -1
  113. package/dist/components/CodeEditor/index.d.ts.map +1 -1
  114. package/dist/components/DataMapper/DataMapper.d.ts.map +1 -1
  115. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  116. package/dist/components/DataTable/index.d.ts +1 -1
  117. package/dist/components/DataTable/index.d.ts.map +1 -1
  118. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  119. package/dist/components/ExecutionConsole/ExecutionConsole.d.ts +29 -3
  120. package/dist/components/ExecutionConsole/ExecutionConsole.d.ts.map +1 -1
  121. package/dist/components/FileDropzone/FileDropzone.d.ts.map +1 -1
  122. package/dist/components/FlowEdge/FlowEdge.d.ts +15 -14
  123. package/dist/components/FlowEdge/FlowEdge.d.ts.map +1 -1
  124. package/dist/components/Input/Input.d.ts.map +1 -1
  125. package/dist/components/MonacoEditor/MonacoDiffEditor.d.ts.map +1 -1
  126. package/dist/components/MonacoEditor/MonacoEditor.d.ts.map +1 -1
  127. package/dist/components/MonacoEditor/index.d.ts +1 -1
  128. package/dist/components/MonacoEditor/index.d.ts.map +1 -1
  129. package/dist/components/PromptInput/PromptInput.d.ts.map +1 -1
  130. package/dist/components/Radio/Radio.d.ts.map +1 -1
  131. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  132. package/dist/components/Resizable/index.d.ts +1 -1
  133. package/dist/components/Resizable/index.d.ts.map +1 -1
  134. package/dist/components/Select/Select.d.ts +16 -1
  135. package/dist/components/Select/Select.d.ts.map +1 -1
  136. package/dist/components/Sortable/Sortable.d.ts.map +1 -1
  137. package/dist/components/Sortable/index.d.ts +1 -1
  138. package/dist/components/Sortable/index.d.ts.map +1 -1
  139. package/dist/components/Toast/Toast.d.ts.map +1 -1
  140. package/dist/components/ToolCard/ToolCard.d.ts +1 -1
  141. package/dist/components/ToolCard/ToolCard.d.ts.map +1 -1
  142. package/dist/components/TopBar/TopBar.d.ts +22 -1
  143. package/dist/components/TopBar/TopBar.d.ts.map +1 -1
  144. package/dist/components/TraceStep/TraceStep.d.ts.map +1 -1
  145. package/dist/components/TraceStep/index.d.ts +1 -1
  146. package/dist/components/TraceStep/index.d.ts.map +1 -1
  147. package/dist/components/WorkflowEditor/WorkflowEditor.d.ts +10 -2
  148. package/dist/components/WorkflowEditor/WorkflowEditor.d.ts.map +1 -1
  149. package/dist/components/XmlViewer/XmlViewer.d.ts.map +1 -1
  150. package/dist/components/YamlViewer/YamlViewer.d.ts.map +1 -1
  151. package/dist/index.cjs +6830 -3260
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.ts +3 -3
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +3225 -2093
  156. package/dist/index.js.map +1 -1
  157. package/dist/monaco.cjs +344 -201
  158. package/dist/monaco.cjs.map +1 -1
  159. package/dist/monaco.js +348 -205
  160. package/dist/monaco.js.map +1 -1
  161. package/dist/stories/state-matrix.d.ts.map +1 -1
  162. package/dist/styles.css +1 -1
  163. package/dist/utils/a11y.d.ts.map +1 -1
  164. package/dist/utils/sanitizeUrl.d.ts.map +1 -1
  165. package/dist/workflow/components/ConfigPanel/ConfigPanel.d.ts +64 -0
  166. package/dist/workflow/components/ConfigPanel/ConfigPanel.d.ts.map +1 -0
  167. package/dist/workflow/components/FlowCanvas/FlowCanvas.d.ts +111 -0
  168. package/dist/workflow/components/FlowCanvas/FlowCanvas.d.ts.map +1 -0
  169. package/dist/workflow/components/FlowCanvas/FlowCanvasContext.d.ts +47 -0
  170. package/dist/workflow/components/FlowCanvas/FlowCanvasContext.d.ts.map +1 -0
  171. package/dist/workflow/components/FlowEdge/FlowEdge.d.ts +26 -0
  172. package/dist/workflow/components/FlowEdge/FlowEdge.d.ts.map +1 -0
  173. package/dist/workflow/components/FlowNode/FlowNode.d.ts +13 -0
  174. package/dist/workflow/components/FlowNode/FlowNode.d.ts.map +1 -0
  175. package/dist/workflow/components/FlowNode/FlowNodeContext.d.ts +9 -0
  176. package/dist/workflow/components/FlowNode/FlowNodeContext.d.ts.map +1 -0
  177. package/dist/workflow/components/FlowNode/nodeKinds.d.ts +25 -0
  178. package/dist/workflow/components/FlowNode/nodeKinds.d.ts.map +1 -0
  179. package/dist/workflow/components/Handle/Handle.d.ts +26 -0
  180. package/dist/workflow/components/Handle/Handle.d.ts.map +1 -0
  181. package/dist/workflow/components/Handle/handleRegistry.d.ts +32 -0
  182. package/dist/workflow/components/Handle/handleRegistry.d.ts.map +1 -0
  183. package/dist/workflow/components/NodeResizer/NodeResizer.d.ts +27 -0
  184. package/dist/workflow/components/NodeResizer/NodeResizer.d.ts.map +1 -0
  185. package/dist/workflow/components/NodeToolbar/NodeToolbar.d.ts +19 -0
  186. package/dist/workflow/components/NodeToolbar/NodeToolbar.d.ts.map +1 -0
  187. package/dist/workflow/components/kinds/BaseNode.d.ts +40 -0
  188. package/dist/workflow/components/kinds/BaseNode.d.ts.map +1 -0
  189. package/dist/workflow/components/kinds/index.d.ts +55 -0
  190. package/dist/workflow/components/kinds/index.d.ts.map +1 -0
  191. package/dist/workflow/editor.d.ts +181 -0
  192. package/dist/workflow/editor.d.ts.map +1 -0
  193. package/dist/workflow/hooks/useAutoLayout.d.ts +35 -0
  194. package/dist/workflow/hooks/useAutoLayout.d.ts.map +1 -0
  195. package/dist/workflow/hooks/useFlow.d.ts +61 -0
  196. package/dist/workflow/hooks/useFlow.d.ts.map +1 -0
  197. package/dist/workflow/hooks/useFlowState.d.ts +33 -0
  198. package/dist/workflow/hooks/useFlowState.d.ts.map +1 -0
  199. package/dist/workflow/index.d.ts +25 -0
  200. package/dist/workflow/index.d.ts.map +1 -0
  201. package/dist/workflow/layout/dagre.d.ts +24 -0
  202. package/dist/workflow/layout/dagre.d.ts.map +1 -0
  203. package/dist/workflow/layout/elk.d.ts +22 -0
  204. package/dist/workflow/layout/elk.d.ts.map +1 -0
  205. package/dist/workflow/layout/types.d.ts +55 -0
  206. package/dist/workflow/layout/types.d.ts.map +1 -0
  207. package/dist/workflow/store/changes.d.ts +34 -0
  208. package/dist/workflow/store/changes.d.ts.map +1 -0
  209. package/dist/workflow/store/context.d.ts +4 -0
  210. package/dist/workflow/store/context.d.ts.map +1 -0
  211. package/dist/workflow/store/createFlowStore.d.ts +27 -0
  212. package/dist/workflow/store/createFlowStore.d.ts.map +1 -0
  213. package/dist/workflow/store/selectors.d.ts +33 -0
  214. package/dist/workflow/store/selectors.d.ts.map +1 -0
  215. package/dist/workflow/types/index.d.ts +181 -0
  216. package/dist/workflow/types/index.d.ts.map +1 -0
  217. package/dist/workflow/utils/collapse.d.ts +26 -0
  218. package/dist/workflow/utils/collapse.d.ts.map +1 -0
  219. package/dist/workflow/utils/collision.d.ts +37 -0
  220. package/dist/workflow/utils/collision.d.ts.map +1 -0
  221. package/dist/workflow/utils/geometry.d.ts +46 -0
  222. package/dist/workflow/utils/geometry.d.ts.map +1 -0
  223. package/dist/workflow/utils/parenting.d.ts +28 -0
  224. package/dist/workflow/utils/parenting.d.ts.map +1 -0
  225. package/dist/workflow/utils/paths.d.ts +19 -0
  226. package/dist/workflow/utils/paths.d.ts.map +1 -0
  227. package/dist/workflow.cjs +3562 -0
  228. package/dist/workflow.cjs.map +1 -0
  229. package/dist/workflow.js +1029 -0
  230. package/dist/workflow.js.map +1 -0
  231. package/package.json +6 -1
package/dist/monaco.js CHANGED
@@ -2,15 +2,8 @@ import {
2
2
  cn
3
3
  } from "./chunk-ZAUUGK2Y.js";
4
4
 
5
- // src/components/MonacoEditor/MonacoEditor.tsx
6
- import {
7
- Suspense,
8
- lazy,
9
- useCallback,
10
- useEffect,
11
- useRef,
12
- useState
13
- } from "react";
5
+ // src/components/MonacoEditor/MonacoDiffEditor.tsx
6
+ import { lazy, Suspense, useRef, useState } from "react";
14
7
 
15
8
  // src/components/MonacoEditor/octaviaflowTheme.ts
16
9
  var OCTAVIAFLOW_LIGHT = {
@@ -96,16 +89,206 @@ var OCTAVIAFLOW_LIGHT = {
96
89
  "input.foreground": "#161616",
97
90
  "input.border": "#C6C6C6",
98
91
  "inputOption.activeBorder": "#0F62FE",
99
- "focusBorder": "#0F62FE"
92
+ focusBorder: "#0F62FE"
100
93
  }
101
94
  };
102
95
  var OCTAVIAFLOW_THEME_ID = "octaviaflow-light";
103
96
 
104
- // src/components/MonacoEditor/MonacoEditor.tsx
105
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
106
- var Editor = lazy(
107
- () => import("@monaco-editor/react").then((mod) => ({ default: mod.Editor }))
97
+ // src/components/MonacoEditor/MonacoDiffEditor.tsx
98
+ import { jsx, jsxs } from "react/jsx-runtime";
99
+ var DiffEditor = lazy(
100
+ () => import("@monaco-editor/react").then((mod) => ({ default: mod.DiffEditor }))
108
101
  );
102
+ function MonacoDiffEditor({
103
+ original,
104
+ modified,
105
+ onModifiedChange,
106
+ language = "plaintext",
107
+ renderSideBySide = true,
108
+ readOnly = false,
109
+ hideUnchangedRegions = false,
110
+ height = 360,
111
+ minHeight = 200,
112
+ originalLabel = "Original",
113
+ modifiedLabel = "Modified",
114
+ toolbar,
115
+ options,
116
+ onMount,
117
+ style,
118
+ className,
119
+ theme,
120
+ hideToolbar = false
121
+ }) {
122
+ const editorRef = useRef(null);
123
+ const [sideBySide, setSideBySide] = useState(renderSideBySide);
124
+ const handleMount = (diffEditor, monaco) => {
125
+ editorRef.current = diffEditor;
126
+ monaco.editor.defineTheme(OCTAVIAFLOW_THEME_ID, OCTAVIAFLOW_LIGHT);
127
+ monaco.editor.setTheme(theme ?? OCTAVIAFLOW_THEME_ID);
128
+ const modifiedEditor = diffEditor.getModifiedEditor();
129
+ modifiedEditor.onDidChangeModelContent(() => {
130
+ onModifiedChange?.(modifiedEditor.getValue());
131
+ });
132
+ onMount?.(diffEditor, monaco);
133
+ };
134
+ const mergedOptions = {
135
+ readOnly,
136
+ originalEditable: false,
137
+ renderSideBySide: sideBySide,
138
+ fontFamily: "ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace",
139
+ fontSize: 13,
140
+ lineHeight: 20,
141
+ automaticLayout: true,
142
+ lineNumbersMinChars: 3,
143
+ lineDecorationsWidth: 6,
144
+ folding: true,
145
+ glyphMargin: false,
146
+ minimap: { enabled: false },
147
+ scrollBeyondLastLine: false,
148
+ smoothScrolling: true,
149
+ renderOverviewRuler: true,
150
+ diffWordWrap: "off",
151
+ padding: { top: 8, bottom: 8 },
152
+ hideUnchangedRegions: {
153
+ enabled: hideUnchangedRegions,
154
+ revealLineCount: 20,
155
+ minimumLineCount: 3,
156
+ contextLineCount: 3
157
+ },
158
+ scrollbar: {
159
+ verticalScrollbarSize: 8,
160
+ horizontalScrollbarSize: 8,
161
+ useShadows: false
162
+ },
163
+ ...options
164
+ };
165
+ return /* @__PURE__ */ jsxs("div", { className: cn("ods-monaco-diff", `ods-monaco-diff--${language}`, className), style, children: [
166
+ !hideToolbar && /* @__PURE__ */ jsxs("div", { className: "ods-monaco__toolbar", children: [
167
+ /* @__PURE__ */ jsxs("div", { className: "ods-monaco__toolbar-left", children: [
168
+ /* @__PURE__ */ jsxs("span", { className: "ods-monaco__lang", children: [
169
+ "DIFF \xB7 ",
170
+ language.toUpperCase()
171
+ ] }),
172
+ /* @__PURE__ */ jsxs("span", { className: "ods-monaco-diff__labels", children: [
173
+ /* @__PURE__ */ jsx("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--orig", children: originalLabel }),
174
+ /* @__PURE__ */ jsx("span", { className: "ods-monaco-diff__arrow", "aria-hidden": "true", children: "\u2192" }),
175
+ /* @__PURE__ */ jsx("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--mod", children: modifiedLabel })
176
+ ] }),
177
+ toolbar
178
+ ] }),
179
+ /* @__PURE__ */ jsx("div", { className: "ods-monaco__toolbar-right", children: /* @__PURE__ */ jsx(
180
+ "button",
181
+ {
182
+ type: "button",
183
+ className: cn("ods-monaco__btn", sideBySide && "ods-monaco__btn--active"),
184
+ onClick: () => setSideBySide((s) => !s),
185
+ "aria-pressed": sideBySide,
186
+ "aria-label": "Toggle side-by-side",
187
+ title: sideBySide ? "Inline" : "Side-by-side",
188
+ children: sideBySide ? /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
189
+ /* @__PURE__ */ jsx(
190
+ "rect",
191
+ {
192
+ x: "1.5",
193
+ y: "2",
194
+ width: "5",
195
+ height: "10",
196
+ rx: "0.5",
197
+ stroke: "currentColor",
198
+ strokeWidth: "1.3"
199
+ }
200
+ ),
201
+ /* @__PURE__ */ jsx(
202
+ "rect",
203
+ {
204
+ x: "7.5",
205
+ y: "2",
206
+ width: "5",
207
+ height: "10",
208
+ rx: "0.5",
209
+ stroke: "currentColor",
210
+ strokeWidth: "1.3"
211
+ }
212
+ )
213
+ ] }) : /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
214
+ /* @__PURE__ */ jsx(
215
+ "rect",
216
+ {
217
+ x: "1.5",
218
+ y: "2",
219
+ width: "11",
220
+ height: "10",
221
+ rx: "0.5",
222
+ stroke: "currentColor",
223
+ strokeWidth: "1.3"
224
+ }
225
+ ),
226
+ /* @__PURE__ */ jsx("path", { d: "M1.5 7h11", stroke: "currentColor", strokeWidth: "1.3" })
227
+ ] })
228
+ }
229
+ ) })
230
+ ] }),
231
+ /* @__PURE__ */ jsx("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx(
232
+ Suspense,
233
+ {
234
+ fallback: /* @__PURE__ */ jsxs("div", { className: "ods-monaco__loading", children: [
235
+ /* @__PURE__ */ jsx("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx(
236
+ "circle",
237
+ {
238
+ cx: "7",
239
+ cy: "7",
240
+ r: "5",
241
+ stroke: "currentColor",
242
+ strokeWidth: "1.4",
243
+ strokeDasharray: "4 18",
244
+ strokeLinecap: "round"
245
+ }
246
+ ) }) }),
247
+ /* @__PURE__ */ jsx("span", { children: "Loading diff\u2026" })
248
+ ] }),
249
+ children: /* @__PURE__ */ jsx(
250
+ DiffEditor,
251
+ {
252
+ original,
253
+ modified,
254
+ language,
255
+ height,
256
+ theme: theme ?? OCTAVIAFLOW_THEME_ID,
257
+ options: mergedOptions,
258
+ onMount: handleMount,
259
+ loading: /* @__PURE__ */ jsxs("div", { className: "ods-monaco__loading", children: [
260
+ /* @__PURE__ */ jsx("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx(
261
+ "circle",
262
+ {
263
+ cx: "7",
264
+ cy: "7",
265
+ r: "5",
266
+ stroke: "currentColor",
267
+ strokeWidth: "1.4",
268
+ strokeDasharray: "4 18",
269
+ strokeLinecap: "round"
270
+ }
271
+ ) }) }),
272
+ /* @__PURE__ */ jsx("span", { children: "Loading diff\u2026" })
273
+ ] })
274
+ }
275
+ )
276
+ }
277
+ ) })
278
+ ] });
279
+ }
280
+
281
+ // src/components/MonacoEditor/MonacoEditor.tsx
282
+ import {
283
+ lazy as lazy2,
284
+ Suspense as Suspense2,
285
+ useCallback,
286
+ useEffect,
287
+ useRef as useRef2,
288
+ useState as useState2
289
+ } from "react";
290
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
291
+ var Editor = lazy2(() => import("@monaco-editor/react").then((mod) => ({ default: mod.Editor })));
109
292
  var MARKER_SEVERITY = {
110
293
  hint: 1,
111
294
  info: 2,
@@ -138,14 +321,14 @@ function MonacoEditor({
138
321
  ariaLabel = "Code editor",
139
322
  theme
140
323
  }) {
141
- const editorRef = useRef(null);
142
- const monacoRef = useRef(null);
143
- const [wordWrap, setWordWrap] = useState(wordWrapProp ?? false);
144
- const [minimap, setMinimap] = useState(minimapProp ?? false);
145
- const [copied, setCopied] = useState(false);
146
- const [cursor, setCursor] = useState({ line: 1, column: 1 });
147
- const [selection, setSelection] = useState({ chars: 0, lines: 0 });
148
- const [lineCount, setLineCount] = useState(value.split("\n").length);
324
+ const editorRef = useRef2(null);
325
+ const monacoRef = useRef2(null);
326
+ const [wordWrap, setWordWrap] = useState2(wordWrapProp ?? false);
327
+ const [minimap, setMinimap] = useState2(minimapProp ?? false);
328
+ const [copied, setCopied] = useState2(false);
329
+ const [cursor, setCursor] = useState2({ line: 1, column: 1 });
330
+ const [selection, setSelection] = useState2({ chars: 0, lines: 0 });
331
+ const [lineCount, setLineCount] = useState2(value.split("\n").length);
149
332
  useEffect(() => {
150
333
  if (wordWrapProp !== void 0) setWordWrap(wordWrapProp);
151
334
  }, [wordWrapProp]);
@@ -262,7 +445,7 @@ function MonacoEditor({
262
445
  };
263
446
  const showWrapBtn = showWordWrapToggle && wordWrapProp === void 0;
264
447
  const showMinimapBtn = showMinimapToggle && minimapProp === void 0;
265
- return /* @__PURE__ */ jsxs(
448
+ return /* @__PURE__ */ jsxs2(
266
449
  "div",
267
450
  {
268
451
  className: cn(
@@ -273,19 +456,19 @@ function MonacoEditor({
273
456
  ),
274
457
  style,
275
458
  children: [
276
- !hideToolbar && /* @__PURE__ */ jsxs("div", { className: "ods-monaco__toolbar", children: [
277
- /* @__PURE__ */ jsxs("div", { className: "ods-monaco__toolbar-left", children: [
278
- /* @__PURE__ */ jsx("span", { className: "ods-monaco__lang", children: language.toUpperCase() }),
459
+ !hideToolbar && /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__toolbar", children: [
460
+ /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__toolbar-left", children: [
461
+ /* @__PURE__ */ jsx2("span", { className: "ods-monaco__lang", children: language.toUpperCase() }),
279
462
  toolbar
280
463
  ] }),
281
- /* @__PURE__ */ jsxs("div", { className: "ods-monaco__toolbar-right", children: [
282
- /* @__PURE__ */ jsxs("span", { className: "ods-monaco__lines", children: [
464
+ /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__toolbar-right", children: [
465
+ /* @__PURE__ */ jsxs2("span", { className: "ods-monaco__lines", children: [
283
466
  lineCount,
284
467
  " line",
285
468
  lineCount === 1 ? "" : "s"
286
469
  ] }),
287
- status && /* @__PURE__ */ jsx("span", { className: "ods-monaco__status", children: status }),
288
- showWrapBtn && /* @__PURE__ */ jsx(
470
+ status && /* @__PURE__ */ jsx2("span", { className: "ods-monaco__status", children: status }),
471
+ showWrapBtn && /* @__PURE__ */ jsx2(
289
472
  "button",
290
473
  {
291
474
  type: "button",
@@ -294,7 +477,7 @@ function MonacoEditor({
294
477
  "aria-pressed": wordWrap,
295
478
  "aria-label": "Toggle word wrap",
296
479
  title: "Word wrap",
297
- children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
480
+ children: /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(
298
481
  "path",
299
482
  {
300
483
  d: "M2 3.5h10M2 7h7.5a2 2 0 1 1 0 4H8m0 0 1.5-1.5M8 11l1.5 1.5M2 10.5h3",
@@ -306,7 +489,7 @@ function MonacoEditor({
306
489
  ) })
307
490
  }
308
491
  ),
309
- showMinimapBtn && /* @__PURE__ */ jsx(
492
+ showMinimapBtn && /* @__PURE__ */ jsx2(
310
493
  "button",
311
494
  {
312
495
  type: "button",
@@ -315,14 +498,44 @@ function MonacoEditor({
315
498
  "aria-pressed": minimap,
316
499
  "aria-label": "Toggle minimap",
317
500
  title: "Minimap",
318
- children: /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
319
- /* @__PURE__ */ jsx("rect", { x: "2", y: "2.5", width: "6", height: "9", rx: "0.5", stroke: "currentColor", strokeWidth: "1.2" }),
320
- /* @__PURE__ */ jsx("rect", { x: "9", y: "2.5", width: "3", height: "9", rx: "0.5", fill: "currentColor", opacity: "0.25" }),
321
- /* @__PURE__ */ jsx("path", { d: "M3.5 4.5h3M3.5 6.5h3M3.5 8.5h2", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round" })
501
+ children: /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
502
+ /* @__PURE__ */ jsx2(
503
+ "rect",
504
+ {
505
+ x: "2",
506
+ y: "2.5",
507
+ width: "6",
508
+ height: "9",
509
+ rx: "0.5",
510
+ stroke: "currentColor",
511
+ strokeWidth: "1.2"
512
+ }
513
+ ),
514
+ /* @__PURE__ */ jsx2(
515
+ "rect",
516
+ {
517
+ x: "9",
518
+ y: "2.5",
519
+ width: "3",
520
+ height: "9",
521
+ rx: "0.5",
522
+ fill: "currentColor",
523
+ opacity: "0.25"
524
+ }
525
+ ),
526
+ /* @__PURE__ */ jsx2(
527
+ "path",
528
+ {
529
+ d: "M3.5 4.5h3M3.5 6.5h3M3.5 8.5h2",
530
+ stroke: "currentColor",
531
+ strokeWidth: "1",
532
+ strokeLinecap: "round"
533
+ }
534
+ )
322
535
  ] })
323
536
  }
324
537
  ),
325
- showFormat && !readOnly && /* @__PURE__ */ jsx(
538
+ showFormat && !readOnly && /* @__PURE__ */ jsx2(
326
539
  "button",
327
540
  {
328
541
  type: "button",
@@ -330,13 +543,30 @@ function MonacoEditor({
330
543
  onClick: handleFormat,
331
544
  "aria-label": "Format document",
332
545
  title: "Format (Shift+Alt+F)",
333
- children: /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
334
- /* @__PURE__ */ jsx("path", { d: "M2.5 4h9M4 7h7.5M5.5 10H11", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }),
335
- /* @__PURE__ */ jsx("path", { d: "M2.5 7 3.5 6 2.5 5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" })
546
+ children: /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
547
+ /* @__PURE__ */ jsx2(
548
+ "path",
549
+ {
550
+ d: "M2.5 4h9M4 7h7.5M5.5 10H11",
551
+ stroke: "currentColor",
552
+ strokeWidth: "1.3",
553
+ strokeLinecap: "round"
554
+ }
555
+ ),
556
+ /* @__PURE__ */ jsx2(
557
+ "path",
558
+ {
559
+ d: "M2.5 7 3.5 6 2.5 5",
560
+ stroke: "currentColor",
561
+ strokeWidth: "1.2",
562
+ strokeLinecap: "round",
563
+ strokeLinejoin: "round"
564
+ }
565
+ )
336
566
  ] })
337
567
  }
338
568
  ),
339
- showCopy && /* @__PURE__ */ jsx(
569
+ showCopy && /* @__PURE__ */ jsx2(
340
570
  "button",
341
571
  {
342
572
  type: "button",
@@ -344,7 +574,7 @@ function MonacoEditor({
344
574
  onClick: handleCopy,
345
575
  "aria-label": "Copy",
346
576
  title: "Copy",
347
- children: copied ? /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
577
+ children: copied ? /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(
348
578
  "path",
349
579
  {
350
580
  d: "m3 7 3 3 5-6",
@@ -353,41 +583,88 @@ function MonacoEditor({
353
583
  strokeLinecap: "round",
354
584
  strokeLinejoin: "round"
355
585
  }
356
- ) }) : /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
357
- /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "8", height: "8", rx: "1", stroke: "currentColor", strokeWidth: "1.3" }),
358
- /* @__PURE__ */ jsx("path", { d: "M5 1.5h6V8", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
586
+ ) }) : /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
587
+ /* @__PURE__ */ jsx2(
588
+ "rect",
589
+ {
590
+ x: "3",
591
+ y: "3",
592
+ width: "8",
593
+ height: "8",
594
+ rx: "1",
595
+ stroke: "currentColor",
596
+ strokeWidth: "1.3"
597
+ }
598
+ ),
599
+ /* @__PURE__ */ jsx2(
600
+ "path",
601
+ {
602
+ d: "M5 1.5h6V8",
603
+ stroke: "currentColor",
604
+ strokeWidth: "1.3",
605
+ strokeLinecap: "round"
606
+ }
607
+ )
359
608
  ] })
360
609
  }
361
610
  )
362
611
  ] })
363
612
  ] }),
364
- /* @__PURE__ */ jsx("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsxs("div", { className: "ods-monaco__loading", children: [
365
- /* @__PURE__ */ jsx("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
366
- /* @__PURE__ */ jsx("span", { children: "Loading editor\u2026" })
367
- ] }), children: /* @__PURE__ */ jsx(
368
- Editor,
613
+ /* @__PURE__ */ jsx2("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx2(
614
+ Suspense2,
369
615
  {
370
- value,
371
- onChange: (v) => onChange?.(v ?? ""),
372
- language,
373
- height,
374
- theme: theme ?? OCTAVIAFLOW_THEME_ID,
375
- options: mergedOptions,
376
- onMount: handleMount,
377
- loading: /* @__PURE__ */ jsxs("div", { className: "ods-monaco__loading", children: [
378
- /* @__PURE__ */ jsx("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
379
- /* @__PURE__ */ jsx("span", { children: "Loading editor\u2026" })
616
+ fallback: /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__loading", children: [
617
+ /* @__PURE__ */ jsx2("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx2(
618
+ "circle",
619
+ {
620
+ cx: "7",
621
+ cy: "7",
622
+ r: "5",
623
+ stroke: "currentColor",
624
+ strokeWidth: "1.4",
625
+ strokeDasharray: "4 18",
626
+ strokeLinecap: "round"
627
+ }
628
+ ) }) }),
629
+ /* @__PURE__ */ jsx2("span", { children: "Loading editor\u2026" })
380
630
  ] }),
381
- "aria-label": ariaLabel
631
+ children: /* @__PURE__ */ jsx2(
632
+ Editor,
633
+ {
634
+ value,
635
+ onChange: (v) => onChange?.(v ?? ""),
636
+ language,
637
+ height,
638
+ theme: theme ?? OCTAVIAFLOW_THEME_ID,
639
+ options: mergedOptions,
640
+ onMount: handleMount,
641
+ loading: /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__loading", children: [
642
+ /* @__PURE__ */ jsx2("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx2(
643
+ "circle",
644
+ {
645
+ cx: "7",
646
+ cy: "7",
647
+ r: "5",
648
+ stroke: "currentColor",
649
+ strokeWidth: "1.4",
650
+ strokeDasharray: "4 18",
651
+ strokeLinecap: "round"
652
+ }
653
+ ) }) }),
654
+ /* @__PURE__ */ jsx2("span", { children: "Loading editor\u2026" })
655
+ ] }),
656
+ "aria-label": ariaLabel
657
+ }
658
+ )
382
659
  }
383
- ) }) }),
384
- !hideFooter && /* @__PURE__ */ jsxs("div", { className: "ods-monaco__footer", children: [
385
- /* @__PURE__ */ jsxs("span", { className: "ods-monaco__pos", children: [
660
+ ) }),
661
+ !hideFooter && /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__footer", children: [
662
+ /* @__PURE__ */ jsxs2("span", { className: "ods-monaco__pos", children: [
386
663
  "Ln ",
387
664
  cursor.line,
388
665
  ", Col ",
389
666
  cursor.column,
390
- selection.chars > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
667
+ selection.chars > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
391
668
  " ",
392
669
  "\xB7 ",
393
670
  selection.chars,
@@ -396,14 +673,14 @@ function MonacoEditor({
396
673
  selection.lines > 1 && ` \xB7 ${selection.lines} lines`
397
674
  ] })
398
675
  ] }),
399
- /* @__PURE__ */ jsxs("span", { className: "ods-monaco__shortcut-hint", children: [
400
- /* @__PURE__ */ jsx("kbd", { className: "ods-monaco__kbd", children: "\u2318F" }),
676
+ /* @__PURE__ */ jsxs2("span", { className: "ods-monaco__shortcut-hint", children: [
677
+ /* @__PURE__ */ jsx2("kbd", { className: "ods-monaco__kbd", children: "\u2318F" }),
401
678
  " find",
402
- /* @__PURE__ */ jsx("span", { className: "ods-monaco__sep", children: "\xB7" }),
403
- /* @__PURE__ */ jsx("kbd", { className: "ods-monaco__kbd", children: "\u2318\u21E7F" }),
679
+ /* @__PURE__ */ jsx2("span", { className: "ods-monaco__sep", children: "\xB7" }),
680
+ /* @__PURE__ */ jsx2("kbd", { className: "ods-monaco__kbd", children: "\u2318\u21E7F" }),
404
681
  " replace",
405
- /* @__PURE__ */ jsx("span", { className: "ods-monaco__sep", children: "\xB7" }),
406
- /* @__PURE__ */ jsx("kbd", { className: "ods-monaco__kbd", children: "F1" }),
682
+ /* @__PURE__ */ jsx2("span", { className: "ods-monaco__sep", children: "\xB7" }),
683
+ /* @__PURE__ */ jsx2("kbd", { className: "ods-monaco__kbd", children: "F1" }),
407
684
  " commands"
408
685
  ] })
409
686
  ] })
@@ -411,140 +688,6 @@ function MonacoEditor({
411
688
  }
412
689
  );
413
690
  }
414
-
415
- // src/components/MonacoEditor/MonacoDiffEditor.tsx
416
- import { Suspense as Suspense2, lazy as lazy2, useRef as useRef2, useState as useState2 } from "react";
417
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
418
- var DiffEditor = lazy2(
419
- () => import("@monaco-editor/react").then((mod) => ({ default: mod.DiffEditor }))
420
- );
421
- function MonacoDiffEditor({
422
- original,
423
- modified,
424
- onModifiedChange,
425
- language = "plaintext",
426
- renderSideBySide = true,
427
- readOnly = false,
428
- hideUnchangedRegions = false,
429
- height = 360,
430
- minHeight = 200,
431
- originalLabel = "Original",
432
- modifiedLabel = "Modified",
433
- toolbar,
434
- options,
435
- onMount,
436
- style,
437
- className,
438
- theme,
439
- hideToolbar = false
440
- }) {
441
- const editorRef = useRef2(null);
442
- const [sideBySide, setSideBySide] = useState2(renderSideBySide);
443
- const handleMount = (diffEditor, monaco) => {
444
- editorRef.current = diffEditor;
445
- monaco.editor.defineTheme(OCTAVIAFLOW_THEME_ID, OCTAVIAFLOW_LIGHT);
446
- monaco.editor.setTheme(theme ?? OCTAVIAFLOW_THEME_ID);
447
- const modifiedEditor = diffEditor.getModifiedEditor();
448
- modifiedEditor.onDidChangeModelContent(() => {
449
- onModifiedChange?.(modifiedEditor.getValue());
450
- });
451
- onMount?.(diffEditor, monaco);
452
- };
453
- const mergedOptions = {
454
- readOnly,
455
- originalEditable: false,
456
- renderSideBySide: sideBySide,
457
- fontFamily: "ui-monospace, SFMono-Regular, 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace",
458
- fontSize: 13,
459
- lineHeight: 20,
460
- automaticLayout: true,
461
- lineNumbersMinChars: 3,
462
- lineDecorationsWidth: 6,
463
- folding: true,
464
- glyphMargin: false,
465
- minimap: { enabled: false },
466
- scrollBeyondLastLine: false,
467
- smoothScrolling: true,
468
- renderOverviewRuler: true,
469
- diffWordWrap: "off",
470
- padding: { top: 8, bottom: 8 },
471
- hideUnchangedRegions: {
472
- enabled: hideUnchangedRegions,
473
- revealLineCount: 20,
474
- minimumLineCount: 3,
475
- contextLineCount: 3
476
- },
477
- scrollbar: {
478
- verticalScrollbarSize: 8,
479
- horizontalScrollbarSize: 8,
480
- useShadows: false
481
- },
482
- ...options
483
- };
484
- return /* @__PURE__ */ jsxs2(
485
- "div",
486
- {
487
- className: cn("ods-monaco-diff", `ods-monaco-diff--${language}`, className),
488
- style,
489
- children: [
490
- !hideToolbar && /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__toolbar", children: [
491
- /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__toolbar-left", children: [
492
- /* @__PURE__ */ jsxs2("span", { className: "ods-monaco__lang", children: [
493
- "DIFF \xB7 ",
494
- language.toUpperCase()
495
- ] }),
496
- /* @__PURE__ */ jsxs2("span", { className: "ods-monaco-diff__labels", children: [
497
- /* @__PURE__ */ jsx2("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--orig", children: originalLabel }),
498
- /* @__PURE__ */ jsx2("span", { className: "ods-monaco-diff__arrow", "aria-hidden": "true", children: "\u2192" }),
499
- /* @__PURE__ */ jsx2("span", { className: "ods-monaco-diff__label ods-monaco-diff__label--mod", children: modifiedLabel })
500
- ] }),
501
- toolbar
502
- ] }),
503
- /* @__PURE__ */ jsx2("div", { className: "ods-monaco__toolbar-right", children: /* @__PURE__ */ jsx2(
504
- "button",
505
- {
506
- type: "button",
507
- className: cn(
508
- "ods-monaco__btn",
509
- sideBySide && "ods-monaco__btn--active"
510
- ),
511
- onClick: () => setSideBySide((s) => !s),
512
- "aria-pressed": sideBySide,
513
- "aria-label": "Toggle side-by-side",
514
- title: sideBySide ? "Inline" : "Side-by-side",
515
- children: sideBySide ? /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
516
- /* @__PURE__ */ jsx2("rect", { x: "1.5", y: "2", width: "5", height: "10", rx: "0.5", stroke: "currentColor", strokeWidth: "1.3" }),
517
- /* @__PURE__ */ jsx2("rect", { x: "7.5", y: "2", width: "5", height: "10", rx: "0.5", stroke: "currentColor", strokeWidth: "1.3" })
518
- ] }) : /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
519
- /* @__PURE__ */ jsx2("rect", { x: "1.5", y: "2", width: "11", height: "10", rx: "0.5", stroke: "currentColor", strokeWidth: "1.3" }),
520
- /* @__PURE__ */ jsx2("path", { d: "M1.5 7h11", stroke: "currentColor", strokeWidth: "1.3" })
521
- ] })
522
- }
523
- ) })
524
- ] }),
525
- /* @__PURE__ */ jsx2("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx2(Suspense2, { fallback: /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__loading", children: [
526
- /* @__PURE__ */ jsx2("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx2("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
527
- /* @__PURE__ */ jsx2("span", { children: "Loading diff\u2026" })
528
- ] }), children: /* @__PURE__ */ jsx2(
529
- DiffEditor,
530
- {
531
- original,
532
- modified,
533
- language,
534
- height,
535
- theme: theme ?? OCTAVIAFLOW_THEME_ID,
536
- options: mergedOptions,
537
- onMount: handleMount,
538
- loading: /* @__PURE__ */ jsxs2("div", { className: "ods-monaco__loading", children: [
539
- /* @__PURE__ */ jsx2("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx2("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
540
- /* @__PURE__ */ jsx2("span", { children: "Loading diff\u2026" })
541
- ] })
542
- }
543
- ) }) })
544
- ]
545
- }
546
- );
547
- }
548
691
  export {
549
692
  MonacoDiffEditor,
550
693
  MonacoEditor,