@lvce-editor/status-bar-worker 3.4.0 → 3.5.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/statusBarWorkerMain.js +11 -8
- package/package.json +1 -1
|
@@ -1597,18 +1597,19 @@ const toStatusBarItem = uiStatusBarItem => {
|
|
|
1597
1597
|
});
|
|
1598
1598
|
}
|
|
1599
1599
|
const ariaLabel = uiStatusBarItem.text || uiStatusBarItem.tooltip || uiStatusBarItem.name;
|
|
1600
|
+
const tooltip = uiStatusBarItem.tooltip || ariaLabel;
|
|
1600
1601
|
return {
|
|
1601
1602
|
ariaLabel,
|
|
1602
1603
|
command: uiStatusBarItem.command || undefined,
|
|
1603
1604
|
elements,
|
|
1604
1605
|
name: uiStatusBarItem.name,
|
|
1605
|
-
tooltip
|
|
1606
|
+
tooltip
|
|
1606
1607
|
};
|
|
1607
1608
|
};
|
|
1608
1609
|
|
|
1609
1610
|
const getActualIcon = extensionHostStatusBarItem => {
|
|
1610
1611
|
if (extensionHostStatusBarItem.icon === 'branch') {
|
|
1611
|
-
return '
|
|
1612
|
+
return 'MaskIconSourceControl';
|
|
1612
1613
|
}
|
|
1613
1614
|
return extensionHostStatusBarItem.icon || '';
|
|
1614
1615
|
};
|
|
@@ -1833,26 +1834,28 @@ const text = data => {
|
|
|
1833
1834
|
const HandleContextMenu = 2;
|
|
1834
1835
|
const HandleClick = 11;
|
|
1835
1836
|
|
|
1836
|
-
const getTextVirtualDom = element => {
|
|
1837
|
+
const getTextVirtualDom = (element, name) => {
|
|
1837
1838
|
return [{
|
|
1838
1839
|
childCount: 1,
|
|
1839
1840
|
className: 'StatusBarItemLabel',
|
|
1841
|
+
name,
|
|
1840
1842
|
type: Span
|
|
1841
1843
|
}, text(element.value)];
|
|
1842
1844
|
};
|
|
1843
|
-
const getIconVirtualDom = element => {
|
|
1845
|
+
const getIconVirtualDom = (element, name) => {
|
|
1844
1846
|
return [{
|
|
1845
1847
|
childCount: 0,
|
|
1846
1848
|
className: mergeClassNames(MaskIcon, element.value),
|
|
1849
|
+
name,
|
|
1847
1850
|
type: Div
|
|
1848
1851
|
}];
|
|
1849
1852
|
};
|
|
1850
|
-
const getStatusBarItemElementVirtualDom = element => {
|
|
1853
|
+
const getStatusBarItemElementVirtualDom = (element, name) => {
|
|
1851
1854
|
if (element.type === 'text') {
|
|
1852
|
-
return getTextVirtualDom(element);
|
|
1855
|
+
return getTextVirtualDom(element, name);
|
|
1853
1856
|
}
|
|
1854
1857
|
if (element.type === 'icon') {
|
|
1855
|
-
return getIconVirtualDom(element);
|
|
1858
|
+
return getIconVirtualDom(element, name);
|
|
1856
1859
|
}
|
|
1857
1860
|
return [];
|
|
1858
1861
|
};
|
|
@@ -1864,7 +1867,7 @@ const getStatusBarItemVirtualDom = statusBarItem => {
|
|
|
1864
1867
|
name,
|
|
1865
1868
|
tooltip
|
|
1866
1869
|
} = statusBarItem;
|
|
1867
|
-
const elementNodes = elements.flatMap(getStatusBarItemElementVirtualDom);
|
|
1870
|
+
const elementNodes = elements.flatMap(element => getStatusBarItemElementVirtualDom(element, name));
|
|
1868
1871
|
const buttonNode = {
|
|
1869
1872
|
ariaLabel,
|
|
1870
1873
|
childCount: elements.length,
|