@singi-labs/sifa-sdk 0.9.3 → 0.9.5
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/README.md +12 -1
- package/dist/index.cjs +580 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -1
- package/dist/index.d.ts +140 -1
- package/dist/index.js +570 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -94,6 +94,10 @@ declare function getWorkplaceTypeLabel(value: string | undefined | null): string
|
|
|
94
94
|
declare const PLATFORM_LABELS: {
|
|
95
95
|
readonly bluesky: "Bluesky";
|
|
96
96
|
readonly github: "GitHub";
|
|
97
|
+
readonly codeberg: "Codeberg";
|
|
98
|
+
readonly gitlab: "GitLab";
|
|
99
|
+
readonly forgejo: "Forgejo";
|
|
100
|
+
readonly gitea: "Gitea";
|
|
97
101
|
readonly linkedin: "LinkedIn";
|
|
98
102
|
readonly youtube: "YouTube";
|
|
99
103
|
readonly twitter: "X (Twitter)";
|
|
@@ -166,6 +170,47 @@ declare function dedupeSkills(skills: ProfileSkill[]): MergedProfileSkill[];
|
|
|
166
170
|
*/
|
|
167
171
|
declare function groupSkillsByCategory<T extends ProfileSkill>(skills: T[]): [string, T[]][];
|
|
168
172
|
|
|
173
|
+
type ActivityTier = 'creation' | 'action' | 'filtered';
|
|
174
|
+
interface TierMeta {
|
|
175
|
+
label: string | null;
|
|
176
|
+
description: string;
|
|
177
|
+
shownOnPublicProfile: boolean;
|
|
178
|
+
}
|
|
179
|
+
interface LexiconEntry {
|
|
180
|
+
tier: ActivityTier;
|
|
181
|
+
app?: string;
|
|
182
|
+
notes?: string;
|
|
183
|
+
}
|
|
184
|
+
interface ActivityTaxonomy {
|
|
185
|
+
version: string;
|
|
186
|
+
updated: string;
|
|
187
|
+
tiers: Record<ActivityTier, TierMeta>;
|
|
188
|
+
lexicons: Record<string, LexiconEntry>;
|
|
189
|
+
}
|
|
190
|
+
declare const ACTIVITY_TIERS: Readonly<ActivityTaxonomy>;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the activity tier for a given AT Protocol NSID.
|
|
193
|
+
* Returns 'filtered' for unknown/unclassified NSIDs (safe default — won't
|
|
194
|
+
* leak unknown records to public profile surfaces).
|
|
195
|
+
*/
|
|
196
|
+
declare function getActivityTier(nsid: string): ActivityTier;
|
|
197
|
+
/**
|
|
198
|
+
* Returns the full lexicon entry (tier + app + notes), or null if unknown.
|
|
199
|
+
*/
|
|
200
|
+
declare function getLexiconEntry(nsid: string): LexiconEntry | null;
|
|
201
|
+
/**
|
|
202
|
+
* Returns tier metadata (label, description, public visibility).
|
|
203
|
+
*/
|
|
204
|
+
declare function getTierMeta(tier: ActivityTier): TierMeta;
|
|
205
|
+
/**
|
|
206
|
+
* Returns the taxonomy version + updated date for diagnostics and
|
|
207
|
+
* version-skew detection between SDK consumers and the canonical taxonomy.
|
|
208
|
+
*/
|
|
209
|
+
declare function getActivityTaxonomyVersion(): {
|
|
210
|
+
version: string;
|
|
211
|
+
updated: string;
|
|
212
|
+
};
|
|
213
|
+
|
|
169
214
|
/**
|
|
170
215
|
* Format a date string as a relative time (e.g. "5m ago", "3d ago").
|
|
171
216
|
* Returns an empty string for invalid or future dates.
|
|
@@ -259,6 +304,27 @@ declare function getDisplayLabel(displayName: string | undefined, handle: string
|
|
|
259
304
|
declare function getPdsDisplayName(providerName: string): string;
|
|
260
305
|
declare function detectPdsProvider(handle: string): PdsProvider | null;
|
|
261
306
|
|
|
307
|
+
/**
|
|
308
|
+
* Limit runs of Unicode combining marks (`\p{M}`) to at most `maxPerBase`
|
|
309
|
+
* marks following any single base character. Defuses "Zalgo" text where
|
|
310
|
+
* dozens of stacked combining marks render outside the line box and bleed
|
|
311
|
+
* into neighbouring UI.
|
|
312
|
+
*
|
|
313
|
+
* `maxPerBase` defaults to 4 — high enough to preserve legitimate stacks
|
|
314
|
+
* in Thai, Arabic, Vietnamese, and IPA, low enough to neutralise the
|
|
315
|
+
* vertical-overflow attack vector.
|
|
316
|
+
*/
|
|
317
|
+
declare function limitCombiningMarks(value: string, maxPerBase?: number): string;
|
|
318
|
+
/**
|
|
319
|
+
* Sanitise untrusted display text from PDS records before rendering in UI:
|
|
320
|
+
* - strips bidi formatting controls (LRM/RLM/LRE/RLE/PDF/LRO/RLO/LRI/RLI/FSI/PDI)
|
|
321
|
+
* that can hijack reading order or crash `next/og` (see Satori LRM+emoji bug)
|
|
322
|
+
* - limits stacked combining marks (Zalgo defence)
|
|
323
|
+
*
|
|
324
|
+
* Preserves ZWJ (U+200D) so emoji sequences keep rendering.
|
|
325
|
+
*/
|
|
326
|
+
declare function sanitizeDisplayText(value: string, maxCombiningPerBase?: number): string;
|
|
327
|
+
|
|
262
328
|
/**
|
|
263
329
|
* Truncate a string to at most `maxLen` grapheme clusters, appending an
|
|
264
330
|
* ellipsis when the string was shortened. Grapheme-aware so it never splits
|
|
@@ -306,6 +372,79 @@ declare function contrastRatio(color1: RgbColor, color2: RgbColor): number;
|
|
|
306
372
|
*/
|
|
307
373
|
declare function meetsContrastAA(foreground: RgbColor, background: RgbColor): boolean;
|
|
308
374
|
|
|
375
|
+
/**
|
|
376
|
+
* URL patterns per app, mirroring the sifa-web registry.
|
|
377
|
+
*
|
|
378
|
+
* These describe how to build a clickable URL for an activity card given
|
|
379
|
+
* the author's handle/did and the record rkey. The patterns are templates
|
|
380
|
+
* with `{handle}`, `{did}`, and `{rkey}` placeholders; each variable is
|
|
381
|
+
* URI-encoded when interpolated.
|
|
382
|
+
*
|
|
383
|
+
* Tier semantics:
|
|
384
|
+
* - `urlPattern`: per-item URL (a specific post/event/repo). Preferred.
|
|
385
|
+
* - `profileUrlPattern`: per-user profile URL on the app. Fallback.
|
|
386
|
+
*
|
|
387
|
+
* Apps without either pattern are not clickable.
|
|
388
|
+
*/
|
|
389
|
+
interface AppUrlPatterns {
|
|
390
|
+
urlPattern?: string;
|
|
391
|
+
profileUrlPattern?: string;
|
|
392
|
+
}
|
|
393
|
+
declare const APP_URL_PATTERNS: Readonly<Record<string, AppUrlPatterns>>;
|
|
394
|
+
/**
|
|
395
|
+
* Map collection NSID prefixes to app ids. Order matters: longer / more
|
|
396
|
+
* specific prefixes must come before broader ones.
|
|
397
|
+
*/
|
|
398
|
+
declare const COLLECTION_TO_APP: ReadonlyArray<readonly [prefix: string, appId: string]>;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* An activity item as consumed by the Sifa activity-card components and
|
|
402
|
+
* the sifa-api external-URL health scanner. The shape mirrors the props
|
|
403
|
+
* the cards already use, so the resolver returns the same URL the UI
|
|
404
|
+
* renders.
|
|
405
|
+
*/
|
|
406
|
+
interface ActivityItemForUrl {
|
|
407
|
+
/** Collection NSID, e.g. "sh.tangled.graph.repo". */
|
|
408
|
+
collection: string;
|
|
409
|
+
/** The raw record from the PDS / API. */
|
|
410
|
+
record: Record<string, unknown>;
|
|
411
|
+
/** Full at-uri of the record (used by collections that derive URL from uri). */
|
|
412
|
+
uri: string;
|
|
413
|
+
/** Record key. */
|
|
414
|
+
rkey: string;
|
|
415
|
+
/** DID of the author of the record. */
|
|
416
|
+
authorDid: string;
|
|
417
|
+
/** Optional handle (cards prefer handle in URL paths when available). */
|
|
418
|
+
authorHandle?: string;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Map a collection NSID to its app id, mirroring the sifa-web prefix map.
|
|
422
|
+
*
|
|
423
|
+
* Falls back to the first two NSID segments (e.g. "org.hyperboards") when
|
|
424
|
+
* the prefix is not registered, matching the existing card behaviour.
|
|
425
|
+
*/
|
|
426
|
+
declare function getAppIdForCollection(collection: string): string;
|
|
427
|
+
/**
|
|
428
|
+
* Resolve the canonical clickable URL for an activity item — the same URL
|
|
429
|
+
* the activity-card UI in sifa-web renders.
|
|
430
|
+
*
|
|
431
|
+
* Returns `null` when no link is appropriate (the card would render
|
|
432
|
+
* non-clickable, or hide itself entirely).
|
|
433
|
+
*
|
|
434
|
+
* Used by:
|
|
435
|
+
* - sifa-web activity cards (single source of truth for href)
|
|
436
|
+
* - sifa-api external-URL health scanner (must match what the UI links to,
|
|
437
|
+
* so broken-link detection lines up with what users actually click)
|
|
438
|
+
*
|
|
439
|
+
* Resolution order:
|
|
440
|
+
* 1. Per-collection bespoke logic (tangled, kipclip, margin, smokesignal
|
|
441
|
+
* rsvp, standard documents). These mirror the inline logic in the
|
|
442
|
+
* individual card components.
|
|
443
|
+
* 2. Generic `record.url` field (used by hyperboards and similar).
|
|
444
|
+
* 3. Pattern-based per-item / profile URL from the registry.
|
|
445
|
+
*/
|
|
446
|
+
declare function resolveCardUrl(item: ActivityItemForUrl): string | null;
|
|
447
|
+
|
|
309
448
|
/**
|
|
310
449
|
* Profile completeness scoring.
|
|
311
450
|
*
|
|
@@ -393,4 +532,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
393
532
|
*/
|
|
394
533
|
declare const SIFA_SDK_VERSION: string;
|
|
395
534
|
|
|
396
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, INDUSTRY_OPTIONS, type IndustryOption, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
535
|
+
export { ACTIVITY_TIERS, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppUrlPatterns, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, INDUSTRY_OPTIONS, type IndustryOption, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, type TierMeta, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,10 @@ declare function getWorkplaceTypeLabel(value: string | undefined | null): string
|
|
|
94
94
|
declare const PLATFORM_LABELS: {
|
|
95
95
|
readonly bluesky: "Bluesky";
|
|
96
96
|
readonly github: "GitHub";
|
|
97
|
+
readonly codeberg: "Codeberg";
|
|
98
|
+
readonly gitlab: "GitLab";
|
|
99
|
+
readonly forgejo: "Forgejo";
|
|
100
|
+
readonly gitea: "Gitea";
|
|
97
101
|
readonly linkedin: "LinkedIn";
|
|
98
102
|
readonly youtube: "YouTube";
|
|
99
103
|
readonly twitter: "X (Twitter)";
|
|
@@ -166,6 +170,47 @@ declare function dedupeSkills(skills: ProfileSkill[]): MergedProfileSkill[];
|
|
|
166
170
|
*/
|
|
167
171
|
declare function groupSkillsByCategory<T extends ProfileSkill>(skills: T[]): [string, T[]][];
|
|
168
172
|
|
|
173
|
+
type ActivityTier = 'creation' | 'action' | 'filtered';
|
|
174
|
+
interface TierMeta {
|
|
175
|
+
label: string | null;
|
|
176
|
+
description: string;
|
|
177
|
+
shownOnPublicProfile: boolean;
|
|
178
|
+
}
|
|
179
|
+
interface LexiconEntry {
|
|
180
|
+
tier: ActivityTier;
|
|
181
|
+
app?: string;
|
|
182
|
+
notes?: string;
|
|
183
|
+
}
|
|
184
|
+
interface ActivityTaxonomy {
|
|
185
|
+
version: string;
|
|
186
|
+
updated: string;
|
|
187
|
+
tiers: Record<ActivityTier, TierMeta>;
|
|
188
|
+
lexicons: Record<string, LexiconEntry>;
|
|
189
|
+
}
|
|
190
|
+
declare const ACTIVITY_TIERS: Readonly<ActivityTaxonomy>;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the activity tier for a given AT Protocol NSID.
|
|
193
|
+
* Returns 'filtered' for unknown/unclassified NSIDs (safe default — won't
|
|
194
|
+
* leak unknown records to public profile surfaces).
|
|
195
|
+
*/
|
|
196
|
+
declare function getActivityTier(nsid: string): ActivityTier;
|
|
197
|
+
/**
|
|
198
|
+
* Returns the full lexicon entry (tier + app + notes), or null if unknown.
|
|
199
|
+
*/
|
|
200
|
+
declare function getLexiconEntry(nsid: string): LexiconEntry | null;
|
|
201
|
+
/**
|
|
202
|
+
* Returns tier metadata (label, description, public visibility).
|
|
203
|
+
*/
|
|
204
|
+
declare function getTierMeta(tier: ActivityTier): TierMeta;
|
|
205
|
+
/**
|
|
206
|
+
* Returns the taxonomy version + updated date for diagnostics and
|
|
207
|
+
* version-skew detection between SDK consumers and the canonical taxonomy.
|
|
208
|
+
*/
|
|
209
|
+
declare function getActivityTaxonomyVersion(): {
|
|
210
|
+
version: string;
|
|
211
|
+
updated: string;
|
|
212
|
+
};
|
|
213
|
+
|
|
169
214
|
/**
|
|
170
215
|
* Format a date string as a relative time (e.g. "5m ago", "3d ago").
|
|
171
216
|
* Returns an empty string for invalid or future dates.
|
|
@@ -259,6 +304,27 @@ declare function getDisplayLabel(displayName: string | undefined, handle: string
|
|
|
259
304
|
declare function getPdsDisplayName(providerName: string): string;
|
|
260
305
|
declare function detectPdsProvider(handle: string): PdsProvider | null;
|
|
261
306
|
|
|
307
|
+
/**
|
|
308
|
+
* Limit runs of Unicode combining marks (`\p{M}`) to at most `maxPerBase`
|
|
309
|
+
* marks following any single base character. Defuses "Zalgo" text where
|
|
310
|
+
* dozens of stacked combining marks render outside the line box and bleed
|
|
311
|
+
* into neighbouring UI.
|
|
312
|
+
*
|
|
313
|
+
* `maxPerBase` defaults to 4 — high enough to preserve legitimate stacks
|
|
314
|
+
* in Thai, Arabic, Vietnamese, and IPA, low enough to neutralise the
|
|
315
|
+
* vertical-overflow attack vector.
|
|
316
|
+
*/
|
|
317
|
+
declare function limitCombiningMarks(value: string, maxPerBase?: number): string;
|
|
318
|
+
/**
|
|
319
|
+
* Sanitise untrusted display text from PDS records before rendering in UI:
|
|
320
|
+
* - strips bidi formatting controls (LRM/RLM/LRE/RLE/PDF/LRO/RLO/LRI/RLI/FSI/PDI)
|
|
321
|
+
* that can hijack reading order or crash `next/og` (see Satori LRM+emoji bug)
|
|
322
|
+
* - limits stacked combining marks (Zalgo defence)
|
|
323
|
+
*
|
|
324
|
+
* Preserves ZWJ (U+200D) so emoji sequences keep rendering.
|
|
325
|
+
*/
|
|
326
|
+
declare function sanitizeDisplayText(value: string, maxCombiningPerBase?: number): string;
|
|
327
|
+
|
|
262
328
|
/**
|
|
263
329
|
* Truncate a string to at most `maxLen` grapheme clusters, appending an
|
|
264
330
|
* ellipsis when the string was shortened. Grapheme-aware so it never splits
|
|
@@ -306,6 +372,79 @@ declare function contrastRatio(color1: RgbColor, color2: RgbColor): number;
|
|
|
306
372
|
*/
|
|
307
373
|
declare function meetsContrastAA(foreground: RgbColor, background: RgbColor): boolean;
|
|
308
374
|
|
|
375
|
+
/**
|
|
376
|
+
* URL patterns per app, mirroring the sifa-web registry.
|
|
377
|
+
*
|
|
378
|
+
* These describe how to build a clickable URL for an activity card given
|
|
379
|
+
* the author's handle/did and the record rkey. The patterns are templates
|
|
380
|
+
* with `{handle}`, `{did}`, and `{rkey}` placeholders; each variable is
|
|
381
|
+
* URI-encoded when interpolated.
|
|
382
|
+
*
|
|
383
|
+
* Tier semantics:
|
|
384
|
+
* - `urlPattern`: per-item URL (a specific post/event/repo). Preferred.
|
|
385
|
+
* - `profileUrlPattern`: per-user profile URL on the app. Fallback.
|
|
386
|
+
*
|
|
387
|
+
* Apps without either pattern are not clickable.
|
|
388
|
+
*/
|
|
389
|
+
interface AppUrlPatterns {
|
|
390
|
+
urlPattern?: string;
|
|
391
|
+
profileUrlPattern?: string;
|
|
392
|
+
}
|
|
393
|
+
declare const APP_URL_PATTERNS: Readonly<Record<string, AppUrlPatterns>>;
|
|
394
|
+
/**
|
|
395
|
+
* Map collection NSID prefixes to app ids. Order matters: longer / more
|
|
396
|
+
* specific prefixes must come before broader ones.
|
|
397
|
+
*/
|
|
398
|
+
declare const COLLECTION_TO_APP: ReadonlyArray<readonly [prefix: string, appId: string]>;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* An activity item as consumed by the Sifa activity-card components and
|
|
402
|
+
* the sifa-api external-URL health scanner. The shape mirrors the props
|
|
403
|
+
* the cards already use, so the resolver returns the same URL the UI
|
|
404
|
+
* renders.
|
|
405
|
+
*/
|
|
406
|
+
interface ActivityItemForUrl {
|
|
407
|
+
/** Collection NSID, e.g. "sh.tangled.graph.repo". */
|
|
408
|
+
collection: string;
|
|
409
|
+
/** The raw record from the PDS / API. */
|
|
410
|
+
record: Record<string, unknown>;
|
|
411
|
+
/** Full at-uri of the record (used by collections that derive URL from uri). */
|
|
412
|
+
uri: string;
|
|
413
|
+
/** Record key. */
|
|
414
|
+
rkey: string;
|
|
415
|
+
/** DID of the author of the record. */
|
|
416
|
+
authorDid: string;
|
|
417
|
+
/** Optional handle (cards prefer handle in URL paths when available). */
|
|
418
|
+
authorHandle?: string;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Map a collection NSID to its app id, mirroring the sifa-web prefix map.
|
|
422
|
+
*
|
|
423
|
+
* Falls back to the first two NSID segments (e.g. "org.hyperboards") when
|
|
424
|
+
* the prefix is not registered, matching the existing card behaviour.
|
|
425
|
+
*/
|
|
426
|
+
declare function getAppIdForCollection(collection: string): string;
|
|
427
|
+
/**
|
|
428
|
+
* Resolve the canonical clickable URL for an activity item — the same URL
|
|
429
|
+
* the activity-card UI in sifa-web renders.
|
|
430
|
+
*
|
|
431
|
+
* Returns `null` when no link is appropriate (the card would render
|
|
432
|
+
* non-clickable, or hide itself entirely).
|
|
433
|
+
*
|
|
434
|
+
* Used by:
|
|
435
|
+
* - sifa-web activity cards (single source of truth for href)
|
|
436
|
+
* - sifa-api external-URL health scanner (must match what the UI links to,
|
|
437
|
+
* so broken-link detection lines up with what users actually click)
|
|
438
|
+
*
|
|
439
|
+
* Resolution order:
|
|
440
|
+
* 1. Per-collection bespoke logic (tangled, kipclip, margin, smokesignal
|
|
441
|
+
* rsvp, standard documents). These mirror the inline logic in the
|
|
442
|
+
* individual card components.
|
|
443
|
+
* 2. Generic `record.url` field (used by hyperboards and similar).
|
|
444
|
+
* 3. Pattern-based per-item / profile URL from the registry.
|
|
445
|
+
*/
|
|
446
|
+
declare function resolveCardUrl(item: ActivityItemForUrl): string | null;
|
|
447
|
+
|
|
309
448
|
/**
|
|
310
449
|
* Profile completeness scoring.
|
|
311
450
|
*
|
|
@@ -393,4 +532,4 @@ declare function countFilledDimensions(input: ProfileDimensionInputs | Profile):
|
|
|
393
532
|
*/
|
|
394
533
|
declare const SIFA_SDK_VERSION: string;
|
|
395
534
|
|
|
396
|
-
export { CATEGORY_LABELS, CATEGORY_ORDER, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, INDUSTRY_OPTIONS, type IndustryOption, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, rgbToString, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|
|
535
|
+
export { ACTIVITY_TIERS, APP_URL_PATTERNS, type ActivityItemForUrl, type ActivityTaxonomy, type ActivityTier, type AppUrlPatterns, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, type ContinentCode, DIMENSIONS_MAX_SCORE, type DimensionKey, type DimensionMap, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, type EmploymentTypeGroup, type EmploymentTypeOption, INDUSTRY_OPTIONS, type IndustryOption, type LexiconEntry, LocationValue, MIN_SKILLS, type MergedProfileSkill, OPEN_TO_OPTIONS, type OpenToOption, PLATFORM_LABELS, PLATFORM_OPTIONS, type PdsProvider, PdsProviderInfo, type PlatformId, Profile, type ProfileCompletion, type ProfileDimensionInputs, ProfileSkill, type RgbColor, SIFA_SDK_VERSION, SKILL_CATEGORIES, type SkillCategory, type TierMeta, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, type WorkplaceTypeOption, certDateExtractor, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, dedupeSkills, detectPdsProvider, dimensionsFromInputs, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, isKnownPlatform, isValidRgbColor, lexiconDateExtractor, limitCombiningMarks, meetsContrastAA, parseLocationString, pdsProviderFromApi, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, singleDateExtractor, sortByDateDesc, truncateGraphemes };
|