inconel 0.1.40 → 0.1.42

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,72 +1,77 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
2
- import { useId as ie, useRef as R, useState as g, useEffect as re, useCallback as oe } from "react";
3
- import se from "../FieldFeedback/FieldFeedback.js";
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
+ import { useId as ye, useRef as O, useState as p, useEffect as ge, useCallback as _e } from "react";
3
+ import Ce from "../FieldFeedback/FieldFeedback.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { sanitizeHtml as y } from "./sanitize.js";
7
- const ce = [
6
+ import { icons as a } from "./icons.js";
7
+ import { sanitizeHtml as v } from "./sanitize.js";
8
+ const ke = [
8
9
  { tag: "p", label: "Paragraf" },
9
10
  { tag: "h1", label: "Başlık 1" },
10
11
  { tag: "h2", label: "Başlık 2" },
11
12
  { tag: "h3", label: "Başlık 3" },
12
13
  { tag: "blockquote", label: "Alıntı" }
13
- ], ue = [12, 14, 16, 18, 24, 32], de = (i) => new Promise((d, b) => {
14
- const a = new FileReader();
15
- a.onload = () => d(String(a.result)), a.onerror = () => b(a.error), a.readAsDataURL(i);
14
+ ], ve = [12, 14, 16, 18, 24, 32], Ne = /* @__PURE__ */ new Set(["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"]), Se = (m) => new Promise((h, S) => {
15
+ const o = new FileReader();
16
+ o.onload = () => h(String(o.result)), o.onerror = () => S(o.error), o.readAsDataURL(m);
16
17
  });
17
- function S({ label: i, onClick: d, disabled: b, active: a, children: N }) {
18
+ function N({ label: m, onClick: h, disabled: S, active: o, children: j }) {
18
19
  return /* @__PURE__ */ n(
19
20
  "button",
20
21
  {
21
22
  type: "button",
22
- className: `inconel-rte__btn${a ? " inconel-is-active" : ""}`,
23
- "aria-label": i,
24
- title: i,
25
- "aria-pressed": a,
26
- disabled: b,
27
- onMouseDown: (B) => B.preventDefault(),
28
- onClick: d,
29
- children: N
23
+ className: `inconel-rte__btn${o ? " inconel-is-active" : ""}`,
24
+ "aria-label": m,
25
+ title: m,
26
+ "aria-pressed": o,
27
+ disabled: S,
28
+ onMouseDown: (R) => R.preventDefault(),
29
+ onClick: h,
30
+ children: j
30
31
  }
31
32
  );
32
33
  }
33
- function be({
34
- value: i = "",
35
- onChange: d,
36
- onBlur: b,
37
- label: a,
38
- placeholder: N,
39
- id: B,
40
- disabled: f = !1,
41
- required: w,
42
- fullWidth: W = !0,
43
- className: $,
44
- minHeight: x = 200,
45
- onImageUpload: D,
46
- onRequestMedia: E,
47
- hint: z,
48
- errorMessage: _
34
+ function Re({
35
+ value: m = "",
36
+ onChange: h,
37
+ onBlur: S,
38
+ label: o,
39
+ placeholder: j,
40
+ id: R,
41
+ disabled: y = !1,
42
+ required: U,
43
+ fullWidth: ne = !0,
44
+ className: le,
45
+ minHeight: A = 200,
46
+ onImageUpload: G,
47
+ onRequestMedia: P,
48
+ hint: $,
49
+ errorMessage: w
49
50
  }) {
50
- const K = ie(), k = B ?? `inconel-rte-${K.replace(/:/g, "")}`, H = `${k}-hint`, I = `${k}-error`, r = R(null), j = R(null), C = R(null), [m, Y] = g(!1), [M, U] = g(""), [c, L] = g(null), [G, P] = g(""), [Z, J] = g({}), [Q, T] = g(!i);
51
- re(() => {
52
- const e = r.current;
53
- if (!e || i === C.current) return;
54
- const t = y(i);
55
- e.innerHTML !== t && (e.innerHTML = t), C.current = i, T(!e.textContent && !e.querySelector("img"));
56
- }, [i, m]);
57
- const h = oe(() => {
58
- const e = r.current;
51
+ const ae = ye(), T = R ?? `inconel-rte-${ae.replace(/:/g, "")}`, q = `${T}-hint`, W = `${T}-error`, u = O(null), M = O(null), L = O(null), [f, re] = p(!1), [K, Y] = p(""), [s, x] = p(null), [J, Z] = p(""), [ie, oe] = p({}), [se, F] = p(!m), [ce, Q] = p(!1), [C, V] = p({ rows: 3, cols: 3 });
52
+ ge(() => {
53
+ const e = u.current;
54
+ if (!e || m === L.current) return;
55
+ const t = v(m);
56
+ e.innerHTML !== t && (e.innerHTML = t), L.current = m, F(!e.textContent && !e.querySelector("img"));
57
+ }, [m, f]);
58
+ const g = _e(() => {
59
+ const e = u.current;
59
60
  if (!e) return;
60
- const t = !!e.textContent || !!e.querySelector("img"), o = t ? y(e.innerHTML) : "";
61
- T(!t), C.current = o, d?.(o);
62
- }, [d]), u = () => {
63
- const e = window.getSelection(), t = r.current;
64
- e && e.rangeCount > 0 && t?.contains(e.getRangeAt(0).commonAncestorContainer) && (j.current = e.getRangeAt(0).cloneRange());
65
- }, F = () => {
66
- r.current?.focus();
61
+ const t = !!e.textContent || !!e.querySelector("img"), l = t ? v(e.innerHTML) : "";
62
+ F(!t), L.current = l, h?.(l);
63
+ }, [h]), b = () => {
64
+ const e = window.getSelection(), t = u.current;
65
+ e && e.rangeCount > 0 && t?.contains(e.getRangeAt(0).commonAncestorContainer) && (M.current = e.getRangeAt(0).cloneRange());
66
+ }, B = () => {
67
+ u.current?.focus();
67
68
  const e = window.getSelection();
68
- e && j.current && (e.removeAllRanges(), e.addRange(j.current));
69
- }, A = () => {
69
+ e && M.current && (e.removeAllRanges(), e.addRange(M.current));
70
+ }, X = () => {
71
+ const e = window.getSelection()?.anchorNode, l = (e instanceof Element ? e : e?.parentElement)?.closest("td, th") ?? null;
72
+ return l && u.current?.contains(l) ? l : null;
73
+ }, D = () => {
74
+ Q(!!X());
70
75
  const e = (t) => {
71
76
  try {
72
77
  return document.queryCommandState(t);
@@ -74,7 +79,7 @@ function be({
74
79
  return !1;
75
80
  }
76
81
  };
77
- J({
82
+ oe({
78
83
  bold: e("bold"),
79
84
  italic: e("italic"),
80
85
  underline: e("underline"),
@@ -86,104 +91,126 @@ function be({
86
91
  insertUnorderedList: e("insertUnorderedList"),
87
92
  insertOrderedList: e("insertOrderedList")
88
93
  });
89
- }, v = (e, t) => {
90
- F(), document.execCommand("styleWithCSS", !1, "true"), document.execCommand(e, !1, t), u(), A(), h();
91
- }, V = (e) => {
92
- F(), document.execCommand("styleWithCSS", !1, "false"), document.execCommand("fontSize", !1, "7"), r.current?.querySelectorAll('font[size="7"]').forEach((t) => {
93
- const o = document.createElement("span");
94
- o.style.fontSize = `${e}px`, o.append(...Array.from(t.childNodes)), t.replaceWith(o);
95
- }), u(), h();
96
- }, X = (e) => {
97
- F(), document.execCommand("insertHTML", !1, y(e)), u(), h();
98
- }, q = (e) => {
99
- u(), P(""), L(c === e ? null : e);
100
- }, O = () => {
101
- const e = G.trim();
102
- e && (c === "link" ? (v("createLink", e), r.current?.querySelectorAll("a").forEach((t) => {
94
+ }, E = (e, t) => {
95
+ B(), document.execCommand("styleWithCSS", !1, Ne.has(e) ? "true" : "false"), document.execCommand(e, !1, t), b(), D(), g();
96
+ }, de = (e) => {
97
+ B(), document.execCommand("styleWithCSS", !1, "false"), document.execCommand("fontSize", !1, "7"), u.current?.querySelectorAll('font[size="7"]').forEach((t) => {
98
+ const l = document.createElement("span");
99
+ l.style.fontSize = `${e}px`, l.append(...Array.from(t.childNodes)), t.replaceWith(l);
100
+ }), b(), g();
101
+ }, ue = (e) => {
102
+ B();
103
+ const t = X(), l = t?.parentElement, i = t?.closest("table");
104
+ if (!t || !l || !i) return;
105
+ const I = t.cellIndex, te = (d) => {
106
+ const k = document.createElement(d.tagName);
107
+ return k.innerHTML = "<br>", k;
108
+ };
109
+ if (e === "addRow") {
110
+ const d = document.createElement("tr");
111
+ Array.from(l.cells).forEach((k) => d.append(te(k.tagName === "TH" ? document.createElement("td") : k))), l.parentElement?.tagName === "THEAD" ? (i.tBodies[0] ?? i.appendChild(document.createElement("tbody"))).prepend(d) : l.after(d);
112
+ } else e === "delRow" ? (l.remove(), i.rows.length || i.remove()) : e === "addCol" ? Array.from(i.rows).forEach((d) => d.cells[I]?.after(te(d.cells[I]))) : e === "delCol" ? (Array.from(i.rows).forEach((d) => d.cells[I]?.remove()), Array.from(i.rows).some((d) => d.cells.length) || i.remove()) : i.remove();
113
+ Q(!1), g();
114
+ }, me = () => {
115
+ const e = Math.min(Math.max(C.rows, 1), 20), t = Math.min(Math.max(C.cols, 1), 10), i = `<tr>${"<td><br></td>".repeat(t)}</tr>`.repeat(e);
116
+ ee(
117
+ `<table border="1" width="100%" cellspacing="0" cellpadding="6"><tbody>${i}</tbody></table><p><br></p>`
118
+ ), x(null);
119
+ }, ee = (e) => {
120
+ B(), document.execCommand("insertHTML", !1, v(e)), b(), g();
121
+ }, H = (e) => {
122
+ b(), Z(""), x(s === e ? null : e);
123
+ }, z = () => {
124
+ if (s === "table") {
125
+ me();
126
+ return;
127
+ }
128
+ const e = J.trim();
129
+ e && (s === "link" ? (E("createLink", e), u.current?.querySelectorAll("a").forEach((t) => {
103
130
  /^https?:/i.test(t.getAttribute("href") ?? "") && (t.setAttribute("target", "_blank"), t.setAttribute("rel", "noopener noreferrer"));
104
- }), h()) : c === "image" && v("insertImage", e), L(null));
105
- }, ee = async (e) => {
131
+ }), g()) : s === "image" && E("insertImage", e), x(null));
132
+ }, fe = async (e) => {
106
133
  const t = e.target.files?.[0];
107
134
  if (e.target.value = "", !t || !t.type.startsWith("image/")) return;
108
- const o = D ? await D(t) : await de(t);
109
- v("insertImage", o), L(null);
110
- }, te = (e) => {
135
+ const l = G ? await G(t) : await Se(t);
136
+ E("insertImage", l), x(null);
137
+ }, be = (e) => {
111
138
  const t = e.clipboardData.getData("text/html");
112
- t && (e.preventDefault(), document.execCommand("insertHTML", !1, y(t)), h());
113
- }, ne = () => {
114
- if (m) {
115
- const e = y(M);
116
- C.current = null, r.current && (r.current.innerHTML = e), C.current = e, T(!e), d?.(e);
139
+ t && (e.preventDefault(), document.execCommand("insertHTML", !1, v(t)), g());
140
+ }, pe = () => {
141
+ if (f) {
142
+ const e = v(K);
143
+ L.current = null, u.current && (u.current.innerHTML = e), L.current = e, F(!e), h?.(e);
117
144
  } else
118
- U(y(r.current?.innerHTML ?? ""));
119
- L(null), Y(!m);
120
- }, le = [z && !_ ? H : void 0, _ ? I : void 0].filter(Boolean).join(" ") || void 0, p = f || m, l = (e, t, o, ae) => /* @__PURE__ */ n(
121
- S,
145
+ Y(v(u.current?.innerHTML ?? ""));
146
+ x(null), re(!f);
147
+ }, he = [$ && !w ? q : void 0, w ? W : void 0].filter(Boolean).join(" ") || void 0, _ = y || f, r = (e, t, l, i) => /* @__PURE__ */ n(
148
+ N,
122
149
  {
123
150
  label: t,
124
- active: Z[e],
125
- disabled: p,
126
- onClick: () => v(e, ae),
127
- children: o
151
+ active: ie[e],
152
+ disabled: _,
153
+ onClick: () => E(e, i),
154
+ children: l
128
155
  }
129
156
  );
130
- return /* @__PURE__ */ s(
157
+ return /* @__PURE__ */ c(
131
158
  "div",
132
159
  {
133
160
  className: [
134
161
  "inconel-field",
135
- W ? "inconel-field--full-width" : "",
136
- $ ?? ""
162
+ ne ? "inconel-field--full-width" : "",
163
+ le ?? ""
137
164
  ].join(" "),
138
165
  children: [
139
- a && /* @__PURE__ */ s("label", { className: "inconel-field__label", htmlFor: k, children: [
140
- a,
141
- w && /* @__PURE__ */ n("span", { "aria-hidden": "true", children: " *" })
166
+ o && /* @__PURE__ */ c("label", { className: "inconel-field__label", htmlFor: T, children: [
167
+ o,
168
+ U && /* @__PURE__ */ n("span", { "aria-hidden": "true", children: " *" })
142
169
  ] }),
143
- /* @__PURE__ */ s(
170
+ /* @__PURE__ */ c(
144
171
  "div",
145
172
  {
146
173
  className: [
147
174
  "inconel-rte",
148
- _ ? "inconel-is-invalid" : "",
149
- f ? "inconel-is-disabled" : ""
175
+ w ? "inconel-is-invalid" : "",
176
+ y ? "inconel-is-disabled" : ""
150
177
  ].join(" "),
151
178
  children: [
152
- /* @__PURE__ */ s("div", { className: "inconel-rte__toolbar", role: "toolbar", "aria-label": "Biçimlendirme", children: [
153
- l("bold", "Kalın", /* @__PURE__ */ n("b", { children: "B" })),
154
- l("italic", "İtalik", /* @__PURE__ */ n("i", { children: "I" })),
155
- l("underline", "Altı çizili", /* @__PURE__ */ n("u", { children: "U" })),
156
- l("strikeThrough", "Üstü çizili", /* @__PURE__ */ n("s", { children: "S" })),
179
+ /* @__PURE__ */ c("div", { className: "inconel-rte__toolbar", role: "toolbar", "aria-label": "Biçimlendirme", children: [
180
+ r("bold", "Kalın", a.bold),
181
+ r("italic", "İtalik", a.italic),
182
+ r("underline", "Altı çizili", a.underline),
183
+ r("strikeThrough", "Üstü çizili", a.strike),
157
184
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
158
- /* @__PURE__ */ s(
185
+ /* @__PURE__ */ c(
159
186
  "select",
160
187
  {
161
188
  className: "inconel-rte__select",
162
189
  "aria-label": "Biçim",
163
- disabled: p,
190
+ disabled: _,
164
191
  value: "",
165
192
  onChange: (e) => {
166
- e.target.value && v("formatBlock", e.target.value);
193
+ e.target.value && E("formatBlock", e.target.value);
167
194
  },
168
195
  children: [
169
196
  /* @__PURE__ */ n("option", { value: "", children: "Biçim" }),
170
- ce.map((e) => /* @__PURE__ */ n("option", { value: e.tag, children: e.label }, e.tag))
197
+ ke.map((e) => /* @__PURE__ */ n("option", { value: e.tag, children: e.label }, e.tag))
171
198
  ]
172
199
  }
173
200
  ),
174
- /* @__PURE__ */ s(
201
+ /* @__PURE__ */ c(
175
202
  "select",
176
203
  {
177
204
  className: "inconel-rte__select",
178
205
  "aria-label": "Yazı boyutu",
179
- disabled: p,
206
+ disabled: _,
180
207
  value: "",
181
208
  onChange: (e) => {
182
- e.target.value && V(Number(e.target.value));
209
+ e.target.value && de(Number(e.target.value));
183
210
  },
184
211
  children: [
185
212
  /* @__PURE__ */ n("option", { value: "", children: "Boyut" }),
186
- ue.map((e) => /* @__PURE__ */ s("option", { value: e, children: [
213
+ ve.map((e) => /* @__PURE__ */ c("option", { value: e, children: [
187
214
  e,
188
215
  "px"
189
216
  ] }, e))
@@ -191,80 +218,138 @@ function be({
191
218
  }
192
219
  ),
193
220
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
194
- l("justifyLeft", "Sola hizala", "⇤"),
195
- l("justifyCenter", "Ortala", "↔"),
196
- l("justifyRight", "Sağa hizala", "⇥"),
197
- l("justifyFull", "İki yana yasla", "☰"),
221
+ r("justifyLeft", "Sola hizala", a.alignLeft),
222
+ r("justifyCenter", "Ortala", a.alignCenter),
223
+ r("justifyRight", "Sağa hizala", a.alignRight),
224
+ r("justifyFull", "İki yana yasla", a.alignJustify),
198
225
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
199
- l("insertUnorderedList", "Madde işaretli liste", "• ≡"),
200
- l("insertOrderedList", "Numaralı liste", "1.≡"),
201
- l("outdent", "Girintiyi azalt", "⇠"),
202
- l("indent", "Girintiyi artır", "⇢"),
203
- l("removeFormat", "Biçimi temizle", "Tₓ"),
226
+ r("insertUnorderedList", "Madde işaretli liste", a.listUl),
227
+ r("insertOrderedList", "Numaralı liste", a.listOl),
228
+ r("outdent", "Girintiyi azalt", a.outdent),
229
+ r("indent", "Girintiyi artır", a.indent),
230
+ r("removeFormat", "Biçimi temizle", a.clearFormat),
204
231
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
205
232
  /* @__PURE__ */ n(
206
- S,
233
+ N,
207
234
  {
208
235
  label: "Bağlantı ekle",
209
- disabled: p,
210
- active: c === "link",
211
- onClick: () => q("link"),
212
- children: "🔗"
236
+ disabled: _,
237
+ active: s === "link",
238
+ onClick: () => H("link"),
239
+ children: a.link
213
240
  }
214
241
  ),
215
242
  /* @__PURE__ */ n(
216
- S,
243
+ N,
244
+ {
245
+ label: "Tablo ekle",
246
+ disabled: _,
247
+ active: s === "table",
248
+ onClick: () => H("table"),
249
+ children: a.table
250
+ }
251
+ ),
252
+ /* @__PURE__ */ n(
253
+ N,
217
254
  {
218
255
  label: "Görsel ekle",
219
- disabled: p,
220
- active: c === "image",
221
- onClick: () => q("image"),
222
- children: "🖼"
256
+ disabled: _,
257
+ active: s === "image",
258
+ onClick: () => H("image"),
259
+ children: a.image
223
260
  }
224
261
  ),
225
- E && /* @__PURE__ */ n(
226
- S,
262
+ P && /* @__PURE__ */ n(
263
+ N,
227
264
  {
228
265
  label: "Medya galerisi",
229
- disabled: p,
266
+ disabled: _,
230
267
  onClick: () => {
231
- u(), E(X);
268
+ b(), P(ee);
232
269
  },
233
- children: "🗂"
270
+ children: a.gallery
234
271
  }
235
272
  ),
236
273
  /* @__PURE__ */ n("span", { className: "inconel-rte__sep" }),
237
- l("undo", "Geri al", "↶"),
238
- l("redo", "Yinele", "↷"),
274
+ r("undo", "Geri al", a.undo),
275
+ r("redo", "Yinele", a.redo),
239
276
  /* @__PURE__ */ n(
240
- S,
277
+ N,
241
278
  {
242
279
  label: "HTML kaynağı",
243
- disabled: f,
244
- active: m,
245
- onClick: ne,
246
- children: "</>"
280
+ disabled: y,
281
+ active: f,
282
+ onClick: pe,
283
+ children: a.code
247
284
  }
248
285
  )
249
286
  ] }),
250
- c && !m && /* @__PURE__ */ s("div", { className: "inconel-rte__panel", children: [
287
+ s === "table" && !f && /* @__PURE__ */ c("div", { className: "inconel-rte__panel", children: [
288
+ /* @__PURE__ */ c("label", { className: "inconel-rte__field", children: [
289
+ "Satır",
290
+ /* @__PURE__ */ n(
291
+ "input",
292
+ {
293
+ type: "number",
294
+ min: 1,
295
+ max: 20,
296
+ className: "inconel-rte__input inconel-rte__input--num",
297
+ value: C.rows,
298
+ onChange: (e) => V({ ...C, rows: Number(e.target.value) })
299
+ }
300
+ )
301
+ ] }),
302
+ /* @__PURE__ */ c("label", { className: "inconel-rte__field", children: [
303
+ "Sütun",
304
+ /* @__PURE__ */ n(
305
+ "input",
306
+ {
307
+ type: "number",
308
+ min: 1,
309
+ max: 10,
310
+ className: "inconel-rte__input inconel-rte__input--num",
311
+ value: C.cols,
312
+ onChange: (e) => V({ ...C, cols: Number(e.target.value) })
313
+ }
314
+ )
315
+ ] }),
316
+ /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: z, children: "Tablo ekle" })
317
+ ] }),
318
+ ce && !f && !y && /* @__PURE__ */ n("div", { className: "inconel-rte__panel", role: "toolbar", "aria-label": "Tablo", children: [
319
+ ["addRow", "Satır ekle"],
320
+ ["delRow", "Satırı sil"],
321
+ ["addCol", "Sütun ekle"],
322
+ ["delCol", "Sütunu sil"],
323
+ ["delTable", "Tabloyu sil"]
324
+ ].map(([e, t]) => /* @__PURE__ */ n(
325
+ "button",
326
+ {
327
+ type: "button",
328
+ className: "inconel-rte__action",
329
+ onMouseDown: (l) => l.preventDefault(),
330
+ onClick: () => ue(e),
331
+ children: t
332
+ },
333
+ e
334
+ )) }),
335
+ s && s !== "table" && !f && /* @__PURE__ */ c("div", { className: "inconel-rte__panel", children: [
251
336
  /* @__PURE__ */ n(
252
337
  "input",
253
338
  {
254
339
  type: "url",
255
340
  className: "inconel-rte__input",
256
- "aria-label": c === "link" ? "Bağlantı adresi" : "Görsel adresi",
257
- placeholder: c === "link" ? "https://…" : "Görsel URL (https://…)",
258
- value: G,
341
+ "aria-label": s === "link" ? "Bağlantı adresi" : "Görsel adresi",
342
+ placeholder: s === "link" ? "https://…" : "Görsel URL (https://…)",
343
+ value: J,
259
344
  autoFocus: !0,
260
- onChange: (e) => P(e.target.value),
345
+ onChange: (e) => Z(e.target.value),
261
346
  onKeyDown: (e) => {
262
- e.key === "Enter" && (e.preventDefault(), O());
347
+ e.key === "Enter" && (e.preventDefault(), z());
263
348
  }
264
349
  }
265
350
  ),
266
- /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: O, children: "Ekle" }),
267
- c === "image" && /* @__PURE__ */ s("label", { className: "inconel-rte__action", children: [
351
+ /* @__PURE__ */ n("button", { type: "button", className: "inconel-rte__action", onClick: z, children: "Ekle" }),
352
+ s === "image" && /* @__PURE__ */ c("label", { className: "inconel-rte__action", children: [
268
353
  "Dosya seç",
269
354
  /* @__PURE__ */ n(
270
355
  "input",
@@ -273,51 +358,51 @@ function be({
273
358
  accept: "image/*",
274
359
  hidden: !0,
275
360
  "aria-label": "Görsel dosyası",
276
- onChange: ee
361
+ onChange: fe
277
362
  }
278
363
  )
279
364
  ] })
280
365
  ] }),
281
- m ? /* @__PURE__ */ n(
366
+ f ? /* @__PURE__ */ n(
282
367
  "textarea",
283
368
  {
284
- id: k,
369
+ id: T,
285
370
  className: "inconel-rte__source",
286
- style: { minHeight: x },
287
- "aria-label": a ?? "HTML kaynağı",
288
- value: M,
289
- disabled: f,
371
+ style: { minHeight: A },
372
+ "aria-label": o ?? "HTML kaynağı",
373
+ value: K,
374
+ disabled: y,
290
375
  spellCheck: !1,
291
- onChange: (e) => U(e.target.value)
376
+ onChange: (e) => Y(e.target.value)
292
377
  }
293
- ) : /* @__PURE__ */ s("div", { className: "inconel-rte__surface", style: { minHeight: x }, children: [
294
- Q && N && /* @__PURE__ */ n("span", { className: "inconel-rte__placeholder", "aria-hidden": "true", children: N }),
378
+ ) : /* @__PURE__ */ c("div", { className: "inconel-rte__surface", style: { minHeight: A }, children: [
379
+ se && j && /* @__PURE__ */ n("span", { className: "inconel-rte__placeholder", "aria-hidden": "true", children: j }),
295
380
  /* @__PURE__ */ n(
296
381
  "div",
297
382
  {
298
- ref: r,
299
- id: k,
383
+ ref: u,
384
+ id: T,
300
385
  className: "inconel-rte__content",
301
386
  role: "textbox",
302
387
  "aria-multiline": "true",
303
- "aria-label": a,
304
- "aria-required": w,
305
- "aria-invalid": !!_,
306
- "aria-describedby": le,
307
- "aria-disabled": f,
308
- contentEditable: !f,
388
+ "aria-label": o,
389
+ "aria-required": U,
390
+ "aria-invalid": !!w,
391
+ "aria-describedby": he,
392
+ "aria-disabled": y,
393
+ contentEditable: !y,
309
394
  suppressContentEditableWarning: !0,
310
- style: { minHeight: x },
311
- onInput: h,
312
- onPaste: te,
395
+ style: { minHeight: A },
396
+ onInput: g,
397
+ onPaste: be,
313
398
  onKeyUp: () => {
314
- u(), A();
399
+ b(), D();
315
400
  },
316
401
  onMouseUp: () => {
317
- u(), A();
402
+ b(), D();
318
403
  },
319
404
  onBlur: () => {
320
- u(), b?.();
405
+ b(), S?.();
321
406
  }
322
407
  }
323
408
  )
@@ -325,12 +410,12 @@ function be({
325
410
  ]
326
411
  }
327
412
  ),
328
- /* @__PURE__ */ n(se, { hint: z, errorMessage: _, hintId: H, errorId: I })
413
+ /* @__PURE__ */ n(Ce, { hint: $, errorMessage: w, hintId: q, errorId: W })
329
414
  ]
330
415
  }
331
416
  );
332
417
  }
333
418
  export {
334
- be as default
419
+ Re as default
335
420
  };
336
421
  //# sourceMappingURL=RichTextEditor.js.map