@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.cjs
CHANGED
|
@@ -1025,6 +1025,9 @@ var APP_CATEGORY_MAP = {
|
|
|
1025
1025
|
// Onboard from willow.sh profile audit.
|
|
1026
1026
|
guestbook: "Social",
|
|
1027
1027
|
// dev.baileytownsend.guestbook.entry — a note left on someone's cross-site guestbook
|
|
1028
|
+
// Onboard from trezy.codes profile audit.
|
|
1029
|
+
atmobb: "Social",
|
|
1030
|
+
// app.atmobb.discussion.{thread,reply} — federated forum threads + replies
|
|
1028
1031
|
// Web-only (rendered in pills/cards via sifa-web atproto-apps.ts;
|
|
1029
1032
|
// no backend scan collection yet)
|
|
1030
1033
|
linkat: "Links",
|
|
@@ -2292,6 +2295,9 @@ var APP_URL_PATTERNS = Object.freeze({
|
|
|
2292
2295
|
profileUrlPattern: "https://grain.social/profile/{did}"
|
|
2293
2296
|
},
|
|
2294
2297
|
youandme: { profileUrlPattern: "https://youandme.at" },
|
|
2298
|
+
// atmoBB per-item thread/reply URLs are built bespoke in resolve-card-url.ts
|
|
2299
|
+
// (raw-colon /t/{did}/{rkey}); this is only the member-profile fallback.
|
|
2300
|
+
atmobb: { profileUrlPattern: "https://atmobb.app/members/{did}" },
|
|
2295
2301
|
// anisota: upgraded with per-record URL pattern below.
|
|
2296
2302
|
margin: { profileUrlPattern: "https://margin.at" },
|
|
2297
2303
|
beaconbits: { profileUrlPattern: "https://beaconbits.app" },
|
|
@@ -2479,7 +2485,9 @@ var COLLECTION_TO_APP = [
|
|
|
2479
2485
|
// Onboard from moll.dev profile audit.
|
|
2480
2486
|
["exchange.recipe.recipe", "recipe"],
|
|
2481
2487
|
// Onboard from willow.sh profile audit.
|
|
2482
|
-
["dev.baileytownsend.guestbook.", "guestbook"]
|
|
2488
|
+
["dev.baileytownsend.guestbook.", "guestbook"],
|
|
2489
|
+
// Onboard from trezy.codes profile audit.
|
|
2490
|
+
["app.atmobb.", "atmobb"]
|
|
2483
2491
|
];
|
|
2484
2492
|
|
|
2485
2493
|
// src/cards/resolve-card-url.ts
|
|
@@ -2600,6 +2608,26 @@ function resolveCardHealth(item) {
|
|
|
2600
2608
|
}
|
|
2601
2609
|
return { url: null, strategy: "none" };
|
|
2602
2610
|
}
|
|
2611
|
+
if (collection === "app.atmobb.discussion.reply") {
|
|
2612
|
+
const thread = record.thread;
|
|
2613
|
+
if (thread != null && typeof thread === "object") {
|
|
2614
|
+
const threadUri = stringOrNull(thread.uri);
|
|
2615
|
+
if (threadUri) {
|
|
2616
|
+
const parsed3 = parseAtUri(threadUri);
|
|
2617
|
+
if (parsed3) {
|
|
2618
|
+
return urlHealth(`https://atmobb.app/t/${parsed3.did}/${parsed3.rkey}`);
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
return { url: null, strategy: "none" };
|
|
2623
|
+
}
|
|
2624
|
+
if (collection === "app.atmobb.discussion.thread") {
|
|
2625
|
+
const parsed3 = parseAtUri(uri);
|
|
2626
|
+
if (parsed3) {
|
|
2627
|
+
return recordHealth(`https://atmobb.app/t/${parsed3.did}/${parsed3.rkey}`);
|
|
2628
|
+
}
|
|
2629
|
+
return { url: null, strategy: "none" };
|
|
2630
|
+
}
|
|
2603
2631
|
if (collection === "fyi.atstore.listing.review") {
|
|
2604
2632
|
const listingMeta = record.listingMeta;
|
|
2605
2633
|
if (listingMeta != null && typeof listingMeta === "object") {
|
|
@@ -3254,10 +3282,18 @@ function bskyImages(embed, did) {
|
|
|
3254
3282
|
for (const raw of images) {
|
|
3255
3283
|
const img = asRecord(raw);
|
|
3256
3284
|
if (!img) continue;
|
|
3285
|
+
const alt = asNonEmptyString(img.alt) ?? "";
|
|
3286
|
+
const ratio = aspectRatio(img.aspectRatio);
|
|
3287
|
+
const resolvedUrl = asNonEmptyString(img.thumb) ?? asNonEmptyString(img.fullsize);
|
|
3288
|
+
if (resolvedUrl) {
|
|
3289
|
+
const media2 = { url: resolvedUrl, alt };
|
|
3290
|
+
if (ratio) media2.aspectRatio = ratio;
|
|
3291
|
+
out.push(media2);
|
|
3292
|
+
continue;
|
|
3293
|
+
}
|
|
3257
3294
|
const cid = blobCid(img.image);
|
|
3258
3295
|
if (!cid) continue;
|
|
3259
|
-
const media = { did, cid, alt
|
|
3260
|
-
const ratio = aspectRatio(img.aspectRatio);
|
|
3296
|
+
const media = { did, cid, alt };
|
|
3261
3297
|
if (ratio) media.aspectRatio = ratio;
|
|
3262
3298
|
const mimeType = asNonEmptyString(asRecord(img.image)?.mimeType);
|
|
3263
3299
|
if (mimeType) media.mimeType = mimeType;
|
|
@@ -3273,13 +3309,16 @@ function bskyExternal(embed) {
|
|
|
3273
3309
|
const link2 = { url };
|
|
3274
3310
|
const title = asNonEmptyString(external.title);
|
|
3275
3311
|
if (title) link2.title = title;
|
|
3312
|
+
const thumb = asNonEmptyString(external.thumb);
|
|
3313
|
+
if (thumb) link2.thumb = thumb;
|
|
3276
3314
|
return link2;
|
|
3277
3315
|
}
|
|
3278
3316
|
function bskyEmbedContent(record, did) {
|
|
3279
3317
|
const embed = asRecord(record.embed);
|
|
3280
3318
|
if (!embed) return {};
|
|
3281
3319
|
const type = asNonEmptyString(embed["$type"]);
|
|
3282
|
-
const
|
|
3320
|
+
const isRecordWithMedia = type === "app.bsky.embed.recordWithMedia" || type === "app.bsky.embed.recordWithMedia#view";
|
|
3321
|
+
const target = isRecordWithMedia ? asRecord(embed.media) : embed;
|
|
3283
3322
|
if (!target) return {};
|
|
3284
3323
|
if (Array.isArray(target.images)) {
|
|
3285
3324
|
const media = bskyImages(target, did);
|
|
@@ -4654,7 +4693,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
4654
4693
|
});
|
|
4655
4694
|
|
|
4656
4695
|
// src/index.ts
|
|
4657
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4696
|
+
var SIFA_SDK_VERSION = "0.12.27";
|
|
4658
4697
|
|
|
4659
4698
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
4660
4699
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|