@singi-labs/sifa-sdk 0.12.25 → 0.12.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 +44 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -374,6 +374,7 @@ declare const APP_CATEGORY_MAP: {
|
|
|
374
374
|
readonly margin: "Research";
|
|
375
375
|
readonly recipe: "Recipes";
|
|
376
376
|
readonly guestbook: "Social";
|
|
377
|
+
readonly atmobb: "Social";
|
|
377
378
|
readonly linkat: "Links";
|
|
378
379
|
readonly kipclip: "Links";
|
|
379
380
|
readonly statusphere: "Social";
|
package/dist/index.d.ts
CHANGED
|
@@ -374,6 +374,7 @@ declare const APP_CATEGORY_MAP: {
|
|
|
374
374
|
readonly margin: "Research";
|
|
375
375
|
readonly recipe: "Recipes";
|
|
376
376
|
readonly guestbook: "Social";
|
|
377
|
+
readonly atmobb: "Social";
|
|
377
378
|
readonly linkat: "Links";
|
|
378
379
|
readonly kipclip: "Links";
|
|
379
380
|
readonly statusphere: "Social";
|
package/dist/index.js
CHANGED
|
@@ -1023,6 +1023,9 @@ var APP_CATEGORY_MAP = {
|
|
|
1023
1023
|
// Onboard from willow.sh profile audit.
|
|
1024
1024
|
guestbook: "Social",
|
|
1025
1025
|
// dev.baileytownsend.guestbook.entry — a note left on someone's cross-site guestbook
|
|
1026
|
+
// Onboard from trezy.codes profile audit.
|
|
1027
|
+
atmobb: "Social",
|
|
1028
|
+
// app.atmobb.discussion.{thread,reply} — federated forum threads + replies
|
|
1026
1029
|
// Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
|
|
1027
1030
|
// no backend scan collection yet)
|
|
1028
1031
|
linkat: "Links",
|
|
@@ -2290,6 +2293,9 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
2290
2293
|
profileUrlPattern: "https://grain.social/profile/{did}"
|
|
2291
2294
|
},
|
|
2292
2295
|
youandme: { profileUrlPattern: "https://youandme.at" },
|
|
2296
|
+
// atmoBB per-item thread/reply URLs are built bespoke in resolve-card-url.ts
|
|
2297
|
+
// (raw-colon /t/{did}/{rkey}); this is only the member-profile fallback.
|
|
2298
|
+
atmobb: { profileUrlPattern: "https://atmobb.app/members/{did}" },
|
|
2293
2299
|
// anisota: upgraded with per-record URL pattern below.
|
|
2294
2300
|
margin: { profileUrlPattern: "https://margin.at" },
|
|
2295
2301
|
beaconbits: { profileUrlPattern: "https://beaconbits.app" },
|
|
@@ -2477,7 +2483,9 @@ var COLLECTION_TO_APP = [
|
|
|
2477
2483
|
// Onboard from moll.dev profile audit.
|
|
2478
2484
|
["exchange.recipe.recipe", "recipe"],
|
|
2479
2485
|
// Onboard from willow.sh profile audit.
|
|
2480
|
-
["dev.baileytownsend.guestbook.", "guestbook"]
|
|
2486
|
+
["dev.baileytownsend.guestbook.", "guestbook"],
|
|
2487
|
+
// Onboard from trezy.codes profile audit.
|
|
2488
|
+
["app.atmobb.", "atmobb"]
|
|
2481
2489
|
];
|
|
2482
2490
|
|
|
2483
2491
|
// src/cards/resolve-card-url.ts
|
|
@@ -2598,6 +2606,26 @@ function resolveCardHealth(item) {
|
|
|
2598
2606
|
}
|
|
2599
2607
|
return { url: null, strategy: "none" };
|
|
2600
2608
|
}
|
|
2609
|
+
if (collection === "app.atmobb.discussion.reply") {
|
|
2610
|
+
const thread = record.thread;
|
|
2611
|
+
if (thread != null && typeof thread === "object") {
|
|
2612
|
+
const threadUri = stringOrNull(thread.uri);
|
|
2613
|
+
if (threadUri) {
|
|
2614
|
+
const parsed3 = parseAtUri(threadUri);
|
|
2615
|
+
if (parsed3) {
|
|
2616
|
+
return urlHealth(`https://atmobb.app/t/${parsed3.did}/${parsed3.rkey}`);
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
return { url: null, strategy: "none" };
|
|
2621
|
+
}
|
|
2622
|
+
if (collection === "app.atmobb.discussion.thread") {
|
|
2623
|
+
const parsed3 = parseAtUri(uri);
|
|
2624
|
+
if (parsed3) {
|
|
2625
|
+
return recordHealth(`https://atmobb.app/t/${parsed3.did}/${parsed3.rkey}`);
|
|
2626
|
+
}
|
|
2627
|
+
return { url: null, strategy: "none" };
|
|
2628
|
+
}
|
|
2601
2629
|
if (collection === "fyi.atstore.listing.review") {
|
|
2602
2630
|
const listingMeta = record.listingMeta;
|
|
2603
2631
|
if (listingMeta != null && typeof listingMeta === "object") {
|
|
@@ -3252,10 +3280,18 @@ function bskyImages(embed, did) {
|
|
|
3252
3280
|
for (const raw of images) {
|
|
3253
3281
|
const img = asRecord(raw);
|
|
3254
3282
|
if (!img) continue;
|
|
3283
|
+
const alt = asNonEmptyString(img.alt) ?? "";
|
|
3284
|
+
const ratio = aspectRatio(img.aspectRatio);
|
|
3285
|
+
const resolvedUrl = asNonEmptyString(img.thumb) ?? asNonEmptyString(img.fullsize);
|
|
3286
|
+
if (resolvedUrl) {
|
|
3287
|
+
const media2 = { url: resolvedUrl, alt };
|
|
3288
|
+
if (ratio) media2.aspectRatio = ratio;
|
|
3289
|
+
out.push(media2);
|
|
3290
|
+
continue;
|
|
3291
|
+
}
|
|
3255
3292
|
const cid = blobCid(img.image);
|
|
3256
3293
|
if (!cid) continue;
|
|
3257
|
-
const media = { did, cid, alt
|
|
3258
|
-
const ratio = aspectRatio(img.aspectRatio);
|
|
3294
|
+
const media = { did, cid, alt };
|
|
3259
3295
|
if (ratio) media.aspectRatio = ratio;
|
|
3260
3296
|
const mimeType = asNonEmptyString(asRecord(img.image)?.mimeType);
|
|
3261
3297
|
if (mimeType) media.mimeType = mimeType;
|
|
@@ -3271,13 +3307,16 @@ function bskyExternal(embed) {
|
|
|
3271
3307
|
const link2 = { url };
|
|
3272
3308
|
const title = asNonEmptyString(external.title);
|
|
3273
3309
|
if (title) link2.title = title;
|
|
3310
|
+
const thumb = asNonEmptyString(external.thumb);
|
|
3311
|
+
if (thumb) link2.thumb = thumb;
|
|
3274
3312
|
return link2;
|
|
3275
3313
|
}
|
|
3276
3314
|
function bskyEmbedContent(record, did) {
|
|
3277
3315
|
const embed = asRecord(record.embed);
|
|
3278
3316
|
if (!embed) return {};
|
|
3279
3317
|
const type = asNonEmptyString(embed["$type"]);
|
|
3280
|
-
const
|
|
3318
|
+
const isRecordWithMedia = type === "app.bsky.embed.recordWithMedia" || type === "app.bsky.embed.recordWithMedia#view";
|
|
3319
|
+
const target = isRecordWithMedia ? asRecord(embed.media) : embed;
|
|
3281
3320
|
if (!target) return {};
|
|
3282
3321
|
if (Array.isArray(target.images)) {
|
|
3283
3322
|
const media = bskyImages(target, did);
|
|
@@ -4652,7 +4691,7 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
4652
4691
|
});
|
|
4653
4692
|
|
|
4654
4693
|
// src/index.ts
|
|
4655
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4694
|
+
var SIFA_SDK_VERSION = "0.12.27";
|
|
4656
4695
|
|
|
4657
4696
|
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hasAdultContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
|
|
4658
4697
|
//# sourceMappingURL=index.js.map
|