@pixerate/editor-svelte 0.137.0 → 0.138.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.
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
startMarchingAnts,
|
|
26
26
|
handleSelectionShortcut,
|
|
27
27
|
handleQuickMaskKey,
|
|
28
|
+
handleMaskViewKey,
|
|
28
29
|
ShapeDrawGesture,
|
|
29
30
|
TypeToolGesture,
|
|
30
31
|
DEFAULT_SHAPE_TOOL_OPTIONS,
|
|
@@ -605,7 +606,7 @@
|
|
|
605
606
|
if (target?.closest?.('input, textarea, select, [contenteditable="true"]')) return;
|
|
606
607
|
// Leave Copy to the page while text on it is selected.
|
|
607
608
|
if (window.getSelection?.()?.toString()) return;
|
|
608
|
-
if (handleQuickMaskKey(editor.controller, e)) {
|
|
609
|
+
if (handleQuickMaskKey(editor.controller, e) || handleMaskViewKey(editor.controller, e)) {
|
|
609
610
|
e.preventDefault();
|
|
610
611
|
return;
|
|
611
612
|
}
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
layers: s.layers,
|
|
52
52
|
activeLayerId: s.activeLayerId,
|
|
53
53
|
activeTarget: s.activeTarget,
|
|
54
|
+
maskView: controller.getMaskView(),
|
|
54
55
|
rows: layerPanelRows(s.layers, s.activeLayerId),
|
|
55
56
|
active: controller.getActiveLayer() ?? null,
|
|
56
57
|
menu: layerMenu(controller),
|
|
@@ -374,7 +375,8 @@
|
|
|
374
375
|
use:paint={maskThumb(layer)}
|
|
375
376
|
role="button"
|
|
376
377
|
tabindex="0"
|
|
377
|
-
aria-label={`${row.label} mask${layer.mask.enabled === false ? ' (disabled)' : ''}`}
|
|
378
|
+
aria-label={`${row.label} mask${layer.mask.enabled === false ? ' (disabled)' : ''}${snapshot.maskView?.layerId === layer.id ? ' (shown)' : ''}`}
|
|
379
|
+
title="Alt-click: show the mask alone · Alt+Shift-click: as an overlay"
|
|
378
380
|
data-testid="layer-mask-thumbnail"
|
|
379
381
|
style="width: {thumbnailSize}px; height: {thumbnailSize}px"
|
|
380
382
|
class={thumbClass(row.active && snapshot.activeTarget === 'mask')}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.138.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"**/*.css"
|
|
166
166
|
],
|
|
167
167
|
"dependencies": {
|
|
168
|
-
"@pixerate/editor": "0.
|
|
168
|
+
"@pixerate/editor": "0.189.0"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@dagrejs/dagre": "^1.1.4",
|