@thegeem/protocol 0.1.7 → 0.1.8

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/index.cjs CHANGED
@@ -75,6 +75,9 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
75
75
  import_zod.z.object({ t: import_zod.z.literal("setTeams"), teams: import_zod.z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
76
76
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
77
77
  import_zod.z.object({ t: import_zod.z.literal("pickTeam"), teamIndex: import_zod.z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
78
+ // Host signals it's busy configuring the game (categories/rounds/mode) so waiting players can show
79
+ // a "host is setting up…" state instead of a frozen-looking lobby. 'idle' when the settings close.
80
+ import_zod.z.object({ t: import_zod.z.literal("hostActivity"), activity: import_zod.z.enum(["configuring", "idle"]) }),
78
81
  // host game actions
79
82
  import_zod.z.object({
80
83
  t: import_zod.z.literal("startGame"),
package/dist/index.d.cts CHANGED
@@ -214,6 +214,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
214
214
  }, {
215
215
  t: "pickTeam";
216
216
  teamIndex: number;
217
+ }>, z.ZodObject<{
218
+ t: z.ZodLiteral<"hostActivity">;
219
+ activity: z.ZodEnum<["configuring", "idle"]>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ t: "hostActivity";
222
+ activity: "configuring" | "idle";
223
+ }, {
224
+ t: "hostActivity";
225
+ activity: "configuring" | "idle";
217
226
  }>, z.ZodObject<{
218
227
  t: z.ZodLiteral<"startGame">;
219
228
  game: z.ZodOptional<z.ZodEnum<["trivia"]>>;
@@ -512,6 +521,7 @@ type ServerMsg = {
512
521
  categories: CategoryView[];
513
522
  selectedCategoryIds: string[];
514
523
  teams: TeamSlotView[];
524
+ hostActivity: 'configuring' | 'idle';
515
525
  you: YouContext;
516
526
  } | {
517
527
  t: 'state';
package/dist/index.d.ts CHANGED
@@ -214,6 +214,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
214
214
  }, {
215
215
  t: "pickTeam";
216
216
  teamIndex: number;
217
+ }>, z.ZodObject<{
218
+ t: z.ZodLiteral<"hostActivity">;
219
+ activity: z.ZodEnum<["configuring", "idle"]>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ t: "hostActivity";
222
+ activity: "configuring" | "idle";
223
+ }, {
224
+ t: "hostActivity";
225
+ activity: "configuring" | "idle";
217
226
  }>, z.ZodObject<{
218
227
  t: z.ZodLiteral<"startGame">;
219
228
  game: z.ZodOptional<z.ZodEnum<["trivia"]>>;
@@ -512,6 +521,7 @@ type ServerMsg = {
512
521
  categories: CategoryView[];
513
522
  selectedCategoryIds: string[];
514
523
  teams: TeamSlotView[];
524
+ hostActivity: 'configuring' | 'idle';
515
525
  you: YouContext;
516
526
  } | {
517
527
  t: 'state';
package/dist/index.js CHANGED
@@ -47,6 +47,9 @@ var ClientMsg = z.discriminatedUnion("t", [
47
47
  z.object({ t: z.literal("setTeams"), teams: z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
48
48
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
49
49
  z.object({ t: z.literal("pickTeam"), teamIndex: z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
50
+ // Host signals it's busy configuring the game (categories/rounds/mode) so waiting players can show
51
+ // a "host is setting up…" state instead of a frozen-looking lobby. 'idle' when the settings close.
52
+ z.object({ t: z.literal("hostActivity"), activity: z.enum(["configuring", "idle"]) }),
50
53
  // host game actions
51
54
  z.object({
52
55
  t: z.literal("startGame"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Geem's wire protocol — shared zod schemas + TypeScript types for talking to the Geem game server over Socket.IO. The source of truth all clients implement against.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://geem.tv",