@moku-labs/game 0.15.46 → 0.15.48

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.
Files changed (33) hide show
  1. package/dist/app/page.d.mts +1 -1
  2. package/dist/app/page.mjs +1 -1
  3. package/dist/app/system.d.mts +3 -3
  4. package/dist/app.d.mts +3 -3
  5. package/dist/app.mjs +1 -1
  6. package/dist/assets.d.mts +1 -1
  7. package/dist/{commands-DPjJykYd.d.mts → commands-4ZPA_54H.d.mts} +5 -5
  8. package/dist/control.d.mts +4 -4
  9. package/dist/{define-CweettNp.d.mts → define-Bi1cUDqV.d.mts} +2 -2
  10. package/dist/{headless-BlNxy_kO.d.mts → headless-DEvO-OYZ.d.mts} +1 -1
  11. package/dist/{index-BQh16IG6.d.mts → index-BIDag1mb.d.mts} +3 -3
  12. package/dist/index.d.mts +5 -5
  13. package/dist/index.mjs +2 -2
  14. package/dist/inspect.d.mts +6 -6
  15. package/dist/inspect.mjs +1 -1
  16. package/dist/jsx-dev-runtime.d.mts +1 -1
  17. package/dist/jsx-runtime.d.mts +1 -1
  18. package/dist/{runtime-BHmaehdl.d.mts → runtime-BBACzetr.d.mts} +2 -2
  19. package/dist/{sources-MfRpM8sV.mjs → sources-Cjrzga6S.mjs} +1 -1
  20. package/dist/{src-Bb6Sb530.mjs → src-Ddq1jS-4.mjs} +2373 -286
  21. package/dist/testing.d.mts +4 -4
  22. package/dist/testing.mjs +1 -1
  23. package/dist/{types-wYdMIjLG.d.mts → types-AIu9QkEJ.d.mts} +2 -2
  24. package/dist/{types-C4iNGaXh.d.mts → types-BA-vO4zD.d.mts} +32 -4
  25. package/dist/{types-BMQut7RK.d.mts → types-D0uITVZD.d.mts} +160 -32
  26. package/dist/{types-BjNmoeuL.d.mts → types-SbQM-OCV.d.mts} +117 -7
  27. package/dist/{types-CMZvOBAa.d.mts → types-vhOiA6D7.d.mts} +4 -4
  28. package/dist/{visual-Cl_aeC8t.d.mts → visual-BDfG9Rgh.d.mts} +6 -6
  29. package/dist/{visual-ClVRMUAi.mjs → visual-LFiLc3GH.mjs} +5 -2
  30. package/dist/visual.d.mts +1 -1
  31. package/dist/visual.mjs +1 -1
  32. package/llms.txt +2 -2
  33. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { Or as Json, Sr as FakeClock, _r as NodeFx, br as ClockSource, cr as NodeTable, er as FeaturePlugin, fr as Descriptor, gr as Hint, nr as AnyFlow } from "./types-BMQut7RK.mjs";
2
- import { t as createApp } from "./index-BQh16IG6.mjs";
3
- import { b as saveOf, v as WithGameState, y as memory } from "./types-CMZvOBAa.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-BlNxy_kO.mjs";
1
+ import { Cr as FakeClock, _r as Hint, kr as Json, lr as NodeTable, pr as Descriptor, rr as AnyFlow, tr as FeaturePlugin, vr as NodeFx, xr as ClockSource } from "./types-D0uITVZD.mjs";
2
+ import { t as createApp } from "./index-BIDag1mb.mjs";
3
+ import { b as saveOf, v as WithGameState, y as memory } from "./types-vhOiA6D7.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-DEvO-OYZ.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/clock/fake.d.ts
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-Bb6Sb530.mjs";
1
+ import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-Ddq1jS-4.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
@@ -1,5 +1,5 @@
1
- import { Lr as Snapshot, Or as Json } from "./types-BMQut7RK.mjs";
2
- import { t as HeadlessApp } from "./headless-BlNxy_kO.mjs";
1
+ import { Rr as Snapshot, kr as Json } from "./types-D0uITVZD.mjs";
2
+ import { t as HeadlessApp } from "./headless-DEvO-OYZ.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,5 +1,5 @@
1
- import { $ as PixiModule, A as SyncApi, An as NumericFields, Dr as Events$3, En as Ease, Fn as TrackSegment, Jr as Api$1, Ln as Api$2, Nn as ReducedMotion, O as FilterSlot, Or as Json, Pn as TrackOptions, Q as PixiFilter, Tr as Api$6, Wr as Events$5, Y as Api$4, b as Events$4, dr as TypeTag, et as PixiSprite, fn as ComponentType, fr as Descriptor, ft as FilterCache, ii as Require, k as FilterSlotInputs, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, nn as Api$3, ri as Events$2, s as Events$1, sn as AnyComponent, t as Api$5, tt as PixiTexture, un as ComponentHandle, ut as Point } from "./types-BMQut7RK.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-BjNmoeuL.mjs";
1
+ import { $ as PixiModule, A as SyncApi, An as MotionHandle, Dn as Ease, Er as Api$6, Fn as TrackOptions, Gr as Events$5, In as TrackSegment, O as FilterSlot, Or as Events$3, Pn as ReducedMotion, Q as PixiFilter, Rn as Api$2, Y as Api$4, Yr as Api$1, ai as Require, b as Events$4, et as PixiSprite, fn as ComponentType, fr as TypeTag, ft as FilterCache, ii as Events$2, jn as NumericFields, k as FilterSlotInputs, kr as Json, ln as AnyComponentValue, mn as Entity, nn as Api$3, pr as Descriptor, s as Events$1, sn as AnyComponent, t as Api$5, tt as PixiTexture, un as ComponentHandle, ut as Point, wn as AnchorTarget } from "./types-D0uITVZD.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-SbQM-OCV.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -2931,7 +2931,7 @@ type MusicRequest = {
2931
2931
  fadeMs: number;
2932
2932
  };
2933
2933
  declare namespace types_d_exports {
2934
- export { Config, Deps, ElementChange, ElementMotion, Finding, FocusRing, KernelSlice, State, TextInputLook, UiApi, UiCtx, UiNode };
2934
+ export { AnchorTarget, Config, Deps, ElementChange, ElementMotion, Finding, FocusRing, KernelSlice, State, TextInputLook, UiApi, UiCtx, UiNode };
2935
2935
  }
