@lvce-editor/renderer-process 2.1.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rendererProcessMain.js +146 -73
- package/package.json +1 -7
|
@@ -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 = {
|
|
@@ -2526,7 +2529,7 @@ const create$Notification = message => {
|
|
|
2526
2529
|
$Notification.textContent = message;
|
|
2527
2530
|
return $Notification;
|
|
2528
2531
|
};
|
|
2529
|
-
const create$
|
|
2532
|
+
const create$F = (type, message) => {
|
|
2530
2533
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
2531
2534
|
const $Notification = create$Notification(message);
|
|
2532
2535
|
append$1($Notification);
|
|
@@ -2579,7 +2582,7 @@ const name$g = 'Notification';
|
|
|
2579
2582
|
|
|
2580
2583
|
// prettier-ignore
|
|
2581
2584
|
const Commands$h = {
|
|
2582
|
-
create: create$
|
|
2585
|
+
create: create$F,
|
|
2583
2586
|
createWithOptions: createWithOptions,
|
|
2584
2587
|
dispose: dispose$g
|
|
2585
2588
|
};
|
|
@@ -2605,7 +2608,7 @@ const set$3 = (canvasId, canvas) => {
|
|
|
2605
2608
|
const get$3 = id => {
|
|
2606
2609
|
return get$4(id);
|
|
2607
2610
|
};
|
|
2608
|
-
const create$
|
|
2611
|
+
const create$E = (canvasId, callbackId) => {
|
|
2609
2612
|
const canvas = document.createElement('canvas');
|
|
2610
2613
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
2611
2614
|
set$3(canvasId, canvas);
|
|
@@ -2620,7 +2623,7 @@ const name$f = 'OffscreenCanvas';
|
|
|
2620
2623
|
|
|
2621
2624
|
// prettier-ignore
|
|
2622
2625
|
const Commands$g = {
|
|
2623
|
-
create: create$
|
|
2626
|
+
create: create$E
|
|
2624
2627
|
};
|
|
2625
2628
|
|
|
2626
2629
|
const OffscreenCanvas_ipc = {
|
|
@@ -4310,7 +4313,7 @@ const state = {
|
|
|
4310
4313
|
modules: Object.create(null)
|
|
4311
4314
|
};
|
|
4312
4315
|
|
|
4313
|
-
const create$
|
|
4316
|
+
const create$D = (id, uid = id) => {
|
|
4314
4317
|
const module = state.modules[id];
|
|
4315
4318
|
if (!module) {
|
|
4316
4319
|
throw new Error(`module not found: ${id}`);
|
|
@@ -4477,7 +4480,7 @@ const sendMultiple = commands => {
|
|
|
4477
4480
|
}
|
|
4478
4481
|
case 'Viewlet.create':
|
|
4479
4482
|
{
|
|
4480
|
-
create$
|
|
4483
|
+
create$D(viewletId, method);
|
|
4481
4484
|
break;
|
|
4482
4485
|
}
|
|
4483
4486
|
case 'Viewlet.createFunctionalRoot':
|
|
@@ -4672,7 +4675,7 @@ const appendToBody = childId => {
|
|
|
4672
4675
|
const getFn = command => {
|
|
4673
4676
|
switch (command) {
|
|
4674
4677
|
case 'Viewlet.create':
|
|
4675
|
-
return create$
|
|
4678
|
+
return create$D;
|
|
4676
4679
|
case 'Viewlet.send':
|
|
4677
4680
|
return invoke;
|
|
4678
4681
|
case 'Viewlet.show':
|
|
@@ -5483,7 +5486,7 @@ ${relevant}`;
|
|
|
5483
5486
|
|
|
5484
5487
|
const Module$1 = 'module';
|
|
5485
5488
|
|
|
5486
|
-
const create$
|
|
5489
|
+
const create$C = async ({
|
|
5487
5490
|
url,
|
|
5488
5491
|
name
|
|
5489
5492
|
}) => {
|
|
@@ -5553,7 +5556,7 @@ const wrap = worker => {
|
|
|
5553
5556
|
|
|
5554
5557
|
const IpcParentWithModuleWorker = {
|
|
5555
5558
|
__proto__: null,
|
|
5556
|
-
create: create$
|
|
5559
|
+
create: create$C,
|
|
5557
5560
|
wrap
|
|
5558
5561
|
};
|
|
5559
5562
|
|
|
@@ -5561,7 +5564,7 @@ const isMessagePort = value => {
|
|
|
5561
5564
|
return value instanceof MessagePort;
|
|
5562
5565
|
};
|
|
5563
5566
|
|
|
5564
|
-
const create$
|
|
5567
|
+
const create$B = async ({
|
|
5565
5568
|
url
|
|
5566
5569
|
}) => {
|
|
5567
5570
|
string(url);
|
|
@@ -5582,10 +5585,10 @@ const create$A = async ({
|
|
|
5582
5585
|
|
|
5583
5586
|
const IpcParentWithMessagePort = {
|
|
5584
5587
|
__proto__: null,
|
|
5585
|
-
create: create$
|
|
5588
|
+
create: create$B
|
|
5586
5589
|
};
|
|
5587
5590
|
|
|
5588
|
-
const create$
|
|
5591
|
+
const create$A = async url => {
|
|
5589
5592
|
const referencePort = await new Promise(resolve => {
|
|
5590
5593
|
globalThis.acceptReferencePort = resolve;
|
|
5591
5594
|
import(url);
|
|
@@ -5596,7 +5599,7 @@ const create$z = async url => {
|
|
|
5596
5599
|
|
|
5597
5600
|
const IpcParentWithReferencePort = {
|
|
5598
5601
|
__proto__: null,
|
|
5599
|
-
create: create$
|
|
5602
|
+
create: create$A
|
|
5600
5603
|
};
|
|
5601
5604
|
|
|
5602
5605
|
const isWorker = value => {
|
|
@@ -5604,12 +5607,12 @@ const isWorker = value => {
|
|
|
5604
5607
|
};
|
|
5605
5608
|
|
|
5606
5609
|
// TODO add test
|
|
5607
|
-
const create$
|
|
5610
|
+
const create$z = async ({
|
|
5608
5611
|
url,
|
|
5609
5612
|
name,
|
|
5610
5613
|
port
|
|
5611
5614
|
}) => {
|
|
5612
|
-
const worker = await create$
|
|
5615
|
+
const worker = await create$C({
|
|
5613
5616
|
url,
|
|
5614
5617
|
name
|
|
5615
5618
|
});
|
|
@@ -5628,7 +5631,7 @@ const create$y = async ({
|
|
|
5628
5631
|
|
|
5629
5632
|
const IpcParentWithModuleWorkerWithMessagePort = {
|
|
5630
5633
|
__proto__: null,
|
|
5631
|
-
create: create$
|
|
5634
|
+
create: create$z
|
|
5632
5635
|
};
|
|
5633
5636
|
|
|
5634
5637
|
const handleIpcOnce = ipc => {
|
|
@@ -5643,7 +5646,7 @@ const handleIpcOnce = ipc => {
|
|
|
5643
5646
|
};
|
|
5644
5647
|
|
|
5645
5648
|
// TODO use handleIncomingIpc function
|
|
5646
|
-
const create$
|
|
5649
|
+
const create$y = async ({
|
|
5647
5650
|
port,
|
|
5648
5651
|
ipcId
|
|
5649
5652
|
}) => {
|
|
@@ -5659,7 +5662,7 @@ const create$x = async ({
|
|
|
5659
5662
|
|
|
5660
5663
|
const IpcParentWithElectron = {
|
|
5661
5664
|
__proto__: null,
|
|
5662
|
-
create: create$
|
|
5665
|
+
create: create$y
|
|
5663
5666
|
};
|
|
5664
5667
|
|
|
5665
5668
|
const getNodeIndex = $Node => {
|
|
@@ -5713,7 +5716,7 @@ const handleContextMenu$9 = event => {
|
|
|
5713
5716
|
} = event;
|
|
5714
5717
|
return ['handleContextMenu', button, clientX, clientY];
|
|
5715
5718
|
};
|
|
5716
|
-
const returnValue$
|
|
5719
|
+
const returnValue$6 = true;
|
|
5717
5720
|
|
|
5718
5721
|
const ViewletActivityBarEvents = {
|
|
5719
5722
|
__proto__: null,
|
|
@@ -5721,7 +5724,7 @@ const ViewletActivityBarEvents = {
|
|
|
5721
5724
|
handleContextMenu: handleContextMenu$9,
|
|
5722
5725
|
handleFocus: handleFocus$c,
|
|
5723
5726
|
handleMouseDown: handleMouseDown$3,
|
|
5724
|
-
returnValue: returnValue$
|
|
5727
|
+
returnValue: returnValue$6
|
|
5725
5728
|
};
|
|
5726
5729
|
|
|
5727
5730
|
const Events$9 = ViewletActivityBarEvents;
|
|
@@ -5867,7 +5870,7 @@ const ViewletAudio = {
|
|
|
5867
5870
|
Events: Events$8
|
|
5868
5871
|
};
|
|
5869
5872
|
|
|
5870
|
-
const create$
|
|
5873
|
+
const create$x = () => {
|
|
5871
5874
|
const $Viewlet = document.createElement('div');
|
|
5872
5875
|
$Viewlet.className = 'Viewlet BrowserViewOverview';
|
|
5873
5876
|
return {
|
|
@@ -5883,11 +5886,11 @@ const setDom$9 = (state, dom) => {
|
|
|
5883
5886
|
|
|
5884
5887
|
const ViewletBrowserViewOverview = {
|
|
5885
5888
|
__proto__: null,
|
|
5886
|
-
create: create$
|
|
5889
|
+
create: create$x,
|
|
5887
5890
|
setDom: setDom$9
|
|
5888
5891
|
};
|
|
5889
5892
|
|
|
5890
|
-
const create$
|
|
5893
|
+
const create$w = () => {
|
|
5891
5894
|
const $Viewlet = document.createElement('div');
|
|
5892
5895
|
$Viewlet.className = 'Viewlet Clock';
|
|
5893
5896
|
return {
|
|
@@ -5904,19 +5907,19 @@ const setTime = (state, time) => {
|
|
|
5904
5907
|
|
|
5905
5908
|
const ViewletClock = {
|
|
5906
5909
|
__proto__: null,
|
|
5907
|
-
create: create$
|
|
5910
|
+
create: create$w,
|
|
5908
5911
|
dispose: dispose$d,
|
|
5909
5912
|
refresh: refresh$3,
|
|
5910
5913
|
setTime
|
|
5911
5914
|
};
|
|
5912
5915
|
|
|
5913
|
-
const startTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5916
|
+
const startTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5914
5917
|
$Target.setPointerCapture(pointerId);
|
|
5915
5918
|
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
5916
5919
|
// TODO use pointerlost event instead
|
|
5917
5920
|
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
5918
5921
|
};
|
|
5919
|
-
const stopTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5922
|
+
const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5920
5923
|
$Target.releasePointerCapture(pointerId);
|
|
5921
5924
|
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
5922
5925
|
// TODO use pointerlost event instead
|
|
@@ -5928,7 +5931,7 @@ const handleSliderPointerCaptureLost = event => {
|
|
|
5928
5931
|
target,
|
|
5929
5932
|
pointerId
|
|
5930
5933
|
} = event;
|
|
5931
|
-
stopTracking(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5934
|
+
stopTracking$1(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5932
5935
|
};
|
|
5933
5936
|
const handleSliderPointerMove = event => {
|
|
5934
5937
|
const {
|
|
@@ -5945,7 +5948,7 @@ const handleSliderPointerDown = event => {
|
|
|
5945
5948
|
target,
|
|
5946
5949
|
pointerId
|
|
5947
5950
|
} = event;
|
|
5948
|
-
startTracking(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5951
|
+
startTracking$1(target, pointerId, handleSliderPointerMove, handleSliderPointerCaptureLost);
|
|
5949
5952
|
return ['handleSliderPointerDown', clientX - 20, clientY];
|
|
5950
5953
|
};
|
|
5951
5954
|
const handlePointerDown$6 = event => {
|
|
@@ -5957,12 +5960,12 @@ const handlePointerDown$6 = event => {
|
|
|
5957
5960
|
}
|
|
5958
5961
|
return [];
|
|
5959
5962
|
};
|
|
5960
|
-
const returnValue$
|
|
5963
|
+
const returnValue$5 = true;
|
|
5961
5964
|
|
|
5962
5965
|
const ViewletColorPickerEvents = {
|
|
5963
5966
|
__proto__: null,
|
|
5964
5967
|
handlePointerDown: handlePointerDown$6,
|
|
5965
|
-
returnValue: returnValue$
|
|
5968
|
+
returnValue: returnValue$5
|
|
5966
5969
|
};
|
|
5967
5970
|
|
|
5968
5971
|
const setColor = (state, color) => {
|
|
@@ -6007,7 +6010,7 @@ const ViewletDebugConsoleEvents = {
|
|
|
6007
6010
|
handleInput: handleInput$7
|
|
6008
6011
|
};
|
|
6009
6012
|
|
|
6010
|
-
const create$
|
|
6013
|
+
const create$v = () => {
|
|
6011
6014
|
const $Viewlet = document.createElement('div');
|
|
6012
6015
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
6013
6016
|
return {
|
|
@@ -6023,7 +6026,7 @@ const setDom$8 = (state, dom) => {
|
|
|
6023
6026
|
|
|
6024
6027
|
const ViewletDebugConsole = {
|
|
6025
6028
|
__proto__: null,
|
|
6026
|
-
create: create$
|
|
6029
|
+
create: create$v,
|
|
6027
6030
|
setDom: setDom$8
|
|
6028
6031
|
};
|
|
6029
6032
|
|
|
@@ -6084,7 +6087,7 @@ const setMaskImage = ($Element, icon) => {
|
|
|
6084
6087
|
}
|
|
6085
6088
|
};
|
|
6086
6089
|
|
|
6087
|
-
const create$
|
|
6090
|
+
const create$u = icon => {
|
|
6088
6091
|
const $Icon = document.createElement('div');
|
|
6089
6092
|
$Icon.className = 'MaskIcon';
|
|
6090
6093
|
setMaskImage($Icon, icon);
|
|
@@ -6094,7 +6097,7 @@ const create$t = icon => {
|
|
|
6094
6097
|
|
|
6095
6098
|
const create$Button = (label, icon) => {
|
|
6096
6099
|
// TODO icon div might not be needed (unnecessary html element)
|
|
6097
|
-
const $Icon = create$
|
|
6100
|
+
const $Icon = create$u(icon);
|
|
6098
6101
|
const $Button = document.createElement('button');
|
|
6099
6102
|
$Button.className = 'IconButton';
|
|
6100
6103
|
$Button.title = label;
|
|
@@ -6115,7 +6118,7 @@ const handleClick$7 = event => {
|
|
|
6115
6118
|
handleClick$8(index);
|
|
6116
6119
|
};
|
|
6117
6120
|
|
|
6118
|
-
const create$
|
|
6121
|
+
const create$t = () => {
|
|
6119
6122
|
const $DialogTitle = document.createElement('h2');
|
|
6120
6123
|
$DialogTitle.id = 'DialogTitle';
|
|
6121
6124
|
const $DialogCloseButton = create$Button('Close', 'Close');
|
|
@@ -6196,7 +6199,7 @@ const setErrorStack = (state, errorStack) => {
|
|
|
6196
6199
|
|
|
6197
6200
|
const ViewletDialog = {
|
|
6198
6201
|
__proto__: null,
|
|
6199
|
-
create: create$
|
|
6202
|
+
create: create$t,
|
|
6200
6203
|
postAppend,
|
|
6201
6204
|
setButtons,
|
|
6202
6205
|
setCodeFrame,
|
|
@@ -6277,7 +6280,7 @@ const handlePointerCaptureLost$2 = event => {
|
|
|
6277
6280
|
target,
|
|
6278
6281
|
pointerId
|
|
6279
6282
|
} = event;
|
|
6280
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6283
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6281
6284
|
};
|
|
6282
6285
|
const handleScrollBarPointerDown$3 = event => {
|
|
6283
6286
|
preventDefault(event);
|
|
@@ -6286,7 +6289,7 @@ const handleScrollBarPointerDown$3 = event => {
|
|
|
6286
6289
|
pointerId,
|
|
6287
6290
|
clientY
|
|
6288
6291
|
} = event;
|
|
6289
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6292
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6290
6293
|
const uid = fromEvent(event);
|
|
6291
6294
|
handleScrollBarClick(uid, clientY);
|
|
6292
6295
|
};
|
|
@@ -6338,7 +6341,7 @@ const setNegativeMargin = (state, negativeMargin) => {
|
|
|
6338
6341
|
setTop($ListItems, negativeMargin);
|
|
6339
6342
|
};
|
|
6340
6343
|
|
|
6341
|
-
const create$
|
|
6344
|
+
const create$s = () => {
|
|
6342
6345
|
const $ListItems = document.createElement('div');
|
|
6343
6346
|
$ListItems.className = 'ListItems';
|
|
6344
6347
|
$ListItems.role = ListBox;
|
|
@@ -6421,7 +6424,7 @@ const setBounds$4 = (state, x, y, width, height) => {
|
|
|
6421
6424
|
const ViewletEditorCompletion = {
|
|
6422
6425
|
__proto__: null,
|
|
6423
6426
|
attachEvents: attachEvents$b,
|
|
6424
|
-
create: create$
|
|
6427
|
+
create: create$s,
|
|
6425
6428
|
dispose: dispose$c,
|
|
6426
6429
|
handleError: handleError$6,
|
|
6427
6430
|
setBounds: setBounds$4,
|
|
@@ -6446,7 +6449,7 @@ const ViewletEditorCompletion = {
|
|
|
6446
6449
|
|
|
6447
6450
|
// TODO aria alert
|
|
6448
6451
|
|
|
6449
|
-
const create$
|
|
6452
|
+
const create$r = () => {
|
|
6450
6453
|
const $Viewlet = document.createElement('div');
|
|
6451
6454
|
$Viewlet.className = 'Viewlet EditorError';
|
|
6452
6455
|
return {
|
|
@@ -6468,20 +6471,90 @@ const setBounds$3 = (state, x, y, width, height) => {
|
|
|
6468
6471
|
|
|
6469
6472
|
const ViewletEditorError = {
|
|
6470
6473
|
__proto__: null,
|
|
6471
|
-
create: create$
|
|
6474
|
+
create: create$r,
|
|
6472
6475
|
setBounds: setBounds$3,
|
|
6473
6476
|
setDom: setDom$6
|
|
6474
6477
|
};
|
|
6475
6478
|
|
|
6476
|
-
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) => {
|
|
6477
6548
|
const {
|
|
6478
6549
|
$Viewlet
|
|
6479
6550
|
} = state;
|
|
6551
|
+
setWidth($Viewlet, width);
|
|
6480
6552
|
setXAndYTransform($Viewlet, x, -y);
|
|
6481
6553
|
};
|
|
6482
6554
|
|
|
6483
6555
|
const ViewletEditorHover = {
|
|
6484
6556
|
__proto__: null,
|
|
6557
|
+
Events: ViewletEditorHoverEvents,
|
|
6485
6558
|
setBounds: setBounds$2
|
|
6486
6559
|
};
|
|
6487
6560
|
|
|
@@ -6887,7 +6960,7 @@ const handleScrollBarVerticalPointerUp = event => {
|
|
|
6887
6960
|
target,
|
|
6888
6961
|
pointerId
|
|
6889
6962
|
} = event;
|
|
6890
|
-
stopTracking(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6963
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6891
6964
|
return [];
|
|
6892
6965
|
};
|
|
6893
6966
|
|
|
@@ -6901,7 +6974,7 @@ const handleScrollBarVerticalPointerDown = event => {
|
|
|
6901
6974
|
pointerId,
|
|
6902
6975
|
clientY
|
|
6903
6976
|
} = event;
|
|
6904
|
-
startTracking(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6977
|
+
startTracking$1(target, pointerId, handleScrollBarThumbVerticalPointerMove, handleScrollBarVerticalPointerUp);
|
|
6905
6978
|
return ['handleScrollBarVerticalPointerDown', clientY];
|
|
6906
6979
|
};
|
|
6907
6980
|
|
|
@@ -6925,7 +6998,7 @@ const handleScrollBarHorizontalPointerUp = event => {
|
|
|
6925
6998
|
target,
|
|
6926
6999
|
pointerId
|
|
6927
7000
|
} = event;
|
|
6928
|
-
stopTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7001
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6929
7002
|
return [];
|
|
6930
7003
|
};
|
|
6931
7004
|
|
|
@@ -6939,7 +7012,7 @@ const handleScrollBarHorizontalPointerDown = event => {
|
|
|
6939
7012
|
pointerId,
|
|
6940
7013
|
clientX
|
|
6941
7014
|
} = event;
|
|
6942
|
-
startTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7015
|
+
startTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
6943
7016
|
return ['handleScrollBarHorizontalPointerDown', clientX];
|
|
6944
7017
|
};
|
|
6945
7018
|
const handleScrollBarContextMenu = event => {
|
|
@@ -7708,7 +7781,7 @@ const handleScrollBarPointerCaptureLost = event => {
|
|
|
7708
7781
|
target,
|
|
7709
7782
|
pointerId
|
|
7710
7783
|
} = event;
|
|
7711
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7784
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7712
7785
|
const uid = fromEvent(event);
|
|
7713
7786
|
handleScrollBarCaptureLost(uid);
|
|
7714
7787
|
};
|
|
@@ -7718,7 +7791,7 @@ const handleScrollBarPointerDown$2 = event => {
|
|
|
7718
7791
|
pointerId,
|
|
7719
7792
|
clientY
|
|
7720
7793
|
} = event;
|
|
7721
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7794
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7722
7795
|
const uid = fromEvent(event);
|
|
7723
7796
|
handleScrollBarClick(uid, clientY);
|
|
7724
7797
|
};
|
|
@@ -8160,7 +8233,7 @@ const handleResizerPointerUp = event => {
|
|
|
8160
8233
|
target,
|
|
8161
8234
|
pointerId
|
|
8162
8235
|
} = event;
|
|
8163
|
-
stopTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8236
|
+
stopTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8164
8237
|
};
|
|
8165
8238
|
const handleResizerPointerDown = event => {
|
|
8166
8239
|
const {
|
|
@@ -8168,7 +8241,7 @@ const handleResizerPointerDown = event => {
|
|
|
8168
8241
|
pointerId,
|
|
8169
8242
|
clientX
|
|
8170
8243
|
} = event;
|
|
8171
|
-
startTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8244
|
+
startTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8172
8245
|
const id = target.nextSibling ? 1 : 2;
|
|
8173
8246
|
const uid = fromEvent(event);
|
|
8174
8247
|
handleResizerClick(uid, id, clientX);
|
|
@@ -8689,7 +8762,7 @@ const handlePointerCaptureLost = event => {
|
|
|
8689
8762
|
target,
|
|
8690
8763
|
pointerId
|
|
8691
8764
|
} = event;
|
|
8692
|
-
stopTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8765
|
+
stopTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8693
8766
|
const id = getSashId(target);
|
|
8694
8767
|
handleSashPointerUp(id);
|
|
8695
8768
|
};
|
|
@@ -8698,7 +8771,7 @@ const handleSashPointerDown = event => {
|
|
|
8698
8771
|
target,
|
|
8699
8772
|
pointerId
|
|
8700
8773
|
} = event;
|
|
8701
|
-
startTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8774
|
+
startTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8702
8775
|
const id = getSashId(target);
|
|
8703
8776
|
handleSashPointerDown$1(id);
|
|
8704
8777
|
};
|
|
@@ -9420,7 +9493,7 @@ const focus$6 = state => {
|
|
|
9420
9493
|
// - for nvda ariaRoleDescription works better
|
|
9421
9494
|
|
|
9422
9495
|
const create$a = () => {
|
|
9423
|
-
const $QuickPickInput = create$
|
|
9496
|
+
const $QuickPickInput = create$I();
|
|
9424
9497
|
$QuickPickInput.setAttribute(AriaControls, Ids.QuickPickItems); // TODO use idl once supported
|
|
9425
9498
|
$QuickPickInput.role = ComboBox;
|
|
9426
9499
|
$QuickPickInput.ariaLabel = 'Type the name of a command to run.';
|
|
@@ -9763,7 +9836,7 @@ const handleScrollBarPointerUp = event => {
|
|
|
9763
9836
|
target,
|
|
9764
9837
|
pointerId
|
|
9765
9838
|
} = event;
|
|
9766
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9839
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9767
9840
|
};
|
|
9768
9841
|
const handleScrollBarPointerDown$1 = event => {
|
|
9769
9842
|
const {
|
|
@@ -9771,7 +9844,7 @@ const handleScrollBarPointerDown$1 = event => {
|
|
|
9771
9844
|
pointerId,
|
|
9772
9845
|
clientY
|
|
9773
9846
|
} = event;
|
|
9774
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9847
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9775
9848
|
return ['handleScrollBarClick', clientY];
|
|
9776
9849
|
};
|
|
9777
9850
|
const handleToggleButtonClick = event => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/renderer-process",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/diffWorkerMain.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,12 +17,6 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/lvce-editor/renderer-process.git"
|
|
19
19
|
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@lvce-editor/assert": "^1.2.0",
|
|
22
|
-
"@lvce-editor/ipc": "^9.3.0",
|
|
23
|
-
"@lvce-editor/json-rpc": "^1.3.0",
|
|
24
|
-
"termterm": "^0.5.2"
|
|
25
|
-
},
|
|
26
20
|
"nodemonConfig": {
|
|
27
21
|
"ignore": [
|
|
28
22
|
"**/build/**",
|