@moku-labs/game 0.15.143 → 0.15.145

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.
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-BFoRyZqu.mjs";
1
+ import { d as Manifest } from "./types-NOciAl87.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
@@ -358,12 +358,14 @@ type PackResult = {
358
358
  };
359
359
  /**
360
360
  * Packs the art of a game for production: per bundle, the textures of the `fx` group and of the
361
- * `main` group go onto WebP atlas pages (2048 px at most, 2 px padding and border with each frame's
362
- * edge extruded 1 px into it, never trimmed or rotated), a texture with a side above 512 px and a group of one stay loose files, fonts and
363
- * sounds are copied, every file name carries the hash of its bytes, and the packed manifest
364
- * (version 2) names it all. Nothing is written while a problem is open; afterwards the pack folder
365
- * holds exactly what the manifest references, plus `manifest.json`. Two runs on the same tree and
366
- * the same `sharp` write the same bytes.
361
+ * `main` group go onto WebP atlas pages (2048 px at most; 2 px padding and border with each frame's edge extruded 1 px
362
+ * into it, never rotated), a texture that is not a nine-slice is cropped to its visible pixels and
363
+ * the manifest keeps where the crop lay in the original (F198). A `main` texture above `LOOSE_SIDE`, a
364
+ * mipmapped one and a group of one stay loose files; a texture too large for the page is a
365
+ * problem. Fonts and sounds are copied, every file name carries the hash of its
366
+ * bytes, and the packed manifest (version 2) names it all. Nothing is written while a problem is
367
+ * open; afterwards the pack folder holds exactly what the manifest references, plus
368
+ * `manifest.json`. Two runs on the same tree and the same `sharp` write the same bytes.
367
369
  *
368
370
  * @param options - The sources, the scanned manifest, the pack folder, the manifest file, the cache.
369
371
  * @returns The packed manifest and what was written.
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-D6LmjgQc.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-Cw-dwgD4.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 { n as resolveConfig } from "./config-DVqciSkP.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-D6LmjgQc.mjs";
4
+ import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-Cw-dwgD4.mjs";
5
5
  import { constants, copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
6
6
  import { homedir, networkInterfaces } from "node:os";
7
7
  import path from "node:path";
@@ -1,8 +1,8 @@
1
- import { $r as Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-BFoRyZqu.mjs";
2
- import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-Bj1uc5Qt.mjs";
3
- import { R as InputApi } from "./types-CwQ1ySw5.mjs";
4
- import { t as HeadlessApp } from "./headless-Def8N-1F.mjs";
5
- import { i as ControlApp, r as Command } from "./types-Dp8LeQTw.mjs";
1
+ import { $r as Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-NOciAl87.mjs";
2
+ import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BDCkyWXq.mjs";
3
+ import { R as InputApi } from "./types-rsz4pIqe.mjs";
4
+ import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
5
+ import { i as ControlApp, r as Command } from "./types-C2hkiREP.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-Def8N-1F.mjs";
2
- import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-Dp8LeQTw.mjs";
3
- import { t as commands } from "./commands-DLHoLKme.mjs";
4
- import { t as defineCommand } from "./define-Yco7v9wv.mjs";
1
+ import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
2
+ import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-C2hkiREP.mjs";
3
+ import { t as commands } from "./commands-7RWSJMv7.mjs";
4
+ import { t as defineCommand } from "./define-DK_J6R4D.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-Def8N-1F.mjs";
2
- import { l as Source, r as Command, s as InputSchema } from "./types-Dp8LeQTw.mjs";
1
+ import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
2
+ import { l as Source, r as Command, s as InputSchema } from "./types-C2hkiREP.mjs";
3
3
 
4
4
  //#region src/plugins/flow/doors/define.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-BFoRyZqu.mjs";
1
+ import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-NOciAl87.mjs";
2
2
 
3
3
  //#region src/plugins/flow/headless.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-BFoRyZqu.mjs";
2
- import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-Bj1uc5Qt.mjs";
3
- import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-CwQ1ySw5.mjs";
1
+ import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-NOciAl87.mjs";
2
+ import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-BDCkyWXq.mjs";
3
+ import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-rsz4pIqe.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
6
6
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-BFoRyZqu.mjs";
2
- import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-Bj1uc5Qt.mjs";
3
- import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-CwQ1ySw5.mjs";
4
- import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-bracik73.mjs";
1
+ import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-NOciAl87.mjs";
2
+ import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-BDCkyWXq.mjs";
3
+ import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-rsz4pIqe.mjs";
4
+ import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-BFbScS-y.mjs";
5
5
  export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, Aura, type AuraValue, type BackResult, type BindOptions, Bloom, type BloomValue, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, type TextRunStyle, type TextTagStyle, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-Dq7gGhN4.mjs";
1
+ import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-BR2Uw9Xz.mjs";
2
2
  import { $ as Overlay, D as defineStyle, E as defineTokens, L as defineTextFormats, M as Countdown, N as Text, P as bind, Q as NineSlice, R as defineTextStyles, X as Display, Z as HudPart, _ as DebugTrigger, ct as Exiting, dt as Order, ft as Tree, gt as system, h as Box, ht as resource, it as Transform, lt as Layer, mt as mut, nt as Shape, pt as component, rt as Sprite, st as sprite, tt as Parent, ut as Now, vt as tag, w as popup, x as ScrollState, y as LocalWrite, z as label } from "./visual-x0TPowBE.mjs";
3
3
  import { t as defineComponent } from "./component-DGg5DqKK.mjs";
4
4
  export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Bloom, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
@@ -1,9 +1,9 @@
1
- import { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-BFoRyZqu.mjs";
2
- import { W as AnimApi, Z as TimelinesSnapshot, a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-Bj1uc5Qt.mjs";
3
- import { c as UiNode } from "./types-CwQ1ySw5.mjs";
4
- import { t as HeadlessApp } from "./headless-Def8N-1F.mjs";
5
- import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-Dp8LeQTw.mjs";
6
- import { n as defineSource } from "./define-Yco7v9wv.mjs";
1
+ import { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-NOciAl87.mjs";
2
+ import { W as AnimApi, Z as TimelinesSnapshot, a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BDCkyWXq.mjs";
3
+ import { c as UiNode } from "./types-rsz4pIqe.mjs";
4
+ import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
5
+ import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-C2hkiREP.mjs";
6
+ import { n as defineSource } from "./define-DK_J6R4D.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-BMasjfv7.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-RVZfCuNw.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-BMasjfv7.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-RVZfCuNw.mjs";
2
2
  export { Fragment, type JSX, jsx, jsxs };
@@ -1,4 +1,4 @@
1
- import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-CwQ1ySw5.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-rsz4pIqe.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. */
@@ -31435,33 +31435,65 @@ function createTexture(sctx, image, options) {
31435
31435
  return bordered;
31436
31436
  }
