catchup-library-web 1.14.7 → 1.14.8

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
@@ -3271,14 +3271,14 @@ var ShowBodyMediaByContentType = ({
3271
3271
  return "";
3272
3272
  }
3273
3273
  };
3274
- const renderSpecialExpressions = (inputPart) => {
3274
+ const renderSpecialExpressions = (inputPart, inputPartIndex) => {
3275
3275
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3276
3276
  "span",
3277
3277
  {
3278
3278
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
3279
3279
  children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
3280
3280
  },
3281
- index
3281
+ inputPartIndex
3282
3282
  );
3283
3283
  };
3284
3284
  const balanceSpecialChars = (text) => {
@@ -3297,7 +3297,7 @@ var ShowBodyMediaByContentType = ({
3297
3297
  const renderTextContent = (text, itemKey) => {
3298
3298
  const balancedText = balanceSpecialChars(text);
3299
3299
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
3300
- (inputPart) => renderSpecialExpressions(inputPart)
3300
+ (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3301
3301
  ) }, itemKey);
3302
3302
  };
3303
3303
  const handleOpenFullScreen = (imageSource) => {
@@ -3330,7 +3330,7 @@ var ShowBodyMediaByContentType = ({
3330
3330
  const itemKey = `text-inside-${index}-${currentIndex}`;
3331
3331
  valuePartList.push(
3332
3332
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
3333
- (inputPart) => renderSpecialExpressions(inputPart)
3333
+ (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3334
3334
  ) }, itemKey)
3335
3335
  );
3336
3336
  copyValue = copyValue.substring(
package/dist/index.mjs CHANGED
@@ -3062,14 +3062,14 @@ var ShowBodyMediaByContentType = ({
3062
3062
  return "";
3063
3063
  }
3064
3064
  };
3065
- const renderSpecialExpressions = (inputPart) => {
3065
+ const renderSpecialExpressions = (inputPart, inputPartIndex) => {
3066
3066
  return /* @__PURE__ */ jsx16(
3067
3067
  "span",
3068
3068
  {
3069
3069
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
3070
3070
  children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value
3071
3071
  },
3072
- index
3072
+ inputPartIndex
3073
3073
  );
3074
3074
  };
3075
3075
  const balanceSpecialChars = (text) => {
@@ -3088,7 +3088,7 @@ var ShowBodyMediaByContentType = ({
3088
3088
  const renderTextContent = (text, itemKey) => {
3089
3089
  const balancedText = balanceSpecialChars(text);
3090
3090
  return /* @__PURE__ */ jsx16("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
3091
- (inputPart) => renderSpecialExpressions(inputPart)
3091
+ (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3092
3092
  ) }, itemKey);
3093
3093
  };
3094
3094
  const handleOpenFullScreen = (imageSource) => {
@@ -3121,7 +3121,7 @@ var ShowBodyMediaByContentType = ({
3121
3121
  const itemKey = `text-inside-${index}-${currentIndex}`;
3122
3122
  valuePartList.push(
3123
3123
  /* @__PURE__ */ jsx16("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
3124
- (inputPart) => renderSpecialExpressions(inputPart)
3124
+ (inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
3125
3125
  ) }, itemKey)
3126
3126
  );
3127
3127
  copyValue = copyValue.substring(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.14.7",
3
+ "version": "1.14.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -33,10 +33,13 @@ const ShowBodyMediaByContentType = ({
33
33
  };
34
34
 
35
35
  // Helper function to render special expressions with proper keys
36
- const renderSpecialExpressions = (inputPart: IInputPart) => {
36
+ const renderSpecialExpressions = (
37
+ inputPart: IInputPart,
38
+ inputPartIndex: number
39
+ ) => {
37
40
  return (
38
41
  <span
39
- key={index}
42
+ key={inputPartIndex}
40
43
  className={`${inputPart.isBold ? "font-bold" : ""} ${
41
44
  inputPart.isUnderline ? "underline" : ""
42
45
  }`}
@@ -81,7 +84,8 @@ const ShowBodyMediaByContentType = ({
81
84
  return (
82
85
  <span key={itemKey} className="text-xl">
83
86
  {constructInputWithSpecialExpressionList(balancedText).map(
84
- (inputPart: IInputPart) => renderSpecialExpressions(inputPart)
87
+ (inputPart: IInputPart, inputPartIndex: number) =>
88
+ renderSpecialExpressions(inputPart, inputPartIndex)
85
89
  )}
86
90
  </span>
87
91
  );
@@ -128,7 +132,8 @@ const ShowBodyMediaByContentType = ({
128
132
  valuePartList.push(
129
133
  <span key={itemKey} className="text-xl font-bold">
130
134
  {constructInputWithSpecialExpressionList(textInsideTag).map(
131
- (inputPart: IInputPart) => renderSpecialExpressions(inputPart)
135
+ (inputPart: IInputPart, inputPartIndex: number) =>
136
+ renderSpecialExpressions(inputPart, inputPartIndex)
132
137
  )}
133
138
  </span>
134
139
  );