@moku-labs/game 0.15.75 → 0.15.76

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/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-DwWNTjMx.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-CHyBg6X6.mjs";
2
2
  import { t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
package/dist/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 type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, 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 to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, 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-DwWNTjMx.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 type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, 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 to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, 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-CHyBg6X6.mjs";
2
2
  import { $ as Layer, B as Display, C as defineStyle, E as bind, G as Parent, H as NineSlice, J as Transform, K as Shape, O as defineTextStyles, Q as Exiting, S as defineTokens, T as Text, U as Overlay, V as HudPart, Z as sprite, _ as ScrollState, at as resource, b as popup, ct as tag, d as Box, et as Now, h as LocalWrite, it as mut, k as label, nt as Tree, ot as system, p as DebugTrigger, q as Sprite, rt as component, tt as Order, w as Countdown } from "./visual-B7TxMv1J.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, contribution, 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 };
@@ -3,7 +3,7 @@ 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 compact, c as collectFlows, d as findNode, f as framePath, g as slotNames, h as restlessCapOf, 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, v as pushEntry } from "./capture-BtS6_oWr.mjs";
5
5
  import { $ as Layer, A as readStyle, B as Display, D as builtInStyles, F as parentOf$1, G as Parent, H as NineSlice, I as poseUnder, J as Transform, K as Shape, L as rootPointOf, M as applyPose, N as isLeaving, P as localPoseOf, Q as Exiting, R as rootPoseInto, T as Text, U as Overlay, V as HudPart, W as OverlayLevel, X as componentsFor, Y as arcDefaults, _ as ScrollState, a as fitScaleOf, at as resource, c as samePose, ct as tag, d as Box, et as Now, f as Covered, g as Scroll, h as LocalWrite, i as fieldsLeftAlone, j as textFor, l as visualOf$1, m as Escapable, n as CONTENT$1, nt as Tree, o as livePatch, ot as system, p as DebugTrigger, q as Sprite, r as drawnRect, rt as component, s as restValueOf, st as systemsFor, tt as Order, u as visualRectOf, v as UI_OWNER, w as Countdown, x as uiFor, y as UiCounters, z as rootPoseOf } from "./visual-B7TxMv1J.mjs";
6
- import { a as isDev$1 } from "./dev-BNndV-hU.mjs";
6
+ import { a as isDev } from "./dev-BNndV-hU.mjs";
7
7
  import { n as isComponentDefinition } from "./component-DGg5DqKK.mjs";
8
8
  import { n as flatten } from "./flatten-nUX9PpGo.mjs";
9
9
  import { envPlugin, logPlugin } from "@moku-labs/common/browser";