2936
2936
  /**
2937
2937
  * The look of the keyboard focus ring: a dashed ring with a solid halo under it, drawn around the
@@ -3063,7 +3063,7 @@ type UiCtx = KernelSlice & {
3063
3063
  /**
3064
3064
  * ui plugin API, `app.ui`. The screen is one more projection, so three members read it the way a
3065
3065
  * test reads the board: a snapshot, a key lookup and a list of findings; the fourth types into a
3066
- * text field, the fifth scrolls a `scroll`.
3066
+ * text field, the fifth scrolls a `scroll`, the sixth measures where a view or an element is drawn.
3067
3067
  *
3068
3068
  * @example
3069
3069
  * ```ts
@@ -3171,6 +3171,34 @@ type UiApi = {
3171
3171
  * ```
3172
3172
  */
3173
3173
  scroll(key: string, to: number): boolean;
3174
+ /**
3175
+ * Where a target is drawn, in screen reference units: the rect an `<anchor>` sits on. A ui
3176
+ * element's layout box, a nine-slice's panel, a shape's rectangle or a sprite's box, through its
3177
+ * root pose, so a fit, a slot, a scroll's offset and the motion of an ancestor move it; the
3178
+ * rotation is left out. A list gives the bounding rect of its shown targets. Not shown: the key
3179
+ * names no entity, or one leaving, built aside, of no area or drawn at alpha 0. Works in every
3180
+ * build and headless; every call answers a new object.
3181
+ *
3182
+ * @param target - A view or an element by projection and key, or a list of them.
3183
+ * @returns The rect, or `undefined` when no target is shown.
3184
+ * @example
3185
+ * ```ts
3186
+ * // The tutorial puts its hint beside the first seat of the board's order strip.
3187
+ * app.ui.rectOf({ projection: "board.strip", key: "seat0" }); // { x: 40, y: 1500, w: 116, h: 120 }
3188
+ * // The seat and the cell of the board fitted to 0.5: the rect around both.
3189
+ * app.ui.rectOf([
3190
+ * { projection: "board.strip", key: "seat0" },
3191
+ * { projection: "board.strip", key: "cell" }
3192
+ * ]); // { x: 40, y: 250, w: 680, h: 1370 }
3193
+ * app.ui.rectOf({ projection: "board.strip", key: "nowhere" }); // undefined
3194
+ * ```
3195
+ */
3196
+ rectOf(target: AnchorTarget | readonly AnchorTarget[]): Readonly<{
3197
+ x: number;
3198
+ y: number;
3199
+ w: number;
3200
+ h: number;
3201
+ }> | undefined;
3174
3202
  };
3175
3203
  //#endregion
3176
3204
  export { sequence as $, GlowValue as A, Target as B, BlurValue as C, FilterComponent as D, FilterArea as E, AnimPlayerValue as F, HAPTIC_KINDS as G, HapticKind as H, Config$3 as I, frames as J, defineAnimation as K, FramesValue as L, OutlineValue as M, UniformDeclaration as N, FilterSpec as O, AnimApi as P, play as Q, MotionKeyframe as R, AlphaValue as S, DisplacementValue as T, SfxDescriptor as U, types_d_exports$3 as V, Step as W, mark as X, haptic as Y, parallel as Z, State$2 as _, AudioApi as a, stopSfx as at, EmitterDefinition as b, MusicDescriptor as c, wait as ct, State$1 as d, set as et, VolumesFor as f, EffectsStats as g, EffectsApi as h, types_d_exports as i, stagger as it, NoiseValue as j, FilterValueOf as k, MusicOptions as l, OverlayApi as lt, Config$2 as m, State as n, spawn as nt, AudioContextLike as o, tween as ot, types_d_exports$1 as p, external as q, UiApi as r, spawned as rt, Config$1 as s, use as st, Config as t, sfx as tt, SoundEntry as u, types_d_exports$4 as ut, types_d_exports$2 as v, ColorMatrixValue as w, EmitterValue as x, EmitterConfig as y, State$3 as z };
@@ -4475,6 +4475,40 @@ type ProjectionSpec<Item, LayerName extends string, LiftName extends string, Pla
4475
4475
  * ```
4476
4476
  */
4477
4477
  readonly initialOnly?: InitialOnly<Values>;
4478
+ /**
4479
+ * The item a closed window of this projection is kept built for, so it opens in the frame after the tap. While
4480
+ * `from` does not show its key (`key(item)`, or the name of the projection without `key`), the engine builds its
4481
+ * view aside in the idle time of frames, one step a frame, and holds it hidden: never drawn, never hit, `entityOf`
4482
+ * does not answer for it. After a commit it reads `warm` again: the same content changes nothing, the same key
4483
+ * writes the difference into the held view, another key builds it again. When `from` shows that key the held view
4484
+ * is shown at once: the same entity, only what differs from the warm item is written (no `change` hook), and the
4485
+ * `enter` and `loop` hooks play as for a new view. A close plays the exit as before; the view is then built again
4486
+ * in idle frames. Only on a drawing renderer and a live world (a pause or a fast walk drops the view in work, to be
4487
+ * built again after it), and not in the frames of a motion that owns its fields (a loop and a motion that repeats
4488
+ * forever do not count); a `warm` or a `view` that throws is logged as `world:projection-failed` and nothing is held
4489
+ * until the next commit. The cost is the memory of the held view.
4490
+ * Left out, nothing is warmed.
4491
+ *
4492
+ * @param player - The `player` root of the committed state.
4493
+ * @param session - The `session` root of the committed state.
4494
+ * @returns One item of the type `from` gives; `undefined` holds nothing.
4495
+ * @example
4496
+ * ```ts
4497
+ * // The settings sheet of a game: its main page is built while the board shows.
4498
+ * export const settingsSheet = projection({
4499
+ * name: "settings.sheet",
4500
+ * layer: "ui",
4501
+ * from: (player: Player, session: Session) =>
4502
+ * session.sheet?.kind === "settings" ? [settingsModel(player, session, tables)] : [],
4503
+ * key: sheet => sheet.id,
4504
+ * view: sheet => settingsView(sheet),
4505
+ * warm: (player, session) => settingsModel(player, { ...session, sheet: { kind: "settings", page: "main" } }, tables)
4506
+ * });
4507
+ * // The tap commits session.sheet = { kind: "settings", page: "main" }: the next frame shows the held sheet,
4508
+ * // nothing is built and its Tree is not written again.
4509
+ * ```
4510
+ */
4511
+ warm?(player: Player, session: Session): NoInfer<Item>;
4478
4512
  };
4479
4513
  /**
4480
4514
  * A projection spec with its item and layer types erased, as the world stores it.
@@ -4498,7 +4532,8 @@ type AnyProjectionSpec = {
4498
4532
  key?(item: unknown): string;
4499
4533
  view(item: unknown): ViewOutput;
4500
4534
  readonly motion?: AnyProjectionMotion; /** The `initialOnly` pairs, their field names no longer tied to the component. */
4501
- readonly initialOnly?: readonly (readonly [ComponentHandle<object>, readonly string[]])[];
4535
+ readonly initialOnly?: readonly (readonly [ComponentHandle<object>, readonly string[]])[]; /** The item a closed window is kept built for, its type erased as `from`'s. */
4536
+ warm?(player: Json, session: Json): unknown;
4502
4537
  };
4503
4538
  /**
4504
4539
  * Why a reconcile runs. Merged over the frame; the cause table decides play or direct. A
@@ -4588,6 +4623,11 @@ type Track = {
4588
4623
  * additive track drives no component: a settle may bring the component home under it.
4589
4624
  */
4590
4625
  additive: boolean;
4626
+ /**
4627
+ * Whether the track repeats forever (`repeat: "forever"`): it never ends, so the warm step does not wait for it to
4628
+ * end, as for a loop.
4629
+ */
4630
+ forever: boolean;
4591
4631
  };
4592
4632
  /**
4593
4633
  * The rest pose of one entity, by component name: the last output of `view(item)` for a view, or
@@ -4607,6 +4647,20 @@ type ProjectionKey = {
4607
4647
  projection: string;
4608
4648
  key: string;
4609
4649
  };
4650
+ /**
4651
+ * What an `<anchor>` sits on and `app.ui.rectOf` measures: a view or a ui element by its
4652
+ * projection and key. A ui element is keyed under the projection of its root.
4653
+ *
4654
+ * @example
4655
+ * ```ts
4656
+ * // The first seat of the board's order strip, the tutorial's window sits on it.
4657
+ * const seat: AnchorTarget = { projection: "board.strip", key: "seat0" };
4658
+ * ```
4659
+ */
4660
+ type AnchorTarget = {
4661
+ projection: string;
4662
+ key: string;
4663
+ };
4610
4664
  /**
4611
4665
  * What the next reconcile has to do: why it runs, which roots changed and whether `view` is
4612
4666
  * forced for every item.
@@ -4687,6 +4741,52 @@ type ProjectionState = {
4687
4741
  sweptDespawns: number; /** The running build of the next scene; absent when none runs, never written as `undefined`. */
4688
4742
  building?: Building; /** The `onBuild` checks: every one answers true before `built()` does. Kept across builds. */
4689
4743
  buildChecks: Array<() => boolean>;
4744
+ /**
4745
+ * The game clock at the start of this frame (world's `input` phase), or at the start of a scene build in its own
4746
+ * frame: what `left()` counts from, for a scene build and a warm window alike.
4747
+ */
4748
+ frameStart: number; /** The warm record of every mounted projection that declares `warm`, by projection name. */
4749
+ warm: Map<string, WarmRecord>; /** The same records in mounted order: the order the warm step takes them in. */
4750
+ warmList: WarmRecord[];
4751
+ /**
4752
+ * Every entity a warm record holds hidden: its view, the entities `adopt` marked for it, and the elements a plugin
4753
+ * registered a key for under its projection while it is closed. One lookup in `isBuilding`. An entity that is gone
4754
+ * leaves it in the sweep after its despawn.
4755
+ */
4756
+ warmHeld: Set<Entity>; /** The record whose held view is being built now; absent when none is, never written as `undefined`. */
4757
+ warmActive?: WarmRecord;
4758
+ /**
4759
+ * The warm step may find work: a record went cold, or a commit came since the step last found none. A frame at rest
4760
+ * reads it and `warmActive` and returns.
4761
+ */
4762
+ warmStale: boolean; /** Milliseconds per frame the building of a warm view may take, read from the frame rate when the work starts. */
4763
+ warmBudgetMs: number;
4764
+ };
4765
+ /**
4766
+ * Where a warm record stands: nothing held (`"cold"`), its view held and still built by ui and the renderer
4767
+ * (`"building"`), held and done (`"ready"`), or shown by `from` (`"shown"`), when the view lives in `mounted`.
4768
+ */
4769
+ type WarmPhase = "cold" | "building" | "ready" | "shown";
4770
+ /**
4771
+ * The warm window of one mounted projection: the item `warm` gave, and the view of it held hidden until `from` shows
4772
+ * its key. A record lives while its projection is mounted; its view is spawned, patched and dropped in place.
4773
+ */
4774
+ type WarmRecord = {
4775
+ /** The projection. */name: string; /** The key of the held item; absent while nothing is held. */
4776
+ key?: string; /** The item the held view was built or last patched for; absent while nothing is held. */
4777
+ item?: unknown; /** The held view: never in `mounted.live` until `from` shows its key; absent while nothing is held. */
4778
+ view?: View$1;
4779
+ /**
4780
+ * The held view's entity, the entities `adopt` marked for it and the elements registered under its projection while
4781
+ * it is closed; emptied when the view is shown or dropped. An entity that is gone leaves it in the sweep.
4782
+ */
4783
+ entities: Set<Entity>;
4784
+ phase: WarmPhase;
4785
+ /**
4786
+ * The state `warm` was last read against: the step reads it again only after a commit. Kept when `warm` or `view`
4787
+ * threw, so a throw is logged once per commit and not every frame.
4788
+ */
4789
+ seen?: Snapshot;
4690
4790
  };
4691
4791
  /**
4692
4792
  * The build of the next scene aside (spec 31): its projections mounted into a table of their own, so a name never has
@@ -4698,8 +4798,7 @@ type Building = {
4698
4798
  layers: ReadonlyArray<LayerSpec>; /** Who owns the entities of the projections the build mounts. */
4699
4799
  owner: Owner; /** The projections only the coming list names, mounted aside until the commit moves them into `mounted`. */
4700
4800
  mounted: Map<string, Mounted>; /** Every entity of the build: the views it spawned and the entities `adopt` marked. */
4701
- entities: Set<Entity>; /** The game clock at the start of this frame (world's `input` phase), or at the build start in its own frame. */
4702
- frameStart: number; /** Milliseconds per frame the building work may take. */
4801
+ entities: Set<Entity>; /** Milliseconds per frame the building work may take. */
4703
4802
  budgetMs: number;
4704
4803
  /**
4705
4804
  * Whether a reconcile passed over a mounted projection the coming list drops, which keeps what it showed when the
@@ -4874,9 +4973,10 @@ type ProjectionApi = {
4874
4973
  */
4875
4974
  lift(entity: Entity, on: boolean): void;
4876
4975
  /**
4877
- * The projection and key of an entity. Also answers for a view in the despawn queue and for an
4878
- * element registered with `registerKey`. A view answers the address it keeps for its life, the
4879
- * same frozen object every call, so asking every frame allocates nothing.
4976
+ * The projection and key of an entity. Also answers for a view in the despawn queue, for the view
4977
+ * a warm window holds hidden and for an element registered with `registerKey`. A view answers the
4978
+ * address it keeps for its life, the same frozen object every call, so asking every frame
4979
+ * allocates nothing.
4880
4980
  *
4881
4981
  * @param entity - The entity to ask about.
4882
4982
  * @returns The projection name and the key, or `undefined`.
@@ -4954,8 +5054,8 @@ type ProjectionApi = {
4954
5054
  */
4955
5055
  restOf<Value extends object>(entity: Entity, component: ComponentType<Value>): Value | undefined;
4956
5056
  /**
4957
- * The entity of one key of one projection: a live view, never the despawn queue, or an element
4958
- * a plugin above registered under that key.
5057
+ * The entity of one key of one projection: a live view, never the despawn queue and never the
5058
+ * view a warm window holds hidden, or an element a plugin above registered under that key.
4959
5059
  *
4960
5060
  * @param projection - Name of the projection.
4961
5061
  * @param key - The model key.
@@ -4971,7 +5071,8 @@ type ProjectionApi = {
4971
5071
  entityOf(projection: string, key: string): Entity | undefined;
4972
5072
  /**
4973
5073
  * The live view entities of a mounted projection, in the order of its model keys. A view that
4974
- * plays its exit is left out, and so is an element registered with `registerKey`. A projection
5074
+ * plays its exit is left out, and so are the view a warm window holds hidden and an element
5075
+ * registered with `registerKey`. A projection
4975
5076
  * the running build mounts answers its building views (`isBuilding` tells them apart), so a host
4976
5077
  * of the coming scene can take them before the swap. Every call hands out a new array.
4977
5078
  *
@@ -5044,7 +5145,10 @@ type ProjectionApi = {
5044
5145
  * Gives an entity a projection and key of its own, so `entityOf` and `keyOf` answer for it next
5045
5146
  * to the live views. That is how an element becomes a target for `anim`, `input` and `guide`.
5046
5147
  * A key whose entity is gone is dropped in the next live frame, also when the remover was never
5047
- * called.
5148
+ * called. An element registered while the projection's warm window is held and the projection
5149
+ * shows no live view belongs to the held root (a row its list ranged in after it was built): it
5150
+ * is held with the window, `isBuilding` answers true and `entityOf` nothing until the open. A
5151
+ * projection that shows other keys live while it warms one is not covered: its elements answer.
5048
5152
  *
5049
5153
  * @param projection - Name the element is addressed under.
5050
5154
  * @param key - Key the element is addressed under.
@@ -5059,6 +5163,10 @@ type ProjectionApi = {
5059
5163
  *
5060
5164
  * world.projection.entityOf("hud", "coins"); // the entity of the counter
5061
5165
  * drop(); // the element left the screen
5166
+ *
5167
+ * // A row the shop's list ranges in while the shop is closed and held warm.
5168
+ * world.projection.registerKey("shop.sheet", "w15", row);
5169
+ * world.projection.entityOf("shop.sheet", "w15"); // undefined until the shop opens
5062
5170
  * ```
5063
5171
  */
5064
5172
  registerKey(projection: string, key: string, entity: Entity): () => void;
@@ -5187,9 +5295,12 @@ type ProjectionApi = {
5187
5295
  */
5188
5296
  discard(): void;
5189
5297
  /**
5190
- * Milliseconds of building budget left in this frame: the build's `budgetMs` minus the game clock time since the
5191
- * frame started (read at the start of world's `input` phase). The clock counts whole milliseconds. Negative once
5192
- * the frame spent more; `Infinity` with no build. Allocates nothing.
5298
+ * Milliseconds of building budget left in this frame, for what is built aside or held warm: the budget minus the
5299
+ * game clock time since the frame started (read at the start of world's `input` phase). The budget is the scene
5300
+ * build's `budgetMs`, or while a warm window is built two thirds of the frame interval the loop runs at,
5301
+ * `(1000 / fps) * 2 / 3`. The clock counts whole milliseconds. Negative once the frame spent more; `Infinity` while
5302
+ * nothing is built, also while warm windows rest built, and in a world that is not live: a pause or a fast walk drops
5303
+ * the warm window in work. Allocates nothing.
5193
5304
  *
5194
5305
  * @returns The milliseconds left, or `Infinity`.
5195
5306
  * @example
@@ -5198,22 +5309,25 @@ type ProjectionApi = {
5198
5309
  * const projection = ctx.require(worldPlugin).projection;
5199
5310
  * projection.left(); // 3: 1 ms of the 4 ms budget is spent
5200
5311
  * projection.left(); // -1 after 4 ms more of views: the rest waits for the next frame
5312
+ * projection.left(); // ≈ 9.1 at 60 fps, 2 ms into a frame that builds the warm settings sheet
5201
5313
  * ```
5202
5314
  */
5203
5315
  left(): number;
5204
5316
  /**
5205
- * Whether an entity belongs to the running build: a view it spawned, or an entity `adopt` marked. A view is flagged
5206
- * before the `onAdded` hooks of its components, so a hook can ask. One set lookup; false with no build and after the
5207
- * commit. Allocates nothing.
5317
+ * Whether an entity is built aside or held warm: a view the running build spawned, the view a warm window holds
5318
+ * hidden (`warm` of a projection), an entity `adopt` marked for either, or an element registered with `registerKey`
5319
+ * for a closed warm window. Such an entity is not drawn, not hit and not found until it is shown. A view is flagged before the `onAdded` hooks of its components, so a hook can ask.
5320
+ * Two set lookups; false after the commit of the build and once `from` shows the warm view. Allocates nothing.
5208
5321
  *
5209
5322
  * @param entity - The entity to ask about.
5210
- * @returns True for an entity of the running build.
5323
+ * @returns True for an entity built aside or held warm.
5211
5324
  * @example
5212
5325
  * ```ts
5213
5326
  * // The renderer pass sorts the views of the coming scene out of its live work.
5214
5327
  * const projection = ctx.require(worldPlugin).projection;
5215
5328
  * projection.isBuilding(1_048_600); // true: a board item the build spawned
5216
5329
  * projection.isBuilding(1_048_576); // false: a ward bed on screen
5330
+ * projection.isBuilding(1_048_640); // true: the settings sheet, held warm while closed
5217
5331
  *
5218
5332
  * // A game plugin keeps one board root: the root of the board built aside is not a second one.
5219
5333
  * ctx.require(worldPlugin).ecs.onAdded(Tree, entity => {
@@ -5224,7 +5338,8 @@ type ProjectionApi = {
5224
5338
  isBuilding(entity: Entity): boolean;
5225
5339
  /**
5226
5340
  * Registers one part of the build that has to be done before the swap: `built()` answers true only when every
5227
- * registered check does. A registration stays across builds.
5341
+ * registered check does. A registration stays across builds. The same checks tell when a warm window's held view is
5342
+ * built, and a world with no check (no drawing plugin) warms nothing.
5228
5343
  *
5229
5344
  * @param check - Answers true when the caller's part of the running build is done.
5230
5345
  * @returns The remover; calling it twice is safe.
@@ -5238,9 +5353,10 @@ type ProjectionApi = {
5238
5353
  */
5239
5354
  onBuild(check: () => boolean): () => void;
5240
5355
  /**
5241
- * Marks an entity another plugin spawned for a building root as building, so `isBuilding` answers for the whole
5242
- * tree and `discard` despawns it with the rest. Does nothing with no build; the commit clears the mark with every
5243
- * other.
5356
+ * Marks an entity another plugin spawned for a root built aside or held warm, so `isBuilding` answers for the whole
5357
+ * tree and a discard despawns it with the rest. It joins the running scene build, else the warm window being built
5358
+ * now; does nothing when neither runs. The commit of the build, and the open of the window, clear the mark with
5359
+ * every other.
5244
5360
  *
5245
5361
  * @param entity - The entity to mark.
5246
5362
  * @example
@@ -5249,7 +5365,7 @@ type ProjectionApi = {
5249
5365
  * const world = ctx.require(worldPlugin);
5250
5366
  * const button = world.ecs.spawn({ kind: "plugin", name: "ui" }, []);
5251
5367
  * world.projection.adopt(button);
5252
- * world.projection.isBuilding(button); // true until the commit
5368
+ * world.projection.isBuilding(button); // true until the commit, or until the warm sheet it belongs to opens
5253
5369
  * ```
5254
5370
  */
5255
5371
  adopt(entity: Entity): void;
@@ -5271,11 +5387,18 @@ type ProjectionInternal = {
5271
5387
  reconcileIfDirty(): void;
5272
5388
  /**
5273
5389
  * Records the moment a frame starts, for the budget `left()` counts down. Runs first in `time`
5274
- * phase `input`, with the moment `Now` gets; a frame without a build only reads a field.
5390
+ * phase `input`, with the moment `Now` gets; one number written.
5275
5391
  *
5276
5392
  * @param now - The game clock at the start of the frame.
5277
5393
  */
5278
5394
  startFrame(now: number): void;
5395
+ /**
5396
+ * One step of the warm windows, in `time` phase `input` after the reconcile: the checks of the
5397
+ * record being built are polled, or the next record is built, patched or dropped. Only in a
5398
+ * live world with no scene build, a drawing plugin and no motion that owns its fields; at rest
5399
+ * it reads two fields and returns.
5400
+ */
5401
+ stepWarm(): void;
5279
5402
  /**
5280
5403
  * Empties the hint buffer. Runs once per frame, reconcile or not.
5281
5404
  */
@@ -10439,9 +10562,9 @@ type View = {
10439
10562
  hiddenTop: number; /** The HUD factor an overlay fades this view with (a `HudPart`), 1 for every other view (spec 22 O7). */
10440
10563
  hud: number;
10441
10564
  /**
10442
- * A held top of a scene build (spec 31): a view of the next scene with no parent, or with a live parent, built while
10443
- * the current scene stays drawn. It hangs nowhere in the stage, is listed in `SyncState.heldViews`, and is attached
10444
- * in the pass after the commit.
10565
+ * A held top of a scene build (spec 31) or of a warm window (spec 33, slice B+D): a view of the next scene, or of a
10566
+ * closed window, with no parent or with a live parent, built while the current scene stays drawn. It hangs nowhere
10567
+ * in the stage, is listed in `SyncState.heldViews`, and is attached in the pass after the commit or the open.
10445
10568
  */
10446
10569
  held: boolean;
10447
10570
  };
@@ -11766,13 +11889,18 @@ type AsideQueue = {
11766
11889
  made: number;
11767
11890
  };
11768
11891
  /**
11769
- * The held tops of a scene build, in the order they were made (spec 31): dense, from 0 to `count`. A slot whose view
11770
- * went, or that hangs under a building parent by now, is stale and skipped. Not `held`, the unseen cache of the
11771
- * loops. Private to `sync`.
11892
+ * The held tops of a scene build and of warm windows, in the order they were made (spec 31, spec 33 slice B+D):
11893
+ * dense, from 0 to `count`. A slot whose view went, or that hangs under a building parent by now, is stale and dropped
11894
+ * at the next scan. Not `held`, the unseen cache of the loops. Private to `sync`.
11772
11895
  */
11773
11896
  type HeldViews = {
11774
11897
  entities: Entity[];
11775
- count: number; /** The dev check named a building view under the stage in this build: named once. */
11898
+ count: number;
11899
+ /**
11900
+ * `world.projection.membershipVersion()` at the last scan of the list, or at the first top of an empty one. Every
11901
+ * end of a build moves it: the list is looked at again only after a move.
11902
+ */
11903
+ version: number; /** The dev check named a building view under the stage in this build: named once. */
11776
11904
  reported: boolean;
11777
11905
  };
11778
11906
  /**
@@ -11859,7 +11987,7 @@ type SyncState = {
11859
11987
  passesVersion: number; /** The filtered views' passes of `renderPassesOf`, counted at `passesVersion` `at` under `root`. */
11860
11988
  passes: PassCount; /** The name of the scene's HUD layer (`above: "overlays"`), kept with the layers; `undefined` without one. */
11861
11989
  hudLayer: string | undefined; /** The building entities waiting for their view (spec 31). */
11862
- aside: AsideQueue; /** The held tops of the scene build, attached in the pass after its commit (spec 31). */
11990
+ aside: AsideQueue; /** The held tops of the scene build and of warm windows, attached in the pass after their commit or open (spec 31, 33). */
11863
11991
  heldViews: HeldViews; /** The picture of a scene being left: the running look and the engine's objects (spec 33, slice A2). */
11864
11992
  leave: LeaveState;
11865
11993
  cleanups: Array<() => void>;
@@ -13393,4 +13521,4 @@ type BundleCompanion = {
13393
13521
  unload(bundle: string): void;
13394
13522
  };
13395
13523
  //#endregion
13396
- export { PixiModule as $, FeatureDescription as $n, ThermalReading as $r, ShaderWhat as $t, SyncApi as A, NumericFields as An, State$6 as Ar, PerfChange as At, ShapeValue as B, EmitterIdOf as Bn, RngApi as Br, PerfLongFrameLine as Bt, SceneSpec as C, TagType as Cn, State$5 as Cr, PERF_CAUSES as Ct, DebugSwitches as D, Motion as Dn, Events$5 as Dr, PassKind as Dt, types_d_exports$1 as E, Ease as En, Config$6 as Er, PROBLEM_RULES as Et, NineSliceValue as F, TrackSegment as Fn, SaveDoc as Fr, PerfEventLine as Ft, Transform as G, TextStylesOf as Gn, PauseReason as Gr, PerfStartupLine as Gt, SpriteBlend as H, HudKeysOf as Hn, Api$6 as Hr, PerfMeasured as Ht, Overlay as I, ViewHandle as In, SaveUnreadableError as Ir, PerfEventName as It, AdaptiveScale as J, defineFlow as Jn, Api$7 as Jr, PoolTrimDetail as Jt, TransformValue as K, types_d_exports$4 as Kn, State$7 as Kr, PerfTelemetryLine as Kt, OverlayValue as L, Api$3 as Ln, Snapshot as Lr, PerfGapLine as Lt, HudPart as M, ProjectionSpec as Mn, Patch as Mr, PerfCollectorLine as Mt, HudPartValue as N, ReducedMotion as Nn, PlayerStateProvider as Nr, PerfCounts as Nt, FilterSlot as O, MotionCause as On, Json as Or, PassRecord as Ot, NineSlice$1 as P, TrackOptions as Pn, ProviderCall as Pr, PerfDisplay as Pt, PixiFilter as Q, type as Qn, State$8 as Qr, ShaderEventDetail as Qt, Parent as R, BundlesOf as Rn, SnapshotOf as Rr, PerfHeaderLine as Rt, SceneDefinition as S, SystemFor as Sn, FakeClock as Sr, OverlayWhat as St, State$1 as T, DescriptionNode as Tn, Api$5 as Tr, PERF_LOG_VERSION as Tt, SpriteOptions as U, Position as Un, Config$7 as Ur, PerfSampleLine as Ut, Sprite as V, GameTypes as Vn, RngState as Vr, PerfMarkLine as Vt, SpriteValue as W, State$4 as Wn, Events$6 as Wr, PerfSpikeLine as Wt, Config$2 as X, slot as Xn, FrameRate as Xr, ProblemRule as Xt, Api$1 as Y, exit as Yn, Config$8 as Yr, ProblemEventDetail as Yt, MonitorConfig as Z, to as Zn, RateChange as Zr, SHADER_WHATS as Zt, AnySceneProjection as _, Mut as _n, NodeFx as _r, FrameRing as _t, Config as a, State$3 as an, FlowGraph as ar, types_d_exports$2 as at, Events$1 as b, ResourceType as bn, ClockSource as br, MonitorSections as bt, LoadBundles as c, AnyComponentType as cn, NodeTable as cr, RenderStats as ct, Manifest as d, ComponentSchema as dn, TypeTag as dr, ViewportSize as dt, Time as ei, WarmDetail as en, FeaturePlugin as er, PixiSprite as et, ReadyBundles as f, ComponentType as fn, Descriptor as fr, FilterCache as ft, types_d_exports as g, FrameDiff as gn, Hint as gr, FrameRecord as gt, Usage as h, EntitySnapshot as hn, GuideOptions as hr, FrameReadout as ht, BundleSpec as i, Require as ii, Explained as in, DefineNode as ir, Under as it, Display as j, ProjectionMotion as jn, types_d_exports$6 as jr, PerfChangeEntry as jt, FilterSlotInputs as k, MotionHandle as kn, Root as kr, PerfCause as kt, LoadReason as l, AnyComponentValue as ln, RouteStep as lr, Orientation as lt, Tier as m, Entity as mn, EffectOptions as mr, FrameReadResult as mt, AssetsIo as n, Config$9 as ni, Api$2 as nn, AnyFlow as nr, PoolTrim as nt, DefineBundles as o, types_d_exports$3 as on, FlowState as or, Captured as ot, State as p, ComponentValue as pn, Effect as pr, FrameColumns as pt, sprite as q, contribution as qn, types_d_exports$7 as qr, PerfThermalLine as qt, BundleMap as r, Events$8 as ri, Config$3 as rn, Bookmark as rr, State$2 as rt, Events as s, AnyComponent as sn, JournalEntry as sr, MonitorCounts as st, Api as t, types_d_exports$8 as ti, DEMAND_REASONS as tn, FeatureTree as tr, PixiTexture as tt, LoadResult as u, ComponentHandle as un, SceneIdOf as ur, Point as ut, Config$1 as v, Narrowed as vn, Answer as vr, LongFrameEntry as vt, ScenesApi as w, ChangeHook as wn, types_d_exports$5 as wr, PERF_GAP_BUCKETS as wt, LayerMap as x, SystemDefinition as xn, Config$5 as xr, OverlayEventDetail as xt, DefineScene as y, QueryTerm as yn, Api$4 as yr, MONITOR_SECTIONS as yt, Shape as z, Config$4 as zn, StoreApi as zr, PerfLogLine as zt };
13524
+ export { PixiModule as $, type as $n, State$8 as $r, ShaderWhat as $t, SyncApi as A, MotionHandle as An, Root as Ar, PerfChange as At, ShapeValue as B, Config$4 as Bn, StoreApi as Br, PerfLongFrameLine as Bt, SceneSpec as C, TagType as Cn, FakeClock as Cr, PERF_CAUSES as Ct, DebugSwitches as D, Ease as Dn, Config$6 as Dr, PassKind as Dt, types_d_exports$1 as E, DescriptionNode as En, Api$5 as Er, PROBLEM_RULES as Et, NineSliceValue as F, TrackOptions as Fn, ProviderCall as Fr, PerfEventLine as Ft, Transform as G, State$4 as Gn, Events$6 as Gr, PerfStartupLine as Gt, SpriteBlend as H, GameTypes as Hn, RngState as Hr, PerfMeasured as Ht, Overlay as I, TrackSegment as In, SaveDoc as Ir, PerfEventName as It, AdaptiveScale as J, contribution as Jn, types_d_exports$7 as Jr, PoolTrimDetail as Jt, TransformValue as K, TextStylesOf as Kn, PauseReason as Kr, PerfTelemetryLine as Kt, OverlayValue as L, ViewHandle as Ln, SaveUnreadableError as Lr, PerfGapLine as Lt, HudPart as M, ProjectionMotion as Mn, types_d_exports$6 as Mr, PerfCollectorLine as Mt, HudPartValue as N, ProjectionSpec as Nn, Patch as Nr, PerfCounts as Nt, FilterSlot as O, Motion as On, Events$5 as Or, PassRecord as Ot, NineSlice$1 as P, ReducedMotion as Pn, PlayerStateProvider as Pr, PerfDisplay as Pt, PixiFilter as Q, to as Qn, RateChange as Qr, ShaderEventDetail as Qt, Parent as R, Api$3 as Rn, Snapshot as Rr, PerfHeaderLine as Rt, SceneDefinition as S, SystemFor as Sn, Config$5 as Sr, OverlayWhat as St, State$1 as T, ChangeHook as Tn, types_d_exports$5 as Tr, PERF_LOG_VERSION as Tt, SpriteOptions as U, HudKeysOf as Un, Api$6 as Ur, PerfSampleLine as Ut, Sprite as V, EmitterIdOf as Vn, RngApi as Vr, PerfMarkLine as Vt, SpriteValue as W, Position as Wn, Config$7 as Wr, PerfSpikeLine as Wt, Config$2 as X, exit as Xn, Config$8 as Xr, ProblemRule as Xt, Api$1 as Y, defineFlow as Yn, Api$7 as Yr, ProblemEventDetail as Yt, MonitorConfig as Z, slot as Zn, FrameRate as Zr, SHADER_WHATS as Zt, AnySceneProjection as _, Mut as _n, Hint as _r, FrameRing as _t, Config as a, Require as ai, State$3 as an, DefineNode as ar, types_d_exports$2 as at, Events$1 as b, ResourceType as bn, Api$4 as br, MonitorSections as bt, LoadBundles as c, AnyComponentType as cn, JournalEntry as cr, RenderStats as ct, Manifest as d, ComponentSchema as dn, SceneIdOf as dr, ViewportSize as dt, ThermalReading as ei, WarmDetail as en, FeatureDescription as er, PixiSprite as et, ReadyBundles as f, ComponentType as fn, TypeTag as fr, FilterCache as ft, types_d_exports as g, FrameDiff as gn, GuideOptions as gr, FrameRecord as gt, Usage as h, EntitySnapshot as hn, EffectOptions as hr, FrameReadout as ht, BundleSpec as i, Events$8 as ii, Explained as in, Bookmark as ir, Under as it, Display as j, NumericFields as jn, State$6 as jr, PerfChangeEntry as jt, FilterSlotInputs as k, MotionCause as kn, Json as kr, PerfCause as kt, LoadReason as l, AnyComponentValue as ln, NodeTable as lr, Orientation as lt, Tier as m, Entity as mn, Effect as mr, FrameReadResult as mt, AssetsIo as n, types_d_exports$8 as ni, Api$2 as nn, FeatureTree as nr, PoolTrim as nt, DefineBundles as o, types_d_exports$3 as on, FlowGraph as or, Captured as ot, State as p, ComponentValue as pn, Descriptor as pr, FrameColumns as pt, sprite as q, types_d_exports$4 as qn, State$7 as qr, PerfThermalLine as qt, BundleMap as r, Config$9 as ri, Config$3 as rn, AnyFlow as rr, State$2 as rt, Events as s, AnyComponent as sn, FlowState as sr, MonitorCounts as st, Api as t, Time as ti, DEMAND_REASONS as tn, FeaturePlugin as tr, PixiTexture as tt, LoadResult as u, ComponentHandle as un, RouteStep as ur, Point as ut, Config$1 as v, Narrowed as vn, NodeFx as vr, LongFrameEntry as vt, ScenesApi as w, AnchorTarget as wn, State$5 as wr, PERF_GAP_BUCKETS as wt, LayerMap as x, SystemDefinition as xn, ClockSource as xr, OverlayEventDetail as xt, DefineScene as y, QueryTerm as yn, Answer as yr, MONITOR_SECTIONS as yt, Shape as z, BundlesOf as zn, SnapshotOf as zr, PerfLogLine as zt };
@@ -1,4 +1,4 @@
1
- import { An as NumericFields, Cn as TagType, Dn as Motion, En as Ease, In as ViewHandle, Jr as Api, K as TransformValue, Ln as Api$1, Nn as ReducedMotion, On as MotionCause, Or as Json, Y as Api$3, cn as AnyComponentType, dt as ViewportSize, fn as ComponentType, fr as Descriptor, gr as Hint, ii as Require, jn as ProjectionMotion, kn as MotionHandle, ln as AnyComponentValue, mn as Entity, nn as Api$2, s as Events$1, sn as AnyComponent, t as Api$4, vr as Answer, wn as ChangeHook, yr as Api$5 } from "./types-BMQut7RK.mjs";
1
+ import { An as MotionHandle, Cn as TagType, Dn as Ease, K as TransformValue, Ln as ViewHandle, Mn as ProjectionMotion, On as Motion, Pn as ReducedMotion, Rn as Api$1, Tn as ChangeHook, Y as Api$3, Yr as Api, _r as Hint, ai as Require, br as Api$5, cn as AnyComponentType, dt as ViewportSize, fn as ComponentType, jn as NumericFields, kn as MotionCause, kr as Json, ln as AnyComponentValue, mn as Entity, nn as Api$2, pr as Descriptor, s as Events$1, sn as AnyComponent, t as Api$4, wn as AnchorTarget, yr as Answer } from "./types-D0uITVZD.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";
@@ -2209,7 +2209,35 @@ type InputProps = CommonProps & {
2209
2209
  textStyle?: InputTextStyle;
2210
2210
  };
2211
2211
  /**
2212
- * The thirteen tags a screen is written with.
2212
+ * What an anchor sits on: one view or element by its projection and key, or a list of them, whose
2213
+ * shown ones it spans.
2214
+ */
2215
+ type AnchorTo = (AnchorTarget | readonly AnchorTarget[]) & Brand<"AnchorTo">;
2216
+ /** How far an anchor reaches past its targets on each side, in its root's units; 0 by default. */
2217
+ type AnchorPad = number & Brand<"AnchorPad">;
2218
+ /**
2219
+ * What an anchor takes: the common props, `to` and `pad`. Its rect is the drawn rect of its
2220
+ * targets, padded, in the frame they are laid out, and its children lay out inside it; its style
2221
+ * gives its look, and a `width`, `height` or `position` there is ignored (`ui:anchor-style`, dev
2222
+ * builds). While no target is shown it is not drawn and takes no tap. Its `change.Box` motion plays
2223
+ * only when its targets change: a new `to`, or keys that name other entities.
2224
+ *
2225
+ * @example
2226
+ * ```tsx
2227
+ * // The tutorial's window sits on the first seat of the board's order strip, 4 u outside it.
2228
+ * <anchor key="window" to={{ projection: "board.strip", key: "seat0" }} pad={4}>
2229
+ * <stack key="rim" style={{ nineSlice: "tutorial.rim", hollow: true, width: "100%", height: "100%" }} />
2230
+ * </anchor>;
2231
+ * // the seat is drawn at { x: 40, y: 1500, w: 116, h: 120 }
2232
+ * app.ui.rectOf({ projection: "tutorial", key: "window" }); // { x: 36, y: 1496, w: 124, h: 128 }
2233
+ * ```
2234
+ */
2235
+ type AnchorProps = CommonProps & {
2236
+ to: AnchorTo;
2237
+ pad?: AnchorPad;
2238
+ };
2239
+ /**
2240
+ * The fourteen tags a screen is written with.
2213
2241
  *
2214
2242
  * @example
2215
2243
  * ```ts
@@ -2230,6 +2258,7 @@ type UiIntrinsicElements = {
2230
2258
  button: ButtonTagProps;
2231
2259
  scroll: ScrollProps;
2232
2260
  input: InputProps;
2261
+ anchor: AnchorProps;
2233
2262
  };
2234
2263
  /**
2235
2264
  * The props of one tag with its `style` narrowed to the asset keys of one game, so a nine-slice
@@ -2830,9 +2859,9 @@ type Root = {
2830
2859
  } | undefined;
2831
2860
  pending?: boolean;
2832
2861
  /**
2833
- * Present from the reconcile that found the root in the scene `world` builds aside (spec 31)
2834
- * until the reconcile that finds it committed, which gives the slots out again. Absent on every
2835
- * other root.
2862
+ * Present from the reconcile that found the root in the scene `world` builds aside (spec 31), or
2863
+ * held warm (spec 33 B+D), until the reconcile that finds it committed or shown, which gives the
2864
+ * slots out again and registers its element keys with `world`. Absent on every other root.
2836
2865
  */
2837
2866
  aside?: true;
2838
2867
  /**
@@ -2841,6 +2870,12 @@ type Root = {
2841
2870
  */
2842
2871
  parked?: Parked[]; /** The application of a root built aside in parts, while it is open; absent otherwise. */
2843
2872
  applying?: ApplyCursor;
2873
+ /**
2874
+ * Present from the release of a root whose parts still waited (a warm window opened while it was
2875
+ * built) until the solve that lays it out whole: its elements take their rects with no motion,
2876
+ * as their enters play next. Absent on every other root.
2877
+ */
2878
+ still?: true;
2844
2879
  };
2845
2880
  /**
2846
2881
  * Where the focus ring was last drawn: the layer and order of its root, the rect grown by the
@@ -3021,8 +3056,83 @@ type JsxState = {
3021
3056
  written: number; /** The wall times of the last taps on a `DebugTrigger` view, five at the most. */
3022
3057
  debugTaps: number[]; /** Whether `ui:debug-trigger-no-agent` was logged: once per app. */
3023
3058
  debugWarned: boolean; /** Elements that carry `Overlay`, from their enter to their despawn (spec 22 O4.5). */
3024
- overlays: Set<Entity>; /** How many roots carry `aside`, as the last reconcile counted them: 0 while no scene is built aside. */
3025
- asideRoots: number;
3059
+ overlays: Set<Entity>;
3060
+ /**
3061
+ * How many roots carry `aside`, as the last reconcile counted them: 0 while no scene is built
3062
+ * aside and no window is held warm.
3063
+ */
3064
+ asideRoots: number; /** Every `<anchor>` from its enter to its despawn, with what the anchor pass keeps for it. */
3065
+ anchors: Map<Entity, Anchor>;
3066
+ };
3067
+ /**
3068
+ * What the anchor pass keeps for one `<anchor>` from frame to frame, every object written in place.
3069
+ * `node` is the description `to` and `pad` were last read from; `to` the targets read from it
3070
+ * (`undefined` for a prop that names none);
3071
+ * `retarget` is true from a render that gave another `to` until the anchor is next shown. `seen`
3072
+ * holds the entities the keys resolved to in this frame (0 for none, `count` of them), `shown` the
3073
+ * ones of the last frame the anchor was shown (`shownCount` of them). `screen` is the union of the
3074
+ * shown targets in screen reference units, `part` one target's rect, `next` the anchor's rect in
3075
+ * root coordinates and `pose` the root pose the resolver writes. `placed` turns true at the first
3076
+ * application of the anchor and its subtree; `hidden` is true while no target is shown; `missing`
3077
+ * counts the frames in a row a key resolved to no entity. `owed` is true while the
3078
+ * `Transform` waits for a motion to end before it takes the rest pose; `stale` while the world's
3079
+ * rest pose lags the element's; `boxes` while the `Box` of the anchor and its subtree lags their
3080
+ * rects, written once it stands. `held` lets go of the anchor's `x` and `y`, which a follow holds
3081
+ * from a loop until the anchor stands. While a motion that ends plays, `aim` is the position it lands on,
3082
+ * `track` the position it last wrote and `wrote` the position the pass wrote over it: the motion is
3083
+ * carried by how far the targets moved since it began.
3084
+ */
3085
+ type Anchor = {
3086
+ node: DescriptionNode | undefined;
3087
+ to: AnchorTarget | readonly AnchorTarget[] | undefined;
3088
+ retarget: boolean;
3089
+ seen: Entity[];
3090
+ shown: Entity[];
3091
+ count: number;
3092
+ shownCount: number;
3093
+ screen: {
3094
+ x: number;
3095
+ y: number;
3096
+ w: number;
3097
+ h: number;
3098
+ };
3099
+ part: {
3100
+ x: number;
3101
+ y: number;
3102
+ w: number;
3103
+ h: number;
3104
+ };
3105
+ next: {
3106
+ x: number;
3107
+ y: number;
3108
+ w: number;
3109
+ h: number;
3110
+ };
3111
+ pose: TransformValue;
3112
+ placed: boolean;
3113
+ hidden: boolean;
3114
+ missing: number;
3115
+ owed: boolean;
3116
+ stale: boolean;
3117
+ boxes: boolean;
3118
+ held: (() => void) | undefined;
3119
+ aim: {
3120
+ x: number;
3121
+ y: number;
3122
+ };
3123
+ track: {
3124
+ x: number;
3125
+ y: number;
3126
+ };
3127
+ wrote: {
3128
+ x: number;
3129
+ y: number;
3130
+ }; /** The one-time logs written for it: a missing target, its own child, an ignored style. */
3131
+ warned: {
3132
+ missing: boolean;
3133
+ own: boolean;
3134
+ style: boolean;
3135
+ };
3026
3136
  };
3027
3137
  /**
3028
3138
  * One node of the snapshot `tree()` answers with. `rect` is natural: under a `fit` ancestor it