@lvce-editor/renderer-process 26.1.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rendererProcessMain.js +166 -756
- package/package.json +1 -1
|
@@ -274,7 +274,7 @@ const enabled = () => {
|
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
let id$1 = 0;
|
|
277
|
-
const create$
|
|
277
|
+
const create$L = () => {
|
|
278
278
|
return ++id$1;
|
|
279
279
|
};
|
|
280
280
|
|
|
@@ -290,7 +290,7 @@ const getFileHandles$1 = async ids => {
|
|
|
290
290
|
return handles;
|
|
291
291
|
};
|
|
292
292
|
const add$1 = promise => {
|
|
293
|
-
const id = create$
|
|
293
|
+
const id = create$L();
|
|
294
294
|
state$9[id] = promise;
|
|
295
295
|
return id;
|
|
296
296
|
};
|
|
@@ -604,7 +604,7 @@ const Video$2 = 'video';
|
|
|
604
604
|
const TextArea$1 = 'textarea';
|
|
605
605
|
const Select$1 = 'select';
|
|
606
606
|
const Option$1 = 'option';
|
|
607
|
-
const Code$
|
|
607
|
+
const Code$1 = 'code';
|
|
608
608
|
const Label$1 = 'label';
|
|
609
609
|
const Dt$2 = 'dt';
|
|
610
610
|
const Iframe$1 = 'iframe';
|
|
@@ -644,7 +644,7 @@ const Span = 8;
|
|
|
644
644
|
const Table = 9;
|
|
645
645
|
const TBody = 10;
|
|
646
646
|
const Td = 11;
|
|
647
|
-
const Text$
|
|
647
|
+
const Text$2 = 12;
|
|
648
648
|
const Th = 13;
|
|
649
649
|
const THead = 14;
|
|
650
650
|
const Tr$1 = 15;
|
|
@@ -684,7 +684,7 @@ const Video$1 = 61;
|
|
|
684
684
|
const TextArea = 62;
|
|
685
685
|
const Select = 63;
|
|
686
686
|
const Option = 64;
|
|
687
|
-
const Code
|
|
687
|
+
const Code = 65;
|
|
688
688
|
const Label = 66;
|
|
689
689
|
const Dt$1 = 67;
|
|
690
690
|
const Iframe = 68;
|
|
@@ -725,7 +725,7 @@ const VirtualDomElements = {
|
|
|
725
725
|
Canvas,
|
|
726
726
|
Circle,
|
|
727
727
|
Cite,
|
|
728
|
-
Code
|
|
728
|
+
Code,
|
|
729
729
|
Col,
|
|
730
730
|
ColGroup,
|
|
731
731
|
Data,
|
|
@@ -785,7 +785,7 @@ const VirtualDomElements = {
|
|
|
785
785
|
THead,
|
|
786
786
|
Table,
|
|
787
787
|
Td,
|
|
788
|
-
Text: Text$
|
|
788
|
+
Text: Text$2,
|
|
789
789
|
TextArea,
|
|
790
790
|
Tfoot,
|
|
791
791
|
Th,
|
|
@@ -808,7 +808,7 @@ const elementTagMap = {
|
|
|
808
808
|
[Canvas]: Canvas$1,
|
|
809
809
|
[Circle]: Circle$1,
|
|
810
810
|
[Cite]: Cite$1,
|
|
811
|
-
[Code
|
|
811
|
+
[Code]: Code$1,
|
|
812
812
|
[Col]: Col$1,
|
|
813
813
|
[ColGroup]: ColGroup$1,
|
|
814
814
|
[Data]: Data$1,
|
|
@@ -1169,7 +1169,7 @@ const getKeyCode = key => {
|
|
|
1169
1169
|
|
|
1170
1170
|
const CtrlCmd = 1 << 11 >>> 0;
|
|
1171
1171
|
const Shift = 1 << 10 >>> 0;
|
|
1172
|
-
const Alt
|
|
1172
|
+
const Alt = 1 << 9 >>> 0;
|
|
1173
1173
|
|
|
1174
1174
|
const {
|
|
1175
1175
|
getElementTag
|
|
@@ -1183,7 +1183,7 @@ const set$9 = (viewletId, instance) => {
|
|
|
1183
1183
|
instances[viewletId] = instance;
|
|
1184
1184
|
};
|
|
1185
1185
|
|
|
1186
|
-
const getEventListenerOptions
|
|
1186
|
+
const getEventListenerOptions = (eventName, value) => {
|
|
1187
1187
|
if (value.passive) {
|
|
1188
1188
|
return {
|
|
1189
1189
|
passive: true
|
|
@@ -1204,18 +1204,18 @@ const getEventListenerOptions$1 = (eventName, value) => {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
};
|
|
1206
1206
|
|
|
1207
|
-
const cache
|
|
1207
|
+
const cache = new Map();
|
|
1208
1208
|
const has$1 = listener => {
|
|
1209
|
-
return cache
|
|
1209
|
+
return cache.has(listener);
|
|
1210
1210
|
};
|
|
1211
1211
|
const set$8 = (listener, value) => {
|
|
1212
|
-
cache
|
|
1212
|
+
cache.set(listener, value);
|
|
1213
1213
|
};
|
|
1214
1214
|
const get$9 = listener => {
|
|
1215
|
-
return cache
|
|
1215
|
+
return cache.get(listener);
|
|
1216
1216
|
};
|
|
1217
1217
|
|
|
1218
|
-
const getWrappedListener
|
|
1218
|
+
const getWrappedListener = (listener, returnValue) => {
|
|
1219
1219
|
if (!returnValue) {
|
|
1220
1220
|
return listener;
|
|
1221
1221
|
}
|
|
@@ -1250,7 +1250,7 @@ const getOptions = fn => {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
return undefined;
|
|
1252
1252
|
};
|
|
1253
|
-
const attachEvent
|
|
1253
|
+
const attachEvent = ($Node, eventMap, key, value, newEventMap) => {
|
|
1254
1254
|
const keyLower = key.toLowerCase();
|
|
1255
1255
|
const listenersByEvent = attachedListeners.get($Node) || new Map();
|
|
1256
1256
|
const previous = listenersByEvent.get(keyLower);
|
|
@@ -1274,8 +1274,8 @@ const attachEvent$1 = ($Node, eventMap, key, value, newEventMap) => {
|
|
|
1274
1274
|
console.warn('listener not found', value);
|
|
1275
1275
|
return;
|
|
1276
1276
|
}
|
|
1277
|
-
const options = getEventListenerOptions
|
|
1278
|
-
const wrapped = getWrappedListener
|
|
1277
|
+
const options = getEventListenerOptions(key, value);
|
|
1278
|
+
const wrapped = getWrappedListener(listener, eventMap.returnValue);
|
|
1279
1279
|
$Node.addEventListener(keyLower, wrapped, options);
|
|
1280
1280
|
listenersByEvent.set(keyLower, {
|
|
1281
1281
|
listener: wrapped,
|
|
@@ -1326,7 +1326,7 @@ const setEventProp = ($Element, key, value, eventMap, newEventMap) => {
|
|
|
1326
1326
|
return;
|
|
1327
1327
|
}
|
|
1328
1328
|
const eventName = key.slice(2).toLowerCase();
|
|
1329
|
-
attachEvent
|
|
1329
|
+
attachEvent($Element, eventMap, eventName, value, newEventMap);
|
|
1330
1330
|
};
|
|
1331
1331
|
const setProp = ($Element, key, value, eventMap, newEventMap) => {
|
|
1332
1332
|
const optionalAttributeName = optionalAttributeProps.get(key);
|
|
@@ -1394,7 +1394,7 @@ const setProps = ($Element, props, eventMap, newEventMap) => {
|
|
|
1394
1394
|
};
|
|
1395
1395
|
|
|
1396
1396
|
const {
|
|
1397
|
-
Text: Text$
|
|
1397
|
+
Text: Text$1,
|
|
1398
1398
|
Reference} = VirtualDomElements;
|
|
1399
1399
|
|
|
1400
1400
|
const renderDomTextNode = element => {
|
|
@@ -1418,7 +1418,7 @@ const render$1 = (element, eventMap, newEventMap) => {
|
|
|
1418
1418
|
switch (element.type) {
|
|
1419
1419
|
case Reference:
|
|
1420
1420
|
return renderReferenceNode(element);
|
|
1421
|
-
case Text$
|
|
1421
|
+
case Text$1:
|
|
1422
1422
|
return renderDomTextNode(element);
|
|
1423
1423
|
default:
|
|
1424
1424
|
return renderDomElement(element, eventMap, newEventMap);
|
|
@@ -1491,7 +1491,7 @@ const removeAttribute = ($Element, key) => {
|
|
|
1491
1491
|
const attributeName = propertyToAttribute[key] || key;
|
|
1492
1492
|
$Element.removeAttribute(attributeName);
|
|
1493
1493
|
};
|
|
1494
|
-
const setText$
|
|
1494
|
+
const setText$1 = ($Element, value) => {
|
|
1495
1495
|
$Element.nodeValue = value;
|
|
1496
1496
|
};
|
|
1497
1497
|
const removeChild = ($Element, index) => {
|
|
@@ -1635,7 +1635,7 @@ const applyMutationPatch = (state, patch, events) => {
|
|
|
1635
1635
|
state.hasAppliedMutation = true;
|
|
1636
1636
|
break;
|
|
1637
1637
|
case SetText:
|
|
1638
|
-
setText$
|
|
1638
|
+
setText$1(state.current, patch.value);
|
|
1639
1639
|
state.hasAppliedMutation = true;
|
|
1640
1640
|
break;
|
|
1641
1641
|
}
|
|
@@ -2032,7 +2032,7 @@ const getWorkerDisplayName$1 = name => {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
return `${name} worker`;
|
|
2034
2034
|
};
|
|
2035
|
-
const create$
|
|
2035
|
+
const create$K = async ({
|
|
2036
2036
|
name,
|
|
2037
2037
|
url
|
|
2038
2038
|
}) => {
|
|
@@ -2099,7 +2099,7 @@ const wrap = worker => {
|
|
|
2099
2099
|
|
|
2100
2100
|
const IpcParentWithModuleWorker$2 = {
|
|
2101
2101
|
__proto__: null,
|
|
2102
|
-
create: create$
|
|
2102
|
+
create: create$K,
|
|
2103
2103
|
wrap
|
|
2104
2104
|
};
|
|
2105
2105
|
|
|
@@ -2107,7 +2107,7 @@ const isMessagePort$1 = value => {
|
|
|
2107
2107
|
return value instanceof MessagePort;
|
|
2108
2108
|
};
|
|
2109
2109
|
|
|
2110
|
-
const create$
|
|
2110
|
+
const create$J = async ({
|
|
2111
2111
|
url
|
|
2112
2112
|
}) => {
|
|
2113
2113
|
string(url);
|
|
@@ -2128,10 +2128,10 @@ const create$L = async ({
|
|
|
2128
2128
|
|
|
2129
2129
|
const IpcParentWithMessagePort$2 = {
|
|
2130
2130
|
__proto__: null,
|
|
2131
|
-
create: create$
|
|
2131
|
+
create: create$J
|
|
2132
2132
|
};
|
|
2133
2133
|
|
|
2134
|
-
const create$
|
|
2134
|
+
const create$I = async url => {
|
|
2135
2135
|
const referencePort = await new Promise(resolve => {
|
|
2136
2136
|
globalThis.acceptReferencePort = resolve;
|
|
2137
2137
|
import(url);
|
|
@@ -2142,7 +2142,7 @@ const create$K = async url => {
|
|
|
2142
2142
|
|
|
2143
2143
|
const IpcParentWithReferencePort = {
|
|
2144
2144
|
__proto__: null,
|
|
2145
|
-
create: create$
|
|
2145
|
+
create: create$I
|
|
2146
2146
|
};
|
|
2147
2147
|
|
|
2148
2148
|
const normalizeLine = line => {
|
|
@@ -2932,7 +2932,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
2932
2932
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
2933
2933
|
return create$1$1(id, errorProperty);
|
|
2934
2934
|
};
|
|
2935
|
-
const create$
|
|
2935
|
+
const create$H = (message, result) => {
|
|
2936
2936
|
return {
|
|
2937
2937
|
id: message.id,
|
|
2938
2938
|
jsonrpc: Two$1,
|
|
@@ -2941,7 +2941,7 @@ const create$J = (message, result) => {
|
|
|
2941
2941
|
};
|
|
2942
2942
|
const getSuccessResponse = (message, result) => {
|
|
2943
2943
|
const resultProperty = result ?? null;
|
|
2944
|
-
return create$
|
|
2944
|
+
return create$H(message, resultProperty);
|
|
2945
2945
|
};
|
|
2946
2946
|
const getErrorResponseSimple = (id, error) => {
|
|
2947
2947
|
return {
|
|
@@ -3035,7 +3035,7 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
3035
3035
|
|
|
3036
3036
|
const Two = '2.0';
|
|
3037
3037
|
|
|
3038
|
-
const create$
|
|
3038
|
+
const create$G = (method, params) => {
|
|
3039
3039
|
return {
|
|
3040
3040
|
jsonrpc: Two,
|
|
3041
3041
|
method,
|
|
@@ -3043,7 +3043,7 @@ const create$I = (method, params) => {
|
|
|
3043
3043
|
};
|
|
3044
3044
|
};
|
|
3045
3045
|
|
|
3046
|
-
const create$
|
|
3046
|
+
const create$F = (id, method, params) => {
|
|
3047
3047
|
const message = {
|
|
3048
3048
|
id,
|
|
3049
3049
|
jsonrpc: Two,
|
|
@@ -3054,12 +3054,12 @@ const create$H = (id, method, params) => {
|
|
|
3054
3054
|
};
|
|
3055
3055
|
|
|
3056
3056
|
let id = 0;
|
|
3057
|
-
const create$
|
|
3057
|
+
const create$E = () => {
|
|
3058
3058
|
return ++id;
|
|
3059
3059
|
};
|
|
3060
3060
|
|
|
3061
3061
|
const registerPromise = map => {
|
|
3062
|
-
const id = create$
|
|
3062
|
+
const id = create$E();
|
|
3063
3063
|
const {
|
|
3064
3064
|
promise,
|
|
3065
3065
|
resolve
|
|
@@ -3076,7 +3076,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
3076
3076
|
id,
|
|
3077
3077
|
promise
|
|
3078
3078
|
} = registerPromise(callbacks);
|
|
3079
|
-
const message = create$
|
|
3079
|
+
const message = create$F(id, method, params);
|
|
3080
3080
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
3081
3081
|
ipc.sendAndTransfer(message);
|
|
3082
3082
|
} else {
|
|
@@ -3112,7 +3112,7 @@ const createRpc = ipc => {
|
|
|
3112
3112
|
* @deprecated
|
|
3113
3113
|
*/
|
|
3114
3114
|
send(method, ...params) {
|
|
3115
|
-
const message = create$
|
|
3115
|
+
const message = create$G(method, params);
|
|
3116
3116
|
ipc.send(message);
|
|
3117
3117
|
}
|
|
3118
3118
|
};
|
|
@@ -3151,7 +3151,7 @@ const unhandleIpc = ipc => {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
};
|
|
3153
3153
|
|
|
3154
|
-
const create$
|
|
3154
|
+
const create$D = async ({
|
|
3155
3155
|
commandMap,
|
|
3156
3156
|
window
|
|
3157
3157
|
}) => {
|
|
@@ -3163,7 +3163,7 @@ const create$F = async ({
|
|
|
3163
3163
|
return rpc;
|
|
3164
3164
|
};
|
|
3165
3165
|
|
|
3166
|
-
const create$
|
|
3166
|
+
const create$C = async ({
|
|
3167
3167
|
commandMap,
|
|
3168
3168
|
isMessagePortOpen = true,
|
|
3169
3169
|
messagePort
|
|
@@ -3185,7 +3185,7 @@ const isWorker = value => {
|
|
|
3185
3185
|
return value instanceof Worker;
|
|
3186
3186
|
};
|
|
3187
3187
|
|
|
3188
|
-
const create$
|
|
3188
|
+
const create$B = async ({
|
|
3189
3189
|
commandMap,
|
|
3190
3190
|
name,
|
|
3191
3191
|
url
|
|
@@ -3205,7 +3205,7 @@ const create$D = async ({
|
|
|
3205
3205
|
return workerRpc;
|
|
3206
3206
|
};
|
|
3207
3207
|
|
|
3208
|
-
const create$
|
|
3208
|
+
const create$A = async ({
|
|
3209
3209
|
commandMap,
|
|
3210
3210
|
name,
|
|
3211
3211
|
port,
|
|
@@ -3228,23 +3228,23 @@ const create$C = async ({
|
|
|
3228
3228
|
return workerRpc;
|
|
3229
3229
|
};
|
|
3230
3230
|
|
|
3231
|
-
const create$
|
|
3231
|
+
const create$z = async ({
|
|
3232
3232
|
commandMap,
|
|
3233
3233
|
messagePort
|
|
3234
3234
|
}) => {
|
|
3235
|
-
return create$
|
|
3235
|
+
return create$C({
|
|
3236
3236
|
commandMap,
|
|
3237
3237
|
messagePort
|
|
3238
3238
|
});
|
|
3239
3239
|
};
|
|
3240
3240
|
|
|
3241
3241
|
// TODO add test
|
|
3242
|
-
const create$
|
|
3242
|
+
const create$y = async ({
|
|
3243
3243
|
name,
|
|
3244
3244
|
port,
|
|
3245
3245
|
url
|
|
3246
3246
|
}) => {
|
|
3247
|
-
await create$
|
|
3247
|
+
await create$A({
|
|
3248
3248
|
commandMap: {},
|
|
3249
3249
|
name,
|
|
3250
3250
|
port,
|
|
@@ -3255,7 +3255,7 @@ const create$A = async ({
|
|
|
3255
3255
|
|
|
3256
3256
|
const IpcParentWithModuleWorkerWithMessagePort = {
|
|
3257
3257
|
__proto__: null,
|
|
3258
|
-
create: create$
|
|
3258
|
+
create: create$y
|
|
3259
3259
|
};
|
|
3260
3260
|
|
|
3261
3261
|
const Web = 1;
|
|
@@ -3288,7 +3288,7 @@ const platform = getPlatform();
|
|
|
3288
3288
|
const isElectron = platform === Electron;
|
|
3289
3289
|
|
|
3290
3290
|
// TODO use handleIncomingIpc function
|
|
3291
|
-
const create$
|
|
3291
|
+
const create$x = async ({
|
|
3292
3292
|
ipcId,
|
|
3293
3293
|
port
|
|
3294
3294
|
}) => {
|
|
@@ -3296,7 +3296,7 @@ const create$z = async ({
|
|
|
3296
3296
|
if (!isElectron) {
|
|
3297
3297
|
throw new Error('Electron api was requested but is not available');
|
|
3298
3298
|
}
|
|
3299
|
-
const rpc = await create$
|
|
3299
|
+
const rpc = await create$D({
|
|
3300
3300
|
commandMap: {},
|
|
3301
3301
|
window
|
|
3302
3302
|
});
|
|
@@ -3306,7 +3306,7 @@ const create$z = async ({
|
|
|
3306
3306
|
|
|
3307
3307
|
const IpcParentWithElectron = {
|
|
3308
3308
|
__proto__: null,
|
|
3309
|
-
create: create$
|
|
3309
|
+
create: create$x
|
|
3310
3310
|
};
|
|
3311
3311
|
|
|
3312
3312
|
const getModule = method => {
|
|
@@ -3346,7 +3346,7 @@ const launchWorker = async ({
|
|
|
3346
3346
|
name,
|
|
3347
3347
|
url
|
|
3348
3348
|
}) => {
|
|
3349
|
-
const rpc = await create$
|
|
3349
|
+
const rpc = await create$B({
|
|
3350
3350
|
commandMap: commandMapRef,
|
|
3351
3351
|
name,
|
|
3352
3352
|
url
|
|
@@ -3451,7 +3451,7 @@ const RendererWorker = {
|
|
|
3451
3451
|
state: state$7
|
|
3452
3452
|
};
|
|
3453
3453
|
|
|
3454
|
-
const create$
|
|
3454
|
+
const create$w = async ({
|
|
3455
3455
|
method,
|
|
3456
3456
|
...options
|
|
3457
3457
|
}) => {
|
|
@@ -3572,7 +3572,7 @@ const create$Notification = message => {
|
|
|
3572
3572
|
$Notification.textContent = message;
|
|
3573
3573
|
return $Notification;
|
|
3574
3574
|
};
|
|
3575
|
-
const create$
|
|
3575
|
+
const create$v = (type, message) => {
|
|
3576
3576
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
3577
3577
|
const $Notification = create$Notification(message);
|
|
3578
3578
|
append$1($Notification);
|
|
@@ -3634,7 +3634,7 @@ const set$6 = (canvasId, canvas) => {
|
|
|
3634
3634
|
const get$4 = id => {
|
|
3635
3635
|
return get$5(id);
|
|
3636
3636
|
};
|
|
3637
|
-
const create$
|
|
3637
|
+
const create$u = async (canvasId, objectId) => {
|
|
3638
3638
|
const canvas = document.createElement('canvas');
|
|
3639
3639
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3640
3640
|
set$6(canvasId, canvas);
|
|
@@ -3664,16 +3664,14 @@ const False = 'false';
|
|
|
3664
3664
|
|
|
3665
3665
|
const Alert = 'alert';
|
|
3666
3666
|
const Application = 'application';
|
|
3667
|
-
const Code = 'code';
|
|
3668
3667
|
const Complementary = 'complementary';
|
|
3669
3668
|
const Group = 'group';
|
|
3670
3669
|
const ListBox = 'listbox';
|
|
3671
3670
|
const Log = 'log';
|
|
3672
3671
|
const Menu = 'menu';
|
|
3673
|
-
const None$
|
|
3672
|
+
const None$1 = 'none';
|
|
3674
3673
|
const Status = 'status';
|
|
3675
3674
|
const TabList = 'tablist';
|
|
3676
|
-
const TextBox = 'textbox';
|
|
3677
3675
|
const ToolBar = 'toolbar';
|
|
3678
3676
|
|
|
3679
3677
|
const create$BackDrop = () => {
|
|
@@ -3689,14 +3687,9 @@ const AriaActiveDescendant = 'aria-activedescendant';
|
|
|
3689
3687
|
const AriaSelected = 'aria-selected';
|
|
3690
3688
|
const AriaHidden = 'aria-hidden';
|
|
3691
3689
|
|
|
3692
|
-
const BeforeInput = 'beforeinput';
|
|
3693
3690
|
const Blur = 'blur';
|
|
3694
3691
|
const Click = 'click';
|
|
3695
|
-
const CompositionEnd = 'compositionend';
|
|
3696
|
-
const CompositionStart = 'compositionstart';
|
|
3697
|
-
const CompositionUpdate = 'compositionupdate';
|
|
3698
3692
|
const ContextMenu = 'contextmenu';
|
|
3699
|
-
const Cut = 'cut';
|
|
3700
3693
|
const DoubleClick = 'dblclick';
|
|
3701
3694
|
const Error$2 = 'error';
|
|
3702
3695
|
const Focus = 'focus';
|
|
@@ -3709,7 +3702,6 @@ const MouseDown = 'mousedown';
|
|
|
3709
3702
|
const MouseEnter = 'mouseenter';
|
|
3710
3703
|
const MouseLeave = 'mouseleave';
|
|
3711
3704
|
const MouseUp = 'mouseup';
|
|
3712
|
-
const Paste = 'paste';
|
|
3713
3705
|
const PointerDown = 'pointerdown';
|
|
3714
3706
|
const PointerMove = 'pointermove';
|
|
3715
3707
|
const PointerUp = 'pointerup';
|
|
@@ -3762,7 +3754,7 @@ const getElement = () => {
|
|
|
3762
3754
|
return state$4.$PreviousFocusElement;
|
|
3763
3755
|
};
|
|
3764
3756
|
|
|
3765
|
-
const focus$
|
|
3757
|
+
const focus$d = $Element => {
|
|
3766
3758
|
if ($Element === document.activeElement) {
|
|
3767
3759
|
return;
|
|
3768
3760
|
}
|
|
@@ -3792,10 +3784,6 @@ const setYAndHeight = ($Element, y, height) => {
|
|
|
3792
3784
|
$Element.style.translate = typeof y === 'string' ? y : `0 ${y}px`;
|
|
3793
3785
|
$Element.style.height = typeof height === 'string' ? height : `${height}px`;
|
|
3794
3786
|
};
|
|
3795
|
-
const setXAndWidth = ($Element, x, width) => {
|
|
3796
|
-
$Element.style.translate = `${x}px 0`;
|
|
3797
|
-
$Element.style.width = `${width}px`;
|
|
3798
|
-
};
|
|
3799
3787
|
const setTop = ($Element, top) => {
|
|
3800
3788
|
$Element.style.top = `${top}px`;
|
|
3801
3789
|
};
|
|
@@ -3865,7 +3853,7 @@ const getLevel = $Menu => {
|
|
|
3865
3853
|
// @ts-expect-error
|
|
3866
3854
|
return state$3.$$Menus.indexOf($Menu);
|
|
3867
3855
|
};
|
|
3868
|
-
const handleMouseDown$
|
|
3856
|
+
const handleMouseDown$3 = event => {
|
|
3869
3857
|
const $Target = event.target;
|
|
3870
3858
|
const $Menu = $Target.closest('.Menu');
|
|
3871
3859
|
const index = findIndex($Menu, $Target);
|
|
@@ -3942,7 +3930,7 @@ const create$Menu$1 = () => {
|
|
|
3942
3930
|
$Menu.tabIndex = -1;
|
|
3943
3931
|
// $ContextMenu.onmousedown = contextMenuHandleMouseDown
|
|
3944
3932
|
// TODO mousedown vs click? (click is usually better but mousedown is faster, why wait 100ms?)
|
|
3945
|
-
$Menu.addEventListener(MouseDown, handleMouseDown$
|
|
3933
|
+
$Menu.addEventListener(MouseDown, handleMouseDown$3);
|
|
3946
3934
|
$Menu.addEventListener(MouseEnter, handleMouseEnter, {
|
|
3947
3935
|
capture: true
|
|
3948
3936
|
});
|
|
@@ -3954,7 +3942,7 @@ const create$Menu$1 = () => {
|
|
|
3954
3942
|
// })
|
|
3955
3943
|
$Menu.onkeydown = handleKeyDown$5;
|
|
3956
3944
|
$Menu.addEventListener(FocusOut, handleFocusOut$1);
|
|
3957
|
-
$Menu.oncontextmenu = handleContextMenu$
|
|
3945
|
+
$Menu.oncontextmenu = handleContextMenu$7;
|
|
3958
3946
|
// $ContextMenu.onfocus = handleFocus
|
|
3959
3947
|
// $ContextMenu.onblur = handleBlur
|
|
3960
3948
|
return $Menu;
|
|
@@ -3987,14 +3975,14 @@ const handleBackDropMouseDown = event => {
|
|
|
3987
3975
|
state$3.$BackDrop = undefined;
|
|
3988
3976
|
}
|
|
3989
3977
|
};
|
|
3990
|
-
const handleContextMenu$
|
|
3978
|
+
const handleContextMenu$7 = event => {
|
|
3991
3979
|
preventDefault(event);
|
|
3992
3980
|
};
|
|
3993
3981
|
const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mouseBlocking = false) => {
|
|
3994
3982
|
if (mouseBlocking) {
|
|
3995
3983
|
const $BackDrop = create$BackDrop();
|
|
3996
3984
|
$BackDrop.onmousedown = handleBackDropMouseDown;
|
|
3997
|
-
$BackDrop.oncontextmenu = handleContextMenu$
|
|
3985
|
+
$BackDrop.oncontextmenu = handleContextMenu$7;
|
|
3998
3986
|
// @ts-expect-error
|
|
3999
3987
|
state$3.$BackDrop = $BackDrop;
|
|
4000
3988
|
append$1($BackDrop);
|
|
@@ -4015,7 +4003,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
4015
4003
|
state$3.$$Menus.push($Menu);
|
|
4016
4004
|
append$1($Menu);
|
|
4017
4005
|
if (level === 0) {
|
|
4018
|
-
focus$
|
|
4006
|
+
focus$d($Menu);
|
|
4019
4007
|
send('Focus.setFocus', FocusMenu);
|
|
4020
4008
|
}
|
|
4021
4009
|
};
|
|
@@ -4856,7 +4844,7 @@ const showError = (message, y, x) => {
|
|
|
4856
4844
|
$ImagePreviewImage
|
|
4857
4845
|
};
|
|
4858
4846
|
};
|
|
4859
|
-
const create$
|
|
4847
|
+
const create$t = (uri, top, left) => {
|
|
4860
4848
|
const $ImagePreviewImage = document.createElement('img');
|
|
4861
4849
|
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
4862
4850
|
$ImagePreviewImage.src = uri;
|
|
@@ -4887,7 +4875,7 @@ const dispose$g = state => {
|
|
|
4887
4875
|
|
|
4888
4876
|
const ImagePreview$1 = {
|
|
4889
4877
|
__proto__: null,
|
|
4890
|
-
create: create$
|
|
4878
|
+
create: create$t,
|
|
4891
4879
|
dispose: dispose$g,
|
|
4892
4880
|
showError,
|
|
4893
4881
|
update
|
|
@@ -4911,7 +4899,7 @@ const get$ItemFromEvent = event => {
|
|
|
4911
4899
|
}
|
|
4912
4900
|
return undefined;
|
|
4913
4901
|
};
|
|
4914
|
-
const handleMouseDown$
|
|
4902
|
+
const handleMouseDown$2 = event => {
|
|
4915
4903
|
const {
|
|
4916
4904
|
button,
|
|
4917
4905
|
clientX,
|
|
@@ -4926,16 +4914,16 @@ const handleMouseDown$3 = event => {
|
|
|
4926
4914
|
const index = getNodeIndex($Item);
|
|
4927
4915
|
return ['handleClick', button, index, clientX, clientY];
|
|
4928
4916
|
};
|
|
4929
|
-
const handleBlur$
|
|
4917
|
+
const handleBlur$8 = () => {
|
|
4930
4918
|
return ['handleBlur'];
|
|
4931
4919
|
};
|
|
4932
|
-
const handleFocus$
|
|
4920
|
+
const handleFocus$8 = () => {
|
|
4933
4921
|
return ['handleFocus'];
|
|
4934
4922
|
};
|
|
4935
4923
|
|
|
4936
4924
|
// TODO use context menu events function again
|
|
4937
4925
|
|
|
4938
|
-
const handleContextMenu$
|
|
4926
|
+
const handleContextMenu$6 = event => {
|
|
4939
4927
|
preventDefault(event);
|
|
4940
4928
|
const {
|
|
4941
4929
|
button,
|
|
@@ -4948,10 +4936,10 @@ const returnValue$8 = true;
|
|
|
4948
4936
|
|
|
4949
4937
|
const ViewletActivityBarEvents = {
|
|
4950
4938
|
__proto__: null,
|
|
4951
|
-
handleBlur: handleBlur$
|
|
4952
|
-
handleContextMenu: handleContextMenu$
|
|
4953
|
-
handleFocus: handleFocus$
|
|
4954
|
-
handleMouseDown: handleMouseDown$
|
|
4939
|
+
handleBlur: handleBlur$8,
|
|
4940
|
+
handleContextMenu: handleContextMenu$6,
|
|
4941
|
+
handleFocus: handleFocus$8,
|
|
4942
|
+
handleMouseDown: handleMouseDown$2,
|
|
4955
4943
|
returnValue: returnValue$8
|
|
4956
4944
|
};
|
|
4957
4945
|
|
|
@@ -4996,7 +4984,7 @@ forwardViewletCommand('focusPrevious');
|
|
|
4996
4984
|
const handleAudioError$1 = forwardViewletCommand('handleAudioError');
|
|
4997
4985
|
forwardViewletCommand('handleBeforeInput');
|
|
4998
4986
|
forwardViewletCommand('handleBeforeInputFromContentEditable');
|
|
4999
|
-
const handleBlur$
|
|
4987
|
+
const handleBlur$7 = forwardViewletCommand('handleBlur');
|
|
5000
4988
|
const handleButtonClick = forwardViewletCommand('handleButtonClick');
|
|
5001
4989
|
const handleClick$6 = forwardViewletCommand('handleClick');
|
|
5002
4990
|
const handleClickAction$2 = forwardViewletCommand('handleClickAction');
|
|
@@ -5011,7 +4999,7 @@ forwardViewletCommand('handleClickOpenFolder');
|
|
|
5011
4999
|
forwardViewletCommand('handleClickRestore');
|
|
5012
5000
|
const handleClickTab$2 = forwardViewletCommand('handleClickTab');
|
|
5013
5001
|
forwardViewletCommand('handleClickToggleMaximize');
|
|
5014
|
-
const handleContextMenu$
|
|
5002
|
+
const handleContextMenu$5 = forwardViewletCommand('handleContextMenu');
|
|
5015
5003
|
forwardViewletCommand('handleDoubleClick');
|
|
5016
5004
|
forwardViewletCommand('handleDragEnd');
|
|
5017
5005
|
forwardViewletCommand('handleDragLeave');
|
|
@@ -5024,7 +5012,7 @@ forwardViewletCommand('handleClickSize');
|
|
|
5024
5012
|
forwardViewletCommand('handleClickDisable');
|
|
5025
5013
|
forwardViewletCommand('handleClickUninstall');
|
|
5026
5014
|
forwardViewletCommand('handleFilterInput');
|
|
5027
|
-
const handleFocus$
|
|
5015
|
+
const handleFocus$7 = forwardViewletCommand('handleFocus');
|
|
5028
5016
|
const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
|
|
5029
5017
|
forwardViewletCommand('handleIconError');
|
|
5030
5018
|
const handleImageError = forwardViewletCommand('handleImageError');
|
|
@@ -5034,7 +5022,7 @@ forwardViewletCommand('handleListBlur');
|
|
|
5034
5022
|
forwardViewletCommand('handleListFocus');
|
|
5035
5023
|
const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
|
|
5036
5024
|
const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
|
|
5037
|
-
const handleMouseDown$
|
|
5025
|
+
const handleMouseDown$1 = forwardViewletCommand('handleMouseDown');
|
|
5038
5026
|
forwardViewletCommand('handleMouseMove');
|
|
5039
5027
|
const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
|
|
5040
5028
|
const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
|
|
@@ -5068,7 +5056,7 @@ forwardViewletCommand('handleTabsWheel');
|
|
|
5068
5056
|
forwardViewletCommand('handleTouchEnd');
|
|
5069
5057
|
forwardViewletCommand('handleTouchMove');
|
|
5070
5058
|
forwardViewletCommand('handleTouchStart');
|
|
5071
|
-
const handleWheel$
|
|
5059
|
+
const handleWheel$3 = forwardViewletCommand('handleWheel');
|
|
5072
5060
|
const hidePanel = forwardViewletCommand('hidePanel');
|
|
5073
5061
|
forwardViewletCommand('moveRectangleSelectionPx');
|
|
5074
5062
|
forwardViewletCommand('moveSelectionPx');
|
|
@@ -5112,7 +5100,7 @@ const ViewletAudio = {
|
|
|
5112
5100
|
Events: Events$4
|
|
5113
5101
|
};
|
|
5114
5102
|
|
|
5115
|
-
const create$
|
|
5103
|
+
const create$s = () => {
|
|
5116
5104
|
const $Viewlet = document.createElement('div');
|
|
5117
5105
|
$Viewlet.className = 'Viewlet Clock';
|
|
5118
5106
|
return {
|
|
@@ -5129,7 +5117,7 @@ const setTime = (state, time) => {
|
|
|
5129
5117
|
|
|
5130
5118
|
const ViewletClock = {
|
|
5131
5119
|
__proto__: null,
|
|
5132
|
-
create: create$
|
|
5120
|
+
create: create$s,
|
|
5133
5121
|
dispose: dispose$f,
|
|
5134
5122
|
refresh: refresh$4,
|
|
5135
5123
|
setTime
|
|
@@ -5158,7 +5146,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
|
|
|
5158
5146
|
// TODO use pointerlost event instead
|
|
5159
5147
|
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
5160
5148
|
};
|
|
5161
|
-
const create$
|
|
5149
|
+
const create$r = (pointerDown, pointerMove, pointerUp) => {
|
|
5162
5150
|
const shared = (fn, event) => {
|
|
5163
5151
|
const message = fn(event);
|
|
5164
5152
|
if (!message || message.length === 0) {
|
|
@@ -5191,7 +5179,7 @@ const create$t = (pointerDown, pointerMove, pointerUp) => {
|
|
|
5191
5179
|
};
|
|
5192
5180
|
|
|
5193
5181
|
const handleOffset = 20;
|
|
5194
|
-
const handleSliderPointerDown = create$
|
|
5182
|
+
const handleSliderPointerDown = create$r(event => {
|
|
5195
5183
|
const {
|
|
5196
5184
|
clientX,
|
|
5197
5185
|
clientY
|
|
@@ -5262,18 +5250,18 @@ const handleInput$5 = event => {
|
|
|
5262
5250
|
} = target;
|
|
5263
5251
|
handleInput$6(uid, value);
|
|
5264
5252
|
};
|
|
5265
|
-
const handleFocus$
|
|
5253
|
+
const handleFocus$6 = event => {
|
|
5266
5254
|
const uid = fromEvent(event);
|
|
5267
|
-
handleFocus$
|
|
5255
|
+
handleFocus$7(uid);
|
|
5268
5256
|
};
|
|
5269
5257
|
|
|
5270
5258
|
const ViewletDebugConsoleEvents = {
|
|
5271
5259
|
__proto__: null,
|
|
5272
|
-
handleFocus: handleFocus$
|
|
5260
|
+
handleFocus: handleFocus$6,
|
|
5273
5261
|
handleInput: handleInput$5
|
|
5274
5262
|
};
|
|
5275
5263
|
|
|
5276
|
-
const create$
|
|
5264
|
+
const create$q = () => {
|
|
5277
5265
|
const $Viewlet = document.createElement('div');
|
|
5278
5266
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
5279
5267
|
return {
|
|
@@ -5289,7 +5277,7 @@ const setDom$9 = (state, dom) => {
|
|
|
5289
5277
|
|
|
5290
5278
|
const ViewletDebugConsole = {
|
|
5291
5279
|
__proto__: null,
|
|
5292
|
-
create: create$
|
|
5280
|
+
create: create$q,
|
|
5293
5281
|
setDom: setDom$9
|
|
5294
5282
|
};
|
|
5295
5283
|
|
|
@@ -5306,14 +5294,14 @@ const handleKeyDown$3 = event => {
|
|
|
5306
5294
|
} = event;
|
|
5307
5295
|
handleKeyDown$4(uid, key, altKey, ctrlKey, shiftKey, metaKey);
|
|
5308
5296
|
};
|
|
5309
|
-
const handleBlur$
|
|
5297
|
+
const handleBlur$6 = event => {
|
|
5310
5298
|
const uid = fromEvent(event);
|
|
5311
|
-
handleBlur$
|
|
5299
|
+
handleBlur$7(uid);
|
|
5312
5300
|
};
|
|
5313
5301
|
|
|
5314
5302
|
const ViewletDefineKeyBindingEvents = {
|
|
5315
5303
|
__proto__: null,
|
|
5316
|
-
handleBlur: handleBlur$
|
|
5304
|
+
handleBlur: handleBlur$6,
|
|
5317
5305
|
handleKeyDown: handleKeyDown$3
|
|
5318
5306
|
};
|
|
5319
5307
|
|
|
@@ -5326,7 +5314,7 @@ const setValue$2 = (state, value) => {
|
|
|
5326
5314
|
const $Input = $Viewlet.querySelector('input');
|
|
5327
5315
|
$Input.value = value;
|
|
5328
5316
|
};
|
|
5329
|
-
const focus$
|
|
5317
|
+
const focus$c = state => {
|
|
5330
5318
|
const {
|
|
5331
5319
|
$Viewlet
|
|
5332
5320
|
} = state;
|
|
@@ -5337,7 +5325,7 @@ const focus$d = state => {
|
|
|
5337
5325
|
const ViewletDefineKeyBinding = {
|
|
5338
5326
|
__proto__: null,
|
|
5339
5327
|
Events: ViewletDefineKeyBindingEvents,
|
|
5340
|
-
focus: focus$
|
|
5328
|
+
focus: focus$c,
|
|
5341
5329
|
setValue: setValue$2
|
|
5342
5330
|
};
|
|
5343
5331
|
|
|
@@ -5350,17 +5338,17 @@ const setMaskImage = ($Element, icon) => {
|
|
|
5350
5338
|
}
|
|
5351
5339
|
};
|
|
5352
5340
|
|
|
5353
|
-
const create$
|
|
5341
|
+
const create$p = icon => {
|
|
5354
5342
|
const $Icon = document.createElement('div');
|
|
5355
5343
|
$Icon.className = 'MaskIcon';
|
|
5356
5344
|
setMaskImage($Icon, icon);
|
|
5357
|
-
$Icon.role = None$
|
|
5345
|
+
$Icon.role = None$1;
|
|
5358
5346
|
return $Icon;
|
|
5359
5347
|
};
|
|
5360
5348
|
|
|
5361
5349
|
const create$Button = (label, icon) => {
|
|
5362
5350
|
// TODO icon div might not be needed (unnecessary html element)
|
|
5363
|
-
const $Icon = create$
|
|
5351
|
+
const $Icon = create$p(icon);
|
|
5364
5352
|
const $Button = document.createElement('button');
|
|
5365
5353
|
$Button.className = 'IconButton';
|
|
5366
5354
|
$Button.title = label;
|
|
@@ -5381,7 +5369,7 @@ const handleClick$4 = event => {
|
|
|
5381
5369
|
handleClick$5(index);
|
|
5382
5370
|
};
|
|
5383
5371
|
|
|
5384
|
-
const create$
|
|
5372
|
+
const create$o = () => {
|
|
5385
5373
|
const $DialogTitle = document.createElement('h2');
|
|
5386
5374
|
$DialogTitle.id = 'DialogTitle';
|
|
5387
5375
|
const $DialogCloseButton = create$Button('Close', 'Close');
|
|
@@ -5462,7 +5450,7 @@ const setErrorStack = (state, errorStack) => {
|
|
|
5462
5450
|
|
|
5463
5451
|
const ViewletDialog = {
|
|
5464
5452
|
__proto__: null,
|
|
5465
|
-
create: create$
|
|
5453
|
+
create: create$o,
|
|
5466
5454
|
postAppend,
|
|
5467
5455
|
setButtons,
|
|
5468
5456
|
setCodeFrame,
|
|
@@ -5471,13 +5459,13 @@ const ViewletDialog = {
|
|
|
5471
5459
|
setHeader
|
|
5472
5460
|
};
|
|
5473
5461
|
|
|
5474
|
-
const handleWheel$
|
|
5462
|
+
const handleWheel$2 = event => {
|
|
5475
5463
|
const {
|
|
5476
5464
|
deltaMode,
|
|
5477
5465
|
deltaY
|
|
5478
5466
|
} = event;
|
|
5479
5467
|
const uid = fromEvent(event);
|
|
5480
|
-
handleWheel$
|
|
5468
|
+
handleWheel$3(uid, deltaMode, deltaY);
|
|
5481
5469
|
};
|
|
5482
5470
|
|
|
5483
5471
|
const handleScrollBarPointerDown$2 = event => {
|
|
@@ -5487,10 +5475,10 @@ const handleScrollBarPointerDown$2 = event => {
|
|
|
5487
5475
|
const ViewletDiffEditorEvents = {
|
|
5488
5476
|
__proto__: null,
|
|
5489
5477
|
handleScrollBarPointerDown: handleScrollBarPointerDown$2,
|
|
5490
|
-
handleWheel: handleWheel$
|
|
5478
|
+
handleWheel: handleWheel$2
|
|
5491
5479
|
};
|
|
5492
5480
|
|
|
5493
|
-
const setScrollBar
|
|
5481
|
+
const setScrollBar = (state, scrollBarY, scrollBarHeight, scrollBarThumbClass) => {
|
|
5494
5482
|
const {
|
|
5495
5483
|
$ScrollBarThumb
|
|
5496
5484
|
} = state;
|
|
@@ -5503,7 +5491,7 @@ const setScrollBar$2 = (state, scrollBarY, scrollBarHeight, scrollBarThumbClass)
|
|
|
5503
5491
|
const ViewletDiffEditor = {
|
|
5504
5492
|
__proto__: null,
|
|
5505
5493
|
Events: ViewletDiffEditorEvents,
|
|
5506
|
-
setScrollBar
|
|
5494
|
+
setScrollBar
|
|
5507
5495
|
};
|
|
5508
5496
|
|
|
5509
5497
|
const handleClickAt$2 = event => {
|
|
@@ -5516,7 +5504,7 @@ const handleClickAt$2 = event => {
|
|
|
5516
5504
|
const handleLoad$3 = event => {
|
|
5517
5505
|
return ['handleLoad'];
|
|
5518
5506
|
};
|
|
5519
|
-
const handleContextMenu$
|
|
5507
|
+
const handleContextMenu$4 = event => {
|
|
5520
5508
|
preventDefault(event);
|
|
5521
5509
|
const {
|
|
5522
5510
|
button,
|
|
@@ -5525,7 +5513,7 @@ const handleContextMenu$5 = event => {
|
|
|
5525
5513
|
} = event;
|
|
5526
5514
|
return ['handleContextMenu', button, clientX, clientY];
|
|
5527
5515
|
};
|
|
5528
|
-
const handleSashCornerPointerDown = create$
|
|
5516
|
+
const handleSashCornerPointerDown = create$r(event => {
|
|
5529
5517
|
const {
|
|
5530
5518
|
clientX,
|
|
5531
5519
|
clientY
|
|
@@ -5549,7 +5537,7 @@ const returnValue$6 = true;
|
|
|
5549
5537
|
const ViewletE2eTestEvents = {
|
|
5550
5538
|
__proto__: null,
|
|
5551
5539
|
handleClickAt: handleClickAt$2,
|
|
5552
|
-
handleContextMenu: handleContextMenu$
|
|
5540
|
+
handleContextMenu: handleContextMenu$4,
|
|
5553
5541
|
handleLoad: handleLoad$3,
|
|
5554
5542
|
handleSashCornerPointerDown,
|
|
5555
5543
|
returnValue: returnValue$6
|
|
@@ -5613,7 +5601,7 @@ const handleClickAt$1 = event => {
|
|
|
5613
5601
|
const handleLoad$2 = event => {
|
|
5614
5602
|
return ['handleLoad'];
|
|
5615
5603
|
};
|
|
5616
|
-
const handleContextMenu$
|
|
5604
|
+
const handleContextMenu$3 = event => {
|
|
5617
5605
|
preventDefault(event);
|
|
5618
5606
|
const {
|
|
5619
5607
|
button,
|
|
@@ -5627,7 +5615,7 @@ const returnValue$5 = true;
|
|
|
5627
5615
|
const ViewletE2eTestsEvents = {
|
|
5628
5616
|
__proto__: null,
|
|
5629
5617
|
handleClickAt: handleClickAt$1,
|
|
5630
|
-
handleContextMenu: handleContextMenu$
|
|
5618
|
+
handleContextMenu: handleContextMenu$3,
|
|
5631
5619
|
handleLoad: handleLoad$2,
|
|
5632
5620
|
returnValue: returnValue$5
|
|
5633
5621
|
};
|
|
@@ -5699,15 +5687,15 @@ const handleFocusIn$3 = event => {
|
|
|
5699
5687
|
const uid = fromEvent(event);
|
|
5700
5688
|
handleFocusIn$4(uid);
|
|
5701
5689
|
};
|
|
5702
|
-
const handleBlur$
|
|
5690
|
+
const handleBlur$5 = event => {
|
|
5703
5691
|
preventDefault(event);
|
|
5704
5692
|
const uid = fromEvent(event);
|
|
5705
|
-
handleBlur$
|
|
5693
|
+
handleBlur$7(uid);
|
|
5706
5694
|
};
|
|
5707
5695
|
|
|
5708
5696
|
const ViewletEditorCodeGeneratorEvents = {
|
|
5709
5697
|
__proto__: null,
|
|
5710
|
-
handleBlur: handleBlur$
|
|
5698
|
+
handleBlur: handleBlur$5,
|
|
5711
5699
|
handleFocusIn: handleFocusIn$3
|
|
5712
5700
|
};
|
|
5713
5701
|
|
|
@@ -5727,7 +5715,7 @@ const appendWidget$5 = state => {
|
|
|
5727
5715
|
const dispose$e = state => {
|
|
5728
5716
|
remove$1(state.$Viewlet);
|
|
5729
5717
|
};
|
|
5730
|
-
const focus$
|
|
5718
|
+
const focus$b = (state, key, source) => {
|
|
5731
5719
|
if (!key) {
|
|
5732
5720
|
return;
|
|
5733
5721
|
}
|
|
@@ -5751,7 +5739,7 @@ const ViewletEditorCodeGenerator = {
|
|
|
5751
5739
|
Events: ViewletEditorCodeGeneratorEvents,
|
|
5752
5740
|
appendWidget: appendWidget$5,
|
|
5753
5741
|
dispose: dispose$e,
|
|
5754
|
-
focus: focus$
|
|
5742
|
+
focus: focus$b,
|
|
5755
5743
|
setBounds: setBounds$9
|
|
5756
5744
|
};
|
|
5757
5745
|
|
|
@@ -5812,7 +5800,7 @@ const handleScrollBarPointerDown$1 = event => {
|
|
|
5812
5800
|
const uid = fromEvent(event);
|
|
5813
5801
|
handleScrollBarClick(uid, clientY);
|
|
5814
5802
|
};
|
|
5815
|
-
const handleWheel$
|
|
5803
|
+
const handleWheel$1 = event => {
|
|
5816
5804
|
const {
|
|
5817
5805
|
deltaMode,
|
|
5818
5806
|
deltaY
|
|
@@ -5825,7 +5813,7 @@ const Small$1 = 1;
|
|
|
5825
5813
|
const Normal$1 = 2;
|
|
5826
5814
|
const Large$1 = 3;
|
|
5827
5815
|
|
|
5828
|
-
const None
|
|
5816
|
+
const None = '';
|
|
5829
5817
|
const Small = 'Small';
|
|
5830
5818
|
const Normal = 'Normal';
|
|
5831
5819
|
const Large = 'Large';
|
|
@@ -5839,7 +5827,7 @@ const getClassName = size => {
|
|
|
5839
5827
|
case Small$1:
|
|
5840
5828
|
return Small;
|
|
5841
5829
|
default:
|
|
5842
|
-
return None
|
|
5830
|
+
return None;
|
|
5843
5831
|
}
|
|
5844
5832
|
};
|
|
5845
5833
|
|
|
@@ -5868,7 +5856,7 @@ const setNegativeMargin = (state, negativeMargin) => {
|
|
|
5868
5856
|
setTop($ListItems, negativeMargin);
|
|
5869
5857
|
};
|
|
5870
5858
|
|
|
5871
|
-
const create$
|
|
5859
|
+
const create$n = () => {
|
|
5872
5860
|
const $ListItems = document.createElement('div');
|
|
5873
5861
|
$ListItems.className = 'ListItems';
|
|
5874
5862
|
$ListItems.role = ListBox;
|
|
@@ -5898,7 +5886,7 @@ const attachEvents$5 = state => {
|
|
|
5898
5886
|
$ScrollBar,
|
|
5899
5887
|
$Viewlet
|
|
5900
5888
|
} = state;
|
|
5901
|
-
$Viewlet.addEventListener(Wheel, handleWheel$
|
|
5889
|
+
$Viewlet.addEventListener(Wheel, handleWheel$1, Passive);
|
|
5902
5890
|
attachEvents$6($ListItems, {
|
|
5903
5891
|
[MouseDown]: handleMousedown
|
|
5904
5892
|
});
|
|
@@ -5935,7 +5923,7 @@ const showLoading = (state, x, y) => {
|
|
|
5935
5923
|
$Viewlet.append($Loading);
|
|
5936
5924
|
append$1($Viewlet);
|
|
5937
5925
|
};
|
|
5938
|
-
const handleError$
|
|
5926
|
+
const handleError$5 = (state, error) => {
|
|
5939
5927
|
const {
|
|
5940
5928
|
$Viewlet
|
|
5941
5929
|
} = state;
|
|
@@ -5952,14 +5940,14 @@ const setBounds$8 = (state, x, y, width, height) => {
|
|
|
5952
5940
|
const ViewletEditorCompletion = {
|
|
5953
5941
|
__proto__: null,
|
|
5954
5942
|
attachEvents: attachEvents$5,
|
|
5955
|
-
create: create$
|
|
5943
|
+
create: create$n,
|
|
5956
5944
|
dispose: dispose$d,
|
|
5957
|
-
handleError: handleError$
|
|
5945
|
+
handleError: handleError$5,
|
|
5958
5946
|
setBounds: setBounds$8,
|
|
5959
5947
|
setContentHeight,
|
|
5960
5948
|
setDom: setDom$8,
|
|
5961
5949
|
setNegativeMargin,
|
|
5962
|
-
setScrollBar
|
|
5950
|
+
setScrollBar,
|
|
5963
5951
|
setSize,
|
|
5964
5952
|
showLoading
|
|
5965
5953
|
};
|
|
@@ -5975,7 +5963,7 @@ const ViewletEditorCompletionDetailsEvents = {
|
|
|
5975
5963
|
returnValue: returnValue$4
|
|
5976
5964
|
};
|
|
5977
5965
|
|
|
5978
|
-
const create$
|
|
5966
|
+
const create$m = () => {
|
|
5979
5967
|
const $Viewlet = document.createElement('div');
|
|
5980
5968
|
$Viewlet.className = 'Viewlet EditorCompletionDetails';
|
|
5981
5969
|
$Viewlet.id = 'CompletionsDetails';
|
|
@@ -6016,7 +6004,7 @@ const ViewletEditorCompletionDetails = {
|
|
|
6016
6004
|
Events: ViewletEditorCompletionDetailsEvents,
|
|
6017
6005
|
appendWidget: appendWidget$4,
|
|
6018
6006
|
attachEvents: attachEvents$4,
|
|
6019
|
-
create: create$
|
|
6007
|
+
create: create$m,
|
|
6020
6008
|
dispose: dispose$c,
|
|
6021
6009
|
setBounds: setBounds$7,
|
|
6022
6010
|
setDom: setDom$7
|
|
@@ -6035,7 +6023,7 @@ const ViewletEditorCompletionDetails = {
|
|
|
6035
6023
|
|
|
6036
6024
|
// TODO aria alert
|
|
6037
6025
|
|
|
6038
|
-
const create$
|
|
6026
|
+
const create$l = () => {
|
|
6039
6027
|
const $Viewlet = document.createElement('div');
|
|
6040
6028
|
$Viewlet.className = 'Viewlet EditorError';
|
|
6041
6029
|
return {
|
|
@@ -6057,13 +6045,13 @@ const setBounds$6 = (state, x, y, width, height) => {
|
|
|
6057
6045
|
|
|
6058
6046
|
const ViewletEditorError = {
|
|
6059
6047
|
__proto__: null,
|
|
6060
|
-
create: create$
|
|
6048
|
+
create: create$l,
|
|
6061
6049
|
setBounds: setBounds$6,
|
|
6062
6050
|
setDom: setDom$6
|
|
6063
6051
|
};
|
|
6064
6052
|
|
|
6065
6053
|
const returnValue$3 = true;
|
|
6066
|
-
const handleSashPointerDown$2 = create$
|
|
6054
|
+
const handleSashPointerDown$2 = create$r(event => {
|
|
6067
6055
|
const {
|
|
6068
6056
|
clientX,
|
|
6069
6057
|
clientY
|
|
@@ -6118,7 +6106,6 @@ const ViewletEditorHover = {
|
|
|
6118
6106
|
};
|
|
6119
6107
|
|
|
6120
6108
|
const LeftClick = 0;
|
|
6121
|
-
const RightClick = 2;
|
|
6122
6109
|
|
|
6123
6110
|
/**
|
|
6124
6111
|
* @param {PointerEvent} event
|
|
@@ -6182,7 +6169,7 @@ const handlePointerDown$1 = event => {
|
|
|
6182
6169
|
/**
|
|
6183
6170
|
* @param {WheelEvent} event
|
|
6184
6171
|
*/
|
|
6185
|
-
const handleWheel
|
|
6172
|
+
const handleWheel = event => {
|
|
6186
6173
|
const {
|
|
6187
6174
|
clientX,
|
|
6188
6175
|
clientY,
|
|
@@ -6190,14 +6177,14 @@ const handleWheel$1 = event => {
|
|
|
6190
6177
|
deltaY
|
|
6191
6178
|
} = event;
|
|
6192
6179
|
const uid = fromEvent(event);
|
|
6193
|
-
handleWheel$
|
|
6180
|
+
handleWheel$3(uid, clientX, clientY, deltaX, deltaY);
|
|
6194
6181
|
};
|
|
6195
6182
|
|
|
6196
6183
|
/**
|
|
6197
6184
|
*
|
|
6198
6185
|
* @param {MouseEvent} event
|
|
6199
6186
|
*/
|
|
6200
|
-
const handleContextMenu$
|
|
6187
|
+
const handleContextMenu$2 = event => {
|
|
6201
6188
|
preventDefault(event);
|
|
6202
6189
|
const {
|
|
6203
6190
|
button,
|
|
@@ -6205,18 +6192,18 @@ const handleContextMenu$3 = event => {
|
|
|
6205
6192
|
clientY
|
|
6206
6193
|
} = event;
|
|
6207
6194
|
const uid = fromEvent(event);
|
|
6208
|
-
handleContextMenu$
|
|
6195
|
+
handleContextMenu$5(uid, button, clientX, clientY);
|
|
6209
6196
|
};
|
|
6210
|
-
const handleError$
|
|
6197
|
+
const handleError$4 = event => {
|
|
6211
6198
|
const uid = fromEvent(event);
|
|
6212
6199
|
handleImageError(uid);
|
|
6213
6200
|
};
|
|
6214
|
-
const handleFocus$
|
|
6201
|
+
const handleFocus$5 = event => {
|
|
6215
6202
|
const uid = fromEvent(event);
|
|
6216
|
-
handleFocus$
|
|
6203
|
+
handleFocus$7(uid);
|
|
6217
6204
|
};
|
|
6218
6205
|
|
|
6219
|
-
const create$
|
|
6206
|
+
const create$k = () => {
|
|
6220
6207
|
const $Viewlet = document.createElement('div');
|
|
6221
6208
|
$Viewlet.className = 'Viewlet EditorImage';
|
|
6222
6209
|
return {
|
|
@@ -6228,13 +6215,13 @@ const attachEvents$3 = state => {
|
|
|
6228
6215
|
$Viewlet
|
|
6229
6216
|
} = state;
|
|
6230
6217
|
attachEvents$6($Viewlet, {
|
|
6231
|
-
[ContextMenu]: handleContextMenu$
|
|
6232
|
-
[FocusIn]: handleFocus$
|
|
6218
|
+
[ContextMenu]: handleContextMenu$2,
|
|
6219
|
+
[FocusIn]: handleFocus$5,
|
|
6233
6220
|
[PointerDown]: handlePointerDown$1,
|
|
6234
6221
|
[PointerUp]: handlePointerUp
|
|
6235
6222
|
});
|
|
6236
|
-
$Viewlet.addEventListener(Error$2, handleError$
|
|
6237
|
-
$Viewlet.addEventListener(Wheel, handleWheel
|
|
6223
|
+
$Viewlet.addEventListener(Error$2, handleError$4, Capture);
|
|
6224
|
+
$Viewlet.addEventListener(Wheel, handleWheel, Passive);
|
|
6238
6225
|
};
|
|
6239
6226
|
const setTransform = (state, transform) => {
|
|
6240
6227
|
const {
|
|
@@ -6259,13 +6246,13 @@ const setDom$4 = (state, dom) => {
|
|
|
6259
6246
|
const ViewletEditorImage = {
|
|
6260
6247
|
__proto__: null,
|
|
6261
6248
|
attachEvents: attachEvents$3,
|
|
6262
|
-
create: create$
|
|
6249
|
+
create: create$k,
|
|
6263
6250
|
setDom: setDom$4,
|
|
6264
6251
|
setDragging,
|
|
6265
6252
|
setTransform
|
|
6266
6253
|
};
|
|
6267
6254
|
|
|
6268
|
-
const create$
|
|
6255
|
+
const create$j = () => {
|
|
6269
6256
|
const $Viewlet = document.createElement('div');
|
|
6270
6257
|
$Viewlet.className = 'Viewlet EditorText';
|
|
6271
6258
|
$Viewlet.textContent = 'loading...';
|
|
@@ -6282,7 +6269,7 @@ const refresh$3 = (state, context) => {
|
|
|
6282
6269
|
|
|
6283
6270
|
const ViewletEditorPlainText = {
|
|
6284
6271
|
__proto__: null,
|
|
6285
|
-
create: create$
|
|
6272
|
+
create: create$j,
|
|
6286
6273
|
dispose: dispose$b,
|
|
6287
6274
|
refresh: refresh$3
|
|
6288
6275
|
};
|
|
@@ -6323,584 +6310,6 @@ const ViewletEditorSourceActions = {
|
|
|
6323
6310
|
setBounds: setBounds$4
|
|
6324
6311
|
};
|
|
6325
6312
|
|
|
6326
|
-
const List = 'list';
|
|
6327
|
-
|
|
6328
|
-
const Editor = 'editor';
|
|
6329
|
-
const SideBar$1 = 'Side Bar';
|
|
6330
|
-
const StatusBar$1 = 'Status Bar';
|
|
6331
|
-
|
|
6332
|
-
const getEventListenerOptions = eventName => {
|
|
6333
|
-
switch (eventName) {
|
|
6334
|
-
case Wheel:
|
|
6335
|
-
return {
|
|
6336
|
-
passive: true
|
|
6337
|
-
};
|
|
6338
|
-
default:
|
|
6339
|
-
return undefined;
|
|
6340
|
-
}
|
|
6341
|
-
};
|
|
6342
|
-
|
|
6343
|
-
const cache = new Map();
|
|
6344
|
-
const getWrappedListener = (listener, returnValue) => {
|
|
6345
|
-
if (!returnValue) {
|
|
6346
|
-
return listener;
|
|
6347
|
-
}
|
|
6348
|
-
if (!cache.has(listener)) {
|
|
6349
|
-
const wrapped = event => {
|
|
6350
|
-
const uid = fromEvent(event);
|
|
6351
|
-
const result = listener(event);
|
|
6352
|
-
// TODO check for empty array by value
|
|
6353
|
-
if (result.length === 0) {
|
|
6354
|
-
return;
|
|
6355
|
-
}
|
|
6356
|
-
send('Viewlet.executeViewletCommand', uid, ...result);
|
|
6357
|
-
};
|
|
6358
|
-
nameAnonymousFunction(wrapped, listener.name);
|
|
6359
|
-
cache.set(listener, wrapped);
|
|
6360
|
-
}
|
|
6361
|
-
return cache.get(listener);
|
|
6362
|
-
};
|
|
6363
|
-
|
|
6364
|
-
const attachEvent = ($Node, eventMap, key, value) => {
|
|
6365
|
-
const listener = eventMap[value];
|
|
6366
|
-
if (!listener) {
|
|
6367
|
-
console.warn('listener not found', value);
|
|
6368
|
-
return;
|
|
6369
|
-
}
|
|
6370
|
-
const options = getEventListenerOptions(key);
|
|
6371
|
-
const wrapped = getWrappedListener(listener, eventMap.returnValue);
|
|
6372
|
-
$Node.addEventListener(key, wrapped, options);
|
|
6373
|
-
};
|
|
6374
|
-
|
|
6375
|
-
const attachEventsFunctional = ($Node, eventMap) => {
|
|
6376
|
-
for (const [key] of Object.entries(eventMap)) {
|
|
6377
|
-
if (key === 'returnValue') {
|
|
6378
|
-
continue;
|
|
6379
|
-
}
|
|
6380
|
-
attachEvent($Node, eventMap, key, key);
|
|
6381
|
-
}
|
|
6382
|
-
};
|
|
6383
|
-
|
|
6384
|
-
const Text$1 = 'text';
|
|
6385
|
-
|
|
6386
|
-
const getText = clipBoardData => {
|
|
6387
|
-
return clipBoardData.getData(Text$1);
|
|
6388
|
-
};
|
|
6389
|
-
|
|
6390
|
-
const detachEvent = ($Node, key, listener) => {
|
|
6391
|
-
const wrapped = getWrappedListener(listener, true);
|
|
6392
|
-
$Node.removeEventListener(key, wrapped);
|
|
6393
|
-
};
|
|
6394
|
-
|
|
6395
|
-
const None = 0;
|
|
6396
|
-
const Ctrl = 1;
|
|
6397
|
-
const Alt = 2;
|
|
6398
|
-
|
|
6399
|
-
const getModifierKey = event => {
|
|
6400
|
-
if (event.ctrlKey) {
|
|
6401
|
-
return Ctrl;
|
|
6402
|
-
}
|
|
6403
|
-
if (event.altKey) {
|
|
6404
|
-
return Alt;
|
|
6405
|
-
}
|
|
6406
|
-
return None;
|
|
6407
|
-
};
|
|
6408
|
-
|
|
6409
|
-
// TODO so many things in this file
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
// TODO go back to edit mode after pressing escape so screenreaders can navigate https://stackoverflow.com/questions/53909477/how-to-handle-tabbing-for-accessibility-with-a-textarea-that-uses-the-tab-button
|
|
6413
|
-
|
|
6414
|
-
// TODO tree shake out mobile support when targeting electron -> less code -> less event listeners -> less memory -> less cpu
|
|
6415
|
-
|
|
6416
|
-
const handleFocus$5 = event => {
|
|
6417
|
-
return ['handleFocus'];
|
|
6418
|
-
};
|
|
6419
|
-
const handleMouseMove = event => {
|
|
6420
|
-
const {
|
|
6421
|
-
altKey,
|
|
6422
|
-
clientX,
|
|
6423
|
-
clientY
|
|
6424
|
-
} = event;
|
|
6425
|
-
return ['handleMouseMove', clientX, clientY, altKey];
|
|
6426
|
-
};
|
|
6427
|
-
const handleBlur$5 = event => {
|
|
6428
|
-
// needed for save on blur
|
|
6429
|
-
// also needed to close completions on blur
|
|
6430
|
-
return ['handleBlur'];
|
|
6431
|
-
};
|
|
6432
|
-
|
|
6433
|
-
/**
|
|
6434
|
-
*
|
|
6435
|
-
* @param {InputEvent} event
|
|
6436
|
-
*/
|
|
6437
|
-
const handleBeforeInput = event => {
|
|
6438
|
-
preventDefault(event);
|
|
6439
|
-
const {
|
|
6440
|
-
data,
|
|
6441
|
-
inputType
|
|
6442
|
-
} = event;
|
|
6443
|
-
return ['handleBeforeInput', inputType, data];
|
|
6444
|
-
};
|
|
6445
|
-
|
|
6446
|
-
// TODO composition should be better supported,
|
|
6447
|
-
// for example
|
|
6448
|
-
// - gedit draws a line below the composed text
|
|
6449
|
-
// - codemirror 6 also draws that line
|
|
6450
|
-
// - codemirror 5 also draws that line
|
|
6451
|
-
// - vscode does not draw a line, but displays characters during composition
|
|
6452
|
-
|
|
6453
|
-
const handleCompositionStart = event => {
|
|
6454
|
-
const {
|
|
6455
|
-
data
|
|
6456
|
-
} = event;
|
|
6457
|
-
return ['compositionStart', data];
|
|
6458
|
-
};
|
|
6459
|
-
const handleCompositionUpdate = event => {
|
|
6460
|
-
const {
|
|
6461
|
-
data
|
|
6462
|
-
} = event;
|
|
6463
|
-
return ['compositionUpdate', data];
|
|
6464
|
-
};
|
|
6465
|
-
const handleCompositionEnd = event => {
|
|
6466
|
-
const {
|
|
6467
|
-
data
|
|
6468
|
-
} = event;
|
|
6469
|
-
return ['compositionEnd', data];
|
|
6470
|
-
};
|
|
6471
|
-
const handleCut = event => {
|
|
6472
|
-
preventDefault(event);
|
|
6473
|
-
return ['cut'];
|
|
6474
|
-
};
|
|
6475
|
-
const isRightClick = event => {
|
|
6476
|
-
return event.button === RightClick;
|
|
6477
|
-
};
|
|
6478
|
-
const handleEditorPointerMove = event => {
|
|
6479
|
-
const {
|
|
6480
|
-
altKey,
|
|
6481
|
-
clientX,
|
|
6482
|
-
clientY
|
|
6483
|
-
} = event;
|
|
6484
|
-
// TODO if/else should be in renderer worker
|
|
6485
|
-
if (altKey) {
|
|
6486
|
-
return ['moveRectangleSelectionPx', clientX, clientY];
|
|
6487
|
-
}
|
|
6488
|
-
return ['moveSelectionPx', clientX, clientY];
|
|
6489
|
-
};
|
|
6490
|
-
const handleEditorLostPointerCapture = event => {
|
|
6491
|
-
const {
|
|
6492
|
-
target
|
|
6493
|
-
} = event;
|
|
6494
|
-
detachEvent(target, PointerMove, handleEditorPointerMove);
|
|
6495
|
-
detachEvent(target, LostPointerCapture, handleEditorLostPointerCapture);
|
|
6496
|
-
return ['handlePointerCaptureLost'];
|
|
6497
|
-
};
|
|
6498
|
-
|
|
6499
|
-
/**
|
|
6500
|
-
*
|
|
6501
|
-
* @param {PointerEvent} event
|
|
6502
|
-
*/
|
|
6503
|
-
const handleEditorPointerDown = event => {
|
|
6504
|
-
const {
|
|
6505
|
-
pointerId,
|
|
6506
|
-
target
|
|
6507
|
-
} = event;
|
|
6508
|
-
target.setPointerCapture(pointerId);
|
|
6509
|
-
attachEventsFunctional(target, {
|
|
6510
|
-
[LostPointerCapture]: handleEditorLostPointerCapture,
|
|
6511
|
-
[PointerMove]: handleEditorPointerMove,
|
|
6512
|
-
returnValue: true
|
|
6513
|
-
});
|
|
6514
|
-
return [];
|
|
6515
|
-
};
|
|
6516
|
-
const handleMouseDown$1 = event => {
|
|
6517
|
-
if (isRightClick(event)) {
|
|
6518
|
-
return [];
|
|
6519
|
-
}
|
|
6520
|
-
preventDefault(event);
|
|
6521
|
-
const {
|
|
6522
|
-
clientX,
|
|
6523
|
-
clientY,
|
|
6524
|
-
detail
|
|
6525
|
-
} = event;
|
|
6526
|
-
const modifier = getModifierKey(event);
|
|
6527
|
-
return ['handleMouseDown', modifier, clientX, clientY, detail];
|
|
6528
|
-
};
|
|
6529
|
-
|
|
6530
|
-
// TODO figure out whether it is possible to register hover provider without mousemove
|
|
6531
|
-
// mousemove handler is called very often and could slow down editor / drain battery
|
|
6532
|
-
|
|
6533
|
-
/**
|
|
6534
|
-
*
|
|
6535
|
-
* @param {WheelEvent} event
|
|
6536
|
-
*/
|
|
6537
|
-
const handleWheel = event => {
|
|
6538
|
-
const {
|
|
6539
|
-
deltaMode,
|
|
6540
|
-
deltaX,
|
|
6541
|
-
deltaY
|
|
6542
|
-
} = event;
|
|
6543
|
-
// event.preventDefault()
|
|
6544
|
-
// const state = EditorHelper.getStateFromEvent(event)
|
|
6545
|
-
// TODO send editor id
|
|
6546
|
-
return ['setDelta', deltaMode, deltaX, deltaY];
|
|
6547
|
-
};
|
|
6548
|
-
const handlePaste = event => {
|
|
6549
|
-
preventDefault(event);
|
|
6550
|
-
const {
|
|
6551
|
-
clipboardData
|
|
6552
|
-
} = event;
|
|
6553
|
-
const text = getText(clipboardData);
|
|
6554
|
-
return ['paste', text];
|
|
6555
|
-
};
|
|
6556
|
-
const handleScrollBarVerticalPointerDown = create$t(event => {
|
|
6557
|
-
const {
|
|
6558
|
-
clientY
|
|
6559
|
-
} = event;
|
|
6560
|
-
return ['handleScrollBarVerticalPointerDown', clientY];
|
|
6561
|
-
}, event => {
|
|
6562
|
-
const {
|
|
6563
|
-
clientY
|
|
6564
|
-
} = event;
|
|
6565
|
-
return ['handleScrollBarVerticalMove', clientY];
|
|
6566
|
-
}, () => {
|
|
6567
|
-
return [];
|
|
6568
|
-
});
|
|
6569
|
-
|
|
6570
|
-
/**
|
|
6571
|
-
*
|
|
6572
|
-
* @param {PointerEvent} event
|
|
6573
|
-
*/
|
|
6574
|
-
const handleScrollBarThumbHorizontalPointerMove = event => {
|
|
6575
|
-
const {
|
|
6576
|
-
clientX
|
|
6577
|
-
} = event;
|
|
6578
|
-
return ['handleScrollBarHorizontalMove', clientX];
|
|
6579
|
-
};
|
|
6580
|
-
|
|
6581
|
-
/**
|
|
6582
|
-
*
|
|
6583
|
-
* @param {PointerEvent} event
|
|
6584
|
-
*/
|
|
6585
|
-
const handleScrollBarHorizontalPointerUp = event => {
|
|
6586
|
-
const {
|
|
6587
|
-
pointerId,
|
|
6588
|
-
target
|
|
6589
|
-
} = event;
|
|
6590
|
-
stopTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6591
|
-
return [];
|
|
6592
|
-
};
|
|
6593
|
-
|
|
6594
|
-
/**
|
|
6595
|
-
*
|
|
6596
|
-
* @param {PointerEvent} event
|
|
6597
|
-
*/
|
|
6598
|
-
const handleScrollBarHorizontalPointerDown = event => {
|
|
6599
|
-
const {
|
|
6600
|
-
clientX,
|
|
6601
|
-
pointerId,
|
|
6602
|
-
target
|
|
6603
|
-
} = event;
|
|
6604
|
-
startTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6605
|
-
return ['handleScrollBarHorizontalPointerDown', clientX];
|
|
6606
|
-
};
|
|
6607
|
-
const handleScrollBarContextMenu = event => {
|
|
6608
|
-
preventDefault(event);
|
|
6609
|
-
stopPropagation(event);
|
|
6610
|
-
};
|
|
6611
|
-
const handleContextMenu$2 = event => {
|
|
6612
|
-
preventDefault(event);
|
|
6613
|
-
const {
|
|
6614
|
-
button,
|
|
6615
|
-
clientX,
|
|
6616
|
-
clientY
|
|
6617
|
-
} = event;
|
|
6618
|
-
return ['handleContextMenu', button, clientX, clientY];
|
|
6619
|
-
};
|
|
6620
|
-
|
|
6621
|
-
const setCursors = (state, dom) => {
|
|
6622
|
-
object(state);
|
|
6623
|
-
array(dom);
|
|
6624
|
-
const {
|
|
6625
|
-
$LayerCursor
|
|
6626
|
-
} = state;
|
|
6627
|
-
renderInto($LayerCursor, dom);
|
|
6628
|
-
};
|
|
6629
|
-
|
|
6630
|
-
const setDecorationsDom$2 = (state, decorations) => {
|
|
6631
|
-
const {
|
|
6632
|
-
$LayerDiagnostics
|
|
6633
|
-
} = state;
|
|
6634
|
-
renderInto($LayerDiagnostics, decorations);
|
|
6635
|
-
};
|
|
6636
|
-
|
|
6637
|
-
const setPosition$1 = (state, scrollBarY, scrollBarHeight) => {
|
|
6638
|
-
const {
|
|
6639
|
-
$ScrollBarThumbVertical
|
|
6640
|
-
} = state;
|
|
6641
|
-
$ScrollBarThumbVertical.style.translate = scrollBarY;
|
|
6642
|
-
$ScrollBarThumbVertical.style.height = scrollBarHeight;
|
|
6643
|
-
};
|
|
6644
|
-
const setScrollBarHorizontal$2 = (state, scrollBarX, scrollBarWidth, deltaX) => {
|
|
6645
|
-
const {
|
|
6646
|
-
$ScrollBarThumbHorizontal
|
|
6647
|
-
} = state;
|
|
6648
|
-
setXAndWidth($ScrollBarThumbHorizontal, scrollBarX, scrollBarWidth);
|
|
6649
|
-
};
|
|
6650
|
-
|
|
6651
|
-
const setSelections$2 = (state, dom) => {
|
|
6652
|
-
const {
|
|
6653
|
-
$LayerSelections
|
|
6654
|
-
} = state;
|
|
6655
|
-
renderInto($LayerSelections, dom);
|
|
6656
|
-
};
|
|
6657
|
-
|
|
6658
|
-
const setLineInfos = (state, dom) => {
|
|
6659
|
-
object(state);
|
|
6660
|
-
array(dom);
|
|
6661
|
-
const {
|
|
6662
|
-
$LayerText
|
|
6663
|
-
} = state;
|
|
6664
|
-
renderInto($LayerText, dom);
|
|
6665
|
-
};
|
|
6666
|
-
|
|
6667
|
-
// TODO so many things in this file
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
// TODO go back to edit mode after pressing escape so screenreaders can navigate https://stackoverflow.com/questions/53909477/how-to-handle-tabbing-for-accessibility-with-a-textarea-that-uses-the-tab-button
|
|
6671
|
-
|
|
6672
|
-
// TODO tree shake out mobile support when targeting electron -> less code -> less event listeners -> less memory -> less cpu
|
|
6673
|
-
|
|
6674
|
-
// TODO all create functions should have no arguments
|
|
6675
|
-
// and be split into two parts
|
|
6676
|
-
// 1. create -> only create dom elements
|
|
6677
|
-
// 2. render -> fill elements with attributes and data
|
|
6678
|
-
// that way all dom nodes can be recycled
|
|
6679
|
-
const create$k = () => {
|
|
6680
|
-
const $EditorInput = document.createElement('textarea');
|
|
6681
|
-
$EditorInput.className = 'EditorInput';
|
|
6682
|
-
$EditorInput.ariaAutoComplete = List;
|
|
6683
|
-
$EditorInput.ariaRoleDescription = Editor;
|
|
6684
|
-
$EditorInput.ariaMultiLine = True;
|
|
6685
|
-
$EditorInput.setAttribute('autocomplete', 'off');
|
|
6686
|
-
$EditorInput.setAttribute('autocapitalize', 'off');
|
|
6687
|
-
$EditorInput.setAttribute('autocorrect', 'off');
|
|
6688
|
-
$EditorInput.setAttribute('wrap', 'off');
|
|
6689
|
-
$EditorInput.setAttribute('spellcheck', False);
|
|
6690
|
-
$EditorInput.role = TextBox;
|
|
6691
|
-
// TODO where to best put listeners (side effects)
|
|
6692
|
-
attachEventsFunctional($EditorInput, {
|
|
6693
|
-
[BeforeInput]: handleBeforeInput,
|
|
6694
|
-
[Blur]: handleBlur$5,
|
|
6695
|
-
[CompositionEnd]: handleCompositionEnd,
|
|
6696
|
-
[CompositionStart]: handleCompositionStart,
|
|
6697
|
-
[CompositionUpdate]: handleCompositionUpdate,
|
|
6698
|
-
[Cut]: handleCut,
|
|
6699
|
-
[Focus]: handleFocus$5,
|
|
6700
|
-
[Paste]: handlePaste,
|
|
6701
|
-
returnValue: true
|
|
6702
|
-
});
|
|
6703
|
-
$EditorInput.name = 'editor';
|
|
6704
|
-
const $LayerCursor = document.createElement('div');
|
|
6705
|
-
$LayerCursor.className = 'LayerCursor';
|
|
6706
|
-
const $LayerText = document.createElement('div');
|
|
6707
|
-
$LayerText.className = 'EditorRows';
|
|
6708
|
-
const $LayerGutter = document.createElement('div');
|
|
6709
|
-
$LayerGutter.className = 'Gutter';
|
|
6710
|
-
attachEventsFunctional($LayerText, {
|
|
6711
|
-
[MouseDown]: handleMouseDown$1,
|
|
6712
|
-
[PointerDown]: handleEditorPointerDown,
|
|
6713
|
-
returnValue: true
|
|
6714
|
-
});
|
|
6715
|
-
const $ScrollBarThumbVertical = document.createElement('div');
|
|
6716
|
-
$ScrollBarThumbVertical.className = 'ScrollBarThumb ScrollBarThumbVertical';
|
|
6717
|
-
|
|
6718
|
-
// TODO only create $ScrollBarDiagnostics lazily when there are actually diagnostics
|
|
6719
|
-
const $ScrollBarDiagnostics = document.createElement('div');
|
|
6720
|
-
$ScrollBarDiagnostics.className = 'EditorScrollBarDiagnostics';
|
|
6721
|
-
const $ScrollBarVertical = document.createElement('div');
|
|
6722
|
-
$ScrollBarVertical.className = 'ScrollBar ScrollBarVertical';
|
|
6723
|
-
attachEventsFunctional($ScrollBarVertical, {
|
|
6724
|
-
[ContextMenu]: handleScrollBarContextMenu,
|
|
6725
|
-
[PointerDown]: handleScrollBarVerticalPointerDown,
|
|
6726
|
-
returnValue: true
|
|
6727
|
-
});
|
|
6728
|
-
$ScrollBarVertical.append($ScrollBarThumbVertical);
|
|
6729
|
-
const $ScrollBarThumbHorizontal = document.createElement('div');
|
|
6730
|
-
$ScrollBarThumbHorizontal.className = 'ScrollBarThumb ScrollBarThumbHorizontal';
|
|
6731
|
-
const $ScrollBarHorizontal = document.createElement('div');
|
|
6732
|
-
$ScrollBarHorizontal.className = 'ScrollBar ScrollBarHorizontal';
|
|
6733
|
-
$ScrollBarHorizontal.append($ScrollBarThumbHorizontal);
|
|
6734
|
-
attachEventsFunctional($ScrollBarHorizontal, {
|
|
6735
|
-
[PointerDown]: handleScrollBarHorizontalPointerDown,
|
|
6736
|
-
returnValue: true
|
|
6737
|
-
});
|
|
6738
|
-
|
|
6739
|
-
// $EditorRows.addEventListener('mousemove', handleMouseMove, { passive: true })
|
|
6740
|
-
|
|
6741
|
-
// TODO function should be hoisted (maybe -> one listener for all editors (definitely))
|
|
6742
|
-
// only problem is $EditorInput closure
|
|
6743
|
-
|
|
6744
|
-
// TODO when mousedown on completions -> this shouldn't be called
|
|
6745
|
-
|
|
6746
|
-
const $LayerSelections = document.createElement('div');
|
|
6747
|
-
$LayerSelections.className = 'Selections';
|
|
6748
|
-
|
|
6749
|
-
// TODO maybe use css grid to position layers on top of each other
|
|
6750
|
-
// TODO maybe merge layerDiagnostics with LayerSelections
|
|
6751
|
-
// TODO maybe this should be more generic, e.g. LayerDecorations
|
|
6752
|
-
// where decoration = {top,left, width, height, type/className}
|
|
6753
|
-
const $LayerDiagnostics = document.createElement('div');
|
|
6754
|
-
$LayerDiagnostics.className = 'LayerDiagnostics';
|
|
6755
|
-
const $EditorLayers = document.createElement('div');
|
|
6756
|
-
$EditorLayers.className = 'EditorLayers';
|
|
6757
|
-
$EditorLayers.append($LayerSelections, $LayerText, $LayerCursor, $LayerDiagnostics);
|
|
6758
|
-
const $EditorContent = document.createElement('div');
|
|
6759
|
-
$EditorContent.className = 'EditorContent';
|
|
6760
|
-
$EditorContent.append($EditorInput, $EditorLayers, $ScrollBarDiagnostics, $ScrollBarVertical, $ScrollBarHorizontal);
|
|
6761
|
-
$EditorContent.addEventListener('mousemove', handleMouseMove, Passive);
|
|
6762
|
-
const $Editor = document.createElement('div');
|
|
6763
|
-
$Editor.className = 'Viewlet Editor';
|
|
6764
|
-
$Editor.role = Code;
|
|
6765
|
-
$Editor.append($LayerGutter, $EditorContent);
|
|
6766
|
-
attachEventsFunctional($Editor, {
|
|
6767
|
-
[ContextMenu]: handleContextMenu$2,
|
|
6768
|
-
[Wheel]: handleWheel,
|
|
6769
|
-
returnValue: true
|
|
6770
|
-
});
|
|
6771
|
-
return {
|
|
6772
|
-
$Editor,
|
|
6773
|
-
$EditorInput,
|
|
6774
|
-
$EditorLayers,
|
|
6775
|
-
$LayerCursor,
|
|
6776
|
-
$LayerDiagnostics,
|
|
6777
|
-
$LayerGutter,
|
|
6778
|
-
$LayerSelections,
|
|
6779
|
-
$LayerText,
|
|
6780
|
-
$ScrollBarDiagnostics,
|
|
6781
|
-
$ScrollBarThumbHorizontal,
|
|
6782
|
-
$ScrollBarThumbVertical,
|
|
6783
|
-
$Viewlet: $Editor,
|
|
6784
|
-
shouldIgnoreSelectionChange: false
|
|
6785
|
-
};
|
|
6786
|
-
};
|
|
6787
|
-
const setText$2 = (state, dom) => {
|
|
6788
|
-
setLineInfos(state, dom);
|
|
6789
|
-
};
|
|
6790
|
-
const setIncrementalEdits$1 = (state, incrementalEdits) => {
|
|
6791
|
-
const {
|
|
6792
|
-
$LayerText
|
|
6793
|
-
} = state;
|
|
6794
|
-
for (const incrementalEdit of incrementalEdits) {
|
|
6795
|
-
const {
|
|
6796
|
-
columnIndex,
|
|
6797
|
-
rowIndex,
|
|
6798
|
-
text
|
|
6799
|
-
} = incrementalEdit;
|
|
6800
|
-
const $Row = $LayerText.children[rowIndex];
|
|
6801
|
-
const $Column = $Row.children[columnIndex];
|
|
6802
|
-
if ($Column.firstChild) {
|
|
6803
|
-
$Column.firstChild.nodeValue = text;
|
|
6804
|
-
} else {
|
|
6805
|
-
$Column.textContent = text;
|
|
6806
|
-
}
|
|
6807
|
-
}
|
|
6808
|
-
};
|
|
6809
|
-
const setScrollBar$1 = (state, scrollBarY, scrollBarHeight) => {
|
|
6810
|
-
setPosition$1(state, scrollBarY, scrollBarHeight);
|
|
6811
|
-
};
|
|
6812
|
-
const setScrollBarHorizontal$1 = setScrollBarHorizontal$2;
|
|
6813
|
-
const renderGutter$1 = (state, dom) => {
|
|
6814
|
-
const {
|
|
6815
|
-
$LayerGutter
|
|
6816
|
-
} = state;
|
|
6817
|
-
renderInto($LayerGutter, dom);
|
|
6818
|
-
};
|
|
6819
|
-
const setSelections$1 = (state, cursorInfos, selectionInfos) => {
|
|
6820
|
-
array(cursorInfos);
|
|
6821
|
-
array(selectionInfos);
|
|
6822
|
-
setCursors(state, cursorInfos);
|
|
6823
|
-
setSelections$2(state, selectionInfos);
|
|
6824
|
-
};
|
|
6825
|
-
const setFocused$2 = async (state, isFocused) => {
|
|
6826
|
-
const {
|
|
6827
|
-
$EditorInput
|
|
6828
|
-
} = state;
|
|
6829
|
-
let tries = 0;
|
|
6830
|
-
while (!$EditorInput.isConnected && tries++ < 1000) {
|
|
6831
|
-
await new Promise(resolve => {
|
|
6832
|
-
requestAnimationFrame(resolve);
|
|
6833
|
-
});
|
|
6834
|
-
}
|
|
6835
|
-
if (!$EditorInput.isConnected) {
|
|
6836
|
-
warn$1('unmounted editor cannot be focused');
|
|
6837
|
-
}
|
|
6838
|
-
if (isFocused) {
|
|
6839
|
-
$EditorInput.focus();
|
|
6840
|
-
}
|
|
6841
|
-
};
|
|
6842
|
-
const setDecorationsDom$1 = (state, decorations) => {
|
|
6843
|
-
setDecorationsDom$2(state, decorations);
|
|
6844
|
-
};
|
|
6845
|
-
|
|
6846
|
-
const create$j = create$k;
|
|
6847
|
-
const setText$1 = setText$2;
|
|
6848
|
-
const setSelections = setSelections$1;
|
|
6849
|
-
const setIncrementalEdits = setIncrementalEdits$1;
|
|
6850
|
-
const handleError$4 = (state, error) => {
|
|
6851
|
-
state.$Viewlet.textContent = error;
|
|
6852
|
-
};
|
|
6853
|
-
const setScrollBar = setScrollBar$1;
|
|
6854
|
-
const renderGutter = renderGutter$1;
|
|
6855
|
-
const setScrollBarHorizontal = setScrollBarHorizontal$1;
|
|
6856
|
-
const highlightAsLink = (state, relativeY, tokenIndex) => {
|
|
6857
|
-
const $Row = state.$LayerText.children[relativeY];
|
|
6858
|
-
if (!$Row) {
|
|
6859
|
-
info('no row found');
|
|
6860
|
-
return;
|
|
6861
|
-
}
|
|
6862
|
-
const $Token = $Row.children[tokenIndex + 1];
|
|
6863
|
-
$Token.classList.add('EditorGoToDefinitionLink');
|
|
6864
|
-
};
|
|
6865
|
-
const showOverlayMessage = (state, x, y, content) => {
|
|
6866
|
-
const $OverLayMessage = document.createElement('div');
|
|
6867
|
-
$OverLayMessage.className = 'EditorOverlayMessage';
|
|
6868
|
-
$OverLayMessage.style.position = 'fixed';
|
|
6869
|
-
$OverLayMessage.textContent = content;
|
|
6870
|
-
setXAndY($OverLayMessage, x, y);
|
|
6871
|
-
append$1($OverLayMessage);
|
|
6872
|
-
};
|
|
6873
|
-
const hideOverlayMessage = state => {
|
|
6874
|
-
// TODO pass id of the overlay message and remove widget by id
|
|
6875
|
-
for (const $Widget of state$6.widgetSet) {
|
|
6876
|
-
// @ts-expect-error
|
|
6877
|
-
if ($Widget.className === 'EditorOverlayMessage') {
|
|
6878
|
-
remove$1($Widget);
|
|
6879
|
-
}
|
|
6880
|
-
}
|
|
6881
|
-
};
|
|
6882
|
-
const setFocused$1 = setFocused$2;
|
|
6883
|
-
const focus$b = setFocused$2;
|
|
6884
|
-
const setDecorationsDom = setDecorationsDom$1;
|
|
6885
|
-
|
|
6886
|
-
const ViewletEditorText = {
|
|
6887
|
-
__proto__: null,
|
|
6888
|
-
create: create$j,
|
|
6889
|
-
focus: focus$b,
|
|
6890
|
-
handleError: handleError$4,
|
|
6891
|
-
hideOverlayMessage,
|
|
6892
|
-
highlightAsLink,
|
|
6893
|
-
renderGutter,
|
|
6894
|
-
setDecorationsDom,
|
|
6895
|
-
setFocused: setFocused$1,
|
|
6896
|
-
setIncrementalEdits,
|
|
6897
|
-
setScrollBar,
|
|
6898
|
-
setScrollBarHorizontal,
|
|
6899
|
-
setSelections,
|
|
6900
|
-
setText: setText$1,
|
|
6901
|
-
showOverlayMessage
|
|
6902
|
-
};
|
|
6903
|
-
|
|
6904
6313
|
const create$i = () => {
|
|
6905
6314
|
const $Viewlet = document.createElement('div');
|
|
6906
6315
|
$Viewlet.className = 'Viewlet EditorTextError';
|
|
@@ -7227,13 +6636,13 @@ const handleScrollBarPointerDown = event => {
|
|
|
7227
6636
|
const ViewletInlineDiffEditorEvents = {
|
|
7228
6637
|
__proto__: null,
|
|
7229
6638
|
handleScrollBarPointerDown,
|
|
7230
|
-
handleWheel: handleWheel$
|
|
6639
|
+
handleWheel: handleWheel$2
|
|
7231
6640
|
};
|
|
7232
6641
|
|
|
7233
6642
|
const ViewletInlineDiffEditor = {
|
|
7234
6643
|
__proto__: null,
|
|
7235
6644
|
Events: ViewletInlineDiffEditorEvents,
|
|
7236
|
-
setScrollBar
|
|
6645
|
+
setScrollBar
|
|
7237
6646
|
};
|
|
7238
6647
|
|
|
7239
6648
|
const handleResizerPointerMove = event => {
|
|
@@ -7314,7 +6723,7 @@ const ViewletKeyBindings = {
|
|
|
7314
6723
|
__proto__: null,
|
|
7315
6724
|
Events: Events$2,
|
|
7316
6725
|
setColumnWidths,
|
|
7317
|
-
setScrollBar
|
|
6726
|
+
setScrollBar,
|
|
7318
6727
|
setSize,
|
|
7319
6728
|
setValue
|
|
7320
6729
|
};
|
|
@@ -7349,7 +6758,7 @@ const getKeyBindingIdentifier = event => {
|
|
|
7349
6758
|
} = event;
|
|
7350
6759
|
const modifierControl = ctrlKey ? CtrlCmd : 0;
|
|
7351
6760
|
const modifierShift = shiftKey ? Shift : 0;
|
|
7352
|
-
const modifierAlt = altKey ? Alt
|
|
6761
|
+
const modifierAlt = altKey ? Alt : 0;
|
|
7353
6762
|
const normalizedKey = normalizeKey(key, code);
|
|
7354
6763
|
const keyCode = getKeyCode(normalizedKey);
|
|
7355
6764
|
const identifier = modifierControl | modifierShift | modifierAlt | keyCode;
|
|
@@ -7521,7 +6930,6 @@ const EditorError = 'EditorError';
|
|
|
7521
6930
|
const EditorHover = 'EditorHover';
|
|
7522
6931
|
const EditorImage = 'EditorImage';
|
|
7523
6932
|
const EditorPlainText = 'EditorPlainText';
|
|
7524
|
-
const EditorText = 'Editor';
|
|
7525
6933
|
const EditorWidgetError = 'EditorWidgetError';
|
|
7526
6934
|
const Empty = 'Empty';
|
|
7527
6935
|
const Error$1 = 'Error';
|
|
@@ -7536,10 +6944,10 @@ const Panel = 'Panel';
|
|
|
7536
6944
|
const References = 'References';
|
|
7537
6945
|
const RunAndDebug = 'Run And Debug';
|
|
7538
6946
|
const ScreenCapture = 'ScreenCapture';
|
|
7539
|
-
const SideBar = 'SideBar';
|
|
6947
|
+
const SideBar$1 = 'SideBar';
|
|
7540
6948
|
const SimpleBrowser = 'SimpleBrowser';
|
|
7541
6949
|
const SourceControl = 'Source Control';
|
|
7542
|
-
const StatusBar = 'StatusBar';
|
|
6950
|
+
const StatusBar$1 = 'StatusBar';
|
|
7543
6951
|
const Storage = 'Storage';
|
|
7544
6952
|
const Terminal = 'Terminal';
|
|
7545
6953
|
const Terminal2 = 'Terminal2';
|
|
@@ -7593,7 +7001,7 @@ const handleError$2 = (state, error) => {
|
|
|
7593
7001
|
};
|
|
7594
7002
|
const focus$7 = state => {
|
|
7595
7003
|
object(state);
|
|
7596
|
-
focus$
|
|
7004
|
+
focus$d(state.$ViewletOutputContent);
|
|
7597
7005
|
send('Focus.setFocus', FocusOutput);
|
|
7598
7006
|
};
|
|
7599
7007
|
|
|
@@ -7831,6 +7239,9 @@ const ViewletScreenCapture = {
|
|
|
7831
7239
|
setScreenCapture
|
|
7832
7240
|
};
|
|
7833
7241
|
|
|
7242
|
+
const SideBar = 'Side Bar';
|
|
7243
|
+
const StatusBar = 'Status Bar';
|
|
7244
|
+
|
|
7834
7245
|
const handleClickAction = (target, uid) => {
|
|
7835
7246
|
const index = getNodeIndex(target);
|
|
7836
7247
|
if (target && target.dataset && target.dataset.command) {
|
|
@@ -7857,7 +7268,7 @@ const create$8 = () => {
|
|
|
7857
7268
|
$Viewlet.id = 'SideBar';
|
|
7858
7269
|
$Viewlet.className = 'Viewlet SideBar';
|
|
7859
7270
|
$Viewlet.role = Complementary;
|
|
7860
|
-
$Viewlet.ariaRoleDescription = SideBar
|
|
7271
|
+
$Viewlet.ariaRoleDescription = SideBar;
|
|
7861
7272
|
$Viewlet.append($SideBarTitleArea);
|
|
7862
7273
|
return {
|
|
7863
7274
|
$Actions: undefined,
|
|
@@ -8007,12 +7418,12 @@ const handleContextMenu$1 = event => {
|
|
|
8007
7418
|
clientY
|
|
8008
7419
|
} = event;
|
|
8009
7420
|
const uid = fromEvent(event);
|
|
8010
|
-
handleContextMenu$
|
|
7421
|
+
handleContextMenu$5(uid, button, clientX, clientY);
|
|
8011
7422
|
};
|
|
8012
7423
|
|
|
8013
7424
|
const handleFocus = event => {
|
|
8014
7425
|
const uid = fromEvent(event);
|
|
8015
|
-
handleFocus$
|
|
7426
|
+
handleFocus$7(uid);
|
|
8016
7427
|
};
|
|
8017
7428
|
const getButtonIndex = $Node => {
|
|
8018
7429
|
let index = -1;
|
|
@@ -8093,7 +7504,7 @@ const ViewletSourceControlEvents = {
|
|
|
8093
7504
|
handleInput: handleInput$1,
|
|
8094
7505
|
handleMouseOut,
|
|
8095
7506
|
handleMouseOver,
|
|
8096
|
-
handleWheel: handleWheel$
|
|
7507
|
+
handleWheel: handleWheel$2
|
|
8097
7508
|
};
|
|
8098
7509
|
|
|
8099
7510
|
const focus$4 = state => {
|
|
@@ -8129,7 +7540,7 @@ const create$7 = () => {
|
|
|
8129
7540
|
$Viewlet.className = 'Viewlet StatusBar';
|
|
8130
7541
|
$Viewlet.tabIndex = 0;
|
|
8131
7542
|
$Viewlet.role = Status;
|
|
8132
|
-
$Viewlet.ariaRoleDescription = StatusBar
|
|
7543
|
+
$Viewlet.ariaRoleDescription = StatusBar;
|
|
8133
7544
|
$Viewlet.ariaLive = 'off'; // see https://github.com/microsoft/vscode/issues/94677
|
|
8134
7545
|
$Viewlet.addEventListener('click', handleClick$2);
|
|
8135
7546
|
return {
|
|
@@ -8296,7 +7707,7 @@ const handleMenuClick = event => {
|
|
|
8296
7707
|
};
|
|
8297
7708
|
const handleFocusIn$1 = event => {
|
|
8298
7709
|
const uid = fromEvent(event);
|
|
8299
|
-
handleFocus$
|
|
7710
|
+
handleFocus$7(uid);
|
|
8300
7711
|
};
|
|
8301
7712
|
|
|
8302
7713
|
const ViewletTitleBarMenuBarEvents = {
|
|
@@ -8790,7 +8201,6 @@ const moduleLoaders = {
|
|
|
8790
8201
|
[EditorImage]: () => ViewletEditorImage,
|
|
8791
8202
|
[EditorPlainText]: () => ViewletEditorPlainText,
|
|
8792
8203
|
[EditorSourceActions]: () => ViewletEditorSourceActions,
|
|
8793
|
-
[EditorText]: () => ViewletEditorText,
|
|
8794
8204
|
[EditorTextError]: () => ViewletEditorTextError,
|
|
8795
8205
|
[EditorWidgetError]: () => ViewletEditorWidgetError,
|
|
8796
8206
|
[Empty]: () => ViewletEmpty,
|
|
@@ -8807,10 +8217,10 @@ const moduleLoaders = {
|
|
|
8807
8217
|
[References]: () => ViewletReferences,
|
|
8808
8218
|
[RunAndDebug]: () => ViewletRunAndDebug,
|
|
8809
8219
|
[ScreenCapture]: () => ViewletScreenCapture,
|
|
8810
|
-
[SideBar]: () => ViewletSideBar,
|
|
8220
|
+
[SideBar$1]: () => ViewletSideBar,
|
|
8811
8221
|
[SimpleBrowser]: () => ViewletSimpleBrowser,
|
|
8812
8222
|
[SourceControl]: () => ViewletSourceControl,
|
|
8813
|
-
[StatusBar]: () => ViewletStatusBar,
|
|
8223
|
+
[StatusBar$1]: () => ViewletStatusBar,
|
|
8814
8224
|
[Storage]: () => ViewletStorage,
|
|
8815
8225
|
[Terminal]: () => Promise.resolve().then(function () { return ViewletTerminal; }),
|
|
8816
8226
|
[Terminal2]: () => Promise.resolve().then(function () { return ViewletTerminal2; }),
|
|
@@ -9517,7 +8927,7 @@ const getFilePathElectron = async file => {
|
|
|
9517
8927
|
};
|
|
9518
8928
|
|
|
9519
8929
|
const handleMessagePort = async port => {
|
|
9520
|
-
await create$
|
|
8930
|
+
await create$z({
|
|
9521
8931
|
commandMap: {},
|
|
9522
8932
|
messagePort: port
|
|
9523
8933
|
});
|
|
@@ -9624,7 +9034,7 @@ const commandMap = {
|
|
|
9624
9034
|
'GetFilePathElectron.getFilePathElectron': getFilePathElectron,
|
|
9625
9035
|
'HandleMessagePort.handleMessagePort': handleMessagePort,
|
|
9626
9036
|
'InitData.getInitData': getInitData,
|
|
9627
|
-
'IpcParent.create': create$
|
|
9037
|
+
'IpcParent.create': create$w,
|
|
9628
9038
|
'KeyBindings.setIdentifiers': setIdentifiers,
|
|
9629
9039
|
'Layout.getBounds': getBounds,
|
|
9630
9040
|
'Location.getHref': getHref,
|
|
@@ -9639,10 +9049,10 @@ const commandMap = {
|
|
|
9639
9049
|
'Menu.showControlled': showControlled,
|
|
9640
9050
|
'Menu.showMenu': showMenu,
|
|
9641
9051
|
'Meta.setThemeColor': setThemeColor,
|
|
9642
|
-
'Notification.create': create$
|
|
9052
|
+
'Notification.create': create$v,
|
|
9643
9053
|
'Notification.createWithOptions': createWithOptions,
|
|
9644
9054
|
'Notification.dispose': dispose$h,
|
|
9645
|
-
'OffscreenCanvas.create': create$
|
|
9055
|
+
'OffscreenCanvas.create': create$u,
|
|
9646
9056
|
'OffscreenCanvas.create2': create2,
|
|
9647
9057
|
'Open.openUrl': openUrl,
|
|
9648
9058
|
'Open.redirectToUrl': redirectToUrl,
|
|
@@ -9704,7 +9114,7 @@ const getConfiguredEditorWorkerUrl = () => {
|
|
|
9704
9114
|
const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
|
|
9705
9115
|
|
|
9706
9116
|
const launchEditorWorker = async port => {
|
|
9707
|
-
const ipc = await create$
|
|
9117
|
+
const ipc = await create$w({
|
|
9708
9118
|
method: ModuleWorkerWithMessagePort,
|
|
9709
9119
|
name: 'Editor Worker',
|
|
9710
9120
|
port,
|
|
@@ -9732,7 +9142,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
|
|
|
9732
9142
|
|
|
9733
9143
|
const launchExtensionHostWorker = async port => {
|
|
9734
9144
|
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
9735
|
-
const ipc = await create$
|
|
9145
|
+
const ipc = await create$w({
|
|
9736
9146
|
method: ModuleWorkerWithMessagePort,
|
|
9737
9147
|
name,
|
|
9738
9148
|
port,
|
|
@@ -9760,7 +9170,7 @@ const getConfiguredSyntaxHighlightingWorkerUrl = () => {
|
|
|
9760
9170
|
const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
9761
9171
|
|
|
9762
9172
|
const launchSyntaxHighlightingWorker = async port => {
|
|
9763
|
-
const ipc = await create$
|
|
9173
|
+
const ipc = await create$w({
|
|
9764
9174
|
method: ModuleWorkerWithMessagePort,
|
|
9765
9175
|
name: 'Syntax Highlighting Worker',
|
|
9766
9176
|
port,
|
|
@@ -10231,11 +9641,11 @@ const create$2 = ({
|
|
|
10231
9641
|
|
|
10232
9642
|
const handleBlur = event => {
|
|
10233
9643
|
const uid = fromEvent(event);
|
|
10234
|
-
handleBlur$
|
|
9644
|
+
handleBlur$7(uid);
|
|
10235
9645
|
};
|
|
10236
9646
|
const handleMouseDown = (event, ...args) => {
|
|
10237
9647
|
const uid = fromEvent(event);
|
|
10238
|
-
handleMouseDown$
|
|
9648
|
+
handleMouseDown$1(uid, ...args);
|
|
10239
9649
|
};
|
|
10240
9650
|
const handleKeyDown = (event, ...args) => {
|
|
10241
9651
|
const uid = fromEvent(event);
|