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