ablok-components 0.3.144 → 0.3.146

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.
@@ -5,11 +5,12 @@ import r from "../input-dropdown/input-dropdown.js";
5
5
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, resolveComponent as g, vModelText as _, withCtx as v, withDirectives as y } from "vue";
6
6
  //#region src/components/molecules/input-gradient/input-gradient.vue?vue&type=script&setup=true&lang.ts
7
7
  var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title"], w = { class: "input-gradient__toggle-icon position-absolute end-0 height-100 d-flex justify-content-center align-items-center bg-white bg-opacity-50 input-gradient__toggle-icon" }, T = { class: "dropdown-menu input-gradient__menu" }, E = { class: "input-gradient__stop d-flex align-items-center px-3 py-2" }, D = { class: "col-7" }, O = { class: "col" }, k = [
8
- "onUpdate:modelValue",
8
+ "value",
9
9
  "name",
10
10
  "id",
11
11
  "aria-label",
12
- "disabled"
12
+ "disabled",
13
+ "onInput"
13
14
  ], A = { class: "col-auto" }, j = { class: "input-gradient__footer px-3 py-2" }, M = { class: "col-7" }, N = { class: "col" }, P = [
14
15
  "name",
15
16
  "id",
@@ -85,43 +86,49 @@ var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title
85
86
  return L.modelValue?.type ?? "linear";
86
87
  },
87
88
  set(e) {
88
- G({ type: e });
89
+ K({ type: e });
89
90
  }
90
91
  }), V = a(() => L.modelValue?.stops ?? []), H = a({
91
92
  get() {
92
93
  return L.modelValue?.angle ?? 180;
93
94
  },
94
95
  set(e) {
95
- G({ angle: J(Number(e) || 0, 0, 360) });
96
+ K({ angle: Y(Number(e) || 0, 0, 360) });
96
97
  }
97
98
  }), U = a(() => {
98
99
  let e = V.value;
99
100
  if (!e.length) return "transparent";
100
- let t = e.length > 1 ? H.value : 180, n = e.slice().sort((e, t) => e.pct - t.pct).map((e) => `${e.color} ${J(e.pct, 0, 100)}%`);
101
+ let t = e.length > 1 ? H.value : 180, n = e.slice().sort((e, t) => e.pct - t.pct).map((e) => `${e.color} ${Y(e.pct, 0, 100)}%`);
101
102
  return `${B.value === "radial" ? "radial-gradient" : B.value === "conic" ? "conic-gradient" : "linear-gradient"}(${B.value === "radial" ? "circle at center" : B.value === "conic" ? `from ${t}deg` : `${t}deg`}, ${e.length > 1 ? n.join(", ") : n.join(", ") || "transparent, transparent"})`;
102
103
  });
103
104
  function W(e) {
104
105
  return L.lockFirstStop && e === 0;
105
106
  }
106
- function G(e = {}) {
107
+ function G(e, t) {
108
+ W(e) || K({ stops: V.value.map((n, r) => r === e ? {
109
+ ...n,
110
+ ...t
111
+ } : { ...n }) });
112
+ }
113
+ function K(e = {}) {
107
114
  R("update:modelValue", {
108
115
  ...L.modelValue,
109
116
  ...e,
110
117
  stops: (e.stops ?? V.value).map((e) => ({ ...e }))
111
118
  });
112
119
  }
113
- function K() {
120
+ function q() {
114
121
  if (V.value.length >= L.maxStops) return;
115
- let e = V.value.map((e) => ({ ...e })), t = e[e.length - 1], n = t ? J(t.pct + 10, 0, 100) : 100;
122
+ let e = V.value.map((e) => ({ ...e })), t = e[e.length - 1], n = t ? Y(t.pct + 10, 0, 100) : 100;
116
123
  e.push({
117
124
  color: "#000000ff",
118
125
  pct: n
119
- }), G({ stops: e });
126
+ }), K({ stops: e });
120
127
  }
