@dreamboard-games/sdk 0.5.0-alpha.32 → 0.5.0-alpha.34

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.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  } from "./chunk-BVWJS3AB.js";
10
10
  import {
11
11
  CancelInteractionCommandSchema,
12
+ CompactGameplayFrameSchema,
12
13
  DREAMBOARD_PLUGIN_PROTOCOL,
13
14
  DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
14
15
  GameEventDetailSchema,
@@ -35,6 +36,8 @@ import {
35
36
  createSourceLifecycle,
36
37
  digestPluginCommandRequest,
37
38
  digestPluginGameplayFrame,
39
+ hydrateCompactGameplayFrame,
40
+ materializeCompactGameplayFrame,
38
41
  materializePluginGameplayFrame,
39
42
  parseHostToPluginEnvelope,
40
43
  parsePluginGameplayFrame,
@@ -42,7 +45,7 @@ import {
42
45
  parsePluginToHostEnvelope,
43
46
  playerSeatColor,
44
47
  staticSource
45
- } from "./chunk-CWANHA4C.js";
48
+ } from "./chunk-2GUPNL7A.js";
46
49
  import {
47
50
  InputDomainSchema,
48
51
  InteractionAvailabilitySchema,
@@ -53,7 +56,7 @@ import {
53
56
  boardSpaceHostId,
54
57
  isHiddenCardId,
55
58
  parseBoardSpaceHostId
56
- } from "./chunk-IEMZ26FI.js";
59
+ } from "./chunk-BSS4ORU3.js";
57
60
  import {
58
61
  RuntimeJsonSchema,
59
62
  SeatBoardTopologySchema,
@@ -75,7 +78,7 @@ import {
75
78
  } from "./chunk-CZRPUWCT.js";
76
79
 
77
80
  // src/package-set.ts
78
- var DREAMBOARD_SDK_VERSION = true ? "0.5.0-alpha.32" : "0.0.0-development";
81
+ var DREAMBOARD_SDK_VERSION = true ? "0.5.0-alpha.34" : "0.0.0-development";
79
82
  var DREAMBOARD_SDK_PACKAGES = {
80
83
  "@dreamboard-games/sdk": DREAMBOARD_SDK_VERSION
81
84
  };
@@ -157,6 +160,7 @@ function iframeSource(options = {}) {
157
160
 
158
161
  // src/shared/protocol/gameplay-wire.ts
159
162
  import * as z from "zod";
163
+ var GAMEPLAY_WIRE_PROTOCOL_VERSION = 2;
160
164
  var GameplayCloseCode = {
161
165
  GoingAway: 1001,
162
166
  CredentialExpired: 4e3,
@@ -178,6 +182,7 @@ var GameplayCredentialSchema = z.discriminatedUnion("kind", [
178
182
  ]);
179
183
  var AuthConnectFrameSchema = z.object({
180
184
  type: z.literal("auth.connect"),
185
+ protocolVersion: z.literal(GAMEPLAY_WIRE_PROTOCOL_VERSION),
181
186
  credential: GameplayCredentialSchema,
182
187
  sessionId: z.string().uuid(),
183
188
  playerId: z.string().min(1).max(128)
@@ -193,6 +198,7 @@ var SessionResumeFrameSchema = z.object({
193
198
  });
194
199
  var AuthAcceptedFrameSchema = z.object({
195
200
  type: z.literal("auth.accepted"),
201
+ protocolVersion: z.literal(GAMEPLAY_WIRE_PROTOCOL_VERSION),
196
202
  expiresAt: z.string().datetime()
197
203
  });
198
204
  var GameplayBackpressureReasonSchema = z.enum([
@@ -214,7 +220,7 @@ var GameplayBackpressureFrameSchema = z.object({
214
220
  });
215
221
  var SessionSnapshotFrameSchema = z.object({
216
222
  type: z.literal("session.snapshot"),
217
- frame: PluginGameplayFrameSchema,
223
+ frame: CompactGameplayFrameSchema,
218
224
  acknowledgedClientActionId: z.string().min(1).optional()
219
225
  });
220
226
  var ClientGameplayFrameSchema = z.discriminatedUnion("type", [
@@ -312,6 +318,7 @@ function hostSource(options) {
312
318
  try {
313
319
  send({
314
320
  type: "auth.connect",
321
+ protocolVersion: GAMEPLAY_WIRE_PROTOCOL_VERSION,
315
322
  credential,
316
323
  sessionId,
317
324
  playerId
@@ -379,7 +386,10 @@ function hostSource(options) {
379
386
  clearTimeout(snapshotTimer);
380
387
  snapshotTimer = void 0;
381
388
  reconnects = 0;
382
- lifecycle.frame(frame.frame, frame.acknowledgedClientActionId);
389
+ lifecycle.frame(
390
+ hydrateCompactGameplayFrame(frame.frame),
391
+ frame.acknowledgedClientActionId
392
+ );
383
393
  } else if (frame.type === "interaction.result")
384
394
  lifecycle.result(frame);
385
395
  else lifecycle.fail(new Error(frame.message));
@@ -1939,11 +1949,13 @@ export {
1939
1949
  AuthRefreshFrameSchema,
1940
1950
  CancelInteractionCommandSchema,
1941
1951
  ClientGameplayFrameSchema,
1952
+ CompactGameplayFrameSchema,
1942
1953
  DREAMBOARD_PLUGIN_PROTOCOL,
1943
1954
  DREAMBOARD_PLUGIN_PROTOCOL_VERSION,
1944
1955
  DREAMBOARD_SDK_PACKAGES,
1945
1956
  DREAMBOARD_SDK_PACKAGE_SET,
1946
1957
  DREAMBOARD_SDK_VERSION,
1958
+ GAMEPLAY_WIRE_PROTOCOL_VERSION,
1947
1959
  GESTURE_THRESHOLDS,
1948
1960
  GameEventDetailSchema,
1949
1961
  GameEventSchema,
@@ -2002,9 +2014,11 @@ export {
2002
2014
  handFanTiming,
2003
2015
  handFeature,
2004
2016
  hostSource,
2017
+ hydrateCompactGameplayFrame,
2005
2018
  iframeSource,
2006
2019
  liftFanCard,
2007
2020
  magneticDropPoint,
2021
+ materializeCompactGameplayFrame,
2008
2022
  materializePluginGameplayFrame,
2009
2023
  originsFeature,
2010
2024
  panZoomFeature,