1681-engine 0.5.9 → 0.6.0
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/CHANGELOG.md +92 -1
- package/README.md +15 -6
- package/dist/1681-engine.js +588 -465
- package/dist/ai/behaviorTree.js +198 -0
- package/dist/ai/buildTree.js +54 -0
- package/dist/ambient/life/Birds.js +73 -0
- package/dist/ambient/life/Butterflies.js +43 -0
- package/dist/ambient/life/ChimneySmoke.js +50 -0
- package/dist/ambient/life/Drift.js +75 -0
- package/dist/ambient/life/Fireflies.js +52 -0
- package/dist/ambient/life/lifeMotion.js +49 -0
- package/dist/assets/AssetLoader.js +115 -70
- package/dist/assets/Prepainter.js +61 -0
- package/dist/assets/workerPainter.js +39 -0
- package/dist/audio/spatial.js +118 -0
- package/dist/cjs/electron/electronLike.d.ts +55 -0
- package/dist/cjs/electron/electronLike.js +7 -0
- package/dist/cjs/electron/index.d.ts +14 -0
- package/dist/cjs/electron/index.js +20 -0
- package/dist/cjs/electron/lockdown.d.ts +33 -0
- package/dist/cjs/electron/lockdown.js +69 -0
- package/dist/cjs/electron/lockdownRules.d.ts +28 -0
- package/dist/cjs/electron/lockdownRules.js +61 -0
- package/dist/cjs/electron/sessionStore.d.ts +40 -0
- package/dist/cjs/electron/sessionStore.js +77 -0
- package/dist/cjs/electron/shellId.d.ts +22 -0
- package/dist/cjs/electron/shellId.js +31 -0
- package/dist/cjs/electron/webFiles.d.ts +13 -0
- package/dist/cjs/electron/webFiles.js +52 -0
- package/dist/cjs/electron/webPatcher.d.ts +83 -0
- package/dist/cjs/electron/webPatcher.js +223 -0
- package/dist/cjs/electron/webPointers.d.ts +19 -0
- package/dist/cjs/electron/webPointers.js +35 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/updates/index.d.ts +8 -0
- package/dist/cjs/updates/index.js +21 -0
- package/dist/cjs/updates/manifest.d.ts +73 -0
- package/dist/cjs/updates/manifest.js +67 -0
- package/dist/cjs/updates/pickUpdate.d.ts +42 -0
- package/dist/cjs/updates/pickUpdate.js +52 -0
- package/dist/cjs/updates/webPlan.d.ts +20 -0
- package/dist/cjs/updates/webPlan.js +34 -0
- package/dist/dialogue/DialogueRunner.js +173 -0
- package/dist/dialogue/expr.js +137 -0
- package/dist/dialogue/validateDialogue.js +52 -0
- package/dist/ecs/prefab.js +94 -0
- package/dist/electron/lockdown.js +31 -0
- package/dist/electron/lockdownRules.js +42 -0
- package/dist/electron/sessionStore.js +48 -0
- package/dist/electron/shellId.js +18 -0
- package/dist/electron/webFiles.js +36 -0
- package/dist/electron/webPatcher.js +153 -0
- package/dist/electron/webPointers.js +25 -0
- package/dist/electron.js +19 -0
- package/dist/input/Actions.js +58 -27
- package/dist/input/InputCapture.js +98 -0
- package/dist/input/Keymap.js +32 -26
- package/dist/input/haptics.js +50 -0
- package/dist/input/inputTape.js +68 -0
- package/dist/mobile/backButton.js +40 -0
- package/dist/mobile/capacitor.js +48 -0
- package/dist/mobile/screen.js +31 -0
- package/dist/mobile.js +12 -0
- package/dist/nav/flowField.js +58 -0
- package/dist/nav/steering.js +77 -0
- package/dist/net/ApiClient.js +96 -0
- package/dist/net/InterpolationBuffer.js +30 -23
- package/dist/net/LagCompensator.js +100 -0
- package/dist/net/Room.js +122 -43
- package/dist/net/RoomHost.js +13 -4
- package/dist/net/SpatialHash.js +66 -0
- package/dist/pixel/lifeArt.js +83 -0
- package/dist/pixel.js +63 -58
- package/dist/react/ConfirmButton.js +24 -0
- package/dist/react/baseCss.js +1 -0
- package/dist/react/labels.js +7 -6
- package/dist/react/useJsonSelector.js +13 -0
- package/dist/react.js +73 -68
- package/dist/tilemap/TilemapView.js +57 -32
- package/dist/tilemap/autotile.js +103 -0
- package/dist/tilemap/collision.js +29 -18
- package/dist/tilemap/ldtk.js +21 -0
- package/dist/tilemap/ldtkParse.js +191 -0
- package/dist/types/ai/behaviorTree.d.ts +133 -0
- package/dist/types/ai/behaviorTree.d.ts.map +1 -0
- package/dist/types/ai/buildTree.d.ts +55 -0
- package/dist/types/ai/buildTree.d.ts.map +1 -0
- package/dist/types/ambient/life/Birds.d.ts +50 -0
- package/dist/types/ambient/life/Birds.d.ts.map +1 -0
- package/dist/types/ambient/life/Butterflies.d.ts +32 -0
- package/dist/types/ambient/life/Butterflies.d.ts.map +1 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts +37 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts.map +1 -0
- package/dist/types/ambient/life/Drift.d.ts +58 -0
- package/dist/types/ambient/life/Drift.d.ts.map +1 -0
- package/dist/types/ambient/life/Fireflies.d.ts +43 -0
- package/dist/types/ambient/life/Fireflies.d.ts.map +1 -0
- package/dist/types/ambient/life/lifeMotion.d.ts +63 -0
- package/dist/types/ambient/life/lifeMotion.d.ts.map +1 -0
- package/dist/types/assets/AssetLoader.d.ts +20 -0
- package/dist/types/assets/AssetLoader.d.ts.map +1 -1
- package/dist/types/assets/Prepainter.d.ts +64 -0
- package/dist/types/assets/Prepainter.d.ts.map +1 -0
- package/dist/types/assets/workerPainter.d.ts +21 -0
- package/dist/types/assets/workerPainter.d.ts.map +1 -0
- package/dist/types/audio/spatial.d.ts +107 -0
- package/dist/types/audio/spatial.d.ts.map +1 -0
- package/dist/types/dialogue/DialogueRunner.d.ts +78 -0
- package/dist/types/dialogue/DialogueRunner.d.ts.map +1 -0
- package/dist/types/dialogue/expr.d.ts +12 -0
- package/dist/types/dialogue/expr.d.ts.map +1 -0
- package/dist/types/dialogue/script.d.ts +78 -0
- package/dist/types/dialogue/script.d.ts.map +1 -0
- package/dist/types/dialogue/validateDialogue.d.ts +21 -0
- package/dist/types/dialogue/validateDialogue.d.ts.map +1 -0
- package/dist/types/ecs/prefab.d.ts +84 -0
- package/dist/types/ecs/prefab.d.ts.map +1 -0
- package/dist/types/electron/electronLike.d.ts +56 -0
- package/dist/types/electron/electronLike.d.ts.map +1 -0
- package/dist/types/electron/index.d.ts +15 -0
- package/dist/types/electron/index.d.ts.map +1 -0
- package/dist/types/electron/lockdown.d.ts +34 -0
- package/dist/types/electron/lockdown.d.ts.map +1 -0
- package/dist/types/electron/lockdownRules.d.ts +29 -0
- package/dist/types/electron/lockdownRules.d.ts.map +1 -0
- package/dist/types/electron/sessionStore.d.ts +41 -0
- package/dist/types/electron/sessionStore.d.ts.map +1 -0
- package/dist/types/electron/shellId.d.ts +23 -0
- package/dist/types/electron/shellId.d.ts.map +1 -0
- package/dist/types/electron/webFiles.d.ts +14 -0
- package/dist/types/electron/webFiles.d.ts.map +1 -0
- package/dist/types/electron/webPatcher.d.ts +84 -0
- package/dist/types/electron/webPatcher.d.ts.map +1 -0
- package/dist/types/electron/webPointers.d.ts +20 -0
- package/dist/types/electron/webPointers.d.ts.map +1 -0
- package/dist/types/index.d.ts +30 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/input/Actions.d.ts +14 -0
- package/dist/types/input/Actions.d.ts.map +1 -1
- package/dist/types/input/InputCapture.d.ts +53 -0
- package/dist/types/input/InputCapture.d.ts.map +1 -0
- package/dist/types/input/Keymap.d.ts +12 -6
- package/dist/types/input/Keymap.d.ts.map +1 -1
- package/dist/types/input/haptics.d.ts +42 -0
- package/dist/types/input/haptics.d.ts.map +1 -0
- package/dist/types/input/inputTape.d.ts +66 -0
- package/dist/types/input/inputTape.d.ts.map +1 -0
- package/dist/types/mobile/backButton.d.ts +30 -0
- package/dist/types/mobile/backButton.d.ts.map +1 -0
- package/dist/types/mobile/capacitor.d.ts +62 -0
- package/dist/types/mobile/capacitor.d.ts.map +1 -0
- package/dist/types/mobile/index.d.ts +4 -0
- package/dist/types/mobile/index.d.ts.map +1 -0
- package/dist/types/mobile/screen.d.ts +27 -0
- package/dist/types/mobile/screen.d.ts.map +1 -0
- package/dist/types/nav/flowField.d.ts +31 -0
- package/dist/types/nav/flowField.d.ts.map +1 -0
- package/dist/types/nav/steering.d.ts +47 -0
- package/dist/types/nav/steering.d.ts.map +1 -0
- package/dist/types/net/ApiClient.d.ts +74 -0
- package/dist/types/net/ApiClient.d.ts.map +1 -0
- package/dist/types/net/InterpolationBuffer.d.ts +5 -0
- package/dist/types/net/InterpolationBuffer.d.ts.map +1 -1
- package/dist/types/net/LagCompensator.d.ts +70 -0
- package/dist/types/net/LagCompensator.d.ts.map +1 -0
- package/dist/types/net/Room.d.ts +72 -3
- package/dist/types/net/Room.d.ts.map +1 -1
- package/dist/types/net/RoomHost.d.ts +8 -3
- package/dist/types/net/RoomHost.d.ts.map +1 -1
- package/dist/types/net/SpatialHash.d.ts +25 -0
- package/dist/types/net/SpatialHash.d.ts.map +1 -0
- package/dist/types/pixel/index.d.ts +1 -0
- package/dist/types/pixel/index.d.ts.map +1 -1
- package/dist/types/pixel/lifeArt.d.ts +63 -0
- package/dist/types/pixel/lifeArt.d.ts.map +1 -0
- package/dist/types/react/ConfirmButton.d.ts +26 -0
- package/dist/types/react/ConfirmButton.d.ts.map +1 -0
- package/dist/types/react/baseCss.d.ts +1 -1
- package/dist/types/react/baseCss.d.ts.map +1 -1
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/react/index.d.ts.map +1 -1
- package/dist/types/react/labels.d.ts +2 -0
- package/dist/types/react/labels.d.ts.map +1 -1
- package/dist/types/react/useJsonSelector.d.ts +13 -0
- package/dist/types/react/useJsonSelector.d.ts.map +1 -0
- package/dist/types/tilemap/TilemapView.d.ts +17 -0
- package/dist/types/tilemap/TilemapView.d.ts.map +1 -1
- package/dist/types/tilemap/autotile.d.ts +95 -0
- package/dist/types/tilemap/autotile.d.ts.map +1 -0
- package/dist/types/tilemap/collision.d.ts +8 -0
- package/dist/types/tilemap/collision.d.ts.map +1 -1
- package/dist/types/tilemap/ldtk.d.ts +97 -0
- package/dist/types/tilemap/ldtk.d.ts.map +1 -0
- package/dist/types/tilemap/ldtkParse.d.ts +26 -0
- package/dist/types/tilemap/ldtkParse.d.ts.map +1 -0
- package/dist/types/ui/ScrollView.d.ts.map +1 -1
- package/dist/types/updates/index.d.ts +9 -0
- package/dist/types/updates/index.d.ts.map +1 -0
- package/dist/types/updates/manifest.d.ts +74 -0
- package/dist/types/updates/manifest.d.ts.map +1 -0
- package/dist/types/updates/pickUpdate.d.ts +43 -0
- package/dist/types/updates/pickUpdate.d.ts.map +1 -0
- package/dist/types/updates/webPlan.d.ts +21 -0
- package/dist/types/updates/webPlan.d.ts.map +1 -0
- package/dist/ui/ScrollView.js +10 -8
- package/dist/updates/manifest.js +35 -0
- package/dist/updates/pickUpdate.js +27 -0
- package/dist/updates/webPlan.js +14 -0
- package/dist/updates.js +15 -0
- package/package.json +35 -3
package/dist/types/net/Room.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { InputStep, MovementParams } from './constants.js';
|
|
2
|
+
import { LagCompensator } from './LagCompensator.js';
|
|
2
3
|
import { type CollisionGrid, type MoverState } from './movement.js';
|
|
3
4
|
import { type Snapshot } from './protocol.js';
|
|
4
5
|
export interface RoomPlayer<D = unknown> {
|
|
6
|
+
readonly kind: 'player';
|
|
5
7
|
readonly id: number;
|
|
6
8
|
readonly mover: MoverState;
|
|
7
9
|
/** The game's own data for this player (sent to others in `sp` when they first see it). */
|
|
@@ -19,7 +21,39 @@ export interface RoomPlayer<D = unknown> {
|
|
|
19
21
|
/** Refused inputs (nonsense numbers, a flood): a game may kick past some count. */
|
|
20
22
|
strikes: number;
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
/**
|
|
25
|
+
* A body the server moves itself (a monster, a projectile, a crate): no input, no prediction, sent to players beside
|
|
26
|
+
* them in the same snapshots. The game writes `x`, `y` and the rest as its own simulation runs.
|
|
27
|
+
*/
|
|
28
|
+
export interface RoomBody<B = unknown> {
|
|
29
|
+
readonly kind: 'body';
|
|
30
|
+
readonly id: number;
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
aim: number;
|
|
34
|
+
anim: number;
|
|
35
|
+
hp: number;
|
|
36
|
+
flags: number;
|
|
37
|
+
/** The game's own description of it, sent in `sp` when a player first sees it. */
|
|
38
|
+
data: B;
|
|
39
|
+
}
|
|
40
|
+
/** Anything a snapshot carries: a player or a body the server moves. */
|
|
41
|
+
export type RoomSeen<D = unknown, B = unknown> = RoomPlayer<D> | RoomBody<B>;
|
|
42
|
+
/** Server bodies get ids from here up unless given one, far above the ids `RoomHost` hands players. */
|
|
43
|
+
export declare const BODY_ID_BASE: number;
|
|
44
|
+
/** Who a player is sent: the bodies near it, not the whole room. */
|
|
45
|
+
export interface RoomInterest<D, B = unknown> {
|
|
46
|
+
/** A body comes into view within this many px of the player (centre to centre). */
|
|
47
|
+
radius: number;
|
|
48
|
+
/**
|
|
49
|
+
* And leaves only past `radius + leaveMargin` (default a quarter of `radius`), so a body walking along the edge is
|
|
50
|
+
* not spawned and removed on every snapshot.
|
|
51
|
+
*/
|
|
52
|
+
leaveMargin?: number;
|
|
53
|
+
/** A further test, for what distance alone does not decide (a team's own always, a hidden enemy never). */
|
|
54
|
+
canSee?: (viewer: RoomPlayer<D>, other: RoomSeen<D, B>) => boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface RoomOptions<D, B = unknown> {
|
|
23
57
|
grid: CollisionGrid;
|
|
24
58
|
/** Movement rules a new player starts with. */
|
|
25
59
|
params: MovementParams;
|
|
@@ -35,6 +69,13 @@ export interface RoomOptions<D> {
|
|
|
35
69
|
backlog?: number;
|
|
36
70
|
/** Called after each step a player takes (set aim, anim, flags from it). */
|
|
37
71
|
onStep?: (player: RoomPlayer<D>, step: InputStep) => void;
|
|
72
|
+
/** Send each player only the bodies near it (default: everyone to everyone). */
|
|
73
|
+
interest?: RoomInterest<D, B>;
|
|
74
|
+
/**
|
|
75
|
+
* Keep this many ms of positions for lag compensation (`history`), recorded as each round of snapshots goes out
|
|
76
|
+
* (`record`). Off by default.
|
|
77
|
+
*/
|
|
78
|
+
rewindMs?: number;
|
|
38
79
|
}
|
|
39
80
|
/**
|
|
40
81
|
* An authoritative room for a server: players send input steps, the room applies them with the same `stepMover` the
|
|
@@ -44,17 +85,38 @@ export interface RoomOptions<D> {
|
|
|
44
85
|
* Every step a player sends is applied once, in order; a client cannot move faster by sending more (the queue is
|
|
45
86
|
* capped and drained at most `maxStepsPerTick` a tick), and nonsense input is refused and counted.
|
|
46
87
|
*/
|
|
47
|
-
export declare class Room<D = unknown> {
|
|
88
|
+
export declare class Room<D = unknown, B = unknown> {
|
|
48
89
|
private readonly options;
|
|
49
90
|
readonly players: Map<number, RoomPlayer<D>>;
|
|
91
|
+
/** The bodies the server moves (`addBody`). */
|
|
92
|
+
readonly bodies: Map<number, RoomBody<B>>;
|
|
50
93
|
tick: number;
|
|
94
|
+
/** Past positions for judging shots against what a client saw, when the room was made with `rewindMs`. */
|
|
95
|
+
readonly history: LagCompensator | null;
|
|
96
|
+
/** How far back a client's claimed view time is honoured (`rewindMs`, 0 when off). */
|
|
97
|
+
readonly rewindMs: number;
|
|
51
98
|
private readonly known;
|
|
99
|
+
private readonly hash;
|
|
100
|
+
private readonly nearby;
|
|
52
101
|
private readonly maxQueue;
|
|
53
102
|
private readonly maxSteps;
|
|
54
103
|
private readonly backlog;
|
|
55
|
-
|
|
104
|
+
private nextBodyId;
|
|
105
|
+
constructor(options: RoomOptions<D, B>);
|
|
56
106
|
join(id: number, data: D): RoomPlayer<D>;
|
|
57
107
|
leave(id: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* Records where every body is now, at server time `time`, into `history`; `RoomHost` calls it as each round of
|
|
110
|
+
* snapshots goes out, so the history holds exactly the positions clients interpolate between.
|
|
111
|
+
*/
|
|
112
|
+
record(time: number): void;
|
|
113
|
+
/**
|
|
114
|
+
* Adds a body the server moves, at (x, y), with the game's `data` (what players are told it looks like). Its id
|
|
115
|
+
* is `id`, or the next from `BODY_ID_BASE` up; an id a player or body has is refused.
|
|
116
|
+
*/
|
|
117
|
+
addBody(data: B, x: number, y: number, id?: number): RoomBody<B>;
|
|
118
|
+
/** Takes a body out: players who saw it get it in `rm` with their next snapshot. */
|
|
119
|
+
removeBody(id: number): void;
|
|
58
120
|
/**
|
|
59
121
|
* Input steps `seq`, `seq + 1`, … from a player. Steps already received are skipped (a resend), any step with
|
|
60
122
|
* numbers no client sends refuses the whole message, and steps past a full queue are dropped. Returns false when
|
|
@@ -63,7 +125,14 @@ export declare class Room<D = unknown> {
|
|
|
63
125
|
input(id: number, seq: number, steps: readonly InputStep[]): boolean;
|
|
64
126
|
/** One simulation step for everyone. */
|
|
65
127
|
step(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Moves a player by hand (a teleport, a respawn), and files it in the interest grid at once. Writing `mover.x/y`
|
|
130
|
+
* directly also works; the room then finds it at its new place from the next step.
|
|
131
|
+
*/
|
|
132
|
+
place(id: number, x: number, y: number): void;
|
|
66
133
|
/** The snapshot player `id` should get now. `time` is the server's wall clock (ms). */
|
|
67
134
|
snapshotFor(id: number, time: number): Snapshot | null;
|
|
135
|
+
/** What `me` is sent: itself always; with interest, the rest in range (a known one until past the margin). */
|
|
136
|
+
private visibleTo;
|
|
68
137
|
}
|
|
69
138
|
//# sourceMappingURL=Room.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/net/Room.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAA0B,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/net/Room.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAA0B,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY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EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IA6BtD,8GAA8G;IAC9G,OAAO,CAAC,SAAS;CAsBlB"}
|
|
@@ -39,8 +39,8 @@ export interface RoomHostOptions<D> {
|
|
|
39
39
|
* host.start();
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare class RoomHost<D = unknown> {
|
|
43
|
-
readonly room: Room<D>;
|
|
42
|
+
export declare class RoomHost<D = unknown, B = unknown> {
|
|
43
|
+
readonly room: Room<D, B>;
|
|
44
44
|
private readonly options;
|
|
45
45
|
private readonly sockets;
|
|
46
46
|
private readonly joined;
|
|
@@ -51,7 +51,7 @@ export declare class RoomHost<D = unknown> {
|
|
|
51
51
|
private readonly stepMs;
|
|
52
52
|
private readonly snapEvery;
|
|
53
53
|
private readonly now;
|
|
54
|
-
constructor(room: Room<D>, options?: RoomHostOptions<D>);
|
|
54
|
+
constructor(room: Room<D, B>, options?: RoomHostOptions<D>);
|
|
55
55
|
/** A socket connected; returns the id its messages and its close are reported under. */
|
|
56
56
|
connect(socket: HostSocket): number;
|
|
57
57
|
/** A message arrived from socket `id` (text as a string, binary as bytes). */
|
|
@@ -68,6 +68,11 @@ export declare class RoomHost<D = unknown> {
|
|
|
68
68
|
stop(): void;
|
|
69
69
|
/** One step, and the snapshots when they are due. Exposed for tests and for servers that drive their own loop. */
|
|
70
70
|
stepOnce(): void;
|
|
71
|
+
/**
|
|
72
|
+
* The server time a client's claimed view time (`InterpolationBuffer.viewTime`, sent with a shot) is judged at:
|
|
73
|
+
* kept within the room's `rewindMs` of now, so no claim reaches further back. `now` with no history kept.
|
|
74
|
+
*/
|
|
75
|
+
rewindTime(claimed: unknown): number;
|
|
71
76
|
private strike;
|
|
72
77
|
private checkStrikes;
|
|
73
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomHost.d.ts","sourceRoot":"","sources":["../../../src/net/RoomHost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file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test. Moving a point within its cell costs a write; across cells, a set delete and add.
|
|
4
|
+
* Pure and transport-free, so the same class serves the client.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SpatialHash {
|
|
7
|
+
readonly cellSize: number;
|
|
8
|
+
private readonly cells;
|
|
9
|
+
private readonly entries;
|
|
10
|
+
/** `cellSize`: world px per cell. About the radius queries ask for keeps a query to a 3×3 block. */
|
|
11
|
+
constructor(cellSize: number);
|
|
12
|
+
get size(): number;
|
|
13
|
+
has(id: number): boolean;
|
|
14
|
+
/** Puts `id` at (x, y), or moves it there. */
|
|
15
|
+
set(id: number, x: number, y: number): void;
|
|
16
|
+
delete(id: number): void;
|
|
17
|
+
clear(): void;
|
|
18
|
+
/** The ids within `radius` of (x, y), edge included, pushed onto `out` in no set order. */
|
|
19
|
+
near(x: number, y: number, radius: number, out?: number[]): number[];
|
|
20
|
+
/** The ids inside the box from (x0, y0) to (x1, y1), edges included. */
|
|
21
|
+
inRect(x0: number, y0: number, x1: number, y1: number, out?: number[]): number[];
|
|
22
|
+
private visit;
|
|
23
|
+
private unlink;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=SpatialHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpatialHash.d.ts","sourceRoot":"","sources":["../../../src/net/SpatialHash.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qBAAa,WAAW;IAKV,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAJrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkC;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IAEpD,oGAAoG;gBAC/E,QAAQ,EAAE,MAAM;IAIrC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB,8CAA8C;IAC9C,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAe3C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAOxB,KAAK,IAAI,IAAI;IAKb,2FAA2F;IAC3F,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE;IAUxE,wEAAwE;IACxE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE;IAOpF,OAAO,CAAC,KAAK;IAkBb,OAAO,CAAC,MAAM;CAMf"}
|
|
@@ -24,6 +24,7 @@ export { spritePixels, NO_PIXELS, PackedPixels, type SpritePixel } from './sprit
|
|
|
24
24
|
export { Darkness, WARM_LIGHT, LAMP_DIM, CARRIED_LIGHT, type DarknessOptions } from './Darkness.js';
|
|
25
25
|
export { flashLight, carriedLight, liveLights, clearLights, type TransientLight } from './lights.js';
|
|
26
26
|
export { NightShade, type NightShadeOptions } from './NightShade.js';
|
|
27
|
+
export { paintLifeArt, puffPixels, LIFE_COLORS, PUFF_FRAMES, type LifeArt, type LifeColors, type LifePixel } from './lifeArt.js';
|
|
27
28
|
export { paintWeatherArt, mistPixels, WEATHER_COLORS, type WeatherColors, type WeatherPixel } from './weatherArt.js';
|
|
28
29
|
export { buildRig, trunkPivot, complement, tileHash, gustAt, swayOffset, type SwayDef, type SwayMode, type TuftRect, type SwayRig, type SwayStrip, type Rect as SwayRect } from './swayRig.js';
|
|
29
30
|
export { SwayProp, opaqueRowWidths, type SwayPropOptions, type SwayWind } from './SwayProp.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pixel/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,aAA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x, y and a CSS colour. */
|
|
3
|
+
export type LifePixel = readonly [x: number, y: number, color: string];
|
|
4
|
+
/** The colours the life is painted in; every one may be replaced to suit a game's palette. */
|
|
5
|
+
export interface LifeColors {
|
|
6
|
+
/** Each leaf tone, [lit, deep]. */
|
|
7
|
+
leaves: readonly (readonly [string, string])[];
|
|
8
|
+
/** A seed: the whole one, and the second pixel of the longer one. */
|
|
9
|
+
seed: readonly [string, string];
|
|
10
|
+
/** An ember from hot to cool. */
|
|
11
|
+
ember: readonly [string, string, string];
|
|
12
|
+
/** Two motes. */
|
|
13
|
+
mote: readonly [string, string];
|
|
14
|
+
/** Two flakes of ash: [lit, deep] each. */
|
|
15
|
+
ash: readonly (readonly [string, string])[];
|
|
16
|
+
/** Each butterfly tone, [wing, wing's edge]. */
|
|
17
|
+
butterflies: readonly (readonly [string, string])[];
|
|
18
|
+
butterflyBody: string;
|
|
19
|
+
bird: string;
|
|
20
|
+
/** Its shadow's middle and ends (translucent black suits any ground). */
|
|
21
|
+
birdShadow: readonly [middle: string, ends: string];
|
|
22
|
+
/** A firefly's glow and the dim pixels round it. */
|
|
23
|
+
firefly: readonly [lit: string, dim: string];
|
|
24
|
+
/** Smoke: light (up-left), middle, dark (down-right). */
|
|
25
|
+
smoke: readonly [string, string, string];
|
|
26
|
+
}
|
|
27
|
+
export declare const LIFE_COLORS: LifeColors;
|
|
28
|
+
/** The texture keys painted, laid out the way the life classes take them. */
|
|
29
|
+
export interface LifeArt {
|
|
30
|
+
/** `Drift` looks for each kind. */
|
|
31
|
+
leaves: string[][];
|
|
32
|
+
seeds: string[][];
|
|
33
|
+
embers: string[][];
|
|
34
|
+
motes: string[][];
|
|
35
|
+
ash: string[][];
|
|
36
|
+
/** `Butterflies` looks: [open, shut] per tone. */
|
|
37
|
+
butterflies: [string, string][];
|
|
38
|
+
/** `Birds` frames and shadow. */
|
|
39
|
+
bird: [string, string];
|
|
40
|
+
birdShadow: string;
|
|
41
|
+
/** `Fireflies` frames: [dim, lit]. */
|
|
42
|
+
firefly: [string, string];
|
|
43
|
+
/** `ChimneySmoke` frames. */
|
|
44
|
+
puffs: string[];
|
|
45
|
+
}
|
|
46
|
+
/** Frames a puff of smoke grows through. */
|
|
47
|
+
export declare const PUFF_FRAMES = 6;
|
|
48
|
+
/**
|
|
49
|
+
* One puff of smoke at `frame` (0..PUFF_FRAMES-1): a ragged blob, light on its up-left and dark on its down-right, that
|
|
50
|
+
* grows as it climbs. Its corner pixels come and go by a fixed hash, so it is no clean ellipse, and the last two
|
|
51
|
+
* frames lose every other pixel on a checkerboard, the way every effect dithers out. Pure.
|
|
52
|
+
*/
|
|
53
|
+
export declare function puffPixels(frame: number, colors?: readonly [string, string, string]): {
|
|
54
|
+
w: number;
|
|
55
|
+
h: number;
|
|
56
|
+
px: LifePixel[];
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Paints the life's art under `prefix` (default `'life_'`) and returns its keys. A key already registered is kept, so
|
|
60
|
+
* calling it again (every map) costs nothing — and painting other colours needs another prefix.
|
|
61
|
+
*/
|
|
62
|
+
export declare function paintLifeArt(textures: TextureRegistry, colors?: Partial<LifeColors>, prefix?: string): LifeArt;
|
|
63
|
+
//# sourceMappingURL=lifeArt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifeArt.d.ts","sourceRoot":"","sources":["../../../src/pixel/lifeArt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAS/D,kDAAkD;AAClD,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAEvE,8FAA8F;AAC9F,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAC/C,qEAAqE;IACr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EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,4CAA4C;AAC5C,eAAO,MAAM,WAAW,IAAI,CAAC;AAQ7B;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAqB,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,SAAS,EAAE,CAAA;CAAE,CAqBlJ;AAgBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,GAAE,OAAO,CAAC,UAAU,CAAM,EAAE,MAAM,SAAU,GAAG,OAAO,CA2CnH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ConfirmButtonProps {
|
|
3
|
+
/** What this button arms, among the ones sharing `armed` (a name, "disband"…). */
|
|
4
|
+
armKey?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Which button of a group is armed now, kept by the parent so arming one disarms the others. Left out, the button
|
|
7
|
+
* keeps its own state.
|
|
8
|
+
*/
|
|
9
|
+
armed?: string | null;
|
|
10
|
+
setArmed?: (key: string | null) => void;
|
|
11
|
+
onConfirm: () => void;
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
/** Shown once armed: what the second click will do (default `UiLabels.confirmAgain`). */
|
|
14
|
+
armedLabel?: ReactNode;
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Default `'small'`. */
|
|
17
|
+
className?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A button asked twice: the first click arms it (it takes the `armed` look and says so), the second does the thing.
|
|
22
|
+
* For what cannot be undone from a list row — removing a friend, disbanding a group — where a dialog would be heavier
|
|
23
|
+
* than the choice.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ConfirmButton({ armKey, armed, setArmed, onConfirm, label, armedLabel, title, className, disabled }: ConfirmButtonProps): import("react").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=ConfirmButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmButton.d.ts","sourceRoot":"","sources":["../../../src/react/ConfirmButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB,yFAAyF;IACzF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAmB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAuB1J"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* A `-width` may have one to four lengths, like `border-width`. The pixel rules hold here: no `translate(-50%)` centring and no `zoom` (the components place in whole pixels), no
|
|
19
19
|
* blurred shadow, no gradient. A frame's middle shows through only when its slice says `fill`.
|
|
20
20
|
*/
|
|
21
|
-
export declare const baseCss = "\n:root {\n --e1681-font: inherit;\n --e1681-font-size: 16px;\n --e1681-text: #ece6d6;\n --e1681-muted: #9c968a;\n --e1681-accent: #e8c060;\n --e1681-bg: #1d242e;\n --e1681-well: #131a24;\n --e1681-control-bg: #2a323e;\n --e1681-border: #6a5634;\n --e1681-border-width: 2px;\n --e1681-backdrop: rgba(0, 0, 0, 0.5);\n --e1681-frame: none;\n --e1681-frame-slice: 0;\n --e1681-frame-width: var(--e1681-border-width);\n --e1681-tip-frame: var(--e1681-frame);\n --e1681-tip-frame-slice: var(--e1681-frame-slice);\n --e1681-tip-frame-width: var(--e1681-frame-width);\n --e1681-control-frame: none;\n --e1681-control-frame-slice: 0;\n --e1681-control-frame-width: var(--e1681-border-width);\n --e1681-tab-frame: var(--e1681-control-frame);\n --e1681-tab-active-frame: var(--e1681-tab-frame);\n --e1681-tab-frame-slice: var(--e1681-control-frame-slice);\n --e1681-tab-frame-width: var(--e1681-control-frame-width);\n --e1681-well-frame: none;\n --e1681-well-frame-slice: 0;\n --e1681-well-frame-width: var(--e1681-border-width);\n}\n\n.e1681-frame {\n color: var(--e1681-text);\n font-family: var(--e1681-font);\n font-size: var(--e1681-font-size);\n background: var(--e1681-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-frame-width);\n border-image: var(--e1681-frame) var(--e1681-frame-slice) / var(--e1681-frame-width) stretch;\n box-sizing: border-box;\n}\n.e1681-tip-frame {\n color: var(--e1681-text);\n font-family: var(--e1681-font);\n font-size: var(--e1681-font-size);\n background: var(--e1681-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-tip-frame-width);\n border-image: var(--e1681-tip-frame) var(--e1681-tip-frame-slice) / var(--e1681-tip-frame-width) stretch;\n box-sizing: border-box;\n}\n\n/* windows: placed by useFitToViewport in whole pixels; header kept, body scrolls */\n.e1681-panel {\n position: fixed;\n z-index: 10;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: hidden;\n pointer-events: auto;\n}\n.e1681-panel-header { display: flex; align-items: center; gap: 8px; flex: none; padding: 2px 4px 6px; }\n.e1681-panel-title { flex: 1; min-width: 0; margin: 0; font-size: 1.25em; font-weight: normal; color: var(--e1681-accent); }\n.e1681-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 4px 4px; }\n.e1681-panel-footer { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding: 6px 4px 0; }\n.e1681-close {\n flex: none; padding: 2px; border: 0; background: none; color: var(--e1681-text); cursor: pointer; line-height: 0;\n}\n.e1681-close:hover { color: var(--e1681-accent); }\n/* a touch screen's sheet: the whole screen inside the safe area */\n.e1681-panel.e1681-sheet {\n inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);\n width: auto;\n height: auto;\n}\n.e1681-panel.e1681-sheet .e1681-panel-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }\n\n/* controls */\n.e1681-button, .e1681-input, .e1681-select {\n color: var(--e1681-text);\n font: inherit;\n background: var(--e1681-control-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-control-frame-width);\n border-image: var(--e1681-control-frame) var(--e1681-control-frame-slice) / var(--e1681-control-frame-width) stretch;\n box-shadow: none;\n}\n.e1681-button { padding: 2px 10px; cursor: pointer; min-height: 28px; }\n.e1681-button.small { padding: 0 6px; min-height: 22px; }\n.e1681-button.ghost { background-color: transparent; }\n.e1681-button:hover:not(:disabled) { color: var(--e1681-accent); }\n/* pressed: the same face a pixel lower, never a transform */\n.e1681-button:active:not(:disabled) { padding-top: 3px; padding-bottom: 1px; }\n.e1681-button:disabled { opacity: 0.55; cursor: default; }\n.e1681-input { padding: 2px 6px; min-width: 0; }\n.e1681-glyph { display: inline-block; flex: none; vertical-align: -1px; }\n\n/* tabs: a row that scrolls sideways, or wraps with .wrap */\n.e1681-tabs { display: flex; gap: 2px; align-items: flex-end; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-bottom: 8px; }\n.e1681-tabs::-webkit-scrollbar { display: none; }\n.e1681-tabs.wrap { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }\n.e1681-tab {\n flex: 0 0 auto;\n padding: 2px 10px;\n color: var(--e1681-muted);\n font: inherit;\n cursor: pointer;\n white-space: nowrap;\n background: var(--e1681-control-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-tab-frame-width);\n border-image: var(--e1681-tab-frame) var(--e1681-tab-frame-slice) / var(--e1681-tab-frame-width) stretch;\n}\n.e1681-tab:hover:not(.active):not(:disabled) { color: var(--e1681-text); }\n.e1681-tab.active { color: var(--e1681-accent); padding-bottom: 6px; border-image-source: var(--e1681-tab-active-frame); }\n.e1681-tab:disabled { opacity: 0.55; cursor: default; }\n.e1681-tab:focus-visible { outline: 2px solid var(--e1681-accent); outline-offset: -4px; }\n.e1681-tabs.small { margin-bottom: 4px; }\n.e1681-tabs.small .e1681-tab { padding: 0 6px; }\n.e1681-tabs.small .e1681-tab.active { padding-bottom: 4px; }\n\n/* list beside detail */\n.e1681-split {\n display: grid;\n grid-template-columns: var(--e1681-split-list, minmax(0, 1fr)) minmax(0, 1fr);\n gap: 12px;\n height: min(58vh, 620px);\n}\n.e1681-split.fit { height: auto; max-height: min(58vh, 620px); }\n.e1681-split-list, .e1681-split-detail { min-height: 0; overflow-y: auto; overflow-x: hidden; }\n.e1681-split-list { padding-right: 4px; }\n.e1681-split-detail {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 10px;\n background: var(--e1681-well) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-well-frame-width);\n border-image: var(--e1681-well-frame) var(--e1681-well-frame-slice) / var(--e1681-well-frame-width) stretch;\n}\n.e1681-split-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--e1681-muted); }\n.e1681-split.stack { grid-template-columns: minmax(0, 1fr); }\n.e1681-split.stack.show-list .e1681-split-detail, .e1681-split.stack.show-detail .e1681-split-list { display: none; }\n.e1681-split-back { align-self: flex-start; }\n.e1681-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin-bottom: 4px; border: var(--e1681-border-width) solid transparent; }\n.e1681-pickable { cursor: pointer; }\n.e1681-pickable:hover:not(.picked):not(.disabled) { border-color: var(--e1681-border); }\n.e1681-row.picked { border-color: var(--e1681-accent); color: var(--e1681-accent); }\n.e1681-row.disabled { opacity: 0.55; cursor: default; }\n\n/* the select: as wide as its longest label */\n.e1681-select { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 1px 4px; text-align: left; cursor: pointer; }\n.e1681-select:hover:not(:disabled), .e1681-select.open { color: var(--e1681-accent); }\n.e1681-select:disabled { opacity: 0.6; cursor: default; }\n.e1681-select.grow { flex: 1 1 auto; min-width: 0; }\n.e1681-select.grow .e1681-select-labels { flex: 1 1 auto; min-width: 0; overflow: hidden; }\n.e1681-select.grow .e1681-select-labels > span { overflow: hidden; text-overflow: ellipsis; }\n.e1681-select-labels { display: grid; white-space: nowrap; }\n.e1681-select-labels > span { grid-area: 1 / 1; visibility: hidden; }\n.e1681-select-labels > span.shown { visibility: visible; }\n.e1681-select-list {\n position: fixed;\n z-index: 10000;\n box-sizing: border-box;\n width: max-content;\n padding: 2px;\n overflow-y: auto;\n pointer-events: auto;\n}\n.e1681-select-option { padding: 2px 6px; white-space: nowrap; cursor: pointer; }\n.e1681-select-list.measuring .e1681-select-option { width: max-content; }\n.e1681-select-option.hot { background: var(--e1681-control-bg); }\n.e1681-select-option.picked { color: var(--e1681-accent); }\n\n/* tooltips */\n.e1681-tooltip { position: fixed; z-index: 10001; max-width: 360px; padding: 4px 8px; overflow: hidden; pointer-events: none; }\n.e1681-title-tip { white-space: pre-line; }\n\n/* slider: a square knob, flat fills */\n.e1681-slider-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }\n.e1681-slider { flex: 1; min-width: 0; padding: 6px 7px; cursor: pointer; touch-action: none; user-select: none; pointer-events: auto; }\n.e1681-slider:focus { outline: none; }\n.e1681-slider:focus-visible { outline: 2px solid var(--e1681-accent); outline-offset: 2px; }\n.e1681-slider[aria-disabled='true'] { opacity: 0.55; cursor: default; }\n.e1681-slider-track {\n position: relative;\n height: 6px;\n background: var(--e1681-well) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-well-frame-width);\n border-image: var(--e1681-well-frame) var(--e1681-well-frame-slice) / var(--e1681-well-frame-width) stretch;\n}\n.e1681-slider-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--e1681-accent); }\n/* the knob is offset by half its own whole-pixel width with a margin, so it stays on the pixel grid */\n.e1681-slider-knob { position: absolute; top: -6px; width: 10px; height: 14px; margin-left: -5px; background: var(--e1681-text); border: 2px solid var(--e1681-well); box-sizing: border-box; }\n.e1681-slider-value { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }\n\n/* dialogs */\n.e1681-backdrop { position: fixed; inset: 0; z-index: 9000; background: var(--e1681-backdrop); pointer-events: auto; }\n.e1681-dialog { position: fixed; display: flex; flex-direction: column; overflow: hidden; padding: 8px 10px; }\n.e1681-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }\n.e1681-dialog-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 10px; }\n.e1681-confirm-text { white-space: pre-line; }\n.e1681-confirm-qty { display: flex; align-items: center; gap: 6px; margin-top: 10px; }\n.e1681-confirm-qty-input { width: 56px; text-align: right; }\n.e1681-choice-list { margin-top: 8px; }\n.e1681-choice-icon { flex: none; line-height: 0; }\n.e1681-choice-label { flex: 1; min-width: 0; }\n.e1681-choice-note { flex: none; margin-left: auto; color: var(--e1681-muted); }\n\n/* sprites at whole multiples */\n.e1681-pixel-image { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }\n.e1681-pixel-image > img { image-rendering: pixelated; flex: none; }\n";
|
|
21
|
+
export declare const baseCss = "\n:root {\n --e1681-font: inherit;\n --e1681-font-size: 16px;\n --e1681-text: #ece6d6;\n --e1681-muted: #9c968a;\n --e1681-accent: #e8c060;\n --e1681-bg: #1d242e;\n --e1681-well: #131a24;\n --e1681-control-bg: #2a323e;\n --e1681-border: #6a5634;\n --e1681-border-width: 2px;\n --e1681-backdrop: rgba(0, 0, 0, 0.5);\n --e1681-frame: none;\n --e1681-frame-slice: 0;\n --e1681-frame-width: var(--e1681-border-width);\n --e1681-tip-frame: var(--e1681-frame);\n --e1681-tip-frame-slice: var(--e1681-frame-slice);\n --e1681-tip-frame-width: var(--e1681-frame-width);\n --e1681-control-frame: none;\n --e1681-control-frame-slice: 0;\n --e1681-control-frame-width: var(--e1681-border-width);\n --e1681-tab-frame: var(--e1681-control-frame);\n --e1681-tab-active-frame: var(--e1681-tab-frame);\n --e1681-tab-frame-slice: var(--e1681-control-frame-slice);\n --e1681-tab-frame-width: var(--e1681-control-frame-width);\n --e1681-well-frame: none;\n --e1681-well-frame-slice: 0;\n --e1681-well-frame-width: var(--e1681-border-width);\n}\n\n.e1681-frame {\n color: var(--e1681-text);\n font-family: var(--e1681-font);\n font-size: var(--e1681-font-size);\n background: var(--e1681-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-frame-width);\n border-image: var(--e1681-frame) var(--e1681-frame-slice) / var(--e1681-frame-width) stretch;\n box-sizing: border-box;\n}\n.e1681-tip-frame {\n color: var(--e1681-text);\n font-family: var(--e1681-font);\n font-size: var(--e1681-font-size);\n background: var(--e1681-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-tip-frame-width);\n border-image: var(--e1681-tip-frame) var(--e1681-tip-frame-slice) / var(--e1681-tip-frame-width) stretch;\n box-sizing: border-box;\n}\n\n/* windows: placed by useFitToViewport in whole pixels; header kept, body scrolls */\n.e1681-panel {\n position: fixed;\n z-index: 10;\n display: flex;\n flex-direction: column;\n min-width: 0;\n overflow: hidden;\n pointer-events: auto;\n}\n.e1681-panel-header { display: flex; align-items: center; gap: 8px; flex: none; padding: 2px 4px 6px; }\n.e1681-panel-title { flex: 1; min-width: 0; margin: 0; font-size: 1.25em; font-weight: normal; color: var(--e1681-accent); }\n.e1681-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 4px 4px; }\n.e1681-panel-footer { flex: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding: 6px 4px 0; }\n.e1681-close {\n flex: none; padding: 2px; border: 0; background: none; color: var(--e1681-text); cursor: pointer; line-height: 0;\n}\n.e1681-close:hover { color: var(--e1681-accent); }\n/* a touch screen's sheet: the whole screen inside the safe area */\n.e1681-panel.e1681-sheet {\n inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);\n width: auto;\n height: auto;\n}\n.e1681-panel.e1681-sheet .e1681-panel-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }\n\n/* controls */\n.e1681-button, .e1681-input, .e1681-select {\n color: var(--e1681-text);\n font: inherit;\n background: var(--e1681-control-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-control-frame-width);\n border-image: var(--e1681-control-frame) var(--e1681-control-frame-slice) / var(--e1681-control-frame-width) stretch;\n box-shadow: none;\n}\n.e1681-button { padding: 2px 10px; cursor: pointer; min-height: 28px; }\n.e1681-button.small { padding: 0 6px; min-height: 22px; }\n.e1681-button.ghost { background-color: transparent; }\n.e1681-button.e1681-armed { color: var(--e1681-accent); }\n.e1681-button:hover:not(:disabled) { color: var(--e1681-accent); }\n/* pressed: the same face a pixel lower, never a transform */\n.e1681-button:active:not(:disabled) { padding-top: 3px; padding-bottom: 1px; }\n.e1681-button:disabled { opacity: 0.55; cursor: default; }\n.e1681-input { padding: 2px 6px; min-width: 0; }\n.e1681-glyph { display: inline-block; flex: none; vertical-align: -1px; }\n\n/* tabs: a row that scrolls sideways, or wraps with .wrap */\n.e1681-tabs { display: flex; gap: 2px; align-items: flex-end; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-bottom: 8px; }\n.e1681-tabs::-webkit-scrollbar { display: none; }\n.e1681-tabs.wrap { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }\n.e1681-tab {\n flex: 0 0 auto;\n padding: 2px 10px;\n color: var(--e1681-muted);\n font: inherit;\n cursor: pointer;\n white-space: nowrap;\n background: var(--e1681-control-bg) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-tab-frame-width);\n border-image: var(--e1681-tab-frame) var(--e1681-tab-frame-slice) / var(--e1681-tab-frame-width) stretch;\n}\n.e1681-tab:hover:not(.active):not(:disabled) { color: var(--e1681-text); }\n.e1681-tab.active { color: var(--e1681-accent); padding-bottom: 6px; border-image-source: var(--e1681-tab-active-frame); }\n.e1681-tab:disabled { opacity: 0.55; cursor: default; }\n.e1681-tab:focus-visible { outline: 2px solid var(--e1681-accent); outline-offset: -4px; }\n.e1681-tabs.small { margin-bottom: 4px; }\n.e1681-tabs.small .e1681-tab { padding: 0 6px; }\n.e1681-tabs.small .e1681-tab.active { padding-bottom: 4px; }\n\n/* list beside detail */\n.e1681-split {\n display: grid;\n grid-template-columns: var(--e1681-split-list, minmax(0, 1fr)) minmax(0, 1fr);\n gap: 12px;\n height: min(58vh, 620px);\n}\n.e1681-split.fit { height: auto; max-height: min(58vh, 620px); }\n.e1681-split-list, .e1681-split-detail { min-height: 0; overflow-y: auto; overflow-x: hidden; }\n.e1681-split-list { padding-right: 4px; }\n.e1681-split-detail {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 10px;\n background: var(--e1681-well) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-well-frame-width);\n border-image: var(--e1681-well-frame) var(--e1681-well-frame-slice) / var(--e1681-well-frame-width) stretch;\n}\n.e1681-split-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--e1681-muted); }\n.e1681-split.stack { grid-template-columns: minmax(0, 1fr); }\n.e1681-split.stack.show-list .e1681-split-detail, .e1681-split.stack.show-detail .e1681-split-list { display: none; }\n.e1681-split-back { align-self: flex-start; }\n.e1681-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin-bottom: 4px; border: var(--e1681-border-width) solid transparent; }\n.e1681-pickable { cursor: pointer; }\n.e1681-pickable:hover:not(.picked):not(.disabled) { border-color: var(--e1681-border); }\n.e1681-row.picked { border-color: var(--e1681-accent); color: var(--e1681-accent); }\n.e1681-row.disabled { opacity: 0.55; cursor: default; }\n\n/* the select: as wide as its longest label */\n.e1681-select { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 1px 4px; text-align: left; cursor: pointer; }\n.e1681-select:hover:not(:disabled), .e1681-select.open { color: var(--e1681-accent); }\n.e1681-select:disabled { opacity: 0.6; cursor: default; }\n.e1681-select.grow { flex: 1 1 auto; min-width: 0; }\n.e1681-select.grow .e1681-select-labels { flex: 1 1 auto; min-width: 0; overflow: hidden; }\n.e1681-select.grow .e1681-select-labels > span { overflow: hidden; text-overflow: ellipsis; }\n.e1681-select-labels { display: grid; white-space: nowrap; }\n.e1681-select-labels > span { grid-area: 1 / 1; visibility: hidden; }\n.e1681-select-labels > span.shown { visibility: visible; }\n.e1681-select-list {\n position: fixed;\n z-index: 10000;\n box-sizing: border-box;\n width: max-content;\n padding: 2px;\n overflow-y: auto;\n pointer-events: auto;\n}\n.e1681-select-option { padding: 2px 6px; white-space: nowrap; cursor: pointer; }\n.e1681-select-list.measuring .e1681-select-option { width: max-content; }\n.e1681-select-option.hot { background: var(--e1681-control-bg); }\n.e1681-select-option.picked { color: var(--e1681-accent); }\n\n/* tooltips */\n.e1681-tooltip { position: fixed; z-index: 10001; max-width: 360px; padding: 4px 8px; overflow: hidden; pointer-events: none; }\n.e1681-title-tip { white-space: pre-line; }\n\n/* slider: a square knob, flat fills */\n.e1681-slider-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }\n.e1681-slider { flex: 1; min-width: 0; padding: 6px 7px; cursor: pointer; touch-action: none; user-select: none; pointer-events: auto; }\n.e1681-slider:focus { outline: none; }\n.e1681-slider:focus-visible { outline: 2px solid var(--e1681-accent); outline-offset: 2px; }\n.e1681-slider[aria-disabled='true'] { opacity: 0.55; cursor: default; }\n.e1681-slider-track {\n position: relative;\n height: 6px;\n background: var(--e1681-well) padding-box;\n border-style: solid; border-color: var(--e1681-border); border-width: var(--e1681-well-frame-width);\n border-image: var(--e1681-well-frame) var(--e1681-well-frame-slice) / var(--e1681-well-frame-width) stretch;\n}\n.e1681-slider-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--e1681-accent); }\n/* the knob is offset by half its own whole-pixel width with a margin, so it stays on the pixel grid */\n.e1681-slider-knob { position: absolute; top: -6px; width: 10px; height: 14px; margin-left: -5px; background: var(--e1681-text); border: 2px solid var(--e1681-well); box-sizing: border-box; }\n.e1681-slider-value { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }\n\n/* dialogs */\n.e1681-backdrop { position: fixed; inset: 0; z-index: 9000; background: var(--e1681-backdrop); pointer-events: auto; }\n.e1681-dialog { position: fixed; display: flex; flex-direction: column; overflow: hidden; padding: 8px 10px; }\n.e1681-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }\n.e1681-dialog-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 10px; }\n.e1681-confirm-text { white-space: pre-line; }\n.e1681-confirm-qty { display: flex; align-items: center; gap: 6px; margin-top: 10px; }\n.e1681-confirm-qty-input { width: 56px; text-align: right; }\n.e1681-choice-list { margin-top: 8px; }\n.e1681-choice-icon { flex: none; line-height: 0; }\n.e1681-choice-label { flex: 1; min-width: 0; }\n.e1681-choice-note { flex: none; margin-left: auto; color: var(--e1681-muted); }\n\n/* sprites at whole multiples */\n.e1681-pixel-image { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }\n.e1681-pixel-image > img { image-rendering: pixelated; flex: none; }\n";
|
|
22
22
|
/**
|
|
23
23
|
* Puts `baseCss` into the page once, first in `<head>` so the game's own rules (and its custom properties) win
|
|
24
24
|
* without needing more specific selectors. Returns the `<style>` element; nothing on a server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseCss.d.ts","sourceRoot":"","sources":["../../../src/react/baseCss.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"baseCss.d.ts","sourceRoot":"","sources":["../../../src/react/baseCss.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO,2lVAkNnB,CAAC;AAIF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,QAAQ,GAAG,SAAkE,GAAG,gBAAgB,GAAG,IAAI,CASzI"}
|
|
@@ -11,6 +11,7 @@ export { classJoiner, type ClassJoiner } from './classNames.js';
|
|
|
11
11
|
export { DEFAULT_LABELS, fillLabel, type UiLabels } from './labels.js';
|
|
12
12
|
export { baseCss, injectBaseCss } from './baseCss.js';
|
|
13
13
|
export { useStore } from './useStore.js';
|
|
14
|
+
export { useJsonSelector, useStoreJson, type SelectingHook } from './useJsonSelector.js';
|
|
14
15
|
export { useViewport } from './useViewport.js';
|
|
15
16
|
export { useFitToViewport, SCROLL_CLASS, type FitTarget } from './useFitToViewport.js';
|
|
16
17
|
export { useFillSheet } from './useFillSheet.js';
|
|
@@ -24,6 +25,7 @@ export { Tooltip, type TooltipProps } from './Tooltip.js';
|
|
|
24
25
|
export { TitleTips, type TitleTipsProps } from './TitleTips.js';
|
|
25
26
|
export { Modal, type ModalProps } from './Modal.js';
|
|
26
27
|
export { ConfirmDialog } from './ConfirmDialog.js';
|
|
28
|
+
export { ConfirmButton, type ConfirmButtonProps } from './ConfirmButton.js';
|
|
27
29
|
export { askConfirm, askQuantity, answerConfirm, cancelConfirm, confirmStore, parseQuantity, type AskOptions, type ConfirmQuestion } from './confirmStore.js';
|
|
28
30
|
export { ChoiceDialog } from './ChoiceDialog.js';
|
|
29
31
|
export { askChoice, answerChoice, cancelChoice, choiceStore, firstChoice, type ChoiceOption, type ChoiceQuestion } from './choiceStore.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAClH,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,c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M,aAAa,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3J,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACxI,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -17,6 +17,8 @@ export interface UiLabels {
|
|
|
17
17
|
quantity: string;
|
|
18
18
|
/** The choice dialog's confirm button. */
|
|
19
19
|
choose: string;
|
|
20
|
+
/** What an armed `ConfirmButton` says when the game gives it no words of its own. */
|
|
21
|
+
confirmAgain?: string;
|
|
20
22
|
}
|
|
21
23
|
export declare const DEFAULT_LABELS: UiLabels;
|
|
22
24
|
/** `{0}`, `{1}`… replaced by the arguments, in order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/react/labels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/react/labels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,EAAE,QAU5B,CAAC;AAEF,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Store } from '../ui/dom/createStore.js';
|
|
2
|
+
/** A store hook that selects (zustand's `useStore`, or `(sel) => useStore(store, sel)`). */
|
|
3
|
+
export type SelectingHook<S> = (select: (state: S) => string) => string;
|
|
4
|
+
/**
|
|
5
|
+
* Selects a small, plain piece of a store by its content: the selector's result is compared as JSON, so a store that
|
|
6
|
+
* hands out a fresh array or object for unchanged content — a game's player state pushed several times a second in a
|
|
7
|
+
* fight — re-renders nothing that reads it, and the value returned keeps its reference until the content changes.
|
|
8
|
+
* Only for small data (a few ids, a list of buffs): the JSON is written once per store change.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useJsonSelector<S, T>(useHook: SelectingHook<S>, select: (state: S) => T): T;
|
|
11
|
+
/** `useJsonSelector` over an engine `Store` (`createStore`). */
|
|
12
|
+
export declare function useStoreJson<S extends object, T>(store: Store<S>, select: (state: S) => T): T;
|
|
13
|
+
//# sourceMappingURL=useJsonSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useJsonSelector.d.ts","sourceRoot":"","sources":["../../../src/react/useJsonSelector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,4FAA4F;AAC5F,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,KAAK,MAAM,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAG3F;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAE7F"}
|
|
@@ -16,6 +16,12 @@ export interface TilemapViewOptions {
|
|
|
16
16
|
baseDepth?: number;
|
|
17
17
|
/** Where the layers go (default the stage's world layer); a scene passes its `root` so they leave with it. */
|
|
18
18
|
parent?: Container;
|
|
19
|
+
/**
|
|
20
|
+
* World position of the map's top-left corner (default 0, 0): an LDtk level's `worldX`/`worldY`, or any map laid
|
|
21
|
+
* beside another. Culling in `update` counts it.
|
|
22
|
+
*/
|
|
23
|
+
x?: number;
|
|
24
|
+
y?: number;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Draws a Tiled map's tile layers. Each layer is cut into chunks painted once into textures; a frame only toggles
|
|
@@ -30,9 +36,20 @@ export declare class TilemapView {
|
|
|
30
36
|
readonly layers: Map<string, Container<import("pixi.js").ContainerChild>>;
|
|
31
37
|
private readonly chunks;
|
|
32
38
|
private readonly id;
|
|
39
|
+
private readonly chunkTiles;
|
|
40
|
+
private readonly textureFor;
|
|
41
|
+
private readonly drawn;
|
|
42
|
+
private readonly originX;
|
|
43
|
+
private readonly originY;
|
|
33
44
|
constructor(stage: Stage, map: TileMap, options?: TilemapViewOptions);
|
|
34
45
|
/** Shows only the chunks in the camera's view (plus a margin in world px). Call once a frame. */
|
|
35
46
|
update(margin?: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Repaints the chunks holding these cells (row-major indices) of a drawn layer, after its `data` changed: a door
|
|
49
|
+
* opening, a wall dug out, a cell autotiled again (`updateAutotile` returns exactly the indices to pass). Costs one
|
|
50
|
+
* chunk's painting per chunk touched, so keep it out of every frame.
|
|
51
|
+
*/
|
|
52
|
+
refreshTiles(layerName: string, cells: Iterable<number>): void;
|
|
36
53
|
/** World size of the map in px. */
|
|
37
54
|
get widthPx(): number;
|
|
38
55
|
get heightPx(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TilemapView.d.ts","sourceRoot":"","sources":["../../../src/tilemap/TilemapView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAA4D,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM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CAAC,QAAQ,CAAC,EAAE,CAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAGd,KAAK,EAAE,KAAK,EACpB,GAAG,EAAE,OAAO,EACrB,OAAO,GAAE,kBAAuB;IA+BlC,iGAAiG;IACjG,MAAM,CAAC,MAAM,SAAK,GAAG,IAAI;IAOzB;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI;IAuB9D,mCAAmC;IACnC,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,OAAO,IAAI,IAAI;IAOf,OAAO,CAAC,UAAU;CA2CnB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autotiling: picking each cell's tile from which of its neighbours share its terrain, so a painter only says "wall
|
|
3
|
+
* here, water there" and the borders draw themselves. Two bitmasks are offered:
|
|
4
|
+
*
|
|
5
|
+
* - **edges** (4-bit, 16 tiles): the four sides only. Enough for paths, fences and pipes, and for terrain whose
|
|
6
|
+
* inner corners need no tile of their own.
|
|
7
|
+
* - **blob** (8-bit reduced to the 47-tile set): the sides and the corners, a corner counting only when both sides
|
|
8
|
+
* beside it match. Without that reduction 256 masks would need 256 tiles; with it a full terrain (outer edges,
|
|
9
|
+
* inner corners, thin bridges) needs 47.
|
|
10
|
+
*
|
|
11
|
+
* Pure: no Pixi, no DOM, so a server or a map tool can run the same rules.
|
|
12
|
+
*/
|
|
13
|
+
/** The edge bits, clockwise from the top. */
|
|
14
|
+
export declare const EDGE_N = 1;
|
|
15
|
+
export declare const EDGE_E = 2;
|
|
16
|
+
export declare const EDGE_S = 4;
|
|
17
|
+
export declare const EDGE_W = 8;
|
|
18
|
+
/** The blob bits, clockwise from the top. */
|
|
19
|
+
export declare const BLOB_N = 1;
|
|
20
|
+
export declare const BLOB_NE = 2;
|
|
21
|
+
export declare const BLOB_E = 4;
|
|
22
|
+
export declare const BLOB_SE = 8;
|
|
23
|
+
export declare const BLOB_S = 16;
|
|
24
|
+
export declare const BLOB_SW = 32;
|
|
25
|
+
export declare const BLOB_W = 64;
|
|
26
|
+
export declare const BLOB_NW = 128;
|
|
27
|
+
/** A grid of terrain ids, row-major. Any id is fine; the rules say what each one is. */
|
|
28
|
+
export interface TerrainGrid {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
cells: ArrayLike<number> & {
|
|
32
|
+
[i: number]: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export type AutotileMode = 'edges' | 'blob';
|
|
36
|
+
export interface MaskOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Whether a neighbour counts as "the same" for `terrain` (default: the same id). A rule's `connectsTo` builds one:
|
|
39
|
+
* grass that also joins flowers, a wall that also joins a door.
|
|
40
|
+
*/
|
|
41
|
+
joins?: (terrain: number, neighbour: number) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* What lies outside the grid: `'same'` (default) joins the edge so a terrain running off the map shows no border;
|
|
44
|
+
* `'other'` closes it.
|
|
45
|
+
*/
|
|
46
|
+
edge?: 'same' | 'other';
|
|
47
|
+
}
|
|
48
|
+
/** Drops each corner bit unless both sides beside it are set: what the 47-tile blob set is drawn for. */
|
|
49
|
+
export declare function reduceBlobMask(mask: number): number;
|
|
50
|
+
/** The 47 reduced blob masks in ascending order; a tileset laid out in that order is indexed by `blob47Index`. */
|
|
51
|
+
export declare const BLOB47_MASKS: readonly number[];
|
|
52
|
+
/** Where a blob mask (reduced or not) sits among the 47: 0…46. */
|
|
53
|
+
export declare function blob47Index(mask: number): number;
|
|
54
|
+
/** The 4-bit edge mask of cell (x, y): `EDGE_*` set for each side whose neighbour joins it. */
|
|
55
|
+
export declare function edgeMask(grid: TerrainGrid, x: number, y: number, options?: MaskOptions): number;
|
|
56
|
+
/** The reduced 8-bit blob mask of cell (x, y): one of `BLOB47_MASKS`. */
|
|
57
|
+
export declare function blobMask(grid: TerrainGrid, x: number, y: number, options?: MaskOptions): number;
|
|
58
|
+
/** How one terrain picks its tiles. */
|
|
59
|
+
export interface AutotileRule {
|
|
60
|
+
/** The terrain id this rule draws. */
|
|
61
|
+
terrain: number;
|
|
62
|
+
/** Which mask picks the tile (default `'blob'`). */
|
|
63
|
+
mode?: AutotileMode;
|
|
64
|
+
/**
|
|
65
|
+
* The tile for a mask: a table by mask (a list picks one of several by the cell's position, the same every time),
|
|
66
|
+
* or a function of the mask (and the cell, for anything fancier). Blob masks are the reduced ones; to lay a
|
|
67
|
+
* 47-tile set out in `BLOB47_MASKS` order use `(m) => first + blob47Index(m)`. Edge masks run 0…15, so a 16-tile
|
|
68
|
+
* strip in mask order is `(m) => first + m`.
|
|
69
|
+
*/
|
|
70
|
+
tiles: Readonly<Record<number, number | readonly number[]>> | ((mask: number, x: number, y: number) => number);
|
|
71
|
+
/** The tile when the table has no entry for a mask (default: the entry for the full mask, else `empty`). */
|
|
72
|
+
fallback?: number;
|
|
73
|
+
/** Other terrain ids this one joins as if they were its own (a road meeting a bridge). */
|
|
74
|
+
connectsTo?: readonly number[];
|
|
75
|
+
}
|
|
76
|
+
/** Read once, the first time it is used (compiled lookups are kept per object): build a new set to change the rules. */
|
|
77
|
+
export interface AutotileRuleSet {
|
|
78
|
+
rules: readonly AutotileRule[];
|
|
79
|
+
/** The tile for a terrain no rule draws (default 0, an empty cell). */
|
|
80
|
+
empty?: number;
|
|
81
|
+
/** What lies outside the grid; see `MaskOptions.edge`. */
|
|
82
|
+
edge?: 'same' | 'other';
|
|
83
|
+
}
|
|
84
|
+
/** The tile cell (x, y) gets under `set`. */
|
|
85
|
+
export declare function autotileAt(grid: TerrainGrid, set: AutotileRuleSet, x: number, y: number): number;
|
|
86
|
+
/** Every cell's tile, row-major: the whole grid autotiled. */
|
|
87
|
+
export declare function autotile(grid: TerrainGrid, set: AutotileRuleSet, out?: Uint32Array<ArrayBuffer>): Uint32Array;
|
|
88
|
+
/**
|
|
89
|
+
* After cell (x, y) changed terrain, retiles it and its eight neighbours (the only cells whose masks can change)
|
|
90
|
+
* into `out`. Returns the indices whose tile actually changed, so a view repaints only those.
|
|
91
|
+
*/
|
|
92
|
+
export declare function updateAutotile(grid: TerrainGrid, set: AutotileRuleSet, out: Uint32Array, x: number, y: number): number[];
|
|
93
|
+
/** Sets cell (x, y) to `terrain` and retiles around it; the changed indices, as `updateAutotile` returns them. */
|
|
94
|
+
export declare function paintTerrain(grid: TerrainGrid, set: AutotileRuleSet, out: Uint32Array, x: number, y: number, terrain: number): number[];
|
|
95
|
+
//# sourceMappingURL=autotile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autotile.d.ts","sourceRoot":"","sources":["../../../src/tilemap/autotile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,MAAM,IAAI,CAAC;AAExB,6CAA6C;AAC7C,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,eAAO,MAAM,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,OAAO,MAAM,CAAC;AAE3B,wFAAwF;AACxF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE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