@1urso/generic-editor 0.1.27 → 0.1.28

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.
@@ -11143,12 +11143,12 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11143
11143
  return /* @__PURE__ */ jsx(Resizable, {
11144
11144
  className: "resizable-element",
11145
11145
  size: {
11146
- width: n.width,
11147
- height: n.autoGrow ? "auto" : n.height
11146
+ width: n.width ?? 100,
11147
+ height: n.autoGrow ? "auto" : n.height ?? 100
11148
11148
  },
11149
11149
  maxHeight: j.isList ? Math.max(10, _j - n.y) : void 0,
11150
11150
  onResizeStop: (_, E, A, j) => {
11151
- let M = n.width + j.width, N = n.height + j.height;
11151
+ let M = (n.width ?? 100) + j.width, N = (n.height ?? 100) + j.height;
11152
11152
  O(n.id, {
11153
11153
  width: M,
11154
11154
  height: N
@@ -11156,7 +11156,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11156
11156
  },
11157
11157
  style: {
11158
11158
  position: "absolute",
11159
- transform: `translate(${n.x}px, ${n.y}px) rotate(${n.rotation || 0}deg)`,
11159
+ transform: `translate(${n.x ?? 0}px, ${n.y ?? 0}px) rotate(${n.rotation || 0}deg)`,
11160
11160
  height: n.autoGrow ? "auto" : void 0,
11161
11161
  display: Cj && !_ ? "none" : void 0,
11162
11162
  opacity: Cj && _ ? .4 : 1
@@ -16698,7 +16698,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
16698
16698
  color: "gray",
16699
16699
  mb: "2",
16700
16700
  as: "div",
16701
- children: "Arraste para adicionar"
16701
+ children: "Clique para copiar ou arraste"
16702
16702
  }),
16703
16703
  /* @__PURE__ */ jsxs(p$1, {
16704
16704
  direction: "column",
@@ -16712,11 +16712,15 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
16712
16712
  justifyContent: "flex-start",
16713
16713
  cursor: "grab"
16714
16714
  },
16715
- title: n.dataName,
16715
+ title: `Clique para copiar {{${n.dataName}}}`,
16716
16716
  draggable: !0,
16717
16717
  onDragStart: (_) => {
16718
16718
  _.dataTransfer.setData("application/x-editor-prop", n.dataName), _.dataTransfer.effectAllowed = "copy";
16719
16719
  },
16720
+ onClick: () => {
16721
+ let _ = `{{${n.dataName}}}`;
16722
+ navigator.clipboard.writeText(_);
16723
+ },
16720
16724
  children: [n.name, /* @__PURE__ */ jsx(p$2, {
16721
16725
  color: "gray",
16722
16726
  style: {