@pixerate/editor-react 0.123.0 → 0.124.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/{chunk-UNKMMYPZ.js → chunk-Y7AFHOHY.js} +7 -2
- package/dist/image-editor/LayersPanel.d.cts +1 -1
- package/dist/image-editor/LayersPanel.d.ts +1 -1
- package/dist/image-editor/index.cjs +6 -2
- package/dist/image-editor/index.js +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -225,6 +225,7 @@ import {
|
|
|
225
225
|
startMarchingAnts,
|
|
226
226
|
handleSelectionShortcut,
|
|
227
227
|
handleQuickMaskKey,
|
|
228
|
+
handleMaskViewKey,
|
|
228
229
|
ShapeDrawGesture,
|
|
229
230
|
TypeToolGesture,
|
|
230
231
|
DEFAULT_SHAPE_TOOL_OPTIONS,
|
|
@@ -602,7 +603,7 @@ var ImageEditorCanvas = ({
|
|
|
602
603
|
if (target?.closest?.('input, textarea, select, [contenteditable="true"]')) return;
|
|
603
604
|
if (window.getSelection?.()?.toString()) return;
|
|
604
605
|
const gesture = selectionGestureRef.current;
|
|
605
|
-
if (handleQuickMaskKey(controller, e)) {
|
|
606
|
+
if (handleQuickMaskKey(controller, e) || handleMaskViewKey(controller, e)) {
|
|
606
607
|
e.preventDefault();
|
|
607
608
|
return;
|
|
608
609
|
}
|
|
@@ -1670,6 +1671,7 @@ var Thumbnail = ({
|
|
|
1670
1671
|
pixels,
|
|
1671
1672
|
size,
|
|
1672
1673
|
label,
|
|
1674
|
+
title,
|
|
1673
1675
|
onClick,
|
|
1674
1676
|
selected,
|
|
1675
1677
|
testId
|
|
@@ -1691,6 +1693,7 @@ var Thumbnail = ({
|
|
|
1691
1693
|
ref,
|
|
1692
1694
|
role: onClick ? "button" : "img",
|
|
1693
1695
|
"aria-label": label,
|
|
1696
|
+
title,
|
|
1694
1697
|
"data-testid": testId,
|
|
1695
1698
|
onClick,
|
|
1696
1699
|
style: { width: size, height: size },
|
|
@@ -1717,6 +1720,7 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
1717
1720
|
};
|
|
1718
1721
|
const commitNext = useRef5(true);
|
|
1719
1722
|
const state = controller.getState();
|
|
1723
|
+
const maskView = controller.getMaskView();
|
|
1720
1724
|
const rows = layerPanelRows(state.layers, state.activeLayerId);
|
|
1721
1725
|
const active = controller.getActiveLayer();
|
|
1722
1726
|
const attempt = (fn) => {
|
|
@@ -2008,7 +2012,8 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
2008
2012
|
{
|
|
2009
2013
|
pixels: maskThumb(layer),
|
|
2010
2014
|
size: thumbnailSize,
|
|
2011
|
-
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}`,
|
|
2015
|
+
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}${maskView?.layerId === layer.id ? " (shown)" : ""}`,
|
|
2016
|
+
title: "Alt-click: show the mask alone \xB7 Alt+Shift-click: as an overlay",
|
|
2012
2017
|
testId: "layer-mask-thumbnail",
|
|
2013
2018
|
selected: row.active && state.activeTarget === "mask",
|
|
2014
2019
|
onClick: (e) => {
|
|
@@ -15,7 +15,7 @@ export interface LayersPanelProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* The layer stack, top first: visibility, thumbnails, names (double-click to rename), locks,
|
|
17
17
|
* mask thumbnails (click to paint the mask, Shift-click to disable it, Ctrl/⌘-click to load it
|
|
18
|
-
* as the selection; Ctrl/⌘-click a layer thumbnail to select its pixels), drag to reorder or drop
|
|
18
|
+
* as the selection, Alt-click to show it alone in grey, Alt+Shift-click as a red overlay; Ctrl/⌘-click a layer thumbnail to select its pixels), drag to reorder or drop
|
|
19
19
|
* into a group, opacity / fill / blend / clipping for the active layer, and the layer menu
|
|
20
20
|
* (right-click a row, or the ⋯ button), an fx badge on rows with effects (click to switch them
|
|
21
21
|
* on or off) and the active layer's effects. Every action is one undo step on the controller.
|
|
@@ -15,7 +15,7 @@ export interface LayersPanelProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* The layer stack, top first: visibility, thumbnails, names (double-click to rename), locks,
|
|
17
17
|
* mask thumbnails (click to paint the mask, Shift-click to disable it, Ctrl/⌘-click to load it
|
|
18
|
-
* as the selection; Ctrl/⌘-click a layer thumbnail to select its pixels), drag to reorder or drop
|
|
18
|
+
* as the selection, Alt-click to show it alone in grey, Alt+Shift-click as a red overlay; Ctrl/⌘-click a layer thumbnail to select its pixels), drag to reorder or drop
|
|
19
19
|
* into a group, opacity / fill / blend / clipping for the active layer, and the layer menu
|
|
20
20
|
* (right-click a row, or the ⋯ button), an fx badge on rows with effects (click to switch them
|
|
21
21
|
* on or off) and the active layer's effects. Every action is one undo step on the controller.
|
|
@@ -704,7 +704,7 @@ var ImageEditorCanvas = ({
|
|
|
704
704
|
if (target?.closest?.('input, textarea, select, [contenteditable="true"]')) return;
|
|
705
705
|
if (window.getSelection?.()?.toString()) return;
|
|
706
706
|
const gesture = selectionGestureRef.current;
|
|
707
|
-
if ((0, import_image_editor2.handleQuickMaskKey)(controller, e)) {
|
|
707
|
+
if ((0, import_image_editor2.handleQuickMaskKey)(controller, e) || (0, import_image_editor2.handleMaskViewKey)(controller, e)) {
|
|
708
708
|
e.preventDefault();
|
|
709
709
|
return;
|
|
710
710
|
}
|
|
@@ -1736,6 +1736,7 @@ var Thumbnail = ({
|
|
|
1736
1736
|
pixels,
|
|
1737
1737
|
size,
|
|
1738
1738
|
label,
|
|
1739
|
+
title,
|
|
1739
1740
|
onClick,
|
|
1740
1741
|
selected,
|
|
1741
1742
|
testId
|
|
@@ -1757,6 +1758,7 @@ var Thumbnail = ({
|
|
|
1757
1758
|
ref,
|
|
1758
1759
|
role: onClick ? "button" : "img",
|
|
1759
1760
|
"aria-label": label,
|
|
1761
|
+
title,
|
|
1760
1762
|
"data-testid": testId,
|
|
1761
1763
|
onClick,
|
|
1762
1764
|
style: { width: size, height: size },
|
|
@@ -1783,6 +1785,7 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
1783
1785
|
};
|
|
1784
1786
|
const commitNext = (0, import_react11.useRef)(true);
|
|
1785
1787
|
const state = controller.getState();
|
|
1788
|
+
const maskView = controller.getMaskView();
|
|
1786
1789
|
const rows = (0, import_image_editor8.layerPanelRows)(state.layers, state.activeLayerId);
|
|
1787
1790
|
const active = controller.getActiveLayer();
|
|
1788
1791
|
const attempt = (fn) => {
|
|
@@ -2074,7 +2077,8 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
2074
2077
|
{
|
|
2075
2078
|
pixels: maskThumb(layer),
|
|
2076
2079
|
size: thumbnailSize,
|
|
2077
|
-
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}`,
|
|
2080
|
+
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}${maskView?.layerId === layer.id ? " (shown)" : ""}`,
|
|
2081
|
+
title: "Alt-click: show the mask alone \xB7 Alt+Shift-click: as an overlay",
|
|
2078
2082
|
testId: "layer-mask-thumbnail",
|
|
2079
2083
|
selected: row.active && state.activeTarget === "mask",
|
|
2080
2084
|
onClick: (e) => {
|
package/dist/index.cjs
CHANGED
|
@@ -4418,7 +4418,7 @@ var ImageEditorCanvas = ({
|
|
|
4418
4418
|
if (target?.closest?.('input, textarea, select, [contenteditable="true"]')) return;
|
|
4419
4419
|
if (window.getSelection?.()?.toString()) return;
|
|
4420
4420
|
const gesture = selectionGestureRef.current;
|
|
4421
|
-
if ((0, import_image_editor2.handleQuickMaskKey)(controller, e)) {
|
|
4421
|
+
if ((0, import_image_editor2.handleQuickMaskKey)(controller, e) || (0, import_image_editor2.handleMaskViewKey)(controller, e)) {
|
|
4422
4422
|
e.preventDefault();
|
|
4423
4423
|
return;
|
|
4424
4424
|
}
|
|
@@ -5450,6 +5450,7 @@ var Thumbnail = ({
|
|
|
5450
5450
|
pixels,
|
|
5451
5451
|
size,
|
|
5452
5452
|
label,
|
|
5453
|
+
title,
|
|
5453
5454
|
onClick,
|
|
5454
5455
|
selected,
|
|
5455
5456
|
testId
|
|
@@ -5471,6 +5472,7 @@ var Thumbnail = ({
|
|
|
5471
5472
|
ref,
|
|
5472
5473
|
role: onClick ? "button" : "img",
|
|
5473
5474
|
"aria-label": label,
|
|
5475
|
+
title,
|
|
5474
5476
|
"data-testid": testId,
|
|
5475
5477
|
onClick,
|
|
5476
5478
|
style: { width: size, height: size },
|
|
@@ -5497,6 +5499,7 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
5497
5499
|
};
|
|
5498
5500
|
const commitNext = (0, import_react47.useRef)(true);
|
|
5499
5501
|
const state = controller.getState();
|
|
5502
|
+
const maskView = controller.getMaskView();
|
|
5500
5503
|
const rows = (0, import_image_editor8.layerPanelRows)(state.layers, state.activeLayerId);
|
|
5501
5504
|
const active = controller.getActiveLayer();
|
|
5502
5505
|
const attempt = (fn) => {
|
|
@@ -5788,7 +5791,8 @@ var LayersPanel = ({ controller, thumbnailSize = 32, psd = true, psdFileName = "
|
|
|
5788
5791
|
{
|
|
5789
5792
|
pixels: maskThumb(layer),
|
|
5790
5793
|
size: thumbnailSize,
|
|
5791
|
-
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}`,
|
|
5794
|
+
label: `${row.label} mask${layer.mask.enabled === false ? " (disabled)" : ""}${maskView?.layerId === layer.id ? " (shown)" : ""}`,
|
|
5795
|
+
title: "Alt-click: show the mask alone \xB7 Alt+Shift-click: as an overlay",
|
|
5792
5796
|
testId: "layer-mask-thumbnail",
|
|
5793
5797
|
selected: row.active && state.activeTarget === "mask",
|
|
5794
5798
|
onClick: (e) => {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.124.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"dependencies": {},
|
|
255
255
|
"peerDependencies": {
|
|
256
256
|
"@dagrejs/dagre": "^1.1.8",
|
|
257
|
-
"@pixerate/editor": ">=0.
|
|
257
|
+
"@pixerate/editor": ">=0.189.0 <1.0.0-0",
|
|
258
258
|
"@tiptap/core": "^2.27.3",
|
|
259
259
|
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
260
260
|
"@tiptap/extension-placeholder": "^2.27.3",
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
"tsup": "^9.0.0",
|
|
306
306
|
"typescript": "^5.7.3",
|
|
307
307
|
"vitest": "^5.0.5",
|
|
308
|
-
"@pixerate/editor": "0.
|
|
308
|
+
"@pixerate/editor": "0.189.0"
|
|
309
309
|
},
|
|
310
310
|
"scripts": {
|
|
311
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|