uikit 3.19.5-dev.8210c3e08 → 3.19.5-dev.8317c4705

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.
Files changed (45) hide show
  1. package/dist/css/uikit-core-rtl.css +1 -1
  2. package/dist/css/uikit-core-rtl.min.css +1 -1
  3. package/dist/css/uikit-core.css +1 -1
  4. package/dist/css/uikit-core.min.css +1 -1
  5. package/dist/css/uikit-rtl.css +1 -1
  6. package/dist/css/uikit-rtl.min.css +1 -1
  7. package/dist/css/uikit.css +1 -1
  8. package/dist/css/uikit.min.css +1 -1
  9. package/dist/js/components/countdown.js +1 -1
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +1 -1
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +1 -1
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +1 -1
  16. package/dist/js/components/lightbox.min.js +1 -1
  17. package/dist/js/components/notification.js +1 -1
  18. package/dist/js/components/notification.min.js +1 -1
  19. package/dist/js/components/parallax.js +18 -6
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +18 -6
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +18 -6
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +18 -6
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +18 -6
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +1 -1
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +1 -1
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +1 -1
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +24 -33
  36. package/dist/js/uikit-core.min.js +1 -1
  37. package/dist/js/uikit-icons.js +1 -1
  38. package/dist/js/uikit-icons.min.js +1 -1
  39. package/dist/js/uikit.js +24 -33
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +1 -1
  42. package/src/js/api/observer.js +5 -17
  43. package/src/js/core/inverse.js +1 -11
  44. package/src/js/util/selector.js +5 -1
  45. package/src/js/util/svg.js +12 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.19.5-dev.8210c3e08",
5
+ "version": "3.19.5-dev.8317c4705",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -46,33 +46,21 @@ function registerObservable(instance, observable) {
46
46
  const targets = hasOwn(instance, key) ? instance[key] : target;
47
47
  const observer = observe(targets, handler, options, args);
48
48
 
49
- if (isFunction(target) && isArray(instance[key])) {
50
- registerWatch(
51
- instance,
52
- { handler: updateTargets(observer, options), immediate: false },
53
- key,
54
- );
49
+ if (isFunction(target) && isArray(instance[key]) && observer.unobserve) {
50
+ registerWatch(instance, { handler: updateTargets(observer), immediate: false }, key);
55
51
  }
56
52
 
57
53
  registerObserver(instance, observer);
58
54
  }
59
55
 
60
- function updateTargets(observer, options) {
56
+ function updateTargets(observer) {
61
57
  return (targets, prev) => {
62
58
  for (const target of prev) {
63
- if (!includes(targets, target)) {
64
- if (observer.unobserve) {
65
- observer.unobserve(target);
66
- } else {
67
- observer.disconnect();
68
- }
69
- }
59
+ !includes(targets, target) && observer.unobserve(target);
70
60
  }
71
61
 
72
62
  for (const target of targets) {
73
- if (!includes(prev, target) || !observer.unobserve) {
74
- observer.observe(target, options);
75
- }
63
+ !includes(prev, target) && observer.observe(target);
76
64
  }
77
65
  };
78
66
  }
@@ -1,5 +1,5 @@
1
1
  import { $$, css, dimensions, matches, observeResize, on, replaceClass } from 'uikit-util';
2
- import { intersection, mutation } from '../api/observables';
2
+ import { mutation } from '../api/observables';
3
3
 
4
4
  export default {
5
5
  props: {
@@ -17,12 +17,6 @@ export default {
17
17
  },
18
18
 
19
19
  observe: [
20
- intersection({
21
- handler([{ isIntersecting }]) {
22
- this.isIntersecting = isIntersecting;
23
- },
24
- args: { intersecting: false },
25
- }),
26
20
  mutation({
27
21
  target: ({ target }) => target,
28
22
  options: { attributes: true, attributeFilter: ['class'], attributeOldValue: true },
@@ -61,10 +55,6 @@ export default {
61
55
 
62
56
  update: {
63
57
  read() {
64
- if (!this.isIntersecting) {
65
- return false;
66
- }
67
-
68
58
  for (const target of this.target) {
69
59
  replaceClass(
70
60
  target,
@@ -83,7 +83,11 @@ function _query(selector, context = document, queryFn) {
83
83
  return ctx;
84
84
  }
85
85
  } else if (sel[0] === '~' || (sel[0] === '+' && isSingle)) {
86
- return _doQuery(parent(ctx), queryFn, `:scope :nth-child(${index(ctx) + 1}) ${sel}`);
86
+ return _doQuery(
87
+ parent(context),
88
+ queryFn,
89
+ `:scope :nth-child(${index(context) + 1}) ${sel}`,
90
+ );
87
91
  }
88
92
 
89
93
  if (ctx) {
@@ -1,5 +1,16 @@
1
1
  import { $$ } from './dom';
2
2
 
3
3
  export function getMaxPathLength(el) {
4
- return Math.ceil(Math.max(0, ...$$('[stroke]', el).map((stroke) => stroke.getTotalLength?.())));
4
+ return Math.ceil(
5
+ Math.max(
6
+ 0,
7
+ ...$$('[stroke]', el).map((stroke) => {
8
+ try {
9
+ return stroke.getTotalLength();
10
+ } catch (e) {
11
+ return 0;
12
+ }
13
+ }),
14
+ ),
15
+ );
5
16
  }