@1urso/generic-editor 0.1.78 → 0.1.79

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.
@@ -11211,8 +11211,8 @@ var SAFE_FONTS = [
11211
11211
  "Arial Black",
11212
11212
  "Impact"
11213
11213
  ];
11214
- const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], theme: A = "light" }) => {
11215
- let [j, M] = useState({
11214
+ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], theme: A = "light", portalContainer: j = null }) => {
11215
+ let [M, N] = useState({
11216
11216
  elements: [],
11217
11217
  selectedElementIds: [],
11218
11218
  isList: E,
@@ -11247,7 +11247,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11247
11247
  isPropertiesPanelOpen: !1
11248
11248
  });
11249
11249
  React.useEffect(() => {
11250
- j.availableFonts.forEach((n) => {
11250
+ M.availableFonts.forEach((n) => {
11251
11251
  if (SAFE_FONTS.includes(n)) return;
11252
11252
  let _ = `font-${n.replace(/\s+/g, "-").toLowerCase()}`;
11253
11253
  if (!document.getElementById(_)) {
@@ -11255,8 +11255,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11255
11255
  E.id = _, E.href = `https://fonts.googleapis.com/css2?family=${n.replace(/ /g, "+")}&display=swap`, E.rel = "stylesheet", document.head.appendChild(E);
11256
11256
  }
11257
11257
  });
11258
- }, [j.availableFonts]), React.useEffect(() => {
11259
- M((n) => ({
11258
+ }, [M.availableFonts]), React.useEffect(() => {
11259
+ N((n) => ({
11260
11260
  ...n,
11261
11261
  isList: E,
11262
11262
  availableProps: O,
@@ -11267,38 +11267,38 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11267
11267
  O,
11268
11268
  A
11269
11269
  ]);
11270
- let N = React.useCallback((n) => {
11271
- M((_) => ({
11270
+ let P = React.useCallback((n) => {
11271
+ N((_) => ({
11272
11272
  ..._,
11273
11273
  isPropertiesPanelOpen: n
11274
11274
  }));
11275
- }, []), P = React.useCallback((n) => {
11276
- M((_) => ({
11275
+ }, []), z = React.useCallback((n) => {
11276
+ N((_) => ({
11277
11277
  ..._,
11278
11278
  canvasHeight: n
11279
11279
  }));
11280
- }, []), z = React.useCallback((n) => {
11281
- M((_) => ({
11280
+ }, []), B = React.useCallback((n) => {
11281
+ N((_) => ({
11282
11282
  ..._,
11283
11283
  gridSize: n
11284
11284
  }));
11285
- }, []), B = React.useCallback((n) => {
11286
- M((_) => ({
11285
+ }, []), H = React.useCallback((n) => {
11286
+ N((_) => ({
11287
11287
  ..._,
11288
11288
  zoom: n
11289
11289
  }));
11290
- }, []), H = React.useCallback((n) => {
11291
- M((_) => ({
11290
+ }, []), U = React.useCallback((n) => {
11291
+ N((_) => ({
11292
11292
  ..._,
11293
11293
  pan: n
11294
11294
  }));
11295
- }, []), U = React.useCallback((n) => {
11296
- M((_) => ({
11295
+ }, []), W = React.useCallback((n) => {
11296
+ N((_) => ({
11297
11297
  ..._,
11298
11298
  snapLines: n
11299
11299
  }));
11300
- }, []), W = React.useCallback((n) => {
11301
- M((_) => {
11300
+ }, []), G = React.useCallback((n) => {
11301
+ N((_) => {
11302
11302
  let E = n.elements || _.elements, O = [], A = /* @__PURE__ */ new Set();
11303
11303
  return E.forEach((n) => {
11304
11304
  let _ = n.id;
@@ -11325,8 +11325,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11325
11325
  clipboard: []
11326
11326
  };
11327
11327
  });
11328
- }, []), G = React.useCallback(() => {
11329
- M((n) => {
11328
+ }, []), Z = React.useCallback(() => {
11329
+ N((n) => {
11330
11330
  if (n.historyIndex > 0) {
11331
11331
  let _ = n.historyIndex - 1;
11332
11332
  return {
@@ -11338,8 +11338,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11338
11338
  }
11339
11339
  return n;
11340
11340
  });
11341
- }, []), Z = React.useCallback(() => {
11342
- M((n) => {
11341
+ }, []), Az = React.useCallback(() => {
11342
+ N((n) => {
11343
11343
  if (n.historyIndex < n.history.length - 1) {
11344
11344
  let _ = n.historyIndex + 1;
11345
11345
  return {
@@ -11351,15 +11351,15 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11351
11351
  }
11352
11352
  return n;
11353
11353
  });
11354
- }, []), Az = React.useCallback((n) => {
11355
- M((_) => n >= 0 && n < _.history.length ? {
11354
+ }, []), jz = React.useCallback((n) => {
11355
+ N((_) => n >= 0 && n < _.history.length ? {
11356
11356
  ..._,
11357
11357
  elements: _.history[n],
11358
11358
  historyIndex: n,
11359
11359
  selectedElementIds: []
11360
11360
  } : _);
11361
- }, []), jz = React.useCallback(() => {
11362
- M((n) => {
11361
+ }, []), Mz = React.useCallback(() => {
11362
+ N((n) => {
11363
11363
  if (n.selectedElementIds.length > 0) {
11364
11364
  let _ = n.elements.filter((_) => n.selectedElementIds.includes(_.id));
11365
11365
  return {
@@ -11369,8 +11369,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11369
11369
  }
11370
11370
  return n;
11371
11371
  });
11372
- }, []), Mz = React.useCallback(() => {
11373
- M((n) => {
11372
+ }, []), Nz = React.useCallback(() => {
11373
+ N((n) => {
11374
11374
  if (n.clipboard.length > 0) {
11375
11375
  let _ = n.clipboard.map((n) => ({
11376
11376
  ...n,
@@ -11391,7 +11391,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11391
11391
  }
11392
11392
  return n;
11393
11393
  });
11394
- }, []), Nz = React.useCallback((n) => {
11394
+ }, []), Pz = React.useCallback((n) => {
11395
11395
  let _ = {};
11396
11396
  n.type === "box" && (_.backgroundColor = "var(--gray-4)"), n.type === "text-container" && (_.backgroundColor = "var(--gray-4)", _.border = "1px solid var(--gray-8)", _.padding = "8px", _.display = "flex", _.alignItems = "flex-start", _.justifyContent = "flex-start");
11397
11397
  let E = {
@@ -11406,7 +11406,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11406
11406
  ...n.style || {}
11407
11407
  }
11408
11408
  };
11409
- M((n) => {
11409
+ N((n) => {
11410
11410
  let _ = [...n.elements, E], O = n.history.slice(0, n.historyIndex + 1);
11411
11411
  O.push(_);
11412
11412
  let A = n.historyDescriptions.slice(0, n.historyIndex + 1), j = {
@@ -11426,8 +11426,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11426
11426
  selectedElementIds: [E.id]
11427
11427
  };
11428
11428
  });
11429
- }, []), Pz = React.useCallback((n) => {
11430
- M((_) => {
11429
+ }, []), Fz = React.useCallback((n) => {
11430
+ N((_) => {
11431
11431
  let E = _.elements.filter((_) => _.id !== n), O = _.history.slice(0, _.historyIndex + 1);
11432
11432
  O.push(E);
11433
11433
  let A = _.historyDescriptions.slice(0, _.historyIndex + 1);
@@ -11440,8 +11440,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11440
11440
  historyIndex: O.length - 1
11441
11441
  };
11442
11442
  });
11443
- }, []), Fz = React.useCallback(() => {
11444
- M((n) => {
11443
+ }, []), Lz = React.useCallback(() => {
11444
+ N((n) => {
11445
11445
  if (n.selectedElementIds.length === 0) return n;
11446
11446
  let _ = n.elements.filter((_) => !n.selectedElementIds.includes(_.id)), E = n.history.slice(0, n.historyIndex + 1);
11447
11447
  E.push(_);
@@ -11455,8 +11455,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11455
11455
  historyIndex: E.length - 1
11456
11456
  };
11457
11457
  });
11458
- }, []), Lz = React.useCallback((n, _ = !1) => {
11459
- M((E) => {
11458
+ }, []), Rz = React.useCallback((n, _ = !1) => {
11459
+ N((E) => {
11460
11460
  if (n === null) return {
11461
11461
  ...E,
11462
11462
  selectedElementIds: []
@@ -11472,13 +11472,13 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11472
11472
  selectedElementIds: [n]
11473
11473
  };
11474
11474
  });
11475
- }, []), Rz = React.useCallback((n) => {
11476
- M((_) => ({
11475
+ }, []), zz = React.useCallback((n) => {
11476
+ N((_) => ({
11477
11477
  ..._,
11478
11478
  selectedElementIds: n
11479
11479
  }));
11480
- }, []), zz = React.useCallback((n, _) => {
11481
- M((E) => {
11480
+ }, []), Bz = React.useCallback((n, _) => {
11481
+ N((E) => {
11482
11482
  let O = [...E.elements], A = O[n];
11483
11483
  O.splice(n, 1), O.splice(_, 0, A);
11484
11484
  let j = E.history.slice(0, E.historyIndex + 1);
@@ -11492,8 +11492,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11492
11492
  historyIndex: j.length - 1
11493
11493
  };
11494
11494
  });
11495
- }, []), Bz = React.useCallback((n, _, E = !0) => {
11496
- M((O) => {
11495
+ }, []), Vz = React.useCallback((n, _, E = !0) => {
11496
+ N((O) => {
11497
11497
  let A = O.elements.map((E) => E.id === n ? {
11498
11498
  ...E,
11499
11499
  ..._
@@ -11506,8 +11506,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11506
11506
  historyIndex: M
11507
11507
  };
11508
11508
  });
11509
- }, []), Vz = React.useCallback((n, _ = !0) => {
11510
- M((E) => {
11509
+ }, []), Hz = React.useCallback((n, _ = !0) => {
11510
+ N((E) => {
11511
11511
  let O = [...E.elements], A = [], j = /* @__PURE__ */ new Set();
11512
11512
  n.forEach(({ id: n, changes: _ }) => {
11513
11513
  let O = E.elements.find((_) => _.id === n);
@@ -11561,8 +11561,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11561
11561
  historyIndex: P
11562
11562
  };
11563
11563
  });
11564
- }, []), Hz = React.useCallback((n) => {
11565
- M((_) => {
11564
+ }, []), Wz = React.useCallback((n) => {
11565
+ N((_) => {
11566
11566
  let E = _.elements.filter((_) => n.includes(_.id));
11567
11567
  if (E.length === 0) return _;
11568
11568
  let O = Math.min(...E.map((n) => n.x)), A = Math.min(...E.map((n) => n.y)), j = Math.max(...E.map((n) => n.x + n.width)), M = Math.max(...E.map((n) => n.y + n.height)), N = {
@@ -11592,8 +11592,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11592
11592
  historyIndex: z.length - 1
11593
11593
  };
11594
11594
  });
11595
- }, []), Wz = React.useCallback((n) => {
11596
- M((_) => {
11595
+ }, []), Gz = React.useCallback((n) => {
11596
+ N((_) => {
11597
11597
  let E = _.elements.find((_) => _.id === n);
11598
11598
  if (!E || E.type !== "group") return _;
11599
11599
  let O = [], A = _.elements.filter((_) => _.id !== n).map((_) => _.groupId === n ? (O.push(_.id), {
@@ -11611,8 +11611,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11611
11611
  historyIndex: j.length - 1
11612
11612
  };
11613
11613
  });
11614
- }, []), Gz = React.useCallback((n, _) => {
11615
- M((E) => {
11614
+ }, []), Kz = React.useCallback((n, _) => {
11615
+ N((E) => {
11616
11616
  let O = E.elements.map((E) => E.id === n ? {
11617
11617
  ...E,
11618
11618
  name: _
@@ -11622,7 +11622,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11622
11622
  elements: O
11623
11623
  };
11624
11624
  });
11625
- }, []), Kz = React.useCallback((n, _) => {
11625
+ }, []), qz = React.useCallback((n, _) => {
11626
11626
  if (!n.find((n) => n.id === _ && n.type === "group")) return n;
11627
11627
  let E = n.filter((n) => n.groupId === _);
11628
11628
  if (E.length === 0) return n;
@@ -11634,15 +11634,15 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11634
11634
  width: j - O,
11635
11635
  height: M - A
11636
11636
  } : n);
11637
- }, []), qz = React.useCallback((n, _) => {
11638
- M((E) => {
11637
+ }, []), Jz = React.useCallback((n, _) => {
11638
+ N((E) => {
11639
11639
  let O = E.elements.find((_) => _.id === n), A = E.elements.find((n) => n.id === _ && n.type === "group");
11640
11640
  if (!O || !A) return E;
11641
11641
  let j = E.elements.map((E) => E.id === n ? {
11642
11642
  ...E,
11643
11643
  groupId: _
11644
11644
  } : E);
11645
- j = Kz(j, _);
11645
+ j = qz(j, _);
11646
11646
  let M = E.history.slice(0, E.historyIndex + 1);
11647
11647
  M.push(j);
11648
11648
  let N = E.historyDescriptions.slice(0, E.historyIndex + 1);
@@ -11654,15 +11654,15 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11654
11654
  historyIndex: M.length - 1
11655
11655
  };
11656
11656
  });
11657
- }, [Kz]), Jz = React.useCallback((n) => {
11658
- M((_) => {
11657
+ }, [qz]), Yz = React.useCallback((n) => {
11658
+ N((_) => {
11659
11659
  let E = _.elements.find((_) => _.id === n);
11660
11660
  if (!E || !E.groupId) return _;
11661
11661
  let O = E.groupId, A = _.elements.map((_) => _.id === n ? {
11662
11662
  ..._,
11663
11663
  groupId: void 0
11664
11664
  } : _);
11665
- A = Kz(A, O);
11665
+ A = qz(A, O);
11666
11666
  let j = _.history.slice(0, _.historyIndex + 1);
11667
11667
  j.push(A);
11668
11668
  let M = _.historyDescriptions.slice(0, _.historyIndex + 1);
@@ -11674,8 +11674,8 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11674
11674
  historyIndex: j.length - 1
11675
11675
  };
11676
11676
  });
11677
- }, [Kz]), Yz = React.useCallback((n, _, E) => {
11678
- M((O) => {
11677
+ }, [qz]), Xz = React.useCallback((n, _, E) => {
11678
+ N((O) => {
11679
11679
  let A = O.elements.find((_) => _.id === n && _.type === "group");
11680
11680
  if (!A) return O;
11681
11681
  let j = _ / A.width, M = E / A.height, N = A.x, P = A.y, z = O.elements.map((O) => {
@@ -11706,67 +11706,68 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11706
11706
  historyIndex: B.length - 1
11707
11707
  };
11708
11708
  });
11709
- }, []), Xz = React.useCallback((n, _) => {
11710
- M((E) => ({
11709
+ }, []), Zz = React.useCallback((n, _) => {
11710
+ N((E) => ({
11711
11711
  ...E,
11712
11712
  mockData: n,
11713
11713
  singleMockData: _
11714
11714
  }));
11715
- }, []), Zz = React.useCallback((n) => {
11716
- M((_) => ({
11715
+ }, []), Qz = React.useCallback((n) => {
11716
+ N((_) => ({
11717
11717
  ..._,
11718
11718
  listSettings: {
11719
11719
  ..._.listSettings,
11720
11720
  ...n
11721
11721
  }
11722
11722
  }));
11723
- }, []), Qz = React.useCallback((n) => {
11724
- M((_) => ({
11723
+ }, []), $z = React.useCallback((n) => {
11724
+ N((_) => ({
11725
11725
  ..._,
11726
11726
  assets: [..._.assets, n]
11727
11727
  }));
11728
- }, []), $z = React.useCallback((n) => {
11729
- M((_) => ({
11728
+ }, []), eB = React.useCallback((n) => {
11729
+ N((_) => ({
11730
11730
  ..._,
11731
11731
  assets: _.assets.filter((_) => _.id !== n)
11732
11732
  }));
11733
11733
  }, []);
11734
11734
  return /* @__PURE__ */ jsx(EditorContext.Provider, {
11735
11735
  value: React.useMemo(() => ({
11736
- state: j,
11737
- setGridSize: z,
11738
- setZoom: B,
11739
- setPan: H,
11740
- setSnapLines: U,
11741
- addElement: Nz,
11742
- removeElement: Pz,
11743
- removeSelected: Fz,
11744
- selectElement: Lz,
11745
- setSelectedElements: Rz,
11746
- moveElement: zz,
11747
- updateElement: Bz,
11748
- updateElements: Vz,
11749
- groupElements: Hz,
11750
- ungroupElements: Wz,
11751
- renameElement: Gz,
11752
- addToGroup: qz,
11753
- removeFromGroup: Jz,
11754
- resizeGroup: Yz,
11755
- setMockData: Xz,
11756
- updateListSettings: Zz,
11757
- setCanvasHeight: P,
11758
- loadState: W,
11759
- undo: G,
11760
- redo: Z,
11761
- jumpToHistory: Az,
11762
- copy: jz,
11763
- paste: Mz,
11764
- setPropertiesPanelOpen: N,
11765
- addAsset: Qz,
11766
- removeAsset: $z
11736
+ state: M,
11737
+ portalContainer: j,
11738
+ setGridSize: B,
11739
+ setZoom: H,
11740
+ setPan: U,
11741
+ setSnapLines: W,
11742
+ addElement: Pz,
11743
+ removeElement: Fz,
11744
+ removeSelected: Lz,
11745
+ selectElement: Rz,
11746
+ setSelectedElements: zz,
11747
+ moveElement: Bz,
11748
+ updateElement: Vz,
11749
+ updateElements: Hz,
11750
+ groupElements: Wz,
11751
+ ungroupElements: Gz,
11752
+ renameElement: Kz,
11753
+ addToGroup: Jz,
11754
+ removeFromGroup: Yz,
11755
+ resizeGroup: Xz,
11756
+ setMockData: Zz,
11757
+ updateListSettings: Qz,
11758
+ setCanvasHeight: z,
11759
+ loadState: G,
11760
+ undo: Z,
11761
+ redo: Az,
11762
+ jumpToHistory: jz,
11763
+ copy: Mz,
11764
+ paste: Nz,
11765
+ setPropertiesPanelOpen: P,
11766
+ addAsset: $z,
11767
+ removeAsset: eB
11767
11768
  }), [
11769
+ M,
11768
11770
  j,
11769
- Nz,
11770
11771
  Pz,
11771
11772
  Fz,
11772
11773
  Lz,
@@ -11777,25 +11778,26 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
11777
11778
  Hz,
11778
11779
  Wz,
11779
11780
  Gz,
11780
- qz,
11781
+ Kz,
11781
11782
  Jz,
11782
11783
  Yz,
11783
11784
  Xz,
11784
11785
  Zz,
11785
- P,
11786
- W,
11786
+ Qz,
11787
+ z,
11787
11788
  G,
11788
11789
  Z,
11789
11790
  Az,
11790
11791
  jz,
11791
11792
  Mz,
11792
- z,
11793
+ Nz,
11793
11794
  B,
11794
11795
  H,
11795
11796
  U,
11796
- Qz,
11797
+ W,
11797
11798
  $z,
11798
- N
11799
+ eB,
11800
+ P
11799
11801
  ]),
11800
11802
  children: n
11801
11803
  });
@@ -13375,7 +13377,7 @@ const FONT_WEIGHT_OPTIONS = [
13375
13377
  ]
13376
13378
  });
13377
13379
  }, GlobalHeader = ({ onSave: n, templates: _, setIsTemplatesOpen: E, onFinish: O, onToggleSidebar: A }) => {
13378
- let { state: j, loadState: M, addElement: N } = useEditor(), P = useRef(null), z = () => {
13380
+ let { state: j, portalContainer: M, loadState: N, addElement: P } = useEditor(), z = useRef(null), B = () => {
13379
13381
  let n = {
13380
13382
  elements: j.elements,
13381
13383
  isList: j.isList,
@@ -13386,21 +13388,21 @@ const FONT_WEIGHT_OPTIONS = [
13386
13388
  gridSize: j.gridSize
13387
13389
  }, _ = JSON.stringify(n, null, 2), E = new Blob([_], { type: "application/json" }), O = URL.createObjectURL(E), A = document.createElement("a");
13388
13390
  A.href = O, A.download = `layout-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`, document.body.appendChild(A), A.click(), document.body.removeChild(A), URL.revokeObjectURL(O);
13389
- }, B = () => {
13390
- P.current?.click();
13391
- }, H = (n) => {
13391
+ }, H = () => {
13392
+ z.current?.click();
13393
+ }, U = (n) => {
13392
13394
  let _ = n.target.files?.[0];
13393
13395
  if (!_) return;
13394
13396
  let E = new FileReader();
13395
13397
  E.onload = (n) => {
13396
13398
  try {
13397
13399
  let _ = n.target?.result;
13398
- M(JSON.parse(_));
13400
+ N(JSON.parse(_));
13399
13401
  } catch (n) {
13400
13402
  console.error("Failed to import layout", n), alert("Erro ao importar layout. Arquivo inválido.");
13401
13403
  }
13402
13404
  }, E.readAsText(_), n.target.value = "";
13403
- }, U = () => {
13405
+ }, W = () => {
13404
13406
  if (n) {
13405
13407
  let _ = {
13406
13408
  elements: j.elements,
@@ -13412,8 +13414,8 @@ const FONT_WEIGHT_OPTIONS = [
13412
13414
  };
13413
13415
  n(JSON.stringify(_, null, 2));
13414
13416
  }
13415
- }, W = (n) => {
13416
- N({
13417
+ }, G = (n) => {
13418
+ P({
13417
13419
  type: n,
13418
13420
  content: `New ${n}`
13419
13421
  });
@@ -13460,42 +13462,45 @@ const FONT_WEIGHT_OPTIONS = [
13460
13462
  color: "green",
13461
13463
  style: { cursor: "pointer" },
13462
13464
  children: [/* @__PURE__ */ jsx(PlusIcon, {}), " Adicionar"]
13463
- }) }), /* @__PURE__ */ jsxs(g$2, { children: [
13464
- /* @__PURE__ */ jsx(v$4, {
13465
- onSelect: () => W("text"),
13466
- children: "Texto"
13467
- }),
13468
- /* @__PURE__ */ jsx(v$4, {
13469
- onSelect: () => W("image"),
13470
- children: "Imagem"
13471
- }),
13472
- /* @__PURE__ */ jsx(v$4, {
13473
- onSelect: () => W("box"),
13474
- children: "Container / Grupo"
13475
- }),
13476
- /* @__PURE__ */ jsx(v$4, {
13477
- onSelect: () => W("text-container"),
13478
- children: "Container com Texto"
13479
- })
13480
- ] })] }),
13465
+ }) }), /* @__PURE__ */ jsxs(g$2, {
13466
+ ...M && { container: M },
13467
+ children: [
13468
+ /* @__PURE__ */ jsx(v$4, {
13469
+ onSelect: () => G("text"),
13470
+ children: "Texto"
13471
+ }),
13472
+ /* @__PURE__ */ jsx(v$4, {
13473
+ onSelect: () => G("image"),
13474
+ children: "Imagem"
13475
+ }),
13476
+ /* @__PURE__ */ jsx(v$4, {
13477
+ onSelect: () => G("box"),
13478
+ children: "Container / Grupo"
13479
+ }),
13480
+ /* @__PURE__ */ jsx(v$4, {
13481
+ onSelect: () => G("text-container"),
13482
+ children: "Container com Texto"
13483
+ })
13484
+ ]
13485
+ })] }),
13481
13486
  /* @__PURE__ */ jsxs(o, {
13482
13487
  variant: "soft",
13483
13488
  color: "gray",
13484
- onClick: B,
13489
+ onClick: H,
13485
13490
  style: { cursor: "pointer" },
13486
13491
  children: [/* @__PURE__ */ jsx(UploadIcon, {}), " Importar"]
13487
13492
  }),
13488
13493
  /* @__PURE__ */ jsx("input", {
13489
13494
  type: "file",
13490
- ref: P,
13495
+ ref: z,
13491
13496
  style: { display: "none" },
13492
13497
  accept: ".json",
13493
- onChange: H
13498
+ onChange: U
13494
13499
  }),
13495
13500
  /* @__PURE__ */ jsxs(o, {
13496
13501
  variant: "soft",
13497
13502
  color: "gray",
13498
- onClick: z,
13503
+ onClick: B,
13499
13504
  style: { cursor: "pointer" },
13500
13505
  children: [/* @__PURE__ */ jsx(DownloadIcon, {}), " Exportar"]
13501
13506
  }),
@@ -13520,7 +13525,7 @@ const FONT_WEIGHT_OPTIONS = [
13520
13525
  /* @__PURE__ */ jsxs(o, {
13521
13526
  variant: "solid",
13522
13527
  color: "blue",
13523
- onClick: U,
13528
+ onClick: W,
13524
13529
  style: { cursor: "pointer" },
13525
13530
  children: [/* @__PURE__ */ jsx(Share1Icon, {}), " Salvar"]
13526
13531
  })
@@ -19177,14 +19182,14 @@ const toHex = (n) => {
19177
19182
  })
19178
19183
  }) : null;
19179
19184
  }, AnimationSettings = ({ element: n, updateElement: _ }) => {
19180
- let E = n.animation || {
19185
+ let { portalContainer: E } = useEditor(), O = n.animation || {
19181
19186
  type: "none",
19182
19187
  duration: 1,
19183
19188
  delay: 0
19184
- }, O = (O) => {
19189
+ }, A = (E) => {
19185
19190
  _(n.id, { animation: {
19186
- ...E,
19187
- ...O
19191
+ ...O,
19192
+ ...E
19188
19193
  } });
19189
19194
  };
19190
19195
  return /* @__PURE__ */ jsxs(p$1, {
@@ -19203,72 +19208,73 @@ const toHex = (n) => {
19203
19208
  width: "100%",
19204
19209
  justifyContent: "space-between"
19205
19210
  },
19206
- children: [E.type === "none" ? "Nenhuma" : E.type === "slideIn" ? "Slide In (Padrão)" : E.type === "fadeIn" ? "Fade In" : E.type === "smoothSlideUp" ? "Slide Suave (Up)" : E.type === "popIn" ? "Pop In" : E.type === "blurIn" ? "Blur In" : E.type === "slideInLeft" ? "Slide In (Esquerda)" : E.type === "slideInRight" ? "Slide In (Direita)" : E.type === "slideInUp" ? "Slide In (Cima)" : E.type === "slideInDown" ? "Slide In (Baixo)" : E.type === "zoomIn" ? "Zoom In" : E.type === "bounceIn" ? "Bounce In" : E.type === "pulse" ? "Pulse (Atenção)" : E.type === "shake" ? "Shake (Atenção)" : "Spin (Loop)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19211
+ children: [O.type === "none" ? "Nenhuma" : O.type === "slideIn" ? "Slide In (Padrão)" : O.type === "fadeIn" ? "Fade In" : O.type === "smoothSlideUp" ? "Slide Suave (Up)" : O.type === "popIn" ? "Pop In" : O.type === "blurIn" ? "Blur In" : O.type === "slideInLeft" ? "Slide In (Esquerda)" : O.type === "slideInRight" ? "Slide In (Direita)" : O.type === "slideInUp" ? "Slide In (Cima)" : O.type === "slideInDown" ? "Slide In (Baixo)" : O.type === "zoomIn" ? "Zoom In" : O.type === "bounceIn" ? "Bounce In" : O.type === "pulse" ? "Pulse (Atenção)" : O.type === "shake" ? "Shake (Atenção)" : "Spin (Loop)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19207
19212
  }) }), /* @__PURE__ */ jsxs(g$2, {
19213
+ ...E && { container: E },
19208
19214
  style: { zIndex: 1e5 },
19209
19215
  children: [
19210
19216
  /* @__PURE__ */ jsx(v$4, {
19211
- onSelect: () => O({ type: "none" }),
19217
+ onSelect: () => A({ type: "none" }),
19212
19218
  children: "Nenhuma"
19213
19219
  }),
19214
19220
  /* @__PURE__ */ jsx(v$4, {
19215
- onSelect: () => O({ type: "slideIn" }),
19221
+ onSelect: () => A({ type: "slideIn" }),
19216
19222
  children: "Slide In (Padrão)"
19217
19223
  }),
19218
19224
  /* @__PURE__ */ jsx(v$4, {
19219
- onSelect: () => O({ type: "fadeIn" }),
19225
+ onSelect: () => A({ type: "fadeIn" }),
19220
19226
  children: "Fade In"
19221
19227
  }),
19222
19228
  /* @__PURE__ */ jsx(v$4, {
19223
- onSelect: () => O({ type: "smoothSlideUp" }),
19229
+ onSelect: () => A({ type: "smoothSlideUp" }),
19224
19230
  children: "Slide Suave (Up)"
19225
19231
  }),
19226
19232
  /* @__PURE__ */ jsx(v$4, {
19227
- onSelect: () => O({ type: "popIn" }),
19233
+ onSelect: () => A({ type: "popIn" }),
19228
19234
  children: "Pop In"
19229
19235
  }),
19230
19236
  /* @__PURE__ */ jsx(v$4, {
19231
- onSelect: () => O({ type: "blurIn" }),
19237
+ onSelect: () => A({ type: "blurIn" }),
19232
19238
  children: "Blur In"
19233
19239
  }),
19234
19240
  /* @__PURE__ */ jsx(v$4, {
19235
- onSelect: () => O({ type: "slideInLeft" }),
19241
+ onSelect: () => A({ type: "slideInLeft" }),
19236
19242
  children: "Slide In (Esquerda)"
19237
19243
  }),
19238
19244
  /* @__PURE__ */ jsx(v$4, {
19239
- onSelect: () => O({ type: "slideInRight" }),
19245
+ onSelect: () => A({ type: "slideInRight" }),
19240
19246
  children: "Slide In (Direita)"
19241
19247
  }),
19242
19248
  /* @__PURE__ */ jsx(v$4, {
19243
- onSelect: () => O({ type: "slideInUp" }),
19249
+ onSelect: () => A({ type: "slideInUp" }),
19244
19250
  children: "Slide In (Cima)"
19245
19251
  }),
19246
19252
  /* @__PURE__ */ jsx(v$4, {
19247
- onSelect: () => O({ type: "slideInDown" }),
19253
+ onSelect: () => A({ type: "slideInDown" }),
19248
19254
  children: "Slide In (Baixo)"
19249
19255
  }),
19250
19256
  /* @__PURE__ */ jsx(v$4, {
19251
- onSelect: () => O({ type: "zoomIn" }),
19257
+ onSelect: () => A({ type: "zoomIn" }),
19252
19258
  children: "Zoom In"
19253
19259
  }),
19254
19260
  /* @__PURE__ */ jsx(v$4, {
19255
- onSelect: () => O({ type: "bounceIn" }),
19261
+ onSelect: () => A({ type: "bounceIn" }),
19256
19262
  children: "Bounce In"
19257
19263
  }),
19258
19264
  /* @__PURE__ */ jsx(v$4, {
19259
- onSelect: () => O({ type: "pulse" }),
19265
+ onSelect: () => A({ type: "pulse" }),
19260
19266
  children: "Pulse (Atenção)"
19261
19267
  }),
19262
19268
  /* @__PURE__ */ jsx(v$4, {
19263
- onSelect: () => O({ type: "shake" }),
19269
+ onSelect: () => A({ type: "shake" }),
19264
19270
  children: "Shake (Atenção)"
19265
19271
  }),
19266
19272
  /* @__PURE__ */ jsx(v$4, {
19267
- onSelect: () => O({ type: "spin" }),
19273
+ onSelect: () => A({ type: "spin" }),
19268
19274
  children: "Spin (Loop)"
19269
19275
  })
19270
19276
  ]
19271
- })] })] }), E.type !== "none" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
19277
+ })] })] }), O.type !== "none" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
19272
19278
  /* @__PURE__ */ jsxs(o$1, {
19273
19279
  columns: "2",
19274
19280
  gap: "3",
@@ -19282,8 +19288,8 @@ const toHex = (n) => {
19282
19288
  type: "number",
19283
19289
  step: "0.1",
19284
19290
  min: "0.1",
19285
- value: E.duration,
19286
- onChange: (n) => O({ duration: parseFloat(n.target.value) || .5 })
19291
+ value: O.duration,
19292
+ onChange: (n) => A({ duration: parseFloat(n.target.value) || .5 })
19287
19293
  })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
19288
19294
  size: "1",
19289
19295
  mb: "1",
@@ -19294,8 +19300,8 @@ const toHex = (n) => {
19294
19300
  type: "number",
19295
19301
  step: "0.1",
19296
19302
  min: "0",
19297
- value: E.delay,
19298
- onChange: (n) => O({ delay: parseFloat(n.target.value) || 0 })
19303
+ value: O.delay,
19304
+ onChange: (n) => A({ delay: parseFloat(n.target.value) || 0 })
19299
19305
  })] })]
19300
19306
  }),
19301
19307
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
@@ -19311,32 +19317,33 @@ const toHex = (n) => {
19311
19317
  width: "100%",
19312
19318
  justifyContent: "space-between"
19313
19319
  },
19314
- children: [(E.timingFunction || "ease") === "linear" ? "Linear" : (E.timingFunction || "ease") === "ease-in" ? "Ease In" : (E.timingFunction || "ease") === "ease-out" ? "Ease Out" : (E.timingFunction || "ease") === "ease-in-out" ? "Ease In Out" : (E.timingFunction || "ease") === "bounce" ? "Bounce" : "Ease", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19320
+ children: [(O.timingFunction || "ease") === "linear" ? "Linear" : (O.timingFunction || "ease") === "ease-in" ? "Ease In" : (O.timingFunction || "ease") === "ease-out" ? "Ease Out" : (O.timingFunction || "ease") === "ease-in-out" ? "Ease In Out" : (O.timingFunction || "ease") === "bounce" ? "Bounce" : "Ease", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19315
19321
  }) }), /* @__PURE__ */ jsxs(g$2, {
19322
+ ...E && { container: E },
19316
19323
  style: { zIndex: 1e5 },
19317
19324
  children: [
19318
19325
  /* @__PURE__ */ jsx(v$4, {
19319
- onSelect: () => O({ timingFunction: "linear" }),
19326
+ onSelect: () => A({ timingFunction: "linear" }),
19320
19327
  children: "Linear"
19321
19328
  }),
19322
19329
  /* @__PURE__ */ jsx(v$4, {
19323
- onSelect: () => O({ timingFunction: "ease" }),
19330
+ onSelect: () => A({ timingFunction: "ease" }),
19324
19331
  children: "Ease"
19325
19332
  }),
19326
19333
  /* @__PURE__ */ jsx(v$4, {
19327
- onSelect: () => O({ timingFunction: "ease-in" }),
19334
+ onSelect: () => A({ timingFunction: "ease-in" }),
19328
19335
  children: "Ease In"
19329
19336
  }),
19330
19337
  /* @__PURE__ */ jsx(v$4, {
19331
- onSelect: () => O({ timingFunction: "ease-out" }),
19338
+ onSelect: () => A({ timingFunction: "ease-out" }),
19332
19339
  children: "Ease Out"
19333
19340
  }),
19334
19341
  /* @__PURE__ */ jsx(v$4, {
19335
- onSelect: () => O({ timingFunction: "ease-in-out" }),
19342
+ onSelect: () => A({ timingFunction: "ease-in-out" }),
19336
19343
  children: "Ease In Out"
19337
19344
  }),
19338
19345
  /* @__PURE__ */ jsx(v$4, {
19339
- onSelect: () => O({ timingFunction: "bounce" }),
19346
+ onSelect: () => A({ timingFunction: "bounce" }),
19340
19347
  children: "Bounce"
19341
19348
  })
19342
19349
  ]
@@ -19345,13 +19352,13 @@ const toHex = (n) => {
19345
19352
  "pulse",
19346
19353
  "shake",
19347
19354
  "spin"
19348
- ].includes(E.type) && /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsxs(p$1, {
19355
+ ].includes(O.type) && /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsxs(p$1, {
19349
19356
  align: "center",
19350
19357
  gap: "2",
19351
19358
  mt: "2",
19352
19359
  children: [/* @__PURE__ */ jsx(i, {
19353
- checked: E.iterationCount === "infinite",
19354
- onCheckedChange: (n) => O({ iterationCount: n ? "infinite" : 1 })
19360
+ checked: O.iterationCount === "infinite",
19361
+ onCheckedChange: (n) => A({ iterationCount: n ? "infinite" : 1 })
19355
19362
  }), /* @__PURE__ */ jsx(p$2, {
19356
19363
  size: "2",
19357
19364
  children: "Repetir Infinitamente"
@@ -19360,10 +19367,10 @@ const toHex = (n) => {
19360
19367
  ] })]
19361
19368
  });
19362
19369
  }, FormattingSettings = ({ element: n, updateElement: _ }) => {
19363
- let E = n.formatting || { type: "text" }, O = (O) => {
19370
+ let { portalContainer: E } = useEditor(), O = n.formatting || { type: "text" }, A = (E) => {
19364
19371
  _(n.id, { formatting: {
19365
- ...E,
19366
- ...O
19372
+ ...O,
19373
+ ...E
19367
19374
  } });
19368
19375
  };
19369
19376
  return /* @__PURE__ */ jsxs(p$1, {
@@ -19401,6 +19408,7 @@ const toHex = (n) => {
19401
19408
  },
19402
19409
  children: [(n.containerExpansion || "vertical") === "vertical" ? "Vertical (Altura Cresce)" : "Horizontal (Largura Cresce)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19403
19410
  }) }), /* @__PURE__ */ jsxs(g$2, {
19411
+ ...E && { container: E },
19404
19412
  style: { zIndex: 1e5 },
19405
19413
  children: [/* @__PURE__ */ jsx(v$4, {
19406
19414
  onSelect: () => _(n.id, { containerExpansion: "vertical" }),
@@ -19423,28 +19431,31 @@ const toHex = (n) => {
19423
19431
  color: "gray",
19424
19432
  children: "Tipo de Formatação"
19425
19433
  }), /* @__PURE__ */ jsxs(C$1, {
19426
- value: E.type,
19427
- onValueChange: (n) => O({ type: n }),
19428
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
19429
- /* @__PURE__ */ jsx(v$2, {
19430
- value: "text",
19431
- children: "Texto (Padrão)"
19432
- }),
19433
- /* @__PURE__ */ jsx(v$2, {
19434
- value: "boolean",
19435
- children: "Booleano (Sim/Não)"
19436
- }),
19437
- /* @__PURE__ */ jsx(v$2, {
19438
- value: "date",
19439
- children: "Data"
19440
- }),
19441
- /* @__PURE__ */ jsx(v$2, {
19442
- value: "number",
19443
- children: "Número / Moeda"
19444
- })
19445
- ] })]
19434
+ value: O.type,
19435
+ onValueChange: (n) => A({ type: n }),
19436
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
19437
+ ...E && { container: E },
19438
+ children: [
19439
+ /* @__PURE__ */ jsx(v$2, {
19440
+ value: "text",
19441
+ children: "Texto (Padrão)"
19442
+ }),
19443
+ /* @__PURE__ */ jsx(v$2, {
19444
+ value: "boolean",
19445
+ children: "Booleano (Sim/Não)"
19446
+ }),
19447
+ /* @__PURE__ */ jsx(v$2, {
19448
+ value: "date",
19449
+ children: "Data"
19450
+ }),
19451
+ /* @__PURE__ */ jsx(v$2, {
19452
+ value: "number",
19453
+ children: "Número / Moeda"
19454
+ })
19455
+ ]
19456
+ })]
19446
19457
  })] }),
19447
- E.type === "boolean" && /* @__PURE__ */ jsxs(o$1, {
19458
+ O.type === "boolean" && /* @__PURE__ */ jsxs(o$1, {
19448
19459
  columns: "2",
19449
19460
  gap: "3",
19450
19461
  children: [/* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
@@ -19455,8 +19466,8 @@ const toHex = (n) => {
19455
19466
  children: "Texto para Verdadeiro"
19456
19467
  }), /* @__PURE__ */ jsx(u$1, {
19457
19468
  placeholder: "Ex: Sim",
19458
- value: E.trueLabel || "",
19459
- onChange: (n) => O({ trueLabel: n.target.value })
19469
+ value: O.trueLabel || "",
19470
+ onChange: (n) => A({ trueLabel: n.target.value })
19460
19471
  })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
19461
19472
  size: "1",
19462
19473
  mb: "1",
@@ -19465,11 +19476,11 @@ const toHex = (n) => {
19465
19476
  children: "Texto para Falso"
19466
19477
  }), /* @__PURE__ */ jsx(u$1, {
19467
19478
  placeholder: "Ex: Não",
19468
- value: E.falseLabel || "",
19469
- onChange: (n) => O({ falseLabel: n.target.value })
19479
+ value: O.falseLabel || "",
19480
+ onChange: (n) => A({ falseLabel: n.target.value })
19470
19481
  })] })]
19471
19482
  }),
19472
- E.type === "date" && /* @__PURE__ */ jsxs(p, { children: [
19483
+ O.type === "date" && /* @__PURE__ */ jsxs(p, { children: [
19473
19484
  /* @__PURE__ */ jsx(p$2, {
19474
19485
  size: "1",
19475
19486
  mb: "1",
@@ -19479,8 +19490,8 @@ const toHex = (n) => {
19479
19490
  }),
19480
19491
  /* @__PURE__ */ jsx(u$1, {
19481
19492
  placeholder: "Ex: DD/MM/YYYY",
19482
- value: E.dateFormat || "",
19483
- onChange: (n) => O({ dateFormat: n.target.value })
19493
+ value: O.dateFormat || "",
19494
+ onChange: (n) => A({ dateFormat: n.target.value })
19484
19495
  }),
19485
19496
  /* @__PURE__ */ jsx(p$2, {
19486
19497
  size: "1",
@@ -19490,7 +19501,7 @@ const toHex = (n) => {
19490
19501
  children: "Use DD, MM, YYYY, HH, mm, ss."
19491
19502
  })
19492
19503
  ] }),
19493
- E.type === "number" && /* @__PURE__ */ jsxs(p$1, {
19504
+ O.type === "number" && /* @__PURE__ */ jsxs(p$1, {
19494
19505
  direction: "column",
19495
19506
  gap: "3",
19496
19507
  children: [
@@ -19501,24 +19512,27 @@ const toHex = (n) => {
19501
19512
  color: "gray",
19502
19513
  children: "Estilo"
19503
19514
  }), /* @__PURE__ */ jsxs(C$1, {
19504
- value: E.numberFormat || "decimal",
19505
- onValueChange: (n) => O({ numberFormat: n }),
19506
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
19507
- /* @__PURE__ */ jsx(v$2, {
19508
- value: "decimal",
19509
- children: "Decimal"
19510
- }),
19511
- /* @__PURE__ */ jsx(v$2, {
19512
- value: "currency",
19513
- children: "Moeda"
19514
- }),
19515
- /* @__PURE__ */ jsx(v$2, {
19516
- value: "percent",
19517
- children: "Porcentagem"
19518
- })
19519
- ] })]
19515
+ value: O.numberFormat || "decimal",
19516
+ onValueChange: (n) => A({ numberFormat: n }),
19517
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
19518
+ ...E && { container: E },
19519
+ children: [
19520
+ /* @__PURE__ */ jsx(v$2, {
19521
+ value: "decimal",
19522
+ children: "Decimal"
19523
+ }),
19524
+ /* @__PURE__ */ jsx(v$2, {
19525
+ value: "currency",
19526
+ children: "Moeda"
19527
+ }),
19528
+ /* @__PURE__ */ jsx(v$2, {
19529
+ value: "percent",
19530
+ children: "Porcentagem"
19531
+ })
19532
+ ]
19533
+ })]
19520
19534
  })] }),
19521
- E.numberFormat === "currency" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
19535
+ O.numberFormat === "currency" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
19522
19536
  size: "1",
19523
19537
  mb: "1",
19524
19538
  as: "div",
@@ -19526,8 +19540,8 @@ const toHex = (n) => {
19526
19540
  children: "Símbolo da Moeda"
19527
19541
  }), /* @__PURE__ */ jsx(u$1, {
19528
19542
  placeholder: "Ex: R$",
19529
- value: E.currencySymbol || "",
19530
- onChange: (n) => O({ currencySymbol: n.target.value })
19543
+ value: O.currencySymbol || "",
19544
+ onChange: (n) => A({ currencySymbol: n.target.value })
19531
19545
  })] }),
19532
19546
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
19533
19547
  size: "1",
@@ -19538,8 +19552,8 @@ const toHex = (n) => {
19538
19552
  }), /* @__PURE__ */ jsx(u$1, {
19539
19553
  type: "number",
19540
19554
  placeholder: "2",
19541
- value: E.decimalPlaces === void 0 ? "" : E.decimalPlaces,
19542
- onChange: (n) => O({ decimalPlaces: parseInt(n.target.value) || 0 })
19555
+ value: O.decimalPlaces === void 0 ? "" : O.decimalPlaces,
19556
+ onChange: (n) => A({ decimalPlaces: parseInt(n.target.value) || 0 })
19543
19557
  })] })
19544
19558
  ]
19545
19559
  })
@@ -19797,9 +19811,9 @@ var parseBoxShadowColor = (n) => {
19797
19811
  }
19798
19812
  ];
19799
19813
  const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E }) => {
19800
- let O = n.styleBindings || {}, A = (E, A) => {
19801
- let j = { ...O };
19802
- A ? j[E] = A : delete j[E], _(n.id, { styleBindings: Object.keys(j).length > 0 ? j : void 0 });
19814
+ let { portalContainer: O } = useEditor(), A = n.styleBindings || {}, j = (E, O) => {
19815
+ let j = { ...A };
19816
+ O ? j[E] = O : delete j[E], _(n.id, { styleBindings: Object.keys(j).length > 0 ? j : void 0 });
19803
19817
  };
19804
19818
  return /* @__PURE__ */ jsxs(p$1, {
19805
19819
  direction: "column",
@@ -19830,16 +19844,17 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19830
19844
  width: "100%",
19831
19845
  justifyContent: "space-between"
19832
19846
  },
19833
- children: [O[n] ? E.find((_) => _.dataName === O[n])?.name || O[n] : "Nenhum", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19847
+ children: [A[n] ? E.find((_) => _.dataName === A[n])?.name || A[n] : "Nenhum", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19834
19848
  }) }), /* @__PURE__ */ jsxs(g$2, {
19849
+ ...O && { container: O },
19835
19850
  style: { zIndex: 1e5 },
19836
19851
  children: [
19837
19852
  /* @__PURE__ */ jsx(v$4, {
19838
- onSelect: () => A(n, null),
19853
+ onSelect: () => j(n, null),
19839
19854
  children: "Nenhum"
19840
19855
  }),
19841
19856
  E.map((_) => /* @__PURE__ */ jsx(v$4, {
19842
- onSelect: () => A(n, _.dataName),
19857
+ onSelect: () => j(n, _.dataName),
19843
19858
  children: _.name
19844
19859
  }, _.dataName)),
19845
19860
  E.length === 0 && /* @__PURE__ */ jsx(v$4, {
@@ -19851,21 +19866,21 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19851
19866
  ]
19852
19867
  });
19853
19868
  }, ConditionalSettings = ({ element: n, updateElement: _, availableProps: E }) => {
19854
- let O = n.conditions || [], A = () => {
19855
- let A = {
19869
+ let { portalContainer: O } = useEditor(), A = n.conditions || [], j = () => {
19870
+ let O = {
19856
19871
  id: crypto.randomUUID(),
19857
19872
  property: E.length > 0 ? E[0].dataName : "",
19858
19873
  operator: "equals",
19859
19874
  value: "",
19860
19875
  style: { color: "#ff0000" }
19861
19876
  };
19862
- _(n.id, { conditions: [...O, A] });
19863
- }, j = (E) => {
19864
- _(n.id, { conditions: O.filter((n) => n.id !== E) });
19865
- }, M = (E, A) => {
19866
- _(n.id, { conditions: O.map((n) => n.id === E ? {
19877
+ _(n.id, { conditions: [...A, O] });
19878
+ }, M = (E) => {
19879
+ _(n.id, { conditions: A.filter((n) => n.id !== E) });
19880
+ }, N = (E, O) => {
19881
+ _(n.id, { conditions: A.map((n) => n.id === E ? {
19867
19882
  ...n,
19868
- ...A
19883
+ ...O
19869
19884
  } : n) });
19870
19885
  };
19871
19886
  return /* @__PURE__ */ jsxs(p$1, {
@@ -19881,10 +19896,10 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19881
19896
  }), /* @__PURE__ */ jsxs(o, {
19882
19897
  size: "1",
19883
19898
  variant: "soft",
19884
- onClick: A,
19899
+ onClick: j,
19885
19900
  children: [/* @__PURE__ */ jsx(PlusIcon, {}), " Nova Regra"]
19886
19901
  })]
19887
- }), O.length === 0 ? /* @__PURE__ */ jsx(p$2, {
19902
+ }), A.length === 0 ? /* @__PURE__ */ jsx(p$2, {
19888
19903
  size: "1",
19889
19904
  color: "gray",
19890
19905
  style: { fontStyle: "italic" },
@@ -19892,7 +19907,7 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19892
19907
  }) : /* @__PURE__ */ jsx(p$1, {
19893
19908
  direction: "column",
19894
19909
  gap: "2",
19895
- children: O.map((n) => /* @__PURE__ */ jsxs(p, {
19910
+ children: A.map((n) => /* @__PURE__ */ jsxs(p, {
19896
19911
  style: {
19897
19912
  border: "1px solid var(--gray-6)",
19898
19913
  borderRadius: 4,
@@ -19915,7 +19930,7 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19915
19930
  size: "1",
19916
19931
  color: "red",
19917
19932
  variant: "ghost",
19918
- onClick: () => j(n.id),
19933
+ onClick: () => M(n.id),
19919
19934
  children: /* @__PURE__ */ jsx(TrashIcon, {})
19920
19935
  })]
19921
19936
  }),
@@ -19933,9 +19948,10 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19933
19948
  },
19934
19949
  children: [E.find((_) => _.dataName === n.property)?.name || n.property || "Propriedade", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19935
19950
  }) }), /* @__PURE__ */ jsxs(g$2, {
19951
+ ...O && { container: O },
19936
19952
  style: { zIndex: 1e5 },
19937
19953
  children: [E.map((_) => /* @__PURE__ */ jsx(v$4, {
19938
- onSelect: () => M(n.id, { property: _.dataName }),
19954
+ onSelect: () => N(n.id, { property: _.dataName }),
19939
19955
  children: _.name
19940
19956
  }, _.dataName)), E.length === 0 && /* @__PURE__ */ jsx(v$4, {
19941
19957
  disabled: !0,
@@ -19951,26 +19967,27 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19951
19967
  },
19952
19968
  children: [n.operator === "equals" ? "Igual a" : n.operator === "notEquals" ? "Diferente de" : n.operator === "contains" ? "Contém" : n.operator === "greaterThan" ? "Maior que" : "Menor que", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
19953
19969
  }) }), /* @__PURE__ */ jsxs(g$2, {
19970
+ ...O && { container: O },
19954
19971
  style: { zIndex: 1e5 },
19955
19972
  children: [
19956
19973
  /* @__PURE__ */ jsx(v$4, {
19957
- onSelect: () => M(n.id, { operator: "equals" }),
19974
+ onSelect: () => N(n.id, { operator: "equals" }),
19958
19975
  children: "Igual a"
19959
19976
  }),
19960
19977
  /* @__PURE__ */ jsx(v$4, {
19961
- onSelect: () => M(n.id, { operator: "notEquals" }),
19978
+ onSelect: () => N(n.id, { operator: "notEquals" }),
19962
19979
  children: "Diferente de"
19963
19980
  }),
19964
19981
  /* @__PURE__ */ jsx(v$4, {
19965
- onSelect: () => M(n.id, { operator: "contains" }),
19982
+ onSelect: () => N(n.id, { operator: "contains" }),
19966
19983
  children: "Contém"
19967
19984
  }),
19968
19985
  /* @__PURE__ */ jsx(v$4, {
19969
- onSelect: () => M(n.id, { operator: "greaterThan" }),
19986
+ onSelect: () => N(n.id, { operator: "greaterThan" }),
19970
19987
  children: "Maior que"
19971
19988
  }),
19972
19989
  /* @__PURE__ */ jsx(v$4, {
19973
- onSelect: () => M(n.id, { operator: "lessThan" }),
19990
+ onSelect: () => N(n.id, { operator: "lessThan" }),
19974
19991
  children: "Menor que"
19975
19992
  })
19976
19993
  ]
@@ -19980,7 +19997,7 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19980
19997
  size: "1",
19981
19998
  placeholder: "Valor",
19982
19999
  value: n.value,
19983
- onChange: (_) => M(n.id, { value: _.target.value })
20000
+ onChange: (_) => N(n.id, { value: _.target.value })
19984
20001
  }),
19985
20002
  /* @__PURE__ */ jsxs(p, {
19986
20003
  mt: "2",
@@ -19992,7 +20009,7 @@ const StyleBindingsSettings = ({ element: n, updateElement: _, availableProps: E
19992
20009
  children: "Cor quando verdadeiro"
19993
20010
  }), /* @__PURE__ */ jsx(ColorInput, {
19994
20011
  color: n.style?.color || "#ff0000",
19995
- onChange: (_) => M(n.id, { style: {
20012
+ onChange: (_) => N(n.id, { style: {
19996
20013
  ...n.style,
19997
20014
  color: _
19998
20015
  } })
@@ -20049,8 +20066,8 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20049
20066
  "rem",
20050
20067
  "vw",
20051
20068
  "vh"
20052
- ], min: O, max: A, placeholder: j, label: M }) => {
20053
- let N = (n) => n === "" ? EMPTY_UNIT : n, P = (n) => n === EMPTY_UNIT ? "" : n, z = (n) => {
20069
+ ], min: O, max: A, placeholder: j, label: M, portalContainer: N }) => {
20070
+ let P = (n) => n === "" ? EMPTY_UNIT : n, z = (n) => n === EMPTY_UNIT ? "" : n, B = (n) => {
20054
20071
  if (n == null || n === "") return {
20055
20072
  num: "",
20056
20073
  unit: E[0]
@@ -20063,11 +20080,11 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20063
20080
  num: "",
20064
20081
  unit: E[0]
20065
20082
  };
20066
- }, [B, H] = useState(z(n));
20083
+ }, [H, U] = useState(B(n));
20067
20084
  useEffect(() => {
20068
- H(z(n));
20085
+ U(B(n));
20069
20086
  }, [n]);
20070
- let U = (n, E) => {
20087
+ let W = (n, E) => {
20071
20088
  if (n === "") {
20072
20089
  _("");
20073
20090
  return;
@@ -20082,13 +20099,13 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20082
20099
  children: M
20083
20100
  }), /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(u$1, {
20084
20101
  type: "number",
20085
- value: B.num,
20102
+ value: H.num,
20086
20103
  onChange: (n) => {
20087
20104
  let _ = n.target.value;
20088
- H({
20089
- ...B,
20105
+ U({
20106
+ ...H,
20090
20107
  num: _
20091
- }), U(_, B.unit);
20108
+ }), W(_, H.unit);
20092
20109
  },
20093
20110
  placeholder: j,
20094
20111
  style: {
@@ -20099,33 +20116,36 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20099
20116
  min: O,
20100
20117
  max: A
20101
20118
  }), /* @__PURE__ */ jsxs(C$1, {
20102
- value: N(B.unit),
20119
+ value: P(H.unit),
20103
20120
  onValueChange: (n) => {
20104
- let _ = P(n);
20105
- H({
20106
- ...B,
20121
+ let _ = z(n);
20122
+ U({
20123
+ ...H,
20107
20124
  unit: _
20108
- }), U(B.num, _);
20125
+ }), W(H.num, _);
20109
20126
  },
20110
20127
  children: [/* @__PURE__ */ jsx(u$3, { style: {
20111
20128
  width: 60,
20112
20129
  borderTopLeftRadius: 0,
20113
20130
  borderBottomLeftRadius: 0,
20114
20131
  marginLeft: -1
20115
- } }), /* @__PURE__ */ jsx(g$1, { children: E.map((n) => /* @__PURE__ */ jsx(v$2, {
20116
- value: N(n),
20117
- children: n || j || "—"
20118
- }, n || EMPTY_UNIT)) })]
20132
+ } }), /* @__PURE__ */ jsx(g$1, {
20133
+ ...N && { container: N },
20134
+ children: E.map((n) => /* @__PURE__ */ jsx(v$2, {
20135
+ value: P(n),
20136
+ children: n || j || "—"
20137
+ }, n || EMPTY_UNIT))
20138
+ })]
20119
20139
  })] })] });
20120
- }, SideInput = ({ values: n, onChange: _, label: E }) => {
20121
- let [O, A] = useState(!0), j = (n) => {
20140
+ }, SideInput = ({ values: n, onChange: _, label: E, portalContainer: O }) => {
20141
+ let [A, j] = useState(!0), M = (n) => {
20122
20142
  _({
20123
20143
  top: n,
20124
20144
  right: n,
20125
20145
  bottom: n,
20126
20146
  left: n
20127
20147
  });
20128
- }, M = (E, O) => {
20148
+ }, N = (E, O) => {
20129
20149
  _({
20130
20150
  ...n,
20131
20151
  [E]: O
@@ -20140,41 +20160,46 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20140
20160
  color: "gray",
20141
20161
  children: E
20142
20162
  }), /* @__PURE__ */ jsx(e, {
20143
- content: O ? "Desvincular lados" : "Vincular lados",
20163
+ content: A ? "Desvincular lados" : "Vincular lados",
20144
20164
  children: /* @__PURE__ */ jsx(o$2, {
20145
20165
  size: "1",
20146
20166
  variant: "ghost",
20147
- color: O ? "blue" : "gray",
20148
- onClick: () => A(!O),
20149
- children: jsx(O ? LinkIcon : UnlinkIcon, {})
20167
+ color: A ? "blue" : "gray",
20168
+ onClick: () => j(!A),
20169
+ children: jsx(A ? LinkIcon : UnlinkIcon, {})
20150
20170
  })
20151
20171
  })]
20152
- }), O ? /* @__PURE__ */ jsx(UnitInput, {
20172
+ }), A ? /* @__PURE__ */ jsx(UnitInput, {
20173
+ portalContainer: O,
20153
20174
  value: n.top || "",
20154
- onChange: j,
20175
+ onChange: M,
20155
20176
  placeholder: "Todos"
20156
20177
  }) : /* @__PURE__ */ jsxs(o$1, {
20157
20178
  columns: "2",
20158
20179
  gap: "2",
20159
20180
  children: [
20160
20181
  /* @__PURE__ */ jsx(UnitInput, {
20182
+ portalContainer: O,
20161
20183
  value: n.top,
20162
- onChange: (n) => M("top", n),
20184
+ onChange: (n) => N("top", n),
20163
20185
  label: "Top"
20164
20186
  }),
20165
20187
  /* @__PURE__ */ jsx(UnitInput, {
20188
+ portalContainer: O,
20166
20189
  value: n.right,
20167
- onChange: (n) => M("right", n),
20190
+ onChange: (n) => N("right", n),
20168
20191
  label: "Right"
20169
20192
  }),
20170
20193
  /* @__PURE__ */ jsx(UnitInput, {
20194
+ portalContainer: O,
20171
20195
  value: n.bottom,
20172
- onChange: (n) => M("bottom", n),
20196
+ onChange: (n) => N("bottom", n),
20173
20197
  label: "Bottom"
20174
20198
  }),
20175
20199
  /* @__PURE__ */ jsx(UnitInput, {
20200
+ portalContainer: O,
20176
20201
  value: n.left,
20177
- onChange: (n) => M("left", n),
20202
+ onChange: (n) => N("left", n),
20178
20203
  label: "Left"
20179
20204
  })
20180
20205
  ]
@@ -20201,7 +20226,7 @@ var AccordionItem = ({ title: n, isOpen: _, onToggle: E, children: O, onReset: A
20201
20226
  })
20202
20227
  });
20203
20228
  const PropertiesDialog = () => {
20204
- let { state: n, setPropertiesPanelOpen: _, updateElement: E, updateElements: O, removeSelected: A, copy: j, paste: M, addElement: N } = useEditor(), { isPropertiesPanelOpen: P, selectedElementIds: z, elements: B } = n, H = useMemo(() => B.filter((n) => z.includes(n.id)), [B, z]), U = H[0], W = H.length > 1, [Z, Az] = useState({
20229
+ let { state: n, portalContainer: _, setPropertiesPanelOpen: E, updateElement: O, updateElements: A, removeSelected: j, copy: M, paste: N, addElement: P } = useEditor(), { isPropertiesPanelOpen: z, selectedElementIds: B, elements: H } = n, U = useMemo(() => H.filter((n) => B.includes(n.id)), [H, B]), W = U[0], Z = U.length > 1, [Az, jz] = useState({
20205
20230
  content: !0,
20206
20231
  layout: !0,
20207
20232
  typography: !0,
@@ -20213,76 +20238,76 @@ const PropertiesDialog = () => {
20213
20238
  conditions: !1,
20214
20239
  formatting: !1,
20215
20240
  spacing: !1
20216
- }), [jz, Mz] = useState(""), [Pz, Fz] = useState({});
20241
+ }), [Mz, Pz] = useState(""), [Fz, Lz] = useState({});
20217
20242
  useEffect(() => {
20218
20243
  let n = localStorage.getItem("editor-presets");
20219
20244
  if (n) try {
20220
- Fz(JSON.parse(n));
20245
+ Lz(JSON.parse(n));
20221
20246
  } catch (n) {
20222
20247
  console.error("Failed to load presets", n);
20223
20248
  }
20224
20249
  }, []);
20225
- let Lz = (n) => {
20226
- if (!U) return;
20250
+ let Rz = (n) => {
20251
+ if (!W) return;
20227
20252
  let _ = {
20228
- ...Pz,
20229
- [n]: { style: U.style }
20253
+ ...Fz,
20254
+ [n]: { style: W.style }
20230
20255
  };
20231
- Fz(_), localStorage.setItem("editor-presets", JSON.stringify(_));
20232
- }, Rz = (n) => {
20233
- let _ = Pz[n];
20234
- _ && _.style && Gz(_.style);
20256
+ Lz(_), localStorage.setItem("editor-presets", JSON.stringify(_));
20257
+ }, zz = (n) => {
20258
+ let _ = Fz[n];
20259
+ _ && _.style && Kz(_.style);
20235
20260
  };
20236
- if (!P || !U) return null;
20237
- let zz = (n) => {
20238
- Az((_) => ({
20261
+ if (!z || !W) return null;
20262
+ let Bz = (n) => {
20263
+ jz((_) => ({
20239
20264
  ..._,
20240
20265
  [n]: !_[n]
20241
20266
  }));
20242
- }, Bz = (n) => {
20243
- W ? O(z.map((_) => ({
20267
+ }, Vz = (n) => {
20268
+ Z ? A(B.map((_) => ({
20244
20269
  id: _,
20245
20270
  changes: n
20246
- }))) : E(U.id, n);
20247
- }, Vz = () => {
20248
- if (W) j(), M();
20271
+ }))) : O(W.id, n);
20272
+ }, Gz = () => {
20273
+ if (Z) M(), N();
20249
20274
  else {
20250
- let { id: n, ..._ } = U;
20251
- N({
20275
+ let { id: n, ..._ } = W;
20276
+ P({
20252
20277
  ..._,
20253
- x: U.x + 20,
20254
- y: U.y + 20
20278
+ x: W.x + 20,
20279
+ y: W.y + 20
20255
20280
  });
20256
20281
  }
20257
- }, Gz = (n) => {
20258
- W ? O(H.map((_) => ({
20282
+ }, Kz = (n) => {
20283
+ Z ? A(U.map((_) => ({
20259
20284
  id: _.id,
20260
20285
  changes: { style: {
20261
20286
  ..._.style,
20262
20287
  ...n
20263
20288
  } }
20264
- }))) : E(U.id, { style: {
20265
- ...U.style,
20289
+ }))) : O(W.id, { style: {
20290
+ ...W.style,
20266
20291
  ...n
20267
20292
  } });
20268
- }, Kz = (n) => {
20293
+ }, qz = (n) => {
20269
20294
  let _ = {};
20270
- n.forEach((n) => _[n] = void 0), Gz(_);
20271
- }, qz = (n, _) => {
20272
- if (!jz) return !0;
20273
- let E = jz.toLowerCase();
20295
+ n.forEach((n) => _[n] = void 0), Kz(_);
20296
+ }, Jz = (n, _) => {
20297
+ if (!Mz) return !0;
20298
+ let E = Mz.toLowerCase();
20274
20299
  return n.toLowerCase().includes(E) || _.some((n) => n.toLowerCase().includes(E));
20275
- }, Jz = (n) => {
20276
- if (!W) return n(U);
20277
- let _ = n(U);
20278
- return H.every((E) => n(E) === _) ? _ : "Mixed";
20279
- }, Yz = (n, _ = "") => {
20280
- let E = Jz((_) => _.style?.[n]);
20300
+ }, Yz = (n) => {
20301
+ if (!Z) return n(W);
20302
+ let _ = n(W);
20303
+ return U.every((E) => n(E) === _) ? _ : "Mixed";
20304
+ }, Xz = (n, _ = "") => {
20305
+ let E = Yz((_) => _.style?.[n]);
20281
20306
  return E === "Mixed" ? "Mixed" : E === void 0 ? _ : E;
20282
- }, Xz = String(Yz("fontFamily", "Arial")), Zz = ensureFontInOptions(Xz, n.availableFonts || ["Arial"]), Qz = () => {
20283
- let n = Yz("fontWeight", "normal");
20307
+ }, Zz = String(Xz("fontFamily", "Arial")), Qz = ensureFontInOptions(Zz, n.availableFonts || ["Arial"]), $z = () => {
20308
+ let n = Xz("fontWeight", "normal");
20284
20309
  return n === "Mixed" ? "400" : normalizeFontWeightForSelect(n, FONT_WEIGHT_OPTIONS_FULL);
20285
- }, $z = (n) => {
20310
+ }, eB = (n) => {
20286
20311
  let _ = {
20287
20312
  x: 0,
20288
20313
  y: 4,
@@ -20301,17 +20326,18 @@ const PropertiesDialog = () => {
20301
20326
  color: A.replace(j[0], "").trim() || _.color,
20302
20327
  inset: O
20303
20328
  } : _;
20304
- }, eB = $z(U.style?.boxShadow), tB = (n) => {
20329
+ }, tB = eB(W.style?.boxShadow), nB = (n) => {
20305
20330
  let _ = {
20306
- ...eB,
20331
+ ...tB,
20307
20332
  ...n
20308
20333
  };
20309
- Gz({ boxShadow: `${_.inset ? "inset " : ""}${_.x}px ${_.y}px ${_.blur}px ${_.spread}px ${_.color}` });
20334
+ Kz({ boxShadow: `${_.inset ? "inset " : ""}${_.x}px ${_.y}px ${_.blur}px ${_.spread}px ${_.color}` });
20310
20335
  };
20311
20336
  return /* @__PURE__ */ jsx(s$5, {
20312
- open: P,
20313
- onOpenChange: _,
20337
+ open: z,
20338
+ onOpenChange: E,
20314
20339
  children: /* @__PURE__ */ jsxs(p$11, {
20340
+ ..._ && { container: _ },
20315
20341
  style: {
20316
20342
  maxWidth: 500,
20317
20343
  width: "100%",
@@ -20336,37 +20362,40 @@ const PropertiesDialog = () => {
20336
20362
  }), /* @__PURE__ */ jsx(m$3, {
20337
20363
  size: "1",
20338
20364
  color: "gray",
20339
- children: W ? `${H.length} selecionados` : U.name || "Elemento"
20365
+ children: Z ? `${U.length} selecionados` : W.name || "Elemento"
20340
20366
  })] }), /* @__PURE__ */ jsxs(p$1, {
20341
20367
  gap: "2",
20342
20368
  children: [/* @__PURE__ */ jsxs(I$3, { children: [/* @__PURE__ */ jsx(h$2, { children: /* @__PURE__ */ jsx(o$2, {
20343
20369
  variant: "ghost",
20344
20370
  color: "gray",
20345
20371
  children: /* @__PURE__ */ jsx(BookmarkIcon, {})
20346
- }) }), /* @__PURE__ */ jsxs(g$2, { children: [
20347
- /* @__PURE__ */ jsx(y$3, { children: "Presets" }),
20348
- Object.keys(Pz).length === 0 && /* @__PURE__ */ jsx(v$4, {
20349
- disabled: !0,
20350
- children: "Nenhum preset salvo"
20351
- }),
20352
- Object.keys(Pz).map((n) => /* @__PURE__ */ jsx(v$4, {
20353
- onSelect: (_) => {
20354
- _.preventDefault(), Rz(n);
20355
- },
20356
- onClick: () => Rz(n),
20357
- style: { cursor: "pointer" },
20358
- children: n
20359
- }, n)),
20360
- /* @__PURE__ */ jsx(B$2, {}),
20361
- /* @__PURE__ */ jsxs(v$4, {
20362
- onSelect: (n) => {
20363
- n.preventDefault();
20364
- let _ = prompt("Nome do novo preset:");
20365
- _ && Lz(_);
20366
- },
20367
- children: [/* @__PURE__ */ jsx(PlusIcon, { style: { marginRight: 8 } }), " Salvar Atual"]
20368
- })
20369
- ] })] }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o$2, {
20372
+ }) }), /* @__PURE__ */ jsxs(g$2, {
20373
+ ..._ && { container: _ },
20374
+ children: [
20375
+ /* @__PURE__ */ jsx(y$3, { children: "Presets" }),
20376
+ Object.keys(Fz).length === 0 && /* @__PURE__ */ jsx(v$4, {
20377
+ disabled: !0,
20378
+ children: "Nenhum preset salvo"
20379
+ }),
20380
+ Object.keys(Fz).map((n) => /* @__PURE__ */ jsx(v$4, {
20381
+ onSelect: (_) => {
20382
+ _.preventDefault(), zz(n);
20383
+ },
20384
+ onClick: () => zz(n),
20385
+ style: { cursor: "pointer" },
20386
+ children: n
20387
+ }, n)),
20388
+ /* @__PURE__ */ jsx(B$2, {}),
20389
+ /* @__PURE__ */ jsxs(v$4, {
20390
+ onSelect: (n) => {
20391
+ n.preventDefault();
20392
+ let _ = prompt("Nome do novo preset:");
20393
+ _ && Rz(_);
20394
+ },
20395
+ children: [/* @__PURE__ */ jsx(PlusIcon, { style: { marginRight: 8 } }), " Salvar Atual"]
20396
+ })
20397
+ ]
20398
+ })] }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o$2, {
20370
20399
  variant: "ghost",
20371
20400
  color: "gray",
20372
20401
  children: /* @__PURE__ */ jsx(Cross2Icon, {})
@@ -20381,18 +20410,18 @@ const PropertiesDialog = () => {
20381
20410
  content: "Bloquear",
20382
20411
  children: /* @__PURE__ */ jsx(o$2, {
20383
20412
  variant: "soft",
20384
- color: U.locked ? "orange" : "gray",
20385
- onClick: () => Bz({ locked: !U.locked }),
20386
- children: U.locked ? /* @__PURE__ */ jsx(LockClosedIcon, {}) : /* @__PURE__ */ jsx(LockOpen1Icon, {})
20413
+ color: W.locked ? "orange" : "gray",
20414
+ onClick: () => Vz({ locked: !W.locked }),
20415
+ children: W.locked ? /* @__PURE__ */ jsx(LockClosedIcon, {}) : /* @__PURE__ */ jsx(LockOpen1Icon, {})
20387
20416
  })
20388
20417
  }),
20389
20418
  /* @__PURE__ */ jsx(e, {
20390
20419
  content: "Ocultar",
20391
20420
  children: /* @__PURE__ */ jsx(o$2, {
20392
20421
  variant: "soft",
20393
- color: U.hidden ? "blue" : "gray",
20394
- onClick: () => Bz({ hidden: !U.hidden }),
20395
- children: U.hidden ? /* @__PURE__ */ jsx(EyeNoneIcon, {}) : /* @__PURE__ */ jsx(EyeOpenIcon, {})
20422
+ color: W.hidden ? "blue" : "gray",
20423
+ onClick: () => Vz({ hidden: !W.hidden }),
20424
+ children: W.hidden ? /* @__PURE__ */ jsx(EyeNoneIcon, {}) : /* @__PURE__ */ jsx(EyeOpenIcon, {})
20396
20425
  })
20397
20426
  }),
20398
20427
  /* @__PURE__ */ jsx(e, {
@@ -20400,7 +20429,7 @@ const PropertiesDialog = () => {
20400
20429
  children: /* @__PURE__ */ jsx(o$2, {
20401
20430
  variant: "soft",
20402
20431
  color: "gray",
20403
- onClick: Vz,
20432
+ onClick: Gz,
20404
20433
  children: /* @__PURE__ */ jsx(CopyIcon, {})
20405
20434
  })
20406
20435
  }),
@@ -20411,7 +20440,7 @@ const PropertiesDialog = () => {
20411
20440
  variant: "soft",
20412
20441
  color: "red",
20413
20442
  onClick: () => {
20414
- A(), _(!1);
20443
+ j(), E(!1);
20415
20444
  },
20416
20445
  children: /* @__PURE__ */ jsx(TrashIcon, {})
20417
20446
  })
@@ -20427,8 +20456,8 @@ const PropertiesDialog = () => {
20427
20456
  },
20428
20457
  children: /* @__PURE__ */ jsx(u$1, {
20429
20458
  placeholder: "Buscar...",
20430
- value: jz,
20431
- onChange: (n) => Mz(n.target.value),
20459
+ value: Mz,
20460
+ onChange: (n) => Pz(n.target.value),
20432
20461
  children: /* @__PURE__ */ jsx(c$2, { children: /* @__PURE__ */ jsx(MagnifyingGlassIcon, {
20433
20462
  height: "16",
20434
20463
  width: "16"
@@ -20442,28 +20471,28 @@ const PropertiesDialog = () => {
20442
20471
  overflowX: "hidden"
20443
20472
  },
20444
20473
  children: [
20445
- qz("Conteúdo", [
20474
+ Jz("Conteúdo", [
20446
20475
  "text",
20447
20476
  "image",
20448
20477
  "url",
20449
20478
  "value",
20450
20479
  "content"
20451
- ]) && (U.type === "text" || U.type === "text-container" || U.type === "image") && /* @__PURE__ */ jsx(AccordionItem, {
20480
+ ]) && (W.type === "text" || W.type === "text-container" || W.type === "image") && /* @__PURE__ */ jsx(AccordionItem, {
20452
20481
  title: "Conteúdo",
20453
- isOpen: Z.content,
20454
- onToggle: () => zz("content"),
20455
- children: /* @__PURE__ */ jsxs(p, { children: [(U.type === "text" || U.type === "text-container") && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(p$2, {
20482
+ isOpen: Az.content,
20483
+ onToggle: () => Bz("content"),
20484
+ children: /* @__PURE__ */ jsxs(p, { children: [(W.type === "text" || W.type === "text-container") && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(p$2, {
20456
20485
  size: "1",
20457
20486
  color: "gray",
20458
20487
  mb: "1",
20459
20488
  as: "div",
20460
20489
  children: "Texto"
20461
20490
  }), /* @__PURE__ */ jsx(r$1, {
20462
- value: U.content || "",
20463
- onChange: (n) => Bz({ content: n.target.value }),
20491
+ value: W.content || "",
20492
+ onChange: (n) => Vz({ content: n.target.value }),
20464
20493
  rows: 4,
20465
20494
  placeholder: "Texto ou {{variavel}}..."
20466
- })] }), U.type === "image" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
20495
+ })] }), W.type === "image" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
20467
20496
  /* @__PURE__ */ jsx(p$2, {
20468
20497
  size: "1",
20469
20498
  color: "gray",
@@ -20480,14 +20509,15 @@ const PropertiesDialog = () => {
20480
20509
  justifyContent: "space-between",
20481
20510
  marginBottom: 8
20482
20511
  },
20483
- children: [U.dataBinding ? n.availableProps.find((n) => n.dataName === U.dataBinding)?.name || U.dataBinding : "Nenhum (URL fixa)", /* @__PURE__ */ jsx(CaretDownIcon, {})]
20512
+ children: [W.dataBinding ? n.availableProps.find((n) => n.dataName === W.dataBinding)?.name || W.dataBinding : "Nenhum (URL fixa)", /* @__PURE__ */ jsx(CaretDownIcon, {})]
20484
20513
  }) }), /* @__PURE__ */ jsxs(g$2, {
20514
+ ..._ && { container: _ },
20485
20515
  style: { zIndex: 1e5 },
20486
20516
  children: [/* @__PURE__ */ jsx(v$4, {
20487
- onSelect: () => Bz({ dataBinding: void 0 }),
20517
+ onSelect: () => Vz({ dataBinding: void 0 }),
20488
20518
  children: "Nenhum (URL fixa)"
20489
20519
  }), (n.availableProps || []).map((n) => /* @__PURE__ */ jsx(v$4, {
20490
- onSelect: () => Bz({
20520
+ onSelect: () => Vz({
20491
20521
  dataBinding: n.dataName,
20492
20522
  content: `{{${n.dataName}}}`
20493
20523
  }),
@@ -20502,13 +20532,13 @@ const PropertiesDialog = () => {
20502
20532
  children: ["URL ou ", "{{variável}}"]
20503
20533
  }),
20504
20534
  /* @__PURE__ */ jsx(u$1, {
20505
- value: U.content || "",
20506
- onChange: (n) => Bz({ content: n.target.value }),
20535
+ value: W.content || "",
20536
+ onChange: (n) => Vz({ content: n.target.value }),
20507
20537
  placeholder: "https://... ou {{profilePicture}}"
20508
20538
  })
20509
20539
  ] })] })
20510
20540
  }),
20511
- qz("Tipografia", [
20541
+ Jz("Tipografia", [
20512
20542
  "font",
20513
20543
  "text",
20514
20544
  "color",
@@ -20519,9 +20549,9 @@ const PropertiesDialog = () => {
20519
20549
  "decoration"
20520
20550
  ]) && /* @__PURE__ */ jsx(AccordionItem, {
20521
20551
  title: "Tipografia",
20522
- isOpen: Z.typography,
20523
- onToggle: () => zz("typography"),
20524
- onReset: () => Kz([
20552
+ isOpen: Az.typography,
20553
+ onToggle: () => Bz("typography"),
20554
+ onReset: () => qz([
20525
20555
  "fontFamily",
20526
20556
  "fontSize",
20527
20557
  "fontWeight",
@@ -20546,14 +20576,15 @@ const PropertiesDialog = () => {
20546
20576
  as: "div",
20547
20577
  children: "Família da Fonte"
20548
20578
  }), /* @__PURE__ */ jsxs(C$1, {
20549
- value: Xz,
20550
- onValueChange: (n) => Gz({ fontFamily: n }),
20579
+ value: Zz,
20580
+ onValueChange: (n) => Kz({ fontFamily: n }),
20551
20581
  children: [/* @__PURE__ */ jsx(u$3, {
20552
20582
  style: { width: "100%" },
20553
20583
  placeholder: "Selecione..."
20554
20584
  }), /* @__PURE__ */ jsx(g$1, {
20585
+ ..._ && { container: _ },
20555
20586
  style: { zIndex: 1e5 },
20556
- children: Zz.map((n) => /* @__PURE__ */ jsx(v$2, {
20587
+ children: Qz.map((n) => /* @__PURE__ */ jsx(v$2, {
20557
20588
  value: n,
20558
20589
  children: n
20559
20590
  }, n))
@@ -20561,14 +20592,16 @@ const PropertiesDialog = () => {
20561
20592
  })]
20562
20593
  }),
20563
20594
  /* @__PURE__ */ jsx(UnitInput, {
20595
+ portalContainer: _,
20564
20596
  label: "Tamanho",
20565
- value: Yz("fontSize", "16px"),
20566
- onChange: (n) => Gz({ fontSize: n })
20597
+ value: Xz("fontSize", "16px"),
20598
+ onChange: (n) => Kz({ fontSize: n })
20567
20599
  }),
20568
20600
  /* @__PURE__ */ jsx(UnitInput, {
20601
+ portalContainer: _,
20569
20602
  label: "Altura da Linha",
20570
- value: Yz("lineHeight", "normal"),
20571
- onChange: (n) => Gz({ lineHeight: n }),
20603
+ value: Xz("lineHeight", "normal"),
20604
+ onChange: (n) => Kz({ lineHeight: n }),
20572
20605
  units: [
20573
20606
  "",
20574
20607
  "px",
@@ -20578,9 +20611,10 @@ const PropertiesDialog = () => {
20578
20611
  placeholder: "Normal"
20579
20612
  }),
20580
20613
  /* @__PURE__ */ jsx(UnitInput, {
20614
+ portalContainer: _,
20581
20615
  label: "Espaçamento",
20582
- value: Yz("letterSpacing", "normal"),
20583
- onChange: (n) => Gz({ letterSpacing: n }),
20616
+ value: Xz("letterSpacing", "normal"),
20617
+ onChange: (n) => Kz({ letterSpacing: n }),
20584
20618
  units: ["px", "em"],
20585
20619
  placeholder: "Normal"
20586
20620
  }),
@@ -20591,12 +20625,13 @@ const PropertiesDialog = () => {
20591
20625
  as: "div",
20592
20626
  children: "Peso"
20593
20627
  }), /* @__PURE__ */ jsxs(C$1, {
20594
- value: Qz(),
20595
- onValueChange: (n) => Gz({ fontWeight: n }),
20628
+ value: $z(),
20629
+ onValueChange: (n) => Kz({ fontWeight: n }),
20596
20630
  children: [/* @__PURE__ */ jsx(u$3, {
20597
20631
  style: { width: "100%" },
20598
20632
  placeholder: "Normal"
20599
20633
  }), /* @__PURE__ */ jsxs(g$1, {
20634
+ ..._ && { container: _ },
20600
20635
  style: { zIndex: 1e5 },
20601
20636
  children: [
20602
20637
  /* @__PURE__ */ jsx(v$2, {
@@ -20653,18 +20688,18 @@ const PropertiesDialog = () => {
20653
20688
  gap: "1",
20654
20689
  children: [
20655
20690
  /* @__PURE__ */ jsx(o$2, {
20656
- variant: Yz("fontStyle") === "italic" ? "solid" : "soft",
20657
- onClick: () => Gz({ fontStyle: Yz("fontStyle") === "italic" ? "normal" : "italic" }),
20691
+ variant: Xz("fontStyle") === "italic" ? "solid" : "soft",
20692
+ onClick: () => Kz({ fontStyle: Xz("fontStyle") === "italic" ? "normal" : "italic" }),
20658
20693
  children: /* @__PURE__ */ jsx(FontItalicIcon, {})
20659
20694
  }),
20660
20695
  /* @__PURE__ */ jsx(o$2, {
20661
- variant: Yz("textDecoration") === "underline" ? "solid" : "soft",
20662
- onClick: () => Gz({ textDecoration: Yz("textDecoration") === "underline" ? "none" : "underline" }),
20696
+ variant: Xz("textDecoration") === "underline" ? "solid" : "soft",
20697
+ onClick: () => Kz({ textDecoration: Xz("textDecoration") === "underline" ? "none" : "underline" }),
20663
20698
  children: /* @__PURE__ */ jsx(UnderlineIcon, {})
20664
20699
  }),
20665
20700
  /* @__PURE__ */ jsx(o$2, {
20666
- variant: Yz("textDecoration") === "line-through" ? "solid" : "soft",
20667
- onClick: () => Gz({ textDecoration: Yz("textDecoration") === "line-through" ? "none" : "line-through" }),
20701
+ variant: Xz("textDecoration") === "line-through" ? "solid" : "soft",
20702
+ onClick: () => Kz({ textDecoration: Xz("textDecoration") === "line-through" ? "none" : "line-through" }),
20668
20703
  children: /* @__PURE__ */ jsx(StrikethroughIcon, {})
20669
20704
  })
20670
20705
  ]
@@ -20675,26 +20710,29 @@ const PropertiesDialog = () => {
20675
20710
  as: "div",
20676
20711
  children: "Transformação"
20677
20712
  }), /* @__PURE__ */ jsxs(C$1, {
20678
- value: Yz("textTransform", "none"),
20679
- onValueChange: (n) => Gz({ textTransform: n }),
20680
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: 100 } }), /* @__PURE__ */ jsxs(g$1, { children: [
20681
- /* @__PURE__ */ jsx(v$2, {
20682
- value: "none",
20683
- children: "Nenhum"
20684
- }),
20685
- /* @__PURE__ */ jsx(v$2, {
20686
- value: "uppercase",
20687
- children: "MAIÚSCULA"
20688
- }),
20689
- /* @__PURE__ */ jsx(v$2, {
20690
- value: "lowercase",
20691
- children: "minúscula"
20692
- }),
20693
- /* @__PURE__ */ jsx(v$2, {
20694
- value: "capitalize",
20695
- children: "Capitalizada"
20696
- })
20697
- ] })]
20713
+ value: Xz("textTransform", "none"),
20714
+ onValueChange: (n) => Kz({ textTransform: n }),
20715
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: 100 } }), /* @__PURE__ */ jsxs(g$1, {
20716
+ ..._ && { container: _ },
20717
+ children: [
20718
+ /* @__PURE__ */ jsx(v$2, {
20719
+ value: "none",
20720
+ children: "Nenhum"
20721
+ }),
20722
+ /* @__PURE__ */ jsx(v$2, {
20723
+ value: "uppercase",
20724
+ children: "MAIÚSCULA"
20725
+ }),
20726
+ /* @__PURE__ */ jsx(v$2, {
20727
+ value: "lowercase",
20728
+ children: "minúscula"
20729
+ }),
20730
+ /* @__PURE__ */ jsx(v$2, {
20731
+ value: "capitalize",
20732
+ children: "Capitalizada"
20733
+ })
20734
+ ]
20735
+ })]
20698
20736
  })] })]
20699
20737
  })
20700
20738
  }),
@@ -20707,8 +20745,8 @@ const PropertiesDialog = () => {
20707
20745
  as: "div",
20708
20746
  children: "Alinhamento"
20709
20747
  }), /* @__PURE__ */ jsxs(p$8, {
20710
- value: Yz("textAlign", "left"),
20711
- onValueChange: (n) => Gz({ textAlign: n }),
20748
+ value: Xz("textAlign", "left"),
20749
+ onValueChange: (n) => Kz({ textAlign: n }),
20712
20750
  children: [
20713
20751
  /* @__PURE__ */ jsx(l, {
20714
20752
  value: "left",
@@ -20738,23 +20776,23 @@ const PropertiesDialog = () => {
20738
20776
  as: "div",
20739
20777
  children: "Cor do Texto"
20740
20778
  }), /* @__PURE__ */ jsx(ColorInput, {
20741
- color: Yz("color", "#000000"),
20742
- onChange: (n) => Gz({ color: n })
20779
+ color: Xz("color", "#000000"),
20780
+ onChange: (n) => Kz({ color: n })
20743
20781
  })]
20744
20782
  })
20745
20783
  ]
20746
20784
  })
20747
20785
  }),
20748
- qz("Aparência", [
20786
+ Jz("Aparência", [
20749
20787
  "background",
20750
20788
  "opacity",
20751
20789
  "blend",
20752
20790
  "cursor"
20753
20791
  ]) && /* @__PURE__ */ jsxs(AccordionItem, {
20754
20792
  title: "Aparência",
20755
- isOpen: Z.appearance,
20756
- onToggle: () => zz("appearance"),
20757
- onReset: () => Kz([
20793
+ isOpen: Az.appearance,
20794
+ onToggle: () => Bz("appearance"),
20795
+ onReset: () => qz([
20758
20796
  "backgroundColor",
20759
20797
  "backgroundImage",
20760
20798
  "backgroundSize",
@@ -20790,8 +20828,8 @@ const PropertiesDialog = () => {
20790
20828
  as: "div",
20791
20829
  children: "Cor de Fundo"
20792
20830
  }), /* @__PURE__ */ jsx(ColorInput, {
20793
- color: Yz("backgroundColor", "transparent"),
20794
- onChange: (n) => Gz({
20831
+ color: Xz("backgroundColor", "transparent"),
20832
+ onChange: (n) => Kz({
20795
20833
  backgroundColor: n,
20796
20834
  backgroundImage: "none"
20797
20835
  })
@@ -20806,8 +20844,8 @@ const PropertiesDialog = () => {
20806
20844
  as: "div",
20807
20845
  children: "CSS Gradient"
20808
20846
  }), /* @__PURE__ */ jsx(r$1, {
20809
- value: Yz("backgroundImage", ""),
20810
- onChange: (n) => Gz({ backgroundImage: n.target.value }),
20847
+ value: Xz("backgroundImage", ""),
20848
+ onChange: (n) => Kz({ backgroundImage: n.target.value }),
20811
20849
  placeholder: "linear-gradient(to right, red, blue)",
20812
20850
  rows: 3
20813
20851
  })]
@@ -20823,8 +20861,8 @@ const PropertiesDialog = () => {
20823
20861
  children: "URL da Imagem"
20824
20862
  }),
20825
20863
  /* @__PURE__ */ jsx(u$1, {
20826
- value: Yz("backgroundImage", "").replace(/url\(['"]?(.*?)['"]?\)/, "$1"),
20827
- onChange: (n) => Gz({ backgroundImage: `url('${n.target.value}')` }),
20864
+ value: Xz("backgroundImage", "").replace(/url\(['"]?(.*?)['"]?\)/, "$1"),
20865
+ onChange: (n) => Kz({ backgroundImage: `url('${n.target.value}')` }),
20828
20866
  placeholder: "https://...",
20829
20867
  mb: "2"
20830
20868
  }),
@@ -20838,26 +20876,29 @@ const PropertiesDialog = () => {
20838
20876
  as: "div",
20839
20877
  children: "Tamanho"
20840
20878
  }), /* @__PURE__ */ jsxs(C$1, {
20841
- value: Yz("backgroundSize", "auto"),
20842
- onValueChange: (n) => Gz({ backgroundSize: n }),
20843
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
20844
- /* @__PURE__ */ jsx(v$2, {
20845
- value: "auto",
20846
- children: "Auto"
20847
- }),
20848
- /* @__PURE__ */ jsx(v$2, {
20849
- value: "cover",
20850
- children: "Cobrir (Cover)"
20851
- }),
20852
- /* @__PURE__ */ jsx(v$2, {
20853
- value: "contain",
20854
- children: "Conter (Contain)"
20855
- }),
20856
- /* @__PURE__ */ jsx(v$2, {
20857
- value: "100% 100%",
20858
- children: "Esticar"
20859
- })
20860
- ] })]
20879
+ value: Xz("backgroundSize", "auto"),
20880
+ onValueChange: (n) => Kz({ backgroundSize: n }),
20881
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
20882
+ ..._ && { container: _ },
20883
+ children: [
20884
+ /* @__PURE__ */ jsx(v$2, {
20885
+ value: "auto",
20886
+ children: "Auto"
20887
+ }),
20888
+ /* @__PURE__ */ jsx(v$2, {
20889
+ value: "cover",
20890
+ children: "Cobrir (Cover)"
20891
+ }),
20892
+ /* @__PURE__ */ jsx(v$2, {
20893
+ value: "contain",
20894
+ children: "Conter (Contain)"
20895
+ }),
20896
+ /* @__PURE__ */ jsx(v$2, {
20897
+ value: "100% 100%",
20898
+ children: "Esticar"
20899
+ })
20900
+ ]
20901
+ })]
20861
20902
  })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
20862
20903
  size: "1",
20863
20904
  color: "gray",
@@ -20865,26 +20906,29 @@ const PropertiesDialog = () => {
20865
20906
  as: "div",
20866
20907
  children: "Repetição"
20867
20908
  }), /* @__PURE__ */ jsxs(C$1, {
20868
- value: Yz("backgroundRepeat", "repeat"),
20869
- onValueChange: (n) => Gz({ backgroundRepeat: n }),
20870
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
20871
- /* @__PURE__ */ jsx(v$2, {
20872
- value: "repeat",
20873
- children: "Repetir"
20874
- }),
20875
- /* @__PURE__ */ jsx(v$2, {
20876
- value: "no-repeat",
20877
- children: "Não Repetir"
20878
- }),
20879
- /* @__PURE__ */ jsx(v$2, {
20880
- value: "repeat-x",
20881
- children: "Horizontal"
20882
- }),
20883
- /* @__PURE__ */ jsx(v$2, {
20884
- value: "repeat-y",
20885
- children: "Vertical"
20886
- })
20887
- ] })]
20909
+ value: Xz("backgroundRepeat", "repeat"),
20910
+ onValueChange: (n) => Kz({ backgroundRepeat: n }),
20911
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
20912
+ ..._ && { container: _ },
20913
+ children: [
20914
+ /* @__PURE__ */ jsx(v$2, {
20915
+ value: "repeat",
20916
+ children: "Repetir"
20917
+ }),
20918
+ /* @__PURE__ */ jsx(v$2, {
20919
+ value: "no-repeat",
20920
+ children: "Não Repetir"
20921
+ }),
20922
+ /* @__PURE__ */ jsx(v$2, {
20923
+ value: "repeat-x",
20924
+ children: "Horizontal"
20925
+ }),
20926
+ /* @__PURE__ */ jsx(v$2, {
20927
+ value: "repeat-y",
20928
+ children: "Vertical"
20929
+ })
20930
+ ]
20931
+ })]
20888
20932
  })] })]
20889
20933
  })
20890
20934
  ]
@@ -20907,12 +20951,12 @@ const PropertiesDialog = () => {
20907
20951
  min: 0,
20908
20952
  max: 1,
20909
20953
  step: .05,
20910
- value: [parseFloat(Yz("opacity", "1"))],
20911
- onValueChange: ([n]) => Gz({ opacity: n }),
20954
+ value: [parseFloat(Xz("opacity", "1"))],
20955
+ onValueChange: ([n]) => Kz({ opacity: n }),
20912
20956
  style: { flex: 1 }
20913
20957
  }), /* @__PURE__ */ jsxs(p$2, {
20914
20958
  size: "1",
20915
- children: [Math.round(parseFloat(Yz("opacity", "1")) * 100), "%"]
20959
+ children: [Math.round(parseFloat(Xz("opacity", "1")) * 100), "%"]
20916
20960
  })]
20917
20961
  })]
20918
20962
  }),
@@ -20927,34 +20971,37 @@ const PropertiesDialog = () => {
20927
20971
  as: "div",
20928
20972
  children: "Blend Mode"
20929
20973
  }), /* @__PURE__ */ jsxs(C$1, {
20930
- value: Yz("mixBlendMode", "normal"),
20931
- onValueChange: (n) => Gz({ mixBlendMode: n }),
20932
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
20933
- /* @__PURE__ */ jsx(v$2, {
20934
- value: "normal",
20935
- children: "Normal"
20936
- }),
20937
- /* @__PURE__ */ jsx(v$2, {
20938
- value: "multiply",
20939
- children: "Multiply"
20940
- }),
20941
- /* @__PURE__ */ jsx(v$2, {
20942
- value: "screen",
20943
- children: "Screen"
20944
- }),
20945
- /* @__PURE__ */ jsx(v$2, {
20946
- value: "overlay",
20947
- children: "Overlay"
20948
- }),
20949
- /* @__PURE__ */ jsx(v$2, {
20950
- value: "darken",
20951
- children: "Darken"
20952
- }),
20953
- /* @__PURE__ */ jsx(v$2, {
20954
- value: "lighten",
20955
- children: "Lighten"
20956
- })
20957
- ] })]
20974
+ value: Xz("mixBlendMode", "normal"),
20975
+ onValueChange: (n) => Kz({ mixBlendMode: n }),
20976
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
20977
+ ..._ && { container: _ },
20978
+ children: [
20979
+ /* @__PURE__ */ jsx(v$2, {
20980
+ value: "normal",
20981
+ children: "Normal"
20982
+ }),
20983
+ /* @__PURE__ */ jsx(v$2, {
20984
+ value: "multiply",
20985
+ children: "Multiply"
20986
+ }),
20987
+ /* @__PURE__ */ jsx(v$2, {
20988
+ value: "screen",
20989
+ children: "Screen"
20990
+ }),
20991
+ /* @__PURE__ */ jsx(v$2, {
20992
+ value: "overlay",
20993
+ children: "Overlay"
20994
+ }),
20995
+ /* @__PURE__ */ jsx(v$2, {
20996
+ value: "darken",
20997
+ children: "Darken"
20998
+ }),
20999
+ /* @__PURE__ */ jsx(v$2, {
21000
+ value: "lighten",
21001
+ children: "Lighten"
21002
+ })
21003
+ ]
21004
+ })]
20958
21005
  })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
20959
21006
  size: "1",
20960
21007
  color: "gray",
@@ -20962,39 +21009,42 @@ const PropertiesDialog = () => {
20962
21009
  as: "div",
20963
21010
  children: "Cursor"
20964
21011
  }), /* @__PURE__ */ jsxs(C$1, {
20965
- value: Yz("cursor", "auto"),
20966
- onValueChange: (n) => Gz({ cursor: n }),
20967
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
20968
- /* @__PURE__ */ jsx(v$2, {
20969
- value: "auto",
20970
- children: "Auto"
20971
- }),
20972
- /* @__PURE__ */ jsx(v$2, {
20973
- value: "default",
20974
- children: "Padrão"
20975
- }),
20976
- /* @__PURE__ */ jsx(v$2, {
20977
- value: "pointer",
20978
- children: "Mãozinha"
20979
- }),
20980
- /* @__PURE__ */ jsx(v$2, {
20981
- value: "text",
20982
- children: "Texto"
20983
- }),
20984
- /* @__PURE__ */ jsx(v$2, {
20985
- value: "move",
20986
- children: "Mover"
20987
- }),
20988
- /* @__PURE__ */ jsx(v$2, {
20989
- value: "not-allowed",
20990
- children: "Bloqueado"
20991
- })
20992
- ] })]
21012
+ value: Xz("cursor", "auto"),
21013
+ onValueChange: (n) => Kz({ cursor: n }),
21014
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
21015
+ ..._ && { container: _ },
21016
+ children: [
21017
+ /* @__PURE__ */ jsx(v$2, {
21018
+ value: "auto",
21019
+ children: "Auto"
21020
+ }),
21021
+ /* @__PURE__ */ jsx(v$2, {
21022
+ value: "default",
21023
+ children: "Padrão"
21024
+ }),
21025
+ /* @__PURE__ */ jsx(v$2, {
21026
+ value: "pointer",
21027
+ children: "Mãozinha"
21028
+ }),
21029
+ /* @__PURE__ */ jsx(v$2, {
21030
+ value: "text",
21031
+ children: "Texto"
21032
+ }),
21033
+ /* @__PURE__ */ jsx(v$2, {
21034
+ value: "move",
21035
+ children: "Mover"
21036
+ }),
21037
+ /* @__PURE__ */ jsx(v$2, {
21038
+ value: "not-allowed",
21039
+ children: "Bloqueado"
21040
+ })
21041
+ ]
21042
+ })]
20993
21043
  })] })]
20994
21044
  })
20995
21045
  ]
20996
21046
  }),
20997
- qz("Layout", [
21047
+ Jz("Layout", [
20998
21048
  "width",
20999
21049
  "height",
21000
21050
  "x",
@@ -21003,15 +21053,15 @@ const PropertiesDialog = () => {
21003
21053
  "overflow"
21004
21054
  ]) && /* @__PURE__ */ jsx(AccordionItem, {
21005
21055
  title: "Layout & Dimensões",
21006
- isOpen: Z.layout,
21007
- onToggle: () => zz("layout"),
21008
- onReset: () => Bz({
21056
+ isOpen: Az.layout,
21057
+ onToggle: () => Bz("layout"),
21058
+ onReset: () => Vz({
21009
21059
  width: 100,
21010
21060
  height: 100,
21011
21061
  x: 0,
21012
21062
  y: 0,
21013
21063
  style: {
21014
- ...U.style,
21064
+ ...W.style,
21015
21065
  zIndex: void 0,
21016
21066
  overflow: void 0
21017
21067
  }
@@ -21021,33 +21071,38 @@ const PropertiesDialog = () => {
21021
21071
  gap: "3",
21022
21072
  children: [
21023
21073
  /* @__PURE__ */ jsx(UnitInput, {
21074
+ portalContainer: _,
21024
21075
  label: "Largura",
21025
- value: U.width,
21026
- onChange: (n) => Bz({ width: parseFloat(n) }),
21076
+ value: W.width,
21077
+ onChange: (n) => Vz({ width: parseFloat(n) }),
21027
21078
  units: ["px"]
21028
21079
  }),
21029
21080
  /* @__PURE__ */ jsx(UnitInput, {
21081
+ portalContainer: _,
21030
21082
  label: "Altura",
21031
- value: U.height,
21032
- onChange: (n) => Bz({ height: parseFloat(n) }),
21083
+ value: W.height,
21084
+ onChange: (n) => Vz({ height: parseFloat(n) }),
21033
21085
  units: ["px"]
21034
21086
  }),
21035
21087
  /* @__PURE__ */ jsx(UnitInput, {
21088
+ portalContainer: _,
21036
21089
  label: "Posição X",
21037
- value: U.x,
21038
- onChange: (n) => Bz({ x: parseFloat(n) }),
21090
+ value: W.x,
21091
+ onChange: (n) => Vz({ x: parseFloat(n) }),
21039
21092
  units: ["px"]
21040
21093
  }),
21041
21094
  /* @__PURE__ */ jsx(UnitInput, {
21095
+ portalContainer: _,
21042
21096
  label: "Posição Y",
21043
- value: U.y,
21044
- onChange: (n) => Bz({ y: parseFloat(n) }),
21097
+ value: W.y,
21098
+ onChange: (n) => Vz({ y: parseFloat(n) }),
21045
21099
  units: ["px"]
21046
21100
  }),
21047
21101
  /* @__PURE__ */ jsx(UnitInput, {
21102
+ portalContainer: _,
21048
21103
  label: "Z-Index",
21049
- value: Yz("zIndex", "auto"),
21050
- onChange: (n) => Gz({ zIndex: n === "" ? void 0 : parseInt(n) }),
21104
+ value: Xz("zIndex", "auto"),
21105
+ onChange: (n) => Kz({ zIndex: n === "" ? void 0 : parseInt(n) }),
21051
21106
  units: [""],
21052
21107
  placeholder: "Auto"
21053
21108
  }),
@@ -21058,35 +21113,38 @@ const PropertiesDialog = () => {
21058
21113
  as: "div",
21059
21114
  children: "Overflow"
21060
21115
  }), /* @__PURE__ */ jsxs(C$1, {
21061
- value: Yz("overflow", "visible"),
21062
- onValueChange: (n) => Gz({ overflow: n }),
21063
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
21064
- /* @__PURE__ */ jsx(v$2, {
21065
- value: "visible",
21066
- children: "Visível"
21067
- }),
21068
- /* @__PURE__ */ jsx(v$2, {
21069
- value: "hidden",
21070
- children: "Oculto"
21071
- }),
21072
- /* @__PURE__ */ jsx(v$2, {
21073
- value: "scroll",
21074
- children: "Scroll"
21075
- }),
21076
- /* @__PURE__ */ jsx(v$2, {
21077
- value: "auto",
21078
- children: "Auto"
21079
- })
21080
- ] })]
21116
+ value: Xz("overflow", "visible"),
21117
+ onValueChange: (n) => Kz({ overflow: n }),
21118
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
21119
+ ..._ && { container: _ },
21120
+ children: [
21121
+ /* @__PURE__ */ jsx(v$2, {
21122
+ value: "visible",
21123
+ children: "Visível"
21124
+ }),
21125
+ /* @__PURE__ */ jsx(v$2, {
21126
+ value: "hidden",
21127
+ children: "Oculto"
21128
+ }),
21129
+ /* @__PURE__ */ jsx(v$2, {
21130
+ value: "scroll",
21131
+ children: "Scroll"
21132
+ }),
21133
+ /* @__PURE__ */ jsx(v$2, {
21134
+ value: "auto",
21135
+ children: "Auto"
21136
+ })
21137
+ ]
21138
+ })]
21081
21139
  })] })
21082
21140
  ]
21083
21141
  })
21084
21142
  }),
21085
- qz("Espaçamento", ["padding", "margin"]) && /* @__PURE__ */ jsxs(AccordionItem, {
21143
+ Jz("Espaçamento", ["padding", "margin"]) && /* @__PURE__ */ jsxs(AccordionItem, {
21086
21144
  title: "Espaçamento (Margin/Padding)",
21087
- isOpen: Z.spacing,
21088
- onToggle: () => zz("spacing"),
21089
- onReset: () => Kz([
21145
+ isOpen: Az.spacing,
21146
+ onToggle: () => Bz("spacing"),
21147
+ onReset: () => qz([
21090
21148
  "padding",
21091
21149
  "paddingTop",
21092
21150
  "paddingRight",
@@ -21101,21 +21159,22 @@ const PropertiesDialog = () => {
21101
21159
  children: [/* @__PURE__ */ jsx(p, {
21102
21160
  mb: "3",
21103
21161
  children: /* @__PURE__ */ jsx(SideInput, {
21162
+ portalContainer: _,
21104
21163
  label: "Padding (Interno)",
21105
21164
  values: {
21106
- top: Yz("paddingTop", Yz("padding")),
21107
- right: Yz("paddingRight", Yz("padding")),
21108
- bottom: Yz("paddingBottom", Yz("padding")),
21109
- left: Yz("paddingLeft", Yz("padding"))
21165
+ top: Xz("paddingTop", Xz("padding")),
21166
+ right: Xz("paddingRight", Xz("padding")),
21167
+ bottom: Xz("paddingBottom", Xz("padding")),
21168
+ left: Xz("paddingLeft", Xz("padding"))
21110
21169
  },
21111
21170
  onChange: (n) => {
21112
- n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Gz({
21171
+ n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Kz({
21113
21172
  padding: n.top,
21114
21173
  paddingTop: void 0,
21115
21174
  paddingRight: void 0,
21116
21175
  paddingBottom: void 0,
21117
21176
  paddingLeft: void 0
21118
- }) : Gz({
21177
+ }) : Kz({
21119
21178
  padding: void 0,
21120
21179
  paddingTop: n.top,
21121
21180
  paddingRight: n.right,
@@ -21125,21 +21184,22 @@ const PropertiesDialog = () => {
21125
21184
  }
21126
21185
  })
21127
21186
  }), /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(SideInput, {
21187
+ portalContainer: _,
21128
21188
  label: "Margin (Externo)",
21129
21189
  values: {
21130
- top: Yz("marginTop", Yz("margin")),
21131
- right: Yz("marginRight", Yz("margin")),
21132
- bottom: Yz("marginBottom", Yz("margin")),
21133
- left: Yz("marginLeft", Yz("margin"))
21190
+ top: Xz("marginTop", Xz("margin")),
21191
+ right: Xz("marginRight", Xz("margin")),
21192
+ bottom: Xz("marginBottom", Xz("margin")),
21193
+ left: Xz("marginLeft", Xz("margin"))
21134
21194
  },
21135
21195
  onChange: (n) => {
21136
- n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Gz({
21196
+ n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Kz({
21137
21197
  margin: n.top,
21138
21198
  marginTop: void 0,
21139
21199
  marginRight: void 0,
21140
21200
  marginBottom: void 0,
21141
21201
  marginLeft: void 0
21142
- }) : Gz({
21202
+ }) : Kz({
21143
21203
  margin: void 0,
21144
21204
  marginTop: n.top,
21145
21205
  marginRight: n.right,
@@ -21149,15 +21209,15 @@ const PropertiesDialog = () => {
21149
21209
  }
21150
21210
  }) })]
21151
21211
  }),
21152
- qz("Bordas", [
21212
+ Jz("Bordas", [
21153
21213
  "border",
21154
21214
  "radius",
21155
21215
  "stroke"
21156
21216
  ]) && /* @__PURE__ */ jsxs(AccordionItem, {
21157
21217
  title: "Bordas & Cantos",
21158
- isOpen: Z.borders,
21159
- onToggle: () => zz("borders"),
21160
- onReset: () => Kz([
21218
+ isOpen: Az.borders,
21219
+ onToggle: () => Bz("borders"),
21220
+ onReset: () => qz([
21161
21221
  "border",
21162
21222
  "borderWidth",
21163
21223
  "borderStyle",
@@ -21204,35 +21264,39 @@ const PropertiesDialog = () => {
21204
21264
  as: "div",
21205
21265
  children: "Estilo"
21206
21266
  }), /* @__PURE__ */ jsxs(C$1, {
21207
- value: Yz("borderStyle", "none"),
21208
- onValueChange: (n) => Gz({ borderStyle: n }),
21209
- children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, { children: [
21210
- /* @__PURE__ */ jsx(v$2, {
21211
- value: "none",
21212
- children: "Nenhuma"
21213
- }),
21214
- /* @__PURE__ */ jsx(v$2, {
21215
- value: "solid",
21216
- children: "Sólida"
21217
- }),
21218
- /* @__PURE__ */ jsx(v$2, {
21219
- value: "dashed",
21220
- children: "Tracejada"
21221
- }),
21222
- /* @__PURE__ */ jsx(v$2, {
21223
- value: "dotted",
21224
- children: "Pontilhada"
21225
- }),
21226
- /* @__PURE__ */ jsx(v$2, {
21227
- value: "double",
21228
- children: "Dupla"
21229
- })
21230
- ] })]
21267
+ value: Xz("borderStyle", "none"),
21268
+ onValueChange: (n) => Kz({ borderStyle: n }),
21269
+ children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
21270
+ ..._ && { container: _ },
21271
+ children: [
21272
+ /* @__PURE__ */ jsx(v$2, {
21273
+ value: "none",
21274
+ children: "Nenhuma"
21275
+ }),
21276
+ /* @__PURE__ */ jsx(v$2, {
21277
+ value: "solid",
21278
+ children: "Sólida"
21279
+ }),
21280
+ /* @__PURE__ */ jsx(v$2, {
21281
+ value: "dashed",
21282
+ children: "Tracejada"
21283
+ }),
21284
+ /* @__PURE__ */ jsx(v$2, {
21285
+ value: "dotted",
21286
+ children: "Pontilhada"
21287
+ }),
21288
+ /* @__PURE__ */ jsx(v$2, {
21289
+ value: "double",
21290
+ children: "Dupla"
21291
+ })
21292
+ ]
21293
+ })]
21231
21294
  })] }),
21232
21295
  /* @__PURE__ */ jsx(UnitInput, {
21296
+ portalContainer: _,
21233
21297
  label: "Espessura",
21234
- value: Yz("borderWidth", "0px"),
21235
- onChange: (n) => Gz({ borderWidth: n })
21298
+ value: Xz("borderWidth", "0px"),
21299
+ onChange: (n) => Kz({ borderWidth: n })
21236
21300
  }),
21237
21301
  /* @__PURE__ */ jsxs(p, {
21238
21302
  style: { gridColumn: "span 2" },
@@ -21243,8 +21307,8 @@ const PropertiesDialog = () => {
21243
21307
  as: "div",
21244
21308
  children: "Cor"
21245
21309
  }), /* @__PURE__ */ jsx(ColorInput, {
21246
- color: Yz("borderColor", "#000000"),
21247
- onChange: (n) => Gz({ borderColor: n })
21310
+ color: Xz("borderColor", "#000000"),
21311
+ onChange: (n) => Kz({ borderColor: n })
21248
21312
  })]
21249
21313
  })
21250
21314
  ]
@@ -21253,21 +21317,22 @@ const PropertiesDialog = () => {
21253
21317
  }), /* @__PURE__ */ jsx(p, {
21254
21318
  mt: "3",
21255
21319
  children: /* @__PURE__ */ jsx(SideInput, {
21320
+ portalContainer: _,
21256
21321
  label: "Arredondamento (Radius)",
21257
21322
  values: {
21258
- top: Yz("borderTopLeftRadius", Yz("borderRadius")),
21259
- right: Yz("borderTopRightRadius", Yz("borderRadius")),
21260
- bottom: Yz("borderBottomRightRadius", Yz("borderRadius")),
21261
- left: Yz("borderBottomLeftRadius", Yz("borderRadius"))
21323
+ top: Xz("borderTopLeftRadius", Xz("borderRadius")),
21324
+ right: Xz("borderTopRightRadius", Xz("borderRadius")),
21325
+ bottom: Xz("borderBottomRightRadius", Xz("borderRadius")),
21326
+ left: Xz("borderBottomLeftRadius", Xz("borderRadius"))
21262
21327
  },
21263
21328
  onChange: (n) => {
21264
- n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Gz({
21329
+ n.top === n.right && n.right === n.bottom && n.bottom === n.left ? Kz({
21265
21330
  borderRadius: n.top,
21266
21331
  borderTopLeftRadius: void 0,
21267
21332
  borderTopRightRadius: void 0,
21268
21333
  borderBottomRightRadius: void 0,
21269
21334
  borderBottomLeftRadius: void 0
21270
- }) : Gz({
21335
+ }) : Kz({
21271
21336
  borderRadius: void 0,
21272
21337
  borderTopLeftRadius: n.top,
21273
21338
  borderTopRightRadius: n.right,
@@ -21278,11 +21343,11 @@ const PropertiesDialog = () => {
21278
21343
  })
21279
21344
  })]
21280
21345
  }),
21281
- qz("Efeitos", ["shadow", "sombra"]) && /* @__PURE__ */ jsx(AccordionItem, {
21346
+ Jz("Efeitos", ["shadow", "sombra"]) && /* @__PURE__ */ jsx(AccordionItem, {
21282
21347
  title: "Efeitos (Sombra)",
21283
- isOpen: Z.effects,
21284
- onToggle: () => zz("effects"),
21285
- onReset: () => Kz(["boxShadow", "textShadow"]),
21348
+ isOpen: Az.effects,
21349
+ onToggle: () => Bz("effects"),
21350
+ onReset: () => qz(["boxShadow", "textShadow"]),
21286
21351
  children: /* @__PURE__ */ jsxs(m$1, {
21287
21352
  defaultValue: "box",
21288
21353
  children: [/* @__PURE__ */ jsxs(b$1, { children: [/* @__PURE__ */ jsx(P$1, {
@@ -21317,8 +21382,8 @@ const PropertiesDialog = () => {
21317
21382
  children: "Inset"
21318
21383
  }), /* @__PURE__ */ jsx("input", {
21319
21384
  type: "checkbox",
21320
- checked: eB.inset,
21321
- onChange: (n) => tB({ inset: n.target.checked })
21385
+ checked: tB.inset,
21386
+ onChange: (n) => nB({ inset: n.target.checked })
21322
21387
  })]
21323
21388
  })]
21324
21389
  }),
@@ -21328,34 +21393,38 @@ const PropertiesDialog = () => {
21328
21393
  mb: "2",
21329
21394
  children: [
21330
21395
  /* @__PURE__ */ jsx(UnitInput, {
21396
+ portalContainer: _,
21331
21397
  label: "X",
21332
- value: eB.x,
21333
- onChange: (n) => tB({ x: parseFloat(n) }),
21398
+ value: tB.x,
21399
+ onChange: (n) => nB({ x: parseFloat(n) }),
21334
21400
  units: ["px"]
21335
21401
  }),
21336
21402
  /* @__PURE__ */ jsx(UnitInput, {
21403
+ portalContainer: _,
21337
21404
  label: "Y",
21338
- value: eB.y,
21339
- onChange: (n) => tB({ y: parseFloat(n) }),
21405
+ value: tB.y,
21406
+ onChange: (n) => nB({ y: parseFloat(n) }),
21340
21407
  units: ["px"]
21341
21408
  }),
21342
21409
  /* @__PURE__ */ jsx(UnitInput, {
21410
+ portalContainer: _,
21343
21411
  label: "Blur",
21344
- value: eB.blur,
21345
- onChange: (n) => tB({ blur: parseFloat(n) }),
21412
+ value: tB.blur,
21413
+ onChange: (n) => nB({ blur: parseFloat(n) }),
21346
21414
  units: ["px"]
21347
21415
  }),
21348
21416
  /* @__PURE__ */ jsx(UnitInput, {
21417
+ portalContainer: _,
21349
21418
  label: "Spread",
21350
- value: eB.spread,
21351
- onChange: (n) => tB({ spread: parseFloat(n) }),
21419
+ value: tB.spread,
21420
+ onChange: (n) => nB({ spread: parseFloat(n) }),
21352
21421
  units: ["px"]
21353
21422
  })
21354
21423
  ]
21355
21424
  }),
21356
21425
  /* @__PURE__ */ jsx(ColorInput, {
21357
- color: eB.color,
21358
- onChange: (n) => tB({ color: n })
21426
+ color: tB.color,
21427
+ onChange: (n) => nB({ color: n })
21359
21428
  })
21360
21429
  ]
21361
21430
  })
@@ -21381,39 +21450,42 @@ const PropertiesDialog = () => {
21381
21450
  mb: "2",
21382
21451
  children: [
21383
21452
  /* @__PURE__ */ jsx(UnitInput, {
21453
+ portalContainer: _,
21384
21454
  label: "X",
21385
- value: $z(Yz("textShadow", "none")).x,
21455
+ value: eB(Xz("textShadow", "none")).x,
21386
21456
  onChange: (n) => {
21387
- let _ = $z(Yz("textShadow", "none"));
21388
- Gz({ textShadow: `${n}px ${_.y}px ${_.blur}px ${_.color}` });
21457
+ let _ = eB(Xz("textShadow", "none"));
21458
+ Kz({ textShadow: `${n}px ${_.y}px ${_.blur}px ${_.color}` });
21389
21459
  },
21390
21460
  units: ["px"]
21391
21461
  }),
21392
21462
  /* @__PURE__ */ jsx(UnitInput, {
21463
+ portalContainer: _,
21393
21464
  label: "Y",
21394
- value: $z(Yz("textShadow", "none")).y,
21465
+ value: eB(Xz("textShadow", "none")).y,
21395
21466
  onChange: (n) => {
21396
- let _ = $z(Yz("textShadow", "none"));
21397
- Gz({ textShadow: `${_.x}px ${n}px ${_.blur}px ${_.color}` });
21467
+ let _ = eB(Xz("textShadow", "none"));
21468
+ Kz({ textShadow: `${_.x}px ${n}px ${_.blur}px ${_.color}` });
21398
21469
  },
21399
21470
  units: ["px"]
21400
21471
  }),
21401
21472
  /* @__PURE__ */ jsx(UnitInput, {
21473
+ portalContainer: _,
21402
21474
  label: "Blur",
21403
- value: $z(Yz("textShadow", "none")).blur,
21475
+ value: eB(Xz("textShadow", "none")).blur,
21404
21476
  onChange: (n) => {
21405
- let _ = $z(Yz("textShadow", "none"));
21406
- Gz({ textShadow: `${_.x}px ${_.y}px ${n}px ${_.color}` });
21477
+ let _ = eB(Xz("textShadow", "none"));
21478
+ Kz({ textShadow: `${_.x}px ${_.y}px ${n}px ${_.color}` });
21407
21479
  },
21408
21480
  units: ["px"]
21409
21481
  })
21410
21482
  ]
21411
21483
  }),
21412
21484
  /* @__PURE__ */ jsx(ColorInput, {
21413
- color: $z(Yz("textShadow", "none")).color,
21485
+ color: eB(Xz("textShadow", "none")).color,
21414
21486
  onChange: (n) => {
21415
- let _ = $z(Yz("textShadow", "none"));
21416
- Gz({ textShadow: `${_.x}px ${_.y}px ${_.blur}px ${n}` });
21487
+ let _ = eB(Xz("textShadow", "none"));
21488
+ Kz({ textShadow: `${_.x}px ${_.y}px ${_.blur}px ${n}` });
21417
21489
  }
21418
21490
  })
21419
21491
  ]
@@ -21422,19 +21494,19 @@ const PropertiesDialog = () => {
21422
21494
  })]
21423
21495
  })
21424
21496
  }),
21425
- qz("Transform", [
21497
+ Jz("Transform", [
21426
21498
  "scale",
21427
21499
  "rotate",
21428
21500
  "skew",
21429
21501
  "translate"
21430
21502
  ]) && /* @__PURE__ */ jsx(AccordionItem, {
21431
21503
  title: "Transformação",
21432
- isOpen: Z.transform,
21433
- onToggle: () => zz("transform"),
21434
- onReset: () => Bz({
21504
+ isOpen: Az.transform,
21505
+ onToggle: () => Bz("transform"),
21506
+ onReset: () => Vz({
21435
21507
  rotation: 0,
21436
21508
  style: {
21437
- ...U.style,
21509
+ ...W.style,
21438
21510
  transform: void 0
21439
21511
  }
21440
21512
  }),
@@ -21442,9 +21514,10 @@ const PropertiesDialog = () => {
21442
21514
  columns: "2",
21443
21515
  gap: "3",
21444
21516
  children: [/* @__PURE__ */ jsx(UnitInput, {
21517
+ portalContainer: _,
21445
21518
  label: "Rotação (deg)",
21446
- value: U.rotation,
21447
- onChange: (n) => Bz({ rotation: parseFloat(n) }),
21519
+ value: W.rotation,
21520
+ onChange: (n) => Vz({ rotation: parseFloat(n) }),
21448
21521
  units: ["deg"]
21449
21522
  }), /* @__PURE__ */ jsxs(p, {
21450
21523
  style: { gridColumn: "span 2" },
@@ -21457,8 +21530,8 @@ const PropertiesDialog = () => {
21457
21530
  children: "Transform CSS (Scale, Skew, Translate)"
21458
21531
  }),
21459
21532
  /* @__PURE__ */ jsx(u$1, {
21460
- value: Yz("transform", ""),
21461
- onChange: (n) => Gz({ transform: n.target.value }),
21533
+ value: Xz("transform", ""),
21534
+ onChange: (n) => Kz({ transform: n.target.value }),
21462
21535
  placeholder: "ex: scale(1.5) skewX(10deg)"
21463
21536
  }),
21464
21537
  /* @__PURE__ */ jsxs(p$2, {
@@ -21476,41 +21549,41 @@ const PropertiesDialog = () => {
21476
21549
  })]
21477
21550
  })
21478
21551
  }),
21479
- !W && /* @__PURE__ */ jsxs(Fragment$1, { children: [
21480
- qz("Animação", ["animation"]) && /* @__PURE__ */ jsx(AccordionItem, {
21552
+ !Z && /* @__PURE__ */ jsxs(Fragment$1, { children: [
21553
+ Jz("Animação", ["animation"]) && /* @__PURE__ */ jsx(AccordionItem, {
21481
21554
  title: "Animação",
21482
- isOpen: Z.animation,
21483
- onToggle: () => zz("animation"),
21484
- onReset: () => Bz({ animation: void 0 }),
21555
+ isOpen: Az.animation,
21556
+ onToggle: () => Bz("animation"),
21557
+ onReset: () => Vz({ animation: void 0 }),
21485
21558
  children: /* @__PURE__ */ jsx(AnimationSettings, {
21486
- element: U,
21487
- updateElement: E
21559
+ element: W,
21560
+ updateElement: O
21488
21561
  })
21489
21562
  }),
21490
- qz("Regras", ["condition"]) && /* @__PURE__ */ jsx(AccordionItem, {
21563
+ Jz("Regras", ["condition"]) && /* @__PURE__ */ jsx(AccordionItem, {
21491
21564
  title: "Regras Condicionais",
21492
- isOpen: Z.conditions,
21493
- onToggle: () => zz("conditions"),
21494
- onReset: () => Bz({ conditions: [] }),
21565
+ isOpen: Az.conditions,
21566
+ onToggle: () => Bz("conditions"),
21567
+ onReset: () => Vz({ conditions: [] }),
21495
21568
  children: /* @__PURE__ */ jsx(ConditionalSettings, {
21496
- element: U,
21497
- updateElement: E,
21569
+ element: W,
21570
+ updateElement: O,
21498
21571
  availableProps: n.availableProps || []
21499
21572
  })
21500
21573
  }),
21501
- qz("Formatação", ["format"]) && /* @__PURE__ */ jsx(AccordionItem, {
21574
+ Jz("Formatação", ["format"]) && /* @__PURE__ */ jsx(AccordionItem, {
21502
21575
  title: "Formatação",
21503
- isOpen: Z.formatting,
21504
- onToggle: () => zz("formatting"),
21505
- onReset: () => Bz({ formatting: void 0 }),
21576
+ isOpen: Az.formatting,
21577
+ onToggle: () => Bz("formatting"),
21578
+ onReset: () => Vz({ formatting: void 0 }),
21506
21579
  children: /* @__PURE__ */ jsx(FormattingSettings, {
21507
- element: U,
21508
- updateElement: E
21580
+ element: W,
21581
+ updateElement: O
21509
21582
  })
21510
21583
  })
21511
21584
  ] })
21512
21585
  ]
21513
- }, U?.id ?? z.join(","))
21586
+ }, W?.id ?? B.join(","))
21514
21587
  ]
21515
21588
  })
21516
21589
  });
@@ -21580,148 +21653,169 @@ var ShortcutRow = ({ icon: n, label: E, keys: O }) => /* @__PURE__ */ jsxs(p$1,
21580
21653
  })] }, E))
21581
21654
  })]
21582
21655
  });
21583
- const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE__ */ jsx(n$3, { children: /* @__PURE__ */ jsxs(o, {
21584
- variant: "solid",
21585
- color: "amber",
21586
- radius: "full",
21587
- style: {
21588
- height: 36,
21589
- padding: "0 14px",
21590
- boxShadow: "0 4px 6px rgba(0,0,0,0.1)"
21591
- },
21592
- title: "Atalhos de Teclado",
21593
- children: [/* @__PURE__ */ jsx(QuestionMarkIcon, {
21594
- width: "18",
21595
- height: "18"
21596
- }), "Ajuda"]
21597
- }) }), /* @__PURE__ */ jsxs(p$11, {
21598
- style: { maxWidth: 700 },
21599
- onPointerDown: (n) => n.stopPropagation(),
21600
- children: [
21601
- /* @__PURE__ */ jsx(g$3, { children: "Atalhos de Teclado" }),
21602
- /* @__PURE__ */ jsx(p$2, {
21603
- size: "2",
21604
- color: "gray",
21605
- mb: "4",
21606
- as: "p",
21607
- children: "Agilize seu fluxo de trabalho com estes atalhos."
21608
- }),
21609
- /* @__PURE__ */ jsxs(o$1, {
21610
- columns: {
21611
- initial: "1",
21612
- sm: "2"
21613
- },
21614
- gap: "6",
21615
- children: [/* @__PURE__ */ jsxs(p, { children: [
21616
- /* @__PURE__ */ jsx(p$2, {
21617
- size: "2",
21618
- weight: "bold",
21619
- mb: "2",
21620
- color: "blue",
21621
- children: "Edição Básica"
21622
- }),
21623
- /* @__PURE__ */ jsx(o$3, {
21624
- size: "4",
21625
- mb: "2"
21626
- }),
21627
- /* @__PURE__ */ jsx(ShortcutRow, {
21628
- icon: SymbolIcon,
21629
- label: "Desfazer",
21630
- keys: ["Ctrl", "Z"]
21631
- }),
21632
- /* @__PURE__ */ jsx(ShortcutRow, {
21633
- icon: SymbolIcon,
21634
- label: "Refazer",
21635
- keys: ["Ctrl", "Y"]
21636
- }),
21637
- /* @__PURE__ */ jsx(ShortcutRow, {
21638
- icon: ClipboardIcon,
21639
- label: "Copiar",
21640
- keys: ["Ctrl", "C"]
21641
- }),
21642
- /* @__PURE__ */ jsx(ShortcutRow, {
21643
- icon: ClipboardIcon,
21644
- label: "Colar",
21645
- keys: ["Ctrl", "V"]
21646
- }),
21647
- /* @__PURE__ */ jsx(ShortcutRow, {
21648
- icon: TrashIcon,
21649
- label: "Excluir",
21650
- keys: ["Delete"]
21651
- })
21652
- ] }), /* @__PURE__ */ jsxs(p, { children: [
21653
- /* @__PURE__ */ jsx(p$2, {
21654
- size: "2",
21655
- weight: "bold",
21656
- mb: "2",
21657
- color: "blue",
21658
- children: "Navegação e Seleção"
21659
- }),
21660
- /* @__PURE__ */ jsx(o$3, {
21661
- size: "4",
21662
- mb: "2"
21663
- }),
21664
- /* @__PURE__ */ jsx(ShortcutRow, {
21665
- icon: MoveIcon,
21666
- label: "Mover Elemento",
21667
- keys: ["Setas"]
21668
- }),
21669
- /* @__PURE__ */ jsx(ShortcutRow, {
21670
- icon: MoveIcon,
21671
- label: "Mover Rápido",
21672
- keys: ["Shift", "Setas"]
21673
- }),
21674
- /* @__PURE__ */ jsx(ShortcutRow, {
21675
- icon: CursorArrowIcon,
21676
- label: "Multiseleção",
21677
- keys: ["Shift", "Click"]
21678
- }),
21679
- /* @__PURE__ */ jsx(ShortcutRow, {
21680
- icon: SpaceEvenlyHorizontallyIcon,
21681
- label: "Mover Canvas (Pan)",
21682
- keys: ["Espaço", "Arrastar"]
21683
- }),
21684
- /* @__PURE__ */ jsx(ShortcutRow, {
21685
- icon: MagnifyingGlassIcon,
21686
- label: "Zoom",
21687
- keys: ["Ctrl", "Scroll"]
21688
- })
21689
- ] })]
21690
- }),
21691
- /* @__PURE__ */ jsx(p$1, {
21692
- justify: "end",
21693
- mt: "5",
21694
- children: /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
21695
- variant: "soft",
21656
+ const ShortcutsDialog = () => {
21657
+ let { portalContainer: n } = useEditor();
21658
+ return /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE__ */ jsx(n$3, { children: /* @__PURE__ */ jsxs(o, {
21659
+ variant: "solid",
21660
+ color: "amber",
21661
+ radius: "full",
21662
+ style: {
21663
+ height: 36,
21664
+ padding: "0 14px",
21665
+ boxShadow: "0 4px 6px rgba(0,0,0,0.1)"
21666
+ },
21667
+ title: "Atalhos de Teclado",
21668
+ children: [/* @__PURE__ */ jsx(QuestionMarkIcon, {
21669
+ width: "18",
21670
+ height: "18"
21671
+ }), "Ajuda"]
21672
+ }) }), /* @__PURE__ */ jsxs(p$11, {
21673
+ ...n && { container: n },
21674
+ style: { maxWidth: 700 },
21675
+ onPointerDown: (n) => n.stopPropagation(),
21676
+ children: [
21677
+ /* @__PURE__ */ jsx(g$3, { children: "Atalhos de Teclado" }),
21678
+ /* @__PURE__ */ jsx(p$2, {
21679
+ size: "2",
21696
21680
  color: "gray",
21697
- children: "Fechar"
21698
- }) })
21699
- })
21700
- ]
21701
- })] }), EditorSettings = () => {
21702
- let { state: n, updateListSettings: E, setCanvasHeight: O, setGridSize: A } = useEditor(), [j, M] = useState(!1), [N, P] = useState(""), [z, B] = useState("asc"), [H, U] = useState("bottom"), [W, Z] = useState("down"), [Az, jz] = useState("150"), [Mz, Nz] = useState(""), [Pz, Fz] = useState("0"), [Lz, Rz] = useState("slideIn"), [zz, Bz] = useState(.3), [Vz, Hz] = useState("ease-out"), Gz = React.useRef(!1);
21703
- return useEffect(() => {
21704
- if (j && !Gz.current) {
21705
- Gz.current = !0, P(n.listSettings.sortProp || "__none__"), B(n.listSettings.sortOrder || "asc"), U(n.listSettings.newestPosition || "bottom"), Z(n.listSettings.scrollDirection || "down"), Nz(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), jz(String(n.canvasHeight || 150)), Fz(String(n.gridSize || 0));
21681
+ mb: "4",
21682
+ as: "p",
21683
+ children: "Agilize seu fluxo de trabalho com estes atalhos."
21684
+ }),
21685
+ /* @__PURE__ */ jsxs(o$1, {
21686
+ columns: {
21687
+ initial: "1",
21688
+ sm: "2"
21689
+ },
21690
+ gap: "6",
21691
+ children: [/* @__PURE__ */ jsxs(p, { children: [
21692
+ /* @__PURE__ */ jsx(p$2, {
21693
+ size: "2",
21694
+ weight: "bold",
21695
+ mb: "2",
21696
+ color: "blue",
21697
+ children: "Edição Básica"
21698
+ }),
21699
+ /* @__PURE__ */ jsx(o$3, {
21700
+ size: "4",
21701
+ mb: "2"
21702
+ }),
21703
+ /* @__PURE__ */ jsx(ShortcutRow, {
21704
+ icon: SymbolIcon,
21705
+ label: "Desfazer",
21706
+ keys: ["Ctrl", "Z"]
21707
+ }),
21708
+ /* @__PURE__ */ jsx(ShortcutRow, {
21709
+ icon: SymbolIcon,
21710
+ label: "Refazer",
21711
+ keys: ["Ctrl", "Y"]
21712
+ }),
21713
+ /* @__PURE__ */ jsx(ShortcutRow, {
21714
+ icon: ClipboardIcon,
21715
+ label: "Copiar",
21716
+ keys: ["Ctrl", "C"]
21717
+ }),
21718
+ /* @__PURE__ */ jsx(ShortcutRow, {
21719
+ icon: ClipboardIcon,
21720
+ label: "Colar",
21721
+ keys: ["Ctrl", "V"]
21722
+ }),
21723
+ /* @__PURE__ */ jsx(ShortcutRow, {
21724
+ icon: TrashIcon,
21725
+ label: "Excluir",
21726
+ keys: ["Delete"]
21727
+ })
21728
+ ] }), /* @__PURE__ */ jsxs(p, { children: [
21729
+ /* @__PURE__ */ jsx(p$2, {
21730
+ size: "2",
21731
+ weight: "bold",
21732
+ mb: "2",
21733
+ color: "blue",
21734
+ children: "Navegação e Seleção"
21735
+ }),
21736
+ /* @__PURE__ */ jsx(o$3, {
21737
+ size: "4",
21738
+ mb: "2"
21739
+ }),
21740
+ /* @__PURE__ */ jsx(ShortcutRow, {
21741
+ icon: MoveIcon,
21742
+ label: "Mover Elemento",
21743
+ keys: ["Setas"]
21744
+ }),
21745
+ /* @__PURE__ */ jsx(ShortcutRow, {
21746
+ icon: MoveIcon,
21747
+ label: "Mover Rápido",
21748
+ keys: ["Shift", "Setas"]
21749
+ }),
21750
+ /* @__PURE__ */ jsx(ShortcutRow, {
21751
+ icon: CursorArrowIcon,
21752
+ label: "Multiseleção",
21753
+ keys: ["Shift", "Click"]
21754
+ }),
21755
+ /* @__PURE__ */ jsx(ShortcutRow, {
21756
+ icon: SpaceEvenlyHorizontallyIcon,
21757
+ label: "Mover Canvas (Pan)",
21758
+ keys: ["Espaço", "Arrastar"]
21759
+ }),
21760
+ /* @__PURE__ */ jsx(ShortcutRow, {
21761
+ icon: MagnifyingGlassIcon,
21762
+ label: "Zoom",
21763
+ keys: ["Ctrl", "Scroll"]
21764
+ })
21765
+ ] })]
21766
+ }),
21767
+ /* @__PURE__ */ jsx(p$1, {
21768
+ justify: "end",
21769
+ mt: "5",
21770
+ children: /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
21771
+ variant: "soft",
21772
+ color: "gray",
21773
+ children: "Fechar"
21774
+ }) })
21775
+ })
21776
+ ]
21777
+ })] });
21778
+ }, EditorSettings = () => {
21779
+ let { state: n, portalContainer: E, updateListSettings: O, setCanvasHeight: A, setGridSize: j } = useEditor(), [M, N] = useState(!1), [P, z] = useState(""), [B, H] = useState("asc"), [U, W] = useState("bottom"), [Z, Az] = useState("down"), [jz, Mz] = useState("150"), [Nz, Pz] = useState(""), [Fz, Lz] = useState("0"), [Rz, zz] = useState("slideIn"), [Bz, Vz] = useState(.3), [Hz, Gz] = useState("ease-out"), Kz = React.useRef(!1);
21780
+ useEffect(() => {
21781
+ if (M && !Kz.current) {
21782
+ Kz.current = !0, z(n.listSettings.sortProp || "__none__"), H(n.listSettings.sortOrder || "asc"), W(n.listSettings.newestPosition || "bottom"), Az(n.listSettings.scrollDirection || "down"), Pz(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), Mz(String(n.canvasHeight || 150)), Lz(String(n.gridSize || 0));
21706
21783
  let _ = n.listSettings.entryAnimation;
21707
- Rz(_?.type || "slideIn"), Bz(_?.duration || .3), Hz(_?.timingFunction || "ease-out");
21784
+ zz(_?.type || "slideIn"), Vz(_?.duration || .3), Gz(_?.timingFunction || "ease-out");
21708
21785
  }
21709
- j || (Gz.current = !1);
21710
- }, [j]), useEffect(() => {
21711
- if (!j) return;
21712
- let n = parseInt(Az, 10);
21713
- !isNaN(n) && n > 0 && O(n);
21714
- let _ = parseInt(Pz, 10);
21715
- !isNaN(_) && _ >= 0 && A(_);
21786
+ M || (Kz.current = !1);
21787
+ }, [M]), useEffect(() => {
21788
+ if (!M) return;
21789
+ let n = parseInt(jz, 10);
21790
+ !isNaN(n) && n > 0 && A(n);
21791
+ let _ = parseInt(Fz, 10);
21792
+ !isNaN(_) && _ >= 0 && j(_);
21716
21793
  }, [
21717
- Az,
21718
- Pz,
21719
- j,
21720
- O,
21721
- A
21722
- ]), /* @__PURE__ */ jsxs(s$5, {
21723
- open: j,
21724
- onOpenChange: M,
21794
+ jz,
21795
+ Fz,
21796
+ M,
21797
+ A,
21798
+ j
21799
+ ]);
21800
+ let qz = () => {
21801
+ let n = parseInt(Nz, 10), _ = parseInt(jz, 10), E = parseInt(Fz, 10), M = {
21802
+ type: Rz,
21803
+ duration: Number(Bz),
21804
+ delay: 0,
21805
+ timingFunction: Hz
21806
+ };
21807
+ O({
21808
+ sortProp: P === "__none__" ? "" : P,
21809
+ sortOrder: B,
21810
+ newestPosition: U,
21811
+ scrollDirection: Z,
21812
+ containerHeight: !isNaN(n) && n > 0 ? n : void 0,
21813
+ entryAnimation: M
21814
+ }), !isNaN(_) && _ > 0 && A(_), !isNaN(E) && E >= 0 && j(E), N(!1);
21815
+ };
21816
+ return /* @__PURE__ */ jsxs(s$5, {
21817
+ open: M,
21818
+ onOpenChange: N,
21725
21819
  children: [/* @__PURE__ */ jsx(n$3, { children: /* @__PURE__ */ jsxs(o, {
21726
21820
  variant: "soft",
21727
21821
  color: "gray",
@@ -21732,6 +21826,7 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21732
21826
  },
21733
21827
  children: [/* @__PURE__ */ jsx(GearIcon, {}), " Configurações"]
21734
21828
  }) }), /* @__PURE__ */ jsxs(p$11, {
21829
+ ...E && { container: E },
21735
21830
  style: { maxWidth: 600 },
21736
21831
  children: [
21737
21832
  /* @__PURE__ */ jsx(g$3, { children: "Configurações do Editor" }),
@@ -21768,14 +21863,15 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21768
21863
  width: "100%",
21769
21864
  justifyContent: "space-between"
21770
21865
  },
21771
- children: [N === "__none__" ? "(Nenhum)" : n.availableProps.find((n) => n.dataName === N)?.name || N, /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21866
+ children: [P === "__none__" ? "(Nenhum)" : n.availableProps.find((n) => n.dataName === P)?.name || P, /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21772
21867
  }) }), /* @__PURE__ */ jsxs(g$2, {
21868
+ ...E && { container: E },
21773
21869
  style: { zIndex: 1e5 },
21774
21870
  children: [/* @__PURE__ */ jsx(v$4, {
21775
- onSelect: () => P("__none__"),
21871
+ onSelect: () => z("__none__"),
21776
21872
  children: "(Nenhum)"
21777
21873
  }), n.availableProps.map((n) => /* @__PURE__ */ jsx(v$4, {
21778
- onSelect: () => P(n.dataName),
21874
+ onSelect: () => z(n.dataName),
21779
21875
  children: n.name
21780
21876
  }, n.dataName))]
21781
21877
  })] })]
