Files
_hublib-web/packages/content-suggestions/dist/core/index.d.ts

38 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-04-03 16:10:45 +03:00
interface BaseEntity {
start: number;
end: number;
text: string;
}
interface MentionEntity extends BaseEntity {
type: "mention";
displayText: string;
userId?: string;
}
interface TagEntity extends BaseEntity {
type: "tag";
tag: string;
}
interface LinkEntity extends BaseEntity {
type: "link";
url: string;
}
type ContentEntity = MentionEntity | TagEntity | LinkEntity;
interface ParsedMention {
mention: string;
id: string;
}
interface ProcessedContent {
processedText: string;
tags: string[];
}
declare const mentionLinkRegexp: RegExp;
declare const parseMention: (mention: string) => ParsedMention | null;
declare const findMentions: (text: string) => MentionEntity[];
declare const findTags: (content: string) => TagEntity[];
declare const findLinks: (content: string) => LinkEntity[];
declare const findAllEntities: (content: string) => ContentEntity[];
declare const processContent: (content: string) => ProcessedContent;
2026-04-03 16:10:45 +03:00
export { type BaseEntity, type ContentEntity, type LinkEntity, type MentionEntity, type ParsedMention, type ProcessedContent, type TagEntity, findAllEntities, findLinks, findMentions, findTags, mentionLinkRegexp, parseMention, processContent };