@superbuilders/incept-renderer 0.1.5 → 0.1.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/actions/index.js +1 -8
- package/dist/actions/index.js.map +1 -1
- package/dist/components/index.js +5 -5
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/styles/themes.css +67 -0
- package/dist/styles/themes.css.map +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -318,14 +318,7 @@ function serializeAttributes(attrs) {
|
|
|
318
318
|
return parts.join(" ");
|
|
319
319
|
}
|
|
320
320
|
function escapeHtml(text) {
|
|
321
|
-
|
|
322
|
-
"&": "&",
|
|
323
|
-
"<": "<",
|
|
324
|
-
">": ">",
|
|
325
|
-
'"': """,
|
|
326
|
-
"'": "'"
|
|
327
|
-
};
|
|
328
|
-
return text.replace(/[&<>"']/g, (char) => escapeMap[char] || char);
|
|
321
|
+
return text.replace(/</g, "<").replace(/>/g, ">");
|
|
329
322
|
}
|
|
330
323
|
function isMathMLElement(tagName) {
|
|
331
324
|
const mathMLTags = [
|
|
@@ -757,18 +750,18 @@ function ChoiceInteractionRenderer({
|
|
|
757
750
|
if (!isImagesOnly) return "space-y-2";
|
|
758
751
|
switch (choiceCount) {
|
|
759
752
|
case 4:
|
|
760
|
-
return "
|
|
753
|
+
return "qti-image-grid-4";
|
|
761
754
|
case 3:
|
|
762
|
-
return "grid
|
|
755
|
+
return "qti-image-grid-3";
|
|
763
756
|
case 2:
|
|
764
|
-
return "
|
|
757
|
+
return "qti-image-grid-2";
|
|
765
758
|
default:
|
|
766
|
-
return "
|
|
759
|
+
return "qti-image-grid-many";
|
|
767
760
|
}
|
|
768
761
|
}, [isImagesOnly, choiceCount]);
|
|
769
762
|
const imageCardClass = React3.useMemo(() => {
|
|
770
763
|
if (!isImagesOnly) return "";
|
|
771
|
-
return choiceCount === 2 ? "
|
|
764
|
+
return choiceCount === 2 ? "qti-image-card qti-image-card-large" : "qti-image-card";
|
|
772
765
|
}, [isImagesOnly, choiceCount]);
|
|
773
766
|
const handleSingleChoice = (value) => {
|
|
774
767
|
if (!disabled && onAnswerSelect) {
|