@epic-web/workshop-presence 4.2.9 → 4.4.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.
@@ -7,6 +7,7 @@ export declare const UserSchema: z.ZodObject<{
7
7
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  location: z.ZodOptional<z.ZodNullable<z.ZodObject<{
9
9
  workshopTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ origin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
11
  exercise: z.ZodOptional<z.ZodNullable<z.ZodObject<{
11
12
  type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"problem">, z.ZodLiteral<"solution">]>>>;
12
13
  exerciseNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -22,6 +23,7 @@ export declare const UserSchema: z.ZodObject<{
22
23
  }>>>;
23
24
  }, "strip", z.ZodTypeAny, {
24
25
  workshopTitle?: string | null | undefined;
26
+ origin?: string | null | undefined;
25
27
  exercise?: {
26
28
  type?: "problem" | "solution" | null | undefined;
27
29
  exerciseNumber?: number | null | undefined;
@@ -29,6 +31,7 @@ export declare const UserSchema: z.ZodObject<{
29
31
  } | null | undefined;
30
32
  }, {
31
33
  workshopTitle?: string | null | undefined;
34
+ origin?: string | null | undefined;
32
35
  exercise?: {
33
36
  type?: "problem" | "solution" | null | undefined;
34
37
  exerciseNumber?: number | null | undefined;
@@ -41,6 +44,7 @@ export declare const UserSchema: z.ZodObject<{
41
44
  name?: string | null | undefined;
42
45
  location?: {
43
46
  workshopTitle?: string | null | undefined;
47
+ origin?: string | null | undefined;
44
48
  exercise?: {
45
49
  type?: "problem" | "solution" | null | undefined;
46
50
  exerciseNumber?: number | null | undefined;
@@ -53,6 +57,7 @@ export declare const UserSchema: z.ZodObject<{
53
57
  name?: string | null | undefined;
54
58
  location?: {
55
59
  workshopTitle?: string | null | undefined;
60
+ origin?: string | null | undefined;
56
61
  exercise?: {
57
62
  type?: "problem" | "solution" | null | undefined;
58
63
  exerciseNumber?: number | null | undefined;
@@ -87,6 +92,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
87
92
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
93
  location: z.ZodOptional<z.ZodNullable<z.ZodObject<{
89
94
  workshopTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ origin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
96
  exercise: z.ZodOptional<z.ZodNullable<z.ZodObject<{
91
97
  type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"problem">, z.ZodLiteral<"solution">]>>>;
92
98
  exerciseNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -102,6 +108,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
102
108
  }>>>;
103
109
  }, "strip", z.ZodTypeAny, {
104
110
  workshopTitle?: string | null | undefined;
111
+ origin?: string | null | undefined;
105
112
  exercise?: {
106
113
  type?: "problem" | "solution" | null | undefined;
107
114
  exerciseNumber?: number | null | undefined;
@@ -109,6 +116,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
109
116
  } | null | undefined;
110
117
  }, {
111
118
  workshopTitle?: string | null | undefined;
119
+ origin?: string | null | undefined;
112
120
  exercise?: {
113
121
  type?: "problem" | "solution" | null | undefined;
114
122
  exerciseNumber?: number | null | undefined;
@@ -121,6 +129,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
121
129
  name?: string | null | undefined;
122
130
  location?: {
123
131
  workshopTitle?: string | null | undefined;
132
+ origin?: string | null | undefined;
124
133
  exercise?: {
125
134
  type?: "problem" | "solution" | null | undefined;
126
135
  exerciseNumber?: number | null | undefined;
@@ -133,6 +142,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
133
142
  name?: string | null | undefined;
134
143
  location?: {
135
144
  workshopTitle?: string | null | undefined;
145
+ origin?: string | null | undefined;
136
146
  exercise?: {
137
147
  type?: "problem" | "solution" | null | undefined;
138
148
  exerciseNumber?: number | null | undefined;
@@ -148,6 +158,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
148
158
  name?: string | null | undefined;
149
159
  location?: {
150
160
  workshopTitle?: string | null | undefined;
161
+ origin?: string | null | undefined;
151
162
  exercise?: {
152
163
  type?: "problem" | "solution" | null | undefined;
153
164
  exerciseNumber?: number | null | undefined;
@@ -163,6 +174,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
163
174
  name?: string | null | undefined;
164
175
  location?: {
165
176
  workshopTitle?: string | null | undefined;
177
+ origin?: string | null | undefined;
166
178
  exercise?: {
167
179
  type?: "problem" | "solution" | null | undefined;
168
180
  exerciseNumber?: number | null | undefined;
@@ -179,6 +191,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
179
191
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
192
  location: z.ZodOptional<z.ZodNullable<z.ZodObject<{
181
193
  workshopTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ origin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
195
  exercise: z.ZodOptional<z.ZodNullable<z.ZodObject<{
183
196
  type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"problem">, z.ZodLiteral<"solution">]>>>;
184
197
  exerciseNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -194,6 +207,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
194
207
  }>>>;
195
208
  }, "strip", z.ZodTypeAny, {
196
209
  workshopTitle?: string | null | undefined;
210
+ origin?: string | null | undefined;
197
211
  exercise?: {
198
212
  type?: "problem" | "solution" | null | undefined;
199
213
  exerciseNumber?: number | null | undefined;
@@ -201,6 +215,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
201
215
  } | null | undefined;
202
216
  }, {
203
217
  workshopTitle?: string | null | undefined;
218
+ origin?: string | null | undefined;
204
219
  exercise?: {
205
220
  type?: "problem" | "solution" | null | undefined;
206
221
  exerciseNumber?: number | null | undefined;
@@ -213,6 +228,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
213
228
  name?: string | null | undefined;
214
229
  location?: {
215
230
  workshopTitle?: string | null | undefined;
231
+ origin?: string | null | undefined;
216
232
  exercise?: {
217
233
  type?: "problem" | "solution" | null | undefined;
218
234
  exerciseNumber?: number | null | undefined;
@@ -225,6 +241,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
225
241
  name?: string | null | undefined;
226
242
  location?: {
227
243
  workshopTitle?: string | null | undefined;
244
+ origin?: string | null | undefined;
228
245
  exercise?: {
229
246
  type?: "problem" | "solution" | null | undefined;
230
247
  exerciseNumber?: number | null | undefined;
@@ -239,6 +256,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
239
256
  name?: string | null | undefined;
240
257
  location?: {
241
258
  workshopTitle?: string | null | undefined;
259
+ origin?: string | null | undefined;
242
260
  exercise?: {
243
261
  type?: "problem" | "solution" | null | undefined;
244
262
  exerciseNumber?: number | null | undefined;
@@ -253,6 +271,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
253
271
  name?: string | null | undefined;
254
272
  location?: {
255
273
  workshopTitle?: string | null | undefined;
274
+ origin?: string | null | undefined;
256
275
  exercise?: {
257
276
  type?: "problem" | "solution" | null | undefined;
258
277
  exerciseNumber?: number | null | undefined;
@@ -270,6 +289,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
270
289
  name?: string | null | undefined;
271
290
  location?: {
272
291
  workshopTitle?: string | null | undefined;
292
+ origin?: string | null | undefined;
273
293
  exercise?: {
274
294
  type?: "problem" | "solution" | null | undefined;
275
295
  exerciseNumber?: number | null | undefined;
@@ -287,6 +307,7 @@ export declare const MessageSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
287
307
  name?: string | null | undefined;
288
308
  location?: {
289
309
  workshopTitle?: string | null | undefined;
310
+ origin?: string | null | undefined;
290
311
  exercise?: {
291
312
  type?: "problem" | "solution" | null | undefined;
292
313
  exerciseNumber?: number | null | undefined;
@@ -305,6 +326,7 @@ export declare const PresenceSchema: z.ZodObject<{
305
326
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
306
327
  location: z.ZodOptional<z.ZodNullable<z.ZodObject<{
307
328
  workshopTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
+ origin: z.ZodOptional<z.ZodNullable<z.ZodString>>;
308
330
  exercise: z.ZodOptional<z.ZodNullable<z.ZodObject<{
309
331
  type: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"problem">, z.ZodLiteral<"solution">]>>>;
310
332
  exerciseNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -320,6 +342,7 @@ export declare const PresenceSchema: z.ZodObject<{
320
342
  }>>>;
321
343
  }, "strip", z.ZodTypeAny, {
322
344
  workshopTitle?: string | null | undefined;
345
+ origin?: string | null | undefined;
323
346
  exercise?: {
324
347
  type?: "problem" | "solution" | null | undefined;
325
348
  exerciseNumber?: number | null | undefined;
@@ -327,6 +350,7 @@ export declare const PresenceSchema: z.ZodObject<{
327
350
  } | null | undefined;
328
351
  }, {
329
352
  workshopTitle?: string | null | undefined;
353
+ origin?: string | null | undefined;
330
354
  exercise?: {
331
355
  type?: "problem" | "solution" | null | undefined;
332
356
  exerciseNumber?: number | null | undefined;
@@ -339,6 +363,7 @@ export declare const PresenceSchema: z.ZodObject<{
339
363
  name?: string | null | undefined;
340
364
  location?: {
341
365
  workshopTitle?: string | null | undefined;
366
+ origin?: string | null | undefined;
342
367
  exercise?: {
343
368
  type?: "problem" | "solution" | null | undefined;
344
369
  exerciseNumber?: number | null | undefined;
@@ -351,6 +376,7 @@ export declare const PresenceSchema: z.ZodObject<{
351
376
  name?: string | null | undefined;
352
377
  location?: {
353
378
  workshopTitle?: string | null | undefined;
379
+ origin?: string | null | undefined;
354
380
  exercise?: {
355
381
  type?: "problem" | "solution" | null | undefined;
356
382
  exerciseNumber?: number | null | undefined;
@@ -365,6 +391,7 @@ export declare const PresenceSchema: z.ZodObject<{
365
391
  name?: string | null | undefined;
366
392
  location?: {
367
393
  workshopTitle?: string | null | undefined;
394
+ origin?: string | null | undefined;
368
395
  exercise?: {
369
396
  type?: "problem" | "solution" | null | undefined;
370
397
  exerciseNumber?: number | null | undefined;
@@ -379,6 +406,7 @@ export declare const PresenceSchema: z.ZodObject<{
379
406
  name?: string | null | undefined;
380
407
  location?: {
381
408
  workshopTitle?: string | null | undefined;
409
+ origin?: string | null | undefined;
382
410
  exercise?: {
383
411
  type?: "problem" | "solution" | null | undefined;
384
412
  exerciseNumber?: number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,YAAY,sBAAsB,CAAA;AAE/C,eAAO,MAAM,eAAe,qFAAmF,CAAA;AAE/G,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBrB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2C,CAAA"}
@@ -9,6 +9,7 @@ export const UserSchema = z.object({
9
9
  location: z
10
10
  .object({
11
11
  workshopTitle: z.string().nullable().optional(),
12
+ origin: z.string().nullable().optional(),
12
13
  exercise: z
13
14
  .object({
14
15
  type: z
@@ -1 +1 @@
1
- {"version":3,"file":"presence.js","sourceRoot":"","sources":["../../src/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAA;AAC/C,sFAAsF;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,kEAAkE,YAAY,EAAE,CAAA;AAE/G,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,CAAC;SACT,MAAM,CAAC;QACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAC/C,QAAQ,EAAE,CAAC;aACT,MAAM,CAAC;YACP,IAAI,EAAE,CAAC;iBACL,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;iBACpD,QAAQ,EAAE;iBACV,QAAQ,EAAE;YACZ,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;YAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAC5C,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,EAAE;KACZ,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;CACZ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC5B,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;CACrC,CAAC;KACD,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;KAClE,EAAE,CACF,CAAC,CAAC,MAAM,CAAC;IACR,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;CACjD,CAAC,CACF,CAAA;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA","sourcesContent":["import { z } from 'zod'\n\nexport const partykitRoom = 'epic-web-presence'\n// export const partykitBaseUrl = `http://127.0.0.1:1999/parties/main/${partykitRoom}`\nexport const partykitBaseUrl = `https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${partykitRoom}`\n\nexport const UserSchema = z.object({\n\tid: z.string(),\n\tavatarUrl: z.string().nullable().optional(),\n\tname: z.string().nullable().optional(),\n\tlocation: z\n\t\t.object({\n\t\t\tworkshopTitle: z.string().nullable().optional(),\n\t\t\texercise: z\n\t\t\t\t.object({\n\t\t\t\t\ttype: z\n\t\t\t\t\t\t.union([z.literal('problem'), z.literal('solution')])\n\t\t\t\t\t\t.nullable()\n\t\t\t\t\t\t.optional(),\n\t\t\t\t\texerciseNumber: z.number().nullable().optional(),\n\t\t\t\t\tstepNumber: z.number().nullable().optional(),\n\t\t\t\t})\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t})\n\t\t.nullable()\n\t\t.optional(),\n})\n\nexport const MessageSchema = z\n\t.object({\n\t\ttype: z.literal('remove-user'),\n\t\tpayload: z.object({ id: z.string() }),\n\t})\n\t.or(z.object({ type: z.literal('add-user'), payload: UserSchema }))\n\t.or(\n\t\tz.object({\n\t\t\ttype: z.literal('presence'),\n\t\t\tpayload: z.object({ users: z.array(UserSchema) }),\n\t\t}),\n\t)\n\nexport type Message = z.infer<typeof MessageSchema>\n\nexport type User = z.infer<typeof UserSchema>\n\nexport const PresenceSchema = z.object({ users: z.array(UserSchema) })\n"]}
1
+ {"version":3,"file":"presence.js","sourceRoot":"","sources":["../../src/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAA;AAC/C,sFAAsF;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,kEAAkE,YAAY,EAAE,CAAA;AAE/G,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,CAAC;SACT,MAAM,CAAC;QACP,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAC/C,MAAM,EAAE,CAAC,CAA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CAAC,UAAU,CAAC,EAAE,CAAC,CAAA","sourcesContent":["import { z } from 'zod'\n\nexport const partykitRoom = 'epic-web-presence'\n// export const partykitBaseUrl = `http://127.0.0.1:1999/parties/main/${partykitRoom}`\nexport const partykitBaseUrl = `https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${partykitRoom}`\n\nexport const UserSchema = z.object({\n\tid: z.string(),\n\tavatarUrl: z.string().nullable().optional(),\n\tname: z.string().nullable().optional(),\n\tlocation: z\n\t\t.object({\n\t\t\tworkshopTitle: z.string().nullable().optional(),\n\t\t\torigin: z.string().nullable().optional(),\n\t\t\texercise: z\n\t\t\t\t.object({\n\t\t\t\t\ttype: z\n\t\t\t\t\t\t.union([z.literal('problem'), z.literal('solution')])\n\t\t\t\t\t\t.nullable()\n\t\t\t\t\t\t.optional(),\n\t\t\t\t\texerciseNumber: z.number().nullable().optional(),\n\t\t\t\t\tstepNumber: z.number().nullable().optional(),\n\t\t\t\t})\n\t\t\t\t.nullable()\n\t\t\t\t.optional(),\n\t\t})\n\t\t.nullable()\n\t\t.optional(),\n})\n\nexport const MessageSchema = z\n\t.object({\n\t\ttype: z.literal('remove-user'),\n\t\tpayload: z.object({ id: z.string() }),\n\t})\n\t.or(z.object({ type: z.literal('add-user'), payload: UserSchema }))\n\t.or(\n\t\tz.object({\n\t\t\ttype: z.literal('presence'),\n\t\t\tpayload: z.object({ users: z.array(UserSchema) }),\n\t\t}),\n\t)\n\nexport type Message = z.infer<typeof MessageSchema>\n\nexport type User = z.infer<typeof UserSchema>\n\nexport const PresenceSchema = z.object({ users: z.array(UserSchema) })\n"]}
@@ -27,6 +27,7 @@ export declare function getPresentUsers(user?: User | null, { timings, request }
27
27
  name?: string | null | undefined;
28
28
  location?: {
29
29
  workshopTitle?: string | null | undefined;
30
+ origin?: string | null | undefined;
30
31
  exercise?: {
31
32
  type?: "problem" | "solution" | null | undefined;
32
33
  exerciseNumber?: number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"presence.server.d.ts","sourceRoot":"","sources":["../../src/presence.server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wCAAwC,CAAA;AAGrE,OAAO,EAEN,KAAK,IAAI,EAGT,MAAM,eAAe,CAAA;AAEtB,eAAO,MAAM,aAAa;;;YAEpB,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;YAF3B,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;;YAF3B,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;;CAEf,CAAA;AAElB,wBAAsB,eAAe,CACpC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,EAClB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;KAgDnE"}
1
+ {"version":3,"file":"presence.server.d.ts","sourceRoot":"","sources":["../../src/presence.server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wCAAwC,CAAA;AAGrE,OAAO,EAEN,KAAK,IAAI,EAGT,MAAM,eAAe,CAAA;AAEtB,eAAO,MAAM,aAAa;;;YAEpB,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;YAF3B,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;;YAF3B,MAAM;mBACC,MAAM;cACX,MAAM,GAAG,IAAI,GAAG,SAAS;;;CAEf,CAAA;AAElB,wBAAsB,eAAe,CACpC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,EAClB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;;KAgDnE"}
@@ -15,6 +15,7 @@ declare const _default: {
15
15
  name?: string | null | undefined;
16
16
  location?: {
17
17
  workshopTitle?: string | null | undefined;
18
+ origin?: string | null | undefined;
18
19
  exercise?: {
19
20
  type?: "problem" | "solution" | null | undefined;
20
21
  exerciseNumber?: number | null | undefined;
@@ -30,6 +31,7 @@ declare const _default: {
30
31
  name?: string | null | undefined;
31
32
  location?: {
32
33
  workshopTitle?: string | null | undefined;
34
+ origin?: string | null | undefined;
33
35
  exercise?: {
34
36
  type?: "problem" | "solution" | null | undefined;
35
37
  exerciseNumber?: number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,iBAAiB,CAAA;;gBAwCzB,MAAM,KAAK;iBANrB,MAAM,aAAa;wBAIZ,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyCR,MAAM,UAAU,MAAM,UAAU;uBAepC,aAAa,GAAG,QAAQ,GAAG,QAAQ,QAAQ,CAAC;;;AA7D5D,wBAoEyB"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,iBAAiB,CAAA;;gBAwCzB,MAAM,KAAK;iBANrB,MAAM,aAAa;wBAIZ,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyCR,MAAM,UAAU,MAAM,UAAU;uBAepC,aAAa,GAAG,QAAQ,GAAG,QAAQ,QAAQ,CAAC;;;AA7D5D,wBAoEyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-web/workshop-presence",
3
- "version": "4.2.9",
3
+ "version": "4.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,7 +11,7 @@
11
11
  "deploy": "partykit deploy"
12
12
  },
13
13
  "dependencies": {
14
- "@epic-web/workshop-utils": "4.2.9",
14
+ "@epic-web/workshop-utils": "4.4.0",
15
15
  "zod": "^3.22.4"
16
16
  },
17
17
  "devDependencies": {