@singi-labs/sifa-sdk 0.19.25 → 0.19.27

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
@@ -3152,6 +3152,7 @@ function truncateGraphemes(value, maxLen) {
3152
3152
  }
3153
3153
 
3154
3154
  // src/format/format-display-url.ts
3155
+ var SAFE_NON_WEB_SCHEMES = /* @__PURE__ */ new Set(["mailto:", "tel:", "dns:"]);
3155
3156
  function tryParseUrl(raw) {
3156
3157
  try {
3157
3158
  return new URL(raw);
@@ -3175,7 +3176,8 @@ function formatDisplayUrl(url, options = {}) {
3175
3176
  }
3176
3177
  if (parsed3.protocol !== "http:" && parsed3.protocol !== "https:") {
3177
3178
  const display = raw.replace(/^[a-z][a-z0-9+.-]*:/i, "").replace(/^\/\//, "") || raw;
3178
- return { display, href: raw };
3179
+ const href = SAFE_NON_WEB_SCHEMES.has(parsed3.protocol) ? raw : "";
3180
+ return { display, href };
3179
3181
  }
3180
3182
  const host = parsed3.hostname.replace(/^www\./i, "");
3181
3183
  const segments = parsed3.pathname.split("/").filter(Boolean);
@@ -6642,7 +6644,7 @@ function describeSifaRecord(collection, value) {
6642
6644
  }
6643
6645
 
6644
6646
  // src/index.ts
6645
- var SIFA_SDK_VERSION = "0.19.25";
6647
+ var SIFA_SDK_VERSION = "0.19.27";
6646
6648
 
6647
6649
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6648
6650
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;