@versa_ai/vmml-editor 1.0.5 → 1.0.6
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 +8 -8
- package/dist/index.js +11 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +11 -15
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.6 build D:\code\work\vmml-player\packages\editor
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -204,12 +204,12 @@ More info and automated migrator: https://sass-lang.com/d/slash-div[0m [1m[35
|
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m102.
|
|
208
|
-
[32mESM[39m [1mdist\index.mjs.map [22m[32m197.
|
|
209
|
-
[32mESM[39m ⚡️ Build success in
|
|
210
|
-
[32mCJS[39m [1mdist\index.js [22m[32m103.
|
|
211
|
-
[32mCJS[39m [1mdist\index.js.map [22m[32m197.
|
|
212
|
-
[32mCJS[39m ⚡️ Build success in
|
|
213
|
-
[32mDTS[39m ⚡️ Build success in
|
|
207
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m102.35 KB[39m
|
|
208
|
+
[32mESM[39m [1mdist\index.mjs.map [22m[32m197.47 KB[39m
|
|
209
|
+
[32mESM[39m ⚡️ Build success in 788ms
|
|
210
|
+
[32mCJS[39m [1mdist\index.js [22m[32m103.89 KB[39m
|
|
211
|
+
[32mCJS[39m [1mdist\index.js.map [22m[32m197.75 KB[39m
|
|
212
|
+
[32mCJS[39m ⚡️ Build success in 788ms
|
|
213
|
+
[32mDTS[39m ⚡️ Build success in 2270ms
|
|
214
214
|
[32mDTS[39m [1mdist\index.d.ts [22m[32m158.00 B[39m
|
|
215
215
|
[32mDTS[39m [1mdist\index.d.mts [22m[32m158.00 B[39m
|
package/dist/index.js
CHANGED
|
@@ -2229,6 +2229,7 @@ var EditorFn = ({
|
|
|
2229
2229
|
const [frame, setFrame] = react.useState(pauseFrame);
|
|
2230
2230
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
2231
2231
|
const [showCanvas, setShowCanvas] = react.useState(false);
|
|
2232
|
+
const [filterIds, setFilterIds] = react.useState([]);
|
|
2232
2233
|
const [durationInFrames, setDurationInFrames] = react.useState(vmmlUtils.getFrames(((_a = vmml == null ? undefined : vmml.template) == null ? undefined : _a.duration) || 1, fps));
|
|
2233
2234
|
const [previewState, setPreviewState] = react.useState(true);
|
|
2234
2235
|
const [menuState, setMenuState] = react.useState("");
|
|
@@ -2366,13 +2367,6 @@ var EditorFn = ({
|
|
|
2366
2367
|
const base64 = vmmlUtils.takeScreenshot(video);
|
|
2367
2368
|
current.updateImage(id, base64);
|
|
2368
2369
|
}
|
|
2369
|
-
switchClipDisplay("none");
|
|
2370
|
-
};
|
|
2371
|
-
const switchClipDisplay = (display) => {
|
|
2372
|
-
const clips = document.querySelectorAll("[data-editorType],[data-editclip='true']");
|
|
2373
|
-
clips.forEach((clip) => {
|
|
2374
|
-
clip.style.display = display;
|
|
2375
|
-
});
|
|
2376
2370
|
};
|
|
2377
2371
|
const createImage = async (file, emojiId) => {
|
|
2378
2372
|
const { current } = canvasRef;
|
|
@@ -2508,11 +2502,6 @@ var EditorFn = ({
|
|
|
2508
2502
|
initFcObjects(vmml.template.tracks);
|
|
2509
2503
|
}
|
|
2510
2504
|
}, [vmml]);
|
|
2511
|
-
react.useEffect(() => {
|
|
2512
|
-
if (!showCanvas) {
|
|
2513
|
-
switchClipDisplay("block");
|
|
2514
|
-
}
|
|
2515
|
-
}, [showCanvas]);
|
|
2516
2505
|
react.useEffect(() => {
|
|
2517
2506
|
if (player) {
|
|
2518
2507
|
const parent = player.getContainerNode();
|
|
@@ -2535,6 +2524,14 @@ var EditorFn = ({
|
|
|
2535
2524
|
};
|
|
2536
2525
|
}
|
|
2537
2526
|
}, [player]);
|
|
2527
|
+
react.useEffect(() => {
|
|
2528
|
+
if (showCanvas) {
|
|
2529
|
+
const ids = [...signList.map((item) => item.id), ...editableArray];
|
|
2530
|
+
setFilterIds(ids);
|
|
2531
|
+
} else {
|
|
2532
|
+
setFilterIds([]);
|
|
2533
|
+
}
|
|
2534
|
+
}, [showCanvas, signList]);
|
|
2538
2535
|
react.useEffect(() => {
|
|
2539
2536
|
if (dragState === 2) {
|
|
2540
2537
|
needPlay.current = false;
|
|
@@ -2596,7 +2593,8 @@ var EditorFn = ({
|
|
|
2596
2593
|
hideLoading,
|
|
2597
2594
|
editableArray,
|
|
2598
2595
|
premountFor: 40,
|
|
2599
|
-
pauseWhenBuffering
|
|
2596
|
+
pauseWhenBuffering,
|
|
2597
|
+
filterIds
|
|
2600
2598
|
}
|
|
2601
2599
|
) }),
|
|
2602
2600
|
/* @__PURE__ */ jsxRuntime.jsx(
|