@threedddplus/logoeditor 0.0.71 → 0.0.72

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.
@@ -4697,9 +4697,15 @@ var initCanvas = function initCanvas() {
4697
4697
  var onObjectMoving = function onObjectMoving(e) {
4698
4698
  use3dddPlus.getState().updateModifaction(false);
4699
4699
  var obj = e.target;
4700
+ if (isNaN(obj.left)) {
4701
+ obj.left = -1;
4702
+ obj.setCoords();
4703
+ }
4704
+ if (isNaN(obj.top)) {
4705
+ obj.top = -1;
4706
+ obj.setCoords();
4707
+ }
4700
4708
  console.log(e);
4701
- if (isNaN(e.pointer.x)) return;
4702
- if (isNaN(e.pointer.y)) return;
4703
4709
  // if (
4704
4710
  // obj.getBoundingRect().width > obj.canvas.height ||
4705
4711
  // obj.getBoundingRect().height > obj.canvas.width
@@ -4989,6 +4995,7 @@ var initCanvas = function initCanvas() {
4989
4995
  canv.on('selection:updated', onObjectUpdated);
4990
4996
  canv.on('object:moving', onObjectMoving);
4991
4997
  canv.on('object:modified', function (e) {
4998
+ e.target.lockRotation = false;
4992
4999
  use3dddPlus.getState().updateModifaction(true);
4993
5000
  if (isObjectInCenter(e.target)) {
4994
5001
  use3dddPlus.getState().verticalLine.set({
@@ -5046,9 +5053,13 @@ var initCanvas = function initCanvas() {
5046
5053
  obj.setCoords();
5047
5054
  }
5048
5055
  if (obj.getBoundingRect().top + obj.getBoundingRect().height > obj.canvas.height || obj.getBoundingRect().left + obj.getBoundingRect().width > obj.canvas.width) {
5049
- obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top);
5050
- obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left);
5051
- obj.setCoords();
5056
+ if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
5057
+ obj.lockRotation = true;
5058
+ } else {
5059
+ obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top);
5060
+ obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left);
5061
+ obj.setCoords();
5062
+ }
5052
5063
  }
5053
5064
  });
5054
5065
  return canv;
@@ -5901,7 +5912,7 @@ var ColorPalette = function ColorPalette(_ref) {
5901
5912
  };
5902
5913
  return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
5903
5914
  id: "colorPalette",
5904
- className: "right-[10.6rem] z-10 max-h-[16.4375rem] border border-[#FCE8EB] before:bg-[#ffffff] shadow-[0px_3px_6px_rgba(0,0,0,0.16)] py-[1.8125rem] px-[1.4063rem] bg-[#fff] mt-[1.875rem] mr-[1rem] absolute h-[300px]",
5915
+ className: "colorPalette right-[10.6rem] z-10 max-h-[16.4375rem] border border-[#FCE8EB] before:bg-[#ffffff] shadow-[0px_3px_6px_rgba(0,0,0,0.16)] py-[1.8125rem] px-[1.4063rem] bg-[#fff] mt-[1.875rem] mr-[1rem] absolute h-[300px]",
5905
5916
  style: style
5906
5917
  }, (colorList == null ? void 0 : colorList.length) > 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", {
5907
5918
  className: TEXT_SIZE_9 + " leading-[1.125rem] font-bold pb-[1.125rem] text-left"
@@ -5967,24 +5978,6 @@ var ColorBox = function ColorBox(_ref2) {
5967
5978
  };
5968
5979
 
5969
5980
  var ColorImpl = function ColorImpl(props) {
5970
- var _useState = React.useState(props.displayPallet ? true : false),
5971
- displayPallet = _useState[0],
5972
- setdisplayPallet = _useState[1];
5973
- var _useState2 = React.useState(props.color),
5974
- setColor = _useState2[1];
5975
- var _useState3 = React.useState(props.position),
5976
- position = _useState3[0],
5977
- setPosition = _useState3[1];
5978
- React.useEffect(function () {
5979
- if (!displayPallet && props.onClose) {
5980
- props.onClose();
5981
- }
5982
- }, [displayPallet]);
5983
- var handleColorClick = function handleColorClick(color) {
5984
- // console.log(color);
5985
- setColor(color);
5986
- props.handleChange(props.property, color);
5987
- };
5988
5981
  var getLable = function getLable(colorCode) {
5989
5982
  var color = defaultColorNames.find(function (c) {
5990
5983
  return colorCode === c.color;
@@ -6007,16 +6000,16 @@ var ColorImpl = function ColorImpl(props) {
6007
6000
  onClick: function onClick(event) {
6008
6001
  event.stopPropagation();
6009
6002
  event.preventDefault();
6010
- setdisplayPallet(function (prev) {
6011
- return !prev;
6003
+ props.setDisplayPallet({
6004
+ visible: true,
6005
+ property: props.property,
6006
+ color: '',
6007
+ callback: props.callback
6012
6008
  });
6013
- setPosition({
6009
+ props.setPosition({
6014
6010
  x: event.clientX,
6015
6011
  y: event.clientY
6016
6012
  });
6017
- },
6018
- onBlur: function onBlur() {
6019
- return setdisplayPallet(false);
6020
6013
  }
6021
6014
  }, props.color === 'transparent' && React__default.createElement("div", {
6022
6015
  style: {
@@ -6027,31 +6020,7 @@ var ColorImpl = function ColorImpl(props) {
6027
6020
  marginLeft: '13px',
6028
6021
  marginTop: '-6px'
6029
6022
  }
6030
- }, "\xA0"), displayPallet && React__default.createElement(ColorPalette, {
6031
- mainClass: "left-0 " + props.mClass,
6032
- handleColorChange: handleColorClick,
6033
- style: position ? {
6034
- position: 'fixed',
6035
- left: position.x - 450,
6036
- top: position.y - 5,
6037
- width: '450px'
6038
- } : {}
6039
- })
6040
- // <div
6041
- // className="absolute"
6042
- // style={{ zIndex: '100' }}
6043
- // tabIndex={0}
6044
- // onBlur={() => setdisplayPallet(false)}
6045
- // >
6046
- // <ChromePicker
6047
- // color={color.hex}
6048
- // onChangeComplete={onChangeComplete}
6049
- // onChange={onChangeComplete}
6050
- // disableAlpha={true}
6051
- // />
6052
- // <hr />
6053
- // </div>
6054
- )));
6023
+ }, "\xA0"))));
6055
6024
  };
6056
6025
 
6057
6026
  var Initpopup = function Initpopup() {
@@ -6126,6 +6095,26 @@ var PopUpCanvas = function PopUpCanvas() {
6126
6095
  isNextClicked = _useState4[0],
6127
6096
  setIsNextClicked = _useState4[1];
6128
6097
  var defaultColorFillRef = React.useRef([]);
6098
+ var _useState5 = React.useState({
6099
+ visible: false,
6100
+ property: '',
6101
+ color: '',
6102
+ callback: null
6103
+ }),
6104
+ displayPallet = _useState5[0],
6105
+ setDisplayPallet = _useState5[1];
6106
+ var _useState6 = React.useState(null),
6107
+ position = _useState6[0],
6108
+ setPosition = _useState6[1];
6109
+ React.useEffect(function () {
6110
+ if (!displayPallet || !displayPallet.visible) {
6111
+ setDefaultColorFill(defaultColorFill.map(function (cf) {
6112
+ return _extends({}, cf, {
6113
+ hasPallet: false
6114
+ });
6115
+ }));
6116
+ }
6117
+ }, [displayPallet]);
6129
6118
  React.useEffect(function () {
6130
6119
  defaultColorFillRef.current = defaultColorFill;
6131
6120
  }, [defaultColorFill]);
@@ -6224,10 +6213,12 @@ var PopUpCanvas = function PopUpCanvas() {
6224
6213
  }
6225
6214
  };
6226
6215
  var removeColorPalatte = function removeColorPalatte() {
6227
- var pallete = document.getElementById('colorPalette');
6228
- if (pallete) {
6229
- pallete.parentElement.click();
6230
- }
6216
+ setDisplayPallet({
6217
+ visible: false,
6218
+ property: '',
6219
+ color: '',
6220
+ callback: null
6221
+ });
6231
6222
  };
6232
6223
  React.useEffect(function () {
6233
6224
  fabric.fabric.Object.prototype.hasControls = false;
@@ -6441,16 +6432,26 @@ var PopUpCanvas = function PopUpCanvas() {
6441
6432
  x: event.clientX,
6442
6433
  y: event.clientY
6443
6434
  }
6444
- }) : cf;
6445
- }));
6446
- };
6447
- var onClosePalette = function onClosePalette() {
6448
- setDefaultColorFill(defaultColorFill.map(function (c) {
6449
- return _extends({}, c, {
6435
+ }) : _extends({}, cf, {
6450
6436
  hasPallet: false
6451
6437
  });
6452
6438
  }));
6439
+ setDisplayPallet({
6440
+ visible: true,
6441
+ property: item.property,
6442
+ color: item.updated,
6443
+ callback: onColorUpdate
6444
+ });
6445
+ setPosition({
6446
+ x: event.clientX,
6447
+ y: event.clientY
6448
+ });
6453
6449
  };
