File tree Expand file tree Collapse file tree 3 files changed +55
-2
lines changed Expand file tree Collapse file tree 3 files changed +55
-2
lines changed Original file line number Diff line number Diff line change 1- dist
1+ dist
2+ types /** /* .d.ts
Original file line number Diff line number Diff line change 88 "jsnext:main" : " dist/VueFinalModal.esm.js" ,
99 "unpkg" : " dist/VueFinalModal.umd.js" ,
1010 "jsdelivr" : " dist/VueFinalModal.umd.js" ,
11+ "types" : " types/index.d.ts" ,
1112 "files" : [
1213 " lib" ,
13- " dist"
14+ " dist" ,
15+ " types/index.d.ts"
1416 ],
1517 "scripts" : {
1618 "build" : " rollup -c" ,
Original file line number Diff line number Diff line change 1+ import {
2+ App ,
3+ Ref ,
4+ SetupContext ,
5+ EmitsOptions ,
6+ ComponentPublicInstance
7+ } from 'vue'
8+
9+ interface VueFinalModal {
10+ install ( app : App ) : void
11+ }
12+
13+ interface VueFinalModalInfo {
14+ uid : symbol
15+ name : string
16+ emit : SetupContext < EmitsOptions >
17+ vfmContent : Ref < HTMLDivElement >
18+ getAttachElement ( ) : false | HTMLElement
19+ modalStackIndex : Ref < number | null >
20+ visibility : {
21+ modal : boolean
22+ overlay : boolean
23+ }
24+ handleLockScroll ( ) : void
25+ hideOverlay : boolean
26+ focusTrap : boolean
27+ }
28+
29+ export type VueFinalModalComponent = ComponentPublicInstance & {
30+ vfmContainer : HTMLDivElement ,
31+ vfmContent : HTMLDivElement
32+ }
33+
34+ export type VusFinalModalProperty = {
35+ openedModals : VueFinalModalInfo [ ]
36+ modals : VueFinalModalInfo [ ]
37+ show ( name : string ) : void
38+ hide ( name : string ) : void
39+ hideAll ( ) : void
40+ toggle ( name : string , show : boolean ) : void
41+ }
42+
43+ declare module '@vue/runtime-core' {
44+ interface ComponentCustomProperties {
45+ readonly $vfm : VusFinalModalProperty
46+ }
47+ }
48+
49+ declare const VueFinalModal : VueFinalModal
50+ export default VueFinalModal
You can’t perform that action at this time.
0 commit comments