ablok-components 0.3.59 → 0.3.61

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.
@@ -1,7 +1,7 @@
1
- import { defineComponent as H, ref as $, shallowRef as m, onMounted as w, onBeforeUnmount as S, watch as M, openBlock as u, createElementBlock as d, normalizeClass as b, createVNode as s, createElementVNode as l, createBlock as c, createCommentVNode as V, resolveDynamicComponent as E } from "vue";
1
+ import { defineComponent as S, ref as f, shallowRef as p, onMounted as M, onBeforeUnmount as V, watch as E, openBlock as u, createBlock as c, Teleport as U, createElementVNode as l, normalizeClass as b, createElementBlock as h, createVNode as i, createCommentVNode as y, resolveDynamicComponent as F } from "vue";
2
2
  import n from "../../atoms/svg-icon/svg-icon.vue.js";
3
3
  /* empty css */
4
- const U = { class: "rte-editor" }, R = {
4
+ const R = {
5
5
  key: 0,
6
6
  class: "rte-editor__controls mb-2"
7
7
  }, I = ["disabled"], N = ["disabled"], O = { class: "btn-group" }, j = ["disabled"], z = ["disabled"], D = { class: "btn-group" }, K = { class: "dropdown" }, q = {
@@ -9,12 +9,12 @@ const U = { class: "rte-editor" }, R = {
9
9
  "data-bs-toggle": "dropdown",
10
10
  role: "button",
11
11
  type: "button"
12
- }, F = { class: "dropdown-menu" }, G = { class: "dropdown" }, J = {
12
+ }, G = { class: "dropdown-menu" }, J = { class: "dropdown" }, Q = {
13
13
  class: "btn dropdown-toggle btn-light",
14
14
  "data-bs-toggle": "dropdown",
15
15
  role: "button",
16
16
  type: "button"
17
- }, Q = { class: "dropdown-menu" }, W = { class: "btn-group" }, X = ["disabled"], Y = ["disabled"], nt = /* @__PURE__ */ H({
17
+ }, W = { class: "dropdown-menu" }, X = { class: "btn-group" }, Y = ["disabled"], Z = ["disabled"], _ = ["title"], it = /* @__PURE__ */ S({
18
18
  __name: "rte-editor",
19
19
  props: {
20
20
  modelValue: {
@@ -28,20 +28,24 @@ const U = { class: "rte-editor" }, R = {
28
28
  iconBasePath: {
29
29
  type: String,
30
30
  default: "/rte-icons-defs.svg"
31
+ },
32
+ allowFullscreen: {
33
+ type: Boolean,
34
+ default: !1
31
35
  }
32
36
  },
33
37
  emits: ["update:modelValue"],
34
- setup(a, { emit: f }) {
35
- const g = a, p = f, h = $(!1), t = m(void 0), v = m(null);
36
- w(async () => {
38
+ setup(a, { emit: k }) {
39
+ const g = a, A = k, v = f(!1), d = f(!1), t = p(void 0), m = p(null);
40
+ M(async () => {
37
41
  const [
38
42
  { Editor: r, mergeAttributes: e },
39
- { EditorContent: i },
40
- { default: B },
41
- { default: P },
42
- { default: C },
43
+ { EditorContent: s },
44
+ { default: x },
43
45
  { default: L },
44
- { default: x }
46
+ { default: T },
47
+ { default: $ },
48
+ { default: w }
45
49
  ] = await Promise.all([
46
50
  import("@tiptap/core"),
47
51
  import("@tiptap/vue-3"),
@@ -51,17 +55,17 @@ const U = { class: "rte-editor" }, R = {
51
55
  import("@tiptap/starter-kit"),
52
56
  import("@tiptap/extension-bold")
53
57
  ]);
54
- v.value = i, t.value = new r({
58
+ m.value = s, t.value = new r({
55
59
  content: g.modelValue,
56
60
  onUpdate: () => {
57
- p("update:modelValue", t.value?.getHTML());
61
+ A("update:modelValue", t.value?.getHTML());
58
62
  },
59
63
  extensions: [
60
- L.configure({
64
+ $.configure({
61
65
  bold: !1,
62
66
  link: !1
63
67
  }),
64
- x.extend({
68
+ w.extend({
65
69
  addAttributes() {
66
70
  return {
67
71
  class: {
@@ -79,11 +83,11 @@ const U = { class: "rte-editor" }, R = {
79
83
  return ["strong", e(this.options.HTMLAttributes, o), 0];
80
84
  }
81
85
  }),
82
- P.configure({
86
+ L.configure({
83
87
  types: ["heading", "paragraph"]
84
88
  }),
85
- B,
86
- C.extend({
89
+ x,
90
+ T.extend({
87
91
  addAttributes() {
88
92
  return {
89
93
  ...this.parent?.(),
@@ -129,8 +133,8 @@ const U = { class: "rte-editor" }, R = {
129
133
  },
130
134
  renderHTML({ HTMLAttributes: o }) {
131
135
  if (!o.href) {
132
- const { href: Z, target: _, rel: tt, ...T } = o;
133
- return ["a", e(T), 0];
136
+ const { href: tt, target: et, rel: lt, ...H } = o;
137
+ return ["a", e(H), 0];
134
138
  }
135
139
  return ["a", e(this.options.HTMLAttributes, o), 0];
136
140
  }
@@ -146,16 +150,16 @@ const U = { class: "rte-editor" }, R = {
146
150
  })
147
151
  ]
148
152
  });
149
- }), S(() => {
153
+ }), V(() => {
150
154
  t.value?.destroy();
151
- }), M(() => g.modelValue, (r, e) => {
155
+ }), E(() => g.modelValue, (r, e) => {
152
156
  if (t.value) {
153
157
  if (t.value.getHTML() === r)
154
158
  return;
155
159
  t.value.commands.setContent(r);
156
160
  }
157
161
  });
158
- function k() {
162
+ function B() {
159
163
  const r = t.value?.getAttributes("link").href, e = window.prompt("URL", r);
160
164
  if (e !== null) {
161
165
  if (e === "") {
@@ -164,292 +168,310 @@ const U = { class: "rte-editor" }, R = {
164
168
  }
165
169
  try {
166
170
  t.value?.chain().focus().extendMarkRange("link").setLink({ href: e }).run();
167
- } catch (i) {
168
- alert(i.message);
171
+ } catch (s) {
172
+ alert(s.message);
169
173
  }
170
174
  }
171
175
  }
172
- const y = () => {
173
- t.value?.commands.setContent(`<textarea>${t.value.getHTML()}</textarea>`), h.value = !0;
174
- }, A = () => {
175
- t.value?.commands.setContent(t.value.getText()), h.value = !1;
176
+ const P = () => {
177
+ t.value?.commands.setContent(`<textarea>${t.value.getHTML()}</textarea>`), v.value = !0;
178
+ }, C = () => {
179
+ t.value?.commands.setContent(t.value.getText()), v.value = !1;
176
180
  };
177
- return (r, e) => (u(), d("div", U, [
178
- t.value ? (u(), d("div", R, [
179
- h.value ? (u(), d("button", {
180
- key: 1,
181
- class: "btn btn-sm btn-light is-active",
182
- onClick: A,
183
- disabled: !t.value.can().chain().focus().toggleCode().run(),
184
- title: "Toggle Source"
185
- }, [
186
- s(n, {
187
- symbol: "source",
188
- "base-path": a.iconBasePath
189
- }, null, 8, ["base-path"])
190
- ], 8, N)) : (u(), d("button", {
191
- key: 0,
192
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("code") }]),
193
- onClick: y,
194
- disabled: !t.value.can().chain().focus().toggleCode().run(),
195
- title: "Toggle Source"
196
- }, [
197
- s(n, {
198
- symbol: "source",
199
- "base-path": a.iconBasePath
200
- }, null, 8, ["base-path"])
201
- ], 10, I)),
202
- l("div", O, [
203
- l("button", {
204
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bold") }]),
205
- onClick: e[0] || (e[0] = (i) => t.value?.chain().focus().toggleBold().run()),
206
- disabled: !t.value.can().chain().focus().toggleBold().run(),
207
- title: "Toggle Bold"
181
+ return (r, e) => (u(), c(U, {
182
+ to: "body",
183
+ disabled: !d.value
184
+ }, [
185
+ l("div", {
186
+ class: b(["rte-editor", { "rte-editor--fullscreen": d.value }])
187
+ }, [
188
+ t.value ? (u(), h("div", R, [
189
+ v.value ? (u(), h("button", {
190
+ key: 1,
191
+ class: "btn btn-sm btn-light is-active",
192
+ onClick: C,
193
+ disabled: !t.value.can().chain().focus().toggleCode().run(),
194
+ title: "Toggle Source"
208
195
  }, [
209
- s(n, {
210
- symbol: "bold",
196
+ i(n, {
197
+ symbol: "source",
211
198
  "base-path": a.iconBasePath
212
199
  }, null, 8, ["base-path"])
213
- ], 10, j),
214
- l("button", {
215
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("italic") }]),
216
- onClick: e[1] || (e[1] = (i) => t.value?.chain().focus().toggleItalic().run()),
217
- disabled: !t.value.can().chain().focus().toggleItalic().run(),
218
- title: "Toggle Italic"
200
+ ], 8, N)) : (u(), h("button", {
201
+ key: 0,
202
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("code") }]),
203
+ onClick: P,
204
+ disabled: !t.value.can().chain().focus().toggleCode().run(),
205
+ title: "Toggle Source"
219
206
  }, [
220
- s(n, {
221
- symbol: "italic",
207
+ i(n, {
208
+ symbol: "source",
222
209
  "base-path": a.iconBasePath
223
210
  }, null, 8, ["base-path"])
224
- ], 10, z)
225
- ]),
226
- l("div", D, [
227
- l("div", K, [
228
- l("button", q, [
229
- t.value.isActive("heading", { level: 1 }) ? (u(), c(n, {
211
+ ], 10, I)),
212
+ l("div", O, [
213
+ l("button", {
214
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bold") }]),
215
+ onClick: e[0] || (e[0] = (s) => t.value?.chain().focus().toggleBold().run()),
216
+ disabled: !t.value.can().chain().focus().toggleBold().run(),
217
+ title: "Toggle Bold"
218
+ }, [
219
+ i(n, {
220
+ symbol: "bold",
221
+ "base-path": a.iconBasePath
222
+ }, null, 8, ["base-path"])
223
+ ], 10, j),
224
+ l("button", {
225
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("italic") }]),
226
+ onClick: e[1] || (e[1] = (s) => t.value?.chain().focus().toggleItalic().run()),
227
+ disabled: !t.value.can().chain().focus().toggleItalic().run(),
228
+ title: "Toggle Italic"
229
+ }, [
230
+ i(n, {
231
+ symbol: "italic",
232
+ "base-path": a.iconBasePath
233
+ }, null, 8, ["base-path"])
234
+ ], 10, z)
235
+ ]),
236
+ l("div", D, [
237
+ l("div", K, [
238
+ l("button", q, [
239
+ t.value.isActive("heading", { level: 1 }) ? (u(), c(n, {
240
+ key: 0,
241
+ symbol: "h1",
242
+ "base-path": a.iconBasePath
243
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 2 }) ? (u(), c(n, {
244
+ key: 1,
245
+ symbol: "h2",
246
+ "base-path": a.iconBasePath
247
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 3 }) ? (u(), c(n, {
248
+ key: 2,
249
+ symbol: "h3",
250
+ "base-path": a.iconBasePath
251
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 4 }) ? (u(), c(n, {
252
+ key: 3,
253
+ symbol: "h4",
254
+ "base-path": a.iconBasePath
255
+ }, null, 8, ["base-path"])) : (u(), c(n, {
256
+ key: 4,
257
+ symbol: "headline",
258
+ "base-path": a.iconBasePath
259
+ }, null, 8, ["base-path"]))
260
+ ]),
261
+ l("ul", G, [
262
+ l("li", null, [
263
+ l("button", {
264
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 1 }) }]),
265
+ onClick: e[2] || (e[2] = (s) => t.value?.chain().focus().setHeading({ level: 1 }).run()),
266
+ title: "Set Heading 1"
267
+ }, [
268
+ i(n, {
269
+ symbol: "h1",
270
+ "base-path": a.iconBasePath
271
+ }, null, 8, ["base-path"])
272
+ ], 2)
273
+ ]),
274
+ l("li", null, [
275
+ l("button", {
276
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 2 }) }]),
277
+ onClick: e[3] || (e[3] = (s) => t.value?.chain().focus().setHeading({ level: 2 }).run()),
278
+ title: "Set Heading 2"
279
+ }, [
280
+ i(n, {
281
+ symbol: "h2",
282
+ "base-path": a.iconBasePath
283
+ }, null, 8, ["base-path"])
284
+ ], 2)
285
+ ]),
286
+ l("li", null, [
287
+ l("button", {
288
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 3 }) }]),
289
+ onClick: e[4] || (e[4] = (s) => t.value?.chain().focus().setHeading({ level: 3 }).run()),
290
+ title: "Set Heading 3"
291
+ }, [
292
+ i(n, {
293
+ symbol: "h3",
294
+ "base-path": a.iconBasePath
295
+ }, null, 8, ["base-path"])
296
+ ], 2)
297
+ ]),
298
+ l("li", null, [
299
+ l("button", {
300
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 4 }) }]),
301
+ onClick: e[5] || (e[5] = (s) => t.value?.chain().focus().setHeading({ level: 4 }).run()),
302
+ title: "Set Heading 4"
303
+ }, [
304
+ i(n, {
305
+ symbol: "h4",
306
+ "base-path": a.iconBasePath
307
+ }, null, 8, ["base-path"])
308
+ ], 2)
309
+ ])
310
+ ])
311
+ ]),
312
+ l("button", {
313
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("paragraph") }]),
314
+ onClick: e[6] || (e[6] = (s) => t.value?.chain().focus().setParagraph().run()),
315
+ title: "Set Paragraph"
316
+ }, [
317
+ i(n, {
318
+ symbol: "paragraph",
319
+ "base-path": a.iconBasePath
320
+ }, null, 8, ["base-path"])
321
+ ], 2),
322
+ l("button", {
323
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bulletList") }]),
324
+ onClick: e[7] || (e[7] = (s) => t.value?.chain().focus().toggleBulletList().run()),
325
+ title: "Toggle Bullet List"
326
+ }, [
327
+ i(n, {
328
+ symbol: "list",
329
+ "base-path": a.iconBasePath
330
+ }, null, 8, ["base-path"])
331
+ ], 2),
332
+ l("button", {
333
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("orderedList") }]),
334
+ onClick: e[8] || (e[8] = (s) => t.value?.chain().focus().toggleOrderedList().run()),
335
+ title: "Toggle Ordered List"
336
+ }, [
337
+ i(n, {
338
+ symbol: "ordered-list",
339
+ "base-path": a.iconBasePath
340
+ }, null, 8, ["base-path"])
341
+ ], 2)
342
+ ]),
343
+ l("div", J, [
344
+ l("button", Q, [
345
+ t.value.isActive({ textAlign: "center" }) ? (u(), c(n, {
230
346
  key: 0,
231
- symbol: "h1",
347
+ symbol: "align-center",
232
348
  "base-path": a.iconBasePath
233
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 2 }) ? (u(), c(n, {
349
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "left" }) ? (u(), c(n, {
234
350
  key: 1,
235
- symbol: "h2",
351
+ symbol: "align-left",
236
352
  "base-path": a.iconBasePath
237
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 3 }) ? (u(), c(n, {
353
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "right" }) ? (u(), c(n, {
238
354
  key: 2,
239
- symbol: "h3",
240
- "base-path": a.iconBasePath
241
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 4 }) ? (u(), c(n, {
242
- key: 3,
243
- symbol: "h4",
355
+ symbol: "align-right",
244
356
  "base-path": a.iconBasePath
245
357
  }, null, 8, ["base-path"])) : (u(), c(n, {
246
- key: 4,
247
- symbol: "headline",
358
+ key: 3,
359
+ symbol: "align-justify",
248
360
  "base-path": a.iconBasePath
249
361
  }, null, 8, ["base-path"]))
250
362
  ]),
251
- l("ul", F, [
363
+ l("ul", W, [
252
364
  l("li", null, [
253
365
  l("button", {
254
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 1 }) }]),
255
- onClick: e[2] || (e[2] = (i) => t.value?.chain().focus().setHeading({ level: 1 }).run()),
256
- title: "Set Heading 1"
366
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "left" }) }]),
367
+ onClick: e[9] || (e[9] = (s) => t.value?.chain().focus().setTextAlign("left").run())
257
368
  }, [
258
- s(n, {
259
- symbol: "h1",
369
+ i(n, {
370
+ symbol: "align-left",
260
371
  "base-path": a.iconBasePath
261
372
  }, null, 8, ["base-path"])
262
373
  ], 2)
263
374
  ]),
264
375
  l("li", null, [
265
376
  l("button", {
266
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 2 }) }]),
267
- onClick: e[3] || (e[3] = (i) => t.value?.chain().focus().setHeading({ level: 2 }).run()),
268
- title: "Set Heading 2"
377
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "center" }) }]),
378
+ onClick: e[10] || (e[10] = (s) => t.value?.chain().focus().setTextAlign("center").run())
269
379
  }, [
270
- s(n, {
271
- symbol: "h2",
380
+ i(n, {
381
+ symbol: "align-center",
272
382
  "base-path": a.iconBasePath
273
383
  }, null, 8, ["base-path"])
274
384
  ], 2)
275
385
  ]),
276
386
  l("li", null, [
277
387
  l("button", {
278
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 3 }) }]),
279
- onClick: e[4] || (e[4] = (i) => t.value?.chain().focus().setHeading({ level: 3 }).run()),
280
- title: "Set Heading 3"
388
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "right" }) }]),
389
+ onClick: e[11] || (e[11] = (s) => t.value?.chain().focus().setTextAlign("right").run())
281
390
  }, [
282
- s(n, {
283
- symbol: "h3",
391
+ i(n, {
392
+ symbol: "align-right",
284
393
  "base-path": a.iconBasePath
285
394
  }, null, 8, ["base-path"])
286
395
  ], 2)
287
396
  ]),
288
397
  l("li", null, [
289
398
  l("button", {
290
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 4 }) }]),
291
- onClick: e[5] || (e[5] = (i) => t.value?.chain().focus().setHeading({ level: 4 }).run()),
292
- title: "Set Heading 4"
399
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "pretty" }) }]),
400
+ onClick: e[12] || (e[12] = (s) => t.value?.chain().focus().setTextAlign("right").run())
293
401
  }, [
294
- s(n, {
295
- symbol: "h4",
402
+ i(n, {
403
+ symbol: "align-justify",
296
404
  "base-path": a.iconBasePath
297
405
  }, null, 8, ["base-path"])
298
406
  ], 2)
299
407
  ])
300
408
  ])
