microboard-ui-temp 0.1.111 → 0.1.112
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.css +6 -0
- package/dist/index.js +9 -6
- package/dist/spa.js +9 -6
- package/package.json +2 -2
package/dist/index.css
CHANGED
|
@@ -2871,6 +2871,12 @@ a.link_jFMnzg {
|
|
|
2871
2871
|
background-color: #f7f7f8;
|
|
2872
2872
|
}
|
|
2873
2873
|
|
|
2874
|
+
.quaternary_Lhh5GA {
|
|
2875
|
+
color: #fff;
|
|
2876
|
+
background-color: #924fe8;
|
|
2877
|
+
border: 1px solid #924fe8;
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2874
2880
|
.quaternary_Lhh5GA:hover {
|
|
2875
2881
|
background-color: #b799f5;
|
|
2876
2882
|
border: 1px solid #924fe8;
|
package/dist/index.js
CHANGED
|
@@ -235404,7 +235404,8 @@ var conf = {
|
|
|
235404
235404
|
DECK_HORIZONTAL_OFFSET: 2,
|
|
235405
235405
|
DECK_VERTICAL_OFFSET: 2,
|
|
235406
235406
|
CARD_DIMENSIONS: { width: 250, height: 400 },
|
|
235407
|
-
DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
|
|
235407
|
+
DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
|
|
235408
|
+
MAX_CARD_SIZE: 500
|
|
235408
235409
|
};
|
|
235409
235410
|
initDefaultI18N();
|
|
235410
235411
|
|
|
@@ -275501,11 +275502,7 @@ class Card extends BaseItem {
|
|
|
275501
275502
|
}
|
|
275502
275503
|
ctx.translate(centerX, centerY);
|
|
275503
275504
|
ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
|
|
275504
|
-
|
|
275505
|
-
ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
|
|
275506
|
-
} else {
|
|
275507
|
-
ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
|
|
275508
|
-
}
|
|
275505
|
+
ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
|
|
275509
275506
|
ctx.restore();
|
|
275510
275507
|
}
|
|
275511
275508
|
}
|
|
@@ -439238,6 +439235,12 @@ function CreateCardsModal() {
|
|
|
439238
439235
|
const { width: width3, height: height4 } = await getImageDimensions(file);
|
|
439239
439236
|
const { width: defaultWidth, height: defaultHeight } = conf.DEFAULT_GAME_ITEM_DIMENSIONS;
|
|
439240
439237
|
const normalizedDimensions = width3 > height4 ? { width: defaultWidth * width3 / height4, height: defaultHeight } : { width: defaultWidth, height: defaultHeight * height4 / width3 };
|
|
439238
|
+
if (normalizedDimensions.width > conf.MAX_CARD_SIZE) {
|
|
439239
|
+
normalizedDimensions.width = conf.MAX_CARD_SIZE;
|
|
439240
|
+
}
|
|
439241
|
+
if (normalizedDimensions.height > conf.MAX_CARD_SIZE) {
|
|
439242
|
+
normalizedDimensions.height = conf.MAX_CARD_SIZE;
|
|
439243
|
+
}
|
|
439241
439244
|
setCardDimensions(normalizedDimensions);
|
|
439242
439245
|
}
|
|
439243
439246
|
};
|
package/dist/spa.js
CHANGED
|
@@ -235404,7 +235404,8 @@ var conf = {
|
|
|
235404
235404
|
DECK_HORIZONTAL_OFFSET: 2,
|
|
235405
235405
|
DECK_VERTICAL_OFFSET: 2,
|
|
235406
235406
|
CARD_DIMENSIONS: { width: 250, height: 400 },
|
|
235407
|
-
DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
|
|
235407
|
+
DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
|
|
235408
|
+
MAX_CARD_SIZE: 500
|
|
235408
235409
|
};
|
|
235409
235410
|
initDefaultI18N();
|
|
235410
235411
|
|
|
@@ -275501,11 +275502,7 @@ class Card extends BaseItem {
|
|
|
275501
275502
|
}
|
|
275502
275503
|
ctx.translate(centerX, centerY);
|
|
275503
275504
|
ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
|
|
275504
|
-
|
|
275505
|
-
ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
|
|
275506
|
-
} else {
|
|
275507
|
-
ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
|
|
275508
|
-
}
|
|
275505
|
+
ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
|
|
275509
275506
|
ctx.restore();
|
|
275510
275507
|
}
|
|
275511
275508
|
}
|
|
@@ -439238,6 +439235,12 @@ function CreateCardsModal() {
|
|
|
439238
439235
|
const { width: width3, height: height4 } = await getImageDimensions(file);
|
|
439239
439236
|
const { width: defaultWidth, height: defaultHeight } = conf.DEFAULT_GAME_ITEM_DIMENSIONS;
|
|
439240
439237
|
const normalizedDimensions = width3 > height4 ? { width: defaultWidth * width3 / height4, height: defaultHeight } : { width: defaultWidth, height: defaultHeight * height4 / width3 };
|
|
439238
|
+
if (normalizedDimensions.width > conf.MAX_CARD_SIZE) {
|
|
439239
|
+
normalizedDimensions.width = conf.MAX_CARD_SIZE;
|
|
439240
|
+
}
|
|
439241
|
+
if (normalizedDimensions.height > conf.MAX_CARD_SIZE) {
|
|
439242
|
+
normalizedDimensions.height = conf.MAX_CARD_SIZE;
|
|
439243
|
+
}
|
|
439241
439244
|
setCardDimensions(normalizedDimensions);
|
|
439242
439245
|
}
|
|
439243
439246
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.112",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
64
64
|
"js-cookie": "^3.0.5",
|
|
65
65
|
"jwt-decode": "^4.0.0",
|
|
66
|
-
"microboard-temp": "^0.5.
|
|
66
|
+
"microboard-temp": "^0.5.43",
|
|
67
67
|
"nanoid": "^5.1.5",
|
|
68
68
|
"prop-types": "^15.8.1",
|
|
69
69
|
"react-hot-toast": "2.4.1",
|