export interface Config { slient: boolean; /** @default 'development' */ mode: string; noop: () => void; CurrentInstance: any; } export type Animate = { animate: (keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions)=> Animation, duration: number, delay: number, setStyle: (options: CSSStyleDeclaration)=> void } type DativeAnimateOptions = { [x:string]: ({ animate,duration,delay, setStyle }:Animate)=> void } type Computed = { [x: string]: Function | { get: Function, set: Function } } export type DataFn = Record; export type Data = Record; export interface DativeOptions { data?: Data; el?: string | Element; methods?: { [x: string]: ()=> any }; template?: string; attach?: DativeComponent; oncreated?(): void; oncreated?(): Promise; onmounted?(): void; onmounted?(): Promise; ondestroy?: () => void; use: Array; computed?: Computed; /** @deprecated Removed In V2-alpha */ update?: ()=> void; /** @deprecated Removed In V2-alpha */ store?: {}; /** @deprecated Removed In V2-alpha Use 'onmounted' */ mounted?: ()=> void; /** @deprecated Removed In V2-alpha Use 'oncreated' */ created?: ()=> void; animate: DativeAnimateOptions; } export type dativeComponentPropsobj = { type?: | StringConstructor | ArrayConstructor | FunctionConstructor | BooleanConstructor | ObjectConstructor | null; }; export type dativeComponentProps = T; export interface DativeComponentOptions { data?: Data; methods?: { [x: string]: () => any }; template?: string; attach?: DativeComponent; oncreated?(): void; oncreated?(): Promise; onmounted?(): void; onmounted?(): Promise; ondestroy?: () => void; use: Array; computed?: Computed; animate: DativeAnimateOptions; css?: string; props?: dativeComponentPropsobj | dativeComponentProps; } export type utlistype = { warn(msg: T, ...other: any[]): void; }; export type Ref = { [x: string]: Element } export default class Dative { constructor(options?: DativeOptions); $el: Element; data: Record; template: string; methods: object; oncreated: Function; onmounted: Function; ondestroy: Function; isUnmounted: boolean; isMounted: boolean; cssId_: string; animate: DativeAnimateOptions; attached: Array; /** @default false */ sanitize: boolean; attach(component: T[]): void; attach(component: T): void; detach(component: T[]): void; detach(component: T): void; use(...args: T[]): void; set(obj: T): void; set(obj: T, value: S): void; $ref: Ref; get(value?: string): Dative; get(value?: string): any; proxy(sourceKey: string, key: string): any; $destroy(): void; /** @returns {Element} for further usuage */ render(): Element; mount(el: S): Dative; mount(el: string): Dative; static defineApp(options: T): Dative; static defineProperty(name: T, callback: Function): void; static extend(options: DativeComponentOptions): typeof DativeComponent; static version: string; static utlis: utlistype; static config: Config; } export type dativeComponentCss = { value: string; transformed: { active: boolean; value: string; }; }; type Props = { [x: string]: any } export type DativeComponentOption = { el: string | Element props: Props attach: DativeComponent | DativeComponent[] } export class DativeComponent extends Dative { constructor(options: DativeComponentOption); cssScoped: string; props: Props; css?: dativeComponentCss; } export function defineApp(options: T): Dative; export function defineProperty(name: T, callback: Function): void; export function warn(msg: T, ...other: any[]): void; export type DativePluginInstall = { Dative: typeof Dative; proto: Dative; instance: Dative; }; export type DativePlugin = ({ instance, proto, Dative, }: DativePluginInstall) => void | { install: ({ instance, proto, Dative }: DativePluginInstall) => void; };