p2p-lockstep-kit-ui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,11 +4,12 @@ Web Components UI shell for `p2p-lockstep-kit-network` and `p2p-lockstep-kit-ses
4
4
 
5
5
  The UI package owns the generic app surface:
6
6
 
7
- - lobby page
7
+ - direct peer pairing page
8
8
  - signaling registration
9
- - peer connection
9
+ - Peer ID input and connection
10
10
  - share link and QR code
11
11
  - game page shell
12
+ - local and remote identity, connection, readiness, session, turn, and timeline status
12
13
  - ready / start / undo / restart controls
13
14
  - request dialogs and toast messages
14
15
  - board host container
@@ -28,7 +29,10 @@ p2p-lockstep-kit-network
28
29
  p2p-lockstep-kit-session
29
30
  ```
30
31
 
31
- Game projects do not need to instantiate those packages directly for the common lobby/game flow.
32
+ Game projects do not need to instantiate those packages directly for the common pairing/game flow.
33
+
34
+ There is no room browser, lobby, or matchmaking model. One player shares a Peer ID or
35
+ share link and the other player connects directly.
32
36
 
33
37
  ## Basic Usage
34
38
 
@@ -41,9 +45,16 @@ import "p2p-lockstep-kit-ui/style.css";
41
45
  <p2p-lockstep-app
42
46
  game-title="Gomoku"
43
47
  session-id="gomoku"
48
+ theme="dark"
44
49
  ></p2p-lockstep-app>
45
50
  ```
46
51
 
52
+ Omit `theme="dark"` to use the default light theme. Players can switch between
53
+ Day and Night modes from the `...` settings menu; the choice is stored locally and
54
+ restored on later visits. Both themes use public `--lock-*` tokens, so game boards
55
+ can inherit the same colors without targeting the UI package's internal markup or
56
+ utility classes.
57
+
47
58
  The default signaling server is `wss://signal.jiahengli.xyz`. Override it only when you
48
59
  run your own signaling endpoint:
49
60
 
@@ -133,7 +144,7 @@ game project
133
144
  -> sends moves through p2p-lockstep-app.getRuntime().actions
134
145
 
135
146
  p2p-lockstep-kit-ui
136
- -> owns lobby/game pages and common controls
147
+ -> owns pairing/game pages and common controls
137
148
  -> creates NetworkClient
138
149
  -> creates session
139
150
  -> maps session snapshots into UI state
@@ -2,6 +2,7 @@ import type { StatusPanelState } from "../types";
2
2
  export declare class P2PLockstepStatusPanelElement extends HTMLElement {
3
3
  #private;
4
4
  connectedCallback(): void;
5
+ disconnectedCallback(): void;
5
6
  set state(value: StatusPanelState);
6
7
  get state(): StatusPanelState;
7
8
  render(): void;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,6 @@ export { P2PLockstepSharePanelElement } from "./components/share-panel";
7
7
  export { P2PLockstepStatusPanelElement } from "./components/status-panel";
8
8
  export { P2PLockstepToastMessageElement } from "./components/toast-message";
9
9
  export { P2PLockstepBoardHostElement } from "./game/board-host";
10
- export { P2PLockstepLobbyPageElement } from "./pages/lobby-page";
10
+ export { P2PLockstepPairingPageElement } from "./pages/pairing-page";
11
11
  export { P2PLockstepGamePageElement } from "./pages/game-page";
12
12
  export { P2PLockstepAppElement } from "./app-shell";