catchup-library-web 1.9.1 → 1.9.3
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -7
- package/dist/index.mjs +13 -7
- package/package.json +1 -1
- package/src/components/images/BaseImage.tsx +2 -4
- package/src/utilization/CatchtivityUtilization.ts +45 -6
package/dist/index.d.mts
CHANGED
|
@@ -411,6 +411,7 @@ declare const constructInputWithSpecialExpressionList: (inputText: string) => {
|
|
|
411
411
|
isEquation: boolean;
|
|
412
412
|
isUnderline: boolean;
|
|
413
413
|
isBold: boolean;
|
|
414
|
+
isCode: boolean;
|
|
414
415
|
}[];
|
|
415
416
|
declare const retrieveStandardExamTypeOptionList: () => {
|
|
416
417
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -411,6 +411,7 @@ declare const constructInputWithSpecialExpressionList: (inputText: string) => {
|
|
|
411
411
|
isEquation: boolean;
|
|
412
412
|
isUnderline: boolean;
|
|
413
413
|
isBold: boolean;
|
|
414
|
+
isCode: boolean;
|
|
414
415
|
}[];
|
|
415
416
|
declare const retrieveStandardExamTypeOptionList: () => {
|
|
416
417
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -384,7 +384,7 @@ var BaseImage = (0, import_react.forwardRef)(
|
|
|
384
384
|
"img",
|
|
385
385
|
{
|
|
386
386
|
ref,
|
|
387
|
-
className: `w-full ${borderRadius || ""}`,
|
|
387
|
+
className: `w-full h-full object-contain ${borderRadius || ""}`,
|
|
388
388
|
src,
|
|
389
389
|
alt,
|
|
390
390
|
onLoad,
|
|
@@ -1193,12 +1193,18 @@ var constructInputWithSpecialExpressionList = (inputText) => {
|
|
|
1193
1193
|
let isEquation = false;
|
|
1194
1194
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
1195
1195
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1196
|
+
let isCode = false;
|
|
1197
|
+
const splittedCode = splittedEquation[k].split("`");
|
|
1198
|
+
for (let l = 0; l < splittedCode.length; l++) {
|
|
1199
|
+
inputPartList.push({
|
|
1200
|
+
value: splittedCode[l],
|
|
1201
|
+
isEquation,
|
|
1202
|
+
isUnderline,
|
|
1203
|
+
isBold,
|
|
1204
|
+
isCode
|
|
1205
|
+
});
|
|
1206
|
+
isCode = !isCode;
|
|
1207
|
+
}
|
|
1202
1208
|
isEquation = !isEquation;
|
|
1203
1209
|
}
|
|
1204
1210
|
isUnderline = !isUnderline;
|
package/dist/index.mjs
CHANGED
|
@@ -185,7 +185,7 @@ var BaseImage = forwardRef(
|
|
|
185
185
|
"img",
|
|
186
186
|
{
|
|
187
187
|
ref,
|
|
188
|
-
className: `w-full ${borderRadius || ""}`,
|
|
188
|
+
className: `w-full h-full object-contain ${borderRadius || ""}`,
|
|
189
189
|
src,
|
|
190
190
|
alt,
|
|
191
191
|
onLoad,
|
|
@@ -994,12 +994,18 @@ var constructInputWithSpecialExpressionList = (inputText) => {
|
|
|
994
994
|
let isEquation = false;
|
|
995
995
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
996
996
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
997
|
+
let isCode = false;
|
|
998
|
+
const splittedCode = splittedEquation[k].split("`");
|
|
999
|
+
for (let l = 0; l < splittedCode.length; l++) {
|
|
1000
|
+
inputPartList.push({
|
|
1001
|
+
value: splittedCode[l],
|
|
1002
|
+
isEquation,
|
|
1003
|
+
isUnderline,
|
|
1004
|
+
isBold,
|
|
1005
|
+
isCode
|
|
1006
|
+
});
|
|
1007
|
+
isCode = !isCode;
|
|
1008
|
+
}
|
|
1003
1009
|
isEquation = !isEquation;
|
|
1004
1010
|
}
|
|
1005
1011
|
isUnderline = !isUnderline;
|
package/package.json
CHANGED
|
@@ -88,8 +88,8 @@ const BaseImage = forwardRef<HTMLImageElement, IBaseImageProps>(
|
|
|
88
88
|
onClick={handleOnClick}
|
|
89
89
|
>
|
|
90
90
|
<img
|
|
91
|
-
ref={ref}
|
|
92
|
-
className={`w-full ${borderRadius || ""}`}
|
|
91
|
+
ref={ref}
|
|
92
|
+
className={`w-full h-full object-contain ${borderRadius || ""}`}
|
|
93
93
|
src={src}
|
|
94
94
|
alt={alt}
|
|
95
95
|
onLoad={onLoad}
|
|
@@ -104,10 +104,8 @@ const BaseImage = forwardRef<HTMLImageElement, IBaseImageProps>(
|
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
|
|
107
|
-
// Add display name for better debugging
|
|
108
107
|
BaseImage.displayName = "BaseImage";
|
|
109
108
|
|
|
110
|
-
// Update your interface to remove the ref prop since it's now handled by forwardRef
|
|
111
109
|
interface IBaseImageProps {
|
|
112
110
|
size?:
|
|
113
111
|
| "xsmall"
|
|
@@ -169,30 +169,69 @@ export const retrieveTaxonomyName = () => {
|
|
|
169
169
|
];
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
+
// export const constructInputWithSpecialExpressionList = (inputText: string) => {
|
|
173
|
+
// const inputPartList = [];
|
|
174
|
+
// if (!inputText) return [];
|
|
175
|
+
// const splittedBold = inputText.split("**");
|
|
176
|
+
// let isBold = false;
|
|
177
|
+
// for (let i = 0; i < splittedBold.length; i++) {
|
|
178
|
+
// let isUnderline = false;
|
|
179
|
+
// const splittedUnderline = splittedBold[i].split("__");
|
|
180
|
+
// for (let j = 0; j < splittedUnderline.length; j++) {
|
|
181
|
+
// let isEquation = false;
|
|
182
|
+
// const splittedEquation = splittedUnderline[j].split("$$");
|
|
183
|
+
// for (let k = 0; k < splittedEquation.length; k++) {
|
|
184
|
+
// inputPartList.push({
|
|
185
|
+
// value: splittedEquation[k],
|
|
186
|
+
// isEquation,
|
|
187
|
+
// isUnderline,
|
|
188
|
+
// isBold,
|
|
189
|
+
// });
|
|
190
|
+
// isEquation = !isEquation;
|
|
191
|
+
// }
|
|
192
|
+
// isUnderline = !isUnderline;
|
|
193
|
+
// }
|
|
194
|
+
// isBold = !isBold;
|
|
195
|
+
// }
|
|
196
|
+
// return inputPartList;
|
|
197
|
+
// };
|
|
198
|
+
|
|
172
199
|
export const constructInputWithSpecialExpressionList = (inputText: string) => {
|
|
173
200
|
const inputPartList = [];
|
|
174
201
|
if (!inputText) return [];
|
|
202
|
+
|
|
175
203
|
const splittedBold = inputText.split("**");
|
|
176
204
|
let isBold = false;
|
|
205
|
+
|
|
177
206
|
for (let i = 0; i < splittedBold.length; i++) {
|
|
178
207
|
let isUnderline = false;
|
|
179
208
|
const splittedUnderline = splittedBold[i].split("__");
|
|
209
|
+
|
|
180
210
|
for (let j = 0; j < splittedUnderline.length; j++) {
|
|
181
211
|
let isEquation = false;
|
|
182
212
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
213
|
+
|
|
183
214
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
215
|
+
let isCode = false;
|
|
216
|
+
const splittedCode = splittedEquation[k].split("`");
|
|
217
|
+
|
|
218
|
+
for (let l = 0; l < splittedCode.length; l++) {
|
|
219
|
+
inputPartList.push({
|
|
220
|
+
value: splittedCode[l],
|
|
221
|
+
isEquation,
|
|
222
|
+
isUnderline,
|
|
223
|
+
isBold,
|
|
224
|
+
isCode,
|
|
225
|
+
});
|
|
226
|
+
isCode = !isCode;
|
|
227
|
+
}
|
|
190
228
|
isEquation = !isEquation;
|
|
191
229
|
}
|
|
192
230
|
isUnderline = !isUnderline;
|
|
193
231
|
}
|
|
194
232
|
isBold = !isBold;
|
|
195
233
|
}
|
|
234
|
+
|
|
196
235
|
return inputPartList;
|
|
197
236
|
};
|
|
198
237
|
|