@momoyu-ink/kit 0.4.2 → 0.5.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.
Files changed (181) hide show
  1. package/dist/jsx-dev-runtime--ZXLAgUi.d.mts +600 -0
  2. package/dist/jsx-dev-runtime--ZXLAgUi.d.ts +600 -0
  3. package/dist/jsx-dev-runtime.cjs +27 -0
  4. package/dist/jsx-dev-runtime.d.mts +4 -0
  5. package/dist/jsx-dev-runtime.d.ts +4 -0
  6. package/dist/jsx-dev-runtime.mjs +6 -0
  7. package/dist/jsx-runtime.cjs +28 -0
  8. package/dist/jsx-runtime.d.mts +4 -0
  9. package/dist/jsx-runtime.d.ts +4 -0
  10. package/dist/jsx-runtime.mjs +7 -0
  11. package/dist/lib.cjs +1503 -0
  12. package/dist/lib.d.mts +667 -0
  13. package/dist/lib.d.ts +667 -15
  14. package/dist/lib.mjs +1534 -0
  15. package/package.json +29 -8
  16. package/dist/bindings/AnimationFormat.d.ts +0 -1
  17. package/dist/bindings/AnimationFormat.js +0 -3
  18. package/dist/bindings/AnimationFrameCallbackEvent.d.ts +0 -3
  19. package/dist/bindings/AnimationFrameCallbackEvent.js +0 -3
  20. package/dist/bindings/AnimationProps.d.ts +0 -6
  21. package/dist/bindings/AnimationProps.js +0 -2
  22. package/dist/bindings/AudioCommand.d.ts +0 -54
  23. package/dist/bindings/AudioCommand.js +0 -2
  24. package/dist/bindings/AudioSettings.d.ts +0 -42
  25. package/dist/bindings/AudioSettings.js +0 -3
  26. package/dist/bindings/BackdropProps.d.ts +0 -6
  27. package/dist/bindings/BackdropProps.js +0 -2
  28. package/dist/bindings/BeforeUnloadEvent.d.ts +0 -1
  29. package/dist/bindings/BeforeUnloadEvent.js +0 -3
  30. package/dist/bindings/ClipProps.d.ts +0 -4
  31. package/dist/bindings/ClipProps.js +0 -3
  32. package/dist/bindings/CustomEvent.d.ts +0 -18
  33. package/dist/bindings/CustomEvent.js +0 -3
  34. package/dist/bindings/EffectParams.d.ts +0 -6
  35. package/dist/bindings/EffectParams.js +0 -3
  36. package/dist/bindings/FilterKind.d.ts +0 -34
  37. package/dist/bindings/FilterKind.js +0 -3
  38. package/dist/bindings/FilterProps.d.ts +0 -4
  39. package/dist/bindings/FilterProps.js +0 -2
  40. package/dist/bindings/FocusEvent.d.ts +0 -5
  41. package/dist/bindings/FocusEvent.js +0 -2
  42. package/dist/bindings/FocusEventKind.d.ts +0 -1
  43. package/dist/bindings/FocusEventKind.js +0 -3
  44. package/dist/bindings/FullScreenEvent.d.ts +0 -4
  45. package/dist/bindings/FullScreenEvent.js +0 -2
  46. package/dist/bindings/FullscreenEventKind.d.ts +0 -1
  47. package/dist/bindings/FullscreenEventKind.js +0 -3
  48. package/dist/bindings/GameEvent.d.ts +0 -1
  49. package/dist/bindings/GameEvent.js +0 -3
  50. package/dist/bindings/Gamepad.d.ts +0 -44
  51. package/dist/bindings/Gamepad.js +0 -2
  52. package/dist/bindings/GamepadButton.d.ts +0 -20
  53. package/dist/bindings/GamepadButton.js +0 -3
  54. package/dist/bindings/GamepadCommand.d.ts +0 -9
  55. package/dist/bindings/GamepadCommand.js +0 -2
  56. package/dist/bindings/GamepadEvent.d.ts +0 -12
  57. package/dist/bindings/GamepadEvent.js +0 -2
  58. package/dist/bindings/GamepadHapticActuator.d.ts +0 -11
  59. package/dist/bindings/GamepadHapticActuator.js +0 -3
  60. package/dist/bindings/KeyboardEventKind.d.ts +0 -1
  61. package/dist/bindings/KeyboardEventKind.js +0 -3
  62. package/dist/bindings/KeyboardLocation.d.ts +0 -1
  63. package/dist/bindings/KeyboardLocation.js +0 -3
  64. package/dist/bindings/Literal.d.ts +0 -3
  65. package/dist/bindings/Literal.js +0 -3
  66. package/dist/bindings/MouseEventKind.d.ts +0 -1
  67. package/dist/bindings/MouseEventKind.js +0 -3
  68. package/dist/bindings/MoyuCursor.d.ts +0 -1
  69. package/dist/bindings/MoyuCursor.js +0 -3
  70. package/dist/bindings/NineSliceMode.d.ts +0 -1
  71. package/dist/bindings/NineSliceMode.js +0 -3
  72. package/dist/bindings/NodeEvent.d.ts +0 -4
  73. package/dist/bindings/NodeEvent.js +0 -3
  74. package/dist/bindings/NodeProps.d.ts +0 -20
  75. package/dist/bindings/NodeProps.js +0 -2
  76. package/dist/bindings/RawKeyboardEvent.d.ts +0 -16
  77. package/dist/bindings/RawKeyboardEvent.js +0 -2
  78. package/dist/bindings/RawMouseEvent.d.ts +0 -12
  79. package/dist/bindings/RawMouseEvent.js +0 -2
  80. package/dist/bindings/RawTouchEvent.d.ts +0 -13
  81. package/dist/bindings/RawTouchEvent.js +0 -2
  82. package/dist/bindings/RawWheelEvent.d.ts +0 -10
  83. package/dist/bindings/RawWheelEvent.js +0 -2
  84. package/dist/bindings/ResizeEvent.d.ts +0 -4
  85. package/dist/bindings/ResizeEvent.js +0 -3
  86. package/dist/bindings/ResolvedArgument.d.ts +0 -5
  87. package/dist/bindings/ResolvedArgument.js +0 -2
  88. package/dist/bindings/ResolvedCommandLine.d.ts +0 -5
  89. package/dist/bindings/ResolvedCommandLine.js +0 -2
  90. package/dist/bindings/ResolvedSystemCallLine.d.ts +0 -5
  91. package/dist/bindings/ResolvedSystemCallLine.js +0 -2
  92. package/dist/bindings/ScenarioCommand.d.ts +0 -103
  93. package/dist/bindings/ScenarioCommand.js +0 -2
  94. package/dist/bindings/ScenarioEvent.d.ts +0 -4
  95. package/dist/bindings/ScenarioEvent.js +0 -2
  96. package/dist/bindings/SpriteMode.d.ts +0 -1
  97. package/dist/bindings/SpriteMode.js +0 -3
  98. package/dist/bindings/SpriteProps.d.ts +0 -11
  99. package/dist/bindings/SpriteProps.js +0 -2
  100. package/dist/bindings/SystemCommand.d.ts +0 -30
  101. package/dist/bindings/SystemCommand.js +0 -2
  102. package/dist/bindings/TextCommand.d.ts +0 -9
  103. package/dist/bindings/TextCommand.js +0 -3
  104. package/dist/bindings/TextEvent.d.ts +0 -1
  105. package/dist/bindings/TextEvent.js +0 -3
  106. package/dist/bindings/TextLine.d.ts +0 -5
  107. package/dist/bindings/TextLine.js +0 -3
  108. package/dist/bindings/TextPrintMode.d.ts +0 -4
  109. package/dist/bindings/TextPrintMode.js +0 -3
  110. package/dist/bindings/TextProps.d.ts +0 -41
  111. package/dist/bindings/TextProps.js +0 -2
  112. package/dist/bindings/TouchEventKind.d.ts +0 -1
  113. package/dist/bindings/TouchEventKind.js +0 -3
  114. package/dist/bindings/VideoCommand.d.ts +0 -21
  115. package/dist/bindings/VideoCommand.js +0 -3
  116. package/dist/bindings/VideoEvent.d.ts +0 -1
  117. package/dist/bindings/VideoEvent.js +0 -3
  118. package/dist/bindings/VideoProps.d.ts +0 -7
  119. package/dist/bindings/VideoProps.js +0 -3
  120. package/dist/bindings/WheelEventDeltaMode.d.ts +0 -1
  121. package/dist/bindings/WheelEventDeltaMode.js +0 -3
  122. package/dist/bindings/WindowState.d.ts +0 -1
  123. package/dist/bindings/WindowState.js +0 -3
  124. package/dist/bindings/serde_json/JsonValue.d.ts +0 -3
  125. package/dist/bindings/serde_json/JsonValue.js +0 -3
  126. package/dist/commands.d.ts +0 -17
  127. package/dist/commands.js +0 -24
  128. package/dist/components/navigation.d.ts +0 -154
  129. package/dist/components/navigation.js +0 -252
  130. package/dist/declaration.d.ts +0 -80
  131. package/dist/declaration.js +0 -2
  132. package/dist/events/base.d.ts +0 -16
  133. package/dist/events/base.js +0 -19
  134. package/dist/events/globals.d.ts +0 -2
  135. package/dist/events/globals.js +0 -122
  136. package/dist/events/keyboard.d.ts +0 -37
  137. package/dist/events/keyboard.js +0 -2
  138. package/dist/events/listener.d.ts +0 -1
  139. package/dist/events/listener.js +0 -13
  140. package/dist/events/mouse.d.ts +0 -15
  141. package/dist/events/mouse.js +0 -2
  142. package/dist/events/touch.d.ts +0 -16
  143. package/dist/events/touch.js +0 -2
  144. package/dist/events/wheel.d.ts +0 -9
  145. package/dist/events/wheel.js +0 -2
  146. package/dist/events.d.ts +0 -33
  147. package/dist/events.js +0 -49
  148. package/dist/hooks/useFadeInOut.d.ts +0 -16
  149. package/dist/hooks/useFadeInOut.js +0 -62
  150. package/dist/hooks/useScenario.d.ts +0 -13
  151. package/dist/hooks/useScenario.js +0 -64
  152. package/dist/hooks/useSoundEffect.d.ts +0 -4
  153. package/dist/hooks/useSoundEffect.js +0 -63
  154. package/dist/hooks/useStage.d.ts +0 -126
  155. package/dist/hooks/useStage.js +0 -706
  156. package/dist/hooks.d.ts +0 -4
  157. package/dist/hooks.js +0 -20
  158. package/dist/lib.js +0 -54
  159. package/dist/moyu.d.ts +0 -19
  160. package/dist/moyu.js +0 -49
  161. package/dist/node.d.ts +0 -16
  162. package/dist/node.js +0 -105
  163. package/dist/react.d.ts +0 -20
  164. package/dist/react.js +0 -222
  165. package/dist/runtime-globals.d.ts +0 -65
  166. package/dist/runtime-globals.js +0 -2
  167. package/dist/sandbox.d.ts +0 -1
  168. package/dist/sandbox.js +0 -88
  169. package/dist/spring/animated.d.ts +0 -27
  170. package/dist/spring/animated.js +0 -2
  171. package/dist/spring/index.d.ts +0 -5
  172. package/dist/spring/index.js +0 -35
  173. package/dist/spring/primitives.d.ts +0 -3
  174. package/dist/spring/primitives.js +0 -13
  175. package/dist/state.d.ts +0 -6
  176. package/dist/state.js +0 -8
  177. package/dist/utils.d.ts +0 -10
  178. package/dist/utils.js +0 -10
  179. package/dist/zod-patch.d.ts +0 -10
  180. package/dist/zod-patch.js +0 -2
  181. package/jsx-runtime.d.ts +0 -1
