Files
vscode-front-matter/src/models/DashboardData.ts
T
2024-01-29 16:58:25 +01:00

46 lines
921 B
TypeScript

import { Position } from 'vscode';
import { NavigationType } from '../dashboardWebView/models';
import { BlockFieldData } from './BlockFieldData';
import { ContentType } from '.';
export interface DashboardData {
type: NavigationType;
data?: ViewData;
}
export interface ViewData {
filePath?: string;
fieldName?: string;
position?: Position;
fileTitle?: string;
contentType?: ContentType;
selection?: string;
range?: SnippetRange;
snippetInfo?: SnippetInfo;
pageBundle?: boolean;
metadataInsert?: boolean;
blockData?: BlockFieldData;
parents?: string[];
multiple?: string[];
value?: string;
// File fields
type: 'file' | 'media';
fileExtensions?: string[];
}
export interface SnippetRange {
start: Position;
end: Position;
}
export interface SnippetInfo {
id: string;
fields: SnippetInfoField[];
}
export interface SnippetInfoField {
name: string;
value: string;
}