@timardex/cluemart-shared 1.5.601 → 1.5.603
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-Y6OS3HDB.mjs → chunk-XSJXK4NT.mjs} +19 -4
- package/dist/chunk-XSJXK4NT.mjs.map +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +18 -3
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +20 -3
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +5 -1
- package/dist/sharing/index.d.ts +5 -1
- package/dist/sharing/index.mjs +5 -1
- package/package.json +1 -1
- package/dist/chunk-Y6OS3HDB.mjs.map +0 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -88,11 +88,13 @@ __export(index_exports, {
|
|
|
88
88
|
SHARE_DESCRIPTION_SECTION_BREAK: () => SHARE_DESCRIPTION_SECTION_BREAK,
|
|
89
89
|
SHARE_DESCRIPTION_SECTION_SEPARATOR: () => SHARE_DESCRIPTION_SECTION_SEPARATOR,
|
|
90
90
|
SHARE_MARKET_DATES_SECTION_HEADING: () => SHARE_MARKET_DATES_SECTION_HEADING,
|
|
91
|
+
SHARE_MORE_INFO_LINE: () => SHARE_MORE_INFO_LINE,
|
|
91
92
|
SHARE_REQUIREMENTS_SECTION_HEADING: () => SHARE_REQUIREMENTS_SECTION_HEADING,
|
|
92
93
|
SHARE_RESOURCE_LABEL: () => SHARE_RESOURCE_LABEL,
|
|
93
94
|
SHARE_SITE_URL: () => SHARE_SITE_URL,
|
|
94
95
|
SHARE_TYPE_PATH_REGEX: () => SHARE_TYPE_PATH_REGEX,
|
|
95
96
|
USER_STORAGE_KEY: () => USER_STORAGE_KEY,
|
|
97
|
+
appendShareMoreInfoLine: () => appendShareMoreInfoLine,
|
|
96
98
|
availableCategories: () => availableCategories,
|
|
97
99
|
availableRegionOptions: () => availableRegionOptions,
|
|
98
100
|
availableRegionTypes: () => availableRegionTypes,
|
|
@@ -8864,6 +8866,7 @@ var SHARE_CHECKMARK_ICON = "\u2705";
|
|
|
8864
8866
|
var SHARE_REQUIREMENTS_SECTION_HEADING = `${SHARE_CHECKMARK_ICON} Requirements:`;
|
|
8865
8867
|
var SHARE_CATEGORY_ICON = "\u{1F3F7}\uFE0F";
|
|
8866
8868
|
var SHARE_CATEGORIES_SECTION_HEADING = `${SHARE_CATEGORY_ICON} Categories:`;
|
|
8869
|
+
var SHARE_MORE_INFO_LINE = "More info in the ClueMart app";
|
|
8867
8870
|
var DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;
|
|
8868
8871
|
var RESOURCE_SHARE_TYPES = [
|
|
8869
8872
|
"market",
|
|
@@ -8905,11 +8908,21 @@ var SHARE_DESCRIPTION_SECTION_SEPARATOR = " \xB7 ";
|
|
|
8905
8908
|
var SHARE_DESCRIPTION_SECTION_BREAK = "\n\n";
|
|
8906
8909
|
var OG_DESCRIPTION_LINE_BREAK = " ";
|
|
8907
8910
|
function joinShareOgDescriptionSections(sections) {
|
|
8908
|
-
return sections.map((section) => typeof section === "string" ? section.trim() : "").filter((section) => section.length > 0).join(OG_DESCRIPTION_LINE_BREAK);
|
|
8911
|
+
return sections.map((section) => typeof section === "string" ? section.trim() : "").filter((section) => section.length > 0).map((section) => section.replace(/\n/g, OG_DESCRIPTION_LINE_BREAK)).join(OG_DESCRIPTION_LINE_BREAK);
|
|
8909
8912
|
}
|
|
8910
8913
|
function joinShareDescriptionSections(sections) {
|
|
8911
8914
|
return sections.filter((section) => Boolean(section)).join(SHARE_DESCRIPTION_SECTION_BREAK);
|
|
8912
8915
|
}
|
|
8916
|
+
function appendShareMoreInfoLine(description) {
|
|
8917
|
+
const trimmed = description.trim();
|
|
8918
|
+
if (trimmed.endsWith(SHARE_MORE_INFO_LINE)) {
|
|
8919
|
+
return trimmed;
|
|
8920
|
+
}
|
|
8921
|
+
if (trimmed.length === 0) {
|
|
8922
|
+
return SHARE_MORE_INFO_LINE;
|
|
8923
|
+
}
|
|
8924
|
+
return joinShareDescriptionSections([trimmed, SHARE_MORE_INFO_LINE]);
|
|
8925
|
+
}
|
|
8913
8926
|
|
|
8914
8927
|
// src/sharing/buildRelationShareDescription.ts
|
|
8915
8928
|
function formatShareMarketDate(dateStr) {
|
|
@@ -9045,7 +9058,7 @@ function normalizeShareOgDescription(value) {
|
|
|
9045
9058
|
function buildFacebookShareQuote(title, description) {
|
|
9046
9059
|
const titleSection = normalizeShareSection(title);
|
|
9047
9060
|
const body = formatShareSectionsForMultilineDisplay(
|
|
9048
|
-
normalizeShareSection(description)
|
|
9061
|
+
appendShareMoreInfoLine(normalizeShareSection(description))
|
|
9049
9062
|
);
|
|
9050
9063
|
const sections = [titleSection, body].filter((section) => section.length > 0);
|
|
9051
9064
|
const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();
|
|
@@ -9055,7 +9068,9 @@ function buildShareOgDescriptionFromSections(sections) {
|
|
|
9055
9068
|
return joinShareOgDescriptionSections(sections);
|
|
9056
9069
|
}
|
|
9057
9070
|
function buildShareOgDescription(_title, description) {
|
|
9058
|
-
return joinShareOgDescriptionSections(
|
|
9071
|
+
return joinShareOgDescriptionSections(
|
|
9072
|
+
splitShareDescriptionSections(description)
|
|
9073
|
+
);
|
|
9059
9074
|
}
|
|
9060
9075
|
|
|
9061
9076
|
// src/sharing/normalizeShareRouteId.ts
|
|
@@ -9218,11 +9233,13 @@ var gameTypeToDisplayName = {
|
|
|
9218
9233
|
SHARE_DESCRIPTION_SECTION_BREAK,
|
|
9219
9234
|
SHARE_DESCRIPTION_SECTION_SEPARATOR,
|
|
9220
9235
|
SHARE_MARKET_DATES_SECTION_HEADING,
|
|
9236
|
+
SHARE_MORE_INFO_LINE,
|
|
9221
9237
|
SHARE_REQUIREMENTS_SECTION_HEADING,
|
|
9222
9238
|
SHARE_RESOURCE_LABEL,
|
|
9223
9239
|
SHARE_SITE_URL,
|
|
9224
9240
|
SHARE_TYPE_PATH_REGEX,
|
|
9225
9241
|
USER_STORAGE_KEY,
|
|
9242
|
+
appendShareMoreInfoLine,
|
|
9226
9243
|
availableCategories,
|
|
9227
9244
|
availableRegionOptions,
|
|
9228
9245
|
availableRegionTypes,
|