@lvce-editor/renderer-process 6.8.0 → 6.9.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 +895 -894
- package/package.json +1 -1
|
@@ -1775,6 +1775,119 @@ const handleUnhandledError = (message, filename, lineno, colno, error) => {
|
|
|
1775
1775
|
handleError$8(error, Boolean(error), '[renderer-process] Unhandled Error: ');
|
|
1776
1776
|
};
|
|
1777
1777
|
|
|
1778
|
+
const Alert = 'alert';
|
|
1779
|
+
const Application = 'application';
|
|
1780
|
+
const Code = 'code';
|
|
1781
|
+
const Complementary = 'complementary';
|
|
1782
|
+
const ContentInfo = 'contentinfo';
|
|
1783
|
+
const Group = 'group';
|
|
1784
|
+
const List$1 = 'list';
|
|
1785
|
+
const ListBox = 'listbox';
|
|
1786
|
+
const Log = 'log';
|
|
1787
|
+
const Main$1 = 'main';
|
|
1788
|
+
const Menu = 'menu';
|
|
1789
|
+
const None$2 = 'none';
|
|
1790
|
+
const Status = 'status';
|
|
1791
|
+
const TabList = 'tablist';
|
|
1792
|
+
const TextBox = 'textbox';
|
|
1793
|
+
const ToolBar = 'toolbar';
|
|
1794
|
+
const Tree = 'tree';
|
|
1795
|
+
const ComboBox = 'combobox';
|
|
1796
|
+
|
|
1797
|
+
const attachEvents$c = ($Node, eventMap) => {
|
|
1798
|
+
for (const [key, value] of Object.entries(eventMap)) {
|
|
1799
|
+
$Node.addEventListener(key, value);
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
const Passive = {
|
|
1804
|
+
passive: true
|
|
1805
|
+
};
|
|
1806
|
+
const Active = {
|
|
1807
|
+
passive: false
|
|
1808
|
+
};
|
|
1809
|
+
const Capture = {
|
|
1810
|
+
capture: true
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
const BeforeInput = 'beforeinput';
|
|
1814
|
+
const Blur = 'blur';
|
|
1815
|
+
const Click = 'click';
|
|
1816
|
+
const CompositionEnd = 'compositionend';
|
|
1817
|
+
const CompositionStart = 'compositionstart';
|
|
1818
|
+
const CompositionUpdate = 'compositionupdate';
|
|
1819
|
+
const ContextMenu = 'contextmenu';
|
|
1820
|
+
const Cut = 'cut';
|
|
1821
|
+
const DoubleClick = 'dblclick';
|
|
1822
|
+
const DragEnd = 'dragend';
|
|
1823
|
+
const DragLeave = 'dragleave';
|
|
1824
|
+
const DragOver = 'dragover';
|
|
1825
|
+
const DragStart = 'dragstart';
|
|
1826
|
+
const Drop = 'drop';
|
|
1827
|
+
const Error$3 = 'error';
|
|
1828
|
+
const Focus = 'focus';
|
|
1829
|
+
const FocusIn = 'focusin';
|
|
1830
|
+
const FocusOut = 'focusout';
|
|
1831
|
+
const Input$1 = 'input';
|
|
1832
|
+
const KeyDown = 'keydown';
|
|
1833
|
+
const KeyUp = 'keyup';
|
|
1834
|
+
const LostPointerCapture = 'lostpointercapture';
|
|
1835
|
+
const MouseDown = 'mousedown';
|
|
1836
|
+
const MouseEnter = 'mouseenter';
|
|
1837
|
+
const MouseLeave = 'mouseleave';
|
|
1838
|
+
const MouseUp = 'mouseup';
|
|
1839
|
+
const Paste = 'paste';
|
|
1840
|
+
const PointerDown = 'pointerdown';
|
|
1841
|
+
const PointerMove = 'pointermove';
|
|
1842
|
+
const PointerUp = 'pointerup';
|
|
1843
|
+
const Resize = 'resize';
|
|
1844
|
+
const Scroll = 'scroll';
|
|
1845
|
+
const TouchEnd = 'touchend';
|
|
1846
|
+
const TouchMove = 'touchmove';
|
|
1847
|
+
const TouchStart = 'touchstart';
|
|
1848
|
+
const Wheel = 'wheel';
|
|
1849
|
+
|
|
1850
|
+
const setBounds$6 = ($Element, x, y, width, height) => {
|
|
1851
|
+
$Element.style.top = `${y}px`;
|
|
1852
|
+
$Element.style.left = `${x}px`;
|
|
1853
|
+
$Element.style.width = `${width}px`;
|
|
1854
|
+
$Element.style.height = `${height}px`;
|
|
1855
|
+
};
|
|
1856
|
+
const setYAndHeight = ($Element, y, height) => {
|
|
1857
|
+
if (!$Element) {
|
|
1858
|
+
return;
|
|
1859
|
+
}
|
|
1860
|
+
$Element.style.translate = typeof y === 'string' ? y : `0 ${y}px`;
|
|
1861
|
+
$Element.style.height = typeof height === 'string' ? height : `${height}px`;
|
|
1862
|
+
};
|
|
1863
|
+
const setXAndWidth = ($Element, x, width) => {
|
|
1864
|
+
$Element.style.translate = `${x}px 0`;
|
|
1865
|
+
$Element.style.width = `${width}px`;
|
|
1866
|
+
};
|
|
1867
|
+
const setTop = ($Element, top) => {
|
|
1868
|
+
$Element.style.top = `${top}px`;
|
|
1869
|
+
};
|
|
1870
|
+
const setWidth = ($Element, width) => {
|
|
1871
|
+
$Element.style.width = `${width}px`;
|
|
1872
|
+
};
|
|
1873
|
+
const setXAndY = ($Element, x, y) => {
|
|
1874
|
+
$Element.style.left = `${x}px`;
|
|
1875
|
+
$Element.style.top = `${y}px`;
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
*
|
|
1880
|
+
* @param {HTMLElement} $Element
|
|
1881
|
+
* @param {number} x
|
|
1882
|
+
* @param {number} y
|
|
1883
|
+
*/
|
|
1884
|
+
const setXAndYTransform = ($Element, x, y) => {
|
|
1885
|
+
$Element.style.translate = `${x}px ${y}px`;
|
|
1886
|
+
};
|
|
1887
|
+
const setHeight = ($Element, height) => {
|
|
1888
|
+
$Element.style.height = `${height}px`;
|
|
1889
|
+
};
|
|
1890
|
+
|
|
1778
1891
|
// src/parts/ComponentUid/ComponentUid.ts
|
|
1779
1892
|
var uidSymbol = Symbol("uid");
|
|
1780
1893
|
var setComponentUid = ($Element, uid) => {
|
|
@@ -1832,7 +1945,7 @@ var H5 = "h5";
|
|
|
1832
1945
|
var H6 = "h6";
|
|
1833
1946
|
var I = "i";
|
|
1834
1947
|
var Img = "img";
|
|
1835
|
-
var Input
|
|
1948
|
+
var Input = "input";
|
|
1836
1949
|
var Ins = "ins";
|
|
1837
1950
|
var Kbd = "kbd";
|
|
1838
1951
|
var Span = "span";
|
|
@@ -1958,7 +2071,7 @@ var getElementTag = type => {
|
|
|
1958
2071
|
case Tr2:
|
|
1959
2072
|
return Tr;
|
|
1960
2073
|
case Input2:
|
|
1961
|
-
return Input
|
|
2074
|
+
return Input;
|
|
1962
2075
|
case ColGroup2:
|
|
1963
2076
|
return ColGroup;
|
|
1964
2077
|
case Col2:
|
|
@@ -2216,44 +2329,482 @@ var render2 = (elements, eventMap = {}) => {
|
|
|
2216
2329
|
return $Root;
|
|
2217
2330
|
};
|
|
2218
2331
|
|
|
2219
|
-
// src/parts/RememberFocus/RememberFocus.ts
|
|
2220
|
-
var queryInputs = $Viewlet => {
|
|
2221
|
-
return [...$Viewlet.querySelectorAll("input, textarea")];
|
|
2222
|
-
};
|
|
2223
|
-
var rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
2224
|
-
const oldLeft = $Viewlet.style.left;
|
|
2225
|
-
const oldTop = $Viewlet.style.top;
|
|
2226
|
-
const oldWidth = $Viewlet.style.width;
|
|
2227
|
-
const oldHeight = $Viewlet.style.height;
|
|
2228
|
-
const focused = document.activeElement.getAttribute("name");
|
|
2229
|
-
const $$Inputs = queryInputs($Viewlet);
|
|
2230
|
-
const inputMap = /* @__PURE__ */Object.create(null);
|
|
2231
|
-
for (const $Input of $$Inputs) {
|
|
2232
|
-
inputMap[$Input.name] = $Input.value;
|
|
2233
|
-
}
|
|
2234
|
-
if (uid) {
|
|
2235
|
-
const $New = render2(dom, eventMap).firstChild;
|
|
2236
|
-
setComponentUid($New, uid);
|
|
2237
|
-
$Viewlet.replaceWith($New);
|
|
2238
|
-
$Viewlet = $New;
|
|
2239
|
-
} else {
|
|
2240
|
-
renderInto($Viewlet, dom, eventMap);
|
|
2241
|
-
}
|
|
2242
|
-
const $$NewInputs = queryInputs($Viewlet);
|
|
2243
|
-
for (const $Input of $$NewInputs) {
|
|
2244
|
-
$Input.value = inputMap[$Input.name] || $Input.value || "";
|
|
2245
|
-
}
|
|
2246
|
-
if (focused) {
|
|
2247
|
-
const $Focused = $Viewlet.querySelector(`[name="${focused}"]`);
|
|
2248
|
-
if ($Focused) {
|
|
2249
|
-
$Focused.focus();
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
$Viewlet.style.top = oldTop;
|
|
2253
|
-
$Viewlet.style.left = oldLeft;
|
|
2254
|
-
$Viewlet.style.height = oldHeight;
|
|
2255
|
-
$Viewlet.style.width = oldWidth;
|
|
2256
|
-
return $Viewlet;
|
|
2332
|
+
// src/parts/RememberFocus/RememberFocus.ts
|
|
2333
|
+
var queryInputs = $Viewlet => {
|
|
2334
|
+
return [...$Viewlet.querySelectorAll("input, textarea")];
|
|
2335
|
+
};
|
|
2336
|
+
var rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
2337
|
+
const oldLeft = $Viewlet.style.left;
|
|
2338
|
+
const oldTop = $Viewlet.style.top;
|
|
2339
|
+
const oldWidth = $Viewlet.style.width;
|
|
2340
|
+
const oldHeight = $Viewlet.style.height;
|
|
2341
|
+
const focused = document.activeElement.getAttribute("name");
|
|
2342
|
+
const $$Inputs = queryInputs($Viewlet);
|
|
2343
|
+
const inputMap = /* @__PURE__ */Object.create(null);
|
|
2344
|
+
for (const $Input of $$Inputs) {
|
|
2345
|
+
inputMap[$Input.name] = $Input.value;
|
|
2346
|
+
}
|
|
2347
|
+
if (uid) {
|
|
2348
|
+
const $New = render2(dom, eventMap).firstChild;
|
|
2349
|
+
setComponentUid($New, uid);
|
|
2350
|
+
$Viewlet.replaceWith($New);
|
|
2351
|
+
$Viewlet = $New;
|
|
2352
|
+
} else {
|
|
2353
|
+
renderInto($Viewlet, dom, eventMap);
|
|
2354
|
+
}
|
|
2355
|
+
const $$NewInputs = queryInputs($Viewlet);
|
|
2356
|
+
for (const $Input of $$NewInputs) {
|
|
2357
|
+
$Input.value = inputMap[$Input.name] || $Input.value || "";
|
|
2358
|
+
}
|
|
2359
|
+
if (focused) {
|
|
2360
|
+
const $Focused = $Viewlet.querySelector(`[name="${focused}"]`);
|
|
2361
|
+
if ($Focused) {
|
|
2362
|
+
$Focused.focus();
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
$Viewlet.style.top = oldTop;
|
|
2366
|
+
$Viewlet.style.left = oldLeft;
|
|
2367
|
+
$Viewlet.style.height = oldHeight;
|
|
2368
|
+
$Viewlet.style.width = oldWidth;
|
|
2369
|
+
return $Viewlet;
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2372
|
+
// TODO this file is not needed when all elements are position fixed
|
|
2373
|
+
const state$7 = {
|
|
2374
|
+
isInDom: false,
|
|
2375
|
+
$PreviousFocusElement: undefined,
|
|
2376
|
+
widgetSet: new Set(),
|
|
2377
|
+
$Widgets: undefined
|
|
2378
|
+
};
|
|
2379
|
+
const create$Widgets = () => {
|
|
2380
|
+
const $Widgets = document.createElement('div');
|
|
2381
|
+
$Widgets.id = 'Widgets';
|
|
2382
|
+
$Widgets.className = 'Widgets';
|
|
2383
|
+
return $Widgets;
|
|
2384
|
+
};
|
|
2385
|
+
const append$1 = $Element => {
|
|
2386
|
+
// TODO should not call append in the first place if it is already in dom
|
|
2387
|
+
if (state$7.widgetSet.has($Element)) {
|
|
2388
|
+
return;
|
|
2389
|
+
}
|
|
2390
|
+
state$7.widgetSet.add($Element);
|
|
2391
|
+
if (state$7.$Widgets) {
|
|
2392
|
+
// @ts-expect-error
|
|
2393
|
+
state$7.$Widgets.append($Element);
|
|
2394
|
+
} else {
|
|
2395
|
+
// @ts-expect-error
|
|
2396
|
+
state$7.$Widgets = create$Widgets();
|
|
2397
|
+
// @ts-expect-error
|
|
2398
|
+
state$7.$Widgets.append($Element);
|
|
2399
|
+
// @ts-expect-error
|
|
2400
|
+
document.body.append(state$7.$Widgets);
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
const remove$1 = $Element => {
|
|
2404
|
+
if (!$Element) {
|
|
2405
|
+
// TODO $Element should always be defined
|
|
2406
|
+
return;
|
|
2407
|
+
}
|
|
2408
|
+
state$7.widgetSet.delete($Element);
|
|
2409
|
+
$Element.remove();
|
|
2410
|
+
// TODO state.$Widgets should always be defined at this point
|
|
2411
|
+
if (state$7.widgetSet.size === 0 && state$7.$Widgets) {
|
|
2412
|
+
// @ts-expect-error
|
|
2413
|
+
state$7.$Widgets.remove();
|
|
2414
|
+
state$7.$Widgets = undefined;
|
|
2415
|
+
}
|
|
2416
|
+
};
|
|
2417
|
+
|
|
2418
|
+
const set$4 = setComponentUid;
|
|
2419
|
+
const get$5 = getComponentUid;
|
|
2420
|
+
const fromEvent = getComponentUidFromEvent;
|
|
2421
|
+
|
|
2422
|
+
const startTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
2423
|
+
$Target.setPointerCapture(pointerId);
|
|
2424
|
+
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
2425
|
+
// TODO use pointerlost event instead
|
|
2426
|
+
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
2427
|
+
};
|
|
2428
|
+
const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
2429
|
+
$Target.releasePointerCapture(pointerId);
|
|
2430
|
+
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
2431
|
+
// TODO use pointerlost event instead
|
|
2432
|
+
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2435
|
+
const executeViewletCommand = (uid, command, ...args) => {
|
|
2436
|
+
number(uid);
|
|
2437
|
+
send('Viewlet.executeViewletCommand', uid, command, ...args);
|
|
2438
|
+
};
|
|
2439
|
+
|
|
2440
|
+
const nameAnonymousFunction = (fn, name) => {
|
|
2441
|
+
Object.defineProperty(fn, 'name', {
|
|
2442
|
+
value: name
|
|
2443
|
+
});
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2446
|
+
const forwardViewletCommand = name => {
|
|
2447
|
+
const fn = (uid, ...args) => {
|
|
2448
|
+
executeViewletCommand(uid, name, ...args);
|
|
2449
|
+
};
|
|
2450
|
+
nameAnonymousFunction(fn, name);
|
|
2451
|
+
return fn;
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2454
|
+
forwardViewletCommand('clearFilter');
|
|
2455
|
+
const close$1 = forwardViewletCommand('close');
|
|
2456
|
+
forwardViewletCommand('closeEditor');
|
|
2457
|
+
const closeMenu$1 = forwardViewletCommand('closeMenu');
|
|
2458
|
+
forwardViewletCommand('compositionEnd');
|
|
2459
|
+
forwardViewletCommand('compositionStart');
|
|
2460
|
+
forwardViewletCommand('compositionUpdate');
|
|
2461
|
+
forwardViewletCommand('cut');
|
|
2462
|
+
forwardViewletCommand('focus');
|
|
2463
|
+
forwardViewletCommand('focusIndex');
|
|
2464
|
+
const focusNext = forwardViewletCommand('focusNext');
|
|
2465
|
+
const focusPrevious$1 = forwardViewletCommand('focusPrevious');
|
|
2466
|
+
const handleAudioError$1 = forwardViewletCommand('handleAudioError');
|
|
2467
|
+
const handleBeforeInput$2 = forwardViewletCommand('handleBeforeInput');
|
|
2468
|
+
forwardViewletCommand('handleBeforeInputFromContentEditable');
|
|
2469
|
+
const handleBlur$a = forwardViewletCommand('handleBlur');
|
|
2470
|
+
const handleButtonClick = forwardViewletCommand('handleButtonClick');
|
|
2471
|
+
const handleClick$9 = forwardViewletCommand('handleClick');
|
|
2472
|
+
const handleClickAction$2 = forwardViewletCommand('handleClickAction');
|
|
2473
|
+
forwardViewletCommand('handleClickAdd');
|
|
2474
|
+
const handleClickAt$2 = forwardViewletCommand('handleClickAt');
|
|
2475
|
+
const handleClickOpenFolder$1 = forwardViewletCommand('handleClickOpenFolder');
|
|
2476
|
+
forwardViewletCommand('handleClickClose');
|
|
2477
|
+
forwardViewletCommand('handleClickCopy');
|
|
2478
|
+
forwardViewletCommand('handleClickMinimize');
|
|
2479
|
+
forwardViewletCommand('handleClickOk');
|
|
2480
|
+
forwardViewletCommand('handleClickOpenFile');
|
|
2481
|
+
forwardViewletCommand('handleClickRestore');
|
|
2482
|
+
const handleClickTab$2 = forwardViewletCommand('handleClickTab');
|
|
2483
|
+
forwardViewletCommand('handleClickToggleMaximize');
|
|
2484
|
+
const handleContextMenu$c = forwardViewletCommand('handleContextMenu');
|
|
2485
|
+
const handleDoubleClick = forwardViewletCommand('handleDoubleClick');
|
|
2486
|
+
const handleDragEnd$1 = forwardViewletCommand('handleDragEnd');
|
|
2487
|
+
const handleDragLeave$1 = forwardViewletCommand('handleDragLeave');
|
|
2488
|
+
const handleDragOver$1 = forwardViewletCommand('handleDragOver');
|
|
2489
|
+
forwardViewletCommand('handleDrop');
|
|
2490
|
+
const handleDropFilePath = forwardViewletCommand('handleDropFilePath');
|
|
2491
|
+
const handleDropFiles = forwardViewletCommand('handleDrop');
|
|
2492
|
+
forwardViewletCommand('handleFilterInput');
|
|
2493
|
+
const handleFocus$c = forwardViewletCommand('handleFocus');
|
|
2494
|
+
const handleFocusIn$3 = forwardViewletCommand('handleFocusIn');
|
|
2495
|
+
const handleIconError$1 = forwardViewletCommand('handleIconError');
|
|
2496
|
+
const handleImageError$1 = forwardViewletCommand('handleImageError');
|
|
2497
|
+
const handleInput$8 = forwardViewletCommand('handleInput');
|
|
2498
|
+
const handleKeyDown$5 = forwardViewletCommand('handleKeyDown');
|
|
2499
|
+
forwardViewletCommand('handleListBlur');
|
|
2500
|
+
forwardViewletCommand('handleListFocus');
|
|
2501
|
+
const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
|
|
2502
|
+
const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
|
|
2503
|
+
const handleMouseDown$4 = forwardViewletCommand('handleMouseDown');
|
|
2504
|
+
forwardViewletCommand('handleMouseMove');
|
|
2505
|
+
const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
|
|
2506
|
+
const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
|
|
2507
|
+
forwardViewletCommand('handlePointerCaptureLost');
|
|
2508
|
+
const handlePointerDown$7 = forwardViewletCommand('handlePointerDown');
|
|
2509
|
+
const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
|
|
2510
|
+
forwardViewletCommand('handlePointerOver');
|
|
2511
|
+
const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
|
|
2512
|
+
const handleReadmeContextMenu$1 = forwardViewletCommand('handleReadmeContextMenu');
|
|
2513
|
+
forwardViewletCommand('handleReplaceInput');
|
|
2514
|
+
const handleResizerClick = forwardViewletCommand('handleResizerClick');
|
|
2515
|
+
const handleResizerMove = forwardViewletCommand('handleResizerMove');
|
|
2516
|
+
const handleScrollBarCaptureLost = forwardViewletCommand('handleScrollBarCaptureLost');
|
|
2517
|
+
const handleScrollBarClick = forwardViewletCommand('handleScrollBarClick');
|
|
2518
|
+
forwardViewletCommand('handleScrollBarHorizontalMove');
|
|
2519
|
+
forwardViewletCommand('handleScrollBarHorizontalPointerDown');
|
|
2520
|
+
const handleScrollBarMove = forwardViewletCommand('handleScrollBarMove');
|
|
2521
|
+
const handleScrollBarThumbPointerMove$3 = forwardViewletCommand('handleScrollBarThumbPointerMove');
|
|
2522
|
+
forwardViewletCommand('handleScrollBarMove');
|
|
2523
|
+
forwardViewletCommand('handleScrollBarVerticalPointerDown');
|
|
2524
|
+
forwardViewletCommand('handleSliderPointerDown');
|
|
2525
|
+
forwardViewletCommand('handleSliderPointerMove');
|
|
2526
|
+
const handleTabClick = forwardViewletCommand('handleTabClick');
|
|
2527
|
+
const handleTabContextMenu = forwardViewletCommand('handleTabContextMenu');
|
|
2528
|
+
forwardViewletCommand('handleTabsPointerOut');
|
|
2529
|
+
forwardViewletCommand('handleTabsPointerOver');
|
|
2530
|
+
const handleTabsWheel$1 = forwardViewletCommand('handleTabsWheel');
|
|
2531
|
+
const handleTouchEnd$1 = forwardViewletCommand('handleTouchEnd');
|
|
2532
|
+
const handleTouchMove$1 = forwardViewletCommand('handleTouchMove');
|
|
2533
|
+
const handleTouchStart$1 = forwardViewletCommand('handleTouchStart');
|
|
2534
|
+
const handleWheel$4 = forwardViewletCommand('handleWheel');
|
|
2535
|
+
const hidePanel = forwardViewletCommand('hidePanel');
|
|
2536
|
+
forwardViewletCommand('moveRectangleSelectionPx');
|
|
2537
|
+
forwardViewletCommand('moveSelectionPx');
|
|
2538
|
+
forwardViewletCommand('paste');
|
|
2539
|
+
forwardViewletCommand('replaceAll');
|
|
2540
|
+
const selectIndex = forwardViewletCommand('selectIndex');
|
|
2541
|
+
forwardViewletCommand('setDelta');
|
|
2542
|
+
forwardViewletCommand('toggleMatchCase');
|
|
2543
|
+
forwardViewletCommand('toggleMatchWholeWord');
|
|
2544
|
+
const toggleMaximize = forwardViewletCommand('toggleMaximize');
|
|
2545
|
+
const toggleReplace = forwardViewletCommand('toggleReplace');
|
|
2546
|
+
forwardViewletCommand('toggleUseRegularExpression');
|
|
2547
|
+
forwardViewletCommand('type');
|
|
2548
|
+
forwardViewletCommand('typeWithAutoClosing');
|
|
2549
|
+
const updateEditingValue = forwardViewletCommand('updateEditingValue');
|
|
2550
|
+
|
|
2551
|
+
const handleWheel$3 = event => {
|
|
2552
|
+
const {
|
|
2553
|
+
deltaMode,
|
|
2554
|
+
deltaY
|
|
2555
|
+
} = event;
|
|
2556
|
+
const uid = fromEvent(event);
|
|
2557
|
+
handleWheel$4(uid, deltaMode, deltaY);
|
|
2558
|
+
};
|
|
2559
|
+
|
|
2560
|
+
const handleMousedown = event => {
|
|
2561
|
+
preventDefault(event);
|
|
2562
|
+
const {
|
|
2563
|
+
clientX,
|
|
2564
|
+
clientY
|
|
2565
|
+
} = event;
|
|
2566
|
+
const uid = fromEvent(event);
|
|
2567
|
+
handleClickAt$2(uid, clientX, clientY);
|
|
2568
|
+
};
|
|
2569
|
+
const handleScrollBarThumbPointerMove$2 = event => {
|
|
2570
|
+
const {
|
|
2571
|
+
clientY
|
|
2572
|
+
} = event;
|
|
2573
|
+
const uid = fromEvent(event);
|
|
2574
|
+
handleScrollBarThumbPointerMove$3(uid, clientY);
|
|
2575
|
+
};
|
|
2576
|
+
const handlePointerCaptureLost$2 = event => {
|
|
2577
|
+
const {
|
|
2578
|
+
target,
|
|
2579
|
+
pointerId
|
|
2580
|
+
} = event;
|
|
2581
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
2582
|
+
};
|
|
2583
|
+
const handleScrollBarPointerDown$4 = event => {
|
|
2584
|
+
preventDefault(event);
|
|
2585
|
+
const {
|
|
2586
|
+
target,
|
|
2587
|
+
pointerId,
|
|
2588
|
+
clientY
|
|
2589
|
+
} = event;
|
|
2590
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
2591
|
+
const uid = fromEvent(event);
|
|
2592
|
+
handleScrollBarClick(uid, clientY);
|
|
2593
|
+
};
|
|
2594
|
+
|
|
2595
|
+
const setScrollBar$2 = (state, scrollBarY, scrollBarHeight, scrollBarThumbClass) => {
|
|
2596
|
+
const {
|
|
2597
|
+
$ScrollBarThumb
|
|
2598
|
+
} = state;
|
|
2599
|
+
if (scrollBarThumbClass) {
|
|
2600
|
+
$ScrollBarThumb.className = scrollBarThumbClass;
|
|
2601
|
+
}
|
|
2602
|
+
setYAndHeight($ScrollBarThumb, scrollBarY, scrollBarHeight);
|
|
2603
|
+
};
|
|
2604
|
+
|
|
2605
|
+
const Small$1 = 1;
|
|
2606
|
+
const Normal$1 = 2;
|
|
2607
|
+
const Large$1 = 3;
|
|
2608
|
+
|
|
2609
|
+
const None$1 = '';
|
|
2610
|
+
const Small = 'Small';
|
|
2611
|
+
const Normal = 'Normal';
|
|
2612
|
+
const Large = 'Large';
|
|
2613
|
+
|
|
2614
|
+
const getClassName = size => {
|
|
2615
|
+
switch (size) {
|
|
2616
|
+
case Small$1:
|
|
2617
|
+
return Small;
|
|
2618
|
+
case Normal$1:
|
|
2619
|
+
return Normal;
|
|
2620
|
+
case Large$1:
|
|
2621
|
+
return Large;
|
|
2622
|
+
default:
|
|
2623
|
+
return None$1;
|
|
2624
|
+
}
|
|
2625
|
+
};
|
|
2626
|
+
|
|
2627
|
+
const setSize = (state, oldSize, newSize) => {
|
|
2628
|
+
const {
|
|
2629
|
+
$Viewlet
|
|
2630
|
+
} = state;
|
|
2631
|
+
const oldClassName = getClassName(oldSize);
|
|
2632
|
+
if (oldClassName) {
|
|
2633
|
+
$Viewlet.classList.remove(oldClassName);
|
|
2634
|
+
}
|
|
2635
|
+
const newClassName = getClassName(newSize);
|
|
2636
|
+
$Viewlet.classList.add(newClassName);
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2639
|
+
const setContentHeight = (state, height) => {
|
|
2640
|
+
const {
|
|
2641
|
+
$ListItems
|
|
2642
|
+
} = state;
|
|
2643
|
+
setHeight($ListItems, height);
|
|
2644
|
+
};
|
|
2645
|
+
const setNegativeMargin = (state, negativeMargin) => {
|
|
2646
|
+
const {
|
|
2647
|
+
$ListItems
|
|
2648
|
+
} = state;
|
|
2649
|
+
setTop($ListItems, negativeMargin);
|
|
2650
|
+
};
|
|
2651
|
+
|
|
2652
|
+
const create$J = () => {
|
|
2653
|
+
const $ListItems = document.createElement('div');
|
|
2654
|
+
$ListItems.className = 'ListItems';
|
|
2655
|
+
$ListItems.role = ListBox;
|
|
2656
|
+
$ListItems.ariaLabel = 'Suggest';
|
|
2657
|
+
const $ScrollBarThumb = document.createElement('div');
|
|
2658
|
+
$ScrollBarThumb.className = 'ScrollBarThumb';
|
|
2659
|
+
const $ScrollBar = document.createElement('div');
|
|
2660
|
+
$ScrollBar.className = 'ScrollBarSmall';
|
|
2661
|
+
$ScrollBar.append($ScrollBarThumb);
|
|
2662
|
+
|
|
2663
|
+
// TODO only create scrollbar when necessary
|
|
2664
|
+
// TODO recycle nodes
|
|
2665
|
+
const $Viewlet = document.createElement('div');
|
|
2666
|
+
$Viewlet.className = 'Viewlet EditorCompletion';
|
|
2667
|
+
$Viewlet.id = 'Completions';
|
|
2668
|
+
$Viewlet.append($ListItems, $ScrollBar);
|
|
2669
|
+
return {
|
|
2670
|
+
$Viewlet,
|
|
2671
|
+
$ListItems,
|
|
2672
|
+
$ScrollBar,
|
|
2673
|
+
$ScrollBarThumb
|
|
2674
|
+
};
|
|
2675
|
+
};
|
|
2676
|
+
const attachEvents$b = state => {
|
|
2677
|
+
const {
|
|
2678
|
+
$Viewlet,
|
|
2679
|
+
$ListItems,
|
|
2680
|
+
$ScrollBar
|
|
2681
|
+
} = state;
|
|
2682
|
+
$Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
|
|
2683
|
+
attachEvents$c($ListItems, {
|
|
2684
|
+
[MouseDown]: handleMousedown
|
|
2685
|
+
});
|
|
2686
|
+
attachEvents$c($ScrollBar, {
|
|
2687
|
+
[PointerDown]: handleScrollBarPointerDown$4
|
|
2688
|
+
});
|
|
2689
|
+
};
|
|
2690
|
+
// TODO show should be passed active cursor position
|
|
2691
|
+
// this would make this function easier to test as it would avoid dependency on globals of other files
|
|
2692
|
+
|
|
2693
|
+
const setDom$a = (state, dom) => {
|
|
2694
|
+
const {
|
|
2695
|
+
$ListItems,
|
|
2696
|
+
$Viewlet
|
|
2697
|
+
} = state;
|
|
2698
|
+
const $Root = render2(dom);
|
|
2699
|
+
// @ts-expect-error
|
|
2700
|
+
$ListItems.replaceChildren(...$Root.firstChild.childNodes);
|
|
2701
|
+
append$1($Viewlet);
|
|
2702
|
+
// TODO recycle nodes
|
|
2703
|
+
// TODO set right aria attributes on $EditorInput
|
|
2704
|
+
};
|
|
2705
|
+
const dispose$i = state => {
|
|
2706
|
+
remove$1(state.$Viewlet);
|
|
2707
|
+
// state.$EditorInput.removeAttribute('aria-activedescendant')
|
|
2708
|
+
};
|
|
2709
|
+
const showLoading = (state, x, y) => {
|
|
2710
|
+
const {
|
|
2711
|
+
$Viewlet
|
|
2712
|
+
} = state;
|
|
2713
|
+
setXAndYTransform($Viewlet, x, y);
|
|
2714
|
+
const $Loading = document.createElement('div');
|
|
2715
|
+
$Loading.textContent = 'Loading';
|
|
2716
|
+
$Viewlet.append($Loading);
|
|
2717
|
+
append$1($Viewlet);
|
|
2718
|
+
};
|
|
2719
|
+
const handleError$7 = (state, error) => {
|
|
2720
|
+
const {
|
|
2721
|
+
$Viewlet
|
|
2722
|
+
} = state;
|
|
2723
|
+
$Viewlet.textContent = `${error}`;
|
|
2724
|
+
};
|
|
2725
|
+
const setBounds$5 = (state, x, y, width, height) => {
|
|
2726
|
+
const {
|
|
2727
|
+
$Viewlet
|
|
2728
|
+
} = state;
|
|
2729
|
+
setBounds$6($Viewlet, x, y, width, height);
|
|
2730
|
+
};
|
|
2731
|
+
|
|
2732
|
+
const ViewletEditorCompletion = {
|
|
2733
|
+
__proto__: null,
|
|
2734
|
+
attachEvents: attachEvents$b,
|
|
2735
|
+
create: create$J,
|
|
2736
|
+
dispose: dispose$i,
|
|
2737
|
+
handleError: handleError$7,
|
|
2738
|
+
setBounds: setBounds$5,
|
|
2739
|
+
setContentHeight,
|
|
2740
|
+
setDom: setDom$a,
|
|
2741
|
+
setNegativeMargin,
|
|
2742
|
+
setScrollBar: setScrollBar$2,
|
|
2743
|
+
setSize,
|
|
2744
|
+
showLoading
|
|
2745
|
+
};
|
|
2746
|
+
|
|
2747
|
+
const ActivityBar = 'ActivityBar';
|
|
2748
|
+
const Audio$1 = 'Audio';
|
|
2749
|
+
const BrowserViewOverview = 'BrowserViewOverview';
|
|
2750
|
+
const Clock = 'Clock';
|
|
2751
|
+
const ColorPicker = 'ColorPicker';
|
|
2752
|
+
const DebugConsole = 'Debug Console';
|
|
2753
|
+
const DefineKeyBinding = 'DefineKeyBinding';
|
|
2754
|
+
const Dialog = 'Dialog';
|
|
2755
|
+
const DiffEditor = 'DiffEditor';
|
|
2756
|
+
const EditorCompletion = 'EditorCompletion';
|
|
2757
|
+
const EmptyEditor = 'EmptyEditor';
|
|
2758
|
+
const EditorError = 'EditorError';
|
|
2759
|
+
const EditorHover = 'EditorHover';
|
|
2760
|
+
const EditorImage = 'EditorImage';
|
|
2761
|
+
const EditorPlainText = 'EditorPlainText';
|
|
2762
|
+
const EditorText = 'Editor';
|
|
2763
|
+
const EditorWidgetError = 'EditorWidgetError';
|
|
2764
|
+
const Empty = 'Empty';
|
|
2765
|
+
const Error$2 = 'Error';
|
|
2766
|
+
const Explorer = 'Explorer';
|
|
2767
|
+
const ExtensionDetail = 'ExtensionDetail';
|
|
2768
|
+
const Extensions = 'Extensions';
|
|
2769
|
+
const FindWidget = 'FindWidget';
|
|
2770
|
+
const ImagePreview$1 = 'ImagePreview';
|
|
2771
|
+
const InlineDiffEditor = 'InlineDiffEditor';
|
|
2772
|
+
const Implementations = 'Implementations';
|
|
2773
|
+
const KeyBindings = 'KeyBindings';
|
|
2774
|
+
const Layout = 'Layout';
|
|
2775
|
+
const Main = 'Main';
|
|
2776
|
+
const MainTabs = 'MainTabs';
|
|
2777
|
+
const Output = 'Output';
|
|
2778
|
+
const Panel = 'Panel';
|
|
2779
|
+
const Problems = 'Problems';
|
|
2780
|
+
const QuickPick = 'QuickPick';
|
|
2781
|
+
const References = 'References';
|
|
2782
|
+
const RunAndDebug = 'Run And Debug';
|
|
2783
|
+
const ScreenCapture = 'ScreenCapture';
|
|
2784
|
+
const Search = 'Search';
|
|
2785
|
+
const SideBar$1 = 'SideBar';
|
|
2786
|
+
const SimpleBrowser = 'SimpleBrowser';
|
|
2787
|
+
const SourceControl = 'Source Control';
|
|
2788
|
+
const StatusBar$1 = 'StatusBar';
|
|
2789
|
+
const Storage = 'Storage';
|
|
2790
|
+
const Terminal = 'Terminal';
|
|
2791
|
+
const Terminals = 'Terminals';
|
|
2792
|
+
const TitleBar = 'TitleBar';
|
|
2793
|
+
const TitleBarButtons = 'TitleBarButtons';
|
|
2794
|
+
const TitleBarIcon = 'TitleBarIcon';
|
|
2795
|
+
const TitleBarMenuBar = 'TitleBarMenuBar';
|
|
2796
|
+
const Video = 'Video';
|
|
2797
|
+
const TitleBarTitle = 'TitleBarTitle';
|
|
2798
|
+
const About = 'About';
|
|
2799
|
+
const EditorSourceActions = 'EditorSourceActions';
|
|
2800
|
+
const E2eTests = 'E2eTests';
|
|
2801
|
+
const E2eTest = 'E2eTest';
|
|
2802
|
+
|
|
2803
|
+
const state$6 = {
|
|
2804
|
+
instances: Object.create(null),
|
|
2805
|
+
currentSideBarView: undefined,
|
|
2806
|
+
currentPanelView: undefined,
|
|
2807
|
+
modules: Object.create(null)
|
|
2257
2808
|
};
|
|
2258
2809
|
|
|
2259
2810
|
const handleWindowMessage = event => {
|
|
@@ -2262,6 +2813,7 @@ const handleWindowMessage = event => {
|
|
|
2262
2813
|
});
|
|
2263
2814
|
};
|
|
2264
2815
|
const main = async () => {
|
|
2816
|
+
state$6.modules[EditorCompletion] = ViewletEditorCompletion;
|
|
2265
2817
|
if (location.pathname.includes('/test')) {
|
|
2266
2818
|
window.addEventListener('message', handleWindowMessage);
|
|
2267
2819
|
}
|
|
@@ -2346,24 +2898,24 @@ const ConfirmPrompt_ipc = {
|
|
|
2346
2898
|
name: name$w
|
|
2347
2899
|
};
|
|
2348
2900
|
|
|
2349
|
-
const state$
|
|
2901
|
+
const state$5 = {
|
|
2350
2902
|
styleSheets: Object.create(null)
|
|
2351
2903
|
};
|
|
2352
|
-
const set$
|
|
2353
|
-
state$
|
|
2904
|
+
const set$3 = (id, sheet) => {
|
|
2905
|
+
state$5.styleSheets[id] = sheet;
|
|
2354
2906
|
};
|
|
2355
|
-
const get$
|
|
2356
|
-
return state$
|
|
2907
|
+
const get$4 = id => {
|
|
2908
|
+
return state$5.styleSheets[id];
|
|
2357
2909
|
};
|
|
2358
2910
|
|
|
2359
2911
|
const addCssStyleSheet = async (id, text) => {
|
|
2360
|
-
const existing = get$
|
|
2912
|
+
const existing = get$4(id);
|
|
2361
2913
|
if (existing) {
|
|
2362
2914
|
await existing.replace(text);
|
|
2363
2915
|
return;
|
|
2364
2916
|
}
|
|
2365
2917
|
const sheet = new CSSStyleSheet({});
|
|
2366
|
-
set$
|
|
2918
|
+
set$3(id, sheet);
|
|
2367
2919
|
await sheet.replace(text);
|
|
2368
2920
|
document.adoptedStyleSheets.push(sheet);
|
|
2369
2921
|
};
|
|
@@ -2427,48 +2979,29 @@ const Download_ipc = {
|
|
|
2427
2979
|
|
|
2428
2980
|
// based on https://github.com/microsoft/vscode/blob/5f87632829dc3ac80203e2377727935184399431/src/vs/base/browser/ui/aria/aria.ts (License MIT)
|
|
2429
2981
|
|
|
2430
|
-
const state$
|
|
2982
|
+
const state$4 = {
|
|
2431
2983
|
$AriaAlert1: undefined,
|
|
2432
2984
|
$AriaAlert2: undefined,
|
|
2433
2985
|
$AriaMessages: undefined
|
|
2434
2986
|
};
|
|
2435
2987
|
const getAriaAlert1 = () => {
|
|
2436
|
-
return state$
|
|
2988
|
+
return state$4.$AriaAlert1;
|
|
2437
2989
|
};
|
|
2438
2990
|
const getAriaAlert2 = () => {
|
|
2439
|
-
return state$
|
|
2991
|
+
return state$4.$AriaAlert2;
|
|
2440
2992
|
};
|
|
2441
2993
|
const setElements = ($AriaMessages, $AriaAlert1, $AriaAlert2) => {
|
|
2442
|
-
state$
|
|
2443
|
-
state$
|
|
2444
|
-
state$
|
|
2994
|
+
state$4.$AriaMessages = $AriaMessages;
|
|
2995
|
+
state$4.$AriaAlert1 = $AriaAlert1;
|
|
2996
|
+
state$4.$AriaAlert2 = $AriaAlert2;
|
|
2445
2997
|
};
|
|
2446
2998
|
const hasElements = () => {
|
|
2447
|
-
return state$
|
|
2999
|
+
return state$4.$AriaMessages;
|
|
2448
3000
|
};
|
|
2449
3001
|
|
|
2450
3002
|
const True = 'true';
|
|
2451
3003
|
const False = 'false';
|
|
2452
3004
|
|
|
2453
|
-
const Alert = 'alert';
|
|
2454
|
-
const Application = 'application';
|
|
2455
|
-
const Code = 'code';
|
|
2456
|
-
const Complementary = 'complementary';
|
|
2457
|
-
const ContentInfo = 'contentinfo';
|
|
2458
|
-
const Group = 'group';
|
|
2459
|
-
const List$1 = 'list';
|
|
2460
|
-
const ListBox = 'listbox';
|
|
2461
|
-
const Log = 'log';
|
|
2462
|
-
const Main$1 = 'main';
|
|
2463
|
-
const Menu = 'menu';
|
|
2464
|
-
const None$2 = 'none';
|
|
2465
|
-
const Status = 'status';
|
|
2466
|
-
const TabList = 'tablist';
|
|
2467
|
-
const TextBox = 'textbox';
|
|
2468
|
-
const ToolBar = 'toolbar';
|
|
2469
|
-
const Tree = 'tree';
|
|
2470
|
-
const ComboBox = 'combobox';
|
|
2471
|
-
|
|
2472
3005
|
const AriaOwns = 'aria-owns';
|
|
2473
3006
|
const AriaLabelledBy = 'aria-labelledby';
|
|
2474
3007
|
const AriaDescribedBy = 'aria-describedby';
|
|
@@ -2520,52 +3053,6 @@ const AriaAlert = {
|
|
|
2520
3053
|
alert: alert$1
|
|
2521
3054
|
};
|
|
2522
3055
|
|
|
2523
|
-
// TODO this file is not needed when all elements are position fixed
|
|
2524
|
-
const state$5 = {
|
|
2525
|
-
isInDom: false,
|
|
2526
|
-
$PreviousFocusElement: undefined,
|
|
2527
|
-
widgetSet: new Set(),
|
|
2528
|
-
$Widgets: undefined
|
|
2529
|
-
};
|
|
2530
|
-
const create$Widgets = () => {
|
|
2531
|
-
const $Widgets = document.createElement('div');
|
|
2532
|
-
$Widgets.id = 'Widgets';
|
|
2533
|
-
$Widgets.className = 'Widgets';
|
|
2534
|
-
return $Widgets;
|
|
2535
|
-
};
|
|
2536
|
-
const append$1 = $Element => {
|
|
2537
|
-
// TODO should not call append in the first place if it is already in dom
|
|
2538
|
-
if (state$5.widgetSet.has($Element)) {
|
|
2539
|
-
return;
|
|
2540
|
-
}
|
|
2541
|
-
state$5.widgetSet.add($Element);
|
|
2542
|
-
if (state$5.$Widgets) {
|
|
2543
|
-
// @ts-expect-error
|
|
2544
|
-
state$5.$Widgets.append($Element);
|
|
2545
|
-
} else {
|
|
2546
|
-
// @ts-expect-error
|
|
2547
|
-
state$5.$Widgets = create$Widgets();
|
|
2548
|
-
// @ts-expect-error
|
|
2549
|
-
state$5.$Widgets.append($Element);
|
|
2550
|
-
// @ts-expect-error
|
|
2551
|
-
document.body.append(state$5.$Widgets);
|
|
2552
|
-
}
|
|
2553
|
-
};
|
|
2554
|
-
const remove$1 = $Element => {
|
|
2555
|
-
if (!$Element) {
|
|
2556
|
-
// TODO $Element should always be defined
|
|
2557
|
-
return;
|
|
2558
|
-
}
|
|
2559
|
-
state$5.widgetSet.delete($Element);
|
|
2560
|
-
$Element.remove();
|
|
2561
|
-
// TODO state.$Widgets should always be defined at this point
|
|
2562
|
-
if (state$5.widgetSet.size === 0 && state$5.$Widgets) {
|
|
2563
|
-
// @ts-expect-error
|
|
2564
|
-
state$5.$Widgets.remove();
|
|
2565
|
-
state$5.$Widgets = undefined;
|
|
2566
|
-
}
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
3056
|
// TODO not sure whether created dom node
|
|
2570
3057
|
// should stay in state or be removed
|
|
2571
3058
|
// one option would result in less memory usage
|
|
@@ -2576,7 +3063,7 @@ const remove$1 = $Element => {
|
|
|
2576
3063
|
// but that's difficult to know
|
|
2577
3064
|
|
|
2578
3065
|
// TODO hide widget after timeout or mousemove
|
|
2579
|
-
const create$
|
|
3066
|
+
const create$I = (message, x, y) => {
|
|
2580
3067
|
const $EditorError = document.createElement('div');
|
|
2581
3068
|
$EditorError.className = 'EditorWidgetError';
|
|
2582
3069
|
$EditorError.textContent = message;
|
|
@@ -2591,7 +3078,7 @@ const create$J = (message, x, y) => {
|
|
|
2591
3078
|
|
|
2592
3079
|
const name$s = 'EditorError';
|
|
2593
3080
|
const Commands$t = {
|
|
2594
|
-
create: create$
|
|
3081
|
+
create: create$I
|
|
2595
3082
|
};
|
|
2596
3083
|
|
|
2597
3084
|
const EditorError_ipc = {
|
|
@@ -2600,7 +3087,7 @@ const EditorError_ipc = {
|
|
|
2600
3087
|
name: name$s
|
|
2601
3088
|
};
|
|
2602
3089
|
|
|
2603
|
-
const state$
|
|
3090
|
+
const state$3 = {
|
|
2604
3091
|
/**
|
|
2605
3092
|
* @type {HTMLElement|undefined}
|
|
2606
3093
|
*/
|
|
@@ -2608,10 +3095,10 @@ const state$4 = {
|
|
|
2608
3095
|
currentFocus: ''
|
|
2609
3096
|
};
|
|
2610
3097
|
const setElement = $Element => {
|
|
2611
|
-
state$
|
|
3098
|
+
state$3.$PreviousFocusElement = $Element;
|
|
2612
3099
|
};
|
|
2613
3100
|
const getElement = () => {
|
|
2614
|
-
return state$
|
|
3101
|
+
return state$3.$PreviousFocusElement;
|
|
2615
3102
|
};
|
|
2616
3103
|
|
|
2617
3104
|
const focus$i = $Element => {
|
|
@@ -2623,7 +3110,7 @@ const focus$i = $Element => {
|
|
|
2623
3110
|
preventScroll: true
|
|
2624
3111
|
});
|
|
2625
3112
|
};
|
|
2626
|
-
const focusPrevious
|
|
3113
|
+
const focusPrevious = () => {
|
|
2627
3114
|
const $Element = getElement();
|
|
2628
3115
|
if ($Element) {
|
|
2629
3116
|
// @ts-expect-error
|
|
@@ -2631,7 +3118,7 @@ const focusPrevious$1 = () => {
|
|
|
2631
3118
|
}
|
|
2632
3119
|
};
|
|
2633
3120
|
|
|
2634
|
-
const create$
|
|
3121
|
+
const create$H = () => {
|
|
2635
3122
|
const $InputBox = document.createElement('input');
|
|
2636
3123
|
$InputBox.className = 'InputBox';
|
|
2637
3124
|
$InputBox.spellcheck = false;
|
|
@@ -2642,47 +3129,6 @@ const create$I = () => {
|
|
|
2642
3129
|
return $InputBox;
|
|
2643
3130
|
};
|
|
2644
3131
|
|
|
2645
|
-
const setBounds$6 = ($Element, x, y, width, height) => {
|
|
2646
|
-
$Element.style.top = `${y}px`;
|
|
2647
|
-
$Element.style.left = `${x}px`;
|
|
2648
|
-
$Element.style.width = `${width}px`;
|
|
2649
|
-
$Element.style.height = `${height}px`;
|
|
2650
|
-
};
|
|
2651
|
-
const setYAndHeight = ($Element, y, height) => {
|
|
2652
|
-
if (!$Element) {
|
|
2653
|
-
return;
|
|
2654
|
-
}
|
|
2655
|
-
$Element.style.translate = typeof y === 'string' ? y : `0 ${y}px`;
|
|
2656
|
-
$Element.style.height = typeof height === 'string' ? height : `${height}px`;
|
|
2657
|
-
};
|
|
2658
|
-
const setXAndWidth = ($Element, x, width) => {
|
|
2659
|
-
$Element.style.translate = `${x}px 0`;
|
|
2660
|
-
$Element.style.width = `${width}px`;
|
|
2661
|
-
};
|
|
2662
|
-
const setTop = ($Element, top) => {
|
|
2663
|
-
$Element.style.top = `${top}px`;
|
|
2664
|
-
};
|
|
2665
|
-
const setWidth = ($Element, width) => {
|
|
2666
|
-
$Element.style.width = `${width}px`;
|
|
2667
|
-
};
|
|
2668
|
-
const setXAndY = ($Element, x, y) => {
|
|
2669
|
-
$Element.style.left = `${x}px`;
|
|
2670
|
-
$Element.style.top = `${y}px`;
|
|
2671
|
-
};
|
|
2672
|
-
|
|
2673
|
-
/**
|
|
2674
|
-
*
|
|
2675
|
-
* @param {HTMLElement} $Element
|
|
2676
|
-
* @param {number} x
|
|
2677
|
-
* @param {number} y
|
|
2678
|
-
*/
|
|
2679
|
-
const setXAndYTransform = ($Element, x, y) => {
|
|
2680
|
-
$Element.style.translate = `${x}px ${y}px`;
|
|
2681
|
-
};
|
|
2682
|
-
const setHeight = ($Element, height) => {
|
|
2683
|
-
$Element.style.height = `${height}px`;
|
|
2684
|
-
};
|
|
2685
|
-
|
|
2686
3132
|
const FocusDebugInput = 6;
|
|
2687
3133
|
const FocusEditorRename = 11;
|
|
2688
3134
|
const FocusExplorerEditBox = 14;
|
|
@@ -2693,13 +3139,13 @@ const FocusSearchInput = 21;
|
|
|
2693
3139
|
const FocusSimpleBrowserInput = 23;
|
|
2694
3140
|
const FocusOutput = 28;
|
|
2695
3141
|
|
|
2696
|
-
const handleBlur$
|
|
3142
|
+
const handleBlur$9 = () => {
|
|
2697
3143
|
send( /* EditorRename.abort */'EditorRename.abort');
|
|
2698
3144
|
};
|
|
2699
|
-
const create$
|
|
2700
|
-
const $RenameWidgetInputBox = create$
|
|
3145
|
+
const create$G = (x, y) => {
|
|
3146
|
+
const $RenameWidgetInputBox = create$H();
|
|
2701
3147
|
$RenameWidgetInputBox.className = 'RenameWidgetInputBox';
|
|
2702
|
-
$RenameWidgetInputBox.onblur = handleBlur$
|
|
3148
|
+
$RenameWidgetInputBox.onblur = handleBlur$9;
|
|
2703
3149
|
const $RenameWidget = document.createElement('div');
|
|
2704
3150
|
$RenameWidget.className = 'RenameWidget';
|
|
2705
3151
|
$RenameWidget.append($RenameWidgetInputBox);
|
|
@@ -2712,7 +3158,7 @@ const create$H = (x, y) => {
|
|
|
2712
3158
|
$RenameWidgetInputBox
|
|
2713
3159
|
};
|
|
2714
3160
|
};
|
|
2715
|
-
const dispose$
|
|
3161
|
+
const dispose$h = state => {
|
|
2716
3162
|
// TODO focus editor
|
|
2717
3163
|
remove$1(state.$RenameWidget);
|
|
2718
3164
|
};
|
|
@@ -2728,8 +3174,8 @@ const finish = state => {
|
|
|
2728
3174
|
|
|
2729
3175
|
const name$r = 'EditorRename';
|
|
2730
3176
|
const Commands$s = {
|
|
2731
|
-
create: create$
|
|
2732
|
-
dispose: dispose$
|
|
3177
|
+
create: create$G,
|
|
3178
|
+
dispose: dispose$h,
|
|
2733
3179
|
finish: finish
|
|
2734
3180
|
};
|
|
2735
3181
|
|
|
@@ -2787,7 +3233,7 @@ const handleImageLoad = event => {
|
|
|
2787
3233
|
const height = $ImagePreviewImage.naturalHeight;
|
|
2788
3234
|
$ImagePreviewCaption.textContent = `${width} × ${height}`;
|
|
2789
3235
|
};
|
|
2790
|
-
const handleImageError
|
|
3236
|
+
const handleImageError = event => {
|
|
2791
3237
|
const $ImagePreviewImage = event.target;
|
|
2792
3238
|
const $ImagePreviewCaption = $ImagePreviewImage.nextSibling;
|
|
2793
3239
|
$ImagePreviewCaption.textContent = 'Image could not be loaded';
|
|
@@ -2814,7 +3260,7 @@ const showError = (message, y, x) => {
|
|
|
2814
3260
|
$ImagePreviewImage
|
|
2815
3261
|
};
|
|
2816
3262
|
};
|
|
2817
|
-
const create$
|
|
3263
|
+
const create$F = (uri, top, left) => {
|
|
2818
3264
|
const $ImagePreviewImage = document.createElement('img');
|
|
2819
3265
|
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
2820
3266
|
$ImagePreviewImage.src = uri;
|
|
@@ -2825,7 +3271,7 @@ const create$G = (uri, top, left) => {
|
|
|
2825
3271
|
$ImagePreview.className = 'ImagePreview';
|
|
2826
3272
|
$ImagePreview.append($ImagePreviewImage, $ImagePreviewCaption);
|
|
2827
3273
|
$ImagePreviewImage.onload = handleImageLoad;
|
|
2828
|
-
$ImagePreviewImage.onerror = handleImageError
|
|
3274
|
+
$ImagePreviewImage.onerror = handleImageError;
|
|
2829
3275
|
$ImagePreview.style.top = `${top}px`;
|
|
2830
3276
|
$ImagePreview.style.left = `${left}px`;
|
|
2831
3277
|
$ImagePreview.style.display = 'none';
|
|
@@ -2839,22 +3285,22 @@ const create$G = (uri, top, left) => {
|
|
|
2839
3285
|
const update = (state, uri) => {
|
|
2840
3286
|
state.$ImagePreviewImage.uri = uri;
|
|
2841
3287
|
};
|
|
2842
|
-
const dispose$
|
|
3288
|
+
const dispose$g = state => {
|
|
2843
3289
|
remove$1(state.$ImagePreview);
|
|
2844
3290
|
};
|
|
2845
3291
|
|
|
2846
|
-
const ImagePreview
|
|
3292
|
+
const ImagePreview = {
|
|
2847
3293
|
__proto__: null,
|
|
2848
|
-
create: create$
|
|
2849
|
-
dispose: dispose$
|
|
3294
|
+
create: create$F,
|
|
3295
|
+
dispose: dispose$g,
|
|
2850
3296
|
showError,
|
|
2851
3297
|
update
|
|
2852
3298
|
};
|
|
2853
3299
|
|
|
2854
3300
|
const name$o = 'ImagePreview';
|
|
2855
3301
|
const Commands$p = {
|
|
2856
|
-
create: create$
|
|
2857
|
-
dispose: dispose$
|
|
3302
|
+
create: create$F,
|
|
3303
|
+
dispose: dispose$g,
|
|
2858
3304
|
showError: showError,
|
|
2859
3305
|
update: update
|
|
2860
3306
|
};
|
|
@@ -3051,7 +3497,7 @@ const create$Notification = message => {
|
|
|
3051
3497
|
$Notification.textContent = message;
|
|
3052
3498
|
return $Notification;
|
|
3053
3499
|
};
|
|
3054
|
-
const create$
|
|
3500
|
+
const create$E = (type, message) => {
|
|
3055
3501
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
3056
3502
|
const $Notification = create$Notification(message);
|
|
3057
3503
|
append$1($Notification);
|
|
@@ -3096,7 +3542,7 @@ const createWithOptions = (type, message, options) => {
|
|
|
3096
3542
|
const $Notification = create$NotificationWithOptions(message, options);
|
|
3097
3543
|
append$1($Notification);
|
|
3098
3544
|
};
|
|
3099
|
-
const dispose$
|
|
3545
|
+
const dispose$f = id => {
|
|
3100
3546
|
// const $Notification = state.$Notifications
|
|
3101
3547
|
};
|
|
3102
3548
|
|
|
@@ -3104,9 +3550,9 @@ const name$g = 'Notification';
|
|
|
3104
3550
|
|
|
3105
3551
|
// prettier-ignore
|
|
3106
3552
|
const Commands$h = {
|
|
3107
|
-
create: create$
|
|
3553
|
+
create: create$E,
|
|
3108
3554
|
createWithOptions: createWithOptions,
|
|
3109
|
-
dispose: dispose$
|
|
3555
|
+
dispose: dispose$f
|
|
3110
3556
|
};
|
|
3111
3557
|
|
|
3112
3558
|
const Notification_ipc = {
|
|
@@ -3115,23 +3561,23 @@ const Notification_ipc = {
|
|
|
3115
3561
|
name: name$g
|
|
3116
3562
|
};
|
|
3117
3563
|
|
|
3118
|
-
const state$
|
|
3564
|
+
const state$2 = {
|
|
3119
3565
|
canvasObjects: Object.create(null)
|
|
3120
3566
|
};
|
|
3121
|
-
const get$
|
|
3122
|
-
return state$
|
|
3567
|
+
const get$3 = id => {
|
|
3568
|
+
return state$2.canvasObjects[id];
|
|
3123
3569
|
};
|
|
3124
|
-
const set$
|
|
3125
|
-
state$
|
|
3570
|
+
const set$2 = (canvasId, canvas) => {
|
|
3571
|
+
state$2.canvasObjects[canvasId] = canvas;
|
|
3126
3572
|
};
|
|
3127
3573
|
|
|
3128
|
-
const get$
|
|
3129
|
-
return get$
|
|
3574
|
+
const get$2 = id => {
|
|
3575
|
+
return get$3(id);
|
|
3130
3576
|
};
|
|
3131
|
-
const create$
|
|
3577
|
+
const create$D = (canvasId, callbackId) => {
|
|
3132
3578
|
const canvas = document.createElement('canvas');
|
|
3133
3579
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3134
|
-
set$
|
|
3580
|
+
set$2(canvasId, canvas);
|
|
3135
3581
|
sendAndTransfer({
|
|
3136
3582
|
jsonrpc: '2.0',
|
|
3137
3583
|
id: callbackId,
|
|
@@ -3143,78 +3589,41 @@ const name$f = 'OffscreenCanvas';
|
|
|
3143
3589
|
|
|
3144
3590
|
// prettier-ignore
|
|
3145
3591
|
const Commands$g = {
|
|
3146
|
-
create: create$
|
|
3147
|
-
};
|
|
3148
|
-
|
|
3149
|
-
const OffscreenCanvas_ipc = {
|
|
3150
|
-
__proto__: null,
|
|
3151
|
-
Commands: Commands$g,
|
|
3152
|
-
name: name$f
|
|
3153
|
-
};
|
|
3154
|
-
|
|
3155
|
-
// TODO this module should be called dom or dom utils
|
|
3156
|
-
|
|
3157
|
-
// TODO this module makes for weird code splitting chunks,
|
|
3158
|
-
// maybe duplicate the code per file for better chunks
|
|
3159
|
-
|
|
3160
|
-
const findIndex = ($Container, $Target) => {
|
|
3161
|
-
while ($Target && $Target.parentNode !== $Container) {
|
|
3162
|
-
$Target = $Target.parentNode;
|
|
3163
|
-
}
|
|
3164
|
-
if (!$Target) {
|
|
3165
|
-
return -1;
|
|
3166
|
-
}
|
|
3167
|
-
for (let i = 0; i < $Container.children.length; i++) {
|
|
3168
|
-
if ($Container.children[i] === $Target) {
|
|
3169
|
-
return i;
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
|
-
return -1;
|
|
3173
|
-
};
|
|
3174
|
-
|
|
3175
|
-
const create$BackDrop = () => {
|
|
3176
|
-
const $BackDrop = document.createElement('div');
|
|
3177
|
-
$BackDrop.className = 'BackDrop';
|
|
3178
|
-
return $BackDrop;
|
|
3592
|
+
create: create$D
|
|
3593
|
+
};
|
|
3594
|
+
|
|
3595
|
+
const OffscreenCanvas_ipc = {
|
|
3596
|
+
__proto__: null,
|
|
3597
|
+
Commands: Commands$g,
|
|
3598
|
+
name: name$f
|
|
3599
|
+
};
|
|
3600
|
+
|
|
3601
|
+
// TODO this module should be called dom or dom utils
|
|
3602
|
+
|
|
3603
|
+
// TODO this module makes for weird code splitting chunks,
|
|
3604
|
+
// maybe duplicate the code per file for better chunks
|
|
3605
|
+
|
|
3606
|
+
const findIndex = ($Container, $Target) => {
|
|
3607
|
+
while ($Target && $Target.parentNode !== $Container) {
|
|
3608
|
+
$Target = $Target.parentNode;
|
|
3609
|
+
}
|
|
3610
|
+
if (!$Target) {
|
|
3611
|
+
return -1;
|
|
3612
|
+
}
|
|
3613
|
+
for (let i = 0; i < $Container.children.length; i++) {
|
|
3614
|
+
if ($Container.children[i] === $Target) {
|
|
3615
|
+
return i;
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
return -1;
|
|
3619
|
+
};
|
|
3620
|
+
|
|
3621
|
+
const create$BackDrop = () => {
|
|
3622
|
+
const $BackDrop = document.createElement('div');
|
|
3623
|
+
$BackDrop.className = 'BackDrop';
|
|
3624
|
+
return $BackDrop;
|
|
3179
3625
|
};
|
|
3180
3626
|
|
|
3181
|
-
const BeforeInput = 'beforeinput';
|
|
3182
|
-
const Blur = 'blur';
|
|
3183
|
-
const Click = 'click';
|
|
3184
|
-
const CompositionEnd = 'compositionend';
|
|
3185
|
-
const CompositionStart = 'compositionstart';
|
|
3186
|
-
const CompositionUpdate = 'compositionupdate';
|
|
3187
|
-
const ContextMenu = 'contextmenu';
|
|
3188
|
-
const Cut = 'cut';
|
|
3189
|
-
const DoubleClick = 'dblclick';
|
|
3190
|
-
const DragEnd = 'dragend';
|
|
3191
|
-
const DragLeave = 'dragleave';
|
|
3192
|
-
const DragOver = 'dragover';
|
|
3193
|
-
const DragStart = 'dragstart';
|
|
3194
|
-
const Drop = 'drop';
|
|
3195
|
-
const Error$3 = 'error';
|
|
3196
|
-
const Focus = 'focus';
|
|
3197
|
-
const FocusIn = 'focusin';
|
|
3198
|
-
const FocusOut = 'focusout';
|
|
3199
|
-
const Input = 'input';
|
|
3200
|
-
const KeyDown = 'keydown';
|
|
3201
|
-
const KeyUp = 'keyup';
|
|
3202
|
-
const LostPointerCapture = 'lostpointercapture';
|
|
3203
|
-
const MouseDown = 'mousedown';
|
|
3204
|
-
const MouseEnter = 'mouseenter';
|
|
3205
|
-
const MouseLeave = 'mouseleave';
|
|
3206
|
-
const MouseUp = 'mouseup';
|
|
3207
|
-
const Paste = 'paste';
|
|
3208
|
-
const PointerDown = 'pointerdown';
|
|
3209
|
-
const PointerMove = 'pointermove';
|
|
3210
|
-
const PointerUp = 'pointerup';
|
|
3211
|
-
const Resize = 'resize';
|
|
3212
|
-
const Scroll = 'scroll';
|
|
3213
|
-
const TouchEnd = 'touchend';
|
|
3214
|
-
const TouchMove = 'touchmove';
|
|
3215
|
-
const TouchStart = 'touchstart';
|
|
3216
|
-
const Wheel = 'wheel';
|
|
3217
|
-
|
|
3218
3627
|
// TODO when pressing tab -> focus next element in tab order and close menu
|
|
3219
3628
|
|
|
3220
3629
|
// TODO menu and contextmenu should have own keybinding logic
|
|
@@ -3242,7 +3651,7 @@ const Wheel = 'wheel';
|
|
|
3242
3651
|
|
|
3243
3652
|
// TODO keyboard handling
|
|
3244
3653
|
|
|
3245
|
-
const state$
|
|
3654
|
+
const state$1 = {
|
|
3246
3655
|
handleKeyDown(event) {},
|
|
3247
3656
|
handleFocusOut(event) {},
|
|
3248
3657
|
$$Menus: [],
|
|
@@ -3253,9 +3662,9 @@ const state$2 = {
|
|
|
3253
3662
|
};
|
|
3254
3663
|
const getLevel = $Menu => {
|
|
3255
3664
|
// @ts-expect-error
|
|
3256
|
-
return state$
|
|
3665
|
+
return state$1.$$Menus.indexOf($Menu);
|
|
3257
3666
|
};
|
|
3258
|
-
const handleMouseDown$
|
|
3667
|
+
const handleMouseDown$3 = event => {
|
|
3259
3668
|
const $Target = event.target;
|
|
3260
3669
|
const $Menu = $Target.closest('.Menu');
|
|
3261
3670
|
const index = findIndex($Menu, $Target);
|
|
@@ -3318,11 +3727,11 @@ const handleMouseLeave$1 = event => {
|
|
|
3318
3727
|
};
|
|
3319
3728
|
|
|
3320
3729
|
// const handleBlur = (event) => {}
|
|
3321
|
-
const handleKeyDown$
|
|
3322
|
-
state$
|
|
3730
|
+
const handleKeyDown$4 = event => {
|
|
3731
|
+
state$1.handleKeyDown(event);
|
|
3323
3732
|
};
|
|
3324
3733
|
const handleFocusOut$1 = event => {
|
|
3325
|
-
state$
|
|
3734
|
+
state$1.handleFocusOut(event);
|
|
3326
3735
|
};
|
|
3327
3736
|
const create$Menu$1 = () => {
|
|
3328
3737
|
// TODO set aria label on menu (e.g. File, Edit, Selection)
|
|
@@ -3332,7 +3741,7 @@ const create$Menu$1 = () => {
|
|
|
3332
3741
|
$Menu.tabIndex = -1;
|
|
3333
3742
|
// $ContextMenu.onmousedown = contextMenuHandleMouseDown
|
|
3334
3743
|
// TODO mousedown vs click? (click is usually better but mousedown is faster, why wait 100ms?)
|
|
3335
|
-
$Menu.addEventListener(MouseDown, handleMouseDown$
|
|
3744
|
+
$Menu.addEventListener(MouseDown, handleMouseDown$3);
|
|
3336
3745
|
$Menu.addEventListener(MouseEnter, handleMouseEnter$1, {
|
|
3337
3746
|
capture: true
|
|
3338
3747
|
});
|
|
@@ -3342,15 +3751,15 @@ const create$Menu$1 = () => {
|
|
|
3342
3751
|
// $Menu.addEventListener('mousemove', handleMouseMove, {
|
|
3343
3752
|
// passive: true,
|
|
3344
3753
|
// })
|
|
3345
|
-
$Menu.onkeydown = handleKeyDown$
|
|
3754
|
+
$Menu.onkeydown = handleKeyDown$4;
|
|
3346
3755
|
$Menu.addEventListener(FocusOut, handleFocusOut$1);
|
|
3347
|
-
$Menu.oncontextmenu = handleContextMenu$
|
|
3756
|
+
$Menu.oncontextmenu = handleContextMenu$b;
|
|
3348
3757
|
// $ContextMenu.onfocus = handleFocus
|
|
3349
3758
|
// $ContextMenu.onblur = handleBlur
|
|
3350
3759
|
return $Menu;
|
|
3351
3760
|
};
|
|
3352
3761
|
const focusIndex = (level, oldFocusedIndex, newFocusedIndex) => {
|
|
3353
|
-
const $Menu = state$
|
|
3762
|
+
const $Menu = state$1.$$Menus[level];
|
|
3354
3763
|
if (oldFocusedIndex !== -1) {
|
|
3355
3764
|
// @ts-expect-error
|
|
3356
3765
|
$Menu.children[oldFocusedIndex].classList.remove('MenuItemFocused');
|
|
@@ -3373,16 +3782,16 @@ const handleBackDropMouseDown = event => {
|
|
|
3373
3782
|
stopPropagation(event);
|
|
3374
3783
|
send( /* Menu.hide */'Menu.hide');
|
|
3375
3784
|
};
|
|
3376
|
-
const handleContextMenu$
|
|
3785
|
+
const handleContextMenu$b = event => {
|
|
3377
3786
|
preventDefault(event);
|
|
3378
3787
|
};
|
|
3379
3788
|
const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mouseBlocking = false) => {
|
|
3380
3789
|
if (mouseBlocking) {
|
|
3381
3790
|
const $BackDrop = create$BackDrop();
|
|
3382
3791
|
$BackDrop.onmousedown = handleBackDropMouseDown;
|
|
3383
|
-
$BackDrop.oncontextmenu = handleContextMenu$
|
|
3792
|
+
$BackDrop.oncontextmenu = handleContextMenu$b;
|
|
3384
3793
|
// @ts-expect-error
|
|
3385
|
-
state$
|
|
3794
|
+
state$1.$BackDrop = $BackDrop;
|
|
3386
3795
|
append$1($BackDrop);
|
|
3387
3796
|
}
|
|
3388
3797
|
const $Menu = create$Menu$1();
|
|
@@ -3390,7 +3799,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
3390
3799
|
setXAndY($Menu, x, y);
|
|
3391
3800
|
$Menu.id = `Menu-${level}`;
|
|
3392
3801
|
if (parentIndex !== -1) {
|
|
3393
|
-
const $ParentMenu = state$
|
|
3802
|
+
const $ParentMenu = state$1.$$Menus[level - 1];
|
|
3394
3803
|
// @ts-expect-error
|
|
3395
3804
|
const $ParentMenuItem = $ParentMenu.children[parentIndex];
|
|
3396
3805
|
$ParentMenuItem.ariaExpanded = True;
|
|
@@ -3398,7 +3807,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
3398
3807
|
}
|
|
3399
3808
|
|
|
3400
3809
|
// @ts-expect-error
|
|
3401
|
-
state$
|
|
3810
|
+
state$1.$$Menus.push($Menu);
|
|
3402
3811
|
append$1($Menu);
|
|
3403
3812
|
if (level === 0) {
|
|
3404
3813
|
focus$i($Menu);
|
|
@@ -3406,7 +3815,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
3406
3815
|
}
|
|
3407
3816
|
};
|
|
3408
3817
|
const hideSubMenu = level => {
|
|
3409
|
-
const $$ChildMenus = state$
|
|
3818
|
+
const $$ChildMenus = state$1.$$Menus.slice(level);
|
|
3410
3819
|
for (const $ChildMenu of $$ChildMenus) {
|
|
3411
3820
|
remove$1($ChildMenu);
|
|
3412
3821
|
}
|
|
@@ -3451,9 +3860,9 @@ const showControlled = ({
|
|
|
3451
3860
|
// TODO menu should not necessarily know about parent (titleBarMenuBar)
|
|
3452
3861
|
// it should be the other way around
|
|
3453
3862
|
// @ts-expect-error
|
|
3454
|
-
state$
|
|
3455
|
-
state$
|
|
3456
|
-
state$
|
|
3863
|
+
state$1.$Parent = $Parent;
|
|
3864
|
+
state$1.handleFocusOut = handleFocusOut;
|
|
3865
|
+
state$1.handleKeyDown = handleKeyDown;
|
|
3457
3866
|
if ($Parent) {
|
|
3458
3867
|
// state.$Menu.ariaLabel=''
|
|
3459
3868
|
// state.$Menu.ariaLabelledBy =$Parent.id
|
|
@@ -3465,17 +3874,17 @@ const showControlled = ({
|
|
|
3465
3874
|
// TODO have function to show submenu
|
|
3466
3875
|
|
|
3467
3876
|
const hide = (restoreFocus = true) => {
|
|
3468
|
-
for (const $Menu of state$
|
|
3877
|
+
for (const $Menu of state$1.$$Menus) {
|
|
3469
3878
|
remove$1($Menu);
|
|
3470
3879
|
}
|
|
3471
|
-
state$
|
|
3472
|
-
if (state$
|
|
3473
|
-
remove$1(state$
|
|
3474
|
-
state$
|
|
3880
|
+
state$1.$$Menus = [];
|
|
3881
|
+
if (state$1.$BackDrop) {
|
|
3882
|
+
remove$1(state$1.$BackDrop);
|
|
3883
|
+
state$1.$BackDrop = undefined;
|
|
3475
3884
|
}
|
|
3476
3885
|
// TODO focus previous item
|
|
3477
3886
|
if (restoreFocus) {
|
|
3478
|
-
focusPrevious
|
|
3887
|
+
focusPrevious();
|
|
3479
3888
|
}
|
|
3480
3889
|
};
|
|
3481
3890
|
|
|
@@ -3576,34 +3985,34 @@ const Prompt_ipc = {
|
|
|
3576
3985
|
};
|
|
3577
3986
|
|
|
3578
3987
|
const screenCaptures = Object.create(null);
|
|
3579
|
-
const get$
|
|
3988
|
+
const get$1 = id => {
|
|
3580
3989
|
return screenCaptures[id];
|
|
3581
3990
|
};
|
|
3582
|
-
const set$
|
|
3991
|
+
const set$1 = (id, captureStream) => {
|
|
3583
3992
|
screenCaptures[id] = captureStream;
|
|
3584
3993
|
};
|
|
3585
3994
|
const remove = id => {
|
|
3586
3995
|
delete screenCaptures[id];
|
|
3587
3996
|
};
|
|
3588
3997
|
|
|
3589
|
-
const get
|
|
3998
|
+
const get = id => {
|
|
3590
3999
|
number(id);
|
|
3591
|
-
return get$
|
|
4000
|
+
return get$1(id);
|
|
3592
4001
|
};
|
|
3593
4002
|
const start = async (id, options) => {
|
|
3594
4003
|
try {
|
|
3595
4004
|
number(id);
|
|
3596
4005
|
object(options);
|
|
3597
4006
|
const captureStream = await navigator.mediaDevices.getUserMedia(options);
|
|
3598
|
-
set$
|
|
4007
|
+
set$1(id, captureStream);
|
|
3599
4008
|
} catch (error) {
|
|
3600
4009
|
throw new VError$1(error, `Failed to start screen capture`);
|
|
3601
4010
|
}
|
|
3602
4011
|
};
|
|
3603
|
-
const dispose$
|
|
4012
|
+
const dispose$e = async (id, options) => {
|
|
3604
4013
|
try {
|
|
3605
4014
|
number(id);
|
|
3606
|
-
const captureStream = get$
|
|
4015
|
+
const captureStream = get$1(id);
|
|
3607
4016
|
for (const track of captureStream.getTracks()) {
|
|
3608
4017
|
track.stop();
|
|
3609
4018
|
}
|
|
@@ -3615,7 +4024,7 @@ const dispose$f = async (id, options) => {
|
|
|
3615
4024
|
|
|
3616
4025
|
const name$a = 'ScreenCapture';
|
|
3617
4026
|
const Commands$b = {
|
|
3618
|
-
dispose: dispose$
|
|
4027
|
+
dispose: dispose$e,
|
|
3619
4028
|
start: start
|
|
3620
4029
|
};
|
|
3621
4030
|
|
|
@@ -4166,18 +4575,14 @@ const Transferrable_ipc = {
|
|
|
4166
4575
|
name: name$8
|
|
4167
4576
|
};
|
|
4168
4577
|
|
|
4169
|
-
const
|
|
4170
|
-
const get = getComponentUid;
|
|
4171
|
-
const fromEvent = getComponentUidFromEvent;
|
|
4172
|
-
|
|
4173
|
-
const state$1 = {
|
|
4578
|
+
const state = {
|
|
4174
4579
|
identifiers: new Uint32Array()
|
|
4175
4580
|
};
|
|
4176
4581
|
const setIdentifiers$1 = identifiers => {
|
|
4177
|
-
state
|
|
4582
|
+
state.identifiers = identifiers;
|
|
4178
4583
|
};
|
|
4179
4584
|
const getIdentifiers = () => {
|
|
4180
|
-
return state
|
|
4585
|
+
return state.identifiers;
|
|
4181
4586
|
};
|
|
4182
4587
|
|
|
4183
4588
|
// TODO store keybindings as json somewhere
|
|
@@ -4197,66 +4602,10 @@ const setIdentifiers = identifiers => {
|
|
|
4197
4602
|
|
|
4198
4603
|
const rememberFocus = rememberFocus$1;
|
|
4199
4604
|
|
|
4200
|
-
const ActivityBar = 'ActivityBar';
|
|
4201
|
-
const Audio$1 = 'Audio';
|
|
4202
|
-
const BrowserViewOverview = 'BrowserViewOverview';
|
|
4203
|
-
const Clock = 'Clock';
|
|
4204
|
-
const ColorPicker = 'ColorPicker';
|
|
4205
|
-
const DebugConsole = 'Debug Console';
|
|
4206
|
-
const DefineKeyBinding = 'DefineKeyBinding';
|
|
4207
|
-
const Dialog = 'Dialog';
|
|
4208
|
-
const DiffEditor = 'DiffEditor';
|
|
4209
|
-
const EditorCompletion = 'EditorCompletion';
|
|
4210
|
-
const EmptyEditor = 'EmptyEditor';
|
|
4211
|
-
const EditorError = 'EditorError';
|
|
4212
|
-
const EditorHover = 'EditorHover';
|
|
4213
|
-
const EditorImage = 'EditorImage';
|
|
4214
|
-
const EditorPlainText = 'EditorPlainText';
|
|
4215
|
-
const EditorText = 'Editor';
|
|
4216
|
-
const EditorWidgetError = 'EditorWidgetError';
|
|
4217
|
-
const Empty = 'Empty';
|
|
4218
|
-
const Error$2 = 'Error';
|
|
4219
|
-
const Explorer = 'Explorer';
|
|
4220
|
-
const ExtensionDetail = 'ExtensionDetail';
|
|
4221
|
-
const Extensions = 'Extensions';
|
|
4222
|
-
const FindWidget = 'FindWidget';
|
|
4223
|
-
const ImagePreview = 'ImagePreview';
|
|
4224
|
-
const InlineDiffEditor = 'InlineDiffEditor';
|
|
4225
|
-
const Implementations = 'Implementations';
|
|
4226
|
-
const KeyBindings = 'KeyBindings';
|
|
4227
|
-
const Layout = 'Layout';
|
|
4228
|
-
const Main = 'Main';
|
|
4229
|
-
const MainTabs = 'MainTabs';
|
|
4230
|
-
const Output = 'Output';
|
|
4231
|
-
const Panel = 'Panel';
|
|
4232
|
-
const Problems = 'Problems';
|
|
4233
|
-
const QuickPick = 'QuickPick';
|
|
4234
|
-
const References = 'References';
|
|
4235
|
-
const RunAndDebug = 'Run And Debug';
|
|
4236
|
-
const ScreenCapture = 'ScreenCapture';
|
|
4237
|
-
const Search = 'Search';
|
|
4238
|
-
const SideBar$1 = 'SideBar';
|
|
4239
|
-
const SimpleBrowser = 'SimpleBrowser';
|
|
4240
|
-
const SourceControl = 'Source Control';
|
|
4241
|
-
const StatusBar$1 = 'StatusBar';
|
|
4242
|
-
const Storage = 'Storage';
|
|
4243
|
-
const Terminal = 'Terminal';
|
|
4244
|
-
const Terminals = 'Terminals';
|
|
4245
|
-
const TitleBar = 'TitleBar';
|
|
4246
|
-
const TitleBarButtons = 'TitleBarButtons';
|
|
4247
|
-
const TitleBarIcon = 'TitleBarIcon';
|
|
4248
|
-
const TitleBarMenuBar = 'TitleBarMenuBar';
|
|
4249
|
-
const Video = 'Video';
|
|
4250
|
-
const TitleBarTitle = 'TitleBarTitle';
|
|
4251
|
-
const About = 'About';
|
|
4252
|
-
const EditorSourceActions = 'EditorSourceActions';
|
|
4253
|
-
const E2eTests = 'E2eTests';
|
|
4254
|
-
const E2eTest = 'E2eTest';
|
|
4255
|
-
|
|
4256
4605
|
const load = moduleId => {
|
|
4257
4606
|
switch (moduleId) {
|
|
4258
|
-
case ImagePreview:
|
|
4259
|
-
return Promise.resolve().then(function () { return ImagePreview
|
|
4607
|
+
case ImagePreview$1:
|
|
4608
|
+
return Promise.resolve().then(function () { return ImagePreview; });
|
|
4260
4609
|
case ActivityBar:
|
|
4261
4610
|
return Promise.resolve().then(function () { return ViewletActivityBar; });
|
|
4262
4611
|
case Audio$1:
|
|
@@ -4370,43 +4719,36 @@ const load = moduleId => {
|
|
|
4370
4719
|
}
|
|
4371
4720
|
};
|
|
4372
4721
|
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4375
|
-
currentSideBarView: undefined,
|
|
4376
|
-
currentPanelView: undefined,
|
|
4377
|
-
modules: Object.create(null)
|
|
4378
|
-
};
|
|
4379
|
-
|
|
4380
|
-
const create$D = (id, uid = id) => {
|
|
4381
|
-
const module = state.modules[id];
|
|
4722
|
+
const create$C = (id, uid = id) => {
|
|
4723
|
+
const module = state$6.modules[id];
|
|
4382
4724
|
if (!module) {
|
|
4383
4725
|
throw new Error(`module not found: ${id}`);
|
|
4384
4726
|
}
|
|
4385
|
-
if (state.instances[id]?.state.$Viewlet.isConnected) {
|
|
4386
|
-
state.instances[id].state.$Viewlet.remove();
|
|
4727
|
+
if (state$6.instances[id]?.state.$Viewlet.isConnected) {
|
|
4728
|
+
state$6.instances[id].state.$Viewlet.remove();
|
|
4387
4729
|
}
|
|
4388
4730
|
const instanceState = module.create();
|
|
4389
|
-
set$
|
|
4731
|
+
set$4(instanceState.$Viewlet, uid);
|
|
4390
4732
|
if (module.attachEvents) {
|
|
4391
4733
|
module.attachEvents(instanceState);
|
|
4392
4734
|
}
|
|
4393
|
-
state.instances[uid] = {
|
|
4735
|
+
state$6.instances[uid] = {
|
|
4394
4736
|
state: instanceState,
|
|
4395
4737
|
factory: module
|
|
4396
4738
|
};
|
|
4397
4739
|
};
|
|
4398
4740
|
const createFunctionalRoot = (id, uid = id) => {
|
|
4399
|
-
const module = state.modules[id];
|
|
4741
|
+
const module = state$6.modules[id];
|
|
4400
4742
|
if (!module) {
|
|
4401
4743
|
throw new Error(`module not found: ${id}`);
|
|
4402
4744
|
}
|
|
4403
|
-
if (state.instances[id]?.state.$Viewlet.isConnected) {
|
|
4404
|
-
state.instances[id].state.$Viewlet.remove();
|
|
4745
|
+
if (state$6.instances[id]?.state.$Viewlet.isConnected) {
|
|
4746
|
+
state$6.instances[id].state.$Viewlet.remove();
|
|
4405
4747
|
}
|
|
4406
4748
|
const instanceState = {
|
|
4407
4749
|
$Viewlet: document.createElement('div')
|
|
4408
4750
|
};
|
|
4409
|
-
state.instances[uid] = {
|
|
4751
|
+
state$6.instances[uid] = {
|
|
4410
4752
|
state: instanceState,
|
|
4411
4753
|
factory: module
|
|
4412
4754
|
};
|
|
@@ -4422,14 +4764,14 @@ const removeKeyBindings = id => {
|
|
|
4422
4764
|
const loadModule = async id => {
|
|
4423
4765
|
try {
|
|
4424
4766
|
const module = await load(id);
|
|
4425
|
-
state.modules[id] = module;
|
|
4767
|
+
state$6.modules[id] = module;
|
|
4426
4768
|
} catch (error) {
|
|
4427
4769
|
throw new VError$1(error, `Failed to load ${id}`);
|
|
4428
4770
|
}
|
|
4429
4771
|
};
|
|
4430
4772
|
const invoke = (viewletId, method, ...args) => {
|
|
4431
4773
|
string(method);
|
|
4432
|
-
const instance = state.instances[viewletId];
|
|
4774
|
+
const instance = state$6.instances[viewletId];
|
|
4433
4775
|
if (!instance?.factory) {
|
|
4434
4776
|
if (viewletId && method !== 'setActionsDom') {
|
|
4435
4777
|
warn(`cannot execute ${method} viewlet instance ${viewletId} not found`);
|
|
@@ -4443,7 +4785,7 @@ const invoke = (viewletId, method, ...args) => {
|
|
|
4443
4785
|
return instance.factory[method](instance.state, ...args);
|
|
4444
4786
|
};
|
|
4445
4787
|
const focus$h = viewletId => {
|
|
4446
|
-
const instance = state.instances[viewletId];
|
|
4788
|
+
const instance = state$6.instances[viewletId];
|
|
4447
4789
|
if (instance.factory?.setFocused) {
|
|
4448
4790
|
instance.factory.setFocused(instance.state, true);
|
|
4449
4791
|
} else if (instance?.factory?.focus) {
|
|
@@ -4451,7 +4793,7 @@ const focus$h = viewletId => {
|
|
|
4451
4793
|
} else ;
|
|
4452
4794
|
};
|
|
4453
4795
|
const focusSelector = (viewletId, selector) => {
|
|
4454
|
-
const instance = state.instances[viewletId];
|
|
4796
|
+
const instance = state$6.instances[viewletId];
|
|
4455
4797
|
if (!instance) {
|
|
4456
4798
|
return;
|
|
4457
4799
|
}
|
|
@@ -4469,12 +4811,12 @@ const focusSelector = (viewletId, selector) => {
|
|
|
4469
4811
|
* @deprecated
|
|
4470
4812
|
*/
|
|
4471
4813
|
const refresh$4 = (viewletId, viewletContext) => {
|
|
4472
|
-
const instance = state.instances[viewletId];
|
|
4814
|
+
const instance = state$6.instances[viewletId];
|
|
4473
4815
|
if (instance) {
|
|
4474
4816
|
instance.factory.refresh(instance.state, viewletContext);
|
|
4475
4817
|
} else {
|
|
4476
4818
|
// @ts-expect-error
|
|
4477
|
-
state.refreshContext[viewletId] = viewletContext;
|
|
4819
|
+
state$6.refreshContext[viewletId] = viewletContext;
|
|
4478
4820
|
}
|
|
4479
4821
|
};
|
|
4480
4822
|
const specialIds = new Set(['TitleBar', 'SideBar', 'Main', 'ActivityBar', 'StatusBar', 'Panel']);
|
|
@@ -4488,17 +4830,17 @@ const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
|
|
|
4488
4830
|
if (isSpecial(viewletId)) {
|
|
4489
4831
|
$PlaceHolder.id = viewletId;
|
|
4490
4832
|
}
|
|
4491
|
-
const parentInstance = state.instances[parentId];
|
|
4833
|
+
const parentInstance = state$6.instances[parentId];
|
|
4492
4834
|
const $Parent = parentInstance.state.$Viewlet;
|
|
4493
4835
|
$Parent.append($PlaceHolder);
|
|
4494
|
-
state.instances[viewletId] = {
|
|
4836
|
+
state$6.instances[viewletId] = {
|
|
4495
4837
|
state: {
|
|
4496
4838
|
$Viewlet: $PlaceHolder
|
|
4497
4839
|
}
|
|
4498
4840
|
};
|
|
4499
4841
|
};
|
|
4500
|
-
const setDom$
|
|
4501
|
-
const instance = state.instances[viewletId];
|
|
4842
|
+
const setDom$9 = (viewletId, dom) => {
|
|
4843
|
+
const instance = state$6.instances[viewletId];
|
|
4502
4844
|
if (!instance) {
|
|
4503
4845
|
return;
|
|
4504
4846
|
}
|
|
@@ -4511,7 +4853,7 @@ const setDom$a = (viewletId, dom) => {
|
|
|
4511
4853
|
renderInto($Viewlet, dom, Events);
|
|
4512
4854
|
};
|
|
4513
4855
|
const setDom2 = (viewletId, dom) => {
|
|
4514
|
-
const instance = state.instances[viewletId];
|
|
4856
|
+
const instance = state$6.instances[viewletId];
|
|
4515
4857
|
if (!instance) {
|
|
4516
4858
|
return;
|
|
4517
4859
|
}
|
|
@@ -4539,12 +4881,12 @@ const sendMultiple = commands => {
|
|
|
4539
4881
|
case 'Viewlet.setBounds':
|
|
4540
4882
|
{
|
|
4541
4883
|
// @ts-expect-error
|
|
4542
|
-
setBounds$
|
|
4884
|
+
setBounds$4(viewletId, method, ...args);
|
|
4543
4885
|
break;
|
|
4544
4886
|
}
|
|
4545
4887
|
case 'Viewlet.create':
|
|
4546
4888
|
{
|
|
4547
|
-
create$
|
|
4889
|
+
create$C(viewletId, method);
|
|
4548
4890
|
break;
|
|
4549
4891
|
}
|
|
4550
4892
|
case 'Viewlet.createFunctionalRoot':
|
|
@@ -4561,7 +4903,7 @@ const sendMultiple = commands => {
|
|
|
4561
4903
|
}
|
|
4562
4904
|
case 'Viewlet.dispose':
|
|
4563
4905
|
{
|
|
4564
|
-
dispose$
|
|
4906
|
+
dispose$d(viewletId);
|
|
4565
4907
|
break;
|
|
4566
4908
|
}
|
|
4567
4909
|
case 'Viewlet.createPlaceholder':
|
|
@@ -4573,7 +4915,7 @@ const sendMultiple = commands => {
|
|
|
4573
4915
|
case 'Viewlet.handleError':
|
|
4574
4916
|
{
|
|
4575
4917
|
// @ts-expect-error
|
|
4576
|
-
handleError$
|
|
4918
|
+
handleError$6(viewletId, method, ...args);
|
|
4577
4919
|
break;
|
|
4578
4920
|
}
|
|
4579
4921
|
case 'Viewlet.focus':
|
|
@@ -4598,7 +4940,7 @@ const sendMultiple = commands => {
|
|
|
4598
4940
|
break;
|
|
4599
4941
|
case 'Viewlet.setDom':
|
|
4600
4942
|
// @ts-expect-error
|
|
4601
|
-
setDom$
|
|
4943
|
+
setDom$9(viewletId, method, ...args);
|
|
4602
4944
|
break;
|
|
4603
4945
|
case 'Viewlet.setDom2':
|
|
4604
4946
|
// @ts-ignore
|
|
@@ -4614,12 +4956,12 @@ const sendMultiple = commands => {
|
|
|
4614
4956
|
}
|
|
4615
4957
|
}
|
|
4616
4958
|
};
|
|
4617
|
-
const dispose$
|
|
4959
|
+
const dispose$d = id => {
|
|
4618
4960
|
try {
|
|
4619
4961
|
number(id);
|
|
4620
4962
|
const {
|
|
4621
4963
|
instances
|
|
4622
|
-
} = state;
|
|
4964
|
+
} = state$6;
|
|
4623
4965
|
const instance = instances[id];
|
|
4624
4966
|
if (!instance) {
|
|
4625
4967
|
warn(`viewlet instance ${id} not found and cannot be disposed`);
|
|
@@ -4636,9 +4978,9 @@ const dispose$e = id => {
|
|
|
4636
4978
|
throw new Error(`Failed to dispose ${id}`);
|
|
4637
4979
|
}
|
|
4638
4980
|
};
|
|
4639
|
-
const handleError$
|
|
4981
|
+
const handleError$6 = (id, parentId, message) => {
|
|
4640
4982
|
info(`[viewlet-error] ${id}: ${message}`);
|
|
4641
|
-
const instance = state.instances[id];
|
|
4983
|
+
const instance = state$6.instances[id];
|
|
4642
4984
|
if (instance?.state.$Viewlet.isConnected) {
|
|
4643
4985
|
instance.state.$Viewlet.remove();
|
|
4644
4986
|
}
|
|
@@ -4650,7 +4992,7 @@ const handleError$7 = (id, parentId, message) => {
|
|
|
4650
4992
|
instance.state.$Viewlet.textContent = `${message}`;
|
|
4651
4993
|
}
|
|
4652
4994
|
// TODO error should bubble up to until highest possible component
|
|
4653
|
-
const parentInstance = state.instances[parentId];
|
|
4995
|
+
const parentInstance = state$6.instances[parentId];
|
|
4654
4996
|
if (parentInstance?.factory?.handleError) {
|
|
4655
4997
|
parentInstance.factory.handleError(instance.state, message);
|
|
4656
4998
|
}
|
|
@@ -4664,9 +5006,9 @@ const appendViewlet = (parentId, childId, focus) => {
|
|
|
4664
5006
|
// TODO
|
|
4665
5007
|
return;
|
|
4666
5008
|
}
|
|
4667
|
-
const parentInstanceState = state.instances[parentId]; // TODO must ensure that parent is already created
|
|
5009
|
+
const parentInstanceState = state$6.instances[parentId]; // TODO must ensure that parent is already created
|
|
4668
5010
|
const parentModule = parentInstanceState.factory;
|
|
4669
|
-
const childInstance = state.instances[childId];
|
|
5011
|
+
const childInstance = state$6.instances[childId];
|
|
4670
5012
|
if (!childInstance) {
|
|
4671
5013
|
throw new Error(`child instance ${childId} must be defined to be appended to parent ${parentId}`);
|
|
4672
5014
|
}
|
|
@@ -4685,12 +5027,12 @@ const ariaAnnounce = async message => {
|
|
|
4685
5027
|
const append = (parentId, childId, referenceNodes) => {
|
|
4686
5028
|
number(parentId);
|
|
4687
5029
|
number(childId);
|
|
4688
|
-
const parentInstance = state.instances[parentId];
|
|
5030
|
+
const parentInstance = state$6.instances[parentId];
|
|
4689
5031
|
if (!parentInstance) {
|
|
4690
5032
|
throw new Error(`cannot append child: instance ${parentId} not found`);
|
|
4691
5033
|
}
|
|
4692
5034
|
const $Parent = parentInstance.state.$Viewlet;
|
|
4693
|
-
const childInstance = state.instances[childId];
|
|
5035
|
+
const childInstance = state$6.instances[childId];
|
|
4694
5036
|
if (!childInstance) {
|
|
4695
5037
|
throw new Error(`cannot append child: child instance not found ${childId}`);
|
|
4696
5038
|
}
|
|
@@ -4706,16 +5048,16 @@ const append = (parentId, childId, referenceNodes) => {
|
|
|
4706
5048
|
if (id === childId) {
|
|
4707
5049
|
for (let j = i - 1; j >= 0; j--) {
|
|
4708
5050
|
const beforeId = referenceNodes[j];
|
|
4709
|
-
if (state.instances[beforeId]) {
|
|
4710
|
-
const $ReferenceNode = state.instances[beforeId].state.$Viewlet;
|
|
5051
|
+
if (state$6.instances[beforeId]) {
|
|
5052
|
+
const $ReferenceNode = state$6.instances[beforeId].state.$Viewlet;
|
|
4711
5053
|
$ReferenceNode.after($Child);
|
|
4712
5054
|
return;
|
|
4713
5055
|
}
|
|
4714
5056
|
}
|
|
4715
5057
|
for (let j = i + 1; j < referenceNodes.length; j++) {
|
|
4716
5058
|
const afterId = referenceNodes[j];
|
|
4717
|
-
if (state.instances[afterId]) {
|
|
4718
|
-
const $ReferenceNode = state.instances[afterId].state.$Viewlet;
|
|
5059
|
+
if (state$6.instances[afterId]) {
|
|
5060
|
+
const $ReferenceNode = state$6.instances[afterId].state.$Viewlet;
|
|
4719
5061
|
$ReferenceNode.before($Child);
|
|
4720
5062
|
return;
|
|
4721
5063
|
}
|
|
@@ -4732,24 +5074,24 @@ const append = (parentId, childId, referenceNodes) => {
|
|
|
4732
5074
|
};
|
|
4733
5075
|
const appendToBody = childId => {
|
|
4734
5076
|
const $Parent = document.body;
|
|
4735
|
-
const childInstance = state.instances[childId];
|
|
5077
|
+
const childInstance = state$6.instances[childId];
|
|
4736
5078
|
const $Child = childInstance.state.$Viewlet;
|
|
4737
5079
|
$Parent.append($Child);
|
|
4738
5080
|
};
|
|
4739
5081
|
const getFn = command => {
|
|
4740
5082
|
switch (command) {
|
|
4741
5083
|
case 'Viewlet.create':
|
|
4742
|
-
return create$
|
|
5084
|
+
return create$C;
|
|
4743
5085
|
case 'Viewlet.send':
|
|
4744
5086
|
return invoke;
|
|
4745
5087
|
case 'Viewlet.show':
|
|
4746
5088
|
return show;
|
|
4747
5089
|
case 'Viewlet.dispose':
|
|
4748
|
-
return dispose$
|
|
5090
|
+
return dispose$d;
|
|
4749
5091
|
case 'Viewlet.setDom2':
|
|
4750
5092
|
return setDom2;
|
|
4751
5093
|
case 'Viewlet.setBounds':
|
|
4752
|
-
return setBounds$
|
|
5094
|
+
return setBounds$4;
|
|
4753
5095
|
case 'Viewlet.ariaAnnounce':
|
|
4754
5096
|
return ariaAnnounce;
|
|
4755
5097
|
case 'Viewlet.append':
|
|
@@ -4765,7 +5107,7 @@ const getFn = command => {
|
|
|
4765
5107
|
case 'Viewlet.addKeyBindings':
|
|
4766
5108
|
return addKeyBindings;
|
|
4767
5109
|
case 'Viewlet.setDom':
|
|
4768
|
-
return setDom$
|
|
5110
|
+
return setDom$9;
|
|
4769
5111
|
case 'Viewlet.createFunctionalRoot':
|
|
4770
5112
|
return createFunctionalRoot;
|
|
4771
5113
|
default:
|
|
@@ -4780,7 +5122,7 @@ const executeCommands = commands => {
|
|
|
4780
5122
|
}
|
|
4781
5123
|
};
|
|
4782
5124
|
const show = id => {
|
|
4783
|
-
const instance = state.instances[id];
|
|
5125
|
+
const instance = state$6.instances[id];
|
|
4784
5126
|
const $Viewlet = instance.state.$Viewlet;
|
|
4785
5127
|
const $Workbench = document.getElementById('Workbench');
|
|
4786
5128
|
// @ts-expect-error
|
|
@@ -4789,8 +5131,8 @@ const show = id => {
|
|
|
4789
5131
|
instance.factory.focus(instance.state);
|
|
4790
5132
|
}
|
|
4791
5133
|
};
|
|
4792
|
-
const setBounds$
|
|
4793
|
-
const instance = state.instances[id];
|
|
5134
|
+
const setBounds$4 = (id, left, top, width, height) => {
|
|
5135
|
+
const instance = state$6.instances[id];
|
|
4794
5136
|
if (!instance) {
|
|
4795
5137
|
return;
|
|
4796
5138
|
}
|
|
@@ -4802,18 +5144,18 @@ const name$7 = 'Viewlet';
|
|
|
4802
5144
|
const Commands$8 = {
|
|
4803
5145
|
addKeyBindings: addKeyBindings,
|
|
4804
5146
|
appendViewlet: appendViewlet,
|
|
4805
|
-
dispose: dispose$
|
|
5147
|
+
dispose: dispose$d,
|
|
4806
5148
|
executeCommands: executeCommands,
|
|
4807
5149
|
focus: focus$h,
|
|
4808
5150
|
focusSelector: focusSelector,
|
|
4809
|
-
handleError: handleError$
|
|
5151
|
+
handleError: handleError$6,
|
|
4810
5152
|
invoke: invoke,
|
|
4811
5153
|
loadModule: loadModule,
|
|
4812
5154
|
refresh: refresh$4,
|
|
4813
5155
|
removeKeyBindings: removeKeyBindings,
|
|
4814
5156
|
send: invoke,
|
|
4815
5157
|
sendMultiple: sendMultiple,
|
|
4816
|
-
setBounds: setBounds$
|
|
5158
|
+
setBounds: setBounds$4,
|
|
4817
5159
|
show: show
|
|
4818
5160
|
};
|
|
4819
5161
|
|
|
@@ -4884,7 +5226,7 @@ const reload$1 = () => {
|
|
|
4884
5226
|
const minimize = () => {};
|
|
4885
5227
|
const maximize = () => {};
|
|
4886
5228
|
const unmaximize = () => {};
|
|
4887
|
-
const close
|
|
5229
|
+
const close = () => {
|
|
4888
5230
|
// window.close()
|
|
4889
5231
|
};
|
|
4890
5232
|
const sendVisibilityChangeHint = () => {
|
|
@@ -4907,7 +5249,7 @@ const onVisibilityChange = () => {
|
|
|
4907
5249
|
|
|
4908
5250
|
const name$5 = 'Window';
|
|
4909
5251
|
const Commands$6 = {
|
|
4910
|
-
close: close
|
|
5252
|
+
close: close,
|
|
4911
5253
|
maximize: maximize,
|
|
4912
5254
|
minimize: minimize,
|
|
4913
5255
|
onVisibilityChange: onVisibilityChange,
|
|
@@ -5005,7 +5347,7 @@ const ModuleWorkerAndMessagePort = 8;
|
|
|
5005
5347
|
const getData$1 = event => {
|
|
5006
5348
|
return event.data;
|
|
5007
5349
|
};
|
|
5008
|
-
const attachEvents$
|
|
5350
|
+
const attachEvents$a = that => {
|
|
5009
5351
|
const handleMessage = (...args) => {
|
|
5010
5352
|
const data = that.getData(...args);
|
|
5011
5353
|
that.dispatchEvent(new MessageEvent('message', {
|
|
@@ -5022,7 +5364,7 @@ class Ipc extends EventTarget {
|
|
|
5022
5364
|
constructor(rawIpc) {
|
|
5023
5365
|
super();
|
|
5024
5366
|
this._rawIpc = rawIpc;
|
|
5025
|
-
attachEvents$
|
|
5367
|
+
attachEvents$a(this);
|
|
5026
5368
|
}
|
|
5027
5369
|
}
|
|
5028
5370
|
const readyMessage = 'ready';
|
|
@@ -5550,7 +5892,7 @@ ${relevant}`;
|
|
|
5550
5892
|
|
|
5551
5893
|
const Module$1 = 'module';
|
|
5552
5894
|
|
|
5553
|
-
const create$
|
|
5895
|
+
const create$B = async ({
|
|
5554
5896
|
url,
|
|
5555
5897
|
name
|
|
5556
5898
|
}) => {
|
|
@@ -5620,7 +5962,7 @@ const wrap = worker => {
|
|
|
5620
5962
|
|
|
5621
5963
|
const IpcParentWithModuleWorker = {
|
|
5622
5964
|
__proto__: null,
|
|
5623
|
-
create: create$
|
|
5965
|
+
create: create$B,
|
|
5624
5966
|
wrap
|
|
5625
5967
|
};
|
|
5626
5968
|
|
|
@@ -5628,7 +5970,7 @@ const isMessagePort = value => {
|
|
|
5628
5970
|
return value instanceof MessagePort;
|
|
5629
5971
|
};
|
|
5630
5972
|
|
|
5631
|
-
const create$
|
|
5973
|
+
const create$A = async ({
|
|
5632
5974
|
url
|
|
5633
5975
|
}) => {
|
|
5634
5976
|
string(url);
|
|
@@ -5649,10 +5991,10 @@ const create$B = async ({
|
|
|
5649
5991
|
|
|
5650
5992
|
const IpcParentWithMessagePort = {
|
|
5651
5993
|
__proto__: null,
|
|
5652
|
-
create: create$
|
|
5994
|
+
create: create$A
|
|
5653
5995
|
};
|
|
5654
5996
|
|
|
5655
|
-
const create$
|
|
5997
|
+
const create$z = async url => {
|
|
5656
5998
|
const referencePort = await new Promise(resolve => {
|
|
5657
5999
|
globalThis.acceptReferencePort = resolve;
|
|
5658
6000
|
import(url);
|
|
@@ -5663,7 +6005,7 @@ const create$A = async url => {
|
|
|
5663
6005
|
|
|
5664
6006
|
const IpcParentWithReferencePort = {
|
|
5665
6007
|
__proto__: null,
|
|
5666
|
-
create: create$
|
|
6008
|
+
create: create$z
|
|
5667
6009
|
};
|
|
5668
6010
|
|
|
5669
6011
|
const isWorker = value => {
|
|
@@ -5671,12 +6013,12 @@ const isWorker = value => {
|
|
|
5671
6013
|
};
|
|
5672
6014
|
|
|
5673
6015
|
// TODO add test
|
|
5674
|
-
const create$
|
|
6016
|
+
const create$y = async ({
|
|
5675
6017
|
url,
|
|
5676
6018
|
name,
|
|
5677
6019
|
port
|
|
5678
6020
|
}) => {
|
|
5679
|
-
const worker = await create$
|
|
6021
|
+
const worker = await create$B({
|
|
5680
6022
|
url,
|
|
5681
6023
|
name
|
|
5682
6024
|
});
|
|
@@ -5695,7 +6037,7 @@ const create$z = async ({
|
|
|
5695
6037
|
|
|
5696
6038
|
const IpcParentWithModuleWorkerWithMessagePort = {
|
|
5697
6039
|
__proto__: null,
|
|
5698
|
-
create: create$
|
|
6040
|
+
create: create$y
|
|
5699
6041
|
};
|
|
5700
6042
|
|
|
5701
6043
|
const handleIpcOnce = ipc => {
|
|
@@ -5710,7 +6052,7 @@ const handleIpcOnce = ipc => {
|
|
|
5710
6052
|
};
|
|
5711
6053
|
|
|
5712
6054
|
// TODO use handleIncomingIpc function
|
|
5713
|
-
const create$
|
|
6055
|
+
const create$x = async ({
|
|
5714
6056
|
port,
|
|
5715
6057
|
ipcId
|
|
5716
6058
|
}) => {
|
|
@@ -5726,7 +6068,7 @@ const create$y = async ({
|
|
|
5726
6068
|
|
|
5727
6069
|
const IpcParentWithElectron = {
|
|
5728
6070
|
__proto__: null,
|
|
5729
|
-
create: create$
|
|
6071
|
+
create: create$x
|
|
5730
6072
|
};
|
|
5731
6073
|
|
|
5732
6074
|
const getNodeIndex = $Node => {
|
|
@@ -5747,7 +6089,7 @@ const get$ItemFromEvent = event => {
|
|
|
5747
6089
|
}
|
|
5748
6090
|
return undefined;
|
|
5749
6091
|
};
|
|
5750
|
-
const handleMouseDown$
|
|
6092
|
+
const handleMouseDown$2 = event => {
|
|
5751
6093
|
const {
|
|
5752
6094
|
button,
|
|
5753
6095
|
clientX,
|
|
@@ -5762,157 +6104,41 @@ const handleMouseDown$3 = event => {
|
|
|
5762
6104
|
const index = getNodeIndex($Item);
|
|
5763
6105
|
return ['handleClick', button, index, clientX, clientY];
|
|
5764
6106
|
};
|
|
5765
|
-
const handleBlur$
|
|
6107
|
+
const handleBlur$8 = () => {
|
|
5766
6108
|
return ['handleBlur'];
|
|
5767
6109
|
};
|
|
5768
|
-
const handleFocus$
|
|
6110
|
+
const handleFocus$b = () => {
|
|
5769
6111
|
return ['handleFocus'];
|
|
5770
6112
|
};
|
|
5771
6113
|
|
|
5772
|
-
// TODO use context menu events function again
|
|
5773
|
-
|
|
5774
|
-
const handleContextMenu$
|
|
5775
|
-
preventDefault(event);
|
|
5776
|
-
const {
|
|
5777
|
-
button,
|
|
5778
|
-
clientX,
|
|
5779
|
-
clientY
|
|
5780
|
-
} = event;
|
|
5781
|
-
return ['handleContextMenu', button, clientX, clientY];
|
|
5782
|
-
};
|
|
5783
|
-
const returnValue$8 = true;
|
|
5784
|
-
|
|
5785
|
-
const ViewletActivityBarEvents = {
|
|
5786
|
-
__proto__: null,
|
|
5787
|
-
handleBlur: handleBlur$
|
|
5788
|
-
handleContextMenu: handleContextMenu$
|
|
5789
|
-
handleFocus: handleFocus$
|
|
5790
|
-
handleMouseDown: handleMouseDown$
|
|
5791
|
-
returnValue: returnValue$8
|
|
5792
|
-
};
|
|
5793
|
-
|
|
5794
|
-
const Events$a = ViewletActivityBarEvents;
|
|
5795
|
-
|
|
5796
|
-
const ViewletActivityBar = {
|
|
5797
|
-
__proto__: null,
|
|
5798
|
-
Events: Events$a
|
|
5799
|
-
};
|
|
5800
|
-
|
|
5801
|
-
const executeViewletCommand = (uid, command, ...args) => {
|
|
5802
|
-
number(uid);
|
|
5803
|
-
send('Viewlet.executeViewletCommand', uid, command, ...args);
|
|
5804
|
-
};
|
|
5805
|
-
|
|
5806
|
-
const nameAnonymousFunction = (fn, name) => {
|
|
5807
|
-
Object.defineProperty(fn, 'name', {
|
|
5808
|
-
value: name
|
|
5809
|
-
});
|
|
5810
|
-
};
|
|
5811
|
-
|
|
5812
|
-
const forwardViewletCommand = name => {
|
|
5813
|
-
const fn = (uid, ...args) => {
|
|
5814
|
-
executeViewletCommand(uid, name, ...args);
|
|
5815
|
-
};
|
|
5816
|
-
nameAnonymousFunction(fn, name);
|
|
5817
|
-
return fn;
|
|
5818
|
-
};
|
|
5819
|
-
|
|
5820
|
-
forwardViewletCommand('clearFilter');
|
|
5821
|
-
const close = forwardViewletCommand('close');
|
|
5822
|
-
forwardViewletCommand('closeEditor');
|
|
5823
|
-
const closeMenu$1 = forwardViewletCommand('closeMenu');
|
|
5824
|
-
forwardViewletCommand('compositionEnd');
|
|
5825
|
-
forwardViewletCommand('compositionStart');
|
|
5826
|
-
forwardViewletCommand('compositionUpdate');
|
|
5827
|
-
forwardViewletCommand('cut');
|
|
5828
|
-
forwardViewletCommand('focus');
|
|
5829
|
-
forwardViewletCommand('focusIndex');
|
|
5830
|
-
const focusNext = forwardViewletCommand('focusNext');
|
|
5831
|
-
const focusPrevious = forwardViewletCommand('focusPrevious');
|
|
5832
|
-
const handleAudioError$1 = forwardViewletCommand('handleAudioError');
|
|
5833
|
-
const handleBeforeInput$2 = forwardViewletCommand('handleBeforeInput');
|
|
5834
|
-
forwardViewletCommand('handleBeforeInputFromContentEditable');
|
|
5835
|
-
const handleBlur$8 = forwardViewletCommand('handleBlur');
|
|
5836
|
-
const handleButtonClick = forwardViewletCommand('handleButtonClick');
|
|
5837
|
-
const handleClick$9 = forwardViewletCommand('handleClick');
|
|
5838
|
-
const handleClickAction$2 = forwardViewletCommand('handleClickAction');
|
|
5839
|
-
forwardViewletCommand('handleClickAdd');
|
|
5840
|
-
const handleClickAt$2 = forwardViewletCommand('handleClickAt');
|
|
5841
|
-
const handleClickOpenFolder$1 = forwardViewletCommand('handleClickOpenFolder');
|
|
5842
|
-
forwardViewletCommand('handleClickClose');
|
|
5843
|
-
forwardViewletCommand('handleClickCopy');
|
|
5844
|
-
forwardViewletCommand('handleClickMinimize');
|
|
5845
|
-
forwardViewletCommand('handleClickOk');
|
|
5846
|
-
forwardViewletCommand('handleClickOpenFile');
|
|
5847
|
-
forwardViewletCommand('handleClickRestore');
|
|
5848
|
-
const handleClickTab$2 = forwardViewletCommand('handleClickTab');
|
|
5849
|
-
forwardViewletCommand('handleClickToggleMaximize');
|
|
5850
|
-
const handleContextMenu$a = forwardViewletCommand('handleContextMenu');
|
|
5851
|
-
const handleDoubleClick = forwardViewletCommand('handleDoubleClick');
|
|
5852
|
-
const handleDragEnd$1 = forwardViewletCommand('handleDragEnd');
|
|
5853
|
-
const handleDragLeave$1 = forwardViewletCommand('handleDragLeave');
|
|
5854
|
-
const handleDragOver$1 = forwardViewletCommand('handleDragOver');
|
|
5855
|
-
forwardViewletCommand('handleDrop');
|
|
5856
|
-
const handleDropFilePath = forwardViewletCommand('handleDropFilePath');
|
|
5857
|
-
const handleDropFiles = forwardViewletCommand('handleDrop');
|
|
5858
|
-
forwardViewletCommand('handleFilterInput');
|
|
5859
|
-
const handleFocus$b = forwardViewletCommand('handleFocus');
|
|
5860
|
-
const handleFocusIn$3 = forwardViewletCommand('handleFocusIn');
|
|
5861
|
-
const handleIconError$1 = forwardViewletCommand('handleIconError');
|
|
5862
|
-
const handleImageError = forwardViewletCommand('handleImageError');
|
|
5863
|
-
const handleInput$8 = forwardViewletCommand('handleInput');
|
|
5864
|
-
const handleKeyDown$4 = forwardViewletCommand('handleKeyDown');
|
|
5865
|
-
forwardViewletCommand('handleListBlur');
|
|
5866
|
-
forwardViewletCommand('handleListFocus');
|
|
5867
|
-
const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
|
|
5868
|
-
const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
|
|
5869
|
-
const handleMouseDown$2 = forwardViewletCommand('handleMouseDown');
|
|
5870
|
-
forwardViewletCommand('handleMouseMove');
|
|
5871
|
-
const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
|
|
5872
|
-
const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
|
|
5873
|
-
forwardViewletCommand('handlePointerCaptureLost');
|
|
5874
|
-
const handlePointerDown$7 = forwardViewletCommand('handlePointerDown');
|
|
5875
|
-
const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
|
|
5876
|
-
forwardViewletCommand('handlePointerOver');
|
|
5877
|
-
const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
|
|
5878
|
-
const handleReadmeContextMenu$1 = forwardViewletCommand('handleReadmeContextMenu');
|
|
5879
|
-
forwardViewletCommand('handleReplaceInput');
|
|
5880
|
-
const handleResizerClick = forwardViewletCommand('handleResizerClick');
|
|
5881
|
-
const handleResizerMove = forwardViewletCommand('handleResizerMove');
|
|
5882
|
-
const handleScrollBarCaptureLost = forwardViewletCommand('handleScrollBarCaptureLost');
|
|
5883
|
-
const handleScrollBarClick = forwardViewletCommand('handleScrollBarClick');
|
|
5884
|
-
forwardViewletCommand('handleScrollBarHorizontalMove');
|
|
5885
|
-
forwardViewletCommand('handleScrollBarHorizontalPointerDown');
|
|
5886
|
-
const handleScrollBarMove = forwardViewletCommand('handleScrollBarMove');
|
|
5887
|
-
const handleScrollBarThumbPointerMove$3 = forwardViewletCommand('handleScrollBarThumbPointerMove');
|
|
5888
|
-
forwardViewletCommand('handleScrollBarMove');
|
|
5889
|
-
forwardViewletCommand('handleScrollBarVerticalPointerDown');
|
|
5890
|
-
forwardViewletCommand('handleSliderPointerDown');
|
|
5891
|
-
forwardViewletCommand('handleSliderPointerMove');
|
|
5892
|
-
const handleTabClick = forwardViewletCommand('handleTabClick');
|
|
5893
|
-
const handleTabContextMenu = forwardViewletCommand('handleTabContextMenu');
|
|
5894
|
-
forwardViewletCommand('handleTabsPointerOut');
|
|
5895
|
-
forwardViewletCommand('handleTabsPointerOver');
|
|
5896
|
-
const handleTabsWheel$1 = forwardViewletCommand('handleTabsWheel');
|
|
5897
|
-
const handleTouchEnd$1 = forwardViewletCommand('handleTouchEnd');
|
|
5898
|
-
const handleTouchMove$1 = forwardViewletCommand('handleTouchMove');
|
|
5899
|
-
const handleTouchStart$1 = forwardViewletCommand('handleTouchStart');
|
|
5900
|
-
const handleWheel$4 = forwardViewletCommand('handleWheel');
|
|
5901
|
-
const hidePanel = forwardViewletCommand('hidePanel');
|
|
5902
|
-
forwardViewletCommand('moveRectangleSelectionPx');
|
|
5903
|
-
forwardViewletCommand('moveSelectionPx');
|
|
5904
|
-
forwardViewletCommand('paste');
|
|
5905
|
-
forwardViewletCommand('replaceAll');
|
|
5906
|
-
const selectIndex = forwardViewletCommand('selectIndex');
|
|
5907
|
-
forwardViewletCommand('setDelta');
|
|
5908
|
-
forwardViewletCommand('toggleMatchCase');
|
|
5909
|
-
forwardViewletCommand('toggleMatchWholeWord');
|
|
5910
|
-
const toggleMaximize = forwardViewletCommand('toggleMaximize');
|
|
5911
|
-
const toggleReplace = forwardViewletCommand('toggleReplace');
|
|
5912
|
-
forwardViewletCommand('toggleUseRegularExpression');
|
|
5913
|
-
forwardViewletCommand('type');
|
|
5914
|
-
forwardViewletCommand('typeWithAutoClosing');
|
|
5915
|
-
const updateEditingValue = forwardViewletCommand('updateEditingValue');
|
|
6114
|
+
// TODO use context menu events function again
|
|
6115
|
+
|
|
6116
|
+
const handleContextMenu$a = event => {
|
|
6117
|
+
preventDefault(event);
|
|
6118
|
+
const {
|
|
6119
|
+
button,
|
|
6120
|
+
clientX,
|
|
6121
|
+
clientY
|
|
6122
|
+
} = event;
|
|
6123
|
+
return ['handleContextMenu', button, clientX, clientY];
|
|
6124
|
+
};
|
|
6125
|
+
const returnValue$8 = true;
|
|
6126
|
+
|
|
6127
|
+
const ViewletActivityBarEvents = {
|
|
6128
|
+
__proto__: null,
|
|
6129
|
+
handleBlur: handleBlur$8,
|
|
6130
|
+
handleContextMenu: handleContextMenu$a,
|
|
6131
|
+
handleFocus: handleFocus$b,
|
|
6132
|
+
handleMouseDown: handleMouseDown$2,
|
|
6133
|
+
returnValue: returnValue$8
|
|
6134
|
+
};
|
|
6135
|
+
|
|
6136
|
+
const Events$a = ViewletActivityBarEvents;
|
|
6137
|
+
|
|
6138
|
+
const ViewletActivityBar = {
|
|
6139
|
+
__proto__: null,
|
|
6140
|
+
Events: Events$a
|
|
6141
|
+
};
|
|
5916
6142
|
|
|
5917
6143
|
const handleAudioError = event => {
|
|
5918
6144
|
const {
|
|
@@ -5941,14 +6167,14 @@ const ViewletAudio = {
|
|
|
5941
6167
|
Events: Events$9
|
|
5942
6168
|
};
|
|
5943
6169
|
|
|
5944
|
-
const create$
|
|
6170
|
+
const create$w = () => {
|
|
5945
6171
|
const $Viewlet = document.createElement('div');
|
|
5946
6172
|
$Viewlet.className = 'Viewlet BrowserViewOverview';
|
|
5947
6173
|
return {
|
|
5948
6174
|
$Viewlet
|
|
5949
6175
|
};
|
|
5950
6176
|
};
|
|
5951
|
-
const setDom$
|
|
6177
|
+
const setDom$8 = (state, dom) => {
|
|
5952
6178
|
const {
|
|
5953
6179
|
$Viewlet
|
|
5954
6180
|
} = state;
|
|
@@ -5957,18 +6183,18 @@ const setDom$9 = (state, dom) => {
|
|
|
5957
6183
|
|
|
5958
6184
|
const ViewletBrowserViewOverview = {
|
|
5959
6185
|
__proto__: null,
|
|
5960
|
-
create: create$
|
|
5961
|
-
setDom: setDom$
|
|
6186
|
+
create: create$w,
|
|
6187
|
+
setDom: setDom$8
|
|
5962
6188
|
};
|
|
5963
6189
|
|
|
5964
|
-
const create$
|
|
6190
|
+
const create$v = () => {
|
|
5965
6191
|
const $Viewlet = document.createElement('div');
|
|
5966
6192
|
$Viewlet.className = 'Viewlet Clock';
|
|
5967
6193
|
return {
|
|
5968
6194
|
$Viewlet
|
|
5969
6195
|
};
|
|
5970
6196
|
};
|
|
5971
|
-
const dispose$
|
|
6197
|
+
const dispose$c = state => {};
|
|
5972
6198
|
const refresh$3 = () => {};
|
|
5973
6199
|
const setTime = (state, time) => {
|
|
5974
6200
|
object(state);
|
|
@@ -5978,25 +6204,25 @@ const setTime = (state, time) => {
|
|
|
5978
6204
|
|
|
5979
6205
|
const ViewletClock = {
|
|
5980
6206
|
__proto__: null,
|
|
5981
|
-
create: create$
|
|
5982
|
-
dispose: dispose$
|
|
6207
|
+
create: create$v,
|
|
6208
|
+
dispose: dispose$c,
|
|
5983
6209
|
refresh: refresh$3,
|
|
5984
6210
|
setTime
|
|
5985
6211
|
};
|
|
5986
6212
|
|
|
5987
|
-
const startTracking
|
|
6213
|
+
const startTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5988
6214
|
$Target.setPointerCapture(pointerId);
|
|
5989
6215
|
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
5990
6216
|
// TODO use pointerlost event instead
|
|
5991
6217
|
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
5992
6218
|
};
|
|
5993
|
-
const stopTracking
|
|
6219
|
+
const stopTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
5994
6220
|
$Target.releasePointerCapture(pointerId);
|
|
5995
6221
|
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
5996
6222
|
// TODO use pointerlost event instead
|
|
5997
6223
|
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
5998
6224
|
};
|
|
5999
|
-
const create$
|
|
6225
|
+
const create$u = (pointerDown, pointerMove, pointerUp) => {
|
|
6000
6226
|
const shared = (fn, event) => {
|
|
6001
6227
|
const message = fn(event);
|
|
6002
6228
|
if (!message || message.length === 0) {
|
|
@@ -6013,7 +6239,7 @@ const create$v = (pointerDown, pointerMove, pointerUp) => {
|
|
|
6013
6239
|
target,
|
|
6014
6240
|
pointerId
|
|
6015
6241
|
} = event;
|
|
6016
|
-
stopTracking
|
|
6242
|
+
stopTracking(target, pointerId, handlePointerMove, handlePointerUp);
|
|
6017
6243
|
shared(pointerUp, event);
|
|
6018
6244
|
};
|
|
6019
6245
|
const handlePointerDown = event => {
|
|
@@ -6021,7 +6247,7 @@ const create$v = (pointerDown, pointerMove, pointerUp) => {
|
|
|
6021
6247
|
target,
|
|
6022
6248
|
pointerId
|
|
6023
6249
|
} = event;
|
|
6024
|
-
startTracking
|
|
6250
|
+
startTracking(target, pointerId, handlePointerMove, handlePointerUp);
|
|
6025
6251
|
shared(pointerDown, event);
|
|
6026
6252
|
return [];
|
|
6027
6253
|
};
|
|
@@ -6029,7 +6255,7 @@ const create$v = (pointerDown, pointerMove, pointerUp) => {
|
|
|
6029
6255
|
};
|
|
6030
6256
|
|
|
6031
6257
|
const handleOffset = 20;
|
|
6032
|
-
const handleSliderPointerDown = create$
|
|
6258
|
+
const handleSliderPointerDown = create$u(event => {
|
|
6033
6259
|
const {
|
|
6034
6260
|
clientX,
|
|
6035
6261
|
clientY
|
|
@@ -6094,7 +6320,7 @@ const handleInput$7 = event => {
|
|
|
6094
6320
|
};
|
|
6095
6321
|
const handleFocus$a = event => {
|
|
6096
6322
|
const uid = fromEvent(event);
|
|
6097
|
-
handleFocus$
|
|
6323
|
+
handleFocus$c(uid);
|
|
6098
6324
|
};
|
|
6099
6325
|
|
|
6100
6326
|
const ViewletDebugConsoleEvents = {
|
|
@@ -6103,14 +6329,14 @@ const ViewletDebugConsoleEvents = {
|
|
|
6103
6329
|
handleInput: handleInput$7
|
|
6104
6330
|
};
|
|
6105
6331
|
|
|
6106
|
-
const create$
|
|
6332
|
+
const create$t = () => {
|
|
6107
6333
|
const $Viewlet = document.createElement('div');
|
|
6108
6334
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
6109
6335
|
return {
|
|
6110
6336
|
$Viewlet
|
|
6111
6337
|
};
|
|
6112
6338
|
};
|
|
6113
|
-
const setDom$
|
|
6339
|
+
const setDom$7 = (state, dom) => {
|
|
6114
6340
|
const {
|
|
6115
6341
|
$Viewlet
|
|
6116
6342
|
} = state;
|
|
@@ -6119,8 +6345,8 @@ const setDom$8 = (state, dom) => {
|
|
|
6119
6345
|
|
|
6120
6346
|
const ViewletDebugConsole = {
|
|
6121
6347
|
__proto__: null,
|
|
6122
|
-
create: create$
|
|
6123
|
-
setDom: setDom$
|
|
6348
|
+
create: create$t,
|
|
6349
|
+
setDom: setDom$7
|
|
6124
6350
|
};
|
|
6125
6351
|
|
|
6126
6352
|
const handleKeyDown$3 = event => {
|
|
@@ -6134,11 +6360,11 @@ const handleKeyDown$3 = event => {
|
|
|
6134
6360
|
shiftKey,
|
|
6135
6361
|
metaKey
|
|
6136
6362
|
} = event;
|
|
6137
|
-
handleKeyDown$
|
|
6363
|
+
handleKeyDown$5(uid, key, altKey, ctrlKey, shiftKey, metaKey);
|
|
6138
6364
|
};
|
|
6139
6365
|
const handleBlur$7 = event => {
|
|
6140
6366
|
const uid = fromEvent(event);
|
|
6141
|
-
handleBlur$
|
|
6367
|
+
handleBlur$a(uid);
|
|
6142
6368
|
};
|
|
6143
6369
|
|
|
6144
6370
|
const ViewletDefineKeyBindingEvents = {
|
|
@@ -6180,7 +6406,7 @@ const setMaskImage = ($Element, icon) => {
|
|
|
6180
6406
|
}
|
|
6181
6407
|
};
|
|
6182
6408
|
|
|
6183
|
-
const create$
|
|
6409
|
+
const create$s = icon => {
|
|
6184
6410
|
const $Icon = document.createElement('div');
|
|
6185
6411
|
$Icon.className = 'MaskIcon';
|
|
6186
6412
|
setMaskImage($Icon, icon);
|
|
@@ -6190,7 +6416,7 @@ const create$t = icon => {
|
|
|
6190
6416
|
|
|
6191
6417
|
const create$Button = (label, icon) => {
|
|
6192
6418
|
// TODO icon div might not be needed (unnecessary html element)
|
|
6193
|
-
const $Icon = create$
|
|
6419
|
+
const $Icon = create$s(icon);
|
|
6194
6420
|
const $Button = document.createElement('button');
|
|
6195
6421
|
$Button.className = 'IconButton';
|
|
6196
6422
|
$Button.title = label;
|
|
@@ -6211,7 +6437,7 @@ const handleClick$7 = event => {
|
|
|
6211
6437
|
handleClick$8(index);
|
|
6212
6438
|
};
|
|
6213
6439
|
|
|
6214
|
-
const create$
|
|
6440
|
+
const create$r = () => {
|
|
6215
6441
|
const $DialogTitle = document.createElement('h2');
|
|
6216
6442
|
$DialogTitle.id = 'DialogTitle';
|
|
6217
6443
|
const $DialogCloseButton = create$Button('Close', 'Close');
|
|
@@ -6292,7 +6518,7 @@ const setErrorStack = (state, errorStack) => {
|
|
|
6292
6518
|
|
|
6293
6519
|
const ViewletDialog = {
|
|
6294
6520
|
__proto__: null,
|
|
6295
|
-
create: create$
|
|
6521
|
+
create: create$r,
|
|
6296
6522
|
postAppend,
|
|
6297
6523
|
setButtons,
|
|
6298
6524
|
setCodeFrame,
|
|
@@ -6301,247 +6527,22 @@ const ViewletDialog = {
|
|
|
6301
6527
|
setHeader
|
|
6302
6528
|
};
|
|
6303
6529
|
|
|
6304
|
-
const
|
|
6305
|
-
const {
|
|
6306
|
-
deltaMode,
|
|
6307
|
-
deltaY
|
|
6308
|
-
} = event;
|
|
6309
|
-
const uid = fromEvent(event);
|
|
6310
|
-
handleWheel$4(uid, deltaMode, deltaY);
|
|
6311
|
-
};
|
|
6312
|
-
|
|
6313
|
-
const handleScrollBarPointerDown$4 = event => {
|
|
6530
|
+
const handleScrollBarPointerDown$3 = event => {
|
|
6314
6531
|
// TODO
|
|
6315
6532
|
};
|
|
6316
6533
|
|
|
6317
6534
|
const ViewletDiffEditorEvents = {
|
|
6318
6535
|
__proto__: null,
|
|
6319
|
-
handleScrollBarPointerDown: handleScrollBarPointerDown$
|
|
6536
|
+
handleScrollBarPointerDown: handleScrollBarPointerDown$3,
|
|
6320
6537
|
handleWheel: handleWheel$3
|
|
6321
6538
|
};
|
|
6322
6539
|
|
|
6323
|
-
const setScrollBar$2 = (state, scrollBarY, scrollBarHeight, scrollBarThumbClass) => {
|
|
6324
|
-
const {
|
|
6325
|
-
$ScrollBarThumb
|
|
6326
|
-
} = state;
|
|
6327
|
-
if (scrollBarThumbClass) {
|
|
6328
|
-
$ScrollBarThumb.className = scrollBarThumbClass;
|
|
6329
|
-
}
|
|
6330
|
-
setYAndHeight($ScrollBarThumb, scrollBarY, scrollBarHeight);
|
|
6331
|
-
};
|
|
6332
|
-
|
|
6333
6540
|
const ViewletDiffEditor = {
|
|
6334
6541
|
__proto__: null,
|
|
6335
6542
|
Events: ViewletDiffEditorEvents,
|
|
6336
6543
|
setScrollBar: setScrollBar$2
|
|
6337
6544
|
};
|
|
6338
6545
|
|
|
6339
|
-
const attachEvents$b = ($Node, eventMap) => {
|
|
6340
|
-
for (const [key, value] of Object.entries(eventMap)) {
|
|
6341
|
-
$Node.addEventListener(key, value);
|
|
6342
|
-
}
|
|
6343
|
-
};
|
|
6344
|
-
|
|
6345
|
-
const Passive = {
|
|
6346
|
-
passive: true
|
|
6347
|
-
};
|
|
6348
|
-
const Active = {
|
|
6349
|
-
passive: false
|
|
6350
|
-
};
|
|
6351
|
-
const Capture = {
|
|
6352
|
-
capture: true
|
|
6353
|
-
};
|
|
6354
|
-
|
|
6355
|
-
const startTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
6356
|
-
$Target.setPointerCapture(pointerId);
|
|
6357
|
-
$Target.addEventListener(PointerMove, handlePointerMove);
|
|
6358
|
-
// TODO use pointerlost event instead
|
|
6359
|
-
$Target.addEventListener(PointerUp, handlePointerUp);
|
|
6360
|
-
};
|
|
6361
|
-
const stopTracking = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
6362
|
-
$Target.releasePointerCapture(pointerId);
|
|
6363
|
-
$Target.removeEventListener(PointerMove, handlePointerMove);
|
|
6364
|
-
// TODO use pointerlost event instead
|
|
6365
|
-
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
6366
|
-
};
|
|
6367
|
-
|
|
6368
|
-
const handleMousedown = event => {
|
|
6369
|
-
preventDefault(event);
|
|
6370
|
-
const {
|
|
6371
|
-
clientX,
|
|
6372
|
-
clientY
|
|
6373
|
-
} = event;
|
|
6374
|
-
const uid = fromEvent(event);
|
|
6375
|
-
handleClickAt$2(uid, clientX, clientY);
|
|
6376
|
-
};
|
|
6377
|
-
const handleScrollBarThumbPointerMove$2 = event => {
|
|
6378
|
-
const {
|
|
6379
|
-
clientY
|
|
6380
|
-
} = event;
|
|
6381
|
-
const uid = fromEvent(event);
|
|
6382
|
-
handleScrollBarThumbPointerMove$3(uid, clientY);
|
|
6383
|
-
};
|
|
6384
|
-
const handlePointerCaptureLost$2 = event => {
|
|
6385
|
-
const {
|
|
6386
|
-
target,
|
|
6387
|
-
pointerId
|
|
6388
|
-
} = event;
|
|
6389
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6390
|
-
};
|
|
6391
|
-
const handleScrollBarPointerDown$3 = event => {
|
|
6392
|
-
preventDefault(event);
|
|
6393
|
-
const {
|
|
6394
|
-
target,
|
|
6395
|
-
pointerId,
|
|
6396
|
-
clientY
|
|
6397
|
-
} = event;
|
|
6398
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$2, handlePointerCaptureLost$2);
|
|
6399
|
-
const uid = fromEvent(event);
|
|
6400
|
-
handleScrollBarClick(uid, clientY);
|
|
6401
|
-
};
|
|
6402
|
-
|
|
6403
|
-
const Small$1 = 1;
|
|
6404
|
-
const Normal$1 = 2;
|
|
6405
|
-
const Large$1 = 3;
|
|
6406
|
-
|
|
6407
|
-
const None$1 = '';
|
|
6408
|
-
const Small = 'Small';
|
|
6409
|
-
const Normal = 'Normal';
|
|
6410
|
-
const Large = 'Large';
|
|
6411
|
-
|
|
6412
|
-
const getClassName = size => {
|
|
6413
|
-
switch (size) {
|
|
6414
|
-
case Small$1:
|
|
6415
|
-
return Small;
|
|
6416
|
-
case Normal$1:
|
|
6417
|
-
return Normal;
|
|
6418
|
-
case Large$1:
|
|
6419
|
-
return Large;
|
|
6420
|
-
default:
|
|
6421
|
-
return None$1;
|
|
6422
|
-
}
|
|
6423
|
-
};
|
|
6424
|
-
|
|
6425
|
-
const setSize = (state, oldSize, newSize) => {
|
|
6426
|
-
const {
|
|
6427
|
-
$Viewlet
|
|
6428
|
-
} = state;
|
|
6429
|
-
const oldClassName = getClassName(oldSize);
|
|
6430
|
-
if (oldClassName) {
|
|
6431
|
-
$Viewlet.classList.remove(oldClassName);
|
|
6432
|
-
}
|
|
6433
|
-
const newClassName = getClassName(newSize);
|
|
6434
|
-
$Viewlet.classList.add(newClassName);
|
|
6435
|
-
};
|
|
6436
|
-
|
|
6437
|
-
const setContentHeight = (state, height) => {
|
|
6438
|
-
const {
|
|
6439
|
-
$ListItems
|
|
6440
|
-
} = state;
|
|
6441
|
-
setHeight($ListItems, height);
|
|
6442
|
-
};
|
|
6443
|
-
const setNegativeMargin = (state, negativeMargin) => {
|
|
6444
|
-
const {
|
|
6445
|
-
$ListItems
|
|
6446
|
-
} = state;
|
|
6447
|
-
setTop($ListItems, negativeMargin);
|
|
6448
|
-
};
|
|
6449
|
-
|
|
6450
|
-
const create$r = () => {
|
|
6451
|
-
const $ListItems = document.createElement('div');
|
|
6452
|
-
$ListItems.className = 'ListItems';
|
|
6453
|
-
$ListItems.role = ListBox;
|
|
6454
|
-
$ListItems.ariaLabel = 'Suggest';
|
|
6455
|
-
const $ScrollBarThumb = document.createElement('div');
|
|
6456
|
-
$ScrollBarThumb.className = 'ScrollBarThumb';
|
|
6457
|
-
const $ScrollBar = document.createElement('div');
|
|
6458
|
-
$ScrollBar.className = 'ScrollBarSmall';
|
|
6459
|
-
$ScrollBar.append($ScrollBarThumb);
|
|
6460
|
-
|
|
6461
|
-
// TODO only create scrollbar when necessary
|
|
6462
|
-
// TODO recycle nodes
|
|
6463
|
-
const $Viewlet = document.createElement('div');
|
|
6464
|
-
$Viewlet.className = 'Viewlet EditorCompletion';
|
|
6465
|
-
$Viewlet.id = 'Completions';
|
|
6466
|
-
$Viewlet.append($ListItems, $ScrollBar);
|
|
6467
|
-
return {
|
|
6468
|
-
$Viewlet,
|
|
6469
|
-
$ListItems,
|
|
6470
|
-
$ScrollBar,
|
|
6471
|
-
$ScrollBarThumb
|
|
6472
|
-
};
|
|
6473
|
-
};
|
|
6474
|
-
const attachEvents$a = state => {
|
|
6475
|
-
const {
|
|
6476
|
-
$Viewlet,
|
|
6477
|
-
$ListItems,
|
|
6478
|
-
$ScrollBar
|
|
6479
|
-
} = state;
|
|
6480
|
-
$Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
|
|
6481
|
-
attachEvents$b($ListItems, {
|
|
6482
|
-
[MouseDown]: handleMousedown
|
|
6483
|
-
});
|
|
6484
|
-
attachEvents$b($ScrollBar, {
|
|
6485
|
-
[PointerDown]: handleScrollBarPointerDown$3
|
|
6486
|
-
});
|
|
6487
|
-
};
|
|
6488
|
-
// TODO show should be passed active cursor position
|
|
6489
|
-
// this would make this function easier to test as it would avoid dependency on globals of other files
|
|
6490
|
-
|
|
6491
|
-
const setDom$7 = (state, dom) => {
|
|
6492
|
-
const {
|
|
6493
|
-
$ListItems,
|
|
6494
|
-
$Viewlet
|
|
6495
|
-
} = state;
|
|
6496
|
-
const $Root = render2(dom);
|
|
6497
|
-
// @ts-expect-error
|
|
6498
|
-
$ListItems.replaceChildren(...$Root.firstChild.childNodes);
|
|
6499
|
-
append$1($Viewlet);
|
|
6500
|
-
// TODO recycle nodes
|
|
6501
|
-
// TODO set right aria attributes on $EditorInput
|
|
6502
|
-
};
|
|
6503
|
-
const dispose$c = state => {
|
|
6504
|
-
remove$1(state.$Viewlet);
|
|
6505
|
-
// state.$EditorInput.removeAttribute('aria-activedescendant')
|
|
6506
|
-
};
|
|
6507
|
-
const showLoading = (state, x, y) => {
|
|
6508
|
-
const {
|
|
6509
|
-
$Viewlet
|
|
6510
|
-
} = state;
|
|
6511
|
-
setXAndYTransform($Viewlet, x, y);
|
|
6512
|
-
const $Loading = document.createElement('div');
|
|
6513
|
-
$Loading.textContent = 'Loading';
|
|
6514
|
-
$Viewlet.append($Loading);
|
|
6515
|
-
append$1($Viewlet);
|
|
6516
|
-
};
|
|
6517
|
-
const handleError$6 = (state, error) => {
|
|
6518
|
-
const {
|
|
6519
|
-
$Viewlet
|
|
6520
|
-
} = state;
|
|
6521
|
-
$Viewlet.textContent = `${error}`;
|
|
6522
|
-
};
|
|
6523
|
-
const setBounds$4 = (state, x, y, width, height) => {
|
|
6524
|
-
const {
|
|
6525
|
-
$Viewlet
|
|
6526
|
-
} = state;
|
|
6527
|
-
setBounds$6($Viewlet, x, y, width, height);
|
|
6528
|
-
};
|
|
6529
|
-
|
|
6530
|
-
const ViewletEditorCompletion = {
|
|
6531
|
-
__proto__: null,
|
|
6532
|
-
attachEvents: attachEvents$a,
|
|
6533
|
-
create: create$r,
|
|
6534
|
-
dispose: dispose$c,
|
|
6535
|
-
handleError: handleError$6,
|
|
6536
|
-
setBounds: setBounds$4,
|
|
6537
|
-
setContentHeight,
|
|
6538
|
-
setDom: setDom$7,
|
|
6539
|
-
setNegativeMargin,
|
|
6540
|
-
setScrollBar: setScrollBar$2,
|
|
6541
|
-
setSize,
|
|
6542
|
-
showLoading
|
|
6543
|
-
};
|
|
6544
|
-
|
|
6545
6546
|
// TODO not sure whether created dom node
|
|
6546
6547
|
// should stay in state or be removed
|
|
6547
6548
|
// one option would result in less memory usage
|
|
@@ -6583,7 +6584,7 @@ const ViewletEditorError = {
|
|
|
6583
6584
|
};
|
|
6584
6585
|
|
|
6585
6586
|
const returnValue$6 = true;
|
|
6586
|
-
const handleSashPointerDown$2 = create$
|
|
6587
|
+
const handleSashPointerDown$2 = create$u(event => {
|
|
6587
6588
|
const {
|
|
6588
6589
|
clientX,
|
|
6589
6590
|
clientY
|
|
@@ -6711,15 +6712,15 @@ const handleContextMenu$9 = event => {
|
|
|
6711
6712
|
clientY
|
|
6712
6713
|
} = event;
|
|
6713
6714
|
const uid = fromEvent(event);
|
|
6714
|
-
handleContextMenu$
|
|
6715
|
+
handleContextMenu$c(uid, button, clientX, clientY);
|
|
6715
6716
|
};
|
|
6716
6717
|
const handleError$5 = event => {
|
|
6717
6718
|
const uid = fromEvent(event);
|
|
6718
|
-
handleImageError(uid);
|
|
6719
|
+
handleImageError$1(uid);
|
|
6719
6720
|
};
|
|
6720
6721
|
const handleFocus$9 = event => {
|
|
6721
6722
|
const uid = fromEvent(event);
|
|
6722
|
-
handleFocus$
|
|
6723
|
+
handleFocus$c(uid);
|
|
6723
6724
|
};
|
|
6724
6725
|
|
|
6725
6726
|
const create$p = () => {
|
|
@@ -6733,7 +6734,7 @@ const attachEvents$9 = state => {
|
|
|
6733
6734
|
const {
|
|
6734
6735
|
$Viewlet
|
|
6735
6736
|
} = state;
|
|
6736
|
-
attachEvents$
|
|
6737
|
+
attachEvents$c($Viewlet, {
|
|
6737
6738
|
[PointerDown]: handlePointerDown$5,
|
|
6738
6739
|
[PointerUp]: handlePointerUp,
|
|
6739
6740
|
[ContextMenu]: handleContextMenu$9,
|
|
@@ -7047,7 +7048,7 @@ const handlePaste = event => {
|
|
|
7047
7048
|
const text = getText(clipboardData);
|
|
7048
7049
|
return ['paste', text];
|
|
7049
7050
|
};
|
|
7050
|
-
const handleScrollBarVerticalPointerDown = create$
|
|
7051
|
+
const handleScrollBarVerticalPointerDown = create$u(event => {
|
|
7051
7052
|
const {
|
|
7052
7053
|
clientY
|
|
7053
7054
|
} = event;
|
|
@@ -7081,7 +7082,7 @@ const handleScrollBarHorizontalPointerUp = event => {
|
|
|
7081
7082
|
target,
|
|
7082
7083
|
pointerId
|
|
7083
7084
|
} = event;
|
|
7084
|
-
stopTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7085
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7085
7086
|
return [];
|
|
7086
7087
|
};
|
|
7087
7088
|
|
|
@@ -7095,7 +7096,7 @@ const handleScrollBarHorizontalPointerDown = event => {
|
|
|
7095
7096
|
pointerId,
|
|
7096
7097
|
clientX
|
|
7097
7098
|
} = event;
|
|
7098
|
-
startTracking(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7099
|
+
startTracking$1(target, pointerId, handleScrollBarThumbHorizontalPointerMove, handleScrollBarHorizontalPointerUp);
|
|
7099
7100
|
return ['handleScrollBarHorizontalPointerDown', clientX];
|
|
7100
7101
|
};
|
|
7101
7102
|
const handleScrollBarContextMenu = event => {
|
|
@@ -7360,7 +7361,7 @@ const showOverlayMessage = (state, x, y, content) => {
|
|
|
7360
7361
|
};
|
|
7361
7362
|
const hideOverlayMessage = state => {
|
|
7362
7363
|
// TODO pass id of the overlay message and remove widget by id
|
|
7363
|
-
for (const $Widget of state$
|
|
7364
|
+
for (const $Widget of state$7.widgetSet) {
|
|
7364
7365
|
// @ts-expect-error
|
|
7365
7366
|
if ($Widget.className === 'EditorOverlayMessage') {
|
|
7366
7367
|
remove$1($Widget);
|
|
@@ -7465,7 +7466,7 @@ const handleContextMenu$7 = event => {
|
|
|
7465
7466
|
clientY
|
|
7466
7467
|
} = event;
|
|
7467
7468
|
const uid = fromEvent(event);
|
|
7468
|
-
handleContextMenu$
|
|
7469
|
+
handleContextMenu$c(uid, button, clientX, clientY);
|
|
7469
7470
|
};
|
|
7470
7471
|
|
|
7471
7472
|
const CopyMove = 'copyMove';
|
|
@@ -7591,11 +7592,11 @@ const handleFocus$7 = event => {
|
|
|
7591
7592
|
return;
|
|
7592
7593
|
}
|
|
7593
7594
|
const uid = fromEvent(event);
|
|
7594
|
-
handleFocus$
|
|
7595
|
+
handleFocus$c(uid);
|
|
7595
7596
|
};
|
|
7596
7597
|
const handleBlur$5 = event => {
|
|
7597
7598
|
const uid = fromEvent(event);
|
|
7598
|
-
handleBlur$
|
|
7599
|
+
handleBlur$a(uid);
|
|
7599
7600
|
};
|
|
7600
7601
|
const handleClick$6 = event => {
|
|
7601
7602
|
preventDefault(event);
|
|
@@ -7796,7 +7797,7 @@ const handleScrollBarPointerCaptureLost = event => {
|
|
|
7796
7797
|
target,
|
|
7797
7798
|
pointerId
|
|
7798
7799
|
} = event;
|
|
7799
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7800
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7800
7801
|
const uid = fromEvent(event);
|
|
7801
7802
|
handleScrollBarCaptureLost(uid);
|
|
7802
7803
|
};
|
|
@@ -7806,13 +7807,13 @@ const handleScrollBarPointerDown$2 = event => {
|
|
|
7806
7807
|
pointerId,
|
|
7807
7808
|
clientY
|
|
7808
7809
|
} = event;
|
|
7809
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7810
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove$1, handleScrollBarPointerCaptureLost);
|
|
7810
7811
|
const uid = fromEvent(event);
|
|
7811
7812
|
handleScrollBarClick(uid, clientY);
|
|
7812
7813
|
};
|
|
7813
7814
|
const handleFocus$6 = event => {
|
|
7814
7815
|
const uid = fromEvent(event);
|
|
7815
|
-
handleFocus$
|
|
7816
|
+
handleFocus$c(uid);
|
|
7816
7817
|
};
|
|
7817
7818
|
const handlePointerDown$3 = event => {
|
|
7818
7819
|
const {
|
|
@@ -7920,10 +7921,10 @@ const attachEvents$8 = state => {
|
|
|
7920
7921
|
$ListItems,
|
|
7921
7922
|
$ScrollBar
|
|
7922
7923
|
} = state;
|
|
7923
|
-
$ExtensionHeader.addEventListener(Input, handleInput$6, Capture);
|
|
7924
|
+
$ExtensionHeader.addEventListener(Input$1, handleInput$6, Capture);
|
|
7924
7925
|
// @ts-expect-error
|
|
7925
7926
|
$ExtensionHeader.addEventListener(Click, undefined);
|
|
7926
|
-
attachEvents$
|
|
7927
|
+
attachEvents$c($ListItems, {
|
|
7927
7928
|
[ContextMenu]: handleContextMenu$7,
|
|
7928
7929
|
[PointerDown]: handlePointerDown$3,
|
|
7929
7930
|
[Focus]: handleFocus$6,
|
|
@@ -7933,7 +7934,7 @@ const attachEvents$8 = state => {
|
|
|
7933
7934
|
$ListItems.addEventListener(TouchMove, handleTouchMove, Passive);
|
|
7934
7935
|
$ListItems.addEventListener(TouchEnd, handleTouchEnd, Passive);
|
|
7935
7936
|
$ListItems.addEventListener(Wheel, handleWheel$3, Passive);
|
|
7936
|
-
attachEvents$
|
|
7937
|
+
attachEvents$c($ScrollBar, {
|
|
7937
7938
|
[PointerDown]: handleScrollBarPointerDown$2
|
|
7938
7939
|
});
|
|
7939
7940
|
};
|
|
@@ -8052,11 +8053,11 @@ const handleInput$5 = event => {
|
|
|
8052
8053
|
};
|
|
8053
8054
|
const handleClickClose$2 = (uid, event) => {
|
|
8054
8055
|
preventDefault(event);
|
|
8055
|
-
close(uid);
|
|
8056
|
+
close$1(uid);
|
|
8056
8057
|
};
|
|
8057
8058
|
const handleClickPreviousMatch = (uid, event) => {
|
|
8058
8059
|
preventDefault(event);
|
|
8059
|
-
focusPrevious(uid);
|
|
8060
|
+
focusPrevious$1(uid);
|
|
8060
8061
|
};
|
|
8061
8062
|
const handleClickNextMatch = (uid, event) => {
|
|
8062
8063
|
preventDefault(event);
|
|
@@ -8091,11 +8092,11 @@ const handleClick$5 = event => {
|
|
|
8091
8092
|
};
|
|
8092
8093
|
const handleInputBlur = event => {
|
|
8093
8094
|
const uid = fromEvent(event);
|
|
8094
|
-
handleBlur$
|
|
8095
|
+
handleBlur$a(uid);
|
|
8095
8096
|
};
|
|
8096
8097
|
const handleFocus$5 = event => {
|
|
8097
8098
|
const uid = fromEvent(event);
|
|
8098
|
-
handleFocus$
|
|
8099
|
+
handleFocus$c(uid);
|
|
8099
8100
|
};
|
|
8100
8101
|
|
|
8101
8102
|
const ViewletFindWidgetEvents = {
|
|
@@ -8248,7 +8249,7 @@ const handleResizerPointerUp = event => {
|
|
|
8248
8249
|
target,
|
|
8249
8250
|
pointerId
|
|
8250
8251
|
} = event;
|
|
8251
|
-
stopTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8252
|
+
stopTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8252
8253
|
};
|
|
8253
8254
|
const handleResizerPointerDown = event => {
|
|
8254
8255
|
const {
|
|
@@ -8256,7 +8257,7 @@ const handleResizerPointerDown = event => {
|
|
|
8256
8257
|
pointerId,
|
|
8257
8258
|
clientX
|
|
8258
8259
|
} = event;
|
|
8259
|
-
startTracking(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8260
|
+
startTracking$1(target, pointerId, handleResizerPointerMove, handleResizerPointerUp);
|
|
8260
8261
|
const id = target.nextSibling ? 1 : 2;
|
|
8261
8262
|
const uid = fromEvent(event);
|
|
8262
8263
|
handleResizerClick(uid, id, clientX);
|
|
@@ -8778,7 +8779,7 @@ const handlePointerCaptureLost = event => {
|
|
|
8778
8779
|
target,
|
|
8779
8780
|
pointerId
|
|
8780
8781
|
} = event;
|
|
8781
|
-
stopTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8782
|
+
stopTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8782
8783
|
const id = getSashId(target);
|
|
8783
8784
|
handleSashPointerUp(id);
|
|
8784
8785
|
};
|
|
@@ -8787,7 +8788,7 @@ const handleSashPointerDown = event => {
|
|
|
8787
8788
|
target,
|
|
8788
8789
|
pointerId
|
|
8789
8790
|
} = event;
|
|
8790
|
-
startTracking(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8791
|
+
startTracking$1(target, pointerId, handleSashPointerMove, handlePointerCaptureLost);
|
|
8791
8792
|
const id = getSashId(target);
|
|
8792
8793
|
handleSashPointerDown$1(id);
|
|
8793
8794
|
};
|
|
@@ -8840,15 +8841,15 @@ const attachEvents$7 = state => {
|
|
|
8840
8841
|
$SashSideBar,
|
|
8841
8842
|
$SashPanel
|
|
8842
8843
|
} = state;
|
|
8843
|
-
attachEvents$
|
|
8844
|
+
attachEvents$c($SashSideBar, {
|
|
8844
8845
|
[PointerDown]: handleSashPointerDown,
|
|
8845
8846
|
[DoubleClick]: handleSashDoubleClick
|
|
8846
8847
|
});
|
|
8847
|
-
attachEvents$
|
|
8848
|
+
attachEvents$c($SashPanel, {
|
|
8848
8849
|
[PointerDown]: handleSashPointerDown,
|
|
8849
8850
|
[DoubleClick]: handleSashDoubleClick
|
|
8850
8851
|
});
|
|
8851
|
-
attachEvents$
|
|
8852
|
+
attachEvents$c(window, {
|
|
8852
8853
|
[Resize]: handleResize,
|
|
8853
8854
|
[Focus]: handleFocus$3,
|
|
8854
8855
|
[Blur]: handleBlur$3,
|
|
@@ -8884,7 +8885,7 @@ const handleContextMenu$6 = event => {
|
|
|
8884
8885
|
clientY
|
|
8885
8886
|
} = event;
|
|
8886
8887
|
const uid = fromEvent(event);
|
|
8887
|
-
handleContextMenu$
|
|
8888
|
+
handleContextMenu$c(uid, clientX, clientY);
|
|
8888
8889
|
};
|
|
8889
8890
|
|
|
8890
8891
|
// TODO Main should not be bound to Editor -> Lazy load Editor
|
|
@@ -8913,7 +8914,7 @@ const attachEvents$6 = state => {
|
|
|
8913
8914
|
const {
|
|
8914
8915
|
$Viewlet
|
|
8915
8916
|
} = state;
|
|
8916
|
-
attachEvents$
|
|
8917
|
+
attachEvents$c($Viewlet, {
|
|
8917
8918
|
[Drop]: handleDrop,
|
|
8918
8919
|
[DragOver]: handleDragOver,
|
|
8919
8920
|
[DragEnd]: handleDragEnd,
|
|
@@ -9004,7 +9005,7 @@ const getUid = () => {
|
|
|
9004
9005
|
if (!$Main) {
|
|
9005
9006
|
return 0;
|
|
9006
9007
|
}
|
|
9007
|
-
return get($Main);
|
|
9008
|
+
return get$5($Main);
|
|
9008
9009
|
};
|
|
9009
9010
|
const handleTabsWheel = event => {
|
|
9010
9011
|
const uid = getUid();
|
|
@@ -9051,7 +9052,7 @@ const attachEvents$5 = state => {
|
|
|
9051
9052
|
const {
|
|
9052
9053
|
$MainTabs
|
|
9053
9054
|
} = state;
|
|
9054
|
-
attachEvents$
|
|
9055
|
+
attachEvents$c($MainTabs, {
|
|
9055
9056
|
[MouseDown]: handleTabsMouseDown,
|
|
9056
9057
|
[ContextMenu]: handleTabsContextMenu,
|
|
9057
9058
|
[DragStart]: handleDragStart
|
|
@@ -9228,13 +9229,13 @@ const attachEvents$4 = state => {
|
|
|
9228
9229
|
$ButtonClose,
|
|
9229
9230
|
$PanelHeader
|
|
9230
9231
|
} = state;
|
|
9231
|
-
attachEvents$
|
|
9232
|
+
attachEvents$c($PanelHeader, {
|
|
9232
9233
|
[Click]: handleHeaderClick$2
|
|
9233
9234
|
});
|
|
9234
|
-
attachEvents$
|
|
9235
|
+
attachEvents$c($ButtonMaximize, {
|
|
9235
9236
|
[Click]: handleClickMaximize
|
|
9236
9237
|
});
|
|
9237
|
-
attachEvents$
|
|
9238
|
+
attachEvents$c($ButtonClose, {
|
|
9238
9239
|
[Click]: handleClickClose$1
|
|
9239
9240
|
});
|
|
9240
9241
|
};
|
|
@@ -9281,11 +9282,11 @@ const setSelectedIndex = (state, oldIndex, newIndex) => {
|
|
|
9281
9282
|
$PanelTabs.setAttribute(AriaActiveDescendant, $PanelTab.id);
|
|
9282
9283
|
}
|
|
9283
9284
|
};
|
|
9284
|
-
const setActionsDom$1 = (state
|
|
9285
|
+
const setActionsDom$1 = (state, actions, childUid) => {
|
|
9285
9286
|
const {
|
|
9286
9287
|
$PanelActions
|
|
9287
|
-
} = state
|
|
9288
|
-
const instances = state.instances;
|
|
9288
|
+
} = state;
|
|
9289
|
+
const instances = state$6.instances;
|
|
9289
9290
|
const instance = instances[childUid];
|
|
9290
9291
|
if (!instance) {
|
|
9291
9292
|
throw new Error(`child instance not found`);
|
|
@@ -9421,7 +9422,7 @@ const handlePointerDown = event => {
|
|
|
9421
9422
|
};
|
|
9422
9423
|
const handleBlur$2 = event => {
|
|
9423
9424
|
const uid = fromEvent(event);
|
|
9424
|
-
handleBlur$
|
|
9425
|
+
handleBlur$a(uid);
|
|
9425
9426
|
};
|
|
9426
9427
|
|
|
9427
9428
|
// TODO
|
|
@@ -9513,7 +9514,7 @@ const focus$6 = state => {
|
|
|
9513
9514
|
// - for nvda ariaRoleDescription works better
|
|
9514
9515
|
|
|
9515
9516
|
const create$a = () => {
|
|
9516
|
-
const $QuickPickInput = create$
|
|
9517
|
+
const $QuickPickInput = create$H();
|
|
9517
9518
|
$QuickPickInput.setAttribute(AriaControls, Ids.QuickPickItems); // TODO use idl once supported
|
|
9518
9519
|
$QuickPickInput.role = ComboBox;
|
|
9519
9520
|
$QuickPickInput.ariaLabel = 'Type the name of a command to run.';
|
|
@@ -9550,11 +9551,11 @@ const attachEvents$3 = state => {
|
|
|
9550
9551
|
$QuickPickItems,
|
|
9551
9552
|
$QuickPickInput
|
|
9552
9553
|
} = state;
|
|
9553
|
-
attachEvents$
|
|
9554
|
+
attachEvents$c($QuickPickItems, {
|
|
9554
9555
|
[PointerDown]: handlePointerDown
|
|
9555
9556
|
});
|
|
9556
9557
|
$QuickPickItems.addEventListener(Wheel, handleWheel$3, Passive);
|
|
9557
|
-
attachEvents$
|
|
9558
|
+
attachEvents$c($QuickPickInput, {
|
|
9558
9559
|
[Blur]: handleBlur$2,
|
|
9559
9560
|
[BeforeInput]: handleBeforeInput
|
|
9560
9561
|
});
|
|
@@ -9806,7 +9807,7 @@ const setScreenCapture = (state, id) => {
|
|
|
9806
9807
|
$Viewlet
|
|
9807
9808
|
} = state;
|
|
9808
9809
|
const $Video = document.createElement('video');
|
|
9809
|
-
const screenCapture = get
|
|
9810
|
+
const screenCapture = get(id);
|
|
9810
9811
|
$Video.srcObject = screenCapture;
|
|
9811
9812
|
$Video.onloadedmetadata = handleLoadedMetaData;
|
|
9812
9813
|
$Viewlet.append($Video);
|
|
@@ -9856,7 +9857,7 @@ const handleScrollBarPointerUp = event => {
|
|
|
9856
9857
|
target,
|
|
9857
9858
|
pointerId
|
|
9858
9859
|
} = event;
|
|
9859
|
-
stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9860
|
+
stopTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9860
9861
|
};
|
|
9861
9862
|
const handleScrollBarPointerDown$1 = event => {
|
|
9862
9863
|
const {
|
|
@@ -9864,7 +9865,7 @@ const handleScrollBarPointerDown$1 = event => {
|
|
|
9864
9865
|
pointerId,
|
|
9865
9866
|
clientY
|
|
9866
9867
|
} = event;
|
|
9867
|
-
startTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9868
|
+
startTracking$1(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerUp);
|
|
9868
9869
|
return ['handleScrollBarClick', clientY];
|
|
9869
9870
|
};
|
|
9870
9871
|
const handleToggleButtonClick = event => {
|
|
@@ -10029,7 +10030,7 @@ const attachEvents$2 = state => {
|
|
|
10029
10030
|
const {
|
|
10030
10031
|
$SideBarTitleArea
|
|
10031
10032
|
} = state;
|
|
10032
|
-
attachEvents$
|
|
10033
|
+
attachEvents$c($SideBarTitleArea, {
|
|
10033
10034
|
[Click]: handleHeaderClick
|
|
10034
10035
|
});
|
|
10035
10036
|
};
|
|
@@ -10158,7 +10159,7 @@ const ViewletSimpleBrowser = {
|
|
|
10158
10159
|
|
|
10159
10160
|
const handleFocus = event => {
|
|
10160
10161
|
const uid = fromEvent(event);
|
|
10161
|
-
handleFocus$
|
|
10162
|
+
handleFocus$c(uid);
|
|
10162
10163
|
};
|
|
10163
10164
|
const getButtonIndex = $Node => {
|
|
10164
10165
|
let index = -1;
|
|
@@ -10426,15 +10427,15 @@ const create$5 = ({
|
|
|
10426
10427
|
|
|
10427
10428
|
const handleBlur = event => {
|
|
10428
10429
|
const uid = fromEvent(event);
|
|
10429
|
-
handleBlur$
|
|
10430
|
+
handleBlur$a(uid);
|
|
10430
10431
|
};
|
|
10431
10432
|
const handleMouseDown = (event, ...args) => {
|
|
10432
10433
|
const uid = fromEvent(event);
|
|
10433
|
-
handleMouseDown$
|
|
10434
|
+
handleMouseDown$4(uid, ...args);
|
|
10434
10435
|
};
|
|
10435
10436
|
const handleKeyDown = (event, ...args) => {
|
|
10436
10437
|
const uid = fromEvent(event);
|
|
10437
|
-
handleKeyDown$
|
|
10438
|
+
handleKeyDown$5(uid, ...args);
|
|
10438
10439
|
};
|
|
10439
10440
|
|
|
10440
10441
|
const create$4 = () => {
|
|
@@ -10446,8 +10447,8 @@ const create$4 = () => {
|
|
|
10446
10447
|
};
|
|
10447
10448
|
};
|
|
10448
10449
|
const setTerminal = (state, canvasCursorId, canvasTextId) => {
|
|
10449
|
-
const canvasText = get$
|
|
10450
|
-
const canvasCursor = get$
|
|
10450
|
+
const canvasText = get$2(canvasTextId);
|
|
10451
|
+
const canvasCursor = get$2(canvasCursorId);
|
|
10451
10452
|
const {
|
|
10452
10453
|
$Viewlet
|
|
10453
10454
|
} = state;
|
|
@@ -10602,7 +10603,7 @@ const attachEvents = state => {
|
|
|
10602
10603
|
const {
|
|
10603
10604
|
$Viewlet
|
|
10604
10605
|
} = state;
|
|
10605
|
-
attachEvents$
|
|
10606
|
+
attachEvents$c($Viewlet, {
|
|
10606
10607
|
[ContextMenu]: handleContextMenu$3
|
|
10607
10608
|
});
|
|
10608
10609
|
};
|
|
@@ -10739,7 +10740,7 @@ const handleMenuClick = event => {
|
|
|
10739
10740
|
};
|
|
10740
10741
|
const handleFocusIn$2 = event => {
|
|
10741
10742
|
const uid = fromEvent(event);
|
|
10742
|
-
handleFocus$
|
|
10743
|
+
handleFocus$c(uid);
|
|
10743
10744
|
};
|
|
10744
10745
|
|
|
10745
10746
|
const ViewletTitleBarMenuBarEvents = {
|
|
@@ -10844,8 +10845,8 @@ const openMenu = (state, unFocusIndex, index, level, menuItems, menuFocusedIndex
|
|
|
10844
10845
|
$Viewlet.children[unFocusIndex].removeAttribute(AriaOwns);
|
|
10845
10846
|
}
|
|
10846
10847
|
$Viewlet.children[index].ariaExpanded = True;
|
|
10847
|
-
const $$Menus = state$
|
|
10848
|
-
state$
|
|
10848
|
+
const $$Menus = state$1.$$Menus;
|
|
10849
|
+
state$1.$$Menus = [];
|
|
10849
10850
|
// @ts-expect-error
|
|
10850
10851
|
showControlled({
|
|
10851
10852
|
x,
|
|
@@ -10923,7 +10924,7 @@ const setMenus = (state, changes, uid) => {
|
|
|
10923
10924
|
const menu = change[1];
|
|
10924
10925
|
const dom = change[2];
|
|
10925
10926
|
const $Menu = create$Menu();
|
|
10926
|
-
set$
|
|
10927
|
+
set$4($Menu, uid);
|
|
10927
10928
|
$Menu.onmouseover = handleMenuMouseOver;
|
|
10928
10929
|
$Menu.onclick = handleMenuClick;
|
|
10929
10930
|
const {
|
|
@@ -11259,7 +11260,7 @@ const handleContextMenu = event => {
|
|
|
11259
11260
|
} = event;
|
|
11260
11261
|
return ['handleContextMenu', button, clientX, clientY];
|
|
11261
11262
|
};
|
|
11262
|
-
const handleSashCornerPointerDown = create$
|
|
11263
|
+
const handleSashCornerPointerDown = create$u(event => {
|
|
11263
11264
|
const {
|
|
11264
11265
|
clientX,
|
|
11265
11266
|
clientY
|