26 lines
827 B
TypeScript
Raw Normal View History

2023-06-07 22:27:32 -07:00
import { ComponentType, JSX } from "preact"
import { StaticResources } from "../resources"
import { QuartzPluginData } from "../plugins/vfile"
import { GlobalConfiguration } from "../cfg"
2023-06-09 23:06:02 -07:00
import { Node } from "hast"
2023-06-03 15:07:19 -04:00
2023-06-07 22:27:32 -07:00
export type QuartzComponentProps = {
externalResources: StaticResources
fileData: QuartzPluginData
cfg: GlobalConfiguration
2023-07-02 13:08:29 -07:00
children: (QuartzComponent | JSX.Element)[]
2023-06-09 23:06:02 -07:00
tree: Node<QuartzPluginData>
2023-06-19 20:37:45 -07:00
allFiles: QuartzPluginData[]
displayClass?: 'mobile-only' | 'desktop-only'
} & JSX.IntrinsicAttributes & {
[key: string]: any
2023-06-07 22:27:32 -07:00
}
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
2023-06-03 15:07:19 -04:00
css?: string,
beforeDOMLoaded?: string,
afterDOMLoaded?: string,
}
2023-06-11 23:46:38 -07:00
export type QuartzComponentConstructor<Options extends object | undefined = undefined> = (opts: Options) => QuartzComponent