@moku-labs/game 0.15.101 → 0.15.103
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 +1 -1
- package/dist/app/page.d.mts +1 -1
- package/dist/app/page.mjs +1 -1
- package/dist/app/system.d.mts +3 -3
- package/dist/app.d.mts +3 -3
- package/dist/app.mjs +1 -1
- package/dist/assets.d.mts +1 -1
- package/dist/{commands-DFCBw6F2.d.mts → commands-TSyhs2-E.d.mts} +19 -10
- package/dist/control.d.mts +10 -6
- package/dist/control.mjs +2 -2
- package/dist/{define-6cjZwkJu.d.mts → define-DNF9A0ce.d.mts} +2 -2
- package/dist/{headless-WyPk3UrP.d.mts → headless-CEG1oR5D.d.mts} +1 -1
- package/dist/{index-Bz6p2alA.d.mts → index-DDZ9K9qO.d.mts} +24 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/inspect.d.mts +6 -6
- package/dist/inspect.mjs +2 -2
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{run-B5if0jxE.mjs → run-pCQlIaNP.mjs} +46 -3
- package/dist/{runtime-BDCv5mp-.d.mts → runtime-CcHPrVBm.d.mts} +1 -1
- package/dist/{session-D0AYRm5T.mjs → session-ClUqpGId.mjs} +138 -2
- package/dist/{sources-Cqqz-0-b.mjs → sources-BJyIJf_X.mjs} +1 -1
- package/dist/{src-DsyJR7Ds.mjs → src-DVJ0d04R.mjs} +433 -65
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-Co-6A6Y8.d.mts → types-BvgY7Ncf.d.mts} +23 -5
- package/dist/{types-Cx_-n0Ts.d.mts → types-C1B7-x7p.d.mts} +1 -1
- package/dist/{types-DyohsXF_.d.mts → types-C612npUH.d.mts} +2 -2
- package/dist/{types-Dx2qRDFg.d.mts → types-CMag4vDu.d.mts} +4 -4
- package/dist/{types-BzVQAaSX.d.mts → types-Ce5W0gZe.d.mts} +45 -7
- package/dist/{visual-D5L3ZtuQ.d.mts → visual-PsEr2KD-.d.mts} +6 -6
- package/dist/visual.d.mts +1 -1
- package/dist/visual.mjs +2 -2
- package/llms.txt +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -236,7 +236,7 @@ createApp({ plugins: [...screen, effectsPlugin, audioPlugin, platformPlugin] });
|
|
|
236
236
|
| [`i18n`](./src/plugins/i18n/README.md) | screen | Strings as data, ICU messages, compiled per locale; a sub-feature's strings travel with its bundle |
|
|
237
237
|
| [`text`](./src/plugins/text/README.md) | screen | MSDF text, styles, inline tags and icons |
|
|
238
238
|
| [`ui`](./src/plugins/ui/README.md) | screen | Screens in JSX, Yoga layout, popups, styles |
|
|
239
|
-
| [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold` ready to list ([set](./src/plugins/effects/set/README.md)) |
|
|
239
|
+
| [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold`, `Bloom` ready to list ([set](./src/plugins/effects/set/README.md)) |
|
|
240
240
|
| [`audio`](./src/plugins/audio/README.md) | opt-in | Music and sound effects on three buses |
|
|
241
241
|
| [`platform`](./src/plugins/platform/README.md) | opt-in | The phone: Back button, haptics, keep-awake |
|
|
242
242
|
|
package/dist/app/page.d.mts
CHANGED
package/dist/app/page.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { i as systemSource, t as memory } from "../memory-DeD9wis6.mjs";
|
|
|
2
2
|
import { t as applyTo } from "../drafts-BawpSaVp.mjs";
|
|
3
3
|
import { i as isControl } from "../dev-BNndV-hU.mjs";
|
|
4
4
|
import { n as fakeClock, t as VISUAL_CLOCK } from "../fake-hnJcJeYf.mjs";
|
|
5
|
-
import { n as read, r as watch, t as sources } from "../sources-
|
|
5
|
+
import { n as read, r as watch, t as sources } from "../sources-BJyIJf_X.mjs";
|
|
6
6
|
import { n as resolveConfig } from "../config-DVqciSkP.mjs";
|
|
7
7
|
//#region src/app/boot.ts
|
|
8
8
|
/** How long after the fade the timer removes a picture whose transition never ended, ms. */
|
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { qr as PlayerStateProvider } from "../types-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-
|
|
1
|
+
import { qr as PlayerStateProvider } from "../types-Ce5W0gZe.mjs";
|
|
2
|
+
import { Et as PlatformProvider } from "../index-DDZ9K9qO.mjs";
|
|
3
|
+
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-CMag4vDu.mjs";
|
|
4
4
|
import { Back, Haptics, KeepAwake, Lifecycle, Store } from "@moku-labs/system";
|
|
5
5
|
|
|
6
6
|
//#region src/app/system.d.ts
|
package/dist/app.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Hr as Json } from "./types-
|
|
2
|
-
import { q as StringTable } from "./types-
|
|
3
|
-
import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-
|
|
1
|
+
import { Hr as Json } from "./types-Ce5W0gZe.mjs";
|
|
2
|
+
import { q as StringTable } from "./types-C1B7-x7p.mjs";
|
|
3
|
+
import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-CMag4vDu.mjs";
|
|
4
4
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/app/define.d.ts
|
package/dist/app.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-DVJ0d04R.mjs";
|
|
2
2
|
import { t as memory } from "./memory-DeD9wis6.mjs";
|
|
3
3
|
import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
|
|
4
4
|
//#region src/app/define.ts
|
package/dist/assets.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $r as StoreApi, D as DebugSwitches, In as FlowState, Nn as Bookmark, Or as Api$
|
|
2
|
-
import {
|
|
3
|
-
import { L as InputApi } from "./types-
|
|
4
|
-
import { t as HeadlessApp } from "./headless-
|
|
5
|
-
import { i as ControlApp, r as Command } from "./types-
|
|
1
|
+
import { $r as StoreApi, D as DebugSwitches, In as FlowState, Nn as Bookmark, Nr as Api, Or as Api$3, Z as Api$2, Zr as Snapshot, ft as Captured, mi as Time, ni as Api$1, ui as FrameRate, w as ScenesApi } from "./types-Ce5W0gZe.mjs";
|
|
2
|
+
import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BvgY7Ncf.mjs";
|
|
3
|
+
import { L as InputApi } from "./types-C1B7-x7p.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
5
|
+
import { i as ControlApp, r as Command } from "./types-C612npUH.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/flow/doors/commands.d.ts
|
|
8
8
|
/**
|
|
@@ -89,15 +89,24 @@ declare const commands: Readonly<{
|
|
|
89
89
|
readonly frames: "number";
|
|
90
90
|
readonly deltaMs: "number?";
|
|
91
91
|
}, Readonly<Time>, ControlApp>;
|
|
92
|
+
clock: Command<{
|
|
93
|
+
readonly advanceMs: "number";
|
|
94
|
+
}, {
|
|
95
|
+
now: number;
|
|
96
|
+
}, HeadlessApp & {
|
|
97
|
+
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
98
|
+
} & {
|
|
99
|
+
readonly clock?: Api;
|
|
100
|
+
}>;
|
|
92
101
|
pause: Command<{}, boolean, HeadlessApp & {
|
|
93
102
|
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
94
103
|
} & {
|
|
95
|
-
readonly lifecycle: Api;
|
|
104
|
+
readonly lifecycle: Api$1;
|
|
96
105
|
}>;
|
|
97
106
|
resume: Command<{}, boolean, HeadlessApp & {
|
|
98
107
|
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
99
108
|
} & {
|
|
100
|
-
readonly lifecycle: Api;
|
|
109
|
+
readonly lifecycle: Api$1;
|
|
101
110
|
}>;
|
|
102
111
|
capture: Command<{
|
|
103
112
|
readonly legend: "boolean?";
|
|
@@ -107,9 +116,9 @@ declare const commands: Readonly<{
|
|
|
107
116
|
}, Captured | undefined, HeadlessApp & {
|
|
108
117
|
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
109
118
|
} & {
|
|
110
|
-
readonly renderer: Api$
|
|
119
|
+
readonly renderer: Api$2;
|
|
111
120
|
} & {
|
|
112
|
-
readonly world: Api$
|
|
121
|
+
readonly world: Api$3;
|
|
113
122
|
}>;
|
|
114
123
|
debug: Command<{
|
|
115
124
|
readonly nineSlice: "boolean?";
|
|
@@ -119,7 +128,7 @@ declare const commands: Readonly<{
|
|
|
119
128
|
}, DebugSwitches, HeadlessApp & {
|
|
120
129
|
readonly log: import("@moku-labs/common/browser").LogApi;
|
|
121
130
|
} & {
|
|
122
|
-
readonly renderer: Api$
|
|
131
|
+
readonly renderer: Api$2;
|
|
123
132
|
}>;
|
|
124
133
|
reducedMotion: Command<{
|
|
125
134
|
readonly on: "boolean";
|
package/dist/control.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-
|
|
3
|
-
import { t as commands } from "./commands-
|
|
4
|
-
import { t as defineCommand } from "./define-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
2
|
+
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-C612npUH.mjs";
|
|
3
|
+
import { t as commands } from "./commands-TSyhs2-E.mjs";
|
|
4
|
+
import { t as defineCommand } from "./define-DNF9A0ce.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
7
7
|
/**
|
|
@@ -180,7 +180,8 @@ declare function controlReadOnly(id: string): ControlReadOnlyError;
|
|
|
180
180
|
/**
|
|
181
181
|
* Runs a command in a dev build or a debug build. A `--debug` build and the dev page run every
|
|
182
182
|
* command; a `--debug=read` build runs the read and cosmetic ones only. A `cheat` or `raw`
|
|
183
|
-
* command taints the session and is journaled before it runs,
|
|
183
|
+
* command taints the session and is journaled before it runs, once its input fits its schema, so
|
|
184
|
+
* one that fails in its body still counts.
|
|
184
185
|
*
|
|
185
186
|
* @param app - The app the command acts on.
|
|
186
187
|
* @param command - The command.
|
|
@@ -189,6 +190,9 @@ declare function controlReadOnly(id: string): ControlReadOnlyError;
|
|
|
189
190
|
* @throws {Error} Outside dev builds and debug builds (every command with `--debug`; the read and
|
|
190
191
|
* cosmetic ones alone with `--debug=read`), the read-only refusal of `controlReadOnly` for a
|
|
191
192
|
* `route`, `cheat` or `raw` command on a `--debug=read` page, and whatever the command throws.
|
|
193
|
+
* @throws {TypeError} When the input has a field the schema does not name, leaves out a field
|
|
194
|
+
* without `?`, or holds a value of another kind (a `number` must be finite); nothing runs then.
|
|
195
|
+
* On a `--debug=read` page a `route` command throws "[game] The command game.tap changes the game: …".
|
|
192
196
|
* @example
|
|
193
197
|
* ```ts
|
|
194
198
|
* // An e2e script: load the bug report, then tap Play.
|
|
@@ -196,7 +200,7 @@ declare function controlReadOnly(id: string): ControlReadOnlyError;
|
|
|
196
200
|
* const ran = await run(app, commands.answer, { intent: "play" });
|
|
197
201
|
* ran.value; // true
|
|
198
202
|
* ran.state; // { path: "board/awaitIntent", frame: 14, tainted: true }
|
|
199
|
-
*
|
|
203
|
+
* await run(app, commands.scroll, { key: "strip", dy: 10 }); // throws '[game] The command game.scroll got the field "dy", which it does not take. …'
|
|
200
204
|
* ```
|
|
201
205
|
*/
|
|
202
206
|
declare function run<S extends InputSchema, O, App extends HeadlessApp>(app: App, command: Command<S, O, App>, ...input: InputArguments<S>): Promise<Ran<O>>;
|
package/dist/control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as controlRefused, t as controlReadOnly } from "./dev-BNndV-hU.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as commands, t as run } from "./run-
|
|
2
|
+
import { c as defineCommand } from "./session-ClUqpGId.mjs";
|
|
3
|
+
import { n as commands, t as run } from "./run-pCQlIaNP.mjs";
|
|
4
4
|
export { commands, controlReadOnly, controlRefused, defineCommand, run };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { l as Source, r as Command, s as InputSchema } from "./types-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
2
|
+
import { l as Source, r as Command, s as InputSchema } from "./types-C612npUH.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/flow/doors/define.d.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hr as Json, In as FlowState, Jn as Answer, Ln as JournalEntry, ci as Api, fn as Api$1, ti as RngState, zn as RouteStep } from "./types-
|
|
1
|
+
import { Hr as Json, In as FlowState, Jn as Answer, Ln as JournalEntry, ci as Api, fn as Api$1, ti as RngState, zn as RouteStep } from "./types-Ce5W0gZe.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/flow/headless.d.ts
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $n as Ease, $r as StoreApi, An as FeaturePlugin, Bn as SceneIdOf, Br as Config$5, C as SceneSpec, Cr as QueryTerm, Dr as TagType, Er as SystemFor, F as HudPartValue, Fr as Config$2, Ft as PassKind, G as SpriteOptions, Gn as GuideOptions, H as ShapeValue, Hn as Descriptor, Hr as Json, J as TransformValue, K as SpriteValue, Kn as Hint, Kr as Patch, L as NineSliceValue, Lr as State$2, Nr as Api$1, Or as Api$6, Pn as DefineNode, Q as Config$6, Qn as DescriptionNode, S as SceneDefinition, Sr as Narrowed, T as State$7, Tr as SystemDefinition, Tt as FrameRing, Un as Effect, Ur as Root, Wn as EffectOptions, Wr as State$5, Y as sprite, Yn as Answered, Z as Api$4, _ as AnySceneProjection, _i as Events$1, _n as HudKeysOf, _r as ComponentValue, _t as ViewportSize, a as Config$1, ai as PauseReason, ar as ProjectionSpec, bn as TextFormatsOf, c as LoadBundles, ci as Api$5, di as RateChange, ei as RngApi, f as ReadyBundles, fi as State$8, fn as Api$2, gi as Config$10, gn as GameTypes, gr as ComponentType, hn as EmitterIdOf, i as BundleSpec, ii as Events, ir as ProjectionMotion, jn as FeatureTree, jr as State$9, kn as FeatureDescription, kr as Config$9, l as LoadReason, li as Config$8, m as Tier, mn as Config$3, mr as ComponentHandle, ni as Api$3, o as DefineBundles, oi as State$4, or as ReducedMotion, p as State$1, pi as ThermalReading, pn as BundlesOf, r as BundleMap, ri as Config$4, rr as NumericFields, st as State$6, t as Api, u as LoadResult, v as Config$7, vi as Require, w as ScenesApi, wn as defineFlow, wr as ResourceType, wt as FrameRecord, x as LayerMap, xn as TextStylesOf, xr as Mut, y as DefineScene, yn as State$3, z as OverlayValue } from "./types-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { $ as Style, A as TextFormats, B as Argument, C as Point, E as TextBind, F as defineComponent, G as Part, H as I18nApi, I as Config$16, J as TextKey, K as State$14, L as InputApi, M as TextStyles, N as TextValue, Q as ResolvedStyle, R as State$15, T as TextApi, U as IntlKit, V as Config$15, W as Message, Y as TypedTr, Z as IsFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as TextStyleInput, k as TextFormatFunction, s as PopupComponent, tt as WhenFlags, v as BindField, w as State$16, x as CountdownValue, y as BindOptions } from "./types-
|
|
1
|
+
import { $n as Ease, $r as StoreApi, An as FeaturePlugin, Bn as SceneIdOf, Br as Config$5, C as SceneSpec, Cr as QueryTerm, Dr as TagType, Er as SystemFor, F as HudPartValue, Fr as Config$2, Ft as PassKind, G as SpriteOptions, Gn as GuideOptions, H as ShapeValue, Hn as Descriptor, Hr as Json, J as TransformValue, K as SpriteValue, Kn as Hint, Kr as Patch, L as NineSliceValue, Lr as State$2, Nr as Api$1, Or as Api$6, Pn as DefineNode, Q as Config$6, Qn as DescriptionNode, S as SceneDefinition, Sr as Narrowed, T as State$7, Tr as SystemDefinition, Tt as FrameRing, Un as Effect, Ur as Root, Wn as EffectOptions, Wr as State$5, Y as sprite, Yn as Answered, Z as Api$4, _ as AnySceneProjection, _i as Events$1, _n as HudKeysOf, _r as ComponentValue, _t as ViewportSize, a as Config$1, ai as PauseReason, ar as ProjectionSpec, bn as TextFormatsOf, c as LoadBundles, ci as Api$5, di as RateChange, ei as RngApi, f as ReadyBundles, fi as State$8, fn as Api$2, gi as Config$10, gn as GameTypes, gr as ComponentType, hn as EmitterIdOf, i as BundleSpec, ii as Events, ir as ProjectionMotion, jn as FeatureTree, jr as State$9, kn as FeatureDescription, kr as Config$9, l as LoadReason, li as Config$8, m as Tier, mn as Config$3, mr as ComponentHandle, ni as Api$3, o as DefineBundles, oi as State$4, or as ReducedMotion, p as State$1, pi as ThermalReading, pn as BundlesOf, r as BundleMap, ri as Config$4, rr as NumericFields, st as State$6, t as Api, u as LoadResult, v as Config$7, vi as Require, w as ScenesApi, wn as defineFlow, wr as ResourceType, wt as FrameRecord, x as LayerMap, xn as TextStylesOf, xr as Mut, y as DefineScene, yn as State$3, z as OverlayValue } from "./types-Ce5W0gZe.mjs";
|
|
2
|
+
import { $ as SfxDescriptor, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, Q as HapticKind, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-BvgY7Ncf.mjs";
|
|
3
|
+
import { $ as Style, A as TextFormats, B as Argument, C as Point, E as TextBind, F as defineComponent, G as Part, H as I18nApi, I as Config$16, J as TextKey, K as State$14, L as InputApi, M as TextStyles, N as TextValue, Q as ResolvedStyle, R as State$15, T as TextApi, U as IntlKit, V as Config$15, W as Message, Y as TypedTr, Z as IsFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as TextStyleInput, k as TextFormatFunction, s as PopupComponent, tt as WhenFlags, v as BindField, w as State$16, x as CountdownValue, y as BindOptions } from "./types-C1B7-x7p.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
6
6
|
|
|
@@ -1776,6 +1776,26 @@ declare function defineFilter<Uniforms extends Record<string, UniformDeclaration
|
|
|
1776
1776
|
*/
|
|
1777
1777
|
declare const Aura: FilterComponent<AuraValue>;
|
|
1778
1778
|
//#endregion
|
|
1779
|
+
//#region src/plugins/effects/set/bloom.d.ts
|
|
1780
|
+
/**
|
|
1781
|
+
* Light around the bright parts of a view and its subtree: what is above `threshold` (0..1) of its light, blurred
|
|
1782
|
+
* `radius` CSS px wide, added back by `strength` (0..2). For a reward, a gem, a lit lamp: an object, not the screen
|
|
1783
|
+
* (over the A26's screen its passes fill 1.9 Mpx a frame at 2.625). List it in a feature's `filters`, as a game's own
|
|
1784
|
+
* filter. It reads a second texture drawn by a chain of two stages, the light cut and boxed down to ¼ (⅛ when the
|
|
1785
|
+
* radius is over 8 texels at ¼: radius 16 at the phone's 2.625, 32 at 2) and blurred there: 3 passes at any radius.
|
|
1786
|
+
* A still view is kept as a picture; a tween of any field runs the chain again and redraws the picture's filter, 3
|
|
1787
|
+
* passes, in every frame it moves: it never draws on the view's quad. Past a sigma of 8 texels at ⅛ the bloom stops
|
|
1788
|
+
* widening.
|
|
1789
|
+
*
|
|
1790
|
+
* @example
|
|
1791
|
+
* ```ts
|
|
1792
|
+
* // features/shop/feature.ts lists it: filters: [Bloom]. A reward card blooms gold, then a motion fades it out.
|
|
1793
|
+
* Bloom.filter.inputs[0]?.chain({ ...Bloom().value }, { resolution: 2 }).length; // 2
|
|
1794
|
+
* view.tween(Bloom, { strength: 0 }, { ms: 400 });
|
|
1795
|
+
* ```
|
|
1796
|
+
*/
|
|
1797
|
+
declare const Bloom: FilterComponent<BloomValue>;
|
|
1798
|
+
//#endregion
|
|
1779
1799
|
//#region src/plugins/effects/set/dissolve.d.ts
|
|
1780
1800
|
/**
|
|
1781
1801
|
* A view eaten away by a noise of `scale` cells across: `progress` 0 keeps all of it, 1 none, and the edge of what is
|
|
@@ -2229,4 +2249,4 @@ declare const screen: readonly [import("@moku-labs/core").PluginInstance<"world"
|
|
|
2229
2249
|
};
|
|
2230
2250
|
}> & Record<never, never>, import("@moku-labs/core").PluginInstance<"text", Config$17, State$16, TextApi, {}> & Record<never, never>, import("@moku-labs/core").PluginInstance<"ui", Config$14, State$13, UiApi, {}> & Record<never, never>];
|
|
2231
2251
|
//#endregion
|
|
2232
|
-
export {
|
|
2252
|
+
export { Traced as $, messageDuration as A, inputPlugin as At, Draggable as B, Countdown as Bt, Noise as C, rendererPlugin as Ct, defineStyle as D, types_d_exports as Dt, resolve as E, PlatformProvider as Et, Frames as F, clockPlugin as Ft, PointerOver as G, label as Gt, Held as H, bind as Ht, defineScene as I, audioPlugin as It, Swipeable as J, Pressable as K, defineBundles as L, assetsPlugin as Lt, defineMotion as M, flowPlugin as Mt, AnimPlayer as N, effectsPlugin as Nt, tr as O, modelPlugin as Ot, Animation as P, debugPlugin as Pt, Traceable as Q, load as R, animPlugin as Rt, Glow as S, scenesPlugin as St, music as T, BackResult as Tt, Hovered as U, defineTextFormats as Ut, DropTarget as V, Text as Vt, Pointer as W, defineTextStyles as Wt, Tappable as X, TapValue as Y, Touchable as Z, defineFilter as _, flattenFeatures as _t, defineEmitter as a, Order as at, ColorMatrix as b, timePlugin as bt, Shine as c, mut as ct, Grade as d, tag as dt, PASS_KINDS as et, Fold as f, defineEffect as ft, Aura as g, defineFeature as gt, Bloom as h, schedule as ht, screen as i, Now as it, cubicBezier as j, i18nPlugin as jt, messageArgument as k, lifecyclePlugin as kt, RevealRound as l, resource as lt, Dissolve as m, hint as mt, createPlugin as n, Exiting as nt, Emitter as o, Tree as ot, Flash as p, guide as pt, Pressed as q, defineGame as r, Layer as rt, Vignette as s, component as st, createApp as t, frameAt as tt, RevealLine as u, system as ut, Alpha as v, worldPlugin as vt, Outline as w, platformPlugin as wt, Displacement as x, textPlugin as xt, Blur as y, uiPlugin as yt, ready as z, projection as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as MonitorConfig, $t as PerfStartupLine, At as OverlayWhat, B as Parent, Bt as PerfCollectorLine, Cn as contribution, Ct as FrameReadout, Dn as to, Dt as MONITOR_SECTIONS, E as types_d_exports$13, En as slot, Et as LongFrameEntry, F as HudPartValue, Ft as PassKind, Gr as types_d_exports$10, Gt as PerfGapLine, Ht as PerfDisplay, I as NineSlice, It as PassRecord, Jt as PerfLongFrameLine, Kt as PerfHeaderLine, Lt as PerfCause, M as WhyEntry, Mr as types_d_exports$17, Mt as PERF_GAP_BUCKETS, N as Display, Nt as PERF_LOG_VERSION, On as type, Ot as MonitorSections, P as HudPart, Pt as PROBLEM_RULES, Qn as DescriptionNode, Qt as PerfSpikeLine, R as Overlay, Rr as types_d_exports$3, Rt as PerfChange, Sn as types_d_exports$6, St as FrameReadResult, Tn as exit, Tt as FrameRing, U as Sprite, Ut as PerfEventLine, V as Shape, Vt as PerfCounts, W as SpriteBlend, Wt as PerfEventName, X as AdaptiveScale, Xn as AnchorTarget, Xr as SaveUnreadableError, Xt as PerfMeasured, Y as sprite, Yt as PerfMarkLine, Zt as PerfSampleLine, an as SHADER_WHATS, bt as WhyLive, cn as WarmDetail, dn as DEMAND_REASONS, dt as ShotsConfig, en as PerfTelemetryLine, g as types_d_exports$1, hi as types_d_exports$15, in as ProblemRule, jt as PERF_CAUSES, kt as OverlayEventDetail, ln as CANVAS_RESTARTS, lt as types_d_exports$12, nn as PoolTrimDetail, on as ShaderEventDetail, ot as PoolTrim, pt as MonitorCounts, q as Transform, qt as PerfLogLine, rn as ProblemEventDetail, si as types_d_exports$9, sn as ShaderWhat, sr as SceneSwitch, tn as PerfThermalLine, un as CanvasRestart, ut as ShotsApi, wt as FrameRecord, xt as FrameColumns, yt as RetakeWhy, z as OverlayValue, zt as PerfChangeEntry } from "./types-
|
|
2
|
-
import { C as
|
|
3
|
-
import { A as TextFormats, D as TextFormat, F as defineComponent, O as TextFormatAnswer, P as types_d_exports$14, S as FormattedNumber, X as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, k as TextFormatFunction, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions, z as types_d_exports$8 } from "./types-
|
|
4
|
-
import { $ as
|
|
5
|
-
export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, Aura, type AuraValue, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
|
1
|
+
import { $ as MonitorConfig, $t as PerfStartupLine, At as OverlayWhat, B as Parent, Bt as PerfCollectorLine, Cn as contribution, Ct as FrameReadout, Dn as to, Dt as MONITOR_SECTIONS, E as types_d_exports$13, En as slot, Et as LongFrameEntry, F as HudPartValue, Ft as PassKind, Gr as types_d_exports$10, Gt as PerfGapLine, Ht as PerfDisplay, I as NineSlice, It as PassRecord, Jt as PerfLongFrameLine, Kt as PerfHeaderLine, Lt as PerfCause, M as WhyEntry, Mr as types_d_exports$17, Mt as PERF_GAP_BUCKETS, N as Display, Nt as PERF_LOG_VERSION, On as type, Ot as MonitorSections, P as HudPart, Pt as PROBLEM_RULES, Qn as DescriptionNode, Qt as PerfSpikeLine, R as Overlay, Rr as types_d_exports$3, Rt as PerfChange, Sn as types_d_exports$6, St as FrameReadResult, Tn as exit, Tt as FrameRing, U as Sprite, Ut as PerfEventLine, V as Shape, Vt as PerfCounts, W as SpriteBlend, Wt as PerfEventName, X as AdaptiveScale, Xn as AnchorTarget, Xr as SaveUnreadableError, Xt as PerfMeasured, Y as sprite, Yt as PerfMarkLine, Zt as PerfSampleLine, an as SHADER_WHATS, bt as WhyLive, cn as WarmDetail, dn as DEMAND_REASONS, dt as ShotsConfig, en as PerfTelemetryLine, g as types_d_exports$1, hi as types_d_exports$15, in as ProblemRule, jt as PERF_CAUSES, kt as OverlayEventDetail, ln as CANVAS_RESTARTS, lt as types_d_exports$12, nn as PoolTrimDetail, on as ShaderEventDetail, ot as PoolTrim, pt as MonitorCounts, q as Transform, qt as PerfLogLine, rn as ProblemEventDetail, si as types_d_exports$9, sn as ShaderWhat, sr as SceneSwitch, tn as PerfThermalLine, un as CanvasRestart, ut as ShotsApi, wt as FrameRecord, xt as FrameColumns, yt as RetakeWhy, z as OverlayValue, zt as PerfChangeEntry } from "./types-Ce5W0gZe.mjs";
|
|
2
|
+
import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-BvgY7Ncf.mjs";
|
|
3
|
+
import { A as TextFormats, D as TextFormat, F as defineComponent, O as TextFormatAnswer, P as types_d_exports$14, S as FormattedNumber, X as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, k as TextFormatFunction, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions, z as types_d_exports$8 } from "./types-C1B7-x7p.mjs";
|
|
4
|
+
import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-DDZ9K9qO.mjs";
|
|
5
|
+
export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, Aura, type AuraValue, type BackResult, type BindOptions, Bloom, type BloomValue, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as timePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as clockPlugin, xt as Hovered, y as schedule, yn as lifecyclePlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-DVJ0d04R.mjs";
|
|
2
2
|
import { $ as Shape, A as Countdown, F as defineTextStyles, I as label, J as HudPart, M as bind, P as defineTextFormats, Q as Parent, S as popup, T as defineStyle, X as Overlay, Y as NineSlice, _ as LocalWrite, at as Exiting, ct as Order, dt as mut, et as Sprite, ft as resource, h as DebugTrigger, ht as tag, it as sprite, j as Text, lt as Tree, ot as Layer, p as Box, pt as system, q as Display, st as Now, tt as Transform, ut as component, w as defineTokens, y as ScrollState } from "./visual-DhqD6W3v.mjs";
|
|
3
3
|
import { t as defineComponent } from "./component-DGg5DqKK.mjs";
|
|
4
|
-
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
|
4
|
+
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Bloom, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ar as Explained, Fn as FlowGraph, Ln as JournalEntry, Or as Api$1, Z as Api$2, Zr as Snapshot, br as FrameDiff, ct as Under, h as Usage, hr as ComponentSchema, mt as RenderStats, t as Api$3, vn as Position, yr as EntitySnapshot, zr as Api } from "./types-
|
|
2
|
-
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-
|
|
3
|
-
import { c as UiNode } from "./types-
|
|
4
|
-
import { t as HeadlessApp } from "./headless-
|
|
5
|
-
import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-
|
|
6
|
-
import { n as defineSource } from "./define-
|
|
1
|
+
import { Ar as Explained, Fn as FlowGraph, Ln as JournalEntry, Or as Api$1, Z as Api$2, Zr as Snapshot, br as FrameDiff, ct as Under, h as Usage, hr as ComponentSchema, mt as RenderStats, t as Api$3, vn as Position, yr as EntitySnapshot, zr as Api } from "./types-Ce5W0gZe.mjs";
|
|
2
|
+
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BvgY7Ncf.mjs";
|
|
3
|
+
import { c as UiNode } from "./types-C1B7-x7p.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
5
|
+
import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-C612npUH.mjs";
|
|
6
|
+
import { n as defineSource } from "./define-DNF9A0ce.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/plugins/flow/doors/read.d.ts
|
|
9
9
|
/**
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as read, r as watch, t as sources } from "./sources-
|
|
1
|
+
import { l as defineSource } from "./session-ClUqpGId.mjs";
|
|
2
|
+
import { n as read, r as watch, t as sources } from "./sources-BJyIJf_X.mjs";
|
|
3
3
|
import "./inspect-la_KkjCS.mjs";
|
|
4
4
|
export { defineSource, read, sources, watch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-CcHPrVBm.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-CcHPrVBm.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxs };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as sheetAlone, p as graphHash } from "./capture-BtS6_oWr.mjs";
|
|
2
2
|
import { a as isDev, i as isControl, n as controlRefused, o as notInstalled, r as isAgent, t as controlReadOnly } from "./dev-BNndV-hU.mjs";
|
|
3
3
|
import { n as reproBookmark } from "./headless-CCiUwvlp.mjs";
|
|
4
|
-
import { a as readTarget,
|
|
4
|
+
import { a as readTarget, c as defineCommand, i as isProjectionTarget, n as isTainted, o as checkInput, r as recordCheat, s as inputOrEmpty, u as inputSchema } from "./session-ClUqpGId.mjs";
|
|
5
5
|
//#region src/plugins/anim/control.ts
|
|
6
6
|
/**
|
|
7
7
|
* @file anim plugin — the anim command of the `/control` door: switch reduced motion. Dev and
|
|
@@ -68,6 +68,43 @@ const muteCommand = defineCommand({
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
//#endregion
|
|
71
|
+
//#region src/plugins/clock/control.ts
|
|
72
|
+
/**
|
|
73
|
+
* @file clock plugin — the clock command of the `/control` door: move the clock forward (F157).
|
|
74
|
+
* Dev and debug builds: the body starts with the inline control guard of a cheat command, so a
|
|
75
|
+
* bundler `define` of `false` drops it, and logs the `moku:dev` marker.
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* Moves the game clock forward by `advanceMs`: a moment the rules scheduled with `clock.scheduleAt`
|
|
79
|
+
* that is due now arrives as `elapsed`, through the graph. A visual test reaches a clock-armed
|
|
80
|
+
* moment with it while its fake clock stands. Changes what the game sees, so the session is
|
|
81
|
+
* tainted and the command journaled. Answers the clock after the move.
|
|
82
|
+
*
|
|
83
|
+
* @throws {Error} `[game] The command game.clock needs clockPlugin.` when the app has no `clockPlugin`.
|
|
84
|
+
* @throws {RangeError} When `advanceMs` is 0 or negative.
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* // A board tick is armed 60 s ahead: the visual test moves the clock and checks the board after it.
|
|
88
|
+
* // steps: [{ clock: { advanceMs: 60_000 } }, { checkpoint: "after-tick" }]
|
|
89
|
+
* (await run(app, commands.clock, { advanceMs: 60_000 })).value; // { now: 1000060000 }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
const clockCommand = defineCommand({
|
|
93
|
+
id: "game.clock",
|
|
94
|
+
title: "Move the clock",
|
|
95
|
+
input: inputSchema(["advanceMs", "number"]),
|
|
96
|
+
effect: "cheat",
|
|
97
|
+
run: (app, { advanceMs }) => {
|
|
98
|
+
if ((typeof __MOKU_GAME_DEV__ === "undefined" || !__MOKU_GAME_DEV__) && (typeof __MOKU_GAME_CONTROL__ === "undefined" || !__MOKU_GAME_CONTROL__)) throw controlRefused();
|
|
99
|
+
if (app.clock === void 0) throw notInstalled("game.clock", "clockPlugin", "command");
|
|
100
|
+
app.log.debug("moku:dev", {
|
|
101
|
+
command: "game.clock",
|
|
102
|
+
advanceMs
|
|
103
|
+
});
|
|
104
|
+
return { now: app.clock.advance(advanceMs) };
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
71
108
|
//#region src/plugins/effects/control.ts
|
|
72
109
|
/**
|
|
73
110
|
* @file effects plugin — the filter command of the `/control` door: turn one filter kind off or on through
|
|
@@ -1354,6 +1391,7 @@ const commands = Object.freeze({
|
|
|
1354
1391
|
saveExport: saveExportCommand,
|
|
1355
1392
|
saveImport: saveImportCommand,
|
|
1356
1393
|
step: stepCommand,
|
|
1394
|
+
clock: clockCommand,
|
|
1357
1395
|
pause: pauseCommand,
|
|
1358
1396
|
resume: resumeCommand,
|
|
1359
1397
|
capture: captureCommand,
|
|
@@ -1385,7 +1423,8 @@ function envelopeOf(app) {
|
|
|
1385
1423
|
/**
|
|
1386
1424
|
* Runs a command in a dev build or a debug build. A `--debug` build and the dev page run every
|
|
1387
1425
|
* command; a `--debug=read` build runs the read and cosmetic ones only. A `cheat` or `raw`
|
|
1388
|
-
* command taints the session and is journaled before it runs,
|
|
1426
|
+
* command taints the session and is journaled before it runs, once its input fits its schema, so
|
|
1427
|
+
* one that fails in its body still counts.
|
|
1389
1428
|
*
|
|
1390
1429
|
* @param app - The app the command acts on.
|
|
1391
1430
|
* @param command - The command.
|
|
@@ -1394,6 +1433,9 @@ function envelopeOf(app) {
|
|
|
1394
1433
|
* @throws {Error} Outside dev builds and debug builds (every command with `--debug`; the read and
|
|
1395
1434
|
* cosmetic ones alone with `--debug=read`), the read-only refusal of `controlReadOnly` for a
|
|
1396
1435
|
* `route`, `cheat` or `raw` command on a `--debug=read` page, and whatever the command throws.
|
|
1436
|
+
* @throws {TypeError} When the input has a field the schema does not name, leaves out a field
|
|
1437
|
+
* without `?`, or holds a value of another kind (a `number` must be finite); nothing runs then.
|
|
1438
|
+
* On a `--debug=read` page a `route` command throws "[game] The command game.tap changes the game: …".
|
|
1397
1439
|
* @example
|
|
1398
1440
|
* ```ts
|
|
1399
1441
|
* // An e2e script: load the bug report, then tap Play.
|
|
@@ -1401,7 +1443,7 @@ function envelopeOf(app) {
|
|
|
1401
1443
|
* const ran = await run(app, commands.answer, { intent: "play" });
|
|
1402
1444
|
* ran.value; // true
|
|
1403
1445
|
* ran.state; // { path: "board/awaitIntent", frame: 14, tainted: true }
|
|
1404
|
-
*
|
|
1446
|
+
* await run(app, commands.scroll, { key: "strip", dy: 10 }); // throws '[game] The command game.scroll got the field "dy", which it does not take. …'
|
|
1405
1447
|
* ```
|
|
1406
1448
|
*/
|
|
1407
1449
|
async function run(app, command, ...input) {
|
|
@@ -1410,6 +1452,7 @@ async function run(app, command, ...input) {
|
|
|
1410
1452
|
if (command.effect !== "read" && command.effect !== "cosmetic") throw controlReadOnly(command.id);
|
|
1411
1453
|
}
|
|
1412
1454
|
const given = inputOrEmpty(input[0]);
|
|
1455
|
+
checkInput(command.id, command.input, given);
|
|
1413
1456
|
if (command.effect === "cheat" || command.effect === "raw") recordCheat(app, command.id, given, app.time.snapshot().frame);
|
|
1414
1457
|
return {
|
|
1415
1458
|
value: await command.run(app, given),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-
|
|
1
|
+
import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-C1B7-x7p.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/ui/jsx/runtime.d.ts
|
|
4
4
|
/** What the compiler passes as props: the children plus whatever the tag declared. */
|