@lvce-editor/source-control-worker 3.14.0 → 3.14.1
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/sourceControlWorkerMain.js +25 -12
- package/package.json +1 -1
|
@@ -1744,8 +1744,9 @@ const getIconDefinitions = async (providerIds, assetDir, platform) => {
|
|
|
1744
1744
|
return [];
|
|
1745
1745
|
}
|
|
1746
1746
|
const icons = extension['source-control-icons'].filter(icon => typeof icon === 'string');
|
|
1747
|
+
const baseUri = extension.uri.endsWith('/') ? extension.uri : `${extension.uri}/`;
|
|
1747
1748
|
return icons.map(icon => {
|
|
1748
|
-
const uri =
|
|
1749
|
+
const uri = new URL(icon, baseUri).href;
|
|
1749
1750
|
if (platform === Electron || platform === Remote) {
|
|
1750
1751
|
const protocol = getProtocol(uri);
|
|
1751
1752
|
const path = getPath(protocol, uri);
|
|
@@ -3344,11 +3345,18 @@ const renderCss = (oldState, newState) => {
|
|
|
3344
3345
|
const listHeight = Math.max(height - headerHeight, 0);
|
|
3345
3346
|
const scrollBarY = scrollBarHeight > 0 ? getScrollBarY(deltaY, finalDeltaY, listHeight, scrollBarHeight) : 0;
|
|
3346
3347
|
const itemOffset = -(deltaY % itemHeight);
|
|
3347
|
-
const indentCss = indentRules ?
|
|
3348
|
+
const indentCss = indentRules ? `${indentRules}\n` : '';
|
|
3348
3349
|
const css = `:root {
|
|
3349
3350
|
--SourceControlInputHeight: ${inputBoxHeight}px;
|
|
3350
3351
|
}
|
|
3351
3352
|
|
|
3353
|
+
.SourceControl .SplitButtonContent > .MaskIcon {
|
|
3354
|
+
width: 16px;
|
|
3355
|
+
height: 16px;
|
|
3356
|
+
margin-right: 4px;
|
|
3357
|
+
flex-shrink: 0;
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3352
3360
|
.SourceControl .ScrollBarThumb {
|
|
3353
3361
|
height: ${scrollBarHeight}px;
|
|
3354
3362
|
translate: 0 ${Math.round(scrollBarY)}px;
|
|
@@ -3357,7 +3365,11 @@ const renderCss = (oldState, newState) => {
|
|
|
3357
3365
|
.SourceControlItems > .TreeItem:first-child {
|
|
3358
3366
|
margin-top: ${itemOffset}px;
|
|
3359
3367
|
}
|
|
3360
|
-
|
|
3368
|
+
|
|
3369
|
+
${indentCss}.IndentRight-12 {
|
|
3370
|
+
padding-right: 12px;
|
|
3371
|
+
}
|
|
3372
|
+
`;
|
|
3361
3373
|
return [SetCss, id, css];
|
|
3362
3374
|
};
|
|
3363
3375
|
|
|
@@ -3381,6 +3393,7 @@ const InputBox = 'InputBox';
|
|
|
3381
3393
|
const Label = 'Label';
|
|
3382
3394
|
const LabelDetail = 'LabelDetail';
|
|
3383
3395
|
const List = 'List';
|
|
3396
|
+
const ListItems = 'ListItems';
|
|
3384
3397
|
const Message = 'Message';
|
|
3385
3398
|
const Progress = 'Progress';
|
|
3386
3399
|
const ProgressContainer = 'ProgressContainer';
|
|
@@ -3399,6 +3412,7 @@ const SplitButtonDisabled = 'SplitButtonDisabled';
|
|
|
3399
3412
|
const StrikeThrough = 'StrikeThrough';
|
|
3400
3413
|
const TreeItem = 'TreeItem';
|
|
3401
3414
|
const Viewlet = 'Viewlet';
|
|
3415
|
+
const ViewSourceControlInput = 'ViewSourceControlInput';
|
|
3402
3416
|
|
|
3403
3417
|
const HandleClickAt = 1;
|
|
3404
3418
|
const HandleContextMenu = 2;
|
|
@@ -3469,8 +3483,13 @@ const messageNode$1 = {
|
|
|
3469
3483
|
className: Message,
|
|
3470
3484
|
type: Div
|
|
3471
3485
|
};
|
|
3486
|
+
const inputWrapperNode = {
|
|
3487
|
+
childCount: 1,
|
|
3488
|
+
className: ViewSourceControlInput,
|
|
3489
|
+
type: Div
|
|
3490
|
+
};
|
|
3472
3491
|
const getSourceControlInputDom = (inputPlaceholder, inputMessage) => {
|
|
3473
|
-
const dom = [{
|
|
3492
|
+
const dom = [inputWrapperNode, {
|
|
3474
3493
|
ariaLabel: sourceControlInput(),
|
|
3475
3494
|
autocapitalize: 'off',
|
|
3476
3495
|
autocorrect: 'off',
|
|
@@ -3564,13 +3583,9 @@ const getLabelClassName = decorationStrikeThrough => {
|
|
|
3564
3583
|
};
|
|
3565
3584
|
|
|
3566
3585
|
const getTreeItemClassName = indent => {
|
|
3567
|
-
|
|
3568
|
-
className = mergeClassNames(className, `Indent-${indent}`);
|
|
3569
|
-
return className;
|
|
3586
|
+
return mergeClassNames(TreeItem, `Indent-${indent}`, 'IndentRight-12');
|
|
3570
3587
|
};
|
|
3571
3588
|
|
|
3572
|
-
const PaddingRight = '12px';
|
|
3573
|
-
|
|
3574
3589
|
const createItemDirectory = item => {
|
|
3575
3590
|
const {
|
|
3576
3591
|
badgeCount,
|
|
@@ -3593,7 +3608,6 @@ const createItemDirectory = item => {
|
|
|
3593
3608
|
ariaSetSize: setSize,
|
|
3594
3609
|
childCount: 3 + (hasButtons ? 1 : 0),
|
|
3595
3610
|
className: treeItemClassName,
|
|
3596
|
-
paddingRight: PaddingRight,
|
|
3597
3611
|
role: TreeItem$1,
|
|
3598
3612
|
type: Div
|
|
3599
3613
|
}, {
|
|
@@ -3658,7 +3672,6 @@ const createItemOther = item => {
|
|
|
3658
3672
|
ariaSetSize: setSize,
|
|
3659
3673
|
childCount: 3 + (hasButtons ? 1 : 0),
|
|
3660
3674
|
className: treeItemClassName,
|
|
3661
|
-
paddingRight: '12px',
|
|
3662
3675
|
role: TreeItem$1,
|
|
3663
3676
|
title: file,
|
|
3664
3677
|
type: Div
|
|
@@ -3702,7 +3715,7 @@ const getSourceControlListVirtualDom = (items, scrollBarHeight, scrollBarActive)
|
|
|
3702
3715
|
type: Div
|
|
3703
3716
|
}, {
|
|
3704
3717
|
childCount: items.length,
|
|
3705
|
-
className: SourceControlItems,
|
|
3718
|
+
className: mergeClassNames(ListItems, SourceControlItems),
|
|
3706
3719
|
onClick: HandleClickAt,
|
|
3707
3720
|
onPointerOut: HandleMouseOutAt,
|
|
3708
3721
|
onPointerOver: HandleMouseOverAt,
|