1
1
/**
2
- * vue-meta v3.0.0-alpha.7
2
+ * vue-meta v3.0.0-alpha.8
3
3
* (c) 2021
4
4
* - Pim (@pimlie)
5
5
* - All the amazing contributors
@@ -64,6 +64,110 @@ declare class MetaManager {
64
64
} ) : VNode [ ] ;
65
65
}
66
66
67
+ interface AttributeProperty {
68
+ [ key : string ] : string | string [ ] ;
69
+ }
70
+ interface MetaDataProperty {
71
+ vmid ?: string ;
72
+ once ?: boolean ;
73
+ skip ?: boolean ;
74
+ body ?: boolean ;
75
+ pbody ?: boolean ;
76
+ [ key : string ] : any ;
77
+ }
78
+ interface MetaPropertyCharset extends MetaDataProperty {
79
+ charset : string ;
80
+ }
81
+ interface MetaPropertyEquiv extends MetaDataProperty {
82
+ httpEquiv : string ;
83
+ content : string ;
84
+ }
85
+ interface MetaPropertyTrueEquiv extends MetaDataProperty {
86
+ 'http-equiv' : string ;
87
+ content : string ;
88
+ }
89
+ interface MetaPropertyName extends MetaDataProperty {
90
+ name : string ;
91
+ content : string ;
92
+ }
93
+ interface MetaPropertyMicrodata extends MetaDataProperty {
94
+ itemprop : string ;
95
+ content : string ;
96
+ }
97
+ interface MetaPropertyProperty extends MetaDataProperty {
98
+ property : string ;
99
+ content : string ;
100
+ }
101
+ interface LinkPropertyBase extends MetaDataProperty {
102
+ rel : string ;
103
+ crossOrigin ?: string | null ;
104
+ media ?: string ;
105
+ nonce ?: string ;
106
+ referrerPolicy ?: string ;
107
+ rev ?: string ;
108
+ type ?: string ;
109
+ }
110
+ interface LinkPropertyHref extends LinkPropertyBase {
111
+ href ?: string ;
112
+ hreflang ?: string ;
113
+ callback ?: void ;
114
+ }
115
+ interface LinkPropertyHrefCallback extends LinkPropertyBase {
116
+ vmid : string ;
117
+ href ?: string ;
118
+ hreflang ?: string ;
119
+ }
120
+ interface StyleProperty extends MetaDataProperty {
121
+ cssText : string ;
122
+ media ?: string ;
123
+ nonce ?: string ;
124
+ type ?: string ;
125
+ }
126
+ interface ScriptPropertyBase extends MetaDataProperty {
127
+ type ?: string ;
128
+ charset ?: string ;
129
+ async ?: boolean ;
130
+ defer ?: boolean ;
131
+ crossOrigin ?: string ;
132
+ nonce ?: string ;
133
+ }
134
+ interface ScriptPropertyText extends ScriptPropertyBase {
135
+ innerHTML : string ;
136
+ }
137
+ interface ScriptPropertySrc extends ScriptPropertyBase {
138
+ src : string ;
139
+ callback ?: void ;
140
+ }
141
+ interface ScriptPropertySrcCallback extends ScriptPropertyBase {
142
+ vmid : string ;
143
+ }
144
+ declare type JsonVal = string | number | boolean | JsonObj | JsonObj [ ] | null ;
145
+ interface JsonObj {
146
+ [ key : string ] : JsonVal | JsonVal [ ] ;
147
+ }
148
+ interface ScriptPropertyJson extends ScriptPropertyBase {
149
+ json : JsonObj ;
150
+ }
151
+ interface NoScriptProperty extends MetaDataProperty {
152
+ innerHTML : string ;
153
+ }
154
+ interface ComponentMetaInfo {
155
+ title ?: string ;
156
+ htmlAttrs ?: AttributeProperty ;
157
+ headAttrs ?: AttributeProperty ;
158
+ bodyAttrs ?: AttributeProperty ;
159
+ base ?: {
160
+ target : string ;
161
+ href : string ;
162
+ } ;
163
+ meta ?: ( MetaPropertyCharset | MetaPropertyEquiv | MetaPropertyTrueEquiv | MetaPropertyName | MetaPropertyMicrodata | MetaPropertyProperty ) [ ] ;
164
+ link ?: ( LinkPropertyBase | LinkPropertyHref | LinkPropertyHrefCallback ) [ ] ;
165
+ style ?: StyleProperty [ ] ;
166
+ script ?: ( ScriptPropertyText | ScriptPropertySrc | ScriptPropertySrcCallback | ScriptPropertyJson ) [ ] ;
167
+ noscript ?: NoScriptProperty [ ] ;
168
+ }
169
+ declare type ComponentOptionsMetaInfo = ComponentMetaInfo | ( ( ) => ComponentMetaInfo ) ;
170
+
67
171
declare type MetaConfigSectionKey = 'tag' | 'to' | 'keyAttribute' | 'valueAttribute' | 'nameless' | 'group' | 'namespaced' | 'namespacedAttribute' | 'attributesFor' ;
68
172
interface MetaConfigSectionTag {
69
173
tag ?: string ;
@@ -191,6 +295,9 @@ declare module '@vue/runtime-core' {
191
295
$metaManager : MetaManager ;
192
296
$metaGuards : MetaGuards ;
193
297
}
298
+ interface ComponentCustomOptions {
299
+ metaInfo ?: ComponentOptionsMetaInfo ;
300
+ }
194
301
}
195
302
196
303
declare const setup : MetaResolveSetup ;
@@ -207,6 +314,11 @@ declare namespace deepest_d {
207
314
208
315
declare const defaultConfig : MetaConfig ;
209
316
317
+ declare type PluginOptions = {
318
+ keyName : string ;
319
+ } ;
320
+ declare const install : ( app : App , _options ?: Partial < PluginOptions > ) => void ;
321
+
210
322
interface ResolveOptionPredicament < T , U > {
211
323
( currentValue : T | undefined , context : U ) : T ;
212
324
}
@@ -216,4 +328,4 @@ declare function getCurrentManager(vm?: ComponentInternalInstance): MetaManager
216
328
declare function useMeta ( source : MetaSource , manager ?: MetaManager ) : MetaProxy ;
217
329
declare function useActiveMeta ( ) : MetaActive ;
218
330
219
- export { ExcludesFalsy , MetaActive , MetaConfig , MetaConfigSection , MetaConfigSectionAttribute , MetaConfigSectionGroup , MetaConfigSectionKey , MetaConfigSectionTag , MetaGroupConfig , MetaGuardRemoved , MetaGuards , MetaProxy , MetaRenderContext , MetaRendered , MetaRenderedNode , MetaResolveContext , MetaResolveSetup , MetaResolver , MetaResolverSetup , MetaSource , MetaSourceProxy , MetaTagConfig , MetaTagConfigKey , MetaTagName , MetaTagsConfig , MetaTeleports , Modify , SlotScopeProperties , TODO , Truthy , createMetaManager , deepest_d as deepestResolver , defaultConfig , getCurrentManager , resolveOption , useActiveMeta , useMeta } ;
331
+ export { ExcludesFalsy , MetaActive , MetaConfig , MetaConfigSection , MetaConfigSectionAttribute , MetaConfigSectionGroup , MetaConfigSectionKey , MetaConfigSectionTag , MetaGroupConfig , MetaGuardRemoved , MetaGuards , MetaProxy , MetaRenderContext , MetaRendered , MetaRenderedNode , MetaResolveContext , MetaResolveSetup , MetaResolver , MetaResolverSetup , MetaSource , MetaSourceProxy , MetaTagConfig , MetaTagConfigKey , MetaTagName , MetaTagsConfig , MetaTeleports , Modify , SlotScopeProperties , TODO , Truthy , createMetaManager , deepest_d as deepestResolver , defaultConfig , getCurrentManager , install as plugin , resolveOption , useActiveMeta , useMeta } ;
0 commit comments