@antdv-next/x 1.1.2-beta.1 → 1.1.2-beta.2
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/index.umd.js +10 -9
- package/dist/package.js +1 -1
- package/dist/sender/components/SlotTextArea.js +9 -8
- package/es/antdv-next-x.esm.js +13 -6
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
|
|
49
49
|
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
|
|
50
50
|
//#region package.json
|
|
51
|
-
var version = "1.1.2-beta.
|
|
51
|
+
var version = "1.1.2-beta.2";
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region components/x-provider/context.ts
|
|
54
54
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -8668,16 +8668,17 @@
|
|
|
8668
8668
|
if (!selection || !selection.isCollapsed) return false;
|
|
8669
8669
|
const editable = editableRef.value;
|
|
8670
8670
|
if (!editable) return false;
|
|
8671
|
-
|
|
8672
|
-
|
|
8671
|
+
const anchorNode = selection.anchorNode;
|
|
8672
|
+
const offset = selection.anchorOffset;
|
|
8673
8673
|
if (!anchorNode || !editable.contains(anchorNode)) return false;
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
offset
|
|
8674
|
+
let previous;
|
|
8675
|
+
if (anchorNode === editable) {
|
|
8676
|
+
if (offset <= 0) return false;
|
|
8677
|
+
previous = editable.childNodes[offset - 1];
|
|
8678
|
+
} else {
|
|
8679
|
+
if (anchorNode.nodeType === Node.TEXT_NODE && offset > 0) return false;
|
|
8680
|
+
previous = (anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentNode : anchorNode)?.previousSibling;
|
|
8677
8681
|
}
|
|
8678
|
-
if (anchorNode.nodeType === Node.TEXT_NODE && offset > 0) return false;
|
|
8679
|
-
const target = anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentNode : anchorNode;
|
|
8680
|
-
const previous = target === editable ? editable.childNodes[Math.max(0, selection.anchorOffset - 1)] : target?.previousSibling;
|
|
8681
8682
|
if (!(previous instanceof HTMLElement)) return false;
|
|
8682
8683
|
const info = getNodeInfo(previous);
|
|
8683
8684
|
if (info?.slotKey) {
|
package/dist/package.js
CHANGED
|
@@ -500,16 +500,17 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
|
|
|
500
500
|
if (!selection || !selection.isCollapsed) return false;
|
|
501
501
|
const editable = editableRef.value;
|
|
502
502
|
if (!editable) return false;
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
const anchorNode = selection.anchorNode;
|
|
504
|
+
const offset = selection.anchorOffset;
|
|
505
505
|
if (!anchorNode || !editable.contains(anchorNode)) return false;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
offset
|
|
506
|
+
let previous;
|
|
507
|
+
if (anchorNode === editable) {
|
|
508
|
+
if (offset <= 0) return false;
|
|
509
|
+
previous = editable.childNodes[offset - 1];
|
|
510
|
+
} else {
|
|
511
|
+
if (anchorNode.nodeType === Node.TEXT_NODE && offset > 0) return false;
|
|
512
|
+
previous = (anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentNode : anchorNode)?.previousSibling;
|
|
509
513
|
}
|
|
510
|
-
if (anchorNode.nodeType === Node.TEXT_NODE && offset > 0) return false;
|
|
511
|
-
const target = anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentNode : anchorNode;
|
|
512
|
-
const previous = target === editable ? editable.childNodes[Math.max(0, selection.anchorOffset - 1)] : target?.previousSibling;
|
|
513
514
|
if (!(previous instanceof HTMLElement)) return false;
|
|
514
515
|
const info = getNodeInfo(previous);
|
|
515
516
|
if (info?.slotKey) {
|
package/es/antdv-next-x.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as e } from "./chunk-WQLz0Won.js";
|
|
|
2
2
|
import { S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./Serializer-D1JYN1kI.js";
|
|
3
3
|
import { Comment as C, Fragment as w, Teleport as T, Text as E, Transition as D, TransitionGroup as O, cloneVNode as k, computed as A, createTextVNode as j, createVNode as M, defineComponent as N, getCurrentInstance as P, getCurrentScope as F, h as I, inject as L, isVNode as R, markRaw as ee, mergeDefaults as z, mergeProps as B, nextTick as V, onBeforeMount as te, onBeforeUnmount as H, onBeforeUpdate as ne, onMounted as re, onScopeDispose as ie, onUnmounted as ae, onUpdated as oe, provide as U, reactive as se, ref as W, render as ce, resolveDynamicComponent as le, shallowReactive as ue, shallowRef as G, toRaw as de, toRef as fe, toRefs as pe, toValue as me, triggerRef as he, unref as ge, useAttrs as _e, useId as ve, useSlots as ye, vShow as be, watch as K, watchEffect as xe, withDirectives as Se } from "vue";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var Ce = "1.1.2-beta.
|
|
5
|
+
var Ce = "1.1.2-beta.2", we = "anticon", Te = {}, Ee = [
|
|
6
6
|
"outlined",
|
|
7
7
|
"borderless",
|
|
8
8
|
"filled",
|
|
@@ -59236,11 +59236,18 @@ var YW = /* @__PURE__ */ N({
|
|
|
59236
59236
|
let n = r.value;
|
|
59237
59237
|
if (!n) return !1;
|
|
59238
59238
|
let i = t.anchorNode, a = t.anchorOffset;
|
|
59239
|
-
if (!i || !n.contains(i)
|
|
59240
|
-
let o
|
|
59241
|
-
if (
|
|
59242
|
-
|
|
59243
|
-
|
|
59239
|
+
if (!i || !n.contains(i)) return !1;
|
|
59240
|
+
let o;
|
|
59241
|
+
if (i === n) {
|
|
59242
|
+
if (a <= 0) return !1;
|
|
59243
|
+
o = n.childNodes[a - 1];
|
|
59244
|
+
} else {
|
|
59245
|
+
if (i.nodeType === Node.TEXT_NODE && a > 0) return !1;
|
|
59246
|
+
o = (i.nodeType === Node.TEXT_NODE ? i.parentNode : i)?.previousSibling;
|
|
59247
|
+
}
|
|
59248
|
+
if (!(o instanceof HTMLElement)) return !1;
|
|
59249
|
+
let s = _(o);
|
|
59250
|
+
return s?.slotKey ? (e.preventDefault(), re(s.slotKey, e), !0) : s?.skillKey ? (e.preventDefault(), ie(!0), !0) : !1;
|
|
59244
59251
|
}, de = (e) => {
|
|
59245
59252
|
if (!(n.value.onKeyDown?.(e) === !1 || p.value || f.value) && !(e.key === "Backspace" && G(e))) {
|
|
59246
59253
|
if (le(e)) {
|