@singi-labs/sifa-sdk 0.9.20 → 0.9.22

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 CHANGED
@@ -796,6 +796,76 @@ function groupSkillsByCategory(skills) {
796
796
  return ordered;
797
797
  }
798
798
 
799
+ // src/taxonomy/app-categories.ts
800
+ var APP_CATEGORIES = {
801
+ Articles: { phosphorIcon: "Article" },
802
+ Chat: { phosphorIcon: "ChatsCircle" },
803
+ Code: { phosphorIcon: "Code" },
804
+ Events: { phosphorIcon: "CalendarBlank" },
805
+ Links: { phosphorIcon: "LinkSimple" },
806
+ Lists: { phosphorIcon: "ListBullets" },
807
+ Pages: { phosphorIcon: "BrowserSimple" },
808
+ Pastes: { phosphorIcon: "Clipboard" },
809
+ Photos: { phosphorIcon: "Camera" },
810
+ Places: { phosphorIcon: "MapPin" },
811
+ Posts: { phosphorIcon: "ChatCircle" },
812
+ Questions: { phosphorIcon: "Question" },
813
+ Research: { phosphorIcon: "Path" },
814
+ Reviews: { phosphorIcon: "Star" },
815
+ Social: { phosphorIcon: "UsersThree" },
816
+ Verification: { phosphorIcon: "Key" },
817
+ Video: { phosphorIcon: "VideoCamera" }
818
+ };
819
+ var APP_CATEGORY_IDS = Object.keys(APP_CATEGORIES);
820
+ function isAppCategory(value) {
821
+ return Object.prototype.hasOwnProperty.call(APP_CATEGORIES, value);
822
+ }
823
+ function getAppCategoryIcon(category) {
824
+ return APP_CATEGORIES[category].phosphorIcon;
825
+ }
826
+
827
+ // src/taxonomy/app-category-map.ts
828
+ var APP_CATEGORY_MAP = {
829
+ // API registry (backend-scanned)
830
+ bluesky: "Posts",
831
+ tangled: "Code",
832
+ github: "Code",
833
+ smokesignal: "Events",
834
+ flashes: "Photos",
835
+ grain: "Photos",
836
+ whitewind: "Articles",
837
+ frontpage: "Links",
838
+ picosky: "Chat",
839
+ pastesphere: "Pastes",
840
+ standard: "Articles",
841
+ aetheros: "Pages",
842
+ roomy: "Social",
843
+ keytrace: "Verification",
844
+ popfeed: "Reviews",
845
+ streamplace: "Video",
846
+ semble: "Research",
847
+ youandme: "Social",
848
+ leaflet: "Articles",
849
+ colibri: "Social",
850
+ collectivesocial: "Lists",
851
+ // Web-only (rendered in pills/cards; not scanned as standalone collections yet)
852
+ linkat: "Links",
853
+ kipclip: "Links",
854
+ statusphere: "Social",
855
+ bookhive: "Reviews",
856
+ passports: "Social",
857
+ beaconbits: "Places",
858
+ margin: "Research",
859
+ anisota: "Posts",
860
+ asq: "Questions"
861
+ };
862
+ function isKnownAppId(appId) {
863
+ return Object.prototype.hasOwnProperty.call(APP_CATEGORY_MAP, appId);
864
+ }
865
+ function categoryForApp(appId) {
866
+ return isKnownAppId(appId) ? APP_CATEGORY_MAP[appId] : void 0;
867
+ }
868
+
799
869
  // src/taxonomy/activity-tiers.json
