uikit 3.25.29-dev.f3e1c53 → 3.25.29

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 (46) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +4 -4
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +4 -4
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +11 -15
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +11 -15
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +11 -15
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +11 -15
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +11 -15
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +24 -10
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +27 -13
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/lightbox-panel.js +3 -3
  44. package/src/js/core/svg.js +5 -1
  45. package/src/js/util/filter.js +6 -1
  46. package/src/js/util/svg.js +7 -6
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.25.29-dev.f3e1c53",
5
+ "version": "3.25.29",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -344,7 +344,7 @@ export default {
344
344
  try {
345
345
  const { height, width } = await (
346
346
  await fetch(
347
- `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
347
+ `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURIComponent(
348
348
  src,
349
349
  )}`,
350
350
  { credentials: 'omit' },
@@ -463,9 +463,9 @@ function toThumbnavItem(item, videoAutoplay) {
463
463
  }
464
464
 
465
465
  function isImage(src) {
466
- return src?.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i);
466
+ return src?.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|[?#])/i);
467
467
  }
468
468
 
469
469
  function isVideo(src) {
470
- return src?.match(/\.(mp4|webm|ogv)($|\?)/i);
470
+ return src?.match(/\.(mp4|webm|ogv)($|[?#])/i);
471
471
  }
@@ -51,7 +51,11 @@ export default {
51
51
  methods: {
52
52
  async getSvg() {
53
53
  if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
54
- await new Promise((resolve) => once(this.$el, 'load', resolve));
54
+ await new Promise((resolve, reject) =>
55
+ once(this.$el, 'load error', (event) =>
56
+ event.type === 'load' ? resolve() : reject(event),
57
+ ),
58
+ );
55
59
  }
56
60
 
57
61
  return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
@@ -83,7 +83,12 @@ export function isSameSiteAnchor(el) {
83
83
  export function getTargetedElement(el) {
84
84
  if (isSameSiteAnchor(el)) {
85
85
  const { hash, ownerDocument } = toNode(el);
86
- const id = decodeURIComponent(hash).slice(1);
86
+ let id = hash.slice(1);
87
+ try {
88
+ id = decodeURIComponent(id);
89
+ } catch {
90
+ // Fall back to the literal fragment for malformed encoding.
91
+ }
87
92
  return id
88
93
  ? ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0]
89
94
  : ownerDocument.documentElement;
@@ -1,10 +1,11 @@
1
1
  import { $$ } from './dom';
2
- import { isVisible } from './filter.js';
3
2
 
4
3
  export function getMaxPathLength(el) {
5
- return isVisible(el)
6
- ? Math.ceil(
7
- Math.max(0, ...$$('[stroke]', el).map((stroke) => stroke.getTotalLength?.() || 0)),
8
- )
9
- : 0;
4
+ try {
5
+ return Math.ceil(
6
+ Math.max(0, ...$$('[stroke]', el).map((stroke) => stroke.getTotalLength?.() || 0)),
7
+ );
8
+ } catch {
9
+ return 0;
10
+ }
10
11
  }