uikit 3.21.13 → 3.21.14-dev.028df7be8

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 (47) 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 +10 -4
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +10 -4
  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 +1 -1
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +1 -1
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +4 -2
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +1 -1
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +4 -2
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +4 -2
  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 +28 -31
  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 +40 -35
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +2 -2
  42. package/src/js/api/boot.js +16 -20
  43. package/src/js/api/events.js +7 -9
  44. package/src/js/components/lightbox-panel.js +6 -2
  45. package/src/js/components/sortable.js +3 -1
  46. package/src/js/core/drop.js +3 -1
  47. package/src/js/mixin/slider-nav.js +3 -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.21.13",
5
+ "version": "3.21.14-dev.028df7be8",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -22,7 +22,7 @@
22
22
  "devDependencies": {
23
23
  "@eslint/js": "^9.6.0",
24
24
  "@rollup/plugin-alias": "^5.1.0",
25
- "@rollup/plugin-replace": "^5.0.5",
25
+ "@rollup/plugin-replace": "^6.0.1",
26
26
  "archiver": "^7.0.1",
27
27
  "camelcase": "^8.0.0",
28
28
  "chokidar-cli": "^3.0.0",
@@ -24,37 +24,33 @@ function init(App) {
24
24
  apply(document.body, connect);
25
25
  }
26
26
 
27
- new MutationObserver((records) => records.forEach(applyChildListMutation)).observe(document, {
27
+ new MutationObserver(handleMutation).observe(document, {
28
28
  subtree: true,
29
29
  childList: true,
30
- });
31
-
32
- new MutationObserver((records) => records.forEach(applyAttributeMutation)).observe(document, {
33
- subtree: true,
34
30
  attributes: true,
35
31
  });
36
32
 
37
33
  App._initialized = true;
38
34
  }
39
35
 
40
- function applyChildListMutation({ addedNodes, removedNodes }) {
41
- for (const node of addedNodes) {
42
- apply(node, connect);
43
- }
36
+ function handleMutation(records) {
37
+ for (const { addedNodes, removedNodes, target, attributeName } of records) {
38
+ for (const node of addedNodes) {
39
+ apply(node, connect);
40
+ }
44
41
 
45
- for (const node of removedNodes) {
46
- apply(node, disconnect);
47
- }
48
- }
42
+ for (const node of removedNodes) {
43
+ apply(node, disconnect);
44
+ }
49
45
 
50
- function applyAttributeMutation({ target, attributeName }) {
51
- const name = getComponentName(attributeName);
46
+ const name = attributeName && getComponentName(attributeName);
52
47
 
53
- if (name) {
54
- if (hasAttr(target, attributeName)) {
55
- createComponent(name, target);
56
- } else {
57
- getComponent(target, name)?.$destroy();
48
+ if (name) {
49
+ if (hasAttr(target, attributeName)) {
50
+ createComponent(name, target);
51
+ } else {
52
+ getComponent(target, name)?.$destroy();
53
+ }
58
54
  }
59
55
  }
60
56
  }
@@ -1,4 +1,4 @@
1
- import { hasOwn, isArray, isFunction, isPlainObject, isString, on } from 'uikit-util';
1
+ import { hasOwn, isArray, isPlainObject, on } from 'uikit-util';
2
2
 
3
3
  export function initEvents(instance) {
4
4
  for (const event of instance.$options.events || []) {
@@ -16,19 +16,17 @@ export function registerEvent(instance, event, key) {
16
16
  let { name, el, handler, capture, passive, delegate, filter, self } = isPlainObject(event)
17
17
  ? event
18
18
  : { name: key, handler: event };
19
- el = isFunction(el) ? el.call(instance, instance) : el || instance.$el;
19
+ el = el ? el.call(instance, instance) : instance.$el;
20
20
 
21
21
  if (!el || (isArray(el) && !el.length) || (filter && !filter.call(instance, instance))) {
22
22
  return;
23
23
  }
24
24
 
25
25
  instance._disconnect.push(
26
- on(
27
- el,
28
- name,
29
- delegate ? (isString(delegate) ? delegate : delegate.call(instance, instance)) : null,
30
- isString(handler) ? instance[handler] : handler.bind(instance),
31
- { passive, capture, self },
32
- ),
26
+ on(el, name, delegate?.call(instance, instance), handler.bind(instance), {
27
+ passive,
28
+ capture,
29
+ self,
30
+ }),
33
31
  );
34
32
  }
@@ -73,7 +73,9 @@ export default {
73
73
  {
74
74
  name: `${pointerMove} ${pointerDown} keydown`,
75
75
 
76
- handler: 'showControls',
76
+ handler() {
77
+ this.showControls();
78
+ },
77
79
  },
78
80
 
79
81
  {
@@ -95,7 +97,9 @@ export default {
95
97
 
96
98
  self: true,
97
99
 
98
- handler: 'showControls',
100
+ handler() {
101
+ this.showControls();
102
+ },
99
103
  },
100
104
 
101
105
  {
@@ -68,7 +68,9 @@ export default {
68
68
  events: {
69
69
  name: pointerDown,
70
70
  passive: false,
71
- handler: 'init',
71
+ handler() {
72
+ this.init();
73
+ },
72
74
  },
73
75
 
74
76
  computed: {
@@ -276,7 +276,9 @@ export default {
276
276
 
277
277
  self: true,
278
278
 
279
- handler: 'clearTimers',
279
+ handler() {
280
+ this.clearTimers();
281
+ },
280
282
  },
281
283
 
282
284
  {
@@ -159,7 +159,9 @@ export default {
159
159
 
160
160
  {
161
161
  name: 'itemshow',
162
- handler: 'updateNav',
162
+ handler() {
163
+ this.updateNav();
164
+ },
163
165
  },
164
166
 
165
167
  {