@singi-labs/sifa-sdk 0.12.24 → 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 +55 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +55 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -373,6 +373,8 @@ declare const APP_CATEGORY_MAP: {
|
|
|
373
373
|
readonly kich: "Recipes";
|
|
374
374
|
readonly margin: "Research";
|
|
375
375
|
readonly recipe: "Recipes";
|
|
376
|
+
readonly guestbook: "Social";
|
|
377
|
+
readonly atmobb: "Social";
|
|
376
378
|
readonly linkat: "Links";
|
|
377
379
|
readonly kipclip: "Links";
|
|
378
380
|
readonly statusphere: "Social";
|
package/dist/index.d.ts
CHANGED
|
@@ -373,6 +373,8 @@ declare const APP_CATEGORY_MAP: {
|
|
|
373
373
|
readonly kich: "Recipes";
|
|
374
374
|
readonly margin: "Research";
|
|
375
375
|
readonly recipe: "Recipes";
|
|
376
|
+
readonly guestbook: "Social";
|
|
377
|
+
readonly atmobb: "Social";
|
|
376
378
|
readonly linkat: "Links";
|
|
377
379
|
readonly kipclip: "Links";
|
|
378
380
|
readonly statusphere: "Social";
|
package/dist/index.js
CHANGED
|
@@ -1020,6 +1020,12 @@ var APP_CATEGORY_MAP = {
|
|
|
1020
1020
|
// Onboard from moll.dev profile audit.
|
|
1021
1021
|
recipe: "Recipes",
|
|
1022
1022
|
// exchange.recipe.recipe — authored recipes on recipe.exchange
|
|
1023
|
+
// Onboard from willow.sh profile audit.
|
|
1024
|
+
guestbook: "Social",
|
|
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
|
|
1023
1029
|
// Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
|
|
1024
1030
|
// no backend scan collection yet)
|
|
1025
1031
|
linkat: "Links",
|
|
@@ -2287,6 +2293,9 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
2287
2293
|
profileUrlPattern: "https://grain.social/profile/{did}"
|
|
2288
2294
|
},
|
|
2289
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}" },
|
|
2290
2299
|
// anisota: upgraded with per-record URL pattern below.
|
|
2291
2300
|
margin: { profileUrlPattern: "https://margin.at" },
|
|
2292
2301
|
beaconbits: { profileUrlPattern: "https://beaconbits.app" },
|
|
@@ -2356,6 +2365,12 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
2356
2365
|
// record.canonicalUrl (handled in resolveCardUrl); `note` records have no
|
|
2357
2366
|
// public URL and render non-clickable. So no app-level pattern applies.
|
|
2358
2367
|
},
|
|
2368
|
+
guestbook: {
|
|
2369
|
+
// Guestbook (dev.baileytownsend.guestbook) is a self-hosted, cross-site
|
|
2370
|
+
// widget: each site owner renders their own guestbook wherever they choose,
|
|
2371
|
+
// so there is no canonical public per-entry viewer or per-handle profile
|
|
2372
|
+
// page. Entries render non-clickable. Same shape as crate `note`.
|
|
2373
|
+
},
|
|
2359
2374
|
atmorsvp: {
|
|
2360
2375
|
// atmo.rsvp events live at /p/{did}/e/{rkey}. The per-item pattern is used
|
|
2361
2376
|
// for the event record itself; checkin records build their URL from the
|
|
@@ -2466,7 +2481,11 @@ var COLLECTION_TO_APP = [
|
|
|
2466
2481
|
["os.aether.", "aetherdocs"],
|
|
2467
2482
|
["io.kich.recipe.recipe", "kich"],
|
|
2468
2483
|
// Onboard from moll.dev profile audit.
|
|
2469
|
-
["exchange.recipe.recipe", "recipe"]
|
|
2484
|
+
["exchange.recipe.recipe", "recipe"],
|
|
2485
|
+
// Onboard from willow.sh profile audit.
|
|
2486
|
+
["dev.baileytownsend.guestbook.", "guestbook"],
|
|
2487
|
+
// Onboard from trezy.codes profile audit.
|
|
2488
|
+
["app.atmobb.", "atmobb"]
|
|
2470
2489
|
];
|
|
2471
2490
|
|
|
2472
2491
|
// src/cards/resolve-card-url.ts
|
|
@@ -2587,6 +2606,26 @@ function resolveCardHealth(item) {
|
|
|
2587
2606
|
}
|
|
2588
2607
|
return { url: null, strategy: "none" };
|
|
2589
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
|
+
}
|
|
2590
2629
|
if (collection === "fyi.atstore.listing.review") {
|
|
2591
2630
|
const listingMeta = record.listingMeta;
|
|
2592
2631
|
if (listingMeta != null && typeof listingMeta === "object") {
|
|
@@ -3241,10 +3280,18 @@ function bskyImages(embed, did) {
|
|
|
3241
3280
|
for (const raw of images) {
|
|
3242
3281
|
const img = asRecord(raw);
|
|
3243
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
|
+
}
|
|
3244
3292
|
const cid = blobCid(img.image);
|
|
3245
3293
|
if (!cid) continue;
|
|
3246
|
-
const media = { did, cid, alt
|
|
3247
|
-
const ratio = aspectRatio(img.aspectRatio);
|
|
3294
|
+
const media = { did, cid, alt };
|
|
3248
3295
|
if (ratio) media.aspectRatio = ratio;
|
|
3249
3296
|
const mimeType = asNonEmptyString(asRecord(img.image)?.mimeType);
|
|
3250
3297
|
if (mimeType) media.mimeType = mimeType;
|
|
@@ -3260,13 +3307,16 @@ function bskyExternal(embed) {
|
|
|
3260
3307
|
const link2 = { url };
|
|
3261
3308
|
const title = asNonEmptyString(external.title);
|
|
3262
3309
|
if (title) link2.title = title;
|
|
3310
|
+
const thumb = asNonEmptyString(external.thumb);
|
|
3311
|
+
if (thumb) link2.thumb = thumb;
|
|
3263
3312
|
return link2;
|
|
3264
3313
|
}
|
|
3265
3314
|
function bskyEmbedContent(record, did) {
|
|
3266
3315
|
const embed = asRecord(record.embed);
|
|
3267
3316
|
if (!embed) return {};
|
|
3268
3317
|
const type = asNonEmptyString(embed["$type"]);
|
|
3269
|
-
const
|
|
3318
|
+
const isRecordWithMedia = type === "app.bsky.embed.recordWithMedia" || type === "app.bsky.embed.recordWithMedia#view";
|
|
3319
|
+
const target = isRecordWithMedia ? asRecord(embed.media) : embed;
|
|
3270
3320
|
if (!target) return {};
|
|
3271
3321
|
if (Array.isArray(target.images)) {
|
|
3272
3322
|
const media = bskyImages(target, did);
|
|
@@ -4641,7 +4691,7 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
4641
4691
|
});
|
|
4642
4692
|
|
|
4643
4693
|
// src/index.ts
|
|
4644
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4694
|
+
var SIFA_SDK_VERSION = "0.12.27";
|
|
4645
4695
|
|
|
4646
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 };
|
|
4647
4697
|
//# sourceMappingURL=index.js.map
|