package/package.json CHANGED
@@ -1,20 +1,40 @@
1
1
  {
2
2
  "name": "@momoyu-ink/kit",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Software Development Kit of Moyu Visual Novel Engine",
5
- "main": "dist/lib.js",
6
- "module": "dist/lib.js",
5
+ "main": "dist/lib.cjs",
6
+ "module": "dist/lib.mjs",
7
7
  "types": "dist/lib.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/lib.d.ts",
11
+ "import": "./dist/lib.mjs",
12
+ "require": "./dist/lib.cjs",
13
+ "default": "./dist/lib.mjs"
14
+ },
15
+ "./jsx-runtime": {
16
+ "types": "./dist/jsx-runtime.d.ts",
17
+ "import": "./dist/jsx-runtime.mjs",
18
+ "require": "./dist/jsx-runtime.cjs",
19
+ "default": "./dist/jsx-runtime.mjs"
20
+ },
21
+ "./jsx-dev-runtime": {
22
+ "types": "./dist/jsx-dev-runtime.d.ts",
23
+ "import": "./dist/jsx-dev-runtime.mjs",
24
+ "require": "./dist/jsx-dev-runtime.cjs",
25
+ "default": "./dist/jsx-dev-runtime.mjs"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
8
29
  "files": [
9
30
  "dist",
10
- "jsx-runtime.d.ts",
11
31
  "LICENSE.txt"
12
32
  ],
13
33
  "scripts": {
14
- "dev": "tsc --outDir ./dist -w -p tsconfig.build.json",
15
- "prepack": "rimraf ./dist && tsc --outDir ./dist -p tsconfig.build.json",
16
- "build": "rimraf ./dist && tsc --outDir ./dist -p tsconfig.build.json",
17
- "watch": "tsc --outDir ./dist -w -p tsconfig.build.json"
34
+ "dev": "tsup --watch",
35
+ "prepack": "tsup",
36
+ "build": "tsup",
37
+ "watch": "tsup --watch"
18
38
  },
19
39
  "author": "Icemic <bingfeng.web@gmail.com>",
20
40
  "homepage": "https://momoyu.ink",
@@ -40,6 +60,7 @@
40
60
  "@types/react-reconciler": "^0.33.0",
41
61
  "react": "^19.2.1",
42
62
  "rimraf": "^6.1.2",
63
+ "tsup": "^8.4.0",
43
64
  "typescript": "^5.9.3"
44
65
  },
