eat-js-sdk 2.3.8 → 2.3.9

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.
@@ -5444,6 +5444,7 @@ function CommonStringToHtml($$anchor, $$props) {
5444
5444
  let processedHtml = /* @__PURE__ */ user_derived(() => processHtmlString(htmlString(), htmlHeading()));
5445
5445
  let containerEl = /* @__PURE__ */ state(void 0);
5446
5446
  user_effect(() => {
5447
+ get$1(processedHtml);
5447
5448
  if (get$1(hasMath) && get$1(containerEl)) {
5448
5449
  typesetMathJax(get$1(containerEl));
5449
5450
  }
@@ -5834,7 +5835,7 @@ function ResultIcon($$anchor, $$props) {
5834
5835
  return pop($$exports);
5835
5836
  }
5836
5837
  create_custom_element(ResultIcon, { isCorrect: {}, iconType: {}, parentProps: {} }, [], [], true);
5837
- var root_3$e = /* @__PURE__ */ from_html(`<span class="sr-only">Alert. &nbsp;</span>`);
5838
+ var root_3$d = /* @__PURE__ */ from_html(`<span class="sr-only">Alert. &nbsp;</span>`);
5838
5839
  var root_1$m = /* @__PURE__ */ from_html(`<div data-testid="feedback-alt"><!> <div><!> <span><!></span></div></div>`);
5839
5840
  function FeedbackAlert($$anchor, $$props) {
5840
5841
  push($$props, true);
@@ -5927,7 +5928,7 @@ function FeedbackAlert($$anchor, $$props) {
5927
5928
  var node_2 = child(div_1);
5928
5929
  {
5929
5930
  var consequent_1 = ($$anchor3) => {
5930
- var span = root_3$e();
5931
+ var span = root_3$d();
5931
5932
  append($$anchor3, span);
5932
5933
  };
5933
5934
  if_block(node_2, ($$render) => {
@@ -6959,9 +6960,9 @@ function useImageModalSize() {
6959
6960
  calculateStimulusImageLayout
6960
6961
  };
6961
6962
  }
6962
- var root_3$d = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6963
+ var root_3$c = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6963
6964
  var root_4$7 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6964
- var root_5$8 = /* @__PURE__ */ from_html(`<div><span aria-hidden="true"><!></span></div>`);
6965
+ var root_5$9 = /* @__PURE__ */ from_html(`<div><span aria-hidden="true"><!></span></div>`);
6965
6966
  var root_8$6 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6966
6967
  var root_9$4 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6967
6968
  var root_2$d = /* @__PURE__ */ from_html(`<div class="absolute inset-0 m-0"><div class="w-full h-full px-0 md:px-[82px] lg:px-[128px] pt-14 pb-[72px] relative lg:py-24 flex flex-col items-center justify-center"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="w-full h-full flex flex-col md:flex-row md:justify-center items-center justify-between"><div class="md:hidden"></div> <!> <!> <div><div class="flex-shrink-0 flex items-center justify-between py-1 px-2 md:px-4 border-border-minimal border rounded-t-md lg:rounded-t-lg md:gap-4 h-8.5 md:h-fit"><!> <!> <!></div> <div class="rounded-b-md"><img class="mx-auto block rounded-b-md lg:rounded-b-lg object-contain max-w-full max-h-[calc(100vh-168px-34px)] md:max-h-[calc(100vh-128px-54px)] lg:max-h-[calc(100vh-192px-54px)] pointer-events-none"/></div></div> <div class="md:hidden flex justify-center items-center gap-1 flex-shrink-0 h-6 mt-4"><!> <!></div></div></div></div>`);
@@ -7189,7 +7190,7 @@ function MCQImageModal($$anchor, $$props) {
7189
7190
  dataTestId: "img-viewer-prev",
7190
7191
  onclick: navigatePrevious,
7191
7192
  children: ($$anchor4, $$slotProps2) => {
7192
- var span = root_3$d();
7193
+ var span = root_3$c();
7193
7194
  var node_2 = child(span);
7194
7195
  SvgLoader(node_2, {
7195
7196
  svgName: "smallChevronLeft",
@@ -7245,7 +7246,7 @@ function MCQImageModal($$anchor, $$props) {
7245
7246
  return get$1(fullAnswerText);
7246
7247
  },
7247
7248
  children: ($$anchor4, $$slotProps2) => {
7248
- var div_6 = root_5$8();
7249
+ var div_6 = root_5$9();
7249
7250
  var span_2 = child(div_6);
7250
7251
  var node_6 = child(span_2);
7251
7252
  {
@@ -7558,7 +7559,7 @@ function InteractionSection($$anchor, $$props) {
7558
7559
  return pop($$exports);
7559
7560
  }
7560
7561
  create_custom_element(InteractionSection, { children: {} }, [], [], true);
7561
- var root_5$7 = /* @__PURE__ */ from_html(`<div></div>`);
7562
+ var root_5$8 = /* @__PURE__ */ from_html(`<div></div>`);
7562
7563
  var root_4$6 = /* @__PURE__ */ from_html(`<div class="px-4 w-full max-w-[1008px] mx-auto flex-shrink-0 text-center font-semibold text-sm md:text-lg leading-[150%] text-white" aria-hidden="true" data-testid="img-viewer-cap-txt"> </div> <!>`, 1);
7563
7564
  var root_7$5 = /* @__PURE__ */ from_html(`<div></div>`);
7564
7565
  var root_2$c = /* @__PURE__ */ from_html(`<div class="absolute inset-0"><div class="w-full h-full flex items-center justify-center pt-14 pb-[72px] lg:py-24"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="flex flex-col items-center overflow-y-auto overflow-x-hidden w-full px-0 md:px-6 lg:px-16"><div class="relative bg-white rounded-md md:rounded-lg shadow-sm overflow-hidden flex-shrink-0"><img class="block object-contain w-full h-auto max-w-full mx-auto"/> <!></div> <!></div></div></div>`);
@@ -7732,7 +7733,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7732
7733
  var node_3 = sibling(div_5, 2);
7733
7734
  {
7734
7735
  var consequent = ($$anchor5) => {
7735
- var div_6 = root_5$7();
7736
+ var div_6 = root_5$8();
7736
7737
  template_effect(() => set_style(div_6, `height:${get$1(bottomSpacerHeight) ?? ""}px`));
7737
7738
  append($$anchor5, div_6);
7738
7739
  };
@@ -8215,7 +8216,7 @@ const shouldRenderSection = (section) => section.condition !== false;
8215
8216
  const getClassString = (classes = []) => classes.join(" ");
8216
8217
  const getStyleString = (styles = {}) => Object.entries(styles).map(([k, v]) => `${k}:${v}`).join(";");
8217
8218
  var root_4$5 = /* @__PURE__ */ from_html(`<p class="text-lg leading-[22px] text-blue-1000 font-semibold mt-4" data-testid="img-cap-txt"> </p>`);
8218
- var root_5$6 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content" data-testid="img-desc-txt"><!></div></div>`);
8219
+ var root_5$7 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content" data-testid="img-desc-txt"><!></div></div>`);
8219
8220
  var root_2$b = /* @__PURE__ */ from_html(`<div class="flex flex-col justify-center items-center text-center"><div class="flex flex-col items-center"><div class="relative inline-block"><img/> <!></div> <!></div></div> <!>`, 1);
8220
8221
  var root_1$j = /* @__PURE__ */ from_html(`<div class="w-full"><!></div>`);
8221
8222
  function CommonMedia($$anchor, $$props) {
@@ -8348,7 +8349,7 @@ function CommonMedia($$anchor, $$props) {
8348
8349
  var node_4 = sibling(div_1, 2);
8349
8350
  {
8350
8351
  var consequent_1 = ($$anchor4) => {
8351
- var div_4 = root_5$6();
8352
+ var div_4 = root_5$7();
8352
8353
  var button = child(div_4);
8353
8354
  button.__click = toggleLongDescription;
8354
8355
  button.__keydown = handleKeyDown;
@@ -8437,11 +8438,11 @@ create_custom_element(
8437
8438
  true
8438
8439
  );
8439
8440
  var root_4$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8440
- var root_5$5 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8441
- var root_3$c = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8441
+ var root_5$6 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8442
+ var root_3$b = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8442
8443
  var root_7$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8443
8444
  var root_8$5 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8444
- var root_6$2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8445
+ var root_6$3 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8445
8446
  var root_1$i = /* @__PURE__ */ from_html(`<div class="stimulus-section flex flex-col w-full"><!> <div><!></div></div>`);
8446
8447
  function StimulusSection($$anchor, $$props) {
8447
8448
  push($$props, true);
@@ -8530,7 +8531,7 @@ function StimulusSection($$anchor, $$props) {
8530
8531
  var node_2 = child(div_1);
8531
8532
  {
8532
8533
  var consequent_3 = ($$anchor3) => {
8533
- var fragment_2 = root_3$c();
8534
+ var fragment_2 = root_3$b();
8534
8535
  var node_3 = first_child(fragment_2);
8535
8536
  {
8536
8537
  var consequent_1 = ($$anchor4) => {
@@ -8555,7 +8556,7 @@ function StimulusSection($$anchor, $$props) {
8555
8556
  var node_5 = sibling(node_3, 2);
8556
8557
  {
8557
8558
  var consequent_2 = ($$anchor4) => {
8558
- var div_3 = root_5$5();
8559
+ var div_3 = root_5$6();
8559
8560
  let classes_2;
8560
8561
  var node_6 = child(div_3);
8561
8562
  CommonMedia(node_6, {
@@ -8590,7 +8591,7 @@ function StimulusSection($$anchor, $$props) {
8590
8591
  append($$anchor3, fragment_2);
8591
8592
  };
8592
8593
  var alternate = ($$anchor3) => {
8593
- var fragment_3 = root_6$2();
8594
+ var fragment_3 = root_6$3();
8594
8595
  var node_7 = first_child(fragment_3);
8595
8596
  {
8596
8597
  var consequent_4 = ($$anchor4) => {
@@ -8679,7 +8680,7 @@ create_custom_element(
8679
8680
  true
8680
8681
  );
8681
8682
  var root_8$4 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8682
- var root_13$1 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8683
+ var root_13$2 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8683
8684
  var root_15$1 = /* @__PURE__ */ from_html(`<div aria-live="polite"><!></div>`);
8684
8685
  var root_1$h = /* @__PURE__ */ from_html(`<div><!></div>`);
8685
8686
  var root_16$2 = /* @__PURE__ */ from_html(`<div><!></div>`);
@@ -8880,7 +8881,7 @@ function PromptContainer($$anchor, $$props) {
8880
8881
  var node_6 = first_child(fragment_10);
8881
8882
  {
8882
8883
  var consequent_5 = ($$anchor8) => {
8883
- var div_5 = root_13$1();
8884
+ var div_5 = root_13$2();
8884
8885
  append($$anchor8, div_5);
8885
8886
  };
8886
8887
  var alternate = ($$anchor8) => {
@@ -9068,9 +9069,9 @@ create_custom_element(
9068
9069
  );
9069
9070
  var root_1$g = /* @__PURE__ */ from_html(`<span> </span>`);
9070
9071
  var root_2$a = /* @__PURE__ */ from_html(`<span>Missing answer</span>`);
9071
- var root_3$b = /* @__PURE__ */ from_html(`<p>Missing answer</p>`);
9072
+ var root_3$a = /* @__PURE__ */ from_html(`<p>Missing answer</p>`);
9072
9073
  var root_4$3 = /* @__PURE__ */ from_html(`<p class="text-red-400 text-sm font-semibold leading-[1.3] pr-2.5 hidden md:block"> </p>`);
9073
- var root_5$4 = /* @__PURE__ */ from_html(`<span aria-hidden="true"><!></span>`);
9074
+ var root_5$5 = /* @__PURE__ */ from_html(`<span aria-hidden="true"><!></span>`);
9074
9075
  var root_9$3 = /* @__PURE__ */ from_html(`<span class="w-3 h-2 flex items-center justify-center"><!></span>`);
9075
9076
  var root_8$3 = /* @__PURE__ */ from_html(`<span><!></span>`);
9076
9077
  var root_10$3 = /* @__PURE__ */ from_html(`<div class="w-full overflow-hidden bg-white rounded-b-lg flex items-center justify-center relative"><img class="mcq-opt-img min-h-[154px] max-h-[184px] w-auto max-w-full object-contain pointer-events-none" data-testid="mcq-opt-img" loading="lazy"/></div>`);
@@ -9214,7 +9215,7 @@ function MCQOption($$anchor, $$props) {
9214
9215
  var node_3 = child(span_7);
9215
9216
  {
9216
9217
  var consequent_2 = ($$anchor2) => {
9217
- var p = root_3$b();
9218
+ var p = root_3$a();
9218
9219
  template_effect(() => set_class(p, 1, `text-green-750 text-sm font-semibold leading-[1.3] hidden md:block
9219
9220
  ${get$1(totalCorrectAnswers) > 1 ? "pr-2.5" : ""}`));
9220
9221
  append($$anchor2, p);
@@ -9239,7 +9240,7 @@ function MCQOption($$anchor, $$props) {
9239
9240
  var node_5 = sibling(node_4, 2);
9240
9241
  {
9241
9242
  var consequent_5 = ($$anchor2) => {
9242
- var span_8 = root_5$4();
9243
+ var span_8 = root_5$5();
9243
9244
  var node_6 = child(span_8);
9244
9245
  {
9245
9246
  var consequent_4 = ($$anchor3) => {
@@ -9504,7 +9505,7 @@ create_custom_element(
9504
9505
  [],
9505
9506
  true
9506
9507
  );
9507
- var root_3$a = /* @__PURE__ */ from_html(`<div aria-live="polite" class="mb-6"><!></div>`);
9508
+ var root_3$9 = /* @__PURE__ */ from_html(`<div aria-live="polite" class="mb-6"><!></div>`);
9508
9509
  var root$d = /* @__PURE__ */ from_html(`<!> <!>`, 1);
9509
9510
  function MCQComponent($$anchor, $$props) {
9510
9511
  push($$props, true);
@@ -9642,7 +9643,7 @@ function MCQComponent($$anchor, $$props) {
9642
9643
  var node_1 = first_child(fragment_2);
9643
9644
  {
9644
9645
  var consequent = ($$anchor3) => {
9645
- var div = root_3$a();
9646
+ var div = root_3$9();
9646
9647
  var node_2 = child(div);
9647
9648
  MCQFeedback(node_2, {
9648
9649
  get feedbackState() {
@@ -10280,9 +10281,9 @@ create_custom_element(
10280
10281
  true
10281
10282
  );
10282
10283
  var root_1$d = /* @__PURE__ */ from_html(`<p class="p2 text-red-400 mb-3">Student's answer</p>`);
10283
- var root_3$9 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10284
+ var root_3$8 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10284
10285
  var root_2$7 = /* @__PURE__ */ from_html(`<div class="relative"><textarea autocomplete="off" rows="3"></textarea> <!></div>`);
10285
- var root_5$3 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10286
+ var root_5$4 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10286
10287
  var root_4$1 = /* @__PURE__ */ from_html(`<div class="relative"><input autocomplete="off"/> <!></div>`);
10287
10288
  var root$b = /* @__PURE__ */ from_html(`<div class="relative"><!> <!></div>`);
10288
10289
  function TypeInTextField($$anchor, $$props) {
@@ -10435,7 +10436,7 @@ function TypeInTextField($$anchor, $$props) {
10435
10436
  var node_2 = sibling(textarea, 2);
10436
10437
  {
10437
10438
  var consequent_1 = ($$anchor3) => {
10438
- var span = root_3$9();
10439
+ var span = root_3$8();
10439
10440
  var node_3 = child(span);
10440
10441
  {
10441
10442
  let $0 = /* @__PURE__ */ user_derived(() => isSkipped() ? false : Boolean(isCorrect()));
@@ -10486,7 +10487,7 @@ function TypeInTextField($$anchor, $$props) {
10486
10487
  var node_4 = sibling(input, 2);
10487
10488
  {
10488
10489
  var consequent_3 = ($$anchor3) => {
10489
- var span_1 = root_5$3();
10490
+ var span_1 = root_5$4();
10490
10491
  var node_5 = child(span_1);
10491
10492
  {
10492
10493
  let $0 = /* @__PURE__ */ user_derived(() => isSkipped() ? false : Boolean(isCorrect()));
@@ -10621,8 +10622,9 @@ action.update = n.update;
10621
10622
  action.destroy = n.destroy;
10622
10623
  var root_1$c = /* @__PURE__ */ from_html(`<label data-testid="qn-number-txt" aria-hidden="true"><span></span> <span> </span></label>`);
10623
10624
  var root_2$6 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true"><!></div>`);
10624
- var root_3$8 = /* @__PURE__ */ from_html(`<textarea rows="1" readonly=""></textarea>`);
10625
- var root_4 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-[calc(50%+0.375rem)] -translate-y-1/2 flex items-center justify-center"><!></span>`);
10625
+ var root_4 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true" data-testid="ans-sum-corr-txb"><!></div>`);
10626
+ var root_5$3 = /* @__PURE__ */ from_html(`<textarea rows="1" readonly=""></textarea>`);
10627
+ var root_6$2 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-[calc(50%+0.375rem)] -translate-y-1/2 flex items-center justify-center"><!></span>`);
10626
10628
  var root$a = /* @__PURE__ */ from_html(`<div><!> <!> <!></div>`);
10627
10629
  function AnswerDisplay($$anchor, $$props) {
10628
10630
  push($$props, true);
@@ -10802,33 +10804,66 @@ function AnswerDisplay($$anchor, $$props) {
10802
10804
  );
10803
10805
  append($$anchor2, div_1);
10804
10806
  };
10805
- var alternate = ($$anchor2) => {
10806
- var textarea = root_3$8();
10807
- remove_textarea_child(textarea);
10808
- action$1(textarea, ($$node) => action?.($$node));
10809
- template_effect(() => {
10810
- set_attribute(textarea, "aria-label", get$1(ariaLabel));
10811
- set_class(textarea, 1, `${type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb"} ${get$1(textareaClasses) ?? ""}`);
10812
- set_attribute(textarea, "data-testid", type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb");
10813
- set_attribute(textarea, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10814
- set_value(textarea, get$1(displayAnswer));
10815
- set_attribute(textarea, "tabindex", get$1(tabIndex));
10816
- });
10817
- append($$anchor2, textarea);
10807
+ var alternate_1 = ($$anchor2) => {
10808
+ var fragment = comment();
10809
+ var node_3 = first_child(fragment);
10810
+ {
10811
+ var consequent_2 = ($$anchor3) => {
10812
+ var div_2 = root_4();
10813
+ var node_4 = child(div_2);
10814
+ CommonStringToHtml(node_4, {
10815
+ get htmlString() {
10816
+ return get$1(displayAnswer);
10817
+ },
10818
+ otherClass: "overflow-y-visible break-words"
10819
+ });
10820
+ reset(div_2);
10821
+ template_effect(() => {
10822
+ set_attribute(div_2, "aria-label", get$1(ariaLabel));
10823
+ set_class(div_2, 1, `ans-sum-corr-txb ${get$1(textareaClasses) ?? ""}`);
10824
+ set_attribute(div_2, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10825
+ set_attribute(div_2, "tabindex", get$1(tabIndex));
10826
+ });
10827
+ append($$anchor3, div_2);
10828
+ };
10829
+ var alternate = ($$anchor3) => {
10830
+ var textarea = root_5$3();
10831
+ remove_textarea_child(textarea);
10832
+ action$1(textarea, ($$node) => action?.($$node));
10833
+ template_effect(() => {
10834
+ set_attribute(textarea, "aria-label", get$1(ariaLabel));
10835
+ set_class(textarea, 1, get$1(textareaClasses));
10836
+ set_attribute(textarea, "data-testid", type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb");
10837
+ set_attribute(textarea, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10838
+ set_value(textarea, get$1(displayAnswer));
10839
+ set_attribute(textarea, "tabindex", get$1(tabIndex));
10840
+ });
10841
+ append($$anchor3, textarea);
10842
+ };
10843
+ if_block(
10844
+ node_3,
10845
+ ($$render) => {
10846
+ if (type() === "correct") $$render(consequent_2);
10847
+ else $$render(alternate, false);
10848
+ },
10849
+ true
10850
+ );
10851
+ }
10852
+ append($$anchor2, fragment);
10818
10853
  };
10819
10854
  if_block(node_1, ($$render) => {
10820
10855
  if (isDropdownInteraction) $$render(consequent_1);
10821
- else $$render(alternate, false);
10856
+ else $$render(alternate_1, false);
10822
10857
  });
10823
10858
  }
10824
- var node_3 = sibling(node_1, 2);
10859
+ var node_5 = sibling(node_1, 2);
10825
10860
  {
10826
- var consequent_2 = ($$anchor2) => {
10827
- var span_2 = root_4();
10828
- var node_4 = child(span_2);
10861
+ var consequent_3 = ($$anchor2) => {
10862
+ var span_2 = root_6$2();
10863
+ var node_6 = child(span_2);
10829
10864
  {
10830
10865
  let $0 = /* @__PURE__ */ user_derived(() => isCorrect() ? "text-green-900" : "text-red-900");
10831
- ResultIcon(node_4, {
10866
+ ResultIcon(node_6, {
10832
10867
  get isCorrect() {
10833
10868
  return isCorrect();
10834
10869
  },
@@ -10840,8 +10875,8 @@ function AnswerDisplay($$anchor, $$props) {
10840
10875
  reset(span_2);
10841
10876
  append($$anchor2, span_2);
10842
10877
  };
10843
- if_block(node_3, ($$render) => {
10844
- if (showResultIcon() && type() === "student") $$render(consequent_2);
10878
+ if_block(node_5, ($$render) => {
10879
+ if (showResultIcon() && type() === "student") $$render(consequent_3);
10845
10880
  });
10846
10881
  }
10847
10882
  reset(div);
@@ -11124,17 +11159,22 @@ function TypeInFeedback($$anchor, $$props) {
11124
11159
  const showInlineComparisonTable = /* @__PURE__ */ user_derived(() => feedbackState().showComparisonTable && config().variant === "inline");
11125
11160
  const feedbackIconType = /* @__PURE__ */ user_derived(() => isInteractiveMode2() && config().variant === "inline" ? "info" : "result");
11126
11161
  let showDelayedComparisonTable = /* @__PURE__ */ state(false);
11162
+ let hasTriggeredComparisonTable = false;
11127
11163
  user_effect(() => {
11128
11164
  if (get$1(showInlineComparisonTable)) {
11129
- set(showDelayedComparisonTable, false);
11130
- const timer = setTimeout(
11131
- () => {
11132
- set(showDelayedComparisonTable, true);
11133
- },
11134
- 100
11135
- );
11136
- return () => clearTimeout(timer);
11165
+ if (!hasTriggeredComparisonTable) {
11166
+ hasTriggeredComparisonTable = true;
11167
+ set(showDelayedComparisonTable, false);
11168
+ const timer = setTimeout(
11169
+ () => {
11170
+ set(showDelayedComparisonTable, true);
11171
+ },
11172
+ 100
11173
+ );
11174
+ return () => clearTimeout(timer);
11175
+ }
11137
11176
  } else {
11177
+ hasTriggeredComparisonTable = false;
11138
11178
  set(showDelayedComparisonTable, false);
11139
11179
  }
11140
11180
  });
@@ -11290,6 +11330,7 @@ var root_3$7 = /* @__PURE__ */ from_html(`<p></p>`);
11290
11330
  var root_8$2 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-50"></div>`);
11291
11331
  var root_2$4 = /* @__PURE__ */ from_html(`<div class="inline-typein-container mt-6 relative"><!> <div class="divider my-6"></div> <!></div>`);
11292
11332
  var root_10$2 = /* @__PURE__ */ from_html(`<div class="mb-4"><!></div>`);
11333
+ var root_13$1 = /* @__PURE__ */ from_html(`<div role="textbox" tabindex="0" aria-readonly="true" aria-labelledby="missing-answer-label" class="typein-textbox typein-textbox-missing border-2 border-green-700 py-[9px] px-4"><!></div>`);
11293
11334
  var root_12$2 = /* @__PURE__ */ from_html(`<div class="mt-6"><p id="missing-answer-label" class="p2 text-green-750 mb-3">Missing answer</p> <!></div>`);
11294
11335
  var root_9$2 = /* @__PURE__ */ from_html(`<!> <!> <span class="sr-only" aria-live="polite" aria-atomic="true"> </span> <!>`, 1);
11295
11336
  function TypeInComponent($$anchor, $$props) {
@@ -11339,6 +11380,15 @@ function TypeInComponent($$anchor, $$props) {
11339
11380
  return false;
11340
11381
  };
11341
11382
  const isMultiple = config().variant === "inline" ? getIsMultiple(segments) : false;
11383
+ const inlineHasMath = config().variant === "inline" && segments.some((seg) => seg.parts.some((p) => p.type === "text" && hasMathJax(p.content)));
11384
+ let inlineContainerEl = /* @__PURE__ */ state(void 0);
11385
+ user_effect(() => {
11386
+ get$1(inlineInputValues);
11387
+ get$1(feedbackState).showStatusLine;
11388
+ if (inlineHasMath && get$1(inlineContainerEl)) {
11389
+ typesetMathJax(get$1(inlineContainerEl));
11390
+ }
11391
+ });
11342
11392
  const validateAnswer = (answer) => {
11343
11393
  if (!api().validate) return { isValid: false, detail: [] };
11344
11394
  const result = api().validate(answer);
@@ -11522,15 +11572,15 @@ function TypeInComponent($$anchor, $$props) {
11522
11572
  var div = root_2$4();
11523
11573
  var node_1 = child(div);
11524
11574
  each(node_1, 17, () => segments, index, ($$anchor4, segment) => {
11525
- var p = root_3$7();
11526
- each(p, 21, () => get$1(segment).parts, index, ($$anchor5, part, partIndex) => {
11575
+ var p_1 = root_3$7();
11576
+ each(p_1, 21, () => get$1(segment).parts, index, ($$anchor5, part, partIndex) => {
11527
11577
  var fragment_2 = comment();
11528
11578
  var node_2 = first_child(fragment_2);
11529
11579
  {
11530
11580
  var consequent = ($$anchor6) => {
11531
11581
  var fragment_3 = comment();
11532
11582
  var node_3 = first_child(fragment_3);
11533
- html(node_3, () => get$1(part).content);
11583
+ html(node_3, () => processMathJax(get$1(part).content));
11534
11584
  append($$anchor6, fragment_3);
11535
11585
  };
11536
11586
  var alternate = ($$anchor6) => {
@@ -11587,8 +11637,8 @@ function TypeInComponent($$anchor, $$props) {
11587
11637
  }
11588
11638
  append($$anchor5, fragment_2);
11589
11639
  });
11590
- reset(p);
11591
- append($$anchor4, p);
11640
+ reset(p_1);
11641
+ append($$anchor4, p_1);
11592
11642
  });
11593
11643
  var node_5 = sibling(node_1, 4);
11594
11644
  {
@@ -11601,9 +11651,10 @@ function TypeInComponent($$anchor, $$props) {
11601
11651
  });
11602
11652
  }
11603
11653
  reset(div);
11654
+ bind_this(div, ($$value) => set(inlineContainerEl, $$value), () => get$1(inlineContainerEl));
11604
11655
  append($$anchor3, div);
11605
11656
  };
11606
- var alternate_1 = ($$anchor3) => {
11657
+ var alternate_2 = ($$anchor3) => {
11607
11658
  var fragment_6 = root_9$2();
11608
11659
  var node_6 = first_child(fragment_6);
11609
11660
  {
@@ -11679,40 +11730,64 @@ function TypeInComponent($$anchor, $$props) {
11679
11730
  reset(span);
11680
11731
  var node_9 = sibling(span, 2);
11681
11732
  {
11682
- var consequent_5 = ($$anchor4) => {
11733
+ var consequent_6 = ($$anchor4) => {
11683
11734
  var div_3 = root_12$2();
11684
11735
  var node_10 = sibling(child(div_3), 2);
11685
11736
  {
11686
- let $02 = /* @__PURE__ */ user_derived(() => get$1(missingAnswerDisplay) ?? "");
11687
- let $12 = /* @__PURE__ */ user_derived(() => config().variant === "long" ? "long" : "short");
11688
- let $22 = /* @__PURE__ */ user_derived(() => [get$1(missingAnswerDisplay) ?? ""]);
11689
- let $3 = /* @__PURE__ */ user_derived(() => config().variant === "long" ? "long-mis-ans-txa" : "short-mis-ans-txb");
11690
- TypeInTextField(node_10, {
11691
- class: "typein-textbox-missing",
11692
- get value() {
11693
- return get$1($02);
11694
- },
11695
- get variant() {
11696
- return get$1($12);
11697
- },
11698
- readonly: true,
11699
- showStatus: true,
11700
- isCorrect: true,
11701
- hideResultIcon: true,
11702
- get sessionAnswersFlat() {
11703
- return get$1($22);
11704
- },
11705
- "aria-labelledby": "missing-answer-label",
11706
- get dataTestId() {
11707
- return get$1($3);
11737
+ var consequent_5 = ($$anchor5) => {
11738
+ var div_4 = root_13$1();
11739
+ var node_11 = child(div_4);
11740
+ {
11741
+ let $02 = /* @__PURE__ */ user_derived(() => get$1(missingAnswerDisplay) ?? "");
11742
+ CommonStringToHtml(node_11, {
11743
+ get htmlString() {
11744
+ return get$1($02);
11745
+ },
11746
+ otherClass: "break-words"
11747
+ });
11748
+ }
11749
+ reset(div_4);
11750
+ template_effect(() => set_attribute(div_4, "data-testid", config().variant === "long" ? "long-mis-ans-txa" : "short-mis-ans-txb"));
11751
+ append($$anchor5, div_4);
11752
+ };
11753
+ var alternate_1 = ($$anchor5) => {
11754
+ {
11755
+ let $02 = /* @__PURE__ */ user_derived(() => get$1(missingAnswerDisplay) ?? "");
11756
+ let $12 = /* @__PURE__ */ user_derived(() => config().variant === "long" ? "long" : "short");
11757
+ let $22 = /* @__PURE__ */ user_derived(() => [get$1(missingAnswerDisplay) ?? ""]);
11758
+ let $3 = /* @__PURE__ */ user_derived(() => config().variant === "long" ? "long-mis-ans-txa" : "short-mis-ans-txb");
11759
+ TypeInTextField($$anchor5, {
11760
+ class: "typein-textbox-missing",
11761
+ get value() {
11762
+ return get$1($02);
11763
+ },
11764
+ get variant() {
11765
+ return get$1($12);
11766
+ },
11767
+ readonly: true,
11768
+ showStatus: true,
11769
+ isCorrect: true,
11770
+ hideResultIcon: true,
11771
+ get sessionAnswersFlat() {
11772
+ return get$1($22);
11773
+ },
11774
+ "aria-labelledby": "missing-answer-label",
11775
+ get dataTestId() {
11776
+ return get$1($3);
11777
+ }
11778
+ });
11708
11779
  }
11780
+ };
11781
+ if_block(node_10, ($$render) => {
11782
+ if (hasMathJax(get$1(missingAnswerDisplay) ?? "")) $$render(consequent_5);
11783
+ else $$render(alternate_1, false);
11709
11784
  });
11710
11785
  }
11711
11786
  reset(div_3);
11712
11787
  append($$anchor4, div_3);
11713
11788
  };
11714
11789
  if_block(node_9, ($$render) => {
11715
- if (get$1(showMissingAnswer)) $$render(consequent_5);
11790
+ if (get$1(showMissingAnswer)) $$render(consequent_6);
11716
11791
  });
11717
11792
  }
11718
11793
  template_effect(() => set_text(text, get$1(missingAnswerAnnouncement)));
@@ -11720,7 +11795,7 @@ function TypeInComponent($$anchor, $$props) {
11720
11795
  };
11721
11796
  if_block(node, ($$render) => {
11722
11797
  if (config().variant === "inline") $$render(consequent_3);
11723
- else $$render(alternate_1, false);
11798
+ else $$render(alternate_2, false);
11724
11799
  });
11725
11800
  }
11726
11801
  append($$anchor2, fragment_1);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "2.3.8",
4
- "change version": "2.3.0",
3
+ "version": "2.3.9",
4
+ "change version": "2.4.0",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [
7
7
  {