@lvce-editor/source-control-worker 3.6.5 → 3.7.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.
@@ -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
  });
@@ -3532,6 +3535,11 @@ const chevron = {
3532
3535
  className: Chevron,
3533
3536
  type: Div
3534
3537
  };
3538
+ const labelDetailNode = {
3539
+ childCount: 1,
3540
+ className: LabelDetail,
3541
+ type: Span
3542
+ };
3535
3543
  const getIconsDom = (icon, fileIcon) => {
3536
3544
  if (icon === ChevronRight) {
3537
3545
  return [chevron, getIconVirtualDom(icon)];
@@ -3576,11 +3584,7 @@ const createItemOther = item => {
3576
3584
  dom.push(labelDom, text(label));
3577
3585
  if (detail) {
3578
3586
  labelDom.childCount++;
3579
- dom.push({
3580
- childCount: 1,
3581
- className: LabelDetail,
3582
- type: Span
3583
- }, text(detail));
3587
+ dom.push(labelDetailNode, text(detail));
3584
3588
  }
3585
3589
  dom.push(...buttonsDom);
3586
3590
  dom.push({
@@ -3621,14 +3625,15 @@ const getSourceControlListVirtualDom = (items, scrollBarHeight, scrollBarActive)
3621
3625
  };
3622
3626
 
3623
3627
  const className = mergeClassNames(Viewlet, SourceControl);
3628
+ const messageNode = {
3629
+ childCount: 1,
3630
+ className: Message,
3631
+ paddingLeft: '20px',
3632
+ paddingRight: '20px',
3633
+ type: Div
3634
+ };
3624
3635
  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)];
3636
+ const content = message ? [messageNode, text(message)] : [...getSourceControlHeaderVirtualDom(placeholder, inputMessage), ...buttons.flatMap(button => getSourceControlButtonVirtualDom(button, disabled)), ...getSourceControlListVirtualDom(items, scrollBarHeight, scrollBarActive)];
3632
3637
  const progressDom = loading ? getProgressVirtualDom() : [];
3633
3638
  const dom = [{
3634
3639
  ariaBusy: loading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "3.6.5",
3
+ "version": "3.7.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"