@pie-lib/editable-html-tip-tap 3.0.1-next.20261005000911 → 3.0.1-next.20261005005201

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,38 +1,38 @@
1
- import { PIE_TOOLBAR__CLASS as e } from "../constants.js";
2
- import { DoneButton as t } from "./common/done-button.js";
3
- import { clsx as n } from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
4
- import { ToolbarIcon as r } from "./respArea/ToolbarIcon.js";
5
- import { spanishConfig as i, specialConfig as a } from "./characters/characterUtils.js";
6
- import ee from "./icons/TextAlign.js";
7
- import te from "./icons/CssIcon.js";
8
- import { AddColumn as ne, AddRow as o, RemoveColumn as s, RemoveRow as re, RemoveTable as ie } from "./icons/TableIcons.js";
9
- import { CharacterIcon as c, CharacterPicker as ae } from "./CharacterPicker.js";
10
- import { useLayoutEffect as l, useMemo as u, useRef as d, useState as oe } from "react";
11
- import { useEditorState as f } from "@tiptap/react";
12
- import { styled as p, useTheme as m } from "@mui/material/styles";
13
- import { NodeSelection as h } from "prosemirror-state";
14
- import g from "@mui/icons-material/Delete";
15
- import _ from "@pie-lib/translator";
16
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { color as b } from "@pie-lib/render-ui";
18
- import x from "@mui/icons-material/FormatBold";
19
- import S from "@mui/icons-material/FormatItalic";
20
- import C from "@mui/icons-material/FormatStrikethrough";
21
- import w from "@mui/icons-material/Code";
22
- import T from "@mui/icons-material/GridOn";
23
- import E from "@mui/icons-material/FormatListBulleted";
24
- import D from "@mui/icons-material/FormatListNumbered";
25
- import O from "@mui/icons-material/FormatUnderlined";
26
- import k from "@mui/icons-material/Functions";
27
- import A from "@mui/icons-material/Image";
28
- import j from "@mui/icons-material/Redo";
29
- import M from "@mui/icons-material/Undo";
30
- import N from "@mui/icons-material/FormatQuote";
31
- import P from "@mui/icons-material/Theaters";
32
- import F from "@mui/icons-material/VolumeUp";
1
+ import { PIE_TOOLBAR__CLASS as e, TOOLBAR_BACKGROUND as t } from "../constants.js";
2
+ import { DoneButton as n } from "./common/done-button.js";
3
+ import { clsx as r } from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
4
+ import { ToolbarIcon as i } from "./respArea/ToolbarIcon.js";
5
+ import { spanishConfig as a, specialConfig as ee } from "./characters/characterUtils.js";
6
+ import te from "./icons/TextAlign.js";
7
+ import o from "./icons/CssIcon.js";
8
+ import { AddColumn as s, AddRow as ne, RemoveColumn as re, RemoveRow as ie, RemoveTable as c } from "./icons/TableIcons.js";
9
+ import { CharacterIcon as l, CharacterPicker as u } from "./CharacterPicker.js";
10
+ import { useLayoutEffect as d, useMemo as ae, useRef as f, useState as p } from "react";
11
+ import { useEditorState as m } from "@tiptap/react";
12
+ import { styled as h, useTheme as g } from "@mui/material/styles";
13
+ import { NodeSelection as _ } from "prosemirror-state";
14
+ import oe from "@mui/icons-material/Delete";
15
+ import { color as v } from "@pie-lib/render-ui";
16
+ import y from "@pie-lib/translator";
17
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
18
+ import S from "@mui/icons-material/FormatBold";
19
+ import C from "@mui/icons-material/FormatItalic";
20
+ import w from "@mui/icons-material/FormatStrikethrough";
21
+ import T from "@mui/icons-material/Code";
22
+ import E from "@mui/icons-material/GridOn";
23
+ import D from "@mui/icons-material/FormatListBulleted";
24
+ import O from "@mui/icons-material/FormatListNumbered";
25
+ import k from "@mui/icons-material/FormatUnderlined";
26
+ import A from "@mui/icons-material/Functions";
27
+ import j from "@mui/icons-material/Image";
28
+ import M from "@mui/icons-material/Redo";
29
+ import N from "@mui/icons-material/Undo";
30
+ import P from "@mui/icons-material/FormatQuote";
31
+ import F from "@mui/icons-material/Theaters";
32
+ import I from "@mui/icons-material/VolumeUp";
33
33
  import se from "@mui/icons-material/BorderAll";