@@ -21791,14 +21887,15 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21791
21887
  width: 150,
21792
21888
  justifyContent: "space-between"
21793
21889
  },
21794
- children: [z === "asc" ? "Crescente (A-Z)" : "Decrescente (Z-A)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21890
+ children: [B === "asc" ? "Crescente (A-Z)" : "Decrescente (Z-A)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21795
21891
  }) }), /* @__PURE__ */ jsxs(g$2, {
21892
+ ...E && { container: E },
21796
21893
  style: { zIndex: 1e5 },
21797
21894
  children: [/* @__PURE__ */ jsx(v$4, {
21798
- onSelect: () => B("asc"),
21895
+ onSelect: () => H("asc"),
21799
21896
  children: "Crescente (A-Z)"
21800
21897
  }), /* @__PURE__ */ jsx(v$4, {
21801
- onSelect: () => B("desc"),
21898
+ onSelect: () => H("desc"),
21802
21899
  children: "Decrescente (Z-A)"
21803
21900
  })]
21804
21901
  })] })] })]
@@ -21820,14 +21917,15 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21820
21917
  width: "100%",
21821
21918
  justifyContent: "space-between"
21822
21919
  },
21823
- children: [H === "top" ? "Topo (Início)" : "Base (Final)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21920
+ children: [U === "top" ? "Topo (Início)" : "Base (Final)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21824
21921
  }) }), /* @__PURE__ */ jsxs(g$2, {
21922
+ ...E && { container: E },
21825
21923
  style: { zIndex: 1e5 },
21826
21924
  children: [/* @__PURE__ */ jsx(v$4, {
21827
- onSelect: () => U("top"),
21925
+ onSelect: () => W("top"),
21828
21926
  children: "Topo (Início)"
21829
21927
  }), /* @__PURE__ */ jsx(v$4, {
21830
- onSelect: () => U("bottom"),
21928
+ onSelect: () => W("bottom"),
21831
21929
  children: "Base (Final)"
21832
21930
  })]
21833
21931
  })] })]
