@harnessio/yaml-editor 0.20.0 → 0.22.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,23 +1,24 @@
1
- var Ze = Object.defineProperty;
2
- var Ge = (e, t, r) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var je = (e, t, r) => (Ge(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import K, { memo as be, useState as V, useRef as w, useCallback as G, useEffect as I, useMemo as q, createContext as Je, useContext as Qe } from "react";
5
- import * as R from "monaco-editor";
6
- import { languages as ge, Uri as Xe } from "monaco-editor";
7
- import { yamlDefaults as ye } from "monaco-yaml";
8
- var De = { exports: {} }, ne = {};
1
+ var tt = Object.defineProperty;
2
+ var rt = (e, t, r) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var Pe = (e, t, r) => (rt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import Y, { memo as Me, useState as R, useRef as v, useCallback as J, useEffect as N, useMemo as k, useLayoutEffect as Ve, createContext as nt, useContext as ot } from "react";
5
+ import * as F from "monaco-editor";
6
+ import { languages as be, Uri as it } from "monaco-editor";
7
+ import { render as at } from "react-dom";
8
+ import { yamlDefaults as Oe } from "monaco-yaml";
9
+ var ke = { exports: {} }, ne = {};
9
10
  /*
10
11
  object-assign
11
12
  (c) Sindre Sorhus
12
13
  @license MIT
13
14
  */
14
- var Ee = Object.getOwnPropertySymbols, et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable;
15
- function rt(e) {
15
+ var Ce = Object.getOwnPropertySymbols, ct = Object.prototype.hasOwnProperty, st = Object.prototype.propertyIsEnumerable;
16
+ function ut(e) {
16
17
  if (e == null)
17
18
  throw new TypeError("Object.assign cannot be called with null or undefined");
18
19
  return Object(e);
19
20
  }
20
- function nt() {
21
+ function lt() {
21
22
  try {
22
23
  if (!Object.assign)
23
24
  return !1;
@@ -39,7 +40,7 @@ function nt() {
39
40
  return !1;
40
41
  }
41
42
  }
42
- nt();
43
+ lt();
43
44
  /** @license React v17.0.2
44
45
  * react-jsx-runtime.production.min.js
45
46
  *
@@ -48,28 +49,28 @@ nt();
48
49
  * This source code is licensed under the MIT license found in the
49
50
  * LICENSE file in the root directory of this source tree.
50
51
  */
51
- var ot = K, Ne = 60103;
52
+ var dt = Y, Ae = 60103;
52
53
  ne.Fragment = 60107;
53
54
  if (typeof Symbol == "function" && Symbol.for) {
54
- var Pe = Symbol.for;
55
- Ne = Pe("react.element"), ne.Fragment = Pe("react.fragment");
55
+ var $e = Symbol.for;
56
+ Ae = $e("react.element"), ne.Fragment = $e("react.fragment");
56
57
  }
57
- var it = ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, at = Object.prototype.hasOwnProperty, ct = { key: !0, ref: !0, __self: !0, __source: !0 };
58
- function ke(e, t, r) {
58
+ var ft = dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, pt = Object.prototype.hasOwnProperty, mt = { key: !0, ref: !0, __self: !0, __source: !0 };
59
+ function He(e, t, r) {
59
60
  var n, o = {}, i = null, a = null;
60
61
  r !== void 0 && (i = "" + r), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (a = t.ref);
61
62
  for (n in t)
62
- at.call(t, n) && !ct.hasOwnProperty(n) && (o[n] = t[n]);
63
+ pt.call(t, n) && !mt.hasOwnProperty(n) && (o[n] = t[n]);
63
64
  if (e && e.defaultProps)
64
65
  for (n in t = e.defaultProps, t)
65
66
  o[n] === void 0 && (o[n] = t[n]);
66
- return { $$typeof: Ne, type: e, key: i, ref: a, props: o, _owner: it.current };
67
+ return { $$typeof: Ae, type: e, key: i, ref: a, props: o, _owner: ft.current };
67
68
  }
68
- ne.jsx = ke;
69
- ne.jsxs = ke;
70
- De.exports = ne;
71
- var F = De.exports;
72
- function ut(e, t, r) {
69
+ ne.jsx = He;
70
+ ne.jsxs = He;
71
+ ke.exports = ne;
72
+ var A = ke.exports;
73
+ function gt(e, t, r) {
73
74
  return t in e ? Object.defineProperty(e, t, {
74
75
  value: r,
75
76
  enumerable: !0,
@@ -77,7 +78,7 @@ function ut(e, t, r) {
77
78
  writable: !0
78
79
  }) : e[t] = r, e;
79
80
  }
80
- function xe(e, t) {
81
+ function Ie(e, t) {
81
82
  var r = Object.keys(e);
82
83
  if (Object.getOwnPropertySymbols) {
83
84
  var n = Object.getOwnPropertySymbols(e);
@@ -87,18 +88,18 @@ function xe(e, t) {
87
88
  }
88
89
  return r;
89
90
  }
90
- function Ce(e) {
91
+ function Ne(e) {
91
92
  for (var t = 1; t < arguments.length; t++) {
92
93
  var r = arguments[t] != null ? arguments[t] : {};
93
- t % 2 ? xe(Object(r), !0).forEach(function(n) {
94
- ut(e, n, r[n]);
95
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : xe(Object(r)).forEach(function(n) {
94
+ t % 2 ? Ie(Object(r), !0).forEach(function(n) {
95
+ gt(e, n, r[n]);
96
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ie(Object(r)).forEach(function(n) {
96
97
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
97
98
  });
98
99
  }
99
100
  return e;
100
101
  }
101
- function st(e, t) {
102
+ function ht(e, t) {
102
103
  if (e == null)
103
104
  return {};
104
105
  var r = {}, n = Object.keys(e), o, i;
@@ -106,10 +107,10 @@ function st(e, t) {
106
107
  o = n[i], !(t.indexOf(o) >= 0) && (r[o] = e[o]);
107
108
  return r;
108
109
  }
109
- function lt(e, t) {
110
+ function vt(e, t) {
110
111
  if (e == null)
111
112
  return {};
112
- var r = st(e, t), n, o;
113
+ var r = ht(e, t), n, o;
113
114
  if (Object.getOwnPropertySymbols) {
114
115
  var i = Object.getOwnPropertySymbols(e);
115
116
  for (o = 0; o < i.length; o++)
@@ -117,14 +118,14 @@ function lt(e, t) {
117
118
  }
118
119
  return r;
119
120
  }
120
- function dt(e, t) {
121
- return ft(e) || pt(e, t) || mt(e, t) || ht();
121
+ function yt(e, t) {
122
+ return bt(e) || wt(e, t) || Mt(e, t) || Ot();
122
123
  }
123
- function ft(e) {
124
+ function bt(e) {
124
125
  if (Array.isArray(e))
125
126
  return e;
126
127
  }
127
- function pt(e, t) {
128
+ function wt(e, t) {
128
129
  if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
129
130
  var r = [], n = !0, o = !1, i = void 0;
130
131
  try {
@@ -143,28 +144,28 @@ function pt(e, t) {
143
144
  return r;
144
145
  }
145
146
  }
146
- function mt(e, t) {
147
+ function Mt(e, t) {
147
148
  if (e) {
148
149
  if (typeof e == "string")
149
- return $e(e, t);
150
+ return Le(e, t);
150
151
  var r = Object.prototype.toString.call(e).slice(8, -1);
151
152
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
152
153
  return Array.from(e);
153
154
  if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
154
- return $e(e, t);
155
+ return Le(e, t);
155
156
  }
156
157
  }
157
- function $e(e, t) {
158
+ function Le(e, t) {
158
159
  (t == null || t > e.length) && (t = e.length);
159
160
  for (var r = 0, n = new Array(t); r < t; r++)
160
161
  n[r] = e[r];
161
162
  return n;
162
163
  }
163
- function ht() {
164
+ function Ot() {
164
165
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
165
166
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
166
167
  }
167
- function gt(e, t, r) {
168
+ function St(e, t, r) {
168
169
  return t in e ? Object.defineProperty(e, t, {
169
170
  value: r,
170
171
  enumerable: !0,
@@ -172,7 +173,7 @@ function gt(e, t, r) {
172
173
  writable: !0
173
174
  }) : e[t] = r, e;
174
175
  }
175
- function Ie(e, t) {
176
+ function Te(e, t) {
176
177
  var r = Object.keys(e);
177
178
  if (Object.getOwnPropertySymbols) {
178
179
  var n = Object.getOwnPropertySymbols(e);
@@ -182,18 +183,18 @@ function Ie(e, t) {
182
183
  }
183
184
  return r;
184
185
  }
185
- function Le(e) {
186
+ function De(e) {
186
187
  for (var t = 1; t < arguments.length; t++) {
187
188
  var r = arguments[t] != null ? arguments[t] : {};
188
- t % 2 ? Ie(Object(r), !0).forEach(function(n) {
189
- gt(e, n, r[n]);
190
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ie(Object(r)).forEach(function(n) {
189
+ t % 2 ? Te(Object(r), !0).forEach(function(n) {
190
+ St(e, n, r[n]);
191
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Te(Object(r)).forEach(function(n) {
191
192
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
192
193
  });
193
194
  }
194
195
  return e;
195
196
  }
196
- function vt() {
197
+ function Et() {
197
198
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
198
199
  t[r] = arguments[r];
199
200
  return function(n) {
@@ -213,38 +214,38 @@ function X(e) {
213
214
  };
214
215
  };
215
216
  }
216
- function ce(e) {
217
+ function le(e) {
217
218
  return {}.toString.call(e).includes("Object");
218
219
  }
219
- function bt(e) {
220
+ function xt(e) {
220
221
  return !Object.keys(e).length;
221
222
  }
222
223
  function re(e) {
223
224
  return typeof e == "function";
224
225
  }
225
- function yt(e, t) {
226
+ function jt(e, t) {
226
227
  return Object.prototype.hasOwnProperty.call(e, t);
227
228
  }
228
- function wt(e, t) {
229
- return ce(t) || B("changeType"), Object.keys(t).some(function(r) {
230
- return !yt(e, r);
231
- }) && B("changeField"), t;
229
+ function Pt(e, t) {
230
+ return le(t) || K("changeType"), Object.keys(t).some(function(r) {
231
+ return !jt(e, r);
232
+ }) && K("changeField"), t;
232
233
  }
233
- function Ot(e) {
234
- re(e) || B("selectorType");
234
+ function Ct(e) {
235
+ re(e) || K("selectorType");
235
236
  }
236
- function Mt(e) {
237
- re(e) || ce(e) || B("handlerType"), ce(e) && Object.values(e).some(function(t) {
237
+ function $t(e) {
238
+ re(e) || le(e) || K("handlerType"), le(e) && Object.values(e).some(function(t) {
238
239
  return !re(t);
239
- }) && B("handlersType");
240
+ }) && K("handlersType");
240
241
  }
241
- function St(e) {
242
- e || B("initialIsRequired"), ce(e) || B("initialType"), bt(e) && B("initialContent");
242
+ function It(e) {
243
+ e || K("initialIsRequired"), le(e) || K("initialType"), xt(e) && K("initialContent");
243
244
  }
244
- function jt(e, t) {
245
+ function Nt(e, t) {
245
246
  throw new Error(e[t] || e.default);
246
247
  }
247
- var Et = {
248
+ var Lt = {
248
249
  initialIsRequired: "initial state is required",
249
250
  initialType: "initial state should be an object",
250
251
  initialContent: "initial state shouldn't be an empty object",
@@ -254,49 +255,49 @@ var Et = {
254
255
  changeType: "provided value of changes should be an object",
255
256
  changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
256
257
  default: "an unknown error accured in `state-local` package"
257
- }, B = X(jt)(Et), ie = {
258
- changes: wt,
259
- selector: Ot,
260
- handler: Mt,
261
- initial: St
258
+ }, K = X(Nt)(Lt), se = {
259
+ changes: Pt,
260
+ selector: Ct,
261
+ handler: $t,
262
+ initial: It
262
263
  };
263
- function Pt(e) {
264
+ function Tt(e) {
264
265
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
265
- ie.initial(e), ie.handler(t);
266
+ se.initial(e), se.handler(t);
266
267
  var r = {
267
268
  current: e
268
- }, n = X($t)(r, t), o = X(Ct)(r), i = X(ie.changes)(e), a = X(xt)(r);
269
+ }, n = X(Vt)(r, t), o = X(_t)(r), i = X(se.changes)(e), a = X(Dt)(r);
269
270
  function u() {
270
- var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(h) {
271
+ var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(h) {
271
272
  return h;
272
273
  };
273
- return ie.selector(s), s(r.current);
274
+ return se.selector(d), d(r.current);
274
275
  }
275
- function l(s) {
276
- vt(n, o, i, a)(s);
276
+ function l(d) {
277
+ Et(n, o, i, a)(d);
277
278
  }
278
279
  return [u, l];
279
280
  }
280
- function xt(e, t) {
281
+ function Dt(e, t) {
281
282
  return re(t) ? t(e.current) : t;
282
283
  }
283
- function Ct(e, t) {
284
- return e.current = Le(Le({}, e.current), t), t;
284
+ function _t(e, t) {
285
+ return e.current = De(De({}, e.current), t), t;
285
286
  }
286
- function $t(e, t, r) {
287
+ function Vt(e, t, r) {
287
288
  return re(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
288
289
  var o;
289
290
  return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
290
291
  }), r;
291
292
  }
292
- var It = {
293
- create: Pt
294
- }, Lt = {
293
+ var kt = {
294
+ create: Tt
295
+ }, At = {
295
296
  paths: {
296
297
  vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"
297
298
  }
298
299
  };
299
- function Tt(e) {
300
+ function Ht(e) {
300
301
  return function t() {
301
302
  for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
302
303
  o[i] = arguments[i];
@@ -307,23 +308,23 @@ function Tt(e) {
307
308
  };
308
309
  };
309
310
  }
310
- function Dt(e) {
311
+ function Rt(e) {
311
312
  return {}.toString.call(e).includes("Object");
312
313
  }
313
- function Nt(e) {
314
- return e || Te("configIsRequired"), Dt(e) || Te("configType"), e.urls ? (kt(), {
314
+ function Ut(e) {
315
+ return e || _e("configIsRequired"), Rt(e) || _e("configType"), e.urls ? (zt(), {
315
316
  paths: {
316
317
  vs: e.urls.monacoBase
317
318
  }
318
319
  }) : e;
319
320
  }
320
- function kt() {
321
- console.warn(Ae.deprecation);
321
+ function zt() {
322
+ console.warn(Re.deprecation);
322
323
  }
323
- function At(e, t) {
324
+ function Ft(e, t) {
324
325
  throw new Error(e[t] || e.default);
325
326
  }
326
- var Ae = {
327
+ var Re = {
327
328
  configIsRequired: "the configuration object is required",
328
329
  configType: "the configuration object should be an object",
329
330
  default: "an unknown error accured in `@monaco-editor/loader` package",
@@ -337,9 +338,9 @@ var Ae = {
337
338
 
338
339
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
339
340
  `
340
- }, Te = Tt(At)(Ae), Vt = {
341
- config: Nt
342
- }, _t = function() {
341
+ }, _e = Ht(Ft)(Re), Wt = {
342
+ config: Ut
343
+ }, qt = function() {
343
344
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
344
345
  r[n] = arguments[n];
345
346
  return function(o) {
@@ -348,42 +349,42 @@ var Ae = {
348
349
  }, o);
349
350
  };
350
351
  };
351
- function Ve(e, t) {
352
+ function Ue(e, t) {
352
353
  return Object.keys(t).forEach(function(r) {
353
- t[r] instanceof Object && e[r] && Object.assign(t[r], Ve(e[r], t[r]));
354
- }), Ce(Ce({}, e), t);
354
+ t[r] instanceof Object && e[r] && Object.assign(t[r], Ue(e[r], t[r]));
355
+ }), Ne(Ne({}, e), t);
355
356
  }
356
- var Ut = {
357
+ var Bt = {
357
358
  type: "cancelation",
358
359
  msg: "operation is manually canceled"
359
360
  };
360
- function fe(e) {
361
+ function pe(e) {
361
362
  var t = !1, r = new Promise(function(n, o) {
362
363
  e.then(function(i) {
363
- return t ? o(Ut) : n(i);
364
+ return t ? o(Bt) : n(i);
364
365
  }), e.catch(o);
365
366
  });
366
367
  return r.cancel = function() {
367
368
  return t = !0;
368
369
  }, r;
369
370
  }
370
- var Ft = It.create({
371
- config: Lt,
371
+ var Kt = kt.create({
372
+ config: At,
372
373
  isInitialized: !1,
373
374
  resolve: null,
374
375
  reject: null,
375
376
  monaco: null
376
- }), _e = dt(Ft, 2), oe = _e[0], ue = _e[1];
377
- function Rt(e) {
378
- var t = Vt.config(e), r = t.monaco, n = lt(t, ["monaco"]);
379
- ue(function(o) {
377
+ }), ze = yt(Kt, 2), oe = ze[0], de = ze[1];
378
+ function Yt(e) {
379
+ var t = Wt.config(e), r = t.monaco, n = vt(t, ["monaco"]);
380
+ de(function(o) {
380
381
  return {
381
- config: Ve(o.config, n),
382
+ config: Ue(o.config, n),
382
383
  monaco: r
383
384
  };
384
385
  });
385
386
  }
386
- function zt() {
387
+ function Gt() {
387
388
  var e = oe(function(t) {
388
389
  var r = t.monaco, n = t.isInitialized, o = t.resolve;
389
390
  return {
@@ -393,36 +394,36 @@ function zt() {
393
394
  };
394
395
  });
395
396
  if (!e.isInitialized) {
396
- if (ue({
397
+ if (de({
397
398
  isInitialized: !0
398
399
  }), e.monaco)
399
- return e.resolve(e.monaco), fe(pe);
400
+ return e.resolve(e.monaco), pe(me);
400
401
  if (window.monaco && window.monaco.editor)
401
- return Ue(window.monaco), e.resolve(window.monaco), fe(pe);
402
- _t(Ht, Bt)(Wt);
402
+ return Fe(window.monaco), e.resolve(window.monaco), pe(me);
403
+ qt(Zt, Qt)(Xt);
403
404
  }
404
- return fe(pe);
405
+ return pe(me);
405
406
  }
406
- function Ht(e) {
407
+ function Zt(e) {
407
408
  return document.body.appendChild(e);
408
409
  }
409
- function qt(e) {
410
+ function Jt(e) {
410
411
  var t = document.createElement("script");
411
412
  return e && (t.src = e), t;
412
413
  }
413
- function Bt(e) {
414
+ function Qt(e) {
414
415
  var t = oe(function(n) {
415
416
  var o = n.config, i = n.reject;
416
417
  return {
417
418
  config: o,
418
419
  reject: i
419
420
  };
420
- }), r = qt("".concat(t.config.paths.vs, "/loader.js"));
421
+ }), r = Jt("".concat(t.config.paths.vs, "/loader.js"));
421
422
  return r.onload = function() {
422
423
  return e();
423
424
  }, r.onerror = t.reject, r;
424
425
  }
425
- function Wt() {
426
+ function Xt() {
426
427
  var e = oe(function(r) {
427
428
  var n = r.config, o = r.resolve, i = r.reject;
428
429
  return {
@@ -432,204 +433,204 @@ function Wt() {
432
433
  };
433
434
  }), t = window.require;
434
435
  t.config(e.config), t(["vs/editor/editor.main"], function(r) {
435
- Ue(r), e.resolve(r);
436
+ Fe(r), e.resolve(r);
436
437
  }, function(r) {
437
438
  e.reject(r);
438
439
  });
439
440
  }
440
- function Ue(e) {
441
- oe().monaco || ue({
441
+ function Fe(e) {
442
+ oe().monaco || de({
442
443
  monaco: e
443
444
  });
444
445
  }
445
- function Kt() {
446
+ function er() {
446
447
  return oe(function(e) {
447
448
  var t = e.monaco;
448
449
  return t;
449
450
  });
450
451
  }
451
- var pe = new Promise(function(e, t) {
452
- return ue({
452
+ var me = new Promise(function(e, t) {
453
+ return de({
453
454
  resolve: e,
454
455
  reject: t
455
456
  });
456
- }), W = {
457
- config: Rt,
458
- init: zt,
459
- __getMonacoInstance: Kt
460
- }, Yt = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, me = Yt, Zt = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Gt = Zt;
461
- function Jt({ children: e }) {
462
- return K.createElement("div", { style: Gt.container }, e);
463
- }
464
- var Qt = Jt, Xt = Qt;
465
- function er({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: a }) {
466
- return K.createElement("section", { style: { ...me.wrapper, width: e, height: t }, ...a }, !r && K.createElement(Xt, null, n), K.createElement("div", { ref: o, style: { ...me.fullWidth, ...!r && me.hide }, className: i }));
467
- }
468
- var tr = er, Fe = be(tr);
469
- function rr(e) {
470
- I(e, []);
471
- }
472
- var we = rr;
473
- function nr(e, t, r = !0) {
474
- let n = w(!0);
475
- I(n.current || !r ? () => {
457
+ }), q = {
458
+ config: Yt,
459
+ init: Gt,
460
+ __getMonacoInstance: er
461
+ }, tr = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, ge = tr, rr = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, nr = rr;
462
+ function or({ children: e }) {
463
+ return Y.createElement("div", { style: nr.container }, e);
464
+ }
465
+ var ir = or, ar = ir;
466
+ function cr({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: a }) {
467
+ return Y.createElement("section", { style: { ...ge.wrapper, width: e, height: t }, ...a }, !r && Y.createElement(ar, null, n), Y.createElement("div", { ref: o, style: { ...ge.fullWidth, ...!r && ge.hide }, className: i }));
468
+ }
469
+ var sr = cr, We = Me(sr);
470
+ function ur(e) {
471
+ N(e, []);
472
+ }
473
+ var Se = ur;
474
+ function lr(e, t, r = !0) {
475
+ let n = v(!0);
476
+ N(n.current || !r ? () => {
476
477
  n.current = !1;
477
478
  } : e, t);
478
479
  }
479
- var U = nr;
480
+ var z = lr;
480
481
  function ee() {
481
482
  }
482
483
  function Z(e, t, r, n) {
483
- return or(e, n) || ir(e, t, r, n);
484
+ return dr(e, n) || fr(e, t, r, n);
484
485
  }
485
- function or(e, t) {
486
- return e.editor.getModel(Re(e, t));
486
+ function dr(e, t) {
487
+ return e.editor.getModel(qe(e, t));
487
488
  }
488
- function ir(e, t, r, n) {
489
- return e.editor.createModel(t, r, n ? Re(e, n) : void 0);
489
+ function fr(e, t, r, n) {
490
+ return e.editor.createModel(t, r, n ? qe(e, n) : void 0);
490
491
  }
491
- function Re(e, t) {
492
+ function qe(e, t) {
492
493
  return e.Uri.parse(t);
493
494
  }
494
- function ar({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: a, keepCurrentOriginalModel: u = !1, keepCurrentModifiedModel: l = !1, theme: s = "light", loading: h = "Loading...", options: f = {}, height: m = "100%", width: L = "100%", className: g, wrapperProps: k = {}, beforeMount: C = ee, onMount: O = ee }) {
495
- let [v, N] = V(!1), [x, S] = V(!0), j = w(null), E = w(null), z = w(null), M = w(O), d = w(C), P = w(!1);
496
- we(() => {
497
- let c = W.init();
498
- return c.then((b) => (E.current = b) && S(!1)).catch((b) => (b == null ? void 0 : b.type) !== "cancelation" && console.error("Monaco initialization: error:", b)), () => j.current ? T() : c.cancel();
499
- }), U(() => {
500
- if (j.current && E.current) {
501
- let c = j.current.getOriginalEditor(), b = Z(E.current, e || "", n || r || "text", i || "");
502
- b !== c.getModel() && c.setModel(b);
495
+ function pr({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: a, keepCurrentOriginalModel: u = !1, keepCurrentModifiedModel: l = !1, theme: d = "light", loading: h = "Loading...", options: f = {}, height: y = "100%", width: $ = "100%", className: g, wrapperProps: L = {}, beforeMount: T = ee, onMount: I = ee }) {
496
+ let [E, V] = R(!1), [_, b] = R(!0), C = v(null), M = v(null), j = v(null), x = v(I), s = v(T), O = v(!1);
497
+ Se(() => {
498
+ let c = q.init();
499
+ return c.then((w) => (M.current = w) && b(!1)).catch((w) => (w == null ? void 0 : w.type) !== "cancelation" && console.error("Monaco initialization: error:", w)), () => C.current ? S() : c.cancel();
500
+ }), z(() => {
501
+ if (C.current && M.current) {
502
+ let c = C.current.getOriginalEditor(), w = Z(M.current, e || "", n || r || "text", i || "");
503
+ w !== c.getModel() && c.setModel(w);
503
504
  }
504
- }, [i], v), U(() => {
505
- if (j.current && E.current) {
506
- let c = j.current.getModifiedEditor(), b = Z(E.current, t || "", o || r || "text", a || "");
507
- b !== c.getModel() && c.setModel(b);
505
+ }, [i], E), z(() => {
506
+ if (C.current && M.current) {
507
+ let c = C.current.getModifiedEditor(), w = Z(M.current, t || "", o || r || "text", a || "");
508
+ w !== c.getModel() && c.setModel(w);
508
509
  }
509
- }, [a], v), U(() => {
510
- let c = j.current.getModifiedEditor();
511
- c.getOption(E.current.editor.EditorOption.readOnly) ? c.setValue(t || "") : t !== c.getValue() && (c.executeEdits("", [{ range: c.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), c.pushUndoStop());
512
- }, [t], v), U(() => {
513
- var c, b;
514
- (b = (c = j.current) == null ? void 0 : c.getModel()) == null || b.original.setValue(e || "");
515
- }, [e], v), U(() => {
516
- let { original: c, modified: b } = j.current.getModel();
517
- E.current.editor.setModelLanguage(c, n || r || "text"), E.current.editor.setModelLanguage(b, o || r || "text");
518
- }, [r, n, o], v), U(() => {
510
+ }, [a], E), z(() => {
511
+ let c = C.current.getModifiedEditor();
512
+ c.getOption(M.current.editor.EditorOption.readOnly) ? c.setValue(t || "") : t !== c.getValue() && (c.executeEdits("", [{ range: c.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), c.pushUndoStop());
513
+ }, [t], E), z(() => {
514
+ var c, w;
515
+ (w = (c = C.current) == null ? void 0 : c.getModel()) == null || w.original.setValue(e || "");
516
+ }, [e], E), z(() => {
517
+ let { original: c, modified: w } = C.current.getModel();
518
+ M.current.editor.setModelLanguage(c, n || r || "text"), M.current.editor.setModelLanguage(w, o || r || "text");
519
+ }, [r, n, o], E), z(() => {
519
520
  var c;
520
- (c = E.current) == null || c.editor.setTheme(s);
521
- }, [s], v), U(() => {
521
+ (c = M.current) == null || c.editor.setTheme(d);
522
+ }, [d], E), z(() => {
522
523
  var c;
523
- (c = j.current) == null || c.updateOptions(f);
524
- }, [f], v);
525
- let p = G(() => {
526
- var A;
527
- if (!E.current)
524
+ (c = C.current) == null || c.updateOptions(f);
525
+ }, [f], E);
526
+ let m = J(() => {
527
+ var H;
528
+ if (!M.current)
528
529
  return;
529
- d.current(E.current);
530
- let c = Z(E.current, e || "", n || r || "text", i || ""), b = Z(E.current, t || "", o || r || "text", a || "");
531
- (A = j.current) == null || A.setModel({ original: c, modified: b });
532
- }, [r, t, o, e, n, i, a]), D = G(() => {
530
+ s.current(M.current);
531
+ let c = Z(M.current, e || "", n || r || "text", i || ""), w = Z(M.current, t || "", o || r || "text", a || "");
532
+ (H = C.current) == null || H.setModel({ original: c, modified: w });
533
+ }, [r, t, o, e, n, i, a]), p = J(() => {
533
534
  var c;
534
- !P.current && z.current && (j.current = E.current.editor.createDiffEditor(z.current, { automaticLayout: !0, ...f }), p(), (c = E.current) == null || c.editor.setTheme(s), N(!0), P.current = !0);
535
- }, [f, s, p]);
536
- I(() => {
537
- v && M.current(j.current, E.current);
538
- }, [v]), I(() => {
539
- !x && !v && D();
540
- }, [x, v, D]);
541
- function T() {
542
- var b, A, H, J;
543
- let c = (b = j.current) == null ? void 0 : b.getModel();
544
- u || ((A = c == null ? void 0 : c.original) == null || A.dispose()), l || ((H = c == null ? void 0 : c.modified) == null || H.dispose()), (J = j.current) == null || J.dispose();
535
+ !O.current && j.current && (C.current = M.current.editor.createDiffEditor(j.current, { automaticLayout: !0, ...f }), m(), (c = M.current) == null || c.editor.setTheme(d), V(!0), O.current = !0);
536
+ }, [f, d, m]);
537
+ N(() => {
538
+ E && x.current(C.current, M.current);
539
+ }, [E]), N(() => {
540
+ !_ && !E && p();
541
+ }, [_, E, p]);
542
+ function S() {
543
+ var w, H, W, B;
544
+ let c = (w = C.current) == null ? void 0 : w.getModel();
545
+ u || ((H = c == null ? void 0 : c.original) == null || H.dispose()), l || ((W = c == null ? void 0 : c.modified) == null || W.dispose()), (B = C.current) == null || B.dispose();
545
546
  }
546
- return K.createElement(Fe, { width: L, height: m, isEditorReady: v, loading: h, _ref: z, className: g, wrapperProps: k });
547
+ return Y.createElement(We, { width: $, height: y, isEditorReady: E, loading: h, _ref: j, className: g, wrapperProps: L });
547
548
  }
548
- var cr = ar, ur = be(cr);
549
- function sr() {
550
- let [e, t] = V(W.__getMonacoInstance());
551
- return we(() => {
549
+ var mr = pr, gr = Me(mr);
550
+ function hr() {
551
+ let [e, t] = R(q.__getMonacoInstance());
552
+ return Se(() => {
552
553
  let r;
553
- return e || (r = W.init(), r.then((n) => {
554
+ return e || (r = q.init(), r.then((n) => {
554
555
  t(n);
555
556
  })), () => r == null ? void 0 : r.cancel();
556
557
  }), e;
557
558
  }
558
- var se = sr;
559
- function lr(e) {
560
- let t = w();
561
- return I(() => {
559
+ var ie = hr;
560
+ function vr(e) {
561
+ let t = v();
562
+ return N(() => {
562
563
  t.current = e;
563
564
  }, [e]), t.current;
564
565
  }
565
- var dr = lr, ae = /* @__PURE__ */ new Map();
566
- function fr({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: a = "light", line: u, loading: l = "Loading...", options: s = {}, overrideServices: h = {}, saveViewState: f = !0, keepCurrentModel: m = !1, width: L = "100%", height: g = "100%", className: k, wrapperProps: C = {}, beforeMount: O = ee, onMount: v = ee, onChange: N, onValidate: x = ee }) {
567
- let [S, j] = V(!1), [E, z] = V(!0), M = w(null), d = w(null), P = w(null), p = w(v), D = w(O), T = w(), c = w(n), b = dr(i), A = w(!1), H = w(!1);
568
- we(() => {
569
- let y = W.init();
570
- return y.then(($) => (M.current = $) && z(!1)).catch(($) => ($ == null ? void 0 : $.type) !== "cancelation" && console.error("Monaco initialization: error:", $)), () => d.current ? Ye() : y.cancel();
571
- }), U(() => {
572
- var $, _, Q, Y;
573
- let y = Z(M.current, e || n || "", t || o || "", i || r || "");
574
- y !== (($ = d.current) == null ? void 0 : $.getModel()) && (f && ae.set(b, (_ = d.current) == null ? void 0 : _.saveViewState()), (Q = d.current) == null || Q.setModel(y), f && ((Y = d.current) == null || Y.restoreViewState(ae.get(i))));
575
- }, [i], S), U(() => {
576
- var y;
577
- (y = d.current) == null || y.updateOptions(s);
578
- }, [s], S), U(() => {
579
- !d.current || n === void 0 || (d.current.getOption(M.current.editor.EditorOption.readOnly) ? d.current.setValue(n) : n !== d.current.getValue() && (H.current = !0, d.current.executeEdits("", [{ range: d.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), d.current.pushUndoStop(), H.current = !1));
580
- }, [n], S), U(() => {
581
- var $, _;
582
- let y = ($ = d.current) == null ? void 0 : $.getModel();
583
- y && o && ((_ = M.current) == null || _.editor.setModelLanguage(y, o));
584
- }, [o], S), U(() => {
585
- var y;
586
- u !== void 0 && ((y = d.current) == null || y.revealLine(u));
587
- }, [u], S), U(() => {
588
- var y;
589
- (y = M.current) == null || y.editor.setTheme(a);
590
- }, [a], S);
591
- let J = G(() => {
592
- var y;
593
- if (!(!P.current || !M.current) && !A.current) {
594
- D.current(M.current);
595
- let $ = i || r, _ = Z(M.current, n || e || "", t || o || "", $ || "");
596
- d.current = (y = M.current) == null ? void 0 : y.editor.create(P.current, { model: _, automaticLayout: !0, ...s }, h), f && d.current.restoreViewState(ae.get($)), M.current.editor.setTheme(a), u !== void 0 && d.current.revealLine(u), j(!0), A.current = !0;
566
+ var yr = vr, ue = /* @__PURE__ */ new Map();
567
+ function br({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: a = "light", line: u, loading: l = "Loading...", options: d = {}, overrideServices: h = {}, saveViewState: f = !0, keepCurrentModel: y = !1, width: $ = "100%", height: g = "100%", className: L, wrapperProps: T = {}, beforeMount: I = ee, onMount: E = ee, onChange: V, onValidate: _ = ee }) {
568
+ let [b, C] = R(!1), [M, j] = R(!0), x = v(null), s = v(null), O = v(null), m = v(E), p = v(I), S = v(), c = v(n), w = yr(i), H = v(!1), W = v(!1);
569
+ Se(() => {
570
+ let P = q.init();
571
+ return P.then((D) => (x.current = D) && j(!1)).catch((D) => (D == null ? void 0 : D.type) !== "cancelation" && console.error("Monaco initialization: error:", D)), () => s.current ? et() : P.cancel();
572
+ }), z(() => {
573
+ var D, U, Q, G;
574
+ let P = Z(x.current, e || n || "", t || o || "", i || r || "");
575
+ P !== ((D = s.current) == null ? void 0 : D.getModel()) && (f && ue.set(w, (U = s.current) == null ? void 0 : U.saveViewState()), (Q = s.current) == null || Q.setModel(P), f && ((G = s.current) == null || G.restoreViewState(ue.get(i))));
576
+ }, [i], b), z(() => {
577
+ var P;
578
+ (P = s.current) == null || P.updateOptions(d);
579
+ }, [d], b), z(() => {
580
+ !s.current || n === void 0 || (s.current.getOption(x.current.editor.EditorOption.readOnly) ? s.current.setValue(n) : n !== s.current.getValue() && (W.current = !0, s.current.executeEdits("", [{ range: s.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), s.current.pushUndoStop(), W.current = !1));
581
+ }, [n], b), z(() => {
582
+ var D, U;
583
+ let P = (D = s.current) == null ? void 0 : D.getModel();
584
+ P && o && ((U = x.current) == null || U.editor.setModelLanguage(P, o));
585
+ }, [o], b), z(() => {
586
+ var P;
587
+ u !== void 0 && ((P = s.current) == null || P.revealLine(u));
588
+ }, [u], b), z(() => {
589
+ var P;
590
+ (P = x.current) == null || P.editor.setTheme(a);
591
+ }, [a], b);
592
+ let B = J(() => {
593
+ var P;
594
+ if (!(!O.current || !x.current) && !H.current) {
595
+ p.current(x.current);
596
+ let D = i || r, U = Z(x.current, n || e || "", t || o || "", D || "");
597
+ s.current = (P = x.current) == null ? void 0 : P.editor.create(O.current, { model: U, automaticLayout: !0, ...d }, h), f && s.current.restoreViewState(ue.get(D)), x.current.editor.setTheme(a), u !== void 0 && s.current.revealLine(u), C(!0), H.current = !0;
597
598
  }
598
- }, [e, t, r, n, o, i, s, h, f, a, u]);
599
- I(() => {
600
- S && p.current(d.current, M.current);
601
- }, [S]), I(() => {
602
- !E && !S && J();
603
- }, [E, S, J]), c.current = n, I(() => {
604
- var y, $;
605
- S && N && ((y = T.current) == null || y.dispose(), T.current = ($ = d.current) == null ? void 0 : $.onDidChangeModelContent((_) => {
606
- H.current || N(d.current.getValue(), _);
599
+ }, [e, t, r, n, o, i, d, h, f, a, u]);
600
+ N(() => {
601
+ b && m.current(s.current, x.current);
602
+ }, [b]), N(() => {
603
+ !M && !b && B();
604
+ }, [M, b, B]), c.current = n, N(() => {
605
+ var P, D;
606
+ b && V && ((P = S.current) == null || P.dispose(), S.current = (D = s.current) == null ? void 0 : D.onDidChangeModelContent((U) => {
607
+ W.current || V(s.current.getValue(), U);
607
608
  }));
608
- }, [S, N]), I(() => {
609
- if (S) {
610
- let y = M.current.editor.onDidChangeMarkers(($) => {
609
+ }, [b, V]), N(() => {
610
+ if (b) {
611
+ let P = x.current.editor.onDidChangeMarkers((D) => {
611
612
  var Q;
612
- let _ = (Q = d.current.getModel()) == null ? void 0 : Q.uri;
613
- if (_ && $.find((Y) => Y.path === _.path)) {
614
- let Y = M.current.editor.getModelMarkers({ resource: _ });
615
- x == null || x(Y);
613
+ let U = (Q = s.current.getModel()) == null ? void 0 : Q.uri;
614
+ if (U && D.find((G) => G.path === U.path)) {
615
+ let G = x.current.editor.getModelMarkers({ resource: U });
616
+ _ == null || _(G);
616
617
  }
617
618
  });
618
619
  return () => {
619
- y == null || y.dispose();
620
+ P == null || P.dispose();
620
621
  };
621
622
  }
622
623
  return () => {
623
624
  };
624
- }, [S, x]);
625
- function Ye() {
626
- var y, $;
627
- (y = T.current) == null || y.dispose(), m ? f && ae.set(i, d.current.saveViewState()) : ($ = d.current.getModel()) == null || $.dispose(), d.current.dispose();
625
+ }, [b, _]);
626
+ function et() {
627
+ var P, D;
628
+ (P = S.current) == null || P.dispose(), y ? f && ue.set(i, s.current.saveViewState()) : (D = s.current.getModel()) == null || D.dispose(), s.current.dispose();
628
629
  }
629
- return K.createElement(Fe, { width: L, height: g, isEditorReady: S, loading: l, _ref: P, className: k, wrapperProps: C });
630
+ return Y.createElement(We, { width: $, height: g, isEditorReady: b, loading: l, _ref: O, className: L, wrapperProps: T });
630
631
  }
631
- var pr = fr, mr = be(pr), Oe = mr;
632
- const le = {
632
+ var wr = br, Mr = Me(wr), fe = Mr;
633
+ const ae = {
633
634
  selectOnLineNumbers: !0,
634
635
  scrollBeyondLastLine: !1,
635
636
  padding: {
@@ -650,28 +651,28 @@ const le = {
650
651
  overviewRulerLanes: 0,
651
652
  renderLineHighlight: "none",
652
653
  automaticLayout: !0
653
- }, de = (e) => {
654
- const { themeConfig: t, editor: r, theme: n } = e, { defaultTheme: o } = t ?? {}, [i, a] = V(n ?? o ?? "vs-dark");
655
- return I(() => {
654
+ }, ce = (e) => {
655
+ const { themeConfig: t, editor: r, theme: n } = e, { defaultTheme: o } = t ?? {}, [i, a] = R(n ?? o ?? "vs-dark");
656
+ return N(() => {
656
657
  var u;
657
658
  (u = t == null ? void 0 : t.monacoThemes) == null || u.forEach((l) => {
658
- R.editor.defineTheme(l.themeName, l.themeData);
659
+ F.editor.defineTheme(l.themeName, l.themeData);
659
660
  });
660
- }, [R]), I(() => {
661
- R.editor && n && (R.editor.setTheme(n), a(n));
661
+ }, [F]), N(() => {
662
+ F.editor && n && (F.editor.setTheme(n), a(n));
662
663
  }, [r, n]), { theme: i };
663
664
  };
664
- function hr(e) {
665
+ function Ee(e) {
665
666
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
666
667
  let r = "";
667
668
  for (let n = 0; n < e; n++)
668
669
  r += t.charAt(Math.floor(Math.random() * t.length));
669
670
  return r;
670
671
  }
671
- function gr(e) {
672
+ function Or(e) {
672
673
  return e.replace("'", "&#39;");
673
674
  }
674
- const vr = (e) => {
675
+ const Sr = (e) => {
675
676
  const t = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
676
677
  if (e < 60)
677
678
  return t.format(-e, "second");
@@ -689,11 +690,11 @@ const vr = (e) => {
689
690
  return t.format(-i, "month");
690
691
  const a = Math.floor(i / 12);
691
692
  return t.format(-a, "year");
692
- }, br = (e) => {
693
+ }, Er = (e) => {
693
694
  const t = new Date(e), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / 1e3), o = Math.abs(n);
694
- return vr(o);
695
+ return Sr(o);
695
696
  };
696
- function yr({
697
+ function Be({
697
698
  instanceId: e,
698
699
  lineNumbersPosition: t
699
700
  }) {
@@ -726,7 +727,7 @@ function yr({
726
727
  color: var(--cn-text-1);
727
728
  }`, r;
728
729
  }
729
- function wr({
730
+ function xr({
730
731
  instanceId: e,
731
732
  blameData: t,
732
733
  dateWidth: r,
@@ -734,35 +735,39 @@ function wr({
734
735
  }) {
735
736
  let o = "";
736
737
  return t.forEach((i) => {
737
- var s, h, f, m, L, g, k, C;
738
- const a = (h = (s = i == null ? void 0 : i.commitInfo) == null ? void 0 : s.author) == null ? void 0 : h.avatarUrl, u = (m = (f = i == null ? void 0 : i.commitInfo) == null ? void 0 : f.author) == null ? void 0 : m.initials, l = a ? `background: url('${(g = (L = i == null ? void 0 : i.commitInfo) == null ? void 0 : L.author) == null ? void 0 : g.avatarUrl}');` : "";
739
- for (let O = i.fromLineNumber; O <= i.toLineNumber; O++)
740
- O === i.fromLineNumber ? o += `
741
- .monaco-editor-${e} .view-line .blame-editor-commit-${O}:before {
742
- content: '${gr(br(((C = (k = i == null ? void 0 : i.commitInfo) == null ? void 0 : k.author) == null ? void 0 : C.when) || ""))}';
738
+ var d, h, f, y, $, g, L, T;
739
+ const a = (h = (d = i == null ? void 0 : i.commitInfo) == null ? void 0 : d.author) == null ? void 0 : h.avatarUrl, u = (y = (f = i == null ? void 0 : i.commitInfo) == null ? void 0 : f.author) == null ? void 0 : y.initials, l = a ? `background: url('${(g = ($ = i == null ? void 0 : i.commitInfo) == null ? void 0 : $.author) == null ? void 0 : g.avatarUrl}');` : "";
740
+ for (let I = i.fromLineNumber; I <= i.toLineNumber; I++)
741
+ I === i.fromLineNumber ? o += `
742
+ .monaco-editor-${e} .view-line .blame-editor-commit-${I}:before {
743
+ content: '${Or(Er(((T = (L = i == null ? void 0 : i.commitInfo) == null ? void 0 : L.author) == null ? void 0 : T.when) || ""))}';
743
744
  position: absolute;
744
745
  left: 10px;
745
746
  top: 0px;
746
747
  color: var(--cn-text-3);
747
748
  }
748
749
 
749
- .monaco-editor-${e} .view-line .blame-editor-commit-${O}:after {
750
+ .monaco-editor-${e} .view-line .blame-editor-commit-${I}:after {
750
751
  content: '${u ?? " "}';
751
752
  position: absolute;
752
753
  border-radius: 50%;
753
754
  padding: 4px;
754
755
  text-align: center;
755
- background: var(--cn-set-gray-soft-bg);
756
756
  line-height: 17px;
757
757
  left: ${r + 10}px;
758
- top: -4px;
759
- color: var(--cn-text-3);
758
+ top: -2px;
759
+ box-shadow: var(--cn-shadow-comp-avatar-inner);
760
+ font-size: var(--cn-font-size-0);
761
+ font-weight: var(--cn-font-weight-default-normal-500);
762
+ background-color: var(--cn-set-brand-secondary-bg);
763
+ color: var(--cn-set-brand-secondary-text);
764
+ font-family: var(--font-family);
760
765
  width: ${n}px;
761
766
  height: ${n}px;
762
767
  ${l}
763
768
  background-size: 100% 100%;
764
769
  }` : o += `
765
- .monaco-editor-${e} .view-line .blame-editor-commit-${O}:before {
770
+ .monaco-editor-${e} .view-line .blame-editor-commit-${I}:before {
766
771
  content: ' ';
767
772
  left: 10px;
768
773
  top: 0px;
@@ -770,13 +775,13 @@ function wr({
770
775
  }`;
771
776
  }), o;
772
777
  }
773
- function Or(e, t) {
778
+ function Ke(e, t) {
774
779
  let r = "";
775
780
  return e.length > t ? r = e.slice(0, t - 3) + "..." : e.length < t ? r = e + " ".repeat(t - e.length) : r = e, " ".repeat(25) + r + " ".repeat(10);
776
781
  }
777
- W.config({ monaco: R });
778
- const he = 450, Mr = 30, Sr = 140, jr = 24, Er = {
779
- ...le,
782
+ q.config({ monaco: F });
783
+ const he = 450, jr = 30, Pr = 140, Cr = 24, $r = {
784
+ ...ae,
780
785
  readOnly: !0,
781
786
  matchBrackets: "never",
782
787
  renderValidationDecorations: "off",
@@ -786,7 +791,7 @@ const he = 450, Mr = 30, Sr = 140, jr = 24, Er = {
786
791
  renderWhitespace: "none",
787
792
  renderLineHighlight: "none"
788
793
  };
789
- function Hr({
794
+ function tn({
790
795
  code: e,
791
796
  language: t,
792
797
  themeConfig: r,
@@ -795,159 +800,426 @@ function Hr({
795
800
  showSeparators: i = !0,
796
801
  theme: a,
797
802
  height: u = "75vh",
798
- options: l
803
+ options: l,
804
+ className: d
799
805
  }) {
800
- const s = w(o), h = w(hr(5));
801
- se();
802
- const [f, m] = V(), [L, g] = V(0), k = w(null), C = w(null);
803
- I(() => {
804
- s.current = o;
806
+ const h = v(o), f = v(null), y = v(Ee(5));
807
+ ie();
808
+ const [$, g] = R(), L = v(null), T = v(null);
809
+ N(() => {
810
+ h.current = o;
805
811
  }, [o]);
806
- function O() {
807
- const M = C.current, d = k.current;
808
- if (!M || !d)
812
+ function I() {
813
+ const s = T.current, O = L.current;
814
+ if (!s || !O)
809
815
  return;
810
- i && M.changeViewZones(function(p) {
816
+ i && s.changeViewZones(function(p) {
811
817
  p.addZone({
812
818
  afterLineNumber: 0,
813
819
  heightInPx: 10,
814
820
  domNode: document.createElement("div")
815
- }), s.current.forEach((D, T) => {
816
- if (T !== s.current.length - 1) {
817
- const c = document.createElement("div");
818
- c.style.borderTop = "1px solid var(--cn-border-2)", c.style.marginTop = "9px", c.className = "blame-editor-separator", p.addZone({
819
- afterLineNumber: D.toLineNumber,
821
+ }), h.current.forEach((S, c) => {
822
+ if (c !== h.current.length - 1) {
823
+ const w = document.createElement("div");
824
+ w.style.borderTop = "1px solid var(--cn-border-2)", w.style.marginTop = "9px", w.className = "blame-editor-separator", p.addZone({
825
+ afterLineNumber: S.toLineNumber,
820
826
  heightInPx: 20,
821
- domNode: c
827
+ domNode: w
822
828
  });
823
829
  }
824
830
  });
825
831
  });
826
- const P = [];
827
- s.current.forEach((p) => {
828
- var D;
829
- for (let T = p.fromLineNumber; T <= p.toLineNumber; T++)
830
- P.push({
831
- range: new d.Range(T, 0, T + 1, 0),
832
+ const m = [];
833
+ h.current.forEach((p) => {
834
+ var S;
835
+ for (let c = p.fromLineNumber; c <= p.toLineNumber; c++)
836
+ m.push({
837
+ range: new O.Range(c, 0, c + 1, 0),
832
838
  options: {
833
839
  before: {
834
- content: Or(
835
- T === p.fromLineNumber && ((D = p == null ? void 0 : p.commitInfo) == null ? void 0 : D.title) || "",
836
- Mr
840
+ content: Ke(
841
+ c === p.fromLineNumber && ((S = p == null ? void 0 : p.commitInfo) == null ? void 0 : S.title) || "",
842
+ jr
837
843
  ),
838
- cursorStops: d.editor.InjectedTextCursorStops.None,
839
- inlineClassName: `blame-editor-commit blame-editor-commit-${T}`
844
+ cursorStops: O.editor.InjectedTextCursorStops.None,
845
+ inlineClassName: `blame-editor-commit blame-editor-commit-${c}`
840
846
  }
841
847
  }
842
848
  });
843
- }), M.createDecorationsCollection(P);
849
+ }), s.createDecorationsCollection(m);
844
850
  }
845
- function v(M, d) {
846
- var P, p, D, T, c, b;
847
- C.current = M, k.current = d, M.setValue(e), m(M), (D = (p = (P = d.languages.typescript) == null ? void 0 : P.typescriptDefaults) == null ? void 0 : p.setDiagnosticsOptions) == null || D.call(p, {
851
+ function E(s, O) {
852
+ var m, p, S, c, w, H;
853
+ T.current = s, L.current = O, s.setValue(e), g(s), (S = (p = (m = O.languages.typescript) == null ? void 0 : m.typescriptDefaults) == null ? void 0 : p.setDiagnosticsOptions) == null || S.call(p, {
848
854
  noSuggestionDiagnostics: !0,
849
855
  noSyntaxValidation: !0,
850
856
  noSemanticValidation: !0
851
- }), (b = (c = (T = d.languages.typescript) == null ? void 0 : T.javascriptDefaults) == null ? void 0 : c.setDiagnosticsOptions) == null || b.call(c, {
857
+ }), (H = (w = (c = O.languages.typescript) == null ? void 0 : c.javascriptDefaults) == null ? void 0 : w.setDiagnosticsOptions) == null || H.call(w, {
852
858
  noSuggestionDiagnostics: !0,
853
859
  noSyntaxValidation: !0,
854
860
  noSemanticValidation: !0
855
- }), O();
861
+ }), I();
856
862
  }
857
- I(() => {
858
- f == null || f.setValue(e);
863
+ N(() => {
864
+ $ == null || $.setValue(e);
859
865
  }, [e]);
860
- const { theme: N } = de({ monacoRef: k, themeConfig: r, editor: f, theme: a }), x = q(
861
- () => yr({
862
- instanceId: h.current,
866
+ const { theme: V } = ce({ monacoRef: L, themeConfig: r, editor: $, theme: a }), _ = k(
867
+ () => Be({
868
+ instanceId: y.current,
863
869
  lineNumbersPosition: n
864
870
  }),
865
871
  [o]
866
- ), S = q(
867
- () => wr({
868
- instanceId: h.current,
872
+ ), b = k(
873
+ () => xr({
874
+ instanceId: y.current,
869
875
  blameData: o,
870
- avatarSize: jr,
871
- dateWidth: Sr
876
+ avatarSize: Cr,
877
+ dateWidth: Pr
872
878
  }),
873
879
  [o]
874
880
  );
875
- I(() => {
876
- if (n === "center") {
877
- const M = document.getElementsByClassName("lines-content")[0];
878
- if (M) {
879
- const d = { attributes: !0 }, P = (D) => {
880
- for (const T of D) {
881
- const c = parseInt(getComputedStyle(M).left);
882
- g(c);
883
- }
884
- }, p = new MutationObserver(P);
885
- return p.observe(M, d), () => {
881
+ Ve(() => {
882
+ f.current && f.current.style.setProperty("--line-number-display", "none");
883
+ }, []), N(() => {
884
+ if (n === "center" && f.current) {
885
+ const s = f.current.getElementsByClassName("lines-content")[0];
886
+ if (s) {
887
+ const O = { attributes: !0 }, m = () => {
888
+ const S = parseInt(getComputedStyle(s).left);
889
+ f.current && (f.current.style.setProperty("--line-number-offset", `${he + 16 + S}px`), f.current.style.setProperty("--line-number-display", "block"));
890
+ }, p = new MutationObserver(m);
891
+ return p.observe(s, O), m(), () => {
886
892
  p.disconnect();
887
893
  };
888
894
  }
889
895
  }
890
896
  });
891
- const j = q(() => `
892
- .monaco-editor-${h.current} .margin {
893
- left: ${he + 16 + L}px !important;
897
+ const C = k(() => `
898
+ .monaco-editor-${y.current} .margin {
899
+ display: var(--line-number-display);
900
+ left: var(--line-number-offset);
894
901
  pointer-events: none;
895
- }`, [L]), E = `
896
- .monaco-editor-${h.current} .view-overlays {
902
+ }`, []), M = k(() => `.monaco-editor-${y.current} .view-overlays {
897
903
  clip-path: polygon(${he + 16}px 0, 100% 0%, 100% 100%, ${he + 16}px 100%);
898
904
  height:100% !important;
899
- }`, z = q(
905
+ }`, []), j = k(
900
906
  () => ({
901
- ...Er,
907
+ ...$r,
902
908
  ...l
903
909
  }),
904
910
  [l]
905
- );
906
- return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
907
- /* @__PURE__ */ F.jsx(
908
- "style",
911
+ ), x = k(() => /* @__PURE__ */ A.jsx(
912
+ "style",
913
+ {
914
+ dangerouslySetInnerHTML: {
915
+ __html: `${_} ${b} ${C} ${M}`
916
+ }
917
+ }
918
+ ), [_, b, M, C]);
919
+ return /* @__PURE__ */ A.jsxs("div", { className: d, ref: f, children: [
920
+ x,
921
+ /* @__PURE__ */ A.jsx(
922
+ fe,
909
923
  {
910
- dangerouslySetInnerHTML: {
911
- __html: `${x} ${S} ${j} ${E}`
924
+ className: `monaco-editor-${y.current} overflow-hidden rounded-b-cn-3`,
925
+ height: u,
926
+ language: t,
927
+ theme: V,
928
+ options: j,
929
+ onMount: E
930
+ }
931
+ )
932
+ ] });
933
+ }
934
+ q.config({ monaco: F });
935
+ const ve = 450, Ir = 30, Nr = {
936
+ ...ae,
937
+ readOnly: !0,
938
+ matchBrackets: "never",
939
+ renderValidationDecorations: "off",
940
+ guides: { indentation: !1 },
941
+ folding: !1,
942
+ stickyScroll: { enabled: !1 },
943
+ renderWhitespace: "none",
944
+ renderLineHighlight: "none"
945
+ };
946
+ function rn({
947
+ code: e,
948
+ language: t,
949
+ themeConfig: r,
950
+ lineNumbersPosition: n = "left",
951
+ blameData: o,
952
+ theme: i,
953
+ height: a = "75vh",
954
+ options: u,
955
+ className: l
956
+ }) {
957
+ const d = v(o), h = v(null), f = v(Ee(5));
958
+ ie();
959
+ const [y, $] = R(), g = v(null), L = v(null);
960
+ N(() => {
961
+ d.current = o;
962
+ }, [o]);
963
+ function T() {
964
+ const j = L.current, x = g.current;
965
+ if (!j || !x)
966
+ return;
967
+ j.changeViewZones(function(O) {
968
+ O.addZone({
969
+ afterLineNumber: 0,
970
+ heightInPx: 1,
971
+ domNode: document.createElement("div")
972
+ }), d.current.forEach((m) => {
973
+ if (m.infoContent) {
974
+ const S = document.createElement("div");
975
+ S.className = "blame-editor-info-holder", S.style.position = "relative", S.style.zIndex = "100", S.style.overflow = "visible", Lr(S, m.infoContent), O.addZone({
976
+ afterLineNumber: m.fromLineNumber - 1,
977
+ heightInPx: 0,
978
+ domNode: S
979
+ });
912
980
  }
981
+ const p = document.createElement("div");
982
+ p.style.borderTop = "1px solid var(--cn-border-2)", p.style.marginTop = "9px", p.className = "blame-editor-separator", O.addZone({
983
+ afterLineNumber: m.toLineNumber,
984
+ heightInPx: 20,
985
+ domNode: p
986
+ });
987
+ });
988
+ });
989
+ const s = [];
990
+ d.current.forEach((O) => {
991
+ for (let m = O.fromLineNumber; m <= O.toLineNumber; m++)
992
+ s.push({
993
+ range: new x.Range(m, 0, m + 1, 0),
994
+ options: {
995
+ before: {
996
+ content: Ke("", Ir),
997
+ cursorStops: x.editor.InjectedTextCursorStops.None,
998
+ inlineClassName: `blame-editor-commit blame-editor-commit-${m}`
999
+ }
1000
+ }
1001
+ });
1002
+ }), j.createDecorationsCollection(s);
1003
+ }
1004
+ function I(j, x) {
1005
+ var s, O, m, p, S, c;
1006
+ L.current = j, g.current = x, j.setValue(e), $(j), (m = (O = (s = x.languages.typescript) == null ? void 0 : s.typescriptDefaults) == null ? void 0 : O.setDiagnosticsOptions) == null || m.call(O, {
1007
+ noSuggestionDiagnostics: !0,
1008
+ noSyntaxValidation: !0,
1009
+ noSemanticValidation: !0
1010
+ }), (c = (S = (p = x.languages.typescript) == null ? void 0 : p.javascriptDefaults) == null ? void 0 : S.setDiagnosticsOptions) == null || c.call(S, {
1011
+ noSuggestionDiagnostics: !0,
1012
+ noSyntaxValidation: !0,
1013
+ noSemanticValidation: !0
1014
+ }), T();
1015
+ }
1016
+ N(() => {
1017
+ y == null || y.setValue(e);
1018
+ }, [e]);
1019
+ const { theme: E } = ce({ monacoRef: g, themeConfig: r, editor: y, theme: i }), V = k(
1020
+ () => Be({
1021
+ instanceId: f.current,
1022
+ lineNumbersPosition: n
1023
+ }),
1024
+ [o]
1025
+ );
1026
+ Ve(() => {
1027
+ h.current && h.current.style.setProperty("--line-number-display", "none");
1028
+ }, []), N(() => {
1029
+ if (n === "center" && h.current) {
1030
+ const j = h.current.getElementsByClassName("lines-content")[0];
1031
+ if (j) {
1032
+ const x = { attributes: !0 }, s = () => {
1033
+ const m = parseInt(getComputedStyle(j).left);
1034
+ h.current && (h.current.style.setProperty("--line-number-offset", `${ve + 16 + m}px`), h.current.style.setProperty("--line-number-display", "block"));
1035
+ }, O = new MutationObserver(s);
1036
+ return O.observe(j, x), s(), () => {
1037
+ O.disconnect();
1038
+ };
913
1039
  }
914
- ),
915
- /* @__PURE__ */ F.jsx(
916
- Oe,
1040
+ }
1041
+ });
1042
+ const _ = k(() => `
1043
+ .monaco-editor-${f.current} .margin {
1044
+ display: var(--line-number-display);
1045
+ left: var(--line-number-offset);
1046
+ pointer-events: none;
1047
+ }`, []), b = k(() => `.monaco-editor-${f.current} .view-overlays {
1048
+ clip-path: polygon(${ve + 16}px 0, 100% 0%, 100% 100%, ${ve + 16}px 100%);
1049
+ height:100% !important;
1050
+ }`, []), C = k(
1051
+ () => ({
1052
+ ...Nr,
1053
+ ...u
1054
+ }),
1055
+ [u]
1056
+ ), M = k(() => /* @__PURE__ */ A.jsx(
1057
+ "style",
1058
+ {
1059
+ dangerouslySetInnerHTML: {
1060
+ __html: `${V} ${_} ${b}`
1061
+ }
1062
+ }
1063
+ ), [V, b, _]);
1064
+ return /* @__PURE__ */ A.jsxs("div", { className: l, ref: h, children: [
1065
+ M,
1066
+ /* @__PURE__ */ A.jsx(
1067
+ fe,
917
1068
  {
918
- className: `monaco-editor-${h.current} overflow-hidden rounded-b-md border-x border-b`,
919
- height: u,
1069
+ className: `monaco-editor-${f.current} overflow-hidden rounded-b-cn-3`,
1070
+ height: a,
920
1071
  language: t,
921
- theme: N,
922
- options: z,
923
- onMount: v
1072
+ theme: E,
1073
+ options: C,
1074
+ onMount: I
924
1075
  }
925
1076
  )
926
1077
  ] });
927
1078
  }
928
- W.config({ monaco: R });
929
- const Pr = {
930
- ...le
1079
+ function Lr(e, t) {
1080
+ return new IntersectionObserver(
1081
+ ([n], o) => {
1082
+ if (n.isIntersecting) {
1083
+ o.disconnect();
1084
+ const i = document.createElement("div");
1085
+ i.style.position = "absolute", i.style.top = "-2px", e.appendChild(i), at(t, i);
1086
+ }
1087
+ },
1088
+ {
1089
+ root: document.querySelector(".monaco-scrollable-element"),
1090
+ threshold: 0.2
1091
+ }
1092
+ ).observe(e), e;
1093
+ }
1094
+ function Tr(e) {
1095
+ const { editor: t, keyword: r } = e;
1096
+ N(() => {
1097
+ if (!t || !r)
1098
+ return;
1099
+ const n = t.getModel(), o = n.findMatches(r, !1, !1, !1, null, !1);
1100
+ o.length > 0 && o.forEach((i) => {
1101
+ n.deltaDecorations(
1102
+ [],
1103
+ [
1104
+ {
1105
+ range: i.range,
1106
+ options: {
1107
+ isWholeLine: !1,
1108
+ inlineClassName: "CodeEditor_HighlightedText"
1109
+ }
1110
+ }
1111
+ ]
1112
+ );
1113
+ });
1114
+ }, [t, r]);
1115
+ }
1116
+ function Dr(e) {
1117
+ const { enable: t, editor: r, onSelectedLineChange: n, selectedLine: o, onSelectedLineButtonClick: i } = e, a = v(null), u = v(!1), l = v(null);
1118
+ l.current = l.current ?? (r == null ? void 0 : r.createDecorationsCollection([])) ?? null, N(() => {
1119
+ let d;
1120
+ const h = setTimeout(() => {
1121
+ if (!t || !r)
1122
+ return;
1123
+ const f = (y) => {
1124
+ var g, L, T, I;
1125
+ if ((L = (g = y.target) == null ? void 0 : g.element) != null && L.classList.contains("CodeEditor_HighlightedGlyphMargin")) {
1126
+ i == null || i((T = y.target) == null ? void 0 : T.element);
1127
+ return;
1128
+ }
1129
+ const $ = _r((I = y.target) == null ? void 0 : I.element);
1130
+ if (!$) {
1131
+ n == null || n(void 0), i == null || i(void 0), ye(r, l.current, void 0);
1132
+ return;
1133
+ }
1134
+ u.current = !0, a.current = $, n == null || n($), ye(r, l.current, $, !1), i == null || i(void 0);
1135
+ };
1136
+ d = r.onMouseDown(f);
1137
+ }, 100);
1138
+ return () => {
1139
+ clearTimeout(h), d == null || d.dispose();
1140
+ };
1141
+ }, [u, o, n, t, r, i, l]), N(() => {
1142
+ r && a.current !== o && ye(r, l.current, o, !0);
1143
+ }, [r, o, l]);
1144
+ }
1145
+ function ye(e, t, r, n) {
1146
+ if (!r) {
1147
+ t == null || t.set([]);
1148
+ return;
1149
+ }
1150
+ t == null || t.set([
1151
+ {
1152
+ range: new F.Range(r, 1, r, 1),
1153
+ options: {
1154
+ isWholeLine: !0,
1155
+ className: "CodeEditor_HighlightedLine"
1156
+ // TODO: gonna be used if in the future
1157
+ // glyphMarginClassName: 'CodeEditor_HighlightedGlyphMargin'
1158
+ }
1159
+ }
1160
+ ]), e == null || e.setSelection(new F.Range(r, 0, r, 0)), n && (e == null || e.revealLineInCenter(r));
1161
+ }
1162
+ function _r(e) {
1163
+ const t = e != null && e.classList.contains("line-numbers") ? e : void 0;
1164
+ if (!t)
1165
+ return;
1166
+ const r = parseInt(t.textContent ?? "");
1167
+ if (!isNaN(r))
1168
+ return r;
1169
+ }
1170
+ const Vr = `.CodeEditor_HighlightedLine {
1171
+ opacity: 0.1;
1172
+ background-color: var(--cn-yellow-300, orange) !important;
1173
+ }
1174
+
1175
+ .CodeEditor_HighlightedText {
1176
+ background-color: var(--cn-yellow-100, orange) !important;
1177
+ }
1178
+
1179
+ .CodeEditor_HighlightedGlyphMargin {
1180
+ background: rgb(183, 183, 183);
1181
+ border: 1px solid gray;
1182
+ border-radius: 4px;
1183
+ margin-left: 5px;
1184
+ height: 20px;
1185
+ position: relative;
1186
+ }
1187
+
1188
+ .CodeEditor_HighlightedGlyphMargin::after {
1189
+ content: '...';
1190
+ position: absolute;
1191
+ padding: 7px 3px;
1192
+ }
1193
+ `;
1194
+ q.config({ monaco: F });
1195
+ const kr = {
1196
+ ...ae
931
1197
  };
932
- function qr({
1198
+ function nn({
933
1199
  codeRevision: e,
934
1200
  onCodeRevisionChange: t,
935
1201
  language: r,
936
1202
  themeConfig: n,
937
1203
  options: o,
938
1204
  theme: i,
939
- height: a = "75vh",
940
- className: u
1205
+ enableLinesSelection: a = !1,
1206
+ selectedLine: u,
1207
+ onSelectedLineChange: l,
1208
+ onSelectedLineButtonClick: d,
1209
+ highlightKeyword: h,
1210
+ height: f = "75vh",
1211
+ className: y
941
1212
  }) {
942
- se();
943
- const [l, s] = V(), h = w(), f = w({ code: "", revisionId: 0 }), m = w(null), L = G(
944
- (C, O) => {
945
- var v, N, x, S, j, E;
946
- m.current = C, h.current = O, C.setValue(e.code), s(C), (x = (N = (v = O.languages.typescript) == null ? void 0 : v.typescriptDefaults) == null ? void 0 : N.setDiagnosticsOptions) == null || x.call(N, {
1213
+ const $ = v(Ee(5));
1214
+ ie();
1215
+ const [g, L] = R(), T = v(), I = v({ code: "", revisionId: 0 }), E = v(null), V = J(
1216
+ (M, j) => {
1217
+ var x, s, O, m, p, S;
1218
+ E.current = M, T.current = j, M.setValue(e.code), L(M), (O = (s = (x = j.languages.typescript) == null ? void 0 : x.typescriptDefaults) == null ? void 0 : s.setDiagnosticsOptions) == null || O.call(s, {
947
1219
  noSuggestionDiagnostics: !0,
948
1220
  noSyntaxValidation: !0,
949
1221
  noSemanticValidation: !0
950
- }), (E = (j = (S = O.languages.typescript) == null ? void 0 : S.javascriptDefaults) == null ? void 0 : j.setDiagnosticsOptions) == null || E.call(j, {
1222
+ }), (S = (p = (m = j.languages.typescript) == null ? void 0 : m.javascriptDefaults) == null ? void 0 : p.setDiagnosticsOptions) == null || S.call(p, {
951
1223
  noSuggestionDiagnostics: !0,
952
1224
  noSyntaxValidation: !0,
953
1225
  noSemanticValidation: !0
@@ -955,37 +1227,53 @@ function qr({
955
1227
  },
956
1228
  [e.code]
957
1229
  );
958
- I(() => {
959
- var C, O;
960
- if (m.current && (!e.revisionId || e.revisionId > Number((C = f.current) == null ? void 0 : C.revisionId))) {
961
- const v = m.current.getModel();
962
- v && (o != null && o.readOnly ? (O = m.current) == null || O.setValue(e.code) : (m.current.pushUndoStop(), m.current.executeEdits("edit", [
1230
+ N(() => {
1231
+ var M, j;
1232
+ if (E.current && (!e.revisionId || e.revisionId > Number((M = I.current) == null ? void 0 : M.revisionId))) {
1233
+ const x = E.current.getModel();
1234
+ x && (o != null && o.readOnly ? (j = E.current) == null || j.setValue(e.code) : (E.current.pushUndoStop(), E.current.executeEdits("edit", [
963
1235
  {
964
- range: v.getFullModelRange(),
1236
+ range: x.getFullModelRange(),
965
1237
  text: e.code
966
1238
  }
967
- ]), m.current.pushUndoStop()));
1239
+ ]), E.current.pushUndoStop()));
968
1240
  }
969
- }, [e, m.current]);
970
- const { theme: g } = de({ monacoRef: h, themeConfig: n, editor: l, theme: i }), k = q(() => ({ ...Pr, ...o || {} }), [o]);
971
- return /* @__PURE__ */ F.jsx(F.Fragment, { children: /* @__PURE__ */ F.jsx(
972
- Oe,
973
- {
974
- className: u,
975
- height: a,
976
- onChange: (C, O) => {
977
- f.current = { code: C ?? "", revisionId: O.versionId }, t({ ...f.current }, O);
978
- },
979
- language: r,
980
- theme: g,
981
- options: k,
982
- onMount: L
983
- }
984
- ) });
1241
+ }, [e, o == null ? void 0 : o.readOnly, E]);
1242
+ const { theme: _ } = ce({ monacoRef: T, themeConfig: n, editor: g, theme: i });
1243
+ Dr({
1244
+ enable: a,
1245
+ editor: g,
1246
+ selectedLine: u,
1247
+ onSelectedLineChange: l,
1248
+ onSelectedLineButtonClick: d
1249
+ }), Tr({ editor: g, keyword: h });
1250
+ const b = k(() => ({
1251
+ ...kr,
1252
+ ...o || {}
1253
+ // TODO: this will be used in the future
1254
+ // ...(enableLinesSelection ? { glyphMargin: true } : {})
1255
+ }), [o]), C = k(() => `.monaco-editor-${$.current} .margin-view-overlays .line-numbers { cursor: pointer !important; } ${Vr}`, []);
1256
+ return /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
1257
+ a && /* @__PURE__ */ A.jsx("style", { dangerouslySetInnerHTML: { __html: C } }),
1258
+ /* @__PURE__ */ A.jsx(
1259
+ fe,
1260
+ {
1261
+ className: `monaco-editor-${$.current} ${y}`,
1262
+ height: f,
1263
+ onChange: (M, j) => {
1264
+ I.current = { code: M ?? "", revisionId: j.versionId }, t == null || t({ ...I.current }, j);
1265
+ },
1266
+ language: r,
1267
+ theme: _,
1268
+ options: b,
1269
+ onMount: V
1270
+ }
1271
+ )
1272
+ ] });
985
1273
  }
986
- W.config({ monaco: R });
987
- const xr = {
988
- ...le,
1274
+ q.config({ monaco: F });
1275
+ const Ar = {
1276
+ ...ae,
989
1277
  codeLens: !1,
990
1278
  smartSelect: {
991
1279
  selectLeadingAndTrailingWhitespace: !0
@@ -993,7 +1281,7 @@ const xr = {
993
1281
  originalEditable: !1,
994
1282
  overviewRulerBorder: !1
995
1283
  };
996
- function Br({
1284
+ function on({
997
1285
  original: e,
998
1286
  modified: t,
999
1287
  language: r,
@@ -1002,12 +1290,12 @@ function Br({
1002
1290
  theme: i,
1003
1291
  height: a = "75vh"
1004
1292
  }) {
1005
- se();
1006
- const [u, l] = V(), s = w(), { theme: h } = de({ monacoRef: s, themeConfig: n, editor: u, theme: i }), f = q(() => ({ ...xr, ...o || {} }), [o]);
1007
- return /* @__PURE__ */ F.jsx(F.Fragment, { children: /* @__PURE__ */ F.jsx(
1008
- ur,
1293
+ ie();
1294
+ const [u, l] = R(), d = v(), { theme: h } = ce({ monacoRef: d, themeConfig: n, editor: u, theme: i }), f = k(() => ({ ...Ar, ...o || {} }), [o]);
1295
+ return /* @__PURE__ */ A.jsx(A.Fragment, { children: /* @__PURE__ */ A.jsx(
1296
+ gr,
1009
1297
  {
1010
- className: "overflow-hidden rounded-b-md border-x border-b",
1298
+ className: "overflow-hidden rounded-b-cn-3 border-x border-b",
1011
1299
  language: r,
1012
1300
  theme: h,
1013
1301
  original: e,
@@ -1018,39 +1306,39 @@ function Br({
1018
1306
  }
1019
1307
  ) });
1020
1308
  }
1021
- var ze = /* @__PURE__ */ ((e) => (e.ContainsPath = "ContainsPath", e))(ze || {});
1022
- function Cr(e) {
1309
+ var Ye = /* @__PURE__ */ ((e) => (e.ContainsPath = "ContainsPath", e))(Ye || {});
1310
+ function Hr(e) {
1023
1311
  const { pathSymbolMap: t, inlineActions: r = [], commandId: n } = e, o = Object.fromEntries(t.entries()), i = [];
1024
1312
  return r == null || r.forEach((a) => {
1025
1313
  const u = a.actions;
1026
- a.selectors.forEach((s) => {
1027
- switch (s.type) {
1028
- case ze.ContainsPath: {
1029
- s.paths.forEach((h) => {
1030
- let m = Object.keys(o).map((g) => ({
1314
+ a.selectors.forEach((d) => {
1315
+ switch (d.type) {
1316
+ case Ye.ContainsPath: {
1317
+ d.paths.forEach((h) => {
1318
+ let y = Object.keys(o).map((g) => ({
1031
1319
  fullPath: g,
1032
1320
  path: g,
1033
1321
  symbol: o[g]
1034
- })).filter((g) => g.path.startsWith(s.basePath));
1035
- m = m.map((g) => ({
1322
+ })).filter((g) => g.path.startsWith(d.basePath));
1323
+ y = y.map((g) => ({
1036
1324
  ...g,
1037
- path: g.path.substring(s.basePath.length)
1038
- })), m.filter((g) => h.test(g.path)).forEach((g) => {
1039
- const k = g.fullPath, C = g.symbol, O = C.range;
1040
- u.forEach((v) => {
1041
- const N = {
1042
- range: O,
1043
- symbols: [C],
1044
- onClick: v.onClick,
1045
- data: v.data,
1046
- path: k
1325
+ path: g.path.substring(d.basePath.length)
1326
+ })), y.filter((g) => h.test(g.path)).forEach((g) => {
1327
+ const L = g.fullPath, T = g.symbol, I = T.range;
1328
+ u.forEach((E) => {
1329
+ const V = {
1330
+ range: I,
1331
+ symbols: [T],
1332
+ onClick: E.onClick,
1333
+ data: E.data,
1334
+ path: L
1047
1335
  };
1048
1336
  i.push({
1049
- range: O,
1337
+ range: I,
1050
1338
  command: {
1051
1339
  id: n,
1052
- title: v.title,
1053
- arguments: [N]
1340
+ title: E.title,
1341
+ arguments: [V]
1054
1342
  }
1055
1343
  });
1056
1344
  });
@@ -1070,40 +1358,40 @@ const te = class te {
1070
1358
  return te.data;
1071
1359
  }
1072
1360
  };
1073
- je(te, "data", {});
1074
- let ve = te;
1075
- async function He(e) {
1076
- const t = ve.get(), { documentSymbolProvider: r } = t.StandaloneServices.get(t.ILanguageFeaturesService);
1361
+ Pe(te, "data", {});
1362
+ let we = te;
1363
+ async function Ge(e) {
1364
+ const t = we.get(), { documentSymbolProvider: r } = t.StandaloneServices.get(t.ILanguageFeaturesService);
1077
1365
  return await t.OutlineModel.create(r, e);
1078
1366
  }
1079
- function qe(e) {
1367
+ function Ze(e) {
1080
1368
  const t = /* @__PURE__ */ new Map();
1081
- return Me({
1369
+ return xe({
1082
1370
  pathSymbolMap: t,
1083
1371
  parentPath: "",
1084
1372
  children: e.children,
1085
- parentKind: ge.SymbolKind.Module
1373
+ parentKind: be.SymbolKind.Module
1086
1374
  }), t;
1087
1375
  }
1088
- function Me(e) {
1376
+ function xe(e) {
1089
1377
  switch (e.parentKind) {
1090
- case ge.SymbolKind.Module: {
1091
- $r(e);
1378
+ case be.SymbolKind.Module: {
1379
+ Rr(e);
1092
1380
  break;
1093
1381
  }
1094
- case ge.SymbolKind.Array: {
1095
- Ir(e);
1382
+ case be.SymbolKind.Array: {
1383
+ Ur(e);
1096
1384
  break;
1097
1385
  }
1098
1386
  default:
1099
- Lr(e);
1387
+ zr(e);
1100
1388
  }
1101
1389
  }
1102
- function $r(e) {
1390
+ function Rr(e) {
1103
1391
  e.children.forEach((t) => {
1104
1392
  var n;
1105
1393
  let r = e.parentPath;
1106
- t.symbol && (r = e.parentPath ? `${e.parentPath}.${t.symbol.name}` : t.symbol.name, e.pathSymbolMap.set(r, t.symbol)), Me({
1394
+ t.symbol && (r = e.parentPath ? `${e.parentPath}.${t.symbol.name}` : t.symbol.name, e.pathSymbolMap.set(r, t.symbol)), xe({
1107
1395
  pathSymbolMap: e.pathSymbolMap,
1108
1396
  parentPath: r,
1109
1397
  children: t.children,
@@ -1111,11 +1399,11 @@ function $r(e) {
1111
1399
  });
1112
1400
  });
1113
1401
  }
1114
- function Ir(e) {
1402
+ function Ur(e) {
1115
1403
  let t = 0;
1116
1404
  e.children.forEach((r) => {
1117
1405
  const n = e.parentPath ? `${e.parentPath}.${t}` : `${t}`;
1118
- e.pathSymbolMap.set(n, r.symbol), t += 1, Me({
1406
+ e.pathSymbolMap.set(n, r.symbol), t += 1, xe({
1119
1407
  pathSymbolMap: e.pathSymbolMap,
1120
1408
  parentPath: n,
1121
1409
  children: r.children,
@@ -1123,44 +1411,47 @@ function Ir(e) {
1123
1411
  });
1124
1412
  });
1125
1413
  }
1126
- function Lr(e) {
1414
+ function zr(e) {
1127
1415
  const t = e.children.get("0");
1128
1416
  if (t) {
1129
1417
  const r = e.parentPath ? `${e.parentPath}.${t.symbol.name}` : t == null ? void 0 : t.symbol.name;
1130
1418
  e.pathSymbolMap.set(r, t.symbol);
1131
1419
  }
1132
1420
  }
1133
- function Tr({
1421
+ function Fr({
1134
1422
  editorRef: e,
1135
1423
  inlineActions: t
1136
1424
  }) {
1137
- I(() => R.languages.registerCodeLensProvider("yaml", {
1425
+ N(() => F.languages.registerCodeLensProvider("yaml", {
1138
1426
  provideCodeLenses: async (n) => {
1139
- var l;
1140
- const o = await He(n), i = qe(o), a = (l = e == null ? void 0 : e.current) == null ? void 0 : l.addCommand(0, (s, { onClick: h, path: f, range: m, data: L }) => {
1141
- h({ path: f, range: m, data: L });
1427
+ var l, d, h, f, y;
1428
+ if (((l = n == null ? void 0 : n.uri) == null ? void 0 : l.toString()) !== ((f = (h = (d = e.current) == null ? void 0 : d.getModel()) == null ? void 0 : h.uri) == null ? void 0 : f.toString()))
1429
+ return { lenses: [], dispose: () => {
1430
+ } };
1431
+ const o = await Ge(n), i = Ze(o), a = (y = e == null ? void 0 : e.current) == null ? void 0 : y.addCommand(0, ($, { onClick: g, path: L, range: T, data: I }) => {
1432
+ g({ path: L, range: T, data: I });
1142
1433
  });
1143
1434
  return a ? {
1144
- lenses: Cr({ pathSymbolMap: i, inlineActions: t, commandId: a }),
1435
+ lenses: Hr({ pathSymbolMap: i, inlineActions: t, commandId: a }),
1145
1436
  dispose: () => {
1146
1437
  }
1147
1438
  } : void 0;
1148
1439
  }
1149
1440
  }).dispose, [t, e]);
1150
1441
  }
1151
- const Dr = ({ editorRef: e, selection: t }) => {
1152
- const [r, n] = V(), o = q(
1442
+ const Wr = ({ editorRef: e, selection: t }) => {
1443
+ const [r, n] = R(), o = k(
1153
1444
  () => async (i, a, u) => {
1154
- var m, L, g;
1155
- const l = (m = e == null ? void 0 : e.current) == null ? void 0 : m.getModel();
1445
+ var y, $, g;
1446
+ const l = (y = e == null ? void 0 : e.current) == null ? void 0 : y.getModel();
1156
1447
  if (!l || !a)
1157
1448
  return n(void 0);
1158
- const s = await He(l), f = (L = qe(s).get(a)) == null ? void 0 : L.range;
1449
+ const d = await Ge(l), f = ($ = Ze(d).get(a)) == null ? void 0 : $.range;
1159
1450
  f && (n(f), u && ((g = e == null ? void 0 : e.current) == null || g.revealLineInCenter(f.startLineNumber)));
1160
1451
  },
1161
1452
  []
1162
1453
  );
1163
- I(() => {
1454
+ N(() => {
1164
1455
  if ("requestIdleCallback" in window) {
1165
1456
  const i = requestIdleCallback(() => {
1166
1457
  o(e, t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter);
@@ -1172,7 +1463,7 @@ const Dr = ({ editorRef: e, selection: t }) => {
1172
1463
  }, 100);
1173
1464
  return () => clearTimeout(i);
1174
1465
  }
1175
- }, [t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter, e, o]), I(() => {
1466
+ }, [t == null ? void 0 : t.path, t == null ? void 0 : t.revealInCenter, e, o]), N(() => {
1176
1467
  var a;
1177
1468
  if (!r)
1178
1469
  return;
@@ -1188,7 +1479,7 @@ const Dr = ({ editorRef: e, selection: t }) => {
1188
1479
  ]);
1189
1480
  return () => i == null ? void 0 : i.clear();
1190
1481
  }, [r, e, t == null ? void 0 : t.className]);
1191
- }, Be = Je({
1482
+ }, Je = nt({
1192
1483
  markers: [],
1193
1484
  setMarkers: () => {
1194
1485
  },
@@ -1198,17 +1489,17 @@ const Dr = ({ editorRef: e, selection: t }) => {
1198
1489
  updateCursorPosition: (e) => {
1199
1490
  }
1200
1491
  });
1201
- function Wr({
1492
+ function an({
1202
1493
  children: e
1203
1494
  }) {
1204
- const [t, r] = V([]), [n, o] = V(null), i = G(
1495
+ const [t, r] = R([]), [n, o] = R(null), i = J(
1205
1496
  (a) => {
1206
1497
  n == null || n.setPosition(a), n == null || n.revealLineInCenterIfOutsideViewport(a.lineNumber), n == null || n.focus();
1207
1498
  },
1208
1499
  [n]
1209
1500
  );
1210
- return /* @__PURE__ */ F.jsx(
1211
- Be.Provider,
1501
+ return /* @__PURE__ */ A.jsx(
1502
+ Je.Provider,
1212
1503
  {
1213
1504
  value: {
1214
1505
  markers: t,
@@ -1221,25 +1512,25 @@ function Wr({
1221
1512
  }
1222
1513
  );
1223
1514
  }
1224
- function We() {
1225
- return Qe(Be);
1515
+ function Qe() {
1516
+ return ot(Je);
1226
1517
  }
1227
- const Nr = ({ monacoRef: e, editorRef: t, instanceId: r }) => {
1228
- const { setMarkers: n } = We();
1229
- I(() => {
1518
+ const qr = ({ monacoRef: e, editorRef: t, instanceId: r }) => {
1519
+ const { setMarkers: n } = Qe();
1520
+ N(() => {
1230
1521
  let o;
1231
1522
  const i = setTimeout(() => {
1232
1523
  var u;
1233
1524
  const a = (u = e.current) == null ? void 0 : u.editor;
1234
1525
  a && (o = a.onDidChangeMarkers((l) => {
1235
1526
  var f;
1236
- const s = (f = t.current) == null ? void 0 : f.getModel();
1237
- if (!s)
1527
+ const d = (f = t.current) == null ? void 0 : f.getModel();
1528
+ if (!d)
1238
1529
  return;
1239
- const h = s.uri.toString();
1240
- if (l.some((m) => m.toString() === h)) {
1241
- const m = R.editor.getModelMarkers({ resource: s.uri });
1242
- n(m);
1530
+ const h = d.uri.toString();
1531
+ if (l.some((y) => y.toString() === h)) {
1532
+ const y = F.editor.getModelMarkers({ resource: d.uri });
1533
+ n(y);
1243
1534
  }
1244
1535
  }));
1245
1536
  }, 100);
@@ -1248,17 +1539,17 @@ const Nr = ({ monacoRef: e, editorRef: t, instanceId: r }) => {
1248
1539
  };
1249
1540
  }, [e, r, n]);
1250
1541
  };
1251
- function kr(e) {
1542
+ function Br(e) {
1252
1543
  var n, o;
1253
- const t = ((o = (n = ye) == null ? void 0 : n.diagnosticsOptions) == null ? void 0 : o.schemas) ?? [], r = t.findIndex((i) => i.fileMatch[0] === e.fileMatch[0]);
1254
- r !== -1 ? t[r] = e : t.push(e), Ke(t);
1544
+ const t = ((o = (n = Oe) == null ? void 0 : n.diagnosticsOptions) == null ? void 0 : o.schemas) ?? [], r = t.findIndex((i) => i.fileMatch[0] === e.fileMatch[0]);
1545
+ r !== -1 ? t[r] = e : t.push(e), Xe(t);
1255
1546
  }
1256
- function Ar(e) {
1547
+ function Kr(e) {
1257
1548
  var n, o;
1258
- const r = (((o = (n = ye) == null ? void 0 : n.diagnosticsOptions) == null ? void 0 : o.schemas) ?? []).filter((i) => i.fileMatch[0] !== Se(e));
1259
- Ke(r);
1549
+ const r = (((o = (n = Oe) == null ? void 0 : n.diagnosticsOptions) == null ? void 0 : o.schemas) ?? []).filter((i) => i.fileMatch[0] !== je(e));
1550
+ Xe(r);
1260
1551
  }
1261
- function Ke(e) {
1552
+ function Xe(e) {
1262
1553
  const t = {
1263
1554
  hover: !0,
1264
1555
  completion: !0,
@@ -1266,25 +1557,25 @@ function Ke(e) {
1266
1557
  validate: !0,
1267
1558
  schemas: e
1268
1559
  };
1269
- ye.setDiagnosticsOptions({ ...t });
1560
+ Oe.setDiagnosticsOptions({ ...t });
1270
1561
  }
1271
- const Se = (e) => Xe.parse(`file://${e}`).toString(), Vr = (e) => {
1562
+ const je = (e) => it.parse(`file://${e}`).toString(), Yr = (e) => {
1272
1563
  const { schemaConfig: t, instanceId: r } = e;
1273
- I(() => {
1564
+ N(() => {
1274
1565
  if (t != null && t.schema)
1275
- return kr({
1276
- fileMatch: [Se(r.toString())],
1566
+ return Br({
1567
+ fileMatch: [je(r.toString())],
1277
1568
  ...t
1278
1569
  }), () => {
1279
- Ar(r);
1570
+ Kr(r);
1280
1571
  };
1281
1572
  }, [t == null ? void 0 : t.schema, r]);
1282
1573
  };
1283
- W.config({ monaco: R });
1284
- const _r = {
1285
- ...le,
1574
+ q.config({ monaco: F });
1575
+ const Gr = {
1576
+ ...ae,
1286
1577
  folding: !0
1287
- }, Kr = function(t) {
1578
+ }, cn = function(t) {
1288
1579
  const {
1289
1580
  yamlRevision: r,
1290
1581
  schemaConfig: n,
@@ -1293,85 +1584,88 @@ const _r = {
1293
1584
  onYamlRevisionChange: a,
1294
1585
  selection: u,
1295
1586
  theme: l,
1296
- options: s,
1587
+ options: d,
1297
1588
  animateOnUpdate: h = !1,
1298
1589
  onAnimateEnd: f,
1299
- instanceId: m
1300
- } = t, L = se(), [g] = V(m ?? `yaml-editor-${Math.random()}`), { editor: k, setEditor: C } = We(), O = w(null), v = w(), N = w({ yaml: "", revisionId: 0 }), x = w(null), S = w(null), j = G(
1301
- (P) => {
1302
- var T, c, b;
1303
- const p = P.split(`
1304
- `), D = (T = x.current) == null ? void 0 : T.getModel();
1305
- if (D) {
1306
- (c = x.current) == null || c.pushUndoStop(), D.setValue("");
1307
- let A = 0;
1308
- S.current = window.setInterval(() => {
1309
- var H;
1310
- A < p.length ? (L && ((H = x.current) == null || H.executeEdits("addLine", [
1590
+ instanceId: y,
1591
+ height: $
1592
+ } = t, g = ie(), [L] = R(y ?? `yaml-editor-${Math.random()}`), { editor: T, setEditor: I } = Qe(), E = v(null), V = v(), _ = v({ yaml: "", revisionId: 0 }), b = v(null), C = v(null), M = J(
1593
+ (m) => {
1594
+ var c, w, H;
1595
+ const p = m.split(`
1596
+ `), S = (c = b.current) == null ? void 0 : c.getModel();
1597
+ if (S) {
1598
+ (w = b.current) == null || w.pushUndoStop(), S.setValue("");
1599
+ let W = 0;
1600
+ C.current = window.setInterval(() => {
1601
+ var B;
1602
+ W < p.length ? (g && ((B = b.current) == null || B.executeEdits("addLine", [
1311
1603
  {
1312
- range: new L.Range(A + 1, 1, A + 1, 1),
1313
- text: p[A] + `
1604
+ range: new g.Range(W + 1, 1, W + 1, 1),
1605
+ text: p[W] + `
1314
1606
  `
1315
1607
  }
1316
- ])), A++) : S.current && (clearInterval(S.current), f == null || f());
1317
- }, 100), (b = x.current) == null || b.pushUndoStop();
1608
+ ])), W++) : C.current && (clearInterval(C.current), f == null || f());
1609
+ }, 100), (H = b.current) == null || H.pushUndoStop();
1318
1610
  }
1319
1611
  },
1320
- [L]
1612
+ [g]
1321
1613
  );
1322
- I(() => () => {
1323
- S.current && clearInterval(S.current);
1614
+ N(() => () => {
1615
+ C.current && clearInterval(C.current);
1324
1616
  }, []);
1325
- function E(P, p) {
1326
- x.current = P, v.current = p, P.setValue(r.yaml), C(P), setTimeout(() => {
1327
- var D;
1328
- (D = O.current) != null && D.style && (O.current.style.opacity = "1");
1617
+ function j(m, p) {
1618
+ b.current = m, V.current = p, m.setValue(r.yaml), I(m), setTimeout(() => {
1619
+ var S;
1620
+ (S = E.current) != null && S.style && (E.current.style.opacity = "1");
1329
1621
  }, 50);
1330
1622
  }
1331
- I(() => {
1332
- var P;
1333
- if (x.current && (!r.revisionId || r.revisionId > Number((P = N.current) == null ? void 0 : P.revisionId))) {
1334
- const p = x.current.getModel();
1335
- p && (x.current.executeEdits("edit", [
1623
+ N(() => {
1624
+ var m;
1625
+ if (b.current && (!r.revisionId || r.revisionId > Number((m = _.current) == null ? void 0 : m.revisionId))) {
1626
+ const p = b.current.getModel();
1627
+ p && (b.current.executeEdits("edit", [
1336
1628
  {
1337
1629
  range: p.getFullModelRange(),
1338
1630
  text: h ? "" : r.yaml
1339
1631
  }
1340
- ]), h && j(r.yaml));
1632
+ ]), h && M(r.yaml));
1341
1633
  }
1342
- }, [j, r, h]), Vr({ schemaConfig: n, instanceId: g }), Tr({ editorRef: x, inlineActions: o });
1343
- const { theme: z } = de({ monacoRef: v, themeConfig: i, editor: k, theme: l });
1344
- Nr({ monacoRef: v, editorRef: x, instanceId: g }), Dr({ editorRef: x, selection: u });
1345
- const M = q(() => Se(g), []), d = q(
1634
+ }, [M, r, h]), Yr({ schemaConfig: n, instanceId: L }), Fr({ editorRef: b, inlineActions: o });
1635
+ const { theme: x } = ce({ monacoRef: V, themeConfig: i, editor: T, theme: l });
1636
+ qr({ monacoRef: V, editorRef: b, instanceId: L }), Wr({ editorRef: b, selection: u });
1637
+ const s = k(() => je(L), []), O = k(
1346
1638
  () => ({
1347
- ..._r,
1348
- ...s
1639
+ ...Gr,
1640
+ ...d
1349
1641
  }),
1350
- [s]
1642
+ [d]
1351
1643
  );
1352
- return /* @__PURE__ */ F.jsx("div", { style: { width: "100%", height: "100%", opacity: 0 }, ref: O, children: /* @__PURE__ */ F.jsx(
1353
- Oe,
1644
+ return /* @__PURE__ */ A.jsx("div", { style: { width: "100%", height: "100%", opacity: 0 }, ref: E, children: /* @__PURE__ */ A.jsx(
1645
+ fe,
1354
1646
  {
1355
- onChange: (P, p) => {
1356
- N.current = { yaml: P ?? "", revisionId: p.versionId }, a({ ...N.current }, p);
1647
+ onChange: (m, p) => {
1648
+ _.current = { yaml: m ?? "", revisionId: p.versionId }, a({ ..._.current }, p);
1357
1649
  },
1358
1650
  language: "yaml",
1359
- theme: z,
1360
- options: d,
1361
- path: M,
1362
- onMount: E
1651
+ theme: x,
1652
+ options: O,
1653
+ path: s,
1654
+ onMount: j,
1655
+ height: $
1363
1656
  }
1364
1657
  ) });
1365
1658
  };
1366
1659
  export {
1367
- Hr as BlameEditor,
1368
- Br as CodeDiffEditor,
1369
- qr as CodeEditor,
1370
- ve as MonacoGlobals,
1371
- ze as SelectorType,
1372
- Kr as YamlEditor,
1373
- Be as YamlEditorContext,
1374
- Wr as YamlEditorContextProvider,
1375
- We as useYamlEditorContext
1660
+ tn as BlameEditor,
1661
+ rn as BlameEditorV2,
1662
+ on as CodeDiffEditor,
1663
+ nn as CodeEditor,
1664
+ we as MonacoGlobals,
1665
+ Ye as SelectorType,
1666
+ cn as YamlEditor,
1667
+ Je as YamlEditorContext,
1668
+ an as YamlEditorContextProvider,
1669
+ Qe as useYamlEditorContext
1376
1670
  };
1377
1671
  //# sourceMappingURL=index.js.map