@damiro/stylo 0.19.0 → 0.19.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/dist/{InPlaceView-D2GIV1A-.js → InPlaceView-rt6po4_E.js} +21 -18
- package/dist/InPlaceView-rt6po4_E.js.map +1 -0
- package/dist/inplace/context-menu-actions.d.ts +1 -1
- package/dist/inplace/context-menu-actions.d.ts.map +1 -1
- package/dist/inplace/host-cell.d.ts +5 -1
- package/dist/inplace/host-cell.d.ts.map +1 -1
- package/dist/stylo.js +1 -1
- package/package.json +1 -1
- package/dist/InPlaceView-D2GIV1A-.js.map +0 -1
|
@@ -980,17 +980,20 @@ var Y = A.define({
|
|
|
980
980
|
});
|
|
981
981
|
//#endregion
|
|
982
982
|
//#region src/inplace/host-cell.ts
|
|
983
|
-
function cn(e) {
|
|
984
|
-
let
|
|
985
|
-
if (!
|
|
986
|
-
let
|
|
987
|
-
e.state.field(Y).between(
|
|
988
|
-
let
|
|
989
|
-
if (
|
|
990
|
-
let { from:
|
|
983
|
+
function cn(e, t, n) {
|
|
984
|
+
let i = t.closest("table");
|
|
985
|
+
if (!i) return;
|
|
986
|
+
let a = e.posAtDOM(i), o = a;
|
|
987
|
+
e.state.field(Y).between(a, a, (e) => (o = e, !1));
|
|
988
|
+
let s = le(e.state.doc, o, Number(t.dataset.r), Number(t.dataset.c));
|
|
989
|
+
if (s == null) return;
|
|
990
|
+
let { from: c, to: l } = n ? r(t) : {
|
|
991
|
+
from: 0,
|
|
992
|
+
to: 0
|
|
993
|
+
};
|
|
991
994
|
e.dispatch({ selection: {
|
|
992
|
-
anchor:
|
|
993
|
-
head:
|
|
995
|
+
anchor: s + c,
|
|
996
|
+
head: s + l
|
|
994
997
|
} });
|
|
995
998
|
}
|
|
996
999
|
//#endregion
|
|
@@ -1393,12 +1396,12 @@ var Mn = (e, t = !1) => [
|
|
|
1393
1396
|
"separator",
|
|
1394
1397
|
...t ? U(e, Vt, !1, !0) : [Kt(e, "code", !1), Dn(e)]
|
|
1395
1398
|
];
|
|
1396
|
-
function Nn(e) {
|
|
1397
|
-
let
|
|
1398
|
-
return K(
|
|
1399
|
-
selected:
|
|
1400
|
-
prepare: () => cn(e)
|
|
1401
|
-
})),
|
|
1399
|
+
function Nn(e, t) {
|
|
1400
|
+
let n = e.state.facet(L), r = t ?? h(e), i = Z(e) && r === h(e), a = [];
|
|
1401
|
+
return K(a, pn(e, {
|
|
1402
|
+
selected: i,
|
|
1403
|
+
prepare: () => r && cn(e, r, i)
|
|
1404
|
+
})), i ? (n.includes("format") && K(a, [G("Format", b.format, Mn(e, !0))]), n.includes("clipboard") && K(a, W(e)), a) : a;
|
|
1402
1405
|
}
|
|
1403
1406
|
var Pn = (e) => [
|
|
1404
1407
|
...U(e, Ht),
|
|
@@ -1794,7 +1797,7 @@ var $ = we.define(), Jn = class extends E {
|
|
|
1794
1797
|
let i = r?.closest("td, th");
|
|
1795
1798
|
if (!i) return;
|
|
1796
1799
|
this.editing === i && !Z(e) && s(i, t, n);
|
|
1797
|
-
let a = Nn(e);
|
|
1800
|
+
let a = Nn(e, i);
|
|
1798
1801
|
this.gizmos?.openFor(i, t, n, a);
|
|
1799
1802
|
}
|
|
1800
1803
|
toDOM(e) {
|
|
@@ -2840,4 +2843,4 @@ function Vr({ value: e, onChange: t, readOnly: r, placeholder: i, onWikiLinkClic
|
|
|
2840
2843
|
//#endregion
|
|
2841
2844
|
export { Vr as InPlaceView };
|
|
2842
2845
|
|
|
2843
|
-
//# sourceMappingURL=InPlaceView-
|
|
2846
|
+
//# sourceMappingURL=InPlaceView-rt6po4_E.js.map
|