@moku-labs/game 0.15.54 → 0.15.56
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/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-C7qVsYsu.d.mts → commands-D8ocnkh8.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-BeFMCdMd.d.mts → define-DRkVydOj.d.mts} +2 -2
- package/dist/{headless-C4YDmZv1.d.mts → headless-BtrOeDfI.d.mts} +1 -1
- package/dist/{index-BgJZZmqB.d.mts → index-PGmy-0aO.d.mts} +12 -8
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/inspect.d.mts +6 -6
- package/dist/inspect.mjs +1 -1
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{runtime-DAid26Eo.d.mts → runtime-UNbbvD7o.d.mts} +1 -1
- package/dist/{sources-Bk4QhYpG.mjs → sources-Bp9xmX3f.mjs} +1 -1
- package/dist/{src-qjGkfTKl.mjs → src-oLOaiwM6.mjs} +64 -23
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-VWk999Gp.d.mts → types-ADGyB4g0.d.mts} +2 -2
- package/dist/{types-CGofZbu2.d.mts → types-BO8ChejZ.d.mts} +1 -1
- package/dist/{types-BdwZpZce.d.mts → types-BcANFUZP.d.mts} +2 -2
- package/dist/{types-D9YSrw2Z.d.mts → types-CdMow4TX.d.mts} +27 -9
- package/dist/{types-Dj8OQDCY.d.mts → types-VzfTa-kj.d.mts} +4 -4
- package/dist/{visual-CugfNrMB.d.mts → visual-CF3nFcQ3.d.mts} +6 -6
- package/dist/{visual-BF_mPec2.mjs → visual-ciZa6Rza.mjs} +21 -5
- package/dist/visual.d.mts +1 -1
- package/dist/visual.mjs +1 -1
- package/llms.txt +3 -3
- package/package.json +1 -1
package/dist/app/page.d.mts
CHANGED
package/dist/app/page.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { r as systemSource, t as memory } from "../memory-CWlqhS7l.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-Bp9xmX3f.mjs";
|
|
6
6
|
import { t as resolveConfig } from "../config-B87aFTW-.mjs";
|
|
7
7
|
//#region src/app/save.ts
|
|
8
8
|
/**
|
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Pr as PlayerStateProvider } from "../types-
|
|
2
|
-
import { ht as PlatformProvider } from "../index-
|
|
3
|
-
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-
|
|
1
|
+
import { Pr as PlayerStateProvider } from "../types-CdMow4TX.mjs";
|
|
2
|
+
import { ht as PlatformProvider } from "../index-PGmy-0aO.mjs";
|
|
3
|
+
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-VzfTa-kj.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 { kr as Json } from "./types-
|
|
2
|
-
import { U as StringTable } from "./types-
|
|
3
|
-
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-
|
|
1
|
+
import { kr as Json } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { U as StringTable } from "./types-BO8ChejZ.mjs";
|
|
3
|
+
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-VzfTa-kj.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 { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-
|
|
1
|
+
import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-oLOaiwM6.mjs";
|
|
2
2
|
import { t as memory } from "./memory-CWlqhS7l.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 { Br as StoreApi, D as DebugSwitches, Rr as Snapshot, Sn as Bookmark, Tn as FlowState, Ur as Api, Y as Api$1, Zr as FrameRate, hr as Api$2, ot as Captured, ti as Time, w as ScenesApi } from "./types-
|
|
2
|
-
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-
|
|
3
|
-
import { N as InputApi } from "./types-
|
|
4
|
-
import { t as HeadlessApp } from "./headless-
|
|
5
|
-
import { n as Command, r as ControlApp } from "./types-
|
|
1
|
+
import { Br as StoreApi, D as DebugSwitches, Rr as Snapshot, Sn as Bookmark, Tn as FlowState, Ur as Api, Y as Api$1, Zr as FrameRate, hr as Api$2, ot as Captured, ti as Time, w as ScenesApi } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { N as InputApi } from "./types-BO8ChejZ.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
5
|
+
import { n as Command, r as ControlApp } from "./types-BcANFUZP.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/flow/doors/commands.d.ts
|
|
8
8
|
/**
|
package/dist/control.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-
|
|
3
|
-
import { t as commands } from "./commands-
|
|
4
|
-
import { t as defineCommand } from "./define-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
2
|
+
import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-BcANFUZP.mjs";
|
|
3
|
+
import { t as commands } from "./commands-D8ocnkh8.mjs";
|
|
4
|
+
import { t as defineCommand } from "./define-DRkVydOj.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { c as Source, n as Command, o as InputSchema } from "./types-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
2
|
+
import { c as Source, n as Command, o as InputSchema } from "./types-BcANFUZP.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/flow/doors/define.d.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { En as JournalEntry, Hr as RngState, Ln as Answer, On as RouteStep, Tn as FlowState, Yr as Api, kr as Json, nn as Api$1 } from "./types-
|
|
1
|
+
import { En as JournalEntry, Hr as RngState, Ln as Answer, On as RouteStep, Tn as FlowState, Yr as Api, kr as Json, nn as Api$1 } from "./types-CdMow4TX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/flow/headless.d.ts
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $r as State$8, Ar as Root, B as ShapeValue, Bn as DescriptionNode, Br as StoreApi, C as SceneSpec, Cn as DefineNode, Dr as Config$5, Dt as PassKind, F as NineSliceValue, Fn as Hint, Gn as NumericFields, Gr as Events, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Kr as PauseReason, L as OverlayValue, Ln as Answer, Mn as Effect, N as HudPartValue, Nn as EffectOptions, Nr as Patch, Pn as GuideOptions, Qr as RateChange, S as SceneDefinition, Sr as Config$2, T as State$7, U as SpriteOptions, Ur as Api$3, Vn as Ease, Vr as RngApi, W as SpriteValue, Wr as Config$4, X as Config$6, Xr as Config$8, Y as Api$4, Yr as Api$5, _ as AnySceneProjection, _t as FrameRing, a as Config$1, ai as Require, an as EmitterIdOf, bn as FeatureTree, br as Api$1, c as LoadBundles, cr as Mut, dr as ResourceType, dt as ViewportSize, ei as ThermalReading, f as ReadyBundles, fr as SystemDefinition, gr as Config$9, gt as FrameRecord, hr as Api$6, i as BundleSpec, ii as Events$1, in as Config$3, ir as ComponentValue, jn as Descriptor, jr as State$5, kn as SceneIdOf, kr as Json, l as LoadReason, ln as State$3, lr as Narrowed, m as Tier, mr as TagType, nn as Api$2, o as DefineBundles, on as GameTypes, p as State$1, pn as defineFlow, pr as SystemFor, q as sprite, qn as ProjectionSpec, qr as State$4, r as BundleMap, ri as Config$10, rn as BundlesOf, rr as ComponentType, rt as State$6, sn as HudKeysOf, t as Api, tr as ComponentHandle, u as LoadResult, un as TextStylesOf, ur as QueryTerm, v as Config$7, vn as FeatureDescription, vr as State$9, w as ScenesApi, wr as State$2, x as LayerMap, y as DefineScene, yn as FeaturePlugin } from "./types-
|
|
2
|
-
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-
|
|
3
|
-
import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-
|
|
1
|
+
import { $r as State$8, Ar as Root, B as ShapeValue, Bn as DescriptionNode, Br as StoreApi, C as SceneSpec, Cn as DefineNode, Dr as Config$5, Dt as PassKind, F as NineSliceValue, Fn as Hint, Gn as NumericFields, Gr as Events, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Kr as PauseReason, L as OverlayValue, Ln as Answer, Mn as Effect, N as HudPartValue, Nn as EffectOptions, Nr as Patch, Pn as GuideOptions, Qr as RateChange, S as SceneDefinition, Sr as Config$2, T as State$7, U as SpriteOptions, Ur as Api$3, Vn as Ease, Vr as RngApi, W as SpriteValue, Wr as Config$4, X as Config$6, Xr as Config$8, Y as Api$4, Yr as Api$5, _ as AnySceneProjection, _t as FrameRing, a as Config$1, ai as Require, an as EmitterIdOf, bn as FeatureTree, br as Api$1, c as LoadBundles, cr as Mut, dr as ResourceType, dt as ViewportSize, ei as ThermalReading, f as ReadyBundles, fr as SystemDefinition, gr as Config$9, gt as FrameRecord, hr as Api$6, i as BundleSpec, ii as Events$1, in as Config$3, ir as ComponentValue, jn as Descriptor, jr as State$5, kn as SceneIdOf, kr as Json, l as LoadReason, ln as State$3, lr as Narrowed, m as Tier, mr as TagType, nn as Api$2, o as DefineBundles, on as GameTypes, p as State$1, pn as defineFlow, pr as SystemFor, q as sprite, qn as ProjectionSpec, qr as State$4, r as BundleMap, ri as Config$10, rn as BundlesOf, rr as ComponentType, rt as State$6, sn as HudKeysOf, t as Api, tr as ComponentHandle, u as LoadResult, un as TextStylesOf, ur as QueryTerm, v as Config$7, vn as FeatureDescription, vr as State$9, w as ScenesApi, wr as State$2, x as LayerMap, y as DefineScene, yn as FeaturePlugin } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-BO8ChejZ.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
6
6
|
|
|
@@ -442,7 +442,8 @@ type PlatformProvider = {
|
|
|
442
442
|
};
|
|
443
443
|
/**
|
|
444
444
|
* What took one Back press: the Escape button of the top popup, the intent `back` of the resting
|
|
445
|
-
* node
|
|
445
|
+
* node (`"intent"` also when a guide owns the screen and takes the press itself), the provider
|
|
446
|
+
* leaving the app, or nothing at all because the app has no provider.
|
|
446
447
|
*
|
|
447
448
|
* @example
|
|
448
449
|
* ```ts
|
|
@@ -491,10 +492,11 @@ type PlatformApi = {
|
|
|
491
492
|
* then the intent `back` is answered to the resting node (`"intent"`), and otherwise the
|
|
492
493
|
* provider leaves the app (`"exit"`). While the graph moves between nodes the gate is closed and
|
|
493
494
|
* holds the answer for the next gate (one frame, or `flow.holdMs`), so the press answers
|
|
494
|
-
* `"intent"` and never leaves the app.
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
* is
|
|
495
|
+
* `"intent"` and never leaves the app. While a `guide` narrows the open gate, the guide owns the
|
|
496
|
+
* screen: Back is offered to it as the intent `back` and answers `"intent"` whatever the guide
|
|
497
|
+
* allows; Escape is not pressed and the app is not left. Escape also ends the editing of a ui
|
|
498
|
+
* text field, so a press while a field is edited ends the edit and answers `"popup"`. Without a
|
|
499
|
+
* provider nothing is pressed and the answer is `"none"`.
|
|
498
500
|
*
|
|
499
501
|
* @returns What took the press.
|
|
500
502
|
* @example
|
|
@@ -503,6 +505,8 @@ type PlatformApi = {
|
|
|
503
505
|
* app.platform.back(); // "popup": the settings popup was open and closed like Escape
|
|
504
506
|
* // ...the runner settles on Home, which does not list "back"...
|
|
505
507
|
* app.platform.back(); // "exit": the provider leaves the app
|
|
508
|
+
* // On a tutorial step whose guide allows only "merge":
|
|
509
|
+
* app.platform.back(); // "intent": nothing happens, the step still waits
|
|
506
510
|
* ```
|
|
507
511
|
*/
|
|
508
512
|
back(): BackResult;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as ShaderWhat, At as PerfChange, Bn as DescriptionNode, Bt as PerfLongFrameLine, Ct as PERF_CAUSES, Dt as PassKind, E as types_d_exports$13, Et as PROBLEM_RULES, Ft as PerfEventLine, G as Transform, Gt as PerfStartupLine, H as SpriteBlend, Ht as PerfMeasured, I as Overlay, It as PerfEventName, J as AdaptiveScale, Jr as types_d_exports$9, Jt as PoolTrimDetail, Kt as PerfTelemetryLine, L as OverlayValue, Lr as SaveUnreadableError, Lt as PerfGapLine, M as HudPart, Mr as types_d_exports$10, Mt as PerfCollectorLine, N as HudPartValue, Nt as PerfCounts, Ot as PassRecord, P as NineSlice, Pt as PerfDisplay, Qt as ShaderEventDetail, R as Parent, Rn as AnchorTarget, Rt as PerfHeaderLine, St as OverlayWhat, Tr as types_d_exports$3, Tt as PERF_LOG_VERSION, Ut as PerfSampleLine, V as Sprite, Vt as PerfMarkLine, Wt as PerfSpikeLine, Xt as ProblemRule, Yt as ProblemEventDetail, Z as MonitorConfig, Zt as SHADER_WHATS, _n as type, _t as FrameRing, at as types_d_exports$12, bt as MonitorSections, dn as types_d_exports$6, en as WarmDetail, fn as contribution, g as types_d_exports$1, gn as to, gt as FrameRecord, hn as slot, ht as FrameReadout, j as Display, jt as PerfChangeEntry, kt as PerfCause, mn as exit, mt as FrameReadResult, ni as types_d_exports$15, nt as PoolTrim, pt as FrameColumns, q as sprite, qt as PerfThermalLine, st as MonitorCounts, tn as DEMAND_REASONS, vt as LongFrameEntry, wt as PERF_GAP_BUCKETS, xt as OverlayEventDetail, yr as types_d_exports$17, yt as MONITOR_SECTIONS, z as Shape, zt as PerfLogLine } from "./types-
|
|
2
|
-
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-
|
|
3
|
-
import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-
|
|
4
|
-
import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-
|
|
1
|
+
import { $t as ShaderWhat, At as PerfChange, Bn as DescriptionNode, Bt as PerfLongFrameLine, Ct as PERF_CAUSES, Dt as PassKind, E as types_d_exports$13, Et as PROBLEM_RULES, Ft as PerfEventLine, G as Transform, Gt as PerfStartupLine, H as SpriteBlend, Ht as PerfMeasured, I as Overlay, It as PerfEventName, J as AdaptiveScale, Jr as types_d_exports$9, Jt as PoolTrimDetail, Kt as PerfTelemetryLine, L as OverlayValue, Lr as SaveUnreadableError, Lt as PerfGapLine, M as HudPart, Mr as types_d_exports$10, Mt as PerfCollectorLine, N as HudPartValue, Nt as PerfCounts, Ot as PassRecord, P as NineSlice, Pt as PerfDisplay, Qt as ShaderEventDetail, R as Parent, Rn as AnchorTarget, Rt as PerfHeaderLine, St as OverlayWhat, Tr as types_d_exports$3, Tt as PERF_LOG_VERSION, Ut as PerfSampleLine, V as Sprite, Vt as PerfMarkLine, Wt as PerfSpikeLine, Xt as ProblemRule, Yt as ProblemEventDetail, Z as MonitorConfig, Zt as SHADER_WHATS, _n as type, _t as FrameRing, at as types_d_exports$12, bt as MonitorSections, dn as types_d_exports$6, en as WarmDetail, fn as contribution, g as types_d_exports$1, gn as to, gt as FrameRecord, hn as slot, ht as FrameReadout, j as Display, jt as PerfChangeEntry, kt as PerfCause, mn as exit, mt as FrameReadResult, ni as types_d_exports$15, nt as PoolTrim, pt as FrameColumns, q as sprite, qt as PerfThermalLine, st as MonitorCounts, tn as DEMAND_REASONS, vt as LongFrameEntry, wt as PERF_GAP_BUCKETS, xt as OverlayEventDetail, yr as types_d_exports$17, yt as MONITOR_SECTIONS, z as Shape, zt as PerfLogLine } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-BO8ChejZ.mjs";
|
|
4
|
+
import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-PGmy-0aO.mjs";
|
|
5
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, type BackResult, type BindOptions, Blur, Box, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, 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, SHADER_WHATS, SaveUnreadableError, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Sprite, type SpriteBlend, Swipeable, Tappable, Text, type TextFormat, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, type WarmDetail, 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, 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 sfx, $t as flowPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as worldPlugin, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, ct as Draggable, d as defineScene, dt as Hovered, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-
|
|
2
|
-
import { $ as Tree, B as Overlay, C as bind, E as label, G as Transform, H as Parent, J as sprite, L as Display, Q as Order, R as HudPart, S as Text, T as defineTextStyles, U as Shape, W as Sprite, X as Layer, Y as Exiting, Z as Now, _ as popup, at as tag, b as defineStyle, c as Box, et as component, f as LocalWrite, m as ScrollState, nt as resource, rt as system, tt as mut, u as DebugTrigger, x as Countdown, y as defineTokens, z as NineSlice } from "./visual-
|
|
1
|
+
import { $ as sfx, $t as flowPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as worldPlugin, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, ct as Draggable, d as defineScene, dt as Hovered, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-oLOaiwM6.mjs";
|
|
2
|
+
import { $ as Tree, B as Overlay, C as bind, E as label, G as Transform, H as Parent, J as sprite, L as Display, Q as Order, R as HudPart, S as Text, T as defineTextStyles, U as Shape, W as Sprite, X as Layer, Y as Exiting, Z as Now, _ as popup, at as tag, b as defineStyle, c as Box, et as component, f as LocalWrite, m as ScrollState, nt as resource, rt as system, tt as mut, u as DebugTrigger, x as Countdown, y as defineTokens, z as NineSlice } from "./visual-ciZa6Rza.mjs";
|
|
3
3
|
import { t as defineComponent } from "./component-DGg5DqKK.mjs";
|
|
4
4
|
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, 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, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, 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, 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 { En as JournalEntry, Er as Api, Rr as Snapshot, Y as Api$2, _r as Explained, cn as Position, ct as RenderStats, h as Usage, hr as Api$1, it as Under, nr as ComponentSchema, or as EntitySnapshot, sr as FrameDiff, t as Api$3, wn as FlowGraph } 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 InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-
|
|
6
|
-
import { n as defineSource } from "./define-
|
|
1
|
+
import { En as JournalEntry, Er as Api, Rr as Snapshot, Y as Api$2, _r as Explained, cn as Position, ct as RenderStats, h as Usage, hr as Api$1, it as Under, nr as ComponentSchema, or as EntitySnapshot, sr as FrameDiff, t as Api$3, wn as FlowGraph } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { c as UiNode } from "./types-BO8ChejZ.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
5
|
+
import { a as InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-BcANFUZP.mjs";
|
|
6
|
+
import { n as defineSource } from "./define-DRkVydOj.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
1
|
import { c as defineSource } from "./session-DuZfGZWk.mjs";
|
|
2
|
-
import { n as read, r as watch, t as sources } from "./sources-
|
|
2
|
+
import { n as read, r as watch, t as sources } from "./sources-Bp9xmX3f.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-UNbbvD7o.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-UNbbvD7o.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxs };
|
|
@@ -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-BO8ChejZ.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. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as rootPoseOf, M as parentOf, U as Shape, X as Layer, c as Box, r as drawnRect, z as NineSlice } from "./visual-
|
|
1
|
+
import { I as rootPoseOf, M as parentOf, U as Shape, X as Layer, c as Box, r as drawnRect, z as NineSlice } from "./visual-ciZa6Rza.mjs";
|
|
2
2
|
import { o as notInstalled } from "./dev-BNndV-hU.mjs";
|
|
3
3
|
import { a as readTarget, c as defineSource, l as inputSchema, n as isTainted, o as inputOrEmpty, t as cheatsOf } from "./session-DuZfGZWk.mjs";
|
|
4
4
|
//#region src/plugins/flow/doors/read.ts
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
|
2
2
|
import { r as systemSource, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { a as finishDrafts, i as enableDraftPatches, n as deepFreeze$1, o as openDrafts, r as dropDrafts } from "./drafts-BawpSaVp.mjs";
|
|
4
4
|
import { _ as compact, c as collectFlows, d as findNode, f as framePath, g as slotNames, h as restlessCapOf, i as servePaused, l as describeGraph, m as isRestCheckpoint, n as captureFrame, o as epochOf, p as graphHash, r as serveCaptures, s as pageNow$1, t as cancelCaptures, v as pushEntry } from "./capture-BtS6_oWr.mjs";
|
|
5
|
-
import { $ as Tree, A as isLeaving, B as Overlay, D as readStyle, F as rootPoseInto, G as Transform, H as Parent, I as rootPoseOf, K as arcDefaults, L as Display, M as parentOf$1, N as poseUnder, O as textFor, P as rootPointOf, Q as Order, R as HudPart, S as Text, U as Shape, V as OverlayLevel, W as Sprite, X as Layer, Y as Exiting, Z as Now, a as samePose, at as tag, c as Box, d as Escapable, et as component, f as LocalWrite, g as UiCounters, h as UI_OWNER, i as fitScaleOf, it as systemsFor, j as localPoseOf, k as applyPose, l as Covered, m as ScrollState, n as CONTENT$1, nt as resource, o as visualOf$1, p as Scroll, q as componentsFor, r as drawnRect, rt as system, s as visualRectOf, u as DebugTrigger, v as uiFor, w as builtInStyles, x as Countdown, z as NineSlice } from "./visual-
|
|
5
|
+
import { $ as Tree, A as isLeaving, B as Overlay, D as readStyle, F as rootPoseInto, G as Transform, H as Parent, I as rootPoseOf, K as arcDefaults, L as Display, M as parentOf$1, N as poseUnder, O as textFor, P as rootPointOf, Q as Order, R as HudPart, S as Text, U as Shape, V as OverlayLevel, W as Sprite, X as Layer, Y as Exiting, Z as Now, a as samePose, at as tag, c as Box, d as Escapable, et as component, f as LocalWrite, g as UiCounters, h as UI_OWNER, i as fitScaleOf, it as systemsFor, j as localPoseOf, k as applyPose, l as Covered, m as ScrollState, n as CONTENT$1, nt as resource, o as visualOf$1, p as Scroll, q as componentsFor, r as drawnRect, rt as system, s as visualRectOf, u as DebugTrigger, v as uiFor, w as builtInStyles, x as Countdown, z as NineSlice } from "./visual-ciZa6Rza.mjs";
|
|
6
6
|
import { a as isDev } from "./dev-BNndV-hU.mjs";
|
|
7
7
|
import { n as isComponentDefinition } from "./component-DGg5DqKK.mjs";
|
|
8
8
|
import { n as flatten } from "./flatten-nUX9PpGo.mjs";
|
|
@@ -5839,10 +5839,27 @@ function wrongBlocked(step, payload) {
|
|
|
5839
5839
|
return /* @__PURE__ */ new Error(`[game] The guide of node "${step.path}" blocks with "${blocked.intent}", which is no outcome of the node.\n Add it to outcomes or drop blocked.`);
|
|
5840
5840
|
}
|
|
5841
5841
|
/**
|
|
5842
|
+
* Hands a result to the `guide` handler with a signal of its own. A handler that fails is logged,
|
|
5843
|
+
* `flow:guide-handler-failed`; one that fails after the node's abort was told to stop.
|
|
5844
|
+
*
|
|
5845
|
+
* @param ctx - Domain context of the flow plugin.
|
|
5846
|
+
* @param modules - Injected sibling APIs.
|
|
5847
|
+
* @param step - The node run in progress.
|
|
5848
|
+
* @param payload - The result as the descriptor's payload.
|
|
5849
|
+
*/
|
|
5850
|
+
function runGuide(ctx, modules, step, payload) {
|
|
5851
|
+
modules.fx.run({
|
|
5852
|
+
kind: "guide",
|
|
5853
|
+
payload
|
|
5854
|
+
}, step.signal).catch((error) => {
|
|
5855
|
+
if (step.signal.aborted) return;
|
|
5856
|
+
ctx.log.error("flow:guide-handler-failed", { path: step.path }, asError$4(error));
|
|
5857
|
+
});
|
|
5858
|
+
}
|
|
5859
|
+
/**
|
|
5842
5860
|
* Shows a new result of the guide: the guide shown so far ends with its narrow, the gate is
|
|
5843
5861
|
* narrowed to `allow` and `blocked`, and the `guide` handler gets the payload with a signal of its
|
|
5844
|
-
* own. A result equal to the last one changes nothing; `undefined` only lifts.
|
|
5845
|
-
* is logged, `flow:guide-handler-failed`; one that fails after the node's abort was told to stop.
|
|
5862
|
+
* own. A result equal to the last one changes nothing; `undefined` only lifts.
|
|
5846
5863
|
*
|
|
5847
5864
|
* @param ctx - Domain context of the flow plugin.
|
|
5848
5865
|
* @param modules - Injected sibling APIs.
|
|
@@ -5860,13 +5877,7 @@ function show$1(ctx, modules, step, guide, payload) {
|
|
|
5860
5877
|
return;
|
|
5861
5878
|
}
|
|
5862
5879
|
modules.gate.narrow(guideAnswer(payload, "allow"), guideAnswer(payload, "blocked"));
|
|
5863
|
-
modules
|
|
5864
|
-
kind: "guide",
|
|
5865
|
-
payload
|
|
5866
|
-
}, step.signal).catch((error) => {
|
|
5867
|
-
if (step.signal.aborted) return;
|
|
5868
|
-
ctx.log.error("flow:guide-handler-failed", { path: step.path }, asError$4(error));
|
|
5869
|
-
});
|
|
5880
|
+
runGuide(ctx, modules, step, payload);
|
|
5870
5881
|
}
|
|
5871
5882
|
/**
|
|
5872
5883
|
* Derives the guide from the committed state and shows a new result.
|
|
@@ -5897,7 +5908,8 @@ function derive(ctx, modules, step, guide) {
|
|
|
5897
5908
|
* Enters the guide of a node: derives it from the committed state and keeps it in the runner state,
|
|
5898
5909
|
* so a commit while the node waits at its gate derives it again. Called after the node's `onEnter`
|
|
5899
5910
|
* stages and before its outcome is awaited. A node without `guide`, and one already aborted, change
|
|
5900
|
-
* nothing. A `guide` that throws again after a commit fails the node through `step.fail`.
|
|
5911
|
+
* nothing. A `guide` that throws again after a commit fails the node through `step.fail`. `reshow`
|
|
5912
|
+
* hands the last result to the handler again, once the mode is live after a fast walk.
|
|
5901
5913
|
*
|
|
5902
5914
|
* @param ctx - Domain context of the flow plugin.
|
|
5903
5915
|
* @param modules - Injected sibling APIs.
|
|
@@ -5908,13 +5920,20 @@ function enterGuide(ctx, modules, step) {
|
|
|
5908
5920
|
if (step.node.guide === void 0 || step.signal.aborted) return void 0;
|
|
5909
5921
|
const guide = {
|
|
5910
5922
|
last: void 0,
|
|
5911
|
-
refresh: noop
|
|
5923
|
+
refresh: noop,
|
|
5924
|
+
reshow: noop
|
|
5912
5925
|
};
|
|
5913
5926
|
guide.refresh = () => {
|
|
5914
5927
|
if (step.signal.aborted || ctx.state.runner.guide !== guide) return;
|
|
5915
5928
|
const failed = derive(ctx, modules, step, guide);
|
|
5916
5929
|
if (failed !== void 0) step.fail(failed);
|
|
5917
5930
|
};
|
|
5931
|
+
guide.reshow = () => {
|
|
5932
|
+
const last = guide.last;
|
|
5933
|
+
if (step.signal.aborted || ctx.state.runner.guide !== guide || last === void 0) return;
|
|
5934
|
+
modules.fx.endGuides();
|
|
5935
|
+
runGuide(ctx, modules, step, last);
|
|
5936
|
+
};
|
|
5918
5937
|
ctx.state.runner.guide = guide;
|
|
5919
5938
|
return derive(ctx, modules, step, guide);
|
|
5920
5939
|
}
|
|
@@ -6811,7 +6830,7 @@ async function playRoute(ctx, modules, route, running) {
|
|
|
6811
6830
|
* after the switch, so it never starts live and never shows its popup. The mode of the caller
|
|
6812
6831
|
* is put back afterwards, also when the bookmark is refused or a step rejects, and a
|
|
6813
6832
|
* substitution the route never reached is disarmed: it must not skip a sub-flow in the live play
|
|
6814
|
-
* that follows.
|
|
6833
|
+
* that follows. Back in live mode, the guide of the node the walk ends at is shown.
|
|
6815
6834
|
*
|
|
6816
6835
|
* @param ctx - Domain context of the flow plugin.
|
|
6817
6836
|
* @param modules - Injected sibling APIs: features, fx, gate, inbox.
|
|
@@ -6835,6 +6854,7 @@ async function walkRoute(ctx, modules, route, start) {
|
|
|
6835
6854
|
} finally {
|
|
6836
6855
|
loopSeam(ctx.state.runner).substitutions.clear();
|
|
6837
6856
|
modules.fx.setMode(previous);
|
|
6857
|
+
if (previous === "live") ctx.state.runner.guide?.reshow();
|
|
6838
6858
|
}
|
|
6839
6859
|
return readState(ctx);
|
|
6840
6860
|
}
|
|
@@ -7020,7 +7040,9 @@ function createRunnerApi(ctx, modules) {
|
|
|
7020
7040
|
history: () => [...state.journal],
|
|
7021
7041
|
setMode: (mode) => {
|
|
7022
7042
|
if (state.running !== void 0 && !resting(ctx)) throw new Error("[game] flow.setMode() was called while a transit node runs.\n Call it before run() or while the graph rests.");
|
|
7043
|
+
const previous = ctx.state.fx.mode;
|
|
7023
7044
|
modules.fx.setMode(mode);
|
|
7045
|
+
if (previous === "fast" && mode === "live") state.guide?.reshow();
|
|
7024
7046
|
}
|
|
7025
7047
|
};
|
|
7026
7048
|
}
|
|
@@ -50356,19 +50378,28 @@ function notifyTap(ctx, entity) {
|
|
|
50356
50378
|
* and forgot to name it — so it is reported with the projection it came from and still offered,
|
|
50357
50379
|
* which keeps the return value honest.
|
|
50358
50380
|
*
|
|
50381
|
+
* A press the narrow of a guide drops — another intent, or the allowed intent with another
|
|
50382
|
+
* payload (a drop on the wrong cell) — answers the guide's `blocked` instead, once, when the gate
|
|
50383
|
+
* is open and the guide names one. A closed gate holds the press as it is and converts nothing.
|
|
50384
|
+
* The gate's state is read only for a refused answer, never for an accepted one.
|
|
50385
|
+
*
|
|
50359
50386
|
* @param ctx - Domain context of the input plugin.
|
|
50360
50387
|
* @param entity - The view the answer came from, for the warning.
|
|
50361
50388
|
* @param answer - The answer one of the builders produced.
|
|
50362
|
-
* @returns What `flow.gate.answer` returned.
|
|
50389
|
+
* @returns What `flow.gate.answer` returned: for the answer, or for `blocked` in its place.
|
|
50363
50390
|
*/
|
|
50364
50391
|
function submit(ctx, entity, answer) {
|
|
50365
50392
|
if (answer.intent === "") ctx.log.warn("input: empty intent", { view: ctx.deps.world.projection.keyOf(entity) });
|
|
50366
|
-
|
|
50393
|
+
const gate = ctx.deps.flow.gate;
|
|
50394
|
+
if (gate.answer(answer)) return true;
|
|
50395
|
+
const { open, blocked } = gate.state();
|
|
50396
|
+
return open && blocked !== void 0 && gate.answer(blocked);
|
|
50367
50397
|
}
|
|
50368
50398
|
/**
|
|
50369
50399
|
* Answers a press the lock of a guide kept from every view: the gate's `blocked`, the answer the
|
|
50370
50400
|
* running guide names for a press outside its window, with its payload. A guide that names none
|
|
50371
|
-
* drops the press: the gate is not called.
|
|
50401
|
+
* drops the press: the gate is not called. A press inside the window that the narrow drops answers
|
|
50402
|
+
* `blocked` through `submit`.
|
|
50372
50403
|
*
|
|
50373
50404
|
* @param ctx - Domain context of the input plugin.
|
|
50374
50405
|
* @returns What `flow.gate.answer` returned; `false` when the guide names no `blocked`.
|
|
@@ -52536,7 +52567,8 @@ function setAwake(ctx, provider, on) {
|
|
|
52536
52567
|
/**
|
|
52537
52568
|
* @file platform plugin — API factory, the Back chain and the exit. One press runs three steps and
|
|
52538
52569
|
* the first that takes it wins: the Escape button of the top popup, the intent `back` of the
|
|
52539
|
-
* resting node, the provider leaving the app.
|
|
52570
|
+
* resting node, the provider leaving the app. A guide that narrows the open gate takes it first.
|
|
52571
|
+
* `exit()` is that last step alone.
|
|
52540
52572
|
*/
|
|
52541
52573
|
/** The intent a resting node lists to take the Back press itself. */
|
|
52542
52574
|
const BACK_INTENT = "back";
|
|
@@ -52553,19 +52585,28 @@ function leave(ctx) {
|
|
|
52553
52585
|
}
|
|
52554
52586
|
/**
|
|
52555
52587
|
* Runs the Back chain once. `back()` and the provider's `onBack` both go through here, so a test
|
|
52556
|
-
* and a real press end the same way.
|
|
52557
|
-
*
|
|
52558
|
-
*
|
|
52559
|
-
*
|
|
52588
|
+
* and a real press end the same way. A guide that narrows the open gate owns the screen and takes
|
|
52589
|
+
* Back before step 1: the press is offered as the intent `back`, which only a guide that allows
|
|
52590
|
+
* `back` takes, and counts as taken either way. It never presses Escape, so an `escape` button on
|
|
52591
|
+
* a guided screen never turns Back into the guide's `blocked`, and it never leaves the app.
|
|
52592
|
+
* Otherwise Escape is what ui answers with the `escape` button of its top root; it also ends the
|
|
52593
|
+
* editing of a text field. While the graph moves between nodes the gate is closed: it holds the
|
|
52594
|
+
* answer for the next gate (one frame, or `flow.holdMs`), so the press counts as taken and never
|
|
52595
|
+
* leaves the app in the middle of a step.
|
|
52560
52596
|
*
|
|
52561
52597
|
* @param ctx - Kernel context of the platform plugin.
|
|
52562
52598
|
* @returns What took the press, `"none"` without a provider.
|
|
52563
52599
|
*/
|
|
52564
52600
|
function runBack(ctx) {
|
|
52565
52601
|
if (ctx.config.provider === void 0) return "none";
|
|
52566
|
-
if (ctx.require(inputPlugin).pressKey("Escape")) return "popup";
|
|
52567
52602
|
const gate = ctx.require(flowPlugin).gate;
|
|
52568
|
-
|
|
52603
|
+
const before = gate.state();
|
|
52604
|
+
if (before.open && before.narrowed) {
|
|
52605
|
+
gate.answer({ intent: BACK_INTENT });
|
|
52606
|
+
return "intent";
|
|
52607
|
+
}
|
|
52608
|
+
if (ctx.require(inputPlugin).pressKey("Escape")) return "popup";
|
|
52609
|
+
if (gate.answer({ intent: BACK_INTENT }) || !before.open) return "intent";
|
|
52569
52610
|
leave(ctx);
|
|
52570
52611
|
return "exit";
|
|
52571
52612
|
}
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Cr as FakeClock, Dn as NodeTable, Fn as Hint, In as NodeFx, jn as Descriptor, kr as Json, xn as AnyFlow, xr as ClockSource, yn as FeaturePlugin } from "./types-
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { b as saveOf, v as WithGameState, y as memory } from "./types-
|
|
4
|
-
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Cr as FakeClock, Dn as NodeTable, Fn as Hint, In as NodeFx, jn as Descriptor, kr as Json, xn as AnyFlow, xr as ClockSource, yn as FeaturePlugin } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { t as createApp } from "./index-PGmy-0aO.mjs";
|
|
3
|
+
import { b as saveOf, v as WithGameState, y as memory } from "./types-VzfTa-kj.mjs";
|
|
4
|
+
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/clock/fake.d.ts
|
package/dist/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-
|
|
1
|
+
import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-oLOaiwM6.mjs";
|
|
2
2
|
import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as PixiModule, A as SyncApi, An as TypeTag, Er as Api$6, Gn as NumericFields, Gr as Events$5, Jn as ReducedMotion, O as FilterSlot, Or as Events$3, Q as PixiFilter, Qn as AnyComponent, Rn as AnchorTarget, Vn as Ease, Wn as MotionHandle, Xn as TrackSegment, Y as Api$4, Yn as TrackOptions, Yr as Api$1, ai as Require, ar as Entity, b as Events$4, er as AnyComponentValue, et as PixiSprite, ft as FilterCache, hr as Api$3, ii as Events$2, jn as Descriptor, k as FilterSlotInputs, kr as Json, nn as Api$2, rr as ComponentType, s as Events$1, t as Api$5, tr as ComponentHandle, tt as PixiTexture, ut as Point } from "./types-
|
|
2
|
-
import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-
|
|
1
|
+
import { $ as PixiModule, A as SyncApi, An as TypeTag, Er as Api$6, Gn as NumericFields, Gr as Events$5, Jn as ReducedMotion, O as FilterSlot, Or as Events$3, Q as PixiFilter, Qn as AnyComponent, Rn as AnchorTarget, Vn as Ease, Wn as MotionHandle, Xn as TrackSegment, Y as Api$4, Yn as TrackOptions, Yr as Api$1, ai as Require, ar as Entity, b as Events$4, er as AnyComponentValue, et as PixiSprite, ft as FilterCache, hr as Api$3, ii as Events$2, jn as Descriptor, k as FilterSlotInputs, kr as Json, nn as Api$2, rr as ComponentType, s as Events$1, t as Api$5, tr as ComponentHandle, tt as PixiTexture, ut as Point } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-BO8ChejZ.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as AnyComponentType, Fn as Hint, Gn as NumericFields, Hn as Motion, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Ln as Answer, Qn as AnyComponent, Rn as AnchorTarget, Un as MotionCause, Vn as Ease, Wn as MotionHandle, Y as Api$3, Yr as Api, Zn as ViewHandle, ai as Require, ar as Entity, br as Api$5, dt as ViewportSize, er as AnyComponentValue, hr as Api$2, jn as Descriptor, kr as Json, mr as TagType, nn as Api$1, rr as ComponentType, s as Events$1, t as Api$4, zn as ChangeHook } from "./types-
|
|
1
|
+
import { $n as AnyComponentType, Fn as Hint, Gn as NumericFields, Hn as Motion, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Ln as Answer, Qn as AnyComponent, Rn as AnchorTarget, Un as MotionCause, Vn as Ease, Wn as MotionHandle, Y as Api$3, Yr as Api, Zn as ViewHandle, ai as Require, ar as Entity, br as Api$5, dt as ViewportSize, er as AnyComponentValue, hr as Api$2, jn as Descriptor, kr as Json, mr as TagType, nn as Api$1, rr as ComponentType, s as Events$1, t as Api$4, zn as ChangeHook } from "./types-CdMow4TX.mjs";
|
|
2
2
|
import { Log } from "@moku-labs/common/browser";
|
|
3
3
|
import { PluginCtx } from "@moku-labs/core";
|
|
4
4
|
import { Node, Yoga } from "yoga-layout/load";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Rr as Snapshot, kr as Json } from "./types-
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Rr as Snapshot, kr as Json } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-BtrOeDfI.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -4917,8 +4917,10 @@ type Hint = {
|
|
|
4917
4917
|
* Options of a guide: the `guide` descriptor a node awaits, and what the `guide` of a node returns.
|
|
4918
4918
|
* `allow` is the one answer the gate lets through. `ui` dims the screen with a veil and cuts a
|
|
4919
4919
|
* window over `target` (one target, or the union of the shown ones of a list), grown by `pad`; a
|
|
4920
|
-
* press outside the window reaches no view and answers `blocked` when it is set.
|
|
4921
|
-
* the
|
|
4920
|
+
* press outside the window reaches no view and answers `blocked` when it is set. A press inside the
|
|
4921
|
+
* window that the narrow drops answers `blocked` too: another intent, or the allowed intent with
|
|
4922
|
+
* another payload (a drop on the wrong cell). Without a target the veil covers the whole screen and
|
|
4923
|
+
* every press is outside.
|
|
4922
4924
|
*
|
|
4923
4925
|
* @example
|
|
4924
4926
|
* ```ts
|
|
@@ -4977,16 +4979,25 @@ type GuideOptions = {
|
|
|
4977
4979
|
alpha?: number;
|
|
4978
4980
|
} | false;
|
|
4979
4981
|
/**
|
|
4980
|
-
* The answer a press outside the window gives, with its payload, instead of reaching nothing.
|
|
4981
|
-
*
|
|
4982
|
+
* The answer a press outside the window gives, with its payload, instead of reaching nothing. A
|
|
4983
|
+
* press inside the window that the narrow drops gives it too: another intent, or the allowed
|
|
4984
|
+
* intent with another payload (a drop on the wrong cell). A press at a closed gate is held as it
|
|
4985
|
+
* is, never turned into `blocked`. The gate takes it beside `allow`, so it must be an outcome of
|
|
4986
|
+
* the node that waits.
|
|
4982
4987
|
*
|
|
4983
4988
|
* @example
|
|
4984
4989
|
* ```ts
|
|
4985
4990
|
* const strict: GuideOptions = {
|
|
4986
|
-
* allow: { intent: "
|
|
4987
|
-
* target:
|
|
4988
|
-
*
|
|
4989
|
-
*
|
|
4991
|
+
* allow: { intent: "merge", payload: { from: "c2", to: "c3" } },
|
|
4992
|
+
* target: [
|
|
4993
|
+
* { projection: "board.items", key: "c2" },
|
|
4994
|
+
* { projection: "board.items", key: "c3" },
|
|
4995
|
+
* { projection: "board.items", key: "c4" }
|
|
4996
|
+
* ],
|
|
4997
|
+
* blocked: { intent: "tutorialBlocked", payload: { step: 2 } }
|
|
4998
|
+
* };
|
|
4999
|
+
* // a press on the shop button outside the window, or a drop of c2 onto c4 inside it, answers
|
|
5000
|
+
* // { intent: "tutorialBlocked", payload: { step: 2 } }: the node shows the hand again
|
|
4990
5001
|
* ```
|
|
4991
5002
|
*/
|
|
4992
5003
|
blocked?: Allow;
|
|
@@ -6207,6 +6218,12 @@ type NodeGuideHost = {
|
|
|
6207
6218
|
[key: string]: Json;
|
|
6208
6219
|
} | undefined; /** Derives the guide again from the committed state; a `guide` that throws fails the node. */
|
|
6209
6220
|
refresh: () => void;
|
|
6221
|
+
/**
|
|
6222
|
+
* Shows the last result again through the `guide` handler, with the narrow it already set. Called
|
|
6223
|
+
* when the fx mode goes from fast back to live: in fast mode the handler of `ui` did not run.
|
|
6224
|
+
* Shows nothing once the node was left, or while it guides nothing.
|
|
6225
|
+
*/
|
|
6226
|
+
reshow: () => void;
|
|
6210
6227
|
};
|
|
6211
6228
|
/**
|
|
6212
6229
|
* The last `flow.state()` and the fields it was built from. `state()` hands the same frozen
|
|
@@ -6300,7 +6317,8 @@ type RunnerApi = {
|
|
|
6300
6317
|
* entered through the same check as `restore`, with the same fallback. A rest node is entered
|
|
6301
6318
|
* before the switch to fast mode: its stages see the mode of the caller. A transit node is
|
|
6302
6319
|
* entered after the switch and without the wait `restore` adds for it: its popup is not shown,
|
|
6303
|
-
* the route answers it. The mode of the caller is put back afterwards
|
|
6320
|
+
* the route answers it. The mode of the caller is put back afterwards; when it is live, the guide
|
|
6321
|
+
* of the node the walk ends at is shown, its lock and veil as on a live entry.
|
|
6304
6322
|
*
|
|
6305
6323
|
* @param route - The player's answers and substituted sub-flow results, in order.
|
|
6306
6324
|
* @param options - Walk options.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as PixiModule, An as TypeTag, Cr as FakeClock, Dr as Config, Fr as ProviderCall, Ir as SaveDoc, Pr as PlayerStateProvider, X as Config$2, a as Config$3, d as Manifest, in as Config$1, kr as Json, lt as Orientation, n as AssetsIo, xn as AnyFlow, xr as ClockSource, yn as FeaturePlugin, zr as SnapshotOf } from "./types-
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { R as I18nApi, U as StringTable, W as TextKey } from "./types-
|
|
4
|
-
import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-
|
|
1
|
+
import { $ as PixiModule, An as TypeTag, Cr as FakeClock, Dr as Config, Fr as ProviderCall, Ir as SaveDoc, Pr as PlayerStateProvider, X as Config$2, a as Config$3, d as Manifest, in as Config$1, kr as Json, lt as Orientation, n as AssetsIo, xn as AnyFlow, xr as ClockSource, yn as FeaturePlugin, zr as SnapshotOf } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { R as I18nApi, U as StringTable, W as TextKey } from "./types-BO8ChejZ.mjs";
|
|
4
|
+
import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-PGmy-0aO.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/model/store/providers/memory.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Er as Api$2, Ur as Api$3, Y as Api, br as Api$4, hr as Api$1 } from "./types-
|
|
2
|
-
import { P as AnimApi, r as UiApi } from "./types-
|
|
3
|
-
import { N as InputApi } from "./types-
|
|
4
|
-
import { r as Repro } from "./headless-
|
|
5
|
-
import { a as InputOf, r as ControlApp } from "./types-
|
|
6
|
-
import { t as commands } from "./commands-
|
|
1
|
+
import { Er as Api$2, Ur as Api$3, Y as Api, br as Api$4, hr as Api$1 } from "./types-CdMow4TX.mjs";
|
|
2
|
+
import { P as AnimApi, r as UiApi } from "./types-ADGyB4g0.mjs";
|
|
3
|
+
import { N as InputApi } from "./types-BO8ChejZ.mjs";
|
|
4
|
+
import { r as Repro } from "./headless-BtrOeDfI.mjs";
|
|
5
|
+
import { a as InputOf, r as ControlApp } from "./types-BcANFUZP.mjs";
|
|
6
|
+
import { t as commands } from "./commands-D8ocnkh8.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/visual/types.d.ts
|
|
9
9
|
/** The base commands of the `/control` door, keyed by their short names. */
|
|
@@ -1280,9 +1280,25 @@ function boxOf(element) {
|
|
|
1280
1280
|
return element.boxed === true ? { box: 0 } : {};
|
|
1281
1281
|
}
|
|
1282
1282
|
/**
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1283
|
+
* Whether the layout sized an image to nothing: an axis whose size its style states (a width or a
|
|
1284
|
+
* height, or both edges of an absolute element) came out at 0. An image whose style states no size
|
|
1285
|
+
* is 0 by 0 too, and draws as its `Sprite` says: at its texture's size, or at the size a game's own
|
|
1286
|
+
* system writes into the sprite.
|
|
1287
|
+
*
|
|
1288
|
+
* @param style - The resolved style of the image.
|
|
1289
|
+
* @param rect - Its laid-out rect.
|
|
1290
|
+
* @returns True when it draws nothing.
|
|
1291
|
+
*/
|
|
1292
|
+
function sizedToNothing(style, rect) {
|
|
1293
|
+
const absolute = style.position === "absolute";
|
|
1294
|
+
const statesWidth = style.width !== void 0 || absolute && style.left !== void 0 && style.right !== void 0;
|
|
1295
|
+
const statesHeight = style.height !== void 0 || absolute && style.top !== void 0 && style.bottom !== void 0;
|
|
1296
|
+
return statesWidth && rect.w <= 0 || statesHeight && rect.h <= 0;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* The visual component of an element: a sprite for an image or an icon (at alpha 0 while its style
|
|
1300
|
+
* states a size the layout makes 0: the renderer draws a sprite of width 0 at its texture's size,
|
|
1301
|
+
* so the size alone cannot say "nothing"), the text for a text (with
|
|
1286
1302
|
* its laid-out width as the box a `"box"` style wraps at), the nine-slice of its style (outlined
|
|
1287
1303
|
* when the style sets `debug`, its rim alone when it sets `hollow`; the sprite and the nine-slice
|
|
1288
1304
|
* blended by the style's `blend`), or a rounded rectangle, a triangle with `shape: "triangle"`, its
|
|
@@ -1303,11 +1319,11 @@ function visualOf(element) {
|
|
|
1303
1319
|
const alpha = style.alpha ?? 1;
|
|
1304
1320
|
const tint = style.tint ?? Sprite.defaults.tint;
|
|
1305
1321
|
if (type === "image" || type === "icon") {
|
|
1306
|
-
const
|
|
1322
|
+
const hidden = sizedToNothing(style, rect);
|
|
1307
1323
|
return [Sprite({
|
|
1308
1324
|
texture: textureOf(node.props),
|
|
1309
1325
|
tint,
|
|
1310
|
-
alpha:
|
|
1326
|
+
alpha: hidden ? 0 : alpha,
|
|
1311
1327
|
anchor: {
|
|
1312
1328
|
x: 0,
|
|
1313
1329
|
y: 0
|
package/dist/visual.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-
|
|
1
|
+
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-CF3nFcQ3.mjs";
|
|
2
2
|
export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
|
package/dist/visual.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as VISUAL_CLOCK } from "./fake-hnJcJeYf.mjs";
|
|
2
|
-
import { n as read, t as sources } from "./sources-
|
|
2
|
+
import { n as read, t as sources } from "./sources-Bp9xmX3f.mjs";
|
|
3
3
|
import { n as commands, t as run } from "./run-3QhrffgM.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createBrandConsole } from "@moku-labs/common/cli";
|
package/llms.txt
CHANGED
|
@@ -461,14 +461,14 @@ export const awaitIntent = defineNode({
|
|
|
461
461
|
target: [{ projection: "board.items", key: "c2" }, { projection: "board.items", key: "c3" }],
|
|
462
462
|
pad: 8,
|
|
463
463
|
veil: false, // the game draws its own look in an <anchor>
|
|
464
|
-
blocked: { intent: "tutorialBlocked" } // a press outside the window answers this
|
|
464
|
+
blocked: { intent: "tutorialBlocked" } // a press outside the window, or one inside the narrow refuses, answers this
|
|
465
465
|
}
|
|
466
466
|
: undefined
|
|
467
467
|
});
|
|
468
468
|
```
|
|
469
469
|
|
|
470
470
|
- `guide` runs when the node is entered (after its `onEnter` stages) and again after a commit while it waits at its gate (never for the commit of an edge); an equal result (deep JSON) changes nothing, a new one replaces the guide, `undefined` lifts it. It goes when the node is left; a restore enters the node again, so it is derived again. Fast mode: only the narrow. A `guide` that throws fails the node: `[game] The guide of node "path" threw: <message>` (rollback, retry, safe node). A dev build fails it when `blocked.intent` is no outcome of the node.
|
|
471
|
-
- The gate takes only `allow` and `blocked` while a guide stands; `app.flow.gate.state()` reports `blocked`.
|
|
471
|
+
- The gate takes only `allow` and `blocked` while a guide stands; `app.flow.gate.state()` reports `blocked`. A press `input` gives that the open gate's narrow refuses (another intent, or `allow`'s intent with another payload, a drop on the wrong cell) answers `blocked` in its place, once, with its payload; without `blocked` it answers nothing. A press at a closed gate is held as it is, not converted.
|
|
472
472
|
- `ui` draws a veil (black 0.6, or `veil: { color, alpha }`; `alpha: 0` invisible, `false` none) around a window over the target or the union of the shown targets, grown by `pad`, placed every frame (it follows a moving or scrolling target), and locks `input` outside the window: a press there reaches no view (no `Tappable`, `LocalWrite`, scroll, drag, trace) and answers `blocked`, or nothing. No target, or none shown: the veil covers the screen and every press is locked, so a target key that never shows soft-locks the step (only `blocked` and the keyboard answer); a dev build warns `ui:guide-target-missing` `{ targets }` once after a key named no entity two frames in a row. A guide derived again with the same targets keeps the previous window for two frames while its targets are not laid out yet. A text field outside the window opens no keyboard. The doors `app.input.tap/press/drag` do no hit test and are not locked; a press reads the window of the frame before (input runs before layout). 0 B a frame.
|
|
473
473
|
- `await fx(guide({ allow: { intent: "roll" } }))` in a body still works, with the same options. The rounded window, the rim, the glide, the hand and the text are the game's: an `<anchor>` on the same targets with `veil: false`.
|
|
474
474
|
|
|
@@ -598,7 +598,7 @@ A screen is a projection whose `view` returns JSX. The game's `tsconfig.json` se
|
|
|
598
598
|
- Animation is data: `defineAnimation(id, { slots: { name: type<Anim.Target>() }, build: (slots, { at }) => Step })`. Steps: `sequence(...)`, `parallel(...)`, `stagger(items, ms, item => Step)`, `tween(target, Component, to, { ms, ease?, delayMs?, additive?, space?, reduced? })`, `set(target, Component, patch)`, `wait(ms)`, `mark(name)`, `frames(target, { keys, fps, loop? })`, `sfx(key, { bus? })`, `haptic(kind)`, `use(animation, slots, tools?)`, `spawn` (a temporary entity, flying coins, that the timeline despawns when it ends; see the anim README). `Frames({ keys, fps, loop, playing })` is a component that walks a sprite through its textures for the entity's whole life. A target is `{ projection, key }` or an entity. A timeline resolves each `{ projection, key }` target once, when it starts: every step writes the view that held the key then, also after a commit removed it and while its exit plays, until it despawns; a view spawned again under the same key is not followed, and a key nothing held at the start is looked up at its step. `reduced: "keep"` (on a `tween` step, `transition` and `loop` of `defineMotion`, `TweenOptions`, `RestOptions`) plays a track as written under reduced motion, a fade for one; the default `"cut"` lands it at once or holds a loop on its first key. A node plays it with `await fx(play(animation, slots))`; in fast mode it finishes at once. `defineMotion({ states, transition?, on: { enter?, exit?, change? }, when? })` builds the enter, exit and change hooks for a projection or the `motion` prop of a tag; `when: "change"` plays enter and exit only for a commit, so an element that comes or goes with its screen stands at rest and leaves without a motion (default `"always"`). Events `anim:mark` `{ animation, mark }` and `anim:finished` `{ animation }`. `app.anim.replace(definition)` is the dev hot swap: the next `play` builds the new tree. A system cannot `require` a plugin, so it plays through the resource `AnimPlayer`: `res(AnimPlayer).play(animation, slots)` returns the same handle as `app.anim.play`, and the registered animation of `animation.id` wins, so a hot swap reaches the system. Play on a change, never every frame; from phase `input` the tree moves in `animate` of the same frame. Before `anim` starts it throws `[game] AnimPlayer is not ready: anim has not started.` Config `maxTracks: 2000`.
|
|
599
599
|
- A `tween` step takes `segments` and `repeat` as `ViewHandle.tween` does: `tween(chest, Transform, { y: 0, scale: 0 }, { ms: 2400, additive: true, repeat: "forever", segments: [{ at: 0.08, ease: "out", to: { y: -14, scale: 0.06 } }, { at: 1, to: { y: 0, scale: 0 } }] })`. Segments walk over `ms` on one clock, `to` is where the last one ends, an additive walk names offsets; a number counts the extra runs. A definition error throws for empty segments, an `at` outside 0..1 or out of order, a last segment before 1, a bad repeat, and a `sequence` step after one that never ends. A forever step ends only by cancel or finish (a finish and a fast world land it on its start pose), does not play under reduced motion `"cut"`, writes nothing while its view is unseen, and lets the clock idle; a system plays it once through `AnimPlayer` and keeps the handle.
|
|
600
600
|
- Audio is opt-in: `plugins: [...screen, audioPlugin]`. `fx(sfx("orders.complete"))` resolves when the sound started. `await fx(music("board.theme"))` cross-fades; `music(null)` fades out; a scene's `music` key switches the track on `scenes:changed`. Buses `master`, `music`, `sfx`. Volumes come from the committed player: config `volumes: player => (player as Player).settings.audio`, applied on every `model:committed`. `app.audio`: `setVolume(bus, value)`, `volume(bus)`, `mute(bus, on)`, `muted(bus)`, `unlocked()`, `journal()` (the last started sounds, empty unless config `journal` is above 0). Config: `buses: { master: 1, music: 0.6, sfx: 1 }`, `musicFadeMs: 600`, `volumes`, `context`, `journal: 0`, `music: "decode" | "stream"` default `"decode"` (gapless buffer; `"stream"` is an `<audio>` element, less memory, a gap at every loop), `session: "ambient" | "playback" | "auto"` default `"ambient"` (iOS only: ambient mixes with other apps and obeys the silent switch). The context is asked to run at start: where the shell lets audio play (a native webview with the gesture requirement off) `unlocked()` is true with no touch; a browser that wants a gesture unlocks on the first `pointerdown` or `touchend`. Without `audio` every `sfx` and `music` effect resolves `undefined` at once, so the same node runs in a game with no sound. Named sounds: `sfx(key, { bus?, id?, fadeMs? })` with an `id` plays through its own gain, and the next sound with the same `id` fades the old one out over `fadeMs`, else config `sfxFadeMs` (default `120`, real milliseconds); `fx.start(stopSfx(id, { fadeMs? }))` and `app.audio.stop(id, { fadeMs? })` fade it out and end it (`fadeMs: 0` cuts it); an `id` nothing plays under changes nothing, and a sound of that `id` still decoding never starts. Without `id` an `sfx` plays to its end as before.
|
|
601
|
-
- `app.ui`: `tree()` the live screen as plain data (a text node carries `content`, the words it draws after `tr()` and `bind`; a text field carries `value`), `find(key)` the entity of a keyed element, `fill(key, value)` types into the text field with that `key`, `scroll(key, to)` puts the `scroll` with that `key` at `to` from its start at once, inside `0..max`, its fling or glide stopped (`false` and `ui:scroll-without-scroll` for no live `scroll`, `false` and `ui:scroll-before-solve` for a `scroll` its first solve has not placed yet), `rectOf(target)` where an `AnchorTarget` (or the shown ones of a list) is drawn, in screen reference units, the rect an `<anchor>` sits on, a target of no area shown at its point (`{ x, y, w: 0, h: 0 }`; an `<anchor>` on it stands there at size 0, takes no tap, its children lay out and hit as usual; an inward `pad` past half the target leaves it at size 0 on the centre), `undefined` when none is shown (an `image` laid out at
|
|
601
|
+
- `app.ui`: `tree()` the live screen as plain data (a text node carries `content`, the words it draws after `tr()` and `bind`; a text field carries `value`), `find(key)` the entity of a keyed element, `fill(key, value)` types into the text field with that `key`, `scroll(key, to)` puts the `scroll` with that `key` at `to` from its start at once, inside `0..max`, its fling or glide stopped (`false` and `ui:scroll-without-scroll` for no live `scroll`, `false` and `ui:scroll-before-solve` for a `scroll` its first solve has not placed yet), `rectOf(target)` where an `AnchorTarget` (or the shown ones of a list) is drawn, in screen reference units, the rect an `<anchor>` sits on, a target of no area shown at its point (`{ x, y, w: 0, h: 0 }`; an `<anchor>` on it stands there at size 0, takes no tap, its children lay out and hit as usual; an inward `pad` past half the target leaves it at size 0 on the centre), `undefined` when none is shown (an `image` whose style states a size, `width`/`height` or both edges of an absolute one, laid out at 0 draws nothing and counts as not shown; one whose style states no size keeps its alpha and draws as its `Sprite` says), any build, a new object per call (`app.ui.rectOf({ projection: "board.strip", key: "seat0" })` → `{ x: 40, y: 1500, w: 116, h: 120 }`), `lint()` tap targets under `tapTargetPt` (default `44`), text that overflows in some locale, absolute elements without `reason`. Config: `tapTargetPt: 44`, `breakpoints: { tall: 2, wide: 1.5 }`. `ui` emits only the dev global event `ui:hot-swap`, see "Hot swap".
|
|
602
602
|
|
|
603
603
|
```tsx
|
|
604
604
|
// features/hud/view.tsx
|