canvu-react 0.4.30 → 0.4.31

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/react.d.cts CHANGED
@@ -158,6 +158,8 @@ type ImagesMenuLabels = {
158
158
  title?: string;
159
159
  dragHandle?: string;
160
160
  focus?: string;
161
+ duplicate?: string;
162
+ /** @deprecated Use `duplicate` instead. */
161
163
  copy?: string;
162
164
  rotate?: string;
163
165
  delete?: string;
@@ -181,7 +183,7 @@ type ImagesMenuProps = {
181
183
  };
182
184
  /**
183
185
  * Floating side panel that lists images marked as "managed"
184
- * (via `pluginData.managed === true`) and offers copy, rotate, delete, and
186
+ * (via `pluginData.managed === true`) and offers duplicate, rotate, delete, and
185
187
  * drag-to-reorder actions. Managed images are also `locked`, so they do not
186
188
  * respond to direct canvas interaction.
187
189
  */
package/dist/react.d.ts CHANGED
@@ -158,6 +158,8 @@ type ImagesMenuLabels = {
158
158
  title?: string;
159
159
  dragHandle?: string;
160
160
  focus?: string;
161
+ duplicate?: string;
162
+ /** @deprecated Use `duplicate` instead. */
161
163
  copy?: string;
162
164
  rotate?: string;
163
165
  delete?: string;
@@ -181,7 +183,7 @@ type ImagesMenuProps = {
181
183
  };
182
184
  /**
183
185
  * Floating side panel that lists images marked as "managed"
184
- * (via `pluginData.managed === true`) and offers copy, rotate, delete, and
186
+ * (via `pluginData.managed === true`) and offers duplicate, rotate, delete, and
185
187
  * drag-to-reorder actions. Managed images are also `locked`, so they do not
186
188
  * respond to direct canvas interaction.
187
189
  */
package/dist/react.js CHANGED
@@ -3,7 +3,7 @@ import { createContext, forwardRef, useRef, useState, useCallback, useMemo, useI
3
3
  import { useSensors, useSensor, PointerSensor, DndContext } from '@dnd-kit/core';
4
4
  import { SortableContext, verticalListSortingStrategy, useSortable, arrayMove } from '@dnd-kit/sortable';
5
5
  import { CSS } from '@dnd-kit/utilities';
6
- import { Undo2, Redo2, Shapes, ChevronDown, Hand, MousePointer2, Square, Circle, Minus, ArrowUpRight, PenLine, Highlighter, Eraser, Type, Image as Image$1, Lock, LockOpen, Images, ChevronRight, GripVertical, Copy, RotateCw, Trash2 } from 'lucide-react';
6
+ import { Undo2, Redo2, Shapes, ChevronDown, Hand, MousePointer2, Square, Circle, Minus, ArrowUpRight, PenLine, Highlighter, Eraser, Type, Image as Image$1, Lock, LockOpen, Images, ChevronRight, GripVertical, CopyPlus, RotateCw, Trash2 } from 'lucide-react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { createPortal } from 'react-dom';
9
9
 
@@ -2198,7 +2198,7 @@ var defaultLabels = {
2198
2198
  title: "Images",
2199
2199
  dragHandle: "Drag to reorder",
2200
2200
  focus: "Focus on canvas",
2201
- copy: "Copy",
2201
+ duplicate: "Duplicate",
2202
2202
  rotate: "Rotate",
2203
2203
  delete: "Delete",
2204
2204
  collapse: "Collapse images menu",
@@ -2224,7 +2224,11 @@ function ImagesMenu({
2224
2224
  if (managed.length === 0) {
2225
2225
  return null;
2226
2226
  }
2227
- const resolvedLabels = { ...defaultLabels, ...labels };
2227
+ const resolvedLabels = {
2228
+ ...defaultLabels,
2229
+ ...labels,
2230
+ duplicate: labels?.duplicate ?? labels?.copy ?? defaultLabels.duplicate
2231
+ };
2228
2232
  if (collapsed) {
2229
2233
  return /* @__PURE__ */ jsx(
2230
2234
  "button",
@@ -2338,7 +2342,7 @@ function ImagesMenuRow({
2338
2342
  ),
2339
2343
  /* @__PURE__ */ jsx(FocusTarget, { label: labels.focus, onFocus, children: /* @__PURE__ */ jsx("div", { style: thumbBoxStyle, children: src ? /* @__PURE__ */ jsx("img", { src, alt: "", style: thumbImgStyle, draggable: false }) : null }) }),
2340
2344
  /* @__PURE__ */ jsxs("div", { style: actionsColumnStyle, children: [
2341
- /* @__PURE__ */ jsx(ImagesMenuAction, { label: labels.copy, onClick: onCopy, children: /* @__PURE__ */ jsx(Copy, { size: 18 }) }),
2345
+ /* @__PURE__ */ jsx(ImagesMenuAction, { label: labels.duplicate, onClick: onCopy, children: /* @__PURE__ */ jsx(CopyPlus, { size: 18 }) }),
2342
2346
  /* @__PURE__ */ jsx(ImagesMenuAction, { label: labels.rotate, onClick: onRotate, children: /* @__PURE__ */ jsx(RotateCw, { size: 18 }) }),
2343
2347
  /* @__PURE__ */ jsx(ImagesMenuAction, { label: labels.delete, onClick: onDelete, danger: true, children: /* @__PURE__ */ jsx(Trash2, { size: 18 }) })
2344
2348
  ] })