@versa_ai/vmml-editor 1.0.20 → 1.0.22
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/.turbo/turbo-build.log +9 -9
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/EditorCanvas.tsx +55 -39
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @versa_ai/vmml-editor@1.0.
|
|
2
|
+
> @versa_ai/vmml-editor@1.0.22 build D:\code\work\vmml-player\packages\editor
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
[34mCLI[39m Target: node16
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[34mDTS[39m Build start
|
|
13
12
|
|
|
14
13
|
[43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
|
|
15
14
|
|
|
@@ -124,12 +123,13 @@ More info and automated migrator: https://sass-lang.com/d/slash-div[0m [1m[35
|
|
|
124
123
|
|
|
125
124
|
|
|
126
125
|
|
|
127
|
-
[
|
|
128
|
-
[32mCJS[39m [1mdist\index.js
|
|
129
|
-
[32mCJS[39m
|
|
130
|
-
[
|
|
131
|
-
[32mESM[39m [1mdist\index.mjs
|
|
132
|
-
[32mESM[39m
|
|
133
|
-
[
|
|
126
|
+
[34mDTS[39m Build start
|
|
127
|
+
[32mCJS[39m [1mdist\index.js [22m[32m114.41 KB[39m
|
|
128
|
+
[32mCJS[39m [1mdist\index.js.map [22m[32m216.82 KB[39m
|
|
129
|
+
[32mCJS[39m ⚡️ Build success in 685ms
|
|
130
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m112.78 KB[39m
|
|
131
|
+
[32mESM[39m [1mdist\index.mjs.map [22m[32m216.53 KB[39m
|
|
132
|
+
[32mESM[39m ⚡️ Build success in 685ms
|
|
133
|
+
[32mDTS[39m ⚡️ Build success in 2259ms
|
|
134
134
|
[32mDTS[39m [1mdist\index.d.ts [22m[32m158.00 B[39m
|
|
135
135
|
[32mDTS[39m [1mdist\index.d.mts [22m[32m158.00 B[39m
|
package/dist/index.js
CHANGED
|
@@ -1323,7 +1323,7 @@ var EditorCanvas = react.forwardRef(
|
|
|
1323
1323
|
const { textContent, backgroundColor, textColor, posParam, fontAssetUrl, alignType, strokeColor, strokeWidth } = clip.textClip;
|
|
1324
1324
|
const scaleX = posParam.scaleX * fontSize / 22 / widthScaleRef.current;
|
|
1325
1325
|
const scaleY = posParam.scaleY * fontSize / 22 / heightScaleRef.current;
|
|
1326
|
-
const strokeW = strokeWidth
|
|
1326
|
+
const strokeW = strokeWidth * 26 * 1.5 / fontSize;
|
|
1327
1327
|
const left = canvasSize.width * posParam.centerX;
|
|
1328
1328
|
const top = canvasSize.height * posParam.centerY;
|
|
1329
1329
|
const bgColor = backgroundColor ? vmmlUtils.argbToRgba(backgroundColor) : "transparent";
|
|
@@ -1356,6 +1356,7 @@ var EditorCanvas = react.forwardRef(
|
|
|
1356
1356
|
angle: posParam.rotationZ,
|
|
1357
1357
|
originX: "center",
|
|
1358
1358
|
originY: "center",
|
|
1359
|
+
objectCaching: false,
|
|
1359
1360
|
clipData: {
|
|
1360
1361
|
id: clip.id,
|
|
1361
1362
|
inPoint: clip.inPoint,
|
|
@@ -1434,16 +1435,30 @@ var EditorCanvas = react.forwardRef(
|
|
|
1434
1435
|
const fontFamily = fontAssetUrl ? getFontFamilyName(fontAssetUrl) : "sansMedium";
|
|
1435
1436
|
lines.forEach((line) => {
|
|
1436
1437
|
const p = document.createElement("p");
|
|
1437
|
-
p.style.
|
|
1438
|
+
p.style.position = "relative";
|
|
1438
1439
|
p.style.fontSize = "22px";
|
|
1439
1440
|
p.style.lineHeight = "22px";
|
|
1440
1441
|
p.style.fontFamily = fontFamily;
|
|
1441
1442
|
p.style.whiteSpace = "nowrap";
|
|
1442
|
-
p.style.padding = "0";
|
|
1443
1443
|
p.style.margin = "0";
|
|
1444
|
-
p.style.
|
|
1445
|
-
p.style.
|
|
1446
|
-
|
|
1444
|
+
p.style.padding = "0";
|
|
1445
|
+
p.style.zIndex = "2";
|
|
1446
|
+
const fill = document.createElement("span");
|
|
1447
|
+
fill.textContent = line || " ";
|
|
1448
|
+
fill.style.color = textColor;
|
|
1449
|
+
fill.style.position = "relative";
|
|
1450
|
+
fill.style.zIndex = "1";
|
|
1451
|
+
const stroke = document.createElement("span");
|
|
1452
|
+
stroke.textContent = line || " ";
|
|
1453
|
+
stroke.style.position = "absolute";
|
|
1454
|
+
stroke.style.left = "0";
|
|
1455
|
+
stroke.style.top = "0";
|
|
1456
|
+
stroke.style.color = "transparent";
|
|
1457
|
+
stroke.style.webkitTextStrokeWidth = `${strokeW}px`;
|
|
1458
|
+
stroke.style.webkitTextStrokeColor = stColor;
|
|
1459
|
+
stroke.style.zIndex = "-1";
|
|
1460
|
+
p.appendChild(fill);
|
|
1461
|
+
p.appendChild(stroke);
|
|
1447
1462
|
container.appendChild(p);
|
|
1448
1463
|
});
|
|
1449
1464
|
container.style.padding = "6.5px 7px 6.5px 7px";
|