@moku-labs/game 0.15.120 → 0.15.122

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/README.md CHANGED
@@ -163,10 +163,10 @@ The engine bin `moku-game` serves, builds and packs a game folder. A game writes
163
163
  | Command | Does |
164
164
  |---|---|
165
165
  | `moku-game dev [--port 3000] [--packed]` | Serves the game with hot reload. Prints the bound URL, also for `--port 0`. On the raw files it runs the scan of `keys` at start and on a save of an asset or a strings file. Restarts its server when the installed engine changes |
166
- | `moku-game build [--out dist/web] [--debug[=full] [--editor host:port]]` | Packs the assets and builds the page; `--debug` adds the editor's page agent (read and cosmetic commands), `--debug=full` every command; `--editor` names where the agent finds the editor (default `127.0.0.1:47600`). A debug page is never shipped: a release page that carries the agent is refused |
167
- | `moku-game native build <target> [--simulator] [--debug[=full] [--editor host:port]]` | Builds the native app: `ios`, `macos`, `android`; `--debug` builds an Android or iOS debug app beside the store app |
166
+ | `moku-game build [--out dist/web] [--debug[=full] [--editor host:port\|lan]]` | Packs the assets and builds the page; `--debug` adds the editor's page agent (read and cosmetic commands), `--debug=full` every command; `--editor` names where the agent finds the editor (default `127.0.0.1:47600`), `lan` this computer's LAN IPv4 at port 47600 and `lan:<port>` at that port, for a phone on the same Wi-Fi. A debug page is never shipped: a release page that carries the agent is refused |
167
+ | `moku-game native build <target> [--simulator] [--debug[=full] [--editor host:port\|lan]]` | Builds the native app: `ios`, `macos`, `android`; `--debug` builds an Android or iOS debug app beside the store app. An iOS debug build for a device exports for `debugging` and then prints the two `xcrun devicectl` lines that install its `.ipa` from `dist-native/ios-debug` on an iPhone by cable |
168
168
  | `moku-game native build <target> --store --build-number <n>` | A store build: an `.aab` on `android`, an `.ipa` for App Store Connect on `ios`. The version comes from `package.json`, the signing from `native.signing`. Everything wrong is refused at once, before anything compiles |
169
- | `moku-game native build <target> --store --dev --build-number <n>` | The test app of `native.dev`: store-signed, under its own `.dev` id, with the overlay and no editor link, in `dist-native-dev` |
169
+ | `moku-game native build <target> --store --dev --build-number <n> [--editor host:port\|lan]` | The test app of `native.dev`: store-signed, under its own `.dev` id, with the overlay, in `dist-native-dev`; no editor link, unless `--editor` gives one; the link on a dev build is iOS only for now (the build then asks for the local network) |
170
170
  | `moku-game native build ios --store [--dev] --build-number <n> --upload` | The iOS store build, then the upload of its `.ipa` to App Store Connect with the App Store Connect key of `native.signing.apple`, or of `APPLE_API_KEY`, `APPLE_API_ISSUER`, `APPLE_API_KEY_PATH`; TestFlight shows it after Apple processes it |
171
171
  | `moku-game native dev <target>` | Runs the native shell on the dev server |
172
172
  | `moku-game native doctor`, `native clean` | Checks or removes the native project; `clean` also the test and iOS debug projects |
