@editora/core 1.0.27 → 1.0.29
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/{CollaborationPlugin.native-Bl3R9CRI.mjs → CollaborationPlugin.native-B2AsCMfm.mjs} +88 -88
- package/dist/core.css +1 -1
- package/dist/editora.min.js +16 -16
- package/dist/editora.umd.js +16 -16
- package/dist/{index-gI4djib2.mjs → index-8sr_lMjf.mjs} +428 -423
- package/dist/index-hTD8Iy46.js +12 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/plugin-loader.js +1 -1
- package/dist/webcomponent-core.js +425 -420
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +16 -16
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +452 -447
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +108 -108
- package/package.json +1 -1
- package/dist/index-DHPPVQwx.js +0 -12
package/dist/{CollaborationPlugin.native-Bl3R9CRI.mjs → CollaborationPlugin.native-B2AsCMfm.mjs}
RENAMED
|
@@ -145,7 +145,7 @@ class _i {
|
|
|
145
145
|
this._observers = $();
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
const z = Math.floor, he = Math.abs, Cn = (e, t) => e < t ? e : t, mt = (e, t) => e > t ? e : t, Si = Math.pow, Ms = (e) => e !== 0 ? e < 0 : 1 / e < 0, Zn = 1, ts = 2, Ke = 4, We = 8, zt = 32, X = 64, B = 128,
|
|
148
|
+
const z = Math.floor, he = Math.abs, Cn = (e, t) => e < t ? e : t, mt = (e, t) => e > t ? e : t, Si = Math.pow, Ms = (e) => e !== 0 ? e < 0 : 1 / e < 0, Zn = 1, ts = 2, Ke = 4, We = 8, zt = 32, X = 64, B = 128, ve = 31, ln = 63, ht = 127, Ci = 2147483647, we = Number.MAX_SAFE_INTEGER, es = Number.MIN_SAFE_INTEGER, Ei = Number.isInteger || ((e) => typeof e == "number" && isFinite(e) && z(e) === e), Us = String.fromCharCode, Di = (e) => e.toLowerCase(), Ai = /^\s*/g, Ti = (e) => e.replace(Ai, ""), xi = /([A-Z])/g, ns = (e, t) => Ti(e.replace(xi, (n) => `${t}${Di(n)}`)), Ii = (e) => {
|
|
149
149
|
const t = unescape(encodeURIComponent(e)), n = t.length, s = new Uint8Array(n);
|
|
150
150
|
for (let r = 0; r < n; r++)
|
|
151
151
|
s[r] = /** @type {number} */
|
|
@@ -157,13 +157,13 @@ const z = Math.floor, he = Math.abs, Cn = (e, t) => e < t ? e : t, mt = (e, t) =
|
|
|
157
157
|
), Li = (e) => Yt.encode(e), Oi = Yt ? Li : Ii;
|
|
158
158
|
let jt = typeof TextDecoder == "undefined" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
|
|
159
159
|
jt && jt.decode(new Uint8Array()).length === 1 && (jt = null);
|
|
160
|
-
const
|
|
160
|
+
const vi = (e, t) => ki(t, () => e).join("");
|
|
161
161
|
class Zt {
|
|
162
162
|
constructor() {
|
|
163
163
|
this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
const
|
|
166
|
+
const N = () => new Zt(), En = (e) => {
|
|
167
167
|
let t = e.cpos;
|
|
168
168
|
for (let n = 0; n < e.bufs.length; n++)
|
|
169
169
|
t += e.bufs[n].length;
|
|
@@ -176,7 +176,7 @@ const v = () => new Zt(), En = (e) => {
|
|
|
176
176
|
t.set(r, n), n += r.length;
|
|
177
177
|
}
|
|
178
178
|
return t.set(new Uint8Array(e.cbuf.buffer, 0, e.cpos), n), t;
|
|
179
|
-
},
|
|
179
|
+
}, Ni = (e, t) => {
|
|
180
180
|
const n = e.cbuf.length;
|
|
181
181
|
n - e.cpos < t && (e.bufs.push(new Uint8Array(e.cbuf.buffer, 0, e.cpos)), e.cbuf = new Uint8Array(mt(n, t) * 2), e.cpos = 0);
|
|
182
182
|
}, x = (e, t) => {
|
|
@@ -208,13 +208,13 @@ const v = () => new Zt(), En = (e) => {
|
|
|
208
208
|
n.codePointAt(r)
|
|
209
209
|
);
|
|
210
210
|
}, ut = Yt && /** @type {any} */
|
|
211
|
-
Yt.encodeInto ? Ui : Ri,
|
|
211
|
+
Yt.encodeInto ? Ui : Ri, Ne = (e, t) => {
|
|
212
212
|
const n = e.cbuf.length, s = e.cpos, r = Cn(n - s, t.length), i = t.length - r;
|
|
213
213
|
e.cbuf.set(t.subarray(0, r), s), e.cpos += r, i > 0 && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(mt(n * 2, i)), e.cbuf.set(t.subarray(r)), e.cpos = i);
|
|
214
214
|
}, E = (e, t) => {
|
|
215
|
-
m(e, t.byteLength),
|
|
215
|
+
m(e, t.byteLength), Ne(e, t);
|
|
216
216
|
}, An = (e, t) => {
|
|
217
|
-
|
|
217
|
+
Ni(e, t);
|
|
218
218
|
const n = new DataView(e.cbuf.buffer, e.cpos, t);
|
|
219
219
|
return e.cpos += t, n;
|
|
220
220
|
}, $i = (e, t) => An(e, 4).setFloat32(0, t, !1), Bi = (e, t) => An(e, 8).setFloat64(0, t, !1), Fi = (e, t) => (
|
|
@@ -330,7 +330,7 @@ class ji {
|
|
|
330
330
|
}
|
|
331
331
|
toUint8Array() {
|
|
332
332
|
const t = new Zt();
|
|
333
|
-
return this.sarr.push(this.s), this.s = "", ut(t, this.sarr.join("")),
|
|
333
|
+
return this.sarr.push(this.s), this.s = "", ut(t, this.sarr.join("")), Ne(t, this.lensE.toUint8Array()), C(t);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
const G = (e) => new Error(e), H = () => {
|
|
@@ -357,7 +357,7 @@ class Ue {
|
|
|
357
357
|
const lt = (e) => new Ue(e), Yi = (e) => e.pos !== e.arr.length, Gi = (e, t) => {
|
|
358
358
|
const n = Hi(e.arr, e.pos, t);
|
|
359
359
|
return e.pos += t, n;
|
|
360
|
-
},
|
|
360
|
+
}, v = (e) => Gi(e, b(e)), Ot = (e) => e.arr[e.pos++], b = (e) => {
|
|
361
361
|
let t = 0, n = 1;
|
|
362
362
|
const s = e.arr.length;
|
|
363
363
|
for (; e.pos < s; ) {
|
|
@@ -403,7 +403,7 @@ const lt = (e) => new Ue(e), Yi = (e) => e.pos !== e.arr.length, Gi = (e, t) =>
|
|
|
403
403
|
}
|
|
404
404
|
}, Ji = (e) => (
|
|
405
405
|
/** @type any */
|
|
406
|
-
jt.decode(
|
|
406
|
+
jt.decode(v(e))
|
|
407
407
|
), rt = jt ? Ji : Pi, xn = (e, t) => {
|
|
408
408
|
const n = zi(e.arr, e.pos, t);
|
|
409
409
|
return e.pos += t, n;
|
|
@@ -444,7 +444,7 @@ const lt = (e) => new Ue(e), Yi = (e) => e.pos !== e.arr.length, Gi = (e, t) =>
|
|
|
444
444
|
n.push(Pt(e));
|
|
445
445
|
return n;
|
|
446
446
|
},
|
|
447
|
-
|
|
447
|
+
v
|
|
448
448
|
// CASE 116: Uint8Array
|
|
449
449
|
], Pt = (e) => qi[127 - Ot(e)](e);
|
|
450
450
|
class cs extends Ue {
|
|
@@ -684,14 +684,14 @@ class xo {
|
|
|
684
684
|
this.left = t, this.right = n;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
const W = (e, t) => new xo(e, t), hs = (e) => e.next() >= 0.5, Qe = (e, t, n) => z(e.next() * (n + 1 - t) + t), Ps = (e, t, n) => z(e.next() * (n + 1 - t) + t),
|
|
688
|
-
const s =
|
|
687
|
+
const W = (e, t) => new xo(e, t), hs = (e) => e.next() >= 0.5, Qe = (e, t, n) => z(e.next() * (n + 1 - t) + t), Ps = (e, t, n) => z(e.next() * (n + 1 - t) + t), vn = (e, t, n) => Ps(e, t, n), Io = (e) => Us(vn(e, 97, 122)), Lo = (e, t = 0, n = 20) => {
|
|
688
|
+
const s = vn(e, t, n);
|
|
689
689
|
let r = "";
|
|
690
690
|
for (let i = 0; i < s; i++)
|
|
691
691
|
r += Io(e);
|
|
692
692
|
return r;
|
|
693
|
-
}, Ze = (e, t) => t[
|
|
694
|
-
class
|
|
693
|
+
}, Ze = (e, t) => t[vn(e, 0, t.length - 1)], Oo = /* @__PURE__ */ Symbol("0schema");
|
|
694
|
+
class vo {
|
|
695
695
|
constructor() {
|
|
696
696
|
this._rerrs = [];
|
|
697
697
|
}
|
|
@@ -708,7 +708,7 @@ class No {
|
|
|
708
708
|
const t = [];
|
|
709
709
|
for (let n = this._rerrs.length - 1; n > 0; n--) {
|
|
710
710
|
const s = this._rerrs[n];
|
|
711
|
-
t.push(
|
|
711
|
+
t.push(vi(" ", (this._rerrs.length - n) * 2) + `${s.path != null ? `[${s.path}] ` : ""}${s.has} doesn't match ${s.expected}. ${s.message}`);
|
|
712
712
|
}
|
|
713
713
|
return t.join(`
|
|
714
714
|
`);
|
|
@@ -841,7 +841,7 @@ class U {
|
|
|
841
841
|
* @protected
|
|
842
842
|
*/
|
|
843
843
|
oe(U, "_dilutes", !1);
|
|
844
|
-
class
|
|
844
|
+
class Nn extends U {
|
|
845
845
|
/**
|
|
846
846
|
* @param {C} c
|
|
847
847
|
* @param {((o:Instance<C>)=>boolean)|null} check
|
|
@@ -859,8 +859,8 @@ class vn extends U {
|
|
|
859
859
|
return !s && (n == null || n.extend(null, this.shape.name, t == null ? void 0 : t.constructor.name, (t == null ? void 0 : t.constructor) !== this.shape ? "Constructor match failed" : "Check failed")), s;
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
|
-
const D = (e, t = null) => new
|
|
863
|
-
D(
|
|
862
|
+
const D = (e, t = null) => new Nn(e, t);
|
|
863
|
+
D(Nn);
|
|
864
864
|
class Mn extends U {
|
|
865
865
|
/**
|
|
866
866
|
* @param {(o:any) => boolean} check
|
|
@@ -898,13 +898,13 @@ class Re extends U {
|
|
|
898
898
|
return !s && (n == null || n.extend(null, this.shape.join(" | "), t.toString())), s;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
const $e = (...e) => new Re(e), Js = D(Re),
|
|
901
|
+
const $e = (...e) => new Re(e), Js = D(Re), No = (
|
|
902
902
|
/** @type {any} */
|
|
903
903
|
RegExp.escape || /** @type {(str:string) => string} */
|
|
904
904
|
((e) => e.replace(/[().|&,$^[\]]/g, (t) => "\\" + t))
|
|
905
905
|
), Ks = (e) => {
|
|
906
|
-
if (
|
|
907
|
-
return [
|
|
906
|
+
if (vt.check(e))
|
|
907
|
+
return [No(e)];
|
|
908
908
|
if (Js.check(e))
|
|
909
909
|
return (
|
|
910
910
|
/** @type {Array<string|number>} */
|
|
@@ -1156,9 +1156,9 @@ L((e) => e === sr);
|
|
|
1156
1156
|
const At = L((e) => typeof e == "number"), rr = (
|
|
1157
1157
|
/** @type {Schema<Schema<number>>} */
|
|
1158
1158
|
L((e) => e === At)
|
|
1159
|
-
),
|
|
1159
|
+
), vt = L((e) => typeof e == "string"), ir = (
|
|
1160
1160
|
/** @type {Schema<Schema<string>>} */
|
|
1161
|
-
L((e) => e ===
|
|
1161
|
+
L((e) => e === vt)
|
|
1162
1162
|
), Fe = L((e) => typeof e == "boolean"), Zo = (
|
|
1163
1163
|
/** @type {Schema<Schema<Boolean>>} */
|
|
1164
1164
|
L((e) => e === Fe)
|
|
@@ -1170,16 +1170,16 @@ const Ve = $e(null), tc = (
|
|
|
1170
1170
|
D(Re, (e) => e.shape.length === 1 && e.shape[0] === null)
|
|
1171
1171
|
);
|
|
1172
1172
|
D(Uint8Array);
|
|
1173
|
-
D(
|
|
1174
|
-
const ec = $t(At,
|
|
1173
|
+
D(Nn, (e) => e.shape === Uint8Array);
|
|
1174
|
+
const ec = $t(At, vt, Ve, or, Un, Fe, sr);
|
|
1175
1175
|
(() => {
|
|
1176
1176
|
const e = (
|
|
1177
1177
|
/** @type {$Array<$any>} */
|
|
1178
1178
|
tr(_e)
|
|
1179
1179
|
), t = (
|
|
1180
1180
|
/** @type {$Record<$string,$any>} */
|
|
1181
|
-
qs(
|
|
1182
|
-
), n = $t(At,
|
|
1181
|
+
qs(vt, _e)
|
|
1182
|
+
), n = $t(At, vt, Ve, Fe, e, t);
|
|
1183
1183
|
return e.shape = n, t.shape.values = n, n;
|
|
1184
1184
|
})();
|
|
1185
1185
|
const Kt = (e) => {
|
|
@@ -1219,7 +1219,7 @@ const Kt = (e) => {
|
|
|
1219
1219
|
j();
|
|
1220
1220
|
}, us = mo ? () => {
|
|
1221
1221
|
} : (e, t) => {
|
|
1222
|
-
const n = new
|
|
1222
|
+
const n = new vo();
|
|
1223
1223
|
if (!t.check(e, n))
|
|
1224
1224
|
throw G(`Expected value to be of type ${t.constructor.name}.
|
|
1225
1225
|
${n.toString()}`);
|
|
@@ -1297,7 +1297,7 @@ const sc = (e) => new nc(
|
|
|
1297
1297
|
return () => n;
|
|
1298
1298
|
}).if(qo, (e, t) => _t(t, Ze(t, [
|
|
1299
1299
|
At,
|
|
1300
|
-
|
|
1300
|
+
vt,
|
|
1301
1301
|
Ve,
|
|
1302
1302
|
or,
|
|
1303
1303
|
Un,
|
|
@@ -1420,7 +1420,7 @@ class Bt {
|
|
|
1420
1420
|
this.clients = /* @__PURE__ */ new Map();
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
const
|
|
1423
|
+
const Nt = (e, t, n) => t.clients.forEach((s, r) => {
|
|
1424
1424
|
const i = (
|
|
1425
1425
|
/** @type {Array<GC|Item>} */
|
|
1426
1426
|
e.doc.store.clients.get(r)
|
|
@@ -1833,7 +1833,7 @@ class mr extends wr {
|
|
|
1833
1833
|
* @return {Uint8Array}
|
|
1834
1834
|
*/
|
|
1835
1835
|
readBuf() {
|
|
1836
|
-
return To(
|
|
1836
|
+
return To(v(this.restDecoder));
|
|
1837
1837
|
}
|
|
1838
1838
|
/**
|
|
1839
1839
|
* Legacy implementation uses JSON parse. We use any-decoding in v2.
|
|
@@ -1879,7 +1879,7 @@ class Mt extends Sc {
|
|
|
1879
1879
|
* @param {decoding.Decoder} decoder
|
|
1880
1880
|
*/
|
|
1881
1881
|
constructor(t) {
|
|
1882
|
-
super(t), this.keys = [], b(t), this.keyClockDecoder = new qe(
|
|
1882
|
+
super(t), this.keys = [], b(t), this.keyClockDecoder = new qe(v(t)), this.clientDecoder = new de(v(t)), this.leftClockDecoder = new qe(v(t)), this.rightClockDecoder = new qe(v(t)), this.infoDecoder = new cs(v(t), Ot), this.stringDecoder = new Qi(v(t)), this.parentInfoDecoder = new cs(v(t), Ot), this.typeRefDecoder = new de(v(t)), this.lenDecoder = new de(v(t));
|
|
1883
1883
|
}
|
|
1884
1884
|
/**
|
|
1885
1885
|
* @return {ID}
|
|
@@ -1945,7 +1945,7 @@ class Mt extends Sc {
|
|
|
1945
1945
|
* @return {Uint8Array}
|
|
1946
1946
|
*/
|
|
1947
1947
|
readBuf() {
|
|
1948
|
-
return
|
|
1948
|
+
return v(this.restDecoder);
|
|
1949
1949
|
}
|
|
1950
1950
|
/**
|
|
1951
1951
|
* This is mainly here for legacy purposes.
|
|
@@ -1972,7 +1972,7 @@ class Mt extends Sc {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
class yr {
|
|
1974
1974
|
constructor() {
|
|
1975
|
-
this.restEncoder =
|
|
1975
|
+
this.restEncoder = N();
|
|
1976
1976
|
}
|
|
1977
1977
|
toUint8Array() {
|
|
1978
1978
|
return C(this.restEncoder);
|
|
@@ -2071,7 +2071,7 @@ class ne extends yr {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
class br {
|
|
2073
2073
|
constructor() {
|
|
2074
|
-
this.restEncoder =
|
|
2074
|
+
this.restEncoder = N(), this.dsCurrVal = 0;
|
|
2075
2075
|
}
|
|
2076
2076
|
toUint8Array() {
|
|
2077
2077
|
return C(this.restEncoder);
|
|
@@ -2098,8 +2098,8 @@ class dt extends br {
|
|
|
2098
2098
|
super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new Xe(), this.clientEncoder = new ue(), this.leftClockEncoder = new Xe(), this.rightClockEncoder = new Xe(), this.infoEncoder = new rs(an), this.stringEncoder = new ji(), this.parentInfoEncoder = new rs(an), this.typeRefEncoder = new ue(), this.lenEncoder = new ue();
|
|
2099
2099
|
}
|
|
2100
2100
|
toUint8Array() {
|
|
2101
|
-
const t =
|
|
2102
|
-
return m(t, 0), E(t, this.keyClockEncoder.toUint8Array()), E(t, this.clientEncoder.toUint8Array()), E(t, this.leftClockEncoder.toUint8Array()), E(t, this.rightClockEncoder.toUint8Array()), E(t, C(this.infoEncoder)), E(t, this.stringEncoder.toUint8Array()), E(t, C(this.parentInfoEncoder)), E(t, this.typeRefEncoder.toUint8Array()), E(t, this.lenEncoder.toUint8Array()),
|
|
2101
|
+
const t = N();
|
|
2102
|
+
return m(t, 0), E(t, this.keyClockEncoder.toUint8Array()), E(t, this.clientEncoder.toUint8Array()), E(t, this.leftClockEncoder.toUint8Array()), E(t, this.rightClockEncoder.toUint8Array()), E(t, C(this.infoEncoder)), E(t, this.stringEncoder.toUint8Array()), E(t, C(this.parentInfoEncoder)), E(t, this.typeRefEncoder.toUint8Array()), E(t, this.lenEncoder.toUint8Array()), Ne(t, C(this.restEncoder)), C(t);
|
|
2103
2103
|
}
|
|
2104
2104
|
/**
|
|
2105
2105
|
* @param {ID} id
|
|
@@ -2217,7 +2217,7 @@ const Cc = (e, t, n, s) => {
|
|
|
2217
2217
|
n.set(c, { i: 0, refs: o });
|
|
2218
2218
|
for (let a = 0; a < i; a++) {
|
|
2219
2219
|
const h = e.readInfo();
|
|
2220
|
-
switch (
|
|
2220
|
+
switch (ve & h) {
|
|
2221
2221
|
case 0: {
|
|
2222
2222
|
const d = e.readLen();
|
|
2223
2223
|
o[a] = new F(k(c, l), d), l += d;
|
|
@@ -2387,16 +2387,16 @@ const Cc = (e, t, n, s) => {
|
|
|
2387
2387
|
return Ce(r);
|
|
2388
2388
|
}
|
|
2389
2389
|
return r[0];
|
|
2390
|
-
}, Oc = (e, t) => Lc(e, t, new ne()),
|
|
2390
|
+
}, Oc = (e, t) => Lc(e, t, new ne()), vc = (e) => {
|
|
2391
2391
|
const t = /* @__PURE__ */ new Map(), n = b(e.restDecoder);
|
|
2392
2392
|
for (let s = 0; s < n; s++) {
|
|
2393
2393
|
const r = b(e.restDecoder), i = b(e.restDecoder);
|
|
2394
2394
|
t.set(r, i);
|
|
2395
2395
|
}
|
|
2396
2396
|
return t;
|
|
2397
|
-
}, _r = (e) =>
|
|
2397
|
+
}, _r = (e) => vc(new wr(lt(e))), Sr = (e, t) => (m(e.restEncoder, t.size), q(t.entries()).sort((n, s) => s[0] - n[0]).forEach(([n, s]) => {
|
|
2398
2398
|
m(e.restEncoder, n), m(e.restEncoder, s);
|
|
2399
|
-
}), e),
|
|
2399
|
+
}), e), Nc = (e, t) => Sr(e, ze(t.store)), Mc = (e, t = new br()) => (e instanceof Map ? Sr(t, e) : Nc(t, e), t.toUint8Array()), Uc = (e) => Mc(e, new yr());
|
|
2400
2400
|
class Rc {
|
|
2401
2401
|
constructor() {
|
|
2402
2402
|
this.l = [];
|
|
@@ -2432,7 +2432,7 @@ const ce = (e, t) => e === t || e !== null && t !== null && e.client === t.clien
|
|
|
2432
2432
|
const n = K(e.meta, gn, it), s = e.doc.store;
|
|
2433
2433
|
n.has(t) || (t.sv.forEach((r, i) => {
|
|
2434
2434
|
r < A(s, i) && R(e, k(i, r));
|
|
2435
|
-
}),
|
|
2435
|
+
}), Nt(e, t.ds, (r) => {
|
|
2436
2436
|
}), n.add(t));
|
|
2437
2437
|
};
|
|
2438
2438
|
class Er {
|
|
@@ -2647,7 +2647,7 @@ class zc {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
2649
|
const bs = (e, t, n) => {
|
|
2650
|
-
|
|
2650
|
+
Nt(e, n.deletions, (s) => {
|
|
2651
2651
|
s instanceof S && t.scope.some((r) => r === e.doc || Se(
|
|
2652
2652
|
/** @type {AbstractType<any>} */
|
|
2653
2653
|
r,
|
|
@@ -2664,7 +2664,7 @@ const bs = (e, t, n) => {
|
|
|
2664
2664
|
t.pop()
|
|
2665
2665
|
), h = /* @__PURE__ */ new Set(), d = [];
|
|
2666
2666
|
let u = !1;
|
|
2667
|
-
|
|
2667
|
+
Nt(c, a.insertions, (f) => {
|
|
2668
2668
|
if (f instanceof S) {
|
|
2669
2669
|
if (f.redone !== null) {
|
|
2670
2670
|
let { item: g, diff: w } = $l(l, f.id);
|
|
@@ -2677,7 +2677,7 @@ const bs = (e, t, n) => {
|
|
|
2677
2677
|
f
|
|
2678
2678
|
)) && d.push(f);
|
|
2679
2679
|
}
|
|
2680
|
-
}),
|
|
2680
|
+
}), Nt(c, a.deletions, (f) => {
|
|
2681
2681
|
f instanceof S && i.some((g) => g === c.doc || Se(
|
|
2682
2682
|
/** @type {AbstractType<any>} */
|
|
2683
2683
|
g,
|
|
@@ -2740,7 +2740,7 @@ class Yc extends Sn {
|
|
|
2740
2740
|
p.deletions = fn([p.deletions, l.deleteSet]), p.insertions = fn([p.insertions, u]);
|
|
2741
2741
|
} else
|
|
2742
2742
|
d.push(new zc(l.deleteSet, u)), g = !0;
|
|
2743
|
-
!a && !h && (this.lastChange = f),
|
|
2743
|
+
!a && !h && (this.lastChange = f), Nt(
|
|
2744
2744
|
l,
|
|
2745
2745
|
l.deleteSet,
|
|
2746
2746
|
/** @param {Item|GC} item */
|
|
@@ -2867,7 +2867,7 @@ function* Gc(e) {
|
|
|
2867
2867
|
if (c === 10) {
|
|
2868
2868
|
const l = b(e.restDecoder);
|
|
2869
2869
|
yield new V(k(r, i), l), i += l;
|
|
2870
|
-
} else if ((
|
|
2870
|
+
} else if ((ve & c) !== 0) {
|
|
2871
2871
|
const l = (c & (X | B)) === 0, a = new S(
|
|
2872
2872
|
k(r, i),
|
|
2873
2873
|
null,
|
|
@@ -3021,7 +3021,7 @@ const Pc = (e) => Ce(e, mr, ne), Jc = (e, t) => {
|
|
|
3021
3021
|
const a = Bn(c);
|
|
3022
3022
|
return Ft(i, a), i.toUint8Array();
|
|
3023
3023
|
}, xr = (e) => {
|
|
3024
|
-
e.written > 0 && (e.clientStructs.push({ written: e.written, restEncoder: C(e.encoder.restEncoder) }), e.encoder.restEncoder =
|
|
3024
|
+
e.written > 0 && (e.clientStructs.push({ written: e.written, restEncoder: C(e.encoder.restEncoder) }), e.encoder.restEncoder = N(), e.written = 0);
|
|
3025
3025
|
}, nt = (e, t, n) => {
|
|
3026
3026
|
e.written > 0 && e.currClient !== t.id.client && xr(e), e.written === 0 && (e.currClient = t.id.client, e.encoder.writeClient(t.id.client), m(e.encoder.restEncoder, t.id.clock + n)), t.write(e.encoder, n), e.written++;
|
|
3027
3027
|
}, Hn = (e) => {
|
|
@@ -3030,7 +3030,7 @@ const Pc = (e) => Ce(e, mr, ne), Jc = (e, t) => {
|
|
|
3030
3030
|
m(t, e.clientStructs.length);
|
|
3031
3031
|
for (let n = 0; n < e.clientStructs.length; n++) {
|
|
3032
3032
|
const s = e.clientStructs[n];
|
|
3033
|
-
m(t, s.written),
|
|
3033
|
+
m(t, s.written), Ne(t, s.restEncoder);
|
|
3034
3034
|
}
|
|
3035
3035
|
}, Wc = (e, t, n, s) => {
|
|
3036
3036
|
const r = new n(lt(e)), i = new Vn(r, !1), o = new s(), c = new jn(o);
|
|
@@ -3383,7 +3383,7 @@ const Or = (e, t, n) => {
|
|
|
3383
3383
|
i = i.right;
|
|
3384
3384
|
}
|
|
3385
3385
|
return r;
|
|
3386
|
-
},
|
|
3386
|
+
}, vr = (e) => {
|
|
3387
3387
|
var s;
|
|
3388
3388
|
(s = e.doc) != null || M();
|
|
3389
3389
|
const t = [];
|
|
@@ -3408,7 +3408,7 @@ const Or = (e, t, n) => {
|
|
|
3408
3408
|
}
|
|
3409
3409
|
s = s.right;
|
|
3410
3410
|
}
|
|
3411
|
-
},
|
|
3411
|
+
}, Nr = (e, t) => {
|
|
3412
3412
|
const n = [];
|
|
3413
3413
|
return qt(e, (s, r) => {
|
|
3414
3414
|
n.push(t(s, r, e));
|
|
@@ -3745,7 +3745,7 @@ class xt extends I {
|
|
|
3745
3745
|
* @return {Array<T>}
|
|
3746
3746
|
*/
|
|
3747
3747
|
toArray() {
|
|
3748
|
-
return
|
|
3748
|
+
return vr(this);
|
|
3749
3749
|
}
|
|
3750
3750
|
/**
|
|
3751
3751
|
* Returns a portion of this YArray into a JavaScript Array selected
|
|
@@ -3776,7 +3776,7 @@ class xt extends I {
|
|
|
3776
3776
|
* callback function
|
|
3777
3777
|
*/
|
|
3778
3778
|
map(t) {
|
|
3779
|
-
return
|
|
3779
|
+
return Nr(
|
|
3780
3780
|
this,
|
|
3781
3781
|
/** @type {any} */
|
|
3782
3782
|
t
|
|
@@ -4240,7 +4240,7 @@ const Ss = (e, t, n) => {
|
|
|
4240
4240
|
);
|
|
4241
4241
|
}
|
|
4242
4242
|
_(n, (s) => {
|
|
4243
|
-
|
|
4243
|
+
Nt(e, e.deleteSet, (r) => {
|
|
4244
4244
|
if (r instanceof F || !/** @type {YText} */
|
|
4245
4245
|
r.parent._hasFormatting || t.has(
|
|
4246
4246
|
/** @type {YText} */
|
|
@@ -4873,7 +4873,7 @@ class ft extends I {
|
|
|
4873
4873
|
* @return {string} The string representation of all children.
|
|
4874
4874
|
*/
|
|
4875
4875
|
toString() {
|
|
4876
|
-
return
|
|
4876
|
+
return Nr(this, (t) => t.toString()).join("");
|
|
4877
4877
|
}
|
|
4878
4878
|
/**
|
|
4879
4879
|
* @return {string}
|
|
@@ -4960,7 +4960,7 @@ class ft extends I {
|
|
|
4960
4960
|
* @return {Array<YXmlElement|YXmlText|YXmlHook>}
|
|
4961
4961
|
*/
|
|
4962
4962
|
toArray() {
|
|
4963
|
-
return
|
|
4963
|
+
return vr(this);
|
|
4964
4964
|
}
|
|
4965
4965
|
/**
|
|
4966
4966
|
* Appends content to this YArray.
|
|
@@ -5015,7 +5015,7 @@ class ft extends I {
|
|
|
5015
5015
|
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
|
|
5016
5016
|
*/
|
|
5017
5017
|
_write(t) {
|
|
5018
|
-
t.writeTypeRef(
|
|
5018
|
+
t.writeTypeRef(Nl);
|
|
5019
5019
|
}
|
|
5020
5020
|
}
|
|
5021
5021
|
const fl = (e) => new ft();
|
|
@@ -5213,7 +5213,7 @@ class Q extends ft {
|
|
|
5213
5213
|
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to.
|
|
5214
5214
|
*/
|
|
5215
5215
|
_write(t) {
|
|
5216
|
-
t.writeTypeRef(
|
|
5216
|
+
t.writeTypeRef(vl), t.writeKey(this.nodeName);
|
|
5217
5217
|
}
|
|
5218
5218
|
}
|
|
5219
5219
|
const gl = (e) => new Q(e.readKey());
|
|
@@ -6117,7 +6117,7 @@ const Tl = (e) => new J(e.readString()), xl = [
|
|
|
6117
6117
|
fl,
|
|
6118
6118
|
wl,
|
|
6119
6119
|
ml
|
|
6120
|
-
], Il = 0, Ll = 1, Ol = 2,
|
|
6120
|
+
], Il = 0, Ll = 1, Ol = 2, vl = 3, Nl = 4, Ml = 5, Ul = 6;
|
|
6121
6121
|
class et {
|
|
6122
6122
|
/**
|
|
6123
6123
|
* @param {AbstractType<any>} type
|
|
@@ -6515,7 +6515,7 @@ class S extends Pn {
|
|
|
6515
6515
|
* @param {number} offset
|
|
6516
6516
|
*/
|
|
6517
6517
|
write(t, n) {
|
|
6518
|
-
const s = n > 0 ? k(this.id.client, this.id.clock + n - 1) : this.origin, r = this.rightOrigin, i = this.parentSub, o = this.content.getRef() &
|
|
6518
|
+
const s = n > 0 ? k(this.id.client, this.id.clock + n - 1) : this.origin, r = this.rightOrigin, i = this.parentSub, o = this.content.getRef() & ve | (s === null ? 0 : B) | // origin is defined
|
|
6519
6519
|
(r === null ? 0 : X) | // right origin is defined
|
|
6520
6520
|
(i === null ? 0 : zt);
|
|
6521
6521
|
if (t.writeInfo(o), s !== null && t.writeLeftID(s), r !== null && t.writeRightID(r), s === null && r === null) {
|
|
@@ -6536,7 +6536,7 @@ class S extends Pn {
|
|
|
6536
6536
|
this.content.write(t, n);
|
|
6537
6537
|
}
|
|
6538
6538
|
}
|
|
6539
|
-
const Pr = (e, t) => Bl[t &
|
|
6539
|
+
const Pr = (e, t) => Bl[t & ve](e), Bl = [
|
|
6540
6540
|
() => {
|
|
6541
6541
|
j();
|
|
6542
6542
|
},
|
|
@@ -6642,9 +6642,9 @@ const jl = typeof BroadcastChannel == "undefined" ? Vl : BroadcastChannel, Kn =
|
|
|
6642
6642
|
E(e, n);
|
|
6643
6643
|
}, Qr = (e, t, n) => {
|
|
6644
6644
|
m(e, Wn), E(e, Oc(t, n));
|
|
6645
|
-
}, Yl = (e, t, n) => Qr(t, n,
|
|
6645
|
+
}, Yl = (e, t, n) => Qr(t, n, v(e)), Zr = (e, t, n, s) => {
|
|
6646
6646
|
try {
|
|
6647
|
-
xc(t,
|
|
6647
|
+
xc(t, v(e), n);
|
|
6648
6648
|
} catch (r) {
|
|
6649
6649
|
s != null && s(
|
|
6650
6650
|
/** @type {Error} */
|
|
@@ -6749,7 +6749,7 @@ const Xn = (e, t, n) => {
|
|
|
6749
6749
|
}
|
|
6750
6750
|
s.length > 0 && (e.emit("change", [{ added: [], updated: [], removed: s }, n]), e.emit("update", [{ added: [], updated: [], removed: s }, n]));
|
|
6751
6751
|
}, Ht = (e, t, n = e.states) => {
|
|
6752
|
-
const s = t.length, r =
|
|
6752
|
+
const s = t.length, r = N();
|
|
6753
6753
|
m(r, s);
|
|
6754
6754
|
for (let i = 0; i < s; i++) {
|
|
6755
6755
|
const o = t[i], c = n.get(o) || null, l = (
|
|
@@ -6802,7 +6802,7 @@ ie[ti] = (e, t, n, s, r) => {
|
|
|
6802
6802
|
ie[It] = (e, t, n, s, r) => {
|
|
6803
6803
|
ql(
|
|
6804
6804
|
n.awareness,
|
|
6805
|
-
|
|
6805
|
+
v(t),
|
|
6806
6806
|
n
|
|
6807
6807
|
);
|
|
6808
6808
|
};
|
|
@@ -6815,7 +6815,7 @@ ie[Zl] = (e, t, n, s, r) => {
|
|
|
6815
6815
|
};
|
|
6816
6816
|
const As = 3e4, ta = (e, t) => console.warn(`Permission denied to access ${e.url}.
|
|
6817
6817
|
${t}`), ei = (e, t, n) => {
|
|
6818
|
-
const s = lt(t), r =
|
|
6818
|
+
const s = lt(t), r = N(), i = b(s), o = e.messageHandlers[i];
|
|
6819
6819
|
return /** @type {any} */ o ? o(r, s, e, n, i) : console.error("Unable to compute message"), r;
|
|
6820
6820
|
}, yn = (e, t, n) => {
|
|
6821
6821
|
t === e.ws && (e.emit("connection-close", [n, e]), e.ws = null, t.close(), e.wsconnecting = !1, e.wsconnected ? (e.wsconnected = !1, e.synced = !1, Xn(
|
|
@@ -6849,9 +6849,9 @@ ${t}`), ei = (e, t, n) => {
|
|
|
6849
6849
|
e.wsLastMessageReceived = ot(), e.wsconnecting = !1, e.wsconnected = !0, e.wsUnsuccessfulReconnects = 0, e.emit("status", [{
|
|
6850
6850
|
status: "connected"
|
|
6851
6851
|
}]);
|
|
6852
|
-
const n =
|
|
6852
|
+
const n = N();
|
|
6853
6853
|
if (m(n, at), mn(n, e.doc), t.send(C(n)), e.awareness.getLocalState() !== null) {
|
|
6854
|
-
const s =
|
|
6854
|
+
const s = N();
|
|
6855
6855
|
m(s, It), E(
|
|
6856
6856
|
s,
|
|
6857
6857
|
Ht(e.awareness, [
|
|
@@ -6897,7 +6897,7 @@ class ea extends Sn {
|
|
|
6897
6897
|
this.serverUrl = t, this.bcChannel = t + "/" + n, this.maxBackoffTime = h, this.params = o, this.protocols = c, this.roomname = n, this.doc = s, this._WS = l, this.awareness = i, this.wsconnected = !1, this.wsconnecting = !1, this.bcconnected = !1, this.disableBc = d, this.wsUnsuccessfulReconnects = 0, this.messageHandlers = ie.slice(), this._synced = !1, this.ws = null, this.wsLastMessageReceived = 0, this.shouldConnect = r, this._resyncInterval = 0, a > 0 && (this._resyncInterval = /** @type {any} */
|
|
6898
6898
|
setInterval(() => {
|
|
6899
6899
|
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
6900
|
-
const u =
|
|
6900
|
+
const u = N();
|
|
6901
6901
|
m(u, at), mn(u, s), this.ws.send(C(u));
|
|
6902
6902
|
}
|
|
6903
6903
|
}, a)), this._bcSubscriber = (u, f) => {
|
|
@@ -6907,11 +6907,11 @@ class ea extends Sn {
|
|
|
6907
6907
|
}
|
|
6908
6908
|
}, this._updateHandler = (u, f) => {
|
|
6909
6909
|
if (f !== this) {
|
|
6910
|
-
const g =
|
|
6910
|
+
const g = N();
|
|
6911
6911
|
m(g, at), Gl(g, u), rn(this, C(g));
|
|
6912
6912
|
}
|
|
6913
6913
|
}, this.doc.on("update", this._updateHandler), this._awarenessUpdateHandler = ({ added: u, updated: f, removed: g }, w) => {
|
|
6914
|
-
const p = u.concat(f).concat(g), y =
|
|
6914
|
+
const p = u.concat(f).concat(g), y = N();
|
|
6915
6915
|
m(y, It), E(
|
|
6916
6916
|
y,
|
|
6917
6917
|
Ht(i, p)
|
|
@@ -6952,17 +6952,17 @@ class ea extends Sn {
|
|
|
6952
6952
|
if (this.disableBc)
|
|
6953
6953
|
return;
|
|
6954
6954
|
this.bcconnected || (Hl(this.bcChannel, this._bcSubscriber), this.bcconnected = !0);
|
|
6955
|
-
const t =
|
|
6955
|
+
const t = N();
|
|
6956
6956
|
m(t, at), mn(t, this.doc), Ct(this.bcChannel, C(t), this);
|
|
6957
|
-
const n =
|
|
6957
|
+
const n = N();
|
|
6958
6958
|
m(n, at), Qr(n, this.doc), Ct(this.bcChannel, C(n), this);
|
|
6959
|
-
const s =
|
|
6959
|
+
const s = N();
|
|
6960
6960
|
m(s, ti), Ct(
|
|
6961
6961
|
this.bcChannel,
|
|
6962
6962
|
C(s),
|
|
6963
6963
|
this
|
|
6964
6964
|
);
|
|
6965
|
-
const r =
|
|
6965
|
+
const r = N();
|
|
6966
6966
|
m(r, It), E(
|
|
6967
6967
|
r,
|
|
6968
6968
|
Ht(this.awareness, [
|
|
@@ -6975,7 +6975,7 @@ class ea extends Sn {
|
|
|
6975
6975
|
);
|
|
6976
6976
|
}
|
|
6977
6977
|
disconnectBc() {
|
|
6978
|
-
const t =
|
|
6978
|
+
const t = N();
|
|
6979
6979
|
m(t, It), E(
|
|
6980
6980
|
t,
|
|
6981
6981
|
Ht(this.awareness, [
|
|
@@ -7195,7 +7195,7 @@ class ma {
|
|
|
7195
7195
|
applyRemoteToDom() {
|
|
7196
7196
|
if (this.destroyed) return;
|
|
7197
7197
|
const t = this.captureSelection();
|
|
7198
|
-
this.observer.disconnect();
|
|
7198
|
+
this.observer.disconnect(), this.root.dispatchEvent(new CustomEvent("provenance:expect", { detail: { kind: "collaborator", timeoutMs: 1e3 }, bubbles: !0 }));
|
|
7199
7199
|
try {
|
|
7200
7200
|
hi(this.root, this.fragment, this.root.ownerDocument), this.root.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 }));
|
|
7201
7201
|
} finally {
|
|
@@ -7413,13 +7413,13 @@ class Sa {
|
|
|
7413
7413
|
}
|
|
7414
7414
|
}
|
|
7415
7415
|
const Ca = "editora-content", di = "wss://demos.yjs.dev", Ea = "editora-default-room", Os = ["#f97316", "#0ea5e9", "#22c55e", "#a855f7", "#ec4899", "#eab308", "#14b8a6", "#ef4444"], pt = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new Set(), wt = /* @__PURE__ */ new Set(), Le = /* @__PURE__ */ new Map();
|
|
7416
|
-
let
|
|
7416
|
+
let vs = !1;
|
|
7417
7417
|
function Da(e) {
|
|
7418
|
-
|
|
7418
|
+
vs || (vs = !0, console.warn(
|
|
7419
7419
|
`[@editora/collaboration] No websocketUrl was provided, so room "${e}" is syncing through the public demo server (${di}); anyone who knows the room name can read and edit this document. Pass your own y-websocket server via the websocketUrl option (or a provider) for real use.`
|
|
7420
7420
|
));
|
|
7421
7421
|
}
|
|
7422
|
-
function
|
|
7422
|
+
function Ns() {
|
|
7423
7423
|
const e = Math.floor(Math.random() * 1e4);
|
|
7424
7424
|
return {
|
|
7425
7425
|
name: `Guest ${e}`,
|
|
@@ -7444,7 +7444,7 @@ function gi() {
|
|
|
7444
7444
|
for (const t of e) {
|
|
7445
7445
|
const n = Et.find((s) => !s.claimed);
|
|
7446
7446
|
if (!n) break;
|
|
7447
|
-
n.claimed = !0,
|
|
7447
|
+
n.claimed = !0, Na(t, n.options);
|
|
7448
7448
|
}
|
|
7449
7449
|
for (; Et.length && Et[0].claimed; ) Et.shift();
|
|
7450
7450
|
}
|
|
@@ -7496,7 +7496,7 @@ function Oa() {
|
|
|
7496
7496
|
}
|
|
7497
7497
|
`, document.head.appendChild(t);
|
|
7498
7498
|
}
|
|
7499
|
-
function
|
|
7499
|
+
function va() {
|
|
7500
7500
|
Oa();
|
|
7501
7501
|
const e = document.createElement("div");
|
|
7502
7502
|
e.className = "editora-collab-presence";
|
|
@@ -7518,16 +7518,16 @@ function pe(e, t, n) {
|
|
|
7518
7518
|
a.className = "editora-collab-presence__avatar", a.style.backgroundColor = l.color, a.title = l.name, a.textContent = Array.from(l.name)[0].toUpperCase(), r.appendChild(a);
|
|
7519
7519
|
});
|
|
7520
7520
|
}
|
|
7521
|
-
function
|
|
7521
|
+
function Na(e, t) {
|
|
7522
7522
|
var u, f, g, w, p, y, O;
|
|
7523
7523
|
if (pt.has(e) || wt.has(e)) return;
|
|
7524
7524
|
wt.add(e);
|
|
7525
7525
|
const n = (g = (f = t.doc) != null ? f : (u = t.provider) == null ? void 0 : u.doc) != null ? g : new yt(), s = !t.doc && !t.provider, r = typeof t.roomName == "function" ? t.roomName(e) : t.roomName || e.id || Ea, i = !t.provider;
|
|
7526
7526
|
i && !t.websocketUrl && Da(r);
|
|
7527
7527
|
const o = (p = t.provider) != null ? p : new ea((w = t.websocketUrl) != null ? w : di, r, n), c = {
|
|
7528
|
-
name: (y = t.userName) != null ? y :
|
|
7529
|
-
color: (O = t.userColor) != null ? O :
|
|
7530
|
-
}, l =
|
|
7528
|
+
name: (y = t.userName) != null ? y : Ns().name,
|
|
7529
|
+
color: (O = t.userColor) != null ? O : Ns().color
|
|
7530
|
+
}, l = va();
|
|
7531
7531
|
e.insertAdjacentElement("beforebegin", l), pe(l, "connecting", o.awareness);
|
|
7532
7532
|
const a = ({ status: kt }) => pe(l, kt, o.awareness), h = () => pe(l, o.wsconnected ? "connected" : "connecting", o.awareness);
|
|
7533
7533
|
o.on("status", a), o.awareness.on("change", h);
|
|
@@ -7576,4 +7576,4 @@ const $a = (e = {}) => {
|
|
|
7576
7576
|
export {
|
|
7577
7577
|
$a as CollaborationPlugin
|
|
7578
7578
|
};
|
|
7579
|
-
//# sourceMappingURL=CollaborationPlugin.native-
|
|
7579
|
+
//# sourceMappingURL=CollaborationPlugin.native-B2AsCMfm.mjs.map
|
package/dist/core.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rte-table-wrapper{position:relative}.rte-table
|
|
1
|
+
.rte-table-wrapper{position:relative}.rte-table,:where(.rte-content,.editora-content) table{border-collapse:collapse;width:100%;margin:1rem 0;border:1px solid #ddd;font-size:14px;line-height:1.4;position:relative}.rte-table td,.rte-table th,:where(.rte-content,.editora-content) table td,:where(.rte-content,.editora-content) table th{border:1px solid #ddd;padding:8px 12px;min-width:80px;vertical-align:top;position:relative}.rte-table td:focus,.rte-table th:focus,:where(.rte-content,.editora-content) table td:focus,:where(.rte-content,.editora-content) table th:focus{outline:2px solid #007acc;outline-offset:-2px}.rte-table th,:where(.rte-content,.editora-content) table th{background-color:#f8f9fa;font-weight:600;text-align:left}.rte-table td p,:where(.rte-content,.editora-content) table td p{margin:0;padding:0}.rte-table td p:empty:before,:where(.rte-content,.editora-content) table td p:empty:before{content:"";display:inline-block}.rte-table td[contenteditable]:empty:before,:where(.rte-content,.editora-content) table td[contenteditable]:empty:before{content:"Type here...";color:#999;font-style:italic;pointer-events:none}.rte-table tr:hover,:where(.rte-content,.editora-content) table tr:hover{background-color:#f8f9fa}.rte-table td.selected,:where(.rte-content,.editora-content) table td.selected{background-color:#e3f2fd;border-color:#2196f3}.table-toolbar{background:#fff;border:1px solid #d0d0d0;border-radius:4px;box-shadow:0 2px 8px #0000001a;padding:4px;display:flex;align-items:center;gap:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;min-width:max-content}.toolbar-section{display:flex;align-items:center;gap:2px}.toolbar-divider{width:1px;height:20px;background:#e0e0e0;margin:0 4px}.toolbar-icon-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid transparent;background:transparent;cursor:pointer;color:#333;border-radius:3px;transition:all .2s ease;flex-shrink:0;font-size:14px;line-height:1}.toolbar-icon-btn svg{width:16px;height:16px}.toolbar-icon-btn:hover:not(:disabled){background:#f0f0f0;border-color:#d0d0d0;color:#06c}.toolbar-icon-btn:active:not(:disabled){background:#e8f0ff;border-color:#06c;transform:scale(.95)}.toolbar-icon-btn:disabled{opacity:.4;cursor:not-allowed;color:#ccc}.toolbar-icon-btn-danger{color:#d32f2f}.toolbar-icon-btn-danger:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-danger:active:not(:disabled){background:#ffebee}.toolbar-icon-btn-delete{color:#d32f2f}.toolbar-icon-btn-delete:hover:not(:disabled){background:#fff3f3;border-color:#fcc;color:#d32f2f}.toolbar-icon-btn-delete:active:not(:disabled){background:#ffebee}.resize-handle{opacity:0;transition:all .15s ease}.resize-handle:hover{opacity:1}td:hover>.resize-handle,th:hover>.resize-handle{opacity:1}.table-resize-handle{position:absolute;bottom:-4px;right:-4px;width:12px;height:12px;background:transparent;cursor:nwse-resize;z-index:10;transition:background .15s ease}.table-resize-handle:after{content:"";position:absolute;bottom:0;right:0;width:8px;height:8px;background:#0066cc4d;border-bottom:2px solid #0066cc;border-right:2px solid #0066cc;border-radius:0 0 2px;opacity:0;transition:opacity .15s ease}.table-resize-handle:hover:after{opacity:1}.rte-table:hover .table-resize-handle:after,:where(.rte-content,.editora-content) table:hover .table-resize-handle:after{opacity:1}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table,:where(.rte-content,.editora-content) table){border-color:#607088;background:#24303c;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td,.rte-table th,:where(.rte-content,.editora-content) table td,:where(.rte-content,.editora-content) table th){border-color:#607088;color:#e6eefb}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table th,:where(.rte-content,.editora-content) table th){background:linear-gradient(180deg,#3b4553,#333d4a);color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table tr:hover,:where(.rte-content,.editora-content) table tr:hover){background-color:#58a6ff1f}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td.selected,:where(.rte-content,.editora-content) table td.selected){background-color:#58a6ff47;border-color:#79beff}:is([data-theme=dark],.dark,.editora-theme-dark) :is(.rte-table td[contenteditable]:empty:before,:where(.rte-content,.editora-content) table td[contenteditable]:empty:before){color:#94a3b8}:is([data-theme=dark],.dark,.editora-theme-dark) .table-toolbar{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}.table-toolbar.rte-theme-dark{background:linear-gradient(180deg,#2f3844,#2a323c);border-color:#4d596b;box-shadow:0 8px 20px #00000073}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-divider{background:#4d596b}.table-toolbar.rte-theme-dark .toolbar-divider{background:#4d596b}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn{color:#d7deea;border-color:transparent}.table-toolbar.rte-theme-dark .toolbar-icon-btn{color:#d7deea;border-color:transparent}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg{color:currentColor}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg{color:currentColor}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [stroke=black i]{stroke:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill="#000000" i],:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill="#000000" i],.table-toolbar.rte-theme-dark .toolbar-icon-btn svg [fill=black i]{fill:currentColor!important}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}.table-toolbar.rte-theme-dark .toolbar-icon-btn:hover:not(:disabled){background:#3a4554;border-color:#607088;color:#f3f8ff}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}.table-toolbar.rte-theme-dark .toolbar-icon-btn:active:not(:disabled){background:#4a95de;border-color:#67adf4;color:#0f1b2a}:is([data-theme=dark],.dark,.editora-theme-dark) .toolbar-icon-btn:disabled{color:#7f8ca1}.table-toolbar.rte-theme-dark .toolbar-icon-btn:disabled{color:#7f8ca1}@media(max-width:768px){.rte-table,:where(.rte-content,.editora-content) table{font-size:12px}.rte-table td,.rte-table th,:where(.rte-content,.editora-content) table td,:where(.rte-content,.editora-content) table th{padding:4px 6px;min-width:60px}.table-toolbar{padding:3px;gap:0;max-width:90vw;overflow-x:auto}.toolbar-icon-btn{width:26px;height:26px}.toolbar-divider{height:18px}}@media print{.rte-table,:where(.rte-content,.editora-content) table{border:1px solid #000}.rte-table td,.rte-table th,:where(.rte-content,.editora-content) table td,:where(.rte-content,.editora-content) table th{border:1px solid #000;padding:4px}.table-toolbar{display:none}}
|