@@ -21845,14 +21943,15 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21845
21943
  width: "100%",
21846
21944
  justifyContent: "space-between"
21847
21945
  },
21848
- children: [W === "down" ? "Descer (Padrão)" : "Subir (Chat)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21946
+ children: [Z === "down" ? "Descer (Padrão)" : "Subir (Chat)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21849
21947
  }) }), /* @__PURE__ */ jsxs(g$2, {
21948
+ ...E && { container: E },
21850
21949
  style: { zIndex: 1e5 },
21851
21950
  children: [/* @__PURE__ */ jsx(v$4, {
21852
- onSelect: () => Z("down"),
21951
+ onSelect: () => Az("down"),
21853
21952
  children: "Descer (Padrão)"
21854
21953
  }), /* @__PURE__ */ jsx(v$4, {
21855
- onSelect: () => Z("up"),
21954
+ onSelect: () => Az("up"),
21856
21955
  children: "Subir (Chat)"
21857
21956
  })]
21858
21957
  })] })]
@@ -21879,8 +21978,8 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21879
21978
  /* @__PURE__ */ jsx(u$1, {
21880
21979
  type: "number",
21881
21980
  min: "10",
21882
- value: Az,
21883
- onChange: (n) => jz(n.target.value)
21981
+ value: jz,
21982
+ onChange: (n) => Mz(n.target.value)
21884
21983
  }),
21885
21984
  /* @__PURE__ */ jsx(p$2, {
21886
21985
  size: "1",
@@ -21901,8 +22000,8 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21901
22000
  type: "number",
21902
22001
  min: "0",
21903
22002
  placeholder: "Auto (100%)",
21904
- value: Mz,
21905
- onChange: (n) => Nz(n.target.value)
22003
+ value: Nz,
22004
+ onChange: (n) => Pz(n.target.value)
21906
22005
  }),
21907
22006
  /* @__PURE__ */ jsx(p$2, {
21908
22007
  size: "1",
@@ -21934,48 +22033,49 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21934
22033
  width: "100%",
21935
22034
  justifyContent: "space-between"
21936
22035
  },
21937
- children: [Lz === "slideIn" ? "Slide (Padrão)" : Lz === "smoothSlideUp" ? "Slide Suave (Up)" : Lz === "fadeIn" ? "Fade In" : Lz === "popIn" ? "Pop In" : Lz === "blurIn" ? "Blur In" : Lz === "slideInLeft" ? "Slide (Esq)" : Lz === "slideInRight" ? "Slide (Dir)" : Lz === "zoomIn" ? "Zoom In" : Lz === "bounceIn" ? "Bounce" : "Nenhum", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
22036
+ children: [Rz === "slideIn" ? "Slide (Padrão)" : Rz === "smoothSlideUp" ? "Slide Suave (Up)" : Rz === "fadeIn" ? "Fade In" : Rz === "popIn" ? "Pop In" : Rz === "blurIn" ? "Blur In" : Rz === "slideInLeft" ? "Slide (Esq)" : Rz === "slideInRight" ? "Slide (Dir)" : Rz === "zoomIn" ? "Zoom In" : Rz === "bounceIn" ? "Bounce" : "Nenhum", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
21938
22037
  }) }), /* @__PURE__ */ jsxs(g$2, {
22038
+ ...E && { container: E },
21939
22039
  style: { zIndex: 1e5 },
21940
22040
  children: [
21941
22041
  /* @__PURE__ */ jsx(v$4, {
21942
- onSelect: () => Rz("none"),
22042
+ onSelect: () => zz("none"),
21943
22043
  children: "Nenhum"
21944
22044
  }),
21945
22045
  /* @__PURE__ */ jsx(v$4, {
21946
- onSelect: () => Rz("slideIn"),
22046
+ onSelect: () => zz("slideIn"),
21947
22047
  children: "Slide (Padrão)"
21948
22048
  }),
21949
22049
  /* @__PURE__ */ jsx(v$4, {
21950
- onSelect: () => Rz("smoothSlideUp"),
22050
+ onSelect: () => zz("smoothSlideUp"),
21951
22051
  children: "Slide Suave (Up)"
21952
22052
  }),
21953
22053
  /* @__PURE__ */ jsx(v$4, {
21954
- onSelect: () => Rz("fadeIn"),
22054
+ onSelect: () => zz("fadeIn"),
21955
22055
  children: "Fade In"
21956
22056
  }),
21957
22057
  /* @__PURE__ */ jsx(v$4, {
21958
- onSelect: () => Rz("popIn"),
22058
+ onSelect: () => zz("popIn"),
21959
22059
  children: "Pop In"
21960
22060
  }),
21961
22061
  /* @__PURE__ */ jsx(v$4, {
21962
- onSelect: () => Rz("blurIn"),
22062
+ onSelect: () => zz("blurIn"),
21963
22063
  children: "Blur In"
21964
22064
  }),
21965
22065
  /* @__PURE__ */ jsx(v$4, {
21966
- onSelect: () => Rz("slideInLeft"),
22066
+ onSelect: () => zz("slideInLeft"),
21967
22067
  children: "Slide (Esq)"
21968
22068
  }),
21969
22069
  /* @__PURE__ */ jsx(v$4, {
21970
- onSelect: () => Rz("slideInRight"),
22070
+ onSelect: () => zz("slideInRight"),
21971
22071
  children: "Slide (Dir)"
21972
22072
  }),
21973
22073
  /* @__PURE__ */ jsx(v$4, {
21974
- onSelect: () => Rz("zoomIn"),
22074
+ onSelect: () => zz("zoomIn"),
21975
22075
  children: "Zoom In"
21976
22076
  }),
21977
22077
  /* @__PURE__ */ jsx(v$4, {
21978
- onSelect: () => Rz("bounceIn"),
22078
+ onSelect: () => zz("bounceIn"),
21979
22079
  children: "Bounce"
21980
22080
  })
21981
22081
  ]
@@ -21989,8 +22089,8 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
21989
22089
  type: "number",
21990
22090
  step: "0.1",
21991
22091
  min: "0.1",
21992
- value: zz,
21993
- onChange: (n) => Bz(parseFloat(n.target.value) || .3)
22092
+ value: Bz,
22093
+ onChange: (n) => Vz(parseFloat(n.target.value) || .3)
21994
22094
  })] }),
21995
22095
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
21996
22096
  size: "1",
@@ -22004,24 +22104,25 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
22004
22104
  width: "100%",
22005
22105
  justifyContent: "space-between"
22006
22106
  },
22007
- children: [Vz === "ease-out" ? "Ease Out" : Vz === "linear" ? "Linear" : Vz === "bounce" ? "Bounce" : "Ease", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
22107
+ children: [Hz === "ease-out" ? "Ease Out" : Hz === "linear" ? "Linear" : Hz === "bounce" ? "Bounce" : "Ease", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
22008
22108
  }) }), /* @__PURE__ */ jsxs(g$2, {
22109
+ ...E && { container: E },
22009
22110
  style: { zIndex: 1e5 },
22010
22111
  children: [
22011
22112
  /* @__PURE__ */ jsx(v$4, {
22012
- onSelect: () => Hz("ease"),
22113
+ onSelect: () => Gz("ease"),
22013
22114
  children: "Ease"
22014
22115
  }),
22015
22116
  /* @__PURE__ */ jsx(v$4, {
22016
- onSelect: () => Hz("ease-out"),
22117
+ onSelect: () => Gz("ease-out"),
22017
22118
  children: "Ease Out"
22018
22119
  }),
22019
22120
  /* @__PURE__ */ jsx(v$4, {
22020
- onSelect: () => Hz("linear"),
22121
+ onSelect: () => Gz("linear"),
22021
22122
  children: "Linear"
22022
22123
  }),
22023
22124
  /* @__PURE__ */ jsx(v$4, {
22024
- onSelect: () => Hz("bounce"),
22125
+ onSelect: () => Gz("bounce"),
22025
22126
  children: "Bounce"
22026
22127
  })
22027
22128
  ]
@@ -22047,8 +22148,8 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
22047
22148
  children: "Tamanho do Grid (px) - 0 para desativar"
22048
22149
  }), /* @__PURE__ */ jsx(u$1, {
22049
22150
  type: "number",
22050
- value: Pz,
22051
- onChange: (n) => Fz(n.target.value),
22151
+ value: Fz,
22152
+ onChange: (n) => Lz(n.target.value),
22052
22153
  placeholder: "0"
22053
22154
  })]
22054
22155
  })
@@ -22066,22 +22167,7 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$5, { children: [/* @__PURE_
22066
22167
  color: "gray",
22067
22168
  children: "Cancelar"
22068
22169
  }) }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
22069
- onClick: () => {
22070
- let n = parseInt(Mz, 10), _ = parseInt(Az, 10), j = parseInt(Pz, 10), P = {
22071
- type: Lz,
22072
- duration: Number(zz),
22073
- delay: 0,
22074
- timingFunction: Vz
22075
- };
22076
- E({
22077
- sortProp: N === "__none__" ? "" : N,
22078
- sortOrder: z,
22079
- newestPosition: H,
22080
- scrollDirection: W,
22081
- containerHeight: !isNaN(n) && n > 0 ? n : void 0,
22082
- entryAnimation: P
22083
- }), !isNaN(_) && _ > 0 && O(_), !isNaN(j) && j >= 0 && A(j), M(!1);
22084
- },
22170
+ onClick: qz,
22085
22171
  children: "Salvar Alterações"
22086
22172
  }) })]
22087
22173
  })
@@ -24638,16 +24724,16 @@ const SimpleLayers = () => {
24638
24724
  }) : null })]
24639
24725
  }) });
24640
24726
  }, SimpleProperties = () => {
24641
- let { state: n, updateElement: _, removeSelected: E, copy: O } = useEditor(), [A, j] = useState(!1), M = n.selectedElementIds[0], N = n.elements.find((n) => n.id === M);
24642
- if (!N) return null;
24643
- let P = (n) => {
24644
- _(N.id, n);
24645
- }, z = (n) => {
24646
- P({ style: {
24647
- ...N.style,
24727
+ let { state: n, portalContainer: _, updateElement: E, removeSelected: O, copy: A } = useEditor(), [j, M] = useState(!1), N = n.selectedElementIds[0], P = n.elements.find((n) => n.id === N);
24728
+ if (!P) return null;
24729
+ let z = (n) => {
24730
+ E(P.id, n);
24731
+ }, B = (n) => {
24732
+ z({ style: {
24733
+ ...P.style,
24648
24734
  ...n
24649
24735
  } });
24650
- }, B = N.style?.textAlign || "left", H = parseInt(N.style?.fontSize || "14", 10), U = parseInt(N.style?.borderWidth || "0", 10), W = parseInt(N.style?.padding || "0", 10), G = parseInt(N.style?.borderRadius || "0", 10), Z = Math.round((parseFloat(String(N.style?.opacity ?? "1")) || 1) * 100), Az = N.style?.fontFamily || "Arial", jz = normalizeFontWeightForSelect(N.style?.fontWeight, FONT_WEIGHT_OPTIONS), Mz = ensureFontInOptions(Az, n.availableFonts || [
24736
+ }, H = P.style?.textAlign || "left", U = parseInt(P.style?.fontSize || "14", 10), W = parseInt(P.style?.borderWidth || "0", 10), G = parseInt(P.style?.padding || "0", 10), Z = parseInt(P.style?.borderRadius || "0", 10), Az = Math.round((parseFloat(String(P.style?.opacity ?? "1")) || 1) * 100), jz = P.style?.fontFamily || "Arial", Mz = normalizeFontWeightForSelect(P.style?.fontWeight, FONT_WEIGHT_OPTIONS), Nz = ensureFontInOptions(jz, n.availableFonts || [
24651
24737
  "Arial",
24652
24738
  "Helvetica",
24653
24739
  "Times New Roman",
@@ -24667,36 +24753,36 @@ const SimpleLayers = () => {
24667
24753
  children: [/* @__PURE__ */ jsx(p$2, {
24668
24754
  size: "3",
24669
24755
  weight: "bold",
24670
- children: getElementLabel(N.type)
24756
+ children: getElementLabel(P.type)
24671
24757
  }), /* @__PURE__ */ jsxs(p$1, {
24672
24758
  gap: "2",
24673
24759
  children: [
24674
24760
  /* @__PURE__ */ jsx(o$2, {
24675
24761
  variant: "soft",
24676
- color: N.locked ? "orange" : "gray",
24677
- onClick: () => P({ locked: !N.locked }),
24678
- title: N.locked ? "Desbloquear" : "Bloquear",
24679
- children: N.locked ? /* @__PURE__ */ jsx(LockClosedIcon, {}) : /* @__PURE__ */ jsx(LockOpen1Icon, {})
24762
+ color: P.locked ? "orange" : "gray",
24763
+ onClick: () => z({ locked: !P.locked }),
24764
+ title: P.locked ? "Desbloquear" : "Bloquear",
24765
+ children: P.locked ? /* @__PURE__ */ jsx(LockClosedIcon, {}) : /* @__PURE__ */ jsx(LockOpen1Icon, {})
24680
24766
  }),
24681
24767
  /* @__PURE__ */ jsx(o$2, {
24682
24768
  variant: "soft",
24683
- color: N.hidden ? "blue" : "gray",
24684
- onClick: () => P({ hidden: !N.hidden }),
24685
- title: N.hidden ? "Mostrar" : "Ocultar",
24686
- children: N.hidden ? /* @__PURE__ */ jsx(EyeNoneIcon, {}) : /* @__PURE__ */ jsx(EyeOpenIcon, {})
24769
+ color: P.hidden ? "blue" : "gray",
24770
+ onClick: () => z({ hidden: !P.hidden }),
24771
+ title: P.hidden ? "Mostrar" : "Ocultar",
24772
+ children: P.hidden ? /* @__PURE__ */ jsx(EyeNoneIcon, {}) : /* @__PURE__ */ jsx(EyeOpenIcon, {})
24687
24773
  }),
24688
24774
  /* @__PURE__ */ jsx(o$3, { orientation: "vertical" }),
24689
24775
  /* @__PURE__ */ jsx(o$2, {
24690
24776
  variant: "soft",
24691
24777
  color: "gray",
24692
- onClick: O,
24778
+ onClick: A,
24693
24779
  title: "Copiar",
24694
24780
  children: /* @__PURE__ */ jsx(CopyIcon, {})
24695
24781
  }),
24696
24782
  /* @__PURE__ */ jsx(o$2, {
24697
24783
  variant: "soft",
24698
24784
  color: "red",
24699
- onClick: E,
24785
+ onClick: O,
24700
24786
  title: "Excluir",
24701
24787
  children: /* @__PURE__ */ jsx(TrashIcon, {})
24702
24788
  })
@@ -24704,19 +24790,19 @@ const SimpleLayers = () => {
24704
24790
  })]
24705
24791
  }),
24706
24792
  /* @__PURE__ */ jsx(o$3, { size: "4" }),
24707
- (N.type === "text" || N.type === "text-container") && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
24793
+ (P.type === "text" || P.type === "text-container") && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
24708
24794
  size: "2",
24709
24795
  weight: "bold",
24710
24796
  mb: "2",
24711
24797
  as: "div",
24712
24798
  children: "Conteúdo"
24713
24799
  }), /* @__PURE__ */ jsx(r$1, {
24714
- value: N.content,
24715
- onChange: (n) => P({ content: n.target.value }),
24800
+ value: P.content,
24801
+ onChange: (n) => z({ content: n.target.value }),
24716
24802
  rows: 3,
24717
24803
  placeholder: "Digite o texto aqui..."
24718
24804
  })] }),
24719
- N.type === "image" && /* @__PURE__ */ jsxs(p, { children: [
24805
+ P.type === "image" && /* @__PURE__ */ jsxs(p, { children: [
24720
24806
  /* @__PURE__ */ jsx(p$2, {
24721
24807
  size: "2",
24722
24808
  weight: "bold",
@@ -24739,16 +24825,17 @@ const SimpleLayers = () => {
24739
24825
  width: "100%",
24740
24826
  justifyContent: "space-between"
24741
24827
  },
24742
- children: [N.dataBinding ? n.availableProps.find((n) => n.dataName === N.dataBinding)?.name || N.dataBinding : "Nenhum (URL fixa)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24828
+ children: [P.dataBinding ? n.availableProps.find((n) => n.dataName === P.dataBinding)?.name || P.dataBinding : "Nenhum (URL fixa)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24743
24829
  }) }), /* @__PURE__ */ jsxs(g$2, {
24830
+ ..._ && { container: _ },
24744
24831
  style: { zIndex: 1e5 },
24745
24832
  children: [
24746
24833
  /* @__PURE__ */ jsx(v$4, {
24747
- onSelect: () => P({ dataBinding: void 0 }),
24834
+ onSelect: () => z({ dataBinding: void 0 }),
24748
24835
  children: "Nenhum (URL fixa)"
24749
24836
  }),
24750
24837
  n.availableProps.map((n) => /* @__PURE__ */ jsx(v$4, {
24751
- onSelect: () => P({
24838
+ onSelect: () => z({
24752
24839
  dataBinding: n.dataName,
24753
24840
  content: `{{${n.dataName}}}`
24754
24841
  }),
@@ -24770,8 +24857,8 @@ const SimpleLayers = () => {
24770
24857
  children: "URL ou {{variável}}"
24771
24858
  }),
24772
24859
  /* @__PURE__ */ jsx(u$1, {
24773
- value: N.content,
24774
- onChange: (n) => P({ content: n.target.value }),
24860
+ value: P.content,
24861
+ onChange: (n) => z({ content: n.target.value }),
24775
24862
  placeholder: "https://... ou {{profilePicture}}"
24776
24863
  }),
24777
24864
  /* @__PURE__ */ jsx(p$2, {
@@ -24793,7 +24880,7 @@ const SimpleLayers = () => {
24793
24880
  direction: "column",
24794
24881
  gap: "3",
24795
24882
  children: [
24796
- (N.type === "text" || N.type === "text-container") && /* @__PURE__ */ jsxs(Fragment$1, { children: [
24883
+ (P.type === "text" || P.type === "text-container") && /* @__PURE__ */ jsxs(Fragment$1, { children: [
24797
24884
  /* @__PURE__ */ jsxs(o$1, {
24798
24885
  columns: "2",
24799
24886
  gap: "3",
@@ -24811,13 +24898,14 @@ const SimpleLayers = () => {
24811
24898
  justifyContent: "space-between"
24812
24899
  },
24813
24900
  children: [/* @__PURE__ */ jsx("span", {
24814
- style: { fontFamily: Az },
24815
- children: Az
24901
+ style: { fontFamily: jz },
24902
+ children: jz
24816
24903
  }), /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24817
24904
  }) }), /* @__PURE__ */ jsx(g$2, {
24905
+ ..._ && { container: _ },
24818
24906
  style: { zIndex: 1e5 },
24819
- children: Mz.map((n) => /* @__PURE__ */ jsx(v$4, {
24820
- onSelect: () => z({ fontFamily: n }),
24907
+ children: Nz.map((n) => /* @__PURE__ */ jsx(v$4, {
24908
+ onSelect: () => B({ fontFamily: n }),
24821
24909
  style: { fontFamily: n },
24822
24910
  children: n
24823
24911
  }, n))
@@ -24834,35 +24922,36 @@ const SimpleLayers = () => {
24834
24922
  width: "100%",
24835
24923
  justifyContent: "space-between"
24836
24924
  },
24837
- children: [jz === "normal" ? "Normal" : jz === "bold" ? "Negrito" : jz === "100" ? "Fina" : jz === "300" ? "Leve" : "Pesada", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24925
+ children: [Mz === "normal" ? "Normal" : Mz === "bold" ? "Negrito" : Mz === "100" ? "Fina" : Mz === "300" ? "Leve" : "Pesada", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24838
24926
  }) }), /* @__PURE__ */ jsxs(g$2, {
24927
+ ..._ && { container: _ },
24839
24928
  style: { zIndex: 1e5 },
24840
24929
  children: [
24841
24930
  /* @__PURE__ */ jsx(v$4, {
24842
- onSelect: () => z({ fontWeight: "normal" }),
24931
+ onSelect: () => B({ fontWeight: "normal" }),
24843
24932
  children: "Normal"
24844
24933
  }),
24845
24934
  /* @__PURE__ */ jsx(v$4, {
24846
24935
  onSelect: () => {
24847
- z({ fontWeight: "bold" });
24936
+ B({ fontWeight: "bold" });
24848
24937
  },
24849
24938
  children: "Negrito"
24850
24939
  }),
24851
24940
  /* @__PURE__ */ jsx(v$4, {
24852
24941
  onSelect: () => {
24853
- z({ fontWeight: "100" });
24942
+ B({ fontWeight: "100" });
24854
24943
  },
24855
24944
  children: "Fina"
24856
24945
  }),
24857
24946
  /* @__PURE__ */ jsx(v$4, {
24858
24947
  onSelect: () => {
24859
- z({ fontWeight: "300" });
24948
+ B({ fontWeight: "300" });
24860
24949
  },
24861
24950
  children: "Leve"
24862
24951
  }),
24863
24952
  /* @__PURE__ */ jsx(v$4, {
24864
24953
  onSelect: () => {
24865
- z({ fontWeight: "900" });
24954
+ B({ fontWeight: "900" });
24866
24955
  },
24867
24956
  children: "Pesada"
24868
24957
  })
@@ -24878,13 +24967,13 @@ const SimpleLayers = () => {
24878
24967
  children: "Tamanho do Texto"
24879
24968
  }), /* @__PURE__ */ jsxs(p$2, {
24880
24969
  size: "1",
24881
- children: [H, "px"]
24970
+ children: [U, "px"]
24882
24971
  })]
24883
24972
  }), /* @__PURE__ */ jsx(s, {
24884
24973
  min: 8,
24885
24974
  max: 72,
24886
- value: [H],
24887
- onValueChange: (n) => z({ fontSize: `${n[0]}px` })
24975
+ value: [U],
24976
+ onValueChange: (n) => B({ fontSize: `${n[0]}px` })
24888
24977
  })] }),
24889
24978
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
24890
24979
  size: "1",
@@ -24896,21 +24985,21 @@ const SimpleLayers = () => {
24896
24985
  gap: "2",
24897
24986
  children: [
24898
24987
  /* @__PURE__ */ jsx(o$2, {
24899
- variant: B === "left" ? "solid" : "soft",
24988
+ variant: H === "left" ? "solid" : "soft",
24900
24989
  color: "gray",
24901
- onClick: () => z({ textAlign: "left" }),
24990
+ onClick: () => B({ textAlign: "left" }),
24902
24991
  children: /* @__PURE__ */ jsx(TextAlignLeftIcon, {})
24903
24992
  }),
24904
24993
  /* @__PURE__ */ jsx(o$2, {
24905
- variant: B === "center" ? "solid" : "soft",
24994
+ variant: H === "center" ? "solid" : "soft",
24906
24995
  color: "gray",
24907
- onClick: () => z({ textAlign: "center" }),
24996
+ onClick: () => B({ textAlign: "center" }),
24908
24997
  children: /* @__PURE__ */ jsx(TextAlignCenterIcon, {})
24909
24998
  }),
24910
24999
  /* @__PURE__ */ jsx(o$2, {
24911
- variant: B === "right" ? "solid" : "soft",
25000
+ variant: H === "right" ? "solid" : "soft",
24912
25001
  color: "gray",
24913
- onClick: () => z({ textAlign: "right" }),
25002
+ onClick: () => B({ textAlign: "right" }),
24914
25003
  children: /* @__PURE__ */ jsx(TextAlignRightIcon, {})
24915
25004
  })
24916
25005
  ]
@@ -24928,28 +25017,28 @@ const SimpleLayers = () => {
24928
25017
  gap: "1",
24929
25018
  children: [
24930
25019
  /* @__PURE__ */ jsx(o$2, {
24931
- variant: N.style?.fontStyle === "italic" ? "solid" : "soft",
25020
+ variant: P.style?.fontStyle === "italic" ? "solid" : "soft",
24932
25021
  color: "gray",
24933
25022
  onClick: (n) => {
24934
- n.stopPropagation(), z({ fontStyle: N.style?.fontStyle === "italic" ? "normal" : "italic" });
25023
+ n.stopPropagation(), B({ fontStyle: P.style?.fontStyle === "italic" ? "normal" : "italic" });
24935
25024
  },
24936
25025
  title: "Itálico",
24937
25026
  children: /* @__PURE__ */ jsx(FontItalicIcon, {})
24938
25027
  }),
24939
25028
  /* @__PURE__ */ jsx(o$2, {
24940
- variant: N.style?.textDecoration === "underline" ? "solid" : "soft",
25029
+ variant: P.style?.textDecoration === "underline" ? "solid" : "soft",
24941
25030
  color: "gray",
24942
25031
  onClick: (n) => {
24943
- n.stopPropagation(), z({ textDecoration: N.style?.textDecoration === "underline" ? "none" : "underline" });
25032
+ n.stopPropagation(), B({ textDecoration: P.style?.textDecoration === "underline" ? "none" : "underline" });
24944
25033
  },
24945
25034
  title: "Sublinhado",
24946
25035
  children: /* @__PURE__ */ jsx(UnderlineIcon, {})
24947
25036
  }),
24948
25037
  /* @__PURE__ */ jsx(o$2, {
24949
- variant: N.style?.textDecoration === "line-through" ? "solid" : "soft",
25038
+ variant: P.style?.textDecoration === "line-through" ? "solid" : "soft",
24950
25039
  color: "gray",
24951
25040
  onClick: (n) => {
24952
- n.stopPropagation(), z({ textDecoration: N.style?.textDecoration === "line-through" ? "none" : "line-through" });
25041
+ n.stopPropagation(), B({ textDecoration: P.style?.textDecoration === "line-through" ? "none" : "line-through" });
24953
25042
  },
24954
25043
  title: "Tachado",
24955
25044
  children: /* @__PURE__ */ jsx(StrikethroughIcon, {})
@@ -24968,24 +25057,25 @@ const SimpleLayers = () => {
24968
25057
  width: "100%",
24969
25058
  justifyContent: "space-between"
24970
25059
  },
24971
- children: [(N.style?.textTransform || "none") === "none" ? "Nenhum" : N.style?.textTransform === "uppercase" ? "MAIÚSCULA" : N.style?.textTransform === "lowercase" ? "minúscula" : "Capitalizada", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
25060
+ children: [(P.style?.textTransform || "none") === "none" ? "Nenhum" : P.style?.textTransform === "uppercase" ? "MAIÚSCULA" : P.style?.textTransform === "lowercase" ? "minúscula" : "Capitalizada", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
24972
25061
  }) }), /* @__PURE__ */ jsxs(g$2, {
25062
+ ..._ && { container: _ },
24973
25063
  style: { zIndex: 1e5 },
24974
25064
  children: [
24975
25065
  /* @__PURE__ */ jsx(v$4, {
24976
- onSelect: () => z({ textTransform: "none" }),
25066
+ onSelect: () => B({ textTransform: "none" }),
24977
25067
  children: "Nenhum"
24978
25068
  }),
24979
25069
  /* @__PURE__ */ jsx(v$4, {
24980
- onSelect: () => z({ textTransform: "uppercase" }),
25070
+ onSelect: () => B({ textTransform: "uppercase" }),
24981
25071
  children: "MAIÚSCULA"
24982
25072
  }),
24983
25073
  /* @__PURE__ */ jsx(v$4, {
24984
- onSelect: () => z({ textTransform: "lowercase" }),
25074
+ onSelect: () => B({ textTransform: "lowercase" }),
24985
25075
  children: "minúscula"
24986
25076
  }),
24987
25077
  /* @__PURE__ */ jsx(v$4, {
24988
- onSelect: () => z({ textTransform: "capitalize" }),
25078
+ onSelect: () => B({ textTransform: "capitalize" }),
24989
25079
  children: "Capitalizada"
24990
25080
  })
24991
25081
  ]
@@ -25002,8 +25092,8 @@ const SimpleLayers = () => {
25002
25092
  children: "Altura da Linha"
25003
25093
  }), /* @__PURE__ */ jsx(u$1, {
25004
25094
  placeholder: "Normal",
25005
- value: N.style?.lineHeight || "",
25006
- onChange: (n) => z({ lineHeight: n.target.value || "normal" })
25095
+ value: P.style?.lineHeight || "",
25096
+ onChange: (n) => B({ lineHeight: n.target.value || "normal" })
25007
25097
  })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25008
25098
  size: "1",
25009
25099
  color: "gray",
@@ -25012,11 +25102,11 @@ const SimpleLayers = () => {
25012
25102
  children: "Espaçamento"
25013
25103
  }), /* @__PURE__ */ jsx(u$1, {
25014
25104
  placeholder: "Normal",
25015
- value: N.style?.letterSpacing || "",
25016
- onChange: (n) => z({ letterSpacing: n.target.value || "normal" })
25105
+ value: P.style?.letterSpacing || "",
25106
+ onChange: (n) => B({ letterSpacing: n.target.value || "normal" })
25017
25107
  })] })]
25018
25108
  }),
25019
- N.type === "text-container" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25109
+ P.type === "text-container" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25020
25110
  size: "1",
25021
25111
  color: "gray",
25022
25112
  mb: "1",
@@ -25029,26 +25119,27 @@ const SimpleLayers = () => {
25029
25119
  width: "100%",
25030
25120
  justifyContent: "space-between"
25031
25121
  },
25032
- children: [(N.style?.alignItems || "flex-start") === "flex-start" ? "Topo" : N.style?.alignItems === "center" ? "Centro" : "Base", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
25122
+ children: [(P.style?.alignItems || "flex-start") === "flex-start" ? "Topo" : P.style?.alignItems === "center" ? "Centro" : "Base", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
25033
25123
  }) }), /* @__PURE__ */ jsxs(g$2, {
25124
+ ..._ && { container: _ },
25034
25125
  style: { zIndex: 1e5 },
25035
25126
  children: [
25036
25127
  /* @__PURE__ */ jsx(v$4, {
25037
- onSelect: () => z({ alignItems: "flex-start" }),
25128
+ onSelect: () => B({ alignItems: "flex-start" }),
25038
25129
  children: "Topo"
25039
25130
  }),
25040
25131
  /* @__PURE__ */ jsx(v$4, {
25041
- onSelect: () => z({ alignItems: "center" }),
25132
+ onSelect: () => B({ alignItems: "center" }),
25042
25133
  children: "Centro"
25043
25134
  }),
25044
25135
  /* @__PURE__ */ jsx(v$4, {
25045
- onSelect: () => z({ alignItems: "flex-end" }),
25136
+ onSelect: () => B({ alignItems: "flex-end" }),
25046
25137
  children: "Base"
25047
25138
  })
25048
25139
  ]
25049
25140
  })] })] })
25050
25141
  ] }),
25051
- N.type === "image" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25142
+ P.type === "image" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25052
25143
  size: "1",
25053
25144
  color: "gray",
25054
25145
  mb: "1",
@@ -25061,20 +25152,21 @@ const SimpleLayers = () => {
25061
25152
  width: "100%",
25062
25153
  justifyContent: "space-between"
25063
25154
  },
25064
- children: [(N.style?.objectFit || "cover") === "cover" ? "Cobrir (Cover)" : N.style?.objectFit === "contain" ? "Conter (Contain)" : "Esticar (Fill)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
25155
+ children: [(P.style?.objectFit || "cover") === "cover" ? "Cobrir (Cover)" : P.style?.objectFit === "contain" ? "Conter (Contain)" : "Esticar (Fill)", /* @__PURE__ */ jsx(ChevronDownIcon, {})]
25065
25156
  }) }), /* @__PURE__ */ jsxs(g$2, {
25157
+ ..._ && { container: _ },
25066
25158
  style: { zIndex: 1e5 },
25067
25159
  children: [
25068
25160
  /* @__PURE__ */ jsx(v$4, {
25069
- onSelect: () => z({ objectFit: "cover" }),
25161
+ onSelect: () => B({ objectFit: "cover" }),
25070
25162
  children: "Cobrir (Cover)"
25071
25163
  }),
25072
25164
  /* @__PURE__ */ jsx(v$4, {
25073
- onSelect: () => z({ objectFit: "contain" }),
25165
+ onSelect: () => B({ objectFit: "contain" }),
25074
25166
  children: "Conter (Contain)"
25075
25167
  }),
25076
25168
  /* @__PURE__ */ jsx(v$4, {
25077
- onSelect: () => z({ objectFit: "fill" }),
25169
+ onSelect: () => B({ objectFit: "fill" }),
25078
25170
  children: "Esticar (Fill)"
25079
25171
  })
25080
25172
  ]
@@ -25089,17 +25181,17 @@ const SimpleLayers = () => {
25089
25181
  as: "div",
25090
25182
  children: "Cor de Fundo"
25091
25183
  }), /* @__PURE__ */ jsx(ColorInput, {
25092
- color: N.style?.backgroundColor || "transparent",
25093
- onChange: (n) => z({ backgroundColor: n })
25094
- })] }), (N.type === "text" || N.type === "text-container") && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25184
+ color: P.style?.backgroundColor || "transparent",
25185
+ onChange: (n) => B({ backgroundColor: n })
25186
+ })] }), (P.type === "text" || P.type === "text-container") && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25095
25187
  size: "1",