31437
31437
  /**
31438
- * Tells whether a frame lies inside a page of the given size. A negative number, or one that is
31439
- * not a number, lies outside.
31438
+ * Tells whether a frame carries the four trim fields. An incomplete set counts as none.
31439
+ *
31440
+ * @param frame - The frame.
31441
+ * @returns True when the offset and the original size are all numbers.
31442
+ * @example
31443
+ * ```ts
31444
+ * isTrimmed({ x: 0, y: 0, width: 8, height: 8, offsetX: 0, offsetY: 0, origWidth: 10 }); // false
31445
+ * ```
31446
+ */
31447
+ function isTrimmed(frame) {
31448
+ return typeof frame.offsetX === "number" && typeof frame.offsetY === "number" && typeof frame.origWidth === "number" && typeof frame.origHeight === "number";
31449
+ }
31450
+ /**
31451
+ * Tells whether a frame lies inside a page of the given size, and a trimmed frame inside its
31452
+ * original too. A negative number, or one that is not a number, lies outside.
31440
31453
  *
31441
31454
  * @param frame - The frame in page pixels.
31442
31455
  * @param page - The size of the page.
31443
31456
  * @param page.width - Width of the page in pixels.
31444
31457
  * @param page.height - Height of the page in pixels.
31445
- * @returns True when the whole frame is on the page.
31458
+ * @returns True when the whole frame is on the page and, when trimmed, in its original.
31446
31459
  * @example
31447
31460
  * ```ts
31448
31461
  * frameFits({ x: 256, y: 384, width: 256, height: 128 }, { width: 512, height: 512 }); // true
31449
31462
  * ```
31450
31463
  */
