@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @versa_ai/vmml-editor@1.0.5 build D:\code\work\vmml-player\packages\editor
2
+ > @versa_ai/vmml-editor@1.0.6 build D:\code\work\vmml-player\packages\editor
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -204,12 +204,12 @@ More info and automated migrator: https://sass-lang.com/d/slash-div [35
204
204
 
205
205
 
206
206
 
207
- ESM dist\index.mjs 102.41 KB
208
- ESM dist\index.mjs.map 197.55 KB
209
- ESM ⚡️ Build success in 793ms
210
- CJS dist\index.js 103.94 KB
211
- CJS dist\index.js.map 197.83 KB
212
- CJS ⚡️ Build success in 793ms
213
- DTS ⚡️ Build success in 1760ms
207
+ ESM dist\index.mjs 102.35 KB
208
+ ESM dist\index.mjs.map 197.47 KB
209
+ ESM ⚡️ Build success in 788ms
210
+ CJS dist\index.js 103.89 KB
211
+ CJS dist\index.js.map 197.75 KB
212
+ CJS ⚡️ Build success in 788ms
213
+ DTS ⚡️ Build success in 2270ms
214
214
  DTS dist\index.d.ts 158.00 B
215
215
  DTS dist\index.d.mts 158.00 B
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(