6450
+ // const onClosePalette = () => {
6451
+ // setDefaultColorFill(
6452
+ // defaultColorFill.map((c: any) => ({ ...c, hasPallet: false }))
6453
+ // );
6454
+ // };
6454
6455
  var onPopUpCanvasUndo = function onPopUpCanvasUndo() {
6455
6456
  var colors = popUpCanvasUndo();
6456
6457
  if (colors !== null) {
@@ -6636,9 +6637,10 @@ var PopUpCanvas = function PopUpCanvas() {
6636
6637
  handleChange: onColorUpdate,
6637
6638
  property: item.property,
6638
6639
  color: item.updated,
6639
- onClose: onClosePalette,
6640
- displayPallet: true,
6641
- position: item.position
6640
+ // onClose={onClosePalette}
6641
+ setDisplayPallet: setDisplayPallet,
6642
+ setPosition: setPosition,
6643
+ callback: onColorUpdate
6642
6644
  }) : React__default.createElement(IconButton, {
6643
6645
  label: "Select Color",
6644
6646
  icon: React__default.createElement(gi.GiDrop, null),
@@ -6654,7 +6656,10 @@ var PopUpCanvas = function PopUpCanvas() {
6654
6656
  handleChange: onColorUpdate,
6655
6657
  property: item.property,
6656
6658
  color: item.updated,
6657
- onClose: onClosePalette
6659
+ // onClose={onClosePalette}
6660
+ setDisplayPallet: setDisplayPallet,
6661
+ setPosition: setPosition,
6662
+ callback: onColorUpdate
6658
6663
  })), React__default.createElement("span", {
6659
6664
  className: "py-[5px] pl-[10px] pr-[6px] font-medium text-[13px] bg-[#F1F1F1]"
6660
6665
  }, "Select Color")), React__default.createElement("span", {
@@ -6757,7 +6762,26 @@ var PopUpCanvas = function PopUpCanvas() {
6757
6762
  style: {
6758
6763
  marginTop: '10px'
6759
6764
  }
6760
- }, "Cancel"))))))))));
6765
+ }, "Cancel"))))))))), displayPallet && displayPallet.visible && React__default.createElement(ColorPalette, {
6766
+ mainClass: "left-0",
6767
+ handleColorChange: function handleColorChange(color) {
6768
+ displayPallet.callback(displayPallet.property, color);
6769
+ setDisplayPallet({
6770
+ visible: false,
6771
+ property: '',
6772
+ color: '',
6773
+ callback: null
6774
+ });
6775
+ },
6776
+ style: position ? {
6777
+ position: 'fixed',
6778
+ left: position.x - 450,
6779
+ top: position.y - 5,
6780
+ width: '450px'
6781
+ } : {
6782
+ display: 'none'
6783
+ }
6784
+ }));
6761
6785
  };
6762
6786
 
6763
6787
  var UploadLogo = function UploadLogo() {
@@ -8007,6 +8031,17 @@ var Rightmenu = function Rightmenu() {
8007
8031
  var _useState6 = React.useState(false),
8008
8032
  isNextClicked = _useState6[0],
8009
8033
  setIsNextClicked = _useState6[1];
8034
+ var _useState7 = React.useState({
8035
+ visible: false,
8036
+ property: '',
8037
+ color: '',
8038
+ callback: null
8039
+ }),
8040
+ displayPallet = _useState7[0],
8041
+ setDisplayPallet = _useState7[1];
8042
+ var _useState8 = React.useState(null),
8043
+ position = _useState8[0],
8044
+ setPosition = _useState8[1];
8010
8045
  var tabs = [{
8011
8046
  id: 1,
8012
8047
  label: 'Properties'
@@ -8563,6 +8598,13 @@ var Rightmenu = function Rightmenu() {
8563
8598
  // textSelected.set('text', use3dddPlus.getState().textInfo);
8564
8599
  use3dddPlus.getState().forIconCapture();
8565
8600
  textSelected.icon = use3dddPlus.getState().iconImage;
8601
+ var dublicateText = textSelected;
8602
+ var brNewD = textSelected.getBoundingRect();
8603
+ if (brNewD.width + brNewD.left + 45 >= dublicateText.canvas.width || brNewD.height + brNewD.top + 10 >= dublicateText.canvas.height || brNewD.left < 0 || brNewD.top < 0) {
8604
+ var newFontSize = canvasWidth / (brNew.width + brNew.left) * textSelected.fontSize;
8605
+ textSelected.set('fontSize', textSelected.fontSize - 3);
8606
+ }
8607
+ textSelected.setCoords();
8566
8608
  canvas.renderAll();
8567
8609
  use3dddPlus.getState().updateModifaction(true);
8568
8610
  };
@@ -8695,16 +8737,33 @@ var Rightmenu = function Rightmenu() {
8695
8737
  };
8696
8738
  var textSpacingHandler = function textSpacingHandler(e) {
8697
8739
  // setSpacinglineVal(e.target.valueAsNumber);
8698
- textSelected.charSpacing = e.target.valueAsNumber;
8699
- if (currentSelection === 'path') {
8700
- textShapeChange(textSelected.shapeType, true);
8701
- }
8702
- use3dddPlus.getState().updateModifaction(true);
8703
- use3dddPlus.getState().forIconCapture();
8704
- textSelected.icon = use3dddPlus.getState().iconImage;
8705
- canvas.renderAll();
8706
- if (textSelected.aCoords.tr.x > 480) {
8707
- return;
8740
+ var brNew = textSelected.getBoundingRect();
8741
+ if (brNew.width + brNew.left >= textSelected.canvas.width || brNew.height + brNew.top >= textSelected.canvas.height || brNew.left < 0 || brNew.top < 0) {
8742
+ if (textSelected.charSpacing > e.target.valueAsNumber) {
8743
+ textSelected.charSpacing = e.target.valueAsNumber;
8744
+ if (currentSelection === 'path') {
8745
+ textShapeChange(textSelected.shapeType, true);
8746
+ }
8747
+ use3dddPlus.getState().updateModifaction(true);
8748
+ use3dddPlus.getState().forIconCapture();
8749
+ textSelected.icon = use3dddPlus.getState().iconImage;
8750
+ canvas.renderAll();
8751
+ if (textSelected.aCoords.tr.x > 480) {
8752
+ return;
8753
+ }
8754
+ }
8755
+ } else {
8756
+ textSelected.charSpacing = e.target.valueAsNumber;
8757
+ if (currentSelection === 'path') {
8758
+ textShapeChange(textSelected.shapeType, true);
8759
+ }
8760
+ use3dddPlus.getState().updateModifaction(true);
8761
+ use3dddPlus.getState().forIconCapture();
8762
+ textSelected.icon = use3dddPlus.getState().iconImage;
8763
+ canvas.renderAll();
8764
+ if (textSelected.aCoords.tr.x > 480) {
8765
+ return;
8766
+ }
8708
8767
  }
8709
8768
  };
8710
8769
  var textStyle = function textStyle(e, key, value) {
@@ -8768,6 +8827,17 @@ var Rightmenu = function Rightmenu() {
8768
8827
  });
8769
8828
  }
8770
8829
  // canvas.renderAll();
8830
+ } else if (data.type === 'path') {
8831
+ var _C2 = data.fill;
8832
+ if (_C2 === previousColor) {
8833
+ data.set({
8834
+ fill: color,
8835
+ colorFill: {
8836
+ layer0: color
8837
+ }
8838
+ });
8839
+ }
8840
+ // canvas.renderAll();
8771
8841
  } else if (data.type === 'group') {
8772
8842
  // console.log(data);
8773
8843
  var objImage = data._objects;
@@ -8904,10 +8974,12 @@ var Rightmenu = function Rightmenu() {
8904
8974
  }
8905
8975
  };
8906
8976
  var removeColorPalatte = function removeColorPalatte() {
8907
- var pallete = document.getElementById('colorPalette');
8908
- if (pallete) {
8909
- pallete.parentElement.click();
8910
- }
8977
+ setDisplayPallet({
8978
+ visible: false,
8979
+ property: '',
8980
+ color: '',
8981
+ callback: null
8982
+ });
8911
8983
  };
8912
8984
  React.useEffect(function () {
8913
8985
  window.addEventListener('click', removeColorPalatte);
@@ -9003,7 +9075,8 @@ var Rightmenu = function Rightmenu() {
9003
9075
  className: textSelected.fontWeight === 'bold' ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border font-bold border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] font-bold text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
9004
9076
  style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
9005
9077
  color: '#cccccc',
9006
- cursor: 'default'
9078
+ cursor: 'default',
9079
+ backgroundColor: '#ffffff'
9007
9080
  } : {},
9008
9081
  onClick: function onClick(e) {
9009
9082
  return textStyle(e, 'fontWeight', 'bold');
@@ -9014,7 +9087,8 @@ var Rightmenu = function Rightmenu() {
9014
9087
  className: textSelected.fontStyle && textSelected.fontStyle === 'italic' ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border italic border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] italic text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
9015
9088
  style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
9016
9089
  color: '#cccccc',
9017
- cursor: 'default'
9090
+ cursor: 'default',
9091
+ backgroundColor: '#ffffff'
9018
9092
  } : {},
9019
9093
  onClick: function onClick(e) {
9020
9094
  return textStyle(e, 'fontStyle', 'italic');
@@ -9025,7 +9099,8 @@ var Rightmenu = function Rightmenu() {
9025
9099
  className: textSelected.underline && textSelected.underline === true ? SELECT_BG_COLOR + " text-[#fff] text-base cursor-pointer border underline border-[#EBEBEB] py-[7px] px-[25px] " : 'bg-[#fff] underline text-base cursor-pointer border border-[#EBEBEB] py-[7px] px-[25px]',
9026
9100
  style: textSelected && textSelected.shapeType && textSelected.shapeType !== 'none' ? {
9027
9101
  color: '#cccccc',
9028
- cursor: 'default'
9102
+ cursor: 'default',
9103
+ backgroundColor: '#ffffff'
9029
9104
  } : {},
9030
9105
  onClick: function onClick(e) {
9031
9106
  return textStyle(e, 'underline', !fontStyle.underline);
@@ -9070,7 +9145,10 @@ var Rightmenu = function Rightmenu() {
9070
9145
  handleChange: textColorChange,
9071
9146
  property: 'backgroundColor',
9072
9147
  name: 'backgroundColor',
9073
- color: activeSelection.fill
9148
+ color: activeSelection.fill,
9149
+ setDisplayPallet: setDisplayPallet,
9150
+ setPosition: setPosition,
9151
+ callback: textColorChange
9074
9152
  })), React__default.createElement("div", {
9075
9153
  className: "flex gap-2 mt-4"
9076
9154
  }, React__default.createElement("div", null, React__default.createElement("div", {
@@ -9092,7 +9170,10 @@ var Rightmenu = function Rightmenu() {
9092
9170
  handleChange: strokeColorChange,
9093
9171
  property: 'backgroundColor',
9094
9172
  name: 'backgroundColor',
9095
- color: activeSelection.stroke
9173
+ color: activeSelection.stroke,
9174
+ setDisplayPallet: setDisplayPallet,
9175
+ setPosition: setPosition,
9176
+ callback: strokeColorChange
9096
9177
  })))), React__default.createElement("div", {
9097
9178
  className: "flex gap-2"
9098
9179
  }, React__default.createElement("div", null, React__default.createElement("div", {
@@ -9138,7 +9219,10 @@ var Rightmenu = function Rightmenu() {
9138
9219
  key: 'color-' + i,
9139
9220
  handleChange: changeSVGColor,
9140
9221
  property: item,
9141
- color: activeSelection.colorFill[item]
9222
+ color: activeSelection.colorFill[item],
9223
+ setDisplayPallet: setDisplayPallet,
9224
+ setPosition: setPosition,
9225
+ callback: changeSVGColor
9142
9226
  });
9143
9227
  }))), React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
9144
9228
  className: "my-[24.5px]"
@@ -9174,13 +9258,25 @@ var Rightmenu = function Rightmenu() {
9174
9258
  }, "Color in Canvas"), React__default.createElement("div", {
9175
9259
  className: "flex flex-wrap gap-x-[1rem] mt-[12px] mb-[12px]"
9176
9260
  }, allColor == null ? void 0 : allColor.map(function (item, i) {
9177
- return React__default.createElement(ColorImpl, {
9178
- mClass: 'mb-[10px]',
9179
- key: 'color-' + i,
9180
- handleChange: changeSVGTextColor,
9181
- property: item,
9182
- color: item
9183
- });
9261
+ return (
9262
+ // <ColorImpl
9263
+ // mClass={'mb-[10px]'}
9264
+ // key={'color-' + i}
9265
+ // handleChange={changeSVGTextColor}
9266
+ // property={item}
9267
+ // color={item}
9268
+ // />
9269
+ React__default.createElement(ColorImpl, {
9270
+ mClass: 'mb-[10px]',
9271
+ key: 'color-' + i,
9272
+ handleChange: changeSVGTextColor,
9273
+ property: item,
9274
+ color: item,
9275
+ setDisplayPallet: setDisplayPallet,
9276
+ setPosition: setPosition,
9277
+ callback: changeSVGTextColor
9278
+ })
9279
+ );
9184
9280
  })), (allColor && allColor.includes('transparent') ? allColor.length - 1 : allColor.length) > 8 && React__default.createElement(errorPopup, {
9185
9281
  allColor: allColor
9186
9282
  })), currentSelection === 'none' && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
@@ -9188,13 +9284,25 @@ var Rightmenu = function Rightmenu() {
9188
9284
  }, "Color in Canvas"), React__default.createElement("div", {
9189
9285
  className: "flex flex-wrap gap-x-[1rem] mt-[12px]"
9190
9286
  }, allColor == null ? void 0 : allColor.map(function (item, i) {
9191
- return React__default.createElement(ColorImpl, {
9192
- mClass: 'mb-[10px]',
9193
- key: 'color-' + i,
9194
- handleChange: changeSVGTextColor,
9195
- property: item,
9196
- color: item
9197
- });
9287
+ return (
9288
+ // <ColorImpl
9289
+ // mClass={'mb-[10px]'}
9290
+ // key={'color-' + i}
9291
+ // handleChange={changeSVGTextColor}
9292
+ // property={item}
9293
+ // color={item}
9294
+ // />
9295
+ React__default.createElement(ColorImpl, {
9296
+ mClass: 'mb-[10px]',
9297
+ key: 'color-' + i,
9298
+ handleChange: changeSVGTextColor,
9299
+ property: item,
9300
+ color: item,
9301
+ setDisplayPallet: setDisplayPallet,
9302
+ setPosition: setPosition,
9303
+ callback: changeSVGTextColor
9304
+ })
9305
+ );
9198
9306
  })), (allColor && allColor.includes('transparent') ? allColor.length - 1 : allColor.length) > 8 && React__default.createElement(errorPopup, {
9199
9307
  allColor: allColor
9200
9308
  }))), isNextClicked && conflictColors && conflictColors.length > 0 && React__default.createElement("div", {
@@ -9365,7 +9473,26 @@ var Rightmenu = function Rightmenu() {
9365
9473
  }), React__default.createElement("path", {
9366
9474
  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"
9367
9475
  })))))))))));
9368
- })))))));
9476
+ })))))), displayPallet && displayPallet.visible && React__default.createElement(ColorPalette, {
9477
+ mainClass: "left-0",
9478
+ handleColorChange: function handleColorChange(color) {
9479
+ displayPallet.callback(displayPallet.property, color);
9480
+ setDisplayPallet({
9481
+ visible: false,
9482
+ property: '',
9483
+ color: '',
9484
+ callback: null
9485
+ });
9486
+ },
9487
+ style: position ? {
9488
+ position: 'fixed',
9489
+ left: position.x - 450,
9490
+ top: position.y - 5,
9491
+ width: '450px'
9492
+ } : {
9493
+ display: 'none'
9494
+ }
9495
+ }));
9369
9496
  };
9370
9497
 
9371
9498
  var css_248z$5 = "#ls{//top:8rem;background-color:#fff;background:radial-gradient(#eee,#ccc);height:100%;left:0;opacity:1;position:relative;transition:opacity 1s;width:100%;z-index:100}#ls.fade-out{opacity:0}#l{animation:spin 2s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#b16b6b;display:block;height:100px;left:50%;margin:-50px 0 0 -50px;position:relative;top:50%;width:100px}#l:before{animation:spin 3s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#c10909;bottom:5px;left:5px;right:5px;top:5px}#l:after,#l:before{content:\"\";position:absolute}#l:after{animation:spin 1.5s linear infinite;border:3px solid transparent;border-radius:50%;border-top-color:#bb4646;bottom:15px;left:15px;right:15px;top:15px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}";