31451
31464
  function frameFits(frame, page) {
31452
- return frame.x >= 0 && frame.y >= 0 && frame.width >= 0 && frame.height >= 0 && frame.x + frame.width <= page.width && frame.y + frame.height <= page.height;
31465
+ const onPage = frame.x >= 0 && frame.y >= 0 && frame.width >= 0 && frame.height >= 0 && frame.x + frame.width <= page.width && frame.y + frame.height <= page.height;
31466
+ if (!onPage || !isTrimmed(frame)) return onPage;
31467
+ return frame.offsetX >= 0 && frame.offsetY >= 0 && frame.offsetX + frame.width <= frame.origWidth && frame.offsetY + frame.height <= frame.origHeight;
31468
+ }
31469
+ /**
31470
+ * The `orig` and `trim` Pixi gives a slice of a trimmed frame: the original's size, and where the
31471
+ * frame's pixels lie in it. A frame without the four fields gets neither.
31472
+ *
31473
+ * @param pixi - The Pixi module.
31474
+ * @param frame - The frame.
31475
+ * @returns The two rectangles, or nothing for an untrimmed frame.
31476
+ */
31477
+ function trimOf(pixi, frame) {
31478
+ if (!isTrimmed(frame)) return {};
31479
+ return {
31480
+ orig: new pixi.Rectangle(0, 0, frame.origWidth, frame.origHeight),
31481
+ trim: new pixi.Rectangle(frame.offsetX, frame.offsetY, frame.width, frame.height)
31482
+ };
31453
31483
  }
31454
31484
  /**
31455
31485
  * Cuts a texture out of an atlas page, on behalf of `assets`. The slice shares the page's source,
31456
31486
  * its frame is offset by the page's own frame, and it is marked as a slice so `destroyTexture`
31457
- * frees only the wrapper.
31487
+ * frees only the wrapper. A trimmed frame also gets `orig` and `trim`, so the slice answers the
31488
+ * size of its original (F198).
31458
31489
  *
31459
31490
  * @param sctx - Domain context of the sync module.
31460
31491
  * @param page - The page texture.
31461
- * @param frame - The frame in page pixels.
31492
+ * @param frame - The frame in page pixels, with the four trim fields when it was trimmed.
31462
31493
  * @param options - Nine-slice borders, in pixels.
31463
31494
  * @returns The slice.
31464
- * @throws {Error} When the renderer does not draw, and when the frame does not fit in the page.
31495
+ * @throws {Error} When the renderer does not draw, and when the frame does not fit in the page or
31496
+ * a trimmed frame not in its original.
31465
31497
  */
