ablok-components 0.3.59 → 0.3.60

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