@brandocms/jupiter 3.46.1 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandocms/jupiter",
3
- "version": "3.46.1",
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.8.0",
36
+ "gsap": "3.11.0",
37
37
  "lodash.defaultsdeep": "^4.6.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@babel/core": "^7.16.0",
41
- "@babel/preset-env": "^7.16.4",
42
- "babel-jest": "^27.3.1",
43
- "eslint": "8.3.0",
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.25.3",
45
+ "eslint-plugin-import": "^2.26.0",
46
46
  "eslint-plugin-node": "^11.1.0",
47
- "eslint-plugin-promise": "^5.1.1",
48
- "jest": "^27.3.1"
47
+ "eslint-plugin-promise": "^6.0.1",
48
+ "jest": "^29.0.1",
49
+ "jest-environment-jsdom": "^29.0.1"
49
50
  }
50
51
  }
@@ -199,11 +199,12 @@ export default class Lazyload {
199
199
  .forEach(source => source.setAttribute('sizes', `${width}px`))
200
200
  }
201
201
  }
202
-
202
+
203
203
  img.removeAttribute('data-ll-placeholder')
204
204
  img.removeAttribute('data-ll-blurred')
205
205
  img.removeAttribute('data-ll-loading')
206
206
  img.setAttribute('data-ll-loaded', '')
207
+ picture.setAttribute('data-ll-srcset-loaded', '')
207
208
  }
208
209
 
209
210
  img.addEventListener('load', onload, false)
@@ -249,8 +249,8 @@ export default class Moonwalk {
249
249
  }
250
250
 
251
251
  const timeline = gsap.timeline({
252
- autoRemoveChildren: true,
253
- smoothChildTiming: true
252
+ autoRemoveChildren: false,
253
+ smoothChildTiming: false
254
254
  })
255
255
 
256
256
  return {
@@ -674,19 +674,18 @@ export default class Moonwalk {
674
674
  tweenPosition = () => `>${tweenOverlap}`
675
675
  }
676
676
  } else {
677
- tweenPosition = () => '>'
677
+ tweenPosition = () => '+=0'
678
678
  }
679
679
 
680
680
  gsap.set(target, tweenTransition.from)
681
681
 
682
- section.timeline.to(
683
- target, {
684
- ...tweenTransition.to,
685
- duration: tweenDuration
686
- },
687
- tweenPosition()
688
- )
689
- .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())
690
689
 
