@m3ui-vue/m3ui-vue 0.1.0 → 0.1.2
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/README.md +80 -23
- package/dist/MIcon-CaEooCmZ.js +20 -0
- package/dist/MIcon-CaEooCmZ.js.map +1 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +141 -0
- package/dist/chart.js.map +1 -0
- package/dist/code-editor.d.ts +2 -0
- package/dist/code-editor.js +379 -0
- package/dist/code-editor.js.map +1 -0
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MCalendar.vue.d.ts +1 -1
- package/dist/components/MChart.vue.d.ts +2 -3
- package/dist/components/MCodeEditor.vue.d.ts +3 -1
- package/dist/components/MContainer.vue.d.ts +1 -1
- package/dist/components/MDataTable.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +0 -2
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +1 -1
- package/dist/components/MProgressBar.vue.d.ts +1 -1
- package/dist/components/MRichTextEditor.vue.d.ts +1 -1
- package/dist/components/MScheduler.vue.d.ts +1 -1
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSpotlightSearch.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MTerminal.vue.d.ts +6 -6
- package/dist/components/MTextField.vue.d.ts +1 -1
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/dist-Dsrzt6J5.js +1192 -0
- package/dist/dist-Dsrzt6J5.js.map +1 -0
- package/dist/index.d.ts +0 -6
- package/dist/m3ui-vue.css +2 -0
- package/dist/m3ui.js +2738 -3367
- package/dist/m3ui.js.map +1 -1
- package/dist/markdown.d.ts +1 -0
- package/dist/markdown.js +41 -0
- package/dist/markdown.js.map +1 -0
- package/dist/rich-text-editor.d.ts +1 -0
- package/dist/rich-text-editor.js +215 -0
- package/dist/rich-text-editor.js.map +1 -0
- package/dist/styles/theme.css +3 -0
- package/dist/styles.css +2 -0
- package/dist/terminal.d.ts +1 -0
- package/dist/terminal.js +97 -0
- package/dist/terminal.js.map +1 -0
- package/package.json +28 -2
- package/src/chart.ts +1 -0
- package/src/code-editor.ts +2 -0
- package/src/components/MAlert.vue +1 -1
- package/src/components/MChart.vue +54 -47
- package/src/components/MCodeEditor.vue +149 -44
- package/src/components/MFab.vue +64 -48
- package/src/components/MMarkdown.vue +24 -17
- package/src/components/MMultiSelect.vue +3 -2
- package/src/components/MRichTextEditor.vue +101 -67
- package/src/components/MTerminal.vue +10 -8
- package/src/components/MTooltip.vue +8 -1
- package/src/index.ts +6 -6
- package/src/markdown.ts +1 -0
- package/src/rich-text-editor.ts +1 -0
- package/src/styles/theme.css +3 -0
- package/src/terminal.ts +1 -0
- package/dist/m3ui.css +0 -2
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { t as e } from "./MIcon-CaEooCmZ.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, onBeforeUnmount as d, onMounted as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, watch as _, withCtx as v } from "vue";
|
|
4
|
+
//#region src/components/MCodeEditor.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var y = { class: "overflow-hidden rounded-lg border border-outline-variant" }, b = { class: "flex items-center justify-between border-b border-outline-variant bg-surface-container px-4 py-2" }, x = { class: "text-label-medium text-on-surface-variant" }, S = { class: "flex items-center gap-2" }, C = ["title"], w = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "text-primary"
|
|
8
|
+
}, T = /*#__PURE__*/ t(/* @__PURE__ */ c({
|
|
9
|
+
__name: "MCodeEditor",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
language: { default: "javascript" },
|
|
13
|
+
readonly: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
lineNumbers: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
theme: { default: "light" },
|
|
22
|
+
minHeight: { default: "200px" },
|
|
23
|
+
maxHeight: { default: "600px" },
|
|
24
|
+
placeholder: {},
|
|
25
|
+
wrap: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:modelValue"],
|
|
31
|
+
setup(t, { emit: o }) {
|
|
32
|
+
let c = t, v = o, T = m(null), E = null, D = null, O = m(!1);
|
|
33
|
+
async function k() {
|
|
34
|
+
await navigator.clipboard.writeText(c.modelValue), O.value = !0, setTimeout(() => {
|
|
35
|
+
O.value = !1;
|
|
36
|
+
}, 1500);
|
|
37
|
+
}
|
|
38
|
+
let A = n(() => ({
|
|
39
|
+
javascript: "JavaScript",
|
|
40
|
+
typescript: "TypeScript",
|
|
41
|
+
json: "JSON",
|
|
42
|
+
html: "HTML",
|
|
43
|
+
css: "CSS",
|
|
44
|
+
python: "Python",
|
|
45
|
+
vue: "Vue",
|
|
46
|
+
plain: "Texto"
|
|
47
|
+
})[c.language]);
|
|
48
|
+
async function j() {
|
|
49
|
+
if (D) return D;
|
|
50
|
+
let [e, t, n, r, i, a, o, s, c, l, u, d] = await Promise.all([
|
|
51
|
+
import("@codemirror/view"),
|
|
52
|
+
import("@codemirror/state"),
|
|
53
|
+
import("@codemirror/commands"),
|
|
54
|
+
import("@codemirror/language"),
|
|
55
|
+
import("./dist-Dsrzt6J5.js"),
|
|
56
|
+
import("@codemirror/theme-one-dark"),
|
|
57
|
+
import("@codemirror/lang-javascript"),
|
|
58
|
+
import("@codemirror/lang-json"),
|
|
59
|
+
import("@codemirror/lang-html"),
|
|
60
|
+
import("@codemirror/lang-css"),
|
|
61
|
+
import("@codemirror/lang-python"),
|
|
62
|
+
import("@codemirror/lang-vue")
|
|
63
|
+
]);
|
|
64
|
+
return D = {
|
|
65
|
+
viewMod: e,
|
|
66
|
+
stateMod: t,
|
|
67
|
+
commandsMod: n,
|
|
68
|
+
languageMod: r,
|
|
69
|
+
highlightMod: i,
|
|
70
|
+
oneDarkMod: a,
|
|
71
|
+
jsMod: o,
|
|
72
|
+
jsonMod: s,
|
|
73
|
+
htmlMod: c,
|
|
74
|
+
cssMod: l,
|
|
75
|
+
pyMod: u,
|
|
76
|
+
vueMod: d
|
|
77
|
+
}, D;
|
|
78
|
+
}
|
|
79
|
+
function M(e, t) {
|
|
80
|
+
return e.HighlightStyle.define([
|
|
81
|
+
{
|
|
82
|
+
tag: t.keyword,
|
|
83
|
+
color: "var(--color-primary)"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
tag: t.controlKeyword,
|
|
87
|
+
color: "var(--color-primary)",
|
|
88
|
+
fontWeight: "500"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
tag: t.operatorKeyword,
|
|
92
|
+
color: "var(--color-primary)"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
tag: t.definitionKeyword,
|
|
96
|
+
color: "var(--color-primary)"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
tag: t.moduleKeyword,
|
|
100
|
+
color: "var(--color-primary)"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
tag: t.string,
|
|
104
|
+
color: "var(--color-tertiary)"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
tag: t.regexp,
|
|
108
|
+
color: "var(--color-tertiary)"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
tag: t.number,
|
|
112
|
+
color: "var(--color-error)"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
tag: t.bool,
|
|
116
|
+
color: "var(--color-error)"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
tag: t.function(t.variableName),
|
|
120
|
+
color: "var(--color-secondary)"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
tag: t.function(t.definition(t.variableName)),
|
|
124
|
+
color: "var(--color-secondary)",
|
|
125
|
+
fontWeight: "500"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
tag: t.typeName,
|
|
129
|
+
color: "var(--color-primary)",
|
|
130
|
+
fontStyle: "italic"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
tag: t.className,
|
|
134
|
+
color: "var(--color-primary)",
|
|
135
|
+
fontStyle: "italic"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
tag: t.namespace,
|
|
139
|
+
color: "var(--color-on-surface-variant)"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
tag: t.propertyName,
|
|
143
|
+
color: "var(--color-on-surface)"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
tag: t.definition(t.propertyName),
|
|
147
|
+
color: "var(--color-on-surface)"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
tag: t.variableName,
|
|
151
|
+
color: "var(--color-on-surface)"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
tag: t.definition(t.variableName),
|
|
155
|
+
color: "var(--color-on-surface)"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
tag: t.comment,
|
|
159
|
+
color: "var(--color-outline)",
|
|
160
|
+
fontStyle: "italic"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
tag: t.lineComment,
|
|
164
|
+
color: "var(--color-outline)",
|
|
165
|
+
fontStyle: "italic"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
tag: t.blockComment,
|
|
169
|
+
color: "var(--color-outline)",
|
|
170
|
+
fontStyle: "italic"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
tag: t.meta,
|
|
174
|
+
color: "var(--color-on-surface-variant)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
tag: t.tagName,
|
|
178
|
+
color: "var(--color-primary)"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
tag: t.attributeName,
|
|
182
|
+
color: "var(--color-tertiary)"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
tag: t.attributeValue,
|
|
186
|
+
color: "var(--color-secondary)"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
tag: t.atom,
|
|
190
|
+
color: "var(--color-error)"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
tag: t.null,
|
|
194
|
+
color: "var(--color-error)"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
tag: t.punctuation,
|
|
198
|
+
color: "var(--color-on-surface-variant)"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
tag: t.bracket,
|
|
202
|
+
color: "var(--color-on-surface-variant)"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
tag: t.operator,
|
|
206
|
+
color: "var(--color-on-surface-variant)"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
tag: t.separator,
|
|
210
|
+
color: "var(--color-on-surface-variant)"
|
|
211
|
+
}
|
|
212
|
+
]);
|
|
213
|
+
}
|
|
214
|
+
function N(e) {
|
|
215
|
+
switch (c.language) {
|
|
216
|
+
case "javascript": return e.jsMod.javascript();
|
|
217
|
+
case "typescript": return e.jsMod.javascript({ typescript: !0 });
|
|
218
|
+
case "json": return e.jsonMod.json();
|
|
219
|
+
case "html": return e.htmlMod.html();
|
|
220
|
+
case "css": return e.cssMod.css();
|
|
221
|
+
case "python": return e.pyMod.python();
|
|
222
|
+
case "vue": return e.vueMod.vue();
|
|
223
|
+
default: return [];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function P(e) {
|
|
227
|
+
let { viewMod: t, stateMod: n, commandsMod: r, languageMod: i, highlightMod: a, oneDarkMod: o } = e, s = M(i, a.tags), l = [
|
|
228
|
+
t.keymap.of([
|
|
229
|
+
...r.defaultKeymap,
|
|
230
|
+
...r.historyKeymap,
|
|
231
|
+
r.indentWithTab
|
|
232
|
+
]),
|
|
233
|
+
r.history(),
|
|
234
|
+
i.bracketMatching(),
|
|
235
|
+
i.indentOnInput(),
|
|
236
|
+
i.foldGutter(),
|
|
237
|
+
t.highlightActiveLine(),
|
|
238
|
+
t.highlightActiveLineGutter(),
|
|
239
|
+
i.syntaxHighlighting(s),
|
|
240
|
+
i.syntaxHighlighting(i.defaultHighlightStyle, { fallback: !0 }),
|
|
241
|
+
N(e),
|
|
242
|
+
t.EditorView.updateListener.of((e) => {
|
|
243
|
+
e.docChanged && v("update:modelValue", e.state.doc.toString());
|
|
244
|
+
}),
|
|
245
|
+
n.EditorState.readOnly.of(c.readonly)
|
|
246
|
+
];
|
|
247
|
+
return c.wrap && l.push(t.EditorView.lineWrapping), c.lineNumbers && l.push(t.lineNumbers()), c.theme === "dark" && l.push(o.oneDark), l;
|
|
248
|
+
}
|
|
249
|
+
async function F() {
|
|
250
|
+
if (!T.value) return;
|
|
251
|
+
let e = await j(), { viewMod: t, stateMod: n } = e;
|
|
252
|
+
E?.destroy(), E = new t.EditorView({
|
|
253
|
+
state: n.EditorState.create({
|
|
254
|
+
doc: c.modelValue,
|
|
255
|
+
extensions: P(e)
|
|
256
|
+
}),
|
|
257
|
+
parent: T.value
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return f(F), _(() => c.modelValue, (e) => {
|
|
261
|
+
E && E.state.doc.toString() !== e && E.dispatch({ changes: {
|
|
262
|
+
from: 0,
|
|
263
|
+
to: E.state.doc.length,
|
|
264
|
+
insert: e
|
|
265
|
+
} });
|
|
266
|
+
}), _([
|
|
267
|
+
() => c.language,
|
|
268
|
+
() => c.theme,
|
|
269
|
+
() => c.readonly,
|
|
270
|
+
() => c.lineNumbers,
|
|
271
|
+
() => c.wrap
|
|
272
|
+
], F), d(() => E?.destroy()), (n, o) => (p(), i("div", y, [a("div", b, [a("span", x, g(A.value), 1), a("div", S, [h(n.$slots, "actions", {}, void 0, !0), a("button", {
|
|
273
|
+
type: "button",
|
|
274
|
+
class: "flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8",
|
|
275
|
+
title: O.value ? "Copied!" : "Copy code",
|
|
276
|
+
onClick: k
|
|
277
|
+
}, [s(e, {
|
|
278
|
+
name: O.value ? "check" : "content_copy",
|
|
279
|
+
size: 16,
|
|
280
|
+
class: l(O.value ? "text-primary" : "")
|
|
281
|
+
}, null, 8, ["name", "class"]), O.value ? (p(), i("span", w, "Copied")) : r("", !0)], 8, C)])]), a("div", {
|
|
282
|
+
ref_key: "containerRef",
|
|
283
|
+
ref: T,
|
|
284
|
+
class: "code-editor-container overflow-auto bg-surface text-on-surface",
|
|
285
|
+
style: u({
|
|
286
|
+
minHeight: t.minHeight,
|
|
287
|
+
maxHeight: t.maxHeight
|
|
288
|
+
})
|
|
289
|
+
}, null, 4)]));
|
|
290
|
+
}
|
|
291
|
+
}), [["__scopeId", "data-v-b0a66a4b"]]), E = { class: "flex flex-col gap-0" }, D = { class: "flex items-center gap-2" }, O = {
|
|
292
|
+
key: 0,
|
|
293
|
+
class: "px-3 py-1.5 text-body-small text-error"
|
|
294
|
+
}, k = /* @__PURE__ */ c({
|
|
295
|
+
__name: "MJsonEditor",
|
|
296
|
+
props: {
|
|
297
|
+
modelValue: {},
|
|
298
|
+
readonly: {
|
|
299
|
+
type: Boolean,
|
|
300
|
+
default: !1
|
|
301
|
+
},
|
|
302
|
+
minHeight: { default: "200px" },
|
|
303
|
+
maxHeight: { default: "600px" }
|
|
304
|
+
},
|
|
305
|
+
emits: ["update:modelValue"],
|
|
306
|
+
setup(t, { emit: c }) {
|
|
307
|
+
let u = t, d = c, f = m(JSON.stringify(u.modelValue, null, 2)), h = m(null), y = n(() => !h.value);
|
|
308
|
+
_(() => u.modelValue, (e) => {
|
|
309
|
+
let t = JSON.stringify(e, null, 2);
|
|
310
|
+
t !== f.value && (f.value = t, h.value = null);
|
|
311
|
+
});
|
|
312
|
+
function b(e) {
|
|
313
|
+
f.value = e;
|
|
314
|
+
try {
|
|
315
|
+
let t = JSON.parse(e);
|
|
316
|
+
h.value = null, d("update:modelValue", t);
|
|
317
|
+
} catch (e) {
|
|
318
|
+
h.value = e.message;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function x() {
|
|
322
|
+
try {
|
|
323
|
+
let e = JSON.parse(f.value);
|
|
324
|
+
f.value = JSON.stringify(e, null, 2), h.value = null, d("update:modelValue", e);
|
|
325
|
+
} catch {}
|
|
326
|
+
}
|
|
327
|
+
function S() {
|
|
328
|
+
try {
|
|
329
|
+
let e = JSON.parse(f.value);
|
|
330
|
+
f.value = JSON.stringify(e), h.value = null, d("update:modelValue", e);
|
|
331
|
+
} catch {}
|
|
332
|
+
}
|
|
333
|
+
return (n, c) => (p(), i("div", E, [s(T, {
|
|
334
|
+
"model-value": f.value,
|
|
335
|
+
language: "json",
|
|
336
|
+
readonly: t.readonly,
|
|
337
|
+
"min-height": t.minHeight,
|
|
338
|
+
"max-height": t.maxHeight,
|
|
339
|
+
"onUpdate:modelValue": b
|
|
340
|
+
}, {
|
|
341
|
+
actions: v(() => [a("div", D, [
|
|
342
|
+
a("span", { class: l(["flex items-center gap-1 rounded-full px-2.5 py-0.5 text-label-small", y.value ? "bg-success-container text-on-success-container" : "bg-error-container text-on-error-container"]) }, [s(e, {
|
|
343
|
+
name: y.value ? "check_circle" : "error",
|
|
344
|
+
size: 14
|
|
345
|
+
}, null, 8, ["name"]), o(" " + g(y.value ? "Válido" : "Inválido"), 1)], 2),
|
|
346
|
+
t.readonly ? r("", !0) : (p(), i("button", {
|
|
347
|
+
key: 0,
|
|
348
|
+
type: "button",
|
|
349
|
+
title: "Formatear",
|
|
350
|
+
class: "flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8",
|
|
351
|
+
onClick: x
|
|
352
|
+
}, [s(e, {
|
|
353
|
+
name: "format_indent_increase",
|
|
354
|
+
size: 16
|
|
355
|
+
}), c[0] ||= o(" Formatear ", -1)])),
|
|
356
|
+
t.readonly ? r("", !0) : (p(), i("button", {
|
|
357
|
+
key: 1,
|
|
358
|
+
type: "button",
|
|
359
|
+
title: "Minificar",
|
|
360
|
+
class: "flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8",
|
|
361
|
+
onClick: S
|
|
362
|
+
}, [s(e, {
|
|
363
|
+
name: "compress",
|
|
364
|
+
size: 16
|
|
365
|
+
}), c[1] ||= o(" Minificar ", -1)]))
|
|
366
|
+
])]),
|
|
367
|
+
_: 1
|
|
368
|
+
}, 8, [
|
|
369
|
+
"model-value",
|
|
370
|
+
"readonly",
|
|
371
|
+
"min-height",
|
|
372
|
+
"max-height"
|
|
373
|
+
]), h.value ? (p(), i("p", O, g(h.value), 1)) : r("", !0)]));
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
//#endregion
|
|
377
|
+
export { T as MCodeEditor, k as MJsonEditor };
|
|
378
|
+
|
|
379
|
+
//# sourceMappingURL=code-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-editor.js","names":[],"sources":["../src/components/MCodeEditor.vue","../src/components/MCodeEditor.vue","../src/components/MJsonEditor.vue","../src/components/MJsonEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, watch, onMounted, onBeforeUnmount, computed } from 'vue'\nimport MIcon from './MIcon.vue'\n\ntype Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python' | 'vue' | 'plain'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string\n language?: Language\n readonly?: boolean\n lineNumbers?: boolean\n theme?: 'light' | 'dark'\n minHeight?: string\n maxHeight?: string\n placeholder?: string\n wrap?: boolean\n }>(),\n {\n language: 'javascript',\n readonly: false,\n lineNumbers: true,\n theme: 'light',\n minHeight: '200px',\n maxHeight: '600px',\n wrap: true,\n },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [string] }>()\n\nconst containerRef = ref<HTMLElement | null>(null)\nlet view: any = null\nlet cmModules: any = null\nconst copied = ref(false)\n\nasync function copyCode() {\n await navigator.clipboard.writeText(props.modelValue)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n}\n\nconst langLabel = computed(() => {\n const labels: Record<Language, string> = {\n javascript: 'JavaScript',\n typescript: 'TypeScript',\n json: 'JSON',\n html: 'HTML',\n css: 'CSS',\n python: 'Python',\n vue: 'Vue',\n plain: 'Texto',\n }\n return labels[props.language]\n})\n\nasync function loadModules() {\n if (cmModules) return cmModules\n\n const [viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod, jsMod, jsonMod, htmlMod, cssMod, pyMod, vueMod] = await Promise.all([\n import('@codemirror/view'),\n import('@codemirror/state'),\n import('@codemirror/commands'),\n import('@codemirror/language'),\n import('@lezer/highlight'),\n import('@codemirror/theme-one-dark'),\n import('@codemirror/lang-javascript'),\n import('@codemirror/lang-json'),\n import('@codemirror/lang-html'),\n import('@codemirror/lang-css'),\n import('@codemirror/lang-python'),\n import('@codemirror/lang-vue'),\n ])\n\n cmModules = { viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod, jsMod, jsonMod, htmlMod, cssMod, pyMod, vueMod }\n return cmModules\n}\n\nfunction buildM3HighlightStyle(languageMod: any, tags: any) {\n return languageMod.HighlightStyle.define([\n { tag: tags.keyword, color: 'var(--color-primary)' },\n { tag: tags.controlKeyword, color: 'var(--color-primary)', fontWeight: '500' },\n { tag: tags.operatorKeyword, color: 'var(--color-primary)' },\n { tag: tags.definitionKeyword, color: 'var(--color-primary)' },\n { tag: tags.moduleKeyword, color: 'var(--color-primary)' },\n\n { tag: tags.string, color: 'var(--color-tertiary)' },\n { tag: tags.regexp, color: 'var(--color-tertiary)' },\n\n { tag: tags.number, color: 'var(--color-error)' },\n { tag: tags.bool, color: 'var(--color-error)' },\n\n { tag: tags.function(tags.variableName), color: 'var(--color-secondary)' },\n { tag: tags.function(tags.definition(tags.variableName)), color: 'var(--color-secondary)', fontWeight: '500' },\n\n { tag: tags.typeName, color: 'var(--color-primary)', fontStyle: 'italic' },\n { tag: tags.className, color: 'var(--color-primary)', fontStyle: 'italic' },\n { tag: tags.namespace, color: 'var(--color-on-surface-variant)' },\n\n { tag: tags.propertyName, color: 'var(--color-on-surface)' },\n { tag: tags.definition(tags.propertyName), color: 'var(--color-on-surface)' },\n\n { tag: tags.variableName, color: 'var(--color-on-surface)' },\n { tag: tags.definition(tags.variableName), color: 'var(--color-on-surface)' },\n\n { tag: tags.comment, color: 'var(--color-outline)', fontStyle: 'italic' },\n { tag: tags.lineComment, color: 'var(--color-outline)', fontStyle: 'italic' },\n { tag: tags.blockComment, color: 'var(--color-outline)', fontStyle: 'italic' },\n\n { tag: tags.meta, color: 'var(--color-on-surface-variant)' },\n { tag: tags.tagName, color: 'var(--color-primary)' },\n { tag: tags.attributeName, color: 'var(--color-tertiary)' },\n { tag: tags.attributeValue, color: 'var(--color-secondary)' },\n\n { tag: tags.atom, color: 'var(--color-error)' },\n { tag: tags.null, color: 'var(--color-error)' },\n\n { tag: tags.punctuation, color: 'var(--color-on-surface-variant)' },\n { tag: tags.bracket, color: 'var(--color-on-surface-variant)' },\n { tag: tags.operator, color: 'var(--color-on-surface-variant)' },\n { tag: tags.separator, color: 'var(--color-on-surface-variant)' },\n ])\n}\n\nfunction getLangExtension(mods: any) {\n switch (props.language) {\n case 'javascript': return mods.jsMod.javascript()\n case 'typescript': return mods.jsMod.javascript({ typescript: true })\n case 'json': return mods.jsonMod.json()\n case 'html': return mods.htmlMod.html()\n case 'css': return mods.cssMod.css()\n case 'python': return mods.pyMod.python()\n case 'vue': return mods.vueMod.vue()\n default: return []\n }\n}\n\nfunction buildExtensions(mods: any) {\n const { viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod } = mods\n\n const m3Style = buildM3HighlightStyle(languageMod, highlightMod.tags)\n\n const exts = [\n viewMod.keymap.of([...commandsMod.defaultKeymap, ...commandsMod.historyKeymap, commandsMod.indentWithTab]),\n commandsMod.history(),\n languageMod.bracketMatching(),\n languageMod.indentOnInput(),\n languageMod.foldGutter(),\n viewMod.highlightActiveLine(),\n viewMod.highlightActiveLineGutter(),\n languageMod.syntaxHighlighting(m3Style),\n languageMod.syntaxHighlighting(languageMod.defaultHighlightStyle, { fallback: true }),\n getLangExtension(mods),\n viewMod.EditorView.updateListener.of((update: any) => {\n if (update.docChanged) emit('update:modelValue', update.state.doc.toString())\n }),\n stateMod.EditorState.readOnly.of(props.readonly),\n ]\n\n if (props.wrap) exts.push(viewMod.EditorView.lineWrapping)\n if (props.lineNumbers) exts.push(viewMod.lineNumbers())\n if (props.theme === 'dark') exts.push(oneDarkMod.oneDark)\n\n return exts\n}\n\nasync function createEditor() {\n if (!containerRef.value) return\n const mods = await loadModules()\n const { viewMod, stateMod } = mods\n\n view?.destroy()\n\n view = new viewMod.EditorView({\n state: stateMod.EditorState.create({\n doc: props.modelValue,\n extensions: buildExtensions(mods),\n }),\n parent: containerRef.value,\n })\n}\n\nonMounted(createEditor)\n\nwatch(() => props.modelValue, (val) => {\n if (view && view.state.doc.toString() !== val) {\n view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: val } })\n }\n})\n\nwatch([() => props.language, () => props.theme, () => props.readonly, () => props.lineNumbers, () => props.wrap], createEditor)\n\nonBeforeUnmount(() => view?.destroy())\n</script>\n\n<template>\n <div class=\"overflow-hidden rounded-lg border border-outline-variant\">\n <!-- Header bar -->\n <div class=\"flex items-center justify-between border-b border-outline-variant bg-surface-container px-4 py-2\">\n <span class=\"text-label-medium text-on-surface-variant\">{{ langLabel }}</span>\n <div class=\"flex items-center gap-2\">\n <slot name=\"actions\" />\n <button\n type=\"button\"\n class=\"flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n :title=\"copied ? 'Copied!' : 'Copy code'\"\n @click=\"copyCode\"\n >\n <MIcon :name=\"copied ? 'check' : 'content_copy'\" :size=\"16\" :class=\"copied ? 'text-primary' : ''\" />\n <span v-if=\"copied\" class=\"text-primary\">Copied</span>\n </button>\n </div>\n </div>\n\n <!-- Editor -->\n <div\n ref=\"containerRef\"\n class=\"code-editor-container overflow-auto bg-surface text-on-surface\"\n :style=\"{ minHeight, maxHeight }\"\n />\n </div>\n</template>\n\n<style scoped>\n.code-editor-container :deep(.cm-editor) {\n height: 100%;\n min-height: inherit;\n font-family: 'Roboto Mono', 'Fira Code', 'Consolas', monospace;\n font-size: 0.8125rem;\n line-height: 1.6;\n}\n\n.code-editor-container :deep(.cm-editor.cm-focused) {\n outline: none;\n}\n\n.code-editor-container :deep(.cm-scroller) {\n min-height: inherit;\n}\n\n.code-editor-container :deep(.cm-content) {\n padding: 12px 0;\n}\n\n.code-editor-container :deep(.cm-line) {\n padding: 0 16px;\n}\n\n.code-editor-container :deep(.cm-gutters) {\n background: var(--color-surface-container);\n border-right: 1px solid var(--color-outline-variant);\n color: var(--color-outline);\n font-size: 0.75rem;\n padding: 0 4px;\n}\n\n.code-editor-container :deep(.cm-activeLineGutter) {\n background: var(--color-surface-container-high);\n color: var(--color-on-surface-variant);\n}\n\n.code-editor-container :deep(.cm-activeLine) {\n background: var(--color-surface-container-lowest);\n}\n\n.code-editor-container :deep(.cm-selectionBackground) {\n background: var(--color-primary-container) !important;\n}\n\n.code-editor-container :deep(.cm-cursor) {\n border-left-color: var(--color-primary);\n border-left-width: 2px;\n}\n\n.code-editor-container :deep(.cm-matchingBracket) {\n background: var(--color-tertiary-container);\n color: var(--color-on-tertiary-container);\n border-radius: 2px;\n}\n\n.code-editor-container :deep(.cm-foldGutter span) {\n color: var(--color-on-surface-variant);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref, watch, onMounted, onBeforeUnmount, computed } from 'vue'\nimport MIcon from './MIcon.vue'\n\ntype Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python' | 'vue' | 'plain'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string\n language?: Language\n readonly?: boolean\n lineNumbers?: boolean\n theme?: 'light' | 'dark'\n minHeight?: string\n maxHeight?: string\n placeholder?: string\n wrap?: boolean\n }>(),\n {\n language: 'javascript',\n readonly: false,\n lineNumbers: true,\n theme: 'light',\n minHeight: '200px',\n maxHeight: '600px',\n wrap: true,\n },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [string] }>()\n\nconst containerRef = ref<HTMLElement | null>(null)\nlet view: any = null\nlet cmModules: any = null\nconst copied = ref(false)\n\nasync function copyCode() {\n await navigator.clipboard.writeText(props.modelValue)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n}\n\nconst langLabel = computed(() => {\n const labels: Record<Language, string> = {\n javascript: 'JavaScript',\n typescript: 'TypeScript',\n json: 'JSON',\n html: 'HTML',\n css: 'CSS',\n python: 'Python',\n vue: 'Vue',\n plain: 'Texto',\n }\n return labels[props.language]\n})\n\nasync function loadModules() {\n if (cmModules) return cmModules\n\n const [viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod, jsMod, jsonMod, htmlMod, cssMod, pyMod, vueMod] = await Promise.all([\n import('@codemirror/view'),\n import('@codemirror/state'),\n import('@codemirror/commands'),\n import('@codemirror/language'),\n import('@lezer/highlight'),\n import('@codemirror/theme-one-dark'),\n import('@codemirror/lang-javascript'),\n import('@codemirror/lang-json'),\n import('@codemirror/lang-html'),\n import('@codemirror/lang-css'),\n import('@codemirror/lang-python'),\n import('@codemirror/lang-vue'),\n ])\n\n cmModules = { viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod, jsMod, jsonMod, htmlMod, cssMod, pyMod, vueMod }\n return cmModules\n}\n\nfunction buildM3HighlightStyle(languageMod: any, tags: any) {\n return languageMod.HighlightStyle.define([\n { tag: tags.keyword, color: 'var(--color-primary)' },\n { tag: tags.controlKeyword, color: 'var(--color-primary)', fontWeight: '500' },\n { tag: tags.operatorKeyword, color: 'var(--color-primary)' },\n { tag: tags.definitionKeyword, color: 'var(--color-primary)' },\n { tag: tags.moduleKeyword, color: 'var(--color-primary)' },\n\n { tag: tags.string, color: 'var(--color-tertiary)' },\n { tag: tags.regexp, color: 'var(--color-tertiary)' },\n\n { tag: tags.number, color: 'var(--color-error)' },\n { tag: tags.bool, color: 'var(--color-error)' },\n\n { tag: tags.function(tags.variableName), color: 'var(--color-secondary)' },\n { tag: tags.function(tags.definition(tags.variableName)), color: 'var(--color-secondary)', fontWeight: '500' },\n\n { tag: tags.typeName, color: 'var(--color-primary)', fontStyle: 'italic' },\n { tag: tags.className, color: 'var(--color-primary)', fontStyle: 'italic' },\n { tag: tags.namespace, color: 'var(--color-on-surface-variant)' },\n\n { tag: tags.propertyName, color: 'var(--color-on-surface)' },\n { tag: tags.definition(tags.propertyName), color: 'var(--color-on-surface)' },\n\n { tag: tags.variableName, color: 'var(--color-on-surface)' },\n { tag: tags.definition(tags.variableName), color: 'var(--color-on-surface)' },\n\n { tag: tags.comment, color: 'var(--color-outline)', fontStyle: 'italic' },\n { tag: tags.lineComment, color: 'var(--color-outline)', fontStyle: 'italic' },\n { tag: tags.blockComment, color: 'var(--color-outline)', fontStyle: 'italic' },\n\n { tag: tags.meta, color: 'var(--color-on-surface-variant)' },\n { tag: tags.tagName, color: 'var(--color-primary)' },\n { tag: tags.attributeName, color: 'var(--color-tertiary)' },\n { tag: tags.attributeValue, color: 'var(--color-secondary)' },\n\n { tag: tags.atom, color: 'var(--color-error)' },\n { tag: tags.null, color: 'var(--color-error)' },\n\n { tag: tags.punctuation, color: 'var(--color-on-surface-variant)' },\n { tag: tags.bracket, color: 'var(--color-on-surface-variant)' },\n { tag: tags.operator, color: 'var(--color-on-surface-variant)' },\n { tag: tags.separator, color: 'var(--color-on-surface-variant)' },\n ])\n}\n\nfunction getLangExtension(mods: any) {\n switch (props.language) {\n case 'javascript': return mods.jsMod.javascript()\n case 'typescript': return mods.jsMod.javascript({ typescript: true })\n case 'json': return mods.jsonMod.json()\n case 'html': return mods.htmlMod.html()\n case 'css': return mods.cssMod.css()\n case 'python': return mods.pyMod.python()\n case 'vue': return mods.vueMod.vue()\n default: return []\n }\n}\n\nfunction buildExtensions(mods: any) {\n const { viewMod, stateMod, commandsMod, languageMod, highlightMod, oneDarkMod } = mods\n\n const m3Style = buildM3HighlightStyle(languageMod, highlightMod.tags)\n\n const exts = [\n viewMod.keymap.of([...commandsMod.defaultKeymap, ...commandsMod.historyKeymap, commandsMod.indentWithTab]),\n commandsMod.history(),\n languageMod.bracketMatching(),\n languageMod.indentOnInput(),\n languageMod.foldGutter(),\n viewMod.highlightActiveLine(),\n viewMod.highlightActiveLineGutter(),\n languageMod.syntaxHighlighting(m3Style),\n languageMod.syntaxHighlighting(languageMod.defaultHighlightStyle, { fallback: true }),\n getLangExtension(mods),\n viewMod.EditorView.updateListener.of((update: any) => {\n if (update.docChanged) emit('update:modelValue', update.state.doc.toString())\n }),\n stateMod.EditorState.readOnly.of(props.readonly),\n ]\n\n if (props.wrap) exts.push(viewMod.EditorView.lineWrapping)\n if (props.lineNumbers) exts.push(viewMod.lineNumbers())\n if (props.theme === 'dark') exts.push(oneDarkMod.oneDark)\n\n return exts\n}\n\nasync function createEditor() {\n if (!containerRef.value) return\n const mods = await loadModules()\n const { viewMod, stateMod } = mods\n\n view?.destroy()\n\n view = new viewMod.EditorView({\n state: stateMod.EditorState.create({\n doc: props.modelValue,\n extensions: buildExtensions(mods),\n }),\n parent: containerRef.value,\n })\n}\n\nonMounted(createEditor)\n\nwatch(() => props.modelValue, (val) => {\n if (view && view.state.doc.toString() !== val) {\n view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: val } })\n }\n})\n\nwatch([() => props.language, () => props.theme, () => props.readonly, () => props.lineNumbers, () => props.wrap], createEditor)\n\nonBeforeUnmount(() => view?.destroy())\n</script>\n\n<template>\n <div class=\"overflow-hidden rounded-lg border border-outline-variant\">\n <!-- Header bar -->\n <div class=\"flex items-center justify-between border-b border-outline-variant bg-surface-container px-4 py-2\">\n <span class=\"text-label-medium text-on-surface-variant\">{{ langLabel }}</span>\n <div class=\"flex items-center gap-2\">\n <slot name=\"actions\" />\n <button\n type=\"button\"\n class=\"flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n :title=\"copied ? 'Copied!' : 'Copy code'\"\n @click=\"copyCode\"\n >\n <MIcon :name=\"copied ? 'check' : 'content_copy'\" :size=\"16\" :class=\"copied ? 'text-primary' : ''\" />\n <span v-if=\"copied\" class=\"text-primary\">Copied</span>\n </button>\n </div>\n </div>\n\n <!-- Editor -->\n <div\n ref=\"containerRef\"\n class=\"code-editor-container overflow-auto bg-surface text-on-surface\"\n :style=\"{ minHeight, maxHeight }\"\n />\n </div>\n</template>\n\n<style scoped>\n.code-editor-container :deep(.cm-editor) {\n height: 100%;\n min-height: inherit;\n font-family: 'Roboto Mono', 'Fira Code', 'Consolas', monospace;\n font-size: 0.8125rem;\n line-height: 1.6;\n}\n\n.code-editor-container :deep(.cm-editor.cm-focused) {\n outline: none;\n}\n\n.code-editor-container :deep(.cm-scroller) {\n min-height: inherit;\n}\n\n.code-editor-container :deep(.cm-content) {\n padding: 12px 0;\n}\n\n.code-editor-container :deep(.cm-line) {\n padding: 0 16px;\n}\n\n.code-editor-container :deep(.cm-gutters) {\n background: var(--color-surface-container);\n border-right: 1px solid var(--color-outline-variant);\n color: var(--color-outline);\n font-size: 0.75rem;\n padding: 0 4px;\n}\n\n.code-editor-container :deep(.cm-activeLineGutter) {\n background: var(--color-surface-container-high);\n color: var(--color-on-surface-variant);\n}\n\n.code-editor-container :deep(.cm-activeLine) {\n background: var(--color-surface-container-lowest);\n}\n\n.code-editor-container :deep(.cm-selectionBackground) {\n background: var(--color-primary-container) !important;\n}\n\n.code-editor-container :deep(.cm-cursor) {\n border-left-color: var(--color-primary);\n border-left-width: 2px;\n}\n\n.code-editor-container :deep(.cm-matchingBracket) {\n background: var(--color-tertiary-container);\n color: var(--color-on-tertiary-container);\n border-radius: 2px;\n}\n\n.code-editor-container :deep(.cm-foldGutter span) {\n color: var(--color-on-surface-variant);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue'\nimport MCodeEditor from './MCodeEditor.vue'\nimport MIcon from './MIcon.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: unknown\n readonly?: boolean\n minHeight?: string\n maxHeight?: string\n }>(),\n {\n readonly: false,\n minHeight: '200px',\n maxHeight: '600px',\n },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [unknown] }>()\n\nconst rawText = ref(JSON.stringify(props.modelValue, null, 2))\nconst parseError = ref<string | null>(null)\n\nconst isValid = computed(() => !parseError.value)\n\nwatch(() => props.modelValue, (val) => {\n const incoming = JSON.stringify(val, null, 2)\n if (incoming !== rawText.value) {\n rawText.value = incoming\n parseError.value = null\n }\n})\n\nfunction onTextUpdate(text: string) {\n rawText.value = text\n try {\n const parsed = JSON.parse(text)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch (e) {\n parseError.value = (e as Error).message\n }\n}\n\nfunction formatJson() {\n try {\n const parsed = JSON.parse(rawText.value)\n rawText.value = JSON.stringify(parsed, null, 2)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch {\n // keep error state\n }\n}\n\nfunction minifyJson() {\n try {\n const parsed = JSON.parse(rawText.value)\n rawText.value = JSON.stringify(parsed)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch {\n // keep error state\n }\n}\n</script>\n\n<template>\n <div class=\"flex flex-col gap-0\">\n <MCodeEditor\n :model-value=\"rawText\"\n language=\"json\"\n :readonly=\"readonly\"\n :min-height=\"minHeight\"\n :max-height=\"maxHeight\"\n @update:model-value=\"onTextUpdate\"\n >\n <template #actions>\n <div class=\"flex items-center gap-2\">\n <!-- Validation badge -->\n <span\n class=\"flex items-center gap-1 rounded-full px-2.5 py-0.5 text-label-small\"\n :class=\"isValid ? 'bg-success-container text-on-success-container' : 'bg-error-container text-on-error-container'\"\n >\n <MIcon :name=\"isValid ? 'check_circle' : 'error'\" :size=\"14\" />\n {{ isValid ? 'Válido' : 'Inválido' }}\n </span>\n\n <button\n v-if=\"!readonly\"\n type=\"button\"\n title=\"Formatear\"\n class=\"flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n @click=\"formatJson\"\n >\n <MIcon name=\"format_indent_increase\" :size=\"16\" />\n Formatear\n </button>\n <button\n v-if=\"!readonly\"\n type=\"button\"\n title=\"Minificar\"\n class=\"flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n @click=\"minifyJson\"\n >\n <MIcon name=\"compress\" :size=\"16\" />\n Minificar\n </button>\n </div>\n </template>\n </MCodeEditor>\n\n <p v-if=\"parseError\" class=\"px-3 py-1.5 text-body-small text-error\">\n {{ parseError }}\n </p>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue'\nimport MCodeEditor from './MCodeEditor.vue'\nimport MIcon from './MIcon.vue'\n\nconst props = withDefaults(\n defineProps<{\n modelValue: unknown\n readonly?: boolean\n minHeight?: string\n maxHeight?: string\n }>(),\n {\n readonly: false,\n minHeight: '200px',\n maxHeight: '600px',\n },\n)\n\nconst emit = defineEmits<{ 'update:modelValue': [unknown] }>()\n\nconst rawText = ref(JSON.stringify(props.modelValue, null, 2))\nconst parseError = ref<string | null>(null)\n\nconst isValid = computed(() => !parseError.value)\n\nwatch(() => props.modelValue, (val) => {\n const incoming = JSON.stringify(val, null, 2)\n if (incoming !== rawText.value) {\n rawText.value = incoming\n parseError.value = null\n }\n})\n\nfunction onTextUpdate(text: string) {\n rawText.value = text\n try {\n const parsed = JSON.parse(text)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch (e) {\n parseError.value = (e as Error).message\n }\n}\n\nfunction formatJson() {\n try {\n const parsed = JSON.parse(rawText.value)\n rawText.value = JSON.stringify(parsed, null, 2)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch {\n // keep error state\n }\n}\n\nfunction minifyJson() {\n try {\n const parsed = JSON.parse(rawText.value)\n rawText.value = JSON.stringify(parsed)\n parseError.value = null\n emit('update:modelValue', parsed)\n } catch {\n // keep error state\n }\n}\n</script>\n\n<template>\n <div class=\"flex flex-col gap-0\">\n <MCodeEditor\n :model-value=\"rawText\"\n language=\"json\"\n :readonly=\"readonly\"\n :min-height=\"minHeight\"\n :max-height=\"maxHeight\"\n @update:model-value=\"onTextUpdate\"\n >\n <template #actions>\n <div class=\"flex items-center gap-2\">\n <!-- Validation badge -->\n <span\n class=\"flex items-center gap-1 rounded-full px-2.5 py-0.5 text-label-small\"\n :class=\"isValid ? 'bg-success-container text-on-success-container' : 'bg-error-container text-on-error-container'\"\n >\n <MIcon :name=\"isValid ? 'check_circle' : 'error'\" :size=\"14\" />\n {{ isValid ? 'Válido' : 'Inválido' }}\n </span>\n\n <button\n v-if=\"!readonly\"\n type=\"button\"\n title=\"Formatear\"\n class=\"flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n @click=\"formatJson\"\n >\n <MIcon name=\"format_indent_increase\" :size=\"16\" />\n Formatear\n </button>\n <button\n v-if=\"!readonly\"\n type=\"button\"\n title=\"Minificar\"\n class=\"flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-label-medium text-on-surface-variant transition-colors hover:bg-on-surface/8\"\n @click=\"minifyJson\"\n >\n <MIcon name=\"compress\" :size=\"16\" />\n Minificar\n </button>\n </div>\n </template>\n </MCodeEditor>\n\n <p v-if=\"parseError\" class=\"px-3 py-1.5 text-body-small text-error\">\n {{ parseError }}\n </p>\n </div>\n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AAvD,MAAM,EAAA,QAAO,iBAAA;KAA8B,MAAM;6BAAM,MAC/D,EAAG,EAAA,QAAO,WAAA,UAAA,GAAA,CAAA,CAAA,GAAA,CAAA;IAIH,EAAA,WAQT,EAAA,IAAA,EAAA,KARS,EAAA,GADT,EASS,UAAA;;KAPP,MAAK;KACL,OAAM;KACN,OAAM;KACL,SAAO;QAER,EAAkD,GAAA;KAA3C,MAAK;KAA0B,MAAM;mBAAM,eAEpD,EAAA,CAAA,CAAA;IAES,EAAA,WAQT,EAAA,IAAA,EAAA,KARS,EAAA,GADT,EASS,UAAA;;KAPP,MAAK;KACL,OAAM;KACN,OAAM;KACL,SAAO;QAER,EAAoC,GAAA;KAA7B,MAAK;KAAY,MAAM;mBAAM,eAEtC,EAAA,CAAA,CAAA;;;;;;;;MAKG,EAAA,SAAA,EAAA,GAAT,EAEI,KAFJ,GAEI,EADC,EAAA,KAAU,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -16,9 +16,9 @@ type __VLS_Slots = {} & {
|
|
|
16
16
|
default?: (props: typeof __VLS_11) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
-
variant: "filled" | "tonal" | "outlined" | "text" | "elevated";
|
|
20
19
|
type: "button" | "submit" | "reset";
|
|
21
20
|
color: string;
|
|
21
|
+
variant: "filled" | "tonal" | "outlined" | "text" | "elevated";
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
loading: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -16,8 +16,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
16
16
|
onDateClick?: ((args_0: string) => any) | undefined;
|
|
17
17
|
onEventClick?: ((args_0: CalendarEvent) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
events: CalendarEvent[];
|
|
20
19
|
locale: string;
|
|
20
|
+
events: CalendarEvent[];
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type ChartData, type ChartOptions } from 'chart.js';
|
|
2
1
|
type ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar';
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
type: ChartType;
|
|
5
|
-
data:
|
|
6
|
-
options?:
|
|
4
|
+
data: Record<string, any>;
|
|
5
|
+
options?: Record<string, any>;
|
|
7
6
|
height?: string;
|
|
8
7
|
};
|
|
9
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python' | 'plain';
|
|
1
|
+
type Language = 'javascript' | 'typescript' | 'json' | 'html' | 'css' | 'python' | 'vue' | 'plain';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
modelValue: string;
|
|
4
4
|
language?: Language;
|
|
@@ -8,6 +8,7 @@ type __VLS_Props = {
|
|
|
8
8
|
minHeight?: string;
|
|
9
9
|
maxHeight?: string;
|
|
10
10
|
placeholder?: string;
|
|
11
|
+
wrap?: boolean;
|
|
11
12
|
};
|
|
12
13
|
declare var __VLS_1: {};
|
|
13
14
|
type __VLS_Slots = {} & {
|
|
@@ -24,6 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
24
25
|
theme: "light" | "dark";
|
|
25
26
|
minHeight: string;
|
|
26
27
|
maxHeight: string;
|
|
28
|
+
wrap: boolean;
|
|
27
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -9,10 +9,10 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_1) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
-
padding: boolean;
|
|
13
12
|
maxWidth: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
14
13
|
fluid: boolean;
|
|
15
14
|
centered: boolean;
|
|
15
|
+
padding: boolean;
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -59,8 +59,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
59
59
|
"onUpdate:modelValue"?: ((args_0: Record<string, any>[]) => any) | undefined;
|
|
60
60
|
onRowClick?: ((args_0: Record<string, any>) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
|
-
dense: boolean;
|
|
63
62
|
modelValue: Record<string, any>[];
|
|
63
|
+
dense: boolean;
|
|
64
64
|
loading: boolean;
|
|
65
65
|
perPage: number;
|
|
66
66
|
emptyText: string;
|
|
@@ -9,9 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
color?: 'primary' | 'secondary' | 'tertiary' | 'surface';
|
|
10
10
|
size?: 'small' | 'regular' | 'large';
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
/** Speed-dial child items. If provided, clicking the FAB toggles them instead of emitting click. */
|
|
13
12
|
items?: SpeedDialItem[];
|
|
14
|
-
/** Direction the speed-dial items expand toward. */
|
|
15
13
|
direction?: 'up' | 'down' | 'left' | 'right' | 'radial';
|
|
16
14
|
};
|
|
17
15
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -6,8 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
size?: number;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
variant: "standard" | "filled" | "tonal" | "outlined";
|
|
10
9
|
size: number;
|
|
10
|
+
variant: "standard" | "filled" | "tonal" | "outlined";
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,9 +23,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
24
|
"onUpdate:modelValue"?: ((args_0: (string | number)[]) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
-
variant: "filled" | "outlined";
|
|
27
26
|
required: boolean;
|
|
28
27
|
modelValue: (string | number)[];
|
|
28
|
+
variant: "filled" | "outlined";
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
searchable: boolean;
|
|
31
31
|
maxChips: number;
|
|
@@ -6,8 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
variant: "linear" | "wavy";
|
|
10
9
|
color: "primary" | "secondary" | "tertiary" | "error";
|
|
10
|
+
variant: "linear" | "wavy";
|
|
11
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
13
13
|
export default _default;
|
|
@@ -9,9 +9,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
|
-
disabled: boolean;
|
|
13
12
|
minHeight: string;
|
|
14
13
|
placeholder: string;
|
|
14
|
+
disabled: boolean;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
17
17
|
export default _default;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
}) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
view: "week" | "day";
|
|
29
|
-
events: SchedulerEvent[];
|
|
30
29
|
locale: string;
|
|
30
|
+
events: SchedulerEvent[];
|
|
31
31
|
startHour: number;
|
|
32
32
|
endHour: number;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -20,9 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
20
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
21
|
"onUpdate:modelValue"?: ((args_0: string | number) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
variant: "filled" | "outlined";
|
|
24
23
|
required: boolean;
|
|
25
24
|
modelValue: string | number | null;
|
|
25
|
+
variant: "filled" | "outlined";
|
|
26
26
|
disabled: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,8 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
animation?: 'pulse' | 'wave' | 'none';
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
variant: "text" | "circular" | "rectangular" | "rounded";
|
|
10
9
|
animation: "pulse" | "wave" | "none";
|
|
10
|
+
variant: "text" | "circular" | "rectangular" | "rounded";
|
|
11
11
|
lines: number;
|
|
12
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
23
23
|
onSelect?: ((args_0: SpotlightResult) => any) | undefined;
|
|
24
24
|
"onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
-
loading: boolean;
|
|
27
26
|
placeholder: string;
|
|
27
|
+
loading: boolean;
|
|
28
28
|
noResultsText: string;
|
|
29
29
|
hotkey: string;
|
|
30
30
|
results: SpotlightResult[];
|
|
@@ -12,13 +12,13 @@ type __VLS_Slots = {} & {
|
|
|
12
12
|
default?: (props: typeof __VLS_6) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
wrap: boolean;
|
|
15
16
|
direction: "column" | "row";
|
|
16
17
|
gap: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
17
18
|
align: "start" | "center" | "end" | "stretch" | "baseline";
|
|
18
|
-
inline: boolean;
|
|
19
19
|
justify: "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
20
|
-
wrap: boolean;
|
|
21
20
|
divider: boolean;
|
|
21
|
+
inline: boolean;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|