@timardex/cluemart-shared 1.5.617 → 1.5.618
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-4RD4XK5S.mjs → chunk-3KPB5BHC.mjs} +25 -8
- package/dist/chunk-3KPB5BHC.mjs.map +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +26 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +22 -8
- package/dist/index.d.ts +22 -8
- package/dist/index.mjs +24 -7
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +26 -7
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +22 -8
- package/dist/sharing/index.d.ts +22 -8
- package/dist/sharing/index.mjs +5 -1
- package/package.json +6 -3
- package/dist/chunk-4RD4XK5S.mjs.map +0 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -114,6 +114,8 @@ __export(index_exports, {
|
|
|
114
114
|
buildApplicationShareDescription: () => buildApplicationShareDescription,
|
|
115
115
|
buildFacebookShareQuote: () => buildFacebookShareQuote,
|
|
116
116
|
buildInvitationShareDescription: () => buildInvitationShareDescription,
|
|
117
|
+
buildPublicEventShareDescription: () => buildPublicEventShareDescription,
|
|
118
|
+
buildPublicVendorShareDescription: () => buildPublicVendorShareDescription,
|
|
117
119
|
buildShareMessageSections: () => buildShareMessageSections,
|
|
118
120
|
buildShareOgDescription: () => buildShareOgDescription,
|
|
119
121
|
buildShareOgDescriptionFromSections: () => buildShareOgDescriptionFromSections,
|
|
@@ -8895,7 +8897,7 @@ var SHARE_DOLLAR_ICON = "$";
|
|
|
8895
8897
|
var SHARE_PRICE_RANGE_PREFIX = `${SHARE_DOLLAR_ICON} Price range:`;
|
|
8896
8898
|
var SHARE_CLOCK_ICON = "\u23F0";
|
|
8897
8899
|
var SHARE_APPLICATION_DEADLINE_PREFIX = `${SHARE_CLOCK_ICON} Application deadline:`;
|
|
8898
|
-
var SHARE_MORE_INFO_LINE = "
|
|
8900
|
+
var SHARE_MORE_INFO_LINE = "Shared from ClueMart";
|
|
8899
8901
|
var DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;
|
|
8900
8902
|
var RESOURCE_SHARE_TYPES = [
|
|
8901
8903
|
"market",
|
|
@@ -8943,13 +8945,13 @@ function joinShareDescriptionSections(sections) {
|
|
|
8943
8945
|
}
|
|
8944
8946
|
function appendShareMoreInfoLine(description) {
|
|
8945
8947
|
const trimmed = description.trim();
|
|
8946
|
-
if (trimmed.
|
|
8948
|
+
if (trimmed.startsWith(SHARE_MORE_INFO_LINE)) {
|
|
8947
8949
|
return trimmed;
|
|
8948
8950
|
}
|
|
8949
8951
|
if (trimmed.length === 0) {
|
|
8950
8952
|
return SHARE_MORE_INFO_LINE;
|
|
8951
8953
|
}
|
|
8952
|
-
return joinShareDescriptionSections([
|
|
8954
|
+
return joinShareDescriptionSections([SHARE_MORE_INFO_LINE, trimmed]);
|
|
8953
8955
|
}
|
|
8954
8956
|
|
|
8955
8957
|
// src/sharing/buildRelationShareDescription.ts
|
|
@@ -9048,6 +9050,21 @@ function buildApplicationShareDescription(vendor, vendorInfo) {
|
|
|
9048
9050
|
return joinShareDescriptionSections(sections);
|
|
9049
9051
|
}
|
|
9050
9052
|
|
|
9053
|
+
// src/sharing/buildPublicShareDescription.ts
|
|
9054
|
+
function buildPublicEventShareDescription(event) {
|
|
9055
|
+
return joinShareDescriptionSections([
|
|
9056
|
+
formatShareRainOrShineLine(event.rainOrShine),
|
|
9057
|
+
formatShareTagsSection(event.tags),
|
|
9058
|
+
event.description?.trim()
|
|
9059
|
+
]);
|
|
9060
|
+
}
|
|
9061
|
+
function buildPublicVendorShareDescription(vendor) {
|
|
9062
|
+
return joinShareDescriptionSections([
|
|
9063
|
+
formatShareIsFoodTrueLine(vendor.foodTruck),
|
|
9064
|
+
vendor.description?.trim()
|
|
9065
|
+
]);
|
|
9066
|
+
}
|
|
9067
|
+
|
|
9051
9068
|
// src/sharing/buildShareUrl.ts
|
|
9052
9069
|
var PUBLIC_SHARE_PATH_TYPES = [
|
|
9053
9070
|
...RESOURCE_SHARE_TYPES,
|
|
@@ -9058,8 +9075,8 @@ var SHARE_TYPE_PATH_REGEX = [
|
|
|
9058
9075
|
RELATION_SHARE_APPLICATION,
|
|
9059
9076
|
RELATION_SHARE_INVITATION
|
|
9060
9077
|
].join("|");
|
|
9061
|
-
function buildShareUrl(type, id) {
|
|
9062
|
-
return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}`;
|
|
9078
|
+
function buildShareUrl(type, id, utmMedium = "app") {
|
|
9079
|
+
return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
|
|
9063
9080
|
}
|
|
9064
9081
|
|
|
9065
9082
|
// src/sharing/normalizeShareDescription.ts
|
|
@@ -9077,12 +9094,12 @@ function normalizeShareText(value) {
|
|
|
9077
9094
|
}).join("\n").replace(/\n{3,}/g, "\n\n");
|
|
9078
9095
|
}
|
|
9079
9096
|
function shareMessageFooterPlacementForType(_shareType) {
|
|
9080
|
-
return "
|
|
9097
|
+
return "before-body";
|
|
9081
9098
|
}
|
|
9082
9099
|
function buildShareMessageSections(input) {
|
|
9083
9100
|
const title = normalizeShareText(input.title);
|
|
9084
9101
|
const description = normalizeShareText(input.description);
|
|
9085
|
-
return [title, description
|
|
9102
|
+
return [SHARE_MORE_INFO_LINE, title, description].filter(
|
|
9086
9103
|
(section) => section.length > 0
|
|
9087
9104
|
);
|
|
9088
9105
|
}
|
|
@@ -9302,6 +9319,8 @@ var gameTypeToDisplayName = {
|
|
|
9302
9319
|
buildApplicationShareDescription,
|
|
9303
9320
|
buildFacebookShareQuote,
|
|
9304
9321
|
buildInvitationShareDescription,
|
|
9322
|
+
buildPublicEventShareDescription,
|
|
9323
|
+
buildPublicVendorShareDescription,
|
|
9305
9324
|
buildShareMessageSections,
|
|
9306
9325
|
buildShareOgDescription,
|
|
9307
9326
|
buildShareOgDescriptionFromSections,
|