@timardex/cluemart-shared 1.5.607 → 1.5.609

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.
@@ -174,19 +174,13 @@ function normalizeShareText(value) {
174
174
  return leading + rest.trim().replace(/[ \t]{2,}/g, " ");
175
175
  }).join("\n").replace(/\n{3,}/g, "\n\n");
176
176
  }
177
- function shareMessageFooterPlacementForType(shareType) {
178
- return isPostShareResourceType(shareType) ? "after-body" : "before-body";
177
+ function shareMessageFooterPlacementForType(_shareType) {
178
+ return "after-body";
179
179
  }
180
180
  function buildShareMessageSections(input) {
181
181
  const title = normalizeShareText(input.title);
182
182
  const description = normalizeShareText(input.description);
183
- const placement = input.shareType ? shareMessageFooterPlacementForType(input.shareType) : "before-body";
184
- if (placement === "after-body") {
185
- return [title, description, SHARE_MORE_INFO_LINE].filter(
186
- (section) => section.length > 0
187
- );
188
- }
189
- return [title, SHARE_MORE_INFO_LINE, description].filter(
183
+ return [title, description, SHARE_MORE_INFO_LINE].filter(
190
184
  (section) => section.length > 0
191
185
  );
192
186
  }
@@ -258,6 +252,7 @@ export {
258
252
  appendShareMoreInfoLine,
259
253
  formatShareMarketDate,
260
254
  formatStallCapacityLabel,
255
+ formatShareStallLine,
261
256
  formatShareInvitationMarketDatesSection,
262
257
  formatShareInvitationRequirementsSection,
263
258
  formatShareApplicationCategoriesSection,
@@ -277,4 +272,4 @@ export {
277
272
  normalizeShareRouteId,
278
273
  buildSharePagePath
279
274
  };
280
- //# sourceMappingURL=chunk-EPWJ2WJR.mjs.map
275
+ //# sourceMappingURL=chunk-LDO3XJ74.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sharing/relationShareTypes.ts","../src/sharing/constants.ts","../src/sharing/formatCategoryLabel.ts","../src/sharing/joinShareDescriptionSections.ts","../src/sharing/buildRelationShareDescription.ts","../src/sharing/buildShareUrl.ts","../src/sharing/normalizeShareDescription.ts","../src/sharing/normalizeShareRouteId.ts"],"sourcesContent":["/** Path segments for relation share URLs — must match mobile `RelationTitle` values. */\nexport const RELATION_SHARE_INVITATION = \"invitation\" as const;\nexport const RELATION_SHARE_APPLICATION = \"application\" as const;\n\nexport const RELATION_SHARE_RESOURCE_TYPES = [\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_APPLICATION,\n] as const;\n\nexport type RelationShareResourceType =\n (typeof RELATION_SHARE_RESOURCE_TYPES)[number];\n\nexport function isRelationShareResourceType(\n resourceType: string,\n): resourceType is RelationShareResourceType {\n return (RELATION_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_RESOURCE_TYPES,\n isRelationShareResourceType,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport const SHARE_SITE_URL = \"https://cluemart.co.nz\";\n\n/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */\nexport const SHARE_CALENDAR_ICON = \"\\u{1F4C5}\";\n\nexport const SHARE_MARKET_DATES_SECTION_HEADING = `${SHARE_CALENDAR_ICON} Market dates:`;\n\n/** Check mark for invitation requirements share copy (U+2705 ✅). */\nexport const SHARE_CHECKMARK_ICON = \"\\u{2705}\";\n\nexport const SHARE_REQUIREMENTS_SECTION_HEADING = `${SHARE_CHECKMARK_ICON} Requirements:`;\n\n/** Label tag for application categories share copy (U+1F3F7 🏷️). */\nexport const SHARE_CATEGORY_ICON = \"\\u{1F3F7}\\u{FE0F}\";\n\nexport const SHARE_CATEGORIES_SECTION_HEADING = `${SHARE_CATEGORY_ICON} Categories:`;\n\n/** Footer on share sheet messages, Facebook SDK quote, and `og:description`. */\nexport const SHARE_MORE_INFO_LINE = \"More info in the ClueMart app\";\n\nexport const DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;\n\nexport const RESOURCE_SHARE_TYPES = [\n \"market\",\n \"stallholder\",\n \"partner\",\n] as const;\n\nexport type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];\n\nexport const POST_SHARE_RESOURCE_TYPES = [\n \"daily_meets\",\n \"daily_tips\",\n \"daily_games\",\n] as const;\n\nexport type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];\n\nexport type ShareResourceType =\n | ResourceShareType\n | PostShareResourceType\n | RelationShareResourceType;\n\nexport const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string> = {\n [RELATION_SHARE_APPLICATION]: \"Application\",\n [RELATION_SHARE_INVITATION]: \"Invitation\",\n daily_games: \"Daily Game\",\n daily_meets: \"Daily Meet\",\n daily_tips: \"Daily Tip\",\n market: \"Market\",\n partner: \"Partner\",\n stallholder: \"Stallholder\",\n};\n\nexport function isPostShareResourceType(\n resourceType: ShareResourceType,\n): resourceType is PostShareResourceType {\n return (POST_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import type { ShareVendorCategory } from \"./shareRelationTypes\";\n\nexport function formatCategoryLabel(category: ShareVendorCategory): string {\n const subcategoryNames = category.subcategories\n .map((subcategory) => subcategory.name)\n .filter(Boolean);\n\n if (subcategoryNames.length === 0) {\n return category.name;\n }\n\n return `${category.name} (${subcategoryNames.join(\", \")})`;\n}\n","import { SHARE_MORE_INFO_LINE } from \"./constants\";\n\n/** Blank line between share sections — title, address, dates, URL, etc. */\nexport const SHARE_DESCRIPTION_SECTION_BREAK = \"\\n\\n\";\n\n/**\n * Line break for `og:description` meta content. Use instead of `\\n` — Next.js\n * HTML serialisation collapses literal newlines to spaces; Facebook reads `&#10;`.\n */\nexport const OG_DESCRIPTION_LINE_BREAK = \"&#10;\";\n\n/** Joins OG description sections for Facebook link cards (and Twitter). */\nexport function joinShareOgDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .map((section) => (typeof section === \"string\" ? section.trim() : \"\"))\n .filter((section): section is string => section.length > 0)\n .map((section) => section.replace(/\\n/g, OG_DESCRIPTION_LINE_BREAK))\n .join(OG_DESCRIPTION_LINE_BREAK);\n}\n\nexport function joinShareDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .filter((section): section is string => Boolean(section))\n .join(SHARE_DESCRIPTION_SECTION_BREAK);\n}\n\n/** Appends the standard share footer when assembling sheet / SDK quote text. */\nexport function appendShareMoreInfoLine(description: string): string {\n const trimmed = description.trim();\n if (trimmed.endsWith(SHARE_MORE_INFO_LINE)) {\n return trimmed;\n }\n if (trimmed.length === 0) {\n return SHARE_MORE_INFO_LINE;\n }\n return joinShareDescriptionSections([trimmed, SHARE_MORE_INFO_LINE]);\n}\n","import { formatDate } from \"../utils/date\";\n\nimport {\n SHARE_CATEGORIES_SECTION_HEADING,\n SHARE_MARKET_DATES_SECTION_HEADING,\n SHARE_REQUIREMENTS_SECTION_HEADING,\n} from \"./constants\";\nimport { formatCategoryLabel } from \"./formatCategoryLabel\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\nimport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareStallType,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\nexport type {\n ShareEventDateTime,\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareStallType,\n ShareVendorCategory,\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: ShareStallType): 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\n/** Bulleted requirements list for invitation share copy. */\nexport function formatShareInvitationRequirementsSection(\n requirementLabels: string[],\n): string {\n const bullets = requirementLabels.map((label) => `- ${label}`);\n return `${SHARE_REQUIREMENTS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Bulleted categories list for application share copy. */\nexport function formatShareApplicationCategoriesSection(\n categoryLabels: string[],\n): string {\n const bullets = categoryLabels.map((label) => `- ${label}`);\n return `${SHARE_CATEGORIES_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\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 requirementLabels = (eventInfo.requirements ?? [])\n .filter((item) => item.value)\n .map((item) => item.label);\n\n const sections = [\n event.location.fullAddress,\n formatShareInvitationMarketDatesSection(eventInfo.dateTime),\n `Application deadline: vendors must apply at least ${eventInfo.applicationDeadlineHours} hours before each market date.`,\n requirementLabels.length > 0 &&\n formatShareInvitationRequirementsSection(requirementLabels),\n ];\n\n return joinShareDescriptionSections(sections);\n}\n\nexport function buildApplicationShareDescription(\n vendor: ShareVendorForApplication,\n vendorInfo: ShareVendorInfoForApplication | null | undefined,\n): string {\n const categoryLabels = vendor.categories.map((category) =>\n formatCategoryLabel(category),\n );\n\n if (!vendorInfo) {\n return vendor.description?.trim() || \"\";\n }\n\n const compliance = vendorInfo.compliance;\n const complianceLabels = [\n compliance?.liabilityInsurance && \"Liability insurance\",\n compliance?.foodBeverageLicense && \"Food & beverage licence\",\n ].filter(Boolean);\n\n const profileDescription = vendor.description?.trim();\n\n const sections = [\n categoryLabels.length > 0 &&\n formatShareApplicationCategoriesSection(categoryLabels),\n `Stall size: ${vendorInfo.stallInfo.size.width}m × ${vendorInfo.stallInfo.size.depth}m`,\n complianceLabels.length > 0 && `Compliance: ${complianceLabels.join(\", \")}`,\n `Price range: $${vendorInfo.product.priceRange.min} – $${vendorInfo.product.priceRange.max}`,\n profileDescription,\n ];\n\n return joinShareDescriptionSections(sections);\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(type: ShareType, id: string): string {\n return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}`;\n}\n","import { SHARE_MORE_INFO_LINE, type ShareResourceType } from \"./constants\";\nimport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n} from \"./joinShareDescriptionSections\";\n\nexport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n};\n\n/** Trims share text and collapses spaces per line; preserves `\\n\\n` section breaks. */\nexport function normalizeShareText(value: string | null | undefined): string {\n if (value == null) {\n return \"\";\n }\n return value\n .trim()\n .split(\"\\n\")\n .map((line) => {\n const match = line.match(/^([ \\t]*)(.*)$/);\n if (!match) {\n return line;\n }\n const [, leading, rest] = match;\n return leading + rest.trim().replace(/[ \\t]{2,}/g, \" \");\n })\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/** Share-sheet footer always follows title and body/caption. */\nexport type ShareMessageFooterPlacement = \"after-body\";\n\nexport function shareMessageFooterPlacementForType(\n _shareType?: ShareResourceType,\n): ShareMessageFooterPlacement {\n return \"after-body\";\n}\n\n/**\n * Ordered sections for share-sheet / Facebook SDK quote text:\n * title → description (full body or post caption) → {@link SHARE_MORE_INFO_LINE}.\n */\nexport function buildShareMessageSections(input: {\n title?: string | null;\n description?: string | null;\n shareType?: ShareResourceType;\n}): string[] {\n const title = normalizeShareText(input.title);\n const description = normalizeShareText(input.description);\n\n return [title, description, SHARE_MORE_INFO_LINE].filter(\n (section) => section.length > 0,\n );\n}\n\nexport function splitShareDescriptionSections(value: string): string[] {\n const trimmed = normalizeShareText(value);\n if (!trimmed) {\n return [];\n }\n\n if (/\\n\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n if (/\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n return [trimmed];\n}\n\n/**\n * Formats share descriptions for Open Graph / Twitter meta tags.\n * Sections are joined with {@link OG_DESCRIPTION_LINE_BREAK} (`&#10;`).\n */\nexport function normalizeShareOgDescription(value: string): string {\n return joinShareOgDescriptionSections(splitShareDescriptionSections(value));\n}\n\n/**\n * Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).\n *\n * Title + blank lines + body sections. URL is omitted — `contentUrl` supplies\n * the link card (OG on `/share/*` controls card title/image).\n */\nexport function buildFacebookShareQuote(\n title: string,\n description: string,\n shareType?: ShareResourceType,\n): string | undefined {\n const sections = buildShareMessageSections({ title, description, shareType });\n const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();\n return quote.length > 0 ? quote : undefined;\n}\n\n/**\n * Open Graph / Twitter description from pre-built section strings.\n * Prefer {@link joinShareOgDescriptionSections} when sections are already known.\n */\nexport function buildShareOgDescriptionFromSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return joinShareOgDescriptionSections(sections);\n}\n\n/** Open Graph / Twitter description — body sections only (`og:title` is separate). */\nexport function buildShareOgDescription(\n _title: string,\n description: string,\n): string {\n return joinShareOgDescriptionSections(\n splitShareDescriptionSections(description),\n );\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\nexport function buildSharePagePath(\n resourceType: ShareResourceType,\n rawId: string,\n): string {\n return `/share/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;\n}\n"],"mappings":";;;;;AACO,IAAM,4BAA4B;AAClC,IAAM,6BAA6B;AAEnC,IAAM,gCAAgC;AAAA,EAC3C;AAAA,EACA;AACF;AAKO,SAAS,4BACd,cAC2C;AAC3C,SAAQ,8BAAoD;AAAA,IAC1D;AAAA,EACF;AACF;;;ACJO,IAAM,iBAAiB;AAGvB,IAAM,sBAAsB;AAE5B,IAAM,qCAAqC,GAAG,mBAAmB;AAGjE,IAAM,uBAAuB;AAE7B,IAAM,qCAAqC,GAAG,oBAAoB;AAGlE,IAAM,sBAAsB;AAE5B,IAAM,mCAAmC,GAAG,mBAAmB;AAG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AQ,SAAS,KAAK,+BAA+B,EAAE,KAAK;AAClE,SAAO,MAAM,SAAS,IAAI,QAAQ;AACpC;AAMO,SAAS,oCACd,UACQ;AACR,SAAO,+BAA+B,QAAQ;AAChD;AAGO,SAAS,wBACd,QACA,aACQ;AACR,SAAO;AAAA,IACL,8BAA8B,WAAW;AAAA,EAC3C;AACF;;;AC1HO,SAAS,sBAAsB,IAAoB;AACxD,MAAI;AACF,WAAO,mBAAmB,EAAE;AAAA,EAC9B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,mBACd,cACA,OACQ;AACR,SAAO,UAAU,YAAY,IAAI,mBAAmB,sBAAsB,KAAK,CAAC,CAAC;AACnF;","names":[]}
@@ -26,7 +26,7 @@ import {
26
26
  EnumVendorType
27
27
  } from "../chunk-ZR4TGWTS.mjs";
28
28
  import "../chunk-S2VBOUOO.mjs";
29
- import "../chunk-EPWJ2WJR.mjs";
29
+ import "../chunk-LDO3XJ74.mjs";
30
30
  import {
31
31
  dateFormat,
32
32
  timeFormat
package/dist/index.cjs CHANGED
@@ -140,6 +140,7 @@ __export(index_exports, {
140
140
  formatShareInvitationMarketDatesSection: () => formatShareInvitationMarketDatesSection,
141
141
  formatShareInvitationRequirementsSection: () => formatShareInvitationRequirementsSection,
142
142
  formatShareMarketDate: () => formatShareMarketDate,
143
+ formatShareStallLine: () => formatShareStallLine,
143
144
  formatStallCapacityLabel: () => formatStallCapacityLabel,
144
145
  formatTimestamp: () => formatTimestamp,
145
146
  gameScreenIdentifierList: () => gameScreenIdentifierList,
@@ -9016,19 +9017,13 @@ function normalizeShareText(value) {
9016
9017
  return leading + rest.trim().replace(/[ \t]{2,}/g, " ");
9017
9018
  }).join("\n").replace(/\n{3,}/g, "\n\n");
9018
9019
  }
9019
- function shareMessageFooterPlacementForType(shareType) {
9020
- return isPostShareResourceType(shareType) ? "after-body" : "before-body";
9020
+ function shareMessageFooterPlacementForType(_shareType) {
9021
+ return "after-body";
9021
9022
  }
9022
9023
  function buildShareMessageSections(input) {
9023
9024
  const title = normalizeShareText(input.title);
9024
9025
  const description = normalizeShareText(input.description);
9025
- const placement = input.shareType ? shareMessageFooterPlacementForType(input.shareType) : "before-body";
9026
- if (placement === "after-body") {
9027
- return [title, description, SHARE_MORE_INFO_LINE].filter(
9028
- (section) => section.length > 0
9029
- );
9030
- }
9031
- return [title, SHARE_MORE_INFO_LINE, description].filter(
9026
+ return [title, description, SHARE_MORE_INFO_LINE].filter(
9032
9027
  (section) => section.length > 0
9033
9028
  );
9034
9029
  }
@@ -9274,6 +9269,7 @@ var gameTypeToDisplayName = {
9274
9269
  formatShareInvitationMarketDatesSection,
9275
9270
  formatShareInvitationRequirementsSection,
9276
9271
  formatShareMarketDate,
9272
+ formatShareStallLine,
9277
9273
  formatStallCapacityLabel,
9278
9274
  formatTimestamp,
9279
9275
  gameScreenIdentifierList,