@moku-labs/game 0.0.2 → 0.0.3
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.
- package/README.md +89 -21
- package/dist/assets.d.mts +58 -6
- package/dist/assets.mjs +1630 -234
- package/dist/commands-BOxqlv7w.d.mts +99 -0
- package/dist/control.d.mts +3 -92
- package/dist/control.mjs +3 -757
- package/dist/define-BMo0pHe_.d.mts +51 -0
- package/dist/{registry-DlpRCibU.mjs → dev-CcwFrwok.mjs} +30 -1
- package/dist/index.d.mts +217 -29
- package/dist/index.mjs +6179 -727
- package/dist/inspect.d.mts +10 -8
- package/dist/inspect.mjs +2 -518
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-8H4AJuhK.mjs} +1 -0
- package/dist/run-tlcn1w7y.mjs +944 -0
- package/dist/{runtime-DiOTkDZz.d.mts → runtime-BstIkrhH.d.mts} +1 -1
- package/dist/sources-BooL2MsX.mjs +545 -0
- package/dist/testing.d.mts +305 -3
- package/dist/testing.mjs +2056 -2
- package/dist/types-BTycq8_Z.d.mts +1196 -0
- package/dist/{types-yg_ywtT-.d.mts → types-C0SLQsx0.d.mts} +230 -31
- package/dist/types-Cjf3ywai.d.mts +5982 -0
- package/dist/{define-sFoO3y6X.d.mts → types-D0uYTTC3.d.mts} +180 -51
- package/dist/{types-DWILGrPn.d.mts → types-DgwbzDLP.d.mts} +87 -19
- package/dist/types-KlE_GL1z.d.mts +1444 -0
- package/dist/{visual-BDUHSRvf.mjs → visual-NPrDkvUk.mjs} +19 -13
- package/package.json +17 -2
- package/dist/headless-CvamCUcR.mjs +0 -186
- package/dist/headless-KaSWcd0s.d.mts +0 -181
- package/dist/types-BxkNNYul.d.mts +0 -2840
- package/dist/types-CTPS9GBu.d.mts +0 -742
- package/dist/types-DD-QrG_z.d.mts +0 -588
- package/dist/types-DYLnSgMI.d.mts +0 -570
- package/dist/types-JNc_UQBo.d.mts +0 -2896
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Tt as Time, Ut as Api, ft as FlowState, lt as Bookmark, t as Api$1, u as DebugSwitches } from "./types-Cjf3ywai.mjs";
|
|
2
|
+
import { d as HeadlessApp, n as Command, r as ControlApp } from "./types-D0uYTTC3.mjs";
|
|
3
|
+
import { H as InputApi } from "./types-C0SLQsx0.mjs";
|
|
4
|
+
import { b as UiApi, t as AnimApi } from "./types-KlE_GL1z.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/plugins/flow/doors/commands.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Every command of the engine, keyed by its short name: what an editor lists as buttons and MCP
|
|
9
|
+
* tools. Frozen. Each runs in dev builds only.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // An e2e script taps Play, and the editor registers every command.
|
|
14
|
+
* (await run(app, commands.tap, { key: "play" })).state.path; // "board/awaitIntent"
|
|
15
|
+
* for (const command of Object.values(commands)) registry.add(command);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare const commands: Readonly<{
|
|
19
|
+
answer: Command<{
|
|
20
|
+
intent: "string";
|
|
21
|
+
payload: "json?";
|
|
22
|
+
}, boolean, ControlApp>;
|
|
23
|
+
tap: Command<{
|
|
24
|
+
key: "string?";
|
|
25
|
+
target: "json?";
|
|
26
|
+
}, boolean, HeadlessApp & {
|
|
27
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
28
|
+
} & {
|
|
29
|
+
readonly input: Pick<InputApi, "tap">;
|
|
30
|
+
readonly ui: Pick<UiApi, "find">;
|
|
31
|
+
}>;
|
|
32
|
+
drag: Command<{
|
|
33
|
+
from: "json";
|
|
34
|
+
to: "json";
|
|
35
|
+
}, boolean, HeadlessApp & {
|
|
36
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
37
|
+
} & {
|
|
38
|
+
readonly input: InputApi;
|
|
39
|
+
}>;
|
|
40
|
+
key: Command<{
|
|
41
|
+
key: "string";
|
|
42
|
+
shift: "boolean?";
|
|
43
|
+
}, boolean, HeadlessApp & {
|
|
44
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
45
|
+
} & {
|
|
46
|
+
readonly input: InputApi;
|
|
47
|
+
}>;
|
|
48
|
+
walk: Command<{
|
|
49
|
+
route: "json";
|
|
50
|
+
}, FlowState, ControlApp>;
|
|
51
|
+
bookmark: Command<{}, Bookmark, ControlApp>;
|
|
52
|
+
restore: Command<{
|
|
53
|
+
bookmark: "json?";
|
|
54
|
+
repro: "json?";
|
|
55
|
+
}, FlowState, ControlApp>;
|
|
56
|
+
step: Command<{
|
|
57
|
+
frames: "number";
|
|
58
|
+
deltaMs: "number?";
|
|
59
|
+
}, Readonly<Time>, ControlApp>;
|
|
60
|
+
pause: Command<{}, boolean, HeadlessApp & {
|
|
61
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
62
|
+
} & {
|
|
63
|
+
readonly lifecycle: Api;
|
|
64
|
+
}>;
|
|
65
|
+
resume: Command<{}, boolean, HeadlessApp & {
|
|
66
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
67
|
+
} & {
|
|
68
|
+
readonly lifecycle: Api;
|
|
69
|
+
}>;
|
|
70
|
+
capture: Command<{}, string | undefined, HeadlessApp & {
|
|
71
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
72
|
+
} & {
|
|
73
|
+
readonly renderer: Api$1;
|
|
74
|
+
}>;
|
|
75
|
+
debug: Command<{
|
|
76
|
+
nineSlice: "boolean";
|
|
77
|
+
}, DebugSwitches, HeadlessApp & {
|
|
78
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
79
|
+
} & {
|
|
80
|
+
readonly renderer: Api$1;
|
|
81
|
+
}>;
|
|
82
|
+
reducedMotion: Command<{
|
|
83
|
+
on: "boolean";
|
|
84
|
+
}, boolean, HeadlessApp & {
|
|
85
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
86
|
+
} & {
|
|
87
|
+
readonly anim: AnimApi;
|
|
88
|
+
}>;
|
|
89
|
+
fill: Command<{
|
|
90
|
+
key: "string";
|
|
91
|
+
value: "string";
|
|
92
|
+
}, boolean, HeadlessApp & {
|
|
93
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
94
|
+
} & {
|
|
95
|
+
readonly ui: Pick<UiApi, "fill">;
|
|
96
|
+
}>;
|
|
97
|
+
}>;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { commands as t };
|
package/dist/control.d.mts
CHANGED
|
@@ -1,96 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as ControlApp, c as InputSchema, i as Command, l as Ran, o as InputArguments, t as defineCommand } from "./define-sFoO3y6X.mjs";
|
|
5
|
-
import { H as InputApi } from "./types-yg_ywtT-.mjs";
|
|
6
|
-
import { r as UiApi } from "./types-DD-QrG_z.mjs";
|
|
7
|
-
import { t as AnimApi } from "./types-CTPS9GBu.mjs";
|
|
1
|
+
import { d as HeadlessApp, i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-D0uYTTC3.mjs";
|
|
2
|
+
import { t as commands } from "./commands-BOxqlv7w.mjs";
|
|
3
|
+
import { t as defineCommand } from "./define-BMo0pHe_.mjs";
|
|
8
4
|
|
|
9
|
-
//#region src/plugins/flow/doors/commands.d.ts
|
|
10
|
-
/**
|
|
11
|
-
* Every command of the engine, keyed by its short name: what an editor lists as buttons and MCP
|
|
12
|
-
* tools. Frozen. Each runs in dev builds only.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* // An e2e script taps Play, and the editor registers every command.
|
|
17
|
-
* (await run(app, commands.tap, { key: "play" })).state.path; // "board/awaitIntent"
|
|
18
|
-
* for (const command of Object.values(commands)) registry.add(command);
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
declare const commands: Readonly<{
|
|
22
|
-
answer: Command<{
|
|
23
|
-
intent: "string";
|
|
24
|
-
payload: "json?";
|
|
25
|
-
}, boolean, ControlApp>;
|
|
26
|
-
tap: Command<{
|
|
27
|
-
key: "string?";
|
|
28
|
-
target: "json?";
|
|
29
|
-
}, boolean, HeadlessApp & {
|
|
30
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
31
|
-
} & {
|
|
32
|
-
readonly input: Pick<InputApi, "tap">;
|
|
33
|
-
readonly ui: Pick<UiApi, "find">;
|
|
34
|
-
}>;
|
|
35
|
-
drag: Command<{
|
|
36
|
-
from: "json";
|
|
37
|
-
to: "json";
|
|
38
|
-
}, boolean, HeadlessApp & {
|
|
39
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
40
|
-
} & {
|
|
41
|
-
readonly input: InputApi;
|
|
42
|
-
}>;
|
|
43
|
-
key: Command<{
|
|
44
|
-
key: "string";
|
|
45
|
-
shift: "boolean?";
|
|
46
|
-
}, boolean, HeadlessApp & {
|
|
47
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
48
|
-
} & {
|
|
49
|
-
readonly input: InputApi;
|
|
50
|
-
}>;
|
|
51
|
-
walk: Command<{
|
|
52
|
-
route: "json";
|
|
53
|
-
}, FlowState, ControlApp>;
|
|
54
|
-
bookmark: Command<{}, Bookmark, ControlApp>;
|
|
55
|
-
restore: Command<{
|
|
56
|
-
bookmark: "json?";
|
|
57
|
-
repro: "json?";
|
|
58
|
-
}, FlowState, ControlApp>;
|
|
59
|
-
step: Command<{
|
|
60
|
-
frames: "number";
|
|
61
|
-
deltaMs: "number?";
|
|
62
|
-
}, Readonly<Time>, ControlApp>;
|
|
63
|
-
pause: Command<{}, boolean, HeadlessApp & {
|
|
64
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
65
|
-
} & {
|
|
66
|
-
readonly lifecycle: Api;
|
|
67
|
-
}>;
|
|
68
|
-
resume: Command<{}, boolean, HeadlessApp & {
|
|
69
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
70
|
-
} & {
|
|
71
|
-
readonly lifecycle: Api;
|
|
72
|
-
}>;
|
|
73
|
-
capture: Command<{}, string | undefined, HeadlessApp & {
|
|
74
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
75
|
-
} & {
|
|
76
|
-
readonly renderer: Api$1;
|
|
77
|
-
}>;
|
|
78
|
-
debug: Command<{
|
|
79
|
-
nineSlice: "boolean";
|
|
80
|
-
}, DebugSwitches, HeadlessApp & {
|
|
81
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
82
|
-
} & {
|
|
83
|
-
readonly renderer: Api$1;
|
|
84
|
-
}>;
|
|
85
|
-
reducedMotion: Command<{
|
|
86
|
-
on: "boolean";
|
|
87
|
-
}, boolean, HeadlessApp & {
|
|
88
|
-
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
89
|
-
} & {
|
|
90
|
-
readonly anim: AnimApi;
|
|
91
|
-
}>;
|
|
92
|
-
}>;
|
|
93
|
-
//#endregion
|
|
94
5
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
95
6
|
/**
|
|
96
7
|
* @file flow/doors — the dev flag. `__MOKU_GAME_DEV__` is a global the engine never replaces: a
|