@ai-matrx/context-menu 0.1.7 → 0.1.8
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.md +12 -0
- package/dist/engine.cjs +8 -2
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.js +8 -2
- package/dist/engine.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.8
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/context-menu/v0.1.7..npm/context-menu/v0.1.8 -- apps/shared/context-menu`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.1.7
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
12
|
`git diff npm/context-menu/v0.1.6..npm/context-menu/v0.1.7 -- apps/shared/context-menu`).
|
|
7
13
|
No source changes intended and no consumer action required.
|
|
8
14
|
|
|
15
|
+
## 0.1.6
|
|
16
|
+
|
|
17
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
18
|
+
`git diff npm/context-menu/v0.1.5..npm/context-menu/v0.1.6 -- apps/shared/context-menu`).
|
|
19
|
+
No source changes intended and no consumer action required.
|
|
20
|
+
|
|
9
21
|
## 0.1.5
|
|
10
22
|
|
|
11
23
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/engine.cjs
CHANGED
|
@@ -2331,6 +2331,7 @@ var STRIP_FOR = {
|
|
|
2331
2331
|
var PAGE_TEXT_FILE_IDS = /* @__PURE__ */ new Set(["save-as-pdf"]);
|
|
2332
2332
|
var OPEN_ROW = /^open( record)?$/i;
|
|
2333
2333
|
var LINK_A_RECORD = /^link a record/i;
|
|
2334
|
+
var RECORD_VERBS = [/^merge with/i, /^split(…|\.\.\.)?$/i, /^extract parent/i];
|
|
2334
2335
|
var FOLDS_INTO_SHARE = [/^copy link\b/i, /^share link\b/i];
|
|
2335
2336
|
var SAVE_SHARE_GROUPS = ["copy", "download", "convert", "publish", "share"];
|
|
2336
2337
|
var ORGANIZE_GROUPS = /* @__PURE__ */ new Set(["organize", "history", "compare"]);
|
|
@@ -2428,14 +2429,19 @@ function proposedArrangement(target, resolved, { noun }) {
|
|
|
2428
2429
|
};
|
|
2429
2430
|
const openRow = lead(OPEN_ROW);
|
|
2430
2431
|
const linkRow = lead(LINK_A_RECORD);
|
|
2431
|
-
|
|
2432
|
+
const verbRows = RECORD_VERBS.map(lead).filter((r) => r !== null);
|
|
2433
|
+
const leading = [openRow, linkRow, ...verbRows].filter((r) => r !== null);
|
|
2434
|
+
const verbIds = new Set(verbRows.map((r) => r.action.id));
|
|
2435
|
+
let counted = 0;
|
|
2436
|
+
ownCandidates.unshift(...leading);
|
|
2432
2437
|
const own = [];
|
|
2433
2438
|
const more = [];
|
|
2434
2439
|
for (const r of ownCandidates) {
|
|
2435
2440
|
used.add(r.action.id);
|
|
2436
2441
|
const folds = hasShare && FOLDS_INTO_SHARE.some((re) => re.test(label(r)));
|
|
2437
|
-
if (!folds &&
|
|
2442
|
+
if (!folds && (verbIds.has(r.action.id) || counted < OWN_ROWS_MAX) && !r.action.expand) {
|
|
2438
2443
|
const destructive = SLOT2.archive.ownLabels.some((re) => re.test(label(r)));
|
|
2444
|
+
if (!verbIds.has(r.action.id)) counted += 1;
|
|
2439
2445
|
own.push({ ...r, action: plain(r.action, { category: "edit", order: own.length, ...destructive ? { destructive: true } : {} }) });
|
|
2440
2446
|
} else {
|
|
2441
2447
|
more.push(plain(r.action));
|