@lvce-editor/source-control-worker 3.6.5 → 3.8.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/sourceControlWorkerMain.js +38 -32
- package/package.json +1 -1
|
@@ -3328,16 +3328,18 @@ const HandleScrollBarMove = 12;
|
|
|
3328
3328
|
const HandleScrollBarPointerCaptureLost = 13;
|
|
3329
3329
|
const HandleScrollBarPointerDown = 14;
|
|
3330
3330
|
|
|
3331
|
+
const progressContainerNode = {
|
|
3332
|
+
childCount: 1,
|
|
3333
|
+
className: ProgressContainer,
|
|
3334
|
+
type: Div
|
|
3335
|
+
};
|
|
3336
|
+
const progressNode = {
|
|
3337
|
+
childCount: 0,
|
|
3338
|
+
className: Progress,
|
|
3339
|
+
type: Div
|
|
3340
|
+
};
|
|
3331
3341
|
const getProgressVirtualDom = () => {
|
|
3332
|
-
return [
|
|
3333
|
-
childCount: 1,
|
|
3334
|
-
className: ProgressContainer,
|
|
3335
|
-
type: Div
|
|
3336
|
-
}, {
|
|
3337
|
-
childCount: 0,
|
|
3338
|
-
className: Progress,
|
|
3339
|
-
type: Div
|
|
3340
|
-
}];
|
|
3342
|
+
return [progressContainerNode, progressNode];
|
|
3341
3343
|
};
|
|
3342
3344
|
|
|
3343
3345
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
@@ -3376,6 +3378,11 @@ const getSourceControlButtonVirtualDom = (button, disabled) => {
|
|
|
3376
3378
|
}, text(label)];
|
|
3377
3379
|
};
|
|
3378
3380
|
|
|
3381
|
+
const messageNode$1 = {
|
|
3382
|
+
childCount: 1,
|
|
3383
|
+
className: Message,
|
|
3384
|
+
type: Div
|
|
3385
|
+
};
|
|
3379
3386
|
const getSourceControlInputDom = (inputPlaceholder, inputMessage) => {
|
|
3380
3387
|
const dom = [{
|
|
3381
3388
|
ariaLabel: sourceControlInput(),
|
|
@@ -3391,11 +3398,7 @@ const getSourceControlInputDom = (inputPlaceholder, inputMessage) => {
|
|
|
3391
3398
|
type: TextArea
|
|
3392
3399
|
}];
|
|
3393
3400
|
if (inputMessage) {
|
|
3394
|
-
dom.push({
|
|
3395
|
-
childCount: 1,
|
|
3396
|
-
className: Message,
|
|
3397
|
-
type: Div
|
|
3398
|
-
}, {
|
|
3401
|
+
dom.push(messageNode$1, {
|
|
3399
3402
|
text: inputMessage,
|
|
3400
3403
|
type: Text
|
|
3401
3404
|
});
|
|
@@ -3412,16 +3415,17 @@ const getSourceControlHeaderVirtualDom = (inputPlaceholder, inputMessage) => {
|
|
|
3412
3415
|
}, ...inputDom];
|
|
3413
3416
|
};
|
|
3414
3417
|
|
|
3418
|
+
const scrollBarNode = {
|
|
3419
|
+
childCount: 1,
|
|
3420
|
+
className: mergeClassNames(ScrollBar, ScrollBarSmall),
|
|
3421
|
+
onPointerDown: HandleScrollBarPointerDown,
|
|
3422
|
+
type: Div
|
|
3423
|
+
};
|
|
3415
3424
|
const getScrollBarVirtualDom = (scrollBarHeight, scrollBarActive) => {
|
|
3416
3425
|
if (scrollBarHeight <= 0) {
|
|
3417
3426
|
return [];
|
|
3418
3427
|
}
|
|
3419
|
-
return [{
|
|
3420
|
-
childCount: 1,
|
|
3421
|
-
className: mergeClassNames(ScrollBar, ScrollBarSmall),
|
|
3422
|
-
onPointerDown: HandleScrollBarPointerDown,
|
|
3423
|
-
type: Div
|
|
3424
|
-
}, {
|
|
3428
|
+
return [scrollBarNode, {
|
|
3425
3429
|
childCount: 0,
|
|
3426
3430
|
className: mergeClassNames(ScrollBarThumb, scrollBarActive ? ScrollBarThumbActive : ''),
|
|
3427
3431
|
type: Div
|
|
@@ -3532,6 +3536,11 @@ const chevron = {
|
|
|
3532
3536
|
className: Chevron,
|
|
3533
3537
|
type: Div
|
|
3534
3538
|
};
|
|
3539
|
+
const labelDetailNode = {
|
|
3540
|
+
childCount: 1,
|
|
3541
|
+
className: LabelDetail,
|
|
3542
|
+
type: Span
|
|
3543
|
+
};
|
|
3535
3544
|
const getIconsDom = (icon, fileIcon) => {
|
|
3536
3545
|
if (icon === ChevronRight) {
|
|
3537
3546
|
return [chevron, getIconVirtualDom(icon)];
|
|
@@ -3576,11 +3585,7 @@ const createItemOther = item => {
|
|
|
3576
3585
|
dom.push(labelDom, text(label));
|
|
3577
3586
|
if (detail) {
|
|
3578
3587
|
labelDom.childCount++;
|
|
3579
|
-
dom.push(
|
|
3580
|
-
childCount: 1,
|
|
3581
|
-
className: LabelDetail,
|
|
3582
|
-
type: Span
|
|
3583
|
-
}, text(detail));
|
|
3588
|
+
dom.push(labelDetailNode, text(detail));
|
|
3584
3589
|
}
|
|
3585
3590
|
dom.push(...buttonsDom);
|
|
3586
3591
|
dom.push({
|
|
@@ -3621,14 +3626,15 @@ const getSourceControlListVirtualDom = (items, scrollBarHeight, scrollBarActive)
|
|
|
3621
3626
|
};
|
|
3622
3627
|
|
|
3623
3628
|
const className = mergeClassNames(Viewlet, SourceControl);
|
|
3629
|
+
const messageNode = {
|
|
3630
|
+
childCount: 1,
|
|
3631
|
+
className: Message,
|
|
3632
|
+
paddingLeft: '20px',
|
|
3633
|
+
paddingRight: '20px',
|
|
3634
|
+
type: Div
|
|
3635
|
+
};
|
|
3624
3636
|
const getSourceControlVirtualDom = (items, buttons, disabled, placeholder, inputMessage, message, loading, scrollBarHeight, scrollBarActive) => {
|
|
3625
|
-
const content = message ? [
|
|
3626
|
-
childCount: 1,
|
|
3627
|
-
className: Message,
|
|
3628
|
-
paddingLeft: '20px',
|
|
3629
|
-
paddingRight: '20px',
|
|
3630
|
-
type: Div
|
|
3631
|
-
}, text(message)] : [...getSourceControlHeaderVirtualDom(placeholder, inputMessage), ...buttons.flatMap(button => getSourceControlButtonVirtualDom(button, disabled)), ...getSourceControlListVirtualDom(items, scrollBarHeight, scrollBarActive)];
|
|
3637
|
+
const content = message ? [messageNode, text(message)] : [...getSourceControlHeaderVirtualDom(placeholder, inputMessage), ...buttons.flatMap(button => getSourceControlButtonVirtualDom(button, disabled)), ...getSourceControlListVirtualDom(items, scrollBarHeight, scrollBarActive)];
|
|
3632
3638
|
const progressDom = loading ? getProgressVirtualDom() : [];
|
|
3633
3639
|
const dom = [{
|
|
3634
3640
|
ariaBusy: loading,
|