aleman 1.4.8 → 1.4.9

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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.09.09, v1.4.9
2
+
3
+ feature:
4
+ - fc96832 menu: simplify
5
+
1
6
  2025.09.09, v1.4.8
2
7
 
3
8
  feature:
@@ -1,4 +1,4 @@
1
- import {template, operator} from 'putout';
1
+ import {template} from 'putout';
2
2
  import {
3
3
  addClassName,
4
4
  hasDataName,
@@ -99,4 +99,3 @@ function getIconName(name) {
99
99
  .replace(/\s/g, '-')
100
100
  .toLowerCase();
101
101
  }
102
-
@@ -50,4 +50,3 @@ export function hasDataName(path, value = '') {
50
50
  const attribute = getAttributeValue(path, 'data-name');
51
51
  return attribute === value;
52
52
  }
53
-
@@ -76,4 +76,3 @@ function parsePosition(str) {
76
76
  Number(y),
77
77
  ];
78
78
  }
79
-
@@ -1,15 +1,12 @@
1
1
  import {operator, types} from 'putout';
2
2
  import {
3
3
  addClassName,
4
+ containsClassName,
4
5
  hasDataName,
5
- removeAttributeValue,
6
6
  removeClassName,
7
7
  } from '../jsx-operator.js';
8
8
 
9
- const {
10
- getAttributeValue,
11
- hasTagName,
12
- } = operator;
9
+ const {hasTagName} = operator;
13
10
 
14
11
  const {isJSXElement} = types;
15
12
 
@@ -68,14 +65,12 @@ export const traverse = ({options, push}) => ({
68
65
  });
69
66
 
70
67
  function isParentSelected(path) {
71
- const classAttributeValue = getAttributeValue(path, 'className');
72
- return classAttributeValue.includes('menu-item-selected');
68
+ return containsClassName(path, 'menu-item-selected');
73
69
  }
74
70
 
75
71
  function unselect(path) {
76
72
  if (!path)
77
73
  return;
78
74
 
79
- removeAttributeValue(path, 'className', 'menu-item-selected');
75
+ removeClassName(path, 'menu-item-selected');
80
76
  }
81
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",