@lvce-editor/renderer-process 2.1.0 → 3.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 +152 -75
- package/package.json +1 -1
|
@@ -775,7 +775,7 @@ const getErrorResponse = (message, error, ipc, preparePrettyError, logError) =>
|
|
|
775
775
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
776
776
|
return create$1$1(message, errorProperty);
|
|
777
777
|
};
|
|
778
|
-
const create$
|
|
778
|
+
const create$M = (message, result) => {
|
|
779
779
|
return {
|
|
780
780
|
jsonrpc: Two$1,
|
|
781
781
|
id: message.id,
|
|
@@ -784,7 +784,7 @@ const create$L = (message, result) => {
|
|
|
784
784
|
};
|
|
785
785
|
const getSuccessResponse = (message, result) => {
|
|
786
786
|
const resultProperty = result ?? null;
|
|
787
|
-
return create$
|
|
787
|
+
return create$M(message, resultProperty);
|
|
788
788
|
};
|
|
789
789
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
790
790
|
try {
|
|
@@ -886,7 +886,7 @@ const getModule$1 = method => {
|
|
|
886
886
|
}
|
|
887
887
|
};
|
|
888
888
|
|
|
889
|
-
const create$
|
|
889
|
+
const create$L = async ({
|
|
890
890
|
method,
|
|
891
891
|
...options
|
|
892
892
|
}) => {
|
|
@@ -906,7 +906,7 @@ const launchWorker = async ({
|
|
|
906
906
|
name,
|
|
907
907
|
url
|
|
908
908
|
}) => {
|
|
909
|
-
const worker = await create$
|
|
909
|
+
const worker = await create$L({
|
|
910
910
|
method: Auto,
|
|
911
911
|
url,
|
|
912
912
|
name
|
|
@@ -1274,7 +1274,7 @@ const getMarkerLines = (loc, source, opts) => {
|
|
|
1274
1274
|
markerLines
|
|
1275
1275
|
};
|
|
1276
1276
|
};
|
|
1277
|
-
const create$
|
|
1277
|
+
const create$K = (rawLines, loc, opts = {}) => {
|
|
1278
1278
|
const lines = rawLines.split(NEWLINE);
|
|
1279
1279
|
const {
|
|
1280
1280
|
start,
|
|
@@ -1617,7 +1617,7 @@ const prepareErrorMessageWithoutCodeFrame = async error => {
|
|
|
1617
1617
|
} = getOriginalPosition(sourceMap, parsedLine, parsedColumn);
|
|
1618
1618
|
const absoluteSourceUrl = toAbsoluteUrl(path, source);
|
|
1619
1619
|
const originalSourceContent = await getText$1(absoluteSourceUrl);
|
|
1620
|
-
const codeFrame = create$
|
|
1620
|
+
const codeFrame = create$K(originalSourceContent, {
|
|
1621
1621
|
start: {
|
|
1622
1622
|
line: originalLine,
|
|
1623
1623
|
column: originalColumn
|
|
@@ -1635,7 +1635,7 @@ const prepareErrorMessageWithoutCodeFrame = async error => {
|
|
|
1635
1635
|
_error: error
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
const codeFrame = create$
|
|
1638
|
+
const codeFrame = create$K(text, {
|
|
1639
1639
|
start: {
|
|
1640
1640
|
line: parsedLine,
|
|
1641
1641
|
column: parsedColumn
|
|
@@ -2053,7 +2053,7 @@ const remove$1 = $Element => {
|
|
|
2053
2053
|
// but that's difficult to know
|
|
2054
2054
|
|
|
2055
2055
|
// TODO hide widget after timeout or mousemove
|
|
2056
|
-
const create$
|
|
2056
|
+
const create$J = (message, x, y) => {
|
|
2057
2057
|
const $EditorError = document.createElement('div');
|
|
2058
2058
|
$EditorError.className = 'EditorWidgetError';
|
|
2059
2059
|
$EditorError.textContent = message;
|
|
@@ -2068,7 +2068,7 @@ const create$I = (message, x, y) => {
|
|
|
2068
2068
|
|
|
2069
2069
|
const name$s = 'EditorError';
|
|
2070
2070
|
const Commands$t = {
|
|
2071
|
-
create: create$
|
|
2071
|
+
create: create$J
|
|
2072
2072
|
};
|
|
2073
2073
|
|
|
2074
2074
|
const EditorError_ipc = {
|
|
@@ -2108,7 +2108,7 @@ const focusPrevious$1 = () => {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
};
|
|
2110
2110
|
|
|
2111
|
-
const create$
|
|
2111
|
+
const create$I = () => {
|
|
2112
2112
|
const $InputBox = document.createElement('input');
|
|
2113
2113
|
$InputBox.className = 'InputBox';
|
|
2114
2114
|
$InputBox.spellcheck = false;
|
|
@@ -2139,6 +2139,9 @@ const setXAndWidth = ($Element, x, width) => {
|
|
|
2139
2139
|
const setTop = ($Element, top) => {
|
|
2140
2140
|
$Element.style.top = `${top}px`;
|
|
2141
2141
|
};
|
|
2142
|
+
const setWidth = ($Element, width) => {
|
|
2143
|
+
$Element.style.width = `${width}px`;
|
|
2144
|
+
};
|
|
2142
2145
|
const setXAndY = ($Element, x, y) => {
|
|
2143
2146
|
$Element.style.left = `${x}px`;
|
|
2144
2147
|
$Element.style.top = `${y}px`;
|
|
@@ -2171,8 +2174,8 @@ const FocusOutput = 28;
|
|
|
2171
2174
|
const handleBlur$a = () => {
|
|
2172
2175
|
send( /* EditorRename.abort */'EditorRename.abort');
|
|
2173
2176
|
};
|
|
2174
|
-
const create$
|
|
2175
|
-
const $RenameWidgetInputBox = create$
|
|
2177
|
+
const create$H = (x, y) => {
|
|
2178
|
+
const $RenameWidgetInputBox = create$I();
|
|
2176
2179
|
$RenameWidgetInputBox.className = 'RenameWidgetInputBox';
|
|
2177
2180
|
$RenameWidgetInputBox.onblur = handleBlur$a;
|
|
2178
2181
|
const $RenameWidget = document.createElement('div');
|
|
@@ -2203,7 +2206,7 @@ const finish = state => {
|
|
|
2203
2206
|
|
|
2204
2207
|
const name$r = 'EditorRename';
|
|
2205
2208
|
const Commands$s = {
|
|
2206
|
-
create: create$
|
|
2209
|
+
create: create$H,
|
|
2207
2210
|
dispose: dispose$i,
|
|
2208
2211
|
finish: finish
|
|
2209
2212
|
};
|
|
@@ -2289,7 +2292,7 @@ const showError = (message, y, x) => {
|
|
|
2289
2292
|
$ImagePreviewImage
|
|
2290
2293
|
};
|
|
2291
2294
|
};
|
|
2292
|
-
const create$
|
|
2295
|
+
const create$G = (uri, top, left) => {
|
|
2293
2296
|
const $ImagePreviewImage = document.createElement('img');
|
|
2294
2297
|
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
2295
2298
|
$ImagePreviewImage.src = uri;
|
|
@@ -2320,7 +2323,7 @@ const dispose$h = state => {
|
|
|
2320
2323
|
|
|
2321
2324
|
const ImagePreview$1 = {
|
|
2322
2325
|
__proto__: null,
|
|
2323
|
-
create: create$
|
|
2326
|
+
create: create$G,
|
|
2324
2327
|
dispose: dispose$h,
|
|
2325
2328
|
showError,
|
|
2326
2329
|
update
|
|
@@ -2328,7 +2331,7 @@ const ImagePreview$1 = {
|
|
|
2328
2331
|
|
|
2329
2332
|
const name$o = 'ImagePreview';
|
|
2330
2333
|
const Commands$p = {
|
|
2331
|
-
create: create$
|
|
2334
|
+
create: create$G,
|
|
2332
2335
|
dispose: dispose$h,
|
|
2333
2336
|
showError: showError,
|
|
2334
2337
|
update: update
|
|
@@ -2406,7 +2409,7 @@ const InitData_ipc = {
|
|
|
2406
2409
|
|
|
2407
2410
|
const name$m = 'IpcParent';
|
|
2408
2411
|
const Commands$n = {
|
|
2409
|
-
create: create$
|
|
2412
|
+
create: create$L
|
|
2410
2413
|
};
|
|
2411
2414
|
|
|
2412
2415
|
const IpcParent_ipc = {
|
|
@@ -2471,16 +2474,20 @@ const MeasureTextHeight_ipc = {
|
|
|
2471
2474
|
name: name$j
|
|
2472
2475
|
};
|
|
2473
2476
|
|
|
2474
|
-
const measureTextBlockHeight = (text, fontSize, fontFamily, width) => {
|
|
2477
|
+
const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) => {
|
|
2475
2478
|
string(text);
|
|
2476
|
-
|
|
2479
|
+
number(fontSize);
|
|
2477
2480
|
string(fontFamily);
|
|
2481
|
+
number(width);
|
|
2482
|
+
string(lineHeight);
|
|
2478
2483
|
const $Measure = document.createElement('div');
|
|
2479
2484
|
$Measure.style.width = `${width}px`;
|
|
2480
2485
|
$Measure.style.contain = 'content';
|
|
2481
2486
|
$Measure.style.position = 'absolute';
|
|
2482
2487
|
$Measure.style.top = '-9999px';
|
|
2483
2488
|
$Measure.style.left = '-9999px';
|
|
2489
|
+
$Measure.style.fontSize = `${fontSize}px`;
|
|
2490
|
+
$Measure.style.lineHeight = lineHeight;
|
|
2484
2491
|
$Measure.textContent = text;
|
|
2485
2492
|
return getElementHeight($Measure);
|
|
2486
2493
|
};
|
|
@@ -2522,7 +2529,7 @@ const create$Notification = message => {
|
|
|
2522
2529
|
$Notification.textContent = message;
|
|
2523
2530
|
return $Notification;
|
|
2524
2531
|
};
|
|
2525
|
-
const create$
|
|
2532
|
+
const create$F = (type, message) => {
|
|
2526
2533
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
2527
2534
|
const $Notification = create$Notification(message);
|
|
2528
2535
|
append$1($Notification);
|
|
@@ -2575,7 +2582,7 @@ const name$g = 'Notification';
|
|
|
2575
2582
|
|
|
2576
2583
|
// prettier-ignore
|
|
2577
2584
|
const Commands$h = {
|
|
2578
|
-
create: create$
|
|
2585
|
+
create: create$F,
|
|
2579
2586
|
createWithOptions: createWithOptions,
|
|
2580
2587
|
dispose: dispose$g
|
|
2581
2588
|
};
|
|
@@ -2601,7 +2608,7 @@ const set$3 = (canvasId, canvas) => {
|
|
|
2601
2608
|
const get$3 = id => {
|
|
2602
2609
|
return get$4(id);
|
|
2603
2610
|
};
|
|
2604
|
-
const create$
|
|
2611
|
+
const create$E = (canvasId, callbackId) => {
|
|
2605
2612
|
const canvas = document.createElement('canvas');
|
|
2606
2613
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
2607
2614
|
set$3(canvasId, canvas);
|
|
@@ -2616,7 +2623,7 @@ const name$f = 'OffscreenCanvas';
|
|
|
2616
2623
|
|
|
2617
2624
|
// prettier-ignore
|
|
2618
2625
|
const Commands$g = {
|
|
2619
|
-
create: create$
|
|
2626
|
+
create: create$E
|
|
2620
2627
|
};
|
|
2621
2628
|
|
|
2622
2629
|
const OffscreenCanvas_ipc = {
|
|
@@ -4306,7 +4313,7 @@ const state = {
|
|
|
4306
4313
|
modules: Object.create(null)
|
|
4307
4314
|
};
|
|
4308
4315
|
|
|
4309
|
-
const create$
|
|
4316
|
+
const create$D = (id, uid = id) => {
|
|
4310
4317
|
const module = state.modules[id];
|
|
4311
4318
|
if (!module) {
|
|
4312
4319
|
throw new Error(`module not found: ${id}`);
|
|
@@ -4473,7 +4480,7 @@ const sendMultiple = commands => {
|
|
|
4473
4480
|
}
|
|
4474
4481
|
case 'Viewlet.create':
|
|
4475
4482
|
{
|
|
4476
|
-
create$
|
|
4483
|
+
create$D(viewletId, method);
|
|
4477
4484
|
break;
|
|
4478
4485
|
}
|
|
4479
4486
|
case 'Viewlet.createFunctionalRoot':
|
|
@@ -4668,7 +4675,7 @@ const appendToBody = childId => {
|
|
|
4668
4675
|
const getFn = command => {
|
|
4669
4676
|
switch (command) {
|
|
4670
4677
|
case 'Viewlet.create':
|
|
4671
|
-
return create$
|
|
4678
|
+
return create$D;
|
|
4672
4679
|
case 'Viewlet.send':
|
|
4673
4680
|
return invoke;
|
|
4674
4681
|
case 'Viewlet.show':
|
|
@@ -5479,7 +5486,7 @@ ${relevant}`;
|
|
|
5479
5486
|
|
|
5480
5487
|
const Module$1 = 'module';
|
|
5481
5488
|
|
|
5482
|
-
const create$
|
|
5489
|
+
const create$C = async ({
|
|
5483
5490
|
url,
|
|
5484
5491
|
name
|
|
5485
5492
|
}) => {
|
|
@@ -5549,7 +5556,7 @@ const wrap = worker => {
|
|
|
5549
5556
|
|
|
5550
5557
|
const IpcParentWithModuleWorker = {
|
|
5551
5558
|
__proto__: null,
|
|
5552
|
-
create: create$
|
|
5559
|
+
create: create$C,
|
|
5553
5560
|
wrap
|
|
5554
5561
|
};
|
|
5555
5562
|
|
|
@@ -5557,7 +5564,7 @@ const isMessagePort = value => {
|
|
|
5557
5564
|
return value instanceof MessagePort;
|
|
5558
5565
|
};
|
|
5559
5566
|
|
|
5560
|
-
const create$
|
|
5567
|
+
const create$B = async ({
|
|
5561
5568
|
url
|
|
5562
5569
|
}) => {
|
|
5563
5570
|
string(url);
|
|
@@ -5578,10 +5585,10 @@ const create$A = async ({
|
|
|
5578
5585
|
|
|
5579
5586
|
const IpcParentWithMessagePort = {
|
|
5580
5587
|
__proto__: null,
|
|
5581
|
-
create: create$
|
|
5588
|
+
create: create$B
|
|
5582
5589
|
};
|
|
5583
5590
|
|
|
5584
|
-
const create$
|
|
5591
|
+
const create$A = async url => {
|
|
5585
5592
|
const referencePort = await new Promise(resolve => {
|
|
5586
5593
|
globalThis.acceptReferencePort = resolve;
|
|
5587
5594
|
import(url);
|
|
@@ -5592,7 +5599,7 @@ const create$z = async url => {
|
|
|
5592
5599
|
|
|
5593
5600
|
const IpcParentWithReferencePort = {
|
|
5594
5601
|
__proto__: null,
|
|
5595
|
-
create: create$
|
|
5602
|
+
create: create$A
|
|
5596
5603
|
};
|
|
5597
5604
|
|
|
5598
5605
|
const isWorker = value => {
|
|
@@ -5600,12 +5607,12 @@ const isWorker = value => {
|
|
|
5600
5607
|
};
|
|
5601
5608
|
|
|
5602
5609
|
// TODO add test
|
|
5603
|
-
const create$
|
|
5610
|
+
const create$z = async ({
|
|
5604
5611
|
url,
|
|
5605
5612
|
name,
|
|
5606
5613
|
port
|
|
5607
5614
|
}) => {
|
|
5608
|
-
const worker = await create$
|
|
5615
|
+
const worker = await create$C({
|
|
5609
5616
|
url,
|
|
5610
5617
|
name
|
|
5611
5618
|
});
|
|
@@ -5624,7 +5631,7 @@ const create$y = async ({
|
|
|
5624
5631
|
|
|
5625
5632
|
const IpcParentWithModuleWorkerWithMessagePort = {
|
|
5626
5633
|
__proto__: null,
|
|
5627
|
-
create: create$
|
|
5634
|
+
create: create$z
|
|
5628
5635
|
};
|
|
5629
5636
|
|
|
5630
5637
|
const handleIpcOnce = ipc => {
|
|
@@ -5639,7 +5646,7 @@ const handleIpcOnce = ipc => {
|
|
|
5639
5646
|
};
|
|
5640
5647
|
|
|
5641
5648
|
// TODO use handleIncomingIpc function
|
|
5642
|
-
const create$
|
|
5649
|
+
const create$y = async ({
|
|
5643
5650
|
port,
|
|
5644
5651
|
ipcId
|
|
5645
5652
|
}) => {
|
|
@@ -5655,7 +5662,7 @@ const create$x = async ({
|
|
|
5655
5662
|
|
|
5656
5663
|
const IpcParentWithElectron = {
|
|
5657
5664
|
__proto__: null,
|
|
5658
|
-
create: create$
|
|
5665
|
+
create: create$y
|
|
5659
5666
|
};
|
|
5660
5667
|
|
|
5661
5668
|
const getNodeIndex = $Node => {
|
|
@@ -5709,7 +5716,7 @@ const handleContextMenu$9 = event => {
|
|
|
5709
5716
|
} = event;
|
|
5710
5717
|
return ['handleContextMenu', button, clientX, clientY];
|
|
5711
5718
|
};
|
|
5712
|
-
const returnValue$
|
|
5719
|
+
const returnValue$6 = true;
|
|
5713
5720
|
|
|
5714
5721
|
const ViewletActivityBarEvents = {
|
|
5715
5722
|
__proto__: null,
|
|
@@ -5717,7 +5724,7 @@ const ViewletActivityBarEvents = {
|
|
|
5717
5724
|
handleContextMenu: handleContextMenu$9,
|
|
5718
5725
|
handleFocus: handleFocus$c,
|
|
5719
5726
|
handleMouseDown: handleMouseDown$3,
|
|
5720
|
-
returnValue: returnValue$
|
|
5727
|
+
returnValue: returnValue$6
|
|
5721
5728
|
};
|
|
5722
5729
|
|
|
5723
5730
|
const Events$9 = ViewletActivityBarEvents;
|
|
@@ -5863,7 +5870,7 @@ const ViewletAudio = {
|
|
|
5863
5870
|
Events: Events$8
|
|
5864
5871
|
};
|
|
5865
5872
|
|
|
5866
|
-
const create$
|
|
5873
|
+
const create$x = () => {
|
|
5867
5874
|
const $Viewlet = document.createElement('div');
|
|
5868
5875
|
$Viewlet.className = 'Viewlet BrowserViewOverview';
|
|
5869
5876
|
return {
|
|
@@ -5879,11 +5886,11 @@ const setDom$9 = (state, dom) => {
|
|
|
5879
5886
|
|
|
5880
5887
|
const ViewletBrowserViewOverview = {
|
|
5881
5888
|
__proto__: null,
|
|
5882
|
-
create: create$
|
|
5889
|
+
create: create$x,
|
|
5883
5890
|
setDom: setDom$9
|
|
5884
5891
|
};
|
|
5885
5892
|
|
|
5886
|
-
const create$
|
|
5893
|
+
const create$w = () => {
|
|
5887
5894
|
const $Viewlet = document.createElement('div');
|
|
5888
5895
|
$Viewlet.className = 'Viewlet Clock';
|
|
5889
5896
|
return {
|
|
@@ -5900,19 +5907,19 @@ const setTime = (state, time) => {
|
|
|
5900
5907
|
|
|
5901
5908
|
const ViewletClock = {
|
|
5902
5909
|
__proto__: null,
|
|
5903
|
-
create: create$
|
|
5910
|
+
create: create$w,
|
|
5904
5911
|
dispose: dispose$d,
|
|
5905
5912
|
refresh: refresh$3,
|
|
5906
5913
|
setTime
|
|
5907
5914
|
};
|
|
5908
5915
|
|
|
5909
|
-
const startTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5916
|
+
const startTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5910
5917
|
$Target.setPointerCapture(pointerId);
|
|
5911
5918
|
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
5912
5919
|
// TODO use pointerlost event instead
|
|
5913
5920
|
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
5914
5921
|
};
|
|
5915
|
-
const stopTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5922
|
+
const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5916
5923
|
$Target.releasePointerCapture(pointerId);
|
|
5917
5924
|
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
5918
5925
|
// TODO use pointerlost event instead
|
|
@@ -5924,7 +5931,7 @@ const handleSliderPointerCaptureLost = event => {
|
|
|
5924
5931
|
target,
|
|
5925
5932
|
pointerId
|
|
5926
5933
|
} = event;
|
|
5927
|
-
stopTracking(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5934
|
+
stopTracking$1(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5928
5935
|
};
|
|
5929
5936
|
const handleSliderPointerMove = event => {
|
|
5930
5937
|
const {
|
|
@@ -5941,7 +5948,7 @@ const handleSliderPointerDown = event => {
|
|
|
5941
5948
|
target,
|
|
5942
5949
|
pointerId
|
|
5943
5950
|
} = event;
|
|
5944
|
-
startTracking(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5951
|
+
startTracking$1(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5945
5952
|
return ['handleSliderPointerDown', clientX - 20, clientY];
|
|
5946
5953
|
};
|
|
5947
5954
|
const handlePointerDown$6 = event => {
|
|
@@ -5953,12 +5960,12 @@ const handlePointerDown$6 = event => {
|
|
|
5953
5960
|
}
|
|
5954
5961
|
return [];
|
|
5955
5962
|
};
|
|
5956
|
-
const returnValue$
|
|
5963
|
+
const returnValue$5 = true;
|
|
5957
5964
|
|
|
5958
5965
|
const ViewletColorPickerEvents = {
|
|
5959
5966
|
__proto__: null,
|
|
5960
5967
|
handlePointerDown: handlePointerDown$6,
|
|
5961
|
-
returnValue: returnValue$
|
|
5968
|
+
returnValue: returnValue$5
|
|
5962
5969
|
};
|
|
5963
5970
|
|
|
5964
5971
|
const setColor = (state, color) => {
|
|
@@ -6003,7 +6010,7 @@ const ViewletDebugConsoleEvents = {
|
|
|
6003
6010
|
handleInput: handleInput$7
|
|
6004
6011
|
};
|
|
6005
6012
|
|
|
6006
|
-
const create$
|
|
6013
|
+
const create$v = () => {
|
|
6007
6014
|
const $Viewlet = document.createElement('div');
|
|
6008
6015
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
6009
6016
|
return {
|
|
@@ -6019,7 +6026,7 @@ const setDom$8 = (state, dom) => {
|
|
|
6019
6026
|
|
|
6020
6027
|
const ViewletDebugConsole = {
|
|
6021
6028
|
__proto__: null,
|
|
6022
|
-
create: create$
|
|
6029
|
+
create: create$v,
|
|
6023
6030
|
setDom: setDom$8
|
|
6024
6031
|
};
|
|
6025
6032
|
|
|
@@ -6080,7 +6087,7 @@ const setMaskImage = ($Element, icon) => {
|
|
|
6080
6087
|
}
|
|
6081
6088
|
};
|
|
6082
6089
|
|
|
6083
|
-
const create$
|
|
6090
|
+
const create$u = icon => {
|
|
6084
6091
|
const $Icon = document.createElement('div');
|
|
6085
6092
|
$Icon.className = 'MaskIcon';
|
|
6086
6093
|
setMaskImage($Icon, icon);
|
|
@@ -6090,7 +6097,7 @@ const create$t = icon => {
|
|
|
6090
6097
|
|
|
6091
6098
|
const create$Button = (label, icon) => {
|
|
6092
6099
|
// TODO icon div might not be needed (unnecessary html element)
|
|
6093
|
-
const $Icon = create$
|
|
6100
|
+
const $Icon = create$u(icon);
|
|
6094
6101
|
const $Button = document.createElement('button');
|
|
6095
6102
|
$Button.className = 'IconButton';
|
|
6096
6103
|
$Button.title = label;
|
|
@@ -6111,7 +6118,7 @@ const handleClick$7 = event => {
|
|
|
6111
6118
|
handleClick$8(index);
|
|
6112
6119
|
};
|
|
6113
6120
|
|
|
6114
|
-
const create$
|
|
6121
|
+
const create$t = () => {
|
|
6115
6122
|
const $DialogTitle = document.createElement('h2');
|
|
6116
6123
|
$DialogTitle.id = 'DialogTitle';
|
|
6117
6124
|
const $DialogCloseButton = create$Button('Close', 'Close');
|
|
@@ -6192,7 +6199,7 @@ const setErrorStack = (state, errorStack) => {
|
|
|
6192
6199
|
|
|
6193
6200
|
const ViewletDialog = {
|
|
6194
6201
|
__proto__: null,
|
|
6195
|
-
create: create$
|
|
6202
|
+
create: create$t,
|
|
6196
6203
|
postAppend,
|
|
6197
6204
|
setButtons,
|
|
6198
6205
|
setCodeFrame,
|
|
@@ -6273,7 +6280,7 @@ const handlePointerCaptureLost$2 = event => {
|
|
|
6273
6280
|
target,
|
|
6274
6281
|
pointerId
|
|
6275
6282
|
} = event;
|
|
6276
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6283
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6277
6284
|
};
|
|
6278
6285
|
const handleScrollBarPointerDown$3 = event => {
|
|
6279
6286
|
preventDefault(event);
|
|
@@ -6282,7 +6289,7 @@ const handleScrollBarPointerDown$3 = event => {
|
|
|
6282
6289
|
pointerId,
|
|
6283
6290
|
clientY
|
|
6284
6291
|
} = event;
|
|
6285
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6292
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6286
6293
|
const uid = fromEvent(event);
|
|
6287
6294
|
handleScrollBarClick(uid, clientY);
|
|
6288
6295
|
};
|
|
@@ -6334,7 +6341,7 @@ const setNegativeMargin = (state, negativeMargin) => {
|
|
|
6334
6341
|
setTop($ListItems, negativeMargin);
|
|
6335
6342
|
};
|
|
6336
6343
|
|
|
6337
|
-
const create$
|
|
6344
|
+
const create$s = () => {
|
|
6338
6345
|
const $ListItems = document.createElement('div');
|
|
6339
6346
|
$ListItems.className = 'ListItems';
|
|
6340
6347
|
$ListItems.role = ListBox;
|
|
@@ -6417,7 +6424,7 @@ const setBounds$4 = (state, x, y, width, height) => {
|
|
|
6417
6424
|
const ViewletEditorCompletion = {
|
|
6418
6425
|
__proto__: null,
|
|
6419
6426
|
attachEvents: attachEvents$b,
|
|
6420
|
-
create: create$
|
|
6427
|
+
create: create$s,
|
|
6421
6428
|
dispose: dispose$c,
|
|
6422
6429
|
handleError: handleError$6,
|
|
6423
6430
|
setBounds: setBounds$4,
|
|
@@ -6442,7 +6449,7 @@ const ViewletEditorCompletion = {
|
|
|
6442
6449
|
|
|
6443
6450
|
// TODO aria alert
|
|
6444
6451
|
|
|
6445
|
-
const create$
|
|
6452
|
+
const create$r = () => {
|
|
6446
6453
|
const $Viewlet = document.createElement('div');
|
|
6447
6454
|
$Viewlet.className = 'Viewlet EditorError';
|
|
6448
6455
|
return {
|
|
@@ -6464,20 +6471,90 @@ const setBounds$3 = (state, x, y, width, height) => {
|
|
|
6464
6471
|
|
|
6465
6472
|
const ViewletEditorError = {
|
|
6466
6473
|
__proto__: null,
|
|
6467
|
-
create: create$
|
|
6474
|
+
create: create$r,
|
|
6468
6475
|
setBounds: setBounds$3,
|
|
6469
6476
|
setDom: setDom$6
|
|
6470
6477
|
};
|
|
6471
6478
|
|
|
6472
|
-
const
|
|
6479
|
+
const startTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
6480
|
+
$Target.setPointerCapture(pointerId);
|
|
6481
|
+
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
6482
|
+
// TODO use pointerlost event instead
|
|
6483
|
+
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
6484
|
+
};
|
|
6485
|
+
const stopTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
6486
|
+
$Target.releasePointerCapture(pointerId);
|
|
6487
|
+
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
6488
|
+
// TODO use pointerlost event instead
|
|
6489
|
+
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
6490
|
+
};
|
|
6491
|
+
const create$q = (pointerDown, pointerMove, pointerUp) => {
|
|
6492
|
+
const shared = (fn, event) => {
|
|
6493
|
+
const message = fn(event);
|
|
6494
|
+
const uid = fromEvent(event);
|
|
6495
|
+
send('Viewlet.executeViewletCommand', uid, ...message);
|
|
6496
|
+
};
|
|
6497
|
+
const handlePointerMove = event => {
|
|
6498
|
+
shared(pointerMove, event);
|
|
6499
|
+
};
|
|
6500
|
+
const handlePointerUp = event => {
|
|
6501
|
+
const {
|
|
6502
|
+
target,
|
|
6503
|
+
pointerId
|
|
6504
|
+
} = event;
|
|
6505
|
+
stopTracking(target, pointerId, handlePointerMove, handlePointerUp);
|
|
6506
|
+
shared(pointerUp, event);
|
|
6507
|
+
};
|
|
6508
|
+
const handlePointerDown = event => {
|
|
6509
|
+
const {
|
|
6510
|
+
target,
|
|
6511
|
+
pointerId
|
|
6512
|
+
} = event;
|
|
6513
|
+
startTracking(target, pointerId, handlePointerMove, handlePointerUp);
|
|
6514
|
+
shared(pointerDown, event);
|
|
6515
|
+
return [];
|
|
6516
|
+
};
|
|
6517
|
+
return handlePointerDown;
|
|
6518
|
+
};
|
|
6519
|
+
|
|
6520
|
+
const returnValue$4 = true;
|
|
6521
|
+
const handleSashPointerDown$2 = create$q(event => {
|
|
6522
|
+
const {
|
|
6523
|
+
clientX,
|
|
6524
|
+
clientY
|
|
6525
|
+
} = event;
|
|
6526
|
+
return ['handleSashPointerDown', clientX, clientY];
|
|
6527
|
+
}, event => {
|
|
6528
|
+
const {
|
|
6529
|
+
clientX,
|
|
6530
|
+
clientY
|
|
6531
|
+
} = event;
|
|
6532
|
+
return ['handleSashPointerMove', clientX, clientY];
|
|
6533
|
+
}, event => {
|
|
6534
|
+
const {
|
|
6535
|
+
clientX,
|
|
6536
|
+
clientY
|
|
6537
|
+
} = event;
|
|
6538
|
+
return ['handleSashPointerUp', clientX, clientY];
|
|
6539
|
+
});
|
|
6540
|
+
|
|
6541
|
+
const ViewletEditorHoverEvents = {
|
|
6542
|
+
__proto__: null,
|
|
6543
|
+
handleSashPointerDown: handleSashPointerDown$2,
|
|
6544
|
+
returnValue: returnValue$4
|
|
6545
|
+
};
|
|
6546
|
+
|
|
6547
|
+
const setBounds$2 = (state, x, y, width, height) => {
|
|
6473
6548
|
const {
|
|
6474
6549
|
$Viewlet
|
|
6475
6550
|
} = state;
|
|
6551
|
+
setWidth($Viewlet, width);
|
|
6476
6552
|
setXAndYTransform($Viewlet, x, -y);
|
|
6477
6553
|
};
|
|
6478
6554
|
|
|
6479
6555
|
const ViewletEditorHover = {
|
|
6480
6556
|
__proto__: null,
|
|
6557
|
+
Events: ViewletEditorHoverEvents,
|
|
6481
6558
|
setBounds: setBounds$2
|
|
6482
6559
|
};
|
|
6483
6560
|
|
|
@@ -6883,7 +6960,7 @@ const handleScrollBarVerticalPointerUp = event => {
|
|
|
6883
6960
|
target,
|
|
6884
6961
|
pointerId
|
|
6885
6962
|
} = event;
|
|
6886
|
-
stopTracking(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6963
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6887
6964
|
return [];
|
|
6888
6965
|
};
|
|
6889
6966
|
|
|
@@ -6897,7 +6974,7 @@ const handleScrollBarVerticalPointerDown = event => {
|
|
|
6897
6974
|
pointerId,
|
|
6898
6975
|
clientY
|
|
6899
6976
|
} = event;
|
|
6900
|
-
startTracking(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6977
|
+
startTracking$1(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6901
6978
|
return ['handleScrollBarVerticalPointerDown', clientY];
|
|
6902
6979
|
};
|
|
6903
6980
|
|
|
@@ -6921,7 +6998,7 @@ const handleScrollBarHorizontalPointerUp = event => {
|
|
|
6921
6998
|
target,
|
|
6922
6999
|
pointerId
|
|
6923
7000
|
} = event;
|
|
6924
|
-
stopTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7001
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6925
7002
|
return [];
|
|
6926
7003
|
};
|
|
6927
7004
|
|
|
@@ -6935,7 +7012,7 @@ const handleScrollBarHorizontalPointerDown = event => {
|
|
|
6935
7012
|
pointerId,
|
|
6936
7013
|
clientX
|
|
6937
7014
|
} = event;
|
|
6938
|
-
startTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7015
|
+
startTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6939
7016
|
return ['handleScrollBarHorizontalPointerDown', clientX];
|
|
6940
7017
|
};
|
|
6941
7018
|
const handleScrollBarContextMenu = event => {
|
|
@@ -7704,7 +7781,7 @@ const handleScrollBarPointerCaptureLost = event => {
|
|
|
7704
7781
|
target,
|
|
7705
7782
|
pointerId
|
|
7706
7783
|
} = event;
|
|
7707
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7784
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7708
7785
|
const uid = fromEvent(event);
|
|
7709
7786
|
handleScrollBarCaptureLost(uid);
|
|
7710
7787
|
};
|
|
@@ -7714,7 +7791,7 @@ const handleScrollBarPointerDown$2 = event => {
|
|
|
7714
7791
|
pointerId,
|
|
7715
7792
|
clientY
|
|
7716
7793
|
} = event;
|
|
7717
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7794
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7718
7795
|
const uid = fromEvent(event);
|
|
7719
7796
|
handleScrollBarClick(uid, clientY);
|
|
7720
7797
|
};
|
|
@@ -8156,7 +8233,7 @@ const handleResizerPointerUp = event => {
|
|
|
8156
8233
|
target,
|
|
8157
8234
|
pointerId
|
|
8158
8235
|
} = event;
|
|
8159
|
-
stopTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8236
|
+
stopTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8160
8237
|
};
|
|
8161
8238
|
const handleResizerPointerDown = event => {
|
|
8162
8239
|
const {
|
|
@@ -8164,7 +8241,7 @@ const handleResizerPointerDown = event => {
|
|
|
8164
8241
|
pointerId,
|
|
8165
8242
|
clientX
|
|
8166
8243
|
} = event;
|
|
8167
|
-
startTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8244
|
+
startTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8168
8245
|
const id = target.nextSibling ? 1 : 2;
|
|
8169
8246
|
const uid = fromEvent(event);
|
|
8170
8247
|
handleResizerClick(uid, id, clientX);
|
|
@@ -8685,7 +8762,7 @@ const handlePointerCaptureLost = event => {
|
|
|
8685
8762
|
target,
|
|
8686
8763
|
pointerId
|
|
8687
8764
|
} = event;
|
|
8688
|
-
stopTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8765
|
+
stopTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8689
8766
|
const id = getSashId(target);
|
|
8690
8767
|
handleSashPointerUp(id);
|
|
8691
8768
|
};
|
|
@@ -8694,7 +8771,7 @@ const handleSashPointerDown = event => {
|
|
|
8694
8771
|
target,
|
|
8695
8772
|
pointerId
|
|
8696
8773
|
} = event;
|
|
8697
|
-
startTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8774
|
+
startTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8698
8775
|
const id = getSashId(target);
|
|
8699
8776
|
handleSashPointerDown$1(id);
|
|
8700
8777
|
};
|
|
@@ -9416,7 +9493,7 @@ const focus$6 = state => {
|
|
|
9416
9493
|
// - for nvda ariaRoleDescription works better
|
|
9417
9494
|
|
|
9418
9495
|
const create$a = () => {
|
|
9419
|
-
const $QuickPickInput = create$
|
|
9496
|
+
const $QuickPickInput = create$I();
|
|
9420
9497
|
$QuickPickInput.setAttribute(AriaControls, Ids.QuickPickItems); // TODO use idl once supported
|
|
9421
9498
|
$QuickPickInput.role = ComboBox;
|
|
9422
9499
|
$QuickPickInput.ariaLabel = 'Type the name of a command to run.';
|
|
@@ -9759,7 +9836,7 @@ const handleScrollBarPointerUp = event => {
|
|
|
9759
9836
|
target,
|
|
9760
9837
|
pointerId
|
|
9761
9838
|
} = event;
|
|
9762
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9839
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9763
9840
|
};
|
|
9764
9841
|
const handleScrollBarPointerDown$1 = event => {
|
|
9765
9842
|
const {
|
|
@@ -9767,7 +9844,7 @@ const handleScrollBarPointerDown$1 = event => {
|
|
|
9767
9844
|
pointerId,
|
|
9768
9845
|
clientY
|
|
9769
9846
|
} = event;
|
|
9770
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9847
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9771
9848
|
return ['handleScrollBarClick', clientY];
|
|
9772
9849
|
};
|
|
9773
9850
|
const handleToggleButtonClick = event => {
|