@lvce-editor/main-area-worker 9.20.0 → 9.22.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/mainAreaWorkerMain.js +204 -20
- package/package.json +1 -1
|
@@ -272,7 +272,6 @@ const walkValue = (value, transferrables, isTransferrable) => {
|
|
|
272
272
|
for (const property of Object.values(value)) {
|
|
273
273
|
walkValue(property, transferrables, isTransferrable);
|
|
274
274
|
}
|
|
275
|
-
return;
|
|
276
275
|
}
|
|
277
276
|
};
|
|
278
277
|
const getTransferrables = value => {
|
|
@@ -1416,15 +1415,175 @@ const create$3 = rpcId => {
|
|
|
1416
1415
|
|
|
1417
1416
|
const None$1 = 'none';
|
|
1418
1417
|
|
|
1418
|
+
const Audio = 0;
|
|
1419
1419
|
const Button$2 = 1;
|
|
1420
|
+
const Col = 2;
|
|
1421
|
+
const ColGroup = 3;
|
|
1420
1422
|
const Div = 4;
|
|
1423
|
+
const H1 = 5;
|
|
1424
|
+
const Input = 6;
|
|
1425
|
+
const Kbd = 7;
|
|
1421
1426
|
const Span = 8;
|
|
1427
|
+
const Table = 9;
|
|
1428
|
+
const TBody = 10;
|
|
1429
|
+
const Td = 11;
|
|
1422
1430
|
const Text = 12;
|
|
1431
|
+
const Th = 13;
|
|
1432
|
+
const THead = 14;
|
|
1433
|
+
const Tr = 15;
|
|
1434
|
+
const I = 16;
|
|
1423
1435
|
const Img = 17;
|
|
1436
|
+
const Root = 0;
|
|
1437
|
+
const Ins = 20;
|
|
1438
|
+
const Del = 21;
|
|
1439
|
+
const H2 = 22;
|
|
1440
|
+
const H3 = 23;
|
|
1441
|
+
const H4 = 24;
|
|
1442
|
+
const H5 = 25;
|
|
1443
|
+
const H6 = 26;
|
|
1444
|
+
const Article = 27;
|
|
1445
|
+
const Aside = 28;
|
|
1446
|
+
const Footer = 29;
|
|
1447
|
+
const Header = 30;
|
|
1448
|
+
const Nav = 40;
|
|
1449
|
+
const Section = 41;
|
|
1450
|
+
const Search = 42;
|
|
1451
|
+
const Dd = 43;
|
|
1452
|
+
const Dl = 44;
|
|
1453
|
+
const Figcaption = 45;
|
|
1454
|
+
const Figure = 46;
|
|
1455
|
+
const Hr = 47;
|
|
1456
|
+
const Li = 48;
|
|
1457
|
+
const Ol = 49;
|
|
1424
1458
|
const P = 50;
|
|
1425
1459
|
const Pre = 51;
|
|
1460
|
+
const A = 53;
|
|
1461
|
+
const Abbr = 54;
|
|
1462
|
+
const Br = 55;
|
|
1463
|
+
const Cite = 56;
|
|
1464
|
+
const Data = 57;
|
|
1465
|
+
const Time = 58;
|
|
1466
|
+
const Tfoot = 59;
|
|
1467
|
+
const Ul = 60;
|
|
1468
|
+
const Video = 61;
|
|
1469
|
+
const TextArea = 62;
|
|
1470
|
+
const Select = 63;
|
|
1471
|
+
const Option = 64;
|
|
1472
|
+
const Code = 65;
|
|
1473
|
+
const Label = 66;
|
|
1474
|
+
const Dt = 67;
|
|
1475
|
+
const Iframe = 68;
|
|
1476
|
+
const Main$2 = 69;
|
|
1477
|
+
const Strong = 70;
|
|
1478
|
+
const Em = 71;
|
|
1479
|
+
const Style = 72;
|
|
1480
|
+
const Html = 73;
|
|
1481
|
+
const Head = 74;
|
|
1482
|
+
const Title = 75;
|
|
1483
|
+
const Meta = 76;
|
|
1484
|
+
const Canvas = 77;
|
|
1485
|
+
const Form = 78;
|
|
1486
|
+
const BlockQuote = 79;
|
|
1487
|
+
const Quote = 80;
|
|
1488
|
+
const Circle = 81;
|
|
1489
|
+
const Defs = 82;
|
|
1490
|
+
const Ellipse = 83;
|
|
1491
|
+
const G = 84;
|
|
1492
|
+
const Line = 85;
|
|
1493
|
+
const Path = 86;
|
|
1494
|
+
const Polygon = 87;
|
|
1495
|
+
const Polyline = 88;
|
|
1496
|
+
const Rect = 89;
|
|
1497
|
+
const Svg = 90;
|
|
1498
|
+
const Use = 91;
|
|
1426
1499
|
const Reference = 100;
|
|
1427
1500
|
|
|
1501
|
+
const VirtualDomElements = {
|
|
1502
|
+
__proto__: null,
|
|
1503
|
+
A,
|
|
1504
|
+
Abbr,
|
|
1505
|
+
Article,
|
|
1506
|
+
Aside,
|
|
1507
|
+
Audio,
|
|
1508
|
+
BlockQuote,
|
|
1509
|
+
Br,
|
|
1510
|
+
Button: Button$2,
|
|
1511
|
+
Canvas,
|
|
1512
|
+
Circle,
|
|
1513
|
+
Cite,
|
|
1514
|
+
Code,
|
|
1515
|
+
Col,
|
|
1516
|
+
ColGroup,
|
|
1517
|
+
Data,
|
|
1518
|
+
Dd,
|
|
1519
|
+
Defs,
|
|
1520
|
+
Del,
|
|
1521
|
+
Div,
|
|
1522
|
+
Dl,
|
|
1523
|
+
Dt,
|
|
1524
|
+
Ellipse,
|
|
1525
|
+
Em,
|
|
1526
|
+
Figcaption,
|
|
1527
|
+
Figure,
|
|
1528
|
+
Footer,
|
|
1529
|
+
Form,
|
|
1530
|
+
G,
|
|
1531
|
+
H1,
|
|
1532
|
+
H2,
|
|
1533
|
+
H3,
|
|
1534
|
+
H4,
|
|
1535
|
+
H5,
|
|
1536
|
+
H6,
|
|
1537
|
+
Head,
|
|
1538
|
+
Header,
|
|
1539
|
+
Hr,
|
|
1540
|
+
Html,
|
|
1541
|
+
I,
|
|
1542
|
+
Iframe,
|
|
1543
|
+
Img,
|
|
1544
|
+
Input,
|
|
1545
|
+
Ins,
|
|
1546
|
+
Kbd,
|
|
1547
|
+
Label,
|
|
1548
|
+
Li,
|
|
1549
|
+
Line,
|
|
1550
|
+
Main: Main$2,
|
|
1551
|
+
Meta,
|
|
1552
|
+
Nav,
|
|
1553
|
+
Ol,
|
|
1554
|
+
Option,
|
|
1555
|
+
P,
|
|
1556
|
+
Path,
|
|
1557
|
+
Polygon,
|
|
1558
|
+
Polyline,
|
|
1559
|
+
Pre,
|
|
1560
|
+
Quote,
|
|
1561
|
+
Rect,
|
|
1562
|
+
Reference,
|
|
1563
|
+
Root,
|
|
1564
|
+
Search,
|
|
1565
|
+
Section,
|
|
1566
|
+
Select,
|
|
1567
|
+
Span,
|
|
1568
|
+
Strong,
|
|
1569
|
+
Style,
|
|
1570
|
+
Svg,
|
|
1571
|
+
TBody,
|
|
1572
|
+
THead,
|
|
1573
|
+
Table,
|
|
1574
|
+
Td,
|
|
1575
|
+
Text,
|
|
1576
|
+
TextArea,
|
|
1577
|
+
Tfoot,
|
|
1578
|
+
Th,
|
|
1579
|
+
Time,
|
|
1580
|
+
Title,
|
|
1581
|
+
Tr,
|
|
1582
|
+
Ul,
|
|
1583
|
+
Use,
|
|
1584
|
+
Video
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1428
1587
|
const Button$1 = 'event.button';
|
|
1429
1588
|
const ClientX = 'event.clientX';
|
|
1430
1589
|
const ClientY = 'event.clientY';
|
|
@@ -2305,6 +2464,7 @@ const getEditorInputEditorType = editorInput => {
|
|
|
2305
2464
|
case 'diff-editor':
|
|
2306
2465
|
case 'extension-detail-view':
|
|
2307
2466
|
case 'image':
|
|
2467
|
+
case 'process-explorer':
|
|
2308
2468
|
case 'video':
|
|
2309
2469
|
return 'custom';
|
|
2310
2470
|
case 'editor':
|
|
@@ -2322,6 +2482,8 @@ const getEditorInputUri = editorInput => {
|
|
|
2322
2482
|
return editorInput.uri;
|
|
2323
2483
|
case 'extension-detail-view':
|
|
2324
2484
|
return `extension-detail://${editorInput.extensionId}`;
|
|
2485
|
+
case 'process-explorer':
|
|
2486
|
+
return 'process-explorer://';
|
|
2325
2487
|
}
|
|
2326
2488
|
};
|
|
2327
2489
|
|
|
@@ -2386,6 +2548,11 @@ const getEditorInputFromUri = uri => {
|
|
|
2386
2548
|
};
|
|
2387
2549
|
}
|
|
2388
2550
|
}
|
|
2551
|
+
if (uri.startsWith('process-explorer://')) {
|
|
2552
|
+
return {
|
|
2553
|
+
type: 'process-explorer'
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2389
2556
|
const extension = getLowerCaseExtension(uri);
|
|
2390
2557
|
if (imageExtensions.has(extension)) {
|
|
2391
2558
|
return {
|
|
@@ -2555,6 +2722,7 @@ const getViewletModuleId$1 = async uri => {
|
|
|
2555
2722
|
const DiffEditor = 'DiffEditor';
|
|
2556
2723
|
const EditorText = 'Editor';
|
|
2557
2724
|
const ExtensionDetail = 'ExtensionDetail';
|
|
2725
|
+
const ProcessExplorer = 'ProcessExplorer';
|
|
2558
2726
|
const QuickPick = 'QuickPick';
|
|
2559
2727
|
|
|
2560
2728
|
const getViewletModuleIdForEditorInput = async editorInput => {
|
|
@@ -2567,6 +2735,8 @@ const getViewletModuleIdForEditorInput = async editorInput => {
|
|
|
2567
2735
|
return getViewletModuleId$1(editorInput.uri);
|
|
2568
2736
|
case 'extension-detail-view':
|
|
2569
2737
|
return ExtensionDetail;
|
|
2738
|
+
case 'process-explorer':
|
|
2739
|
+
return ProcessExplorer;
|
|
2570
2740
|
}
|
|
2571
2741
|
};
|
|
2572
2742
|
|
|
@@ -3115,6 +3285,8 @@ const getEditorInputTitle = editorInput => {
|
|
|
3115
3285
|
return getLabel(editorInput.uri);
|
|
3116
3286
|
case 'extension-detail-view':
|
|
3117
3287
|
return editorInput.extensionId;
|
|
3288
|
+
case 'process-explorer':
|
|
3289
|
+
return 'Process Explorer';
|
|
3118
3290
|
}
|
|
3119
3291
|
};
|
|
3120
3292
|
|
|
@@ -3398,8 +3570,7 @@ const getIconsCached = (dirents, fileIconCache) => {
|
|
|
3398
3570
|
return dirents.map(dirent => fileIconCache[dirent]);
|
|
3399
3571
|
};
|
|
3400
3572
|
|
|
3401
|
-
const ExtensionDetailScheme = 'extension-detail://';
|
|
3402
|
-
const ExtensionIconName = 'extensions';
|
|
3573
|
+
const ExtensionDetailScheme$1 = 'extension-detail://';
|
|
3403
3574
|
const getBasename = uri => {
|
|
3404
3575
|
const lastSlashIndex = uri.lastIndexOf('/');
|
|
3405
3576
|
if (lastSlashIndex === -1) {
|
|
@@ -3410,7 +3581,7 @@ const getBasename = uri => {
|
|
|
3410
3581
|
const getMissingTabs = (tabs, fileIconCache) => {
|
|
3411
3582
|
const missingTabs = [];
|
|
3412
3583
|
for (const tab of tabs) {
|
|
3413
|
-
if (tab.uri && !(tab.uri in fileIconCache)) {
|
|
3584
|
+
if (tab.uri && !tab.uri.startsWith(ExtensionDetailScheme$1) && !(tab.uri in fileIconCache)) {
|
|
3414
3585
|
missingTabs.push(tab);
|
|
3415
3586
|
}
|
|
3416
3587
|
}
|
|
@@ -3418,13 +3589,6 @@ const getMissingTabs = (tabs, fileIconCache) => {
|
|
|
3418
3589
|
};
|
|
3419
3590
|
const tabToIconRequest = tab => {
|
|
3420
3591
|
const uri = tab.uri || '';
|
|
3421
|
-
if (uri.startsWith(ExtensionDetailScheme)) {
|
|
3422
|
-
return {
|
|
3423
|
-
name: ExtensionIconName,
|
|
3424
|
-
path: uri,
|
|
3425
|
-
type: Directory
|
|
3426
|
-
};
|
|
3427
|
-
}
|
|
3428
3592
|
return {
|
|
3429
3593
|
name: getBasename(uri),
|
|
3430
3594
|
path: uri,
|
|
@@ -3632,7 +3796,7 @@ const openUri = async (state, options) => {
|
|
|
3632
3796
|
const preview = typeof options === 'string' ? false : options.preview ?? false;
|
|
3633
3797
|
return openInput(state, {
|
|
3634
3798
|
editorInput: getNormalizedOpenEditorInput(uri),
|
|
3635
|
-
|
|
3799
|
+
focus: typeof options === 'string' ? false : options.focus,
|
|
3636
3800
|
preview
|
|
3637
3801
|
});
|
|
3638
3802
|
};
|
|
@@ -3648,7 +3812,7 @@ const retryOpen = async state => {
|
|
|
3648
3812
|
if (tab.editorInput) {
|
|
3649
3813
|
return openInput(state, {
|
|
3650
3814
|
editorInput: tab.editorInput,
|
|
3651
|
-
|
|
3815
|
+
focus: false,
|
|
3652
3816
|
preview: tab.isPreview
|
|
3653
3817
|
});
|
|
3654
3818
|
}
|
|
@@ -3964,6 +4128,7 @@ const SplitEditorGroupButton = 'SplitEditorGroupButton';
|
|
|
3964
4128
|
const MaskIconPreview = 'MaskIcon MaskIconPreview';
|
|
3965
4129
|
const MaskIconCircleFilled = 'MaskIcon MaskIconCircleFilled';
|
|
3966
4130
|
const MaskIconClose = 'MaskIcon MaskIconClose';
|
|
4131
|
+
const MaskIconExtensions = 'MaskIcon MaskIconExtensions';
|
|
3967
4132
|
const TextEditor = 'TextEditor';
|
|
3968
4133
|
const TextEditorLoading = 'TextEditor TextEditor--loading';
|
|
3969
4134
|
const EditorContentLoading = 'EditorContent EditorContent--loading';
|
|
@@ -5235,6 +5400,8 @@ const text = data => {
|
|
|
5235
5400
|
};
|
|
5236
5401
|
};
|
|
5237
5402
|
|
|
5403
|
+
new Set(Object.values(VirtualDomElements));
|
|
5404
|
+
|
|
5238
5405
|
const SetText = 1;
|
|
5239
5406
|
const Replace = 2;
|
|
5240
5407
|
const SetAttribute = 3;
|
|
@@ -5620,6 +5787,28 @@ const renderTabActions = (isDirty, tabIndex, groupIndex) => {
|
|
|
5620
5787
|
}];
|
|
5621
5788
|
};
|
|
5622
5789
|
|
|
5790
|
+
const ExtensionDetailScheme = 'extension-detail://';
|
|
5791
|
+
const renderTabIcon = tab => {
|
|
5792
|
+
if (tab.uri?.startsWith(ExtensionDetailScheme)) {
|
|
5793
|
+
return [{
|
|
5794
|
+
childCount: 1,
|
|
5795
|
+
className: TabIcon,
|
|
5796
|
+
role: None$1,
|
|
5797
|
+
type: Div
|
|
5798
|
+
}, {
|
|
5799
|
+
childCount: 0,
|
|
5800
|
+
className: MaskIconExtensions,
|
|
5801
|
+
type: Div
|
|
5802
|
+
}];
|
|
5803
|
+
}
|
|
5804
|
+
return [{
|
|
5805
|
+
childCount: 0,
|
|
5806
|
+
className: TabIcon,
|
|
5807
|
+
role: None$1,
|
|
5808
|
+
src: tab.icon,
|
|
5809
|
+
type: Img
|
|
5810
|
+
}];
|
|
5811
|
+
};
|
|
5623
5812
|
const renderTab = (tab, isActive, tabIndex, groupIndex) => {
|
|
5624
5813
|
const closeButtonNodes = renderTabActions(tab.isDirty, tabIndex, groupIndex);
|
|
5625
5814
|
let className = MainTab;
|
|
@@ -5643,13 +5832,7 @@ const renderTab = (tab, isActive, tabIndex, groupIndex) => {
|
|
|
5643
5832
|
role: 'tab',
|
|
5644
5833
|
title: tab.uriTitle || tab.uri || tab.title,
|
|
5645
5834
|
type: Div
|
|
5646
|
-
}, {
|
|
5647
|
-
childCount: 0,
|
|
5648
|
-
className: TabIcon,
|
|
5649
|
-
role: None$1,
|
|
5650
|
-
src: tab.icon,
|
|
5651
|
-
type: Img
|
|
5652
|
-
}, {
|
|
5835
|
+
}, ...renderTabIcon(tab), {
|
|
5653
5836
|
childCount: 1,
|
|
5654
5837
|
className: TabTitle,
|
|
5655
5838
|
type: Span
|
|
@@ -6491,6 +6674,7 @@ const commandMap = {
|
|
|
6491
6674
|
'MainArea.handleTabContextMenu': wrapCommand(handleTabContextMenu),
|
|
6492
6675
|
'MainArea.handleUriChange': wrapCommand(handleUriChange),
|
|
6493
6676
|
'MainArea.handleWorkspaceChange': wrapCommand(handleWorkspaceChange),
|
|
6677
|
+
'MainArea.hasActiveTextEditor': wrapGetter(hasActiveTextEditor),
|
|
6494
6678
|
'MainArea.initialize': initialize,
|
|
6495
6679
|
'MainArea.loadContent': wrapCommand(loadContent),
|
|
6496
6680
|
'MainArea.moveIntoNewWindow': wrapCommand(moveIntoNewWindow),
|