@arkyn/components 3.0.1-beta.41 → 3.0.1-beta.43
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/bundle.js +98 -87
- package/dist/bundle.umd.cjs +4 -4
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.js +3 -3
- package/dist/components/phoneInput/phoneInputMask/index.d.ts +1 -0
- package/dist/components/phoneInput/phoneInputMask/index.d.ts.map +1 -1
- package/dist/components/phoneInput/phoneInputMask/index.js +2 -2
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -394,23 +394,23 @@ function xc(e) {
|
|
394
394
|
showAsterisk: h = !1,
|
395
395
|
disabled: m = !1
|
396
396
|
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, E] = F(_), [v, w] = F(""), [G, L] = F(null), [S, z] = F(_), [A, b] = F(!1);
|
397
|
-
async function T(
|
397
|
+
async function T(I) {
|
398
398
|
if (m) return;
|
399
|
-
b(!0), L(
|
399
|
+
b(!0), L(I), w("");
|
400
400
|
const Z = new FormData();
|
401
|
-
Z.append(r,
|
401
|
+
Z.append(r, I), await fetch(d, { method: a, body: Z }).then(async (x) => await x.json()).then((x) => {
|
402
402
|
x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[o]), s && s(x == null ? void 0 : x[o]);
|
403
403
|
}).catch((x) => {
|
404
404
|
console.error(x), w("Erro ao enviar audio");
|
405
405
|
}).finally(() => b(!1));
|
406
406
|
}
|
407
|
-
function M(
|
407
|
+
function M(I) {
|
408
408
|
if (!m) {
|
409
|
-
if (
|
409
|
+
if (I.type.indexOf("audio") === -1) {
|
410
410
|
w("O arquivo selecionado não é um arquivo de áudio");
|
411
411
|
return;
|
412
412
|
}
|
413
|
-
z(URL.createObjectURL(
|
413
|
+
z(URL.createObjectURL(I)), T(I);
|
414
414
|
}
|
415
415
|
}
|
416
416
|
const O = y || v;
|
@@ -2599,7 +2599,7 @@ function Tc(e) {
|
|
2599
2599
|
size: S = "md",
|
2600
2600
|
id: z,
|
2601
2601
|
...A
|
2602
|
-
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), [O, j] = F("0"), D = oe(null), B = z || Ie(),
|
2602
|
+
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), [O, j] = F("0"), D = oe(null), B = z || Ie(), I = w || (b == null ? void 0 : b[t]), Z = !!I, x = n || g, te = { md: 20, lg: 20 }[S], J = L ? "right" : "left", ve = J === "left" && g, ce = J === "right" && g;
|
2603
2603
|
function re() {
|
2604
2604
|
x || !(D != null && D.current) || (M(!0), D.current.focus());
|
2605
2605
|
}
|
@@ -2675,7 +2675,7 @@ function Tc(e) {
|
|
2675
2675
|
]
|
2676
2676
|
}
|
2677
2677
|
),
|
2678
|
-
|
2678
|
+
I && /* @__PURE__ */ f(Fe, { children: I })
|
2679
2679
|
] });
|
2680
2680
|
}
|
2681
2681
|
function us() {
|
@@ -3030,18 +3030,18 @@ function Ic(e) {
|
|
3030
3030
|
onChange: h,
|
3031
3031
|
disabled: m = !1
|
3032
3032
|
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, E] = F(n), [v, w] = F(""), [G, L] = F(null), [S, z] = F(n), [A, b] = F(!1);
|
3033
|
-
async function T(
|
3033
|
+
async function T(I) {
|
3034
3034
|
if (m) return;
|
3035
|
-
b(!0), L(
|
3035
|
+
b(!0), L(I), w("");
|
3036
3036
|
const Z = new FormData();
|
3037
|
-
Z.append(o,
|
3037
|
+
Z.append(o, I), await fetch(s, { method: i, body: Z }).then(async (x) => await x.json()).then((x) => {
|
3038
3038
|
x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[l]), h && h(x == null ? void 0 : x[l]);
|
3039
3039
|
}).catch((x) => {
|
3040
3040
|
console.error(x), w("Erro ao enviar imagem");
|
3041
3041
|
}).finally(() => b(!1));
|
3042
3042
|
}
|
3043
|
-
function M(
|
3044
|
-
m || (z(URL.createObjectURL(
|
3043
|
+
function M(I) {
|
3044
|
+
m || (z(URL.createObjectURL(I)), T(I));
|
3045
3045
|
}
|
3046
3046
|
const O = y || v;
|
3047
3047
|
return /* @__PURE__ */ k(ye, { children: [
|
@@ -3098,7 +3098,7 @@ function ps(e) {
|
|
3098
3098
|
size: v = "md",
|
3099
3099
|
id: w,
|
3100
3100
|
...G
|
3101
|
-
} = e, { fieldErrors: L } = be(), [S, z] = F(!1), A = oe(null), b = w || Ie(), T = g || (L == null ? void 0 : L[t]), M = !!T, O = n || u, D = { md: 20, lg: 20 }[v], B = C ? "right" : "left",
|
3101
|
+
} = e, { fieldErrors: L } = be(), [S, z] = F(!1), A = oe(null), b = w || Ie(), T = g || (L == null ? void 0 : L[t]), M = !!T, O = n || u, D = { md: 20, lg: 20 }[v], B = C ? "right" : "left", I = B === "left" && u, Z = B === "right" && u;
|
3102
3102
|
function x() {
|
3103
3103
|
O || !(A != null && A.current) || (z(!0), A.current.focus());
|
3104
3104
|
}
|
@@ -3134,7 +3134,7 @@ function ps(e) {
|
|
3134
3134
|
/* @__PURE__ */ f(
|
3135
3135
|
K,
|
3136
3136
|
{
|
3137
|
-
show:
|
3137
|
+
show: I,
|
3138
3138
|
iconSize: D,
|
3139
3139
|
className: "spinner",
|
3140
3140
|
icon: Oe
|
@@ -3200,9 +3200,9 @@ function Rc(e) {
|
|
3200
3200
|
size: S = "md",
|
3201
3201
|
id: z,
|
3202
3202
|
...A
|
3203
|
-
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), O = oe(null), j = z || Ie(), D = v || (b == null ? void 0 : b[t]), B = !!D,
|
3203
|
+
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), O = oe(null), j = z || Ie(), D = v || (b == null ? void 0 : b[t]), B = !!D, I = n || m, x = { md: 20, lg: 20 }[S], ie = L ? "right" : "left", te = ie === "left" && m, J = ie === "right" && m;
|
3204
3204
|
function ve() {
|
3205
|
-
|
3205
|
+
I || !(O != null && O.current) || (M(!0), O.current.focus());
|
3206
3206
|
}
|
3207
3207
|
function ce(H) {
|
3208
3208
|
M(!0), C && C(H);
|
@@ -3210,7 +3210,7 @@ function Rc(e) {
|
|
3210
3210
|
function re(H) {
|
3211
3211
|
M(!1), E && E(H);
|
3212
3212
|
}
|
3213
|
-
const Me = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${S} ${
|
3213
|
+
const Me = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${S} ${I || y || m ? "opacity" : ""} ${B ? "errored" : ""} ${T ? "focused" : ""} ${d}`;
|
3214
3214
|
return /* @__PURE__ */ k(ye, { children: [
|
3215
3215
|
u && /* @__PURE__ */ f(me, { showAsterisk: G, htmlFor: j, children: u }),
|
3216
3216
|
/* @__PURE__ */ k(
|
@@ -3243,7 +3243,7 @@ function Rc(e) {
|
|
3243
3243
|
ref: O,
|
3244
3244
|
onFocus: ce,
|
3245
3245
|
onBlur: re,
|
3246
|
-
disabled:
|
3246
|
+
disabled: I,
|
3247
3247
|
readOnly: y,
|
3248
3248
|
id: j,
|
3249
3249
|
name: t,
|
@@ -3471,7 +3471,7 @@ function Lc(e) {
|
|
3471
3471
|
size: S = "md",
|
3472
3472
|
value: z,
|
3473
3473
|
variant: A = "solid"
|
3474
|
-
} = e, { fieldErrors: b } = be(), T = oe(null), M = d || Ie(), O = i || (b == null ? void 0 : b[t]), j = !!O, D = G || c || l,
|
3474
|
+
} = e, { fieldErrors: b } = be(), T = oe(null), M = d || Ie(), O = i || (b == null ? void 0 : b[t]), j = !!O, D = G || c || l, I = { md: 20, lg: 20 }[S], [Z, x] = F(""), [ie, te] = F(!1), [J, ve] = F(o), ce = z || J;
|
3475
3475
|
function re(H) {
|
3476
3476
|
return ce.includes(H);
|
3477
3477
|
}
|
@@ -3518,8 +3518,8 @@ function Lc(e) {
|
|
3518
3518
|
type: "hidden"
|
3519
3519
|
}
|
3520
3520
|
),
|
3521
|
-
/* @__PURE__ */ f(K, { iconSize:
|
3522
|
-
g && /* @__PURE__ */ f(g, { size:
|
3521
|
+
/* @__PURE__ */ f(K, { iconSize: I, icon: L, className: "prefix" }),
|
3522
|
+
g && /* @__PURE__ */ f(g, { size: I, strokeWidth: 2.5 }),
|
3523
3523
|
/* @__PURE__ */ k(xs, { size: S, children: [
|
3524
3524
|
ce.map((H) => /* @__PURE__ */ f(
|
3525
3525
|
Es,
|
@@ -3562,11 +3562,11 @@ function Lc(e) {
|
|
3562
3562
|
disabled: D,
|
3563
3563
|
isFocused: ie,
|
3564
3564
|
readOnly: l,
|
3565
|
-
iconSize:
|
3565
|
+
iconSize: I,
|
3566
3566
|
isLoading: c
|
3567
3567
|
}
|
3568
3568
|
),
|
3569
|
-
/* @__PURE__ */ f(Ss, { iconSize:
|
3569
|
+
/* @__PURE__ */ f(Ss, { iconSize: I, isLoading: c }),
|
3570
3570
|
/* @__PURE__ */ f(Fs, { handleBlur: X, isFocused: ie })
|
3571
3571
|
]
|
3572
3572
|
}
|
@@ -3723,38 +3723,48 @@ function Ds(e) {
|
|
3723
3723
|
}
|
3724
3724
|
const $s = gn((e, t) => /* @__PURE__ */ f("input", { ref: t, ...e })), Ls = gn(
|
3725
3725
|
(e, t) => {
|
3726
|
-
const {
|
3726
|
+
const {
|
3727
|
+
onFocus: n,
|
3728
|
+
readonly: r,
|
3729
|
+
onBlur: a,
|
3730
|
+
size: s,
|
3731
|
+
onChange: o,
|
3732
|
+
value: i,
|
3733
|
+
currentCountry: c,
|
3734
|
+
disabled: l
|
3735
|
+
} = e, [u, d] = F(!1);
|
3727
3736
|
Ce(() => {
|
3728
|
-
|
3729
|
-
}, [
|
3730
|
-
const
|
3731
|
-
function
|
3732
|
-
let
|
3733
|
-
const
|
3734
|
-
|
3737
|
+
u ? o(c.mask) : d(!0);
|
3738
|
+
}, [c]);
|
3739
|
+
const _ = `phoneInputMask ${s}`;
|
3740
|
+
function h(m) {
|
3741
|
+
let g = bn(m.target.value);
|
3742
|
+
const y = jr(g);
|
3743
|
+
g.length > Br || (g = Lr(g, xn[y]), m.target.value = g, o(g));
|
3735
3744
|
}
|
3736
|
-
return
|
3745
|
+
return c.code === "+55" ? /* @__PURE__ */ f(
|
3737
3746
|
"input",
|
3738
3747
|
{
|
3739
|
-
value:
|
3740
|
-
onChange:
|
3741
|
-
className:
|
3748
|
+
value: i,
|
3749
|
+
onChange: h,
|
3750
|
+
className: _,
|
3742
3751
|
onFocus: n,
|
3743
|
-
onBlur:
|
3744
|
-
disabled:
|
3752
|
+
onBlur: a,
|
3753
|
+
disabled: l,
|
3745
3754
|
ref: t
|
3746
3755
|
}
|
3747
3756
|
) : /* @__PURE__ */ f(
|
3748
3757
|
Ar,
|
3749
3758
|
{
|
3750
|
-
value:
|
3751
|
-
|
3752
|
-
|
3759
|
+
value: i,
|
3760
|
+
readOnly: r,
|
3761
|
+
onChange: (m) => o(m.target.value),
|
3762
|
+
className: _,
|
3753
3763
|
component: $s,
|
3754
3764
|
onFocus: n,
|
3755
|
-
onBlur:
|
3756
|
-
disabled:
|
3757
|
-
mask:
|
3765
|
+
onBlur: a,
|
3766
|
+
disabled: l,
|
3767
|
+
mask: c.mask,
|
3758
3768
|
showMask: !0,
|
3759
3769
|
replacement: { _: /\d/ },
|
3760
3770
|
ref: t
|
@@ -3784,9 +3794,9 @@ function jc(e) {
|
|
3784
3794
|
if (C.country) return C.country;
|
3785
3795
|
const $ = nt.find((X) => X.iso === t);
|
3786
3796
|
return $ || nt[30];
|
3787
|
-
}), { fieldErrors: M } = be(), O = oe(null), j = y || Ie(), D = s || (M == null ? void 0 : M[_]), B = !!D,
|
3797
|
+
}), { fieldErrors: M } = be(), O = oe(null), j = y || Ie(), D = s || (M == null ? void 0 : M[_]), B = !!D, I = a || o, Z = oe(null);
|
3788
3798
|
function x() {
|
3789
|
-
|
3799
|
+
I || E || L || (v(!0), Z.current && Z.current.focus());
|
3790
3800
|
}
|
3791
3801
|
function ie() {
|
3792
3802
|
S(!0), v(!0);
|
@@ -3816,7 +3826,7 @@ function jc(e) {
|
|
3816
3826
|
As,
|
3817
3827
|
{
|
3818
3828
|
id: j,
|
3819
|
-
disabled:
|
3829
|
+
disabled: I,
|
3820
3830
|
isError: B,
|
3821
3831
|
isLoading: o,
|
3822
3832
|
isFocused: E,
|
@@ -3837,7 +3847,7 @@ function jc(e) {
|
|
3837
3847
|
/* @__PURE__ */ k(
|
3838
3848
|
Ms,
|
3839
3849
|
{
|
3840
|
-
isOpen: L,
|
3850
|
+
isOpen: I || i ? !1 : L,
|
3841
3851
|
search: w,
|
3842
3852
|
placeholder: m,
|
3843
3853
|
onSearch: G,
|
@@ -3861,7 +3871,7 @@ function jc(e) {
|
|
3861
3871
|
/* @__PURE__ */ f(
|
3862
3872
|
Is,
|
3863
3873
|
{
|
3864
|
-
isOpen: L,
|
3874
|
+
isOpen: I || i ? !1 : L,
|
3865
3875
|
onClick: te
|
3866
3876
|
}
|
3867
3877
|
),
|
@@ -3869,15 +3879,16 @@ function jc(e) {
|
|
3869
3879
|
Ls,
|
3870
3880
|
{
|
3871
3881
|
ref: Z,
|
3882
|
+
readonly: i,
|
3872
3883
|
currentCountry: b,
|
3873
3884
|
value: z,
|
3874
|
-
|
3875
|
-
A($), h && h(ae($));
|
3876
|
-
},
|
3877
|
-
disabled: R,
|
3885
|
+
disabled: I,
|
3878
3886
|
onBlur: ve,
|
3879
3887
|
onFocus: J,
|
3880
|
-
size: c
|
3888
|
+
size: c,
|
3889
|
+
onChange: ($) => {
|
3890
|
+
A($), h && h(ae($));
|
3891
|
+
}
|
3881
3892
|
}
|
3882
3893
|
),
|
3883
3894
|
/* @__PURE__ */ f(
|
@@ -5422,7 +5433,7 @@ var qo = (e, t, n) => {
|
|
5422
5433
|
if (o > s.children.length)
|
5423
5434
|
throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r, "] because the destination is past the end of the node."));
|
5424
5435
|
if (s.children.splice(o, 0, a), t)
|
5425
|
-
for (var [i, c] of
|
5436
|
+
for (var [i, c] of R.points(t))
|
5426
5437
|
t[c] = U.transform(i, n);
|
5427
5438
|
break;
|
5428
5439
|
}
|
@@ -5435,7 +5446,7 @@ var qo = (e, t, n) => {
|
|
5435
5446
|
if (d.length === 0) break;
|
5436
5447
|
var _ = N.leaf(e, l), h = _.text.slice(0, u), m = _.text.slice(u);
|
5437
5448
|
if (_.text = h + d + m, t)
|
5438
|
-
for (var [g, y] of
|
5449
|
+
for (var [g, y] of R.points(t))
|
5439
5450
|
t[y] = U.transform(g, n);
|
5440
5451
|
break;
|
5441
5452
|
}
|
@@ -5450,7 +5461,7 @@ var qo = (e, t, n) => {
|
|
5450
5461
|
else
|
5451
5462
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C, "] to nodes of different interfaces: ").concat(Ee.stringify(E), " ").concat(Ee.stringify(w)));
|
5452
5463
|
if (G.children.splice(L, 1), t)
|
5453
|
-
for (var [S, z] of
|
5464
|
+
for (var [S, z] of R.points(t))
|
5454
5465
|
t[z] = U.transform(S, n);
|
5455
5466
|
break;
|
5456
5467
|
}
|
@@ -5465,8 +5476,8 @@ var qo = (e, t, n) => {
|
|
5465
5476
|
M.children.splice(O, 1);
|
5466
5477
|
var j = p.transform(A, n), D = N.get(e, p.parent(j)), B = j[j.length - 1];
|
5467
5478
|
if (D.children.splice(B, 0, T), t)
|
5468
|
-
for (var [
|
5469
|
-
t[Z] = U.transform(
|
5479
|
+
for (var [I, Z] of R.points(t))
|
5480
|
+
t[Z] = U.transform(I, n);
|
5470
5481
|
break;
|
5471
5482
|
}
|
5472
5483
|
case "remove_node": {
|
@@ -5474,7 +5485,7 @@ var qo = (e, t, n) => {
|
|
5474
5485
|
path: x
|
5475
5486
|
} = n, ie = x[x.length - 1], te = N.parent(e, x);
|
5476
5487
|
if (te.children.splice(ie, 1), t)
|
5477
|
-
for (var [J, ve] of
|
5488
|
+
for (var [J, ve] of R.points(t)) {
|
5478
5489
|
var ce = U.transform(J, n);
|
5479
5490
|
if (t != null && ce != null)
|
5480
5491
|
t[ve] = ce;
|
@@ -5502,7 +5513,7 @@ var qo = (e, t, n) => {
|
|
5502
5513
|
if (H.length === 0) break;
|
5503
5514
|
var le = N.leaf(e, Ze), vt = le.text.slice(0, Me), qt = le.text.slice(Me + H.length);
|
5504
5515
|
if (le.text = vt + qt, t)
|
5505
|
-
for (var [fe, De] of
|
5516
|
+
for (var [fe, De] of R.points(t))
|
5506
5517
|
t[De] = U.transform(fe, n);
|
5507
5518
|
break;
|
5508
5519
|
}
|
@@ -5533,7 +5544,7 @@ var qo = (e, t, n) => {
|
|
5533
5544
|
t = Ge;
|
5534
5545
|
else {
|
5535
5546
|
if (t == null) {
|
5536
|
-
if (!
|
5547
|
+
if (!R.isRange(Ge))
|
5537
5548
|
throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(Ge), " when there is no current selection."));
|
5538
5549
|
t = ot({}, Ge);
|
5539
5550
|
}
|
@@ -5570,7 +5581,7 @@ var qo = (e, t, n) => {
|
|
5570
5581
|
});
|
5571
5582
|
}
|
5572
5583
|
if (Sa.children.splice(Ta + 1, 0, Xt), t)
|
5573
|
-
for (var [Ra, Ma] of
|
5584
|
+
for (var [Ra, Ma] of R.points(t))
|
5574
5585
|
t[Ma] = U.transform(Ra, n);
|
5575
5586
|
break;
|
5576
5587
|
}
|
@@ -5692,7 +5703,7 @@ function Jo(e) {
|
|
5692
5703
|
}
|
5693
5704
|
return e;
|
5694
5705
|
}
|
5695
|
-
var
|
5706
|
+
var R = {
|
5696
5707
|
edges(e) {
|
5697
5708
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
|
5698
5709
|
reverse: n = !1
|
@@ -5700,27 +5711,27 @@ var I = {
|
|
5700
5711
|
anchor: r,
|
5701
5712
|
focus: a
|
5702
5713
|
} = e;
|
5703
|
-
return
|
5714
|
+
return R.isBackward(e) === n ? [r, a] : [a, r];
|
5704
5715
|
},
|
5705
5716
|
end(e) {
|
5706
|
-
var [, t] =
|
5717
|
+
var [, t] = R.edges(e);
|
5707
5718
|
return t;
|
5708
5719
|
},
|
5709
5720
|
equals(e, t) {
|
5710
5721
|
return U.equals(e.anchor, t.anchor) && U.equals(e.focus, t.focus);
|
5711
5722
|
},
|
5712
5723
|
includes(e, t) {
|
5713
|
-
if (
|
5714
|
-
if (
|
5724
|
+
if (R.isRange(t)) {
|
5725
|
+
if (R.includes(e, t.anchor) || R.includes(e, t.focus))
|
5715
5726
|
return !0;
|
5716
|
-
var [n, r] =
|
5727
|
+
var [n, r] = R.edges(e), [a, s] = R.edges(t);
|
5717
5728
|
return U.isBefore(n, a) && U.isAfter(r, s);
|
5718
5729
|
}
|
5719
|
-
var [o, i] =
|
5730
|
+
var [o, i] = R.edges(e), c = !1, l = !1;
|
5720
5731
|
return U.isPoint(t) ? (c = U.compare(t, o) >= 0, l = U.compare(t, i) <= 0) : (c = p.compare(t, o.path) >= 0, l = p.compare(t, i.path) <= 0), c && l;
|
5721
5732
|
},
|
5722
5733
|
intersection(e, t) {
|
5723
|
-
var n = gt(e, Zo), [r, a] =
|
5734
|
+
var n = gt(e, Zo), [r, a] = R.edges(e), [s, o] = R.edges(t), i = U.isBefore(r, s) ? s : r, c = U.isBefore(a, o) ? a : o;
|
5724
5735
|
return U.isBefore(c, i) ? null : Jo({
|
5725
5736
|
anchor: i,
|
5726
5737
|
focus: c
|
@@ -5741,10 +5752,10 @@ var I = {
|
|
5741
5752
|
return U.equals(t, n);
|
5742
5753
|
},
|
5743
5754
|
isExpanded(e) {
|
5744
|
-
return !
|
5755
|
+
return !R.isCollapsed(e);
|
5745
5756
|
},
|
5746
5757
|
isForward(e) {
|
5747
|
-
return !
|
5758
|
+
return !R.isBackward(e);
|
5748
5759
|
},
|
5749
5760
|
isRange(e) {
|
5750
5761
|
return se(e) && U.isPoint(e.anchor) && U.isPoint(e.focus);
|
@@ -5753,7 +5764,7 @@ var I = {
|
|
5753
5764
|
yield [e.anchor, "anchor"], yield [e.focus, "focus"];
|
5754
5765
|
},
|
5755
5766
|
start(e) {
|
5756
|
-
var [t] =
|
5767
|
+
var [t] = R.edges(e);
|
5757
5768
|
return t;
|
5758
5769
|
},
|
5759
5770
|
transform(e, t) {
|
@@ -5765,9 +5776,9 @@ var I = {
|
|
5765
5776
|
affinity: a = "inward"
|
5766
5777
|
} = n, s, o;
|
5767
5778
|
if (a === "inward") {
|
5768
|
-
var i =
|
5769
|
-
|
5770
|
-
} else a === "outward" ?
|
5779
|
+
var i = R.isCollapsed(r);
|
5780
|
+
R.isForward(r) ? (s = "forward", o = i ? s : "backward") : (s = "backward", o = i ? s : "forward");
|
5781
|
+
} else a === "outward" ? R.isForward(r) ? (s = "backward", o = "forward") : (s = "forward", o = "backward") : (s = a, o = a);
|
5771
5782
|
var c = U.transform(r.anchor, t, {
|
5772
5783
|
affinity: s
|
5773
5784
|
}), l = U.transform(r.focus, t, {
|
@@ -5880,15 +5891,15 @@ var I = {
|
|
5880
5891
|
var n = Fn({
|
5881
5892
|
children: e.children
|
5882
5893
|
}, (r) => {
|
5883
|
-
var [a, s] =
|
5894
|
+
var [a, s] = R.edges(t), o = N.nodes(r, {
|
5884
5895
|
reverse: !0,
|
5885
5896
|
pass: (_) => {
|
5886
5897
|
var [, h] = _;
|
5887
|
-
return !
|
5898
|
+
return !R.includes(t, h);
|
5888
5899
|
}
|
5889
5900
|
});
|
5890
5901
|
for (var [, i] of o) {
|
5891
|
-
if (!
|
5902
|
+
if (!R.includes(t, i)) {
|
5892
5903
|
var c = N.parent(r, i), l = i[i.length - 1];
|
5893
5904
|
c.children.splice(l, 1);
|
5894
5905
|
}
|
@@ -6055,7 +6066,7 @@ var it = {
|
|
6055
6066
|
case "set_node":
|
6056
6067
|
return p.isPath(e.path) && se(e.properties) && se(e.newProperties);
|
6057
6068
|
case "set_selection":
|
6058
|
-
return e.properties === null &&
|
6069
|
+
return e.properties === null && R.isRange(e.newProperties) || e.newProperties === null && R.isRange(e.properties) || se(e.properties) && se(e.newProperties);
|
6059
6070
|
case "split_node":
|
6060
6071
|
return p.isPath(e.path) && typeof e.position == "number" && se(e.properties);
|
6061
6072
|
default:
|
@@ -6151,7 +6162,7 @@ var it = {
|
|
6151
6162
|
return t;
|
6152
6163
|
if (!se(e))
|
6153
6164
|
return !1;
|
6154
|
-
var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || se(e.marks)) && (e.selection === null ||
|
6165
|
+
var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || se(e.marks)) && (e.selection === null || R.isRange(e.selection)) && N.isNodeList(e.children) && it.isOperationList(e.operations);
|
6155
6166
|
return cr.set(e, n), n;
|
6156
6167
|
}, pe = {
|
6157
6168
|
above(e, t) {
|
@@ -6485,7 +6496,7 @@ var W = {
|
|
6485
6496
|
decorations(e, t) {
|
6486
6497
|
var n = [Te({}, e)];
|
6487
6498
|
for (var r of t) {
|
6488
|
-
var a = gt(r, ri), [s, o] =
|
6499
|
+
var a = gt(r, ri), [s, o] = R.edges(r), i = [], c = 0, l = s.offset, u = o.offset;
|
6489
6500
|
for (var d of n) {
|
6490
6501
|
var {
|
6491
6502
|
length: _
|
@@ -6541,16 +6552,16 @@ var si = {
|
|
6541
6552
|
} = n, {
|
6542
6553
|
at: a = ai(e)
|
6543
6554
|
} = n;
|
6544
|
-
if (p.isPath(a) && (a = pe.range(e, a)),
|
6545
|
-
if (
|
6555
|
+
if (p.isPath(a) && (a = pe.range(e, a)), R.isRange(a))
|
6556
|
+
if (R.isCollapsed(a))
|
6546
6557
|
a = a.anchor;
|
6547
6558
|
else {
|
6548
|
-
var s =
|
6559
|
+
var s = R.end(a);
|
6549
6560
|
if (!r && pe.void(e, {
|
6550
6561
|
at: s
|
6551
6562
|
}))
|
6552
6563
|
return;
|
6553
|
-
var o =
|
6564
|
+
var o = R.start(a), i = pe.pointRef(e, o), c = pe.pointRef(e, s);
|
6554
6565
|
mr.delete(e, {
|
6555
6566
|
at: a,
|
6556
6567
|
voids: r
|