UNPKG

@extclp/vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

1 lines 1.84 kB
{"version":3,"file":"symbol.mjs","sources":["../../../components/tour/symbol.ts"],"sourcesContent":["import type { InjectionKey, MaybeRef } from 'vue'\r\nimport type { MaybeElement, MaybeInstance, Placement } from '@vexip-ui/hooks'\r\nimport type { BubbleType } from '@/components/bubble'\r\n\r\nexport type TourType = BubbleType\r\nexport type TourSignType = 'dot' | 'bar' | 'count'\r\n\r\nexport interface TourVirtual {\r\n getBoundingClientRect(): { top: number, left: number, width: number, height: number },\r\n}\r\n\r\nexport type TourTarget =\r\n | MaybeRef<string | MaybeInstance | TourVirtual>\r\n | (() => string | MaybeElement | TourVirtual)\r\n\r\nexport interface TourPayload {\r\n start(): void,\r\n prev(): void,\r\n next(autoClose?: boolean): void,\r\n close(): void,\r\n}\r\n\r\nexport type TourStepRenderFn = (payload: TourPayload) => any\r\n\r\nexport interface TourStepOptions {\r\n target?: TourTarget,\r\n placement?: Placement,\r\n title?: string,\r\n content?: string,\r\n order?: number,\r\n type?: TourType,\r\n renderer?: TourStepRenderFn,\r\n}\r\n\r\nexport type TourSlotParams = TourPayload & { step: TourStepOptions, index: number }\r\nexport type TourCommonSLot = (params: TourSlotParams) => any\r\n\r\nexport interface TourState {\r\n increaseStep(step: TourStepOptions): void,\r\n decreaseStep(step: TourStepOptions): void,\r\n}\r\n\r\nexport interface TourSlots {\r\n /**\r\n * @internal\r\n */\r\n default?: () => any,\r\n header?: TourCommonSLot,\r\n title?: TourCommonSLot,\r\n close?: TourCommonSLot,\r\n body?: TourCommonSLot,\r\n footer?: TourCommonSLot,\r\n sign?: TourCommonSLot,\r\n actions?: TourCommonSLot,\r\n}\r\n\r\nexport const TOUR_STATE = '___VXP_TOUR_STATE' as unknown as InjectionKey<TourState>\r\n"],"names":["TOUR_STATE"],"mappings":"AAwDO,MAAMA,IAAa;"}