34
34
  //#region src/components/MenuBar.tsx
35
- var { translator: I } = _, L = () => /* @__PURE__ */ v("svg", {
35
+ var { translator: L } = y, R = () => /* @__PURE__ */ b("svg", {
36
36
  xmlns: "http://www.w3.org/2000/svg",
37
37
  height: "24px",
38
38
  viewBox: "0 0 24 24",
@@ -40,11 +40,11 @@ var { translator: I } = _, L = () => /* @__PURE__ */ v("svg", {
40
40
  fill: "none",
41
41
  "aria-hidden": "true",
42
42
  focusable: "false",
43
- children: /* @__PURE__ */ v("path", {
43
+ children: /* @__PURE__ */ b("path", {
44
44
  d: "M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z",
45
45
  fill: "currentColor"
46
46
  })
47
- }), R = () => /* @__PURE__ */ v("svg", {
47
+ }), z = () => /* @__PURE__ */ b("svg", {
48
48
  xmlns: "http://www.w3.org/2000/svg",
49
49
  height: "24px",
50
50
  viewBox: "0 0 24 24",
@@ -52,11 +52,11 @@ var { translator: I } = _, L = () => /* @__PURE__ */ v("svg", {
52
52
  fill: "none",
53
53
  "aria-hidden": "true",
54
54
  focusable: "false",
55
- children: /* @__PURE__ */ v("path", {
55
+ children: /* @__PURE__ */ b("path", {
56
56
  d: "M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z",
57
57
  fill: "currentColor"
58
58
  })
59
- }), z = () => /* @__PURE__ */ v("svg", {
59
+ }), B = () => /* @__PURE__ */ b("svg", {
60
60
  width: "30",
61
61
  height: "28",
62
62
  viewBox: "0 0 30 28",
@@ -68,18 +68,18 @@ var { translator: I } = _, L = () => /* @__PURE__ */ v("svg", {
68
68
  },
69
69
  "aria-hidden": "true",
70
70
  focusable: "false",
71
- children: /* @__PURE__ */ v("path", {
71
+ children: /* @__PURE__ */ b("path", {
72
72
  d: "M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z",
73
73
  fill: "currentColor"
74
74
  })
75
75
  });
76
- function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAreaProps: B, onChange: V, autoWidthToolbar: H, hasFocus: U, language: W }) {
77
- let [G, K] = oe(!1), q = d(null), J = b ?? {}, Y = f({
78
- editor: p,
76
+ function V({ editor: t, classes: h, activePlugins: g, toolbarOpts: v, responseAreaProps: y, onChange: V, autoWidthToolbar: H, hasFocus: U, language: W }) {
77
+ let [G, K] = p(!1), q = f(null), J = v ?? {}, Y = m({
78
+ editor: t,
79
79
  selector: (e) => {
80
80
  let { selection: t } = e.editor?.state || {}, n;
81
81
  if (!e.editor?.commandManager) return {};
82
- t instanceof h && (n = t.node);
82
+ t instanceof _ && (n = t.node);
83
83
  let r = e.editor?.isActive("math") || e.editor?.isActive("explicit_constructed_response") || e.editor?.isActive("imageUploadNode") || e.editor?.isActive("drag_in_the_blank"), i = t && t.empty === !1 && e.editor.isActive("table");
84
84
  return {
85
85
  currentNode: n,
@@ -118,34 +118,34 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
118
118
  };
119
119
  }
120
120
  }), X = !!H, Z = Y.hideDefaultToolbar && Y.currentNode?.type?.name === "drag_in_the_blank", Q = J.alwaysVisible || U && !Y.toolbarOpened && (!Y.hideDefaultToolbar || Z);
121
- l(() => {
121
+ d(() => {
122
122
  q.current?.toggleAttribute("inert", !Q);
123
123
  }, [Q]);
124
- let ce = n(m.toolbar, e, {
125
- [m.toolbarWithNoDone]: !0,
126
- [m.toolbarTop]: J.position === "top",
127
- [m.toolbarRight]: J.alignment === "right",
128
- [m.focused]: Q,
129
- [m.autoWidth]: X,
130
- [m.fullWidth]: !X,
131
- [m.hidden]: J.isHidden === !0
124
+ let ce = r(h.toolbar, e, {
125
+ [h.toolbarWithNoDone]: !0,
126
+ [h.toolbarTop]: J.position === "top",
127
+ [h.toolbarRight]: J.alignment === "right",
128
+ [h.focused]: Q,
129
+ [h.autoWidth]: X,
130
+ [h.fullWidth]: !X,
131
+ [h.hidden]: J.isHidden === !0
132
132
  }), le = J.minWidth === void 0 ? {} : { minWidth: J.minWidth }, ue = (e) => {
133
133
  e.preventDefault();
134
- }, $ = (e) => I.t(`editableHtml.buttons.${e}`, { lng: W }), de = u(() => [
134
+ }, $ = (e) => L.t(`editableHtml.buttons.${e}`, { lng: W }), de = ae(() => [
135
135
  {
136
- icon: /* @__PURE__ */ v(T, {}),
136
+ icon: /* @__PURE__ */ b(E, {}),
137
137
  label: $("insertTable"),
138
138
  onClick: (e) => e.chain().focus().insertTable({
139
139
  rows: 2,
140
140
  cols: 2,
141
141
  withHeaderRow: !1
142
142
  }).run(),
143
- hidden: (e) => !_?.includes("table") || e.isTable,
143
+ hidden: (e) => !g?.includes("table") || e.isTable,
144
144
  isActive: (e) => e.isTable,
145
145
  isDisabled: (e) => !e.canTable
146
146
  },
147
147
  {
148
- icon: /* @__PURE__ */ v(o, {}),
148
+ icon: /* @__PURE__ */ b(ne, {}),
149
149
  label: $("addTableRow"),
150
150
  onClick: (e) => e.chain().focus().addRowAfter().run(),
151
151
  hidden: (e) => !(e.isTable && !e.hasTextSelectionInTable),
@@ -153,7 +153,7 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
153
153
  isDisabled: (e) => !e.canTable
154
154
  },
155
155
  {
156
- icon: /* @__PURE__ */ v(re, {}),
156
+ icon: /* @__PURE__ */ b(ie, {}),
157
157
  label: $("removeTableRow"),
158
158
  onClick: (e) => e.chain().focus().deleteRow().run(),
159
159
  hidden: (e) => !(e.isTable && !e.hasTextSelectionInTable),
@@ -161,7 +161,7 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
161
161
  isDisabled: (e) => !e.canTable
162
162
  },
163
163
  {
164
- icon: /* @__PURE__ */ v(ne, {}),
164
+ icon: /* @__PURE__ */ b(s, {}),
165
165
  label: $("addTableColumn"),
166
166
  onClick: (e) => e.chain().focus().addColumnAfter().run(),
167
167
  hidden: (e) => !(e.isTable && !e.hasTextSelectionInTable),
@@ -169,7 +169,7 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
169
169
  isDisabled: (e) => !e.canTable
170
170
  },
171
171
  {
172
- icon: /* @__PURE__ */ v(s, {}),
172
+ icon: /* @__PURE__ */ b(re, {}),
173
173
  label: $("removeTableColumn"),
174
174
  onClick: (e) => e.chain().focus().deleteColumn().run(),
175
175
  hidden: (e) => !(e.isTable && !e.hasTextSelectionInTable),
@@ -177,7 +177,7 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
177
177
  isDisabled: (e) => !e.canTable
178
178
  },
179
179
  {
180
- icon: /* @__PURE__ */ v(ie, {}),
180
+ icon: /* @__PURE__ */ b(c, {}),
181
181
  label: $("removeTable"),
182
182
  onClick: (e) => e.chain().focus().deleteTable().run(),
183
183
  hidden: (e) => !(e.isTable && !e.hasTextSelectionInTable),
@@ -185,7 +185,7 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
185
185
  isDisabled: (e) => !e.canTable
186
186
  },
187
187
  {
188
- icon: /* @__PURE__ */ v(se, {}),
188
+ icon: /* @__PURE__ */ b(se, {}),
189
189
  label: $("tableBorders"),
190
190
  toggle: !0,
191
191
  onClick: (e) => {
@@ -200,236 +200,236 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
200
200
  isDisabled: (e) => !e.canTable
201
201
  },
202
202
  {
203
- icon: /* @__PURE__ */ v(x, {}),
203
+ icon: /* @__PURE__ */ b(S, {}),
204
204
  label: $("bold"),
205
205
  toggle: !0,
206
206
  onClick: (e) => e.chain().focus().toggleBold().run(),
207
- hidden: () => !_?.includes("bold"),
207
+ hidden: () => !g?.includes("bold"),
208
208
  isActive: (e) => e.isBold,
209
209
  isDisabled: (e) => !e.canBold
210
210
  },
211
211
  {
212
- icon: /* @__PURE__ */ v(S, {}),
212
+ icon: /* @__PURE__ */ b(C, {}),
213
213
  label: $("italic"),
214
214
  toggle: !0,
215
215
  onClick: (e) => e.chain().focus().toggleItalic().run(),
216
- hidden: () => !_?.includes("italic"),
216
+ hidden: () => !g?.includes("italic"),
217
217
  isActive: (e) => e.isItalic,
218
218
  isDisabled: (e) => !e.canItalic
219
219
  },
220
220
  {
221
- icon: /* @__PURE__ */ v(C, {}),
221
+ icon: /* @__PURE__ */ b(w, {}),
222
222
  label: $("strikethrough"),
223
223
  toggle: !0,
224
224
  onClick: (e) => e.chain().focus().toggleStrike().run(),
225
- hidden: () => !_?.includes("strikethrough"),
225
+ hidden: () => !g?.includes("strikethrough"),
226
226
  isActive: (e) => e.isStrike,
227
227
  isDisabled: (e) => !e.canStrike
228
228
  },
229
229
  {
230
- icon: /* @__PURE__ */ v(w, {}),
230
+ icon: /* @__PURE__ */ b(T, {}),
231
231
  label: $("code"),
232
232
  toggle: !0,
233
233
  onClick: (e) => e.chain().focus().toggleCode().run(),
234
- hidden: () => !_?.includes("code"),
234
+ hidden: () => !g?.includes("code"),
235
235
  isActive: (e) => e.isCode,
236
236
  isDisabled: (e) => !e.canCode
237
237
  },
238
238
  {
239
- icon: /* @__PURE__ */ v(O, {}),
239
+ icon: /* @__PURE__ */ b(k, {}),
240
240
  label: $("underline"),
241
241
  toggle: !0,
242
242
  onClick: (e) => e.chain().focus().toggleUnderline().run(),
243
- hidden: () => !_?.includes("underline"),
243
+ hidden: () => !g?.includes("underline"),
244
244
  isActive: (e) => e.isUnderline
245
245
  },
246
246
  {
247
- icon: /* @__PURE__ */ v(R, {}),
247
+ icon: /* @__PURE__ */ b(z, {}),
248
248
  label: $("subscript"),
249
249
  toggle: !0,
250
250
  onClick: (e) => e.chain().focus().toggleSubscript().run(),
251
- hidden: () => !_?.includes("subscript"),
251
+ hidden: () => !g?.includes("subscript"),
252
252
  isActive: (e) => e.isSubScript
253
253
  },
254
254
  {
255
- icon: /* @__PURE__ */ v(L, {}),
255
+ icon: /* @__PURE__ */ b(R, {}),
256
256
  label: $("superscript"),
257
257
  toggle: !0,
258
258
  onClick: (e) => e.chain().focus().toggleSuperscript().run(),
259
- hidden: () => !_?.includes("superscript"),
259
+ hidden: () => !g?.includes("superscript"),
260
260
  isActive: (e) => e.isSuperScript
261
261
  },
262
262
  {
263
- icon: /* @__PURE__ */ v(A, {}),
263
+ icon: /* @__PURE__ */ b(j, {}),
264
264
  label: $("insertImage"),
265
- hidden: () => !_?.includes("image"),
265
+ hidden: () => !g?.includes("image"),
266
266
  onClick: (e) => e.chain().focus().setImageUploadNode().run()
267
267
  },
268
268
  {
269
- icon: /* @__PURE__ */ v(P, {}),
269
+ icon: /* @__PURE__ */ b(F, {}),
270
270
  label: $("insertVideo"),
271
- hidden: () => !_?.includes("video"),
271
+ hidden: () => !g?.includes("video"),
272
272
  onClick: (e) => e.chain().focus().insertMedia({ type: "video" }).run()
273
273
  },
274
274
  {
275
- icon: /* @__PURE__ */ v(F, {}),
275
+ icon: /* @__PURE__ */ b(I, {}),
276
276
  label: $("insertAudio"),
277
- hidden: () => !_?.includes("audio"),
277
+ hidden: () => !g?.includes("audio"),
278
278
  onClick: (e) => e.chain().focus().insertMedia({
279
279
  type: "audio",
280
280
  tag: "audio"
281
281
  }).run()
282
282
  },
283
283
  {
284
- icon: /* @__PURE__ */ v(te, {}),
284
+ icon: /* @__PURE__ */ b(o, {}),
285
285
  label: $("cssClasses"),
286
- hidden: () => !_?.includes("css"),
286
+ hidden: () => !g?.includes("css"),
287
287
  onClick: (e) => e.commands.openCSSClassDialog()
288
288
  },
289
289
  {
290
- icon: /* @__PURE__ */ v(N, {}),
290
+ icon: /* @__PURE__ */ b(P, {}),
291
291
  label: $("blockquote"),
292
292
  toggle: !0,
293
- hidden: () => !_?.includes("blockquote"),
293
+ hidden: () => !g?.includes("blockquote"),
294
294
  onClick: (e) => e.chain().focus().toggleBlockquote().run(),
295
295
  isActive: (e) => e.isBlockquote
296
296
  },
297
297
  {
298
- icon: /* @__PURE__ */ v(z, {}),
298
+ icon: /* @__PURE__ */ b(B, {}),
299
299
  label: $("heading"),
300
300
  toggle: !0,
301
- hidden: () => !_?.includes("h3"),
301
+ hidden: () => !g?.includes("h3"),
302
302
  onClick: (e) => e.chain().focus().toggleHeadingParagraph().run(),
303
303
  isActive: (e) => e.isHeadingParagraph
304
304
  },
305
305
  {
306
- icon: /* @__PURE__ */ v(k, {}),
306
+ icon: /* @__PURE__ */ b(A, {}),
307
307
  label: $("insertMath"),
308
- hidden: () => !_?.includes("math"),
308
+ hidden: () => !g?.includes("math"),
309
309
  onClick: (e) => e.chain().focus().insertMath("").run()
310
310
  },
311
311
  {
312
- icon: /* @__PURE__ */ v(c, { letter: "ñ" }),
312
+ icon: /* @__PURE__ */ b(l, { letter: "ñ" }),
313
313
  label: $("spanishCharacters"),
314
- hidden: () => !_?.includes("languageCharacters"),
315
- onClick: () => K(i)
314
+ hidden: () => !g?.includes("languageCharacters"),
315
+ onClick: () => K(a)
316
316
  },
317
317
  {
318
- icon: /* @__PURE__ */ v(c, { letter: "€" }),
318
+ icon: /* @__PURE__ */ b(l, { letter: "€" }),
319
319
  label: $("specialCharacters"),
320
- hidden: () => _?.filter((e) => e === "languageCharacters").length !== 2,
321
- onClick: () => K(a)
320
+ hidden: () => g?.filter((e) => e === "languageCharacters").length !== 2,
321
+ onClick: () => K(ee)
322
322
  },
323
323
  {
324
- icon: /* @__PURE__ */ v(ee, { editor: p }),
324
+ icon: /* @__PURE__ */ b(te, { editor: t }),
325
325
  label: $("textAlignment"),
326
- hidden: () => !_?.includes("text-align"),
326
+ hidden: () => !g?.includes("text-align"),
327
327
  onClick: () => {}
328
328
  },
329
329
  {
330
- icon: /* @__PURE__ */ v(E, {}),
330
+ icon: /* @__PURE__ */ b(D, {}),
331
331
  label: $("bulletedList"),
332
332
  toggle: !0,
333
- hidden: () => !_?.includes("bulleted-list"),
333
+ hidden: () => !g?.includes("bulleted-list"),
334
334
  onClick: (e) => e.chain().focus().toggleBulletList().run(),
335
335
  isActive: (e) => e.isBulletList
336
336
  },
337
337
  {
338
- icon: /* @__PURE__ */ v(D, {}),
338
+ icon: /* @__PURE__ */ b(O, {}),
339
339
  label: $("numberedList"),
340
340
  toggle: !0,
341
- hidden: () => !_?.includes("numbered-list"),
341
+ hidden: () => !g?.includes("numbered-list"),
342
342
  onClick: (e) => e.chain().focus().toggleOrderedList().run(),
343
343
  isActive: (e) => e.isOrderedList
344
344
  },
345
345
  {
346
- icon: /* @__PURE__ */ v(M, {}),
347
- label: I.t("common:undo", { lng: W }),
348
- hidden: () => !_?.includes("undo"),
346
+ icon: /* @__PURE__ */ b(N, {}),
347
+ label: L.t("common:undo", { lng: W }),
348
+ hidden: () => !g?.includes("undo"),
349
349
  onClick: (e) => e.chain().focus().undo().run(),
350
350
  isDisabled: (e) => !e.canUndo
351
351
  },
352
352
  {
353
- icon: /* @__PURE__ */ v(j, {}),
354
- label: I.t("graphing.redo", { lng: W }),
355
- hidden: () => !_?.includes("redo"),
353
+ icon: /* @__PURE__ */ b(M, {}),
354
+ label: L.t("graphing.redo", { lng: W }),
355
+ hidden: () => !g?.includes("redo"),
356
356
  onClick: (e) => e.chain().focus().redo().run(),
357
357
  isDisabled: (e) => !e.canRedo
358
358
  }
359
359
  ], [
360
- _,
361
- p,
360
+ g,
361
+ t,
362
362
  W
363
363
  ]);
364
- return /* @__PURE__ */ y("div", {
364
+ return /* @__PURE__ */ x("div", {
365
365
  ref: q,
366
366
  className: ce,
367
367
  style: { ...le },
368
368
  onMouseDown: ue,
369
369
  children: [
370
- Z && /* @__PURE__ */ v("div", {
371
- className: m.defaultToolbar,
370
+ Z && /* @__PURE__ */ b("div", {
371
+ className: h.defaultToolbar,
372
372
  role: "toolbar",
373
373
  tabIndex: -1,
374
- "aria-label": I.t("editableHtml.responseAreaToolbar", { lng: W }),
375
- children: /* @__PURE__ */ v("div", {
376
- className: m.buttonsContainer,
377
- children: /* @__PURE__ */ v("button", {
374
+ "aria-label": L.t("editableHtml.responseAreaToolbar", { lng: W }),
375
+ children: /* @__PURE__ */ b("div", {
376
+ className: h.buttonsContainer,
377
+ children: /* @__PURE__ */ b("button", {
378
378
  type: "button",
379
- className: m.button,
379
+ className: h.button,
380
380
  onClick: (e) => {
381
- e.preventDefault(), p.chain().focus().deleteSelection().run(), V?.(p.getHTML());
381
+ e.preventDefault(), t.chain().focus().deleteSelection().run(), V?.(t.getHTML());
382
382
  },
383
383
  "aria-label": "Delete response area",
384
384
  title: "Delete response area",
385
- children: /* @__PURE__ */ v(g, {})
385
+ children: /* @__PURE__ */ b(oe, {})
386
386
  })
387
387
  })
388
388
  }),
389
- !Y.hideDefaultToolbar && /* @__PURE__ */ y("div", {
390
- className: m.defaultToolbar,
389
+ !Y.hideDefaultToolbar && /* @__PURE__ */ x("div", {
390
+ className: h.defaultToolbar,
391
391
  role: "toolbar",
392
392
  tabIndex: -1,
393
- "aria-label": I.t("editableHtml.toolbar", { lng: W }),
393
+ "aria-label": L.t("editableHtml.toolbar", { lng: W }),
394
394
  children: [
395
- /* @__PURE__ */ v("div", {
396
- className: m.buttonsContainer,
397
- children: de.filter((e) => !e.hidden?.(Y)).map((e, t) => {
398
- let r = e.isDisabled?.(Y), i = e.isActive?.(Y);
399
- return /* @__PURE__ */ v("button", {
395
+ /* @__PURE__ */ b("div", {
396
+ className: h.buttonsContainer,
397
+ children: de.filter((e) => !e.hidden?.(Y)).map((e, n) => {
398
+ let i = e.isDisabled?.(Y), a = e.isActive?.(Y);
399
+ return /* @__PURE__ */ b("button", {
400
400
  type: "button",
401
- disabled: r,
401
+ disabled: i,
402
402
  "aria-label": e.label,
403
403
  title: e.label,
404
- "aria-pressed": e.toggle ? !!i : void 0,
405
- onClick: (t) => {
406
- t.preventDefault(), e.onClick(p);
404
+ "aria-pressed": e.toggle ? !!a : void 0,
405
+ onClick: (n) => {
406
+ n.preventDefault(), e.onClick(t);
407
407
  },
408
- className: n(m.button, { [m.active]: i }),
408
+ className: r(h.button, { [h.active]: a }),
409
409
  children: e.icon
410
- }, t);
410
+ }, n);
411
411
  })
412
412
  }),
413
- _?.includes("responseArea") && /* @__PURE__ */ v("button", {
413
+ g?.includes("responseArea") && /* @__PURE__ */ b("button", {
414
414
  type: "button",
415
415
  "aria-label": "Insert response area",
416
416
  title: "Insert response area",
417
417
  onClick: () => {
418
- p.chain().focus().insertResponseArea(B.type).run();
418
+ t.chain().focus().insertResponseArea(y.type).run();
419
419
  },
420
- className: m.button,
421
- children: /* @__PURE__ */ v(r, {})
420
+ className: h.button,
421
+ children: /* @__PURE__ */ b(i, {})
422
422
  }),
423
- J.showDone && /* @__PURE__ */ v(t, {
423
+ J.showDone && /* @__PURE__ */ b(n, {
424
424
  language: W,
425
425
  onClick: () => {
426
- V?.(p.getHTML()), p.commands.blur();
426
+ V?.(t.getHTML()), t.commands.blur();
427
427
  }
428
428
  })
429
429
  ]
430
430
  }),
431
- G && /* @__PURE__ */ v(ae, {
432
- editor: p,
431
+ G && /* @__PURE__ */ b(u, {
432
+ editor: t,
433
433
  opts: {
434
434
  ...G,
435
435
  renderPopOver: (e, t) => console.log("Show popover", t),
@@ -440,8 +440,8 @@ function B({ editor: p, classes: m, activePlugins: _, toolbarOpts: b, responseAr
440
440
  ]
441
441
  });
442
442
  }
443
- var V = (e) => {
444
- m();
443
+ var H = (e) => {
444
+ g();
445
445
  let t = {
446
446
  defaultToolbar: "defaultToolbar",
447
447
  buttonsContainer: "buttonsContainer",
@@ -461,11 +461,11 @@ var V = (e) => {
461
461
  label: "label",
462
462
  shared: "shared"
463
463
  };
464
- return /* @__PURE__ */ v(H, { children: /* @__PURE__ */ v(B, {
464
+ return /* @__PURE__ */ b(U, { children: /* @__PURE__ */ b(V, {
465
465
  ...e,
466
466
  classes: t
467
467
  }) });
468
- }, H = p("div")(() => ({
468
+ }, U = h("div")(() => ({
469
469
  height: 0,
470
470
  overflow: "visible",
471
471
  "& .defaultToolbar": {
@@ -489,14 +489,14 @@ var V = (e) => {
489
489
  width: "24px",
490
490
  height: "24px"
491
491
  },
492
- "&:hover": { color: b.text() },
493
- "&:focus": { outline: `2px solid ${b.buttonFocusOutline()}` }
492
+ "&:hover": { color: v.text() },
493
+ "&:focus": { outline: `2px solid ${v.buttonFocusOutline()}` }
494
494
  },
495
- "& .active": { color: b.text() },
495
+ "& .active": { color: v.text() },
496
496
  "& .disabled": {
497
497
  opacity: .7,
498
498
  cursor: "not-allowed",
499
- "& :hover": { color: b.disabled() }
499
+ "& :hover": { color: v.disabled() }
500
500
  },
501
501
  "& .isActive": {
502
502
  background: "var(--purple)",
@@ -508,7 +508,7 @@ var V = (e) => {
508
508
  zIndex: 20,
509
509
  cursor: "pointer",
510
510
  justifyContent: "space-between",
511
- background: "var(--editable-html-toolbar-bg, #efefef)",
511
+ background: t,
512
512
  minWidth: "280px",
513
513
  margin: 0,
514
514
  padding: "2px",
@@ -544,4 +544,4 @@ var V = (e) => {
544
544
  "& .shared": { display: "flex" }
545
545
  }));
546
546
  //#endregion
547
- export { V as default };
547
+ export { H as default };