@moku-labs/game 0.15.55 → 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.
@@ -1,4 +1,4 @@
1
- import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-Dj8OQDCY.mjs";
1
+ import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-VzfTa-kj.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Pr as PlayerStateProvider } from "../types-D9YSrw2Z.mjs";
2
- import { ht as PlatformProvider } from "../index-BgJZZmqB.mjs";
3
- import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-Dj8OQDCY.mjs";
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-D9YSrw2Z.mjs";
2
- import { U as StringTable } from "./types-CGofZbu2.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-Dj8OQDCY.mjs";
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-9Oy89OMt.mjs";
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,4 +1,4 @@
1
- import { d as Manifest } from "./types-D9YSrw2Z.mjs";
1
+ import { d as Manifest } from "./types-CdMow4TX.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
@@ -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-D9YSrw2Z.mjs";
2
- import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-VWk999Gp.mjs";
3
- import { N as InputApi } from "./types-CGofZbu2.mjs";
4
- import { t as HeadlessApp } from "./headless-C4YDmZv1.mjs";
5
- import { n as Command, r as ControlApp } from "./types-BdwZpZce.mjs";
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
  /**
@@ -1,7 +1,7 @@
1
- import { t as HeadlessApp } from "./headless-C4YDmZv1.mjs";
2
- import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-BdwZpZce.mjs";
3
- import { t as commands } from "./commands-C7qVsYsu.mjs";
4
- import { t as defineCommand } from "./define-BeFMCdMd.mjs";
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-C4YDmZv1.mjs";
2
- import { c as Source, n as Command, o as InputSchema } from "./types-BdwZpZce.mjs";
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-D9YSrw2Z.mjs";
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-D9YSrw2Z.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-VWk999Gp.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-CGofZbu2.mjs";
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, the provider leaving the app, or nothing at all because the app has no provider.
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
- * Escape also ends the editing of a ui text field, so a
496
- * press while a field is edited ends the edit and answers `"popup"`. Without a provider nothing
497
- * is pressed and the answer is `"none"`.
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-D9YSrw2Z.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-VWk999Gp.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-CGofZbu2.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-BgJZZmqB.mjs";
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-9Oy89OMt.mjs";
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
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 };
@@ -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-D9YSrw2Z.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-VWk999Gp.mjs";
3
- import { c as UiNode } from "./types-CGofZbu2.mjs";
4
- import { t as HeadlessApp } from "./headless-C4YDmZv1.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-BdwZpZce.mjs";
6
- import { n as defineSource } from "./define-BeFMCdMd.mjs";
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
  /**
@@ -1,2 +1,2 @@
1
- import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-DAid26Eo.mjs";
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 };
@@ -1,2 +1,2 @@
1
- import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-DAid26Eo.mjs";
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-CGofZbu2.mjs";
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. */
@@ -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. A handler that fails
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.fx.run({
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
- return ctx.deps.flow.gate.answer(answer);
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. `exit()` is that last step alone.
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. Escape is what ui answers with the `escape` button of its
52557
- * top root; it also ends the editing of a text field. While the graph moves between nodes the gate
52558
- * is closed: it holds the answer for the next gate (one frame, or `flow.holdMs`), so the press
52559
- * counts as taken and never leaves the app in the middle of a step.
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
- if (gate.answer({ intent: BACK_INTENT }) || !gate.state().open) return "intent";
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
  }
@@ -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-D9YSrw2Z.mjs";
2
- import { t as createApp } from "./index-BgJZZmqB.mjs";
3
- import { b as saveOf, v as WithGameState, y as memory } from "./types-Dj8OQDCY.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-C4YDmZv1.mjs";
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-9Oy89OMt.mjs";
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-D9YSrw2Z.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-CGofZbu2.mjs";
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-D9YSrw2Z.mjs";
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-D9YSrw2Z.mjs";
2
- import { t as HeadlessApp } from "./headless-C4YDmZv1.mjs";
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. Without a target
4921
- * the veil covers the whole screen and every press is outside.
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
- * The gate takes it beside `allow`, so it must be an outcome of the node that waits.
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: "play" },
4987
- * target: { projection: "hud", key: "play" },
4988
- * blocked: { intent: "tutorialBlocked" }
4989
- * }; // a press on the shop button answers { intent: "tutorialBlocked" }: the node shows the hand again
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-D9YSrw2Z.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-VWk999Gp.mjs";
3
- import { R as I18nApi, U as StringTable, W as TextKey } from "./types-CGofZbu2.mjs";
4
- import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-BgJZZmqB.mjs";
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-D9YSrw2Z.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-VWk999Gp.mjs";
3
- import { N as InputApi } from "./types-CGofZbu2.mjs";
4
- import { r as Repro } from "./headless-C4YDmZv1.mjs";
5
- import { a as InputOf, r as ControlApp } from "./types-BdwZpZce.mjs";
6
- import { t as commands } from "./commands-C7qVsYsu.mjs";
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. */
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-CugfNrMB.mjs";
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/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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.55",
3
+ "version": "0.15.56",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [