aleman 2.0.2 → 2.0.3
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 +12 -0
- package/example/menu/index.js +1 -1
- package/lunes/rules/README.md +3 -0
- package/lunes/rules/build-menu/fixture/build-menu-fix.js +22 -0
- package/lunes/rules/build-menu/fixture/build-menu.js +9 -0
- package/lunes/rules/build-menu/index.js +138 -0
- package/lunes/state/README.md +4 -0
- package/lunes/state/add-cursor/fixture/add-cursor.js +9 -0
- package/lunes/state/add-cursor/fixture/down-fix.js +9 -0
- package/lunes/state/add-cursor/fixture/down.js +9 -0
- package/lunes/state/add-cursor/fixture/up-fix.js +9 -0
- package/lunes/state/add-cursor/fixture/up.js +9 -0
- package/lunes/state/add-cursor/index.js +38 -0
- package/lunes/state/convert-menu-to-state/convert-menu-to-state.js +17 -0
- package/lunes/state/cursor.js +77 -0
- package/lunes/state/move-cursor/fixture/move-cursor-fix.js +9 -0
- package/lunes/state/move-cursor/fixture/move-cursor.js +9 -0
- package/lunes/state/move-cursor/index.js +49 -0
- package/lunes/state/state.js +27 -0
- package/menu/importmap.js +1 -1
- package/nemo/addons/escape/escape.js +3 -9
- package/nemo/importmap.js +1 -1
- package/nemo/rules/index.js +0 -16
- package/package.json +1 -1
- package/nemo/addons/up.json +0 -5
- package/nemo/rules/hide-submenu/fixture/hide-submenu-fix.js +0 -17
- package/nemo/rules/hide-submenu/fixture/hide-submenu.js +0 -18
- package/nemo/rules/hide-submenu/fixture/no-menu.js +0 -16
- package/nemo/rules/hide-submenu/fixture/show-submenu.js +0 -18
- package/nemo/rules/hide-submenu/index.js +0 -35
- package/nemo/rules/menu/fixture/hide-menu-fix.js +0 -3
- package/nemo/rules/menu/fixture/hide-menu.js +0 -3
- package/nemo/rules/menu/fixture/no-menu.js +0 -3
- package/nemo/rules/menu/fixture/show-menu-fix.js +0 -1
- package/nemo/rules/menu/fixture/show-menu.js +0 -1
- package/nemo/rules/menu/index.js +0 -40
- package/nemo/rules/select/fixture/no-current.js +0 -8
- package/nemo/rules/select/fixture/no-data-name.js +0 -4
- package/nemo/rules/select/fixture/no-index.js +0 -8
- package/nemo/rules/select/fixture/no-next.js +0 -5
- package/nemo/rules/select/fixture/no-parent.js +0 -2
- package/nemo/rules/select/fixture/select-fix.js +0 -8
- package/nemo/rules/select/fixture/select.js +0 -8
- package/nemo/rules/select/fixture/submenu-fix.js +0 -17
- package/nemo/rules/select/fixture/submenu.js +0 -18
- package/nemo/rules/select/fixture/wrong-data-name.js +0 -4
- package/nemo/rules/select/index.js +0 -94
- package/nemo/rules/set-position/fixture/no-style-fix.js +0 -2
- package/nemo/rules/set-position/fixture/no-style.js +0 -2
- package/nemo/rules/set-position/fixture/not-menu.js +0 -2
- package/nemo/rules/set-position/fixture/same-position.js +0 -2
- package/nemo/rules/set-position/fixture/set-position-fix.js +0 -2
- package/nemo/rules/set-position/fixture/set-position.js +0 -2
- package/nemo/rules/set-position/index.js +0 -83
- package/nemo/rules/submenu/fixture/last-selected-fix.js +0 -53
- package/nemo/rules/submenu/fixture/last-selected.js +0 -54
- package/nemo/rules/submenu/fixture/li.js +0 -3
- package/nemo/rules/submenu/fixture/no-submenu-selected.js +0 -17
- package/nemo/rules/submenu/fixture/no-submenu.js +0 -54
- package/nemo/rules/submenu/fixture/not-menu.js +0 -17
- package/nemo/rules/submenu/fixture/submenu-fix.js +0 -53
- package/nemo/rules/submenu/fixture/submenu.js +0 -54
- package/nemo/rules/submenu/index.js +0 -80
- package/nemo/rules/unselect-all/fixture/hide.js +0 -8
- package/nemo/rules/unselect-all/fixture/nested-fix.js +0 -17
- package/nemo/rules/unselect-all/fixture/nested.js +0 -18
- package/nemo/rules/unselect-all/fixture/no-data-name.js +0 -4
- package/nemo/rules/unselect-all/fixture/no-parent.js +0 -2
- package/nemo/rules/unselect-all/fixture/unselect-all-fix.js +0 -8
- package/nemo/rules/unselect-all/fixture/unselect-all.js +0 -8
- package/nemo/rules/unselect-all/index.js +0 -51
- package/nemo/rules/unselect-all-submenu-items/fixture/show-submenu-fix.js +0 -33
- package/nemo/rules/unselect-all-submenu-items/fixture/show-submenu.js +0 -34
- package/nemo/rules/unselect-all-submenu-items/fixture/unselect-all-submenu-items-fix.js +0 -33
- package/nemo/rules/unselect-all-submenu-items/fixture/unselect-all-submenu-items.js +0 -33
- package/nemo/rules/unselect-all-submenu-items/index.js +0 -30
- package/nemo/rules/unselect-wrongly-selected/fixture/hide.js +0 -17
- package/nemo/rules/unselect-wrongly-selected/fixture/unselect-wrongly-selected-fix.js +0 -17
- package/nemo/rules/unselect-wrongly-selected/fixture/unselect-wrongly-selected.js +0 -17
- package/nemo/rules/unselect-wrongly-selected/index.js +0 -39
package/ChangeLog
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
2026.05.24, v2.0.3
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 5afafd1 importmap: @putout/bundle@5.5.0
|
|
5
|
+
- 1c86e51 lunes: move-cursor: options: cursor
|
|
6
|
+
- d862a0e lunes: build-menu: position
|
|
7
|
+
- 54353ab lunes: build-menu: add
|
|
8
|
+
- f2f2e3a aleman: lunes: put cursor to AST
|
|
9
|
+
- 0274408 lunes: rules -> state
|
|
10
|
+
- d2a55a8 aleman: lunes: add
|
|
11
|
+
- ac3c8a1 nemo: rules: simplify
|
|
12
|
+
|
|
1
13
|
2026.05.20, v2.0.2
|
|
2
14
|
|
|
3
15
|
feature:
|
package/example/menu/index.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<ul className="menu" style="left: 100px; top: 20px">
|
|
2
|
+
<li data-name="menu-item" className="menu-item">
|
|
3
|
+
<label>view</label>
|
|
4
|
+
</li>
|
|
5
|
+
<li data-name="menu-item" className="menu-item">
|
|
6
|
+
<label>edit</label>
|
|
7
|
+
</li>
|
|
8
|
+
<li data-name="menu-item" className="menu-item">
|
|
9
|
+
<label>rename</label>
|
|
10
|
+
</li>
|
|
11
|
+
<li data-name="menu-item" className="menu-item menu-item-selected">
|
|
12
|
+
<label>new</label>
|
|
13
|
+
<ul className="menu">
|
|
14
|
+
<li data-name="menu-item" className="menu-item">
|
|
15
|
+
<label>file</label>
|
|
16
|
+
</li>
|
|
17
|
+
<li data-name="menu-item" className="menu-item">
|
|
18
|
+
<label>directory</label>
|
|
19
|
+
</li>
|
|
20
|
+
</ul>
|
|
21
|
+
</li>
|
|
22
|
+
</ul>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import {
|
|
2
|
+
template,
|
|
3
|
+
types,
|
|
4
|
+
operator,
|
|
5
|
+
} from 'putout';
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
isExpressionStatement,
|
|
9
|
+
isObjectProperty,
|
|
10
|
+
jsxText,
|
|
11
|
+
isArrayExpression,
|
|
12
|
+
} = types;
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
replaceWith,
|
|
16
|
+
removeClassName,
|
|
17
|
+
setAttributeValue,
|
|
18
|
+
} = operator;
|
|
19
|
+
|
|
20
|
+
export const report = () => `Build menu`;
|
|
21
|
+
export const include = () => [
|
|
22
|
+
'ObjectProperty',
|
|
23
|
+
'ArrayExpression',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const createMenuItem = (path) => {
|
|
27
|
+
const {name} = path.node.key;
|
|
28
|
+
const valuePath = path.get('value');
|
|
29
|
+
|
|
30
|
+
if (isArrayExpression(valuePath)) {
|
|
31
|
+
const objectPath = valuePath.get('elements').at(-1);
|
|
32
|
+
const children = [];
|
|
33
|
+
|
|
34
|
+
for (const prop of objectPath.get('properties').map(createMenuItem)) {
|
|
35
|
+
children.push(prop);
|
|
36
|
+
children.push(jsxText('\n'));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const submenu = createSubmenu(valuePath);
|
|
40
|
+
|
|
41
|
+
submenu.children[3].children = [
|
|
42
|
+
jsxText('\n'),
|
|
43
|
+
...children,
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
return submenu;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const selected = path.node.value.value === 'cursor';
|
|
50
|
+
const classSelected = selected ? ' menu-item-selected' : '';
|
|
51
|
+
|
|
52
|
+
const node = template.ast.fresh(`
|
|
53
|
+
<li data-name="menu-item" className="menu-item${classSelected}">
|
|
54
|
+
<label>${name}</label>
|
|
55
|
+
</li>
|
|
56
|
+
`);
|
|
57
|
+
|
|
58
|
+
return node;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const createUL = (path) => {
|
|
62
|
+
const show = path.node.elements[0].value === 'open';
|
|
63
|
+
const node = template.ast.fresh(`
|
|
64
|
+
<ul className="menu menu-hidden"></ul>
|
|
65
|
+
`);
|
|
66
|
+
|
|
67
|
+
if (show)
|
|
68
|
+
removeClassName(node, 'menu-hidden');
|
|
69
|
+
|
|
70
|
+
return node;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const createSubmenu = (path) => {
|
|
74
|
+
const {name} = path.parentPath.node.key;
|
|
75
|
+
|
|
76
|
+
const selected = path.node.elements[1].value === 'cursor';
|
|
77
|
+
const show = path.node.elements[0].value === 'open';
|
|
78
|
+
|
|
79
|
+
const menuHidden = show ? '' : ' menu-hidden';
|
|
80
|
+
const classSelected = selected ? ' menu-item-selected' : '';
|
|
81
|
+
|
|
82
|
+
const node = template.ast.fresh(`
|
|
83
|
+
<li data-name="menu-item" className="menu-item${classSelected}">
|
|
84
|
+
<label>${name}</label>
|
|
85
|
+
<ul className="menu${menuHidden}"></ul>
|
|
86
|
+
</li>
|
|
87
|
+
`);
|
|
88
|
+
|
|
89
|
+
return node;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const parsePosition = (path) => {
|
|
93
|
+
const [left, top] = path
|
|
94
|
+
.node
|
|
95
|
+
.elements
|
|
96
|
+
.at(-2)
|
|
97
|
+
.value
|
|
98
|
+
.split(':');
|
|
99
|
+
|
|
100
|
+
return {
|
|
101
|
+
left,
|
|
102
|
+
top,
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const fix = (path) => {
|
|
107
|
+
if (isObjectProperty(path)) {
|
|
108
|
+
replaceWith(path, createMenuItem(path));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (isArrayExpression(path)) {
|
|
113
|
+
const ul = createUL(path);
|
|
114
|
+
|
|
115
|
+
if (isExpressionStatement(path.parentPath)) {
|
|
116
|
+
replaceWith(path, ul);
|
|
117
|
+
|
|
118
|
+
const {left, top} = parsePosition(path);
|
|
119
|
+
|
|
120
|
+
setAttributeValue(ul, 'style', `left: ${left}px; top: ${top}px`);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const {properties} = path.node.elements.at(-1);
|
|
124
|
+
const children = [];
|
|
125
|
+
|
|
126
|
+
for (const prop of properties) {
|
|
127
|
+
children.push(prop);
|
|
128
|
+
children.push(jsxText('\n'));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
ul.children = [
|
|
132
|
+
jsxText('\n'),
|
|
133
|
+
...children,
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {
|
|
3
|
+
first,
|
|
4
|
+
last,
|
|
5
|
+
setCursor,
|
|
6
|
+
} from '../cursor.js';
|
|
7
|
+
|
|
8
|
+
const {setLiteralValue} = operator;
|
|
9
|
+
|
|
10
|
+
const operations = {
|
|
11
|
+
last,
|
|
12
|
+
first,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const report = () => `Add cursor`;
|
|
16
|
+
|
|
17
|
+
export const include = () => [
|
|
18
|
+
'"no-cursor"',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export const filter = (path, {options}) => {
|
|
22
|
+
const {operation} = options;
|
|
23
|
+
return operations[operation];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const fix = (path, {options}) => {
|
|
27
|
+
const {operation} = options;
|
|
28
|
+
|
|
29
|
+
const getCursor = operations[operation];
|
|
30
|
+
const cursorPath = getCursor(path);
|
|
31
|
+
|
|
32
|
+
setCursor(cursorPath);
|
|
33
|
+
|
|
34
|
+
const keyPath = cursorPath.get('key');
|
|
35
|
+
const {name} = keyPath.node;
|
|
36
|
+
|
|
37
|
+
setLiteralValue(path.node, name);
|
|
38
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const {entries} = Object;
|
|
2
|
+
const isObject = (a) => a && typeof a === 'object';
|
|
3
|
+
|
|
4
|
+
export function convertMenuToState(menu) {
|
|
5
|
+
const result = [];
|
|
6
|
+
|
|
7
|
+
for (const [key, value] of entries(menu)) {
|
|
8
|
+
if (!isObject(value)) {
|
|
9
|
+
result.push(key);
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
result.push(`${key}: ${convertMenuToState(value)}`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return `['close',{${result.join(',')}}]`;
|
|
17
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {types, operator} from 'putout';
|
|
2
|
+
|
|
3
|
+
const {remove} = operator;
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
stringLiteral,
|
|
7
|
+
isArrayExpression,
|
|
8
|
+
isIdentifier,
|
|
9
|
+
identifier,
|
|
10
|
+
isObjectProperty,
|
|
11
|
+
isObjectExpression,
|
|
12
|
+
} = types;
|
|
13
|
+
|
|
14
|
+
export function last(path) {
|
|
15
|
+
return path
|
|
16
|
+
.getNextSibling()
|
|
17
|
+
.get('properties')
|
|
18
|
+
.at(-1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function first(path) {
|
|
22
|
+
return path
|
|
23
|
+
.getNextSibling()
|
|
24
|
+
.get('properties')
|
|
25
|
+
.at(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function setCursor(path) {
|
|
29
|
+
const valuePath = path.get('value');
|
|
30
|
+
|
|
31
|
+
if (isIdentifier(valuePath)) {
|
|
32
|
+
path.node.value = stringLiteral('cursor');
|
|
33
|
+
path.node.shorthand = false;
|
|
34
|
+
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (isArrayExpression(valuePath))
|
|
39
|
+
valuePath.node.elements.unshift(stringLiteral('cursor'));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function prev(path) {
|
|
43
|
+
const nextCursor = path.getNextSibling();
|
|
44
|
+
|
|
45
|
+
if (nextCursor.node)
|
|
46
|
+
return nextCursor;
|
|
47
|
+
|
|
48
|
+
return path.parentPath.get('properties.0');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function next(path) {
|
|
52
|
+
const prevCursor = path.getPrevSibling();
|
|
53
|
+
|
|
54
|
+
if (prevCursor.node)
|
|
55
|
+
return prevCursor;
|
|
56
|
+
|
|
57
|
+
const {parentPath} = path;
|
|
58
|
+
|
|
59
|
+
if (isObjectExpression(parentPath))
|
|
60
|
+
return parentPath.get('properties').at(-1);
|
|
61
|
+
|
|
62
|
+
return parentPath.parentPath
|
|
63
|
+
.get('properties')
|
|
64
|
+
.at(-1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function clearCursor({parentPath}) {
|
|
68
|
+
if (isObjectProperty(parentPath)) {
|
|
69
|
+
parentPath.node.value = identifier(parentPath.node.key.name);
|
|
70
|
+
parentPath.node.shorthand = true;
|
|
71
|
+
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (isArrayExpression(parentPath))
|
|
76
|
+
remove(parentPath.get('elements.0'));
|
|
77
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {types} from 'putout';
|
|
2
|
+
import {
|
|
3
|
+
next,
|
|
4
|
+
prev,
|
|
5
|
+
setCursor,
|
|
6
|
+
clearCursor,
|
|
7
|
+
} from '../cursor.js';
|
|
8
|
+
|
|
9
|
+
const operations = {
|
|
10
|
+
prev,
|
|
11
|
+
next,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const {isArrayExpression} = types;
|
|
15
|
+
|
|
16
|
+
export const report = () => `Move cursor`;
|
|
17
|
+
|
|
18
|
+
export const include = () => [
|
|
19
|
+
'"cursor"',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export const filter = (path, {options}) => {
|
|
23
|
+
const {operation = 'next', cursor} = options;
|
|
24
|
+
const {parentPath} = path;
|
|
25
|
+
|
|
26
|
+
if (!operations[operation])
|
|
27
|
+
return false;
|
|
28
|
+
|
|
29
|
+
if (isArrayExpression(parentPath))
|
|
30
|
+
return parentPath.parentPath.node.key.name === cursor;
|
|
31
|
+
|
|
32
|
+
return parentPath.node.key.name === cursor;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const fix = (path, options) => {
|
|
36
|
+
const {
|
|
37
|
+
operation = 'next',
|
|
38
|
+
count = 1,
|
|
39
|
+
} = options;
|
|
40
|
+
|
|
41
|
+
const getCursor = operations[operation];
|
|
42
|
+
let cursorPath = path.parentPath;
|
|
43
|
+
|
|
44
|
+
for (let i = 0; i < count; i++)
|
|
45
|
+
cursorPath = getCursor(cursorPath);
|
|
46
|
+
|
|
47
|
+
clearCursor(path);
|
|
48
|
+
setCursor(cursorPath);
|
|
49
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {putout} from 'putout';
|
|
2
|
+
import {convertMenuToState} from './convert-menu-to-state/convert-menu-to-state.js';
|
|
3
|
+
import * as addCursor from './add-cursor/index.js';
|
|
4
|
+
import * as moveCursor from './move-cursor/index.js';
|
|
5
|
+
|
|
6
|
+
export const createState = (menu) => {
|
|
7
|
+
const state = convertMenuToState(menu);
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
updateState: createUpdateState(state),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function createUpdateState(state, options) {
|
|
15
|
+
const {code} = putout(state, {
|
|
16
|
+
rules: {
|
|
17
|
+
'add-cursor': ['on', options],
|
|
18
|
+
'move-cursor': ['on', options],
|
|
19
|
+
},
|
|
20
|
+
plugins: [
|
|
21
|
+
['add-cursor', addCursor],
|
|
22
|
+
['move-cursor', moveCursor],
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return code;
|
|
27
|
+
}
|
package/menu/importmap.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const importmap = {
|
|
2
2
|
imports: {
|
|
3
|
-
'putout': 'https://esm.sh/@putout/bundle@5.
|
|
3
|
+
'putout': 'https://esm.sh/@putout/bundle@5.5.0',
|
|
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,11 +1,5 @@
|
|
|
1
|
+
import {updateState} from '../../state/state.js';
|
|
2
|
+
|
|
1
3
|
export const keys = ['Escape'];
|
|
2
4
|
|
|
3
|
-
export const listener = ({state, options}) =>
|
|
4
|
-
options.beforeHide?.(state);
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
command: 'hide',
|
|
8
|
-
showSubmenu: false,
|
|
9
|
-
index: -1,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
5
|
+
export const listener = ({state, options}) => updateState('esc', 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@5.
|
|
3
|
+
'putout': 'https://esm.sh/@putout/bundle@5.5.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',
|
package/nemo/rules/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import * as unselectAllSubmenuItems from './unselect-all-submenu-items/index.js';
|
|
2
|
-
import * as unselectWronglySelected from './unselect-wrongly-selected/index.js';
|
|
3
|
-
import * as hideSubmenu from './hide-submenu/index.js';
|
|
4
|
-
import * as submenu from './submenu/index.js';
|
|
5
|
-
import * as setPosition from './set-position/index.js';
|
|
6
1
|
import * as buildMenu from './build-menu/index.js';
|
|
7
|
-
import * as menu from './menu/index.js';
|
|
8
|
-
import * as select from './select/index.js';
|
|
9
|
-
import * as unselectAll from './unselect-all/index.js';
|
|
10
2
|
|
|
11
3
|
export const rules = {
|
|
12
|
-
'menu': menu,
|
|
13
4
|
'build-menu': buildMenu,
|
|
14
|
-
'set-position': setPosition,
|
|
15
|
-
'select': select,
|
|
16
|
-
'unselect-all': unselectAll,
|
|
17
|
-
'submenu': submenu,
|
|
18
|
-
'hide-submenu': hideSubmenu,
|
|
19
|
-
'unselect-wrongly-selected': unselectWronglySelected,
|
|
20
|
-
'unselect-all-submenu-items': unselectAllSubmenuItems,
|
|
21
5
|
};
|
package/package.json
CHANGED
package/nemo/addons/up.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// second selected
|
|
2
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
3
|
-
<li data-menu-path="Upload" data-name="menu-item" className="menu-item icon icon-view">
|
|
4
|
-
<label data-menu-path="Upload">Upload</label>
|
|
5
|
-
</li>
|
|
6
|
-
<li data-menu-path="New" data-name="menu-item" className="menu-item icon icon-edit menu-item-selected">
|
|
7
|
-
<label data-menu-path="New">New</label>
|
|
8
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
9
|
-
<li data-menu-path="New.File" data-name="menu-item" className="menu-item icon icon-view">
|
|
10
|
-
<label data-menu-path="New.File">File</label>
|
|
11
|
-
</li>
|
|
12
|
-
<li data-menu-path="New.Directory" data-name="menu-item" className="menu-item icon icon-edit">
|
|
13
|
-
<label data-menu-path="New.Directory">Directory</label>
|
|
14
|
-
</li>
|
|
15
|
-
</ul>
|
|
16
|
-
</li>
|
|
17
|
-
</ul>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// second selected
|
|
2
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
3
|
-
<li data-menu-path="Upload" data-name="menu-item" className="menu-item icon icon-view">
|
|
4
|
-
<label data-menu-path="Upload">Upload</label>
|
|
5
|
-
</li>
|
|
6
|
-
<li data-menu-path="New" data-name="menu-item" className="menu-item icon icon-edit menu-item-selected menu-submenu-show">
|
|
7
|
-
<label data-menu-path="New">New</label>
|
|
8
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
9
|
-
<li data-menu-path="New.File" data-name="menu-item" className="menu-item icon icon-view">
|
|
10
|
-
<label data-menu-path="New.File">File</label>
|
|
11
|
-
</li>
|
|
12
|
-
<li data-menu-path="New.Directory" data-name="menu-item" className="menu-item icon icon-edit">
|
|
13
|
-
<label data-menu-path="New.Directory">Directory</label>
|
|
14
|
-
</li>
|
|
15
|
-
</ul>
|
|
16
|
-
</li>
|
|
17
|
-
</ul>;
|
|
18
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<ul data-name="hello" className="menu menu-hidden">
|
|
2
|
-
<li data-menu-path="Upload" data-name="menu-item" className="menu-item icon icon-view">
|
|
3
|
-
<label data-menu-path="Upload">Upload</label>
|
|
4
|
-
</li>
|
|
5
|
-
<li data-menu-path="New" data-name="menu-item" className="menu-item icon icon-edit menu-item-selected menu-submenu-show">
|
|
6
|
-
<label data-menu-path="New">New</label>
|
|
7
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
8
|
-
<li data-menu-path="New.File" data-name="menu-item" className="menu-item icon icon-view">
|
|
9
|
-
<label data-menu-path="New.File">File</label>
|
|
10
|
-
</li>
|
|
11
|
-
<li data-menu-path="New.Directory" data-name="menu-item" className="menu-item icon icon-edit">
|
|
12
|
-
<label data-menu-path="New.Directory">Directory</label>
|
|
13
|
-
</li>
|
|
14
|
-
</ul>
|
|
15
|
-
</li>
|
|
16
|
-
</ul>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// second selected
|
|
2
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
3
|
-
<li data-menu-path="Upload" data-name="menu-item" className="menu-item icon icon-view">
|
|
4
|
-
<label data-menu-path="Upload">Upload</label>
|
|
5
|
-
</li>
|
|
6
|
-
<li data-menu-path="New" data-name="menu-item" className="menu-item icon icon-edit menu-item-selected menu-submenu-show">
|
|
7
|
-
<label data-menu-path="New">New</label>
|
|
8
|
-
<ul data-name="menu" className="menu menu-hidden">
|
|
9
|
-
<li data-menu-path="New.File" data-name="menu-item" className="menu-item icon icon-view">
|
|
10
|
-
<label data-menu-path="New.File">File</label>
|
|
11
|
-
</li>
|
|
12
|
-
<li data-menu-path="New.Directory" data-name="menu-item" className="menu-item icon icon-edit">
|
|
13
|
-
<label data-menu-path="New.Directory">Directory</label>
|
|
14
|
-
</li>
|
|
15
|
-
</ul>
|
|
16
|
-
</li>
|
|
17
|
-
</ul>;
|
|
18
|
-
|