@brandocms/jupiter 3.55.0 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +509 -54
- package/package.json +30 -18
- package/src/index.js +15 -10
- package/src/modules/Application/index.js +236 -158
- package/src/modules/Breakpoints/index.js +116 -36
- package/src/modules/Cookies/index.js +95 -64
- package/src/modules/CoverOverlay/index.js +21 -14
- package/src/modules/Dataloader/index.js +71 -24
- package/src/modules/Dataloader/url-sync.js +238 -0
- package/src/modules/Dom/index.js +24 -0
- package/src/modules/DoubleHeader/index.js +571 -0
- package/src/modules/Dropdown/index.js +108 -73
- package/src/modules/EqualHeightElements/index.js +8 -8
- package/src/modules/EqualHeightImages/index.js +15 -7
- package/src/modules/FixedHeader/index.js +116 -30
- package/src/modules/FooterReveal/index.js +5 -5
- package/src/modules/HeroSlider/index.js +231 -106
- package/src/modules/HeroVideo/index.js +72 -44
- package/src/modules/Lazyload/index.js +128 -80
- package/src/modules/Lightbox/index.js +101 -80
- package/src/modules/Links/index.js +77 -51
- package/src/modules/Looper/index.js +1737 -0
- package/src/modules/Marquee/index.js +106 -37
- package/src/modules/MobileMenu/index.js +105 -130
- package/src/modules/Moonwalk/index.js +479 -153
- package/src/modules/Parallax/index.js +280 -57
- package/src/modules/Popover/index.js +187 -17
- package/src/modules/Popup/index.js +172 -53
- package/src/modules/ScrollSpy/index.js +21 -0
- package/src/modules/StackedBoxes/index.js +8 -6
- package/src/modules/StickyHeader/index.js +394 -164
- package/src/modules/Toggler/index.js +207 -11
- package/src/modules/Typography/index.js +33 -20
- package/src/utils/motion-helpers.js +330 -0
- package/types/README.md +159 -0
- package/types/events/index.d.ts +20 -0
- package/types/index.d.ts +6 -0
- package/types/modules/Application/index.d.ts +168 -0
- package/types/modules/Breakpoints/index.d.ts +40 -0
- package/types/modules/Cookies/index.d.ts +81 -0
- package/types/modules/CoverOverlay/index.d.ts +6 -0
- package/types/modules/Dataloader/index.d.ts +38 -0
- package/types/modules/Dataloader/url-sync.d.ts +36 -0
- package/types/modules/Dom/index.d.ts +47 -0
- package/types/modules/DoubleHeader/index.d.ts +63 -0
- package/types/modules/Dropdown/index.d.ts +15 -0
- package/types/modules/EqualHeightElements/index.d.ts +8 -0
- package/types/modules/EqualHeightImages/index.d.ts +11 -0
- package/types/modules/FeatureTests/index.d.ts +27 -0
- package/types/modules/FixedHeader/index.d.ts +219 -0
- package/types/modules/Fontloader/index.d.ts +5 -0
- package/types/modules/FooterReveal/index.d.ts +5 -0
- package/types/modules/HeroSlider/index.d.ts +28 -0
- package/types/modules/HeroVideo/index.d.ts +83 -0
- package/types/modules/Lazyload/index.d.ts +80 -0
- package/types/modules/Lightbox/index.d.ts +123 -0
- package/types/modules/Links/index.d.ts +55 -0
- package/types/modules/Looper/index.d.ts +127 -0
- package/types/modules/Marquee/index.d.ts +23 -0
- package/types/modules/MobileMenu/index.d.ts +63 -0
- package/types/modules/Moonwalk/index.d.ts +322 -0
- package/types/modules/Parallax/index.d.ts +71 -0
- package/types/modules/Popover/index.d.ts +29 -0
- package/types/modules/Popup/index.d.ts +76 -0
- package/types/modules/ScrollSpy/index.d.ts +29 -0
- package/types/modules/StackedBoxes/index.d.ts +9 -0
- package/types/modules/StickyHeader/index.d.ts +220 -0
- package/types/modules/Toggler/index.d.ts +48 -0
- package/types/modules/Typography/index.d.ts +77 -0
- package/types/utils/dispatchElementEvent.d.ts +1 -0
- package/types/utils/imageIsLoaded.d.ts +1 -0
- package/types/utils/imagesAreLoaded.d.ts +1 -0
- package/types/utils/loadScript.d.ts +2 -0
- package/types/utils/prefersReducedMotion.d.ts +4 -0
- package/types/utils/rafCallback.d.ts +2 -0
- package/types/utils/zoom.d.ts +4 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class EqualHeightImages {
|
|
2
|
+
constructor(app: any, opts?: {}, container?: HTMLElement);
|
|
3
|
+
app: any;
|
|
4
|
+
container: HTMLElement;
|
|
5
|
+
opts: any;
|
|
6
|
+
run(): void;
|
|
7
|
+
initialize(): void;
|
|
8
|
+
canvases: any;
|
|
9
|
+
getRenderedSize(contains: any, cWidth: any, cHeight: any, width: any, height: any, pos: any): any;
|
|
10
|
+
getImgSizeInfo(img: any): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default class FeatureTests {
|
|
2
|
+
constructor(app: any, tests: any);
|
|
3
|
+
app: any;
|
|
4
|
+
testFns: {
|
|
5
|
+
touch: () => boolean;
|
|
6
|
+
};
|
|
7
|
+
results: {};
|
|
8
|
+
runTests(tests: any): void;
|
|
9
|
+
testFor(feature: any, result: any): void;
|
|
10
|
+
/**
|
|
11
|
+
* Check if we should outline elements. If the user hits TAB, we should outline,
|
|
12
|
+
* otherwise we skip it.
|
|
13
|
+
*/
|
|
14
|
+
testOutlineEvents(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Sometimes the initial test for touch/mouse fail, so
|
|
17
|
+
* listen for events as well
|
|
18
|
+
*/
|
|
19
|
+
testTouchMouseEvents(): void;
|
|
20
|
+
deviceLastTouched: number;
|
|
21
|
+
bindEventTests(): void;
|
|
22
|
+
testTouch(): boolean;
|
|
23
|
+
testIE11(): boolean;
|
|
24
|
+
testIOS(): RegExpMatchArray;
|
|
25
|
+
testBrowsers(): string;
|
|
26
|
+
testWebview(): RegExpMatchArray;
|
|
27
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FixedHeader component for sticky navigation headers with scroll behaviors
|
|
3
|
+
*/
|
|
4
|
+
export default class FixedHeader {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new FixedHeader instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {FixedHeaderOptions} [opts={}] - FixedHeader options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: FixedHeaderOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
mainOpts: any;
|
|
13
|
+
el: any;
|
|
14
|
+
opts: any;
|
|
15
|
+
lis: any;
|
|
16
|
+
preventPin: boolean;
|
|
17
|
+
preventUnpin: boolean;
|
|
18
|
+
_firstLoad: boolean;
|
|
19
|
+
_pinned: boolean;
|
|
20
|
+
_top: boolean;
|
|
21
|
+
_bottom: boolean;
|
|
22
|
+
_small: boolean;
|
|
23
|
+
_altBg: boolean;
|
|
24
|
+
_isResizing: boolean;
|
|
25
|
+
_hiding: boolean;
|
|
26
|
+
lastKnownScrollY: number;
|
|
27
|
+
lastKnownScrollHeight: number;
|
|
28
|
+
currentScrollHeight: number;
|
|
29
|
+
currentScrollY: number;
|
|
30
|
+
mobileMenuOpen: boolean;
|
|
31
|
+
timer: any;
|
|
32
|
+
resetResizeTimer: any;
|
|
33
|
+
intersectingElements: any;
|
|
34
|
+
initialize(): void;
|
|
35
|
+
pageIsScrolledOnReady: boolean;
|
|
36
|
+
preflight(): void;
|
|
37
|
+
lock(): void;
|
|
38
|
+
unlock(): void;
|
|
39
|
+
isScrolled(): boolean;
|
|
40
|
+
unpinIfScrolled(): void;
|
|
41
|
+
enter(): void;
|
|
42
|
+
setResizeTimer(): void;
|
|
43
|
+
update(): void;
|
|
44
|
+
checkSize(force: any): void;
|
|
45
|
+
checkBg(force: any): void;
|
|
46
|
+
checkTop(force: any): void;
|
|
47
|
+
checkBot(force: any): void;
|
|
48
|
+
checkPin(force: any, toleranceExceeded: any): void;
|
|
49
|
+
redraw(): void;
|
|
50
|
+
notTop(): void;
|
|
51
|
+
top(): void;
|
|
52
|
+
notBottom(): void;
|
|
53
|
+
bottom(): void;
|
|
54
|
+
unpin(): void;
|
|
55
|
+
pin(): void;
|
|
56
|
+
notSmall(): void;
|
|
57
|
+
small(): void;
|
|
58
|
+
notAltBg(): void;
|
|
59
|
+
altBg(): void;
|
|
60
|
+
shouldUnpin(toleranceExceeded: any): any;
|
|
61
|
+
shouldPin(toleranceExceeded: any): any;
|
|
62
|
+
isOutOfBounds(): boolean;
|
|
63
|
+
getScrollerPhysicalHeight(): number;
|
|
64
|
+
getScrollerHeight(): number;
|
|
65
|
+
getDocumentHeight(): number;
|
|
66
|
+
getViewportHeight(): number;
|
|
67
|
+
getElementHeight(el: any): number;
|
|
68
|
+
getElementPhysicalHeight(el: any): number;
|
|
69
|
+
getScrollY(): any;
|
|
70
|
+
toleranceExceeded(): boolean;
|
|
71
|
+
_getOptionsForSection(section: any, opts: any): any;
|
|
72
|
+
_bindMobileMenuListeners(): void;
|
|
73
|
+
_onMobileMenuOpen(): void;
|
|
74
|
+
_onMobileMenuClose(): void;
|
|
75
|
+
}
|
|
76
|
+
export type FixedHeaderEvents = {
|
|
77
|
+
/**
|
|
78
|
+
* - Called when header is pinned
|
|
79
|
+
*/
|
|
80
|
+
onPin?: Function;
|
|
81
|
+
/**
|
|
82
|
+
* - Called when header is unpinned
|
|
83
|
+
*/
|
|
84
|
+
onUnpin?: Function;
|
|
85
|
+
/**
|
|
86
|
+
* - Called when alternate background is applied
|
|
87
|
+
*/
|
|
88
|
+
onAltBg?: Function;
|
|
89
|
+
/**
|
|
90
|
+
* - Called when regular background is applied
|
|
91
|
+
*/
|
|
92
|
+
onNotAltBg?: Function;
|
|
93
|
+
/**
|
|
94
|
+
* - Called when header becomes small
|
|
95
|
+
*/
|
|
96
|
+
onSmall?: Function;
|
|
97
|
+
/**
|
|
98
|
+
* - Called when header becomes normal size
|
|
99
|
+
*/
|
|
100
|
+
onNotSmall?: Function;
|
|
101
|
+
/**
|
|
102
|
+
* - Called when page is at the top
|
|
103
|
+
*/
|
|
104
|
+
onTop?: Function;
|
|
105
|
+
/**
|
|
106
|
+
* - Called when page is not at the top
|
|
107
|
+
*/
|
|
108
|
+
onNotTop?: Function;
|
|
109
|
+
/**
|
|
110
|
+
* - Called when page is at the bottom
|
|
111
|
+
*/
|
|
112
|
+
onBottom?: Function;
|
|
113
|
+
/**
|
|
114
|
+
* - Called when page is not at the bottom
|
|
115
|
+
*/
|
|
116
|
+
onNotBottom?: Function;
|
|
117
|
+
/**
|
|
118
|
+
* - Called when mobile menu opens
|
|
119
|
+
*/
|
|
120
|
+
onMobileMenuOpen?: Function;
|
|
121
|
+
/**
|
|
122
|
+
* - Called when mobile menu closes
|
|
123
|
+
*/
|
|
124
|
+
onMobileMenuClose?: Function;
|
|
125
|
+
/**
|
|
126
|
+
* - Called when header intersects with an element
|
|
127
|
+
*/
|
|
128
|
+
onIntersect?: Function;
|
|
129
|
+
/**
|
|
130
|
+
* - Called when user tabs (outline mode)
|
|
131
|
+
*/
|
|
132
|
+
onOutline?: Function;
|
|
133
|
+
};
|
|
134
|
+
export type FixedHeaderSectionOptions = {
|
|
135
|
+
/**
|
|
136
|
+
* - Whether to unpin header on window resize
|
|
137
|
+
*/
|
|
138
|
+
unPinOnResize?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* - Scrolling element
|
|
141
|
+
*/
|
|
142
|
+
canvas?: Window | HTMLElement;
|
|
143
|
+
/**
|
|
144
|
+
* - Selector for elements to check intersection with
|
|
145
|
+
*/
|
|
146
|
+
intersects?: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* - Called before header enters
|
|
149
|
+
*/
|
|
150
|
+
beforeEnter?: Function;
|
|
151
|
+
/**
|
|
152
|
+
* - Called when header enters
|
|
153
|
+
*/
|
|
154
|
+
enter?: Function;
|
|
155
|
+
/**
|
|
156
|
+
* - Delay before enter animation
|
|
157
|
+
*/
|
|
158
|
+
enterDelay?: number;
|
|
159
|
+
/**
|
|
160
|
+
* - Scroll tolerance before triggering hide/show
|
|
161
|
+
*/
|
|
162
|
+
tolerance?: number;
|
|
163
|
+
/**
|
|
164
|
+
* - Offset from top before triggering hide
|
|
165
|
+
*/
|
|
166
|
+
offset?: number | string | Function;
|
|
167
|
+
/**
|
|
168
|
+
* - Offset from top before shrinking header
|
|
169
|
+
*/
|
|
170
|
+
offsetSmall?: number | string | Function;
|
|
171
|
+
/**
|
|
172
|
+
* - Offset from top before changing background color
|
|
173
|
+
*/
|
|
174
|
+
offsetBg?: number | string | Function;
|
|
175
|
+
/**
|
|
176
|
+
* - Regular background color
|
|
177
|
+
*/
|
|
178
|
+
regBgColor?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* - Alternate background color
|
|
181
|
+
*/
|
|
182
|
+
altBgColor?: string | null;
|
|
183
|
+
};
|
|
184
|
+
export type FixedHeaderOptions = {
|
|
185
|
+
/**
|
|
186
|
+
* - Header element or selector
|
|
187
|
+
*/
|
|
188
|
+
el?: string | HTMLElement;
|
|
189
|
+
/**
|
|
190
|
+
* - Event to initialize on
|
|
191
|
+
*/
|
|
192
|
+
on?: string;
|
|
193
|
+
/**
|
|
194
|
+
* - Whether to unpin on forced scroll start
|
|
195
|
+
*/
|
|
196
|
+
unpinOnForcedScrollStart?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* - Whether to pin on forced scroll end
|
|
199
|
+
*/
|
|
200
|
+
pinOnForcedScrollEnd?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* - Whether to ignore forced scroll events
|
|
203
|
+
*/
|
|
204
|
+
ignoreForcedScroll?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* - Whether to use requestAnimationFrame for scrolling
|
|
207
|
+
*/
|
|
208
|
+
rafScroll?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* - Default options for all sections
|
|
211
|
+
*/
|
|
212
|
+
default?: FixedHeaderSectionOptions;
|
|
213
|
+
/**
|
|
214
|
+
* - Section-specific options
|
|
215
|
+
*/
|
|
216
|
+
sections?: {
|
|
217
|
+
[x: string]: FixedHeaderSectionOptions;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default class HeroSlider {
|
|
2
|
+
constructor(app: any, opts?: {});
|
|
3
|
+
app: any;
|
|
4
|
+
opts: any;
|
|
5
|
+
el: any;
|
|
6
|
+
initialize(): void;
|
|
7
|
+
slides: any;
|
|
8
|
+
images: any;
|
|
9
|
+
slideCount: number;
|
|
10
|
+
_currentSlideIdx: any;
|
|
11
|
+
/**
|
|
12
|
+
* Calculate which slide is next, and call the slide function
|
|
13
|
+
*/
|
|
14
|
+
next(): void;
|
|
15
|
+
_previousSlide: any;
|
|
16
|
+
_nextSlide: any;
|
|
17
|
+
_currentSlide: any;
|
|
18
|
+
/**
|
|
19
|
+
* Switches between slides
|
|
20
|
+
*/
|
|
21
|
+
slide(type: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* Add a window resize handler that resizes slide widths
|
|
24
|
+
*/
|
|
25
|
+
_addResizeHandler(): void;
|
|
26
|
+
observer: IntersectionObserver;
|
|
27
|
+
_resizeSlides(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeroVideo component for handling responsive background videos with controls
|
|
3
|
+
*/
|
|
4
|
+
export default class HeroVideo {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new HeroVideo instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {HeroVideoOptions} [opts={}] - HeroVideo options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: HeroVideoOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
booting: boolean;
|
|
13
|
+
playing: boolean;
|
|
14
|
+
forcePaused: boolean;
|
|
15
|
+
opts: any;
|
|
16
|
+
elements: {};
|
|
17
|
+
el: any;
|
|
18
|
+
initialize(): void;
|
|
19
|
+
cover: any;
|
|
20
|
+
videoDiv: any;
|
|
21
|
+
video: any;
|
|
22
|
+
setSrc(): void;
|
|
23
|
+
addEvents(): void;
|
|
24
|
+
play(): void;
|
|
25
|
+
pause(): void;
|
|
26
|
+
fadeIn(): void;
|
|
27
|
+
fadeInCover(): void;
|
|
28
|
+
addObserver(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Add a window resize handler that resizes video width
|
|
31
|
+
*/
|
|
32
|
+
_addResizeHandler(): void;
|
|
33
|
+
observer: IntersectionObserver;
|
|
34
|
+
_resize(): void;
|
|
35
|
+
}
|
|
36
|
+
export type HeroVideoElementGenerators = {
|
|
37
|
+
/**
|
|
38
|
+
* - Function that returns the pause button HTML
|
|
39
|
+
*/
|
|
40
|
+
pause?: Function;
|
|
41
|
+
/**
|
|
42
|
+
* - Function that returns the play button HTML
|
|
43
|
+
*/
|
|
44
|
+
play?: Function;
|
|
45
|
+
};
|
|
46
|
+
export type HeroVideoOptions = {
|
|
47
|
+
/**
|
|
48
|
+
* - Target element selector or element
|
|
49
|
+
*/
|
|
50
|
+
el?: string | HTMLElement;
|
|
51
|
+
/**
|
|
52
|
+
* - Called when video fades in
|
|
53
|
+
*/
|
|
54
|
+
onFadeIn?: Function;
|
|
55
|
+
/**
|
|
56
|
+
* - Called when cover fades in
|
|
57
|
+
*/
|
|
58
|
+
onFadeInCover?: Function;
|
|
59
|
+
/**
|
|
60
|
+
* - Called when cover fades out
|
|
61
|
+
*/
|
|
62
|
+
onFadeOutCover?: Function;
|
|
63
|
+
/**
|
|
64
|
+
* - Called when video is ready to play
|
|
65
|
+
*/
|
|
66
|
+
onPlayReady?: Function;
|
|
67
|
+
/**
|
|
68
|
+
* - Called when play button is clicked
|
|
69
|
+
*/
|
|
70
|
+
onClickPlay?: Function;
|
|
71
|
+
/**
|
|
72
|
+
* - Called when pause button is clicked
|
|
73
|
+
*/
|
|
74
|
+
onClickPause?: Function;
|
|
75
|
+
/**
|
|
76
|
+
* - Selector for parent element to append pause button to
|
|
77
|
+
*/
|
|
78
|
+
pauseParent?: string;
|
|
79
|
+
/**
|
|
80
|
+
* - Element generators for UI components
|
|
81
|
+
*/
|
|
82
|
+
elements?: HeroVideoElementGenerators;
|
|
83
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazyload class for handling image lazy loading
|
|
3
|
+
*/
|
|
4
|
+
export default class Lazyload {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Lazyload instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {LazyloadOptions} [opts={}] - Lazyload options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: LazyloadOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
target: any;
|
|
14
|
+
resizePending: Map<any, any>;
|
|
15
|
+
rafId: number;
|
|
16
|
+
srcsetReadyObserver: MutationObserver;
|
|
17
|
+
watch(): void;
|
|
18
|
+
initialize(): void;
|
|
19
|
+
lazyPictures: any;
|
|
20
|
+
loadObserver: IntersectionObserver;
|
|
21
|
+
revealObserver: IntersectionObserver;
|
|
22
|
+
imageObserver: IntersectionObserver;
|
|
23
|
+
lazyImages: any;
|
|
24
|
+
initObserver(observer: any, setAttrs?: boolean): void;
|
|
25
|
+
forceLoad($container?: HTMLElement): void;
|
|
26
|
+
initializeResizeObserver(): void;
|
|
27
|
+
sizeObserver: ResizeObserver;
|
|
28
|
+
flushSizeUpdates(): void;
|
|
29
|
+
initializeSections(): void;
|
|
30
|
+
handleLoadEntries(elements: any): void;
|
|
31
|
+
handleRevealEntries(elements: any): void;
|
|
32
|
+
loadPicture(picture: any): void;
|
|
33
|
+
revealPicture(picture: any): void;
|
|
34
|
+
lazyloadImages(elements: any): void;
|
|
35
|
+
swapImage(image: any): void;
|
|
36
|
+
}
|
|
37
|
+
export type IntersectionObserverConfig = {
|
|
38
|
+
/**
|
|
39
|
+
* - Margin around the root
|
|
40
|
+
*/
|
|
41
|
+
rootMargin?: string;
|
|
42
|
+
/**
|
|
43
|
+
* - Threshold for intersection
|
|
44
|
+
*/
|
|
45
|
+
threshold?: number;
|
|
46
|
+
};
|
|
47
|
+
export type LazyloadOptions = {
|
|
48
|
+
/**
|
|
49
|
+
* - Configuration for the reveal intersection observer
|
|
50
|
+
*/
|
|
51
|
+
revealIntersectionObserverConfig?: IntersectionObserverConfig;
|
|
52
|
+
/**
|
|
53
|
+
* - Configuration for the load intersection observer
|
|
54
|
+
*/
|
|
55
|
+
loadIntersectionObserverConfig?: IntersectionObserverConfig;
|
|
56
|
+
/**
|
|
57
|
+
* - Configuration for general intersection observers
|
|
58
|
+
*/
|
|
59
|
+
intersectionObserverConfig?: IntersectionObserverConfig;
|
|
60
|
+
/**
|
|
61
|
+
* - Whether to use native lazyloading if available
|
|
62
|
+
*/
|
|
63
|
+
useNativeLazyloadIfAvailable?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* - Lazyload mode
|
|
66
|
+
*/
|
|
67
|
+
mode?: string;
|
|
68
|
+
/**
|
|
69
|
+
* - Minimum size for auto sizing
|
|
70
|
+
*/
|
|
71
|
+
minSize?: number;
|
|
72
|
+
/**
|
|
73
|
+
* - Whether to update sizes attribute
|
|
74
|
+
*/
|
|
75
|
+
updateSizes?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* - Whether to register a callback for APPLICATION_REVEALED event
|
|
78
|
+
*/
|
|
79
|
+
registerCallback?: boolean;
|
|
80
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightbox component for displaying images in a fullscreen overlay
|
|
3
|
+
*/
|
|
4
|
+
export default class Lightbox {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Lightbox instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {LightboxOptions} [opts={}] - Lightbox options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: LightboxOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
lightboxes: NodeListOf<Element>;
|
|
14
|
+
elements: {};
|
|
15
|
+
imgAlts: any[];
|
|
16
|
+
imgs: any[];
|
|
17
|
+
sections: {};
|
|
18
|
+
currentIndex: any;
|
|
19
|
+
firstTransition: boolean;
|
|
20
|
+
previousCaption: any;
|
|
21
|
+
timelines: {
|
|
22
|
+
caption: any;
|
|
23
|
+
image: any;
|
|
24
|
+
};
|
|
25
|
+
showBox(section: any, index: any): void;
|
|
26
|
+
buildBox(section: any, index: any): void;
|
|
27
|
+
keyUpCallback: (event: any) => void;
|
|
28
|
+
close(): void;
|
|
29
|
+
currentImage: any;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
setImg(section: any, index: any): void;
|
|
32
|
+
nextImage: any;
|
|
33
|
+
getNextIdx(section: any): any;
|
|
34
|
+
getPrevIdx(section: any): number;
|
|
35
|
+
onClick(e: any, section: any): void;
|
|
36
|
+
onKeyup(e: any, section: any): void;
|
|
37
|
+
onMouseMove(e: any): void;
|
|
38
|
+
pointerDirection: string;
|
|
39
|
+
}
|
|
40
|
+
export type LightboxElements = {
|
|
41
|
+
/**
|
|
42
|
+
* - Function to create right arrow element
|
|
43
|
+
*/
|
|
44
|
+
arrowRight?: Function;
|
|
45
|
+
/**
|
|
46
|
+
* - Function to create left arrow element
|
|
47
|
+
*/
|
|
48
|
+
arrowLeft?: Function;
|
|
49
|
+
/**
|
|
50
|
+
* - Function to create close button element
|
|
51
|
+
*/
|
|
52
|
+
close?: Function;
|
|
53
|
+
/**
|
|
54
|
+
* - Function to create dot/indicator element
|
|
55
|
+
*/
|
|
56
|
+
dot?: Function;
|
|
57
|
+
};
|
|
58
|
+
export type LightboxOptions = {
|
|
59
|
+
/**
|
|
60
|
+
* - Enable captions
|
|
61
|
+
*/
|
|
62
|
+
captions?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* - Enable index numbers
|
|
65
|
+
*/
|
|
66
|
+
numbers?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* - Selector for trigger element to open the lightbox
|
|
69
|
+
*/
|
|
70
|
+
trigger?: string | boolean;
|
|
71
|
+
/**
|
|
72
|
+
* - Custom elements configuration
|
|
73
|
+
*/
|
|
74
|
+
elements?: LightboxElements;
|
|
75
|
+
/**
|
|
76
|
+
* - Click handler for lightbox
|
|
77
|
+
*/
|
|
78
|
+
onClick?: Function;
|
|
79
|
+
/**
|
|
80
|
+
* - Called when pointer moves left
|
|
81
|
+
*/
|
|
82
|
+
onPointerLeft?: Function;
|
|
83
|
+
/**
|
|
84
|
+
* - Called when pointer moves right
|
|
85
|
+
*/
|
|
86
|
+
onPointerRight?: Function;
|
|
87
|
+
/**
|
|
88
|
+
* - Called when caption fades out
|
|
89
|
+
*/
|
|
90
|
+
onCaptionOut?: Function;
|
|
91
|
+
/**
|
|
92
|
+
* - Called when caption fades in
|
|
93
|
+
*/
|
|
94
|
+
onCaptionIn?: Function;
|
|
95
|
+
/**
|
|
96
|
+
* - Called when image fades out
|
|
97
|
+
*/
|
|
98
|
+
onImageOut?: Function;
|
|
99
|
+
/**
|
|
100
|
+
* - Called when image fades in
|
|
101
|
+
*/
|
|
102
|
+
onImageIn?: Function;
|
|
103
|
+
/**
|
|
104
|
+
* - Called when numbers display updates
|
|
105
|
+
*/
|
|
106
|
+
onNumbers?: Function;
|
|
107
|
+
/**
|
|
108
|
+
* - Called before opening lightbox
|
|
109
|
+
*/
|
|
110
|
+
onBeforeOpen?: Function;
|
|
111
|
+
/**
|
|
112
|
+
* - Called when lightbox opens
|
|
113
|
+
*/
|
|
114
|
+
onOpen?: Function;
|
|
115
|
+
/**
|
|
116
|
+
* - Called after lightbox closes
|
|
117
|
+
*/
|
|
118
|
+
onAfterClose?: Function;
|
|
119
|
+
/**
|
|
120
|
+
* - Called when lightbox closes
|
|
121
|
+
*/
|
|
122
|
+
onClose?: Function;
|
|
123
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Links handler for navigation and transitions
|
|
3
|
+
*/
|
|
4
|
+
export default class Links {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Links instance
|
|
7
|
+
* @param {Object} app - Application instance
|
|
8
|
+
* @param {LinksOptions} [opts={}] - Links options
|
|
9
|
+
*/
|
|
10
|
+
constructor(app: any, opts?: LinksOptions);
|
|
11
|
+
app: any;
|
|
12
|
+
opts: any;
|
|
13
|
+
bindHeroLink(): void;
|
|
14
|
+
bindAnchors(anchors: any): void;
|
|
15
|
+
bindLinks(links: any): void;
|
|
16
|
+
normalizeHostname(hostname: any): any;
|
|
17
|
+
}
|
|
18
|
+
export type LinksOptions = {
|
|
19
|
+
/**
|
|
20
|
+
* - Whether to trigger events when scrolling
|
|
21
|
+
*/
|
|
22
|
+
triggerEvents?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* - Duration of scroll animation
|
|
25
|
+
*/
|
|
26
|
+
scrollDuration?: number;
|
|
27
|
+
/**
|
|
28
|
+
* - Whether to offset scroll for nav header
|
|
29
|
+
*/
|
|
30
|
+
scrollOffsetNav?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* - Delay for mobile menu before scrolling
|
|
33
|
+
*/
|
|
34
|
+
mobileMenuDelay?: number;
|
|
35
|
+
/**
|
|
36
|
+
* - Whether to open external links in new window
|
|
37
|
+
*/
|
|
38
|
+
openExternalInWindow?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* - Query selector for regular links
|
|
41
|
+
*/
|
|
42
|
+
linkQuery?: string;
|
|
43
|
+
/**
|
|
44
|
+
* - Query selector for anchor links
|
|
45
|
+
*/
|
|
46
|
+
anchorQuery?: string;
|
|
47
|
+
/**
|
|
48
|
+
* - Called when an anchor link is clicked
|
|
49
|
+
*/
|
|
50
|
+
onAnchor?: Function;
|
|
51
|
+
/**
|
|
52
|
+
* - Called when transitioning between pages
|
|
53
|
+
*/
|
|
54
|
+
onTransition?: Function;
|
|
55
|
+
};
|