@brandocms/jupiter 3.45.0 → 3.46.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 +1 -1
- package/package.json +10 -9
- package/src/modules/Application/index.js +56 -13
- package/src/modules/Dataloader/index.js +8 -0
- package/src/modules/Lazyload/index.js +14 -0
- package/src/modules/Links/index.js +2 -2
- package/src/modules/Marquee/index.js +8 -4
- package/src/modules/Moonwalk/index.js +23 -19
- package/src/modules/Typography/index.js +6 -0
- package/src/utils/zoom.js +3 -8
- package/CHANGELOG.md +0 -383
package/README.md
CHANGED
|
@@ -268,7 +268,7 @@ include images from this section. Otherwise, all lightboxed images will be inclu
|
|
|
268
268
|
HTML
|
|
269
269
|
```html
|
|
270
270
|
<div data-toggle>
|
|
271
|
-
<button data-toggle-trigger>Click to expand <span class="arrow">↓</span></button>
|
|
271
|
+
<button data-toggle-trigger>Click to expand <span class="arrow icon">↓</span></button>
|
|
272
272
|
<div class="panel" data-toggle-content>
|
|
273
273
|
<div class="panel-content">
|
|
274
274
|
Content goes here
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brandocms/jupiter",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.46.2",
|
|
4
4
|
"description": "Frontend helpers.",
|
|
5
5
|
"author": "Univers/Twined",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -33,18 +33,19 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@egjs/hammerjs": "^2.0.17",
|
|
35
35
|
"body-scroll-lock": "^4.0.0-beta.0",
|
|
36
|
-
"gsap": "3.
|
|
36
|
+
"gsap": "3.11.0",
|
|
37
37
|
"lodash.defaultsdeep": "^4.6.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "^7.
|
|
41
|
-
"@babel/preset-env": "^7.
|
|
42
|
-
"babel-jest": "^
|
|
43
|
-
"eslint": "8.
|
|
40
|
+
"@babel/core": "^7.18.13",
|
|
41
|
+
"@babel/preset-env": "^7.18.10",
|
|
42
|
+
"babel-jest": "^29.0.1",
|
|
43
|
+
"eslint": "8.23.0",
|
|
44
44
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
45
|
-
"eslint-plugin-import": "^2.
|
|
45
|
+
"eslint-plugin-import": "^2.26.0",
|
|
46
46
|
"eslint-plugin-node": "^11.1.0",
|
|
47
|
-
"eslint-plugin-promise": "^
|
|
48
|
-
"jest": "^
|
|
47
|
+
"eslint-plugin-promise": "^6.0.1",
|
|
48
|
+
"jest": "^29.0.1",
|
|
49
|
+
"jest-environment-jsdom": "^29.0.1"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -71,6 +71,7 @@ export default class Application {
|
|
|
71
71
|
this.userAgent = navigator.userAgent
|
|
72
72
|
this._lastWindowHeight = 0
|
|
73
73
|
this.breakpoint = null
|
|
74
|
+
this.language = document.documentElement.lang
|
|
74
75
|
|
|
75
76
|
this.size = {
|
|
76
77
|
width: 0,
|
|
@@ -195,29 +196,41 @@ export default class Application {
|
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
zoomCalculateChrome () {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
zoomCalculateChrome (dimsChanged) {
|
|
200
|
+
// only calc new zoom if width/height changed
|
|
201
|
+
if (dimsChanged) {
|
|
202
|
+
const currentDevicePixelRatio = Math.round(window.devicePixelRatio * 100)
|
|
203
|
+
const delta = (currentDevicePixelRatio - this._lastDevicePixelRatio) / 100
|
|
204
|
+
this.size.zoom += delta
|
|
205
|
+
if (this.size.zoom === 0) { this.size.zoom = 1 }
|
|
206
|
+
this._lastDevicePixelRatio = currentDevicePixelRatio
|
|
207
|
+
}
|
|
203
208
|
}
|
|
204
209
|
|
|
205
210
|
zoomCalculateSafari () {
|
|
211
|
+
// safari does not call resize when switching dpi/monitors
|
|
206
212
|
this.size.zoom = this._zoomSVG.currentScale
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
updateZoom () {
|
|
215
|
+
updateZoom (dimsChanged = false, dprDelta = 0) {
|
|
210
216
|
switch (this.browser) {
|
|
211
217
|
case 'chrome':
|
|
212
|
-
this.zoomCalculateChrome()
|
|
218
|
+
this.zoomCalculateChrome(dimsChanged)
|
|
213
219
|
break
|
|
214
220
|
|
|
215
221
|
case 'safari':
|
|
216
|
-
this.zoomCalculateSafari()
|
|
222
|
+
this.zoomCalculateSafari(dimsChanged)
|
|
217
223
|
break
|
|
218
224
|
|
|
219
225
|
default:
|
|
220
|
-
|
|
226
|
+
if ([1, -1].indexOf(dprDelta) === -1) {
|
|
227
|
+
if (dimsChanged) {
|
|
228
|
+
this.size.zoom = 1 + (zoom.calculate(this.browser) - this._initialZoom)
|
|
229
|
+
if (this.size.zoom === 0) { this.size.zoom = 1 }
|
|
230
|
+
}
|
|
231
|
+
} else {
|
|
232
|
+
this._initialZoom = Math.min(Math.max(this._initialZoom - dprDelta, 1), 2)
|
|
233
|
+
}
|
|
221
234
|
}
|
|
222
235
|
|
|
223
236
|
this.setZoom()
|
|
@@ -329,6 +342,10 @@ export default class Application {
|
|
|
329
342
|
})
|
|
330
343
|
}
|
|
331
344
|
|
|
345
|
+
hardScrollToTop () {
|
|
346
|
+
window.scrollTo(0, 0)
|
|
347
|
+
}
|
|
348
|
+
|
|
332
349
|
hardScrollTo (target) {
|
|
333
350
|
const element = Dom.find(target)
|
|
334
351
|
if (element) {
|
|
@@ -450,6 +467,13 @@ export default class Application {
|
|
|
450
467
|
}
|
|
451
468
|
}
|
|
452
469
|
|
|
470
|
+
_getBaseVW () {
|
|
471
|
+
const fontBasePx = Dom.getCSSVar('--font-base-px')
|
|
472
|
+
const fontBase = parseFloat(fontBasePx, 10)
|
|
473
|
+
const innerWidth = window.innerWidth
|
|
474
|
+
return `${fontBase / innerWidth * 100}vw`
|
|
475
|
+
}
|
|
476
|
+
|
|
453
477
|
setDims () {
|
|
454
478
|
const root = document.querySelector(':root')
|
|
455
479
|
|
|
@@ -457,16 +481,18 @@ export default class Application {
|
|
|
457
481
|
this.size.initialOuterHeight = window.outerHeight
|
|
458
482
|
this.size.initialInnerWidth = window.innerWidth
|
|
459
483
|
this.size.initialOuterWidth = window.outerWidth
|
|
460
|
-
|
|
484
|
+
|
|
461
485
|
root.style.setProperty('--vp-initial-inner-h', `${this.size.initialInnerHeight}px`)
|
|
462
486
|
root.style.setProperty('--vp-initial-outer-h', `${this.size.initialOuterHeight}px`)
|
|
463
487
|
root.style.setProperty('--vp-initial-inner-w', `${this.size.initialInnerWidth}px`)
|
|
464
488
|
root.style.setProperty('--vp-initial-outer-w', `${this.size.initialOuterWidth}px`)
|
|
465
489
|
root.style.setProperty('--ec-zoom', `${this.size.zoom}`)
|
|
466
|
-
|
|
490
|
+
|
|
467
491
|
this.setvh100Max()
|
|
468
492
|
this.setvh100()
|
|
493
|
+
this.setFontBaseVw()
|
|
469
494
|
|
|
495
|
+
this.size.devicePixelRatio = window.devicePixelRatio
|
|
470
496
|
this.size.container = Dom.getCSSVar('--container-padding')
|
|
471
497
|
this.size.width = window.innerWidth
|
|
472
498
|
this.size.height = window.innerHeight
|
|
@@ -474,6 +500,12 @@ export default class Application {
|
|
|
474
500
|
this.position.left = window.pageXOffset
|
|
475
501
|
}
|
|
476
502
|
|
|
503
|
+
setFontBaseVw () {
|
|
504
|
+
const root = document.querySelector(':root')
|
|
505
|
+
this.size.baseVW = this._getBaseVW()
|
|
506
|
+
root.style.setProperty('--font-base-vw', `${this.size.baseVW}`)
|
|
507
|
+
}
|
|
508
|
+
|
|
477
509
|
setZoom () {
|
|
478
510
|
const root = document.querySelector(':root')
|
|
479
511
|
root.style.setProperty('--ec-zoom', `${this.size.zoom}`)
|
|
@@ -488,6 +520,12 @@ export default class Application {
|
|
|
488
520
|
root.style.setProperty('--vp-1vh', `${window.innerHeight * 0.01}px`)
|
|
489
521
|
}
|
|
490
522
|
|
|
523
|
+
setvw100 () {
|
|
524
|
+
const root = document.querySelector(':root')
|
|
525
|
+
root.style.setProperty('--vp-100vw', `${window.innerWidth}px`)
|
|
526
|
+
root.style.setProperty('--vp-1vw', `${window.innerWidth * 0.01}px`)
|
|
527
|
+
}
|
|
528
|
+
|
|
491
529
|
/**
|
|
492
530
|
* Get the max 100vh for iOS
|
|
493
531
|
*/
|
|
@@ -509,11 +547,16 @@ export default class Application {
|
|
|
509
547
|
onResize (e) {
|
|
510
548
|
const widthChanged = (this.size.width !== window.innerWidth)
|
|
511
549
|
const heightChanged = (this.size.height !== window.innerHeight)
|
|
512
|
-
|
|
550
|
+
const dimsChanged = widthChanged || heightChanged
|
|
551
|
+
const dprDelta = this.size.devicePixelRatio - window.devicePixelRatio
|
|
552
|
+
|
|
513
553
|
this.size.width = window.innerWidth
|
|
514
554
|
this.size.height = window.innerHeight
|
|
555
|
+
this.size.devicePixelRatio = window.devicePixelRatio
|
|
556
|
+
|
|
557
|
+
this.updateZoom(dimsChanged, dprDelta)
|
|
515
558
|
this.setvh100()
|
|
516
|
-
this.
|
|
559
|
+
this.setFontBaseVw()
|
|
517
560
|
|
|
518
561
|
const evt = new CustomEvent(Events.APPLICATION_RESIZE, { detail: { widthChanged, heightChanged } })
|
|
519
562
|
window.dispatchEvent(evt)
|
|
@@ -187,10 +187,24 @@ export default class Lazyload {
|
|
|
187
187
|
const img = picture.querySelector('img')
|
|
188
188
|
|
|
189
189
|
const onload = () => {
|
|
190
|
+
if (!img.getAttribute('data-ll-loaded') && this.app.browser === 'firefox') {
|
|
191
|
+
// set sizes attribute on load again,
|
|
192
|
+
// since firefox sometimes is a bit slow to
|
|
193
|
+
// get the actual image width
|
|
194
|
+
const width = this.getWidth(img)
|
|
195
|
+
|
|
196
|
+
img.setAttribute('sizes', `${width}px`)
|
|
197
|
+
if (img.parentNode) {
|
|
198
|
+
Array.from(Dom.all(img.parentNode, 'source'))
|
|
199
|
+
.forEach(source => source.setAttribute('sizes', `${width}px`))
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
190
203
|
img.removeAttribute('data-ll-placeholder')
|
|
191
204
|
img.removeAttribute('data-ll-blurred')
|
|
192
205
|
img.removeAttribute('data-ll-loading')
|
|
193
206
|
img.setAttribute('data-ll-loaded', '')
|
|
207
|
+
picture.setAttribute('data-ll-srcset-loaded', '')
|
|
194
208
|
}
|
|
195
209
|
|
|
196
210
|
img.addEventListener('load', onload, false)
|
|
@@ -15,7 +15,7 @@ const DEFAULT_OPTIONS = {
|
|
|
15
15
|
links.app.scrollTo(target, links.opts.scrollDuration, links.opts.triggerEvents)
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
-
onTransition: href => {
|
|
18
|
+
onTransition: (href, app) => {
|
|
19
19
|
const main = document.querySelector('main')
|
|
20
20
|
const header = document.querySelector('header[data-nav]')
|
|
21
21
|
const footer = document.querySelector('footer')
|
|
@@ -152,7 +152,7 @@ export default class Links {
|
|
|
152
152
|
|
|
153
153
|
if (href.indexOf(document.location.hostname) > -1 || href.startsWith('/')) {
|
|
154
154
|
e.preventDefault()
|
|
155
|
-
this.opts.onTransition(href)
|
|
155
|
+
this.opts.onTransition(href, this.app)
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
158
|
})
|
|
@@ -6,7 +6,9 @@ const DEFAULT_OPTIONS = {
|
|
|
6
6
|
speed: 100,
|
|
7
7
|
extraHeight: 0,
|
|
8
8
|
slowDownOnHover: true,
|
|
9
|
-
paddingLeft: 0,
|
|
9
|
+
paddingLeft: 0, //DEPRECATED
|
|
10
|
+
startProgress: 0,
|
|
11
|
+
|
|
10
12
|
onReveal: marqueeEl => {
|
|
11
13
|
gsap.to(marqueeEl, { opacity: 1 })
|
|
12
14
|
}
|
|
@@ -87,14 +89,16 @@ export default class Marquee {
|
|
|
87
89
|
const $allHolders = Dom.all(this.elements.$el, '[data-marquee-holder]')
|
|
88
90
|
|
|
89
91
|
Array.from($allHolders).forEach((h, idx) => {
|
|
90
|
-
gsap.set(h, { position: 'absolute', left: h.offsetWidth * idx })
|
|
92
|
+
gsap.set(h, { position: 'absolute', left: (h.offsetWidth * idx) })
|
|
91
93
|
})
|
|
92
94
|
|
|
93
95
|
this.timeline = gsap.timeline({ paused: true })
|
|
94
96
|
this.timeline
|
|
95
|
-
.to($allHolders, { xPercent: -100, ease: 'none', duration: this.duration })
|
|
97
|
+
.to($allHolders, { xPercent: -100, ease: 'none', duration: this.duration }, 'standard')
|
|
96
98
|
.repeat(-1)
|
|
97
99
|
|
|
100
|
+
this.timeline.totalProgress(this.opts.startProgress)
|
|
101
|
+
|
|
98
102
|
window.timeline = this.timeline
|
|
99
103
|
window.marquee = this
|
|
100
104
|
}
|
|
@@ -172,7 +176,7 @@ export default class Marquee {
|
|
|
172
176
|
|
|
173
177
|
const textWidth = this.elements.$item.offsetWidth
|
|
174
178
|
if (textWidth) {
|
|
175
|
-
const count = Math.ceil(this.app.size.width / textWidth) - 1
|
|
179
|
+
const count = Math.max(Math.ceil(this.app.size.width / textWidth) - 1, 2)
|
|
176
180
|
|
|
177
181
|
for (let i = 0; i < count; i += 1) {
|
|
178
182
|
this.elements.$holder.append(this.elements.$item.cloneNode(true))
|
|
@@ -249,8 +249,8 @@ export default class Moonwalk {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
const timeline = gsap.timeline({
|
|
252
|
-
|
|
253
|
-
smoothChildTiming:
|
|
252
|
+
autoRemoveChildren: false,
|
|
253
|
+
smoothChildTiming: false
|
|
254
254
|
})
|
|
255
255
|
|
|
256
256
|
return {
|
|
@@ -562,9 +562,13 @@ export default class Moonwalk {
|
|
|
562
562
|
for (let i = 0; i < entries.length; i += 1) {
|
|
563
563
|
const entry = entries[i]
|
|
564
564
|
|
|
565
|
-
if (entry.isIntersecting) {
|
|
565
|
+
if (entry.isIntersecting || entry.intersectionRatio > 0) {
|
|
566
566
|
section.running = true
|
|
567
567
|
|
|
568
|
+
if (entry.target.dataset.moonwalkId) {
|
|
569
|
+
console.debug('-- intersecting', entry.target.dataset.moonwalkId)
|
|
570
|
+
}
|
|
571
|
+
|
|
568
572
|
const walkName = entry.target.getAttribute('data-moonwalk')
|
|
569
573
|
const cfg = !walkName.length ? opts.walks.default : opts.walks[walkName]
|
|
570
574
|
|
|
@@ -576,7 +580,7 @@ export default class Moonwalk {
|
|
|
576
580
|
} = cfg
|
|
577
581
|
|
|
578
582
|
let { alphaTween } = cfg
|
|
579
|
-
let overlap = duration - interval
|
|
583
|
+
let overlap = (duration - interval) * -1 // flip it
|
|
580
584
|
|
|
581
585
|
if (section.stage.firstTween) {
|
|
582
586
|
overlap = 0
|
|
@@ -599,6 +603,7 @@ export default class Moonwalk {
|
|
|
599
603
|
section,
|
|
600
604
|
entry.target,
|
|
601
605
|
duration,
|
|
606
|
+
interval,
|
|
602
607
|
transition,
|
|
603
608
|
overlap,
|
|
604
609
|
alphaTween
|
|
@@ -651,7 +656,7 @@ export default class Moonwalk {
|
|
|
651
656
|
* @param {*} tweenOverlap
|
|
652
657
|
* @param {*} alphaTween
|
|
653
658
|
*/
|
|
654
|
-
tweenJS (section, target, tweenDuration, tweenTransition, tweenOverlap, alphaTween) {
|
|
659
|
+
tweenJS (section, target, tweenDuration, tweenInterval, tweenTransition, tweenOverlap, alphaTween) {
|
|
655
660
|
let tweenPosition
|
|
656
661
|
const startingPoint = tweenDuration - tweenOverlap
|
|
657
662
|
|
|
@@ -666,7 +671,7 @@ export default class Moonwalk {
|
|
|
666
671
|
tweenPosition = () => section.timeline.time()
|
|
667
672
|
} else {
|
|
668
673
|
/* Still time, add as normal overlap at the end */
|
|
669
|
-
tweenPosition = () =>
|
|
674
|
+
tweenPosition = () => `>${tweenOverlap}`
|
|
670
675
|
}
|
|
671
676
|
} else {
|
|
672
677
|
tweenPosition = () => '+=0'
|
|
@@ -674,14 +679,13 @@ export default class Moonwalk {
|
|
|
674
679
|
|
|
675
680
|
gsap.set(target, tweenTransition.from)
|
|
676
681
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
)
|
|
684
|
-
.call(() => { target.setAttribute('data-moonwalked', '') }, null, '<')
|
|
682
|
+
const toTransition = {
|
|
683
|
+
...tweenTransition.to,
|
|
684
|
+
duration: tweenDuration,
|
|
685
|
+
onComplete: () => target.setAttribute('data-moonwalked', '')
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
section.timeline.to(target, toTransition, tweenPosition())
|
|
685
689
|
|
|
686
690
|
if (alphaTween) {
|
|
687
691
|
section.timeline.to(target, {
|
|
@@ -702,10 +706,10 @@ export default class Moonwalk {
|
|
|
702
706
|
* @param {*} transition
|
|
703
707
|
* @param {*} overlap
|
|
704
708
|
*/
|
|
705
|
-
tweenCSS (section, target, tweenDuration, tweenTransition, tweenOverlap) {
|
|
709
|
+
tweenCSS (section, target, tweenDuration, tweenInterval, tweenTransition, tweenOverlap) {
|
|
706
710
|
let tweenPosition
|
|
707
|
-
const startingPoint = tweenDuration - tweenOverlap
|
|
708
|
-
|
|
711
|
+
const startingPoint = tweenDuration - (tweenOverlap * -1)
|
|
712
|
+
|
|
709
713
|
if (Dom.hasAttribute(target, 'data-moonwalked')) {
|
|
710
714
|
return
|
|
711
715
|
}
|
|
@@ -717,7 +721,7 @@ export default class Moonwalk {
|
|
|
717
721
|
tweenPosition = () => section.timeline.time()
|
|
718
722
|
} else {
|
|
719
723
|
/* Still time, add as normal overlap at the end */
|
|
720
|
-
tweenPosition = () =>
|
|
724
|
+
tweenPosition = () => `>${tweenOverlap}`
|
|
721
725
|
}
|
|
722
726
|
} else {
|
|
723
727
|
tweenPosition = () => '+=0'
|
|
@@ -731,6 +735,6 @@ export default class Moonwalk {
|
|
|
731
735
|
duration: tweenDuration
|
|
732
736
|
},
|
|
733
737
|
tweenPosition()
|
|
734
|
-
).call(() =>
|
|
738
|
+
).call(() => target.setAttribute('data-moonwalked', ''), null, '>')
|
|
735
739
|
}
|
|
736
740
|
}
|
|
@@ -18,6 +18,12 @@ export default class Typography {
|
|
|
18
18
|
self.elems = [...parent.querySelectorAll(self.settings.selector)]
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
// load children
|
|
22
|
+
const typoParents = document.querySelectorAll('[data-typo-children]')
|
|
23
|
+
typoParents.forEach(typoParent => {
|
|
24
|
+
self.elems = [...typoParent.children]
|
|
25
|
+
})
|
|
26
|
+
|
|
21
27
|
this.apply()
|
|
22
28
|
}
|
|
23
29
|
|
package/src/utils/zoom.js
CHANGED
|
@@ -24,15 +24,10 @@ const _mediaQueryBinarySearch = (property, unit, a, b, maxIter, epsilon) => {
|
|
|
24
24
|
return ratio
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
window.devicePixelRatio - initial
|
|
32
|
-
|
|
33
|
-
*/
|
|
27
|
+
const calculateFirefox = () => {
|
|
28
|
+
return Math.round(_mediaQueryBinarySearch('min--moz-device-pixel-ratio', '', 0, 10, 20, 0.0001) * 10) / 10
|
|
29
|
+
}
|
|
34
30
|
|
|
35
|
-
const calculateFirefox = () => Math.round(_mediaQueryBinarySearch('min--moz-device-pixel-ratio', '', 0, 10, 20, 0.0001) * 10) / 10
|
|
36
31
|
const calculateChrome = initial => Math.round(window.devicePixelRatio * 100) - initial
|
|
37
32
|
const calculateDefault = () => Math.round(((window.outerWidth) / window.innerWidth) * 10) / 10
|
|
38
33
|
|
package/CHANGELOG.md
DELETED
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
#### 3.45.0
|
|
2
|
-
|
|
3
|
-
- Marquee: Reveal on `APPLICATION:REVEALED`
|
|
4
|
-
- Add Toggler module
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#### 3.44.0
|
|
8
|
-
|
|
9
|
-
- Moonwalk: Add `data-moonwalked` to walked elements. Don't run again on
|
|
10
|
-
already walked elements.
|
|
11
|
-
- Dom: Add `hasAttribute`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#### 3.43.0
|
|
15
|
-
|
|
16
|
-
- **BREAKING** Marquee: More consistent `speed`. This means you should probably
|
|
17
|
-
verify that the speed you set looks ok with the new config
|
|
18
|
-
- Marquee: Add `paddingLeft` and `slowDownOnHover` options
|
|
19
|
-
- Application: send `widthChanged` and `heightChanged` booleans
|
|
20
|
-
in `APPLICATION:RESIZE` event detail
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#### 3.42.7
|
|
24
|
-
|
|
25
|
-
- Links: Check for zero opacity body element on back/forward nav
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#### 3.42.6
|
|
29
|
-
|
|
30
|
-
- Typography: Better defaults
|
|
31
|
-
- MobileMenu: set `this.open` boolean on opening/closing
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#### 3.42.5
|
|
35
|
-
|
|
36
|
-
- Links: Fade out header/footer (if found) in default transition
|
|
37
|
-
- Moonwalk: Don't wait for images with `data-placeholder`, render right away
|
|
38
|
-
and let Lazyload do the image reveal.
|
|
39
|
-
|
|
40
|
-
#### 3.42.4
|
|
41
|
-
|
|
42
|
-
- Moonwalk: Fix fallback selector. This could have broken devices with
|
|
43
|
-
prefer reduced motion enabled.
|
|
44
|
-
|
|
45
|
-
#### 3.42.3
|
|
46
|
-
|
|
47
|
-
- Zoom: Change logic for Chrome/Safari
|
|
48
|
-
|
|
49
|
-
#### 3.42.2
|
|
50
|
-
|
|
51
|
-
- Popup: Listen for ESC to close popup
|
|
52
|
-
|
|
53
|
-
#### 3.42.1
|
|
54
|
-
|
|
55
|
-
- Moonwalk: Also remove `-children` when resetting
|
|
56
|
-
- FixedHeader: Only run `onAltBg` and `onNotAltBg` if `altBgColor` is set
|
|
57
|
-
- Application: Set browser zoom as `--ec-zoom` variable. This is used
|
|
58
|
-
in EuropaCSS for scaling/zooming vw fontsizes.
|
|
59
|
-
|
|
60
|
-
#### 3.42.0
|
|
61
|
-
|
|
62
|
-
- FixedHeader: Try to fix scroll jank with content-visibility
|
|
63
|
-
- General: Better checking for existing elements before proceeding
|
|
64
|
-
|
|
65
|
-
#### 3.41.3
|
|
66
|
-
|
|
67
|
-
- CoverOverlay: Check that iframe exists
|
|
68
|
-
- Lazyload: Ensure parent node exists before setting sizes
|
|
69
|
-
- General: Switch package scope to brandocms
|
|
70
|
-
|
|
71
|
-
#### 3.41.2
|
|
72
|
-
|
|
73
|
-
- Marquee: Play when in viewport initially. Fixes resize bug.
|
|
74
|
-
|
|
75
|
-
#### 3.41.1
|
|
76
|
-
|
|
77
|
-
- Marquee: Update marquee dimensions on resize
|
|
78
|
-
|
|
79
|
-
#### 3.41.0
|
|
80
|
-
|
|
81
|
-
- Marquee: New module
|
|
82
|
-
|
|
83
|
-
#### 3.40.1
|
|
84
|
-
|
|
85
|
-
- FixedHeader: Check props as preflight
|
|
86
|
-
- FixedHeader: Set data-header-transitions after initial preflight
|
|
87
|
-
|
|
88
|
-
#### 3.40.0
|
|
89
|
-
|
|
90
|
-
- Dropdown: New module
|
|
91
|
-
- Scrollspy: New module
|
|
92
|
-
|
|
93
|
-
#### 3.39.1
|
|
94
|
-
|
|
95
|
-
- FixedHeader: Fix `onOutline` callback
|
|
96
|
-
- Lazyload: Also set `sizes` on `source` tags
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
#### 3.39.0
|
|
100
|
-
|
|
101
|
-
- Lightbox: Add support for srcset. Add `data-srcset` to your anchor tag with `data-lightbox`
|
|
102
|
-
- FixedHeader: Remove unused intersect logic.
|
|
103
|
-
- Lazyload: Fix setting `srcset` on `source` tags that have `data-srcset`
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
#### 3.38.0
|
|
107
|
-
|
|
108
|
-
- Application: Prevent scrollLock running while already locked, since this would reset scrollbar
|
|
109
|
-
width padding compensation
|
|
110
|
-
- Application: Add `extraPaddedElements` param to `scrollLock`. If for instance your nav needs
|
|
111
|
-
the same padding as the body element when compensating for scrollbar width.
|
|
112
|
-
`app.scrollLock(['header[data-nav] nav']);`
|
|
113
|
-
- Cookies: Expire cookie law cookie one year in the future.
|
|
114
|
-
- Dom: Add `Dom.inViewport(el)` to check if parts of `el` is currently visible
|
|
115
|
-
- Dom: Add `Dom.create('div', ['my-class1', 'my-class2'])` convenience function
|
|
116
|
-
- Dom: Add `Dom.remove(el)` convenience function for removing `el` from document
|
|
117
|
-
- Dom: Add `Dom.append(el)` convenience function for appending `el` to `body`
|
|
118
|
-
- Lazyload: Set `data-ll-loaded` on finished lazy loaded images.
|
|
119
|
-
- Lazyload: Prevent repeat lazyloading already loaded image
|
|
120
|
-
- Lazyload: Prevent repeat lazyloading already loaded image
|
|
121
|
-
- Lazyload: Dynamically set `sizes` for images with `[data-sizes="auto"]`
|
|
122
|
-
- Moonwalk: Add `container` param to constructor. For instance if we want to run Moonwalk
|
|
123
|
-
on a json loaded doc.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
#### 3.37.0
|
|
127
|
-
|
|
128
|
-
- update GSAP, export ScrollTrigger
|
|
129
|
-
- Application: add `app.section`
|
|
130
|
-
- HeroSlider: add `lazyImages` config. If true, tries to lazyload first image before
|
|
131
|
-
setting slider as ready
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
#### 3.36.0
|
|
135
|
-
|
|
136
|
-
- Moonwalk: Fix space in class name when css tweening
|
|
137
|
-
- Moonwalk: add `clearMoonwalkOnAnchors`. Removes all moonwalks if called from a link with hash/anchor.
|
|
138
|
-
I.e if the URL is `/news#latest`, all moonwalks are removed. This can sort out a rendering bug with
|
|
139
|
-
IntersectionObserver that sometimes happens.
|
|
140
|
-
- Application: add `respectReducedMotion`. Set to false if you don't want to respect the user's
|
|
141
|
-
reduced-motion settings. May prevent some rendering bugs in extreme cases, but not recommended.
|
|
142
|
-
- General: Don't include polyfills in package, include from application
|
|
143
|
-
- General: Only try to call object-fit polyfill on IE11
|
|
144
|
-
- General: Set capture/passive for events where applicable.
|
|
145
|
-
- Lazyload: Force picturefill after lazyload on IE11
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
#### 3.35.0
|
|
149
|
-
|
|
150
|
-
- Dom: `setCSSVar`
|
|
151
|
-
- FixedHeader: fix `onOutline` event
|
|
152
|
-
- Lightbox: `swipe: true/false` cfg setting. If swipe is true, native zoom won't work, so allow to choose.
|
|
153
|
-
- Moonwalk: add `clearNestedSections` -- NOTE: This is enabled by default, since nested sections
|
|
154
|
-
usually leads to trouble!
|
|
155
|
-
- StickyHeader: add `beforeEnter` event
|
|
156
|
-
- StickyHeader: add `unPinOnResize` cfg.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
#### 3.34.1
|
|
160
|
-
|
|
161
|
-
- Cookies: Set `cookielaw` cookie to ROOT
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
#### 3.34.0
|
|
165
|
-
|
|
166
|
-
- Lightbox: Add `trigger` to opts.
|
|
167
|
-
- Drop node 8 from travis
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
#### 3.33.0
|
|
171
|
-
|
|
172
|
-
- Add `APPLICATION_REVEALED` to registerable callbacks.
|
|
173
|
-
app.registerCallback(Events.APPLICATION_REVEALED, () => {})
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
#### 3.32.0
|
|
177
|
-
|
|
178
|
-
- FixedHeader: Add `onOutline` event that pins header when outline is enabled. Replaces `pinOnOutline`.
|
|
179
|
-
- Moonwalk: Change default starting style to be `opacity 0` instead of `visibility: hidden`, since the latter
|
|
180
|
-
screws up tabbing. Make sure your css reflects this by setting `[data-moonwalk], [data-moonwalk-section], ...`
|
|
181
|
-
to `opacity: 0` instead of `visibility: hidden`. If you update `europacss` this is fixed automatically.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
#### 3.31.0
|
|
185
|
-
|
|
186
|
-
- Fix cookielaw banner not respecting cookie set
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
#### 3.30.0
|
|
190
|
-
|
|
191
|
-
- Kill all faders
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
#### 3.29.0
|
|
195
|
-
|
|
196
|
-
- HeroVideo: Add `data-src` option for choosing mobile/desktop versions.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
#### 3.28.0
|
|
200
|
-
|
|
201
|
-
- Bug fixes
|
|
202
|
-
- Update GSAP to 3.1.1
|
|
203
|
-
- Moonwalk: Fix CSS transitions
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
#### 3.27.0
|
|
207
|
-
|
|
208
|
-
- Moonwalk: Allow setting named children - `data-moonwalk-children="slide"`
|
|
209
|
-
- Moonwalk: Clear out more keys on reduced-motion. Update EuropaCSS too for fixes.
|
|
210
|
-
- HeroVideo: Add `data-cover` for cover image.
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
#### 3.26.0
|
|
214
|
-
|
|
215
|
-
- Links: Add `triggerEvents` and `scrollDuration` to config.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
#### 3.25.0
|
|
219
|
-
|
|
220
|
-
- Fix Safari back button bug where fader would stay activated.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
#### 3.24.2
|
|
224
|
-
|
|
225
|
-
- Lock GSAP to 3.0.4 due to a timeline regression.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
#### 3.24.1
|
|
229
|
-
|
|
230
|
-
- Remove debug log
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
#### 3.24.0
|
|
234
|
-
|
|
235
|
-
- MobileMenu: Fix: Prevent default when binding click event
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
#### 3.23.0
|
|
239
|
-
|
|
240
|
-
- MobileMenu: Fix: Pass self to `onResize` event.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
#### 3.22.0
|
|
244
|
-
|
|
245
|
-
- Moonwalk: Fix visual bug
|
|
246
|
-
- Moonwalk: Add runs. Runs a function when element comes into view.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
#### 3.21.0
|
|
250
|
-
|
|
251
|
-
- gsap 3!
|
|
252
|
-
- FixedHeader: Allow function as `offset` and `offsetBg`
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
#### 3.20.0
|
|
256
|
-
|
|
257
|
-
- FixedHeader: Allow element as `offset`
|
|
258
|
-
- Move `unPinOnResize` to section config!
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
#### 3.19.0
|
|
262
|
-
|
|
263
|
-
- HeroVideo: Don't autoplay when in viewport if pause is pressed
|
|
264
|
-
- Links: Ignore `noanim` classed anchors
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
#### 3.18.0
|
|
268
|
-
|
|
269
|
-
- Applicaton: Add `Application.pollForElement` and `Application.pollForVariable`
|
|
270
|
-
- FixedHeader: Add `onMobileMenuOpen` and `onMobileMenuClose` callbacks
|
|
271
|
-
- Dom: Add `Dom.offset` and `Dom.position`
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
#### 3.17.0
|
|
275
|
-
|
|
276
|
-
- StickyHeader: Add `opts.pinOnForcedScroll`
|
|
277
|
-
- Application: Add `Application.scrollTo`
|
|
278
|
-
- HeroVideo: Add pause/play.
|
|
279
|
-
`opts.elements.play` and `opts.elements.pause` are strings representing the SVG icons.
|
|
280
|
-
They get wrapped in a button with `[data-hero-video-pause].
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
#### 3.16.0
|
|
284
|
-
|
|
285
|
-
- Lightbox: track pointer direction in `pointerDirection`
|
|
286
|
-
- Lightbox: expose `onClick`, `onPointerLeft` and `onPointerRight` events.
|
|
287
|
-
- StickyHeader: add `onClone` event to customize how the auxillary header is created.
|
|
288
|
-
|
|
289
|
-
#### 3.15.0
|
|
290
|
-
|
|
291
|
-
- HeroSlider: better initialization. Expose `onFadeIn` event
|
|
292
|
-
- Export `_defaultsDeep`
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
#### 3.14.0
|
|
296
|
-
|
|
297
|
-
- StickyHeader: reveals on `Events.APPLICATION_REVEALED`. Can be set with `opts.on`
|
|
298
|
-
- Moonwalk: Force section element to be visible (Set `visibility: hidden`
|
|
299
|
-
in pcss for `[data-moonwalk-section]`)
|
|
300
|
-
- Application: remove default fader delay.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
#### 3.13.0
|
|
304
|
-
|
|
305
|
-
- Lightbox: Add keyboard navigation
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
#### 3.12.0
|
|
309
|
-
|
|
310
|
-
- Lightbox: Use timelines for even more flexibility with captions
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
#### 3.11.0
|
|
314
|
-
|
|
315
|
-
- Lightbox: Rewritten to be more flexible. Exposes more events. Preloads more images.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
#### 3.10.0
|
|
319
|
-
|
|
320
|
-
- Moonwalk: Removed `opts.fireOnReady`. Added `opts.on` option instead. Pass the event
|
|
321
|
-
we should listen for. The default is `on: Events.APPLICATION_REVEALED`
|
|
322
|
-
- Moonwalk: add `opts.initialDelay`. This is an added delay before `ready()` is fired.
|
|
323
|
-
- FixedHeader: add `opts.on` option for listening to an event before firing `enter()`
|
|
324
|
-
- FixedHeader: added `opts.<section>.beforeEnter`. This gets called during init, so
|
|
325
|
-
it's a good place to hide items that should be revealed in `opts.<section>.enter`.
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
#### 3.9.0
|
|
329
|
-
|
|
330
|
-
- FixedHeader: Allow locking/unlocking pin/unpin
|
|
331
|
-
- StickyHeader: Allow locking/unlocking pin/unpin
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
#### 3.8.0
|
|
335
|
-
|
|
336
|
-
- Lightbox: Lock scroll
|
|
337
|
-
- Lightbox: Ensure image is loaded before fading in
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
#### 3.7.0
|
|
341
|
-
|
|
342
|
-
- Cookielaw: Show after application is revealed. Delay by 0.5 as standard.
|
|
343
|
-
- Fontloader: Check that fonts are loaded before calling fadeIn() / revealed event
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
#### 3.6.0
|
|
347
|
-
|
|
348
|
-
- Lightbox: More hooks
|
|
349
|
-
- Breakpoints: Initialize earlier to ensure breakpoints are available to other modules
|
|
350
|
-
- Remove `no-js`/`js` feature test. Handle this at the application
|
|
351
|
-
level instead to try and avoid fouc. Newest Brando version does this for us
|
|
352
|
-
in the `render_meta`.
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
#### 3.5.0
|
|
356
|
-
|
|
357
|
-
- Dom: Add `overlapsVertically` function
|
|
358
|
-
- FixedHeader: Add `unPinOnResize` boolean switch
|
|
359
|
-
- Export `rafCallback` function
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
#### 3.4.0
|
|
363
|
-
|
|
364
|
-
- Add `Dom` class
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
#### 3.3.0
|
|
368
|
-
|
|
369
|
-
- Force update Parallax after Git tries to ruin everything
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
#### 3.2.0
|
|
373
|
-
|
|
374
|
-
- Popup: Add triggers for opening and closing popups. Add docs in README
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
#### 3.1.0
|
|
378
|
-
|
|
379
|
-
- Application: Set dimensions on application init
|
|
380
|
-
- Application: Extended debug info (screen size, viewport, features)
|
|
381
|
-
- Moonwalk: Clean up Moonwalk code
|
|
382
|
-
- Parallax: Fix parallax up a bit. Still mainly for hero usage.
|
|
383
|
-
- Parallax: Fix parallax up a bit. Still mainly for hero usage.
|