polotno 3.0.0-beta.35 → 3.0.0-beta.37
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/blueprint.polotno.css +73 -74
- package/canvas/context-menu/context-menu.js +1 -1
- package/canvas/element.js +1 -1
- package/canvas/figure-element.js +1 -1
- package/canvas/gif-element.js +1 -1
- package/canvas/hotkeys.js +1 -1
- package/canvas/html-element.js +2 -2
- package/canvas/image-element.js +1 -1
- package/canvas/line-element.js +1 -1
- package/canvas/page-controls.js +1 -1
- package/canvas/page.js +1 -1
- package/canvas/table-element.js +1 -1
- package/canvas/text-element.js +1 -1
- package/canvas/video-element.js +1 -1
- package/model/group-model.d.ts +10 -4
- package/model/store.d.ts +4 -0
- package/model/store.js +1 -1
- package/model/table-model.d.ts +17 -4
- package/model/table-model.js +1 -1
- package/package.json +16 -17
- package/pages-timeline/elements.js +1 -1
- package/pages-timeline/page-preview.js +1 -1
- package/paths.52076178.js +2 -0
- package/paths.fb1df685.js +2 -0
- package/polotno.bundle.js +252 -252
- package/side-panel/layers-panel.js +1 -1
- package/toolbar/html-toolbar.js +1 -1
- package/toolbar/table-toolbar.js +1 -1
- package/toolbar/text-toolbar.js +2 -2
- package/toolbar/toolbar.js +5 -5
- package/utils/l10n.d.ts +11 -6
- package/utils/l10n.js +1 -1
- package/utils/text-html.js +1 -1
- package/utils/to-html.js +1 -1
- package/utils/to-svg.js +1 -1
- package/utils/validate-key.js +1 -1
- package/utils/xml.d.ts +1 -0
- package/utils/xml.js +7 -0
- package/paths.0e3df170.js +0 -2
- package/paths.83e1ddca.js +0 -2
package/blueprint.polotno.css
CHANGED
|
@@ -3668,7 +3668,7 @@ a > .bp6-dark .bp6-running-text code{
|
|
|
3668
3668
|
display:flex;
|
|
3669
3669
|
}
|
|
3670
3670
|
.bp6-breadcrumbs > li::after{
|
|
3671
|
-
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='
|
|
3671
|
+
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%235f6b7c' d='m10.71 7.29-4-4a1.003 1.003 0 0 0-1.42 1.42L8.59 8 5.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71l4-4c.18-.18.29-.43.29-.71s-.11-.53-.29-.71'/%3e%3c/svg%3e");
|
|
3672
3672
|
content:"";
|
|
3673
3673
|
display:block;
|
|
3674
3674
|
height:16px;
|
|
@@ -3723,7 +3723,7 @@ a > .bp6-dark .bp6-running-text code{
|
|
|
3723
3723
|
vertical-align:text-bottom;
|
|
3724
3724
|
}
|
|
3725
3725
|
.bp6-breadcrumbs-collapsed::before{
|
|
3726
|
-
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 6a2 2 0
|
|
3726
|
+
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%235f6b7c' d='M2 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4'/%3e%3c/svg%3e") center no-repeat;
|
|
3727
3727
|
content:"";
|
|
3728
3728
|
display:block;
|
|
3729
3729
|
height:16px;
|
|
@@ -3740,7 +3740,7 @@ a > .bp6-dark .bp6-running-text code{
|
|
|
3740
3740
|
color:#abb3bf;
|
|
3741
3741
|
}
|
|
3742
3742
|
.bp6-dark .bp6-breadcrumbs > li::after{
|
|
3743
|
-
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='
|
|
3743
|
+
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23abb3bf' d='m10.71 7.29-4-4a1.003 1.003 0 0 0-1.42 1.42L8.59 8 5.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71l4-4c.18-.18.29-.43.29-.71s-.11-.53-.29-.71'/%3e%3c/svg%3e");
|
|
3744
3744
|
color:#abb3bf;
|
|
3745
3745
|
}
|
|
3746
3746
|
.bp6-dark .bp6-breadcrumb.bp6-disabled{
|
|
@@ -3753,7 +3753,7 @@ a > .bp6-dark .bp6-running-text code{
|
|
|
3753
3753
|
background:rgba(143, 153, 168, 0.2);
|
|
3754
3754
|
}
|
|
3755
3755
|
.bp6-dark .bp6-breadcrumbs-collapsed::before{
|
|
3756
|
-
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2 6a2 2 0
|
|
3756
|
+
background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23abb3bf' d='M2 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4'/%3e%3c/svg%3e") center no-repeat;
|
|
3757
3757
|
}
|
|
3758
3758
|
.bp6-dark .bp6-breadcrumbs-collapsed:hover{
|
|
3759
3759
|
background:rgba(143, 153, 168, 0.3);
|
|
@@ -4081,8 +4081,8 @@ a > .bp6-dark .bp6-running-text code{
|
|
|
4081
4081
|
.bp6-button .bp6-icon:not([class*=bp6-intent-]){
|
|
4082
4082
|
color:var(--bp-typography-color-muted);
|
|
4083
4083
|
}
|
|
4084
|
-
.bp6-button .bp6-icon:first-child:last-child,
|
|
4085
|
-
.bp6-button .bp6-spinner + .bp6-icon:last-child{
|
|
4084
|
+
.bp6-button > .bp6-icon:first-child:last-child,
|
|
4085
|
+
.bp6-button > .bp6-spinner + .bp6-icon:last-child{
|
|
4086
4086
|
margin:0 calc(-1 * (var(--bp-surface-spacing) * 7.5 - var(--bp-surface-spacing) * 4) * 0.5);
|
|
4087
4087
|
}
|
|
4088
4088
|
.bp6-dark .bp6-button:not([class*=bp6-intent-]), [data-bp-color-scheme=dark] .bp6-button:not([class*=bp6-intent-]){
|
|
@@ -4863,20 +4863,25 @@ a.bp6-button.bp6-disabled{
|
|
|
4863
4863
|
z-index:8;
|
|
4864
4864
|
}
|
|
4865
4865
|
.bp6-button-group:not(.bp6-minimal) > .bp6-popover-wrapper:not(:first-child) .bp6-button,
|
|
4866
|
+
.bp6-button-group:not(.bp6-minimal) > .bp6-popover-target:not(:first-child) > .bp6-button,
|
|
4866
4867
|
.bp6-button-group:not(.bp6-minimal) > .bp6-button:not(:first-child),
|
|
4867
4868
|
.bp6-button-group.bp6-outlined > .bp6-popover-wrapper:not(:first-child) .bp6-button,
|
|
4869
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target:not(:first-child) > .bp6-button,
|
|
4868
4870
|
.bp6-button-group.bp6-outlined > .bp6-button:not(:first-child){
|
|
4869
4871
|
border-bottom-left-radius:0;
|
|
4870
4872
|
border-top-left-radius:0;
|
|
4871
4873
|
}
|
|
4872
4874
|
.bp6-button-group:not(.bp6-minimal) > .bp6-popover-wrapper:not(:last-child) .bp6-button,
|
|
4875
|
+
.bp6-button-group:not(.bp6-minimal) > .bp6-popover-target:not(:last-child) > .bp6-button,
|
|
4873
4876
|
.bp6-button-group:not(.bp6-minimal) > .bp6-button:not(:last-child),
|
|
4874
4877
|
.bp6-button-group.bp6-outlined > .bp6-popover-wrapper:not(:last-child) .bp6-button,
|
|
4878
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target:not(:last-child) > .bp6-button,
|
|
4875
4879
|
.bp6-button-group.bp6-outlined > .bp6-button:not(:last-child){
|
|
4876
4880
|
border-bottom-right-radius:0;
|
|
4877
4881
|
border-top-right-radius:0;
|
|
4878
4882
|
}
|
|
4879
4883
|
.bp6-button-group:not(.bp6-minimal):not(.bp6-outlined) > .bp6-popover-wrapper:not(:last-child) .bp6-button,
|
|
4884
|
+
.bp6-button-group:not(.bp6-minimal):not(.bp6-outlined) > .bp6-popover-target:not(:last-child) > .bp6-button,
|
|
4880
4885
|
.bp6-button-group:not(.bp6-minimal):not(.bp6-outlined) > .bp6-button:not(:last-child){
|
|
4881
4886
|
margin-right:calc(-1 * var(--bp-surface-border-width));
|
|
4882
4887
|
}
|
|
@@ -5159,80 +5164,87 @@ a.bp6-button.bp6-disabled{
|
|
|
5159
5164
|
margin-right:calc(-1 * var(--bp-surface-border-width));
|
|
5160
5165
|
}
|
|
5161
5166
|
}
|
|
5162
|
-
.bp6-button-group.bp6-outlined > .bp6-button
|
|
5167
|
+
.bp6-button-group.bp6-outlined > .bp6-button,
|
|
5168
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button{
|
|
5163
5169
|
border:var(--bp-surface-border-width) solid var(--bp-surface-border-color-strong);
|
|
5164
5170
|
box-sizing:border-box;
|
|
5165
5171
|
}
|
|
5166
|
-
.bp6-button-group.bp6-outlined > .bp6-button:disabled, .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover{
|
|
5172
|
+
.bp6-button-group.bp6-outlined > .bp6-button:disabled, .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled:hover, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled:hover{
|
|
5167
5173
|
border-color:var(--bp-surface-border-color-default);
|
|
5168
5174
|
}
|
|
5169
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button{
|
|
5175
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button{
|
|
5170
5176
|
border-color:var(--bp-surface-border-color-strong);
|
|
5171
5177
|
}
|
|
5172
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover{
|
|
5178
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button:disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-disabled:hover, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled:hover, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button:disabled:hover, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-disabled:hover{
|
|
5173
5179
|
border-color:var(--bp-surface-border-color-default);
|
|
5174
5180
|
}
|
|
5175
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary
|
|
5181
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary,
|
|
5182
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary{
|
|
5176
5183
|
border-color:color-mix(in oklch, var(--bp-intent-primary-hover) 60%, transparent);
|
|
5177
5184
|
}
|
|
5178
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled{
|
|
5185
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary.bp6-disabled{
|
|
5179
5186
|
border-color:color-mix(in oklch, var(--bp-intent-primary-hover) 20%, transparent);
|
|
5180
5187
|
}
|
|
5181
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary{
|
|
5188
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary{
|
|
5182
5189
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-primary-rest) 51%, var(--bp-palette-white)) 60%, transparent);
|
|
5183
5190
|
}
|
|
5184
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled{
|
|
5191
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-primary.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-primary.bp6-disabled{
|
|
5185
5192
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-primary-rest) 51%, var(--bp-palette-white)) 20%, transparent);
|
|
5186
5193
|
}
|
|
5187
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success
|
|
5194
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success,
|
|
5195
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success{
|
|
5188
5196
|
border-color:color-mix(in oklch, var(--bp-intent-success-hover) 60%, transparent);
|
|
5189
5197
|
}
|
|
5190
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled{
|
|
5198
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success.bp6-disabled{
|
|
5191
5199
|
border-color:color-mix(in oklch, var(--bp-intent-success-hover) 20%, transparent);
|
|
5192
5200
|
}
|
|
5193
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success{
|
|
5201
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success{
|
|
5194
5202
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-success-rest) 54%, var(--bp-palette-white)) 60%, transparent);
|
|
5195
5203
|
}
|
|
5196
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled{
|
|
5204
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-success.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-success.bp6-disabled{
|
|
5197
5205
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-success-rest) 54%, var(--bp-palette-white)) 20%, transparent);
|
|
5198
5206
|
}
|
|
5199
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning
|
|
5207
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning,
|
|
5208
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning{
|
|
5200
5209
|
border-color:color-mix(in oklch, var(--bp-intent-warning-hover) 60%, transparent);
|
|
5201
5210
|
}
|
|
5202
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled{
|
|
5211
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning.bp6-disabled{
|
|
5203
5212
|
border-color:color-mix(in oklch, var(--bp-intent-warning-hover) 20%, transparent);
|
|
5204
5213
|
}
|
|
5205
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning{
|
|
5214
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning{
|
|
5206
5215
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-warning-rest) 53%, var(--bp-palette-white)) 60%, transparent);
|
|
5207
5216
|
}
|
|
5208
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled{
|
|
5217
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-warning.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-warning.bp6-disabled{
|
|
5209
5218
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-warning-rest) 53%, var(--bp-palette-white)) 20%, transparent);
|
|
5210
5219
|
}
|
|
5211
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger
|
|
5220
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger,
|
|
5221
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger{
|
|
5212
5222
|
border-color:color-mix(in oklch, var(--bp-intent-danger-hover) 60%, transparent);
|
|
5213
5223
|
}
|
|
5214
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled{
|
|
5224
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger.bp6-disabled{
|
|
5215
5225
|
border-color:color-mix(in oklch, var(--bp-intent-danger-hover) 20%, transparent);
|
|
5216
5226
|
}
|
|
5217
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger{
|
|
5227
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger{
|
|
5218
5228
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-danger-rest) 53%, var(--bp-palette-white)) 60%, transparent);
|
|
5219
5229
|
}
|
|
5220
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled{
|
|
5230
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-danger.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-danger.bp6-disabled{
|
|
5221
5231
|
border-color:color-mix(in oklch, color-mix(in oklch, var(--bp-intent-danger-rest) 53%, var(--bp-palette-white)) 20%, transparent);
|
|
5222
5232
|
}
|
|
5223
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default
|
|
5233
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default,
|
|
5234
|
+
.bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default{
|
|
5224
5235
|
border-color:color-mix(in oklch, var(--bp-intent-default-hover) 60%, transparent);
|
|
5225
5236
|
}
|
|
5226
|
-
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled{
|
|
5237
|
+
.bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default:disabled, .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default.bp6-disabled{
|
|
5227
5238
|
border-color:color-mix(in oklch, var(--bp-intent-default-hover) 20%, transparent);
|
|
5228
5239
|
}
|
|
5229
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default{
|
|
5240
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default{
|
|
5230
5241
|
border-color:color-mix(in oklch, color-mix(in srgb, var(--bp-intent-default-rest) 46%, var(--bp-palette-white)) 60%, transparent);
|
|
5231
5242
|
}
|
|
5232
|
-
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled{
|
|
5243
|
+
.bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-button.bp6-intent-default.bp6-disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default:disabled, .bp6-dark .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default.bp6-disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default:disabled, [data-bp-color-scheme=dark] .bp6-button-group.bp6-outlined > .bp6-popover-target > .bp6-button.bp6-intent-default.bp6-disabled{
|
|
5233
5244
|
border-color:color-mix(in oklch, color-mix(in srgb, var(--bp-intent-default-rest) 46%, var(--bp-palette-white)) 20%, transparent);
|
|
5234
5245
|
}
|
|
5235
|
-
.bp6-button-group.bp6-outlined:not(.bp6-vertical) > .bp6-button:not(:last-child)
|
|
5246
|
+
.bp6-button-group.bp6-outlined:not(.bp6-vertical) > .bp6-button:not(:last-child),
|
|
5247
|
+
.bp6-button-group.bp6-outlined:not(.bp6-vertical) > .bp6-popover-target:not(:last-child) > .bp6-button{
|
|
5236
5248
|
border-right:none;
|
|
5237
5249
|
}
|
|
5238
5250
|
.bp6-button-group .bp6-popover-wrapper,
|
|
@@ -5261,22 +5273,28 @@ a.bp6-button.bp6-disabled{
|
|
|
5261
5273
|
width:100%;
|
|
5262
5274
|
}
|
|
5263
5275
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-popover-wrapper:first-child .bp6-button,
|
|
5276
|
+
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-popover-target:first-child > .bp6-button,
|
|
5264
5277
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-button:first-child,
|
|
5265
5278
|
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-popover-wrapper:first-child .bp6-button,
|
|
5279
|
+
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-popover-target:first-child > .bp6-button,
|
|
5266
5280
|
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-button:first-child{
|
|
5267
5281
|
border-radius:var(--bp-surface-border-radius) var(--bp-surface-border-radius) 0 0;
|
|
5268
5282
|
}
|
|
5269
5283
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-popover-wrapper:last-child .bp6-button,
|
|
5284
|
+
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-popover-target:last-child > .bp6-button,
|
|
5270
5285
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal) > .bp6-button:last-child,
|
|
5271
5286
|
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-popover-wrapper:last-child .bp6-button,
|
|
5287
|
+
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-popover-target:last-child > .bp6-button,
|
|
5272
5288
|
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-button:last-child{
|
|
5273
5289
|
border-radius:0 0 var(--bp-surface-border-radius) var(--bp-surface-border-radius);
|
|
5274
5290
|
}
|
|
5275
5291
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal):not(.bp6-outlined) > .bp6-popover-wrapper:not(:last-child) .bp6-button,
|
|
5292
|
+
.bp6-button-group.bp6-vertical:not(.bp6-minimal):not(.bp6-outlined) > .bp6-popover-target:not(:last-child) > .bp6-button,
|
|
5276
5293
|
.bp6-button-group.bp6-vertical:not(.bp6-minimal):not(.bp6-outlined) > .bp6-button:not(:last-child){
|
|
5277
5294
|
margin-bottom:calc(-1 * var(--bp-surface-border-width));
|
|
5278
5295
|
}
|
|
5279
|
-
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-button:not(:last-child)
|
|
5296
|
+
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-button:not(:last-child),
|
|
5297
|
+
.bp6-button-group.bp6-vertical.bp6-outlined > .bp6-popover-target:not(:last-child) > .bp6-button{
|
|
5280
5298
|
border-bottom:none;
|
|
5281
5299
|
}
|
|
5282
5300
|
.bp6-button-group.bp6-align-left .bp6-button{
|
|
@@ -6793,12 +6811,10 @@ a.bp6-button.bp6-disabled{
|
|
|
6793
6811
|
color:rgba(255, 255, 255, 0.6);
|
|
6794
6812
|
}
|
|
6795
6813
|
.bp6-control:not(.bp6-align-right){
|
|
6796
|
-
-
|
|
6797
|
-
padding-inline-start:24px;
|
|
6814
|
+
padding-inline-start:24px;
|
|
6798
6815
|
}
|
|
6799
6816
|
.bp6-control:not(.bp6-align-right) .bp6-control-indicator{
|
|
6800
|
-
-
|
|
6801
|
-
margin-inline-start:-24px;
|
|
6817
|
+
margin-inline-start:-24px;
|
|
6802
6818
|
}
|
|
6803
6819
|
.bp6-control.bp6-align-right{
|
|
6804
6820
|
padding-right:24px;
|
|
@@ -6807,8 +6823,7 @@ a.bp6-button.bp6-disabled{
|
|
|
6807
6823
|
margin-right:-24px;
|
|
6808
6824
|
}
|
|
6809
6825
|
[dir=rtl] .bp6-control.bp6-align-left{
|
|
6810
|
-
-
|
|
6811
|
-
padding-inline-start:0;
|
|
6826
|
+
padding-inline-start:0;
|
|
6812
6827
|
padding-left:24px;
|
|
6813
6828
|
}
|
|
6814
6829
|
[dir=rtl] .bp6-control.bp6-align-left .bp6-control-indicator{
|
|
@@ -6827,8 +6842,7 @@ a.bp6-button.bp6-disabled{
|
|
|
6827
6842
|
}
|
|
6828
6843
|
.bp6-control.bp6-inline{
|
|
6829
6844
|
display:inline-block;
|
|
6830
|
-
-
|
|
6831
|
-
margin-inline-end:20px;
|
|
6845
|
+
margin-inline-end:20px;
|
|
6832
6846
|
}
|
|
6833
6847
|
.bp6-control .bp6-control-input{
|
|
6834
6848
|
left:0;
|
|
@@ -6846,8 +6860,7 @@ a.bp6-button.bp6-disabled{
|
|
|
6846
6860
|
display:inline-block;
|
|
6847
6861
|
font-size:16px;
|
|
6848
6862
|
height:1em;
|
|
6849
|
-
-
|
|
6850
|
-
margin-inline-end:8px;
|
|
6863
|
+
margin-inline-end:8px;
|
|
6851
6864
|
margin-top:-3px;
|
|
6852
6865
|
position:relative;
|
|
6853
6866
|
-webkit-user-select:none;
|
|
@@ -6902,12 +6915,10 @@ a.bp6-button.bp6-disabled{
|
|
|
6902
6915
|
margin-top:1px;
|
|
6903
6916
|
}
|
|
6904
6917
|
.bp6-control.bp6-large:not(.bp6-align-right){
|
|
6905
|
-
-
|
|
6906
|
-
padding-inline-start:28px;
|
|
6918
|
+
padding-inline-start:28px;
|
|
6907
6919
|
}
|
|
6908
6920
|
.bp6-control.bp6-large:not(.bp6-align-right) .bp6-control-indicator{
|
|
6909
|
-
-
|
|
6910
|
-
margin-inline-start:-28px;
|
|
6921
|
+
margin-inline-start:-28px;
|
|
6911
6922
|
}
|
|
6912
6923
|
.bp6-control.bp6-large.bp6-align-right{
|
|
6913
6924
|
padding-right:28px;
|
|
@@ -6916,8 +6927,7 @@ a.bp6-button.bp6-disabled{
|
|
|
6916
6927
|
margin-right:-28px;
|
|
6917
6928
|
}
|
|
6918
6929
|
[dir=rtl] .bp6-control.bp6-large.bp6-align-left{
|
|
6919
|
-
-
|
|
6920
|
-
padding-inline-start:0;
|
|
6930
|
+
padding-inline-start:0;
|
|
6921
6931
|
padding-left:28px;
|
|
6922
6932
|
}
|
|
6923
6933
|
[dir=rtl] .bp6-control.bp6-large.bp6-align-left .bp6-control-indicator{
|
|
@@ -6993,20 +7003,20 @@ a.bp6-button.bp6-disabled{
|
|
|
6993
7003
|
border-radius:4px;
|
|
6994
7004
|
}
|
|
6995
7005
|
.bp6-control.bp6-checkbox input:checked ~ .bp6-control-indicator::before{
|
|
6996
|
-
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0
|
|
7006
|
+
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0 0 12 5'/%3e%3c/svg%3e");
|
|
6997
7007
|
}
|
|
6998
7008
|
.bp6-control.bp6-checkbox input:indeterminate ~ .bp6-control-indicator::before{
|
|
6999
|
-
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M11 7H5c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1'
|
|
7009
|
+
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M11 7H5c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1'/%3e%3c/svg%3e");
|
|
7000
7010
|
}
|
|
7001
7011
|
.bp6-control.bp6-checkbox input:disabled ~ .bp6-control-indicator::before{
|
|
7002
7012
|
opacity:0.5;
|
|
7003
7013
|
}
|
|
7004
7014
|
@media (forced-colors: active) and (prefers-color-scheme: dark){
|
|
7005
7015
|
.bp6-control.bp6-checkbox input:checked:not(:disabled) ~ .bp6-control-indicator::before{
|
|
7006
|
-
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0
|
|
7016
|
+
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23111418' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0 0 12 5'/%3e%3c/svg%3e");
|
|
7007
7017
|
}
|
|
7008
7018
|
.bp6-control.bp6-checkbox input:indeterminate:not(:disabled) ~ .bp6-control-indicator::before{
|
|
7009
|
-
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M11 7H5c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1'
|
|
7019
|
+
background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23111418' d='M11 7H5c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1'/%3e%3c/svg%3e");
|
|
7010
7020
|
}
|
|
7011
7021
|
.bp6-control.bp6-checkbox input:disabled ~ .bp6-control-indicator{
|
|
7012
7022
|
border-color:graytext;
|
|
@@ -7082,12 +7092,10 @@ a.bp6-button.bp6-disabled{
|
|
|
7082
7092
|
box-shadow:none;
|
|
7083
7093
|
}
|
|
7084
7094
|
.bp6-control.bp6-switch:not(.bp6-align-right){
|
|
7085
|
-
-
|
|
7086
|
-
padding-inline-start:36px;
|
|
7095
|
+
padding-inline-start:36px;
|
|
7087
7096
|
}
|
|
7088
7097
|
.bp6-control.bp6-switch:not(.bp6-align-right) .bp6-control-indicator{
|
|
7089
|
-
-
|
|
7090
|
-
margin-inline-start:-36px;
|
|
7098
|
+
margin-inline-start:-36px;
|
|
7091
7099
|
}
|
|
7092
7100
|
.bp6-control.bp6-switch.bp6-align-right{
|
|
7093
7101
|
padding-right:36px;
|
|
@@ -7096,8 +7104,7 @@ a.bp6-button.bp6-disabled{
|
|
|
7096
7104
|
margin-right:-36px;
|
|
7097
7105
|
}
|
|
7098
7106
|
[dir=rtl] .bp6-control.bp6-switch.bp6-align-left{
|
|
7099
|
-
-
|
|
7100
|
-
padding-inline-start:0;
|
|
7107
|
+
padding-inline-start:0;
|
|
7101
7108
|
padding-left:36px;
|
|
7102
7109
|
}
|
|
7103
7110
|
[dir=rtl] .bp6-control.bp6-switch.bp6-align-left .bp6-control-indicator{
|
|
@@ -7156,12 +7163,10 @@ a.bp6-button.bp6-disabled{
|
|
|
7156
7163
|
left:calc(2px + 100% - 1em);
|
|
7157
7164
|
}
|
|
7158
7165
|
.bp6-control.bp6-switch.bp6-large:not(.bp6-align-right){
|
|
7159
|
-
-
|
|
7160
|
-
padding-inline-start:43px;
|
|
7166
|
+
padding-inline-start:43px;
|
|
7161
7167
|
}
|
|
7162
7168
|
.bp6-control.bp6-switch.bp6-large:not(.bp6-align-right) .bp6-control-indicator{
|
|
7163
|
-
-
|
|
7164
|
-
margin-inline-start:-43px;
|
|
7169
|
+
margin-inline-start:-43px;
|
|
7165
7170
|
}
|
|
7166
7171
|
.bp6-control.bp6-switch.bp6-large.bp6-align-right{
|
|
7167
7172
|
padding-right:43px;
|
|
@@ -7170,8 +7175,7 @@ a.bp6-button.bp6-disabled{
|
|
|
7170
7175
|
margin-right:-43px;
|
|
7171
7176
|
}
|
|
7172
7177
|
[dir=rtl] .bp6-control.bp6-switch.bp6-large.bp6-align-left{
|
|
7173
|
-
-
|
|
7174
|
-
padding-inline-start:0;
|
|
7178
|
+
padding-inline-start:0;
|
|
7175
7179
|
padding-left:43px;
|
|
7176
7180
|
}
|
|
7177
7181
|
[dir=rtl] .bp6-control.bp6-switch.bp6-large.bp6-align-left .bp6-control-indicator{
|
|
@@ -11985,24 +11989,19 @@ span.bp6-icon:empty.bp6-icon-large{
|
|
|
11985
11989
|
text-underline-position:from-font;
|
|
11986
11990
|
}
|
|
11987
11991
|
.bp6-link.bp6-link-underline-always{
|
|
11988
|
-
|
|
11989
|
-
text-decoration-line:underline;
|
|
11992
|
+
text-decoration-line:underline;
|
|
11990
11993
|
}
|
|
11991
11994
|
.bp6-link.bp6-link-underline-hover{
|
|
11992
|
-
|
|
11993
|
-
text-decoration-line:none;
|
|
11995
|
+
text-decoration-line:none;
|
|
11994
11996
|
}
|
|
11995
11997
|
.bp6-link.bp6-link-underline-hover:hover{
|
|
11996
|
-
|
|
11997
|
-
text-decoration-line:underline;
|
|
11998
|
+
text-decoration-line:underline;
|
|
11998
11999
|
}
|
|
11999
12000
|
.bp6-link.bp6-link-underline-none{
|
|
12000
|
-
|
|
12001
|
-
text-decoration-line:none;
|
|
12001
|
+
text-decoration-line:none;
|
|
12002
12002
|
}
|
|
12003
12003
|
.bp6-link.bp6-link-underline-none:hover{
|
|
12004
|
-
|
|
12005
|
-
text-decoration-line:none;
|
|
12004
|
+
text-decoration-line:none;
|
|
12006
12005
|
}
|
|
12007
12006
|
.bp6-link.bp6-link-color-inherit{
|
|
12008
12007
|
color:inherit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{observer as e}from"mobx-react-lite";import{ContextMenuPopover as t,Menu as o,MenuDivider as l,MenuItem as n}from"@blueprintjs/core";import r from"react";import{t as a}from"../../utils/l10n.js";import{useDuplicateElement as i}from"../../toolbar/use-duplicate-element.js";import{ChevronDown as s,ChevronUp as
|
|
1
|
+
import{observer as e}from"mobx-react-lite";import{ContextMenuPopover as t,Menu as o,MenuDivider as l,MenuItem as n}from"@blueprintjs/core";import r from"react";import{t as a}from"../../utils/l10n.js";import{useDuplicateElement as i}from"../../toolbar/use-duplicate-element.js";import{ChevronDown as s,ChevronUp as m,DoubleChevronDown as c,DoubleChevronUp as d,Duplicate as u,Layers as v,Lock as E,Trash as b,Unlock as C}from"@blueprintjs/icons";import{useRemoveElement as p}from"../../toolbar/use-remove-element.js";import{useCopyStyle as x}from"../../toolbar/use-copy-style.js";import{useLock as w}from"../../toolbar/use-lock.js";export const ContextMenu=e(({store:e,isOpen:k,offset:R,setIsOpen:g})=>{var y,f,h,P,M;const{disabled:j,duplicate:D}=i({store:e}),{disabled:B,remove:F}=p({store:e}),{setElementToCopy:O}=x(e),{disabled:T,lock:I,locked:U}=w({store:e}),A=U?r.createElement(E,null):r.createElement(C,null),L=e.selectedElementsIds;return 0===e.selectedElements.length?null:r.createElement(t,{isOpen:k,onClose:()=>{g(!1)},content:r.createElement(o,null,r.createElement(n,{shouldDismissPopover:!1,icon:A,text:a(U?"contextMenu.unlock":"contextMenu.lock"),onClick:I,disabled:T}),r.createElement(n,{icon:r.createElement(u,null),text:a("contextMenu.duplicate"),onClick:D,disabled:j}),r.createElement(n,{icon:r.createElement(b,null),text:a("contextMenu.remove"),onClick:F,disabled:B}),r.createElement(l,null),r.createElement(n,{icon:r.createElement(v,null),text:a("toolbar.layering")},r.createElement(n,{shouldDismissPopover:!1,icon:r.createElement(d,null),text:a("toolbar.toForward"),disabled:!(null===(y=e.activePage)||void 0===y?void 0:y.canMoveElementsTop(L)),onClick:()=>{var t;null===(t=e.activePage)||void 0===t||t.moveElementsTop(L)}}),r.createElement(n,{shouldDismissPopover:!1,icon:r.createElement(m,null),text:a("toolbar.up"),disabled:!(null===(f=e.activePage)||void 0===f?void 0:f.canMoveElementsUp(L)),onClick:()=>{var t;null===(t=e.activePage)||void 0===t||t.moveElementsUp(L)}}),r.createElement(n,{shouldDismissPopover:!1,icon:r.createElement(s,null),text:a("toolbar.down"),disabled:!(null===(h=e.activePage)||void 0===h?void 0:h.canMoveElementsDown(L)),onClick:()=>{var t;null===(t=e.activePage)||void 0===t||t.moveElementsDown(L)}}),r.createElement(n,{shouldDismissPopover:!1,icon:r.createElement(c,null),text:a("toolbar.toBottom"),disabled:!(null===(P=e.activePage)||void 0===P?void 0:P.canMoveElementsBottom(L)),onClick:()=>{var t;null===(t=e.activePage)||void 0===t||t.moveElementsBottom(L)}})),"table"===(null===(M=e.selectedElements[0])||void 0===M?void 0:M.type)&&(()=>{var t;const o=e.selectedElements[0],i=o.focusedCells[0],s=null!=i,m=null!==(t=o.getFocusedCellRange())&&void 0!==t?t:i?{minRow:i.row,maxRow:i.row,minCol:i.col,maxCol:i.col}:{minRow:0,maxRow:0,minCol:0,maxCol:0},{minRow:c,maxRow:d,minCol:u,maxCol:v}=m,E=d>c,b=v>u;return r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,r.createElement(l,null),r.createElement(n,{text:a("toolbar.insertRowAbove"),onClick:()=>{e.history.transaction(()=>{o.addRow(c)})}}),r.createElement(n,{text:a("toolbar.insertRowBelow"),onClick:()=>{e.history.transaction(()=>{o.addRow(d+1)})}}),r.createElement(n,{text:a(E?"toolbar.deleteRows":"toolbar.deleteRow"),disabled:o.rows<=d-c+1,onClick:()=>{e.history.transaction(()=>{o.removeRowRange(c,d)})}}),r.createElement(l,null),r.createElement(n,{text:a("toolbar.insertColumnLeft"),onClick:()=>{e.history.transaction(()=>{o.addColumn(u)})}}),r.createElement(n,{text:a("toolbar.insertColumnRight"),onClick:()=>{e.history.transaction(()=>{o.addColumn(v+1)})}}),r.createElement(n,{text:a(b?"toolbar.deleteColumns":"toolbar.deleteColumn"),disabled:o.cols<=v-u+1,onClick:()=>{e.history.transaction(()=>{o.removeColumnRange(u,v)})}})),r.createElement(l,null),r.createElement(n,{text:a("toolbar.distributeRowsEvenly"),onClick:()=>{e.history.transaction(()=>{o.distributeRowsEvenly()})}}),r.createElement(n,{text:a("toolbar.distributeColumnsEvenly"),onClick:()=>{e.history.transaction(()=>{o.distributeColumnsEvenly()})}}))})()),targetOffset:{top:R.y,left:R.x}})});
|
package/canvas/element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react-lite";import o from"konva";import{TextElement as n}from"./text-element.js";import{ImageElement as
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react-lite";import{ROLES as o}from"../model/store.js";import r from"konva";import{TextElement as n}from"./text-element.js";import{ImageElement as i}from"./image-element.js";import{HTMLElement as m}from"./html-element.js";import{LineElement as l}from"./line-element.js";import{VideoElement as s}from"./video-element.js";import{FigureElement as a}from"./figure-element.js";import{GifElement as c}from"./gif-element.js";import{TableElement as f}from"./table-element.js";import{Group as p}from"react-konva";import{Highlighter as d}from"./highlighter.js";import{forEveryChild as u}from"../model/group-model.js";import{flags as g}from"../utils/flags.js";const h={text:n,image:i,svg:i,line:l,video:s,figure:a,group:t(t=>{const{element:r,store:n}=t,{children:i}=r,m=r.selectable||n.role===o.ADMIN;return e.createElement(p,{opacity:r.opacity,listening:m,hideInExport:!r.showInExport,id:r.id},i.map(o=>e.createElement(v,Object.assign({},t,{key:o.id,store:n,element:o}))))}),gif:c,table:f};export function registerShapeComponent(e,t){h[e]=t}const y=(e,t)=>{const o=[];u(e,e=>{"group"!==e.type&&o.push(e.a)});const n=[];o.forEach(e=>{const t=[{x:0,y:0},{x:0+e.width,y:0},{x:0+e.width,y:0+e.height},{x:0,y:0+e.height}],o=new r.Transform;o.translate(e.x,e.y),o.rotate(r.Util.degToRad(e.rotation)),t.forEach(e=>{const t=o.point(e);n.push(t)})});const i=new r.Transform;i.rotate(-r.Util.degToRad(t));let m=1/0,l=1/0,s=-1/0,a=-1/0;n.forEach(e=>{const t=i.point(e);m=Math.min(m,t.x),l=Math.min(l,t.y),s=Math.max(s,t.x),a=Math.max(a,t.y)}),i.invert();const c=i.point({x:m,y:l});return{x:c.x,y:c.y,width:s-m,height:a-l,rotation:t}},v=t(t=>{var o,n;const{element:i,store:l}=t,[s,a]=e.useState(!1),c=i.isSelectedDirectly,f="group"===(null===(o=i.parent)||void 0===o?void 0:o.type),u=(t=>{const[o,n]=e.useState();return e.useEffect(()=>{const e=setTimeout(()=>{const e=t.page.id,o=r.stages.find(t=>t.getAttr("pageId")===e);o||console.error("No stage is found for element",t.id),n(o)});return()=>clearTimeout(e)},[t.id]),o})(i),v=e.useRef();e.useEffect(()=>{if(u){const e=e=>{const t=e.target.findAncestor(".element",!0),o=l.getElementById(null==t?void 0:t.id()),r=null==o?void 0:o.top,n=null==r?void 0:r.id;a(n===i.id)};u.on("mouseover",e);const t=()=>{a(!1)};return u.on("mouseleave",t),()=>{u.off("mouseover",e),u.off("mouseleave",t)}}},[u]);let x=h[t.element.type];return"text"===t.element.type&&g.htmlRenderEnabled&&(x=m),t.element.visible?x?e.createElement(p,{name:"element-container"},e.createElement(x,Object.assign({},t)),s&&!c&&!f&&e.createElement(d,{element:"group"===i.type?{a:y(i,(null===(v.current||(v.current=null==u?void 0:u.findOne("Transformer")),n=v.current)||void 0===n?void 0:n.rotation())||0)}:i})):(console.error("Can not find component for "+t.element.type),null):null});export default v;
|
package/canvas/figure-element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"react";import{observer as e}from"mobx-react-lite";import{Group as a,Rect as r,Path as s}from"react-konva";import{ROLES as o}from"../model/store.js";import{subTypeToPathDataFunc as i}from"../utils/figure-to-svg.js";import{isTouchDevice as h}from"../utils/screen.js";import{useColor as n}from"./use-color.js";const l={};export const FigureElement=e(({element:c,store:d})=>{const g=t.useRef(null),m=c.selectable||d.role===o.ADMIN,p=h(),f=c.isSelected,w=Math.min(c.strokeWidth,c.width/2,c.height/2),u=Math.max(0,Math.min(c.width/2,c.height/2,c.cornerRadius)),b=n(c,c.a.fill,"fill"),y=Object.assign(Object.assign({width:c.a.width,height:c.a.height},b),{cornerRadius:u,opacity:c.animated("opacity"),shadowEnabled:c.shadowEnabled,shadowBlur:c.shadowBlur,shadowOffsetX:c.shadowOffsetX,shadowOffsetY:c.shadowOffsetY,shadowColor:c.shadowColor,shadowOpacity:c.shadowOpacity,preventDefault:!p||f,hideInExport:!c.showInExport}),x=n(c,c.stroke,"stroke"),k=Object.assign(Object.assign({visible:w>0,x:w/2,y:w/2,width:c.a.width-w,height:c.a.height-w},x),{strokeWidth:w,cornerRadius:Math.max(0,u-w),dash:c.dash.map(t=>t*w),opacity:c.animated("opacity"),hideInExport:!c.showInExport,listening:!1}),E=Math.max(0,10-Math.min(c.a.width,c.a.height)),v=(O=c.subType,l[O]||(l[O]=(j=i(O),e(({element:e,fillProps:o,strokeProps:i,hitStrokeWidth:h})=>{let n=j({width:e.a.width,height:e.a.height,cornerRadius:e.cornerRadius}),l=1,c=1;"string"!=typeof n&&(l=n.scaleX,c=n.scaleY,n=n.path);const d=t.useRef(null);return t.createElement(t.Fragment,null,t.createElement(r,{width:e.a.width,height:e.a.height,fill:"transparent",hitStrokeWidth:h}),t.createElement(s,Object.assign({},o,{ref:d,data:n,scaleX:l,scaleY:c})),t.createElement(a,{clipFunc:t=>{const e=d.current;if(e){var a=e.dataArray;t.beginPath();for(var r=0;r<a.length;r++){var s=a[r].command,o=a[r].points;switch(s){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var i=o[0],h=o[1],n=o[2],l=o[3],c=o[4],g=o[5],m=o[6],p=o[7],f=n>l?n:l,w=n>l?1:n/l,u=n>l?l/n:1;t.translate(i,h),t.rotate(m),t.scale(w,u),t.arc(0,0,f,c,c+g,!p),t.scale(1/w,1/u),t.rotate(-m),t.translate(-i,-h);break;case"z":t.closePath()}}}},scaleX:l,scaleY:c},t.createElement(s,Object.assign({},i,{x:0,y:0,data:n,strokeWidth:2*i.strokeWidth,dash:i.dash.map(t=>t)}))))}))),l[O]||a);var O,j;return t.createElement(t.Fragment,null,t.createElement(a,{ref:g,id:c.id,x:c.a.x,y:c.a.y,rotation:c.a.rotation,opacity:c.a.opacity,listening:m,draggable:p?c.draggable&&f:c.draggable,name:"element",onDragMove:t=>{c.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{c.set({x:t.target.x(),y:t.target.y()})},onTransform:t=>{const e=t.target.scale();t.target.scaleX(1),t.target.scaleY(1),c.set({width:c.width*e.x,height:c.height*e.y,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}},t.createElement(v,{element:c,fillProps:y,strokeProps:k,hitStrokeWidth:E})))});
|
package/canvas/gif-element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react-lite";import{autorun as r}from"mobx";import{Image as a,Group as i,Rect as o,Arc as n,Text as h}from"react-konva";import d from"konva";import{parseGIF as
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react-lite";import{autorun as r}from"mobx";import{Image as a,Group as i,Rect as o,Arc as n,Text as h}from"react-konva";import{ROLES as s}from"../model/store.js";import d from"konva";import{parseGIF as l,decompressFrames as c}from"gifuct-js";import{useCornerRadiusAndCrop as m}from"./video-element.js";import{useImageLoader as g}from"./image-element.js";import{useWorkspaceStyle as f}from"./workspace-style.js";import{applyFilter as u}from"./apply-filters.js";import{useFadeIn as p}from"./use-fadein.js";import{isTouchDevice as w}from"../utils/screen.js";function y(e,t,r){const a=t.getContext("2d"),i=r.getContext("2d");if(!a||!i){return}2===e.disposalType&&a.clearRect(0,0,t.width,t.height),r.width=e.width,r.height=e.height;const o=i.createImageData(e.width,e.height);o.data.set(e.patch),i.putImageData(o,0,0),a.drawImage(r,e.left,e.top)}const x=t(({element:t})=>{const r=Math.min(30,t.width/4,t.height/4),a=e.useRef(null);e.useEffect(()=>{const e=a.current;if(!e){return}const t=new d.Animation(t=>{e.rotate(((null==t?void 0:t.timeDiff)||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}},[]);const{mediaLoadingStyle:h}=f();return e.createElement(i,{x:t.a.x,y:t.a.y,rotation:t.a.rotation,listening:!1,opacity:t.a.opacity,hideInExport:!t.showInExport},e.createElement(o,{width:t.width,height:t.height,fill:h.fill}),e.createElement(n,{ref:a,x:t.width/2,y:t.height/2,fill:h.textFill,outerRadius:Math.abs(r),innerRadius:Math.max(1,r-5),angle:270}))}),E=t(({element:t})=>{const{mediaErrorStyle:r}=f(),a=Math.max(10,Math.min(30,t.width/22));return e.createElement(i,{x:t.a.x,y:t.a.y,rotation:t.a.rotation,listening:!1,opacity:t.a.opacity,hideInExport:!t.showInExport},e.createElement(o,{width:t.width,height:t.height,fill:r.fill}),e.createElement(h,{text:"Cannot load the GIF...",fontSize:a,width:t.width,height:t.height,align:"center",fill:r.textFill,verticalAlign:"middle",padding:5}))});export const GifElement=t(({element:t,store:i})=>{var n;const[h,f]=e.useState(!1),b=t.isSelected,S=e.useRef(null),v=e.useRef(),[I,M,R,C]=function(t){const[r,a]=e.useState([]),[i,o]=e.useState(0),[n,h]=e.useState("loading"),[s,d]=e.useState({width:0,height:0});return e.useEffect(()=>{(async()=>{try{const e=await fetch(t),r=await e.arrayBuffer(),i=l(r),n=c(i,!0),s=i.lsd.width,m=i.lsd.height;d({width:s,height:m});const g=n.map(e=>({patch:new Uint8ClampedArray(e.patch),delay:e.delay,width:e.dims.width,height:e.dims.height,left:e.dims.left,top:e.dims.top,disposalType:e.disposalType})),f=g.reduce((e,t)=>e+t.delay,0);a(g),o(f),h("loaded")}catch(e){console.error("Failed to load GIF:",e),h("failed")}})()},[t]),[r,i,s,n]}(t.src);g(C,t.src,t.id),e.useEffect(()=>(v.current=document.createElement("canvas"),()=>{v.current&&d.Util.releaseCanvas(v.current)}),[]),e.useEffect(()=>{if("loaded"===C&&v.current&&(v.current.width=R.width,v.current.height=R.height,I.length>0)){const e=v.current.getContext("2d");if(e){e.clearRect(0,0,R.width,R.height);const t=document.createElement("canvas");y(I[0],v.current,t)}}},[R,C,I]),e.useEffect(()=>{if(!I.length||!v.current){return}const e=v.current;e.width=R.width,e.height=R.height;const a=document.createElement("canvas"),o=e.getContext("2d");o&&o.clearRect(0,0,e.width,e.height);let n=-1;y(I[0],e,a),F(),n=0;const h=t=>{const r=(e=>{const t=e%M;let r=0;for(let a=0;a<I.length;a++){if(r+=I[a].delay,r>t){return a}}return 0})(t);r!==n&&(y(I[r],e,a),F(),S.current.getLayer().draw(),n=r)};if(i.isPlaying||t.page._exportingOrRendering){return r(()=>{h(i.currentTime-t.page.startTime)})}{const e=window.setInterval(()=>{h(i.currentTime||performance.now())},16);return()=>{clearInterval(e)}}},[i.isPlaying,I,M,t.page._exportingOrRendering]),e.useEffect(()=>{M&&i.history.ignore(()=>{t.set({duration:M})})},[M]);let{cropX:T,cropY:j,cropWidth:z,cropHeight:O}=t;"loaded"!==C&&(T=j=0,z=O=1);const D={x:R.width*T,y:R.height*j,width:R.width*z,height:R.height*O},X=null!==(n=t.cornerRadius)&&void 0!==n?n:0,[Y,F]=m(t,v.current,D,i._elementsPixelRatio,X,h||t._cropModeEnabled);e.useLayoutEffect(()=>{if(!h&&!t._cropModeEnabled&&S.current){return u(S.current,t),r(()=>{u(S.current,t)},{delay:100})}},[v.current,h,z,O,t._cropModeEnabled,R.width,R.height]);const _="loading"===C,k="failed"===C,A=_||k?0:t.a.opacity;p(S,A);const L=t.selectable||i.role===s.ADMIN,B=w();return e.createElement(e.Fragment,null,_&&e.createElement(x,{element:t}),k&&e.createElement(E,{element:t}),e.createElement(a,{ref:S,name:"element",id:t.id,image:Y,x:t.a.x,y:t.a.y,width:t.a.width||1,height:t.a.height||1,rotation:t.a.rotation,opacity:A,shadowEnabled:t.shadowEnabled,shadowBlur:t.shadowBlur,shadowOffsetX:t.shadowOffsetX,shadowOffsetY:t.shadowOffsetY,shadowColor:t.shadowColor,shadowOpacity:t.shadowOpacity,customCrop:D,listening:L,draggable:B?t.draggable&&b:t.draggable,preventDefault:!B||b,hideInExport:!t.showInExport,onDragMove:e=>{t.set({x:e.target.x(),y:e.target.y()})},onDragEnd:e=>{t.set({x:e.target.x(),y:e.target.y()})},onTransformStart:()=>f(!0),onTransform:e=>{const r=e.currentTarget,a=Math.abs(r.scaleX()-1)<1e-7?1:r.scaleX(),i=Math.abs(r.scaleY()-1)<1e-7?1:r.scaleY();r.scaleX(1),r.scaleY(1),t.set({x:r.x(),y:r.y(),width:r.width()*a,height:r.height()*i,rotation:r.rotation()})},onTransformEnd:()=>f(!1)}),e.createElement(o,{x:t.a.x,y:t.a.y,width:Math.max(t.a.width-t.borderSize,0),height:Math.max(t.a.height-t.borderSize,0),opacity:A,offsetX:-t.borderSize/2,offsetY:-t.borderSize/2,stroke:t.borderColor,strokeWidth:t.borderSize,listening:!1,visible:!!t.borderSize,rotation:t.rotation,cornerRadius:Math.max(0,X-t.borderSize),hideInExport:!t.showInExport}))});
|
package/canvas/hotkeys.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{copy as
|
|
1
|
+
import{ROLES as e}from"../model/store.js";import{copy as t,cut as o,paste as l}from"../utils/clipboard.js";import{duplicateElements as n}from"../utils/duplicate.js";import{alignBottom as r,alignCenter as i,alignLeft as c,alignMiddle as a,alignRight as s,alignTop as d}from"../utils/alignment.js";import{removeTags as u}from"../utils/text.js";const f="rgba(191, 191, 191, 100)";function v(e,t,o){const l=e.getCell(t,o);l&&e.focusCell(l.id)}function y(e,t,o){const l=e.getCell(t,o);l&&e.enterCellEdit(l.id)}export function handleHotkey(p,m){var h,w,g,D,E,K,k,C,x,R,A,b,S,P,T,L,I,M;if(m.role===e.VIEWER){return}const j=function(e){if(1!==e.selectedElements.length){return null}const t=e.selectedElements[0];return"table"!==t.type?null:t}(m);if(j&&function(e,t,o){const l=t._focusedCellIds.length>0,n=!!t._editingCellId;if(!l&&!n){return!1}if(n){if("Escape"===e.key){return e.preventDefault(),t.exitCellEdit(),!0}if("Tab"===e.key){e.preventDefault();const o=t.editingCell;if(t.exitCellEdit(),o){if(e.shiftKey){let e=o.col-1,l=o.row;e<0&&(l-=1,e=t.cols-1),l<0&&(l=t.rows-1,e=t.cols-1),y(t,l,e)}else{let e=o.col+1,l=o.row;e>=t.cols&&(l+=1,e=0),l>=t.rows&&(l=0,e=0),y(t,l,e)}}return!0}if(e.metaKey||e.ctrlKey){const o=t.editingCell;if(o){if("b"===e.key){return e.preventDefault(),o.set({fontWeight:"bold"===o.fontWeight?"normal":"bold"}),!0}if("i"===e.key){return e.preventDefault(),o.set({fontStyle:"italic"===o.fontStyle?"normal":"italic"}),!0}if("u"===e.key){e.preventDefault();const t=o.textDecoration.split(" ").filter(Boolean),l=t.includes("underline");return o.set({textDecoration:l?t.filter(e=>"underline"!==e).join(" "):[...t,"underline"].join(" ")}),!0}}}return!0}if("Escape"===e.key){return e.preventDefault(),t.clearCellFocus(),!0}const r=t.focusedCells[0];if(!r){return!1}const i=r.row,c=r.col;if("Enter"===e.key){return e.preventDefault(),t.enterCellEdit(r.id),!0}if("Tab"===e.key){if(e.preventDefault(),e.shiftKey){let e=c-1,o=i;e<0&&(o-=1,e=t.cols-1),o<0&&(o=t.rows-1,e=t.cols-1),v(t,o,e)}else{let e=c+1,o=i;e>=t.cols&&(o+=1,e=0),o>=t.rows&&(o=0,e=0),v(t,o,e)}return!0}if("ArrowRight"===e.key||"ArrowLeft"===e.key||"ArrowDown"===e.key||"ArrowUp"===e.key){if(e.preventDefault(),e.shiftKey){const o=function(e){const t=e.cells.find(t=>t.id===e._anchorCellId);if(!t){return null}const o=e.focusedCells;if(o.length<=1){return{row:t.row,col:t.col}}let l=1/0,n=-1,r=1/0,i=-1;for(const c of o){c.row<l&&(l=c.row),c.row>n&&(n=c.row),c.col<r&&(r=c.col),c.col>i&&(i=c.col)}return{row:t.row===l?n:l,col:t.col===r?i:r}}(t)||{row:i,col:c};let l=o.row,n=o.col;"ArrowRight"===e.key&&(n=Math.min(o.col+1,t.cols-1)),"ArrowLeft"===e.key&&(n=Math.max(o.col-1,0)),"ArrowDown"===e.key&&(l=Math.min(o.row+1,t.rows-1)),"ArrowUp"===e.key&&(l=Math.max(o.row-1,0)),t.focusCellRange(l,n)}else{"ArrowRight"===e.key&&v(t,i,Math.min(c+1,t.cols-1)),"ArrowLeft"===e.key&&v(t,i,Math.max(c-1,0)),"ArrowDown"===e.key&&v(t,Math.min(i+1,t.rows-1),c),"ArrowUp"===e.key&&v(t,Math.max(i-1,0),c)}return!0}const a=e.ctrlKey||e.metaKey;if(!(a||e.shiftKey||e.altKey||"Delete"!==e.key&&"Backspace"!==e.key)){return e.preventDefault(),t.focusedCells.forEach(e=>{e.set({text:""})}),!0}if(a&&e.shiftKey&&!e.altKey&&"Equal"===e.code){e.preventDefault();const l=t.getFocusedCellRange(),n=l?l.maxRow+1:i+1;return o.history.transaction(()=>{t.addRow(n)}),!0}if(a&&e.shiftKey&&e.altKey&&"Equal"===e.code){e.preventDefault();const l=t.getFocusedCellRange(),n=l?l.maxCol+1:c+1;return o.history.transaction(()=>{t.addColumn(n)}),!0}if(a&&!e.shiftKey&&"Backspace"===e.code){const l=t.getFocusedCellRange();if(l&&0===l.minCol&&l.maxCol===t.cols-1&&t.rows>1){return e.preventDefault(),o.history.transaction(()=>{t.removeRowRange(l.minRow,l.maxRow)}),!0}}if(a&&e.shiftKey&&"Backspace"===e.code){const l=t.getFocusedCellRange();if(l&&0===l.minRow&&l.maxRow===t.rows-1&&t.cols>1){return e.preventDefault(),o.history.transaction(()=>{t.removeColumnRange(l.minCol,l.maxCol)}),!0}}if(a&&"KeyC"===e.code){e.preventDefault();const o=t.focusedCells.map(e=>u(e.text));return navigator.clipboard.writeText(o.join("\n")),!0}return a&&"KeyV"===e.code?(e.preventDefault(),navigator.clipboard.readText().then(e=>{const o=t.focusedCells[0];o&&o.set({text:e})}),!0):!(!a||"KeyA"!==e.code||(e.preventDefault(),t.cells.forEach(e=>{t.focusCell(e.id,!0)}),0))}(p,j,m)){return}if("INPUT"===(null===(h=document.activeElement)||void 0===h?void 0:h.tagName)||"TEXTAREA"===(null===(w=document.activeElement)||void 0===w?void 0:w.tagName)||"true"===(null===(g=document.activeElement)||void 0===g?void 0:g.contentEditable)){return}const W=document.querySelector(".polotno-workspace-container"),B=document.activeElement===W||(null==W?void 0:W.contains(document.activeElement));if(!B){const e=window.getSelection();if(e&&e.toString().length>0){return}}if("Alt"===p.key){const e=W;return void((B||m.distanceGuidesVisible||e&&e.matches(":hover"))&&p.preventDefault())}const F=m.selectedElements.filter(e=>e.removable).map(e=>e.id);46!==p.keyCode&&8!==p.keyCode||m.deleteElements(F);const U=p.ctrlKey||p.metaKey,V=p.shiftKey,q=p.altKey;if("Escape"===p.key){return p.preventDefault(),void("draw"===m.tool?m.setTool("selection"):m.selectElements([]))}if(!U||V||"z"!==p.key.toLowerCase()&&"y"!==p.key.toLowerCase()||(p.preventDefault(),m.history.undo()),U&&V&&("z"===p.key.toLowerCase()||"y"===p.key.toLowerCase())&&(p.preventDefault(),m.history.redo()),U&&"KeyA"===p.code){p.preventDefault();const e=null===(D=m.activePage)||void 0===D?void 0:D.children.filter(e=>e.selectable),t=(null==e?void 0:e.map(e=>e.id))||[];m.selectElements(t)}if(U&&"KeyC"===p.code&&(p.preventDefault(),t(m)),U&&"KeyX"===p.code&&(p.preventDefault(),o(m)),U&&"KeyV"===p.code&&(p.preventDefault(),l(m)),"ArrowDown"===p.code){p.preventDefault();const e=p.shiftKey?10:1;m.selectedShapes.forEach(t=>{t.draggable&&t.set({y:t.y+e})})}if("ArrowUp"===p.code){p.preventDefault();const e=p.shiftKey?10:1;m.selectedShapes.forEach(t=>{t.draggable&&t.set({y:t.y-e})})}if("ArrowLeft"===p.code){p.preventDefault();const e=p.shiftKey?10:1;m.selectedShapes.forEach(t=>{t.draggable&&t.set({x:t.x-e})})}if("ArrowRight"===p.code){p.preventDefault();const e=p.shiftKey?10:1;m.selectedShapes.forEach(t=>{t.draggable&&t.set({x:t.x+e})})}if(U&&"KeyG"===p.code){p.preventDefault();const e=m.selectedElements[0];if(e&&"group"===e.type){const t=e;m.ungroupElements([t.id])}else{m.groupElements(m.selectedElements.map(e=>e.id))}}if(U&&"KeyD"===p.code&&(p.preventDefault(),n(m.selectedElements,m)),"KeyT"===p.code&&!U){p.preventDefault();const e=30,t=m.width/2,o=m.width/2-t/2,l=m.height/2-e/2,n=2160,r=(m.width+m.height)/n;null===(E=m.activePage)||void 0===E||E.addElement({type:"text",x:o,y:l,width:t,fontSize:e*r,text:"Sample Text",fontFamily:"Roboto"})}if("KeyR"===p.code&&!U){p.preventDefault();const e={type:"figure",x:m.width/4,y:m.height/4,width:300,height:300,fill:f,stroke:"#0c0c0c",strokeWidth:0,subType:"rect"};null===(K=m.activePage)||void 0===K||K.addElement(e)}if("KeyL"===p.code&&!U){p.preventDefault();const e=(null!==(C=null===(k=m.activePage)||void 0===k?void 0:k.computedWidth)&&void 0!==C?C:0)/3,t={type:"line",x:(null!==(R=null===(x=m.activePage)||void 0===x?void 0:x.computedWidth)&&void 0!==R?R:0)/2-e/2,y:(null!==(b=null===(A=m.activePage)||void 0===A?void 0:A.computedHeight)&&void 0!==b?b:0)/2,width:e,color:f};null===(S=m.activePage)||void 0===S||S.addElement(t)}if("KeyO"===p.code&&!U){p.preventDefault(),p.preventDefault();const e={type:"figure",x:m.width/4,y:m.height/4,width:300,height:300,fill:f,stroke:"#0c0c0c",strokeWidth:0,subType:"circle"};null===(P=m.activePage)||void 0===P||P.addElement(e)}U&&"Equal"===p.code&&(p.preventDefault(),m.setScale(m.scale+.1)),U&&"Minus"===p.code&&(p.preventDefault(),m.setScale(m.scale-.1)),q&&("KeyA"===p.code&&(p.preventDefault(),c(m)),"KeyD"===p.code&&(p.preventDefault(),s(m)),"KeyS"===p.code&&(p.preventDefault(),r(m)),"KeyW"===p.code&&(p.preventDefault(),d(m)),"KeyV"===p.code&&(p.preventDefault(),a(m)),"KeyH"===p.code&&(p.preventDefault(),i(m))),"BracketRight"===p.code&&(p.preventDefault(),U?null===(T=m.activePage)||void 0===T||T.moveElementsUp(m.selectedElementsIds):null===(L=m.activePage)||void 0===L||L.moveElementsTop(m.selectedElementsIds)),"BracketLeft"===p.code&&(p.preventDefault(),U?null===(I=m.activePage)||void 0===I||I.moveElementsDown(m.selectedElementsIds):null===(M=m.activePage)||void 0===M||M.moveElementsBottom(m.selectedElementsIds))}
|