UNPKG

@inkline/inkline

Version:

Inkline is the Vue.js UI/UX Library built for creating your next design system

55 lines (54 loc) 1.41 kB
import { Plugin } from 'vue'; import { SvgNode } from './types'; export interface PrototypeConfig { colorMode: 'system' | 'light' | 'dark' | string; locale: string; validateOn: string[]; routerComponent: string; color: string; size: string; componentOptions: any; [key: string]: any; } export interface PluginConfig extends PrototypeConfig { components: any; icons: Record<string, SvgNode>; } export interface Prototype { form: (...args: any[]) => any; setLocale: (language: string) => any; options: PrototypeConfig; } export interface InklineGlobals { prototype?: Prototype; icons?: Record<string, SvgNode>; } /** * Color mode localStorage key */ export declare const colorModeLocalStorageKey = "inkline-color-mode"; /** * Color mode change handler */ export declare const handleColorMode: (colorMode: string) => void; /** * Default configuration options */ export declare const defaultOptions: PluginConfig; /** * Create inkline prototype */ export declare function createPrototype({ icons, components, ...options }: PrototypeConfig): Prototype; /** * Easily accessible global Inkline object */ export declare const inklineGlobals: InklineGlobals; /** * Inkline Vue.js plugin */ export declare const Inkline: Plugin; declare module '@vue/runtime-core' { interface ComponentCustomProperties { $inkline: Prototype; } }