@citolab/qti-components 7.28.1 → 8.0.0

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.
Files changed (82) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +6205 -2973
  3. package/dist/base.d.ts +9 -50
  4. package/dist/base.js +27 -6
  5. package/dist/chunk-5QYII4OZ.js +1374 -0
  6. package/dist/chunk-5QYII4OZ.js.map +1 -0
  7. package/dist/{chunk-MPC7LIPC.js → chunk-5SJS36BI.js} +4264 -3647
  8. package/dist/chunk-5SJS36BI.js.map +1 -0
  9. package/dist/chunk-64XSIBGO.js +241 -0
  10. package/dist/chunk-64XSIBGO.js.map +1 -0
  11. package/dist/{chunk-SP6S2WMG.js → chunk-7V4HJFHW.js} +3 -3
  12. package/dist/{chunk-SP6S2WMG.js.map → chunk-7V4HJFHW.js.map} +1 -1
  13. package/dist/{chunk-3XV26R5M.js → chunk-H3J7LFRO.js} +829 -1005
  14. package/dist/chunk-H3J7LFRO.js.map +1 -0
  15. package/dist/{chunk-3WBG257S.js → chunk-IJD53WY6.js} +96 -74
  16. package/dist/chunk-IJD53WY6.js.map +1 -0
  17. package/dist/chunk-KYEZRYO6.js +1608 -0
  18. package/dist/chunk-KYEZRYO6.js.map +1 -0
  19. package/dist/{chunk-HFCZFWSH.js → chunk-LZJHHZQ2.js} +1954 -1729
  20. package/dist/chunk-LZJHHZQ2.js.map +1 -0
  21. package/dist/chunk-MGF5F3S2.js +11 -0
  22. package/dist/chunk-MGF5F3S2.js.map +1 -0
  23. package/dist/chunk-MJVPNN7W.js +11 -0
  24. package/dist/chunk-MJVPNN7W.js.map +1 -0
  25. package/dist/{chunk-REI3AMCZ.js → chunk-NA2N2WSG.js} +1303 -1193
  26. package/dist/chunk-NA2N2WSG.js.map +1 -0
  27. package/dist/chunk-V5G7X53Y.js +11 -0
  28. package/dist/chunk-V5G7X53Y.js.map +1 -0
  29. package/dist/chunk-W4QZPCNC.js +294 -0
  30. package/dist/chunk-W4QZPCNC.js.map +1 -0
  31. package/dist/chunk-WCQ26LV7.js +102 -0
  32. package/dist/chunk-WCQ26LV7.js.map +1 -0
  33. package/dist/{chunk-WDO2TRFM.js → chunk-WVVMNF74.js} +851 -925
  34. package/dist/chunk-WVVMNF74.js.map +1 -0
  35. package/dist/{chunk-FLJAKWXL.js → chunk-X3E5HXG2.js} +2 -2
  36. package/dist/corrections.d.ts +1 -0
  37. package/dist/corrections.js +84 -0
  38. package/dist/elements.d.ts +1 -399
  39. package/dist/elements.js +6 -5
  40. package/dist/index.d.ts +9 -23
  41. package/dist/index.js +185 -76
  42. package/dist/interactions.d.ts +1 -915
  43. package/dist/interactions.js +19 -15
  44. package/dist/item.css +4118 -1920
  45. package/dist/item.d.ts +1 -134
  46. package/dist/item.js +6 -11
  47. package/dist/loader.d.ts +1 -22
  48. package/dist/loader.js +2 -3
  49. package/dist/processing.d.ts +1 -731
  50. package/dist/processing.js +2 -3
  51. package/dist/qti-components-jsx.d.ts +5220 -2571
  52. package/dist/test.d.ts +1 -539
  53. package/dist/test.js +26 -11
  54. package/dist/transformers.d.ts +1 -18
  55. package/dist/transformers.js +1 -2
  56. package/package.json +19 -15
  57. package/custom-elements.json +0 -43251
  58. package/dist/chunk-3WBG257S.js.map +0 -1
  59. package/dist/chunk-3XV26R5M.js.map +0 -1
  60. package/dist/chunk-AQ5RJFM6.js +0 -3673
  61. package/dist/chunk-AQ5RJFM6.js.map +0 -1
  62. package/dist/chunk-HFCZFWSH.js.map +0 -1
  63. package/dist/chunk-MPC7LIPC.js.map +0 -1
  64. package/dist/chunk-QXBXORM3.js +0 -27
  65. package/dist/chunk-REI3AMCZ.js.map +0 -1
  66. package/dist/chunk-RLTYVS2I.js +0 -530
  67. package/dist/chunk-RLTYVS2I.js.map +0 -1
  68. package/dist/chunk-WDO2TRFM.js.map +0 -1
  69. package/dist/computed-item.context-DfsW_96S.d.ts +0 -22
  70. package/dist/computed.context-DHbxad0N.d.ts +0 -45
  71. package/dist/config.context-BjZ2bZSY.d.ts +0 -42
  72. package/dist/interaction-Bgzlw7Iu.d.ts +0 -110
  73. package/dist/item.context-CkUeDcaO.d.ts +0 -15
  74. package/dist/qti-condition-expression-Dam-RER6.d.ts +0 -26
  75. package/dist/qti-feedback-ChmXhZuf.d.ts +0 -21
  76. package/dist/qti-rule-base-ajOnfGXY.d.ts +0 -16
  77. package/dist/qti-transform-test-DoZaWItm.d.ts +0 -70
  78. package/dist/qti.context-CejJMlfZ.d.ts +0 -50
  79. package/dist/test.context-CByZZjkR.d.ts +0 -15
  80. package/dist/variables-CMYcDbyW.d.ts +0 -70
  81. /package/dist/{chunk-FLJAKWXL.js.map → chunk-X3E5HXG2.js.map} +0 -0
  82. /package/dist/{chunk-QXBXORM3.js.map → corrections.js.map} +0 -0