45
66
  "publishConfig": {
@@ -1 +0,0 @@
1
- export type AnimationFormat = 'apng' | 'webp';
@@ -1,3 +0,0 @@
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 });
@@ -1,3 +0,0 @@
1
- export type AnimationFrameCallbackEvent = {
2
- timestamp: number;
3
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,6 +0,0 @@
1
- import type { AnimationFormat } from './AnimationFormat';
2
- export type AnimationProps = {
3
- src: string | null;
4
- area?: [number, number, number, number];
5
- format?: AnimationFormat;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,54 +0,0 @@
1
- import type { AudioSettings } from './AudioSettings';
2
- export type AudioCommand = {
3
- subCommand: 'load';
4
- name: string;
5
- src: string;
6
- settings?: AudioSettings;
7
- } | {
8
- subCommand: 'release';
9
- name: string;
10
- fadeTime?: number;
11
- } | {
12
- subCommand: 'play';
13
- name: string;
14
- fadeTime?: number;
15
- waitForEnd?: boolean;
16
- } | {
17
- subCommand: 'stop';
18
- name: string;
19
- fadeTime?: number;
20
- } | {
21
- subCommand: 'pause';
22
- name: string;
23
- fadeTime?: number;
24
- } | {
25
- subCommand: 'resume';
26
- name: string;
27
- fadeTime?: number;
28
- } | {
29
- subCommand: 'setVolume';
30
- name: string;
31
- volume: number;
32
- fadeTime?: number;
33
- } | {
34
- subCommand: 'seekBy';
35
- name: string;
36
- time: number;
37
- } | {
38
- subCommand: 'seekTo';
39
- name: string;
40
- time: number;
41
- } | {
42
- subCommand: 'setPlaybackRate';
43
- name: string;
44
- rate: number;
45
- } | {
46
- subCommand: 'setLoopRegion';
47
- name: string;
48
- start: number;
49
- end: number;
50
- } | {
51
- subCommand: 'setPanning';
52
- name: string;
53
- panning: number;
54
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,42 +0,0 @@
1
- /**
2
- * Settings for audio playback, including delay, start position, volume, etc.
3
- */
4
- export type AudioSettings = {
5
- /**
6
- * Optional delay time in seconds before the audio starts playing.
7
- */
8
- delayTime?: number;
9
- /**
10
- * The position in seconds where the audio should start playing.
11
- */
12
- startPosition?: number;
13
- /**
14
- * Whether the sound should be played in reverse.
15
- */
16
- reverse?: boolean;
17
- /**
18
- * Loop region defined by a start and end time in seconds. `-1` for end means loop to the end of the audio.
19
- */
20
- loopRegion?: [number, number];
21
- /**
22
- * Volume of the audio, ranges from 0.0 (silence) to 1.0 (normal volume),
23
- * values greater than 1.0 can be used for amplification.
24
- */
25
- volume?: number;
26
- /**
27
- * Playback rate of the audio, where 1.0 is normal speed.
28
- */
29
- playbackRate?: number;
30
- /**
31
- * Panning value from -1.0 (left) to 1.0 (right), with 0.0 being center.
32
- */
33
- panning?: number;
34
- /**
35
- * Whether the audio should start playing automatically after loading.
36
- */
37
- autoPlay?: boolean;
38
- /**
39
- * Optional fade time in milliseconds for audio transitions.
40
- */
41
- fadeTime?: number;
42
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,6 +0,0 @@
1
- import type { FilterKind } from './FilterKind';
2
- export type BackdropProps = {
3
- filters?: Array<FilterKind>;
4
- width?: number;
5
- height?: number;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type BeforeUnloadEvent = Record<symbol, never>;
@@ -1,3 +0,0 @@
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 });
@@ -1,4 +0,0 @@
1
- export type ClipProps = {
2
- width?: number;
3
- height?: number;
4
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,18 +0,0 @@
1
- /**
2
- * Custom event for user-defined events
3
- */
4
- export type CustomEvent<T> = {
5
- kind: 'CustomEvent';
6
- /**
7
- * target node id, or 0 for global
8
- */
9
- targetId: number;
10
- /**
11
- * event name for `addEventListener` or `onXXX`
12
- */
13
- name: string;
14
- /**
15
- * event body, pass as parameter to callback
16
- */
17
- body?: T;
18
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,6 +0,0 @@
1
- export type EffectParams = {
2
- duration: number;
3
- startDelay: number;
4
- weakMagnitude: number;
5
- strongMagnitude: number;
6
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,34 +0,0 @@
1
- /**
2
- * 滤镜配置(可序列化,用于 JS 互操作)
3
- */
4
- export type FilterKind = {
5
- type: 'blur-perfect';
6
- radius: number;
7
- } | {
8
- type: 'blur';
9
- radius: number;
10
- continuous?: boolean;
11
- } | {
12
- type: 'brightness';
13
- amount: number;
14
- } | {
15
- type: 'contrast';
16
- amount: number;
17
- } | {
18
- type: 'saturation';
19
- amount: number;
20
- } | {
21
- type: 'hue-rotate';
22
- degrees: number;
23
- } | {
24
- type: 'grayscale';
25
- amount: number;
26
- } | {
27
- type: 'sepia';
28
- amount: number;
29
- } | {
30
- type: 'invert';
31
- amount: number;
32
- } | {
33
- type: 'unknown';
34
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,4 +0,0 @@
1
- import type { FilterKind } from './FilterKind';
2
- export type FilterProps = {
3
- filters?: Array<FilterKind>;
4
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import type { FocusEventKind } from './FocusEventKind';
2
- export type FocusEvent = {
3
- kind: FocusEventKind;
4
- targetId: number;
5
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type FocusEventKind = 'focus' | 'blur';
@@ -1,3 +0,0 @@
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 });
@@ -1,4 +0,0 @@
1
- import type { FullscreenEventKind } from './FullscreenEventKind';
2
- export type FullScreenEvent = {
3
- kind: FullscreenEventKind;
4
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type FullscreenEventKind = 'change' | 'error';
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type GameEvent = 'ready';
@@ -1,3 +0,0 @@
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 });
@@ -1,44 +0,0 @@
1
- import type { GamepadButton } from './GamepadButton';
2
- import type { GamepadHapticActuator } from './GamepadHapticActuator';
3
- /**
4
- * The Gamepad interface of the [Gamepad API](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API)
5
- * defines an individual gamepad or other controller, allowing access to information such as button presses,
6
- * axis positions, and id.
7
- */
8
- export type Gamepad = {
9
- /**
10
- * A string containing identifying information about the controller.
11
- */
12
- id: string;
13
- /**
14
- * An integer that is auto-incremented to be unique for each device currently connected to the system.
15
- */
16
- index: number;
17
- /**
18
- * A boolean indicating whether the gamepad is still connected to the system.
19
- */
20
- connected: boolean;
21
- /**
22
- * A string indicating whether the browser has remapped the controls on the device to a known layout.
23
- * Currently, the only value that is returned is "standard", which indicates that the browser has
24
- * remapped the controls to a standard layout.
25
- * See [gamepad#remapping](https://w3c.github.io/gamepad/#remapping)
26
- */
27
- mapping: string;
28
- /**
29
- * An array of [GamepadButton] objects representing the buttons present on the device.
30
- */
31
- buttons: Array<GamepadButton>;
32
- /**
33
- * An array representing the controls with axes present on the device (e.g. analog thumb sticks).
34
- */
35
- axes: Array<number>;
36
- /**
37
- * A GamepadHapticActuator object, which represents haptic feedback hardware available on the controller.
38
- */
39
- vibrationActuator: GamepadHapticActuator | null;
40
- /**
41
- * A f64 representing the last time the data for this gamepad was updated.
42
- */
43
- timestamp: number;
44
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- /**
2
- * The GamepadButton interface defines an individual button of a gamepad or other controller, allowing
3
- * access to the current state of different types of buttons available on the control device.
4
- */
5
- export type GamepadButton = {
6
- /**
7
- * A boolean value indicating whether the button is currently pressed (`true`) or unpressed (`false`).
8
- */
9
- pressed: boolean;
10
- /**
11
- * A boolean value indicating whether the button is currently touched (`true`) or not touched (`false`).
12
- */
13
- touched: boolean;
14
- /**
15
- * A double value used to represent the current state of analog buttons, such as the triggers on many
16
- * modern gamepads. The values are normalized to the range 0.0 — 1.0, with 0.0 representing a button that
17
- * is not pressed, and 1.0 representing a button that is fully pressed.
18
- */
19
- value: number;
20
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,9 +0,0 @@
1
- import type { EffectParams } from './EffectParams';
2
- export type GamepadCommand = {
3
- subCommand: 'getGamepads';
4
- } | {
5
- subCommand: 'playEffect';
6
- index: number;
7
- effect: string;
8
- params: EffectParams;
9
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import type { Gamepad } from './Gamepad';
2
- import type { GamepadButton } from './GamepadButton';
3
- export type GamepadEvent = {
4
- gamepad: Gamepad;
5
- } | {
6
- gamepad: Gamepad;
7
- button: GamepadButton;
8
- } | {
9
- gamepad: Gamepad;
10
- axis: number;
11
- value: number;
12
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- /**
2
- * The GamepadHapticActuator interface of the [Gamepad API](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API)
3
- * represents hardware in the controller designed to provide haptic feedback to the user (if available),
4
- * most commonly vibration hardware.
5
- */
6
- export type GamepadHapticActuator = {
7
- /**
8
- * Returns an array of enumerated values representing the different haptic effects that the actuator supports.
9
- */
10
- effects: Array<string>;
11
- };
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type KeyboardEventKind = 'KeyDown' | 'KeyUp' | 'KeyPress';
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type KeyboardLocation = 'Standard' | 'Left' | 'Right' | 'Numpad';
@@ -1,3 +0,0 @@
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 });
@@ -1,3 +0,0 @@
1
- export type Literal = null | string | bigint | number | boolean | Array<Literal> | {
2
- [key in string]: Literal;
3
- };
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type MouseEventKind = 'MouseEnter' | 'MouseLeave' | 'MouseDown' | 'MouseUp' | 'MouseMove' | 'Click' | 'DoubleClick' | 'ContextMenu';
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type MoyuCursor = 'hidden' | 'default' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'dnd-ask' | 'all-resize';
@@ -1,3 +0,0 @@
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 });
@@ -1 +0,0 @@
1
- export type NineSliceMode = 'stretch' | 'repeat' | 'mirror' | 'blank';
@@ -1,3 +0,0 @@
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 });
@@ -1,4 +0,0 @@
1
- export type NodeEvent = {
2
- kind: 'Destory';
3
- targetId: number;
4
- };
@@ -1,3 +0,0 @@
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 });
@@ -1,20 +0,0 @@
1
- import type { MoyuCursor } from './MoyuCursor';
2
- export type NodeProps = {
3
- label?: string;
4
- anchor?: [number, number];
5
- pivot?: [number, number];
6
- x?: number;
7
- y?: number;
8
- scale?: number;
9
- scaleX?: number;
10
- scaleY?: number;
11
- rotation?: number;
12
- skew?: number;
13
- skewX?: number;
14
- skewY?: number;
15
- visible?: boolean;
16
- tint?: string;
17
- opacity?: number;
18
- interactive?: boolean;
19
- cursor?: MoyuCursor;
20
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import type { KeyboardEventKind } from './KeyboardEventKind';
2
- import type { KeyboardLocation } from './KeyboardLocation';
3
- export type RawKeyboardEvent = {
4
- kind: KeyboardEventKind;
5
- targetId: number;
6
- bubbleTargetIds: Array<number>;
7
- key: string;
8
- code: string;
9
- location: KeyboardLocation;
10
- repeat: boolean;
11
- ctrlKey: boolean;
12
- shiftKey: boolean;
13
- altKey: boolean;
14
- metaKey: boolean;
15
- isComposing: boolean;
16
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import type { MouseEventKind } from './MouseEventKind';
2
- export type RawMouseEvent = {
3
- kind: MouseEventKind;
4
- targetId: number;
5
- bubbleTargetIds: Array<number>;
6
- clientX: number;
7
- clientY: number;
8
- screenX: number;
9
- screenY: number;
10
- offsetX: number;
11
- offsetY: number;
12
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- import type { TouchEventKind } from './TouchEventKind';
2
- export type RawTouchEvent = {
3
- kind: TouchEventKind;
4
- targetId: number;
5
- bubbleTargetIds: Array<number>;
6
- identifier: number;
7
- clientX: number;
8
- clientY: number;
9
- screenX: number;
10
- screenY: number;
11
- offsetX: number;
12
- offsetY: number;
13
- };