microboard-ui-temp 0.1.92 → 0.1.93

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/index.js CHANGED
@@ -217836,11 +217836,11 @@ var decodeHtml = (htmlString) => {
217836
217836
  };
217837
217837
  function getTransformationData(el) {
217838
217838
  const transformStyle = el.style.transform;
217839
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
217839
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
217840
217840
  if (transformMatch) {
217841
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
217841
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
217842
217842
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
217843
- return { ...matrix, rotate: 0, isLocked: false };
217843
+ return { ...matrix, rotate, isLocked: false };
217844
217844
  }
217845
217845
  return { ...new Matrix2, rotate: 0, isLocked: false };
217846
217846
  }
@@ -250332,7 +250332,7 @@ class ImageItem extends BaseItem {
250332
250332
  renderHTML(documentFactory) {
250333
250333
  const div = documentFactory.createElement("image-item");
250334
250334
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
250335
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
250335
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
250336
250336
  div.style.backgroundImage = `url(${this.storageLink})`;
250337
250337
  div.id = this.getId();
250338
250338
  div.style.width = `${this.imageDimension.width}px`;
@@ -255965,7 +255965,7 @@ class Card extends BaseItem {
255965
255965
  renderHTML(documentFactory) {
255966
255966
  const div = super.renderHTML(documentFactory);
255967
255967
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
255968
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
255968
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
255969
255969
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
255970
255970
  div.id = this.getId();
255971
255971
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/dist/spa.js CHANGED
@@ -217836,11 +217836,11 @@ var decodeHtml = (htmlString) => {
217836
217836
  };
217837
217837
  function getTransformationData(el) {
217838
217838
  const transformStyle = el.style.transform;
217839
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
217839
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
217840
217840
  if (transformMatch) {
217841
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
217841
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
217842
217842
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
217843
- return { ...matrix, rotate: 0, isLocked: false };
217843
+ return { ...matrix, rotate, isLocked: false };
217844
217844
  }
217845
217845
  return { ...new Matrix2, rotate: 0, isLocked: false };
217846
217846
  }
@@ -250332,7 +250332,7 @@ class ImageItem extends BaseItem {
250332
250332
  renderHTML(documentFactory) {
250333
250333
  const div = documentFactory.createElement("image-item");
250334
250334
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
250335
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
250335
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
250336
250336
  div.style.backgroundImage = `url(${this.storageLink})`;
250337
250337
  div.id = this.getId();
250338
250338
  div.style.width = `${this.imageDimension.width}px`;
@@ -255965,7 +255965,7 @@ class Card extends BaseItem {
255965
255965
  renderHTML(documentFactory) {
255966
255966
  const div = super.renderHTML(documentFactory);
255967
255967
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
255968
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
255968
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
255969
255969
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
255970
255970
  div.id = this.getId();
255971
255971
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -60,7 +60,7 @@
60
60
  "i18next-browser-languagedetector": "^8.2.0",
61
61
  "js-cookie": "^3.0.5",
62
62
  "jwt-decode": "^4.0.0",
63
- "microboard-temp": "^0.5.32",
63
+ "microboard-temp": "^0.5.33",
64
64
  "nanoid": "^5.1.5",
65
65
  "prop-types": "^15.8.1",
66
66
  "react-hot-toast": "2.4.1",