@moku-labs/game 0.15.11 → 0.15.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/page.d.mts +1 -1
- package/dist/app/page.mjs +1 -1
- package/dist/app/system.d.mts +2 -2
- package/dist/app.d.mts +2 -2
- package/dist/app.mjs +1 -1
- package/dist/{commands-C3yVtCg1.d.mts → commands-aLTGwuyk.d.mts} +2 -2
- package/dist/component-DGg5DqKK.mjs +44 -0
- package/dist/control.d.mts +1 -1
- package/dist/{flatten-BkXuscAV.mjs → flatten-nUX9PpGo.mjs} +1 -44
- package/dist/{index-CsTMiO0x.d.mts → index-YUceiUFm.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/inspect.d.mts +2 -3
- package/dist/inspect.mjs +1 -1
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-dev-runtime.mjs +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{runtime-Bxy2zoCG.d.mts → runtime-B5OD9JTT.d.mts} +1 -1
- package/dist/{runtime-CBZgWgzx.mjs → runtime-DnM9i73o.mjs} +2 -1
- package/dist/{sources-CJgUypyC.mjs → sources-Fbq_PFVH.mjs} +82 -35
- package/dist/{src-0m2mjRDI.mjs → src-3_HjYegY.mjs} +60 -457
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/{types-CpBnGqDU.d.mts → types-3bEK86Z1.d.mts} +1 -1
- package/dist/{types-CveBhKTs.d.mts → types-Dm4tM5nH.d.mts} +3 -3
- package/dist/{types-D5Pmo8BD.d.mts → types-xmH1X8qd.d.mts} +8 -0
- package/dist/{visual-Dwfy9wDb.mjs → visual-CbGKzlj0.mjs} +444 -1
- package/dist/{visual-B5Sypqal.d.mts → visual-DExHHx-a.d.mts} +3 -3
- package/dist/visual.d.mts +1 -1
- package/dist/visual.mjs +1 -1
- package/package.json +1 -1
package/dist/app/page.d.mts
CHANGED
package/dist/app/page.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as systemSource, t as memory } from "../memory-CWlqhS7l.mjs";
|
|
2
2
|
import { t as applyTo } from "../drafts-BawpSaVp.mjs";
|
|
3
3
|
import { i as isControl } from "../dev-BNndV-hU.mjs";
|
|
4
|
-
import { n as read, r as watch, t as sources } from "../sources-
|
|
4
|
+
import { n as read, r as watch, t as sources } from "../sources-Fbq_PFVH.mjs";
|
|
5
5
|
import { t as resolveConfig } from "../config-B87aFTW-.mjs";
|
|
6
6
|
//#region src/app/save.ts
|
|
7
7
|
/**
|
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { kr as PlayerStateProvider } from "../types-CuEK0Vam.mjs";
|
|
2
|
-
import { mt as PlatformProvider } from "../index-
|
|
3
|
-
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-
|
|
2
|
+
import { mt as PlatformProvider } from "../index-YUceiUFm.mjs";
|
|
3
|
+
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-Dm4tM5nH.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
1
|
import { wr as Json } from "./types-CuEK0Vam.mjs";
|
|
2
|
-
import { H as StringTable } from "./types-
|
|
3
|
-
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-
|
|
2
|
+
import { H as StringTable } from "./types-xmH1X8qd.mjs";
|
|
3
|
+
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-Dm4tM5nH.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 {
|
|
1
|
+
import { Nt as audioPlugin, St as effectsPlugin, V as platformPlugin, i as screen, m as flattenFeatures, t as createApp } from "./src-3_HjYegY.mjs";
|
|
2
2
|
import { t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { n as isFakeClock, t as fakeClock } from "./fake-6mazmHK3.mjs";
|
|
4
4
|
//#region src/app/define.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $n as Bookmark, $t as Api$2, Fr as StoreApi, K as Api$1, Kr as FrameRate, Nr as Snapshot, Rr as Api, S as ScenesApi, T as DebugSwitches, Xr as Time, nr as FlowState, rt as Captured } from "./types-CuEK0Vam.mjs";
|
|
2
|
-
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-
|
|
3
|
-
import { M as InputApi } from "./types-
|
|
2
|
+
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-3bEK86Z1.mjs";
|
|
3
|
+
import { M as InputApi } from "./types-xmH1X8qd.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-DHtavbqk.mjs";
|
|
5
5
|
import { n as Command, r as ControlApp } from "./types-_a6-ALzz.mjs";
|
|
6
6
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/plugins/ui/jsx/component.ts
|
|
2
|
+
/** The local state a component that declares none starts every instance with. */
|
|
3
|
+
const noLocal = {};
|
|
4
|
+
/**
|
|
5
|
+
* Tells a component definition from a plain function component, which JSX calls at build time.
|
|
6
|
+
*
|
|
7
|
+
* @param type - What stood in the tag position.
|
|
8
|
+
* @returns True when `defineComponent` built it.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* isComponentDefinition(() => ({ type: "row", props: {}, children: [] })); // false
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
function isComponentDefinition(type) {
|
|
15
|
+
return typeof type === "function" && type.isUiComponent === true;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The one implementation behind the two overloads.
|
|
19
|
+
*
|
|
20
|
+
* @param name - Component name.
|
|
21
|
+
* @param spec - What the game declared.
|
|
22
|
+
* @returns The callable definition.
|
|
23
|
+
*/
|
|
24
|
+
function defineComponent(name, spec) {
|
|
25
|
+
const local = spec.local ?? noLocal;
|
|
26
|
+
const call = (props) => ({
|
|
27
|
+
type: name,
|
|
28
|
+
props,
|
|
29
|
+
children: []
|
|
30
|
+
});
|
|
31
|
+
const definition = Object.assign(call, {
|
|
32
|
+
outcomes: spec.outcomes,
|
|
33
|
+
local,
|
|
34
|
+
view: spec.view,
|
|
35
|
+
isUiComponent: true
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(definition, "name", {
|
|
38
|
+
value: name,
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
return definition;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { isComponentDefinition as n, defineComponent as t };
|
package/dist/control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as HeadlessApp } from "./headless-DHtavbqk.mjs";
|
|
2
2
|
import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-_a6-ALzz.mjs";
|
|
3
|
-
import { t as commands } from "./commands-
|
|
3
|
+
import { t as commands } from "./commands-aLTGwuyk.mjs";
|
|
4
4
|
import { t as defineCommand } from "./define-DbxBzO-G.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
//#region src/plugins/ui/jsx/component.ts
|
|
2
|
-
/** The local state a component that declares none starts every instance with. */
|
|
3
|
-
const noLocal = {};
|
|
4
|
-
/**
|
|
5
|
-
* Tells a component definition from a plain function component, which JSX calls at build time.
|
|
6
|
-
*
|
|
7
|
-
* @param type - What stood in the tag position.
|
|
8
|
-
* @returns True when `defineComponent` built it.
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* isComponentDefinition(() => ({ type: "row", props: {}, children: [] })); // false
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
function isComponentDefinition(type) {
|
|
15
|
-
return typeof type === "function" && type.isUiComponent === true;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The one implementation behind the two overloads.
|
|
19
|
-
*
|
|
20
|
-
* @param name - Component name.
|
|
21
|
-
* @param spec - What the game declared.
|
|
22
|
-
* @returns The callable definition.
|
|
23
|
-
*/
|
|
24
|
-
function defineComponent(name, spec) {
|
|
25
|
-
const local = spec.local ?? noLocal;
|
|
26
|
-
const call = (props) => ({
|
|
27
|
-
type: name,
|
|
28
|
-
props,
|
|
29
|
-
children: []
|
|
30
|
-
});
|
|
31
|
-
const definition = Object.assign(call, {
|
|
32
|
-
outcomes: spec.outcomes,
|
|
33
|
-
local,
|
|
34
|
-
view: spec.view,
|
|
35
|
-
isUiComponent: true
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(definition, "name", {
|
|
38
|
-
value: name,
|
|
39
|
-
configurable: true
|
|
40
|
-
});
|
|
41
|
-
return definition;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
1
|
//#region src/plugins/ui/jsx/flatten.ts
|
|
45
2
|
/** The type of the node `Fragment` builds. It never reaches a reconcile: `flatten` lifts it. */
|
|
46
3
|
const FRAGMENT = "#fragment";
|
|
@@ -97,4 +54,4 @@ function flatten(child) {
|
|
|
97
54
|
return [child];
|
|
98
55
|
}
|
|
99
56
|
//#endregion
|
|
100
|
-
export {
|
|
57
|
+
export { flatten as n, FRAGMENT as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $r as Events$1, $t as Api$6, An as ReducedMotion, B as SpriteOptions, Br as Events, C as State$7, Cn as Ease, Dn as NumericFields, Er as State$5, F as OverlayValue, Fn as BundlesOf, Fr as StoreApi, Gr as Config$7, Hn as TextStylesOf, Hr as State$4, In as Config$3, Ir as RngApi, Jr as State$8, K as Api$4, Ln as EmitterIdOf, N as NineSliceValue, On as ProjectionMotion, Or as Patch, Pn as Api$2, Qr as Config$9, R as ShapeValue, Rn as GameTypes, Rr as Api$3, S as ScenesApi, Sn as DescriptionNode, Sr as Config$5, Tr as Root, U as TransformValue, V as SpriteValue, Vn as State$3, Vr as PauseReason, W as sprite, Wn as defineFlow, Wr as Api$5, Xn as FeaturePlugin, Yn as FeatureDescription, Yr as ThermalReading, Zn as FeatureTree, _ as DefineScene, _n as ResourceType, _r as Config$2, a as Config$1, b as SceneDefinition, bn as TagType, c as LoadBundles, cr as Descriptor, ct as ViewportSize, dr as GuideOptions, ei as Require, en as Config$8, er as DefineNode, et as State$6, f as State$1, fr as Hint, g as AnySceneProjection, gn as QueryTerm, hn as Narrowed, hr as Api$1, i as BundleSpec, j as HudPartValue, kn as ProjectionSpec, l as LoadReason, ln as ComponentType, lr as Effect, mn as Mut, mr as Answer, mt as FrameRing, nn as State$9, o as DefineBundles, or as SceneIdOf, p as Tier, pt as FrameRecord, q as Config$6, qr as RateChange, r as BundleMap, sn as ComponentHandle, t as Api, u as LoadResult, un as ComponentValue, ur as EffectOptions, vn as SystemDefinition, wr as Json, wt as PassKind, x as SceneSpec, y as LayerMap, yn as SystemFor, yr as State$2, zn as HudKeysOf, zr as Config$4 } from "./types-CuEK0Vam.mjs";
|
|
2
|
-
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$10, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, ct as OverlayApi, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, m as Config$12, n as State$13, r as UiApi, s as Config$11, t as Config$13, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-
|
|
3
|
-
import { A as defineComponent, B as Part, C as TextApi, D as TextStyles, E as TextStyleInput, F as Argument, I as Config$14, J as Style, K as IsFlags, L as I18nApi, M as InputApi, N as State$15, O as TextValue, R as IntlKit, S as State$16, U as TextKey, V as State$14, W as TypedTr, X as WhenFlags, _ as BindField, b as CountdownValue, h as IntrinsicElementsFor, j as Config$15, m as defineTokens, q as ResolvedStyle, s as PopupComponent, v as BindOptions, w as TextBind, x as Point, y as Config$16, z as Message } from "./types-
|
|
2
|
+
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$10, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, ct as OverlayApi, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, m as Config$12, n as State$13, r as UiApi, s as Config$11, t as Config$13, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-3bEK86Z1.mjs";
|
|
3
|
+
import { A as defineComponent, B as Part, C as TextApi, D as TextStyles, E as TextStyleInput, F as Argument, I as Config$14, J as Style, K as IsFlags, L as I18nApi, M as InputApi, N as State$15, O as TextValue, R as IntlKit, S as State$16, U as TextKey, V as State$14, W as TypedTr, X as WhenFlags, _ as BindField, b as CountdownValue, h as IntrinsicElementsFor, j as Config$15, m as defineTokens, q as ResolvedStyle, s as PopupComponent, v as BindOptions, w as TextBind, x as Point, y as Config$16, z as Message } from "./types-xmH1X8qd.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
1
|
import { $ as PoolTrim, A as HudPart, At as PerfCounts, Bt as PerfSampleLine, Ct as PROBLEM_RULES, Dr as types_d_exports$10, Dt as PerfChange, Et as PerfCause, F as OverlayValue, Ft as PerfHeaderLine, G as AdaptiveScale, Gn as exit, Gt as PoolTrimDetail, H as Transform, Ht as PerfStartupLine, I as Parent, It as PerfLogLine, J as MonitorConfig, Jn as type, Jt as SHADER_WHATS, Kn as slot, Kt as ProblemEventDetail, L as Shape, Lt as PerfLongFrameLine, M as NineSlice, Mr as SaveUnreadableError, Mt as PerfEventLine, Nt as PerfEventName, Ot as PerfChangeEntry, P as Overlay, Pt as PerfGapLine, Qt as DEMAND_REASONS, Rt as PerfMarkLine, Sn as DescriptionNode, St as PERF_LOG_VERSION, Tt as PassRecord, Un as types_d_exports$6, Ur as types_d_exports$9, Ut as PerfTelemetryLine, Vt as PerfSpikeLine, W as sprite, Wt as PerfThermalLine, Xt as ShaderWhat, Yt as ShaderEventDetail, Zr as types_d_exports$15, Zt as WarmDetail, _t as MonitorSections, br as types_d_exports$3, bt as PERF_CAUSES, dt as FrameReadResult, ft as FrameReadout, gt as MONITOR_SECTIONS, h as types_d_exports$1, ht as LongFrameEntry, it as MonitorCounts, j as HudPartValue, jt as PerfDisplay, k as Display, kt as PerfCollectorLine, mt as FrameRing, nt as types_d_exports$12, pt as FrameRecord, qn as to, qt as ProblemRule, rn as types_d_exports$17, ut as FrameColumns, vt as OverlayEventDetail, w as types_d_exports$13, wt as PassKind, xt as PERF_GAP_BUCKETS, yt as OverlayWhat, z as Sprite, zt as PerfMeasured } from "./types-CuEK0Vam.mjs";
|
|
2
|
-
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as tween, et as set, i as types_d_exports$16, it as stagger, lt as types_d_exports$4, nt as spawn, ot as use, p as types_d_exports$2, q as external, rt as spawned, st as wait, tt as sfx, v as types_d_exports$5 } from "./types-
|
|
3
|
-
import { A as defineComponent, G as types_d_exports$7, P as types_d_exports$8, T as TextFormat, b as CountdownValue, d as LocalWrite, f as ScrollState, k as types_d_exports$14, l as Box, m as defineTokens, p as popup, u as DebugTrigger, v as BindOptions } from "./types-
|
|
4
|
-
import { $ as tag, A as DropTarget, At as bind, B as Traceable, C as AnimPlayer, Ct as clockPlugin, D as defineBundles, Dt as projection, E as defineScene, Et as animPlugin, F as Pressable, G as Layer, H as PASS_KINDS, I as Pressed, J as Tree, K as Now, L as Swipeable, M as Hovered, Mt as label, N as Pointer, O as load, Ot as Countdown, P as PointerOver, Q as system, R as Tappable, S as defineMotion, St as debugPlugin, T as Frames, Tt as assetsPlugin, U as frameAt, V as Traced, W as Exiting, X as mut, Y as component, Z as resource, _ as defineStyle, _t as lifecyclePlugin, a as defineEmitter, at as flattenFeatures, b as messageDuration, bt as flowPlugin, c as Alpha, ct as timePlugin, d as Displacement, dt as rendererPlugin, et as defineEffect, f as Glow, ft as platformPlugin, g as resolve, gt as modelPlugin, h as music, ht as types_d_exports$11, i as screen, it as defineFeature, j as Held, jt as defineTextStyles, k as Draggable, kt as Text, l as Blur, lt as textPlugin, m as Outline, mt as PlatformProvider, n as createPlugin, nt as hint, o as Emitter, ot as worldPlugin, p as Noise, pt as BackResult, q as Order, r as defineGame, rt as schedule, s as defineFilter, st as uiPlugin, t as createApp, tt as guide, u as ColorMatrix, ut as scenesPlugin, v as tr, vt as inputPlugin, w as Animation, wt as audioPlugin, x as cubicBezier, xt as effectsPlugin, y as messageArgument, yt as i18nPlugin, z as Touchable } from "./index-
|
|
2
|
+
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as tween, et as set, i as types_d_exports$16, it as stagger, lt as types_d_exports$4, nt as spawn, ot as use, p as types_d_exports$2, q as external, rt as spawned, st as wait, tt as sfx, v as types_d_exports$5 } from "./types-3bEK86Z1.mjs";
|
|
3
|
+
import { A as defineComponent, G as types_d_exports$7, P as types_d_exports$8, T as TextFormat, b as CountdownValue, d as LocalWrite, f as ScrollState, k as types_d_exports$14, l as Box, m as defineTokens, p as popup, u as DebugTrigger, v as BindOptions } from "./types-xmH1X8qd.mjs";
|
|
4
|
+
import { $ as tag, A as DropTarget, At as bind, B as Traceable, C as AnimPlayer, Ct as clockPlugin, D as defineBundles, Dt as projection, E as defineScene, Et as animPlugin, F as Pressable, G as Layer, H as PASS_KINDS, I as Pressed, J as Tree, K as Now, L as Swipeable, M as Hovered, Mt as label, N as Pointer, O as load, Ot as Countdown, P as PointerOver, Q as system, R as Tappable, S as defineMotion, St as debugPlugin, T as Frames, Tt as assetsPlugin, U as frameAt, V as Traced, W as Exiting, X as mut, Y as component, Z as resource, _ as defineStyle, _t as lifecyclePlugin, a as defineEmitter, at as flattenFeatures, b as messageDuration, bt as flowPlugin, c as Alpha, ct as timePlugin, d as Displacement, dt as rendererPlugin, et as defineEffect, f as Glow, ft as platformPlugin, g as resolve, gt as modelPlugin, h as music, ht as types_d_exports$11, i as screen, it as defineFeature, j as Held, jt as defineTextStyles, k as Draggable, kt as Text, l as Blur, lt as textPlugin, m as Outline, mt as PlatformProvider, n as createPlugin, nt as hint, o as Emitter, ot as worldPlugin, p as Noise, pt as BackResult, q as Order, r as defineGame, rt as schedule, s as defineFilter, st as uiPlugin, t as createApp, tt as guide, u as ColorMatrix, ut as scenesPlugin, v as tr, vt as inputPlugin, w as Animation, wt as audioPlugin, x as cubicBezier, xt as effectsPlugin, y as messageArgument, yt as i18nPlugin, z as Touchable } from "./index-YUceiUFm.mjs";
|
|
5
5
|
export { type AdaptiveScale, Alpha, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Sprite, Swipeable, Tappable, Text, type TextFormat, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, type WarmDetail, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { $ as spawn, $t as exit, A as types_exports$6, At as Outline, B as textPlugin, Bt as rendererPlugin, C as types_exports$13, Ct as Emitter, D as types_exports$9, Dt as Displacement, E as types_exports$10, Et as ColorMatrix, F as types_exports$1, Ft as assetsPlugin, G as frames, Gt as PERF_GAP_BUCKETS, H as HAPTIC_KINDS, Ht as frameAt, I as types_exports, It as animPlugin, J as parallel, Jt as SHADER_WHATS, K as haptic, Kt as PERF_LOG_VERSION, L as uiPlugin, Lt as AnimPlayer, M as types_exports$4, Mt as debugPlugin, N as types_exports$3, Nt as audioPlugin, O as types_exports$8, Ot as Glow, P as types_exports$2, Pt as scenesPlugin, Q as sfx, R as resolve, Rt as Animation, S as types_exports$14, St as effectsPlugin, T as types_exports$11, Tt as Blur, U as defineAnimation, Ut as MONITOR_SECTIONS, V as platformPlugin, Vt as PASS_KINDS, W as external, Wt as PERF_CAUSES, X as sequence, Xt as worldPlugin, Y as play, Yt as DEMAND_REASONS, Z as set, Zt as flowPlugin, _ as defineBundles, _t as Traceable, a as cubicBezier, an as lifecyclePlugin, at as inputPlugin, b as types_exports$16, bt as messageArgument, c as hint, ct as Held, d as defineScene, dt as PointerOver, en as slot, et as spawned, f as tr, ft as Pressable, g as music, gt as Touchable, h as defineEmitter, ht as Tappable, i as screen, in as SaveUnreadableError, it as wait, j as types_exports$5, jt as defineFilter, k as types_exports$7, kt as Noise, l as schedule, lt as Hovered, m as flattenFeatures, mt as Swipeable, n as createPlugin, nn as type, nt as tween, o as defineEffect, on as timePlugin, ot as Draggable, p as defineFeature, pt as Pressed, q as mark, qt as PROBLEM_RULES, r as defineGame, rn as modelPlugin, rt as use, s as guide, sn as clockPlugin, st as DropTarget, t as createApp, tn as to, tt as stagger, u as projection, ut as Pointer, v as load, vt as Traced, w as types_exports$12, wt as Alpha, x as types_exports$15, xt as messageDuration, y as types_exports$17, yt as i18nPlugin, z as defineMotion, zt as Frames } from "./src-3_HjYegY.mjs";
|
|
2
|
+
import { $ as component, H as Shape, I as Display, J as Exiting, L as HudPart, Q as Tree, R as NineSlice, S as bind, T as label, U as Sprite, V as Parent, W as Transform, X as Now, Y as Layer, Z as Order, b as Countdown, d as LocalWrite, et as mut, g as popup, it as tag, l as DebugTrigger, nt as system, p as ScrollState, q as sprite, s as Box, tt as resource, v as defineTokens, w as defineTextStyles, x as Text, y as defineStyle, z as Overlay } from "./visual-CbGKzlj0.mjs";
|
|
3
|
+
import { t as defineComponent } from "./component-DGg5DqKK.mjs";
|
|
4
4
|
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $t as Api$1, Bn as Position, K as Api$2, Nr as Snapshot, at as RenderStats, cn as ComponentSchema, fn as EntitySnapshot, m as Usage, pn as FrameDiff, rr as JournalEntry, t as Api$3, tn as Explained, tr as FlowGraph, tt as Under, xr as Api } from "./types-CuEK0Vam.mjs";
|
|
2
|
-
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-
|
|
3
|
-
import { c as UiNode } from "./types-
|
|
2
|
+
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-3bEK86Z1.mjs";
|
|
3
|
+
import { c as UiNode } from "./types-xmH1X8qd.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-DHtavbqk.mjs";
|
|
5
5
|
import { a as InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-_a6-ALzz.mjs";
|
|
6
6
|
import { n as defineSource } from "./define-DbxBzO-G.mjs";
|
|
@@ -86,7 +86,6 @@ declare const sources: Readonly<{
|
|
|
86
86
|
} | undefined, HeadlessApp & {
|
|
87
87
|
readonly ui: UiApi;
|
|
88
88
|
readonly renderer: Api$2;
|
|
89
|
-
} & {
|
|
90
89
|
readonly world: Api$1;
|
|
91
90
|
}>;
|
|
92
91
|
render: Source<{}, RenderStats, HeadlessApp & {
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as defineSource } from "./session-CeKgO2hy.mjs";
|
|
2
|
-
import { n as read, r as watch, t as sources } from "./sources-
|
|
2
|
+
import { n as read, r as watch, t as sources } from "./sources-Fbq_PFVH.mjs";
|
|
3
3
|
import "./inspect-la_KkjCS.mjs";
|
|
4
4
|
export { defineSource, read, sources, watch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-B5OD9JTT.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as jsxs, n as jsx, r as jsxDEV, t as Fragment } from "./runtime-
|
|
1
|
+
import { i as jsxs, n as jsx, r as jsxDEV, t as Fragment } from "./runtime-DnM9i73o.mjs";
|
|
2
2
|
export { Fragment, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-B5OD9JTT.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxs };
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as jsxs, n as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { i as jsxs, n as jsx, t as Fragment } from "./runtime-DnM9i73o.mjs";
|
|
2
2
|
export { Fragment, jsx, jsxs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as JsxChild, g as UiIntrinsicElements, t as DescriptionNode } from "./types-
|
|
1
|
+
import { a as JsxChild, g as UiIntrinsicElements, t as DescriptionNode } from "./types-xmH1X8qd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/ui/jsx/runtime.d.ts
|
|
4
4
|
/** What the compiler passes as props: the children plus whatever the tag declared. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as isComponentDefinition } from "./component-DGg5DqKK.mjs";
|
|
2
|
+
import { n as flatten, t as FRAGMENT } from "./flatten-nUX9PpGo.mjs";
|
|
2
3
|
//#region src/plugins/ui/jsx/runtime.ts
|
|
3
4
|
/**
|
|
4
5
|
* @file ui/jsx — the JSX runtime itself: the three factories a TypeScript build calls, the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as rootPoseOf, H as Shape, R as NineSlice, Y as Layer, j as parentOf, n as drawnRect, s as Box } from "./visual-CbGKzlj0.mjs";
|
|
2
2
|
import { o as notInstalled } from "./dev-BNndV-hU.mjs";
|
|
3
3
|
import { a as readTarget, c as defineSource, n as isTainted, o as inputOrEmpty, t as cheatsOf } from "./session-CeKgO2hy.mjs";
|
|
4
4
|
//#region src/plugins/flow/doors/read.ts
|
|
@@ -304,36 +304,80 @@ const atSource = defineSource({
|
|
|
304
304
|
* @file ui plugin — the ui sources of the `/inspect` door: the live screen as data, and where an
|
|
305
305
|
* element or a view is on the page. Production-safe: every one only reads.
|
|
306
306
|
*/
|
|
307
|
+
/** How deep a parent chain is followed for clips; deeper is treated as a loop. */
|
|
308
|
+
const MAX_DEPTH = 32;
|
|
309
|
+
/**
|
|
310
|
+
* Where a box of an entity's own space lands in root space: `0, 0, w, h` through its root pose,
|
|
311
|
+
* which composes every `Transform` up its `Parent` chain (a scroll's offset, a fit, a slot, a
|
|
312
|
+
* motion). The rotation is left out, as the guide does.
|
|
313
|
+
*
|
|
314
|
+
* @param ecs - The world read.
|
|
315
|
+
* @param entity - The entity.
|
|
316
|
+
* @param w - The width of the box in the entity's own units.
|
|
317
|
+
* @param h - The height of the box.
|
|
318
|
+
* @returns The rect in root coordinates.
|
|
319
|
+
*/
|
|
320
|
+
function rootBoxOf(ecs, entity, w, h) {
|
|
321
|
+
return drawnRect(rootPoseOf(ecs, entity), {
|
|
322
|
+
x: 0,
|
|
323
|
+
y: 0,
|
|
324
|
+
w,
|
|
325
|
+
h
|
|
326
|
+
});
|
|
327
|
+
}
|
|
307
328
|
/**
|
|
308
|
-
*
|
|
329
|
+
* The box an entity clips its children to, the way the renderer masks them: the `width × height`
|
|
330
|
+
* of a clipping `NineSlice`, the `w × h` of a clipping `Shape`, in root coordinates.
|
|
309
331
|
*
|
|
310
|
-
* @param
|
|
311
|
-
* @param
|
|
312
|
-
* @returns The
|
|
332
|
+
* @param ecs - The world read.
|
|
333
|
+
* @param entity - The entity.
|
|
334
|
+
* @returns The clip in root coordinates, or `undefined` when the entity clips nothing.
|
|
313
335
|
*/
|
|
314
|
-
function
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
chain.push(node);
|
|
320
|
-
return chain;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
336
|
+
function clipOf(ecs, entity) {
|
|
337
|
+
const panel = ecs.get(entity, NineSlice);
|
|
338
|
+
if (panel?.clip === true) return rootBoxOf(ecs, entity, panel.width, panel.height);
|
|
339
|
+
const shape = ecs.get(entity, Shape);
|
|
340
|
+
return shape?.clip === true ? rootBoxOf(ecs, entity, shape.w, shape.h) : void 0;
|
|
323
341
|
}
|
|
324
342
|
/**
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* @
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
343
|
+
* The part of a rect inside another.
|
|
344
|
+
*
|
|
345
|
+
* @param rect - The rect to cut.
|
|
346
|
+
* @param clip - The rect it is cut to.
|
|
347
|
+
* @returns The overlap, or `undefined` when they do not overlap.
|
|
348
|
+
*/
|
|
349
|
+
function intersect(rect, clip) {
|
|
350
|
+
const x = Math.max(rect.x, clip.x);
|
|
351
|
+
const y = Math.max(rect.y, clip.y);
|
|
352
|
+
const right = Math.min(rect.x + rect.w, clip.x + clip.w);
|
|
353
|
+
const bottom = Math.min(rect.y + rect.h, clip.y + clip.h);
|
|
354
|
+
return right > x && bottom > y ? {
|
|
355
|
+
x,
|
|
356
|
+
y,
|
|
357
|
+
w: right - x,
|
|
358
|
+
h: bottom - y
|
|
359
|
+
} : void 0;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Where an element is drawn, in root coordinates: its `Box` size through its root pose, cut by
|
|
363
|
+
* every clipping entity above it (a `scroll`, an `overflow: "hidden"`), as the renderer masks it.
|
|
364
|
+
* Its own clip masks only its children, so it never cuts the element itself.
|
|
365
|
+
*
|
|
366
|
+
* @param ecs - The world read.
|
|
367
|
+
* @param entity - The element's entity.
|
|
368
|
+
* @returns The drawn rect, or `undefined` when no part of it shows: cut away by a clip, or drawn
|
|
369
|
+
* at no size (an element entering from scale 0), as `renderer.sync.boundsOf` answers a view.
|
|
370
|
+
*/
|
|
371
|
+
function drawnRectOf(ecs, entity) {
|
|
372
|
+
const box = ecs.get(entity, Box);
|
|
373
|
+
if (box === void 0) return void 0;
|
|
374
|
+
const own = rootBoxOf(ecs, entity, box.w, box.h);
|
|
375
|
+
let drawn = own.w > 0 && own.h > 0 ? own : void 0;
|
|
376
|
+
for (let above = parentOf(ecs, entity), depth = 0; above !== 0 && drawn !== void 0 && depth < MAX_DEPTH; above = parentOf(ecs, above), depth += 1) {
|
|
377
|
+
const clip = clipOf(ecs, above);
|
|
378
|
+
if (clip !== void 0) drawn = intersect(drawn, clip);
|
|
379
|
+
}
|
|
380
|
+
return drawn;
|
|
337
381
|
}
|
|
338
382
|
/**
|
|
339
383
|
* Maps a rect in reference units to CSS px of the page through both of its corners.
|
|
@@ -359,16 +403,19 @@ function onPage(renderer, rect) {
|
|
|
359
403
|
};
|
|
360
404
|
}
|
|
361
405
|
/**
|
|
362
|
-
* Where a live ui element is on the page: its layout box
|
|
363
|
-
* it,
|
|
406
|
+
* Where a live ui element is on the page: where it is drawn (its layout box through its root pose,
|
|
407
|
+
* so a scroll's offset, a fit and a slot move it), cut by every clipping element above it,
|
|
408
|
+
* through the viewport.
|
|
364
409
|
*
|
|
365
|
-
* @param app - The app with ui and
|
|
410
|
+
* @param app - The app with ui, renderer and world.
|
|
366
411
|
* @param key - The `key` prop of the element.
|
|
367
|
-
* @returns The rect in CSS px, or `undefined` when no live element has the key
|
|
412
|
+
* @returns The rect in CSS px, or `undefined` when no live element has the key or a clip above
|
|
413
|
+
* hides all of it.
|
|
368
414
|
*/
|
|
369
415
|
function locateKey(app, key) {
|
|
370
|
-
const
|
|
371
|
-
|
|
416
|
+
const entity = app.ui.find(key);
|
|
417
|
+
const drawn = entity === void 0 ? void 0 : drawnRectOf(app.world.ecs, entity);
|
|
418
|
+
return drawn === void 0 ? void 0 : onPage(app.renderer, drawn);
|
|
372
419
|
}
|
|
373
420
|
/**
|
|
374
421
|
* Where a view is on the page: the box the renderer draws for the entity of its projection key,
|
|
@@ -408,9 +455,9 @@ const uiSource = defineSource({
|
|
|
408
455
|
});
|
|
409
456
|
/**
|
|
410
457
|
* Where something is on the page, in CSS px, by either of the two addresses the doors use: a ui
|
|
411
|
-
* element by its `key` (its layout box
|
|
412
|
-
* with no fill has one), or a view by its `target`
|
|
413
|
-
* it). Both go through the viewport, so the numbers are what Playwright clicks. In reference units
|
|
458
|
+
* element by its `key` (its layout box through its drawn pose, so a scroll's offset and a fit move
|
|
459
|
+
* it and a bare button with no fill has one, cut by every clip above it), or a view by its `target`
|
|
460
|
+
* projection key (the box the renderer draws for it). Both go through the viewport, so the numbers are what Playwright clicks. In reference units
|
|
414
461
|
* while the renderer is inert; a view has no drawn box then.
|
|
415
462
|
*
|
|
416
463
|
* @example
|