@citolab/qti-components 7.14.3 → 7.15.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 (146) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +4044 -4030
  3. package/custom-elements.json +10478 -26460
  4. package/dist/base.d.ts +8 -0
  5. package/dist/base.js +50 -0
  6. package/dist/{chunks/chunk-DGBI4IU5.js → chunk-2DOYPVF5.js} +252 -136
  7. package/dist/chunk-2DOYPVF5.js.map +1 -0
  8. package/dist/chunk-2ZEJ3RR5.js +89 -0
  9. package/dist/chunk-2ZEJ3RR5.js.map +1 -0
  10. package/dist/{chunks/chunk-E4GR4K26.js → chunk-352OTVTY.js} +1481 -442
  11. package/dist/chunk-352OTVTY.js.map +1 -0
  12. package/dist/{chunks/chunk-C4ELTNV7.js → chunk-C2HQFI2C.js} +857 -3819
  13. package/dist/chunk-C2HQFI2C.js.map +1 -0
  14. package/dist/chunk-DWIRLYDS.js +20 -0
  15. package/dist/chunk-DWIRLYDS.js.map +1 -0
  16. package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
  17. package/dist/chunk-F44CI35W.js +145 -0
  18. package/dist/chunk-F44CI35W.js.map +1 -0
  19. package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
  20. package/dist/chunk-INKI27D5.js.map +1 -0
  21. package/dist/chunk-JEUY3MYB.js +2010 -0
  22. package/dist/chunk-JEUY3MYB.js.map +1 -0
  23. package/dist/chunk-O4XIWHTF.js +1139 -0
  24. package/dist/chunk-O4XIWHTF.js.map +1 -0
  25. package/dist/chunk-RI47B4ZT.js +1753 -0
  26. package/dist/chunk-RI47B4ZT.js.map +1 -0
  27. package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
  28. package/dist/chunk-VEV4DGPH.js.map +1 -0
  29. package/dist/{chunks/chunk-TN75CWLX.js → chunk-W4SQRNWO.js} +97 -2
  30. package/dist/chunk-W4SQRNWO.js.map +1 -0
  31. package/dist/elements.d.ts +1 -0
  32. package/dist/elements.js +42 -0
  33. package/dist/index.d.ts +8 -24
  34. package/dist/index.js +117 -285
  35. package/dist/index.js.map +1 -1
  36. package/dist/interactions.d.ts +1 -0
  37. package/dist/interactions.js +72 -0
  38. package/dist/item.d.ts +1 -0
  39. package/dist/item.js +23 -0
  40. package/dist/loader.d.ts +1 -0
  41. package/dist/loader.js +11 -0
  42. package/dist/processing.d.ts +1 -0
  43. package/dist/processing.js +103 -0
  44. package/dist/qti-components-jsx.d.ts +1475 -2388
  45. package/dist/test.d.ts +1 -0
  46. package/dist/{qti-test/index.js → test.js} +11 -19
  47. package/dist/transformers.d.ts +1 -0
  48. package/dist/{qti-transformers/index.js → transformers.js} +3 -3
  49. package/dist/vscode.html-custom-data.json +469 -631
  50. package/package.json +70 -166
  51. package/LICENSE.md +0 -674
  52. package/dist/chunks/chunk-4OGJBG35.js +0 -8
  53. package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
  54. package/dist/chunks/chunk-AGV5GOTF.js +0 -234
  55. package/dist/chunks/chunk-AGV5GOTF.js.map +0 -1
  56. package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
  57. package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
  58. package/dist/chunks/chunk-C4ELTNV7.js.map +0 -1
  59. package/dist/chunks/chunk-C5RLRG3L.js +0 -10
  60. package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
  61. package/dist/chunks/chunk-CJADUWEC.js +0 -10
  62. package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
  63. package/dist/chunks/chunk-DGBI4IU5.js.map +0 -1
  64. package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
  65. package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
  66. package/dist/chunks/chunk-E4GR4K26.js.map +0 -1
  67. package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
  68. package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
  69. package/dist/chunks/chunk-GAAFN7QF.js +0 -146
  70. package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
  71. package/dist/chunks/chunk-H6KHXSIO.js +0 -8
  72. package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
  73. package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
  74. package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
  75. package/dist/chunks/chunk-NJNQOQUU.js +0 -8
  76. package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
  77. package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
  78. package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
  79. package/dist/chunks/chunk-SV4K25ZI.js +0 -19
  80. package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
  81. package/dist/chunks/chunk-TN75CWLX.js.map +0 -1
  82. package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
  83. package/dist/exports/computed-item.context.d.ts +0 -23
  84. package/dist/exports/computed-item.context.js +0 -8
  85. package/dist/exports/computed.context.d.ts +0 -34
  86. package/dist/exports/computed.context.js +0 -8
  87. package/dist/exports/config.context.d.ts +0 -14
  88. package/dist/exports/config.context.js +0 -8
  89. package/dist/exports/expression-result.d.ts +0 -19
  90. package/dist/exports/expression-result.js +0 -1
  91. package/dist/exports/interaction.d.ts +0 -46
  92. package/dist/exports/interaction.interface.d.ts +0 -13
  93. package/dist/exports/interaction.interface.js +0 -1
  94. package/dist/exports/interaction.js +0 -12
  95. package/dist/exports/item.context.d.ts +0 -11
  96. package/dist/exports/item.context.js +0 -8
  97. package/dist/exports/qti-assessment-item.context.d.ts +0 -9
  98. package/dist/exports/qti-assessment-item.context.js +0 -8
  99. package/dist/exports/qti-condition-expression.d.ts +0 -14
  100. package/dist/exports/qti-condition-expression.js +0 -11
  101. package/dist/exports/qti-condition-expression.js.map +0 -1
  102. package/dist/exports/qti-expression.d.ts +0 -23
  103. package/dist/exports/qti-expression.js +0 -10
  104. package/dist/exports/qti-expression.js.map +0 -1
  105. package/dist/exports/qti-test.d.ts +0 -12
  106. package/dist/exports/qti-test.js +0 -1
  107. package/dist/exports/qti-test.js.map +0 -1
  108. package/dist/exports/qti.context.d.ts +0 -14
  109. package/dist/exports/qti.context.js +0 -8
  110. package/dist/exports/qti.context.js.map +0 -1
  111. package/dist/exports/session.context.d.ts +0 -15
  112. package/dist/exports/session.context.js +0 -10
  113. package/dist/exports/session.context.js.map +0 -1
  114. package/dist/exports/test.context.d.ts +0 -16
  115. package/dist/exports/test.context.js +0 -10
  116. package/dist/exports/test.context.js.map +0 -1
  117. package/dist/exports/variables.d.ts +0 -2
  118. package/dist/exports/variables.js +0 -1
  119. package/dist/exports/variables.js.map +0 -1
  120. package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
  121. package/dist/qti-components/index.d.ts +0 -1524
  122. package/dist/qti-components/index.js +0 -216
  123. package/dist/qti-components/index.js.map +0 -1
  124. package/dist/qti-item/index.d.ts +0 -114
  125. package/dist/qti-item/index.js +0 -19
  126. package/dist/qti-item/index.js.map +0 -1
  127. package/dist/qti-loader/index.d.ts +0 -21
  128. package/dist/qti-loader/index.js.map +0 -1
  129. package/dist/qti-modal-feedback-Cp3CHVKw.d.ts +0 -30
  130. package/dist/qti-test/index.d.ts +0 -480
  131. package/dist/qti-test/index.js.map +0 -1
  132. package/dist/qti-test-mmY8zNIj.d.ts +0 -120
  133. package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
  134. package/dist/qti-transformers/index.d.ts +0 -18
  135. package/dist/qti-transformers/index.js.map +0 -1
  136. package/dist/variables-BCkyLoXK.d.ts +0 -55
  137. package/readme.md +0 -59
  138. /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
  139. /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
  140. /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
  141. /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
  142. /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
  143. /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
  144. /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
  145. /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
  146. /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
