@examind/block-editor 0.1.20 → 0.1.22

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
@@ -4525,7 +4525,7 @@ import { useEffect as useEffect30, useRef as useRef20 } from "react";
4525
4525
  // src/plugins/ImagePlugin/ImageSettings.tsx
4526
4526
  import { useLexicalComposerContext as useLexicalComposerContext17 } from "@lexical/react/LexicalComposerContext";
4527
4527
  import { $getNodeByKey as $getNodeByKey14 } from "lexical";
4528
- import { useEffect as useEffect29, useRef as useRef19 } from "react";
4528
+ import { useCallback as useCallback3, useEffect as useEffect29, useRef as useRef19, useState as useState5 } from "react";
4529
4529
  import { Fragment as Fragment17, jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
4530
4530
  function ImageSettings(props) {
4531
4531
  const { nodeKey } = props;
@@ -4535,28 +4535,96 @@ function ImageSettings(props) {
4535
4535
  const alignRadioGroupRef = useRef19(null);
4536
4536
  const widthRadioGroupRef = useRef19(null);
4537
4537
  const altTextInputRef = useRef19(null);
4538
+ const [currentImageNode, setCurrentImageNode] = useState5();
4538
4539
  useEffect29(() => {
4539
4540
  if (nodeKey) {
4540
4541
  editor.getEditorState().read(() => {
4541
4542
  const imageNode = $getNodeByKey14(nodeKey);
4542
4543
  if (imageNode && $isImageNode(imageNode)) {
4543
- alignRadioGroupRef.current?.setValue(
4544
- imageNode.__align || "start"
4545
- );
4546
- showBorderInputRef.current?.setChecked(
4547
- !!imageNode.__showBorder
4548
- );
4549
- showCaptionInputRef.current?.setChecked(
4550
- !!imageNode.__showCaption
4551
- );
4552
- widthRadioGroupRef.current?.setValue(imageNode.__width);
4553
- altTextInputRef.current?.setValue(
4554
- imageNode.__altText || ""
4555
- );
4544
+ setCurrentImageNode(imageNode);
4556
4545
  }
4557
4546
  });
4558
4547
  }
4559
4548
  }, [editor, nodeKey]);
4549
+ useEffect29(() => {
4550
+ if (currentImageNode) {
4551
+ alignRadioGroupRef.current?.setValue(
4552
+ currentImageNode.__align || "left"
4553
+ );
4554
+ showBorderInputRef.current?.setChecked(
4555
+ currentImageNode.__showBorder
4556
+ );
4557
+ showCaptionInputRef.current?.setChecked(
4558
+ currentImageNode.__showCaption
4559
+ );
4560
+ widthRadioGroupRef.current?.setValue(currentImageNode.__width);
4561
+ altTextInputRef.current?.setValue(
4562
+ currentImageNode.__altText || ""
4563
+ );
4564
+ }
4565
+ }, [currentImageNode]);
4566
+ const handleShowBorderChange = useCallback3(
4567
+ (checked) => {
4568
+ editor.update(() => {
4569
+ const targetNode = $getNodeByKey14(nodeKey);
4570
+ if (targetNode && $isImageNode(targetNode)) {
4571
+ targetNode.setShowBorder(checked);
4572
+ }
4573
+ });
4574
+ },
4575
+ [editor, nodeKey]
4576
+ );
4577
+ const handleShowCaptionChange = useCallback3(
4578
+ (checked) => {
4579
+ editor.update(() => {
4580
+ const targetNode = $getNodeByKey14(nodeKey);
4581
+ if (targetNode && $isImageNode(targetNode)) {
4582
+ targetNode.setShowCaption(checked);
4583
+ }
4584
+ });
4585
+ },
4586
+ [editor, nodeKey]
4587
+ );
4588
+ const handleAlightChange = useCallback3(
4589
+ (value) => {
4590
+ editor.update(() => {
4591
+ const targetNode = $getNodeByKey14(nodeKey);
4592
+ if (targetNode && $isImageNode(targetNode)) {
4593
+ targetNode.setAlign(value);
4594
+ }
4595
+ });
4596
+ },
4597
+ [editor, nodeKey]
4598
+ );
4599
+ const handleSizeChange = useCallback3(
4600
+ (value) => {
4601
+ editor.update(() => {
4602
+ const targetNode = $getNodeByKey14(nodeKey);
4603
+ if (targetNode && $isImageNode(targetNode)) {
4604
+ targetNode.setWidth(value);
4605
+ }
4606
+ });
4607
+ },
4608
+ [editor, nodeKey]
4609
+ );
4610
+ const handleAltTextChange = useCallback3(
4611
+ (text) => {
4612
+ editor.update(() => {
4613
+ const targetNode = $getNodeByKey14(nodeKey);
4614
+ if (targetNode && $isImageNode(targetNode)) {
4615
+ if (text) {
4616
+ targetNode.setAltText(text);
4617
+ } else {
4618
+ targetNode.setAltText("");
4619
+ }
4620
+ }
4621
+ });
4622
+ },
4623
+ [editor, nodeKey]
4624
+ );
4625
+ if (!currentImageNode) {
4626
+ return null;
4627
+ }
4560
4628
  return /* @__PURE__ */ jsxs15(Fragment17, { children: [
4561
4629
  /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(
4562
4630
  Checkbox,
@@ -4565,14 +4633,7 @@ function ImageSettings(props) {
4565
4633
  size: "small",
4566
4634
  name: "showBorder",
4567
4635
  label: "Border",
4568
- onChange: (checked) => {
4569
- editor.update(() => {
4570
- const targetNode = $getNodeByKey14(nodeKey);
4571
- if (targetNode && $isImageNode(targetNode)) {
4572
- targetNode.setShowBorder(checked);
4573
- }
4574
- });
4575
- }
4636
+ onChange: handleShowBorderChange
4576
4637
  }
4577
4638
  ) }),
4578
4639
  /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(
@@ -4582,14 +4643,7 @@ function ImageSettings(props) {
4582
4643
  size: "small",
4583
4644
  name: "showCaption",
4584
4645
  label: "Caption",
4585
- onChange: (checked) => {
4586
- editor.update(() => {
4587
- const targetNode = $getNodeByKey14(nodeKey);
4588
- if (targetNode && $isImageNode(targetNode)) {
4589
- targetNode.setShowCaption(checked);
4590
- }
4591
- });
4592
- }
4646
+ onChange: handleShowCaptionChange
4593
4647
  }
4594
4648
  ) }),
4595
4649
  /* @__PURE__ */ jsx45("div", { style: { gridColumn: "span 2" }, children: /* @__PURE__ */ jsx45("sl-divider", { style: { "--spacing": "5px" } }) }),
@@ -4599,17 +4653,10 @@ function ImageSettings(props) {
4599
4653
  ref: alignRadioGroupRef,
4600
4654
  label: "Align",
4601
4655
  name: "align",
4602
- onChange: (value) => {
4603
- editor.update(() => {
4604
- const targetNode = $getNodeByKey14(nodeKey);
4605
- if (targetNode && $isImageNode(targetNode)) {
4606
- targetNode.setAlign(value);
4607
- }
4608
- });
4609
- },
4656
+ onChange: handleAlightChange,
4610
4657
  options: [
4611
4658
  {
4612
- id: "start",
4659
+ id: "left",
4613
4660
  label: "Left"
4614
4661
  },
4615
4662
  {
@@ -4617,7 +4664,7 @@ function ImageSettings(props) {
4617
4664
  label: "Center"
4618
4665
  },
4619
4666
  {
4620
- id: "end",
4667
+ id: "right",
4621
4668
  label: "Right"
4622
4669
  }
4623
4670
  ]
@@ -4629,14 +4676,7 @@ function ImageSettings(props) {
4629
4676
  ref: widthRadioGroupRef,
4630
4677
  label: "Size",
4631
4678
  name: "width",
4632
- onChange: (value) => {
4633
- editor.update(() => {
4634
- const targetNode = $getNodeByKey14(nodeKey);
4635
- if (targetNode && $isImageNode(targetNode)) {
4636
- targetNode.setWidth(value);
4637
- }
4638
- });
4639
- },
4679
+ onChange: handleSizeChange,
4640
4680
  options: [
4641
4681
  {
4642
4682
  id: "188px",
@@ -4677,18 +4717,7 @@ function ImageSettings(props) {
4677
4717
  label: "Alt Text",
4678
4718
  clearable: true,
4679
4719
  debounceDelay: 800,
4680
- onChange: (text) => {
4681
- editor.update(() => {
4682
- const targetNode = $getNodeByKey14(nodeKey);
4683
- if (targetNode && $isImageNode(targetNode)) {
4684
- if (text) {
4685
- targetNode.setAltText(text);
4686
- } else {
4687
- targetNode.setAltText("");
4688
- }
4689
- }
4690
- });
4691
- }
4720
+ onChange: handleAltTextChange
4692
4721
  }
4693
4722
  )
4694
4723
  }
@@ -4925,7 +4954,7 @@ function ImagePlugin(props) {
4925
4954
  useEffect30(() => {
4926
4955
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
4927
4956
  registerSettingsPanel(
4928
- ImageNode.getType(),
4957
+ ImageNode2.getType(),
4929
4958
  settingsPanelStickyRef.current
4930
4959
  );
4931
4960
  }
@@ -5161,7 +5190,7 @@ function convertImageElement(domNode) {
5161
5190
  });
5162
5191
  return { node };
5163
5192
  }
5164
- var ImageNode = class _ImageNode extends DecoratorNode3 {
5193
+ var ImageNode2 = class _ImageNode extends DecoratorNode3 {
5165
5194
  static getType() {
5166
5195
  return "image";
5167
5196
  }
@@ -5190,11 +5219,11 @@ var ImageNode = class _ImageNode extends DecoratorNode3 {
5190
5219
  _createWrapper() {
5191
5220
  const element = document.createElement("div");
5192
5221
  element.classList.add("image-box-wrapper");
5193
- if (this.__align === "start") {
5222
+ if (this.__align === "left") {
5194
5223
  element.classList.add("left-aligned");
5195
5224
  } else if (this.__align === "center") {
5196
5225
  element.classList.add("centered");
5197
- } else if (this.__align === "end") {
5226
+ } else if (this.__align === "right") {
5198
5227
  element.classList.add("right-aligned");
5199
5228
  }
5200
5229
  return element;
@@ -5204,11 +5233,11 @@ var ImageNode = class _ImageNode extends DecoratorNode3 {
5204
5233
  }
5205
5234
  updateDOM(_prevNode, dom, _config) {
5206
5235
  dom.classList.remove("left-aligned", "centered", "right-aligned");
5207
- if (this.__align === "start") {
5236
+ if (this.__align === "left") {
5208
5237
  dom.classList.add("left-aligned");
5209
5238
  } else if (this.__align === "center") {
5210
5239
  dom.classList.add("centered");
5211
- } else if (this.__align === "end") {
5240
+ } else if (this.__align === "right") {
5212
5241
  dom.classList.add("right-aligned");
5213
5242
  }
5214
5243
  return false;
@@ -5336,7 +5365,7 @@ function $createImageNode(payload) {
5336
5365
  key
5337
5366
  } = payload;
5338
5367
  return $applyNodeReplacement3(
5339
- new ImageNode(
5368
+ new ImageNode2(
5340
5369
  width,
5341
5370
  align,
5342
5371
  src,
@@ -5349,11 +5378,11 @@ function $createImageNode(payload) {
5349
5378
  );
5350
5379
  }
5351
5380
  function $isImageNode(node) {
5352
- return node instanceof ImageNode;
5381
+ return node instanceof ImageNode2;
5353
5382
  }
5354
5383
 
5355
5384
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionComponent.tsx
5356
- import { useLexicalComposerContext as useLexicalComposerContext33 } from "@lexical/react/LexicalComposerContext";
5385
+ import { useLexicalComposerContext as useLexicalComposerContext34 } from "@lexical/react/LexicalComposerContext";
5357
5386
  import {
5358
5387
  $createNodeSelection as $createNodeSelection7,
5359
5388
  $getNodeByKey as $getNodeByKey27,
@@ -5361,7 +5390,7 @@ import {
5361
5390
  CLICK_COMMAND as CLICK_COMMAND7,
5362
5391
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW7
5363
5392
  } from "lexical";
5364
- import { useEffect as useEffect40, useRef as useRef26 } from "react";
5393
+ import { useEffect as useEffect41, useRef as useRef26 } from "react";
5365
5394
 
5366
5395
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionNode.tsx
5367
5396
  import {
@@ -6207,12 +6236,12 @@ import {
6207
6236
  $getNodeByKey as $getNodeByKey19,
6208
6237
  $getRoot as $getRoot3
6209
6238
  } from "lexical";
6210
- import { useCallback as useCallback3 } from "react";
6239
+ import { useCallback as useCallback4 } from "react";
6211
6240
  import { jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
6212
6241
  function DistractorButton(props) {
6213
6242
  const { nodeKey, itemIndex } = props;
6214
6243
  const [editor] = useLexicalComposerContext23();
6215
- const addDistractor = useCallback3(() => {
6244
+ const addDistractor = useCallback4(() => {
6216
6245
  editor.update(
6217
6246
  () => {
6218
6247
  const foundNode = $getNodeByKey19(nodeKey);
@@ -6322,7 +6351,7 @@ import {
6322
6351
  $getRoot as $getRoot4
6323
6352
  } from "lexical";
6324
6353
  import { CircleMinus, CirclePlus } from "lucide-react";
6325
- import { useCallback as useCallback4 } from "react";
6354
+ import { useCallback as useCallback5 } from "react";
6326
6355
  import { jsx as jsx56, jsxs as jsxs19 } from "react/jsx-runtime";
6327
6356
  function QuestionItemComponent(props) {
6328
6357
  const {
@@ -6335,7 +6364,7 @@ function QuestionItemComponent(props) {
6335
6364
  } = props;
6336
6365
  const { historyState } = useSharedHistoryContext();
6337
6366
  const [editor] = useLexicalComposerContext25();
6338
- const addItem = useCallback4(() => {
6367
+ const addItem = useCallback5(() => {
6339
6368
  editor.update(
6340
6369
  () => {
6341
6370
  const foundNode = $getNodeByKey20(nodeKey);
@@ -6379,7 +6408,7 @@ function QuestionItemComponent(props) {
6379
6408
  }
6380
6409
  );
6381
6410
  }, [editor, nodeKey, itemIndex, correct]);
6382
- const removeItem = useCallback4(() => {
6411
+ const removeItem = useCallback5(() => {
6383
6412
  editor.update(() => {
6384
6413
  const foundNode = $getNodeByKey20(nodeKey);
6385
6414
  if ($isMatchingQuestionNode(foundNode)) {
@@ -6771,7 +6800,7 @@ import {
6771
6800
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW5
6772
6801
  } from "lexical";
6773
6802
  import { Plus } from "lucide-react";
6774
- import { useCallback as useCallback7, useEffect as useEffect37, useRef as useRef24 } from "react";
6803
+ import { useCallback as useCallback8, useEffect as useEffect37, useRef as useRef24 } from "react";
6775
6804
 
6776
6805
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionItemComponent.tsx
6777
6806
  import { useLexicalComposerContext as useLexicalComposerContext27 } from "@lexical/react/LexicalComposerContext";
@@ -6782,13 +6811,13 @@ import { RichTextPlugin as RichTextPlugin3 } from "@lexical/react/LexicalRichTex
6782
6811
  import clsx3 from "clsx";
6783
6812
  import { $getNodeByKey as $getNodeByKey22 } from "lexical";
6784
6813
  import { Check, Trash2 as Trash23, XIcon as XIcon3 } from "lucide-react";
6785
- import { useCallback as useCallback5 } from "react";
6814
+ import { useCallback as useCallback6 } from "react";
6786
6815
  import { jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
6787
6816
  function MultipleOptionQuestionItemComponent(props) {
6788
6817
  const { nodeKey, id, optionIndex, correct, content } = props;
6789
6818
  const { historyState } = useSharedHistoryContext();
6790
6819
  const [editor] = useLexicalComposerContext27();
6791
- const toggleChoice = useCallback5(() => {
6820
+ const toggleChoice = useCallback6(() => {
6792
6821
  editor.update(() => {
6793
6822
  const foundNode = $getNodeByKey22(nodeKey);
6794
6823
  if ($isMultipleOptionQuestionNode(foundNode)) {
@@ -6796,7 +6825,7 @@ function MultipleOptionQuestionItemComponent(props) {
6796
6825
  }
6797
6826
  });
6798
6827
  }, [editor, nodeKey, optionIndex, correct]);
6799
- const removeOptionItem = useCallback5(() => {
6828
+ const removeOptionItem = useCallback6(() => {
6800
6829
  editor.update(() => {
6801
6830
  const foundNode = $getNodeByKey22(nodeKey);
6802
6831
  if ($isMultipleOptionQuestionNode(foundNode)) {
@@ -6894,12 +6923,12 @@ function MultipleOptionQuestionItemComponent(props) {
6894
6923
  import { useLexicalComposerContext as useLexicalComposerContext28 } from "@lexical/react/LexicalComposerContext";
6895
6924
  import { $getNodeByKey as $getNodeByKey23 } from "lexical";
6896
6925
  import { Check as Check2, Trash2 as Trash24 } from "lucide-react";
6897
- import { useCallback as useCallback6 } from "react";
6926
+ import { useCallback as useCallback7 } from "react";
6898
6927
  import { jsx as jsx60, jsxs as jsxs22 } from "react/jsx-runtime";
6899
6928
  function MultipleOptionQuestionNoneOfTheAboveItem(props) {
6900
6929
  const { nodeKey } = props;
6901
6930
  const [editor] = useLexicalComposerContext28();
6902
- const removeOptionItem = useCallback6(() => {
6931
+ const removeOptionItem = useCallback7(() => {
6903
6932
  editor.update(() => {
6904
6933
  const foundNode = $getNodeByKey23(nodeKey);
6905
6934
  if ($isMultipleOptionQuestionNode(foundNode)) {
@@ -6954,7 +6983,7 @@ function MultipleOptionQuestionComponent(props) {
6954
6983
  const { nodeKey, options, questionType, noneOfTheAbove } = props;
6955
6984
  const [editor] = useLexicalComposerContext29();
6956
6985
  const rootElementRef = useRef24(null);
6957
- const addOptionItem = useCallback7(() => {
6986
+ const addOptionItem = useCallback8(() => {
6958
6987
  let newContent = void 0;
6959
6988
  editor.update(
6960
6989
  () => {
@@ -7332,8 +7361,45 @@ import {
7332
7361
  } from "lexical";
7333
7362
  import { nanoid as nanoid5 } from "nanoid";
7334
7363
 
7335
- // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionComponent.tsx
7364
+ // src/plugins/WordsCounterPlugin/WordsCounterPlugin.tsx
7336
7365
  import { useLexicalComposerContext as useLexicalComposerContext30 } from "@lexical/react/LexicalComposerContext";
7366
+ import { $getRoot as $getRoot7 } from "lexical";
7367
+ import debounce3 from "lodash-es/debounce";
7368
+ import { useEffect as useEffect38 } from "react";
7369
+ import { Fragment as Fragment23, jsx as jsx63 } from "react/jsx-runtime";
7370
+ function countWords(text) {
7371
+ if (text && text.trim().length > 0) {
7372
+ const words = text.split(" ").filter((word) => word && word.trim().length > 0);
7373
+ return words.length;
7374
+ }
7375
+ return 0;
7376
+ }
7377
+ function WordsCounterPlugin(props) {
7378
+ const { onChange } = props;
7379
+ const [editor] = useLexicalComposerContext30();
7380
+ const handleChange = debounce3((editorState) => {
7381
+ editorState.read(() => {
7382
+ onChange(countWords($getRoot7().getTextContent()));
7383
+ });
7384
+ }, 800);
7385
+ useEffect38(() => {
7386
+ editor.getEditorState().read(() => {
7387
+ onChange(countWords($getRoot7().getTextContent()));
7388
+ });
7389
+ return editor.registerUpdateListener(
7390
+ ({ editorState, dirtyElements, dirtyLeaves, tags }) => {
7391
+ if (dirtyElements.size === 0 && dirtyLeaves.size === 0 || tags.has("history-merge")) {
7392
+ return;
7393
+ }
7394
+ handleChange(editorState);
7395
+ }
7396
+ );
7397
+ }, [editor]);
7398
+ return /* @__PURE__ */ jsx63(Fragment23, {});
7399
+ }
7400
+
7401
+ // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionComponent.tsx
7402
+ import { useLexicalComposerContext as useLexicalComposerContext31 } from "@lexical/react/LexicalComposerContext";
7337
7403
  import { LexicalErrorBoundary as LexicalErrorBoundary5 } from "@lexical/react/LexicalErrorBoundary";
7338
7404
  import { HistoryPlugin as HistoryPlugin5 } from "@lexical/react/LexicalHistoryPlugin";
7339
7405
  import { LexicalNestedComposer as LexicalNestedComposer5 } from "@lexical/react/LexicalNestedComposer";
@@ -7345,14 +7411,18 @@ import {
7345
7411
  CLICK_COMMAND as CLICK_COMMAND6,
7346
7412
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW6
7347
7413
  } from "lexical";
7348
- import { useEffect as useEffect38, useRef as useRef25 } from "react";
7349
- import { jsx as jsx63, jsxs as jsxs24 } from "react/jsx-runtime";
7414
+ import { useEffect as useEffect39, useRef as useRef25 } from "react";
7415
+ import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
7416
+ function getFooterText(wordsCount) {
7417
+ return `${wordsCount} / 100 words`;
7418
+ }
7350
7419
  function ShortAnswerQuestionComponent(props) {
7351
7420
  const { nodeKey, id, notes } = props;
7352
7421
  const { historyState } = useSharedHistoryContext();
7353
- const [editor] = useLexicalComposerContext30();
7422
+ const [editor] = useLexicalComposerContext31();
7354
7423
  const rootElementRef = useRef25(null);
7355
- useEffect38(() => {
7424
+ const promptFooterTextRef = useRef25(null);
7425
+ useEffect39(() => {
7356
7426
  return editor.registerCommand(
7357
7427
  CLICK_COMMAND6,
7358
7428
  (event, _activeEditor) => {
@@ -7380,7 +7450,7 @@ function ShortAnswerQuestionComponent(props) {
7380
7450
  id,
7381
7451
  className: "short-answer-question-prompt",
7382
7452
  children: [
7383
- /* @__PURE__ */ jsx63(
7453
+ /* @__PURE__ */ jsx64(
7384
7454
  "div",
7385
7455
  {
7386
7456
  className: "short-answer-question-prompt-title",
@@ -7388,41 +7458,56 @@ function ShortAnswerQuestionComponent(props) {
7388
7458
  children: "Short Answer"
7389
7459
  }
7390
7460
  ),
7391
- /* @__PURE__ */ jsxs24(
7461
+ /* @__PURE__ */ jsx64(
7392
7462
  "div",
7393
7463
  {
7394
7464
  className: "short-answer-question-prompt-content",
7395
7465
  "data-selectable": "true",
7396
- children: [
7397
- /* @__PURE__ */ jsx63("div", { className: "title", "data-selectable": "true", children: "Answer Key" }),
7398
- /* @__PURE__ */ jsx63("div", { children: /* @__PURE__ */ jsx63(LexicalNestedComposer5, { initialEditor: notes, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7399
- /* @__PURE__ */ jsx63(SettingsPanelNestedAgentPlugin, {}),
7400
- /* @__PURE__ */ jsx63(
7401
- RichTextPlugin4,
7402
- {
7403
- contentEditable: /* @__PURE__ */ jsx63(NestedContentEditable, {}),
7404
- ErrorBoundary: LexicalErrorBoundary5,
7405
- placeholder: null
7406
- },
7407
- nodeKey
7408
- ),
7409
- /* @__PURE__ */ jsx63(HistoryPlugin5, { externalHistoryState: historyState }),
7410
- /* @__PURE__ */ jsx63(
7411
- TextToolbarAgentPlugin,
7412
- {
7413
- decoratorNode: ShortAnswerQuestionNode
7414
- }
7415
- ),
7416
- /* @__PURE__ */ jsx63(
7417
- TypeaheadVariableAgentPlugin,
7418
- {
7419
- decoratorNode: ShortAnswerQuestionNode
7466
+ children: /* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsx64(LexicalNestedComposer5, { initialEditor: notes, children: /* @__PURE__ */ jsxs24(NestedEditor, { nodeKey, children: [
7467
+ /* @__PURE__ */ jsx64(SettingsPanelNestedAgentPlugin, {}),
7468
+ /* @__PURE__ */ jsx64(
7469
+ RichTextPlugin4,
7470
+ {
7471
+ contentEditable: /* @__PURE__ */ jsx64(NestedContentEditable, {}),
7472
+ ErrorBoundary: LexicalErrorBoundary5,
7473
+ placeholder: null
7474
+ },
7475
+ nodeKey
7476
+ ),
7477
+ /* @__PURE__ */ jsx64(HistoryPlugin5, { externalHistoryState: historyState }),
7478
+ /* @__PURE__ */ jsx64(
7479
+ TextToolbarAgentPlugin,
7480
+ {
7481
+ decoratorNode: ShortAnswerQuestionNode
7482
+ }
7483
+ ),
7484
+ /* @__PURE__ */ jsx64(
7485
+ TypeaheadVariableAgentPlugin,
7486
+ {
7487
+ decoratorNode: ShortAnswerQuestionNode
7488
+ }
7489
+ ),
7490
+ /* @__PURE__ */ jsx64(VariableComponentPlugin, {}),
7491
+ /* @__PURE__ */ jsx64(VariableToolbarAgentPlugin, {}),
7492
+ /* @__PURE__ */ jsx64(
7493
+ WordsCounterPlugin,
7494
+ {
7495
+ onChange: (wordsCount) => {
7496
+ if (promptFooterTextRef.current) {
7497
+ promptFooterTextRef.current.innerText = getFooterText(wordsCount);
7498
+ }
7420
7499
  }
7421
- ),
7422
- /* @__PURE__ */ jsx63(VariableComponentPlugin, {}),
7423
- /* @__PURE__ */ jsx63(VariableToolbarAgentPlugin, {})
7424
- ] }) }) })
7425
- ]
7500
+ }
7501
+ )
7502
+ ] }) }) })
7503
+ }
7504
+ ),
7505
+ /* @__PURE__ */ jsx64(
7506
+ "div",
7507
+ {
7508
+ "data-selectable": "true",
7509
+ className: "short-answer-question-prompt-footer",
7510
+ children: /* @__PURE__ */ jsx64("span", { ref: promptFooterTextRef })
7426
7511
  }
7427
7512
  )
7428
7513
  ]
@@ -7431,7 +7516,7 @@ function ShortAnswerQuestionComponent(props) {
7431
7516
  }
7432
7517
 
7433
7518
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionNode.tsx
7434
- import { jsx as jsx64 } from "react/jsx-runtime";
7519
+ import { jsx as jsx65 } from "react/jsx-runtime";
7435
7520
  var TYPE_NAME7 = "short-answer-question";
7436
7521
  function initNewContentEditor3() {
7437
7522
  return createEditor5();
@@ -7520,7 +7605,7 @@ var ShortAnswerQuestionNode = class _ShortAnswerQuestionNode extends DecoratorNo
7520
7605
  writable.__maxWords = maxWords;
7521
7606
  }
7522
7607
  decorate() {
7523
- return /* @__PURE__ */ jsx64(
7608
+ return /* @__PURE__ */ jsx65(
7524
7609
  ShortAnswerQuestionComponent,
7525
7610
  {
7526
7611
  nodeKey: this.__key,
@@ -7540,17 +7625,17 @@ function $isShortAnswerQuestionNode(node) {
7540
7625
  }
7541
7626
 
7542
7627
  // src/plugins/VariablesPlugin/TypeaheadVariableAgentPlugin.tsx
7543
- import { useLexicalComposerContext as useLexicalComposerContext31 } from "@lexical/react/LexicalComposerContext";
7628
+ import { useLexicalComposerContext as useLexicalComposerContext32 } from "@lexical/react/LexicalComposerContext";
7544
7629
  import { mergeRegister as mergeRegister8 } from "@lexical/utils";
7545
7630
  import { createCommand as createCommand7 } from "lexical";
7546
- import { useEffect as useEffect39 } from "react";
7547
- import { Fragment as Fragment23, jsx as jsx65 } from "react/jsx-runtime";
7631
+ import { useEffect as useEffect40 } from "react";
7632
+ import { Fragment as Fragment24, jsx as jsx66 } from "react/jsx-runtime";
7548
7633
  var TYPEAHEAD_VARIABLE_COMMAND = createCommand7("TYPEAHEAD_VARIABLE_COMMAND");
7549
7634
  function TypeaheadVariableAgentPlugin(props) {
7550
7635
  const { decoratorNode } = props;
7551
7636
  const { hasModule, modulesNumber } = useBlockEditor();
7552
- const [editor] = useLexicalComposerContext31();
7553
- useEffect39(() => {
7637
+ const [editor] = useLexicalComposerContext32();
7638
+ useEffect40(() => {
7554
7639
  if (hasModule("Variables")) {
7555
7640
  return mergeRegister8(
7556
7641
  editor.registerUpdateListener(({ tags }) => {
@@ -7563,11 +7648,11 @@ function TypeaheadVariableAgentPlugin(props) {
7563
7648
  );
7564
7649
  }
7565
7650
  }, [editor, modulesNumber, decoratorNode, hasModule]);
7566
- return /* @__PURE__ */ jsx65(Fragment23, {});
7651
+ return /* @__PURE__ */ jsx66(Fragment24, {});
7567
7652
  }
7568
7653
 
7569
7654
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionItemComponent.tsx
7570
- import { useLexicalComposerContext as useLexicalComposerContext32 } from "@lexical/react/LexicalComposerContext";
7655
+ import { useLexicalComposerContext as useLexicalComposerContext33 } from "@lexical/react/LexicalComposerContext";
7571
7656
  import { LexicalErrorBoundary as LexicalErrorBoundary6 } from "@lexical/react/LexicalErrorBoundary";
7572
7657
  import { HistoryPlugin as HistoryPlugin6 } from "@lexical/react/LexicalHistoryPlugin";
7573
7658
  import { LexicalNestedComposer as LexicalNestedComposer6 } from "@lexical/react/LexicalNestedComposer";
@@ -7576,16 +7661,16 @@ import clsx4 from "clsx";
7576
7661
  import {
7577
7662
  $createParagraphNode as $createParagraphNode8,
7578
7663
  $getNodeByKey as $getNodeByKey26,
7579
- $getRoot as $getRoot7
7664
+ $getRoot as $getRoot8
7580
7665
  } from "lexical";
7581
7666
  import { CircleMinus as CircleMinus2, CirclePlus as CirclePlus2 } from "lucide-react";
7582
- import { useCallback as useCallback8 } from "react";
7583
- import { jsx as jsx66, jsxs as jsxs25 } from "react/jsx-runtime";
7667
+ import { useCallback as useCallback9 } from "react";
7668
+ import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
7584
7669
  function JournalEntryQuestionItemComponent(props) {
7585
7670
  const { nodeKey, id, itemIndex, correct, credit, debit, account } = props;
7586
7671
  const { historyState } = useSharedHistoryContext();
7587
- const [editor] = useLexicalComposerContext32();
7588
- const addItem = useCallback8(() => {
7672
+ const [editor] = useLexicalComposerContext33();
7673
+ const addItem = useCallback9(() => {
7589
7674
  editor.update(
7590
7675
  () => {
7591
7676
  const foundNode = $getNodeByKey26(nodeKey);
@@ -7601,7 +7686,7 @@ function JournalEntryQuestionItemComponent(props) {
7601
7686
  const newEntryItem = foundNode.__lineItems[itemIndex + 1];
7602
7687
  if (newEntryItem.account) {
7603
7688
  newEntryItem.account.update(() => {
7604
- const root = $getRoot7();
7689
+ const root = $getRoot8();
7605
7690
  let firstChild = root.getFirstChild();
7606
7691
  if (!firstChild) {
7607
7692
  firstChild = $createParagraphNode8();
@@ -7612,7 +7697,7 @@ function JournalEntryQuestionItemComponent(props) {
7612
7697
  }
7613
7698
  if (newEntryItem.credit) {
7614
7699
  newEntryItem.credit.update(() => {
7615
- const root = $getRoot7();
7700
+ const root = $getRoot8();
7616
7701
  let firstChild = root.getFirstChild();
7617
7702
  if (!firstChild) {
7618
7703
  firstChild = $createParagraphNode8();
@@ -7622,7 +7707,7 @@ function JournalEntryQuestionItemComponent(props) {
7622
7707
  }
7623
7708
  if (newEntryItem.debit) {
7624
7709
  newEntryItem.debit.update(() => {
7625
- const root = $getRoot7();
7710
+ const root = $getRoot8();
7626
7711
  let firstChild = root.getFirstChild();
7627
7712
  if (!firstChild) {
7628
7713
  firstChild = $createParagraphNode8();
@@ -7636,7 +7721,7 @@ function JournalEntryQuestionItemComponent(props) {
7636
7721
  }
7637
7722
  );
7638
7723
  }, [editor, nodeKey, itemIndex, correct]);
7639
- const removeItem = useCallback8(() => {
7724
+ const removeItem = useCallback9(() => {
7640
7725
  editor.update(() => {
7641
7726
  const foundNode = $getNodeByKey26(nodeKey);
7642
7727
  if ($isJournalEntryQuestionNode(foundNode)) {
@@ -7662,32 +7747,32 @@ function JournalEntryQuestionItemComponent(props) {
7662
7747
  ),
7663
7748
  "data-selectable": "true",
7664
7749
  children: [
7665
- /* @__PURE__ */ jsx66("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx66("div", { "data-selectable": "true", children: correct ? "Account" : "Incorrect Choices (1 per line)" }) }),
7666
- /* @__PURE__ */ jsx66("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx66(LexicalNestedComposer6, { initialEditor: account, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7667
- /* @__PURE__ */ jsx66(SettingsPanelNestedAgentPlugin, {}),
7668
- /* @__PURE__ */ jsx66(
7750
+ /* @__PURE__ */ jsx67("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx67("div", { "data-selectable": "true", children: correct ? "Account" : "Incorrect Choices (1 per line)" }) }),
7751
+ /* @__PURE__ */ jsx67("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx67(LexicalNestedComposer6, { initialEditor: account, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7752
+ /* @__PURE__ */ jsx67(SettingsPanelNestedAgentPlugin, {}),
7753
+ /* @__PURE__ */ jsx67(
7669
7754
  RichTextPlugin5,
7670
7755
  {
7671
- contentEditable: /* @__PURE__ */ jsx66(NestedContentEditable, {}),
7756
+ contentEditable: /* @__PURE__ */ jsx67(NestedContentEditable, {}),
7672
7757
  ErrorBoundary: LexicalErrorBoundary6,
7673
7758
  placeholder: null
7674
7759
  },
7675
7760
  nodeKey
7676
7761
  ),
7677
- /* @__PURE__ */ jsx66(HistoryPlugin6, { externalHistoryState: historyState }),
7678
- /* @__PURE__ */ jsx66(
7762
+ /* @__PURE__ */ jsx67(HistoryPlugin6, { externalHistoryState: historyState }),
7763
+ /* @__PURE__ */ jsx67(
7679
7764
  TextToolbarAgentPlugin,
7680
7765
  {
7681
7766
  decoratorNode: JournalEntryQuestionNode
7682
7767
  }
7683
7768
  ),
7684
- /* @__PURE__ */ jsx66(
7769
+ /* @__PURE__ */ jsx67(
7685
7770
  TypeaheadVariableAgentPlugin,
7686
7771
  {
7687
7772
  decoratorNode: JournalEntryQuestionNode
7688
7773
  }
7689
7774
  ),
7690
- /* @__PURE__ */ jsx66(VariableComponentPlugin, {})
7775
+ /* @__PURE__ */ jsx67(VariableComponentPlugin, {})
7691
7776
  ] }) }) })
7692
7777
  ]
7693
7778
  }
@@ -7704,36 +7789,36 @@ function JournalEntryQuestionItemComponent(props) {
7704
7789
  ),
7705
7790
  "data-selectable": "true",
7706
7791
  children: [
7707
- /* @__PURE__ */ jsx66("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx66("div", { "data-selectable": "true", children: "Debit" }) }),
7708
- /* @__PURE__ */ jsx66("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx66(LexicalNestedComposer6, { initialEditor: debit, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7709
- /* @__PURE__ */ jsx66(SettingsPanelNestedAgentPlugin, {}),
7710
- /* @__PURE__ */ jsx66(
7792
+ /* @__PURE__ */ jsx67("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx67("div", { "data-selectable": "true", children: "Debit" }) }),
7793
+ /* @__PURE__ */ jsx67("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx67(LexicalNestedComposer6, { initialEditor: debit, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7794
+ /* @__PURE__ */ jsx67(SettingsPanelNestedAgentPlugin, {}),
7795
+ /* @__PURE__ */ jsx67(
7711
7796
  RichTextPlugin5,
7712
7797
  {
7713
- contentEditable: /* @__PURE__ */ jsx66(NestedContentEditable, {}),
7798
+ contentEditable: /* @__PURE__ */ jsx67(NestedContentEditable, {}),
7714
7799
  ErrorBoundary: LexicalErrorBoundary6,
7715
7800
  placeholder: null
7716
7801
  },
7717
7802
  nodeKey
7718
7803
  ),
7719
- /* @__PURE__ */ jsx66(HistoryPlugin6, { externalHistoryState: historyState }),
7720
- /* @__PURE__ */ jsx66(
7804
+ /* @__PURE__ */ jsx67(HistoryPlugin6, { externalHistoryState: historyState }),
7805
+ /* @__PURE__ */ jsx67(
7721
7806
  TextToolbarAgentPlugin,
7722
7807
  {
7723
7808
  decoratorNode: JournalEntryQuestionNode
7724
7809
  }
7725
7810
  ),
7726
- /* @__PURE__ */ jsx66(
7811
+ /* @__PURE__ */ jsx67(
7727
7812
  TypeaheadVariableAgentPlugin,
7728
7813
  {
7729
7814
  decoratorNode: JournalEntryQuestionNode
7730
7815
  }
7731
7816
  ),
7732
- /* @__PURE__ */ jsx66(VariableComponentPlugin, {})
7817
+ /* @__PURE__ */ jsx67(VariableComponentPlugin, {})
7733
7818
  ] }) }) })
7734
7819
  ]
7735
7820
  }
7736
- ) : /* @__PURE__ */ jsx66("div", {}),
7821
+ ) : /* @__PURE__ */ jsx67("div", {}),
7737
7822
  credit ? /* @__PURE__ */ jsxs25(
7738
7823
  "div",
7739
7824
  {
@@ -7746,36 +7831,36 @@ function JournalEntryQuestionItemComponent(props) {
7746
7831
  ),
7747
7832
  "data-selectable": "true",
7748
7833
  children: [
7749
- /* @__PURE__ */ jsx66("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx66("div", { "data-selectable": "true", children: "Credit" }) }),
7750
- /* @__PURE__ */ jsx66("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx66(LexicalNestedComposer6, { initialEditor: credit, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7751
- /* @__PURE__ */ jsx66(SettingsPanelNestedAgentPlugin, {}),
7752
- /* @__PURE__ */ jsx66(
7834
+ /* @__PURE__ */ jsx67("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx67("div", { "data-selectable": "true", children: "Credit" }) }),
7835
+ /* @__PURE__ */ jsx67("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx67(LexicalNestedComposer6, { initialEditor: credit, children: /* @__PURE__ */ jsxs25(NestedEditor, { nodeKey, children: [
7836
+ /* @__PURE__ */ jsx67(SettingsPanelNestedAgentPlugin, {}),
7837
+ /* @__PURE__ */ jsx67(
7753
7838
  RichTextPlugin5,
7754
7839
  {
7755
- contentEditable: /* @__PURE__ */ jsx66(NestedContentEditable, {}),
7840
+ contentEditable: /* @__PURE__ */ jsx67(NestedContentEditable, {}),
7756
7841
  ErrorBoundary: LexicalErrorBoundary6,
7757
7842
  placeholder: null
7758
7843
  },
7759
7844
  nodeKey
7760
7845
  ),
7761
- /* @__PURE__ */ jsx66(HistoryPlugin6, { externalHistoryState: historyState }),
7762
- /* @__PURE__ */ jsx66(
7846
+ /* @__PURE__ */ jsx67(HistoryPlugin6, { externalHistoryState: historyState }),
7847
+ /* @__PURE__ */ jsx67(
7763
7848
  TextToolbarAgentPlugin,
7764
7849
  {
7765
7850
  decoratorNode: JournalEntryQuestionNode
7766
7851
  }
7767
7852
  ),
7768
- /* @__PURE__ */ jsx66(
7853
+ /* @__PURE__ */ jsx67(
7769
7854
  TypeaheadVariableAgentPlugin,
7770
7855
  {
7771
7856
  decoratorNode: JournalEntryQuestionNode
7772
7857
  }
7773
7858
  ),
7774
- /* @__PURE__ */ jsx66(VariableComponentPlugin, {}),
7775
- /* @__PURE__ */ jsx66(VariableToolbarAgentPlugin, {})
7859
+ /* @__PURE__ */ jsx67(VariableComponentPlugin, {}),
7860
+ /* @__PURE__ */ jsx67(VariableToolbarAgentPlugin, {})
7776
7861
  ] }) }) }),
7777
7862
  /* @__PURE__ */ jsxs25("div", { className: "controls", children: [
7778
- itemIndex > 0 ? /* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsx66(
7863
+ itemIndex > 0 ? /* @__PURE__ */ jsx67("div", { children: /* @__PURE__ */ jsx67(
7779
7864
  Button,
7780
7865
  {
7781
7866
  StartIcon: CircleMinus2,
@@ -7784,8 +7869,8 @@ function JournalEntryQuestionItemComponent(props) {
7784
7869
  className: "cancel",
7785
7870
  onClick: removeItem
7786
7871
  }
7787
- ) }) : /* @__PURE__ */ jsx66("div", {}),
7788
- /* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsx66(
7872
+ ) }) : /* @__PURE__ */ jsx67("div", {}),
7873
+ /* @__PURE__ */ jsx67("div", { children: /* @__PURE__ */ jsx67(
7789
7874
  Button,
7790
7875
  {
7791
7876
  StartIcon: CirclePlus2,
@@ -7798,19 +7883,19 @@ function JournalEntryQuestionItemComponent(props) {
7798
7883
  ] })
7799
7884
  ]
7800
7885
  }
7801
- ) : /* @__PURE__ */ jsx66("div", {})
7886
+ ) : /* @__PURE__ */ jsx67("div", {})
7802
7887
  ]
7803
7888
  }
7804
7889
  );
7805
7890
  }
7806
7891
 
7807
7892
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionComponent.tsx
7808
- import { jsx as jsx67, jsxs as jsxs26 } from "react/jsx-runtime";
7893
+ import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
7809
7894
  function JournalEntryQuestionComponent(props) {
7810
7895
  const { nodeKey, journalType, lineItems, id } = props;
7811
- const [editor] = useLexicalComposerContext33();
7896
+ const [editor] = useLexicalComposerContext34();
7812
7897
  const rootElementRef = useRef26(null);
7813
- useEffect40(() => {
7898
+ useEffect41(() => {
7814
7899
  return editor.registerCommand(
7815
7900
  CLICK_COMMAND7,
7816
7901
  (event, _activeEditor) => {
@@ -7838,7 +7923,7 @@ function JournalEntryQuestionComponent(props) {
7838
7923
  id,
7839
7924
  className: "journal-entry-question-prompt",
7840
7925
  children: [
7841
- /* @__PURE__ */ jsx67(
7926
+ /* @__PURE__ */ jsx68(
7842
7927
  "div",
7843
7928
  {
7844
7929
  className: "journal-entry-question-prompt-title",
@@ -7858,14 +7943,14 @@ function JournalEntryQuestionComponent(props) {
7858
7943
  className: "journal-entry-question-prompt-question-item correct",
7859
7944
  "data-selectable": "true",
7860
7945
  children: [
7861
- /* @__PURE__ */ jsx67("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx67("div", { "data-selectable": "true", children: "Correct Choice" }) }),
7862
- /* @__PURE__ */ jsx67("div", { "data-selectable": "true", children: "No Entry Required" })
7946
+ /* @__PURE__ */ jsx68("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ jsx68("div", { "data-selectable": "true", children: "Correct Choice" }) }),
7947
+ /* @__PURE__ */ jsx68("div", { "data-selectable": "true", children: "No Entry Required" })
7863
7948
  ]
7864
7949
  }
7865
7950
  ),
7866
7951
  journalType === "noEntryRequiredCorrect" && lineItems.map((journalEntryItem, itemIndex) => {
7867
7952
  if (!journalEntryItem.correct) {
7868
- return /* @__PURE__ */ jsx67(
7953
+ return /* @__PURE__ */ jsx68(
7869
7954
  JournalEntryQuestionItemComponent,
7870
7955
  {
7871
7956
  nodeKey,
@@ -7881,7 +7966,7 @@ function JournalEntryQuestionComponent(props) {
7881
7966
  }
7882
7967
  }),
7883
7968
  (journalType === "default" || journalType === "noEntryRequiredDistractor") && lineItems.map((journalEntryItem, itemIndex) => {
7884
- return /* @__PURE__ */ jsx67(
7969
+ return /* @__PURE__ */ jsx68(
7885
7970
  JournalEntryQuestionItemComponent,
7886
7971
  {
7887
7972
  nodeKey,
@@ -7910,7 +7995,7 @@ import {
7910
7995
  createEditor as createEditor6
7911
7996
  } from "lexical";
7912
7997
  import { nanoid as nanoid6 } from "nanoid";
7913
- import { jsx as jsx68 } from "react/jsx-runtime";
7998
+ import { jsx as jsx69 } from "react/jsx-runtime";
7914
7999
  var TYPE_NAME8 = "journal-entry-question";
7915
8000
  var JournalTypeLabelMap = {
7916
8001
  default: "Default",
@@ -8107,7 +8192,7 @@ var JournalEntryQuestionNode = class _JournalEntryQuestionNode extends Decorator
8107
8192
  }
8108
8193
  }
8109
8194
  decorate() {
8110
- return /* @__PURE__ */ jsx68(
8195
+ return /* @__PURE__ */ jsx69(
8111
8196
  JournalEntryQuestionComponent,
8112
8197
  {
8113
8198
  nodeKey: this.__key,
@@ -8134,20 +8219,20 @@ function $isJournalEntryQuestionNode(node) {
8134
8219
  }
8135
8220
 
8136
8221
  // src/plugins/TextToolbarPlugin/TextToolbarAgentPlugin.tsx
8137
- import { useLexicalComposerContext as useLexicalComposerContext34 } from "@lexical/react/LexicalComposerContext";
8222
+ import { useLexicalComposerContext as useLexicalComposerContext35 } from "@lexical/react/LexicalComposerContext";
8138
8223
  import { mergeRegister as mergeRegister9 } from "@lexical/utils";
8139
8224
  import {
8140
8225
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR5,
8141
8226
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3,
8142
8227
  createCommand as createCommand8
8143
8228
  } from "lexical";
8144
- import { useEffect as useEffect41 } from "react";
8145
- import { Fragment as Fragment24, jsx as jsx69 } from "react/jsx-runtime";
8229
+ import { useEffect as useEffect42 } from "react";
8230
+ import { Fragment as Fragment25, jsx as jsx70 } from "react/jsx-runtime";
8146
8231
  var TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND = createCommand8("TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND");
8147
8232
  function TextToolbarAgentPlugin(props) {
8148
8233
  const { decoratorNode } = props;
8149
- const [editor] = useLexicalComposerContext34();
8150
- useEffect41(() => {
8234
+ const [editor] = useLexicalComposerContext35();
8235
+ useEffect42(() => {
8151
8236
  return mergeRegister9(
8152
8237
  editor.registerCommand(
8153
8238
  SELECTION_CHANGE_COMMAND3,
@@ -8172,20 +8257,20 @@ function TextToolbarAgentPlugin(props) {
8172
8257
  })
8173
8258
  );
8174
8259
  }, [editor]);
8175
- return /* @__PURE__ */ jsx69(Fragment24, {});
8260
+ return /* @__PURE__ */ jsx70(Fragment25, {});
8176
8261
  }
8177
8262
 
8178
8263
  // src/plugins/TypeaheadMenuPlugin/TypeaheadMenuAgentPlugin.tsx
8179
- import { useLexicalComposerContext as useLexicalComposerContext35 } from "@lexical/react/LexicalComposerContext";
8264
+ import { useLexicalComposerContext as useLexicalComposerContext36 } from "@lexical/react/LexicalComposerContext";
8180
8265
  import { mergeRegister as mergeRegister10 } from "@lexical/utils";
8181
8266
  import { createCommand as createCommand9 } from "lexical";
8182
- import { useEffect as useEffect42 } from "react";
8183
- import { Fragment as Fragment25, jsx as jsx70 } from "react/jsx-runtime";
8267
+ import { useEffect as useEffect43 } from "react";
8268
+ import { Fragment as Fragment26, jsx as jsx71 } from "react/jsx-runtime";
8184
8269
  var TYPEAHEAD_MENU_COMMAND = createCommand9("TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND");
8185
8270
  function TypeaheadMenuAgentPlugin(props) {
8186
8271
  const { decoratorNode } = props;
8187
- const [editor] = useLexicalComposerContext35();
8188
- useEffect42(() => {
8272
+ const [editor] = useLexicalComposerContext36();
8273
+ useEffect43(() => {
8189
8274
  return mergeRegister10(
8190
8275
  editor.registerUpdateListener(({ tags }) => {
8191
8276
  if (!tags.has("history-merge")) {
@@ -8196,11 +8281,11 @@ function TypeaheadMenuAgentPlugin(props) {
8196
8281
  })
8197
8282
  );
8198
8283
  }, [editor, decoratorNode]);
8199
- return /* @__PURE__ */ jsx70(Fragment25, {});
8284
+ return /* @__PURE__ */ jsx71(Fragment26, {});
8200
8285
  }
8201
8286
 
8202
8287
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionComponent.tsx
8203
- import { useLexicalComposerContext as useLexicalComposerContext37 } from "@lexical/react/LexicalComposerContext";
8288
+ import { useLexicalComposerContext as useLexicalComposerContext38 } from "@lexical/react/LexicalComposerContext";
8204
8289
  import { LexicalErrorBoundary as LexicalErrorBoundary7 } from "@lexical/react/LexicalErrorBoundary";
8205
8290
  import { HistoryPlugin as HistoryPlugin7 } from "@lexical/react/LexicalHistoryPlugin";
8206
8291
  import { ListPlugin } from "@lexical/react/LexicalListPlugin";
@@ -8215,7 +8300,7 @@ import {
8215
8300
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW8,
8216
8301
  createCommand as createCommand10
8217
8302
  } from "lexical";
8218
- import { useEffect as useEffect44, useRef as useRef28 } from "react";
8303
+ import { useEffect as useEffect45, useRef as useRef28 } from "react";
8219
8304
 
8220
8305
  // src/utils/extractSelectionNode.ts
8221
8306
  import { $getSelection as $getSelection2, $isRangeSelection } from "lexical";
@@ -8255,7 +8340,7 @@ function $extractSelectionNode() {
8255
8340
  }
8256
8341
 
8257
8342
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankSpaceComponentPlugin.tsx
8258
- import { useLexicalComposerContext as useLexicalComposerContext36 } from "@lexical/react/LexicalComposerContext";
8343
+ import { useLexicalComposerContext as useLexicalComposerContext37 } from "@lexical/react/LexicalComposerContext";
8259
8344
  import { mergeRegister as mergeRegister11 } from "@lexical/utils";
8260
8345
  import {
8261
8346
  $createNodeSelection as $createNodeSelection8,
@@ -8271,16 +8356,16 @@ import {
8271
8356
  KEY_ARROW_UP_COMMAND,
8272
8357
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND4
8273
8358
  } from "lexical";
8274
- import { useEffect as useEffect43, useRef as useRef27 } from "react";
8275
- import { Fragment as Fragment26, jsx as jsx71 } from "react/jsx-runtime";
8359
+ import { useEffect as useEffect44, useRef as useRef27 } from "react";
8360
+ import { Fragment as Fragment27, jsx as jsx72 } from "react/jsx-runtime";
8276
8361
  function FillInTheBlankSpaceComponentPlugin() {
8277
8362
  const { nestedEditorId } = useNestedEditor();
8278
- const [editor] = useLexicalComposerContext36();
8363
+ const [editor] = useLexicalComposerContext37();
8279
8364
  const lastSelectedNodeRef = useRef27(
8280
8365
  void 0
8281
8366
  );
8282
8367
  const selectedSpaceNodeKeyRef = useRef27(void 0);
8283
- useEffect43(() => {
8368
+ useEffect44(() => {
8284
8369
  return mergeRegister11(
8285
8370
  editor.registerCommand(
8286
8371
  CREATE_SPACE_FROM_SELECTION_COMMAND,
@@ -8353,18 +8438,18 @@ function FillInTheBlankSpaceComponentPlugin() {
8353
8438
  )
8354
8439
  );
8355
8440
  }, [editor, nestedEditorId]);
8356
- return /* @__PURE__ */ jsx71(Fragment26, {});
8441
+ return /* @__PURE__ */ jsx72(Fragment27, {});
8357
8442
  }
8358
8443
 
8359
8444
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionComponent.tsx
8360
- import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
8445
+ import { jsx as jsx73, jsxs as jsxs27 } from "react/jsx-runtime";
8361
8446
  var CREATE_SPACE_FROM_SELECTION_COMMAND = createCommand10("CREATE_SPACE_FROM_SELECTION_COMMAND");
8362
8447
  function FillInTheBlankQuestionComponent(props) {
8363
8448
  const { nodeKey, id, content } = props;
8364
8449
  const { historyState } = useSharedHistoryContext();
8365
- const [editor] = useLexicalComposerContext37();
8450
+ const [editor] = useLexicalComposerContext38();
8366
8451
  const rootElementRef = useRef28(null);
8367
- useEffect44(() => {
8452
+ useEffect45(() => {
8368
8453
  return editor.registerCommand(
8369
8454
  CLICK_COMMAND9,
8370
8455
  (event, _activeEditor) => {
@@ -8396,7 +8481,7 @@ function FillInTheBlankQuestionComponent(props) {
8396
8481
  id,
8397
8482
  className: "fill-in-the-blank-question-prompt",
8398
8483
  children: [
8399
- /* @__PURE__ */ jsx72(
8484
+ /* @__PURE__ */ jsx73(
8400
8485
  "div",
8401
8486
  {
8402
8487
  className: "fill-in-the-blank-question-prompt-title",
@@ -8410,45 +8495,45 @@ function FillInTheBlankQuestionComponent(props) {
8410
8495
  className: "fill-in-the-blank-question-prompt-content",
8411
8496
  "data-selectable": "true",
8412
8497
  children: [
8413
- /* @__PURE__ */ jsx72("div", { className: "title", "data-selectable": "true", children: "Statement" }),
8414
- /* @__PURE__ */ jsx72(LexicalNestedComposer7, { initialEditor: content, children: /* @__PURE__ */ jsxs27(NestedEditor, { nodeKey, children: [
8415
- /* @__PURE__ */ jsx72(SettingsPanelNestedAgentPlugin, {}),
8416
- /* @__PURE__ */ jsx72(FillInTheBlankSpaceComponentPlugin, {}),
8417
- /* @__PURE__ */ jsx72(FillInTheBlankSpaceSettingsPlugin, {}),
8418
- /* @__PURE__ */ jsx72(
8498
+ /* @__PURE__ */ jsx73("div", { className: "title", "data-selectable": "true", children: "Statement" }),
8499
+ /* @__PURE__ */ jsx73(LexicalNestedComposer7, { initialEditor: content, children: /* @__PURE__ */ jsxs27(NestedEditor, { nodeKey, children: [
8500
+ /* @__PURE__ */ jsx73(SettingsPanelNestedAgentPlugin, {}),
8501
+ /* @__PURE__ */ jsx73(FillInTheBlankSpaceComponentPlugin, {}),
8502
+ /* @__PURE__ */ jsx73(FillInTheBlankSpaceSettingsPlugin, {}),
8503
+ /* @__PURE__ */ jsx73(
8419
8504
  RichTextPlugin6,
8420
8505
  {
8421
- contentEditable: /* @__PURE__ */ jsx72(NestedContentEditable, {}),
8506
+ contentEditable: /* @__PURE__ */ jsx73(NestedContentEditable, {}),
8422
8507
  ErrorBoundary: LexicalErrorBoundary7,
8423
8508
  placeholder: null
8424
8509
  },
8425
8510
  nodeKey
8426
8511
  ),
8427
- /* @__PURE__ */ jsx72(HistoryPlugin7, { externalHistoryState: historyState }),
8428
- /* @__PURE__ */ jsx72(
8512
+ /* @__PURE__ */ jsx73(HistoryPlugin7, { externalHistoryState: historyState }),
8513
+ /* @__PURE__ */ jsx73(
8429
8514
  TextToolbarAgentPlugin,
8430
8515
  {
8431
8516
  decoratorNode: FillInTheBlankQuestionNode
8432
8517
  }
8433
8518
  ),
8434
- /* @__PURE__ */ jsx72(
8519
+ /* @__PURE__ */ jsx73(
8435
8520
  TypeaheadVariableAgentPlugin,
8436
8521
  {
8437
8522
  decoratorNode: FillInTheBlankQuestionNode
8438
8523
  }
8439
8524
  ),
8440
- /* @__PURE__ */ jsx72(VariableComponentPlugin, {}),
8441
- /* @__PURE__ */ jsx72(VariableToolbarAgentPlugin, {}),
8442
- /* @__PURE__ */ jsx72(
8525
+ /* @__PURE__ */ jsx73(VariableComponentPlugin, {}),
8526
+ /* @__PURE__ */ jsx73(VariableToolbarAgentPlugin, {}),
8527
+ /* @__PURE__ */ jsx73(
8443
8528
  TypeaheadMenuAgentPlugin,
8444
8529
  {
8445
8530
  decoratorNode: FillInTheBlankQuestionNode
8446
8531
  }
8447
8532
  ),
8448
- /* @__PURE__ */ jsx72(ListPlugin, {}),
8449
- /* @__PURE__ */ jsx72(ListLevelLimitPlugin, {}),
8450
- /* @__PURE__ */ jsx72(Table, {}),
8451
- /* @__PURE__ */ jsx72(TabIndentationPlugin, {})
8533
+ /* @__PURE__ */ jsx73(ListPlugin, {}),
8534
+ /* @__PURE__ */ jsx73(ListLevelLimitPlugin, {}),
8535
+ /* @__PURE__ */ jsx73(Table, {}),
8536
+ /* @__PURE__ */ jsx73(TabIndentationPlugin, {})
8452
8537
  ] }) })
8453
8538
  ]
8454
8539
  }
@@ -8459,7 +8544,7 @@ function FillInTheBlankQuestionComponent(props) {
8459
8544
  }
8460
8545
 
8461
8546
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionNode.tsx
8462
- import { jsx as jsx73 } from "react/jsx-runtime";
8547
+ import { jsx as jsx74 } from "react/jsx-runtime";
8463
8548
  var TYPE_NAME9 = "fill-in-the-blank-question";
8464
8549
  function initNewContentEditor5() {
8465
8550
  return createEditor7();
@@ -8540,7 +8625,7 @@ var FillInTheBlankQuestionNode = class _FillInTheBlankQuestionNode extends Decor
8540
8625
  writable.__pointsPerSpace = points <= 0 ? 1 : points;
8541
8626
  }
8542
8627
  decorate() {
8543
- return /* @__PURE__ */ jsx73(
8628
+ return /* @__PURE__ */ jsx74(
8544
8629
  FillInTheBlankQuestionComponent,
8545
8630
  {
8546
8631
  nodeKey: this.__key,
@@ -8560,17 +8645,17 @@ function $isFillInTheBlankQuestionNode(node) {
8560
8645
  }
8561
8646
 
8562
8647
  // src/plugins/SettingsPanel/SmartTableSettings.tsx
8563
- import { useLexicalComposerContext as useLexicalComposerContext38 } from "@lexical/react/LexicalComposerContext";
8648
+ import { useLexicalComposerContext as useLexicalComposerContext39 } from "@lexical/react/LexicalComposerContext";
8564
8649
  import { $isTableNode as $isTableNode8 } from "@lexical/table";
8565
8650
  import { $getNodeByKey as $getNodeByKey29 } from "lexical";
8566
- import { useEffect as useEffect45, useRef as useRef29 } from "react";
8567
- import { Fragment as Fragment27, jsx as jsx74, jsxs as jsxs28 } from "react/jsx-runtime";
8651
+ import { useEffect as useEffect46, useRef as useRef29 } from "react";
8652
+ import { Fragment as Fragment28, jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
8568
8653
  function SmartTableSettings(props) {
8569
8654
  const { nodeKey } = props;
8570
8655
  const isHeaderRowInputRef = useRef29(null);
8571
8656
  const isRowStripingInputRef = useRef29(null);
8572
- const [editor] = useLexicalComposerContext38();
8573
- useEffect45(() => {
8657
+ const [editor] = useLexicalComposerContext39();
8658
+ useEffect46(() => {
8574
8659
  if (nodeKey) {
8575
8660
  editor.getEditorState().read(() => {
8576
8661
  const targetNode = $getNodeByKey29(nodeKey);
@@ -8585,8 +8670,8 @@ function SmartTableSettings(props) {
8585
8670
  });
8586
8671
  }
8587
8672
  }, [editor, nodeKey]);
8588
- return /* @__PURE__ */ jsxs28(Fragment27, { children: [
8589
- /* @__PURE__ */ jsx74("div", { children: /* @__PURE__ */ jsx74(
8673
+ return /* @__PURE__ */ jsxs28(Fragment28, { children: [
8674
+ /* @__PURE__ */ jsx75("div", { children: /* @__PURE__ */ jsx75(
8590
8675
  Checkbox,
8591
8676
  {
8592
8677
  ref: isHeaderRowInputRef,
@@ -8615,7 +8700,7 @@ function SmartTableSettings(props) {
8615
8700
  }
8616
8701
  }
8617
8702
  ) }),
8618
- /* @__PURE__ */ jsx74("div", { children: /* @__PURE__ */ jsx74(
8703
+ /* @__PURE__ */ jsx75("div", { children: /* @__PURE__ */ jsx75(
8619
8704
  Checkbox,
8620
8705
  {
8621
8706
  ref: isRowStripingInputRef,
@@ -8636,7 +8721,7 @@ function SmartTableSettings(props) {
8636
8721
  }
8637
8722
 
8638
8723
  // src/plugins/SettingsPanel/SettingsPanelPlugin.tsx
8639
- import { useLexicalComposerContext as useLexicalComposerContext39 } from "@lexical/react/LexicalComposerContext";
8724
+ import { useLexicalComposerContext as useLexicalComposerContext40 } from "@lexical/react/LexicalComposerContext";
8640
8725
  import { $isTableNode as $isTableNode9, TableNode as TableNode3 } from "@lexical/table";
8641
8726
  import { mergeRegister as mergeRegister12 } from "@lexical/utils";
8642
8727
  import {
@@ -8649,13 +8734,13 @@ import {
8649
8734
  RootNode,
8650
8735
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND5
8651
8736
  } from "lexical";
8652
- import debounce3 from "lodash-es/debounce";
8653
- import { useEffect as useEffect46, useRef as useRef30, useState as useState5 } from "react";
8654
- import { Fragment as Fragment28, jsx as jsx75, jsxs as jsxs29 } from "react/jsx-runtime";
8737
+ import debounce4 from "lodash-es/debounce";
8738
+ import { useEffect as useEffect47, useRef as useRef30, useState as useState6 } from "react";
8739
+ import { Fragment as Fragment29, jsx as jsx76, jsxs as jsxs29 } from "react/jsx-runtime";
8655
8740
  var REQUEST_DECORATOR_NODE_COMMAND = createCommand11("REQUEST_DECORATOR_NODE_COMMAND");
8656
8741
  var RESPONSE_DECORATOR_NODE_COMMAND = createCommand11("RESPONSE_DECORATOR_NODE_COMMAND");
8657
8742
  function SettingsPanelPlugin() {
8658
- const [editor] = useLexicalComposerContext39();
8743
+ const [editor] = useLexicalComposerContext40();
8659
8744
  const {
8660
8745
  settingsPanelSwitch,
8661
8746
  toggleSettingsPanelSwitch,
@@ -8665,12 +8750,12 @@ function SettingsPanelPlugin() {
8665
8750
  renderSettings,
8666
8751
  autoOpenSettingsPanel
8667
8752
  } = useBlockEditor();
8668
- const [_articleIsReady, setArticleReady] = useState5(false);
8753
+ const [_articleIsReady, setArticleReady] = useState6(false);
8669
8754
  const articleElementRef = useRef30();
8670
8755
  const currentStickyRef = useRef30(null);
8671
8756
  const tableStickyRef = useRef30(null);
8672
8757
  const emptyStickyRef = useRef30(null);
8673
- const [selectedNode, setSelectedNode] = useState5();
8758
+ const [selectedNode, setSelectedNode] = useState6();
8674
8759
  const currentFocusedNode = useRef30();
8675
8760
  const currentFocusedElement = useRef30(null);
8676
8761
  const currentNestedEditorId = useRef30();
@@ -8684,7 +8769,7 @@ function SettingsPanelPlugin() {
8684
8769
  }
8685
8770
  }
8686
8771
  }
8687
- const setSelection = debounce3(() => {
8772
+ const setSelection = debounce4(() => {
8688
8773
  clearSelection();
8689
8774
  if (currentFocusedElement.current) {
8690
8775
  currentFocusedElement.current.setAttribute(
@@ -8699,7 +8784,7 @@ function SettingsPanelPlugin() {
8699
8784
  setSelectedNode(void 0);
8700
8785
  }
8701
8786
  }, 300);
8702
- useEffect46(() => {
8787
+ useEffect47(() => {
8703
8788
  return mergeRegister12(
8704
8789
  editor.registerCommand(
8705
8790
  RESPONSE_DECORATOR_NODE_COMMAND,
@@ -8771,7 +8856,7 @@ function SettingsPanelPlugin() {
8771
8856
  })
8772
8857
  );
8773
8858
  }, [editor]);
8774
- useEffect46(() => {
8859
+ useEffect47(() => {
8775
8860
  if (settingsPanelSwitch === "on") {
8776
8861
  currentStickyRef.current?.hide();
8777
8862
  currentStickyRef.current = null;
@@ -8803,16 +8888,16 @@ function SettingsPanelPlugin() {
8803
8888
  currentStickyRef.current?.hide();
8804
8889
  }
8805
8890
  }, [settingsPanelSwitch, selectedNode]);
8806
- return /* @__PURE__ */ jsx75(Fragment28, { children: settingsPanelSwitch === "on" && drawer && /* @__PURE__ */ jsxs29(Fragment28, { children: [
8807
- /* @__PURE__ */ jsx75(StickyToPosition, { ref: tableStickyRef, container: drawer, children: (data, position, isVisible) => {
8808
- return /* @__PURE__ */ jsx75("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx75(
8891
+ return /* @__PURE__ */ jsx76(Fragment29, { children: settingsPanelSwitch === "on" && drawer && /* @__PURE__ */ jsxs29(Fragment29, { children: [
8892
+ /* @__PURE__ */ jsx76(StickyToPosition, { ref: tableStickyRef, container: drawer, children: (data, position, isVisible) => {
8893
+ return /* @__PURE__ */ jsx76("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx76(
8809
8894
  SettingsCard,
8810
8895
  {
8811
8896
  isVisible: !!isVisible,
8812
8897
  container: drawer,
8813
8898
  title: "Table Settings",
8814
8899
  onClose: toggleSettingsPanelSwitch,
8815
- children: /* @__PURE__ */ jsx75(
8900
+ children: /* @__PURE__ */ jsx76(
8816
8901
  SmartTableSettings,
8817
8902
  {
8818
8903
  nodeKey: data.nodeKey
@@ -8822,8 +8907,8 @@ function SettingsPanelPlugin() {
8822
8907
  }
8823
8908
  ) });
8824
8909
  } }),
8825
- /* @__PURE__ */ jsx75(StickyToPosition, { ref: emptyStickyRef, container: drawer, children: (_data, position, isVisible) => {
8826
- return /* @__PURE__ */ jsx75("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx75(
8910
+ /* @__PURE__ */ jsx76(StickyToPosition, { ref: emptyStickyRef, container: drawer, children: (_data, position, isVisible) => {
8911
+ return /* @__PURE__ */ jsx76("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx76(
8827
8912
  SettingsExtraCard,
8828
8913
  {
8829
8914
  isVisible: !!isVisible,
@@ -8838,18 +8923,18 @@ function SettingsPanelPlugin() {
8838
8923
  }
8839
8924
 
8840
8925
  // src/plugins/SettingsPanel/SettingsPanelNestedAgentPlugin.tsx
8841
- import { useLexicalComposerContext as useLexicalComposerContext40 } from "@lexical/react/LexicalComposerContext";
8926
+ import { useLexicalComposerContext as useLexicalComposerContext41 } from "@lexical/react/LexicalComposerContext";
8842
8927
  import {
8843
8928
  $getSelection as $getSelection5,
8844
8929
  $isNodeSelection as $isNodeSelection3,
8845
8930
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR8
8846
8931
  } from "lexical";
8847
- import { useEffect as useEffect47 } from "react";
8848
- import { Fragment as Fragment29, jsx as jsx76 } from "react/jsx-runtime";
8932
+ import { useEffect as useEffect48 } from "react";
8933
+ import { Fragment as Fragment30, jsx as jsx77 } from "react/jsx-runtime";
8849
8934
  function SettingsPanelNestedAgentPlugin() {
8850
8935
  const { nestedEditorId, decoratorNodeKey } = useNestedEditor();
8851
- const [editor] = useLexicalComposerContext40();
8852
- useEffect47(() => {
8936
+ const [editor] = useLexicalComposerContext41();
8937
+ useEffect48(() => {
8853
8938
  return editor.registerCommand(
8854
8939
  REQUEST_DECORATOR_NODE_COMMAND,
8855
8940
  () => {
@@ -8878,7 +8963,7 @@ function SettingsPanelNestedAgentPlugin() {
8878
8963
  COMMAND_PRIORITY_EDITOR8
8879
8964
  );
8880
8965
  }, [editor, nestedEditorId, decoratorNodeKey]);
8881
- return /* @__PURE__ */ jsx76(Fragment29, {});
8966
+ return /* @__PURE__ */ jsx77(Fragment30, {});
8882
8967
  }
8883
8968
 
8884
8969
  // src/utils/getLineBreakNodeBeforeCaretOnLastLine.ts
@@ -8939,7 +9024,7 @@ import { PlainTextPlugin as PlainTextPlugin2 } from "@lexical/react/LexicalPlain
8939
9024
  import { useLexicalNodeSelection as useLexicalNodeSelection3 } from "@lexical/react/useLexicalNodeSelection";
8940
9025
  import { mergeRegister as mergeRegister13 } from "@lexical/utils";
8941
9026
  import {
8942
- $getRoot as $getRoot8,
9027
+ $getRoot as $getRoot9,
8943
9028
  $getSelection as $getSelection6,
8944
9029
  $isParagraphNode,
8945
9030
  $isRangeSelection as $isRangeSelection4,
@@ -8947,13 +9032,13 @@ import {
8947
9032
  KEY_BACKSPACE_COMMAND as KEY_BACKSPACE_COMMAND3,
8948
9033
  KEY_ENTER_COMMAND
8949
9034
  } from "lexical";
8950
- import { useEffect as useEffect48 } from "react";
8951
- import { jsx as jsx77, jsxs as jsxs30 } from "react/jsx-runtime";
9035
+ import { useEffect as useEffect49 } from "react";
9036
+ import { jsx as jsx78, jsxs as jsxs30 } from "react/jsx-runtime";
8952
9037
  function CalloutBoxComponent(props) {
8953
9038
  const { nodeKey, content, calloutType } = props;
8954
9039
  const { historyState } = useSharedHistoryContext();
8955
9040
  const [isSelected] = useLexicalNodeSelection3(nodeKey);
8956
- useEffect48(() => {
9041
+ useEffect49(() => {
8957
9042
  if (content) {
8958
9043
  return mergeRegister13(
8959
9044
  content.registerCommand(
@@ -8964,7 +9049,7 @@ function CalloutBoxComponent(props) {
8964
9049
  () => {
8965
9050
  const currentSelection = $getSelection6();
8966
9051
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
8967
- const firstChild = $getRoot8().getFirstChild();
9052
+ const firstChild = $getRoot9().getFirstChild();
8968
9053
  if (firstChild?.getTextContentSize() === 0) {
8969
9054
  event.stopPropagation();
8970
9055
  event.preventDefault();
@@ -8998,7 +9083,7 @@ function CalloutBoxComponent(props) {
8998
9083
  (event) => {
8999
9084
  const currentSelection = $getSelection6();
9000
9085
  if ($isRangeSelection4(currentSelection) && currentSelection.isCollapsed()) {
9001
- const firstChild = $getRoot8().getFirstChild();
9086
+ const firstChild = $getRoot9().getFirstChild();
9002
9087
  if ($isParagraphNode(firstChild)) {
9003
9088
  const breakNodes = getLineBreakNodeBeforeCaretOnLastLine(
9004
9089
  firstChild,
@@ -9043,29 +9128,29 @@ function CalloutBoxComponent(props) {
9043
9128
  outline: isSelected ? "1px dashed var(--sl-color-primary-500)" : void 0
9044
9129
  },
9045
9130
  children: [
9046
- /* @__PURE__ */ jsx77("div", { className: "callout-box-icon", children: /* @__PURE__ */ jsx77(
9131
+ /* @__PURE__ */ jsx78("div", { className: "callout-box-icon", children: /* @__PURE__ */ jsx78(
9047
9132
  Icon,
9048
9133
  {
9049
9134
  style: { color: `var(${CALLOUT_COLORS[calloutType]}-400)` },
9050
9135
  icon: CALLOUT_ICONS[calloutType]
9051
9136
  }
9052
9137
  ) }),
9053
- /* @__PURE__ */ jsx77(
9138
+ /* @__PURE__ */ jsx78(
9054
9139
  "div",
9055
9140
  {
9056
9141
  className: "callout-box-content",
9057
9142
  style: { color: `var(${CALLOUT_COLORS[calloutType]}-600)` },
9058
- children: /* @__PURE__ */ jsx77(LexicalNestedComposer8, { initialEditor: content, children: /* @__PURE__ */ jsxs30(NestedEditor, { nodeKey, children: [
9059
- /* @__PURE__ */ jsx77(SettingsPanelNestedAgentPlugin, {}),
9060
- /* @__PURE__ */ jsx77(
9143
+ children: /* @__PURE__ */ jsx78(LexicalNestedComposer8, { initialEditor: content, children: /* @__PURE__ */ jsxs30(NestedEditor, { nodeKey, children: [
9144
+ /* @__PURE__ */ jsx78(SettingsPanelNestedAgentPlugin, {}),
9145
+ /* @__PURE__ */ jsx78(
9061
9146
  PlainTextPlugin2,
9062
9147
  {
9063
- contentEditable: /* @__PURE__ */ jsx77(NestedContentEditable, {}),
9148
+ contentEditable: /* @__PURE__ */ jsx78(NestedContentEditable, {}),
9064
9149
  ErrorBoundary: LexicalErrorBoundary8
9065
9150
  }
9066
9151
  ),
9067
- /* @__PURE__ */ jsx77(HistoryPlugin8, { externalHistoryState: historyState }),
9068
- /* @__PURE__ */ jsx77(TextToolbarAgentPlugin, { decoratorNode: CalloutBoxNode })
9152
+ /* @__PURE__ */ jsx78(HistoryPlugin8, { externalHistoryState: historyState }),
9153
+ /* @__PURE__ */ jsx78(TextToolbarAgentPlugin, { decoratorNode: CalloutBoxNode })
9069
9154
  ] }) })
9070
9155
  }
9071
9156
  )
@@ -9075,7 +9160,7 @@ function CalloutBoxComponent(props) {
9075
9160
  }
9076
9161
 
9077
9162
  // src/plugins/CalloutBoxPlugin/CalloutBoxNode.tsx
9078
- import { jsx as jsx78 } from "react/jsx-runtime";
9163
+ import { jsx as jsx79 } from "react/jsx-runtime";
9079
9164
  var CALLOUT_ICONS = {
9080
9165
  info: Info,
9081
9166
  tip: Lightbulb
@@ -9169,7 +9254,7 @@ var CalloutBoxNode = class _CalloutBoxNode extends DecoratorNode11 {
9169
9254
  writable.__calloutType = value;
9170
9255
  }
9171
9256
  decorate() {
9172
- return /* @__PURE__ */ jsx78(
9257
+ return /* @__PURE__ */ jsx79(
9173
9258
  CalloutBoxComponent,
9174
9259
  {
9175
9260
  nodeKey: this.getKey(),
@@ -9197,7 +9282,7 @@ import {
9197
9282
  import { nanoid as nanoid8 } from "nanoid";
9198
9283
 
9199
9284
  // src/plugins/EssayQuestionPlugin/EssayQuestionComponent.tsx
9200
- import { useLexicalComposerContext as useLexicalComposerContext41 } from "@lexical/react/LexicalComposerContext";
9285
+ import { useLexicalComposerContext as useLexicalComposerContext42 } from "@lexical/react/LexicalComposerContext";
9201
9286
  import {
9202
9287
  $createNodeSelection as $createNodeSelection10,
9203
9288
  $getNodeByKey as $getNodeByKey31,
@@ -9205,13 +9290,13 @@ import {
9205
9290
  CLICK_COMMAND as CLICK_COMMAND10,
9206
9291
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW10
9207
9292
  } from "lexical";
9208
- import { useEffect as useEffect49, useRef as useRef31 } from "react";
9209
- import { jsx as jsx79, jsxs as jsxs31 } from "react/jsx-runtime";
9293
+ import { useEffect as useEffect50, useRef as useRef31 } from "react";
9294
+ import { jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
9210
9295
  function EssayQuestionComponent(props) {
9211
9296
  const { nodeKey, id, aiSystemMessage } = props;
9212
- const [editor] = useLexicalComposerContext41();
9297
+ const [editor] = useLexicalComposerContext42();
9213
9298
  const rootElementRef = useRef31(null);
9214
- useEffect49(() => {
9299
+ useEffect50(() => {
9215
9300
  return editor.registerCommand(
9216
9301
  CLICK_COMMAND10,
9217
9302
  (event, _activeEditor) => {
@@ -9239,7 +9324,7 @@ function EssayQuestionComponent(props) {
9239
9324
  id,
9240
9325
  className: "essay-question-prompt",
9241
9326
  children: [
9242
- /* @__PURE__ */ jsx79(
9327
+ /* @__PURE__ */ jsx80(
9243
9328
  "div",
9244
9329
  {
9245
9330
  className: "essay-question-prompt-title",
@@ -9247,12 +9332,12 @@ function EssayQuestionComponent(props) {
9247
9332
  children: "Essay"
9248
9333
  }
9249
9334
  ),
9250
- /* @__PURE__ */ jsx79(
9335
+ /* @__PURE__ */ jsx80(
9251
9336
  "div",
9252
9337
  {
9253
9338
  className: "essay-question-prompt-content",
9254
9339
  "data-selectable": "true",
9255
- children: /* @__PURE__ */ jsx79("div", { className: "title", "data-selectable": "true", children: aiSystemMessage })
9340
+ children: /* @__PURE__ */ jsx80("div", { className: "title", "data-selectable": "true", children: aiSystemMessage })
9256
9341
  }
9257
9342
  )
9258
9343
  ]
@@ -9261,7 +9346,7 @@ function EssayQuestionComponent(props) {
9261
9346
  }
9262
9347
 
9263
9348
  // src/plugins/EssayQuestionPlugin/EssayQuestionNode.tsx
9264
- import { jsx as jsx80 } from "react/jsx-runtime";
9349
+ import { jsx as jsx81 } from "react/jsx-runtime";
9265
9350
  var TYPE_NAME11 = "essay-question";
9266
9351
  var EssayQuestionNode = class _EssayQuestionNode extends DecoratorNode12 {
9267
9352
  constructor(points, maxWords, hideChat, aiSystemMessage, aiChatModel, id, key) {
@@ -9348,7 +9433,7 @@ var EssayQuestionNode = class _EssayQuestionNode extends DecoratorNode12 {
9348
9433
  writable.__maxWords = maxWords;
9349
9434
  }
9350
9435
  decorate() {
9351
- return /* @__PURE__ */ jsx80(
9436
+ return /* @__PURE__ */ jsx81(
9352
9437
  EssayQuestionComponent,
9353
9438
  {
9354
9439
  nodeKey: this.__key,
@@ -9375,7 +9460,7 @@ function $isEssayQuestionNode(node) {
9375
9460
  }
9376
9461
 
9377
9462
  // src/plugins/HorizontalRulePlugin/HorizontalRuleNode.tsx
9378
- import { useLexicalComposerContext as useLexicalComposerContext42 } from "@lexical/react/LexicalComposerContext";
9463
+ import { useLexicalComposerContext as useLexicalComposerContext43 } from "@lexical/react/LexicalComposerContext";
9379
9464
  import { useLexicalNodeSelection as useLexicalNodeSelection4 } from "@lexical/react/useLexicalNodeSelection";
9380
9465
  import {
9381
9466
  addClassNamesToElement,
@@ -9393,13 +9478,13 @@ import {
9393
9478
  KEY_BACKSPACE_COMMAND as KEY_BACKSPACE_COMMAND4,
9394
9479
  KEY_DELETE_COMMAND as KEY_DELETE_COMMAND3
9395
9480
  } from "lexical";
9396
- import { useCallback as useCallback9, useEffect as useEffect50 } from "react";
9397
- import { jsx as jsx81 } from "react/jsx-runtime";
9481
+ import { useCallback as useCallback10, useEffect as useEffect51 } from "react";
9482
+ import { jsx as jsx82 } from "react/jsx-runtime";
9398
9483
  var INSERT_HORIZONTAL_RULE_COMMAND = createCommand12("INSERT_HORIZONTAL_RULE_COMMAND");
9399
9484
  function HorizontalRuleComponent({ nodeKey }) {
9400
- const [editor] = useLexicalComposerContext42();
9485
+ const [editor] = useLexicalComposerContext43();
9401
9486
  const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection4(nodeKey);
9402
- const $onDelete = useCallback9(
9487
+ const $onDelete = useCallback10(
9403
9488
  (event) => {
9404
9489
  const deleteSelection = $getSelection7();
9405
9490
  if (isSelected && $isNodeSelection4(deleteSelection)) {
@@ -9414,7 +9499,7 @@ function HorizontalRuleComponent({ nodeKey }) {
9414
9499
  },
9415
9500
  [isSelected]
9416
9501
  );
9417
- useEffect50(() => {
9502
+ useEffect51(() => {
9418
9503
  return mergeRegister14(
9419
9504
  editor.registerCommand(
9420
9505
  CLICK_COMMAND11,
@@ -9449,7 +9534,7 @@ function HorizontalRuleComponent({ nodeKey }) {
9449
9534
  $onDelete,
9450
9535
  setSelected
9451
9536
  ]);
9452
- useEffect50(() => {
9537
+ useEffect51(() => {
9453
9538
  const hrElem = editor.getElementByKey(nodeKey);
9454
9539
  const isSelectedClassName = editor._config.theme.hrSelected ?? "selected";
9455
9540
  if (hrElem !== null) {
@@ -9506,7 +9591,7 @@ var HorizontalRuleNode = class _HorizontalRuleNode extends DecoratorNode13 {
9506
9591
  return false;
9507
9592
  }
9508
9593
  decorate() {
9509
- return /* @__PURE__ */ jsx81(HorizontalRuleComponent, { nodeKey: this.__key });
9594
+ return /* @__PURE__ */ jsx82(HorizontalRuleComponent, { nodeKey: this.__key });
9510
9595
  }
9511
9596
  };
9512
9597
  function $convertHorizontalRuleElement() {
@@ -9527,7 +9612,7 @@ import {
9527
9612
  import { nanoid as nanoid9 } from "nanoid";
9528
9613
 
9529
9614
  // src/plugins/SimulationQuestionPlugin/SimulationQuestionComponent.tsx
9530
- import { useLexicalComposerContext as useLexicalComposerContext43 } from "@lexical/react/LexicalComposerContext";
9615
+ import { useLexicalComposerContext as useLexicalComposerContext44 } from "@lexical/react/LexicalComposerContext";
9531
9616
  import {
9532
9617
  $createNodeSelection as $createNodeSelection11,
9533
9618
  $getNodeByKey as $getNodeByKey32,
@@ -9535,13 +9620,13 @@ import {
9535
9620
  CLICK_COMMAND as CLICK_COMMAND12,
9536
9621
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW12
9537
9622
  } from "lexical";
9538
- import { useEffect as useEffect51, useRef as useRef32 } from "react";
9539
- import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
9623
+ import { useEffect as useEffect52, useRef as useRef32 } from "react";
9624
+ import { jsx as jsx83, jsxs as jsxs32 } from "react/jsx-runtime";
9540
9625
  function SimulationQuestionComponent(props) {
9541
9626
  const { nodeKey, id, aiSystemMessage, step2Instruction } = props;
9542
- const [editor] = useLexicalComposerContext43();
9627
+ const [editor] = useLexicalComposerContext44();
9543
9628
  const rootElementRef = useRef32(null);
9544
- useEffect51(() => {
9629
+ useEffect52(() => {
9545
9630
  return editor.registerCommand(
9546
9631
  CLICK_COMMAND12,
9547
9632
  (event, _activeEditor) => {
@@ -9569,7 +9654,7 @@ function SimulationQuestionComponent(props) {
9569
9654
  id,
9570
9655
  className: "simulation-question-prompt",
9571
9656
  children: [
9572
- /* @__PURE__ */ jsx82(
9657
+ /* @__PURE__ */ jsx83(
9573
9658
  "div",
9574
9659
  {
9575
9660
  className: "simulation-question-prompt-title",
@@ -9583,8 +9668,8 @@ function SimulationQuestionComponent(props) {
9583
9668
  className: "simulation-question-prompt-content",
9584
9669
  "data-selectable": "true",
9585
9670
  children: [
9586
- /* @__PURE__ */ jsx82("div", { className: "title", "data-selectable": "true", children: aiSystemMessage }),
9587
- /* @__PURE__ */ jsx82("div", { children: step2Instruction })
9671
+ /* @__PURE__ */ jsx83("div", { className: "title", "data-selectable": "true", children: aiSystemMessage }),
9672
+ /* @__PURE__ */ jsx83("div", { children: step2Instruction })
9588
9673
  ]
9589
9674
  }
9590
9675
  )
@@ -9594,7 +9679,7 @@ function SimulationQuestionComponent(props) {
9594
9679
  }
9595
9680
 
9596
9681
  // src/plugins/SimulationQuestionPlugin/SimulationQuestionNode.tsx
9597
- import { jsx as jsx83 } from "react/jsx-runtime";
9682
+ import { jsx as jsx84 } from "react/jsx-runtime";
9598
9683
  var TYPE_NAME12 = "simulation-question";
9599
9684
  var SimulationQuestionNode = class _SimulationQuestionNode extends DecoratorNode14 {
9600
9685
  constructor(points, aiSystemMessage, aiChatModel, step2Instructions, id, key) {
@@ -9673,7 +9758,7 @@ var SimulationQuestionNode = class _SimulationQuestionNode extends DecoratorNode
9673
9758
  writable.__points = points <= 0 ? 1 : points;
9674
9759
  }
9675
9760
  decorate() {
9676
- return /* @__PURE__ */ jsx83(
9761
+ return /* @__PURE__ */ jsx84(
9677
9762
  SimulationQuestionComponent,
9678
9763
  {
9679
9764
  nodeKey: this.__key,
@@ -9712,7 +9797,7 @@ var commonEditorNodes = [
9712
9797
  HeadingNode,
9713
9798
  HorizontalRuleNode,
9714
9799
  QuoteNode,
9715
- ImageNode,
9800
+ ImageNode2,
9716
9801
  ImagePlaceholderNode,
9717
9802
  LinkNode,
9718
9803
  ListItemNode2,
@@ -9774,8 +9859,8 @@ var initialEditorRegistry = {
9774
9859
 
9775
9860
  // src/content/drawer/Drawer.tsx
9776
9861
  import { Menu } from "lucide-react";
9777
- import { forwardRef as forwardRef10, useEffect as useEffect52, useState as useState6 } from "react";
9778
- import { jsx as jsx84 } from "react/jsx-runtime";
9862
+ import { forwardRef as forwardRef10, useEffect as useEffect53, useState as useState7 } from "react";
9863
+ import { jsx as jsx85 } from "react/jsx-runtime";
9779
9864
  var Drawer = forwardRef10(
9780
9865
  (props, ref) => {
9781
9866
  const {
@@ -9784,18 +9869,18 @@ var Drawer = forwardRef10(
9784
9869
  modulesNumber,
9785
9870
  hasModule
9786
9871
  } = useBlockEditor();
9787
- const [showSettingsButton, setShowSettingsButton] = useState6(false);
9788
- useEffect52(() => {
9872
+ const [showSettingsButton, setShowSettingsButton] = useState7(false);
9873
+ useEffect53(() => {
9789
9874
  if (hasModule("SettingsPanel")) {
9790
9875
  setShowSettingsButton(true);
9791
9876
  }
9792
9877
  }, [modulesNumber, hasModule]);
9793
- return /* @__PURE__ */ jsx84(
9878
+ return /* @__PURE__ */ jsx85(
9794
9879
  "nav",
9795
9880
  {
9796
9881
  ref,
9797
9882
  className: !showSettingsButton ? "disabled" : settingsPanelSwitch === "on" ? "shown" : "hidden",
9798
- children: settingsPanelSwitch === "off" && /* @__PURE__ */ jsx84("div", { children: /* @__PURE__ */ jsx84(
9883
+ children: settingsPanelSwitch === "off" && /* @__PURE__ */ jsx85("div", { children: /* @__PURE__ */ jsx85(
9799
9884
  Button,
9800
9885
  {
9801
9886
  className: "cancel",
@@ -9812,27 +9897,27 @@ var Drawer = forwardRef10(
9812
9897
 
9813
9898
  // src/content/editable/ContentEditable.tsx
9814
9899
  import { ContentEditable as LexicalContentEditable2 } from "@lexical/react/LexicalContentEditable";
9815
- import { jsx as jsx85 } from "react/jsx-runtime";
9900
+ import { jsx as jsx86 } from "react/jsx-runtime";
9816
9901
  function ContentEditable() {
9817
- return /* @__PURE__ */ jsx85(LexicalContentEditable2, { className: "content" });
9902
+ return /* @__PURE__ */ jsx86(LexicalContentEditable2, { className: "content" });
9818
9903
  }
9819
9904
 
9820
9905
  // src/content/node/NodeProvider.tsx
9821
9906
  import React18, {
9822
9907
  useContext as useContext3,
9823
- useEffect as useEffect65,
9908
+ useEffect as useEffect66,
9824
9909
  useRef as useRef46
9825
9910
  } from "react";
9826
9911
 
9827
9912
  // src/components/inputs/DropdownWrapper.tsx
9828
9913
  import {
9829
9914
  forwardRef as forwardRef11,
9830
- useEffect as useEffect53,
9915
+ useEffect as useEffect54,
9831
9916
  useImperativeHandle as useImperativeHandle10,
9832
9917
  useMemo as useMemo6,
9833
9918
  useRef as useRef33
9834
9919
  } from "react";
9835
- import { jsx as jsx86, jsxs as jsxs33 } from "react/jsx-runtime";
9920
+ import { jsx as jsx87, jsxs as jsxs33 } from "react/jsx-runtime";
9836
9921
  var DropdownWrapper = forwardRef11((props, ref) => {
9837
9922
  const {
9838
9923
  className,
@@ -9915,9 +10000,9 @@ var DropdownWrapper = forwardRef11((props, ref) => {
9915
10000
  subMenu
9916
10001
  } = menuItem;
9917
10002
  if (menuItemDivider) {
9918
- menuItemElement = /* @__PURE__ */ jsx86("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
10003
+ menuItemElement = /* @__PURE__ */ jsx87("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
9919
10004
  } else if (menuItemIsGroup) {
9920
- menuItemElement = /* @__PURE__ */ jsx86("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
10005
+ menuItemElement = /* @__PURE__ */ jsx87("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
9921
10006
  } else if (subMenu) {
9922
10007
  const subMenuElements = [];
9923
10008
  let subTabsIndex = 0;
@@ -9936,7 +10021,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
9936
10021
  e.stopPropagation();
9937
10022
  },
9938
10023
  children: [
9939
- MenuItemIcon && /* @__PURE__ */ jsx86(
10024
+ MenuItemIcon && /* @__PURE__ */ jsx87(
9940
10025
  Icon,
9941
10026
  {
9942
10027
  style: { color: menuItemColor || "inherit" },
@@ -9945,7 +10030,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
9945
10030
  }
9946
10031
  ),
9947
10032
  menuItemLabel,
9948
- /* @__PURE__ */ jsx86(
10033
+ /* @__PURE__ */ jsx87(
9949
10034
  "sl-menu",
9950
10035
  {
9951
10036
  slot: "submenu",
@@ -9982,7 +10067,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
9982
10067
  e.stopPropagation();
9983
10068
  },
9984
10069
  children: [
9985
- MenuItemIcon && /* @__PURE__ */ jsx86(
10070
+ MenuItemIcon && /* @__PURE__ */ jsx87(
9986
10071
  Icon,
9987
10072
  {
9988
10073
  style: { color: menuItemColor || "inherit" },
@@ -9991,7 +10076,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
9991
10076
  }
9992
10077
  ),
9993
10078
  menuItemLabel,
9994
- menuItemIsError && /* @__PURE__ */ jsx86(DotBadge, { variant: "danger", leftSided: true })
10079
+ menuItemIsError && /* @__PURE__ */ jsx87(DotBadge, { variant: "danger", leftSided: true })
9995
10080
  ]
9996
10081
  },
9997
10082
  `menuItem${menuItemId}`
@@ -10013,7 +10098,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
10013
10098
  }, [menu]);
10014
10099
  filterNilAttrs(props, ["sync", "slot"]);
10015
10100
  const dropdownAttributes = filterNilAttrs(props, ["placement"]);
10016
- useEffect53(() => {
10101
+ useEffect54(() => {
10017
10102
  window.customElements.whenDefined("sl-menu").then(() => {
10018
10103
  if (menuRef.current) {
10019
10104
  menuRef.current.addEventListener(
@@ -10031,7 +10116,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
10031
10116
  }
10032
10117
  };
10033
10118
  }, [menu]);
10034
- useEffect53(() => {
10119
+ useEffect54(() => {
10035
10120
  window.customElements.whenDefined("sl-dropdown").then(() => {
10036
10121
  if (dropdownRef.current) {
10037
10122
  dropdownRef.current.addEventListener(
@@ -10066,7 +10151,7 @@ var DropdownWrapper = forwardRef11((props, ref) => {
10066
10151
  ...dropdownAttributes,
10067
10152
  children: [
10068
10153
  children,
10069
- menuItems.length > 0 && /* @__PURE__ */ jsx86(
10154
+ menuItems.length > 0 && /* @__PURE__ */ jsx87(
10070
10155
  "sl-menu",
10071
10156
  {
10072
10157
  ref: menuRef,
@@ -10115,25 +10200,25 @@ function exportNodeToJSON(node) {
10115
10200
  }
10116
10201
 
10117
10202
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionPlugin.tsx
10118
- import { useLexicalComposerContext as useLexicalComposerContext45 } from "@lexical/react/LexicalComposerContext";
10203
+ import { useLexicalComposerContext as useLexicalComposerContext46 } from "@lexical/react/LexicalComposerContext";
10119
10204
  import { $isTableNode as $isTableNode10 } from "@lexical/table";
10120
10205
  import { mergeRegister as mergeRegister15 } from "@lexical/utils";
10121
10206
  import {
10122
10207
  $createNodeSelection as $createNodeSelection12,
10123
10208
  $createParagraphNode as $createParagraphNode9,
10124
10209
  $getNodeByKey as $getNodeByKey34,
10125
- $getRoot as $getRoot9,
10210
+ $getRoot as $getRoot10,
10126
10211
  $parseSerializedNode,
10127
10212
  $setSelection as $setSelection12,
10128
10213
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR9,
10129
10214
  createCommand as createCommand13
10130
10215
  } from "lexical";
10131
- import { useEffect as useEffect55, useRef as useRef35 } from "react";
10216
+ import { useEffect as useEffect56, useRef as useRef35 } from "react";
10132
10217
 
10133
10218
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
10134
- import { useLexicalComposerContext as useLexicalComposerContext44 } from "@lexical/react/LexicalComposerContext";
10219
+ import { useLexicalComposerContext as useLexicalComposerContext45 } from "@lexical/react/LexicalComposerContext";
10135
10220
  import { $getNodeByKey as $getNodeByKey33 } from "lexical";
10136
- import { useEffect as useEffect54, useRef as useRef34, useState as useState7 } from "react";
10221
+ import { useEffect as useEffect55, useRef as useRef34, useState as useState8 } from "react";
10137
10222
 
10138
10223
  // src/plugins/FillInTheBlankQuestionPlugin/validatePointslnput.ts
10139
10224
  function validatePointsInput(input) {
@@ -10155,13 +10240,13 @@ function validatePointsInput(input) {
10155
10240
  }
10156
10241
 
10157
10242
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
10158
- import { jsx as jsx87 } from "react/jsx-runtime";
10243
+ import { jsx as jsx88 } from "react/jsx-runtime";
10159
10244
  function FillInTheBlankQuestionSettings(props) {
10160
10245
  const { nodeKey } = props;
10161
- const [editor] = useLexicalComposerContext44();
10246
+ const [editor] = useLexicalComposerContext45();
10162
10247
  const pointsTextInputRef = useRef34(null);
10163
- const [foundNode, setFoundNode] = useState7();
10164
- useEffect54(() => {
10248
+ const [foundNode, setFoundNode] = useState8();
10249
+ useEffect55(() => {
10165
10250
  if (nodeKey) {
10166
10251
  editor.getEditorState().read(() => {
10167
10252
  const fillInTheBlankNode = $getNodeByKey33(nodeKey);
@@ -10174,7 +10259,7 @@ function FillInTheBlankQuestionSettings(props) {
10174
10259
  if (!foundNode) {
10175
10260
  return null;
10176
10261
  }
10177
- return /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsx87(
10262
+ return /* @__PURE__ */ jsx88("div", { children: /* @__PURE__ */ jsx88(
10178
10263
  TextInput,
10179
10264
  {
10180
10265
  ref: pointsTextInputRef,
@@ -10204,7 +10289,7 @@ function FillInTheBlankQuestionSettings(props) {
10204
10289
  }
10205
10290
 
10206
10291
  // src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionPlugin.tsx
10207
- import { Fragment as Fragment30, jsx as jsx88 } from "react/jsx-runtime";
10292
+ import { Fragment as Fragment31, jsx as jsx89 } from "react/jsx-runtime";
10208
10293
  var INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND = createCommand13("INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND");
10209
10294
  function FillInTheBlankQuestionPlugin() {
10210
10295
  const {
@@ -10213,9 +10298,9 @@ function FillInTheBlankQuestionPlugin() {
10213
10298
  drawer,
10214
10299
  toggleSettingsPanelSwitch
10215
10300
  } = useBlockEditor();
10216
- const [editor] = useLexicalComposerContext45();
10301
+ const [editor] = useLexicalComposerContext46();
10217
10302
  const settingsPanelStickyRef = useRef35(null);
10218
- useEffect55(() => {
10303
+ useEffect56(() => {
10219
10304
  return mergeRegister15(
10220
10305
  editor.registerCommand(
10221
10306
  INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND,
@@ -10262,7 +10347,7 @@ function FillInTheBlankQuestionPlugin() {
10262
10347
  onUpdate: () => {
10263
10348
  if (fillInTheBlankNode) {
10264
10349
  fillInTheBlankNode.__content.update(() => {
10265
- const root = $getRoot9();
10350
+ const root = $getRoot10();
10266
10351
  if (serializedData) {
10267
10352
  const nodeSerialized2 = JSON.parse(serializedData);
10268
10353
  const newNode = $parseSerializedNode(nodeSerialized2);
@@ -10296,7 +10381,7 @@ function FillInTheBlankQuestionPlugin() {
10296
10381
  {
10297
10382
  onUpdate: () => {
10298
10383
  fillInTheBlankNode?.__content.update(() => {
10299
- const root = $getRoot9();
10384
+ const root = $getRoot10();
10300
10385
  let firstChild = root.getFirstChild();
10301
10386
  if (!firstChild) {
10302
10387
  firstChild = $createParagraphNode9();
@@ -10316,7 +10401,7 @@ function FillInTheBlankQuestionPlugin() {
10316
10401
  )
10317
10402
  );
10318
10403
  }, [editor]);
10319
- useEffect55(() => {
10404
+ useEffect56(() => {
10320
10405
  if (isBlockEditorReady) {
10321
10406
  if (settingsPanelStickyRef.current) {
10322
10407
  registerSettingsPanel(
@@ -10326,20 +10411,20 @@ function FillInTheBlankQuestionPlugin() {
10326
10411
  }
10327
10412
  }
10328
10413
  }, [isBlockEditorReady]);
10329
- return /* @__PURE__ */ jsx88(Fragment30, { children: drawer && /* @__PURE__ */ jsx88(
10414
+ return /* @__PURE__ */ jsx89(Fragment31, { children: drawer && /* @__PURE__ */ jsx89(
10330
10415
  StickyToPosition,
10331
10416
  {
10332
10417
  ref: settingsPanelStickyRef,
10333
10418
  container: drawer,
10334
10419
  children: (data, position, isVisible) => {
10335
- return /* @__PURE__ */ jsx88("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx88(
10420
+ return /* @__PURE__ */ jsx89("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx89(
10336
10421
  SettingsCard,
10337
10422
  {
10338
10423
  isVisible: !!isVisible,
10339
10424
  container: drawer,
10340
10425
  title: "Fill In The Blank Settings",
10341
10426
  onClose: toggleSettingsPanelSwitch,
10342
- children: /* @__PURE__ */ jsx88(
10427
+ children: /* @__PURE__ */ jsx89(
10343
10428
  FillInTheBlankQuestionSettings,
10344
10429
  {
10345
10430
  nodeKey: data.nodeKey
@@ -10354,23 +10439,23 @@ function FillInTheBlankQuestionPlugin() {
10354
10439
  }
10355
10440
 
10356
10441
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionPlugin.tsx
10357
- import { useLexicalComposerContext as useLexicalComposerContext47 } from "@lexical/react/LexicalComposerContext";
10442
+ import { useLexicalComposerContext as useLexicalComposerContext48 } from "@lexical/react/LexicalComposerContext";
10358
10443
  import { mergeRegister as mergeRegister16 } from "@lexical/utils";
10359
10444
  import {
10360
10445
  $createNodeSelection as $createNodeSelection13,
10361
10446
  $createParagraphNode as $createParagraphNode10,
10362
10447
  $getNodeByKey as $getNodeByKey36,
10363
- $getRoot as $getRoot10,
10448
+ $getRoot as $getRoot11,
10364
10449
  $setSelection as $setSelection13,
10365
10450
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR10,
10366
10451
  createCommand as createCommand14
10367
10452
  } from "lexical";
10368
- import { useEffect as useEffect57, useRef as useRef37 } from "react";
10453
+ import { useEffect as useEffect58, useRef as useRef37 } from "react";
10369
10454
 
10370
10455
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10371
- import { useLexicalComposerContext as useLexicalComposerContext46 } from "@lexical/react/LexicalComposerContext";
10456
+ import { useLexicalComposerContext as useLexicalComposerContext47 } from "@lexical/react/LexicalComposerContext";
10372
10457
  import { $getNodeByKey as $getNodeByKey35 } from "lexical";
10373
- import { useEffect as useEffect56, useMemo as useMemo7, useRef as useRef36, useState as useState8 } from "react";
10458
+ import { useEffect as useEffect57, useMemo as useMemo7, useRef as useRef36, useState as useState9 } from "react";
10374
10459
 
10375
10460
  // src/plugins/JournalEntryQuestionPlugin/validateErrorTolarancelnput.ts
10376
10461
  function validateErrorTolerance(input) {
@@ -10411,15 +10496,15 @@ function validatePointsInput2(input) {
10411
10496
  }
10412
10497
 
10413
10498
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
10414
- import { Fragment as Fragment31, jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
10499
+ import { Fragment as Fragment32, jsx as jsx90, jsxs as jsxs34 } from "react/jsx-runtime";
10415
10500
  function JournalEntryQuestionSettings(props) {
10416
10501
  const { nodeKey } = props;
10417
- const [editor] = useLexicalComposerContext46();
10502
+ const [editor] = useLexicalComposerContext47();
10418
10503
  const pointsTextInputRef = useRef36(null);
10419
10504
  const errorToleranceTextInputRef = useRef36(null);
10420
10505
  const typeRadioGroupRef = useRef36(null);
10421
- const [foundNode, setFoundNode] = useState8();
10422
- useEffect56(() => {
10506
+ const [foundNode, setFoundNode] = useState9();
10507
+ useEffect57(() => {
10423
10508
  if (nodeKey) {
10424
10509
  editor.getEditorState().read(() => {
10425
10510
  const journalEntryNode = $getNodeByKey35(nodeKey);
@@ -10444,8 +10529,8 @@ function JournalEntryQuestionSettings(props) {
10444
10529
  if (!foundNode) {
10445
10530
  return null;
10446
10531
  }
10447
- return /* @__PURE__ */ jsxs34(Fragment31, { children: [
10448
- /* @__PURE__ */ jsx89("div", { children: /* @__PURE__ */ jsx89(
10532
+ return /* @__PURE__ */ jsxs34(Fragment32, { children: [
10533
+ /* @__PURE__ */ jsx90("div", { children: /* @__PURE__ */ jsx90(
10449
10534
  TextInput,
10450
10535
  {
10451
10536
  ref: pointsTextInputRef,
@@ -10472,7 +10557,7 @@ function JournalEntryQuestionSettings(props) {
10472
10557
  }
10473
10558
  }
10474
10559
  ) }),
10475
- /* @__PURE__ */ jsx89("div", { children: /* @__PURE__ */ jsx89(
10560
+ /* @__PURE__ */ jsx90("div", { children: /* @__PURE__ */ jsx90(
10476
10561
  TextInput,
10477
10562
  {
10478
10563
  ref: errorToleranceTextInputRef,
@@ -10503,7 +10588,7 @@ function JournalEntryQuestionSettings(props) {
10503
10588
  }
10504
10589
  }
10505
10590
  ) }),
10506
- /* @__PURE__ */ jsx89("div", { children: /* @__PURE__ */ jsx89(
10591
+ /* @__PURE__ */ jsx90("div", { children: /* @__PURE__ */ jsx90(
10507
10592
  RadioGroup,
10508
10593
  {
10509
10594
  ref: typeRadioGroupRef,
@@ -10525,7 +10610,7 @@ function JournalEntryQuestionSettings(props) {
10525
10610
  }
10526
10611
 
10527
10612
  // src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionPlugin.tsx
10528
- import { Fragment as Fragment32, jsx as jsx90 } from "react/jsx-runtime";
10613
+ import { Fragment as Fragment33, jsx as jsx91 } from "react/jsx-runtime";
10529
10614
  var INSERT_JOURNAL_ENTRY_QUESTION_COMMAND = createCommand14("INSERT_JOURNAL_ENTRY_QUESTION_COMMAND");
10530
10615
  function JournalEntryQuestionPlugin() {
10531
10616
  const {
@@ -10534,9 +10619,9 @@ function JournalEntryQuestionPlugin() {
10534
10619
  drawer,
10535
10620
  toggleSettingsPanelSwitch
10536
10621
  } = useBlockEditor();
10537
- const [editor] = useLexicalComposerContext47();
10622
+ const [editor] = useLexicalComposerContext48();
10538
10623
  const settingsPanelStickyRef = useRef37(null);
10539
- useEffect57(() => {
10624
+ useEffect58(() => {
10540
10625
  return mergeRegister16(
10541
10626
  editor.registerCommand(
10542
10627
  INSERT_JOURNAL_ENTRY_QUESTION_COMMAND,
@@ -10576,7 +10661,7 @@ function JournalEntryQuestionPlugin() {
10576
10661
  let index = 0;
10577
10662
  for (const questionItem of journalEntryNode.__lineItems) {
10578
10663
  questionItem.account.update(() => {
10579
- const root = $getRoot10();
10664
+ const root = $getRoot11();
10580
10665
  let firstChild = root.getFirstChild();
10581
10666
  if (!firstChild) {
10582
10667
  firstChild = $createParagraphNode10();
@@ -10588,7 +10673,7 @@ function JournalEntryQuestionPlugin() {
10588
10673
  });
10589
10674
  if (questionItem.debit) {
10590
10675
  questionItem.debit.update(() => {
10591
- const root = $getRoot10();
10676
+ const root = $getRoot11();
10592
10677
  let firstChild = root.getFirstChild();
10593
10678
  if (!firstChild) {
10594
10679
  firstChild = $createParagraphNode10();
@@ -10598,7 +10683,7 @@ function JournalEntryQuestionPlugin() {
10598
10683
  }
10599
10684
  if (questionItem.credit) {
10600
10685
  questionItem.credit.update(() => {
10601
- const root = $getRoot10();
10686
+ const root = $getRoot11();
10602
10687
  let firstChild = root.getFirstChild();
10603
10688
  if (!firstChild) {
10604
10689
  firstChild = $createParagraphNode10();
@@ -10622,7 +10707,7 @@ function JournalEntryQuestionPlugin() {
10622
10707
  )
10623
10708
  );
10624
10709
  }, [editor]);
10625
- useEffect57(() => {
10710
+ useEffect58(() => {
10626
10711
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10627
10712
  registerSettingsPanel(
10628
10713
  JournalEntryQuestionNode.getType(),
@@ -10630,20 +10715,20 @@ function JournalEntryQuestionPlugin() {
10630
10715
  );
10631
10716
  }
10632
10717
  }, [isBlockEditorReady]);
10633
- return /* @__PURE__ */ jsx90(Fragment32, { children: drawer && /* @__PURE__ */ jsx90(
10718
+ return /* @__PURE__ */ jsx91(Fragment33, { children: drawer && /* @__PURE__ */ jsx91(
10634
10719
  StickyToPosition,
10635
10720
  {
10636
10721
  ref: settingsPanelStickyRef,
10637
10722
  container: drawer,
10638
10723
  children: (data, position, isVisible) => {
10639
- return /* @__PURE__ */ jsx90("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx90(
10724
+ return /* @__PURE__ */ jsx91("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx91(
10640
10725
  SettingsCard,
10641
10726
  {
10642
10727
  isVisible: !!isVisible,
10643
10728
  container: drawer,
10644
10729
  title: "Journal Entry Settings",
10645
10730
  onClose: toggleSettingsPanelSwitch,
10646
- children: isVisible && /* @__PURE__ */ jsx90(
10731
+ children: isVisible && /* @__PURE__ */ jsx91(
10647
10732
  JournalEntryQuestionSettings,
10648
10733
  {
10649
10734
  nodeKey: data.nodeKey
@@ -10657,9 +10742,9 @@ function JournalEntryQuestionPlugin() {
10657
10742
  }
10658
10743
 
10659
10744
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10660
- import { useLexicalComposerContext as useLexicalComposerContext48 } from "@lexical/react/LexicalComposerContext";
10745
+ import { useLexicalComposerContext as useLexicalComposerContext49 } from "@lexical/react/LexicalComposerContext";
10661
10746
  import { $getNodeByKey as $getNodeByKey37 } from "lexical";
10662
- import { useEffect as useEffect58, useRef as useRef38, useState as useState9 } from "react";
10747
+ import { useEffect as useEffect59, useRef as useRef38, useState as useState10 } from "react";
10663
10748
 
10664
10749
  // src/plugins/MatchingQuestionPlugin/validatePointslnput.ts
10665
10750
  function validatePointsInput3(input) {
@@ -10681,13 +10766,13 @@ function validatePointsInput3(input) {
10681
10766
  }
10682
10767
 
10683
10768
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
10684
- import { jsx as jsx91 } from "react/jsx-runtime";
10769
+ import { jsx as jsx92 } from "react/jsx-runtime";
10685
10770
  function MatchingQuestionSettings(props) {
10686
10771
  const { nodeKey } = props;
10687
- const [editor] = useLexicalComposerContext48();
10772
+ const [editor] = useLexicalComposerContext49();
10688
10773
  const pointsTextInputRef = useRef38(null);
10689
- const [foundNode, setFoundNode] = useState9();
10690
- useEffect58(() => {
10774
+ const [foundNode, setFoundNode] = useState10();
10775
+ useEffect59(() => {
10691
10776
  if (nodeKey) {
10692
10777
  editor.getEditorState().read(() => {
10693
10778
  const matchingQuestionNode = $getNodeByKey37(nodeKey);
@@ -10700,7 +10785,7 @@ function MatchingQuestionSettings(props) {
10700
10785
  if (!foundNode) {
10701
10786
  return null;
10702
10787
  }
10703
- return /* @__PURE__ */ jsx91("div", { children: /* @__PURE__ */ jsx91(
10788
+ return /* @__PURE__ */ jsx92("div", { children: /* @__PURE__ */ jsx92(
10704
10789
  TextInput,
10705
10790
  {
10706
10791
  ref: pointsTextInputRef,
@@ -10730,19 +10815,19 @@ function MatchingQuestionSettings(props) {
10730
10815
  }
10731
10816
 
10732
10817
  // src/plugins/MatchingQuestionPlugin/MatchingQuestionPlugin.tsx
10733
- import { useLexicalComposerContext as useLexicalComposerContext49 } from "@lexical/react/LexicalComposerContext";
10818
+ import { useLexicalComposerContext as useLexicalComposerContext50 } from "@lexical/react/LexicalComposerContext";
10734
10819
  import { mergeRegister as mergeRegister17 } from "@lexical/utils";
10735
10820
  import {
10736
10821
  $createNodeSelection as $createNodeSelection14,
10737
10822
  $createParagraphNode as $createParagraphNode11,
10738
10823
  $getNodeByKey as $getNodeByKey38,
10739
- $getRoot as $getRoot11,
10824
+ $getRoot as $getRoot12,
10740
10825
  $setSelection as $setSelection14,
10741
10826
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR11,
10742
10827
  createCommand as createCommand15
10743
10828
  } from "lexical";
10744
- import { useEffect as useEffect59, useRef as useRef39 } from "react";
10745
- import { Fragment as Fragment33, jsx as jsx92 } from "react/jsx-runtime";
10829
+ import { useEffect as useEffect60, useRef as useRef39 } from "react";
10830
+ import { Fragment as Fragment34, jsx as jsx93 } from "react/jsx-runtime";
10746
10831
  var INSERT_MATCHING_QUESTION_COMMAND = createCommand15("INSERT_MATCHING_QUESTION_COMMAND");
10747
10832
  function MatchingQuestionPlugin() {
10748
10833
  const {
@@ -10751,9 +10836,9 @@ function MatchingQuestionPlugin() {
10751
10836
  drawer,
10752
10837
  toggleSettingsPanelSwitch
10753
10838
  } = useBlockEditor();
10754
- const [editor] = useLexicalComposerContext49();
10839
+ const [editor] = useLexicalComposerContext50();
10755
10840
  const settingsPanelStickyRef = useRef39(null);
10756
- useEffect59(() => {
10841
+ useEffect60(() => {
10757
10842
  return mergeRegister17(
10758
10843
  editor.registerCommand(
10759
10844
  INSERT_MATCHING_QUESTION_COMMAND,
@@ -10780,7 +10865,7 @@ function MatchingQuestionPlugin() {
10780
10865
  for (const questionItem of matchingQuestionNode.__items) {
10781
10866
  if (questionItem.itemPremiseContent) {
10782
10867
  questionItem.itemPremiseContent.update(() => {
10783
- const root = $getRoot11();
10868
+ const root = $getRoot12();
10784
10869
  let firstChild = root.getFirstChild();
10785
10870
  if (!firstChild) {
10786
10871
  firstChild = $createParagraphNode11();
@@ -10792,7 +10877,7 @@ function MatchingQuestionPlugin() {
10792
10877
  });
10793
10878
  }
10794
10879
  questionItem.itemOptionContent.update(() => {
10795
- const root = $getRoot11();
10880
+ const root = $getRoot12();
10796
10881
  let firstChild = root.getFirstChild();
10797
10882
  if (!firstChild) {
10798
10883
  firstChild = $createParagraphNode11();
@@ -10812,7 +10897,7 @@ function MatchingQuestionPlugin() {
10812
10897
  )
10813
10898
  );
10814
10899
  }, [editor]);
10815
- useEffect59(() => {
10900
+ useEffect60(() => {
10816
10901
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
10817
10902
  registerSettingsPanel(
10818
10903
  MatchingQuestionNode.getType(),
@@ -10820,20 +10905,20 @@ function MatchingQuestionPlugin() {
10820
10905
  );
10821
10906
  }
10822
10907
  }, [isBlockEditorReady]);
10823
- return /* @__PURE__ */ jsx92(Fragment33, { children: drawer && /* @__PURE__ */ jsx92(
10908
+ return /* @__PURE__ */ jsx93(Fragment34, { children: drawer && /* @__PURE__ */ jsx93(
10824
10909
  StickyToPosition,
10825
10910
  {
10826
10911
  ref: settingsPanelStickyRef,
10827
10912
  container: drawer,
10828
10913
  children: (data, position, isVisible) => {
10829
- return /* @__PURE__ */ jsx92("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx92(
10914
+ return /* @__PURE__ */ jsx93("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx93(
10830
10915
  SettingsCard,
10831
10916
  {
10832
10917
  isVisible: !!isVisible,
10833
10918
  container: drawer,
10834
10919
  title: "Matching Settings",
10835
10920
  onClose: toggleSettingsPanelSwitch,
10836
- children: isVisible && /* @__PURE__ */ jsx92(
10921
+ children: isVisible && /* @__PURE__ */ jsx93(
10837
10922
  MatchingQuestionSettings,
10838
10923
  {
10839
10924
  nodeKey: data.nodeKey
@@ -10886,23 +10971,23 @@ function traverseListItemNodes(rootNode, cb) {
10886
10971
 
10887
10972
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionPlugin.tsx
10888
10973
  import { $isListNode as $isListNode2 } from "@lexical/list";
10889
- import { useLexicalComposerContext as useLexicalComposerContext51 } from "@lexical/react/LexicalComposerContext";
10974
+ import { useLexicalComposerContext as useLexicalComposerContext52 } from "@lexical/react/LexicalComposerContext";
10890
10975
  import { mergeRegister as mergeRegister18 } from "@lexical/utils";
10891
10976
  import {
10892
10977
  $createNodeSelection as $createNodeSelection15,
10893
10978
  $createParagraphNode as $createParagraphNode12,
10894
10979
  $getNodeByKey as $getNodeByKey40,
10895
- $getRoot as $getRoot12,
10980
+ $getRoot as $getRoot13,
10896
10981
  $setSelection as $setSelection15,
10897
10982
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR12,
10898
10983
  createCommand as createCommand16
10899
10984
  } from "lexical";
10900
- import { useEffect as useEffect61, useRef as useRef41 } from "react";
10985
+ import { useEffect as useEffect62, useRef as useRef41 } from "react";
10901
10986
 
10902
10987
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10903
- import { useLexicalComposerContext as useLexicalComposerContext50 } from "@lexical/react/LexicalComposerContext";
10988
+ import { useLexicalComposerContext as useLexicalComposerContext51 } from "@lexical/react/LexicalComposerContext";
10904
10989
  import { $getNodeByKey as $getNodeByKey39 } from "lexical";
10905
- import { useCallback as useCallback10, useEffect as useEffect60, useRef as useRef40, useState as useState10 } from "react";
10990
+ import { useCallback as useCallback11, useEffect as useEffect61, useRef as useRef40, useState as useState11 } from "react";
10906
10991
 
10907
10992
  // src/plugins/MultipleOptionQuestionPlugin/validateChoicesInput.ts
10908
10993
  function validateChoicesInput(input, min) {
@@ -10946,18 +11031,18 @@ function validatePointsInput4(input) {
10946
11031
  }
10947
11032
 
10948
11033
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
10949
- import { Fragment as Fragment34, jsx as jsx93, jsxs as jsxs35 } from "react/jsx-runtime";
11034
+ import { Fragment as Fragment35, jsx as jsx94, jsxs as jsxs35 } from "react/jsx-runtime";
10950
11035
  function MultipleOptionQuestionSettings(props) {
10951
11036
  const { nodeKey, questionType } = props;
10952
- const [editor] = useLexicalComposerContext50();
11037
+ const [editor] = useLexicalComposerContext51();
10953
11038
  const noneOfTheAboveInputRef = useRef40(null);
10954
11039
  const gradingRadioGroupRef = useRef40(null);
10955
11040
  const pointsTextInputRef = useRef40(null);
10956
11041
  const choicesTextInputRef = useRef40(null);
10957
11042
  const correctChoicesTextInputRef = useRef40(null);
10958
11043
  const incorrectChoicesTextInputRef = useRef40(null);
10959
- const [foundNodeRef, setFoundNodeRef] = useState10();
10960
- useEffect60(() => {
11044
+ const [foundNodeRef, setFoundNodeRef] = useState11();
11045
+ useEffect61(() => {
10961
11046
  if (nodeKey) {
10962
11047
  editor.getEditorState().read(() => {
10963
11048
  const optionsQuestionNode = $getNodeByKey39(nodeKey);
@@ -10967,7 +11052,7 @@ function MultipleOptionQuestionSettings(props) {
10967
11052
  });
10968
11053
  }
10969
11054
  }, [editor, nodeKey]);
10970
- useEffect60(() => {
11055
+ useEffect61(() => {
10971
11056
  return editor.registerMutationListener(
10972
11057
  MultipleOptionQuestionNode,
10973
11058
  (nodeMutations) => {
@@ -10990,7 +11075,7 @@ function MultipleOptionQuestionSettings(props) {
10990
11075
  }
10991
11076
  );
10992
11077
  }, [editor, nodeKey]);
10993
- const handlePointsChange = useCallback10(
11078
+ const handlePointsChange = useCallback11(
10994
11079
  (value) => {
10995
11080
  editor.update(() => {
10996
11081
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11007,7 +11092,7 @@ function MultipleOptionQuestionSettings(props) {
11007
11092
  },
11008
11093
  [editor, nodeKey]
11009
11094
  );
11010
- const handleGradingChange = useCallback10(
11095
+ const handleGradingChange = useCallback11(
11011
11096
  (value) => {
11012
11097
  editor.update(() => {
11013
11098
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11018,7 +11103,7 @@ function MultipleOptionQuestionSettings(props) {
11018
11103
  },
11019
11104
  [editor, nodeKey]
11020
11105
  );
11021
- const handleCorrectChoicesChange = useCallback10(
11106
+ const handleCorrectChoicesChange = useCallback11(
11022
11107
  (value) => {
11023
11108
  editor.update(() => {
11024
11109
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11039,7 +11124,7 @@ function MultipleOptionQuestionSettings(props) {
11039
11124
  },
11040
11125
  [editor, nodeKey]
11041
11126
  );
11042
- const handleIncorrectChoicesChange = useCallback10(
11127
+ const handleIncorrectChoicesChange = useCallback11(
11043
11128
  (value) => {
11044
11129
  editor.update(() => {
11045
11130
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11060,7 +11145,7 @@ function MultipleOptionQuestionSettings(props) {
11060
11145
  },
11061
11146
  [editor, nodeKey]
11062
11147
  );
11063
- const handleChoicesChange = useCallback10(
11148
+ const handleChoicesChange = useCallback11(
11064
11149
  (value) => {
11065
11150
  editor.update(() => {
11066
11151
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11081,7 +11166,7 @@ function MultipleOptionQuestionSettings(props) {
11081
11166
  },
11082
11167
  [editor, nodeKey]
11083
11168
  );
11084
- const handleNoneOfTheAboveChange = useCallback10(
11169
+ const handleNoneOfTheAboveChange = useCallback11(
11085
11170
  (checked) => {
11086
11171
  editor.update(() => {
11087
11172
  const targetNode = $getNodeByKey39(nodeKey);
@@ -11095,8 +11180,8 @@ function MultipleOptionQuestionSettings(props) {
11095
11180
  if (!foundNodeRef) {
11096
11181
  return null;
11097
11182
  }
11098
- return /* @__PURE__ */ jsxs35(Fragment34, { children: [
11099
- /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11183
+ return /* @__PURE__ */ jsxs35(Fragment35, { children: [
11184
+ /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11100
11185
  TextInput,
11101
11186
  {
11102
11187
  ref: pointsTextInputRef,
@@ -11111,7 +11196,7 @@ function MultipleOptionQuestionSettings(props) {
11111
11196
  },
11112
11197
  `points_${nodeKey}`
11113
11198
  ) }),
11114
- questionType === "multiple-answers" && /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11199
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11115
11200
  RadioGroup,
11116
11201
  {
11117
11202
  ref: gradingRadioGroupRef,
@@ -11132,7 +11217,7 @@ function MultipleOptionQuestionSettings(props) {
11132
11217
  },
11133
11218
  `grading_${nodeKey}`
11134
11219
  ) }),
11135
- questionType === "multiple-answers" && /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11220
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11136
11221
  TextInput,
11137
11222
  {
11138
11223
  ref: correctChoicesTextInputRef,
@@ -11147,7 +11232,7 @@ function MultipleOptionQuestionSettings(props) {
11147
11232
  },
11148
11233
  `correctChoices_${nodeKey}`
11149
11234
  ) }),
11150
- questionType === "multiple-answers" && /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11235
+ questionType === "multiple-answers" && /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11151
11236
  TextInput,
11152
11237
  {
11153
11238
  ref: incorrectChoicesTextInputRef,
@@ -11162,7 +11247,7 @@ function MultipleOptionQuestionSettings(props) {
11162
11247
  },
11163
11248
  `incorrectChoices_${nodeKey}`
11164
11249
  ) }),
11165
- questionType === "multiple-choice" && /* @__PURE__ */ jsx93("div", { children: /* @__PURE__ */ jsx93(
11250
+ questionType === "multiple-choice" && /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
11166
11251
  TextInput,
11167
11252
  {
11168
11253
  ref: choicesTextInputRef,
@@ -11177,13 +11262,13 @@ function MultipleOptionQuestionSettings(props) {
11177
11262
  },
11178
11263
  `choices_${nodeKey}`
11179
11264
  ) }),
11180
- /* @__PURE__ */ jsx93(
11265
+ /* @__PURE__ */ jsx94(
11181
11266
  "div",
11182
11267
  {
11183
11268
  style: {
11184
11269
  paddingBottom: "var(--sl-spacing-medium)"
11185
11270
  },
11186
- children: /* @__PURE__ */ jsx93(
11271
+ children: /* @__PURE__ */ jsx94(
11187
11272
  Checkbox,
11188
11273
  {
11189
11274
  ref: noneOfTheAboveInputRef,
@@ -11201,7 +11286,7 @@ function MultipleOptionQuestionSettings(props) {
11201
11286
  }
11202
11287
 
11203
11288
  // src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionPlugin.tsx
11204
- import { Fragment as Fragment35, jsx as jsx94 } from "react/jsx-runtime";
11289
+ import { Fragment as Fragment36, jsx as jsx95 } from "react/jsx-runtime";
11205
11290
  var INSERT_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("INSERT_MULTIPLE_OPTION_QUESTION_COMMAND");
11206
11291
  var REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND");
11207
11292
  var REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND = createCommand16("REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND");
@@ -11212,9 +11297,9 @@ function MultipleOptionQuestionPlugin() {
11212
11297
  drawer,
11213
11298
  toggleSettingsPanelSwitch
11214
11299
  } = useBlockEditor();
11215
- const [editor] = useLexicalComposerContext51();
11300
+ const [editor] = useLexicalComposerContext52();
11216
11301
  const settingsPanelStickyRef = useRef41(null);
11217
- useEffect61(() => {
11302
+ useEffect62(() => {
11218
11303
  return mergeRegister18(
11219
11304
  editor.registerCommand(
11220
11305
  INSERT_MULTIPLE_OPTION_QUESTION_COMMAND,
@@ -11253,7 +11338,7 @@ function MultipleOptionQuestionPlugin() {
11253
11338
  let index = 0;
11254
11339
  for (const optionItem of foundNode.__options) {
11255
11340
  optionItem.content.update(() => {
11256
- const root = $getRoot12();
11341
+ const root = $getRoot13();
11257
11342
  let firstChild = root.getFirstChild();
11258
11343
  if (!firstChild) {
11259
11344
  firstChild = $createParagraphNode12();
@@ -11327,7 +11412,7 @@ function MultipleOptionQuestionPlugin() {
11327
11412
  const foundNode = $getNodeByKey40(newNodeKey);
11328
11413
  if ($isMultipleOptionQuestionNode(foundNode)) {
11329
11414
  foundNode.__options[0].content.update(() => {
11330
- const root = $getRoot12();
11415
+ const root = $getRoot13();
11331
11416
  const firstChild = root.getFirstChild();
11332
11417
  firstChild?.selectStart();
11333
11418
  });
@@ -11376,7 +11461,7 @@ function MultipleOptionQuestionPlugin() {
11376
11461
  const foundNode = $getNodeByKey40(newNodeKey);
11377
11462
  if ($isMultipleOptionQuestionNode(foundNode)) {
11378
11463
  foundNode.__options[0].content.update(() => {
11379
- const root = $getRoot12();
11464
+ const root = $getRoot13();
11380
11465
  const firstChild = root.getFirstChild();
11381
11466
  firstChild?.selectStart();
11382
11467
  });
@@ -11393,7 +11478,7 @@ function MultipleOptionQuestionPlugin() {
11393
11478
  )
11394
11479
  );
11395
11480
  }, [editor]);
11396
- useEffect61(() => {
11481
+ useEffect62(() => {
11397
11482
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11398
11483
  registerSettingsPanel(
11399
11484
  MultipleOptionQuestionNode.getType(),
@@ -11401,7 +11486,7 @@ function MultipleOptionQuestionPlugin() {
11401
11486
  );
11402
11487
  }
11403
11488
  }, [isBlockEditorReady]);
11404
- return /* @__PURE__ */ jsx94(Fragment35, { children: drawer && /* @__PURE__ */ jsx94(
11489
+ return /* @__PURE__ */ jsx95(Fragment36, { children: drawer && /* @__PURE__ */ jsx95(
11405
11490
  StickyToPosition,
11406
11491
  {
11407
11492
  ref: settingsPanelStickyRef,
@@ -11418,14 +11503,14 @@ function MultipleOptionQuestionPlugin() {
11418
11503
  }
11419
11504
  });
11420
11505
  }
11421
- return /* @__PURE__ */ jsx94("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx94(
11506
+ return /* @__PURE__ */ jsx95("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx95(
11422
11507
  SettingsCard,
11423
11508
  {
11424
11509
  isVisible: !!isVisible,
11425
11510
  container: drawer,
11426
11511
  title: questionType === "multiple-answers" ? "Multiple Answers Settings" : "Multiple Choice Settings",
11427
11512
  onClose: toggleSettingsPanelSwitch,
11428
- children: isVisible && questionType && /* @__PURE__ */ jsx94(
11513
+ children: isVisible && questionType && /* @__PURE__ */ jsx95(
11429
11514
  MultipleOptionQuestionSettings,
11430
11515
  {
11431
11516
  nodeKey: data.nodeKey,
@@ -11440,23 +11525,23 @@ function MultipleOptionQuestionPlugin() {
11440
11525
  }
11441
11526
 
11442
11527
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionPlugin.tsx
11443
- import { useLexicalComposerContext as useLexicalComposerContext53 } from "@lexical/react/LexicalComposerContext";
11528
+ import { useLexicalComposerContext as useLexicalComposerContext54 } from "@lexical/react/LexicalComposerContext";
11444
11529
  import { mergeRegister as mergeRegister19 } from "@lexical/utils";
11445
11530
  import {
11446
11531
  $createNodeSelection as $createNodeSelection16,
11447
11532
  $createParagraphNode as $createParagraphNode13,
11448
11533
  $getNodeByKey as $getNodeByKey42,
11449
- $getRoot as $getRoot13,
11534
+ $getRoot as $getRoot14,
11450
11535
  $setSelection as $setSelection16,
11451
11536
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR13,
11452
11537
  createCommand as createCommand17
11453
11538
  } from "lexical";
11454
- import { useEffect as useEffect63, useRef as useRef43 } from "react";
11539
+ import { useEffect as useEffect64, useRef as useRef43 } from "react";
11455
11540
 
11456
11541
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11457
- import { useLexicalComposerContext as useLexicalComposerContext52 } from "@lexical/react/LexicalComposerContext";
11542
+ import { useLexicalComposerContext as useLexicalComposerContext53 } from "@lexical/react/LexicalComposerContext";
11458
11543
  import { $getNodeByKey as $getNodeByKey41 } from "lexical";
11459
- import { useEffect as useEffect62, useRef as useRef42, useState as useState11 } from "react";
11544
+ import { useEffect as useEffect63, useRef as useRef42, useState as useState12 } from "react";
11460
11545
 
11461
11546
  // src/plugins/ShortAnswerQuestionPlugin/validateMaxWordsInput.ts
11462
11547
  function validateMaxWordsInput(input, min) {
@@ -11500,14 +11585,14 @@ function validatePointsInput5(input) {
11500
11585
  }
11501
11586
 
11502
11587
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
11503
- import { Fragment as Fragment36, jsx as jsx95, jsxs as jsxs36 } from "react/jsx-runtime";
11588
+ import { Fragment as Fragment37, jsx as jsx96, jsxs as jsxs36 } from "react/jsx-runtime";
11504
11589
  function ShortAnswerQuestionSettings(props) {
11505
11590
  const { nodeKey } = props;
11506
- const [editor] = useLexicalComposerContext52();
11591
+ const [editor] = useLexicalComposerContext53();
11507
11592
  const pointsTextInputRef = useRef42(null);
11508
11593
  const maxWordsTextInputRef = useRef42(null);
11509
- const [foundNode, setFoundNode] = useState11();
11510
- useEffect62(() => {
11594
+ const [foundNode, setFoundNode] = useState12();
11595
+ useEffect63(() => {
11511
11596
  if (nodeKey) {
11512
11597
  editor.getEditorState().read(() => {
11513
11598
  const shortAnswerNode = $getNodeByKey41(nodeKey);
@@ -11520,8 +11605,8 @@ function ShortAnswerQuestionSettings(props) {
11520
11605
  if (!foundNode) {
11521
11606
  return null;
11522
11607
  }
11523
- return /* @__PURE__ */ jsxs36(Fragment36, { children: [
11524
- /* @__PURE__ */ jsx95("div", { children: /* @__PURE__ */ jsx95(
11608
+ return /* @__PURE__ */ jsxs36(Fragment37, { children: [
11609
+ /* @__PURE__ */ jsx96("div", { children: /* @__PURE__ */ jsx96(
11525
11610
  TextInput,
11526
11611
  {
11527
11612
  ref: pointsTextInputRef,
@@ -11548,7 +11633,7 @@ function ShortAnswerQuestionSettings(props) {
11548
11633
  }
11549
11634
  }
11550
11635
  ) }),
11551
- /* @__PURE__ */ jsx95("div", { children: /* @__PURE__ */ jsx95(
11636
+ /* @__PURE__ */ jsx96("div", { children: /* @__PURE__ */ jsx96(
11552
11637
  TextInput,
11553
11638
  {
11554
11639
  ref: maxWordsTextInputRef,
@@ -11579,7 +11664,7 @@ function ShortAnswerQuestionSettings(props) {
11579
11664
  }
11580
11665
 
11581
11666
  // src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionPlugin.tsx
11582
- import { Fragment as Fragment37, jsx as jsx96 } from "react/jsx-runtime";
11667
+ import { Fragment as Fragment38, jsx as jsx97 } from "react/jsx-runtime";
11583
11668
  var INSERT_SHORT_ANSWER_QUESTION_COMMAND = createCommand17("INSERT_SHORT_ANSWER_QUESTION_COMMAND");
11584
11669
  function ShortAnswerQuestionPlugin() {
11585
11670
  const {
@@ -11588,9 +11673,9 @@ function ShortAnswerQuestionPlugin() {
11588
11673
  drawer,
11589
11674
  toggleSettingsPanelSwitch
11590
11675
  } = useBlockEditor();
11591
- const [editor] = useLexicalComposerContext53();
11676
+ const [editor] = useLexicalComposerContext54();
11592
11677
  const settingsPanelStickyRef = useRef43(null);
11593
- useEffect63(() => {
11678
+ useEffect64(() => {
11594
11679
  return mergeRegister19(
11595
11680
  editor.registerCommand(
11596
11681
  INSERT_SHORT_ANSWER_QUESTION_COMMAND,
@@ -11624,7 +11709,7 @@ function ShortAnswerQuestionPlugin() {
11624
11709
  const shortAnswerNode = $getNodeByKey42(newNodeKey);
11625
11710
  if ($isShortAnswerQuestionNode(shortAnswerNode)) {
11626
11711
  shortAnswerNode.__notes.update(() => {
11627
- const root = $getRoot13();
11712
+ const root = $getRoot14();
11628
11713
  let firstChild = root.getFirstChild();
11629
11714
  if (!firstChild) {
11630
11715
  firstChild = $createParagraphNode13();
@@ -11646,7 +11731,7 @@ function ShortAnswerQuestionPlugin() {
11646
11731
  )
11647
11732
  );
11648
11733
  }, [editor]);
11649
- useEffect63(() => {
11734
+ useEffect64(() => {
11650
11735
  if (isBlockEditorReady && settingsPanelStickyRef.current) {
11651
11736
  registerSettingsPanel(
11652
11737
  ShortAnswerQuestionNode.getType(),
@@ -11654,20 +11739,20 @@ function ShortAnswerQuestionPlugin() {
11654
11739
  );
11655
11740
  }
11656
11741
  }, [isBlockEditorReady]);
11657
- return /* @__PURE__ */ jsx96(Fragment37, { children: drawer && /* @__PURE__ */ jsx96(
11742
+ return /* @__PURE__ */ jsx97(Fragment38, { children: drawer && /* @__PURE__ */ jsx97(
11658
11743
  StickyToPosition,
11659
11744
  {
11660
11745
  ref: settingsPanelStickyRef,
11661
11746
  container: drawer,
11662
11747
  children: (data, position, isVisible) => {
11663
- return /* @__PURE__ */ jsx96("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx96(
11748
+ return /* @__PURE__ */ jsx97("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx97(
11664
11749
  SettingsCard,
11665
11750
  {
11666
11751
  isVisible: !!isVisible,
11667
11752
  container: drawer,
11668
11753
  title: "Short Answer Settings",
11669
11754
  onClose: toggleSettingsPanelSwitch,
11670
- children: isVisible && /* @__PURE__ */ jsx96(
11755
+ children: isVisible && /* @__PURE__ */ jsx97(
11671
11756
  ShortAnswerQuestionSettings,
11672
11757
  {
11673
11758
  nodeKey: data.nodeKey
@@ -11707,7 +11792,7 @@ import {
11707
11792
  Table2
11708
11793
  } from "lucide-react";
11709
11794
  import { useMemo as useMemo8 } from "react";
11710
- import { jsx as jsx97 } from "react/jsx-runtime";
11795
+ import { jsx as jsx98 } from "react/jsx-runtime";
11711
11796
  var handlerStyle3 = {
11712
11797
  display: "flex",
11713
11798
  zIndex: 10,
@@ -12049,7 +12134,7 @@ function AddMenuHandle(props) {
12049
12134
  }
12050
12135
  return menu2;
12051
12136
  }, [hoveredNode]);
12052
- return /* @__PURE__ */ jsx97("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx97(
12137
+ return /* @__PURE__ */ jsx98("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ jsx98(
12053
12138
  DropdownWrapper,
12054
12139
  {
12055
12140
  placement: "bottom-start",
@@ -12060,7 +12145,7 @@ function AddMenuHandle(props) {
12060
12145
  onHideMenu: () => {
12061
12146
  removeVisiblePopup();
12062
12147
  },
12063
- children: /* @__PURE__ */ jsx97("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx97(Icon, { icon: Plus2 }) })
12148
+ children: /* @__PURE__ */ jsx98("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ jsx98(Icon, { icon: Plus2 }) })
12064
12149
  }
12065
12150
  ) });
12066
12151
  }
@@ -12098,7 +12183,7 @@ function renderCopyToClipboardMenu(nodeKey, editor) {
12098
12183
  import {
12099
12184
  $createParagraphNode as $createParagraphNode15,
12100
12185
  $getNodeByKey as $getNodeByKey45,
12101
- $getRoot as $getRoot14
12186
+ $getRoot as $getRoot15
12102
12187
  } from "lexical";
12103
12188
  import { Trash2 as Trash25 } from "lucide-react";
12104
12189
  function renderDeleteMenu(nodeKey, editor) {
@@ -12119,7 +12204,7 @@ function renderDeleteMenu(nodeKey, editor) {
12119
12204
  } else if (prevBlock) {
12120
12205
  prevBlock.selectStart();
12121
12206
  } else {
12122
- const root = $getRoot14();
12207
+ const root = $getRoot15();
12123
12208
  const newParagraph = $createParagraphNode15();
12124
12209
  root.append(newParagraph);
12125
12210
  newParagraph.selectStart();
@@ -12390,7 +12475,7 @@ import { HeadingNode as HeadingNode3 } from "@lexical/rich-text";
12390
12475
  import { ParagraphNode as ParagraphNode3 } from "lexical";
12391
12476
  import { GripVertical } from "lucide-react";
12392
12477
  import { useMemo as useMemo9 } from "react";
12393
- import { jsx as jsx98 } from "react/jsx-runtime";
12478
+ import { jsx as jsx99 } from "react/jsx-runtime";
12394
12479
  var handlerStyle4 = {
12395
12480
  display: "flex",
12396
12481
  zIndex: 10,
@@ -12477,7 +12562,7 @@ function DragHandle(props) {
12477
12562
  }
12478
12563
  return menu2;
12479
12564
  }, [hoveredNode, currentEditor]);
12480
- return /* @__PURE__ */ jsx98(
12565
+ return /* @__PURE__ */ jsx99(
12481
12566
  "div",
12482
12567
  {
12483
12568
  id: handlerKey,
@@ -12485,7 +12570,7 @@ function DragHandle(props) {
12485
12570
  ...listeners,
12486
12571
  ...attributes,
12487
12572
  style: handlerStyle4,
12488
- children: /* @__PURE__ */ jsx98(
12573
+ children: /* @__PURE__ */ jsx99(
12489
12574
  DropdownWrapper,
12490
12575
  {
12491
12576
  placement: "bottom-start",
@@ -12496,7 +12581,7 @@ function DragHandle(props) {
12496
12581
  onHideMenu: () => {
12497
12582
  removeVisiblePopup();
12498
12583
  },
12499
- children: /* @__PURE__ */ jsx98("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx98(Icon, { icon: GripVertical }) })
12584
+ children: /* @__PURE__ */ jsx99("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ jsx99(Icon, { icon: GripVertical }) })
12500
12585
  }
12501
12586
  )
12502
12587
  }
@@ -12530,7 +12615,7 @@ function findNodePosition(rows, point, lastFound) {
12530
12615
  }
12531
12616
 
12532
12617
  // src/content/node/NodeDragOverlay.tsx
12533
- import { jsx as jsx99 } from "react/jsx-runtime";
12618
+ import { jsx as jsx100 } from "react/jsx-runtime";
12534
12619
  var overlayStyle2 = {
12535
12620
  display: "flex",
12536
12621
  minWidth: "150px",
@@ -12549,12 +12634,12 @@ var overlayStyle2 = {
12549
12634
  boxShadow: "0 1px 3px rgba(34, 25, 25, 0.4)"
12550
12635
  };
12551
12636
  function NodeDragOverlay(props) {
12552
- return /* @__PURE__ */ jsx99("div", { style: overlayStyle2, children: props.children() });
12637
+ return /* @__PURE__ */ jsx100("div", { style: overlayStyle2, children: props.children() });
12553
12638
  }
12554
12639
 
12555
12640
  // src/content/node/NodeDropMarker.tsx
12556
- import { useEffect as useEffect64, useRef as useRef44 } from "react";
12557
- import { jsx as jsx100 } from "react/jsx-runtime";
12641
+ import { useEffect as useEffect65, useRef as useRef44 } from "react";
12642
+ import { jsx as jsx101 } from "react/jsx-runtime";
12558
12643
  var placeholderStyle3 = {
12559
12644
  position: "absolute",
12560
12645
  top: "calc(-1 * var(--sl-spacing-small) / 2)",
@@ -12573,7 +12658,7 @@ var lineStyle3 = {
12573
12658
  function NodeDropMarker(props) {
12574
12659
  const { visible, top } = props;
12575
12660
  const lineDivRef = useRef44(null);
12576
- useEffect64(() => {
12661
+ useEffect65(() => {
12577
12662
  if (visible && lineDivRef.current) {
12578
12663
  lineDivRef.current.style.transition = "none";
12579
12664
  lineDivRef.current.style.width = "0px";
@@ -12585,7 +12670,7 @@ function NodeDropMarker(props) {
12585
12670
  }, 5);
12586
12671
  }
12587
12672
  }, [visible, top]);
12588
- return /* @__PURE__ */ jsx100("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx100("div", { ref: lineDivRef, style: lineStyle3 }) });
12673
+ return /* @__PURE__ */ jsx101("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ jsx101("div", { ref: lineDivRef, style: lineStyle3 }) });
12589
12674
  }
12590
12675
 
12591
12676
  // src/content/node/NodeDraggableHandleSticky.tsx
@@ -12606,9 +12691,9 @@ import {
12606
12691
  forwardRef as forwardRef12,
12607
12692
  useImperativeHandle as useImperativeHandle11,
12608
12693
  useRef as useRef45,
12609
- useState as useState12
12694
+ useState as useState13
12610
12695
  } from "react";
12611
- import { Fragment as Fragment38, jsx as jsx101, jsxs as jsxs37 } from "react/jsx-runtime";
12696
+ import { Fragment as Fragment39, jsx as jsx102, jsxs as jsxs37 } from "react/jsx-runtime";
12612
12697
  var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12613
12698
  const {
12614
12699
  getRegisteredEditor,
@@ -12616,7 +12701,7 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12616
12701
  unsetHandleDragged
12617
12702
  } = useNode();
12618
12703
  const anchorElementRef = useRef45();
12619
- const [isAnchorElementReady, setAnchorElementReady] = useState12(false);
12704
+ const [isAnchorElementReady, setAnchorElementReady] = useState13(false);
12620
12705
  const nodeHandleSticky = useRef45(null);
12621
12706
  const dropMarkerSticky = useRef45(null);
12622
12707
  const nodePositionsRef = useRef45([]);
@@ -12682,7 +12767,7 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12682
12767
  isHandleVisible: () => !!nodeHandleSticky.current?.isVisible()
12683
12768
  }));
12684
12769
  if (!isAnchorElementReady || !anchorElementRef.current) {
12685
- return /* @__PURE__ */ jsx101(Fragment38, {});
12770
+ return /* @__PURE__ */ jsx102(Fragment39, {});
12686
12771
  }
12687
12772
  return /* @__PURE__ */ jsxs37(
12688
12773
  DndContext4,
@@ -12905,7 +12990,7 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12905
12990
  unsetHandleDragged();
12906
12991
  },
12907
12992
  children: [
12908
- /* @__PURE__ */ jsx101(
12993
+ /* @__PURE__ */ jsx102(
12909
12994
  StickyToPosition,
12910
12995
  {
12911
12996
  ref: nodeHandleSticky,
@@ -12923,21 +13008,21 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12923
13008
  gap: "6px"
12924
13009
  },
12925
13010
  children: [
12926
- /* @__PURE__ */ jsx101(AddMenuHandle, { hoveredNode: data.hoveredNode }),
12927
- /* @__PURE__ */ jsx101(DragHandle, { hoveredNode: data.hoveredNode })
13011
+ /* @__PURE__ */ jsx102(AddMenuHandle, { hoveredNode: data.hoveredNode }),
13012
+ /* @__PURE__ */ jsx102(DragHandle, { hoveredNode: data.hoveredNode })
12928
13013
  ]
12929
13014
  }
12930
13015
  );
12931
13016
  }
12932
13017
  }
12933
13018
  ),
12934
- /* @__PURE__ */ jsx101(
13019
+ /* @__PURE__ */ jsx102(
12935
13020
  StickyToPosition,
12936
13021
  {
12937
13022
  ref: dropMarkerSticky,
12938
13023
  container: anchorElementRef.current,
12939
13024
  children: (_data, position, isVisible) => {
12940
- return /* @__PURE__ */ jsx101(
13025
+ return /* @__PURE__ */ jsx102(
12941
13026
  NodeDropMarker,
12942
13027
  {
12943
13028
  top: `${position.top}px`,
@@ -12948,8 +13033,8 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12948
13033
  }
12949
13034
  }
12950
13035
  ),
12951
- /* @__PURE__ */ jsx101(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx101(NodeDragOverlay, { children: () => {
12952
- return /* @__PURE__ */ jsx101("div", { children: "Move Block" });
13036
+ /* @__PURE__ */ jsx102(DragOverlay3, { dropAnimation: null, children: /* @__PURE__ */ jsx102(NodeDragOverlay, { children: () => {
13037
+ return /* @__PURE__ */ jsx102("div", { children: "Move Block" });
12953
13038
  } }) })
12954
13039
  ]
12955
13040
  }
@@ -12957,7 +13042,7 @@ var NodeDraggableHandleSticky = forwardRef12((props, ref) => {
12957
13042
  });
12958
13043
 
12959
13044
  // src/content/node/NodeProvider.tsx
12960
- import { jsx as jsx102, jsxs as jsxs38 } from "react/jsx-runtime";
13045
+ import { jsx as jsx103, jsxs as jsxs38 } from "react/jsx-runtime";
12961
13046
  var NodeProviderContext = React18.createContext(null);
12962
13047
  function NodeProvider(props) {
12963
13048
  const { children } = props;
@@ -13028,7 +13113,7 @@ function NodeProvider(props) {
13028
13113
  const getHandleOverNodeKey = () => {
13029
13114
  return handleOverNodeKeyRef.current;
13030
13115
  };
13031
- useEffect65(() => {
13116
+ useEffect66(() => {
13032
13117
  return () => {
13033
13118
  const editorsKeys = Object.keys(editorsRegisterRef.current);
13034
13119
  for (const editorKey of editorsKeys) {
@@ -13059,7 +13144,7 @@ function NodeProvider(props) {
13059
13144
  },
13060
13145
  children: [
13061
13146
  children,
13062
- /* @__PURE__ */ jsx102(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
13147
+ /* @__PURE__ */ jsx103(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
13063
13148
  ]
13064
13149
  }
13065
13150
  );
@@ -13073,23 +13158,23 @@ var useNode = () => {
13073
13158
  };
13074
13159
 
13075
13160
  // src/plugins/AutoBottomParagraphPlugin/AutoBottomParagraphPlugin.tsx
13076
- import { useLexicalComposerContext as useLexicalComposerContext54 } from "@lexical/react/LexicalComposerContext";
13161
+ import { useLexicalComposerContext as useLexicalComposerContext55 } from "@lexical/react/LexicalComposerContext";
13077
13162
  import { TableNode as TableNode5 } from "@lexical/table";
13078
13163
  import { mergeRegister as mergeRegister20 } from "@lexical/utils";
13079
13164
  import {
13080
13165
  $createParagraphNode as $createParagraphNode17,
13081
- $getRoot as $getRoot15,
13166
+ $getRoot as $getRoot16,
13082
13167
  $isParagraphNode as $isParagraphNode2
13083
13168
  } from "lexical";
13084
- import { useEffect as useEffect66 } from "react";
13085
- import { Fragment as Fragment39, jsx as jsx103 } from "react/jsx-runtime";
13169
+ import { useEffect as useEffect67 } from "react";
13170
+ import { Fragment as Fragment40, jsx as jsx104 } from "react/jsx-runtime";
13086
13171
  function AutoBottomParagraphPlugin() {
13087
- const [editor] = useLexicalComposerContext54();
13172
+ const [editor] = useLexicalComposerContext55();
13088
13173
  const listener = (nodeMutations) => {
13089
13174
  for (const [_key, mutation] of nodeMutations) {
13090
13175
  if (mutation === "created") {
13091
13176
  editor.update(() => {
13092
- const rootNode = $getRoot15();
13177
+ const rootNode = $getRoot16();
13093
13178
  if (rootNode) {
13094
13179
  const lastChild = rootNode.getLastChild();
13095
13180
  if (lastChild && !$isParagraphNode2(lastChild)) {
@@ -13101,10 +13186,10 @@ function AutoBottomParagraphPlugin() {
13101
13186
  }
13102
13187
  }
13103
13188
  };
13104
- useEffect66(() => {
13189
+ useEffect67(() => {
13105
13190
  return mergeRegister20(
13106
13191
  ...[
13107
- ImageNode,
13192
+ ImageNode2,
13108
13193
  ImagePlaceholderNode,
13109
13194
  CalloutBoxNode,
13110
13195
  TableNode5,
@@ -13124,19 +13209,19 @@ function AutoBottomParagraphPlugin() {
13124
13209
  )
13125
13210
  );
13126
13211
  }, [editor]);
13127
- return /* @__PURE__ */ jsx103(Fragment39, {});
13212
+ return /* @__PURE__ */ jsx104(Fragment40, {});
13128
13213
  }
13129
13214
 
13130
13215
  // src/plugins/AutoFocusPlugin/AutoFocusPlugin.tsx
13131
- import { useLexicalComposerContext as useLexicalComposerContext55 } from "@lexical/react/LexicalComposerContext";
13132
- import { $getRoot as $getRoot16 } from "lexical";
13133
- import { useEffect as useEffect67 } from "react";
13216
+ import { useLexicalComposerContext as useLexicalComposerContext56 } from "@lexical/react/LexicalComposerContext";
13217
+ import { $getRoot as $getRoot17 } from "lexical";
13218
+ import { useEffect as useEffect68 } from "react";
13134
13219
  function AutoFocusPlugin() {
13135
- const [editor] = useLexicalComposerContext55();
13136
- useEffect67(() => {
13220
+ const [editor] = useLexicalComposerContext56();
13221
+ useEffect68(() => {
13137
13222
  setTimeout(() => {
13138
13223
  editor.update(() => {
13139
- const rootNode = $getRoot16();
13224
+ const rootNode = $getRoot17();
13140
13225
  if (rootNode.getChildrenKeys().length >= 1) {
13141
13226
  rootNode.getFirstChild()?.selectStart();
13142
13227
  }
@@ -13150,24 +13235,24 @@ function AutoFocusPlugin() {
13150
13235
  }
13151
13236
 
13152
13237
  // src/plugins/EditorRefPlugin/EditorRefPlugin.tsx
13153
- import { useLexicalComposerContext as useLexicalComposerContext56 } from "@lexical/react/LexicalComposerContext";
13154
- import { useEffect as useEffect68 } from "react";
13238
+ import { useLexicalComposerContext as useLexicalComposerContext57 } from "@lexical/react/LexicalComposerContext";
13239
+ import { useEffect as useEffect69 } from "react";
13155
13240
  function EditorRefPlugin(props) {
13156
- const [editor] = useLexicalComposerContext56();
13241
+ const [editor] = useLexicalComposerContext57();
13157
13242
  const { onMountRef } = props;
13158
- useEffect68(() => {
13243
+ useEffect69(() => {
13159
13244
  onMountRef(editor);
13160
13245
  }, [editor]);
13161
13246
  return null;
13162
13247
  }
13163
13248
 
13164
13249
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
13165
- import { useEffect as useEffect69 } from "react";
13166
- import { useLexicalComposerContext as useLexicalComposerContext57 } from "@lexical/react/LexicalComposerContext";
13250
+ import { useEffect as useEffect70 } from "react";
13251
+ import { useLexicalComposerContext as useLexicalComposerContext58 } from "@lexical/react/LexicalComposerContext";
13167
13252
 
13168
13253
  // src/plugins/MarkdownPlugin/markdown/MarkdownExport.ts
13169
13254
  import {
13170
- $getRoot as $getRoot17,
13255
+ $getRoot as $getRoot18,
13171
13256
  $isDecoratorNode,
13172
13257
  $isElementNode as $isElementNode3,
13173
13258
  $isLineBreakNode as $isLineBreakNode2,
@@ -13429,7 +13514,7 @@ import {
13429
13514
  $createLineBreakNode as $createLineBreakNode2,
13430
13515
  $createParagraphNode as $createParagraphNode18,
13431
13516
  $createTextNode as $createTextNode5,
13432
- $getRoot as $getRoot18,
13517
+ $getRoot as $getRoot19,
13433
13518
  $getSelection as $getSelection8,
13434
13519
  $isParagraphNode as $isParagraphNode4
13435
13520
  } from "lexical";
@@ -14035,19 +14120,19 @@ var TRANSFORMERS = [
14035
14120
 
14036
14121
  // src/plugins/MarkdownPlugin/MarkdownPlugin.tsx
14037
14122
  function MarkdownPlugin() {
14038
- const [editor] = useLexicalComposerContext57();
14039
- useEffect69(() => {
14123
+ const [editor] = useLexicalComposerContext58();
14124
+ useEffect70(() => {
14040
14125
  return registerMarkdownShortcuts(editor, TRANSFORMERS);
14041
14126
  }, [editor]);
14042
14127
  return null;
14043
14128
  }
14044
14129
 
14045
14130
  // src/plugins/NodeMousePlugin/NodeMouseAnchorPlugin.tsx
14046
- import { useLexicalComposerContext as useLexicalComposerContext58 } from "@lexical/react/LexicalComposerContext";
14047
- import { useEffect as useEffect70, useRef as useRef47 } from "react";
14048
- import { Fragment as Fragment40, jsx as jsx104 } from "react/jsx-runtime";
14131
+ import { useLexicalComposerContext as useLexicalComposerContext59 } from "@lexical/react/LexicalComposerContext";
14132
+ import { useEffect as useEffect71, useRef as useRef47 } from "react";
14133
+ import { Fragment as Fragment41, jsx as jsx105 } from "react/jsx-runtime";
14049
14134
  function NodeMouseAnchorPlugin() {
14050
- const [editor] = useLexicalComposerContext58();
14135
+ const [editor] = useLexicalComposerContext59();
14051
14136
  const { setAnchorElement, hideHandles } = useNode();
14052
14137
  const parentWeakRef = useRef47();
14053
14138
  const handleMouseLeave = (event) => {
@@ -14062,7 +14147,7 @@ function NodeMouseAnchorPlugin() {
14062
14147
  }
14063
14148
  hideHandles();
14064
14149
  };
14065
- useEffect70(() => {
14150
+ useEffect71(() => {
14066
14151
  const removeRootListener = editor.registerRootListener(
14067
14152
  (nextRootElem) => {
14068
14153
  if (nextRootElem?.parentElement) {
@@ -14095,7 +14180,7 @@ function NodeMouseAnchorPlugin() {
14095
14180
  removeRootListener();
14096
14181
  };
14097
14182
  }, [editor]);
14098
- return /* @__PURE__ */ jsx104(Fragment40, {});
14183
+ return /* @__PURE__ */ jsx105(Fragment41, {});
14099
14184
  }
14100
14185
 
14101
14186
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
@@ -14104,7 +14189,7 @@ import {
14104
14189
  $isListNode as $isListNode8,
14105
14190
  ListNode as ListNode5
14106
14191
  } from "@lexical/list";
14107
- import { useLexicalComposerContext as useLexicalComposerContext59 } from "@lexical/react/LexicalComposerContext";
14192
+ import { useLexicalComposerContext as useLexicalComposerContext60 } from "@lexical/react/LexicalComposerContext";
14108
14193
  import { HorizontalRuleNode as HorizontalRuleNode3 } from "@lexical/react/LexicalHorizontalRuleNode";
14109
14194
  import { HeadingNode as HeadingNode5 } from "@lexical/rich-text";
14110
14195
  import { $isTableCellNode, TableNode as TableNode6 } from "@lexical/table";
@@ -14113,13 +14198,13 @@ import {
14113
14198
  $createParagraphNode as $createParagraphNode19,
14114
14199
  $createTextNode as $createTextNode7,
14115
14200
  $getNodeByKey as $getNodeByKey51,
14116
- $getRoot as $getRoot19,
14201
+ $getRoot as $getRoot20,
14117
14202
  $isParagraphNode as $isParagraphNode5,
14118
14203
  ParagraphNode as ParagraphNode4
14119
14204
  } from "lexical";
14120
- import debounce4 from "lodash-es/debounce";
14205
+ import debounce5 from "lodash-es/debounce";
14121
14206
  import uniqueId2 from "lodash-es/uniqueId";
14122
- import { useEffect as useEffect71, useRef as useRef48 } from "react";
14207
+ import { useEffect as useEffect72, useRef as useRef48 } from "react";
14123
14208
 
14124
14209
  // src/plugins/NodeMousePlugin/nodeUtils.ts
14125
14210
  function getNodePosition2(element, parent) {
@@ -14135,9 +14220,9 @@ function getNodePosition2(element, parent) {
14135
14220
  }
14136
14221
 
14137
14222
  // src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
14138
- import { Fragment as Fragment41, jsx as jsx105 } from "react/jsx-runtime";
14223
+ import { Fragment as Fragment42, jsx as jsx106 } from "react/jsx-runtime";
14139
14224
  function NodeMousePlugin() {
14140
- const [editor] = useLexicalComposerContext59();
14225
+ const [editor] = useLexicalComposerContext60();
14141
14226
  const editorUniqueIdRef = useRef48(uniqueId2("editor"));
14142
14227
  const elementsMapRef = useRef48(
14143
14228
  {}
@@ -14337,7 +14422,7 @@ function NodeMousePlugin() {
14337
14422
  }
14338
14423
  }
14339
14424
  }
14340
- const refreshHelpersPositions = debounce4(() => {
14425
+ const refreshHelpersPositions = debounce5(() => {
14341
14426
  const anchorElement = getAnchorElement();
14342
14427
  if (anchorElement) {
14343
14428
  const nodePositions = {};
@@ -14411,7 +14496,7 @@ function NodeMousePlugin() {
14411
14496
  }
14412
14497
  let childrenCount = 0;
14413
14498
  editor.getEditorState().read(() => {
14414
- const rootNode = $getRoot19();
14499
+ const rootNode = $getRoot20();
14415
14500
  if (rootNode) {
14416
14501
  const childrenKeys = rootNode.getChildrenKeys();
14417
14502
  childrenCount = childrenKeys.length;
@@ -14419,7 +14504,7 @@ function NodeMousePlugin() {
14419
14504
  });
14420
14505
  if (childrenCount === 0) {
14421
14506
  editor.update(() => {
14422
- const rootNode = $getRoot19();
14507
+ const rootNode = $getRoot20();
14423
14508
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14424
14509
  const newParagraph = $createParagraphNode19();
14425
14510
  newParagraph.append($createTextNode7());
@@ -14429,7 +14514,7 @@ function NodeMousePlugin() {
14429
14514
  }
14430
14515
  refreshHelpersPositions();
14431
14516
  };
14432
- useEffect71(() => {
14517
+ useEffect72(() => {
14433
14518
  window.addEventListener(
14434
14519
  RESIZE_CONTENT_EVENT,
14435
14520
  refreshHelpersPositions
@@ -14441,13 +14526,13 @@ function NodeMousePlugin() {
14441
14526
  );
14442
14527
  };
14443
14528
  }, []);
14444
- useEffect71(() => {
14529
+ useEffect72(() => {
14445
14530
  registerEditor(editorUniqueIdRef.current, editor);
14446
14531
  const removeRegistration = mergeRegister21(
14447
14532
  ...[
14448
14533
  HeadingNode5,
14449
14534
  HorizontalRuleNode3,
14450
- ImageNode,
14535
+ ImageNode2,
14451
14536
  ImagePlaceholderNode,
14452
14537
  ListNode5,
14453
14538
  ParagraphNode4,
@@ -14477,7 +14562,7 @@ function NodeMousePlugin() {
14477
14562
  if (nextRootElem) {
14478
14563
  let childrenCount = 0;
14479
14564
  editor.getEditorState().read(() => {
14480
- const rootNode = $getRoot19();
14565
+ const rootNode = $getRoot20();
14481
14566
  if (rootNode) {
14482
14567
  const childrenKeys = rootNode.getChildrenKeys();
14483
14568
  childrenCount = childrenKeys.length;
@@ -14489,7 +14574,7 @@ function NodeMousePlugin() {
14489
14574
  });
14490
14575
  if (childrenCount === 0) {
14491
14576
  editor.update(() => {
14492
- const rootNode = $getRoot19();
14577
+ const rootNode = $getRoot20();
14493
14578
  if (rootNode && rootNode.getChildrenSize() <= 0) {
14494
14579
  const newParagraph = $createParagraphNode19();
14495
14580
  newParagraph.append($createTextNode7());
@@ -14505,11 +14590,11 @@ function NodeMousePlugin() {
14505
14590
  removeRegistration();
14506
14591
  };
14507
14592
  }, [editor]);
14508
- return /* @__PURE__ */ jsx105(Fragment41, {});
14593
+ return /* @__PURE__ */ jsx106(Fragment42, {});
14509
14594
  }
14510
14595
 
14511
14596
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
14512
- import { useLexicalComposerContext as useLexicalComposerContext60 } from "@lexical/react/LexicalComposerContext";
14597
+ import { useLexicalComposerContext as useLexicalComposerContext61 } from "@lexical/react/LexicalComposerContext";
14513
14598
  import { DRAG_DROP_PASTE } from "@lexical/rich-text";
14514
14599
  import { mergeRegister as mergeRegister22 } from "@lexical/utils";
14515
14600
  import {
@@ -14519,7 +14604,7 @@ import {
14519
14604
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW13,
14520
14605
  PASTE_COMMAND
14521
14606
  } from "lexical";
14522
- import { useEffect as useEffect72 } from "react";
14607
+ import { useEffect as useEffect73 } from "react";
14523
14608
 
14524
14609
  // src/plugins/NodePastePlugin/regenerateIdsInQuestion.ts
14525
14610
  import { nanoid as nanoid10 } from "nanoid";
@@ -14566,10 +14651,10 @@ function regenerateIdsInQuestion(serializedNode) {
14566
14651
  }
14567
14652
 
14568
14653
  // src/plugins/NodePastePlugin/NodePastePlugin.tsx
14569
- import { Fragment as Fragment42, jsx as jsx106 } from "react/jsx-runtime";
14654
+ import { Fragment as Fragment43, jsx as jsx107 } from "react/jsx-runtime";
14570
14655
  function NodePastePlugin() {
14571
- const [editor] = useLexicalComposerContext60();
14572
- useEffect72(() => {
14656
+ const [editor] = useLexicalComposerContext61();
14657
+ useEffect73(() => {
14573
14658
  return mergeRegister22(
14574
14659
  editor.registerCommand(
14575
14660
  PASTE_COMMAND,
@@ -14648,19 +14733,19 @@ function NodePastePlugin() {
14648
14733
  )
14649
14734
  );
14650
14735
  }, [editor]);
14651
- return /* @__PURE__ */ jsx106(Fragment42, {});
14736
+ return /* @__PURE__ */ jsx107(Fragment43, {});
14652
14737
  }
14653
14738
 
14654
14739
  // src/components/inputs/PopupToolbar.tsx
14655
14740
  import clsx5 from "clsx";
14656
14741
  import {
14657
14742
  forwardRef as forwardRef13,
14658
- useEffect as useEffect73,
14743
+ useEffect as useEffect74,
14659
14744
  useImperativeHandle as useImperativeHandle12,
14660
14745
  useMemo as useMemo10,
14661
14746
  useRef as useRef49
14662
14747
  } from "react";
14663
- import { Fragment as Fragment43, jsx as jsx107, jsxs as jsxs39 } from "react/jsx-runtime";
14748
+ import { Fragment as Fragment44, jsx as jsx108, jsxs as jsxs39 } from "react/jsx-runtime";
14664
14749
  var PopupToolbar = forwardRef13((props, ref) => {
14665
14750
  const { onEscape, menu, toolbar } = props;
14666
14751
  const popupRef = useRef49(null);
@@ -14693,7 +14778,7 @@ var PopupToolbar = forwardRef13((props, ref) => {
14693
14778
  menuItemAttributes.checked = menuItemSelected;
14694
14779
  menuItemAttributes.type = "checkbox";
14695
14780
  }
14696
- let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx107(
14781
+ let buttonElement = menuItem.subMenu ? /* @__PURE__ */ jsx108(
14697
14782
  DropdownButton,
14698
14783
  {
14699
14784
  size: "medium",
@@ -14718,15 +14803,15 @@ var PopupToolbar = forwardRef13((props, ref) => {
14718
14803
  }
14719
14804
  },
14720
14805
  children: [
14721
- MenuItemIcon && /* @__PURE__ */ jsx107(Icon, { slot: "prefix", icon: MenuItemIcon }),
14806
+ MenuItemIcon && /* @__PURE__ */ jsx108(Icon, { slot: "prefix", icon: MenuItemIcon }),
14722
14807
  menuItemLabel,
14723
- menuItemIsError && /* @__PURE__ */ jsx107(DotBadge, { variant: "danger" })
14808
+ menuItemIsError && /* @__PURE__ */ jsx108(DotBadge, { variant: "danger" })
14724
14809
  ]
14725
14810
  },
14726
14811
  `menuItem${menuItemId}`
14727
14812
  );
14728
14813
  if (tooltip && !menuItem.subMenu) {
14729
- buttonElement = /* @__PURE__ */ jsx107(
14814
+ buttonElement = /* @__PURE__ */ jsx108(
14730
14815
  "sl-tooltip",
14731
14816
  {
14732
14817
  content: tooltip,
@@ -14777,7 +14862,7 @@ var PopupToolbar = forwardRef13((props, ref) => {
14777
14862
  onEscape();
14778
14863
  }
14779
14864
  }
14780
- useEffect73(() => {
14865
+ useEffect74(() => {
14781
14866
  if (onEscape) {
14782
14867
  toolbarRef.current?.addEventListener("keydown", handleKeyDown);
14783
14868
  return () => {
@@ -14788,7 +14873,7 @@ var PopupToolbar = forwardRef13((props, ref) => {
14788
14873
  };
14789
14874
  }
14790
14875
  }, [onEscape]);
14791
- return /* @__PURE__ */ jsx107(Fragment43, { children: /* @__PURE__ */ jsx107(
14876
+ return /* @__PURE__ */ jsx108(Fragment44, { children: /* @__PURE__ */ jsx108(
14792
14877
  "sl-popup",
14793
14878
  {
14794
14879
  ref: popupRef,
@@ -14796,7 +14881,7 @@ var PopupToolbar = forwardRef13((props, ref) => {
14796
14881
  shift: true,
14797
14882
  "auto-size": "horizontal",
14798
14883
  strategy: "fixed",
14799
- children: toolbar || /* @__PURE__ */ jsx107("sl-button-group", { ref: toolbarRef, children: menuItems })
14884
+ children: toolbar || /* @__PURE__ */ jsx108("sl-button-group", { ref: toolbarRef, children: menuItems })
14800
14885
  }
14801
14886
  ) });
14802
14887
  });
@@ -14848,16 +14933,16 @@ var bgColorList = [
14848
14933
  ];
14849
14934
 
14850
14935
  // src/components/feedback/ProgressBar.tsx
14851
- import { jsx as jsx108 } from "react/jsx-runtime";
14936
+ import { jsx as jsx109 } from "react/jsx-runtime";
14852
14937
  function ProgressBar() {
14853
- return /* @__PURE__ */ jsx108("sl-progress-bar", { indeterminate: "indeterminate" });
14938
+ return /* @__PURE__ */ jsx109("sl-progress-bar", { indeterminate: "indeterminate" });
14854
14939
  }
14855
14940
 
14856
14941
  // src/components/layouts/Stack.tsx
14857
- import { jsx as jsx109 } from "react/jsx-runtime";
14942
+ import { jsx as jsx110 } from "react/jsx-runtime";
14858
14943
  function Stack(props) {
14859
14944
  const { id, style, className, slot, children } = props;
14860
- return /* @__PURE__ */ jsx109(
14945
+ return /* @__PURE__ */ jsx110(
14861
14946
  "div",
14862
14947
  {
14863
14948
  id,
@@ -14872,11 +14957,11 @@ function Stack(props) {
14872
14957
  // src/components/dialogs/FormDialog.tsx
14873
14958
  import {
14874
14959
  forwardRef as forwardRef14,
14875
- useEffect as useEffect74,
14960
+ useEffect as useEffect75,
14876
14961
  useImperativeHandle as useImperativeHandle13,
14877
14962
  useRef as useRef50
14878
14963
  } from "react";
14879
- import { jsx as jsx110, jsxs as jsxs40 } from "react/jsx-runtime";
14964
+ import { jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
14880
14965
  var FormDialog = forwardRef14((props, ref) => {
14881
14966
  const {
14882
14967
  id,
@@ -14940,7 +15025,7 @@ var FormDialog = forwardRef14((props, ref) => {
14940
15025
  onHide();
14941
15026
  }
14942
15027
  };
14943
- useEffect74(() => {
15028
+ useEffect75(() => {
14944
15029
  window.customElements.whenDefined("sl-dialog").then(() => {
14945
15030
  if (dialogRef.current) {
14946
15031
  dialogRef.current.addEventListener(
@@ -14974,7 +15059,7 @@ var FormDialog = forwardRef14((props, ref) => {
14974
15059
  }
14975
15060
  };
14976
15061
  }, [onCancel]);
14977
- useEffect74(() => {
15062
+ useEffect75(() => {
14978
15063
  window.addEventListener(
14979
15064
  FORM_DIALOG_OPEN_EVENT,
14980
15065
  handleOpenByEvent
@@ -15004,13 +15089,13 @@ var FormDialog = forwardRef14((props, ref) => {
15004
15089
  }
15005
15090
  };
15006
15091
  });
15007
- return /* @__PURE__ */ jsx110("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs40(
15092
+ return /* @__PURE__ */ jsx111("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs40(
15008
15093
  "sl-dialog",
15009
15094
  {
15010
15095
  class: `dialog_control ${className}`,
15011
15096
  ref: dialogRef,
15012
15097
  children: [
15013
- /* @__PURE__ */ jsx110("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs40(
15098
+ /* @__PURE__ */ jsx111("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ jsxs40(
15014
15099
  Stack,
15015
15100
  {
15016
15101
  className: "stack__gap-3 stack__row",
@@ -15021,13 +15106,13 @@ var FormDialog = forwardRef14((props, ref) => {
15021
15106
  },
15022
15107
  children: [
15023
15108
  headerControls,
15024
- /* @__PURE__ */ jsx110("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx110("span", { className: "font-medium font-w-semibold", children: title }) })
15109
+ /* @__PURE__ */ jsx111("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ jsx111("span", { className: "font-medium font-w-semibold", children: title }) })
15025
15110
  ]
15026
15111
  }
15027
- ) : /* @__PURE__ */ jsx110("span", { className: "font-medium font-w-semibold", children: title }) }),
15028
- loading && /* @__PURE__ */ jsx110(ProgressBar, {}),
15029
- /* @__PURE__ */ jsx110("input", { type: "hidden", name: "formDialogId", value: id }),
15030
- /* @__PURE__ */ jsx110("input", { type: "hidden", name: "action", value: actionName }),
15112
+ ) : /* @__PURE__ */ jsx111("span", { className: "font-medium font-w-semibold", children: title }) }),
15113
+ loading && /* @__PURE__ */ jsx111(ProgressBar, {}),
15114
+ /* @__PURE__ */ jsx111("input", { type: "hidden", name: "formDialogId", value: id }),
15115
+ /* @__PURE__ */ jsx111("input", { type: "hidden", name: "action", value: actionName }),
15031
15116
  children,
15032
15117
  /* @__PURE__ */ jsxs40(
15033
15118
  Stack,
@@ -15036,14 +15121,14 @@ var FormDialog = forwardRef14((props, ref) => {
15036
15121
  className: "stack__row stack__gap-4",
15037
15122
  style: { width: "100%", flexWrap: "nowrap" },
15038
15123
  children: [
15039
- extraControl && /* @__PURE__ */ jsx110("div", { style: { flexGrow: 0 }, children: extraControl }),
15124
+ extraControl && /* @__PURE__ */ jsx111("div", { style: { flexGrow: 0 }, children: extraControl }),
15040
15125
  /* @__PURE__ */ jsxs40(
15041
15126
  Stack,
15042
15127
  {
15043
15128
  className: "stack__row stack__gap-4",
15044
15129
  style: { flexGrow: 1, justifyContent: "end" },
15045
15130
  children: [
15046
- /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
15131
+ /* @__PURE__ */ jsx111("div", { children: /* @__PURE__ */ jsx111(
15047
15132
  Button,
15048
15133
  {
15049
15134
  slot: "footer",
@@ -15055,7 +15140,7 @@ var FormDialog = forwardRef14((props, ref) => {
15055
15140
  onClick: handleCancel
15056
15141
  }
15057
15142
  ) }),
15058
- /* @__PURE__ */ jsx110("div", { children: /* @__PURE__ */ jsx110(
15143
+ /* @__PURE__ */ jsx111("div", { children: /* @__PURE__ */ jsx111(
15059
15144
  Button,
15060
15145
  {
15061
15146
  slot: "footer",
@@ -15083,22 +15168,22 @@ var FORM_DIALOG_CLOSE_EVENT = "FORM_DIALOG_CLOSE_EVENT";
15083
15168
 
15084
15169
  // src/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx
15085
15170
  import { $isLinkNode as $isLinkNode2, $toggleLink } from "@lexical/link";
15086
- import { useLexicalComposerContext as useLexicalComposerContext61 } from "@lexical/react/LexicalComposerContext";
15171
+ import { useLexicalComposerContext as useLexicalComposerContext62 } from "@lexical/react/LexicalComposerContext";
15087
15172
  import { mergeRegister as mergeRegister23 } from "@lexical/utils";
15088
15173
  import {
15089
15174
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR14,
15090
15175
  createCommand as createCommand18
15091
15176
  } from "lexical";
15092
- import { useEffect as useEffect75, useRef as useRef51, useState as useState13 } from "react";
15093
- import { jsx as jsx111, jsxs as jsxs41 } from "react/jsx-runtime";
15177
+ import { useEffect as useEffect76, useRef as useRef51, useState as useState14 } from "react";
15178
+ import { jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
15094
15179
  var SHOW_LINK_EDITOR_COMMAND = createCommand18("SHOW_LINK_EDITOR_COMMAND");
15095
15180
  function LinkEditorPlugin() {
15096
- const [editor] = useLexicalComposerContext61();
15181
+ const [editor] = useLexicalComposerContext62();
15097
15182
  const formDialogRef = useRef51(null);
15098
15183
  const linkUrlInputRef = useRef51(null);
15099
- const [openInNew, setOpenInNew] = useState13(false);
15184
+ const [openInNew, setOpenInNew] = useState14(false);
15100
15185
  const activeEditorRef = useRef51();
15101
- useEffect75(() => {
15186
+ useEffect76(() => {
15102
15187
  return mergeRegister23(
15103
15188
  editor.registerCommand(
15104
15189
  SHOW_LINK_EDITOR_COMMAND,
@@ -15123,7 +15208,7 @@ function LinkEditorPlugin() {
15123
15208
  )
15124
15209
  );
15125
15210
  }, [editor]);
15126
- return /* @__PURE__ */ jsx111(
15211
+ return /* @__PURE__ */ jsx112(
15127
15212
  FormDialog,
15128
15213
  {
15129
15214
  ref: formDialogRef,
@@ -15160,8 +15245,8 @@ function LinkEditorPlugin() {
15160
15245
  onCancel: () => {
15161
15246
  formDialogRef.current?.close();
15162
15247
  },
15163
- children: /* @__PURE__ */ jsx111("div", { style: { width: "450px" }, children: /* @__PURE__ */ jsxs41(Stack, { className: "stack__column stack__gap-4", children: [
15164
- /* @__PURE__ */ jsx111("div", { children: /* @__PURE__ */ jsx111(
15248
+ children: /* @__PURE__ */ jsx112("div", { style: { width: "450px" }, children: /* @__PURE__ */ jsxs41(Stack, { className: "stack__column stack__gap-4", children: [
15249
+ /* @__PURE__ */ jsx112("div", { children: /* @__PURE__ */ jsx112(
15165
15250
  TextInput,
15166
15251
  {
15167
15252
  ref: linkUrlInputRef,
@@ -15171,7 +15256,7 @@ function LinkEditorPlugin() {
15171
15256
  defaultValue: ""
15172
15257
  }
15173
15258
  ) }),
15174
- /* @__PURE__ */ jsx111("div", { children: /* @__PURE__ */ jsx111(
15259
+ /* @__PURE__ */ jsx112("div", { children: /* @__PURE__ */ jsx112(
15175
15260
  Checkbox,
15176
15261
  {
15177
15262
  size: "small",
@@ -15193,13 +15278,13 @@ import {
15193
15278
  forwardRef as forwardRef15,
15194
15279
  useImperativeHandle as useImperativeHandle14,
15195
15280
  useRef as useRef52,
15196
- useState as useState14
15281
+ useState as useState15
15197
15282
  } from "react";
15198
- import { jsx as jsx112 } from "react/jsx-runtime";
15283
+ import { jsx as jsx113 } from "react/jsx-runtime";
15199
15284
  var PopupHighlighter = forwardRef15((props, ref) => {
15200
15285
  const { highlighterClassName } = props;
15201
15286
  const popupRef = useRef52(null);
15202
- const [popupRect, setPopupRect] = useState14();
15287
+ const [popupRect, setPopupRect] = useState15();
15203
15288
  function hidePopup() {
15204
15289
  if (popupRef.current) {
15205
15290
  popupRef.current.active = false;
@@ -15230,7 +15315,7 @@ var PopupHighlighter = forwardRef15((props, ref) => {
15230
15315
  }
15231
15316
  }
15232
15317
  }));
15233
- return /* @__PURE__ */ jsx112("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx112("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx112(
15318
+ return /* @__PURE__ */ jsx113("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ jsx113("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ jsx113(
15234
15319
  "div",
15235
15320
  {
15236
15321
  className: highlighterClassName,
@@ -15239,7 +15324,7 @@ var PopupHighlighter = forwardRef15((props, ref) => {
15239
15324
  "--variable-placeholder-height": `${popupRect?.height || 0}px`
15240
15325
  }
15241
15326
  }
15242
- ) : /* @__PURE__ */ jsx112(
15327
+ ) : /* @__PURE__ */ jsx113(
15243
15328
  "div",
15244
15329
  {
15245
15330
  style: {
@@ -15259,14 +15344,14 @@ var PopupHighlighter = forwardRef15((props, ref) => {
15259
15344
  // src/components/inputs/PopupMenu.tsx
15260
15345
  import {
15261
15346
  forwardRef as forwardRef16,
15262
- useEffect as useEffect76,
15347
+ useEffect as useEffect77,
15263
15348
  useImperativeHandle as useImperativeHandle15,
15264
15349
  useLayoutEffect,
15265
15350
  useMemo as useMemo11,
15266
15351
  useRef as useRef53,
15267
- useState as useState15
15352
+ useState as useState16
15268
15353
  } from "react";
15269
- import { Fragment as Fragment44, jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
15354
+ import { Fragment as Fragment45, jsx as jsx114, jsxs as jsxs42 } from "react/jsx-runtime";
15270
15355
  var PopupMenu = forwardRef16(
15271
15356
  (props, ref) => {
15272
15357
  const {
@@ -15277,7 +15362,7 @@ var PopupMenu = forwardRef16(
15277
15362
  } = props;
15278
15363
  const popupRef = useRef53(null);
15279
15364
  const menuRef = useRef53(null);
15280
- const [itemsFilter, setItemsFilter] = useState15();
15365
+ const [itemsFilter, setItemsFilter] = useState16();
15281
15366
  function hidePopup() {
15282
15367
  if (popupRef.current) {
15283
15368
  popupRef.current.active = false;
@@ -15346,11 +15431,11 @@ var PopupMenu = forwardRef16(
15346
15431
  } = menuItem;
15347
15432
  if (menuItemDivider) {
15348
15433
  resultList.push(
15349
- /* @__PURE__ */ jsx113("sl-divider", {}, `menuItem${menuItemId}`)
15434
+ /* @__PURE__ */ jsx114("sl-divider", {}, `menuItem${menuItemId}`)
15350
15435
  );
15351
15436
  } else if (menuItemIsGroup) {
15352
15437
  resultList.push(
15353
- /* @__PURE__ */ jsx113("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15438
+ /* @__PURE__ */ jsx114("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
15354
15439
  );
15355
15440
  } else {
15356
15441
  const menuItemAttributes = {};
@@ -15369,9 +15454,9 @@ var PopupMenu = forwardRef16(
15369
15454
  class: menuItemClassName,
15370
15455
  ...menuItemAttributes,
15371
15456
  children: [
15372
- MenuItemIcon && /* @__PURE__ */ jsx113(Icon, { slot: "prefix", icon: MenuItemIcon }),
15457
+ MenuItemIcon && /* @__PURE__ */ jsx114(Icon, { slot: "prefix", icon: MenuItemIcon }),
15373
15458
  menuItemLabel,
15374
- menuItemIsError && /* @__PURE__ */ jsx113(DotBadge, { variant: "danger" })
15459
+ menuItemIsError && /* @__PURE__ */ jsx114(DotBadge, { variant: "danger" })
15375
15460
  ]
15376
15461
  },
15377
15462
  `menuItem${menuItemId}`
@@ -15394,7 +15479,7 @@ var PopupMenu = forwardRef16(
15394
15479
  }
15395
15480
  if (constMenu.length > 0) {
15396
15481
  if (resultList.length > 0) {
15397
- resultList.push(/* @__PURE__ */ jsx113("sl-divider", {}, "const-menu-divider"));
15482
+ resultList.push(/* @__PURE__ */ jsx114("sl-divider", {}, "const-menu-divider"));
15398
15483
  }
15399
15484
  resultList = resultList.concat(createMenuList(constMenu));
15400
15485
  }
@@ -15506,7 +15591,7 @@ var PopupMenu = forwardRef16(
15506
15591
  onEscape();
15507
15592
  }
15508
15593
  }
15509
- useEffect76(() => {
15594
+ useEffect77(() => {
15510
15595
  if (onEscape) {
15511
15596
  popupRef.current?.addEventListener("keydown", handleKeyDown);
15512
15597
  menuRef.current?.addEventListener("keydown", handleKeyDown);
@@ -15522,7 +15607,7 @@ var PopupMenu = forwardRef16(
15522
15607
  };
15523
15608
  }
15524
15609
  }, [onEscape]);
15525
- return /* @__PURE__ */ jsx113(Fragment44, { children: /* @__PURE__ */ jsx113(
15610
+ return /* @__PURE__ */ jsx114(Fragment45, { children: /* @__PURE__ */ jsx114(
15526
15611
  "sl-popup",
15527
15612
  {
15528
15613
  ref: popupRef,
@@ -15534,7 +15619,7 @@ var PopupMenu = forwardRef16(
15534
15619
  strategy: "fixed",
15535
15620
  "auto-size": "vertical",
15536
15621
  "auto-size-padding": "10",
15537
- children: /* @__PURE__ */ jsx113(
15622
+ children: /* @__PURE__ */ jsx114(
15538
15623
  "sl-menu",
15539
15624
  {
15540
15625
  ref: menuRef,
@@ -15654,13 +15739,13 @@ function renderVariableMenu(list, popupRef, highlighterRef, activeEditorRef, tex
15654
15739
  }
15655
15740
 
15656
15741
  // src/plugins/VariablesPlugin/useTypeaheadTriggerMatch.ts
15657
- import { useCallback as useCallback11 } from "react";
15742
+ import { useCallback as useCallback12 } from "react";
15658
15743
  var PUNCTUATION = "\\@";
15659
15744
  function useTypeaheadTriggerMatch(trigger, {
15660
15745
  minLength = 1,
15661
15746
  maxLength = 75
15662
15747
  }) {
15663
- return useCallback11(
15748
+ return useCallback12(
15664
15749
  (text) => {
15665
15750
  const validChars = "[^" + trigger + PUNCTUATION + "]";
15666
15751
  const TypeaheadTriggerRegex = new RegExp(
@@ -15699,23 +15784,23 @@ function visitVariableNodes(rootNode, cb) {
15699
15784
  }
15700
15785
 
15701
15786
  // src/plugins/VariablesPlugin/VariablesContext.tsx
15702
- import { $getRoot as $getRoot20 } from "lexical";
15787
+ import { $getRoot as $getRoot21 } from "lexical";
15703
15788
  import React22, {
15704
15789
  useContext as useContext4,
15705
- useEffect as useEffect77,
15706
- useState as useState16
15790
+ useEffect as useEffect78,
15791
+ useState as useState17
15707
15792
  } from "react";
15708
- import { jsx as jsx114 } from "react/jsx-runtime";
15793
+ import { jsx as jsx115 } from "react/jsx-runtime";
15709
15794
  var VariablesContext = React22.createContext(null);
15710
15795
  function VariablesProvider(props) {
15711
15796
  const { getEditor, getAllNestedEditors } = useBlockEditor();
15712
15797
  const { children, variablesSettings } = props;
15713
- const [variableList, setVariableList] = useState16(
15798
+ const [variableList, setVariableList] = useState17(
15714
15799
  variablesSettings.list
15715
15800
  );
15716
15801
  const updateVariablesInEditor = (newName, oldName, editor) => {
15717
15802
  editor.update(() => {
15718
- visitVariableNodes($getRoot20(), (variableNode) => {
15803
+ visitVariableNodes($getRoot21(), (variableNode) => {
15719
15804
  if (variableNode.__variable === oldName) {
15720
15805
  variableNode.setVariable(newName);
15721
15806
  }
@@ -15734,7 +15819,7 @@ function VariablesProvider(props) {
15734
15819
  setVariableSelection(editorRef, newName);
15735
15820
  }
15736
15821
  };
15737
- useEffect77(() => {
15822
+ useEffect78(() => {
15738
15823
  setVariableList(variablesSettings.list);
15739
15824
  }, [variablesSettings]);
15740
15825
  const handleOnCreated = (name) => {
@@ -15746,7 +15831,7 @@ function VariablesProvider(props) {
15746
15831
  renameVariable(newName, oldName);
15747
15832
  variablesSettings.onUpdated(newName, oldName);
15748
15833
  };
15749
- return /* @__PURE__ */ jsx114(
15834
+ return /* @__PURE__ */ jsx115(
15750
15835
  VariablesContext.Provider,
15751
15836
  {
15752
15837
  value: {
@@ -15852,7 +15937,7 @@ function removeTextInDomSelection(editor, leadOffset, onUpdate) {
15852
15937
  }
15853
15938
 
15854
15939
  // src/plugins/VariablesPlugin/TypeaheadVariablePlugin.tsx
15855
- import { useLexicalComposerContext as useLexicalComposerContext62 } from "@lexical/react/LexicalComposerContext";
15940
+ import { useLexicalComposerContext as useLexicalComposerContext63 } from "@lexical/react/LexicalComposerContext";
15856
15941
  import { mergeRegister as mergeRegister24 } from "@lexical/utils";
15857
15942
  import {
15858
15943
  $createNodeSelection as $createNodeSelection18,
@@ -15866,12 +15951,12 @@ import {
15866
15951
  KEY_ESCAPE_COMMAND,
15867
15952
  createCommand as createCommand19
15868
15953
  } from "lexical";
15869
- import { useEffect as useEffect78, useMemo as useMemo12, useRef as useRef54 } from "react";
15870
- import { Fragment as Fragment45, jsx as jsx115, jsxs as jsxs43 } from "react/jsx-runtime";
15954
+ import { useEffect as useEffect79, useMemo as useMemo12, useRef as useRef54 } from "react";
15955
+ import { Fragment as Fragment46, jsx as jsx116, jsxs as jsxs43 } from "react/jsx-runtime";
15871
15956
  var CREATE_VARIABLE_FROM_SELECTION_COMMAND = createCommand19("CREATE_VARIABLE_FROM_SELECTION_COMMAND");
15872
15957
  function TypeaheadVariablePlugin() {
15873
15958
  const { variableList, onCreated } = useVariables();
15874
- const [editor] = useLexicalComposerContext62();
15959
+ const [editor] = useLexicalComposerContext63();
15875
15960
  const triggerVariableFn = useTypeaheadTriggerMatch("@", {
15876
15961
  minLength: 0
15877
15962
  });
@@ -16021,7 +16106,7 @@ function TypeaheadVariablePlugin() {
16021
16106
  }
16022
16107
  return false;
16023
16108
  };
16024
- useEffect78(() => {
16109
+ useEffect79(() => {
16025
16110
  return mergeRegister24(
16026
16111
  editor.registerCommand(
16027
16112
  TYPEAHEAD_VARIABLE_COMMAND,
@@ -16104,8 +16189,8 @@ function TypeaheadVariablePlugin() {
16104
16189
  activeDecoratorRef.current !== JournalEntryQuestionNode
16105
16190
  );
16106
16191
  }, [variableList, activeDecoratorRef.current]);
16107
- return /* @__PURE__ */ jsxs43(Fragment45, { children: [
16108
- /* @__PURE__ */ jsx115(
16192
+ return /* @__PURE__ */ jsxs43(Fragment46, { children: [
16193
+ /* @__PURE__ */ jsx116(
16109
16194
  PopupMenu,
16110
16195
  {
16111
16196
  ref: popupRef,
@@ -16113,7 +16198,7 @@ function TypeaheadVariablePlugin() {
16113
16198
  menu
16114
16199
  }
16115
16200
  ),
16116
- /* @__PURE__ */ jsx115(
16201
+ /* @__PURE__ */ jsx116(
16117
16202
  PopupHighlighter,
16118
16203
  {
16119
16204
  highlighterClassName: "variable-placeholder",
@@ -16215,7 +16300,7 @@ function getParentNodeType(node, klass) {
16215
16300
 
16216
16301
  // src/plugins/TextToolbarPlugin/TextToolbarPlugin.tsx
16217
16302
  import { $isListNode as $isListNode9 } from "@lexical/list";
16218
- import { useLexicalComposerContext as useLexicalComposerContext63 } from "@lexical/react/LexicalComposerContext";
16303
+ import { useLexicalComposerContext as useLexicalComposerContext64 } from "@lexical/react/LexicalComposerContext";
16219
16304
  import { $isHeadingNode as $isHeadingNode4 } from "@lexical/rich-text";
16220
16305
  import {
16221
16306
  $getSelectionStyleValueForProperty,
@@ -16238,7 +16323,7 @@ import {
16238
16323
  KEY_ESCAPE_COMMAND as KEY_ESCAPE_COMMAND2,
16239
16324
  ParagraphNode as ParagraphNode5
16240
16325
  } from "lexical";
16241
- import debounce5 from "lodash-es/debounce";
16326
+ import debounce6 from "lodash-es/debounce";
16242
16327
  import {
16243
16328
  AlignCenter as AlignCenter2,
16244
16329
  AlignLeft as AlignLeft2,
@@ -16259,20 +16344,20 @@ import {
16259
16344
  Webhook
16260
16345
  } from "lucide-react";
16261
16346
  import {
16262
- useCallback as useCallback12,
16263
- useEffect as useEffect79,
16347
+ useCallback as useCallback13,
16348
+ useEffect as useEffect80,
16264
16349
  useMemo as useMemo13,
16265
16350
  useRef as useRef55,
16266
- useState as useState17
16351
+ useState as useState18
16267
16352
  } from "react";
16268
- import { jsx as jsx116 } from "react/jsx-runtime";
16353
+ import { jsx as jsx117 } from "react/jsx-runtime";
16269
16354
  function TextToolbarPlugin() {
16270
16355
  const { hasModule } = useBlockEditor();
16271
- const [editor] = useLexicalComposerContext63();
16356
+ const [editor] = useLexicalComposerContext64();
16272
16357
  const popupToolbarRef = useRef55(null);
16273
16358
  const activeEditorRef = useRef55(void 0);
16274
16359
  const activeDecoratorRef = useRef55(void 0);
16275
- const [toolbarState, setToolbarState] = useState17({
16360
+ const [toolbarState, setToolbarState] = useState18({
16276
16361
  isBold: false,
16277
16362
  isItalic: false,
16278
16363
  isUnderline: false,
@@ -16287,7 +16372,7 @@ function TextToolbarPlugin() {
16287
16372
  textAlign: "left"
16288
16373
  });
16289
16374
  const selectedNodeRef = useRef55(null);
16290
- const [selectionType, setSelectionType] = useState17("paragraph");
16375
+ const [selectionType, setSelectionType] = useState18("paragraph");
16291
16376
  const formatText = (format) => {
16292
16377
  activeEditorRef.current?.update(() => {
16293
16378
  const selection = $getSelection14();
@@ -16535,7 +16620,7 @@ function TextToolbarPlugin() {
16535
16620
  }
16536
16621
  }
16537
16622
  };
16538
- useEffect79(() => {
16623
+ useEffect80(() => {
16539
16624
  return mergeRegister25(
16540
16625
  editor.registerCommand(
16541
16626
  TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -16667,8 +16752,8 @@ function TextToolbarPlugin() {
16667
16752
  )
16668
16753
  );
16669
16754
  }, [editor]);
16670
- const repositionPopupToolbar = useCallback12(
16671
- debounce5(() => {
16755
+ const repositionPopupToolbar = useCallback13(
16756
+ debounce6(() => {
16672
16757
  if (activeEditorRef.current && popupToolbarRef.current && popupToolbarRef.current.isShown()) {
16673
16758
  const nativeSelection = window.getSelection();
16674
16759
  const rootElement = activeEditorRef.current.getRootElement();
@@ -16685,7 +16770,7 @@ function TextToolbarPlugin() {
16685
16770
  popupToolbarRef.current.hideToolbar();
16686
16771
  }
16687
16772
  }
16688
- useEffect79(() => {
16773
+ useEffect80(() => {
16689
16774
  window.addEventListener("scroll", repositionPopupToolbar);
16690
16775
  window.addEventListener("resize", repositionPopupToolbar);
16691
16776
  document.addEventListener("selectstart", handleSelectionStart);
@@ -17018,7 +17103,7 @@ function TextToolbarPlugin() {
17018
17103
  }
17019
17104
  return resultList;
17020
17105
  }, [toolbarState, selectionType, activeEditorRef.current]);
17021
- return /* @__PURE__ */ jsx116(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
17106
+ return /* @__PURE__ */ jsx117(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
17022
17107
  }
17023
17108
 
17024
17109
  // src/plugins/TypeaheadMenuPlugin/renderCalloutModuleMenu.tsx
@@ -17452,13 +17537,13 @@ function renderTableModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
17452
17537
  }
17453
17538
 
17454
17539
  // src/plugins/TypeaheadMenuPlugin/useTypeaheadTriggerMatch.ts
17455
- import { useCallback as useCallback13 } from "react";
17540
+ import { useCallback as useCallback14 } from "react";
17456
17541
  var PUNCTUATION2 = `\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;
17457
17542
  function useTypeaheadTriggerMatch2(trigger, {
17458
17543
  minLength = 1,
17459
17544
  maxLength = 75
17460
17545
  }) {
17461
- return useCallback13(
17546
+ return useCallback14(
17462
17547
  (text) => {
17463
17548
  const validChars = "[^" + trigger + PUNCTUATION2 + "]";
17464
17549
  const TypeaheadTriggerRegex = new RegExp(
@@ -17483,14 +17568,14 @@ function useTypeaheadTriggerMatch2(trigger, {
17483
17568
  }
17484
17569
 
17485
17570
  // src/plugins/TypeaheadMenuPlugin/TypeaheadMenuPlugin.tsx
17486
- import { useLexicalComposerContext as useLexicalComposerContext64 } from "@lexical/react/LexicalComposerContext";
17571
+ import { useLexicalComposerContext as useLexicalComposerContext65 } from "@lexical/react/LexicalComposerContext";
17487
17572
  import { $isHeadingNode as $isHeadingNode5 } from "@lexical/rich-text";
17488
17573
  import { $isTableCellNode as $isTableCellNode2, TableNode as TableNode8 } from "@lexical/table";
17489
17574
  import { mergeRegister as mergeRegister26 } from "@lexical/utils";
17490
17575
  import {
17491
17576
  $createParagraphNode as $createParagraphNode22,
17492
17577
  $getNodeByKey as $getNodeByKey54,
17493
- $getRoot as $getRoot21,
17578
+ $getRoot as $getRoot22,
17494
17579
  $getSelection as $getSelection15,
17495
17580
  $isParagraphNode as $isParagraphNode7,
17496
17581
  $isRangeSelection as $isRangeSelection10,
@@ -17501,7 +17586,7 @@ import {
17501
17586
  KEY_ENTER_COMMAND as KEY_ENTER_COMMAND3,
17502
17587
  KEY_ESCAPE_COMMAND as KEY_ESCAPE_COMMAND3
17503
17588
  } from "lexical";
17504
- import { useEffect as useEffect80, useMemo as useMemo14, useRef as useRef56, useState as useState18 } from "react";
17589
+ import { useEffect as useEffect81, useMemo as useMemo14, useRef as useRef56, useState as useState19 } from "react";
17505
17590
 
17506
17591
  // src/plugins/TypeaheadMenuPlugin/renderFillInTheBlankMenu.tsx
17507
17592
  import {
@@ -17616,17 +17701,17 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
17616
17701
  }
17617
17702
 
17618
17703
  // src/plugins/TypeaheadMenuPlugin/TypeaheadMenuPlugin.tsx
17619
- import { jsx as jsx117 } from "react/jsx-runtime";
17704
+ import { jsx as jsx118 } from "react/jsx-runtime";
17620
17705
  function TypeaheadMenuPlugin() {
17621
17706
  const { hasModule, modulesNumber } = useBlockEditor();
17622
- const [editor] = useLexicalComposerContext64();
17707
+ const [editor] = useLexicalComposerContext65();
17623
17708
  const triggerFn = useTypeaheadTriggerMatch2("/", {
17624
17709
  minLength: 0
17625
17710
  });
17626
17711
  const popupRef = useRef56(null);
17627
17712
  const targetNodeKeyRef = useRef56(void 0);
17628
17713
  const activeEditorRef = useRef56(void 0);
17629
- const [activeDecorator, setActiveDecorator] = useState18();
17714
+ const [activeDecorator, setActiveDecorator] = useState19();
17630
17715
  const handleUpdate = () => {
17631
17716
  activeEditorRef.current?.getEditorState().read(() => {
17632
17717
  const selection = $getSelection15();
@@ -17748,7 +17833,7 @@ function TypeaheadMenuPlugin() {
17748
17833
  }
17749
17834
  return false;
17750
17835
  };
17751
- useEffect80(() => {
17836
+ useEffect81(() => {
17752
17837
  return mergeRegister26(
17753
17838
  editor.registerCommand(
17754
17839
  TYPEAHEAD_MENU_COMMAND,
@@ -17807,7 +17892,7 @@ function TypeaheadMenuPlugin() {
17807
17892
  );
17808
17893
  });
17809
17894
  }
17810
- const rootNode = $getRoot21();
17895
+ const rootNode = $getRoot22();
17811
17896
  if (rootNode) {
17812
17897
  const childrenKeys = rootNode.getChildrenKeys();
17813
17898
  if (childrenKeys.length > 0) {
@@ -17899,7 +17984,7 @@ function TypeaheadMenuPlugin() {
17899
17984
  }
17900
17985
  return menuItems;
17901
17986
  }, [editor, modulesNumber, activeDecorator]);
17902
- return /* @__PURE__ */ jsx117(
17987
+ return /* @__PURE__ */ jsx118(
17903
17988
  PopupMenu,
17904
17989
  {
17905
17990
  ref: popupRef,
@@ -18585,9 +18670,9 @@ var themeDark = `
18585
18670
  import {
18586
18671
  createContext as createContext2,
18587
18672
  useContext as useContext5,
18588
- useEffect as useEffect81,
18673
+ useEffect as useEffect82,
18589
18674
  useRef as useRef57,
18590
- useState as useState19
18675
+ useState as useState20
18591
18676
  } from "react";
18592
18677
 
18593
18678
  // src/theme/constants.ts
@@ -18615,7 +18700,7 @@ var defaultThemeSettings = {
18615
18700
  };
18616
18701
 
18617
18702
  // src/theme/ThemeProvider.tsx
18618
- import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
18703
+ import { jsx as jsx119, jsxs as jsxs44 } from "react/jsx-runtime";
18619
18704
  var ThemeContext = createContext2(
18620
18705
  void 0
18621
18706
  );
@@ -18625,8 +18710,8 @@ function ThemeProvider({
18625
18710
  children
18626
18711
  }) {
18627
18712
  const rootElementRef = useRef57(null);
18628
- const [effectiveTheme, setEffectiveTheme] = useState19("light");
18629
- useEffect81(() => {
18713
+ const [effectiveTheme, setEffectiveTheme] = useState20("light");
18714
+ useEffect82(() => {
18630
18715
  const mediaQuery = window.matchMedia(
18631
18716
  "(prefers-color-scheme: dark)"
18632
18717
  );
@@ -18641,14 +18726,14 @@ function ThemeProvider({
18641
18726
  mediaQuery.addEventListener("change", updateEffectiveTheme);
18642
18727
  return () => mediaQuery.removeEventListener("change", updateEffectiveTheme);
18643
18728
  }, [theme]);
18644
- useEffect81(() => {
18729
+ useEffect82(() => {
18645
18730
  rootElementRef.current?.classList.remove(
18646
18731
  "theme-light",
18647
18732
  "theme-dark"
18648
18733
  );
18649
18734
  rootElementRef.current?.classList.add(`theme-${effectiveTheme}`);
18650
18735
  }, [effectiveTheme]);
18651
- return /* @__PURE__ */ jsx118(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsxs44(
18736
+ return /* @__PURE__ */ jsx119(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsxs44(
18652
18737
  "article",
18653
18738
  {
18654
18739
  ref: rootElementRef,
@@ -18665,7 +18750,7 @@ function ThemeProvider({
18665
18750
  )
18666
18751
  },
18667
18752
  children: [
18668
- /* @__PURE__ */ jsx118(
18753
+ /* @__PURE__ */ jsx119(
18669
18754
  "style",
18670
18755
  {
18671
18756
  dangerouslySetInnerHTML: {
@@ -18688,13 +18773,13 @@ import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
18688
18773
  import { RichTextPlugin as RichTextPlugin7 } from "@lexical/react/LexicalRichTextPlugin";
18689
18774
  import { TabIndentationPlugin as TabIndentationPlugin2 } from "@lexical/react/LexicalTabIndentationPlugin";
18690
18775
  import React24, {
18691
- useCallback as useCallback14,
18776
+ useCallback as useCallback15,
18692
18777
  useContext as useContext6,
18693
- useEffect as useEffect82,
18778
+ useEffect as useEffect83,
18694
18779
  useRef as useRef58,
18695
- useState as useState20
18780
+ useState as useState21
18696
18781
  } from "react";
18697
- import { jsx as jsx119, jsxs as jsxs45 } from "react/jsx-runtime";
18782
+ import { jsx as jsx120, jsxs as jsxs45 } from "react/jsx-runtime";
18698
18783
  var TOGGLE_EDITING_MODE = "TOGGLE_EDITING_MODE";
18699
18784
  var RESET_EDITING_MODE = "RESET_EDITING_MODE";
18700
18785
  var BlockEditorContext = React24.createContext(null);
@@ -18708,18 +18793,18 @@ function BlockEditor(props) {
18708
18793
  children,
18709
18794
  renderSettings
18710
18795
  } = props;
18711
- const [modulesNumber, setModulesNumber] = useState20(0);
18796
+ const [modulesNumber, setModulesNumber] = useState21(0);
18712
18797
  const editorModulesRef = useRef58({
18713
18798
  ...initialEditorRegistry
18714
18799
  });
18715
- const [settingsPanelSwitch, setSettingsPanelSwitch] = useState20("off");
18800
+ const [settingsPanelSwitch, setSettingsPanelSwitch] = useState21("off");
18716
18801
  const settingsPanelsRef = useRef58({});
18717
18802
  const nestedEditorsRef = useRef58({});
18718
18803
  const editorRef = useRef58(null);
18719
18804
  const drawerRef = useRef58(null);
18720
- const [isBlockEditorReady, setBlockEditorReady] = useState20(false);
18805
+ const [isBlockEditorReady, setBlockEditorReady] = useState21(false);
18721
18806
  const { historyState } = useSharedHistoryContext();
18722
- const handleChange = useCallback14(
18807
+ const handleChange = useCallback15(
18723
18808
  (editorState2, _editor, tags) => {
18724
18809
  if (onChange && !tags?.has("new_state") && !tags?.has("history-merge")) {
18725
18810
  const editorStateJSON = editorState2.toJSON();
@@ -18728,7 +18813,7 @@ function BlockEditor(props) {
18728
18813
  },
18729
18814
  [onChange]
18730
18815
  );
18731
- useEffect82(() => {
18816
+ useEffect83(() => {
18732
18817
  if (editorState) {
18733
18818
  const parsedEditorState = editorRef.current?.parseEditorState(editorState);
18734
18819
  if (parsedEditorState) {
@@ -18739,10 +18824,10 @@ function BlockEditor(props) {
18739
18824
  }
18740
18825
  editorRef.current?.setEditable(editable);
18741
18826
  }, [editable, editorState]);
18742
- useEffect82(() => {
18827
+ useEffect83(() => {
18743
18828
  setBlockEditorReady(true);
18744
18829
  }, []);
18745
- const registerModule = useCallback14(
18830
+ const registerModule = useCallback15(
18746
18831
  (moduleType) => {
18747
18832
  editorModulesRef.current[moduleType] = true;
18748
18833
  const modulesNumber2 = Object.entries(
@@ -18752,10 +18837,10 @@ function BlockEditor(props) {
18752
18837
  },
18753
18838
  [modulesNumber]
18754
18839
  );
18755
- const openSettingsPanel = useCallback14(() => {
18840
+ const openSettingsPanel = useCallback15(() => {
18756
18841
  setSettingsPanelSwitch("on");
18757
18842
  }, []);
18758
- const autoOpenSettingsPanel = useCallback14(() => {
18843
+ const autoOpenSettingsPanel = useCallback15(() => {
18759
18844
  setSettingsPanelSwitch((prevState) => {
18760
18845
  if (prevState === "off") {
18761
18846
  return "on";
@@ -18763,14 +18848,14 @@ function BlockEditor(props) {
18763
18848
  return prevState;
18764
18849
  });
18765
18850
  }, []);
18766
- const [editingMode, setEditingMode] = useState20({
18851
+ const [editingMode, setEditingMode] = useState21({
18767
18852
  mode: "edit"
18768
18853
  });
18769
18854
  const editingModeDataCallbackRef = useRef58();
18770
18855
  const handleResetPreviewModeEvent = () => {
18771
18856
  setEditingMode({ mode: "edit" });
18772
18857
  };
18773
- useEffect82(() => {
18858
+ useEffect83(() => {
18774
18859
  if (editingMode.mode === "preview") {
18775
18860
  window.dispatchEvent(
18776
18861
  new CustomEvent(
@@ -18796,7 +18881,7 @@ function BlockEditor(props) {
18796
18881
  );
18797
18882
  }
18798
18883
  }, [editingMode]);
18799
- useEffect82(() => {
18884
+ useEffect83(() => {
18800
18885
  window.addEventListener(
18801
18886
  RESET_EDITING_MODE,
18802
18887
  handleResetPreviewModeEvent
@@ -18808,7 +18893,7 @@ function BlockEditor(props) {
18808
18893
  );
18809
18894
  };
18810
18895
  }, []);
18811
- return /* @__PURE__ */ jsx119(
18896
+ return /* @__PURE__ */ jsx120(
18812
18897
  BlockEditorContext.Provider,
18813
18898
  {
18814
18899
  value: {
@@ -18864,62 +18949,62 @@ function BlockEditor(props) {
18864
18949
  },
18865
18950
  drawer: drawerRef.current,
18866
18951
  isBlockEditorReady,
18867
- renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx119("div", {})
18952
+ renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx120("div", {})
18868
18953
  },
18869
- children: /* @__PURE__ */ jsx119(ResizeObserver, { children: /* @__PURE__ */ jsx119(ThemeProvider, { theme, themeSettings, children: /* @__PURE__ */ jsx119(SharedHistoryContext, { children: /* @__PURE__ */ jsxs45(NodeProvider, { children: [
18870
- /* @__PURE__ */ jsx119(
18954
+ children: /* @__PURE__ */ jsx120(ResizeObserver, { children: /* @__PURE__ */ jsx120(ThemeProvider, { theme, themeSettings, children: /* @__PURE__ */ jsx120(SharedHistoryContext, { children: /* @__PURE__ */ jsxs45(NodeProvider, { children: [
18955
+ /* @__PURE__ */ jsx120(
18871
18956
  "main",
18872
18957
  {
18873
18958
  className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
18874
18959
  children: /* @__PURE__ */ jsxs45(LexicalComposer, { initialConfig: { ...initialConfig }, children: [
18875
- /* @__PURE__ */ jsx119(
18960
+ /* @__PURE__ */ jsx120(
18876
18961
  EditorRefPlugin,
18877
18962
  {
18878
18963
  onMountRef: (editor) => editorRef.current = editor
18879
18964
  }
18880
18965
  ),
18881
- /* @__PURE__ */ jsx119(AutoFocusPlugin, {}),
18882
- /* @__PURE__ */ jsx119(AutoBottomParagraphPlugin, {}),
18883
- /* @__PURE__ */ jsx119(
18966
+ /* @__PURE__ */ jsx120(AutoFocusPlugin, {}),
18967
+ /* @__PURE__ */ jsx120(AutoBottomParagraphPlugin, {}),
18968
+ /* @__PURE__ */ jsx120(
18884
18969
  HistoryPlugin9,
18885
18970
  {
18886
18971
  externalHistoryState: historyState
18887
18972
  }
18888
18973
  ),
18889
- /* @__PURE__ */ jsx119(
18974
+ /* @__PURE__ */ jsx120(
18890
18975
  OnChangePlugin,
18891
18976
  {
18892
18977
  onChange: handleChange,
18893
18978
  ignoreSelectionChange: true
18894
18979
  }
18895
18980
  ),
18896
- /* @__PURE__ */ jsx119(OnNestedChangePlugin, { onChange: handleChange }),
18897
- /* @__PURE__ */ jsx119(
18981
+ /* @__PURE__ */ jsx120(OnNestedChangePlugin, { onChange: handleChange }),
18982
+ /* @__PURE__ */ jsx120(
18898
18983
  RichTextPlugin7,
18899
18984
  {
18900
- contentEditable: /* @__PURE__ */ jsx119(ContentEditable, {}),
18985
+ contentEditable: /* @__PURE__ */ jsx120(ContentEditable, {}),
18901
18986
  placeholder: null,
18902
18987
  ErrorBoundary: LexicalErrorBoundary9
18903
18988
  }
18904
18989
  ),
18905
- /* @__PURE__ */ jsx119(NodePastePlugin, {}),
18906
- /* @__PURE__ */ jsx119(ListPlugin2, {}),
18907
- /* @__PURE__ */ jsx119(ListLevelLimitPlugin, {}),
18908
- /* @__PURE__ */ jsx119(TabIndentationPlugin2, {}),
18990
+ /* @__PURE__ */ jsx120(NodePastePlugin, {}),
18991
+ /* @__PURE__ */ jsx120(ListPlugin2, {}),
18992
+ /* @__PURE__ */ jsx120(ListLevelLimitPlugin, {}),
18993
+ /* @__PURE__ */ jsx120(TabIndentationPlugin2, {}),
18909
18994
  children,
18910
- /* @__PURE__ */ jsx119(TypeaheadMenuPlugin, {}),
18911
- /* @__PURE__ */ jsx119(TypeaheadMenuAgentPlugin, {}),
18912
- /* @__PURE__ */ jsx119(NodeMouseAnchorPlugin, {}),
18913
- /* @__PURE__ */ jsx119(NodeMousePlugin, {}),
18914
- /* @__PURE__ */ jsx119(TextToolbarPlugin, {}),
18915
- /* @__PURE__ */ jsx119(TextToolbarAgentPlugin, {}),
18916
- /* @__PURE__ */ jsx119(TypeaheadVariableAgentPlugin, {}),
18917
- /* @__PURE__ */ jsx119(VariableComponentPlugin, {}),
18918
- /* @__PURE__ */ jsx119(MarkdownPlugin, {})
18995
+ /* @__PURE__ */ jsx120(TypeaheadMenuPlugin, {}),
18996
+ /* @__PURE__ */ jsx120(TypeaheadMenuAgentPlugin, {}),
18997
+ /* @__PURE__ */ jsx120(NodeMouseAnchorPlugin, {}),
18998
+ /* @__PURE__ */ jsx120(NodeMousePlugin, {}),
18999
+ /* @__PURE__ */ jsx120(TextToolbarPlugin, {}),
19000
+ /* @__PURE__ */ jsx120(TextToolbarAgentPlugin, {}),
19001
+ /* @__PURE__ */ jsx120(TypeaheadVariableAgentPlugin, {}),
19002
+ /* @__PURE__ */ jsx120(VariableComponentPlugin, {}),
19003
+ /* @__PURE__ */ jsx120(MarkdownPlugin, {})
18919
19004
  ] })
18920
19005
  }
18921
19006
  ),
18922
- /* @__PURE__ */ jsx119(Drawer, { ref: drawerRef })
19007
+ /* @__PURE__ */ jsx120(Drawer, { ref: drawerRef })
18923
19008
  ] }) }) }) })
18924
19009
  }
18925
19010
  );
@@ -18935,30 +19020,30 @@ var useBlockEditor = () => {
18935
19020
  };
18936
19021
 
18937
19022
  // src/BlockEditorStyle.tsx
18938
- import { jsx as jsx120 } from "react/jsx-runtime";
19023
+ import { jsx as jsx121 } from "react/jsx-runtime";
18939
19024
  function BlockEditorStyle(props) {
18940
19025
  const { children, theme, themeSettings } = props;
18941
- return /* @__PURE__ */ jsx120(ThemeProvider, { theme, themeSettings, children });
19026
+ return /* @__PURE__ */ jsx121(ThemeProvider, { theme, themeSettings, children });
18942
19027
  }
18943
19028
 
18944
19029
  // src/modules/Callout.tsx
18945
- import { useEffect as useEffect83 } from "react";
18946
- import { jsx as jsx121 } from "react/jsx-runtime";
19030
+ import { useEffect as useEffect84 } from "react";
19031
+ import { jsx as jsx122 } from "react/jsx-runtime";
18947
19032
  function Callout() {
18948
19033
  const { registerModule } = useBlockEditor();
18949
- useEffect83(() => {
19034
+ useEffect84(() => {
18950
19035
  registerModule("Callout");
18951
19036
  }, [registerModule]);
18952
- return /* @__PURE__ */ jsx121(CalloutBoxPlugin, {});
19037
+ return /* @__PURE__ */ jsx122(CalloutBoxPlugin, {});
18953
19038
  }
18954
19039
 
18955
19040
  // src/plugins/TreeViewPlugin/index.tsx
18956
- import { useLexicalComposerContext as useLexicalComposerContext65 } from "@lexical/react/LexicalComposerContext";
19041
+ import { useLexicalComposerContext as useLexicalComposerContext66 } from "@lexical/react/LexicalComposerContext";
18957
19042
  import { TreeView } from "@lexical/react/LexicalTreeView";
18958
- import { jsx as jsx122 } from "react/jsx-runtime";
19043
+ import { jsx as jsx123 } from "react/jsx-runtime";
18959
19044
  function TreeViewPlugin() {
18960
- const [editor] = useLexicalComposerContext65();
18961
- return /* @__PURE__ */ jsx122(
19045
+ const [editor] = useLexicalComposerContext66();
19046
+ return /* @__PURE__ */ jsx123(
18962
19047
  TreeView,
18963
19048
  {
18964
19049
  viewClassName: "tree-view-output",
@@ -18973,31 +19058,31 @@ function TreeViewPlugin() {
18973
19058
  }
18974
19059
 
18975
19060
  // src/modules/Debug.tsx
18976
- import { useEffect as useEffect84 } from "react";
18977
- import { jsx as jsx123 } from "react/jsx-runtime";
19061
+ import { useEffect as useEffect85 } from "react";
19062
+ import { jsx as jsx124 } from "react/jsx-runtime";
18978
19063
  function Debug() {
18979
19064
  const { registerModule } = useBlockEditor();
18980
- useEffect84(() => {
19065
+ useEffect85(() => {
18981
19066
  registerModule("Debug");
18982
19067
  }, [registerModule]);
18983
- return /* @__PURE__ */ jsx123(TreeViewPlugin, {});
19068
+ return /* @__PURE__ */ jsx124(TreeViewPlugin, {});
18984
19069
  }
18985
19070
 
18986
19071
  // src/modules/Image.tsx
18987
- import { useEffect as useEffect85 } from "react";
18988
- import { Fragment as Fragment46, jsx as jsx124 } from "react/jsx-runtime";
19072
+ import { useEffect as useEffect86 } from "react";
19073
+ import { Fragment as Fragment47, jsx as jsx125 } from "react/jsx-runtime";
18989
19074
  function Image(props) {
18990
19075
  const { imageSettings } = props;
18991
19076
  const { registerModule } = useBlockEditor();
18992
- useEffect85(() => {
19077
+ useEffect86(() => {
18993
19078
  registerModule("Image");
18994
19079
  }, [registerModule]);
18995
- return /* @__PURE__ */ jsx124(Fragment46, { children: /* @__PURE__ */ jsx124(ImagePlugin, { imageSettings }) });
19080
+ return /* @__PURE__ */ jsx125(Fragment47, { children: /* @__PURE__ */ jsx125(ImagePlugin, { imageSettings }) });
18996
19081
  }
18997
19082
 
18998
19083
  // src/plugins/LinkToolbarPlugin/LinkToolbarPlugin.tsx
18999
19084
  import { $isLinkNode as $isLinkNode3, $toggleLink as $toggleLink2 } from "@lexical/link";
19000
- import { useLexicalComposerContext as useLexicalComposerContext66 } from "@lexical/react/LexicalComposerContext";
19085
+ import { useLexicalComposerContext as useLexicalComposerContext67 } from "@lexical/react/LexicalComposerContext";
19001
19086
  import { mergeRegister as mergeRegister27 } from "@lexical/utils";
19002
19087
  import {
19003
19088
  $createRangeSelection as $createRangeSelection3,
@@ -19010,16 +19095,16 @@ import {
19010
19095
  COMMAND_PRIORITY_LOW as COMMAND_PRIORITY_LOW14,
19011
19096
  KEY_ESCAPE_COMMAND as KEY_ESCAPE_COMMAND4
19012
19097
  } from "lexical";
19013
- import debounce6 from "lodash-es/debounce";
19098
+ import debounce7 from "lodash-es/debounce";
19014
19099
  import { Pencil, Trash2 as Trash26, X } from "lucide-react";
19015
- import { useCallback as useCallback15, useEffect as useEffect86, useRef as useRef59, useState as useState21 } from "react";
19016
- import { jsx as jsx125, jsxs as jsxs46 } from "react/jsx-runtime";
19100
+ import { useCallback as useCallback16, useEffect as useEffect87, useRef as useRef59, useState as useState22 } from "react";
19101
+ import { jsx as jsx126, jsxs as jsxs46 } from "react/jsx-runtime";
19017
19102
  function LinkToolbarPlugin() {
19018
- const [editor] = useLexicalComposerContext66();
19103
+ const [editor] = useLexicalComposerContext67();
19019
19104
  const popupToolbarRef = useRef59(null);
19020
19105
  const linkTextNodeRef = useRef59();
19021
19106
  const linkTextNodeOffsetRef = useRef59();
19022
- const [linkNode, setLinkNode] = useState21();
19107
+ const [linkNode, setLinkNode] = useState22();
19023
19108
  const linkNodeElementRef = useRef59();
19024
19109
  const activeEditorRef = useRef59();
19025
19110
  const handleClose = () => {
@@ -19027,8 +19112,8 @@ function LinkToolbarPlugin() {
19027
19112
  popupToolbarRef.current.hideToolbar();
19028
19113
  }
19029
19114
  };
19030
- const repositionPopupToolbar = useCallback15(
19031
- debounce6(() => {
19115
+ const repositionPopupToolbar = useCallback16(
19116
+ debounce7(() => {
19032
19117
  if (popupToolbarRef.current && popupToolbarRef.current.isShown()) {
19033
19118
  if (linkNodeElementRef.current) {
19034
19119
  popupToolbarRef.current?.repositionToolbar(
@@ -19039,7 +19124,7 @@ function LinkToolbarPlugin() {
19039
19124
  }, 10),
19040
19125
  [editor]
19041
19126
  );
19042
- useEffect86(() => {
19127
+ useEffect87(() => {
19043
19128
  return mergeRegister27(
19044
19129
  editor.registerCommand(
19045
19130
  CLICK_COMMAND13,
@@ -19113,7 +19198,7 @@ function LinkToolbarPlugin() {
19113
19198
  )
19114
19199
  );
19115
19200
  }, [editor]);
19116
- useEffect86(() => {
19201
+ useEffect87(() => {
19117
19202
  window.addEventListener("scroll", repositionPopupToolbar);
19118
19203
  window.addEventListener("resize", repositionPopupToolbar);
19119
19204
  return () => {
@@ -19123,7 +19208,7 @@ function LinkToolbarPlugin() {
19123
19208
  }, [editor]);
19124
19209
  const linkUrl = linkNode?.linkUrl;
19125
19210
  const linkTitle = linkNode?.linkUrl;
19126
- return /* @__PURE__ */ jsx125(
19211
+ return /* @__PURE__ */ jsx126(
19127
19212
  PopupToolbar,
19128
19213
  {
19129
19214
  ref: popupToolbarRef,
@@ -19141,23 +19226,23 @@ function LinkToolbarPlugin() {
19141
19226
  padding: "var(--sl-spacing-2x-small) var(--sl-spacing-x-small) var(--sl-spacing-2x-small) var(--sl-spacing-medium)"
19142
19227
  },
19143
19228
  children: [
19144
- /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx125(
19229
+ /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx126(
19145
19230
  "sl-tooltip",
19146
19231
  {
19147
19232
  style: { "--show-delay": "1800" },
19148
19233
  hoist: true,
19149
19234
  content: linkUrl || "[Empty URL]",
19150
- children: /* @__PURE__ */ jsx125("span", { className: "line-short-20", children: linkTitle })
19235
+ children: /* @__PURE__ */ jsx126("span", { className: "line-short-20", children: linkTitle })
19151
19236
  }
19152
19237
  ) }) }),
19153
19238
  /* @__PURE__ */ jsxs46(Stack, { className: "stack__row", children: [
19154
- /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125(
19239
+ /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126(
19155
19240
  "sl-tooltip",
19156
19241
  {
19157
19242
  style: { "--show-delay": "1800" },
19158
19243
  hoist: "hoist",
19159
19244
  content: "Edit Link",
19160
- children: /* @__PURE__ */ jsx125(
19245
+ children: /* @__PURE__ */ jsx126(
19161
19246
  Button,
19162
19247
  {
19163
19248
  size: "small",
@@ -19196,13 +19281,13 @@ function LinkToolbarPlugin() {
19196
19281
  )
19197
19282
  }
19198
19283
  ) }),
19199
- /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125(
19284
+ /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126(
19200
19285
  "sl-tooltip",
19201
19286
  {
19202
19287
  style: { "--show-delay": "1800" },
19203
19288
  hoist: "hoist",
19204
19289
  content: "Remove Link",
19205
- children: /* @__PURE__ */ jsx125(
19290
+ children: /* @__PURE__ */ jsx126(
19206
19291
  Button,
19207
19292
  {
19208
19293
  size: "small",
@@ -19237,13 +19322,13 @@ function LinkToolbarPlugin() {
19237
19322
  )
19238
19323
  }
19239
19324
  ) }),
19240
- /* @__PURE__ */ jsx125("div", { children: /* @__PURE__ */ jsx125(
19325
+ /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126(
19241
19326
  "sl-tooltip",
19242
19327
  {
19243
19328
  style: { "--show-delay": "1800" },
19244
19329
  hoist: "hoist",
19245
19330
  content: "Close",
19246
- children: /* @__PURE__ */ jsx125(
19331
+ children: /* @__PURE__ */ jsx126(
19247
19332
  Button,
19248
19333
  {
19249
19334
  size: "small",
@@ -19265,21 +19350,21 @@ function LinkToolbarPlugin() {
19265
19350
  }
19266
19351
 
19267
19352
  // src/modules/Link.tsx
19268
- import { useEffect as useEffect87 } from "react";
19269
- import { Fragment as Fragment47, jsx as jsx126, jsxs as jsxs47 } from "react/jsx-runtime";
19353
+ import { useEffect as useEffect88 } from "react";
19354
+ import { Fragment as Fragment48, jsx as jsx127, jsxs as jsxs47 } from "react/jsx-runtime";
19270
19355
  function Link() {
19271
19356
  const { registerModule } = useBlockEditor();
19272
- useEffect87(() => {
19357
+ useEffect88(() => {
19273
19358
  registerModule("Link");
19274
19359
  }, [registerModule]);
19275
- return /* @__PURE__ */ jsxs47(Fragment47, { children: [
19276
- /* @__PURE__ */ jsx126(LinkEditorPlugin, {}),
19277
- /* @__PURE__ */ jsx126(LinkToolbarPlugin, {})
19360
+ return /* @__PURE__ */ jsxs47(Fragment48, { children: [
19361
+ /* @__PURE__ */ jsx127(LinkEditorPlugin, {}),
19362
+ /* @__PURE__ */ jsx127(LinkToolbarPlugin, {})
19278
19363
  ] });
19279
19364
  }
19280
19365
 
19281
19366
  // src/plugins/EssayQuestionPlugin/EssayQuestionPlugin.tsx
19282
- import { useLexicalComposerContext as useLexicalComposerContext67 } from "@lexical/react/LexicalComposerContext";
19367
+ import { useLexicalComposerContext as useLexicalComposerContext68 } from "@lexical/react/LexicalComposerContext";
19283
19368
  import { mergeRegister as mergeRegister28 } from "@lexical/utils";
19284
19369
  import {
19285
19370
  $createNodeSelection as $createNodeSelection19,
@@ -19288,12 +19373,12 @@ import {
19288
19373
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR15,
19289
19374
  createCommand as createCommand20
19290
19375
  } from "lexical";
19291
- import { useEffect as useEffect88 } from "react";
19292
- import { Fragment as Fragment48, jsx as jsx127 } from "react/jsx-runtime";
19376
+ import { useEffect as useEffect89 } from "react";
19377
+ import { Fragment as Fragment49, jsx as jsx128 } from "react/jsx-runtime";
19293
19378
  var INSERT_ESSAY_QUESTION_COMMAND = createCommand20("INSERT_ESSAY_QUESTION_COMMAND");
19294
19379
  function EssayQuestionPlugin() {
19295
- const [editor] = useLexicalComposerContext67();
19296
- useEffect88(() => {
19380
+ const [editor] = useLexicalComposerContext68();
19381
+ useEffect89(() => {
19297
19382
  return mergeRegister28(
19298
19383
  editor.registerCommand(
19299
19384
  INSERT_ESSAY_QUESTION_COMMAND,
@@ -19327,13 +19412,13 @@ function EssayQuestionPlugin() {
19327
19412
  )
19328
19413
  );
19329
19414
  }, [editor]);
19330
- return /* @__PURE__ */ jsx127(Fragment48, {});
19415
+ return /* @__PURE__ */ jsx128(Fragment49, {});
19331
19416
  }
19332
19417
 
19333
19418
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
19334
- import { useLexicalComposerContext as useLexicalComposerContext68 } from "@lexical/react/LexicalComposerContext";
19419
+ import { useLexicalComposerContext as useLexicalComposerContext69 } from "@lexical/react/LexicalComposerContext";
19335
19420
  import { $getNodeByKey as $getNodeByKey56 } from "lexical";
19336
- import { useEffect as useEffect89, useRef as useRef60, useState as useState22 } from "react";
19421
+ import { useEffect as useEffect90, useRef as useRef60, useState as useState23 } from "react";
19337
19422
 
19338
19423
  // src/plugins/FinancialStatementQuestionPlugin/validatePointslnput.ts
19339
19424
  function validatePointsInput6(input) {
@@ -19355,13 +19440,13 @@ function validatePointsInput6(input) {
19355
19440
  }
19356
19441
 
19357
19442
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
19358
- import { jsx as jsx128 } from "react/jsx-runtime";
19443
+ import { jsx as jsx129 } from "react/jsx-runtime";
19359
19444
  function FinancialStatementQuestionSettings(props) {
19360
19445
  const { nodeKey } = props;
19361
- const [editor] = useLexicalComposerContext68();
19446
+ const [editor] = useLexicalComposerContext69();
19362
19447
  const pointsTextInputRef = useRef60(null);
19363
- const [foundNode, setFoundNode] = useState22();
19364
- useEffect89(() => {
19448
+ const [foundNode, setFoundNode] = useState23();
19449
+ useEffect90(() => {
19365
19450
  if (nodeKey) {
19366
19451
  editor.getEditorState().read(() => {
19367
19452
  const fillInTheBlankNode = $getNodeByKey56(nodeKey);
@@ -19374,7 +19459,7 @@ function FinancialStatementQuestionSettings(props) {
19374
19459
  if (!foundNode) {
19375
19460
  return null;
19376
19461
  }
19377
- return /* @__PURE__ */ jsx128("div", { children: /* @__PURE__ */ jsx128(
19462
+ return /* @__PURE__ */ jsx129("div", { children: /* @__PURE__ */ jsx129(
19378
19463
  TextInput,
19379
19464
  {
19380
19465
  ref: pointsTextInputRef,
@@ -19404,20 +19489,20 @@ function FinancialStatementQuestionSettings(props) {
19404
19489
  }
19405
19490
 
19406
19491
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionPlugin.tsx
19407
- import { useLexicalComposerContext as useLexicalComposerContext69 } from "@lexical/react/LexicalComposerContext";
19492
+ import { useLexicalComposerContext as useLexicalComposerContext70 } from "@lexical/react/LexicalComposerContext";
19408
19493
  import { mergeRegister as mergeRegister29 } from "@lexical/utils";
19409
19494
  import {
19410
19495
  $createNodeSelection as $createNodeSelection20,
19411
19496
  $createParagraphNode as $createParagraphNode23,
19412
19497
  $getNodeByKey as $getNodeByKey57,
19413
- $getRoot as $getRoot22,
19498
+ $getRoot as $getRoot23,
19414
19499
  $setSelection as $setSelection24,
19415
19500
  COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR16,
19416
19501
  createCommand as createCommand21,
19417
19502
  createEditor as createEditor9
19418
19503
  } from "lexical";
19419
- import { useEffect as useEffect90, useRef as useRef61 } from "react";
19420
- import { Fragment as Fragment49, jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
19504
+ import { useEffect as useEffect91, useRef as useRef61 } from "react";
19505
+ import { Fragment as Fragment50, jsx as jsx130, jsxs as jsxs48 } from "react/jsx-runtime";
19421
19506
  var INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND = createCommand21("INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND");
19422
19507
  function FinancialStatementQuestionPlugin() {
19423
19508
  const {
@@ -19426,9 +19511,9 @@ function FinancialStatementQuestionPlugin() {
19426
19511
  drawer,
19427
19512
  toggleSettingsPanelSwitch
19428
19513
  } = useBlockEditor();
19429
- const [editor] = useLexicalComposerContext69();
19514
+ const [editor] = useLexicalComposerContext70();
19430
19515
  const settingsPanelStickyRef = useRef61(null);
19431
- useEffect90(() => {
19516
+ useEffect91(() => {
19432
19517
  return mergeRegister29(
19433
19518
  editor.registerCommand(
19434
19519
  INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND,
@@ -19441,7 +19526,7 @@ function FinancialStatementQuestionPlugin() {
19441
19526
  if (targetNode) {
19442
19527
  const headerEditor = createEditor9();
19443
19528
  headerEditor.update(() => {
19444
- const root = $getRoot22();
19529
+ const root = $getRoot23();
19445
19530
  const paragraph = $createParagraphNode23();
19446
19531
  root.append(paragraph);
19447
19532
  });
@@ -19472,7 +19557,7 @@ function FinancialStatementQuestionPlugin() {
19472
19557
  )
19473
19558
  );
19474
19559
  }, [editor]);
19475
- useEffect90(() => {
19560
+ useEffect91(() => {
19476
19561
  if (isBlockEditorReady) {
19477
19562
  if (settingsPanelStickyRef.current) {
19478
19563
  registerSettingsPanel(
@@ -19482,21 +19567,21 @@ function FinancialStatementQuestionPlugin() {
19482
19567
  }
19483
19568
  }
19484
19569
  }, [isBlockEditorReady]);
19485
- return /* @__PURE__ */ jsxs48(Fragment49, { children: [
19486
- drawer && /* @__PURE__ */ jsx129(
19570
+ return /* @__PURE__ */ jsxs48(Fragment50, { children: [
19571
+ drawer && /* @__PURE__ */ jsx130(
19487
19572
  StickyToPosition,
19488
19573
  {
19489
19574
  ref: settingsPanelStickyRef,
19490
19575
  container: drawer,
19491
19576
  children: (data, position, isVisible) => {
19492
- return /* @__PURE__ */ jsx129("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx129(
19577
+ return /* @__PURE__ */ jsx130("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx130(
19493
19578
  SettingsCard,
19494
19579
  {
19495
19580
  isVisible: !!isVisible,
19496
19581
  container: drawer,
19497
19582
  title: "Financial Statement Settings",
19498
19583
  onClose: toggleSettingsPanelSwitch,
19499
- children: isVisible && /* @__PURE__ */ jsx129(
19584
+ children: isVisible && /* @__PURE__ */ jsx130(
19500
19585
  FinancialStatementQuestionSettings,
19501
19586
  {
19502
19587
  nodeKey: data.nodeKey
@@ -19508,36 +19593,36 @@ function FinancialStatementQuestionPlugin() {
19508
19593
  }
19509
19594
  }
19510
19595
  ),
19511
- /* @__PURE__ */ jsx129(FillInTheBlankSpaceSettingsPlugin, {})
19596
+ /* @__PURE__ */ jsx130(FillInTheBlankSpaceSettingsPlugin, {})
19512
19597
  ] });
19513
19598
  }
19514
19599
 
19515
19600
  // src/modules/Questions.tsx
19516
- import { useEffect as useEffect91 } from "react";
19517
- import { Fragment as Fragment50, jsx as jsx130, jsxs as jsxs49 } from "react/jsx-runtime";
19601
+ import { useEffect as useEffect92 } from "react";
19602
+ import { Fragment as Fragment51, jsx as jsx131, jsxs as jsxs49 } from "react/jsx-runtime";
19518
19603
  function Questions() {
19519
19604
  const { registerModule } = useBlockEditor();
19520
- useEffect91(() => {
19605
+ useEffect92(() => {
19521
19606
  registerModule("Questions");
19522
19607
  }, [registerModule]);
19523
- return /* @__PURE__ */ jsxs49(Fragment50, { children: [
19524
- /* @__PURE__ */ jsx130(MultipleOptionQuestionPlugin, {}),
19525
- /* @__PURE__ */ jsx130(ShortAnswerQuestionPlugin, {}),
19526
- /* @__PURE__ */ jsx130(MatchingQuestionPlugin, {}),
19527
- /* @__PURE__ */ jsx130(FillInTheBlankQuestionPlugin, {}),
19528
- /* @__PURE__ */ jsx130(JournalEntryQuestionPlugin, {}),
19529
- /* @__PURE__ */ jsx130(FinancialStatementQuestionPlugin, {}),
19530
- /* @__PURE__ */ jsx130(EssayQuestionPlugin, {})
19608
+ return /* @__PURE__ */ jsxs49(Fragment51, { children: [
19609
+ /* @__PURE__ */ jsx131(MultipleOptionQuestionPlugin, {}),
19610
+ /* @__PURE__ */ jsx131(ShortAnswerQuestionPlugin, {}),
19611
+ /* @__PURE__ */ jsx131(MatchingQuestionPlugin, {}),
19612
+ /* @__PURE__ */ jsx131(FillInTheBlankQuestionPlugin, {}),
19613
+ /* @__PURE__ */ jsx131(JournalEntryQuestionPlugin, {}),
19614
+ /* @__PURE__ */ jsx131(FinancialStatementQuestionPlugin, {}),
19615
+ /* @__PURE__ */ jsx131(EssayQuestionPlugin, {})
19531
19616
  ] });
19532
19617
  }
19533
19618
 
19534
19619
  // src/modules/SettingsPanel.tsx
19535
- import { useEffect as useEffect92 } from "react";
19536
- import { jsx as jsx131 } from "react/jsx-runtime";
19620
+ import { useEffect as useEffect93 } from "react";
19621
+ import { jsx as jsx132 } from "react/jsx-runtime";
19537
19622
  function SettingsPanel(props) {
19538
19623
  const { defaultOpen = true } = props;
19539
19624
  const { registerModule, openSettingsPanel } = useBlockEditor();
19540
- useEffect92(() => {
19625
+ useEffect93(() => {
19541
19626
  registerModule("SettingsPanel");
19542
19627
  setTimeout(() => {
19543
19628
  if (defaultOpen) {
@@ -19545,26 +19630,26 @@ function SettingsPanel(props) {
19545
19630
  }
19546
19631
  }, 50);
19547
19632
  }, [registerModule, defaultOpen, openSettingsPanel]);
19548
- return /* @__PURE__ */ jsx131(SettingsPanelPlugin, {});
19633
+ return /* @__PURE__ */ jsx132(SettingsPanelPlugin, {});
19549
19634
  }
19550
19635
 
19551
19636
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
19552
- import { useEffect as useEffect94, useRef as useRef63 } from "react";
19637
+ import { useEffect as useEffect95, useRef as useRef63 } from "react";
19553
19638
 
19554
19639
  // src/plugins/VariablesPlugin/VariableSettings.tsx
19555
- import { useLexicalComposerContext as useLexicalComposerContext70 } from "@lexical/react/LexicalComposerContext";
19640
+ import { useLexicalComposerContext as useLexicalComposerContext71 } from "@lexical/react/LexicalComposerContext";
19556
19641
  import {
19557
19642
  $createTextNode as $createTextNode8,
19558
19643
  $getNodeByKey as $getNodeByKey58
19559
19644
  } from "lexical";
19560
19645
  import { Pencil as Pencil2, Save, Trash2 as Trash27 } from "lucide-react";
19561
19646
  import {
19562
- useEffect as useEffect93,
19647
+ useEffect as useEffect94,
19563
19648
  useMemo as useMemo15,
19564
19649
  useRef as useRef62,
19565
- useState as useState23
19650
+ useState as useState24
19566
19651
  } from "react";
19567
- import { Fragment as Fragment51, jsx as jsx132, jsxs as jsxs50 } from "react/jsx-runtime";
19652
+ import { Fragment as Fragment52, jsx as jsx133, jsxs as jsxs50 } from "react/jsx-runtime";
19568
19653
  var controlGridStyle = {
19569
19654
  width: "100%",
19570
19655
  display: "flex",
@@ -19596,12 +19681,12 @@ function VariableSettings(props) {
19596
19681
  getEditingModeDataCallback
19597
19682
  } = useBlockEditor();
19598
19683
  const { variableList, onRenamed } = useVariables();
19599
- const [editor] = useLexicalComposerContext70();
19684
+ const [editor] = useLexicalComposerContext71();
19600
19685
  const activeEditorRef = useRef62();
19601
- const [currentVariableNode, setCurrentVariableNode] = useState23();
19602
- const [isSettingsEditingMode, setSettingsEditingMode] = useState23(false);
19686
+ const [currentVariableNode, setCurrentVariableNode] = useState24();
19687
+ const [isSettingsEditingMode, setSettingsEditingMode] = useState24(false);
19603
19688
  const variableNameInputRef = useRef62(null);
19604
- useEffect93(() => {
19689
+ useEffect94(() => {
19605
19690
  if (nodeKey) {
19606
19691
  activeEditorRef.current = nestedEditorId ? getNestedEditor(nestedEditorId) || editor : editor;
19607
19692
  if (activeEditorRef.current) {
@@ -19786,8 +19871,8 @@ function VariableSettings(props) {
19786
19871
  if (!currentVariableNode) {
19787
19872
  return null;
19788
19873
  }
19789
- return /* @__PURE__ */ jsxs50(Fragment51, { children: [
19790
- /* @__PURE__ */ jsx132("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx132(
19874
+ return /* @__PURE__ */ jsxs50(Fragment52, { children: [
19875
+ /* @__PURE__ */ jsx133("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx133(
19791
19876
  Button,
19792
19877
  {
19793
19878
  className: "button__fullwidth",
@@ -19807,9 +19892,9 @@ function VariableSettings(props) {
19807
19892
  }
19808
19893
  ) }),
19809
19894
  /* @__PURE__ */ jsxs50("div", { style: formFieldStyle, children: [
19810
- /* @__PURE__ */ jsx132("div", { style: formFieldLabel, children: "Name" }),
19895
+ /* @__PURE__ */ jsx133("div", { style: formFieldLabel, children: "Name" }),
19811
19896
  /* @__PURE__ */ jsxs50("div", { style: controlGridStyle, children: [
19812
- /* @__PURE__ */ jsx132("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx132(
19897
+ /* @__PURE__ */ jsx133("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx133(
19813
19898
  "form",
19814
19899
  {
19815
19900
  onSubmit: (e) => {
@@ -19817,7 +19902,7 @@ function VariableSettings(props) {
19817
19902
  e.preventDefault();
19818
19903
  updateVariableName();
19819
19904
  },
19820
- children: /* @__PURE__ */ jsx132(
19905
+ children: /* @__PURE__ */ jsx133(
19821
19906
  TextInput,
19822
19907
  {
19823
19908
  ref: variableNameInputRef,
@@ -19829,7 +19914,7 @@ function VariableSettings(props) {
19829
19914
  }
19830
19915
  )
19831
19916
  }
19832
- ) : /* @__PURE__ */ jsx132(
19917
+ ) : /* @__PURE__ */ jsx133(
19833
19918
  DropdownButton,
19834
19919
  {
19835
19920
  className: "button__fullwidth button__left_aligned",
@@ -19842,7 +19927,7 @@ function VariableSettings(props) {
19842
19927
  menu: variablesMenu
19843
19928
  }
19844
19929
  ) }),
19845
- /* @__PURE__ */ jsx132("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx132(
19930
+ /* @__PURE__ */ jsx133("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx133(
19846
19931
  Button,
19847
19932
  {
19848
19933
  StartIcon: Save,
@@ -19850,7 +19935,7 @@ function VariableSettings(props) {
19850
19935
  size: "small",
19851
19936
  onClick: updateVariableName
19852
19937
  }
19853
- ) : /* @__PURE__ */ jsx132(
19938
+ ) : /* @__PURE__ */ jsx133(
19854
19939
  Button,
19855
19940
  {
19856
19941
  StartIcon: Pencil2,
@@ -19864,8 +19949,8 @@ function VariableSettings(props) {
19864
19949
  ] })
19865
19950
  ] }),
19866
19951
  /* @__PURE__ */ jsxs50("div", { style: formFieldStyle, children: [
19867
- /* @__PURE__ */ jsx132("div", { style: formFieldLabel, children: "Type" }),
19868
- /* @__PURE__ */ jsx132(
19952
+ /* @__PURE__ */ jsx133("div", { style: formFieldLabel, children: "Type" }),
19953
+ /* @__PURE__ */ jsx133(
19869
19954
  DropdownButton,
19870
19955
  {
19871
19956
  className: "button__fullwidth button__left_aligned",
@@ -19880,8 +19965,8 @@ function VariableSettings(props) {
19880
19965
  )
19881
19966
  ] }),
19882
19967
  currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs50("div", { style: formFieldStyle, children: [
19883
- /* @__PURE__ */ jsx132("div", { style: formFieldLabel, children: "Format" }),
19884
- /* @__PURE__ */ jsx132(
19968
+ /* @__PURE__ */ jsx133("div", { style: formFieldLabel, children: "Format" }),
19969
+ /* @__PURE__ */ jsx133(
19885
19970
  DropdownButton,
19886
19971
  {
19887
19972
  className: "button__fullwidth button__left_aligned",
@@ -19895,7 +19980,7 @@ function VariableSettings(props) {
19895
19980
  }
19896
19981
  )
19897
19982
  ] }),
19898
- /* @__PURE__ */ jsx132("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx132(
19983
+ /* @__PURE__ */ jsx133("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx133(
19899
19984
  Button,
19900
19985
  {
19901
19986
  size: "small",
@@ -19937,7 +20022,7 @@ function VariableSettings(props) {
19937
20022
  }
19938
20023
 
19939
20024
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
19940
- import { Fragment as Fragment52, jsx as jsx133 } from "react/jsx-runtime";
20025
+ import { Fragment as Fragment53, jsx as jsx134 } from "react/jsx-runtime";
19941
20026
  function VariableSettingsPlugin() {
19942
20027
  const {
19943
20028
  registerSettingsPanel,
@@ -19946,7 +20031,7 @@ function VariableSettingsPlugin() {
19946
20031
  toggleSettingsPanelSwitch
19947
20032
  } = useBlockEditor();
19948
20033
  const settingsPanelStickyRef = useRef63(null);
19949
- useEffect94(() => {
20034
+ useEffect95(() => {
19950
20035
  if (isBlockEditorReady) {
19951
20036
  if (settingsPanelStickyRef.current) {
19952
20037
  registerSettingsPanel(
@@ -19956,20 +20041,20 @@ function VariableSettingsPlugin() {
19956
20041
  }
19957
20042
  }
19958
20043
  }, [isBlockEditorReady]);
19959
- return /* @__PURE__ */ jsx133(Fragment52, { children: drawer && /* @__PURE__ */ jsx133(
20044
+ return /* @__PURE__ */ jsx134(Fragment53, { children: drawer && /* @__PURE__ */ jsx134(
19960
20045
  StickyToPosition,
19961
20046
  {
19962
20047
  ref: settingsPanelStickyRef,
19963
20048
  container: drawer,
19964
20049
  children: (data, position, isVisible) => {
19965
- return /* @__PURE__ */ jsx133("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx133(
20050
+ return /* @__PURE__ */ jsx134("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx134(
19966
20051
  SettingsCard,
19967
20052
  {
19968
20053
  isVisible: !!isVisible,
19969
20054
  container: drawer,
19970
20055
  title: "Variable Settings",
19971
20056
  onClose: toggleSettingsPanelSwitch,
19972
- children: /* @__PURE__ */ jsx133(
20057
+ children: /* @__PURE__ */ jsx134(
19973
20058
  VariableSettings,
19974
20059
  {
19975
20060
  nodeKey: data.nodeKey,
@@ -19985,7 +20070,7 @@ function VariableSettingsPlugin() {
19985
20070
  }
19986
20071
 
19987
20072
  // src/plugins/VariablesPlugin/VariableToolbarPlugin.tsx
19988
- import { useLexicalComposerContext as useLexicalComposerContext71 } from "@lexical/react/LexicalComposerContext";
20073
+ import { useLexicalComposerContext as useLexicalComposerContext72 } from "@lexical/react/LexicalComposerContext";
19989
20074
  import { mergeRegister as mergeRegister30 } from "@lexical/utils";
19990
20075
  import {
19991
20076
  $getNodeByKey as $getNodeByKey59,
@@ -19993,22 +20078,22 @@ import {
19993
20078
  $isNodeSelection as $isNodeSelection6,
19994
20079
  COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL4
19995
20080
  } from "lexical";
19996
- import debounce7 from "lodash-es/debounce";
20081
+ import debounce8 from "lodash-es/debounce";
19997
20082
  import { Bold as Bold2, Italic as Italic2, Underline as Underline2 } from "lucide-react";
19998
20083
  import {
19999
- useCallback as useCallback16,
20000
- useEffect as useEffect95,
20084
+ useCallback as useCallback17,
20085
+ useEffect as useEffect96,
20001
20086
  useMemo as useMemo16,
20002
20087
  useRef as useRef64,
20003
- useState as useState24
20088
+ useState as useState25
20004
20089
  } from "react";
20005
- import { jsx as jsx134 } from "react/jsx-runtime";
20090
+ import { jsx as jsx135 } from "react/jsx-runtime";
20006
20091
  function VariableToolbarPlugin() {
20007
- const [editor] = useLexicalComposerContext71();
20092
+ const [editor] = useLexicalComposerContext72();
20008
20093
  const popupToolbarRef = useRef64(null);
20009
20094
  const activeEditorRef = useRef64();
20010
20095
  const selectedNodeRef = useRef64();
20011
- const [toolbarState, setToolbarState] = useState24({
20096
+ const [toolbarState, setToolbarState] = useState25({
20012
20097
  isBold: false,
20013
20098
  isItalic: false,
20014
20099
  isUnderline: false
@@ -20083,8 +20168,8 @@ function VariableToolbarPlugin() {
20083
20168
  }
20084
20169
  }
20085
20170
  };
20086
- const repositionPopupToolbar = useCallback16(
20087
- debounce7(() => {
20171
+ const repositionPopupToolbar = useCallback17(
20172
+ debounce8(() => {
20088
20173
  if (selectedNodeRef.current) {
20089
20174
  if (activeEditorRef.current) {
20090
20175
  const selectedElement = activeEditorRef.current.getElementByKey(
@@ -20111,7 +20196,7 @@ function VariableToolbarPlugin() {
20111
20196
  }, 10),
20112
20197
  [activeEditorRef.current]
20113
20198
  );
20114
- useEffect95(() => {
20199
+ useEffect96(() => {
20115
20200
  return mergeRegister30(
20116
20201
  editor.registerCommand(
20117
20202
  VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND,
@@ -20151,7 +20236,7 @@ function VariableToolbarPlugin() {
20151
20236
  )
20152
20237
  );
20153
20238
  }, [editor]);
20154
- useEffect95(() => {
20239
+ useEffect96(() => {
20155
20240
  window.addEventListener("scroll", repositionPopupToolbar);
20156
20241
  window.addEventListener("resize", repositionPopupToolbar);
20157
20242
  return () => {
@@ -20195,19 +20280,19 @@ function VariableToolbarPlugin() {
20195
20280
  ];
20196
20281
  return resultList;
20197
20282
  }, [toolbarState]);
20198
- return /* @__PURE__ */ jsx134(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
20283
+ return /* @__PURE__ */ jsx135(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
20199
20284
  }
20200
20285
 
20201
20286
  // src/modules/Variables.tsx
20202
- import { useEffect as useEffect96 } from "react";
20203
- import { jsx as jsx135, jsxs as jsxs51 } from "react/jsx-runtime";
20287
+ import { useEffect as useEffect97 } from "react";
20288
+ import { jsx as jsx136, jsxs as jsxs51 } from "react/jsx-runtime";
20204
20289
  function Variables(props) {
20205
20290
  const { variablesSettings } = props;
20206
20291
  const { registerModule, setEditingModeDataCallback } = useBlockEditor();
20207
- useEffect96(() => {
20292
+ useEffect97(() => {
20208
20293
  registerModule("Variables");
20209
20294
  }, [registerModule]);
20210
- useEffect96(() => {
20295
+ useEffect97(() => {
20211
20296
  setEditingModeDataCallback(() => {
20212
20297
  return {
20213
20298
  variableValues: variablesSettings.getVariableValues()
@@ -20215,10 +20300,10 @@ function Variables(props) {
20215
20300
  });
20216
20301
  }, [variablesSettings, setEditingModeDataCallback]);
20217
20302
  return /* @__PURE__ */ jsxs51(VariablesProvider, { variablesSettings, children: [
20218
- /* @__PURE__ */ jsx135(TypeaheadVariablePlugin, {}),
20219
- /* @__PURE__ */ jsx135(VariableSettingsPlugin, {}),
20220
- /* @__PURE__ */ jsx135(VariableToolbarPlugin, {}),
20221
- /* @__PURE__ */ jsx135(VariableToolbarAgentPlugin, {})
20303
+ /* @__PURE__ */ jsx136(TypeaheadVariablePlugin, {}),
20304
+ /* @__PURE__ */ jsx136(VariableSettingsPlugin, {}),
20305
+ /* @__PURE__ */ jsx136(VariableToolbarPlugin, {}),
20306
+ /* @__PURE__ */ jsx136(VariableToolbarAgentPlugin, {})
20222
20307
  ] });
20223
20308
  }
20224
20309
  export {