31466
31498
  function sliceTexture(sctx, page, frame, options) {
31467
31499
  const pixi = drawingPixi(sctx, "slice");
@@ -31470,6 +31502,7 @@ function sliceTexture(sctx, page, frame, options) {
31470
31502
  const slice = new pixi.Texture({
31471
31503
  source: page.source,
31472
31504
  frame: new pixi.Rectangle(page.frame.x + frame.x, page.frame.y + frame.y, frame.width, frame.height),
31505
+ ...trimOf(pixi, frame),
31473
31506
  ...nine === void 0 ? {} : { defaultBorders: defaultBordersOf(nine) }
31474
31507
  });
31475
31508
  sctx.ctx.state.sync.slices.add(slice);
@@ -31491,6 +31524,51 @@ function frameKeyOf(key, width, height) {
31491
31524
  return `${key}@${width}x${height}`;
31492
31525
  }
31493
31526
  /**
31527
+ * The crop of an untrimmed base: the part of its frame inside `crop`.
31528
+ *
31529
+ * @param pixi - The Pixi module.
31530
+ * @param base - The untrimmed texture.
31531
+ * @param crop - The part of the base to show, in its pixels.
31532
+ * @returns The crop, sharing the base's source.
31533
+ */
31534
+ function plainCrop(pixi, base, crop) {
31535
+ return new pixi.Texture({
31536
+ source: base.source,
31537
+ frame: new pixi.Rectangle(base.frame.x + crop.x, base.frame.y + crop.y, crop.width, crop.height)
31538
+ });
31539
+ }
31540
+ /**
31541
+ * The crop of a trimmed base (F198). The crop is in original pixels, the base's pixels lie at its
31542
+ * trim: the crop draws their common part `I`, not rounded, where it lies in the crop, and keeps the
31543
+ * crop's size. A crop that misses the trim draws nothing, over one pixel of the base's own frame,
31544
+ * so it never shows a neighbour on the page.
31545
+ *
31546
+ * @param pixi - The Pixi module.
31547
+ * @param base - The trimmed texture.
31548
+ * @param trim - Where the base's pixels lie in its original.
31549
+ * @param crop - The part of the original to show.
31550
+ * @returns The crop, sharing the base's source.
31551
+ */
31552
+ function trimmedCrop(pixi, base, trim, crop) {
31553
+ const left = Math.max(crop.x, trim.x);
31554
+ const top = Math.max(crop.y, trim.y);
31555
+ const width = Math.min(crop.x + crop.width, trim.x + trim.width) - left;
31556
+ const height = Math.min(crop.y + crop.height, trim.y + trim.height) - top;
31557
+ const orig = new pixi.Rectangle(0, 0, crop.width, crop.height);
31558
+ if (width <= 0 || height <= 0) return new pixi.Texture({
31559
+ source: base.source,
31560
+ frame: new pixi.Rectangle(base.frame.x, base.frame.y, 1, 1),
31561
+ orig,
31562
+ trim: new pixi.Rectangle(0, 0, 0, 0)
31563
+ });
31564
+ return new pixi.Texture({
31565
+ source: base.source,
31566
+ frame: new pixi.Rectangle(base.frame.x + left - trim.x, base.frame.y + top - trim.y, width, height),
31567
+ orig,
31568
+ trim: new pixi.Rectangle(left - crop.x, top - crop.y, width, height)
31569
+ });
31570
+ }
31571
+ /**
31494
31572
  * The texture a `"cover"` sprite draws: the part of `base` inside `crop`, sharing its source. One
31495
31573
  * crop per asset key and box, shared by every entity that shows it; the entity is added to its
31496
31574
  * users. A key that answers a new base has been invalidated, so every view of it resolves again
@@ -31503,7 +31581,8 @@ function frameKeyOf(key, width, height) {
31503
31581
  * @param box - The box the sprite covers, which names the crop.
31504
31582
  * @param box.width - Width of the box.
31505
31583
  * @param box.height - Height of the box.
31506
- * @param crop - The part of the base to show, in texture pixels.
31584
+ * @param crop - The part of the base to show, in texture pixels: those of the original for a
31585
+ * trimmed base, whose `width` and `height` are the original's.
31507
31586
  * @returns The crop and its `frames` key, or the base and `""` while inert.
31508
31587
  */
31509
31588
  function coverTexture(sctx, entity, key, base, box, crop) {
@@ -31523,10 +31602,8 @@ function coverTexture(sctx, entity, key, base, box, crop) {
31523
31602
  frameKey: ""
31524
31603
  };
31525
31604
  if (cached !== void 0) cached.texture.destroy(false);
31526
- const texture = new pixi.Texture({
31527
- source: base.source,
31528
- frame: new pixi.Rectangle(base.frame.x + crop.x, base.frame.y + crop.y, crop.width, crop.height)
31529
- });
31605
+ const trim = base.trim;
31606
+ const texture = trim === void 0 ? plainCrop(pixi, base, crop) : trimmedCrop(pixi, base, trim, crop);
31530
31607
  const users = emptySet$5();
31531
31608
  users.add(entity);
31532
31609
  frames.set(frameKey, {
@@ -41083,6 +41160,26 @@ function easeCell(ease, cells, at) {
41083
41160
  case "outBack": cells[at] = 1 + 2.70158 * (t - 1) ** 3 + BACK * (t - 1) ** 2;
41084
41161
  }
41085
41162
  }
41163
+ /** The cell `applyEase` eases in. */
41164
+ const EASED = /* @__PURE__ */ new Float64Array(1);
41165
+ /**
41166
+ * Eases a normalised time. A curve nobody knows is linear, and a function ease is called with
41167
+ * the same normalised time.
41168
+ *
41169
+ * @param ease - The curve to apply.
41170
+ * @param t - Normalised time between 0 and 1.
41171
+ * @returns The eased fraction. `inBack` dips below 0 and `outBack` rises above 1 in the middle.
41172
+ * @example
41173
+ * ```ts
41174
+ * applyEase("out", 0.5); // 0.75
41175
+ * applyEase("inCubic", 0.5); // 0.125
41176
+ * ```
41177
+ */
41178
+ function applyEase(ease, t) {
41179
+ EASED[0] = t;
41180
+ easeCell(ease, EASED, 0);
41181
+ return EASED[0] ?? 0;
41182
+ }
41086
41183
  //#endregion
41087
41184
  //#region src/plugins/anim/tween/advance.ts
41088
41185
  /**
@@ -42510,10 +42607,45 @@ function parseNine(value) {
42510
42607
  };
42511
42608
  }
42512
42609
  /**
42610
+ * Reads a value that must be a finite number of 0 or more.
42611
+ *
42612
+ * @param value - Anything that came out of JSON.
42613
+ * @returns The number, or `undefined` for anything else, a missing field included.
42614
+ * @example
42615
+ * ```ts
42616
+ * sizeAt(0); // 0
42617
+ * ```
42618
+ */
42619
+ function sizeAt(value) {
42620
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
42621
+ }
42622
+ /**
42623
+ * Reads the trim fields of an atlas frame (F198): `offsetX`, `offsetY`, `origWidth` and `origHeight`.
42624
+ * Each must be a finite number of 0 or more; `numberAt` is not used, because it turns a missing field
42625
+ * into 0 and 0 is a legal offset. The four are kept together or not at all: a frame that lost one is
42626
+ * the whole image, as every older manifest says.
42627
+ *
42628
+ * @param value - The `atlas` object.
42629
+ * @returns The four fields, or `undefined` when any of them is missing or not such a number.
42630
+ */
42631
+ function parseTrim(value) {
42632
+ const offsetX = sizeAt(value.offsetX);
42633
+ const offsetY = sizeAt(value.offsetY);
42634
+ const origWidth = sizeAt(value.origWidth);
42635
+ const origHeight = sizeAt(value.origHeight);
42636
+ if (offsetX === void 0 || offsetY === void 0 || origWidth === void 0 || origHeight === void 0) return;
42637
+ return {
42638
+ offsetX,
42639
+ offsetY,
42640
+ origWidth,
42641
+ origHeight
42642
+ };
42643
+ }
42644
+ /**
42513
42645
  * Reads the atlas placement of a packed file.
42514
42646
  *
42515
42647
  * @param value - What the `atlas` field carried.
42516
- * @returns The frame, or `undefined`.
42648
+ * @returns The frame, with its trim fields when it has all four, or `undefined`.
42517
42649
  */
42518
42650
  function parseAtlas(value) {
42519
42651
  if (!isRecord$3(value)) return void 0;
@@ -42522,7 +42654,8 @@ function parseAtlas(value) {
42522
42654
  x: numberAt(value, "x"),
42523
42655
  y: numberAt(value, "y"),
42524
42656
  width: numberAt(value, "width"),
42525
- height: numberAt(value, "height")
42657
+ height: numberAt(value, "height"),
42658
+ ...parseTrim(value)
42526
42659
  };
42527
42660
  }
42528
42661
  /**
@@ -68035,24 +68168,49 @@ function levelTo(ctx, layout, element, target) {
68035
68168
  layout.playTrack(element, (view) => view.tween(OverlayLevel, { level }, track));
68036
68169
  }
68037
68170
  /**
68171
+ * The fade of an entering overlay from its mount frame on (F205). Its track starts in phase `sync`, after that frame's
68172
+ * `animate` step, so it first moves in the next frame and the mount frame would draw the dim at 0. So the level is
68173
+ * written now where the fade is after the frame's time, and the track runs the rest of the fade: it lands `fade` after
68174
+ * the mount, on the same curve within a hundredth. A frame as long as the fade sets the level at once.
68175
+ *
68176
+ * @param ctx - Domain context of the ui plugin.
68177
+ * @param element - The entering overlay.
68178
+ * @param fade - The track of its `fade`.
68179
+ * @param deltaMs - The game time of the mount frame.
68180
+ * @returns The rest of the track, or `undefined` for a level written at once.
68181
+ */
68182
+ function fadeFromMount(ctx, element, fade, deltaMs) {
68183
+ if (deltaMs <= 0) return fade;
68184
+ if (deltaMs >= fade.ms) return void 0;
68185
+ const level = applyEase(fade.ease ?? "out", deltaMs / fade.ms);
68186
+ ctx.deps.world.ecs.set(element.entity, OverlayLevel, { level });
68187
+ return {
68188
+ ...fade,
68189
+ ms: fade.ms - deltaMs
68190
+ };
68191
+ }
68192
+ /**
68038
68193
  * Starts the level of an entering overlay with its enter motion: 0 to 1 over the root's own motion, or over `fade`
68039
- * when it played none; `fade` 0 sets it at once, and the next solve lands it.
68194
+ * when it played none, already the mount frame's time into it (F205); `fade` 0 sets it at once, and the next solve
68195
+ * lands it.
68040
68196
  *
68041
68197
  * @param ctx - Domain context of the ui plugin.
68042
68198
  * @param state - The jsx state.
68043
68199
  * @param layout - The layout module.
68044
- * @param entering - The entering element and the longest timed track its enter hook started.
68200
+ * @param entering - The entering element, the longest timed track its enter hook started, and the frame's time.
68045
68201
  * @param entering.element - The entering element.
68046
68202
  * @param entering.span - The span its enter hook played.
68203
+ * @param entering.deltaMs - The game time of the frame it enters in.
68047
68204
  */
68048
68205
  function enterOverlay(ctx, state, layout, entering) {
68049
- const { element, span } = entering;
68206
+ const { element, span, deltaMs } = entering;
68050
68207
  const value = overlayOf(element);
68051
68208
  if (value === void 0) return;
68052
68209
  state.overlays.add(element.entity);
68210
+ const track = levelTrack(span, value.fade, "out");
68053
68211
  levelTo(ctx, layout, element, {
68054
68212
  level: 1,
68055
- track: levelTrack(span, value.fade, "out")
68213
+ track: track === void 0 || span.end > 0 ? track : fadeFromMount(ctx, element, track, deltaMs)
68056
68214
  });
68057
68215
  }
68058
68216
  /**
@@ -70881,8 +71039,10 @@ function createReconciler(ctx, modules, fields) {
70881
71039
  * loop and the level of an overlay start in the frame the root is first drawn. While nothing was
70882
71040
  * queued since the last call and no root was released, the queue holds only held enters and is
70883
71041
  * not walked.
71042
+ *
71043
+ * @param time - The frame's time: the level of a fading overlay starts that far into its fade (F205).
70884
71044
  */
70885
- function playEntered() {
71045
+ function playEntered(time = NO_TIME) {
70886
71046
  const entering = state.entering;
70887
71047
  const version = ctx.deps.world.projection.membershipVersion();
70888
71048
  if (entering.count === heldEnters && version === enteredSeen) return;
@@ -70895,7 +71055,7 @@ function createReconciler(ctx, modules, fields) {
70895
71055
  if (isAside(element.root)) {
70896
71056
  entering.list[held] = entity;
70897
71057
  held += 1;
70898
- } else playEnter(element);
71058
+ } else playEnter(element, time.delta);
70899
71059
  }
70900
71060
  entering.count = held;
70901
71061
  heldEnters = held;
@@ -70905,8 +71065,9 @@ function createReconciler(ctx, modules, fields) {
70905
71065
  * scrolled in is not new: it plays no `enter` hook, only its loop starts.
70906
71066
  *
70907
71067
  * @param element - The element the `Box` was attached to.
71068
+ * @param deltaMs - The game time of the frame it enters in.
70908
71069
  */
70909
- function playEnter(element) {
71070
+ function playEnter(element, deltaMs) {
70910
71071
  if (element.entered) return;
70911
71072
  element.entered = true;
70912
71073
  if (element.scrolledIn) modules.layout.loop(element);
@@ -70916,7 +71077,8 @@ function createReconciler(ctx, modules, fields) {
70916
71077
  modules.layout.enter(element, span);
70917
71078
  enterOverlay(ctx, state, modules.layout, {
70918
71079
  element,
70919
- span
71080
+ span,
71081
+ deltaMs
70920
71082
  });
70921
71083
  }
70922
71084
  }
@@ -75797,7 +75959,7 @@ function openRegistrations(ctx, jsx, layout) {
75797
75959
  name: "ui.enter",
75798
75960
  phase: "sync",
75799
75961
  query: [],
75800
- run: () => jsx.playEntered()
75962
+ run: (_rows, frame) => jsx.playEntered(frame.time)
75801
75963
  })), ecs.onAdded(Tree, (entity) => {
75802
75964
  const place = projection.keyOf(entity);
75803
75965
  jsx.mountRoot(entity, place?.projection ?? "ui", ecs.get(entity, Layer)?.name ?? "ui");
@@ -1,7 +1,7 @@
1
- import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-BFoRyZqu.mjs";
2
- import { t as createApp } from "./index-bracik73.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-DY1ck0TP.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-Def8N-1F.mjs";
1
+ import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-NOciAl87.mjs";
2
+ import { t as createApp } from "./index-BFbScS-y.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-DVNJ6JUa.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-BcgzSec_.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/clock/fake.d.ts
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-Dq7gGhN4.mjs";
1
+ import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-BR2Uw9Xz.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-DeD9wis6.mjs";
3
3
  import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-BuXptVI_.mjs";
@@ -1,5 +1,5 @@
1
- import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-BFoRyZqu.mjs";
2
- import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-CwQ1ySw5.mjs";
1
+ import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-NOciAl87.mjs";
2
+ import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-rsz4pIqe.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -1,5 +1,5 @@
1
- import { $r as Snapshot, Wr as Json } from "./types-BFoRyZqu.mjs";
2
- import { t as HeadlessApp } from "./headless-Def8N-1F.mjs";
1
+ import { $r as Snapshot, Wr as Json } from "./types-NOciAl87.mjs";
2
+ import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,7 +1,7 @@
1
- import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-BFoRyZqu.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-Bj1uc5Qt.mjs";
3
- import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-CwQ1ySw5.mjs";
4
- import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-bracik73.mjs";
1
+ import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-NOciAl87.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-BDCkyWXq.mjs";
3
+ import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-rsz4pIqe.mjs";
4
+ import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-BFbScS-y.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts