microboard-ui-temp 0.1.93 → 0.1.94
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 +7 -5
- package/dist/spa.js +7 -5
- package/package.json +2 -2
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(/
|
|
217839
|
+
const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
|
|
217840
217840
|
if (transformMatch) {
|
|
217841
|
-
const [, translateX, translateY, scaleX, scaleY
|
|
217841
|
+
const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
|
|
217842
217842
|
const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
|
|
217843
|
-
return { ...matrix, rotate, isLocked: false };
|
|
217843
|
+
return { ...matrix, rotate: Number(el.getAttribute("rotation")) || 0, 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})`;
|
|
250336
250336
|
div.style.backgroundImage = `url(${this.storageLink})`;
|
|
250337
250337
|
div.id = this.getId();
|
|
250338
250338
|
div.style.width = `${this.imageDimension.width}px`;
|
|
@@ -250341,6 +250341,7 @@ class ImageItem extends BaseItem {
|
|
|
250341
250341
|
div.style.transform = transform;
|
|
250342
250342
|
div.style.position = "absolute";
|
|
250343
250343
|
div.style.backgroundSize = "cover";
|
|
250344
|
+
div.setAttribute("rotation", this.transformation.getRotation().toString());
|
|
250344
250345
|
div.setAttribute("data-link-to", this.linkTo.serialize() || "");
|
|
250345
250346
|
if (this.getLinkTo()) {
|
|
250346
250347
|
const linkElement = this.linkTo.renderHTML(documentFactory);
|
|
@@ -255965,7 +255966,7 @@ class Card extends BaseItem {
|
|
|
255965
255966
|
renderHTML(documentFactory) {
|
|
255966
255967
|
const div = super.renderHTML(documentFactory);
|
|
255967
255968
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
255968
|
-
const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})
|
|
255969
|
+
const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
|
|
255969
255970
|
div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
|
|
255970
255971
|
div.id = this.getId();
|
|
255971
255972
|
div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
|
|
@@ -255974,6 +255975,7 @@ class Card extends BaseItem {
|
|
|
255974
255975
|
div.style.transform = transform;
|
|
255975
255976
|
div.style.position = "absolute";
|
|
255976
255977
|
div.style.backgroundSize = "cover";
|
|
255978
|
+
div.setAttribute("rotation", this.transformation.getRotation().toString());
|
|
255977
255979
|
return div;
|
|
255978
255980
|
}
|
|
255979
255981
|
updateMbr() {
|
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(/
|
|
217839
|
+
const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
|
|
217840
217840
|
if (transformMatch) {
|
|
217841
|
-
const [, translateX, translateY, scaleX, scaleY
|
|
217841
|
+
const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
|
|
217842
217842
|
const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
|
|
217843
|
-
return { ...matrix, rotate, isLocked: false };
|
|
217843
|
+
return { ...matrix, rotate: Number(el.getAttribute("rotation")) || 0, 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})`;
|
|
250336
250336
|
div.style.backgroundImage = `url(${this.storageLink})`;
|
|
250337
250337
|
div.id = this.getId();
|
|
250338
250338
|
div.style.width = `${this.imageDimension.width}px`;
|
|
@@ -250341,6 +250341,7 @@ class ImageItem extends BaseItem {
|
|
|
250341
250341
|
div.style.transform = transform;
|
|
250342
250342
|
div.style.position = "absolute";
|
|
250343
250343
|
div.style.backgroundSize = "cover";
|
|
250344
|
+
div.setAttribute("rotation", this.transformation.getRotation().toString());
|
|
250344
250345
|
div.setAttribute("data-link-to", this.linkTo.serialize() || "");
|
|
250345
250346
|
if (this.getLinkTo()) {
|
|
250346
250347
|
const linkElement = this.linkTo.renderHTML(documentFactory);
|
|
@@ -255965,7 +255966,7 @@ class Card extends BaseItem {
|
|
|
255965
255966
|
renderHTML(documentFactory) {
|
|
255966
255967
|
const div = super.renderHTML(documentFactory);
|
|
255967
255968
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
255968
|
-
const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})
|
|
255969
|
+
const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
|
|
255969
255970
|
div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
|
|
255970
255971
|
div.id = this.getId();
|
|
255971
255972
|
div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
|
|
@@ -255974,6 +255975,7 @@ class Card extends BaseItem {
|
|
|
255974
255975
|
div.style.transform = transform;
|
|
255975
255976
|
div.style.position = "absolute";
|
|
255976
255977
|
div.style.backgroundSize = "cover";
|
|
255978
|
+
div.setAttribute("rotation", this.transformation.getRotation().toString());
|
|
255977
255979
|
return div;
|
|
255978
255980
|
}
|
|
255979
255981
|
updateMbr() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.94",
|
|
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.
|
|
63
|
+
"microboard-temp": "^0.5.34",
|
|
64
64
|
"nanoid": "^5.1.5",
|
|
65
65
|
"prop-types": "^15.8.1",
|
|
66
66
|
"react-hot-toast": "2.4.1",
|