aleman 1.4.11 → 1.5.0

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.10, v1.5.0
2
+
3
+ feature:
4
+ - dd17f0a aleman: menu: get rid of jsx-operator
5
+
1
6
  2025.09.10, v1.4.11
2
7
 
3
8
  feature:
package/menu/importmap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const importmap = {
2
2
  imports: {
3
- 'putout': 'https://esm.sh/@putout/bundle@4.6.9',
3
+ 'putout': 'https://esm.sh/@putout/bundle@4.6.10',
4
4
  '@putout/processor-html': 'https://esm.sh/@putout/processor-html',
5
5
  'fullstore': 'https://esm.sh/fullstore',
6
6
  'jessy': 'https://esm.sh/jessy',
@@ -1,7 +1,10 @@
1
1
  import {template, operator} from 'putout';
2
- import {addClassName, hasDataName} from '../jsx-operator.js';
3
2
 
4
- const {setAttributeValue} = operator;
3
+ const {
4
+ setAttributeValue,
5
+ hasDataName,
6
+ addClassName,
7
+ } = operator;
5
8
  const {entries} = Object;
6
9
 
7
10
  const noop = () => {};
@@ -1,11 +1,12 @@
1
1
  import {operator} from 'putout';
2
- import {
3
- containsClassName,
2
+
3
+ const {
4
+ hasTagName,
4
5
  removeClassName,
5
6
  hasDataName,
6
- } from '../jsx-operator.js';
7
+ containsClassName,
8
+ } = operator;
7
9
 
8
- const {hasTagName} = operator;
9
10
  const CLASS = 'menu-submenu-show';
10
11
 
11
12
  export const report = () => `Hide submenu`;
@@ -32,3 +33,4 @@ export const traverse = ({push, options}) => ({
32
33
  push(path);
33
34
  },
34
35
  });
36
+
@@ -1,9 +1,11 @@
1
- import {
2
- addClassName,
1
+ import {operator} from 'putout';
2
+
3
+ const {
3
4
  containsClassName,
4
5
  hasDataName,
6
+ addClassName,
5
7
  removeClassName,
6
- } from '../jsx-operator.js';
8
+ } = operator;
7
9
 
8
10
  export const report = ({command}) => {
9
11
  const [first, ...rest] = command;
@@ -36,3 +38,4 @@ export const traverse = ({push, options}) => ({
36
38
  });
37
39
  },
38
40
  });
41
+
@@ -1,12 +1,13 @@
1
1
  import {operator, types} from 'putout';
2
- import {
2
+
3
+ const {isJSXElement} = types;
4
+ const {
5
+ hasTagName,
3
6
  addClassName,
4
7
  hasDataName,
5
8
  removeClassName,
6
- } from '../jsx-operator.js';
9
+ } = operator;
7
10
 
8
- const {hasTagName} = operator;
9
- const {isJSXElement} = types;
10
11
  const SELECTED = 'menu-item-selected';
11
12
  const SHOW = 'menu-submenu-show';
12
13
 
@@ -72,3 +73,4 @@ function addShowSubmenu(path, {showSubmenu}) {
72
73
  function removeShowSubmenu(path) {
73
74
  removeClassName(path, SHOW);
74
75
  }
76
+
@@ -1,10 +1,10 @@
1
1
  import {types, operator} from 'putout';
2
- import {hasDataName} from '../jsx-operator.js';
3
2
 
4
3
  const {
5
4
  setAttributeValue,
6
5
  getAttributeValue,
7
6
  getAttributePath,
7
+ hasDataName,
8
8
  } = operator;
9
9
 
10
10
  const {
@@ -1,12 +1,12 @@
1
1
  import {operator, types} from 'putout';
2
- import {
2
+
3
+ const {
4
+ hasTagName,
5
+ removeClassName,
3
6
  addClassName,
4
- containsClassName,
5
7
  hasDataName,
6
- removeClassName,
7
- } from '../jsx-operator.js';
8
-
9
- const {hasTagName} = operator;
8
+ containsClassName,
9
+ } = operator;
10
10
 
11
11
  const {isJSXElement} = types;
12
12
 
@@ -74,3 +74,4 @@ function unselect(path) {
74
74
 
75
75
  removeClassName(path, 'menu-item-selected');
76
76
  }
77
+
@@ -1,11 +1,12 @@
1
1
  import {operator, types} from 'putout';
2
- import {
3
- containsClassName,
4
- hasDataName,
2
+
3
+ const {
4
+ hasTagName,
5
5
  removeClassName,
6
- } from '../jsx-operator.js';
6
+ hasDataName,
7
+ containsClassName,
8
+ } = operator;
7
9
 
8
- const {hasTagName} = operator;
9
10
  const {isJSXElement} = types;
10
11
  const SELECTED = 'menu-item-selected';
11
12
 
@@ -43,3 +44,4 @@ export const traverse = ({push, options}) => ({
43
44
  }
44
45
  },
45
46
  });
47
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.4.11",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",
@@ -1,29 +0,0 @@
1
- import {operator} from 'putout';
2
-
3
- const {
4
- addAttributeValue,
5
- getAttributeValue,
6
- removeAttributeValue,
7
- } = operator;
8
-
9
- export function addClassName(path, name) {
10
- addAttributeValue(path, 'className', name);
11
- }
12
-
13
- export function getClassName(path) {
14
- return getAttributeValue(path, 'className');
15
- }
16
-
17
- export function removeClassName(path, name) {
18
- removeAttributeValue(path, 'className', name);
19
- }
20
-
21
- export function containsClassName(path, className) {
22
- const classNameValue = getClassName(path);
23
- return classNameValue.includes(className);
24
- }
25
-
26
- export function hasDataName(path, value = '') {
27
- const attribute = getAttributeValue(path, 'data-name');
28
- return attribute === value;
29
- }