@examind/block-editor 0.1.13 → 0.1.15

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.
Files changed (4) hide show
  1. package/dist/index.css +48 -485
  2. package/dist/index.js +867 -833
  3. package/dist/index.mjs +690 -657
  4. package/package.json +14 -12
package/dist/index.mjs CHANGED
@@ -26,144 +26,9 @@ import SlTab from "@shoelace-style/shoelace/dist/components/tab/tab.js";
26
26
  import SlTextarea from "@shoelace-style/shoelace/dist/components/textarea/textarea.js";
27
27
  import SlTooltip from "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js";
28
28
 
29
- // src/components/feedback/DotBadge.tsx
30
- import clsx from "clsx";
31
- import { jsx } from "react/jsx-runtime";
32
- function DotBadge(props) {
33
- const { slot, variant, leftSided, style } = props;
34
- const className = clsx("dot", {
35
- ["left_sided"]: leftSided
36
- });
37
- const attributes = {};
38
- if (slot) {
39
- attributes.slot = slot;
40
- }
41
- return /* @__PURE__ */ jsx(
42
- "sl-badge",
43
- {
44
- class: className,
45
- ...attributes,
46
- variant,
47
- pill: true,
48
- pulse: true,
49
- style
50
- }
51
- );
52
- }
53
-
54
- // src/components/feedback/TextBadge.tsx
55
- import { jsx as jsx2 } from "react/jsx-runtime";
56
- function TextBadge(props) {
57
- const { variant, text, slot } = props;
58
- const attributes = {};
59
- if (slot) {
60
- attributes.slot = slot;
61
- }
62
- return /* @__PURE__ */ jsx2("sl-badge", { ...attributes, variant, pill: true, children: text });
63
- }
64
-
65
- // src/components/icon/Icon.tsx
66
- import { jsx as jsx3 } from "react/jsx-runtime";
67
- function Icon(props) {
68
- const { icon, slot, style, fill, dataTrigger } = props;
69
- const IconComponent = icon;
70
- const dataAttributes = {};
71
- if (dataTrigger) {
72
- dataAttributes["data-trigger"] = dataTrigger;
73
- }
74
- return /* @__PURE__ */ jsx3("div", { slot, className: "sl-icon", ...dataAttributes, children: IconComponent && /* @__PURE__ */ jsx3(
75
- IconComponent,
76
- {
77
- fill: fill ? fill : "none",
78
- style: { ...style }
79
- }
80
- ) });
81
- }
82
-
83
- // src/components/utils/objectUtils.ts
84
- var isNil = (value) => value === null || value === void 0;
85
- function filterNilAttrs(object, attrs) {
86
- return Object.fromEntries(
87
- Object.entries(object).filter(
88
- ([key, value]) => attrs.includes(key) && !isNil(value)
89
- )
90
- );
91
- }
92
-
93
- // src/components/inputs/Button.tsx
94
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
95
- function Button(props) {
96
- const {
97
- label,
98
- variant = "default",
99
- className,
100
- EndIcon,
101
- StartIcon,
102
- circle,
103
- size = "medium",
104
- isBadgeDot = false,
105
- badgeText,
106
- type = "button",
107
- tooltip,
108
- prefix,
109
- suffix,
110
- onClick
111
- } = props;
112
- const handleButtonClick = (e) => {
113
- if (e) {
114
- e.stopPropagation();
115
- e.preventDefault();
116
- }
117
- if (onClick) {
118
- onClick();
119
- }
120
- };
121
- const attributes = filterNilAttrs(props, [
122
- "form",
123
- "name",
124
- "loading",
125
- "disabled",
126
- "outline",
127
- "circle",
128
- "caret",
129
- "pill",
130
- "slot",
131
- "href",
132
- "target",
133
- "value",
134
- "tabindex"
135
- ]);
136
- let validClassName = className;
137
- if (!label) {
138
- validClassName = className ? `${className} button_icon` : "button_icon";
139
- }
140
- const buttonElement = /* @__PURE__ */ jsxs(
141
- "sl-button",
142
- {
143
- class: validClassName,
144
- ...attributes,
145
- variant,
146
- size,
147
- title: tooltip,
148
- type,
149
- onClick: handleButtonClick,
150
- children: [
151
- prefix && /* @__PURE__ */ jsx4("div", { slot: "prefix", children: prefix }),
152
- StartIcon && !circle && /* @__PURE__ */ jsx4(Icon, { slot: "prefix", icon: StartIcon }),
153
- EndIcon && !circle && /* @__PURE__ */ jsx4(Icon, { slot: "suffix", icon: EndIcon }),
154
- circle ? StartIcon ? /* @__PURE__ */ jsx4(Icon, { slot: "prefix", icon: StartIcon }) : null : label ? /* @__PURE__ */ jsx4("span", { className: "line-clamp-1", children: label }) : null,
155
- isBadgeDot && /* @__PURE__ */ jsx4(DotBadge, { variant: "danger" }),
156
- badgeText && /* @__PURE__ */ jsx4(TextBadge, { variant: "neutral", text: badgeText }),
157
- suffix && /* @__PURE__ */ jsx4("div", { slot: "suffix", children: suffix })
158
- ]
159
- }
160
- );
161
- return buttonElement;
162
- }
163
-
164
29
  // src/components/utils/ResizeObserver.tsx
165
30
  import { useEffect, useRef } from "react";
166
- import { jsx as jsx5 } from "react/jsx-runtime";
31
+ import { jsx } from "react/jsx-runtime";
167
32
  var RESIZE_CONTENT_EVENT = "RESIZE_CONTENT_EVENT";
168
33
  function ResizeObserver(props) {
169
34
  const { children } = props;
@@ -183,7 +48,7 @@ function ResizeObserver(props) {
183
48
  );
184
49
  };
185
50
  }, []);
186
- return /* @__PURE__ */ jsx5(
51
+ return /* @__PURE__ */ jsx(
187
52
  "sl-resize-observer",
188
53
  {
189
54
  style: { display: "contents" },
@@ -201,11 +66,29 @@ import {
201
66
  } from "lexical";
202
67
  import { Info, Lightbulb } from "lucide-react";
203
68
 
69
+ // src/components/icon/Icon.tsx
70
+ import { jsx as jsx2 } from "react/jsx-runtime";
71
+ function Icon(props) {
72
+ const { icon, slot, style, fill, dataTrigger } = props;
73
+ const IconComponent = icon;
74
+ const dataAttributes = {};
75
+ if (dataTrigger) {
76
+ dataAttributes["data-trigger"] = dataTrigger;
77
+ }
78
+ return /* @__PURE__ */ jsx2("div", { slot, className: "sl-icon", ...dataAttributes, children: IconComponent && /* @__PURE__ */ jsx2(
79
+ IconComponent,
80
+ {
81
+ fill: fill ? fill : "none",
82
+ style: { ...style }
83
+ }
84
+ ) });
85
+ }
86
+
204
87
  // src/content/editable/NestedContentEditable.tsx
205
88
  import { ContentEditable as LexicalContentEditable } from "@lexical/react/LexicalContentEditable";
206
- import { jsx as jsx6 } from "react/jsx-runtime";
89
+ import { jsx as jsx3 } from "react/jsx-runtime";
207
90
  function NestedContentEditable(props) {
208
- return /* @__PURE__ */ jsx6(
91
+ return /* @__PURE__ */ jsx3(
209
92
  LexicalContentEditable,
210
93
  {
211
94
  tabIndex: props.tabIndex,
@@ -242,7 +125,7 @@ function OnNestedChangePlugin(props) {
242
125
  import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
243
126
  import uniqueId from "lodash-es/uniqueId";
244
127
  import React2, { useContext, useEffect as useEffect3, useState } from "react";
245
- import { jsx as jsx7 } from "react/jsx-runtime";
128
+ import { jsx as jsx4 } from "react/jsx-runtime";
246
129
  var NestedEditorContext = React2.createContext(null);
247
130
  function NestedEditor(props) {
248
131
  const { children, nodeKey } = props;
@@ -278,7 +161,7 @@ function NestedEditor(props) {
278
161
  }
279
162
  );
280
163
  }, [editor]);
281
- return /* @__PURE__ */ jsx7(
164
+ return /* @__PURE__ */ jsx4(
282
165
  NestedEditorContext.Provider,
283
166
  {
284
167
  value: {
@@ -299,6 +182,123 @@ var useNestedEditor = () => {
299
182
  return context;
300
183
  };
301
184
 
185
+ // src/components/feedback/DotBadge.tsx
186
+ import clsx from "clsx";
187
+ import { jsx as jsx5 } from "react/jsx-runtime";
188
+ function DotBadge(props) {
189
+ const { slot, variant, leftSided, style } = props;
190
+ const className = clsx("dot", {
191
+ ["left_sided"]: leftSided
192
+ });
193
+ const attributes = {};
194
+ if (slot) {
195
+ attributes.slot = slot;
196
+ }
197
+ return /* @__PURE__ */ jsx5(
198
+ "sl-badge",
199
+ {
200
+ class: className,
201
+ ...attributes,
202
+ variant,
203
+ pill: true,
204
+ pulse: true,
205
+ style
206
+ }
207
+ );
208
+ }
209
+
210
+ // src/components/feedback/TextBadge.tsx
211
+ import { jsx as jsx6 } from "react/jsx-runtime";
212
+ function TextBadge(props) {
213
+ const { variant, text, slot } = props;
214
+ const attributes = {};
215
+ if (slot) {
216
+ attributes.slot = slot;
217
+ }
218
+ return /* @__PURE__ */ jsx6("sl-badge", { ...attributes, variant, pill: true, children: text });
219
+ }
220
+
221
+ // src/components/utils/objectUtils.ts
222
+ var isNil = (value) => value === null || value === void 0;
223
+ function filterNilAttrs(object, attrs) {
224
+ return Object.fromEntries(
225
+ Object.entries(object).filter(
226
+ ([key, value]) => attrs.includes(key) && !isNil(value)
227
+ )
228
+ );
229
+ }
230
+
231
+ // src/components/inputs/Button.tsx
232
+ import { jsx as jsx7, jsxs } from "react/jsx-runtime";
233
+ function Button(props) {
234
+ const {
235
+ label,
236
+ variant = "default",
237
+ className,
238
+ EndIcon,
239
+ StartIcon,
240
+ circle,
241
+ size = "medium",
242
+ isBadgeDot = false,
243
+ badgeText,
244
+ type = "button",
245
+ tooltip,
246
+ prefix,
247
+ suffix,
248
+ onClick
249
+ } = props;
250
+ const handleButtonClick = (e) => {
251
+ if (e) {
252
+ e.stopPropagation();
253
+ e.preventDefault();
254
+ }
255
+ if (onClick) {
256
+ onClick();
257
+ }
258
+ };
259
+ const attributes = filterNilAttrs(props, [
260
+ "form",
261
+ "name",
262
+ "loading",
263
+ "disabled",
264
+ "outline",
265
+ "circle",
266
+ "caret",
267
+ "pill",
268
+ "slot",
269
+ "href",
270
+ "target",
271
+ "value",
272
+ "tabindex"
273
+ ]);
274
+ let validClassName = className;
275
+ if (!label) {
276
+ validClassName = className ? `${className} button_icon` : "button_icon";
277
+ }
278
+ const buttonElement = /* @__PURE__ */ jsxs(
279
+ "sl-button",
280
+ {
281
+ class: validClassName,
282
+ ...attributes,
283
+ variant,
284
+ size,
285
+ title: tooltip,
286
+ type,
287
+ onClick: handleButtonClick,
288
+ children: [
289
+ prefix && /* @__PURE__ */ jsx7("div", { slot: "prefix", children: prefix }),
290
+ StartIcon && !circle && /* @__PURE__ */ jsx7(Icon, { slot: "prefix", icon: StartIcon }),
291
+ EndIcon && !circle && /* @__PURE__ */ jsx7(Icon, { slot: "suffix", icon: EndIcon }),
292
+ circle ? StartIcon ? /* @__PURE__ */ jsx7(Icon, { slot: "prefix", icon: StartIcon }) : null : label ? /* @__PURE__ */ jsx7("span", { className: "line-clamp-1", children: label }) : null,
293
+ isBadgeDot && /* @__PURE__ */ jsx7(DotBadge, { variant: "danger" }),
294
+ badgeText && /* @__PURE__ */ jsx7(TextBadge, { variant: "neutral", text: badgeText }),
295
+ suffix && /* @__PURE__ */ jsx7("div", { slot: "suffix", children: suffix })
296
+ ]
297
+ }
298
+ );
299
+ return buttonElement;
300
+ }
301
+
302
302
  // src/components/layouts/SettingsCard.tsx
303
303
  import { XIcon } from "lucide-react";
304
304
  import { useEffect as useEffect4, useRef as useRef2 } from "react";
@@ -4456,6 +4456,7 @@ var ACCEPTABLE_IMAGE_TYPES = [
4456
4456
  ];
4457
4457
 
4458
4458
  // src/utils/formatUtils.ts
4459
+ import numeral from "numeral";
4459
4460
  function humanReadableBytes(bytes) {
4460
4461
  if (!bytes) {
4461
4462
  return "";
@@ -4472,6 +4473,31 @@ function humanReadableBytes(bytes) {
4472
4473
  return `${Math.round(bytes / Math.pow(1024, i))} ${sizes[i]}`;
4473
4474
  }
4474
4475
  }
4476
+ function getNumber(str) {
4477
+ const trimmedStr = str.trim();
4478
+ if (trimmedStr === "") {
4479
+ return void 0;
4480
+ }
4481
+ const num = +trimmedStr;
4482
+ if (Number.isNaN(num)) {
4483
+ return void 0;
4484
+ }
4485
+ return num;
4486
+ }
4487
+ var formatNumber = (num, format) => {
4488
+ return format ? numeral(num).format(format) : autoFormatNumber(num);
4489
+ };
4490
+ var correctRoundingError = (num) => parseFloat(num.toPrecision(14));
4491
+ var autoFormatNumber = (num, options = {}) => {
4492
+ const correctedNum = correctRoundingError(num);
4493
+ const formatted = new Intl.NumberFormat("en-US", {
4494
+ maximumFractionDigits: 14,
4495
+ ...options
4496
+ }).format(correctedNum);
4497
+ if (Math.abs(correctedNum) < 1e4)
4498
+ return formatted.replace(/,/g, "");
4499
+ return formatted;
4500
+ };
4475
4501
 
4476
4502
  // src/plugins/ImagePlugin/ImagePlugin.tsx
4477
4503
  import { useLexicalComposerContext as useLexicalComposerContext18 } from "@lexical/react/LexicalComposerContext";
@@ -4607,15 +4633,15 @@ function ImageSettings(props) {
4607
4633
  },
4608
4634
  options: [
4609
4635
  {
4610
- id: "30%",
4636
+ id: "188px",
4611
4637
  label: "Small"
4612
4638
  },
4613
4639
  {
4614
- id: "50%",
4640
+ id: "375px",
4615
4641
  label: "Medium"
4616
4642
  },
4617
4643
  {
4618
- id: "70%",
4644
+ id: "563px",
4619
4645
  label: "Large"
4620
4646
  },
4621
4647
  {
@@ -4926,10 +4952,8 @@ var placeholderData = `data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w
4926
4952
  import { useLexicalComposerContext as useLexicalComposerContext19 } from "@lexical/react/LexicalComposerContext";
4927
4953
  import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
4928
4954
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
4929
- import { ListPlugin } from "@lexical/react/LexicalListPlugin";
4930
4955
  import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer";
4931
- import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
4932
- import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
4956
+ import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
4933
4957
  import { useLexicalNodeSelection as useLexicalNodeSelection2 } from "@lexical/react/useLexicalNodeSelection";
4934
4958
  import { mergeRegister as mergeRegister5 } from "@lexical/utils";
4935
4959
  import {
@@ -4966,9 +4990,6 @@ function ImageComponent(props) {
4966
4990
  if (root.getFirstChild() === null) {
4967
4991
  const paragraph = $createParagraphNode4();
4968
4992
  const textNode = $createTextNode3("Image caption");
4969
- textNode.setStyle(
4970
- "font-size: var(--sl-font-size-small); color: var(--sl-color-gray-500)"
4971
- );
4972
4993
  paragraph.append(textNode);
4973
4994
  paragraph.setFormat("center");
4974
4995
  root.append(paragraph);
@@ -5029,7 +5050,7 @@ function ImageComponent(props) {
5029
5050
  }
5030
5051
  );
5031
5052
  }
5032
- return /* @__PURE__ */ jsx47(Fragment19, { children: /* @__PURE__ */ jsxs16("div", { className: "image-box", style: { width }, children: [
5053
+ return /* @__PURE__ */ jsx47(Fragment19, { children: /* @__PURE__ */ jsxs16("div", { className: "image-box", style: { width, maxWidth: "100%" }, children: [
5033
5054
  src ? /* @__PURE__ */ jsx47(
5034
5055
  "img",
5035
5056
  {
@@ -5097,18 +5118,15 @@ function ImageComponent(props) {
5097
5118
  position: "relative"
5098
5119
  },
5099
5120
  children: /* @__PURE__ */ jsx47(LexicalNestedComposer, { initialEditor: caption, children: /* @__PURE__ */ jsxs16(NestedEditor, { nodeKey, children: [
5121
+ /* @__PURE__ */ jsx47(SettingsPanelNestedAgentPlugin, {}),
5100
5122
  /* @__PURE__ */ jsx47(
5101
- RichTextPlugin,
5123
+ PlainTextPlugin,
5102
5124
  {
5103
5125
  contentEditable: /* @__PURE__ */ jsx47(NestedContentEditable, {}),
5104
- placeholder: null,
5105
5126
  ErrorBoundary: LexicalErrorBoundary
5106
5127
  }
5107
5128
  ),
5108
- /* @__PURE__ */ jsx47(HistoryPlugin, { externalHistoryState: historyState }),
5109
- /* @__PURE__ */ jsx47(ListPlugin, {}),
5110
- /* @__PURE__ */ jsx47(TabIndentationPlugin, {}),
5111
- /* @__PURE__ */ jsx47(TextToolbarAgentPlugin, { decoratorNode: ImageNode })
5129
+ /* @__PURE__ */ jsx47(HistoryPlugin, { externalHistoryState: historyState })
5112
5130
  ] }) })
5113
5131
  }
5114
5132
  )
@@ -5116,10 +5134,8 @@ function ImageComponent(props) {
5116
5134
  }
5117
5135
 
5118
5136
  // src/plugins/ImagePlugin/ImageNode.tsx
5119
- import { $generateHtmlFromNodes } from "@lexical/html";
5120
5137
  import {
5121
5138
  $applyNodeReplacement as $applyNodeReplacement3,
5122
- $getRoot as $getRoot3,
5123
5139
  createEditor,
5124
5140
  DecoratorNode as DecoratorNode3
5125
5141
  } from "lexical";
@@ -5193,35 +5209,6 @@ var ImageNode = class _ImageNode extends DecoratorNode3 {
5193
5209
  }
5194
5210
  exportDOM() {
5195
5211
  const element = this._createWrapper();
5196
- const imgBox = document.createElement("div");
5197
- imgBox.classList.add("image-box");
5198
- imgBox.style.width = this.__width.toString();
5199
- element.appendChild(imgBox);
5200
- const img = document.createElement("img");
5201
- img.setAttribute("src", this.__src || "");
5202
- img.style.width = "100%";
5203
- img.style.borderRadius = "var(--sl-border-radius-small)";
5204
- if (this.__showBorder) {
5205
- img.style.border = "1px solid var(--sl-color-neutral-300)";
5206
- }
5207
- imgBox.appendChild(img);
5208
- if (this.__showCaption && this.__caption) {
5209
- const div = document.createElement("div");
5210
- div.style.width = "100%";
5211
- this.__caption.getEditorState().read(() => {
5212
- div.innerHTML = $generateHtmlFromNodes(this.__caption, null);
5213
- const rootNode = $getRoot3();
5214
- if (rootNode) {
5215
- img.setAttribute(
5216
- "alt",
5217
- rootNode.getAllTextNodes().map((textNode) => {
5218
- return textNode.getTextContent();
5219
- }).join(" ")
5220
- );
5221
- }
5222
- });
5223
- imgBox.appendChild(div);
5224
- }
5225
5212
  return { element };
5226
5213
  }
5227
5214
  static importDOM() {
@@ -5522,7 +5509,15 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5522
5509
  this.__variable
5523
5510
  );
5524
5511
  if (this.__isPreviewMode) {
5525
- element.textContent = this.__variableValue || "[???]";
5512
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5513
+ if (variableAsNumber) {
5514
+ element.textContent = formatNumber(
5515
+ variableAsNumber,
5516
+ this.__variableFormat
5517
+ );
5518
+ } else {
5519
+ element.textContent = "[???]";
5520
+ }
5526
5521
  } else {
5527
5522
  element.textContent = this.__variable;
5528
5523
  }
@@ -5539,7 +5534,15 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5539
5534
  }
5540
5535
  updateDOM(_prevNode, dom, _config) {
5541
5536
  if (this.__isPreviewMode) {
5542
- dom.textContent = this.__variableValue || "[???]";
5537
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5538
+ if (variableAsNumber) {
5539
+ dom.textContent = formatNumber(
5540
+ variableAsNumber,
5541
+ this.__variableFormat
5542
+ );
5543
+ } else {
5544
+ dom.textContent = "[???]";
5545
+ }
5543
5546
  } else {
5544
5547
  dom.textContent = this.__variable;
5545
5548
  }
@@ -5772,7 +5775,7 @@ import { useLexicalComposerContext as useLexicalComposerContext22 } from "@lexic
5772
5775
  import { LexicalErrorBoundary as LexicalErrorBoundary2 } from "@lexical/react/LexicalErrorBoundary";
5773
5776
  import { HistoryPlugin as HistoryPlugin2 } from "@lexical/react/LexicalHistoryPlugin";
5774
5777
  import { LexicalNestedComposer as LexicalNestedComposer2 } from "@lexical/react/LexicalNestedComposer";
5775
- import { RichTextPlugin as RichTextPlugin2 } from "@lexical/react/LexicalRichTextPlugin";
5778
+ import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
5776
5779
  import {
5777
5780
  $createNodeSelection as $createNodeSelection3,
5778
5781
  $getNodeByKey as $getNodeByKey18,
@@ -5834,7 +5837,7 @@ function FinancialStatementQuestionComponent(props) {
5834
5837
  children: /* @__PURE__ */ jsx52(LexicalNestedComposer2, { initialEditor: header, children: /* @__PURE__ */ jsxs17(NestedEditor, { nodeKey, children: [
5835
5838
  /* @__PURE__ */ jsx52(SettingsPanelNestedAgentPlugin, {}),
5836
5839
  /* @__PURE__ */ jsx52(
5837
- RichTextPlugin2,
5840
+ RichTextPlugin,
5838
5841
  {
5839
5842
  contentEditable: /* @__PURE__ */ jsx52(NestedContentEditable, {}),
5840
5843
  ErrorBoundary: LexicalErrorBoundary2,
@@ -5931,7 +5934,7 @@ function FinancialStatementQuestionComponent(props) {
5931
5934
  children: /* @__PURE__ */ jsxs17(NestedEditor, { nodeKey, children: [
5932
5935
  /* @__PURE__ */ jsx52(SettingsPanelNestedAgentPlugin, {}),
5933
5936
  /* @__PURE__ */ jsx52(
5934
- RichTextPlugin2,
5937
+ RichTextPlugin,
5935
5938
  {
5936
5939
  contentEditable: /* @__PURE__ */ jsx52(NestedContentEditable, {}),
5937
5940
  ErrorBoundary: LexicalErrorBoundary2,
@@ -6188,7 +6191,7 @@ import { useLexicalComposerContext as useLexicalComposerContext23 } from "@lexic
6188
6191
  import {
6189
6192
  $createParagraphNode as $createParagraphNode5,
6190
6193
  $getNodeByKey as $getNodeByKey19,
6191
- $getRoot as $getRoot4
6194
+ $getRoot as $getRoot3
6192
6195
  } from "lexical";
6193
6196
  import { useCallback as useCallback3 } from "react";
6194
6197
  import { jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
@@ -6211,7 +6214,7 @@ function DistractorButton(props) {
6211
6214
  const newQuestionItem = foundNode.__items[itemIndex + 1];
6212
6215
  if (newQuestionItem.itemOptionContent) {
6213
6216
  newQuestionItem.itemOptionContent.update(() => {
6214
- const root = $getRoot4();
6217
+ const root = $getRoot3();
6215
6218
  let firstChild = root.getFirstChild();
6216
6219
  if (!firstChild) {
6217
6220
  firstChild = $createParagraphNode5();
@@ -6297,12 +6300,12 @@ import { useLexicalComposerContext as useLexicalComposerContext25 } from "@lexic
6297
6300
  import { LexicalErrorBoundary as LexicalErrorBoundary3 } from "@lexical/react/LexicalErrorBoundary";
6298
6301
  import { HistoryPlugin as HistoryPlugin3 } from "@lexical/react/LexicalHistoryPlugin";
6299
6302
  import { LexicalNestedComposer as LexicalNestedComposer3 } from "@lexical/react/LexicalNestedComposer";
6300
- import { RichTextPlugin as RichTextPlugin3 } from "@lexical/react/LexicalRichTextPlugin";
6303
+ import { RichTextPlugin as RichTextPlugin2 } from "@lexical/react/LexicalRichTextPlugin";
6301
6304
  import clsx2 from "clsx";
6302
6305
  import {
6303
6306
  $createParagraphNode as $createParagraphNode6,
6304
6307
  $getNodeByKey as $getNodeByKey20,
6305
- $getRoot as $getRoot5
6308
+ $getRoot as $getRoot4
6306
6309
  } from "lexical";
6307
6310
  import { CircleMinus, CirclePlus } from "lucide-react";
6308
6311
  import { useCallback as useCallback4 } from "react";
@@ -6334,7 +6337,7 @@ function QuestionItemComponent(props) {
6334
6337
  const newQuestionItem = foundNode.__items[itemIndex + 1];
6335
6338
  if (newQuestionItem.itemPremiseContent) {
6336
6339
  newQuestionItem.itemPremiseContent.update(() => {
6337
- const root = $getRoot5();
6340
+ const root = $getRoot4();
6338
6341
  let firstChild = root.getFirstChild();
6339
6342
  if (!firstChild) {
6340
6343
  firstChild = $createParagraphNode6();
@@ -6345,7 +6348,7 @@ function QuestionItemComponent(props) {
6345
6348
  }
6346
6349
  if (newQuestionItem.itemOptionContent) {
6347
6350
  newQuestionItem.itemOptionContent.update(() => {
6348
- const root = $getRoot5();
6351
+ const root = $getRoot4();
6349
6352
  let firstChild = root.getFirstChild();
6350
6353
  if (!firstChild) {
6351
6354
  firstChild = $createParagraphNode6();
@@ -6386,7 +6389,7 @@ function QuestionItemComponent(props) {
6386
6389
  /* @__PURE__ */ jsx56("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx56(LexicalNestedComposer3, { initialEditor: itemPremiseContent, children: /* @__PURE__ */ jsxs19(NestedEditor, { nodeKey, children: [
6387
6390
  /* @__PURE__ */ jsx56(SettingsPanelNestedAgentPlugin, {}),
6388
6391
  /* @__PURE__ */ jsx56(
6389
- RichTextPlugin3,
6392
+ RichTextPlugin2,
6390
6393
  {
6391
6394
  contentEditable: /* @__PURE__ */ jsx56(NestedContentEditable, {}),
6392
6395
  ErrorBoundary: LexicalErrorBoundary3,
@@ -6425,7 +6428,7 @@ function QuestionItemComponent(props) {
6425
6428
  /* @__PURE__ */ jsx56("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx56(LexicalNestedComposer3, { initialEditor: itemOptionContent, children: /* @__PURE__ */ jsxs19(NestedEditor, { nodeKey, children: [
6426
6429
  /* @__PURE__ */ jsx56(SettingsPanelNestedAgentPlugin, {}),
6427
6430
  /* @__PURE__ */ jsx56(
6428
- RichTextPlugin3,
6431
+ RichTextPlugin2,
6429
6432
  {
6430
6433
  contentEditable: /* @__PURE__ */ jsx56(NestedContentEditable, {}),
6431
6434
  ErrorBoundary: LexicalErrorBoundary3,
@@ -6737,7 +6740,7 @@ import {
6737
6740
  $applyNodeReplacement as $applyNodeReplacement7,
6738
6741
  $createParagraphNode as $createParagraphNode7,
6739
6742
  $createTextNode as $createTextNode4,
6740
- $getRoot as $getRoot6,
6743
+ $getRoot as $getRoot5,
6741
6744
  DecoratorNode as DecoratorNode7,
6742
6745
  createEditor as createEditor4
6743
6746
  } from "lexical";
@@ -6759,7 +6762,7 @@ import { useLexicalComposerContext as useLexicalComposerContext27 } from "@lexic
6759
6762
  import { LexicalErrorBoundary as LexicalErrorBoundary4 } from "@lexical/react/LexicalErrorBoundary";
6760
6763
  import { HistoryPlugin as HistoryPlugin4 } from "@lexical/react/LexicalHistoryPlugin";
6761
6764
  import { LexicalNestedComposer as LexicalNestedComposer4 } from "@lexical/react/LexicalNestedComposer";
6762
- import { RichTextPlugin as RichTextPlugin4 } from "@lexical/react/LexicalRichTextPlugin";
6765
+ import { RichTextPlugin as RichTextPlugin3 } from "@lexical/react/LexicalRichTextPlugin";
6763
6766
  import clsx3 from "clsx";
6764
6767
  import { $getNodeByKey as $getNodeByKey22 } from "lexical";
6765
6768
  import { CircleMinus as CircleMinus2, CirclePlus as CirclePlus2, Settings } from "lucide-react";
@@ -6818,7 +6821,7 @@ function MultipleOptionQuestionItemComponent(props) {
6818
6821
  /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsx59(LexicalNestedComposer4, { initialEditor: content, children: /* @__PURE__ */ jsxs21(NestedEditor, { nodeKey, children: [
6819
6822
  /* @__PURE__ */ jsx59(SettingsPanelNestedAgentPlugin, {}),
6820
6823
  /* @__PURE__ */ jsx59(
6821
- RichTextPlugin4,
6824
+ RichTextPlugin3,
6822
6825
  {
6823
6826
  contentEditable: /* @__PURE__ */ jsx59(NestedContentEditable, {}),
6824
6827
  ErrorBoundary: LexicalErrorBoundary4,
@@ -7144,7 +7147,7 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends Decor
7144
7147
  const newOptions = [...writable.__options];
7145
7148
  const content = initNewContentEditor2();
7146
7149
  content.update(() => {
7147
- const root = $getRoot6();
7150
+ const root = $getRoot5();
7148
7151
  const firstChild = $createParagraphNode7();
7149
7152
  firstChild.append($createTextNode4(initialOptionText));
7150
7153
  root.append(firstChild);
@@ -7215,7 +7218,7 @@ import { useLexicalComposerContext as useLexicalComposerContext29 } from "@lexic
7215
7218
  import { LexicalErrorBoundary as LexicalErrorBoundary5 } from "@lexical/react/LexicalErrorBoundary";
7216
7219
  import { HistoryPlugin as HistoryPlugin5 } from "@lexical/react/LexicalHistoryPlugin";
7217
7220
  import { LexicalNestedComposer as LexicalNestedComposer5 } from "@lexical/react/LexicalNestedComposer";
7218
- import { RichTextPlugin as RichTextPlugin5 } from "@lexical/react/LexicalRichTextPlugin";
7221
+ import { RichTextPlugin as RichTextPlugin4 } from "@lexical/react/LexicalRichTextPlugin";
7219
7222
  import {
7220
7223
  $createNodeSelection as $createNodeSelection6,
7221
7224
  $getNodeByKey as $getNodeByKey24,
@@ -7276,7 +7279,7 @@ function ShortAnswerQuestionComponent(props) {
7276
7279
  /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(LexicalNestedComposer5, { initialEditor: notes, children: /* @__PURE__ */ jsxs23(NestedEditor, { nodeKey, children: [
7277
7280
  /* @__PURE__ */ jsx62(SettingsPanelNestedAgentPlugin, {}),
7278
7281
  /* @__PURE__ */ jsx62(
7279
- RichTextPlugin5,
7282
+ RichTextPlugin4,
7280
7283
  {
7281
7284
  contentEditable: /* @__PURE__ */ jsx62(NestedContentEditable, {}),
7282
7285
  ErrorBoundary: LexicalErrorBoundary5,
@@ -7449,12 +7452,12 @@ import { useLexicalComposerContext as useLexicalComposerContext31 } from "@lexic
7449
7452
  import { LexicalErrorBoundary as LexicalErrorBoundary6 } from "@lexical/react/LexicalErrorBoundary";
7450
7453
  import { HistoryPlugin as HistoryPlugin6 } from "@lexical/react/LexicalHistoryPlugin";
7451
7454
  import { LexicalNestedComposer as LexicalNestedComposer6 } from "@lexical/react/LexicalNestedComposer";
7452
- import { RichTextPlugin as RichTextPlugin6 } from "@lexical/react/LexicalRichTextPlugin";
7455
+ import { RichTextPlugin as RichTextPlugin5 } from "@lexical/react/LexicalRichTextPlugin";
7453
7456
  import clsx4 from "clsx";
7454
7457
  import {
7455
7458
  $createParagraphNode as $createParagraphNode8,
7456
7459
  $getNodeByKey as $getNodeByKey25,
7457
- $getRoot as $getRoot7
7460
+ $getRoot as $getRoot6
7458
7461
  } from "lexical";
7459
7462
  import { CircleMinus as CircleMinus3, CirclePlus as CirclePlus3 } from "lucide-react";
7460
7463
  import { useCallback as useCallback6 } from "react";
@@ -7479,7 +7482,7 @@ function JournalEntryQuestionItemComponent(props) {
7479
7482
  const newEntryItem = foundNode.__lineItems[itemIndex + 1];
7480
7483
  if (newEntryItem.account) {
7481
7484
  newEntryItem.account.update(() => {
7482
- const root = $getRoot7();
7485
+ const root = $getRoot6();
7483
7486
  let firstChild = root.getFirstChild();
7484
7487
  if (!firstChild) {
7485
7488
  firstChild = $createParagraphNode8();
@@ -7490,7 +7493,7 @@ function JournalEntryQuestionItemComponent(props) {
7490
7493
  }
7491
7494
  if (newEntryItem.credit) {
7492
7495
  newEntryItem.credit.update(() => {
7493
- const root = $getRoot7();
7496
+ const root = $getRoot6();
7494
7497
  let firstChild = root.getFirstChild();
7495
7498
  if (!firstChild) {
7496
7499
  firstChild = $createParagraphNode8();
@@ -7500,7 +7503,7 @@ function JournalEntryQuestionItemComponent(props) {
7500
7503
  }
7501
7504
  if (newEntryItem.debit) {
7502
7505
  newEntryItem.debit.update(() => {
7503
- const root = $getRoot7();
7506
+ const root = $getRoot6();
7504
7507
  let firstChild = root.getFirstChild();
7505
7508
  if (!firstChild) {
7506
7509
  firstChild = $createParagraphNode8();
@@ -7544,7 +7547,7 @@ function JournalEntryQuestionItemComponent(props) {
7544
7547
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: account, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7545
7548
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7546
7549
  /* @__PURE__ */ jsx65(
7547
- RichTextPlugin6,
7550
+ RichTextPlugin5,
7548
7551
  {
7549
7552
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7550
7553
  ErrorBoundary: LexicalErrorBoundary6,
@@ -7586,7 +7589,7 @@ function JournalEntryQuestionItemComponent(props) {
7586
7589
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: debit, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7587
7590
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7588
7591
  /* @__PURE__ */ jsx65(
7589
- RichTextPlugin6,
7592
+ RichTextPlugin5,
7590
7593
  {
7591
7594
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7592
7595
  ErrorBoundary: LexicalErrorBoundary6,
@@ -7628,7 +7631,7 @@ function JournalEntryQuestionItemComponent(props) {
7628
7631
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: credit, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7629
7632
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7630
7633
  /* @__PURE__ */ jsx65(
7631
- RichTextPlugin6,
7634
+ RichTextPlugin5,
7632
7635
  {
7633
7636
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7634
7637
  ErrorBoundary: LexicalErrorBoundary6,
@@ -8081,10 +8084,10 @@ function TypeaheadMenuAgentPlugin(props) {
8081
8084
  import { useLexicalComposerContext as useLexicalComposerContext36 } from "@lexical/react/LexicalComposerContext";
8082
8085
  import { LexicalErrorBoundary as LexicalErrorBoundary7 } from "@lexical/react/LexicalErrorBoundary";
8083
8086
  import { HistoryPlugin as HistoryPlugin7 } from "@lexical/react/LexicalHistoryPlugin";
8084
- import { ListPlugin as ListPlugin2 } from "@lexical/react/LexicalListPlugin";
8087
+ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
8085
8088
  import { LexicalNestedComposer as LexicalNestedComposer7 } from "@lexical/react/LexicalNestedComposer";
8086
- import { RichTextPlugin as RichTextPlugin7 } from "@lexical/react/LexicalRichTextPlugin";
8087
- import { TabIndentationPlugin as TabIndentationPlugin2 } from "@lexical/react/LexicalTabIndentationPlugin";
8089
+ import { RichTextPlugin as RichTextPlugin6 } from "@lexical/react/LexicalRichTextPlugin";
8090
+ import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
8088
8091
  import {
8089
8092
  $createNodeSelection as $createNodeSelection9,
8090
8093
  $getNodeByKey as $getNodeByKey27,
@@ -8294,7 +8297,7 @@ function FillInTheBlankQuestionComponent(props) {
8294
8297
  /* @__PURE__ */ jsx71(FillInTheBlankSpaceComponentPlugin, {}),
8295
8298
  /* @__PURE__ */ jsx71(FillInTheBlankSpaceSettingsPlugin, {}),
8296
8299
  /* @__PURE__ */ jsx71(
8297
- RichTextPlugin7,
8300
+ RichTextPlugin6,
8298
8301
  {
8299
8302
  contentEditable: /* @__PURE__ */ jsx71(NestedContentEditable, {}),
8300
8303
  ErrorBoundary: LexicalErrorBoundary7,
@@ -8323,10 +8326,10 @@ function FillInTheBlankQuestionComponent(props) {
8323
8326
  decoratorNode: FillInTheBlankQuestionNode
8324
8327
  }
8325
8328
  ),
8326
- /* @__PURE__ */ jsx71(ListPlugin2, {}),
8329
+ /* @__PURE__ */ jsx71(ListPlugin, {}),
8327
8330
  /* @__PURE__ */ jsx71(ListLevelLimitPlugin, {}),
8328
8331
  /* @__PURE__ */ jsx71(Table, {}),
8329
- /* @__PURE__ */ jsx71(TabIndentationPlugin2, {})
8332
+ /* @__PURE__ */ jsx71(TabIndentationPlugin, {})
8330
8333
  ] }) })
8331
8334
  ]
8332
8335
  }
@@ -8540,7 +8543,8 @@ function SettingsPanelPlugin() {
8540
8543
  drawer,
8541
8544
  getSettingsPanel,
8542
8545
  getNestedEditor,
8543
- renderSettings
8546
+ renderSettings,
8547
+ autoOpenSettingsPanel
8544
8548
  } = useBlockEditor();
8545
8549
  const [_articleIsReady, setArticleReady] = useState5(false);
8546
8550
  const articleElementRef = useRef30();
@@ -8571,6 +8575,7 @@ function SettingsPanelPlugin() {
8571
8575
  }
8572
8576
  if (currentFocusedNode.current) {
8573
8577
  setSelectedNode(currentFocusedNode.current.getKey());
8578
+ autoOpenSettingsPanel();
8574
8579
  } else {
8575
8580
  setSelectedNode(void 0);
8576
8581
  }
@@ -8811,11 +8816,11 @@ function getLineBreakNodeBeforeCaretOnLastLine(paragraph, selection) {
8811
8816
  import { LexicalErrorBoundary as LexicalErrorBoundary8 } from "@lexical/react/LexicalErrorBoundary";
8812
8817
  import { HistoryPlugin as HistoryPlugin8 } from "@lexical/react/LexicalHistoryPlugin";
8813
8818
  import { LexicalNestedComposer as LexicalNestedComposer8 } from "@lexical/react/LexicalNestedComposer";
8814
- import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
8819
+ import { PlainTextPlugin as PlainTextPlugin2 } from "@lexical/react/LexicalPlainTextPlugin";
8815
8820
  import { useLexicalNodeSelection as useLexicalNodeSelection3 } from "@lexical/react/useLexicalNodeSelection";
8816
8821
  import { mergeRegister as mergeRegister13 } from "@lexical/utils";
8817
8822
  import {
8818
- $getRoot as $getRoot8,
8823
+ $getRoot as $getRoot7,
8819
8824
  $getSelection as $getSelection6,
8820
8825
  $isParagraphNode,
8821
8826
  $isRangeSelection as $isRangeSelection4,
@@ -8840,7 +8845,7 @@ function CalloutBoxComponent(props) {
8840
8845
  () => {
8841
8846
  const currentSelection = $getSelection6();
8842
8847
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
8843
- const firstChild = $getRoot8().getFirstChild();
8848
+ const firstChild = $getRoot7().getFirstChild();
8844
8849
  if (firstChild?.getTextContentSize() === 0) {
8845
8850
  event.stopPropagation();
8846
8851
  event.preventDefault();
@@ -8874,7 +8879,7 @@ function CalloutBoxComponent(props) {
8874
8879
  (event) => {
8875
8880
  const currentSelection = $getSelection6();
8876
8881
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
8877
- const firstChild = $getRoot8().getFirstChild();
8882
+ const firstChild = $getRoot7().getFirstChild();
8878
8883
  if ($isParagraphNode(firstChild)) {
8879
8884
  const breakNodes = getLineBreakNodeBeforeCaretOnLastLine(
8880
8885
  firstChild,
@@ -8934,7 +8939,7 @@ function CalloutBoxComponent(props) {
8934
8939
  children: /* @__PURE__ */ jsx76(LexicalNestedComposer8, { initialEditor: content, children: /* @__PURE__ */ jsxs29(NestedEditor, { nodeKey, children: [
8935
8940
  /* @__PURE__ */ jsx76(SettingsPanelNestedAgentPlugin, {}),
8936
8941
  /* @__PURE__ */ jsx76(
8937
- PlainTextPlugin,
8942
+ PlainTextPlugin2,
8938
8943
  {
8939
8944
  contentEditable: /* @__PURE__ */ jsx76(NestedContentEditable, {}),
8940
8945
  ErrorBoundary: LexicalErrorBoundary8
@@ -8957,8 +8962,8 @@ var CALLOUT_ICONS = {
8957
8962
  tip: Lightbulb
8958
8963
  };
8959
8964
  var CALLOUT_COLORS = {
8960
- info: "--sl-color-sky",
8961
- tip: "--sl-color-teal"
8965
+ info: "--sl-color-primary",
8966
+ tip: "--sl-color-success"
8962
8967
  };
8963
8968
  var CALLOUT_LABELS = {
8964
8969
  info: "Instructions",
@@ -9648,30 +9653,68 @@ var initialEditorRegistry = {
9648
9653
  Questions: false
9649
9654
  };
9650
9655
 
9656
+ // src/content/drawer/Drawer.tsx
9657
+ import { Menu } from "lucide-react";
9658
+ import { forwardRef as forwardRef10, useEffect as useEffect52, useState as useState6 } from "react";
9659
+ import { jsx as jsx83 } from "react/jsx-runtime";
9660
+ var Drawer = forwardRef10(
9661
+ (props, ref) => {
9662
+ const {
9663
+ settingsPanelSwitch,
9664
+ toggleSettingsPanelSwitch,
9665
+ modulesNumber,
9666
+ hasModule
9667
+ } = useBlockEditor();
9668
+ const [showSettingsButton, setShowSettingsButton] = useState6(false);
9669
+ useEffect52(() => {
9670
+ if (hasModule("SettingsPanel")) {
9671
+ setShowSettingsButton(true);
9672
+ }
9673
+ }, [modulesNumber, hasModule]);
9674
+ return /* @__PURE__ */ jsx83(
9675
+ "nav",
9676
+ {
9677
+ ref,
9678
+ className: !showSettingsButton ? "disabled" : settingsPanelSwitch === "on" ? "shown" : "hidden",
9679
+ children: settingsPanelSwitch === "off" && /* @__PURE__ */ jsx83("div", { children: /* @__PURE__ */ jsx83(
9680
+ Button,
9681
+ {
9682
+ className: "cancel",
9683
+ variant: "text",
9684
+ size: "large",
9685
+ StartIcon: Menu,
9686
+ onClick: toggleSettingsPanelSwitch
9687
+ }
9688
+ ) })
9689
+ }
9690
+ );
9691
+ }
9692
+ );
9693
+
9651
9694
  // src/content/editable/ContentEditable.tsx
9652
9695
  import { ContentEditable as LexicalContentEditable2 } from "@lexical/react/LexicalContentEditable";
9653
- import { jsx as jsx83 } from "react/jsx-runtime";
9696
+ import { jsx as jsx84 } from "react/jsx-runtime";
9654
9697
  function ContentEditable() {
9655
- return /* @__PURE__ */ jsx83(LexicalContentEditable2, { className: "content" });
9698
+ return /* @__PURE__ */ jsx84(LexicalContentEditable2, { className: "content" });
9656
9699
  }
9657
9700
 
9658
9701
  // src/content/node/NodeProvider.tsx
9659
9702
  import React18, {
9660
9703
  useContext as useContext3,
9661
- useEffect as useEffect64,
9704
+ useEffect as useEffect65,
9662
9705
  useRef as useRef46
9663
9706
  } from "react";
9664
9707
 
9665
9708
  // src/components/inputs/DropdownWrapper.tsx
9666
9709
  import {
9667
- forwardRef as forwardRef10,
9668
- useEffect as useEffect52,
9710
+ forwardRef as forwardRef11,
9711
+ useEffect as useEffect53,
9669
9712
  useImperativeHandle as useImperativeHandle10,
9670
9713
  useMemo as useMemo6,
9671
9714
  useRef as useRef33
9672
9715
  } from "react";
9673
- import { jsx as jsx84, jsxs as jsxs32 } from "react/jsx-runtime";
9674
- var DropdownWrapper = forwardRef10((props, ref) => {
9716
+ import { jsx as jsx85, jsxs as jsxs32 } from "react/jsx-runtime";
9717
+ var DropdownWrapper = forwardRef11((props, ref) => {
9675
9718
  const {
9676
9719
  className,
9677
9720
  menuClassName,
@@ -9753,9 +9796,9 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9753
9796
  subMenu
9754
9797
  } = menuItem;
9755
9798
  if (menuItemDivider) {
9756
- menuItemElement = /* @__PURE__ */ jsx84("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
9799
+ menuItemElement = /* @__PURE__ */ jsx85("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
9757
9800
  } else if (menuItemIsGroup) {
9758
- menuItemElement = /* @__PURE__ */ jsx84("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
9801
+ menuItemElement = /* @__PURE__ */ jsx85("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
9759
9802
  } else if (subMenu) {
9760
9803
  const subMenuElements = [];
9761
9804
  let subTabsIndex = 0;
@@ -9774,7 +9817,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9774
9817
  e.stopPropagation();
9775
9818
  },
9776
9819
  children: [
9777
- MenuItemIcon && /* @__PURE__ */ jsx84(
9820
+ MenuItemIcon && /* @__PURE__ */ jsx85(
9778
9821
  Icon,
9779
9822
  {
9780
9823
  style: { color: menuItemColor || "inherit" },
@@ -9783,7 +9826,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9783
9826
  }
9784
9827
  ),
9785
9828
  menuItemLabel,
9786
- /* @__PURE__ */ jsx84(
9829
+ /* @__PURE__ */ jsx85(
9787
9830
  "sl-menu",
9788
9831
  {
9789
9832
  slot: "submenu",
@@ -9820,7 +9863,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9820
9863
  e.stopPropagation();
9821
9864
  },
9822
9865
  children: [
9823
- MenuItemIcon && /* @__PURE__ */ jsx84(
9866
+ MenuItemIcon && /* @__PURE__ */ jsx85(
9824
9867
  Icon,
9825
9868
  {
9826
9869
  style: { color: menuItemColor || "inherit" },
@@ -9829,7 +9872,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9829
9872
  }
9830
9873
  ),
9831
9874
  menuItemLabel,
9832
- menuItemIsError && /* @__PURE__ */ jsx84(DotBadge, { variant: "danger", leftSided: true })
9875
+ menuItemIsError && /* @__PURE__ */ jsx85(DotBadge, { variant: "danger", leftSided: true })
9833
9876
  ]
9834
9877
  },
9835
9878
  `menuItem${menuItemId}`
@@ -9851,7 +9894,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9851
9894
  }, [menu]);
9852
9895
  filterNilAttrs(props, ["sync", "slot"]);
9853
9896
  const dropdownAttributes = filterNilAttrs(props, ["placement"]);
9854
- useEffect52(() => {
9897
+ useEffect53(() => {
9855
9898
  window.customElements.whenDefined("sl-menu").then(() => {
9856
9899
  if (menuRef.current) {
9857
9900
  menuRef.current.addEventListener(
@@ -9869,7 +9912,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9869
9912
  }
9870
9913
  };
9871
9914
  }, [menu]);
9872
- useEffect52(() => {
9915
+ useEffect53(() => {
9873
9916
  window.customElements.whenDefined("sl-dropdown").then(() => {
9874
9917
  if (dropdownRef.current) {
9875
9918
  dropdownRef.current.addEventListener(
@@ -9904,7 +9947,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9904
9947
  ...dropdownAttributes,
9905
9948
  children: [
9906
9949
  children,
9907
- menuItems.length > 0 && /* @__PURE__ */ jsx84(
9950
+ menuItems.length > 0 && /* @__PURE__ */ jsx85(
9908
9951
  "sl-menu",
9909
9952
  {
9910
9953
  ref: menuRef,
@@ -9960,18 +10003,18 @@ import {
9960
10003
  $createNodeSelection as $createNodeSelection12,
9961
10004
  $createParagraphNode as $createParagraphNode9,
9962
10005
  $getNodeByKey as $getNodeByKey33,
9963
- $getRoot as $getRoot9,
10006
+ $getRoot as $getRoot8,
9964
10007
  $parseSerializedNode,
9965
10008
  $setSelection as $setSelection12,
9966
10009
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR9,
9967
10010
  createCommand as createCommand13
9968
10011
  } from "lexical";
9969
- import { useEffect as useEffect54, useRef as useRef35 } from "react";
10012
+ import { useEffect as useEffect55, useRef as useRef35 } from "react";
9970
10013
 
9971
10014
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
9972
10015
  import { useLexicalComposerContext as useLexicalComposerContext43 } from "@lexical/react/LexicalComposerContext";
9973
10016
  import { $getNodeByKey as $getNodeByKey32 } from "lexical";
9974
- import { useEffect as useEffect53, useRef as useRef34, useState as useState6 } from "react";
10017
+ import { useEffect as useEffect54, useRef as useRef34, useState as useState7 } from "react";
9975
10018
 
9976
10019
  // src/plugins/FillInTheBlankQuestionPlugin/validatePointslnput.ts
9977
10020
  function validatePointsInput(input) {
@@ -9993,13 +10036,13 @@ function validatePointsInput(input) {
9993
10036
  }
9994
10037
 
9995
10038
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
9996
- import { jsx as jsx85 } from "react/jsx-runtime";
10039
+ import { jsx as jsx86 } from "react/jsx-runtime";
9997
10040
  function FillInTheBlankQuestionSettings(props) {
9998
10041
  const { nodeKey } = props;
9999
10042
  const [editor] = useLexicalComposerContext43();
10000
10043
  const pointsTextInputRef = useRef34(null);
10001
- const [foundNode, setFoundNode] = useState6();
10002
- useEffect53(() => {
10044
+ const [foundNode, setFoundNode] = useState7();
10045
+ useEffect54(() => {
10003
10046
  if (nodeKey) {
10004
10047
  editor.getEditorState().read(() => {
10005
10048
  const fillInTheBlankNode = $getNodeByKey32(nodeKey);
@@ -10012,7 +10055,7 @@ function FillInTheBlankQuestionSettings(props) {
10012
10055
  if (!foundNode) {
10013
10056
  return null;
10014
10057
  }
10015
- return /* @__PURE__ */ jsx85("div", { children: /* @__PURE__ */ jsx85(
10058
+ return /* @__PURE__ */ jsx86("div", { children: /* @__PURE__ */ jsx86(
10016
10059
  TextInput,
10017
10060
  {
10018
10061
  ref: pointsTextInputRef,
@@ -10042,7 +10085,7 @@ function FillInTheBlankQuestionSettings(props) {
10042
10085
  }
10043
10086
 
10044
10087
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionPlugin.tsx
10045
- import { Fragment as Fragment30, jsx as jsx86 } from "react/jsx-runtime";
10088
+ import { Fragment as Fragment30, jsx as jsx87 } from "react/jsx-runtime";
10046
10089
  var INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND = createCommand13("INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND");
10047
10090
  function FillInTheBlankQuestionPlugin() {
10048
10091
  const {
@@ -10053,7 +10096,7 @@ function FillInTheBlankQuestionPlugin() {
10053
10096
  } = useBlockEditor();
10054
10097
  const [editor] = useLexicalComposerContext44();
10055
10098
  const settingsPanelStickyRef = useRef35(null);
10056
- useEffect54(() => {
10099
+ useEffect55(() => {
10057
10100
  return mergeRegister15(
10058
10101
  editor.registerCommand(
10059
10102
  INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND,
@@ -10100,7 +10143,7 @@ function FillInTheBlankQuestionPlugin() {
10100
10143
  onUpdate: () => {
10101
10144
  if (fillInTheBlankNode) {
10102
10145
  fillInTheBlankNode.__content.update(() => {
10103
- const root = $getRoot9();
10146
+ const root = $getRoot8();
10104
10147
  if (serializedData) {
10105
10148
  const nodeSerialized2 = JSON.parse(serializedData);
10106
10149
  const newNode = $parseSerializedNode(nodeSerialized2);
@@ -10134,7 +10177,7 @@ function FillInTheBlankQuestionPlugin() {
10134
10177
  {
10135
10178
  onUpdate: () => {
10136
10179
  fillInTheBlankNode?.__content.update(() => {
10137
- const root = $getRoot9();
10180
+ const root = $getRoot8();
10138
10181
  let firstChild = root.getFirstChild();
10139
10182
  if (!firstChild) {
10140
10183
  firstChild = $createParagraphNode9();
@@ -10154,7 +10197,7 @@ function FillInTheBlankQuestionPlugin() {
10154
10197
  )
10155
10198
  );
10156
10199
  }, [editor]);
10157
- useEffect54(() => {
10200
+ useEffect55(() => {
10158
10201
  if (isBlockEditorReady) {
10159
10202
  if (settingsPanelStickyRef.current) {
10160
10203
  registerSettingsPanel(
@@ -10164,20 +10207,20 @@ function FillInTheBlankQuestionPlugin() {
10164
10207
  }
10165
10208
  }
10166
10209
  }, [isBlockEditorReady]);
10167
- return /* @__PURE__ */ jsx86(Fragment30, { children: drawer && /* @__PURE__ */ jsx86(
10210
+ return /* @__PURE__ */ jsx87(Fragment30, { children: drawer && /* @__PURE__ */ jsx87(
10168
10211
  StickyToPosition,
10169
10212
  {
10170
10213
  ref: settingsPanelStickyRef,
10171
10214
  container: drawer,
10172
10215
  children: (data, position, isVisible) => {
10173
- return /* @__PURE__ */ jsx86("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx86(
10216
+ return /* @__PURE__ */ jsx87("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx87(
10174
10217
  SettingsCard,
10175
10218
  {
10176
10219
  isVisible: !!isVisible,
10177
10220
  container: drawer,
10178
10221
  title: "Fill In The Blank Settings",
10179
10222
  onClose: toggleSettingsPanelSwitch,
10180
- children: /* @__PURE__ */ jsx86(
10223
+ children: /* @__PURE__ */ jsx87(
10181
10224
  FillInTheBlankQuestionSettings,
10182
10225
  {
10183
10226
  nodeKey: data.nodeKey
@@ -10198,17 +10241,17 @@ import {
10198
10241
  $createNodeSelection as $createNodeSelection13,
10199
10242
  $createParagraphNode as $createParagraphNode10,
10200
10243
  $getNodeByKey as $getNodeByKey35,
10201
- $getRoot as $getRoot10,
10244
+ $getRoot as $getRoot9,
10202
10245
  $setSelection as $setSelection13,
10203
10246
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR10,
10204
10247
  createCommand as createCommand14
10205
10248
  } from "lexical";
10206
- import { useEffect as useEffect56, useRef as useRef37 } from "react";
10249
+ import { useEffect as useEffect57, useRef as useRef37 } from "react";
10207
10250
 
10208
10251
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10209
10252
  import { useLexicalComposerContext as useLexicalComposerContext45 } from "@lexical/react/LexicalComposerContext";
10210
10253
  import { $getNodeByKey as $getNodeByKey34 } from "lexical";
10211
- import { useEffect as useEffect55, useMemo as useMemo7, useRef as useRef36, useState as useState7 } from "react";
10254
+ import { useEffect as useEffect56, useMemo as useMemo7, useRef as useRef36, useState as useState8 } from "react";
10212
10255
 
10213
10256
  // src/plugins/JournalEntryQuestionPlugin/validateErrorTolarancelnput.ts
10214
10257
  function validateErrorTolerance(input) {
@@ -10249,15 +10292,15 @@ function validatePointsInput2(input) {
10249
10292
  }
10250
10293
 
10251
10294
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10252
- import { Fragment as Fragment31, jsx as jsx87, jsxs as jsxs33 } from "react/jsx-runtime";
10295
+ import { Fragment as Fragment31, jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
10253
10296
  function JournalEntryQuestionSettings(props) {
10254
10297
  const { nodeKey } = props;
10255
10298
  const [editor] = useLexicalComposerContext45();
10256
10299
  const pointsTextInputRef = useRef36(null);
10257
10300
  const errorToleranceTextInputRef = useRef36(null);
10258
10301
  const typeRadioGroupRef = useRef36(null);
10259
- const [foundNode, setFoundNode] = useState7();
10260
- useEffect55(() => {
10302
+ const [foundNode, setFoundNode] = useState8();
10303
+ useEffect56(() => {
10261
10304
  if (nodeKey) {
10262
10305
  editor.getEditorState().read(() => {
10263
10306
  const journalEntryNode = $getNodeByKey34(nodeKey);
@@ -10283,7 +10326,7 @@ function JournalEntryQuestionSettings(props) {
10283
10326
  return null;
10284
10327
  }
10285
10328
  return /* @__PURE__ */ jsxs33(Fragment31, { children: [
10286
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10329
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10287
10330
  TextInput,
10288
10331
  {
10289
10332
  ref: pointsTextInputRef,
@@ -10310,7 +10353,7 @@ function JournalEntryQuestionSettings(props) {
10310
10353
  }
10311
10354
  }
10312
10355
  ) }),
10313
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10356
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10314
10357
  TextInput,
10315
10358
  {
10316
10359
  ref: errorToleranceTextInputRef,
@@ -10341,7 +10384,7 @@ function JournalEntryQuestionSettings(props) {
10341
10384
  }
10342
10385
  }
10343
10386
  ) }),
10344
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10387
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10345
10388
  RadioGroup,
10346
10389
  {
10347
10390
  ref: typeRadioGroupRef,
@@ -10363,7 +10406,7 @@ function JournalEntryQuestionSettings(props) {
10363
10406
  }
10364
10407
 
10365
10408
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionPlugin.tsx
10366
- import { Fragment as Fragment32, jsx as jsx88 } from "react/jsx-runtime";
10409
+ import { Fragment as Fragment32, jsx as jsx89 } from "react/jsx-runtime";
10367
10410
  var INSERT_JOURNAL_ENTRY_QUESTION_COMMAND = createCommand14("INSERT_JOURNAL_ENTRY_QUESTION_COMMAND");
10368
10411
  function JournalEntryQuestionPlugin() {
10369
10412
  const {
@@ -10374,7 +10417,7 @@ function JournalEntryQuestionPlugin() {
10374
10417
  } = useBlockEditor();
10375
10418
  const [editor] = useLexicalComposerContext46();
10376
10419
  const settingsPanelStickyRef = useRef37(null);
10377
- useEffect56(() => {
10420
+ useEffect57(() => {
10378
10421
  return mergeRegister16(
10379
10422
  editor.registerCommand(
10380
10423
  INSERT_JOURNAL_ENTRY_QUESTION_COMMAND,
@@ -10414,7 +10457,7 @@ function JournalEntryQuestionPlugin() {
10414
10457
  let index = 0;
10415
10458
  for (const questionItem of journalEntryNode.__lineItems) {
10416
10459
  questionItem.account.update(() => {
10417
- const root = $getRoot10();
10460
+ const root = $getRoot9();
10418
10461
  let firstChild = root.getFirstChild();
10419
10462
  if (!firstChild) {
10420
10463
  firstChild = $createParagraphNode10();
@@ -10426,7 +10469,7 @@ function JournalEntryQuestionPlugin() {
10426
10469
  });
10427
10470
  if (questionItem.debit) {
10428
10471
  questionItem.debit.update(() => {
10429
- const root = $getRoot10();
10472
+ const root = $getRoot9();
10430
10473
  let firstChild = root.getFirstChild();
10431
10474
  if (!firstChild) {
10432
10475
  firstChild = $createParagraphNode10();
@@ -10436,7 +10479,7 @@ function JournalEntryQuestionPlugin() {
10436
10479
  }
10437
10480
  if (questionItem.credit) {
10438
10481
  questionItem.credit.update(() => {
10439
- const root = $getRoot10();
10482
+ const root = $getRoot9();
10440
10483
  let firstChild = root.getFirstChild();
10441
10484
  if (!firstChild) {
10442
10485
  firstChild = $createParagraphNode10();
@@ -10460,7 +10503,7 @@ function JournalEntryQuestionPlugin() {
10460
10503
  )
10461
10504
  );
10462
10505
  }, [editor]);
10463
- useEffect56(() => {
10506
+ useEffect57(() => {
10464
10507
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10465
10508
  registerSettingsPanel(
10466
10509
  JournalEntryQuestionNode.getType(),
@@ -10468,20 +10511,20 @@ function JournalEntryQuestionPlugin() {
10468
10511
  );
10469
10512
  }
10470
10513
  }, [isBlockEditorReady]);
10471
- return /* @__PURE__ */ jsx88(Fragment32, { children: drawer && /* @__PURE__ */ jsx88(
10514
+ return /* @__PURE__ */ jsx89(Fragment32, { children: drawer && /* @__PURE__ */ jsx89(
10472
10515
  StickyToPosition,
10473
10516
  {
10474
10517
  ref: settingsPanelStickyRef,
10475
10518
  container: drawer,
10476
10519
  children: (data, position, isVisible) => {
10477
- return /* @__PURE__ */ jsx88("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx88(
10520
+ return /* @__PURE__ */ jsx89("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx89(
10478
10521
  SettingsCard,
10479
10522
  {
10480
10523
  isVisible: !!isVisible,
10481
10524
  container: drawer,
10482
10525
  title: "Journal Entry Settings",
10483
10526
  onClose: toggleSettingsPanelSwitch,
10484
- children: isVisible && /* @__PURE__ */ jsx88(
10527
+ children: isVisible && /* @__PURE__ */ jsx89(
10485
10528
  JournalEntryQuestionSettings,
10486
10529
  {
10487
10530
  nodeKey: data.nodeKey
@@ -10497,7 +10540,7 @@ function JournalEntryQuestionPlugin() {
10497
10540
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10498
10541
  import { useLexicalComposerContext as useLexicalComposerContext47 } from "@lexical/react/LexicalComposerContext";
10499
10542
  import { $getNodeByKey as $getNodeByKey36 } from "lexical";
10500
- import { useEffect as useEffect57, useRef as useRef38, useState as useState8 } from "react";
10543
+ import { useEffect as useEffect58, useRef as useRef38, useState as useState9 } from "react";
10501
10544
 
10502
10545
  // src/plugins/MatchingQuestionPlugin/validatePointslnput.ts
10503
10546
  function validatePointsInput3(input) {
@@ -10519,13 +10562,13 @@ function validatePointsInput3(input) {
10519
10562
  }
10520
10563
 
10521
10564
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10522
- import { jsx as jsx89 } from "react/jsx-runtime";
10565
+ import { jsx as jsx90 } from "react/jsx-runtime";
10523
10566
  function MatchingQuestionSettings(props) {
10524
10567
  const { nodeKey } = props;
10525
10568
  const [editor] = useLexicalComposerContext47();
10526
10569
  const pointsTextInputRef = useRef38(null);
10527
- const [foundNode, setFoundNode] = useState8();
10528
- useEffect57(() => {
10570
+ const [foundNode, setFoundNode] = useState9();
10571
+ useEffect58(() => {
10529
10572
  if (nodeKey) {
10530
10573
  editor.getEditorState().read(() => {
10531
10574
  const matchingQuestionNode = $getNodeByKey36(nodeKey);
@@ -10538,7 +10581,7 @@ function MatchingQuestionSettings(props) {
10538
10581
  if (!foundNode) {
10539
10582
  return null;
10540
10583
  }
10541
- return /* @__PURE__ */ jsx89("div", { children: /* @__PURE__ */ jsx89(
10584
+ return /* @__PURE__ */ jsx90("div", { children: /* @__PURE__ */ jsx90(
10542
10585
  TextInput,
10543
10586
  {
10544
10587
  ref: pointsTextInputRef,
@@ -10574,13 +10617,13 @@ import {
10574
10617
  $createNodeSelection as $createNodeSelection14,
10575
10618
  $createParagraphNode as $createParagraphNode11,
10576
10619
  $getNodeByKey as $getNodeByKey37,
10577
- $getRoot as $getRoot11,
10620
+ $getRoot as $getRoot10,
10578
10621
  $setSelection as $setSelection14,
10579
10622
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR11,
10580
10623
  createCommand as createCommand15
10581
10624
  } from "lexical";
10582
- import { useEffect as useEffect58, useRef as useRef39 } from "react";
10583
- import { Fragment as Fragment33, jsx as jsx90 } from "react/jsx-runtime";
10625
+ import { useEffect as useEffect59, useRef as useRef39 } from "react";
10626
+ import { Fragment as Fragment33, jsx as jsx91 } from "react/jsx-runtime";
10584
10627
  var INSERT_MATCHING_QUESTION_COMMAND = createCommand15("INSERT_MATCHING_QUESTION_COMMAND");
10585
10628
  function MatchingQuestionPlugin() {
10586
10629
  const {
@@ -10591,7 +10634,7 @@ function MatchingQuestionPlugin() {
10591
10634
  } = useBlockEditor();
10592
10635
  const [editor] = useLexicalComposerContext48();
10593
10636
  const settingsPanelStickyRef = useRef39(null);
10594
- useEffect58(() => {
10637
+ useEffect59(() => {
10595
10638
  return mergeRegister17(
10596
10639
  editor.registerCommand(
10597
10640
  INSERT_MATCHING_QUESTION_COMMAND,
@@ -10618,7 +10661,7 @@ function MatchingQuestionPlugin() {
10618
10661
  for (const questionItem of matchingQuestionNode.__items) {
10619
10662
  if (questionItem.itemPremiseContent) {
10620
10663
  questionItem.itemPremiseContent.update(() => {
10621
- const root = $getRoot11();
10664
+ const root = $getRoot10();
10622
10665
  let firstChild = root.getFirstChild();
10623
10666
  if (!firstChild) {
10624
10667
  firstChild = $createParagraphNode11();
@@ -10630,7 +10673,7 @@ function MatchingQuestionPlugin() {
10630
10673
  });
10631
10674
  }
10632
10675
  questionItem.itemOptionContent.update(() => {
10633
- const root = $getRoot11();
10676
+ const root = $getRoot10();
10634
10677
  let firstChild = root.getFirstChild();
10635
10678
  if (!firstChild) {
10636
10679
  firstChild = $createParagraphNode11();
@@ -10650,7 +10693,7 @@ function MatchingQuestionPlugin() {
10650
10693
  )
10651
10694
  );
10652
10695
  }, [editor]);
10653
- useEffect58(() => {
10696
+ useEffect59(() => {
10654
10697
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10655
10698
  registerSettingsPanel(
10656
10699
  MatchingQuestionNode.getType(),
@@ -10658,20 +10701,20 @@ function MatchingQuestionPlugin() {
10658
10701
  );
10659
10702
  }
10660
10703
  }, [isBlockEditorReady]);
10661
- return /* @__PURE__ */ jsx90(Fragment33, { children: drawer && /* @__PURE__ */ jsx90(
10704
+ return /* @__PURE__ */ jsx91(Fragment33, { children: drawer && /* @__PURE__ */ jsx91(
10662
10705
  StickyToPosition,
10663
10706
  {
10664
10707
  ref: settingsPanelStickyRef,
10665
10708
  container: drawer,
10666
10709
  children: (data, position, isVisible) => {
10667
- return /* @__PURE__ */ jsx90("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx90(
10710
+ return /* @__PURE__ */ jsx91("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx91(
10668
10711
  SettingsCard,
10669
10712
  {
10670
10713
  isVisible: !!isVisible,
10671
10714
  container: drawer,
10672
10715
  title: "Matching Settings",
10673
10716
  onClose: toggleSettingsPanelSwitch,
10674
- children: isVisible && /* @__PURE__ */ jsx90(
10717
+ children: isVisible && /* @__PURE__ */ jsx91(
10675
10718
  MatchingQuestionSettings,
10676
10719
  {
10677
10720
  nodeKey: data.nodeKey
@@ -10730,17 +10773,17 @@ import {
10730
10773
  $createNodeSelection as $createNodeSelection15,
10731
10774
  $createParagraphNode as $createParagraphNode12,
10732
10775
  $getNodeByKey as $getNodeByKey39,
10733
- $getRoot as $getRoot12,
10776
+ $getRoot as $getRoot11,
10734
10777
  $setSelection as $setSelection15,
10735
10778
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR12,
10736
10779
  createCommand as createCommand16
10737
10780
  } from "lexical";
10738
- import { useEffect as useEffect60, useRef as useRef41 } from "react";
10781
+ import { useEffect as useEffect61, useRef as useRef41 } from "react";
10739
10782
 
10740
10783
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10741
10784
  import { useLexicalComposerContext as useLexicalComposerContext49 } from "@lexical/react/LexicalComposerContext";
10742
10785
  import { $getNodeByKey as $getNodeByKey38 } from "lexical";
10743
- import { useEffect as useEffect59, useRef as useRef40, useState as useState9 } from "react";
10786
+ import { useEffect as useEffect60, useRef as useRef40, useState as useState10 } from "react";
10744
10787
 
10745
10788
  // src/plugins/MultipleOptionQuestionPlugin/validateChoicesInput.ts
10746
10789
  function validateChoicesInput(input, min) {
@@ -10784,7 +10827,7 @@ function validatePointsInput4(input) {
10784
10827
  }
10785
10828
 
10786
10829
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10787
- import { Fragment as Fragment34, jsx as jsx91, jsxs as jsxs34 } from "react/jsx-runtime";
10830
+ import { Fragment as Fragment34, jsx as jsx92, jsxs as jsxs34 } from "react/jsx-runtime";
10788
10831
  function MultipleOptionQuestionSettings(props) {
10789
10832
  const { nodeKey } = props;
10790
10833
  const [editor] = useLexicalComposerContext49();
@@ -10795,8 +10838,8 @@ function MultipleOptionQuestionSettings(props) {
10795
10838
  const correctChoicesTextInputRef = useRef40(null);
10796
10839
  const incorrectChoicesTextInputRef = useRef40(null);
10797
10840
  const foundNodeRef = useRef40();
10798
- const [questionType, setQuestionType] = useState9();
10799
- useEffect59(() => {
10841
+ const [questionType, setQuestionType] = useState10();
10842
+ useEffect60(() => {
10800
10843
  if (nodeKey) {
10801
10844
  editor.getEditorState().read(() => {
10802
10845
  const optionsQuestionNode = $getNodeByKey38(nodeKey);
@@ -10811,7 +10854,7 @@ function MultipleOptionQuestionSettings(props) {
10811
10854
  return null;
10812
10855
  }
10813
10856
  return /* @__PURE__ */ jsxs34(Fragment34, { children: [
10814
- /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10857
+ /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10815
10858
  TextInput,
10816
10859
  {
10817
10860
  ref: pointsTextInputRef,
@@ -10838,7 +10881,7 @@ function MultipleOptionQuestionSettings(props) {
10838
10881
  }
10839
10882
  }
10840
10883
  ) }),
10841
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10884
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10842
10885
  RadioGroup,
10843
10886
  {
10844
10887
  ref: gradingRadioGroupRef,
@@ -10865,7 +10908,7 @@ function MultipleOptionQuestionSettings(props) {
10865
10908
  }
10866
10909
  }
10867
10910
  ) }),
10868
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10911
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10869
10912
  TextInput,
10870
10913
  {
10871
10914
  ref: correctChoicesTextInputRef,
@@ -10898,7 +10941,7 @@ function MultipleOptionQuestionSettings(props) {
10898
10941
  }
10899
10942
  }
10900
10943
  ) }),
10901
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10944
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10902
10945
  TextInput,
10903
10946
  {
10904
10947
  ref: incorrectChoicesTextInputRef,
@@ -10931,7 +10974,7 @@ function MultipleOptionQuestionSettings(props) {
10931
10974
  }
10932
10975
  }
10933
10976
  ) }),
10934
- questionType === "multiple-choice" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10977
+ questionType === "multiple-choice" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10935
10978
  TextInput,
10936
10979
  {
10937
10980
  ref: choicesTextInputRef,
@@ -10962,13 +11005,13 @@ function MultipleOptionQuestionSettings(props) {
10962
11005
  }
10963
11006
  }
10964
11007
  ) }),
10965
- /* @__PURE__ */ jsx91(
11008
+ /* @__PURE__ */ jsx92(
10966
11009
  "div",
10967
11010
  {
10968
11011
  style: {
10969
11012
  paddingBottom: "var(--sl-spacing-medium)"
10970
11013
  },
10971
- children: /* @__PURE__ */ jsx91(
11014
+ children: /* @__PURE__ */ jsx92(
10972
11015
  Checkbox,
10973
11016
  {
10974
11017
  ref: noneOfTheAboveInputRef,
@@ -10992,7 +11035,7 @@ function MultipleOptionQuestionSettings(props) {
10992
11035
  }
10993
11036
 
10994
11037
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionPlugin.tsx
10995
- import { Fragment as Fragment35, jsx as jsx92 } from "react/jsx-runtime";
11038
+ import { Fragment as Fragment35, jsx as jsx93 } from "react/jsx-runtime";
10996
11039
  var INSERT_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("INSERT_MULTIPLE_OPTION_QUESTION_COMMAND");
10997
11040
  var REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND");
10998
11041
  var REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND");
@@ -11005,7 +11048,7 @@ function MultipleOptionQuestionPlugin() {
11005
11048
  } = useBlockEditor();
11006
11049
  const [editor] = useLexicalComposerContext50();
11007
11050
  const settingsPanelStickyRef = useRef41(null);
11008
- useEffect60(() => {
11051
+ useEffect61(() => {
11009
11052
  return mergeRegister18(
11010
11053
  editor.registerCommand(
11011
11054
  INSERT_MULTIPLE_OPTION_QUESTION_COMMAND,
@@ -11044,7 +11087,7 @@ function MultipleOptionQuestionPlugin() {
11044
11087
  let index = 0;
11045
11088
  for (const optionItem of foundNode.__options) {
11046
11089
  optionItem.content.update(() => {
11047
- const root = $getRoot12();
11090
+ const root = $getRoot11();
11048
11091
  let firstChild = root.getFirstChild();
11049
11092
  if (!firstChild) {
11050
11093
  firstChild = $createParagraphNode12();
@@ -11118,7 +11161,7 @@ function MultipleOptionQuestionPlugin() {
11118
11161
  const foundNode = $getNodeByKey39(newNodeKey);
11119
11162
  if ($isMultipleOptionQuestionNode(foundNode)) {
11120
11163
  foundNode.__options[0].content.update(() => {
11121
- const root = $getRoot12();
11164
+ const root = $getRoot11();
11122
11165
  const firstChild = root.getFirstChild();
11123
11166
  firstChild?.selectStart();
11124
11167
  });
@@ -11167,7 +11210,7 @@ function MultipleOptionQuestionPlugin() {
11167
11210
  const foundNode = $getNodeByKey39(newNodeKey);
11168
11211
  if ($isMultipleOptionQuestionNode(foundNode)) {
11169
11212
  foundNode.__options[0].content.update(() => {
11170
- const root = $getRoot12();
11213
+ const root = $getRoot11();
11171
11214
  const firstChild = root.getFirstChild();
11172
11215
  firstChild?.selectStart();
11173
11216
  });
@@ -11184,7 +11227,7 @@ function MultipleOptionQuestionPlugin() {
11184
11227
  )
11185
11228
  );
11186
11229
  }, [editor]);
11187
- useEffect60(() => {
11230
+ useEffect61(() => {
11188
11231
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11189
11232
  registerSettingsPanel(
11190
11233
  MultipleOptionQuestionNode.getType(),
@@ -11192,7 +11235,7 @@ function MultipleOptionQuestionPlugin() {
11192
11235
  );
11193
11236
  }
11194
11237
  }, [isBlockEditorReady]);
11195
- return /* @__PURE__ */ jsx92(Fragment35, { children: drawer && /* @__PURE__ */ jsx92(
11238
+ return /* @__PURE__ */ jsx93(Fragment35, { children: drawer && /* @__PURE__ */ jsx93(
11196
11239
  StickyToPosition,
11197
11240
  {
11198
11241
  ref: settingsPanelStickyRef,
@@ -11209,14 +11252,14 @@ function MultipleOptionQuestionPlugin() {
11209
11252
  }
11210
11253
  });
11211
11254
  }
11212
- return /* @__PURE__ */ jsx92("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx92(
11255
+ return /* @__PURE__ */ jsx93("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx93(
11213
11256
  SettingsCard,
11214
11257
  {
11215
11258
  isVisible: !!isVisible,
11216
11259
  container: drawer,
11217
11260
  title: questionType === "multiple-answers" ? "Multiple Answers Settings" : "Multiple Choice Settings",
11218
11261
  onClose: toggleSettingsPanelSwitch,
11219
- children: isVisible && /* @__PURE__ */ jsx92(
11262
+ children: isVisible && /* @__PURE__ */ jsx93(
11220
11263
  MultipleOptionQuestionSettings,
11221
11264
  {
11222
11265
  nodeKey: data.nodeKey
@@ -11236,17 +11279,17 @@ import {
11236
11279
  $createNodeSelection as $createNodeSelection16,
11237
11280
  $createParagraphNode as $createParagraphNode13,
11238
11281
  $getNodeByKey as $getNodeByKey41,
11239
- $getRoot as $getRoot13,
11282
+ $getRoot as $getRoot12,
11240
11283
  $setSelection as $setSelection16,
11241
11284
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR13,
11242
11285
  createCommand as createCommand17
11243
11286
  } from "lexical";
11244
- import { useEffect as useEffect62, useRef as useRef43 } from "react";
11287
+ import { useEffect as useEffect63, useRef as useRef43 } from "react";
11245
11288
 
11246
11289
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11247
11290
  import { useLexicalComposerContext as useLexicalComposerContext51 } from "@lexical/react/LexicalComposerContext";
11248
11291
  import { $getNodeByKey as $getNodeByKey40 } from "lexical";
11249
- import { useEffect as useEffect61, useRef as useRef42, useState as useState10 } from "react";
11292
+ import { useEffect as useEffect62, useRef as useRef42, useState as useState11 } from "react";
11250
11293
 
11251
11294
  // src/plugins/ShortAnswerQuestionPlugin/validateMaxWordsInput.ts
11252
11295
  function validateMaxWordsInput(input, min) {
@@ -11290,14 +11333,14 @@ function validatePointsInput5(input) {
11290
11333
  }
11291
11334
 
11292
11335
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11293
- import { Fragment as Fragment36, jsx as jsx93, jsxs as jsxs35 } from "react/jsx-runtime";
11336
+ import { Fragment as Fragment36, jsx as jsx94, jsxs as jsxs35 } from "react/jsx-runtime";
11294
11337
  function ShortAnswerQuestionSettings(props) {
11295
11338
  const { nodeKey } = props;
11296
11339
  const [editor] = useLexicalComposerContext51();
11297
11340
  const pointsTextInputRef = useRef42(null);
11298
11341
  const maxWordsTextInputRef = useRef42(null);
11299
- const [foundNode, setFoundNode] = useState10();
11300
- useEffect61(() => {
11342
+ const [foundNode, setFoundNode] = useState11();
11343
+ useEffect62(() => {
11301
11344
  if (nodeKey) {
11302
11345
  editor.getEditorState().read(() => {
11303
11346
  const shortAnswerNode = $getNodeByKey40(nodeKey);
@@ -11311,7 +11354,7 @@ function ShortAnswerQuestionSettings(props) {
11311
11354
  return null;
11312
11355
  }
11313
11356
  return /* @__PURE__ */ jsxs35(Fragment36, { children: [
11314
- /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11357
+ /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11315
11358
  TextInput,
11316
11359
  {
11317
11360
  ref: pointsTextInputRef,
@@ -11338,7 +11381,7 @@ function ShortAnswerQuestionSettings(props) {
11338
11381
  }
11339
11382
  }
11340
11383
  ) }),
11341
- /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11384
+ /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11342
11385
  TextInput,
11343
11386
  {
11344
11387
  ref: maxWordsTextInputRef,
@@ -11369,7 +11412,7 @@ function ShortAnswerQuestionSettings(props) {
11369
11412
  }
11370
11413
 
11371
11414
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionPlugin.tsx
11372
- import { Fragment as Fragment37, jsx as jsx94 } from "react/jsx-runtime";
11415
+ import { Fragment as Fragment37, jsx as jsx95 } from "react/jsx-runtime";
11373
11416
  var INSERT_SHORT_ANSWER_QUESTION_COMMAND = createCommand17("INSERT_SHORT_ANSWER_QUESTION_COMMAND");
11374
11417
  function ShortAnswerQuestionPlugin() {
11375
11418
  const {
@@ -11380,7 +11423,7 @@ function ShortAnswerQuestionPlugin() {
11380
11423
  } = useBlockEditor();
11381
11424
  const [editor] = useLexicalComposerContext52();
11382
11425
  const settingsPanelStickyRef = useRef43(null);
11383
- useEffect62(() => {
11426
+ useEffect63(() => {
11384
11427
  return mergeRegister19(
11385
11428
  editor.registerCommand(
11386
11429
  INSERT_SHORT_ANSWER_QUESTION_COMMAND,
@@ -11414,7 +11457,7 @@ function ShortAnswerQuestionPlugin() {
11414
11457
  const shortAnswerNode = $getNodeByKey41(newNodeKey);
11415
11458
  if ($isShortAnswerQuestionNode(shortAnswerNode)) {
11416
11459
  shortAnswerNode.__notes.update(() => {
11417
- const root = $getRoot13();
11460
+ const root = $getRoot12();
11418
11461
  let firstChild = root.getFirstChild();
11419
11462
  if (!firstChild) {
11420
11463
  firstChild = $createParagraphNode13();
@@ -11436,7 +11479,7 @@ function ShortAnswerQuestionPlugin() {
11436
11479
  )
11437
11480
  );
11438
11481
  }, [editor]);
11439
- useEffect62(() => {
11482
+ useEffect63(() => {
11440
11483
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11441
11484
  registerSettingsPanel(
11442
11485
  ShortAnswerQuestionNode.getType(),
@@ -11444,20 +11487,20 @@ function ShortAnswerQuestionPlugin() {
11444
11487
  );
11445
11488
  }
11446
11489
  }, [isBlockEditorReady]);
11447
- return /* @__PURE__ */ jsx94(Fragment37, { children: drawer && /* @__PURE__ */ jsx94(
11490
+ return /* @__PURE__ */ jsx95(Fragment37, { children: drawer && /* @__PURE__ */ jsx95(
11448
11491
  StickyToPosition,
11449
11492
  {
11450
11493
  ref: settingsPanelStickyRef,
11451
11494
  container: drawer,
11452
11495
  children: (data, position, isVisible) => {
11453
- return /* @__PURE__ */ jsx94("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx94(
11496
+ return /* @__PURE__ */ jsx95("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx95(
11454
11497
  SettingsCard,
11455
11498
  {
11456
11499
  isVisible: !!isVisible,
11457
11500
  container: drawer,
11458
11501
  title: "Short Answer Settings",
11459
11502
  onClose: toggleSettingsPanelSwitch,
11460
- children: isVisible && /* @__PURE__ */ jsx94(
11503
+ children: isVisible && /* @__PURE__ */ jsx95(
11461
11504
  ShortAnswerQuestionSettings,
11462
11505
  {
11463
11506
  nodeKey: data.nodeKey
@@ -11497,7 +11540,7 @@ import {
11497
11540
  Table2
11498
11541
  } from "lucide-react";
11499
11542
  import { useMemo as useMemo8 } from "react";
11500
- import { jsx as jsx95 } from "react/jsx-runtime";
11543
+ import { jsx as jsx96 } from "react/jsx-runtime";
11501
11544
  var handlerStyle3 = {
11502
11545
  display: "flex",
11503
11546
  zIndex: 10,
@@ -11839,7 +11882,7 @@ function AddMenuHandle(props) {
11839
11882
  }
11840
11883
  return menu2;
11841
11884
  }, [hoveredNode]);
11842
- return /* @__PURE__ */ jsx95("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx95(
11885
+ return /* @__PURE__ */ jsx96("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx96(
11843
11886
  DropdownWrapper,
11844
11887
  {
11845
11888
  placement: "bottom-start",
@@ -11850,7 +11893,7 @@ function AddMenuHandle(props) {
11850
11893
  onHideMenu: () => {
11851
11894
  removeVisiblePopup();
11852
11895
  },
11853
- children: /* @__PURE__ */ jsx95("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx95(Icon, { icon: Plus }) })
11896
+ children: /* @__PURE__ */ jsx96("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx96(Icon, { icon: Plus }) })
11854
11897
  }
11855
11898
  ) });
11856
11899
  }
@@ -11888,7 +11931,7 @@ function renderCopyToClipboardMenu(nodeKey, editor) {
11888
11931
  import {
11889
11932
  $createParagraphNode as $createParagraphNode15,
11890
11933
  $getNodeByKey as $getNodeByKey44,
11891
- $getRoot as $getRoot14
11934
+ $getRoot as $getRoot13
11892
11935
  } from "lexical";
11893
11936
  import { Trash2 as Trash23 } from "lucide-react";
11894
11937
  function renderDeleteMenu(nodeKey, editor) {
@@ -11909,7 +11952,7 @@ function renderDeleteMenu(nodeKey, editor) {
11909
11952
  } else if (prevBlock) {
11910
11953
  prevBlock.selectStart();
11911
11954
  } else {
11912
- const root = $getRoot14();
11955
+ const root = $getRoot13();
11913
11956
  const newParagraph = $createParagraphNode15();
11914
11957
  root.append(newParagraph);
11915
11958
  newParagraph.selectStart();
@@ -12180,7 +12223,7 @@ import { HeadingNode as HeadingNode3 } from "@lexical/rich-text";
12180
12223
  import { ParagraphNode as ParagraphNode3 } from "lexical";
12181
12224
  import { GripVertical } from "lucide-react";
12182
12225
  import { useMemo as useMemo9 } from "react";
12183
- import { jsx as jsx96 } from "react/jsx-runtime";
12226
+ import { jsx as jsx97 } from "react/jsx-runtime";
12184
12227
  var handlerStyle4 = {
12185
12228
  display: "flex",
12186
12229
  zIndex: 10,
@@ -12267,7 +12310,7 @@ function DragHandle(props) {
12267
12310
  }
12268
12311
  return menu2;
12269
12312
  }, [hoveredNode, currentEditor]);
12270
- return /* @__PURE__ */ jsx96(
12313
+ return /* @__PURE__ */ jsx97(
12271
12314
  "div",
12272
12315
  {
12273
12316
  id: handlerKey,
@@ -12275,7 +12318,7 @@ function DragHandle(props) {
12275
12318
  ...listeners,
12276
12319
  ...attributes,
12277
12320
  style: handlerStyle4,
12278
- children: /* @__PURE__ */ jsx96(
12321
+ children: /* @__PURE__ */ jsx97(
12279
12322
  DropdownWrapper,
12280
12323
  {
12281
12324
  placement: "bottom-start",
@@ -12286,7 +12329,7 @@ function DragHandle(props) {
12286
12329
  onHideMenu: () => {
12287
12330
  removeVisiblePopup();
12288
12331
  },
12289
- children: /* @__PURE__ */ jsx96("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx96(Icon, { icon: GripVertical }) })
12332
+ children: /* @__PURE__ */ jsx97("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx97(Icon, { icon: GripVertical }) })
12290
12333
  }
12291
12334
  )
12292
12335
  }
@@ -12320,7 +12363,7 @@ function findNodePosition(rows, point, lastFound) {
12320
12363
  }
12321
12364
 
12322
12365
  // src/content/node/NodeDragOverlay.tsx
12323
- import { jsx as jsx97 } from "react/jsx-runtime";
12366
+ import { jsx as jsx98 } from "react/jsx-runtime";
12324
12367
  var overlayStyle2 = {
12325
12368
  display: "flex",
12326
12369
  minWidth: "150px",
@@ -12339,12 +12382,12 @@ var overlayStyle2 = {
12339
12382
  boxShadow: "0 1px 3px rgba(34, 25, 25, 0.4)"
12340
12383
  };
12341
12384
  function NodeDragOverlay(props) {
12342
- return /* @__PURE__ */ jsx97("div", { style: overlayStyle2, children: props.children() });
12385
+ return /* @__PURE__ */ jsx98("div", { style: overlayStyle2, children: props.children() });
12343
12386
  }
12344
12387
 
12345
12388
  // src/content/node/NodeDropMarker.tsx
12346
- import { useEffect as useEffect63, useRef as useRef44 } from "react";
12347
- import { jsx as jsx98 } from "react/jsx-runtime";
12389
+ import { useEffect as useEffect64, useRef as useRef44 } from "react";
12390
+ import { jsx as jsx99 } from "react/jsx-runtime";
12348
12391
  var placeholderStyle3 = {
12349
12392
  position: "absolute",
12350
12393
  top: "calc(-1 * var(--sl-spacing-small) / 2)",
@@ -12363,7 +12406,7 @@ var lineStyle3 = {
12363
12406
  function NodeDropMarker(props) {
12364
12407
  const { visible, top } = props;
12365
12408
  const lineDivRef = useRef44(null);
12366
- useEffect63(() => {
12409
+ useEffect64(() => {
12367
12410
  if (visible && lineDivRef.current) {
12368
12411
  lineDivRef.current.style.transition = "none";
12369
12412
  lineDivRef.current.style.width = "0px";
@@ -12375,7 +12418,7 @@ function NodeDropMarker(props) {
12375
12418
  }, 5);
12376
12419
  }
12377
12420
  }, [visible, top]);
12378
- return /* @__PURE__ */ jsx98("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx98("div", { ref: lineDivRef, style: lineStyle3 }) });
12421
+ return /* @__PURE__ */ jsx99("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx99("div", { ref: lineDivRef, style: lineStyle3 }) });
12379
12422
  }
12380
12423
 
12381
12424
  // src/content/node/NodeDraggableHandleSticky.tsx
@@ -12393,20 +12436,20 @@ import {
12393
12436
  } from "lexical";
12394
12437
  import throttle3 from "lodash-es/throttle";
12395
12438
  import {
12396
- forwardRef as forwardRef11,
12439
+ forwardRef as forwardRef12,
12397
12440
  useImperativeHandle as useImperativeHandle11,
12398
12441
  useRef as useRef45,
12399
- useState as useState11
12442
+ useState as useState12
12400
12443
  } from "react";
12401
- import { Fragment as Fragment38, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
12402
- var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12444
+ import { Fragment as Fragment38, jsx as jsx100, jsxs as jsxs36 } from "react/jsx-runtime";
12445
+ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12403
12446
  const {
12404
12447
  getRegisteredEditor,
12405
12448
  setHandleDragged,
12406
12449
  unsetHandleDragged
12407
12450
  } = useNode();
12408
12451
  const anchorElementRef = useRef45();
12409
- const [isAnchorElementReady, setAnchorElementReady] = useState11(false);
12452
+ const [isAnchorElementReady, setAnchorElementReady] = useState12(false);
12410
12453
  const nodeHandleSticky = useRef45(null);
12411
12454
  const dropMarkerSticky = useRef45(null);
12412
12455
  const nodePositionsRef = useRef45([]);
@@ -12472,7 +12515,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12472
12515
  isHandleVisible: () => !!nodeHandleSticky.current?.isVisible()
12473
12516
  }));
12474
12517
  if (!isAnchorElementReady || !anchorElementRef.current) {
12475
- return /* @__PURE__ */ jsx99(Fragment38, {});
12518
+ return /* @__PURE__ */ jsx100(Fragment38, {});
12476
12519
  }
12477
12520
  return /* @__PURE__ */ jsxs36(
12478
12521
  DndContext4,
@@ -12695,7 +12738,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12695
12738
  unsetHandleDragged();
12696
12739
  },
12697
12740
  children: [
12698
- /* @__PURE__ */ jsx99(
12741
+ /* @__PURE__ */ jsx100(
12699
12742
  StickyToPosition,
12700
12743
  {
12701
12744
  ref: nodeHandleSticky,
@@ -12713,21 +12756,21 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12713
12756
  gap: "6px"
12714
12757
  },
12715
12758
  children: [
12716
- /* @__PURE__ */ jsx99(AddMenuHandle, { hoveredNode: data.hoveredNode }),
12717
- /* @__PURE__ */ jsx99(DragHandle, { hoveredNode: data.hoveredNode })
12759
+ /* @__PURE__ */ jsx100(AddMenuHandle, { hoveredNode: data.hoveredNode }),
12760
+ /* @__PURE__ */ jsx100(DragHandle, { hoveredNode: data.hoveredNode })
12718
12761
  ]
12719
12762
  }
12720
12763
  );
12721
12764
  }
12722
12765
  }
12723
12766
  ),
12724
- /* @__PURE__ */ jsx99(
12767
+ /* @__PURE__ */ jsx100(
12725
12768
  StickyToPosition,
12726
12769
  {
12727
12770
  ref: dropMarkerSticky,
12728
12771
  container: anchorElementRef.current,
12729
12772
  children: (_data, position, isVisible) => {
12730
- return /* @__PURE__ */ jsx99(
12773
+ return /* @__PURE__ */ jsx100(
12731
12774
  NodeDropMarker,
12732
12775
  {
12733
12776
  top: `${position.top}px`,
@@ -12738,8 +12781,8 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12738
12781
  }
12739
12782
  }
12740
12783
  ),
12741
- /* @__PURE__ */ jsx99(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx99(NodeDragOverlay, { children: () => {
12742
- return /* @__PURE__ */ jsx99("div", { children: "Move Block" });
12784
+ /* @__PURE__ */ jsx100(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx100(NodeDragOverlay, { children: () => {
12785
+ return /* @__PURE__ */ jsx100("div", { children: "Move Block" });
12743
12786
  } }) })
12744
12787
  ]
12745
12788
  }
@@ -12747,7 +12790,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12747
12790
  });
12748
12791
 
12749
12792
  // src/content/node/NodeProvider.tsx
12750
- import { jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
12793
+ import { jsx as jsx101, jsxs as jsxs37 } from "react/jsx-runtime";
12751
12794
  var NodeProviderContext = React18.createContext(null);
12752
12795
  function NodeProvider(props) {
12753
12796
  const { children } = props;
@@ -12818,7 +12861,7 @@ function NodeProvider(props) {
12818
12861
  const getHandleOverNodeKey = () => {
12819
12862
  return handleOverNodeKeyRef.current;
12820
12863
  };
12821
- useEffect64(() => {
12864
+ useEffect65(() => {
12822
12865
  return () => {
12823
12866
  const editorsKeys = Object.keys(editorsRegisterRef.current);
12824
12867
  for (const editorKey of editorsKeys) {
@@ -12849,7 +12892,7 @@ function NodeProvider(props) {
12849
12892
  },
12850
12893
  children: [
12851
12894
  children,
12852
- /* @__PURE__ */ jsx100(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
12895
+ /* @__PURE__ */ jsx101(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
12853
12896
  ]
12854
12897
  }
12855
12898
  );
@@ -12868,18 +12911,18 @@ import { TableNode as TableNode5 } from "@lexical/table";
12868
12911
  import { mergeRegister as mergeRegister20 } from "@lexical/utils";
12869
12912
  import {
12870
12913
  $createParagraphNode as $createParagraphNode17,
12871
- $getRoot as $getRoot15,
12914
+ $getRoot as $getRoot14,
12872
12915
  $isParagraphNode as $isParagraphNode2
12873
12916
  } from "lexical";
12874
- import { useEffect as useEffect65 } from "react";
12875
- import { Fragment as Fragment39, jsx as jsx101 } from "react/jsx-runtime";
12917
+ import { useEffect as useEffect66 } from "react";
12918
+ import { Fragment as Fragment39, jsx as jsx102 } from "react/jsx-runtime";
12876
12919
  function AutoBottomParagraphPlugin() {
12877
12920
  const [editor] = useLexicalComposerContext53();
12878
12921
  const listener = (nodeMutations) => {
12879
12922
  for (const [_key, mutation] of nodeMutations) {
12880
12923
  if (mutation === "created") {
12881
12924
  editor.update(() => {
12882
- const rootNode = $getRoot15();
12925
+ const rootNode = $getRoot14();
12883
12926
  if (rootNode) {
12884
12927
  const lastChild = rootNode.getLastChild();
12885
12928
  if (lastChild && !$isParagraphNode2(lastChild)) {
@@ -12891,7 +12934,7 @@ function AutoBottomParagraphPlugin() {
12891
12934
  }
12892
12935
  }
12893
12936
  };
12894
- useEffect65(() => {
12937
+ useEffect66(() => {
12895
12938
  return mergeRegister20(
12896
12939
  ...[
12897
12940
  ImageNode,
@@ -12914,19 +12957,19 @@ function AutoBottomParagraphPlugin() {
12914
12957
  )
12915
12958
  );
12916
12959
  }, [editor]);
12917
- return /* @__PURE__ */ jsx101(Fragment39, {});
12960
+ return /* @__PURE__ */ jsx102(Fragment39, {});
12918
12961
  }
12919
12962
 
12920
12963
  // src/plugins/AutoFocusPlugin/AutoFocusPlugin.tsx
12921
12964
  import { useLexicalComposerContext as useLexicalComposerContext54 } from "@lexical/react/LexicalComposerContext";
12922
- import { $getRoot as $getRoot16 } from "lexical";
12923
- import { useEffect as useEffect66 } from "react";
12965
+ import { $getRoot as $getRoot15 } from "lexical";
12966
+ import { useEffect as useEffect67 } from "react";
12924
12967
  function AutoFocusPlugin() {
12925
12968
  const [editor] = useLexicalComposerContext54();
12926
- useEffect66(() => {
12969
+ useEffect67(() => {
12927
12970
  setTimeout(() => {
12928
12971
  editor.update(() => {
12929
- const rootNode = $getRoot16();
12972
+ const rootNode = $getRoot15();
12930
12973
  if (rootNode.getChildrenKeys().length >= 1) {
12931
12974
  rootNode.getFirstChild()?.selectStart();
12932
12975
  }
@@ -12941,23 +12984,23 @@ function AutoFocusPlugin() {
12941
12984
 
12942
12985
  // src/plugins/EditorRefPlugin/EditorRefPlugin.tsx
12943
12986
  import { useLexicalComposerContext as useLexicalComposerContext55 } from "@lexical/react/LexicalComposerContext";
12944
- import { useEffect as useEffect67 } from "react";
12987
+ import { useEffect as useEffect68 } from "react";
12945
12988
  function EditorRefPlugin(props) {
12946
12989
  const [editor] = useLexicalComposerContext55();
12947
12990
  const { onMountRef } = props;
12948
- useEffect67(() => {
12991
+ useEffect68(() => {
12949
12992
  onMountRef(editor);
12950
12993
  }, [editor]);
12951
12994
  return null;
12952
12995
  }
12953
12996
 
12954
12997
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
12955
- import { useEffect as useEffect68 } from "react";
12998
+ import { useEffect as useEffect69 } from "react";
12956
12999
  import { useLexicalComposerContext as useLexicalComposerContext56 } from "@lexical/react/LexicalComposerContext";
12957
13000
 
12958
13001
  // src/plugins/MarkdownPlugin/markdown/MarkdownExport.ts
12959
13002
  import {
12960
- $getRoot as $getRoot17,
13003
+ $getRoot as $getRoot16,
12961
13004
  $isDecoratorNode,
12962
13005
  $isElementNode as $isElementNode3,
12963
13006
  $isLineBreakNode as $isLineBreakNode2,
@@ -13219,7 +13262,7 @@ import {
13219
13262
  $createLineBreakNode as $createLineBreakNode2,
13220
13263
  $createParagraphNode as $createParagraphNode18,
13221
13264
  $createTextNode as $createTextNode5,
13222
- $getRoot as $getRoot18,
13265
+ $getRoot as $getRoot17,
13223
13266
  $getSelection as $getSelection8,
13224
13267
  $isParagraphNode as $isParagraphNode4
13225
13268
  } from "lexical";
@@ -13826,7 +13869,7 @@ var TRANSFORMERS = [
13826
13869
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
13827
13870
  function MarkdownPlugin() {
13828
13871
  const [editor] = useLexicalComposerContext56();
13829
- useEffect68(() => {
13872
+ useEffect69(() => {
13830
13873
  return registerMarkdownShortcuts(editor, TRANSFORMERS);
13831
13874
  }, [editor]);
13832
13875
  return null;
@@ -13834,8 +13877,8 @@ function MarkdownPlugin() {
13834
13877
 
13835
13878
  // src/plugins/NodeMousePlugin/NodeMouseAnchorPlugin.tsx
13836
13879
  import { useLexicalComposerContext as useLexicalComposerContext57 } from "@lexical/react/LexicalComposerContext";
13837
- import { useEffect as useEffect69, useRef as useRef47 } from "react";
13838
- import { Fragment as Fragment40, jsx as jsx102 } from "react/jsx-runtime";
13880
+ import { useEffect as useEffect70, useRef as useRef47 } from "react";
13881
+ import { Fragment as Fragment40, jsx as jsx103 } from "react/jsx-runtime";
13839
13882
  function NodeMouseAnchorPlugin() {
13840
13883
  const [editor] = useLexicalComposerContext57();
13841
13884
  const { setAnchorElement, hideHandles } = useNode();
@@ -13852,7 +13895,7 @@ function NodeMouseAnchorPlugin() {
13852
13895
  }
13853
13896
  hideHandles();
13854
13897
  };
13855
- useEffect69(() => {
13898
+ useEffect70(() => {
13856
13899
  const removeRootListener = editor.registerRootListener(
13857
13900
  (nextRootElem) => {
13858
13901
  if (nextRootElem?.parentElement) {
@@ -13885,7 +13928,7 @@ function NodeMouseAnchorPlugin() {
13885
13928
  removeRootListener();
13886
13929
  };
13887
13930
  }, [editor]);
13888
- return /* @__PURE__ */ jsx102(Fragment40, {});
13931
+ return /* @__PURE__ */ jsx103(Fragment40, {});
13889
13932
  }
13890
13933
 
13891
13934
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
@@ -13903,13 +13946,13 @@ import {
13903
13946
  $createParagraphNode as $createParagraphNode19,
13904
13947
  $createTextNode as $createTextNode7,
13905
13948
  $getNodeByKey as $getNodeByKey50,
13906
- $getRoot as $getRoot19,
13949
+ $getRoot as $getRoot18,
13907
13950
  $isParagraphNode as $isParagraphNode5,
13908
13951
  ParagraphNode as ParagraphNode4
13909
13952
  } from "lexical";
13910
13953
  import debounce4 from "lodash-es/debounce";
13911
13954
  import uniqueId2 from "lodash-es/uniqueId";
13912
- import { useEffect as useEffect70, useRef as useRef48 } from "react";
13955
+ import { useEffect as useEffect71, useRef as useRef48 } from "react";
13913
13956
 
13914
13957
  // src/plugins/NodeMousePlugin/nodeUtils.ts
13915
13958
  function getNodePosition2(element, parent) {
@@ -13925,7 +13968,7 @@ function getNodePosition2(element, parent) {
13925
13968
  }
13926
13969
 
13927
13970
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
13928
- import { Fragment as Fragment41, jsx as jsx103 } from "react/jsx-runtime";
13971
+ import { Fragment as Fragment41, jsx as jsx104 } from "react/jsx-runtime";
13929
13972
  function NodeMousePlugin() {
13930
13973
  const [editor] = useLexicalComposerContext58();
13931
13974
  const editorUniqueIdRef = useRef48(uniqueId2("editor"));
@@ -14201,7 +14244,7 @@ function NodeMousePlugin() {
14201
14244
  }
14202
14245
  let childrenCount = 0;
14203
14246
  editor.getEditorState().read(() => {
14204
- const rootNode = $getRoot19();
14247
+ const rootNode = $getRoot18();
14205
14248
  if (rootNode) {
14206
14249
  const childrenKeys = rootNode.getChildrenKeys();
14207
14250
  childrenCount = childrenKeys.length;
@@ -14209,7 +14252,7 @@ function NodeMousePlugin() {
14209
14252
  });
14210
14253
  if (childrenCount === 0) {
14211
14254
  editor.update(() => {
14212
- const rootNode = $getRoot19();
14255
+ const rootNode = $getRoot18();
14213
14256
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14214
14257
  const newParagraph = $createParagraphNode19();
14215
14258
  newParagraph.append($createTextNode7());
@@ -14219,7 +14262,7 @@ function NodeMousePlugin() {
14219
14262
  }
14220
14263
  refreshHelpersPositions();
14221
14264
  };
14222
- useEffect70(() => {
14265
+ useEffect71(() => {
14223
14266
  window.addEventListener(
14224
14267
  RESIZE_CONTENT_EVENT,
14225
14268
  refreshHelpersPositions
@@ -14231,7 +14274,7 @@ function NodeMousePlugin() {
14231
14274
  );
14232
14275
  };
14233
14276
  }, []);
14234
- useEffect70(() => {
14277
+ useEffect71(() => {
14235
14278
  registerEditor(editorUniqueIdRef.current, editor);
14236
14279
  const removeRegistration = mergeRegister21(
14237
14280
  ...[
@@ -14267,7 +14310,7 @@ function NodeMousePlugin() {
14267
14310
  if (nextRootElem) {
14268
14311
  let childrenCount = 0;
14269
14312
  editor.getEditorState().read(() => {
14270
- const rootNode = $getRoot19();
14313
+ const rootNode = $getRoot18();
14271
14314
  if (rootNode) {
14272
14315
  const childrenKeys = rootNode.getChildrenKeys();
14273
14316
  childrenCount = childrenKeys.length;
@@ -14279,7 +14322,7 @@ function NodeMousePlugin() {
14279
14322
  });
14280
14323
  if (childrenCount === 0) {
14281
14324
  editor.update(() => {
14282
- const rootNode = $getRoot19();
14325
+ const rootNode = $getRoot18();
14283
14326
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14284
14327
  const newParagraph = $createParagraphNode19();
14285
14328
  newParagraph.append($createTextNode7());
@@ -14295,7 +14338,7 @@ function NodeMousePlugin() {
14295
14338
  removeRegistration();
14296
14339
  };
14297
14340
  }, [editor]);
14298
- return /* @__PURE__ */ jsx103(Fragment41, {});
14341
+ return /* @__PURE__ */ jsx104(Fragment41, {});
14299
14342
  }
14300
14343
 
14301
14344
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
@@ -14309,7 +14352,7 @@ import {
14309
14352
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW13,
14310
14353
  PASTE_COMMAND
14311
14354
  } from "lexical";
14312
- import { useEffect as useEffect71 } from "react";
14355
+ import { useEffect as useEffect72 } from "react";
14313
14356
 
14314
14357
  // src/plugins/NodePastePlugin/regenerateIdsInQuestion.ts
14315
14358
  import { nanoid as nanoid10 } from "nanoid";
@@ -14356,10 +14399,10 @@ function regenerateIdsInQuestion(serializedNode) {
14356
14399
  }
14357
14400
 
14358
14401
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
14359
- import { Fragment as Fragment42, jsx as jsx104 } from "react/jsx-runtime";
14402
+ import { Fragment as Fragment42, jsx as jsx105 } from "react/jsx-runtime";
14360
14403
  function NodePastePlugin() {
14361
14404
  const [editor] = useLexicalComposerContext59();
14362
- useEffect71(() => {
14405
+ useEffect72(() => {
14363
14406
  return mergeRegister22(
14364
14407
  editor.registerCommand(
14365
14408
  PASTE_COMMAND,
@@ -14438,20 +14481,20 @@ function NodePastePlugin() {
14438
14481
  )
14439
14482
  );
14440
14483
  }, [editor]);
14441
- return /* @__PURE__ */ jsx104(Fragment42, {});
14484
+ return /* @__PURE__ */ jsx105(Fragment42, {});
14442
14485
  }
14443
14486
 
14444
14487
  // src/components/inputs/PopupToolbar.tsx
14445
14488
  import clsx5 from "clsx";
14446
14489
  import {
14447
- forwardRef as forwardRef12,
14448
- useEffect as useEffect72,
14490
+ forwardRef as forwardRef13,
14491
+ useEffect as useEffect73,
14449
14492
  useImperativeHandle as useImperativeHandle12,
14450
14493
  useMemo as useMemo10,
14451
14494
  useRef as useRef49
14452
14495
  } from "react";
14453
- import { Fragment as Fragment43, jsx as jsx105, jsxs as jsxs38 } from "react/jsx-runtime";
14454
- var PopupToolbar = forwardRef12((props, ref) => {
14496
+ import { Fragment as Fragment43, jsx as jsx106, jsxs as jsxs38 } from "react/jsx-runtime";
14497
+ var PopupToolbar = forwardRef13((props, ref) => {
14455
14498
  const { onEscape, menu, toolbar } = props;
14456
14499
  const popupRef = useRef49(null);
14457
14500
  const toolbarRef = useRef49(null);
@@ -14483,7 +14526,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14483
14526
  menuItemAttributes.checked = menuItemSelected;
14484
14527
  menuItemAttributes.type = "checkbox";
14485
14528
  }
14486
- let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx105(
14529
+ let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx106(
14487
14530
  DropdownButton,
14488
14531
  {
14489
14532
  size: "medium",
@@ -14508,15 +14551,15 @@ var PopupToolbar = forwardRef12((props, ref) => {
14508
14551
  }
14509
14552
  },
14510
14553
  children: [
14511
- MenuItemIcon && /* @__PURE__ */ jsx105(Icon, { slot: "prefix", icon: MenuItemIcon }),
14554
+ MenuItemIcon && /* @__PURE__ */ jsx106(Icon, { slot: "prefix", icon: MenuItemIcon }),
14512
14555
  menuItemLabel,
14513
- menuItemIsError && /* @__PURE__ */ jsx105(DotBadge, { variant: "danger" })
14556
+ menuItemIsError && /* @__PURE__ */ jsx106(DotBadge, { variant: "danger" })
14514
14557
  ]
14515
14558
  },
14516
14559
  `menuItem${menuItemId}`
14517
14560
  );
14518
14561
  if (tooltip && !menuItem.subMenu) {
14519
- buttonElement = /* @__PURE__ */ jsx105(
14562
+ buttonElement = /* @__PURE__ */ jsx106(
14520
14563
  "sl-tooltip",
14521
14564
  {
14522
14565
  content: tooltip,
@@ -14567,7 +14610,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14567
14610
  onEscape();
14568
14611
  }
14569
14612
  }
14570
- useEffect72(() => {
14613
+ useEffect73(() => {
14571
14614
  if (onEscape) {
14572
14615
  toolbarRef.current?.addEventListener("keydown", handleKeyDown);
14573
14616
  return () => {
@@ -14578,7 +14621,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14578
14621
  };
14579
14622
  }
14580
14623
  }, [onEscape]);
14581
- return /* @__PURE__ */ jsx105(Fragment43, { children: /* @__PURE__ */ jsx105(
14624
+ return /* @__PURE__ */ jsx106(Fragment43, { children: /* @__PURE__ */ jsx106(
14582
14625
  "sl-popup",
14583
14626
  {
14584
14627
  ref: popupRef,
@@ -14586,7 +14629,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14586
14629
  shift: true,
14587
14630
  "auto-size": "horizontal",
14588
14631
  strategy: "fixed",
14589
- children: toolbar || /* @__PURE__ */ jsx105("sl-button-group", { ref: toolbarRef, children: menuItems })
14632
+ children: toolbar || /* @__PURE__ */ jsx106("sl-button-group", { ref: toolbarRef, children: menuItems })
14590
14633
  }
14591
14634
  ) });
14592
14635
  });
@@ -14638,16 +14681,16 @@ var bgColorList = [
14638
14681
  ];
14639
14682
 
14640
14683
  // src/components/feedback/ProgressBar.tsx
14641
- import { jsx as jsx106 } from "react/jsx-runtime";
14684
+ import { jsx as jsx107 } from "react/jsx-runtime";
14642
14685
  function ProgressBar() {
14643
- return /* @__PURE__ */ jsx106("sl-progress-bar", { indeterminate: "indeterminate" });
14686
+ return /* @__PURE__ */ jsx107("sl-progress-bar", { indeterminate: "indeterminate" });
14644
14687
  }
14645
14688
 
14646
14689
  // src/components/layouts/Stack.tsx
14647
- import { jsx as jsx107 } from "react/jsx-runtime";
14690
+ import { jsx as jsx108 } from "react/jsx-runtime";
14648
14691
  function Stack(props) {
14649
14692
  const { id, style, className, slot, children } = props;
14650
- return /* @__PURE__ */ jsx107(
14693
+ return /* @__PURE__ */ jsx108(
14651
14694
  "div",
14652
14695
  {
14653
14696
  id,
@@ -14661,13 +14704,13 @@ function Stack(props) {
14661
14704
 
14662
14705
  // src/components/dialogs/FormDialog.tsx
14663
14706
  import {
14664
- forwardRef as forwardRef13,
14665
- useEffect as useEffect73,
14707
+ forwardRef as forwardRef14,
14708
+ useEffect as useEffect74,
14666
14709
  useImperativeHandle as useImperativeHandle13,
14667
14710
  useRef as useRef50
14668
14711
  } from "react";
14669
- import { jsx as jsx108, jsxs as jsxs39 } from "react/jsx-runtime";
14670
- var FormDialog = forwardRef13((props, ref) => {
14712
+ import { jsx as jsx109, jsxs as jsxs39 } from "react/jsx-runtime";
14713
+ var FormDialog = forwardRef14((props, ref) => {
14671
14714
  const {
14672
14715
  id,
14673
14716
  actionName,
@@ -14730,7 +14773,7 @@ var FormDialog = forwardRef13((props, ref) => {
14730
14773
  onHide();
14731
14774
  }
14732
14775
  };
14733
- useEffect73(() => {
14776
+ useEffect74(() => {
14734
14777
  window.customElements.whenDefined("sl-dialog").then(() => {
14735
14778
  if (dialogRef.current) {
14736
14779
  dialogRef.current.addEventListener(
@@ -14764,7 +14807,7 @@ var FormDialog = forwardRef13((props, ref) => {
14764
14807
  }
14765
14808
  };
14766
14809
  }, [onCancel]);
14767
- useEffect73(() => {
14810
+ useEffect74(() => {
14768
14811
  window.addEventListener(
14769
14812
  FORM_DIALOG_OPEN_EVENT,
14770
14813
  handleOpenByEvent
@@ -14794,13 +14837,13 @@ var FormDialog = forwardRef13((props, ref) => {
14794
14837
  }
14795
14838
  };
14796
14839
  });
14797
- return /* @__PURE__ */ jsx108("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs39(
14840
+ return /* @__PURE__ */ jsx109("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs39(
14798
14841
  "sl-dialog",
14799
14842
  {
14800
14843
  class: `dialog_control ${className}`,
14801
14844
  ref: dialogRef,
14802
14845
  children: [
14803
- /* @__PURE__ */ jsx108("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs39(
14846
+ /* @__PURE__ */ jsx109("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs39(
14804
14847
  Stack,
14805
14848
  {
14806
14849
  className: "stack__gap-3 stack__row",
@@ -14811,13 +14854,13 @@ var FormDialog = forwardRef13((props, ref) => {
14811
14854
  },
14812
14855
  children: [
14813
14856
  headerControls,
14814
- /* @__PURE__ */ jsx108("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx108("span", { className: "font-medium font-w-semibold", children: title }) })
14857
+ /* @__PURE__ */ jsx109("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx109("span", { className: "font-medium font-w-semibold", children: title }) })
14815
14858
  ]
14816
14859
  }
14817
- ) : /* @__PURE__ */ jsx108("span", { className: "font-medium font-w-semibold", children: title }) }),
14818
- loading && /* @__PURE__ */ jsx108(ProgressBar, {}),
14819
- /* @__PURE__ */ jsx108("input", { type: "hidden", name: "formDialogId", value: id }),
14820
- /* @__PURE__ */ jsx108("input", { type: "hidden", name: "action", value: actionName }),
14860
+ ) : /* @__PURE__ */ jsx109("span", { className: "font-medium font-w-semibold", children: title }) }),
14861
+ loading && /* @__PURE__ */ jsx109(ProgressBar, {}),
14862
+ /* @__PURE__ */ jsx109("input", { type: "hidden", name: "formDialogId", value: id }),
14863
+ /* @__PURE__ */ jsx109("input", { type: "hidden", name: "action", value: actionName }),
14821
14864
  children,
14822
14865
  /* @__PURE__ */ jsxs39(
14823
14866
  Stack,
@@ -14826,14 +14869,14 @@ var FormDialog = forwardRef13((props, ref) => {
14826
14869
  className: "stack__row stack__gap-4",
14827
14870
  style: { width: "100%", flexWrap: "nowrap" },
14828
14871
  children: [
14829
- extraControl && /* @__PURE__ */ jsx108("div", { style: { flexGrow: 0 }, children: extraControl }),
14872
+ extraControl && /* @__PURE__ */ jsx109("div", { style: { flexGrow: 0 }, children: extraControl }),
14830
14873
  /* @__PURE__ */ jsxs39(
14831
14874
  Stack,
14832
14875
  {
14833
14876
  className: "stack__row stack__gap-4",
14834
14877
  style: { flexGrow: 1, justifyContent: "end" },
14835
14878
  children: [
14836
- /* @__PURE__ */ jsx108("div", { children: /* @__PURE__ */ jsx108(
14879
+ /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
14837
14880
  Button,
14838
14881
  {
14839
14882
  slot: "footer",
@@ -14845,7 +14888,7 @@ var FormDialog = forwardRef13((props, ref) => {
14845
14888
  onClick: handleCancel
14846
14889
  }
14847
14890
  ) }),
14848
- /* @__PURE__ */ jsx108("div", { children: /* @__PURE__ */ jsx108(
14891
+ /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
14849
14892
  Button,
14850
14893
  {
14851
14894
  slot: "footer",
@@ -14879,16 +14922,16 @@ import {
14879
14922
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR14,
14880
14923
  createCommand as createCommand18
14881
14924
  } from "lexical";
14882
- import { useEffect as useEffect74, useRef as useRef51, useState as useState12 } from "react";
14883
- import { jsx as jsx109, jsxs as jsxs40 } from "react/jsx-runtime";
14925
+ import { useEffect as useEffect75, useRef as useRef51, useState as useState13 } from "react";
14926
+ import { jsx as jsx110, jsxs as jsxs40 } from "react/jsx-runtime";
14884
14927
  var SHOW_LINK_EDITOR_COMMAND = createCommand18("SHOW_LINK_EDITOR_COMMAND");
14885
14928
  function LinkEditorPlugin() {
14886
14929
  const [editor] = useLexicalComposerContext60();
14887
14930
  const formDialogRef = useRef51(null);
14888
14931
  const linkUrlInputRef = useRef51(null);
14889
- const [openInNew, setOpenInNew] = useState12(false);
14932
+ const [openInNew, setOpenInNew] = useState13(false);
14890
14933
  const activeEditorRef = useRef51();
14891
- useEffect74(() => {
14934
+ useEffect75(() => {
14892
14935
  return mergeRegister23(
14893
14936
  editor.registerCommand(
14894
14937
  SHOW_LINK_EDITOR_COMMAND,
@@ -14913,7 +14956,7 @@ function LinkEditorPlugin() {
14913
14956
  )
14914
14957
  );
14915
14958
  }, [editor]);
14916
- return /* @__PURE__ */ jsx109(
14959
+ return /* @__PURE__ */ jsx110(
14917
14960
  FormDialog,
14918
14961
  {
14919
14962
  ref: formDialogRef,
@@ -14950,8 +14993,8 @@ function LinkEditorPlugin() {
14950
14993
  onCancel: () => {
14951
14994
  formDialogRef.current?.close();
14952
14995
  },
14953
- children: /* @__PURE__ */ jsx109("div", { style: { width: "450px" }, children: /* @__PURE__ */ jsxs40(Stack, { className: "stack__column stack__gap-4", children: [
14954
- /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
14996
+ children: /* @__PURE__ */ jsx110("div", { style: { width: "450px" }, children: /* @__PURE__ */ jsxs40(Stack, { className: "stack__column stack__gap-4", children: [
14997
+ /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
14955
14998
  TextInput,
14956
14999
  {
14957
15000
  ref: linkUrlInputRef,
@@ -14961,7 +15004,7 @@ function LinkEditorPlugin() {
14961
15004
  defaultValue: ""
14962
15005
  }
14963
15006
  ) }),
14964
- /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
15007
+ /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
14965
15008
  Checkbox,
14966
15009
  {
14967
15010
  size: "small",
@@ -14980,16 +15023,16 @@ function LinkEditorPlugin() {
14980
15023
 
14981
15024
  // src/components/inputs/PopupHighlight.tsx
14982
15025
  import {
14983
- forwardRef as forwardRef14,
15026
+ forwardRef as forwardRef15,
14984
15027
  useImperativeHandle as useImperativeHandle14,
14985
15028
  useRef as useRef52,
14986
- useState as useState13
15029
+ useState as useState14
14987
15030
  } from "react";
14988
- import { jsx as jsx110 } from "react/jsx-runtime";
14989
- var PopupHighlighter = forwardRef14((props, ref) => {
15031
+ import { jsx as jsx111 } from "react/jsx-runtime";
15032
+ var PopupHighlighter = forwardRef15((props, ref) => {
14990
15033
  const { highlighterClassName } = props;
14991
15034
  const popupRef = useRef52(null);
14992
- const [popupRect, setPopupRect] = useState13();
15035
+ const [popupRect, setPopupRect] = useState14();
14993
15036
  function hidePopup() {
14994
15037
  if (popupRef.current) {
14995
15038
  popupRef.current.active = false;
@@ -15020,7 +15063,7 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15020
15063
  }
15021
15064
  }
15022
15065
  }));
15023
- return /* @__PURE__ */ jsx110("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx110("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx110(
15066
+ return /* @__PURE__ */ jsx111("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx111("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx111(
15024
15067
  "div",
15025
15068
  {
15026
15069
  className: highlighterClassName,
@@ -15029,7 +15072,7 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15029
15072
  "--variable-placeholder-height": `${popupRect?.height || 0}px`
15030
15073
  }
15031
15074
  }
15032
- ) : /* @__PURE__ */ jsx110(
15075
+ ) : /* @__PURE__ */ jsx111(
15033
15076
  "div",
15034
15077
  {
15035
15078
  style: {
@@ -15048,16 +15091,16 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15048
15091
 
15049
15092
  // src/components/inputs/PopupMenu.tsx
15050
15093
  import {
15051
- forwardRef as forwardRef15,
15052
- useEffect as useEffect75,
15094
+ forwardRef as forwardRef16,
15095
+ useEffect as useEffect76,
15053
15096
  useImperativeHandle as useImperativeHandle15,
15054
15097
  useLayoutEffect,
15055
15098
  useMemo as useMemo11,
15056
15099
  useRef as useRef53,
15057
- useState as useState14
15100
+ useState as useState15
15058
15101
  } from "react";
15059
- import { Fragment as Fragment44, jsx as jsx111, jsxs as jsxs41 } from "react/jsx-runtime";
15060
- var PopupMenu = forwardRef15(
15102
+ import { Fragment as Fragment44, jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
15103
+ var PopupMenu = forwardRef16(
15061
15104
  (props, ref) => {
15062
15105
  const {
15063
15106
  onEscape,
@@ -15067,7 +15110,7 @@ var PopupMenu = forwardRef15(
15067
15110
  } = props;
15068
15111
  const popupRef = useRef53(null);
15069
15112
  const menuRef = useRef53(null);
15070
- const [itemsFilter, setItemsFilter] = useState14();
15113
+ const [itemsFilter, setItemsFilter] = useState15();
15071
15114
  function hidePopup() {
15072
15115
  if (popupRef.current) {
15073
15116
  popupRef.current.active = false;
@@ -15136,11 +15179,11 @@ var PopupMenu = forwardRef15(
15136
15179
  } = menuItem;
15137
15180
  if (menuItemDivider) {
15138
15181
  resultList.push(
15139
- /* @__PURE__ */ jsx111("sl-divider", {}, `menuItem${menuItemId}`)
15182
+ /* @__PURE__ */ jsx112("sl-divider", {}, `menuItem${menuItemId}`)
15140
15183
  );
15141
15184
  } else if (menuItemIsGroup) {
15142
15185
  resultList.push(
15143
- /* @__PURE__ */ jsx111("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15186
+ /* @__PURE__ */ jsx112("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15144
15187
  );
15145
15188
  } else {
15146
15189
  const menuItemAttributes = {};
@@ -15159,9 +15202,9 @@ var PopupMenu = forwardRef15(
15159
15202
  class: menuItemClassName,
15160
15203
  ...menuItemAttributes,
15161
15204
  children: [
15162
- MenuItemIcon && /* @__PURE__ */ jsx111(Icon, { slot: "prefix", icon: MenuItemIcon }),
15205
+ MenuItemIcon && /* @__PURE__ */ jsx112(Icon, { slot: "prefix", icon: MenuItemIcon }),
15163
15206
  menuItemLabel,
15164
- menuItemIsError && /* @__PURE__ */ jsx111(DotBadge, { variant: "danger" })
15207
+ menuItemIsError && /* @__PURE__ */ jsx112(DotBadge, { variant: "danger" })
15165
15208
  ]
15166
15209
  },
15167
15210
  `menuItem${menuItemId}`
@@ -15184,7 +15227,7 @@ var PopupMenu = forwardRef15(
15184
15227
  }
15185
15228
  if (constMenu.length > 0) {
15186
15229
  if (resultList.length > 0) {
15187
- resultList.push(/* @__PURE__ */ jsx111("sl-divider", {}, "const-menu-divider"));
15230
+ resultList.push(/* @__PURE__ */ jsx112("sl-divider", {}, "const-menu-divider"));
15188
15231
  }
15189
15232
  resultList = resultList.concat(createMenuList(constMenu));
15190
15233
  }
@@ -15296,7 +15339,7 @@ var PopupMenu = forwardRef15(
15296
15339
  onEscape();
15297
15340
  }
15298
15341
  }
15299
- useEffect75(() => {
15342
+ useEffect76(() => {
15300
15343
  if (onEscape) {
15301
15344
  popupRef.current?.addEventListener("keydown", handleKeyDown);
15302
15345
  menuRef.current?.addEventListener("keydown", handleKeyDown);
@@ -15312,7 +15355,7 @@ var PopupMenu = forwardRef15(
15312
15355
  };
15313
15356
  }
15314
15357
  }, [onEscape]);
15315
- return /* @__PURE__ */ jsx111(Fragment44, { children: /* @__PURE__ */ jsx111(
15358
+ return /* @__PURE__ */ jsx112(Fragment44, { children: /* @__PURE__ */ jsx112(
15316
15359
  "sl-popup",
15317
15360
  {
15318
15361
  ref: popupRef,
@@ -15324,7 +15367,7 @@ var PopupMenu = forwardRef15(
15324
15367
  strategy: "fixed",
15325
15368
  "auto-size": "vertical",
15326
15369
  "auto-size-padding": "10",
15327
- children: /* @__PURE__ */ jsx111(
15370
+ children: /* @__PURE__ */ jsx112(
15328
15371
  "sl-menu",
15329
15372
  {
15330
15373
  ref: menuRef,
@@ -15489,23 +15532,23 @@ function visitVariableNodes(rootNode, cb) {
15489
15532
  }
15490
15533
 
15491
15534
  // src/plugins/VariablesPlugin/VariablesContext.tsx
15492
- import { $getRoot as $getRoot20 } from "lexical";
15535
+ import { $getRoot as $getRoot19 } from "lexical";
15493
15536
  import React22, {
15494
15537
  useContext as useContext4,
15495
- useEffect as useEffect76,
15496
- useState as useState15
15538
+ useEffect as useEffect77,
15539
+ useState as useState16
15497
15540
  } from "react";
15498
- import { jsx as jsx112 } from "react/jsx-runtime";
15541
+ import { jsx as jsx113 } from "react/jsx-runtime";
15499
15542
  var VariablesContext = React22.createContext(null);
15500
15543
  function VariablesProvider(props) {
15501
15544
  const { getEditor, getAllNestedEditors } = useBlockEditor();
15502
15545
  const { children, variablesSettings } = props;
15503
- const [variableList, setVariableList] = useState15(
15546
+ const [variableList, setVariableList] = useState16(
15504
15547
  variablesSettings.list
15505
15548
  );
15506
15549
  const updateVariablesInEditor = (newName, oldName, editor) => {
15507
15550
  editor.update(() => {
15508
- visitVariableNodes($getRoot20(), (variableNode) => {
15551
+ visitVariableNodes($getRoot19(), (variableNode) => {
15509
15552
  if (variableNode.__variable === oldName) {
15510
15553
  variableNode.setVariable(newName);
15511
15554
  }
@@ -15524,7 +15567,7 @@ function VariablesProvider(props) {
15524
15567
  setVariableSelection(editorRef, newName);
15525
15568
  }
15526
15569
  };
15527
- useEffect76(() => {
15570
+ useEffect77(() => {
15528
15571
  setVariableList(variablesSettings.list);
15529
15572
  }, [variablesSettings]);
15530
15573
  const handleOnCreated = (name) => {
@@ -15536,7 +15579,7 @@ function VariablesProvider(props) {
15536
15579
  renameVariable(newName, oldName);
15537
15580
  variablesSettings.onUpdated(newName, oldName);
15538
15581
  };
15539
- return /* @__PURE__ */ jsx112(
15582
+ return /* @__PURE__ */ jsx113(
15540
15583
  VariablesContext.Provider,
15541
15584
  {
15542
15585
  value: {
@@ -15656,8 +15699,8 @@ import {
15656
15699
  KEY_ESCAPE_COMMAND,
15657
15700
  createCommand as createCommand19
15658
15701
  } from "lexical";
15659
- import { useEffect as useEffect77, useMemo as useMemo12, useRef as useRef54 } from "react";
15660
- import { Fragment as Fragment45, jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
15702
+ import { useEffect as useEffect78, useMemo as useMemo12, useRef as useRef54 } from "react";
15703
+ import { Fragment as Fragment45, jsx as jsx114, jsxs as jsxs42 } from "react/jsx-runtime";
15661
15704
  var CREATE_VARIABLE_FROM_SELECTION_COMMAND = createCommand19("CREATE_VARIABLE_FROM_SELECTION_COMMAND");
15662
15705
  function TypeaheadVariablePlugin() {
15663
15706
  const { variableList, onCreated } = useVariables();
@@ -15811,7 +15854,7 @@ function TypeaheadVariablePlugin() {
15811
15854
  }
15812
15855
  return false;
15813
15856
  };
15814
- useEffect77(() => {
15857
+ useEffect78(() => {
15815
15858
  return mergeRegister24(
15816
15859
  editor.registerCommand(
15817
15860
  TYPEAHEAD_VARIABLE_COMMAND,
@@ -15895,7 +15938,7 @@ function TypeaheadVariablePlugin() {
15895
15938
  );
15896
15939
  }, [variableList, activeDecoratorRef.current]);
15897
15940
  return /* @__PURE__ */ jsxs42(Fragment45, { children: [
15898
- /* @__PURE__ */ jsx113(
15941
+ /* @__PURE__ */ jsx114(
15899
15942
  PopupMenu,
15900
15943
  {
15901
15944
  ref: popupRef,
@@ -15903,7 +15946,7 @@ function TypeaheadVariablePlugin() {
15903
15946
  menu
15904
15947
  }
15905
15948
  ),
15906
- /* @__PURE__ */ jsx113(
15949
+ /* @__PURE__ */ jsx114(
15907
15950
  PopupHighlighter,
15908
15951
  {
15909
15952
  highlighterClassName: "variable-placeholder",
@@ -16050,19 +16093,19 @@ import {
16050
16093
  } from "lucide-react";
16051
16094
  import {
16052
16095
  useCallback as useCallback9,
16053
- useEffect as useEffect78,
16096
+ useEffect as useEffect79,
16054
16097
  useMemo as useMemo13,
16055
16098
  useRef as useRef55,
16056
- useState as useState16
16099
+ useState as useState17
16057
16100
  } from "react";
16058
- import { jsx as jsx114 } from "react/jsx-runtime";
16101
+ import { jsx as jsx115 } from "react/jsx-runtime";
16059
16102
  function TextToolbarPlugin() {
16060
16103
  const { hasModule } = useBlockEditor();
16061
16104
  const [editor] = useLexicalComposerContext62();
16062
16105
  const popupToolbarRef = useRef55(null);
16063
16106
  const activeEditorRef = useRef55(void 0);
16064
16107
  const activeDecoratorRef = useRef55(void 0);
16065
- const [toolbarState, setToolbarState] = useState16({
16108
+ const [toolbarState, setToolbarState] = useState17({
16066
16109
  isBold: false,
16067
16110
  isItalic: false,
16068
16111
  isUnderline: false,
@@ -16077,7 +16120,7 @@ function TextToolbarPlugin() {
16077
16120
  textAlign: "left"
16078
16121
  });
16079
16122
  const selectedNodeRef = useRef55(null);
16080
- const [selectionType, setSelectionType] = useState16("paragraph");
16123
+ const [selectionType, setSelectionType] = useState17("paragraph");
16081
16124
  const formatText = (format) => {
16082
16125
  activeEditorRef.current?.update(() => {
16083
16126
  const selection = $getSelection14();
@@ -16325,7 +16368,7 @@ function TextToolbarPlugin() {
16325
16368
  }
16326
16369
  }
16327
16370
  };
16328
- useEffect78(() => {
16371
+ useEffect79(() => {
16329
16372
  return mergeRegister25(
16330
16373
  editor.registerCommand(
16331
16374
  TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -16475,7 +16518,7 @@ function TextToolbarPlugin() {
16475
16518
  popupToolbarRef.current.hideToolbar();
16476
16519
  }
16477
16520
  }
16478
- useEffect78(() => {
16521
+ useEffect79(() => {
16479
16522
  window.addEventListener("scroll", repositionPopupToolbar);
16480
16523
  window.addEventListener("resize", repositionPopupToolbar);
16481
16524
  document.addEventListener("selectstart", handleSelectionStart);
@@ -16808,7 +16851,7 @@ function TextToolbarPlugin() {
16808
16851
  }
16809
16852
  return resultList;
16810
16853
  }, [toolbarState, selectionType, activeEditorRef.current]);
16811
- return /* @__PURE__ */ jsx114(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
16854
+ return /* @__PURE__ */ jsx115(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
16812
16855
  }
16813
16856
 
16814
16857
  // src/plugins/TypeaheadMenuPlugin/renderCalloutModuleMenu.tsx
@@ -17280,7 +17323,7 @@ import { mergeRegister as mergeRegister26 } from "@lexical/utils";
17280
17323
  import {
17281
17324
  $createParagraphNode as $createParagraphNode22,
17282
17325
  $getNodeByKey as $getNodeByKey53,
17283
- $getRoot as $getRoot21,
17326
+ $getRoot as $getRoot20,
17284
17327
  $getSelection as $getSelection15,
17285
17328
  $isParagraphNode as $isParagraphNode7,
17286
17329
  $isRangeSelection as $isRangeSelection10,
@@ -17291,7 +17334,7 @@ import {
17291
17334
  KEY_ENTER_COMMAND as KEY_ENTER_COMMAND3,
17292
17335
  KEY_ESCAPE_COMMAND as KEY_ESCAPE_COMMAND3
17293
17336
  } from "lexical";
17294
- import { useEffect as useEffect79, useMemo as useMemo14, useRef as useRef56, useState as useState17 } from "react";
17337
+ import { useEffect as useEffect80, useMemo as useMemo14, useRef as useRef56, useState as useState18 } from "react";
17295
17338
 
17296
17339
  // src/plugins/TypeaheadMenuPlugin/renderFillInTheBlankMenu.tsx
17297
17340
  import {
@@ -17406,7 +17449,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
17406
17449
  }
17407
17450
 
17408
17451
  // src/plugins/TypeaheadMenuPlugin/TypeaheadMenuPlugin.tsx
17409
- import { jsx as jsx115 } from "react/jsx-runtime";
17452
+ import { jsx as jsx116 } from "react/jsx-runtime";
17410
17453
  function TypeaheadMenuPlugin() {
17411
17454
  const { hasModule, modulesNumber } = useBlockEditor();
17412
17455
  const [editor] = useLexicalComposerContext63();
@@ -17416,7 +17459,7 @@ function TypeaheadMenuPlugin() {
17416
17459
  const popupRef = useRef56(null);
17417
17460
  const targetNodeKeyRef = useRef56(void 0);
17418
17461
  const activeEditorRef = useRef56(void 0);
17419
- const [activeDecorator, setActiveDecorator] = useState17();
17462
+ const [activeDecorator, setActiveDecorator] = useState18();
17420
17463
  const handleUpdate = () => {
17421
17464
  activeEditorRef.current?.getEditorState().read(() => {
17422
17465
  const selection = $getSelection15();
@@ -17538,7 +17581,7 @@ function TypeaheadMenuPlugin() {
17538
17581
  }
17539
17582
  return false;
17540
17583
  };
17541
- useEffect79(() => {
17584
+ useEffect80(() => {
17542
17585
  return mergeRegister26(
17543
17586
  editor.registerCommand(
17544
17587
  TYPEAHEAD_MENU_COMMAND,
@@ -17597,7 +17640,7 @@ function TypeaheadMenuPlugin() {
17597
17640
  );
17598
17641
  });
17599
17642
  }
17600
- const rootNode = $getRoot21();
17643
+ const rootNode = $getRoot20();
17601
17644
  if (rootNode) {
17602
17645
  const childrenKeys = rootNode.getChildrenKeys();
17603
17646
  if (childrenKeys.length > 0) {
@@ -17689,7 +17732,7 @@ function TypeaheadMenuPlugin() {
17689
17732
  }
17690
17733
  return menuItems;
17691
17734
  }, [editor, modulesNumber, activeDecorator]);
17692
- return /* @__PURE__ */ jsx115(
17735
+ return /* @__PURE__ */ jsx116(
17693
17736
  PopupMenu,
17694
17737
  {
17695
17738
  ref: popupRef,
@@ -17705,11 +17748,11 @@ function TypeaheadMenuPlugin() {
17705
17748
  import {
17706
17749
  createContext as createContext2,
17707
17750
  useContext as useContext5,
17708
- useEffect as useEffect80,
17751
+ useEffect as useEffect81,
17709
17752
  useRef as useRef57,
17710
- useState as useState18
17753
+ useState as useState19
17711
17754
  } from "react";
17712
- import { jsx as jsx116 } from "react/jsx-runtime";
17755
+ import { jsx as jsx117 } from "react/jsx-runtime";
17713
17756
  var themeVariablesMap = {
17714
17757
  borderBase: "--be-border-base",
17715
17758
  fontSans: "--be-font-sans",
@@ -17727,8 +17770,8 @@ function ThemeProvider({
17727
17770
  children
17728
17771
  }) {
17729
17772
  const rootElementRef = useRef57(null);
17730
- const [effectiveTheme, setEffectiveTheme] = useState18("light");
17731
- useEffect80(() => {
17773
+ const [effectiveTheme, setEffectiveTheme] = useState19("light");
17774
+ useEffect81(() => {
17732
17775
  const mediaQuery = window.matchMedia(
17733
17776
  "(prefers-color-scheme: dark)"
17734
17777
  );
@@ -17743,14 +17786,14 @@ function ThemeProvider({
17743
17786
  mediaQuery.addEventListener("change", updateEffectiveTheme);
17744
17787
  return () => mediaQuery.removeEventListener("change", updateEffectiveTheme);
17745
17788
  }, [theme]);
17746
- useEffect80(() => {
17789
+ useEffect81(() => {
17747
17790
  rootElementRef.current?.classList.remove(
17748
17791
  "theme-light",
17749
17792
  "theme-dark"
17750
17793
  );
17751
17794
  rootElementRef.current?.classList.add(`theme-${effectiveTheme}`);
17752
17795
  }, [effectiveTheme]);
17753
- return /* @__PURE__ */ jsx116(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsx116(
17796
+ return /* @__PURE__ */ jsx117(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsx117(
17754
17797
  "div",
17755
17798
  {
17756
17799
  ref: rootElementRef,
@@ -17772,19 +17815,18 @@ function ThemeProvider({
17772
17815
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
17773
17816
  import { LexicalErrorBoundary as LexicalErrorBoundary9 } from "@lexical/react/LexicalErrorBoundary";
17774
17817
  import { HistoryPlugin as HistoryPlugin9 } from "@lexical/react/LexicalHistoryPlugin";
17775
- import { ListPlugin as ListPlugin3 } from "@lexical/react/LexicalListPlugin";
17818
+ import { ListPlugin as ListPlugin2 } from "@lexical/react/LexicalListPlugin";
17776
17819
  import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
17777
- import { RichTextPlugin as RichTextPlugin8 } from "@lexical/react/LexicalRichTextPlugin";
17778
- import { TabIndentationPlugin as TabIndentationPlugin3 } from "@lexical/react/LexicalTabIndentationPlugin";
17779
- import { Menu } from "lucide-react";
17820
+ import { RichTextPlugin as RichTextPlugin7 } from "@lexical/react/LexicalRichTextPlugin";
17821
+ import { TabIndentationPlugin as TabIndentationPlugin2 } from "@lexical/react/LexicalTabIndentationPlugin";
17780
17822
  import React24, {
17781
17823
  useCallback as useCallback11,
17782
17824
  useContext as useContext6,
17783
- useEffect as useEffect81,
17825
+ useEffect as useEffect82,
17784
17826
  useRef as useRef58,
17785
- useState as useState19
17827
+ useState as useState20
17786
17828
  } from "react";
17787
- import { jsx as jsx117, jsxs as jsxs43 } from "react/jsx-runtime";
17829
+ import { jsx as jsx118, jsxs as jsxs43 } from "react/jsx-runtime";
17788
17830
  var TOGGLE_EDITING_MODE = "TOGGLE_EDITING_MODE";
17789
17831
  var RESET_EDITING_MODE = "RESET_EDITING_MODE";
17790
17832
  var BlockEditorContext = React24.createContext(null);
@@ -17798,18 +17840,18 @@ function BlockEditor(props) {
17798
17840
  children,
17799
17841
  renderSettings
17800
17842
  } = props;
17801
- const [modulesNumber, setModulesNumber] = useState19(0);
17843
+ const [modulesNumber, setModulesNumber] = useState20(0);
17802
17844
  const editorModulesRef = useRef58({
17803
17845
  ...initialEditorRegistry
17804
17846
  });
17805
- const [settingsPanelSwitch, setSettingsPanelSwitch] = useState19("off");
17847
+ const [settingsPanelSwitch, setSettingsPanelSwitch] = useState20("off");
17806
17848
  const settingsPanelsRef = useRef58({});
17807
17849
  const nestedEditorsRef = useRef58({});
17808
17850
  const editorRef = useRef58(null);
17809
17851
  const drawerRef = useRef58(null);
17810
- const [isBlockEditorReady, setBlockEditorReady] = useState19(false);
17852
+ const [isBlockEditorReady, setBlockEditorReady] = useState20(false);
17811
17853
  const { historyState } = useSharedHistoryContext();
17812
- const [blockEditorStyleVars, setBlockEditorStyleVars] = useState19({
17854
+ const [blockEditorStyleVars, setBlockEditorStyleVars] = useState20({
17813
17855
  "--be-ol-list-style-type": "decimal"
17814
17856
  });
17815
17857
  const handleChange = useCallback11(
@@ -17821,7 +17863,7 @@ function BlockEditor(props) {
17821
17863
  },
17822
17864
  [onChange]
17823
17865
  );
17824
- useEffect81(() => {
17866
+ useEffect82(() => {
17825
17867
  if (editorState) {
17826
17868
  const parsedEditorState = editorRef.current?.parseEditorState(editorState);
17827
17869
  if (parsedEditorState) {
@@ -17832,7 +17874,7 @@ function BlockEditor(props) {
17832
17874
  }
17833
17875
  editorRef.current?.setEditable(editable);
17834
17876
  }, [editable, editorState]);
17835
- useEffect81(() => {
17877
+ useEffect82(() => {
17836
17878
  setBlockEditorReady(true);
17837
17879
  }, []);
17838
17880
  const registerModule = useCallback11(
@@ -17848,14 +17890,22 @@ function BlockEditor(props) {
17848
17890
  const openSettingsPanel = useCallback11(() => {
17849
17891
  setSettingsPanelSwitch("on");
17850
17892
  }, []);
17851
- const [editingMode, setEditingMode] = useState19({
17893
+ const autoOpenSettingsPanel = useCallback11(() => {
17894
+ setSettingsPanelSwitch((prevState) => {
17895
+ if (prevState === "off") {
17896
+ return "on";
17897
+ }
17898
+ return prevState;
17899
+ });
17900
+ }, []);
17901
+ const [editingMode, setEditingMode] = useState20({
17852
17902
  mode: "edit"
17853
17903
  });
17854
17904
  const editingModeDataCallbackRef = useRef58();
17855
17905
  const handleResetPreviewModeEvent = () => {
17856
17906
  setEditingMode({ mode: "edit" });
17857
17907
  };
17858
- useEffect81(() => {
17908
+ useEffect82(() => {
17859
17909
  if (editingMode.mode === "preview") {
17860
17910
  window.dispatchEvent(
17861
17911
  new CustomEvent(
@@ -17881,7 +17931,7 @@ function BlockEditor(props) {
17881
17931
  );
17882
17932
  }
17883
17933
  }, [editingMode]);
17884
- useEffect81(() => {
17934
+ useEffect82(() => {
17885
17935
  window.addEventListener(
17886
17936
  RESET_EDITING_MODE,
17887
17937
  handleResetPreviewModeEvent
@@ -17893,7 +17943,7 @@ function BlockEditor(props) {
17893
17943
  );
17894
17944
  };
17895
17945
  }, []);
17896
- return /* @__PURE__ */ jsx117(
17946
+ return /* @__PURE__ */ jsx118(
17897
17947
  BlockEditorContext.Provider,
17898
17948
  {
17899
17949
  value: {
@@ -17914,6 +17964,7 @@ function BlockEditor(props) {
17914
17964
  },
17915
17965
  settingsPanelSwitch,
17916
17966
  openSettingsPanel,
17967
+ autoOpenSettingsPanel,
17917
17968
  toggleSettingsPanelSwitch: () => {
17918
17969
  setSettingsPanelSwitch((prevState) => {
17919
17970
  if (drawerRef.current) {
@@ -17955,15 +18006,15 @@ function BlockEditor(props) {
17955
18006
  ...value
17956
18007
  });
17957
18008
  },
17958
- renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx117("div", {})
18009
+ renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx118("div", {})
17959
18010
  },
17960
- children: /* @__PURE__ */ jsx117(ThemeProvider, { theme, themeVariables: themeSettings, children: /* @__PURE__ */ jsx117(ResizeObserver, { children: /* @__PURE__ */ jsx117(
18011
+ children: /* @__PURE__ */ jsx118(ThemeProvider, { theme, themeVariables: themeSettings, children: /* @__PURE__ */ jsx118(ResizeObserver, { children: /* @__PURE__ */ jsx118(
17961
18012
  "article",
17962
18013
  {
17963
18014
  className: "be-article",
17964
18015
  style: { ...blockEditorStyleVars },
17965
- children: /* @__PURE__ */ jsx117(SharedHistoryContext, { children: /* @__PURE__ */ jsxs43(NodeProvider, { children: [
17966
- /* @__PURE__ */ jsx117(
18016
+ children: /* @__PURE__ */ jsx118(SharedHistoryContext, { children: /* @__PURE__ */ jsxs43(NodeProvider, { children: [
18017
+ /* @__PURE__ */ jsx118(
17967
18018
  "main",
17968
18019
  {
17969
18020
  className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
@@ -17972,74 +18023,56 @@ function BlockEditor(props) {
17972
18023
  {
17973
18024
  initialConfig: { ...initialConfig },
17974
18025
  children: [
17975
- /* @__PURE__ */ jsx117(
18026
+ /* @__PURE__ */ jsx118(
17976
18027
  EditorRefPlugin,
17977
18028
  {
17978
18029
  onMountRef: (editor) => editorRef.current = editor
17979
18030
  }
17980
18031
  ),
17981
- /* @__PURE__ */ jsx117(AutoFocusPlugin, {}),
17982
- /* @__PURE__ */ jsx117(AutoBottomParagraphPlugin, {}),
17983
- /* @__PURE__ */ jsx117(
18032
+ /* @__PURE__ */ jsx118(AutoFocusPlugin, {}),
18033
+ /* @__PURE__ */ jsx118(AutoBottomParagraphPlugin, {}),
18034
+ /* @__PURE__ */ jsx118(
17984
18035
  HistoryPlugin9,
17985
18036
  {
17986
18037
  externalHistoryState: historyState
17987
18038
  }
17988
18039
  ),
17989
- /* @__PURE__ */ jsx117(
18040
+ /* @__PURE__ */ jsx118(
17990
18041
  OnChangePlugin,
17991
18042
  {
17992
18043
  onChange: handleChange,
17993
18044
  ignoreSelectionChange: true
17994
18045
  }
17995
18046
  ),
17996
- /* @__PURE__ */ jsx117(OnNestedChangePlugin, { onChange: handleChange }),
17997
- /* @__PURE__ */ jsx117(
17998
- RichTextPlugin8,
18047
+ /* @__PURE__ */ jsx118(OnNestedChangePlugin, { onChange: handleChange }),
18048
+ /* @__PURE__ */ jsx118(
18049
+ RichTextPlugin7,
17999
18050
  {
18000
- contentEditable: /* @__PURE__ */ jsx117(ContentEditable, {}),
18051
+ contentEditable: /* @__PURE__ */ jsx118(ContentEditable, {}),
18001
18052
  placeholder: null,
18002
18053
  ErrorBoundary: LexicalErrorBoundary9
18003
18054
  }
18004
18055
  ),
18005
- /* @__PURE__ */ jsx117(NodePastePlugin, {}),
18006
- /* @__PURE__ */ jsx117(ListPlugin3, {}),
18007
- /* @__PURE__ */ jsx117(ListLevelLimitPlugin, {}),
18008
- /* @__PURE__ */ jsx117(TabIndentationPlugin3, {}),
18056
+ /* @__PURE__ */ jsx118(NodePastePlugin, {}),
18057
+ /* @__PURE__ */ jsx118(ListPlugin2, {}),
18058
+ /* @__PURE__ */ jsx118(ListLevelLimitPlugin, {}),
18059
+ /* @__PURE__ */ jsx118(TabIndentationPlugin2, {}),
18009
18060
  children,
18010
- /* @__PURE__ */ jsx117(TypeaheadMenuPlugin, {}),
18011
- /* @__PURE__ */ jsx117(TypeaheadMenuAgentPlugin, {}),
18012
- /* @__PURE__ */ jsx117(NodeMouseAnchorPlugin, {}),
18013
- /* @__PURE__ */ jsx117(NodeMousePlugin, {}),
18014
- /* @__PURE__ */ jsx117(TextToolbarPlugin, {}),
18015
- /* @__PURE__ */ jsx117(TextToolbarAgentPlugin, {}),
18016
- /* @__PURE__ */ jsx117(TypeaheadVariableAgentPlugin, {}),
18017
- /* @__PURE__ */ jsx117(VariableComponentPlugin, {}),
18018
- /* @__PURE__ */ jsx117(MarkdownPlugin, {})
18061
+ /* @__PURE__ */ jsx118(TypeaheadMenuPlugin, {}),
18062
+ /* @__PURE__ */ jsx118(TypeaheadMenuAgentPlugin, {}),
18063
+ /* @__PURE__ */ jsx118(NodeMouseAnchorPlugin, {}),
18064
+ /* @__PURE__ */ jsx118(NodeMousePlugin, {}),
18065
+ /* @__PURE__ */ jsx118(TextToolbarPlugin, {}),
18066
+ /* @__PURE__ */ jsx118(TextToolbarAgentPlugin, {}),
18067
+ /* @__PURE__ */ jsx118(TypeaheadVariableAgentPlugin, {}),
18068
+ /* @__PURE__ */ jsx118(VariableComponentPlugin, {}),
18069
+ /* @__PURE__ */ jsx118(MarkdownPlugin, {})
18019
18070
  ]
18020
18071
  }
18021
18072
  )
18022
18073
  }
18023
18074
  ),
18024
- /* @__PURE__ */ jsx117(
18025
- "nav",
18026
- {
18027
- ref: drawerRef,
18028
- className: settingsPanelSwitch === "on" ? "shown" : "hidden",
18029
- children: settingsPanelSwitch === "off" && /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(
18030
- Button,
18031
- {
18032
- className: "cancel",
18033
- variant: "text",
18034
- size: "large",
18035
- StartIcon: Menu,
18036
- onClick: () => {
18037
- setSettingsPanelSwitch("on");
18038
- }
18039
- }
18040
- ) })
18041
- }
18042
- )
18075
+ /* @__PURE__ */ jsx118(Drawer, { ref: drawerRef })
18043
18076
  ] }) })
18044
18077
  }
18045
18078
  ) }) })
@@ -18057,23 +18090,23 @@ var useBlockEditor = () => {
18057
18090
  };
18058
18091
 
18059
18092
  // src/modules/Callout.tsx
18060
- import { useEffect as useEffect82 } from "react";
18061
- import { jsx as jsx118 } from "react/jsx-runtime";
18093
+ import { useEffect as useEffect83 } from "react";
18094
+ import { jsx as jsx119 } from "react/jsx-runtime";
18062
18095
  function Callout() {
18063
18096
  const { registerModule } = useBlockEditor();
18064
- useEffect82(() => {
18097
+ useEffect83(() => {
18065
18098
  registerModule("Callout");
18066
18099
  }, [registerModule]);
18067
- return /* @__PURE__ */ jsx118(CalloutBoxPlugin, {});
18100
+ return /* @__PURE__ */ jsx119(CalloutBoxPlugin, {});
18068
18101
  }
18069
18102
 
18070
18103
  // src/plugins/TreeViewPlugin/index.tsx
18071
18104
  import { useLexicalComposerContext as useLexicalComposerContext64 } from "@lexical/react/LexicalComposerContext";
18072
18105
  import { TreeView } from "@lexical/react/LexicalTreeView";
18073
- import { jsx as jsx119 } from "react/jsx-runtime";
18106
+ import { jsx as jsx120 } from "react/jsx-runtime";
18074
18107
  function TreeViewPlugin() {
18075
18108
  const [editor] = useLexicalComposerContext64();
18076
- return /* @__PURE__ */ jsx119(
18109
+ return /* @__PURE__ */ jsx120(
18077
18110
  TreeView,
18078
18111
  {
18079
18112
  viewClassName: "tree-view-output",
@@ -18088,26 +18121,26 @@ function TreeViewPlugin() {
18088
18121
  }
18089
18122
 
18090
18123
  // src/modules/Debug.tsx
18091
- import { useEffect as useEffect83 } from "react";
18092
- import { jsx as jsx120 } from "react/jsx-runtime";
18124
+ import { useEffect as useEffect84 } from "react";
18125
+ import { jsx as jsx121 } from "react/jsx-runtime";
18093
18126
  function Debug() {
18094
18127
  const { registerModule } = useBlockEditor();
18095
- useEffect83(() => {
18128
+ useEffect84(() => {
18096
18129
  registerModule("Debug");
18097
18130
  }, [registerModule]);
18098
- return /* @__PURE__ */ jsx120(TreeViewPlugin, {});
18131
+ return /* @__PURE__ */ jsx121(TreeViewPlugin, {});
18099
18132
  }
18100
18133
 
18101
18134
  // src/modules/Image.tsx
18102
- import { useEffect as useEffect84 } from "react";
18103
- import { Fragment as Fragment46, jsx as jsx121 } from "react/jsx-runtime";
18135
+ import { useEffect as useEffect85 } from "react";
18136
+ import { Fragment as Fragment46, jsx as jsx122 } from "react/jsx-runtime";
18104
18137
  function Image(props) {
18105
18138
  const { imageSettings } = props;
18106
18139
  const { registerModule } = useBlockEditor();
18107
- useEffect84(() => {
18140
+ useEffect85(() => {
18108
18141
  registerModule("Image");
18109
18142
  }, [registerModule]);
18110
- return /* @__PURE__ */ jsx121(Fragment46, { children: /* @__PURE__ */ jsx121(ImagePlugin, { imageSettings }) });
18143
+ return /* @__PURE__ */ jsx122(Fragment46, { children: /* @__PURE__ */ jsx122(ImagePlugin, { imageSettings }) });
18111
18144
  }
18112
18145
 
18113
18146
  // src/plugins/LinkToolbarPlugin/LinkToolbarPlugin.tsx
@@ -18127,14 +18160,14 @@ import {
18127
18160
  } from "lexical";
18128
18161
  import debounce6 from "lodash-es/debounce";
18129
18162
  import { Pencil, Trash2 as Trash24, X } from "lucide-react";
18130
- import { useCallback as useCallback12, useEffect as useEffect85, useRef as useRef59, useState as useState20 } from "react";
18131
- import { jsx as jsx122, jsxs as jsxs44 } from "react/jsx-runtime";
18163
+ import { useCallback as useCallback12, useEffect as useEffect86, useRef as useRef59, useState as useState21 } from "react";
18164
+ import { jsx as jsx123, jsxs as jsxs44 } from "react/jsx-runtime";
18132
18165
  function LinkToolbarPlugin() {
18133
18166
  const [editor] = useLexicalComposerContext65();
18134
18167
  const popupToolbarRef = useRef59(null);
18135
18168
  const linkTextNodeRef = useRef59();
18136
18169
  const linkTextNodeOffsetRef = useRef59();
18137
- const [linkNode, setLinkNode] = useState20();
18170
+ const [linkNode, setLinkNode] = useState21();
18138
18171
  const linkNodeElementRef = useRef59();
18139
18172
  const activeEditorRef = useRef59();
18140
18173
  const handleClose = () => {
@@ -18154,7 +18187,7 @@ function LinkToolbarPlugin() {
18154
18187
  }, 10),
18155
18188
  [editor]
18156
18189
  );
18157
- useEffect85(() => {
18190
+ useEffect86(() => {
18158
18191
  return mergeRegister27(
18159
18192
  editor.registerCommand(
18160
18193
  CLICK_COMMAND13,
@@ -18228,7 +18261,7 @@ function LinkToolbarPlugin() {
18228
18261
  )
18229
18262
  );
18230
18263
  }, [editor]);
18231
- useEffect85(() => {
18264
+ useEffect86(() => {
18232
18265
  window.addEventListener("scroll", repositionPopupToolbar);
18233
18266
  window.addEventListener("resize", repositionPopupToolbar);
18234
18267
  return () => {
@@ -18238,7 +18271,7 @@ function LinkToolbarPlugin() {
18238
18271
  }, [editor]);
18239
18272
  const linkUrl = linkNode?.linkUrl;
18240
18273
  const linkTitle = linkNode?.linkUrl;
18241
- return /* @__PURE__ */ jsx122(
18274
+ return /* @__PURE__ */ jsx123(
18242
18275
  PopupToolbar,
18243
18276
  {
18244
18277
  ref: popupToolbarRef,
@@ -18256,23 +18289,23 @@ function LinkToolbarPlugin() {
18256
18289
  padding: "var(--sl-spacing-2x-small) var(--sl-spacing-x-small) var(--sl-spacing-2x-small) var(--sl-spacing-medium)"
18257
18290
  },
18258
18291
  children: [
18259
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx122(
18292
+ /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx123(
18260
18293
  "sl-tooltip",
18261
18294
  {
18262
18295
  style: { "--show-delay": "1800" },
18263
18296
  hoist: true,
18264
18297
  content: linkUrl || "[Empty URL]",
18265
- children: /* @__PURE__ */ jsx122("span", { className: "line-short-20", children: linkTitle })
18298
+ children: /* @__PURE__ */ jsx123("span", { className: "line-short-20", children: linkTitle })
18266
18299
  }
18267
18300
  ) }) }),
18268
18301
  /* @__PURE__ */ jsxs44(Stack, { className: "stack__row", children: [
18269
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
18302
+ /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
18270
18303
  "sl-tooltip",
18271
18304
  {
18272
18305
  style: { "--show-delay": "1800" },
18273
18306
  hoist: "hoist",
18274
18307
  content: "Edit Link",
18275
- children: /* @__PURE__ */ jsx122(
18308
+ children: /* @__PURE__ */ jsx123(
18276
18309
  Button,
18277
18310
  {
18278
18311
  size: "small",
@@ -18311,13 +18344,13 @@ function LinkToolbarPlugin() {
18311
18344
  )
18312
18345
  }
18313
18346
  ) }),
18314
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
18347
+ /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
18315
18348
  "sl-tooltip",
18316
18349
  {
18317
18350
  style: { "--show-delay": "1800" },
18318
18351
  hoist: "hoist",
18319
18352
  content: "Remove Link",
18320
- children: /* @__PURE__ */ jsx122(
18353
+ children: /* @__PURE__ */ jsx123(
18321
18354
  Button,
18322
18355
  {
18323
18356
  size: "small",
@@ -18352,13 +18385,13 @@ function LinkToolbarPlugin() {
18352
18385
  )
18353
18386
  }
18354
18387
  ) }),
18355
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
18388
+ /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
18356
18389
  "sl-tooltip",
18357
18390
  {
18358
18391
  style: { "--show-delay": "1800" },
18359
18392
  hoist: "hoist",
18360
18393
  content: "Close",
18361
- children: /* @__PURE__ */ jsx122(
18394
+ children: /* @__PURE__ */ jsx123(
18362
18395
  Button,
18363
18396
  {
18364
18397
  size: "small",
@@ -18380,16 +18413,16 @@ function LinkToolbarPlugin() {
18380
18413
  }
18381
18414
 
18382
18415
  // src/modules/Link.tsx
18383
- import { useEffect as useEffect86 } from "react";
18384
- import { Fragment as Fragment47, jsx as jsx123, jsxs as jsxs45 } from "react/jsx-runtime";
18416
+ import { useEffect as useEffect87 } from "react";
18417
+ import { Fragment as Fragment47, jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
18385
18418
  function Link() {
18386
18419
  const { registerModule } = useBlockEditor();
18387
- useEffect86(() => {
18420
+ useEffect87(() => {
18388
18421
  registerModule("Link");
18389
18422
  }, [registerModule]);
18390
18423
  return /* @__PURE__ */ jsxs45(Fragment47, { children: [
18391
- /* @__PURE__ */ jsx123(LinkEditorPlugin, {}),
18392
- /* @__PURE__ */ jsx123(LinkToolbarPlugin, {})
18424
+ /* @__PURE__ */ jsx124(LinkEditorPlugin, {}),
18425
+ /* @__PURE__ */ jsx124(LinkToolbarPlugin, {})
18393
18426
  ] });
18394
18427
  }
18395
18428
 
@@ -18403,12 +18436,12 @@ import {
18403
18436
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR15,
18404
18437
  createCommand as createCommand20
18405
18438
  } from "lexical";
18406
- import { useEffect as useEffect87 } from "react";
18407
- import { Fragment as Fragment48, jsx as jsx124 } from "react/jsx-runtime";
18439
+ import { useEffect as useEffect88 } from "react";
18440
+ import { Fragment as Fragment48, jsx as jsx125 } from "react/jsx-runtime";
18408
18441
  var INSERT_ESSAY_QUESTION_COMMAND = createCommand20("INSERT_ESSAY_QUESTION_COMMAND");
18409
18442
  function EssayQuestionPlugin() {
18410
18443
  const [editor] = useLexicalComposerContext66();
18411
- useEffect87(() => {
18444
+ useEffect88(() => {
18412
18445
  return mergeRegister28(
18413
18446
  editor.registerCommand(
18414
18447
  INSERT_ESSAY_QUESTION_COMMAND,
@@ -18442,13 +18475,13 @@ function EssayQuestionPlugin() {
18442
18475
  )
18443
18476
  );
18444
18477
  }, [editor]);
18445
- return /* @__PURE__ */ jsx124(Fragment48, {});
18478
+ return /* @__PURE__ */ jsx125(Fragment48, {});
18446
18479
  }
18447
18480
 
18448
18481
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
18449
18482
  import { useLexicalComposerContext as useLexicalComposerContext67 } from "@lexical/react/LexicalComposerContext";
18450
18483
  import { $getNodeByKey as $getNodeByKey55 } from "lexical";
18451
- import { useEffect as useEffect88, useRef as useRef60, useState as useState21 } from "react";
18484
+ import { useEffect as useEffect89, useRef as useRef60, useState as useState22 } from "react";
18452
18485
 
18453
18486
  // src/plugins/FinancialStatementQuestionPlugin/validatePointslnput.ts
18454
18487
  function validatePointsInput6(input) {
@@ -18470,13 +18503,13 @@ function validatePointsInput6(input) {
18470
18503
  }
18471
18504
 
18472
18505
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
18473
- import { jsx as jsx125 } from "react/jsx-runtime";
18506
+ import { jsx as jsx126 } from "react/jsx-runtime";
18474
18507
  function FinancialStatementQuestionSettings(props) {
18475
18508
  const { nodeKey } = props;
18476
18509
  const [editor] = useLexicalComposerContext67();
18477
18510
  const pointsTextInputRef = useRef60(null);
18478
- const [foundNode, setFoundNode] = useState21();
18479
- useEffect88(() => {
18511
+ const [foundNode, setFoundNode] = useState22();
18512
+ useEffect89(() => {
18480
18513
  if (nodeKey) {
18481
18514
  editor.getEditorState().read(() => {
18482
18515
  const fillInTheBlankNode = $getNodeByKey55(nodeKey);
@@ -18489,7 +18522,7 @@ function FinancialStatementQuestionSettings(props) {
18489
18522
  if (!foundNode) {
18490
18523
  return null;
18491
18524
  }
18492
- return /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125(
18525
+ return /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126(
18493
18526
  TextInput,
18494
18527
  {
18495
18528
  ref: pointsTextInputRef,
@@ -18525,14 +18558,14 @@ import {
18525
18558
  $createNodeSelection as $createNodeSelection20,
18526
18559
  $createParagraphNode as $createParagraphNode23,
18527
18560
  $getNodeByKey as $getNodeByKey56,
18528
- $getRoot as $getRoot22,
18561
+ $getRoot as $getRoot21,
18529
18562
  $setSelection as $setSelection24,
18530
18563
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR16,
18531
18564
  createCommand as createCommand21,
18532
18565
  createEditor as createEditor9
18533
18566
  } from "lexical";
18534
- import { useEffect as useEffect89, useRef as useRef61 } from "react";
18535
- import { Fragment as Fragment49, jsx as jsx126, jsxs as jsxs46 } from "react/jsx-runtime";
18567
+ import { useEffect as useEffect90, useRef as useRef61 } from "react";
18568
+ import { Fragment as Fragment49, jsx as jsx127, jsxs as jsxs46 } from "react/jsx-runtime";
18536
18569
  var INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND = createCommand21("INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND");
18537
18570
  function FinancialStatementQuestionPlugin() {
18538
18571
  const {
@@ -18543,7 +18576,7 @@ function FinancialStatementQuestionPlugin() {
18543
18576
  } = useBlockEditor();
18544
18577
  const [editor] = useLexicalComposerContext68();
18545
18578
  const settingsPanelStickyRef = useRef61(null);
18546
- useEffect89(() => {
18579
+ useEffect90(() => {
18547
18580
  return mergeRegister29(
18548
18581
  editor.registerCommand(
18549
18582
  INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND,
@@ -18556,7 +18589,7 @@ function FinancialStatementQuestionPlugin() {
18556
18589
  if (targetNode) {
18557
18590
  const headerEditor = createEditor9();
18558
18591
  headerEditor.update(() => {
18559
- const root = $getRoot22();
18592
+ const root = $getRoot21();
18560
18593
  const paragraph = $createParagraphNode23();
18561
18594
  root.append(paragraph);
18562
18595
  });
@@ -18587,7 +18620,7 @@ function FinancialStatementQuestionPlugin() {
18587
18620
  )
18588
18621
  );
18589
18622
  }, [editor]);
18590
- useEffect89(() => {
18623
+ useEffect90(() => {
18591
18624
  if (isBlockEditorReady) {
18592
18625
  if (settingsPanelStickyRef.current) {
18593
18626
  registerSettingsPanel(
@@ -18598,20 +18631,20 @@ function FinancialStatementQuestionPlugin() {
18598
18631
  }
18599
18632
  }, [isBlockEditorReady]);
18600
18633
  return /* @__PURE__ */ jsxs46(Fragment49, { children: [
18601
- drawer && /* @__PURE__ */ jsx126(
18634
+ drawer && /* @__PURE__ */ jsx127(
18602
18635
  StickyToPosition,
18603
18636
  {
18604
18637
  ref: settingsPanelStickyRef,
18605
18638
  container: drawer,
18606
18639
  children: (data, position, isVisible) => {
18607
- return /* @__PURE__ */ jsx126("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx126(
18640
+ return /* @__PURE__ */ jsx127("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx127(
18608
18641
  SettingsCard,
18609
18642
  {
18610
18643
  isVisible: !!isVisible,
18611
18644
  container: drawer,
18612
18645
  title: "Financial Statement Settings",
18613
18646
  onClose: toggleSettingsPanelSwitch,
18614
- children: isVisible && /* @__PURE__ */ jsx126(
18647
+ children: isVisible && /* @__PURE__ */ jsx127(
18615
18648
  FinancialStatementQuestionSettings,
18616
18649
  {
18617
18650
  nodeKey: data.nodeKey
@@ -18623,36 +18656,36 @@ function FinancialStatementQuestionPlugin() {
18623
18656
  }
18624
18657
  }
18625
18658
  ),
18626
- /* @__PURE__ */ jsx126(FillInTheBlankSpaceSettingsPlugin, {})
18659
+ /* @__PURE__ */ jsx127(FillInTheBlankSpaceSettingsPlugin, {})
18627
18660
  ] });
18628
18661
  }
18629
18662
 
18630
18663
  // src/modules/Questions.tsx
18631
- import { useEffect as useEffect90 } from "react";
18632
- import { Fragment as Fragment50, jsx as jsx127, jsxs as jsxs47 } from "react/jsx-runtime";
18664
+ import { useEffect as useEffect91 } from "react";
18665
+ import { Fragment as Fragment50, jsx as jsx128, jsxs as jsxs47 } from "react/jsx-runtime";
18633
18666
  function Questions() {
18634
18667
  const { registerModule } = useBlockEditor();
18635
- useEffect90(() => {
18668
+ useEffect91(() => {
18636
18669
  registerModule("Questions");
18637
18670
  }, [registerModule]);
18638
18671
  return /* @__PURE__ */ jsxs47(Fragment50, { children: [
18639
- /* @__PURE__ */ jsx127(MultipleOptionQuestionPlugin, {}),
18640
- /* @__PURE__ */ jsx127(ShortAnswerQuestionPlugin, {}),
18641
- /* @__PURE__ */ jsx127(MatchingQuestionPlugin, {}),
18642
- /* @__PURE__ */ jsx127(FillInTheBlankQuestionPlugin, {}),
18643
- /* @__PURE__ */ jsx127(JournalEntryQuestionPlugin, {}),
18644
- /* @__PURE__ */ jsx127(FinancialStatementQuestionPlugin, {}),
18645
- /* @__PURE__ */ jsx127(EssayQuestionPlugin, {})
18672
+ /* @__PURE__ */ jsx128(MultipleOptionQuestionPlugin, {}),
18673
+ /* @__PURE__ */ jsx128(ShortAnswerQuestionPlugin, {}),
18674
+ /* @__PURE__ */ jsx128(MatchingQuestionPlugin, {}),
18675
+ /* @__PURE__ */ jsx128(FillInTheBlankQuestionPlugin, {}),
18676
+ /* @__PURE__ */ jsx128(JournalEntryQuestionPlugin, {}),
18677
+ /* @__PURE__ */ jsx128(FinancialStatementQuestionPlugin, {}),
18678
+ /* @__PURE__ */ jsx128(EssayQuestionPlugin, {})
18646
18679
  ] });
18647
18680
  }
18648
18681
 
18649
18682
  // src/modules/SettingsPanel.tsx
18650
- import { useEffect as useEffect91 } from "react";
18651
- import { jsx as jsx128 } from "react/jsx-runtime";
18683
+ import { useEffect as useEffect92 } from "react";
18684
+ import { jsx as jsx129 } from "react/jsx-runtime";
18652
18685
  function SettingsPanel(props) {
18653
18686
  const { defaultOpen = true } = props;
18654
18687
  const { registerModule, openSettingsPanel } = useBlockEditor();
18655
- useEffect91(() => {
18688
+ useEffect92(() => {
18656
18689
  registerModule("SettingsPanel");
18657
18690
  setTimeout(() => {
18658
18691
  if (defaultOpen) {
@@ -18660,11 +18693,11 @@ function SettingsPanel(props) {
18660
18693
  }
18661
18694
  }, 50);
18662
18695
  }, [registerModule, defaultOpen, openSettingsPanel]);
18663
- return /* @__PURE__ */ jsx128(SettingsPanelPlugin, {});
18696
+ return /* @__PURE__ */ jsx129(SettingsPanelPlugin, {});
18664
18697
  }
18665
18698
 
18666
18699
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
18667
- import { useEffect as useEffect93, useRef as useRef63 } from "react";
18700
+ import { useEffect as useEffect94, useRef as useRef63 } from "react";
18668
18701
 
18669
18702
  // src/plugins/VariablesPlugin/VariableSettings.tsx
18670
18703
  import { useLexicalComposerContext as useLexicalComposerContext69 } from "@lexical/react/LexicalComposerContext";
@@ -18674,12 +18707,12 @@ import {
18674
18707
  } from "lexical";
18675
18708
  import { Pencil as Pencil2, Save, Trash2 as Trash25 } from "lucide-react";
18676
18709
  import {
18677
- useEffect as useEffect92,
18710
+ useEffect as useEffect93,
18678
18711
  useMemo as useMemo15,
18679
18712
  useRef as useRef62,
18680
- useState as useState22
18713
+ useState as useState23
18681
18714
  } from "react";
18682
- import { Fragment as Fragment51, jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
18715
+ import { Fragment as Fragment51, jsx as jsx130, jsxs as jsxs48 } from "react/jsx-runtime";
18683
18716
  var controlGridStyle = {
18684
18717
  width: "100%",
18685
18718
  display: "flex",
@@ -18713,10 +18746,10 @@ function VariableSettings(props) {
18713
18746
  const { variableList, onRenamed } = useVariables();
18714
18747
  const [editor] = useLexicalComposerContext69();
18715
18748
  const activeEditorRef = useRef62();
18716
- const [currentVariableNode, setCurrentVariableNode] = useState22();
18717
- const [isSettingsEditingMode, setSettingsEditingMode] = useState22(false);
18749
+ const [currentVariableNode, setCurrentVariableNode] = useState23();
18750
+ const [isSettingsEditingMode, setSettingsEditingMode] = useState23(false);
18718
18751
  const variableNameInputRef = useRef62(null);
18719
- useEffect92(() => {
18752
+ useEffect93(() => {
18720
18753
  if (nodeKey) {
18721
18754
  activeEditorRef.current = nestedEditorId ? getNestedEditor(nestedEditorId) || editor : editor;
18722
18755
  if (activeEditorRef.current) {
@@ -18902,7 +18935,7 @@ function VariableSettings(props) {
18902
18935
  return null;
18903
18936
  }
18904
18937
  return /* @__PURE__ */ jsxs48(Fragment51, { children: [
18905
- /* @__PURE__ */ jsx129("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx129(
18938
+ /* @__PURE__ */ jsx130("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx130(
18906
18939
  Button,
18907
18940
  {
18908
18941
  className: "button__fullwidth",
@@ -18922,9 +18955,9 @@ function VariableSettings(props) {
18922
18955
  }
18923
18956
  ) }),
18924
18957
  /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18925
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Name" }),
18958
+ /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Name" }),
18926
18959
  /* @__PURE__ */ jsxs48("div", { style: controlGridStyle, children: [
18927
- /* @__PURE__ */ jsx129("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx129(
18960
+ /* @__PURE__ */ jsx130("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx130(
18928
18961
  "form",
18929
18962
  {
18930
18963
  onSubmit: (e) => {
@@ -18932,7 +18965,7 @@ function VariableSettings(props) {
18932
18965
  e.preventDefault();
18933
18966
  updateVariableName();
18934
18967
  },
18935
- children: /* @__PURE__ */ jsx129(
18968
+ children: /* @__PURE__ */ jsx130(
18936
18969
  TextInput,
18937
18970
  {
18938
18971
  ref: variableNameInputRef,
@@ -18944,7 +18977,7 @@ function VariableSettings(props) {
18944
18977
  }
18945
18978
  )
18946
18979
  }
18947
- ) : /* @__PURE__ */ jsx129(
18980
+ ) : /* @__PURE__ */ jsx130(
18948
18981
  DropdownButton,
18949
18982
  {
18950
18983
  className: "button__fullwidth button__left_aligned",
@@ -18957,7 +18990,7 @@ function VariableSettings(props) {
18957
18990
  menu: variablesMenu
18958
18991
  }
18959
18992
  ) }),
18960
- /* @__PURE__ */ jsx129("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx129(
18993
+ /* @__PURE__ */ jsx130("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx130(
18961
18994
  Button,
18962
18995
  {
18963
18996
  StartIcon: Save,
@@ -18965,7 +18998,7 @@ function VariableSettings(props) {
18965
18998
  size: "small",
18966
18999
  onClick: updateVariableName
18967
19000
  }
18968
- ) : /* @__PURE__ */ jsx129(
19001
+ ) : /* @__PURE__ */ jsx130(
18969
19002
  Button,
18970
19003
  {
18971
19004
  StartIcon: Pencil2,
@@ -18979,8 +19012,8 @@ function VariableSettings(props) {
18979
19012
  ] })
18980
19013
  ] }),
18981
19014
  /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18982
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Type" }),
18983
- /* @__PURE__ */ jsx129(
19015
+ /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Type" }),
19016
+ /* @__PURE__ */ jsx130(
18984
19017
  DropdownButton,
18985
19018
  {
18986
19019
  className: "button__fullwidth button__left_aligned",
@@ -18995,8 +19028,8 @@ function VariableSettings(props) {
18995
19028
  )
18996
19029
  ] }),
18997
19030
  currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18998
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Format" }),
18999
- /* @__PURE__ */ jsx129(
19031
+ /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Format" }),
19032
+ /* @__PURE__ */ jsx130(
19000
19033
  DropdownButton,
19001
19034
  {
19002
19035
  className: "button__fullwidth button__left_aligned",
@@ -19010,7 +19043,7 @@ function VariableSettings(props) {
19010
19043
  }
19011
19044
  )
19012
19045
  ] }),
19013
- /* @__PURE__ */ jsx129("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx129(
19046
+ /* @__PURE__ */ jsx130("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx130(
19014
19047
  Button,
19015
19048
  {
19016
19049
  size: "small",
@@ -19052,7 +19085,7 @@ function VariableSettings(props) {
19052
19085
  }
19053
19086
 
19054
19087
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
19055
- import { Fragment as Fragment52, jsx as jsx130 } from "react/jsx-runtime";
19088
+ import { Fragment as Fragment52, jsx as jsx131 } from "react/jsx-runtime";
19056
19089
  function VariableSettingsPlugin() {
19057
19090
  const {
19058
19091
  registerSettingsPanel,
@@ -19061,7 +19094,7 @@ function VariableSettingsPlugin() {
19061
19094
  toggleSettingsPanelSwitch
19062
19095
  } = useBlockEditor();
19063
19096
  const settingsPanelStickyRef = useRef63(null);
19064
- useEffect93(() => {
19097
+ useEffect94(() => {
19065
19098
  if (isBlockEditorReady) {
19066
19099
  if (settingsPanelStickyRef.current) {
19067
19100
  registerSettingsPanel(
@@ -19071,20 +19104,20 @@ function VariableSettingsPlugin() {
19071
19104
  }
19072
19105
  }
19073
19106
  }, [isBlockEditorReady]);
19074
- return /* @__PURE__ */ jsx130(Fragment52, { children: drawer && /* @__PURE__ */ jsx130(
19107
+ return /* @__PURE__ */ jsx131(Fragment52, { children: drawer && /* @__PURE__ */ jsx131(
19075
19108
  StickyToPosition,
19076
19109
  {
19077
19110
  ref: settingsPanelStickyRef,
19078
19111
  container: drawer,
19079
19112
  children: (data, position, isVisible) => {
19080
- return /* @__PURE__ */ jsx130("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx130(
19113
+ return /* @__PURE__ */ jsx131("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx131(
19081
19114
  SettingsCard,
19082
19115
  {
19083
19116
  isVisible: !!isVisible,
19084
19117
  container: drawer,
19085
19118
  title: "Variable Settings",
19086
19119
  onClose: toggleSettingsPanelSwitch,
19087
- children: /* @__PURE__ */ jsx130(
19120
+ children: /* @__PURE__ */ jsx131(
19088
19121
  VariableSettings,
19089
19122
  {
19090
19123
  nodeKey: data.nodeKey,
@@ -19112,18 +19145,18 @@ import debounce7 from "lodash-es/debounce";
19112
19145
  import { Bold as Bold2, Italic as Italic2, Underline as Underline2 } from "lucide-react";
19113
19146
  import {
19114
19147
  useCallback as useCallback13,
19115
- useEffect as useEffect94,
19148
+ useEffect as useEffect95,
19116
19149
  useMemo as useMemo16,
19117
19150
  useRef as useRef64,
19118
- useState as useState23
19151
+ useState as useState24
19119
19152
  } from "react";
19120
- import { jsx as jsx131 } from "react/jsx-runtime";
19153
+ import { jsx as jsx132 } from "react/jsx-runtime";
19121
19154
  function VariableToolbarPlugin() {
19122
19155
  const [editor] = useLexicalComposerContext70();
19123
19156
  const popupToolbarRef = useRef64(null);
19124
19157
  const activeEditorRef = useRef64();
19125
19158
  const selectedNodeRef = useRef64();
19126
- const [toolbarState, setToolbarState] = useState23({
19159
+ const [toolbarState, setToolbarState] = useState24({
19127
19160
  isBold: false,
19128
19161
  isItalic: false,
19129
19162
  isUnderline: false
@@ -19226,7 +19259,7 @@ function VariableToolbarPlugin() {
19226
19259
  }, 10),
19227
19260
  [activeEditorRef.current]
19228
19261
  );
19229
- useEffect94(() => {
19262
+ useEffect95(() => {
19230
19263
  return mergeRegister30(
19231
19264
  editor.registerCommand(
19232
19265
  VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -19266,7 +19299,7 @@ function VariableToolbarPlugin() {
19266
19299
  )
19267
19300
  );
19268
19301
  }, [editor]);
19269
- useEffect94(() => {
19302
+ useEffect95(() => {
19270
19303
  window.addEventListener("scroll", repositionPopupToolbar);
19271
19304
  window.addEventListener("resize", repositionPopupToolbar);
19272
19305
  return () => {
@@ -19310,19 +19343,19 @@ function VariableToolbarPlugin() {
19310
19343
  ];
19311
19344
  return resultList;
19312
19345
  }, [toolbarState]);
19313
- return /* @__PURE__ */ jsx131(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
19346
+ return /* @__PURE__ */ jsx132(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
19314
19347
  }
19315
19348
 
19316
19349
  // src/modules/Variables.tsx
19317
- import { useEffect as useEffect95 } from "react";
19318
- import { jsx as jsx132, jsxs as jsxs49 } from "react/jsx-runtime";
19350
+ import { useEffect as useEffect96 } from "react";
19351
+ import { jsx as jsx133, jsxs as jsxs49 } from "react/jsx-runtime";
19319
19352
  function Variables(props) {
19320
19353
  const { variablesSettings } = props;
19321
19354
  const { registerModule, setEditingModeDataCallback } = useBlockEditor();
19322
- useEffect95(() => {
19355
+ useEffect96(() => {
19323
19356
  registerModule("Variables");
19324
19357
  }, [registerModule]);
19325
- useEffect95(() => {
19358
+ useEffect96(() => {
19326
19359
  setEditingModeDataCallback(() => {
19327
19360
  return {
19328
19361
  variableValues: variablesSettings.getVariableValues()
@@ -19330,10 +19363,10 @@ function Variables(props) {
19330
19363
  });
19331
19364
  }, [variablesSettings, setEditingModeDataCallback]);
19332
19365
  return /* @__PURE__ */ jsxs49(VariablesProvider, { variablesSettings, children: [
19333
- /* @__PURE__ */ jsx132(TypeaheadVariablePlugin, {}),
19334
- /* @__PURE__ */ jsx132(VariableSettingsPlugin, {}),
19335
- /* @__PURE__ */ jsx132(VariableToolbarPlugin, {}),
19336
- /* @__PURE__ */ jsx132(VariableToolbarAgentPlugin, {})
19366
+ /* @__PURE__ */ jsx133(TypeaheadVariablePlugin, {}),
19367
+ /* @__PURE__ */ jsx133(VariableSettingsPlugin, {}),
19368
+ /* @__PURE__ */ jsx133(VariableToolbarPlugin, {}),
19369
+ /* @__PURE__ */ jsx133(VariableToolbarAgentPlugin, {})
19337
19370
  ] });
19338
19371
  }
19339
19372
  export {