catchup-library-web 2.5.8 → 2.5.10

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.js CHANGED
@@ -3688,41 +3688,33 @@ var ShowBodyMediaByContentType = ({
3688
3688
  case "TEXT":
3689
3689
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mb-1 flex flex-row flex-wrap items-center mx-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "whitespace-pre-wrap", children: retrieveValueParts(value) }) });
3690
3690
  case "IMAGE":
3691
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3692
- "div",
3693
- {
3694
- className: `${convertToPercentage(
3695
- size
3696
- )} rounded-catchup-xlarge relative`,
3697
- children: [
3698
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3691
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
3692
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3693
+ BaseImage_default,
3694
+ {
3695
+ src: value,
3696
+ alt: "body-image",
3697
+ size: "custom",
3698
+ className: "max-h-[50vh] max-w-full object-contain rounded-catchup-xlarge"
3699
+ }
3700
+ ),
3701
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3702
+ "div",
3703
+ {
3704
+ className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
3705
+ onClick: () => handleOpenFullScreen(value),
3706
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3699
3707
  BaseImage_default,
3700
3708
  {
3701
- src: value,
3702
- alt: "body-image",
3709
+ src: "/icons/arrow-up.webp",
3710
+ alt: "expand",
3703
3711
  size: "custom",
3704
- className: "w-full rounded-catchup-xlarge"
3705
- }
3706
- ),
3707
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3708
- "div",
3709
- {
3710
- className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
3711
- onClick: () => handleOpenFullScreen(value),
3712
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3713
- BaseImage_default,
3714
- {
3715
- src: "/icons/arrow-up.webp",
3716
- alt: "expand",
3717
- size: "custom",
3718
- className: "w-full"
3719
- }
3720
- )
3712
+ className: "w-full"
3721
3713
  }
3722
3714
  )
3723
- ]
3724
- }
3725
- ) });
3715
+ }
3716
+ )
3717
+ ] }) });
3726
3718
  case "VIDEO":
3727
3719
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3728
3720
  "video",
@@ -3827,7 +3819,7 @@ var ActivityBodyContent = ({
3827
3819
  key
3828
3820
  });
3829
3821
  }).filter(Boolean);
3830
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col justify-center items-center", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3822
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col justify-center items-center max-h-[40vh] overflow-y-auto", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3831
3823
  ShowBodyMediaByContentType_default,