121
- function q(e) {
122
- W(e) || V.value.length < 2 || G({ stops: V.value.filter((t, n) => n !== e).map((e) => ({ ...e })) });
128
+ function J(e) {
129
+ W(e) || V.value.length < 2 || K({ stops: V.value.filter((t, n) => n !== e).map((e) => ({ ...e })) });
123
130
  }
124
- function J(e, t, n) {
131
+ function Y(e, t, n) {
125
132
  return Math.min(n, Math.max(t, e));
126
133
  }
127
134
  return (a, u) => {
@@ -159,21 +166,21 @@ var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title
159
166
  "aria-label"
160
167
  ]), c("ul", T, [(p(!0), s(i, null, m(V.value, (r, i) => (p(), s("li", { key: `${e.name}-stop-${i}` }, [c("div", E, [
161
168
  c("div", D, [l(n, {
162
- modelValue: r.color,
163
- "onUpdate:modelValue": (e) => r.color = e,
169
+ "model-value": r.color,
164
170
  name: `${e.name}-stop-${i}-color`,
165
171
  id: `${e.name}-stop-${i}-color`,
166
172
  disabled: e.disabled || W(i),
167
- class: "input-gradient__stop-color"
173
+ class: "input-gradient__stop-color",
174
+ "onUpdate:modelValue": (e) => G(i, { color: e })
168
175
  }, null, 8, [
169
- "modelValue",
170
- "onUpdate:modelValue",
176
+ "model-value",
171
177
  "name",
172
178
  "id",
173
- "disabled"
179
+ "disabled",
180
+ "onUpdate:modelValue"
174
181
  ])]),
175
- c("div", O, [y(c("input", {
176
- "onUpdate:modelValue": (e) => r.pct = e,
182
+ c("div", O, [c("input", {
183
+ value: r.pct,
177
184
  type: "number",
178
185
  min: "0",
179
186
  max: "100",
@@ -181,13 +188,9 @@ var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title
181
188
  id: `${e.name}-stop-${i}-pct`,
182
189
  "aria-label": `Stop ${i + 1} position`,
183
190
  disabled: e.disabled || W(i),
184
- class: "form-control input-gradient__stop-pct"
185
- }, null, 8, k), [[
186
- _,
187
- r.pct,
188
- void 0,
189
- { number: !0 }
190
- ]])]),
191
+ class: "form-control input-gradient__stop-pct",
192
+ onInput: (e) => G(i, { pct: Y(Number(e.target.value) || 0, 0, 100) })
193
+ }, null, 40, k)]),
191
194
  c("div", A, [l(t, {
192
195
  type: "button",
193
196
  icon: "x",
@@ -196,7 +199,7 @@ var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title
196
199
  "aria-label": `Remove stop ${i + 1}`,
197
200
  title: `Remove stop ${i + 1}`,
198
201
  class: "input-gradient__stop-remove btn btn-sm rounded-circle",
199
- onClick: (e) => q(i)
202
+ onClick: (e) => J(i)
200
203
  }, null, 8, [
201
204
  "disabled",
202
205
  "aria-label",
@@ -244,7 +247,7 @@ var b = ["id"], x = ["for", "innerHTML"], S = { class: "dropdown" }, C = ["title
244
247
  "aria-label": "Add color stop",
245
248
  title: "Add color stop",
246
249
  class: "input-gradient__add btn btn-sm rounded-circle",
247
- onClick: K
250
+ onClick: q
248
251
  }, null, 8, ["disabled"])])
249
252
  ])])])])], 8, b);
250
253
  };
@@ -4,17 +4,17 @@ import { Teleport as t, createBlock as n, createCommentVNode as r, createElement
4
4
  var g = {
5
5
  key: 0,
6
6
  class: "rte-editor__controls mb-2"
7
- }, _ = ["disabled"], v = ["disabled"], y = { class: "btn-group" }, b = ["disabled"], x = ["disabled"], S = { class: "btn-group" }, C = { class: "dropdown" }, w = {
7
+ }, _ = ["disabled"], v = ["disabled"], y = { class: "btn-group" }, b = ["disabled"], x = ["disabled"], S = ["disabled"], C = { class: "btn-group" }, w = { class: "dropdown" }, T = {
8
8
  class: "btn dropdown-toggle btn-light",
9
9
  "data-bs-toggle": "dropdown",
10
10
  role: "button",
11
11
  type: "button"
12
- }, T = { class: "dropdown-menu" }, E = { class: "dropdown" }, D = {
12
+ }, E = { class: "dropdown-menu" }, D = { class: "dropdown" }, O = {
13
13
  class: "btn dropdown-toggle btn-light",
14
14
  "data-bs-toggle": "dropdown",
15
15
  role: "button",
16
16
  type: "button"
17
- }, O = { class: "dropdown-menu" }, k = { class: "btn-group" }, A = ["disabled"], j = ["disabled"], M = ["title"], N = /*@__PURE__*/ s({
17
+ }, k = { class: "dropdown-menu" }, A = { class: "btn-group" }, j = ["disabled"], M = ["disabled"], N = ["title"], P = /*@__PURE__*/ s({
18
18
  inheritAttrs: !1,
19
19
  __name: "rte-editor",
20
20
  props: {
@@ -36,22 +36,21 @@ var g = {
36
36
  }
37
37
  },
38
38
  emits: ["update:modelValue"],
39
- setup(s, { emit: N }) {
40
- let P = s, F = N, I = f(!1), L = f(!1), R = m(void 0), z = m(null);
39
+ setup(s, { emit: P }) {
40
+ let F = s, I = P, L = f(!1), R = f(!1), z = m(void 0), B = m(null);
41
41
  u(async () => {
42
- let [{ Editor: e, mergeAttributes: t }, { EditorContent: n }, { default: r }, { default: i }, { default: a }, { default: o }, { default: s }] = await Promise.all([
42
+ let [{ Editor: e, Mark: t, mergeAttributes: n }, { EditorContent: r }, { default: i }, { default: a }, { default: o }, { default: s }] = await Promise.all([
43
43
  import("@tiptap/core"),
44
44
  import("@tiptap/vue-3"),
45
- import("@tiptap/extension-highlight"),
46
45
  import("@tiptap/extension-text-align"),
47
46
  import("@tiptap/extension-link"),
48
47
  import("@tiptap/starter-kit"),
49
48
  import("@tiptap/extension-bold")
50
49
  ]);
51
- z.value = n, R.value = new e({
52
- content: P.modelValue,
50
+ B.value = r, z.value = new e({
51
+ content: F.modelValue,
53
52
  onUpdate: () => {
54
- F("update:modelValue", R.value?.getHTML());
53
+ I("update:modelValue", z.value?.getHTML());
55
54
  },
56
55
  extensions: [
57
56
  o.configure({
@@ -68,13 +67,26 @@ var g = {
68
67
  renderHTML({ HTMLAttributes: e }) {
69
68
  return [
70
69
  "strong",
71
- t(this.options.HTMLAttributes, e),
70
+ n(this.options.HTMLAttributes, e),
72
71
  0
73
72
  ];
74
73
  }
75
74
  }),
76
75
  i.configure({ types: ["heading", "paragraph"] }),
77
- r,
76
+ t.create({
77
+ name: "gradientText",
78
+ inclusive: !0,
79
+ parseHTML() {
80
+ return [{ tag: "span[class~=\"gradient-text\"]" }];
81
+ },
82
+ renderHTML({ HTMLAttributes: e }) {
83
+ return [
84
+ "span",
85
+ n({ class: "gradient-text" }, e),
86
+ 0
87
+ ];
88
+ }
89
+ }),
78
90
  a.extend({
79
91
  addAttributes() {
80
92
  return {
@@ -109,16 +121,16 @@ var g = {
109
121
  },
110
122
  renderHTML({ HTMLAttributes: e }) {
111
123
  if (!e.href) {
112
- let { href: n, target: r, rel: i, ...a } = e;
124
+ let { href: t, target: r, rel: i, ...a } = e;
113
125
  return [
114
126
  "a",
115
- t(a),
127
+ n(a),
116
128
  0
117
129
  ];
118
130
  }
119
131
  return [
120
132
  "a",
121
- t(this.options.HTMLAttributes, e),
133
+ n(this.options.HTMLAttributes, e),
122
134
  0
123
135
  ];
124
136
  }
@@ -135,90 +147,102 @@ var g = {
135
147
  ]
136
148
  });
137
149
  }), l(() => {
138
- R.value?.destroy();
139
- }), h(() => P.modelValue, (e, t) => {
140
- if (R.value) {
141
- if (R.value.getHTML() === e) return;
142
- R.value.commands.setContent(e);
150
+ z.value?.destroy();
151
+ }), h(() => F.modelValue, (e, t) => {
152
+ if (z.value) {
153
+ if (z.value.getHTML() === e) return;
154
+ z.value.commands.setContent(e);
143
155
  }
144
156
  });
145
- function B() {
146
- let e = R.value?.getAttributes("link").href, t = window.prompt("URL", e);
157
+ function V() {
158
+ let e = z.value?.getAttributes("link").href, t = window.prompt("URL", e);
147
159
  if (t !== null) {
148
160
  if (t === "") {
149
- R.value?.chain().focus().extendMarkRange("link").unsetLink().run();
161
+ z.value?.chain().focus().extendMarkRange("link").unsetLink().run();
150
162
  return;
151
163
  }
152
164
  try {
153
- R.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
165
+ z.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
154
166
  } catch (e) {
155
167
  alert(e.message);
156
168
  }
157
169
  }
158
170
  }
159
- let V = () => {
160
- R.value?.commands.setContent(`<textarea>${R.value.getHTML()}</textarea>`), I.value = !0;
161
- }, H = () => {
162
- R.value?.commands.setContent(R.value.getText()), I.value = !1;
171
+ let H = () => {
172
+ z.value?.commands.setContent(`<textarea>${z.value.getHTML()}</textarea>`), L.value = !0;
173
+ }, U = () => {
174
+ z.value?.commands.setContent(z.value.getText()), L.value = !1;
163
175
  };
164
176
  return (l, u) => (d(), n(t, {
165
177
  to: "body",
166
- disabled: !L.value
178
+ disabled: !R.value
167
179
  }, [a("div", { class: c([
168
- L.value ? "" : l.$attrs.class,
180
+ R.value ? "" : l.$attrs.class,
169
181
  "rte-editor",
170
- { "rte-editor--fullscreen": L.value }
171
- ]) }, [R.value ? (d(), i("div", g, [
172
- I.value ? (d(), i("button", {
182
+ { "rte-editor--fullscreen": R.value }
183
+ ]) }, [z.value ? (d(), i("div", g, [
184
+ L.value ? (d(), i("button", {
173
185
  key: 1,
174
186
  class: "btn btn-sm btn-light is-active",
175
- onClick: H,
176
- disabled: !R.value.can().chain().focus().toggleCode().run(),
187
+ onClick: U,
188
+ disabled: !z.value.can().chain().focus().toggleCode().run(),
177
189
  title: "Toggle Source"
178
190
  }, [o(e, {
179
191
  symbol: "source",
180
192
  "base-path": s.iconBasePath
181
193
  }, null, 8, ["base-path"])], 8, v)) : (d(), i("button", {
182
194
  key: 0,
183
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("code") }]),
184
- onClick: V,
185
- disabled: !R.value.can().chain().focus().toggleCode().run(),
195
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("code") }]),
196
+ onClick: H,
197
+ disabled: !z.value.can().chain().focus().toggleCode().run(),
186
198
  title: "Toggle Source"
187
199
  }, [o(e, {
188
200
  symbol: "source",
189
201
  "base-path": s.iconBasePath
190
202
  }, null, 8, ["base-path"])], 10, _)),
191
- a("div", y, [a("button", {
192
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("bold") }]),
193
- onClick: u[0] ||= (e) => R.value?.chain().focus().toggleBold().run(),
194
- disabled: !R.value.can().chain().focus().toggleBold().run(),
195
- title: "Toggle Bold"
196
- }, [o(e, {
197
- symbol: "bold",
198
- "base-path": s.iconBasePath
199
- }, null, 8, ["base-path"])], 10, b), a("button", {
200
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("italic") }]),
201
- onClick: u[1] ||= (e) => R.value?.chain().focus().toggleItalic().run(),
202
- disabled: !R.value.can().chain().focus().toggleItalic().run(),
203
- title: "Toggle Italic"
204
- }, [o(e, {
205
- symbol: "italic",
206
- "base-path": s.iconBasePath
207
- }, null, 8, ["base-path"])], 10, x)]),
208
- a("div", S, [
209
- a("div", C, [a("button", w, [R.value.isActive("heading", { level: 1 }) ? (d(), n(e, {
203
+ a("div", y, [
204
+ a("button", {
205
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("bold") }]),
206
+ onClick: u[0] ||= (e) => z.value?.chain().focus().toggleBold().run(),
207
+ disabled: !z.value.can().chain().focus().toggleBold().run(),
208
+ title: "Toggle Bold"
209
+ }, [o(e, {
210
+ symbol: "bold",
211
+ "base-path": s.iconBasePath
212
+ }, null, 8, ["base-path"])], 10, b),
213
+ a("button", {
214
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("italic") }]),
215
+ onClick: u[1] ||= (e) => z.value?.chain().focus().toggleItalic().run(),
216
+ disabled: !z.value.can().chain().focus().toggleItalic().run(),
217
+ title: "Toggle Italic"
218
+ }, [o(e, {
219
+ symbol: "italic",
220
+ "base-path": s.iconBasePath
221
+ }, null, 8, ["base-path"])], 10, x),
222
+ a("button", {
223
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("gradientText") }]),
224
+ onClick: u[2] ||= (e) => z.value?.chain().focus().toggleMark("gradientText").run(),
225
+ disabled: !z.value.can().chain().focus().toggleMark("gradientText").run(),
226
+ title: "Toggle Gradient Text"
227
+ }, [o(e, {
228
+ symbol: "highlight",
229
+ "base-path": s.iconBasePath
230
+ }, null, 8, ["base-path"])], 10, S)
231
+ ]),
232
+ a("div", C, [
233
+ a("div", w, [a("button", T, [z.value.isActive("heading", { level: 1 }) ? (d(), n(e, {
210
234
  key: 0,
211
235
  symbol: "h1",
212
236
  "base-path": s.iconBasePath
213
- }, null, 8, ["base-path"])) : R.value.isActive("heading", { level: 2 }) ? (d(), n(e, {
237
+ }, null, 8, ["base-path"])) : z.value.isActive("heading", { level: 2 }) ? (d(), n(e, {
214
238
  key: 1,
215
239
  symbol: "h2",
216
240
  "base-path": s.iconBasePath
217
- }, null, 8, ["base-path"])) : R.value.isActive("heading", { level: 3 }) ? (d(), n(e, {
241
+ }, null, 8, ["base-path"])) : z.value.isActive("heading", { level: 3 }) ? (d(), n(e, {
218
242
  key: 2,
219
243
  symbol: "h3",
220
244
  "base-path": s.iconBasePath
221
- }, null, 8, ["base-path"])) : R.value.isActive("heading", { level: 4 }) ? (d(), n(e, {
245
+ }, null, 8, ["base-path"])) : z.value.isActive("heading", { level: 4 }) ? (d(), n(e, {
222
246
  key: 3,
223
247
  symbol: "h4",
224
248
  "base-path": s.iconBasePath
@@ -226,34 +250,34 @@ var g = {
226
250
  key: 4,
227
251
  symbol: "headline",
228
252
  "base-path": s.iconBasePath
229
- }, null, 8, ["base-path"]))]), a("ul", T, [
253
+ }, null, 8, ["base-path"]))]), a("ul", E, [
230
254
  a("li", null, [a("button", {
231
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("heading", { level: 1 }) }]),
232
- onClick: u[2] ||= (e) => R.value?.chain().focus().setHeading({ level: 1 }).run(),
255
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("heading", { level: 1 }) }]),
256
+ onClick: u[3] ||= (e) => z.value?.chain().focus().setHeading({ level: 1 }).run(),
233
257
  title: "Set Heading 1"
234
258
  }, [o(e, {
235
259
  symbol: "h1",
236
260
  "base-path": s.iconBasePath
237
261
  }, null, 8, ["base-path"])], 2)]),
238
262
  a("li", null, [a("button", {
239
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("heading", { level: 2 }) }]),
240
- onClick: u[3] ||= (e) => R.value?.chain().focus().setHeading({ level: 2 }).run(),
263
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("heading", { level: 2 }) }]),
264
+ onClick: u[4] ||= (e) => z.value?.chain().focus().setHeading({ level: 2 }).run(),
241
265
  title: "Set Heading 2"
242
266
  }, [o(e, {
243
267
  symbol: "h2",
244
268
  "base-path": s.iconBasePath
245
269
  }, null, 8, ["base-path"])], 2)]),
246
270
  a("li", null, [a("button", {
247
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("heading", { level: 3 }) }]),
248
- onClick: u[4] ||= (e) => R.value?.chain().focus().setHeading({ level: 3 }).run(),
271
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("heading", { level: 3 }) }]),
272
+ onClick: u[5] ||= (e) => z.value?.chain().focus().setHeading({ level: 3 }).run(),
249
273
  title: "Set Heading 3"
250
274
  }, [o(e, {
251
275
  symbol: "h3",
252
276
  "base-path": s.iconBasePath
253
277
  }, null, 8, ["base-path"])], 2)]),
254
278
  a("li", null, [a("button", {
255
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("heading", { level: 4 }) }]),
256
- onClick: u[5] ||= (e) => R.value?.chain().focus().setHeading({ level: 4 }).run(),
279
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("heading", { level: 4 }) }]),
280
+ onClick: u[6] ||= (e) => z.value?.chain().focus().setHeading({ level: 4 }).run(),
257
281
  title: "Set Heading 4"
258
282
  }, [o(e, {
259
283
  symbol: "h4",
@@ -261,39 +285,39 @@ var g = {
261
285
  }, null, 8, ["base-path"])], 2)])
262
286
  ])]),
