@threedddplus/logoeditor 0.0.7 → 0.0.8
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/components/middleMenu/middleMenu.d.ts +1 -3
- package/dist/components/myLogo/myLogo.d.ts +1 -3
- package/dist/index.d.ts +1 -5
- package/dist/logoeditor.cjs.development.js +509 -358
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +509 -358
- package/dist/logoeditor.esm.js.map +1 -1
- package/dist/store/fabric/index.d.ts +8 -0
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -6,6 +6,7 @@ import CryptoJS from 'crypto-js';
|
|
6
6
|
import { fabric } from 'fabric';
|
7
7
|
import AWS from 'aws-sdk';
|
8
8
|
import ImageTracer from 'imagetracerjs';
|
9
|
+
import { createRoot } from 'react-dom/client';
|
9
10
|
import { Button as Button$1, useTooltipState, TooltipReference, Tooltip, Input } from 'reakit';
|
10
11
|
import { IconContext } from 'react-icons';
|
11
12
|
import { IoMdCheckmarkCircle } from 'react-icons/io';
|
@@ -1021,6 +1022,8 @@ var historySlice = function historySlice(set, _get) {
|
|
1021
1022
|
|
1022
1023
|
var fabricSlice = function fabricSlice(set, get) {
|
1023
1024
|
return {
|
1025
|
+
popUpCanvasCount: 0,
|
1026
|
+
popupCanvasStoreHistory: [],
|
1024
1027
|
availableMascots: [],
|
1025
1028
|
filteredMascots: [],
|
1026
1029
|
logoData: null,
|
@@ -1071,12 +1074,13 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
1071
1074
|
forIconCapture: function forIconCapture() {
|
1072
1075
|
var activeObject = get().fabricCanvas.getActiveObject();
|
1073
1076
|
if (activeObject) {
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
});
|
1077
|
+
// const dataURL = get().fabricCanvas.toDataURL({
|
1078
|
+
// left: activeObject.left,
|
1079
|
+
// top: activeObject.top,
|
1080
|
+
// width: activeObject.width * activeObject.scaleX,
|
1081
|
+
// height: activeObject.height * activeObject.scaleY,
|
1082
|
+
// });
|
1083
|
+
var dataURL = activeObject.toDataURL('image/png');
|
1080
1084
|
set({
|
1081
1085
|
iconImage: dataURL
|
1082
1086
|
});
|
@@ -1341,7 +1345,51 @@ var fabricSlice = function fabricSlice(set, get) {
|
|
1341
1345
|
};
|
1342
1346
|
});
|
1343
1347
|
},
|
1344
|
-
popUpCanvasAllColor: []
|
1348
|
+
popUpCanvasAllColor: [],
|
1349
|
+
popUpCanvasApplyColorFill: function popUpCanvasApplyColorFill() {
|
1350
|
+
var popUpCanvasData = get().popupCanv.toJSON();
|
1351
|
+
var popUpCanvasGetobject = get().popupCanv.getObjects();
|
1352
|
+
popUpCanvasData.objects.forEach(function (element, index) {
|
1353
|
+
element.colorFill = popUpCanvasGetobject[index].colorFill;
|
1354
|
+
});
|
1355
|
+
console.log(popUpCanvasGetobject);
|
1356
|
+
return popUpCanvasData;
|
1357
|
+
},
|
1358
|
+
popUpCanvasUpdateModification: function popUpCanvasUpdateModification(toSet) {
|
1359
|
+
if (toSet) {
|
1360
|
+
var historyObject = {
|
1361
|
+
colorFill: get().colorFill,
|
1362
|
+
json: get().popUpCanvasApplyColorFill()
|
1363
|
+
};
|
1364
|
+
set(function (state) {
|
1365
|
+
return _extends({}, state, {
|
1366
|
+
popupCanvasStoreHistory: [].concat(state.popupCanvasStoreHistory, [historyObject])
|
1367
|
+
});
|
1368
|
+
});
|
1369
|
+
}
|
1370
|
+
},
|
1371
|
+
popUpCanvasUndo: function popUpCanvasUndo() {
|
1372
|
+
if (get().popUpCanvasCount < get().popupCanvasStoreHistory.length) {
|
1373
|
+
var _V = get().popupCanvasStoreHistory.length - 1 - get().popUpCanvasCount - 1;
|
1374
|
+
get().popupCanv.clear().renderAll();
|
1375
|
+
get().popupCanv.loadFromJSON(get().popupCanvasStoreHistory[_V].json);
|
1376
|
+
set({
|
1377
|
+
colorFill: get().popupCanvasStoreHistory[_V].colorFill
|
1378
|
+
});
|
1379
|
+
get().popupCanv.renderAll();
|
1380
|
+
get().popUpCanvasCount += 1;
|
1381
|
+
}
|
1382
|
+
},
|
1383
|
+
popUpCanvasRedo: function popUpCanvasRedo() {
|
1384
|
+
if (get().popUpCanvasCount > 0) {
|
1385
|
+
get().popupCanv.clear().renderAll();
|
1386
|
+
get().popupCanv.loadFromJSON(get().popupCanvasStoreHistory[get().popupCanvasStoreHistory.length - 1 - get().popUpCanvasCount + 1]);
|
1387
|
+
get().popupCanv.renderAll();
|
1388
|
+
get().popUpCanvasCount -= 1;
|
1389
|
+
}
|
1390
|
+
},
|
1391
|
+
forPopupCanvasReset: null,
|
1392
|
+
forPopupCanvasColor: {}
|
1345
1393
|
};
|
1346
1394
|
};
|
1347
1395
|
|
@@ -2040,7 +2088,78 @@ var converterSlice = function converterSlice(set, get) {
|
|
2040
2088
|
imageToSVG: function imageToSVG(data) {
|
2041
2089
|
use3dddPlus.setState({
|
2042
2090
|
uploadImageModalDisplay: true
|
2043
|
-
});
|
2091
|
+
});
|
2092
|
+
// ImageTracer.imageToSVG(
|
2093
|
+
// data,
|
2094
|
+
// function (svgstr) {
|
2095
|
+
// fabric.loadSVGFromString(
|
2096
|
+
// //@ts-ignore
|
2097
|
+
// new String(svgstr),
|
2098
|
+
// function (objects, options) {
|
2099
|
+
// let loadedObject = fabric.util.groupSVGElements(
|
2100
|
+
// objects,
|
2101
|
+
// options
|
2102
|
+
// );
|
2103
|
+
// // console.log("LOADEDOBJECT--->",data);
|
2104
|
+
// loadedObject.scaleToHeight(300);
|
2105
|
+
// loadedObject.scaleToWidth(300);
|
2106
|
+
// //@ts-ignore
|
2107
|
+
// let objImage = loadedObject._objects;
|
2108
|
+
// let _Fills = [];
|
2109
|
+
// objImage.forEach((ele) => {
|
2110
|
+
// ele.set({ strokeWidth: 0 });
|
2111
|
+
// set({ fillColor: [...ele.fill] });
|
2112
|
+
// let _C = get().RGBToHex(ele.fill);
|
2113
|
+
// _Fills.push(_C);
|
2114
|
+
// });
|
2115
|
+
// //@ts-ignore
|
2116
|
+
// set({ fillColor: get().removeDuplicates(_Fills) });
|
2117
|
+
// //@ts-ignore
|
2118
|
+
// _Fills = get().removeDuplicates(_Fills);
|
2119
|
+
// const fillColors = {};
|
2120
|
+
// _Fills.map((item, index) => {
|
2121
|
+
// fillColors['layer' + index] = item;
|
2122
|
+
// });
|
2123
|
+
// use3dddPlus.setState({ colorFill: fillColors });
|
2124
|
+
// //FOR POPUP CANVAS
|
2125
|
+
// loadedObject.set({
|
2126
|
+
// //@ts-ignore
|
2127
|
+
// colorFill: fillColors,
|
2128
|
+
// hasControls: false,
|
2129
|
+
// hasBorders: false,
|
2130
|
+
// lockMovementX: true,
|
2131
|
+
// lockMovementY: true,
|
2132
|
+
// });
|
2133
|
+
// // for main canvas use this
|
2134
|
+
// console.log('fillColors-->', fillColors);
|
2135
|
+
// loadedObject.set({
|
2136
|
+
// colorFill: fillColors,
|
2137
|
+
// //@ts-ignore
|
2138
|
+
// setControlVisible: false,
|
2139
|
+
// });
|
2140
|
+
// //-------- use CANVAS INSTEAD OF POPCANVAS--------
|
2141
|
+
// use3dddPlus.getState().popupCanv.add(loadedObject).renderAll();
|
2142
|
+
// use3dddPlus.getState().popupCanv.centerObject(loadedObject);
|
2143
|
+
// let _U = use3dddPlus.getState().popupCanv.toJSON();
|
2144
|
+
// const _G = use3dddPlus.getState().popupCanv.getObjects();
|
2145
|
+
// _U.objects.forEach((element, index) => {
|
2146
|
+
// element.colorFill = _G[index].colorFill;
|
2147
|
+
// });
|
2148
|
+
// use3dddPlus.setState({
|
2149
|
+
// forPopupCanvasReset: JSON.stringify(_U),
|
2150
|
+
// forPopupCanvasColor: { ...fillColors },
|
2151
|
+
// });
|
2152
|
+
// // popupCanvas.setActiveObject(loadedObject);
|
2153
|
+
// // use3dddPlus.setState({activeSelection: loadedObject});
|
2154
|
+
// // loadedObject.setControlVisible("mtr", false);
|
2155
|
+
// // use3dddPlus.getState().forStoringAllObject(loadedObject);//for pushing the data into array for layers
|
2156
|
+
// }
|
2157
|
+
// );
|
2158
|
+
// },
|
2159
|
+
// // options
|
2160
|
+
// //@ts-ignore
|
2161
|
+
// optionpresets.default
|
2162
|
+
// );// FOR POPUP CANVAS VISIBLE
|
2044
2163
|
ImageTracer.imageToSVG(data, function (svgstr) {
|
2045
2164
|
fabric.loadSVGFromString(
|
2046
2165
|
//@ts-ignore
|
@@ -4263,12 +4382,13 @@ var Initpopup = function Initpopup() {
|
|
4263
4382
|
var PopUpCanvas = function PopUpCanvas() {
|
4264
4383
|
var _Object$keys;
|
4265
4384
|
var _use3dddPlus = use3dddPlus(function (state) {
|
4266
|
-
return [state.popupCanv, state.fabricCanvas, state.colorFill, state.changeSVGColor];
|
4385
|
+
return [state.popupCanv, state.fabricCanvas, state.colorFill, state.changeSVGColor, state.popUpCanvasUndo];
|
4267
4386
|
}, shallow),
|
4268
4387
|
popupCanvas = _use3dddPlus[0],
|
4269
4388
|
canvas = _use3dddPlus[1],
|
4270
4389
|
colorFill = _use3dddPlus[2],
|
4271
|
-
changeSVGColor = _use3dddPlus[3]
|
4390
|
+
changeSVGColor = _use3dddPlus[3],
|
4391
|
+
popUpCanvasUndo = _use3dddPlus[4];
|
4272
4392
|
var _useState = useState(3),
|
4273
4393
|
colorCount = _useState[0],
|
4274
4394
|
setColorCount = _useState[1];
|
@@ -4347,6 +4467,23 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
4347
4467
|
popupCanvas.getActiveObject().clone(function (cloned) {
|
4348
4468
|
clipboard = cloned;
|
4349
4469
|
});
|
4470
|
+
// if (clipboard.type === 'activeSelection') {
|
4471
|
+
// clipboard.canvas = canvas;
|
4472
|
+
// const objs = [];
|
4473
|
+
// clipboard.forEachObject(function (obj) {
|
4474
|
+
// objs.push(obj);
|
4475
|
+
// });
|
4476
|
+
// const alltogetherObj = new fabric.Group(objs, {});
|
4477
|
+
// canvas.centerObject(alltogetherObj);
|
4478
|
+
// canvas.add(alltogetherObj);
|
4479
|
+
// canvas.setActiveObject(alltogetherObj);
|
4480
|
+
// alltogetherObj.setCoords();
|
4481
|
+
// use3dddPlus.getState().forStoringAllObject(alltogetherObj); //for pushing the data into array for layers
|
4482
|
+
// } else {
|
4483
|
+
// canvas.add(clipboard);
|
4484
|
+
// }
|
4485
|
+
// canvas.requestRenderAll();
|
4486
|
+
// popupCanvas.clear();
|
4350
4487
|
if (clipboard.type === 'activeSelection') {
|
4351
4488
|
clipboard.canvas = canvas;
|
4352
4489
|
var objs = [];
|
@@ -4357,13 +4494,33 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
4357
4494
|
canvas.centerObject(alltogetherObj);
|
4358
4495
|
canvas.add(alltogetherObj);
|
4359
4496
|
canvas.setActiveObject(alltogetherObj);
|
4497
|
+
alltogetherObj.set({
|
4498
|
+
//@ts-ignore
|
4499
|
+
colorFill: use3dddPlus.getState().colorFill
|
4500
|
+
});
|
4360
4501
|
alltogetherObj.setCoords();
|
4361
4502
|
use3dddPlus.getState().forStoringAllObject(alltogetherObj); //for pushing the data into array for layers
|
4503
|
+
use3dddPlus.getState().forIconCapture();
|
4504
|
+
//@ts-ignore
|
4505
|
+
alltogetherObj.icon = use3dddPlus.getState().iconImage;
|
4362
4506
|
} else {
|
4363
4507
|
canvas.add(clipboard);
|
4364
4508
|
}
|
4365
4509
|
canvas.requestRenderAll();
|
4366
4510
|
popupCanvas.clear();
|
4511
|
+
use3dddPlus.setState({
|
4512
|
+
popupCanvasStoreHistory: []
|
4513
|
+
});
|
4514
|
+
};
|
4515
|
+
var resetHandler = function resetHandler() {
|
4516
|
+
console.log(use3dddPlus.getState().forPopupCanvasReset);
|
4517
|
+
popupCanvas.clear();
|
4518
|
+
popupCanvas.loadFromJSON(use3dddPlus.getState().forPopupCanvasReset, function () {
|
4519
|
+
use3dddPlus.setState({
|
4520
|
+
colorFill: _extends({}, use3dddPlus.getState().forPopupCanvasColor)
|
4521
|
+
});
|
4522
|
+
popupCanvas.renderAll();
|
4523
|
+
});
|
4367
4524
|
};
|
4368
4525
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
4369
4526
|
className: "flex z-10 overflow-y-auto"
|
@@ -4387,7 +4544,8 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
4387
4544
|
})), React.createElement("div", {
|
4388
4545
|
className: "btnCont absolute flex flex-wrap top-0 right-0 p-10"
|
4389
4546
|
}, React.createElement("div", {
|
4390
|
-
className: "undoBtn cursor-pointer mr-4"
|
4547
|
+
className: "undoBtn cursor-pointer mr-4",
|
4548
|
+
onClick: popUpCanvasUndo
|
4391
4549
|
}, React.createElement("div", {
|
4392
4550
|
className: "undoIcon float-left"
|
4393
4551
|
}, React.createElement("svg", {
|
@@ -4402,7 +4560,8 @@ var PopUpCanvas = function PopUpCanvas() {
|
|
4402
4560
|
}))), React.createElement("span", {
|
4403
4561
|
className: "iconLabel float-left text-[#727272] ml-2 text-[13px] font-bold "
|
4404
4562
|
}, "Undo")), React.createElement("div", {
|
4405
|
-
className: "resetBtn cursor-pointer"
|
4563
|
+
className: "resetBtn cursor-pointer",
|
4564
|
+
onClick: resetHandler
|
4406
4565
|
}, React.createElement("div", {
|
4407
4566
|
className: "resetBtn float-left"
|
4408
4567
|
}, React.createElement("svg", {
|
@@ -4797,8 +4956,7 @@ var Loader = function Loader(_ref) {
|
|
4797
4956
|
}));
|
4798
4957
|
};
|
4799
4958
|
|
4800
|
-
var MyLogo$1 = function MyLogo(
|
4801
|
-
var onApply = _ref.onApply;
|
4959
|
+
var MyLogo$1 = function MyLogo() {
|
4802
4960
|
var _React$useState = React.useState(),
|
4803
4961
|
logoSelected = _React$useState[0],
|
4804
4962
|
setLogoSelected = _React$useState[1];
|
@@ -4823,12 +4981,7 @@ var MyLogo$1 = function MyLogo(_ref) {
|
|
4823
4981
|
};
|
4824
4982
|
|
4825
4983
|
var handleApplyLogo = function handleApplyLogo(logo) {
|
4826
|
-
if (logo) {
|
4827
|
-
onApply();
|
4828
|
-
// setLogoSelected(logo);
|
4829
|
-
}
|
4830
4984
|
};
|
4831
|
-
|
4832
4985
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
4833
4986
|
className: "bg-[#F7F7F7] absolute z-100 w-[90%] h-full pr-[56px]"
|
4834
4987
|
}, React.createElement("div", {
|
@@ -4889,7 +5042,7 @@ var MyLogo$1 = function MyLogo(_ref) {
|
|
4889
5042
|
}
|
4890
5043
|
}, "Edit"), React.createElement("button", {
|
4891
5044
|
onClick: function onClick() {
|
4892
|
-
return handleApplyLogo(
|
5045
|
+
return handleApplyLogo();
|
4893
5046
|
},
|
4894
5047
|
className: "border p-3 w-[160px] " + (logoSelected ? 'border-[#e11a38] text-[#e11a38]' : 'bg-[black] text-white font-bold')
|
4895
5048
|
}, "Apply"))), loading && React.createElement(Loader, null));
|
@@ -5146,6 +5299,13 @@ var Rightmenu = function Rightmenu() {
|
|
5146
5299
|
textInfo: activeSelection.text
|
5147
5300
|
});
|
5148
5301
|
}, [activeSelection]);
|
5302
|
+
useEffect(function () {
|
5303
|
+
if (currentSelection === 'text' || currentSelection === 'group' || currentSelection === 'selectAll' || currentSelection === 'none') {
|
5304
|
+
setActiveTab(1);
|
5305
|
+
} else if (currentSelection === 'layer') {
|
5306
|
+
setActiveTab(2);
|
5307
|
+
}
|
5308
|
+
}, [currentSelection]);
|
5149
5309
|
var onTextChange = function onTextChange(e) {
|
5150
5310
|
var lines = e.target.value.split('\n');
|
5151
5311
|
lines.length == 1 ? setTextAlignDisplay(false) : setTextAlignDisplay(true);
|
@@ -5419,322 +5579,332 @@ var Rightmenu = function Rightmenu() {
|
|
5419
5579
|
key: tab.id,
|
5420
5580
|
className: (activeTab === tab.id ? 'bg-[#E11A38] text-white' : 'bg-[#fff] text-gray-800') + " py-[10px] px-[40px] focus:outline-none uppercase text-[13px] font-bold",
|
5421
5581
|
onClick: function onClick() {
|
5422
|
-
|
5582
|
+
setActiveTab(tab.id);
|
5583
|
+
if (tab.id === 1) {
|
5584
|
+
use3dddPlus.setState({
|
5585
|
+
currentSelection: 'none'
|
5586
|
+
});
|
5587
|
+
canvas.discardActiveObject();
|
5588
|
+
canvas.renderAll();
|
5589
|
+
}
|
5590
|
+
if (tab.id === 2) {
|
5591
|
+
use3dddPlus.setState({
|
5592
|
+
currentSelection: 'layer'
|
5593
|
+
});
|
5594
|
+
}
|
5423
5595
|
}
|
5424
5596
|
}, tab.label);
|
5425
5597
|
})), React.createElement("div", {
|
5426
5598
|
className: "bg-gray-100 p-4"
|
5427
|
-
},
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5431
|
-
|
5432
|
-
|
5433
|
-
|
5599
|
+
}, activeTab === 1 && React.createElement("div", {
|
5600
|
+
key: activeTab
|
5601
|
+
}, React.createElement("div", {
|
5602
|
+
className: "h-[50vh] sm:h-[55vh] 2xl:h-[60vh] overflow-y-auto overflow-x-hidden"
|
5603
|
+
}, currentSelection === 'text' && React.createElement("div", {
|
5604
|
+
className: " "
|
5605
|
+
}, React.createElement("div", {
|
5606
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5607
|
+
}, "Enter Text"), React.createElement("textarea", {
|
5608
|
+
value: textInfo,
|
5609
|
+
onChange: onTextChange,
|
5610
|
+
className: "w-[100%] border border-solid-[1px] border-[#9A9A9A] py-[10px] pl-[16px] mb-[16.5px]",
|
5611
|
+
placeholder: "LOGO TEXT"
|
5612
|
+
}), React.createElement("div", {
|
5613
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5614
|
+
}, "Select Font"), React.createElement("select", {
|
5615
|
+
name: "FontStyleNumber",
|
5616
|
+
id: "FontStyleNumber",
|
5617
|
+
onChange: fontChange,
|
5618
|
+
className: INPUT_BG_COLOR + " font-bold " + TEXT_COLOR_1 + " " + TEXT_SIZE_3 + " border border-solid\t " + BORDER_COLOR_1 + " select select-bordered w-full rounded-none focus:outline-current focus:outline-offset-0 focus:rounded-sm mb-[16.5px]"
|
5619
|
+
}, fontFamilies.map(function (list) {
|
5620
|
+
return React.createElement(React.Fragment, null, React.createElement("option", {
|
5621
|
+
value: list.name
|
5622
|
+
}, list.name));
|
5623
|
+
})), React.createElement("div", {
|
5624
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5625
|
+
}, "TEXT SIZE"), React.createElement("input", {
|
5626
|
+
type: "range",
|
5627
|
+
value: sliderValue,
|
5628
|
+
onChange: handleSliderChange,
|
5629
|
+
className: " rangeSlider w-full mb-[16.5px]",
|
5630
|
+
id: "slider",
|
5631
|
+
style: {
|
5632
|
+
background: "linear-gradient(to right, #e11a38 0%, #e11a38 " + sliderValue + "%, #fff " + sliderValue + "%, #fff 100%)"
|
5633
|
+
}
|
5634
|
+
}), React.createElement("div", {
|
5635
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5636
|
+
}, "Style"), React.createElement("div", {
|
5637
|
+
className: "flex gap-x-[15px] mb-[16.5px]"
|
5638
|
+
}, ' ', React.createElement("button", {
|
5639
|
+
className: fontStyle.bold ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border font-bold border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] font-bold text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5640
|
+
onClick: function onClick(e) {
|
5641
|
+
return textStyle(e, 'fontWeight', 'bold');
|
5642
|
+
},
|
5643
|
+
id: "bold"
|
5644
|
+
}, "B"), React.createElement("button", {
|
5645
|
+
className: fontStyle.italic ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border italic border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] italic text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5646
|
+
onClick: function onClick(e) {
|
5647
|
+
return textStyle(e, 'fontStyle', 'italic');
|
5648
|
+
},
|
5649
|
+
id: "italic"
|
5650
|
+
}, "I"), React.createElement("button", {
|
5651
|
+
className: fontStyle.underline ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border underline border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] underline text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5652
|
+
onClick: function onClick(e) {
|
5653
|
+
return textStyle(e, 'underline', !fontStyle.underline);
|
5654
|
+
},
|
5655
|
+
id: "underline"
|
5656
|
+
}, "U")), textAlignDisplay === true && React.createElement("div", {
|
5657
|
+
className: "textAlign"
|
5658
|
+
}, React.createElement("div", {
|
5659
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5660
|
+
}, "Align"), React.createElement("div", {
|
5661
|
+
className: "flex gap-x-[15px] mb-[16.5px]"
|
5662
|
+
}, React.createElement("button", {
|
5663
|
+
type: "button",
|
5664
|
+
className: 'left' === activeButton ? SELECT_BG_COLOR + " text-[#fff] cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5665
|
+
id: "left",
|
5666
|
+
onClick: textAlignHandler
|
5667
|
+
}, React.createElement(FiAlignLeft, {
|
5668
|
+
id: "left",
|
5669
|
+
onClick: textAlignHandler
|
5670
|
+
})), React.createElement("button", {
|
5671
|
+
type: "button",
|
5672
|
+
className: 'center' === activeButton ? SELECT_BG_COLOR + " text-[#fff] cursor-pointer border border-[#EBEBEB] y-[7px] px-[39px] " : 'bg-[#fff] cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5673
|
+
id: "center",
|
5674
|
+
onClick: textAlignHandler
|
5675
|
+
}, React.createElement(FiAlignCenter, {
|
5676
|
+
id: "center",
|
5677
|
+
onClick: textAlignHandler
|
5678
|
+
})), React.createElement("button", {
|
5679
|
+
type: "button",
|
5680
|
+
className: 'right' === activeButton ? SELECT_BG_COLOR + " text-[#fff] cursor-pointer border border-[#EBEBEB] y-[7px] px-[39px] " : 'bg-[#fff] cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5681
|
+
id: "right",
|
5682
|
+
onClick: textAlignHandler
|
5683
|
+
}, React.createElement(FiAlignRight, {
|
5684
|
+
id: "right",
|
5685
|
+
onClick: textAlignHandler
|
5686
|
+
})))), React.createElement("div", {
|
5687
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5688
|
+
}, "Text Color"), React.createElement("div", {
|
5689
|
+
className: "relative"
|
5690
|
+
}, React.createElement(ColorImpl, {
|
5691
|
+
mClass: 'ml-0',
|
5692
|
+
handleChange: textColorChange,
|
5693
|
+
property: 'backgroundColor',
|
5694
|
+
name: 'backgroundColor',
|
5695
|
+
color: activeSelection.fill
|
5696
|
+
})), React.createElement("div", {
|
5697
|
+
className: "flex gap-2 mt-4"
|
5698
|
+
}, React.createElement("div", null, React.createElement("div", {
|
5699
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5700
|
+
}, "Outline Size"), React.createElement("input", {
|
5701
|
+
type: "number",
|
5702
|
+
id: "outlineSize",
|
5703
|
+
name: "outlineSize",
|
5704
|
+
step: "0.2",
|
5705
|
+
value: outlineVal,
|
5706
|
+
className: "border border-[#EBEBEB] py-[10px] pl-[16px] mb-[16.5px] w-[145px]",
|
5707
|
+
onChange: textOutlineHandler
|
5708
|
+
})), React.createElement("div", null, React.createElement("div", {
|
5709
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5710
|
+
}, "Outline Color"), React.createElement("div", {
|
5711
|
+
className: "relative"
|
5712
|
+
}, ' ', React.createElement(ColorImpl, {
|
5713
|
+
mClass: 'ml-0',
|
5714
|
+
handleChange: strokeColorChange,
|
5715
|
+
property: 'backgroundColor',
|
5716
|
+
name: 'backgroundColor',
|
5717
|
+
color: activeSelection.stroke
|
5718
|
+
})))), React.createElement("div", {
|
5719
|
+
className: "flex gap-2"
|
5720
|
+
}, React.createElement("div", null, React.createElement("div", {
|
5721
|
+
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5722
|
+
}, "Letter Spacing"), React.createElement("input", {
|
5723
|
+
type: "number",
|
5724
|
+
id: "spacing",
|
5725
|
+
name: "spacing",
|
5726
|
+
step: "10",
|
5727
|
+
value: spacingVal,
|
5728
|
+
className: "border border-[#EBEBEB] py-[10px] pl-[16px] mb-[16.5px] w-[145px]",
|
5729
|
+
onChange: textSpacingHandler
|
5730
|
+
})))), currentSelection === 'group' && React.createElement(ImageEdit, {
|
5731
|
+
flipX: flipX,
|
5732
|
+
flipY: flipY,
|
5733
|
+
changeSVGColor: changeSVGColor,
|
5734
|
+
// nudgeMove={nudgeMove}
|
5735
|
+
activeSelection: activeSelection
|
5736
|
+
}), currentSelection === 'selectAll' && React.createElement(React.Fragment, null, React.createElement("div", {
|
5737
|
+
className: "uppercase font-bold pt-[17px]"
|
5738
|
+
}, "Color in Canvas"), React.createElement("div", {
|
5739
|
+
className: "flex gap-x-[1rem] mt-[12px] mb-[12px]"
|
5740
|
+
}, allColor == null ? void 0 : allColor.map(function (item) {
|
5741
|
+
return React.createElement(ColorImpl, {
|
5742
|
+
mClass: 'ml-[36px]',
|
5743
|
+
key: item,
|
5744
|
+
handleChange: changeSVGTextColor,
|
5745
|
+
property: item,
|
5746
|
+
color: item
|
5747
|
+
});
|
5748
|
+
})), React.createElement("button", {
|
5749
|
+
onClick: nudgeMove,
|
5750
|
+
id: "down",
|
5751
|
+
className: "font-medium text-orange-400"
|
5752
|
+
}, "DOWN"), React.createElement("button", {
|
5753
|
+
onClick: nudgeMove,
|
5754
|
+
id: "up",
|
5755
|
+
className: "font-medium text-orange-300 text-lime-400 px-1"
|
5756
|
+
}, "UP"), React.createElement("button", {
|
5757
|
+
onClick: nudgeMove,
|
5758
|
+
id: "left",
|
5759
|
+
className: "font-medium text-orange-300 text-teal-500"
|
5760
|
+
}, "LEFT"), React.createElement("button", {
|
5761
|
+
onClick: nudgeMove,
|
5762
|
+
id: "right",
|
5763
|
+
className: "font-medium text-orange-300 text-violet-600 px-1"
|
5764
|
+
}, "RIGHT"),
|
5765
|
+
// console.log(storeAllObject);
|
5766
|
+
storeAllObject.map(function (item, index) {
|
5767
|
+
return React.createElement("div", {
|
5768
|
+
className: "innerLayer bg-slate-300 my-1"
|
5769
|
+
}, React.createElement("img", {
|
5770
|
+
className: "rounded-lg w-14 h-8",
|
5771
|
+
src: item ? item['icon'] : ''
|
5772
|
+
}), React.createElement("button", {
|
5773
|
+
className: "up mx-1 px-2 border-solid border-2 border-slate-500 ",
|
5774
|
+
onClick: function onClick() {
|
5775
|
+
return layerHandle(item, index, 'plus');
|
5776
|
+
}
|
5777
|
+
}, "UP"), React.createElement("button", {
|
5778
|
+
className: "down mx-1 px-2 border-solid border-2 border-slate-500",
|
5779
|
+
onClick: function onClick() {
|
5780
|
+
return layerHandle(item, index, 'minus');
|
5781
|
+
}
|
5782
|
+
}, "DOWN"), React.createElement("button", {
|
5783
|
+
className: "close mx-1 px-2 border-solid border-2 border-slate-500",
|
5784
|
+
onClick: function onClick() {
|
5785
|
+
return deleteElement(item);
|
5786
|
+
}
|
5787
|
+
}, "DELETE"));
|
5788
|
+
})), currentSelection === 'none' && React.createElement(React.Fragment, null, React.createElement("div", {
|
5789
|
+
className: "uppercase font-bold pt-[17px]"
|
5790
|
+
}, "Color in Canvas"), React.createElement("div", {
|
5791
|
+
className: "flex gap-x-[1rem] mt-[12px]"
|
5792
|
+
}, allColor == null ? void 0 : allColor.map(function (item) {
|
5793
|
+
return React.createElement(ColorImpl, {
|
5794
|
+
mClass: 'ml-[36px]',
|
5795
|
+
key: item,
|
5796
|
+
handleChange: changeSVGTextColor,
|
5797
|
+
property: item,
|
5798
|
+
color: item
|
5799
|
+
});
|
5800
|
+
})))), React.createElement("button", {
|
5801
|
+
type: "button",
|
5802
|
+
className: "mt-3 inline-flex justify-center bg-white px-[110px] py-2 text-sm font-medium text-[#E11A38] shadow-sm ring-1 ring-inset ring-[#E11A38] hover:bg-gray-50 sm:mt-0 w-full",
|
5803
|
+
onClick: onSave
|
5804
|
+
}, "Save")), activeTab === 2 && React.createElement("div", {
|
5805
|
+
key: activeTab
|
5806
|
+
}, currentSelection === 'layer' && React.createElement("div", {
|
5807
|
+
className: ""
|
5808
|
+
}, storeAllObject.map(function (item, index) {
|
5809
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
5810
|
+
className: "innerLayer border border-[#D7D7D7] my-[16px] h-[80px] flex justify-between"
|
5434
5811
|
}, React.createElement("div", {
|
5435
|
-
className: "
|
5436
|
-
},
|
5437
|
-
|
5438
|
-
|
5439
|
-
className: "w-[100%] border border-solid-[1px] border-[#9A9A9A] py-[10px] pl-[16px] mb-[16.5px]",
|
5440
|
-
placeholder: "LOGO TEXT"
|
5441
|
-
}), React.createElement("div", {
|
5442
|
-
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5443
|
-
}, "Select Font"), React.createElement("select", {
|
5444
|
-
name: "FontStyleNumber",
|
5445
|
-
id: "FontStyleNumber",
|
5446
|
-
onChange: fontChange,
|
5447
|
-
className: INPUT_BG_COLOR + " font-bold " + TEXT_COLOR_1 + " " + TEXT_SIZE_3 + " border border-solid\t " + BORDER_COLOR_1 + " select select-bordered w-full rounded-none focus:outline-current focus:outline-offset-0 focus:rounded-sm mb-[16.5px]"
|
5448
|
-
}, fontFamilies.map(function (list) {
|
5449
|
-
return React.createElement(React.Fragment, null, React.createElement("option", {
|
5450
|
-
value: list.name
|
5451
|
-
}, list.name));
|
5812
|
+
className: "imgBox border border-r-[#D7D7D7] bg-slate-200 flex w-[80px]"
|
5813
|
+
}, React.createElement("img", {
|
5814
|
+
className: "rounded-lg w-14 h-8",
|
5815
|
+
src: item ? item['icon'] : ''
|
5452
5816
|
})), React.createElement("div", {
|
5453
|
-
className: "
|
5454
|
-
},
|
5455
|
-
|
5456
|
-
|
5457
|
-
onChange: handleSliderChange,
|
5458
|
-
className: " rangeSlider w-full mb-[16.5px]",
|
5459
|
-
id: "slider",
|
5460
|
-
style: {
|
5461
|
-
background: "linear-gradient(to right, #e11a38 0%, #e11a38 " + sliderValue + "%, #fff " + sliderValue + "%, #fff 100%)"
|
5462
|
-
}
|
5463
|
-
}), React.createElement("div", {
|
5464
|
-
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5465
|
-
}, "Style"), React.createElement("div", {
|
5466
|
-
className: "flex gap-x-[15px] mb-[16.5px]"
|
5467
|
-
}, ' ', React.createElement("button", {
|
5468
|
-
className: fontStyle.bold ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border font-bold border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] font-bold text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5469
|
-
onClick: function onClick(e) {
|
5470
|
-
return textStyle(e, 'fontWeight', 'bold');
|
5471
|
-
},
|
5472
|
-
id: "bold"
|
5473
|
-
}, "B"), React.createElement("button", {
|
5474
|
-
className: fontStyle.italic ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border italic border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] italic text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5475
|
-
onClick: function onClick(e) {
|
5476
|
-
return textStyle(e, 'fontStyle', 'italic');
|
5477
|
-
},
|
5478
|
-
id: "italic"
|
5479
|
-
}, "I"), React.createElement("button", {
|
5480
|
-
className: fontStyle.underline ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border underline border-[#EBEBEB] py-[7px] px-[39px] " : 'bg-[#fff] underline text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[39px]',
|
5481
|
-
onClick: function onClick(e) {
|
5482
|
-
return textStyle(e, 'underline', !fontStyle.underline);
|
5817
|
+
className: "delBtnBox flex-auto "
|
5818
|
+
}, React.createElement("button", {
|
5819
|
+
onClick: function onClick() {
|
5820
|
+
return deleteElement(item);
|
5483
5821
|
},
|
5484
|
-
|
5485
|
-
},
|
5486
|
-
className: "
|
5822
|
+
className: "h-full w-full"
|
5823
|
+
}, React.createElement("div", {
|
5824
|
+
className: "delBtn pointer-events-none flex justify-center "
|
5487
5825
|
}, React.createElement("div", {
|
5488
|
-
className: "
|
5489
|
-
},
|
5490
|
-
|
5826
|
+
className: "upIcon m-auto"
|
5827
|
+
}, React.createElement("svg", {
|
5828
|
+
width: "25px",
|
5829
|
+
height: "25px",
|
5830
|
+
viewBox: "0 0 24 24",
|
5831
|
+
fill: "none",
|
5832
|
+
xmlns: "http://www.w3.org/2000/svg"
|
5833
|
+
}, React.createElement("path", {
|
5834
|
+
d: "M10 11V17",
|
5835
|
+
stroke: "#9a9a9a",
|
5836
|
+
"stroke-width": "2",
|
5837
|
+
"stroke-linecap": "round",
|
5838
|
+
"stroke-linejoin": "round"
|
5839
|
+
}), React.createElement("path", {
|
5840
|
+
d: "M14 11V17",
|
5841
|
+
stroke: "#9a9a9a",
|
5842
|
+
"stroke-width": "2",
|
5843
|
+
"stroke-linecap": "round",
|
5844
|
+
"stroke-linejoin": "round"
|
5845
|
+
}), React.createElement("path", {
|
5846
|
+
d: "M4 7H20",
|
5847
|
+
stroke: "#9a9a9a",
|
5848
|
+
"stroke-width": "2",
|
5849
|
+
"stroke-linecap": "round",
|
5850
|
+
"stroke-linejoin": "round"
|
5851
|
+
}), React.createElement("path", {
|
5852
|
+
d: "M6 7H12H18V18C18 19.6569 16.6569 21 15 21H9C7.34315 21 6 19.6569 6 18V7Z",
|
5853
|
+
stroke: "#9a9a9a",
|
5854
|
+
"stroke-width": "2",
|
5855
|
+
"stroke-linecap": "round",
|
5856
|
+
"stroke-linejoin": "round"
|
5857
|
+
}), React.createElement("path", {
|
5858
|
+
d: "M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z",
|
5859
|
+
stroke: "#9a9a9a",
|
5860
|
+
"stroke-width": "2",
|
5861
|
+
"stroke-linecap": "round",
|
5862
|
+
"stroke-linejoin": "round"
|
5863
|
+
})))))), React.createElement("div", {
|
5864
|
+
className: "delBox flex flex-col w-[40px] justify-between items-stretch"
|
5491
5865
|
}, React.createElement("button", {
|
5492
|
-
|
5493
|
-
|
5494
|
-
|
5495
|
-
|
5496
|
-
|
5497
|
-
|
5498
|
-
|
5499
|
-
}
|
5500
|
-
|
5501
|
-
|
5502
|
-
|
5503
|
-
|
5504
|
-
|
5505
|
-
|
5506
|
-
|
5507
|
-
}
|
5508
|
-
|
5509
|
-
|
5510
|
-
|
5511
|
-
|
5512
|
-
|
5513
|
-
|
5514
|
-
|
5515
|
-
}
|
5516
|
-
className: "
|
5517
|
-
},
|
5518
|
-
className: "
|
5519
|
-
}, React.createElement(
|
5520
|
-
|
5521
|
-
|
5522
|
-
|
5523
|
-
|
5524
|
-
|
5525
|
-
|
5526
|
-
|
5527
|
-
|
5528
|
-
|
5529
|
-
|
5530
|
-
|
5531
|
-
|
5532
|
-
|
5533
|
-
|
5534
|
-
value: outlineVal,
|
5535
|
-
className: "border border-[#EBEBEB] py-[10px] pl-[16px] mb-[16.5px] w-[145px]",
|
5536
|
-
onChange: textOutlineHandler
|
5537
|
-
})), React.createElement("div", null, React.createElement("div", {
|
5538
|
-
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5539
|
-
}, "Outline Color"), React.createElement("div", {
|
5540
|
-
className: "relative"
|
5541
|
-
}, ' ', React.createElement(ColorImpl, {
|
5542
|
-
mClass: 'ml-0',
|
5543
|
-
handleChange: strokeColorChange,
|
5544
|
-
property: 'backgroundColor',
|
5545
|
-
name: 'backgroundColor',
|
5546
|
-
color: activeSelection.stroke
|
5547
|
-
})))), React.createElement("div", {
|
5548
|
-
className: "flex gap-2"
|
5549
|
-
}, React.createElement("div", null, React.createElement("div", {
|
5550
|
-
className: "uppercase font-bold text-sm mb-[8.5px]"
|
5551
|
-
}, "Letter Spacing"), React.createElement("input", {
|
5552
|
-
type: "number",
|
5553
|
-
id: "spacing",
|
5554
|
-
name: "spacing",
|
5555
|
-
step: "10",
|
5556
|
-
value: spacingVal,
|
5557
|
-
className: "border border-[#EBEBEB] py-[10px] pl-[16px] mb-[16.5px] w-[145px]",
|
5558
|
-
onChange: textSpacingHandler
|
5559
|
-
})))), currentSelection === 'group' && React.createElement(ImageEdit, {
|
5560
|
-
flipX: flipX,
|
5561
|
-
flipY: flipY,
|
5562
|
-
changeSVGColor: changeSVGColor,
|
5563
|
-
// nudgeMove={nudgeMove}
|
5564
|
-
activeSelection: activeSelection
|
5565
|
-
}), currentSelection === 'selectAll' && React.createElement(React.Fragment, null, React.createElement("div", {
|
5566
|
-
className: "uppercase font-bold pt-[17px]"
|
5567
|
-
}, "Color in Canvas"), React.createElement("div", {
|
5568
|
-
className: "flex gap-x-[1rem] mt-[12px] mb-[12px]"
|
5569
|
-
}, allColor == null ? void 0 : allColor.map(function (item) {
|
5570
|
-
return React.createElement(ColorImpl, {
|
5571
|
-
mClass: 'ml-[36px]',
|
5572
|
-
key: item,
|
5573
|
-
handleChange: changeSVGTextColor,
|
5574
|
-
property: item,
|
5575
|
-
color: item
|
5576
|
-
});
|
5577
|
-
})), React.createElement("button", {
|
5578
|
-
onClick: nudgeMove,
|
5579
|
-
id: "down",
|
5580
|
-
className: "font-medium text-orange-400"
|
5581
|
-
}, "DOWN"), React.createElement("button", {
|
5582
|
-
onClick: nudgeMove,
|
5583
|
-
id: "up",
|
5584
|
-
className: "font-medium text-orange-300 text-lime-400 px-1"
|
5585
|
-
}, "UP"), React.createElement("button", {
|
5586
|
-
onClick: nudgeMove,
|
5587
|
-
id: "left",
|
5588
|
-
className: "font-medium text-orange-300 text-teal-500"
|
5589
|
-
}, "LEFT"), React.createElement("button", {
|
5590
|
-
onClick: nudgeMove,
|
5591
|
-
id: "right",
|
5592
|
-
className: "font-medium text-orange-300 text-violet-600 px-1"
|
5593
|
-
}, "RIGHT"),
|
5594
|
-
// console.log(storeAllObject);
|
5595
|
-
storeAllObject.map(function (item, index) {
|
5596
|
-
return React.createElement("div", {
|
5597
|
-
className: "innerLayer bg-slate-300 my-1"
|
5598
|
-
}, React.createElement("img", {
|
5599
|
-
className: "rounded-lg w-14 h-8",
|
5600
|
-
src: item ? item['icon'] : ''
|
5601
|
-
}), React.createElement("button", {
|
5602
|
-
className: "up mx-1 px-2 border-solid border-2 border-slate-500 ",
|
5603
|
-
onClick: function onClick() {
|
5604
|
-
return layerHandle(item, index, 'plus');
|
5605
|
-
}
|
5606
|
-
}, "UP"), React.createElement("button", {
|
5607
|
-
className: "down mx-1 px-2 border-solid border-2 border-slate-500",
|
5608
|
-
onClick: function onClick() {
|
5609
|
-
return layerHandle(item, index, 'minus');
|
5610
|
-
}
|
5611
|
-
}, "DOWN"), React.createElement("button", {
|
5612
|
-
className: "close mx-1 px-2 border-solid border-2 border-slate-500",
|
5613
|
-
onClick: function onClick() {
|
5614
|
-
return deleteElement(item);
|
5615
|
-
}
|
5616
|
-
}, "DELETE"));
|
5617
|
-
})), currentSelection === 'none' && React.createElement(React.Fragment, null, React.createElement("div", {
|
5618
|
-
className: "uppercase font-bold pt-[17px]"
|
5619
|
-
}, "Color in Canvas"), React.createElement("div", {
|
5620
|
-
className: "flex gap-x-[1rem] mt-[12px]"
|
5621
|
-
}, allColor == null ? void 0 : allColor.map(function (item) {
|
5622
|
-
return React.createElement(ColorImpl, {
|
5623
|
-
mClass: 'ml-[36px]',
|
5624
|
-
key: item,
|
5625
|
-
handleChange: changeSVGTextColor,
|
5626
|
-
property: item,
|
5627
|
-
color: item
|
5628
|
-
});
|
5629
|
-
})))), React.createElement("button", {
|
5630
|
-
type: "button",
|
5631
|
-
className: "mt-3 inline-flex justify-center bg-white px-[110px] py-2 text-sm font-medium text-[#E11A38] shadow-sm ring-1 ring-inset ring-[#E11A38] hover:bg-gray-50 sm:mt-0 w-full",
|
5632
|
-
onClick: onSave
|
5633
|
-
}, "Save")) : React.createElement("div", {
|
5634
|
-
key: tab.id
|
5635
|
-
}, currentSelection === 'layer' && React.createElement("div", {
|
5636
|
-
className: ""
|
5637
|
-
}, storeAllObject.map(function (item, index) {
|
5638
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
5639
|
-
className: "innerLayer border border-[#D7D7D7] my-[16px] h-[80px] flex justify-between"
|
5640
|
-
}, React.createElement("div", {
|
5641
|
-
className: "imgBox border border-r-[#D7D7D7] bg-slate-200 flex w-[80px]"
|
5642
|
-
}, React.createElement("img", {
|
5643
|
-
className: "rounded-lg w-14 h-8",
|
5644
|
-
src: item ? item['icon'] : ''
|
5645
|
-
})), React.createElement("div", {
|
5646
|
-
className: "delBtnBox flex-auto "
|
5647
|
-
}, React.createElement("button", {
|
5648
|
-
onClick: function onClick() {
|
5649
|
-
return deleteElement(item);
|
5650
|
-
},
|
5651
|
-
className: "h-full w-full"
|
5652
|
-
}, React.createElement("div", {
|
5653
|
-
className: "delBtn pointer-events-none flex justify-center "
|
5654
|
-
}, React.createElement("div", {
|
5655
|
-
className: "upIcon m-auto"
|
5656
|
-
}, React.createElement("svg", {
|
5657
|
-
width: "25px",
|
5658
|
-
height: "25px",
|
5659
|
-
viewBox: "0 0 24 24",
|
5660
|
-
fill: "none",
|
5661
|
-
xmlns: "http://www.w3.org/2000/svg"
|
5662
|
-
}, React.createElement("path", {
|
5663
|
-
d: "M10 11V17",
|
5664
|
-
stroke: "#9a9a9a",
|
5665
|
-
"stroke-width": "2",
|
5666
|
-
"stroke-linecap": "round",
|
5667
|
-
"stroke-linejoin": "round"
|
5668
|
-
}), React.createElement("path", {
|
5669
|
-
d: "M14 11V17",
|
5670
|
-
stroke: "#9a9a9a",
|
5671
|
-
"stroke-width": "2",
|
5672
|
-
"stroke-linecap": "round",
|
5673
|
-
"stroke-linejoin": "round"
|
5674
|
-
}), React.createElement("path", {
|
5675
|
-
d: "M4 7H20",
|
5676
|
-
stroke: "#9a9a9a",
|
5677
|
-
"stroke-width": "2",
|
5678
|
-
"stroke-linecap": "round",
|
5679
|
-
"stroke-linejoin": "round"
|
5680
|
-
}), React.createElement("path", {
|
5681
|
-
d: "M6 7H12H18V18C18 19.6569 16.6569 21 15 21H9C7.34315 21 6 19.6569 6 18V7Z",
|
5682
|
-
stroke: "#9a9a9a",
|
5683
|
-
"stroke-width": "2",
|
5684
|
-
"stroke-linecap": "round",
|
5685
|
-
"stroke-linejoin": "round"
|
5686
|
-
}), React.createElement("path", {
|
5687
|
-
d: "M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z",
|
5688
|
-
stroke: "#9a9a9a",
|
5689
|
-
"stroke-width": "2",
|
5690
|
-
"stroke-linecap": "round",
|
5691
|
-
"stroke-linejoin": "round"
|
5692
|
-
})))))), React.createElement("div", {
|
5693
|
-
className: "delBox flex flex-col w-[40px] justify-between items-stretch"
|
5694
|
-
}, React.createElement("button", {
|
5695
|
-
onClick: function onClick() {
|
5696
|
-
return layerHandle(item, index, 'plus');
|
5697
|
-
}
|
5698
|
-
}, React.createElement("div", {
|
5699
|
-
className: "upBtn pointer-events-none flex h-[35px] justify-center "
|
5700
|
-
}, React.createElement("div", {
|
5701
|
-
className: "upIcon m-auto"
|
5702
|
-
}, React.createElement("svg", {
|
5703
|
-
fill: "#9a9a9a",
|
5704
|
-
height: "25px",
|
5705
|
-
width: "25px",
|
5706
|
-
version: "1.1",
|
5707
|
-
id: "Layer_1",
|
5708
|
-
xmlns: "http://www.w3.org/2000/svg",
|
5709
|
-
viewBox: "0 0 512 512"
|
5710
|
-
}, React.createElement("g", null, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
|
5711
|
-
d: "M0,0v512h512V0H0z M469.333,469.333H42.667V42.667h426.667V469.333z"
|
5712
|
-
}), React.createElement("path", {
|
5713
|
-
d: "M121.752,335.085L256,200.837l134.248,134.248c8.331,8.331,21.839,8.331,30.17,0c8.331-8.331,8.331-21.839,0-30.17 L271.085,155.582c-8.331-8.331-21.839-8.331-30.17,0L91.582,304.915c-8.331,8.331-8.331,21.839,0,30.17 S113.42,343.416,121.752,335.085z"
|
5714
|
-
})))))))), React.createElement("button", {
|
5715
|
-
onClick: function onClick() {
|
5716
|
-
return layerHandle(item, index, 'minus');
|
5717
|
-
}
|
5718
|
-
}, React.createElement("div", {
|
5719
|
-
className: "downBtn pointer-events-none flex h-[35px] justify-center"
|
5720
|
-
}, React.createElement("div", {
|
5721
|
-
className: "downIcon m-auto"
|
5722
|
-
}, React.createElement("svg", {
|
5723
|
-
transform: "rotate(180)",
|
5724
|
-
fill: "#9a9a9a",
|
5725
|
-
height: "25px",
|
5726
|
-
width: "25px",
|
5727
|
-
version: "1.1",
|
5728
|
-
id: "Layer_1",
|
5729
|
-
xmlns: "http://www.w3.org/2000/svg",
|
5730
|
-
viewBox: "0 0 512 512"
|
5731
|
-
}, React.createElement("g", null, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
|
5732
|
-
d: "M0,0v512h512V0H0z M469.333,469.333H42.667V42.667h426.667V469.333z"
|
5733
|
-
}), React.createElement("path", {
|
5734
|
-
d: "M121.752,335.085L256,200.837l134.248,134.248c8.331,8.331,21.839,8.331,30.17,0c8.331-8.331,8.331-21.839,0-30.17 L271.085,155.582c-8.331-8.331-21.839-8.331-30.17,0L91.582,304.915c-8.331,8.331-8.331,21.839,0,30.17 S113.42,343.416,121.752,335.085z"
|
5735
|
-
})))))))))));
|
5736
|
-
})));
|
5737
|
-
})))));
|
5866
|
+
onClick: function onClick() {
|
5867
|
+
return layerHandle(item, index, 'plus');
|
5868
|
+
}
|
5869
|
+
}, React.createElement("div", {
|
5870
|
+
className: "upBtn pointer-events-none flex h-[35px] justify-center "
|
5871
|
+
}, React.createElement("div", {
|
5872
|
+
className: "upIcon m-auto"
|
5873
|
+
}, React.createElement("svg", {
|
5874
|
+
fill: "#9a9a9a",
|
5875
|
+
height: "25px",
|
5876
|
+
width: "25px",
|
5877
|
+
version: "1.1",
|
5878
|
+
id: "Layer_1",
|
5879
|
+
xmlns: "http://www.w3.org/2000/svg",
|
5880
|
+
viewBox: "0 0 512 512"
|
5881
|
+
}, React.createElement("g", null, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
|
5882
|
+
d: "M0,0v512h512V0H0z M469.333,469.333H42.667V42.667h426.667V469.333z"
|
5883
|
+
}), React.createElement("path", {
|
5884
|
+
d: "M121.752,335.085L256,200.837l134.248,134.248c8.331,8.331,21.839,8.331,30.17,0c8.331-8.331,8.331-21.839,0-30.17 L271.085,155.582c-8.331-8.331-21.839-8.331-30.17,0L91.582,304.915c-8.331,8.331-8.331,21.839,0,30.17 S113.42,343.416,121.752,335.085z"
|
5885
|
+
})))))))), React.createElement("button", {
|
5886
|
+
onClick: function onClick() {
|
5887
|
+
return layerHandle(item, index, 'minus');
|
5888
|
+
}
|
5889
|
+
}, React.createElement("div", {
|
5890
|
+
className: "downBtn pointer-events-none flex h-[35px] justify-center"
|
5891
|
+
}, React.createElement("div", {
|
5892
|
+
className: "downIcon m-auto"
|
5893
|
+
}, React.createElement("svg", {
|
5894
|
+
transform: "rotate(180)",
|
5895
|
+
fill: "#9a9a9a",
|
5896
|
+
height: "25px",
|
5897
|
+
width: "25px",
|
5898
|
+
version: "1.1",
|
5899
|
+
id: "Layer_1",
|
5900
|
+
xmlns: "http://www.w3.org/2000/svg",
|
5901
|
+
viewBox: "0 0 512 512"
|
5902
|
+
}, React.createElement("g", null, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
|
5903
|
+
d: "M0,0v512h512V0H0z M469.333,469.333H42.667V42.667h426.667V469.333z"
|
5904
|
+
}), React.createElement("path", {
|
5905
|
+
d: "M121.752,335.085L256,200.837l134.248,134.248c8.331,8.331,21.839,8.331,30.17,0c8.331-8.331,8.331-21.839,0-30.17 L271.085,155.582c-8.331-8.331-21.839-8.331-30.17,0L91.582,304.915c-8.331,8.331-8.331,21.839,0,30.17 S113.42,343.416,121.752,335.085z"
|
5906
|
+
})))))))))));
|
5907
|
+
})))))));
|
5738
5908
|
};
|
5739
5909
|
|
5740
5910
|
var ListDropdown = function ListDropdown(props) {
|
@@ -6174,8 +6344,7 @@ var ColorPicker = function ColorPicker() {
|
|
6174
6344
|
})));
|
6175
6345
|
};
|
6176
6346
|
|
6177
|
-
var MiddleMenu = function MiddleMenu(
|
6178
|
-
var onApply = _ref.onApply;
|
6347
|
+
var MiddleMenu = function MiddleMenu() {
|
6179
6348
|
var _use3dddPlus = use3dddPlus(function (state) {
|
6180
6349
|
return [state.selectedStepper, state.toggleSaveDesign, state.loadingLogo];
|
6181
6350
|
}, shallow),
|
@@ -6191,9 +6360,7 @@ var MiddleMenu = function MiddleMenu(_ref) {
|
|
6191
6360
|
className: "flex w-[70%] h-[100%]"
|
6192
6361
|
}, React.createElement(canvas, null)), toggleSaveDesign.status && React.createElement(SaveDesign, null), React.createElement("div", {
|
6193
6362
|
className: "flex-1 z-10 h-[100%] "
|
6194
|
-
}, React.createElement(Rightmenu, null))), selectedStepper === 1 && React.createElement(UploadLogo, null), selectedStepper === 4 && React.createElement(AddMascot, null), selectedStepper === 2 && React.createElement(MyLogo$1,
|
6195
|
-
onApply: onApply
|
6196
|
-
}), selectedStepper === 5 && React.createElement(ColorPicker, null));
|
6363
|
+
}, React.createElement(Rightmenu, null))), selectedStepper === 1 && React.createElement(UploadLogo, null), selectedStepper === 4 && React.createElement(AddMascot, null), selectedStepper === 2 && React.createElement(MyLogo$1, null), selectedStepper === 5 && React.createElement(ColorPicker, null));
|
6197
6364
|
};
|
6198
6365
|
|
6199
6366
|
// import { Modal } from './components';
|
@@ -6204,34 +6371,14 @@ var MiddleMenu = function MiddleMenu(_ref) {
|
|
6204
6371
|
* A custom App component. Neat!
|
6205
6372
|
*/
|
6206
6373
|
var LogoEditor = function LogoEditor(_ref) {
|
6207
|
-
var stepperId = _ref.stepperId
|
6208
|
-
onApply = _ref.onApply,
|
6209
|
-
customLogoColorList = _ref.customLogoColorList,
|
6210
|
-
defaultColorList = _ref.defaultColorList,
|
6211
|
-
logoData = _ref.logoData;
|
6374
|
+
var stepperId = _ref.stepperId;
|
6212
6375
|
var _use3dddPlus = use3dddPlus(function (state) {
|
6213
|
-
return [state.setSelectedStepper
|
6376
|
+
return [state.setSelectedStepper];
|
6214
6377
|
}),
|
6215
|
-
setSelectedStepper = _use3dddPlus[0]
|
6216
|
-
myLogoHandler = _use3dddPlus[1];
|
6378
|
+
setSelectedStepper = _use3dddPlus[0];
|
6217
6379
|
React.useEffect(function () {
|
6218
6380
|
setSelectedStepper(stepperId);
|
6219
|
-
if (stepperId == undefined) {
|
6220
|
-
myLogoHandler(logoData);
|
6221
|
-
console.log('logoData', logoData);
|
6222
|
-
}
|
6223
6381
|
}, [stepperId]);
|
6224
|
-
React.useEffect(function () {
|
6225
|
-
use3dddPlus.setState({
|
6226
|
-
customUploadLogoColorList: customLogoColorList
|
6227
|
-
});
|
6228
|
-
}, [customLogoColorList]);
|
6229
|
-
React.useEffect(function () {
|
6230
|
-
use3dddPlus.setState({
|
6231
|
-
defaultColorList: defaultColorList
|
6232
|
-
});
|
6233
|
-
}, [defaultColorList]);
|
6234
|
-
console.log('defaultColorList', defaultColorList);
|
6235
6382
|
return (
|
6236
6383
|
// <Modal
|
6237
6384
|
// backdropStyle={`z-[7]`}
|
@@ -6245,12 +6392,16 @@ var LogoEditor = function LogoEditor(_ref) {
|
|
6245
6392
|
className: "lg:w-[10%]"
|
6246
6393
|
}, React.createElement(LeftMenu, null)), React.createElement("div", {
|
6247
6394
|
className: " flex h-full w-[90%]"
|
6248
|
-
}, React.createElement(MiddleMenu,
|
6249
|
-
onApply: onApply
|
6250
|
-
})))
|
6395
|
+
}, React.createElement(MiddleMenu, null)))
|
6251
6396
|
// </Modal>
|
6252
6397
|
);
|
6253
6398
|
};
|
6254
6399
|
|
6400
|
+
var container = /*#__PURE__*/document.getElementById('root');
|
6401
|
+
var root = /*#__PURE__*/createRoot(container); // createRoot(container!) if you use TypeScript
|
6402
|
+
root.render(React.createElement(LogoEditor, {
|
6403
|
+
stepperId: 1
|
6404
|
+
}));
|
6405
|
+
|
6255
6406
|
export { index$1 as Components, LogoEditor, index as services, use3dddPlus };
|
6256
6407
|
//# sourceMappingURL=logoeditor.esm.js.map
|