@moku-labs/game 0.15.37 → 0.15.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-B4G8sOED.mjs";
1
+ import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-H1FiWmKa.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Mr as PlayerStateProvider } from "../types-BCI9vUA6.mjs";
2
- import { ht as PlatformProvider } from "../index-BMpWPXvo.mjs";
3
- import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-B4G8sOED.mjs";
1
+ import { Mr as PlayerStateProvider } from "../types-C_dk-lXz.mjs";
2
+ import { ht as PlatformProvider } from "../index-DFAjLwxi.mjs";
3
+ import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-H1FiWmKa.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 { Dr as Json } from "./types-BCI9vUA6.mjs";
2
- import { U as StringTable } from "./types-k5szXqU1.mjs";
3
- import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-B4G8sOED.mjs";
1
+ import { Dr as Json } from "./types-C_dk-lXz.mjs";
2
+ import { U as StringTable } from "./types-0Br0SjTB.mjs";
3
+ import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-H1FiWmKa.mjs";
4
4
  import { AnyPluginInstance } from "@moku-labs/core";
5
5
 
6
6
  //#region src/app/define.d.ts
package/dist/app.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-ChniuNDc.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-B2vblgmb.mjs";
2
2
  import { t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-BCI9vUA6.mjs";
1
+ import { d as Manifest } from "./types-C_dk-lXz.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { $r as Time, D as DebugSwitches, Ir as Snapshot, Rr as StoreApi, Vr as Api, Y as Api$1, Yr as FrameRate, ar as FlowState, nn as Api$2, nr as Bookmark, ot as Captured, w as ScenesApi } from "./types-BCI9vUA6.mjs";
2
- import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BVSmbgJB.mjs";
3
- import { N as InputApi } from "./types-k5szXqU1.mjs";
4
- import { t as HeadlessApp } from "./headless-Bx3WG3fZ.mjs";
5
- import { n as Command, r as ControlApp } from "./types-B6fvpFoz.mjs";
1
+ import { $r as Time, D as DebugSwitches, Ir as Snapshot, Rr as StoreApi, Vr as Api, Y as Api$1, Yr as FrameRate, ar as FlowState, nn as Api$2, nr as Bookmark, ot as Captured, w as ScenesApi } from "./types-C_dk-lXz.mjs";
2
+ import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-54KzmAA6.mjs";
3
+ import { N as InputApi } from "./types-0Br0SjTB.mjs";
4
+ import { t as HeadlessApp } from "./headless-CRqMxzqv.mjs";
5
+ import { n as Command, r as ControlApp } from "./types-CGPWYbZO.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-Bx3WG3fZ.mjs";
2
- import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-B6fvpFoz.mjs";
3
- import { t as commands } from "./commands-BZPrVtJT.mjs";
4
- import { t as defineCommand } from "./define-T-WIPEkg.mjs";
1
+ import { t as HeadlessApp } from "./headless-CRqMxzqv.mjs";
2
+ import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-CGPWYbZO.mjs";
3
+ import { t as commands } from "./commands-CMFdiDcg.mjs";
4
+ import { t as defineCommand } from "./define-D27mfOhZ.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-Bx3WG3fZ.mjs";
2
- import { c as Source, n as Command, o as InputSchema } from "./types-B6fvpFoz.mjs";
1
+ import { t as HeadlessApp } from "./headless-CRqMxzqv.mjs";
2
+ import { c as Source, n as Command, o as InputSchema } from "./types-CGPWYbZO.mjs";
3
3
 
4
4
  //#region src/plugins/flow/doors/define.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { Br as RngState, Dr as Json, Ln as Api$1, _r as Answer, ar as FlowState, cr as RouteStep, or as JournalEntry, qr as Api } from "./types-BCI9vUA6.mjs";
1
+ import { Br as RngState, Dr as Json, Ln as Api$1, _r as Answer, ar as FlowState, cr as RouteStep, or as JournalEntry, qr as Api } from "./types-C_dk-lXz.mjs";
2
2
 
3
3
  //#region src/plugins/flow/headless.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { $n as FeaturePlugin, An as NumericFields, B as ShapeValue, Bn as EmitterIdOf, C as SceneSpec, Cn as TagType, Dr as Json, Dt as PassKind, En as Ease, F as NineSliceValue, Gn as TextStylesOf, Gr as State$4, Hn as HudKeysOf, Hr as Config$4, Jr as Config$8, K as TransformValue, L as OverlayValue, Ln as Api$2, Mn as ProjectionSpec, N as HudPartValue, Nn as ReducedMotion, Or as Root, Qn as FeatureDescription, Qr as ThermalReading, Rn as BundlesOf, Rr as StoreApi, S as SceneDefinition, Sn as SystemFor, Sr as State$2, T as State$7, Tn as DescriptionNode, Tr as Config$5, U as SpriteOptions, Ur as Events, Vn as GameTypes, Vr as Api$3, W as SpriteValue, Wn as State$3, Wr as PauseReason, X as Config$6, Xr as RateChange, Y as Api$4, Zr as State$8, _ as AnySceneProjection, _n as Mut, _r as Answer, _t as FrameRing, a as Config$1, an as State$9, bn as ResourceType, br as Config$2, c as LoadBundles, dr as Descriptor, dt as ViewportSize, er as FeatureTree, f as ReadyBundles, fn as ComponentType, fr as Effect, gt as FrameRecord, hr as Hint, i as BundleSpec, jn as ProjectionMotion, jr as Patch, kr as State$5, l as LoadReason, lr as SceneIdOf, m as Tier, mr as GuideOptions, ni as Events$1, nn as Api$6, o as DefineBundles, p as State$1, pn as ComponentValue, pr as EffectOptions, q as sprite, qn as defineFlow, qr as Api$5, r as BundleMap, ri as Require, rn as Config$9, rr as DefineNode, rt as State$6, t as Api, ti as Config$10, u as LoadResult, un as ComponentHandle, v as Config$7, vn as Narrowed, vr as Api$1, w as ScenesApi, x as LayerMap, xn as SystemDefinition, y as DefineScene, yn as QueryTerm, zn as Config$3, zr as RngApi } from "./types-BCI9vUA6.mjs";
2
- import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-BVSmbgJB.mjs";
3
- import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-k5szXqU1.mjs";
1
+ import { $n as FeaturePlugin, An as NumericFields, B as ShapeValue, Bn as EmitterIdOf, C as SceneSpec, Cn as TagType, Dr as Json, Dt as PassKind, En as Ease, F as NineSliceValue, Gn as TextStylesOf, Gr as State$4, Hn as HudKeysOf, Hr as Config$4, Jr as Config$8, K as TransformValue, L as OverlayValue, Ln as Api$2, Mn as ProjectionSpec, N as HudPartValue, Nn as ReducedMotion, Or as Root, Qn as FeatureDescription, Qr as ThermalReading, Rn as BundlesOf, Rr as StoreApi, S as SceneDefinition, Sn as SystemFor, Sr as State$2, T as State$7, Tn as DescriptionNode, Tr as Config$5, U as SpriteOptions, Ur as Events, Vn as GameTypes, Vr as Api$3, W as SpriteValue, Wn as State$3, Wr as PauseReason, X as Config$6, Xr as RateChange, Y as Api$4, Zr as State$8, _ as AnySceneProjection, _n as Mut, _r as Answer, _t as FrameRing, a as Config$1, an as State$9, bn as ResourceType, br as Config$2, c as LoadBundles, dr as Descriptor, dt as ViewportSize, er as FeatureTree, f as ReadyBundles, fn as ComponentType, fr as Effect, gt as FrameRecord, hr as Hint, i as BundleSpec, jn as ProjectionMotion, jr as Patch, kr as State$5, l as LoadReason, lr as SceneIdOf, m as Tier, mr as GuideOptions, ni as Events$1, nn as Api$6, o as DefineBundles, p as State$1, pn as ComponentValue, pr as EffectOptions, q as sprite, qn as defineFlow, qr as Api$5, r as BundleMap, ri as Require, rn as Config$9, rr as DefineNode, rt as State$6, t as Api, ti as Config$10, u as LoadResult, un as ComponentHandle, v as Config$7, vn as Narrowed, vr as Api$1, w as ScenesApi, x as LayerMap, xn as SystemDefinition, y as DefineScene, yn as QueryTerm, zn as Config$3, zr as RngApi } from "./types-C_dk-lXz.mjs";
2
+ import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-54KzmAA6.mjs";
3
+ import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-0Br0SjTB.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
6
6
 
@@ -600,7 +600,7 @@ declare const rendererPlugin: import("@moku-labs/core").PluginInstance<"renderer
600
600
  * projections: [wardRoom]
601
601
  * });
602
602
  *
603
- * // A game gives the next scene a fixed 3 ms of each frame (half of it by default) while the old one stays on the screen.
603
+ * // A game gives the next scene a fixed 3 ms of each frame (two thirds of it by default) while the old one stays on the screen.
604
604
  * createApp({ plugins: [...screen, boardFeature], pluginConfigs: { scenes: { buildMs: 3 } } });
605
605
  * ```
606
606
  */
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as ShaderWhat, Ar as types_d_exports$10, At as PerfChange, Bt as PerfLongFrameLine, Cr as types_d_exports$3, Ct as PERF_CAUSES, Dt as PassKind, E as types_d_exports$13, Et as PROBLEM_RULES, Fr as SaveUnreadableError, Ft as PerfEventLine, G as Transform, Gt as PerfStartupLine, H as SpriteBlend, Ht as PerfMeasured, I as Overlay, It as PerfEventName, J as AdaptiveScale, Jn as exit, Jt as PoolTrimDetail, Kn as types_d_exports$6, Kr as types_d_exports$9, Kt as PerfTelemetryLine, L as OverlayValue, Lt as PerfGapLine, M as HudPart, Mt as PerfCollectorLine, N as HudPartValue, Nt as PerfCounts, Ot as PassRecord, P as NineSlice, Pt as PerfDisplay, Qt as ShaderEventDetail, R as Parent, Rt as PerfHeaderLine, St as OverlayWhat, Tn as DescriptionNode, Tt as PERF_LOG_VERSION, Ut as PerfSampleLine, V as Sprite, Vt as PerfMarkLine, Wt as PerfSpikeLine, Xn as to, Xt as ProblemRule, Yn as slot, Yt as ProblemEventDetail, Z as MonitorConfig, Zn as type, Zt as SHADER_WHATS, _t as FrameRing, at as types_d_exports$12, bt as MonitorSections, ei as types_d_exports$15, en as WarmDetail, g as types_d_exports$1, gt as FrameRecord, ht as FrameReadout, j as Display, jt as PerfChangeEntry, kt as PerfCause, mt as FrameReadResult, nt as PoolTrim, on as types_d_exports$17, pt as FrameColumns, q as sprite, qt as PerfThermalLine, st as MonitorCounts, tn as DEMAND_REASONS, vt as LongFrameEntry, wt as PERF_GAP_BUCKETS, xt as OverlayEventDetail, yt as MONITOR_SECTIONS, z as Shape, zt as PerfLogLine } from "./types-BCI9vUA6.mjs";
2
- import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-BVSmbgJB.mjs";
3
- import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-k5szXqU1.mjs";
4
- import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-BMpWPXvo.mjs";
1
+ import { $t as ShaderWhat, Ar as types_d_exports$10, At as PerfChange, Bt as PerfLongFrameLine, Cr as types_d_exports$3, Ct as PERF_CAUSES, Dt as PassKind, E as types_d_exports$13, Et as PROBLEM_RULES, Fr as SaveUnreadableError, Ft as PerfEventLine, G as Transform, Gt as PerfStartupLine, H as SpriteBlend, Ht as PerfMeasured, I as Overlay, It as PerfEventName, J as AdaptiveScale, Jn as exit, Jt as PoolTrimDetail, Kn as types_d_exports$6, Kr as types_d_exports$9, Kt as PerfTelemetryLine, L as OverlayValue, Lt as PerfGapLine, M as HudPart, Mt as PerfCollectorLine, N as HudPartValue, Nt as PerfCounts, Ot as PassRecord, P as NineSlice, Pt as PerfDisplay, Qt as ShaderEventDetail, R as Parent, Rt as PerfHeaderLine, St as OverlayWhat, Tn as DescriptionNode, Tt as PERF_LOG_VERSION, Ut as PerfSampleLine, V as Sprite, Vt as PerfMarkLine, Wt as PerfSpikeLine, Xn as to, Xt as ProblemRule, Yn as slot, Yt as ProblemEventDetail, Z as MonitorConfig, Zn as type, Zt as SHADER_WHATS, _t as FrameRing, at as types_d_exports$12, bt as MonitorSections, ei as types_d_exports$15, en as WarmDetail, g as types_d_exports$1, gt as FrameRecord, ht as FrameReadout, j as Display, jt as PerfChangeEntry, kt as PerfCause, mt as FrameReadResult, nt as PoolTrim, on as types_d_exports$17, pt as FrameColumns, q as sprite, qt as PerfThermalLine, st as MonitorCounts, tn as DEMAND_REASONS, vt as LongFrameEntry, wt as PERF_GAP_BUCKETS, xt as OverlayEventDetail, yt as MONITOR_SECTIONS, z as Shape, zt as PerfLogLine } from "./types-C_dk-lXz.mjs";
2
+ import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-54KzmAA6.mjs";
3
+ import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-0Br0SjTB.mjs";
4
+ import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-DFAjLwxi.mjs";
5
5
  export { type AdaptiveScale, Alpha, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Sprite, type SpriteBlend, Swipeable, Tappable, Text, type TextFormat, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, type WarmDetail, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as sfx, $t as flowPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as worldPlugin, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as modelPlugin, at as use, b as types_exports$17, bt as Traced, c as hint, cn as timePlugin, ct as Draggable, d as defineScene, dt as Hovered, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as type, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as clockPlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as slot, nt as stagger, o as defineEffect, on as SaveUnreadableError, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as to, rt as stopSfx, s as guide, sn as lifecyclePlugin, st as inputPlugin, t as createApp, tn as exit, tt as spawned, u as projection, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-ChniuNDc.mjs";
1
+ import { $ as sfx, $t as flowPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as worldPlugin, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as modelPlugin, at as use, b as types_exports$17, bt as Traced, c as hint, cn as timePlugin, ct as Draggable, d as defineScene, dt as Hovered, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as type, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as clockPlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as slot, nt as stagger, o as defineEffect, on as SaveUnreadableError, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as to, rt as stopSfx, s as guide, sn as lifecyclePlugin, st as inputPlugin, t as createApp, tn as exit, tt as spawned, u as projection, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-B2vblgmb.mjs";
2
2
  import { $ as component, H as Shape, I as Display, J as Exiting, L as HudPart, Q as Tree, R as NineSlice, S as bind, T as label, U as Sprite, V as Parent, W as Transform, X as Now, Y as Layer, Z as Order, b as Countdown, d as LocalWrite, et as mut, g as popup, it as tag, l as DebugTrigger, nt as system, p as ScrollState, q as sprite, s as Box, tt as resource, v as defineTokens, w as defineTextStyles, x as Text, y as defineStyle, z as Overlay } from "./visual-ClVRMUAi.mjs";
3
3
  import { t as defineComponent } from "./component-DGg5DqKK.mjs";
4
4
  export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
@@ -1,9 +1,9 @@
1
- import { Ir as Snapshot, Un as Position, Y as Api$2, ct as RenderStats, dn as ComponentSchema, gn as FrameDiff, h as Usage, hn as EntitySnapshot, in as Explained, ir as FlowGraph, it as Under, nn as Api$1, or as JournalEntry, t as Api$3, wr as Api } from "./types-BCI9vUA6.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BVSmbgJB.mjs";
3
- import { c as UiNode } from "./types-k5szXqU1.mjs";
4
- import { t as HeadlessApp } from "./headless-Bx3WG3fZ.mjs";
5
- import { a as InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-B6fvpFoz.mjs";
6
- import { n as defineSource } from "./define-T-WIPEkg.mjs";
1
+ import { Ir as Snapshot, Un as Position, Y as Api$2, ct as RenderStats, dn as ComponentSchema, gn as FrameDiff, h as Usage, hn as EntitySnapshot, in as Explained, ir as FlowGraph, it as Under, nn as Api$1, or as JournalEntry, t as Api$3, wr as Api } from "./types-C_dk-lXz.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-54KzmAA6.mjs";
3
+ import { c as UiNode } from "./types-0Br0SjTB.mjs";
4
+ import { t as HeadlessApp } from "./headless-CRqMxzqv.mjs";
5
+ import { a as InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-CGPWYbZO.mjs";
6
+ import { n as defineSource } from "./define-D27mfOhZ.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-c0miURhi.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-CbLZyDXj.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-c0miURhi.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-CbLZyDXj.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-k5szXqU1.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-0Br0SjTB.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. */
@@ -838,7 +838,7 @@ const BUSY = 4;
838
838
  /** The thermal rank from which the rule never steps up: `"moderate"` and every hotter status. */
839
839
  const HEAT_LIMIT_RANK = 2;
840
840
  /** Milliseconds in a second: turns a rate into the period of one frame. */
841
- const SECOND_MS$1 = 1e3;
841
+ const SECOND_MS$2 = 1e3;
842
842
  /** Every choice `setRate` takes: `"auto"` and the three fixed rates. */
843
843
  const RATE_CHOICES = Object.freeze([
844
844
  "auto",
@@ -1432,8 +1432,8 @@ function judgeFrame$1(ctx, g, intervalMs, at) {
1432
1432
  const { fps } = ctx.state.rate;
1433
1433
  const higher = stepAbove(g.ladder, fps);
1434
1434
  const missed = intervalMs > missLineMs(fps, ctx.state.rate.display.hz ?? fps);
1435
- const heavy = higher !== void 0 && g.lastWorkMs > .5 * SECOND_MS$1 / higher;
1436
- const busy = missed && g.lastWorkMs > SECOND_MS$1 / fps;
1435
+ const heavy = higher !== void 0 && g.lastWorkMs > .5 * SECOND_MS$2 / higher;
1436
+ const busy = missed && g.lastWorkMs > SECOND_MS$2 / fps;
1437
1437
  const slot = g.written % 512;
1438
1438
  evict$2(g, at);
1439
1439
  g.sampleAt[slot] = at;
@@ -29860,7 +29860,7 @@ function layerOf(sctx, entity) {
29860
29860
  //#endregion
29861
29861
  //#region src/plugins/renderer/sync/build.ts
29862
29862
  /** Views made between two reads of the clock: a read costs more than a small view. */
29863
- const CLOCK_EVERY = 8;
29863
+ const CLOCK_EVERY$1 = 8;
29864
29864
  /**
29865
29865
  * Tells whether a scene is being built: `left()` answers a finite number only while a build runs.
29866
29866
  *
@@ -29958,7 +29958,7 @@ function makeAside(sctx, report) {
29958
29958
  made += makeParentFirst(sctx, entity, report);
29959
29959
  if (made >= check) {
29960
29960
  if (projection.left() <= 0) break;
29961
- check = made + CLOCK_EVERY;
29961
+ check = made + CLOCK_EVERY$1;
29962
29962
  }
29963
29963
  }
29964
29964
  if (aside.head >= aside.count) {
@@ -38894,10 +38894,12 @@ function swapIn(ctx, scene, named, build) {
38894
38894
  * `world.projection.built()` first answers true commits it with the swap of a one-block switch. An
38895
38895
  * abort of the node discards the build and leaves the world as it stood.
38896
38896
  */
38897
- /** Half a second in ms: half of a frame interval is this over the frame rate. */
38898
- const HALF_SECOND_MS = 500;
38899
- /** The budget of a frame when `time` answers no frame rate to halve: half a 60 Hz frame, ms. */
38900
- const FALLBACK_BUDGET_MS = HALF_SECOND_MS / 60;
38897
+ /** A second in ms: the frame interval is this over the frame rate. */
38898
+ const SECOND_MS$1 = 1e3;
38899
+ /** The share of a frame interval `"auto"` gives the building work: two thirds. */
38900
+ const BUILD_SHARE = 2 / 3;
38901
+ /** The budget of a frame when `time` answers no usable frame rate: two thirds of a 60 Hz frame, ≈ 11.1 ms. */
38902
+ const FALLBACK_BUDGET_MS = SECOND_MS$1 / 60 * BUILD_SHARE;
38901
38903
  /**
38902
38904
  * Tells whether a value is a number a frame can count with: finite and above 0. Pure.
38903
38905
  *
@@ -38927,8 +38929,8 @@ function agentNow(ctx) {
38927
38929
  }
38928
38930
  /**
38929
38931
  * The building budget of a frame for a build that starts now: the number a game configured, or
38930
- * for `"auto"` half of the frame interval the loop runs at, `500 / time.rate().fps`, read once
38931
- * here. A rate that is not a finite number above 0 gives half a 60 Hz frame.
38932
+ * for `"auto"` two thirds of the frame interval the loop runs at, `(1000 / time.rate().fps) * 2 / 3`,
38933
+ * read once here. A rate that is not a finite number above 0 gives two thirds of a 60 Hz frame.
38932
38934
  *
38933
38935
  * @param ctx - Domain context of the plugin.
38934
38936
  * @returns Milliseconds per frame the building work may take.
@@ -38937,7 +38939,7 @@ function budgetOf(ctx) {
38937
38939
  const { buildMs } = ctx.config;
38938
38940
  if (buildMs !== "auto") return buildMs;
38939
38941
  const { fps } = ctx.deps.time.rate();
38940
- return isPositiveFinite(fps) ? HALF_SECOND_MS / fps : FALLBACK_BUDGET_MS;
38942
+ return isPositiveFinite(fps) ? SECOND_MS$1 / fps * BUILD_SHARE : FALLBACK_BUDGET_MS;
38941
38943
  }
38942
38944
  /**
38943
38945
  * Ends the build with the swap: its listeners go and the record is dropped, then the swap of a
@@ -39546,7 +39548,7 @@ function createScenesState() {
39546
39548
  * projections: [wardRoom]
39547
39549
  * });
39548
39550
  *
39549
- * // A game gives the next scene a fixed 3 ms of each frame (half of it by default) while the old one stays on the screen.
39551
+ * // A game gives the next scene a fixed 3 ms of each frame (two thirds of it by default) while the old one stays on the screen.
39550
39552
  * createApp({ plugins: [...screen, boardFeature], pluginConfigs: { scenes: { buildMs: 3 } } });
39551
39553
  * ```
