@moku-labs/game 0.15.134 → 0.15.136

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 { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-DCtlPrmc.mjs";
1
+ import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-aTYAEQpf.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Yr as PlayerStateProvider } from "../types-Bl-YjAnU.mjs";
2
- import { Et as PlatformProvider } from "../index-C_Ej5JkQ.mjs";
3
- import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-DCtlPrmc.mjs";
1
+ import { Yr as PlayerStateProvider } from "../types-DfsSTLx7.mjs";
2
+ import { Et as PlatformProvider } from "../index-yxNL4-V2.mjs";
3
+ import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-aTYAEQpf.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 { Wr as Json } from "./types-Bl-YjAnU.mjs";
2
- import { J as StringTable } from "./types-DNmg5EAM.mjs";
3
- import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-DCtlPrmc.mjs";
1
+ import { Wr as Json } from "./types-DfsSTLx7.mjs";
2
+ import { J as StringTable } from "./types-DI754bnG.mjs";
3
+ import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-aTYAEQpf.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 { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-CXhsSeM2.mjs";
1
+ import { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-DCe6t6UY.mjs";
2
2
  import { t as memory } from "./memory-DeD9wis6.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-Bl-YjAnU.mjs";
1
+ import { d as Manifest } from "./types-DfsSTLx7.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { $r as Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-Bl-YjAnU.mjs";
2
- import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-DU-RYYj0.mjs";
3
- import { R as InputApi } from "./types-DNmg5EAM.mjs";
4
- import { t as HeadlessApp } from "./headless-ffgavU3Y.mjs";
5
- import { i as ControlApp, r as Command } from "./types-CYjnhoB9.mjs";
1
+ import { $r as Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-DfsSTLx7.mjs";
2
+ import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-DzZhjatf.mjs";
3
+ import { R as InputApi } from "./types-DI754bnG.mjs";
4
+ import { t as HeadlessApp } from "./headless-C-lBbJ3-.mjs";
5
+ import { i as ControlApp, r as Command } from "./types-VUbyAmMP.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-ffgavU3Y.mjs";
2
- import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-CYjnhoB9.mjs";
3
- import { t as commands } from "./commands-CzYKkdEO.mjs";
4
- import { t as defineCommand } from "./define-DR2SWS9E.mjs";
1
+ import { t as HeadlessApp } from "./headless-C-lBbJ3-.mjs";
2
+ import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-VUbyAmMP.mjs";
3
+ import { t as commands } from "./commands-DSoMdMbD.mjs";
4
+ import { t as defineCommand } from "./define-Df7Jv9a0.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-ffgavU3Y.mjs";
2
- import { l as Source, r as Command, s as InputSchema } from "./types-CYjnhoB9.mjs";
1
+ import { t as HeadlessApp } from "./headless-C-lBbJ3-.mjs";
2
+ import { l as Source, r as Command, s as InputSchema } from "./types-VUbyAmMP.mjs";
3
3
 
4
4
  //#region src/plugins/flow/doors/define.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-Bl-YjAnU.mjs";
1
+ import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-DfsSTLx7.mjs";
2
2
 
3
3
  //#region src/plugins/flow/headless.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-Bl-YjAnU.mjs";
2
- import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-DU-RYYj0.mjs";
3
- import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-DNmg5EAM.mjs";
1
+ import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-DfsSTLx7.mjs";
2
+ import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-DzZhjatf.mjs";
3
+ import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-DI754bnG.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
6
6
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-Bl-YjAnU.mjs";
2
- import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-DU-RYYj0.mjs";
3
- import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-DNmg5EAM.mjs";
4
- import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-C_Ej5JkQ.mjs";
1
+ import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-DfsSTLx7.mjs";
2
+ import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-DzZhjatf.mjs";
3
+ import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-DI754bnG.mjs";
4
+ import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-yxNL4-V2.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, Aura, type AuraValue, type BackResult, type BindOptions, Bloom, type BloomValue, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, type TextRunStyle, type TextTagStyle, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-CXhsSeM2.mjs";
1
+ import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-DCe6t6UY.mjs";
2
2
  import { $ as Overlay, D as defineStyle, E as defineTokens, L as defineTextFormats, M as Countdown, N as Text, P as bind, Q as NineSlice, R as defineTextStyles, X as Display, Z as HudPart, _ as DebugTrigger, ct as Exiting, dt as Order, ft as Tree, gt as system, h as Box, ht as resource, it as Transform, lt as Layer, mt as mut, nt as Shape, pt as component, rt as Sprite, st as sprite, tt as Parent, ut as Now, vt as tag, w as popup, x as ScrollState, y as LocalWrite, z as label } from "./visual-x0TPowBE.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, Aura, Bloom, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
@@ -1,9 +1,9 @@
1
- import { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-Bl-YjAnU.mjs";
2
- import { W as AnimApi, Z as TimelinesSnapshot, a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-DU-RYYj0.mjs";
3
- import { c as UiNode } from "./types-DNmg5EAM.mjs";
4
- import { t as HeadlessApp } from "./headless-ffgavU3Y.mjs";
5
- import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-CYjnhoB9.mjs";
6
- import { n as defineSource } from "./define-DR2SWS9E.mjs";
1
+ import { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-DfsSTLx7.mjs";
2
+ import { W as AnimApi, Z as TimelinesSnapshot, a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-DzZhjatf.mjs";
3
+ import { c as UiNode } from "./types-DI754bnG.mjs";
4
+ import { t as HeadlessApp } from "./headless-C-lBbJ3-.mjs";
5
+ import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-VUbyAmMP.mjs";
6
+ import { n as defineSource } from "./define-Df7Jv9a0.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-wGL7TbEs.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-Bnf_PoB5.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-wGL7TbEs.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-Bnf_PoB5.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-DNmg5EAM.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-DI754bnG.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. */
@@ -14431,7 +14431,7 @@ function emptyMap$9() {
14431
14431
  *
14432
14432
  * @returns An empty weak map.
14433
14433
  */
14434
- function emptyWeakMap$2() {
14434
+ function emptyWeakMap$3() {
14435
14435
  return /* @__PURE__ */ new WeakMap();
14436
14436
  }
14437
14437
  /**
@@ -14466,10 +14466,10 @@ function createProjectionState() {
14466
14466
  keys: emptyMap$9(),
14467
14467
  keysByEntity: emptyMap$9(),
14468
14468
  mutes: emptyMap$9(),
14469
- muteCounts: emptyWeakMap$2(),
14470
- initialOnly: emptyWeakMap$2(),
14471
- ownedSets: emptyWeakMap$2(),
14472
- joinedMutes: emptyWeakMap$2(),
14469
+ muteCounts: emptyWeakMap$3(),
14470
+ initialOnly: emptyWeakMap$3(),
14471
+ ownedSets: emptyWeakMap$3(),
14472
+ joinedMutes: emptyWeakMap$3(),
14473
14473
  converged: [],
14474
14474
  offHints: [],
14475
14475
  leaving: emptyMap$9(),
@@ -34406,6 +34406,15 @@ function hasStorage() {
34406
34406
  }
34407
34407
  }
34408
34408
  /**
34409
+ * Tells whether the window can take and drop listeners. A headless test that stubs only `document`, or a worker,
34410
+ * cannot. The document's own listeners are not checked here: the host's visibility watch needs them before the trail.
34411
+ *
34412
+ * @returns True when `addEventListener` and `removeEventListener` are on `globalThis`.
34413
+ */
34414
+ function hasWindowListeners() {
34415
+ return typeof globalThis.addEventListener === "function" && typeof globalThis.removeEventListener === "function";
34416
+ }
34417
+ /**
34409
34418
  * Reads a `localStorage` key as JSON. A storage that throws, and text that does not parse, read as `undefined`.
34410
34419
  *
34411
34420
  * @param key - The key.
@@ -34578,8 +34587,8 @@ function createRecord$1(ctx, document) {
34578
34587
  /**
34579
34588
  * Starts the trail of a page: reports the run before when it was cut short, starts a new record, writes it, writes it
34580
34589
  * again once the application is up, then every 2 s and at each change of the page (`visibilitychange`, `pagehide`,
34581
- * a `pageshow` from the back/forward cache). Without a document or a mount (an inert renderer) or a `localStorage` to
34582
- * keep it in, nothing starts.
34590
+ * a `pageshow` from the back/forward cache). Without a document or a mount (an inert renderer), a `localStorage` to
34591
+ * keep it in, or listeners on the window (a headless test, a worker), nothing starts.
34583
34592
  *
34584
34593
  * @param ctx - Domain context of the renderer plugin.
34585
34594
  */
@@ -34587,6 +34596,7 @@ function startTrail(ctx) {
34587
34596
  const document = globalThis.document;
34588
34597
  const trail = ctx.state.trail;
34589
34598
  if (document === void 0 || ctx.config.mount === void 0 || !hasStorage()) return;
34599
+ if (!hasWindowListeners()) return;
34590
34600
  if (trail.stop !== void 0) return;
34591
34601
  reportLastRun(ctx);
34592
34602
  const record = createRecord$1(ctx, document);
@@ -34622,8 +34632,10 @@ function startTrail(ctx) {
34622
34632
  trail.stop = () => {
34623
34633
  globalThis.clearInterval(timer);
34624
34634
  document.removeEventListener("visibilitychange", onVisibility);
34625
- globalThis.removeEventListener("pagehide", onPageHide);
34626
- globalThis.removeEventListener("pageshow", onPageShow);
34635
+ if (hasWindowListeners()) {
34636
+ globalThis.removeEventListener("pagehide", onPageHide);
34637
+ globalThis.removeEventListener("pageshow", onPageShow);
34638
+ }
34627
34639
  record.state = "closed";
34628
34640
  record.writes += 1;
34629
34641
  writeJson(TRAIL_KEY, record);
@@ -38874,7 +38886,7 @@ function emptyWeakSet() {
38874
38886
  *
38875
38887
  * @returns An empty weak map.
38876
38888
  */
38877
- function emptyWeakMap$1() {
38889
+ function emptyWeakMap$2() {
38878
38890
  return /* @__PURE__ */ new WeakMap();
38879
38891
  }
38880
38892
  /**
@@ -39025,10 +39037,10 @@ function createSyncState(debug) {
39025
39037
  upload: createUploadState(),
39026
39038
  release: createReleaseState(),
39027
39039
  hollowClass: void 0,
39028
- filterKinds: emptyWeakMap$1(),
39029
- filterOwners: emptyWeakMap$1(),
39030
- objectHidden: emptyWeakMap$1(),
39031
- viewOfTop: emptyWeakMap$1(),
39040
+ filterKinds: emptyWeakMap$2(),
39041
+ filterOwners: emptyWeakMap$2(),
39042
+ objectHidden: emptyWeakMap$2(),
39043
+ viewOfTop: emptyWeakMap$2(),
39032
39044
  overlay: createOverlayState(),
39033
39045
  hitWalks: [],
39034
39046
  redraws: 0,
@@ -43891,11 +43903,14 @@ function isNameList$1(value) {
43891
43903
  /**
43892
43904
  * Lists the bundles a scene names for a committed state: its `bundle` first, then what its
43893
43905
  * `bundles(state)` returns, in order, each name once. An error the game's `bundles` throws
43894
- * propagates unchanged.
43906
+ * propagates unchanged. With a memo, a scene is asked once per committed state: while `player`
43907
+ * and `session` are the trees it last answered for, the same frozen list comes back and `bundles`
43908
+ * is not called (F194: the look-ahead asked every scene of the neighbourhood at every rest).
43895
43909
  *
43896
43910
  * @param scene - The scene declaration.
43897
43911
  * @param state - The committed player and session, frozen.
43898
- * @returns The bundle names, the scene bundle first.
43912
+ * @param memo - The last answer of each scene, kept by the plugin that asks; none to ask every time.
43913
+ * @returns The bundle names, the scene bundle first; frozen when they come from the memo.
43899
43914
  * @throws {Error} When `bundles` returns something that is not a list of names.
43900
43915
  * @example
43901
43916
  * ```ts
@@ -43904,7 +43919,26 @@ function isNameList$1(value) {
43904
43919
  * namedBundles(wardScene, { player, session }); // ["location", "ep01"] while session.episode is "ep01"
43905
43920
  * ```
43906
43921
  */
43907
- function namedBundles(scene, state) {
43922
+ function namedBundles(scene, state, memo) {
43923
+ const known = memo?.get(scene);
43924
+ if (known !== void 0 && known.player === state.player && known.session === state.session) return known.names;
43925
+ const names = Object.freeze(readNames(scene, state));
43926
+ memo?.set(scene, {
43927
+ player: state.player,
43928
+ session: state.session,
43929
+ names
43930
+ });
43931
+ return names;
43932
+ }
43933
+ /**
43934
+ * Asks a scene for its bundles: its `bundle`, then what `bundles(state)` returns, each name once.
43935
+ *
43936
+ * @param scene - The scene declaration.
43937
+ * @param state - The committed player and session, frozen.
43938
+ * @returns A new list of names, the scene bundle first.
43939
+ * @throws {Error} When `bundles` returns something that is not a list of names.
43940
+ */
43941
+ function readNames(scene, state) {
43908
43942
  const names = [scene.bundle];
43909
43943
  if (scene.bundles === void 0) return names;
43910
43944
  const listed = scene.bundles(state);
@@ -43992,17 +44026,42 @@ function createBrowserIo(renderer) {
43992
44026
  }
43993
44027
  //#endregion
43994
44028
  //#region src/plugins/assets/preload.ts
44029
+ /** The answer of a flow or scene that names no bundle: one frozen list, so asking allocates nothing. */
44030
+ const NO_NAMES = Object.freeze([]);
44031
+ /**
44032
+ * Indexes the `feature`-tier bundles of the manifest by feature, in the manifest's order.
44033
+ *
44034
+ * @param manifest - The manifest.
44035
+ * @returns Feature name to its bundle names, each list frozen.
44036
+ */
44037
+ function indexFeatures(manifest) {
44038
+ const byFeature = /* @__PURE__ */ new Map();
44039
+ for (const [name, entry] of Object.entries(manifest.bundles)) {
44040
+ if (entry.tier !== "feature") continue;
44041
+ const names = byFeature.get(entry.feature);
44042
+ if (names === void 0) byFeature.set(entry.feature, [name]);
44043
+ else names.push(name);
44044
+ }
44045
+ for (const names of byFeature.values()) Object.freeze(names);
44046
+ return byFeature;
44047
+ }
43995
44048
  /**
43996
- * Lists the `feature`-tier bundles of the feature that owns a flow.
44049
+ * Lists the `feature`-tier bundles of the feature that owns a flow, from the index of the manifest: built once per
44050
+ * manifest, not once per call (F194: the look-ahead scanned every bundle of the manifest for each node it visited).
43997
44051
  *
43998
44052
  * @param ctx - Domain context of the plugin.
43999
44053
  * @param flow - Id of the flow.
44000
- * @returns The bundle names.
44054
+ * @returns The bundle names, frozen.
44001
44055
  */
44002
44056
  function featureBundles(ctx, flow) {
44003
- const feature = ctx.state.featureOfFlow.get(flow);
44004
- if (feature === void 0) return [];
44005
- return Object.entries(ctx.state.manifest.bundles).filter(([, entry]) => entry.feature === feature && entry.tier === "feature").map(([name]) => name);
44057
+ const state = ctx.state;
44058
+ const feature = state.featureOfFlow.get(flow);
44059
+ if (feature === void 0) return NO_NAMES;
44060
+ if (state.featureIndex?.manifest !== state.manifest) state.featureIndex = {
44061
+ manifest: state.manifest,
44062
+ byFeature: indexFeatures(state.manifest)
44063
+ };
44064
+ return state.featureIndex.byFeature.get(feature) ?? NO_NAMES;
44006
44065
  }
44007
44066
  /**
44008
44067
  * Adds the names of a list to another, without repeating one.
@@ -44039,7 +44098,7 @@ function committedState$1(ctx) {
44039
44098
  */
44040
44099
  function sceneNames(ctx, id, state) {
44041
44100
  const scene = ctx.state.scenes.get(id);
44042
- return scene === void 0 ? [] : namedBundles(scene, state);
44101
+ return scene === void 0 ? NO_NAMES : namedBundles(scene, state, ctx.state.namedMemo);
44043
44102
  }
44044
44103
  /**
44045
44104
  * The bundles the preload expects a scene to name. A `bundles` that throws costs the look-ahead
@@ -45533,6 +45592,14 @@ function emptyMap$3() {
45533
45592
  return /* @__PURE__ */ new Map();
45534
45593
  }
45535
45594
  /**
45595
+ * Creates an empty weak map, for the same reason as `emptyMap`.
45596
+ *
45597
+ * @returns An empty weak map.
45598
+ */
45599
+ function emptyWeakMap$1() {
45600
+ return /* @__PURE__ */ new WeakMap();
45601
+ }
45602
+ /**
45536
45603
  * Creates an empty set, for the same reason as `emptyMap`.
45537
45604
  *
45538
45605
  * @returns An empty set.
@@ -45563,6 +45630,8 @@ function createAssetsState() {
45563
45630
  thrashWarned: emptySet$2(),
45564
45631
  scenes: emptyMap$3(),
45565
45632
  featureOfFlow: emptyMap$3(),
45633
+ featureIndex: void 0,
45634
+ namedMemo: emptyWeakMap$1(),
45566
45635
  records: emptyMap$3(),
45567
45636
  pinned: emptySet$2(),
45568
45637
  sceneId: void 0,
@@ -45745,7 +45814,7 @@ function rowOf(bundles, bundle) {
45745
45814
  function sharesOf(ctx, scene) {
45746
45815
  let named;
45747
45816
  try {
45748
- named = namedBundles(scene, committedState(ctx));
45817
+ named = namedBundles(scene, committedState(ctx), ctx.state.namedMemo);
45749
45818
  } catch {
45750
45819
  return [];
45751
45820
  }
@@ -47360,7 +47429,7 @@ async function switchTo(ctx, target, run) {
47360
47429
  settleFade(ctx);
47361
47430
  let leaving = leaveFor(ctx, run, scene.id);
47362
47431
  try {
47363
- const named = namedBundles(scene, committedState(ctx));
47432
+ const named = namedBundles(scene, committedState(ctx), ctx.state.namedMemo);
47364
47433
  if (leaving === void 0 && !leaveDeclined(ctx, run, scene.id)) leaving = startLeave(ctx, scene, run);
47365
47434
  await loadAndStand(ctx, scene, named, run);
47366
47435
  } catch (error) {
@@ -47387,7 +47456,7 @@ async function reread(ctx, run) {
47387
47456
  const state = ctx.state;
47388
47457
  const scene = state.current === void 0 ? void 0 : state.scenes.get(state.current);
47389
47458
  if (scene?.bundles === void 0) return;
47390
- const named = namedBundles(scene, committedState(ctx));
47459
+ const named = namedBundles(scene, committedState(ctx), ctx.state.namedMemo);
47391
47460
  if (sameNames(named, state.named)) return;
47392
47461
  await untilAborted(ctx, named, run.signal);
47393
47462
  if (run.signal.aborted) return;
@@ -47595,6 +47664,14 @@ function emptyRegistry$1() {
47595
47664
  return /* @__PURE__ */ new Map();
47596
47665
  }
47597
47666
  /**
47667
+ * Creates the memo of what each scene named, for the same L5 reason.
47668
+ *
47669
+ * @returns An empty memo, keyed by scene declaration.
47670
+ */
47671
+ function emptyMemo() {
47672
+ return /* @__PURE__ */ new WeakMap();
47673
+ }
47674
+ /**
47598
47675
  * Creates the one owner every mount of this plugin carries. One is enough: a single scene is
47599
47676
  * mounted at a time and `unmount` is what flushes.
47600
47677
  *
@@ -47618,6 +47695,7 @@ function createScenesState() {
47618
47695
  current: void 0,
47619
47696
  pending: void 0,
47620
47697
  named: [],
47698
+ namedMemo: emptyMemo(),
47621
47699
  owner: sceneOwner(),
47622
47700
  teardown: void 0
47623
47701
  };
@@ -1,7 +1,7 @@
1
- import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-Bl-YjAnU.mjs";
2
- import { t as createApp } from "./index-C_Ej5JkQ.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-DCtlPrmc.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-ffgavU3Y.mjs";
1
+ import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-DfsSTLx7.mjs";
2
+ import { t as createApp } from "./index-yxNL4-V2.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-aTYAEQpf.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-C-lBbJ3-.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 { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-CXhsSeM2.mjs";
1
+ import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-DCe6t6UY.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-DeD9wis6.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-BuXptVI_.mjs";
@@ -1,4 +1,4 @@
1
- import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-Bl-YjAnU.mjs";
1
+ import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-DfsSTLx7.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";
@@ -13351,7 +13351,7 @@ type PassCount = {
13351
13351
  enabled: boolean[];
13352
13352
  };
13353
13353
  declare namespace types_d_exports$1 {
13354
- export { AnySceneProjection, BundleProgress, BundleShare, CheckedProjections, Config$1 as Config, DefineScene, Deps$1 as Deps, Events$1 as Events, FadingLoader, FullCover, FullLeave, FullLoader, HeldLoader, KernelSlice$1 as KernelSlice, LayerMap, LeaveSwitch, Leaving, LoaderFeed, RunContext, SceneBuild, SceneCover, SceneDefinition, SceneEnter, SceneLayer, SceneLeave, SceneLoader, SceneOwner, SceneProjection, SceneSpec, SceneState, ScenesApi, ScenesCtx, SortRule, State$1 as State, UiLayer };
13354
+ export { AnySceneProjection, BundleProgress, BundleShare, CheckedProjections, Config$1 as Config, DefineScene, Deps$1 as Deps, Events$1 as Events, FadingLoader, FullCover, FullLeave, FullLoader, HeldLoader, KernelSlice$1 as KernelSlice, LayerMap, LeaveSwitch, Leaving, LoaderFeed, NamedMemo, RunContext, SceneBuild, SceneCover, SceneDefinition, SceneEnter, SceneLayer, SceneLeave, SceneLoader, SceneOwner, SceneProjection, SceneSpec, SceneState, ScenesApi, ScenesCtx, SortRule, State$1 as State, UiLayer };
13355
13355
  }
13356
13356
  /**
13357
13357
  * How a layer orders what is drawn in it. The scene's name for the rule `world` stores.
@@ -13581,7 +13581,8 @@ type SceneSpec<Layers extends LayerMap, Projections extends readonly AnyScenePro
13581
13581
  bundle: Bundle;
13582
13582
  /**
13583
13583
  * Bundles the scene needs on top of `bundle`, read from the committed state each time a node
13584
- * enters the scene. Pure and cheap: it gets frozen trees, and throwing rolls the node back.
13584
+ * enters the scene. Pure and cheap: it gets frozen trees, and throwing rolls the node back. The engine asks once per
13585
+ * committed state and reuses the answer until a commit replaces `player` or `session`, so it reads nothing else.
13585
13586
  *
13586
13587
  * @param state - The committed `player` and `session`, frozen.
13587
13588
  * @returns Bundle keys of the game, in the order they are loaded.
@@ -13744,6 +13745,15 @@ type SceneBuild = {
13744
13745
  */
13745
13746
  reject: (error: unknown) => void;
13746
13747
  };
13748
+ /**
13749
+ * The last answer of one scene to `bundles`: the committed trees it was read with, and the names it gave, frozen. A
13750
+ * scene is asked again only when a commit replaced `player` or `session`.
13751
+ */
13752
+ type NamedMemo = {
13753
+ readonly player: unknown;
13754
+ readonly session: unknown;
13755
+ readonly names: readonly string[];
13756
+ };
13747
13757
  /**
13748
13758
  * scenes plugin state.
13749
13759
  */
@@ -13762,7 +13772,8 @@ type State$1 = {
13762
13772
  * The bundles the mounted scene names, its `bundle` first, as last awaited. Empty while nothing
13763
13773
  * is mounted.
13764
13774
  */
13765
- named: readonly string[];
13775
+ named: readonly string[]; /** The last answer of each scene to `bundles`, by declaration: the switch, a re-read and the progress table share it. */
13776
+ namedMemo: WeakMap<SceneDefinition, NamedMemo>;
13766
13777
  owner: SceneOwner; /** The remover of the two `onEnter` callbacks, `begin` and `scene`: set in `onStart`, run in `onStop`. */
13767
13778
  teardown: (() => void) | undefined;
13768
13779
  /**
@@ -14606,6 +14617,15 @@ type State = {
14606
14617
  thrashWarned: Set<string>; /** Scene id to its declaration, read from the `scenes` key of `flow.features`. */
14607
14618
  scenes: Map<string, SceneDefinition>; /** Flow id to the feature that owns it, read from the `flows` key of `flow.features`. */
14608
14619
  featureOfFlow: Map<string, string>;
14620
+ /**
14621
+ * The `feature`-tier bundles of each feature, indexed from the manifest it was built from: built again only when a
14622
+ * new manifest replaced it (a dev hot swap). The look-ahead reads it for every node it visits (F194).
14623
+ */
14624
+ featureIndex: {
14625
+ readonly manifest: Manifest;
14626
+ readonly byFeature: ReadonlyMap<string, readonly string[]>;
14627
+ } | undefined; /** The last answer of each scene to `bundles`, by declaration: the look-ahead asks a scene once per committed state. */
14628
+ namedMemo: WeakMap<SceneDefinition, NamedMemo>;
14609
14629
  records: Map<string, BundleRecord>; /** Bundles of the node entered last. They are never unloaded. */
14610
14630
  pinned: Set<string>; /** The scene of the node entered last. A node without `scene` keeps it. */
14611
14631
  sceneId: string | undefined;
@@ -1,5 +1,5 @@
1
- import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-Bl-YjAnU.mjs";
2
- import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-DNmg5EAM.mjs";
1
+ import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-DfsSTLx7.mjs";
2
+ import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-DI754bnG.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -1,5 +1,5 @@
1
- import { $r as Snapshot, Wr as Json } from "./types-Bl-YjAnU.mjs";
2
- import { t as HeadlessApp } from "./headless-ffgavU3Y.mjs";
1
+ import { $r as Snapshot, Wr as Json } from "./types-DfsSTLx7.mjs";
2
+ import { t as HeadlessApp } from "./headless-C-lBbJ3-.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,7 +1,7 @@
1
- import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-Bl-YjAnU.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-DU-RYYj0.mjs";
3
- import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-DNmg5EAM.mjs";
4
- import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-C_Ej5JkQ.mjs";
1
+ import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-DfsSTLx7.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-DzZhjatf.mjs";
3
+ import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-DI754bnG.mjs";
4
+ import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-yxNL4-V2.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 { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-Bl-YjAnU.mjs";
2
- import { W as AnimApi, r as UiApi } from "./types-DU-RYYj0.mjs";
3
- import { R as InputApi } from "./types-DNmg5EAM.mjs";
4
- import { r as Repro } from "./headless-ffgavU3Y.mjs";
5
- import { i as ControlApp, o as InputOf } from "./types-CYjnhoB9.mjs";
6
- import { t as commands } from "./commands-CzYKkdEO.mjs";
1
+ import { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-DfsSTLx7.mjs";
2
+ import { W as AnimApi, r as UiApi } from "./types-DzZhjatf.mjs";
3
+ import { R as InputApi } from "./types-DI754bnG.mjs";
4
+ import { r as Repro } from "./headless-C-lBbJ3-.mjs";
5
+ import { i as ControlApp, o as InputOf } from "./types-VUbyAmMP.mjs";
6
+ import { t as commands } from "./commands-DSoMdMbD.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-CLR_C--i.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-IciKRSBi.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.134",
3
+ "version": "0.15.136",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [