@singi-labs/sifa-sdk 0.19.11 → 0.19.13
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 +51 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2108,6 +2108,28 @@ function getActivityTaxonomyVersion() {
|
|
|
2108
2108
|
return { version: ACTIVITY_TIERS.version, updated: ACTIVITY_TIERS.updated };
|
|
2109
2109
|
}
|
|
2110
2110
|
|
|
2111
|
+
// src/taxonomy/relational.ts
|
|
2112
|
+
var RELATIONAL_SEGMENTS = /* @__PURE__ */ new Set([
|
|
2113
|
+
"comment",
|
|
2114
|
+
"reply",
|
|
2115
|
+
"like",
|
|
2116
|
+
"repost",
|
|
2117
|
+
"follow",
|
|
2118
|
+
"connection",
|
|
2119
|
+
"rsvp",
|
|
2120
|
+
"endorse",
|
|
2121
|
+
"endorsement",
|
|
2122
|
+
"bookmark",
|
|
2123
|
+
"member",
|
|
2124
|
+
"membership",
|
|
2125
|
+
"vouch"
|
|
2126
|
+
]);
|
|
2127
|
+
function isRelationalActivity(nsid) {
|
|
2128
|
+
if (!nsid || !nsid.includes(".")) return false;
|
|
2129
|
+
const segment = nsid.slice(nsid.lastIndexOf(".") + 1);
|
|
2130
|
+
return RELATIONAL_SEGMENTS.has(segment);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2111
2133
|
// src/taxonomy/presentation-role.ts
|
|
2112
2134
|
var PRESENTATION_ROLE_OPTIONS = [
|
|
2113
2135
|
{ value: "id.sifa.defs#presenter", label: "Presenter" },
|
|
@@ -5074,6 +5096,31 @@ function toStreamCardVMs(items, options = {}) {
|
|
|
5074
5096
|
return out;
|
|
5075
5097
|
}
|
|
5076
5098
|
|
|
5099
|
+
// src/stream/two-tier.ts
|
|
5100
|
+
function collectionOf(uri) {
|
|
5101
|
+
return uri.split("/")[3] ?? "";
|
|
5102
|
+
}
|
|
5103
|
+
var RICH_BODY_KINDS = /* @__PURE__ */ new Set([
|
|
5104
|
+
"github-pr",
|
|
5105
|
+
"book",
|
|
5106
|
+
"media-review",
|
|
5107
|
+
"media",
|
|
5108
|
+
"track"
|
|
5109
|
+
]);
|
|
5110
|
+
function isRich(vm) {
|
|
5111
|
+
if (vm.media && vm.media.length > 0) return true;
|
|
5112
|
+
if (vm.externalLink) return true;
|
|
5113
|
+
if (vm.body && RICH_BODY_KINDS.has(vm.body.kind)) return true;
|
|
5114
|
+
return false;
|
|
5115
|
+
}
|
|
5116
|
+
function isSelfAuthoredRich(vm) {
|
|
5117
|
+
if (isRelationalActivity(collectionOf(vm.uri))) return false;
|
|
5118
|
+
return vm.tier === "creation" && isRich(vm);
|
|
5119
|
+
}
|
|
5120
|
+
function renderAsLine(vm) {
|
|
5121
|
+
return !isSelfAuthoredRich(vm);
|
|
5122
|
+
}
|
|
5123
|
+
|
|
5077
5124
|
// src/logic/profile-completeness.ts
|
|
5078
5125
|
var COMPLETENESS_MAX_SCORE = 6;
|
|
5079
5126
|
function completenessScore(c) {
|
|
@@ -6478,7 +6525,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6478
6525
|
}
|
|
6479
6526
|
|
|
6480
6527
|
// src/index.ts
|
|
6481
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6528
|
+
var SIFA_SDK_VERSION = "0.19.13";
|
|
6482
6529
|
|
|
6483
6530
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6484
6531
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -6686,8 +6733,10 @@ exports.isLinked = isLinked;
|
|
|
6686
6733
|
exports.isOnBehalfOfApplicable = isOnBehalfOfApplicable;
|
|
6687
6734
|
exports.isPseudoEmployer = isPseudoEmployer;
|
|
6688
6735
|
exports.isRegistrableDomainHandle = isRegistrableDomainHandle;
|
|
6736
|
+
exports.isRelationalActivity = isRelationalActivity;
|
|
6689
6737
|
exports.isRoleLineRedundant = isRoleLineRedundant;
|
|
6690
6738
|
exports.isSectionPopulated = isSectionPopulated;
|
|
6739
|
+
exports.isSelfAuthoredRich = isSelfAuthoredRich;
|
|
6691
6740
|
exports.isValidRgbColor = isValidRgbColor;
|
|
6692
6741
|
exports.isVisibleActivityItem = isVisibleActivityItem;
|
|
6693
6742
|
exports.languageTagSchema = languageTagSchema;
|
|
@@ -6724,6 +6773,7 @@ exports.primaryVerification = primaryVerification;
|
|
|
6724
6773
|
exports.profileToDimensionInputs = profileToDimensionInputs;
|
|
6725
6774
|
exports.qualifiesAsOrg = qualifiesAsOrg;
|
|
6726
6775
|
exports.relativeLuminance = relativeLuminance;
|
|
6776
|
+
exports.renderAsLine = renderAsLine;
|
|
6727
6777
|
exports.rendersCompanyProfile = rendersCompanyProfile;
|
|
6728
6778
|
exports.rendersPersonalProfile = rendersPersonalProfile;
|
|
6729
6779
|
exports.repoGroupForCollection = repoGroupForCollection;
|