@timardex/cluemart-shared 1.5.543 → 1.5.544

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 (38) hide show
  1. package/dist/{chunk-PB3J52JN.mjs → chunk-7435FNA7.mjs} +2 -2
  2. package/dist/{chunk-RWA5G6NG.mjs → chunk-LOABFNIJ.mjs} +15 -18
  3. package/dist/chunk-LOABFNIJ.mjs.map +1 -0
  4. package/dist/{chunk-UNLHXGT4.mjs → chunk-TERE6URA.mjs} +2 -2
  5. package/dist/formFields/index.cjs +96 -0
  6. package/dist/formFields/index.cjs.map +1 -1
  7. package/dist/formFields/index.mjs +3 -3
  8. package/dist/{game-DAQTH29H.d.ts → game-1CSiEjlf.d.ts} +8 -12
  9. package/dist/{game-CKJKoqrR.d.mts → game-BPtE3yaQ.d.mts} +8 -12
  10. package/dist/graphql/index.d.mts +2 -2
  11. package/dist/graphql/index.d.ts +2 -2
  12. package/dist/hooks/index.cjs +96 -0
  13. package/dist/hooks/index.cjs.map +1 -1
  14. package/dist/hooks/index.d.mts +2 -2
  15. package/dist/hooks/index.d.ts +2 -2
  16. package/dist/hooks/index.mjs +3 -3
  17. package/dist/index.cjs +14 -17
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.mts +8 -12
  20. package/dist/index.d.ts +8 -12
  21. package/dist/index.mjs +14 -17
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/{post-C22p1dDe.d.ts → post-C0CIWXwc.d.ts} +1 -1
  24. package/dist/{post-B65KQS6r.d.mts → post-DjuHzWo7.d.mts} +1 -1
  25. package/dist/types/index.cjs +14 -17
  26. package/dist/types/index.cjs.map +1 -1
  27. package/dist/types/index.d.mts +2 -2
  28. package/dist/types/index.d.ts +2 -2
  29. package/dist/types/index.mjs +1 -1
  30. package/dist/utils/index.cjs +14 -17
  31. package/dist/utils/index.cjs.map +1 -1
  32. package/dist/utils/index.d.mts +1 -1
  33. package/dist/utils/index.d.ts +1 -1
  34. package/dist/utils/index.mjs +2 -2
  35. package/package.json +1 -1
  36. package/dist/chunk-RWA5G6NG.mjs.map +0 -1
  37. /package/dist/{chunk-PB3J52JN.mjs.map → chunk-7435FNA7.mjs.map} +0 -0
  38. /package/dist/{chunk-UNLHXGT4.mjs.map → chunk-TERE6URA.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mapArrayToOptions
3
- } from "./chunk-UNLHXGT4.mjs";
3
+ } from "./chunk-TERE6URA.mjs";
4
4
  import {
5
5
  EnumFoodFlavor
6
6
  } from "./chunk-ZR4TGWTS.mjs";
@@ -1952,4 +1952,4 @@ export {
1952
1952
  contactUsFields,
1953
1953
  partnerBasicInfoFields
1954
1954
  };
1955
- //# sourceMappingURL=chunk-PB3J52JN.mjs.map
1955
+ //# sourceMappingURL=chunk-7435FNA7.mjs.map
@@ -1,4 +1,6 @@
1
1
  // src/types/game.ts
