@superbuilders/incept-renderer 0.1.0 → 0.1.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.
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { D as DisplayItem, a as DisplayBlock } from './types-MOyn9ktl.js';
2
+ import { D as DisplayBlock, c as DisplayItem } from './types-BqqQtPL8.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /** Theme options for the QTI renderer */
@@ -148,6 +148,75 @@ declare const ChoiceInteractionSchema: z.ZodObject<{
148
148
  type: z.ZodLiteral<"choiceInteraction">;
149
149
  }, z.core.$strip>;
150
150
  type ChoiceInteraction = z.infer<typeof ChoiceInteractionSchema>;
151
+ declare const InlineChoiceInteractionSchema: z.ZodObject<{
152
+ responseIdentifier: z.ZodString;
153
+ shuffle: z.ZodBoolean;
154
+ choices: z.ZodArray<z.ZodObject<{
155
+ identifier: z.ZodString;
156
+ contentHtml: z.ZodString;
157
+ }, z.core.$strip>>;
158
+ type: z.ZodLiteral<"inlineChoiceInteraction">;
159
+ }, z.core.$strip>;
160
+ type InlineChoiceInteraction = z.infer<typeof InlineChoiceInteractionSchema>;
161
+ declare const TextEntryInteractionSchema: z.ZodObject<{
162
+ responseIdentifier: z.ZodString;
163
+ expectedLength: z.ZodOptional<z.ZodNumber>;
164
+ placeholderText: z.ZodOptional<z.ZodString>;
165
+ patternMask: z.ZodOptional<z.ZodString>;
166
+ type: z.ZodLiteral<"textEntryInteraction">;
167
+ }, z.core.$strip>;
168
+ type TextEntryInteraction = z.infer<typeof TextEntryInteractionSchema>;
169
+ declare const OrderInteractionSchema: z.ZodObject<{
170
+ responseIdentifier: z.ZodString;
171
+ shuffle: z.ZodBoolean;
172
+ minChoices: z.ZodNumber;
173
+ maxChoices: z.ZodOptional<z.ZodNumber>;
174
+ orientation: z.ZodEnum<{
175
+ vertical: "vertical";
176
+ horizontal: "horizontal";
177
+ }>;
178
+ promptHtml: z.ZodString;
179
+ choices: z.ZodArray<z.ZodObject<{
180
+ identifier: z.ZodString;
181
+ contentHtml: z.ZodString;
182
+ inlineFeedbackHtml: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strip>>;
184
+ type: z.ZodLiteral<"orderInteraction">;
185
+ }, z.core.$strip>;
186
+ type OrderInteraction = z.infer<typeof OrderInteractionSchema>;
187
+ declare const GapMatchInteractionSchema: z.ZodObject<{
188
+ responseIdentifier: z.ZodString;
189
+ shuffle: z.ZodBoolean;
190
+ gapTexts: z.ZodArray<z.ZodObject<{
191
+ identifier: z.ZodString;
192
+ contentHtml: z.ZodString;
193
+ matchMax: z.ZodNumber;
194
+ }, z.core.$strip>>;
195
+ gaps: z.ZodArray<z.ZodObject<{
196
+ identifier: z.ZodString;
197
+ }, z.core.$strip>>;
198
+ contentHtml: z.ZodString;
199
+ type: z.ZodLiteral<"gapMatchInteraction">;
200
+ }, z.core.$strip>;
201
+ type GapMatchInteraction = z.infer<typeof GapMatchInteractionSchema>;
202
+ declare const MatchInteractionSchema: z.ZodObject<{
203
+ responseIdentifier: z.ZodString;
204
+ shuffle: z.ZodBoolean;
205
+ maxAssociations: z.ZodNumber;
206
+ sourceChoices: z.ZodArray<z.ZodObject<{
207
+ identifier: z.ZodString;
208
+ matchMax: z.ZodNumber;
209
+ contentHtml: z.ZodString;
210
+ }, z.core.$strip>>;
211
+ targetChoices: z.ZodArray<z.ZodObject<{
212
+ identifier: z.ZodString;
213
+ matchMax: z.ZodNumber;
214
+ contentHtml: z.ZodString;
215
+ }, z.core.$strip>>;
216
+ promptHtml: z.ZodString;
217
+ type: z.ZodLiteral<"matchInteraction">;
218
+ }, z.core.$strip>;
219
+ type MatchInteraction = z.infer<typeof MatchInteractionSchema>;
151
220
  declare const AnyInteractionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
152
221
  responseIdentifier: z.ZodString;
153
222
  shuffle: z.ZodBoolean;
@@ -231,10 +300,10 @@ declare const ResponseDeclarationSchema: z.ZodObject<{
231
300
  baseType: z.ZodEnum<{
232
301
  string: "string";
233
302
  boolean: "boolean";
234
- directedPair: "directedPair";
235
303
  identifier: "identifier";
236
304
  float: "float";
237
305
  integer: "integer";
306
+ directedPair: "directedPair";
238
307
  pair: "pair";
239
308
  }>;
240
309
  correctResponse: z.ZodObject<{
@@ -347,10 +416,10 @@ declare const AssessmentItemSchema: z.ZodObject<{
347
416
  baseType: z.ZodEnum<{
348
417
  string: "string";
349
418
  boolean: "boolean";
350
- directedPair: "directedPair";
351
419
  identifier: "identifier";
352
420
  float: "float";
353
421
  integer: "integer";
422
+ directedPair: "directedPair";
354
423
  pair: "pair";
355
424
  }>;
356
425
  correctResponse: z.ZodObject<{
@@ -376,10 +445,10 @@ declare const AssessmentItemSchema: z.ZodObject<{
376
445
  baseType: z.ZodEnum<{
377
446
  string: "string";
378
447
  boolean: "boolean";
379
- directedPair: "directedPair";
380
448
  identifier: "identifier";
381
449
  float: "float";
382
450
  integer: "integer";
451
+ directedPair: "directedPair";
383
452
  pair: "pair";
384
453
  }>;
385
454
  defaultValue: z.ZodOptional<z.ZodObject<{
@@ -505,4 +574,4 @@ declare const AssessmentItemSchema: z.ZodObject<{
505
574
  }, z.core.$strip>;
506
575
  type AssessmentItem = z.infer<typeof AssessmentItemSchema>;
507
576
 
508
- export { type AssessmentItem as A, ContentBlockRenderer as C, type FeedbackBlock as F, QTIRenderer as Q, type ResponseFeedback as R, type QTIRendererProps as a, type QTITheme as b, type ChoiceCorrectness as c, type ContentBlockRendererProps as d, type ChoiceInteraction as e, type AnyInteraction as f, type ResponseDeclaration as g, type ResponseProcessing as h, AssessmentItemSchema as i };
577
+ export { type AssessmentItem as A, type ChoiceCorrectness as C, type FeedbackBlock as F, type GapMatchInteraction as G, type InlineChoiceInteraction as I, type MatchInteraction as M, type OrderInteraction as O, type QTIRendererProps as Q, type ResponseFeedback as R, type TextEntryInteraction as T, type ContentBlockRendererProps as a, type QTITheme as b, ContentBlockRenderer as c, QTIRenderer as d, type AnyInteraction as e, type ChoiceInteraction as f, type ResponseDeclaration as g, type ResponseProcessing as h, AssessmentItemSchema as i, type AnyCondition as j };
@@ -99,4 +99,4 @@ type ValidateResult = {
99
99
  };
100
100
  };
101
101
 
102
- export type { DisplayItem as D, FormShape as F, ValidateResult as V, DisplayBlock as a, DisplayChoice as b, DisplayChoiceInteraction as c, DisplayInlineEmbed as d, DisplayTextEmbed as e, DisplayGap as f };
102
+ export type { DisplayBlock as D, FormShape as F, ValidateResult as V, DisplayChoice as a, DisplayChoiceInteraction as b, DisplayItem as c, DisplayInlineEmbed as d, DisplayTextEmbed as e, DisplayGap as f, DisplayAssociableChoice as g, DisplayGapText as h };
@@ -0,0 +1,14 @@
1
+ export { g as DisplayAssociableChoice, D as DisplayBlock, a as DisplayChoice, b as DisplayChoiceInteraction, f as DisplayGap, h as DisplayGapText, d as DisplayInlineEmbed, c as DisplayItem, e as DisplayTextEmbed, F as FormShape, V as ValidateResult } from './types-BqqQtPL8.js';
2
+ export { j as AnyCondition, e as AnyInteraction, A as AssessmentItem, C as ChoiceCorrectness, f as ChoiceInteraction, a as ContentBlockRendererProps, F as FeedbackBlock, G as GapMatchInteraction, I as InlineChoiceInteraction, M as MatchInteraction, O as OrderInteraction, Q as QTIRendererProps, b as QTITheme, g as ResponseDeclaration, R as ResponseFeedback, h as ResponseProcessing, T as TextEntryInteraction } from './schema-C3cRJWrK.js';
3
+ import 'react/jsx-runtime';
4
+ import 'zod';
5
+
6
+ type EvaluationResult = {
7
+ status: "correct" | "incorrect" | "unanswered";
8
+ feedbackIdentifier?: string;
9
+ responseResults: Record<string, {
10
+ isCorrect: boolean;
11
+ }>;
12
+ };
13
+
14
+ export type { EvaluationResult };
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=types.js.map
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superbuilders/incept-renderer",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "QTI 3.0 Assessment Renderer - Parse, validate, and render QTI XML with customizable themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,9 +18,16 @@
18
18
  "./components": {
19
19
  "types": "./dist/components/index.d.ts",
20
20
  "import": "./dist/components/index.js"
21
+ },
22
+ "./types": {
23
+ "types": "./dist/types.d.ts",
24
+ "import": "./dist/types.js"
21
25
  }
22
26
  },
23
- "files": ["dist", "README.md"],
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
24
31
  "scripts": {
25
32
  "build": "tsup",
26
33
  "dev": "tsup --watch",
@@ -31,6 +38,8 @@
31
38
  "react-dom": "^18 || ^19"
32
39
  },
33
40
  "dependencies": {
41
+ "@superbuilders/errors": "^3.0.2",
42
+ "@superbuilders/slog": "^4.0.0",
34
43
  "@dnd-kit/core": "^6.3.1",
35
44
  "@dnd-kit/sortable": "^10.0.0",
36
45
  "@dnd-kit/utilities": "^3.2.2",
@@ -52,7 +61,15 @@
52
61
  "tsup": "^8.0.0",
53
62
  "typescript": "^5.8.3"
54
63
  },
55
- "keywords": ["qti", "assessment", "quiz", "testing", "education", "renderer", "react"],
64
+ "keywords": [
65
+ "qti",
66
+ "assessment",
67
+ "quiz",
68
+ "testing",
69
+ "education",
70
+ "renderer",
71
+ "react"
72
+ ],
56
73
  "license": "MIT",
57
74
  "repository": {
58
75
  "type": "git",