263
287
  a("button", {
264
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("paragraph") }]),
265
- onClick: u[6] ||= (e) => R.value?.chain().focus().setParagraph().run(),
288
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("paragraph") }]),
289
+ onClick: u[7] ||= (e) => z.value?.chain().focus().setParagraph().run(),
266
290
  title: "Set Paragraph"
267
291
  }, [o(e, {
268
292
  symbol: "paragraph",
269
293
  "base-path": s.iconBasePath
270
294
  }, null, 8, ["base-path"])], 2),
271
295
  a("button", {
272
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("bulletList") }]),
273
- onClick: u[7] ||= (e) => R.value?.chain().focus().toggleBulletList().run(),
296
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("bulletList") }]),
297
+ onClick: u[8] ||= (e) => z.value?.chain().focus().toggleBulletList().run(),
274
298
  title: "Toggle Bullet List"
275
299
  }, [o(e, {
276
300
  symbol: "list",
277
301
  "base-path": s.iconBasePath
278
302
  }, null, 8, ["base-path"])], 2),
279
303
  a("button", {
280
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("orderedList") }]),
281
- onClick: u[8] ||= (e) => R.value?.chain().focus().toggleOrderedList().run(),
304
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("orderedList") }]),
305
+ onClick: u[9] ||= (e) => z.value?.chain().focus().toggleOrderedList().run(),
282
306
  title: "Toggle Ordered List"
