@momoyu-ink/kit 0.2.0 → 0.3.0

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.
@@ -0,0 +1,21 @@
1
+ export type VideoCommand = {
2
+ subCommand: 'play';
3
+ } | {
4
+ subCommand: 'pause';
5
+ } | {
6
+ subCommand: 'resume';
7
+ } | {
8
+ subCommand: 'stop';
9
+ } | {
10
+ subCommand: 'seek';
11
+ time: number;
12
+ } | {
13
+ subCommand: 'setVolume';
14
+ volume: number;
15
+ } | {
16
+ subCommand: 'setMuted';
17
+ muted: boolean;
18
+ } | {
19
+ subCommand: 'setLoop';
20
+ enabled: boolean;
21
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=VideoCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoCommand.js","sourceRoot":"","sources":["../../src/bindings/VideoCommand.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
@@ -0,0 +1,7 @@
1
+ export type VideoProps = {
2
+ src: string | null;
3
+ loop?: boolean;
4
+ autoPlay?: boolean;
5
+ volume?: number;
6
+ muted?: boolean;
7
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=VideoProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoProps.js","sourceRoot":"","sources":["../../src/bindings/VideoProps.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
@@ -11,6 +11,7 @@ import { BackdropProps } from './bindings/BackdropProps';
11
11
  import { SpriteProps } from './bindings/SpriteProps';
12
12
  import { TextProps } from './bindings/TextProps';
13
13
  import { AnimationProps } from './bindings/AnimationProps';
14
+ import { VideoProps } from './bindings/VideoProps';
14
15
  export type Tuple2 = [number, number];
15
16
  export type Tuple3 = [number, number, number];
16
17
  export type Tuple4 = [number, number, number, number];
@@ -39,6 +40,10 @@ export type MoyuClipAttributes = ClipProps & MoyuNodeAttributes;
39
40
  export type MoyuFilterAttributes = FilterProps & MoyuNodeAttributes;
40
41
  export type MoyuBackdropAttributes = BackdropProps & MoyuNodeAttributes;
41
42
  export type MoyuAnimationAttributes = AnimationProps & MoyuNodeAttributes;
43
+ export type MoyuVideoAttributes = VideoProps & MoyuNodeAttributes & {
44
+ onEnded?: () => void;
45
+ onStateChange?: (state: string) => void;
46
+ };
42
47
  export type MoyuSpriteAttributes = SpriteProps & MoyuNodeAttributes;
43
48
  export type MoyuTextAttributes = TextProps & MoyuNodeAttributes & {
44
49
  onStart?: () => void;
@@ -70,5 +75,6 @@ export declare namespace JSX {
70
75
  filter: DetailedMoyuProps<MoyuFilterAttributes>;
71
76
  backdrop: DetailedMoyuProps<MoyuBackdropAttributes>;
72
77
  animation: DetailedMoyuProps<MoyuAnimationAttributes>;
78
+ video: DetailedMoyuProps<MoyuVideoAttributes>;
73
79
  }
74
80
  }
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.primitives = void 0;
4
- exports.primitives = ['container', 'sprite', 'text', 'clip', 'filter', 'backdrop', 'animation'];
4
+ exports.primitives = [
5
+ 'container',
6
+ 'sprite',
7
+ 'text',
8
+ 'clip',
9
+ 'filter',
10
+ 'backdrop',
11
+ 'animation',
12
+ 'video',
13
+ ];
5
14
  //# sourceMappingURL=primitives.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/spring/primitives.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/spring/primitives.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAiB;IACtC,WAAW;IACX,QAAQ;IACR,MAAM;IACN,MAAM;IACN,QAAQ;IACR,UAAU;IACV,WAAW;IACX,OAAO;CACR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momoyu-ink/kit",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Software Development Kit of Moyu Visual Novel Engine",
5
5
  "main": "dist/lib.js",
6
6
  "module": "dist/lib.js",