@ws-ui/code-editor 1.5.6 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/css.worker.bundle.js +79 -77
- package/dist/assets/editor.worker.bundle.js +78 -76
- package/dist/assets/html.worker.bundle.js +79 -77
- package/dist/assets/json.worker.bundle.js +79 -77
- package/dist/assets/textmate.worker.bundle.js +110 -108
- package/dist/assets/ts.worker.bundle.js +79 -77
- package/dist/demo/LSPDemo.d.ts +0 -1
- package/dist/demo/common.d.ts +0 -1
- package/dist/demo/index.d.ts +0 -1
- package/dist/editor/Alerts.d.ts +0 -1
- package/dist/editor/extensions/types.d.ts +0 -1
- package/dist/editor/index.d.ts +1 -2
- package/dist/editor/keybindings.d.ts +0 -1
- package/dist/editor/languages/index.d.ts +0 -1
- package/dist/editor/providers/CodeEditorProvider.d.ts +0 -1
- package/dist/editor/providers/LSPProvider/WebSocketMessageReader.d.ts +0 -1
- package/dist/editor/providers/LSPProvider/WebSocketMessageWriter.d.ts +0 -1
- package/dist/editor/providers/LSPProvider/ZoomInit.d.ts +0 -1
- package/dist/editor/providers/LSPProvider/index.d.ts +0 -1
- package/dist/editor/services/index.d.ts +0 -1
- package/dist/editor/services/user/configuration.json.d.ts +88 -0
- package/dist/editor/utils/semanticTokens.d.ts +0 -1
- package/dist/editor/utils/textmateTokens.d.ts +0 -1
- package/dist/editor/utils.d.ts +1 -2
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +63 -347
- package/dist/index.es.js.map +1 -1
- package/package.json +18 -26
- package/dist/package.json +0 -100
- /package/dist/{style.css → code-editor.css} +0 -0
package/dist/index.es.js
CHANGED
|
@@ -533,9 +533,9 @@ function yt(t, e, n, i) {
|
|
|
533
533
|
let s = 0, m = 0;
|
|
534
534
|
const I = i.lineNumber - 1, h = i.column - 1;
|
|
535
535
|
for (let C = 0; C < o.length; C += 5) {
|
|
536
|
-
const f = o[C], A = o[C + 1], N = o[C + 2],
|
|
536
|
+
const f = o[C], A = o[C + 1], N = o[C + 2], x = o[C + 3], S = o[C + 4], R = s + f, b = f === 0 ? m + A : A;
|
|
537
537
|
if (I === R && b <= h && h < b + N) {
|
|
538
|
-
const L = n.legend.tokenTypes[
|
|
538
|
+
const L = n.legend.tokenTypes[x] || "not in legend (ignored)", p = [];
|
|
539
539
|
let a = S;
|
|
540
540
|
for (let Y = 0; a > 0 && Y < n.legend.tokenModifiers.length; Y++)
|
|
541
541
|
a & 1 && p.push(n.legend.tokenModifiers[Y]), a = a >> 1;
|
|
@@ -545,7 +545,7 @@ function yt(t, e, n, i) {
|
|
|
545
545
|
b + 1,
|
|
546
546
|
R + 1,
|
|
547
547
|
b + 1 + N
|
|
548
|
-
), y = {},
|
|
548
|
+
), y = {}, W = e.getColorTheme().tokenColorMap, v = e.getColorTheme().getTokenStyleMetadata(
|
|
549
549
|
L,
|
|
550
550
|
p,
|
|
551
551
|
r,
|
|
@@ -560,7 +560,7 @@ function yt(t, e, n, i) {
|
|
|
560
560
|
italic: v == null ? void 0 : v.italic,
|
|
561
561
|
underline: v == null ? void 0 : v.underline,
|
|
562
562
|
strikethrough: v == null ? void 0 : v.strikethrough,
|
|
563
|
-
foreground:
|
|
563
|
+
foreground: W[(v == null ? void 0 : v.foreground) || de.None],
|
|
564
564
|
background: void 0
|
|
565
565
|
}), { type: L, modifiers: p, range: u, metadata: O, definitions: y };
|
|
566
566
|
}
|
|
@@ -632,9 +632,9 @@ const Ce = le(void 0), xn = ({
|
|
|
632
632
|
}) => {
|
|
633
633
|
const m = Re(), [I, h] = _(s), [C, f] = _(null), A = oe(), N = oe(0);
|
|
634
634
|
V(() => {
|
|
635
|
-
e && m &&
|
|
635
|
+
e && m && x();
|
|
636
636
|
}, [e, m]);
|
|
637
|
-
const
|
|
637
|
+
const x = async () => {
|
|
638
638
|
if (!m) return;
|
|
639
639
|
const d = new Me({
|
|
640
640
|
enabled: process.env.NODE_ENV === "development",
|
|
@@ -652,31 +652,31 @@ const Ce = le(void 0), xn = ({
|
|
|
652
652
|
);
|
|
653
653
|
const c = te.getDefaultKeybindings.bind(te);
|
|
654
654
|
te.getDefaultKeybindings = () => c().filter(
|
|
655
|
-
(
|
|
655
|
+
(Z) => ![
|
|
656
656
|
"workbench.action.files.saveAs",
|
|
657
657
|
"workbench.action.files.save"
|
|
658
|
-
].includes(
|
|
658
|
+
].includes(Z.command)
|
|
659
659
|
), ce.addKeybindingRules(vt), m.languages.registerFoldingRangeProvider(r, {
|
|
660
|
-
provideFoldingRanges: function(
|
|
661
|
-
const
|
|
662
|
-
for (let
|
|
663
|
-
const U =
|
|
660
|
+
provideFoldingRanges: function(w) {
|
|
661
|
+
const Z = [], X = /\\\s*$/;
|
|
662
|
+
for (let F = 1, G = w.getLineCount(); F <= G; F++) {
|
|
663
|
+
const U = w.getLineContent(F);
|
|
664
664
|
if (X.exec(U)) {
|
|
665
|
-
let K =
|
|
665
|
+
let K = F + 1;
|
|
666
666
|
for (; K <= G; ) {
|
|
667
|
-
const ee =
|
|
667
|
+
const ee = w.getLineContent(K);
|
|
668
668
|
if (X.exec(ee) == null)
|
|
669
669
|
break;
|
|
670
670
|
K++;
|
|
671
671
|
}
|
|
672
|
-
K >
|
|
673
|
-
start:
|
|
672
|
+
K > F && (Z.push({
|
|
673
|
+
start: F,
|
|
674
674
|
end: K,
|
|
675
675
|
kind: m.languages.FoldingRangeKind.Region
|
|
676
|
-
}),
|
|
676
|
+
}), F = K);
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
return
|
|
679
|
+
return Z;
|
|
680
680
|
}
|
|
681
681
|
}), S();
|
|
682
682
|
}, S = () => {
|
|
@@ -690,7 +690,7 @@ const Ce = le(void 0), xn = ({
|
|
|
690
690
|
}
|
|
691
691
|
d.onopen = R, d.onclose = b, d.onerror = L, N.current = 0;
|
|
692
692
|
}, R = async function() {
|
|
693
|
-
const d = ze(this), g = new mt(d), c = new ft(d),
|
|
693
|
+
const d = ze(this), g = new mt(d), c = new ft(d), w = new We({
|
|
694
694
|
name: "4D Language Client",
|
|
695
695
|
clientOptions: {
|
|
696
696
|
workspaceFolder: {
|
|
@@ -712,17 +712,17 @@ const Ce = le(void 0), xn = ({
|
|
|
712
712
|
})
|
|
713
713
|
}
|
|
714
714
|
});
|
|
715
|
-
A.current =
|
|
716
|
-
const
|
|
717
|
-
A.current.sendRequest = function(X,
|
|
715
|
+
A.current = w;
|
|
716
|
+
const Z = w.sendRequest.bind(w);
|
|
717
|
+
A.current.sendRequest = function(X, F, G) {
|
|
718
718
|
return typeof X == "object" && X.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
|
|
719
|
-
|
|
720
|
-
) ? Promise.resolve() :
|
|
719
|
+
F.textDocument.uri
|
|
720
|
+
) ? Promise.resolve() : Z(X, F, G);
|
|
721
721
|
}, g.onClose(() => {
|
|
722
|
-
|
|
722
|
+
w.stop(), N.current < 3 ? setTimeout(() => {
|
|
723
723
|
N.current++, S();
|
|
724
724
|
}, 1e3) : f(new Event("WEBSOCKET_CLOSED"));
|
|
725
|
-
}),
|
|
725
|
+
}), w.needsStart() && await w.start(), h(!0);
|
|
726
726
|
}, b = () => {
|
|
727
727
|
}, L = (d) => {
|
|
728
728
|
f(d);
|
|
@@ -731,7 +731,7 @@ const Ce = le(void 0), xn = ({
|
|
|
731
731
|
const d = xe.subscribe(({ action: g, payload: c }) => {
|
|
732
732
|
switch (g) {
|
|
733
733
|
case E.WILL_SAVE:
|
|
734
|
-
|
|
734
|
+
W(c.filePath);
|
|
735
735
|
break;
|
|
736
736
|
case E.DID_SAVE:
|
|
737
737
|
T(c.filePath, c.content);
|
|
@@ -764,25 +764,25 @@ const Ce = le(void 0), xn = ({
|
|
|
764
764
|
const p = (d) => {
|
|
765
765
|
var g, c;
|
|
766
766
|
return (c = (g = A.current) == null ? void 0 : g._features) == null ? void 0 : c.find(
|
|
767
|
-
(
|
|
768
|
-
var
|
|
769
|
-
return ((
|
|
767
|
+
(w) => {
|
|
768
|
+
var Z;
|
|
769
|
+
return ((Z = w._registrationType) == null ? void 0 : Z.method) === d;
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
772
|
}, a = (d) => {
|
|
773
773
|
const g = [], c = p(d);
|
|
774
774
|
if (c)
|
|
775
|
-
for (const [
|
|
776
|
-
|
|
775
|
+
for (const [, w] of c._registrations)
|
|
776
|
+
w.provider && g.push(w.provider);
|
|
777
777
|
return g;
|
|
778
778
|
}, u = async (d, g, c) => {
|
|
779
|
-
var
|
|
780
|
-
const
|
|
779
|
+
var Z, X, F;
|
|
780
|
+
const w = a(
|
|
781
781
|
rt.method
|
|
782
782
|
);
|
|
783
|
-
if (
|
|
783
|
+
if (w[0]) {
|
|
784
784
|
const G = new Je(), U = await Promise.resolve(
|
|
785
|
-
|
|
785
|
+
w[0].full.provideDocumentSemanticTokens(
|
|
786
786
|
g,
|
|
787
787
|
G.token
|
|
788
788
|
)
|
|
@@ -791,7 +791,7 @@ const Ce = le(void 0), xn = ({
|
|
|
791
791
|
Q._themeService,
|
|
792
792
|
{
|
|
793
793
|
tokens: U,
|
|
794
|
-
legend: (
|
|
794
|
+
legend: (F = (X = (Z = A.current) == null ? void 0 : Z._capabilities) == null ? void 0 : X.semanticTokensProvider) == null ? void 0 : F.legend
|
|
795
795
|
},
|
|
796
796
|
c
|
|
797
797
|
) : null, ee = wt(
|
|
@@ -813,7 +813,7 @@ const Ce = le(void 0), xn = ({
|
|
|
813
813
|
for (const c of g)
|
|
814
814
|
c.onDidChangeDiagnosticsEmitter.fire();
|
|
815
815
|
}
|
|
816
|
-
},
|
|
816
|
+
}, W = (d, g = $e.Manual) => {
|
|
817
817
|
var c;
|
|
818
818
|
(c = A.current) == null || c.sendNotification(Ue.type, {
|
|
819
819
|
textDocument: {
|
|
@@ -1059,294 +1059,10 @@ const Zt = ({
|
|
|
1059
1059
|
]
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
|
-
}, Xt = "#/definitions/Condition", Et = {
|
|
1063
|
-
Base: {
|
|
1064
|
-
type: "object",
|
|
1065
|
-
properties: {
|
|
1066
|
-
id: {
|
|
1067
|
-
type: "string"
|
|
1068
|
-
},
|
|
1069
|
-
name: {
|
|
1070
|
-
type: "string"
|
|
1071
|
-
}
|
|
1072
|
-
},
|
|
1073
|
-
required: [
|
|
1074
|
-
"id"
|
|
1075
|
-
]
|
|
1076
|
-
},
|
|
1077
|
-
Condition: {
|
|
1078
|
-
oneOf: [
|
|
1079
|
-
{
|
|
1080
|
-
$ref: "#/definitions/Datasource"
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
$ref: "#/definitions/Privilege"
|
|
1084
|
-
},
|
|
1085
|
-
{
|
|
1086
|
-
$ref: "#/definitions/Combination"
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
$ref: "#/definitions/CurrentState"
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
$ref: "#/definitions/ParentState"
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
$ref: "#/definitions/Reference"
|
|
1096
|
-
}
|
|
1097
|
-
]
|
|
1098
|
-
},
|
|
1099
|
-
Datasource: {
|
|
1100
|
-
allOf: [
|
|
1101
|
-
{
|
|
1102
|
-
$ref: "#/definitions/Base"
|
|
1103
|
-
}
|
|
1104
|
-
],
|
|
1105
|
-
properties: {
|
|
1106
|
-
type: {
|
|
1107
|
-
const: "datasource"
|
|
1108
|
-
},
|
|
1109
|
-
path: {
|
|
1110
|
-
type: "string"
|
|
1111
|
-
},
|
|
1112
|
-
value: {
|
|
1113
|
-
type: [
|
|
1114
|
-
"number",
|
|
1115
|
-
"string",
|
|
1116
|
-
"boolean",
|
|
1117
|
-
"object",
|
|
1118
|
-
"array",
|
|
1119
|
-
"null"
|
|
1120
|
-
]
|
|
1121
|
-
},
|
|
1122
|
-
valueType: {
|
|
1123
|
-
enum: [
|
|
1124
|
-
"datasource",
|
|
1125
|
-
"hardCoded"
|
|
1126
|
-
]
|
|
1127
|
-
},
|
|
1128
|
-
dataType: {
|
|
1129
|
-
enum: [
|
|
1130
|
-
"string",
|
|
1131
|
-
"number",
|
|
1132
|
-
"date",
|
|
1133
|
-
"boolean",
|
|
1134
|
-
"array",
|
|
1135
|
-
"object"
|
|
1136
|
-
]
|
|
1137
|
-
},
|
|
1138
|
-
op: {
|
|
1139
|
-
enum: [
|
|
1140
|
-
"eq",
|
|
1141
|
-
"neq",
|
|
1142
|
-
"regex",
|
|
1143
|
-
"in",
|
|
1144
|
-
"nin",
|
|
1145
|
-
"gt",
|
|
1146
|
-
"gte",
|
|
1147
|
-
"lt",
|
|
1148
|
-
"lte"
|
|
1149
|
-
]
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
required: [
|
|
1153
|
-
"name",
|
|
1154
|
-
"type",
|
|
1155
|
-
"path",
|
|
1156
|
-
"value",
|
|
1157
|
-
"op"
|
|
1158
|
-
]
|
|
1159
|
-
},
|
|
1160
|
-
Privilege: {
|
|
1161
|
-
allOf: [
|
|
1162
|
-
{
|
|
1163
|
-
$ref: "#/definitions/Base"
|
|
1164
|
-
}
|
|
1165
|
-
],
|
|
1166
|
-
properties: {
|
|
1167
|
-
type: {
|
|
1168
|
-
const: "privilege"
|
|
1169
|
-
},
|
|
1170
|
-
value: {
|
|
1171
|
-
type: "string"
|
|
1172
|
-
},
|
|
1173
|
-
valueType: {
|
|
1174
|
-
enum: [
|
|
1175
|
-
"datasource",
|
|
1176
|
-
"hardCoded"
|
|
1177
|
-
]
|
|
1178
|
-
},
|
|
1179
|
-
op: {
|
|
1180
|
-
enum: [
|
|
1181
|
-
"eq",
|
|
1182
|
-
"neq",
|
|
1183
|
-
"regex"
|
|
1184
|
-
]
|
|
1185
|
-
}
|
|
1186
|
-
},
|
|
1187
|
-
required: [
|
|
1188
|
-
"name",
|
|
1189
|
-
"type",
|
|
1190
|
-
"value",
|
|
1191
|
-
"op"
|
|
1192
|
-
]
|
|
1193
|
-
},
|
|
1194
|
-
Combination: {
|
|
1195
|
-
allOf: [
|
|
1196
|
-
{
|
|
1197
|
-
$ref: "#/definitions/Base"
|
|
1198
|
-
}
|
|
1199
|
-
],
|
|
1200
|
-
properties: {
|
|
1201
|
-
type: {
|
|
1202
|
-
const: "combination"
|
|
1203
|
-
},
|
|
1204
|
-
op: {
|
|
1205
|
-
enum: [
|
|
1206
|
-
"and",
|
|
1207
|
-
"or"
|
|
1208
|
-
]
|
|
1209
|
-
},
|
|
1210
|
-
conditions: {
|
|
1211
|
-
type: "array",
|
|
1212
|
-
items: {
|
|
1213
|
-
$ref: "#/definitions/Condition"
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
required: [
|
|
1218
|
-
"type",
|
|
1219
|
-
"conditions",
|
|
1220
|
-
"op"
|
|
1221
|
-
]
|
|
1222
|
-
},
|
|
1223
|
-
CurrentState: {
|
|
1224
|
-
allOf: [
|
|
1225
|
-
{
|
|
1226
|
-
$ref: "#/definitions/Base"
|
|
1227
|
-
}
|
|
1228
|
-
],
|
|
1229
|
-
properties: {
|
|
1230
|
-
type: {
|
|
1231
|
-
const: "currentState"
|
|
1232
|
-
},
|
|
1233
|
-
value: {
|
|
1234
|
-
type: "string"
|
|
1235
|
-
},
|
|
1236
|
-
valueType: {
|
|
1237
|
-
enum: [
|
|
1238
|
-
"datasource",
|
|
1239
|
-
"hardCoded"
|
|
1240
|
-
]
|
|
1241
|
-
},
|
|
1242
|
-
dataType: {
|
|
1243
|
-
enum: [
|
|
1244
|
-
"string",
|
|
1245
|
-
"number",
|
|
1246
|
-
"date",
|
|
1247
|
-
"boolean",
|
|
1248
|
-
"array",
|
|
1249
|
-
"object"
|
|
1250
|
-
]
|
|
1251
|
-
},
|
|
1252
|
-
op: {
|
|
1253
|
-
enum: [
|
|
1254
|
-
"eq",
|
|
1255
|
-
"neq",
|
|
1256
|
-
"regex"
|
|
1257
|
-
]
|
|
1258
|
-
}
|
|
1259
|
-
},
|
|
1260
|
-
required: [
|
|
1261
|
-
"name",
|
|
1262
|
-
"type",
|
|
1263
|
-
"value",
|
|
1264
|
-
"op"
|
|
1265
|
-
]
|
|
1266
|
-
},
|
|
1267
|
-
ParentState: {
|
|
1268
|
-
allOf: [
|
|
1269
|
-
{
|
|
1270
|
-
$ref: "#/definitions/Base"
|
|
1271
|
-
}
|
|
1272
|
-
],
|
|
1273
|
-
properties: {
|
|
1274
|
-
type: {
|
|
1275
|
-
const: "parentState"
|
|
1276
|
-
},
|
|
1277
|
-
value: {
|
|
1278
|
-
type: "string"
|
|
1279
|
-
},
|
|
1280
|
-
valueType: {
|
|
1281
|
-
enum: [
|
|
1282
|
-
"datasource",
|
|
1283
|
-
"hardCoded"
|
|
1284
|
-
]
|
|
1285
|
-
},
|
|
1286
|
-
dataType: {
|
|
1287
|
-
enum: [
|
|
1288
|
-
"string",
|
|
1289
|
-
"number",
|
|
1290
|
-
"date",
|
|
1291
|
-
"boolean",
|
|
1292
|
-
"array",
|
|
1293
|
-
"object"
|
|
1294
|
-
]
|
|
1295
|
-
},
|
|
1296
|
-
op: {
|
|
1297
|
-
enum: [
|
|
1298
|
-
"eq",
|
|
1299
|
-
"neq",
|
|
1300
|
-
"regex"
|
|
1301
|
-
]
|
|
1302
|
-
}
|
|
1303
|
-
},
|
|
1304
|
-
required: [
|
|
1305
|
-
"name",
|
|
1306
|
-
"type",
|
|
1307
|
-
"value",
|
|
1308
|
-
"op"
|
|
1309
|
-
]
|
|
1310
|
-
},
|
|
1311
|
-
Reference: {
|
|
1312
|
-
allOf: [
|
|
1313
|
-
{
|
|
1314
|
-
$ref: "#/definitions/Base"
|
|
1315
|
-
}
|
|
1316
|
-
],
|
|
1317
|
-
properties: {
|
|
1318
|
-
type: {
|
|
1319
|
-
const: "reference"
|
|
1320
|
-
},
|
|
1321
|
-
ref: {
|
|
1322
|
-
type: "string"
|
|
1323
|
-
}
|
|
1324
|
-
},
|
|
1325
|
-
required: [
|
|
1326
|
-
"type",
|
|
1327
|
-
"ref"
|
|
1328
|
-
]
|
|
1329
|
-
}
|
|
1330
|
-
}, Kt = {
|
|
1062
|
+
}, Xt = "#/definitions/Condition", Et = { Base: { type: "object", properties: { id: { type: "string" }, name: { type: "string" } }, required: ["id"] }, Condition: { oneOf: [{ $ref: "#/definitions/Datasource" }, { $ref: "#/definitions/Privilege" }, { $ref: "#/definitions/Combination" }, { $ref: "#/definitions/CurrentState" }, { $ref: "#/definitions/ParentState" }, { $ref: "#/definitions/Reference" }] }, Datasource: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "datasource" }, path: { type: "string" }, value: { type: ["number", "string", "boolean", "object", "array", "null"] }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex", "in", "nin", "gt", "gte", "lt", "lte"] } }, required: ["name", "type", "path", "value", "op"] }, Privilege: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "privilege" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Combination: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "combination" }, op: { enum: ["and", "or"] }, conditions: { type: "array", items: { $ref: "#/definitions/Condition" } } }, required: ["type", "conditions", "op"] }, CurrentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "currentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, ParentState: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "parentState" }, value: { type: "string" }, valueType: { enum: ["datasource", "hardCoded"] }, dataType: { enum: ["string", "number", "date", "boolean", "array", "object"] }, op: { enum: ["eq", "neq", "regex"] } }, required: ["name", "type", "value", "op"] }, Reference: { allOf: [{ $ref: "#/definitions/Base" }], properties: { type: { const: "reference" }, ref: { type: "string" } }, required: ["type", "ref"] } }, Kt = {
|
|
1331
1063
|
$ref: Xt,
|
|
1332
1064
|
definitions: Et
|
|
1333
|
-
}, Bt = "array", Tt = {
|
|
1334
|
-
type: "object",
|
|
1335
|
-
properties: {
|
|
1336
|
-
class: {
|
|
1337
|
-
type: "string"
|
|
1338
|
-
},
|
|
1339
|
-
method: {
|
|
1340
|
-
type: "string"
|
|
1341
|
-
},
|
|
1342
|
-
regexPattern: {
|
|
1343
|
-
type: "string"
|
|
1344
|
-
},
|
|
1345
|
-
verbs: {
|
|
1346
|
-
type: "string"
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
}, Ot = {
|
|
1065
|
+
}, Bt = "array", Tt = { type: "object", properties: { class: { type: "string" }, method: { type: "string" }, regexPattern: { type: "string" }, verbs: { type: "string" } } }, Ot = {
|
|
1350
1066
|
type: Bt,
|
|
1351
1067
|
items: Tt
|
|
1352
1068
|
};
|
|
@@ -1362,12 +1078,12 @@ function Gt(t) {
|
|
|
1362
1078
|
function Jt(t, e) {
|
|
1363
1079
|
const n = [];
|
|
1364
1080
|
let i = [];
|
|
1365
|
-
const o = [], r = (a, u, y,
|
|
1081
|
+
const o = [], r = (a, u, y, W) => {
|
|
1366
1082
|
n.push({
|
|
1367
1083
|
startLineNumber: a,
|
|
1368
1084
|
endLineNumber: y,
|
|
1369
1085
|
startColumn: u,
|
|
1370
|
-
endColumn:
|
|
1086
|
+
endColumn: W
|
|
1371
1087
|
}), h(), I();
|
|
1372
1088
|
}, s = (a) => {
|
|
1373
1089
|
o.indexOf(a) < 0 && o.push(a);
|
|
@@ -1411,10 +1127,10 @@ function Jt(t, e) {
|
|
|
1411
1127
|
for (const u of a.changes) {
|
|
1412
1128
|
const y = C(u);
|
|
1413
1129
|
if (y.isReplacement || y.isDeletion || y.isAddition) {
|
|
1414
|
-
const
|
|
1130
|
+
const W = n.some(
|
|
1415
1131
|
(v) => u.range.startLineNumber >= v.startLineNumber && u.range.endLineNumber <= v.endLineNumber && u.range.startColumn >= v.startColumn && u.range.endColumn <= v.endColumn
|
|
1416
|
-
), T = !
|
|
1417
|
-
if (
|
|
1132
|
+
), T = !W && e && u.range.startLineNumber === 1 && u.range.startColumn === 1 && !ge(u.text);
|
|
1133
|
+
if (W || T) {
|
|
1418
1134
|
const v = t.getModel();
|
|
1419
1135
|
if (v) {
|
|
1420
1136
|
v.undo();
|
|
@@ -1426,7 +1142,7 @@ function Jt(t, e) {
|
|
|
1426
1142
|
}), N = () => {
|
|
1427
1143
|
f.dispose(), A.dispose();
|
|
1428
1144
|
};
|
|
1429
|
-
let
|
|
1145
|
+
let x = [], S = `
|
|
1430
1146
|
.idoc-readonly-mark {
|
|
1431
1147
|
cursor: not-allowed;
|
|
1432
1148
|
z-index: 1;
|
|
@@ -1439,21 +1155,21 @@ function Jt(t, e) {
|
|
|
1439
1155
|
const R = () => {
|
|
1440
1156
|
s(L), L();
|
|
1441
1157
|
}, b = () => {
|
|
1442
|
-
m(L),
|
|
1158
|
+
m(L), x = t.deltaDecorations(x, []);
|
|
1443
1159
|
}, L = () => {
|
|
1444
1160
|
const a = t.getModel();
|
|
1445
|
-
a && (
|
|
1446
|
-
|
|
1161
|
+
a && (x = t.deltaDecorations(
|
|
1162
|
+
x,
|
|
1447
1163
|
i.map(p(a))
|
|
1448
1164
|
));
|
|
1449
1165
|
}, p = (a) => (u) => {
|
|
1450
|
-
const y = a.getPositionAt(u[0]),
|
|
1166
|
+
const y = a.getPositionAt(u[0]), W = a.getPositionAt(u[1]);
|
|
1451
1167
|
return {
|
|
1452
1168
|
range: new l.Range(
|
|
1453
1169
|
y.lineNumber,
|
|
1454
1170
|
y.column,
|
|
1455
|
-
|
|
1456
|
-
|
|
1171
|
+
W.lineNumber,
|
|
1172
|
+
W.column
|
|
1457
1173
|
),
|
|
1458
1174
|
options: {
|
|
1459
1175
|
className: "idoc-readonly-mark"
|
|
@@ -1477,20 +1193,20 @@ function Mt(t, e, n) {
|
|
|
1477
1193
|
const o = (b) => b[1] < b[0] ? (i = !0, [[b[1], b[0]]]) : [[...b]], r = (b) => i ? b.map((L) => L[1] > L[0] ? m(L) : L).reverse() : b;
|
|
1478
1194
|
let s;
|
|
1479
1195
|
const m = (b) => (s = b[1], b[1] = b[0], b[0] = s, b), I = o(t);
|
|
1480
|
-
let h, C, f, A, N,
|
|
1196
|
+
let h, C, f, A, N, x, S, R;
|
|
1481
1197
|
f = I[0];
|
|
1482
1198
|
for (C of e)
|
|
1483
1199
|
for (S = C[0], R = C[1], A = 0; A < I.length; A++) {
|
|
1484
|
-
if (f = I[A], N = f[0],
|
|
1485
|
-
|
|
1200
|
+
if (f = I[A], N = f[0], x = f[1], N < S)
|
|
1201
|
+
x < S ? h = [f] : x <= R ? h = [[N, S - 1]] : h = [
|
|
1486
1202
|
[N, S - 1],
|
|
1487
|
-
[R + 1,
|
|
1203
|
+
[R + 1, x]
|
|
1488
1204
|
];
|
|
1489
1205
|
else if (N <= R)
|
|
1490
1206
|
if (S === Number.NEGATIVE_INFINITY) {
|
|
1491
1207
|
const b = R + 1;
|
|
1492
|
-
h = n === 0 ? [] : [[b,
|
|
1493
|
-
} else R === Number.POSITIVE_INFINITY ? h = n === 0 ? [] : [[S - 1, S - 1]] :
|
|
1208
|
+
h = n === 0 ? [] : [[b, x > b ? x : b]];
|
|
1209
|
+
} else R === Number.POSITIVE_INFINITY ? h = n === 0 ? [] : [[S - 1, S - 1]] : x <= R ? h = n < 0 ? [[S - 1, S - 1]] : n > 0 ? [[R + 1, R + 1]] : [] : h = [[R + 1, x]];
|
|
1494
1210
|
else
|
|
1495
1211
|
h = [f];
|
|
1496
1212
|
if (I.splice(A, 1, ...h), I.length === 1 && I[0][1] < S) return r(I);
|
|
@@ -1505,7 +1221,7 @@ function Pt(t, e) {
|
|
|
1505
1221
|
(s) => (s[1] < s[0] && (o = s[1], s[1] = s[0], s[1] = o), s)
|
|
1506
1222
|
).sort((s, m) => s[0] - m[0]), n.push(t[0]);
|
|
1507
1223
|
for (let s = 1; s < t.length; s++)
|
|
1508
|
-
i = n[n.length - 1], r = t[s], i[1]
|
|
1224
|
+
i = n[n.length - 1], r = t[s], i[1] === r[0] && !e || (i[1] === r[0] - 1 && e ? (i[1] = r[1], n.splice(n.length - 1, 1, i)) : i[1] < r[0] ? n.push(r) : i[1] < r[1] && (i[1] = r[1], n.splice(n.length - 1, 1, i)));
|
|
1509
1225
|
return n;
|
|
1510
1226
|
}
|
|
1511
1227
|
function z(t, e) {
|
|
@@ -1632,7 +1348,7 @@ const Yt = new RegExp("^[ s]+(exposed|Function)", "i"), Ht = ({
|
|
|
1632
1348
|
theme: h = ne[0],
|
|
1633
1349
|
...C
|
|
1634
1350
|
}) => {
|
|
1635
|
-
const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: N, setEditor:
|
|
1351
|
+
const { initialLineInfo: f, initialSelectionInfo: A } = s, { editor: N, setEditor: x } = xt(), { inited: S } = I;
|
|
1636
1352
|
function R(p) {
|
|
1637
1353
|
i === "css" && p.languages.registerCompletionItemProvider("css", jt), i === "json" && p.languages.json && p.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1638
1354
|
validate: !0,
|
|
@@ -1651,11 +1367,11 @@ const Yt = new RegExp("^[ s]+(exposed|Function)", "i"), Ht = ({
|
|
|
1651
1367
|
});
|
|
1652
1368
|
}
|
|
1653
1369
|
function b(p, a) {
|
|
1654
|
-
|
|
1370
|
+
x(p);
|
|
1655
1371
|
const u = p.getModel();
|
|
1656
1372
|
if (u && (u.updateOptions({ insertSpaces: !1 }), p.onKeyUp(() => {
|
|
1657
|
-
var
|
|
1658
|
-
const y = (
|
|
1373
|
+
var W;
|
|
1374
|
+
const y = (W = p.getPosition()) == null ? void 0 : W.lineNumber;
|
|
1659
1375
|
if (y) {
|
|
1660
1376
|
const T = u.getLineFirstNonWhitespaceColumn(y), v = u.getLineLength(y), O = u.getLineContent(y);
|
|
1661
1377
|
Yt.test(O) && p.executeEdits("edit-handler", [
|