@singi-labs/sifa-sdk 0.12.11 → 0.12.13
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/{adult-content-DE7XOP9c.d.cts → adult-content-D2Dy1w2s.d.cts} +11 -0
- package/dist/{adult-content-DE7XOP9c.d.ts → adult-content-D2Dy1w2s.d.ts} +11 -0
- package/dist/{index-B__7m2Xg.d.cts → index-B9aqJbsG.d.cts} +2 -2
- package/dist/{index-DdfDo0Nx.d.ts → index-BQ46POs-.d.ts} +2 -2
- package/dist/{index-nNxAiYxw.d.ts → index-Br8vBw4N.d.ts} +2 -2
- package/dist/{index-CsvSv1S_.d.cts → index-CZ8BkCCc.d.cts} +2 -2
- package/dist/index.cjs +169 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +74 -4
- package/dist/index.d.ts +74 -4
- package/dist/index.js +163 -2
- package/dist/index.js.map +1 -1
- package/dist/{org-BCqhEA6J.d.ts → org-Bflg9EiB.d.ts} +1 -1
- package/dist/{org-It9hf-ni.d.cts → org-Df5IjADP.d.cts} +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/schemas/index.cjs +21 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +33 -1
- package/dist/schemas/index.d.ts +33 -1
- package/dist/schemas/index.js +21 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +13 -1
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +18 -0
- package/dist/schemas/write/index.d.ts +18 -0
- package/dist/schemas/write/index.js +13 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -367,6 +367,10 @@ interface ProfilePresentationDelivery {
|
|
|
367
367
|
/** Day-only date, YYYY-MM-DD. */
|
|
368
368
|
date?: string | null;
|
|
369
369
|
location?: string | null;
|
|
370
|
+
locationCountry?: string | null;
|
|
371
|
+
locationRegion?: string | null;
|
|
372
|
+
locationLocality?: string | null;
|
|
373
|
+
countryCode?: string | null;
|
|
370
374
|
/** Full community.lexicon.calendar.event mode token. */
|
|
371
375
|
mode?: string | null;
|
|
372
376
|
/** Full community.lexicon.calendar.event status token. */
|
|
@@ -390,6 +394,8 @@ interface ProfilePresentation {
|
|
|
390
394
|
links?: PresentationLinkView[];
|
|
391
395
|
/** at-uri of a long-form write-up (Leaflet / site.standard document). */
|
|
392
396
|
writeupUri?: string | null;
|
|
397
|
+
/** Resolved URL of the uploaded cover image, when present. */
|
|
398
|
+
coverImageUrl?: string | null;
|
|
393
399
|
hidden?: boolean;
|
|
394
400
|
deliveries?: ProfilePresentationDelivery[];
|
|
395
401
|
}
|
|
@@ -735,6 +741,10 @@ interface PresentationDeliveryView {
|
|
|
735
741
|
eventName?: string;
|
|
736
742
|
date?: string;
|
|
737
743
|
location?: string;
|
|
744
|
+
locationCountry?: string;
|
|
745
|
+
locationRegion?: string;
|
|
746
|
+
locationLocality?: string;
|
|
747
|
+
countryCode?: string;
|
|
738
748
|
mode?: string;
|
|
739
749
|
status?: string;
|
|
740
750
|
links?: PresentationLinkView[];
|
|
@@ -749,6 +759,7 @@ interface PresentationView {
|
|
|
749
759
|
intendedAudiences?: string[];
|
|
750
760
|
links?: PresentationLinkView[];
|
|
751
761
|
writeupUri?: string;
|
|
762
|
+
coverImageUrl?: string;
|
|
752
763
|
deliveries: PresentationDeliveryView[];
|
|
753
764
|
}
|
|
754
765
|
interface HonorView {
|
|
@@ -367,6 +367,10 @@ interface ProfilePresentationDelivery {
|
|
|
367
367
|
/** Day-only date, YYYY-MM-DD. */
|
|
368
368
|
date?: string | null;
|
|
369
369
|
location?: string | null;
|
|
370
|
+
locationCountry?: string | null;
|
|
371
|
+
locationRegion?: string | null;
|
|
372
|
+
locationLocality?: string | null;
|
|
373
|
+
countryCode?: string | null;
|
|
370
374
|
/** Full community.lexicon.calendar.event mode token. */
|
|
371
375
|
mode?: string | null;
|
|
372
376
|
/** Full community.lexicon.calendar.event status token. */
|
|
@@ -390,6 +394,8 @@ interface ProfilePresentation {
|
|
|
390
394
|
links?: PresentationLinkView[];
|
|
391
395
|
/** at-uri of a long-form write-up (Leaflet / site.standard document). */
|
|
392
396
|
writeupUri?: string | null;
|
|
397
|
+
/** Resolved URL of the uploaded cover image, when present. */
|
|
398
|
+
coverImageUrl?: string | null;
|
|
393
399
|
hidden?: boolean;
|
|
394
400
|
deliveries?: ProfilePresentationDelivery[];
|
|
395
401
|
}
|
|
@@ -735,6 +741,10 @@ interface PresentationDeliveryView {
|
|
|
735
741
|
eventName?: string;
|
|
736
742
|
date?: string;
|
|
737
743
|
location?: string;
|
|
744
|
+
locationCountry?: string;
|
|
745
|
+
locationRegion?: string;
|
|
746
|
+
locationLocality?: string;
|
|
747
|
+
countryCode?: string;
|
|
738
748
|
mode?: string;
|
|
739
749
|
status?: string;
|
|
740
750
|
links?: PresentationLinkView[];
|
|
@@ -749,6 +759,7 @@ interface PresentationView {
|
|
|
749
759
|
intendedAudiences?: string[];
|
|
750
760
|
links?: PresentationLinkView[];
|
|
751
761
|
writeupUri?: string;
|
|
762
|
+
coverImageUrl?: string;
|
|
752
763
|
deliveries: PresentationDeliveryView[];
|
|
753
764
|
}
|
|
754
765
|
interface HonorView {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-Df5IjADP.cjs';
|
|
2
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef } from './adult-content-D2Dy1w2s.cjs';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ae as RefreshPdsResult, at as UpdateProfileOverrideInput, au as UpdateProfileSelfInput, av as UploadAvatarResult, j as CreateResult, a2 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aw as VerifyExternalAccountResult, E as EndorsementInput, ad as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, aq as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, al as SearchFilters, am as SearchResponse, ap as SkillSearchResult, l as FeaturedProfile, ao as SimilarProfile, v as FetchSuggestionsOptions, as as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ac as ReactionStatus, ab as ReactionResult, aa as ReactionError, ak as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, af as ResetProfileResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ae as RefreshPdsResult, at as UpdateProfileOverrideInput, au as UpdateProfileSelfInput, av as UploadAvatarResult, j as CreateResult, a2 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aw as VerifyExternalAccountResult, E as EndorsementInput, ad as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, aq as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, al as SearchFilters, am as SearchResponse, ap as SkillSearchResult, l as FeaturedProfile, ao as SimilarProfile, v as FetchSuggestionsOptions, as as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ac as ReactionStatus, ab as ReactionResult, aa as ReactionError, ak as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, af as ResetProfileResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-Bflg9EiB.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-
|
|
6
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-D2Dy1w2s.js';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
8
8
|
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.js';
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-Bflg9EiB.js';
|
|
2
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef } from './adult-content-D2Dy1w2s.js';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ae as RefreshPdsResult, at as UpdateProfileOverrideInput, au as UpdateProfileSelfInput, av as UploadAvatarResult, j as CreateResult, a2 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aw as VerifyExternalAccountResult, E as EndorsementInput, ad as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, aq as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, al as SearchFilters, am as SearchResponse, ap as SkillSearchResult, l as FeaturedProfile, ao as SimilarProfile, v as FetchSuggestionsOptions, as as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ac as ReactionStatus, ab as ReactionResult, aa as ReactionError, ak as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, af as ResetProfileResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ae as RefreshPdsResult, at as UpdateProfileOverrideInput, au as UpdateProfileSelfInput, av as UploadAvatarResult, j as CreateResult, a2 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aw as VerifyExternalAccountResult, E as EndorsementInput, ad as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, aq as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, al as SearchFilters, am as SearchResponse, ap as SkillSearchResult, l as FeaturedProfile, ao as SimilarProfile, v as FetchSuggestionsOptions, as as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ac as ReactionStatus, ab as ReactionResult, aa as ReactionError, ak as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, af as ResetProfileResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-Df5IjADP.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-
|
|
6
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-D2Dy1w2s.cjs';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
8
8
|
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.cjs';
|
|
9
9
|
|
package/dist/index.cjs
CHANGED
|
@@ -1904,6 +1904,148 @@ function detectPdsProvider(handle) {
|
|
|
1904
1904
|
return null;
|
|
1905
1905
|
}
|
|
1906
1906
|
|
|
1907
|
+
// src/format/embed.ts
|
|
1908
|
+
var LINK = { kind: "link" };
|
|
1909
|
+
var YOUTUBE_ID = /^[A-Za-z0-9_-]{6,}$/;
|
|
1910
|
+
function youtubeVideoId(url) {
|
|
1911
|
+
let parsed3;
|
|
1912
|
+
try {
|
|
1913
|
+
parsed3 = new URL(url);
|
|
1914
|
+
} catch {
|
|
1915
|
+
return null;
|
|
1916
|
+
}
|
|
1917
|
+
if (parsed3.protocol !== "https:") return null;
|
|
1918
|
+
const host = bareHost(parsed3.hostname);
|
|
1919
|
+
const segments = parsed3.pathname.split("/").filter(Boolean);
|
|
1920
|
+
let id = null;
|
|
1921
|
+
if (host === "youtu.be") id = segments[0] ?? null;
|
|
1922
|
+
else if (host === "youtube.com" || host === "m.youtube.com") {
|
|
1923
|
+
if (parsed3.pathname === "/watch") id = parsed3.searchParams.get("v");
|
|
1924
|
+
else if (segments[0] === "embed" || segments[0] === "shorts") id = segments[1] ?? null;
|
|
1925
|
+
}
|
|
1926
|
+
return id && YOUTUBE_ID.test(id) ? id : null;
|
|
1927
|
+
}
|
|
1928
|
+
function youtubeThumbnailUrl(videoId) {
|
|
1929
|
+
return `https://i.ytimg.com/vi/${videoId}/hqdefault.jpg`;
|
|
1930
|
+
}
|
|
1931
|
+
function bareHost(hostname) {
|
|
1932
|
+
return hostname.toLowerCase().replace(/^www\./, "");
|
|
1933
|
+
}
|
|
1934
|
+
function resolveEmbed(url) {
|
|
1935
|
+
let parsed3;
|
|
1936
|
+
try {
|
|
1937
|
+
parsed3 = new URL(url);
|
|
1938
|
+
} catch {
|
|
1939
|
+
return LINK;
|
|
1940
|
+
}
|
|
1941
|
+
if (parsed3.protocol !== "https:") return LINK;
|
|
1942
|
+
const host = bareHost(parsed3.hostname);
|
|
1943
|
+
const segments = parsed3.pathname.split("/").filter(Boolean);
|
|
1944
|
+
if (host === "youtu.be" || host === "youtube.com" || host === "m.youtube.com") {
|
|
1945
|
+
const id = youtubeVideoId(url);
|
|
1946
|
+
return id ? youtubeEmbed(id) : LINK;
|
|
1947
|
+
}
|
|
1948
|
+
if (host === "vimeo.com") {
|
|
1949
|
+
const id = segments[0];
|
|
1950
|
+
if (id && /^\d+$/.test(id)) {
|
|
1951
|
+
return {
|
|
1952
|
+
kind: "iframe",
|
|
1953
|
+
provider: "vimeo",
|
|
1954
|
+
src: `https://player.vimeo.com/video/${id}`,
|
|
1955
|
+
aspectRatio: "16:9"
|
|
1956
|
+
};
|
|
1957
|
+
}
|
|
1958
|
+
return LINK;
|
|
1959
|
+
}
|
|
1960
|
+
if (host === "player.vimeo.com") {
|
|
1961
|
+
if (segments[0] === "video" && segments[1] && /^\d+$/.test(segments[1])) {
|
|
1962
|
+
return {
|
|
1963
|
+
kind: "iframe",
|
|
1964
|
+
provider: "vimeo",
|
|
1965
|
+
src: `https://player.vimeo.com/video/${segments[1]}`,
|
|
1966
|
+
aspectRatio: "16:9"
|
|
1967
|
+
};
|
|
1968
|
+
}
|
|
1969
|
+
return LINK;
|
|
1970
|
+
}
|
|
1971
|
+
if (host === "speakerdeck.com") {
|
|
1972
|
+
if (segments[0] === "player" && segments[1]) {
|
|
1973
|
+
return { kind: "iframe", provider: "speakerdeck", src: parsed3.href, aspectRatio: "4:3" };
|
|
1974
|
+
}
|
|
1975
|
+
if (segments.length >= 2) {
|
|
1976
|
+
return { kind: "oembed", provider: "speakerdeck", aspectRatio: "4:3", pageUrl: parsed3.href };
|
|
1977
|
+
}
|
|
1978
|
+
return LINK;
|
|
1979
|
+
}
|
|
1980
|
+
if (host === "slideshare.net") {
|
|
1981
|
+
if (segments[0] === "slideshow" && segments[1] === "embed_code") {
|
|
1982
|
+
return { kind: "iframe", provider: "slideshare", src: parsed3.href, aspectRatio: "4:3" };
|
|
1983
|
+
}
|
|
1984
|
+
if (segments.length >= 2) {
|
|
1985
|
+
return { kind: "oembed", provider: "slideshare", aspectRatio: "4:3", pageUrl: parsed3.href };
|
|
1986
|
+
}
|
|
1987
|
+
return LINK;
|
|
1988
|
+
}
|
|
1989
|
+
if (host === "docs.google.com") {
|
|
1990
|
+
if (segments[0] === "presentation" && segments[1] === "d" && segments[2]) {
|
|
1991
|
+
return {
|
|
1992
|
+
kind: "iframe",
|
|
1993
|
+
provider: "googleslides",
|
|
1994
|
+
src: `https://docs.google.com/presentation/d/${segments[2]}/embed`,
|
|
1995
|
+
aspectRatio: "16:9"
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
return LINK;
|
|
1999
|
+
}
|
|
2000
|
+
if (host === "loom.com") {
|
|
2001
|
+
if (segments[0] === "share" && segments[1]) {
|
|
2002
|
+
return {
|
|
2003
|
+
kind: "iframe",
|
|
2004
|
+
provider: "loom",
|
|
2005
|
+
src: `https://www.loom.com/embed/${segments[1]}`,
|
|
2006
|
+
aspectRatio: "16:9"
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
return LINK;
|
|
2010
|
+
}
|
|
2011
|
+
if (host === "canva.com") {
|
|
2012
|
+
if (segments[0] === "design" && segments[1] && segments[2] === "view") {
|
|
2013
|
+
return {
|
|
2014
|
+
kind: "iframe",
|
|
2015
|
+
provider: "canva",
|
|
2016
|
+
src: `https://www.canva.com/design/${segments[1]}/view?embed`,
|
|
2017
|
+
aspectRatio: "16:9"
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
return LINK;
|
|
2021
|
+
}
|
|
2022
|
+
return LINK;
|
|
2023
|
+
}
|
|
2024
|
+
function youtubeEmbed(id) {
|
|
2025
|
+
return {
|
|
2026
|
+
kind: "iframe",
|
|
2027
|
+
provider: "youtube",
|
|
2028
|
+
src: `https://www.youtube-nocookie.com/embed/${id}`,
|
|
2029
|
+
aspectRatio: "16:9"
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
// src/format/talk-slug.ts
|
|
2034
|
+
var MAX_SLUG_LENGTH = 60;
|
|
2035
|
+
var COMBINING_MARKS2 = /[̀-ͯ]/g;
|
|
2036
|
+
function slugifyTitle(title) {
|
|
2037
|
+
const slug = title.normalize("NFKD").replace(COMBINING_MARKS2, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
2038
|
+
return slug.slice(0, MAX_SLUG_LENGTH).replace(/-+$/g, "");
|
|
2039
|
+
}
|
|
2040
|
+
function buildTalkSlug(title, rkey) {
|
|
2041
|
+
const slug = slugifyTitle(title);
|
|
2042
|
+
return slug ? `${slug}-${rkey}` : rkey;
|
|
2043
|
+
}
|
|
2044
|
+
function parseTalkRkey(segment) {
|
|
2045
|
+
const idx = segment.lastIndexOf("-");
|
|
2046
|
+
return idx === -1 ? segment : segment.slice(idx + 1);
|
|
2047
|
+
}
|
|
2048
|
+
|
|
1907
2049
|
// src/format/text-sanitize.ts
|
|
1908
2050
|
var COMBINING_MARK = /\p{M}/u;
|
|
1909
2051
|
var BIDI_CONTROLS = /[--]/gu;
|
|
@@ -3985,6 +4127,12 @@ function groupInvolvementByHeading(items) {
|
|
|
3985
4127
|
}
|
|
3986
4128
|
return groups;
|
|
3987
4129
|
}
|
|
4130
|
+
var BlobRefSchema = zod.z.object({
|
|
4131
|
+
$type: zod.z.literal("blob"),
|
|
4132
|
+
ref: zod.z.object({ $link: zod.z.string().min(1) }),
|
|
4133
|
+
mimeType: zod.z.string().min(1).max(255),
|
|
4134
|
+
size: zod.z.number().int().nonnegative()
|
|
4135
|
+
});
|
|
3988
4136
|
var EndorsementConfirmationRecordSchema = zod.z.object({
|
|
3989
4137
|
endorsement: strongRefSchema,
|
|
3990
4138
|
createdAt: datetimeSchema
|
|
@@ -4300,8 +4448,18 @@ var ProfilePresentationRecordSchema = zod.z.object({
|
|
|
4300
4448
|
// Optional reference to a long-form write-up (pub.leaflet.document or
|
|
4301
4449
|
// site.standard.document). Plain at-uri + optional cid so it tracks edits.
|
|
4302
4450
|
writeupRef: externalRecordRefSchema.optional(),
|
|
4451
|
+
// Optional uploaded cover image for the talk page.
|
|
4452
|
+
coverImage: BlobRefSchema.optional(),
|
|
4303
4453
|
createdAt: datetimeSchema
|
|
4304
4454
|
});
|
|
4455
|
+
var communityAddressSchema = zod.z.object({
|
|
4456
|
+
country: zod.z.string().optional(),
|
|
4457
|
+
postalCode: zod.z.string().optional(),
|
|
4458
|
+
region: zod.z.string().optional(),
|
|
4459
|
+
locality: zod.z.string().optional(),
|
|
4460
|
+
street: zod.z.string().optional(),
|
|
4461
|
+
name: zod.z.string().optional()
|
|
4462
|
+
});
|
|
4305
4463
|
var ProfilePresentationDeliveryRecordSchema = zod.z.object({
|
|
4306
4464
|
// Optional reference to the id.sifa.profile.presentation delivered here.
|
|
4307
4465
|
presentationRef: externalRecordRefSchema.optional(),
|
|
@@ -4312,6 +4470,9 @@ var ProfilePresentationDeliveryRecordSchema = zod.z.object({
|
|
|
4312
4470
|
// Calendar date as YYYY-MM-DD (day only).
|
|
4313
4471
|
date: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "date must be YYYY-MM-DD").optional(),
|
|
4314
4472
|
location: zod.z.string().refine(maxGraphemes(256)).max(2560).optional(),
|
|
4473
|
+
// Structured community.lexicon.location.address for the occasion. The
|
|
4474
|
+
// free-text `location` string above stays as a legacy fallback.
|
|
4475
|
+
address: communityAddressSchema.optional(),
|
|
4315
4476
|
mode: zod.z.string().optional(),
|
|
4316
4477
|
status: zod.z.string().optional(),
|
|
4317
4478
|
links: zod.z.array(PresentationLinkSchema).max(20).optional(),
|
|
@@ -4379,7 +4540,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
4379
4540
|
});
|
|
4380
4541
|
|
|
4381
4542
|
// src/index.ts
|
|
4382
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4543
|
+
var SIFA_SDK_VERSION = "0.12.13";
|
|
4383
4544
|
|
|
4384
4545
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
4385
4546
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -4394,6 +4555,7 @@ exports.ARTIFACT_LINK_KIND_LABELS = ARTIFACT_LINK_KIND_LABELS;
|
|
|
4394
4555
|
exports.ARTIFACT_LINK_KIND_OPTIONS = ARTIFACT_LINK_KIND_OPTIONS;
|
|
4395
4556
|
exports.ArtifactLinkSchema = ArtifactLinkSchema;
|
|
4396
4557
|
exports.AtmosphereFeedItemSchema = AtmosphereFeedItemSchema;
|
|
4558
|
+
exports.BlobRefSchema = BlobRefSchema;
|
|
4397
4559
|
exports.CALENDAR_EVENT_MODE_LABELS = CALENDAR_EVENT_MODE_LABELS;
|
|
4398
4560
|
exports.CALENDAR_EVENT_STATUS_LABELS = CALENDAR_EVENT_STATUS_LABELS;
|
|
4399
4561
|
exports.CATEGORY_LABELS = CATEGORY_LABELS;
|
|
@@ -4475,6 +4637,7 @@ exports.VERIFICATION_PROVIDERS = VERIFICATION_PROVIDERS;
|
|
|
4475
4637
|
exports.WORKPLACE_TYPE_LABELS = WORKPLACE_TYPE_LABELS;
|
|
4476
4638
|
exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
|
|
4477
4639
|
exports.atUriSchema = atUriSchema;
|
|
4640
|
+
exports.buildTalkSlug = buildTalkSlug;
|
|
4478
4641
|
exports.categoryForApp = categoryForApp;
|
|
4479
4642
|
exports.certDateExtractor = certDateExtractor;
|
|
4480
4643
|
exports.cidSchema = cidSchema;
|
|
@@ -4570,6 +4733,7 @@ exports.openToValueToToken = openToValueToToken;
|
|
|
4570
4733
|
exports.parseIntendedAudiences = parseIntendedAudiences;
|
|
4571
4734
|
exports.parseLocationString = parseLocationString;
|
|
4572
4735
|
exports.parsePresentationDuration = parsePresentationDuration;
|
|
4736
|
+
exports.parseTalkRkey = parseTalkRkey;
|
|
4573
4737
|
exports.partialDateSchema = partialDateSchema;
|
|
4574
4738
|
exports.pdsProviderFromApi = pdsProviderFromApi;
|
|
4575
4739
|
exports.pickPrimaryPosition = pickPrimaryPosition;
|
|
@@ -4581,6 +4745,7 @@ exports.qualifiesAsOrg = qualifiesAsOrg;
|
|
|
4581
4745
|
exports.relativeLuminance = relativeLuminance;
|
|
4582
4746
|
exports.resolveCardHealth = resolveCardHealth;
|
|
4583
4747
|
exports.resolveCardUrl = resolveCardUrl;
|
|
4748
|
+
exports.resolveEmbed = resolveEmbed;
|
|
4584
4749
|
exports.resolveVerifierProvider = resolveVerifierProvider;
|
|
4585
4750
|
exports.rgbToString = rgbToString;
|
|
4586
4751
|
exports.sanitizeDisplayText = sanitizeDisplayText;
|
|
@@ -4588,6 +4753,7 @@ exports.sanitizeHandleInput = sanitizeHandleInput;
|
|
|
4588
4753
|
exports.searchResultDisambiguation = searchResultDisambiguation;
|
|
4589
4754
|
exports.selfLabelsSchema = selfLabelsSchema;
|
|
4590
4755
|
exports.singleDateExtractor = singleDateExtractor;
|
|
4756
|
+
exports.slugifyTitle = slugifyTitle;
|
|
4591
4757
|
exports.sortByActiveDateRange = sortByActiveDateRange;
|
|
4592
4758
|
exports.sortByDateDesc = sortByDateDesc;
|
|
4593
4759
|
exports.sortCertifications = sortCertifications;
|
|
@@ -4618,5 +4784,7 @@ exports.truncateGraphemes = truncateGraphemes;
|
|
|
4618
4784
|
exports.uriSchema = uriSchema;
|
|
4619
4785
|
exports.verbForCollection = verbForCollection;
|
|
4620
4786
|
exports.visibleItems = visibleItems;
|
|
4787
|
+
exports.youtubeThumbnailUrl = youtubeThumbnailUrl;
|
|
4788
|
+
exports.youtubeVideoId = youtubeVideoId;
|
|
4621
4789
|
//# sourceMappingURL=index.cjs.map
|
|
4622
4790
|
//# sourceMappingURL=index.cjs.map
|