@singi-labs/sifa-sdk 0.19.17 → 0.19.19
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 +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4014,7 +4014,7 @@ function getPublisherFromSiteUrl(siteUrl) {
|
|
|
4014
4014
|
// src/stream/verbs.json
|
|
4015
4015
|
var verbs_default = {
|
|
4016
4016
|
$schema: "https://sifa.id/schemas/activity-verbs/v1.json",
|
|
4017
|
-
version: "1.
|
|
4017
|
+
version: "1.4.0",
|
|
4018
4018
|
updated: "2026-09-18",
|
|
4019
4019
|
defaultVerb: "created",
|
|
4020
4020
|
verbs: {
|
|
@@ -4025,7 +4025,9 @@ var verbs_default = {
|
|
|
4025
4025
|
"app.sidetrail.trail": "shipped",
|
|
4026
4026
|
"app.sidetrail.walk": "shipped",
|
|
4027
4027
|
"app.userinput.reply": "replied",
|
|
4028
|
+
"at.margin.annotation": "annotated",
|
|
4028
4029
|
"at.margin.bookmark": "bookmarked",
|
|
4030
|
+
"at.margin.note": "annotated",
|
|
4029
4031
|
"at.marque.domain": "registered",
|
|
4030
4032
|
"at.youandme.connection": "followed",
|
|
4031
4033
|
"blue.flashes.feed.post": "posted",
|
|
@@ -4080,7 +4082,8 @@ var STREAM_VERBS = [
|
|
|
4080
4082
|
"liked",
|
|
4081
4083
|
"followed",
|
|
4082
4084
|
"bookmarked",
|
|
4083
|
-
"registered"
|
|
4085
|
+
"registered",
|
|
4086
|
+
"annotated"
|
|
4084
4087
|
];
|
|
4085
4088
|
var streamVerbSchema = zod.z.enum(STREAM_VERBS);
|
|
4086
4089
|
var verbMapSchema = zod.z.object({
|
|
@@ -4537,7 +4540,8 @@ var TITLE_BY_VERB = {
|
|
|
4537
4540
|
liked: () => "Liked",
|
|
4538
4541
|
followed: () => "Followed",
|
|
4539
4542
|
bookmarked: () => "Bookmarked",
|
|
4540
|
-
registered: () => "Registered"
|
|
4543
|
+
registered: () => "Registered",
|
|
4544
|
+
annotated: () => "Annotated"
|
|
4541
4545
|
};
|
|
4542
4546
|
function buildTitle(verb, label, hasSubject) {
|
|
4543
4547
|
return TITLE_BY_VERB[verb](label, hasSubject);
|
|
@@ -4648,9 +4652,9 @@ function applyBskyPost(vm, item, record) {
|
|
|
4648
4652
|
if (media) vm.media = media;
|
|
4649
4653
|
if (externalLink) vm.externalLink = externalLink;
|
|
4650
4654
|
let body;
|
|
4651
|
-
if (
|
|
4652
|
-
else if (vm.
|
|
4653
|
-
else if (
|
|
4655
|
+
if (vm.media) body = text ? { kind: "media", text } : { kind: "media" };
|
|
4656
|
+
else if (vm.externalLink) body = text ? { kind: "link", text } : { kind: "link" };
|
|
4657
|
+
else if (text) body = { kind: "text", text };
|
|
4654
4658
|
else body = { kind: "generic" };
|
|
4655
4659
|
vm.body = body;
|
|
4656
4660
|
return vm;
|
|
@@ -4989,6 +4993,14 @@ function genericSubject(record) {
|
|
|
4989
4993
|
if (uri && uri.startsWith("at://")) return { kind: "record", uri };
|
|
4990
4994
|
const parentUri = nonBlankString(asRecord(asRecord(record.reply)?.parent)?.uri);
|
|
4991
4995
|
if (parentUri && parentUri.startsWith("at://")) return { kind: "record", uri: parentUri };
|
|
4996
|
+
const target = asRecord(record.target);
|
|
4997
|
+
if (target) {
|
|
4998
|
+
const source = httpUrl(target.source);
|
|
4999
|
+
if (source) {
|
|
5000
|
+
const title = nonBlankString(target.title);
|
|
5001
|
+
return { kind: "record", uri: source, ...title ? { title } : {}, url: source };
|
|
5002
|
+
}
|
|
5003
|
+
}
|
|
4992
5004
|
return void 0;
|
|
4993
5005
|
}
|
|
4994
5006
|
function withResolvedSubjectMeta(subject, item) {
|
|
@@ -6589,7 +6601,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6589
6601
|
}
|
|
6590
6602
|
|
|
6591
6603
|
// src/index.ts
|
|
6592
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6604
|
+
var SIFA_SDK_VERSION = "0.19.19";
|
|
6593
6605
|
|
|
6594
6606
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6595
6607
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|