@ethlete/core 5.0.0-next.0 → 5.0.0-next.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ethlete/core
2
2
 
3
+ ## 5.0.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2920](https://github.com/ethlete-io/ethdk/pull/2920) [`377bd7a`](https://github.com/ethlete-io/ethdk/commit/377bd7a00b89aef516d312c909e236fcc1ed5077) Thanks [@github-actions](https://github.com/apps/github-actions)! - Change renderer.removeStyle function signature to support style flags
8
+
9
+ - Updated dependencies [[`d99c3f0`](https://github.com/ethlete-io/ethdk/commit/d99c3f0fc3d6b3b0e7105d21d1f7119cde68b561)]:
10
+ - @ethlete/types@2.0.0-next.0
11
+
3
12
  ## 5.0.0-next.0
4
13
 
5
14
  ### Major Changes
@@ -1674,7 +1674,7 @@ const useCursorDragScroll = (el, options) => {
1674
1674
  if (!el)
1675
1675
  return;
1676
1676
  if (!currCanScroll || !isEnabled) {
1677
- renderer.removeStyle(el, 'cursor', 'scrollSnapType', 'scrollBehavior');
1677
+ renderer.removeStyles(el, 'cursor', 'scrollSnapType', 'scrollBehavior');
1678
1678
  renderer.removeStyle(document.documentElement, 'cursor');
1679
1679
  renderer.removeClass(el, CURSOR_DRAG_SCROLLING_CLASS, CURSOR_DRAG_INIT_CLASS);
1680
1680
  return;
@@ -1697,7 +1697,7 @@ const useCursorDragScroll = (el, options) => {
1697
1697
  renderer.setStyle(el, {
1698
1698
  cursor: 'grab',
1699
1699
  });
1700
- renderer.removeStyle(el, 'scrollSnapType', 'scrollBehavior');
1700
+ renderer.removeStyles(el, 'scrollSnapType', 'scrollBehavior');
1701
1701
  renderer.removeClass(el, CURSOR_DRAG_SCROLLING_CLASS, CURSOR_DRAG_INIT_CLASS);
1702
1702
  renderer.removeStyle(document.documentElement, 'cursor');
1703
1703
  }
@@ -2458,6 +2458,8 @@ const [provideRenderer, injectRenderer] = createRootProvider(() => {
2458
2458
  };
2459
2459
  const setStyle = (element, style, flags) => {
2460
2460
  Object.entries(style).forEach(([key, value]) => {
2461
+ if (!Number.isNaN(Number(key)))
2462
+ return;
2461
2463
  if (value !== null && value !== undefined) {
2462
2464
  renderer.setStyle(element, key, value, flags);
2463
2465
  }
@@ -2466,8 +2468,13 @@ const [provideRenderer, injectRenderer] = createRootProvider(() => {
2466
2468
  }
2467
2469
  });
2468
2470
  };
2469
- const removeStyle = (element, ...styles) => {
2470
- styles.forEach((style) => renderer.removeStyle(element, style));
2471
+ const removeStyle = (element, style, flags) => {
2472
+ if (!Number.isNaN(Number(style)))
2473
+ return;
2474
+ renderer.removeStyle(element, style, flags);
2475
+ };
2476
+ const removeStyles = (element, ...styles) => {
2477
+ styles.forEach((style) => removeStyle(element, style));
2471
2478
  };
2472
2479
  const setCssProperty = (element, name, value) => {
2473
2480
  if (value !== null && value !== undefined) {
@@ -2570,6 +2577,7 @@ const [provideRenderer, injectRenderer] = createRootProvider(() => {
2570
2577
  toggleClass,
2571
2578
  setStyle,
2572
2579
  removeStyle,
2580
+ removeStyles,
2573
2581
  setAttribute,
2574
2582
  removeAttribute,
2575
2583
  setProperty,