800
870
  var activity_tiers_default = {
801
871
  $schema: "https://sifa.id/schemas/activity-tiers/v1.json",
@@ -1436,7 +1506,7 @@ var APP_URL_PATTERNS = Object.freeze({
1436
1506
  profileUrlPattern: "https://grain.social/profile/{did}"
1437
1507
  },
1438
1508
  youandme: { profileUrlPattern: "https://youandme.at" },
1439
- anisota: { profileUrlPattern: "https://anisota.net" },
1509
+ // anisota: upgraded with per-record URL pattern below.
1440
1510
  margin: { profileUrlPattern: "https://margin.at" },
1441
1511
  beaconbits: { profileUrlPattern: "https://beaconbits.app" },
1442
1512
  bookhive: { profileUrlPattern: "https://bookhive.buzz/profile/{handle}" },
@@ -1463,6 +1533,29 @@ var APP_URL_PATTERNS = Object.freeze({
1463
1533
  // at the marketing site.
1464
1534
  urlPattern: "https://leaflet.pub/{rkey}",
1465
1535
  profileUrlPattern: "https://leaflet.pub"
1536
+ },
1537
+ spark: {
1538
+ // Verified live: GET /post/{did}/{rkey} returns 200.
1539
+ urlPattern: "https://sprk.so/post/{did}/{rkey}",
1540
+ profileUrlPattern: "https://sprk.so/profile/{handle}"
1541
+ },
1542
+ anisota: {
1543
+ urlPattern: "https://anisota.net/post/{did}/{rkey}",
1544
+ profileUrlPattern: "https://anisota.net/profile/{handle}"
1545
+ },
1546
+ nooki: {
1547
+ // Per-post URLs use slug-based routing (e.g. /post/{slug}), not rkey —
1548
+ // can't be constructed from a record. Profile fallback only.
1549
+ profileUrlPattern: "https://nooki.me/user/{handle}"
1550
+ },
1551
+ atstore: {
1552
+ // SPA — per-record URLs require JS routing. Profile fallback only.
1553
+ profileUrlPattern: "https://atstore.fyi/@{handle}"
1554
+ },
1555
+ plyr: {
1556
+ // SPA — per-record URLs require JS routing. plyr.fm doesn't expose a
1557
+ // public per-handle profile page server-side either; falls back to root.
1558
+ profileUrlPattern: "https://plyr.fm"
1466
1559
  }
1467
1560
  });
1468
1561
  var COLLECTION_TO_APP = [
@@ -1499,7 +1592,11 @@ var COLLECTION_TO_APP = [
1499
1592
  ["social.colibri.", "colibri"],
1500
1593
  ["social.passports.", "passports"],
1501
1594
  ["fyi.asq.", "asq"],
1502
- ["pub.leaflet.", "leaflet"]
1595
+ ["pub.leaflet.", "leaflet"],
1596
+ ["so.sprk.", "spark"],
1597
+ ["community.nooki.", "nooki"],
1598
+ ["fyi.atstore.", "atstore"],
1599
+ ["fm.plyr.", "plyr"]
1503
1600
  ];
1504
1601
 
1505
1602
  // src/cards/resolve-card-url.ts
@@ -1966,10 +2063,13 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
1966
2063
  });
1967
2064
 
1968
2065
  // src/index.ts
1969
- var SIFA_SDK_VERSION = "0.9.20";
2066
+ var SIFA_SDK_VERSION = "0.9.22";
1970
2067
 
1971
2068
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
1972
2069
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
2070
+ exports.APP_CATEGORIES = APP_CATEGORIES;
2071
+ exports.APP_CATEGORY_IDS = APP_CATEGORY_IDS;
2072
+ exports.APP_CATEGORY_MAP = APP_CATEGORY_MAP;
1973
2073
  exports.APP_URL_PATTERNS = APP_URL_PATTERNS;
1974
2074
  exports.AtmosphereFeedItemSchema = AtmosphereFeedItemSchema;
1975
2075
  exports.CATEGORY_LABELS = CATEGORY_LABELS;
@@ -2015,6 +2115,7 @@ exports.SifaFeedItemSchema = SifaFeedItemSchema;
2015
2115
  exports.WORKPLACE_TYPE_LABELS = WORKPLACE_TYPE_LABELS;
2016
2116
  exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
2017
2117
  exports.atUriSchema = atUriSchema;
2118
+ exports.categoryForApp = categoryForApp;
2018
2119
  exports.certDateExtractor = certDateExtractor;
2019
2120
  exports.cidSchema = cidSchema;
2020
2121
  exports.completenessPercent = completenessPercent;
@@ -2036,6 +2137,7 @@ exports.formatLocation = formatLocation;
2036
2137
  exports.formatRelativeTime = formatRelativeTime;
2037
2138
  exports.getActivityTaxonomyVersion = getActivityTaxonomyVersion;
2038
2139
  exports.getActivityTier = getActivityTier;
2140
+ exports.getAppCategoryIcon = getAppCategoryIcon;
2039
2141
  exports.getAppIdForCollection = getAppIdForCollection;
2040
2142
  exports.getContinent = getContinent;
2041
2143
  exports.getDisplayLabel = getDisplayLabel;
@@ -2051,6 +2153,8 @@ exports.getPlatformLabel = getPlatformLabel;
2051
2153
  exports.getTierMeta = getTierMeta;
2052
2154
  exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
2053
2155
  exports.groupSkillsByCategory = groupSkillsByCategory;
2156
+ exports.isAppCategory = isAppCategory;
2157
+ exports.isKnownAppId = isKnownAppId;
2054
2158
  exports.isKnownPlatform = isKnownPlatform;
2055
2159
  exports.isValidRgbColor = isValidRgbColor;
2056
2160
  exports.isVisibleActivityItem = isVisibleActivityItem;