@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.
@@ -1,7 +1,7 @@
1
1
  import "../chunk-IMQU3E2F.mjs";
2
2
  import "../chunk-TIXEG66V.mjs";
3
3
  import "../chunk-NPFJ2CN2.mjs";
4
- import "../chunk-W2VBRPCV.mjs";
4
+ import "../chunk-DQVXL6TO.mjs";
5
5
  import {
6
6
  SCHOOL_MIN_STUDENT_COUNT,
7
7
  dateFormat,
package/dist/index.cjs CHANGED
@@ -7265,7 +7265,7 @@ var otherImages = Object.fromEntries(
7265
7265
  // src/sharing/relationShareTypes.ts
7266
7266
  var RELATION_SHARE_INVITATION = "invitation";
7267
7267
  var RELATION_SHARE_APPLICATION = "application";
7268
- var RELATION_OVERLAY_LAYOUT_VERSION = 34;
7268
+ var RELATION_OVERLAY_LAYOUT_VERSION = 35;
7269
7269
  var RELATION_SHARE_RESOURCE_TYPES = [
7270
7270
  RELATION_SHARE_INVITATION,
7271
7271
  RELATION_SHARE_APPLICATION
@@ -7482,21 +7482,19 @@ var SHARE_TYPE_PATH_REGEX = [
7482
7482
  RELATION_SHARE_INVITATION
7483
7483
  ].join("|");
7484
7484
  function buildShareUrl(type, id, utmMedium = "app") {
7485
- return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
7485
+ return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
7486
7486
  }
7487
7487
 
7488
7488
  // src/sharing/normalizeShareDescription.ts
7489
+ var LEADING_WHITESPACE = /^[ \t]*/;
7489
7490
  function normalizeShareText(value) {
7490
7491
  if (value == null) {
7491
7492
  return "";
7492
7493
  }
7493
7494
  return value.trim().split("\n").map((line) => {
7494
- const match = line.match(/^([ \t]*)(.*)$/);
7495
- if (!match) {
7496
- return line;
7497
- }
7498
- const [, leading, rest] = match;
7499
- return leading + rest.trim().replace(/[ \t]{2,}/g, " ");
7495
+ const leading = LEADING_WHITESPACE.exec(line)?.[0] ?? "";
7496
+ const rest = line.slice(leading.length).trim().replace(/[ \t]{2,}/g, " ");
7497
+ return leading + rest;
7500
7498
  }).join("\n").replace(/\n{3,}/g, "\n\n");
7501
7499
  }
7502
7500
  function shareMessageFooterPlacementForType(_shareType) {
@@ -7526,7 +7524,7 @@ function normalizeShareOgDescription(value) {
7526
7524
  return joinShareOgDescriptionSections(splitShareDescriptionSections(value));
7527
7525
  }
7528
7526
  function buildFacebookShareQuote(title, description, shareType) {
7529
- const sections = buildShareMessageSections({ title, description, shareType });
7527
+ const sections = buildShareMessageSections({ description, shareType, title });
7530
7528
  const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();
7531
7529
  return quote.length > 0 ? quote : void 0;
7532
7530
  }
@@ -7548,7 +7546,7 @@ function normalizeShareRouteId(id) {
7548
7546
  }
7549
7547
  }
7550
7548
  function buildSharePagePath(resourceType, rawId) {
7551
- return `/share/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;
7549
+ return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;
7552
7550
  }
7553
7551
 
7554
7552
  // src/storage/index.ts