aleman 1.16.5 → 2.0.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 CHANGED
@@ -1,3 +1,29 @@
1
+ 2026.04.04, v2.0.1
2
+
3
+ fix:
4
+ - 514ce5b aleman: left: filter
5
+
6
+ feature:
7
+ - 74339b8 aleman: putout v42.4.2
8
+ - 36c6aa4 aleman: madrun v13.0.1
9
+ - bb8206b aleman: eslint-plugin-putout v31.1.2
10
+ - 41dc50e aleman: eslint v10.2.0
11
+ - ac383b2 aleman: superc8 v12.3.1
12
+ - 3b703e8 nemo: up/down: use updateState
13
+
14
+ 2026.01.25, v2.0.0
15
+
16
+ feature:
17
+ - dc0b6f3 aleman: drop support of node < 22
18
+ - 714ae25 aleman: try-to-catch v4.0.3
19
+ - bbbd53e aleman: try-catch v4.0.7
20
+ - 862c712 aleman: supertape v12.0.12
21
+ - bb0c78a aleman: putout v41.12.0
22
+ - 0c27906 aleman: madrun v12.1.0
23
+ - 3572de6 aleman: fullstore v4.0.0
24
+ - bb793a0 aleman: eslint-plugin-putout v30.0.1
25
+ - 6be993f aleman: @putout/test v15.1.0
26
+
1
27
  2025.11.28, v1.16.5
2
28
 
3
29
  feature:
package/aleman/render.js CHANGED
@@ -25,7 +25,7 @@ export const createRender = (html, {options, rules, type}) => {
25
25
  }];
26
26
  }
27
27
 
