@superbuilders/incept-renderer 0.1.11 → 0.1.12

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.
@@ -1,9 +1,8 @@
1
- import { e as ChoiceInteraction, d as AssessmentItem } from '../schema-DZoGAQdF.js';
2
- export { C as ChoiceCorrectness, h as ContentBlockRenderer, a as ContentBlockRendererProps, i as QTIRenderer, Q as QTIRendererProps, b as QTITheme, R as ResponseFeedback } from '../schema-DZoGAQdF.js';
1
+ export { C as ChoiceCorrectness, d as ContentBlockRenderer, a as ContentBlockRendererProps, e as QTIRenderer, Q as QTIRendererProps, f as QTIStimulusRenderer, b as QTIStimulusRendererProps, c as QTITheme, R as ResponseFeedback } from '../qti-stimulus-renderer-CSuLfoff.js';
3
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { C as ChoiceInteraction, A as AssessmentItem, j as DisplayInlineEmbed, l as DisplayTextEmbed, h as DisplayGap } from '../schema-DKduufCs.js';
4
4
  import { EvaluationResult } from '../types.js';
5
5
  import * as React from 'react';
6
- import { f as DisplayInlineEmbed, h as DisplayTextEmbed, d as DisplayGap } from '../types-B7YRTQKt.js';
7
6
  import 'zod';
8
7
 
9
8
  interface ChoiceInteractionRendererProps {
@@ -29,6 +29,13 @@ var DEFAULT_CONFIG = {
29
29
  "div",
30
30
  "br",
31
31
  "hr",
32
+ // Headings
33
+ "h1",
34
+ "h2",
35
+ "h3",
36
+ "h4",
37
+ "h5",
38
+ "h6",
32
39
  // Formatting
33
40
  "b",
34
41
  "i",
@@ -78,6 +85,9 @@ var DEFAULT_CONFIG = {
78
85
  "figcaption",
79
86
  "blockquote",
80
87
  "cite",
88
+ // Interactive
89
+ "details",
90
+ "summary",
81
91
  // Links
82
92
  "a",
83
93
  // Forms (for future interactive elements)
@@ -2405,6 +2415,9 @@ function QTIRenderer({
2405
2415
  showFeedback && overallFeedback?.messageHtml && /* @__PURE__ */ jsx("div", { className: "qti-feedback mt-6 p-6", "data-correct": overallFeedback.isCorrect, children: /* @__PURE__ */ jsx(HTMLContent, { html: overallFeedback.messageHtml }) })
2406
2416
  ] });
2407
2417
  }
2418
+ function QTIStimulusRenderer({ stimulus, className }) {
2419
+ return /* @__PURE__ */ jsx("article", { className: cn("qti-stimulus", className), lang: stimulus.xmlLang, "data-stimulus-id": stimulus.identifier, children: /* @__PURE__ */ jsx(HTMLContent, { html: stimulus.bodyHtml, className: "qti-stimulus-body" }) });
2420
+ }
2408
2421
  function QtiFeedbackBlock({ result, item, className }) {
2409
2422
  const feedbackBlock = React3.useMemo(() => {
2410
2423
  if (!result.feedbackIdentifier) {
@@ -2448,6 +2461,6 @@ function QtiFeedbackBlock({ result, item, className }) {
2448
2461
  ] });
2449
2462
  }
2450
2463
 
2451
- export { ChoiceInteractionRenderer, ContentBlockRenderer, FeedbackMessage, HTMLContent, QTIRenderer, QtiFeedbackBlock };
2464
+ export { ChoiceInteractionRenderer, ContentBlockRenderer, FeedbackMessage, HTMLContent, QTIRenderer, QTIStimulusRenderer, QtiFeedbackBlock };
2452
2465
  //# sourceMappingURL=index.js.map
2453
2466
  //# sourceMappingURL=index.js.map