3832
3824
  {
3833
3825
  index,
@@ -3977,7 +3969,7 @@ var InputGroup = ({
3977
3969
  onRequestClose: () => {
3978
3970
  setShowMathConstructor(false);
3979
3971
  },
3980
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "bg-white rounded-lg overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "p-6 space-y-6", children: [
3972
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "bg-catchup-white rounded-lg overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "p-6 space-y-6", children: [
3981
3973
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "border border-catchup-gray-100 rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3982
3974
  "math-field",
3983
3975
  {
@@ -4224,7 +4216,7 @@ var InputGroup = ({
4224
4216
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4225
4217
  "div",
4226
4218
  {
4227
- className: `w-full border ${errorText ? "border-catchup-red shadow-error" : "border-catchup-gray-100"} rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input ${disabled ? "bg-catchup-lighter-gray" : "bg-white"}`,
4219
+ className: `w-full border ${errorText ? "border-catchup-red shadow-error" : "border-catchup-gray-100"} rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input ${disabled ? "bg-catchup-lighter-gray" : "bg-catchup-white"}`,
4228
4220
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4229
4221
  "input",
4230
4222
  {
@@ -4589,7 +4581,7 @@ var ShowMaterialMediaByContentType = ({
4589
4581
  src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4590
4582
  "div",
4591
4583
  {
4592
- className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1 bg-white bg-opacity-80",
4584
+ className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1 bg-catchup-white bg-opacity-80",
4593
4585
  onMouseEnter: (e) => {
4594
4586
  e.preventDefault();
4595
4587
  },
@@ -5010,13 +5002,13 @@ var FillInTheBlanksActivityMaterialContent = ({
5010
5002
  top: `${mousePosition.y}px`,
5011
5003
  transform: "translate(-50%, -50%)"
5012
5004
  },
5013
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5005
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5014
5006
  InputWithSpecialExpression_default,
5015
5007
  {
5016
5008
  value: draggedOption,
5017
5009
  showSpecialOnly: false
5018
5010
  }
5019
- ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5011
+ ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5020
5012
  ShowMaterialMediaByContentType_default,
5021
5013
  {
5022
5014
  contentType: contentMap.type,
@@ -5036,13 +5028,13 @@ var FillInTheBlanksActivityMaterialContent = ({
5036
5028
  top: `${touchPosition.y}px`,
5037
5029
  transform: "translate(-50%, -50%)"
5038
5030
  },
5039
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5031
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5040
5032
  InputWithSpecialExpression_default,
5041
5033
  {
5042
5034
  value: draggedOption,
5043
5035
  showSpecialOnly: false
5044
5036
  }
5045
- ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5037
+ ) }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5046
5038
  ShowMaterialMediaByContentType_default,
5047
5039
  {
5048
5040
  contentType: contentMap.type,
@@ -5490,7 +5482,7 @@ var GroupingActivityMaterialContent = ({
5490
5482
  top: `${mousePosition.y}px`,
5491
5483
  transform: "translate(-50%, -50%)"
5492
5484
  },
5493
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5485
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5494
5486
  (inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5495
5487
  "span",
5496
5488
  {
@@ -5499,7 +5491,7 @@ var GroupingActivityMaterialContent = ({
5499
5491
  },
5500
5492
  index
5501
5493
  )
5502
- ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5494
+ ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5503
5495
  ShowMaterialMediaByContentType_default,
5504
5496
  {
5505
5497
  contentType: contentMap.type,
@@ -5519,7 +5511,7 @@ var GroupingActivityMaterialContent = ({
5519
5511
  top: `${touchPosition.y}px`,
5520
5512
  transform: "translate(-50%, -50%)"
5521
5513
  },
5522
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5514
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5523
5515
  (inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5524
5516
  "span",
5525
5517
  {
@@ -5528,7 +5520,7 @@ var GroupingActivityMaterialContent = ({
5528
5520
  },
5529
5521
  index
5530
5522
  )
5531
- ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5523
+ ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5532
5524
  ShowMaterialMediaByContentType_default,
5533
5525
  {
5534
5526
  contentType: contentMap.type,
@@ -5919,7 +5911,7 @@ var MatchingActivityMaterialContent = ({
5919
5911
  top: `${mousePosition.y}px`,
5920
5912
  transform: "translate(-50%, -50%)"
5921
5913
  },
5922
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5914
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5923
5915
  (inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5924
5916
  "span",
5925
5917
  {
@@ -5928,7 +5920,7 @@ var MatchingActivityMaterialContent = ({
5928
5920
  },
5929
5921
  index
5930
5922
  )
5931
- ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5923
+ ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5932
5924
  ShowMaterialMediaByContentType_default,
5933
5925
  {
5934
5926
  contentType: contentMap.type,
@@ -5948,7 +5940,7 @@ var MatchingActivityMaterialContent = ({
5948
5940
  top: `${touchPosition.y}px`,
5949
5941
  transform: "translate(-50%, -50%)"
5950
5942
  },
5951
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5943
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
5952
5944
  (inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5953
5945
  "span",
5954
5946
  {
@@ -5957,7 +5949,7 @@ var MatchingActivityMaterialContent = ({
5957
5949
  },
5958
5950
  index
5959
5951
  )
5960
- ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5952
+ ) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5961
5953
  ShowMaterialMediaByContentType_default,
5962
5954
  {
5963
5955
  contentType: contentMap.type,
@@ -6094,7 +6086,8 @@ var MatchingActivityContent = ({
6094
6086
  canAnswerQuestion,
6095
6087
  changeAnswer,
6096
6088
  isPreview,
6097
- showCorrectAnswer
6089
+ showCorrectAnswer,
6090
+ isFullScreen
6098
6091
  }) => {
6099
6092
  const contentMap = parseContentMapFromData(data);
6100
6093
  const matchingBodyMap = parseBodyMapFromData(data, "MATCHING");
@@ -6104,16 +6097,17 @@ var MatchingActivityContent = ({
6104
6097
  answerMap2[key] = value;
6105
6098
  changeAnswer(answerMap2);
6106
6099
  };
6107
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
6108
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6100
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
6101
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6109
6102
  ActivityBodyContent_default,
6110
6103
  {
6111
6104
  bodyMap: matchingBodyMap,
6112
6105
  templateType: "MATCHING"
6113
6106
  }
6114
- ),
6115
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}),
6116
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6107
+ ) }),
6108
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) }),
6109
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerticalDividerLine_default, {}) }),
6110
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6117
6111
  MatchingActivityMaterialContent_default,
6118
6112
  {
6119
6113
  uniqueValue: JSON.stringify(data.contentMap),
@@ -6125,7 +6119,7 @@ var MatchingActivityContent = ({
6125
6119
  isPreview,
6126
6120
  showCorrectAnswer
6127
6121
  }
6128
- )
6122
+ ) })
6129
6123
  ] });
6130
6124
  };
6131
6125
  var MatchingActivityContent_default = MatchingActivityContent;
@@ -6673,45 +6667,8 @@ var OpenEndedActivityContent = ({
6673
6667
  var OpenEndedActivityContent_default = OpenEndedActivityContent;
6674
6668
 
6675
6669
  // src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
6676
- var import_react25 = require("react");
6677
- var import_react_katex9 = require("react-katex");
6678
-
6679
- // src/hooks/useScreenSize.ts
6680
6670
  var import_react24 = require("react");
6681
- var useScreenSize = () => {
6682
- const [containerSize, setContainerSize] = (0, import_react24.useState)({
6683
- width: 0,
6684
- height: 0
6685
- });
6686
- const [screenSize, setScreenSize] = (0, import_react24.useState)({
6687
- width: window.innerWidth,
6688
- height: window.innerHeight
6689
- });
6690
- (0, import_react24.useEffect)(() => {
6691
- const handleResize = () => {
6692
- setScreenSize({
6693
- width: window.innerWidth,
6694
- height: window.innerHeight
6695
- });
6696
- const container = document.getElementById("container");
6697
- if (!container) return;
6698
- const boundingClientRect = container.getBoundingClientRect();
6699
- setContainerSize({
6700
- width: boundingClientRect.width,
6701
- height: boundingClientRect.height
6702
- });
6703
- };
6704
- handleResize();
6705
- window.addEventListener("resize", handleResize);
6706
- return () => {
6707
- window.removeEventListener("resize", handleResize);
6708
- };
6709
- }, []);
6710
- return { screenSize, containerSize };
6711
- };
6712
- var useScreenSize_default = useScreenSize;
6713
-
6714
- // src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
6671
+ var import_react_katex9 = require("react-katex");
6715
6672
  var import_jsx_runtime41 = require("react/jsx-runtime");
6716
6673
  var OrderingActivityMaterialContent = ({
6717
6674
  uniqueValue,
@@ -6723,33 +6680,23 @@ var OrderingActivityMaterialContent = ({
6723
6680
  isPreview,
6724
6681
  showCorrectAnswer
6725
6682
  }) => {
6726
- const [selectedKey, setSelectedKey] = (0, import_react25.useState)(null);
6727
- const [draggedKey, setDraggedKey] = (0, import_react25.useState)(null);
6728
- const [dropTargetKey, setDropTargetKey] = (0, import_react25.useState)(null);
6729
- const [draggedElement, setDraggedElement] = (0, import_react25.useState)(
6683
+ const [selectedKey, setSelectedKey] = (0, import_react24.useState)(null);
6684
+ const [draggedKey, setDraggedKey] = (0, import_react24.useState)(null);
6685
+ const [dropTargetKey, setDropTargetKey] = (0, import_react24.useState)(null);
6686
+ const [draggedElement, setDraggedElement] = (0, import_react24.useState)(
6730
6687
  null
6731
6688
  );
6732
- const dragElementRef = (0, import_react25.useRef)(null);
6733
- const [mousePosition, setMousePosition] = (0, import_react25.useState)({
6689
+ const dragElementRef = (0, import_react24.useRef)(null);
6690
+ const [mousePosition, setMousePosition] = (0, import_react24.useState)({
6734
6691
  x: 0,
6735
6692
  y: 0
6736
6693
  });
6737
- const [touchPosition, setTouchPosition] = (0, import_react25.useState)({
6694
+ const [touchPosition, setTouchPosition] = (0, import_react24.useState)({
6738
6695
  x: 0,
6739
6696
  y: 0
6740
6697
  });
6741
- const { screenSize } = useScreenSize_default();
6742
- const [view, setView] = (0, import_react25.useState)("PC");
6743
- const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react25.useState)(answerMap);
6744
- (0, import_react25.useEffect)(() => {
6745
- if (!screenSize) return;
6746
- if (screenSize.width <= 1024) {
6747
- setView("TABLET");
6748
- } else {
6749
- setView("PC");
6750
- }
6751
- }, [screenSize]);
6752
- (0, import_react25.useEffect)(() => {
6698
+ const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react24.useState)(answerMap);
6699
+ (0, import_react24.useEffect)(() => {
6753
6700
  if (showCorrectAnswer) {
6754
6701
  const correctAnswerMap = {};
6755
6702
  Object.keys(answerMap).forEach((answerKey, index) => {
@@ -6767,26 +6714,6 @@ var OrderingActivityMaterialContent = ({
6767
6714
  }
6768
6715
  return "INCORRECT";
6769
6716
  };
6770
- const calculateMarginTop = (index) => {
6771
- if (index === 0) {
6772
- return 0;
6773
- } else if (index === 1) {
6774
- if (contentMap.type === "TEXT") {
6775
- return 65;
6776
- } else {
6777
- return 130;
6778
- }
6779
- } else if (index % 2 === 0) {
6780
- if (contentMap.type === "TEXT") {
6781
- return -65;
6782
- } else {
6783
- return -130;
6784
- }
6785
- } else if (index % 2 === 1) {
6786
- return 0;
6787
- }
6788
- return 0;
6789
- };
6790
6717
  const handleMouseDown = (e, materialKey) => {
6791
6718
  if (!checkCanAnswerQuestion()) return;
6792
6719
  e.preventDefault();
@@ -6875,7 +6802,7 @@ var OrderingActivityMaterialContent = ({
6875
6802
  top: `${mousePosition.y}px`,
6876
6803
  transform: "translate(-50%, -50%)"
6877
6804
  },
6878
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
6805
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
6879
6806
  materialMap[displayAnswerMap[draggedKey]]
6880
6807
  ).map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6881
6808
  "span",
@@ -6884,7 +6811,7 @@ var OrderingActivityMaterialContent = ({
6884
6811
  children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
6885
6812
  },
6886
6813
  index
6887
- )) }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6814
+ )) }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6888
6815
  ShowMaterialMediaByContentType_default,
6889
6816
  {
6890
6817
  contentType: contentMap.type,
@@ -6904,7 +6831,7 @@ var OrderingActivityMaterialContent = ({
6904
6831
  top: `${touchPosition.y}px`,
6905
6832
  transform: "translate(-50%, -50%)"
6906
6833
  },
6907
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
6834
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
6908
6835
  materialMap[displayAnswerMap[draggedKey]]
6909
6836
  ).map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6910
6837
  "span",
@@ -6913,7 +6840,7 @@ var OrderingActivityMaterialContent = ({
6913
6840
  children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
6914
6841
  },
6915
6842
  index
6916
- )) }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6843
+ )) }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6917
6844
  ShowMaterialMediaByContentType_default,
6918
6845
  {
6919
6846
  contentType: contentMap.type,
@@ -6929,13 +6856,10 @@ var OrderingActivityMaterialContent = ({
6929
6856
  displayAnswerMap[materialKey] + "",
6930
6857
  index + ""
6931
6858
  );
6932
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6859
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6933
6860
  "div",
6934
6861
  {
6935
6862
  className: `flex flex-row items-center my-4 mx-2`,
6936
- style: {
6937
- marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
6938
- },
6939
6863
  children: [
6940
6864
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-catchup-activity-box-item w-catchup-activity-box-item flex flex-col items-center justify-center cursor-pointer transition-all duration-300 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6941
6865
  "div",
@@ -7001,7 +6925,8 @@ var OrderingActivityContent = ({
7001
6925
  canAnswerQuestion,
7002
6926
  changeAnswer,
7003
6927
  isPreview,
7004
- showCorrectAnswer
6928
+ showCorrectAnswer,
6929
+ isFullScreen
7005
6930
  }) => {
7006
6931
  const contentMap = parseContentMapFromData(data);
7007
6932
  const orderingBodyMap = parseBodyMapFromData(data, "ORDERING");
@@ -7013,16 +6938,17 @@ var OrderingActivityContent = ({
7013
6938
  answerMap2[secondaryKey] = prevValue;
7014
6939
  changeAnswer(answerMap2);
7015
6940
  };
7016
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
7017
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6941
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
6942
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7018
6943
  ActivityBodyContent_default,
7019
6944
  {
7020
6945
  bodyMap: orderingBodyMap,
7021
6946
  templateType: "ORDERING"
7022
6947
  }
7023
- ),
7024
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}),
7025
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6948
+ ) }),
6949
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}) }),
6950
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VerticalDividerLine_default, {}) }),
6951
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7026
6952
  OrderingActivityMaterialContent_default,
7027
6953
  {
7028
6954
  uniqueValue: JSON.stringify(data.contentMap),
@@ -7034,13 +6960,13 @@ var OrderingActivityContent = ({
7034
6960
  isPreview,
7035
6961
  showCorrectAnswer
7036
6962
  }
7037
- )
6963
+ ) })
7038
6964
  ] });
7039
6965
  };
7040
6966
  var OrderingActivityContent_default = OrderingActivityContent;
7041
6967
 
7042
6968
  // src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
7043
- var import_react26 = require("react");
6969
+ var import_react25 = require("react");
7044
6970
  var import_react_katex10 = require("react-katex");
7045
6971
  var import_jsx_runtime43 = require("react/jsx-runtime");
7046
6972
  var TrueFalseActivityMaterialContent = ({
@@ -7053,9 +6979,9 @@ var TrueFalseActivityMaterialContent = ({
7053
6979
  isPreview,
7054
6980
  showCorrectAnswer
7055
6981
  }) => {
7056
- const [shuffleOptionList, setShuffleOptionList] = (0, import_react26.useState)([]);
7057
- const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react26.useState)(answerMap);
7058
- (0, import_react26.useEffect)(() => {
6982
+ const [shuffleOptionList, setShuffleOptionList] = (0, import_react25.useState)([]);
6983
+ const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react25.useState)(answerMap);
6984
+ (0, import_react25.useEffect)(() => {
7059
6985
  const optionList = [];
7060
6986
  optionList.push(...materialMap.trueList);
7061
6987
  optionList.push(...materialMap.falseList);
@@ -7065,7 +6991,7 @@ var TrueFalseActivityMaterialContent = ({
7065
6991
  setShuffleOptionList(shuffleArray(optionList));
7066
6992
  }
7067
6993
  }, []);
7068
- (0, import_react26.useEffect)(() => {
6994
+ (0, import_react25.useEffect)(() => {
7069
6995
  if (showCorrectAnswer) {
7070
6996
  setDisplayAnswerMap(materialMap);
7071
6997
  } else {
@@ -7361,7 +7287,7 @@ var ActivityEvaluationRubricContent = ({
7361
7287
  var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
7362
7288
 
7363
7289
  // src/components/activities/ActivityPreviewByData.tsx
7364
- var import_react27 = require("react");
7290
+ var import_react26 = require("react");
7365
7291
 
7366
7292
  // src/components/boxes/SelectionBox.tsx
7367
7293
  var import_jsx_runtime47 = require("react/jsx-runtime");
@@ -7432,11 +7358,11 @@ var ActivityPreviewByData = ({
7432
7358
  showMaterialContent = true,
7433
7359
  isPreview = true
7434
7360
  }) => {
7435
- const [selectedType, setSelectedType] = (0, import_react27.useState)(null);
7436
- const [optionList, setOptionList] = (0, import_react27.useState)([]);
7437
- const [answerMapMap, setAnswerMapMap] = (0, import_react27.useState)({});
7438
- const [activityTemplateTypeList, setActivityTemplateTypeList] = (0, import_react27.useState)([]);
7439
- (0, import_react27.useEffect)(() => {
7361
+ const [selectedType, setSelectedType] = (0, import_react26.useState)(null);
7362
+ const [optionList, setOptionList] = (0, import_react26.useState)([]);
7363
+ const [answerMapMap, setAnswerMapMap] = (0, import_react26.useState)({});
7364
+ const [activityTemplateTypeList, setActivityTemplateTypeList] = (0, import_react26.useState)([]);
7365
+ (0, import_react26.useEffect)(() => {
7440
7366
  if (!data) return;
7441
7367
  let currentActivityTemplateMapList = JSON.parse(
7442
7368
  JSON.stringify(ACTIVITY_TEMPLATE_LIST)
@@ -7454,7 +7380,7 @@ var ActivityPreviewByData = ({
7454
7380
  }
7455
7381
  setActivityTemplateTypeList(currentActivityTemplateMapList);
7456
7382
  }, [data, answerType, typeList]);
7457
- (0, import_react27.useEffect)(() => {
7383
+ (0, import_react26.useEffect)(() => {
7458
7384
  if (activityTemplateTypeList.length === 0) return;
7459
7385
  const currentOptionList = [];
7460
7386
  for (const activityTemplateType of activityTemplateTypeList) {
@@ -7474,11 +7400,11 @@ var ActivityPreviewByData = ({
7474
7400
  }
7475
7401
  setOptionList(currentOptionList);
7476
7402
  }, [activityTemplateTypeList, showDifficulty]);
7477
- (0, import_react27.useEffect)(() => {
7403
+ (0, import_react26.useEffect)(() => {
7478
7404
  if (optionList.length === 0) return;
7479
7405
  setSelectedType(optionList[0].id);
7480
7406
  }, [optionList]);
7481
- (0, import_react27.useEffect)(() => {
7407
+ (0, import_react26.useEffect)(() => {
7482
7408
  if (activityTemplateTypeList.length === 0) return;
7483
7409
  const currentAnswerMapMap = {};
7484
7410
  for (const activityTemplateMap of activityTemplateTypeList) {
@@ -7663,7 +7589,7 @@ var LeftTextRightInputGroup = ({
7663
7589
  var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
7664
7590
 
7665
7591
  // src/components/groups/PageTravelGroup.tsx
7666
- var import_react28 = require("react");
7592
+ var import_react27 = require("react");
7667
7593
  var import_jsx_runtime52 = require("react/jsx-runtime");
7668
7594
  var PageTravelGroup = ({
7669
7595
  isImageProcessing,
@@ -7673,90 +7599,104 @@ var PageTravelGroup = ({
7673
7599
  setPageNumber,
7674
7600
  setImageReady
7675
7601
  }) => {
7676
- const [totalPageNumber, setTotalPageNumber] = (0, import_react28.useState)(0);
7677
- const [newPageNumber, setNewPageNumber] = (0, import_react28.useState)(0);
7678
- (0, import_react28.useEffect)(() => {
7602
+ const [totalPageNumber, setTotalPageNumber] = (0, import_react27.useState)(0);
7603
+ const [newPageNumber, setNewPageNumber] = (0, import_react27.useState)(0);
7604
+ (0, import_react27.useEffect)(() => {
7679
7605
  if (!initialTotalPageNumber) return;
7680
7606
  setTotalPageNumber(initialTotalPageNumber);
7681
7607
  }, [initialTotalPageNumber]);
7682
- (0, import_react28.useEffect)(() => {
7608
+ (0, import_react27.useEffect)(() => {
7683
7609
  setNewPageNumber(pageNumber + 1);
7684
7610
  }, [pageNumber]);
7685
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 flex flex-row justify-center items-center flex-wrap", children: [
7686
- pageNumber === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7687
- BaseImage_default,
7688
- {
7689
- size: "small",
7690
- alt: "arrow-left",
7691
- src: "/icons/arrow-left.webp",
7692
- onClick: () => {
7693
- if (isImageProcessing) {
7694
- handleImageProcessing();
7695
- } else {
7696
- if (pageNumber - 1 >= 0) {
7697
- setPageNumber(pageNumber - 1);
7698
- }
7699
- setImageReady(false);
7700
- }
7701
- }
7702
- }
7703
- ) }),
7704
- Array.from(Array(totalPageNumber).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7705
- "p",
7611
+ const handlePageChange = (newPage) => {
7612
+ if (isImageProcessing) {
7613
+ handleImageProcessing();
7614
+ } else {
7615
+ setPageNumber(newPage);
7616
+ setImageReady(false);
7617
+ }
7618
+ };
7619
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 flex flex-row justify-center items-center flex-wrap gap-x-2", children: [
7620
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7621
+ "button",
7706
7622
  {
7707
- className: `${pageNumber === index ? "text-xl" : "text-md"} cursor-pointer`,
7708
- onClick: () => {
7709
- if (isImageProcessing) {
7710
- handleImageProcessing();
7711
- } else {
7712
- setPageNumber(index);
7713
- setImageReady(false);
7714
- }
7715
- },
7716
- children: index + 1
7623
+ className: "px-2 py-1 bg-catchup-blue-100 rounded-catchup-small",
7624
+ disabled: pageNumber <= 0,
7625
+ onClick: () => handlePageChange(pageNumber - 1),
7626
+ children: "\u2190"
7717
7627
  }
7718
- ) }, index)),
7719
- totalPageNumber === 0 || pageNumber === totalPageNumber - 1 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7720
- BaseImage_default,
7628
+ ),
7629
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-md", children: [
7630
+ pageNumber + 1,
7631
+ " / ",
7632
+ totalPageNumber
7633
+ ] }),
7634
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7635
+ "button",
7721
7636
  {
7722
- size: "small",
7723
- alt: "arrow-right",
7724
- src: "/icons/arrow-right.webp",
7725
- onClick: () => {
7726
- if (isImageProcessing) {
7727
- handleImageProcessing();
7728
- } else {
7729
- if (pageNumber + 1 <= totalPageNumber) {
7730
- setPageNumber(pageNumber + 1);
7731
- }
7732
- setImageReady(false);
7733
- }
7734
- }
7637
+ className: "px-2 py-1 bg-catchup-blue-100 rounded-catchup-small",
7638
+ disabled: pageNumber >= totalPageNumber - 1,
7639
+ onClick: () => handlePageChange(pageNumber + 1),
7640
+ children: "\u2192"
7735
7641
  }
7736
- ) }),
7737
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7642
+ ),
7643
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7738
7644
  "input",
7739
7645
  {
7740
- className: `w-[90px] py-2 px-4 border border-catchup-gray-100 rounded-catchup-xlarge focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 focus:shadow-input`,
7646
+ className: "w-[90px] py-2 px-4 border border-catchup-gray-100 rounded-catchup-xlarge focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 focus:shadow-input",
7741
7647
  type: "number",
7742
7648
  value: newPageNumber,
7743
7649
  onChange: (e) => {
7744
- const inputPageNumber = parseInt(e.target.value);
7745
- setNewPageNumber(inputPageNumber);
7650
+ setNewPageNumber(parseInt(e.target.value));
7746
7651
  },
7747
7652
  onKeyDown: (e) => {
7748
7653
  if (isNaN(newPageNumber) || newPageNumber <= 0 || newPageNumber > totalPageNumber)
7749
7654
  return;
7750
7655
  if (e.key === "Enter") {
7751
- setPageNumber(newPageNumber - 1);
7656
+ handlePageChange(newPageNumber - 1);
7752
7657
  }
7753
7658
  }
7754
7659
  }
7755
- ) })
7660
+ )
7756
7661
  ] });
7757
7662
  };
7758
7663
  var PageTravelGroup_default = PageTravelGroup;
7759
7664
 
7665
+ // src/hooks/useScreenSize.ts
7666
+ var import_react28 = require("react");
7667
+ var useScreenSize = () => {
7668
+ const [containerSize, setContainerSize] = (0, import_react28.useState)({
7669
+ width: 0,
7670
+ height: 0
7671
+ });
7672
+ const [screenSize, setScreenSize] = (0, import_react28.useState)({
7673
+ width: window.innerWidth,
7674
+ height: window.innerHeight
7675
+ });
7676
+ (0, import_react28.useEffect)(() => {
7677
+ const handleResize = () => {
7678
+ setScreenSize({
7679
+ width: window.innerWidth,
7680
+ height: window.innerHeight
7681
+ });
7682
+ const container = document.getElementById("container");
7683
+ if (!container) return;
7684
+ const boundingClientRect = container.getBoundingClientRect();
7685
+ setContainerSize({
7686
+ width: boundingClientRect.width,
7687
+ height: boundingClientRect.height
7688
+ });
7689
+ };
7690
+ handleResize();
7691
+ window.addEventListener("resize", handleResize);
7692
+ return () => {
7693
+ window.removeEventListener("resize", handleResize);
7694
+ };
7695
+ }, []);
7696
+ return { screenSize, containerSize };
7697
+ };
7698
+ var useScreenSize_default = useScreenSize;
7699
+
7760
7700
  // src/components/boxes/SelectionCheckbox.tsx
7761
7701
  var import_jsx_runtime53 = require("react/jsx-runtime");
7762
7702
  var SelectionCheckbox = ({