ablok-components 0.3.62 → 0.3.64

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,4 +1,4 @@
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";
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 r, 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
4
  const R = {
@@ -15,6 +15,7 @@ const R = {
15
15
  role: "button",
16
16
  type: "button"
17
17
  }, W = { class: "dropdown-menu" }, X = { class: "btn-group" }, Y = ["disabled"], Z = ["disabled"], _ = ["title"], it = /* @__PURE__ */ S({
18
+ inheritAttrs: !1,
18
19
  __name: "rte-editor",
19
20
  props: {
20
21
  modelValue: {
@@ -39,10 +40,10 @@ const R = {
39
40
  const g = a, A = k, v = f(!1), d = f(!1), t = p(void 0), m = p(null);
40
41
  M(async () => {
41
42
  const [
42
- { Editor: r, mergeAttributes: e },
43
+ { Editor: c, mergeAttributes: e },
43
44
  { EditorContent: s },
44
- { default: x },
45
45
  { default: L },
46
+ { default: x },
46
47
  { default: T },
47
48
  { default: $ },
48
49
  { default: w }
@@ -55,7 +56,7 @@ const R = {
55
56
  import("@tiptap/starter-kit"),
56
57
  import("@tiptap/extension-bold")
57
58
  ]);
58
- m.value = s, t.value = new r({
59
+ m.value = s, t.value = new c({
59
60
  content: g.modelValue,
60
61
  onUpdate: () => {
61
62
  A("update:modelValue", t.value?.getHTML());
@@ -83,10 +84,10 @@ const R = {
83
84
  return ["strong", e(this.options.HTMLAttributes, o), 0];
84
85
  }
85
86
  }),
86
- L.configure({
87
+ x.configure({
87
88
  types: ["heading", "paragraph"]
88
89
  }),
89
- x,
90
+ L,
90
91
  T.extend({
91
92
  addAttributes() {
92
93
  return {
@@ -152,15 +153,15 @@ const R = {
152
153
  });
153
154
  }), V(() => {
154
155
  t.value?.destroy();
155
- }), E(() => g.modelValue, (r, e) => {
156
+ }), E(() => g.modelValue, (c, e) => {
156
157
  if (t.value) {
157
- if (t.value.getHTML() === r)
158
+ if (t.value.getHTML() === c)
158
159
  return;
159
- t.value.commands.setContent(r);
160
+ t.value.commands.setContent(c);
160
161
  }
161
162
  });
162
163
  function B() {
163
- const r = t.value?.getAttributes("link").href, e = window.prompt("URL", r);
164
+ const c = t.value?.getAttributes("link").href, e = window.prompt("URL", c);
164
165
  if (e !== null) {
165
166
  if (e === "") {
166
167
  t.value?.chain().focus().extendMarkRange("link").unsetLink().run();
@@ -178,12 +179,12 @@ const R = {
178
179
  }, C = () => {
179
180
  t.value?.commands.setContent(t.value.getText()), v.value = !1;
180
181
  };
181
- return (r, e) => (u(), c(U, {
182
+ return (c, e) => (u(), r(U, {
182
183
  to: "body",
183
184
  disabled: !d.value
184
185
  }, [
185
186
  l("div", {
186
- class: b(["rte-editor", { "rte-editor--fullscreen": d.value }])
187
+ class: b([d.value ? "" : c.$attrs.class, "rte-editor", { "rte-editor--fullscreen": d.value }])
187
188
  }, [
188
189
  t.value ? (u(), h("div", R, [
189
190
  v.value ? (u(), h("button", {
@@ -236,23 +237,23 @@ const R = {
236
237
  l("div", D, [
237
238
  l("div", K, [
238
239
  l("button", q, [
239
- t.value.isActive("heading", { level: 1 }) ? (u(), c(n, {
240
+ t.value.isActive("heading", { level: 1 }) ? (u(), r(n, {
240
241
  key: 0,
241
242
  symbol: "h1",
242
243
  "base-path": a.iconBasePath
243
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 2 }) ? (u(), c(n, {
244
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 2 }) ? (u(), r(n, {
244
245
  key: 1,
245
246
  symbol: "h2",
246
247
  "base-path": a.iconBasePath
247
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 3 }) ? (u(), c(n, {
248
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 3 }) ? (u(), r(n, {
248
249
  key: 2,
249
250
  symbol: "h3",
250
251
  "base-path": a.iconBasePath
251
- }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 4 }) ? (u(), c(n, {
252
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 4 }) ? (u(), r(n, {
252
253
  key: 3,
253
254
  symbol: "h4",
254
255
  "base-path": a.iconBasePath
255
- }, null, 8, ["base-path"])) : (u(), c(n, {
256
+ }, null, 8, ["base-path"])) : (u(), r(n, {
256
257
  key: 4,
257
258
  symbol: "headline",
258
259
  "base-path": a.iconBasePath
@@ -342,19 +343,19 @@ const R = {
342
343
  ]),
343
344
  l("div", J, [
344
345
  l("button", Q, [
345
- t.value.isActive({ textAlign: "center" }) ? (u(), c(n, {
346
+ t.value.isActive({ textAlign: "center" }) ? (u(), r(n, {
346
347
  key: 0,
347
348
  symbol: "align-center",
348
349
  "base-path": a.iconBasePath
349
- }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "left" }) ? (u(), c(n, {
350
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "left" }) ? (u(), r(n, {
350
351
  key: 1,
351
352
  symbol: "align-left",
352
353
  "base-path": a.iconBasePath
353
- }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "right" }) ? (u(), c(n, {
354
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "right" }) ? (u(), r(n, {
354
355
  key: 2,
355
356
  symbol: "align-right",
356
357
  "base-path": a.iconBasePath
357
- }, null, 8, ["base-path"])) : (u(), c(n, {
358
+ }, null, 8, ["base-path"])) : (u(), r(n, {
358
359
  key: 3,
359
360
  symbol: "align-justify",
360
361
  "base-path": a.iconBasePath
@@ -464,7 +465,7 @@ const R = {
464
465
  }, null, 8, ["symbol", "base-path"])
465
466
  ], 8, _)) : y("", !0)
466
467
  ])) : y("", !0),
467
- (u(), c(F(m.value), {
468
+ (u(), r(F(m.value), {
468
469
  class: "rte-editor__content",
469
470
  editor: t.value
470
471
  }, null, 8, ["editor"]))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.62",
4
+ "version": "0.3.64",
5
5
  "dependencies": {
6
6
  "date-fns": "^3.0.0",
7
7
  "dompurify": "^3.3.1",