@@ -1,50 +0,0 @@
1
- /**
2
- * A validated deterministic shuffle seed.
3
- *
4
- * Branded so that only values verified through {@link isSeed} (or constructed via
5
- * {@link asSeed}) can be assigned where a seed is expected. This prevents arbitrary
6
- * strings from silently being used as a seed.
7
- *
8
- * A usable seed is a non-empty string of letters, digits and hyphens (e.g. a GUID
9
- * "N" format like `8f14e45fceea167a5a36dedd4bea2543`, or a readable label like
10
- * `delivery-2026-06-05`). Whitespace and other characters are rejected.
11
- */
12
- type Seed = string & {
13
- readonly __seedBrand: 'Seed';
14
- };
15
- /**
16
- * Runtime type guard that narrows an unknown value to a {@link Seed}.
17
- * Use this at boundaries (e.g. values coming from XML, a host application or a
18
- * backend) before treating a string as a seed.
19
- */
20
- declare const isSeed: (value: unknown) => value is Seed;
21
- /**
22
- * Validates and brands a value as a {@link Seed}, returning `undefined` when the
23
- * value is missing or not in a usable seed format.
24
- */
25
- declare const asSeed: (value: unknown) => Seed | undefined;
26
- type QtiContextType = {
27
- testIdentifier: string;
28
- candidateIdentifier: string;
29
- environmentIdentifier: string;
30
- /**
31
- * Optional deterministic seed for shuffling.
32
- *
33
- * When set, it is used to reproduce a stable shuffle order across reloads/restarts:
34
- * - test ordering in `test-container` (`<qti-ordering shuffle="true">`),
35
- * - seeded item interaction shuffling in `item-container` and during test navigation.
36
- *
37
- * Typically generated once per session by the host/backend and passed in via
38
- * `QTI_CONTEXT`. When omitted, each item falls back to its own URI-derived seed.
39
- */
40
- seed?: Seed;
41
- [key: string]: string | string[];
42
- };
43
- interface QtiContext {
44
- QTI_CONTEXT: QtiContextType;
45
- }
46
- declare const qtiContext: {
47
- __context__: Readonly<QtiContext>;
48
- };
49
-
50
- export { type QtiContext as Q, type Seed as S, type QtiContextType as a, asSeed as b, isSeed as i, qtiContext as q };
@@ -1,15 +0,0 @@
1
- import { I as ItemContext } from './item.context-CkUeDcaO.js';
2
- import { V as VariableDeclaration } from './variables-CMYcDbyW.js';
3
-
4
- interface TestContext {
5
- items: (ItemContext & {
6
- category?: string;
7
- })[];
8
- testOutcomeVariables?: VariableDeclaration<string | string[] | null>[];
9
- }
10
- declare const INITIAL_TEST_CONTEXT: Readonly<TestContext>;
11
- declare const testContext: {
12
- __context__: Readonly<TestContext>;
13
- };
14
-
15
- export { INITIAL_TEST_CONTEXT as I, type TestContext as T, testContext as t };
@@ -1,70 +0,0 @@
1
- interface directedPair {
2
- destination: string;
3
- source: string;
4
- }
5
- interface ResponseInteraction {
6
- responseIdentifier: string;
7
- response: string | string[];
8
- state?: string | null;
9
- }
10
- interface Calculate {
11
- calculate: () => string | string[];
12
- }
13
- type float = number;
14
- type integer = number;
15
- type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair' | 'record';
16
- type Multiple = string | string[][];
17
- type Ordered = string | string[][];
18
- type Cardinality = 'multiple' | 'ordered' | 'single' | 'record';
19
-
20
- type QtiAreaMapping = {
21
- defaultValue: number;
22
- lowerBound?: number;
23
- upperBound?: number;
24
- areaMapEntries: QtiAreaMapEntry[];
25
- };
26
- type QtiAreaMapEntry = {
27
- shape: areaShape;
28
- coords: string;
29
- mappedValue: number;
30
- defaultValue: number;
31
- };
32
- type QtiMapping = {
33
- defaultValue: number;
34
- lowerBound?: number;
35
- upperBound?: number;
36
- mapEntries: QtiMapEntry[];
37
- };
38
- type QtiMapEntry = {
39
- mapKey: string;
40
- mappedValue: number;
41
- caseSensitive: boolean;
42
- };
43
- type areaShape = 'default' | 'circle' | 'rect' | 'ellipse' | 'poly';
44
- interface VariableValue<T> {
45
- identifier: string;
46
- value: Readonly<T>;
47
- defaultValue?: T | null;
48
- type: 'outcome' | 'response' | 'context' | 'template';
49
- }
50
- interface VariableDeclaration<T> extends VariableValue<T> {
51
- cardinality?: Cardinality;
52
- baseType?: BaseType;
53
- }
54
- interface OutcomeVariable extends VariableDeclaration<string | string[] | null> {
55
- interpolationTable?: Map<number, number>;
56
- externalScored?: 'human' | 'externalMachine' | null;
57
- }
58
- interface ResponseVariable extends VariableDeclaration<string | string[] | null> {
59
- candidateResponse?: string | string[] | null;
60
- mapping?: QtiMapping;
61
- areaMapping?: QtiAreaMapping;
62
- correctResponse?: string | string[] | null;
63
- }
64
- interface TemplateVariable extends VariableDeclaration<string | string[] | number | boolean | null> {
65
- type: 'template';
66
- mathVariable?: boolean;
67
- paramVariable?: boolean;
68
- }
69
-
70
- export type { BaseType as B, Calculate as C, Multiple as M, Ordered as O, QtiAreaMapEntry as Q, ResponseInteraction as R, TemplateVariable as T, VariableDeclaration as V, Cardinality as a, OutcomeVariable as b, QtiAreaMapping as c, QtiMapEntry as d, QtiMapping as e, ResponseVariable as f, VariableValue as g, areaShape as h, directedPair as i, float as j, integer as k };