@ai-matrx/context-menu 0.1.5 → 0.1.7
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 +24 -3
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +3 -1
- package/dist/engine.d.ts +3 -1
- package/dist/engine.js +15 -3
- package/dist/engine.js.map +1 -1
- package/dist/menu-content.cjs +31 -7
- package/dist/menu-content.cjs.map +1 -1
- package/dist/menu-content.js +31 -7
- package/dist/menu-content.js.map +1 -1
- package/dist/react.cjs +73 -41
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +72 -40
- package/dist/react.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/context-menu/v0.1.6..npm/context-menu/v0.1.7 -- apps/shared/context-menu`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.1.5
|
|
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.4..npm/context-menu/v0.1.5 -- apps/shared/context-menu`).
|
|
7
13
|
No source changes intended and no consumer action required.
|
|
8
14
|
|
|
15
|
+
## 0.1.4
|
|
16
|
+
|
|
17
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
18
|
+
`git diff npm/context-menu/v0.1.3..npm/context-menu/v0.1.4 -- apps/shared/context-menu`).
|
|
19
|
+
No source changes intended and no consumer action required.
|
|
20
|
+
|
|
9
21
|
## 0.1.3
|
|
10
22
|
|
|
11
23
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/engine.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -17,6 +19,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
19
21
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
20
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
31
|
|
|
22
32
|
// src/engine/index.ts
|
|
@@ -85,6 +95,7 @@ __export(engine_exports, {
|
|
|
85
95
|
openRecordMenu: () => openRecordMenu,
|
|
86
96
|
ownParagraph: () => ownParagraph,
|
|
87
97
|
parseKeyCombo: () => parseKeyCombo,
|
|
98
|
+
preloadTableShape: () => preloadTableShape,
|
|
88
99
|
proposedArrangement: () => proposedArrangement,
|
|
89
100
|
recordMenuChanged: () => recordMenuChanged,
|
|
90
101
|
recordMenusRevision: () => recordMenusRevision,
|
|
@@ -2673,11 +2684,21 @@ function buildEditableWidgetHandle(args) {
|
|
|
2673
2684
|
}
|
|
2674
2685
|
|
|
2675
2686
|
// src/engine/utils/table-at-target.ts
|
|
2676
|
-
var
|
|
2687
|
+
var shapeReader = null;
|
|
2688
|
+
var shapeLoad = null;
|
|
2689
|
+
function preloadTableShape() {
|
|
2690
|
+
shapeLoad ??= import("@ai-matrx/records-ui/table-shape").then((m) => {
|
|
2691
|
+
shapeReader = m.shapeTextOfNode;
|
|
2692
|
+
}).catch((error) => {
|
|
2693
|
+
shapeLoad = null;
|
|
2694
|
+
console.error("[ContextMenuV3] could not load the table shape reader", error);
|
|
2695
|
+
});
|
|
2696
|
+
return shapeLoad;
|
|
2697
|
+
}
|
|
2677
2698
|
function tableTextAtTarget(target) {
|
|
2678
2699
|
const table = target?.closest("table");
|
|
2679
|
-
if (!table) return null;
|
|
2680
|
-
const text = (
|
|
2700
|
+
if (!table || !shapeReader) return null;
|
|
2701
|
+
const text = shapeReader(table.cloneNode(true));
|
|
2681
2702
|
return text.trim() ? text : null;
|
|
2682
2703
|
}
|
|
2683
2704
|
|