@bygga.dev/editor 1.9.10 → 1.9.11
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/README.md +4 -3
- package/{TextEditor-qRsQlXjR.js → TextEditor-DoE89_QB.js} +425 -419
- package/bygga-editor.js +1561 -1518
- package/element.d.ts +2 -0
- package/package.json +1 -1
- package/{urls-pzaQIbvA.js → urls-CkV6bAHz.js} +325 -313
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, K as u, L as d, M as f, O as p, P as m, Q as h, R as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, K as u, L as d, M as f, O as p, P as m, Q as h, R as ee, S as g, V as _, W as v, X as te, Y as ne, Z as y, _t as b, ct as x, dt as S, et as C, g as w, gt as re, j as T, k as E, mt as D, n as ie, nt as ae, o as oe, ot as se, pt as O, q as k, t as ce, ut as A, x as le } from "./providerKeys-ZUO3LJ3M.js";
|
|
2
|
+
import { $ as j, At as M, Bt as N, Cn as ue, Ct as de, D as P, Dn as fe, Dt as pe, E as me, En as he, Et as ge, F as _e, Fn as ve, Ft as F, It as I, Lt as ye, Mt as be, N as xe, Nn as Se, Nt as L, On as Ce, Ot as we, Pt as R, Rt as Te, Sn as Ee, St as De, Tn as Oe, Tt as z, _ as ke, _t as Ae, bt as je, c as Me, ct as Ne, d as Pe, et as B, gt as Fe, h as Ie, ht as Le, j as Re, jt as V, kn as ze, kt as Be, l as Ve, lt as He, m as Ue, mt as We, n as Ge, r as Ke, s as qe, t as Je, u as Ye, vt as Xe, w as Ze, wn as Qe, wt as $e, x as et, xt as H, y as tt, yt as nt, zt as U } from "./urls-CkV6bAHz.js";
|
|
3
3
|
//#region ../core/src/render/TextShell.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var rt = ["align"], it = /* @__PURE__ */ m({
|
|
5
5
|
__name: "TextShell",
|
|
6
6
|
props: {
|
|
7
7
|
width: { type: null },
|
|
@@ -9,26 +9,26 @@ var it = ["align"], at = /* @__PURE__ */ m({
|
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
11
|
let n = e;
|
|
12
|
-
return (e, r) => n.width === "fit" ? (
|
|
12
|
+
return (e, r) => n.width === "fit" ? (v(), t("div", {
|
|
13
13
|
key: 0,
|
|
14
|
-
style: re(O(
|
|
14
|
+
style: re(O(j)(n.align ?? "left"))
|
|
15
15
|
}, [i("table", {
|
|
16
16
|
align: n.align ?? "left",
|
|
17
17
|
cellpadding: "0",
|
|
18
18
|
cellspacing: "0",
|
|
19
19
|
role: "presentation",
|
|
20
|
-
style: re(O(
|
|
21
|
-
}, [i("tbody", null, [i("tr", null, [i("td", null, [k(e.$slots, "default")])])])], 12,
|
|
20
|
+
style: re(O(B)())
|
|
21
|
+
}, [i("tbody", null, [i("tr", null, [i("td", null, [k(e.$slots, "default")])])])], 12, rt)], 4)) : k(e.$slots, "default", { key: 1 });
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
|
|
26
|
-
function
|
|
27
|
-
return new
|
|
28
|
-
return new
|
|
26
|
+
function W(e = {}) {
|
|
27
|
+
return new L({ view(t) {
|
|
28
|
+
return new at(t, e);
|
|
29
29
|
} });
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var at = class {
|
|
32
32
|
constructor(e, t) {
|
|
33
33
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
|
|
34
34
|
"dragover",
|
|
@@ -104,7 +104,7 @@ var ot = class {
|
|
|
104
104
|
if (t && !i) {
|
|
105
105
|
let e = t.pos;
|
|
106
106
|
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
107
|
-
let t =
|
|
107
|
+
let t = Te(this.editorView.state.doc, e, this.editorView.dragging.slice);
|
|
108
108
|
t != null && (e = t);
|
|
109
109
|
}
|
|
110
110
|
this.setCursor(e), this.scheduleRemoval(5e3);
|
|
@@ -119,7 +119,7 @@ var ot = class {
|
|
|
119
119
|
dragleave(e) {
|
|
120
120
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, G = class e extends F {
|
|
123
123
|
constructor(e) {
|
|
124
124
|
super(e, e);
|
|
125
125
|
}
|
|
@@ -128,7 +128,7 @@ var ot = class {
|
|
|
128
128
|
return e.valid(r) ? new e(r) : F.near(r);
|
|
129
129
|
}
|
|
130
130
|
content() {
|
|
131
|
-
return
|
|
131
|
+
return N.empty;
|
|
132
132
|
}
|
|
133
133
|
eq(t) {
|
|
134
134
|
return t instanceof e && t.head == this.head;
|
|
@@ -144,11 +144,11 @@ var ot = class {
|
|
|
144
144
|
return new e(t.resolve(n.pos));
|
|
145
145
|
}
|
|
146
146
|
getBookmark() {
|
|
147
|
-
return new
|
|
147
|
+
return new K(this.anchor);
|
|
148
148
|
}
|
|
149
149
|
static valid(e) {
|
|
150
150
|
let t = e.parent;
|
|
151
|
-
if (t.inlineContent || !
|
|
151
|
+
if (t.inlineContent || !st(e) || !ct(e)) return !1;
|
|
152
152
|
let n = t.type.spec.allowGapCursor;
|
|
153
153
|
if (n != null) return n;
|
|
154
154
|
let r = t.contentMatchAt(e.index()).defaultType;
|
|
@@ -171,7 +171,7 @@ var ot = class {
|
|
|
171
171
|
for (;;) {
|
|
172
172
|
let o = n > 0 ? a.firstChild : a.lastChild;
|
|
173
173
|
if (!o) {
|
|
174
|
-
if (a.isAtom && !a.isText && !
|
|
174
|
+
if (a.isAtom && !a.isText && !be.isSelectable(a)) {
|
|
175
175
|
t = t.doc.resolve(i + a.nodeSize * n), r = !1;
|
|
176
176
|
continue search;
|
|
177
177
|
}
|
|
@@ -185,8 +185,8 @@ var ot = class {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
|
|
189
|
-
var
|
|
188
|
+
G.prototype.visible = !1, G.findFrom = G.findGapCursorFrom, F.jsonID("gapcursor", G);
|
|
189
|
+
var K = class e {
|
|
190
190
|
constructor(e) {
|
|
191
191
|
this.pos = e;
|
|
192
192
|
}
|
|
@@ -195,13 +195,13 @@ var G = class e {
|
|
|
195
195
|
}
|
|
196
196
|
resolve(e) {
|
|
197
197
|
let t = e.resolve(this.pos);
|
|
198
|
-
return
|
|
198
|
+
return G.valid(t) ? new G(t) : F.near(t);
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
function
|
|
201
|
+
function ot(e) {
|
|
202
202
|
return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function st(e) {
|
|
205
205
|
for (let t = e.depth; t >= 0; t--) {
|
|
206
206
|
let n = e.index(t), r = e.node(t);
|
|
207
207
|
if (n == 0) {
|
|
@@ -209,13 +209,13 @@ function ct(e) {
|
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
211
|
for (let e = r.child(n - 1);; e = e.lastChild) {
|
|
212
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
212
|
+
if (e.childCount == 0 && !e.inlineContent || ot(e.type)) return !0;
|
|
213
213
|
if (e.inlineContent) return !1;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
return !0;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function ct(e) {
|
|
219
219
|
for (let t = e.depth; t >= 0; t--) {
|
|
220
220
|
let n = e.indexAfter(t), r = e.node(t);
|
|
221
221
|
if (n == r.childCount) {
|
|
@@ -223,90 +223,90 @@ function lt(e) {
|
|
|
223
223
|
continue;
|
|
224
224
|
}
|
|
225
225
|
for (let e = r.child(n);; e = e.firstChild) {
|
|
226
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
226
|
+
if (e.childCount == 0 && !e.inlineContent || ot(e.type)) return !0;
|
|
227
227
|
if (e.inlineContent) return !1;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
return !0;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
return new
|
|
234
|
-
decorations:
|
|
232
|
+
function lt() {
|
|
233
|
+
return new L({ props: {
|
|
234
|
+
decorations: pt,
|
|
235
235
|
createSelectionBetween(e, t, n) {
|
|
236
|
-
return t.pos == n.pos &&
|
|
236
|
+
return t.pos == n.pos && G.valid(n) ? new G(n) : null;
|
|
237
237
|
},
|
|
238
|
-
handleClick:
|
|
239
|
-
handleKeyDown:
|
|
240
|
-
handleDOMEvents: { beforeinput:
|
|
238
|
+
handleClick: dt,
|
|
239
|
+
handleKeyDown: ut,
|
|
240
|
+
handleDOMEvents: { beforeinput: ft }
|
|
241
241
|
} });
|
|
242
242
|
}
|
|
243
|
-
var
|
|
244
|
-
ArrowLeft:
|
|
245
|
-
ArrowRight:
|
|
246
|
-
ArrowUp:
|
|
247
|
-
ArrowDown:
|
|
243
|
+
var ut = Be({
|
|
244
|
+
ArrowLeft: q("horiz", -1),
|
|
245
|
+
ArrowRight: q("horiz", 1),
|
|
246
|
+
ArrowUp: q("vert", -1),
|
|
247
|
+
ArrowDown: q("vert", 1)
|
|
248
248
|
});
|
|
249
|
-
function
|
|
249
|
+
function q(e, t) {
|
|
250
250
|
let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
|
|
251
251
|
return function(e, r, i) {
|
|
252
252
|
let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
|
|
253
|
-
if (a instanceof
|
|
253
|
+
if (a instanceof I) {
|
|
254
254
|
if (!i.endOfTextblock(n) || o.depth == 0) return !1;
|
|
255
255
|
s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
|
|
256
256
|
}
|
|
257
|
-
let c =
|
|
258
|
-
return c ? (r && r(e.tr.setSelection(new
|
|
257
|
+
let c = G.findGapCursorFrom(o, t, s);
|
|
258
|
+
return c ? (r && r(e.tr.setSelection(new G(c))), !0) : !1;
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function dt(e, t, n) {
|
|
262
262
|
if (!e || !e.editable) return !1;
|
|
263
263
|
let r = e.state.doc.resolve(t);
|
|
264
|
-
if (!
|
|
264
|
+
if (!G.valid(r)) return !1;
|
|
265
265
|
let i = e.posAtCoords({
|
|
266
266
|
left: n.clientX,
|
|
267
267
|
top: n.clientY
|
|
268
268
|
});
|
|
269
|
-
return i && i.inside > -1 &&
|
|
269
|
+
return i && i.inside > -1 && be.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new G(r))), !0);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof
|
|
271
|
+
function ft(e, t) {
|
|
272
|
+
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof G)) return !1;
|
|
273
273
|
let { $from: n } = e.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
|
|
274
274
|
if (!r) return !1;
|
|
275
|
-
let i =
|
|
276
|
-
for (let e = r.length - 1; e >= 0; e--) i =
|
|
277
|
-
let a = e.state.tr.replace(n.pos, n.pos, new
|
|
278
|
-
return a.setSelection(
|
|
275
|
+
let i = U.empty;
|
|
276
|
+
for (let e = r.length - 1; e >= 0; e--) i = U.from(r[e].createAndFill(null, i));
|
|
277
|
+
let a = e.state.tr.replace(n.pos, n.pos, new N(i, 0, 0));
|
|
278
|
+
return a.setSelection(I.near(a.doc.resolve(n.pos + 1))), e.dispatch(a), !1;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
if (!(e.selection instanceof
|
|
280
|
+
function pt(e) {
|
|
281
|
+
if (!(e.selection instanceof G)) return null;
|
|
282
282
|
let t = document.createElement("div");
|
|
283
|
-
return t.className = "ProseMirror-gapcursor",
|
|
283
|
+
return t.className = "ProseMirror-gapcursor", V.create(e.doc, [M.widget(e.selection.head, t, { key: "gapcursor" })]);
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region ../../node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js
|
|
287
|
-
var
|
|
288
|
-
|
|
289
|
-
return e.length ? (e =
|
|
290
|
-
},
|
|
291
|
-
return e.length ?
|
|
292
|
-
},
|
|
293
|
-
return new
|
|
294
|
-
},
|
|
295
|
-
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ?
|
|
296
|
-
},
|
|
287
|
+
var mt = 200, J = function() {};
|
|
288
|
+
J.prototype.append = function(e) {
|
|
289
|
+
return e.length ? (e = J.from(e), !this.length && e || e.length < mt && this.leafAppend(e) || this.length < mt && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
290
|
+
}, J.prototype.prepend = function(e) {
|
|
291
|
+
return e.length ? J.from(e).append(this) : this;
|
|
292
|
+
}, J.prototype.appendInner = function(e) {
|
|
293
|
+
return new gt(this, e);
|
|
294
|
+
}, J.prototype.slice = function(e, t) {
|
|
295
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? J.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
296
|
+
}, J.prototype.get = function(e) {
|
|
297
297
|
if (!(e < 0 || e >= this.length)) return this.getInner(e);
|
|
298
|
-
},
|
|
298
|
+
}, J.prototype.forEach = function(e, t, n) {
|
|
299
299
|
t === void 0 && (t = 0), n === void 0 && (n = this.length), t <= n ? this.forEachInner(e, t, n, 0) : this.forEachInvertedInner(e, t, n, 0);
|
|
300
|
-
},
|
|
300
|
+
}, J.prototype.map = function(e, t, n) {
|
|
301
301
|
t === void 0 && (t = 0), n === void 0 && (n = this.length);
|
|
302
302
|
var r = [];
|
|
303
303
|
return this.forEach(function(t, n) {
|
|
304
304
|
return r.push(e(t, n));
|
|
305
305
|
}, t, n), r;
|
|
306
|
-
},
|
|
307
|
-
return e instanceof
|
|
306
|
+
}, J.from = function(e) {
|
|
307
|
+
return e instanceof J ? e : e && e.length ? new ht(e) : J.empty;
|
|
308
308
|
};
|
|
309
|
-
var
|
|
309
|
+
var ht = /* @__PURE__ */ function(e) {
|
|
310
310
|
function t(t) {
|
|
311
311
|
e.call(this), this.values = t;
|
|
312
312
|
}
|
|
@@ -326,17 +326,17 @@ var gt = /* @__PURE__ */ function(e) {
|
|
|
326
326
|
}, t.prototype.forEachInvertedInner = function(e, t, n, r) {
|
|
327
327
|
for (var i = t - 1; i >= n; i--) if (e(this.values[i], r + i) === !1) return !1;
|
|
328
328
|
}, t.prototype.leafAppend = function(e) {
|
|
329
|
-
if (this.length + e.length <=
|
|
329
|
+
if (this.length + e.length <= mt) return new t(this.values.concat(e.flatten()));
|
|
330
330
|
}, t.prototype.leafPrepend = function(e) {
|
|
331
|
-
if (this.length + e.length <=
|
|
331
|
+
if (this.length + e.length <= mt) return new t(e.flatten().concat(this.values));
|
|
332
332
|
}, n.length.get = function() {
|
|
333
333
|
return this.values.length;
|
|
334
334
|
}, n.depth.get = function() {
|
|
335
335
|
return 0;
|
|
336
336
|
}, Object.defineProperties(t.prototype, n), t;
|
|
337
|
-
}(
|
|
338
|
-
|
|
339
|
-
var
|
|
337
|
+
}(J);
|
|
338
|
+
J.empty = new ht([]);
|
|
339
|
+
var gt = /* @__PURE__ */ function(e) {
|
|
340
340
|
function t(t, n) {
|
|
341
341
|
e.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
|
|
342
342
|
}
|
|
@@ -363,7 +363,7 @@ var _t = /* @__PURE__ */ function(e) {
|
|
|
363
363
|
}, t.prototype.appendInner = function(e) {
|
|
364
364
|
return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
|
|
365
365
|
}, t;
|
|
366
|
-
}(
|
|
366
|
+
}(J), Y = 500, X = class e {
|
|
367
367
|
constructor(e, t) {
|
|
368
368
|
this.items = e, this.eventCount = t;
|
|
369
369
|
}
|
|
@@ -383,9 +383,9 @@ var _t = /* @__PURE__ */ function(e) {
|
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
385
385
|
if (i) {
|
|
386
|
-
u.push(new
|
|
386
|
+
u.push(new Z(t.map));
|
|
387
387
|
let e = t.step.map(i.slice(a)), n;
|
|
388
|
-
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new
|
|
388
|
+
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new Z(n, void 0, void 0, l.length + u.length))), a--, n && i.appendMap(n, a);
|
|
389
389
|
} else o.maybeStep(t.step);
|
|
390
390
|
if (t.selection) return s = i ? t.selection.map(i.slice(a)) : t.selection, c = new e(this.items.slice(0, r).append(u.reverse().concat(l)), this.eventCount - 1), !1;
|
|
391
391
|
}, this.items.length, 0), {
|
|
@@ -397,21 +397,21 @@ var _t = /* @__PURE__ */ function(e) {
|
|
|
397
397
|
addTransform(t, n, r, i) {
|
|
398
398
|
let a = [], o = this.eventCount, s = this.items, c = !i && s.length ? s.get(s.length - 1) : null;
|
|
399
399
|
for (let e = 0; e < t.steps.length; e++) {
|
|
400
|
-
let r = t.steps[e].invert(t.docs[e]), l = new
|
|
400
|
+
let r = t.steps[e].invert(t.docs[e]), l = new Z(t.mapping.maps[e], r, n), u;
|
|
401
401
|
(u = c && c.merge(l)) && (l = u, e ? a.pop() : s = s.slice(0, s.length - 1)), a.push(l), n &&= (o++, void 0), i || (c = l);
|
|
402
402
|
}
|
|
403
403
|
let l = o - r.depth;
|
|
404
|
-
return l >
|
|
404
|
+
return l > vt && (s = _t(s, l), o -= l), new e(s.append(a), o);
|
|
405
405
|
}
|
|
406
406
|
remapping(e, t) {
|
|
407
|
-
let n = new
|
|
407
|
+
let n = new ye();
|
|
408
408
|
return this.items.forEach((t, r) => {
|
|
409
409
|
let i = t.mirrorOffset != null && r - t.mirrorOffset >= e ? n.maps.length - t.mirrorOffset : void 0;
|
|
410
410
|
n.appendMap(t.map, i);
|
|
411
411
|
}, e, t), n;
|
|
412
412
|
}
|
|
413
413
|
addMaps(t) {
|
|
414
|
-
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new
|
|
414
|
+
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new Z(e))), this.eventCount);
|
|
415
415
|
}
|
|
416
416
|
rebased(t, n) {
|
|
417
417
|
if (!this.eventCount) return this;
|
|
@@ -427,13 +427,13 @@ var _t = /* @__PURE__ */ function(e) {
|
|
|
427
427
|
let i = a.maps[n];
|
|
428
428
|
if (e.step) {
|
|
429
429
|
let o = t.steps[n].invert(t.docs[n]), l = e.selection && e.selection.map(a.slice(c + 1, n));
|
|
430
|
-
l && s++, r.push(new
|
|
431
|
-
} else r.push(new
|
|
430
|
+
l && s++, r.push(new Z(i, o, l));
|
|
431
|
+
} else r.push(new Z(i));
|
|
432
432
|
}, i);
|
|
433
433
|
let l = [];
|
|
434
|
-
for (let e = n; e < o; e++) l.push(new
|
|
434
|
+
for (let e = n; e < o; e++) l.push(new Z(a.maps[e]));
|
|
435
435
|
let u = new e(this.items.slice(0, i).append(l).append(r), s);
|
|
436
|
-
return u.emptyItemCount() >
|
|
436
|
+
return u.emptyItemCount() > Y && (u = u.compress(this.items.length - r.length)), u;
|
|
437
437
|
}
|
|
438
438
|
emptyItemCount() {
|
|
439
439
|
let e = 0;
|
|
@@ -450,21 +450,21 @@ var _t = /* @__PURE__ */ function(e) {
|
|
|
450
450
|
if (r--, o && n.appendMap(o, r), t) {
|
|
451
451
|
let s = e.selection && e.selection.map(n.slice(r));
|
|
452
452
|
s && a++;
|
|
453
|
-
let c = new
|
|
453
|
+
let c = new Z(o.invert(), t, s), l, u = i.length - 1;
|
|
454
454
|
(l = i.length && i[u].merge(c)) ? i[u] = l : i.push(c);
|
|
455
455
|
}
|
|
456
456
|
} else e.map && r--;
|
|
457
|
-
}, this.items.length, 0), new e(
|
|
457
|
+
}, this.items.length, 0), new e(J.from(i.reverse()), a);
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
|
-
|
|
461
|
-
function
|
|
460
|
+
X.empty = new X(J.empty, 0);
|
|
461
|
+
function _t(e, t) {
|
|
462
462
|
let n;
|
|
463
463
|
return e.forEach((e, r) => {
|
|
464
464
|
if (e.selection && t-- == 0) return n = r, !1;
|
|
465
465
|
}), e.slice(n);
|
|
466
466
|
}
|
|
467
|
-
var
|
|
467
|
+
var Z = class e {
|
|
468
468
|
constructor(e, t, n, r) {
|
|
469
469
|
this.map = e, this.step = t, this.selection = n, this.mirrorOffset = r;
|
|
470
470
|
}
|
|
@@ -474,25 +474,25 @@ var X = class e {
|
|
|
474
474
|
if (n) return new e(n.getMap().invert(), n, this.selection);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
},
|
|
477
|
+
}, Q = class {
|
|
478
478
|
constructor(e, t, n, r, i) {
|
|
479
479
|
this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = i;
|
|
480
480
|
}
|
|
481
|
-
},
|
|
482
|
-
function
|
|
483
|
-
let i = n.getMeta(
|
|
481
|
+
}, vt = 20;
|
|
482
|
+
function yt(e, t, n, r) {
|
|
483
|
+
let i = n.getMeta($), a;
|
|
484
484
|
if (i) return i.historyState;
|
|
485
|
-
n.getMeta(
|
|
485
|
+
n.getMeta(Dt) && (e = new Q(e.done, e.undone, null, 0, -1));
|
|
486
486
|
let o = n.getMeta("appendedTransaction");
|
|
487
487
|
if (n.steps.length == 0) return e;
|
|
488
|
-
if (o && o.getMeta(
|
|
488
|
+
if (o && o.getMeta($)) return o.getMeta($).redo ? new Q(e.done.addTransform(n, void 0, r, Et(t)), e.undone, xt(n.mapping.maps), e.prevTime, e.prevComposition) : new Q(e.done, e.undone.addTransform(n, void 0, r, Et(t)), null, e.prevTime, e.prevComposition);
|
|
489
489
|
if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
490
|
-
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !
|
|
491
|
-
return new
|
|
492
|
-
} else if (a = n.getMeta("rebased")) return new
|
|
493
|
-
else return new
|
|
490
|
+
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !bt(n, e.prevRanges)), s = o ? St(e.prevRanges, n.mapping) : xt(n.mapping.maps);
|
|
491
|
+
return new Q(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, Et(t)), X.empty, s, n.time, i ?? e.prevComposition);
|
|
492
|
+
} else if (a = n.getMeta("rebased")) return new Q(e.done.rebased(n, a), e.undone.rebased(n, a), St(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
493
|
+
else return new Q(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), St(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function bt(e, t) {
|
|
496
496
|
if (!t) return !1;
|
|
497
497
|
if (!e.docChanged) return !0;
|
|
498
498
|
let n = !1;
|
|
@@ -500,12 +500,12 @@ function xt(e, t) {
|
|
|
500
500
|
for (let i = 0; i < t.length; i += 2) e <= t[i + 1] && r >= t[i] && (n = !0);
|
|
501
501
|
}), n;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function xt(e) {
|
|
504
504
|
let t = [];
|
|
505
505
|
for (let n = e.length - 1; n >= 0 && t.length == 0; n--) e[n].forEach((e, n, r, i) => t.push(r, i));
|
|
506
506
|
return t;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function St(e, t) {
|
|
509
509
|
if (!e) return null;
|
|
510
510
|
let n = [];
|
|
511
511
|
for (let r = 0; r < e.length; r += 2) {
|
|
@@ -514,62 +514,62 @@ function Ct(e, t) {
|
|
|
514
514
|
}
|
|
515
515
|
return n;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
let r =
|
|
517
|
+
function Ct(e, t, n) {
|
|
518
|
+
let r = Et(t), i = $.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
|
|
519
519
|
if (!a) return null;
|
|
520
|
-
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new
|
|
521
|
-
return a.transform.setSelection(o).setMeta(
|
|
520
|
+
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new Q(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
|
|
521
|
+
return a.transform.setSelection(o).setMeta($, {
|
|
522
522
|
redo: n,
|
|
523
523
|
historyState: c
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
526
|
+
var wt = !1, Tt = null;
|
|
527
|
+
function Et(e) {
|
|
528
528
|
let t = e.plugins;
|
|
529
|
-
if (
|
|
530
|
-
|
|
529
|
+
if (Tt != t) {
|
|
530
|
+
wt = !1, Tt = t;
|
|
531
531
|
for (let e = 0; e < t.length; e++) if (t[e].spec.historyPreserveItems) {
|
|
532
|
-
|
|
532
|
+
wt = !0;
|
|
533
533
|
break;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return wt;
|
|
537
537
|
}
|
|
538
|
-
var
|
|
539
|
-
function
|
|
538
|
+
var $ = new R("history"), Dt = new R("closeHistory");
|
|
539
|
+
function Ot(e = {}) {
|
|
540
540
|
return e = {
|
|
541
541
|
depth: e.depth || 100,
|
|
542
542
|
newGroupDelay: e.newGroupDelay || 500
|
|
543
|
-
}, new
|
|
544
|
-
key:
|
|
543
|
+
}, new L({
|
|
544
|
+
key: $,
|
|
545
545
|
state: {
|
|
546
546
|
init() {
|
|
547
|
-
return new
|
|
547
|
+
return new Q(X.empty, X.empty, null, 0, -1);
|
|
548
548
|
},
|
|
549
549
|
apply(t, n, r) {
|
|
550
|
-
return
|
|
550
|
+
return yt(n, r, t, e);
|
|
551
551
|
}
|
|
552
552
|
},
|
|
553
553
|
config: e,
|
|
554
554
|
props: { handleDOMEvents: { beforeinput(e, t) {
|
|
555
|
-
let n = t.inputType, r = n == "historyUndo" ?
|
|
555
|
+
let n = t.inputType, r = n == "historyUndo" ? At : n == "historyRedo" ? jt : null;
|
|
556
556
|
return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
|
|
557
557
|
} } }
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function kt(e, t) {
|
|
561
561
|
return (n, r) => {
|
|
562
|
-
let i =
|
|
562
|
+
let i = $.getState(n);
|
|
563
563
|
if (!i || (e ? i.undone : i.done).eventCount == 0) return !1;
|
|
564
564
|
if (r) {
|
|
565
|
-
let a =
|
|
565
|
+
let a = Ct(i, n, e);
|
|
566
566
|
a && r(t ? a.scrollIntoView() : a);
|
|
567
567
|
}
|
|
568
568
|
return !0;
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
|
|
571
|
+
var At = kt(!1, !0), jt = kt(!0, !0);
|
|
572
|
+
H.create({
|
|
573
573
|
name: "characterCount",
|
|
574
574
|
addOptions() {
|
|
575
575
|
return {
|
|
@@ -601,8 +601,8 @@ R.create({
|
|
|
601
601
|
},
|
|
602
602
|
addProseMirrorPlugins() {
|
|
603
603
|
let e = !1;
|
|
604
|
-
return [new
|
|
605
|
-
key: new
|
|
604
|
+
return [new L({
|
|
605
|
+
key: new R("characterCount"),
|
|
606
606
|
appendTransaction: (t, n, r) => {
|
|
607
607
|
if (e) return;
|
|
608
608
|
let i = this.options.limit, a = this.options.autoTrim;
|
|
@@ -630,7 +630,7 @@ R.create({
|
|
|
630
630
|
}
|
|
631
631
|
})];
|
|
632
632
|
}
|
|
633
|
-
}),
|
|
633
|
+
}), H.create({
|
|
634
634
|
name: "dropCursor",
|
|
635
635
|
addOptions() {
|
|
636
636
|
return {
|
|
@@ -640,9 +640,9 @@ R.create({
|
|
|
640
640
|
};
|
|
641
641
|
},
|
|
642
642
|
addProseMirrorPlugins() {
|
|
643
|
-
return [
|
|
643
|
+
return [W(this.options)];
|
|
644
644
|
}
|
|
645
|
-
}),
|
|
645
|
+
}), H.create({
|
|
646
646
|
name: "focus",
|
|
647
647
|
addOptions() {
|
|
648
648
|
return {
|
|
@@ -651,11 +651,11 @@ R.create({
|
|
|
651
651
|
};
|
|
652
652
|
},
|
|
653
653
|
addProseMirrorPlugins() {
|
|
654
|
-
return [new
|
|
655
|
-
key: new
|
|
654
|
+
return [new L({
|
|
655
|
+
key: new R("focus"),
|
|
656
656
|
props: { decorations: ({ doc: e, selection: t }) => {
|
|
657
657
|
let { isEditable: n, isFocused: r } = this.editor, { anchor: i } = t, a = [];
|
|
658
|
-
if (!n || !r) return
|
|
658
|
+
if (!n || !r) return V.create(e, []);
|
|
659
659
|
let o = 0;
|
|
660
660
|
this.options.mode === "deepest" && e.descendants((e, t) => {
|
|
661
661
|
if (!e.isText) {
|
|
@@ -667,28 +667,28 @@ R.create({
|
|
|
667
667
|
return e.descendants((e, t) => {
|
|
668
668
|
if (e.isText || !(i >= t && i <= t + e.nodeSize - 1)) return !1;
|
|
669
669
|
if (s += 1, this.options.mode === "deepest" && o - s > 0 || this.options.mode === "shallowest" && s > 1) return this.options.mode === "deepest";
|
|
670
|
-
a.push(
|
|
671
|
-
}),
|
|
670
|
+
a.push(M.node(t, t + e.nodeSize, { class: this.options.className }));
|
|
671
|
+
}), V.create(e, a);
|
|
672
672
|
} }
|
|
673
673
|
})];
|
|
674
674
|
}
|
|
675
|
-
}),
|
|
675
|
+
}), H.create({
|
|
676
676
|
name: "gapCursor",
|
|
677
677
|
addProseMirrorPlugins() {
|
|
678
|
-
return [
|
|
678
|
+
return [lt()];
|
|
679
679
|
},
|
|
680
680
|
extendNodeSchema(e) {
|
|
681
|
-
return { allowGapCursor:
|
|
681
|
+
return { allowGapCursor: de(z(e, "allowGapCursor", {
|
|
682
682
|
name: e.name,
|
|
683
683
|
options: e.options,
|
|
684
684
|
storage: e.storage
|
|
685
685
|
})) ?? null };
|
|
686
686
|
}
|
|
687
687
|
});
|
|
688
|
-
var
|
|
688
|
+
var Mt = "placeholder", Nt = new R("tiptap__placeholder"), Pt = 200;
|
|
689
689
|
function Ft(e) {
|
|
690
690
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
691
|
-
return o && u.push(l),
|
|
691
|
+
return o && u.push(l), M.node(i, i + a.nodeSize, {
|
|
692
692
|
class: u.join(" "),
|
|
693
693
|
[r]: typeof n == "function" ? n({
|
|
694
694
|
editor: t,
|
|
@@ -706,7 +706,7 @@ function Lt({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
706
706
|
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
707
707
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
708
708
|
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
709
|
-
if (c && c.type.isTextblock &&
|
|
709
|
+
if (c && c.type.isTextblock && ge(c)) {
|
|
710
710
|
let r = a >= l && a <= l + c.nodeSize;
|
|
711
711
|
o.push(Ft({
|
|
712
712
|
editor: e,
|
|
@@ -728,9 +728,9 @@ function Lt({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
728
728
|
}));
|
|
729
729
|
}
|
|
730
730
|
} else {
|
|
731
|
-
let i =
|
|
731
|
+
let i = Nt.getState(e.state), c = i?.topPos ?? 0, l = i?.bottomPos ?? r.content.size;
|
|
732
732
|
r.nodesBetween(c, l, (r, i) => {
|
|
733
|
-
let c = a >= i && a <= i + r.nodeSize, l = !r.isLeaf &&
|
|
733
|
+
let c = a >= i && a <= i + r.nodeSize, l = !r.isLeaf && ge(r);
|
|
734
734
|
return r.type.isTextblock && (c || !t.showOnlyCurrent) && l && o.push(Ft({
|
|
735
735
|
editor: e,
|
|
736
736
|
isEmptyDoc: s,
|
|
@@ -751,7 +751,7 @@ function Lt({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
751
751
|
})), t.includeChildren;
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
-
return
|
|
754
|
+
return V.create(r, o);
|
|
755
755
|
}
|
|
756
756
|
function Rt(e) {
|
|
757
757
|
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
@@ -815,7 +815,7 @@ var Ut = {
|
|
|
815
815
|
};
|
|
816
816
|
},
|
|
817
817
|
apply(e, t) {
|
|
818
|
-
let n = e.getMeta(
|
|
818
|
+
let n = e.getMeta(Nt);
|
|
819
819
|
return n?.positions ? {
|
|
820
820
|
topPos: n.positions.top,
|
|
821
821
|
bottomPos: n.positions.bottom
|
|
@@ -832,9 +832,9 @@ function Wt(e) {
|
|
|
832
832
|
scrollContainer: t
|
|
833
833
|
});
|
|
834
834
|
if (n === null) return;
|
|
835
|
-
let r =
|
|
835
|
+
let r = Nt.getState(e.state);
|
|
836
836
|
if (r?.topPos === n.top && r?.bottomPos === n.bottom) return;
|
|
837
|
-
let i = e.state.tr.setMeta(
|
|
837
|
+
let i = e.state.tr.setMeta(Nt, { positions: n });
|
|
838
838
|
e.dispatch(i);
|
|
839
839
|
}, r = null, i = 0, a = () => {
|
|
840
840
|
r === null && (r = requestAnimationFrame(() => {
|
|
@@ -857,9 +857,9 @@ function Wt(e) {
|
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function Gt({ editor: e, options: t }) {
|
|
860
|
-
let n = t.dataAttribute ? `data-${Rt(t.dataAttribute)}` : `data-${
|
|
861
|
-
return new
|
|
862
|
-
key:
|
|
860
|
+
let n = t.dataAttribute ? `data-${Rt(t.dataAttribute)}` : `data-${Mt}`;
|
|
861
|
+
return new L({
|
|
862
|
+
key: Nt,
|
|
863
863
|
state: Ut,
|
|
864
864
|
view: Wt,
|
|
865
865
|
props: { decorations: ({ doc: r, selection: i }) => Lt({
|
|
@@ -871,13 +871,13 @@ function Gt({ editor: e, options: t }) {
|
|
|
871
871
|
}) }
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
|
-
var Kt =
|
|
874
|
+
var Kt = H.create({
|
|
875
875
|
name: "placeholder",
|
|
876
876
|
addOptions() {
|
|
877
877
|
return {
|
|
878
878
|
emptyEditorClass: "is-editor-empty",
|
|
879
879
|
emptyNodeClass: "is-empty",
|
|
880
|
-
dataAttribute:
|
|
880
|
+
dataAttribute: Mt,
|
|
881
881
|
placeholder: "Write something …",
|
|
882
882
|
showOnlyWhenEditable: !0,
|
|
883
883
|
showOnlyCurrent: !0,
|
|
@@ -891,17 +891,17 @@ var Kt = R.create({
|
|
|
891
891
|
})];
|
|
892
892
|
}
|
|
893
893
|
}), qt = ".ProseMirror:not(.ProseMirror-focused) *::selection {\n background: transparent;\n}\n\n.ProseMirror:not(.ProseMirror-focused) *::-moz-selection {\n background: transparent;\n}";
|
|
894
|
-
|
|
894
|
+
H.create({
|
|
895
895
|
name: "selection",
|
|
896
896
|
addOptions() {
|
|
897
897
|
return { className: "selection" };
|
|
898
898
|
},
|
|
899
899
|
addProseMirrorPlugins() {
|
|
900
900
|
let { editor: e, options: t } = this;
|
|
901
|
-
return e.options.injectCSS && typeof document < "u" &&
|
|
902
|
-
key: new
|
|
901
|
+
return e.options.injectCSS && typeof document < "u" && $e(qt, e.options.injectNonce, "selection"), [new L({
|
|
902
|
+
key: new R("selection"),
|
|
903
903
|
props: { decorations(n) {
|
|
904
|
-
return n.selection.empty || e.isFocused || !e.isEditable ||
|
|
904
|
+
return n.selection.empty || e.isFocused || !e.isEditable || pe(n.selection) || e.view.dragging ? null : V.create(n.doc, [M.inline(n.selection.from, n.selection.to, { class: t.className })]);
|
|
905
905
|
} }
|
|
906
906
|
})];
|
|
907
907
|
}
|
|
@@ -909,7 +909,7 @@ R.create({
|
|
|
909
909
|
function Jt({ types: e, node: t }) {
|
|
910
910
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
911
911
|
}
|
|
912
|
-
|
|
912
|
+
H.create({
|
|
913
913
|
name: "trailingNode",
|
|
914
914
|
addOptions() {
|
|
915
915
|
return {
|
|
@@ -918,8 +918,8 @@ R.create({
|
|
|
918
918
|
};
|
|
919
919
|
},
|
|
920
920
|
addProseMirrorPlugins() {
|
|
921
|
-
let e = new
|
|
922
|
-
return [new
|
|
921
|
+
let e = new R(this.name), t = this.options.node || this.editor.schema.topNodeType.contentMatch.defaultType?.name || "paragraph", n = Object.entries(this.editor.schema.nodes).map(([, e]) => e).filter((e) => (this.options.notAfter || []).concat(t).includes(e.name));
|
|
922
|
+
return [new L({
|
|
923
923
|
key: e,
|
|
924
924
|
appendTransaction: (n, r, i) => {
|
|
925
925
|
let { doc: a, tr: o, schema: s } = i, c = e.getState(i), l = a.content.size, u = s.nodes[t];
|
|
@@ -945,7 +945,7 @@ R.create({
|
|
|
945
945
|
})];
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
|
-
var Yt =
|
|
948
|
+
var Yt = H.create({
|
|
949
949
|
name: "undoRedo",
|
|
950
950
|
addOptions() {
|
|
951
951
|
return {
|
|
@@ -955,12 +955,12 @@ var Yt = R.create({
|
|
|
955
955
|
},
|
|
956
956
|
addCommands() {
|
|
957
957
|
return {
|
|
958
|
-
undo: () => ({ state: e, dispatch: t }) =>
|
|
959
|
-
redo: () => ({ state: e, dispatch: t }) =>
|
|
958
|
+
undo: () => ({ state: e, dispatch: t }) => At(e, t),
|
|
959
|
+
redo: () => ({ state: e, dispatch: t }) => jt(e, t)
|
|
960
960
|
};
|
|
961
961
|
},
|
|
962
962
|
addProseMirrorPlugins() {
|
|
963
|
-
return [
|
|
963
|
+
return [Ot(this.options)];
|
|
964
964
|
},
|
|
965
965
|
addKeyboardShortcuts() {
|
|
966
966
|
return {
|
|
@@ -988,7 +988,7 @@ function Xt(e) {
|
|
|
988
988
|
}
|
|
989
989
|
}));
|
|
990
990
|
}
|
|
991
|
-
var Zt = class extends
|
|
991
|
+
var Zt = class extends je {
|
|
992
992
|
constructor(e = {}) {
|
|
993
993
|
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = Xt(this.view.state), this.reactiveExtensionStorage = Xt(this.extensionStorage), this.on("beforeTransaction", ({ nextState: e }) => {
|
|
994
994
|
this.reactiveState.value = e, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
@@ -1026,7 +1026,7 @@ var Zt = class extends rt {
|
|
|
1026
1026
|
provides: i.provides
|
|
1027
1027
|
}), e.setOptions({ element: t }), e.createNodeViews();
|
|
1028
1028
|
});
|
|
1029
|
-
}),
|
|
1029
|
+
}), _(() => {
|
|
1030
1030
|
let e = t.editor;
|
|
1031
1031
|
e && (e.contentComponent = null, e.appContext = null);
|
|
1032
1032
|
}), { rootEl: r };
|
|
@@ -1079,13 +1079,13 @@ var $t = m({
|
|
|
1079
1079
|
let t = S();
|
|
1080
1080
|
return c(() => {
|
|
1081
1081
|
t.value = new Zt(e);
|
|
1082
|
-
}),
|
|
1082
|
+
}), _(() => {
|
|
1083
1083
|
var e;
|
|
1084
1084
|
(e = t.value) == null || e.destroy();
|
|
1085
1085
|
}), t;
|
|
1086
1086
|
}, tn = class {
|
|
1087
1087
|
constructor(e, { props: t = {}, editor: n }) {
|
|
1088
|
-
this.destroyed = !1, this.editor = n, this.component = se(e), this.el = document.createElement("div"), this.props =
|
|
1088
|
+
this.destroyed = !1, this.editor = n, this.component = se(e), this.el = document.createElement("div"), this.props = x(t), this.renderedComponent = this.renderComponent();
|
|
1089
1089
|
}
|
|
1090
1090
|
get element() {
|
|
1091
1091
|
return this.renderedComponent.el;
|
|
@@ -1171,7 +1171,7 @@ var nn = {
|
|
|
1171
1171
|
type: Object,
|
|
1172
1172
|
required: !0
|
|
1173
1173
|
}
|
|
1174
|
-
}, rn = class extends
|
|
1174
|
+
}, rn = class extends De {
|
|
1175
1175
|
constructor(e, t, n) {
|
|
1176
1176
|
super(e, t, n), this.cachedExtensionWithSyncedStorage = null, this.handlePositionUpdate = () => {
|
|
1177
1177
|
let e = this.getPos();
|
|
@@ -1231,7 +1231,7 @@ var nn = {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
handleSelectionUpdate() {
|
|
1233
1233
|
let e = this.getPos();
|
|
1234
|
-
if (typeof e == "number") if (
|
|
1234
|
+
if (typeof e == "number") if (we({
|
|
1235
1235
|
selection: this.editor.state.selection,
|
|
1236
1236
|
pos: e,
|
|
1237
1237
|
nodeSize: this.node.nodeSize,
|
|
@@ -1326,7 +1326,7 @@ var ln = [
|
|
|
1326
1326
|
"aria-label",
|
|
1327
1327
|
"popovertarget",
|
|
1328
1328
|
"aria-expanded"
|
|
1329
|
-
], un = ["id", "aria-label"], dn = { class: "ai-list" }, fn = ["onClick"], pn = { class: "ai-option-label" }, mn = { class: "ai-option-hint" }, hn = /*#__PURE__*/
|
|
1329
|
+
], un = ["id", "aria-label"], dn = { class: "ai-list" }, fn = ["onClick"], pn = { class: "ai-option-label" }, mn = { class: "ai-option-hint" }, hn = /*#__PURE__*/ Re(/* @__PURE__ */ m({
|
|
1330
1330
|
__name: "AiActionPicker",
|
|
1331
1331
|
props: {
|
|
1332
1332
|
actions: { type: Array },
|
|
@@ -1337,7 +1337,7 @@ var ln = [
|
|
|
1337
1337
|
},
|
|
1338
1338
|
emits: ["select"],
|
|
1339
1339
|
setup(e, { emit: n }) {
|
|
1340
|
-
let o = n, { t: s } =
|
|
1340
|
+
let o = n, { t: s } = Ze(), c = ne(), l = y("trigger"), d = y("popover"), p = a(() => d.value?.matches(":popover-open") ?? !1);
|
|
1341
1341
|
function m(e) {
|
|
1342
1342
|
if (e.newState !== "open") return;
|
|
1343
1343
|
let t = d.value, n = l.value?.getBoundingClientRect();
|
|
@@ -1347,10 +1347,10 @@ var ln = [
|
|
|
1347
1347
|
let t = e.relatedTarget, n = d.value;
|
|
1348
1348
|
t instanceof Node && n?.contains(t) || n?.matches(":popover-open") && n.hidePopover();
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function ee(e) {
|
|
1351
1351
|
o("select", e), d.value?.hidePopover();
|
|
1352
1352
|
}
|
|
1353
|
-
return (n, a) => (
|
|
1353
|
+
return (n, a) => (v(), t(r, null, [e.actions.length ? (v(), t("button", {
|
|
1354
1354
|
key: 0,
|
|
1355
1355
|
ref_key: "trigger",
|
|
1356
1356
|
ref: l,
|
|
@@ -1363,11 +1363,11 @@ var ln = [
|
|
|
1363
1363
|
popovertarget: O(c),
|
|
1364
1364
|
"aria-haspopup": "dialog",
|
|
1365
1365
|
"aria-expanded": p.value,
|
|
1366
|
-
onMousedown: a[0] ||=
|
|
1367
|
-
}, [f(
|
|
1366
|
+
onMousedown: a[0] ||= g(() => {}, ["prevent"])
|
|
1367
|
+
}, [f(P, {
|
|
1368
1368
|
name: "sparkles",
|
|
1369
1369
|
size: 16
|
|
1370
|
-
})], 42, ln)) : E("", !0), e.actions.length ? (
|
|
1370
|
+
})], 42, ln)) : E("", !0), e.actions.length ? (v(), t("div", {
|
|
1371
1371
|
key: 1,
|
|
1372
1372
|
id: O(c),
|
|
1373
1373
|
ref_key: "popover",
|
|
@@ -1378,12 +1378,12 @@ var ln = [
|
|
|
1378
1378
|
"aria-label": O(s)("blocks.text.ai.label"),
|
|
1379
1379
|
onBeforetoggle: m,
|
|
1380
1380
|
onFocusout: h
|
|
1381
|
-
}, [i("ul", dn, [(
|
|
1381
|
+
}, [i("ul", dn, [(v(!0), t(r, null, u(e.actions, (e) => (v(), t("li", { key: e }, [i("button", {
|
|
1382
1382
|
type: "button",
|
|
1383
1383
|
class: "ai-option",
|
|
1384
|
-
onClick: (t) =>
|
|
1385
|
-
onMousedown: a[1] ||=
|
|
1386
|
-
}, [i("span", pn,
|
|
1384
|
+
onClick: (t) => ee(e),
|
|
1385
|
+
onMousedown: a[1] ||= g(() => {}, ["prevent"])
|
|
1386
|
+
}, [i("span", pn, b(O(s)(`blocks.text.ai.actions.${e}.label`)), 1), i("span", mn, b(O(s)(`blocks.text.ai.actions.${e}.hint`)), 1)], 40, fn)]))), 128))])], 40, un)) : E("", !0)], 64));
|
|
1387
1387
|
}
|
|
1388
1388
|
}), [["styles", [".ai-trigger[data-v-abcd3caa]{color:var(--bygga-color-text);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;min-width:30px;height:30px;padding:0;display:inline-flex}.ai-trigger[data-v-abcd3caa]:hover:not(:disabled){background:color-mix(in srgb, var(--bygga-color-text) 30%, transparent)}.ai-trigger.active[data-v-abcd3caa]{background:var(--bygga-color-selected,var(--bygga-color-text));color:var(--bygga-color-selected-text,#fff);forced-color-adjust:none}.ai-trigger[data-v-abcd3caa]:disabled{cursor:default;opacity:.5}.ai-popover[data-v-abcd3caa]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-shadow:var(--bygga-shadow-card);box-sizing:border-box;flex-direction:column;width:16em;margin:0;padding:.4em;position:fixed;inset:auto}.ai-popover[data-v-abcd3caa]:popover-open{display:flex}.ai-list[data-v-abcd3caa]{flex-direction:column;gap:.15em;margin:0;padding:0;list-style:none;display:flex}.ai-option[data-v-abcd3caa]{border-radius:var(--bygga-radius-sm);color:var(--bygga-color-text);cursor:pointer;text-align:start;background:0 0;border:none;flex-direction:column;gap:.1em;width:100%;padding:.35em .5em;display:flex}.ai-option[data-v-abcd3caa]:hover,.ai-option[data-v-abcd3caa]:focus-visible{background:var(--bygga-color-track);color:var(--bygga-color-accent);outline:none}.ai-option-hint[data-v-abcd3caa]{color:var(--bygga-color-text-muted);font-size:.85em}"]], ["__scopeId", "data-v-abcd3caa"]]), gn = [
|
|
1389
1389
|
"title",
|
|
@@ -1396,21 +1396,21 @@ var ln = [
|
|
|
1396
1396
|
}, yn = ["onClick"], bn = { class: "merge-tag-option-label" }, xn = { class: "merge-tag-option-id" }, Sn = {
|
|
1397
1397
|
key: 1,
|
|
1398
1398
|
class: "merge-tag-empty"
|
|
1399
|
-
}, Cn = /*#__PURE__*/
|
|
1399
|
+
}, Cn = /*#__PURE__*/ Re(/* @__PURE__ */ m({
|
|
1400
1400
|
__name: "MergeTagPicker",
|
|
1401
1401
|
emits: ["select"],
|
|
1402
1402
|
setup(e, { emit: o }) {
|
|
1403
|
-
let s = o, { t: c, locale: l } =
|
|
1403
|
+
let s = o, { t: c, locale: l } = Ze(), p = d(et, a(() => ({}))), m = a(() => Ge(p.value).map((e) => ({
|
|
1404
1404
|
id: e,
|
|
1405
|
-
label:
|
|
1406
|
-
}))), h = A(""),
|
|
1405
|
+
label: Ke(p.value, e, l.value)
|
|
1406
|
+
}))), h = A(""), ee = a(() => {
|
|
1407
1407
|
let e = h.value.trim().toLowerCase();
|
|
1408
1408
|
return e ? m.value.filter((t) => t.label.toLowerCase().includes(e) || t.id.toLowerCase().includes(e)) : m.value;
|
|
1409
|
-
}),
|
|
1409
|
+
}), _ = ne(), te = a(() => S.value?.matches(":popover-open") ?? !1), x = y("trigger"), S = y("popover"), C = y("filterInput");
|
|
1410
1410
|
function w(e) {
|
|
1411
1411
|
if (e.newState !== "open") return;
|
|
1412
1412
|
h.value = "";
|
|
1413
|
-
let t = S.value, n =
|
|
1413
|
+
let t = S.value, n = x.value?.getBoundingClientRect();
|
|
1414
1414
|
t && n && (t.style.left = `${n.left}px`, t.style.top = `${n.bottom + 4}px`);
|
|
1415
1415
|
}
|
|
1416
1416
|
function re(e) {
|
|
@@ -1423,24 +1423,24 @@ var ln = [
|
|
|
1423
1423
|
function ie(e) {
|
|
1424
1424
|
s("select", e), S.value?.hidePopover();
|
|
1425
1425
|
}
|
|
1426
|
-
return (e, n) => (
|
|
1426
|
+
return (e, n) => (v(), t(r, null, [m.value.length ? (v(), t("button", {
|
|
1427
1427
|
key: 0,
|
|
1428
1428
|
ref_key: "trigger",
|
|
1429
|
-
ref:
|
|
1429
|
+
ref: x,
|
|
1430
1430
|
type: "button",
|
|
1431
|
-
class: D(["merge-tag-trigger", { active:
|
|
1431
|
+
class: D(["merge-tag-trigger", { active: te.value }]),
|
|
1432
1432
|
title: O(c)("blocks.text.mergeTag"),
|
|
1433
1433
|
"aria-label": O(c)("blocks.text.mergeTag"),
|
|
1434
|
-
popovertarget: O(
|
|
1434
|
+
popovertarget: O(_),
|
|
1435
1435
|
"aria-haspopup": "dialog",
|
|
1436
|
-
"aria-expanded":
|
|
1437
|
-
onMousedown: n[0] ||=
|
|
1438
|
-
}, [f(
|
|
1436
|
+
"aria-expanded": te.value,
|
|
1437
|
+
onMousedown: n[0] ||= g(() => {}, ["prevent"])
|
|
1438
|
+
}, [f(P, {
|
|
1439
1439
|
name: "braces",
|
|
1440
1440
|
size: 16
|
|
1441
|
-
})], 42, gn)) : E("", !0), m.value.length ? (
|
|
1441
|
+
})], 42, gn)) : E("", !0), m.value.length ? (v(), t("div", {
|
|
1442
1442
|
key: 1,
|
|
1443
|
-
id: O(
|
|
1443
|
+
id: O(_),
|
|
1444
1444
|
ref_key: "popover",
|
|
1445
1445
|
ref: S,
|
|
1446
1446
|
class: "merge-tag-popover",
|
|
@@ -1463,19 +1463,19 @@ var ln = [
|
|
|
1463
1463
|
"modelValue",
|
|
1464
1464
|
"placeholder",
|
|
1465
1465
|
"aria-label"
|
|
1466
|
-
]),
|
|
1466
|
+
]), ee.value.length ? (v(), t("ul", vn, [(v(!0), t(r, null, u(ee.value, (e) => (v(), t("li", { key: e.id }, [i("button", {
|
|
1467
1467
|
type: "button",
|
|
1468
1468
|
class: "merge-tag-option",
|
|
1469
1469
|
onClick: (t) => ie(e.id),
|
|
1470
|
-
onMousedown: n[2] ||=
|
|
1471
|
-
}, [i("span", bn,
|
|
1470
|
+
onMousedown: n[2] ||= g(() => {}, ["prevent"])
|
|
1471
|
+
}, [i("span", bn, b(e.label), 1), i("span", xn, b(e.id), 1)], 40, yn)]))), 128))])) : (v(), t("p", Sn, b(O(c)("blocks.text.mergeTagEmpty")), 1))], 40, _n)) : E("", !0)], 64));
|
|
1472
1472
|
}
|
|
1473
1473
|
}), [["styles", [".merge-tag-trigger[data-v-72cf1690]{color:var(--bygga-color-text);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;min-width:30px;height:30px;padding:0;display:inline-flex}.merge-tag-trigger[data-v-72cf1690]:hover{background:color-mix(in srgb, var(--bygga-color-text) 30%, transparent)}.merge-tag-trigger.active[data-v-72cf1690]{background:var(--bygga-color-selected,var(--bygga-color-text));color:var(--bygga-color-selected-text,#fff);forced-color-adjust:none}.merge-tag-popover[data-v-72cf1690]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-shadow:var(--bygga-shadow-card);box-sizing:border-box;flex-direction:column;gap:.35em;width:15em;margin:0;padding:.4em;position:fixed;inset:auto}.merge-tag-popover[data-v-72cf1690]:popover-open{display:flex}.merge-tag-list[data-v-72cf1690]{flex-direction:column;gap:.15em;max-height:14em;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.merge-tag-option[data-v-72cf1690]{border-radius:var(--bygga-radius-sm);color:var(--bygga-color-text);cursor:pointer;text-align:start;background:0 0;border:none;justify-content:space-between;align-items:baseline;gap:.5em;width:100%;padding:.35em .5em;display:flex}.merge-tag-option[data-v-72cf1690]:hover,.merge-tag-option[data-v-72cf1690]:focus-visible{background:var(--bygga-color-track);color:var(--bygga-color-accent);outline:none}.merge-tag-option-id[data-v-72cf1690]{color:var(--bygga-color-text-muted);font-variant-numeric:tabular-nums;font-size:.85em}.merge-tag-empty[data-v-72cf1690]{color:var(--bygga-color-text-muted);margin:0;padding:.35em .5em}"]], ["__scopeId", "data-v-72cf1690"]]), wn = /* @__PURE__ */ m({
|
|
1474
1474
|
__name: "MergeTagView",
|
|
1475
1475
|
props: nn,
|
|
1476
1476
|
setup(e) {
|
|
1477
|
-
let t = e, { t: n, locale: r } =
|
|
1478
|
-
return (e, t) => (
|
|
1477
|
+
let t = e, { t: n, locale: r } = Ze(), i = d(et, a(() => ({}))), o = a(() => String(t.node.attrs.id ?? "")), s = a(() => i.value[o.value] !== void 0), c = a(() => Ke(i.value, o.value, r.value)), l = a(() => n("blocks.text.mergeTagChip", { name: c.value }));
|
|
1478
|
+
return (e, t) => (v(), p(O($t), {
|
|
1479
1479
|
as: "span",
|
|
1480
1480
|
class: D(["merge-tag", { "is-unknown": !s.value }]),
|
|
1481
1481
|
"data-merge-tag": o.value,
|
|
@@ -1484,7 +1484,7 @@ var ln = [
|
|
|
1484
1484
|
"aria-label": l.value,
|
|
1485
1485
|
title: l.value
|
|
1486
1486
|
}, {
|
|
1487
|
-
default: C(() => [T(
|
|
1487
|
+
default: C(() => [T(b(c.value), 1)]),
|
|
1488
1488
|
_: 1
|
|
1489
1489
|
}, 8, [
|
|
1490
1490
|
"class",
|
|
@@ -1497,9 +1497,9 @@ var ln = [
|
|
|
1497
1497
|
//#endregion
|
|
1498
1498
|
//#region src/fontSizes.ts
|
|
1499
1499
|
function Tn(e) {
|
|
1500
|
-
return
|
|
1500
|
+
return xe(e);
|
|
1501
1501
|
}
|
|
1502
|
-
var En = new Set(
|
|
1502
|
+
var En = new Set(He.map(Tn));
|
|
1503
1503
|
function Dn(e) {
|
|
1504
1504
|
let t = e.trim();
|
|
1505
1505
|
return En.has(t) ? t : null;
|
|
@@ -1566,13 +1566,13 @@ function zn(e, t, n) {
|
|
|
1566
1566
|
if (r === "" || r === t.text) return;
|
|
1567
1567
|
let i = e.nodes[kn], a = i ? r.split("\n") : [r.replace(Nn, " ")], o = [];
|
|
1568
1568
|
for (let [n, r] of a.entries()) i && n > 0 && o.push(i.create()), o.push(...Bn(e, t, r));
|
|
1569
|
-
return
|
|
1569
|
+
return U.from(o);
|
|
1570
1570
|
}
|
|
1571
1571
|
function Bn(e, t, n) {
|
|
1572
|
-
let r = e.nodes[
|
|
1572
|
+
let r = e.nodes[nt], i = [], a = 0;
|
|
1573
1573
|
for (let o of n.matchAll(jn)) {
|
|
1574
1574
|
let s = o[1] ?? "";
|
|
1575
|
-
r &&
|
|
1575
|
+
r && Xe.test(s) && (o.index > a && i.push(e.text(n.slice(a, o.index), t.marks)), i.push(r.create({ id: s }, null, t.tagMarks.get(s) ?? t.marks)), a = o.index + o[0].length);
|
|
1576
1576
|
}
|
|
1577
1577
|
return a < n.length && i.push(e.text(n.slice(a), t.marks)), i;
|
|
1578
1578
|
}
|
|
@@ -1591,15 +1591,15 @@ function Hn(e, t, n, r) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
//#endregion
|
|
1593
1593
|
//#region src/panels/contentPanel/components/blocks/brandTypingStyle.ts
|
|
1594
|
-
var Un =
|
|
1594
|
+
var Un = H.create({
|
|
1595
1595
|
name: "brandTypingStyle",
|
|
1596
1596
|
addOptions() {
|
|
1597
1597
|
return { marks: () => [] };
|
|
1598
1598
|
},
|
|
1599
1599
|
addProseMirrorPlugins() {
|
|
1600
1600
|
let { marks: e } = this.options;
|
|
1601
|
-
return [new
|
|
1602
|
-
key: new
|
|
1601
|
+
return [new L({
|
|
1602
|
+
key: new R("brandTypingStyle"),
|
|
1603
1603
|
appendTransaction(t, n, r) {
|
|
1604
1604
|
let { selection: i, storedMarks: a, schema: o } = r;
|
|
1605
1605
|
if (a !== null || !i.empty) return null;
|
|
@@ -1636,13 +1636,13 @@ function Kn(e, t) {
|
|
|
1636
1636
|
var qn = /(?:\r\n?|\n)+/;
|
|
1637
1637
|
function Jn(e, t) {
|
|
1638
1638
|
let { schema: n, selection: r, storedMarks: i } = e, a = i ?? r.$from.marks(), o = Wn(e), s = t.split(qn).map((e) => o.type.create(o.attrs, e ? n.text(e, a) : null));
|
|
1639
|
-
return new
|
|
1639
|
+
return new N(U.from(s), 1, 1);
|
|
1640
1640
|
}
|
|
1641
1641
|
//#endregion
|
|
1642
1642
|
//#region src/panels/contentPanel/components/blocks/sanitizePastedFonts.ts
|
|
1643
1643
|
var Yn = "textStyle";
|
|
1644
1644
|
function Xn(e) {
|
|
1645
|
-
let t =
|
|
1645
|
+
let t = he(e);
|
|
1646
1646
|
return !t || t.key === "verdana" ? null : t.stack;
|
|
1647
1647
|
}
|
|
1648
1648
|
function Zn(e, t) {
|
|
@@ -1662,14 +1662,14 @@ function $n(e, t) {
|
|
|
1662
1662
|
function er(e, t) {
|
|
1663
1663
|
let n = [];
|
|
1664
1664
|
for (let r = 0; r < e.childCount; r++) n.push($n(e.child(r), t));
|
|
1665
|
-
return
|
|
1665
|
+
return U.fromArray(n);
|
|
1666
1666
|
}
|
|
1667
1667
|
function tr(e, t) {
|
|
1668
|
-
return new
|
|
1668
|
+
return new N(er(e.content, t), e.openStart, e.openEnd);
|
|
1669
1669
|
}
|
|
1670
1670
|
//#endregion
|
|
1671
1671
|
//#region src/panels/contentPanel/components/blocks/selectAllText.ts
|
|
1672
|
-
var nr =
|
|
1672
|
+
var nr = H.create({
|
|
1673
1673
|
name: "selectAllText",
|
|
1674
1674
|
priority: 1e3,
|
|
1675
1675
|
addKeyboardShortcuts() {
|
|
@@ -1681,11 +1681,11 @@ var nr = R.create({
|
|
|
1681
1681
|
});
|
|
1682
1682
|
} };
|
|
1683
1683
|
}
|
|
1684
|
-
}), rr =
|
|
1684
|
+
}), rr = H.create({
|
|
1685
1685
|
name: "keepEmptiedBlock",
|
|
1686
1686
|
addProseMirrorPlugins() {
|
|
1687
|
-
return [new
|
|
1688
|
-
key: new
|
|
1687
|
+
return [new L({
|
|
1688
|
+
key: new R("keepEmptiedBlock"),
|
|
1689
1689
|
filterTransaction(e) {
|
|
1690
1690
|
return e.docChanged && e.setMeta("preventClearDocument", !0), !0;
|
|
1691
1691
|
}
|
|
@@ -1726,9 +1726,9 @@ var nr = R.create({
|
|
|
1726
1726
|
"width",
|
|
1727
1727
|
"x",
|
|
1728
1728
|
"y"
|
|
1729
|
-
], Mr = ["aria-labelledby", "onKeydown"], Nr = ["id"], Pr = 8, Fr = 220, Ir = /*#__PURE__*/
|
|
1729
|
+
], Mr = ["aria-labelledby", "onKeydown"], Nr = ["id"], Pr = 8, Fr = 220, Ir = /*#__PURE__*/ Re(/* @__PURE__ */ m({
|
|
1730
1730
|
__name: "TextEditor",
|
|
1731
|
-
props: /*@__PURE__*/
|
|
1731
|
+
props: /*@__PURE__*/ ee({
|
|
1732
1732
|
editable: {
|
|
1733
1733
|
type: Boolean,
|
|
1734
1734
|
default: !1
|
|
@@ -1741,6 +1741,7 @@ var nr = R.create({
|
|
|
1741
1741
|
width: { type: null },
|
|
1742
1742
|
align: { type: null },
|
|
1743
1743
|
paragraphSpacing: { type: Number },
|
|
1744
|
+
lineHeight: { type: Number },
|
|
1744
1745
|
headerOnly: { type: Boolean },
|
|
1745
1746
|
availableWidth: { type: Number },
|
|
1746
1747
|
outerVmlBackground: { type: Boolean }
|
|
@@ -1752,46 +1753,46 @@ var nr = R.create({
|
|
|
1752
1753
|
}),
|
|
1753
1754
|
emits: ["update:text", "update:fitSize"],
|
|
1754
1755
|
setup(e) {
|
|
1755
|
-
let o =
|
|
1756
|
+
let o = te(e, "text"), s = te(e, "fitSize"), l = e, { t: p, locale: m } = Ze(), ee = [
|
|
1756
1757
|
"left",
|
|
1757
1758
|
"center",
|
|
1758
1759
|
"right",
|
|
1759
1760
|
"justify"
|
|
1760
|
-
],
|
|
1761
|
-
...
|
|
1761
|
+
], x = a(() => p(l.headerOnly ? "blocks.header.label" : "blocks.text.label")), S = en({
|
|
1762
|
+
...Fe,
|
|
1762
1763
|
editorProps: {
|
|
1763
1764
|
attributes: {
|
|
1764
|
-
"aria-label":
|
|
1765
|
+
"aria-label": x.value,
|
|
1765
1766
|
"aria-multiline": "true",
|
|
1766
1767
|
role: "textbox"
|
|
1767
1768
|
},
|
|
1768
|
-
transformPasted: (e) => tr(e,
|
|
1769
|
-
handlePaste: (e, t, n) =>
|
|
1769
|
+
transformPasted: (e) => tr(e, je.value),
|
|
1770
|
+
handlePaste: (e, t, n) => X(t, n)
|
|
1770
1771
|
},
|
|
1771
|
-
content:
|
|
1772
|
+
content: Qe(o.value),
|
|
1772
1773
|
editable: l.editable,
|
|
1773
1774
|
extensions: [
|
|
1774
|
-
...(l.headerOnly ?
|
|
1775
|
+
...(l.headerOnly ? Le : Ae).map((e) => e.name === "mergeTag" ? e.extend({ addNodeView: () => an(wn) }) : e),
|
|
1775
1776
|
Yt,
|
|
1776
1777
|
nr,
|
|
1777
1778
|
rr,
|
|
1778
|
-
Un.configure({ marks:
|
|
1779
|
+
Un.configure({ marks: De }),
|
|
1779
1780
|
Kt.configure({ placeholder: () => p(l.headerOnly ? "blocks.header.placeholder" : "blocks.text.placeholder") })
|
|
1780
1781
|
],
|
|
1781
1782
|
onUpdate({ editor: e }) {
|
|
1782
|
-
o.value =
|
|
1783
|
+
o.value = Ee(e.getJSON()), I();
|
|
1783
1784
|
},
|
|
1784
1785
|
onSelectionUpdate() {
|
|
1785
|
-
|
|
1786
|
+
I();
|
|
1786
1787
|
}
|
|
1787
1788
|
});
|
|
1788
|
-
h(
|
|
1789
|
+
h(x, (e) => {
|
|
1789
1790
|
S.value?.setOptions({ editorProps: { attributes: { "aria-label": e } } });
|
|
1790
1791
|
}), h(o, (e) => {
|
|
1791
1792
|
let t = S.value;
|
|
1792
|
-
!t ||
|
|
1793
|
+
!t || ue(e, Ee(t.getJSON())) || t.commands.setContent(Qe(e), { emitUpdate: !1 });
|
|
1793
1794
|
}), h(() => l.editable, (e) => S.value?.setEditable(e));
|
|
1794
|
-
let w =
|
|
1795
|
+
let w = y("root"), T = y("toolbar"), ae = y("content");
|
|
1795
1796
|
function se() {
|
|
1796
1797
|
let e = ae.value?.$el;
|
|
1797
1798
|
if (!(l.editable && e)) return;
|
|
@@ -1807,65 +1808,66 @@ var nr = R.create({
|
|
|
1807
1808
|
let r = s.value;
|
|
1808
1809
|
(r?.width !== n.width || r.height !== n.height) && (s.value = n);
|
|
1809
1810
|
}
|
|
1810
|
-
let k,
|
|
1811
|
-
function
|
|
1811
|
+
let k, j;
|
|
1812
|
+
function M() {
|
|
1812
1813
|
let e = ae.value?.$el;
|
|
1813
|
-
!(k && e) || e ===
|
|
1814
|
+
!(k && e) || e === j || (j && k.unobserve(j), k.observe(e), j = e);
|
|
1814
1815
|
}
|
|
1815
|
-
function
|
|
1816
|
+
function N() {
|
|
1816
1817
|
n(() => {
|
|
1817
|
-
|
|
1818
|
+
M(), se();
|
|
1818
1819
|
});
|
|
1819
1820
|
}
|
|
1820
1821
|
c(() => {
|
|
1821
|
-
!l.editable || typeof ResizeObserver > "u" || (k = new ResizeObserver(se),
|
|
1822
|
-
}),
|
|
1822
|
+
!l.editable || typeof ResizeObserver > "u" || (k = new ResizeObserver(se), N());
|
|
1823
|
+
}), _(() => k?.disconnect()), h(() => [
|
|
1823
1824
|
l.width,
|
|
1824
1825
|
l.paragraphSpacing,
|
|
1826
|
+
l.lineHeight,
|
|
1825
1827
|
l.padding,
|
|
1826
1828
|
o.value
|
|
1827
|
-
],
|
|
1828
|
-
function
|
|
1829
|
+
], N);
|
|
1830
|
+
function de() {
|
|
1829
1831
|
let e = T.value;
|
|
1830
|
-
!e || e.matches(":popover-open") || (e.showPopover(),
|
|
1832
|
+
!e || e.matches(":popover-open") || (e.showPopover(), I());
|
|
1831
1833
|
}
|
|
1832
|
-
function
|
|
1834
|
+
function pe(e) {
|
|
1833
1835
|
let t = e.relatedTarget;
|
|
1834
1836
|
t instanceof Node && w.value?.contains(t) || T.value?.matches(":popover-open") && T.value.hidePopover();
|
|
1835
1837
|
}
|
|
1836
|
-
let
|
|
1837
|
-
function
|
|
1838
|
-
let e =
|
|
1838
|
+
let ge = d(ie, void 0);
|
|
1839
|
+
function F() {
|
|
1840
|
+
let e = ge?.value?.getBoundingClientRect();
|
|
1839
1841
|
return {
|
|
1840
1842
|
top: Math.max(e?.top ?? 0, 0),
|
|
1841
1843
|
bottom: Math.min(e?.bottom ?? window.innerHeight, window.innerHeight)
|
|
1842
1844
|
};
|
|
1843
1845
|
}
|
|
1844
|
-
function
|
|
1846
|
+
function I() {
|
|
1845
1847
|
let e = S.value?.view, t = T.value, n = w.value;
|
|
1846
1848
|
if (!(e && t && n && t.matches(":popover-open"))) return;
|
|
1847
1849
|
let r = n.closest(".block-container"), i = (r?.querySelector(":scope > .block-label") ?? r ?? n).getBoundingClientRect(), a = Math.max(Pr, window.innerWidth - Fr - Pr), o = Math.min(Math.max(i.left, Pr), a);
|
|
1848
|
-
t.style.left = `${o}px`, t.style.maxWidth = `${window.innerWidth - o - Pr}px`, t.style.top = `${
|
|
1850
|
+
t.style.left = `${o}px`, t.style.maxWidth = `${window.innerWidth - o - Pr}px`, t.style.top = `${Ue(i.top, t.offsetHeight, F())}px`;
|
|
1849
1851
|
}
|
|
1850
|
-
function
|
|
1852
|
+
function be(e) {
|
|
1851
1853
|
let t = {
|
|
1852
1854
|
capture: !0,
|
|
1853
1855
|
passive: !0
|
|
1854
1856
|
}, n = w.value?.getRootNode();
|
|
1855
|
-
for (let r of [window, n instanceof ShadowRoot ? n : null]) e ? r?.addEventListener("scroll",
|
|
1856
|
-
e ? window.addEventListener("resize",
|
|
1857
|
+
for (let r of [window, n instanceof ShadowRoot ? n : null]) e ? r?.addEventListener("scroll", I, t) : r?.removeEventListener("scroll", I, t);
|
|
1858
|
+
e ? window.addEventListener("resize", I) : window.removeEventListener("resize", I);
|
|
1857
1859
|
}
|
|
1858
|
-
function
|
|
1859
|
-
|
|
1860
|
+
function xe(e) {
|
|
1861
|
+
be(e.newState === "open");
|
|
1860
1862
|
}
|
|
1861
|
-
|
|
1862
|
-
function
|
|
1863
|
+
_(() => be(!1));
|
|
1864
|
+
function L() {
|
|
1863
1865
|
let e = S.value;
|
|
1864
1866
|
if (!e) return l.headerOnly ? "h1" : "paragraph";
|
|
1865
1867
|
let t = We.find((t) => e.isActive("heading", { level: t }));
|
|
1866
1868
|
return t ? `h${t}` : "paragraph";
|
|
1867
1869
|
}
|
|
1868
|
-
function
|
|
1870
|
+
function we(e) {
|
|
1869
1871
|
let { target: t } = e;
|
|
1870
1872
|
if (!(t instanceof HTMLSelectElement)) return;
|
|
1871
1873
|
let n = S.value?.chain().focus();
|
|
@@ -1873,90 +1875,90 @@ var nr = R.create({
|
|
|
1873
1875
|
let r = We.find((e) => `h${e}` === t.value);
|
|
1874
1876
|
r ? n.setHeading({ level: r }).run() : l.headerOnly || n.setParagraph().run();
|
|
1875
1877
|
}
|
|
1876
|
-
let
|
|
1877
|
-
function
|
|
1878
|
-
let e =
|
|
1879
|
-
return
|
|
1878
|
+
let R = d(oe, a(() => Oe)), Te = d(ke, void 0);
|
|
1879
|
+
function De() {
|
|
1880
|
+
let e = Te?.value;
|
|
1881
|
+
return _e(l.headerOnly ? e?.header : e?.text, R.value);
|
|
1880
1882
|
}
|
|
1881
|
-
let
|
|
1882
|
-
function
|
|
1883
|
+
let z = Me(), je = a(() => new Set(z.value.map((e) => e.stack)));
|
|
1884
|
+
function B(e) {
|
|
1883
1885
|
return `custom:${e}`;
|
|
1884
1886
|
}
|
|
1885
|
-
function
|
|
1886
|
-
if (typeof e != "string") return
|
|
1887
|
-
let t =
|
|
1888
|
-
return t ?
|
|
1887
|
+
function Re(e) {
|
|
1888
|
+
if (typeof e != "string") return R.value;
|
|
1889
|
+
let t = z.value.find((t) => t.stack === e);
|
|
1890
|
+
return t ? B(t.name) : he(e)?.key ?? R.value;
|
|
1889
1891
|
}
|
|
1890
|
-
function
|
|
1892
|
+
function V() {
|
|
1891
1893
|
let e = S.value;
|
|
1892
|
-
if (!e) return
|
|
1894
|
+
if (!e) return R.value;
|
|
1893
1895
|
let { from: t, to: n, empty: r } = e.state.selection;
|
|
1894
|
-
if (r) return
|
|
1896
|
+
if (r) return Re(e.getAttributes("textStyle").fontFamily);
|
|
1895
1897
|
let i = /* @__PURE__ */ new Set();
|
|
1896
1898
|
e.state.doc.nodesBetween(t, n, (e) => {
|
|
1897
1899
|
if (!e.isText) return;
|
|
1898
1900
|
let t = e.marks.find((e) => e.type.name === "textStyle");
|
|
1899
|
-
i.add(
|
|
1901
|
+
i.add(Re(t?.attrs.fontFamily));
|
|
1900
1902
|
});
|
|
1901
1903
|
let a = Array.from(i);
|
|
1902
|
-
return a.length > 1 ? "mixed" : a[0] ??
|
|
1904
|
+
return a.length > 1 ? "mixed" : a[0] ?? R.value;
|
|
1903
1905
|
}
|
|
1904
|
-
function
|
|
1906
|
+
function Be(e) {
|
|
1905
1907
|
let { target: t } = e;
|
|
1906
1908
|
if (!(t instanceof HTMLSelectElement)) return;
|
|
1907
1909
|
let n = t.value, r = S.value?.chain().focus();
|
|
1908
1910
|
if (!r) return;
|
|
1909
|
-
let i =
|
|
1911
|
+
let i = z.value.find((e) => B(e.name) === n);
|
|
1910
1912
|
if (i) {
|
|
1911
1913
|
r.setFontFamily(i.stack).run();
|
|
1912
1914
|
return;
|
|
1913
1915
|
}
|
|
1914
|
-
|
|
1916
|
+
Ce(n) && (n === R.value ? r.unsetFontFamily().run() : r.setFontFamily(fe(n)).run());
|
|
1915
1917
|
}
|
|
1916
|
-
function
|
|
1918
|
+
function Ge(e) {
|
|
1917
1919
|
return typeof e == "string" && On(e) ? e : "";
|
|
1918
1920
|
}
|
|
1919
|
-
function
|
|
1921
|
+
function Ke() {
|
|
1920
1922
|
let e = S.value;
|
|
1921
1923
|
if (!e) return "";
|
|
1922
1924
|
let { from: t, to: n, empty: r } = e.state.selection;
|
|
1923
|
-
if (r) return
|
|
1925
|
+
if (r) return Ge(e.getAttributes("textStyle").fontSize);
|
|
1924
1926
|
let i = /* @__PURE__ */ new Set();
|
|
1925
1927
|
e.state.doc.nodesBetween(t, n, (e) => {
|
|
1926
1928
|
if (!e.isText) return;
|
|
1927
1929
|
let t = e.marks.find((e) => e.type.name === "textStyle");
|
|
1928
|
-
i.add(
|
|
1930
|
+
i.add(Ge(t?.attrs.fontSize));
|
|
1929
1931
|
});
|
|
1930
1932
|
let a = Array.from(i);
|
|
1931
1933
|
return a.length > 1 ? "mixed" : a[0] ?? "";
|
|
1932
1934
|
}
|
|
1933
|
-
function
|
|
1935
|
+
function Xe(e) {
|
|
1934
1936
|
let { target: t } = e;
|
|
1935
1937
|
if (!(t instanceof HTMLSelectElement)) return;
|
|
1936
1938
|
let n = S.value?.chain().focus();
|
|
1937
1939
|
n && (t.value === "" ? n.unsetFontSize().run() : On(t.value) && n.setFontSize(t.value).run());
|
|
1938
1940
|
}
|
|
1939
|
-
let $e =
|
|
1940
|
-
let e =
|
|
1941
|
-
return
|
|
1942
|
-
}),
|
|
1941
|
+
let $e = qe(() => {
|
|
1942
|
+
let e = V();
|
|
1943
|
+
return Ce(e) ? e : void 0;
|
|
1944
|
+
}), et = a({
|
|
1943
1945
|
get: () => {
|
|
1944
1946
|
let e = S.value?.getAttributes("textStyle").color, t = typeof e == "string" ? Se(e) : void 0;
|
|
1945
1947
|
return t ? {
|
|
1946
1948
|
type: "color",
|
|
1947
1949
|
...t
|
|
1948
|
-
} :
|
|
1950
|
+
} : ze;
|
|
1949
1951
|
},
|
|
1950
1952
|
set: (e) => {
|
|
1951
|
-
e.type !== "transparent" && S.value?.chain().setColor(
|
|
1953
|
+
e.type !== "transparent" && S.value?.chain().setColor(ve(e)).run();
|
|
1952
1954
|
}
|
|
1953
|
-
}),
|
|
1955
|
+
}), H = {
|
|
1954
1956
|
left: "blocks.text.alignLeft",
|
|
1955
1957
|
center: "blocks.text.alignCenter",
|
|
1956
1958
|
right: "blocks.text.alignRight",
|
|
1957
1959
|
justify: "blocks.text.alignJustify"
|
|
1958
1960
|
};
|
|
1959
|
-
function
|
|
1961
|
+
function U(e) {
|
|
1960
1962
|
return (e === "justify" ? [
|
|
1961
1963
|
14,
|
|
1962
1964
|
14,
|
|
@@ -1976,85 +1978,85 @@ var nr = R.create({
|
|
|
1976
1978
|
};
|
|
1977
1979
|
});
|
|
1978
1980
|
}
|
|
1979
|
-
let
|
|
1980
|
-
function
|
|
1981
|
+
let rt = ne(), W = y("linkPopover"), at = y("linkInput"), G = y("linkTrigger"), K = A(""), ot = A(!1), st = A(!1);
|
|
1982
|
+
function ct(e) {
|
|
1981
1983
|
if (e.newState !== "open") return;
|
|
1982
1984
|
let t = S.value?.getAttributes("link")?.href;
|
|
1983
|
-
|
|
1984
|
-
let n =
|
|
1985
|
+
K.value = typeof t == "string" ? t : "", st.value = K.value !== "";
|
|
1986
|
+
let n = W.value, r = G.value?.getBoundingClientRect();
|
|
1985
1987
|
n && r && (n.style.left = `${r.left}px`, n.style.top = `${r.bottom + 4}px`);
|
|
1986
1988
|
}
|
|
1987
|
-
function
|
|
1988
|
-
if (
|
|
1989
|
-
let t =
|
|
1989
|
+
function lt(e) {
|
|
1990
|
+
if (ot.value = e.newState === "open", e.newState !== "open") return;
|
|
1991
|
+
let t = W.value;
|
|
1990
1992
|
if (t) {
|
|
1991
1993
|
let e = window.innerWidth - t.offsetWidth - 8;
|
|
1992
1994
|
Number.parseFloat(t.style.left) > e && (t.style.left = `${Math.max(8, e)}px`);
|
|
1993
1995
|
}
|
|
1994
1996
|
n(() => {
|
|
1995
|
-
|
|
1997
|
+
at.value?.focus(), at.value?.select();
|
|
1996
1998
|
});
|
|
1997
1999
|
}
|
|
1998
|
-
function
|
|
1999
|
-
let t = e.relatedTarget, n =
|
|
2000
|
+
function ut(e) {
|
|
2001
|
+
let t = e.relatedTarget, n = W.value;
|
|
2000
2002
|
t instanceof Node && n?.contains(t) || n?.hidePopover();
|
|
2001
2003
|
}
|
|
2002
|
-
function
|
|
2004
|
+
function q() {
|
|
2003
2005
|
let e = S.value?.chain().focus();
|
|
2004
2006
|
if (!e) return;
|
|
2005
|
-
let t =
|
|
2007
|
+
let t = Je(K.value);
|
|
2006
2008
|
t === "" ? e.unsetLink().run() : e.setLink({
|
|
2007
2009
|
href: t,
|
|
2008
2010
|
target: t.startsWith("#") ? null : "_blank"
|
|
2009
|
-
}).run(),
|
|
2011
|
+
}).run(), W.value?.hidePopover();
|
|
2010
2012
|
}
|
|
2011
|
-
let
|
|
2012
|
-
function
|
|
2013
|
-
e === "" ?
|
|
2013
|
+
let dt = d(ce, a(() => [])), ft = a(() => K.value.startsWith("#") && dt.value.includes(K.value.slice(1)) ? K.value.slice(1) : "");
|
|
2014
|
+
function pt(e) {
|
|
2015
|
+
e === "" ? K.value.startsWith("#") && (K.value = "") : K.value = `#${e}`;
|
|
2014
2016
|
}
|
|
2015
|
-
function
|
|
2016
|
-
S.value?.chain().focus().unsetLink().run(),
|
|
2017
|
+
function mt() {
|
|
2018
|
+
S.value?.chain().focus().unsetLink().run(), W.value?.hidePopover();
|
|
2017
2019
|
}
|
|
2018
|
-
let
|
|
2019
|
-
function
|
|
2020
|
-
let n = S.value, r =
|
|
2021
|
-
return n && r && i && Gn(n.state, t) ? (
|
|
2020
|
+
let J = y("pastePrompt"), ht = y("pasteKeep"), gt = ne(), Y;
|
|
2021
|
+
function X(e, t) {
|
|
2022
|
+
let n = S.value, r = J.value, i = e.clipboardData?.getData("text/plain") ?? "";
|
|
2023
|
+
return n && r && i && Gn(n.state, t) ? (Y = {
|
|
2022
2024
|
slice: t,
|
|
2023
2025
|
text: i
|
|
2024
|
-
}, r.showPopover(),
|
|
2026
|
+
}, r.showPopover(), _t(n.view, r), ht.value?.focus(), !0) : !1;
|
|
2025
2027
|
}
|
|
2026
|
-
function
|
|
2028
|
+
function _t(e, t) {
|
|
2027
2029
|
let n = e.coordsAtPos(e.state.selection.from), r = Ie(n, window.innerHeight), i = window.innerWidth - t.offsetWidth - 8;
|
|
2028
2030
|
t.style.left = `${Math.max(8, Math.min(n.left, i))}px`, t.style.top = r.side === "below" ? `${r.offset + 4}px` : "auto", t.style.bottom = r.side === "above" ? `${r.offset + 4}px` : "auto";
|
|
2029
2031
|
}
|
|
2030
|
-
function
|
|
2031
|
-
let t =
|
|
2032
|
-
|
|
2032
|
+
function Z(e) {
|
|
2033
|
+
let t = Y;
|
|
2034
|
+
Y = void 0;
|
|
2033
2035
|
let n = S.value;
|
|
2034
2036
|
if (t && n && !n.isDestroyed) {
|
|
2035
2037
|
let { view: r } = n;
|
|
2036
2038
|
r.focus(), r.dispatch(Kn(r.state, e ? t.slice : Jn(r.state, t.text)));
|
|
2037
2039
|
}
|
|
2038
|
-
|
|
2040
|
+
vt();
|
|
2039
2041
|
}
|
|
2040
|
-
function
|
|
2041
|
-
|
|
2042
|
+
function Q() {
|
|
2043
|
+
Y = void 0, S.value?.view.focus(), vt();
|
|
2042
2044
|
}
|
|
2043
|
-
function
|
|
2044
|
-
|
|
2045
|
+
function vt() {
|
|
2046
|
+
J.value?.matches(":popover-open") && J.value.hidePopover();
|
|
2045
2047
|
}
|
|
2046
|
-
function
|
|
2048
|
+
function yt(e) {
|
|
2047
2049
|
let t = e.relatedTarget;
|
|
2048
|
-
t instanceof Node &&
|
|
2050
|
+
t instanceof Node && J.value?.contains(t) || (Y = void 0, vt());
|
|
2049
2051
|
}
|
|
2050
|
-
let
|
|
2051
|
-
async function
|
|
2052
|
-
let t = S.value, n =
|
|
2053
|
-
if (!(t && n) ||
|
|
2052
|
+
let bt = d(tt), xt = me(), St = a(() => cn(bt?.value?.ai)), Ct = A(!1);
|
|
2053
|
+
async function wt(e) {
|
|
2054
|
+
let t = S.value, n = bt?.value?.ai;
|
|
2055
|
+
if (!(t && n) || Ct.value) return;
|
|
2054
2056
|
let r = In(t.state.doc, t.state.selection);
|
|
2055
2057
|
if (r.length === 0) return;
|
|
2056
|
-
|
|
2057
|
-
let i = new
|
|
2058
|
+
Ct.value = !0;
|
|
2059
|
+
let i = new ye(), a = ({ transaction: e, appendedTransactions: t }) => {
|
|
2058
2060
|
for (let n of [e, ...t]) i.appendMapping(n.mapping);
|
|
2059
2061
|
};
|
|
2060
2062
|
t.on("transaction", a);
|
|
@@ -2069,28 +2071,28 @@ var nr = R.create({
|
|
|
2069
2071
|
e && t.view.dispatch(e);
|
|
2070
2072
|
}
|
|
2071
2073
|
} catch (e) {
|
|
2072
|
-
console.error("[bygga-editor] the AI action failed —", e),
|
|
2074
|
+
console.error("[bygga-editor] the AI action failed —", e), xt?.show(p("blocks.text.ai.failed"));
|
|
2073
2075
|
} finally {
|
|
2074
|
-
t.off("transaction", a),
|
|
2076
|
+
t.off("transaction", a), Ct.value = !1;
|
|
2075
2077
|
}
|
|
2076
2078
|
}
|
|
2077
|
-
function
|
|
2079
|
+
function Tt(e) {
|
|
2078
2080
|
S.value?.chain().focus().insertContent({
|
|
2079
|
-
type:
|
|
2081
|
+
type: nt,
|
|
2080
2082
|
attrs: { id: e }
|
|
2081
2083
|
}).run();
|
|
2082
2084
|
}
|
|
2083
|
-
return (e, n) => (
|
|
2085
|
+
return (e, n) => (v(), t("div", {
|
|
2084
2086
|
ref_key: "root",
|
|
2085
2087
|
ref: w,
|
|
2086
2088
|
style: {
|
|
2087
2089
|
position: "relative",
|
|
2088
2090
|
width: "100%"
|
|
2089
2091
|
},
|
|
2090
|
-
onFocusin:
|
|
2091
|
-
onFocusout:
|
|
2092
|
+
onFocusin: de,
|
|
2093
|
+
onFocusout: pe
|
|
2092
2094
|
}, [
|
|
2093
|
-
f(O(
|
|
2095
|
+
f(O(it), {
|
|
2094
2096
|
width: l.width,
|
|
2095
2097
|
align: l.align
|
|
2096
2098
|
}, {
|
|
@@ -2102,7 +2104,11 @@ var nr = R.create({
|
|
|
2102
2104
|
"text-spaced": l.paragraphSpacing !== void 0
|
|
2103
2105
|
}),
|
|
2104
2106
|
editor: O(S),
|
|
2105
|
-
style: re([
|
|
2107
|
+
style: re([
|
|
2108
|
+
O(Ne)(l),
|
|
2109
|
+
l.paragraphSpacing === void 0 ? void 0 : { "--bygga-paragraph-spacing": `${l.paragraphSpacing}px` },
|
|
2110
|
+
l.lineHeight === void 0 ? void 0 : { lineHeight: String(l.lineHeight) }
|
|
2111
|
+
])
|
|
2106
2112
|
}, null, 8, [
|
|
2107
2113
|
"class",
|
|
2108
2114
|
"editor",
|
|
@@ -2110,24 +2116,24 @@ var nr = R.create({
|
|
|
2110
2116
|
])]),
|
|
2111
2117
|
_: 1
|
|
2112
2118
|
}, 8, ["width", "align"]),
|
|
2113
|
-
l.editable ? (
|
|
2119
|
+
l.editable ? (v(), t("div", {
|
|
2114
2120
|
key: 0,
|
|
2115
2121
|
ref_key: "toolbar",
|
|
2116
2122
|
ref: T,
|
|
2117
2123
|
popover: "manual",
|
|
2118
2124
|
class: "toolbar",
|
|
2119
|
-
onToggle:
|
|
2125
|
+
onToggle: xe
|
|
2120
2126
|
}, [
|
|
2121
2127
|
i("span", ir, [i("select", {
|
|
2122
2128
|
"aria-label": O(p)("blocks.text.styleLabel"),
|
|
2123
2129
|
class: "style",
|
|
2124
|
-
value:
|
|
2125
|
-
onChange:
|
|
2126
|
-
onMousedown: n[0] ||=
|
|
2127
|
-
}, [l.headerOnly ? E("", !0) : (
|
|
2130
|
+
value: L(),
|
|
2131
|
+
onChange: we,
|
|
2132
|
+
onMousedown: n[0] ||= g(() => {}, ["stop"])
|
|
2133
|
+
}, [l.headerOnly ? E("", !0) : (v(), t("option", or, b(O(p)("blocks.text.styleNormal")), 1)), (v(!0), t(r, null, u(O(We), (e) => (v(), t("option", {
|
|
2128
2134
|
key: e,
|
|
2129
2135
|
value: `h${e}`
|
|
2130
|
-
},
|
|
2136
|
+
}, b(O(p)("blocks.text.styleHeading", { level: e })), 9, sr))), 128))], 40, ar), f(P, {
|
|
2131
2137
|
class: "picker-chevron",
|
|
2132
2138
|
name: "chevron-down",
|
|
2133
2139
|
size: 12
|
|
@@ -2136,20 +2142,20 @@ var nr = R.create({
|
|
|
2136
2142
|
i("span", cr, [i("select", {
|
|
2137
2143
|
"aria-label": O(p)("blocks.text.font"),
|
|
2138
2144
|
class: "font",
|
|
2139
|
-
value:
|
|
2140
|
-
onChange:
|
|
2141
|
-
onMousedown: n[1] ||=
|
|
2145
|
+
value: V(),
|
|
2146
|
+
onChange: Be,
|
|
2147
|
+
onMousedown: n[1] ||= g(() => {}, ["stop"])
|
|
2142
2148
|
}, [
|
|
2143
|
-
i("option", ur,
|
|
2144
|
-
(
|
|
2149
|
+
i("option", ur, b(O(p)("blocks.text.fontMixed")), 1),
|
|
2150
|
+
(v(!0), t(r, null, u(O($e), (e) => (v(), t("option", {
|
|
2145
2151
|
key: e.key,
|
|
2146
2152
|
value: e.key
|
|
2147
|
-
},
|
|
2148
|
-
(
|
|
2149
|
-
key:
|
|
2150
|
-
value:
|
|
2151
|
-
},
|
|
2152
|
-
], 40, lr), f(
|
|
2153
|
+
}, b(e.name), 9, dr))), 128)),
|
|
2154
|
+
(v(!0), t(r, null, u(O(z), (e) => (v(), t("option", {
|
|
2155
|
+
key: B(e.name),
|
|
2156
|
+
value: B(e.name)
|
|
2157
|
+
}, b(e.name), 9, fr))), 128))
|
|
2158
|
+
], 40, lr), f(P, {
|
|
2153
2159
|
class: "picker-chevron",
|
|
2154
2160
|
name: "chevron-down",
|
|
2155
2161
|
size: 12
|
|
@@ -2157,29 +2163,29 @@ var nr = R.create({
|
|
|
2157
2163
|
i("span", pr, [i("select", {
|
|
2158
2164
|
"aria-label": O(p)("blocks.text.fontSize"),
|
|
2159
2165
|
class: "size",
|
|
2160
|
-
value:
|
|
2161
|
-
onChange:
|
|
2162
|
-
onMousedown: n[2] ||=
|
|
2166
|
+
value: Ke(),
|
|
2167
|
+
onChange: Xe,
|
|
2168
|
+
onMousedown: n[2] ||= g(() => {}, ["stop"])
|
|
2163
2169
|
}, [
|
|
2164
|
-
i("option", hr,
|
|
2165
|
-
i("option", gr,
|
|
2166
|
-
(
|
|
2170
|
+
i("option", hr, b(O(p)("blocks.text.fontMixed")), 1),
|
|
2171
|
+
i("option", gr, b(O(p)("blocks.text.fontSizeDefault")), 1),
|
|
2172
|
+
(v(!0), t(r, null, u(O(He), (e) => (v(), t("option", {
|
|
2167
2173
|
key: e,
|
|
2168
2174
|
value: O(Tn)(e)
|
|
2169
|
-
},
|
|
2170
|
-
], 40, mr), f(
|
|
2175
|
+
}, b(e), 9, _r))), 128))
|
|
2176
|
+
], 40, mr), f(P, {
|
|
2171
2177
|
class: "picker-chevron",
|
|
2172
2178
|
name: "chevron-down",
|
|
2173
2179
|
size: 12
|
|
2174
2180
|
})]),
|
|
2175
|
-
f(
|
|
2176
|
-
modelValue:
|
|
2177
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
2181
|
+
f(Ye, {
|
|
2182
|
+
modelValue: et.value,
|
|
2183
|
+
"onUpdate:modelValue": n[3] ||= (e) => et.value = e,
|
|
2178
2184
|
"allow-transparent": !1,
|
|
2179
2185
|
label: O(p)("blocks.text.textColor"),
|
|
2180
2186
|
compact: "",
|
|
2181
2187
|
"keep-focus": "",
|
|
2182
|
-
onMousedown: n[4] ||=
|
|
2188
|
+
onMousedown: n[4] ||= g(() => {}, ["stop"])
|
|
2183
2189
|
}, null, 8, ["modelValue", "label"]),
|
|
2184
2190
|
n[25] ||= i("span", { class: "divider" }, null, -1),
|
|
2185
2191
|
i("button", {
|
|
@@ -2188,7 +2194,7 @@ var nr = R.create({
|
|
|
2188
2194
|
title: O(p)("blocks.text.bold"),
|
|
2189
2195
|
"aria-label": O(p)("blocks.text.bold"),
|
|
2190
2196
|
onClick: n[5] ||= (e) => O(S)?.chain().focus().toggleBold().run(),
|
|
2191
|
-
onMousedown: n[6] ||=
|
|
2197
|
+
onMousedown: n[6] ||= g(() => {}, ["prevent"])
|
|
2192
2198
|
}, [...n[21] ||= [i("b", null, "B", -1)]], 42, vr),
|
|
2193
2199
|
i("button", {
|
|
2194
2200
|
class: D({ active: O(S)?.isActive("italic") }),
|
|
@@ -2196,7 +2202,7 @@ var nr = R.create({
|
|
|
2196
2202
|
title: O(p)("blocks.text.italic"),
|
|
2197
2203
|
"aria-label": O(p)("blocks.text.italic"),
|
|
2198
2204
|
onClick: n[7] ||= (e) => O(S)?.chain().focus().toggleItalic().run(),
|
|
2199
|
-
onMousedown: n[8] ||=
|
|
2205
|
+
onMousedown: n[8] ||= g(() => {}, ["prevent"])
|
|
2200
2206
|
}, [...n[22] ||= [i("i", null, "I", -1)]], 42, yr),
|
|
2201
2207
|
i("button", {
|
|
2202
2208
|
class: D({ active: O(S)?.isActive("underline") }),
|
|
@@ -2204,98 +2210,98 @@ var nr = R.create({
|
|
|
2204
2210
|
title: O(p)("blocks.text.underline"),
|
|
2205
2211
|
"aria-label": O(p)("blocks.text.underline"),
|
|
2206
2212
|
onClick: n[9] ||= (e) => O(S)?.chain().focus().toggleUnderline().run(),
|
|
2207
|
-
onMousedown: n[10] ||=
|
|
2213
|
+
onMousedown: n[10] ||= g(() => {}, ["prevent"])
|
|
2208
2214
|
}, [...n[23] ||= [i("u", null, "U", -1)]], 42, br),
|
|
2209
2215
|
i("button", {
|
|
2210
2216
|
ref_key: "linkTrigger",
|
|
2211
|
-
ref:
|
|
2217
|
+
ref: G,
|
|
2212
2218
|
class: D({ active: O(S)?.isActive("link") }),
|
|
2213
2219
|
type: "button",
|
|
2214
2220
|
title: O(p)("blocks.text.link"),
|
|
2215
|
-
popovertarget: O(
|
|
2221
|
+
popovertarget: O(rt),
|
|
2216
2222
|
"aria-haspopup": "dialog",
|
|
2217
|
-
"aria-expanded":
|
|
2218
|
-
onMousedown: n[11] ||=
|
|
2219
|
-
}, [f(
|
|
2223
|
+
"aria-expanded": ot.value,
|
|
2224
|
+
onMousedown: n[11] ||= g(() => {}, ["prevent"])
|
|
2225
|
+
}, [f(P, {
|
|
2220
2226
|
name: "link",
|
|
2221
2227
|
size: 16
|
|
2222
2228
|
})], 42, xr),
|
|
2223
|
-
l.editable ? (
|
|
2229
|
+
l.editable ? (v(), t("div", {
|
|
2224
2230
|
key: 0,
|
|
2225
|
-
id: O(
|
|
2231
|
+
id: O(rt),
|
|
2226
2232
|
ref_key: "linkPopover",
|
|
2227
|
-
ref:
|
|
2233
|
+
ref: W,
|
|
2228
2234
|
class: "link-popover",
|
|
2229
2235
|
popover: "",
|
|
2230
2236
|
role: "dialog",
|
|
2231
2237
|
"aria-label": O(p)("blocks.text.link"),
|
|
2232
|
-
onBeforetoggle:
|
|
2233
|
-
onToggle:
|
|
2234
|
-
onFocusout:
|
|
2238
|
+
onBeforetoggle: ct,
|
|
2239
|
+
onToggle: lt,
|
|
2240
|
+
onFocusout: ut
|
|
2235
2241
|
}, [
|
|
2236
2242
|
i("span", Cr, [f(Pe, {
|
|
2237
2243
|
ref_key: "linkInput",
|
|
2238
|
-
ref:
|
|
2239
|
-
modelValue:
|
|
2240
|
-
"onUpdate:modelValue": n[12] ||= (e) =>
|
|
2244
|
+
ref: at,
|
|
2245
|
+
modelValue: K.value,
|
|
2246
|
+
"onUpdate:modelValue": n[12] ||= (e) => K.value = e,
|
|
2241
2247
|
inputmode: "url",
|
|
2242
2248
|
spellcheck: "false",
|
|
2243
2249
|
autocomplete: "off",
|
|
2244
2250
|
placeholder: O(p)("blocks.text.linkPlaceholder"),
|
|
2245
2251
|
"aria-label": O(p)("blocks.text.linkPrompt"),
|
|
2246
|
-
onKeydown: le(
|
|
2252
|
+
onKeydown: le(g(q, ["prevent"]), ["enter"])
|
|
2247
2253
|
}, null, 8, [
|
|
2248
2254
|
"modelValue",
|
|
2249
2255
|
"placeholder",
|
|
2250
2256
|
"aria-label",
|
|
2251
2257
|
"onKeydown"
|
|
2252
2258
|
])]),
|
|
2253
|
-
O(
|
|
2259
|
+
O(dt).length ? (v(), t("span", wr, [f(Ve, {
|
|
2254
2260
|
"aria-label": O(p)("blocks.common.anchorLink.label"),
|
|
2255
|
-
"model-value":
|
|
2256
|
-
"onUpdate:modelValue":
|
|
2257
|
-
onMousedown: n[13] ||=
|
|
2261
|
+
"model-value": ft.value,
|
|
2262
|
+
"onUpdate:modelValue": pt,
|
|
2263
|
+
onMousedown: n[13] ||= g(() => {}, ["stop"])
|
|
2258
2264
|
}, {
|
|
2259
|
-
default: C(() => [
|
|
2265
|
+
default: C(() => [ft.value ? (v(), t("option", Tr, b(O(p)("blocks.common.anchorLink.none")), 1)) : (v(), t("option", Er, b(O(p)("blocks.common.anchorLink.placeholder")), 1)), (v(!0), t(r, null, u(O(dt), (e) => (v(), t("option", {
|
|
2260
2266
|
key: e,
|
|
2261
2267
|
value: e
|
|
2262
|
-
}, " #" +
|
|
2268
|
+
}, " #" + b(e), 9, Dr))), 128))]),
|
|
2263
2269
|
_: 1
|
|
2264
2270
|
}, 8, ["aria-label", "model-value"])])) : E("", !0),
|
|
2265
2271
|
i("button", {
|
|
2266
2272
|
class: "link-apply",
|
|
2267
2273
|
type: "button",
|
|
2268
|
-
onClick:
|
|
2269
|
-
onMousedown: n[14] ||=
|
|
2270
|
-
},
|
|
2271
|
-
|
|
2274
|
+
onClick: q,
|
|
2275
|
+
onMousedown: n[14] ||= g(() => {}, ["prevent"])
|
|
2276
|
+
}, b(O(p)("blocks.text.linkApply")), 33),
|
|
2277
|
+
st.value ? (v(), t("button", {
|
|
2272
2278
|
key: 1,
|
|
2273
2279
|
class: "link-remove",
|
|
2274
2280
|
type: "button",
|
|
2275
2281
|
title: O(p)("blocks.text.linkRemove"),
|
|
2276
2282
|
"aria-label": O(p)("blocks.text.linkRemove"),
|
|
2277
|
-
onClick:
|
|
2278
|
-
onMousedown: n[15] ||=
|
|
2279
|
-
}, [f(
|
|
2283
|
+
onClick: mt,
|
|
2284
|
+
onMousedown: n[15] ||= g(() => {}, ["prevent"])
|
|
2285
|
+
}, [f(P, {
|
|
2280
2286
|
name: "trash",
|
|
2281
2287
|
size: 16
|
|
2282
2288
|
})], 40, Or)) : E("", !0)
|
|
2283
2289
|
], 40, Sr)) : E("", !0),
|
|
2284
|
-
f(Cn, { onSelect:
|
|
2290
|
+
f(Cn, { onSelect: Tt }),
|
|
2285
2291
|
f(hn, {
|
|
2286
|
-
actions:
|
|
2287
|
-
pending:
|
|
2288
|
-
onSelect:
|
|
2292
|
+
actions: St.value,
|
|
2293
|
+
pending: Ct.value,
|
|
2294
|
+
onSelect: wt
|
|
2289
2295
|
}, null, 8, ["actions", "pending"]),
|
|
2290
2296
|
n[26] ||= i("span", { class: "divider" }, null, -1),
|
|
2291
|
-
(
|
|
2297
|
+
(v(), t(r, null, u(ee, (e) => i("button", {
|
|
2292
2298
|
key: e,
|
|
2293
2299
|
class: D({ active: O(S)?.isActive({ textAlign: e }) }),
|
|
2294
|
-
title: O(p)(
|
|
2300
|
+
title: O(p)(H[e]),
|
|
2295
2301
|
type: "button",
|
|
2296
2302
|
onClick: (t) => O(S)?.chain().focus().setTextAlign(e).run(),
|
|
2297
|
-
onMousedown: n[16] ||=
|
|
2298
|
-
}, [(
|
|
2303
|
+
onMousedown: n[16] ||= g(() => {}, ["prevent"])
|
|
2304
|
+
}, [(v(), t("svg", Ar, [(v(!0), t(r, null, u(U(e), (e, n) => (v(), t("rect", {
|
|
2299
2305
|
key: n,
|
|
2300
2306
|
fill: "currentColor",
|
|
2301
2307
|
height: "1.5",
|
|
@@ -2305,36 +2311,36 @@ var nr = R.create({
|
|
|
2305
2311
|
y: e.y
|
|
2306
2312
|
}, null, 8, jr))), 128))]))], 42, kr)), 64))
|
|
2307
2313
|
], 544)) : E("", !0),
|
|
2308
|
-
l.editable ? (
|
|
2314
|
+
l.editable ? (v(), t("div", {
|
|
2309
2315
|
key: 1,
|
|
2310
2316
|
ref_key: "pastePrompt",
|
|
2311
|
-
ref:
|
|
2317
|
+
ref: J,
|
|
2312
2318
|
popover: "manual",
|
|
2313
2319
|
class: "paste-prompt",
|
|
2314
2320
|
role: "dialog",
|
|
2315
2321
|
tabindex: "-1",
|
|
2316
|
-
"aria-labelledby": O(
|
|
2317
|
-
onKeydown: le(
|
|
2318
|
-
onFocusout:
|
|
2322
|
+
"aria-labelledby": O(gt),
|
|
2323
|
+
onKeydown: le(g(Q, ["stop", "prevent"]), ["esc"]),
|
|
2324
|
+
onFocusout: yt
|
|
2319
2325
|
}, [
|
|
2320
|
-
i("span", { id: O(
|
|
2326
|
+
i("span", { id: O(gt) }, b(O(p)("blocks.text.pastePrompt.question")), 9, Nr),
|
|
2321
2327
|
i("button", {
|
|
2322
2328
|
ref_key: "pasteKeep",
|
|
2323
|
-
ref:
|
|
2329
|
+
ref: ht,
|
|
2324
2330
|
class: "paste-keep",
|
|
2325
2331
|
type: "button",
|
|
2326
|
-
onClick: n[17] ||= (e) =>
|
|
2327
|
-
onMousedown: n[18] ||=
|
|
2328
|
-
},
|
|
2332
|
+
onClick: n[17] ||= (e) => Z(!0),
|
|
2333
|
+
onMousedown: n[18] ||= g(() => {}, ["prevent"])
|
|
2334
|
+
}, b(O(p)("blocks.text.pastePrompt.keep")), 545),
|
|
2329
2335
|
i("button", {
|
|
2330
2336
|
class: "paste-plain",
|
|
2331
2337
|
type: "button",
|
|
2332
|
-
onClick: n[19] ||= (e) =>
|
|
2333
|
-
onMousedown: n[20] ||=
|
|
2334
|
-
},
|
|
2338
|
+
onClick: n[19] ||= (e) => Z(!1),
|
|
2339
|
+
onMousedown: n[20] ||= g(() => {}, ["prevent"])
|
|
2340
|
+
}, b(O(p)("blocks.text.pastePrompt.plain")), 33)
|
|
2335
2341
|
], 40, Mr)) : E("", !0)
|
|
2336
2342
|
], 544));
|
|
2337
2343
|
}
|
|
2338
|
-
}), [["styles", [".text-spaced .tiptap :is(p,h1,h2,h3,h4,h5,h6){margin:var(--bygga-paragraph-spacing) 0}.tiptap{font-feature-settings:\"liga\" 0;font-variant-ligatures:none;overflow-wrap:break-word;white-space:pre-wrap;position:relative}.text-input .tiptap:focus,.text-input .tiptap:focus-visible{outline:none}.text-input .tiptap .is-editor-empty:first-child{position:relative}.text-input .tiptap .is-editor-empty:first-child:before{color:var(--bygga-color-text-muted);content:attr(data-placeholder);pointer-events:none;text-overflow:ellipsis;inset-inline:0;white-space:nowrap;position:absolute;top:0;overflow:hidden}.merge-tag{background:var(--bygga-color-track);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);color:var(--bygga-color-accent);cursor:default;white-space:nowrap;-webkit-user-select:all;user-select:all;padding:0 .3em;font-size:.9em}.merge-tag.is-unknown{color:var(--bygga-color-text-muted);border-style:dashed}.merge-tag.ProseMirror-selectednode{outline:2px solid var(--bygga-color-accent);outline-offset:1px}", ".toolbar[data-v-
|
|
2344
|
+
}), [["styles", [".text-spaced .tiptap :is(p,h1,h2,h3,h4,h5,h6){margin:var(--bygga-paragraph-spacing) 0}.tiptap{font-feature-settings:\"liga\" 0;font-variant-ligatures:none;overflow-wrap:break-word;white-space:pre-wrap;position:relative}.text-input .tiptap:focus,.text-input .tiptap:focus-visible{outline:none}.text-input .tiptap .is-editor-empty:first-child{position:relative}.text-input .tiptap .is-editor-empty:first-child:before{color:var(--bygga-color-text-muted);content:attr(data-placeholder);pointer-events:none;text-overflow:ellipsis;inset-inline:0;white-space:nowrap;position:absolute;top:0;overflow:hidden}.merge-tag{background:var(--bygga-color-track);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);color:var(--bygga-color-accent);cursor:default;white-space:nowrap;-webkit-user-select:all;user-select:all;padding:0 .3em;font-size:.9em}.merge-tag.is-unknown{color:var(--bygga-color-text-muted);border-style:dashed}.merge-tag.ProseMirror-selectednode{outline:2px solid var(--bygga-color-accent);outline-offset:1px}", ".toolbar[data-v-76cf4ce5]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border-subtle);box-shadow:var(--bygga-shadow-card);white-space:nowrap;font-family:var(--bygga-font-family);direction:ltr;border-radius:0;flex-wrap:wrap;align-items:center;gap:3px;margin:0;padding:6px 4px;font-size:13px;font-weight:400;position:fixed;inset:auto;transform:translateY(-100%)}.toolbar[data-v-76cf4ce5]:popover-open{display:flex}.toolbar>button[data-v-76cf4ce5]{color:var(--bygga-color-text);cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;min-width:30px;height:30px;padding:0;display:inline-flex}.toolbar>button[data-v-76cf4ce5]:hover{background:color-mix(in srgb, var(--bygga-color-text) 30%, transparent)}.toolbar>button.active[data-v-76cf4ce5]{background:var(--bygga-color-selected,var(--bygga-color-text));color:var(--bygga-color-selected-text,#fff);forced-color-adjust:none}.toolbar .picker[data-v-76cf4ce5]{align-items:center;display:inline-flex;position:relative}.toolbar .style[data-v-76cf4ce5],.toolbar .font[data-v-76cf4ce5],.toolbar .size[data-v-76cf4ce5]{appearance:none;color:var(--bygga-color-text);cursor:pointer;font:inherit;text-align-last:right;background:0 0;border:none;border-radius:4px;height:30px;padding:0 21px 0 6px}.toolbar .style[data-v-76cf4ce5]:hover,.toolbar .font[data-v-76cf4ce5]:hover,.toolbar .size[data-v-76cf4ce5]:hover{background:color-mix(in srgb, var(--bygga-color-text) 7%, transparent)}.toolbar .picker-chevron[data-v-76cf4ce5]{color:var(--bygga-color-text);pointer-events:none;position:absolute;right:5px}.toolbar .divider[data-v-76cf4ce5]{background:var(--bygga-color-divider);width:1px;height:24px;margin:0 4px}.link-popover[data-v-76cf4ce5]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-shadow:var(--bygga-shadow-card);align-items:center;gap:.25em;margin:0;padding:.25em;position:fixed;inset:auto}.link-popover[data-v-76cf4ce5]:popover-open{display:flex}.link-field[data-v-76cf4ce5]{width:18em}.link-anchor[data-v-76cf4ce5]{width:10em}.link-apply[data-v-76cf4ce5]{background:var(--bygga-color-accent);border-radius:var(--bygga-radius-sm);color:var(--bygga-color-surface);cursor:pointer;border:none;padding:.4em .8em}.link-remove[data-v-76cf4ce5]{border-radius:var(--bygga-radius-sm);color:var(--bygga-color-text-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;min-width:1.8em;height:1.8em;padding:0;display:inline-flex}.link-remove[data-v-76cf4ce5]:hover{background:var(--bygga-color-track);color:var(--bygga-color-accent)}.paste-prompt[data-v-76cf4ce5]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-shadow:var(--bygga-shadow-card);color:var(--bygga-color-text);font-family:var(--bygga-font-family);white-space:nowrap;direction:ltr;align-items:center;gap:8px;margin:0;padding:6px 6px 6px 10px;font-size:13px;font-weight:400;position:fixed;inset:auto}.paste-prompt[data-v-76cf4ce5]:popover-open{display:flex}.paste-keep[data-v-76cf4ce5],.paste-plain[data-v-76cf4ce5]{border-radius:var(--bygga-radius-sm);cursor:pointer;font:inherit;padding:.4em .8em}.paste-keep[data-v-76cf4ce5]{background:var(--bygga-color-accent);border:1px solid var(--bygga-color-accent);color:var(--bygga-color-surface)}.paste-plain[data-v-76cf4ce5]{border:1px solid var(--bygga-color-border);color:var(--bygga-color-text);background:0 0}"]], ["__scopeId", "data-v-76cf4ce5"]]);
|
|
2339
2345
|
//#endregion
|
|
2340
2346
|
export { Ir as default };
|