@harnessio/yaml-editor 0.13.0 → 0.15.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.
package/dist/index.js CHANGED
@@ -1,14 +1,47 @@
1
- var oe = Object.defineProperty;
2
- var re = (t, e, n) => e in t ? oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var K = (t, e, n) => (re(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import ae, { useState as k, useEffect as C, useRef as x, useMemo as w, createContext as se, useCallback as ie, useContext as ce } from "react";
5
- import U, { loader as D, useMonaco as T, DiffEditor as le } from "@monaco-editor/react";
6
- import * as P from "monaco-editor";
7
- import { languages as I, Uri as ue } from "monaco-editor";
8
- import { configureMonacoYaml as de } from "monaco-yaml";
9
- var Y = { exports: {} }, j = {};
10
- /**
11
- * @license React
1
+ var ue = Object.defineProperty;
2
+ var de = (e, t, n) => t in e ? ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var J = (e, t, n) => (de(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ import me, { useState as L, useEffect as $, useRef as w, useMemo as _, useCallback as q, createContext as fe, useContext as pe } from "react";
5
+ import Z, { loader as A, useMonaco as B, DiffEditor as he } from "@monaco-editor/react";
6
+ import * as D from "monaco-editor";
7
+ import { languages as H, Uri as ge } from "monaco-editor";
8
+ import { yamlDefaults as ye } from "monaco-yaml";
9
+ var te = { exports: {} }, U = {};
10
+ /*
11
+ object-assign
12
+ (c) Sindre Sorhus
13
+ @license MIT
14
+ */
15
+ var Q = Object.getOwnPropertySymbols, be = Object.prototype.hasOwnProperty, ve = Object.prototype.propertyIsEnumerable;
16
+ function Se(e) {
17
+ if (e == null)
18
+ throw new TypeError("Object.assign cannot be called with null or undefined");
19
+ return Object(e);
20
+ }
21
+ function xe() {
22
+ try {
23
+ if (!Object.assign)
24
+ return !1;
25
+ var e = new String("abc");
26
+ if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5")
27
+ return !1;
28
+ for (var t = {}, n = 0; n < 10; n++)
29
+ t["_" + String.fromCharCode(n)] = n;
30
+ var r = Object.getOwnPropertyNames(t).map(function(o) {
31
+ return t[o];
32
+ });
33
+ if (r.join("") !== "0123456789")
34
+ return !1;
35
+ var a = {};
36
+ return "abcdefghijklmnopqrst".split("").forEach(function(o) {
37
+ a[o] = o;
38
+ }), Object.keys(Object.assign({}, a)).join("") === "abcdefghijklmnopqrst";
39
+ } catch {
40
+ return !1;
41
+ }
42
+ }
43
+ xe();
44
+ /** @license React v17.0.2
12
45
  * react-jsx-runtime.production.min.js
13
46
  *
14
47
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -16,98 +49,123 @@ var Y = { exports: {} }, j = {};
16
49
  * This source code is licensed under the MIT license found in the
17
50
  * LICENSE file in the root directory of this source tree.
18
51
  */
19
- var me = ae, he = Symbol.for("react.element"), fe = Symbol.for("react.fragment"), pe = Object.prototype.hasOwnProperty, ge = me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, be = { key: !0, ref: !0, __self: !0, __source: !0 };
20
- function z(t, e, n) {
52
+ var Ee = me, ne = 60103;
53
+ U.Fragment = 60107;
54
+ if (typeof Symbol == "function" && Symbol.for) {
55
+ var X = Symbol.for;
56
+ ne = X("react.element"), U.Fragment = X("react.fragment");
57
+ }
58
+ var Me = Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Oe = Object.prototype.hasOwnProperty, Ce = { key: !0, ref: !0, __self: !0, __source: !0 };
59
+ function re(e, t, n) {
21
60
  var r, a = {}, o = null, s = null;
22
- n !== void 0 && (o = "" + n), e.key !== void 0 && (o = "" + e.key), e.ref !== void 0 && (s = e.ref);
23
- for (r in e)
24
- pe.call(e, r) && !be.hasOwnProperty(r) && (a[r] = e[r]);
25
- if (t && t.defaultProps)
26
- for (r in e = t.defaultProps, e)
27
- a[r] === void 0 && (a[r] = e[r]);
28
- return { $$typeof: he, type: t, key: o, ref: s, props: a, _owner: ge.current };
61
+ n !== void 0 && (o = "" + n), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (s = t.ref);
62
+ for (r in t)
63
+ Oe.call(t, r) && !Ce.hasOwnProperty(r) && (a[r] = t[r]);
64
+ if (e && e.defaultProps)
65
+ for (r in t = e.defaultProps, t)
66
+ a[r] === void 0 && (a[r] = t[r]);
67
+ return { $$typeof: ne, type: e, key: o, ref: s, props: a, _owner: Me.current };
29
68
  }
30
- j.Fragment = fe;
31
- j.jsx = z;
32
- j.jsxs = z;
33
- Y.exports = j;
34
- var y = Y.exports;
35
- const F = (t) => {
36
- const { themeConfig: e, editor: n, theme: r } = t, { defaultTheme: a } = e ?? {}, [o, s] = k(r ?? a ?? "vs-dark");
37
- return C(() => {
38
- var g;
39
- (g = e == null ? void 0 : e.themes) == null || g.forEach((u) => {
40
- P.editor.defineTheme(u.themeName, u.themeData);
69
+ U.jsx = re;
70
+ U.jsxs = re;
71
+ te.exports = U;
72
+ var P = te.exports;
73
+ const F = {
74
+ selectOnLineNumbers: !0,
75
+ scrollBeyondLastLine: !1,
76
+ padding: {
77
+ top: 16,
78
+ bottom: 16
79
+ },
80
+ minimap: { enabled: !1 },
81
+ fontSize: 13,
82
+ fontFamily: '"JetBrains Mono", "monospace"',
83
+ lineHeight: 20,
84
+ scrollbar: {
85
+ verticalScrollbarSize: 14,
86
+ horizontalScrollbarSize: 14,
87
+ verticalSliderSize: 6,
88
+ horizontalSliderSize: 6
89
+ },
90
+ overviewRulerBorder: !1,
91
+ overviewRulerLanes: 0,
92
+ renderLineHighlight: "none"
93
+ }, z = (e) => {
94
+ const { themeConfig: t, editor: n, theme: r } = e, { defaultTheme: a } = t ?? {}, [o, s] = L(r ?? a ?? "vs-dark");
95
+ return $(() => {
96
+ var c;
97
+ (c = t == null ? void 0 : t.themes) == null || c.forEach((h) => {
98
+ D.editor.defineTheme(h.themeName, h.themeData);
41
99
  });
42
- }, [P]), C(() => {
43
- P.editor && r && (P.editor.setTheme(r), s(r));
100
+ }, [D]), $(() => {
101
+ D.editor && r && (D.editor.setTheme(r), s(r));
44
102
  }, [n, r]), { theme: o };
45
103
  };
46
- function ve(t) {
47
- const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
104
+ function we(e) {
105
+ const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
48
106
  let n = "";
49
- for (let r = 0; r < t; r++)
50
- n += e.charAt(Math.floor(Math.random() * e.length));
107
+ for (let r = 0; r < e; r++)
108
+ n += t.charAt(Math.floor(Math.random() * t.length));
51
109
  return n;
52
110
  }
53
- function ye(t) {
54
- return t.replace("'", "&#39;");
111
+ function Pe(e) {
112
+ return e.replace("'", "&#39;");
55
113
  }
56
- function Ee({
57
- instanceId: t,
58
- lineNumbersPosition: e
114
+ function $e({
115
+ instanceId: e,
116
+ lineNumbersPosition: t
59
117
  }) {
60
118
  let n = "";
61
- return e === "center" && (n += `
62
- .monaco-editor-${t} .monaco-scrollable-element.editor-scrollable {
119
+ return t === "center" && (n += `
120
+ .monaco-editor-${e} .monaco-scrollable-element.editor-scrollable {
63
121
  width: 100% !important;
64
122
  left: 0px !important;
65
123
  }
66
124
 
67
- .monaco-editor-${t} .view-lines, .view-zones {
125
+ .monaco-editor-${e} .view-lines, .view-zones {
68
126
  width: 100% !important;
69
127
  }
70
128
 
71
- .monaco-editor-${t} .margin {
129
+ .monaco-editor-${e} .margin {
72
130
  z-index: 1000;
73
131
  background: transparent !important;
74
132
  }`), n += `
75
- .monaco-editor-${t} .blame-editor-separator {
133
+ .monaco-editor-${e} .blame-editor-separator {
76
134
  right: 14px;
77
135
  pointer-events: none;
78
136
  }
79
137
 
80
- .monaco-editor-${t} {
138
+ .monaco-editor-${e} {
81
139
  outline: none !important;
82
140
  }
83
141
 
84
- .monaco-editor-${t} .view-line .blame-editor-commit {
142
+ .monaco-editor-${e} .view-line .blame-editor-commit {
85
143
  display: inline-block;
86
- color: white;
144
+ color: var(--canary-foreground-01);
87
145
  }`, n;
88
146
  }
89
- function Me({
90
- instanceId: t,
91
- blameData: e,
147
+ function je({
148
+ instanceId: e,
149
+ blameData: t,
92
150
  dateWidth: n,
93
151
  avatarSize: r
94
152
  }) {
95
153
  let a = "";
96
- return e.forEach((o) => {
97
- var d, f, c, p, m, i, b, l;
98
- const s = (f = (d = o == null ? void 0 : o.commitInfo) == null ? void 0 : d.author) == null ? void 0 : f.avatarUrl, g = (p = (c = o == null ? void 0 : o.commitInfo) == null ? void 0 : c.author) == null ? void 0 : p.initials, u = s ? `background: url('${(i = (m = o == null ? void 0 : o.commitInfo) == null ? void 0 : m.author) == null ? void 0 : i.avatarUrl}');` : "";
99
- for (let h = o.fromLineNumber; h <= o.toLineNumber; h++)
100
- h === o.fromLineNumber ? a += `
101
- .monaco-editor-${t} .view-line .blame-editor-commit-${h}:before {
102
- content: '${ye(((l = (b = o == null ? void 0 : o.commitInfo) == null ? void 0 : b.author) == null ? void 0 : l.when) || "")}';
154
+ return t.forEach((o) => {
155
+ var u, d, i, b, E, l, v, m;
156
+ const s = (d = (u = o == null ? void 0 : o.commitInfo) == null ? void 0 : u.author) == null ? void 0 : d.avatarUrl, c = (b = (i = o == null ? void 0 : o.commitInfo) == null ? void 0 : i.author) == null ? void 0 : b.initials, h = s ? `background: url('${(l = (E = o == null ? void 0 : o.commitInfo) == null ? void 0 : E.author) == null ? void 0 : l.avatarUrl}');` : "";
157
+ for (let p = o.fromLineNumber; p <= o.toLineNumber; p++)
158
+ p === o.fromLineNumber ? a += `
159
+ .monaco-editor-${e} .view-line .blame-editor-commit-${p}:before {
160
+ content: '${Pe(((m = (v = o == null ? void 0 : o.commitInfo) == null ? void 0 : v.author) == null ? void 0 : m.when) || "")}';
103
161
  position: absolute;
104
162
  left: 10px;
105
163
  top: 0px;
106
164
  color: hsl(var(--canary-foreground-03));
107
165
  }
108
166
 
109
- .monaco-editor-${t} .view-line .blame-editor-commit-${h}:after {
110
- content: '${g ?? " "}';
167
+ .monaco-editor-${e} .view-line .blame-editor-commit-${p}:after {
168
+ content: '${c ?? " "}';
111
169
  position: absolute;
112
170
  border-radius: 50%;
113
171
  padding: 4px;
@@ -119,10 +177,10 @@ function Me({
119
177
  color: hsl(var(--canary-foreground-03));
120
178
  width: ${r}px;
121
179
  height: ${r}px;
122
- ${u}
180
+ ${h}
123
181
  background-size: 100% 100%;
124
182
  }` : a += `
125
- .monaco-editor-${t} .view-line .blame-editor-commit-${h}:before {
183
+ .monaco-editor-${e} .view-line .blame-editor-commit-${p}:before {
126
184
  content: ' ';
127
185
  left: 10px;
128
186
  top: 0px;
@@ -130,13 +188,13 @@ function Me({
130
188
  }`;
131
189
  }), a;
132
190
  }
133
- function Se(t, e) {
191
+ function Ne(e, t) {
134
192
  let n = "";
135
- return t.length > e ? n = t.slice(0, e - 3) + "..." : t.length < e ? n = t + " ".repeat(e - t.length) : n = t, " ".repeat(25) + n + " ".repeat(10);
193
+ return e.length > t ? n = e.slice(0, t - 3) + "..." : e.length < t ? n = e + " ".repeat(t - e.length) : n = e, " ".repeat(25) + n + " ".repeat(10);
136
194
  }
137
- D.config({ monaco: P });
138
- const R = 450, xe = 30, Ce = 140, Pe = 24, $e = 46, Ne = {
139
- selectOnLineNumbers: !0,
195
+ A.config({ monaco: D });
196
+ const Y = 450, ke = 30, De = 140, Le = 24, _e = {
197
+ ...F,
140
198
  readOnly: !0,
141
199
  matchBrackets: "never",
142
200
  renderValidationDecorations: "off",
@@ -144,251 +202,272 @@ const R = 450, xe = 30, Ce = 140, Pe = 24, $e = 46, Ne = {
144
202
  folding: !1,
145
203
  stickyScroll: { enabled: !1 },
146
204
  renderWhitespace: "none",
147
- renderLineHighlight: "none",
148
- minimap: { enabled: !1 },
149
- scrollBeyondLastLine: !1,
150
- fontSize: 14,
151
- fontFamily: '"JetBrains Mono", "monospace"',
152
- lineHeight: 20
205
+ renderLineHighlight: "none"
153
206
  };
154
- function Ve(t) {
155
- const {
156
- code: e,
157
- language: n,
158
- themeConfig: r,
159
- lineNumbersPosition: a = "left",
160
- blameData: o,
161
- showSeparators: s = !0,
162
- theme: g
163
- } = t, u = x(o);
164
- u.current = o;
165
- const d = x(ve(5));
166
- T();
167
- const [f, c] = k(), [p, m] = k(0), i = x(null), b = x(null);
168
- function l() {
169
- const M = b.current, $ = i.current;
170
- if (!M || !$)
207
+ function Qe({
208
+ code: e,
209
+ language: t,
210
+ themeConfig: n,
211
+ lineNumbersPosition: r = "left",
212
+ blameData: a,
213
+ showSeparators: o = !0,
214
+ theme: s,
215
+ height: c = "75vh",
216
+ options: h
217
+ }) {
218
+ const u = w(a), d = w(we(5));
219
+ B();
220
+ const [i, b] = L(), [E, l] = L(0), v = w(null), m = w(null);
221
+ $(() => {
222
+ u.current = a;
223
+ }, [a]);
224
+ function p() {
225
+ const f = m.current, g = v.current;
226
+ if (!f || !g)
171
227
  return;
172
- s && M.changeViewZones(function(v) {
173
- v.addZone({
228
+ o && f.changeViewZones(function(y) {
229
+ y.addZone({
174
230
  afterLineNumber: 0,
175
231
  heightInPx: 10,
176
232
  domNode: document.createElement("div")
177
- }), u.current.forEach((N, E) => {
178
- if (E !== u.current.length - 1) {
179
- const S = document.createElement("div");
180
- S.style.borderTop = "1px solid hsl(var(--canary-border-01))", S.style.marginTop = "9px", S.className = "blame-editor-separator", v.addZone({
181
- afterLineNumber: N.toLineNumber,
233
+ }), u.current.forEach((j, M) => {
234
+ if (M !== u.current.length - 1) {
235
+ const x = document.createElement("div");
236
+ x.style.borderTop = "1px solid hsl(var(--canary-border-01))", x.style.marginTop = "9px", x.className = "blame-editor-separator", y.addZone({
237
+ afterLineNumber: j.toLineNumber,
182
238
  heightInPx: 20,
183
- domNode: S
239
+ domNode: x
184
240
  });
185
241
  }
186
242
  });
187
243
  });
188
- const L = [];
189
- u.current.forEach((v) => {
190
- var N;
191
- for (let E = v.fromLineNumber; E <= v.toLineNumber; E++)
192
- L.push({
193
- range: new $.Range(E, 0, E + 1, 0),
244
+ const C = [];
245
+ u.current.forEach((y) => {
246
+ var j;
247
+ for (let M = y.fromLineNumber; M <= y.toLineNumber; M++)
248
+ C.push({
249
+ range: new g.Range(M, 0, M + 1, 0),
194
250
  options: {
195
251
  before: {
196
- content: Se(
197
- E === v.fromLineNumber && ((N = v == null ? void 0 : v.commitInfo) == null ? void 0 : N.title) || "",
198
- xe
252
+ content: Ne(
253
+ M === y.fromLineNumber && ((j = y == null ? void 0 : y.commitInfo) == null ? void 0 : j.title) || "",
254
+ ke
199
255
  ),
200
- cursorStops: $.editor.InjectedTextCursorStops.None,
201
- inlineClassName: `blame-editor-commit blame-editor-commit-${E}`
256
+ cursorStops: g.editor.InjectedTextCursorStops.None,
257
+ inlineClassName: `blame-editor-commit blame-editor-commit-${M}`
202
258
  }
203
259
  }
204
260
  });
205
- }), M.createDecorationsCollection(L);
261
+ }), f.createDecorationsCollection(C);
206
262
  }
207
- function h(M, $) {
208
- var L, v, N, E, S, W;
209
- b.current = M, i.current = $, M.setValue(e), c(M), (N = (v = (L = $.languages.typescript) == null ? void 0 : L.typescriptDefaults) == null ? void 0 : v.setDiagnosticsOptions) == null || N.call(v, { noSuggestionDiagnostics: !0 }), (W = (S = (E = $.languages.typescript) == null ? void 0 : E.javascriptDefaults) == null ? void 0 : S.setDiagnosticsOptions) == null || W.call(S, { noSuggestionDiagnostics: !0 }), l();
263
+ function O(f, g) {
264
+ var C, y, j, M, x, I;
265
+ m.current = f, v.current = g, f.setValue(e), b(f), (j = (y = (C = g.languages.typescript) == null ? void 0 : C.typescriptDefaults) == null ? void 0 : y.setDiagnosticsOptions) == null || j.call(y, {
266
+ noSuggestionDiagnostics: !0,
267
+ noSyntaxValidation: !0,
268
+ noSemanticValidation: !0
269
+ }), (I = (x = (M = g.languages.typescript) == null ? void 0 : M.javascriptDefaults) == null ? void 0 : x.setDiagnosticsOptions) == null || I.call(x, {
270
+ noSuggestionDiagnostics: !0,
271
+ noSyntaxValidation: !0,
272
+ noSemanticValidation: !0
273
+ }), p();
210
274
  }
211
- C(() => {
212
- f == null || f.setValue(e);
275
+ $(() => {
276
+ i == null || i.setValue(e);
213
277
  }, [e]);
214
- const { theme: O } = F({ monacoRef: i, themeConfig: r, editor: f, theme: g }), B = w(
215
- () => Ee({
278
+ const { theme: S } = z({ monacoRef: v, themeConfig: n, editor: i, theme: s }), N = _(
279
+ () => $e({
216
280
  instanceId: d.current,
217
- lineNumbersPosition: a
281
+ lineNumbersPosition: r
218
282
  }),
219
- [o]
220
- ), ee = w(
221
- () => Me({
283
+ [a]
284
+ ), k = _(
285
+ () => je({
222
286
  instanceId: d.current,
223
- blameData: o,
224
- avatarSize: Pe,
225
- dateWidth: Ce
287
+ blameData: a,
288
+ avatarSize: Le,
289
+ dateWidth: De
226
290
  }),
227
- [o]
291
+ [a]
228
292
  );
229
- C(() => {
230
- if (a === "center") {
231
- const M = document.getElementsByClassName("lines-content")[0];
232
- if (M) {
233
- const $ = { attributes: !0 }, L = (N) => {
234
- for (const E of N) {
235
- const S = parseInt(getComputedStyle(M).left);
236
- m(S);
293
+ $(() => {
294
+ if (r === "center") {
295
+ const f = document.getElementsByClassName("lines-content")[0];
296
+ if (f) {
297
+ const g = { attributes: !0 }, C = (j) => {
298
+ for (const M of j) {
299
+ const x = parseInt(getComputedStyle(f).left);
300
+ l(x);
237
301
  }
238
- }, v = new MutationObserver(L);
239
- return v.observe(M, $), () => {
240
- v.disconnect();
302
+ }, y = new MutationObserver(C);
303
+ return y.observe(f, g), () => {
304
+ y.disconnect();
241
305
  };
242
306
  }
243
307
  }
244
308
  });
245
- const te = w(() => `
309
+ const T = _(() => `
246
310
  .monaco-editor-${d.current} .margin {
247
- left: ${R - $e + p}px !important;
311
+ left: ${Y + 16 + E}px !important;
248
312
  pointer-events: none;
249
- }`, [p]), ne = `
313
+ }`, [E]), R = `
250
314
  .monaco-editor-${d.current} .view-overlays {
251
- clip-path: polygon(${R + 16}px 0, 100% 0%, 100% 100%, ${R + 16}px 100%);
315
+ clip-path: polygon(${Y + 16}px 0, 100% 0%, 100% 100%, ${Y + 16}px 100%);
252
316
  height:100% !important;
253
- }`;
254
- return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
255
- /* @__PURE__ */ y.jsx(
317
+ }`, W = _(
318
+ () => ({
319
+ ..._e,
320
+ ...h
321
+ }),
322
+ [h]
323
+ );
324
+ return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
325
+ /* @__PURE__ */ P.jsx(
256
326
  "style",
257
327
  {
258
328
  dangerouslySetInnerHTML: {
259
- __html: `${B} ${ee} ${te} ${ne}`
329
+ __html: `${N} ${k} ${T} ${R}`
260
330
  }
261
331
  }
262
332
  ),
263
- /* @__PURE__ */ y.jsx(
264
- U,
333
+ /* @__PURE__ */ P.jsx(
334
+ Z,
265
335
  {
266
- height: "75vh",
267
336
  className: `monaco-editor-${d.current} overflow-hidden rounded-b-md border-x border-b`,
268
- language: n,
269
- theme: O,
270
- options: Ne,
271
- onMount: h
337
+ height: c,
338
+ language: t,
339
+ theme: S,
340
+ options: W,
341
+ onMount: O
272
342
  }
273
343
  )
274
344
  ] });
275
345
  }
276
- D.config({ monaco: P });
277
- const ke = {
278
- selectOnLineNumbers: !0,
279
- scrollBeyondLastLine: !1,
280
- padding: {
281
- top: 10
282
- },
283
- minimap: { enabled: !1 },
284
- fontSize: 14,
285
- fontFamily: '"JetBrains Mono", "monospace"',
286
- lineHeight: 20
346
+ A.config({ monaco: D });
347
+ const Te = {
348
+ ...F
287
349
  };
288
- function Ye(t) {
289
- const { codeRevision: e, onCodeRevisionChange: n, language: r, themeConfig: a, options: o, theme: s } = t;
290
- T();
291
- const [g, u] = k(), d = x(), f = x({ code: "", revisionId: 0 }), c = x(null);
292
- function p(b, l) {
293
- c.current = b, d.current = l, b.setValue(e.code), u(b);
294
- }
295
- C(() => {
296
- var b, l;
297
- if (c.current && (!e.revisionId || e.revisionId > Number((b = f.current) == null ? void 0 : b.revisionId))) {
298
- const h = c.current.getModel();
299
- h && (o != null && o.readOnly ? (l = c.current) == null || l.setValue(e.code) : (c.current.pushUndoStop(), c.current.executeEdits("edit", [
350
+ function Xe({
351
+ codeRevision: e,
352
+ onCodeRevisionChange: t,
353
+ language: n,
354
+ themeConfig: r,
355
+ options: a,
356
+ theme: o,
357
+ height: s = "75vh"
358
+ }) {
359
+ B();
360
+ const [c, h] = L(), u = w(), d = w({ code: "", revisionId: 0 }), i = w(null), b = q(
361
+ (v, m) => {
362
+ var p, O, S, N, k, T;
363
+ i.current = v, u.current = m, v.setValue(e.code), h(v), (S = (O = (p = m.languages.typescript) == null ? void 0 : p.typescriptDefaults) == null ? void 0 : O.setDiagnosticsOptions) == null || S.call(O, {
364
+ noSuggestionDiagnostics: !0,
365
+ noSyntaxValidation: !0,
366
+ noSemanticValidation: !0
367
+ }), (T = (k = (N = m.languages.typescript) == null ? void 0 : N.javascriptDefaults) == null ? void 0 : k.setDiagnosticsOptions) == null || T.call(k, {
368
+ noSuggestionDiagnostics: !0,
369
+ noSyntaxValidation: !0,
370
+ noSemanticValidation: !0
371
+ });
372
+ },
373
+ [e.code]
374
+ );
375
+ $(() => {
376
+ var v, m;
377
+ if (i.current && (!e.revisionId || e.revisionId > Number((v = d.current) == null ? void 0 : v.revisionId))) {
378
+ const p = i.current.getModel();
379
+ p && (a != null && a.readOnly ? (m = i.current) == null || m.setValue(e.code) : (i.current.pushUndoStop(), i.current.executeEdits("edit", [
300
380
  {
301
- range: h.getFullModelRange(),
381
+ range: p.getFullModelRange(),
302
382
  text: e.code
303
383
  }
304
- ]), c.current.pushUndoStop()));
384
+ ]), i.current.pushUndoStop()));
305
385
  }
306
- }, [e, c.current]);
307
- const { theme: m } = F({ monacoRef: d, themeConfig: a, editor: g, theme: s }), i = w(() => ({ ...ke, ...o || {} }), [o]);
308
- return /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx(
309
- U,
386
+ }, [e, i.current]);
387
+ const { theme: E } = z({ monacoRef: u, themeConfig: r, editor: c, theme: o }), l = _(() => ({ ...Te, ...a || {} }), [a]);
388
+ return /* @__PURE__ */ P.jsx(P.Fragment, { children: /* @__PURE__ */ P.jsx(
389
+ Z,
310
390
  {
311
391
  className: "overflow-hidden rounded-b-md border-x border-b",
312
- height: "75vh",
313
- onChange: (b, l) => {
314
- f.current = { code: b ?? "", revisionId: l.versionId }, n({ ...f.current }, l);
392
+ height: s,
393
+ onChange: (v, m) => {
394
+ d.current = { code: v ?? "", revisionId: m.versionId }, t({ ...d.current }, m);
315
395
  },
316
- language: r,
317
- theme: m,
318
- options: i,
319
- onMount: p
396
+ language: n,
397
+ theme: E,
398
+ options: l,
399
+ onMount: b
320
400
  }
321
401
  ) });
322
402
  }
323
- D.config({ monaco: P });
324
- const Le = {
325
- selectOnLineNumbers: !0,
326
- minimap: { enabled: !1 },
403
+ A.config({ monaco: D });
404
+ const Ie = {
405
+ ...F,
327
406
  codeLens: !1,
328
- scrollBeyondLastLine: !1,
329
407
  smartSelect: {
330
408
  selectLeadingAndTrailingWhitespace: !0
331
409
  },
332
410
  originalEditable: !1,
333
- overviewRulerBorder: !1,
334
- padding: {
335
- top: 10
336
- },
337
- fontSize: 14,
338
- fontFamily: '"JetBrains Mono", "monospace"',
339
- lineHeight: 20
411
+ overviewRulerBorder: !1
340
412
  };
341
- function ze(t) {
342
- const { original: e, modified: n, language: r, themeConfig: a, options: o, theme: s } = t;
343
- T();
344
- const [g, u] = k(), d = x(), { theme: f } = F({ monacoRef: d, themeConfig: a, editor: g, theme: s }), c = w(() => ({ ...Le, ...o || {} }), [o]);
345
- return /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx(
346
- le,
413
+ function et({
414
+ original: e,
415
+ modified: t,
416
+ language: n,
417
+ themeConfig: r,
418
+ options: a,
419
+ theme: o,
420
+ height: s = "75vh"
421
+ }) {
422
+ B();
423
+ const [c, h] = L(), u = w(), { theme: d } = z({ monacoRef: u, themeConfig: r, editor: c, theme: o }), i = _(() => ({ ...Ie, ...a || {} }), [a]);
424
+ return /* @__PURE__ */ P.jsx(P.Fragment, { children: /* @__PURE__ */ P.jsx(
425
+ he,
347
426
  {
348
427
  className: "overflow-hidden rounded-b-md border-x border-b",
349
- language: r,
350
- theme: f,
428
+ language: n,
429
+ theme: d,
351
430
  original: e,
352
- modified: n,
353
- height: "75vh",
354
- options: c,
355
- onMount: u
431
+ modified: t,
432
+ height: s,
433
+ options: i,
434
+ onMount: h
356
435
  }
357
436
  ) });
358
437
  }
359
- var q = /* @__PURE__ */ ((t) => (t.ContainsPath = "ContainsPath", t))(q || {});
360
- function we(t) {
361
- const { pathSymbolMap: e, inlineActions: n = [], commandId: r } = t, a = Object.fromEntries(e.entries()), o = [];
438
+ var oe = /* @__PURE__ */ ((e) => (e.ContainsPath = "ContainsPath", e))(oe || {});
439
+ function Ve(e) {
440
+ const { pathSymbolMap: t, inlineActions: n = [], commandId: r } = e, a = Object.fromEntries(t.entries()), o = [];
362
441
  return n == null || n.forEach((s) => {
363
- const g = s.actions;
364
- s.selectors.forEach((d) => {
365
- switch (d.type) {
366
- case q.ContainsPath: {
367
- d.paths.forEach((f) => {
368
- let p = Object.keys(a).map((i) => ({
369
- fullPath: i,
370
- path: i,
371
- symbol: a[i]
372
- })).filter((i) => i.path.startsWith(d.basePath));
373
- p = p.map((i) => ({
374
- ...i,
375
- path: i.path.substring(d.basePath.length)
376
- })), p.filter((i) => f.test(i.path)).forEach((i) => {
377
- const b = i.fullPath, l = i.symbol, h = l.range;
378
- g.forEach((O) => {
379
- const B = {
380
- range: h,
381
- symbols: [l],
442
+ const c = s.actions;
443
+ s.selectors.forEach((u) => {
444
+ switch (u.type) {
445
+ case oe.ContainsPath: {
446
+ u.paths.forEach((d) => {
447
+ let b = Object.keys(a).map((l) => ({
448
+ fullPath: l,
449
+ path: l,
450
+ symbol: a[l]
451
+ })).filter((l) => l.path.startsWith(u.basePath));
452
+ b = b.map((l) => ({
453
+ ...l,
454
+ path: l.path.substring(u.basePath.length)
455
+ })), b.filter((l) => d.test(l.path)).forEach((l) => {
456
+ const v = l.fullPath, m = l.symbol, p = m.range;
457
+ c.forEach((O) => {
458
+ const S = {
459
+ range: p,
460
+ symbols: [m],
382
461
  onClick: O.onClick,
383
462
  data: O.data,
384
- path: b
463
+ path: v
385
464
  };
386
465
  o.push({
387
- range: h,
466
+ range: p,
388
467
  command: {
389
468
  id: r,
390
469
  title: O.title,
391
- arguments: [B]
470
+ arguments: [S]
392
471
  }
393
472
  });
394
473
  });
@@ -400,261 +479,299 @@ function we(t) {
400
479
  });
401
480
  }), o;
402
481
  }
403
- const _ = class _ {
404
- static set(e) {
405
- _.data = e;
482
+ const V = class V {
483
+ static set(t) {
484
+ V.data = t;
406
485
  }
407
486
  static get() {
408
- return _.data;
487
+ return V.data;
409
488
  }
410
489
  };
411
- K(_, "data", {});
412
- let A = _;
413
- async function J(t) {
414
- const e = A.get(), { documentSymbolProvider: n } = e.StandaloneServices.get(e.ILanguageFeaturesService);
415
- return await e.OutlineModel.create(n, t);
490
+ J(V, "data", {});
491
+ let K = V;
492
+ async function ae(e) {
493
+ const t = K.get(), { documentSymbolProvider: n } = t.StandaloneServices.get(t.ILanguageFeaturesService);
494
+ return await t.OutlineModel.create(n, e);
416
495
  }
417
- function Z(t) {
418
- const e = /* @__PURE__ */ new Map();
419
- return H({
420
- pathSymbolMap: e,
496
+ function se(e) {
497
+ const t = /* @__PURE__ */ new Map();
498
+ return G({
499
+ pathSymbolMap: t,
421
500
  parentPath: "",
422
- children: t.children,
423
- parentKind: I.SymbolKind.Module
424
- }), e;
501
+ children: e.children,
502
+ parentKind: H.SymbolKind.Module
503
+ }), t;
425
504
  }
426
- function H(t) {
427
- switch (t.parentKind) {
428
- case I.SymbolKind.Module: {
429
- Oe(t);
505
+ function G(e) {
506
+ switch (e.parentKind) {
507
+ case H.SymbolKind.Module: {
508
+ Ue(e);
430
509
  break;
431
510
  }
432
- case I.SymbolKind.Array: {
433
- _e(t);
511
+ case H.SymbolKind.Array: {
512
+ Ae(e);
434
513
  break;
435
514
  }
436
515
  default:
437
- De(t);
516
+ Be(e);
438
517
  }
439
518
  }
440
- function Oe(t) {
441
- t.children.forEach((e) => {
519
+ function Ue(e) {
520
+ e.children.forEach((t) => {
442
521
  var r;
443
- let n = t.parentPath;
444
- e.symbol && (n = t.parentPath ? `${t.parentPath}.${e.symbol.name}` : e.symbol.name, t.pathSymbolMap.set(n, e.symbol)), H({
445
- pathSymbolMap: t.pathSymbolMap,
522
+ let n = e.parentPath;
523
+ t.symbol && (n = e.parentPath ? `${e.parentPath}.${t.symbol.name}` : t.symbol.name, e.pathSymbolMap.set(n, t.symbol)), G({
524
+ pathSymbolMap: e.pathSymbolMap,
446
525
  parentPath: n,
447
- children: e.children,
448
- parentKind: ((r = e == null ? void 0 : e.symbol) == null ? void 0 : r.kind) ?? t.parentKind
526
+ children: t.children,
527
+ parentKind: ((r = t == null ? void 0 : t.symbol) == null ? void 0 : r.kind) ?? e.parentKind
449
528
  });
450
529
  });
451
530
  }
452
- function _e(t) {
453
- let e = 0;
454
- t.children.forEach((n) => {
455
- const r = t.parentPath ? `${t.parentPath}.${e}` : `${e}`;
456
- t.pathSymbolMap.set(r, n.symbol), e += 1, H({
457
- pathSymbolMap: t.pathSymbolMap,
531
+ function Ae(e) {
532
+ let t = 0;
533
+ e.children.forEach((n) => {
534
+ const r = e.parentPath ? `${e.parentPath}.${t}` : `${t}`;
535
+ e.pathSymbolMap.set(r, n.symbol), t += 1, G({
536
+ pathSymbolMap: e.pathSymbolMap,
458
537
  parentPath: r,
459
538
  children: n.children,
460
539
  parentKind: n.symbol.kind
461
540
  });
462
541
  });
463
542
  }
464
- function De(t) {
465
- const e = t.children.get("0");
466
- if (e) {
467
- const n = t.parentPath ? `${t.parentPath}.${e.symbol.name}` : e == null ? void 0 : e.symbol.name;
468
- t.pathSymbolMap.set(n, e.symbol);
543
+ function Be(e) {
544
+ const t = e.children.get("0");
545
+ if (t) {
546
+ const n = e.parentPath ? `${e.parentPath}.${t.symbol.name}` : t == null ? void 0 : t.symbol.name;
547
+ e.pathSymbolMap.set(n, t.symbol);
469
548
  }
470
549
  }
471
- function Te({
472
- editorRef: t,
473
- inlineActions: e
550
+ function Fe({
551
+ editorRef: e,
552
+ inlineActions: t
474
553
  }) {
475
- C(() => P.languages.registerCodeLensProvider("yaml", {
554
+ $(() => D.languages.registerCodeLensProvider("yaml", {
476
555
  provideCodeLenses: async (r) => {
477
- var u;
478
- const a = await J(r), o = Z(a), s = (u = t == null ? void 0 : t.current) == null ? void 0 : u.addCommand(0, (d, { onClick: f, path: c, range: p, data: m }) => {
479
- f({ path: c, range: p, data: m });
556
+ var h;
557
+ const a = await ae(r), o = se(a), s = (h = e == null ? void 0 : e.current) == null ? void 0 : h.addCommand(0, (u, { onClick: d, path: i, range: b, data: E }) => {
558
+ d({ path: i, range: b, data: E });
480
559
  });
481
560
  return s ? {
482
- lenses: we({ pathSymbolMap: o, inlineActions: e, commandId: s }),
561
+ lenses: Ve({ pathSymbolMap: o, inlineActions: t, commandId: s }),
483
562
  dispose: () => {
484
563
  }
485
564
  } : void 0;
486
565
  }
487
- }).dispose, [e, t]);
566
+ }).dispose, [t, e]);
488
567
  }
489
- const je = ({ editorRef: t, selection: e }) => {
490
- const [n, r] = k(), a = w(
491
- () => async (o, s, g) => {
492
- var p, m, i;
493
- const u = (p = t == null ? void 0 : t.current) == null ? void 0 : p.getModel();
494
- if (!u || !s)
568
+ const ze = ({ editorRef: e, selection: t }) => {
569
+ const [n, r] = L(), a = _(
570
+ () => async (o, s, c) => {
571
+ var b, E, l;
572
+ const h = (b = e == null ? void 0 : e.current) == null ? void 0 : b.getModel();
573
+ if (!h || !s)
495
574
  return r(void 0);
496
- const d = await J(u), c = (m = Z(d).get(s)) == null ? void 0 : m.range;
497
- c && (r(c), g && ((i = t == null ? void 0 : t.current) == null || i.revealLineInCenter(c.startLineNumber)));
575
+ const u = await ae(h), i = (E = se(u).get(s)) == null ? void 0 : E.range;
576
+ i && (r(i), c && ((l = e == null ? void 0 : e.current) == null || l.revealLineInCenter(i.startLineNumber)));
498
577
  },
499
578
  []
500
579
  );
501
- C(() => {
580
+ $(() => {
502
581
  if ("requestIdleCallback" in window) {
503
582
  const o = requestIdleCallback(() => {
504
- a(t, e == null ? void 0 : e.path, e == null ? void 0 : e.revealInCenter);
583
+ a(e, t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter);
505
584
  });
506
585
  return () => cancelIdleCallback(o);
507
586
  } else {
508
587
  const o = setTimeout(() => {
509
- a(t, e == null ? void 0 : e.path, e == null ? void 0 : e.revealInCenter);
588
+ a(e, t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter);
510
589
  }, 100);
511
590
  return () => clearTimeout(o);
512
591
  }
513
- }, [e == null ? void 0 : e.path, e == null ? void 0 : e.revealInCenter, t, a]), C(() => {
592
+ }, [t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter, e, a]), $(() => {
514
593
  var s;
515
594
  if (!n)
516
595
  return;
517
- const o = (s = t == null ? void 0 : t.current) == null ? void 0 : s.createDecorationsCollection([
596
+ const o = (s = e == null ? void 0 : e.current) == null ? void 0 : s.createDecorationsCollection([
518
597
  {
519
598
  // TODO: check why startColumn is set to "end of row"
520
599
  range: { ...n, startColumn: 1 },
521
600
  options: {
522
601
  isWholeLine: !1,
523
- className: e == null ? void 0 : e.className
602
+ className: t == null ? void 0 : t.className
524
603
  }
525
604
  }
526
605
  ]);
527
606
  return () => o == null ? void 0 : o.clear();
528
- }, [n, t, e == null ? void 0 : e.className]);
529
- }, G = se({
607
+ }, [n, e, t == null ? void 0 : t.className]);
608
+ }, ie = fe({
530
609
  markers: [],
531
610
  setMarkers: () => {
532
611
  },
533
612
  editor: null,
534
- setEditor: (t) => {
613
+ setEditor: (e) => {
535
614
  },
536
- updateCursorPosition: (t) => {
615
+ updateCursorPosition: (e) => {
537
616
  }
538
617
  });
539
- function qe({ children: t }) {
540
- const [e, n] = k([]), [r, a] = k(null), o = ie(
618
+ function tt({
619
+ children: e
620
+ }) {
621
+ const [t, n] = L([]), [r, a] = L(null), o = q(
541
622
  (s) => {
542
623
  r == null || r.setPosition(s), r == null || r.focus();
543
624
  },
544
625
  [r]
545
626
  );
546
- return /* @__PURE__ */ y.jsx(
547
- G.Provider,
627
+ return /* @__PURE__ */ P.jsx(
628
+ ie.Provider,
548
629
  {
549
630
  value: {
550
- markers: e,
631
+ markers: t,
551
632
  setMarkers: n,
552
633
  editor: r,
553
634
  setEditor: a,
554
635
  updateCursorPosition: o
555
636
  },
556
- children: t
637
+ children: e
557
638
  }
558
639
  );
559
640
  }
560
- function Q() {
561
- return ce(G);
641
+ function ce() {
642
+ return pe(ie);
562
643
  }
563
- const Fe = ({ monacoRef: t }) => {
564
- const { setMarkers: e } = Q();
565
- C(() => {
644
+ const Re = ({ monacoRef: e }) => {
645
+ const { setMarkers: t } = ce();
646
+ $(() => {
566
647
  let n;
567
648
  const r = setTimeout(() => {
568
649
  var o;
569
- const a = (o = t.current) == null ? void 0 : o.editor;
650
+ const a = (o = e.current) == null ? void 0 : o.editor;
570
651
  a && (n = a.onDidChangeMarkers(([s]) => {
571
- const g = a.getModelMarkers({ resource: s });
572
- e(g);
652
+ const c = a.getModelMarkers({ resource: s });
653
+ t(c);
573
654
  }));
574
655
  }, 100);
575
656
  return () => {
576
657
  clearTimeout(r), n == null || n.dispose();
577
658
  };
578
- }, [t]);
659
+ }, [e]);
579
660
  };
580
- let V = !1;
581
- function Be(t) {
582
- if (V)
661
+ let ee = !1;
662
+ function We(e) {
663
+ if (ee)
583
664
  return;
584
- const e = {
665
+ const t = {
585
666
  hover: !0,
586
667
  completion: !0,
587
668
  enableSchemaRequest: !1,
588
669
  validate: !0,
589
- schemas: [t]
670
+ schemas: [e]
590
671
  };
591
- return V = !0, de(P, e);
672
+ ee = !0, ye.setDiagnosticsOptions({ ...t });
592
673
  }
593
- const X = (t) => ue.parse(`file://${t}`).toString(), Re = (t) => {
594
- const { schemaConfig: e, instanceId: n } = t;
595
- C(() => {
596
- e != null && e.schema && Be({
674
+ const le = (e) => ge.parse(`file://${e}`).toString(), Ye = (e) => {
675
+ const { schemaConfig: t, instanceId: n } = e;
676
+ $(() => {
677
+ t != null && t.schema && We({
597
678
  // If YAML file is opened matching this glob
598
- fileMatch: [X(n.toString())],
599
- ...e
679
+ fileMatch: [le(n.toString())],
680
+ ...t
600
681
  });
601
- }, [e == null ? void 0 : e.schema, n]);
682
+ }, [t == null ? void 0 : t.schema, n]);
602
683
  };
603
- D.config({ monaco: P });
604
- const Ie = {
605
- selectOnLineNumbers: !0
606
- };
607
- function Je(t) {
684
+ A.config({ monaco: D });
685
+ const He = {
686
+ ...F,
687
+ folding: !0
688
+ }, nt = function(t) {
608
689
  const {
609
- yamlRevision: e,
610
- schemaConfig: n,
611
- inlineActions: r,
612
- themeConfig: a,
613
- onYamlRevisionChange: o,
614
- selection: s,
615
- theme: g
616
- } = t;
617
- T();
618
- const [u] = k("yaml"), { editor: d, setEditor: f } = Q(), c = x(), p = x({ yaml: "", revisionId: 0 }), m = x(null);
619
- function i(l, h) {
620
- m.current = l, c.current = h, l.setValue(e.yaml), f(l);
690
+ yamlRevision: n,
691
+ schemaConfig: r,
692
+ inlineActions: a,
693
+ themeConfig: o,
694
+ onYamlRevisionChange: s,
695
+ selection: c,
696
+ theme: h,
697
+ options: u,
698
+ animateOnUpdate: d = !1,
699
+ onAnimateEnd: i
700
+ } = t, b = B(), [E] = L("yaml"), { editor: l, setEditor: v } = ce(), m = w(null), p = w(), O = w({ yaml: "", revisionId: 0 }), S = w(null), N = w(null), k = q(
701
+ (f) => {
702
+ var y, j, M;
703
+ const g = f.split(`
704
+ `), C = (y = S.current) == null ? void 0 : y.getModel();
705
+ if (C) {
706
+ (j = S.current) == null || j.pushUndoStop(), C.setValue("");
707
+ let x = 0;
708
+ N.current = window.setInterval(() => {
709
+ var I;
710
+ x < g.length ? (b && ((I = S.current) == null || I.executeEdits("addLine", [
711
+ {
712
+ range: new b.Range(x + 1, 1, x + 1, 1),
713
+ text: g[x] + `
714
+ `
715
+ }
716
+ ])), x++) : N.current && (clearInterval(N.current), i == null || i());
717
+ }, 100), (M = S.current) == null || M.pushUndoStop();
718
+ }
719
+ },
720
+ [b]
721
+ );
722
+ $(() => () => {
723
+ N.current && clearInterval(N.current);
724
+ }, []);
725
+ function T(f, g) {
726
+ S.current = f, p.current = g, f.setValue(n.yaml), v(f), setTimeout(() => {
727
+ var C;
728
+ (C = m.current) != null && C.style && (m.current.style.opacity = "1");
729
+ }, 50);
621
730
  }
622
- C(() => {
623
- var l;
624
- if (m.current && (!e.revisionId || e.revisionId > Number((l = p.current) == null ? void 0 : l.revisionId))) {
625
- const h = m.current.getModel();
626
- h && (m.current.pushUndoStop(), m.current.executeEdits("edit", [
731
+ $(() => {
732
+ var f;
733
+ if (S.current && (!n.revisionId || n.revisionId > Number((f = O.current) == null ? void 0 : f.revisionId))) {
734
+ const g = S.current.getModel();
735
+ g && (S.current.executeEdits("edit", [
627
736
  {
628
- range: h.getFullModelRange(),
629
- text: e.yaml
737
+ range: g.getFullModelRange(),
738
+ text: d ? "" : n.yaml
630
739
  }
631
- ]), m.current.pushUndoStop());
740
+ ]), d && k(n.yaml));
632
741
  }
633
- }, [e, m.current]), Re({ schemaConfig: n, instanceId: u }), Te({ editorRef: m, inlineActions: r });
634
- const { theme: b } = F({ monacoRef: c, themeConfig: a, editor: d, theme: g });
635
- return Fe({ monacoRef: c }), je({ editorRef: m, selection: s }), /* @__PURE__ */ y.jsx(y.Fragment, { children: /* @__PURE__ */ y.jsx(
636
- U,
742
+ }, [k, n, d]), Ye({ schemaConfig: r, instanceId: E }), Fe({ editorRef: S, inlineActions: a });
743
+ const { theme: R } = z({ monacoRef: p, themeConfig: o, editor: l, theme: h });
744
+ Re({ monacoRef: p }), ze({ editorRef: S, selection: c });
745
+ const W = _(
746
+ () => ({
747
+ ...He,
748
+ ...u
749
+ }),
750
+ [u]
751
+ );
752
+ return /* @__PURE__ */ P.jsx("div", { style: { width: "100%", height: "100%", opacity: 0 }, ref: m, children: /* @__PURE__ */ P.jsx(
753
+ Z,
637
754
  {
638
- onChange: (l, h) => {
639
- p.current = { yaml: l ?? "", revisionId: h.versionId }, o({ ...p.current }, h);
755
+ onChange: (f, g) => {
756
+ O.current = { yaml: f ?? "", revisionId: g.versionId }, s({ ...O.current }, g);
640
757
  },
641
758
  language: "yaml",
642
- theme: b,
643
- options: Ie,
644
- path: X(u),
645
- onMount: i
759
+ theme: R,
760
+ options: W,
761
+ path: le(E),
762
+ onMount: T
646
763
  }
647
764
  ) });
648
- }
765
+ };
649
766
  export {
650
- Ve as BlameEditor,
651
- ze as CodeDiffEditor,
652
- Ye as CodeEditor,
653
- A as MonacoGlobals,
654
- q as SelectorType,
655
- Je as YamlEditor,
656
- G as YamlEditorContext,
657
- qe as YamlEditorContextProvider,
658
- Q as useYamlEditorContext
767
+ Qe as BlameEditor,
768
+ et as CodeDiffEditor,
769
+ Xe as CodeEditor,
770
+ K as MonacoGlobals,
771
+ oe as SelectorType,
772
+ nt as YamlEditor,
773
+ ie as YamlEditorContext,
774
+ tt as YamlEditorContextProvider,
775
+ ce as useYamlEditorContext
659
776
  };
660
777
  //# sourceMappingURL=index.js.map