@timardex/cluemart-shared 1.6.112 → 1.6.130
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/affiliate-Bqqlffw8.d.mts +36 -0
- package/dist/affiliate-Btlp5XUp.d.ts +36 -0
- package/dist/affiliateAdapters-BW3BY7c5.d.mts +118 -0
- package/dist/affiliateAdapters-C51ISmuA.d.ts +118 -0
- package/dist/apollo/index.d.mts +3 -3
- package/dist/apollo/index.d.ts +3 -3
- package/dist/auth/index.cjs +2546 -951
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +28 -30
- package/dist/auth/index.d.ts +28 -30
- package/dist/auth/index.mjs +24 -25
- package/dist/auth/index.mjs.map +1 -1
- package/dist/auth-BOmAO53v.d.ts +169 -0
- package/dist/auth-CsITA95p.d.mts +169 -0
- package/dist/{chunk-VPANTTZI.mjs → chunk-DATBGC2K.mjs} +108 -23
- package/dist/chunk-DATBGC2K.mjs.map +1 -0
- package/dist/chunk-DDHECBJR.mjs +726 -0
- package/dist/chunk-DDHECBJR.mjs.map +1 -0
- package/dist/chunk-INQCDU24.mjs +139 -0
- package/dist/chunk-INQCDU24.mjs.map +1 -0
- package/dist/{chunk-SD42WIMV.mjs → chunk-NWWKI4PJ.mjs} +5 -5
- package/dist/chunk-NWWKI4PJ.mjs.map +1 -0
- package/dist/{chunk-LBEJECG3.mjs → chunk-OHHJ3KJJ.mjs} +71 -64
- package/dist/chunk-OHHJ3KJJ.mjs.map +1 -0
- package/dist/chunk-TOEFAEF2.mjs +69 -0
- package/dist/chunk-TOEFAEF2.mjs.map +1 -0
- package/dist/chunk-UKW7NZEQ.mjs +2813 -0
- package/dist/chunk-UKW7NZEQ.mjs.map +1 -0
- package/dist/dailyClue-C6WXY73z.d.mts +105 -0
- package/dist/dailyClue-C6WXY73z.d.ts +105 -0
- package/dist/enums/index.cjs +2 -229
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +5 -170
- package/dist/enums/index.d.ts +5 -170
- package/dist/enums/index.mjs +1 -41
- package/dist/event-C9K7CSg4.d.ts +53 -0
- package/dist/event-W0NhL5Cd.d.mts +53 -0
- package/dist/formFields/index.cjs +284 -112
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +4 -2
- package/dist/formFields/index.d.ts +4 -2
- package/dist/formFields/index.mjs +919 -50
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/global-BbSFfYdd.d.ts +181 -0
- package/dist/global-C6v9tRji.d.mts +181 -0
- package/dist/graphql/index.cjs +2860 -2292
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +422 -469
- package/dist/graphql/index.d.ts +422 -469
- package/dist/graphql/index.mjs +2547 -160
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/graphql-CDOfA79A.d.ts +1253 -0
- package/dist/graphql-CcvzTs9k.d.mts +1253 -0
- package/dist/hooks/index.cjs +511 -3846
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +10 -9
- package/dist/hooks/index.d.ts +10 -9
- package/dist/hooks/index.mjs +54 -72
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/images/index.mjs +86 -21
- package/dist/images/index.mjs.map +1 -1
- package/dist/index.cjs +4414 -3168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2439 -1579
- package/dist/index.d.ts +2439 -1579
- package/dist/index.mjs +4350 -3121
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +3 -2
- package/dist/map/index.d.ts +3 -2
- package/dist/resourceActivities-CS8YRIIL.d.mts +89 -0
- package/dist/resourceActivities-DOdNPkhW.d.ts +89 -0
- package/dist/sharing/index.cjs +23 -19
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +16 -3
- package/dist/sharing/index.d.ts +16 -3
- package/dist/sharing/index.mjs +183 -29
- package/dist/sharing/index.mjs.map +1 -1
- package/dist/subscription-Cj_qBA7u.d.mts +20 -0
- package/dist/subscription-OiJ50uJb.d.ts +20 -0
- package/dist/theme/index.mjs +41 -5
- package/dist/theme/index.mjs.map +1 -1
- package/dist/types/index.cjs +868 -123
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +234 -15
- package/dist/types/index.d.ts +234 -15
- package/dist/types/index.mjs +61 -31
- package/dist/utils/index.cjs +292 -117
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +25 -23
- package/dist/utils/index.d.ts +25 -23
- package/dist/utils/index.mjs +6 -5
- package/dist/vendor-DmMi2qmx.d.mts +73 -0
- package/dist/vendor-M9hVZlni.d.ts +73 -0
- package/package.json +10 -3
- package/dist/ad-BUYzE6zx.d.ts +0 -181
- package/dist/ad-BhLoEul3.d.mts +0 -181
- package/dist/affiliate-BbtjeUP4.d.mts +0 -73
- package/dist/affiliate-C51nzKsw.d.ts +0 -73
- package/dist/chunk-32MKHJTX.mjs +0 -1207
- package/dist/chunk-32MKHJTX.mjs.map +0 -1
- package/dist/chunk-AYO3E4DM.mjs +0 -224
- package/dist/chunk-AYO3E4DM.mjs.map +0 -1
- package/dist/chunk-BIJ5NDXW.mjs +0 -962
- package/dist/chunk-BIJ5NDXW.mjs.map +0 -1
- package/dist/chunk-DQ7ZHIXW.mjs +0 -26
- package/dist/chunk-DQ7ZHIXW.mjs.map +0 -1
- package/dist/chunk-ILILH7E2.mjs +0 -219
- package/dist/chunk-ILILH7E2.mjs.map +0 -1
- package/dist/chunk-LBEJECG3.mjs.map +0 -1
- package/dist/chunk-NPFJ2CN2.mjs +0 -109
- package/dist/chunk-NPFJ2CN2.mjs.map +0 -1
- package/dist/chunk-R6PCFOYO.mjs +0 -3650
- package/dist/chunk-R6PCFOYO.mjs.map +0 -1
- package/dist/chunk-SD42WIMV.mjs.map +0 -1
- package/dist/chunk-VA5YN2K3.mjs +0 -48
- package/dist/chunk-VA5YN2K3.mjs.map +0 -1
- package/dist/chunk-VPANTTZI.mjs.map +0 -1
- package/dist/chunk-X3OLM35T.mjs +0 -278
- package/dist/chunk-X3OLM35T.mjs.map +0 -1
- package/dist/contactUs--NoohZBu.d.ts +0 -11
- package/dist/contactUs-CBWzefUS.d.mts +0 -11
- package/dist/global-CUYYxpy2.d.ts +0 -699
- package/dist/global-DePDtOFt.d.mts +0 -699
- package/dist/resourceActivities-CMUcn2P7.d.ts +0 -130
- package/dist/resourceActivities-CwbJFGIp.d.mts +0 -130
- package/dist/subscription-BU8GvH2K.d.ts +0 -12
- package/dist/subscription-bmAdrnfi.d.mts +0 -12
- package/dist/user-D47MLFyH.d.ts +0 -134
- package/dist/user-DE8edl3u.d.mts +0 -134
package/dist/sharing/index.mjs
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PUBLIC_SHARE_PATH_TYPES,
|
|
3
|
-
SHARE_TYPE_PATH_REGEX,
|
|
4
|
-
buildApplicationShareDescription,
|
|
5
|
-
buildInvitationShareDescription,
|
|
6
|
-
buildPublicEventShareDescription,
|
|
7
|
-
buildPublicVendorShareDescription,
|
|
8
|
-
buildSharePagePath,
|
|
9
|
-
buildShareUrl,
|
|
10
|
-
formatCategoryLabel,
|
|
11
|
-
formatShareApplicationCategoriesSection,
|
|
12
|
-
formatShareApplicationComplianceSection,
|
|
13
|
-
formatShareApplicationPriceRangeLine,
|
|
14
|
-
formatShareApplicationStallSizeLine,
|
|
15
|
-
formatShareInvitationApplicationDeadlineLine,
|
|
16
|
-
formatShareInvitationMarketDatesSection,
|
|
17
|
-
formatShareInvitationRequirementsSection,
|
|
18
|
-
formatShareIsFoodTrueLine,
|
|
19
|
-
formatShareMarketDate,
|
|
20
|
-
formatShareRainOrShineLine,
|
|
21
|
-
formatShareStallLine,
|
|
22
|
-
formatShareTagsSection,
|
|
23
|
-
formatStallCapacityLabel,
|
|
24
|
-
normalizeShareRouteId,
|
|
25
|
-
shareSlugResourceId,
|
|
26
|
-
toShareSocialImageCacheVersion
|
|
27
|
-
} from "../chunk-AYO3E4DM.mjs";
|
|
28
1
|
import {
|
|
29
2
|
DEFAULT_SHARE_OG_IMAGE,
|
|
30
3
|
OG_DESCRIPTION_LINE_BREAK,
|
|
@@ -62,6 +35,7 @@ import {
|
|
|
62
35
|
buildShareMessageSections,
|
|
63
36
|
buildShareOgDescription,
|
|
64
37
|
buildShareOgDescriptionFromSections,
|
|
38
|
+
formatDate,
|
|
65
39
|
isPostShareResourceType,
|
|
66
40
|
isRelationShareResourceType,
|
|
67
41
|
joinShareDescriptionSections,
|
|
@@ -71,8 +45,188 @@ import {
|
|
|
71
45
|
shareMessageFooterPlacementForType,
|
|
72
46
|
splitShareDescriptionSections,
|
|
73
47
|
stripOverlaySubtitleSpecialChars
|
|
74
|
-
} from "../chunk-
|
|
75
|
-
import "../chunk-
|
|
48
|
+
} from "../chunk-NWWKI4PJ.mjs";
|
|
49
|
+
import "../chunk-INQCDU24.mjs";
|
|
50
|
+
|
|
51
|
+
// src/sharing/formatCategoryLabel.ts
|
|
52
|
+
function formatCategoryLabel(category) {
|
|
53
|
+
const subcategoryNames = (category.subcategories ?? []).filter(
|
|
54
|
+
(subcategory) => Boolean(subcategory)
|
|
55
|
+
).map((subcategory) => subcategory.name).filter((name) => Boolean(name));
|
|
56
|
+
if (subcategoryNames.length === 0) {
|
|
57
|
+
return category.name;
|
|
58
|
+
}
|
|
59
|
+
return `${category.name} (${subcategoryNames.join(", ")})`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/sharing/buildRelationShareDescription.ts
|
|
63
|
+
function formatShareMarketDate(dateStr) {
|
|
64
|
+
return formatDate(dateStr, "date");
|
|
65
|
+
}
|
|
66
|
+
function formatStallCapacityLabel(stallCapacity) {
|
|
67
|
+
return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : " - Full";
|
|
68
|
+
}
|
|
69
|
+
function formatShareStallLine(stall) {
|
|
70
|
+
return ` - ${stall.label} \u2014 $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;
|
|
71
|
+
}
|
|
72
|
+
function formatShareInvitationMarketDatesSection(dateTime) {
|
|
73
|
+
const dateBlocks = dateTime.map((date) => {
|
|
74
|
+
const formattedDate = formatShareMarketDate(date.startDate);
|
|
75
|
+
const stallLines = date.stallTypes.map(formatShareStallLine);
|
|
76
|
+
return [`- ${formattedDate}`, ...stallLines].join("\n");
|
|
77
|
+
});
|
|
78
|
+
return `${SHARE_MARKET_DATES_SECTION_HEADING}
|
|
79
|
+
${dateBlocks.join("\n")}`;
|
|
80
|
+
}
|
|
81
|
+
function formatShareRainOrShineLine(rainOrShine) {
|
|
82
|
+
return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;
|
|
83
|
+
}
|
|
84
|
+
function formatShareIsFoodTrueLine(foodTruck) {
|
|
85
|
+
return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;
|
|
86
|
+
}
|
|
87
|
+
function formatShareInvitationRequirementsSection(requirements) {
|
|
88
|
+
const bullets = (requirements ?? []).filter((item) => item.value).map((item) => item.label.trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
|
|
89
|
+
if (bullets.length === 0) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return `${SHARE_REQUIREMENTS_SECTION_HEADING}
|
|
93
|
+
${bullets.join("\n")}`;
|
|
94
|
+
}
|
|
95
|
+
function formatShareTagsSection(tags) {
|
|
96
|
+
const bullets = tags.map((tag) => tag.trim()).filter((tag) => tag.length > 0).map((tag) => `- ${tag}`);
|
|
97
|
+
if (bullets.length === 0) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return `${SHARE_TAGS_SECTION_HEADING}
|
|
101
|
+
${bullets.join("\n")}`;
|
|
102
|
+
}
|
|
103
|
+
function formatShareApplicationCategoriesSection(categories) {
|
|
104
|
+
const bullets = categories.map((category) => formatCategoryLabel(category).trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
|
|
105
|
+
if (bullets.length === 0) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
return `${SHARE_CATEGORIES_SECTION_HEADING}
|
|
109
|
+
${bullets.join("\n")}`;
|
|
110
|
+
}
|
|
111
|
+
function formatShareApplicationStallSizeLine(size) {
|
|
112
|
+
return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m \xD7 ${size.depth}m`;
|
|
113
|
+
}
|
|
114
|
+
function formatShareApplicationComplianceSection(compliance) {
|
|
115
|
+
const bullets = [
|
|
116
|
+
compliance?.liabilityInsurance && "Liability insurance",
|
|
117
|
+
compliance?.foodBeverageLicense && "Food & beverage licence"
|
|
118
|
+
].filter((label) => Boolean(label)).map((label) => `- ${label}`);
|
|
119
|
+
if (bullets.length === 0) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
return `${SHARE_COMPLIANCE_PREFIX}
|
|
123
|
+
${bullets.join("\n")}`;
|
|
124
|
+
}
|
|
125
|
+
function formatShareApplicationPriceRangeLine(priceRange) {
|
|
126
|
+
return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} \u2013 $${priceRange.max}`;
|
|
127
|
+
}
|
|
128
|
+
function formatShareInvitationApplicationDeadlineLine(applicationDeadlineHours) {
|
|
129
|
+
return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;
|
|
130
|
+
}
|
|
131
|
+
function buildInvitationShareDescription(event, eventInfo) {
|
|
132
|
+
const stallTypes = eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];
|
|
133
|
+
if (!eventInfo || stallTypes.length === 0) {
|
|
134
|
+
return event.description?.trim() || "";
|
|
135
|
+
}
|
|
136
|
+
const sections = [
|
|
137
|
+
event.location.fullAddress,
|
|
138
|
+
formatShareRainOrShineLine(event.rainOrShine),
|
|
139
|
+
formatShareTagsSection(
|
|
140
|
+
(event.tags ?? []).filter((tag) => tag != null && tag !== "")
|
|
141
|
+
),
|
|
142
|
+
formatShareInvitationMarketDatesSection(eventInfo.dateTime),
|
|
143
|
+
formatShareInvitationApplicationDeadlineLine(
|
|
144
|
+
eventInfo.applicationDeadlineHours
|
|
145
|
+
),
|
|
146
|
+
formatShareInvitationRequirementsSection(eventInfo.requirements)
|
|
147
|
+
];
|
|
148
|
+
return joinShareDescriptionSections(sections);
|
|
149
|
+
}
|
|
150
|
+
function buildApplicationShareDescription(vendor, vendorInfo) {
|
|
151
|
+
if (!vendorInfo) {
|
|
152
|
+
return vendor.description?.trim() || "";
|
|
153
|
+
}
|
|
154
|
+
const profileDescription = vendor.description?.trim();
|
|
155
|
+
const sections = [
|
|
156
|
+
formatShareIsFoodTrueLine(vendor.foodTruck),
|
|
157
|
+
formatShareApplicationCategoriesSection(vendor.categories),
|
|
158
|
+
formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),
|
|
159
|
+
formatShareApplicationComplianceSection(vendorInfo.compliance),
|
|
160
|
+
formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),
|
|
161
|
+
profileDescription
|
|
162
|
+
];
|
|
163
|
+
return joinShareDescriptionSections(sections);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// src/sharing/buildPublicShareDescription.ts
|
|
167
|
+
function buildPublicEventShareDescription(event) {
|
|
168
|
+
return joinShareDescriptionSections([
|
|
169
|
+
formatShareRainOrShineLine(event.rainOrShine),
|
|
170
|
+
formatShareTagsSection(event.tags),
|
|
171
|
+
event.description?.trim()
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
function buildPublicVendorShareDescription(vendor) {
|
|
175
|
+
return joinShareDescriptionSections([
|
|
176
|
+
formatShareIsFoodTrueLine(vendor.foodTruck),
|
|
177
|
+
vendor.description?.trim()
|
|
178
|
+
]);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// src/sharing/buildShareUrl.ts
|
|
182
|
+
var PUBLIC_SHARE_PATH_TYPES = [
|
|
183
|
+
...RESOURCE_SHARE_TYPES,
|
|
184
|
+
...POST_SHARE_RESOURCE_TYPES
|
|
185
|
+
];
|
|
186
|
+
var SHARE_TYPE_PATH_REGEX = [
|
|
187
|
+
...PUBLIC_SHARE_PATH_TYPES,
|
|
188
|
+
RELATION_SHARE_APPLICATION,
|
|
189
|
+
RELATION_SHARE_INVITATION
|
|
190
|
+
].join("|");
|
|
191
|
+
function buildShareUrl(type, slug, utmMedium = "app") {
|
|
192
|
+
return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(slug)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// src/sharing/normalizeShareRouteId.ts
|
|
196
|
+
function normalizeShareRouteId(id) {
|
|
197
|
+
try {
|
|
198
|
+
return decodeURIComponent(id);
|
|
199
|
+
} catch {
|
|
200
|
+
return id;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function buildSharePagePath(resourceType, slug) {
|
|
204
|
+
return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(slug))}`;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// src/sharing/shareSlugResource.ts
|
|
208
|
+
function shareSlugResourceId(resource) {
|
|
209
|
+
return resource?._id ?? null;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// src/sharing/toShareSocialImageCacheVersion.ts
|
|
213
|
+
function toShareSocialImageCacheVersion(updatedAt) {
|
|
214
|
+
if (updatedAt == null || updatedAt === "") {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
let ms;
|
|
218
|
+
if (typeof updatedAt === "number") {
|
|
219
|
+
ms = updatedAt;
|
|
220
|
+
} else if (updatedAt instanceof Date) {
|
|
221
|
+
ms = updatedAt.getTime();
|
|
222
|
+
} else {
|
|
223
|
+
ms = Date.parse(String(updatedAt));
|
|
224
|
+
}
|
|
225
|
+
if (!Number.isFinite(ms)) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return String(Math.trunc(ms));
|
|
229
|
+
}
|
|
76
230
|
export {
|
|
77
231
|
DEFAULT_SHARE_OG_IMAGE,
|
|
78
232
|
OG_DESCRIPTION_LINE_BREAK,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/sharing/formatCategoryLabel.ts","../../src/sharing/buildRelationShareDescription.ts","../../src/sharing/buildPublicShareDescription.ts","../../src/sharing/buildShareUrl.ts","../../src/sharing/normalizeShareRouteId.ts","../../src/sharing/shareSlugResource.ts","../../src/sharing/toShareSocialImageCacheVersion.ts"],"sourcesContent":["/**\n * Formats a category for share / display copy.\n * Accepts both form Category (required subcategories) and GraphQL CategoryType\n * (optional/nullable subcategory trees).\n */\nexport function formatCategoryLabel(category: {\n name: string;\n subcategories?: ReadonlyArray<{ name?: string | null } | null> | null;\n}): string {\n const subcategoryNames = (category.subcategories ?? [])\n .filter((subcategory): subcategory is { name?: string | null } =>\n Boolean(subcategory),\n )\n .map((subcategory) => subcategory.name)\n .filter((name): name is string => Boolean(name));\n\n if (subcategoryNames.length === 0) {\n return category.name;\n }\n\n return `${category.name} (${subcategoryNames.join(\", \")})`;\n}\n","import type { StallType } from \"../types/event\";\nimport { formatDate } from \"../utils/date\";\n\nimport {\n SHARE_APPLICATION_DEADLINE_PREFIX,\n SHARE_CATEGORIES_SECTION_HEADING,\n SHARE_FOOD_TRUCK_LINE,\n SHARE_MARKET_DATES_SECTION_HEADING,\n SHARE_RAIN_OR_SHINE_LINE,\n SHARE_REQUIREMENTS_SECTION_HEADING,\n SHARE_COMPLIANCE_PREFIX,\n SHARE_PRICE_RANGE_PREFIX,\n SHARE_STALL_SIZE_PREFIX,\n SHARE_TAGS_SECTION_HEADING,\n} from \"./constants\";\nimport { formatCategoryLabel } from \"./formatCategoryLabel\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\nimport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\nexport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\n/** Formats event `startDate` (`DD-MM-YYYY`) for share copy — same as share preview UI. */\nexport function formatShareMarketDate(dateStr: string): string {\n return formatDate(dateStr, \"date\");\n}\n\nexport function formatStallCapacityLabel(stallCapacity: number): string {\n return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : \" - Full\";\n}\n\nexport function formatShareStallLine(stall: StallType): string {\n return ` - ${stall.label} — $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;\n}\n\n/** Nested market dates + per-date stall lines for invitation share copy. */\nexport function formatShareInvitationMarketDatesSection(\n dateTime: ShareEventInfoForInvitation[\"dateTime\"],\n): string {\n const dateBlocks = dateTime.map((date) => {\n const formattedDate = formatShareMarketDate(date.startDate);\n const stallLines = date.stallTypes.map(formatShareStallLine);\n return [`- ${formattedDate}`, ...stallLines].join(\"\\n\");\n });\n\n return `${SHARE_MARKET_DATES_SECTION_HEADING}\\n${dateBlocks.join(\"\\n\")}`;\n}\n\nexport function formatShareRainOrShineLine(\n rainOrShine: boolean,\n): string | null {\n return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;\n}\n\nexport function formatShareIsFoodTrueLine(foodTruck: boolean): string | null {\n return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;\n}\n\n/** Bulleted requirements list for invitation share copy. */\nexport function formatShareInvitationRequirementsSection(\n requirements: ShareEventInfoForInvitation[\"requirements\"] | null,\n): string | null {\n const bullets = (requirements ?? [])\n .filter((item) => item.value)\n .map((item) => item.label.trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_REQUIREMENTS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\nexport function formatShareTagsSection(tags: string[]): string | null {\n const bullets = tags\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => `- ${tag}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_TAGS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Bulleted categories list for application share copy. */\nexport function formatShareApplicationCategoriesSection(\n categories: ShareVendorForApplication[\"categories\"],\n): string | null {\n const bullets = categories\n .map((category) => formatCategoryLabel(category).trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_CATEGORIES_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Stall dimensions line for application share copy. */\nexport function formatShareApplicationStallSizeLine(size: {\n width: string;\n depth: string;\n}): string {\n return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m × ${size.depth}m`;\n}\n\n/** Bulleted compliance list for application share copy. */\nexport function formatShareApplicationComplianceSection(\n compliance: ShareVendorInfoForApplication[\"compliance\"],\n): string | null {\n const bullets = [\n compliance?.liabilityInsurance && \"Liability insurance\",\n compliance?.foodBeverageLicense && \"Food & beverage licence\",\n ]\n .filter((label): label is string => Boolean(label))\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_COMPLIANCE_PREFIX}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Price range line for application share copy. */\nexport function formatShareApplicationPriceRangeLine(priceRange: {\n min: string;\n max: string;\n}): string {\n return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} – $${priceRange.max}`;\n}\n\n/** Application-deadline sentence for invitation share copy. */\nexport function formatShareInvitationApplicationDeadlineLine(\n applicationDeadlineHours: number,\n): string {\n return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;\n}\n\nexport function buildInvitationShareDescription(\n event: ShareEventForInvitation,\n eventInfo: ShareEventInfoForInvitation | null | undefined,\n): string {\n const stallTypes =\n eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];\n\n if (!eventInfo || stallTypes.length === 0) {\n return event.description?.trim() || \"\";\n }\n\n const sections = [\n event.location.fullAddress,\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(\n (event.tags ?? []).filter((tag): tag is string => tag != null && tag !== \"\"),\n ),\n formatShareInvitationMarketDatesSection(eventInfo.dateTime),\n formatShareInvitationApplicationDeadlineLine(\n eventInfo.applicationDeadlineHours,\n ),\n formatShareInvitationRequirementsSection(eventInfo.requirements),\n ];\n\n return joinShareDescriptionSections(sections);\n}\n\nexport function buildApplicationShareDescription(\n vendor: ShareVendorForApplication,\n vendorInfo: ShareVendorInfoForApplication | null | undefined,\n): string {\n if (!vendorInfo) {\n return vendor.description?.trim() || \"\";\n }\n\n const profileDescription = vendor.description?.trim();\n\n const sections = [\n formatShareIsFoodTrueLine(vendor.foodTruck),\n formatShareApplicationCategoriesSection(vendor.categories),\n formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),\n formatShareApplicationComplianceSection(vendorInfo.compliance),\n formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),\n profileDescription,\n ];\n\n return joinShareDescriptionSections(sections);\n}\n","import {\n formatShareIsFoodTrueLine,\n formatShareRainOrShineLine,\n formatShareTagsSection,\n} from \"./buildRelationShareDescription\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\n\n/** Minimal event fields for public (market) share copy — matches in-app preview. */\nexport type ShareEventForPublic = {\n description?: string | null;\n rainOrShine: boolean;\n tags: string[];\n};\n\n/** Minimal vendor fields for public (stallholder) share copy — matches in-app preview. */\nexport type ShareVendorForPublic = {\n description?: string | null;\n foodTruck: boolean;\n};\n\nexport function buildPublicEventShareDescription(\n event: ShareEventForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n event.description?.trim(),\n ]);\n}\n\nexport function buildPublicVendorShareDescription(\n vendor: ShareVendorForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareIsFoodTrueLine(vendor.foodTruck),\n vendor.description?.trim(),\n ]);\n}\n","import {\n POST_SHARE_RESOURCE_TYPES,\n RESOURCE_SHARE_TYPES,\n SHARE_SITE_URL,\n} from \"./constants\";\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n} from \"./relationShareTypes\";\n\n/** Path segments for public resource share URLs (markets, posts, etc.). */\nexport const PUBLIC_SHARE_PATH_TYPES = [\n ...RESOURCE_SHARE_TYPES,\n ...POST_SHARE_RESOURCE_TYPES,\n] as const;\n\nexport type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];\n\nexport type RelationSharePathType =\n | typeof RELATION_SHARE_INVITATION\n | typeof RELATION_SHARE_APPLICATION;\n\nexport type ShareType = PublicSharePathType | RelationSharePathType;\n\n/** Alternation for deep-link regexes — keep in sync with {@link ShareType}. */\nexport const SHARE_TYPE_PATH_REGEX = [\n ...PUBLIC_SHARE_PATH_TYPES,\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n].join(\"|\");\n\nexport function buildShareUrl(\n type: ShareType,\n slug: string,\n utmMedium: string = \"app\",\n): string {\n return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(slug)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;\n}\n","import type { ShareResourceType } from \"./constants\";\n\nexport function normalizeShareRouteId(id: string): string {\n try {\n return decodeURIComponent(id);\n } catch {\n return id;\n }\n}\n\n/** Relative path for a public share landing page (`/market/demo-market`). */\nexport function buildSharePagePath(\n resourceType: ShareResourceType,\n slug: string,\n): string {\n return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(slug))}`;\n}\n","export type ShareSlugResource = {\n _id: string;\n};\n\nexport function shareSlugResourceId(\n resource: ShareSlugResource | null | undefined,\n): string | null {\n return resource?._id ?? null;\n}\n","/**\n * Normalizes resource `updatedAt` to an epoch-ms string for Facebook/CDN cache busting\n * on social-image URLs (`?v=`). The API ignores this query param.\n */\nexport function toShareSocialImageCacheVersion(\n updatedAt: Date | string | number | null | undefined,\n): string | null {\n if (updatedAt == null || updatedAt === \"\") {\n return null;\n }\n\n let ms: number;\n if (typeof updatedAt === \"number\") {\n ms = updatedAt;\n } else if (updatedAt instanceof Date) {\n ms = updatedAt.getTime();\n } else {\n ms = Date.parse(String(updatedAt));\n }\n\n if (!Number.isFinite(ms)) {\n return null;\n }\n\n return String(Math.trunc(ms));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,oBAAoB,UAGzB;AACT,QAAM,oBAAoB,SAAS,iBAAiB,CAAC,GAClD;AAAA,IAAO,CAAC,gBACP,QAAQ,WAAW;AAAA,EACrB,EACC,IAAI,CAAC,gBAAgB,YAAY,IAAI,EACrC,OAAO,CAAC,SAAyB,QAAQ,IAAI,CAAC;AAEjD,MAAI,iBAAiB,WAAW,GAAG;AACjC,WAAO,SAAS;AAAA,EAClB;AAEA,SAAO,GAAG,SAAS,IAAI,KAAK,iBAAiB,KAAK,IAAI,CAAC;AACzD;;;ACWO,SAAS,sBAAsB,SAAyB;AAC7D,SAAO,WAAW,SAAS,MAAM;AACnC;AAEO,SAAS,yBAAyB,eAA+B;AACtE,SAAO,gBAAgB,IAAI,KAAK,aAAa,uBAAuB;AACtE;AAEO,SAAS,qBAAqB,OAA0B;AAC7D,SAAO,QAAQ,MAAM,KAAK,YAAO,MAAM,KAAK,GAAG,yBAAyB,MAAM,aAAa,CAAC;AAC9F;AAGO,SAAS,wCACd,UACQ;AACR,QAAM,aAAa,SAAS,IAAI,CAAC,SAAS;AACxC,UAAM,gBAAgB,sBAAsB,KAAK,SAAS;AAC1D,UAAM,aAAa,KAAK,WAAW,IAAI,oBAAoB;AAC3D,WAAO,CAAC,KAAK,aAAa,IAAI,GAAG,UAAU,EAAE,KAAK,IAAI;AAAA,EACxD,CAAC;AAED,SAAO,GAAG,kCAAkC;AAAA,EAAK,WAAW,KAAK,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AA,EACnC;AAEA,MAAI,CAAC,OAAO,SAAS,EAAE,GAAG;AACxB,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,KAAK,MAAM,EAAE,CAAC;AAC9B;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { e as LicencesEnumType } from './graphql-CcvzTs9k.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
5
|
+
* ROLE_PERMISSIONS. Prefer resource.action names (e.g. users.read).
|
|
6
|
+
*/
|
|
7
|
+
declare const PERMISSIONS: readonly ["*", "dashboard.admin", "dashboard.affiliate", "dashboard.customer", "dashboard.event", "dashboard.partner", "dashboard.school", "dashboard.vendor", "users.delete", "users.read", "users.update", "events.create", "events.delete", "events.read", "events.update", "vendors.create", "vendors.delete", "vendors.read", "vendors.update", "partners.create", "partners.delete", "partners.read", "partners.update", "schools.create", "schools.delete", "schools.read", "schools.update", "affiliates.create", "affiliates.delete", "affiliates.read", "affiliates.update", "ads.create", "ads.delete", "ads.read", "ads.update", "posts.create", "posts.delete", "posts.read", "posts.update", "settings.read", "settings.update", "affiliates.manage_own", "events.manage_own", "partners.manage_own", "schools.manage_own", "vendors.manage_own"];
|
|
8
|
+
type Permission = (typeof PERMISSIONS)[number];
|
|
9
|
+
declare const WILDCARD_PERMISSION: Permission;
|
|
10
|
+
|
|
11
|
+
/** Tier keys in descending priority (highest first) for licence resolution. */
|
|
12
|
+
declare const TIERS_BY_PRIORITY: readonly ["pro_plus", "pro", "standard"];
|
|
13
|
+
/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */
|
|
14
|
+
type Tier = (typeof TIERS_BY_PRIORITY)[number];
|
|
15
|
+
/** User-facing tier labels (decoupled from the Tier discriminant). */
|
|
16
|
+
declare const TIER_DISPLAY_LABELS: Record<Tier, string>;
|
|
17
|
+
/** Maps licence enums to their canonical tier key. */
|
|
18
|
+
declare const TIER_FROM_LICENCE: Record<LicencesEnumType, Tier>;
|
|
19
|
+
|
|
20
|
+
export { type Permission as P, type Tier as T, WILDCARD_PERMISSION as W, PERMISSIONS as a, TIERS_BY_PRIORITY as b, TIER_DISPLAY_LABELS as c, TIER_FROM_LICENCE as d };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { e as LicencesEnumType } from './graphql-CDOfA79A.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
5
|
+
* ROLE_PERMISSIONS. Prefer resource.action names (e.g. users.read).
|
|
6
|
+
*/
|
|
7
|
+
declare const PERMISSIONS: readonly ["*", "dashboard.admin", "dashboard.affiliate", "dashboard.customer", "dashboard.event", "dashboard.partner", "dashboard.school", "dashboard.vendor", "users.delete", "users.read", "users.update", "events.create", "events.delete", "events.read", "events.update", "vendors.create", "vendors.delete", "vendors.read", "vendors.update", "partners.create", "partners.delete", "partners.read", "partners.update", "schools.create", "schools.delete", "schools.read", "schools.update", "affiliates.create", "affiliates.delete", "affiliates.read", "affiliates.update", "ads.create", "ads.delete", "ads.read", "ads.update", "posts.create", "posts.delete", "posts.read", "posts.update", "settings.read", "settings.update", "affiliates.manage_own", "events.manage_own", "partners.manage_own", "schools.manage_own", "vendors.manage_own"];
|
|
8
|
+
type Permission = (typeof PERMISSIONS)[number];
|
|
9
|
+
declare const WILDCARD_PERMISSION: Permission;
|
|
10
|
+
|
|
11
|
+
/** Tier keys in descending priority (highest first) for licence resolution. */
|
|
12
|
+
declare const TIERS_BY_PRIORITY: readonly ["pro_plus", "pro", "standard"];
|
|
13
|
+
/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */
|
|
14
|
+
type Tier = (typeof TIERS_BY_PRIORITY)[number];
|
|
15
|
+
/** User-facing tier labels (decoupled from the Tier discriminant). */
|
|
16
|
+
declare const TIER_DISPLAY_LABELS: Record<Tier, string>;
|
|
17
|
+
/** Maps licence enums to their canonical tier key. */
|
|
18
|
+
declare const TIER_FROM_LICENCE: Record<LicencesEnumType, Tier>;
|
|
19
|
+
|
|
20
|
+
export { type Permission as P, type Tier as T, WILDCARD_PERMISSION as W, PERMISSIONS as a, TIERS_BY_PRIORITY as b, TIER_DISPLAY_LABELS as c, TIER_FROM_LICENCE as d };
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1,8 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// src/theme/index.ts
|
|
2
|
+
var darkColors = {
|
|
3
|
+
background: "#3D3D3F",
|
|
4
|
+
card: "#1c1c1e",
|
|
5
|
+
primary: "#c96520",
|
|
6
|
+
// burnt orange — same hue, lower brightness
|
|
7
|
+
quaternary: "#3d7a68",
|
|
8
|
+
// barely shifted from light — already sits well on dark
|
|
9
|
+
secondary: "#7a4f78",
|
|
10
|
+
// muted plum — visible but not vivid
|
|
11
|
+
tertiary: "#4e5099",
|
|
12
|
+
// dusty indigo
|
|
13
|
+
textMuted: "#8e8e93"
|
|
14
|
+
};
|
|
15
|
+
var lightColors = {
|
|
16
|
+
background: "#ffffff",
|
|
17
|
+
card: "#f1f2f6",
|
|
18
|
+
primary: "#ff7a00",
|
|
19
|
+
quaternary: "#3b7c67",
|
|
20
|
+
secondary: "#371134",
|
|
21
|
+
tertiary: "#191a75",
|
|
22
|
+
textMuted: "#6c757d"
|
|
23
|
+
};
|
|
24
|
+
var fonts = {
|
|
25
|
+
bold: {
|
|
26
|
+
fontFamily: "Roboto-Bold",
|
|
27
|
+
fontWeight: "700"
|
|
28
|
+
},
|
|
29
|
+
heavy: {
|
|
30
|
+
fontFamily: "Roboto-ExtraBold",
|
|
31
|
+
fontWeight: "900"
|
|
32
|
+
},
|
|
33
|
+
medium: {
|
|
34
|
+
fontFamily: "Roboto-Medium",
|
|
35
|
+
fontWeight: "500"
|
|
36
|
+
},
|
|
37
|
+
regular: {
|
|
38
|
+
fontFamily: "Roboto-Regular",
|
|
39
|
+
fontWeight: "400"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
6
42
|
export {
|
|
7
43
|
darkColors,
|
|
8
44
|
fonts,
|
package/dist/theme/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export const darkColors = {\n background: \"#3D3D3F\",\n card: \"#1c1c1e\",\n primary: \"#c96520\", // burnt orange — same hue, lower brightness\n quaternary: \"#3d7a68\", // barely shifted from light — already sits well on dark\n secondary: \"#7a4f78\", // muted plum — visible but not vivid\n tertiary: \"#4e5099\", // dusty indigo\n textMuted: \"#8e8e93\",\n};\n\nexport const lightColors = {\n background: \"#ffffff\",\n card: \"#f1f2f6\",\n primary: \"#ff7a00\",\n quaternary: \"#3b7c67\",\n secondary: \"#371134\",\n tertiary: \"#191a75\",\n textMuted: \"#6c757d\",\n};\n\nexport const fonts = {\n bold: {\n fontFamily: \"Roboto-Bold\",\n fontWeight: \"700\" as const,\n },\n heavy: {\n fontFamily: \"Roboto-ExtraBold\",\n fontWeight: \"900\" as const,\n },\n medium: {\n fontFamily: \"Roboto-Medium\",\n fontWeight: \"500\" as const,\n },\n regular: {\n fontFamily: \"Roboto-Regular\",\n fontWeight: \"400\" as const,\n },\n};\n"],"mappings":";AAAO,IAAM,aAAa;AAAA,EACxB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,SAAS;AAAA;AAAA,EACT,YAAY;AAAA;AAAA,EACZ,WAAW;AAAA;AAAA,EACX,UAAU;AAAA;AAAA,EACV,WAAW;AACb;AAEO,IAAM,cAAc;AAAA,EACzB,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AACb;AAEO,IAAM,QAAQ;AAAA,EACnB,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACA,QAAQ;AAAA,IACN,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AACF;","names":[]}
|