2023-06-08 08:27:32 +03:00
|
|
|
import { ComponentType, JSX } from "preact"
|
|
|
|
import { StaticResources } from "../resources"
|
|
|
|
import { QuartzPluginData } from "../plugins/vfile"
|
|
|
|
import { GlobalConfiguration } from "../cfg"
|
2023-06-10 09:06:02 +03:00
|
|
|
import { Node } from "hast"
|
2023-06-03 22:07:19 +03:00
|
|
|
|
2023-06-08 08:27:32 +03:00
|
|
|
export type QuartzComponentProps = {
|
|
|
|
externalResources: StaticResources
|
|
|
|
fileData: QuartzPluginData
|
|
|
|
cfg: GlobalConfiguration
|
|
|
|
children: QuartzComponent[] | JSX.Element[]
|
2023-06-10 09:06:02 +03:00
|
|
|
tree: Node<QuartzPluginData>
|
|
|
|
position?: 'sidebar' | 'header' | 'body'
|
2023-06-08 08:27:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
|
2023-06-03 22:07:19 +03:00
|
|
|
css?: string,
|
|
|
|
beforeDOMLoaded?: string,
|
|
|
|
afterDOMLoaded?: string,
|
|
|
|
}
|