283
307
  }, [o(e, {
284
308
  symbol: "ordered-list",
285
309
  "base-path": s.iconBasePath
286
310
  }, null, 8, ["base-path"])], 2)
287
311
  ]),
288
- a("div", E, [a("button", D, [R.value.isActive({ textAlign: "center" }) ? (d(), n(e, {
312
+ a("div", D, [a("button", O, [z.value.isActive({ textAlign: "center" }) ? (d(), n(e, {
289
313
  key: 0,
290
314
  symbol: "align-center",
291
315
  "base-path": s.iconBasePath
292
- }, null, 8, ["base-path"])) : R.value.isActive({ textAlign: "left" }) ? (d(), n(e, {
316
+ }, null, 8, ["base-path"])) : z.value.isActive({ textAlign: "left" }) ? (d(), n(e, {
293
317
  key: 1,
294
318
  symbol: "align-left",
295
319
  "base-path": s.iconBasePath
296
- }, null, 8, ["base-path"])) : R.value.isActive({ textAlign: "right" }) ? (d(), n(e, {
320
+ }, null, 8, ["base-path"])) : z.value.isActive({ textAlign: "right" }) ? (d(), n(e, {
297
321
  key: 2,
298
322
  symbol: "align-right",
299
323
  "base-path": s.iconBasePath
@@ -301,84 +325,84 @@ var g = {
301
325
  key: 3,
302
326
  symbol: "align-justify",
303
327
  "base-path": s.iconBasePath
304
- }, null, 8, ["base-path"]))]), a("ul", O, [
328
+ }, null, 8, ["base-path"]))]), a("ul", k, [
305
329
  a("li", null, [a("button", {
306
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive({ textAlign: "left" }) }]),
307
- onClick: u[9] ||= (e) => R.value?.chain().focus().setTextAlign("left").run()
330
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive({ textAlign: "left" }) }]),
331
+ onClick: u[10] ||= (e) => z.value?.chain().focus().setTextAlign("left").run()
308
332
  }, [o(e, {
309
333
  symbol: "align-left",
310
334
  "base-path": s.iconBasePath
311
335
  }, null, 8, ["base-path"])], 2)]),
312
336
  a("li", null, [a("button", {
313
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive({ textAlign: "center" }) }]),
314
- onClick: u[10] ||= (e) => R.value?.chain().focus().setTextAlign("center").run()
337
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive({ textAlign: "center" }) }]),
338
+ onClick: u[11] ||= (e) => z.value?.chain().focus().setTextAlign("center").run()
315
339
  }, [o(e, {
316
340
  symbol: "align-center",
317
341
  "base-path": s.iconBasePath
318
342
  }, null, 8, ["base-path"])], 2)]),
319
343
  a("li", null, [a("button", {
320
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive({ textAlign: "right" }) }]),
321
- onClick: u[11] ||= (e) => R.value?.chain().focus().setTextAlign("right").run()
344
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive({ textAlign: "right" }) }]),
345
+ onClick: u[12] ||= (e) => z.value?.chain().focus().setTextAlign("right").run()
322
346
  }, [o(e, {
323
347
  symbol: "align-right",
324
348
  "base-path": s.iconBasePath
325
349
  }, null, 8, ["base-path"])], 2)]),
326
350
  a("li", null, [a("button", {
327
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive({ textAlign: "pretty" }) }]),
328
- onClick: u[12] ||= (e) => R.value?.chain().focus().setTextAlign("right").run()
351
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive({ textAlign: "pretty" }) }]),
352
+ onClick: u[13] ||= (e) => z.value?.chain().focus().setTextAlign("right").run()
329
353
  }, [o(e, {
330
354
  symbol: "align-justify",
331
355
  "base-path": s.iconBasePath
332
356
  }, null, 8, ["base-path"])], 2)])
333
357
  ])]),
334
- R.value.isActive("link") ? (d(), i("button", {
358
+ z.value.isActive("link") ? (d(), i("button", {
335
359
  key: 3,
336
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("link") }]),
337
- onClick: u[13] ||= (e) => R.value.chain().focus().unsetLink().run(),
360
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("link") }]),
361
+ onClick: u[14] ||= (e) => z.value.chain().focus().unsetLink().run(),
338
362
  title: "Unset Link"
339
363
  }, [o(e, {
340
364
  symbol: "unlink",
341
365
  "base-path": s.iconBasePath
342
366
  }, null, 8, ["base-path"])], 2)) : (d(), i("button", {
343
367
  key: 2,
344
- class: c(["btn btn-sm btn-light", { "is-active": R.value.isActive("link") }]),
345
- onClick: B,
368
+ class: c(["btn btn-sm btn-light", { "is-active": z.value.isActive("link") }]),
369
+ onClick: V,
346
370
  title: "Set Link"
347
371
  }, [o(e, {
348
372
  symbol: "link",
349
373
  "base-path": s.iconBasePath
350
374
  }, null, 8, ["base-path"])], 2)),
351
- a("div", k, [a("button", {
375
+ a("div", A, [a("button", {
352
376
  class: "btn btn-sm btn-light",
353
- onClick: u[14] ||= (e) => R.value?.chain().focus().undo().run(),
354
- disabled: !R.value.can().chain().focus().undo().run(),
377
+ onClick: u[15] ||= (e) => z.value?.chain().focus().undo().run(),
378
+ disabled: !z.value.can().chain().focus().undo().run(),
355
379
  title: "Undo"
356
380
  }, [o(e, {
357
381
  symbol: "undo",
358
382
  "base-path": s.iconBasePath
359
- }, null, 8, ["base-path"])], 8, A), a("button", {
383
+ }, null, 8, ["base-path"])], 8, j), a("button", {
360
384
  class: "btn btn-sm btn-light",
361
- onClick: u[15] ||= (e) => R.value?.chain().focus().redo().run(),
362
- disabled: !R.value.can().chain().focus().redo().run(),
385
+ onClick: u[16] ||= (e) => z.value?.chain().focus().redo().run(),
386
+ disabled: !z.value.can().chain().focus().redo().run(),
363
387
  title: "Redo"
364
388
  }, [o(e, {
365
389
  symbol: "redo",
366
390
  "base-path": s.iconBasePath
367
- }, null, 8, ["base-path"])], 8, j)]),
391
+ }, null, 8, ["base-path"])], 8, M)]),
368
392
  s.allowFullscreen ? (d(), i("button", {
369
393
  key: 4,
370
394
  class: "btn btn-sm btn-light ms-auto",
371
- onClick: u[16] ||= (e) => L.value = !L.value,
372
- title: L.value ? "Exit Fullscreen" : "Fullscreen"
395
+ onClick: u[17] ||= (e) => R.value = !R.value,
396
+ title: R.value ? "Exit Fullscreen" : "Fullscreen"
373
397
  }, [o(e, {
374
- symbol: L.value ? "close" : "maximize",
398
+ symbol: R.value ? "close" : "maximize",
375
399
  "base-path": s.iconBasePath
376
- }, null, 8, ["symbol", "base-path"])], 8, M)) : r("", !0)
377
- ])) : r("", !0), (d(), n(p(z.value), {
400
+ }, null, 8, ["symbol", "base-path"])], 8, N)) : r("", !0)
401
+ ])) : r("", !0), (d(), n(p(B.value), {
378
402
  class: "rte-editor__content",
379
- editor: R.value
403
+ editor: z.value
380
404
  }, null, 8, ["editor"]))], 2)], 8, ["disabled"]));
381
405
  }
382
406
  });
383
407
  //#endregion
384
- export { N as default };
408
+ export { P as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.144",
4
+ "version": "0.3.146",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@tiptap/core": "^3.30.0",