@momoyu-ink/kit 0.6.0 → 0.7.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.
@@ -50,10 +50,16 @@ type AudioCommand = {
50
50
  name: string;
51
51
  src: string;
52
52
  settings?: AudioSettings;
53
+ } | {
54
+ subCommand: 'loadAndPlay';
55
+ name: string;
56
+ src: string;
57
+ settings?: AudioSettings;
53
58
  } | {
54
59
  subCommand: 'release';
55
60
  name: string;
56
61
  fadeTime?: number;
62
+ silentFail?: boolean;
57
63
  } | {
58
64
  subCommand: 'play';
59
65
  name: string;
@@ -175,6 +181,20 @@ type ScenarioCommand = {
175
181
  };
176
182
  } | {
177
183
  subCommand: 'getVariables';
184
+ } | {
185
+ subCommand: 'setLocalVariable';
186
+ name: string;
187
+ value: JsonValue;
188
+ } | {
189
+ subCommand: 'getLocalVariable';
190
+ name: string;
191
+ } | {
192
+ subCommand: 'setLocalVariables';
193
+ variables: {
194
+ [key in string]: JsonValue;
195
+ };
196
+ } | {
197
+ subCommand: 'getLocalVariables';
178
198
  } | {
179
199
  subCommand: 'setPermanentVariable';
180
200
  key: string;
@@ -242,6 +262,8 @@ type ScenarioCommand = {
242
262
  pattern?: string;
243
263
  };
244
264
 
265
+ type ReadFormat = 'text' | 'binary';
266
+
245
267
  type WindowState = 'idle' | 'maximized' | 'minimized' | 'fullscreen';
246
268
 
247
269
  type SystemCommand = {
@@ -268,6 +290,10 @@ type SystemCommand = {
268
290
  width?: number;
269
291
  height?: number;
270
292
  keepAspectRatio?: boolean;
293
+ } | {
294
+ subCommand: 'readFile';
295
+ path: string;
296
+ format?: ReadFormat;
271
297
  } | {
272
298
  subCommand: 'getParams';
273
299
  } | {
@@ -617,4 +643,4 @@ declare namespace JSX {
617
643
  }
618
644
  }
619
645
 
620
- export { type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EffectParams as E, type GamepadCommand as G, JSX as J, type KeyboardEvent as K, type MouseEvent as M, Node as N, type ScenarioCommand as S, type TextCommand as T, type WindowState as W, type MoyuEvent as a, type MaybePromise as b, type AudioSettings as c, type KeyboardEventKind as d, type MakeNullOptional as e, type MouseEventKind as f, type MoyuAnimationAttributes as g, type MoyuBackdropAttributes as h, type MoyuClipAttributes as i, type MoyuContainerAttributes as j, type MoyuEventHandler as k, type MoyuFilterAttributes as l, type MoyuListenerAttributes as m, type MoyuNodeAttributes as n, type MoyuSpriteAttributes as o, type MoyuTextAttributes as p, type MoyuVideoAttributes as q, type SystemCommand as r, type TouchEvent as s, type TouchEventKind as t, type Tuple2 as u, type Tuple3 as v, type Tuple4 as w, createBubbleEvent as x, getStageSize as y };
646
+ export { type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EffectParams as E, type GamepadCommand as G, JSX as J, type KeyboardEvent as K, type MouseEvent as M, Node as N, type ScenarioCommand as S, type TextCommand as T, type WindowState as W, type MoyuEvent as a, type MaybePromise as b, type JsonValue as c, type AudioSettings as d, type KeyboardEventKind as e, type MakeNullOptional as f, type MouseEventKind as g, type MoyuAnimationAttributes as h, type MoyuBackdropAttributes as i, type MoyuClipAttributes as j, type MoyuContainerAttributes as k, type MoyuEventHandler as l, type MoyuFilterAttributes as m, type MoyuListenerAttributes as n, type MoyuNodeAttributes as o, type MoyuSpriteAttributes as p, type MoyuTextAttributes as q, type MoyuVideoAttributes as r, type SystemCommand as s, type TouchEvent as t, type TouchEventKind as u, type Tuple2 as v, type Tuple3 as w, type Tuple4 as x, createBubbleEvent as y, getStageSize as z };
@@ -50,10 +50,16 @@ type AudioCommand = {
50
50
  name: string;
51
51
  src: string;
52
52
  settings?: AudioSettings;
53
+ } | {
54
+ subCommand: 'loadAndPlay';
55
+ name: string;
56
+ src: string;
57
+ settings?: AudioSettings;
53
58
  } | {
54
59
  subCommand: 'release';
55
60
  name: string;
56
61
  fadeTime?: number;
62
+ silentFail?: boolean;
57
63
  } | {
58
64
  subCommand: 'play';
59
65
  name: string;
@@ -175,6 +181,20 @@ type ScenarioCommand = {
175
181
  };
176
182
  } | {
177
183
  subCommand: 'getVariables';
184
+ } | {
185
+ subCommand: 'setLocalVariable';
186
+ name: string;
187
+ value: JsonValue;
188
+ } | {
189
+ subCommand: 'getLocalVariable';
190
+ name: string;
191
+ } | {
192
+ subCommand: 'setLocalVariables';
193
+ variables: {
194
+ [key in string]: JsonValue;
195
+ };
196
+ } | {
197
+ subCommand: 'getLocalVariables';
178
198
  } | {
179
199
  subCommand: 'setPermanentVariable';
180
200
  key: string;
@@ -242,6 +262,8 @@ type ScenarioCommand = {
242
262
  pattern?: string;
243
263
  };
244
264
 
265
+ type ReadFormat = 'text' | 'binary';
266
+
245
267
  type WindowState = 'idle' | 'maximized' | 'minimized' | 'fullscreen';
246
268
 
247
269
  type SystemCommand = {
@@ -268,6 +290,10 @@ type SystemCommand = {
268
290
  width?: number;
269
291
  height?: number;
270
292
  keepAspectRatio?: boolean;
293
+ } | {
294
+ subCommand: 'readFile';
295
+ path: string;
296
+ format?: ReadFormat;
271
297
  } | {
272
298
  subCommand: 'getParams';
273
299
  } | {
@@ -617,4 +643,4 @@ declare namespace JSX {
617
643
  }
618
644
  }
619
645
 
620
- export { type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EffectParams as E, type GamepadCommand as G, JSX as J, type KeyboardEvent as K, type MouseEvent as M, Node as N, type ScenarioCommand as S, type TextCommand as T, type WindowState as W, type MoyuEvent as a, type MaybePromise as b, type AudioSettings as c, type KeyboardEventKind as d, type MakeNullOptional as e, type MouseEventKind as f, type MoyuAnimationAttributes as g, type MoyuBackdropAttributes as h, type MoyuClipAttributes as i, type MoyuContainerAttributes as j, type MoyuEventHandler as k, type MoyuFilterAttributes as l, type MoyuListenerAttributes as m, type MoyuNodeAttributes as n, type MoyuSpriteAttributes as o, type MoyuTextAttributes as p, type MoyuVideoAttributes as q, type SystemCommand as r, type TouchEvent as s, type TouchEventKind as t, type Tuple2 as u, type Tuple3 as v, type Tuple4 as w, createBubbleEvent as x, getStageSize as y };
646
+ export { type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EffectParams as E, type GamepadCommand as G, JSX as J, type KeyboardEvent as K, type MouseEvent as M, Node as N, type ScenarioCommand as S, type TextCommand as T, type WindowState as W, type MoyuEvent as a, type MaybePromise as b, type JsonValue as c, type AudioSettings as d, type KeyboardEventKind as e, type MakeNullOptional as f, type MouseEventKind as g, type MoyuAnimationAttributes as h, type MoyuBackdropAttributes as i, type MoyuClipAttributes as j, type MoyuContainerAttributes as k, type MoyuEventHandler as l, type MoyuFilterAttributes as m, type MoyuListenerAttributes as n, type MoyuNodeAttributes as o, type MoyuSpriteAttributes as p, type MoyuTextAttributes as q, type MoyuVideoAttributes as r, type SystemCommand as s, type TouchEvent as t, type TouchEventKind as u, type Tuple2 as v, type Tuple3 as w, type Tuple4 as x, createBubbleEvent as y, getStageSize as z };
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsxDEV } from 'react/jsx-dev-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-B5T-ZMWr.mjs';
2
+ export { J as JSX } from './jsx-dev-runtime-CKclO27C.mjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsxDEV } from 'react/jsx-dev-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-B5T-ZMWr.js';
2
+ export { J as JSX } from './jsx-dev-runtime-CKclO27C.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsx, jsxs } from 'react/jsx-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-B5T-ZMWr.mjs';
2
+ export { J as JSX } from './jsx-dev-runtime-CKclO27C.mjs';
3
3
  import 'react/jsx-dev-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsx, jsxs } from 'react/jsx-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-B5T-ZMWr.js';
2
+ export { J as JSX } from './jsx-dev-runtime-CKclO27C.js';
3
3
  import 'react/jsx-dev-runtime';
4
4
  import 'react';