@moku-labs/game 0.15.34 → 0.15.36

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 (31) hide show
  1. package/dist/app/page.d.mts +1 -1
  2. package/dist/app/system.d.mts +3 -3
  3. package/dist/app.d.mts +3 -3
  4. package/dist/app.mjs +1 -1
  5. package/dist/{assets-B8_Uc6_n.mjs → assets-I-FJDl3W.mjs} +7 -3
  6. package/dist/assets.d.mts +1 -1
  7. package/dist/assets.mjs +1 -1
  8. package/dist/cli.mjs +1 -1
  9. package/dist/{commands-DSYOsn8r.d.mts → commands-BGrtxBga.d.mts} +5 -5
  10. package/dist/control.d.mts +4 -4
  11. package/dist/{define-CE1uxbe9.d.mts → define-0af8h-Ro.d.mts} +2 -2
  12. package/dist/{headless-f31cEZ7f.d.mts → headless-BFI7EXHo.d.mts} +1 -1
  13. package/dist/{index-ZPmKRr0j.d.mts → index-Cs4qaPMq.d.mts} +3 -3
  14. package/dist/index.d.mts +4 -4
  15. package/dist/index.mjs +1 -1
  16. package/dist/inspect.d.mts +6 -6
  17. package/dist/jsx-dev-runtime.d.mts +1 -1
  18. package/dist/jsx-runtime.d.mts +1 -1
  19. package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-BhDjJH2R.mjs} +3 -2
  20. package/dist/{runtime-CgJuBIYZ.d.mts → runtime-DIOe0nCH.d.mts} +1 -1
  21. package/dist/{src-DFhuDrm7.mjs → src-BPEIEsWH.mjs} +52 -7
  22. package/dist/testing.d.mts +4 -4
  23. package/dist/testing.mjs +1 -1
  24. package/dist/{types-CrZvIBB9.d.mts → types-B1W2CPUu.d.mts} +2 -2
  25. package/dist/{types-DGHVGP5i.d.mts → types-BAv5qOZX.d.mts} +13 -2
  26. package/dist/{types-CgE5L_7f.d.mts → types-D52biu5v.d.mts} +2 -2
  27. package/dist/{types-DrtsLNnT.d.mts → types-Dh2cyp0H.d.mts} +4 -4
  28. package/dist/{types-D27I4Q7b.d.mts → types-K3qfyTu0.d.mts} +14 -4
  29. package/dist/{visual-CYxR9E2v.d.mts → visual-DMx0vv_3.d.mts} +6 -6
  30. package/dist/visual.d.mts +1 -1
  31. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-DrtsLNnT.mjs";
1
+ import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-Dh2cyp0H.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Mr as PlayerStateProvider } from "../types-D27I4Q7b.mjs";
2
- import { ht as PlatformProvider } from "../index-ZPmKRr0j.mjs";
3
- import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-DrtsLNnT.mjs";
1
+ import { Mr as PlayerStateProvider } from "../types-K3qfyTu0.mjs";
2
+ import { ht as PlatformProvider } from "../index-Cs4qaPMq.mjs";
3
+ import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-Dh2cyp0H.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-D27I4Q7b.mjs";
2
- import { U as StringTable } from "./types-DGHVGP5i.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-DrtsLNnT.mjs";
1
+ import { Dr as Json } from "./types-K3qfyTu0.mjs";
2
+ import { U as StringTable } from "./types-BAv5qOZX.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-Dh2cyp0H.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-DFhuDrm7.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-BPEIEsWH.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
@@ -1,3 +1,4 @@
1
+ import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
1
2
  import { t as findFeatureOwners } from "./features-DowEilZm.mjs";
2
3
  import { createRequire } from "node:module";
3
4
  import path from "node:path";
@@ -2174,9 +2175,11 @@ function isRecord(value) {
2174
2175
  }
