@lvce-editor/renderer-process 10.59.0 → 10.60.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 +267 -450
- package/package.json +1 -1
|
@@ -686,7 +686,7 @@ const getErrorResponse = (message, error, preparePrettyError, logError) => {
|
|
|
686
686
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
687
687
|
return create$1$1(message, errorProperty);
|
|
688
688
|
};
|
|
689
|
-
const create$
|
|
689
|
+
const create$L = (message, result) => {
|
|
690
690
|
return {
|
|
691
691
|
jsonrpc: Two,
|
|
692
692
|
id: message.id,
|
|
@@ -695,7 +695,7 @@ const create$M = (message, result) => {
|
|
|
695
695
|
};
|
|
696
696
|
const getSuccessResponse = (message, result) => {
|
|
697
697
|
const resultProperty = result ?? null;
|
|
698
|
-
return create$
|
|
698
|
+
return create$L(message, resultProperty);
|
|
699
699
|
};
|
|
700
700
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
701
701
|
try {
|
|
@@ -879,7 +879,7 @@ const launchWorker = async ({
|
|
|
879
879
|
name,
|
|
880
880
|
url
|
|
881
881
|
}) => {
|
|
882
|
-
const worker = await create$
|
|
882
|
+
const worker = await create$K({
|
|
883
883
|
method: Auto,
|
|
884
884
|
url,
|
|
885
885
|
name
|
|
@@ -954,7 +954,7 @@ const hydrate$4 = async () => {
|
|
|
954
954
|
};
|
|
955
955
|
|
|
956
956
|
// TODO needed?
|
|
957
|
-
const dispose$
|
|
957
|
+
const dispose$m = () => {
|
|
958
958
|
// @ts-expect-error
|
|
959
959
|
if (state$9.rendererWorker) {
|
|
960
960
|
// @ts-expect-error
|
|
@@ -977,7 +977,7 @@ const invokeAndTransfer = (method, ...params) => {
|
|
|
977
977
|
|
|
978
978
|
const RendererWorker = {
|
|
979
979
|
__proto__: null,
|
|
980
|
-
dispose: dispose$
|
|
980
|
+
dispose: dispose$m,
|
|
981
981
|
hydrate: hydrate$4,
|
|
982
982
|
invoke: invoke$1,
|
|
983
983
|
invokeAndTransfer,
|
|
@@ -986,7 +986,7 @@ const RendererWorker = {
|
|
|
986
986
|
state: state$9
|
|
987
987
|
};
|
|
988
988
|
|
|
989
|
-
const create$
|
|
989
|
+
const create$K = async ({
|
|
990
990
|
method,
|
|
991
991
|
...options
|
|
992
992
|
}) => {
|
|
@@ -1007,7 +1007,7 @@ const create$L = async ({
|
|
|
1007
1007
|
};
|
|
1008
1008
|
|
|
1009
1009
|
const launchEditorWorker = async port => {
|
|
1010
|
-
const ipc = await create$
|
|
1010
|
+
const ipc = await create$K({
|
|
1011
1011
|
name: 'Editor Worker',
|
|
1012
1012
|
url: editorWorkerUrl,
|
|
1013
1013
|
method: ModuleWorkerWithMessagePort,
|
|
@@ -1037,7 +1037,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
|
|
|
1037
1037
|
|
|
1038
1038
|
const launchExtensionHostWorker = async port => {
|
|
1039
1039
|
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
1040
|
-
const ipc = await create$
|
|
1040
|
+
const ipc = await create$K({
|
|
1041
1041
|
name,
|
|
1042
1042
|
url: extensionHostWorkerUrl,
|
|
1043
1043
|
method: ModuleWorkerWithMessagePort,
|
|
@@ -1061,7 +1061,7 @@ const hydrate$2 = async () => {
|
|
|
1061
1061
|
const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
1062
1062
|
|
|
1063
1063
|
const launchSyntaxHighlightingWorker = async port => {
|
|
1064
|
-
const ipc = await create$
|
|
1064
|
+
const ipc = await create$K({
|
|
1065
1065
|
name: 'Syntax Highlighting Worker',
|
|
1066
1066
|
url: syntaxHighlightingWorkerUrl,
|
|
1067
1067
|
method: ModuleWorkerWithMessagePort,
|
|
@@ -1231,7 +1231,7 @@ var Span2 = 8;
|
|
|
1231
1231
|
var Table2 = 9;
|
|
1232
1232
|
var TBody2 = 10;
|
|
1233
1233
|
var Td2 = 11;
|
|
1234
|
-
var Text$
|
|
1234
|
+
var Text$1 = 12;
|
|
1235
1235
|
var Th2 = 13;
|
|
1236
1236
|
var THead2 = 14;
|
|
1237
1237
|
var Tr2 = 15;
|
|
@@ -1551,6 +1551,13 @@ var setProp = ($Element, key, value, eventMap, newEventMap) => {
|
|
|
1551
1551
|
$Element.removeAttribute("aria-owns");
|
|
1552
1552
|
}
|
|
1553
1553
|
break;
|
|
1554
|
+
case "ariaActivedescendant":
|
|
1555
|
+
if (value) {
|
|
1556
|
+
$Element.setAttribute("aria-activedescendant", value);
|
|
1557
|
+
} else {
|
|
1558
|
+
$Element.removeAttribute("aria-activedescendant");
|
|
1559
|
+
}
|
|
1560
|
+
break;
|
|
1554
1561
|
case "ariaControls":
|
|
1555
1562
|
$Element.setAttribute("aria-controls", value);
|
|
1556
1563
|
break;
|
|
@@ -1616,7 +1623,7 @@ var renderDomElement = (element, eventMap, newEventMap) => {
|
|
|
1616
1623
|
};
|
|
1617
1624
|
var render = (element, eventMap, newEventMap) => {
|
|
1618
1625
|
switch (element.type) {
|
|
1619
|
-
case Text$
|
|
1626
|
+
case Text$1:
|
|
1620
1627
|
return renderDomTextNode(element);
|
|
1621
1628
|
default:
|
|
1622
1629
|
return renderDomElement(element, eventMap, newEventMap);
|
|
@@ -1715,6 +1722,10 @@ var getEventListenerArg = (param, event) => {
|
|
|
1715
1722
|
return event.button;
|
|
1716
1723
|
case "event.target.value":
|
|
1717
1724
|
return event.target.value;
|
|
1725
|
+
case "event.isTrusted":
|
|
1726
|
+
return event.isTrusted;
|
|
1727
|
+
case "event.target.className":
|
|
1728
|
+
return event.target.className;
|
|
1718
1729
|
case "event.data":
|
|
1719
1730
|
return event.data;
|
|
1720
1731
|
case "event.deltaMode":
|
|
@@ -2011,7 +2022,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
|
|
|
2011
2022
|
// TODO use pointerlost event instead
|
|
2012
2023
|
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
2013
2024
|
};
|
|
2014
|
-
const create$
|
|
2025
|
+
const create$J = (pointerDown, pointerMove, pointerUp) => {
|
|
2015
2026
|
const shared = (fn, event) => {
|
|
2016
2027
|
const message = fn(event);
|
|
2017
2028
|
if (!message || message.length === 0) {
|
|
@@ -2044,7 +2055,7 @@ const create$K = (pointerDown, pointerMove, pointerUp) => {
|
|
|
2044
2055
|
};
|
|
2045
2056
|
|
|
2046
2057
|
const handleOffset = 20;
|
|
2047
|
-
const handleSliderPointerDown = create$
|
|
2058
|
+
const handleSliderPointerDown = create$J(event => {
|
|
2048
2059
|
const {
|
|
2049
2060
|
clientX,
|
|
2050
2061
|
clientY
|
|
@@ -2059,7 +2070,7 @@ const handleSliderPointerDown = create$K(event => {
|
|
|
2059
2070
|
}, () => {
|
|
2060
2071
|
return [];
|
|
2061
2072
|
});
|
|
2062
|
-
const handlePointerDown$
|
|
2073
|
+
const handlePointerDown$6 = event => {
|
|
2063
2074
|
const {
|
|
2064
2075
|
target
|
|
2065
2076
|
} = event;
|
|
@@ -2072,7 +2083,7 @@ const returnValue$9 = true;
|
|
|
2072
2083
|
|
|
2073
2084
|
const ViewletColorPickerEvents = {
|
|
2074
2085
|
__proto__: null,
|
|
2075
|
-
handlePointerDown: handlePointerDown$
|
|
2086
|
+
handlePointerDown: handlePointerDown$6,
|
|
2076
2087
|
returnValue: returnValue$9
|
|
2077
2088
|
};
|
|
2078
2089
|
|
|
@@ -2214,9 +2225,9 @@ forwardViewletCommand('focusPrevious');
|
|
|
2214
2225
|
const handleAudioError$1 = forwardViewletCommand('handleAudioError');
|
|
2215
2226
|
const handleBeforeInput$2 = forwardViewletCommand('handleBeforeInput');
|
|
2216
2227
|
forwardViewletCommand('handleBeforeInputFromContentEditable');
|
|
2217
|
-
const handleBlur$
|
|
2228
|
+
const handleBlur$a = forwardViewletCommand('handleBlur');
|
|
2218
2229
|
const handleButtonClick = forwardViewletCommand('handleButtonClick');
|
|
2219
|
-
const handleClick$
|
|
2230
|
+
const handleClick$6 = forwardViewletCommand('handleClick');
|
|
2220
2231
|
const handleClickAction$2 = forwardViewletCommand('handleClickAction');
|
|
2221
2232
|
forwardViewletCommand('handleClickAdd');
|
|
2222
2233
|
const handleClickAt$3 = forwardViewletCommand('handleClickAt');
|
|
@@ -2225,7 +2236,7 @@ forwardViewletCommand('handleClickCopy');
|
|
|
2225
2236
|
forwardViewletCommand('handleClickMinimize');
|
|
2226
2237
|
forwardViewletCommand('handleClickOk');
|
|
2227
2238
|
forwardViewletCommand('handleClickOpenFile');
|
|
2228
|
-
|
|
2239
|
+
forwardViewletCommand('handleClickOpenFolder');
|
|
2229
2240
|
forwardViewletCommand('handleClickRestore');
|
|
2230
2241
|
const handleClickTab$2 = forwardViewletCommand('handleClickTab');
|
|
2231
2242
|
forwardViewletCommand('handleClickToggleMaximize');
|
|
@@ -2242,7 +2253,7 @@ forwardViewletCommand('handleClickSize');
|
|
|
2242
2253
|
forwardViewletCommand('handleClickDisable');
|
|
2243
2254
|
forwardViewletCommand('handleClickUninstall');
|
|
2244
2255
|
forwardViewletCommand('handleFilterInput');
|
|
2245
|
-
const handleFocus$
|
|
2256
|
+
const handleFocus$a = forwardViewletCommand('handleFocus');
|
|
2246
2257
|
const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
|
|
2247
2258
|
forwardViewletCommand('handleIconError');
|
|
2248
2259
|
const handleImageError$1 = forwardViewletCommand('handleImageError');
|
|
@@ -2257,7 +2268,7 @@ forwardViewletCommand('handleMouseMove');
|
|
|
2257
2268
|
const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
|
|
2258
2269
|
const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
|
|
2259
2270
|
forwardViewletCommand('handlePointerCaptureLost');
|
|
2260
|
-
const handlePointerDown$
|
|
2271
|
+
const handlePointerDown$5 = forwardViewletCommand('handlePointerDown');
|
|
2261
2272
|
const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
|
|
2262
2273
|
forwardViewletCommand('handlePointerOver');
|
|
2263
2274
|
const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
|
|
@@ -2301,22 +2312,22 @@ forwardViewletCommand('toggleReplace');
|
|
|
2301
2312
|
forwardViewletCommand('toggleUseRegularExpression');
|
|
2302
2313
|
forwardViewletCommand('type');
|
|
2303
2314
|
forwardViewletCommand('typeWithAutoClosing');
|
|
2304
|
-
|
|
2315
|
+
forwardViewletCommand('updateEditingValue');
|
|
2305
2316
|
|
|
2306
2317
|
const handleFocusIn$3 = event => {
|
|
2307
2318
|
preventDefault(event);
|
|
2308
2319
|
const uid = fromEvent(event);
|
|
2309
2320
|
handleFocusIn$4(uid);
|
|
2310
2321
|
};
|
|
2311
|
-
const handleBlur$
|
|
2322
|
+
const handleBlur$9 = event => {
|
|
2312
2323
|
preventDefault(event);
|
|
2313
2324
|
const uid = fromEvent(event);
|
|
2314
|
-
handleBlur$
|
|
2325
|
+
handleBlur$a(uid);
|
|
2315
2326
|
};
|
|
2316
2327
|
|
|
2317
2328
|
const ViewletEditorCodeGeneratorEvents = {
|
|
2318
2329
|
__proto__: null,
|
|
2319
|
-
handleBlur: handleBlur$
|
|
2330
|
+
handleBlur: handleBlur$9,
|
|
2320
2331
|
handleFocusIn: handleFocusIn$3
|
|
2321
2332
|
};
|
|
2322
2333
|
|
|
@@ -2333,7 +2344,7 @@ const appendWidget$5 = state => {
|
|
|
2333
2344
|
} = state;
|
|
2334
2345
|
append$1($Viewlet);
|
|
2335
2346
|
};
|
|
2336
|
-
const dispose$
|
|
2347
|
+
const dispose$l = state => {
|
|
2337
2348
|
remove$2(state.$Viewlet);
|
|
2338
2349
|
};
|
|
2339
2350
|
const focus$i = (state, key, source) => {
|
|
@@ -2359,7 +2370,7 @@ const ViewletEditorCodeGenerator = {
|
|
|
2359
2370
|
__proto__: null,
|
|
2360
2371
|
Events: ViewletEditorCodeGeneratorEvents,
|
|
2361
2372
|
appendWidget: appendWidget$5,
|
|
2362
|
-
dispose: dispose$
|
|
2373
|
+
dispose: dispose$l,
|
|
2363
2374
|
focus: focus$i,
|
|
2364
2375
|
setBounds: setBounds$9
|
|
2365
2376
|
};
|
|
@@ -2380,7 +2391,6 @@ const Status = 'status';
|
|
|
2380
2391
|
const TabList = 'tablist';
|
|
2381
2392
|
const TextBox = 'textbox';
|
|
2382
2393
|
const ToolBar = 'toolbar';
|
|
2383
|
-
const Tree = 'tree';
|
|
2384
2394
|
const ComboBox = 'combobox';
|
|
2385
2395
|
|
|
2386
2396
|
const attachEvents$c = ($Node, eventMap) => {
|
|
@@ -2512,7 +2522,7 @@ const setNegativeMargin = (state, negativeMargin) => {
|
|
|
2512
2522
|
setTop($ListItems, negativeMargin);
|
|
2513
2523
|
};
|
|
2514
2524
|
|
|
2515
|
-
const create$
|
|
2525
|
+
const create$I = () => {
|
|
2516
2526
|
const $ListItems = document.createElement('div');
|
|
2517
2527
|
$ListItems.className = 'ListItems';
|
|
2518
2528
|
$ListItems.role = ListBox;
|
|
@@ -2565,7 +2575,7 @@ const setDom$a = (state, dom) => {
|
|
|
2565
2575
|
// TODO recycle nodes
|
|
2566
2576
|
// TODO set right aria attributes on $EditorInput
|
|
2567
2577
|
};
|
|
2568
|
-
const dispose$
|
|
2578
|
+
const dispose$k = state => {
|
|
2569
2579
|
remove$2(state.$Viewlet);
|
|
2570
2580
|
// state.$EditorInput.removeAttribute('aria-activedescendant')
|
|
2571
2581
|
};
|
|
@@ -2579,7 +2589,7 @@ const showLoading = (state, x, y) => {
|
|
|
2579
2589
|
$Viewlet.append($Loading);
|
|
2580
2590
|
append$1($Viewlet);
|
|
2581
2591
|
};
|
|
2582
|
-
const handleError$
|
|
2592
|
+
const handleError$7 = (state, error) => {
|
|
2583
2593
|
const {
|
|
2584
2594
|
$Viewlet
|
|
2585
2595
|
} = state;
|
|
@@ -2596,9 +2606,9 @@ const setBounds$8 = (state, x, y, width, height) => {
|
|
|
2596
2606
|
const ViewletEditorCompletion = {
|
|
2597
2607
|
__proto__: null,
|
|
2598
2608
|
attachEvents: attachEvents$b,
|
|
2599
|
-
create: create$
|
|
2600
|
-
dispose: dispose$
|
|
2601
|
-
handleError: handleError$
|
|
2609
|
+
create: create$I,
|
|
2610
|
+
dispose: dispose$k,
|
|
2611
|
+
handleError: handleError$7,
|
|
2602
2612
|
setBounds: setBounds$8,
|
|
2603
2613
|
setContentHeight,
|
|
2604
2614
|
setDom: setDom$a,
|
|
@@ -2619,7 +2629,7 @@ const ViewletEditorCompletionDetailsEvents = {
|
|
|
2619
2629
|
returnValue: returnValue$8
|
|
2620
2630
|
};
|
|
2621
2631
|
|
|
2622
|
-
const create$
|
|
2632
|
+
const create$H = () => {
|
|
2623
2633
|
const $Viewlet = document.createElement('div');
|
|
2624
2634
|
$Viewlet.className = 'Viewlet EditorCompletionDetails';
|
|
2625
2635
|
$Viewlet.id = 'CompletionsDetails';
|
|
@@ -2645,7 +2655,7 @@ const appendWidget$4 = state => {
|
|
|
2645
2655
|
} = state;
|
|
2646
2656
|
append$1($Viewlet);
|
|
2647
2657
|
};
|
|
2648
|
-
const dispose$
|
|
2658
|
+
const dispose$j = state => {
|
|
2649
2659
|
remove$2(state.$Viewlet);
|
|
2650
2660
|
};
|
|
2651
2661
|
const setBounds$7 = (state, x, y, width, height) => {
|
|
@@ -2660,8 +2670,8 @@ const ViewletEditorCompletionDetails = {
|
|
|
2660
2670
|
Events: ViewletEditorCompletionDetailsEvents,
|
|
2661
2671
|
appendWidget: appendWidget$4,
|
|
2662
2672
|
attachEvents: attachEvents$a,
|
|
2663
|
-
create: create$
|
|
2664
|
-
dispose: dispose$
|
|
2673
|
+
create: create$H,
|
|
2674
|
+
dispose: dispose$j,
|
|
2665
2675
|
setBounds: setBounds$7,
|
|
2666
2676
|
setDom: setDom$9
|
|
2667
2677
|
};
|
|
@@ -2669,7 +2679,7 @@ const ViewletEditorCompletionDetails = {
|
|
|
2669
2679
|
const rememberFocus = rememberFocus$1;
|
|
2670
2680
|
|
|
2671
2681
|
const returnValue$7 = true;
|
|
2672
|
-
const handleSashPointerDown$2 = create$
|
|
2682
|
+
const handleSashPointerDown$2 = create$J(event => {
|
|
2673
2683
|
const {
|
|
2674
2684
|
clientX,
|
|
2675
2685
|
clientY
|
|
@@ -2728,7 +2738,7 @@ const handleFocusIn$2 = event => {
|
|
|
2728
2738
|
const uid = fromEvent(event);
|
|
2729
2739
|
handleFocusIn$4(uid);
|
|
2730
2740
|
};
|
|
2731
|
-
const handleBlur$
|
|
2741
|
+
const handleBlur$8 = event => {
|
|
2732
2742
|
const uid = fromEvent(event);
|
|
2733
2743
|
executeViewletCommand(uid, 'EditorRename.handleBlur');
|
|
2734
2744
|
};
|
|
@@ -2745,7 +2755,7 @@ const handleInput$6 = event => {
|
|
|
2745
2755
|
|
|
2746
2756
|
const ViewletEditorRenameEvents = {
|
|
2747
2757
|
__proto__: null,
|
|
2748
|
-
handleBlur: handleBlur$
|
|
2758
|
+
handleBlur: handleBlur$8,
|
|
2749
2759
|
handleFocusIn: handleFocusIn$2,
|
|
2750
2760
|
handleInput: handleInput$6
|
|
2751
2761
|
};
|
|
@@ -2763,7 +2773,7 @@ const appendWidget$2 = state => {
|
|
|
2763
2773
|
} = state;
|
|
2764
2774
|
append$1($Viewlet);
|
|
2765
2775
|
};
|
|
2766
|
-
const dispose$
|
|
2776
|
+
const dispose$i = state => {
|
|
2767
2777
|
remove$2(state.$Viewlet);
|
|
2768
2778
|
};
|
|
2769
2779
|
|
|
@@ -2771,7 +2781,7 @@ const ViewletEditorRename = {
|
|
|
2771
2781
|
__proto__: null,
|
|
2772
2782
|
Events: ViewletEditorRenameEvents,
|
|
2773
2783
|
appendWidget: appendWidget$2,
|
|
2774
|
-
dispose: dispose$
|
|
2784
|
+
dispose: dispose$i,
|
|
2775
2785
|
setBounds: setBounds$5
|
|
2776
2786
|
};
|
|
2777
2787
|
|
|
@@ -2799,7 +2809,7 @@ const appendWidget$1 = state => {
|
|
|
2799
2809
|
} = state;
|
|
2800
2810
|
append$1($Viewlet);
|
|
2801
2811
|
};
|
|
2802
|
-
const dispose$
|
|
2812
|
+
const dispose$h = state => {
|
|
2803
2813
|
remove$2(state.$Viewlet);
|
|
2804
2814
|
};
|
|
2805
2815
|
|
|
@@ -2807,7 +2817,7 @@ const ViewletEditorSourceActions = {
|
|
|
2807
2817
|
__proto__: null,
|
|
2808
2818
|
Events: ViewletEditorSourceActionsEvents,
|
|
2809
2819
|
appendWidget: appendWidget$1,
|
|
2810
|
-
dispose: dispose$
|
|
2820
|
+
dispose: dispose$h,
|
|
2811
2821
|
setBounds: setBounds$4
|
|
2812
2822
|
};
|
|
2813
2823
|
|
|
@@ -2859,7 +2869,7 @@ const handleReplaceInput = event => {
|
|
|
2859
2869
|
const handleReplaceFocus = event => {
|
|
2860
2870
|
return ['FindWidget.handleReplaceFocus'];
|
|
2861
2871
|
};
|
|
2862
|
-
const handleFocus$
|
|
2872
|
+
const handleFocus$9 = event => {
|
|
2863
2873
|
return ['FindWidget.handleFocus'];
|
|
2864
2874
|
};
|
|
2865
2875
|
const handleToggleReplaceFocus = event => {
|
|
@@ -2887,7 +2897,7 @@ const ViewletFindWidgetEvents = {
|
|
|
2887
2897
|
handleClickReplace,
|
|
2888
2898
|
handleClickReplaceAll,
|
|
2889
2899
|
handleClickToggleReplace,
|
|
2890
|
-
handleFocus: handleFocus$
|
|
2900
|
+
handleFocus: handleFocus$9,
|
|
2891
2901
|
handleFocusClose,
|
|
2892
2902
|
handleFocusNext,
|
|
2893
2903
|
handleFocusPrevious,
|
|
@@ -2900,7 +2910,7 @@ const ViewletFindWidgetEvents = {
|
|
|
2900
2910
|
returnValue: returnValue$6
|
|
2901
2911
|
};
|
|
2902
2912
|
|
|
2903
|
-
const create$
|
|
2913
|
+
const create$G = () => {
|
|
2904
2914
|
const $Viewlet = document.createElement('div');
|
|
2905
2915
|
$Viewlet.className = 'Viewlet FindWidget';
|
|
2906
2916
|
$Viewlet.role = Group;
|
|
@@ -2954,17 +2964,17 @@ const setBounds$3 = (state, x, y, width, height) => {
|
|
|
2954
2964
|
} = state;
|
|
2955
2965
|
setBounds$a($Viewlet, x, y, width, height);
|
|
2956
2966
|
};
|
|
2957
|
-
const dispose$
|
|
2967
|
+
const dispose$g = state => {
|
|
2958
2968
|
remove$2(state.$Viewlet);
|
|
2959
2969
|
};
|
|
2960
|
-
const Events$
|
|
2970
|
+
const Events$9 = ViewletFindWidgetEvents;
|
|
2961
2971
|
|
|
2962
2972
|
const ViewletFindWidget = {
|
|
2963
2973
|
__proto__: null,
|
|
2964
|
-
Events: Events$
|
|
2974
|
+
Events: Events$9,
|
|
2965
2975
|
appendWidget,
|
|
2966
|
-
create: create$
|
|
2967
|
-
dispose: dispose$
|
|
2976
|
+
create: create$G,
|
|
2977
|
+
dispose: dispose$g,
|
|
2968
2978
|
focus: focus$h,
|
|
2969
2979
|
setBounds: setBounds$3,
|
|
2970
2980
|
setDom: setDom$7,
|
|
@@ -2990,7 +3000,6 @@ const EditorText = 'Editor';
|
|
|
2990
3000
|
const EditorWidgetError = 'EditorWidgetError';
|
|
2991
3001
|
const Empty = 'Empty';
|
|
2992
3002
|
const Error$2 = 'Error';
|
|
2993
|
-
const Explorer = 'Explorer';
|
|
2994
3003
|
const Extensions = 'Extensions';
|
|
2995
3004
|
const FindWidget = 'FindWidget';
|
|
2996
3005
|
const ImagePreview$1 = 'ImagePreview';
|
|
@@ -3314,7 +3323,7 @@ const logError = async (error, prefix = '') => {
|
|
|
3314
3323
|
print(prettyError, prefix);
|
|
3315
3324
|
return prettyError;
|
|
3316
3325
|
};
|
|
3317
|
-
const handleError$
|
|
3326
|
+
const handleError$6 = async (error, notify = true, prefix = '') => {
|
|
3318
3327
|
try {
|
|
3319
3328
|
const prettyError = await logError(error, prefix);
|
|
3320
3329
|
if (notify) {
|
|
@@ -3333,14 +3342,14 @@ const isChromeExtensionError = error => {
|
|
|
3333
3342
|
|
|
3334
3343
|
const handleUnhandledRejection = event => {
|
|
3335
3344
|
event.preventDefault();
|
|
3336
|
-
handleError$
|
|
3345
|
+
handleError$6(event.reason, true, '[renderer process] Unhandled Rejection: ');
|
|
3337
3346
|
};
|
|
3338
3347
|
const handleUnhandledError = (message, filename, lineno, colno, error) => {
|
|
3339
3348
|
if (isChromeExtensionError(message)) {
|
|
3340
3349
|
// ignore errors from chrome extensions
|
|
3341
3350
|
return;
|
|
3342
3351
|
}
|
|
3343
|
-
handleError$
|
|
3352
|
+
handleError$6(error, Boolean(error), '[renderer-process] Unhandled Error: ');
|
|
3344
3353
|
};
|
|
3345
3354
|
|
|
3346
3355
|
const handleWindowMessage = event => {
|
|
@@ -3468,7 +3477,7 @@ const getWorkerDisplayName = name => {
|
|
|
3468
3477
|
}
|
|
3469
3478
|
return `${name} worker`;
|
|
3470
3479
|
};
|
|
3471
|
-
const create$
|
|
3480
|
+
const create$F = async ({
|
|
3472
3481
|
url,
|
|
3473
3482
|
name
|
|
3474
3483
|
}) => {
|
|
@@ -3535,7 +3544,7 @@ const wrap = worker => {
|
|
|
3535
3544
|
|
|
3536
3545
|
const IpcParentWithModuleWorker = {
|
|
3537
3546
|
__proto__: null,
|
|
3538
|
-
create: create$
|
|
3547
|
+
create: create$F,
|
|
3539
3548
|
wrap
|
|
3540
3549
|
};
|
|
3541
3550
|
|
|
@@ -3543,7 +3552,7 @@ const isMessagePort$1 = value => {
|
|
|
3543
3552
|
return value instanceof MessagePort;
|
|
3544
3553
|
};
|
|
3545
3554
|
|
|
3546
|
-
const create$
|
|
3555
|
+
const create$E = async ({
|
|
3547
3556
|
url
|
|
3548
3557
|
}) => {
|
|
3549
3558
|
string(url);
|
|
@@ -3564,10 +3573,10 @@ const create$F = async ({
|
|
|
3564
3573
|
|
|
3565
3574
|
const IpcParentWithMessagePort = {
|
|
3566
3575
|
__proto__: null,
|
|
3567
|
-
create: create$
|
|
3576
|
+
create: create$E
|
|
3568
3577
|
};
|
|
3569
3578
|
|
|
3570
|
-
const create$
|
|
3579
|
+
const create$D = async url => {
|
|
3571
3580
|
const referencePort = await new Promise(resolve => {
|
|
3572
3581
|
globalThis.acceptReferencePort = resolve;
|
|
3573
3582
|
import(url);
|
|
@@ -3578,7 +3587,7 @@ const create$E = async url => {
|
|
|
3578
3587
|
|
|
3579
3588
|
const IpcParentWithReferencePort = {
|
|
3580
3589
|
__proto__: null,
|
|
3581
|
-
create: create$
|
|
3590
|
+
create: create$D
|
|
3582
3591
|
};
|
|
3583
3592
|
|
|
3584
3593
|
const isWorker = value => {
|
|
@@ -3586,12 +3595,12 @@ const isWorker = value => {
|
|
|
3586
3595
|
};
|
|
3587
3596
|
|
|
3588
3597
|
// TODO add test
|
|
3589
|
-
const create$
|
|
3598
|
+
const create$C = async ({
|
|
3590
3599
|
url,
|
|
3591
3600
|
name,
|
|
3592
3601
|
port
|
|
3593
3602
|
}) => {
|
|
3594
|
-
const worker = await create$
|
|
3603
|
+
const worker = await create$F({
|
|
3595
3604
|
url,
|
|
3596
3605
|
name
|
|
3597
3606
|
});
|
|
@@ -3610,7 +3619,7 @@ const create$D = async ({
|
|
|
3610
3619
|
|
|
3611
3620
|
const IpcParentWithModuleWorkerWithMessagePort = {
|
|
3612
3621
|
__proto__: null,
|
|
3613
|
-
create: create$
|
|
3622
|
+
create: create$C
|
|
3614
3623
|
};
|
|
3615
3624
|
|
|
3616
3625
|
const handleIpcOnce = ipc => {
|
|
@@ -4137,7 +4146,7 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
|
4137
4146
|
};
|
|
4138
4147
|
|
|
4139
4148
|
// TODO use handleIncomingIpc function
|
|
4140
|
-
const create$
|
|
4149
|
+
const create$B = async ({
|
|
4141
4150
|
port,
|
|
4142
4151
|
ipcId
|
|
4143
4152
|
}) => {
|
|
@@ -4153,7 +4162,7 @@ const create$C = async ({
|
|
|
4153
4162
|
|
|
4154
4163
|
const IpcParentWithElectron = {
|
|
4155
4164
|
__proto__: null,
|
|
4156
|
-
create: create$
|
|
4165
|
+
create: create$B
|
|
4157
4166
|
};
|
|
4158
4167
|
|
|
4159
4168
|
const play = async src => {
|
|
@@ -4384,7 +4393,7 @@ const AriaAlert = {
|
|
|
4384
4393
|
// but that's difficult to know
|
|
4385
4394
|
|
|
4386
4395
|
// TODO hide widget after timeout or mousemove
|
|
4387
|
-
const create$
|
|
4396
|
+
const create$A = (message, x, y) => {
|
|
4388
4397
|
const $EditorError = document.createElement('div');
|
|
4389
4398
|
$EditorError.className = 'EditorWidgetError';
|
|
4390
4399
|
$EditorError.textContent = message;
|
|
@@ -4399,7 +4408,7 @@ const create$B = (message, x, y) => {
|
|
|
4399
4408
|
|
|
4400
4409
|
const name$s = 'EditorError';
|
|
4401
4410
|
const Commands$t = {
|
|
4402
|
-
create: create$
|
|
4411
|
+
create: create$A
|
|
4403
4412
|
};
|
|
4404
4413
|
|
|
4405
4414
|
const EditorError_ipc = {
|
|
@@ -4483,7 +4492,7 @@ const showError = (message, y, x) => {
|
|
|
4483
4492
|
$ImagePreviewImage
|
|
4484
4493
|
};
|
|
4485
4494
|
};
|
|
4486
|
-
const create$
|
|
4495
|
+
const create$z = (uri, top, left) => {
|
|
4487
4496
|
const $ImagePreviewImage = document.createElement('img');
|
|
4488
4497
|
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
4489
4498
|
$ImagePreviewImage.src = uri;
|
|
@@ -4508,22 +4517,22 @@ const create$A = (uri, top, left) => {
|
|
|
4508
4517
|
const update = (state, uri) => {
|
|
4509
4518
|
state.$ImagePreviewImage.uri = uri;
|
|
4510
4519
|
};
|
|
4511
|
-
const dispose$
|
|
4520
|
+
const dispose$f = state => {
|
|
4512
4521
|
remove$2(state.$ImagePreview);
|
|
4513
4522
|
};
|
|
4514
4523
|
|
|
4515
4524
|
const ImagePreview = {
|
|
4516
4525
|
__proto__: null,
|
|
4517
|
-
create: create$
|
|
4518
|
-
dispose: dispose$
|
|
4526
|
+
create: create$z,
|
|
4527
|
+
dispose: dispose$f,
|
|
4519
4528
|
showError,
|
|
4520
4529
|
update
|
|
4521
4530
|
};
|
|
4522
4531
|
|
|
4523
4532
|
const name$p = 'ImagePreview';
|
|
4524
4533
|
const Commands$q = {
|
|
4525
|
-
create: create$
|
|
4526
|
-
dispose: dispose$
|
|
4534
|
+
create: create$z,
|
|
4535
|
+
dispose: dispose$f,
|
|
4527
4536
|
showError: showError,
|
|
4528
4537
|
update: update
|
|
4529
4538
|
};
|
|
@@ -4600,7 +4609,7 @@ const InitData_ipc = {
|
|
|
4600
4609
|
|
|
4601
4610
|
const name$n = 'IpcParent';
|
|
4602
4611
|
const Commands$o = {
|
|
4603
|
-
create: create$
|
|
4612
|
+
create: create$K
|
|
4604
4613
|
};
|
|
4605
4614
|
|
|
4606
4615
|
const IpcParent_ipc = {
|
|
@@ -4720,7 +4729,7 @@ const create$Notification = message => {
|
|
|
4720
4729
|
$Notification.textContent = message;
|
|
4721
4730
|
return $Notification;
|
|
4722
4731
|
};
|
|
4723
|
-
const create$
|
|
4732
|
+
const create$y = (type, message) => {
|
|
4724
4733
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
4725
4734
|
const $Notification = create$Notification(message);
|
|
4726
4735
|
append$1($Notification);
|
|
@@ -4765,7 +4774,7 @@ const createWithOptions = (type, message, options) => {
|
|
|
4765
4774
|
const $Notification = create$NotificationWithOptions(message, options);
|
|
4766
4775
|
append$1($Notification);
|
|
4767
4776
|
};
|
|
4768
|
-
const dispose$
|
|
4777
|
+
const dispose$e = id => {
|
|
4769
4778
|
// const $Notification = state.$Notifications
|
|
4770
4779
|
};
|
|
4771
4780
|
|
|
@@ -4773,9 +4782,9 @@ const name$h = 'Notification';
|
|
|
4773
4782
|
|
|
4774
4783
|
// prettier-ignore
|
|
4775
4784
|
const Commands$i = {
|
|
4776
|
-
create: create$
|
|
4785
|
+
create: create$y,
|
|
4777
4786
|
createWithOptions: createWithOptions,
|
|
4778
|
-
dispose: dispose$
|
|
4787
|
+
dispose: dispose$e
|
|
4779
4788
|
};
|
|
4780
4789
|
|
|
4781
4790
|
const Notification_ipc = {
|
|
@@ -4797,7 +4806,7 @@ const set$4 = (canvasId, canvas) => {
|
|
|
4797
4806
|
const get$3 = id => {
|
|
4798
4807
|
return get$4(id);
|
|
4799
4808
|
};
|
|
4800
|
-
const create$
|
|
4809
|
+
const create$x = async (canvasId, objectId) => {
|
|
4801
4810
|
const canvas = document.createElement('canvas');
|
|
4802
4811
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
4803
4812
|
set$4(canvasId, canvas);
|
|
@@ -4808,7 +4817,7 @@ const name$g = 'OffscreenCanvas';
|
|
|
4808
4817
|
|
|
4809
4818
|
// prettier-ignore
|
|
4810
4819
|
const Commands$h = {
|
|
4811
|
-
create: create$
|
|
4820
|
+
create: create$x
|
|
4812
4821
|
};
|
|
4813
4822
|
|
|
4814
4823
|
const OffscreenCanvas_ipc = {
|
|
@@ -4873,7 +4882,6 @@ const focusPrevious = () => {
|
|
|
4873
4882
|
};
|
|
4874
4883
|
|
|
4875
4884
|
const FocusDebugInput = 6;
|
|
4876
|
-
const FocusExplorerEditBox = 14;
|
|
4877
4885
|
const FocusLocationList = 17;
|
|
4878
4886
|
const FocusMenu = 18;
|
|
4879
4887
|
const FocusQuickPickInput = 20;
|
|
@@ -4961,7 +4969,7 @@ const handleMouseDown$3 = event => {
|
|
|
4961
4969
|
*
|
|
4962
4970
|
* @param {MouseEvent} event
|
|
4963
4971
|
*/
|
|
4964
|
-
const handleMouseEnter
|
|
4972
|
+
const handleMouseEnter = event => {
|
|
4965
4973
|
const {
|
|
4966
4974
|
target,
|
|
4967
4975
|
clientX,
|
|
@@ -4976,7 +4984,7 @@ const handleMouseEnter$1 = event => {
|
|
|
4976
4984
|
const level = getLevel($Menu);
|
|
4977
4985
|
send(/* Menu.handleMouseEnter */'Menu.handleMouseEnter', /* level */level, /* index */index, /* x */clientX, /* y */clientY, /* timeStamp */timeStamp);
|
|
4978
4986
|
};
|
|
4979
|
-
const handleMouseLeave
|
|
4987
|
+
const handleMouseLeave = event => {
|
|
4980
4988
|
const $RelatedTarget = event.relatedTarget;
|
|
4981
4989
|
if ($RelatedTarget.classList.contains('MenuItem')) ;
|
|
4982
4990
|
// RendererWorker.send(/* Menu.handleMouseLeave */ 'Menu.handleMouseLeave')
|
|
@@ -4998,10 +5006,10 @@ const create$Menu$1 = () => {
|
|
|
4998
5006
|
// $ContextMenu.onmousedown = contextMenuHandleMouseDown
|
|
4999
5007
|
// TODO mousedown vs click? (click is usually better but mousedown is faster, why wait 100ms?)
|
|
5000
5008
|
$Menu.addEventListener(MouseDown, handleMouseDown$3);
|
|
5001
|
-
$Menu.addEventListener(MouseEnter, handleMouseEnter
|
|
5009
|
+
$Menu.addEventListener(MouseEnter, handleMouseEnter, {
|
|
5002
5010
|
capture: true
|
|
5003
5011
|
});
|
|
5004
|
-
$Menu.addEventListener(MouseLeave, handleMouseLeave
|
|
5012
|
+
$Menu.addEventListener(MouseLeave, handleMouseLeave, {
|
|
5005
5013
|
capture: true
|
|
5006
5014
|
});
|
|
5007
5015
|
// $Menu.addEventListener('mousemove', handleMouseMove, {
|
|
@@ -5265,7 +5273,7 @@ const start = async (id, options) => {
|
|
|
5265
5273
|
throw new VError$1(error, `Failed to start screen capture`);
|
|
5266
5274
|
}
|
|
5267
5275
|
};
|
|
5268
|
-
const dispose$
|
|
5276
|
+
const dispose$d = async (id, options) => {
|
|
5269
5277
|
try {
|
|
5270
5278
|
number(id);
|
|
5271
5279
|
const captureStream = get$2(id);
|
|
@@ -5280,7 +5288,7 @@ const dispose$e = async (id, options) => {
|
|
|
5280
5288
|
|
|
5281
5289
|
const name$b = 'ScreenCapture';
|
|
5282
5290
|
const Commands$c = {
|
|
5283
|
-
dispose: dispose$
|
|
5291
|
+
dispose: dispose$d,
|
|
5284
5292
|
start: start
|
|
5285
5293
|
};
|
|
5286
5294
|
|
|
@@ -5957,8 +5965,6 @@ const load$1 = moduleId => {
|
|
|
5957
5965
|
return Promise.resolve().then(function () { return ViewletEmpty; });
|
|
5958
5966
|
case Error$2:
|
|
5959
5967
|
return Promise.resolve().then(function () { return ViewletError; });
|
|
5960
|
-
case Explorer:
|
|
5961
|
-
return Promise.resolve().then(function () { return ViewletExplorer; });
|
|
5962
5968
|
case Extensions:
|
|
5963
5969
|
return Promise.resolve().then(function () { return ViewletExtensions; });
|
|
5964
5970
|
case FindWidget:
|
|
@@ -6036,7 +6042,7 @@ const load$1 = moduleId => {
|
|
|
6036
6042
|
}
|
|
6037
6043
|
};
|
|
6038
6044
|
|
|
6039
|
-
const create$
|
|
6045
|
+
const create$w = (id, uid = id) => {
|
|
6040
6046
|
const module = state$6.modules[id];
|
|
6041
6047
|
if (!module) {
|
|
6042
6048
|
throw new Error(`module not found: ${id}`);
|
|
@@ -6259,7 +6265,7 @@ const sendMultiple = commands => {
|
|
|
6259
6265
|
}
|
|
6260
6266
|
case 'Viewlet.create':
|
|
6261
6267
|
{
|
|
6262
|
-
create$
|
|
6268
|
+
create$w(viewletId, method);
|
|
6263
6269
|
break;
|
|
6264
6270
|
}
|
|
6265
6271
|
case 'Viewlet.createFunctionalRoot':
|
|
@@ -6276,7 +6282,7 @@ const sendMultiple = commands => {
|
|
|
6276
6282
|
}
|
|
6277
6283
|
case 'Viewlet.dispose':
|
|
6278
6284
|
{
|
|
6279
|
-
dispose$
|
|
6285
|
+
dispose$c(viewletId);
|
|
6280
6286
|
break;
|
|
6281
6287
|
}
|
|
6282
6288
|
case 'Viewlet.setPatches':
|
|
@@ -6294,7 +6300,7 @@ const sendMultiple = commands => {
|
|
|
6294
6300
|
case 'Viewlet.handleError':
|
|
6295
6301
|
{
|
|
6296
6302
|
// @ts-expect-error
|
|
6297
|
-
handleError$
|
|
6303
|
+
handleError$5(viewletId, method, ...args);
|
|
6298
6304
|
break;
|
|
6299
6305
|
}
|
|
6300
6306
|
case 'Viewlet.focus':
|
|
@@ -6346,7 +6352,7 @@ const sendMultiple = commands => {
|
|
|
6346
6352
|
}
|
|
6347
6353
|
}
|
|
6348
6354
|
};
|
|
6349
|
-
const dispose$
|
|
6355
|
+
const dispose$c = id => {
|
|
6350
6356
|
try {
|
|
6351
6357
|
number(id);
|
|
6352
6358
|
const {
|
|
@@ -6368,7 +6374,7 @@ const dispose$d = id => {
|
|
|
6368
6374
|
throw new Error(`Failed to dispose ${id}`);
|
|
6369
6375
|
}
|
|
6370
6376
|
};
|
|
6371
|
-
const handleError$
|
|
6377
|
+
const handleError$5 = (id, parentId, message) => {
|
|
6372
6378
|
info(`[viewlet-error] ${id}: ${message}`);
|
|
6373
6379
|
const instance = state$6.instances[id];
|
|
6374
6380
|
if (instance?.state.$Viewlet.isConnected) {
|
|
@@ -6471,13 +6477,13 @@ const appendToBody = childId => {
|
|
|
6471
6477
|
const getFn = command => {
|
|
6472
6478
|
switch (command) {
|
|
6473
6479
|
case 'Viewlet.create':
|
|
6474
|
-
return create$
|
|
6480
|
+
return create$w;
|
|
6475
6481
|
case 'Viewlet.send':
|
|
6476
6482
|
return invoke;
|
|
6477
6483
|
case 'Viewlet.show':
|
|
6478
6484
|
return show;
|
|
6479
6485
|
case 'Viewlet.dispose':
|
|
6480
|
-
return dispose$
|
|
6486
|
+
return dispose$c;
|
|
6481
6487
|
case 'Viewlet.setDom2':
|
|
6482
6488
|
return setDom2;
|
|
6483
6489
|
case 'Viewlet.setBounds':
|
|
@@ -6543,12 +6549,12 @@ const name$8 = 'Viewlet';
|
|
|
6543
6549
|
const Commands$9 = {
|
|
6544
6550
|
addKeyBindings: addKeyBindings,
|
|
6545
6551
|
appendViewlet: appendViewlet,
|
|
6546
|
-
dispose: dispose$
|
|
6552
|
+
dispose: dispose$c,
|
|
6547
6553
|
executeCommands: executeCommands,
|
|
6548
6554
|
focus: focus$f,
|
|
6549
6555
|
focusElementByName: focusElementByName,
|
|
6550
6556
|
focusSelector: focusSelector,
|
|
6551
|
-
handleError: handleError$
|
|
6557
|
+
handleError: handleError$5,
|
|
6552
6558
|
invoke: invoke,
|
|
6553
6559
|
loadModule: loadModule,
|
|
6554
6560
|
refresh: refresh$4,
|
|
@@ -6842,7 +6848,7 @@ const waitForFrameToLoad = $Frame => {
|
|
|
6842
6848
|
};
|
|
6843
6849
|
|
|
6844
6850
|
// TODO could use browser view when running in electron
|
|
6845
|
-
const create$
|
|
6851
|
+
const create$v = async (uid, src, sandbox, csp, credentialless, permissionPolicy, title) => {
|
|
6846
6852
|
const $Iframe = document.createElement('iframe');
|
|
6847
6853
|
setIframeCredentialless($Iframe, credentialless);
|
|
6848
6854
|
setIframeCsp($Iframe, csp);
|
|
@@ -6895,7 +6901,7 @@ const setPort$2 = (uid, port, origin, portType) => {
|
|
|
6895
6901
|
params: [port, portType]
|
|
6896
6902
|
}, origin, [port]);
|
|
6897
6903
|
};
|
|
6898
|
-
const dispose$
|
|
6904
|
+
const dispose$b = uid => {
|
|
6899
6905
|
const $Iframe = get(uid);
|
|
6900
6906
|
$Iframe.remove();
|
|
6901
6907
|
remove(uid);
|
|
@@ -6903,12 +6909,12 @@ const dispose$c = uid => {
|
|
|
6903
6909
|
|
|
6904
6910
|
const name = 'WebView';
|
|
6905
6911
|
const Commands$1 = {
|
|
6906
|
-
create: create$
|
|
6912
|
+
create: create$v,
|
|
6907
6913
|
load: load,
|
|
6908
6914
|
loadOnly: loadOnly,
|
|
6909
6915
|
appendOnly: appendOnly,
|
|
6910
6916
|
setPort: setPort$2,
|
|
6911
|
-
dispose: dispose$
|
|
6917
|
+
dispose: dispose$b
|
|
6912
6918
|
};
|
|
6913
6919
|
|
|
6914
6920
|
const WebView_ipc = {
|
|
@@ -6950,10 +6956,10 @@ const handleMouseDown$2 = event => {
|
|
|
6950
6956
|
const index = getNodeIndex($Item);
|
|
6951
6957
|
return ['handleClick', button, index, clientX, clientY];
|
|
6952
6958
|
};
|
|
6953
|
-
const handleBlur$
|
|
6959
|
+
const handleBlur$7 = () => {
|
|
6954
6960
|
return ['handleBlur'];
|
|
6955
6961
|
};
|
|
6956
|
-
const handleFocus$
|
|
6962
|
+
const handleFocus$8 = () => {
|
|
6957
6963
|
return ['handleFocus'];
|
|
6958
6964
|
};
|
|
6959
6965
|
|
|
@@ -6972,18 +6978,18 @@ const returnValue$5 = true;
|
|
|
6972
6978
|
|
|
6973
6979
|
const ViewletActivityBarEvents = {
|
|
6974
6980
|
__proto__: null,
|
|
6975
|
-
handleBlur: handleBlur$
|
|
6981
|
+
handleBlur: handleBlur$7,
|
|
6976
6982
|
handleContextMenu: handleContextMenu$9,
|
|
6977
|
-
handleFocus: handleFocus$
|
|
6983
|
+
handleFocus: handleFocus$8,
|
|
6978
6984
|
handleMouseDown: handleMouseDown$2,
|
|
6979
6985
|
returnValue: returnValue$5
|
|
6980
6986
|
};
|
|
6981
6987
|
|
|
6982
|
-
const Events$
|
|
6988
|
+
const Events$8 = ViewletActivityBarEvents;
|
|
6983
6989
|
|
|
6984
6990
|
const ViewletActivityBar = {
|
|
6985
6991
|
__proto__: null,
|
|
6986
|
-
Events: Events$
|
|
6992
|
+
Events: Events$8
|
|
6987
6993
|
};
|
|
6988
6994
|
|
|
6989
6995
|
const handleAudioError = event => {
|
|
@@ -7006,14 +7012,14 @@ const ViewletAudioEvents = {
|
|
|
7006
7012
|
handleAudioError
|
|
7007
7013
|
};
|
|
7008
7014
|
|
|
7009
|
-
const Events$
|
|
7015
|
+
const Events$7 = ViewletAudioEvents;
|
|
7010
7016
|
|
|
7011
7017
|
const ViewletAudio = {
|
|
7012
7018
|
__proto__: null,
|
|
7013
|
-
Events: Events$
|
|
7019
|
+
Events: Events$7
|
|
7014
7020
|
};
|
|
7015
7021
|
|
|
7016
|
-
const create$
|
|
7022
|
+
const create$u = () => {
|
|
7017
7023
|
const $Viewlet = document.createElement('div');
|
|
7018
7024
|
$Viewlet.className = 'Viewlet BrowserViewOverview';
|
|
7019
7025
|
return {
|
|
@@ -7029,18 +7035,18 @@ const setDom$5 = (state, dom) => {
|
|
|
7029
7035
|
|
|
7030
7036
|
const ViewletBrowserViewOverview = {
|
|
7031
7037
|
__proto__: null,
|
|
7032
|
-
create: create$
|
|
7038
|
+
create: create$u,
|
|
7033
7039
|
setDom: setDom$5
|
|
7034
7040
|
};
|
|
7035
7041
|
|
|
7036
|
-
const create$
|
|
7042
|
+
const create$t = () => {
|
|
7037
7043
|
const $Viewlet = document.createElement('div');
|
|
7038
7044
|
$Viewlet.className = 'Viewlet Clock';
|
|
7039
7045
|
return {
|
|
7040
7046
|
$Viewlet
|
|
7041
7047
|
};
|
|
7042
7048
|
};
|
|
7043
|
-
const dispose$
|
|
7049
|
+
const dispose$a = state => {};
|
|
7044
7050
|
const refresh$3 = () => {};
|
|
7045
7051
|
const setTime = (state, time) => {
|
|
7046
7052
|
object(state);
|
|
@@ -7050,8 +7056,8 @@ const setTime = (state, time) => {
|
|
|
7050
7056
|
|
|
7051
7057
|
const ViewletClock = {
|
|
7052
7058
|
__proto__: null,
|
|
7053
|
-
create: create$
|
|
7054
|
-
dispose: dispose$
|
|
7059
|
+
create: create$t,
|
|
7060
|
+
dispose: dispose$a,
|
|
7055
7061
|
refresh: refresh$3,
|
|
7056
7062
|
setTime
|
|
7057
7063
|
};
|
|
@@ -7066,18 +7072,18 @@ const handleInput$4 = event => {
|
|
|
7066
7072
|
} = target;
|
|
7067
7073
|
handleInput$7(uid, value);
|
|
7068
7074
|
};
|
|
7069
|
-
const handleFocus$
|
|
7075
|
+
const handleFocus$7 = event => {
|
|
7070
7076
|
const uid = fromEvent(event);
|
|
7071
|
-
handleFocus$
|
|
7077
|
+
handleFocus$a(uid);
|
|
7072
7078
|
};
|
|
7073
7079
|
|
|
7074
7080
|
const ViewletDebugConsoleEvents = {
|
|
7075
7081
|
__proto__: null,
|
|
7076
|
-
handleFocus: handleFocus$
|
|
7082
|
+
handleFocus: handleFocus$7,
|
|
7077
7083
|
handleInput: handleInput$4
|
|
7078
7084
|
};
|
|
7079
7085
|
|
|
7080
|
-
const create$
|
|
7086
|
+
const create$s = () => {
|
|
7081
7087
|
const $Viewlet = document.createElement('div');
|
|
7082
7088
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
7083
7089
|
return {
|
|
@@ -7093,7 +7099,7 @@ const setDom$4 = (state, dom) => {
|
|
|
7093
7099
|
|
|
7094
7100
|
const ViewletDebugConsole = {
|
|
7095
7101
|
__proto__: null,
|
|
7096
|
-
create: create$
|
|
7102
|
+
create: create$s,
|
|
7097
7103
|
setDom: setDom$4
|
|
7098
7104
|
};
|
|
7099
7105
|
|
|
@@ -7110,14 +7116,14 @@ const handleKeyDown$3 = event => {
|
|
|
7110
7116
|
} = event;
|
|
7111
7117
|
handleKeyDown$5(uid, key, altKey, ctrlKey, shiftKey, metaKey);
|
|
7112
7118
|
};
|
|
7113
|
-
const handleBlur$
|
|
7119
|
+
const handleBlur$6 = event => {
|
|
7114
7120
|
const uid = fromEvent(event);
|
|
7115
|
-
handleBlur$
|
|
7121
|
+
handleBlur$a(uid);
|
|
7116
7122
|
};
|
|
7117
7123
|
|
|
7118
7124
|
const ViewletDefineKeyBindingEvents = {
|
|
7119
7125
|
__proto__: null,
|
|
7120
|
-
handleBlur: handleBlur$
|
|
7126
|
+
handleBlur: handleBlur$6,
|
|
7121
7127
|
handleKeyDown: handleKeyDown$3
|
|
7122
7128
|
};
|
|
7123
7129
|
|
|
@@ -7154,7 +7160,7 @@ const setMaskImage = ($Element, icon) => {
|
|
|
7154
7160
|
}
|
|
7155
7161
|
};
|
|
7156
7162
|
|
|
7157
|
-
const create$
|
|
7163
|
+
const create$r = icon => {
|
|
7158
7164
|
const $Icon = document.createElement('div');
|
|
7159
7165
|
$Icon.className = 'MaskIcon';
|
|
7160
7166
|
setMaskImage($Icon, icon);
|
|
@@ -7164,7 +7170,7 @@ const create$s = icon => {
|
|
|
7164
7170
|
|
|
7165
7171
|
const create$Button = (label, icon) => {
|
|
7166
7172
|
// TODO icon div might not be needed (unnecessary html element)
|
|
7167
|
-
const $Icon = create$
|
|
7173
|
+
const $Icon = create$r(icon);
|
|
7168
7174
|
const $Button = document.createElement('button');
|
|
7169
7175
|
$Button.className = 'IconButton';
|
|
7170
7176
|
$Button.title = label;
|
|
@@ -7173,19 +7179,19 @@ const create$Button = (label, icon) => {
|
|
|
7173
7179
|
return $Button;
|
|
7174
7180
|
};
|
|
7175
7181
|
|
|
7176
|
-
const handleClick$
|
|
7182
|
+
const handleClick$5 = index => {
|
|
7177
7183
|
send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
|
|
7178
7184
|
};
|
|
7179
7185
|
|
|
7180
|
-
const handleClick$
|
|
7186
|
+
const handleClick$4 = event => {
|
|
7181
7187
|
const {
|
|
7182
7188
|
target
|
|
7183
7189
|
} = event;
|
|
7184
7190
|
const index = getNodeIndex(target);
|
|
7185
|
-
handleClick$
|
|
7191
|
+
handleClick$5(index);
|
|
7186
7192
|
};
|
|
7187
7193
|
|
|
7188
|
-
const create$
|
|
7194
|
+
const create$q = () => {
|
|
7189
7195
|
const $DialogTitle = document.createElement('h2');
|
|
7190
7196
|
$DialogTitle.id = 'DialogTitle';
|
|
7191
7197
|
const $DialogCloseButton = create$Button('Close', 'Close');
|
|
@@ -7212,7 +7218,7 @@ const create$r = () => {
|
|
|
7212
7218
|
$Dialog.setAttribute(AriaLabelledBy, 'DialogTitle');
|
|
7213
7219
|
$Dialog.setAttribute(AriaDescribedBy, 'DialogBodyErrorMessage');
|
|
7214
7220
|
$Dialog.append($DialogHeader, $DialogBody);
|
|
7215
|
-
$Dialog.onclick = handleClick$
|
|
7221
|
+
$Dialog.onclick = handleClick$4;
|
|
7216
7222
|
return {
|
|
7217
7223
|
$Viewlet: $Dialog,
|
|
7218
7224
|
$DialogTitle,
|
|
@@ -7266,7 +7272,7 @@ const setErrorStack = (state, errorStack) => {
|
|
|
7266
7272
|
|
|
7267
7273
|
const ViewletDialog = {
|
|
7268
7274
|
__proto__: null,
|
|
7269
|
-
create: create$
|
|
7275
|
+
create: create$q,
|
|
7270
7276
|
postAppend,
|
|
7271
7277
|
setButtons,
|
|
7272
7278
|
setCodeFrame,
|
|
@@ -7313,7 +7319,7 @@ const ViewletDiffEditor = {
|
|
|
7313
7319
|
|
|
7314
7320
|
// TODO aria alert
|
|
7315
7321
|
|
|
7316
|
-
const create$
|
|
7322
|
+
const create$p = () => {
|
|
7317
7323
|
const $Viewlet = document.createElement('div');
|
|
7318
7324
|
$Viewlet.className = 'Viewlet EditorError';
|
|
7319
7325
|
return {
|
|
@@ -7335,7 +7341,7 @@ const setBounds$1 = (state, x, y, width, height) => {
|
|
|
7335
7341
|
|
|
7336
7342
|
const ViewletEditorError = {
|
|
7337
7343
|
__proto__: null,
|
|
7338
|
-
create: create$
|
|
7344
|
+
create: create$p,
|
|
7339
7345
|
setBounds: setBounds$1,
|
|
7340
7346
|
setDom: setDom$3
|
|
7341
7347
|
};
|
|
@@ -7383,7 +7389,7 @@ const handlePointerCaptureLost$1 = event => {
|
|
|
7383
7389
|
/**
|
|
7384
7390
|
* @param {PointerEvent} event
|
|
7385
7391
|
*/
|
|
7386
|
-
const handlePointerDown$
|
|
7392
|
+
const handlePointerDown$4 = event => {
|
|
7387
7393
|
const {
|
|
7388
7394
|
pointerId,
|
|
7389
7395
|
clientX,
|
|
@@ -7399,7 +7405,7 @@ const handlePointerDown$5 = event => {
|
|
|
7399
7405
|
target.addEventListener(PointerUp, handlePointerUp);
|
|
7400
7406
|
target.addEventListener(LostPointerCapture, handlePointerCaptureLost$1);
|
|
7401
7407
|
const uid = fromEvent(event);
|
|
7402
|
-
handlePointerDown$
|
|
7408
|
+
handlePointerDown$5(uid, pointerId, clientX, clientY);
|
|
7403
7409
|
};
|
|
7404
7410
|
|
|
7405
7411
|
/**
|
|
@@ -7430,16 +7436,16 @@ const handleContextMenu$8 = event => {
|
|
|
7430
7436
|
const uid = fromEvent(event);
|
|
7431
7437
|
handleContextMenu$b(uid, button, clientX, clientY);
|
|
7432
7438
|
};
|
|
7433
|
-
const handleError$
|
|
7439
|
+
const handleError$4 = event => {
|
|
7434
7440
|
const uid = fromEvent(event);
|
|
7435
7441
|
handleImageError$1(uid);
|
|
7436
7442
|
};
|
|
7437
|
-
const handleFocus$
|
|
7443
|
+
const handleFocus$6 = event => {
|
|
7438
7444
|
const uid = fromEvent(event);
|
|
7439
|
-
handleFocus$
|
|
7445
|
+
handleFocus$a(uid);
|
|
7440
7446
|
};
|
|
7441
7447
|
|
|
7442
|
-
const create$
|
|
7448
|
+
const create$o = () => {
|
|
7443
7449
|
const $Viewlet = document.createElement('div');
|
|
7444
7450
|
$Viewlet.className = 'Viewlet EditorImage';
|
|
7445
7451
|
return {
|
|
@@ -7451,12 +7457,12 @@ const attachEvents$8 = state => {
|
|
|
7451
7457
|
$Viewlet
|
|
7452
7458
|
} = state;
|
|
7453
7459
|
attachEvents$c($Viewlet, {
|
|
7454
|
-
[PointerDown]: handlePointerDown$
|
|
7460
|
+
[PointerDown]: handlePointerDown$4,
|
|
7455
7461
|
[PointerUp]: handlePointerUp,
|
|
7456
7462
|
[ContextMenu]: handleContextMenu$8,
|
|
7457
|
-
[FocusIn]: handleFocus$
|
|
7463
|
+
[FocusIn]: handleFocus$6
|
|
7458
7464
|
});
|
|
7459
|
-
$Viewlet.addEventListener(Error$3, handleError$
|
|
7465
|
+
$Viewlet.addEventListener(Error$3, handleError$4, Capture);
|
|
7460
7466
|
$Viewlet.addEventListener(Wheel, handleWheel$1, Passive);
|
|
7461
7467
|
};
|
|
7462
7468
|
const setTransform = (state, transform) => {
|
|
@@ -7482,13 +7488,13 @@ const setDom$2 = (state, dom) => {
|
|
|
7482
7488
|
const ViewletEditorImage = {
|
|
7483
7489
|
__proto__: null,
|
|
7484
7490
|
attachEvents: attachEvents$8,
|
|
7485
|
-
create: create$
|
|
7491
|
+
create: create$o,
|
|
7486
7492
|
setDom: setDom$2,
|
|
7487
7493
|
setDragging,
|
|
7488
7494
|
setTransform
|
|
7489
7495
|
};
|
|
7490
7496
|
|
|
7491
|
-
const create$
|
|
7497
|
+
const create$n = () => {
|
|
7492
7498
|
const $Viewlet = document.createElement('div');
|
|
7493
7499
|
$Viewlet.className = 'Viewlet EditorText';
|
|
7494
7500
|
$Viewlet.textContent = 'loading...';
|
|
@@ -7496,7 +7502,7 @@ const create$o = () => {
|
|
|
7496
7502
|
$Viewlet
|
|
7497
7503
|
};
|
|
7498
7504
|
};
|
|
7499
|
-
const dispose$
|
|
7505
|
+
const dispose$9 = state => {};
|
|
7500
7506
|
const refresh$2 = (state, context) => {
|
|
7501
7507
|
object(state);
|
|
7502
7508
|
string(context.content);
|
|
@@ -7505,8 +7511,8 @@ const refresh$2 = (state, context) => {
|
|
|
7505
7511
|
|
|
7506
7512
|
const ViewletEditorPlainText = {
|
|
7507
7513
|
__proto__: null,
|
|
7508
|
-
create: create$
|
|
7509
|
-
dispose: dispose$
|
|
7514
|
+
create: create$n,
|
|
7515
|
+
dispose: dispose$9,
|
|
7510
7516
|
refresh: refresh$2
|
|
7511
7517
|
};
|
|
7512
7518
|
|
|
@@ -7569,10 +7575,10 @@ const attachEventsFunctional = ($Node, eventMap) => {
|
|
|
7569
7575
|
}
|
|
7570
7576
|
};
|
|
7571
7577
|
|
|
7572
|
-
const Text
|
|
7578
|
+
const Text = 'text';
|
|
7573
7579
|
|
|
7574
7580
|
const getText = clipBoardData => {
|
|
7575
|
-
return clipBoardData.getData(Text
|
|
7581
|
+
return clipBoardData.getData(Text);
|
|
7576
7582
|
};
|
|
7577
7583
|
|
|
7578
7584
|
const detachEvent = ($Node, key, listener) => {
|
|
@@ -7624,7 +7630,7 @@ const toSimpleTouchEvent = event => {
|
|
|
7624
7630
|
|
|
7625
7631
|
// TODO tree shake out mobile support when targeting electron -> less code -> less event listeners -> less memory -> less cpu
|
|
7626
7632
|
|
|
7627
|
-
const handleFocus$
|
|
7633
|
+
const handleFocus$5 = event => {
|
|
7628
7634
|
return ['handleFocus'];
|
|
7629
7635
|
};
|
|
7630
7636
|
const handleMouseMove = event => {
|
|
@@ -7635,7 +7641,7 @@ const handleMouseMove = event => {
|
|
|
7635
7641
|
} = event;
|
|
7636
7642
|
return ['handleMouseMove', clientX, clientY, altKey];
|
|
7637
7643
|
};
|
|
7638
|
-
const handleBlur$
|
|
7644
|
+
const handleBlur$5 = event => {
|
|
7639
7645
|
// needed for save on blur
|
|
7640
7646
|
// also needed to close completions on blur
|
|
7641
7647
|
return ['handleBlur'];
|
|
@@ -7764,7 +7770,7 @@ const handlePaste = event => {
|
|
|
7764
7770
|
const text = getText(clipboardData);
|
|
7765
7771
|
return ['paste', text];
|
|
7766
7772
|
};
|
|
7767
|
-
const handleScrollBarVerticalPointerDown = create$
|
|
7773
|
+
const handleScrollBarVerticalPointerDown = create$J(event => {
|
|
7768
7774
|
const {
|
|
7769
7775
|
clientY
|
|
7770
7776
|
} = event;
|
|
@@ -7887,7 +7893,7 @@ const setLineInfos = (state, dom) => {
|
|
|
7887
7893
|
// 1. create -> only create dom elements
|
|
7888
7894
|
// 2. render -> fill elements with attributes and data
|
|
7889
7895
|
// that way all dom nodes can be recycled
|
|
7890
|
-
const create$
|
|
7896
|
+
const create$m = () => {
|
|
7891
7897
|
const $EditorInput = document.createElement('textarea');
|
|
7892
7898
|
$EditorInput.className = 'EditorInput';
|
|
7893
7899
|
$EditorInput.ariaAutoComplete = List;
|
|
@@ -7905,8 +7911,8 @@ const create$n = () => {
|
|
|
7905
7911
|
[CompositionStart]: handleCompositionStart,
|
|
7906
7912
|
[CompositionUpdate]: handleCompositionUpdate,
|
|
7907
7913
|
[CompositionEnd]: handleCompositionEnd,
|
|
7908
|
-
[Focus]: handleFocus$
|
|
7909
|
-
[Blur]: handleBlur$
|
|
7914
|
+
[Focus]: handleFocus$5,
|
|
7915
|
+
[Blur]: handleBlur$5,
|
|
7910
7916
|
[Cut]: handleCut,
|
|
7911
7917
|
[Paste]: handlePaste,
|
|
7912
7918
|
returnValue: true
|
|
@@ -8054,11 +8060,11 @@ const setDecorationsDom$1 = (state, decorations) => {
|
|
|
8054
8060
|
setDecorationsDom$2(state, decorations);
|
|
8055
8061
|
};
|
|
8056
8062
|
|
|
8057
|
-
const create$
|
|
8063
|
+
const create$l = create$m;
|
|
8058
8064
|
const setText$1 = setText$2;
|
|
8059
8065
|
const setSelections = setSelections$1;
|
|
8060
8066
|
const setIncrementalEdits = setIncrementalEdits$1;
|
|
8061
|
-
const handleError$
|
|
8067
|
+
const handleError$3 = (state, error) => {
|
|
8062
8068
|
state.$Viewlet.textContent = error;
|
|
8063
8069
|
};
|
|
8064
8070
|
const setScrollBar = setScrollBar$1;
|
|
@@ -8096,9 +8102,9 @@ const setDecorationsDom = setDecorationsDom$1;
|
|
|
8096
8102
|
|
|
8097
8103
|
const ViewletEditorText = {
|
|
8098
8104
|
__proto__: null,
|
|
8099
|
-
create: create$
|
|
8105
|
+
create: create$l,
|
|
8100
8106
|
focus: focus$d,
|
|
8101
|
-
handleError: handleError$
|
|
8107
|
+
handleError: handleError$3,
|
|
8102
8108
|
hideOverlayMessage,
|
|
8103
8109
|
highlightAsLink,
|
|
8104
8110
|
renderGutter,
|
|
@@ -8112,7 +8118,7 @@ const ViewletEditorText = {
|
|
|
8112
8118
|
showOverlayMessage
|
|
8113
8119
|
};
|
|
8114
8120
|
|
|
8115
|
-
const create$
|
|
8121
|
+
const create$k = () => {
|
|
8116
8122
|
const $Viewlet = document.createElement('div');
|
|
8117
8123
|
$Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
|
|
8118
8124
|
return {
|
|
@@ -8135,12 +8141,12 @@ const setBounds = (state, x, y, width, height) => {
|
|
|
8135
8141
|
|
|
8136
8142
|
const ViewletEditorWidgetError = {
|
|
8137
8143
|
__proto__: null,
|
|
8138
|
-
create: create$
|
|
8144
|
+
create: create$k,
|
|
8139
8145
|
setBounds,
|
|
8140
8146
|
setMessage: setMessage$3
|
|
8141
8147
|
};
|
|
8142
8148
|
|
|
8143
|
-
const create$
|
|
8149
|
+
const create$j = () => {
|
|
8144
8150
|
const $Viewlet = document.createElement('div');
|
|
8145
8151
|
$Viewlet.dataset.viewlet = 'Empty';
|
|
8146
8152
|
$Viewlet.className = 'Viewlet';
|
|
@@ -8150,17 +8156,17 @@ const create$k = () => {
|
|
|
8150
8156
|
};
|
|
8151
8157
|
const refresh$1 = (state, context) => {};
|
|
8152
8158
|
const focus$c = state => {};
|
|
8153
|
-
const dispose$
|
|
8159
|
+
const dispose$8 = state => {};
|
|
8154
8160
|
|
|
8155
8161
|
const ViewletEmpty = {
|
|
8156
8162
|
__proto__: null,
|
|
8157
|
-
create: create$
|
|
8158
|
-
dispose: dispose$
|
|
8163
|
+
create: create$j,
|
|
8164
|
+
dispose: dispose$8,
|
|
8159
8165
|
focus: focus$c,
|
|
8160
8166
|
refresh: refresh$1
|
|
8161
8167
|
};
|
|
8162
8168
|
|
|
8163
|
-
const create$
|
|
8169
|
+
const create$i = () => {
|
|
8164
8170
|
const $Viewlet = document.createElement('div');
|
|
8165
8171
|
$Viewlet.className = 'Viewlet Error';
|
|
8166
8172
|
return {
|
|
@@ -8176,10 +8182,12 @@ const setMessage$2 = (state, message) => {
|
|
|
8176
8182
|
|
|
8177
8183
|
const ViewletError = {
|
|
8178
8184
|
__proto__: null,
|
|
8179
|
-
create: create$
|
|
8185
|
+
create: create$i,
|
|
8180
8186
|
setMessage: setMessage$2
|
|
8181
8187
|
};
|
|
8182
8188
|
|
|
8189
|
+
const Polite = 'polite';
|
|
8190
|
+
|
|
8183
8191
|
const handleContextMenu$6 = event => {
|
|
8184
8192
|
preventDefault(event);
|
|
8185
8193
|
const {
|
|
@@ -8191,274 +8199,6 @@ const handleContextMenu$6 = event => {
|
|
|
8191
8199
|
handleContextMenu$b(uid, button, clientX, clientY);
|
|
8192
8200
|
};
|
|
8193
8201
|
|
|
8194
|
-
const CopyMove = 'copyMove';
|
|
8195
|
-
|
|
8196
|
-
const Text = 'text';
|
|
8197
|
-
const ResourceUrls = 'resourceurls';
|
|
8198
|
-
|
|
8199
|
-
const setEffectAllowed = (dataTransfer, effectAllowed) => {
|
|
8200
|
-
object(dataTransfer);
|
|
8201
|
-
string(effectAllowed);
|
|
8202
|
-
dataTransfer.effectAllowed = effectAllowed;
|
|
8203
|
-
};
|
|
8204
|
-
const setFilePath = (dataTransfer, filePath, fileName) => {
|
|
8205
|
-
dataTransfer.setData(ResourceUrls, JSON.stringify([filePath]));
|
|
8206
|
-
dataTransfer.setData(Text, filePath);
|
|
8207
|
-
const dragImage = document.createElement('div');
|
|
8208
|
-
dragImage.className = 'DragImage';
|
|
8209
|
-
// if (Browser.getBrowser() !== 'chromium') {
|
|
8210
|
-
// // chrome doesn't support border radius
|
|
8211
|
-
// dragImage.style.borderRadius = '100px'
|
|
8212
|
-
// }
|
|
8213
|
-
dragImage.textContent = fileName;
|
|
8214
|
-
document.body.append(dragImage);
|
|
8215
|
-
dataTransfer.setDragImage(dragImage, -10, -10);
|
|
8216
|
-
const handleTimeOut = () => {
|
|
8217
|
-
dragImage.remove();
|
|
8218
|
-
};
|
|
8219
|
-
setTimeout(handleTimeOut, 0);
|
|
8220
|
-
};
|
|
8221
|
-
const getFilePaths = dataTransfer => {
|
|
8222
|
-
const data = dataTransfer.getData(ResourceUrls);
|
|
8223
|
-
if (data) {
|
|
8224
|
-
const parsed = JSON.parse(data);
|
|
8225
|
-
if (Array.isArray(parsed) && data.length > 0) {
|
|
8226
|
-
return parsed;
|
|
8227
|
-
}
|
|
8228
|
-
}
|
|
8229
|
-
return [];
|
|
8230
|
-
};
|
|
8231
|
-
const getFilePath = dataTransfer => {
|
|
8232
|
-
const filePaths = getFilePaths(dataTransfer);
|
|
8233
|
-
if (filePaths.length === 0) {
|
|
8234
|
-
return '';
|
|
8235
|
-
}
|
|
8236
|
-
return filePaths[0];
|
|
8237
|
-
};
|
|
8238
|
-
|
|
8239
|
-
const handleDragStart$1 = event => {
|
|
8240
|
-
const {
|
|
8241
|
-
dataTransfer,
|
|
8242
|
-
target
|
|
8243
|
-
} = event;
|
|
8244
|
-
// @ts-ignore
|
|
8245
|
-
setEffectAllowed(dataTransfer, CopyMove);
|
|
8246
|
-
|
|
8247
|
-
// @ts-ignore
|
|
8248
|
-
if (target.classList.contains('TreeItem')) {
|
|
8249
|
-
// @ts-ignore
|
|
8250
|
-
const filePath = target.title;
|
|
8251
|
-
// @ts-ignore
|
|
8252
|
-
const fileName = target.textContent;
|
|
8253
|
-
setFilePath(dataTransfer, filePath, fileName);
|
|
8254
|
-
}
|
|
8255
|
-
};
|
|
8256
|
-
const handleDragOver$1 = event => {
|
|
8257
|
-
preventDefault(event);
|
|
8258
|
-
const {
|
|
8259
|
-
clientX,
|
|
8260
|
-
clientY
|
|
8261
|
-
} = event;
|
|
8262
|
-
const uid = fromEvent(event);
|
|
8263
|
-
handleDragOver$2(uid, clientX, clientY);
|
|
8264
|
-
};
|
|
8265
|
-
const handleDragEnd = event => {
|
|
8266
|
-
const {
|
|
8267
|
-
clientX,
|
|
8268
|
-
clientY
|
|
8269
|
-
} = event;
|
|
8270
|
-
const uid = fromEvent(event);
|
|
8271
|
-
handleDragEnd$1(uid, clientX, clientY);
|
|
8272
|
-
};
|
|
8273
|
-
const handleDragLeave = event => {
|
|
8274
|
-
const {
|
|
8275
|
-
clientX,
|
|
8276
|
-
clientY
|
|
8277
|
-
} = event;
|
|
8278
|
-
const uid = fromEvent(event);
|
|
8279
|
-
handleDragLeave$1(uid, clientX, clientY);
|
|
8280
|
-
};
|
|
8281
|
-
|
|
8282
|
-
/**
|
|
8283
|
-
*
|
|
8284
|
-
* @param {DragEvent} event
|
|
8285
|
-
*/
|
|
8286
|
-
const handleDrop$1 = event => {
|
|
8287
|
-
preventDefault(event);
|
|
8288
|
-
const {
|
|
8289
|
-
dataTransfer,
|
|
8290
|
-
clientX,
|
|
8291
|
-
clientY
|
|
8292
|
-
} = event;
|
|
8293
|
-
const {
|
|
8294
|
-
files
|
|
8295
|
-
} = dataTransfer;
|
|
8296
|
-
const uid = fromEvent(event);
|
|
8297
|
-
if (files.length > 0) {
|
|
8298
|
-
return handleDropFiles(uid, clientX, clientY, files);
|
|
8299
|
-
}
|
|
8300
|
-
const filePath = getFilePath(dataTransfer);
|
|
8301
|
-
if (filePath) {
|
|
8302
|
-
handleDropFilePath(uid, clientX, clientY, filePath);
|
|
8303
|
-
}
|
|
8304
|
-
};
|
|
8305
|
-
|
|
8306
|
-
// TODO put drop into separate module and use executeCommand to call it
|
|
8307
|
-
|
|
8308
|
-
// TODO drag and drop should be loaded on demand
|
|
8309
|
-
|
|
8310
|
-
const handleFocus$5 = event => {
|
|
8311
|
-
const {
|
|
8312
|
-
target,
|
|
8313
|
-
isTrusted
|
|
8314
|
-
} = event;
|
|
8315
|
-
if (!isTrusted || target.className === 'InputBox') {
|
|
8316
|
-
return;
|
|
8317
|
-
}
|
|
8318
|
-
const uid = fromEvent(event);
|
|
8319
|
-
handleFocus$b(uid);
|
|
8320
|
-
};
|
|
8321
|
-
const handleBlur$5 = event => {
|
|
8322
|
-
const uid = fromEvent(event);
|
|
8323
|
-
handleBlur$b(uid);
|
|
8324
|
-
};
|
|
8325
|
-
const handleClick$4 = event => {
|
|
8326
|
-
preventDefault(event);
|
|
8327
|
-
const {
|
|
8328
|
-
button,
|
|
8329
|
-
clientX,
|
|
8330
|
-
clientY
|
|
8331
|
-
} = event;
|
|
8332
|
-
const uid = fromEvent(event);
|
|
8333
|
-
handleClickAt$3(uid, button, clientX, clientY);
|
|
8334
|
-
};
|
|
8335
|
-
const handleClickOpenFolder = event => {
|
|
8336
|
-
preventDefault(event);
|
|
8337
|
-
const uid = fromEvent(event);
|
|
8338
|
-
handleClickOpenFolder$1(uid);
|
|
8339
|
-
};
|
|
8340
|
-
const handlePointerDown$4 = event => {
|
|
8341
|
-
const {
|
|
8342
|
-
button,
|
|
8343
|
-
clientX,
|
|
8344
|
-
clientY
|
|
8345
|
-
} = event;
|
|
8346
|
-
const uid = fromEvent(event);
|
|
8347
|
-
handlePointerDown$6(uid, button, clientX, clientY);
|
|
8348
|
-
};
|
|
8349
|
-
const handleMouseEnter = event => {
|
|
8350
|
-
// const $Target = event.target
|
|
8351
|
-
// const index = findIndex($Target)
|
|
8352
|
-
// if (index === -1) {
|
|
8353
|
-
// return
|
|
8354
|
-
// }
|
|
8355
|
-
// RendererWorker.send(
|
|
8356
|
-
// /* Explorer.handleMouseEnter */ 'Explorer.handleMouseEnter',
|
|
8357
|
-
// /* index */ index
|
|
8358
|
-
// )
|
|
8359
|
-
};
|
|
8360
|
-
const handleMouseLeave = event => {
|
|
8361
|
-
// const $Target = event.target
|
|
8362
|
-
// const index = findIndex($Target)
|
|
8363
|
-
// if (index === -1) {
|
|
8364
|
-
// return
|
|
8365
|
-
// }
|
|
8366
|
-
// RendererWorker.send(
|
|
8367
|
-
// /* Explorer.handleMouseLeave */ 'Explorer.handleMouseLeave',
|
|
8368
|
-
// /* index */ index
|
|
8369
|
-
// )
|
|
8370
|
-
};
|
|
8371
|
-
const handleEditingInput = event => {
|
|
8372
|
-
const {
|
|
8373
|
-
target
|
|
8374
|
-
} = event;
|
|
8375
|
-
const {
|
|
8376
|
-
value
|
|
8377
|
-
} = target;
|
|
8378
|
-
const uid = fromEvent(event);
|
|
8379
|
-
updateEditingValue(uid, value);
|
|
8380
|
-
};
|
|
8381
|
-
|
|
8382
|
-
const ViewletExplorerEvents = {
|
|
8383
|
-
__proto__: null,
|
|
8384
|
-
handleBlur: handleBlur$5,
|
|
8385
|
-
handleClick: handleClick$4,
|
|
8386
|
-
handleClickOpenFolder,
|
|
8387
|
-
handleContextMenu: handleContextMenu$6,
|
|
8388
|
-
handleDragEnd,
|
|
8389
|
-
handleDragLeave,
|
|
8390
|
-
handleDragOver: handleDragOver$1,
|
|
8391
|
-
handleDragStart: handleDragStart$1,
|
|
8392
|
-
handleDrop: handleDrop$1,
|
|
8393
|
-
handleEditingInput,
|
|
8394
|
-
handleFocus: handleFocus$5,
|
|
8395
|
-
handleMouseEnter,
|
|
8396
|
-
handleMouseLeave,
|
|
8397
|
-
handlePointerDown: handlePointerDown$4,
|
|
8398
|
-
handleWheel: handleWheel$2
|
|
8399
|
-
};
|
|
8400
|
-
|
|
8401
|
-
const create$i = () => {
|
|
8402
|
-
const $Viewlet = document.createElement('div');
|
|
8403
|
-
$Viewlet.className = 'Viewlet Explorer';
|
|
8404
|
-
$Viewlet.tabIndex = 0;
|
|
8405
|
-
$Viewlet.role = Tree;
|
|
8406
|
-
$Viewlet.ariaLabel = 'Files Explorer';
|
|
8407
|
-
return {
|
|
8408
|
-
$Viewlet
|
|
8409
|
-
};
|
|
8410
|
-
};
|
|
8411
|
-
const Events$7 = ViewletExplorerEvents;
|
|
8412
|
-
const handleError$3 = (state, message) => {
|
|
8413
|
-
object(state);
|
|
8414
|
-
string(message);
|
|
8415
|
-
const {
|
|
8416
|
-
$Viewlet
|
|
8417
|
-
} = state;
|
|
8418
|
-
$Viewlet.textContent = message;
|
|
8419
|
-
};
|
|
8420
|
-
const focusInput = (state, id) => {
|
|
8421
|
-
const $Input = document.getElementById(id);
|
|
8422
|
-
if (!$Input) {
|
|
8423
|
-
return;
|
|
8424
|
-
}
|
|
8425
|
-
$Input.focus();
|
|
8426
|
-
send('Focus.setFocus', FocusExplorerEditBox);
|
|
8427
|
-
};
|
|
8428
|
-
const dispose$8 = state => {};
|
|
8429
|
-
const setDropTargets = (state, oldDropTargets, newDropTargets) => {
|
|
8430
|
-
// TODO use virtual dom for this
|
|
8431
|
-
const {
|
|
8432
|
-
$Viewlet
|
|
8433
|
-
} = state;
|
|
8434
|
-
for (const oldIndex of oldDropTargets) {
|
|
8435
|
-
if (oldIndex === -1) {
|
|
8436
|
-
$Viewlet.classList.remove('DropTarget');
|
|
8437
|
-
} else {
|
|
8438
|
-
$Viewlet.children[oldIndex].classList.remove('DropTarget');
|
|
8439
|
-
}
|
|
8440
|
-
}
|
|
8441
|
-
for (const newIndex of newDropTargets) {
|
|
8442
|
-
if (newIndex === -1) {
|
|
8443
|
-
$Viewlet.classList.add('DropTarget');
|
|
8444
|
-
} else {
|
|
8445
|
-
$Viewlet.children[newIndex].classList.add('DropTarget');
|
|
8446
|
-
}
|
|
8447
|
-
}
|
|
8448
|
-
};
|
|
8449
|
-
|
|
8450
|
-
const ViewletExplorer = {
|
|
8451
|
-
__proto__: null,
|
|
8452
|
-
Events: Events$7,
|
|
8453
|
-
create: create$i,
|
|
8454
|
-
dispose: dispose$8,
|
|
8455
|
-
focusInput,
|
|
8456
|
-
handleError: handleError$3,
|
|
8457
|
-
setDropTargets
|
|
8458
|
-
};
|
|
8459
|
-
|
|
8460
|
-
const Polite = 'polite';
|
|
8461
|
-
|
|
8462
8202
|
const handleScrollBarThumbPointerMove = event => {
|
|
8463
8203
|
const {
|
|
8464
8204
|
clientY
|
|
@@ -8487,7 +8227,7 @@ const handleScrollBarPointerDown$1 = event => {
|
|
|
8487
8227
|
};
|
|
8488
8228
|
const handleFocus$4 = event => {
|
|
8489
8229
|
const uid = fromEvent(event);
|
|
8490
|
-
handleFocus$
|
|
8230
|
+
handleFocus$a(uid);
|
|
8491
8231
|
};
|
|
8492
8232
|
const handlePointerDown$3 = event => {
|
|
8493
8233
|
const {
|
|
@@ -8500,7 +8240,7 @@ const handlePointerDown$3 = event => {
|
|
|
8500
8240
|
}
|
|
8501
8241
|
const $Extension = target.closest('.ExtensionListItem');
|
|
8502
8242
|
const index = getNodeIndex($Extension);
|
|
8503
|
-
handleClick$
|
|
8243
|
+
handleClick$6(uid, index);
|
|
8504
8244
|
};
|
|
8505
8245
|
const handleInput$3 = event => {
|
|
8506
8246
|
const $Target = event.target;
|
|
@@ -9407,6 +9147,83 @@ const ViewletLayout = {
|
|
|
9407
9147
|
setSashes
|
|
9408
9148
|
};
|
|
9409
9149
|
|
|
9150
|
+
const CopyMove = 'copyMove';
|
|
9151
|
+
|
|
9152
|
+
const ResourceUrls = 'resourceurls';
|
|
9153
|
+
|
|
9154
|
+
const setEffectAllowed = (dataTransfer, effectAllowed) => {
|
|
9155
|
+
object(dataTransfer);
|
|
9156
|
+
string(effectAllowed);
|
|
9157
|
+
dataTransfer.effectAllowed = effectAllowed;
|
|
9158
|
+
};
|
|
9159
|
+
const getFilePaths = dataTransfer => {
|
|
9160
|
+
const data = dataTransfer.getData(ResourceUrls);
|
|
9161
|
+
if (data) {
|
|
9162
|
+
const parsed = JSON.parse(data);
|
|
9163
|
+
if (Array.isArray(parsed) && data.length > 0) {
|
|
9164
|
+
return parsed;
|
|
9165
|
+
}
|
|
9166
|
+
}
|
|
9167
|
+
return [];
|
|
9168
|
+
};
|
|
9169
|
+
const getFilePath = dataTransfer => {
|
|
9170
|
+
const filePaths = getFilePaths(dataTransfer);
|
|
9171
|
+
if (filePaths.length === 0) {
|
|
9172
|
+
return '';
|
|
9173
|
+
}
|
|
9174
|
+
return filePaths[0];
|
|
9175
|
+
};
|
|
9176
|
+
|
|
9177
|
+
const handleDragOver$1 = event => {
|
|
9178
|
+
preventDefault(event);
|
|
9179
|
+
const {
|
|
9180
|
+
clientX,
|
|
9181
|
+
clientY
|
|
9182
|
+
} = event;
|
|
9183
|
+
const uid = fromEvent(event);
|
|
9184
|
+
handleDragOver$2(uid, clientX, clientY);
|
|
9185
|
+
};
|
|
9186
|
+
const handleDragEnd = event => {
|
|
9187
|
+
const {
|
|
9188
|
+
clientX,
|
|
9189
|
+
clientY
|
|
9190
|
+
} = event;
|
|
9191
|
+
const uid = fromEvent(event);
|
|
9192
|
+
handleDragEnd$1(uid, clientX, clientY);
|
|
9193
|
+
};
|
|
9194
|
+
const handleDragLeave = event => {
|
|
9195
|
+
const {
|
|
9196
|
+
clientX,
|
|
9197
|
+
clientY
|
|
9198
|
+
} = event;
|
|
9199
|
+
const uid = fromEvent(event);
|
|
9200
|
+
handleDragLeave$1(uid, clientX, clientY);
|
|
9201
|
+
};
|
|
9202
|
+
|
|
9203
|
+
/**
|
|
9204
|
+
*
|
|
9205
|
+
* @param {DragEvent} event
|
|
9206
|
+
*/
|
|
9207
|
+
const handleDrop$1 = event => {
|
|
9208
|
+
preventDefault(event);
|
|
9209
|
+
const {
|
|
9210
|
+
dataTransfer,
|
|
9211
|
+
clientX,
|
|
9212
|
+
clientY
|
|
9213
|
+
} = event;
|
|
9214
|
+
const {
|
|
9215
|
+
files
|
|
9216
|
+
} = dataTransfer;
|
|
9217
|
+
const uid = fromEvent(event);
|
|
9218
|
+
if (files.length > 0) {
|
|
9219
|
+
return handleDropFiles(uid, clientX, clientY, files);
|
|
9220
|
+
}
|
|
9221
|
+
const filePath = getFilePath(dataTransfer);
|
|
9222
|
+
if (filePath) {
|
|
9223
|
+
handleDropFilePath(uid, clientX, clientY, filePath);
|
|
9224
|
+
}
|
|
9225
|
+
};
|
|
9226
|
+
|
|
9410
9227
|
const handleContextMenu$5 = event => {
|
|
9411
9228
|
if (event.defaultPrevented) {
|
|
9412
9229
|
return;
|
|
@@ -10006,7 +9823,7 @@ const handlePointerDown = event => {
|
|
|
10006
9823
|
};
|
|
10007
9824
|
const handleBlur$2 = event => {
|
|
10008
9825
|
const uid = fromEvent(event);
|
|
10009
|
-
handleBlur$
|
|
9826
|
+
handleBlur$a(uid);
|
|
10010
9827
|
};
|
|
10011
9828
|
|
|
10012
9829
|
// TODO
|
|
@@ -10570,7 +10387,7 @@ const ViewletSimpleBrowser = {
|
|
|
10570
10387
|
|
|
10571
10388
|
const handleFocus = event => {
|
|
10572
10389
|
const uid = fromEvent(event);
|
|
10573
|
-
handleFocus$
|
|
10390
|
+
handleFocus$a(uid);
|
|
10574
10391
|
};
|
|
10575
10392
|
const getButtonIndex = $Node => {
|
|
10576
10393
|
let index = -1;
|
|
@@ -10601,7 +10418,7 @@ const handleClick$3 = event => {
|
|
|
10601
10418
|
if (index === -1) {
|
|
10602
10419
|
return;
|
|
10603
10420
|
}
|
|
10604
|
-
handleClick$
|
|
10421
|
+
handleClick$6(uid, index);
|
|
10605
10422
|
};
|
|
10606
10423
|
const handleMouseOver = event => {
|
|
10607
10424
|
const {
|
|
@@ -10673,7 +10490,7 @@ const handleClick$2 = event => {
|
|
|
10673
10490
|
clientX,
|
|
10674
10491
|
clientY
|
|
10675
10492
|
} = event;
|
|
10676
|
-
handleClick$
|
|
10493
|
+
handleClick$6(uid, clientX, clientY);
|
|
10677
10494
|
};
|
|
10678
10495
|
|
|
10679
10496
|
const ViewletStatusBarEvents = {
|
|
@@ -10717,7 +10534,7 @@ const ViewletStatusBar = {
|
|
|
10717
10534
|
|
|
10718
10535
|
const handleClick$1 = event => {
|
|
10719
10536
|
const uid = fromEvent(event);
|
|
10720
|
-
handleClick$
|
|
10537
|
+
handleClick$6(uid);
|
|
10721
10538
|
};
|
|
10722
10539
|
|
|
10723
10540
|
const ViewletStorageEvents = {
|
|
@@ -10823,7 +10640,7 @@ const create$6 = ({
|
|
|
10823
10640
|
|
|
10824
10641
|
const handleBlur = event => {
|
|
10825
10642
|
const uid = fromEvent(event);
|
|
10826
|
-
handleBlur$
|
|
10643
|
+
handleBlur$a(uid);
|
|
10827
10644
|
};
|
|
10828
10645
|
const handleMouseDown = (event, ...args) => {
|
|
10829
10646
|
const uid = fromEvent(event);
|
|
@@ -11100,7 +10917,7 @@ const handleClick = event => {
|
|
|
11100
10917
|
} = event;
|
|
11101
10918
|
const index = getIndex(target);
|
|
11102
10919
|
const uid = fromEvent(event);
|
|
11103
|
-
handleClick$
|
|
10920
|
+
handleClick$6(uid, button, index);
|
|
11104
10921
|
};
|
|
11105
10922
|
const getLevelAndIndex = event => {
|
|
11106
10923
|
const {
|
|
@@ -11136,7 +10953,7 @@ const handleMenuClick = event => {
|
|
|
11136
10953
|
};
|
|
11137
10954
|
const handleFocusIn = event => {
|
|
11138
10955
|
const uid = fromEvent(event);
|
|
11139
|
-
handleFocus$
|
|
10956
|
+
handleFocus$a(uid);
|
|
11140
10957
|
};
|
|
11141
10958
|
|
|
11142
10959
|
const ViewletTitleBarMenuBarEvents = {
|
|
@@ -11581,7 +11398,7 @@ const handleContextMenu$1 = event => {
|
|
|
11581
11398
|
} = event;
|
|
11582
11399
|
return ['handleContextMenu', button, clientX, clientY];
|
|
11583
11400
|
};
|
|
11584
|
-
const handleSashCornerPointerDown = create$
|
|
11401
|
+
const handleSashCornerPointerDown = create$J(event => {
|
|
11585
11402
|
const {
|
|
11586
11403
|
clientX,
|
|
11587
11404
|
clientY
|