28
- const places = findPlaces(ast, source, {
28
+ const places = findPlaces(ast, {
29
29
  rules: currentRules,
30
30
  plugins,
31
31
  });
@@ -37,7 +37,7 @@ export const createRender = (html, {options, rules, type}) => {
37
37
  places,
38
38
  ];
39
39
 
40
- transform(ast, source, {
40
+ transform(ast, {
41
41
  rules: currentRules,
42
42
  plugins,
43
43
  });
package/aleman/state.js CHANGED
@@ -1,4 +1,4 @@
1
- import fullstore from 'fullstore';
1
+ import {fullstore} from 'fullstore';
2
2
 
3
3
  const {assign} = Object;
4
4
  const {stringify, parse} = JSON;
@@ -39,7 +39,7 @@ export const createState = (state, {options, listener, stateName = 'aleman-state
39
39
 
40
40
  history[str] = true;
41
41
  stateElement.textContent = str;
42
- window.alemanSync = fn;
42
+ globalThis.alemanSync = fn;
43
43
 
44
44
  document.addEventListener('keydown', ({key}) => {
45
45
  if (key === '`')
package/aleman/vim.js CHANGED
@@ -46,5 +46,6 @@ export const createVimParser = (buffer = []) => ({key}) => {
46
46
  }
47
47
 
48
48
  buffer = [];
49
+
49
50
  return [''];
50
51
  };
@@ -1,4 +1,4 @@
1
- import {createMenu} from '../menu/menu.js';
1
+ import {createMenu} from '../nemo/nemo.js';
2
2
 
3
3
  const menuData = {
4
4
  hello: () => alert('x'),
@@ -0,0 +1 @@
1
+ <script src="index.js" type="module"></script>
@@ -0,0 +1,8 @@
1
+ import {createMenu} from '../nemo/nemo.js';
2
+
3
+ const menuData = {
4
+ hello: () => alert('x'),
5
+ world: () => alert('y'),
6
+ };
7
+
8
+ await createMenu(document.body, {}, menuData);
@@ -1,4 +1,4 @@
1
- import jessy from 'jessy';
1
+ import {jessy} from 'jessy';
2
2
  import {getMenuPath as _getMenuPath} from '../menu/get-menu-path.js';
3
3
 
4
4
  const isFn = (a) => typeof a === 'function';
@@ -1,4 +1,4 @@
1
- import jessy from 'jessy';
1
+ import {jessy} from 'jessy';
2
2
  import {getMenuPath as _getMenuPath} from '../menu/get-menu-path.js';
3
3
 
4
4
  const isFn = (a) => typeof a === 'function';
@@ -4,6 +4,8 @@ export const keys = [
4
4
  ];
5
5
  export const preventDefault = true;
6
6
 
7
+ export const filter = ({state}) => state.command === 'show';
8
+
7
9
  export const listener = () => ({
8
10
  submenuIndex: -1,
9
11
  insideSubmenu: false,
@@ -4,7 +4,7 @@ export const setPosition = (name, event) => {
4
4
  const element = document.querySelector(`[data-name="${name}"]`);
5
5
  const heightMenu = getMenuHeight(element);
6
6
  const widthMenu = getMenuWidth(element);
7
- const {innerHeight, innerWidth} = window;
7
+ const {innerHeight, innerWidth} = globalThis;
8
8
 
9
9
  const {x, y} = calculate(event, {
10
10
  heightMenu,
package/menu/importmap.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export const importmap = {
2
2
  imports: {
3
- 'putout': 'https://esm.sh/@putout/bundle@4.7.6',
3
+ 'putout': 'https://esm.sh/@putout/bundle@5.4.1',
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',
7
7
  },
8
- };
8
+ };
@@ -5,6 +5,7 @@ import {
5
5
  } from 'putout';
6
6
 
7
7
  const {jsxText} = types;
8
+
8
9
  const {
9
10
  setAttributeValue,
10
11
  hasDataName,
@@ -31,8 +31,14 @@ export const fix = ({path, attr, x, y}) => {
31
31
 
32
32
  export const traverse = ({options, push}) => ({
33
33
  JSXElement(path) {
34
- const {name = 'menu', position = {}} = options;
35
- const {x = 0, y = 20} = position;
34
+ const {
35
+ name = 'menu',
36
+ position = {},
37
+ } = options;
38
+ const {
39
+ x = 0,
40
+ y = 20,
41
+ } = position;
36
42
 
37
43
  if (!hasDataName(path, name))
38
44
  return;
@@ -32,7 +32,10 @@ export const traverse = ({options, push}) => ({
32
32
  if (!isJSXElement(path.parentPath))
33
33
  return;
34
34
 
35
- const {insideSubmenu = true, submenuIndex = 1} = options;
35
+ const {
36
+ insideSubmenu = true,
37
+ submenuIndex = 1,
38
+ } = options;
36
39
  const parentMenu = path.parentPath.parentPath.parentPath;
37
40
 
38
41
  if (!isJSXElement(parentMenu))
@@ -1,4 +1,4 @@
1
- import jessy from 'jessy';
1
+ import {jessy} from 'jessy';
2
2
  import {getMenuPath as _getMenuPath} from '../menu/get-menu-path.js';
3
3
 
4
4
  const isFn = (a) => typeof a === 'function';
@@ -1,44 +1,6 @@
1
- import {getSubmenu} from '../submenu/index.js';
1
+ import {updateState} from '../../state/state.js';
2
2
 
3
3
  export const keys = ['ArrowDown'];
4
4
  export const preventDefault = true;
5
5
 
6
- export const filter = ({state}) => state.command === 'show';
7
-
8
- export const listener = ({state, options}) => {
9
- let {
10
- index,
11
- insideSubmenu,
12
- submenuIndex,
13
- } = state;
14
-
15
- const {menu, infiniteScroll} = options;
16
- const n = Object.keys(menu).length - 1;
17
-
18
- if (!insideSubmenu && (infiniteScroll && index === n || index < n))
19
- ++index;
20
-
21
- if (!insideSubmenu && infiniteScroll && index > n)
22
- index -= n + 1;
23
-
24
- const submenu = getSubmenu({
25
- index,
26
- options,
27
- });
28
-
29
- const submenuCount = Object.keys(submenu).length - 1;
30
-
31
- if (insideSubmenu)
32
- if (submenuIndex < submenuCount)
33
- ++submenuIndex;
34
- else if (infiniteScroll && submenuIndex === submenuCount)
35
- submenuIndex = 0;
36
-
37
- const showSubmenu = submenuCount > -1;
38
-
39
- return {
40
- index,
41
- submenuIndex,
42
- showSubmenu,
43
- };
44
- };
6
+ export const listener = ({state, options}) => updateState('down', state, options);
@@ -1,4 +1,4 @@
1
- import jessy from 'jessy';
1
+ import {jessy} from 'jessy';
2
2
  import {getMenuPath as _getMenuPath} from '../menu/get-menu-path.js';
3
3
 
4
4
  const isFn = (a) => typeof a === 'function';
@@ -4,7 +4,7 @@ export const setPosition = (name, event) => {
4
4
  const element = document.querySelector(`[data-name="${name}"]`);
5
5
  const heightMenu = getMenuHeight(element);
6
6
  const widthMenu = getMenuWidth(element);
7
- const {innerHeight, innerWidth} = window;
7
+ const {innerHeight, innerWidth} = globalThis;
8
8
 
9
9
  const {x, y} = calculate(event, {
10
10
  heightMenu,
package/nemo/addons/up.js CHANGED
@@ -1,42 +1,7 @@
1
- import {getSubmenu} from './submenu/index.js';
1
+ import {updateState} from '../state/state.js';
2
2
 
3
3
  export const keys = ['ArrowUp'];
4
4
 
5
5
  export const preventDefault = true;
6
- export const filter = ({state}) => state.command === 'show';
7
6
 
8
- export const listener = ({state, options}) => {
9
- const {menu, infiniteScroll} = options;
10
- let {
11
- index,
12
- insideSubmenu,
13
- submenuIndex,
14
- } = state;
15
-
16
- const count = Object.keys(menu).length;
17
-
18
- if (insideSubmenu && submenuIndex > 0)
19
- --submenuIndex;
20
-
21
- if (infiniteScroll && !index)
22
- index = count - 1;
23
- else if (!insideSubmenu && index > 0)
24
- --index;
25
-
26
- if (index === -1)
27
- index = count - 1;
28
-
29
- const submenu = getSubmenu({
30
- index,
31
- options,
32
- });
33
-
34
- const submenuCount = Object.keys(submenu).length;
35
- const showSubmenu = submenuCount > 0;
36
-
37
- return {
38
- index,
39
- submenuIndex,
40
- showSubmenu,
41
- };
42
- };
7
+ export const listener = ({state, options}) => updateState('up', state, options);
package/nemo/importmap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const importmap = {
2
2
  imports: {
3
- 'putout': 'https://esm.sh/@putout/bundle@4.7.6',
3
+ 'putout': 'https://esm.sh/@putout/bundle@5.2.4',
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',
@@ -80,10 +80,12 @@ function createMenu(menu) {
80
80
  export const fix = ({path, menu}) => {
81
81
  path.node.children = createMenu(menu);
82
82
 
83
- if (menu.show)
83
+ if (menu.show) {
84
84
  removeClassName(path, 'menu-hidden');
85
- else
86
- addClassName(path, 'menu-hidden');
85
+ return;
86
+ }
87
+
88
+ addClassName(path, 'menu-hidden');
87
89
  };
88
90
 
89
91
  export const traverse = ({options, push}) => ({
@@ -31,8 +31,14 @@ export const fix = ({path, attr, x, y}) => {
31
31
 
32
32
  export const traverse = ({options, push}) => ({
33
33
  JSXElement(path) {
34
- const {name = 'menu', position = {}} = options;
35
- const {x = 0, y = 20} = position;
34
+ const {
35
+ name = 'menu',
36
+ position = {},
37
+ } = options;
38
+ const {
39
+ x = 0,
40
+ y = 20,
41
+ } = position;
36
42
 
37
43
  if (!hasDataName(path, name))
38
44
  return;
@@ -32,7 +32,10 @@ export const traverse = ({options, push}) => ({
32
32
  if (!isJSXElement(path.parentPath))
33
33
  return;
34
34
 
35
- const {insideSubmenu = true, submenuIndex = 1} = options;
35
+ const {
36
+ insideSubmenu = true,
37
+ submenuIndex = 1,
38
+ } = options;
36
39
  const parentMenu = path.parentPath.parentPath.parentPath;
37
40
 
38
41
  if (!isJSXElement(parentMenu))
@@ -3,6 +3,7 @@ const {assign} = Object;
3
3
  export const parseState = (source) => {
4
4
  const lines = source.split('\n');
5
5
  const items = [];
6
+
6
7
  const state = {
7
8
  index: -1,
8
9
  submenuIndex: -1,
@@ -43,7 +43,10 @@ function createMenuItems(menu, path = '') {
43
43
  }
44
44
 
45
45
  export const updateState = (command, state, options = {}) => {
46
- const {count = 1, infiniteScroll = state.infiniteScroll} = options;
46
+ const {
47
+ count = 1,
48
+ infiniteScroll = state.infiniteScroll,
49
+ } = options;
47
50
 
48
51
  for (let i = 0; i < count; i++) {
49
52
  if (command === 'down') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.16.5",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",
@@ -29,12 +29,12 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@putout/processor-html": "^14.0.2",
32
- "fullstore": "^3.0.0",
32
+ "fullstore": "^4.0.0",
33
33
  "html-escaper": "^3.0.3",
34
- "jessy": "^4.1.0",
34
+ "jessy": "^5.0.0",
35
35
  "once": "^1.4.0",
36
- "putout": "^40.5.1",
37
- "try-to-catch": "^3.0.1"
36
+ "putout": "^42.4.2",
37
+ "try-to-catch": "^4.0.3"
38
38
  },
39
39
  "keywords": [
40
40
  "putout",
@@ -44,21 +44,20 @@
44
44
  "debugger"
45
45
  ],
46
46
  "devDependencies": {
47
- "@putout/test": "^14.0.0",
48
- "c8": "^10.0.0",
49
- "eslint": "^9.0.0",
50
- "eslint-plugin-n": "^17.0.0",
51
- "eslint-plugin-putout": "^28.0.0",
47
+ "@putout/test": "^15.1.0",
48
+ "eslint": "^10.2.0",
49
+ "eslint-plugin-putout": "^31.1.2",
52
50
  "just-kebab-case": "^4.2.0",
53
- "madrun": "^11.0.0",
51
+ "madrun": "^13.0.1",
54
52
  "montag": "^1.2.1",
55
53
  "nodemon": "^3.0.1",
56
- "supertape": "^11.3.0",
57
- "try-catch": "^3.0.1"
54
+ "superc8": "^12.3.1",
55
+ "supertape": "^12.0.12",
56
+ "try-catch": "^4.0.7"
58
57
  },
59
58
  "license": "MIT",
60
59
  "engines": {
61
- "node": ">=20"
60
+ "node": ">=22"
62
61
  },
63
62
  "publishConfig": {
64
63
  "access": "public"
File without changes