import { RootConfig } from "./root.js"; import { ConcatSpec as CoreConcatSpec, HConcatSpec as CoreHConcatSpec, ImportSpec, LayerSpec as CoreLayerSpec, MultiscaleSpec as CoreMultiscaleSpec, UnitSpec as CoreUnitSpec, VConcatSpec as CoreVConcatSpec, } from "./view.js"; interface SchemaViewConfig { templates?: Record; } interface UnitSpec extends Omit, SchemaViewConfig {} interface LayerSpec extends Omit, SchemaViewConfig { layer: (LayerSpec | UnitSpec | MultiscaleSpec | ImportSpec)[]; } interface MultiscaleSpec extends Omit, SchemaViewConfig { multiscale: (LayerSpec | UnitSpec | MultiscaleSpec | ImportSpec)[]; } interface VConcatSpec extends Omit, SchemaViewConfig { vconcat: (ViewSpec | ImportSpec)[]; } interface HConcatSpec extends Omit, SchemaViewConfig { hconcat: (ViewSpec | ImportSpec)[]; } interface ConcatSpec extends Omit, SchemaViewConfig { concat: (ViewSpec | ImportSpec)[]; } type ViewSpec = | UnitSpec | LayerSpec | MultiscaleSpec | VConcatSpec | HConcatSpec | ConcatSpec; export type CoreRootSpec = ViewSpec & RootConfig;