aleman 1.1.42 → 1.1.43

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.01, v1.1.43
2
+
3
+ feature:
4
+ - 6f1ae4b aleman: jessy
5
+
1
6
  2025.08.30, v1.1.42
2
7
 
3
8
  feature:
@@ -1,3 +1,5 @@
1
+ import jessy from 'jessy';
2
+
1
3
  export const createItemClick = (name) => ({
2
4
  name,
3
5
  events: ['click'],
@@ -6,9 +8,9 @@ export const createItemClick = (name) => ({
6
8
 
7
9
  const listener = ({event, options}) => {
8
10
  const menuItemElement = document.elementFromPoint(event.clientX, event.clientY);
9
- const name = menuItemElement.textContent.trim();
11
+ const {menuPath} = menuItemElement.dataset;
10
12
  const {menu} = options;
11
- const fn = menu[name];
13
+ const fn = jessy(menuPath, menu);
12
14
 
13
15
  setTimeout(fn);
14
16
  options.beforeHide?.();
@@ -18,3 +20,4 @@ const listener = ({event, options}) => {
18
20
  command: 'hide',
19
21
  };
20
22
  };
23
+
package/menu/importmap.js CHANGED
@@ -1,7 +1,8 @@
1
1
  export const importmap = {
2
2
  imports: {
3
- 'putout': 'https://esm.sh/@putout/bundle',
3
+ 'putout': 'https://esm.sh/@putout/bundle@4.5.3',
4
4
  '@putout/processor-html': 'https://esm.sh/@putout/processor-html',
5
5
  'fullstore': 'https://esm.sh/fullstore',
6
+ 'jessy': 'https://esm.sh/jessy',
6
7
  },
7
8
  };
@@ -10,7 +10,7 @@ const isObject = (a) => a && typeof a === 'object';
10
10
  export const report = () => `Build menu`;
11
11
 
12
12
  const createMenuItem = template(`
13
- <li data-name="menu-item" className="menu-item"><label data-menu-path="">NAME</label></li>
13
+ <li data-name="menu-item" className="menu-item" data-menu-path=""><label data-menu-path="">NAME</label></li>
14
14
  `);
15
15
 
16
16
  const createMenu = template(`
@@ -34,6 +34,7 @@ export const fix = ({path, menu, icon, name = ''}) => {
34
34
  setIcon(key, menuItem);
35
35
 
36
36
  setDataMenuPath(key, name, menuItem);
37
+ setDataMenuPath(key, name, menuItem.children[0]);
37
38
 
38
39
  children.push(menuItem);
39
40
 
@@ -90,7 +91,7 @@ function setSubmenu(menuItem) {
90
91
  }
91
92
 
92
93
  function setDataMenuPath(key, name, menuItem) {
93
- const {attributes} = menuItem.children[0].openingElement;
94
+ const {attributes} = menuItem.openingElement;
94
95
  const dataMenuPath = name ? `${name}.${key}` : key;
95
96
 
96
97
  for (const attr of attributes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.1.42",
3
+ "version": "1.1.43",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",
@@ -27,6 +27,7 @@
27
27
  "@putout/processor-html": "^14.0.2",
28
28
  "fullstore": "^3.0.0",
29
29
  "html-escaper": "^3.0.3",
30
+ "jessy": "^4.1.0",
30
31
  "once": "^1.4.0",
31
32
  "putout": "^40.5.1"
32
33
  },