@moku-labs/game 0.13.0 → 0.13.2
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 +3 -3
- package/dist/app/page.d.mts +2 -1
- package/dist/app/page.mjs +1 -0
- package/dist/app/system.d.mts +3 -3
- package/dist/app.d.mts +2 -2
- package/dist/app.mjs +1 -1
- package/dist/assets.d.mts +1 -1
- package/dist/assets.mjs +1 -1
- package/dist/cli.d.mts +69 -3
- package/dist/cli.mjs +482 -57
- package/dist/{commands-DvFr8Uwp.d.mts → commands-BrgeMP5y.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-CCc0ozKe.d.mts → define-ZmWbWxon.d.mts} +2 -2
- package/dist/{headless-G4nuZ-xz.d.mts → headless-Dgxvp6Ym.d.mts} +1 -1
- package/dist/hot.d.mts +3 -3
- package/dist/hot.mjs +11 -9
- package/dist/{index-rnOYAriI.d.mts → index-CdbE_jGs.d.mts} +12 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +1 -1
- package/dist/inspect.d.mts +7 -7
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{memory-DwDhfFWK.d.mts → memory-DJ2sPExv.d.mts} +1 -1
- package/dist/project.mjs +7 -2954
- package/dist/{runtime-B276Gg0s.d.mts → runtime-6qakboTm.d.mts} +1 -1
- package/dist/{src-SmT-XxVf.mjs → src-CltFFKtc.mjs} +955 -108
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-D_2G6Q68.d.mts → types-B3T2X6To.d.mts} +8 -4
- package/dist/{types-ZQLYXo5X.d.mts → types-C6y8EfEB.d.mts} +54 -5
- package/dist/{types-BrTpz9oL.d.mts → types-CmuwAjkV.d.mts} +19 -6
- package/dist/{types-DAdwEJMp.d.mts → types-D57SntUt.d.mts} +2 -2
- package/dist/{types-DLghaGEy.d.mts → types-DGIkfZB7.d.mts} +4 -4
- package/dist/{types-Bcdo5-2w.d.mts → types-zRGJdFGX.d.mts} +7 -3
- package/dist/visual.d.mts +6 -6
- package/dist/watch-CWI_on4T.mjs +2960 -0
- package/llms.txt +11 -7
- package/package.json +4 -2
- package/dist/{assets-DYiKxPBX.mjs → assets-BrKSg1O6.mjs} +1 -1
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dt as AnyFlow, Ht as ClockSource, Nt as NodeTable, Wt as FakeClock, Xt as Json, ht as FeaturePlugin } from "./types-
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { n as saveOf, t as memory } from "./memory-
|
|
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-
|
|
1
|
+
import { Dt as AnyFlow, Ht as ClockSource, Nt as NodeTable, Wt as FakeClock, Xt as Json, ht as FeaturePlugin } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { t as createApp } from "./index-CdbE_jGs.mjs";
|
|
3
|
+
import { n as saveOf, t as memory } from "./memory-DJ2sPExv.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-Dgxvp6Ym.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 { Kt as type, Ut as exit, t as createApp } from "./src-
|
|
1
|
+
import { Kt as type, Ut as exit, t as createApp } from "./src-CltFFKtc.mjs";
|
|
2
2
|
import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { t as fakeClock } from "./fake-MpzwZhIZ.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-BsNdJs9W.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Api$2, B as ComponentType, F as AnyComponent, H as Entity, It as TypeTag, L as AnyComponentValue, Lt as Descriptor, R as ComponentHandle, Sn as Require, Xt as Json, Yt as Events$2, at as NumericFields, ct as TrackOptions, dn as Events$3, dt as Api$1, et as Ease, h as Api$5, hn as Api, it as MotionHandle, lt as TrackSegment, nt as LayerSpec, q as Owner, qt as Api$4, s as Events$4, t as Api$3, tt as LayerSort, xn as Events$5 } from "./types-
|
|
2
|
-
import { A as InputApi, c as UiNode, i as Finding, n as ElementChange, o as JsxState, q as I18nApi, r as ElementMotion, rt as StylesState, x as TextApi } from "./types-
|
|
1
|
+
import { A as Api$2, B as ComponentType, F as AnyComponent, H as Entity, It as TypeTag, L as AnyComponentValue, Lt as Descriptor, R as ComponentHandle, Sn as Require, Xt as Json, Yt as Events$2, at as NumericFields, ct as TrackOptions, dn as Events$3, dt as Api$1, et as Ease, h as Api$5, hn as Api, it as MotionHandle, lt as TrackSegment, nt as LayerSpec, q as Owner, qt as Api$4, s as Events$4, t as Api$3, tt as LayerSort, xn as Events$5 } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { A as InputApi, c as UiNode, i as Finding, n as ElementChange, o as JsxState, q as I18nApi, r as ElementMotion, rt as StylesState, x as TextApi } from "./types-CmuwAjkV.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
import { Node, Yoga } from "yoga-layout/load";
|
|
@@ -1406,7 +1406,7 @@ type RunContext = {
|
|
|
1406
1406
|
signal: AbortSignal;
|
|
1407
1407
|
};
|
|
1408
1408
|
declare namespace types_d_exports$1 {
|
|
1409
|
-
export { AudioApi, AudioContextLike, AudioCtx, AudioSessionLike, AudioSessionType, BundleUnloaded, Bus, BusState, Config$1 as Config, Deps$1 as Deps, KernelSlice$1 as KernelSlice, LifecycleChanged, ModelCommitted, MusicDescriptor, MusicMode, MusicOptions, MusicRequest, MusicSwitch, MusicTrack, RetiringTrack, SceneChanged, SfxRequest, SoundEntry, State$1 as State, StreamTrack, Volumes };
|
|
1409
|
+
export { AssetsReplaced, AudioApi, AudioContextLike, AudioCtx, AudioSessionLike, AudioSessionType, BundleUnloaded, Bus, BusState, Config$1 as Config, Deps$1 as Deps, KernelSlice$1 as KernelSlice, LifecycleChanged, ModelCommitted, MusicDescriptor, MusicMode, MusicOptions, MusicRequest, MusicSwitch, MusicTrack, RetiringTrack, SceneChanged, SfxRequest, SoundEntry, State$1 as State, StreamTrack, Volumes };
|
|
1410
1410
|
}
|
|
1411
1411
|
/**
|
|
1412
1412
|
* The three volume buses. `master` carries the whole game, `music` the scene track, `sfx` every
|
|
@@ -1623,7 +1623,7 @@ type State$1 = {
|
|
|
1623
1623
|
paused: boolean;
|
|
1624
1624
|
unlocked: boolean; /** A gesture called `resume()` and it has not settled yet. */
|
|
1625
1625
|
resuming: boolean; /** Sounds fired while `resuming`, one per key; played when the context runs, dropped when it does not. */
|
|
1626
|
-
pendingSfx: Map<string, SfxRequest>; /** Per key, evicted per key on `assets:bundle-unloaded`. */
|
|
1626
|
+
pendingSfx: Map<string, SfxRequest>; /** Per key, evicted per key on `assets:bundle-unloaded` and `assets:replaced`. */
|
|
1627
1627
|
decoded: Map<string, Promise<AudioBuffer>>; /** Asset keys that already got their one warning. */
|
|
1628
1628
|
warned: Set<string>; /** `config.volumes` threw once and was reported; it is not reported again this run. */
|
|
1629
1629
|
warnedVolumes: boolean;
|
|
@@ -1783,6 +1783,10 @@ type LifecycleChanged = Events$3["lifecycle:changed"];
|
|
|
1783
1783
|
* Payload of the `assets:bundle-unloaded` hook: `keys` names every decoded sound that is gone.
|
|
1784
1784
|
*/
|
|
1785
1785
|
type BundleUnloaded = Events$4["assets:bundle-unloaded"];
|
|
1786
|
+
/**
|
|
1787
|
+
* Payload of the `assets:replaced` hook: `keys` names every asset a dev hot swap gave new bytes.
|
|
1788
|
+
*/
|
|
1789
|
+
type AssetsReplaced = Events$4["assets:replaced"];
|
|
1786
1790
|
/**
|
|
1787
1791
|
* What one play of a sound asks for: the key and the bus the sound goes to.
|
|
1788
1792
|
*/
|
|
@@ -37,7 +37,12 @@ type Config$8 = {
|
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
39
|
type Events$6 = {
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* A dev hot swap was applied: the saved module's new exports. `ui` emits it, `effects` replaces
|
|
42
|
+
* its emitters on it, and `assets` hears it for the stamp module `.moku/assets-stamp.ts`: it
|
|
43
|
+
* replaces the asset files the stamp names as changed.
|
|
44
|
+
*/
|
|
45
|
+
"ui:hot-swap": {
|
|
41
46
|
file: string;
|
|
42
47
|
module: Readonly<Record<string, unknown>>;
|
|
43
48
|
};
|
|
@@ -6465,7 +6470,7 @@ type TeardownScope = {
|
|
|
6465
6470
|
readonly state: State$1;
|
|
6466
6471
|
};
|
|
6467
6472
|
declare namespace types_d_exports {
|
|
6468
|
-
export { Api, AssetKind, AssetsCtx, AssetsIo, AtlasFrame, AtlasPage, AudioAsset, AudioMime, BundleMap, BundleRecord, BundleSpec, BundleUsage, Config, CreateTextureOptions, DecodedImage, DefineBundles, Deps, Events, FetchResponse, FlowRest, FontAsset, FontPage, Inflight, KernelSlice, LoadBundles, LoadReason, LoadResult, LoadedAssets, LoadedFont, Manifest, ManifestBundle, ManifestFile, NineBorders, NineSlice, PreloadQueue, State, Texture, Tier, Usage };
|
|
6473
|
+
export { Api, AssetKind, AssetStamps, AssetsCtx, AssetsIo, AtlasFrame, AtlasPage, AudioAsset, AudioMime, BundleMap, BundleRecord, BundleSpec, BundleUsage, Config, CreateTextureOptions, DecodedImage, DefineBundles, Deps, Events, FetchResponse, FlowRest, FontAsset, FontPage, HotSwap, Inflight, KernelSlice, LoadBundles, LoadReason, LoadResult, LoadedAssets, LoadedFont, Manifest, ManifestBundle, ManifestFile, NineBorders, NineSlice, PreloadQueue, State, Texture, Tier, Usage };
|
|
6469
6474
|
}
|
|
6470
6475
|
/**
|
|
6471
6476
|
* When a bundle is loaded. `boot` and `core` stay for the whole session, `scene` and `feature`
|
|
@@ -6920,6 +6925,27 @@ type PreloadQueue = {
|
|
|
6920
6925
|
bundles: string[];
|
|
6921
6926
|
controller: AbortController;
|
|
6922
6927
|
};
|
|
6928
|
+
/**
|
|
6929
|
+
* What the keys watch of `moku-game dev` knows about the asset files of a game: the default export
|
|
6930
|
+
* of the generated `.moku/assets-stamp.ts`. The dev hot swap compares it with the map it applied
|
|
6931
|
+
* last and replaces the files whose stamp differs.
|
|
6932
|
+
*
|
|
6933
|
+
* @example
|
|
6934
|
+
* ```ts
|
|
6935
|
+
* // The stamp after a save of fx-spark.webp: every watched file, and the one that changed.
|
|
6936
|
+
* const stamps: AssetStamps = {
|
|
6937
|
+
* files: {
|
|
6938
|
+
* "features/ui/assets/font-body.fnt": "1810:1791536000000",
|
|
6939
|
+
* "features/ui/assets/fx-spark.webp": "2554:1791536552578"
|
|
6940
|
+
* },
|
|
6941
|
+
* changed: ["features/ui/assets/fx-spark.webp"]
|
|
6942
|
+
* };
|
|
6943
|
+
* ```
|
|
6944
|
+
*/
|
|
6945
|
+
type AssetStamps = {
|
|
6946
|
+
/** Every watched asset file, root-relative with `/`, and its `size:mtimeMs`. Sorted by path. */files: Readonly<Record<string, string>>; /** The files whose stamp differs from the batch before. Empty in the first stamp of a run. */
|
|
6947
|
+
changed: readonly string[];
|
|
6948
|
+
};
|
|
6923
6949
|
/**
|
|
6924
6950
|
* assets plugin config.
|
|
6925
6951
|
*
|
|
@@ -6954,7 +6980,9 @@ type State = {
|
|
|
6954
6980
|
current: NodeInfo | undefined;
|
|
6955
6981
|
useCounter: number; /** Keys already reported missing, so one key warns and starts its background load once. */
|
|
6956
6982
|
warned: Set<string>; /** `onEnter`, the `load` handler and the texture provider. */
|
|
6957
|
-
removers: Array<() => void>;
|
|
6983
|
+
removers: Array<() => void>; /** The `files` map of the stamp the dev hot swap applied last. `undefined` until the first swap. */
|
|
6984
|
+
stamps: Readonly<Record<string, string>> | undefined; /** The running dev hot swap. The next one waits for it, so two swaps never overlap. */
|
|
6985
|
+
swapping: Promise<void> | undefined;
|
|
6958
6986
|
};
|
|
6959
6987
|
/**
|
|
6960
6988
|
* What `usage()` reports about one loaded bundle.
|
|
@@ -7004,6 +7032,13 @@ type Usage = {
|
|
|
7004
7032
|
* }
|
|
7005
7033
|
* })
|
|
7006
7034
|
* }); // a board bundle of four files sets share to 0.25, 0.5, 0.75 and 1; bundle-loaded follows
|
|
7035
|
+
*
|
|
7036
|
+
* // The audio plugin drops the buffer it decoded from a sound a dev save replaced.
|
|
7037
|
+
* hooks: ctx => ({
|
|
7038
|
+
* "assets:replaced": ({ keys }) => {
|
|
7039
|
+
* for (const key of keys) ctx.state.decoded.delete(key); // the next play decodes the new bytes
|
|
7040
|
+
* }
|
|
7041
|
+
* }); // a save of features/ui/assets/click.mp3 sends { bundle: "ui", keys: ["ui.click"] }
|
|
7007
7042
|
* ```
|
|
7008
7043
|
*/
|
|
7009
7044
|
type Events = {
|
|
@@ -7030,6 +7065,15 @@ type Events = {
|
|
|
7030
7065
|
reason: "budget" | "request";
|
|
7031
7066
|
keys: readonly string[];
|
|
7032
7067
|
};
|
|
7068
|
+
/**
|
|
7069
|
+
* Files of a loaded bundle were replaced by a dev hot swap: one event per bundle per swap. `keys`
|
|
7070
|
+
* names every asset that has new bytes; each of them answers a new texture, font or sound, and
|
|
7071
|
+
* the old textures are destroyed. Dev builds only.
|
|
7072
|
+
*/
|
|
7073
|
+
"assets:replaced": {
|
|
7074
|
+
bundle: string;
|
|
7075
|
+
keys: readonly string[];
|
|
7076
|
+
};
|
|
7033
7077
|
};
|
|
7034
7078
|
/**
|
|
7035
7079
|
* assets plugin API, `app.assets`. Bundles of textures by key: the graph decides when they arrive,
|
|
@@ -7159,7 +7203,7 @@ type Deps = {
|
|
|
7159
7203
|
* What the kernel context offers before the deps are attached.
|
|
7160
7204
|
*
|
|
7161
7205
|
* `index.ts` writes `events` with an annotated `register` (core spec `14-EVENT-REGISTRATION.md`
|
|
7162
|
-
* row 8), so the
|
|
7206
|
+
* row 8), so the own events reach the context the kernel hands the factories and `emit` is the
|
|
7163
7207
|
* kernel's own, assets-typed one. No member of the context is cast.
|
|
7164
7208
|
*/
|
|
7165
7209
|
type KernelSlice = PluginCtx<Config, State, Events> & {
|
|
@@ -7174,11 +7218,16 @@ type AssetsCtx = KernelSlice & {
|
|
|
7174
7218
|
readonly deps: Deps;
|
|
7175
7219
|
};
|
|
7176
7220
|
/**
|
|
7177
|
-
* Payload of the
|
|
7221
|
+
* Payload of the `flow:rest` hook: where the graph rests.
|
|
7178
7222
|
*/
|
|
7179
7223
|
type FlowRest = {
|
|
7180
7224
|
path: string;
|
|
7181
7225
|
checkpoint: boolean;
|
|
7182
7226
|
};
|
|
7227
|
+
/**
|
|
7228
|
+
* Payload of the global `ui:hot-swap` hook: the saved file and its new exports. For the stamp of
|
|
7229
|
+
* the keys watch, `module.default` is the `AssetStamps`.
|
|
7230
|
+
*/
|
|
7231
|
+
type HotSwap = Events$6["ui:hot-swap"];
|
|
7183
7232
|
//#endregion
|
|
7184
7233
|
export { DescriptionNode as $, types_d_exports$5 as $t, Api$2 as A, FlowGraph as At, ComponentType as B, Answer as Bt, types_d_exports$1 as C, slot as Ct, FilterSlot as D, AnyFlow as Dt, DebugSwitches as E, FeatureDescription as Et, AnyComponent as F, SceneIdOf as Ft, Mut as G, State$4 as Gt, Entity as H, ClockSource as Ht, AnyComponentType as I, TypeTag as It, QueryTerm as J, Config$5 as Jt, Narrowed as K, types_d_exports$4 as Kt, AnyComponentValue as L, Descriptor as Lt, Explained as M, JournalEntry as Mt, State$2 as N, NodeTable as Nt, Point as O, Bookmark as Ot, types_d_exports$2 as P, RouteStep as Pt, ChangeHook as Q, State$5 as Qt, ComponentHandle as R, GuideOptions as Rt, Under as S, Require as Sn, exit as St, RenderStats as T, type as Tt, EntitySnapshot as U, Config$4 as Ut, ComponentValue as V, Api$4 as Vt, FrameDiff as W, FakeClock as Wt, SystemDefinition as X, Json as Xt, ResourceType as Y, Events$4 as Yt, TagType as Z, Root as Zt, PixiFilter as _, State$7 as _n, Position as _t, Config as a, Snapshot as an, NumericFields as at, PixiTexture as b, Config$8 as bn, types_d_exports$3 as bt, LoadBundles as c, RngState as cn, TrackOptions as ct, State as d, Events$5 as dn, Api$3 as dt, Patch as en, Ease as et, Tier as f, PauseReason as fn, BundlesOf as ft, Config$1 as g, Config$7 as gn, GameTypes as gt, Api$1 as h, Api$7 as hn, FeaturePlugin as ht, BundleSpec as i, SaveUnreadableError as in, MotionHandle as it, Config$2 as j, FlowState as jt, ViewportSize as k, DefineNode as kt, LoadReason as l, Api$6 as ln, TrackSegment as lt, types_d_exports as m, types_d_exports$6 as mn, EmitterIdOf as mt, AssetsIo as n, ProviderCall as nn, LayerSpec as nt, DefineBundles as o, StoreApi as on, ProjectionMotion as ot, Usage as p, State$6 as pn, Config$3 as pt, Owner as q, Api$5 as qt, BundleMap as r, SaveDoc as rn, Motion as rt, Events as s, RngApi as sn, ProjectionSpec as st, Api as t, PlayerStateProvider as tn, LayerSort as tt, Manifest as u, Config$6 as un, ViewHandle as ut, PixiModule as v, Time as vn, State$3 as vt, Captured as w, to as wt, State$1 as x, Events$6 as xn, defineFlow as xt, PixiSprite as y, types_d_exports$7 as yn, TextStylesOf as yt, ComponentSchema as z, Hint as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Api$2, B as ComponentType, F as AnyComponent, H as Entity, I as AnyComponentType, L as AnyComponentValue, Lt as Descriptor, O as Point$2, Q as ChangeHook, Sn as Require, V as ComponentValue, Vt as Api$5, Xt as Json, at as NumericFields, dt as Api$1, h as Api$3, hn as Api, it as MotionHandle, k as ViewportSize, ot as ProjectionMotion, rt as Motion, s as Events$1, t as Api$4, ut as ViewHandle, zt as Hint } from "./types-
|
|
1
|
+
import { A as Api$2, B as ComponentType, F as AnyComponent, H as Entity, I as AnyComponentType, L as AnyComponentValue, Lt as Descriptor, O as Point$2, Q as ChangeHook, Sn as Require, V as ComponentValue, Vt as Api$5, Xt as Json, at as NumericFields, dt as Api$1, h as Api$3, hn as Api, it as MotionHandle, k as ViewportSize, ot as ProjectionMotion, rt as Motion, s as Events$1, t as Api$4, ut as ViewHandle, zt as Hint } from "./types-C6y8EfEB.mjs";
|
|
2
2
|
import { Log } from "@moku-labs/common/browser";
|
|
3
3
|
import { PluginCtx } from "@moku-labs/core";
|
|
4
4
|
|
|
@@ -1403,7 +1403,7 @@ declare function defineComponent<Properties extends object, Local extends object
|
|
|
1403
1403
|
*/
|
|
1404
1404
|
declare function defineComponent<Properties extends object, Local extends object>(name: string, spec: ComponentSpec<Properties, Local, never>): ComponentDefinition<Properties, Local, undefined>;
|
|
1405
1405
|
declare namespace types_d_exports {
|
|
1406
|
-
export { AdvanceTable, BindField, BindOptions, BundleLoaded, BundleUnloaded, Config, CountdownValue, Deps, DrawnLabel, IconRun, KernelSlice, LayoutOptions, Line, LocaleChanged, Point, Run, SeenText, Size, State, TextAlign, TextApi, TextBind, TextCtx, TextFormat, TextLayout, TextRun, TextShadow, TextStyle, TextStyleInput, TextStyles, TextValue, TextWrap, Warn };
|
|
1406
|
+
export { AdvanceTable, AssetsReplaced, BindField, BindOptions, BundleLoaded, BundleUnloaded, Config, CountdownValue, Deps, DrawnLabel, IconRun, KernelSlice, LayoutOptions, Line, LocaleChanged, Point, Run, SeenText, Size, State, TextAlign, TextApi, TextBind, TextCtx, TextFormat, TextLayout, TextRun, TextShadow, TextStyle, TextStyleInput, TextStyles, TextValue, TextWrap, Warn };
|
|
1407
1407
|
}
|
|
1408
1408
|
/**
|
|
1409
1409
|
* A point in reference units: where a label sits, and which point of the block sits there.
|
|
@@ -1707,13 +1707,16 @@ type TextLayout = {
|
|
|
1707
1707
|
height: number;
|
|
1708
1708
|
};
|
|
1709
1709
|
/**
|
|
1710
|
-
* What one label container was last filled from: the style object
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1710
|
+
* What one label container was last filled from: the style object, the laid-out block and the
|
|
1711
|
+
* generation of the state at that moment. An update with the same style object, the same
|
|
1712
|
+
* generation, the same anchor and the same lines and runs writes the new text and positions into
|
|
1713
|
+
* the objects already there. An older generation means a dev hot swap replaced a font or an icon
|
|
1714
|
+
* since: the objects hold textures that are destroyed, so they are built again.
|
|
1713
1715
|
*/
|
|
1714
1716
|
type DrawnLabel = {
|
|
1715
1717
|
style: TextStyle;
|
|
1716
1718
|
layout: TextLayout;
|
|
1719
|
+
generation: number;
|
|
1717
1720
|
};
|
|
1718
1721
|
/**
|
|
1719
1722
|
* A dev warning that is written once per key. Pure modules take it as an argument, so nothing
|
|
@@ -1783,7 +1786,12 @@ type State = {
|
|
|
1783
1786
|
measured: Map<Entity, Size>; /** Layout per `style + resolved`, oldest dropped first. */
|
|
1784
1787
|
cache: Map<string, TextLayout>; /** What every live label container was last filled from, by container. */
|
|
1785
1788
|
drawn: WeakMap<object, DrawnLabel>; /** Entities to re-resolve in the next layout phase. */
|
|
1786
|
-
dirty: Set<Entity>;
|
|
1789
|
+
dirty: Set<Entity>;
|
|
1790
|
+
/**
|
|
1791
|
+
* Counts the dev hot swaps that replaced a font or an inline icon of a live label. A label
|
|
1792
|
+
* container drawn under an older count is built again on its next update.
|
|
1793
|
+
*/
|
|
1794
|
+
generation: number; /** Warning keys already written, so a style, a tag, a glyph or a font warns once. */
|
|
1787
1795
|
warned: Set<string>; /** The system, the two world hooks and the display adapter. */
|
|
1788
1796
|
removers: Array<() => void>;
|
|
1789
1797
|
};
|
|
@@ -1904,6 +1912,11 @@ type BundleLoaded = Events$1["assets:bundle-loaded"];
|
|
|
1904
1912
|
* Payload of the `assets:bundle-unloaded` hook: `keys` names the assets that left.
|
|
1905
1913
|
*/
|
|
1906
1914
|
type BundleUnloaded = Events$1["assets:bundle-unloaded"];
|
|
1915
|
+
/**
|
|
1916
|
+
* Payload of the `assets:replaced` hook: a dev hot swap put new bytes behind `keys`. Each of them
|
|
1917
|
+
* answers a new font or texture already, and the old pages and textures are destroyed.
|
|
1918
|
+
*/
|
|
1919
|
+
type AssetsReplaced = Events$1["assets:replaced"];
|
|
1907
1920
|
/**
|
|
1908
1921
|
* Payload of the `i18n:locale-changed` hook: every message has to be resolved again.
|
|
1909
1922
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Xt as Json, an as Snapshot } from "./types-
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Xt as Json, an as Snapshot } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-Dgxvp6Ym.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dt as AnyFlow, Ht as ClockSource, Jt as Config, Wt as FakeClock, Xt as Json, a as Config$3, g as Config$2, ht as FeaturePlugin, n as AssetsIo, pt as Config$1, tn as PlayerStateProvider, u as Manifest, v as PixiModule } from "./types-
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { _t as audioPlugin, ct as PlatformProvider, ht as effectsPlugin, i as screen, ot as platformPlugin, t as createApp } from "./index-
|
|
4
|
-
import { t as memory } from "./memory-
|
|
1
|
+
import { Dt as AnyFlow, Ht as ClockSource, Jt as Config, Wt as FakeClock, Xt as Json, a as Config$3, g as Config$2, ht as FeaturePlugin, n as AssetsIo, pt as Config$1, tn as PlayerStateProvider, u as Manifest, v as PixiModule } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-B3T2X6To.mjs";
|
|
3
|
+
import { _t as audioPlugin, ct as PlatformProvider, ht as effectsPlugin, i as screen, ot as platformPlugin, t as createApp } from "./index-CdbE_jGs.mjs";
|
|
4
|
+
import { t as memory } from "./memory-DJ2sPExv.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/app/types.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Api$1, B as ComponentType, D as FilterSlot, H as Entity, O as Point, R as ComponentHandle, Sn as Require, _ as PixiFilter, b as PixiTexture, dt as Api, h as Api$2, s as Events, t as Api$3, v as PixiModule, xn as Events$1, y as PixiSprite } from "./types-
|
|
2
|
-
import { x as AnimApi } from "./types-
|
|
1
|
+
import { A as Api$1, B as ComponentType, D as FilterSlot, H as Entity, O as Point, R as ComponentHandle, Sn as Require, _ as PixiFilter, b as PixiTexture, dt as Api, h as Api$2, s as Events, t as Api$3, v as PixiModule, xn as Events$1, y as PixiSprite } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { x as AnimApi } from "./types-B3T2X6To.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
|
|
@@ -523,7 +523,7 @@ type EmitterInstance = {
|
|
|
523
523
|
readonly particleClass: PixiModule["Particle"];
|
|
524
524
|
};
|
|
525
525
|
declare namespace types_d_exports {
|
|
526
|
-
export { AlphaValue, BlurValue, BundleUnloaded, ColorMatrixValue, Config, CoreKind, Curve, Deps, DisplacementValue, EffectsApi, EffectsCtx, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterComponent, FilterDefinition, FilterSpec, FilterValueOf, GlowValue, HotSwap, KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, Shape, State, UniformDeclaration, UniformSpec, UniformValue };
|
|
526
|
+
export { AlphaValue, AssetsReplaced, BlurValue, BundleUnloaded, ColorMatrixValue, Config, CoreKind, Curve, Deps, DisplacementValue, EffectsApi, EffectsCtx, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterComponent, FilterDefinition, FilterSpec, FilterValueOf, GlowValue, HotSwap, KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, Shape, State, UniformDeclaration, UniformSpec, UniformValue };
|
|
527
527
|
}
|
|
528
528
|
/**
|
|
529
529
|
* effects plugin config. `maxParticles` here is the global warning line; the `maxParticles` of an
|
|
@@ -644,6 +644,10 @@ type EffectsCtx = KernelSlice & {
|
|
|
644
644
|
* Payload of the `assets:bundle-unloaded` hook: `keys` names every texture that is gone.
|
|
645
645
|
*/
|
|
646
646
|
type BundleUnloaded = Events["assets:bundle-unloaded"];
|
|
647
|
+
/**
|
|
648
|
+
* Payload of the `assets:replaced` hook: `keys` names every asset a dev hot swap gave new bytes.
|
|
649
|
+
*/
|
|
650
|
+
type AssetsReplaced = Events["assets:replaced"];
|
|
647
651
|
/**
|
|
648
652
|
* Payload of the global `ui:hot-swap` hook: the saved file and its new exports.
|
|
649
653
|
*/
|
package/dist/visual.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as Api$1, h as Api, ln as Api$3, qt as Api$2 } from "./types-
|
|
2
|
-
import { r as UiApi, x as AnimApi } from "./types-
|
|
3
|
-
import { A as InputApi } from "./types-
|
|
4
|
-
import { r as Repro } from "./headless-
|
|
5
|
-
import { a as InputOf, r as ControlApp } from "./types-
|
|
6
|
-
import { t as commands } from "./commands-
|
|
1
|
+
import { A as Api$1, h as Api, ln as Api$3, qt as Api$2 } from "./types-C6y8EfEB.mjs";
|
|
2
|
+
import { r as UiApi, x as AnimApi } from "./types-B3T2X6To.mjs";
|
|
3
|
+
import { A as InputApi } from "./types-CmuwAjkV.mjs";
|
|
4
|
+
import { r as Repro } from "./headless-Dgxvp6Ym.mjs";
|
|
5
|
+
import { a as InputOf, r as ControlApp } from "./types-D57SntUt.mjs";
|
|
6
|
+
import { t as commands } from "./commands-BrgeMP5y.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. */
|