25096
25188
  color: "gray",
25097
25189
  mb: "1",
25098
25190
  as: "div",
25099
25191
  children: "Cor do Texto"
25100
25192
  }), /* @__PURE__ */ jsx(ColorInput, {
25101
- color: N.style?.color || "#000000",
25102
- onChange: (n) => z({ color: n })
25193
+ color: P.style?.color || "#000000",
25194
+ onChange: (n) => B({ color: n })
25103
25195
  })] })]
25104
25196
  }),
25105
25197
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsxs(p$1, {
@@ -25111,27 +25203,27 @@ const SimpleLayers = () => {
25111
25203
  children: "Borda (Espessura)"
25112
25204
  }), /* @__PURE__ */ jsxs(p$2, {
25113
25205
  size: "1",
25114
- children: [U, "px"]
25206
+ children: [W, "px"]
25115
25207
  })]
25116
25208
  }), /* @__PURE__ */ jsx(s, {
25117
25209
  min: 0,
25118
25210
  max: 10,
25119
- value: [U],
25120
- onValueChange: (n) => z({
25211
+ value: [W],
25212
+ onValueChange: (n) => B({
25121
25213
  borderWidth: `${n[0]}px`,
25122
25214
  borderStyle: n[0] > 0 ? "solid" : "none",
25123
- borderColor: N.style?.borderColor || "#000000"
25215
+ borderColor: P.style?.borderColor || "#000000"
25124
25216
  })
25125
25217
  })] }),
25126
- U > 0 && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25218
+ W > 0 && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
25127
25219
  size: "1",
25128
25220
  color: "gray",
25129
25221
  mb: "1",
25130
25222
  as: "div",
25131
25223
  children: "Cor da Borda"
25132
25224
  }), /* @__PURE__ */ jsx(ColorInput, {
25133
- color: N.style?.borderColor || "#000000",
25134
- onChange: (n) => z({ borderColor: n })
25225
+ color: P.style?.borderColor || "#000000",
25226
+ onChange: (n) => B({ borderColor: n })
25135
25227
  })] }),
25136
25228
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsxs(p$1, {
25137
25229
  justify: "between",
@@ -25142,13 +25234,13 @@ const SimpleLayers = () => {
25142
25234
  children: "Cantos Arredondados"
25143
25235
  }), /* @__PURE__ */ jsxs(p$2, {
25144
25236
  size: "1",
25145
- children: [G, "px"]
25237
+ children: [Z, "px"]
25146
25238
  })]
25147
25239
  }), /* @__PURE__ */ jsx(s, {
25148
25240
  min: 0,
25149
25241
  max: 50,
25150
- value: [G],
25151
- onValueChange: (n) => z({ borderRadius: `${n[0]}px` })
25242
+ value: [Z],
25243
+ onValueChange: (n) => B({ borderRadius: `${n[0]}px` })
25152
25244
  })] }),
25153
25245
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsxs(p$1, {
25154
25246
  justify: "between",
@@ -25159,13 +25251,13 @@ const SimpleLayers = () => {
25159
25251
  children: "Opacidade"
25160
25252
  }), /* @__PURE__ */ jsxs(p$2, {
25161
25253
  size: "1",
25162
- children: [Z, "%"]
25254
+ children: [Az, "%"]
25163
25255
  })]
25164
25256
  }), /* @__PURE__ */ jsx(s, {
25165
25257
  min: 0,
25166
25258
  max: 100,
25167
- value: [Z],
25168
- onValueChange: (n) => z({ opacity: n[0] / 100 })
25259
+ value: [Az],
25260
+ onValueChange: (n) => B({ opacity: n[0] / 100 })
25169
25261
  })] }),
25170
25262
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsxs(p$1, {
25171
25263
  justify: "between",
@@ -25176,13 +25268,13 @@ const SimpleLayers = () => {
25176
25268
  children: "Espaçamento Interno (Padding)"
25177
25269
  }), /* @__PURE__ */ jsxs(p$2, {
25178
25270
  size: "1",
25179
- children: [W, "px"]
25271
+ children: [G, "px"]
25180
25272
  })]
25181
25273
  }), /* @__PURE__ */ jsx(s, {
25182
25274
  min: 0,
25183
25275
  max: 40,
25184
- value: [W],
25185
- onValueChange: (n) => z({ padding: `${n[0]}px` })
25276
+ value: [G],
25277
+ onValueChange: (n) => B({ padding: `${n[0]}px` })
25186
25278
  })] })
25187
25279
  ]
25188
25280
  })] }),
@@ -25192,7 +25284,7 @@ const SimpleLayers = () => {
25192
25284
  style: { borderTop: "1px solid var(--gray-5)" },
25193
25285
  children: [/* @__PURE__ */ jsxs(o, {
25194
25286
  variant: "ghost",
25195
- onClick: () => j(!A),
25287
+ onClick: () => M(!j),
25196
25288
  style: {
25197
25289
  width: "100%",
25198
25290
  justifyContent: "space-between",
@@ -25206,15 +25298,15 @@ const SimpleLayers = () => {
25206
25298
  size: "2",
25207
25299
  children: "Mais opções"
25208
25300
  })
25209
- }), jsx(A ? ChevronDownIcon : ChevronRightIcon, {})]
25210
- }), A && /* @__PURE__ */ jsx(p, {
25301
+ }), jsx(j ? ChevronDownIcon : ChevronRightIcon, {})]
25302
+ }), j && /* @__PURE__ */ jsx(p, {
25211
25303
  mt: "3",
25212
25304
  className: "advanced-properties-content",
25213
- children: /* @__PURE__ */ jsx(AdvancedPropertiesPanel, { elementId: N.id })
25305
+ children: /* @__PURE__ */ jsx(AdvancedPropertiesPanel, { elementId: P.id })
25214
25306
  })]
25215
25307
  })
25216
25308
  ]
25217
- }, M);
25309
+ }, N);
25218
25310
  };
25219
25311
  var getElementLabel = (n) => {
25220
25312
  switch (n) {
@@ -25649,17 +25741,18 @@ const ViewToolbar = () => {
25649
25741
  ]
25650
25742
  });
25651
25743
  }, WizardDialog = ({ isOpen: n, onClose: E, templates: O, onSelectTemplate: A, initialStep: j = 1, onFinishWizard: M, onStartTour: N }) => {
25652
- let [P, z] = useState(j), [B, H] = useState(null);
25744
+ let { portalContainer: P } = useEditor(), [z, B] = useState(j), [H, U] = useState(null);
25653
25745
  React.useEffect(() => {
25654
- n && j && z(j);
25746
+ n && j && B(j);
25655
25747
  }, [n, j]);
25656
- let U = () => {
25657
- P === 1 && B ? (A(O.find((n) => n.id === B) || null), z(2)) : P === 2 ? (E(), N && N()) : P === 3 && (M && M(), E());
25748
+ let W = () => {
25749
+ z === 1 && H ? (A(O.find((n) => n.id === H) || null), B(2)) : z === 2 ? (E(), N && N()) : z === 3 && (M && M(), E());
25658
25750
  };
25659
25751
  return /* @__PURE__ */ jsx(s$5, {
25660
25752
  open: n,
25661
25753
  onOpenChange: E,
25662
25754
  children: /* @__PURE__ */ jsx(p$11, {
25755
+ ...P && { container: P },
25663
25756
  style: { maxWidth: 800 },
25664
25757
  children: /* @__PURE__ */ jsxs(p$1, {
25665
25758
  direction: "column",
@@ -25674,12 +25767,12 @@ const ViewToolbar = () => {
25674
25767
  }) }), /* @__PURE__ */ jsx(p$1, {
25675
25768
  gap: "2",
25676
25769
  children: /* @__PURE__ */ jsx(StepIndicator, {
25677
- current: P,
25770
+ current: z,
25678
25771
  total: 3
25679
25772
  })
25680
25773
  })]
25681
25774
  }), /* @__PURE__ */ jsxs(p, { children: [
25682
- P === 1 && /* @__PURE__ */ jsxs(p$1, {
25775
+ z === 1 && /* @__PURE__ */ jsxs(p$1, {
25683
25776
  direction: "column",
25684
25777
  gap: "4",
25685
25778
  children: [
@@ -25696,13 +25789,13 @@ const ViewToolbar = () => {
25696
25789
  columns: "3",
25697
25790
  gap: "3",
25698
25791
  children: [O.map((n) => /* @__PURE__ */ jsx(o$4, {
25699
- variant: B === n.id ? "surface" : "classic",
25792
+ variant: H === n.id ? "surface" : "classic",
25700
25793
  style: {
25701
25794
  cursor: "pointer",
25702
- border: B === n.id ? "2px solid var(--accent-9)" : void 0,
25703
- backgroundColor: B === n.id ? "var(--accent-2)" : void 0
25795
+ border: H === n.id ? "2px solid var(--accent-9)" : void 0,
25796
+ backgroundColor: H === n.id ? "var(--accent-2)" : void 0
25704
25797
  },
25705
- onClick: () => H(n.id),
25798
+ onClick: () => U(n.id),
25706
25799
  children: /* @__PURE__ */ jsxs(p$1, {
25707
25800
  direction: "column",
25708
25801
  gap: "2",
@@ -25739,13 +25832,13 @@ const ViewToolbar = () => {
25739
25832
  ]
25740
25833
  })
25741
25834
  }, n.id)), /* @__PURE__ */ jsx(o$4, {
25742
- variant: B === "blank" ? "surface" : "classic",
25835
+ variant: H === "blank" ? "surface" : "classic",
25743
25836
  style: {
25744
25837
  cursor: "pointer",
25745
- border: B === "blank" ? "2px solid var(--accent-9)" : void 0,
25746
- backgroundColor: B === "blank" ? "var(--accent-2)" : void 0
25838
+ border: H === "blank" ? "2px solid var(--accent-9)" : void 0,
25839
+ backgroundColor: H === "blank" ? "var(--accent-2)" : void 0
25747
25840
  },
25748
- onClick: () => H("blank"),
25841
+ onClick: () => U("blank"),
25749
25842
  children: /* @__PURE__ */ jsxs(p$1, {
25750
25843
  direction: "column",
25751
25844
  gap: "2",
@@ -25794,14 +25887,14 @@ const ViewToolbar = () => {
25794
25887
  onClick: E,
25795
25888
  children: "Pular Assistente"
25796
25889
  }), /* @__PURE__ */ jsxs(o, {
25797
- onClick: U,
25798
- disabled: !B,
25890
+ onClick: W,
25891
+ disabled: !H,
25799
25892
  children: ["Continuar ", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
25800
25893
  })]
25801
25894
  })
25802
25895
  ]
25803
25896
  }),
25804
- P === 2 && /* @__PURE__ */ jsxs(p$1, {
25897
+ z === 2 && /* @__PURE__ */ jsxs(p$1, {
25805
25898
  direction: "column",
25806
25899
  gap: "4",
25807
25900
  children: [
@@ -25880,16 +25973,16 @@ const ViewToolbar = () => {
25880
25973
  children: [/* @__PURE__ */ jsxs(o, {
25881
25974
  variant: "soft",
25882
25975
  color: "gray",
25883
- onClick: () => z(1),
25976
+ onClick: () => B(1),
25884
25977
  children: [/* @__PURE__ */ jsx(ArrowRightIcon, { style: { transform: "rotate(180deg)" } }), " Voltar"]
25885
25978
  }), /* @__PURE__ */ jsxs(o, {
25886
- onClick: U,
25979
+ onClick: W,
25887
25980
  children: ["Começar a Editar ", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
25888
25981
  })]
25889
25982
  })
25890
25983
  ]
25891
25984
  }),
25892
- P === 3 && /* @__PURE__ */ jsxs(p$1, {
25985
+ z === 3 && /* @__PURE__ */ jsxs(p$1, {
25893
25986
  direction: "column",
25894
25987
  gap: "4",
25895
25988
  children: [
@@ -25936,7 +26029,7 @@ const ViewToolbar = () => {
25936
26029
  onClick: E,
25937
26030
  children: "Voltar a Editar"
25938
26031
  }), /* @__PURE__ */ jsxs(o, {
25939
- onClick: U,
26032
+ onClick: W,
25940
26033
  color: "green",
25941
26034
  children: [/* @__PURE__ */ jsx(CheckIcon, {}), " Concluir e Exportar"]
25942
26035
  })]
@@ -25978,7 +26071,7 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
25978
26071
  } })]
25979
26072
  }, E))
25980
26073
  }), EditorContent = ({ initialState: n, onSave: E, theme: O = "light", templates: A, activeTemplateId: j, onTemplateChange: M }) => {
25981
- let [N, P] = useState(!0), [z, B] = useState(!0), [H, U] = useState(!1), [W, G] = useState(!1), [Z, Az] = useState(A && A.length > 0 ? A[0].id : null), jz = React.useRef(null), [Mz, Nz] = useState(!1), [Pz, Fz] = useState(1), [Lz, Rz] = useState(!1), { addElement: zz, loadState: Bz, state: Vz, undo: Hz, redo: Gz, copy: Kz, paste: qz, removeSelected: Jz, updateElements: Yz } = useEditor(), Xz = React.useRef(!1);
26074
+ let [N, P] = useState(!0), [z, B] = useState(!0), [H, U] = useState(!1), [W, G] = useState(!1), [Z, Az] = useState(A && A.length > 0 ? A[0].id : null), jz = React.useRef(null), [Mz, Nz] = useState(!1), [Pz, Fz] = useState(1), [Lz, Rz] = useState(!1), { addElement: zz, loadState: Bz, state: Vz, portalContainer: Hz, undo: Gz, redo: Kz, copy: qz, paste: Jz, removeSelected: Yz, updateElements: Xz } = useEditor(), Zz = React.useRef(!1);
25982
26075
  React.useEffect(() => {
25983
26076
  let n = () => {
25984
26077
  let n = window.innerWidth < 768;
@@ -25986,7 +26079,7 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
25986
26079
  };
25987
26080
  return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
25988
26081
  }, []);
25989
- let Zz = () => {
26082
+ let Qz = () => {
25990
26083
  let n = {
25991
26084
  elements: Vz.elements,
25992
26085
  isList: Vz.isList,
@@ -26025,11 +26118,11 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26025
26118
  }, [zz]), React.useEffect(() => {
26026
26119
  let n = (n) => {
26027
26120
  if (!(document.activeElement?.tagName === "INPUT" || document.activeElement?.tagName === "TEXTAREA" || document.activeElement?.isContentEditable)) {
26028
- if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), Gz()) : (n.preventDefault(), Hz());
26029
- else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), Gz();
26030
- else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), Kz();
26031
- else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), qz();
26032
- else if (n.key === "Delete" || n.key === "Backspace") Vz.selectedElementIds.length > 0 && (n.preventDefault(), Jz());
26121
+ if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), Kz()) : (n.preventDefault(), Gz());
26122
+ else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), Kz();
26123
+ else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), qz();
26124
+ else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), Jz();
26125
+ else if (n.key === "Delete" || n.key === "Backspace") Vz.selectedElementIds.length > 0 && (n.preventDefault(), Yz());
26033
26126
  else if ([
26034
26127
  "ArrowUp",
26035
26128
  "ArrowDown",
@@ -26047,22 +26140,22 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26047
26140
  changes: j
26048
26141
  });
26049
26142
  }
26050
- }), E.length > 0 && Yz(E);
26143
+ }), E.length > 0 && Xz(E);
26051
26144
  }
26052
26145
  }
26053
26146
  };
26054
26147
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
26055
26148
  }, [
26056
- Hz,
26057
26149
  Gz,
26058
26150
  Kz,
26059
26151
  qz,
26060
26152
  Jz,
26153
+ Yz,
26061
26154
  Vz.selectedElementIds,
26062
26155
  Vz.elements,
26063
- Yz
26156
+ Xz
26064
26157
  ]);
26065
- let [Qz, $z] = useState(!1);
26158
+ let [$z, eB] = useState(!1);
26066
26159
  React.useEffect(() => {
26067
26160
  if (n) try {
26068
26161
  let _ = typeof n == "string" ? JSON.parse(n) : n;
@@ -26070,17 +26163,17 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26070
26163
  } catch (n) {
26071
26164
  console.error("Failed to load initial state", n);
26072
26165
  }
26073
- $z(!0);
26166
+ eB(!0);
26074
26167
  }, [n, Bz]), React.useEffect(() => {
26075
- Qz && (Xz.current || Vz.elements.length === 0 && (Xz.current = !0, Fz(1), Nz(!0)));
26076
- }, [Qz, Vz.elements]), React.useEffect(() => {
26168
+ $z && (Zz.current || Vz.elements.length === 0 && (Zz.current = !0, Fz(1), Nz(!0)));
26169
+ }, [$z, Vz.elements]), React.useEffect(() => {
26077
26170
  !A || A.length === 0 || H && Az(j || A[0].id);
26078
26171
  }, [
26079
26172
  j,
26080
26173
  H,
26081
26174
  A
26082
26175
  ]);
26083
- let eB = React.useCallback((n) => {
26176
+ let tB = React.useCallback((n) => {
26084
26177
  if (n) try {
26085
26178
  let _ = typeof n == "string" ? JSON.parse(n) : n;
26086
26179
  if (Array.isArray(_)) {
@@ -26098,10 +26191,10 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26098
26191
  return React.useEffect(() => {
26099
26192
  if (!A || A.length === 0 || !j || jz.current === j) return;
26100
26193
  let n = A.find((n) => n.id === j);
26101
- n && (eB(n.state), jz.current = j);
26194
+ n && (tB(n.state), jz.current = j);
26102
26195
  }, [
26103
26196
  j,
26104
- eB,
26197
+ tB,
26105
26198
  A
26106
26199
  ]), /* @__PURE__ */ jsx(R, {
26107
26200
  appearance: O,
@@ -26332,6 +26425,7 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26332
26425
  open: H,
26333
26426
  onOpenChange: U,
26334
26427
  children: /* @__PURE__ */ jsxs(p$11, {
26428
+ ...Hz && { container: Hz },
26335
26429
  style: { maxWidth: 450 },
26336
26430
  children: [
26337
26431
  /* @__PURE__ */ jsx(g$3, { children: "Galeria de Templates" }),
@@ -26394,7 +26488,7 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26394
26488
  return;
26395
26489
  }
26396
26490
  let n = A.find((n) => n.id === Z);
26397
- n && (eB(n.state), jz.current = Z);
26491
+ n && (tB(n.state), jz.current = Z);
26398
26492
  },
26399
26493
  children: "Aplicar"
26400
26494
  }) })]
@@ -26409,12 +26503,12 @@ var StepIndicator = ({ current: n, total: _ }) => /* @__PURE__ */ jsx(p$1, {
26409
26503
  onClose: () => Nz(!1),
26410
26504
  templates: A || [],
26411
26505
  onSelectTemplate: (n) => {
26412
- n && eB(n.state);
26506
+ n && tB(n.state);
26413
26507
  },
26414
26508
  onStartTour: () => Rz(!0),
26415
26509
  initialStep: Pz,
26416
26510
  onFinishWizard: () => {
26417
- Zz(), alert("Layout finalizado e exportado com sucesso!");
26511
+ Qz(), alert("Layout finalizado e exportado com sucesso!");
26418
26512
  }
26419
26513
  }),
26420
26514
  /* @__PURE__ */ jsx(OnboardingTour, {
@@ -26430,6 +26524,7 @@ const GenericEditor = (n) => /* @__PURE__ */ jsx(EditorProvider, {
26430
26524
  isList: n.layout.isList,
26431
26525
  availableProps: n.layout.props,
26432
26526
  theme: n.theme,
26527
+ portalContainer: n.portalContainer,
26433
26528
  children: /* @__PURE__ */ jsx(EditorContent, { ...n })
26434
26529
  });
26435
26530
  var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), hex8ToRgba = (n) => {