@timardex/cluemart-shared 1.5.509 → 1.5.510
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/{chunk-EFNSI75F.mjs → chunk-3SFKWCTZ.mjs} +2 -2
- package/dist/{chunk-UOPC7KMU.mjs → chunk-RY7AILFK.mjs} +10 -19
- package/dist/chunk-RY7AILFK.mjs.map +1 -0
- package/dist/{chunk-7GWVTPXL.mjs → chunk-WYYQSPAX.mjs} +3 -2
- package/dist/{chunk-7GWVTPXL.mjs.map → chunk-WYYQSPAX.mjs.map} +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/{game-CoVv7iyf.d.mts → game-DuJpk6t2.d.mts} +2 -1
- package/dist/{game-BzOJ4f7U.d.ts → game-MJqjbMLC.d.ts} +2 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +3 -3
- package/dist/index.cjs +14 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +14 -22
- package/dist/index.mjs.map +1 -1
- package/dist/{post-D9_1FbFI.d.ts → post-CZ1sHnKx.d.ts} +1 -1
- package/dist/{post-CcJowEi5.d.mts → post-D3uHp75N.d.mts} +1 -1
- package/dist/types/index.cjs +2 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +8 -17
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-UOPC7KMU.mjs.map +0 -1
- /package/dist/{chunk-EFNSI75F.mjs.map → chunk-3SFKWCTZ.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mapArrayToOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RY7AILFK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
EnumFoodFlavor
|
|
6
6
|
} from "./chunk-534WN2SR.mjs";
|
|
@@ -1952,4 +1952,4 @@ export {
|
|
|
1952
1952
|
contactUsFields,
|
|
1953
1953
|
partnerBasicInfoFields
|
|
1954
1954
|
};
|
|
1955
|
-
//# sourceMappingURL=chunk-
|
|
1955
|
+
//# sourceMappingURL=chunk-3SFKWCTZ.mjs.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-534WN2SR.mjs";
|
|
6
6
|
import {
|
|
7
7
|
gameScreenIdentifierList
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WYYQSPAX.mjs";
|
|
9
9
|
|
|
10
10
|
// src/utils/date.ts
|
|
11
11
|
import dayjs from "dayjs";
|
|
@@ -128,12 +128,6 @@ function computeDailyClueState(dailyClue) {
|
|
|
128
128
|
}
|
|
129
129
|
if (today.isAfter(end)) {
|
|
130
130
|
return {
|
|
131
|
-
gameHistory: {
|
|
132
|
-
gameDate: dailyClue.gameFields.gameDate,
|
|
133
|
-
gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
|
|
134
|
-
gameType: dailyClue.gameFields.gameType,
|
|
135
|
-
pointsEarned: dailyClue.points
|
|
136
|
-
},
|
|
137
131
|
todaysClue: null,
|
|
138
132
|
todaysLetter: null,
|
|
139
133
|
todaysPlacement: null
|
|
@@ -141,31 +135,28 @@ function computeDailyClueState(dailyClue) {
|
|
|
141
135
|
}
|
|
142
136
|
const index = getDayIndex(start, today);
|
|
143
137
|
console.log("DEBUG", {
|
|
138
|
+
collected,
|
|
144
139
|
end: end.format(),
|
|
145
140
|
index,
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
shuffled,
|
|
142
|
+
shuffledPlacements,
|
|
148
143
|
start: start.format(),
|
|
149
144
|
today: today.format()
|
|
150
145
|
});
|
|
151
146
|
if (index < 0 || index >= shuffled.length) return null;
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const alreadyHaveTodaysSlot = (collected ?? []).some(
|
|
155
|
-
(l) => l.trim().toLowerCase() === letterToday
|
|
156
|
-
);
|
|
157
|
-
if (alreadyHaveTodaysSlot) {
|
|
147
|
+
const collectedCount = (collected ?? []).length;
|
|
148
|
+
if (collectedCount > index) {
|
|
158
149
|
return {
|
|
159
|
-
gameHistory: null,
|
|
160
150
|
todaysClue: null,
|
|
161
151
|
todaysLetter: null,
|
|
162
152
|
todaysPlacement: null
|
|
163
153
|
};
|
|
164
154
|
}
|
|
155
|
+
const letterToday = shuffled[index];
|
|
156
|
+
if (!letterToday) return null;
|
|
165
157
|
return {
|
|
166
|
-
gameHistory: null,
|
|
167
158
|
todaysClue: shuffledPlacements[index].clue,
|
|
168
|
-
todaysLetter:
|
|
159
|
+
todaysLetter: letterToday,
|
|
169
160
|
todaysPlacement: shuffledPlacements[index].id
|
|
170
161
|
};
|
|
171
162
|
}
|
|
@@ -278,4 +269,4 @@ export {
|
|
|
278
269
|
IOS_URL,
|
|
279
270
|
ANDROID_URL
|
|
280
271
|
};
|
|
281
|
-
//# sourceMappingURL=chunk-
|
|
272
|
+
//# sourceMappingURL=chunk-RY7AILFK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/date.ts","../src/utils/dailyClueGame.ts","../src/utils/utils.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\nconst NZ_TZ = \"Pacific/Auckland\";\n\nexport function toNZTime(date?: Date | string) {\n return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);\n}\n\n/** Start of the calendar day in Pacific/Auckland (daily games, streaks, etc.). */\nexport function nzStartOfDay(\n input?: Date | string | number | null,\n): dayjs.Dayjs {\n if (input == null) {\n return dayjs().tz(NZ_TZ).startOf(\"day\");\n }\n return dayjs.tz(input, NZ_TZ).startOf(\"day\");\n}\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = toNZTime(timestamp).format(dateFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !isNaN(Date.parse(value));\n};\n\n/**\n * Sort an array of date strings by their proximity to the current date.\n * @param dates - The array of date strings to sort.\n * @returns - The sorted array of date strings.\n */\nexport function sortDatesChronologically<\n T extends { startDate: string; startTime: string },\n>(dates: T[]): T[] {\n if (!dates || !dates.length) {\n return [];\n }\n\n return [...dates].sort((a, b) => {\n const dateTimeFormat = `${dateFormat} ${timeFormat}`;\n const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);\n const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);\n return dateA.valueOf() - dateB.valueOf(); // chronological order\n });\n}\n","import type { Dayjs } from \"dayjs\";\n\nimport {\n DailyClueGameData,\n EnumGameStatus,\n GameHistory,\n GamePlacement,\n GamePlacementClue,\n gameScreenIdentifierList,\n} from \"../types/game\";\n\nimport { nzStartOfDay } from \"./date\";\n\nfunction createSeededRng(seed: number) {\n let t = seed >>> 0;\n\n return function random() {\n t += 0x6d2b79f5;\n let x = t;\n\n x = Math.imul(x ^ (x >>> 15), x | 1);\n x ^= x + Math.imul(x ^ (x >>> 7), x | 61);\n\n return ((x ^ (x >>> 14)) >>> 0) / 4294967296;\n };\n}\n\nfunction hashStringToNumber(seed: string): number {\n let hash = 2166136261;\n\n for (let i = 0; i < seed.length; i++) {\n hash ^= seed.codePointAt(i) ?? 0;\n hash = Math.imul(hash, 16777619);\n }\n\n return hash >>> 0;\n}\n\n/** Seeded shuffle so all players see the same letter order / placements for a game. */\nexport function seededShuffle<T>(array: readonly T[], seed: string): T[] {\n const rng = createSeededRng(hashStringToNumber(seed));\n const result = [...array];\n\n for (let i = result.length - 1; i > 0; i--) {\n const j = Math.floor(rng() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n\nfunction getDayIndex(start: Dayjs, today: Dayjs): number {\n return today.diff(start, \"day\");\n}\n\nexport function computeDailyClueState(dailyClue: DailyClueGameData): {\n todaysClue: GamePlacementClue | null;\n todaysLetter: string | null;\n todaysPlacement: GamePlacement | null;\n} | null {\n const { startDate, endDate } = dailyClue.gameFields.gameDate;\n const { shuffled, collected } = dailyClue.letterInfo;\n\n const today = nzStartOfDay();\n const start = nzStartOfDay(startDate);\n const end = nzStartOfDay(endDate);\n\n const shuffledPlacements = seededShuffle(\n gameScreenIdentifierList,\n start.toISOString(),\n );\n\n if (today.isBefore(start)) {\n return null;\n }\n\n if (today.isAfter(end)) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n const index = getDayIndex(start, today);\n\n console.log(\"DEBUG\", {\n collected,\n end: end.format(),\n index,\n shuffled,\n shuffledPlacements,\n start: start.format(),\n today: today.format(),\n });\n\n if (index < 0 || index >= shuffled.length) return null;\n\n const collectedCount = (collected ?? []).length;\n\n // 🔒 Already claimed today's letter\n if (collectedCount > index) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // 🎯 Today's letter is strictly based on day index\n const letterToday = shuffled[index];\n if (!letterToday) return null;\n\n return {\n todaysClue: shuffledPlacements[index].clue,\n todaysLetter: letterToday,\n todaysPlacement: shuffledPlacements[index].id,\n };\n}\n","import {\n EnumInviteStatus,\n EnumPaymentMethod,\n EnumRegions,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"src/enums\";\nimport { OptionItem, SocialMediaType } from \"src/types\";\n\nimport { isIsoDateString } from \"./date\";\n\nexport const removeTypename = (obj: any): any => {\n // Preserve Date objects\n if (obj instanceof Date) {\n return obj;\n }\n\n // Preserve File objects (for apollo-upload-client)\n if (obj instanceof File) {\n return obj;\n }\n\n // Preserve ISO date strings\n if (isIsoDateString(obj)) {\n return obj;\n }\n\n // Handle arrays\n if (Array.isArray(obj)) {\n return obj.map(removeTypename);\n }\n\n // Handle plain objects only\n if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj;\n\n return Object.keys(cleanedObj).reduce((acc: any, key) => {\n acc[key] = removeTypename(cleanedObj[key]);\n return acc;\n }, {});\n }\n\n // Primitives\n return obj;\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n return text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n};\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n * @param items - The array of strings to convert.\n * @returns - The converted array of objects.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item,\n value: item,\n }));\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str\n .split(\" \")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const statusOptions = [\n ...Object.values(EnumInviteStatus)\n .map((status) => ({\n label: status,\n value: status,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)), // Sort the options alphabetically\n];\n\nexport const availableRegionTypes = Object.values(EnumRegions);\nexport const availableRegionOptions: OptionItem[] =\n mapArrayToOptions(availableRegionTypes);\n\nexport const paymentMethodOptions: OptionItem[] = mapArrayToOptions(\n Object.values(EnumPaymentMethod),\n);\n\nexport function normalizeUrl(url: string): string {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n return `https://${url}`;\n }\n return url;\n}\n\nexport const licenseNiceNames: Record<EnumUserLicence, string> = {\n [EnumUserLicence.PRO_EVENT]: \"Pro Event\",\n [EnumUserLicence.PRO_VENDOR]: \"Pro Stallholder\",\n [EnumUserLicence.STANDARD_EVENT]: \"Standard Event\",\n [EnumUserLicence.STANDARD_VENDOR]: \"Standard Stallholder\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"Pro+Ads Event\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"Pro+Ads Stallholder\",\n [EnumUserLicence.STANDARD_PARTNER]: \"Partner\",\n};\n\nexport const cluemartSocialMedia: SocialMediaType[] = [\n {\n link: \"https://www.facebook.com/ClueMartApp\",\n name: EnumSocialMedia.FACEBOOK,\n },\n {\n link: \"https://www.instagram.com/cluemart_app\",\n name: EnumSocialMedia.INSTAGRAM,\n },\n {\n link: \"https://www.tiktok.com/@cluemart\",\n name: EnumSocialMedia.TIKTOK,\n },\n {\n link: \"https://www.youtube.com/@ClueMart-App-NZ\",\n name: EnumSocialMedia.YOUTUBE,\n },\n];\n\nexport const IOS_URL = \"https://apps.apple.com/nz/app/cluemart/id6747251008\";\nexport const ANDROID_URL =\n \"https://play.google.com/store/apps/details?id=com.timardex.cluemart\";\n"],"mappings":";;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AACrB,OAAO,SAAS;AAET,IAAM,aAAa;AACnB,IAAM,aAAa;AAG1B,MAAM,OAAO,iBAAiB;AAC9B,MAAM,OAAO,GAAG;AAChB,MAAM,OAAO,QAAQ;AACrB,MAAM,OAAO,aAAa;AAE1B,IAAM,QAAQ;AAEP,SAAS,SAAS,MAAsB;AAC7C,SAAO,OAAO,MAAM,IAAI,EAAE,GAAG,KAAK,IAAI,MAAM,EAAE,GAAG,KAAK;AACxD;AAGO,SAAS,aACd,OACa;AACb,MAAI,SAAS,MAAM;AACjB,WAAO,MAAM,EAAE,GAAG,KAAK,EAAE,QAAQ,KAAK;AAAA,EACxC;AACA,SAAO,MAAM,GAAG,OAAO,KAAK,EAAE,QAAQ,KAAK;AAC7C;AAWO,IAAM,aAAa,CACxB,SACA,UAAsB,YACtB,YACG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WAAW,UAAU,GAAG;AAC7D,WAAO,WAAW,GAAG;AAAA,EACvB;AACA,SAAO;AACT;AAEO,IAAM,mBAAoD;AAAA,EAC/D,4BAA0B,GAAG;AAAA,EAC7B,8BAA2B,GAAG;AAAA,EAC9B,sCAA+B,GAAG;AAAA,EAClC,wCAAgC,GAAG;AAAA,EACnC,sCAA+B,GAAG;AAAA,EAClC,wCAAgC,GAAG;AAAA,EACnC,0CAAiC,GAAG;AACtC;AAEO,IAAM,sBAAyC;AAAA,EACpD;AAAA,IACE,MAAM;AAAA,IACN;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN;AAAA,EACF;AACF;AAEO,IAAM,UAAU;AAChB,IAAM,cACX;","names":[]}
|
|
@@ -105,8 +105,9 @@ var gameTypeToDisplayName = {
|
|
|
105
105
|
};
|
|
106
106
|
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
107
107
|
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
108
|
-
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
109
108
|
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
109
|
+
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
110
|
+
EnumGameStatus2["GAME_STARTED"] = "GAME_STARTED";
|
|
110
111
|
return EnumGameStatus2;
|
|
111
112
|
})(EnumGameStatus || {});
|
|
112
113
|
|
|
@@ -116,4 +117,4 @@ export {
|
|
|
116
117
|
gameTypeToDisplayName,
|
|
117
118
|
EnumGameStatus
|
|
118
119
|
};
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-WYYQSPAX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/game.ts"],"sourcesContent":["import { OwnerType } from \"./global\";\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: /^\\/events\\/[a-f0-9]{24}$/,\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 you go to find something specific.\",\n id: \"events-search\",\n match: \"/events/search\",\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 taps you on the shoulder.\",\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: \"A single collaborator in the ecosystem.\",\n id: \"single-partner\",\n match: /^\\/partners\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"The network behind the scenes.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where you share something with everyone.\",\n id: \"single-visitor-post\",\n match: /^\\/visitors\\/posts\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"One provider offering something valuable.\",\n id: \"single-vendor\",\n match: /^\\/vendors\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"A marketplace of providers.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"People who stopped by to see you.\",\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\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n};\nexport type GameData = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_LEFT = \"GAME_LEFT\",\n
|
|
1
|
+
{"version":3,"sources":["../src/types/game.ts"],"sourcesContent":["import { OwnerType } from \"./global\";\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: /^\\/events\\/[a-f0-9]{24}$/,\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 you go to find something specific.\",\n id: \"events-search\",\n match: \"/events/search\",\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 taps you on the shoulder.\",\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: \"A single collaborator in the ecosystem.\",\n id: \"single-partner\",\n match: /^\\/partners\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"The network behind the scenes.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where you share something with everyone.\",\n id: \"single-visitor-post\",\n match: /^\\/visitors\\/posts\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"One provider offering something valuable.\",\n id: \"single-vendor\",\n match: /^\\/vendors\\/[a-f0-9]{24}$/,\n },\n {\n clue: \"A marketplace of providers.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"People who stopped by to see you.\",\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\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n};\nexport type GameData = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\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 gameDate: GameDate;\n gameStatus: EnumGameStatus;\n gameType: EnumGameType;\n pointsEarned: number;\n};\n\nexport type GameType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n gameData: GameData | null;\n gameHistory: GameHistory[] | 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":";AAEO,IAAM,2BAA2B;AAAA,EACtC;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE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,EACA;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AACF;AAMO,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,cAAA,gBAAa;AADH,SAAAA;AAAA,GAAA;AAIL,IAAM,wBAAsD;AAAA,EACjE,CAAC,4BAAuB,GAAG;AAC7B;AAmCO,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,oBAAiB;AACjB,EAAAA,gBAAA,sBAAmB;AACnB,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;","names":["EnumGameType","EnumGameStatus"]}
|
|
@@ -43,10 +43,10 @@ import {
|
|
|
43
43
|
vendorStallSize,
|
|
44
44
|
vendorStartDateFields,
|
|
45
45
|
vendorTable
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-3SFKWCTZ.mjs";
|
|
47
|
+
import "../chunk-RY7AILFK.mjs";
|
|
48
48
|
import "../chunk-534WN2SR.mjs";
|
|
49
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-WYYQSPAX.mjs";
|
|
50
50
|
export {
|
|
51
51
|
availableCategories,
|
|
52
52
|
availableTagTypes,
|
|
@@ -113,8 +113,9 @@ type GameData = {
|
|
|
113
113
|
};
|
|
114
114
|
declare enum EnumGameStatus {
|
|
115
115
|
GAME_COMPLETED = "GAME_COMPLETED",
|
|
116
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
116
117
|
GAME_LEFT = "GAME_LEFT",
|
|
117
|
-
|
|
118
|
+
GAME_STARTED = "GAME_STARTED"
|
|
118
119
|
}
|
|
119
120
|
type GameHistory = {
|
|
120
121
|
gameDate: GameDate;
|
|
@@ -113,8 +113,9 @@ type GameData = {
|
|
|
113
113
|
};
|
|
114
114
|
declare enum EnumGameStatus {
|
|
115
115
|
GAME_COMPLETED = "GAME_COMPLETED",
|
|
116
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
116
117
|
GAME_LEFT = "GAME_LEFT",
|
|
117
|
-
|
|
118
|
+
GAME_STARTED = "GAME_STARTED"
|
|
118
119
|
}
|
|
119
120
|
type GameHistory = {
|
|
120
121
|
gameDate: GameDate;
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CqrscA5x.mjs';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-MMBYi34A.mjs';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
6
|
-
import { G as GameType, a as GameLeaderboard } from '../game-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-D3uHp75N.mjs';
|
|
6
|
+
import { G as GameType, a as GameLeaderboard } from '../game-DuJpk6t2.mjs';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
9
9
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-2FaGRW-i.js';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-B0WdAD-8.js';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
6
|
-
import { G as GameType, a as GameLeaderboard } from '../game-
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-CZ1sHnKx.js';
|
|
6
|
+
import { G as GameType, a as GameLeaderboard } from '../game-MJqjbMLC.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
9
9
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-MMBYi34A.mjs';
|
|
2
|
-
import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-
|
|
2
|
+
import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-D3uHp75N.mjs';
|
|
3
3
|
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-DtPfNKc4.mjs';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
import '../enums/index.mjs';
|
|
6
|
-
import '../game-
|
|
6
|
+
import '../game-DuJpk6t2.mjs';
|
|
7
7
|
|
|
8
8
|
interface PlacePrediction {
|
|
9
9
|
place_id: string;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { L as LocationType, i as VendorFormData, j as CreateVendorFormData, k as VendorInfoFormData, l as CreateVendorInfoFormData, m as EventFormData, n as CreateEventFormData, o as EventInfoFormData, p as CreateEventInfoFormData, q as UnregisteredVendorFormData, B as BaseResourceTypeFormData } from '../global-B0WdAD-8.js';
|
|
2
|
-
import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-
|
|
2
|
+
import { e as UserFormData, C as CreateUserFormData, f as PartnerFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData, l as AppSettingsFormData, m as CreateAppSettingsFormData } from '../post-CZ1sHnKx.js';
|
|
3
3
|
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-B5tprOIL.js';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
import '../enums/index.js';
|
|
6
|
-
import '../game-
|
|
6
|
+
import '../game-MJqjbMLC.js';
|
|
7
7
|
|
|
8
8
|
interface PlacePrediction {
|
|
9
9
|
place_id: string;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-3SFKWCTZ.mjs";
|
|
2
2
|
import "../chunk-RQDZX76B.mjs";
|
|
3
3
|
import "../chunk-DWO35OY4.mjs";
|
|
4
4
|
import "../chunk-I7WE3EBR.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
dateFormat,
|
|
15
15
|
normalizeUrl,
|
|
16
16
|
timeFormat
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-RY7AILFK.mjs";
|
|
18
18
|
import {
|
|
19
19
|
EnumEventDateStatus,
|
|
20
20
|
EnumEventType,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
EnumUserRole,
|
|
28
28
|
EnumVendorType
|
|
29
29
|
} from "../chunk-534WN2SR.mjs";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-WYYQSPAX.mjs";
|
|
31
31
|
|
|
32
32
|
// src/hooks/useLocationSearch.ts
|
|
33
33
|
var handleApiError = (error, message) => {
|
package/dist/index.cjs
CHANGED
|
@@ -835,11 +835,12 @@ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
|
835
835
|
var gameTypeToDisplayName = {
|
|
836
836
|
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
837
837
|
};
|
|
838
|
-
var EnumGameStatus = /* @__PURE__ */ ((
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
838
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
|
|
839
|
+
EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
840
|
+
EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
841
|
+
EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
|
|
842
|
+
EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
|
|
843
|
+
return EnumGameStatus3;
|
|
843
844
|
})(EnumGameStatus || {});
|
|
844
845
|
|
|
845
846
|
// src/utils/date.ts
|
|
@@ -963,12 +964,6 @@ function computeDailyClueState(dailyClue) {
|
|
|
963
964
|
}
|
|
964
965
|
if (today.isAfter(end)) {
|
|
965
966
|
return {
|
|
966
|
-
gameHistory: {
|
|
967
|
-
gameDate: dailyClue.gameFields.gameDate,
|
|
968
|
-
gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
|
|
969
|
-
gameType: dailyClue.gameFields.gameType,
|
|
970
|
-
pointsEarned: dailyClue.points
|
|
971
|
-
},
|
|
972
967
|
todaysClue: null,
|
|
973
968
|
todaysLetter: null,
|
|
974
969
|
todaysPlacement: null
|
|
@@ -976,31 +971,28 @@ function computeDailyClueState(dailyClue) {
|
|
|
976
971
|
}
|
|
977
972
|
const index = getDayIndex(start, today);
|
|
978
973
|
console.log("DEBUG", {
|
|
974
|
+
collected,
|
|
979
975
|
end: end.format(),
|
|
980
976
|
index,
|
|
981
|
-
|
|
982
|
-
|
|
977
|
+
shuffled,
|
|
978
|
+
shuffledPlacements,
|
|
983
979
|
start: start.format(),
|
|
984
980
|
today: today.format()
|
|
985
981
|
});
|
|
986
982
|
if (index < 0 || index >= shuffled.length) return null;
|
|
987
|
-
const
|
|
988
|
-
if (
|
|
989
|
-
const alreadyHaveTodaysSlot = (collected ?? []).some(
|
|
990
|
-
(l) => l.trim().toLowerCase() === letterToday
|
|
991
|
-
);
|
|
992
|
-
if (alreadyHaveTodaysSlot) {
|
|
983
|
+
const collectedCount = (collected ?? []).length;
|
|
984
|
+
if (collectedCount > index) {
|
|
993
985
|
return {
|
|
994
|
-
gameHistory: null,
|
|
995
986
|
todaysClue: null,
|
|
996
987
|
todaysLetter: null,
|
|
997
988
|
todaysPlacement: null
|
|
998
989
|
};
|
|
999
990
|
}
|
|
991
|
+
const letterToday = shuffled[index];
|
|
992
|
+
if (!letterToday) return null;
|
|
1000
993
|
return {
|
|
1001
|
-
gameHistory: null,
|
|
1002
994
|
todaysClue: shuffledPlacements[index].clue,
|
|
1003
|
-
todaysLetter:
|
|
995
|
+
todaysLetter: letterToday,
|
|
1004
996
|
todaysPlacement: shuffledPlacements[index].id
|
|
1005
997
|
};
|
|
1006
998
|
}
|