@kong-ui-public/monaco-editor 0.8.1-pr.2799.4a7245eab.0 → 0.8.1-pr.2802.7ee435206.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.
Potentially problematic release.
This version of @kong-ui-public/monaco-editor might be problematic. Click here for more details.
- package/dist/runtime/monaco-editor.es.js +236 -155
- package/dist/runtime/monaco-editor.umd.js +1 -1
- package/dist/types/src/composables/useMonacoEditor.d.ts +3 -3
- package/dist/types/src/composables/useMonacoEditor.d.ts.map +1 -1
- package/dist/types/src/singletons/lifecycle.d.ts +19 -25
- package/dist/types/src/singletons/lifecycle.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { toValue as
|
|
2
|
-
import { ProgressIcon as
|
|
3
|
-
import * as
|
|
4
|
-
import { shikiToMonaco as
|
|
5
|
-
import { getSingletonHighlighter as
|
|
6
|
-
import { createI18n as
|
|
7
|
-
const
|
|
1
|
+
import { toValue as C, ref as Q, shallowRef as X, reactive as Y, watch as x, onMounted as Z, onActivated as ee, onBeforeUnmount as te, onWatcherCleanup as oe, defineComponent as z, resolveComponent as ae, createBlock as O, openBlock as E, createSlots as ne, withCtx as D, resolveDynamicComponent as re, mergeModels as R, useModel as se, useTemplateRef as ie, computed as T, createElementBlock as le, normalizeClass as ce, createElementVNode as de, renderSlot as W, createVNode as N, Transition as U, createCommentVNode as B, unref as v } from "vue";
|
|
2
|
+
import { ProgressIcon as ue, CodeblockIcon as ge } from "@kong/icons";
|
|
3
|
+
import * as m from "monaco-editor";
|
|
4
|
+
import { shikiToMonaco as me } from "@shikijs/monaco";
|
|
5
|
+
import { getSingletonHighlighter as fe, bundledLanguages as pe, bundledThemes as he } from "shiki";
|
|
6
|
+
import { createI18n as ve, i18nTComponent as ye } from "@kong-ui-public/i18n";
|
|
7
|
+
const Se = "'JetBrains Mono', Consolas, monospace", be = "12px", Ce = "500", Ee = "20px", Me = Object.freeze({
|
|
8
8
|
autoClosingQuotes: "always",
|
|
9
9
|
automaticLayout: !0,
|
|
10
10
|
// Auto resize layout
|
|
@@ -13,10 +13,10 @@ const de = "'JetBrains Mono', Consolas, monospace", me = "12px", ge = "500", fe
|
|
|
13
13
|
},
|
|
14
14
|
hideCursorInOverviewRuler: !0,
|
|
15
15
|
// hide the cursor position in the minimap TODO: maybe hide it on first line or change it colour
|
|
16
|
-
fontFamily:
|
|
17
|
-
fontSize: Number(
|
|
18
|
-
fontWeight:
|
|
19
|
-
lineHeight: Number(
|
|
16
|
+
fontFamily: Se,
|
|
17
|
+
fontSize: Number(be.replace("px", "")),
|
|
18
|
+
fontWeight: Ce,
|
|
19
|
+
lineHeight: Number(Ee.replace("px", "")),
|
|
20
20
|
formatOnPaste: !0,
|
|
21
21
|
formatOnType: !0,
|
|
22
22
|
// Add to enable automatic formatting as the user types.
|
|
@@ -59,141 +59,222 @@ const de = "'JetBrains Mono', Consolas, monospace", me = "12px", ge = "500", fe
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
62
|
-
const
|
|
62
|
+
const P = () => {
|
|
63
63
|
};
|
|
64
|
-
function
|
|
64
|
+
function we(o, t) {
|
|
65
65
|
function e(...a) {
|
|
66
|
-
return new Promise((
|
|
66
|
+
return new Promise((i, r) => {
|
|
67
67
|
Promise.resolve(o(() => t.apply(this, a), {
|
|
68
68
|
fn: t,
|
|
69
69
|
thisArg: this,
|
|
70
70
|
args: a
|
|
71
|
-
})).then(
|
|
71
|
+
})).then(i).catch(r);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
return e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
let e, a,
|
|
78
|
-
const
|
|
79
|
-
clearTimeout(
|
|
76
|
+
function _e(o, t = {}) {
|
|
77
|
+
let e, a, i = P;
|
|
78
|
+
const r = (s) => {
|
|
79
|
+
clearTimeout(s), i(), i = P;
|
|
80
80
|
};
|
|
81
|
-
let
|
|
82
|
-
return (
|
|
83
|
-
const
|
|
84
|
-
return e &&
|
|
85
|
-
|
|
86
|
-
e &&
|
|
87
|
-
},
|
|
88
|
-
a &&
|
|
89
|
-
},
|
|
81
|
+
let l;
|
|
82
|
+
return (s) => {
|
|
83
|
+
const p = C(o), g = C(t.maxWait);
|
|
84
|
+
return e && r(e), p <= 0 || g !== void 0 && g <= 0 ? (a && (r(a), a = void 0), Promise.resolve(s())) : new Promise((c, h) => {
|
|
85
|
+
i = t.rejectOnCancel ? h : c, l = s, g && !a && (a = setTimeout(() => {
|
|
86
|
+
e && r(e), a = void 0, c(l());
|
|
87
|
+
}, g)), e = setTimeout(() => {
|
|
88
|
+
a && r(a), a = void 0, c(s());
|
|
89
|
+
}, p);
|
|
90
90
|
});
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
// @__NO_SIDE_EFFECTS__
|
|
94
|
-
function
|
|
95
|
-
return
|
|
94
|
+
function Oe(o, t = 200, e = {}) {
|
|
95
|
+
return we(_e(t, e), o);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
const F = "[monaco-editor] [lifecycle]", y = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new WeakMap();
|
|
98
|
+
function ke(o) {
|
|
99
|
+
let t = y.get(o.source);
|
|
100
|
+
if (!t) {
|
|
101
|
+
let e;
|
|
102
|
+
switch (o.type) {
|
|
103
|
+
case "editor":
|
|
104
|
+
e = o.source.onDidDispose(() => $(o.source));
|
|
105
|
+
break;
|
|
106
|
+
case "model":
|
|
107
|
+
e = o.source.onWillDispose(() => $(o.source));
|
|
108
|
+
break;
|
|
109
|
+
default:
|
|
110
|
+
throw new Error(`${F} Unknown scope: ${o}`);
|
|
111
|
+
}
|
|
112
|
+
t = {
|
|
113
|
+
disposables: /* @__PURE__ */ new Set(),
|
|
114
|
+
scopeListener: e
|
|
115
|
+
}, y.set(o.source, t);
|
|
116
|
+
}
|
|
117
|
+
return t;
|
|
118
|
+
}
|
|
119
|
+
function H(o) {
|
|
120
|
+
const t = y.get(o);
|
|
121
|
+
t && (t.scopeListener.dispose(), y.delete(o));
|
|
122
|
+
}
|
|
123
|
+
function A(o, t) {
|
|
124
|
+
ke(t).disposables.add(o);
|
|
125
|
+
}
|
|
126
|
+
function j(o, t) {
|
|
127
|
+
const e = y.get(t.source);
|
|
128
|
+
e && (e.disposables.delete(o), e.disposables.size === 0 && H(t.source));
|
|
129
|
+
}
|
|
130
|
+
function Te(o) {
|
|
131
|
+
const t = [];
|
|
132
|
+
if (o.forEach((e) => {
|
|
133
|
+
try {
|
|
134
|
+
e.dispose();
|
|
135
|
+
} catch (a) {
|
|
136
|
+
t.push(a);
|
|
137
|
+
}
|
|
138
|
+
}), t.length)
|
|
139
|
+
throw new AggregateError(
|
|
140
|
+
t,
|
|
141
|
+
`${F} One or more disposables threw while being disposed.`
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function Ie(o, t) {
|
|
145
|
+
var l, f;
|
|
146
|
+
let e = o, a = S.get(e);
|
|
147
|
+
if (!a) {
|
|
148
|
+
const s = I.get(o);
|
|
149
|
+
s && (e = s, a = S.get(s));
|
|
150
|
+
}
|
|
151
|
+
if (a)
|
|
152
|
+
return ((l = a.scope) == null ? void 0 : l.type) === (t == null ? void 0 : t.type) && ((f = a.scope) == null ? void 0 : f.source) === (t == null ? void 0 : t.source) || (a.scope && j(a.decorated, a.scope), t ? (A(a.decorated, t), a.scope = t) : a.scope = void 0), a.decorated;
|
|
153
|
+
const i = e.dispose, r = {
|
|
154
|
+
dispose: () => {
|
|
155
|
+
const s = S.get(e);
|
|
156
|
+
if (s)
|
|
157
|
+
return s.scope && j(r, s.scope), S.delete(e), I.delete(r), i.call(e);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return S.set(e, { decorated: r, scope: t }), I.set(r, e), t && A(r, t), r;
|
|
161
|
+
}
|
|
162
|
+
function V(o, t) {
|
|
163
|
+
return Ie(t, { type: "editor", source: o });
|
|
164
|
+
}
|
|
165
|
+
function $(o) {
|
|
166
|
+
const t = y.get(o);
|
|
167
|
+
if (!t) return;
|
|
168
|
+
const e = Array.from(t.disposables);
|
|
169
|
+
try {
|
|
170
|
+
Te(e);
|
|
171
|
+
} catch (a) {
|
|
172
|
+
console.warn(`${F} Encountered errors while disposing scoped disposables:`, a, ", Source:", o);
|
|
173
|
+
}
|
|
174
|
+
H(o);
|
|
101
175
|
}
|
|
102
|
-
const
|
|
103
|
-
let
|
|
104
|
-
async function
|
|
105
|
-
return
|
|
176
|
+
const G = Q(!1);
|
|
177
|
+
let b = null;
|
|
178
|
+
async function xe() {
|
|
179
|
+
return b || (b = (async () => {
|
|
106
180
|
var o, t;
|
|
107
181
|
try {
|
|
108
|
-
const e = ((o =
|
|
182
|
+
const e = ((o = m.json) == null ? void 0 : o.jsonDefaults) || ((t = m.languages.json) == null ? void 0 : t.jsonDefaults);
|
|
109
183
|
e == null || e.setModeConfiguration({ tokens: !1 });
|
|
110
|
-
const a = await
|
|
184
|
+
const a = await fe(
|
|
111
185
|
{
|
|
112
|
-
themes: Object.values(
|
|
113
|
-
langs: Object.values(
|
|
186
|
+
themes: Object.values(he),
|
|
187
|
+
langs: Object.values(pe)
|
|
114
188
|
}
|
|
115
189
|
);
|
|
116
|
-
a.getLoadedLanguages().forEach((
|
|
117
|
-
|
|
118
|
-
}),
|
|
190
|
+
a.getLoadedLanguages().forEach((i) => {
|
|
191
|
+
m.languages.register({ id: i });
|
|
192
|
+
}), me(a, m), G.value = !0;
|
|
119
193
|
} catch (e) {
|
|
120
|
-
throw
|
|
194
|
+
throw b = null, e;
|
|
121
195
|
}
|
|
122
|
-
})(),
|
|
196
|
+
})(), b);
|
|
123
197
|
}
|
|
124
|
-
function
|
|
125
|
-
const e =
|
|
126
|
-
let a,
|
|
127
|
-
const
|
|
198
|
+
function De(o, t) {
|
|
199
|
+
const e = X();
|
|
200
|
+
let a, i = !1, r = !1;
|
|
201
|
+
const l = Y({
|
|
128
202
|
editorStatus: "loading",
|
|
129
203
|
searchBoxIsRevealed: !1,
|
|
130
204
|
hasContent: !1,
|
|
131
205
|
theme: t.theme || "light"
|
|
132
|
-
}),
|
|
133
|
-
!
|
|
134
|
-
},
|
|
135
|
-
var
|
|
136
|
-
return (
|
|
137
|
-
},
|
|
206
|
+
}), f = (n) => {
|
|
207
|
+
!i || !e.value || e.value.setValue(n);
|
|
208
|
+
}, s = (n) => {
|
|
209
|
+
var d;
|
|
210
|
+
return (d = e.value) == null ? void 0 : d.updateOptions({ readOnly: n });
|
|
211
|
+
}, p = () => {
|
|
138
212
|
var n;
|
|
139
213
|
return (n = e.value) == null ? void 0 : n.focus();
|
|
140
|
-
},
|
|
141
|
-
var
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
},
|
|
214
|
+
}, g = (n) => {
|
|
215
|
+
var w;
|
|
216
|
+
const d = (w = e.value) == null ? void 0 : w.getModel();
|
|
217
|
+
d && m.editor.setModelLanguage(d, n);
|
|
218
|
+
}, c = (n) => {
|
|
145
219
|
try {
|
|
146
220
|
if (!e.value || !n) return;
|
|
147
221
|
e.value.focus(), e.value.trigger("keyboard", n, null);
|
|
148
|
-
} catch (
|
|
149
|
-
console.error(`useMonacoEditor: Failed to trigger command: ${n}`,
|
|
222
|
+
} catch (d) {
|
|
223
|
+
console.error(`useMonacoEditor: Failed to trigger command: ${n}`, d);
|
|
150
224
|
}
|
|
151
|
-
},
|
|
225
|
+
}, h = () => {
|
|
152
226
|
var n;
|
|
153
227
|
try {
|
|
154
228
|
if (!e.value) return;
|
|
155
|
-
if (
|
|
229
|
+
if (l.searchBoxIsRevealed)
|
|
156
230
|
return (n = e.value.getContribution("editor.contrib.findController")) == null ? void 0 : n.closeFindWidget();
|
|
157
|
-
|
|
158
|
-
} catch (
|
|
159
|
-
console.error("useMonacoEditor: Failed to close findController.",
|
|
231
|
+
c("actions.find");
|
|
232
|
+
} catch (d) {
|
|
233
|
+
console.error("useMonacoEditor: Failed to close findController.", d);
|
|
160
234
|
}
|
|
161
|
-
},
|
|
235
|
+
}, M = /* @__PURE__ */ Oe(() => m.editor.remeasureFonts(), 200);
|
|
162
236
|
return (() => {
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
const
|
|
166
|
-
if (!(
|
|
167
|
-
|
|
237
|
+
xe(), x([G, () => C(o)], ([n, d], [, w]) => {
|
|
238
|
+
var L;
|
|
239
|
+
const k = C(d), J = C(w);
|
|
240
|
+
if (!(k instanceof HTMLElement) || !n) {
|
|
241
|
+
i = !1;
|
|
168
242
|
return;
|
|
169
243
|
}
|
|
170
|
-
if (!(
|
|
244
|
+
if (!(i && J === k)) {
|
|
171
245
|
if (!a) {
|
|
172
|
-
const u =
|
|
173
|
-
a =
|
|
246
|
+
const u = m.Uri.parse(`inmemory://model/${t.language}-${crypto.randomUUID()}`);
|
|
247
|
+
a = m.editor.createModel(t.code.value, t.language, u);
|
|
174
248
|
}
|
|
175
|
-
e.value =
|
|
176
|
-
...
|
|
249
|
+
e.value = m.editor.create(k, {
|
|
250
|
+
...Me,
|
|
177
251
|
readOnly: t.readOnly || !1,
|
|
178
252
|
language: t.language,
|
|
179
|
-
theme:
|
|
253
|
+
theme: l.theme === "light" ? "catppuccin-latte" : "catppuccin-mocha",
|
|
180
254
|
model: a,
|
|
181
255
|
editContext: !1,
|
|
182
256
|
...t.monacoOptions
|
|
183
|
-
}),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
257
|
+
}), i = !0, l.editorStatus = "ready", l.hasContent = !!t.code.value, V(
|
|
258
|
+
e.value,
|
|
259
|
+
e.value.onDidChangeModelContent(() => {
|
|
260
|
+
if (r) return;
|
|
261
|
+
const u = e.value.getValue();
|
|
262
|
+
l.hasContent = !!u.length, t.code.value = u;
|
|
263
|
+
})
|
|
264
|
+
), (L = t.onReady) == null || L.call(t, e.value), M();
|
|
188
265
|
try {
|
|
189
266
|
const u = e.value.getContribution("editor.contrib.findController"), _ = u == null ? void 0 : u.getState();
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
267
|
+
V(
|
|
268
|
+
e.value,
|
|
269
|
+
_ == null ? void 0 : _.onFindReplaceStateChange(() => {
|
|
270
|
+
l.searchBoxIsRevealed = _.isRevealed;
|
|
271
|
+
})
|
|
272
|
+
// This returns a disposable
|
|
273
|
+
);
|
|
193
274
|
} catch (u) {
|
|
194
275
|
console.error("useMonacoEditor: Failed to get the state of findController", u);
|
|
195
276
|
}
|
|
196
|
-
|
|
277
|
+
oe(() => {
|
|
197
278
|
var u;
|
|
198
279
|
(u = e.value) == null || u.dispose();
|
|
199
280
|
});
|
|
@@ -202,50 +283,50 @@ function Se(o, t) {
|
|
|
202
283
|
immediate: !0,
|
|
203
284
|
flush: "post"
|
|
204
285
|
});
|
|
205
|
-
})(),
|
|
206
|
-
if (!e.value || !a || !
|
|
207
|
-
const
|
|
208
|
-
n !==
|
|
286
|
+
})(), x(t.code, (n) => {
|
|
287
|
+
if (!e.value || !a || !i) return;
|
|
288
|
+
const d = a.getValue();
|
|
289
|
+
n !== d && (r = !0, e.value.executeEdits("external", [
|
|
209
290
|
{
|
|
210
291
|
range: a.getFullModelRange(),
|
|
211
292
|
text: n
|
|
212
293
|
}
|
|
213
|
-
]), e.value.pushUndoStop(),
|
|
214
|
-
}),
|
|
294
|
+
]), e.value.pushUndoStop(), l.hasContent = !!n.length, r = !1);
|
|
295
|
+
}), Z(M), ee(M), te(() => {
|
|
215
296
|
if (!e.value) return;
|
|
216
297
|
const n = e.value.getModel();
|
|
217
298
|
e.value.dispose(), n && n.dispose();
|
|
218
299
|
}), {
|
|
219
300
|
editor: e,
|
|
220
|
-
editorStates:
|
|
221
|
-
setContent:
|
|
222
|
-
setReadOnly:
|
|
223
|
-
focus:
|
|
224
|
-
setLanguage:
|
|
225
|
-
remeasureFonts:
|
|
226
|
-
toggleSearchWidget:
|
|
227
|
-
triggerKeyboardCommand:
|
|
301
|
+
editorStates: l,
|
|
302
|
+
setContent: f,
|
|
303
|
+
setReadOnly: s,
|
|
304
|
+
focus: p,
|
|
305
|
+
setLanguage: g,
|
|
306
|
+
remeasureFonts: M,
|
|
307
|
+
toggleSearchWidget: h,
|
|
308
|
+
triggerKeyboardCommand: c
|
|
228
309
|
};
|
|
229
310
|
}
|
|
230
|
-
const
|
|
311
|
+
const Fe = {
|
|
231
312
|
messages: {
|
|
232
313
|
empty_message: "The editor is currently empty. Start typing to add content.",
|
|
233
314
|
empty_title: "No content available",
|
|
234
315
|
loading_message: "Please wait while the {type} content is loaded.",
|
|
235
316
|
loading_title: "{type} editor"
|
|
236
317
|
}
|
|
237
|
-
},
|
|
238
|
-
editor:
|
|
318
|
+
}, Le = {
|
|
319
|
+
editor: Fe
|
|
239
320
|
};
|
|
240
|
-
function
|
|
241
|
-
const o =
|
|
321
|
+
function Re() {
|
|
322
|
+
const o = ve("en-us", Le);
|
|
242
323
|
return {
|
|
243
324
|
i18n: o,
|
|
244
|
-
i18nT:
|
|
325
|
+
i18nT: ye(o)
|
|
245
326
|
// Translation component <i18n-t>
|
|
246
327
|
};
|
|
247
328
|
}
|
|
248
|
-
const
|
|
329
|
+
const We = /* @__PURE__ */ z({
|
|
249
330
|
__name: "MonacoEditorStatusOverlay",
|
|
250
331
|
props: {
|
|
251
332
|
title: {},
|
|
@@ -254,30 +335,30 @@ const Me = /* @__PURE__ */ D({
|
|
|
254
335
|
},
|
|
255
336
|
setup(o) {
|
|
256
337
|
return (t, e) => {
|
|
257
|
-
const a =
|
|
258
|
-
return
|
|
338
|
+
const a = ae("KEmptyState");
|
|
339
|
+
return E(), O(a, {
|
|
259
340
|
class: "monaco-editor-status-overlay",
|
|
260
341
|
message: o.message,
|
|
261
342
|
title: o.title
|
|
262
|
-
},
|
|
343
|
+
}, ne({ _: 2 }, [
|
|
263
344
|
o.icon ? {
|
|
264
345
|
name: "icon",
|
|
265
|
-
fn:
|
|
266
|
-
(
|
|
346
|
+
fn: D(() => [
|
|
347
|
+
(E(), O(re(o.icon), { decorative: "" }))
|
|
267
348
|
]),
|
|
268
349
|
key: "0"
|
|
269
350
|
} : void 0
|
|
270
351
|
]), 1032, ["message", "title"]);
|
|
271
352
|
};
|
|
272
353
|
}
|
|
273
|
-
}),
|
|
354
|
+
}), q = (o, t) => {
|
|
274
355
|
const e = o.__vccOpts || o;
|
|
275
|
-
for (const [a,
|
|
276
|
-
e[a] =
|
|
356
|
+
for (const [a, i] of t)
|
|
357
|
+
e[a] = i;
|
|
277
358
|
return e;
|
|
278
|
-
},
|
|
359
|
+
}, K = /* @__PURE__ */ q(We, [["__scopeId", "data-v-062eadb5"]]), Ne = /* @__PURE__ */ z({
|
|
279
360
|
__name: "MonacoEditor",
|
|
280
|
-
props: /* @__PURE__ */
|
|
361
|
+
props: /* @__PURE__ */ R({
|
|
281
362
|
theme: { default: "light" },
|
|
282
363
|
language: { default: "markdown" },
|
|
283
364
|
loading: { type: Boolean, default: !1 },
|
|
@@ -290,66 +371,66 @@ const Me = /* @__PURE__ */ D({
|
|
|
290
371
|
},
|
|
291
372
|
modelModifiers: {}
|
|
292
373
|
}),
|
|
293
|
-
emits: /* @__PURE__ */
|
|
374
|
+
emits: /* @__PURE__ */ R(["ready"], ["update:modelValue"]),
|
|
294
375
|
setup(o, { expose: t, emit: e }) {
|
|
295
|
-
const a = e,
|
|
376
|
+
const a = e, i = se(o, "modelValue"), { i18n: r } = Re(), l = ie("editorRef"), f = T(() => o.theme === "dark" ? "dark" : "light"), s = T(() => g.editorStates.editorStatus === "loading" || o.loading), p = T(() => g.editorStates.editorStatus === "ready" && !g.editorStates.hasContent), g = De(l, {
|
|
296
377
|
language: o.language,
|
|
297
|
-
code:
|
|
298
|
-
theme:
|
|
378
|
+
code: i,
|
|
379
|
+
theme: f.value,
|
|
299
380
|
monacoOptions: o.options,
|
|
300
|
-
onReady: (
|
|
301
|
-
a("ready",
|
|
381
|
+
onReady: (c) => {
|
|
382
|
+
a("ready", c);
|
|
302
383
|
}
|
|
303
384
|
});
|
|
304
385
|
return t({
|
|
305
|
-
monacoEditor:
|
|
306
|
-
}),
|
|
307
|
-
|
|
308
|
-
}), (
|
|
309
|
-
class:
|
|
310
|
-
|
|
311
|
-
{ loading:
|
|
386
|
+
monacoEditor: g
|
|
387
|
+
}), x(() => o.language, (c, h) => {
|
|
388
|
+
c !== h && g.setLanguage(c);
|
|
389
|
+
}), (c, h) => (E(), le("div", {
|
|
390
|
+
class: ce(["monaco-editor-container", [
|
|
391
|
+
f.value,
|
|
392
|
+
{ loading: s.value }
|
|
312
393
|
]]),
|
|
313
394
|
"data-testid": "monaco-editor-container"
|
|
314
395
|
}, [
|
|
315
|
-
|
|
396
|
+
de("div", {
|
|
316
397
|
ref_key: "editorRef",
|
|
317
|
-
ref:
|
|
398
|
+
ref: l,
|
|
318
399
|
class: "monaco-editor-target",
|
|
319
400
|
"data-testid": "monaco-editor-target"
|
|
320
401
|
}, null, 512),
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
default:
|
|
324
|
-
|
|
402
|
+
W(c.$slots, "state-loading", { isLoading: s.value }, () => [
|
|
403
|
+
N(U, { name: "fade" }, {
|
|
404
|
+
default: D(() => [
|
|
405
|
+
s.value ? (E(), O(K, {
|
|
325
406
|
key: 0,
|
|
326
407
|
"data-testid": "monaco-editor-status-overlay-loading",
|
|
327
|
-
icon:
|
|
328
|
-
message:
|
|
329
|
-
title:
|
|
330
|
-
}, null, 8, ["icon", "message", "title"])) :
|
|
408
|
+
icon: v(ue),
|
|
409
|
+
message: v(r).t("editor.messages.loading_message", { type: o.language }),
|
|
410
|
+
title: v(r).t("editor.messages.loading_title", { type: o.language })
|
|
411
|
+
}, null, 8, ["icon", "message", "title"])) : B("", !0)
|
|
331
412
|
]),
|
|
332
413
|
_: 1
|
|
333
414
|
})
|
|
334
415
|
], !0),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
default:
|
|
338
|
-
|
|
416
|
+
W(c.$slots, "state-empty", { isEmpty: p.value }, () => [
|
|
417
|
+
N(U, { name: "fade" }, {
|
|
418
|
+
default: D(() => [
|
|
419
|
+
p.value && !s.value ? (E(), O(K, {
|
|
339
420
|
key: 0,
|
|
340
421
|
"data-testid": "monaco-editor-status-overlay-empty",
|
|
341
|
-
icon:
|
|
342
|
-
message:
|
|
343
|
-
title:
|
|
344
|
-
}, null, 8, ["icon", "message", "title"])) :
|
|
422
|
+
icon: v(ge),
|
|
423
|
+
message: v(r).t("editor.messages.empty_message"),
|
|
424
|
+
title: v(r).t("editor.messages.empty_title")
|
|
425
|
+
}, null, 8, ["icon", "message", "title"])) : B("", !0)
|
|
345
426
|
]),
|
|
346
427
|
_: 1
|
|
347
428
|
})
|
|
348
429
|
], !0)
|
|
349
430
|
], 2));
|
|
350
431
|
}
|
|
351
|
-
}),
|
|
432
|
+
}), $e = /* @__PURE__ */ q(Ne, [["__scopeId", "data-v-e2083635"]]);
|
|
352
433
|
export {
|
|
353
|
-
|
|
354
|
-
|
|
434
|
+
$e as MonacoEditor,
|
|
435
|
+
De as useMonacoEditor
|
|
355
436
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(u,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@kong/icons"),require("monaco-editor"),require("@shikijs/monaco"),require("shiki"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","monaco-editor","@shikijs/monaco","shiki","@kong-ui-public/i18n"],n):(u=typeof globalThis<"u"?globalThis:u||self,n(u["kong-ui-public-monaco-editor"]={},u.Vue,u.KongIcons,u.monaco,u.monaco$1,u.shiki,u["kong-ui-public-i18n"]))})(this,function(u,n,D,K,A,O,x){"use strict";function $(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const p=$(K),H=Object.freeze({autoClosingQuotes:"always",automaticLayout:!0,bracketPairColorization:{enabled:!0},hideCursorInOverviewRuler:!0,fontFamily:"'JetBrains Mono', Consolas, monospace",fontSize:Number("12px".replace("px","")),fontWeight:"500",lineHeight:Number("20px".replace("px","")),formatOnPaste:!0,formatOnType:!0,lineNumbersMinChars:3,minimap:{enabled:!1},stickyScroll:{enabled:!0},suggest:{showWords:!1},quickSuggestions:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:"off",overviewRulerLanes:0,renderWhitespace:"boundary",scrollBeyondLastLine:!1,roundedSelection:!1,wordWrapColumn:120,colorDecorators:!0,folding:!0,fixedOverflowWidgets:!0,tabSize:2,detectIndentation:!1,insertSpaces:!0,trimAutoWhitespace:!0,wordWrap:"bounded",find:{addExtraSpaceOnTop:!1}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const F=()=>{};function q(o,t){function e(...a){return new Promise((l,i)=>{Promise.resolve(o(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(l).catch(i)})}return e}function z(o,t={}){let e,a,l=F;const i=s=>{clearTimeout(s),l(),l=F};let c;return s=>{const y=n.toValue(o),m=n.toValue(t.maxWait);return e&&i(e),y<=0||m!==void 0&&m<=0?(a&&(i(a),a=void 0),Promise.resolve(s())):new Promise((d,S)=>{l=t.rejectOnCancel?S:d,c=s,m&&!a&&(a=setTimeout(()=>{e&&i(e),a=void 0,d(c())},m)),e=setTimeout(()=>{a&&i(a),a=void 0,d(s())},y)})}}function G(o,t=200,e={}){return q(z(t,e),o)}const I="[monaco-editor] [lifecycle]",b=new WeakMap,_=new Map,T=new WeakMap;function Y(o){let t=b.get(o.source);if(!t){let e;switch(o.type){case"editor":e=o.source.onDidDispose(()=>B(o.source));break;case"model":e=o.source.onWillDispose(()=>B(o.source));break;default:throw new Error(`${I} Unknown scope: ${o}`)}t={disposables:new Set,scopeListener:e},b.set(o.source,t)}return t}function v(o){const t=b.get(o);t&&(t.scopeListener.dispose(),b.delete(o))}function L(o,t){Y(t).disposables.add(o)}function N(o,t){const e=b.get(t.source);e&&(e.disposables.delete(o),e.disposables.size===0&&v(t.source))}function Z(o){const t=[];if(o.forEach(e=>{try{e.dispose()}catch(a){t.push(a)}}),t.length)throw new AggregateError(t,`${I} One or more disposables threw while being disposed.`)}function J(o,t){var c,h;let e=o,a=_.get(e);if(!a){const s=T.get(o);s&&(e=s,a=_.get(s))}if(a)return((c=a.scope)==null?void 0:c.type)===(t==null?void 0:t.type)&&((h=a.scope)==null?void 0:h.source)===(t==null?void 0:t.source)||(a.scope&&N(a.decorated,a.scope),t?(L(a.decorated,t),a.scope=t):a.scope=void 0),a.decorated;const l=e.dispose,i={dispose:()=>{const s=_.get(e);if(s)return s.scope&&N(i,s.scope),_.delete(e),T.delete(i),l.call(e)}};return _.set(e,{decorated:i,scope:t}),T.set(i,e),t&&L(i,t),i}function W(o,t){return J(t,{type:"editor",source:o})}function B(o){const t=b.get(o);if(!t)return;const e=Array.from(t.disposables);try{Z(e)}catch(a){console.warn(`${I} Encountered errors while disposing scoped disposables:`,a,", Source:",o)}v(o)}const R=n.ref(!1);let k=null;async function Q(){return k||(k=(async()=>{var o,t;try{const e=((o=p.json)==null?void 0:o.jsonDefaults)||((t=p.languages.json)==null?void 0:t.jsonDefaults);e==null||e.setModeConfiguration({tokens:!1});const a=await O.getSingletonHighlighter({themes:Object.values(O.bundledThemes),langs:Object.values(O.bundledLanguages)});a.getLoadedLanguages().forEach(l=>{p.languages.register({id:l})}),A.shikiToMonaco(a,p),R.value=!0}catch(e){throw k=null,e}})(),k)}function U(o,t){const e=n.shallowRef();let a,l=!1,i=!1;const c=n.reactive({editorStatus:"loading",searchBoxIsRevealed:!1,hasContent:!1,theme:t.theme||"light"}),h=r=>{!l||!e.value||e.value.setValue(r)},s=r=>{var g;return(g=e.value)==null?void 0:g.updateOptions({readOnly:r})},y=()=>{var r;return(r=e.value)==null?void 0:r.focus()},m=r=>{var M;const g=(M=e.value)==null?void 0:M.getModel();g&&p.editor.setModelLanguage(g,r)},d=r=>{try{if(!e.value||!r)return;e.value.focus(),e.value.trigger("keyboard",r,null)}catch(g){console.error(`useMonacoEditor: Failed to trigger command: ${r}`,g)}},S=()=>{var r;try{if(!e.value)return;if(c.searchBoxIsRevealed)return(r=e.value.getContribution("editor.contrib.findController"))==null?void 0:r.closeFindWidget();d("actions.find")}catch(g){console.error("useMonacoEditor: Failed to close findController.",g)}},E=G(()=>p.editor.remeasureFonts(),200);return(()=>{Q(),n.watch([R,()=>n.toValue(o)],([r,g],[,M])=>{var P;const w=n.toValue(g),ne=n.toValue(M);if(!(w instanceof HTMLElement)||!r){l=!1;return}if(!(l&&ne===w)){if(!a){const f=p.Uri.parse(`inmemory://model/${t.language}-${crypto.randomUUID()}`);a=p.editor.createModel(t.code.value,t.language,f)}e.value=p.editor.create(w,{...H,readOnly:t.readOnly||!1,language:t.language,theme:c.theme==="light"?"catppuccin-latte":"catppuccin-mocha",model:a,editContext:!1,...t.monacoOptions}),l=!0,c.editorStatus="ready",c.hasContent=!!t.code.value,W(e.value,e.value.onDidChangeModelContent(()=>{if(i)return;const f=e.value.getValue();c.hasContent=!!f.length,t.code.value=f})),(P=t.onReady)==null||P.call(t,e.value),E();try{const f=e.value.getContribution("editor.contrib.findController"),C=f==null?void 0:f.getState();W(e.value,C==null?void 0:C.onFindReplaceStateChange(()=>{c.searchBoxIsRevealed=C.isRevealed}))}catch(f){console.error("useMonacoEditor: Failed to get the state of findController",f)}n.onWatcherCleanup(()=>{var f;(f=e.value)==null||f.dispose()})}},{immediate:!0,flush:"post"})})(),n.watch(t.code,r=>{if(!e.value||!a||!l)return;const g=a.getValue();r!==g&&(i=!0,e.value.executeEdits("external",[{range:a.getFullModelRange(),text:r}]),e.value.pushUndoStop(),c.hasContent=!!r.length,i=!1)}),n.onMounted(E),n.onActivated(E),n.onBeforeUnmount(()=>{if(!e.value)return;const r=e.value.getModel();e.value.dispose(),r&&r.dispose()}),{editor:e,editorStates:c,setContent:h,setReadOnly:s,focus:y,setLanguage:m,remeasureFonts:E,toggleSearchWidget:S,triggerKeyboardCommand:d}}const X={editor:{messages:{empty_message:"The editor is currently empty. Start typing to add content.",empty_title:"No content available",loading_message:"Please wait while the {type} content is loaded.",loading_title:"{type} editor"}}};function ee(){const o=x.createI18n("en-us",X);return{i18n:o,i18nT:x.i18nTComponent(o)}}const te=n.defineComponent({__name:"MonacoEditorStatusOverlay",props:{title:{},message:{},icon:{}},setup(o){return(t,e)=>{const a=n.resolveComponent("KEmptyState");return n.openBlock(),n.createBlock(a,{class:"monaco-editor-status-overlay",message:o.message,title:o.title},n.createSlots({_:2},[o.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(o.icon),{decorative:""}))]),key:"0"}:void 0]),1032,["message","title"])}}}),j=(o,t)=>{const e=o.__vccOpts||o;for(const[a,l]of t)e[a]=l;return e},V=j(te,[["__scopeId","data-v-062eadb5"]]),oe=j(n.defineComponent({__name:"MonacoEditor",props:n.mergeModels({theme:{default:"light"},language:{default:"markdown"},loading:{type:Boolean,default:!1},options:{default:()=>{}}},{modelValue:{type:String,required:!0},modelModifiers:{}}),emits:n.mergeModels(["ready"],["update:modelValue"]),setup(o,{expose:t,emit:e}){const a=e,l=n.useModel(o,"modelValue"),{i18n:i}=ee(),c=n.useTemplateRef("editorRef"),h=n.computed(()=>o.theme==="dark"?"dark":"light"),s=n.computed(()=>m.editorStates.editorStatus==="loading"||o.loading),y=n.computed(()=>m.editorStates.editorStatus==="ready"&&!m.editorStates.hasContent),m=U(c,{language:o.language,code:l,theme:h.value,monacoOptions:o.options,onReady:d=>{a("ready",d)}});return t({monacoEditor:m}),n.watch(()=>o.language,(d,S)=>{d!==S&&m.setLanguage(d)}),(d,S)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["monaco-editor-container",[h.value,{loading:s.value}]]),"data-testid":"monaco-editor-container"},[n.createElementVNode("div",{ref_key:"editorRef",ref:c,class:"monaco-editor-target","data-testid":"monaco-editor-target"},null,512),n.renderSlot(d.$slots,"state-loading",{isLoading:s.value},()=>[n.createVNode(n.Transition,{name:"fade"},{default:n.withCtx(()=>[s.value?(n.openBlock(),n.createBlock(V,{key:0,"data-testid":"monaco-editor-status-overlay-loading",icon:n.unref(D.ProgressIcon),message:n.unref(i).t("editor.messages.loading_message",{type:o.language}),title:n.unref(i).t("editor.messages.loading_title",{type:o.language})},null,8,["icon","message","title"])):n.createCommentVNode("",!0)]),_:1})],!0),n.renderSlot(d.$slots,"state-empty",{isEmpty:y.value},()=>[n.createVNode(n.Transition,{name:"fade"},{default:n.withCtx(()=>[y.value&&!s.value?(n.openBlock(),n.createBlock(V,{key:0,"data-testid":"monaco-editor-status-overlay-empty",icon:n.unref(D.CodeblockIcon),message:n.unref(i).t("editor.messages.empty_message"),title:n.unref(i).t("editor.messages.empty_title")},null,8,["icon","message","title"])):n.createCommentVNode("",!0)]),_:1})],!0)],2))}}),[["__scopeId","data-v-e2083635"]]);u.MonacoEditor=oe,u.useMonacoEditor=U,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as monaco from 'monaco-editor';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import type { UseMonacoEditorOptions } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Composable for integrating the Monaco Editor into Vue components.
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {MaybeRefOrGetter<HTMLElement | null>} target - The target DOM element/ref/getter where the editor will be mounted.
|
|
7
7
|
* @param {UseMonacoEditorOptions} options - Configuration options for the Monaco editor.
|
|
8
8
|
* @returns {object} An object containing the editor instance and utility methods.
|
|
9
9
|
*/
|
|
10
|
-
export declare function useMonacoEditor<T extends
|
|
10
|
+
export declare function useMonacoEditor<T extends HTMLElement>(target: MaybeRefOrGetter<T | null>, options: UseMonacoEditorOptions): {
|
|
11
11
|
editor: import("vue").ShallowRef<monaco.editor.IStandaloneCodeEditor | undefined, monaco.editor.IStandaloneCodeEditor | undefined>;
|
|
12
12
|
editorStates: {
|
|
13
13
|
editorStatus: import("..").EditorStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMonacoEditor.d.ts","sourceRoot":"","sources":["../../../../src/composables/useMonacoEditor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"useMonacoEditor.d.ts","sourceRoot":"","sources":["../../../../src/composables/useMonacoEditor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAsB,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAyC1E;;;;;EAKE;AACF,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,MAAM,EAAE,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,EAClC,OAAO,EAAE,sBAAsB;;;;;;;;0BA2BF,MAAM,KAAG,IAAI;4BAOX,OAAO,KAAG,IAAI;iBAG3B,IAAI;4BAES,MAAM,KAAG,IAAI;;8BAuBb,IAAI;iCAXC,MAAM,KAAG,IAAI;EA4KlD"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lifecycle tracker for {@link IDisposable disposables} in Monaco Editor.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* practice to dispose when a resource is no longer needed.
|
|
4
|
+
* In Monaco Editor, when attaching listeners in the global scope (e.g.,
|
|
5
|
+
* {@link Editor.onDidCreateModel onDidCreateModel}) or in the per-resource scope
|
|
6
|
+
* (e.g.,{@link Editor.ITextModel.onDidChangeContent onDidChangeContent}), an
|
|
7
|
+
* {@link IDisposable disposable} is always returned to allow detaching the listener.
|
|
9
8
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* > Editors should be disposed to free up resources and remove their model listeners.
|
|
14
|
-
* > (from https://github.com/microsoft/monaco-editor/blob/de983bf5d7efbd36622f44bc0e44097a0531a58c/README.md#disposables)
|
|
9
|
+
* However, per-resource-scoped disposables are not automatically disposed when
|
|
10
|
+
* the resource is disposed. This can lead to memory leaks if the disposables are
|
|
11
|
+
* not properly tracked and disposed.
|
|
15
12
|
*
|
|
16
|
-
* This tracker is designed to be a singleton to track disposables in
|
|
13
|
+
* This tracker is designed to be a singleton to track disposables in all the scopes
|
|
14
|
+
* mentioned above.
|
|
17
15
|
*/
|
|
18
|
-
import type
|
|
16
|
+
import { type editor as Editor, type IDisposable } from 'monaco-editor';
|
|
19
17
|
/**
|
|
20
18
|
* A type friendly representation of a scope.
|
|
21
19
|
*/
|
|
@@ -33,8 +31,8 @@ type ScopeSource = Editor.ICodeEditor | Editor.ITextModel;
|
|
|
33
31
|
/**
|
|
34
32
|
* Track a disposable in an optional scope.
|
|
35
33
|
*
|
|
36
|
-
* **
|
|
37
|
-
*
|
|
34
|
+
* **WARNING**: Should not call {@link IDisposable.dispose dispose} on the
|
|
35
|
+
* disposable being passed in. Otherwise, the tracking will be broken.
|
|
38
36
|
*
|
|
39
37
|
* @param disposable - The disposable to track. When passing a decorated disposable,
|
|
40
38
|
* the **SAME** decorated disposable will be **UPDATED** (if scope changes)
|
|
@@ -44,42 +42,38 @@ type ScopeSource = Editor.ICodeEditor | Editor.ITextModel;
|
|
|
44
42
|
*
|
|
45
43
|
* @returns A decorated disposable to dispose the disposable and untrack it.
|
|
46
44
|
*/
|
|
47
|
-
export declare function
|
|
45
|
+
export declare function track(disposable: IDisposable, scope?: Scope): IDisposable;
|
|
48
46
|
/**
|
|
49
47
|
* Track a disposable for an {@link Editor.ICodeEditor editor}.
|
|
50
48
|
*
|
|
51
49
|
* The tracker uses {@link Editor.ICodeEditor.onDidDispose onDidDispose} to dispose
|
|
52
|
-
* the tracked disposable
|
|
50
|
+
* the tracked disposable.
|
|
53
51
|
*
|
|
54
52
|
* @param editor - The editor to track
|
|
55
53
|
* @param disposable - The disposable to track
|
|
56
54
|
* @returns A decorated disposable to dispose the disposable and untrack it.
|
|
57
55
|
*/
|
|
58
|
-
export declare function
|
|
56
|
+
export declare function trackForEditor(editor: Editor.ICodeEditor, disposable: IDisposable): IDisposable;
|
|
59
57
|
/**
|
|
60
58
|
* Track a disposable for a {@link Editor.ITextModel text model}.
|
|
61
59
|
*
|
|
62
60
|
* The tracker uses {@link Editor.ITextModel.onWillDispose onWillDispose} to dispose
|
|
63
|
-
* the tracked disposable
|
|
61
|
+
* the tracked disposable.
|
|
64
62
|
*
|
|
65
63
|
* @param model - The text model to track
|
|
66
64
|
* @param disposable - The disposable to track
|
|
67
65
|
* @returns A decorated disposable to dispose the disposable and untrack it.
|
|
68
66
|
*/
|
|
69
|
-
export declare function
|
|
67
|
+
export declare function trackForModel(model: Editor.ITextModel, disposable: IDisposable): IDisposable;
|
|
70
68
|
/**
|
|
71
69
|
* Dispose all tracked disposables in a scope.
|
|
72
70
|
*
|
|
73
71
|
* @param source - The scope source whose tracked disposables to dispose.
|
|
74
72
|
*/
|
|
75
|
-
export declare function
|
|
76
|
-
/**
|
|
77
|
-
* Dispose all globally tracked disposables.
|
|
78
|
-
*/
|
|
79
|
-
export declare function disposeGlobalDisposables(): void;
|
|
73
|
+
export declare function disposeScoped(source: ScopeSource): void;
|
|
80
74
|
/**
|
|
81
75
|
* Dispose all tracked disposables.
|
|
82
76
|
*/
|
|
83
|
-
export declare function
|
|
77
|
+
export declare function disposeAll(): void;
|
|
84
78
|
export {};
|
|
85
79
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/singletons/lifecycle.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/singletons/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAIvE;;GAEG;AACH,KAAK,KAAK,GACN;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,CAAA;AAEhD;;GAEG;AACH,KAAK,WAAW,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAA;AAsHzD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,WAAW,CA0DzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,GAAG,WAAW,CAE/F;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,GAAG,WAAW,CAE5F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAWvD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAQjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/monaco-editor",
|
|
3
|
-
"version": "0.8.1-pr.
|
|
3
|
+
"version": "0.8.1-pr.2802.7ee435206.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A kong UI Monaco Editor wrapper for Vue 3 with syntax highlighting powered by Shiki.",
|
|
6
6
|
"main": "./dist/runtime/monaco-editor.umd.js",
|