@@ -1,4 +1,4 @@
1
- import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-CKCNyjAI.mjs";
1
+ import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-Lh8Ql5Lv.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Yr as PlayerStateProvider } from "../types-TmWmx6Ca.mjs";
2
- import { Et as PlatformProvider } from "../index-DSTbAOZZ.mjs";
3
- import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-CKCNyjAI.mjs";
1
+ import { Yr as PlayerStateProvider } from "../types-DuGiHe3k.mjs";
2
+ import { Et as PlatformProvider } from "../index-BhMPDwA9.mjs";
3
+ import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-Lh8Ql5Lv.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 { Wr as Json } from "./types-TmWmx6Ca.mjs";
2
- import { J as StringTable } from "./types-DOsd3uSB.mjs";
3
- import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-CKCNyjAI.mjs";
1
+ import { Wr as Json } from "./types-DuGiHe3k.mjs";
2
+ import { J as StringTable } from "./types-Dpd8geJW.mjs";
3
+ import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-Lh8Ql5Lv.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 { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-CvDV2vqI.mjs";
1
+ import { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-uuF4Ry3D.mjs";
2
2
  import { t as memory } from "./memory-DeD9wis6.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-TmWmx6Ca.mjs";
1
+ import { d as Manifest } from "./types-DuGiHe3k.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ 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
4
  import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-BRTUagOC.mjs";
5
5
  import { constants, copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
6
- import { homedir } from "node:os";
6
+ import { homedir, networkInterfaces } from "node:os";
7
7
  import path from "node:path";
8
8
  import { createBrandConsole } from "@moku-labs/common/cli";
9
9
  import { parseArgs } from "node:util";
@@ -1549,13 +1549,15 @@ async function serveChild(run, deps) {
1549
1549
  * the agent and control flags, a marked title, a build id and the app id. The output works from any
1550
1550
  * http sub-path and from the Tauri protocol: every link starts with `./`, and the page reads
1551
1551
  * `manifest.json` next to itself. Under `MOKU_NATIVE_PROFILE=dev`, a test app's web build, the page
1552
- * must be a debug page, with control and no link to the editor. Node and Bun only: the bin bundles it.
1552
+ * must be a debug page with control, with no link to the editor unless `--editor` gives one. Node
1553
+ * and Bun only: the bin bundles it.
1553
1554
  */
1554
1555
  /** The address the page agent of a debug page dials without `--editor`. */
1555
1556
  const DEFAULT_EDITOR = "127.0.0.1:47600";
1556
1557
  /**
1557
- * What a test app's page holds in place of an address: the editor's agent opens no socket and the
1558
- * overlay works alone. A contract with the editor, see `__MOKU_GAME_EDITOR__`.
1558
+ * What a test app's page holds in place of an address, no link unless `--editor`: the editor's
1559
+ * agent opens no socket and the overlay works alone. A contract with the editor, see
1560
+ * `__MOKU_GAME_EDITOR__`.
1559
1561
  */
1560
1562
  const EDITOR_OFF = "off";
1561
1563
  /** `MOKU_NATIVE_PROFILE` of a test app's web build. */
@@ -2009,15 +2011,13 @@ function refuseTestAppRelease(run, env) {
2009
2011
  throw new Error("[game] build: MOKU_NATIVE_PROFILE is dev: a dev page carries the overlay.");
2010
2012
  }
2011
2013
  /**
2012
- * Refuses the flags that have no place on a test app's page: its agent dials nothing, and a tester
2013
- * runs every command.
2014
+ * Refuses the flag that has no place on a test app's page: a tester runs every command. Its link
2015
+ * to the editor is the person's choice, so `--editor` passes.
2014
2016
  *
2015
- * @param run - The flags of the run.
2016
2017
  * @param level - The profile of the run.
2017
- * @throws {Error} When `--editor` or `--debug=read` was given.
2018
+ * @throws {Error} When `--debug=read` was given.
2018
2019
  */
2019
- function refuseTestAppFlags(run, level) {
2020
- if (run.editor !== void 0) throw new Error("[game] build: MOKU_NATIVE_PROFILE is dev: a dev page has no editor link.\n Build it without --editor.");
2020
+ function refuseTestAppFlags(level) {
2021
2021
  if (level === "read") throw new Error("[game] build: MOKU_NATIVE_PROFILE is dev: a dev page runs every command.\n Build it with --debug.");
2022
2022
  }
2023
2023
  /**
@@ -2050,22 +2050,22 @@ function resolveAgent(root, resolve) {
2050
2050
  /**
2051
2051
  * What a debug run builds its page with: the editor's page agent must resolve from the game, the
2052
2052
  * engine the page bundles is fingerprinted, and the app id comes from the native identifier. A test
2053
- * app's page (`MOKU_NATIVE_PROFILE=dev`) holds `EDITOR_OFF` for an address, over an editor that
2054
- * reads it.
2053
+ * app's page (`MOKU_NATIVE_PROFILE=dev`) holds the address of `--editor`, or `EDITOR_OFF` without
2054
+ * it, over an editor that reads `"off"`.
2055
2055
  *
2056
2056
  * @param run - The flags of a debug run.
2057
2057
  * @param level - Its profile.
2058
2058
  * @param settings - The resolved config, for the native identifier.
2059
2059
  * @param deps - The resolver, the clock and the environment.
2060
- * @returns The debug page and the engine fingerprint.
2060
+ * @returns The debug page, the engine fingerprint, and whether the page is a test app's.
2061
2061
  * @throws {Error} With the install line when the game cannot resolve `@moku-labs/editor`, when it
2062
- * cannot resolve `@moku-labs/game/hot`, and under the dev profile for `--editor`, `--debug=read`
2063
- * and an editor that does not read `"off"`.
2062
+ * cannot resolve `@moku-labs/game/hot`, and under the dev profile for `--debug=read` and an editor
2063
+ * that does not read `"off"`.
2064
2064
  */
2065
2065
  function debugPageOf(run, level, settings, deps) {
2066
2066
  const profile = deps.env.MOKU_NATIVE_PROFILE;
2067
2067
  const isTestApp = profile === TEST_APP_PROFILE;
2068
- if (isTestApp) refuseTestAppFlags(run, level);
2068
+ if (isTestApp) refuseTestAppFlags(level);
2069
2069
  const agent = resolveAgent(run.root, deps.resolve);
2070
2070
  if (isTestApp) refuseOldEditor(agent);
2071
2071
  const engine = engineFingerprint(run.root, hotPluginOf(run.root, deps.resolve));
@@ -2074,27 +2074,31 @@ function debugPageOf(run, level, settings, deps) {
2074
2074
  level,
2075
2075
  build: buildIdOf(deps.now()),
2076
2076
  engine: engine.id,
2077
- editor: isTestApp ? EDITOR_OFF : run.editor ?? DEFAULT_EDITOR,
2077
+ editor: run.editor ?? (isTestApp ? EDITOR_OFF : DEFAULT_EDITOR),
2078
2078
  app: appIdOf(settings.native, profile)
2079
2079
  },
2080
- engine
2080
+ engine,
2081
+ testApp: isTestApp
2081
2082
  };
2082
2083
  }
2083
2084
  /**
2084
2085
  * The warning a debug build prints before its size line: the profile, the build id, the engine and
2085
- * the editor address, and what the page is for: never a store, or a test app's track.
2086
+ * the editor address, and what the page is for: never a store, or a test app's track, with or
2087
+ * without its link to the editor.
2086
2088
  *
2087
2089
  * @param run - The flags of the run.
2088
2090
  * @param debug - The debug page and the engine fingerprint.
2089
2091
  * @param debug.page - What the page was built with.
2090
2092
  * @param debug.engine - The engine it bundles.
2093
+ * @param debug.testApp - Whether the page is a test app's (`MOKU_NATIVE_PROFILE=dev`).
2091
2094
  * @returns The line.
2092
2095
  */
2093
2096
  function debugWarning(run, debug) {
2094
- const { page, engine } = debug;
2097
+ const { page, engine, testApp } = debug;
2095
2098
  const control = page.level === "full" ? "every command, the state-changing ones too" : "read and cosmetic commands";
2096
2099
  const engineText = engineLine(engine, run.root).slice(7);
2097
- const use = page.editor === EDITOR_OFF ? "This is a DEV page for the store test track: overlay, no editor link." : "Never ship it to a store.";
2100
+ const testAppUse = page.editor === EDITOR_OFF ? "This is a DEV page for the store test track: overlay, no editor link." : `This is a DEV page for the store test track, with an editor link to ${page.editor}.`;
2101
+ const use = testApp ? testAppUse : "Never ship it to a store.";
2098
2102
  return `build: a DEBUG page with the editor agent, control: ${control}. Build ${page.build}, engine ${engineText}, editor ${page.editor}. ${use}`;
2099
2103
  }
2100
2104
  /**
@@ -2133,6 +2137,49 @@ async function runBuild(run, deps) {
2133
2137
  return 0;
2134
2138
  }
2135
2139
  //#endregion
2140
+ //#region src/app/lan.ts
2141
+ /**
2142
+ * Name prefixes of a Wi-Fi or wired card (macOS `en0`, Linux `wlan0`, `eth0`): their addresses are
2143
+ * tried first, so a VPN tunnel (`utun3`) a phone cannot reach is not picked.
2144
+ */
2145
+ const CARD_PREFIXES = [
2146
+ "en",
2147
+ "wl",
2148
+ "eth"
2149
+ ];
2150
+ /**
2151
+ * The first non-internal IPv4 address of the interfaces whose name passes a test.
2152
+ *
2153
+ * @param interfaces - The interface table.
2154
+ * @param named - The name test.
2155
+ * @returns The address, or `undefined`.
2156
+ * @example
2157
+ * ```ts
2158
+ * firstIpv4Of({ en0: [{ address: "192.168.1.5", family: "IPv4", internal: false }] }, () => true); // "192.168.1.5"
2159
+ * ```
2160
+ */
2161
+ function firstIpv4Of(interfaces, named) {
2162
+ for (const [name, addresses] of Object.entries(interfaces)) {
2163
+ const found = named(name) ? addresses?.find((entry) => entry.family === "IPv4" && !entry.internal) : void 0;
2164
+ if (found !== void 0) return found.address;
2165
+ }
2166
+ }
2167
+ /**
2168
+ * The LAN address of this computer: the first non-internal IPv4 of an interface whose name starts
2169
+ * with `en`, `wl` or `eth`, else the first non-internal IPv4 of any interface, else `undefined`
2170
+ * (the loopback only, or IPv6 only).
2171
+ *
2172
+ * @param interfaces - The interface table.
2173
+ * @returns The address, or `undefined`.
2174
+ * @example
2175
+ * ```ts
2176
+ * lanAddressOf({ utun3: [{ address: "10.8.0.2", family: "IPv4", internal: false }], en0: [{ address: "192.168.1.5", family: "IPv4", internal: false }] }); // "192.168.1.5"
2177
+ * ```
2178
+ */
2179
+ function lanAddressOf(interfaces) {
2180
+ return firstIpv4Of(interfaces, (name) => CARD_PREFIXES.some((prefix) => name.startsWith(prefix))) ?? firstIpv4Of(interfaces, () => true);
2181
+ }
2182
+ //#endregion
2136
2183
  //#region src/app/native.ts
2137
2184
  /**
2138
2185
  * @file The native verbs of `moku-game`: a game's `config.ts` as the config of `@moku-labs/native`,
@@ -2156,6 +2203,8 @@ const DEBUG_PROJECT = ".moku/tauri-debug";
2156
2203
  const STORE_OUT = "dist-native";
2157
2204
  /** Where the test apps land: native delivers one to `<outDir>/<target>`, as it does a store app. */
2158
2205
  const DEV_OUT = "dist-native-dev";
2206
+ /** The `Info.plist` line of a linked test app on iOS: why it asks for the local network. */
2207
+ const LOCAL_NETWORK_USAGE = "The debug link to the moku editor on your computer, over the local network.";
2159
2208
  /** The line of an `--upload` that finds no App Store Connect key, in `config.ts` or the env. */
2160
2209
  const NO_UPLOAD_KEY = "--upload needs an App Store Connect key. Add apiKeyId, apiIssuer and apiKeyPath to native.signing.apple, or set APPLE_API_KEY, APPLE_API_ISSUER and APPLE_API_KEY_PATH.";
2161
2210
  /**
@@ -2302,6 +2351,19 @@ function uploadFolderOf(cwd, store) {
2302
2351
  return path.join(cwd, store.dev === true ? DEV_OUT : STORE_OUT, "ios");
2303
2352
  }
2304
2353
  /**
2354
+ * The folder native leaves the `.ipa` of an iOS debug device build in, under `dist-native`.
2355
+ *
2356
+ * @param cwd - The game folder.
2357
+ * @returns The folder, absolute.
2358
+ * @example
2359
+ * ```ts
2360
+ * debugFolderOf("/g"); // "/g/dist-native/ios-debug"
2361
+ * ```
2362
+ */
2363
+ function debugFolderOf(cwd) {
2364
+ return path.join(cwd, STORE_OUT, "ios-debug");
2365
+ }
2366
+ /**
2305
2367
  * The password variables of an Android signing block that are unset or empty, by name only. The
2306
2368
  * key password falls back to the keystore's.
2307
2369
  *
@@ -2525,23 +2587,27 @@ function appOf(settings, identity, extras) {
2525
2587
  /**
2526
2588
  * The signing block of the native config. A debug build keeps native's SDK key, so it takes no
2527
2589
  * upload key, and neither does a plain build without its passwords, which Gradle would refuse only
2528
- * after the compile; a store build on iOS exports for App Store Connect, and only that one does.
2590
+ * after the compile; a store build on iOS exports for App Store Connect, and an iOS debug build for
2591
+ * a device exports for debugging, so a registered iPhone installs it by cable.
2529
2592
  *
2530
2593
  * @param native - The native section.
2531
2594
  * @param where - The game folder and the home folder.
2532
2595
  * @param target - The target of the verb.
2533
- * @param extras - The debug profile and the build number of this run.
2596
+ * @param extras - The debug profile and the build number of this run; it also reads `simulator`
2597
+ * and `unsigned`.
2534
2598
  * @returns The block, empty when there is nothing to pass.
2535
2599
  */
2536
2600
  function signingOf(native, where, target, extras) {
2537
2601
  const android = native.signing?.android;
2538
2602
  const teamId = native.signing?.apple?.teamId;
2539
2603
  const isStoreIos = target === "ios" && extras.buildNumber !== void 0;
2604
+ const isDebugDevice = target === "ios" && extras.debug !== void 0 && extras.simulator !== true;
2540
2605
  const keyStaysOut = android === void 0 || extras.debug !== void 0 || extras.unsigned === true;
2541
2606
  const apple = {
2542
2607
  ...teamId === void 0 ? {} : { teamId },
2543
2608
  ...target === "ios" ? { iosMinimumSystemVersion: native.ios?.minimumVersion ?? IOS_MINIMUM } : {},
2544
- ...isStoreIos ? { exportMethod: "app-store-connect" } : {}
2609
+ ...isStoreIos ? { exportMethod: "app-store-connect" } : {},
2610
+ ...isDebugDevice ? { exportMethod: "debugging" } : {}
2545
2611
  };
2546
2612
  return {
2547
2613
  ...keyStaysOut ? {} : { android: {
@@ -2552,14 +2618,42 @@ function signingOf(native, where, target, extras) {
2552
2618
  };
2553
2619
  }
2554
2620
  /**
2555
- * The iOS block of the native config. Native takes the manifest as an absolute path only.
2621
+ * The `Info.plist` keys of a test app with an editor link on iOS, over the game's own: the local
2622
+ * network line, unless the game wrote its own, and `NSAllowsLocalNetworking` added to the game's
2623
+ * App Transport Security dict, or the dict made. An ATS value that is no dict stays as it is.
2624
+ *
2625
+ * @param infoPlist - The game's `native.ios.infoPlist`.
2626
+ * @returns The keys.
2627
+ * @example
2628
+ * ```ts
2629
+ * linkedPlistOf({ NSAppTransportSecurity: { NSAllowsArbitraryLoadsInWebContent: true } }); // { NSLocalNetworkUsageDescription: "The debug link to the moku editor on your computer, over the local network.", NSAppTransportSecurity: { NSAllowsArbitraryLoadsInWebContent: true, NSAllowsLocalNetworking: true } }
2630
+ * ```
2631
+ */
2632
+ function linkedPlistOf(infoPlist = {}) {
2633
+ const security = infoPlist.NSAppTransportSecurity;
2634
+ const isDict = typeof security === "object" && !Array.isArray(security);
2635
+ return {
2636
+ NSLocalNetworkUsageDescription: LOCAL_NETWORK_USAGE,
2637
+ ...infoPlist,
2638
+ NSAppTransportSecurity: isDict ? {
2639
+ ...security,
2640
+ NSAllowsLocalNetworking: true
2641
+ } : security ?? { NSAllowsLocalNetworking: true }
2642
+ };
2643
+ }
2644
+ /**
2645
+ * The iOS block of the native config. Native takes the manifest as an absolute path only. A test
2646
+ * app with an editor link on iOS adds the local network keys; native adds them itself to a debug
2647
+ * app.
2556
2648
  *
2557
2649
  * @param native - The native section.
2558
2650
  * @param cwd - The game folder.
2651
+ * @param target - The target of the verb.
2652
+ * @param extras - The dev flag and the editor link of this run.
2559
2653
  * @returns The block, empty when the game adds nothing to the bundle.
2560
2654
  */
2561
- function iosBundleOf(native, cwd) {
2562
- const infoPlist = native.ios?.infoPlist;
2655
+ function iosBundleOf(native, cwd, target, extras) {
2656
+ const infoPlist = target === "ios" && extras.dev === true && extras.editor !== void 0 ? linkedPlistOf(native.ios?.infoPlist) : native.ios?.infoPlist;
2563
2657
  const manifest = native.ios?.privacyManifest;
2564
2658
  return {
2565
2659
  ...infoPlist === void 0 ? {} : { infoPlist },
@@ -2603,7 +2697,8 @@ function testProjectsOf(cwd) {
2603
2697
  * builds its web page with the same profile and `--editor`; on Android its name and identifier stay
2604
2698
  * the game's and native renames it, on iOS the engine does, in a project of its own. A dev build is
2605
2699
  * a store build of the test app of `native.dev`, in its own project and output folders, with the
2606
- * full debug page. A build number means a store build.
2700
+ * full debug page, linked to the editor when `extras.editor` is set. A build number means a store
2701
+ * build.
2607
2702
  *
2608
2703
  * @param settings - The resolved `config.ts` of the game.
2609
2704
  * @param where - The game folder, the command that runs `moku-game` and the home folder.
@@ -2625,7 +2720,10 @@ function nativeConfigOf(settings, where, target, extras = {}) {
2625
2720
  app: appOf(settings, appIdentityOf(native, target, extras), extras),
2626
2721
  web: {
2627
2722
  cwd: where.cwd,
2628
- build: webBuildOf(where, isTestApp ? { level: "full" } : extras.debug),
2723
+ build: webBuildOf(where, isTestApp ? {
2724
+ level: "full",
2725
+ editor: extras.editor
2726
+ } : extras.debug),
2629
2727
  devCommand: `${where.command} dev --port ${DEV_PORT}`,
2630
2728
  devUrl: `http://127.0.0.1:${DEV_PORT}`,
2631
2729
  dist: path.join(where.cwd, "dist/web")
@@ -2636,7 +2734,7 @@ function nativeConfigOf(settings, where, target, extras = {}) {
2636
2734
  };
2637
2735
  const targets = native.targets ?? (target === void 0 ? void 0 : [target]);
2638
2736
  const signing = signingOf(native, where, target, extras);
2639
- const ios = iosBundleOf(native, where.cwd);
2737
+ const ios = iosBundleOf(native, where.cwd, target, extras);
2640
2738
  if (targets !== void 0) config.targets = targets;
2641
2739
  if (Object.keys(signing).length > 0) config.signing = signing;
2642
2740
  if (Object.keys(ios).length > 0) config.ios = ios;
@@ -2691,13 +2789,15 @@ async function runVerb(cli, verb, target, options) {
2691
2789
  }
2692
2790
  /**
2693
2791
  * What this run adds to the native config. A version that is not `x.y.z` stays out, and native
2694
- * falls back to its own; `--store` has refused one before this reads it.
2792
+ * falls back to its own; `--store` has refused one before this reads it. The editor of a test app
2793
+ * goes on its own, a debug app's in its profile.
2695
2794
  *
2696
2795
  * @param options - The verb options.
2697
2796
  * @returns The extras of `nativeConfigOf`.
2698
2797
  */
2699
2798
  function extrasOf(options) {
2700
- const { debug, editor, store, unsigned, version } = options;
2799
+ const { debug, editor, store, unsigned, version, simulator } = options;
2800
+ const isLinkedTestApp = debug === void 0 && store?.dev === true && editor !== void 0;
2701
2801
  return {
2702
2802
  ...debug === void 0 ? {} : { debug: {
2703
2803
  level: debug,
@@ -2705,6 +2805,8 @@ function extrasOf(options) {
2705
2805
  } },
2706
2806
  ...store === void 0 ? {} : { buildNumber: store.buildNumber },
2707
2807
  ...store?.dev === true ? { dev: true } : {},
2808
+ ...isLinkedTestApp ? { editor } : {},
2809
+ ...simulator === void 0 ? {} : { simulator },
2708
2810
  ...unsigned === void 0 ? {} : { unsigned },
2709
2811
  ...version !== void 0 && STORE_VERSION.test(version) ? { version } : {}
2710
2812
  };
@@ -3016,8 +3118,9 @@ async function runVisual(command, deps) {
3016
3118
  * `parseArgs`, then one of `dev`, `build`, `native <verb>`, `keys`, `pack`, `visual` or `help`.
3017
3119
  * Every seam of the process (the console, the environment, spawning, signals, the watcher, the
3018
3120
  * keys watch, the asset scanner, native, Bun's resolver, the visual test runner, the home folder,
3019
- * the file check, the folder listing, the game's version) comes in as `deps`, so a test runs a
3020
- * command with stubs. It returns the exit code and never exits itself. A plain function, on no API.
3121
+ * the file check, the folder listing, the network interfaces, the game's version) comes in as
3122
+ * `deps`, so a test runs a command with stubs. It returns the exit code and never exits itself. A
3123
+ * plain function, on no API.
3021
3124
  */
3022
3125
  /** The flags every command takes. */
3023
3126
  const GLOBAL_OPTIONS = [
@@ -3118,6 +3221,10 @@ const MAX_PORT = 65535;
3118
3221
  const MAX_BUILD_NUMBER = 21e8;
3119
3222
  /** A host of `--editor`: a name or an IPv4 address, or an IPv6 address in brackets. */
3120
3223
  const EDITOR_HOST = /^(?:[\w.-]+|\[[\da-f:.]+\])$/i;
3224
+ /** The host of `--editor` that stands for the LAN address of this computer: `lan` or `lan:<port>`. */
3225
+ const LAN_HOST = "lan";
3226
+ /** The port of `--editor lan` without one: the editor's LAN listener. */
3227
+ const EDITOR_PORT = "47600";
3121
3228
  /** The value a bare `--debug` reads as: the full profile, with no alias note. */
3122
3229
  const BARE_DEBUG = "";
3123
3230
  /** The one line `--debug=full` prints: the alias builds the same page as `--debug`. */
@@ -3127,10 +3234,10 @@ const USAGE = [
3127
3234
  "moku-game <command> [options]",
3128
3235
  "",
3129
3236
  " dev [--port 3000] [--packed] serve the game with hot reload",
3130
- " build [--out dist/web] [--debug [--editor host:port]] pack the assets and build the page; --debug adds the editor agent and control",
3131
- " native build <target> [--simulator] [--debug [--editor host:port]] build the native app (ios, macos, android)",
3237
+ " build [--out dist/web] [--debug [--editor host:port|lan]] pack the assets and build the page; --debug adds the editor agent and control",
3238
+ " native build <target> [--simulator] [--debug [--editor host:port|lan]] build the native app (ios, macos, android)",
3132
3239
  " native build <target> --store --build-number <n> a store build: an .aab on android, an .ipa on ios",
3133
- " native build <target> --store --dev --build-number <n> a store-signed test app from native.dev",
3240
+ " native build <target> --store --dev --build-number <n> [--editor host:port|lan] a store-signed test app from native.dev",
3134
3241
  " native build ios --store --build-number <n> --upload a store build, then the upload to App Store Connect",
3135
3242
  " native dev <target> run the native shell on the dev server",
3136
3243
  " native doctor | native clean check or remove the native project",
@@ -3281,23 +3388,31 @@ function noteFullAlias(parsed, ui) {
3281
3388
  if (parsed.values.debug === "full") ui.info(FULL_ALIAS_NOTE);
3282
3389
  }
3283
3390
  /**
3284
- * Reads `--editor`: the `host:port` the page agent of a debug page dials.
3391
+ * Reads `--editor`: the `host:port` the page agent of a debug page dials. `lan` stands for the LAN
3392
+ * address of this computer at port 47600, `lan:<port>` at that port; only then are the interfaces
3393
+ * read.
3285
3394
  *
3286
3395
  * @param value - The value of the flag.
3287
3396
  * @param command - The command word, for the message.
3397
+ * @param interfaces - The network interfaces of this computer.
3288
3398
  * @returns The address.
3289
- * @throws {Error} When the value is not a host and a whole port from 1 to 65535.
3399
+ * @throws {Error} When the value is not a host and a whole port from 1 to 65535, or `lan` finds no
3400
+ * LAN address.
3290
3401
  * @example
3291
3402
  * ```ts
3292
- * editorOf("192.168.1.20:47600"); // "192.168.1.20:47600"
3403
+ * editorOf("lan:47601", "build", () => ({ en0: [{ address: "192.168.1.5", family: "IPv4", internal: false }] })); // "192.168.1.5:47601"
3293
3404
  * ```
3294
3405
  */
3295
- function editorOf(value, command = "build") {
3296
- const colon = value.lastIndexOf(":");
3297
- const host = value.slice(0, Math.max(colon, 0));
3298
- const port = value.slice(colon + 1);
3406
+ function editorOf(value, command, interfaces) {
3407
+ const given = value === LAN_HOST ? `${LAN_HOST}:${EDITOR_PORT}` : value;
3408
+ const colon = given.lastIndexOf(":");
3409
+ const host = given.slice(0, Math.max(colon, 0));
3410
+ const port = given.slice(colon + 1);
3299
3411
  if (!(colon > 0 && EDITOR_HOST.test(host) && /^\d+$/.test(port) && Number(port) >= 1 && Number(port) <= MAX_PORT)) throw new Error(`[game] ${command}: --editor takes host:port, got "${value}".`);
3300
- return value;
3412
+ if (host !== LAN_HOST) return given;
3413
+ const lan = lanAddressOf(interfaces());
3414
+ if (lan === void 0) throw new Error(`[game] ${command}: --editor lan found no LAN address on this computer.\n Connect to a Wi-Fi or give --editor host:port.`);
3415
+ return `${lan}:${port}`;
3301
3416
  }
3302
3417
  /**
3303
3418
  * Reads `--port`: an integer 0-65535, 3000 when left out.
@@ -3380,7 +3495,7 @@ async function runNativeVerb(parsed, deps) {
3380
3495
  const verb = nativeVerbOf(word);
3381
3496
  refuseExtra(parsed, 2);
3382
3497
  const store = nativeStoreOf(parsed, verb, target);
3383
- const debug = nativeDebugOf(parsed, verb, target);
3498
+ const debug = nativeDebugOf(parsed, verb, target, deps.interfaces);
3384
3499
  noteFullAlias(parsed, deps.ui);
3385
3500
  const settings = await loadSettings(parsed.root);
3386
3501
  const version = deps.readPackageVersion(parsed.root);
@@ -3403,9 +3518,30 @@ async function runNativeVerb(parsed, deps) {
3403
3518
  warnIosStore(settings, target, deps.ui);
3404
3519
  } else if (isPlainAndroidBuild) leaveKeyOut(settings, options, deps);
3405
3520
  if (!await deps.native(verb, settings, where, options)) return 1;
3521
+ if (verb === "build" && target === "ios" && debug.debug !== void 0) printInstallLines(parsed, deps);
3406
3522
  return options.store?.upload === true ? uploadIpa(settings, where, options.store, deps) : 0;
3407
3523
  }
3408
3524
  /**
3525
+ * Prints how the `.ipa` of a green iOS debug device build reaches an iPhone by cable: the two
3526
+ * `xcrun devicectl` lines with the newest `.ipa` of the debug folder, or the way through Xcode when
3527
+ * the folder has none. A simulator build has no `.ipa`, so it prints nothing.
3528
+ *
3529
+ * @param parsed - The command line.
3530
+ * @param deps - The seams of the process.
3531
+ */
3532
+ function printInstallLines(parsed, deps) {
3533
+ if (parsed.values.simulator === true) return;
3534
+ const folder = debugFolderOf(parsed.root);
3535
+ const ipa = newestIpaOf(folder, deps);
3536
+ if (ipa === void 0) {
3537
+ deps.ui.info(`native: no .ipa in ${folder}; open it in Xcode → Window → Devices and Simulators to install.`);
3538
+ return;
3539
+ }
3540
+ deps.ui.info("native: install it on an iPhone by cable:");
3541
+ deps.ui.line(" xcrun devicectl list devices");
3542
+ deps.ui.line(` xcrun devicectl device install app --device <name or id> "${ipa}"`);
3543
+ }
3544
+ /**
3409
3545
  * Picks the newest `.ipa` of a folder by the time it was written.
3410
3546
  *
3411
3547
  * @param folder - The folder native leaves the `.ipa` in.
@@ -3520,25 +3656,29 @@ function warnIosStore(settings, target, ui) {
3520
3656
  }
3521
3657
  /**
3522
3658
  * Reads `--debug` and `--editor` of `moku-game native`: they go with `native build android` and
3523
- * `native build ios` only for now.
3659
+ * `native build ios` only for now. A dev store build (`--store --dev`) takes `--editor` alone,
3660
+ * which `nativeStoreOf` has let through.
3524
3661
  *
3525
3662
  * @param parsed - The command line.
3526
3663
  * @param verb - The native verb.
3527
3664
  * @param target - The target the command line names, unchecked.
3528
- * @returns The profile and the editor address as given, each only when given.
3529
- * @throws {Error} When either goes with another verb, `--editor` comes without `--debug`, a value
3530
- * is refused, or the target is neither `android` nor `ios`.
3665
+ * @param interfaces - The network interfaces of this computer, for `--editor lan`.
3666
+ * @returns The profile and the editor address, `lan` read to the LAN address, each only when given.
3667
+ * @throws {Error} When either goes with another verb, `--editor` comes without `--debug` outside a
3668
+ * dev store build, a value is refused, or the target is neither `android` nor `ios`.
3531
3669
  */
3532
- function nativeDebugOf(parsed, verb, target) {
3670
+ function nativeDebugOf(parsed, verb, target, interfaces) {
3533
3671
  const debug = debugLevelOf(parsed.values.debug, "native");
3534
3672
  const editor = parsed.values.editor;
3673
+ const isTestApp = parsed.values.store === true && parsed.values.dev === true;
3535
3674
  if (debug === void 0 && editor === void 0) return {};
3536
3675
  if (verb !== "build") throw new Error("[game] native: --debug goes with native build only.");
3676
+ if (isTestApp && editor !== void 0) return { editor: editorOf(editor, "native", interfaces) };
3537
3677
  if (debug === void 0) throw new Error("[game] native: --editor goes with --debug.");
3538
3678
  if (target !== void 0 && target !== "android" && target !== "ios") throw new Error(`[game] native: --debug builds Android and iOS only for now (got ${target}).`);
3539
3679
  return editor === void 0 ? { debug } : {
3540
3680
  debug,
3541
- editor: editorOf(editor, "native")
3681
+ editor: editorOf(editor, "native", interfaces)
3542
3682
  };
3543
3683
  }
3544
3684
  /**
@@ -3572,8 +3712,8 @@ function refuseWithoutStore(parsed) {
3572
3712
  /**
3573
3713
  * Reads `--store`, `--build-number`, `--dev` and `--upload` of `moku-game native`, before any
3574
3714
  * config is read: they go with `native build ios` and `native build android` only, one number for
3575
- * both stores, `--dev` turns the store build into the test app, and `--upload` sends an iOS one to
3576
- * App Store Connect.
3715
+ * both stores, `--dev` turns the store build into the test app, which may take `--editor`, and
3716
+ * `--upload` sends an iOS one to App Store Connect.
3577
3717
  *
3578
3718
  * @param parsed - The command line.
3579
3719
  * @param verb - The native verb.
@@ -3581,7 +3721,8 @@ function refuseWithoutStore(parsed) {
3581
3721
  * @returns The store flag, the number, `dev` and `upload`, or nothing without them.
3582
3722
  * @throws {Error} When the first two go without each other or with another verb or target, when
3583
3723
  * `--dev` or `--upload` goes without `--store`, when `--upload` goes with another target than
3584
- * ios, when `--debug`, `--editor` or `--simulator` comes along, or when the number is refused.
3724
+ * ios, when `--debug` or `--simulator` comes along, when `--editor` comes without `--dev`, or when
3725
+ * the number is refused.
3585
3726
  */
3586
3727
  function nativeStoreOf(parsed, verb, target) {
3587
3728
  const { store, dev, upload, "build-number": number } = parsed.values;
@@ -3590,13 +3731,11 @@ function nativeStoreOf(parsed, verb, target) {
3590
3731
  return {};
3591
3732
  }
3592
3733
  if (verb !== "build") throw new Error("[game] native: --store goes with native build only.");
3593
- const clash = [
3594
- "debug",
3595
- "editor",
3596
- "simulator"
3597
- ].find((flag) => parsed.values[flag] !== void 0);
3734
+ const clash = ["debug", "simulator"].find((flag) => parsed.values[flag] !== void 0);
3598
3735
  if (clash !== void 0) throw new Error(`[game] native: --store does not go with --${clash}.`);
3736
+ if (parsed.values.editor !== void 0 && dev !== true) throw new Error("[game] native: --editor goes with --debug or --store --dev.");
3599
3737
  if (target !== "ios" && target !== "android") throw new Error(`[game] native: --store builds ios or android, got ${target ?? "no target"}.`);
3738
+ if (parsed.values.editor !== void 0 && target === "android") throw new Error("[game] native: --store --dev --editor builds ios only for now.\n On Android use native build android --debug --editor host:port|lan.");
3600
3739
  if (number === void 0) throw new Error("[game] native: --store needs --build-number, the number of this upload.");
3601
3740
  const buildNumber = buildNumberOf(number);
3602
3741
  if (upload === true && target !== "ios") throw new Error("[game] native: --upload goes with ios.");
@@ -3684,7 +3823,7 @@ function hop(argv, parsed, deps) {
3684
3823
  }
3685
3824
  /**
3686
3825
  * Runs `moku-game build`: a release page, or with `--debug` a debug page whose agent dials
3687
- * `--editor` (`--debug=read` for the rare read-only page).
3826
+ * `--editor`, `lan` read to the LAN address (`--debug=read` for the rare read-only page).
3688
3827
  *
3689
3828
  * @param parsed - The command line.
3690
3829
  * @param deps - The process seams.
@@ -3703,7 +3842,7 @@ function runBuildCommand(parsed, deps) {
3703
3842
  out: path.resolve(deps.cwd, out),
3704
3843
  servePlugins: parsed.servePlugins,
3705
3844
  ...debug === void 0 ? {} : { debug },
3706
- ...editor === void 0 ? {} : { editor: editorOf(editor) }
3845
+ ...editor === void 0 ? {} : { editor: editorOf(editor, "build", deps.interfaces) }
3707
3846
  }, deps);
3708
3847
  }
3709
3848
  /**
@@ -4146,7 +4285,8 @@ function keysSeams(ui) {
4146
4285
  * started with, Bun's spawn and resolver, the signals, `fs.watch`, the keys watch, the asset
4147
4286
  * scanner with the string tools, native, the visual test runner, loaded only by
4148
4287
  * `moku-game visual`, and what a native build reads: the home folder, the file check, the folder
4149
- * listing of `--upload` and the version of the game's `package.json`.
4288
+ * listing of `--upload` and of the install lines, the network interfaces of `--editor lan` and the
4289
+ * version of the game's `package.json`.
4150
4290
  *
4151
4291
  * @returns The seams of this process.
4152
4292
  */
@@ -4178,6 +4318,7 @@ function processDeps() {
4178
4318
  home: homedir(),
4179
4319
  exists: existsSync,
4180
4320
  listFiles,
4321
+ interfaces: () => networkInterfaces(),
4181
4322
  readPackageVersion: packageVersionOf
4182
4323
  };
4183
4324
  }
@@ -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-TmWmx6Ca.mjs";
2
- import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-DmOnlY66.mjs";
3
- import { R as InputApi } from "./types-DOsd3uSB.mjs";
4
- import { t as HeadlessApp } from "./headless-DjvkUuv6.mjs";
5
- import { i as ControlApp, r as Command } from "./types-ohTEXbrA.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-DuGiHe3k.mjs";
2
+ import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-wsgkqOXF.mjs";
3
+ import { R as InputApi } from "./types-Dpd8geJW.mjs";
4
+ import { t as HeadlessApp } from "./headless-CwH40XSw.mjs";
5
+ import { i as ControlApp, r as Command } from "./types-B3OYUVNR.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-DjvkUuv6.mjs";
2
- import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-ohTEXbrA.mjs";
3
- import { t as commands } from "./commands-Cwxtb672.mjs";
4
- import { t as defineCommand } from "./define-BLFk9wyQ.mjs";
1
+ import { t as HeadlessApp } from "./headless-CwH40XSw.mjs";
2
+ import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-B3OYUVNR.mjs";
3
+ import { t as commands } from "./commands-BMeGOWws.mjs";
4
+ import { t as defineCommand } from "./define-h7SEyejf.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-DjvkUuv6.mjs";
2
- import { l as Source, r as Command, s as InputSchema } from "./types-ohTEXbrA.mjs";
1
+ import { t as HeadlessApp } from "./headless-CwH40XSw.mjs";
2
+ import { l as Source, r as Command, s as InputSchema } from "./types-B3OYUVNR.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-TmWmx6Ca.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-DuGiHe3k.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-TmWmx6Ca.mjs";
2
- import { $ as SfxDescriptor, 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, Q as HapticKind, 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, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-DmOnlY66.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-DOsd3uSB.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-DuGiHe3k.mjs";
2
+ import { $ as SfxDescriptor, 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, Q as HapticKind, 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, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-wsgkqOXF.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-Dpd8geJW.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-TmWmx6Ca.mjs";
2
- import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-DmOnlY66.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-DOsd3uSB.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-DSTbAOZZ.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-DuGiHe3k.mjs";
2
+ import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-wsgkqOXF.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-Dpd8geJW.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-BhMPDwA9.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-CvDV2vqI.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-uuF4Ry3D.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-TmWmx6Ca.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-DmOnlY66.mjs";
3
- import { c as UiNode } from "./types-DOsd3uSB.mjs";
4
- import { t as HeadlessApp } from "./headless-DjvkUuv6.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-ohTEXbrA.mjs";
6
- import { n as defineSource } from "./define-BLFk9wyQ.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-DuGiHe3k.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-wsgkqOXF.mjs";
3
+ import { c as UiNode } from "./types-Dpd8geJW.mjs";
4
+ import { t as HeadlessApp } from "./headless-CwH40XSw.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-B3OYUVNR.mjs";
6
+ import { n as defineSource } from "./define-h7SEyejf.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-Dl3k95wc.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-BoK0QMVt.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-Dl3k95wc.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-BoK0QMVt.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-DOsd3uSB.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-Dpd8geJW.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. */
@@ -37268,6 +37268,14 @@ function createSyncApi(ctx, deps) {
37268
37268
  for (const key of keys) state.invalidated.add(key);
37269
37269
  dropPooled(state, keys);
37270
37270
  },
37271
+ used: (keys) => {
37272
+ if (state.root === void 0) return false;
37273
+ for (let index = 0; index < keys.length; index += 1) {
37274
+ const key = keys[index];
37275
+ if (key !== void 0 && state.byKey.has(key)) return true;
37276
+ }
37277
+ return false;
37278
+ },
37271
37279
  upload: (textures) => uploadTextures(sctx, textures)
37272
37280
  },
37273
37281
  displays: { provide: (component, adapter) => provideDisplay(sctx, component, adapter, {
@@ -41733,6 +41741,22 @@ function indexKeys(manifest) {
41733
41741
  return index;
41734
41742
  }
41735
41743
  /**
41744
+ * Builds the key list of every bundle, each list frozen: what the budget asks `renderer` about and what an unload
41745
+ * invalidates, read once here instead of a `files.map` per call.
41746
+ *
41747
+ * @param manifest - The parsed manifest.
41748
+ * @returns Bundle name to its asset keys, in manifest order.
41749
+ * @example
41750
+ * ```ts
41751
+ * keysOfBundles(parseManifest(json)).get("ui"); // ["ui.button.primary", "ui.panel"]
41752
+ * ```
41753
+ */
41754
+ function keysOfBundles(manifest) {
41755
+ const keys = emptyMap$4();
41756
+ for (const [name, bundle] of Object.entries(manifest.bundles)) keys.set(name, Object.freeze(bundle.files.map((file) => file.key)));
41757
+ return keys;
41758
+ }
41759
+ /**
41736
41760
  * Works out the prefix of every file URL: the configured one, the folder of the manifest URL, or
41737
41761
  * the site root for an inline manifest.
41738
41762
  *
@@ -42268,7 +42292,7 @@ function finish$1(ctx, bundle, entry, assets, reason) {
42268
42292
  record.inflight = void 0;
42269
42293
  touch(ctx.state, record);
42270
42294
  ctx.state.readyFailed.delete(bundle);
42271
- ctx.deps.renderer.sync.textures.invalidate(entry.files.map((file) => file.key));
42295
+ ctx.deps.renderer.sync.textures.invalidate(bundleKeys(ctx.state, bundle));
42272
42296
  ctx.emit("assets:bundle-loaded", {
42273
42297
  bundle,
42274
42298
  tier: entry.tier,
@@ -42283,7 +42307,7 @@ function finish$1(ctx, bundle, entry, assets, reason) {
42283
42307
  reason
42284
42308
  });
42285
42309
  ctx.deps.time.wake();
42286
- enforceBudget(ctx);
42310
+ enforceBudget(ctx, bundle);
42287
42311
  }
42288
42312
  /**
42289
42313
  * Rolls one failed or aborted load back: what was uploaded is destroyed, every companion of the
@@ -42564,7 +42588,7 @@ async function fetchManifest(ctx, url) {
42564
42588
  return response.json();
42565
42589
  }
42566
42590
  /**
42567
- * Reads the manifest into the state and builds the key index.
42591
+ * Reads the manifest into the state and builds the key index and the key list of every bundle.
42568
42592
  *
42569
42593
  * @param ctx - Domain context of the plugin.
42570
42594
  * @throws {Error} In a browser, when the manifest cannot be read.
@@ -42576,6 +42600,7 @@ async function readManifest(ctx) {
42576
42600
  const raw = typeof source === "string" ? await fetchManifest(ctx, source) : source;
42577
42601
  ctx.state.manifest = parseManifest(raw);
42578
42602
  ctx.state.bundleOfKey = indexKeys(ctx.state.manifest);
42603
+ ctx.state.keysOf = keysOfBundles(ctx.state.manifest);
42579
42604
  } catch (error) {
42580
42605
  if (ctx.state.io !== void 0) throw error;
42581
42606
  ctx.log.warn("assets: the manifest could not be read", { error: String(error) });
@@ -42607,6 +42632,8 @@ async function bootTiers(ctx) {
42607
42632
  const HEAVIEST = 5;
42608
42633
  /** No feature holds a bundle: the stack as a leaving scene's non-`feature` bundle sees it. */
42609
42634
  const NO_FEATURES = Object.freeze(/* @__PURE__ */ new Set());
42635
+ /** The key list of a bundle the manifest walk did not list: nothing drawn, nothing to invalidate. */
42636
+ const NO_KEYS = Object.freeze([]);
42610
42637
  /**
42611
42638
  * Adds up the estimated texture memory of every loaded bundle.
42612
42639
  *
@@ -42622,24 +42649,50 @@ function usedMb(state) {
42622
42649
  return total;
42623
42650
  }
42624
42651
  /**
42625
- * Picks the bundle that leaves next: the loaded one with the smallest use counter that is not
42626
- * pinned, not named by the mounted, a leaving or the coming scene, not permanent and not in the preload queue. Its
42627
- * `release` is not read: a `"leave"` bundle is a candidate like any other.
42652
+ * Reads the asset keys of a bundle from the list the manifest walk froze; a bundle it did not list
42653
+ * has none. Nothing is built per call.
42628
42654
  *
42629
42655
  * @param state - The plugin state.
42656
+ * @param bundle - Name of the bundle.
42657
+ * @returns Its keys, frozen.
42658
+ */
42659
+ function bundleKeys(state, bundle) {
42660
+ return state.keysOf.get(bundle) ?? NO_KEYS;
42661
+ }
42662
+ /**
42663
+ * Tells whether the budget must leave a loaded bundle alone by the state alone: pinned, permanent, named by the
42664
+ * mounted, a leaving or the coming scene, in the preload queue, held after a reload, or the `except` of the pass.
42665
+ *
42666
+ * @param state - The plugin state.
42667
+ * @param name - Name of the bundle.
42668
+ * @param entry - Its manifest entry.
42669
+ * @param except - The bundle whose load started the pass, if any.
42670
+ * @returns True when it may not go.
42671
+ */
42672
+ function keptByState(state, name, entry, except) {
42673
+ return name === except || state.pinned.has(name) || isPermanent(entry.tier) || state.reloadHeld.has(name) || state.sceneNamed.includes(name) || state.sceneLeaving.includes(name) || state.sceneComing.includes(name) || state.queue?.bundles.includes(name) === true;
42674
+ }
42675
+ /**
42676
+ * Picks the bundle that leaves next: the loaded one with the smallest use counter that is not
42677
+ * pinned, not named by the mounted, a leaving or the coming scene, not permanent, not in the preload queue, not held
42678
+ * after a reload, not `except` and drawn by no view (`renderer.sync.textures.used`, asked last: it walks the keys).
42679
+ * Its `release` is not read: a `"leave"` bundle is a candidate like any other.
42680
+ *
42681
+ * @param ctx - Domain context of the plugin.
42682
+ * @param except - The bundle that may not go: the one whose load started this pass.
42630
42683
  * @returns The bundle name, or `undefined` when nothing may go.
42631
42684
  */
42632
- function pickVictim(state) {
42685
+ function pickVictim(ctx, except) {
42686
+ const state = ctx.state;
42687
+ const textures = ctx.deps.renderer.sync.textures;
42633
42688
  let victim;
42634
42689
  let smallest = Number.POSITIVE_INFINITY;
42635
42690
  for (const [name, record] of state.records) {
42636
42691
  const entry = state.manifest.bundles[name];
42637
42692
  if (record.status !== "loaded" || entry === void 0) continue;
42638
- if (state.pinned.has(name) || isPermanent(entry.tier)) continue;
42639
- if (state.sceneNamed.includes(name) || state.sceneLeaving.includes(name)) continue;
42640
- if (state.sceneComing.includes(name)) continue;
42641
- if (state.queue?.bundles.includes(name) === true) continue;
42693
+ if (keptByState(state, name, entry, except)) continue;
42642
42694
  if (record.lastUsed >= smallest) continue;
42695
+ if (textures.used(bundleKeys(state, name))) continue;
42643
42696
  smallest = record.lastUsed;
42644
42697
  victim = name;
42645
42698
  }
@@ -42674,9 +42727,25 @@ function releaseAssets(io, assets) {
42674
42727
  assets.audio.clear();
42675
42728
  }
42676
42729
  /**
42730
+ * Notes why a bundle went, for the loop guard: a budget unload is remembered until the next rest, so a view that asks
42731
+ * again for it right away starts its hold; any other reason ends both the mark and the hold (F184).
42732
+ *
42733
+ * @param state - The plugin state.
42734
+ * @param bundle - Name of the bundle.
42735
+ * @param reason - Why it was unloaded.
42736
+ */
42737
+ function noteUnload(state, bundle, reason) {
42738
+ if (reason === "budget") {
42739
+ state.budgetUnloaded.add(bundle);
42740
+ return;
42741
+ }
42742
+ state.budgetUnloaded.delete(bundle);
42743
+ state.reloadHeld.delete(bundle);
42744
+ }
42745
+ /**
42677
42746
  * Frees one loaded bundle: the textures are destroyed, its warm is forgotten, every companion drops
42678
- * what travels with it, `renderer` is told that its keys are gone and the event goes out. A bundle
42679
- * that is not loaded is left alone.
42747
+ * what travels with it, the loop guard notes the reason, `renderer` is told that its keys are gone and the event goes
42748
+ * out. A bundle that is not loaded is left alone.
42680
42749
  *
42681
42750
  * @param ctx - Domain context of the plugin.
42682
42751
  * @param bundle - Name of the bundle.
@@ -42692,7 +42761,8 @@ function unloadBundle(ctx, bundle, reason) {
42692
42761
  record.lastUsed = 0;
42693
42762
  state.warmed.delete(bundle);
42694
42763
  unloadCompanions(ctx, state.companions, bundle);
42695
- const keys = entry.files.map((file) => file.key);
42764
+ noteUnload(state, bundle, reason);
42765
+ const keys = bundleKeys(state, bundle);
42696
42766
  ctx.deps.renderer.sync.textures.invalidate(keys);
42697
42767
  ctx.emit("assets:bundle-unloaded", {
42698
42768
  bundle,
@@ -42752,12 +42822,13 @@ function warnOverBudget(ctx) {
42752
42822
  * Headless there is no texture memory, so it does nothing.
42753
42823
  *
42754
42824
  * @param ctx - Domain context of the plugin.
42825
+ * @param except - The bundle a load just published: never undone by its own pass. A rest passes none.
42755
42826
  */
42756
- function enforceBudget(ctx) {
42827
+ function enforceBudget(ctx, except) {
42757
42828
  const state = ctx.state;
42758
42829
  if (state.io === void 0) return;
42759
42830
  while (usedMb(state) > ctx.config.textureBudgetMb) {
42760
- const victim = pickVictim(state);
42831
+ const victim = pickVictim(ctx, except);
42761
42832
  if (victim === void 0) {
42762
42833
  warnOverBudget(ctx);
42763
42834
  return;
@@ -43703,6 +43774,10 @@ function releaseAll(state) {
43703
43774
  state.removers.length = 0;
43704
43775
  state.records.clear();
43705
43776
  state.bundleOfKey.clear();
43777
+ state.keysOf.clear();
43778
+ state.budgetUnloaded.clear();
43779
+ state.reloadHeld.clear();
43780
+ state.thrashWarned.clear();
43706
43781
  state.scenes.clear();
43707
43782
  state.featureOfFlow.clear();
43708
43783
  state.pinned.clear();
@@ -43761,7 +43836,29 @@ function lookupTexture(ctx, key) {
43761
43836
  bundle
43762
43837
  });
43763
43838
  }
43764
- if (record?.status !== "loading") loadBundle(ctx, bundle, void 0, "request").catch(ignoreFailure$1);
43839
+ if (record?.status !== "loading") {
43840
+ holdAskedAgain(ctx, bundle);
43841
+ loadBundle(ctx, bundle, void 0, "request").catch(ignoreFailure$1);
43842
+ }
43843
+ }
43844
+ /**
43845
+ * The loop guard of a texture miss: a bundle the budget unloaded since the last rest that a view asks for again is
43846
+ * drawn by something `renderer` does not track, so it is held from now on and never a budget victim again, and the
43847
+ * first time per bundle one warning names it (F184).
43848
+ *
43849
+ * @param ctx - Domain context of the plugin.
43850
+ * @param bundle - The bundle whose key missed.
43851
+ */
43852
+ function holdAskedAgain(ctx, bundle) {
43853
+ const state = ctx.state;
43854
+ if (!state.budgetUnloaded.has(bundle) || state.reloadHeld.has(bundle)) return;
43855
+ state.reloadHeld.add(bundle);
43856
+ if (state.thrashWarned.has(bundle)) return;
43857
+ state.thrashWarned.add(bundle);
43858
+ ctx.log.warn("assets: a view asked again for a bundle the budget unloaded", {
43859
+ bundle,
43860
+ budgetMb: ctx.config.textureBudgetMb
43861
+ });
43765
43862
  }
43766
43863
  /**
43767
43864
  * Finds the loaded bundle that carries one asset key and stamps it as used. A font and an audio
@@ -44466,6 +44563,7 @@ function createHandlers$5(ctx, reload) {
44466
44563
  assets.state.restPending = true;
44467
44564
  assets.state.restedLive = true;
44468
44565
  }
44566
+ assets.state.budgetUnloaded.clear();
44469
44567
  enforceBudget(assets);
44470
44568
  if (!live) return;
44471
44569
  startPreload(assets);
@@ -44523,6 +44621,10 @@ function createAssetsState() {
44523
44621
  io: void 0,
44524
44622
  manifest: emptyManifest(),
44525
44623
  bundleOfKey: emptyMap$3(),
44624
+ keysOf: emptyMap$3(),
44625
+ budgetUnloaded: emptySet$2(),
44626
+ reloadHeld: emptySet$2(),
44627
+ thrashWarned: emptySet$2(),
44526
44628
  scenes: emptyMap$3(),
44527
44629
  featureOfFlow: emptyMap$3(),
44528
44630
  records: emptyMap$3(),
@@ -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-TmWmx6Ca.mjs";
2
- import { t as createApp } from "./index-DSTbAOZZ.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-CKCNyjAI.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-DjvkUuv6.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-DuGiHe3k.mjs";
2
+ import { t as createApp } from "./index-BhMPDwA9.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-Lh8Ql5Lv.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-CwH40XSw.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-CvDV2vqI.mjs";
1
+ import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-uuF4Ry3D.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-CCiUwvlp.mjs";
@@ -1,5 +1,5 @@
1
- import { $r as Snapshot, Wr as Json } from "./types-TmWmx6Ca.mjs";
2
- import { t as HeadlessApp } from "./headless-DjvkUuv6.mjs";
1
+ import { $r as Snapshot, Wr as Json } from "./types-DuGiHe3k.mjs";
2
+ import { t as HeadlessApp } from "./headless-CwH40XSw.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,4 +1,4 @@
1
- import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-TmWmx6Ca.mjs";
1
+ import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-DuGiHe3k.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";
@@ -11726,6 +11726,23 @@ type TexturesApi = {
11726
11726
  * ```
11727
11727
  */
11728
11728
  invalidate(keys: readonly string[]): void;
11729
+ /**
11730
+ * Tells whether a view draws one of these asset keys now: a sprite or nine-slice view, shown or hidden, the magenta
11731
+ * placeholder of a key no provider answers included. `assets` asks before it unloads a bundle, so the budget never
11732
+ * frees a texture a view still holds. Reads the table of keys the views keep; allocates nothing. Particles, filter
11733
+ * inputs, inline images in text and the leave loader take textures without a view of this table: they do not count.
11734
+ *
11735
+ * @param keys - The asset keys of a bundle.
11736
+ * @returns `true` when at least one key has a view; `false` for no keys and while inert (no root, headless).
11737
+ * @example
11738
+ * ```ts
11739
+ * // `assets` before the budget unloads "board": a view still shows its cells.
11740
+ * const renderer = ctx.require(rendererPlugin);
11741
+ * renderer.sync.textures.used(["board.cell", "board.bg"]); // true: the board still shows its cells
11742
+ * renderer.sync.textures.used(["splash.logo"]); // false: no view draws it
11743
+ * ```
11744
+ */
11745
+ used(keys: readonly string[]): boolean;
11729
11746
  /**
11730
11747
  * Puts textures on the GPU before a screen shows them: each texture's source is queued once and uploaded with Pixi's
11731
11748
  * `renderer.texture.initSource` before the stage pass of a drawn frame, `renderer.uploads` a frame (one by default),
@@ -14436,7 +14453,15 @@ type Config = {
14436
14453
  type State = {
14437
14454
  /** `undefined` means headless: manifest only, no fetches, no textures. */io: AssetsIo | undefined; /** Empty until `onStart` read it. */
14438
14455
  manifest: Manifest; /** Asset key to the bundle that carries it. */
14439
- bundleOfKey: Map<string, string>; /** Scene id to its declaration, read from the `scenes` key of `flow.features`. */
14456
+ bundleOfKey: Map<string, string>; /** Bundle name to its asset keys, frozen, built with `bundleOfKey`: the budget and an unload read it, never `files.map`. */
14457
+ keysOf: Map<string, readonly string[]>; /** Bundles the budget unloaded since the last rest: a view that asks again for one of them starts the hold (F184). */
14458
+ budgetUnloaded: Set<string>;
14459
+ /**
14460
+ * Bundles a view asked again for right after the budget unloaded them: never a budget victim again, until they leave
14461
+ * another way (`"request"`, `"leave"`), so an untracked consumer costs one evict/reload at most (F184).
14462
+ */
14463
+ reloadHeld: Set<string>; /** Bundles the "asked again" warning named already: one line per bundle per session (F184). */
14464
+ thrashWarned: Set<string>; /** Scene id to its declaration, read from the `scenes` key of `flow.features`. */
14440
14465
  scenes: Map<string, SceneDefinition>; /** Flow id to the feature that owns it, read from the `flows` key of `flow.features`. */
14441
14466
  featureOfFlow: Map<string, string>;
14442
14467
  records: Map<string, BundleRecord>; /** Bundles of the node entered last. They are never unloaded. */
@@ -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-TmWmx6Ca.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-DmOnlY66.mjs";
3
- import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-DOsd3uSB.mjs";
4
- import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-DSTbAOZZ.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-DuGiHe3k.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-wsgkqOXF.mjs";
3
+ import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-Dpd8geJW.mjs";
4
+ import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-BhMPDwA9.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -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-TmWmx6Ca.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-DOsd3uSB.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-DuGiHe3k.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-Dpd8geJW.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -1,9 +1,9 @@
1
- import { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-TmWmx6Ca.mjs";
2
- import { W as AnimApi, r as UiApi } from "./types-DmOnlY66.mjs";
3
- import { R as InputApi } from "./types-DOsd3uSB.mjs";
4
- import { r as Repro } from "./headless-DjvkUuv6.mjs";
5
- import { i as ControlApp, o as InputOf } from "./types-ohTEXbrA.mjs";
6
- import { t as commands } from "./commands-Cwxtb672.mjs";
1
+ import { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-DuGiHe3k.mjs";
2
+ import { W as AnimApi, r as UiApi } from "./types-wsgkqOXF.mjs";
3
+ import { R as InputApi } from "./types-Dpd8geJW.mjs";
4
+ import { r as Repro } from "./headless-CwH40XSw.mjs";
5
+ import { i as ControlApp, o as InputOf } from "./types-B3OYUVNR.mjs";
6
+ import { t as commands } from "./commands-BMeGOWws.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-DFxSs-Vp.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-BN0LF0W1.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.120",
3
+ "version": "0.15.122",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [