@examind/block-editor 0.1.14 → 0.1.16

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.
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,37 @@ function humanReadableBytes(bytes) {
4472
4473
  return `${Math.round(bytes / Math.pow(1024, i))} ${sizes[i]}`;
4473
4474
  }
4474
4475
  }
4476
+ function getNumber(value) {
4477
+ if (typeof value === "number") {
4478
+ return Number.isNaN(value) ? void 0 : value;
4479
+ }
4480
+ if (typeof value === "string") {
4481
+ const trimmedStr = value.trim();
4482
+ if (trimmedStr === "") {
4483
+ return void 0;
4484
+ }
4485
+ const num = +trimmedStr;
4486
+ return Number.isNaN(num) ? void 0 : num;
4487
+ }
4488
+ if (typeof value === "boolean") {
4489
+ return value ? 1 : 0;
4490
+ }
4491
+ return void 0;
4492
+ }
4493
+ var formatNumber = (num, format) => {
4494
+ return format ? numeral(num).format(format) : autoFormatNumber(num);
4495
+ };
4496
+ var correctRoundingError = (num) => parseFloat(num.toPrecision(14));
4497
+ var autoFormatNumber = (num, options = {}) => {
4498
+ const correctedNum = correctRoundingError(num);
4499
+ const formatted = new Intl.NumberFormat("en-US", {
4500
+ maximumFractionDigits: 14,
4501
+ ...options
4502
+ }).format(correctedNum);
4503
+ if (Math.abs(correctedNum) < 1e4)
4504
+ return formatted.replace(/,/g, "");
4505
+ return formatted;
4506
+ };
4475
4507
 
4476
4508
  // src/plugins/ImagePlugin/ImagePlugin.tsx
4477
4509
  import { useLexicalComposerContext as useLexicalComposerContext18 } from "@lexical/react/LexicalComposerContext";
@@ -4607,15 +4639,15 @@ function ImageSettings(props) {
4607
4639
  },
4608
4640
  options: [
4609
4641
  {
4610
- id: "30%",
4642
+ id: "188px",
4611
4643
  label: "Small"
4612
4644
  },
4613
4645
  {
4614
- id: "50%",
4646
+ id: "375px",
4615
4647
  label: "Medium"
4616
4648
  },
4617
4649
  {
4618
- id: "70%",
4650
+ id: "563px",
4619
4651
  label: "Large"
4620
4652
  },
4621
4653
  {
@@ -4926,10 +4958,8 @@ var placeholderData = `data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w
4926
4958
  import { useLexicalComposerContext as useLexicalComposerContext19 } from "@lexical/react/LexicalComposerContext";
4927
4959
  import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
4928
4960
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
4929
- import { ListPlugin } from "@lexical/react/LexicalListPlugin";
4930
4961
  import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer";
4931
- import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
4932
- import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
4962
+ import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
4933
4963
  import { useLexicalNodeSelection as useLexicalNodeSelection2 } from "@lexical/react/useLexicalNodeSelection";
4934
4964
  import { mergeRegister as mergeRegister5 } from "@lexical/utils";
4935
4965
  import {
@@ -4966,9 +4996,6 @@ function ImageComponent(props) {
4966
4996
  if (root.getFirstChild() === null) {
4967
4997
  const paragraph = $createParagraphNode4();
4968
4998
  const textNode = $createTextNode3("Image caption");
4969
- textNode.setStyle(
4970
- "font-size: var(--sl-font-size-small); color: var(--sl-color-gray-500)"
4971
- );
4972
4999
  paragraph.append(textNode);
4973
5000
  paragraph.setFormat("center");
4974
5001
  root.append(paragraph);
@@ -5029,7 +5056,7 @@ function ImageComponent(props) {
5029
5056
  }
5030
5057
  );
5031
5058
  }
5032
- return /* @__PURE__ */ jsx47(Fragment19, { children: /* @__PURE__ */ jsxs16("div", { className: "image-box", style: { width }, children: [
5059
+ return /* @__PURE__ */ jsx47(Fragment19, { children: /* @__PURE__ */ jsxs16("div", { className: "image-box", style: { width, maxWidth: "100%" }, children: [
5033
5060
  src ? /* @__PURE__ */ jsx47(
5034
5061
  "img",
5035
5062
  {
@@ -5097,18 +5124,15 @@ function ImageComponent(props) {
5097
5124
  position: "relative"
5098
5125
  },
5099
5126
  children: /* @__PURE__ */ jsx47(LexicalNestedComposer, { initialEditor: caption, children: /* @__PURE__ */ jsxs16(NestedEditor, { nodeKey, children: [
5127
+ /* @__PURE__ */ jsx47(SettingsPanelNestedAgentPlugin, {}),
5100
5128
  /* @__PURE__ */ jsx47(
5101
- RichTextPlugin,
5129
+ PlainTextPlugin,
5102
5130
  {
5103
5131
  contentEditable: /* @__PURE__ */ jsx47(NestedContentEditable, {}),
5104
- placeholder: null,
5105
5132
  ErrorBoundary: LexicalErrorBoundary
5106
5133
  }
5107
5134
  ),
5108
- /* @__PURE__ */ jsx47(HistoryPlugin, { externalHistoryState: historyState }),
5109
- /* @__PURE__ */ jsx47(ListPlugin, {}),
5110
- /* @__PURE__ */ jsx47(TabIndentationPlugin, {}),
5111
- /* @__PURE__ */ jsx47(TextToolbarAgentPlugin, { decoratorNode: ImageNode })
5135
+ /* @__PURE__ */ jsx47(HistoryPlugin, { externalHistoryState: historyState })
5112
5136
  ] }) })
5113
5137
  }
5114
5138
  )
@@ -5116,10 +5140,8 @@ function ImageComponent(props) {
5116
5140
  }
5117
5141
 
5118
5142
  // src/plugins/ImagePlugin/ImageNode.tsx
5119
- import { $generateHtmlFromNodes } from "@lexical/html";
5120
5143
  import {
5121
5144
  $applyNodeReplacement as $applyNodeReplacement3,
5122
- $getRoot as $getRoot3,
5123
5145
  createEditor,
5124
5146
  DecoratorNode as DecoratorNode3
5125
5147
  } from "lexical";
@@ -5193,35 +5215,6 @@ var ImageNode = class _ImageNode extends DecoratorNode3 {
5193
5215
  }
5194
5216
  exportDOM() {
5195
5217
  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
5218
  return { element };
5226
5219
  }
5227
5220
  static importDOM() {
@@ -5522,7 +5515,15 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5522
5515
  this.__variable
5523
5516
  );
5524
5517
  if (this.__isPreviewMode) {
5525
- element.textContent = this.__variableValue || "[???]";
5518
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5519
+ if (variableAsNumber) {
5520
+ element.textContent = formatNumber(
5521
+ variableAsNumber,
5522
+ this.__variableFormat
5523
+ );
5524
+ } else {
5525
+ element.textContent = "[???]";
5526
+ }
5526
5527
  } else {
5527
5528
  element.textContent = this.__variable;
5528
5529
  }
@@ -5539,7 +5540,15 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5539
5540
  }
5540
5541
  updateDOM(_prevNode, dom, _config) {
5541
5542
  if (this.__isPreviewMode) {
5542
- dom.textContent = this.__variableValue || "[???]";
5543
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5544
+ if (variableAsNumber) {
5545
+ dom.textContent = formatNumber(
5546
+ variableAsNumber,
5547
+ this.__variableFormat
5548
+ );
5549
+ } else {
5550
+ dom.textContent = "[???]";
5551
+ }
5543
5552
  } else {
5544
5553
  dom.textContent = this.__variable;
5545
5554
  }
@@ -5772,7 +5781,7 @@ import { useLexicalComposerContext as useLexicalComposerContext22 } from "@lexic
5772
5781
  import { LexicalErrorBoundary as LexicalErrorBoundary2 } from "@lexical/react/LexicalErrorBoundary";
5773
5782
  import { HistoryPlugin as HistoryPlugin2 } from "@lexical/react/LexicalHistoryPlugin";
5774
5783
  import { LexicalNestedComposer as LexicalNestedComposer2 } from "@lexical/react/LexicalNestedComposer";
5775
- import { RichTextPlugin as RichTextPlugin2 } from "@lexical/react/LexicalRichTextPlugin";
5784
+ import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
5776
5785
  import {
5777
5786
  $createNodeSelection as $createNodeSelection3,
5778
5787
  $getNodeByKey as $getNodeByKey18,
@@ -5834,7 +5843,7 @@ function FinancialStatementQuestionComponent(props) {
5834
5843
  children: /* @__PURE__ */ jsx52(LexicalNestedComposer2, { initialEditor: header, children: /* @__PURE__ */ jsxs17(NestedEditor, { nodeKey, children: [
5835
5844
  /* @__PURE__ */ jsx52(SettingsPanelNestedAgentPlugin, {}),
5836
5845
  /* @__PURE__ */ jsx52(
5837
- RichTextPlugin2,
5846
+ RichTextPlugin,
5838
5847
  {
5839
5848
  contentEditable: /* @__PURE__ */ jsx52(NestedContentEditable, {}),
5840
5849
  ErrorBoundary: LexicalErrorBoundary2,
@@ -5931,7 +5940,7 @@ function FinancialStatementQuestionComponent(props) {
5931
5940
  children: /* @__PURE__ */ jsxs17(NestedEditor, { nodeKey, children: [
5932
5941
  /* @__PURE__ */ jsx52(SettingsPanelNestedAgentPlugin, {}),
5933
5942
  /* @__PURE__ */ jsx52(
5934
- RichTextPlugin2,
5943
+ RichTextPlugin,
5935
5944
  {
5936
5945
  contentEditable: /* @__PURE__ */ jsx52(NestedContentEditable, {}),
5937
5946
  ErrorBoundary: LexicalErrorBoundary2,
@@ -6188,7 +6197,7 @@ import { useLexicalComposerContext as useLexicalComposerContext23 } from "@lexic
6188
6197
  import {
6189
6198
  $createParagraphNode as $createParagraphNode5,
6190
6199
  $getNodeByKey as $getNodeByKey19,
6191
- $getRoot as $getRoot4
6200
+ $getRoot as $getRoot3
6192
6201
  } from "lexical";
6193
6202
  import { useCallback as useCallback3 } from "react";
6194
6203
  import { jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
@@ -6211,7 +6220,7 @@ function DistractorButton(props) {
6211
6220
  const newQuestionItem = foundNode.__items[itemIndex + 1];
6212
6221
  if (newQuestionItem.itemOptionContent) {
6213
6222
  newQuestionItem.itemOptionContent.update(() => {
6214
- const root = $getRoot4();
6223
+ const root = $getRoot3();
6215
6224
  let firstChild = root.getFirstChild();
6216
6225
  if (!firstChild) {
6217
6226
  firstChild = $createParagraphNode5();
@@ -6297,12 +6306,12 @@ import { useLexicalComposerContext as useLexicalComposerContext25 } from "@lexic
6297
6306
  import { LexicalErrorBoundary as LexicalErrorBoundary3 } from "@lexical/react/LexicalErrorBoundary";
6298
6307
  import { HistoryPlugin as HistoryPlugin3 } from "@lexical/react/LexicalHistoryPlugin";
6299
6308
  import { LexicalNestedComposer as LexicalNestedComposer3 } from "@lexical/react/LexicalNestedComposer";
6300
- import { RichTextPlugin as RichTextPlugin3 } from "@lexical/react/LexicalRichTextPlugin";
6309
+ import { RichTextPlugin as RichTextPlugin2 } from "@lexical/react/LexicalRichTextPlugin";
6301
6310
  import clsx2 from "clsx";
6302
6311
  import {
6303
6312
  $createParagraphNode as $createParagraphNode6,
6304
6313
  $getNodeByKey as $getNodeByKey20,
6305
- $getRoot as $getRoot5
6314
+ $getRoot as $getRoot4
6306
6315
  } from "lexical";
6307
6316
  import { CircleMinus, CirclePlus } from "lucide-react";
6308
6317
  import { useCallback as useCallback4 } from "react";
@@ -6334,7 +6343,7 @@ function QuestionItemComponent(props) {
6334
6343
  const newQuestionItem = foundNode.__items[itemIndex + 1];
6335
6344
  if (newQuestionItem.itemPremiseContent) {
6336
6345
  newQuestionItem.itemPremiseContent.update(() => {
6337
- const root = $getRoot5();
6346
+ const root = $getRoot4();
6338
6347
  let firstChild = root.getFirstChild();
6339
6348
  if (!firstChild) {
6340
6349
  firstChild = $createParagraphNode6();
@@ -6345,7 +6354,7 @@ function QuestionItemComponent(props) {
6345
6354
  }
6346
6355
  if (newQuestionItem.itemOptionContent) {
6347
6356
  newQuestionItem.itemOptionContent.update(() => {
6348
- const root = $getRoot5();
6357
+ const root = $getRoot4();
6349
6358
  let firstChild = root.getFirstChild();
6350
6359
  if (!firstChild) {
6351
6360
  firstChild = $createParagraphNode6();
@@ -6386,7 +6395,7 @@ function QuestionItemComponent(props) {
6386
6395
  /* @__PURE__ */ jsx56("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx56(LexicalNestedComposer3, { initialEditor: itemPremiseContent, children: /* @__PURE__ */ jsxs19(NestedEditor, { nodeKey, children: [
6387
6396
  /* @__PURE__ */ jsx56(SettingsPanelNestedAgentPlugin, {}),
6388
6397
  /* @__PURE__ */ jsx56(
6389
- RichTextPlugin3,
6398
+ RichTextPlugin2,
6390
6399
  {
6391
6400
  contentEditable: /* @__PURE__ */ jsx56(NestedContentEditable, {}),
6392
6401
  ErrorBoundary: LexicalErrorBoundary3,
@@ -6425,7 +6434,7 @@ function QuestionItemComponent(props) {
6425
6434
  /* @__PURE__ */ jsx56("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx56(LexicalNestedComposer3, { initialEditor: itemOptionContent, children: /* @__PURE__ */ jsxs19(NestedEditor, { nodeKey, children: [
6426
6435
  /* @__PURE__ */ jsx56(SettingsPanelNestedAgentPlugin, {}),
6427
6436
  /* @__PURE__ */ jsx56(
6428
- RichTextPlugin3,
6437
+ RichTextPlugin2,
6429
6438
  {
6430
6439
  contentEditable: /* @__PURE__ */ jsx56(NestedContentEditable, {}),
6431
6440
  ErrorBoundary: LexicalErrorBoundary3,
@@ -6737,7 +6746,7 @@ import {
6737
6746
  $applyNodeReplacement as $applyNodeReplacement7,
6738
6747
  $createParagraphNode as $createParagraphNode7,
6739
6748
  $createTextNode as $createTextNode4,
6740
- $getRoot as $getRoot6,
6749
+ $getRoot as $getRoot5,
6741
6750
  DecoratorNode as DecoratorNode7,
6742
6751
  createEditor as createEditor4
6743
6752
  } from "lexical";
@@ -6759,7 +6768,7 @@ import { useLexicalComposerContext as useLexicalComposerContext27 } from "@lexic
6759
6768
  import { LexicalErrorBoundary as LexicalErrorBoundary4 } from "@lexical/react/LexicalErrorBoundary";
6760
6769
  import { HistoryPlugin as HistoryPlugin4 } from "@lexical/react/LexicalHistoryPlugin";
6761
6770
  import { LexicalNestedComposer as LexicalNestedComposer4 } from "@lexical/react/LexicalNestedComposer";
6762
- import { RichTextPlugin as RichTextPlugin4 } from "@lexical/react/LexicalRichTextPlugin";
6771
+ import { RichTextPlugin as RichTextPlugin3 } from "@lexical/react/LexicalRichTextPlugin";
6763
6772
  import clsx3 from "clsx";
6764
6773
  import { $getNodeByKey as $getNodeByKey22 } from "lexical";
6765
6774
  import { CircleMinus as CircleMinus2, CirclePlus as CirclePlus2, Settings } from "lucide-react";
@@ -6818,7 +6827,7 @@ function MultipleOptionQuestionItemComponent(props) {
6818
6827
  /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsx59(LexicalNestedComposer4, { initialEditor: content, children: /* @__PURE__ */ jsxs21(NestedEditor, { nodeKey, children: [
6819
6828
  /* @__PURE__ */ jsx59(SettingsPanelNestedAgentPlugin, {}),
6820
6829
  /* @__PURE__ */ jsx59(
6821
- RichTextPlugin4,
6830
+ RichTextPlugin3,
6822
6831
  {
6823
6832
  contentEditable: /* @__PURE__ */ jsx59(NestedContentEditable, {}),
6824
6833
  ErrorBoundary: LexicalErrorBoundary4,
@@ -7144,7 +7153,7 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends Decor
7144
7153
  const newOptions = [...writable.__options];
7145
7154
  const content = initNewContentEditor2();
7146
7155
  content.update(() => {
7147
- const root = $getRoot6();
7156
+ const root = $getRoot5();
7148
7157
  const firstChild = $createParagraphNode7();
7149
7158
  firstChild.append($createTextNode4(initialOptionText));
7150
7159
  root.append(firstChild);
@@ -7215,7 +7224,7 @@ import { useLexicalComposerContext as useLexicalComposerContext29 } from "@lexic
7215
7224
  import { LexicalErrorBoundary as LexicalErrorBoundary5 } from "@lexical/react/LexicalErrorBoundary";
7216
7225
  import { HistoryPlugin as HistoryPlugin5 } from "@lexical/react/LexicalHistoryPlugin";
7217
7226
  import { LexicalNestedComposer as LexicalNestedComposer5 } from "@lexical/react/LexicalNestedComposer";
7218
- import { RichTextPlugin as RichTextPlugin5 } from "@lexical/react/LexicalRichTextPlugin";
7227
+ import { RichTextPlugin as RichTextPlugin4 } from "@lexical/react/LexicalRichTextPlugin";
7219
7228
  import {
7220
7229
  $createNodeSelection as $createNodeSelection6,
7221
7230
  $getNodeByKey as $getNodeByKey24,
@@ -7276,7 +7285,7 @@ function ShortAnswerQuestionComponent(props) {
7276
7285
  /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(LexicalNestedComposer5, { initialEditor: notes, children: /* @__PURE__ */ jsxs23(NestedEditor, { nodeKey, children: [
7277
7286
  /* @__PURE__ */ jsx62(SettingsPanelNestedAgentPlugin, {}),
7278
7287
  /* @__PURE__ */ jsx62(
7279
- RichTextPlugin5,
7288
+ RichTextPlugin4,
7280
7289
  {
7281
7290
  contentEditable: /* @__PURE__ */ jsx62(NestedContentEditable, {}),
7282
7291
  ErrorBoundary: LexicalErrorBoundary5,
@@ -7449,12 +7458,12 @@ import { useLexicalComposerContext as useLexicalComposerContext31 } from "@lexic
7449
7458
  import { LexicalErrorBoundary as LexicalErrorBoundary6 } from "@lexical/react/LexicalErrorBoundary";
7450
7459
  import { HistoryPlugin as HistoryPlugin6 } from "@lexical/react/LexicalHistoryPlugin";
7451
7460
  import { LexicalNestedComposer as LexicalNestedComposer6 } from "@lexical/react/LexicalNestedComposer";
7452
- import { RichTextPlugin as RichTextPlugin6 } from "@lexical/react/LexicalRichTextPlugin";
7461
+ import { RichTextPlugin as RichTextPlugin5 } from "@lexical/react/LexicalRichTextPlugin";
7453
7462
  import clsx4 from "clsx";
7454
7463
  import {
7455
7464
  $createParagraphNode as $createParagraphNode8,
7456
7465
  $getNodeByKey as $getNodeByKey25,
7457
- $getRoot as $getRoot7
7466
+ $getRoot as $getRoot6
7458
7467
  } from "lexical";
7459
7468
  import { CircleMinus as CircleMinus3, CirclePlus as CirclePlus3 } from "lucide-react";
7460
7469
  import { useCallback as useCallback6 } from "react";
@@ -7479,7 +7488,7 @@ function JournalEntryQuestionItemComponent(props) {
7479
7488
  const newEntryItem = foundNode.__lineItems[itemIndex + 1];
7480
7489
  if (newEntryItem.account) {
7481
7490
  newEntryItem.account.update(() => {
7482
- const root = $getRoot7();
7491
+ const root = $getRoot6();
7483
7492
  let firstChild = root.getFirstChild();
7484
7493
  if (!firstChild) {
7485
7494
  firstChild = $createParagraphNode8();
@@ -7490,7 +7499,7 @@ function JournalEntryQuestionItemComponent(props) {
7490
7499
  }
7491
7500
  if (newEntryItem.credit) {
7492
7501
  newEntryItem.credit.update(() => {
7493
- const root = $getRoot7();
7502
+ const root = $getRoot6();
7494
7503
  let firstChild = root.getFirstChild();
7495
7504
  if (!firstChild) {
7496
7505
  firstChild = $createParagraphNode8();
@@ -7500,7 +7509,7 @@ function JournalEntryQuestionItemComponent(props) {
7500
7509
  }
7501
7510
  if (newEntryItem.debit) {
7502
7511
  newEntryItem.debit.update(() => {
7503
- const root = $getRoot7();
7512
+ const root = $getRoot6();
7504
7513
  let firstChild = root.getFirstChild();
7505
7514
  if (!firstChild) {
7506
7515
  firstChild = $createParagraphNode8();
@@ -7544,7 +7553,7 @@ function JournalEntryQuestionItemComponent(props) {
7544
7553
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: account, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7545
7554
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7546
7555
  /* @__PURE__ */ jsx65(
7547
- RichTextPlugin6,
7556
+ RichTextPlugin5,
7548
7557
  {
7549
7558
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7550
7559
  ErrorBoundary: LexicalErrorBoundary6,
@@ -7586,7 +7595,7 @@ function JournalEntryQuestionItemComponent(props) {
7586
7595
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: debit, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7587
7596
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7588
7597
  /* @__PURE__ */ jsx65(
7589
- RichTextPlugin6,
7598
+ RichTextPlugin5,
7590
7599
  {
7591
7600
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7592
7601
  ErrorBoundary: LexicalErrorBoundary6,
@@ -7628,7 +7637,7 @@ function JournalEntryQuestionItemComponent(props) {
7628
7637
  /* @__PURE__ */ jsx65("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx65(LexicalNestedComposer6, { initialEditor: credit, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7629
7638
  /* @__PURE__ */ jsx65(SettingsPanelNestedAgentPlugin, {}),
7630
7639
  /* @__PURE__ */ jsx65(
7631
- RichTextPlugin6,
7640
+ RichTextPlugin5,
7632
7641
  {
7633
7642
  contentEditable: /* @__PURE__ */ jsx65(NestedContentEditable, {}),
7634
7643
  ErrorBoundary: LexicalErrorBoundary6,
@@ -8081,10 +8090,10 @@ function TypeaheadMenuAgentPlugin(props) {
8081
8090
  import { useLexicalComposerContext as useLexicalComposerContext36 } from "@lexical/react/LexicalComposerContext";
8082
8091
  import { LexicalErrorBoundary as LexicalErrorBoundary7 } from "@lexical/react/LexicalErrorBoundary";
8083
8092
  import { HistoryPlugin as HistoryPlugin7 } from "@lexical/react/LexicalHistoryPlugin";
8084
- import { ListPlugin as ListPlugin2 } from "@lexical/react/LexicalListPlugin";
8093
+ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
8085
8094
  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";
8095
+ import { RichTextPlugin as RichTextPlugin6 } from "@lexical/react/LexicalRichTextPlugin";
8096
+ import { TabIndentationPlugin } from "@lexical/react/LexicalTabIndentationPlugin";
8088
8097
  import {
8089
8098
  $createNodeSelection as $createNodeSelection9,
8090
8099
  $getNodeByKey as $getNodeByKey27,
@@ -8294,7 +8303,7 @@ function FillInTheBlankQuestionComponent(props) {
8294
8303
  /* @__PURE__ */ jsx71(FillInTheBlankSpaceComponentPlugin, {}),
8295
8304
  /* @__PURE__ */ jsx71(FillInTheBlankSpaceSettingsPlugin, {}),
8296
8305
  /* @__PURE__ */ jsx71(
8297
- RichTextPlugin7,
8306
+ RichTextPlugin6,
8298
8307
  {
8299
8308
  contentEditable: /* @__PURE__ */ jsx71(NestedContentEditable, {}),
8300
8309
  ErrorBoundary: LexicalErrorBoundary7,
@@ -8323,10 +8332,10 @@ function FillInTheBlankQuestionComponent(props) {
8323
8332
  decoratorNode: FillInTheBlankQuestionNode
8324
8333
  }
8325
8334
  ),
8326
- /* @__PURE__ */ jsx71(ListPlugin2, {}),
8335
+ /* @__PURE__ */ jsx71(ListPlugin, {}),
8327
8336
  /* @__PURE__ */ jsx71(ListLevelLimitPlugin, {}),
8328
8337
  /* @__PURE__ */ jsx71(Table, {}),
8329
- /* @__PURE__ */ jsx71(TabIndentationPlugin2, {})
8338
+ /* @__PURE__ */ jsx71(TabIndentationPlugin, {})
8330
8339
  ] }) })
8331
8340
  ]
8332
8341
  }
@@ -8540,7 +8549,8 @@ function SettingsPanelPlugin() {
8540
8549
  drawer,
8541
8550
  getSettingsPanel,
8542
8551
  getNestedEditor,
8543
- renderSettings
8552
+ renderSettings,
8553
+ autoOpenSettingsPanel
8544
8554
  } = useBlockEditor();
8545
8555
  const [_articleIsReady, setArticleReady] = useState5(false);
8546
8556
  const articleElementRef = useRef30();
@@ -8571,6 +8581,7 @@ function SettingsPanelPlugin() {
8571
8581
  }
8572
8582
  if (currentFocusedNode.current) {
8573
8583
  setSelectedNode(currentFocusedNode.current.getKey());
8584
+ autoOpenSettingsPanel();
8574
8585
  } else {
8575
8586
  setSelectedNode(void 0);
8576
8587
  }
@@ -8811,11 +8822,11 @@ function getLineBreakNodeBeforeCaretOnLastLine(paragraph, selection) {
8811
8822
  import { LexicalErrorBoundary as LexicalErrorBoundary8 } from "@lexical/react/LexicalErrorBoundary";
8812
8823
  import { HistoryPlugin as HistoryPlugin8 } from "@lexical/react/LexicalHistoryPlugin";
8813
8824
  import { LexicalNestedComposer as LexicalNestedComposer8 } from "@lexical/react/LexicalNestedComposer";
8814
- import { PlainTextPlugin } from "@lexical/react/LexicalPlainTextPlugin";
8825
+ import { PlainTextPlugin as PlainTextPlugin2 } from "@lexical/react/LexicalPlainTextPlugin";
8815
8826
  import { useLexicalNodeSelection as useLexicalNodeSelection3 } from "@lexical/react/useLexicalNodeSelection";
8816
8827
  import { mergeRegister as mergeRegister13 } from "@lexical/utils";
8817
8828
  import {
8818
- $getRoot as $getRoot8,
8829
+ $getRoot as $getRoot7,
8819
8830
  $getSelection as $getSelection6,
8820
8831
  $isParagraphNode,
8821
8832
  $isRangeSelection as $isRangeSelection4,
@@ -8840,7 +8851,7 @@ function CalloutBoxComponent(props) {
8840
8851
  () => {
8841
8852
  const currentSelection = $getSelection6();
8842
8853
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
8843
- const firstChild = $getRoot8().getFirstChild();
8854
+ const firstChild = $getRoot7().getFirstChild();
8844
8855
  if (firstChild?.getTextContentSize() === 0) {
8845
8856
  event.stopPropagation();
8846
8857
  event.preventDefault();
@@ -8874,7 +8885,7 @@ function CalloutBoxComponent(props) {
8874
8885
  (event) => {
8875
8886
  const currentSelection = $getSelection6();
8876
8887
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
8877
- const firstChild = $getRoot8().getFirstChild();
8888
+ const firstChild = $getRoot7().getFirstChild();
8878
8889
  if ($isParagraphNode(firstChild)) {
8879
8890
  const breakNodes = getLineBreakNodeBeforeCaretOnLastLine(
8880
8891
  firstChild,
@@ -8934,7 +8945,7 @@ function CalloutBoxComponent(props) {
8934
8945
  children: /* @__PURE__ */ jsx76(LexicalNestedComposer8, { initialEditor: content, children: /* @__PURE__ */ jsxs29(NestedEditor, { nodeKey, children: [
8935
8946
  /* @__PURE__ */ jsx76(SettingsPanelNestedAgentPlugin, {}),
8936
8947
  /* @__PURE__ */ jsx76(
8937
- PlainTextPlugin,
8948
+ PlainTextPlugin2,
8938
8949
  {
8939
8950
  contentEditable: /* @__PURE__ */ jsx76(NestedContentEditable, {}),
8940
8951
  ErrorBoundary: LexicalErrorBoundary8
@@ -8957,8 +8968,8 @@ var CALLOUT_ICONS = {
8957
8968
  tip: Lightbulb
8958
8969
  };
8959
8970
  var CALLOUT_COLORS = {
8960
- info: "--sl-color-sky",
8961
- tip: "--sl-color-teal"
8971
+ info: "--sl-color-primary",
8972
+ tip: "--sl-color-success"
8962
8973
  };
8963
8974
  var CALLOUT_LABELS = {
8964
8975
  info: "Instructions",
@@ -9648,30 +9659,68 @@ var initialEditorRegistry = {
9648
9659
  Questions: false
9649
9660
  };
9650
9661
 
9662
+ // src/content/drawer/Drawer.tsx
9663
+ import { Menu } from "lucide-react";
9664
+ import { forwardRef as forwardRef10, useEffect as useEffect52, useState as useState6 } from "react";
9665
+ import { jsx as jsx83 } from "react/jsx-runtime";
9666
+ var Drawer = forwardRef10(
9667
+ (props, ref) => {
9668
+ const {
9669
+ settingsPanelSwitch,
9670
+ toggleSettingsPanelSwitch,
9671
+ modulesNumber,
9672
+ hasModule
9673
+ } = useBlockEditor();
9674
+ const [showSettingsButton, setShowSettingsButton] = useState6(false);
9675
+ useEffect52(() => {
9676
+ if (hasModule("SettingsPanel")) {
9677
+ setShowSettingsButton(true);
9678
+ }
9679
+ }, [modulesNumber, hasModule]);
9680
+ return /* @__PURE__ */ jsx83(
9681
+ "nav",
9682
+ {
9683
+ ref,
9684
+ className: !showSettingsButton ? "disabled" : settingsPanelSwitch === "on" ? "shown" : "hidden",
9685
+ children: settingsPanelSwitch === "off" && /* @__PURE__ */ jsx83("div", { children: /* @__PURE__ */ jsx83(
9686
+ Button,
9687
+ {
9688
+ className: "cancel",
9689
+ variant: "text",
9690
+ size: "large",
9691
+ StartIcon: Menu,
9692
+ onClick: toggleSettingsPanelSwitch
9693
+ }
9694
+ ) })
9695
+ }
9696
+ );
9697
+ }
9698
+ );
9699
+
9651
9700
  // src/content/editable/ContentEditable.tsx
9652
9701
  import { ContentEditable as LexicalContentEditable2 } from "@lexical/react/LexicalContentEditable";
9653
- import { jsx as jsx83 } from "react/jsx-runtime";
9702
+ import { jsx as jsx84 } from "react/jsx-runtime";
9654
9703
  function ContentEditable() {
9655
- return /* @__PURE__ */ jsx83(LexicalContentEditable2, { className: "content" });
9704
+ return /* @__PURE__ */ jsx84(LexicalContentEditable2, { className: "content" });
9656
9705
  }
9657
9706
 
9658
9707
  // src/content/node/NodeProvider.tsx
9659
9708
  import React18, {
9660
9709
  useContext as useContext3,
9661
- useEffect as useEffect64,
9710
+ useEffect as useEffect65,
9662
9711
  useRef as useRef46
9663
9712
  } from "react";
9664
9713
 
9665
9714
  // src/components/inputs/DropdownWrapper.tsx
9666
9715
  import {
9667
- forwardRef as forwardRef10,
9668
- useEffect as useEffect52,
9716
+ forwardRef as forwardRef11,
9717
+ useEffect as useEffect53,
9669
9718
  useImperativeHandle as useImperativeHandle10,
9670
9719
  useMemo as useMemo6,
9671
9720
  useRef as useRef33
9672
9721
  } from "react";
9673
- import { jsx as jsx84, jsxs as jsxs32 } from "react/jsx-runtime";
9674
- var DropdownWrapper = forwardRef10((props, ref) => {
9722
+ import { jsx as jsx85, jsxs as jsxs32 } from "react/jsx-runtime";
9723
+ var DropdownWrapper = forwardRef11((props, ref) => {
9675
9724
  const {
9676
9725
  className,
9677
9726
  menuClassName,
@@ -9753,9 +9802,9 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9753
9802
  subMenu
9754
9803
  } = menuItem;
9755
9804
  if (menuItemDivider) {
9756
- menuItemElement = /* @__PURE__ */ jsx84("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
9805
+ menuItemElement = /* @__PURE__ */ jsx85("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
9757
9806
  } else if (menuItemIsGroup) {
9758
- menuItemElement = /* @__PURE__ */ jsx84("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
9807
+ menuItemElement = /* @__PURE__ */ jsx85("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
9759
9808
  } else if (subMenu) {
9760
9809
  const subMenuElements = [];
9761
9810
  let subTabsIndex = 0;
@@ -9774,7 +9823,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9774
9823
  e.stopPropagation();
9775
9824
  },
9776
9825
  children: [
9777
- MenuItemIcon && /* @__PURE__ */ jsx84(
9826
+ MenuItemIcon && /* @__PURE__ */ jsx85(
9778
9827
  Icon,
9779
9828
  {
9780
9829
  style: { color: menuItemColor || "inherit" },
@@ -9783,7 +9832,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9783
9832
  }
9784
9833
  ),
9785
9834
  menuItemLabel,
9786
- /* @__PURE__ */ jsx84(
9835
+ /* @__PURE__ */ jsx85(
9787
9836
  "sl-menu",
9788
9837
  {
9789
9838
  slot: "submenu",
@@ -9820,7 +9869,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9820
9869
  e.stopPropagation();
9821
9870
  },
9822
9871
  children: [
9823
- MenuItemIcon && /* @__PURE__ */ jsx84(
9872
+ MenuItemIcon && /* @__PURE__ */ jsx85(
9824
9873
  Icon,
9825
9874
  {
9826
9875
  style: { color: menuItemColor || "inherit" },
@@ -9829,7 +9878,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9829
9878
  }
9830
9879
  ),
9831
9880
  menuItemLabel,
9832
- menuItemIsError && /* @__PURE__ */ jsx84(DotBadge, { variant: "danger", leftSided: true })
9881
+ menuItemIsError && /* @__PURE__ */ jsx85(DotBadge, { variant: "danger", leftSided: true })
9833
9882
  ]
9834
9883
  },
9835
9884
  `menuItem${menuItemId}`
@@ -9851,7 +9900,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9851
9900
  }, [menu]);
9852
9901
  filterNilAttrs(props, ["sync", "slot"]);
9853
9902
  const dropdownAttributes = filterNilAttrs(props, ["placement"]);
9854
- useEffect52(() => {
9903
+ useEffect53(() => {
9855
9904
  window.customElements.whenDefined("sl-menu").then(() => {
9856
9905
  if (menuRef.current) {
9857
9906
  menuRef.current.addEventListener(
@@ -9869,7 +9918,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9869
9918
  }
9870
9919
  };
9871
9920
  }, [menu]);
9872
- useEffect52(() => {
9921
+ useEffect53(() => {
9873
9922
  window.customElements.whenDefined("sl-dropdown").then(() => {
9874
9923
  if (dropdownRef.current) {
9875
9924
  dropdownRef.current.addEventListener(
@@ -9904,7 +9953,7 @@ var DropdownWrapper = forwardRef10((props, ref) => {
9904
9953
  ...dropdownAttributes,
9905
9954
  children: [
9906
9955
  children,
9907
- menuItems.length > 0 && /* @__PURE__ */ jsx84(
9956
+ menuItems.length > 0 && /* @__PURE__ */ jsx85(
9908
9957
  "sl-menu",
9909
9958
  {
9910
9959
  ref: menuRef,
@@ -9960,18 +10009,18 @@ import {
9960
10009
  $createNodeSelection as $createNodeSelection12,
9961
10010
  $createParagraphNode as $createParagraphNode9,
9962
10011
  $getNodeByKey as $getNodeByKey33,
9963
- $getRoot as $getRoot9,
10012
+ $getRoot as $getRoot8,
9964
10013
  $parseSerializedNode,
9965
10014
  $setSelection as $setSelection12,
9966
10015
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR9,
9967
10016
  createCommand as createCommand13
9968
10017
  } from "lexical";
9969
- import { useEffect as useEffect54, useRef as useRef35 } from "react";
10018
+ import { useEffect as useEffect55, useRef as useRef35 } from "react";
9970
10019
 
9971
10020
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
9972
10021
  import { useLexicalComposerContext as useLexicalComposerContext43 } from "@lexical/react/LexicalComposerContext";
9973
10022
  import { $getNodeByKey as $getNodeByKey32 } from "lexical";
9974
- import { useEffect as useEffect53, useRef as useRef34, useState as useState6 } from "react";
10023
+ import { useEffect as useEffect54, useRef as useRef34, useState as useState7 } from "react";
9975
10024
 
9976
10025
  // src/plugins/FillInTheBlankQuestionPlugin/validatePointslnput.ts
9977
10026
  function validatePointsInput(input) {
@@ -9993,13 +10042,13 @@ function validatePointsInput(input) {
9993
10042
  }
9994
10043
 
9995
10044
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
9996
- import { jsx as jsx85 } from "react/jsx-runtime";
10045
+ import { jsx as jsx86 } from "react/jsx-runtime";
9997
10046
  function FillInTheBlankQuestionSettings(props) {
9998
10047
  const { nodeKey } = props;
9999
10048
  const [editor] = useLexicalComposerContext43();
10000
10049
  const pointsTextInputRef = useRef34(null);
10001
- const [foundNode, setFoundNode] = useState6();
10002
- useEffect53(() => {
10050
+ const [foundNode, setFoundNode] = useState7();
10051
+ useEffect54(() => {
10003
10052
  if (nodeKey) {
10004
10053
  editor.getEditorState().read(() => {
10005
10054
  const fillInTheBlankNode = $getNodeByKey32(nodeKey);
@@ -10012,7 +10061,7 @@ function FillInTheBlankQuestionSettings(props) {
10012
10061
  if (!foundNode) {
10013
10062
  return null;
10014
10063
  }
10015
- return /* @__PURE__ */ jsx85("div", { children: /* @__PURE__ */ jsx85(
10064
+ return /* @__PURE__ */ jsx86("div", { children: /* @__PURE__ */ jsx86(
10016
10065
  TextInput,
10017
10066
  {
10018
10067
  ref: pointsTextInputRef,
@@ -10042,7 +10091,7 @@ function FillInTheBlankQuestionSettings(props) {
10042
10091
  }
10043
10092
 
10044
10093
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionPlugin.tsx
10045
- import { Fragment as Fragment30, jsx as jsx86 } from "react/jsx-runtime";
10094
+ import { Fragment as Fragment30, jsx as jsx87 } from "react/jsx-runtime";
10046
10095
  var INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND = createCommand13("INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND");
10047
10096
  function FillInTheBlankQuestionPlugin() {
10048
10097
  const {
@@ -10053,7 +10102,7 @@ function FillInTheBlankQuestionPlugin() {
10053
10102
  } = useBlockEditor();
10054
10103
  const [editor] = useLexicalComposerContext44();
10055
10104
  const settingsPanelStickyRef = useRef35(null);
10056
- useEffect54(() => {
10105
+ useEffect55(() => {
10057
10106
  return mergeRegister15(
10058
10107
  editor.registerCommand(
10059
10108
  INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND,
@@ -10100,7 +10149,7 @@ function FillInTheBlankQuestionPlugin() {
10100
10149
  onUpdate: () => {
10101
10150
  if (fillInTheBlankNode) {
10102
10151
  fillInTheBlankNode.__content.update(() => {
10103
- const root = $getRoot9();
10152
+ const root = $getRoot8();
10104
10153
  if (serializedData) {
10105
10154
  const nodeSerialized2 = JSON.parse(serializedData);
10106
10155
  const newNode = $parseSerializedNode(nodeSerialized2);
@@ -10134,7 +10183,7 @@ function FillInTheBlankQuestionPlugin() {
10134
10183
  {
10135
10184
  onUpdate: () => {
10136
10185
  fillInTheBlankNode?.__content.update(() => {
10137
- const root = $getRoot9();
10186
+ const root = $getRoot8();
10138
10187
  let firstChild = root.getFirstChild();
10139
10188
  if (!firstChild) {
10140
10189
  firstChild = $createParagraphNode9();
@@ -10154,7 +10203,7 @@ function FillInTheBlankQuestionPlugin() {
10154
10203
  )
10155
10204
  );
10156
10205
  }, [editor]);
10157
- useEffect54(() => {
10206
+ useEffect55(() => {
10158
10207
  if (isBlockEditorReady) {
10159
10208
  if (settingsPanelStickyRef.current) {
10160
10209
  registerSettingsPanel(
@@ -10164,20 +10213,20 @@ function FillInTheBlankQuestionPlugin() {
10164
10213
  }
10165
10214
  }
10166
10215
  }, [isBlockEditorReady]);
10167
- return /* @__PURE__ */ jsx86(Fragment30, { children: drawer && /* @__PURE__ */ jsx86(
10216
+ return /* @__PURE__ */ jsx87(Fragment30, { children: drawer && /* @__PURE__ */ jsx87(
10168
10217
  StickyToPosition,
10169
10218
  {
10170
10219
  ref: settingsPanelStickyRef,
10171
10220
  container: drawer,
10172
10221
  children: (data, position, isVisible) => {
10173
- return /* @__PURE__ */ jsx86("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx86(
10222
+ return /* @__PURE__ */ jsx87("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx87(
10174
10223
  SettingsCard,
10175
10224
  {
10176
10225
  isVisible: !!isVisible,
10177
10226
  container: drawer,
10178
10227
  title: "Fill In The Blank Settings",
10179
10228
  onClose: toggleSettingsPanelSwitch,
10180
- children: /* @__PURE__ */ jsx86(
10229
+ children: /* @__PURE__ */ jsx87(
10181
10230
  FillInTheBlankQuestionSettings,
10182
10231
  {
10183
10232
  nodeKey: data.nodeKey
@@ -10198,17 +10247,17 @@ import {
10198
10247
  $createNodeSelection as $createNodeSelection13,
10199
10248
  $createParagraphNode as $createParagraphNode10,
10200
10249
  $getNodeByKey as $getNodeByKey35,
10201
- $getRoot as $getRoot10,
10250
+ $getRoot as $getRoot9,
10202
10251
  $setSelection as $setSelection13,
10203
10252
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR10,
10204
10253
  createCommand as createCommand14
10205
10254
  } from "lexical";
10206
- import { useEffect as useEffect56, useRef as useRef37 } from "react";
10255
+ import { useEffect as useEffect57, useRef as useRef37 } from "react";
10207
10256
 
10208
10257
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10209
10258
  import { useLexicalComposerContext as useLexicalComposerContext45 } from "@lexical/react/LexicalComposerContext";
10210
10259
  import { $getNodeByKey as $getNodeByKey34 } from "lexical";
10211
- import { useEffect as useEffect55, useMemo as useMemo7, useRef as useRef36, useState as useState7 } from "react";
10260
+ import { useEffect as useEffect56, useMemo as useMemo7, useRef as useRef36, useState as useState8 } from "react";
10212
10261
 
10213
10262
  // src/plugins/JournalEntryQuestionPlugin/validateErrorTolarancelnput.ts
10214
10263
  function validateErrorTolerance(input) {
@@ -10249,15 +10298,15 @@ function validatePointsInput2(input) {
10249
10298
  }
10250
10299
 
10251
10300
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10252
- import { Fragment as Fragment31, jsx as jsx87, jsxs as jsxs33 } from "react/jsx-runtime";
10301
+ import { Fragment as Fragment31, jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
10253
10302
  function JournalEntryQuestionSettings(props) {
10254
10303
  const { nodeKey } = props;
10255
10304
  const [editor] = useLexicalComposerContext45();
10256
10305
  const pointsTextInputRef = useRef36(null);
10257
10306
  const errorToleranceTextInputRef = useRef36(null);
10258
10307
  const typeRadioGroupRef = useRef36(null);
10259
- const [foundNode, setFoundNode] = useState7();
10260
- useEffect55(() => {
10308
+ const [foundNode, setFoundNode] = useState8();
10309
+ useEffect56(() => {
10261
10310
  if (nodeKey) {
10262
10311
  editor.getEditorState().read(() => {
10263
10312
  const journalEntryNode = $getNodeByKey34(nodeKey);
@@ -10283,7 +10332,7 @@ function JournalEntryQuestionSettings(props) {
10283
10332
  return null;
10284
10333
  }
10285
10334
  return /* @__PURE__ */ jsxs33(Fragment31, { children: [
10286
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10335
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10287
10336
  TextInput,
10288
10337
  {
10289
10338
  ref: pointsTextInputRef,
@@ -10310,7 +10359,7 @@ function JournalEntryQuestionSettings(props) {
10310
10359
  }
10311
10360
  }
10312
10361
  ) }),
10313
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10362
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10314
10363
  TextInput,
10315
10364
  {
10316
10365
  ref: errorToleranceTextInputRef,
@@ -10341,7 +10390,7 @@ function JournalEntryQuestionSettings(props) {
10341
10390
  }
10342
10391
  }
10343
10392
  ) }),
10344
- /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10393
+ /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10345
10394
  RadioGroup,
10346
10395
  {
10347
10396
  ref: typeRadioGroupRef,
@@ -10363,7 +10412,7 @@ function JournalEntryQuestionSettings(props) {
10363
10412
  }
10364
10413
 
10365
10414
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionPlugin.tsx
10366
- import { Fragment as Fragment32, jsx as jsx88 } from "react/jsx-runtime";
10415
+ import { Fragment as Fragment32, jsx as jsx89 } from "react/jsx-runtime";
10367
10416
  var INSERT_JOURNAL_ENTRY_QUESTION_COMMAND = createCommand14("INSERT_JOURNAL_ENTRY_QUESTION_COMMAND");
10368
10417
  function JournalEntryQuestionPlugin() {
10369
10418
  const {
@@ -10374,7 +10423,7 @@ function JournalEntryQuestionPlugin() {
10374
10423
  } = useBlockEditor();
10375
10424
  const [editor] = useLexicalComposerContext46();
10376
10425
  const settingsPanelStickyRef = useRef37(null);
10377
- useEffect56(() => {
10426
+ useEffect57(() => {
10378
10427
  return mergeRegister16(
10379
10428
  editor.registerCommand(
10380
10429
  INSERT_JOURNAL_ENTRY_QUESTION_COMMAND,
@@ -10414,7 +10463,7 @@ function JournalEntryQuestionPlugin() {
10414
10463
  let index = 0;
10415
10464
  for (const questionItem of journalEntryNode.__lineItems) {
10416
10465
  questionItem.account.update(() => {
10417
- const root = $getRoot10();
10466
+ const root = $getRoot9();
10418
10467
  let firstChild = root.getFirstChild();
10419
10468
  if (!firstChild) {
10420
10469
  firstChild = $createParagraphNode10();
@@ -10426,7 +10475,7 @@ function JournalEntryQuestionPlugin() {
10426
10475
  });
10427
10476
  if (questionItem.debit) {
10428
10477
  questionItem.debit.update(() => {
10429
- const root = $getRoot10();
10478
+ const root = $getRoot9();
10430
10479
  let firstChild = root.getFirstChild();
10431
10480
  if (!firstChild) {
10432
10481
  firstChild = $createParagraphNode10();
@@ -10436,7 +10485,7 @@ function JournalEntryQuestionPlugin() {
10436
10485
  }
10437
10486
  if (questionItem.credit) {
10438
10487
  questionItem.credit.update(() => {
10439
- const root = $getRoot10();
10488
+ const root = $getRoot9();
10440
10489
  let firstChild = root.getFirstChild();
10441
10490
  if (!firstChild) {
10442
10491
  firstChild = $createParagraphNode10();
@@ -10460,7 +10509,7 @@ function JournalEntryQuestionPlugin() {
10460
10509
  )
10461
10510
  );
10462
10511
  }, [editor]);
10463
- useEffect56(() => {
10512
+ useEffect57(() => {
10464
10513
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10465
10514
  registerSettingsPanel(
10466
10515
  JournalEntryQuestionNode.getType(),
@@ -10468,20 +10517,20 @@ function JournalEntryQuestionPlugin() {
10468
10517
  );
10469
10518
  }
10470
10519
  }, [isBlockEditorReady]);
10471
- return /* @__PURE__ */ jsx88(Fragment32, { children: drawer && /* @__PURE__ */ jsx88(
10520
+ return /* @__PURE__ */ jsx89(Fragment32, { children: drawer && /* @__PURE__ */ jsx89(
10472
10521
  StickyToPosition,
10473
10522
  {
10474
10523
  ref: settingsPanelStickyRef,
10475
10524
  container: drawer,
10476
10525
  children: (data, position, isVisible) => {
10477
- return /* @__PURE__ */ jsx88("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx88(
10526
+ return /* @__PURE__ */ jsx89("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx89(
10478
10527
  SettingsCard,
10479
10528
  {
10480
10529
  isVisible: !!isVisible,
10481
10530
  container: drawer,
10482
10531
  title: "Journal Entry Settings",
10483
10532
  onClose: toggleSettingsPanelSwitch,
10484
- children: isVisible && /* @__PURE__ */ jsx88(
10533
+ children: isVisible && /* @__PURE__ */ jsx89(
10485
10534
  JournalEntryQuestionSettings,
10486
10535
  {
10487
10536
  nodeKey: data.nodeKey
@@ -10497,7 +10546,7 @@ function JournalEntryQuestionPlugin() {
10497
10546
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10498
10547
  import { useLexicalComposerContext as useLexicalComposerContext47 } from "@lexical/react/LexicalComposerContext";
10499
10548
  import { $getNodeByKey as $getNodeByKey36 } from "lexical";
10500
- import { useEffect as useEffect57, useRef as useRef38, useState as useState8 } from "react";
10549
+ import { useEffect as useEffect58, useRef as useRef38, useState as useState9 } from "react";
10501
10550
 
10502
10551
  // src/plugins/MatchingQuestionPlugin/validatePointslnput.ts
10503
10552
  function validatePointsInput3(input) {
@@ -10519,13 +10568,13 @@ function validatePointsInput3(input) {
10519
10568
  }
10520
10569
 
10521
10570
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10522
- import { jsx as jsx89 } from "react/jsx-runtime";
10571
+ import { jsx as jsx90 } from "react/jsx-runtime";
10523
10572
  function MatchingQuestionSettings(props) {
10524
10573
  const { nodeKey } = props;
10525
10574
  const [editor] = useLexicalComposerContext47();
10526
10575
  const pointsTextInputRef = useRef38(null);
10527
- const [foundNode, setFoundNode] = useState8();
10528
- useEffect57(() => {
10576
+ const [foundNode, setFoundNode] = useState9();
10577
+ useEffect58(() => {
10529
10578
  if (nodeKey) {
10530
10579
  editor.getEditorState().read(() => {
10531
10580
  const matchingQuestionNode = $getNodeByKey36(nodeKey);
@@ -10538,7 +10587,7 @@ function MatchingQuestionSettings(props) {
10538
10587
  if (!foundNode) {
10539
10588
  return null;
10540
10589
  }
10541
- return /* @__PURE__ */ jsx89("div", { children: /* @__PURE__ */ jsx89(
10590
+ return /* @__PURE__ */ jsx90("div", { children: /* @__PURE__ */ jsx90(
10542
10591
  TextInput,
10543
10592
  {
10544
10593
  ref: pointsTextInputRef,
@@ -10574,13 +10623,13 @@ import {
10574
10623
  $createNodeSelection as $createNodeSelection14,
10575
10624
  $createParagraphNode as $createParagraphNode11,
10576
10625
  $getNodeByKey as $getNodeByKey37,
10577
- $getRoot as $getRoot11,
10626
+ $getRoot as $getRoot10,
10578
10627
  $setSelection as $setSelection14,
10579
10628
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR11,
10580
10629
  createCommand as createCommand15
10581
10630
  } from "lexical";
10582
- import { useEffect as useEffect58, useRef as useRef39 } from "react";
10583
- import { Fragment as Fragment33, jsx as jsx90 } from "react/jsx-runtime";
10631
+ import { useEffect as useEffect59, useRef as useRef39 } from "react";
10632
+ import { Fragment as Fragment33, jsx as jsx91 } from "react/jsx-runtime";
10584
10633
  var INSERT_MATCHING_QUESTION_COMMAND = createCommand15("INSERT_MATCHING_QUESTION_COMMAND");
10585
10634
  function MatchingQuestionPlugin() {
10586
10635
  const {
@@ -10591,7 +10640,7 @@ function MatchingQuestionPlugin() {
10591
10640
  } = useBlockEditor();
10592
10641
  const [editor] = useLexicalComposerContext48();
10593
10642
  const settingsPanelStickyRef = useRef39(null);
10594
- useEffect58(() => {
10643
+ useEffect59(() => {
10595
10644
  return mergeRegister17(
10596
10645
  editor.registerCommand(
10597
10646
  INSERT_MATCHING_QUESTION_COMMAND,
@@ -10618,7 +10667,7 @@ function MatchingQuestionPlugin() {
10618
10667
  for (const questionItem of matchingQuestionNode.__items) {
10619
10668
  if (questionItem.itemPremiseContent) {
10620
10669
  questionItem.itemPremiseContent.update(() => {
10621
- const root = $getRoot11();
10670
+ const root = $getRoot10();
10622
10671
  let firstChild = root.getFirstChild();
10623
10672
  if (!firstChild) {
10624
10673
  firstChild = $createParagraphNode11();
@@ -10630,7 +10679,7 @@ function MatchingQuestionPlugin() {
10630
10679
  });
10631
10680
  }
10632
10681
  questionItem.itemOptionContent.update(() => {
10633
- const root = $getRoot11();
10682
+ const root = $getRoot10();
10634
10683
  let firstChild = root.getFirstChild();
10635
10684
  if (!firstChild) {
10636
10685
  firstChild = $createParagraphNode11();
@@ -10650,7 +10699,7 @@ function MatchingQuestionPlugin() {
10650
10699
  )
10651
10700
  );
10652
10701
  }, [editor]);
10653
- useEffect58(() => {
10702
+ useEffect59(() => {
10654
10703
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10655
10704
  registerSettingsPanel(
10656
10705
  MatchingQuestionNode.getType(),
@@ -10658,20 +10707,20 @@ function MatchingQuestionPlugin() {
10658
10707
  );
10659
10708
  }
10660
10709
  }, [isBlockEditorReady]);
10661
- return /* @__PURE__ */ jsx90(Fragment33, { children: drawer && /* @__PURE__ */ jsx90(
10710
+ return /* @__PURE__ */ jsx91(Fragment33, { children: drawer && /* @__PURE__ */ jsx91(
10662
10711
  StickyToPosition,
10663
10712
  {
10664
10713
  ref: settingsPanelStickyRef,
10665
10714
  container: drawer,
10666
10715
  children: (data, position, isVisible) => {
10667
- return /* @__PURE__ */ jsx90("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx90(
10716
+ return /* @__PURE__ */ jsx91("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx91(
10668
10717
  SettingsCard,
10669
10718
  {
10670
10719
  isVisible: !!isVisible,
10671
10720
  container: drawer,
10672
10721
  title: "Matching Settings",
10673
10722
  onClose: toggleSettingsPanelSwitch,
10674
- children: isVisible && /* @__PURE__ */ jsx90(
10723
+ children: isVisible && /* @__PURE__ */ jsx91(
10675
10724
  MatchingQuestionSettings,
10676
10725
  {
10677
10726
  nodeKey: data.nodeKey
@@ -10730,17 +10779,17 @@ import {
10730
10779
  $createNodeSelection as $createNodeSelection15,
10731
10780
  $createParagraphNode as $createParagraphNode12,
10732
10781
  $getNodeByKey as $getNodeByKey39,
10733
- $getRoot as $getRoot12,
10782
+ $getRoot as $getRoot11,
10734
10783
  $setSelection as $setSelection15,
10735
10784
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR12,
10736
10785
  createCommand as createCommand16
10737
10786
  } from "lexical";
10738
- import { useEffect as useEffect60, useRef as useRef41 } from "react";
10787
+ import { useEffect as useEffect61, useRef as useRef41 } from "react";
10739
10788
 
10740
10789
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10741
10790
  import { useLexicalComposerContext as useLexicalComposerContext49 } from "@lexical/react/LexicalComposerContext";
10742
10791
  import { $getNodeByKey as $getNodeByKey38 } from "lexical";
10743
- import { useEffect as useEffect59, useRef as useRef40, useState as useState9 } from "react";
10792
+ import { useEffect as useEffect60, useRef as useRef40, useState as useState10 } from "react";
10744
10793
 
10745
10794
  // src/plugins/MultipleOptionQuestionPlugin/validateChoicesInput.ts
10746
10795
  function validateChoicesInput(input, min) {
@@ -10784,7 +10833,7 @@ function validatePointsInput4(input) {
10784
10833
  }
10785
10834
 
10786
10835
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10787
- import { Fragment as Fragment34, jsx as jsx91, jsxs as jsxs34 } from "react/jsx-runtime";
10836
+ import { Fragment as Fragment34, jsx as jsx92, jsxs as jsxs34 } from "react/jsx-runtime";
10788
10837
  function MultipleOptionQuestionSettings(props) {
10789
10838
  const { nodeKey } = props;
10790
10839
  const [editor] = useLexicalComposerContext49();
@@ -10795,8 +10844,8 @@ function MultipleOptionQuestionSettings(props) {
10795
10844
  const correctChoicesTextInputRef = useRef40(null);
10796
10845
  const incorrectChoicesTextInputRef = useRef40(null);
10797
10846
  const foundNodeRef = useRef40();
10798
- const [questionType, setQuestionType] = useState9();
10799
- useEffect59(() => {
10847
+ const [questionType, setQuestionType] = useState10();
10848
+ useEffect60(() => {
10800
10849
  if (nodeKey) {
10801
10850
  editor.getEditorState().read(() => {
10802
10851
  const optionsQuestionNode = $getNodeByKey38(nodeKey);
@@ -10811,7 +10860,7 @@ function MultipleOptionQuestionSettings(props) {
10811
10860
  return null;
10812
10861
  }
10813
10862
  return /* @__PURE__ */ jsxs34(Fragment34, { children: [
10814
- /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10863
+ /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10815
10864
  TextInput,
10816
10865
  {
10817
10866
  ref: pointsTextInputRef,
@@ -10838,7 +10887,7 @@ function MultipleOptionQuestionSettings(props) {
10838
10887
  }
10839
10888
  }
10840
10889
  ) }),
10841
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10890
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10842
10891
  RadioGroup,
10843
10892
  {
10844
10893
  ref: gradingRadioGroupRef,
@@ -10865,7 +10914,7 @@ function MultipleOptionQuestionSettings(props) {
10865
10914
  }
10866
10915
  }
10867
10916
  ) }),
10868
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10917
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10869
10918
  TextInput,
10870
10919
  {
10871
10920
  ref: correctChoicesTextInputRef,
@@ -10898,7 +10947,7 @@ function MultipleOptionQuestionSettings(props) {
10898
10947
  }
10899
10948
  }
10900
10949
  ) }),
10901
- questionType === "multiple-answers" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10950
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10902
10951
  TextInput,
10903
10952
  {
10904
10953
  ref: incorrectChoicesTextInputRef,
@@ -10931,7 +10980,7 @@ function MultipleOptionQuestionSettings(props) {
10931
10980
  }
10932
10981
  }
10933
10982
  ) }),
10934
- questionType === "multiple-choice" && /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10983
+ questionType === "multiple-choice" && /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10935
10984
  TextInput,
10936
10985
  {
10937
10986
  ref: choicesTextInputRef,
@@ -10962,13 +11011,13 @@ function MultipleOptionQuestionSettings(props) {
10962
11011
  }
10963
11012
  }
10964
11013
  ) }),
10965
- /* @__PURE__ */ jsx91(
11014
+ /* @__PURE__ */ jsx92(
10966
11015
  "div",
10967
11016
  {
10968
11017
  style: {
10969
11018
  paddingBottom: "var(--sl-spacing-medium)"
10970
11019
  },
10971
- children: /* @__PURE__ */ jsx91(
11020
+ children: /* @__PURE__ */ jsx92(
10972
11021
  Checkbox,
10973
11022
  {
10974
11023
  ref: noneOfTheAboveInputRef,
@@ -10992,7 +11041,7 @@ function MultipleOptionQuestionSettings(props) {
10992
11041
  }
10993
11042
 
10994
11043
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionPlugin.tsx
10995
- import { Fragment as Fragment35, jsx as jsx92 } from "react/jsx-runtime";
11044
+ import { Fragment as Fragment35, jsx as jsx93 } from "react/jsx-runtime";
10996
11045
  var INSERT_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("INSERT_MULTIPLE_OPTION_QUESTION_COMMAND");
10997
11046
  var REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND");
10998
11047
  var REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND");
@@ -11005,7 +11054,7 @@ function MultipleOptionQuestionPlugin() {
11005
11054
  } = useBlockEditor();
11006
11055
  const [editor] = useLexicalComposerContext50();
11007
11056
  const settingsPanelStickyRef = useRef41(null);
11008
- useEffect60(() => {
11057
+ useEffect61(() => {
11009
11058
  return mergeRegister18(
11010
11059
  editor.registerCommand(
11011
11060
  INSERT_MULTIPLE_OPTION_QUESTION_COMMAND,
@@ -11044,7 +11093,7 @@ function MultipleOptionQuestionPlugin() {
11044
11093
  let index = 0;
11045
11094
  for (const optionItem of foundNode.__options) {
11046
11095
  optionItem.content.update(() => {
11047
- const root = $getRoot12();
11096
+ const root = $getRoot11();
11048
11097
  let firstChild = root.getFirstChild();
11049
11098
  if (!firstChild) {
11050
11099
  firstChild = $createParagraphNode12();
@@ -11118,7 +11167,7 @@ function MultipleOptionQuestionPlugin() {
11118
11167
  const foundNode = $getNodeByKey39(newNodeKey);
11119
11168
  if ($isMultipleOptionQuestionNode(foundNode)) {
11120
11169
  foundNode.__options[0].content.update(() => {
11121
- const root = $getRoot12();
11170
+ const root = $getRoot11();
11122
11171
  const firstChild = root.getFirstChild();
11123
11172
  firstChild?.selectStart();
11124
11173
  });
@@ -11167,7 +11216,7 @@ function MultipleOptionQuestionPlugin() {
11167
11216
  const foundNode = $getNodeByKey39(newNodeKey);
11168
11217
  if ($isMultipleOptionQuestionNode(foundNode)) {
11169
11218
  foundNode.__options[0].content.update(() => {
11170
- const root = $getRoot12();
11219
+ const root = $getRoot11();
11171
11220
  const firstChild = root.getFirstChild();
11172
11221
  firstChild?.selectStart();
11173
11222
  });
@@ -11184,7 +11233,7 @@ function MultipleOptionQuestionPlugin() {
11184
11233
  )
11185
11234
  );
11186
11235
  }, [editor]);
11187
- useEffect60(() => {
11236
+ useEffect61(() => {
11188
11237
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11189
11238
  registerSettingsPanel(
11190
11239
  MultipleOptionQuestionNode.getType(),
@@ -11192,7 +11241,7 @@ function MultipleOptionQuestionPlugin() {
11192
11241
  );
11193
11242
  }
11194
11243
  }, [isBlockEditorReady]);
11195
- return /* @__PURE__ */ jsx92(Fragment35, { children: drawer && /* @__PURE__ */ jsx92(
11244
+ return /* @__PURE__ */ jsx93(Fragment35, { children: drawer && /* @__PURE__ */ jsx93(
11196
11245
  StickyToPosition,
11197
11246
  {
11198
11247
  ref: settingsPanelStickyRef,
@@ -11209,14 +11258,14 @@ function MultipleOptionQuestionPlugin() {
11209
11258
  }
11210
11259
  });
11211
11260
  }
11212
- return /* @__PURE__ */ jsx92("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx92(
11261
+ return /* @__PURE__ */ jsx93("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx93(
11213
11262
  SettingsCard,
11214
11263
  {
11215
11264
  isVisible: !!isVisible,
11216
11265
  container: drawer,
11217
11266
  title: questionType === "multiple-answers" ? "Multiple Answers Settings" : "Multiple Choice Settings",
11218
11267
  onClose: toggleSettingsPanelSwitch,
11219
- children: isVisible && /* @__PURE__ */ jsx92(
11268
+ children: isVisible && /* @__PURE__ */ jsx93(
11220
11269
  MultipleOptionQuestionSettings,
11221
11270
  {
11222
11271
  nodeKey: data.nodeKey
@@ -11236,17 +11285,17 @@ import {
11236
11285
  $createNodeSelection as $createNodeSelection16,
11237
11286
  $createParagraphNode as $createParagraphNode13,
11238
11287
  $getNodeByKey as $getNodeByKey41,
11239
- $getRoot as $getRoot13,
11288
+ $getRoot as $getRoot12,
11240
11289
  $setSelection as $setSelection16,
11241
11290
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR13,
11242
11291
  createCommand as createCommand17
11243
11292
  } from "lexical";
11244
- import { useEffect as useEffect62, useRef as useRef43 } from "react";
11293
+ import { useEffect as useEffect63, useRef as useRef43 } from "react";
11245
11294
 
11246
11295
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11247
11296
  import { useLexicalComposerContext as useLexicalComposerContext51 } from "@lexical/react/LexicalComposerContext";
11248
11297
  import { $getNodeByKey as $getNodeByKey40 } from "lexical";
11249
- import { useEffect as useEffect61, useRef as useRef42, useState as useState10 } from "react";
11298
+ import { useEffect as useEffect62, useRef as useRef42, useState as useState11 } from "react";
11250
11299
 
11251
11300
  // src/plugins/ShortAnswerQuestionPlugin/validateMaxWordsInput.ts
11252
11301
  function validateMaxWordsInput(input, min) {
@@ -11290,14 +11339,14 @@ function validatePointsInput5(input) {
11290
11339
  }
11291
11340
 
11292
11341
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11293
- import { Fragment as Fragment36, jsx as jsx93, jsxs as jsxs35 } from "react/jsx-runtime";
11342
+ import { Fragment as Fragment36, jsx as jsx94, jsxs as jsxs35 } from "react/jsx-runtime";
11294
11343
  function ShortAnswerQuestionSettings(props) {
11295
11344
  const { nodeKey } = props;
11296
11345
  const [editor] = useLexicalComposerContext51();
11297
11346
  const pointsTextInputRef = useRef42(null);
11298
11347
  const maxWordsTextInputRef = useRef42(null);
11299
- const [foundNode, setFoundNode] = useState10();
11300
- useEffect61(() => {
11348
+ const [foundNode, setFoundNode] = useState11();
11349
+ useEffect62(() => {
11301
11350
  if (nodeKey) {
11302
11351
  editor.getEditorState().read(() => {
11303
11352
  const shortAnswerNode = $getNodeByKey40(nodeKey);
@@ -11311,7 +11360,7 @@ function ShortAnswerQuestionSettings(props) {
11311
11360
  return null;
11312
11361
  }
11313
11362
  return /* @__PURE__ */ jsxs35(Fragment36, { children: [
11314
- /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11363
+ /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11315
11364
  TextInput,
11316
11365
  {
11317
11366
  ref: pointsTextInputRef,
@@ -11338,7 +11387,7 @@ function ShortAnswerQuestionSettings(props) {
11338
11387
  }
11339
11388
  }
11340
11389
  ) }),
11341
- /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11390
+ /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11342
11391
  TextInput,
11343
11392
  {
11344
11393
  ref: maxWordsTextInputRef,
@@ -11369,7 +11418,7 @@ function ShortAnswerQuestionSettings(props) {
11369
11418
  }
11370
11419
 
11371
11420
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionPlugin.tsx
11372
- import { Fragment as Fragment37, jsx as jsx94 } from "react/jsx-runtime";
11421
+ import { Fragment as Fragment37, jsx as jsx95 } from "react/jsx-runtime";
11373
11422
  var INSERT_SHORT_ANSWER_QUESTION_COMMAND = createCommand17("INSERT_SHORT_ANSWER_QUESTION_COMMAND");
11374
11423
  function ShortAnswerQuestionPlugin() {
11375
11424
  const {
@@ -11380,7 +11429,7 @@ function ShortAnswerQuestionPlugin() {
11380
11429
  } = useBlockEditor();
11381
11430
  const [editor] = useLexicalComposerContext52();
11382
11431
  const settingsPanelStickyRef = useRef43(null);
11383
- useEffect62(() => {
11432
+ useEffect63(() => {
11384
11433
  return mergeRegister19(
11385
11434
  editor.registerCommand(
11386
11435
  INSERT_SHORT_ANSWER_QUESTION_COMMAND,
@@ -11414,7 +11463,7 @@ function ShortAnswerQuestionPlugin() {
11414
11463
  const shortAnswerNode = $getNodeByKey41(newNodeKey);
11415
11464
  if ($isShortAnswerQuestionNode(shortAnswerNode)) {
11416
11465
  shortAnswerNode.__notes.update(() => {
11417
- const root = $getRoot13();
11466
+ const root = $getRoot12();
11418
11467
  let firstChild = root.getFirstChild();
11419
11468
  if (!firstChild) {
11420
11469
  firstChild = $createParagraphNode13();
@@ -11436,7 +11485,7 @@ function ShortAnswerQuestionPlugin() {
11436
11485
  )
11437
11486
  );
11438
11487
  }, [editor]);
11439
- useEffect62(() => {
11488
+ useEffect63(() => {
11440
11489
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11441
11490
  registerSettingsPanel(
11442
11491
  ShortAnswerQuestionNode.getType(),
@@ -11444,20 +11493,20 @@ function ShortAnswerQuestionPlugin() {
11444
11493
  );
11445
11494
  }
11446
11495
  }, [isBlockEditorReady]);
11447
- return /* @__PURE__ */ jsx94(Fragment37, { children: drawer && /* @__PURE__ */ jsx94(
11496
+ return /* @__PURE__ */ jsx95(Fragment37, { children: drawer && /* @__PURE__ */ jsx95(
11448
11497
  StickyToPosition,
11449
11498
  {
11450
11499
  ref: settingsPanelStickyRef,
11451
11500
  container: drawer,
11452
11501
  children: (data, position, isVisible) => {
11453
- return /* @__PURE__ */ jsx94("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx94(
11502
+ return /* @__PURE__ */ jsx95("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx95(
11454
11503
  SettingsCard,
11455
11504
  {
11456
11505
  isVisible: !!isVisible,
11457
11506
  container: drawer,
11458
11507
  title: "Short Answer Settings",
11459
11508
  onClose: toggleSettingsPanelSwitch,
11460
- children: isVisible && /* @__PURE__ */ jsx94(
11509
+ children: isVisible && /* @__PURE__ */ jsx95(
11461
11510
  ShortAnswerQuestionSettings,
11462
11511
  {
11463
11512
  nodeKey: data.nodeKey
@@ -11497,7 +11546,7 @@ import {
11497
11546
  Table2
11498
11547
  } from "lucide-react";
11499
11548
  import { useMemo as useMemo8 } from "react";
11500
- import { jsx as jsx95 } from "react/jsx-runtime";
11549
+ import { jsx as jsx96 } from "react/jsx-runtime";
11501
11550
  var handlerStyle3 = {
11502
11551
  display: "flex",
11503
11552
  zIndex: 10,
@@ -11839,7 +11888,7 @@ function AddMenuHandle(props) {
11839
11888
  }
11840
11889
  return menu2;
11841
11890
  }, [hoveredNode]);
11842
- return /* @__PURE__ */ jsx95("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx95(
11891
+ return /* @__PURE__ */ jsx96("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx96(
11843
11892
  DropdownWrapper,
11844
11893
  {
11845
11894
  placement: "bottom-start",
@@ -11850,7 +11899,7 @@ function AddMenuHandle(props) {
11850
11899
  onHideMenu: () => {
11851
11900
  removeVisiblePopup();
11852
11901
  },
11853
- children: /* @__PURE__ */ jsx95("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx95(Icon, { icon: Plus }) })
11902
+ children: /* @__PURE__ */ jsx96("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx96(Icon, { icon: Plus }) })
11854
11903
  }
11855
11904
  ) });
11856
11905
  }
@@ -11888,7 +11937,7 @@ function renderCopyToClipboardMenu(nodeKey, editor) {
11888
11937
  import {
11889
11938
  $createParagraphNode as $createParagraphNode15,
11890
11939
  $getNodeByKey as $getNodeByKey44,
11891
- $getRoot as $getRoot14
11940
+ $getRoot as $getRoot13
11892
11941
  } from "lexical";
11893
11942
  import { Trash2 as Trash23 } from "lucide-react";
11894
11943
  function renderDeleteMenu(nodeKey, editor) {
@@ -11909,7 +11958,7 @@ function renderDeleteMenu(nodeKey, editor) {
11909
11958
  } else if (prevBlock) {
11910
11959
  prevBlock.selectStart();
11911
11960
  } else {
11912
- const root = $getRoot14();
11961
+ const root = $getRoot13();
11913
11962
  const newParagraph = $createParagraphNode15();
11914
11963
  root.append(newParagraph);
11915
11964
  newParagraph.selectStart();
@@ -12180,7 +12229,7 @@ import { HeadingNode as HeadingNode3 } from "@lexical/rich-text";
12180
12229
  import { ParagraphNode as ParagraphNode3 } from "lexical";
12181
12230
  import { GripVertical } from "lucide-react";
12182
12231
  import { useMemo as useMemo9 } from "react";
12183
- import { jsx as jsx96 } from "react/jsx-runtime";
12232
+ import { jsx as jsx97 } from "react/jsx-runtime";
12184
12233
  var handlerStyle4 = {
12185
12234
  display: "flex",
12186
12235
  zIndex: 10,
@@ -12267,7 +12316,7 @@ function DragHandle(props) {
12267
12316
  }
12268
12317
  return menu2;
12269
12318
  }, [hoveredNode, currentEditor]);
12270
- return /* @__PURE__ */ jsx96(
12319
+ return /* @__PURE__ */ jsx97(
12271
12320
  "div",
12272
12321
  {
12273
12322
  id: handlerKey,
@@ -12275,7 +12324,7 @@ function DragHandle(props) {
12275
12324
  ...listeners,
12276
12325
  ...attributes,
12277
12326
  style: handlerStyle4,
12278
- children: /* @__PURE__ */ jsx96(
12327
+ children: /* @__PURE__ */ jsx97(
12279
12328
  DropdownWrapper,
12280
12329
  {
12281
12330
  placement: "bottom-start",
@@ -12286,7 +12335,7 @@ function DragHandle(props) {
12286
12335
  onHideMenu: () => {
12287
12336
  removeVisiblePopup();
12288
12337
  },
12289
- children: /* @__PURE__ */ jsx96("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx96(Icon, { icon: GripVertical }) })
12338
+ children: /* @__PURE__ */ jsx97("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx97(Icon, { icon: GripVertical }) })
12290
12339
  }
12291
12340
  )
12292
12341
  }
@@ -12320,7 +12369,7 @@ function findNodePosition(rows, point, lastFound) {
12320
12369
  }
12321
12370
 
12322
12371
  // src/content/node/NodeDragOverlay.tsx
12323
- import { jsx as jsx97 } from "react/jsx-runtime";
12372
+ import { jsx as jsx98 } from "react/jsx-runtime";
12324
12373
  var overlayStyle2 = {
12325
12374
  display: "flex",
12326
12375
  minWidth: "150px",
@@ -12339,12 +12388,12 @@ var overlayStyle2 = {
12339
12388
  boxShadow: "0 1px 3px rgba(34, 25, 25, 0.4)"
12340
12389
  };
12341
12390
  function NodeDragOverlay(props) {
12342
- return /* @__PURE__ */ jsx97("div", { style: overlayStyle2, children: props.children() });
12391
+ return /* @__PURE__ */ jsx98("div", { style: overlayStyle2, children: props.children() });
12343
12392
  }
12344
12393
 
12345
12394
  // src/content/node/NodeDropMarker.tsx
12346
- import { useEffect as useEffect63, useRef as useRef44 } from "react";
12347
- import { jsx as jsx98 } from "react/jsx-runtime";
12395
+ import { useEffect as useEffect64, useRef as useRef44 } from "react";
12396
+ import { jsx as jsx99 } from "react/jsx-runtime";
12348
12397
  var placeholderStyle3 = {
12349
12398
  position: "absolute",
12350
12399
  top: "calc(-1 * var(--sl-spacing-small) / 2)",
@@ -12363,7 +12412,7 @@ var lineStyle3 = {
12363
12412
  function NodeDropMarker(props) {
12364
12413
  const { visible, top } = props;
12365
12414
  const lineDivRef = useRef44(null);
12366
- useEffect63(() => {
12415
+ useEffect64(() => {
12367
12416
  if (visible && lineDivRef.current) {
12368
12417
  lineDivRef.current.style.transition = "none";
12369
12418
  lineDivRef.current.style.width = "0px";
@@ -12375,7 +12424,7 @@ function NodeDropMarker(props) {
12375
12424
  }, 5);
12376
12425
  }
12377
12426
  }, [visible, top]);
12378
- return /* @__PURE__ */ jsx98("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx98("div", { ref: lineDivRef, style: lineStyle3 }) });
12427
+ return /* @__PURE__ */ jsx99("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx99("div", { ref: lineDivRef, style: lineStyle3 }) });
12379
12428
  }
12380
12429
 
12381
12430
  // src/content/node/NodeDraggableHandleSticky.tsx
@@ -12393,20 +12442,20 @@ import {
12393
12442
  } from "lexical";
12394
12443
  import throttle3 from "lodash-es/throttle";
12395
12444
  import {
12396
- forwardRef as forwardRef11,
12445
+ forwardRef as forwardRef12,
12397
12446
  useImperativeHandle as useImperativeHandle11,
12398
12447
  useRef as useRef45,
12399
- useState as useState11
12448
+ useState as useState12
12400
12449
  } from "react";
12401
- import { Fragment as Fragment38, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
12402
- var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12450
+ import { Fragment as Fragment38, jsx as jsx100, jsxs as jsxs36 } from "react/jsx-runtime";
12451
+ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12403
12452
  const {
12404
12453
  getRegisteredEditor,
12405
12454
  setHandleDragged,
12406
12455
  unsetHandleDragged
12407
12456
  } = useNode();
12408
12457
  const anchorElementRef = useRef45();
12409
- const [isAnchorElementReady, setAnchorElementReady] = useState11(false);
12458
+ const [isAnchorElementReady, setAnchorElementReady] = useState12(false);
12410
12459
  const nodeHandleSticky = useRef45(null);
12411
12460
  const dropMarkerSticky = useRef45(null);
12412
12461
  const nodePositionsRef = useRef45([]);
@@ -12472,7 +12521,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12472
12521
  isHandleVisible: () => !!nodeHandleSticky.current?.isVisible()
12473
12522
  }));
12474
12523
  if (!isAnchorElementReady || !anchorElementRef.current) {
12475
- return /* @__PURE__ */ jsx99(Fragment38, {});
12524
+ return /* @__PURE__ */ jsx100(Fragment38, {});
12476
12525
  }
12477
12526
  return /* @__PURE__ */ jsxs36(
12478
12527
  DndContext4,
@@ -12695,7 +12744,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12695
12744
  unsetHandleDragged();
12696
12745
  },
12697
12746
  children: [
12698
- /* @__PURE__ */ jsx99(
12747
+ /* @__PURE__ */ jsx100(
12699
12748
  StickyToPosition,
12700
12749
  {
12701
12750
  ref: nodeHandleSticky,
@@ -12713,21 +12762,21 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12713
12762
  gap: "6px"
12714
12763
  },
12715
12764
  children: [
12716
- /* @__PURE__ */ jsx99(AddMenuHandle, { hoveredNode: data.hoveredNode }),
12717
- /* @__PURE__ */ jsx99(DragHandle, { hoveredNode: data.hoveredNode })
12765
+ /* @__PURE__ */ jsx100(AddMenuHandle, { hoveredNode: data.hoveredNode }),
12766
+ /* @__PURE__ */ jsx100(DragHandle, { hoveredNode: data.hoveredNode })
12718
12767
  ]
12719
12768
  }
12720
12769
  );
12721
12770
  }
12722
12771
  }
12723
12772
  ),
12724
- /* @__PURE__ */ jsx99(
12773
+ /* @__PURE__ */ jsx100(
12725
12774
  StickyToPosition,
12726
12775
  {
12727
12776
  ref: dropMarkerSticky,
12728
12777
  container: anchorElementRef.current,
12729
12778
  children: (_data, position, isVisible) => {
12730
- return /* @__PURE__ */ jsx99(
12779
+ return /* @__PURE__ */ jsx100(
12731
12780
  NodeDropMarker,
12732
12781
  {
12733
12782
  top: `${position.top}px`,
@@ -12738,8 +12787,8 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12738
12787
  }
12739
12788
  }
12740
12789
  ),
12741
- /* @__PURE__ */ jsx99(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx99(NodeDragOverlay, { children: () => {
12742
- return /* @__PURE__ */ jsx99("div", { children: "Move Block" });
12790
+ /* @__PURE__ */ jsx100(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx100(NodeDragOverlay, { children: () => {
12791
+ return /* @__PURE__ */ jsx100("div", { children: "Move Block" });
12743
12792
  } }) })
12744
12793
  ]
12745
12794
  }
@@ -12747,7 +12796,7 @@ var NodeDraggableHandleSticky = forwardRef11((props, ref) => {
12747
12796
  });
12748
12797
 
12749
12798
  // src/content/node/NodeProvider.tsx
12750
- import { jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
12799
+ import { jsx as jsx101, jsxs as jsxs37 } from "react/jsx-runtime";
12751
12800
  var NodeProviderContext = React18.createContext(null);
12752
12801
  function NodeProvider(props) {
12753
12802
  const { children } = props;
@@ -12818,7 +12867,7 @@ function NodeProvider(props) {
12818
12867
  const getHandleOverNodeKey = () => {
12819
12868
  return handleOverNodeKeyRef.current;
12820
12869
  };
12821
- useEffect64(() => {
12870
+ useEffect65(() => {
12822
12871
  return () => {
12823
12872
  const editorsKeys = Object.keys(editorsRegisterRef.current);
12824
12873
  for (const editorKey of editorsKeys) {
@@ -12849,7 +12898,7 @@ function NodeProvider(props) {
12849
12898
  },
12850
12899
  children: [
12851
12900
  children,
12852
- /* @__PURE__ */ jsx100(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
12901
+ /* @__PURE__ */ jsx101(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
12853
12902
  ]
12854
12903
  }
12855
12904
  );
@@ -12868,18 +12917,18 @@ import { TableNode as TableNode5 } from "@lexical/table";
12868
12917
  import { mergeRegister as mergeRegister20 } from "@lexical/utils";
12869
12918
  import {
12870
12919
  $createParagraphNode as $createParagraphNode17,
12871
- $getRoot as $getRoot15,
12920
+ $getRoot as $getRoot14,
12872
12921
  $isParagraphNode as $isParagraphNode2
12873
12922
  } from "lexical";
12874
- import { useEffect as useEffect65 } from "react";
12875
- import { Fragment as Fragment39, jsx as jsx101 } from "react/jsx-runtime";
12923
+ import { useEffect as useEffect66 } from "react";
12924
+ import { Fragment as Fragment39, jsx as jsx102 } from "react/jsx-runtime";
12876
12925
  function AutoBottomParagraphPlugin() {
12877
12926
  const [editor] = useLexicalComposerContext53();
12878
12927
  const listener = (nodeMutations) => {
12879
12928
  for (const [_key, mutation] of nodeMutations) {
12880
12929
  if (mutation === "created") {
12881
12930
  editor.update(() => {
12882
- const rootNode = $getRoot15();
12931
+ const rootNode = $getRoot14();
12883
12932
  if (rootNode) {
12884
12933
  const lastChild = rootNode.getLastChild();
12885
12934
  if (lastChild && !$isParagraphNode2(lastChild)) {
@@ -12891,7 +12940,7 @@ function AutoBottomParagraphPlugin() {
12891
12940
  }
12892
12941
  }
12893
12942
  };
12894
- useEffect65(() => {
12943
+ useEffect66(() => {
12895
12944
  return mergeRegister20(
12896
12945
  ...[
12897
12946
  ImageNode,
@@ -12914,19 +12963,19 @@ function AutoBottomParagraphPlugin() {
12914
12963
  )
12915
12964
  );
12916
12965
  }, [editor]);
12917
- return /* @__PURE__ */ jsx101(Fragment39, {});
12966
+ return /* @__PURE__ */ jsx102(Fragment39, {});
12918
12967
  }
12919
12968
 
12920
12969
  // src/plugins/AutoFocusPlugin/AutoFocusPlugin.tsx
12921
12970
  import { useLexicalComposerContext as useLexicalComposerContext54 } from "@lexical/react/LexicalComposerContext";
12922
- import { $getRoot as $getRoot16 } from "lexical";
12923
- import { useEffect as useEffect66 } from "react";
12971
+ import { $getRoot as $getRoot15 } from "lexical";
12972
+ import { useEffect as useEffect67 } from "react";
12924
12973
  function AutoFocusPlugin() {
12925
12974
  const [editor] = useLexicalComposerContext54();
12926
- useEffect66(() => {
12975
+ useEffect67(() => {
12927
12976
  setTimeout(() => {
12928
12977
  editor.update(() => {
12929
- const rootNode = $getRoot16();
12978
+ const rootNode = $getRoot15();
12930
12979
  if (rootNode.getChildrenKeys().length >= 1) {
12931
12980
  rootNode.getFirstChild()?.selectStart();
12932
12981
  }
@@ -12941,23 +12990,23 @@ function AutoFocusPlugin() {
12941
12990
 
12942
12991
  // src/plugins/EditorRefPlugin/EditorRefPlugin.tsx
12943
12992
  import { useLexicalComposerContext as useLexicalComposerContext55 } from "@lexical/react/LexicalComposerContext";
12944
- import { useEffect as useEffect67 } from "react";
12993
+ import { useEffect as useEffect68 } from "react";
12945
12994
  function EditorRefPlugin(props) {
12946
12995
  const [editor] = useLexicalComposerContext55();
12947
12996
  const { onMountRef } = props;
12948
- useEffect67(() => {
12997
+ useEffect68(() => {
12949
12998
  onMountRef(editor);
12950
12999
  }, [editor]);
12951
13000
  return null;
12952
13001
  }
12953
13002
 
12954
13003
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
12955
- import { useEffect as useEffect68 } from "react";
13004
+ import { useEffect as useEffect69 } from "react";
12956
13005
  import { useLexicalComposerContext as useLexicalComposerContext56 } from "@lexical/react/LexicalComposerContext";
12957
13006
 
12958
13007
  // src/plugins/MarkdownPlugin/markdown/MarkdownExport.ts
12959
13008
  import {
12960
- $getRoot as $getRoot17,
13009
+ $getRoot as $getRoot16,
12961
13010
  $isDecoratorNode,
12962
13011
  $isElementNode as $isElementNode3,
12963
13012
  $isLineBreakNode as $isLineBreakNode2,
@@ -13219,7 +13268,7 @@ import {
13219
13268
  $createLineBreakNode as $createLineBreakNode2,
13220
13269
  $createParagraphNode as $createParagraphNode18,
13221
13270
  $createTextNode as $createTextNode5,
13222
- $getRoot as $getRoot18,
13271
+ $getRoot as $getRoot17,
13223
13272
  $getSelection as $getSelection8,
13224
13273
  $isParagraphNode as $isParagraphNode4
13225
13274
  } from "lexical";
@@ -13826,7 +13875,7 @@ var TRANSFORMERS = [
13826
13875
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
13827
13876
  function MarkdownPlugin() {
13828
13877
  const [editor] = useLexicalComposerContext56();
13829
- useEffect68(() => {
13878
+ useEffect69(() => {
13830
13879
  return registerMarkdownShortcuts(editor, TRANSFORMERS);
13831
13880
  }, [editor]);
13832
13881
  return null;
@@ -13834,8 +13883,8 @@ function MarkdownPlugin() {
13834
13883
 
13835
13884
  // src/plugins/NodeMousePlugin/NodeMouseAnchorPlugin.tsx
13836
13885
  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";
13886
+ import { useEffect as useEffect70, useRef as useRef47 } from "react";
13887
+ import { Fragment as Fragment40, jsx as jsx103 } from "react/jsx-runtime";
13839
13888
  function NodeMouseAnchorPlugin() {
13840
13889
  const [editor] = useLexicalComposerContext57();
13841
13890
  const { setAnchorElement, hideHandles } = useNode();
@@ -13852,7 +13901,7 @@ function NodeMouseAnchorPlugin() {
13852
13901
  }
13853
13902
  hideHandles();
13854
13903
  };
13855
- useEffect69(() => {
13904
+ useEffect70(() => {
13856
13905
  const removeRootListener = editor.registerRootListener(
13857
13906
  (nextRootElem) => {
13858
13907
  if (nextRootElem?.parentElement) {
@@ -13885,7 +13934,7 @@ function NodeMouseAnchorPlugin() {
13885
13934
  removeRootListener();
13886
13935
  };
13887
13936
  }, [editor]);
13888
- return /* @__PURE__ */ jsx102(Fragment40, {});
13937
+ return /* @__PURE__ */ jsx103(Fragment40, {});
13889
13938
  }
13890
13939
 
13891
13940
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
@@ -13903,13 +13952,13 @@ import {
13903
13952
  $createParagraphNode as $createParagraphNode19,
13904
13953
  $createTextNode as $createTextNode7,
13905
13954
  $getNodeByKey as $getNodeByKey50,
13906
- $getRoot as $getRoot19,
13955
+ $getRoot as $getRoot18,
13907
13956
  $isParagraphNode as $isParagraphNode5,
13908
13957
  ParagraphNode as ParagraphNode4
13909
13958
  } from "lexical";
13910
13959
  import debounce4 from "lodash-es/debounce";
13911
13960
  import uniqueId2 from "lodash-es/uniqueId";
13912
- import { useEffect as useEffect70, useRef as useRef48 } from "react";
13961
+ import { useEffect as useEffect71, useRef as useRef48 } from "react";
13913
13962
 
13914
13963
  // src/plugins/NodeMousePlugin/nodeUtils.ts
13915
13964
  function getNodePosition2(element, parent) {
@@ -13925,7 +13974,7 @@ function getNodePosition2(element, parent) {
13925
13974
  }
13926
13975
 
13927
13976
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
13928
- import { Fragment as Fragment41, jsx as jsx103 } from "react/jsx-runtime";
13977
+ import { Fragment as Fragment41, jsx as jsx104 } from "react/jsx-runtime";
13929
13978
  function NodeMousePlugin() {
13930
13979
  const [editor] = useLexicalComposerContext58();
13931
13980
  const editorUniqueIdRef = useRef48(uniqueId2("editor"));
@@ -14201,7 +14250,7 @@ function NodeMousePlugin() {
14201
14250
  }
14202
14251
  let childrenCount = 0;
14203
14252
  editor.getEditorState().read(() => {
14204
- const rootNode = $getRoot19();
14253
+ const rootNode = $getRoot18();
14205
14254
  if (rootNode) {
14206
14255
  const childrenKeys = rootNode.getChildrenKeys();
14207
14256
  childrenCount = childrenKeys.length;
@@ -14209,7 +14258,7 @@ function NodeMousePlugin() {
14209
14258
  });
14210
14259
  if (childrenCount === 0) {
14211
14260
  editor.update(() => {
14212
- const rootNode = $getRoot19();
14261
+ const rootNode = $getRoot18();
14213
14262
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14214
14263
  const newParagraph = $createParagraphNode19();
14215
14264
  newParagraph.append($createTextNode7());
@@ -14219,7 +14268,7 @@ function NodeMousePlugin() {
14219
14268
  }
14220
14269
  refreshHelpersPositions();
14221
14270
  };
14222
- useEffect70(() => {
14271
+ useEffect71(() => {
14223
14272
  window.addEventListener(
14224
14273
  RESIZE_CONTENT_EVENT,
14225
14274
  refreshHelpersPositions
@@ -14231,7 +14280,7 @@ function NodeMousePlugin() {
14231
14280
  );
14232
14281
  };
14233
14282
  }, []);
14234
- useEffect70(() => {
14283
+ useEffect71(() => {
14235
14284
  registerEditor(editorUniqueIdRef.current, editor);
14236
14285
  const removeRegistration = mergeRegister21(
14237
14286
  ...[
@@ -14267,7 +14316,7 @@ function NodeMousePlugin() {
14267
14316
  if (nextRootElem) {
14268
14317
  let childrenCount = 0;
14269
14318
  editor.getEditorState().read(() => {
14270
- const rootNode = $getRoot19();
14319
+ const rootNode = $getRoot18();
14271
14320
  if (rootNode) {
14272
14321
  const childrenKeys = rootNode.getChildrenKeys();
14273
14322
  childrenCount = childrenKeys.length;
@@ -14279,7 +14328,7 @@ function NodeMousePlugin() {
14279
14328
  });
14280
14329
  if (childrenCount === 0) {
14281
14330
  editor.update(() => {
14282
- const rootNode = $getRoot19();
14331
+ const rootNode = $getRoot18();
14283
14332
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14284
14333
  const newParagraph = $createParagraphNode19();
14285
14334
  newParagraph.append($createTextNode7());
@@ -14295,7 +14344,7 @@ function NodeMousePlugin() {
14295
14344
  removeRegistration();
14296
14345
  };
14297
14346
  }, [editor]);
14298
- return /* @__PURE__ */ jsx103(Fragment41, {});
14347
+ return /* @__PURE__ */ jsx104(Fragment41, {});
14299
14348
  }
14300
14349
 
14301
14350
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
@@ -14309,7 +14358,7 @@ import {
14309
14358
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW13,
14310
14359
  PASTE_COMMAND
14311
14360
  } from "lexical";
14312
- import { useEffect as useEffect71 } from "react";
14361
+ import { useEffect as useEffect72 } from "react";
14313
14362
 
14314
14363
  // src/plugins/NodePastePlugin/regenerateIdsInQuestion.ts
14315
14364
  import { nanoid as nanoid10 } from "nanoid";
@@ -14356,10 +14405,10 @@ function regenerateIdsInQuestion(serializedNode) {
14356
14405
  }
14357
14406
 
14358
14407
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
14359
- import { Fragment as Fragment42, jsx as jsx104 } from "react/jsx-runtime";
14408
+ import { Fragment as Fragment42, jsx as jsx105 } from "react/jsx-runtime";
14360
14409
  function NodePastePlugin() {
14361
14410
  const [editor] = useLexicalComposerContext59();
14362
- useEffect71(() => {
14411
+ useEffect72(() => {
14363
14412
  return mergeRegister22(
14364
14413
  editor.registerCommand(
14365
14414
  PASTE_COMMAND,
@@ -14438,20 +14487,20 @@ function NodePastePlugin() {
14438
14487
  )
14439
14488
  );
14440
14489
  }, [editor]);
14441
- return /* @__PURE__ */ jsx104(Fragment42, {});
14490
+ return /* @__PURE__ */ jsx105(Fragment42, {});
14442
14491
  }
14443
14492
 
14444
14493
  // src/components/inputs/PopupToolbar.tsx
14445
14494
  import clsx5 from "clsx";
14446
14495
  import {
14447
- forwardRef as forwardRef12,
14448
- useEffect as useEffect72,
14496
+ forwardRef as forwardRef13,
14497
+ useEffect as useEffect73,
14449
14498
  useImperativeHandle as useImperativeHandle12,
14450
14499
  useMemo as useMemo10,
14451
14500
  useRef as useRef49
14452
14501
  } from "react";
14453
- import { Fragment as Fragment43, jsx as jsx105, jsxs as jsxs38 } from "react/jsx-runtime";
14454
- var PopupToolbar = forwardRef12((props, ref) => {
14502
+ import { Fragment as Fragment43, jsx as jsx106, jsxs as jsxs38 } from "react/jsx-runtime";
14503
+ var PopupToolbar = forwardRef13((props, ref) => {
14455
14504
  const { onEscape, menu, toolbar } = props;
14456
14505
  const popupRef = useRef49(null);
14457
14506
  const toolbarRef = useRef49(null);
@@ -14483,7 +14532,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14483
14532
  menuItemAttributes.checked = menuItemSelected;
14484
14533
  menuItemAttributes.type = "checkbox";
14485
14534
  }
14486
- let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx105(
14535
+ let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx106(
14487
14536
  DropdownButton,
14488
14537
  {
14489
14538
  size: "medium",
@@ -14508,15 +14557,15 @@ var PopupToolbar = forwardRef12((props, ref) => {
14508
14557
  }
14509
14558
  },
14510
14559
  children: [
14511
- MenuItemIcon && /* @__PURE__ */ jsx105(Icon, { slot: "prefix", icon: MenuItemIcon }),
14560
+ MenuItemIcon && /* @__PURE__ */ jsx106(Icon, { slot: "prefix", icon: MenuItemIcon }),
14512
14561
  menuItemLabel,
14513
- menuItemIsError && /* @__PURE__ */ jsx105(DotBadge, { variant: "danger" })
14562
+ menuItemIsError && /* @__PURE__ */ jsx106(DotBadge, { variant: "danger" })
14514
14563
  ]
14515
14564
  },
14516
14565
  `menuItem${menuItemId}`
14517
14566
  );
14518
14567
  if (tooltip && !menuItem.subMenu) {
14519
- buttonElement = /* @__PURE__ */ jsx105(
14568
+ buttonElement = /* @__PURE__ */ jsx106(
14520
14569
  "sl-tooltip",
14521
14570
  {
14522
14571
  content: tooltip,
@@ -14567,7 +14616,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14567
14616
  onEscape();
14568
14617
  }
14569
14618
  }
14570
- useEffect72(() => {
14619
+ useEffect73(() => {
14571
14620
  if (onEscape) {
14572
14621
  toolbarRef.current?.addEventListener("keydown", handleKeyDown);
14573
14622
  return () => {
@@ -14578,7 +14627,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14578
14627
  };
14579
14628
  }
14580
14629
  }, [onEscape]);
14581
- return /* @__PURE__ */ jsx105(Fragment43, { children: /* @__PURE__ */ jsx105(
14630
+ return /* @__PURE__ */ jsx106(Fragment43, { children: /* @__PURE__ */ jsx106(
14582
14631
  "sl-popup",
14583
14632
  {
14584
14633
  ref: popupRef,
@@ -14586,7 +14635,7 @@ var PopupToolbar = forwardRef12((props, ref) => {
14586
14635
  shift: true,
14587
14636
  "auto-size": "horizontal",
14588
14637
  strategy: "fixed",
14589
- children: toolbar || /* @__PURE__ */ jsx105("sl-button-group", { ref: toolbarRef, children: menuItems })
14638
+ children: toolbar || /* @__PURE__ */ jsx106("sl-button-group", { ref: toolbarRef, children: menuItems })
14590
14639
  }
14591
14640
  ) });
14592
14641
  });
@@ -14638,16 +14687,16 @@ var bgColorList = [
14638
14687
  ];
14639
14688
 
14640
14689
  // src/components/feedback/ProgressBar.tsx
14641
- import { jsx as jsx106 } from "react/jsx-runtime";
14690
+ import { jsx as jsx107 } from "react/jsx-runtime";
14642
14691
  function ProgressBar() {
14643
- return /* @__PURE__ */ jsx106("sl-progress-bar", { indeterminate: "indeterminate" });
14692
+ return /* @__PURE__ */ jsx107("sl-progress-bar", { indeterminate: "indeterminate" });
14644
14693
  }
14645
14694
 
14646
14695
  // src/components/layouts/Stack.tsx
14647
- import { jsx as jsx107 } from "react/jsx-runtime";
14696
+ import { jsx as jsx108 } from "react/jsx-runtime";
14648
14697
  function Stack(props) {
14649
14698
  const { id, style, className, slot, children } = props;
14650
- return /* @__PURE__ */ jsx107(
14699
+ return /* @__PURE__ */ jsx108(
14651
14700
  "div",
14652
14701
  {
14653
14702
  id,
@@ -14661,13 +14710,13 @@ function Stack(props) {
14661
14710
 
14662
14711
  // src/components/dialogs/FormDialog.tsx
14663
14712
  import {
14664
- forwardRef as forwardRef13,
14665
- useEffect as useEffect73,
14713
+ forwardRef as forwardRef14,
14714
+ useEffect as useEffect74,
14666
14715
  useImperativeHandle as useImperativeHandle13,
14667
14716
  useRef as useRef50
14668
14717
  } from "react";
14669
- import { jsx as jsx108, jsxs as jsxs39 } from "react/jsx-runtime";
14670
- var FormDialog = forwardRef13((props, ref) => {
14718
+ import { jsx as jsx109, jsxs as jsxs39 } from "react/jsx-runtime";
14719
+ var FormDialog = forwardRef14((props, ref) => {
14671
14720
  const {
14672
14721
  id,
14673
14722
  actionName,
@@ -14730,7 +14779,7 @@ var FormDialog = forwardRef13((props, ref) => {
14730
14779
  onHide();
14731
14780
  }
14732
14781
  };
14733
- useEffect73(() => {
14782
+ useEffect74(() => {
14734
14783
  window.customElements.whenDefined("sl-dialog").then(() => {
14735
14784
  if (dialogRef.current) {
14736
14785
  dialogRef.current.addEventListener(
@@ -14764,7 +14813,7 @@ var FormDialog = forwardRef13((props, ref) => {
14764
14813
  }
14765
14814
  };
14766
14815
  }, [onCancel]);
14767
- useEffect73(() => {
14816
+ useEffect74(() => {
14768
14817
  window.addEventListener(
14769
14818
  FORM_DIALOG_OPEN_EVENT,
14770
14819
  handleOpenByEvent
@@ -14794,13 +14843,13 @@ var FormDialog = forwardRef13((props, ref) => {
14794
14843
  }
14795
14844
  };
14796
14845
  });
14797
- return /* @__PURE__ */ jsx108("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs39(
14846
+ return /* @__PURE__ */ jsx109("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs39(
14798
14847
  "sl-dialog",
14799
14848
  {
14800
14849
  class: `dialog_control ${className}`,
14801
14850
  ref: dialogRef,
14802
14851
  children: [
14803
- /* @__PURE__ */ jsx108("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs39(
14852
+ /* @__PURE__ */ jsx109("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs39(
14804
14853
  Stack,
14805
14854
  {
14806
14855
  className: "stack__gap-3 stack__row",
@@ -14811,13 +14860,13 @@ var FormDialog = forwardRef13((props, ref) => {
14811
14860
  },
14812
14861
  children: [
14813
14862
  headerControls,
14814
- /* @__PURE__ */ jsx108("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx108("span", { className: "font-medium font-w-semibold", children: title }) })
14863
+ /* @__PURE__ */ jsx109("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx109("span", { className: "font-medium font-w-semibold", children: title }) })
14815
14864
  ]
14816
14865
  }
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 }),
14866
+ ) : /* @__PURE__ */ jsx109("span", { className: "font-medium font-w-semibold", children: title }) }),
14867
+ loading && /* @__PURE__ */ jsx109(ProgressBar, {}),
14868
+ /* @__PURE__ */ jsx109("input", { type: "hidden", name: "formDialogId", value: id }),
14869
+ /* @__PURE__ */ jsx109("input", { type: "hidden", name: "action", value: actionName }),
14821
14870
  children,
14822
14871
  /* @__PURE__ */ jsxs39(
14823
14872
  Stack,
@@ -14826,14 +14875,14 @@ var FormDialog = forwardRef13((props, ref) => {
14826
14875
  className: "stack__row stack__gap-4",
14827
14876
  style: { width: "100%", flexWrap: "nowrap" },
14828
14877
  children: [
14829
- extraControl && /* @__PURE__ */ jsx108("div", { style: { flexGrow: 0 }, children: extraControl }),
14878
+ extraControl && /* @__PURE__ */ jsx109("div", { style: { flexGrow: 0 }, children: extraControl }),
14830
14879
  /* @__PURE__ */ jsxs39(
14831
14880
  Stack,
14832
14881
  {
14833
14882
  className: "stack__row stack__gap-4",
14834
14883
  style: { flexGrow: 1, justifyContent: "end" },
14835
14884
  children: [
14836
- /* @__PURE__ */ jsx108("div", { children: /* @__PURE__ */ jsx108(
14885
+ /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
14837
14886
  Button,
14838
14887
  {
14839
14888
  slot: "footer",
@@ -14845,7 +14894,7 @@ var FormDialog = forwardRef13((props, ref) => {
14845
14894
  onClick: handleCancel
14846
14895
  }
14847
14896
  ) }),
14848
- /* @__PURE__ */ jsx108("div", { children: /* @__PURE__ */ jsx108(
14897
+ /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
14849
14898
  Button,
14850
14899
  {
14851
14900
  slot: "footer",
@@ -14879,16 +14928,16 @@ import {
14879
14928
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR14,
14880
14929
  createCommand as createCommand18
14881
14930
  } 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";
14931
+ import { useEffect as useEffect75, useRef as useRef51, useState as useState13 } from "react";
14932
+ import { jsx as jsx110, jsxs as jsxs40 } from "react/jsx-runtime";
14884
14933
  var SHOW_LINK_EDITOR_COMMAND = createCommand18("SHOW_LINK_EDITOR_COMMAND");
14885
14934
  function LinkEditorPlugin() {
14886
14935
  const [editor] = useLexicalComposerContext60();
14887
14936
  const formDialogRef = useRef51(null);
14888
14937
  const linkUrlInputRef = useRef51(null);
14889
- const [openInNew, setOpenInNew] = useState12(false);
14938
+ const [openInNew, setOpenInNew] = useState13(false);
14890
14939
  const activeEditorRef = useRef51();
14891
- useEffect74(() => {
14940
+ useEffect75(() => {
14892
14941
  return mergeRegister23(
14893
14942
  editor.registerCommand(
14894
14943
  SHOW_LINK_EDITOR_COMMAND,
@@ -14913,7 +14962,7 @@ function LinkEditorPlugin() {
14913
14962
  )
14914
14963
  );
14915
14964
  }, [editor]);
14916
- return /* @__PURE__ */ jsx109(
14965
+ return /* @__PURE__ */ jsx110(
14917
14966
  FormDialog,
14918
14967
  {
14919
14968
  ref: formDialogRef,
@@ -14950,8 +14999,8 @@ function LinkEditorPlugin() {
14950
14999
  onCancel: () => {
14951
15000
  formDialogRef.current?.close();
14952
15001
  },
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(
15002
+ children: /* @__PURE__ */ jsx110("div", { style: { width: "450px" }, children: /* @__PURE__ */ jsxs40(Stack, { className: "stack__column stack__gap-4", children: [
15003
+ /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
14955
15004
  TextInput,
14956
15005
  {
14957
15006
  ref: linkUrlInputRef,
@@ -14961,7 +15010,7 @@ function LinkEditorPlugin() {
14961
15010
  defaultValue: ""
14962
15011
  }
14963
15012
  ) }),
14964
- /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(
15013
+ /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
14965
15014
  Checkbox,
14966
15015
  {
14967
15016
  size: "small",
@@ -14980,16 +15029,16 @@ function LinkEditorPlugin() {
14980
15029
 
14981
15030
  // src/components/inputs/PopupHighlight.tsx
14982
15031
  import {
14983
- forwardRef as forwardRef14,
15032
+ forwardRef as forwardRef15,
14984
15033
  useImperativeHandle as useImperativeHandle14,
14985
15034
  useRef as useRef52,
14986
- useState as useState13
15035
+ useState as useState14
14987
15036
  } from "react";
14988
- import { jsx as jsx110 } from "react/jsx-runtime";
14989
- var PopupHighlighter = forwardRef14((props, ref) => {
15037
+ import { jsx as jsx111 } from "react/jsx-runtime";
15038
+ var PopupHighlighter = forwardRef15((props, ref) => {
14990
15039
  const { highlighterClassName } = props;
14991
15040
  const popupRef = useRef52(null);
14992
- const [popupRect, setPopupRect] = useState13();
15041
+ const [popupRect, setPopupRect] = useState14();
14993
15042
  function hidePopup() {
14994
15043
  if (popupRef.current) {
14995
15044
  popupRef.current.active = false;
@@ -15020,7 +15069,7 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15020
15069
  }
15021
15070
  }
15022
15071
  }));
15023
- return /* @__PURE__ */ jsx110("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx110("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx110(
15072
+ return /* @__PURE__ */ jsx111("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx111("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx111(
15024
15073
  "div",
15025
15074
  {
15026
15075
  className: highlighterClassName,
@@ -15029,7 +15078,7 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15029
15078
  "--variable-placeholder-height": `${popupRect?.height || 0}px`
15030
15079
  }
15031
15080
  }
15032
- ) : /* @__PURE__ */ jsx110(
15081
+ ) : /* @__PURE__ */ jsx111(
15033
15082
  "div",
15034
15083
  {
15035
15084
  style: {
@@ -15048,16 +15097,16 @@ var PopupHighlighter = forwardRef14((props, ref) => {
15048
15097
 
15049
15098
  // src/components/inputs/PopupMenu.tsx
15050
15099
  import {
15051
- forwardRef as forwardRef15,
15052
- useEffect as useEffect75,
15100
+ forwardRef as forwardRef16,
15101
+ useEffect as useEffect76,
15053
15102
  useImperativeHandle as useImperativeHandle15,
15054
15103
  useLayoutEffect,
15055
15104
  useMemo as useMemo11,
15056
15105
  useRef as useRef53,
15057
- useState as useState14
15106
+ useState as useState15
15058
15107
  } from "react";
15059
- import { Fragment as Fragment44, jsx as jsx111, jsxs as jsxs41 } from "react/jsx-runtime";
15060
- var PopupMenu = forwardRef15(
15108
+ import { Fragment as Fragment44, jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
15109
+ var PopupMenu = forwardRef16(
15061
15110
  (props, ref) => {
15062
15111
  const {
15063
15112
  onEscape,
@@ -15067,7 +15116,7 @@ var PopupMenu = forwardRef15(
15067
15116
  } = props;
15068
15117
  const popupRef = useRef53(null);
15069
15118
  const menuRef = useRef53(null);
15070
- const [itemsFilter, setItemsFilter] = useState14();
15119
+ const [itemsFilter, setItemsFilter] = useState15();
15071
15120
  function hidePopup() {
15072
15121
  if (popupRef.current) {
15073
15122
  popupRef.current.active = false;
@@ -15136,11 +15185,11 @@ var PopupMenu = forwardRef15(
15136
15185
  } = menuItem;
15137
15186
  if (menuItemDivider) {
15138
15187
  resultList.push(
15139
- /* @__PURE__ */ jsx111("sl-divider", {}, `menuItem${menuItemId}`)
15188
+ /* @__PURE__ */ jsx112("sl-divider", {}, `menuItem${menuItemId}`)
15140
15189
  );
15141
15190
  } else if (menuItemIsGroup) {
15142
15191
  resultList.push(
15143
- /* @__PURE__ */ jsx111("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15192
+ /* @__PURE__ */ jsx112("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15144
15193
  );
15145
15194
  } else {
15146
15195
  const menuItemAttributes = {};
@@ -15159,9 +15208,9 @@ var PopupMenu = forwardRef15(
15159
15208
  class: menuItemClassName,
15160
15209
  ...menuItemAttributes,
15161
15210
  children: [
15162
- MenuItemIcon && /* @__PURE__ */ jsx111(Icon, { slot: "prefix", icon: MenuItemIcon }),
15211
+ MenuItemIcon && /* @__PURE__ */ jsx112(Icon, { slot: "prefix", icon: MenuItemIcon }),
15163
15212
  menuItemLabel,
15164
- menuItemIsError && /* @__PURE__ */ jsx111(DotBadge, { variant: "danger" })
15213
+ menuItemIsError && /* @__PURE__ */ jsx112(DotBadge, { variant: "danger" })
15165
15214
  ]
15166
15215
  },
15167
15216
  `menuItem${menuItemId}`
@@ -15184,7 +15233,7 @@ var PopupMenu = forwardRef15(
15184
15233
  }
15185
15234
  if (constMenu.length > 0) {
15186
15235
  if (resultList.length > 0) {
15187
- resultList.push(/* @__PURE__ */ jsx111("sl-divider", {}, "const-menu-divider"));
15236
+ resultList.push(/* @__PURE__ */ jsx112("sl-divider", {}, "const-menu-divider"));
15188
15237
  }
15189
15238
  resultList = resultList.concat(createMenuList(constMenu));
15190
15239
  }
@@ -15296,7 +15345,7 @@ var PopupMenu = forwardRef15(
15296
15345
  onEscape();
15297
15346
  }
15298
15347
  }
15299
- useEffect75(() => {
15348
+ useEffect76(() => {
15300
15349
  if (onEscape) {
15301
15350
  popupRef.current?.addEventListener("keydown", handleKeyDown);
15302
15351
  menuRef.current?.addEventListener("keydown", handleKeyDown);
@@ -15312,7 +15361,7 @@ var PopupMenu = forwardRef15(
15312
15361
  };
15313
15362
  }
15314
15363
  }, [onEscape]);
15315
- return /* @__PURE__ */ jsx111(Fragment44, { children: /* @__PURE__ */ jsx111(
15364
+ return /* @__PURE__ */ jsx112(Fragment44, { children: /* @__PURE__ */ jsx112(
15316
15365
  "sl-popup",
15317
15366
  {
15318
15367
  ref: popupRef,
@@ -15324,7 +15373,7 @@ var PopupMenu = forwardRef15(
15324
15373
  strategy: "fixed",
15325
15374
  "auto-size": "vertical",
15326
15375
  "auto-size-padding": "10",
15327
- children: /* @__PURE__ */ jsx111(
15376
+ children: /* @__PURE__ */ jsx112(
15328
15377
  "sl-menu",
15329
15378
  {
15330
15379
  ref: menuRef,
@@ -15489,23 +15538,23 @@ function visitVariableNodes(rootNode, cb) {
15489
15538
  }
15490
15539
 
15491
15540
  // src/plugins/VariablesPlugin/VariablesContext.tsx
15492
- import { $getRoot as $getRoot20 } from "lexical";
15541
+ import { $getRoot as $getRoot19 } from "lexical";
15493
15542
  import React22, {
15494
15543
  useContext as useContext4,
15495
- useEffect as useEffect76,
15496
- useState as useState15
15544
+ useEffect as useEffect77,
15545
+ useState as useState16
15497
15546
  } from "react";
15498
- import { jsx as jsx112 } from "react/jsx-runtime";
15547
+ import { jsx as jsx113 } from "react/jsx-runtime";
15499
15548
  var VariablesContext = React22.createContext(null);
15500
15549
  function VariablesProvider(props) {
15501
15550
  const { getEditor, getAllNestedEditors } = useBlockEditor();
15502
15551
  const { children, variablesSettings } = props;
15503
- const [variableList, setVariableList] = useState15(
15552
+ const [variableList, setVariableList] = useState16(
15504
15553
  variablesSettings.list
15505
15554
  );
15506
15555
  const updateVariablesInEditor = (newName, oldName, editor) => {
15507
15556
  editor.update(() => {
15508
- visitVariableNodes($getRoot20(), (variableNode) => {
15557
+ visitVariableNodes($getRoot19(), (variableNode) => {
15509
15558
  if (variableNode.__variable === oldName) {
15510
15559
  variableNode.setVariable(newName);
15511
15560
  }
@@ -15524,7 +15573,7 @@ function VariablesProvider(props) {
15524
15573
  setVariableSelection(editorRef, newName);
15525
15574
  }
15526
15575
  };
15527
- useEffect76(() => {
15576
+ useEffect77(() => {
15528
15577
  setVariableList(variablesSettings.list);
15529
15578
  }, [variablesSettings]);
15530
15579
  const handleOnCreated = (name) => {
@@ -15536,7 +15585,7 @@ function VariablesProvider(props) {
15536
15585
  renameVariable(newName, oldName);
15537
15586
  variablesSettings.onUpdated(newName, oldName);
15538
15587
  };
15539
- return /* @__PURE__ */ jsx112(
15588
+ return /* @__PURE__ */ jsx113(
15540
15589
  VariablesContext.Provider,
15541
15590
  {
15542
15591
  value: {
@@ -15656,8 +15705,8 @@ import {
15656
15705
  KEY_ESCAPE_COMMAND,
15657
15706
  createCommand as createCommand19
15658
15707
  } 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";
15708
+ import { useEffect as useEffect78, useMemo as useMemo12, useRef as useRef54 } from "react";
15709
+ import { Fragment as Fragment45, jsx as jsx114, jsxs as jsxs42 } from "react/jsx-runtime";
15661
15710
  var CREATE_VARIABLE_FROM_SELECTION_COMMAND = createCommand19("CREATE_VARIABLE_FROM_SELECTION_COMMAND");
15662
15711
  function TypeaheadVariablePlugin() {
15663
15712
  const { variableList, onCreated } = useVariables();
@@ -15811,7 +15860,7 @@ function TypeaheadVariablePlugin() {
15811
15860
  }
15812
15861
  return false;
15813
15862
  };
15814
- useEffect77(() => {
15863
+ useEffect78(() => {
15815
15864
  return mergeRegister24(
15816
15865
  editor.registerCommand(
15817
15866
  TYPEAHEAD_VARIABLE_COMMAND,
@@ -15895,7 +15944,7 @@ function TypeaheadVariablePlugin() {
15895
15944
  );
15896
15945
  }, [variableList, activeDecoratorRef.current]);
15897
15946
  return /* @__PURE__ */ jsxs42(Fragment45, { children: [
15898
- /* @__PURE__ */ jsx113(
15947
+ /* @__PURE__ */ jsx114(
15899
15948
  PopupMenu,
15900
15949
  {
15901
15950
  ref: popupRef,
@@ -15903,7 +15952,7 @@ function TypeaheadVariablePlugin() {
15903
15952
  menu
15904
15953
  }
15905
15954
  ),
15906
- /* @__PURE__ */ jsx113(
15955
+ /* @__PURE__ */ jsx114(
15907
15956
  PopupHighlighter,
15908
15957
  {
15909
15958
  highlighterClassName: "variable-placeholder",
@@ -16050,19 +16099,19 @@ import {
16050
16099
  } from "lucide-react";
16051
16100
  import {
16052
16101
  useCallback as useCallback9,
16053
- useEffect as useEffect78,
16102
+ useEffect as useEffect79,
16054
16103
  useMemo as useMemo13,
16055
16104
  useRef as useRef55,
16056
- useState as useState16
16105
+ useState as useState17
16057
16106
  } from "react";
16058
- import { jsx as jsx114 } from "react/jsx-runtime";
16107
+ import { jsx as jsx115 } from "react/jsx-runtime";
16059
16108
  function TextToolbarPlugin() {
16060
16109
  const { hasModule } = useBlockEditor();
16061
16110
  const [editor] = useLexicalComposerContext62();
16062
16111
  const popupToolbarRef = useRef55(null);
16063
16112
  const activeEditorRef = useRef55(void 0);
16064
16113
  const activeDecoratorRef = useRef55(void 0);
16065
- const [toolbarState, setToolbarState] = useState16({
16114
+ const [toolbarState, setToolbarState] = useState17({
16066
16115
  isBold: false,
16067
16116
  isItalic: false,
16068
16117
  isUnderline: false,
@@ -16077,7 +16126,7 @@ function TextToolbarPlugin() {
16077
16126
  textAlign: "left"
16078
16127
  });
16079
16128
  const selectedNodeRef = useRef55(null);
16080
- const [selectionType, setSelectionType] = useState16("paragraph");
16129
+ const [selectionType, setSelectionType] = useState17("paragraph");
16081
16130
  const formatText = (format) => {
16082
16131
  activeEditorRef.current?.update(() => {
16083
16132
  const selection = $getSelection14();
@@ -16325,7 +16374,7 @@ function TextToolbarPlugin() {
16325
16374
  }
16326
16375
  }
16327
16376
  };
16328
- useEffect78(() => {
16377
+ useEffect79(() => {
16329
16378
  return mergeRegister25(
16330
16379
  editor.registerCommand(
16331
16380
  TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -16475,7 +16524,7 @@ function TextToolbarPlugin() {
16475
16524
  popupToolbarRef.current.hideToolbar();
16476
16525
  }
16477
16526
  }
16478
- useEffect78(() => {
16527
+ useEffect79(() => {
16479
16528
  window.addEventListener("scroll", repositionPopupToolbar);
16480
16529
  window.addEventListener("resize", repositionPopupToolbar);
16481
16530
  document.addEventListener("selectstart", handleSelectionStart);
@@ -16808,7 +16857,7 @@ function TextToolbarPlugin() {
16808
16857
  }
16809
16858
  return resultList;
16810
16859
  }, [toolbarState, selectionType, activeEditorRef.current]);
16811
- return /* @__PURE__ */ jsx114(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
16860
+ return /* @__PURE__ */ jsx115(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
16812
16861
  }
16813
16862
 
16814
16863
  // src/plugins/TypeaheadMenuPlugin/renderCalloutModuleMenu.tsx
@@ -17280,7 +17329,7 @@ import { mergeRegister as mergeRegister26 } from "@lexical/utils";
17280
17329
  import {
17281
17330
  $createParagraphNode as $createParagraphNode22,
17282
17331
  $getNodeByKey as $getNodeByKey53,
17283
- $getRoot as $getRoot21,
17332
+ $getRoot as $getRoot20,
17284
17333
  $getSelection as $getSelection15,
17285
17334
  $isParagraphNode as $isParagraphNode7,
17286
17335
  $isRangeSelection as $isRangeSelection10,
@@ -17291,7 +17340,7 @@ import {
17291
17340
  KEY_ENTER_COMMAND as KEY_ENTER_COMMAND3,
17292
17341
  KEY_ESCAPE_COMMAND as KEY_ESCAPE_COMMAND3
17293
17342
  } from "lexical";
17294
- import { useEffect as useEffect79, useMemo as useMemo14, useRef as useRef56, useState as useState17 } from "react";
17343
+ import { useEffect as useEffect80, useMemo as useMemo14, useRef as useRef56, useState as useState18 } from "react";
17295
17344
 
17296
17345
  // src/plugins/TypeaheadMenuPlugin/renderFillInTheBlankMenu.tsx
17297
17346
  import {
@@ -17406,7 +17455,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
17406
17455
  }
17407
17456
 
17408
17457
  // src/plugins/TypeaheadMenuPlugin/TypeaheadMenuPlugin.tsx
17409
- import { jsx as jsx115 } from "react/jsx-runtime";
17458
+ import { jsx as jsx116 } from "react/jsx-runtime";
17410
17459
  function TypeaheadMenuPlugin() {
17411
17460
  const { hasModule, modulesNumber } = useBlockEditor();
17412
17461
  const [editor] = useLexicalComposerContext63();
@@ -17416,7 +17465,7 @@ function TypeaheadMenuPlugin() {
17416
17465
  const popupRef = useRef56(null);
17417
17466
  const targetNodeKeyRef = useRef56(void 0);
17418
17467
  const activeEditorRef = useRef56(void 0);
17419
- const [activeDecorator, setActiveDecorator] = useState17();
17468
+ const [activeDecorator, setActiveDecorator] = useState18();
17420
17469
  const handleUpdate = () => {
17421
17470
  activeEditorRef.current?.getEditorState().read(() => {
17422
17471
  const selection = $getSelection15();
@@ -17538,7 +17587,7 @@ function TypeaheadMenuPlugin() {
17538
17587
  }
17539
17588
  return false;
17540
17589
  };
17541
- useEffect79(() => {
17590
+ useEffect80(() => {
17542
17591
  return mergeRegister26(
17543
17592
  editor.registerCommand(
17544
17593
  TYPEAHEAD_MENU_COMMAND,
@@ -17597,7 +17646,7 @@ function TypeaheadMenuPlugin() {
17597
17646
  );
17598
17647
  });
17599
17648
  }
17600
- const rootNode = $getRoot21();
17649
+ const rootNode = $getRoot20();
17601
17650
  if (rootNode) {
17602
17651
  const childrenKeys = rootNode.getChildrenKeys();
17603
17652
  if (childrenKeys.length > 0) {
@@ -17689,7 +17738,7 @@ function TypeaheadMenuPlugin() {
17689
17738
  }
17690
17739
  return menuItems;
17691
17740
  }, [editor, modulesNumber, activeDecorator]);
17692
- return /* @__PURE__ */ jsx115(
17741
+ return /* @__PURE__ */ jsx116(
17693
17742
  PopupMenu,
17694
17743
  {
17695
17744
  ref: popupRef,
@@ -17701,34 +17750,716 @@ function TypeaheadMenuPlugin() {
17701
17750
  );
17702
17751
  }
17703
17752
 
17753
+ // src/theme/defaultThemeVariables.ts
17754
+ var themeLight = `
17755
+ :host,
17756
+ .theme-light {
17757
+ color-scheme: light;
17758
+
17759
+ --sl-color-primary-50: #f0f9ff;
17760
+ --sl-color-primary-100: #e0f2fe;
17761
+ --sl-color-primary-200: #bae6fd;
17762
+ --sl-color-primary-300: #93c5fd;
17763
+ --sl-color-primary-400: #60a5fa;
17764
+ --sl-color-primary-500: #3b82f6;
17765
+ --sl-color-primary-600: #2563eb;
17766
+ --sl-color-primary-700: #1d4ed8;
17767
+ --sl-color-primary-800: #1e40af;
17768
+ --sl-color-primary-900: #1e3a8a;
17769
+ --sl-color-primary-950: #172554;
17770
+
17771
+ --sl-color-success-50: #f0fdf4;
17772
+ --sl-color-success-100: #dcfce7;
17773
+ --sl-color-success-200: #bbf7d0;
17774
+ --sl-color-success-300: #86efac;
17775
+ --sl-color-success-400: #4ade80;
17776
+ --sl-color-success-500: #22c55e;
17777
+ --sl-color-success-600: #16a34a;
17778
+ --sl-color-success-700: #15803d;
17779
+ --sl-color-success-800: #166534;
17780
+ --sl-color-success-900: #14532d;
17781
+ --sl-color-success-950: #052e16;
17782
+
17783
+ --sl-color-warning-50: #fffbeb;
17784
+ --sl-color-warning-100: #fef3c7;
17785
+ --sl-color-warning-200: #fde68a;
17786
+ --sl-color-warning-300: #fcd34d;
17787
+ --sl-color-warning-400: #fbbf24;
17788
+ --sl-color-warning-500: #f59e0b;
17789
+ --sl-color-warning-600: #d97706;
17790
+ --sl-color-warning-700: #b45309;
17791
+ --sl-color-warning-800: #92400e;
17792
+ --sl-color-warning-900: #78350f;
17793
+ --sl-color-warning-950: #451a03;
17794
+
17795
+ --sl-color-danger-50: #fef2f2;
17796
+ --sl-color-danger-100: #fee2e2;
17797
+ --sl-color-danger-200: #fecaca;
17798
+ --sl-color-danger-300: #fca5a5;
17799
+ --sl-color-danger-400: #f87171;
17800
+ --sl-color-danger-500: #ef4444;
17801
+ --sl-color-danger-600: #dc2626;
17802
+ --sl-color-danger-700: #b91c1c;
17803
+ --sl-color-danger-800: #991b1b;
17804
+ --sl-color-danger-900: #7f1d1d;
17805
+ --sl-color-danger-950: #450a0a;
17806
+
17807
+ --sl-color-neutral-50: #fafafa;
17808
+ --sl-color-neutral-100: #f4f4f5;
17809
+ --sl-color-neutral-200: #e4e4e7;
17810
+ --sl-color-neutral-300: #d4d4d8;
17811
+ --sl-color-neutral-400: #a1a1aa;
17812
+ --sl-color-neutral-500: #71717a;
17813
+ --sl-color-neutral-600: #52525b;
17814
+ --sl-color-neutral-700: #3f3f46;
17815
+ --sl-color-neutral-800: #27272a;
17816
+ --sl-color-neutral-900: #18181b;
17817
+ --sl-color-neutral-950: #09090b;
17818
+
17819
+ --sl-color-neutral-0: #ffffff;
17820
+ --sl-color-neutral-1000: hsl(0, 0%, 0%);
17821
+
17822
+ --sl-border-base: var(--be-border-base);
17823
+ --sl-border-radius-small: calc(var(--sl-border-base) * 0.1875);
17824
+ --sl-border-radius-medium: calc(var(--sl-border-base) * 0.25);
17825
+ --sl-border-radius-large: calc(var(--sl-border-base) * 0.5);
17826
+ --sl-border-radius-x-large: var(
17827
+ --sl-border-base
17828
+ );
17829
+
17830
+ --sl-border-radius-circle: 50%;
17831
+ --sl-border-radius-pill: 9999px;
17832
+
17833
+ --sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);
17834
+ --sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);
17835
+ --sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);
17836
+ --sl-shadow-large: var(
17837
+ --be-shadow-large,
17838
+ 0 2px 8px hsl(240 3.8% 46.1% / 12%)
17839
+ );
17840
+ --sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);
17841
+
17842
+ --sl-spacing-base: var(--be-spacing-base, 1rem);
17843
+ --sl-spacing-3x-small: calc(
17844
+ var(--sl-spacing-base) * 0.125
17845
+ );
17846
+ --sl-spacing-2x-small: calc(
17847
+ var(--sl-spacing-base) * 0.25
17848
+ );
17849
+ --sl-spacing-1_5x-small: calc(
17850
+ var(--sl-spacing-base) * 0.375
17851
+ );
17852
+ --sl-spacing-x-small: calc(
17853
+ var(--sl-spacing-base) * 0.5
17854
+ );
17855
+ --sl-spacing-small: calc(
17856
+ var(--sl-spacing-base) * 0.75
17857
+ );
17858
+ --sl-spacing-medium: var(--sl-spacing-base);
17859
+ --sl-spacing-large: calc(
17860
+ var(--sl-spacing-base) * 1.25
17861
+ );
17862
+ --sl-spacing-x-large: calc(
17863
+ var(--sl-spacing-base) * 1.75
17864
+ );
17865
+ --sl-spacing-2x-large: calc(
17866
+ var(--sl-spacing-base) * 2.25
17867
+ );
17868
+ --sl-spacing-3x-large: calc(
17869
+ var(--sl-spacing-base) * 3
17870
+ );
17871
+ --sl-spacing-4x-large: calc(
17872
+ var(--sl-spacing-base) * 4.5
17873
+ );
17874
+ --sl-spacing-5x-large: calc(var(--sl-spacing-base) * 5);
17875
+
17876
+ --indent-size: var(--sl-spacing-large);
17877
+
17878
+ --sl-transition-x-slow: 1000ms;
17879
+ --sl-transition-slow: 500ms;
17880
+ --sl-transition-medium: 250ms;
17881
+ --sl-transition-fast: 150ms;
17882
+ --sl-transition-x-fast: 50ms;
17883
+
17884
+ --sl-font-mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
17885
+ monospace;
17886
+ --sl-font-sans: var(
17887
+ --be-font-sans,
17888
+ -apple-system,
17889
+ BlinkMacSystemFont,
17890
+ 'Segoe UI',
17891
+ Roboto,
17892
+ Helvetica,
17893
+ Arial,
17894
+ sans-serif,
17895
+ 'Apple Color Emoji',
17896
+ 'Segoe UI Emoji',
17897
+ 'Segoe UI Symbol'
17898
+ );
17899
+ --sl-font-serif: var(
17900
+ --be-font-serif,
17901
+ Georgia,
17902
+ 'Times New Roman',
17903
+ serif
17904
+ );
17905
+
17906
+ --sl-font-size-base: var(--be-font-size-base, 1rem);
17907
+ --sl-font-size-2x-small: calc(var(--sl-font-size-base) * 0.625);
17908
+ --sl-font-size-x-small: calc(var(--sl-font-size-base) * 0.75);
17909
+ --sl-font-size-small: calc(var(--sl-font-size-base) * 0.875);
17910
+ --sl-font-size-medium: var(--sl-font-size-base);
17911
+ --sl-font-size-large: calc(var(--sl-font-size-base) * 1.25);
17912
+ --sl-font-size-x-large: calc(var(--sl-font-size-base) * 1.5);
17913
+ --sl-font-size-2x-large: calc(var(--sl-font-size-base) * 2.25);
17914
+ --sl-font-size-3x-large: calc(var(--sl-font-size-base) * 3);
17915
+ --sl-font-size-4x-large: calc(var(--sl-font-size-base) * 4.5);
17916
+
17917
+ --sl-font-weight-light: 300;
17918
+ --sl-font-weight-normal: 400;
17919
+ --sl-font-weight-semibold: 500;
17920
+ --sl-font-weight-bold: 700;
17921
+
17922
+ --sl-letter-spacing-denser: -0.03em;
17923
+ --sl-letter-spacing-dense: -0.015em;
17924
+ --sl-letter-spacing-normal: normal;
17925
+ --sl-letter-spacing-loose: 0.075em;
17926
+ --sl-letter-spacing-looser: 0.15em;
17927
+
17928
+ --sl-line-height-base: 1;
17929
+ --sl-line-height-x-denser: calc(var(--sl-line-height-base) * 1.1);
17930
+ --sl-line-height-denser: calc(var(--sl-line-height-base) * 1.2);
17931
+ --sl-line-height-dense: calc(var(--sl-line-height-base) * 1.4);
17932
+ --sl-line-height-subnormal: calc(var(--sl-line-height-base) * 1.6);
17933
+ --sl-line-height-normal: calc(var(--sl-line-height-base) * 1.8);
17934
+ --sl-line-height-loose: calc(var(--sl-line-height-base) * 2.2);
17935
+ --sl-line-height-looser: calc(var(--sl-line-height-base) * 2.6);
17936
+
17937
+ --sl-focus-ring-color: var(--sl-color-primary-600);
17938
+ --sl-focus-ring-style: solid;
17939
+ --sl-focus-ring-width: var(--be-focus-ring-width, 1px);
17940
+ --sl-focus-ring: var(--sl-focus-ring-style)
17941
+ var(--sl-focus-ring-width) var(--sl-focus-ring-color);
17942
+ --sl-focus-ring-offset: 1px;
17943
+
17944
+ --sl-button-font-size-small: var(--sl-font-size-x-small);
17945
+ --sl-button-font-size-medium: var(--sl-font-size-small);
17946
+ --sl-button-font-size-large: var(--sl-font-size-medium);
17947
+
17948
+ --sl-input-height-base: 1rem;
17949
+ --sl-input-height-small: calc(var(--sl-input-height-base) * 1.875);
17950
+ --sl-input-height-medium: calc(var(--sl-input-height-base) * 2.5);
17951
+ --sl-input-height-large: calc(var(--sl-input-height-base) * 3.125);
17952
+
17953
+ --sl-input-background-color: var(--sl-color-neutral-0);
17954
+ --sl-input-background-color-hover: var(--sl-input-background-color);
17955
+ --sl-input-background-color-focus: var(--sl-input-background-color);
17956
+ --sl-input-background-color-disabled: var(--sl-color-neutral-100);
17957
+ --sl-input-border-color: var(--sl-color-neutral-300);
17958
+ --sl-input-border-color-hover: var(--sl-color-neutral-400);
17959
+ --sl-input-border-color-focus: var(--sl-color-primary-500);
17960
+ --sl-input-border-color-disabled: var(--sl-color-neutral-300);
17961
+ --sl-input-border-width: 1px;
17962
+ --sl-input-required-content: '*';
17963
+ --sl-input-required-content-offset: -2px;
17964
+ --sl-input-required-content-color: var(--sl-input-label-color);
17965
+
17966
+ --sl-input-border-radius-small: var(--sl-border-radius-medium);
17967
+ --sl-input-border-radius-medium: var(--sl-border-radius-medium);
17968
+ --sl-input-border-radius-large: var(--sl-border-radius-medium);
17969
+
17970
+ --sl-input-font-family: var(--sl-font-sans);
17971
+ --sl-input-font-weight: var(--sl-font-weight-normal);
17972
+ --sl-input-font-size-small: var(--sl-font-size-small);
17973
+ --sl-input-font-size-medium: var(--sl-font-size-medium);
17974
+ --sl-input-font-size-large: var(--sl-font-size-large);
17975
+ --sl-input-letter-spacing: var(--sl-letter-spacing-normal);
17976
+
17977
+ --sl-input-color: var(--sl-color-neutral-700);
17978
+ --sl-input-color-hover: var(--sl-color-neutral-700);
17979
+ --sl-input-color-focus: var(--sl-color-neutral-700);
17980
+ --sl-input-color-disabled: var(--sl-color-neutral-900);
17981
+ --sl-input-icon-color: var(--sl-color-neutral-400);
17982
+ --sl-input-icon-color-hover: var(--sl-color-neutral-500);
17983
+ --sl-input-icon-color-focus: var(--sl-color-neutral-500);
17984
+ --sl-input-placeholder-color: var(--sl-color-neutral-400);
17985
+ --sl-input-placeholder-color-disabled: var(--sl-color-neutral-500);
17986
+ --sl-input-spacing-small: var(--sl-spacing-small);
17987
+ --sl-input-spacing-medium: var(--sl-spacing-medium);
17988
+ --sl-input-spacing-large: var(--sl-spacing-large);
17989
+
17990
+ --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);
17991
+ --sl-input-focus-ring-offset: 0;
17992
+
17993
+ --sl-input-filled-background-color: var(--sl-color-neutral-100);
17994
+ --sl-input-filled-background-color-hover: var(
17995
+ --sl-color-neutral-100
17996
+ );
17997
+ --sl-input-filled-background-color-focus: var(
17998
+ --sl-color-neutral-100
17999
+ );
18000
+ --sl-input-filled-background-color-disabled: var(
18001
+ --sl-color-neutral-100
18002
+ );
18003
+ --sl-input-filled-color: var(--sl-color-neutral-800);
18004
+ --sl-input-filled-color-hover: var(--sl-color-neutral-800);
18005
+ --sl-input-filled-color-focus: var(--sl-color-neutral-700);
18006
+ --sl-input-filled-color-disabled: var(--sl-color-neutral-800);
18007
+
18008
+ --sl-input-label-font-size-small: var(--sl-font-size-small);
18009
+ --sl-input-label-font-size-medium: var(--sl-font-size-medium);
18010
+ --sl-input-label-font-size-large: var(--sl-font-size-large);
18011
+ --sl-input-label-color: inherit;
18012
+
18013
+ --sl-input-help-text-font-size-small: var(--sl-font-size-x-small);
18014
+ --sl-input-help-text-font-size-medium: var(--sl-font-size-small);
18015
+ --sl-input-help-text-font-size-large: var(--sl-font-size-medium);
18016
+ --sl-input-help-text-color: var(--sl-color-neutral-500);
18017
+
18018
+ --sl-toggle-size-small: 0.875rem;
18019
+ --sl-toggle-size-medium: 1.125rem;
18020
+ --sl-toggle-size-large: 1.375rem;
18021
+
18022
+ --sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);
18023
+
18024
+ --sl-panel-background-color: var(--sl-color-neutral-0);
18025
+ --sl-panel-border-color: var(--sl-color-neutral-300);
18026
+ --sl-panel-border-width: 1px;
18027
+
18028
+ --sl-tooltip-border-radius: var(--sl-border-radius-medium);
18029
+ --sl-tooltip-background-color: var(--sl-color-neutral-800);
18030
+ --sl-tooltip-color: var(--sl-color-neutral-0);
18031
+ --sl-tooltip-font-family: var(--sl-font-sans);
18032
+ --sl-tooltip-font-weight: var(--sl-font-weight-normal);
18033
+ --sl-tooltip-font-size: var(--sl-font-size-small);
18034
+ --sl-tooltip-line-height: var(--sl-line-height-dense);
18035
+ --sl-tooltip-padding: var(--sl-spacing-2x-small)
18036
+ var(--sl-spacing-x-small);
18037
+ --sl-tooltip-arrow-size: 6px;
18038
+
18039
+ --sl-z-index-drawer: 700;
18040
+ --sl-z-index-dialog: 800;
18041
+ --sl-z-index-dropdown: 900;
18042
+ --sl-z-index-toast: 950;
18043
+ --sl-z-index-tooltip: 1000;
18044
+
18045
+ --td-footer-background-color: #09090b;
18046
+ --td-footer-color: #e4e4e7;
18047
+
18048
+ --td-code-block-toolbar-cell-background-color: #e2e8f0;
18049
+ --td-code-block-highlighted-background-color: #dbeafe;
18050
+
18051
+ --td-card-color: 'inherit';
18052
+ --td-card-background-color: var(--sl-color-neutral-0);
18053
+ --td-card-background-hover-color: var(--sl-color-neutral-50);
18054
+ --td-card-border-color: rgba(24, 24, 27, 0.08);
18055
+ --td-card-box-shadow-1: rgba(24, 24, 27, 0.02);
18056
+ --td-card-box-shadow-1-y: 3px;
18057
+ --td-card-box-shadow-1-blur: 6px;
18058
+ --td-card-box-shadow-2: rgba(24, 24, 27, 0.04);
18059
+ --td-card-box-shadow-2-y: 2px;
18060
+ --td-card-box-shadow-2-blur: 7px;
18061
+
18062
+ --td-card-hover-border-color: rgba(24, 24, 27, 0.15);
18063
+ --td-card-hover-box-shadow-1: rgba(24, 24, 27, 0.05);
18064
+ --td-card-hover-box-shadow-1-y: 3px;
18065
+ --td-card-hover-box-shadow-1-blur: 6px;
18066
+ --td-card-hover-box-shadow-2: rgba(24, 24, 27, 0.1);
18067
+ --td-card-hover-box-shadow-2-y: 8px;
18068
+ --td-card-hover-box-shadow-2-blur: 15px;
18069
+
18070
+ --td-body-gradient-line-color: #ffffff;
18071
+
18072
+ --td-editor-text-color-blue: hsl(221, 100%, 50%);
18073
+ --td-editor-text-color-purple: hsl(291, 100%, 39%);
18074
+ --td-editor-text-color-red: hsl(4, 100%, 40%);
18075
+ --td-editor-text-color-green: hsl(122, 100%, 23%);
18076
+
18077
+ --td-editor-bg-color-blue: hsl(221, 100%, 50%, 0.1);
18078
+ --td-editor-bg-color-purple: hsl(291, 100%, 39%, 0.1);
18079
+ --td-editor-bg-color-red: hsl(4, 100%, 40%, 0.1);
18080
+ --td-editor-bg-color-green: hsl(122, 100%, 23%, 0.1);
18081
+ }
18082
+ `;
18083
+ var themeDark = `
18084
+ :host,
18085
+ .theme-dark {
18086
+ color-scheme: dark;
18087
+
18088
+ --sl-color-primary-950: #f0f9ff;
18089
+ --sl-color-primary-900: #e0f2fe;
18090
+ --sl-color-primary-800: #bae6fd;
18091
+ --sl-color-primary-700: #93c5fd;
18092
+ --sl-color-primary-600: #60a5fa;
18093
+ --sl-color-primary-500: #3b82f6;
18094
+ --sl-color-primary-400: #2563eb;
18095
+ --sl-color-primary-300: #1d4ed8;
18096
+ --sl-color-primary-200: #1e40af;
18097
+ --sl-color-primary-100: #1e3a8a;
18098
+ --sl-color-primary-50: #172554;
18099
+
18100
+ --sl-color-success-950: #f0fdf4;
18101
+ --sl-color-success-900: #dcfce7;
18102
+ --sl-color-success-800: #bbf7d0;
18103
+ --sl-color-success-700: #86efac;
18104
+ --sl-color-success-600: #4ade80;
18105
+ --sl-color-success-500: #22c55e;
18106
+ --sl-color-success-400: #16a34a;
18107
+ --sl-color-success-300: #15803d;
18108
+ --sl-color-success-200: #166534;
18109
+ --sl-color-success-100: #14532d;
18110
+ --sl-color-success-50: #052e16;
18111
+
18112
+ --sl-color-warning-950: #fffbeb;
18113
+ --sl-color-warning-900: #fef3c7;
18114
+ --sl-color-warning-800: #fde68a;
18115
+ --sl-color-warning-700: #fcd34d;
18116
+ --sl-color-warning-600: #fbbf24;
18117
+ --sl-color-warning-500: #f59e0b;
18118
+ --sl-color-warning-400: #d97706;
18119
+ --sl-color-warning-300: #b45309;
18120
+ --sl-color-warning-200: #92400e;
18121
+ --sl-color-warning-100: #78350f;
18122
+ --sl-color-warning-50: #451a03;
18123
+
18124
+ --sl-color-danger-950: #fef2f2;
18125
+ --sl-color-danger-900: #fee2e2;
18126
+ --sl-color-danger-800: #fecaca;
18127
+ --sl-color-danger-700: #fca5a5;
18128
+ --sl-color-danger-600: #f87171;
18129
+ --sl-color-danger-500: #ef4444;
18130
+ --sl-color-danger-400: #dc2626;
18131
+ --sl-color-danger-300: #b91c1c;
18132
+ --sl-color-danger-200: #991b1b;
18133
+ --sl-color-danger-100: #7f1d1d;
18134
+ --sl-color-danger-50: #450a0a;
18135
+
18136
+ --sl-color-neutral-950: #fafafa;
18137
+ --sl-color-neutral-900: #f4f4f5;
18138
+ --sl-color-neutral-800: #e4e4e7;
18139
+ --sl-color-neutral-700: #d4d4d8;
18140
+ --sl-color-neutral-600: #a1a1aa;
18141
+ --sl-color-neutral-500: #71717a;
18142
+
18143
+ --sl-color-neutral-400: #71717a;
18144
+ --sl-color-neutral-300: #52525b;
18145
+ --sl-color-neutral-200: #3f3f46;
18146
+ --sl-color-neutral-100: #27272a;
18147
+ --sl-color-neutral-50: #18181b;
18148
+ --sl-color-neutral-0: #09090b;
18149
+ --sl-color-neutral-1000: hsl(0, 0%, 100%);
18150
+
18151
+ --sl-border-base: var(--be-border-base);
18152
+ --sl-border-radius-small: calc(var(--sl-border-base) * 0.1875);
18153
+ --sl-border-radius-medium: calc(var(--sl-border-base) * 0.25);
18154
+ --sl-border-radius-large: calc(var(--sl-border-base) * 0.5);
18155
+ --sl-border-radius-x-large: var(
18156
+ --sl-border-base
18157
+ );
18158
+
18159
+ --sl-border-radius-circle: 50%;
18160
+ --sl-border-radius-pill: 9999px;
18161
+
18162
+ --sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%);
18163
+ --sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%);
18164
+ --sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%);
18165
+ --sl-shadow-large: var(
18166
+ --be-shadow-large,
18167
+ 0 2px 8px rgb(0 0 0 / 24%)
18168
+ );
18169
+ --sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%);
18170
+
18171
+ --sl-spacing-base: var(--be-spacing-base, 1rem);
18172
+ --sl-spacing-3x-small: calc(
18173
+ var(--sl-spacing-base) * 0.125
18174
+ );
18175
+ --sl-spacing-2x-small: calc(
18176
+ var(--sl-spacing-base) * 0.25
18177
+ );
18178
+ --sl-spacing-1_5x-small: calc(
18179
+ var(--sl-spacing-base) * 0.375
18180
+ );
18181
+ --sl-spacing-x-small: calc(
18182
+ var(--sl-spacing-base) * 0.5
18183
+ );
18184
+ --sl-spacing-small: calc(
18185
+ var(--sl-spacing-base) * 0.75
18186
+ );
18187
+ --sl-spacing-medium: var(--sl-spacing-base);
18188
+ --sl-spacing-large: calc(
18189
+ var(--sl-spacing-base) * 1.25
18190
+ );
18191
+ --sl-spacing-x-large: calc(
18192
+ var(--sl-spacing-base) * 1.75
18193
+ );
18194
+ --sl-spacing-2x-large: calc(
18195
+ var(--sl-spacing-base) * 2.25
18196
+ );
18197
+ --sl-spacing-3x-large: calc(
18198
+ var(--sl-spacing-base) * 3
18199
+ );
18200
+ --sl-spacing-4x-large: calc(
18201
+ var(--sl-spacing-base) * 4.5
18202
+ );
18203
+ --sl-spacing-5x-large: calc(var(--sl-spacing-base) * 5);
18204
+
18205
+ --indent-size: var(--sl-spacing-large);
18206
+
18207
+ --sl-transition-x-slow: 1000ms;
18208
+ --sl-transition-slow: 500ms;
18209
+ --sl-transition-medium: 250ms;
18210
+ --sl-transition-fast: 150ms;
18211
+ --sl-transition-x-fast: 50ms;
18212
+
18213
+ --sl-font-mono: var(
18214
+ --be-font-mono,
18215
+ SFMono-Regular,
18216
+ Consolas,
18217
+ 'Liberation Mono',
18218
+ Menlo,
18219
+ monospace
18220
+ );
18221
+ --sl-font-sans: var(
18222
+ --be-font-sans,
18223
+ -apple-system,
18224
+ BlinkMacSystemFont,
18225
+ 'Segoe UI',
18226
+ Roboto,
18227
+ Helvetica,
18228
+ Arial,
18229
+ sans-serif,
18230
+ 'Apple Color Emoji',
18231
+ 'Segoe UI Emoji',
18232
+ 'Segoe UI Symbol'
18233
+ );
18234
+ --sl-font-serif: var(
18235
+ --be-font-serif,
18236
+ Georgia,
18237
+ 'Times New Roman',
18238
+ serif
18239
+ );
18240
+
18241
+ --sl-font-size-base: var(--be-font-size-base, 1rem);
18242
+ --sl-font-size-2x-small: calc(var(--sl-font-size-base) * 0.625);
18243
+ --sl-font-size-x-small: calc(var(--sl-font-size-base) * 0.75);
18244
+ --sl-font-size-small: calc(var(--sl-font-size-base) * 0.875);
18245
+ --sl-font-size-medium: var(--sl-font-size-base);
18246
+ --sl-font-size-large: calc(var(--sl-font-size-base) * 1.25);
18247
+ --sl-font-size-x-large: calc(var(--sl-font-size-base) * 1.5);
18248
+ --sl-font-size-2x-large: calc(var(--sl-font-size-base) * 2.25);
18249
+ --sl-font-size-3x-large: calc(var(--sl-font-size-base) * 3);
18250
+ --sl-font-size-4x-large: calc(var(--sl-font-size-base) * 4.5);
18251
+
18252
+ --sl-font-weight-light: 300;
18253
+ --sl-font-weight-normal: 400;
18254
+ --sl-font-weight-semibold: 500;
18255
+ --sl-font-weight-bold: 700;
18256
+
18257
+ --sl-letter-spacing-denser: -0.03em;
18258
+ --sl-letter-spacing-dense: -0.015em;
18259
+ --sl-letter-spacing-normal: normal;
18260
+ --sl-letter-spacing-loose: 0.075em;
18261
+ --sl-letter-spacing-looser: 0.15em;
18262
+
18263
+ --sl-line-height-base: 1;
18264
+ --sl-line-height-x-denser: calc(var(--sl-line-height-base) * 1.1);
18265
+ --sl-line-height-denser: calc(var(--sl-line-height-base) * 1.2);
18266
+ --sl-line-height-dense: calc(var(--sl-line-height-base) * 1.4);
18267
+ --sl-line-height-subnormal: calc(var(--sl-line-height-base) * 1.6);
18268
+ --sl-line-height-normal: calc(var(--sl-line-height-base) * 1.8);
18269
+ --sl-line-height-loose: calc(var(--sl-line-height-base) * 2.2);
18270
+ --sl-line-height-looser: calc(var(--sl-line-height-base) * 2.6);
18271
+
18272
+ --sl-focus-ring-color: var(--sl-color-primary-700);
18273
+ --sl-focus-ring-style: solid;
18274
+ --sl-focus-ring-width: var(--be-focus-ring-width, 1px);
18275
+ --sl-focus-ring: var(--sl-focus-ring-style)
18276
+ var(--sl-focus-ring-width) var(--sl-focus-ring-color);
18277
+ --sl-focus-ring-offset: 1px;
18278
+
18279
+ --sl-button-font-size-small: var(--sl-font-size-x-small);
18280
+ --sl-button-font-size-medium: var(--sl-font-size-small);
18281
+ --sl-button-font-size-large: var(--sl-font-size-medium);
18282
+
18283
+ --sl-input-height-base: 1rem;
18284
+ --sl-input-height-small: calc(var(--sl-input-height-base) * 1.875);
18285
+ --sl-input-height-medium: calc(var(--sl-input-height-base) * 2.5);
18286
+ --sl-input-height-large: calc(var(--sl-input-height-base) * 3.125);
18287
+
18288
+ --sl-input-background-color: var(--sl-color-neutral-0);
18289
+ --sl-input-background-color-hover: var(--sl-input-background-color);
18290
+ --sl-input-background-color-focus: var(--sl-input-background-color);
18291
+ --sl-input-background-color-disabled: var(--sl-color-neutral-100);
18292
+ --sl-input-border-color: var(--sl-color-neutral-300);
18293
+ --sl-input-border-color-hover: var(--sl-color-neutral-400);
18294
+ --sl-input-border-color-focus: var(--sl-color-primary-500);
18295
+ --sl-input-border-color-disabled: var(--sl-color-neutral-300);
18296
+ --sl-input-border-width: 1px;
18297
+ --sl-input-required-content: '*';
18298
+ --sl-input-required-content-offset: -2px;
18299
+ --sl-input-required-content-color: var(--sl-input-label-color);
18300
+
18301
+ --sl-input-border-radius-small: var(--sl-border-radius-medium);
18302
+ --sl-input-border-radius-medium: var(--sl-border-radius-medium);
18303
+ --sl-input-border-radius-large: var(--sl-border-radius-medium);
18304
+
18305
+ --sl-input-font-family: var(--sl-font-sans);
18306
+ --sl-input-font-weight: var(--sl-font-weight-normal);
18307
+ --sl-input-font-size-small: var(--sl-font-size-small);
18308
+ --sl-input-font-size-medium: var(--sl-font-size-medium);
18309
+ --sl-input-font-size-large: var(--sl-font-size-large);
18310
+ --sl-input-letter-spacing: var(--sl-letter-spacing-normal);
18311
+
18312
+ --sl-input-color: var(--sl-color-neutral-700);
18313
+ --sl-input-color-hover: var(--sl-color-neutral-700);
18314
+ --sl-input-color-focus: var(--sl-color-neutral-700);
18315
+ --sl-input-color-disabled: var(--sl-color-neutral-900);
18316
+ --sl-input-icon-color: var(--sl-color-neutral-400);
18317
+ --sl-input-icon-color-hover: var(--sl-color-neutral-500);
18318
+ --sl-input-icon-color-focus: var(--sl-color-neutral-500);
18319
+ --sl-input-placeholder-color: var(--sl-color-neutral-400);
18320
+ --sl-input-placeholder-color-disabled: var(--sl-color-neutral-500);
18321
+ --sl-input-spacing-small: var(--sl-spacing-small);
18322
+ --sl-input-spacing-medium: var(--sl-spacing-medium);
18323
+ --sl-input-spacing-large: var(--sl-spacing-large);
18324
+
18325
+ --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);
18326
+ --sl-input-focus-ring-offset: 0;
18327
+
18328
+ --sl-input-filled-background-color: var(--sl-color-neutral-100);
18329
+ --sl-input-filled-background-color-hover: var(
18330
+ --sl-color-neutral-100
18331
+ );
18332
+ --sl-input-filled-background-color-focus: var(
18333
+ --sl-color-neutral-100
18334
+ );
18335
+ --sl-input-filled-background-color-disabled: var(
18336
+ --sl-color-neutral-100
18337
+ );
18338
+ --sl-input-filled-color: var(--sl-color-neutral-800);
18339
+ --sl-input-filled-color-hover: var(--sl-color-neutral-800);
18340
+ --sl-input-filled-color-focus: var(--sl-color-neutral-700);
18341
+ --sl-input-filled-color-disabled: var(--sl-color-neutral-800);
18342
+
18343
+ --sl-input-label-font-size-small: var(--sl-font-size-small);
18344
+ --sl-input-label-font-size-medium: var(--sl-font-size-medium);
18345
+ --sl-input-label-font-size-large: var(--sl-font-size-large);
18346
+ --sl-input-label-color: inherit;
18347
+
18348
+ --sl-input-help-text-font-size-small: var(--sl-font-size-x-small);
18349
+ --sl-input-help-text-font-size-medium: var(--sl-font-size-small);
18350
+ --sl-input-help-text-font-size-large: var(--sl-font-size-medium);
18351
+ --sl-input-help-text-color: var(--sl-color-neutral-500);
18352
+
18353
+ --sl-toggle-size-small: 0.875rem;
18354
+ --sl-toggle-size-medium: 1.125rem;
18355
+ --sl-toggle-size-large: 1.375rem;
18356
+
18357
+ --sl-overlay-background-color: hsla(0, 0%, 100%, 0.05);
18358
+
18359
+ --sl-panel-background-color: var(--sl-color-neutral-0);
18360
+ --sl-panel-border-color: var(--sl-color-neutral-300);
18361
+ --sl-panel-border-width: 1px;
18362
+
18363
+ --sl-tooltip-border-radius: var(--sl-border-radius-medium);
18364
+ --sl-tooltip-background-color: var(--sl-color-neutral-800);
18365
+ --sl-tooltip-color: var(--sl-color-neutral-0);
18366
+ --sl-tooltip-font-family: var(--sl-font-sans);
18367
+ --sl-tooltip-font-weight: var(--sl-font-weight-normal);
18368
+ --sl-tooltip-font-size: var(--sl-font-size-small);
18369
+ --sl-tooltip-line-height: var(--sl-line-height-dense);
18370
+ --sl-tooltip-padding: var(--sl-spacing-2x-small)
18371
+ var(--sl-spacing-x-small);
18372
+ --sl-tooltip-arrow-size: 6px;
18373
+
18374
+ --sl-z-index-drawer: 700;
18375
+ --sl-z-index-dialog: 800;
18376
+ --sl-z-index-dropdown: 900;
18377
+ --sl-z-index-toast: 950;
18378
+ --sl-z-index-tooltip: 1000;
18379
+
18380
+ --td-footer-background-color: #09090b;
18381
+ --td-footer-color: #e4e4e7;
18382
+
18383
+ --td-code-block-toolbar-cell-background-color: #09090b;
18384
+ --td-code-block-highlighted-background-color: #1e293b;
18385
+
18386
+ --td-card-color: 'inherit';
18387
+ --td-card-background-color: var(--sl-color-neutral-0);
18388
+ --td-card-background-hover-color: var(--sl-color-neutral-50);
18389
+ --td-card-border-color: rgba(255, 255, 255, 0.1);
18390
+ --td-card-box-shadow-1: rgba(0, 0, 0, 0.05);
18391
+ --td-card-box-shadow-1-y: 3px;
18392
+ --td-card-box-shadow-1-blur: 6px;
18393
+ --td-card-box-shadow-2: rgba(0, 0, 0, 0.1);
18394
+ --td-card-box-shadow-2-y: 8px;
18395
+ --td-card-box-shadow-2-blur: 15px;
18396
+
18397
+ --td-card-hover-border-color: rgba(255, 255, 255, 0.2);
18398
+ --td-card-hover-box-shadow-1: rgba(0, 0, 0, 0.04);
18399
+ --td-card-hover-box-shadow-1-y: 5px;
18400
+ --td-card-hover-box-shadow-1-blur: 10px;
18401
+ --td-card-hover-box-shadow-2: rgba(0, 0, 0, 0.3);
18402
+ --td-card-hover-box-shadow-2-y: 15px;
18403
+ --td-card-hover-box-shadow-2-blur: 25px;
18404
+
18405
+ --td-body-gradient-line-color: #27272a47;
18406
+
18407
+ --td-editor-text-color-blue: hsl(221, 100%, 70%);
18408
+ --td-editor-text-color-purple: hsl(291, 100%, 65%);
18409
+ --td-editor-text-color-red: hsl(4, 100%, 63%);
18410
+ --td-editor-text-color-green: hsl(122, 100%, 34%);
18411
+
18412
+ --td-editor-bg-color-blue: hsl(221, 100%, 70%, 0.2);
18413
+ --td-editor-bg-color-purple: hsl(291, 100%, 65%, 0.2);
18414
+ --td-editor-bg-color-red: hsl(4, 100%, 63%, 0.2);
18415
+ --td-editor-bg-color-green: hsl(122, 100%, 34%, 0.2);
18416
+ }
18417
+ `;
18418
+
17704
18419
  // src/theme/ThemeProvider.tsx
17705
18420
  import {
17706
18421
  createContext as createContext2,
17707
18422
  useContext as useContext5,
17708
- useEffect as useEffect80,
18423
+ useEffect as useEffect81,
17709
18424
  useRef as useRef57,
17710
- useState as useState18
18425
+ useState as useState19
17711
18426
  } from "react";
17712
- import { jsx as jsx116 } from "react/jsx-runtime";
17713
- var themeVariablesMap = {
18427
+
18428
+ // src/theme/constants.ts
18429
+ var themeSettingsMap = {
17714
18430
  borderBase: "--be-border-base",
17715
18431
  fontSans: "--be-font-sans",
17716
18432
  fontSerif: "--be-font-serif",
17717
18433
  fontMono: "--be-font-mono",
17718
18434
  spacingBase: "--be-spacing-base",
17719
- fontSizeBase: "--be-font-size-base"
18435
+ fontSizeBase: "--be-font-size-base",
18436
+ focusRingWidth: "--be-focus-ring-width",
18437
+ shadowLarge: "--be-shadow-large"
18438
+ };
18439
+ var defaultThemeSettings = {
18440
+ borderBase: "1rem",
18441
+ fontSans: "'Inter', sans-serif",
18442
+ fontSerif: "Georgia, 'Times New Roman', serif",
18443
+ fontMono: "Menlo, Monaco, 'Courier New', monospace",
18444
+ focusRingWidth: "1px",
18445
+ shadowLarge: "rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px",
18446
+ spacingBase: "1rem",
18447
+ fontSizeBase: "1rem"
17720
18448
  };
18449
+
18450
+ // src/theme/ThemeProvider.tsx
18451
+ import { jsx as jsx117, jsxs as jsxs43 } from "react/jsx-runtime";
17721
18452
  var ThemeContext = createContext2(
17722
18453
  void 0
17723
18454
  );
17724
18455
  function ThemeProvider({
17725
18456
  theme,
17726
- themeVariables = {},
18457
+ themeSettings = {},
17727
18458
  children
17728
18459
  }) {
17729
18460
  const rootElementRef = useRef57(null);
17730
- const [effectiveTheme, setEffectiveTheme] = useState18("light");
17731
- useEffect80(() => {
18461
+ const [effectiveTheme, setEffectiveTheme] = useState19("light");
18462
+ useEffect81(() => {
17732
18463
  const mediaQuery = window.matchMedia(
17733
18464
  "(prefers-color-scheme: dark)"
17734
18465
  );
@@ -17743,27 +18474,40 @@ function ThemeProvider({
17743
18474
  mediaQuery.addEventListener("change", updateEffectiveTheme);
17744
18475
  return () => mediaQuery.removeEventListener("change", updateEffectiveTheme);
17745
18476
  }, [theme]);
17746
- useEffect80(() => {
18477
+ useEffect81(() => {
17747
18478
  rootElementRef.current?.classList.remove(
17748
18479
  "theme-light",
17749
18480
  "theme-dark"
17750
18481
  );
17751
18482
  rootElementRef.current?.classList.add(`theme-${effectiveTheme}`);
17752
18483
  }, [effectiveTheme]);
17753
- return /* @__PURE__ */ jsx116(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsx116(
17754
- "div",
18484
+ return /* @__PURE__ */ jsx117(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsxs43(
18485
+ "article",
17755
18486
  {
17756
18487
  ref: rootElementRef,
17757
- className: "theme-settings",
18488
+ className: "be-article",
17758
18489
  style: {
17759
18490
  ...Object.fromEntries(
17760
- Object.entries(themeVariables).map(([key, value]) => [
17761
- themeVariablesMap[key],
18491
+ Object.entries({
18492
+ ...defaultThemeSettings,
18493
+ themeSettings
18494
+ }).map(([key, value]) => [
18495
+ themeSettingsMap[key],
17762
18496
  value
17763
18497
  ])
17764
18498
  )
17765
18499
  },
17766
- children
18500
+ children: [
18501
+ /* @__PURE__ */ jsx117(
18502
+ "style",
18503
+ {
18504
+ dangerouslySetInnerHTML: {
18505
+ __html: effectiveTheme === "light" ? themeLight : themeDark
18506
+ }
18507
+ }
18508
+ ),
18509
+ children
18510
+ ]
17767
18511
  }
17768
18512
  ) });
17769
18513
  }
@@ -17772,46 +18516,42 @@ function ThemeProvider({
17772
18516
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
17773
18517
  import { LexicalErrorBoundary as LexicalErrorBoundary9 } from "@lexical/react/LexicalErrorBoundary";
17774
18518
  import { HistoryPlugin as HistoryPlugin9 } from "@lexical/react/LexicalHistoryPlugin";
17775
- import { ListPlugin as ListPlugin3 } from "@lexical/react/LexicalListPlugin";
18519
+ import { ListPlugin as ListPlugin2 } from "@lexical/react/LexicalListPlugin";
17776
18520
  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";
18521
+ import { RichTextPlugin as RichTextPlugin7 } from "@lexical/react/LexicalRichTextPlugin";
18522
+ import { TabIndentationPlugin as TabIndentationPlugin2 } from "@lexical/react/LexicalTabIndentationPlugin";
17780
18523
  import React24, {
17781
18524
  useCallback as useCallback11,
17782
18525
  useContext as useContext6,
17783
- useEffect as useEffect81,
18526
+ useEffect as useEffect82,
17784
18527
  useRef as useRef58,
17785
- useState as useState19
18528
+ useState as useState20
17786
18529
  } from "react";
17787
- import { jsx as jsx117, jsxs as jsxs43 } from "react/jsx-runtime";
18530
+ import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
17788
18531
  var TOGGLE_EDITING_MODE = "TOGGLE_EDITING_MODE";
17789
18532
  var RESET_EDITING_MODE = "RESET_EDITING_MODE";
17790
18533
  var BlockEditorContext = React24.createContext(null);
17791
18534
  function BlockEditor(props) {
17792
18535
  const {
17793
- themeSettings,
17794
18536
  editable = true,
17795
18537
  editorState,
17796
18538
  theme,
18539
+ themeSettings,
17797
18540
  onChange,
17798
18541
  children,
17799
18542
  renderSettings
17800
18543
  } = props;
17801
- const [modulesNumber, setModulesNumber] = useState19(0);
18544
+ const [modulesNumber, setModulesNumber] = useState20(0);
17802
18545
  const editorModulesRef = useRef58({
17803
18546
  ...initialEditorRegistry
17804
18547
  });
17805
- const [settingsPanelSwitch, setSettingsPanelSwitch] = useState19("off");
18548
+ const [settingsPanelSwitch, setSettingsPanelSwitch] = useState20("off");
17806
18549
  const settingsPanelsRef = useRef58({});
17807
18550
  const nestedEditorsRef = useRef58({});
17808
18551
  const editorRef = useRef58(null);
17809
18552
  const drawerRef = useRef58(null);
17810
- const [isBlockEditorReady, setBlockEditorReady] = useState19(false);
18553
+ const [isBlockEditorReady, setBlockEditorReady] = useState20(false);
17811
18554
  const { historyState } = useSharedHistoryContext();
17812
- const [blockEditorStyleVars, setBlockEditorStyleVars] = useState19({
17813
- "--be-ol-list-style-type": "decimal"
17814
- });
17815
18555
  const handleChange = useCallback11(
17816
18556
  (editorState2, _editor, tags) => {
17817
18557
  if (onChange && !tags?.has("new_state") && !tags?.has("history-merge")) {
@@ -17821,7 +18561,7 @@ function BlockEditor(props) {
17821
18561
  },
17822
18562
  [onChange]
17823
18563
  );
17824
- useEffect81(() => {
18564
+ useEffect82(() => {
17825
18565
  if (editorState) {
17826
18566
  const parsedEditorState = editorRef.current?.parseEditorState(editorState);
17827
18567
  if (parsedEditorState) {
@@ -17832,7 +18572,7 @@ function BlockEditor(props) {
17832
18572
  }
17833
18573
  editorRef.current?.setEditable(editable);
17834
18574
  }, [editable, editorState]);
17835
- useEffect81(() => {
18575
+ useEffect82(() => {
17836
18576
  setBlockEditorReady(true);
17837
18577
  }, []);
17838
18578
  const registerModule = useCallback11(
@@ -17848,14 +18588,22 @@ function BlockEditor(props) {
17848
18588
  const openSettingsPanel = useCallback11(() => {
17849
18589
  setSettingsPanelSwitch("on");
17850
18590
  }, []);
17851
- const [editingMode, setEditingMode] = useState19({
18591
+ const autoOpenSettingsPanel = useCallback11(() => {
18592
+ setSettingsPanelSwitch((prevState) => {
18593
+ if (prevState === "off") {
18594
+ return "on";
18595
+ }
18596
+ return prevState;
18597
+ });
18598
+ }, []);
18599
+ const [editingMode, setEditingMode] = useState20({
17852
18600
  mode: "edit"
17853
18601
  });
17854
18602
  const editingModeDataCallbackRef = useRef58();
17855
18603
  const handleResetPreviewModeEvent = () => {
17856
18604
  setEditingMode({ mode: "edit" });
17857
18605
  };
17858
- useEffect81(() => {
18606
+ useEffect82(() => {
17859
18607
  if (editingMode.mode === "preview") {
17860
18608
  window.dispatchEvent(
17861
18609
  new CustomEvent(
@@ -17881,7 +18629,7 @@ function BlockEditor(props) {
17881
18629
  );
17882
18630
  }
17883
18631
  }, [editingMode]);
17884
- useEffect81(() => {
18632
+ useEffect82(() => {
17885
18633
  window.addEventListener(
17886
18634
  RESET_EDITING_MODE,
17887
18635
  handleResetPreviewModeEvent
@@ -17893,7 +18641,7 @@ function BlockEditor(props) {
17893
18641
  );
17894
18642
  };
17895
18643
  }, []);
17896
- return /* @__PURE__ */ jsx117(
18644
+ return /* @__PURE__ */ jsx118(
17897
18645
  BlockEditorContext.Provider,
17898
18646
  {
17899
18647
  value: {
@@ -17914,6 +18662,7 @@ function BlockEditor(props) {
17914
18662
  },
17915
18663
  settingsPanelSwitch,
17916
18664
  openSettingsPanel,
18665
+ autoOpenSettingsPanel,
17917
18666
  toggleSettingsPanelSwitch: () => {
17918
18667
  setSettingsPanelSwitch((prevState) => {
17919
18668
  if (drawerRef.current) {
@@ -17948,101 +18697,63 @@ function BlockEditor(props) {
17948
18697
  },
17949
18698
  drawer: drawerRef.current,
17950
18699
  isBlockEditorReady,
17951
- blockEditorStyleVars,
17952
- setBlockEditorStyleVars: (value) => {
17953
- setBlockEditorStyleVars({
17954
- ...blockEditorStyleVars,
17955
- ...value
17956
- });
17957
- },
17958
- renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx117("div", {})
18700
+ renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx118("div", {})
17959
18701
  },
17960
- children: /* @__PURE__ */ jsx117(ThemeProvider, { theme, themeVariables: themeSettings, children: /* @__PURE__ */ jsx117(ResizeObserver, { children: /* @__PURE__ */ jsx117(
17961
- "article",
17962
- {
17963
- className: "be-article",
17964
- style: { ...blockEditorStyleVars },
17965
- children: /* @__PURE__ */ jsx117(SharedHistoryContext, { children: /* @__PURE__ */ jsxs43(NodeProvider, { children: [
17966
- /* @__PURE__ */ jsx117(
17967
- "main",
17968
- {
17969
- className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
17970
- children: /* @__PURE__ */ jsxs43(
17971
- LexicalComposer,
17972
- {
17973
- initialConfig: { ...initialConfig },
17974
- children: [
17975
- /* @__PURE__ */ jsx117(
17976
- EditorRefPlugin,
17977
- {
17978
- onMountRef: (editor) => editorRef.current = editor
17979
- }
17980
- ),
17981
- /* @__PURE__ */ jsx117(AutoFocusPlugin, {}),
17982
- /* @__PURE__ */ jsx117(AutoBottomParagraphPlugin, {}),
17983
- /* @__PURE__ */ jsx117(
17984
- HistoryPlugin9,
17985
- {
17986
- externalHistoryState: historyState
17987
- }
17988
- ),
17989
- /* @__PURE__ */ jsx117(
17990
- OnChangePlugin,
17991
- {
17992
- onChange: handleChange,
17993
- ignoreSelectionChange: true
17994
- }
17995
- ),
17996
- /* @__PURE__ */ jsx117(OnNestedChangePlugin, { onChange: handleChange }),
17997
- /* @__PURE__ */ jsx117(
17998
- RichTextPlugin8,
17999
- {
18000
- contentEditable: /* @__PURE__ */ jsx117(ContentEditable, {}),
18001
- placeholder: null,
18002
- ErrorBoundary: LexicalErrorBoundary9
18003
- }
18004
- ),
18005
- /* @__PURE__ */ jsx117(NodePastePlugin, {}),
18006
- /* @__PURE__ */ jsx117(ListPlugin3, {}),
18007
- /* @__PURE__ */ jsx117(ListLevelLimitPlugin, {}),
18008
- /* @__PURE__ */ jsx117(TabIndentationPlugin3, {}),
18009
- 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, {})
18019
- ]
18020
- }
18021
- )
18022
- }
18023
- ),
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
- )
18043
- ] }) })
18044
- }
18045
- ) }) })
18702
+ children: /* @__PURE__ */ jsx118(ResizeObserver, { children: /* @__PURE__ */ jsx118(ThemeProvider, { theme, themeSettings, children: /* @__PURE__ */ jsx118(SharedHistoryContext, { children: /* @__PURE__ */ jsxs44(NodeProvider, { children: [
18703
+ /* @__PURE__ */ jsx118(
18704
+ "main",
18705
+ {
18706
+ className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
18707
+ children: /* @__PURE__ */ jsxs44(LexicalComposer, { initialConfig: { ...initialConfig }, children: [
18708
+ /* @__PURE__ */ jsx118(
18709
+ EditorRefPlugin,
18710
+ {
18711
+ onMountRef: (editor) => editorRef.current = editor
18712
+ }
18713
+ ),
18714
+ /* @__PURE__ */ jsx118(AutoFocusPlugin, {}),
18715
+ /* @__PURE__ */ jsx118(AutoBottomParagraphPlugin, {}),
18716
+ /* @__PURE__ */ jsx118(
18717
+ HistoryPlugin9,
18718
+ {
18719
+ externalHistoryState: historyState
18720
+ }
18721
+ ),
18722
+ /* @__PURE__ */ jsx118(
18723
+ OnChangePlugin,
18724
+ {
18725
+ onChange: handleChange,
18726
+ ignoreSelectionChange: true
18727
+ }
18728
+ ),
18729
+ /* @__PURE__ */ jsx118(OnNestedChangePlugin, { onChange: handleChange }),
18730
+ /* @__PURE__ */ jsx118(
18731
+ RichTextPlugin7,
18732
+ {
18733
+ contentEditable: /* @__PURE__ */ jsx118(ContentEditable, {}),
18734
+ placeholder: null,
18735
+ ErrorBoundary: LexicalErrorBoundary9
18736
+ }
18737
+ ),
18738
+ /* @__PURE__ */ jsx118(NodePastePlugin, {}),
18739
+ /* @__PURE__ */ jsx118(ListPlugin2, {}),
18740
+ /* @__PURE__ */ jsx118(ListLevelLimitPlugin, {}),
18741
+ /* @__PURE__ */ jsx118(TabIndentationPlugin2, {}),
18742
+ children,
18743
+ /* @__PURE__ */ jsx118(TypeaheadMenuPlugin, {}),
18744
+ /* @__PURE__ */ jsx118(TypeaheadMenuAgentPlugin, {}),
18745
+ /* @__PURE__ */ jsx118(NodeMouseAnchorPlugin, {}),
18746
+ /* @__PURE__ */ jsx118(NodeMousePlugin, {}),
18747
+ /* @__PURE__ */ jsx118(TextToolbarPlugin, {}),
18748
+ /* @__PURE__ */ jsx118(TextToolbarAgentPlugin, {}),
18749
+ /* @__PURE__ */ jsx118(TypeaheadVariableAgentPlugin, {}),
18750
+ /* @__PURE__ */ jsx118(VariableComponentPlugin, {}),
18751
+ /* @__PURE__ */ jsx118(MarkdownPlugin, {})
18752
+ ] })
18753
+ }
18754
+ ),
18755
+ /* @__PURE__ */ jsx118(Drawer, { ref: drawerRef })
18756
+ ] }) }) }) })
18046
18757
  }
18047
18758
  );
18048
18759
  }
@@ -18056,24 +18767,31 @@ var useBlockEditor = () => {
18056
18767
  return context;
18057
18768
  };
18058
18769
 
18770
+ // src/BlockEditorStyle.tsx
18771
+ import { jsx as jsx119 } from "react/jsx-runtime";
18772
+ function BlockEditorStyle(props) {
18773
+ const { children, theme, themeSettings } = props;
18774
+ return /* @__PURE__ */ jsx119(ThemeProvider, { theme, themeSettings, children });
18775
+ }
18776
+
18059
18777
  // src/modules/Callout.tsx
18060
- import { useEffect as useEffect82 } from "react";
18061
- import { jsx as jsx118 } from "react/jsx-runtime";
18778
+ import { useEffect as useEffect83 } from "react";
18779
+ import { jsx as jsx120 } from "react/jsx-runtime";
18062
18780
  function Callout() {
18063
18781
  const { registerModule } = useBlockEditor();
18064
- useEffect82(() => {
18782
+ useEffect83(() => {
18065
18783
  registerModule("Callout");
18066
18784
  }, [registerModule]);
18067
- return /* @__PURE__ */ jsx118(CalloutBoxPlugin, {});
18785
+ return /* @__PURE__ */ jsx120(CalloutBoxPlugin, {});
18068
18786
  }
18069
18787
 
18070
18788
  // src/plugins/TreeViewPlugin/index.tsx
18071
18789
  import { useLexicalComposerContext as useLexicalComposerContext64 } from "@lexical/react/LexicalComposerContext";
18072
18790
  import { TreeView } from "@lexical/react/LexicalTreeView";
18073
- import { jsx as jsx119 } from "react/jsx-runtime";
18791
+ import { jsx as jsx121 } from "react/jsx-runtime";
18074
18792
  function TreeViewPlugin() {
18075
18793
  const [editor] = useLexicalComposerContext64();
18076
- return /* @__PURE__ */ jsx119(
18794
+ return /* @__PURE__ */ jsx121(
18077
18795
  TreeView,
18078
18796
  {
18079
18797
  viewClassName: "tree-view-output",
@@ -18088,26 +18806,26 @@ function TreeViewPlugin() {
18088
18806
  }
18089
18807
 
18090
18808
  // src/modules/Debug.tsx
18091
- import { useEffect as useEffect83 } from "react";
18092
- import { jsx as jsx120 } from "react/jsx-runtime";
18809
+ import { useEffect as useEffect84 } from "react";
18810
+ import { jsx as jsx122 } from "react/jsx-runtime";
18093
18811
  function Debug() {
18094
18812
  const { registerModule } = useBlockEditor();
18095
- useEffect83(() => {
18813
+ useEffect84(() => {
18096
18814
  registerModule("Debug");
18097
18815
  }, [registerModule]);
18098
- return /* @__PURE__ */ jsx120(TreeViewPlugin, {});
18816
+ return /* @__PURE__ */ jsx122(TreeViewPlugin, {});
18099
18817
  }
18100
18818
 
18101
18819
  // src/modules/Image.tsx
18102
- import { useEffect as useEffect84 } from "react";
18103
- import { Fragment as Fragment46, jsx as jsx121 } from "react/jsx-runtime";
18820
+ import { useEffect as useEffect85 } from "react";
18821
+ import { Fragment as Fragment46, jsx as jsx123 } from "react/jsx-runtime";
18104
18822
  function Image(props) {
18105
18823
  const { imageSettings } = props;
18106
18824
  const { registerModule } = useBlockEditor();
18107
- useEffect84(() => {
18825
+ useEffect85(() => {
18108
18826
  registerModule("Image");
18109
18827
  }, [registerModule]);
18110
- return /* @__PURE__ */ jsx121(Fragment46, { children: /* @__PURE__ */ jsx121(ImagePlugin, { imageSettings }) });
18828
+ return /* @__PURE__ */ jsx123(Fragment46, { children: /* @__PURE__ */ jsx123(ImagePlugin, { imageSettings }) });
18111
18829
  }
18112
18830
 
18113
18831
  // src/plugins/LinkToolbarPlugin/LinkToolbarPlugin.tsx
@@ -18127,14 +18845,14 @@ import {
18127
18845
  } from "lexical";
18128
18846
  import debounce6 from "lodash-es/debounce";
18129
18847
  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";
18848
+ import { useCallback as useCallback12, useEffect as useEffect86, useRef as useRef59, useState as useState21 } from "react";
18849
+ import { jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
18132
18850
  function LinkToolbarPlugin() {
18133
18851
  const [editor] = useLexicalComposerContext65();
18134
18852
  const popupToolbarRef = useRef59(null);
18135
18853
  const linkTextNodeRef = useRef59();
18136
18854
  const linkTextNodeOffsetRef = useRef59();
18137
- const [linkNode, setLinkNode] = useState20();
18855
+ const [linkNode, setLinkNode] = useState21();
18138
18856
  const linkNodeElementRef = useRef59();
18139
18857
  const activeEditorRef = useRef59();
18140
18858
  const handleClose = () => {
@@ -18154,7 +18872,7 @@ function LinkToolbarPlugin() {
18154
18872
  }, 10),
18155
18873
  [editor]
18156
18874
  );
18157
- useEffect85(() => {
18875
+ useEffect86(() => {
18158
18876
  return mergeRegister27(
18159
18877
  editor.registerCommand(
18160
18878
  CLICK_COMMAND13,
@@ -18228,7 +18946,7 @@ function LinkToolbarPlugin() {
18228
18946
  )
18229
18947
  );
18230
18948
  }, [editor]);
18231
- useEffect85(() => {
18949
+ useEffect86(() => {
18232
18950
  window.addEventListener("scroll", repositionPopupToolbar);
18233
18951
  window.addEventListener("resize", repositionPopupToolbar);
18234
18952
  return () => {
@@ -18238,12 +18956,12 @@ function LinkToolbarPlugin() {
18238
18956
  }, [editor]);
18239
18957
  const linkUrl = linkNode?.linkUrl;
18240
18958
  const linkTitle = linkNode?.linkUrl;
18241
- return /* @__PURE__ */ jsx122(
18959
+ return /* @__PURE__ */ jsx124(
18242
18960
  PopupToolbar,
18243
18961
  {
18244
18962
  ref: popupToolbarRef,
18245
18963
  onEscape: handleClose,
18246
- toolbar: /* @__PURE__ */ jsxs44(
18964
+ toolbar: /* @__PURE__ */ jsxs45(
18247
18965
  "div",
18248
18966
  {
18249
18967
  style: {
@@ -18256,23 +18974,23 @@ function LinkToolbarPlugin() {
18256
18974
  padding: "var(--sl-spacing-2x-small) var(--sl-spacing-x-small) var(--sl-spacing-2x-small) var(--sl-spacing-medium)"
18257
18975
  },
18258
18976
  children: [
18259
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx122(
18977
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx124(
18260
18978
  "sl-tooltip",
18261
18979
  {
18262
18980
  style: { "--show-delay": "1800" },
18263
18981
  hoist: true,
18264
18982
  content: linkUrl || "[Empty URL]",
18265
- children: /* @__PURE__ */ jsx122("span", { className: "line-short-20", children: linkTitle })
18983
+ children: /* @__PURE__ */ jsx124("span", { className: "line-short-20", children: linkTitle })
18266
18984
  }
18267
18985
  ) }) }),
18268
- /* @__PURE__ */ jsxs44(Stack, { className: "stack__row", children: [
18269
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
18986
+ /* @__PURE__ */ jsxs45(Stack, { className: "stack__row", children: [
18987
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18270
18988
  "sl-tooltip",
18271
18989
  {
18272
18990
  style: { "--show-delay": "1800" },
18273
18991
  hoist: "hoist",
18274
18992
  content: "Edit Link",
18275
- children: /* @__PURE__ */ jsx122(
18993
+ children: /* @__PURE__ */ jsx124(
18276
18994
  Button,
18277
18995
  {
18278
18996
  size: "small",
@@ -18311,13 +19029,13 @@ function LinkToolbarPlugin() {
18311
19029
  )
18312
19030
  }
18313
19031
  ) }),
18314
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
19032
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18315
19033
  "sl-tooltip",
18316
19034
  {
18317
19035
  style: { "--show-delay": "1800" },
18318
19036
  hoist: "hoist",
18319
19037
  content: "Remove Link",
18320
- children: /* @__PURE__ */ jsx122(
19038
+ children: /* @__PURE__ */ jsx124(
18321
19039
  Button,
18322
19040
  {
18323
19041
  size: "small",
@@ -18352,13 +19070,13 @@ function LinkToolbarPlugin() {
18352
19070
  )
18353
19071
  }
18354
19072
  ) }),
18355
- /* @__PURE__ */ jsx122("div", { children: /* @__PURE__ */ jsx122(
19073
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18356
19074
  "sl-tooltip",
18357
19075
  {
18358
19076
  style: { "--show-delay": "1800" },
18359
19077
  hoist: "hoist",
18360
19078
  content: "Close",
18361
- children: /* @__PURE__ */ jsx122(
19079
+ children: /* @__PURE__ */ jsx124(
18362
19080
  Button,
18363
19081
  {
18364
19082
  size: "small",
@@ -18380,16 +19098,16 @@ function LinkToolbarPlugin() {
18380
19098
  }
18381
19099
 
18382
19100
  // 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";
19101
+ import { useEffect as useEffect87 } from "react";
19102
+ import { Fragment as Fragment47, jsx as jsx125, jsxs as jsxs46 } from "react/jsx-runtime";
18385
19103
  function Link() {
18386
19104
  const { registerModule } = useBlockEditor();
18387
- useEffect86(() => {
19105
+ useEffect87(() => {
18388
19106
  registerModule("Link");
18389
19107
  }, [registerModule]);
18390
- return /* @__PURE__ */ jsxs45(Fragment47, { children: [
18391
- /* @__PURE__ */ jsx123(LinkEditorPlugin, {}),
18392
- /* @__PURE__ */ jsx123(LinkToolbarPlugin, {})
19108
+ return /* @__PURE__ */ jsxs46(Fragment47, { children: [
19109
+ /* @__PURE__ */ jsx125(LinkEditorPlugin, {}),
19110
+ /* @__PURE__ */ jsx125(LinkToolbarPlugin, {})
18393
19111
  ] });
18394
19112
  }
18395
19113
 
@@ -18403,12 +19121,12 @@ import {
18403
19121
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR15,
18404
19122
  createCommand as createCommand20
18405
19123
  } from "lexical";
18406
- import { useEffect as useEffect87 } from "react";
18407
- import { Fragment as Fragment48, jsx as jsx124 } from "react/jsx-runtime";
19124
+ import { useEffect as useEffect88 } from "react";
19125
+ import { Fragment as Fragment48, jsx as jsx126 } from "react/jsx-runtime";
18408
19126
  var INSERT_ESSAY_QUESTION_COMMAND = createCommand20("INSERT_ESSAY_QUESTION_COMMAND");
18409
19127
  function EssayQuestionPlugin() {
18410
19128
  const [editor] = useLexicalComposerContext66();
18411
- useEffect87(() => {
19129
+ useEffect88(() => {
18412
19130
  return mergeRegister28(
18413
19131
  editor.registerCommand(
18414
19132
  INSERT_ESSAY_QUESTION_COMMAND,
@@ -18442,13 +19160,13 @@ function EssayQuestionPlugin() {
18442
19160
  )
18443
19161
  );
18444
19162
  }, [editor]);
18445
- return /* @__PURE__ */ jsx124(Fragment48, {});
19163
+ return /* @__PURE__ */ jsx126(Fragment48, {});
18446
19164
  }
18447
19165
 
18448
19166
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
18449
19167
  import { useLexicalComposerContext as useLexicalComposerContext67 } from "@lexical/react/LexicalComposerContext";
18450
19168
  import { $getNodeByKey as $getNodeByKey55 } from "lexical";
18451
- import { useEffect as useEffect88, useRef as useRef60, useState as useState21 } from "react";
19169
+ import { useEffect as useEffect89, useRef as useRef60, useState as useState22 } from "react";
18452
19170
 
18453
19171
  // src/plugins/FinancialStatementQuestionPlugin/validatePointslnput.ts
18454
19172
  function validatePointsInput6(input) {
@@ -18470,13 +19188,13 @@ function validatePointsInput6(input) {
18470
19188
  }
18471
19189
 
18472
19190
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
18473
- import { jsx as jsx125 } from "react/jsx-runtime";
19191
+ import { jsx as jsx127 } from "react/jsx-runtime";
18474
19192
  function FinancialStatementQuestionSettings(props) {
18475
19193
  const { nodeKey } = props;
18476
19194
  const [editor] = useLexicalComposerContext67();
18477
19195
  const pointsTextInputRef = useRef60(null);
18478
- const [foundNode, setFoundNode] = useState21();
18479
- useEffect88(() => {
19196
+ const [foundNode, setFoundNode] = useState22();
19197
+ useEffect89(() => {
18480
19198
  if (nodeKey) {
18481
19199
  editor.getEditorState().read(() => {
18482
19200
  const fillInTheBlankNode = $getNodeByKey55(nodeKey);
@@ -18489,7 +19207,7 @@ function FinancialStatementQuestionSettings(props) {
18489
19207
  if (!foundNode) {
18490
19208
  return null;
18491
19209
  }
18492
- return /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125(
19210
+ return /* @__PURE__ */ jsx127("div", { children: /* @__PURE__ */ jsx127(
18493
19211
  TextInput,
18494
19212
  {
18495
19213
  ref: pointsTextInputRef,
@@ -18525,14 +19243,14 @@ import {
18525
19243
  $createNodeSelection as $createNodeSelection20,
18526
19244
  $createParagraphNode as $createParagraphNode23,
18527
19245
  $getNodeByKey as $getNodeByKey56,
18528
- $getRoot as $getRoot22,
19246
+ $getRoot as $getRoot21,
18529
19247
  $setSelection as $setSelection24,
18530
19248
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR16,
18531
19249
  createCommand as createCommand21,
18532
19250
  createEditor as createEditor9
18533
19251
  } 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";
19252
+ import { useEffect as useEffect90, useRef as useRef61 } from "react";
19253
+ import { Fragment as Fragment49, jsx as jsx128, jsxs as jsxs47 } from "react/jsx-runtime";
18536
19254
  var INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND = createCommand21("INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND");
18537
19255
  function FinancialStatementQuestionPlugin() {
18538
19256
  const {
@@ -18543,7 +19261,7 @@ function FinancialStatementQuestionPlugin() {
18543
19261
  } = useBlockEditor();
18544
19262
  const [editor] = useLexicalComposerContext68();
18545
19263
  const settingsPanelStickyRef = useRef61(null);
18546
- useEffect89(() => {
19264
+ useEffect90(() => {
18547
19265
  return mergeRegister29(
18548
19266
  editor.registerCommand(
18549
19267
  INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND,
@@ -18556,7 +19274,7 @@ function FinancialStatementQuestionPlugin() {
18556
19274
  if (targetNode) {
18557
19275
  const headerEditor = createEditor9();
18558
19276
  headerEditor.update(() => {
18559
- const root = $getRoot22();
19277
+ const root = $getRoot21();
18560
19278
  const paragraph = $createParagraphNode23();
18561
19279
  root.append(paragraph);
18562
19280
  });
@@ -18587,7 +19305,7 @@ function FinancialStatementQuestionPlugin() {
18587
19305
  )
18588
19306
  );
18589
19307
  }, [editor]);
18590
- useEffect89(() => {
19308
+ useEffect90(() => {
18591
19309
  if (isBlockEditorReady) {
18592
19310
  if (settingsPanelStickyRef.current) {
18593
19311
  registerSettingsPanel(
@@ -18597,21 +19315,21 @@ function FinancialStatementQuestionPlugin() {
18597
19315
  }
18598
19316
  }
18599
19317
  }, [isBlockEditorReady]);
18600
- return /* @__PURE__ */ jsxs46(Fragment49, { children: [
18601
- drawer && /* @__PURE__ */ jsx126(
19318
+ return /* @__PURE__ */ jsxs47(Fragment49, { children: [
19319
+ drawer && /* @__PURE__ */ jsx128(
18602
19320
  StickyToPosition,
18603
19321
  {
18604
19322
  ref: settingsPanelStickyRef,
18605
19323
  container: drawer,
18606
19324
  children: (data, position, isVisible) => {
18607
- return /* @__PURE__ */ jsx126("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx126(
19325
+ return /* @__PURE__ */ jsx128("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx128(
18608
19326
  SettingsCard,
18609
19327
  {
18610
19328
  isVisible: !!isVisible,
18611
19329
  container: drawer,
18612
19330
  title: "Financial Statement Settings",
18613
19331
  onClose: toggleSettingsPanelSwitch,
18614
- children: isVisible && /* @__PURE__ */ jsx126(
19332
+ children: isVisible && /* @__PURE__ */ jsx128(
18615
19333
  FinancialStatementQuestionSettings,
18616
19334
  {
18617
19335
  nodeKey: data.nodeKey
@@ -18623,36 +19341,36 @@ function FinancialStatementQuestionPlugin() {
18623
19341
  }
18624
19342
  }
18625
19343
  ),
18626
- /* @__PURE__ */ jsx126(FillInTheBlankSpaceSettingsPlugin, {})
19344
+ /* @__PURE__ */ jsx128(FillInTheBlankSpaceSettingsPlugin, {})
18627
19345
  ] });
18628
19346
  }
18629
19347
 
18630
19348
  // 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";
19349
+ import { useEffect as useEffect91 } from "react";
19350
+ import { Fragment as Fragment50, jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
18633
19351
  function Questions() {
18634
19352
  const { registerModule } = useBlockEditor();
18635
- useEffect90(() => {
19353
+ useEffect91(() => {
18636
19354
  registerModule("Questions");
18637
19355
  }, [registerModule]);
18638
- 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, {})
19356
+ return /* @__PURE__ */ jsxs48(Fragment50, { children: [
19357
+ /* @__PURE__ */ jsx129(MultipleOptionQuestionPlugin, {}),
19358
+ /* @__PURE__ */ jsx129(ShortAnswerQuestionPlugin, {}),
19359
+ /* @__PURE__ */ jsx129(MatchingQuestionPlugin, {}),
19360
+ /* @__PURE__ */ jsx129(FillInTheBlankQuestionPlugin, {}),
19361
+ /* @__PURE__ */ jsx129(JournalEntryQuestionPlugin, {}),
19362
+ /* @__PURE__ */ jsx129(FinancialStatementQuestionPlugin, {}),
19363
+ /* @__PURE__ */ jsx129(EssayQuestionPlugin, {})
18646
19364
  ] });
18647
19365
  }
18648
19366
 
18649
19367
  // src/modules/SettingsPanel.tsx
18650
- import { useEffect as useEffect91 } from "react";
18651
- import { jsx as jsx128 } from "react/jsx-runtime";
19368
+ import { useEffect as useEffect92 } from "react";
19369
+ import { jsx as jsx130 } from "react/jsx-runtime";
18652
19370
  function SettingsPanel(props) {
18653
19371
  const { defaultOpen = true } = props;
18654
19372
  const { registerModule, openSettingsPanel } = useBlockEditor();
18655
- useEffect91(() => {
19373
+ useEffect92(() => {
18656
19374
  registerModule("SettingsPanel");
18657
19375
  setTimeout(() => {
18658
19376
  if (defaultOpen) {
@@ -18660,11 +19378,11 @@ function SettingsPanel(props) {
18660
19378
  }
18661
19379
  }, 50);
18662
19380
  }, [registerModule, defaultOpen, openSettingsPanel]);
18663
- return /* @__PURE__ */ jsx128(SettingsPanelPlugin, {});
19381
+ return /* @__PURE__ */ jsx130(SettingsPanelPlugin, {});
18664
19382
  }
18665
19383
 
18666
19384
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
18667
- import { useEffect as useEffect93, useRef as useRef63 } from "react";
19385
+ import { useEffect as useEffect94, useRef as useRef63 } from "react";
18668
19386
 
18669
19387
  // src/plugins/VariablesPlugin/VariableSettings.tsx
18670
19388
  import { useLexicalComposerContext as useLexicalComposerContext69 } from "@lexical/react/LexicalComposerContext";
@@ -18674,12 +19392,12 @@ import {
18674
19392
  } from "lexical";
18675
19393
  import { Pencil as Pencil2, Save, Trash2 as Trash25 } from "lucide-react";
18676
19394
  import {
18677
- useEffect as useEffect92,
19395
+ useEffect as useEffect93,
18678
19396
  useMemo as useMemo15,
18679
19397
  useRef as useRef62,
18680
- useState as useState22
19398
+ useState as useState23
18681
19399
  } from "react";
18682
- import { Fragment as Fragment51, jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
19400
+ import { Fragment as Fragment51, jsx as jsx131, jsxs as jsxs49 } from "react/jsx-runtime";
18683
19401
  var controlGridStyle = {
18684
19402
  width: "100%",
18685
19403
  display: "flex",
@@ -18713,10 +19431,10 @@ function VariableSettings(props) {
18713
19431
  const { variableList, onRenamed } = useVariables();
18714
19432
  const [editor] = useLexicalComposerContext69();
18715
19433
  const activeEditorRef = useRef62();
18716
- const [currentVariableNode, setCurrentVariableNode] = useState22();
18717
- const [isSettingsEditingMode, setSettingsEditingMode] = useState22(false);
19434
+ const [currentVariableNode, setCurrentVariableNode] = useState23();
19435
+ const [isSettingsEditingMode, setSettingsEditingMode] = useState23(false);
18718
19436
  const variableNameInputRef = useRef62(null);
18719
- useEffect92(() => {
19437
+ useEffect93(() => {
18720
19438
  if (nodeKey) {
18721
19439
  activeEditorRef.current = nestedEditorId ? getNestedEditor(nestedEditorId) || editor : editor;
18722
19440
  if (activeEditorRef.current) {
@@ -18901,8 +19619,8 @@ function VariableSettings(props) {
18901
19619
  if (!currentVariableNode) {
18902
19620
  return null;
18903
19621
  }
18904
- return /* @__PURE__ */ jsxs48(Fragment51, { children: [
18905
- /* @__PURE__ */ jsx129("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx129(
19622
+ return /* @__PURE__ */ jsxs49(Fragment51, { children: [
19623
+ /* @__PURE__ */ jsx131("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx131(
18906
19624
  Button,
18907
19625
  {
18908
19626
  className: "button__fullwidth",
@@ -18921,10 +19639,10 @@ function VariableSettings(props) {
18921
19639
  variant: "default"
18922
19640
  }
18923
19641
  ) }),
18924
- /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18925
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Name" }),
18926
- /* @__PURE__ */ jsxs48("div", { style: controlGridStyle, children: [
18927
- /* @__PURE__ */ jsx129("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx129(
19642
+ /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19643
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Name" }),
19644
+ /* @__PURE__ */ jsxs49("div", { style: controlGridStyle, children: [
19645
+ /* @__PURE__ */ jsx131("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx131(
18928
19646
  "form",
18929
19647
  {
18930
19648
  onSubmit: (e) => {
@@ -18932,7 +19650,7 @@ function VariableSettings(props) {
18932
19650
  e.preventDefault();
18933
19651
  updateVariableName();
18934
19652
  },
18935
- children: /* @__PURE__ */ jsx129(
19653
+ children: /* @__PURE__ */ jsx131(
18936
19654
  TextInput,
18937
19655
  {
18938
19656
  ref: variableNameInputRef,
@@ -18944,7 +19662,7 @@ function VariableSettings(props) {
18944
19662
  }
18945
19663
  )
18946
19664
  }
18947
- ) : /* @__PURE__ */ jsx129(
19665
+ ) : /* @__PURE__ */ jsx131(
18948
19666
  DropdownButton,
18949
19667
  {
18950
19668
  className: "button__fullwidth button__left_aligned",
@@ -18957,7 +19675,7 @@ function VariableSettings(props) {
18957
19675
  menu: variablesMenu
18958
19676
  }
18959
19677
  ) }),
18960
- /* @__PURE__ */ jsx129("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx129(
19678
+ /* @__PURE__ */ jsx131("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx131(
18961
19679
  Button,
18962
19680
  {
18963
19681
  StartIcon: Save,
@@ -18965,7 +19683,7 @@ function VariableSettings(props) {
18965
19683
  size: "small",
18966
19684
  onClick: updateVariableName
18967
19685
  }
18968
- ) : /* @__PURE__ */ jsx129(
19686
+ ) : /* @__PURE__ */ jsx131(
18969
19687
  Button,
18970
19688
  {
18971
19689
  StartIcon: Pencil2,
@@ -18978,9 +19696,9 @@ function VariableSettings(props) {
18978
19696
  ) })
18979
19697
  ] })
18980
19698
  ] }),
18981
- /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18982
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Type" }),
18983
- /* @__PURE__ */ jsx129(
19699
+ /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19700
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Type" }),
19701
+ /* @__PURE__ */ jsx131(
18984
19702
  DropdownButton,
18985
19703
  {
18986
19704
  className: "button__fullwidth button__left_aligned",
@@ -18994,9 +19712,9 @@ function VariableSettings(props) {
18994
19712
  }
18995
19713
  )
18996
19714
  ] }),
18997
- currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18998
- /* @__PURE__ */ jsx129("div", { style: formFieldLabel, children: "Format" }),
18999
- /* @__PURE__ */ jsx129(
19715
+ currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19716
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Format" }),
19717
+ /* @__PURE__ */ jsx131(
19000
19718
  DropdownButton,
19001
19719
  {
19002
19720
  className: "button__fullwidth button__left_aligned",
@@ -19010,7 +19728,7 @@ function VariableSettings(props) {
19010
19728
  }
19011
19729
  )
19012
19730
  ] }),
19013
- /* @__PURE__ */ jsx129("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx129(
19731
+ /* @__PURE__ */ jsx131("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx131(
19014
19732
  Button,
19015
19733
  {
19016
19734
  size: "small",
@@ -19052,7 +19770,7 @@ function VariableSettings(props) {
19052
19770
  }
19053
19771
 
19054
19772
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
19055
- import { Fragment as Fragment52, jsx as jsx130 } from "react/jsx-runtime";
19773
+ import { Fragment as Fragment52, jsx as jsx132 } from "react/jsx-runtime";
19056
19774
  function VariableSettingsPlugin() {
19057
19775
  const {
19058
19776
  registerSettingsPanel,
@@ -19061,7 +19779,7 @@ function VariableSettingsPlugin() {
19061
19779
  toggleSettingsPanelSwitch
19062
19780
  } = useBlockEditor();
19063
19781
  const settingsPanelStickyRef = useRef63(null);
19064
- useEffect93(() => {
19782
+ useEffect94(() => {
19065
19783
  if (isBlockEditorReady) {
19066
19784
  if (settingsPanelStickyRef.current) {
19067
19785
  registerSettingsPanel(
@@ -19071,20 +19789,20 @@ function VariableSettingsPlugin() {
19071
19789
  }
19072
19790
  }
19073
19791
  }, [isBlockEditorReady]);
19074
- return /* @__PURE__ */ jsx130(Fragment52, { children: drawer && /* @__PURE__ */ jsx130(
19792
+ return /* @__PURE__ */ jsx132(Fragment52, { children: drawer && /* @__PURE__ */ jsx132(
19075
19793
  StickyToPosition,
19076
19794
  {
19077
19795
  ref: settingsPanelStickyRef,
19078
19796
  container: drawer,
19079
19797
  children: (data, position, isVisible) => {
19080
- return /* @__PURE__ */ jsx130("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx130(
19798
+ return /* @__PURE__ */ jsx132("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx132(
19081
19799
  SettingsCard,
19082
19800
  {
19083
19801
  isVisible: !!isVisible,
19084
19802
  container: drawer,
19085
19803
  title: "Variable Settings",
19086
19804
  onClose: toggleSettingsPanelSwitch,
19087
- children: /* @__PURE__ */ jsx130(
19805
+ children: /* @__PURE__ */ jsx132(
19088
19806
  VariableSettings,
19089
19807
  {
19090
19808
  nodeKey: data.nodeKey,
@@ -19112,18 +19830,18 @@ import debounce7 from "lodash-es/debounce";
19112
19830
  import { Bold as Bold2, Italic as Italic2, Underline as Underline2 } from "lucide-react";
19113
19831
  import {
19114
19832
  useCallback as useCallback13,
19115
- useEffect as useEffect94,
19833
+ useEffect as useEffect95,
19116
19834
  useMemo as useMemo16,
19117
19835
  useRef as useRef64,
19118
- useState as useState23
19836
+ useState as useState24
19119
19837
  } from "react";
19120
- import { jsx as jsx131 } from "react/jsx-runtime";
19838
+ import { jsx as jsx133 } from "react/jsx-runtime";
19121
19839
  function VariableToolbarPlugin() {
19122
19840
  const [editor] = useLexicalComposerContext70();
19123
19841
  const popupToolbarRef = useRef64(null);
19124
19842
  const activeEditorRef = useRef64();
19125
19843
  const selectedNodeRef = useRef64();
19126
- const [toolbarState, setToolbarState] = useState23({
19844
+ const [toolbarState, setToolbarState] = useState24({
19127
19845
  isBold: false,
19128
19846
  isItalic: false,
19129
19847
  isUnderline: false
@@ -19226,7 +19944,7 @@ function VariableToolbarPlugin() {
19226
19944
  }, 10),
19227
19945
  [activeEditorRef.current]
19228
19946
  );
19229
- useEffect94(() => {
19947
+ useEffect95(() => {
19230
19948
  return mergeRegister30(
19231
19949
  editor.registerCommand(
19232
19950
  VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -19266,7 +19984,7 @@ function VariableToolbarPlugin() {
19266
19984
  )
19267
19985
  );
19268
19986
  }, [editor]);
19269
- useEffect94(() => {
19987
+ useEffect95(() => {
19270
19988
  window.addEventListener("scroll", repositionPopupToolbar);
19271
19989
  window.addEventListener("resize", repositionPopupToolbar);
19272
19990
  return () => {
@@ -19310,34 +20028,35 @@ function VariableToolbarPlugin() {
19310
20028
  ];
19311
20029
  return resultList;
19312
20030
  }, [toolbarState]);
19313
- return /* @__PURE__ */ jsx131(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
20031
+ return /* @__PURE__ */ jsx133(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
19314
20032
  }
19315
20033
 
19316
20034
  // src/modules/Variables.tsx
19317
- import { useEffect as useEffect95 } from "react";
19318
- import { jsx as jsx132, jsxs as jsxs49 } from "react/jsx-runtime";
20035
+ import { useEffect as useEffect96 } from "react";
20036
+ import { jsx as jsx134, jsxs as jsxs50 } from "react/jsx-runtime";
19319
20037
  function Variables(props) {
19320
20038
  const { variablesSettings } = props;
19321
20039
  const { registerModule, setEditingModeDataCallback } = useBlockEditor();
19322
- useEffect95(() => {
20040
+ useEffect96(() => {
19323
20041
  registerModule("Variables");
19324
20042
  }, [registerModule]);
19325
- useEffect95(() => {
20043
+ useEffect96(() => {
19326
20044
  setEditingModeDataCallback(() => {
19327
20045
  return {
19328
20046
  variableValues: variablesSettings.getVariableValues()
19329
20047
  };
19330
20048
  });
19331
20049
  }, [variablesSettings, setEditingModeDataCallback]);
19332
- return /* @__PURE__ */ jsxs49(VariablesProvider, { variablesSettings, children: [
19333
- /* @__PURE__ */ jsx132(TypeaheadVariablePlugin, {}),
19334
- /* @__PURE__ */ jsx132(VariableSettingsPlugin, {}),
19335
- /* @__PURE__ */ jsx132(VariableToolbarPlugin, {}),
19336
- /* @__PURE__ */ jsx132(VariableToolbarAgentPlugin, {})
20050
+ return /* @__PURE__ */ jsxs50(VariablesProvider, { variablesSettings, children: [
20051
+ /* @__PURE__ */ jsx134(TypeaheadVariablePlugin, {}),
20052
+ /* @__PURE__ */ jsx134(VariableSettingsPlugin, {}),
20053
+ /* @__PURE__ */ jsx134(VariableToolbarPlugin, {}),
20054
+ /* @__PURE__ */ jsx134(VariableToolbarAgentPlugin, {})
19337
20055
  ] });
19338
20056
  }
19339
20057
  export {
19340
20058
  BlockEditor,
20059
+ BlockEditorStyle,
19341
20060
  Callout,
19342
20061
  Debug,
19343
20062
  Image,