@@ -1,55 +0,0 @@
1
- import { Cardinality, BaseType } from './exports/expression-result.js';
2
-
3
- type QtiAreaMapping = {
4
- defaultValue: number;
5
- lowerBound?: number;
6
- upperBound?: number;
7
- areaMapEntries: QtiAreaMapEntry[];
8
- };
9
- type QtiAreaMapEntry = {
10
- shape: areaShape;
11
- coords: string;
12
- mappedValue: number;
13
- defaultValue: number;
14
- };
15
- type areaShape = 'default' | 'circle' | 'rect' | 'ellipse' | 'poly';
16
-
17
- type QtiMapping = {
18
- defaultValue: number;
19
- lowerBound?: number;
20
- upperBound?: number;
21
- mapEntries: QtiMapEntry[];
22
- };
23
- type QtiMapEntry = {
24
- mapKey: string;
25
- mappedValue: number;
26
- caseSensitive: boolean;
27
- };
28
-
29
- interface VariableValue<T> {
30
- identifier: string;
31
- value: Readonly<T>;
32
- defaultValue?: T | null;
33
- type: 'outcome' | 'response' | 'context' | 'template';
34
- }
35
- interface VariableDeclaration<T> extends VariableValue<T> {
36
- cardinality?: Cardinality;
37
- baseType?: BaseType;
38
- }
39
- interface OutcomeVariable extends VariableDeclaration<string | string[] | null> {
40
- interpolationTable?: Map<number, number>;
41
- externalScored?: 'human' | 'externalMachine' | null;
42
- }
43
- interface ResponseVariable extends VariableDeclaration<string | string[] | null> {
44
- candidateResponse?: string | string[] | null;
45
- mapping?: QtiMapping;
46
- areaMapping?: QtiAreaMapping;
47
- correctResponse?: string | string[] | null;
48
- }
49
- interface TemplateVariable extends VariableDeclaration<string | string[] | number | boolean | null> {
50
- type: 'template';
51
- mathVariable?: boolean;
52
- paramVariable?: boolean;
53
- }
54
-
55
- export type { OutcomeVariable as O, QtiMapping as Q, ResponseVariable as R, TemplateVariable as T, VariableDeclaration as V, QtiMapEntry as a, QtiAreaMapping as b, QtiAreaMapEntry as c, areaShape as d, VariableValue as e };
package/readme.md DELETED
@@ -1,59 +0,0 @@
1
- # @citolab/qti-components
2
-
3
- <a href="https://www.repostatus.org/#wip"><img src="https://www.repostatus.org/badges/latest/wip.svg" alt="Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public." /></a>
4
-
5
- [![npm version](https://badge.fury.io/js/%40citolab%2Fqti-components.svg)](https://badge.fury.io/js/%40citolab%2Fqti-components)
6
- [![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://opensource.org/license/gpl-2-0/)
7
-
8
- @citolab/qti-components is a web component library that can be used to render 1EdTech QTI items.
9
- It's highly customizable and can be integrated in almost every web application.
10
-
11
- ## Installation
12
-
13
- ### CDN
14
-
15
- Import the components with the CDN version
16
-
17
- ```html
18
- <script type="module">
19
- import 'https://unpkg.com/@citolab/qti-components/cdn';
20
- </script>
21
- ```
22
-
23
- ### NPM
24
-
25
- Or use npm to install the package:
26
-
27
- ```shell
28
- npm install @citolab/qti-components
29
- ```
30
-
31
- To use @citolab/qti-components, you need to register the web components. By registering the web components, the browser knows how to display the item and create a fully functional test.
32
-
33
- ```javascript
34
- import '@citolab/qti-components';
35
- ```
36
-
37
- ## Storybook
38
-
39
- Explore the complete description of supported QTI tags, examples, and the ability to interactively play with changing attributes of the QTI items in our [Storybook](https://qti-components.citolab.nl/).
40
-
41
- ## Contributing
42
-
43
- Contributions are welcome! Please follow these guidelines when contributing:
44
-
45
- - Fork the repository and clone it to your local machine
46
- - Create a new branch for your feature or bug fix
47
- - Commit your changes with clear and concise messages
48
- - Push your changes to your forked repository
49
- - Open a pull request to the original repository
50
-
51
- ## Third-Party Components
52
-
53
- Note: This repository includes some third-party components solely for showcasing PCIs in Storybook. These components are not included in the published npm package. For licensing details, refer to the LICENSE file in the third-party directory.
54
-
55
- ## License
56
-
57
- This project is licensed under the [GPLv3 License](LICENSE).
58
-
59
- Please note that the licensing is GPLv3 if you want to use it in another way, feel free to ask!