2175
2176
  /**
2176
2177
  * Imports the optional `assets.ts` of a feature. Node strips the types of a `.ts` file, so the
2177
- * description a game writes runs as it stands. The URL carries the file's size and mtime: a
2178
- * long-lived process (the keys watch of `dev` and the editor) reads a saved description again
2179
- * instead of the module it cached, while one scan, or scans with nothing saved, import it once.
2178
+ * description a game writes runs as it stands. A long-lived process (the keys watch of `dev` and
2179
+ * the editor) must read a saved description again, not the module it imported first. Bun keeps a
2180
+ * module by its path and ignores a query, so the entry is dropped from its cache before each
2181
+ * import; the query (the file's size and mtime) does the same in a module runner that keys by
2182
+ * URL, such as vitest's.
2180
2183
  *
2181
2184
  * @param file - Absolute path of the description.
2182
2185
  * @returns Its exports, or `undefined` when the feature brought none.
@@ -2185,6 +2188,7 @@ function isRecord(value) {
2185
2188
  async function importDescription(file) {
2186
2189
  const entry = await stat(file).catch(() => {});
2187
2190
  if (entry === void 0 || !entry.isFile()) return void 0;
2191
+ if (typeof __require !== "undefined") delete __require.cache[file];
2188
2192
  return await import(
2189
2193
  /* @vite-ignore */
2190
2194
  `${pathToFileURL(file).href}?saved=${entry.size}-${Math.round(entry.mtimeMs * 1e3)}`
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-D27I4Q7b.mjs";
1
+ import { d as Manifest } from "./types-K3qfyTu0.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
package/dist/assets.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as runCli, c as emitKeys, i as compileStrings, l as emitManifest, n as importStrings, o as scanAssets, r as checkStrings, s as packAssets, t as exportStrings } from "./assets-B8_Uc6_n.mjs";
1
+ import { a as runCli, c as emitKeys, i as compileStrings, l as emitManifest, n as importStrings, o as scanAssets, r as checkStrings, s as packAssets, t as exportStrings } from "./assets-I-FJDl3W.mjs";
2
2
  export { checkStrings, compileStrings, emitKeys, emitManifest, exportStrings, importStrings, packAssets, runCli, scanAssets };
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as resolveConfig } from "./config-B87aFTW-.mjs";
2
2
  import { t as findFeatureOwners } from "./features-DowEilZm.mjs";
3
3
  import { r as watchTree, t as createBatcher, x as isSkippedFolder$1 } from "./watch-BSgptowj.mjs";
4
- import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-B8_Uc6_n.mjs";
4
+ import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-I-FJDl3W.mjs";
5
5
  import { constants, copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  import { createBrandConsole } from "@moku-labs/common/cli";
@@ -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-D27I4Q7b.mjs";
2
- import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-CrZvIBB9.mjs";
3
- import { N as InputApi } from "./types-DGHVGP5i.mjs";
4
- import { t as HeadlessApp } from "./headless-f31cEZ7f.mjs";
5
- import { n as Command, r as ControlApp } from "./types-CgE5L_7f.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-K3qfyTu0.mjs";
2
+ import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-B1W2CPUu.mjs";
3
+ import { N as InputApi } from "./types-BAv5qOZX.mjs";
4
+ import { t as HeadlessApp } from "./headless-BFI7EXHo.mjs";
5
+ import { n as Command, r as ControlApp } from "./types-D52biu5v.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-f31cEZ7f.mjs";
2
- import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-CgE5L_7f.mjs";
3
- import { t as commands } from "./commands-DSYOsn8r.mjs";
4
- import { t as defineCommand } from "./define-CE1uxbe9.mjs";
1
+ import { t as HeadlessApp } from "./headless-BFI7EXHo.mjs";
2
+ import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-D52biu5v.mjs";
3
+ import { t as commands } from "./commands-BGrtxBga.mjs";
4
+ import { t as defineCommand } from "./define-0af8h-Ro.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-f31cEZ7f.mjs";
2
- import { c as Source, n as Command, o as InputSchema } from "./types-CgE5L_7f.mjs";
1
+ import { t as HeadlessApp } from "./headless-BFI7EXHo.mjs";
2
+ import { c as Source, n as Command, o as InputSchema } from "./types-D52biu5v.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-D27I4Q7b.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-K3qfyTu0.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-D27I4Q7b.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-CrZvIBB9.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-DGHVGP5i.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-K3qfyTu0.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-B1W2CPUu.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-BAv5qOZX.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
6
6
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as 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-D27I4Q7b.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-CrZvIBB9.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-DGHVGP5i.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-ZPmKRr0j.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-K3qfyTu0.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-B1W2CPUu.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-BAv5qOZX.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-Cs4qaPMq.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-DFhuDrm7.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-BPEIEsWH.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-D27I4Q7b.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-CrZvIBB9.mjs";
3
- import { c as UiNode } from "./types-DGHVGP5i.mjs";
4
- import { t as HeadlessApp } from "./headless-f31cEZ7f.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-CgE5L_7f.mjs";
6
- import { n as defineSource } from "./define-CE1uxbe9.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-K3qfyTu0.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-B1W2CPUu.mjs";
3
+ import { c as UiNode } from "./types-BAv5qOZX.mjs";
4
+ import { t as HeadlessApp } from "./headless-BFI7EXHo.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-D52biu5v.mjs";
6
+ import { n as defineSource } from "./define-0af8h-Ro.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-CgJuBIYZ.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-DIOe0nCH.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-CgJuBIYZ.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-DIOe0nCH.mjs";
2
2
  export { Fragment, type JSX, jsx, jsxs };
@@ -1,4 +1,4 @@
1
- import "node:module";
1
+ import { createRequire } from "node:module";
2
2
  //#region \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __exportAll = (all, no_symbols) => {
@@ -10,5 +10,6 @@ var __exportAll = (all, no_symbols) => {
10
10
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
11
  return target;
12
12
  };
13
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
13
14
  //#endregion
14
- export { __exportAll as t };
15
+ export { __require as n, __exportAll as t };
@@ -1,4 +1,4 @@
1
- import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-DGHVGP5i.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-BAv5qOZX.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. */
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
2
2
  import { r as systemSource, t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { a as finishDrafts, i as enableDraftPatches, n as deepFreeze$1, o as openDrafts, r as dropDrafts } from "./drafts-BawpSaVp.mjs";
4
4
  import { _ as pushEntry, c as collectFlows, d as findNode, f as framePath, g as compact, h as slotNames, i as servePaused, l as describeGraph, m as isRestCheckpoint, n as captureFrame, o as epochOf, p as graphHash, r as serveCaptures, s as pageNow$1, t as cancelCaptures } from "./capture-PTJXDpxK.mjs";
@@ -3372,9 +3372,10 @@ function hold$1(ctx, answer) {
3372
3372
  if (!ctx.deps.time.isRunning()) return;
3373
3373
  if (ctx.config.holdMs <= 0 && ctx.state.gate.held !== void 0) return;
3374
3374
  const { frame, elapsed } = ctx.deps.time.snapshot();
3375
+ const heldFor = frame === ctx.state.gate.aged ? frame + 1 : frame;
3375
3376
  ctx.state.gate.held = {
3376
3377
  answer,
3377
- frame,
3378
+ frame: heldFor,
3378
3379
  at: elapsed
3379
3380
  };
3380
3381
  }
@@ -3437,6 +3438,7 @@ function createGateApi(ctx) {
3437
3438
  },
3438
3439
  clearHeld: (frame, elapsed) => {
3439
3440
  const held = ctx.state.gate.held;
3441
+ ctx.state.gate.aged = frame;
3440
3442
  if (held === void 0) return;
3441
3443
  if (held.frame === frame) return;
3442
3444
  if (ctx.config.holdMs > 0 && elapsed - held.at <= ctx.config.holdMs) return;
@@ -6656,6 +6658,7 @@ function createGateState() {
6656
6658
  open: void 0,
6657
6659
  resolve: void 0,
6658
6660
  held: void 0,
6661
+ aged: 0,
6659
6662
  narrow: void 0,
6660
6663
  pointerActive: false,
6661
6664
  wake: void 0
@@ -48889,7 +48892,10 @@ function attach(canvas, ctx) {
48889
48892
  clientY: event.clientY
48890
48893
  };
48891
48894
  record(state, sample);
48892
- if (isDoorKind(entry.kind)) runPointerListeners(ctx, sample);
48895
+ if (isDoorKind(entry.kind)) {
48896
+ runPointerListeners(ctx, sample);
48897
+ state.resolveNow?.();
48898
+ }
48893
48899
  };
48894
48900
  canvas.addEventListener(entry.name, listener);
48895
48901
  return {
@@ -49100,8 +49106,9 @@ function traceLost(ctx) {
49100
49106
  //#endregion
49101
49107
  //#region src/plugins/input/gestures.ts
49102
49108
  /**
49103
- * @file input plugin — the one frame step. The DOM handlers only queue raw samples; every
49104
- * decision is made here, in `time.onFrame("input")`. No `Date.now`, no `performance.now`, no
49109
+ * @file input plugin — the gesture machine. The DOM handlers queue raw samples; the machine
49110
+ * drains them in `time.onFrame("input")`, and a down, an up and a cancel of a live world at their
49111
+ * event (`resolveEarly`): a move waits for the frame step. No `Date.now`, no `performance.now`, no
49105
49112
  * `event.timeStamp`: every duration is a sum of `time.delta`, so `time.step(dt)` drives the
49106
49113
  * machine in a test and a time scale or a pause applies to it.
49107
49114
  */
@@ -49519,6 +49526,7 @@ function syncCanvas(ctx) {
49519
49526
  function pauseGestures(ctx) {
49520
49527
  const pointer = ctx.deps.world.ecs.resource(Pointer);
49521
49528
  ctx.state.samples = [];
49529
+ ctx.state.resolvedEarly = false;
49522
49530
  clearPointerOver(ctx);
49523
49531
  letGestureGo(ctx);
49524
49532
  pointer.down = false;
@@ -49528,6 +49536,37 @@ function pauseGestures(ctx) {
49528
49536
  toIdle(ctx);
49529
49537
  }
49530
49538
  /**
49539
+ * Clears `justPressed` and `justReleased` of the `Pointer` resource: they tell one frame of a press or a release.
49540
+ *
49541
+ * @param pointer - The `Pointer` resource.
49542
+ */
49543
+ function clearJust(pointer) {
49544
+ pointer.justPressed = false;
49545
+ pointer.justReleased = false;
49546
+ }
49547
+ /**
49548
+ * Resolves the queued samples at the DOM event of a down, an up or a cancel, between two frames
49549
+ * (F61): the pressed view is tagged and a release answers the gate now, so the press look starts
49550
+ * in the next frame and a node that awaits nothing commits before it. The first resolve after a
49551
+ * frame clears that frame's flags; the next frame step keeps the ones it wrote. Only a live world
49552
+ * resolves early: fast and paused leave the samples to the frame step, as before.
49553
+ *
49554
+ * @param ctx - Domain context of the input plugin.
49555
+ */
49556
+ function resolveEarly(ctx) {
49557
+ if (ctx.deps.world.ecs.mode() !== "live") return;
49558
+ const pointer = ctx.deps.world.ecs.resource(Pointer);
49559
+ const queue = ctx.state.samples;
49560
+ if (!ctx.state.resolvedEarly) {
49561
+ clearJust(pointer);
49562
+ ctx.state.resolvedEarly = true;
49563
+ }
49564
+ ctx.state.samples = [];
49565
+ drainSamples(ctx, pointer, queue);
49566
+ syncCursor(ctx);
49567
+ pointer.id = ctx.state.pointerId ?? -1;
49568
+ }
49569
+ /**
49531
49570
  * The one frame step of the plugin, registered with `time.onFrame("input")` in `onInit`, so it
49532
49571
  * runs before the `world` callback of the same phase: `Pointer`, `Held`, `Hovered` and `Pressed`
49533
49572
  * are fresh when game systems of phase `input` read them.
@@ -49542,6 +49581,7 @@ function stepGestures(ctx, time) {
49542
49581
  const mode = ctx.deps.world.ecs.mode();
49543
49582
  if (mode === "fast") {
49544
49583
  ctx.state.samples = [];
49584
+ ctx.state.resolvedEarly = false;
49545
49585
  if (ctx.state.phase !== "idle") pauseGestures(ctx);
49546
49586
  return;
49547
49587
  }
@@ -49552,8 +49592,8 @@ function stepGestures(ctx, time) {
49552
49592
  }
49553
49593
  const pointer = ctx.deps.world.ecs.resource(Pointer);
49554
49594
  const queue = ctx.state.samples;
49555
- pointer.justPressed = false;
49556
- pointer.justReleased = false;
49595
+ if (ctx.state.resolvedEarly) ctx.state.resolvedEarly = false;
49596
+ else clearJust(pointer);
49557
49597
  ctx.state.samples = [];
49558
49598
  drainSamples(ctx, pointer, queue);
49559
49599
  syncCursor(ctx);
@@ -49609,6 +49649,8 @@ function createInputState(_ctx) {
49609
49649
  pointerListeners: [],
49610
49650
  detachKeys: void 0,
49611
49651
  wake: void 0,
49652
+ resolveNow: void 0,
49653
+ resolvedEarly: false,
49612
49654
  cursor: void 0,
49613
49655
  controls: []
49614
49656
  };
@@ -49668,6 +49710,7 @@ function withDeps$2(ctx) {
49668
49710
  function initInput(ctx) {
49669
49711
  const inputCtx = withDeps$2(ctx);
49670
49712
  inputCtx.state.wake = () => inputCtx.deps.time.wake();
49713
+ inputCtx.state.resolveNow = () => resolveEarly(inputCtx);
49671
49714
  inputCtx.state.offFrame = inputCtx.deps.time.onFrame("input", (time) => stepGestures(inputCtx, time));
49672
49715
  }
49673
49716
  /**
@@ -49722,6 +49765,8 @@ function stopInput(state) {
49722
49765
  state.restScale = void 0;
49723
49766
  state.heldPose = void 0;
49724
49767
  state.wake = void 0;
49768
+ state.resolveNow = void 0;
49769
+ state.resolvedEarly = false;
49725
49770
  state.tapListeners = [];
49726
49771
  state.keyListeners = [];
49727
49772
  state.pointerListeners = [];
@@ -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-D27I4Q7b.mjs";
2
- import { t as createApp } from "./index-ZPmKRr0j.mjs";
3
- import { b as saveOf, v as WithGameState, y as memory } from "./types-DrtsLNnT.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-f31cEZ7f.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-K3qfyTu0.mjs";
2
+ import { t as createApp } from "./index-Cs4qaPMq.mjs";
3
+ import { b as saveOf, v as WithGameState, y as memory } from "./types-Dh2cyp0H.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-BFI7EXHo.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-DFhuDrm7.mjs";
1
+ import { en as refuseStart, in as type, m as flattenFeatures, t as createApp, tn as exit } from "./src-BPEIEsWH.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,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-D27I4Q7b.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-DGHVGP5i.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-K3qfyTu0.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-BAv5qOZX.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -1,4 +1,4 @@
1
- import { 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-D27I4Q7b.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-K3qfyTu0.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";
@@ -1068,7 +1068,18 @@ type State$1 = {
1068
1068
  keyListeners: KeyListener[]; /** Registered through `onPointer`, called in this order inside the DOM listener. */
1069
1069
  pointerListeners: PointerListener[]; /** Takes the one `keydown` listener off `window`; set while a canvas is attached. */
1070
1070
  detachKeys: (() => void) | undefined; /** `time.wake`, bound in `onInit`: every pointer sample leaves the idle frame rate. */
1071
- wake: (() => void) | undefined; /** The cursor last written on the attached canvas; `undefined` while nothing was written. */
1071
+ wake: (() => void) | undefined;
1072
+ /**
1073
+ * Resolves the queued samples at once, bound in `onInit`: the DOM listener calls it after a
1074
+ * down, an up or a cancel, so the press is tagged and the release answered before the next
1075
+ * frame (F61). A move waits for the frame unless such a sample comes after it.
1076
+ */
1077
+ resolveNow: (() => void) | undefined;
1078
+ /**
1079
+ * True from a resolve at an event to the next frame step: that step keeps the `justPressed` and
1080
+ * `justReleased` the event wrote, so the game systems of its frame read them.
1081
+ */
1082
+ resolvedEarly: boolean; /** The cursor last written on the attached canvas; `undefined` while nothing was written. */
1072
1083
  cursor: string | undefined; /** Component types other plugins registered through `controls.add`, once per registration. */
1073
1084
  controls: AnyComponentType[];
1074
1085
  };
@@ -1,5 +1,5 @@
1
- import { Dr as Json, Ir as Snapshot } from "./types-D27I4Q7b.mjs";
2
- import { t as HeadlessApp } from "./headless-f31cEZ7f.mjs";
1
+ import { Dr as Json, Ir as Snapshot } from "./types-K3qfyTu0.mjs";
2
+ import { t as HeadlessApp } from "./headless-BFI7EXHo.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,7 +1,7 @@
1
- import { $ as 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-D27I4Q7b.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-CrZvIBB9.mjs";
3
- import { R as I18nApi, U as StringTable, W as TextKey } from "./types-DGHVGP5i.mjs";
4
- import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-ZPmKRr0j.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-K3qfyTu0.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-B1W2CPUu.mjs";
3
+ import { R as I18nApi, U as StringTable, W as TextKey } from "./types-BAv5qOZX.mjs";
4
+ import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-Cs4qaPMq.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -1914,14 +1914,23 @@ type GateState = {
1914
1914
  resolve: ((answer: Answer) => void) | undefined;
1915
1915
  /**
1916
1916
  * An answer given while the gate was closed, kept for the next gate: for the frame it was given
1917
- * in, or for `config.holdMs` of game time. `frame` is the frame of the refusal and `at` is
1918
- * `time.snapshot().elapsed` at that moment: the age is counted from it.
1917
+ * in, or for `config.holdMs` of game time. `frame` is the frame the hold lives through: the frame
1918
+ * of the refusal, or the next one for a refusal after its `signals` (see `aged`). `at` is
1919
+ * `time.snapshot().elapsed` at the refusal: the age is counted from it.
1919
1920
  */
1920
1921
  held: {
1921
1922
  answer: Answer;
1922
1923
  frame: number;
1923
1924
  at: number;
1924
- } | undefined; /** The one answer a running `guide` lets through. */
1925
+ } | undefined;
1926
+ /**
1927
+ * The last frame whose `signals` phase aged the hold; 0 before the first, since frame 0 runs no
1928
+ * phases. An answer refused
1929
+ * after it (later in that frame, or between two frames, as a tap resolved at its DOM event) is
1930
+ * held for the next frame: it lives through that frame's `signals`, as one refused in its input
1931
+ * phase does.
1932
+ */
1933
+ aged: number; /** The one answer a running `guide` lets through. */
1925
1934
  narrow: Allow | undefined; /** True while a pointer is down. Entering an `over` node waits for false. */
1926
1935
  pointerActive: boolean; /** Ends the pending pointer wait of the runner. Set while the wait runs, so a stop needs no frame. */
1927
1936
  wake: (() => void) | undefined;
@@ -1942,7 +1951,8 @@ type GateApi = {
1942
1951
  * Gives one answer. Accepted only while the gate is open and the intent is allowed. An answer
1943
1952
  * to a closed gate is refused and held: it is offered once to the next gate that opens, which
1944
1953
  * takes it when it lists the intent and a running `guide` lets it through. With `holdMs: 0` the
1945
- * hold lives for the frame the answer was given in and the first answer wins. With `holdMs`
1954
+ * hold lives for the frame the answer was given in, or through the next frame for an answer given
1955
+ * after that frame's `signals` or between two frames, and the first answer wins. With `holdMs`
1946
1956
  * above 0 the last answer wins and it is kept for that much game time. Nothing is held in fast
1947
1957
  * mode or while no frame source runs.
1948
1958
  *
@@ -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-D27I4Q7b.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-CrZvIBB9.mjs";
3
- import { N as InputApi } from "./types-DGHVGP5i.mjs";
4
- import { r as Repro } from "./headless-f31cEZ7f.mjs";
5
- import { a as InputOf, r as ControlApp } from "./types-CgE5L_7f.mjs";
6
- import { t as commands } from "./commands-DSYOsn8r.mjs";
1
+ import { Vr as Api$3, Y as Api, nn as Api$1, vr as Api$4, wr as Api$2 } from "./types-K3qfyTu0.mjs";
2
+ import { P as AnimApi, r as UiApi } from "./types-B1W2CPUu.mjs";
3
+ import { N as InputApi } from "./types-BAv5qOZX.mjs";
4
+ import { r as Repro } from "./headless-BFI7EXHo.mjs";
5
+ import { a as InputOf, r as ControlApp } from "./types-D52biu5v.mjs";
6
+ import { t as commands } from "./commands-BGrtxBga.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-CYxR9E2v.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-DMx0vv_3.mjs";
2
2
  export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.34",
3
+ "version": "0.15.36",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [