import { TemplateResult } from "lit"; import { DirectiveResult } from "lit/async-directive.js"; export type Content = TemplateResult | DirectiveResult | HTMLElement | string | null | undefined | void | Content[]; export type View = (...props: Props) => Content; export type ViewAttr = string | number | boolean; export type ViewAttrs = Record; export type Placement = { props: Props; children?: Content; attrs?: ViewAttrs; }; export type ShadowView = View & { with: (placement: Placement) => Content; }; export type ShadowSetup = { host: HTMLElement; shadow: ShadowRoot; };