microboard-temp 0.5.32 → 0.5.33

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.
@@ -9049,11 +9049,11 @@ var decodeHtml = (htmlString) => {
9049
9049
  };
9050
9050
  function getTransformationData(el) {
9051
9051
  const transformStyle = el.style.transform;
9052
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
9052
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
9053
9053
  if (transformMatch) {
9054
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
9054
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
9055
9055
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
9056
- return { ...matrix, rotate: 0, isLocked: false };
9056
+ return { ...matrix, rotate, isLocked: false };
9057
9057
  }
9058
9058
  return { ...new Matrix2, rotate: 0, isLocked: false };
9059
9059
  }
@@ -42259,7 +42259,7 @@ class ImageItem extends BaseItem {
42259
42259
  renderHTML(documentFactory) {
42260
42260
  const div = documentFactory.createElement("image-item");
42261
42261
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
42262
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
42262
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
42263
42263
  div.style.backgroundImage = `url(${this.storageLink})`;
42264
42264
  div.id = this.getId();
42265
42265
  div.style.width = `${this.imageDimension.width}px`;
@@ -47937,7 +47937,7 @@ class Card extends BaseItem {
47937
47937
  renderHTML(documentFactory) {
47938
47938
  const div = super.renderHTML(documentFactory);
47939
47939
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47940
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47940
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
47941
47941
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47942
47942
  div.id = this.getId();
47943
47943
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/dist/cjs/index.js CHANGED
@@ -9049,11 +9049,11 @@ var decodeHtml = (htmlString) => {
9049
9049
  };
9050
9050
  function getTransformationData(el) {
9051
9051
  const transformStyle = el.style.transform;
9052
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
9052
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
9053
9053
  if (transformMatch) {
9054
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
9054
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
9055
9055
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
9056
- return { ...matrix, rotate: 0, isLocked: false };
9056
+ return { ...matrix, rotate, isLocked: false };
9057
9057
  }
9058
9058
  return { ...new Matrix2, rotate: 0, isLocked: false };
9059
9059
  }
@@ -42259,7 +42259,7 @@ class ImageItem extends BaseItem {
42259
42259
  renderHTML(documentFactory) {
42260
42260
  const div = documentFactory.createElement("image-item");
42261
42261
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
42262
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
42262
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
42263
42263
  div.style.backgroundImage = `url(${this.storageLink})`;
42264
42264
  div.id = this.getId();
42265
42265
  div.style.width = `${this.imageDimension.width}px`;
@@ -47937,7 +47937,7 @@ class Card extends BaseItem {
47937
47937
  renderHTML(documentFactory) {
47938
47938
  const div = super.renderHTML(documentFactory);
47939
47939
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47940
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47940
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
47941
47941
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47942
47942
  div.id = this.getId();
47943
47943
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/dist/cjs/node.js CHANGED
@@ -10086,11 +10086,11 @@ var decodeHtml = (htmlString) => {
10086
10086
  };
10087
10087
  function getTransformationData(el) {
10088
10088
  const transformStyle = el.style.transform;
10089
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
10089
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
10090
10090
  if (transformMatch) {
10091
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
10091
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
10092
10092
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
10093
- return { ...matrix, rotate: 0, isLocked: false };
10093
+ return { ...matrix, rotate, isLocked: false };
10094
10094
  }
10095
10095
  return { ...new Matrix2, rotate: 0, isLocked: false };
10096
10096
  }
@@ -44732,7 +44732,7 @@ class ImageItem extends BaseItem {
44732
44732
  renderHTML(documentFactory) {
44733
44733
  const div = documentFactory.createElement("image-item");
44734
44734
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
44735
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
44735
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
44736
44736
  div.style.backgroundImage = `url(${this.storageLink})`;
44737
44737
  div.id = this.getId();
44738
44738
  div.style.width = `${this.imageDimension.width}px`;
@@ -50410,7 +50410,7 @@ class Card extends BaseItem {
50410
50410
  renderHTML(documentFactory) {
50411
50411
  const div = super.renderHTML(documentFactory);
50412
50412
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50413
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50413
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
50414
50414
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
50415
50415
  div.id = this.getId();
50416
50416
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
@@ -8886,11 +8886,11 @@ var decodeHtml = (htmlString) => {
8886
8886
  };
8887
8887
  function getTransformationData(el) {
8888
8888
  const transformStyle = el.style.transform;
8889
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
8889
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
8890
8890
  if (transformMatch) {
8891
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
8891
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
8892
8892
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
8893
- return { ...matrix, rotate: 0, isLocked: false };
8893
+ return { ...matrix, rotate, isLocked: false };
8894
8894
  }
8895
8895
  return { ...new Matrix2, rotate: 0, isLocked: false };
8896
8896
  }
@@ -42105,7 +42105,7 @@ class ImageItem extends BaseItem {
42105
42105
  renderHTML(documentFactory) {
42106
42106
  const div = documentFactory.createElement("image-item");
42107
42107
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
42108
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
42108
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
42109
42109
  div.style.backgroundImage = `url(${this.storageLink})`;
42110
42110
  div.id = this.getId();
42111
42111
  div.style.width = `${this.imageDimension.width}px`;
@@ -47783,7 +47783,7 @@ class Card extends BaseItem {
47783
47783
  renderHTML(documentFactory) {
47784
47784
  const div = super.renderHTML(documentFactory);
47785
47785
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47786
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47786
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
47787
47787
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47788
47788
  div.id = this.getId();
47789
47789
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/dist/esm/index.js CHANGED
@@ -8879,11 +8879,11 @@ var decodeHtml = (htmlString) => {
8879
8879
  };
8880
8880
  function getTransformationData(el) {
8881
8881
  const transformStyle = el.style.transform;
8882
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
8882
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
8883
8883
  if (transformMatch) {
8884
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
8884
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
8885
8885
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
8886
- return { ...matrix, rotate: 0, isLocked: false };
8886
+ return { ...matrix, rotate, isLocked: false };
8887
8887
  }
8888
8888
  return { ...new Matrix2, rotate: 0, isLocked: false };
8889
8889
  }
@@ -42098,7 +42098,7 @@ class ImageItem extends BaseItem {
42098
42098
  renderHTML(documentFactory) {
42099
42099
  const div = documentFactory.createElement("image-item");
42100
42100
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
42101
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
42101
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
42102
42102
  div.style.backgroundImage = `url(${this.storageLink})`;
42103
42103
  div.id = this.getId();
42104
42104
  div.style.width = `${this.imageDimension.width}px`;
@@ -47776,7 +47776,7 @@ class Card extends BaseItem {
47776
47776
  renderHTML(documentFactory) {
47777
47777
  const div = super.renderHTML(documentFactory);
47778
47778
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
47779
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
47779
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
47780
47780
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
47781
47781
  div.id = this.getId();
47782
47782
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/dist/esm/node.js CHANGED
@@ -9663,11 +9663,11 @@ var decodeHtml = (htmlString) => {
9663
9663
  };
9664
9664
  function getTransformationData(el) {
9665
9665
  const transformStyle = el.style.transform;
9666
- const transformMatch = transformStyle.match(/translate\(([^,]+)px,\s*([^)]+)px\)\s*scale\(([^,]+),\s*([^)]+)\)/);
9666
+ const transformMatch = transformStyle.match(/(?:translate\(([^,]+)px,\s*([^)]+)px\))?\s*(?:scale\(([^,]+),\s*([^)]+)\))?\s*(?:rotate\(([^)]+)deg\))?/);
9667
9667
  if (transformMatch) {
9668
- const [, translateX, translateY, scaleX, scaleY] = transformMatch.map(Number);
9668
+ const [, translateX, translateY, scaleX, scaleY, rotate] = transformMatch.map(Number);
9669
9669
  const matrix = new Matrix2(translateX, translateY, scaleX, scaleY);
9670
- return { ...matrix, rotate: 0, isLocked: false };
9670
+ return { ...matrix, rotate, isLocked: false };
9671
9671
  }
9672
9672
  return { ...new Matrix2, rotate: 0, isLocked: false };
9673
9673
  }
@@ -44566,7 +44566,7 @@ class ImageItem extends BaseItem {
44566
44566
  renderHTML(documentFactory) {
44567
44567
  const div = documentFactory.createElement("image-item");
44568
44568
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
44569
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
44569
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
44570
44570
  div.style.backgroundImage = `url(${this.storageLink})`;
44571
44571
  div.id = this.getId();
44572
44572
  div.style.width = `${this.imageDimension.width}px`;
@@ -50244,7 +50244,7 @@ class Card extends BaseItem {
50244
50244
  renderHTML(documentFactory) {
50245
50245
  const div = super.renderHTML(documentFactory);
50246
50246
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
50247
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
50247
+ const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY}) rotate(${this.transformation.getRotation()}deg)`;
50248
50248
  div.style.backgroundImage = `url(${this.imageToRender?.src || this.backsideUrl})`;
50249
50249
  div.id = this.getId();
50250
50250
  div.style.width = `${conf.CARD_DIMENSIONS.width}px`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.32",
3
+ "version": "0.5.33",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",