301
409
  ]),
302
- l("button", {
303
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("paragraph") }]),
304
- onClick: e[6] || (e[6] = (i) => t.value?.chain().focus().setParagraph().run()),
305
- title: "Set Paragraph"
306
- }, [
307
- s(n, {
308
- symbol: "paragraph",
309
- "base-path": a.iconBasePath
310
- }, null, 8, ["base-path"])
311
- ], 2),
312
- l("button", {
313
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bulletList") }]),
314
- onClick: e[7] || (e[7] = (i) => t.value?.chain().focus().toggleBulletList().run()),
315
- title: "Toggle Bullet List"
410
+ t.value.isActive("link") ? (u(), h("button", {
411
+ key: 3,
412
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
413
+ onClick: e[13] || (e[13] = (s) => t.value.chain().focus().unsetLink().run()),
414
+ title: "Unset Link"
316
415
  }, [
317
- s(n, {
318
- symbol: "list",
416
+ i(n, {
417
+ symbol: "unlink",
319
418
  "base-path": a.iconBasePath
320
419
  }, null, 8, ["base-path"])
321
- ], 2),
322
- l("button", {
323
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("orderedList") }]),
324
- onClick: e[8] || (e[8] = (i) => t.value?.chain().focus().toggleOrderedList().run()),
325
- title: "Toggle Ordered List"
420
+ ], 2)) : (u(), h("button", {
421
+ key: 2,
422
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
423
+ onClick: B,
424
+ title: "Set Link"
326
425
  }, [
327
- s(n, {
328
- symbol: "ordered-list",
426
+ i(n, {
427
+ symbol: "link",
329
428
  "base-path": a.iconBasePath
330
429
  }, null, 8, ["base-path"])
331
- ], 2)
332
- ]),
333
- l("div", G, [
334
- l("button", J, [
335
- t.value.isActive({ textAlign: "center" }) ? (u(), c(n, {
336
- key: 0,
337
- symbol: "align-center",
338
- "base-path": a.iconBasePath
339
- }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "left" }) ? (u(), c(n, {
340
- key: 1,
341
- symbol: "align-left",
342
- "base-path": a.iconBasePath
343
- }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "right" }) ? (u(), c(n, {
344
- key: 2,
345
- symbol: "align-right",
346
- "base-path": a.iconBasePath
347
- }, null, 8, ["base-path"])) : (u(), c(n, {
348
- key: 3,
349
- symbol: "align-justify",
350
- "base-path": a.iconBasePath
351
- }, null, 8, ["base-path"]))
430
+ ], 2)),
431
+ l("div", X, [
432
+ l("button", {
433
+ class: "btn btn-sm btn-light",
434
+ onClick: e[14] || (e[14] = (s) => t.value?.chain().focus().undo().run()),
435
+ disabled: !t.value.can().chain().focus().undo().run(),
436
+ title: "Undo"
437
+ }, [
438
+ i(n, {
439
+ symbol: "undo",
440
+ "base-path": a.iconBasePath
441
+ }, null, 8, ["base-path"])
442
+ ], 8, Y),
443
+ l("button", {
444
+ class: "btn btn-sm btn-light",
445
+ onClick: e[15] || (e[15] = (s) => t.value?.chain().focus().redo().run()),
446
+ disabled: !t.value.can().chain().focus().redo().run(),
447
+ title: "Redo"
448
+ }, [
449
+ i(n, {
450
+ symbol: "redo",
451
+ "base-path": a.iconBasePath
452
+ }, null, 8, ["base-path"])
453
+ ], 8, Z)
352
454
  ]),
353
- l("ul", Q, [
354
- l("li", null, [
355
- l("button", {
356
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "left" }) }]),
357
- onClick: e[9] || (e[9] = (i) => t.value?.chain().focus().setTextAlign("left").run())
358
- }, [
359
- s(n, {
360
- symbol: "align-left",
361
- "base-path": a.iconBasePath
362
- }, null, 8, ["base-path"])
363
- ], 2)
364
- ]),
365
- l("li", null, [
366
- l("button", {
367
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "center" }) }]),
368
- onClick: e[10] || (e[10] = (i) => t.value?.chain().focus().setTextAlign("center").run())
369
- }, [
370
- s(n, {
371
- symbol: "align-center",
372
- "base-path": a.iconBasePath
373
- }, null, 8, ["base-path"])
374
- ], 2)
375
- ]),
376
- l("li", null, [
377
- l("button", {
378
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "right" }) }]),
379
- onClick: e[11] || (e[11] = (i) => t.value?.chain().focus().setTextAlign("right").run())
380
- }, [
381
- s(n, {
382
- symbol: "align-right",
383
- "base-path": a.iconBasePath
384
- }, null, 8, ["base-path"])
385
- ], 2)
386
- ]),
387
- l("li", null, [
388
- l("button", {
389
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "pretty" }) }]),
390
- onClick: e[12] || (e[12] = (i) => t.value?.chain().focus().setTextAlign("right").run())
391
- }, [
392
- s(n, {
393
- symbol: "align-justify",
394
- "base-path": a.iconBasePath
395
- }, null, 8, ["base-path"])
396
- ], 2)
397
- ])
398
- ])
399
- ]),
400
- t.value.isActive("link") ? (u(), d("button", {
401
- key: 3,
402
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
403
- onClick: e[13] || (e[13] = (i) => t.value.chain().focus().unsetLink().run()),
404
- title: "Unset Link"
405
- }, [
406
- s(n, {
407
- symbol: "unlink",
408
- "base-path": a.iconBasePath
409
- }, null, 8, ["base-path"])
410
- ], 2)) : (u(), d("button", {
411
- key: 2,
412
- class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
413
- onClick: k,
414
- title: "Set Link"
415
- }, [
416
- s(n, {
417
- symbol: "link",
418
- "base-path": a.iconBasePath
419
- }, null, 8, ["base-path"])
420
- ], 2)),
421
- l("div", W, [
422
- l("button", {
423
- class: "btn btn-sm btn-light",
424
- onClick: e[14] || (e[14] = (i) => t.value?.chain().focus().undo().run()),
425
- disabled: !t.value.can().chain().focus().undo().run(),
426
- title: "Undo"
455
+ a.allowFullscreen ? (u(), h("button", {
456
+ key: 4,
457
+ class: "btn btn-sm btn-light ms-auto",
458
+ onClick: e[16] || (e[16] = (s) => d.value = !d.value),
459
+ title: d.value ? "Exit Fullscreen" : "Fullscreen"
427
460
  }, [
428
- s(n, {
429
- symbol: "undo",
461
+ i(n, {
462
+ symbol: d.value ? "close" : "maximize",
430
463
  "base-path": a.iconBasePath
431
- }, null, 8, ["base-path"])
432
- ], 8, X),
433
- l("button", {
434
- class: "btn btn-sm btn-light",
435
- onClick: e[15] || (e[15] = (i) => t.value?.chain().focus().redo().run()),
436
- disabled: !t.value.can().chain().focus().redo().run(),
437
- title: "Redo"
438
- }, [
439
- s(n, {
440
- symbol: "redo",
441
- "base-path": a.iconBasePath
442
- }, null, 8, ["base-path"])
443
- ], 8, Y)
444
- ])
445
- ])) : V("", !0),
446
- (u(), c(E(v.value), {
447
- class: "rte-editor__content",
448
- editor: t.value
449
- }, null, 8, ["editor"]))
450
- ]));
464
+ }, null, 8, ["symbol", "base-path"])
465
+ ], 8, _)) : y("", !0)
466
+ ])) : y("", !0),
467
+ (u(), c(F(m.value), {
468
+ class: "rte-editor__content",
469
+ editor: t.value
470
+ }, null, 8, ["editor"]))
471
+ ], 2)
472
+ ], 8, ["disabled"]));
451
473
  }
452
474
  });
453
475
  export {
454
- nt as default
476
+ it as default
455
477
  };