691
690
  if (alphaTween) {
692
691
  section.timeline.to(target, {
@@ -725,7 +724,7 @@ export default class Moonwalk {
725
724
  tweenPosition = () => `>${tweenOverlap}`
726
725
  }
727
726
  } else {
728
- tweenPosition = () => '>'
727
+ tweenPosition = () => '+=0'
729
728
  }
730
729
 
731
730
  section.timeline.to(
package/CHANGELOG.md DELETED
@@ -1,397 +0,0 @@
1
- #### 3.46.1
2
-
3
- - Lazyload: Fix loading loop for Chrome. Only reset `sizes` on load for firefox browsers,
4
- and when the image has not been loaded before.
5
-
6
-
7
- #### 3.46.0
8
-
9
- - **BREAKING** Marquee: Drop `paddingLeft` -- add `startProgress`. This sets where in the
10
- timeline we should start. Default is `0.5`
11
- - Application: Add `hardScrollToTop()`
12
- - Zoom: Try to improve zoom handling for chrome
13
-
14
-
15
- #### 3.45.0
16
-
17
- - Marquee: Reveal on `APPLICATION:REVEALED`
18
- - Add Toggler module
19
-
20
-
21
- #### 3.44.0
22
-
23
- - Moonwalk: Add `data-moonwalked` to walked elements. Don't run again on
24
- already walked elements.
25
- - Dom: Add `hasAttribute`
26
-
27
-
28
- #### 3.43.0
29
-
30
- - **BREAKING** Marquee: More consistent `speed`. This means you should probably
31
- verify that the speed you set looks ok with the new config
32
- - Marquee: Add `paddingLeft` and `slowDownOnHover` options
33
- - Application: send `widthChanged` and `heightChanged` booleans
34
- in `APPLICATION:RESIZE` event detail
35
-
36
-
37
- #### 3.42.7
38
-
39
- - Links: Check for zero opacity body element on back/forward nav
40
-
41
-
42
- #### 3.42.6
43
-
44
- - Typography: Better defaults
45
- - MobileMenu: set `this.open` boolean on opening/closing
46
-
47
-
48
- #### 3.42.5
49
-
50
- - Links: Fade out header/footer (if found) in default transition
51
- - Moonwalk: Don't wait for images with `data-placeholder`, render right away
52
- and let Lazyload do the image reveal.
53
-
54
- #### 3.42.4
55
-
56
- - Moonwalk: Fix fallback selector. This could have broken devices with
57
- prefer reduced motion enabled.
58
-
59
- #### 3.42.3
60
-
61
- - Zoom: Change logic for Chrome/Safari
62
-
63
- #### 3.42.2
64
-
65
- - Popup: Listen for ESC to close popup
66
-
67
- #### 3.42.1
68
-
69
- - Moonwalk: Also remove `-children` when resetting
70
- - FixedHeader: Only run `onAltBg` and `onNotAltBg` if `altBgColor` is set
71
- - Application: Set browser zoom as `--ec-zoom` variable. This is used
72
- in EuropaCSS for scaling/zooming vw fontsizes.
73
-
74
- #### 3.42.0
75
-
76
- - FixedHeader: Try to fix scroll jank with content-visibility
77
- - General: Better checking for existing elements before proceeding
78
-
79
- #### 3.41.3
80
-
81
- - CoverOverlay: Check that iframe exists
82
- - Lazyload: Ensure parent node exists before setting sizes
83
- - General: Switch package scope to brandocms
84
-
85
- #### 3.41.2
86
-
87
- - Marquee: Play when in viewport initially. Fixes resize bug.
88
-
89
- #### 3.41.1
90
-
91
- - Marquee: Update marquee dimensions on resize
92
-
93
- #### 3.41.0
94
-
95
- - Marquee: New module
96
-
97
- #### 3.40.1
98
-
99
- - FixedHeader: Check props as preflight
100
- - FixedHeader: Set data-header-transitions after initial preflight
101
-
102
- #### 3.40.0
103
-
104
- - Dropdown: New module
105
- - Scrollspy: New module
106
-
107
- #### 3.39.1
108
-
109
- - FixedHeader: Fix `onOutline` callback
110
- - Lazyload: Also set `sizes` on `source` tags
111
-
112
-
113
- #### 3.39.0
114
-
115
- - Lightbox: Add support for srcset. Add `data-srcset` to your anchor tag with `data-lightbox`
116
- - FixedHeader: Remove unused intersect logic.
117
- - Lazyload: Fix setting `srcset` on `source` tags that have `data-srcset`
118
-
119
-
120
- #### 3.38.0
121
-
122
- - Application: Prevent scrollLock running while already locked, since this would reset scrollbar
123
- width padding compensation
124
- - Application: Add `extraPaddedElements` param to `scrollLock`. If for instance your nav needs
125
- the same padding as the body element when compensating for scrollbar width.
126
- `app.scrollLock(['header[data-nav] nav']);`
127
- - Cookies: Expire cookie law cookie one year in the future.
128
- - Dom: Add `Dom.inViewport(el)` to check if parts of `el` is currently visible
129
- - Dom: Add `Dom.create('div', ['my-class1', 'my-class2'])` convenience function
130
- - Dom: Add `Dom.remove(el)` convenience function for removing `el` from document
131
- - Dom: Add `Dom.append(el)` convenience function for appending `el` to `body`
132
- - Lazyload: Set `data-ll-loaded` on finished lazy loaded images.
133
- - Lazyload: Prevent repeat lazyloading already loaded image
134
- - Lazyload: Prevent repeat lazyloading already loaded image
135
- - Lazyload: Dynamically set `sizes` for images with `[data-sizes="auto"]`
136
- - Moonwalk: Add `container` param to constructor. For instance if we want to run Moonwalk
137
- on a json loaded doc.
138
-
139
-
140
- #### 3.37.0
141
-
142
- - update GSAP, export ScrollTrigger
143
- - Application: add `app.section`
144
- - HeroSlider: add `lazyImages` config. If true, tries to lazyload first image before
145
- setting slider as ready
146
-
147
-
148
- #### 3.36.0
149
-
150
- - Moonwalk: Fix space in class name when css tweening
151
- - Moonwalk: add `clearMoonwalkOnAnchors`. Removes all moonwalks if called from a link with hash/anchor.
152
- I.e if the URL is `/news#latest`, all moonwalks are removed. This can sort out a rendering bug with
153
- IntersectionObserver that sometimes happens.
154
- - Application: add `respectReducedMotion`. Set to false if you don't want to respect the user's
155
- reduced-motion settings. May prevent some rendering bugs in extreme cases, but not recommended.
156
- - General: Don't include polyfills in package, include from application
157
- - General: Only try to call object-fit polyfill on IE11
158
- - General: Set capture/passive for events where applicable.
159
- - Lazyload: Force picturefill after lazyload on IE11
160
-
161
-
162
- #### 3.35.0
163
-
164
- - Dom: `setCSSVar`
165
- - FixedHeader: fix `onOutline` event
166
- - Lightbox: `swipe: true/false` cfg setting. If swipe is true, native zoom won't work, so allow to choose.
167
- - Moonwalk: add `clearNestedSections` -- NOTE: This is enabled by default, since nested sections
168
- usually leads to trouble!
169
- - StickyHeader: add `beforeEnter` event
170
- - StickyHeader: add `unPinOnResize` cfg.
171
-
172
-
173
- #### 3.34.1
174
-
175
- - Cookies: Set `cookielaw` cookie to ROOT
176
-
177
-
178
- #### 3.34.0
179
-
180
- - Lightbox: Add `trigger` to opts.
181
- - Drop node 8 from travis
182
-
183
-
184
- #### 3.33.0
185
-
186
- - Add `APPLICATION_REVEALED` to registerable callbacks.
187
- app.registerCallback(Events.APPLICATION_REVEALED, () => {})
188
-
189
-
190
- #### 3.32.0
191
-
192
- - FixedHeader: Add `onOutline` event that pins header when outline is enabled. Replaces `pinOnOutline`.
193
- - Moonwalk: Change default starting style to be `opacity 0` instead of `visibility: hidden`, since the latter
194
- screws up tabbing. Make sure your css reflects this by setting `[data-moonwalk], [data-moonwalk-section], ...`
195
- to `opacity: 0` instead of `visibility: hidden`. If you update `europacss` this is fixed automatically.
196
-
197
-
198
- #### 3.31.0
199
-
200
- - Fix cookielaw banner not respecting cookie set
201
-
202
-
203
- #### 3.30.0
204
-
205
- - Kill all faders
206
-
207
-
208
- #### 3.29.0
209
-
210
- - HeroVideo: Add `data-src` option for choosing mobile/desktop versions.
211
-
212
-
213
- #### 3.28.0
214
-
215
- - Bug fixes
216
- - Update GSAP to 3.1.1
217
- - Moonwalk: Fix CSS transitions
218
-
219
-
220
- #### 3.27.0
221
-
222
- - Moonwalk: Allow setting named children - `data-moonwalk-children="slide"`
223
- - Moonwalk: Clear out more keys on reduced-motion. Update EuropaCSS too for fixes.
224
- - HeroVideo: Add `data-cover` for cover image.
225
-
226
-
227
- #### 3.26.0
228
-
229
- - Links: Add `triggerEvents` and `scrollDuration` to config.
230
-
231
-
232
- #### 3.25.0
233
-
234
- - Fix Safari back button bug where fader would stay activated.
235
-
236
-
237
- #### 3.24.2
238
-
239
- - Lock GSAP to 3.0.4 due to a timeline regression.
240
-
241
-
242
- #### 3.24.1
243
-
244
- - Remove debug log
245
-
246
-
247
- #### 3.24.0
248
-
249
- - MobileMenu: Fix: Prevent default when binding click event
250
-
251
-
252
- #### 3.23.0
253
-
254
- - MobileMenu: Fix: Pass self to `onResize` event.
255
-
256
-
257
- #### 3.22.0
258
-
259
- - Moonwalk: Fix visual bug
260
- - Moonwalk: Add runs. Runs a function when element comes into view.
261
-
262
-
263
- #### 3.21.0
264
-
265
- - gsap 3!
266
- - FixedHeader: Allow function as `offset` and `offsetBg`
267
-
268
-
269
- #### 3.20.0
270
-
271
- - FixedHeader: Allow element as `offset`
272
- - Move `unPinOnResize` to section config!
273
-
274
-
275
- #### 3.19.0
276
-
277
- - HeroVideo: Don't autoplay when in viewport if pause is pressed
278
- - Links: Ignore `noanim` classed anchors
279
-
280
-
281
- #### 3.18.0
282
-
283
- - Applicaton: Add `Application.pollForElement` and `Application.pollForVariable`
284
- - FixedHeader: Add `onMobileMenuOpen` and `onMobileMenuClose` callbacks
285
- - Dom: Add `Dom.offset` and `Dom.position`
286
-
287
-
288
- #### 3.17.0
289
-
290
- - StickyHeader: Add `opts.pinOnForcedScroll`
291
- - Application: Add `Application.scrollTo`
292
- - HeroVideo: Add pause/play.
293
- `opts.elements.play` and `opts.elements.pause` are strings representing the SVG icons.
294
- They get wrapped in a button with `[data-hero-video-pause].
295
-
296
-
297
- #### 3.16.0
298
-
299
- - Lightbox: track pointer direction in `pointerDirection`
300
- - Lightbox: expose `onClick`, `onPointerLeft` and `onPointerRight` events.
301
- - StickyHeader: add `onClone` event to customize how the auxillary header is created.
302
-
303
- #### 3.15.0
304
-
305
- - HeroSlider: better initialization. Expose `onFadeIn` event
306
- - Export `_defaultsDeep`
307
-
308
-
309
- #### 3.14.0
310
-
311
- - StickyHeader: reveals on `Events.APPLICATION_REVEALED`. Can be set with `opts.on`
312
- - Moonwalk: Force section element to be visible (Set `visibility: hidden`
313
- in pcss for `[data-moonwalk-section]`)
314
- - Application: remove default fader delay.
315
-
316
-
317
- #### 3.13.0
318
-
319
- - Lightbox: Add keyboard navigation
320
-
321
-
322
- #### 3.12.0
323
-
324
- - Lightbox: Use timelines for even more flexibility with captions
325
-
326
-
327
- #### 3.11.0
328
-
329
- - Lightbox: Rewritten to be more flexible. Exposes more events. Preloads more images.
330
-
331
-
332
- #### 3.10.0
333
-
334
- - Moonwalk: Removed `opts.fireOnReady`. Added `opts.on` option instead. Pass the event
335
- we should listen for. The default is `on: Events.APPLICATION_REVEALED`
336
- - Moonwalk: add `opts.initialDelay`. This is an added delay before `ready()` is fired.
337
- - FixedHeader: add `opts.on` option for listening to an event before firing `enter()`
338
- - FixedHeader: added `opts.<section>.beforeEnter`. This gets called during init, so
339
- it's a good place to hide items that should be revealed in `opts.<section>.enter`.
340
-
341
-
342
- #### 3.9.0
343
-
344
- - FixedHeader: Allow locking/unlocking pin/unpin
345
- - StickyHeader: Allow locking/unlocking pin/unpin
346
-
347
-
348
- #### 3.8.0
349
-
350
- - Lightbox: Lock scroll
351
- - Lightbox: Ensure image is loaded before fading in
352
-
353
-
354
- #### 3.7.0
355
-
356
- - Cookielaw: Show after application is revealed. Delay by 0.5 as standard.
357
- - Fontloader: Check that fonts are loaded before calling fadeIn() / revealed event
358
-
359
-
360
- #### 3.6.0
361
-
362
- - Lightbox: More hooks
363
- - Breakpoints: Initialize earlier to ensure breakpoints are available to other modules
364
- - Remove `no-js`/`js` feature test. Handle this at the application
365
- level instead to try and avoid fouc. Newest Brando version does this for us
366
- in the `render_meta`.
367
-
368
-
369
- #### 3.5.0
370
-
371
- - Dom: Add `overlapsVertically` function
372
- - FixedHeader: Add `unPinOnResize` boolean switch
373
- - Export `rafCallback` function
374
-
375
-
376
- #### 3.4.0
377
-
378
- - Add `Dom` class
379
-
380
-
381
- #### 3.3.0
382
-
383
- - Force update Parallax after Git tries to ruin everything
384
-
385
-
386
- #### 3.2.0
387
-
388
- - Popup: Add triggers for opening and closing popups. Add docs in README
389
-
390
-
391
- #### 3.1.0
392
-
393
- - Application: Set dimensions on application init
394
- - Application: Extended debug info (screen size, viewport, features)
395
- - Moonwalk: Clean up Moonwalk code
396
- - Parallax: Fix parallax up a bit. Still mainly for hero usage.
397
- - Parallax: Fix parallax up a bit. Still mainly for hero usage.