2
+ var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
3
+ var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
2
4
  var gameScreenIdentifierList = [
3
5
  {
4
6
  clue: "Where your actions turn into a timeline.",
@@ -18,7 +20,7 @@ var gameScreenIdentifierList = [
18
20
  {
19
21
  clue: "A single moment worth showing up for.",
20
22
  id: "single-event",
21
- match: /^\/events\/[a-f0-9]{24}$/
23
+ match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`)
22
24
  },
23
25
  {
24
26
  clue: "What\u2019s happening around you, right now.",
@@ -31,15 +33,10 @@ var gameScreenIdentifierList = [
31
33
  match: "/events"
32
34
  },
33
35
  {
34
- clue: "What\u2019s happening in a wider area\u2014not just nearby.",
36
+ clue: "What\u2019s happening in a wider area \u2014 not just nearby.",
35
37
  id: "events-region",
36
38
  match: /^\/events\/region\/[^/]+$/
37
39
  },
38
- {
39
- clue: "Where you go to find something specific.",
40
- id: "events-search",
41
- match: "/events/search"
42
- },
43
40
  {
44
41
  clue: "Where fun becomes a challenge.",
45
42
  id: "games",
@@ -51,7 +48,7 @@ var gameScreenIdentifierList = [
51
48
  match: "/"
52
49
  },
53
50
  {
54
- clue: "Where the app taps you on the shoulder.",
51
+ clue: "Where the app whispers what you shouldn\u2019t miss.",
55
52
  id: "notifications",
56
53
  match: "/notifications"
57
54
  },
@@ -61,19 +58,19 @@ var gameScreenIdentifierList = [
61
58
  match: "/options"
62
59
  },
63
60
  {
64
- clue: "A single collaborator in the ecosystem.",
61
+ clue: "An organisation or creator supporting the community.",
65
62
  id: "single-partner",
66
- match: /^\/partners\/[a-f0-9]{24}$/
63
+ match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`)
67
64
  },
68
65
  {
69
- clue: "The network behind the scenes.",
66
+ clue: "Organisations and creators supporting the community.",
70
67
  id: "partners",
71
68
  match: "/partners"
72
69
  },
73
70
  {
74
- clue: "Where you share something with everyone.",
71
+ clue: "A single published post in full view.",
75
72
  id: "single-visitor-post",
76
- match: /^\/visitors\/posts\/[a-f0-9]{24}$/
73
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
77
74
  },
78
75
  {
79
76
  clue: "Your identity, on display.",
@@ -81,17 +78,17 @@ var gameScreenIdentifierList = [
81
78
  match: "/profile"
82
79
  },
83
80
  {
84
- clue: "One provider offering something valuable.",
81
+ clue: "One stallholder offering something valuable.",
85
82
  id: "single-vendor",
86
- match: /^\/vendors\/[a-f0-9]{24}$/
83
+ match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`)
87
84
  },
88
85
  {
89
- clue: "A marketplace of providers.",
86
+ clue: "Where every stallholder waits under the right category.",
90
87
  id: "vendors",
91
88
  match: "/vendors"
92
89
  },
93
90
  {
94
- clue: "People who stopped by to see you.",
91
+ clue: "Where you browse articles and posts from around the platform.",
95
92
  id: "visitors",
96
93
  match: "/visitors"
97
94
  }
@@ -117,4 +114,4 @@ export {
117
114
  gameTypeToDisplayName,
118
115
  EnumGameStatus
119
116
  };
120
- //# sourceMappingURL=chunk-RWA5G6NG.mjs.map
117
+ //# sourceMappingURL=chunk-LOABFNIJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/game.ts"],"sourcesContent":["import { OwnerType } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/activities\",\n },\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/profile/chat\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/edit-profile\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"A collection of things worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n}\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n};\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport type BaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n gameType: EnumGameType;\n};\n\nexport type DailyClueGameData = {\n gameFields: BaseGame;\n lastFoundDate: Date | null;\n points: number;\n letterInfo: {\n collected: string[] | null; // The letters the user has found, e.g. [\"C\", \"L\", \"U\"]\n shuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n gameType: EnumGameType;\n pointsEarned: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n gameType: EnumGameType;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n overallPoints: number;\n owner: OwnerType;\n};\n"],"mappings":";AAEA,IAAM,yBAAyB;AAC/B,IAAM,6BAA6B,GAAG,sBAAsB;AAErD,IAAM,2BAA2B;AAAA,EACtC;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO,IAAI,OAAO,YAAY,0BAA0B,EAAE;AAAA,EAC5D;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM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  gameScreenIdentifierList
8
- } from "./chunk-RWA5G6NG.mjs";
8
+ } from "./chunk-LOABFNIJ.mjs";
9
9
 
10
10
  // src/utils/date.ts
11
11
  import dayjs from "dayjs";
@@ -269,4 +269,4 @@ export {
269
269
  IOS_URL,
270
270
  ANDROID_URL
271
271
  };
272
- //# sourceMappingURL=chunk-UNLHXGT4.mjs.map
272
+ //# sourceMappingURL=chunk-TERE6URA.mjs.map
@@ -324,6 +324,102 @@ var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
324
324
  return EnumRegions2;
325
325
  })(EnumRegions || {});
326
326
 
327
+ // src/types/game.ts
328
+ var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
329
+ var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
330
+ var gameScreenIdentifierList = [
331
+ {
332
+ clue: "Where your actions turn into a timeline.",
333
+ id: "activities",
334
+ match: "/profile/activities"
335
+ },
336
+ {
337
+ clue: "Where conversations happen without speaking.",
338
+ id: "chat",
339
+ match: "/profile/chat"
340
+ },
341
+ {
342
+ clue: "The place to redefine who you are.",
343
+ id: "edit-profile",
344
+ match: "/profile/edit-profile"
345
+ },
346
+ {
347
+ clue: "A single moment worth showing up for.",
348
+ id: "single-event",
349
+ match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`)
350
+ },
351
+ {
352
+ clue: "What\u2019s happening around you, right now.",
353
+ id: "events-near-me",
354
+ match: "/events/events-near-me"
355
+ },
356
+ {
357
+ clue: "A collection of things worth attending.",
358
+ id: "events",
359
+ match: "/events"
360
+ },
361
+ {
362
+ clue: "What\u2019s happening in a wider area \u2014 not just nearby.",
363
+ id: "events-region",
364
+ match: /^\/events\/region\/[^/]+$/
365
+ },
366
+ {
367
+ clue: "Where fun becomes a challenge.",
368
+ id: "games",
369
+ match: "/games"
370
+ },
371
+ {
372
+ clue: "Your starting point for everything.",
373
+ id: "home",
374
+ match: "/"
375
+ },
376
+ {
377
+ clue: "Where the app whispers what you shouldn\u2019t miss.",
378
+ id: "notifications",
379
+ match: "/notifications"
380
+ },
381
+ {
382
+ clue: "Where you fine-tune your experience.",
383
+ id: "options",
384
+ match: "/options"
385
+ },
386
+ {
387
+ clue: "An organisation or creator supporting the community.",
388
+ id: "single-partner",
389
+ match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`)
390
+ },
391
+ {
392
+ clue: "Organisations and creators supporting the community.",
393
+ id: "partners",
394
+ match: "/partners"
395
+ },
396
+ {
397
+ clue: "A single published post in full view.",
398
+ id: "single-visitor-post",
399
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`)
400
+ },
401
+ {
402
+ clue: "Your identity, on display.",
403
+ id: "profile",
404
+ match: "/profile"
405
+ },
406
+ {
407
+ clue: "One stallholder offering something valuable.",
408
+ id: "single-vendor",
409
+ match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`)
410
+ },
411
+ {
412
+ clue: "Where every stallholder waits under the right category.",
413
+ id: "vendors",
414
+ match: "/vendors"
415
+ },
416
+ {
417
+ clue: "Where you browse articles and posts from around the platform.",
418
+ id: "visitors",
419
+ match: "/visitors"
420
+ }
421
+ ];
422
+
327
423
  // src/utils/date.ts
328
424
  var import_dayjs = __toESM(require("dayjs"));
329
425
  var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));