@singi-labs/sifa-sdk 0.19.24 → 0.19.26

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/index.cjs CHANGED
@@ -2520,6 +2520,11 @@ function normalizeCompanyKey(name) {
2520
2520
  }
2521
2521
 
2522
2522
  // src/format/format-time.ts
2523
+ function formatIsoTitle(dateString) {
2524
+ const date = new Date(dateString);
2525
+ if (isNaN(date.getTime())) return "";
2526
+ return date.toISOString();
2527
+ }
2523
2528
  function formatRelativeTime(dateString) {
2524
2529
  const date = new Date(dateString);
2525
2530
  if (isNaN(date.getTime())) return "";
@@ -3147,6 +3152,7 @@ function truncateGraphemes(value, maxLen) {
3147
3152
  }
3148
3153
 
3149
3154
  // src/format/format-display-url.ts
3155
+ var SAFE_NON_WEB_SCHEMES = /* @__PURE__ */ new Set(["mailto:", "tel:", "dns:"]);
3150
3156
  function tryParseUrl(raw) {
3151
3157
  try {
3152
3158
  return new URL(raw);
@@ -3170,7 +3176,8 @@ function formatDisplayUrl(url, options = {}) {
3170
3176
  }
3171
3177
  if (parsed3.protocol !== "http:" && parsed3.protocol !== "https:") {
3172
3178
  const display = raw.replace(/^[a-z][a-z0-9+.-]*:/i, "").replace(/^\/\//, "") || raw;
3173
- return { display, href: raw };
3179
+ const href = SAFE_NON_WEB_SCHEMES.has(parsed3.protocol) ? raw : "";
3180
+ return { display, href };
3174
3181
  }
3175
3182
  const host = parsed3.hostname.replace(/^www\./i, "");
3176
3183
  const segments = parsed3.pathname.split("/").filter(Boolean);
@@ -6637,7 +6644,7 @@ function describeSifaRecord(collection, value) {
6637
6644
  }
6638
6645
 
6639
6646
  // src/index.ts
6640
- var SIFA_SDK_VERSION = "0.19.24";
6647
+ var SIFA_SDK_VERSION = "0.19.26";
6641
6648
 
6642
6649
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6643
6650
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6787,6 +6794,7 @@ exports.formatDateRange = formatDateRange;
6787
6794
  exports.formatDisplayUrl = formatDisplayUrl;
6788
6795
  exports.formatDistanceToNow = formatDistanceToNow;
6789
6796
  exports.formatEventDate = formatEventDate;
6797
+ exports.formatIsoTitle = formatIsoTitle;
6790
6798
  exports.formatLocation = formatLocation;
6791
6799
  exports.formatPresentationDuration = formatPresentationDuration;
6792
6800
  exports.formatRelationship = formatRelationship;