39552
39554
  */
@@ -53887,7 +53889,9 @@ function dropHost(state, entity) {
53887
53889
  if (state.hosts.delete(entity)) hostsMoved(state);
53888
53890
  }
53889
53891
  /**
53890
- * The element of a host entity while it hosts: mounted, live and not leaving.
53892
+ * The element of a host entity while it hosts: mounted, live and not leaving. A host of a root
53893
+ * built aside that is applied in parts hosts nothing until the root is whole (spec 33 A7): the
53894
+ * last part gives it its views.
53891
53895
  *
53892
53896
  * @param state - The jsx state.
53893
53897
  * @param host - An entity of the host set.
@@ -53895,7 +53899,8 @@ function dropHost(state, entity) {
53895
53899
  */
53896
53900
  function liveHost(state, host) {
53897
53901
  const element = state.elements.get(host);
53898
- return element === void 0 || !element.live || state.exiting.has(host) ? void 0 : element;
53902
+ if (element === void 0 || !element.live || state.exiting.has(host)) return void 0;
53903
+ return state.roots.get(element.root)?.applying === void 0 ? element : void 0;
53899
53904
  }
53900
53905
  /**
53901
53906
  * The host that owns the views of a projection: the first live host that names it. A view
@@ -55985,7 +55990,7 @@ function coveredByLive(state, root) {
55985
55990
  * @param root - A mounted root.
55986
55991
  * @returns True when the settle step has to look at it.
55987
55992
  */
