@moku-labs/game 0.15.123 → 0.15.124

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-DywIk6LN.mjs";
1
+ import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-eIlzV3Jf.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Yr as PlayerStateProvider } from "../types-B6H9yr9N.mjs";
2
- import { Et as PlatformProvider } from "../index-BZCgS_Mn.mjs";
3
- import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-DywIk6LN.mjs";
1
+ import { Yr as PlayerStateProvider } from "../types-CUQ-ig2E.mjs";
2
+ import { Et as PlatformProvider } from "../index-DY9NpxeK.mjs";
3
+ import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-eIlzV3Jf.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-B6H9yr9N.mjs";
2
- import { J as StringTable } from "./types-BDx3KRoA.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-DywIk6LN.mjs";
1
+ import { Wr as Json } from "./types-CUQ-ig2E.mjs";
2
+ import { J as StringTable } from "./types-Cbtr2GAO.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-eIlzV3Jf.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-BqnQLXSV.mjs";
1
+ import { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-DAwGHTaM.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-B6H9yr9N.mjs";
1
+ import { d as Manifest } from "./types-CUQ-ig2E.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-B6H9yr9N.mjs";
2
- import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-C0eMpuaq.mjs";
3
- import { R as InputApi } from "./types-BDx3KRoA.mjs";
4
- import { t as HeadlessApp } from "./headless-DOX90jck.mjs";
5
- import { i as ControlApp, r as Command } from "./types-BV0HvdUr.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-CUQ-ig2E.mjs";
2
+ import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-B2oay3bJ.mjs";
3
+ import { R as InputApi } from "./types-Cbtr2GAO.mjs";
4
+ import { t as HeadlessApp } from "./headless-w-BqXOjQ.mjs";
5
+ import { i as ControlApp, r as Command } from "./types-BelqIB0P.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-DOX90jck.mjs";
2
- import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-BV0HvdUr.mjs";
3
- import { t as commands } from "./commands-DeBQ0y5y.mjs";
4
- import { t as defineCommand } from "./define-NKcdHfWQ.mjs";
1
+ import { t as HeadlessApp } from "./headless-w-BqXOjQ.mjs";
2
+ import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-BelqIB0P.mjs";
3
+ import { t as commands } from "./commands-CslgzXLW.mjs";
4
+ import { t as defineCommand } from "./define-DAFwIXpT.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-DOX90jck.mjs";
2
- import { l as Source, r as Command, s as InputSchema } from "./types-BV0HvdUr.mjs";
1
+ import { t as HeadlessApp } from "./headless-w-BqXOjQ.mjs";
2
+ import { l as Source, r as Command, s as InputSchema } from "./types-BelqIB0P.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-B6H9yr9N.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-CUQ-ig2E.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-B6H9yr9N.mjs";
2
- import { $ as SfxDescriptor, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, Q as HapticKind, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-C0eMpuaq.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-BDx3KRoA.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-CUQ-ig2E.mjs";
2
+ import { $ as SfxDescriptor, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, Q as HapticKind, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-B2oay3bJ.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-Cbtr2GAO.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-B6H9yr9N.mjs";
2
- import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-C0eMpuaq.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-BDx3KRoA.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-BZCgS_Mn.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-CUQ-ig2E.mjs";
2
+ import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-B2oay3bJ.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-Cbtr2GAO.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-DY9NpxeK.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-BqnQLXSV.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-DAwGHTaM.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-B6H9yr9N.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-C0eMpuaq.mjs";
3
- import { c as UiNode } from "./types-BDx3KRoA.mjs";
4
- import { t as HeadlessApp } from "./headless-DOX90jck.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-BV0HvdUr.mjs";
6
- import { n as defineSource } from "./define-NKcdHfWQ.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-CUQ-ig2E.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-B2oay3bJ.mjs";
3
+ import { c as UiNode } from "./types-Cbtr2GAO.mjs";
4
+ import { t as HeadlessApp } from "./headless-w-BqXOjQ.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-BelqIB0P.mjs";
6
+ import { n as defineSource } from "./define-DAFwIXpT.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-ChOE2QPw.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-DbfmnXM8.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-ChOE2QPw.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-DbfmnXM8.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-BDx3KRoA.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-Cbtr2GAO.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. */
@@ -15181,6 +15181,155 @@ function createDemandApi(ctx, deps) {
15181
15181
  };
15182
15182
  }
15183
15183
  //#endregion
15184
+ //#region src/plugins/renderer/host/readback.ts
15185
+ /** Bytes of one pixel: the engine loads PNG and WebP only, so every source is 8-bit RGBA. */
15186
+ const BYTES_PER_PIXEL$2 = 4;
15187
+ /**
15188
+ * Estimates the GPU bytes of one texture source: 4 bytes per pixel, every mip level, a level never
15189
+ * smaller than one pixel.
15190
+ *
15191
+ * @param source - The size fields of a Pixi `TextureSource`.
15192
+ * @param source.pixelWidth - Width in real pixels.
15193
+ * @param source.pixelHeight - Height in real pixels.
15194
+ * @param source.mipLevelCount - Mip levels, 1 without mipmaps.
15195
+ * @returns The estimated bytes.
15196
+ * @example
15197
+ * ```ts
15198
+ * sourceBytes({ pixelWidth: 4, pixelHeight: 4, mipLevelCount: 3 }); // 84: 16 + 4 + 1 pixels
15199
+ * ```
15200
+ */
15201
+ function sourceBytes(source) {
15202
+ let pixels = 0;
15203
+ let width = source.pixelWidth;
15204
+ let height = source.pixelHeight;
15205
+ for (let level = 0; level < Math.max(1, source.mipLevelCount); level += 1) {
15206
+ pixels += width * height;
15207
+ width = Math.max(1, Math.floor(width / 2));
15208
+ height = Math.max(1, Math.floor(height / 2));
15209
+ }
15210
+ return pixels * BYTES_PER_PIXEL$2;
15211
+ }
15212
+ /**
15213
+ * Tells a render target from art: Pixi gives a target no upload method and no resource.
15214
+ *
15215
+ * @param source - The upload fields of a Pixi `TextureSource`.
15216
+ * @param source.uploadMethodId - How Pixi uploads it; `"unknown"` for a render target.
15217
+ * @param source.resource - What it uploads; none for a render target.
15218
+ * @returns True for a render target.
15219
+ * @example
15220
+ * ```ts
15221
+ * isTarget({ uploadMethodId: "unknown", resource: null }); // true
15222
+ * ```
15223
+ */
15224
+ function isTarget$3(source) {
15225
+ return source.uploadMethodId === "unknown" && (source.resource === null || source.resource === void 0);
15226
+ }
15227
+ /**
15228
+ * Counts the texture sources the GPU holds and sums their estimated bytes, split three ways: a
15229
+ * source with no upload method and no resource is a render target (a filter texture, a picture
15230
+ * Pixi renders into), one the engine keeps as a picture is kept, every other source is art.
15231
+ * Pixi's `managedTextures` exists on the WebGPU and the WebGL texture system alike (checked in
15232
+ * 8.22); Pixi's canvas renderer keeps no GPU texture and answers zero. Both systems answer
15233
+ * `Object.values` of a `GCManagedHash`, which keeps a `null` slot for every unloaded source, so
15234
+ * only the live sources are counted. An indexed walk: no array is made.
15235
+ *
15236
+ * @param app - The application that draws.
15237
+ * @param kept - The sources the engine keeps as pictures.
15238
+ * @returns The count, the bytes and their split.
15239
+ */
15240
+ function textureUsage(app, kept) {
15241
+ const system = app.renderer.texture;
15242
+ const usage = {
15243
+ count: 0,
15244
+ bytes: 0,
15245
+ art: 0,
15246
+ targets: 0,
15247
+ kept: 0
15248
+ };
15249
+ if (!("managedTextures" in system)) return usage;
15250
+ const sources = system.managedTextures;
15251
+ const total = sources.length;
15252
+ for (let index = 0; index < total; index += 1) {
15253
+ const source = sources[index];
15254
+ if (!source) continue;
15255
+ const bytes = sourceBytes(source);
15256
+ usage.count += 1;
15257
+ usage.bytes += bytes;
15258
+ if (kept.has(source)) usage.kept += bytes;
15259
+ else if (isTarget$3(source)) usage.targets += bytes;
15260
+ else usage.art += bytes;
15261
+ }
15262
+ return usage;
15263
+ }
15264
+ /**
15265
+ * Hides containers for the length of one synchronous call and shows them again right after it,
15266
+ * also when it throws. A container hidden already stays hidden.
15267
+ *
15268
+ * @param hidden - The containers to hide.
15269
+ * @param work - The call; it runs with them hidden.
15270
+ * @returns What the call returned.
15271
+ */
15272
+ function withHidden(hidden, work) {
15273
+ const shown = hidden.filter((container) => container.visible);
15274
+ for (const container of shown) container.visible = false;
15275
+ try {
15276
+ return work();
15277
+ } finally {
15278
+ for (const container of shown) container.visible = true;
15279
+ }
15280
+ }
15281
+ /**
15282
+ * Draws the stage into a PNG over the whole canvas, bars included, with Pixi's extract system.
15283
+ * Pixi renders the stage synchronously inside the call and encodes afterwards, so the containers
15284
+ * in `hidden` are hidden around the call alone: no drawn frame sees them hidden. A failed read is
15285
+ * logged and answers `undefined`, so a caller never has to catch.
15286
+ *
15287
+ * @param ctx - Domain context of the renderer plugin.
15288
+ * @param app - The application that draws.
15289
+ * @param hidden - The layer containers to leave out of the picture.
15290
+ * @returns A `data:image/png;base64,…` URL, or `undefined` when Pixi could not read the frame.
15291
+ */
15292
+ async function extractStage(ctx, app, hidden) {
15293
+ try {
15294
+ return await withHidden(hidden, () => app.renderer.extract.base64({
15295
+ target: app.stage,
15296
+ frame: app.screen,
15297
+ clearColor: ctx.config.background,
15298
+ format: "png"
15299
+ }));
15300
+ } catch (error) {
15301
+ ctx.log.error("renderer: capture failed", { error });
15302
+ return;
15303
+ }
15304
+ }
15305
+ /** The resolution the pixel oracle reads the stage at: a quarter of the pixels, a 2-px change still shows. */
15306
+ const ORACLE_RESOLUTION = .5;
15307
+ /**
15308
+ * Draws the stage live into RGBA pixels with Pixi's extract system, framed as a capture is, at
15309
+ * half resolution. A failed read is logged once per application state and answers `undefined`.
15310
+ *
15311
+ * @param ctx - Domain context of the renderer plugin.
15312
+ * @param app - The application that draws.
15313
+ * @param resolution - Device pixels per CSS pixel of the read; half by default.
15314
+ * @returns The pixels, or `undefined` when Pixi could not read them.
15315
+ */
15316
+ function readPixels(ctx, app, resolution = ORACLE_RESOLUTION) {
15317
+ try {
15318
+ return app.renderer.extract.pixels({
15319
+ target: app.stage,
15320
+ frame: app.screen,
15321
+ clearColor: ctx.config.background,
15322
+ resolution
15323
+ }).pixels;
15324
+ } catch (error) {
15325
+ if (!ctx.state.host.pixelsFailed) {
15326
+ ctx.state.host.pixelsFailed = true;
15327
+ ctx.log.error("renderer: pixel read failed", { error });
15328
+ }
15329
+ return;
15330
+ }
15331
+ }
15332
+ //#endregion
15184
15333
  //#region src/plugins/renderer/host/device.ts
15185
15334
  /**
15186
15335
  * The GPU device of the application that draws now. Only a WebGPU application has one; a lost
@@ -15207,8 +15356,9 @@ function liveGl(state) {
15207
15356
  return "gl" in app.renderer ? app.renderer.gl : void 0;
15208
15357
  }
15209
15358
  /**
15210
- * Starts a loss: the renderer stops drawing, the game pauses and the event goes out. A loss
15211
- * while the plugin is already down, or while a restore runs, is ignored.
15359
+ * Starts a loss: the renderer stops drawing, the game pauses and the event goes out; then the `decideLoss` callbacks
15360
+ * hear it, and one that answers true marks the page as leaving (F189). A loss while the plugin is already down, or
15361
+ * while a restore runs, is ignored.
15212
15362
  *
15213
15363
  * @param ctx - Domain context of the renderer plugin.
15214
15364
  * @param kind - Which backend lost its device.
@@ -15218,6 +15368,11 @@ function liveGl(state) {
15218
15368
  function beginLoss(ctx, kind, reason) {
15219
15369
  const state = ctx.state.host;
15220
15370
  if (!state.ready || state.restoring) return false;
15371
+ const info = {
15372
+ kind,
15373
+ reason,
15374
+ textureBytes: state.app === void 0 ? 0 : textureUsage(state.app, state.kept).bytes
15375
+ };
15221
15376
  state.ready = false;
15222
15377
  state.restoring = true;
15223
15378
  ctx.deps.lifecycle.push("device-lost");
@@ -15225,10 +15380,12 @@ function beginLoss(ctx, kind, reason) {
15225
15380
  kind,
15226
15381
  reason
15227
15382
  });
15383
+ for (const decide of state.lossDeciders) if (decide(info)) state.leaving = true;
15228
15384
  return true;
15229
15385
  }
15230
15386
  /**
15231
- * Ends a restore: the renderer draws again and the pause reason goes. The `onRestore` callbacks
15387
+ * Ends a restore: the renderer draws again and the pause reason goes. A page that leaves after the loss (F189)
15388
+ * restores nothing. The `onRestore` callbacks
15232
15389
  * run first: after a WebGPU restore the whole display tree is new and they rebuild it; after a
15233
15390
  * WebGL restore the tree stands, but the canvas and every render texture came back empty, so they
15234
15391
  * ask for a whole frame and the pictures again.
@@ -15238,7 +15395,7 @@ function beginLoss(ctx, kind, reason) {
15238
15395
  */
15239
15396
  function finishRestore(ctx, rebuild) {
15240
15397
  const state = ctx.state.host;
15241
- if (!state.restoring) return;
15398
+ if (!state.restoring || state.leaving) return;
15242
15399
  state.ready = true;
15243
15400
  state.restoring = false;
15244
15401
  for (const fn of state.onRestore) fn(rebuild);
@@ -15259,6 +15416,7 @@ function watchDevice(ctx, restart) {
15259
15416
  const onLost = async (info) => {
15260
15417
  if (ctx.state.host.app !== app) return;
15261
15418
  if (!beginLoss(ctx, "webgpu", info.reason)) return;
15419
+ if (ctx.state.host.leaving) return;
15262
15420
  if (await restart()) finishRestore(ctx, true);
15263
15421
  };
15264
15422
  app.renderer.gpu.device.lost.then(onLost).catch((error) => ctx.log.error("renderer: restore failed", { error }));
@@ -16775,6 +16933,8 @@ function createHostState() {
16775
16933
  restoring: false,
16776
16934
  onReady: [],
16777
16935
  onRestore: [],
16936
+ lossDeciders: [],
16937
+ leaving: false,
16778
16938
  onLoss: [],
16779
16939
  cleanups: [],
16780
16940
  unsupported: void 0,
@@ -17041,6 +17201,7 @@ function stopHost(state) {
17041
17201
  state.unsupported = void 0;
17042
17202
  state.onReady.length = 0;
17043
17203
  state.onRestore.length = 0;
17204
+ state.lossDeciders.length = 0;
17044
17205
  state.onLoss.length = 0;
17045
17206
  state.onResolutionChange.length = 0;
17046
17207
  state.onTrim.length = 0;
@@ -17063,7 +17224,7 @@ function stopHost(state) {
17063
17224
  * bounds (slot -1) boxes a reader's doubles the same way, for every caller: a slot that may not exist is checked first.
17064
17225
  */
17065
17226
  /** Bytes of one MiB. */
17066
- const BYTES_PER_MB$1 = 1048576;
17227
+ const BYTES_PER_MB$2 = 1048576;
17067
17228
  /**
17068
17229
  * Rounds a number to a fixed count of decimals, so a counter reads well in a panel and a log line stays short.
17069
17230
  *
@@ -17164,155 +17325,6 @@ function cellU8(column, index) {
17164
17325
  return column[index] ?? NaN;
17165
17326
  }
17166
17327
  //#endregion
17167
- //#region src/plugins/renderer/host/readback.ts
17168
- /** Bytes of one pixel: the engine loads PNG and WebP only, so every source is 8-bit RGBA. */
17169
- const BYTES_PER_PIXEL$2 = 4;
17170
- /**
17171
- * Estimates the GPU bytes of one texture source: 4 bytes per pixel, every mip level, a level never
17172
- * smaller than one pixel.
17173
- *
17174
- * @param source - The size fields of a Pixi `TextureSource`.
17175
- * @param source.pixelWidth - Width in real pixels.
17176
- * @param source.pixelHeight - Height in real pixels.
17177
- * @param source.mipLevelCount - Mip levels, 1 without mipmaps.
17178
- * @returns The estimated bytes.
17179
- * @example
17180
- * ```ts
17181
- * sourceBytes({ pixelWidth: 4, pixelHeight: 4, mipLevelCount: 3 }); // 84: 16 + 4 + 1 pixels
17182
- * ```
17183
- */
17184
- function sourceBytes(source) {
17185
- let pixels = 0;
17186
- let width = source.pixelWidth;
17187
- let height = source.pixelHeight;
17188
- for (let level = 0; level < Math.max(1, source.mipLevelCount); level += 1) {
17189
- pixels += width * height;
17190
- width = Math.max(1, Math.floor(width / 2));
17191
- height = Math.max(1, Math.floor(height / 2));
17192
- }
17193
- return pixels * BYTES_PER_PIXEL$2;
17194
- }
17195
- /**
17196
- * Tells a render target from art: Pixi gives a target no upload method and no resource.
17197
- *
17198
- * @param source - The upload fields of a Pixi `TextureSource`.
17199
- * @param source.uploadMethodId - How Pixi uploads it; `"unknown"` for a render target.
17200
- * @param source.resource - What it uploads; none for a render target.
17201
- * @returns True for a render target.
17202
- * @example
17203
- * ```ts
17204
- * isTarget({ uploadMethodId: "unknown", resource: null }); // true
17205
- * ```
17206
- */
17207
- function isTarget$3(source) {
17208
- return source.uploadMethodId === "unknown" && (source.resource === null || source.resource === void 0);
17209
- }
17210
- /**
17211
- * Counts the texture sources the GPU holds and sums their estimated bytes, split three ways: a
17212
- * source with no upload method and no resource is a render target (a filter texture, a picture
17213
- * Pixi renders into), one the engine keeps as a picture is kept, every other source is art.
17214
- * Pixi's `managedTextures` exists on the WebGPU and the WebGL texture system alike (checked in
17215
- * 8.22); Pixi's canvas renderer keeps no GPU texture and answers zero. Both systems answer
17216
- * `Object.values` of a `GCManagedHash`, which keeps a `null` slot for every unloaded source, so
17217
- * only the live sources are counted. An indexed walk: no array is made.
17218
- *
17219
- * @param app - The application that draws.
17220
- * @param kept - The sources the engine keeps as pictures.
17221
- * @returns The count, the bytes and their split.
17222
- */
17223
- function textureUsage(app, kept) {
17224
- const system = app.renderer.texture;
17225
- const usage = {
17226
- count: 0,
17227
- bytes: 0,
17228
- art: 0,
17229
- targets: 0,
17230
- kept: 0
17231
- };
17232
- if (!("managedTextures" in system)) return usage;
17233
- const sources = system.managedTextures;
17234
- const total = sources.length;
17235
- for (let index = 0; index < total; index += 1) {
17236
- const source = sources[index];
17237
- if (!source) continue;
17238
- const bytes = sourceBytes(source);
17239
- usage.count += 1;
17240
- usage.bytes += bytes;
17241
- if (kept.has(source)) usage.kept += bytes;
17242
- else if (isTarget$3(source)) usage.targets += bytes;
17243
- else usage.art += bytes;
17244
- }
17245
- return usage;
17246
- }
17247
- /**
17248
- * Hides containers for the length of one synchronous call and shows them again right after it,
17249
- * also when it throws. A container hidden already stays hidden.
17250
- *
17251
- * @param hidden - The containers to hide.
17252
- * @param work - The call; it runs with them hidden.
17253
- * @returns What the call returned.
17254
- */
17255
- function withHidden(hidden, work) {
17256
- const shown = hidden.filter((container) => container.visible);
17257
- for (const container of shown) container.visible = false;
17258
- try {
17259
- return work();
17260
- } finally {
17261
- for (const container of shown) container.visible = true;
17262
- }
17263
- }
17264
- /**
17265
- * Draws the stage into a PNG over the whole canvas, bars included, with Pixi's extract system.
17266
- * Pixi renders the stage synchronously inside the call and encodes afterwards, so the containers
17267
- * in `hidden` are hidden around the call alone: no drawn frame sees them hidden. A failed read is
17268
- * logged and answers `undefined`, so a caller never has to catch.
17269
- *
17270
- * @param ctx - Domain context of the renderer plugin.
17271
- * @param app - The application that draws.
17272
- * @param hidden - The layer containers to leave out of the picture.
17273
- * @returns A `data:image/png;base64,…` URL, or `undefined` when Pixi could not read the frame.
17274
- */
17275
- async function extractStage(ctx, app, hidden) {
17276
- try {
17277
- return await withHidden(hidden, () => app.renderer.extract.base64({
17278
- target: app.stage,
17279
- frame: app.screen,
17280
- clearColor: ctx.config.background,
17281
- format: "png"
17282
- }));
17283
- } catch (error) {
17284
- ctx.log.error("renderer: capture failed", { error });
17285
- return;
17286
- }
17287
- }
17288
- /** The resolution the pixel oracle reads the stage at: a quarter of the pixels, a 2-px change still shows. */
17289
- const ORACLE_RESOLUTION = .5;
17290
- /**
17291
- * Draws the stage live into RGBA pixels with Pixi's extract system, framed as a capture is, at
17292
- * half resolution. A failed read is logged once per application state and answers `undefined`.
17293
- *
17294
- * @param ctx - Domain context of the renderer plugin.
17295
- * @param app - The application that draws.
17296
- * @param resolution - Device pixels per CSS pixel of the read; half by default.
17297
- * @returns The pixels, or `undefined` when Pixi could not read them.
17298
- */
17299
- function readPixels(ctx, app, resolution = ORACLE_RESOLUTION) {
17300
- try {
17301
- return app.renderer.extract.pixels({
17302
- target: app.stage,
17303
- frame: app.screen,
17304
- clearColor: ctx.config.background,
17305
- resolution
17306
- }).pixels;
17307
- } catch (error) {
17308
- if (!ctx.state.host.pixelsFailed) {
17309
- ctx.state.host.pixelsFailed = true;
17310
- ctx.log.error("renderer: pixel read failed", { error });
17311
- }
17312
- return;
17313
- }
17314
- }
17315
- //#endregion
17316
17328
  //#region src/plugins/renderer/host/pool.ts
17317
17329
  /**
17318
17330
  * @file renderer/host — the pool trim (C14): gives back the idle render targets Pixi's global `TexturePool` keeps,
@@ -17415,7 +17427,7 @@ function trimPool(ctx, reason) {
17415
17427
  const before = targetBytes(app, state.kept);
17416
17428
  clearPool(pixi, state.pool.held);
17417
17429
  const after = targetBytes(app, state.kept);
17418
- const freedMb = roundTo((before - after) / BYTES_PER_MB$1, 2);
17430
+ const freedMb = roundTo((before - after) / BYTES_PER_MB$2, 2);
17419
17431
  state.pool.baseline = after;
17420
17432
  state.pool.restDone = true;
17421
17433
  state.pool.sceneAt = void 0;
@@ -17558,6 +17570,9 @@ function createHostApi(ctx, deps) {
17558
17570
  onReady: (fn) => {
17559
17571
  state.onReady.push(fn);
17560
17572
  },
17573
+ decideLoss: (fn) => {
17574
+ state.lossDeciders.push(fn);
17575
+ },
17561
17576
  onRestore: (fn) => {
17562
17577
  state.onRestore.push(fn);
17563
17578
  },
@@ -17602,6 +17617,12 @@ function createHostApi(ctx, deps) {
17602
17617
  });
17603
17618
  return true;
17604
17619
  },
17620
+ onGpu: (source) => {
17621
+ const app = state.app;
17622
+ if (!state.ready || app === void 0) return false;
17623
+ const slot = source._gpuData[app.renderer.uid];
17624
+ return slot !== void 0 && slot !== null;
17625
+ },
17605
17626
  initSource: (source) => {
17606
17627
  const app = state.app;
17607
17628
  if (!state.ready || app === void 0) return;
@@ -18206,7 +18227,7 @@ function renderStage1(kctx, pixi, matrices, record) {
18206
18227
  * @param record - The record, `s1` set.
18207
18228
  * @returns The stand-in.
18208
18229
  */
18209
- function standInOf(pixi, record) {
18230
+ function standInOf$1(pixi, record) {
18210
18231
  const s1 = record.s1 ?? pixi.Texture.EMPTY;
18211
18232
  if (record.standIn === void 0 || record.standIn.destroyed) {
18212
18233
  record.standIn = new pixi.Sprite(s1);
@@ -18410,7 +18431,7 @@ function readsPlace(record) {
18410
18431
  function renderStage3(kctx, pixi, matrices, record, now) {
18411
18432
  const { key } = record;
18412
18433
  const output = outputOf(kctx, pixi, record, now.r, now.P);
18413
- const standIn = standInOf(pixi, record);
18434
+ const standIn = standInOf$1(pixi, record);
18414
18435
  const Ps = key[KEY.Ps] ?? 0;
18415
18436
  if (readsPlace(record)) setOrigins(record.slots, (key[KEY.X0] ?? 0) - Ps + now.tx - (key[KEY.tx] ?? 0), (key[KEY.Y0] ?? 0) - Ps + now.ty - (key[KEY.ty] ?? 0));
18416
18437
  matrices.m3.set(1, 0, 0, 1, Ps, Ps);
@@ -18519,7 +18540,7 @@ function warnRefused(kctx, label) {
18519
18540
  if (state.warnedBudget) return;
18520
18541
  state.warnedBudget = true;
18521
18542
  kctx.ctx.log.warn("renderer:kept-budget", {
18522
- mb: roundTo(state.bytes / BYTES_PER_MB$1, 2),
18543
+ mb: roundTo(state.bytes / BYTES_PER_MB$2, 2),
18523
18544
  keptMb: kctx.ctx.config.keptMb,
18524
18545
  refused: label
18525
18546
  });
@@ -19458,7 +19479,7 @@ function createKeptState(config) {
19458
19479
  frame: 0,
19459
19480
  unsorted: false,
19460
19481
  bytes: 0,
19461
- budget: config.keptMb * BYTES_PER_MB$1,
19482
+ budget: config.keptMb * BYTES_PER_MB$2,
19462
19483
  takesOpen: 0,
19463
19484
  takesWindow: 0,
19464
19485
  refreshesOpen: 0,
@@ -20278,7 +20299,7 @@ function neededBytes(record, now, box) {
20278
20299
  * @param view - Its view.
20279
20300
  */
20280
20301
  function handFilters(kctx, pixi, record, view) {
20281
- const standIn = standInOf(pixi, record);
20302
+ const standIn = standInOf$1(pixi, record);
20282
20303
  kctx.sync.clearFilters(record.top);
20283
20304
  kctx.sync.applyFilters(view, filtersOf$1(kctx.ctx.state.sync, record.entity), noMark$1, standIn);
20284
20305
  }
@@ -22177,7 +22198,7 @@ function createKeptApi(ctx, deps) {
22177
22198
  sprite: (id) => spriteOf$1(kctx, id),
22178
22199
  stats: () => ({
22179
22200
  pictures: state.drawnPictures,
22180
- mb: roundTo(state.bytes / BYTES_PER_MB$1, 2),
22201
+ mb: roundTo(state.bytes / BYTES_PER_MB$2, 2),
22181
22202
  retakes: state.takesWindow,
22182
22203
  evicted: state.evictedWindow,
22183
22204
  refused: state.refusedWindow
@@ -22388,6 +22409,137 @@ function stopDemand(state) {
22388
22409
  state.verify.reference = void 0;
22389
22410
  }
22390
22411
  //#endregion
22412
+ //#region src/plugins/renderer/loss.ts
22413
+ /** The `localStorage` key of the kept records. */
22414
+ const LOSS_KEY = "moku-game:gpu-losses";
22415
+ /** Bytes in a megabyte. */
22416
+ const BYTES_PER_MB$1 = 1048576;
22417
+ /** Milliseconds in a second. */
22418
+ const MS_PER_S = 1e3;
22419
+ /**
22420
+ * Seconds since the page started: the wall clock against the page's time origin.
22421
+ *
22422
+ * @param now - The wall clock in milliseconds.
22423
+ * @returns The seconds, to one decimal; 0 where the page has no time origin.
22424
+ */
22425
+ function uptimeOf(now) {
22426
+ const origin = globalThis.performance?.timeOrigin;
22427
+ return origin === void 0 ? 0 : tenth((now - origin) / MS_PER_S);
22428
+ }
22429
+ /**
22430
+ * Rounds to one decimal.
22431
+ *
22432
+ * @param value - A number.
22433
+ * @returns The number to one decimal.
22434
+ * @example
22435
+ * ```ts
22436
+ * tenth(12.345); // 12.3
22437
+ * ```
22438
+ */
22439
+ function tenth(value) {
22440
+ return Math.round(value * 10) / 10;
22441
+ }
22442
+ /**
22443
+ * The JS heap in use, in megabytes, where the browser tells it: `performance.memory` of Chromium. WebKit has none.
22444
+ *
22445
+ * @returns The megabytes, or `undefined`: the record is kept without it.
22446
+ */
22447
+ function heapMb$1() {
22448
+ const used = (globalThis.performance?.memory)?.usedJSHeapSize;
22449
+ return typeof used === "number" ? tenth(used / BYTES_PER_MB$1) : void 0;
22450
+ }
22451
+ /**
22452
+ * The flow path the game stands on, or `""` before the graph runs.
22453
+ *
22454
+ * @param ctx - Domain context of the renderer plugin.
22455
+ * @returns The path.
22456
+ */
22457
+ function pathOf$1(ctx) {
22458
+ try {
22459
+ return ctx.deps.flow.state().path;
22460
+ } catch {
22461
+ return "";
22462
+ }
22463
+ }
22464
+ /**
22465
+ * Reads the kept records. Anything that is not a list, and a storage that throws, reads as none.
22466
+ *
22467
+ * @returns The records, oldest first.
22468
+ */
22469
+ function readLosses() {
22470
+ try {
22471
+ const text = globalThis.localStorage?.getItem(LOSS_KEY);
22472
+ const parsed = text === null || text === void 0 ? [] : JSON.parse(text);
22473
+ return Array.isArray(parsed) ? parsed : [];
22474
+ } catch {
22475
+ return [];
22476
+ }
22477
+ }
22478
+ /**
22479
+ * Keeps the newest records. A storage that refuses the write (private mode, full) keeps nothing: the log still has
22480
+ * the loss.
22481
+ *
22482
+ * @param records - The records, oldest first.
22483
+ */
22484
+ function writeLosses(records) {
22485
+ try {
22486
+ globalThis.localStorage?.setItem(LOSS_KEY, JSON.stringify(records.slice(-10)));
22487
+ } catch {}
22488
+ }
22489
+ /**
22490
+ * Reloads the page. Headless and in a test there is no page, so nothing happens.
22491
+ */
22492
+ function reloadPage$2() {
22493
+ globalThis.location?.reload();
22494
+ }
22495
+ /**
22496
+ * Records a lost device and decides whether the page leaves: it reloads when textures had their decoded image freed,
22497
+ * since they cannot be uploaded to a new device; without any, the renderer restores as before. The `decideLoss`
22498
+ * callback of the plugin root.
22499
+ *
22500
+ * @param ctx - Domain context of the renderer plugin.
22501
+ * @param info - What was lost and the texture bytes the lost application held.
22502
+ * @param freed - How many textures hold the stand-in instead of their decoded image.
22503
+ * @param reload - Reloads the page; a test passes a spy.
22504
+ * @returns True when the page reloads.
22505
+ */
22506
+ function leaveAfterLoss(ctx, info, freed, reload = reloadPage$2) {
22507
+ const reloaded = freed > 0;
22508
+ const now = ctx.deps.clock.now();
22509
+ const record = {
22510
+ at: now,
22511
+ uptimeS: uptimeOf(now),
22512
+ kind: info.kind,
22513
+ reason: info.reason,
22514
+ path: pathOf$1(ctx),
22515
+ textureMb: tenth(info.textureBytes / BYTES_PER_MB$1),
22516
+ heapMb: heapMb$1(),
22517
+ freed,
22518
+ reloaded,
22519
+ reported: false
22520
+ };
22521
+ ctx.log.error("renderer:gpu-lost", record);
22522
+ writeLosses([...readLosses(), record]);
22523
+ if (reloaded) reload();
22524
+ return reloaded;
22525
+ }
22526
+ /**
22527
+ * Logs every kept loss no start has reported yet, once: the line a phone shows after the reload a loss caused. Called
22528
+ * when the renderer starts.
22529
+ *
22530
+ * @param ctx - Domain context of the renderer plugin.
22531
+ */
22532
+ function reportLosses(ctx) {
22533
+ const records = readLosses();
22534
+ const unreported = records.filter((record) => record.reported !== true);
22535
+ if (unreported.length === 0) return;
22536
+ for (const record of unreported) ctx.log.warn("renderer:gpu-lost-before", record);
22537
+ writeLosses(records.map((record) => ({
22538
+ ...record,
22539
+ reported: true
22540
+ })));
22541
+ }
22542
+ //#endregion
22391
22543
  //#region src/plugins/renderer/monitor/log-types.ts
22392
22544
  /**
22393
22545
  * The version every line carries as `v`.
@@ -22827,7 +22979,7 @@ function usedHeapBytes() {
22827
22979
  */
22828
22980
  function heapMb() {
22829
22981
  const bytes = usedHeapBytes();
22830
- return Number.isNaN(bytes) ? null : roundTo(bytes / BYTES_PER_MB$1, 2);
22982
+ return Number.isNaN(bytes) ? null : roundTo(bytes / BYTES_PER_MB$2, 2);
22831
22983
  }
22832
22984
  //#endregion
22833
22985
  //#region src/plugins/renderer/monitor/problems.ts
@@ -25192,16 +25344,16 @@ function sampleLine(pc, start, end) {
25192
25344
  heapMb: (sections & SECTION.memory) === 0 ? null : heapMb(),
25193
25345
  kept: {
25194
25346
  pictures: totals.keptMax,
25195
- mb: roundTo(pc.ctx.state.kept.bytes / BYTES_PER_MB$1, 2),
25347
+ mb: roundTo(pc.ctx.state.kept.bytes / BYTES_PER_MB$2, 2),
25196
25348
  retakes: totals.retakes,
25197
25349
  refreshes: deps.kept.drainRefreshes()
25198
25350
  },
25199
25351
  textures: {
25200
25352
  count: usage.count,
25201
- mb: ms(usage.bytes / BYTES_PER_MB$1),
25202
- art: ms(usage.art / BYTES_PER_MB$1),
25203
- targets: ms(usage.targets / BYTES_PER_MB$1),
25204
- kept: ms(usage.kept / BYTES_PER_MB$1)
25353
+ mb: ms(usage.bytes / BYTES_PER_MB$2),
25354
+ art: ms(usage.art / BYTES_PER_MB$2),
25355
+ targets: ms(usage.targets / BYTES_PER_MB$2),
25356
+ kept: ms(usage.kept / BYTES_PER_MB$2)
25205
25357
  },
25206
25358
  views: views.views,
25207
25359
  pooled: views.pooled,
@@ -25751,7 +25903,7 @@ function writeEvent(pc, name, detail) {
25751
25903
  /** A flush once a second of page clock. */
25752
25904
  const FLUSH_MS = 1e3;
25753
25905
  /** A heap drop of at least this many bytes between two commits hints at a collection. */
25754
- const GC_DROP_BYTES = .5 * BYTES_PER_MB$1;
25906
+ const GC_DROP_BYTES = .5 * BYTES_PER_MB$2;
25755
25907
  /** Pixels per megapixel. */
25756
25908
  const PIXELS_PER_MPX = 1e6;
25757
25909
  /** The most skipped frames the 8-bit `skipped` column holds; more are written as this. */
@@ -25799,7 +25951,7 @@ function writePasses(pc, slot) {
25799
25951
  c.filterApplies[slot] = counted ? cellF64(counts, COUNT.filterApplies) : NaN;
25800
25952
  c.filterMpx[slot] = counted ? cellF64(counts, COUNT.filterPixels) / PIXELS_PER_MPX : NaN;
25801
25953
  c.uploads[slot] = counted ? cellF64(counts, COUNT.uploads) : NaN;
25802
- c.uploadMb[slot] = counted ? cellF64(counts, COUNT.uploadBytes) / BYTES_PER_MB$1 : NaN;
25954
+ c.uploadMb[slot] = counted ? cellF64(counts, COUNT.uploadBytes) / BYTES_PER_MB$2 : NaN;
25803
25955
  c.rebuilds[slot] = perf.produced === 0 ? NaN : cellF64(counts, COUNT.rebuilds);
25804
25956
  const targets = (bits & MEASURE.targets) !== 0;
25805
25957
  c.targetsCreated[slot] = targets ? cellF64(counts, COUNT.targetsCreated) : NaN;
@@ -27356,11 +27508,11 @@ function createMonitorApi(ctx, deps) {
27356
27508
  drawn: drawing ? roundTo(state.drawnFps, 1) : 0,
27357
27509
  frameMs: roundTo(state.frameMs, 2),
27358
27510
  textures: usage.count,
27359
- textureMb: roundTo(usage.bytes / BYTES_PER_MB$1, 2),
27511
+ textureMb: roundTo(usage.bytes / BYTES_PER_MB$2, 2),
27360
27512
  textureMbSplit: {
27361
- art: roundTo(usage.art / BYTES_PER_MB$1, 2),
27362
- targets: roundTo(usage.targets / BYTES_PER_MB$1, 2),
27363
- kept: roundTo(usage.kept / BYTES_PER_MB$1, 2)
27513
+ art: roundTo(usage.art / BYTES_PER_MB$2, 2),
27514
+ targets: roundTo(usage.targets / BYTES_PER_MB$2, 2),
27515
+ kept: roundTo(usage.kept / BYTES_PER_MB$2, 2)
27364
27516
  },
27365
27517
  views: counts.views,
27366
27518
  pooled: counts.pooled,
@@ -30857,6 +31009,83 @@ function paintShape(object, value, color) {
30857
31009
  strokeShape(object, value);
30858
31010
  }
30859
31011
  //#endregion
31012
+ //#region src/plugins/renderer/sync/release.ts
31013
+ /**
31014
+ * Tells whether a decoded image can be freed: an `ImageBitmap` has `close`, an `<img>` element has none.
31015
+ *
31016
+ * @param image - The decoded image.
31017
+ * @returns True for an image with `close`.
31018
+ */
31019
+ function isClosable(image) {
31020
+ return typeof image === "object" && image !== null && "close" in image && typeof image.close === "function";
31021
+ }
31022
+ /**
31023
+ * The 1x1 transparent image every freed source holds, made once per renderer: a canvas with a 2d context, which both
31024
+ * `copyExternalImageToTexture` and `texSubImage2D` take.
31025
+ *
31026
+ * @param release - The release branch of the sync state.
31027
+ * @returns The stand-in.
31028
+ */
31029
+ function standInOf(release) {
31030
+ if (release.standIn !== void 0) return release.standIn;
31031
+ const canvas = new OffscreenCanvas(1, 1);
31032
+ canvas.getContext("2d");
31033
+ release.standIn = canvas;
31034
+ return canvas;
31035
+ }
31036
+ /**
31037
+ * Remembers a new source of `textures.create` whose decoded image can be freed: it waits for its upload. An image that
31038
+ * cannot be closed, or a runtime without `OffscreenCanvas`, keeps its image.
31039
+ *
31040
+ * @param state - The sync branch of the plugin state.
31041
+ * @param source - The source just made.
31042
+ */
31043
+ function holdImage(state, source) {
31044
+ if (!isClosable(source.resource) || typeof OffscreenCanvas === "undefined") return;
31045
+ state.release.pending.push(source);
31046
+ }
31047
+ /**
31048
+ * Frees the decoded images Pixi has on the GPU now: each bitmap is closed and its source gets the stand-in. A source
31049
+ * not uploaded yet keeps waiting, and one destroyed meanwhile leaves the list. Runs after the stage pass of a drawn
31050
+ * frame; one compare while nothing waits, and no allocation while sources wait (the body of the sync module's
31051
+ * `releaseStep`).
31052
+ *
31053
+ * @param sctx - Domain context of the sync module.
31054
+ */
31055
+ function releaseStep(sctx) {
31056
+ const { release } = sctx.ctx.state.sync;
31057
+ const pending = release.pending;
31058
+ if (pending.length === 0) return;
31059
+ let kept = 0;
31060
+ for (let index = 0; index < pending.length; index += 1) {
31061
+ const source = pending[index];
31062
+ if (source === void 0 || source.destroyed) continue;
31063
+ if (!sctx.deps.host.onGpu(source)) {
31064
+ pending[kept] = source;
31065
+ kept += 1;
31066
+ continue;
31067
+ }
31068
+ const image = source.resource;
31069
+ source.resource = standInOf(release);
31070
+ release.freed.add(source);
31071
+ if (isClosable(image)) image.close();
31072
+ }
31073
+ pending.length = kept;
31074
+ }
31075
+ /**
31076
+ * Frees the decoded image of a source that goes before its upload, at once instead of at the next collection, and
31077
+ * forgets a freed one. A freed source holds the stand-in and closes nothing.
31078
+ *
31079
+ * @param state - The sync branch of the plugin state.
31080
+ * @param source - The source of a texture being destroyed.
31081
+ */
31082
+ function dropImage(state, source) {
31083
+ const { release } = state;
31084
+ if (release.freed.delete(source)) return;
31085
+ const image = source.resource;
31086
+ if (isClosable(image)) image.close();
31087
+ }
31088
+ //#endregion
30860
31089
  //#region src/plugins/renderer/sync/textures.ts
30861
31090
  /** The colour a missing texture is drawn in. */
30862
31091
  const PLACEHOLDER_TINT = 16711935;
@@ -30979,6 +31208,7 @@ function createTexture(sctx, image, options) {
30979
31208
  }) : pixi.Texture.from(image);
30980
31209
  const nine = options?.nine;
30981
31210
  base.source.autoGarbageCollect = false;
31211
+ holdImage(sctx.ctx.state.sync, base.source);
30982
31212
  if (nine === void 0) return base;
30983
31213
  const bordered = new pixi.Texture({
30984
31214
  source: base.source,
@@ -31146,6 +31376,7 @@ function destroyTexture(state, texture) {
31146
31376
  texture.destroy(false);
31147
31377
  return;
31148
31378
  }
31379
+ dropImage(state, texture.source);
31149
31380
  destroyWhole(texture);
31150
31381
  }
31151
31382
  //#endregion
@@ -34069,7 +34300,8 @@ function withDeps$8(ctx) {
34069
34300
  * drawn and clears them; a drawn frame draws the probes of the warm-up onto the canvas first (F4: the
34070
34301
  * stage pass clears them, in the same task, so they never show), then uploads the queued texture sources (F60), then
34071
34302
  * the kept pictures (`kept.flush`, so the canvas stays one pass, E7), then the stage, then a shot of the frame just drawn
34072
- * while the canvas texture holds it (`shots.after`, never of the heat map), then the pixel leg of the kept oracle;
34303
+ * while the canvas texture holds it (`shots.after`, never of the heat map), then, when Pixi drew it, the decoded images
34304
+ * now on the GPU are freed (`sync.releaseStep`, F189), then the pixel leg of the kept oracle;
34073
34305
  * `demand` settles the
34074
34306
  * frame (the dev check, the pixel oracle), and `monitor` closes it and hands a drawn one to a
34075
34307
  * waiting capture; last, `host` trims Pixi's texture pool when a rest or a scene change is due. The display objects
@@ -34113,6 +34345,7 @@ function renderFrame(ctx, modules) {
34113
34345
  if (rendered) {
34114
34346
  ctx.deps.time.frameDrawn();
34115
34347
  if (probed || uploaded || built) ctx.deps.time.frameProbed();
34348
+ modules.sync.releaseStep();
34116
34349
  }
34117
34350
  modules.kept.after();
34118
34351
  }
@@ -34135,6 +34368,7 @@ function renderFrame(ctx, modules) {
34135
34368
  async function startRenderer(ctx) {
34136
34369
  const rendererCtx = withDeps$8(ctx);
34137
34370
  const modules = createModules$1(rendererCtx);
34371
+ reportLosses(rendererCtx);
34138
34372
  modules.host.onResolution(() => modules.demand.whole("resize"));
34139
34373
  modules.host.onReady(() => {
34140
34374
  modules.viewport.start();
@@ -34148,6 +34382,7 @@ async function startRenderer(ctx) {
34148
34382
  modules.sync.forget();
34149
34383
  modules.shots.forget();
34150
34384
  });
34385
+ modules.host.decideLoss((info) => leaveAfterLoss(rendererCtx, info, modules.sync.freedCount()));
34151
34386
  modules.host.onRestore((rebuilt) => {
34152
34387
  modules.demand.whole("restore");
34153
34388
  if (!rebuilt) return;
@@ -37398,6 +37633,8 @@ function createSyncApi(ctx, deps) {
37398
37633
  warmStep: () => warmStep(sctx),
37399
37634
  takeBuildWork: () => takeBuildWork(state.aside),
37400
37635
  uploadStep: () => uploadStep(sctx),
37636
+ releaseStep: () => releaseStep(sctx),
37637
+ freedCount: () => state.release.freed.size,
37401
37638
  onWarm: (fn) => {
37402
37639
  state.warm.listeners.push(fn);
37403
37640
  },
@@ -38232,6 +38469,19 @@ function createUploadState() {
38232
38469
  return upload;
38233
38470
  }
38234
38471
  /**
38472
+ * Creates the empty release branch: no bitmap waits, none was freed, no stand-in made yet. Its own non-exported
38473
+ * function, as `emptyMap`.
38474
+ *
38475
+ * @returns The release branch of the sync state.
38476
+ */
38477
+ function createReleaseState() {
38478
+ return {
38479
+ pending: [],
38480
+ freed: emptySet$4(),
38481
+ standIn: void 0
38482
+ };
38483
+ }
38484
+ /**
38235
38485
  * Creates the empty aside queue of a scene build: nothing waits for a view. Its own non-exported function, as
38236
38486
  * `emptyMap`.
38237
38487
  *
@@ -38290,6 +38540,7 @@ function createSyncState(debug) {
38290
38540
  viewlessEntries: false,
38291
38541
  warm: createWarmState(),
38292
38542
  upload: createUploadState(),
38543
+ release: createReleaseState(),
38293
38544
  hollowClass: void 0,
38294
38545
  filterKinds: emptyWeakMap$1(),
38295
38546
  filterOwners: emptyWeakMap$1(),
@@ -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-B6H9yr9N.mjs";
2
- import { t as createApp } from "./index-BZCgS_Mn.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-DywIk6LN.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-DOX90jck.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-CUQ-ig2E.mjs";
2
+ import { t as createApp } from "./index-DY9NpxeK.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-eIlzV3Jf.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-w-BqXOjQ.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-BqnQLXSV.mjs";
1
+ import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-DAwGHTaM.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-CCiUwvlp.mjs";
@@ -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-B6H9yr9N.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-BDx3KRoA.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-CUQ-ig2E.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-Cbtr2GAO.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-B6H9yr9N.mjs";
2
- import { t as HeadlessApp } from "./headless-DOX90jck.mjs";
1
+ import { $r as Snapshot, Wr as Json } from "./types-CUQ-ig2E.mjs";
2
+ import { t as HeadlessApp } from "./headless-w-BqXOjQ.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -8519,7 +8519,9 @@ type HostState = {
8519
8519
  * Run after every successful restore, where `onReady` must not run twice: `rebuilt` is true when a new application
8520
8520
  * replaced the old one (WebGPU), false when a WebGL context came back on the same one.
8521
8521
  */
8522
- onRestore: Array<(rebuilt: boolean) => void>; /** Run before the lost application is destroyed, while its display objects are still alive. */
8522
+ onRestore: Array<(rebuilt: boolean) => void>; /** Asked at every loss whether the page leaves (F189): one that answers true stops the restore. */
8523
+ lossDeciders: Array<(info: LossInfo) => boolean>; /** True once a loss decided that the page reloads: nothing is restored any more. */
8524
+ leaving: boolean; /** Run before the lost application is destroyed, while its display objects are still alive. */
8523
8525
  onLoss: Array<() => void>;
8524
8526
  cleanups: Array<() => void>;
8525
8527
  unsupported: HTMLElement | undefined;
@@ -8684,6 +8686,15 @@ type TextureUsage = {
8684
8686
  targets: number; /** Bytes of the sources the engine keeps as pictures. */
8685
8687
  kept: number;
8686
8688
  };
8689
+ /**
8690
+ * What a `decideLoss` callback hears of a loss: the backend, what the browser said, and the bytes of every texture
8691
+ * source the lost application held (art, targets and kept pictures), measured before it went. Not public.
8692
+ */
8693
+ type LossInfo = {
8694
+ kind: "webgpu" | "webgl";
8695
+ reason: string;
8696
+ textureBytes: number;
8697
+ };
8687
8698
  /**
8688
8699
  * host methods injected into `viewport`, `sync` and `monitor`, and driven by the plugin root. Not
8689
8700
  * public.
@@ -8705,6 +8716,21 @@ type HostInternal = {
8705
8716
  * @param fn - Called after every successful restore, told whether the application is new.
8706
8717
  */
8707
8718
  onRestore(fn: (rebuilt: boolean) => void): void;
8719
+ /**
8720
+ * Subscribes to every loss of the device, after `renderer:device-lost` went out: the callback answers whether the
8721
+ * page leaves (it reloads), and then nothing is restored (F189).
8722
+ *
8723
+ * @param fn - Told what was lost and the texture bytes the lost application held; answers true when the page leaves.
8724
+ */
8725
+ decideLoss(fn: (info: LossInfo) => boolean): void;
8726
+ /**
8727
+ * Tells whether Pixi has a GPU texture for a source on the application that draws now: it uploaded the source, at a
8728
+ * draw or through `initSource`. Reads Pixi's per-renderer slot of the source; allocates nothing.
8729
+ *
8730
+ * @param source - The source.
8731
+ * @returns True when the source is on the GPU of the drawing renderer; false while nothing draws.
8732
+ */
8733
+ onGpu(source: PixiTextureSource): boolean;
8708
8734
  /**
8709
8735
  * Subscribes to the moment just before a lost application is destroyed. This is the last point
8710
8736
  * at which a display object the game owns can be saved out of the tree.
@@ -11668,7 +11694,8 @@ type TexturesApi = {
11668
11694
  provide(fn: TextureProvider): () => void;
11669
11695
  /**
11670
11696
  * Makes a Pixi texture from a decoded image, so `assets` never imports Pixi. Once uploaded it stays on the GPU until
11671
- * `destroy`: Pixi's collector leaves it alone.
11697
+ * `destroy`: Pixi's collector leaves it alone. The renderer owns an `ImageBitmap` from here on: it closes it once
11698
+ * Pixi has the texture on the GPU (F189), so the caller never uses it again; `destroy` closes one not uploaded yet.
11672
11699
  *
11673
11700
  * @param image - The decoded image.
11674
11701
  * @param options - `nine` is left, top, right and bottom in pixels; it becomes the texture's
@@ -12720,6 +12747,18 @@ type SyncInternal = {
12720
12747
  * @returns True when it uploaded a source in this frame: the frame is then no sample of the adaptive rate.
12721
12748
  */
12722
12749
  uploadStep(): boolean;
12750
+ /**
12751
+ * Frees the decoded images Pixi has on the GPU now (F189), after the stage pass of a drawn frame: each bitmap is
12752
+ * closed and its source gets the 1x1 stand-in. One compare and no allocation while nothing waits.
12753
+ */
12754
+ releaseStep(): void;
12755
+ /**
12756
+ * How many textures hold the stand-in instead of their decoded image: after a lost device they can only come back
12757
+ * with a page reload (F189).
12758
+ *
12759
+ * @returns The count of freed textures still alive.
12760
+ */
12761
+ freedCount(): number;
12723
12762
  /**
12724
12763
  * Subscribes to the end of a warm-up run: the queue became empty (the monitor of an agent build writes the `warm`
12725
12764
  * event line). Emptied by `stopSync`.
@@ -12891,6 +12930,17 @@ type UploadState = {
12891
12930
  done: WeakSet<PixiTextureSource>; /** The one listener on `unload` of every source in `done`. */
12892
12931
  forget(source: PixiTextureSource): void;
12893
12932
  };
12933
+ /**
12934
+ * The decoded images of `textures.create` (F189): a source made from an `ImageBitmap` waits in `pending` until Pixi
12935
+ * has it on the GPU of the drawing renderer; then its bitmap is closed and a 1x1 stand-in takes its place, so no
12936
+ * upload ever reads a closed bitmap (WebGPU throws on one). A freed source cannot be uploaded again: after a lost
12937
+ * device the page reloads. Not public.
12938
+ */
12939
+ type ReleaseState = {
12940
+ /** The sources whose bitmap is still open, in the order they were made. */pending: PixiTextureSource[]; /** The sources that hold the stand-in, until they are destroyed. */
12941
+ freed: Set<PixiTextureSource>; /** The transparent 1x1 image every freed source holds; made at the first release. */
12942
+ standIn: OffscreenCanvas | undefined;
12943
+ };
12894
12944
  /**
12895
12945
  * What a nine-slice view's object offers `sync`, whichever class draws it: Pixi's `NineSliceSprite`, or the engine's
12896
12946
  * rim-only mesh of a `hollow` one (`hollow.ts`). The six numbers rebuild the panel when written, the tint and the
@@ -13157,7 +13207,8 @@ type SyncState = {
13157
13207
  */
13158
13208
  viewlessEntries: boolean; /** The pipeline warm-up (F4). */
13159
13209
  warm: WarmState; /** The texture upload queue (F60). */
13160
- upload: UploadState; /** The class of the rim-only nine-slice (F59), made at the first hollow view over the loaded Pixi module. */
13210
+ upload: UploadState; /** The decoded images waiting to be freed, and how each freed texture is filled again (F189). */
13211
+ release: ReleaseState; /** The class of the rim-only nine-slice (F59), made at the first hollow view over the loaded Pixi module. */
13161
13212
  hollowClass: HollowClass | undefined;
13162
13213
  /**
13163
13214
  * The kind of each Pixi filter a slot named, for the performance log of an agent build; a
@@ -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-B6H9yr9N.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-CUQ-ig2E.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,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-B6H9yr9N.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-C0eMpuaq.mjs";
3
- import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-BDx3KRoA.mjs";
4
- import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-BZCgS_Mn.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-CUQ-ig2E.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-B2oay3bJ.mjs";
3
+ import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-Cbtr2GAO.mjs";
4
+ import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-DY9NpxeK.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-B6H9yr9N.mjs";
2
- import { W as AnimApi, r as UiApi } from "./types-C0eMpuaq.mjs";
3
- import { R as InputApi } from "./types-BDx3KRoA.mjs";
4
- import { r as Repro } from "./headless-DOX90jck.mjs";
5
- import { i as ControlApp, o as InputOf } from "./types-BV0HvdUr.mjs";
6
- import { t as commands } from "./commands-DeBQ0y5y.mjs";
1
+ import { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-CUQ-ig2E.mjs";
2
+ import { W as AnimApi, r as UiApi } from "./types-B2oay3bJ.mjs";
3
+ import { R as InputApi } from "./types-Cbtr2GAO.mjs";
4
+ import { r as Repro } from "./headless-w-BqXOjQ.mjs";
5
+ import { i as ControlApp, o as InputOf } from "./types-BelqIB0P.mjs";
6
+ import { t as commands } from "./commands-CslgzXLW.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-BfN0ONFr.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-VvIFdrWq.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.123",
3
+ "version": "0.15.124",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [