-
Notifications
You must be signed in to change notification settings - Fork 17
/
types.js
65 lines (59 loc) · 1.93 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* Pre-defined device breakpoints.
*
* @typedef {Object} WpbfBreakpoints
*
* @property {number} desktop
* @property {number} tablet
* @property {number} mobile
*/
/**
* WpbfSite object.
*
* @typedef {Object} WpbfSite
*
* @property {function():WpbfBreakpoints} getBreakpoints - Get breakpoint values for desktop, tablet, and mobile.
* @property {function():string} getActiveBreakpoint - Get the current active breakpoint.
* @property {function():boolean} isInsideCustomizer - Check whether we're inside customizer or not.
* @property {function(NodeList|string, function(Element): void): void} forEachEl - Iterates over a collection of elements and applies a function to each.
* @property {function(string, string|null, function(Event): void): void} listenDocumentEvent - Add document's event listener with optional selector to filter the target.
* @property {function(string|HTMLElement, string): string} getAttr - Get attribute value of an element.
* @property {function(string|HTMLElement, string): string} getAttrAsNumber - Get attribute value of an element as number.
*/
/**
* Global `Wpbf` object.
*
* @typedef {Object} Wpbf
*
* @property {WpbfSite} site
*/
/**
* Global `LegacyWpbfTheme` object.
*
* @typedef {Object} LegacyWpbfTheme
*
* @property {WpbfBreakpoints} breakpoints - Breakpoint values for desktop, tablet, and mobile.
* @property {string} activeBreakpoint - The current active breakpoint.
* @property {boolean} isInsideCustomizer - Whether we're inside customizer or not.
*/
/**
* WpbfCustomize object.
*
* @typedef {import("./Customizer/Controls/Base/src/interface").WpbfCustomize} WpbfCustomize
*/
/**
* Global `wp` object.
*
* @typedef {Object} wp
*
* @property {WpbfCustomize|undefined} customize
*/
/**
* Override the global window object to include custom properties.
*
* @typedef {Object} WpbfWindow
*
* @property {wp} wp
* @property {Wpbf} Wpbf
* @property {LegacyWpbfTheme} WpbfTheme
*/