Rework documentation URLs as inline markdown. Redesign documentations with markdown text. Redesign way to document scripts/categories and present the documentation. Documentation is showed in an expandable box instead of tooltip. This is to allow writing longer documentation (tooltips are meant to be used for short text) and have better experience on mobile. If a node (script/category) has documentation it's now shown with single information icon (ℹ) aligned to right. Add support for rendering documentation as markdown. It automatically converts plain URLs to URLs with display names (e.g. https://docs.microsoft.com/..) will be rendered automatically like "docs.microsoft.com - Windows 11 Privacy...".
65 lines
1.7 KiB
TypeScript
65 lines
1.7 KiB
TypeScript
declare module '@/application/collections/*' {
|
|
export interface CollectionData {
|
|
readonly os: string;
|
|
readonly scripting: ScriptingDefinitionData;
|
|
readonly actions: ReadonlyArray<CategoryData>;
|
|
readonly functions?: ReadonlyArray<FunctionData>;
|
|
}
|
|
|
|
export interface CategoryData extends DocumentableData {
|
|
readonly children: ReadonlyArray<CategoryOrScriptData>;
|
|
readonly category: string;
|
|
}
|
|
|
|
export type CategoryOrScriptData = CategoryData | ScriptData;
|
|
export type DocumentationData = ReadonlyArray<string> | string;
|
|
|
|
export interface DocumentableData {
|
|
readonly docs?: DocumentationData;
|
|
}
|
|
|
|
export interface InstructionHolder {
|
|
readonly name: string;
|
|
|
|
readonly code?: string;
|
|
readonly revertCode?: string;
|
|
|
|
readonly call?: FunctionCallsData;
|
|
}
|
|
|
|
export interface ParameterDefinitionData {
|
|
readonly name: string;
|
|
readonly optional?: boolean;
|
|
}
|
|
|
|
export interface FunctionData extends InstructionHolder {
|
|
readonly parameters?: readonly ParameterDefinitionData[];
|
|
}
|
|
|
|
export interface FunctionCallParametersData {
|
|
readonly [index: string]: string;
|
|
}
|
|
|
|
export interface FunctionCallData {
|
|
readonly function: string;
|
|
readonly parameters?: FunctionCallParametersData;
|
|
}
|
|
|
|
export type FunctionCallsData = readonly FunctionCallData[] | FunctionCallData | undefined;
|
|
|
|
export interface ScriptData extends InstructionHolder, DocumentableData {
|
|
readonly name: string;
|
|
readonly recommend?: string;
|
|
}
|
|
|
|
export interface ScriptingDefinitionData {
|
|
readonly language: string;
|
|
readonly fileExtension: string;
|
|
readonly startCode: string;
|
|
readonly endCode: string;
|
|
}
|
|
|
|
const content: CollectionData;
|
|
export default content;
|
|
}
|