@chobantonov/jsonforms-react-shadcn-webcomponent 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +91 -2
- package/dist/JsonFormsShadcnElement.d.ts +29 -0
- package/dist/index.d.ts +3 -0
- package/dist/jsonforms-react-shadcn.js +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.js +6 -0
- package/dist/register.js.map +1 -0
- package/dist/renderers.d.ts +2 -0
- package/dist/src-CLRAt7jc.mjs +9482 -0
- package/dist/src-CLRAt7jc.mjs.map +1 -0
- package/dist/standalone/AgGridControlRenderer.impl-BZS8_ocu-Dp2429lF.mjs +39184 -0
- package/dist/standalone/AgGridControlRenderer.impl-BZS8_ocu-Dp2429lF.mjs.map +1 -0
- package/dist/standalone/DynamicJSXRenderer-DyB3ZpZV-Dr83kPeb.mjs +14893 -0
- package/dist/standalone/DynamicJSXRenderer-DyB3ZpZV-Dr83kPeb.mjs.map +1 -0
- package/dist/standalone/FileArrayInput.esm-BG196JYM.mjs +760 -0
- package/dist/standalone/FileArrayInput.esm-BG196JYM.mjs.map +1 -0
- package/dist/standalone/MarkupLabelRenderer.impl-CWfdcUuH-BgJ-v1Ei.mjs +12 -0
- package/dist/standalone/MarkupLabelRenderer.impl-CWfdcUuH-BgJ-v1Ei.mjs.map +1 -0
- package/dist/standalone/MonacoControlRenderer.impl-CyjMHbOd-BP-CDX3S.mjs +773 -0
- package/dist/standalone/MonacoControlRenderer.impl-CyjMHbOd-BP-CDX3S.mjs.map +1 -0
- package/dist/standalone/RactiveTemplate-Cat7CxUp-BnyPMY_h.mjs +8028 -0
- package/dist/standalone/RactiveTemplate-Cat7CxUp-BnyPMY_h.mjs.map +1 -0
- package/dist/standalone/celTemplate-D_AGhaIL-ryXLzhcw.mjs +137 -0
- package/dist/standalone/celTemplate-D_AGhaIL-ryXLzhcw.mjs.map +1 -0
- package/dist/standalone/classPrivateFieldGet2-CAMXi-8L.mjs +22 -0
- package/dist/standalone/dynamicCel.esm-DrqwYtar.mjs +43 -0
- package/dist/standalone/dynamicCel.esm-DrqwYtar.mjs.map +1 -0
- package/dist/standalone/index.js +24493 -0
- package/dist/standalone/index.js.map +1 -0
- package/dist/standalone/jsonforms-react-extended.esm-CFwqhFcu.mjs +13760 -0
- package/dist/standalone/jsonforms-react-extended.esm-CFwqhFcu.mjs.map +1 -0
- package/dist/standalone/lib-DHN5bkVZ.mjs +3149 -0
- package/dist/standalone/lib-DHN5bkVZ.mjs.map +1 -0
- package/dist/standalone/markdown-C_y73Q0w-DE-0r4-5.mjs +3060 -0
- package/dist/standalone/markdown-C_y73Q0w-DE-0r4-5.mjs.map +1 -0
- package/dist/standalone/plainRecord.esm-D_l3rehZ.mjs +123 -0
- package/dist/standalone/plainRecord.esm-D_l3rehZ.mjs.map +1 -0
- package/dist/standalone/react-dom-DUZYP7tL.mjs +5644 -0
- package/dist/standalone/react-dom-DUZYP7tL.mjs.map +1 -0
- package/package.json +82 -3
- package/src/JsonFormsShadcnElement.tsx +208 -0
- package/src/components/ui/alert.tsx +65 -0
- package/src/components/ui/avatar.tsx +108 -0
- package/src/components/ui/breadcrumb.tsx +111 -0
- package/src/components/ui/button.tsx +64 -0
- package/src/components/ui/calendar.tsx +223 -0
- package/src/components/ui/card.tsx +91 -0
- package/src/components/ui/checkbox.tsx +31 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/dialog.tsx +175 -0
- package/src/components/ui/index.ts +12 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/item.tsx +193 -0
- package/src/components/ui/pagination.tsx +132 -0
- package/src/components/ui/popover.tsx +88 -0
- package/src/components/ui/radio-group.tsx +44 -0
- package/src/components/ui/resizable.tsx +52 -0
- package/src/components/ui/scroll-area.tsx +57 -0
- package/src/components/ui/select.tsx +189 -0
- package/src/components/ui/separator.tsx +27 -0
- package/src/components/ui/slider.tsx +62 -0
- package/src/components/ui/switch.tsx +34 -0
- package/src/components/ui/tabs.tsx +90 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/tooltip.tsx +56 -0
- package/src/components/ui/utils.ts +5 -0
- package/src/index.tsx +4 -0
- package/src/register.ts +13 -0
- package/src/renderers.ts +14 -0
- package/src/styles.css +29 -0
- package/src/vite-env.d.ts +4 -0
|
@@ -0,0 +1,773 @@
|
|
|
1
|
+
import { Bt as e, D as t, I as n, St as r, T as i, V as a, b as o, cn as s, f as c, g as l, j as u, s as d, sn as f } from "./jsonforms-react-extended.esm-CFwqhFcu.mjs";
|
|
2
|
+
import { a as p, f as m, i as h } from "./plainRecord.esm-D_l3rehZ.mjs";
|
|
3
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js
|
|
4
|
+
var g = /* @__PURE__ */ m(s(), 1), _ = r();
|
|
5
|
+
function v(e, t, n) {
|
|
6
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
7
|
+
value: n,
|
|
8
|
+
enumerable: !0,
|
|
9
|
+
configurable: !0,
|
|
10
|
+
writable: !0
|
|
11
|
+
}) : e[t] = n, e;
|
|
12
|
+
}
|
|
13
|
+
function y(e, t) {
|
|
14
|
+
var n = Object.keys(e);
|
|
15
|
+
if (Object.getOwnPropertySymbols) {
|
|
16
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
17
|
+
t && (r = r.filter(function(t) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
19
|
+
})), n.push.apply(n, r);
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function b(e) {
|
|
24
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
25
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
26
|
+
t % 2 ? y(Object(n), !0).forEach(function(t) {
|
|
27
|
+
v(e, t, n[t]);
|
|
28
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : y(Object(n)).forEach(function(t) {
|
|
29
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
function x(e, t) {
|
|
35
|
+
if (e == null) return {};
|
|
36
|
+
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], t.indexOf(i) >= 0 || (n[i] = e[i]);
|
|
37
|
+
return n;
|
|
38
|
+
}
|
|
39
|
+
function S(e, t) {
|
|
40
|
+
if (e == null) return {};
|
|
41
|
+
var n = x(e, t), r, i;
|
|
42
|
+
if (Object.getOwnPropertySymbols) {
|
|
43
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
44
|
+
for (i = 0; i < a.length; i++) r = a[i], t.indexOf(r) >= 0 || Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
45
|
+
}
|
|
46
|
+
return n;
|
|
47
|
+
}
|
|
48
|
+
function C(e, t) {
|
|
49
|
+
return w(e) || T(e, t) || E(e, t) || O();
|
|
50
|
+
}
|
|
51
|
+
function w(e) {
|
|
52
|
+
if (Array.isArray(e)) return e;
|
|
53
|
+
}
|
|
54
|
+
function T(e, t) {
|
|
55
|
+
if (typeof Symbol < "u" && Symbol.iterator in Object(e)) {
|
|
56
|
+
var n = [], r = !0, i = !1, a = void 0;
|
|
57
|
+
try {
|
|
58
|
+
for (var o = e[Symbol.iterator](), s; !(r = (s = o.next()).done) && (n.push(s.value), !(t && n.length === t)); r = !0);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
i = !0, a = e;
|
|
61
|
+
} finally {
|
|
62
|
+
try {
|
|
63
|
+
!r && o.return != null && o.return();
|
|
64
|
+
} finally {
|
|
65
|
+
if (i) throw a;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function E(e, t) {
|
|
72
|
+
if (e) {
|
|
73
|
+
if (typeof e == "string") return D(e, t);
|
|
74
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
75
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
76
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return D(e, t);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function D(e, t) {
|
|
80
|
+
(t == null || t > e.length) && (t = e.length);
|
|
81
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
82
|
+
return r;
|
|
83
|
+
}
|
|
84
|
+
function O() {
|
|
85
|
+
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
86
|
+
}
|
|
87
|
+
// ../../node_modules/.pnpm/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js
|
|
88
|
+
function k(e, t, n) {
|
|
89
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
90
|
+
value: n,
|
|
91
|
+
enumerable: !0,
|
|
92
|
+
configurable: !0,
|
|
93
|
+
writable: !0
|
|
94
|
+
}) : e[t] = n, e;
|
|
95
|
+
}
|
|
96
|
+
function A(e, t) {
|
|
97
|
+
var n = Object.keys(e);
|
|
98
|
+
if (Object.getOwnPropertySymbols) {
|
|
99
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
100
|
+
t && (r = r.filter(function(t) {
|
|
101
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
102
|
+
})), n.push.apply(n, r);
|
|
103
|
+
}
|
|
104
|
+
return n;
|
|
105
|
+
}
|
|
106
|
+
function j(e) {
|
|
107
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
108
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
109
|
+
t % 2 ? A(Object(n), !0).forEach(function(t) {
|
|
110
|
+
k(e, t, n[t]);
|
|
111
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : A(Object(n)).forEach(function(t) {
|
|
112
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return e;
|
|
116
|
+
}
|
|
117
|
+
function M() {
|
|
118
|
+
var e = [...arguments];
|
|
119
|
+
return function(t) {
|
|
120
|
+
return e.reduceRight(function(e, t) {
|
|
121
|
+
return t(e);
|
|
122
|
+
}, t);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function N(e) {
|
|
126
|
+
return function t() {
|
|
127
|
+
var n = this, r = [...arguments];
|
|
128
|
+
return r.length >= e.length ? e.apply(this, r) : function() {
|
|
129
|
+
var e = [...arguments];
|
|
130
|
+
return t.apply(n, [].concat(r, e));
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function P(e) {
|
|
135
|
+
return {}.toString.call(e).includes("Object");
|
|
136
|
+
}
|
|
137
|
+
function F(e) {
|
|
138
|
+
return !Object.keys(e).length;
|
|
139
|
+
}
|
|
140
|
+
function I(e) {
|
|
141
|
+
return typeof e == "function";
|
|
142
|
+
}
|
|
143
|
+
function L(e, t) {
|
|
144
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
145
|
+
}
|
|
146
|
+
function R(e, t) {
|
|
147
|
+
return P(t) || B("changeType"), Object.keys(t).some(function(t) {
|
|
148
|
+
return !L(e, t);
|
|
149
|
+
}) && B("changeField"), t;
|
|
150
|
+
}
|
|
151
|
+
function z(e) {
|
|
152
|
+
I(e) || B("selectorType");
|
|
153
|
+
}
|
|
154
|
+
function ee(e) {
|
|
155
|
+
I(e) || P(e) || B("handlerType"), P(e) && Object.values(e).some(function(e) {
|
|
156
|
+
return !I(e);
|
|
157
|
+
}) && B("handlersType");
|
|
158
|
+
}
|
|
159
|
+
function te(e) {
|
|
160
|
+
e || B("initialIsRequired"), P(e) || B("initialType"), F(e) && B("initialContent");
|
|
161
|
+
}
|
|
162
|
+
function ne(e, t) {
|
|
163
|
+
throw Error(e[t] || e.default);
|
|
164
|
+
}
|
|
165
|
+
var B = N(ne)({
|
|
166
|
+
initialIsRequired: "initial state is required",
|
|
167
|
+
initialType: "initial state should be an object",
|
|
168
|
+
initialContent: "initial state shouldn't be an empty object",
|
|
169
|
+
handlerType: "handler should be an object or a function",
|
|
170
|
+
handlersType: "all handlers should be a functions",
|
|
171
|
+
selectorType: "selector should be a function",
|
|
172
|
+
changeType: "provided value of changes should be an object",
|
|
173
|
+
changeField: "it seams you want to change a field in the state which is not specified in the \"initial\" state",
|
|
174
|
+
default: "an unknown error accured in `state-local` package"
|
|
175
|
+
}), V = {
|
|
176
|
+
changes: R,
|
|
177
|
+
selector: z,
|
|
178
|
+
handler: ee,
|
|
179
|
+
initial: te
|
|
180
|
+
};
|
|
181
|
+
function H(e) {
|
|
182
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
183
|
+
V.initial(e), V.handler(t);
|
|
184
|
+
var n = { current: e }, r = N(ae)(n, t), i = N(ie)(n), a = N(V.changes)(e), o = N(re)(n);
|
|
185
|
+
function s() {
|
|
186
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(e) {
|
|
187
|
+
return e;
|
|
188
|
+
};
|
|
189
|
+
return V.selector(e), e(n.current);
|
|
190
|
+
}
|
|
191
|
+
function c(e) {
|
|
192
|
+
M(r, i, a, o)(e);
|
|
193
|
+
}
|
|
194
|
+
return [s, c];
|
|
195
|
+
}
|
|
196
|
+
function re(e, t) {
|
|
197
|
+
return I(t) ? t(e.current) : t;
|
|
198
|
+
}
|
|
199
|
+
function ie(e, t) {
|
|
200
|
+
return e.current = j(j({}, e.current), t), t;
|
|
201
|
+
}
|
|
202
|
+
function ae(e, t, n) {
|
|
203
|
+
return I(t) ? t(e.current) : Object.keys(n).forEach(function(n) {
|
|
204
|
+
var r;
|
|
205
|
+
return (r = t[n]) == null ? void 0 : r.call(t, e.current[n]);
|
|
206
|
+
}), n;
|
|
207
|
+
}
|
|
208
|
+
var oe = { create: H }, se = { paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs" } };
|
|
209
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/curry.js
|
|
210
|
+
function ce(e) {
|
|
211
|
+
return function t() {
|
|
212
|
+
var n = this, r = [...arguments];
|
|
213
|
+
return r.length >= e.length ? e.apply(this, r) : function() {
|
|
214
|
+
var e = [...arguments];
|
|
215
|
+
return t.apply(n, [].concat(r, e));
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js
|
|
220
|
+
function U(e) {
|
|
221
|
+
return {}.toString.call(e).includes("Object");
|
|
222
|
+
}
|
|
223
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/validators/index.js
|
|
224
|
+
function le(e) {
|
|
225
|
+
return e || G("configIsRequired"), U(e) || G("configType"), e.urls ? (ue(), { paths: { vs: e.urls.monacoBase } }) : e;
|
|
226
|
+
}
|
|
227
|
+
function ue() {
|
|
228
|
+
console.warn(de.deprecation);
|
|
229
|
+
}
|
|
230
|
+
function W(e, t) {
|
|
231
|
+
throw Error(e[t] || e.default);
|
|
232
|
+
}
|
|
233
|
+
var de = {
|
|
234
|
+
configIsRequired: "the configuration object is required",
|
|
235
|
+
configType: "the configuration object should be an object",
|
|
236
|
+
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
237
|
+
deprecation: "Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "
|
|
238
|
+
}, G = ce(W)(de), K = { config: le }, fe = function() {
|
|
239
|
+
var e = [...arguments];
|
|
240
|
+
return function(t) {
|
|
241
|
+
return e.reduceRight(function(e, t) {
|
|
242
|
+
return t(e);
|
|
243
|
+
}, t);
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js
|
|
247
|
+
function q(e, t) {
|
|
248
|
+
return Object.keys(t).forEach(function(n) {
|
|
249
|
+
t[n] instanceof Object && e[n] && Object.assign(t[n], q(e[n], t[n]));
|
|
250
|
+
}), b(b({}, e), t);
|
|
251
|
+
}
|
|
252
|
+
// ../../node_modules/.pnpm/@monaco-editor+loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js
|
|
253
|
+
var pe = {
|
|
254
|
+
type: "cancelation",
|
|
255
|
+
msg: "operation is manually canceled"
|
|
256
|
+
};
|
|
257
|
+
function J(e) {
|
|
258
|
+
var t = !1, n = new Promise(function(n, r) {
|
|
259
|
+
e.then(function(e) {
|
|
260
|
+
return t ? r(pe) : n(e);
|
|
261
|
+
}), e.catch(r);
|
|
262
|
+
});
|
|
263
|
+
return n.cancel = function() {
|
|
264
|
+
return t = !0;
|
|
265
|
+
}, n;
|
|
266
|
+
}
|
|
267
|
+
var me = C(oe.create({
|
|
268
|
+
config: se,
|
|
269
|
+
isInitialized: !1,
|
|
270
|
+
resolve: null,
|
|
271
|
+
reject: null,
|
|
272
|
+
monaco: null
|
|
273
|
+
}), 2), Y = me[0], X = me[1];
|
|
274
|
+
function he(e) {
|
|
275
|
+
var t = K.config(e), n = t.monaco, r = S(t, ["monaco"]);
|
|
276
|
+
X(function(e) {
|
|
277
|
+
return {
|
|
278
|
+
config: q(e.config, r),
|
|
279
|
+
monaco: n
|
|
280
|
+
};
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function ge() {
|
|
284
|
+
var e = Y(function(e) {
|
|
285
|
+
return {
|
|
286
|
+
monaco: e.monaco,
|
|
287
|
+
isInitialized: e.isInitialized,
|
|
288
|
+
resolve: e.resolve
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
if (!e.isInitialized) {
|
|
292
|
+
if (X({ isInitialized: !0 }), e.monaco) return e.resolve(e.monaco), J(Ce);
|
|
293
|
+
if (window.monaco && window.monaco.editor) return xe(window.monaco), e.resolve(window.monaco), J(Ce);
|
|
294
|
+
fe(_e, ye)(be);
|
|
295
|
+
}
|
|
296
|
+
return J(Ce);
|
|
297
|
+
}
|
|
298
|
+
function _e(e) {
|
|
299
|
+
return document.body.appendChild(e);
|
|
300
|
+
}
|
|
301
|
+
function ve(e) {
|
|
302
|
+
var t = document.createElement("script");
|
|
303
|
+
return e && (t.src = e), t;
|
|
304
|
+
}
|
|
305
|
+
function ye(e) {
|
|
306
|
+
var t = Y(function(e) {
|
|
307
|
+
return {
|
|
308
|
+
config: e.config,
|
|
309
|
+
reject: e.reject
|
|
310
|
+
};
|
|
311
|
+
}), n = ve(`${t.config.paths.vs}/loader.js`);
|
|
312
|
+
return n.onload = function() {
|
|
313
|
+
return e();
|
|
314
|
+
}, n.onerror = t.reject, n;
|
|
315
|
+
}
|
|
316
|
+
function be() {
|
|
317
|
+
var e = Y(function(e) {
|
|
318
|
+
return {
|
|
319
|
+
config: e.config,
|
|
320
|
+
resolve: e.resolve,
|
|
321
|
+
reject: e.reject
|
|
322
|
+
};
|
|
323
|
+
}), t = window.require;
|
|
324
|
+
t.config(e.config), t(["vs/editor/editor.main"], function(t) {
|
|
325
|
+
xe(t), e.resolve(t);
|
|
326
|
+
}, function(t) {
|
|
327
|
+
e.reject(t);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function xe(e) {
|
|
331
|
+
Y().monaco || X({ monaco: e });
|
|
332
|
+
}
|
|
333
|
+
function Se() {
|
|
334
|
+
return Y(function(e) {
|
|
335
|
+
return e.monaco;
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
var Ce = new Promise(function(e, t) {
|
|
339
|
+
return X({
|
|
340
|
+
resolve: e,
|
|
341
|
+
reject: t
|
|
342
|
+
});
|
|
343
|
+
}), we = {
|
|
344
|
+
config: he,
|
|
345
|
+
init: ge,
|
|
346
|
+
__getMonacoInstance: Se
|
|
347
|
+
};
|
|
348
|
+
// ../../node_modules/.pnpm/@monaco-editor+react@4.7.0_monaco-editor@0.52.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@monaco-editor/react/dist/index.mjs
|
|
349
|
+
p();
|
|
350
|
+
var Te = {
|
|
351
|
+
wrapper: {
|
|
352
|
+
display: "flex",
|
|
353
|
+
position: "relative",
|
|
354
|
+
textAlign: "initial"
|
|
355
|
+
},
|
|
356
|
+
fullWidth: { width: "100%" },
|
|
357
|
+
hide: { display: "none" }
|
|
358
|
+
}, Ee = { container: {
|
|
359
|
+
display: "flex",
|
|
360
|
+
height: "100%",
|
|
361
|
+
width: "100%",
|
|
362
|
+
justifyContent: "center",
|
|
363
|
+
alignItems: "center"
|
|
364
|
+
} };
|
|
365
|
+
function De({ children: e }) {
|
|
366
|
+
return g.createElement("div", { style: Ee.container }, e);
|
|
367
|
+
}
|
|
368
|
+
var Oe = De;
|
|
369
|
+
function ke({ width: e, height: t, isEditorReady: n, loading: r, _ref: i, className: a, wrapperProps: o }) {
|
|
370
|
+
return g.createElement("section", h({ style: h(h({}, Te.wrapper), {}, {
|
|
371
|
+
width: e,
|
|
372
|
+
height: t
|
|
373
|
+
}) }, o), !n && g.createElement(Oe, null, r), g.createElement("div", {
|
|
374
|
+
ref: i,
|
|
375
|
+
style: h(h({}, Te.fullWidth), !n && Te.hide),
|
|
376
|
+
className: a
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
var Ae = (0, g.memo)(ke);
|
|
380
|
+
function je(e) {
|
|
381
|
+
(0, g.useEffect)(e, []);
|
|
382
|
+
}
|
|
383
|
+
var Me = je;
|
|
384
|
+
function Ne(e, t, n = !0) {
|
|
385
|
+
let r = (0, g.useRef)(!0);
|
|
386
|
+
(0, g.useEffect)(r.current || !n ? () => {
|
|
387
|
+
r.current = !1;
|
|
388
|
+
} : e, t);
|
|
389
|
+
}
|
|
390
|
+
var Z = Ne;
|
|
391
|
+
function Q() {}
|
|
392
|
+
function $(e, t, n, r) {
|
|
393
|
+
return Pe(e, r) || Fe(e, t, n, r);
|
|
394
|
+
}
|
|
395
|
+
function Pe(e, t) {
|
|
396
|
+
return e.editor.getModel(Ie(e, t));
|
|
397
|
+
}
|
|
398
|
+
function Fe(e, t, n, r) {
|
|
399
|
+
return e.editor.createModel(t, n, r ? Ie(e, r) : void 0);
|
|
400
|
+
}
|
|
401
|
+
function Ie(e, t) {
|
|
402
|
+
return e.Uri.parse(t);
|
|
403
|
+
}
|
|
404
|
+
function Le({ original: e, modified: t, language: n, originalLanguage: r, modifiedLanguage: i, originalModelPath: a, modifiedModelPath: o, keepCurrentOriginalModel: s = !1, keepCurrentModifiedModel: c = !1, theme: l = "light", loading: u = "Loading...", options: d = {}, height: f = "100%", width: p = "100%", className: m, wrapperProps: _ = {}, beforeMount: v = Q, onMount: y = Q }) {
|
|
405
|
+
let [b, x] = (0, g.useState)(!1), [S, C] = (0, g.useState)(!0), w = (0, g.useRef)(null), T = (0, g.useRef)(null), E = (0, g.useRef)(null), D = (0, g.useRef)(y), O = (0, g.useRef)(v), k = (0, g.useRef)(!1);
|
|
406
|
+
Me(() => {
|
|
407
|
+
let e = we.init();
|
|
408
|
+
return e.then((e) => (T.current = e) && C(!1)).catch((e) => (e == null ? void 0 : e.type) !== "cancelation" && console.error("Monaco initialization: error:", e)), () => w.current ? M() : e.cancel();
|
|
409
|
+
}), Z(() => {
|
|
410
|
+
if (w.current && T.current) {
|
|
411
|
+
let t = w.current.getOriginalEditor(), i = $(T.current, e || "", r || n || "text", a || "");
|
|
412
|
+
i !== t.getModel() && t.setModel(i);
|
|
413
|
+
}
|
|
414
|
+
}, [a], b), Z(() => {
|
|
415
|
+
if (w.current && T.current) {
|
|
416
|
+
let e = w.current.getModifiedEditor(), r = $(T.current, t || "", i || n || "text", o || "");
|
|
417
|
+
r !== e.getModel() && e.setModel(r);
|
|
418
|
+
}
|
|
419
|
+
}, [o], b), Z(() => {
|
|
420
|
+
let e = w.current.getModifiedEditor();
|
|
421
|
+
e.getOption(T.current.editor.EditorOption.readOnly) ? e.setValue(t || "") : t !== e.getValue() && (e.executeEdits("", [{
|
|
422
|
+
range: e.getModel().getFullModelRange(),
|
|
423
|
+
text: t || "",
|
|
424
|
+
forceMoveMarkers: !0
|
|
425
|
+
}]), e.pushUndoStop());
|
|
426
|
+
}, [t], b), Z(() => {
|
|
427
|
+
var t;
|
|
428
|
+
(t = w.current) == null || (t = t.getModel()) == null || t.original.setValue(e || "");
|
|
429
|
+
}, [e], b), Z(() => {
|
|
430
|
+
let { original: e, modified: t } = w.current.getModel();
|
|
431
|
+
T.current.editor.setModelLanguage(e, r || n || "text"), T.current.editor.setModelLanguage(t, i || n || "text");
|
|
432
|
+
}, [
|
|
433
|
+
n,
|
|
434
|
+
r,
|
|
435
|
+
i
|
|
436
|
+
], b), Z(() => {
|
|
437
|
+
var e;
|
|
438
|
+
(e = T.current) == null || e.editor.setTheme(l);
|
|
439
|
+
}, [l], b), Z(() => {
|
|
440
|
+
var e;
|
|
441
|
+
(e = w.current) == null || e.updateOptions(d);
|
|
442
|
+
}, [d], b);
|
|
443
|
+
let A = (0, g.useCallback)(() => {
|
|
444
|
+
var s;
|
|
445
|
+
if (!T.current) return;
|
|
446
|
+
O.current(T.current);
|
|
447
|
+
let c = $(T.current, e || "", r || n || "text", a || ""), l = $(T.current, t || "", i || n || "text", o || "");
|
|
448
|
+
(s = w.current) == null || s.setModel({
|
|
449
|
+
original: c,
|
|
450
|
+
modified: l
|
|
451
|
+
});
|
|
452
|
+
}, [
|
|
453
|
+
n,
|
|
454
|
+
t,
|
|
455
|
+
i,
|
|
456
|
+
e,
|
|
457
|
+
r,
|
|
458
|
+
a,
|
|
459
|
+
o
|
|
460
|
+
]), j = (0, g.useCallback)(() => {
|
|
461
|
+
var e;
|
|
462
|
+
!k.current && E.current && (w.current = T.current.editor.createDiffEditor(E.current, h({ automaticLayout: !0 }, d)), A(), (e = T.current) == null || e.editor.setTheme(l), x(!0), k.current = !0);
|
|
463
|
+
}, [
|
|
464
|
+
d,
|
|
465
|
+
l,
|
|
466
|
+
A
|
|
467
|
+
]);
|
|
468
|
+
(0, g.useEffect)(() => {
|
|
469
|
+
b && D.current(w.current, T.current);
|
|
470
|
+
}, [b]), (0, g.useEffect)(() => {
|
|
471
|
+
!S && !b && j();
|
|
472
|
+
}, [
|
|
473
|
+
S,
|
|
474
|
+
b,
|
|
475
|
+
j
|
|
476
|
+
]);
|
|
477
|
+
function M() {
|
|
478
|
+
var e, t, n, r;
|
|
479
|
+
let i = (e = w.current) == null ? void 0 : e.getModel();
|
|
480
|
+
s || i == null || (t = i.original) == null || t.dispose(), c || i == null || (n = i.modified) == null || n.dispose(), (r = w.current) == null || r.dispose();
|
|
481
|
+
}
|
|
482
|
+
return g.createElement(Ae, {
|
|
483
|
+
width: p,
|
|
484
|
+
height: f,
|
|
485
|
+
isEditorReady: b,
|
|
486
|
+
loading: u,
|
|
487
|
+
_ref: E,
|
|
488
|
+
className: m,
|
|
489
|
+
wrapperProps: _
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
(0, g.memo)(Le);
|
|
493
|
+
function Re(e) {
|
|
494
|
+
let t = (0, g.useRef)();
|
|
495
|
+
return (0, g.useEffect)(() => {
|
|
496
|
+
t.current = e;
|
|
497
|
+
}, [e]), t.current;
|
|
498
|
+
}
|
|
499
|
+
var ze = Re, Be = /* @__PURE__ */ new Map();
|
|
500
|
+
function Ve({ defaultValue: e, defaultLanguage: t, defaultPath: n, value: r, language: i, path: a, theme: o = "light", line: s, loading: c = "Loading...", options: l = {}, overrideServices: u = {}, saveViewState: d = !0, keepCurrentModel: f = !1, width: p = "100%", height: m = "100%", className: _, wrapperProps: v = {}, beforeMount: y = Q, onMount: b = Q, onChange: x, onValidate: S = Q }) {
|
|
501
|
+
let [C, w] = (0, g.useState)(!1), [T, E] = (0, g.useState)(!0), D = (0, g.useRef)(null), O = (0, g.useRef)(null), k = (0, g.useRef)(null), A = (0, g.useRef)(b), j = (0, g.useRef)(y), M = (0, g.useRef)(), N = (0, g.useRef)(r), P = ze(a), F = (0, g.useRef)(!1), I = (0, g.useRef)(!1);
|
|
502
|
+
Me(() => {
|
|
503
|
+
let e = we.init();
|
|
504
|
+
return e.then((e) => (D.current = e) && E(!1)).catch((e) => (e == null ? void 0 : e.type) !== "cancelation" && console.error("Monaco initialization: error:", e)), () => O.current ? R() : e.cancel();
|
|
505
|
+
}), Z(() => {
|
|
506
|
+
var o, s, c, l;
|
|
507
|
+
let u = $(D.current, e || r || "", t || i || "", a || n || "");
|
|
508
|
+
u !== ((o = O.current) == null ? void 0 : o.getModel()) && (d && Be.set(P, (s = O.current) == null ? void 0 : s.saveViewState()), (c = O.current) == null || c.setModel(u), d && ((l = O.current) == null || l.restoreViewState(Be.get(a))));
|
|
509
|
+
}, [a], C), Z(() => {
|
|
510
|
+
var e;
|
|
511
|
+
(e = O.current) == null || e.updateOptions(l);
|
|
512
|
+
}, [l], C), Z(() => {
|
|
513
|
+
!O.current || r === void 0 || (O.current.getOption(D.current.editor.EditorOption.readOnly) ? O.current.setValue(r) : r !== O.current.getValue() && (I.current = !0, O.current.executeEdits("", [{
|
|
514
|
+
range: O.current.getModel().getFullModelRange(),
|
|
515
|
+
text: r,
|
|
516
|
+
forceMoveMarkers: !0
|
|
517
|
+
}]), O.current.pushUndoStop(), I.current = !1));
|
|
518
|
+
}, [r], C), Z(() => {
|
|
519
|
+
var e, t;
|
|
520
|
+
let n = (e = O.current) == null ? void 0 : e.getModel();
|
|
521
|
+
n && i && ((t = D.current) == null || t.editor.setModelLanguage(n, i));
|
|
522
|
+
}, [i], C), Z(() => {
|
|
523
|
+
var e;
|
|
524
|
+
s !== void 0 && ((e = O.current) == null || e.revealLine(s));
|
|
525
|
+
}, [s], C), Z(() => {
|
|
526
|
+
var e;
|
|
527
|
+
(e = D.current) == null || e.editor.setTheme(o);
|
|
528
|
+
}, [o], C);
|
|
529
|
+
let L = (0, g.useCallback)(() => {
|
|
530
|
+
if (k.current && D.current && !F.current) {
|
|
531
|
+
var c;
|
|
532
|
+
j.current(D.current);
|
|
533
|
+
let f = a || n, p = $(D.current, r || e || "", t || i || "", f || "");
|
|
534
|
+
O.current = (c = D.current) == null ? void 0 : c.editor.create(k.current, h({
|
|
535
|
+
model: p,
|
|
536
|
+
automaticLayout: !0
|
|
537
|
+
}, l), u), d && O.current.restoreViewState(Be.get(f)), D.current.editor.setTheme(o), s !== void 0 && O.current.revealLine(s), w(!0), F.current = !0;
|
|
538
|
+
}
|
|
539
|
+
}, [
|
|
540
|
+
e,
|
|
541
|
+
t,
|
|
542
|
+
n,
|
|
543
|
+
r,
|
|
544
|
+
i,
|
|
545
|
+
a,
|
|
546
|
+
l,
|
|
547
|
+
u,
|
|
548
|
+
d,
|
|
549
|
+
o,
|
|
550
|
+
s
|
|
551
|
+
]);
|
|
552
|
+
(0, g.useEffect)(() => {
|
|
553
|
+
C && A.current(O.current, D.current);
|
|
554
|
+
}, [C]), (0, g.useEffect)(() => {
|
|
555
|
+
!T && !C && L();
|
|
556
|
+
}, [
|
|
557
|
+
T,
|
|
558
|
+
C,
|
|
559
|
+
L
|
|
560
|
+
]), N.current = r, (0, g.useEffect)(() => {
|
|
561
|
+
var e, t;
|
|
562
|
+
C && x && ((e = M.current) == null || e.dispose(), M.current = (t = O.current) == null ? void 0 : t.onDidChangeModelContent((e) => {
|
|
563
|
+
I.current || x(O.current.getValue(), e);
|
|
564
|
+
}));
|
|
565
|
+
}, [C, x]), (0, g.useEffect)(() => {
|
|
566
|
+
if (C) {
|
|
567
|
+
let e = D.current.editor.onDidChangeMarkers((e) => {
|
|
568
|
+
var t;
|
|
569
|
+
let n = (t = O.current.getModel()) == null ? void 0 : t.uri;
|
|
570
|
+
if (n && e.find((e) => e.path === n.path)) {
|
|
571
|
+
let e = D.current.editor.getModelMarkers({ resource: n });
|
|
572
|
+
S == null || S(e);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
return () => {
|
|
576
|
+
e == null || e.dispose();
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
return () => {};
|
|
580
|
+
}, [C, S]);
|
|
581
|
+
function R() {
|
|
582
|
+
var e, t;
|
|
583
|
+
(e = M.current) == null || e.dispose(), f ? d && Be.set(a, O.current.saveViewState()) : (t = O.current.getModel()) == null || t.dispose(), O.current.dispose();
|
|
584
|
+
}
|
|
585
|
+
return g.createElement(Ae, {
|
|
586
|
+
width: p,
|
|
587
|
+
height: m,
|
|
588
|
+
isEditorReady: C,
|
|
589
|
+
loading: c,
|
|
590
|
+
_ref: k,
|
|
591
|
+
className: _,
|
|
592
|
+
wrapperProps: v
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
var He = (0, g.memo)(Ve), Ue = (e) => {
|
|
596
|
+
(0, g.useEffect)(() => {
|
|
597
|
+
var t;
|
|
598
|
+
let n = (t = e.current) == null ? void 0 : t.getRootNode();
|
|
599
|
+
if (!(n instanceof ShadowRoot)) return;
|
|
600
|
+
let r = /* @__PURE__ */ new Map(), i = () => {
|
|
601
|
+
for (let i of Array.from(document.head.querySelectorAll("style, link[rel=\"stylesheet\"]"))) {
|
|
602
|
+
var e, t;
|
|
603
|
+
let a = (e = (t = i.getAttribute("href")) == null ? i.textContent : t) == null ? "" : e;
|
|
604
|
+
if (!/monaco|\/vs\//i.test(a)) continue;
|
|
605
|
+
let o = r.get(i);
|
|
606
|
+
if (o && o.textContent === i.textContent && o.getAttribute("href") === i.getAttribute("href")) continue;
|
|
607
|
+
let s = i.cloneNode(!0);
|
|
608
|
+
o ? o.replaceWith(s) : n.appendChild(s), r.set(i, s);
|
|
609
|
+
}
|
|
610
|
+
for (let [e, t] of r) e.isConnected || (t.remove(), r.delete(e));
|
|
611
|
+
}, a = new MutationObserver(i);
|
|
612
|
+
return a.observe(document.head, {
|
|
613
|
+
childList: !0,
|
|
614
|
+
subtree: !0,
|
|
615
|
+
characterData: !0,
|
|
616
|
+
attributes: !0
|
|
617
|
+
}), i(), () => {
|
|
618
|
+
a.disconnect(), r.forEach((e) => e.remove());
|
|
619
|
+
};
|
|
620
|
+
}, [e]);
|
|
621
|
+
}, We = ({ children: e, maximized: t }) => /* @__PURE__ */ (0, _.jsx)("div", {
|
|
622
|
+
style: {
|
|
623
|
+
position: "relative",
|
|
624
|
+
height: t ? "100%" : void 0
|
|
625
|
+
},
|
|
626
|
+
children: e
|
|
627
|
+
}), Ge = ({ Frame: r, Button: s, MaximizeIcon: p, MinimizeIcon: m, Surface: h, useEditorTheme: v }) => {
|
|
628
|
+
let y = v == null ? (() => void 0) : v, b = h == null ? We : h;
|
|
629
|
+
return (h) => {
|
|
630
|
+
var v, x, S, C, w, T, E, D;
|
|
631
|
+
let O = (0, g.useRef)(null), k = (0, g.useRef)(null), [A, j] = (0, g.useState)(!1), [M, N] = (0, g.useState)(!1), [P, F] = (0, g.useState)(!1), I = e(), L = f(f({}, h.config), h.uischema.options), R = y(), z = d(), { isDark: ee, customTheme: te } = n(O, (v = L.theme) == null ? L.mode : v, R == null ? void 0 : R.isDark), ne = te == null ? ee ? "vs-dark" : "vs" : te;
|
|
632
|
+
Ue(O);
|
|
633
|
+
let B = i(L, (x = I.core) == null ? void 0 : x.data), V = B === "json" && L.convertJson === !0, H = o(h.data, V), [re, ie] = (0, g.useState)(H), ae = (0, g.useRef)(), oe = (0, g.useRef)(H), [se, ce] = (0, g.useState)(!1), [U, le] = (0, g.useState)(0), ue = (0, g.useId)(), [W, de] = (0, g.useState)(null), G = `inmemory://jsonforms/mixed-${encodeURIComponent(ue)}.json`, K = L.validateJsonSchema === !0;
|
|
634
|
+
(0, g.useEffect)(() => {
|
|
635
|
+
var e, t;
|
|
636
|
+
if (!W || !K) return;
|
|
637
|
+
let n = W.languages.json.jsonDefaults, r = `${G}.root-schema.json`, i = `${G}.schema.json`, a = (e) => Array.isArray(e) ? e.map(a) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, e === "$ref" && typeof t == "string" && t.startsWith("#") ? r + t : a(t)])), o = [{
|
|
638
|
+
uri: r,
|
|
639
|
+
schema: f(f({}, (e = I.core) == null ? void 0 : e.schema), {}, { $id: r })
|
|
640
|
+
}, {
|
|
641
|
+
uri: i,
|
|
642
|
+
fileMatch: [G],
|
|
643
|
+
schema: a(h.schema)
|
|
644
|
+
}], s = (e) => e.uri === r || e.uri === i;
|
|
645
|
+
return n.setDiagnosticsOptions(f(f({}, n.diagnosticsOptions), {}, {
|
|
646
|
+
validate: !0,
|
|
647
|
+
schemas: [...((t = n.diagnosticsOptions.schemas) == null ? [] : t).filter((e) => !s(e)), ...o]
|
|
648
|
+
})), () => {
|
|
649
|
+
var e;
|
|
650
|
+
return n.setDiagnosticsOptions(f(f({}, n.diagnosticsOptions), {}, { schemas: ((e = n.diagnosticsOptions.schemas) == null ? [] : e).filter((e) => !s(e)) }));
|
|
651
|
+
};
|
|
652
|
+
}, [
|
|
653
|
+
W,
|
|
654
|
+
K,
|
|
655
|
+
G,
|
|
656
|
+
h.schema,
|
|
657
|
+
(S = I.core) == null ? void 0 : S.schema
|
|
658
|
+
]);
|
|
659
|
+
let fe = a(h.uischema.options, h.config) && (K ? se : U > 0) ? [l({
|
|
660
|
+
owner: ue,
|
|
661
|
+
path: h.path,
|
|
662
|
+
language: B,
|
|
663
|
+
errorCount: K ? 1 : U,
|
|
664
|
+
message: K ? z("editor.invalidJson") : U === 1 ? z("editor.languageError") : z("editor.languageErrors").replace("{count}", String(U))
|
|
665
|
+
})] : [];
|
|
666
|
+
t(ue, fe, { clearOnChange: !1 });
|
|
667
|
+
let q = R == null ? void 0 : R.background, pe = q ? {
|
|
668
|
+
"--vscode-editor-background": q,
|
|
669
|
+
"--vscode-editorGutter-background": q,
|
|
670
|
+
"--vscode-minimap-background": q,
|
|
671
|
+
"--vscode-editorStickyScroll-background": q
|
|
672
|
+
} : void 0;
|
|
673
|
+
if ((0, g.useEffect)(() => {
|
|
674
|
+
K ? oe.current !== H && (oe.current = H, ae.current !== H && (ie(H), ce(!1))) : P || (ae.current !== H && ie(H), ce(!1));
|
|
675
|
+
}, [
|
|
676
|
+
H,
|
|
677
|
+
B,
|
|
678
|
+
V,
|
|
679
|
+
P,
|
|
680
|
+
K
|
|
681
|
+
]), (0, g.useEffect)(() => {
|
|
682
|
+
let e = k.current;
|
|
683
|
+
if (!e) return;
|
|
684
|
+
let t = requestAnimationFrame(() => {
|
|
685
|
+
e.layout({
|
|
686
|
+
width: 0,
|
|
687
|
+
height: 0
|
|
688
|
+
}), requestAnimationFrame(() => e.layout());
|
|
689
|
+
});
|
|
690
|
+
return () => cancelAnimationFrame(t);
|
|
691
|
+
}, [A]), !h.visible) return null;
|
|
692
|
+
let J = (C = L.monaco) == null ? {} : C, me = J.autoGrow ? Math.max((w = J.minRows) == null ? 3 : w, Math.min((T = J.maxRows) == null ? 30 : T, re.split("\n").length)) : (E = J.rows) == null ? 10 : E, Y = !h.enabled || h.readonly, X = z(A ? "editor.restore" : "editor.maximize");
|
|
693
|
+
return /* @__PURE__ */ (0, _.jsx)(r, f(f({}, h), {}, {
|
|
694
|
+
errors: se ? z("editor.invalidJson") : h.errors,
|
|
695
|
+
children: /* @__PURE__ */ (0, _.jsx)("div", {
|
|
696
|
+
ref: O,
|
|
697
|
+
onKeyDown: (e) => {
|
|
698
|
+
e.key === "Escape" && j(!1);
|
|
699
|
+
},
|
|
700
|
+
onMouseEnter: () => N(!0),
|
|
701
|
+
onMouseLeave: () => N(!1),
|
|
702
|
+
onFocus: () => F(!0),
|
|
703
|
+
onBlur: () => F(!1),
|
|
704
|
+
style: A ? f(f({}, pe), {}, {
|
|
705
|
+
position: "fixed",
|
|
706
|
+
inset: 0,
|
|
707
|
+
zIndex: 1400,
|
|
708
|
+
background: "rgba(0, 0, 0, 0.45)",
|
|
709
|
+
padding: 24
|
|
710
|
+
}) : f(f({}, pe), {}, { minWidth: 0 }),
|
|
711
|
+
children: /* @__PURE__ */ (0, _.jsxs)(b, {
|
|
712
|
+
hovered: M,
|
|
713
|
+
focused: P,
|
|
714
|
+
disabled: Y,
|
|
715
|
+
invalid: !!(se || h.errors),
|
|
716
|
+
maximized: A,
|
|
717
|
+
children: [/* @__PURE__ */ (0, _.jsx)(He, {
|
|
718
|
+
path: K ? G : void 0,
|
|
719
|
+
value: re,
|
|
720
|
+
language: B,
|
|
721
|
+
width: L.width,
|
|
722
|
+
height: A ? "100%" : (D = L.height) == null ? me * 20 + 20 : D,
|
|
723
|
+
theme: ne,
|
|
724
|
+
options: f(f({
|
|
725
|
+
automaticLayout: !0,
|
|
726
|
+
minimap: { enabled: !1 },
|
|
727
|
+
scrollBeyondLastLine: !1,
|
|
728
|
+
padding: {
|
|
729
|
+
top: 8,
|
|
730
|
+
bottom: 8
|
|
731
|
+
}
|
|
732
|
+
}, J.options), {}, {
|
|
733
|
+
readOnly: Y,
|
|
734
|
+
ariaLabel: h.label || z("editor.ariaLabel")
|
|
735
|
+
}),
|
|
736
|
+
onMount: (e, t) => {
|
|
737
|
+
var n, r;
|
|
738
|
+
de(t), k.current = e, L.focus && e.focus();
|
|
739
|
+
for (let t of (n = J.initActions) == null ? [] : n) (r = e.getAction(t)) == null || r.run();
|
|
740
|
+
},
|
|
741
|
+
onValidate: (e) => le(c(e)),
|
|
742
|
+
onChange: (e) => {
|
|
743
|
+
if (Y) return;
|
|
744
|
+
let t = e == null ? "" : e;
|
|
745
|
+
ie(t);
|
|
746
|
+
let n = u(t, V);
|
|
747
|
+
ce(!n.valid), n.valid && (ae.current = o(n.value, V), h.handleChange(h.path, n.value));
|
|
748
|
+
}
|
|
749
|
+
}), (M || P || A) && /* @__PURE__ */ (0, _.jsx)("div", {
|
|
750
|
+
style: {
|
|
751
|
+
position: "absolute",
|
|
752
|
+
top: 4,
|
|
753
|
+
right: 4,
|
|
754
|
+
zIndex: 1,
|
|
755
|
+
lineHeight: 0,
|
|
756
|
+
background: q,
|
|
757
|
+
borderRadius: 4
|
|
758
|
+
},
|
|
759
|
+
children: /* @__PURE__ */ (0, _.jsxs)(s, {
|
|
760
|
+
onClick: () => j((e) => !e),
|
|
761
|
+
title: X,
|
|
762
|
+
"aria-label": X,
|
|
763
|
+
children: [A ? m && /* @__PURE__ */ (0, _.jsx)(m, {}) : p && /* @__PURE__ */ (0, _.jsx)(p, {}), !p && !m && X]
|
|
764
|
+
})
|
|
765
|
+
})]
|
|
766
|
+
})
|
|
767
|
+
})
|
|
768
|
+
}));
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
export { Ge as createMonacoControl };
|
|
772
|
+
|
|
773
|
+
//# sourceMappingURL=MonacoControlRenderer.impl-CyjMHbOd-BP-CDX3S.mjs.map
|