@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/index.js CHANGED
@@ -318,14 +318,7 @@ function serializeAttributes(attrs) {
318
318
  return parts.join(" ");
319
319
  }
320
320
  function escapeHtml(text) {
321
- const escapeMap = {
322
- "&": "&",
323
- "<": "&lt;",
324
- ">": "&gt;",
325
- '"': "&quot;",
326
- "'": "&#39;"
327
- };
328
- return text.replace(/[&<>"']/g, (char) => escapeMap[char] || char);
321
+ return text.replace(/</g, "&lt;").replace(/>/g, "&gt;");
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 "grid grid-cols-2 gap-4";
753
+ return "qti-image-grid-4";
761
754
  case 3:
762
- return "grid grid-cols-3 gap-4";
755
+ return "qti-image-grid-3";
763
756
  case 2:
764
- return "max-w-3xl mx-auto grid grid-cols-2 gap-6";
757
+ return "qti-image-grid-2";
765
758
  default:
766
- return "grid grid-cols-2 md:grid-cols-3 gap-4";
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 ? "justify-center text-center [&_img]:max-h-52 md:[&_img]:max-h-60 ![&_img]:w-auto ![&_img]:h-auto ![&_img]:max-w-full ![&_img]:block [&_img]:mx-auto min-h-[220px] px-8 py-8" : "justify-center text-center [&_img]:max-h-40 md:[&_img]:max-h-48 ![&_img]:w-auto ![&_img]:h-auto ![&_img]:max-w-full ![&_img]:block [&_img]:mx-auto min-h-[180px]";
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) {