55988
- function waits(state, root) {
55993
+ function waits$1(state, root) {
55989
55994
  return (root.popup?.released === true || root.covered) && !state.removing.has(root.entity);
55990
55995
  }
55991
55996
  /**
@@ -55996,7 +56001,7 @@ function waits(state, root) {
55996
56001
  * @returns True when at least one root waits.
55997
56002
  */
55998
56003
  function anyWaits(state) {
55999
- for (const root of state.roots.values()) if (waits(state, root)) return true;
56004
+ for (const root of state.roots.values()) if (waits$1(state, root)) return true;
56000
56005
  return false;
56001
56006
  }
56002
56007
  /**
@@ -56019,7 +56024,7 @@ function settlePopups(ctx, state, unmount) {
56019
56024
  * @param unmount - Starts the exit of a root.
56020
56025
  */
56021
56026
  function settleWaiting(ctx, state, unmount) {
56022
- const waiting = [...state.roots.values()].filter((root) => waits(state, root));
56027
+ const waiting = [...state.roots.values()].filter((root) => waits$1(state, root));
56023
56028
  const rests = flowRests(ctx.deps.flow.state());
56024
56029
  waiting.sort((first, second) => second.order - first.order);
56025
56030
  for (const root of waiting) {
@@ -57359,6 +57364,320 @@ function settleOverlays(ctx, state, layout) {
57359
57364
  }
57360
57365
  }
57361
57366
  //#endregion
57367
+ //#region src/plugins/ui/jsx/parts.ts
57368
+ /**
57369
+ * How many elements a root built aside makes or applies in a frame between two reads of the
57370
+ * frame's budget, from the first read on (spec 33 A2, A6): the clock is read every 8 elements.
57371
+ */
57372
+ const CLOCK_EVERY = 8;
57373
+ /**
57374
+ * The most elements of roots built aside one frame applies. The components `applyFirst` adds are
57375
+ * flushed after the system, where the budget does not see them: the cap keeps that flush short
57376
+ * (spec 33 A6; 275 elements in one frame took 3.6 ms in Node, about 15 ms on the A26).
57377
+ */
57378
+ const APPLY_CAP = 100;
57379
+ /** What a parked part holds once it is back in the pool: no nodes and no element, so the pool keeps no tree alive. */
57380
+ const NO_NODES = [];
57381
+ /**
57382
+ * Tells whether a root has parked parts.
57383
+ *
57384
+ * @param root - The root.
57385
+ * @returns True while children of its elements wait.
57386
+ */
57387
+ function hasParked(root) {
57388
+ return (root.parked?.length ?? 0) > 0;
57389
+ }
57390
+ /**
57391
+ * Tells whether parts of a root built aside wait: children parked, or its application open.
57392
+ * Two field reads; false for every other root.
57393
+ *
57394
+ * @param root - The root, if it is still known.
57395
+ * @returns True while its build waits for a later frame.
57396
+ */
57397
+ function waits(root) {
57398
+ return root !== void 0 && (root.applying !== void 0 || hasParked(root));
57399
+ }
57400
+ /**
57401
+ * Builds the parts half of the reconcile: the park queue of each root built aside and the pools of
57402
+ * its parts, the drain of the queue, the hold of a dirty root, and the application in parts.
57403
+ *
57404
+ * @param ctx - Domain context of the ui plugin.
57405
+ * @param reconcile - The diff and the application the reconcile lends.
57406
+ * @returns The steps the reconcile calls.
57407
+ */
57408
+ function createParts(ctx, reconcile) {
57409
+ const state = ctx.state.jsx;
57410
+ const lookup = (entity) => state.elements.get(entity);
57411
+ let entered = 0;
57412
+ let spent = false;
57413
+ let unitRan = false;
57414
+ let applied = 0;
57415
+ let landed = false;
57416
+ const parkedPool = [];
57417
+ const cursorPool = [];
57418
+ /**
57419
+ * Starts the frame's reconcile: no element entered, the budget not read, no building unit run.
57420
+ */
57421
+ function beginReconcile() {
57422
+ entered = 0;
57423
+ spent = false;
57424
+ unitRan = false;
57425
+ }
57426
+ /**
57427
+ * Starts the frame's solve: no element applied in parts, no application ended.
57428
+ */
57429
+ function beginSolve() {
57430
+ applied = 0;
57431
+ landed = false;
57432
+ }
57433
+ /**
57434
+ * Tells whether an application of a root built aside ended in this solve: its scrolls settle now.
57435
+ *
57436
+ * @returns True after the last part of an application.
57437
+ */
57438
+ function hasLanded() {
57439
+ return landed;
57440
+ }
57441
+ /**
57442
+ * Tells whether the frame's building budget is spent, read once every `CLOCK_EVERY` units of
57443
+ * work: a read of the clock costs more than a small unit.
57444
+ *
57445
+ * @param count - The units of work made in this frame so far.
57446
+ * @returns True when the count is a reading point and no budget is left.
57447
+ */
57448
+ function spentAt(count) {
57449
+ return count > 0 && count % CLOCK_EVERY === 0 && ctx.deps.world.projection.left() <= 0;
57450
+ }
57451
+ /**
57452
+ * Counts an element entered for a root built aside and tells whether its children wait for a
57453
+ * later frame. From the 8th element of the frame the budget is read every 8; once it is spent,
57454
+ * the children of every next element wait. A row a range change scrolls in never parks: the
57455
+ * window moves in one block, as on a live root.
57456
+ *
57457
+ * @returns True when the children of the element wait.
57458
+ */
57459
+ function parks() {
57460
+ if (reconcile.isMoving()) return false;
57461
+ entered += 1;
57462
+ if (!spent) spent = spentAt(entered);
57463
+ return spent;
57464
+ }
57465
+ /**
57466
+ * Leaves the children of a new element of a root built aside for a later frame: the element
57467
+ * itself exists, so the child list of its parent is complete. The part is queued behind the
57468
+ * root's other parts, with the cause of the diff running now.
57469
+ *
57470
+ * @param root - The root built aside.
57471
+ * @param element - The element that entered.
57472
+ * @param nodes - The children it would have diffed.
57473
+ * @param instance - The identity of the nearest component instance.
57474
+ */
57475
+ function park(root, element, nodes, instance) {
57476
+ const cause = state.building;
57477
+ const part = parkedPool.pop() ?? {
57478
+ element,
57479
+ nodes,
57480
+ instance,
57481
+ cause
57482
+ };
57483
+ part.element = element;
57484
+ part.nodes = nodes;
57485
+ part.instance = instance;
57486
+ part.cause = cause;
57487
+ root.parked ??= [];
57488
+ root.parked.push(part);
57489
+ }
57490
+ /**
57491
+ * Puts a parked part back in the pool, its element and nodes dropped.
57492
+ *
57493
+ * @param part - A part that was diffed or forgotten.
57494
+ */
57495
+ function recycle(part) {
57496
+ part.element = void 0;
57497
+ part.nodes = NO_NODES;
57498
+ parkedPool.push(part);
57499
+ }
57500
+ /**
57501
+ * Tells whether the next building unit may run in this frame: the first one always does, so a
57502
+ * build always moves; a later one while the budget lasts.
57503
+ *
57504
+ * @returns True when the unit runs.
57505
+ */
57506
+ function mayRun() {
57507
+ return !unitRan || ctx.deps.world.projection.left() > 0;
57508
+ }
57509
+ /**
57510
+ * Diffs one parked part under the cause it was parked with. A part whose element left meanwhile
57511
+ * is dropped. A part that throws fails its root alone, as the root's own diff does.
57512
+ *
57513
+ * @param root - The root built aside.
57514
+ * @param part - The part.
57515
+ */
57516
+ function diffPart(root, part) {
57517
+ const element = part.element;
57518
+ if (element === void 0 || lookup(element.entity) !== element) return;
57519
+ const cause = state.building;
57520
+ unitRan = true;
57521
+ state.building = part.cause;
57522
+ try {
57523
+ reconcile.diffChildren(root, element, part.nodes, part.instance);
57524
+ } catch (error) {
57525
+ ctx.log.error("ui:root-failed", { root: root.name }, asError(error));
57526
+ } finally {
57527
+ state.building = cause;
57528
+ }
57529
+ root.needsSolve = true;
57530
+ }
57531
+ /**
57532
+ * Diffs the parked parts of the roots built aside, each root's in the order they were parked,
57533
+ * while the frame's budget lasts (spec 33 A3). Children that park again go to the end of their
57534
+ * root's queue.
57535
+ */
57536
+ function drainParked() {
57537
+ if (state.asideRoots === 0) return;
57538
+ for (const root of state.roots.values()) {
57539
+ const parked = root.parked;
57540
+ while (parked !== void 0 && parked.length > 0) {
57541
+ if (!mayRun()) return;
57542
+ const part = parked.shift();
57543
+ if (part === void 0) break;
57544
+ diffPart(root, part);
57545
+ recycle(part);
57546
+ }
57547
+ }
57548
+ }
57549
+ /**
57550
+ * Holds a dirty root built aside for a later frame instead of diffing it now: while parked parts
57551
+ * of it wait, so no element is made twice, and once the frame's budget is spent after its first
57552
+ * building unit. It stays dirty: the next frame lists it again and diffs its newest tree once
57553
+ * (spec 33 A1, A4). The drain runs before, until its queue is empty or the budget is spent, so a
57554
+ * root with parked parts meets a spent budget here too. A live root is never held.
57555
+ *
57556
+ * @param root - A root with work this frame.
57557
+ * @returns True when the root waits.
57558
+ */
57559
+ function holdRoot(root) {
57560
+ if (!ctx.deps.world.projection.isBuilding(root.entity)) return false;
57561
+ if (hasParked(root) || !mayRun()) {
57562
+ root.dirty = true;
57563
+ return true;
57564
+ }
57565
+ unitRan = true;
57566
+ return false;
57567
+ }
57568
+ /**
57569
+ * Forgets the parked parts and the open application of a root whose build ends here: a drop, a
57570
+ * discard, its exit or a restore.
57571
+ *
57572
+ * @param root - The root.
57573
+ */
57574
+ function forgetParts(root) {
57575
+ const parked = root.parked;
57576
+ while (parked !== void 0 && parked.length > 0) {
57577
+ const part = parked.pop();
57578
+ if (part !== void 0) recycle(part);
57579
+ }
57580
+ const cursor = root.applying;
57581
+ if (cursor === void 0) return;
57582
+ while (cursor.stack.length > 0) cursor.stack.pop();
57583
+ delete root.applying;
57584
+ cursorPool.push(cursor);
57585
+ }
57586
+ /**
57587
+ * Opens the application of a solved root built aside and applies its first part (spec 33 A6).
57588
+ *
57589
+ * @param root - The root built aside.
57590
+ * @param element - Its root element.
57591
+ * @param quiet - Whether its live elements take their rects with no motion.
57592
+ */
57593
+ function applyInParts(root, element, quiet) {
57594
+ const cursor = cursorPool.pop() ?? {
57595
+ stack: [],
57596
+ quiet
57597
+ };
57598
+ cursor.quiet = quiet;
57599
+ cursor.stack.push(element);
57600
+ root.applying = cursor;
57601
+ applyPart(root, cursor);
57602
+ }
57603
+ /**
57604
+ * Applies the next elements of an open application, top-down, parent before children in the
57605
+ * order of `applyRects`, until the frame's budget is spent (read every 8 elements of the frame)
57606
+ * or the frame applied `APPLY_CAP` elements of roots built aside. An element that left on the
57607
+ * way is skipped. The last element closes the application.
57608
+ *
57609
+ * @param root - The root built aside.
57610
+ * @param cursor - Its open application.
57611
+ */
57612
+ function applyPart(root, cursor) {
57613
+ const stack = cursor.stack;
57614
+ while (stack.length > 0 && applied < APPLY_CAP) {
57615
+ if (spentAt(applied)) return;
57616
+ const element = stack.pop();
57617
+ if (element === void 0 || lookup(element.entity) !== element) continue;
57618
+ reconcile.applyElement(element, cursor.quiet);
57619
+ applied += 1;
57620
+ stackChildren(stack, element);
57621
+ }
57622
+ if (stack.length === 0) closeApplication(root, cursor);
57623
+ }
57624
+ /**
57625
+ * Puts the children of an applied element on the stack of its application, the first one on top,
57626
+ * so they come next, in the order of `applyRects`.
57627
+ *
57628
+ * @param stack - The elements still to apply.
57629
+ * @param element - The element just applied.
57630
+ */
57631
+ function stackChildren(stack, element) {
57632
+ for (let index = element.children.length - 1; index >= 0; index -= 1) {
57633
+ const child = element.children[index];
57634
+ const childElement = child === void 0 ? void 0 : lookup(child);
57635
+ if (childElement !== void 0) stack.push(childElement);
57636
+ }
57637
+ }
57638
+ /**
57639
+ * Ends the application of a root built aside: its scrolls settle in this solve, and its live
57640
+ * hosts take their views in it, now that the root is whole (spec 33 A7).
57641
+ *
57642
+ * @param root - The root built aside.
57643
+ * @param cursor - Its application, empty.
57644
+ */
57645
+ function closeApplication(root, cursor) {
57646
+ delete root.applying;
57647
+ cursorPool.push(cursor);
57648
+ landed = true;
57649
+ for (const host of state.hosts) if (lookup(host)?.root === root.entity) state.risen.add(host);
57650
+ }
57651
+ /**
57652
+ * Applies the next part of every open application of a root built aside, in mount order, while
57653
+ * the frame's budget lasts. It runs before any root is solved: a root whose application ends
57654
+ * here is solved again in the same call when it asks for it.
57655
+ */
57656
+ function applyParts() {
57657
+ if (state.asideRoots === 0) return;
57658
+ for (const root of state.roots.values()) {
57659
+ const cursor = root.applying;
57660
+ if (cursor === void 0) continue;
57661
+ if (!mayRun()) return;
57662
+ unitRan = true;
57663
+ applyPart(root, cursor);
57664
+ }
57665
+ }
57666
+ return {
57667
+ beginReconcile,
57668
+ beginSolve,
57669
+ hasLanded,
57670
+ parks,
57671
+ park,
57672
+ waits,
57673
+ drainParked,
57674
+ holdRoot,
57675
+ forgetParts,
57676
+ applyInParts,
57677
+ applyParts
57678
+ };
57679
+ }
57680
+ //#endregion
57362
57681
  //#region src/plugins/ui/jsx/range.ts
57363
57682
  /**
57364
57683
  * Builds the windowed-scroll half of the reconcile: the row style, the slots a mount or a patch
@@ -57734,8 +58053,8 @@ function sameValue(left, right) {
57734
58053
  * that stays is compared prop by prop, by value: one that says what it said is neither styled nor
57735
58054
  * written. Beside it:
57736
58055
  * the range of a windowed scroll (`range.ts`), the rest and the motion of the extras
57737
- * (`extras.ts`), the hint routed to a keyed element (`hints.ts`) and the remeasure of the texts
57738
- * `text` resolved again (`remeasure.ts`).
58056
+ * (`extras.ts`), the hint routed to a keyed element (`hints.ts`), the remeasure of the texts
58057
+ * `text` resolved again (`remeasure.ts`) and a scene build in parts (`parts.ts`).
57739
58058
  */
57740
58059
  /** The four components an element may be drawn with; a state change can trade one for another. */
57741
58060
  const VISUALS = [
@@ -58242,6 +58561,11 @@ function createReconciler(ctx, modules, fields) {
58242
58561
  forgetSubtree,
58243
58562
  despawnTree
58244
58563
  });
58564
+ const parts = createParts(ctx, {
58565
+ diffChildren,
58566
+ applyElement,
58567
+ isMoving: range.isMoving
58568
+ });
58245
58569
  const dirtyList = [];
58246
58570
  const scrollList = [];
58247
58571
  const movedRoots = [];
@@ -58312,7 +58636,8 @@ function createReconciler(ctx, modules, fields) {
58312
58636
  function enter(root, parent, node, identity, instance, index) {
58313
58637
  checkTag(node);
58314
58638
  const entity = ecs.spawn(UI_OWNER, []);
58315
- if (isAside(root.entity)) ctx.deps.world.projection.adopt(entity);
58639
+ const aside = isAside(root.entity);
58640
+ if (aside) ctx.deps.world.projection.adopt(entity);
58316
58641
  const is = isFlagsOf(node, {
58317
58642
  pressed: false,
58318
58643
  hover: false,
@@ -58378,7 +58703,9 @@ function createReconciler(ctx, modules, fields) {
58378
58703
  epoch: state.epoch,
58379
58704
  rowHeight: range.rowHeightOf(parent, node)
58380
58705
  };
58381
- diffChildren(root, element, childrenOf(node, range.slotsFor(element), element.scroll?.axis), instance);
58706
+ const nodes = childrenOf(node, range.slotsFor(element), element.scroll?.axis);
58707
+ if (aside && parts.parks() && nodes.length > 0) parts.park(root, element, nodes, instance);
58708
+ else diffChildren(root, element, nodes, instance);
58382
58709
  root.needsSolve = true;
58383
58710
  return entity;
58384
58711
  }
@@ -59050,16 +59377,25 @@ function createReconciler(ctx, modules, fields) {
59050
59377
  * @param quiet - Whether a live element takes its rect with no motion.
59051
59378
  */
59052
59379
  function applyRects(element, quiet = false) {
59053
- const parent = parentRect(element);
59054
- if (element.live) applyLive(element, parent, quiet);
59055
- else applyFirst(element, parent);
59056
- element.moved = false;
59380
+ applyElement(element, quiet);
59057
59381
  for (const child of element.children) {
59058
59382
  const childElement = lookup(child);
59059
59383
  if (childElement !== void 0) applyRects(childElement, quiet);
59060
59384
  }
59061
59385
  }
59062
59386
  /**
59387
+ * Applies the solved rect of one element: a live one moves, a new one spawns its components.
59388
+ *
59389
+ * @param element - The element to apply.
59390
+ * @param quiet - Whether a live element takes its rect with no motion.
59391
+ */
59392
+ function applyElement(element, quiet) {
59393
+ const parent = parentRect(element);
59394
+ if (element.live) applyLive(element, parent, quiet);
59395
+ else applyFirst(element, parent);
59396
+ element.moved = false;
59397
+ }
59398
+ /**
59063
59399
  * Where the element of a root draws: its layer and order, and its slot with the place the slot
59064
59400
  * lists the root's projection at.
59065
59401
  *
@@ -59206,7 +59542,8 @@ function createReconciler(ctx, modules, fields) {
59206
59542
  }
59207
59543
  /**
59208
59544
  * Solves one root in a box and applies its rects: a root on the viewport when it is marked, a
59209
- * root in a slot also when its slot was resized.
59545
+ * root in a slot also when its slot was resized. A root built aside waits while parts of it wait,
59546
+ * and is applied in parts.
59210
59547
  *
59211
59548
  * @param root - The root.
59212
59549
  * @param box - The viewport, or the slot's content box.
@@ -59215,7 +59552,7 @@ function createReconciler(ctx, modules, fields) {
59215
59552
  */
59216
59553
  function solveOne(root, box, quiet) {
59217
59554
  const element = root.element === void 0 ? void 0 : lookup(root.element);
59218
- if (element === void 0) return false;
59555
+ if (element === void 0 || parts.waits(root)) return false;
59219
59556
  const resized = root.slot !== void 0 && !sameBox(root.slotRect, box);
59220
59557
  if (!root.needsSolve && !resized) return false;
59221
59558
  if (root.slot !== void 0) root.slotRect = {
@@ -59226,7 +59563,8 @@ function createReconciler(ctx, modules, fields) {
59226
59563
  };
59227
59564
  modules.layout.solve(element, box, lookup);
59228
59565
  root.needsSolve = false;
59229
- applyRects(element, quiet);
59566
+ if (root.aside !== void 0 && isAside(root.entity) && !element.live) parts.applyInParts(root, element, quiet);
59567
+ else applyRects(element, quiet);
59230
59568
  return true;
59231
59569
  }
59232
59570
  /**
@@ -59388,6 +59726,7 @@ function createReconciler(ctx, modules, fields) {
59388
59726
  for (const root of state.roots.values()) {
59389
59727
  if (state.removing.has(root.entity)) continue;
59390
59728
  const element = root.element === void 0 ? void 0 : lookup(root.element);
59729
+ parts.forgetParts(root);
59391
59730
  if (element !== void 0) {
59392
59731
  forgetSubtree(element);
59393
59732
  forgetInstances(state, element.identity);
@@ -59422,7 +59761,9 @@ function createReconciler(ctx, modules, fields) {
59422
59761
  }
59423
59762
  /**
59424
59763
  * The live scroll containers, which the frame step moves with the finger. Read from the set the
59425
- * enter fills and the exit empties, so an idle frame walks no other element.
59764
+ * enter fills and the exit empties, so an idle frame walks no other element. A scroll of a root
59765
+ * built aside waits while parts of the root wait: it is ranged, moved and settled once the root
59766
+ * is whole (spec 33 A7).
59426
59767
  *
59427
59768
  * @returns Every live element whose tag is `scroll`: the reconciler's own list, valid until the
59428
59769
  * next call.
@@ -59431,7 +59772,9 @@ function createReconciler(ctx, modules, fields) {
59431
59772
  while (scrollList.length > 0) scrollList.pop();
59432
59773
  for (const entity of state.scrolls) {
59433
59774
  const element = state.elements.get(entity);
59434
- if (element?.live === true) scrollList.push(element);
59775
+ if (element?.live !== true) continue;
59776
+ if (state.asideRoots > 0 && parts.waits(state.roots.get(element.root))) continue;
59777
+ scrollList.push(element);
59435
59778
  }
59436
59779
  return scrollList;
59437
59780
  }
@@ -59536,16 +59879,16 @@ function createReconciler(ctx, modules, fields) {
59536
59879
  }
59537
59880
  /**
59538
59881
  * The part of a scene build `ui` does, which `world` asks through `onBuild` (spec 31): done when no
59539
- * root of the build is dirty (its tree not diffed yet, or the layout engine not loaded) and none
59540
- * waits for its solve. A root whose first diff threw has no element to solve and does not hold
59541
- * the swap.
59882
+ * root of the build is dirty (its tree not diffed yet, or the layout engine not loaded), has
59883
+ * parked parts, waits for its solve or is applied in parts (spec 33 A8). A root whose first diff
59884
+ * threw has no element to solve and does not hold the swap.
59542
59885
  *
59543
59886
  * @returns True when every root built aside is reconciled and solved.
59544
59887
  */
59545
59888
  function asideBuilt() {
59546
59889
  for (const root of state.roots.values()) {
59547
59890
  const solves = root.needsSolve && root.element !== void 0 && lookup(root.element) !== void 0;
59548
- if ((root.dirty || solves) && isAside(root.entity)) return false;
59891
+ if ((root.dirty || solves || parts.waits(root)) && isAside(root.entity)) return false;
59549
59892
  }
59550
59893
  return true;
59551
59894
  }
@@ -59553,11 +59896,13 @@ function createReconciler(ctx, modules, fields) {
59553
59896
  * The first of the two systems of phase `layout`: the sweep, the roots a scene build committed, the
59554
59897
  * roots a restore asked to build again, the roots a scene placed again, the popups that may leave,
59555
59898
  * the pull of the text being typed, the scroll offsets and the windowed ranges, the bound texts
59556
- * that show a string of another size, the viewport, the dirty roots and the hosted views.
59899
+ * that show a string of another size, the viewport, the parked parts of a scene build, the dirty
59900
+ * roots and the hosted views.
59557
59901
  *
59558
59902
  * @param time - The frame's `Time`: the scrolls move by its `delta`.
59559
59903
  */
59560
59904
  function reconcile(time = NO_TIME) {
59905
+ parts.beginReconcile();
59561
59906
  sweep();
59562
59907
  state.reconciles += 1;
59563
59908
  lookWriter.pass += 1;
@@ -59575,9 +59920,10 @@ function createReconciler(ctx, modules, fields) {
59575
59920
  if (viewportChanged) state.epoch += 1;
59576
59921
  const count = dirtyRoots(viewportChanged);
59577
59922
  rendered = count;
59923
+ parts.drainParked();
59578
59924
  for (let index = 0; index < count; index += 1) {
59579
59925
  const root = dirtyList[index];
59580
- if (root !== void 0) reconcileDirtyRoot(root);
59926
+ if (root !== void 0 && !parts.holdRoot(root)) reconcileDirtyRoot(root);
59581
59927
  }
59582
59928
  hostViews(ctx, state);
59583
59929
  writeCounters();
@@ -59598,12 +59944,13 @@ function createReconciler(ctx, modules, fields) {
59598
59944
  counters.written = state.written;
59599
59945
  }
59600
59946
  /**
59601
- * The second system of phase `layout`: every root takes its slot, then one solve per marked
59602
- * root, a root in a slot after the root of its slot and in its content box, then the rects, the
59603
- * rest poses and the hooks, the scrolls settled on what the solve and the render gave them, the
59604
- * hosting of the hosts that came, a sweep of what left with nothing to wait for, and, in the swap
59605
- * frame of a scene build, the start pose of the enters it held. The hints released since the last frame step are dropped
59606
- * at its end, so the `change.Box` and `change.Transform` hooks the solve plays get the hint the
59947
+ * The second system of phase `layout`: every root takes its slot, the open applications of roots
59948
+ * built aside take their next part, then one solve per marked root, a root in a slot after the
59949
+ * root of its slot and in its content box, then the rects, the rest poses and the hooks, the
59950
+ * scrolls settled on what the solve and the render gave them, the hosting of the hosts that came,
59951
+ * a sweep of what left with nothing to wait for, and, in the swap frame of a scene build, the
59952
+ * start pose of the enters it held. The hints released since the last frame step are dropped at
59953
+ * its end, so the `change.Box` and `change.Transform` hooks the solve plays get the hint the
59607
59954
  * reconcile routed, and the next frame starts with none.
59608
59955
  *
59609
59956
  * @param time - The frame's `Time`: a scroll left moving asks for a frame only while it runs.
@@ -59612,10 +59959,12 @@ function createReconciler(ctx, modules, fields) {
59612
59959
  const viewport = modules.styles.viewport();
59613
59960
  viewportBox.w = viewport?.width ?? 0;
59614
59961
  viewportBox.h = viewport?.height ?? 0;
59962
+ parts.beginSolve();
59615
59963
  assignSlots();
59964
+ parts.applyParts();
59616
59965
  const changed = layOutRoots(viewportBox);
59617
59966
  if (changed) ctx.deps.time.wake();
59618
- if (changed || rendered > 0) modules.layout.settleScroll(scrollContainers(), lookup, time);
59967
+ if (changed || rendered > 0 || parts.hasLanded()) modules.layout.settleScroll(scrollContainers(), lookup, time);
59619
59968
  rendered = 0;
59620
59969
  settleOverlays(ctx, state, modules.layout);
59621
59970
  if (state.risen.size > 0) {
@@ -59691,6 +60040,7 @@ function createReconciler(ctx, modules, fields) {
59691
60040
  if (root === void 0 || state.removing.has(entity)) return;
59692
60041
  const element = root.element === void 0 ? void 0 : lookup(root.element);
59693
60042
  const cause = root.popup === void 0 ? ctx.deps.world.projection.causeOf(entity) ?? "change" : "change";
60043
+ parts.forgetParts(root);
59694
60044
  if (cause === "discard" || isAside(entity)) {
59695
60045
  dropRoot(root, element);
59696
60046
  return;
@@ -64805,7 +65155,7 @@ function cubicBezier(x1, y1, x2, y2) {
64805
65155
  * | assets | preloadDepth | 2 |
64806
65156
  * | assets | baseUrl | undefined |
64807
65157
  * | assets | io | undefined, the browser fetch and the renderer textures |
64808
- * | scenes | buildMs | "auto", half of a frame (500 / time.rate().fps), read at each build start; a number fixes it |
65158
+ * | scenes | buildMs | "auto", two thirds of a frame ((1000 / time.rate().fps) * 2 / 3, 11.1 ms at 60 Hz), read at each build start; a number fixes it |
64809
65159
  * | anim | maxTracks | 2000 |
64810
65160
  * | anim | reducedMotion | false |
64811
65161
  * | i18n | locale | "en" |
@@ -1,7 +1,7 @@
1
- import { $n as FeaturePlugin, Dr as Json, dr as Descriptor, gr as NodeFx, hr as Hint, sr as NodeTable, tr as AnyFlow, xr as FakeClock, yr as ClockSource } from "./types-BCI9vUA6.mjs";
2
- import { t as createApp } from "./index-BMpWPXvo.mjs";
3
- import { b as saveOf, v as WithGameState, y as memory } from "./types-B4G8sOED.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-Bx3WG3fZ.mjs";
1
+ import { $n as FeaturePlugin, Dr as Json, dr as Descriptor, gr as NodeFx, hr as Hint, sr as NodeTable, tr as AnyFlow, xr as FakeClock, yr as ClockSource } from "./types-C_dk-lXz.mjs";
2
+ import { t as createApp } from "./index-DFAjLwxi.mjs";
3
+ import { b as saveOf, v as WithGameState, y as memory } from "./types-H1FiWmKa.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-CRqMxzqv.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 { en as refuseStart, in as type, m as flattenFeatures, t as createApp, tn as exit } from "./src-ChniuNDc.mjs";
1
+ import { en as refuseStart, in as type, m as flattenFeatures, t as createApp, tn as exit } from "./src-B2vblgmb.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-Bxxl_mQX.mjs";
@@ -1,4 +1,4 @@
1
- import { An as NumericFields, Cn as TagType, Dn as Motion, Dr as Json, En as Ease, In as ViewHandle, K as TransformValue, Ln as Api$1, Nn as ReducedMotion, On as MotionCause, Y as Api$3, _r as Answer, cn as AnyComponentType, dr as Descriptor, dt as ViewportSize, fn as ComponentType, hr as Hint, jn as ProjectionMotion, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, nn as Api$2, qr as Api, ri as Require, s as Events$1, sn as AnyComponent, t as Api$4, vr as Api$5, wn as ChangeHook } from "./types-BCI9vUA6.mjs";
1
+ import { An as NumericFields, Cn as TagType, Dn as Motion, Dr as Json, En as Ease, In as ViewHandle, K as TransformValue, Ln as Api$1, Nn as ReducedMotion, On as MotionCause, Y as Api$3, _r as Answer, cn as AnyComponentType, dr as Descriptor, dt as ViewportSize, fn as ComponentType, hr as Hint, jn as ProjectionMotion, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, nn as Api$2, qr as Api, ri as Require, s as Events$1, sn as AnyComponent, t as Api$4, vr as Api$5, wn as ChangeHook } from "./types-C_dk-lXz.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";
@@ -2779,6 +2779,25 @@ type PopupLink = {
2779
2779
  released?: boolean;
2780
2780
  over?: Entity;
2781
2781
  };
2782
+ /**
2783
+ * One part of a root built aside that waits for a later frame (spec 33 A2): an element that exists
2784
+ * and whose children were not diffed yet, the nodes it would have diffed, the nearest component
2785
+ * instance and the cause its children enter with. Back in the pool it holds no element.
2786
+ */
2787
+ type Parked = {
2788
+ element: Element | undefined;
2789
+ nodes: readonly DescriptionNode[];
2790
+ instance: string | undefined;
2791
+ cause: MotionCause | undefined;
2792
+ };
2793
+ /**
2794
+ * The application of a solved root built aside, in parts (spec 33 A6): the elements still to
2795
+ * apply, the next one on top, and whether a live one takes its rect with no motion.
2796
+ */
2797
+ type ApplyCursor = {
2798
+ stack: Element[];
2799
+ quiet: boolean;
2800
+ };
2782
2801
  /**
2783
2802
  * One reconciled tree: a projection view or a popup, with the flags the frame step reads.
2784
2803
  * `covered` is true while the root is kept under another popup; every element of the root then
@@ -2787,7 +2806,8 @@ type PopupLink = {
2787
2806
  * restore or a load. `slot` is the host element the root is laid out in (`undefined` for the
2788
2807
  * viewport), `slotRect` the content box it was last solved in, in the host's own units.
2789
2808
  * `pending` is true while the solve running now still waits to lay the root out; `mountRoot`
2790
- * creates it `false`.
2809
+ * creates it `false`. A root built aside carries its parked parts in `parked` and its
2810
+ * application in parts in `applying` (spec 33 slice A).
2791
2811
  */
2792
2812
  type Root = {
2793
2813
  entity: Entity;
@@ -2815,6 +2835,12 @@ type Root = {
2815
2835
  * other root.
2816
2836
  */
2817
2837
  aside?: true;
2838
+ /**
2839
+ * The parts of a root built aside whose children wait for a later frame, in the order they were
2840
+ * parked. Made with its first part and kept, empty, after its last: a later part reuses it.
2841
+ */
2842
+ parked?: Parked[]; /** The application of a root built aside in parts, while it is open; absent otherwise. */
2843
+ applying?: ApplyCursor;
2818
2844
  };
2819
2845
  /**
2820
2846
  * Where the focus ring was last drawn: the layer and order of its root, the rect grown by the
@@ -1,5 +1,5 @@
1
- import { $ as PixiModule, A as SyncApi, An as NumericFields, Dr as Json, En as Ease, Er as Events$3, Fn as TrackSegment, Ln as Api$2, Nn as ReducedMotion, O as FilterSlot, Pn as TrackOptions, Q as PixiFilter, Ur as Events$5, Y as Api$4, b as Events$4, dr as Descriptor, et as PixiSprite, fn as ComponentType, ft as FilterCache, k as FilterSlotInputs, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, ni as Events$2, nn as Api$3, qr as Api$1, ri as Require, s as Events$1, sn as AnyComponent, t as Api$5, tt as PixiTexture, un as ComponentHandle, ur as TypeTag, ut as Point, wr as Api$6 } from "./types-BCI9vUA6.mjs";
2
- import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-k5szXqU1.mjs";
1
+ import { $ as PixiModule, A as SyncApi, An as NumericFields, Dr as Json, En as Ease, Er as Events$3, Fn as TrackSegment, Ln as Api$2, Nn as ReducedMotion, O as FilterSlot, Pn as TrackOptions, Q as PixiFilter, Ur as Events$5, Y as Api$4, b as Events$4, dr as Descriptor, et as PixiSprite, fn as ComponentType, ft as FilterCache, k as FilterSlotInputs, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, ni as Events$2, nn as Api$3, qr as Api$1, ri as Require, s as Events$1, sn as AnyComponent, t as Api$5, tt as PixiTexture, un as ComponentHandle, ur as TypeTag, ut as Point, wr as Api$6 } from "./types-C_dk-lXz.mjs";
2
+ import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-0Br0SjTB.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 { Dr as Json, Ir as Snapshot } from "./types-BCI9vUA6.mjs";
2
- import { t as HeadlessApp } from "./headless-Bx3WG3fZ.mjs";
1
+ import { Dr as Json, Ir as Snapshot } from "./types-C_dk-lXz.mjs";
2
+ import { t as HeadlessApp } from "./headless-CRqMxzqv.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -11795,7 +11795,7 @@ type SceneOwner = Owner & {
11795
11795
  *
11796
11796
  * @example
11797
11797
  * ```ts
11798
- * // The default: half of each frame, read at the start of every build: 8.33… ms at 60 Hz, 4.17 ms at 120 Hz.
11798
+ * // The default: two thirds of each frame, read at the start of every build: 11.1 ms at 60 Hz, 5.56 ms at 120 Hz.
11799
11799
  * const config: Config = { buildMs: "auto" };
11800
11800
  *
11801
11801
  * // A game on a slow phone gives the next scene a fixed 3 ms of each frame: the switch takes more frames.
@@ -11805,8 +11805,8 @@ type SceneOwner = Owner & {
11805
11805
  type Config$1 = {
11806
11806
  /**
11807
11807
  * Milliseconds per frame the next scene's building work may take on a live switch with a
11808
- * drawing renderer: a finite number above 0, or `"auto"` (the default) for half of the frame
11809
- * interval the loop runs at, `500 / time.rate().fps`, read once at the build start.
11808
+ * drawing renderer: a finite number above 0, or `"auto"` (the default) for two thirds of the
11809
+ * frame interval the loop runs at, `(1000 / time.rate().fps) * 2 / 3`, read once at the build start.
11810
11810
  */
11811
11811
  buildMs: number | "auto";
11812
11812
  };
@@ -1,7 +1,7 @@
1
- import { $ as PixiModule, $n as FeaturePlugin, Dr as Json, Lr as SnapshotOf, Mr as PlayerStateProvider, Nr as ProviderCall, Pr as SaveDoc, Tr as Config, X as Config$2, a as Config$3, d as Manifest, lt as Orientation, n as AssetsIo, tr as AnyFlow, ur as TypeTag, xr as FakeClock, yr as ClockSource, zn as Config$1 } from "./types-BCI9vUA6.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-BVSmbgJB.mjs";
3
- import { R as I18nApi, U as StringTable, W as TextKey } from "./types-k5szXqU1.mjs";
4
- import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-BMpWPXvo.mjs";
1
+ import { $ as PixiModule, $n as FeaturePlugin, Dr as Json, Lr as SnapshotOf, Mr as PlayerStateProvider, Nr as ProviderCall, Pr as SaveDoc, Tr as Config, X as Config$2, a as Config$3, d as Manifest, lt as Orientation, n as AssetsIo, tr as AnyFlow, ur as TypeTag, xr as FakeClock, yr as ClockSource, zn as Config$1 } from "./types-C_dk-lXz.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-54KzmAA6.mjs";
3
+ import { R as I18nApi, U as StringTable, W as TextKey } from "./types-0Br0SjTB.mjs";
4
+ import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-DFAjLwxi.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 { Vr as Api$3, Y as Api, nn as Api$1, vr as Api$4, wr as Api$2 } from "./types-BCI9vUA6.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-BVSmbgJB.mjs";
3
- import { N as InputApi } from "./types-k5szXqU1.mjs";
4
- import { r as Repro } from "./headless-Bx3WG3fZ.mjs";
5
- import { a as InputOf, r as ControlApp } from "./types-B6fvpFoz.mjs";
6
- import { t as commands } from "./commands-BZPrVtJT.mjs";
1
+ import { Vr as Api$3, Y as Api, nn as Api$1, vr as Api$4, wr as Api$2 } from "./types-C_dk-lXz.mjs";
2
+ import { P as AnimApi, r as UiApi } from "./types-54KzmAA6.mjs";
3
+ import { N as InputApi } from "./types-0Br0SjTB.mjs";
4
+ import { r as Repro } from "./headless-CRqMxzqv.mjs";
5
+ import { a as InputOf, r as ControlApp } from "./types-CGPWYbZO.mjs";
6
+ import { t as commands } from "./commands-CMFdiDcg.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-D0cotXHi.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-DjTJ02c3.mjs";
2
2
  export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
package/llms.txt CHANGED
@@ -520,7 +520,7 @@ The graph. Modules `runner`, `gate`, `inbox`, `fx`, `features`. Runner methods s
520
520
  ### Screen plugins (V2, built)
521
521
 
522
522
  `world`, `renderer`, `input`, `assets`, `scenes`. Each has a README at `src/plugins/<name>/README.md`; the root README lists their APIs, events and config. Rendering: WebGPU preferred, with Pixi's WebGL fallback.
523
- - `app.scenes`: `current()` the mounted scene id, `expect(id)` the scene the next node without its own `scene` mounts, a rest node or a transit node in live mode (the restore door calls it; an unknown id throws). An `over` node takes it the same way, also over another mounted scene. A live switch, before it builds the scene, warms the bundles the scene names (`assets.warm`): their textures go to the GPU `renderer.uploads` a drawn frame while the old scene is still up, so the first frame of the new scene uploads none of them; textures already there are not waited for, and a fast walk or a headless app never waits. A bundle the scene does not name (a `core` bundle of portraits the board shows) is not warmed: name it in the scene's `bundles` or call `app.assets.warm`. Then, with a drawing renderer, the next scene is built aside: its logic runs in one block, the renderer makes its Pixi views over the next frames off the stage in a budget per frame, config `scenes.buildMs: number | "auto"` (default `"auto"`, half the frame interval: 8.33 ms at 60 Hz, 4.17 ms at 120 Hz; `0` throws), and it is swapped in one frame. Until the swap `current()` answers the old scene, nothing of the new one is drawn, hit or found by `ui.find`, its `enter` motions wait and the gate stays closed, so the first tap lands on a complete scene; `scenes:changed` is emitted at the swap. A fast walk, a world that is not live and a headless app mount in one block as before.
523
+ - `app.scenes`: `current()` the mounted scene id, `expect(id)` the scene the next node without its own `scene` mounts, a rest node or a transit node in live mode (the restore door calls it; an unknown id throws). An `over` node takes it the same way, also over another mounted scene. A live switch, before it builds the scene, warms the bundles the scene names (`assets.warm`): their textures go to the GPU `renderer.uploads` a drawn frame while the old scene is still up, so the first frame of the new scene uploads none of them; textures already there are not waited for, and a fast walk or a headless app never waits. A bundle the scene does not name (a `core` bundle of portraits the board shows) is not warmed: name it in the scene's `bundles` or call `app.assets.warm`. Then, with a drawing renderer, the next scene is built aside: its ui elements are made by root and by part, laid out once and applied in parts, and the renderer makes its Pixi views, over the next frames off the stage in a budget per frame, config `scenes.buildMs: number | "auto"` (default `"auto"`, two thirds of the frame interval: 11.1 ms at 60 Hz, 5.56 ms at 120 Hz; `0` throws), and it is swapped in one frame. Until the swap `current()` answers the old scene, nothing of the new one is drawn, hit or found by `ui.find`, its `enter` motions wait and the gate stays closed, so the first tap lands on a complete scene; `scenes:changed` is emitted at the swap. A fast walk, a world that is not live and a headless app mount in one block as before.
524
524
  - `Shape({ kind, w, h, fill, fillAlpha, alpha, radius, stroke, strokeWidth, dash, clip, sweep?, cap? })` (`kind: "rect"`; `sweep` and `cap` are optional, `1` and `"round"` when left out; only an arc reads them; a rectangle or a triangle ignores them, also when an earlier arc left them on the `Shape`): a rounded rectangle, `kind: "triangle"` (fills its box pointing right) or `kind: "arc"`: a stroke on the circle inscribed in the box (`min(w, h) − strokeWidth` across, centred) from 12 o'clock clockwise over `sweep` (0..1, clamped; 0 draws nothing, 1 a closed ring), ended by `cap` (`"round" | "butt"`); an arc draws no fill and ignores `radius` and `dash`. The path is built again only when a field changes: a still arc costs nothing a frame. `Shape({ kind: "arc", w: 28, h: 28, stroke: 0xc8a15a, strokeWidth: 2.2, sweep: 0.42 })` is a slot timer's ring with 42 % left.
525
525
  - Overlays: `Overlay({ dim, dimColor, cover, hud, fade, hold })` on the root of an overlay (in `components`) keeps everything drawn before it as one picture, retaken in the frame anything in it changes, and with `cover: "opaque"` draws none of it once landed at alpha 1; `hold: true` (default `false`) holds the endless loops under it while it stands, as under a cover or a blurred picture (their phase follows time), so a dimmed sheet over a sharp scene draws no frame at rest; the engine draws the dim (`dim × level`, right under the root); the level follows the root's own enter and exit motion, `fade` (250 ms) only when it has none; level and landing are read through `app.renderer.sync.debug.overlays()`. A `backdrop: true` filter inside the kept range runs no pass while the picture stands (its look is in the picture) and is drawn again in the frame the overlay is gone. Types: `OverlayValue` (the component's value) and `HudPartValue` (a part of the HUD an overlay keeps shown or lets fade).
526
526
  - HUD: a scene layer `{ above: "overlays" }` is the HUD layer, drawn above every overlay and never in a picture; a scene with a HUD layer and no `ui` gets `ui` right under it. Its roots never take the keyboard: Escape and the Back press reach the top sheet under it. `HudPart({ key })` tags a HUD view; an overlay's `hud` (`"all"`, `"none"` or keys) names the parts that stay shown, the others fade with its level and take no tap. Keys are typed by `defineGame<{ …, hud: "energy" | "gems" }>()`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.37",
3
+ "version": "0.15.38",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [