@bloopjs/web 0.0.48 → 0.0.50

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.
Files changed (42) hide show
  1. package/dist/App.d.ts +8 -1
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/debugui/DebugUi.d.ts +22 -0
  4. package/dist/debugui/DebugUi.d.ts.map +1 -0
  5. package/dist/debugui/components/DebugToggle.d.ts +6 -0
  6. package/dist/debugui/components/DebugToggle.d.ts.map +1 -0
  7. package/dist/debugui/components/Logs.d.ts +2 -0
  8. package/dist/debugui/components/Logs.d.ts.map +1 -0
  9. package/dist/debugui/components/Root.d.ts +7 -0
  10. package/dist/debugui/components/Root.d.ts.map +1 -0
  11. package/dist/debugui/components/Stats.d.ts +2 -0
  12. package/dist/debugui/components/Stats.d.ts.map +1 -0
  13. package/dist/debugui/hooks/useAutoScroll.d.ts +6 -0
  14. package/dist/debugui/hooks/useAutoScroll.d.ts.map +1 -0
  15. package/dist/debugui/mod.d.ts +3 -0
  16. package/dist/debugui/mod.d.ts.map +1 -0
  17. package/dist/debugui/state.d.ts +33 -0
  18. package/dist/debugui/state.d.ts.map +1 -0
  19. package/dist/debugui/styles.d.ts +2 -0
  20. package/dist/debugui/styles.d.ts.map +1 -0
  21. package/dist/mod.d.ts +2 -1
  22. package/dist/mod.d.ts.map +1 -1
  23. package/dist/mod.js +1868 -13
  24. package/dist/mod.js.map +20 -6
  25. package/dist/netcode/mod.d.ts +2 -0
  26. package/dist/netcode/mod.d.ts.map +1 -1
  27. package/dist/netcode/scaffold.d.ts +13 -0
  28. package/dist/netcode/scaffold.d.ts.map +1 -0
  29. package/package.json +7 -5
  30. package/src/App.ts +41 -2
  31. package/src/debugui/DebugUi.ts +111 -0
  32. package/src/debugui/components/DebugToggle.tsx +25 -0
  33. package/src/debugui/components/Logs.tsx +57 -0
  34. package/src/debugui/components/Root.tsx +54 -0
  35. package/src/debugui/components/Stats.tsx +68 -0
  36. package/src/debugui/hooks/useAutoScroll.ts +62 -0
  37. package/src/debugui/mod.ts +2 -0
  38. package/src/debugui/state.ts +127 -0
  39. package/src/debugui/styles.ts +200 -0
  40. package/src/mod.ts +2 -1
  41. package/src/netcode/mod.ts +2 -0
  42. package/src/netcode/scaffold.ts +169 -0
package/dist/App.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type Bloop, type MountOpts, type Sim } from "@bloopjs/bloop";
2
2
  import { type RoomEvents } from "./netcode/broker";
3
+ import { DebugUi, type DebugUiOptions } from "./debugui/mod.ts";
3
4
  export type StartOptions = {
4
5
  /** A bloop game instance */
5
6
  game: Bloop<any>;
@@ -13,6 +14,8 @@ export type StartOptions = {
13
14
  startRecording?: boolean;
14
15
  /** URL for the WebRTC signaling broker (e.g. "wss://broker.example.com/ws") */
15
16
  brokerUrl?: string;
17
+ /** Enable debug UI with optional configuration */
18
+ debugUi?: boolean | DebugUiOptions;
16
19
  };
17
20
  /** Start a bloop game on the web */
18
21
  export declare function start(opts: StartOptions): Promise<App>;
@@ -28,10 +31,14 @@ export declare class App {
28
31
  game: Bloop<any>;
29
32
  /** URL for the WebRTC signaling broker */
30
33
  readonly brokerUrl: string;
31
- constructor(sim: Sim, game: Bloop<any>, brokerUrl: string);
34
+ constructor(sim: Sim, game: Bloop<any>, brokerUrl: string, debugUiOpts?: DebugUiOptions);
32
35
  /** The simulation instance associated with this app */
33
36
  get sim(): Sim;
34
37
  set sim(sim: Sim);
38
+ /** Access debug UI instance */
39
+ get debugUi(): DebugUi | null;
40
+ /** Get the canvas element from debug UI (for game rendering) */
41
+ get canvas(): HTMLCanvasElement | null;
35
42
  /** Join a multiplayer room via the broker */
36
43
  joinRoom(roomId: string, callbacks: RoomEvents): void;
37
44
  /** Event listeners for before a frame is processed */
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,E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A;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type DebugState } from "./state.ts";
2
+ export type DebugUiOptions = {
3
+ /** Hotkey to toggle debug mode (default: 'Escape') */
4
+ hotkey?: string;
5
+ /** Initial debug visibility (default: false, or true if ?debug in URL) */
6
+ initiallyVisible?: boolean;
7
+ /** Container element to mount to (default: document.body) */
8
+ container?: HTMLElement;
9
+ };
10
+ export declare class DebugUi {
11
+ #private;
12
+ constructor(options?: DebugUiOptions);
13
+ /** The canvas element for game rendering */
14
+ get canvas(): HTMLCanvasElement;
15
+ /** Access to state signals for external updates */
16
+ get state(): DebugState;
17
+ /** Whether the debug panel is currently visible */
18
+ get isVisible(): boolean;
19
+ set isVisible(value: boolean);
20
+ unmount(): void;
21
+ }
22
+ //# sourceMappingURL=DebugUi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugUi.d.ts","sourceRoot":"","sources":["../../src/debugui/DebugUi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,YAAY,CAAC;AAGzD,MAAM,MAAM,cAAc,GAAG;IAC3B,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB,CAAC;AAEF,qBAAa,OAAO;;gBAQN,OAAO,GAAE,cAAmB;IAgExC,4CAA4C;IAC5C,IAAI,MAAM,IAAI,iBAAiB,CAE9B;IAED,mDAAmD;IACnD,IAAI,KAAK,IAAI,UAAU,CAEtB;IAED,mDAAmD;IACnD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAE3B;IAED,OAAO,IAAI,IAAI;CAKhB"}
@@ -0,0 +1,6 @@
1
+ type DebugToggleProps = {
2
+ hotkey?: string;
3
+ };
4
+ export declare function DebugToggle({ hotkey }: DebugToggleProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=DebugToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugToggle.d.ts","sourceRoot":"","sources":["../../../src/debugui/components/DebugToggle.tsx"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,MAAiB,EAAE,EAAE,gBAAgB,2CAkBlE"}
@@ -0,0 +1,2 @@
1
+ export declare function Logs(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../../src/debugui/components/Logs.tsx"],"names":[],"mappings":"AAcA,wBAAgB,IAAI,4CAiBnB"}
@@ -0,0 +1,7 @@
1
+ type RootProps = {
2
+ canvas: HTMLCanvasElement;
3
+ hotkey?: string;
4
+ };
5
+ export declare function Root({ canvas, hotkey }: RootProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=Root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../src/debugui/components/Root.tsx"],"names":[],"mappings":"AAMA,KAAK,SAAS,GAAG;IACf,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,MAAiB,EAAE,EAAE,SAAS,2CAyB5D"}
@@ -0,0 +1,2 @@
1
+ export declare function Stats(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stats.d.ts","sourceRoot":"","sources":["../../../src/debugui/components/Stats.tsx"],"names":[],"mappings":"AAGA,wBAAgB,KAAK,4CAgEpB"}
@@ -0,0 +1,6 @@
1
+ export declare function useAutoScroll(threshold?: number): {
2
+ containerRef: (el: HTMLElement | null) => void;
3
+ onContentUpdated: () => void;
4
+ scrollToBottom: () => void;
5
+ };
6
+ //# sourceMappingURL=useAutoScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoScroll.d.ts","sourceRoot":"","sources":["../../../src/debugui/hooks/useAutoScroll.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,SAAS,SAAK;uBAwCnC,WAAW,GAAG,IAAI;;;EAmB1B"}
@@ -0,0 +1,3 @@
1
+ export { DebugUi, type DebugUiOptions } from "./DebugUi.ts";
2
+ export * from "./state.ts";
3
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/debugui/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,YAAY,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type ReadonlySignal, type Signal } from "@preact/signals";
2
+ import type { Log } from "../netcode/logs.ts";
3
+ export type FrameNumber = number;
4
+ export type Peer = {
5
+ id: string;
6
+ nickname: string;
7
+ ack: FrameNumber;
8
+ seq: FrameNumber;
9
+ lastPacketTime: number;
10
+ };
11
+ export type NetStatus = {
12
+ ourId: number | null;
13
+ remoteId: number | null;
14
+ rtt: number | null;
15
+ peers: Peer[];
16
+ };
17
+ export type DebugState = {
18
+ isVisible: Signal<boolean>;
19
+ netStatus: Signal<NetStatus>;
20
+ logs: Signal<Log[]>;
21
+ peer: ReadonlySignal<Peer | null>;
22
+ advantage: ReadonlySignal<number | null>;
23
+ };
24
+ export declare const debugState: DebugState;
25
+ export declare function addLog(log: Log): void;
26
+ export declare function updatePeer(id: string, updates: Partial<Peer>): void;
27
+ export declare function addPeer(peer: Peer): void;
28
+ export declare function removePeer(id: string): void;
29
+ export declare function setLocalId(id: number): void;
30
+ export declare function setRemoteId(id: number): void;
31
+ export declare function clearLogs(): void;
32
+ export declare function resetState(): void;
33
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/debugui/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,WAAW,CAAC;IACjB,GAAG,EAAE,WAAW,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;IACpB,IAAI,EAAE,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAClC,SAAS,EAAE,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC1C,CAAC;AAWF,eAAO,MAAM,UAAU,EAAE,UAkBxB,CAAC;AAEF,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAErC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAiBnE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAKxC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK3C;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK3C;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK5C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,wBAAgB,UAAU,IAAI,IAAI,CASjC"}
@@ -0,0 +1,2 @@
1
+ export declare const styles = "\n/* Reset for shadow DOM */\n* {\n box-sizing: border-box;\n}\n\n/* Layout */\n.fullscreen {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n\n.layout {\n display: grid;\n grid-template-areas:\n \"game stats\"\n \"logs logs\";\n grid-template-columns: calc(50% - 0.5rem) calc(50% - 0.5rem);\n grid-template-rows: calc(50% - 0.5rem) calc(50% - 0.5rem);\n gap: 1rem;\n width: 100%;\n height: 100%;\n padding: 1rem;\n}\n\n.game {\n grid-area: game;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.stats {\n grid-area: stats;\n background-color: #f0f0f0;\n padding: 1rem;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.logs {\n grid-area: logs;\n background-color: #f0f0f0;\n padding: 1rem;\n border-radius: 8px;\n overflow: hidden;\n}\n\n/* Canvas container */\n.canvas-container {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.canvas-container canvas {\n max-width: 100%;\n max-height: 100%;\n}\n\n/* Debug toggle button */\n.debug-toggle {\n position: fixed;\n bottom: 16px;\n right: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n border: none;\n background-color: rgba(0, 0, 0, 0.5);\n color: white;\n font-size: 18px;\n cursor: pointer;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s;\n}\n\n.debug-toggle:hover {\n background-color: rgba(0, 0, 0, 0.7);\n}\n\n/* Stats panel */\n.stats-panel {\n background: rgba(0, 0, 0, 0.7);\n color: white;\n padding: 12px;\n border-radius: 8px;\n font-family: monospace;\n font-size: 14px;\n max-width: 100%;\n overflow: hidden;\n}\n\n.stats-panel h3 {\n margin: 0 0 8px 0;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.stats-panel table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.stats-panel tr {\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n}\n\n.stats-panel tr:last-child {\n border-bottom: none;\n}\n\n.stats-panel td {\n padding: 4px 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.stats-panel td:first-child {\n opacity: 0.7;\n width: 60%;\n}\n\n.stats-panel td:last-child {\n text-align: right;\n font-weight: 600;\n width: 40%;\n}\n\n.stats-panel p {\n margin: 0;\n opacity: 0.7;\n}\n\n/* Logs panel */\n.logs-list {\n width: 100%;\n height: 100%;\n overflow: auto;\n margin: 0;\n padding: 0;\n}\n\n.logs-list li {\n margin: 0 0 24px 0;\n list-style: none;\n}\n\n.logs-list h3 {\n font-size: 16px;\n font-weight: 500;\n margin: 0;\n}\n\n.logs-list .ws {\n color: darkolivegreen;\n}\n\n.logs-list .webrtc {\n color: darkmagenta;\n}\n\n.logs-list .rollback {\n color: darkblue;\n}\n\n.logs-list .local {\n color: #333;\n}\n\n.logs-list .content {\n font-size: 16px;\n}\n\n.logs-list p {\n margin: 4px 0;\n}\n\n.logs-list pre {\n margin: 0;\n white-space: pre-wrap;\n word-break: break-word;\n background-color: oldlace;\n padding: 8px;\n border-radius: 4px;\n border: 1px inset lavender;\n}\n";
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/debugui/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,2mGAuMlB,CAAC"}
package/dist/mod.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { App, start } from "./App.ts";
1
+ export { App, type StartOptions, start } from "./App.ts";
2
+ export * as Debug from "./debugui/mod.ts";
2
3
  export * from "./netcode/mod.ts";
3
4
  //# sourceMappingURL=mod.d.ts.map
package/dist/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}