@@ -3422,15 +3422,7 @@ function objectEquals(left, right) {
3422
3422
  * for an answer that arrived while the gate was closed, and the `guide` narrow.
3423
3423
  */
3424
3424
  /**
3425
- * Tells whether the dev log is on: a dev build, `__MOKU_GAME_DEV__` defined true.
3426
- *
3427
- * @returns True in a dev build.
3428
- */
3429
- function isDev() {
3430
- return typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__;
3431
- }
3432
- /**
3433
- * Logs, in a dev build, an answer a closed gate refused that no gate will take (F122). The payload
3425
+ * Logs, in a dev or agent build, an answer a closed gate refused that no gate will take (F122). The payload
3434
3426
  * is built only when the line is written.
3435
3427
  *
3436
3428
  * @param ctx - Domain context of the flow plugin.
@@ -3438,7 +3430,7 @@ function isDev() {
3438
3430
  * @param reason - Why no gate takes it.
3439
3431
  */
3440
3432
  function dropped(ctx, answer, reason) {
3441
- if (!isDev()) return;
3433
+ if (!(typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__ || typeof __MOKU_GAME_AGENT__ !== "undefined" && __MOKU_GAME_AGENT__)) return;
3442
3434
  ctx.log.warn("flow:answer-dropped", {
3443
3435
  intent: answer.intent,
3444
3436
  payload: answer.payload,
@@ -49957,7 +49949,7 @@ function bake(ectx, id) {
49957
49949
  }
49958
49950
  textures.push(texture);
49959
49951
  }
49960
- const baked = bakeEmitter(definition, isDev$1() ? firstSource(ectx, id, keys, textures) : textures);
49952
+ const baked = bakeEmitter(definition, isDev() ? firstSource(ectx, id, keys, textures) : textures);
49961
49953
  state.baked.set(id, baked);
49962
49954
  return baked;
49963
49955
  }
@@ -51830,14 +51822,6 @@ const Pointer = /*#__PURE__*/ resource("Pointer", pointerDefaults);
51830
51822
  //#endregion
51831
51823
  //#region src/plugins/input/lost.ts
51832
51824
  /**
51833
- * Tells whether the dev log is on: a dev build, `__MOKU_GAME_DEV__` defined true.
51834
- *
51835
- * @returns True in a dev build.
51836
- */
51837
- function dev() {
51838
- return typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__;
51839
- }
51840
- /**
51841
51825
  * Logs a press that wore the press look of a button and will not be a tap. Only a pressed view
51842
51826
  * that carries `Tappable` (or left the world during the press) is told; a press caught by a
51843
51827
  * scroll was the scroll's from its start, and a view without a tap has nothing to lose.
@@ -51846,7 +51830,7 @@ function dev() {
51846
51830
  * @param reason - Why the press is lost.
51847
51831
  */
51848
51832
  function lostPress(ctx, reason) {
51849
- if (!dev()) return;
51833
+ if (!(typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__ || typeof __MOKU_GAME_AGENT__ !== "undefined" && __MOKU_GAME_AGENT__)) return;
51850
51834
  const { entity, caught, key } = ctx.state;
51851
51835
  if (entity === void 0 || caught) return;
51852
51836
  if (reason !== "view-gone" && !ctx.deps.world.ecs.has(entity, Tappable)) return;
@@ -51857,9 +51841,10 @@ function lostPress(ctx, reason) {
51857
51841
  }
51858
51842
  /**
51859
51843
  * Logs an answer the gate did not take. A closed gate holds it for the next gate, so that is told
51860
- * at debug level only: `flow` warns `flow:answer-dropped` when no gate takes the held answer. Otherwise the line says what
51861
- * the gate said: `no-edge`, the resting node does not list the intent; `refused`, a guide's narrow
51862
- * dropped it and names no `blocked`; `blocked`, it answered the guide's `blocked` in its place.
51844
+ * at debug level only; `flow` warns `flow:answer-dropped` when no gate takes the held answer.
51845
+ * Otherwise the line says what the gate said: `no-edge`, the resting node does not list the
51846
+ * intent; `refused`, a guide's narrow dropped it and names no `blocked`; `blocked`, it answered the
51847
+ * guide's `blocked` in its place.
51863
51848
  *
51864
51849
  * @param ctx - Domain context of the input plugin.
51865
51850
  * @param entity - The view the answer came from.
@@ -51870,7 +51855,7 @@ function lostPress(ctx, reason) {
51870
51855
  * @param blocked - Whether the guide's `blocked` was taken in the answer's place.
51871
51856
  */
51872
51857
  function lostAnswer(ctx, entity, answer, gate, blocked) {
51873
- if (!dev()) return;
51858
+ if (!(typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__ || typeof __MOKU_GAME_AGENT__ !== "undefined" && __MOKU_GAME_AGENT__)) return;
51874
51859
  const view = ctx.deps.world.projection.keyOf(entity) ?? entity;
51875
51860
  if (!gate.open && !blocked) {
51876
51861
  ctx.log.debug("input: counted, the gate is closed: held for the next gate", {
@@ -52027,8 +52012,8 @@ function notifyTap(ctx, entity) {
52027
52012
  * A press the narrow of a guide drops — another intent, or the allowed intent with another
52028
52013
  * payload (a drop on the wrong cell) — answers the guide's `blocked` instead, once, when the gate
52029
52014
  * is open and the guide names one. A closed gate holds the press as it is and converts nothing.
52030
- * The gate's state is read only for a refused answer, never for an accepted one. A dev build logs
52031
- * the refusal with the view and what the gate said (F122).
52015
+ * The gate's state is read only for a refused answer, never for an accepted one. A dev or agent
52016
+ * build logs the refusal with the view and what the gate said (F122).
52032
52017
  *
52033
52018
  * @param ctx - Domain context of the input plugin.
52034
52019
  * @param entity - The view the answer came from, for the warning.
@@ -54820,7 +54805,7 @@ function playHaptic(ctx, provider, kind) {
54820
54805
  safely(ctx.log, "haptic", () => provider.haptic(kind));
54821
54806
  return;
54822
54807
  }
54823
- if (!isDev$1() || ctx.state.warned.has(kind)) return;
54808
+ if (!isDev() || ctx.state.warned.has(kind)) return;
54824
54809
  ctx.state.warned.add(kind);
54825
54810
  ctx.log.warn("platform: unknown haptic kind", { kind });
54826
54811
  }
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-DwWNTjMx.mjs";
1
+ import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-CHyBg6X6.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.75",
3
+ "version": "0.15.76",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [