microboard-ui-temp 0.1.56 → 0.1.58

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -230226,8 +230226,8 @@ class BaseItem extends Mbr {
230226
230226
  }
230227
230227
  renderHTML(documentFactory) {
230228
230228
  const div = documentFactory.createElement("base-item");
230229
- const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
230230
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
230229
+ const { translateX, translateY } = this.transformation.matrix;
230230
+ const transform = `translate(${translateX}px, ${translateY}px) scale(1, 1)`;
230231
230231
  div.style.backgroundColor = "#b2b0c3";
230232
230232
  div.id = this.getId();
230233
230233
  div.style.width = `${this.getWidth()}px`;
@@ -256163,15 +256163,21 @@ class Deck extends BaseItem {
256163
256163
  }
256164
256164
  renderHTML(documentFactory) {
256165
256165
  const div = super.renderHTML(documentFactory);
256166
- if (!this.cachedCanvas || !this.cachedCanvas.width || !this.cachedCanvas.height) {
256166
+ const cards = this.index?.list();
256167
+ const topCard = cards[cards.length - 1];
256168
+ if (!topCard) {
256167
256169
  return div;
256168
256170
  }
256169
256171
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
256170
- const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
256171
- div.style.backgroundImage = `url(${this.cachedCanvas.toDataURL("image/png")})`;
256172
+ const transform = `translate(${translateX}px, ${translateY}px) scale(1, 1)`;
256173
+ const topCardElement = topCard.renderHTML(documentFactory);
256174
+ div.appendChild(topCardElement);
256175
+ const offset = ((this.index?.list().length || 0) - 1) * 2;
256176
+ topCardElement.style.transform = `translate(${offset}px, ${0}px) scale(1, 1)`;
256172
256177
  div.id = this.getId();
256173
256178
  div.style.width = `${this.getWidth()}px`;
256174
256179
  div.style.height = `${this.getHeight()}px`;
256180
+ div.style.boxShadow = `${offset}px 0px 0px 0px rgba(34, 60, 80, 0.74) inset`;
256175
256181
  div.style.transformOrigin = "top left";
256176
256182
  div.style.transform = transform;
256177
256183
  div.style.position = "absolute";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-ui-temp",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
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.16",
63
+ "microboard-temp": "^0.5.18",
64
64
  "nanoid": "^5.1.5",
65
65
  "prop-types": "^15.8.1",
66
66
  "react-hot-toast": "2.4.1",