@versa_ai/vmml-editor 1.0.25 → 1.0.27

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.25 build D:\code\work\vmml-player\packages\editor
2
+ > @versa_ai/vmml-editor@1.0.27 build D:\code\work\vmml-player\packages\editor
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,7 +9,6 @@
9
9
  CLI Target: node16
10
10
  CJS Build start
11
11
  ESM Build start
12
- DTS Build start
13
12
 
14
13
   WARN  ▲ [WARNING] Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
15
14
 
@@ -67,6 +66,7 @@ More info and automated migrator: https://sass-lang.com/d/slash-div [35
67
66
 
68
67
 
69
68
 
69
+ DTS Build start
70
70
 
71
71
   WARN  ▲ [WARNING] Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
72
72
 
@@ -124,12 +124,12 @@ More info and automated migrator: https://sass-lang.com/d/slash-div [35
124
124
 
125
125
 
126
126
 
127
- ESM dist\index.mjs 113.59 KB
128
- ESM dist\index.mjs.map 218.26 KB
129
- ESM ⚡️ Build success in 3284ms
130
- CJS dist\index.js 115.23 KB
131
- CJS dist\index.js.map 218.55 KB
132
- CJS ⚡️ Build success in 3284ms
133
- DTS ⚡️ Build success in 5029ms
127
+ ESM dist\index.mjs 113.88 KB
128
+ ESM dist\index.mjs.map 218.86 KB
129
+ ESM ⚡️ Build success in 700ms
130
+ CJS dist\index.js 115.52 KB
131
+ CJS dist\index.js.map 219.15 KB
132
+ CJS ⚡️ Build success in 700ms
133
+ DTS ⚡️ Build success in 1636ms
134
134
  DTS dist\index.d.ts 158.00 B
135
135
  DTS dist\index.d.mts 158.00 B
package/dist/index.js CHANGED
@@ -2762,26 +2762,34 @@ var EditorFn = ({
2762
2762
  setPreviewState(false);
2763
2763
  }
2764
2764
  }, [dragState]);
2765
- const updateVmml = (v) => {
2765
+ const updateVmml = (v, checkFrame) => {
2766
2766
  var _a2, _b, _c;
2767
2767
  const { current: playerCurrent } = vmmlPlayerRef;
2768
2768
  const { current: canvasCurrent } = canvasRef;
2769
2769
  if (!playerCurrent) return;
2770
2770
  (_b = (_a2 = canvasCurrent == null ? void 0 : canvasCurrent.getCanvasCtx()) == null ? void 0 : _a2.clear) == null ? void 0 : _b.call(_a2);
2771
+ needPlay.current = false;
2772
+ const currentFrame = checkFrame ?? pauseFrame;
2771
2773
  const convertedVmml = vmmlUtils.convertVmmlTextScaleByForbidden(v);
2772
2774
  setVmmlState(convertedVmml);
2773
2775
  setDurationInFrames(vmmlUtils.getFrames(((_c = v == null ? void 0 : v.template) == null ? void 0 : _c.duration) || 1, fps));
2774
- playerCurrent.setVmml(convertedVmml, pauseFrame);
2776
+ playerCurrent.setVmml(convertedVmml, currentFrame);
2775
2777
  setRefreshEdit(Date.now());
2776
2778
  if (canvasCurrent) {
2777
- canvasCurrent.checkObjectInPoint(pauseFrame);
2779
+ canvasCurrent.checkObjectInPoint(currentFrame);
2778
2780
  }
2779
2781
  };
2782
+ const getCurrentFrame = () => {
2783
+ console.log(player, "getCurrentFrame>>>>>>>>>>>>");
2784
+ if (!player) return 0;
2785
+ return player.getPlayer().getCurrentFrame();
2786
+ };
2780
2787
  react.useImperativeHandle(
2781
2788
  ref,
2782
2789
  () => ({
2783
2790
  getActions,
2784
2791
  getfcObject,
2792
+ getCurrentFrame,
2785
2793
  getVmml,
2786
2794
  getPlayer,
2787
2795
  texteditClose,