@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.
- package/dist/editor/context.d.ts +3 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/generic-editor.js +1101 -1006
- package/dist/generic-editor.umd.cjs +15 -15
- package/package.json +1 -1
package/dist/generic-editor.js
CHANGED
|
@@ -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 [
|
|
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
|
-
|
|
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
|
-
}, [
|
|
11259
|
-
|
|
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
|
|
11271
|
-
|
|
11270
|
+
let P = React.useCallback((n) => {
|
|
11271
|
+
N((_) => ({
|
|
11272
11272
|
..._,
|
|
11273
11273
|
isPropertiesPanelOpen: n
|
|
11274
11274
|
}));
|
|
11275
|
-
}, []),
|
|
11276
|
-
|
|
11275
|
+
}, []), z = React.useCallback((n) => {
|
|
11276
|
+
N((_) => ({
|
|
11277
11277
|
..._,
|
|
11278
11278
|
canvasHeight: n
|
|
11279
11279
|
}));
|
|
11280
|
-
}, []),
|
|
11281
|
-
|
|
11280
|
+
}, []), B = React.useCallback((n) => {
|
|
11281
|
+
N((_) => ({
|
|
11282
11282
|
..._,
|
|
11283
11283
|
gridSize: n
|
|
11284
11284
|
}));
|
|
11285
|
-
}, []),
|
|
11286
|
-
|
|
11285
|
+
}, []), H = React.useCallback((n) => {
|
|
11286
|
+
N((_) => ({
|
|
11287
11287
|
..._,
|
|
11288
11288
|
zoom: n
|
|
11289
11289
|
}));
|
|
11290
|
-
}, []),
|
|
11291
|
-
|
|
11290
|
+
}, []), U = React.useCallback((n) => {
|
|
11291
|
+
N((_) => ({
|
|
11292
11292
|
..._,
|
|
11293
11293
|
pan: n
|
|
11294
11294
|
}));
|
|
11295
|
-
}, []),
|
|
11296
|
-
|
|
11295
|
+
}, []), W = React.useCallback((n) => {
|
|
11296
|
+
N((_) => ({
|
|
11297
11297
|
..._,
|
|
11298
11298
|
snapLines: n
|
|
11299
11299
|
}));
|
|
11300
|
-
}, []),
|
|
11301
|
-
|
|
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
|
-
}, []),
|
|
11329
|
-
|
|
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
|
-
}, []),
|
|
11342
|
-
|
|
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
|
-
}, []),
|
|
11355
|
-
|
|
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
|
-
}, []),
|
|
11362
|
-
|
|
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
|
-
}, []),
|
|
11373
|
-
|
|
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
|
-
}, []),
|
|
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
|
-
|
|
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
|
-
}, []),
|
|
11430
|
-
|
|
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
|
-
}, []),
|
|
11444
|
-
|
|
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
|
-
}, []),
|
|
11459
|
-
|
|
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
|
-
}, []),
|
|
11476
|
-
|
|
11475
|
+
}, []), zz = React.useCallback((n) => {
|
|
11476
|
+
N((_) => ({
|
|
11477
11477
|
..._,
|
|
11478
11478
|
selectedElementIds: n
|
|
11479
11479
|
}));
|
|
11480
|
-
}, []),
|
|
11481
|
-
|
|
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
|
-
}, []),
|
|
11496
|
-
|
|
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
|
-
}, []),
|
|
11510
|
-
|
|
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
|
-
}, []),
|
|
11565
|
-
|
|
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
|
-
}, []),
|
|
11596
|
-
|
|
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
|
-
}, []),
|
|
11615
|
-
|
|
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
|
-
}, []),
|
|
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
|
-
}, []),
|
|
11638
|
-
|
|
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 =
|
|
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
|
-
}, [
|
|
11658
|
-
|
|
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 =
|
|
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
|
-
}, [
|
|
11678
|
-
|
|
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
|
-
}, []),
|
|
11710
|
-
|
|
11709
|
+
}, []), Zz = React.useCallback((n, _) => {
|
|
11710
|
+
N((E) => ({
|
|
11711
11711
|
...E,
|
|
11712
11712
|
mockData: n,
|
|
11713
11713
|
singleMockData: _
|
|
11714
11714
|
}));
|
|
11715
|
-
}, []),
|
|
11716
|
-
|
|
11715
|
+
}, []), Qz = React.useCallback((n) => {
|
|
11716
|
+
N((_) => ({
|
|
11717
11717
|
..._,
|
|
11718
11718
|
listSettings: {
|
|
11719
11719
|
..._.listSettings,
|
|
11720
11720
|
...n
|
|
11721
11721
|
}
|
|
11722
11722
|
}));
|
|
11723
|
-
}, []),
|
|
11724
|
-
|
|
11723
|
+
}, []), $z = React.useCallback((n) => {
|
|
11724
|
+
N((_) => ({
|
|
11725
11725
|
..._,
|
|
11726
11726
|
assets: [..._.assets, n]
|
|
11727
11727
|
}));
|
|
11728
|
-
}, []),
|
|
11729
|
-
|
|
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:
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
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
|
-
|
|
11781
|
+
Kz,
|
|
11781
11782
|
Jz,
|
|
11782
11783
|
Yz,
|
|
11783
11784
|
Xz,
|
|
11784
11785
|
Zz,
|
|
11785
|
-
|
|
11786
|
-
|
|
11786
|
+
Qz,
|
|
11787
|
+
z,
|
|
11787
11788
|
G,
|
|
11788
11789
|
Z,
|
|
11789
11790
|
Az,
|
|
11790
11791
|
jz,
|
|
11791
11792
|
Mz,
|
|
11792
|
-
|
|
11793
|
+
Nz,
|
|
11793
11794
|
B,
|
|
11794
11795
|
H,
|
|
11795
11796
|
U,
|
|
11796
|
-
|
|
11797
|
+
W,
|
|
11797
11798
|
$z,
|
|
11798
|
-
|
|
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,
|
|
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
|
-
},
|
|
13390
|
-
|
|
13391
|
-
},
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
13416
|
-
|
|
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, {
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
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:
|
|
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:
|
|
13495
|
+
ref: z,
|
|
13491
13496
|
style: { display: "none" },
|
|
13492
13497
|
accept: ".json",
|
|
13493
|
-
onChange:
|
|
13498
|
+
onChange: U
|
|
13494
13499
|
}),
|
|
13495
13500
|
/* @__PURE__ */ jsxs(o, {
|
|
13496
13501
|
variant: "soft",
|
|
13497
13502
|
color: "gray",
|
|
13498
|
-
onClick:
|
|
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:
|
|
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
|
-
},
|
|
19189
|
+
}, A = (E) => {
|
|
19185
19190
|
_(n.id, { animation: {
|
|
19186
|
-
...
|
|
19187
|
-
...
|
|
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: [
|
|
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: () =>
|
|
19217
|
+
onSelect: () => A({ type: "none" }),
|
|
19212
19218
|
children: "Nenhuma"
|
|
19213
19219
|
}),
|
|
19214
19220
|
/* @__PURE__ */ jsx(v$4, {
|
|
19215
|
-
onSelect: () =>
|
|
19221
|
+
onSelect: () => A({ type: "slideIn" }),
|
|
19216
19222
|
children: "Slide In (Padrão)"
|
|
19217
19223
|
}),
|
|
19218
19224
|
/* @__PURE__ */ jsx(v$4, {
|
|
19219
|
-
onSelect: () =>
|
|
19225
|
+
onSelect: () => A({ type: "fadeIn" }),
|
|
19220
19226
|
children: "Fade In"
|
|
19221
19227
|
}),
|
|
19222
19228
|
/* @__PURE__ */ jsx(v$4, {
|
|
19223
|
-
onSelect: () =>
|
|
19229
|
+
onSelect: () => A({ type: "smoothSlideUp" }),
|
|
19224
19230
|
children: "Slide Suave (Up)"
|
|
19225
19231
|
}),
|
|
19226
19232
|
/* @__PURE__ */ jsx(v$4, {
|
|
19227
|
-
onSelect: () =>
|
|
19233
|
+
onSelect: () => A({ type: "popIn" }),
|
|
19228
19234
|
children: "Pop In"
|
|
19229
19235
|
}),
|
|
19230
19236
|
/* @__PURE__ */ jsx(v$4, {
|
|
19231
|
-
onSelect: () =>
|
|
19237
|
+
onSelect: () => A({ type: "blurIn" }),
|
|
19232
19238
|
children: "Blur In"
|
|
19233
19239
|
}),
|
|
19234
19240
|
/* @__PURE__ */ jsx(v$4, {
|
|
19235
|
-
onSelect: () =>
|
|
19241
|
+
onSelect: () => A({ type: "slideInLeft" }),
|
|
19236
19242
|
children: "Slide In (Esquerda)"
|
|
19237
19243
|
}),
|
|
19238
19244
|
/* @__PURE__ */ jsx(v$4, {
|
|
19239
|
-
onSelect: () =>
|
|
19245
|
+
onSelect: () => A({ type: "slideInRight" }),
|
|
19240
19246
|
children: "Slide In (Direita)"
|
|
19241
19247
|
}),
|
|
19242
19248
|
/* @__PURE__ */ jsx(v$4, {
|
|
19243
|
-
onSelect: () =>
|
|
19249
|
+
onSelect: () => A({ type: "slideInUp" }),
|
|
19244
19250
|
children: "Slide In (Cima)"
|
|
19245
19251
|
}),
|
|
19246
19252
|
/* @__PURE__ */ jsx(v$4, {
|
|
19247
|
-
onSelect: () =>
|
|
19253
|
+
onSelect: () => A({ type: "slideInDown" }),
|
|
19248
19254
|
children: "Slide In (Baixo)"
|
|
19249
19255
|
}),
|
|
19250
19256
|
/* @__PURE__ */ jsx(v$4, {
|
|
19251
|
-
onSelect: () =>
|
|
19257
|
+
onSelect: () => A({ type: "zoomIn" }),
|
|
19252
19258
|
children: "Zoom In"
|
|
19253
19259
|
}),
|
|
19254
19260
|
/* @__PURE__ */ jsx(v$4, {
|
|
19255
|
-
onSelect: () =>
|
|
19261
|
+
onSelect: () => A({ type: "bounceIn" }),
|
|
19256
19262
|
children: "Bounce In"
|
|
19257
19263
|
}),
|
|
19258
19264
|
/* @__PURE__ */ jsx(v$4, {
|
|
19259
|
-
onSelect: () =>
|
|
19265
|
+
onSelect: () => A({ type: "pulse" }),
|
|
19260
19266
|
children: "Pulse (Atenção)"
|
|
19261
19267
|
}),
|
|
19262
19268
|
/* @__PURE__ */ jsx(v$4, {
|
|
19263
|
-
onSelect: () =>
|
|
19269
|
+
onSelect: () => A({ type: "shake" }),
|
|
19264
19270
|
children: "Shake (Atenção)"
|
|
19265
19271
|
}),
|
|
19266
19272
|
/* @__PURE__ */ jsx(v$4, {
|
|
19267
|
-
onSelect: () =>
|
|
19273
|
+
onSelect: () => A({ type: "spin" }),
|
|
19268
19274
|
children: "Spin (Loop)"
|
|
19269
19275
|
})
|
|
19270
19276
|
]
|
|
19271
|
-
})] })] }),
|
|
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:
|
|
19286
|
-
onChange: (n) =>
|
|
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:
|
|
19298
|
-
onChange: (n) =>
|
|
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: [(
|
|
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: () =>
|
|
19326
|
+
onSelect: () => A({ timingFunction: "linear" }),
|
|
19320
19327
|
children: "Linear"
|
|
19321
19328
|
}),
|
|
19322
19329
|
/* @__PURE__ */ jsx(v$4, {
|
|
19323
|
-
onSelect: () =>
|
|
19330
|
+
onSelect: () => A({ timingFunction: "ease" }),
|
|
19324
19331
|
children: "Ease"
|
|
19325
19332
|
}),
|
|
19326
19333
|
/* @__PURE__ */ jsx(v$4, {
|
|
19327
|
-
onSelect: () =>
|
|
19334
|
+
onSelect: () => A({ timingFunction: "ease-in" }),
|
|
19328
19335
|
children: "Ease In"
|
|
19329
19336
|
}),
|
|
19330
19337
|
/* @__PURE__ */ jsx(v$4, {
|
|
19331
|
-
onSelect: () =>
|
|
19338
|
+
onSelect: () => A({ timingFunction: "ease-out" }),
|
|
19332
19339
|
children: "Ease Out"
|
|
19333
19340
|
}),
|
|
19334
19341
|
/* @__PURE__ */ jsx(v$4, {
|
|
19335
|
-
onSelect: () =>
|
|
19342
|
+
onSelect: () => A({ timingFunction: "ease-in-out" }),
|
|
19336
19343
|
children: "Ease In Out"
|
|
19337
19344
|
}),
|
|
19338
19345
|
/* @__PURE__ */ jsx(v$4, {
|
|
19339
|
-
onSelect: () =>
|
|
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(
|
|
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:
|
|
19354
|
-
onCheckedChange: (n) =>
|
|
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" },
|
|
19370
|
+
let { portalContainer: E } = useEditor(), O = n.formatting || { type: "text" }, A = (E) => {
|
|
19364
19371
|
_(n.id, { formatting: {
|
|
19365
|
-
...
|
|
19366
|
-
...
|
|
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:
|
|
19427
|
-
onValueChange: (n) =>
|
|
19428
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
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
|
-
|
|
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:
|
|
19459
|
-
onChange: (n) =>
|
|
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:
|
|
19469
|
-
onChange: (n) =>
|
|
19479
|
+
value: O.falseLabel || "",
|
|
19480
|
+
onChange: (n) => A({ falseLabel: n.target.value })
|
|
19470
19481
|
})] })]
|
|
19471
19482
|
}),
|
|
19472
|
-
|
|
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:
|
|
19483
|
-
onChange: (n) =>
|
|
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
|
-
|
|
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:
|
|
19505
|
-
onValueChange: (n) =>
|
|
19506
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
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
|
-
|
|
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:
|
|
19530
|
-
onChange: (n) =>
|
|
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:
|
|
19542
|
-
onChange: (n) =>
|
|
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 || {},
|
|
19801
|
-
let j = { ...
|
|
19802
|
-
|
|
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: [
|
|
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: () =>
|
|
19853
|
+
onSelect: () => j(n, null),
|
|
19839
19854
|
children: "Nenhum"
|
|
19840
19855
|
}),
|
|
19841
19856
|
E.map((_) => /* @__PURE__ */ jsx(v$4, {
|
|
19842
|
-
onSelect: () =>
|
|
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 || [],
|
|
19855
|
-
let
|
|
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: [...
|
|
19863
|
-
},
|
|
19864
|
-
_(n.id, { conditions:
|
|
19865
|
-
},
|
|
19866
|
-
_(n.id, { conditions:
|
|
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
|
-
...
|
|
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:
|
|
19899
|
+
onClick: j,
|
|
19885
19900
|
children: [/* @__PURE__ */ jsx(PlusIcon, {}), " Nova Regra"]
|
|
19886
19901
|
})]
|
|
19887
|
-
}),
|
|
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:
|
|
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: () =>
|
|
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: () =>
|
|
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: () =>
|
|
19974
|
+
onSelect: () => N(n.id, { operator: "equals" }),
|
|
19958
19975
|
children: "Igual a"
|
|
19959
19976
|
}),
|
|
19960
19977
|
/* @__PURE__ */ jsx(v$4, {
|
|
19961
|
-
onSelect: () =>
|
|
19978
|
+
onSelect: () => N(n.id, { operator: "notEquals" }),
|
|
19962
19979
|
children: "Diferente de"
|
|
19963
19980
|
}),
|
|
19964
19981
|
/* @__PURE__ */ jsx(v$4, {
|
|
19965
|
-
onSelect: () =>
|
|
19982
|
+
onSelect: () => N(n.id, { operator: "contains" }),
|
|
19966
19983
|
children: "Contém"
|
|
19967
19984
|
}),
|
|
19968
19985
|
/* @__PURE__ */ jsx(v$4, {
|
|
19969
|
-
onSelect: () =>
|
|
19986
|
+
onSelect: () => N(n.id, { operator: "greaterThan" }),
|
|
19970
19987
|
children: "Maior que"
|
|
19971
19988
|
}),
|
|
19972
19989
|
/* @__PURE__ */ jsx(v$4, {
|
|
19973
|
-
onSelect: () =>
|
|
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: (_) =>
|
|
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: (_) =>
|
|
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
|
|
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
|
-
}, [
|
|
20083
|
+
}, [H, U] = useState(B(n));
|
|
20067
20084
|
useEffect(() => {
|
|
20068
|
-
|
|
20085
|
+
U(B(n));
|
|
20069
20086
|
}, [n]);
|
|
20070
|
-
let
|
|
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:
|
|
20102
|
+
value: H.num,
|
|
20086
20103
|
onChange: (n) => {
|
|
20087
20104
|
let _ = n.target.value;
|
|
20088
|
-
|
|
20089
|
-
...
|
|
20105
|
+
U({
|
|
20106
|
+
...H,
|
|
20090
20107
|
num: _
|
|
20091
|
-
}),
|
|
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:
|
|
20119
|
+
value: P(H.unit),
|
|
20103
20120
|
onValueChange: (n) => {
|
|
20104
|
-
let _ =
|
|
20105
|
-
|
|
20106
|
-
...
|
|
20121
|
+
let _ = z(n);
|
|
20122
|
+
U({
|
|
20123
|
+
...H,
|
|
20107
20124
|
unit: _
|
|
20108
|
-
}),
|
|
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, {
|
|
20116
|
-
|
|
20117
|
-
children: n
|
|
20118
|
-
|
|
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 [
|
|
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
|
-
},
|
|
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:
|
|
20163
|
+
content: A ? "Desvincular lados" : "Vincular lados",
|
|
20144
20164
|
children: /* @__PURE__ */ jsx(o$2, {
|
|
20145
20165
|
size: "1",
|
|
20146
20166
|
variant: "ghost",
|
|
20147
|
-
color:
|
|
20148
|
-
onClick: () =>
|
|
20149
|
-
children: jsx(
|
|
20167
|
+
color: A ? "blue" : "gray",
|
|
20168
|
+
onClick: () => j(!A),
|
|
20169
|
+
children: jsx(A ? LinkIcon : UnlinkIcon, {})
|
|
20150
20170
|
})
|
|
20151
20171
|
})]
|
|
20152
|
-
}),
|
|
20172
|
+
}), A ? /* @__PURE__ */ jsx(UnitInput, {
|
|
20173
|
+
portalContainer: O,
|
|
20153
20174
|
value: n.top || "",
|
|
20154
|
-
onChange:
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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,
|
|
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
|
-
}), [
|
|
20241
|
+
}), [Mz, Pz] = useState(""), [Fz, Lz] = useState({});
|
|
20217
20242
|
useEffect(() => {
|
|
20218
20243
|
let n = localStorage.getItem("editor-presets");
|
|
20219
20244
|
if (n) try {
|
|
20220
|
-
|
|
20245
|
+
Lz(JSON.parse(n));
|
|
20221
20246
|
} catch (n) {
|
|
20222
20247
|
console.error("Failed to load presets", n);
|
|
20223
20248
|
}
|
|
20224
20249
|
}, []);
|
|
20225
|
-
let
|
|
20226
|
-
if (!
|
|
20250
|
+
let Rz = (n) => {
|
|
20251
|
+
if (!W) return;
|
|
20227
20252
|
let _ = {
|
|
20228
|
-
...
|
|
20229
|
-
[n]: { style:
|
|
20253
|
+
...Fz,
|
|
20254
|
+
[n]: { style: W.style }
|
|
20230
20255
|
};
|
|
20231
|
-
|
|
20232
|
-
},
|
|
20233
|
-
let _ =
|
|
20234
|
-
_ && _.style &&
|
|
20256
|
+
Lz(_), localStorage.setItem("editor-presets", JSON.stringify(_));
|
|
20257
|
+
}, zz = (n) => {
|
|
20258
|
+
let _ = Fz[n];
|
|
20259
|
+
_ && _.style && Kz(_.style);
|
|
20235
20260
|
};
|
|
20236
|
-
if (!
|
|
20237
|
-
let
|
|
20238
|
-
|
|
20261
|
+
if (!z || !W) return null;
|
|
20262
|
+
let Bz = (n) => {
|
|
20263
|
+
jz((_) => ({
|
|
20239
20264
|
..._,
|
|
20240
20265
|
[n]: !_[n]
|
|
20241
20266
|
}));
|
|
20242
|
-
},
|
|
20243
|
-
|
|
20267
|
+
}, Vz = (n) => {
|
|
20268
|
+
Z ? A(B.map((_) => ({
|
|
20244
20269
|
id: _,
|
|
20245
20270
|
changes: n
|
|
20246
|
-
}))) :
|
|
20247
|
-
},
|
|
20248
|
-
if (
|
|
20271
|
+
}))) : O(W.id, n);
|
|
20272
|
+
}, Gz = () => {
|
|
20273
|
+
if (Z) M(), N();
|
|
20249
20274
|
else {
|
|
20250
|
-
let { id: n, ..._ } =
|
|
20251
|
-
|
|
20275
|
+
let { id: n, ..._ } = W;
|
|
20276
|
+
P({
|
|
20252
20277
|
..._,
|
|
20253
|
-
x:
|
|
20254
|
-
y:
|
|
20278
|
+
x: W.x + 20,
|
|
20279
|
+
y: W.y + 20
|
|
20255
20280
|
});
|
|
20256
20281
|
}
|
|
20257
|
-
},
|
|
20258
|
-
|
|
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
|
-
}))) :
|
|
20265
|
-
...
|
|
20289
|
+
}))) : O(W.id, { style: {
|
|
20290
|
+
...W.style,
|
|
20266
20291
|
...n
|
|
20267
20292
|
} });
|
|
20268
|
-
},
|
|
20293
|
+
}, qz = (n) => {
|
|
20269
20294
|
let _ = {};
|
|
20270
|
-
n.forEach((n) => _[n] = void 0),
|
|
20271
|
-
},
|
|
20272
|
-
if (!
|
|
20273
|
-
let E =
|
|
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
|
-
},
|
|
20276
|
-
if (!
|
|
20277
|
-
let _ = n(
|
|
20278
|
-
return
|
|
20279
|
-
},
|
|
20280
|
-
let E =
|
|
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
|
-
},
|
|
20283
|
-
let n =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
20329
|
+
}, tB = eB(W.style?.boxShadow), nB = (n) => {
|
|
20305
20330
|
let _ = {
|
|
20306
|
-
...
|
|
20331
|
+
...tB,
|
|
20307
20332
|
...n
|
|
20308
20333
|
};
|
|
20309
|
-
|
|
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:
|
|
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:
|
|
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, {
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
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:
|
|
20385
|
-
onClick: () =>
|
|
20386
|
-
children:
|
|
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:
|
|
20394
|
-
onClick: () =>
|
|
20395
|
-
children:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
20431
|
-
onChange: (n) =>
|
|
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
|
-
|
|
20474
|
+
Jz("Conteúdo", [
|
|
20446
20475
|
"text",
|
|
20447
20476
|
"image",
|
|
20448
20477
|
"url",
|
|
20449
20478
|
"value",
|
|
20450
20479
|
"content"
|
|
20451
|
-
]) && (
|
|
20480
|
+
]) && (W.type === "text" || W.type === "text-container" || W.type === "image") && /* @__PURE__ */ jsx(AccordionItem, {
|
|
20452
20481
|
title: "Conteúdo",
|
|
20453
|
-
isOpen:
|
|
20454
|
-
onToggle: () =>
|
|
20455
|
-
children: /* @__PURE__ */ jsxs(p, { children: [(
|
|
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:
|
|
20463
|
-
onChange: (n) =>
|
|
20491
|
+
value: W.content || "",
|
|
20492
|
+
onChange: (n) => Vz({ content: n.target.value }),
|
|
20464
20493
|
rows: 4,
|
|
20465
20494
|
placeholder: "Texto ou {{variavel}}..."
|
|
20466
|
-
})] }),
|
|
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: [
|
|
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: () =>
|
|
20517
|
+
onSelect: () => Vz({ dataBinding: void 0 }),
|
|
20488
20518
|
children: "Nenhum (URL fixa)"
|
|
20489
20519
|
}), (n.availableProps || []).map((n) => /* @__PURE__ */ jsx(v$4, {
|
|
20490
|
-
onSelect: () =>
|
|
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:
|
|
20506
|
-
onChange: (n) =>
|
|
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
|
-
|
|
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:
|
|
20523
|
-
onToggle: () =>
|
|
20524
|
-
onReset: () =>
|
|
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:
|
|
20550
|
-
onValueChange: (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:
|
|
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:
|
|
20566
|
-
onChange: (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:
|
|
20571
|
-
onChange: (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:
|
|
20583
|
-
onChange: (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:
|
|
20595
|
-
onValueChange: (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:
|
|
20657
|
-
onClick: () =>
|
|
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:
|
|
20662
|
-
onClick: () =>
|
|
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:
|
|
20667
|
-
onClick: () =>
|
|
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:
|
|
20679
|
-
onValueChange: (n) =>
|
|
20680
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: 100 } }), /* @__PURE__ */ jsxs(g$1, {
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
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:
|
|
20711
|
-
onValueChange: (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:
|
|
20742
|
-
onChange: (n) =>
|
|
20779
|
+
color: Xz("color", "#000000"),
|
|
20780
|
+
onChange: (n) => Kz({ color: n })
|
|
20743
20781
|
})]
|
|
20744
20782
|
})
|
|
20745
20783
|
]
|
|
20746
20784
|
})
|
|
20747
20785
|
}),
|
|
20748
|
-
|
|
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:
|
|
20756
|
-
onToggle: () =>
|
|
20757
|
-
onReset: () =>
|
|
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:
|
|
20794
|
-
onChange: (n) =>
|
|
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:
|
|
20810
|
-
onChange: (n) =>
|
|
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:
|
|
20827
|
-
onChange: (n) =>
|
|
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:
|
|
20842
|
-
onValueChange: (n) =>
|
|
20843
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
20844
|
-
|
|
20845
|
-
|
|
20846
|
-
|
|
20847
|
-
|
|
20848
|
-
|
|
20849
|
-
|
|
20850
|
-
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
|
-
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
|
|
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:
|
|
20869
|
-
onValueChange: (n) =>
|
|
20870
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
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(
|
|
20911
|
-
onValueChange: ([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(
|
|
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:
|
|
20931
|
-
onValueChange: (n) =>
|
|
20932
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
|
|
20945
|
-
|
|
20946
|
-
|
|
20947
|
-
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
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:
|
|
20966
|
-
onValueChange: (n) =>
|
|
20967
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
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
|
-
|
|
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:
|
|
21007
|
-
onToggle: () =>
|
|
21008
|
-
onReset: () =>
|
|
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
|
-
...
|
|
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:
|
|
21026
|
-
onChange: (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:
|
|
21032
|
-
onChange: (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:
|
|
21038
|
-
onChange: (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:
|
|
21044
|
-
onChange: (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:
|
|
21050
|
-
onChange: (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:
|
|
21062
|
-
onValueChange: (n) =>
|
|
21063
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21071
|
-
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
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
|
-
|
|
21143
|
+
Jz("Espaçamento", ["padding", "margin"]) && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
21086
21144
|
title: "Espaçamento (Margin/Padding)",
|
|
21087
|
-
isOpen:
|
|
21088
|
-
onToggle: () =>
|
|
21089
|
-
onReset: () =>
|
|
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:
|
|
21107
|
-
right:
|
|
21108
|
-
bottom:
|
|
21109
|
-
left:
|
|
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 ?
|
|
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
|
-
}) :
|
|
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:
|
|
21131
|
-
right:
|
|
21132
|
-
bottom:
|
|
21133
|
-
left:
|
|
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 ?
|
|
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
|
-
}) :
|
|
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
|
-
|
|
21212
|
+
Jz("Bordas", [
|
|
21153
21213
|
"border",
|
|
21154
21214
|
"radius",
|
|
21155
21215
|
"stroke"
|
|
21156
21216
|
]) && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
21157
21217
|
title: "Bordas & Cantos",
|
|
21158
|
-
isOpen:
|
|
21159
|
-
onToggle: () =>
|
|
21160
|
-
onReset: () =>
|
|
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:
|
|
21208
|
-
onValueChange: (n) =>
|
|
21209
|
-
children: [/* @__PURE__ */ jsx(u$3, { style: { width: "100%" } }), /* @__PURE__ */ jsxs(g$1, {
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
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:
|
|
21235
|
-
onChange: (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:
|
|
21247
|
-
onChange: (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:
|
|
21259
|
-
right:
|
|
21260
|
-
bottom:
|
|
21261
|
-
left:
|
|
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 ?
|
|
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
|
-
}) :
|
|
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
|
-
|
|
21346
|
+
Jz("Efeitos", ["shadow", "sombra"]) && /* @__PURE__ */ jsx(AccordionItem, {
|
|
21282
21347
|
title: "Efeitos (Sombra)",
|
|
21283
|
-
isOpen:
|
|
21284
|
-
onToggle: () =>
|
|
21285
|
-
onReset: () =>
|
|
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:
|
|
21321
|
-
onChange: (n) =>
|
|
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:
|
|
21333
|
-
onChange: (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:
|
|
21339
|
-
onChange: (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:
|
|
21345
|
-
onChange: (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:
|
|
21351
|
-
onChange: (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:
|
|
21358
|
-
onChange: (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:
|
|
21455
|
+
value: eB(Xz("textShadow", "none")).x,
|
|
21386
21456
|
onChange: (n) => {
|
|
21387
|
-
let _ =
|
|
21388
|
-
|
|
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:
|
|
21465
|
+
value: eB(Xz("textShadow", "none")).y,
|
|
21395
21466
|
onChange: (n) => {
|
|
21396
|
-
let _ =
|
|
21397
|
-
|
|
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:
|
|
21475
|
+
value: eB(Xz("textShadow", "none")).blur,
|
|
21404
21476
|
onChange: (n) => {
|
|
21405
|
-
let _ =
|
|
21406
|
-
|
|
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:
|
|
21485
|
+
color: eB(Xz("textShadow", "none")).color,
|
|
21414
21486
|
onChange: (n) => {
|
|
21415
|
-
let _ =
|
|
21416
|
-
|
|
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
|
-
|
|
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:
|
|
21433
|
-
onToggle: () =>
|
|
21434
|
-
onReset: () =>
|
|
21504
|
+
isOpen: Az.transform,
|
|
21505
|
+
onToggle: () => Bz("transform"),
|
|
21506
|
+
onReset: () => Vz({
|
|
21435
21507
|
rotation: 0,
|
|
21436
21508
|
style: {
|
|
21437
|
-
...
|
|
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:
|
|
21447
|
-
onChange: (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:
|
|
21461
|
-
onChange: (n) =>
|
|
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
|
-
!
|
|
21480
|
-
|
|
21552
|
+
!Z && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
21553
|
+
Jz("Animação", ["animation"]) && /* @__PURE__ */ jsx(AccordionItem, {
|
|
21481
21554
|
title: "Animação",
|
|
21482
|
-
isOpen:
|
|
21483
|
-
onToggle: () =>
|
|
21484
|
-
onReset: () =>
|
|
21555
|
+
isOpen: Az.animation,
|
|
21556
|
+
onToggle: () => Bz("animation"),
|
|
21557
|
+
onReset: () => Vz({ animation: void 0 }),
|
|
21485
21558
|
children: /* @__PURE__ */ jsx(AnimationSettings, {
|
|
21486
|
-
element:
|
|
21487
|
-
updateElement:
|
|
21559
|
+
element: W,
|
|
21560
|
+
updateElement: O
|
|
21488
21561
|
})
|
|
21489
21562
|
}),
|
|
21490
|
-
|
|
21563
|
+
Jz("Regras", ["condition"]) && /* @__PURE__ */ jsx(AccordionItem, {
|
|
21491
21564
|
title: "Regras Condicionais",
|
|
21492
|
-
isOpen:
|
|
21493
|
-
onToggle: () =>
|
|
21494
|
-
onReset: () =>
|
|
21565
|
+
isOpen: Az.conditions,
|
|
21566
|
+
onToggle: () => Bz("conditions"),
|
|
21567
|
+
onReset: () => Vz({ conditions: [] }),
|
|
21495
21568
|
children: /* @__PURE__ */ jsx(ConditionalSettings, {
|
|
21496
|
-
element:
|
|
21497
|
-
updateElement:
|
|
21569
|
+
element: W,
|
|
21570
|
+
updateElement: O,
|
|
21498
21571
|
availableProps: n.availableProps || []
|
|
21499
21572
|
})
|
|
21500
21573
|
}),
|
|
21501
|
-
|
|
21574
|
+
Jz("Formatação", ["format"]) && /* @__PURE__ */ jsx(AccordionItem, {
|
|
21502
21575
|
title: "Formatação",
|
|
21503
|
-
isOpen:
|
|
21504
|
-
onToggle: () =>
|
|
21505
|
-
onReset: () =>
|
|
21576
|
+
isOpen: Az.formatting,
|
|
21577
|
+
onToggle: () => Bz("formatting"),
|
|
21578
|
+
onReset: () => Vz({ formatting: void 0 }),
|
|
21506
21579
|
children: /* @__PURE__ */ jsx(FormattingSettings, {
|
|
21507
|
-
element:
|
|
21508
|
-
updateElement:
|
|
21580
|
+
element: W,
|
|
21581
|
+
updateElement: O
|
|
21509
21582
|
})
|
|
21510
21583
|
})
|
|
21511
21584
|
] })
|
|
21512
21585
|
]
|
|
21513
|
-
},
|
|
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 = () =>
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
|
|
21600
|
-
|
|
21601
|
-
|
|
21602
|
-
|
|
21603
|
-
|
|
21604
|
-
|
|
21605
|
-
|
|
21606
|
-
|
|
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
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
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
|
-
|
|
21784
|
+
zz(_?.type || "slideIn"), Vz(_?.duration || .3), Gz(_?.timingFunction || "ease-out");
|
|
21708
21785
|
}
|
|
21709
|
-
|
|
21710
|
-
}, [
|
|
21711
|
-
if (!
|
|
21712
|
-
let n = parseInt(
|
|
21713
|
-
!isNaN(n) && n > 0 &&
|
|
21714
|
-
let _ = parseInt(
|
|
21715
|
-
!isNaN(_) && _ >= 0 &&
|
|
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
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
])
|
|
21723
|
-
|
|
21724
|
-
|
|
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: [
|
|
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: () =>
|
|
21871
|
+
onSelect: () => z("__none__"),
|
|
21776
21872
|
children: "(Nenhum)"
|
|
21777
21873
|
}), n.availableProps.map((n) => /* @__PURE__ */ jsx(v$4, {
|
|
21778
|
-
onSelect: () =>
|
|
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: [
|
|
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: () =>
|
|
21895
|
+
onSelect: () => H("asc"),
|
|
21799
21896
|
children: "Crescente (A-Z)"
|
|
21800
21897
|
}), /* @__PURE__ */ jsx(v$4, {
|
|
21801
|
-
onSelect: () =>
|
|
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: [
|
|
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: () =>
|
|
21925
|
+
onSelect: () => W("top"),
|
|
21828
21926
|
children: "Topo (Início)"
|
|
21829
21927
|
}), /* @__PURE__ */ jsx(v$4, {
|
|
21830
|
-
onSelect: () =>
|
|
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: [
|
|
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: () =>
|
|
21951
|
+
onSelect: () => Az("down"),
|
|
21853
21952
|
children: "Descer (Padrão)"
|
|
21854
21953
|
}), /* @__PURE__ */ jsx(v$4, {
|
|
21855
|
-
onSelect: () =>
|
|
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:
|
|
21883
|
-
onChange: (n) =>
|
|
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:
|
|
21905
|
-
onChange: (n) =>
|
|
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: [
|
|
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: () =>
|
|
22042
|
+
onSelect: () => zz("none"),
|
|
21943
22043
|
children: "Nenhum"
|
|
21944
22044
|
}),
|
|
21945
22045
|
/* @__PURE__ */ jsx(v$4, {
|
|
21946
|
-
onSelect: () =>
|
|
22046
|
+
onSelect: () => zz("slideIn"),
|
|
21947
22047
|
children: "Slide (Padrão)"
|
|
21948
22048
|
}),
|
|
21949
22049
|
/* @__PURE__ */ jsx(v$4, {
|
|
21950
|
-
onSelect: () =>
|
|
22050
|
+
onSelect: () => zz("smoothSlideUp"),
|
|
21951
22051
|
children: "Slide Suave (Up)"
|
|
21952
22052
|
}),
|
|
21953
22053
|
/* @__PURE__ */ jsx(v$4, {
|
|
21954
|
-
onSelect: () =>
|
|
22054
|
+
onSelect: () => zz("fadeIn"),
|
|
21955
22055
|
children: "Fade In"
|
|
21956
22056
|
}),
|
|
21957
22057
|
/* @__PURE__ */ jsx(v$4, {
|
|
21958
|
-
onSelect: () =>
|
|
22058
|
+
onSelect: () => zz("popIn"),
|
|
21959
22059
|
children: "Pop In"
|
|
21960
22060
|
}),
|
|
21961
22061
|
/* @__PURE__ */ jsx(v$4, {
|
|
21962
|
-
onSelect: () =>
|
|
22062
|
+
onSelect: () => zz("blurIn"),
|
|
21963
22063
|
children: "Blur In"
|
|
21964
22064
|
}),
|
|
21965
22065
|
/* @__PURE__ */ jsx(v$4, {
|
|
21966
|
-
onSelect: () =>
|
|
22066
|
+
onSelect: () => zz("slideInLeft"),
|
|
21967
22067
|
children: "Slide (Esq)"
|
|
21968
22068
|
}),
|
|
21969
22069
|
/* @__PURE__ */ jsx(v$4, {
|
|
21970
|
-
onSelect: () =>
|
|
22070
|
+
onSelect: () => zz("slideInRight"),
|
|
21971
22071
|
children: "Slide (Dir)"
|
|
21972
22072
|
}),
|
|
21973
22073
|
/* @__PURE__ */ jsx(v$4, {
|
|
21974
|
-
onSelect: () =>
|
|
22074
|
+
onSelect: () => zz("zoomIn"),
|
|
21975
22075
|
children: "Zoom In"
|
|
21976
22076
|
}),
|
|
21977
22077
|
/* @__PURE__ */ jsx(v$4, {
|
|
21978
|
-
onSelect: () =>
|
|
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:
|
|
21993
|
-
onChange: (n) =>
|
|
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: [
|
|
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: () =>
|
|
22113
|
+
onSelect: () => Gz("ease"),
|
|
22013
22114
|
children: "Ease"
|
|
22014
22115
|
}),
|
|
22015
22116
|
/* @__PURE__ */ jsx(v$4, {
|
|
22016
|
-
onSelect: () =>
|
|
22117
|
+
onSelect: () => Gz("ease-out"),
|
|
22017
22118
|
children: "Ease Out"
|
|
22018
22119
|
}),
|
|
22019
22120
|
/* @__PURE__ */ jsx(v$4, {
|
|
22020
|
-
onSelect: () =>
|
|
22121
|
+
onSelect: () => Gz("linear"),
|
|
22021
22122
|
children: "Linear"
|
|
22022
22123
|
}),
|
|
22023
22124
|
/* @__PURE__ */ jsx(v$4, {
|
|
22024
|
-
onSelect: () =>
|
|
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:
|
|
22051
|
-
onChange: (n) =>
|
|
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,
|
|
24642
|
-
if (!
|
|
24643
|
-
let
|
|
24644
|
-
|
|
24645
|
-
},
|
|
24646
|
-
|
|
24647
|
-
...
|
|
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
|
-
},
|
|
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(
|
|
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:
|
|
24677
|
-
onClick: () =>
|
|
24678
|
-
title:
|
|
24679
|
-
children:
|
|
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:
|
|
24684
|
-
onClick: () =>
|
|
24685
|
-
title:
|
|
24686
|
-
children:
|
|
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:
|
|
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:
|
|
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
|
-
(
|
|
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:
|
|
24715
|
-
onChange: (n) =>
|
|
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
|
-
|
|
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: [
|
|
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: () =>
|
|
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: () =>
|
|
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:
|
|
24774
|
-
onChange: (n) =>
|
|
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
|
-
(
|
|
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:
|
|
24815
|
-
children:
|
|
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:
|
|
24820
|
-
onSelect: () =>
|
|
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: [
|
|
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: () =>
|
|
24931
|
+
onSelect: () => B({ fontWeight: "normal" }),
|
|
24843
24932
|
children: "Normal"
|
|
24844
24933
|
}),
|
|
24845
24934
|
/* @__PURE__ */ jsx(v$4, {
|
|
24846
24935
|
onSelect: () => {
|
|
24847
|
-
|
|
24936
|
+
B({ fontWeight: "bold" });
|
|
24848
24937
|
},
|
|
24849
24938
|
children: "Negrito"
|
|
24850
24939
|
}),
|
|
24851
24940
|
/* @__PURE__ */ jsx(v$4, {
|
|
24852
24941
|
onSelect: () => {
|
|
24853
|
-
|
|
24942
|
+
B({ fontWeight: "100" });
|
|
24854
24943
|
},
|
|
24855
24944
|
children: "Fina"
|
|
24856
24945
|
}),
|
|
24857
24946
|
/* @__PURE__ */ jsx(v$4, {
|
|
24858
24947
|
onSelect: () => {
|
|
24859
|
-
|
|
24948
|
+
B({ fontWeight: "300" });
|
|
24860
24949
|
},
|
|
24861
24950
|
children: "Leve"
|
|
24862
24951
|
}),
|
|
24863
24952
|
/* @__PURE__ */ jsx(v$4, {
|
|
24864
24953
|
onSelect: () => {
|
|
24865
|
-
|
|
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: [
|
|
24970
|
+
children: [U, "px"]
|
|
24882
24971
|
})]
|
|
24883
24972
|
}), /* @__PURE__ */ jsx(s, {
|
|
24884
24973
|
min: 8,
|
|
24885
24974
|
max: 72,
|
|
24886
|
-
value: [
|
|
24887
|
-
onValueChange: (n) =>
|
|
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:
|
|
24988
|
+
variant: H === "left" ? "solid" : "soft",
|
|
24900
24989
|
color: "gray",
|
|
24901
|
-
onClick: () =>
|
|
24990
|
+
onClick: () => B({ textAlign: "left" }),
|
|
24902
24991
|
children: /* @__PURE__ */ jsx(TextAlignLeftIcon, {})
|
|
24903
24992
|
}),
|
|
24904
24993
|
/* @__PURE__ */ jsx(o$2, {
|
|
24905
|
-
variant:
|
|
24994
|
+
variant: H === "center" ? "solid" : "soft",
|
|
24906
24995
|
color: "gray",
|
|
24907
|
-
onClick: () =>
|
|
24996
|
+
onClick: () => B({ textAlign: "center" }),
|
|
24908
24997
|
children: /* @__PURE__ */ jsx(TextAlignCenterIcon, {})
|
|
24909
24998
|
}),
|
|
24910
24999
|
/* @__PURE__ */ jsx(o$2, {
|
|
24911
|
-
variant:
|
|
25000
|
+
variant: H === "right" ? "solid" : "soft",
|
|
24912
25001
|
color: "gray",
|
|
24913
|
-
onClick: () =>
|
|
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:
|
|
25020
|
+
variant: P.style?.fontStyle === "italic" ? "solid" : "soft",
|
|
24932
25021
|
color: "gray",
|
|
24933
25022
|
onClick: (n) => {
|
|
24934
|
-
n.stopPropagation(),
|
|
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:
|
|
25029
|
+
variant: P.style?.textDecoration === "underline" ? "solid" : "soft",
|
|
24941
25030
|
color: "gray",
|
|
24942
25031
|
onClick: (n) => {
|
|
24943
|
-
n.stopPropagation(),
|
|
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:
|
|
25038
|
+
variant: P.style?.textDecoration === "line-through" ? "solid" : "soft",
|
|
24950
25039
|
color: "gray",
|
|
24951
25040
|
onClick: (n) => {
|
|
24952
|
-
n.stopPropagation(),
|
|
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: [(
|
|
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: () =>
|
|
25066
|
+
onSelect: () => B({ textTransform: "none" }),
|
|
24977
25067
|
children: "Nenhum"
|
|
24978
25068
|
}),
|
|
24979
25069
|
/* @__PURE__ */ jsx(v$4, {
|
|
24980
|
-
onSelect: () =>
|
|
25070
|
+
onSelect: () => B({ textTransform: "uppercase" }),
|
|
24981
25071
|
children: "MAIÚSCULA"
|
|
24982
25072
|
}),
|
|
24983
25073
|
/* @__PURE__ */ jsx(v$4, {
|
|
24984
|
-
onSelect: () =>
|
|
25074
|
+
onSelect: () => B({ textTransform: "lowercase" }),
|
|
24985
25075
|
children: "minúscula"
|
|
24986
25076
|
}),
|
|
24987
25077
|
/* @__PURE__ */ jsx(v$4, {
|
|
24988
|
-
onSelect: () =>
|
|
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:
|
|
25006
|
-
onChange: (n) =>
|
|
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:
|
|
25016
|
-
onChange: (n) =>
|
|
25105
|
+
value: P.style?.letterSpacing || "",
|
|
25106
|
+
onChange: (n) => B({ letterSpacing: n.target.value || "normal" })
|
|
25017
25107
|
})] })]
|
|
25018
25108
|
}),
|
|
25019
|
-
|
|
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: [(
|
|
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: () =>
|
|
25128
|
+
onSelect: () => B({ alignItems: "flex-start" }),
|
|
25038
25129
|
children: "Topo"
|
|
25039
25130
|
}),
|
|
25040
25131
|
/* @__PURE__ */ jsx(v$4, {
|
|
25041
|
-
onSelect: () =>
|
|
25132
|
+
onSelect: () => B({ alignItems: "center" }),
|
|
25042
25133
|
children: "Centro"
|
|
25043
25134
|
}),
|
|
25044
25135
|
/* @__PURE__ */ jsx(v$4, {
|
|
25045
|
-
onSelect: () =>
|
|
25136
|
+
onSelect: () => B({ alignItems: "flex-end" }),
|
|
25046
25137
|
children: "Base"
|
|
25047
25138
|
})
|
|
25048
25139
|
]
|
|
25049
25140
|
})] })] })
|
|
25050
25141
|
] }),
|
|
25051
|
-
|
|
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: [(
|
|
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: () =>
|
|
25161
|
+
onSelect: () => B({ objectFit: "cover" }),
|
|
25070
25162
|
children: "Cobrir (Cover)"
|
|
25071
25163
|
}),
|
|
25072
25164
|
/* @__PURE__ */ jsx(v$4, {
|
|
25073
|
-
onSelect: () =>
|
|
25165
|
+
onSelect: () => B({ objectFit: "contain" }),
|
|
25074
25166
|
children: "Conter (Contain)"
|
|
25075
25167
|
}),
|
|
25076
25168
|
/* @__PURE__ */ jsx(v$4, {
|
|
25077
|
-
onSelect: () =>
|
|
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:
|
|
25093
|
-
onChange: (n) =>
|
|
25094
|
-
})] }), (
|
|
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:
|
|
25102
|
-
onChange: (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: [
|
|
25206
|
+
children: [W, "px"]
|
|
25115
25207
|
})]
|
|
25116
25208
|
}), /* @__PURE__ */ jsx(s, {
|
|
25117
25209
|
min: 0,
|
|
25118
25210
|
max: 10,
|
|
25119
|
-
value: [
|
|
25120
|
-
onValueChange: (n) =>
|
|
25211
|
+
value: [W],
|
|
25212
|
+
onValueChange: (n) => B({
|
|
25121
25213
|
borderWidth: `${n[0]}px`,
|
|
25122
25214
|
borderStyle: n[0] > 0 ? "solid" : "none",
|
|
25123
|
-
borderColor:
|
|
25215
|
+
borderColor: P.style?.borderColor || "#000000"
|
|
25124
25216
|
})
|
|
25125
25217
|
})] }),
|
|
25126
|
-
|
|
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:
|
|
25134
|
-
onChange: (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: [
|
|
25237
|
+
children: [Z, "px"]
|
|
25146
25238
|
})]
|
|
25147
25239
|
}), /* @__PURE__ */ jsx(s, {
|
|
25148
25240
|
min: 0,
|
|
25149
25241
|
max: 50,
|
|
25150
|
-
value: [
|
|
25151
|
-
onValueChange: (n) =>
|
|
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: [
|
|
25254
|
+
children: [Az, "%"]
|
|
25163
25255
|
})]
|
|
25164
25256
|
}), /* @__PURE__ */ jsx(s, {
|
|
25165
25257
|
min: 0,
|
|
25166
25258
|
max: 100,
|
|
25167
|
-
value: [
|
|
25168
|
-
onValueChange: (n) =>
|
|
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: [
|
|
25271
|
+
children: [G, "px"]
|
|
25180
25272
|
})]
|
|
25181
25273
|
}), /* @__PURE__ */ jsx(s, {
|
|
25182
25274
|
min: 0,
|
|
25183
25275
|
max: 40,
|
|
25184
|
-
value: [
|
|
25185
|
-
onValueChange: (n) =>
|
|
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: () =>
|
|
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(
|
|
25210
|
-
}),
|
|
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:
|
|
25305
|
+
children: /* @__PURE__ */ jsx(AdvancedPropertiesPanel, { elementId: P.id })
|
|
25214
25306
|
})]
|
|
25215
25307
|
})
|
|
25216
25308
|
]
|
|
25217
|
-
},
|
|
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
|
|
25744
|
+
let { portalContainer: P } = useEditor(), [z, B] = useState(j), [H, U] = useState(null);
|
|
25653
25745
|
React.useEffect(() => {
|
|
25654
|
-
n && j &&
|
|
25746
|
+
n && j && B(j);
|
|
25655
25747
|
}, [n, j]);
|
|
25656
|
-
let
|
|
25657
|
-
|
|
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:
|
|
25770
|
+
current: z,
|
|
25678
25771
|
total: 3
|
|
25679
25772
|
})
|
|
25680
25773
|
})]
|
|
25681
25774
|
}), /* @__PURE__ */ jsxs(p, { children: [
|
|
25682
|
-
|
|
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:
|
|
25792
|
+
variant: H === n.id ? "surface" : "classic",
|
|
25700
25793
|
style: {
|
|
25701
25794
|
cursor: "pointer",
|
|
25702
|
-
border:
|
|
25703
|
-
backgroundColor:
|
|
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: () =>
|
|
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:
|
|
25835
|
+
variant: H === "blank" ? "surface" : "classic",
|
|
25743
25836
|
style: {
|
|
25744
25837
|
cursor: "pointer",
|
|
25745
|
-
border:
|
|
25746
|
-
backgroundColor:
|
|
25838
|
+
border: H === "blank" ? "2px solid var(--accent-9)" : void 0,
|
|
25839
|
+
backgroundColor: H === "blank" ? "var(--accent-2)" : void 0
|
|
25747
25840
|
},
|
|
25748
|
-
onClick: () =>
|
|
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:
|
|
25798
|
-
disabled: !
|
|
25890
|
+
onClick: W,
|
|
25891
|
+
disabled: !H,
|
|
25799
25892
|
children: ["Continuar ", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
|
|
25800
25893
|
})]
|
|
25801
25894
|
})
|
|
25802
25895
|
]
|
|
25803
25896
|
}),
|
|
25804
|
-
|
|
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: () =>
|
|
25976
|
+
onClick: () => B(1),
|
|
25884
25977
|
children: [/* @__PURE__ */ jsx(ArrowRightIcon, { style: { transform: "rotate(180deg)" } }), " Voltar"]
|
|
25885
25978
|
}), /* @__PURE__ */ jsxs(o, {
|
|
25886
|
-
onClick:
|
|
25979
|
+
onClick: W,
|
|
25887
25980
|
children: ["Começar a Editar ", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
|
|
25888
25981
|
})]
|
|
25889
25982
|
})
|
|
25890
25983
|
]
|
|
25891
25984
|
}),
|
|
25892
|
-
|
|
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:
|
|
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,
|
|
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
|
|
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(),
|
|
26029
|
-
else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(),
|
|
26030
|
-
else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(),
|
|
26031
|
-
else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(),
|
|
26032
|
-
else if (n.key === "Delete" || n.key === "Backspace") Vz.selectedElementIds.length > 0 && (n.preventDefault(),
|
|
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 &&
|
|
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
|
-
|
|
26156
|
+
Xz
|
|
26064
26157
|
]);
|
|
26065
|
-
let [
|
|
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
|
-
|
|
26166
|
+
eB(!0);
|
|
26074
26167
|
}, [n, Bz]), React.useEffect(() => {
|
|
26075
|
-
|
|
26076
|
-
}, [
|
|
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
|
|
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 && (
|
|
26194
|
+
n && (tB(n.state), jz.current = j);
|
|
26102
26195
|
}, [
|
|
26103
26196
|
j,
|
|
26104
|
-
|
|
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 && (
|
|
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 &&
|
|
26506
|
+
n && tB(n.state);
|
|
26413
26507
|
},
|
|
26414
26508
|
onStartTour: () => Rz(!0),
|
|
26415
26509
|
initialStep: Pz,
|
|
26416
26510
|
onFinishWizard: () => {
|
|
26417
|
-
|
|
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) => {
|