@lvce-editor/source-control-worker 3.6.4 → 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) => {
@@ -3370,9 +3372,17 @@ const getSourceControlButtonVirtualDom = (button, disabled) => {
3370
3372
  ...(!disabled && {
3371
3373
  onClick: HandleClickSourceControlButton
3372
3374
  })
3373
- }, getIconVirtualDom(icon, Span), text(label)];
3375
+ }, {
3376
+ ...getIconVirtualDom(icon, Span),
3377
+ name: label
3378
+ }, text(label)];
3374
3379
  };
3375
3380
 
3381
+ const messageNode$1 = {
3382
+ childCount: 1,
3383
+ className: Message,
3384
+ type: Div
3385
+ };
3376
3386
  const getSourceControlInputDom = (inputPlaceholder, inputMessage) => {
3377
3387
  const dom = [{
3378
3388
  ariaLabel: sourceControlInput(),
@@ -3388,11 +3398,7 @@ const getSourceControlInputDom = (inputPlaceholder, inputMessage) => {
3388
3398
  type: TextArea
3389
3399
  }];
3390
3400
  if (inputMessage) {
3391
- dom.push({
3392
- childCount: 1,
3393
- className: Message,
3394
- type: Div
3395
- }, {
3401
+ dom.push(messageNode$1, {
3396
3402
  text: inputMessage,
3397
3403
  type: Text
3398
3404
  });
@@ -3529,6 +3535,11 @@ const chevron = {
3529
3535
  className: Chevron,
3530
3536
  type: Div
3531
3537
  };
3538
+ const labelDetailNode = {
3539
+ childCount: 1,
3540
+ className: LabelDetail,
3541
+ type: Span
3542
+ };
3532
3543
  const getIconsDom = (icon, fileIcon) => {
3533
3544
  if (icon === ChevronRight) {
3534
3545
  return [chevron, getIconVirtualDom(icon)];
@@ -3573,11 +3584,7 @@ const createItemOther = item => {
3573
3584
  dom.push(labelDom, text(label));
3574
3585
  if (detail) {
3575
3586
  labelDom.childCount++;
3576
- dom.push({
3577
- childCount: 1,
3578
- className: LabelDetail,
3579
- type: Span
3580
- }, text(detail));
3587
+ dom.push(labelDetailNode, text(detail));
3581
3588
  }
3582
3589
  dom.push(...buttonsDom);
3583
3590
  dom.push({
@@ -3618,14 +3625,15 @@ const getSourceControlListVirtualDom = (items, scrollBarHeight, scrollBarActive)
3618
3625
  };
3619
3626
 
3620
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
+ };
3621
3635
  const getSourceControlVirtualDom = (items, buttons, disabled, placeholder, inputMessage, message, loading, scrollBarHeight, scrollBarActive) => {
3622
- const content = message ? [{
3623
- childCount: 1,
3624
- className: Message,
3625
- paddingLeft: '20px',
3626
- paddingRight: '20px',
3627
- type: Div
3628
- }, 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)];
3629
3637
  const progressDom = loading ? getProgressVirtualDom() : [];
3630
3638
  const dom = [{
3631
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.4",
3
+ "version": "3.7.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"