@timardex/cluemart-shared 1.5.750 → 1.5.752
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-W2VBRPCV.mjs → chunk-DQVXL6TO.mjs} +9 -11
- package/dist/{chunk-W2VBRPCV.mjs.map → chunk-DQVXL6TO.mjs.map} +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +8 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +8 -10
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +8 -10
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +2 -3
- package/dist/sharing/index.d.ts +2 -3
- package/dist/sharing/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2695,7 +2695,7 @@ declare const RELATION_SHARE_APPLICATION: "application";
|
|
|
2695
2695
|
* invalidate after deploy. Facebook caches preview JPEGs by exact URL — changing
|
|
2696
2696
|
* this value forces crawlers to fetch a fresh image after server deploy.
|
|
2697
2697
|
*/
|
|
2698
|
-
declare const RELATION_OVERLAY_LAYOUT_VERSION =
|
|
2698
|
+
declare const RELATION_OVERLAY_LAYOUT_VERSION = 35;
|
|
2699
2699
|
declare const RELATION_SHARE_RESOURCE_TYPES: readonly ["invitation", "application"];
|
|
2700
2700
|
type RelationShareResourceType = (typeof RELATION_SHARE_RESOURCE_TYPES)[number];
|
|
2701
2701
|
declare function isRelationShareResourceType(resourceType: string): resourceType is RelationShareResourceType;
|
|
@@ -2770,7 +2770,6 @@ declare function joinShareDescriptionSections(sections: ReadonlyArray<string | f
|
|
|
2770
2770
|
/** Prepends the standard share branding line when assembling display text. */
|
|
2771
2771
|
declare function appendShareMoreInfoLine(description: string): string;
|
|
2772
2772
|
|
|
2773
|
-
/** Trims share text and collapses spaces per line; preserves `\n\n` section breaks. */
|
|
2774
2773
|
declare function normalizeShareText(value: string | null | undefined): string;
|
|
2775
2774
|
/** Branding line placement — first so Facebook truncation does not drop it. */
|
|
2776
2775
|
type ShareMessageFooterPlacement = "before-body";
|
|
@@ -2794,7 +2793,7 @@ declare function normalizeShareOgDescription(value: string): string;
|
|
|
2794
2793
|
* Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).
|
|
2795
2794
|
*
|
|
2796
2795
|
* Title + blank lines + body sections. URL is omitted — `contentUrl` supplies
|
|
2797
|
-
* the link card (OG on
|
|
2796
|
+
* the link card (OG on resource landing pages controls card title/image).
|
|
2798
2797
|
*/
|
|
2799
2798
|
declare function buildFacebookShareQuote(title: string, description: string, shareType?: ShareResourceType): string | undefined;
|
|
2800
2799
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2695,7 +2695,7 @@ declare const RELATION_SHARE_APPLICATION: "application";
|
|
|
2695
2695
|
* invalidate after deploy. Facebook caches preview JPEGs by exact URL — changing
|
|
2696
2696
|
* this value forces crawlers to fetch a fresh image after server deploy.
|
|
2697
2697
|
*/
|
|
2698
|
-
declare const RELATION_OVERLAY_LAYOUT_VERSION =
|
|
2698
|
+
declare const RELATION_OVERLAY_LAYOUT_VERSION = 35;
|
|
2699
2699
|
declare const RELATION_SHARE_RESOURCE_TYPES: readonly ["invitation", "application"];
|
|
2700
2700
|
type RelationShareResourceType = (typeof RELATION_SHARE_RESOURCE_TYPES)[number];
|
|
2701
2701
|
declare function isRelationShareResourceType(resourceType: string): resourceType is RelationShareResourceType;
|
|
@@ -2770,7 +2770,6 @@ declare function joinShareDescriptionSections(sections: ReadonlyArray<string | f
|
|
|
2770
2770
|
/** Prepends the standard share branding line when assembling display text. */
|
|
2771
2771
|
declare function appendShareMoreInfoLine(description: string): string;
|
|
2772
2772
|
|
|
2773
|
-
/** Trims share text and collapses spaces per line; preserves `\n\n` section breaks. */
|
|
2774
2773
|
declare function normalizeShareText(value: string | null | undefined): string;
|
|
2775
2774
|
/** Branding line placement — first so Facebook truncation does not drop it. */
|
|
2776
2775
|
type ShareMessageFooterPlacement = "before-body";
|
|
@@ -2794,7 +2793,7 @@ declare function normalizeShareOgDescription(value: string): string;
|
|
|
2794
2793
|
* Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).
|
|
2795
2794
|
*
|
|
2796
2795
|
* Title + blank lines + body sections. URL is omitted — `contentUrl` supplies
|
|
2797
|
-
* the link card (OG on
|
|
2796
|
+
* the link card (OG on resource landing pages controls card title/image).
|
|
2798
2797
|
*/
|
|
2799
2798
|
declare function buildFacebookShareQuote(title: string, description: string, shareType?: ShareResourceType): string | undefined;
|
|
2800
2799
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -6879,7 +6879,7 @@ var otherImages = Object.fromEntries(
|
|
|
6879
6879
|
// src/sharing/relationShareTypes.ts
|
|
6880
6880
|
var RELATION_SHARE_INVITATION = "invitation";
|
|
6881
6881
|
var RELATION_SHARE_APPLICATION = "application";
|
|
6882
|
-
var RELATION_OVERLAY_LAYOUT_VERSION =
|
|
6882
|
+
var RELATION_OVERLAY_LAYOUT_VERSION = 35;
|
|
6883
6883
|
var RELATION_SHARE_RESOURCE_TYPES = [
|
|
6884
6884
|
RELATION_SHARE_INVITATION,
|
|
6885
6885
|
RELATION_SHARE_APPLICATION
|
|
@@ -7096,21 +7096,19 @@ var SHARE_TYPE_PATH_REGEX = [
|
|
|
7096
7096
|
RELATION_SHARE_INVITATION
|
|
7097
7097
|
].join("|");
|
|
7098
7098
|
function buildShareUrl(type, id, utmMedium = "app") {
|
|
7099
|
-
return `${SHARE_SITE_URL}
|
|
7099
|
+
return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
|
|
7100
7100
|
}
|
|
7101
7101
|
|
|
7102
7102
|
// src/sharing/normalizeShareDescription.ts
|
|
7103
|
+
var LEADING_WHITESPACE = /^[ \t]*/;
|
|
7103
7104
|
function normalizeShareText(value) {
|
|
7104
7105
|
if (value == null) {
|
|
7105
7106
|
return "";
|
|
7106
7107
|
}
|
|
7107
7108
|
return value.trim().split("\n").map((line) => {
|
|
7108
|
-
const
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
}
|
|
7112
|
-
const [, leading, rest] = match;
|
|
7113
|
-
return leading + rest.trim().replace(/[ \t]{2,}/g, " ");
|
|
7109
|
+
const leading = LEADING_WHITESPACE.exec(line)?.[0] ?? "";
|
|
7110
|
+
const rest = line.slice(leading.length).trim().replace(/[ \t]{2,}/g, " ");
|
|
7111
|
+
return leading + rest;
|
|
7114
7112
|
}).join("\n").replace(/\n{3,}/g, "\n\n");
|
|
7115
7113
|
}
|
|
7116
7114
|
function shareMessageFooterPlacementForType(_shareType) {
|
|
@@ -7140,7 +7138,7 @@ function normalizeShareOgDescription(value) {
|
|
|
7140
7138
|
return joinShareOgDescriptionSections(splitShareDescriptionSections(value));
|
|
7141
7139
|
}
|
|
7142
7140
|
function buildFacebookShareQuote(title, description, shareType) {
|
|
7143
|
-
const sections = buildShareMessageSections({
|
|
7141
|
+
const sections = buildShareMessageSections({ description, shareType, title });
|
|
7144
7142
|
const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();
|
|
7145
7143
|
return quote.length > 0 ? quote : void 0;
|
|
7146
7144
|
}
|
|
@@ -7162,7 +7160,7 @@ function normalizeShareRouteId(id) {
|
|
|
7162
7160
|
}
|
|
7163
7161
|
}
|
|
7164
7162
|
function buildSharePagePath(resourceType, rawId) {
|
|
7165
|
-
return
|
|
7163
|
+
return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;
|
|
7166
7164
|
}
|
|
7167
7165
|
|
|
7168
7166
|
// src/storage/index.ts
|