silverbullet/packages/common/manifest.ts

29 lines
846 B
TypeScript
Raw Normal View History

2022-10-03 23:43:36 +08:00
import * as plugos from "../plugos/types.ts";
import { EndpointHookT } from "../plugos/hooks/endpoint.ts";
import { CronHookT } from "../plugos/hooks/node_cron.ts";
import { EventHookT } from "../plugos/hooks/event.ts";
import { CommandHookT } from "../web/hooks/command.ts";
import { SlashCommandHookT } from "../web/hooks/slash_command.ts";
import { PageNamespaceHookT } from "../server/hooks/page_namespace.ts";
2022-10-03 23:43:36 +08:00
export type SilverBulletHooks =
& CommandHookT
& SlashCommandHookT
& EndpointHookT
& CronHookT
& EventHookT
& PageNamespaceHookT;
2022-03-21 22:21:34 +08:00
2022-04-12 02:34:09 +08:00
export type SyntaxExtensions = {
syntax?: { [key: string]: NodeDef };
};
export type NodeDef = {
firstCharacters: string[];
regex: string;
styles: { [key: string]: string };
2022-08-29 22:16:55 +08:00
className?: string;
2022-04-12 02:34:09 +08:00
};
export type Manifest = plugos.Manifest<SilverBulletHooks> & SyntaxExtensions;