@citolab/qti-components 7.28.0 → 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 (83) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +6178 -2946
  3. package/dist/base.d.ts +9 -50
  4. package/dist/base.js +31 -6
  5. package/dist/chunk-5QYII4OZ.js +1374 -0
  6. package/dist/chunk-5QYII4OZ.js.map +1 -0
  7. package/dist/{chunk-FK2IVMS3.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-F6WP6WEF.js → chunk-7V4HJFHW.js} +3 -3
  12. package/dist/{chunk-F6WP6WEF.js.map → chunk-7V4HJFHW.js.map} +1 -1
  13. package/dist/{chunk-Z2SUBRH5.js → chunk-H3J7LFRO.js} +834 -1005
  14. package/dist/chunk-H3J7LFRO.js.map +1 -0
  15. package/dist/chunk-IJD53WY6.js +719 -0
  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-PINGOK2F.js → chunk-LZJHHZQ2.js} +1979 -1775
  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-YLIYPNMK.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-OQ77SE2W.js → chunk-WVVMNF74.js} +851 -925
  34. package/dist/chunk-WVVMNF74.js.map +1 -0
  35. package/dist/{chunk-N7S3GNUP.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 +189 -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 -127
  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 +5394 -2718
  52. package/dist/test.d.ts +1 -537
  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 +20 -16
  57. package/custom-elements.json +0 -43161
  58. package/dist/chunk-BPIDAS3T.js +0 -495
  59. package/dist/chunk-BPIDAS3T.js.map +0 -1
  60. package/dist/chunk-FK2IVMS3.js.map +0 -1
  61. package/dist/chunk-LQZCSHN5.js +0 -3673
  62. package/dist/chunk-LQZCSHN5.js.map +0 -1
  63. package/dist/chunk-OQ77SE2W.js.map +0 -1
  64. package/dist/chunk-PINGOK2F.js.map +0 -1
  65. package/dist/chunk-QXBXORM3.js +0 -27
  66. package/dist/chunk-U2FLSHK7.js +0 -510
  67. package/dist/chunk-U2FLSHK7.js.map +0 -1
  68. package/dist/chunk-YLIYPNMK.js.map +0 -1
  69. package/dist/chunk-Z2SUBRH5.js.map +0 -1
  70. package/dist/computed-item.context-DfsW_96S.d.ts +0 -22
  71. package/dist/computed.context-DHbxad0N.d.ts +0 -45
  72. package/dist/config.context-BjZ2bZSY.d.ts +0 -42
  73. package/dist/interaction-Bgzlw7Iu.d.ts +0 -110
  74. package/dist/item.context-CkUeDcaO.d.ts +0 -15
  75. package/dist/qti-condition-expression-B1BYmCcq.d.ts +0 -26
  76. package/dist/qti-feedback-ChmXhZuf.d.ts +0 -21
  77. package/dist/qti-rule-base-ajOnfGXY.d.ts +0 -16
  78. package/dist/qti-transform-test-DMx816H0.d.ts +0 -68
  79. package/dist/qti.context-B8PSyIWm.d.ts +0 -14
  80. package/dist/test.context-CByZZjkR.d.ts +0 -15
  81. package/dist/variables-CMYcDbyW.d.ts +0 -70
  82. /package/dist/{chunk-N7S3GNUP.js.map → chunk-X3E5HXG2.js.map} +0 -0
  83. /package/dist/{chunk-QXBXORM3.js.map → corrections.js.map} +0 -0
package/dist/item.d.ts CHANGED
@@ -1,127 +1 @@
1
- import * as lit from 'lit';
2
- import { LitElement } from 'lit';
3
- import { C as ComputedItemContext } from './computed-item.context-DfsW_96S.js';
4
- import { C as ConfigContext } from './config.context-BjZ2bZSY.js';
5
- import './variables-CMYcDbyW.js';
6
-
7
- /**
8
- * `<item-container>` is a custom element designed for hosting the qti-assessment-item.
9
- * The `qti-assessment-item` will be placed inside the shadow DOM of this element.
10
- * The element loads the item from the provided URL and renders it inside the shadow DOM.
11
- *
12
- * ### Styling
13
- * Add a class to the element for styling.
14
- *
15
- * ```html
16
- * <qti-item>
17
- * <item-container class="m-4 bg-white" item-url="./path/to/item.xml"></item-container>
18
- * </qti-item>
19
- * ```
20
- */
21
- declare class ItemContainer extends LitElement {
22
- #private;
23
- /** URL of the item to load */
24
- itemURL: string;
25
- /** A parsed HTML document */
26
- itemDoc: DocumentFragment;
27
- /** The raw XML string */
28
- itemXML: string;
29
- protected handleItemURLChange(): Promise<void>;
30
- protected handleItemXMLChange(): void;
31
- connectedCallback(): Promise<void>;
32
- render(): lit.TemplateResult<1>;
33
- }
34
- declare global {
35
- interface HTMLElementTagNameMap {
36
- 'item-container': ItemContainer;
37
- }
38
- }
39
-
40
- declare class ItemCorrectResponseMode extends LitElement {
41
- #private;
42
- private itemContext;
43
- label: string;
44
- private _options;
45
- render(): lit.TemplateResult<1>;
46
- }
47
- declare global {
48
- interface HTMLElementTagNameMap {
49
- 'item-correct-response-mode': ItemCorrectResponseMode;
50
- }
51
- }
52
-
53
- declare class ItemShowCandidateCorrection extends LitElement {
54
- #private;
55
- computedContext?: ComputedItemContext;
56
- static styles: lit.CSSResult;
57
- shown: boolean;
58
- disabled: boolean;
59
- showCandidateCorrectionText: string;
60
- hideCandidateCorrectionText: string;
61
- noCorrectResponseText: string;
62
- constructor();
63
- updated(): void;
64
- render(): lit.TemplateResult<1>;
65
- }
66
- declare global {
67
- interface HTMLElementTagNameMap {
68
- 'item-show-candidate-correction': ItemShowCandidateCorrection;
69
- }
70
- }
71
-
72
- declare class ItemShowCorrectResponse extends LitElement {
73
- #private;
74
- computedContext?: ComputedItemContext;
75
- static styles: lit.CSSResult;
76
- shown: boolean;
77
- disabled: boolean;
78
- showCorrectText: string;
79
- hideCorrectText: string;
80
- noCorrectResponseText: string;
81
- updated(): void;
82
- render(): lit.TemplateResult<1>;
83
- }
84
- declare global {
85
- interface HTMLElementTagNameMap {
86
- 'item-show-correct-response': ItemShowCorrectResponse;
87
- }
88
- }
89
-
90
- declare class ItemPrintVariables extends LitElement {
91
- protected computedContext?: ComputedItemContext;
92
- static styles: lit.CSSResult;
93
- render(): lit.TemplateResult<1>;
94
- }
95
- declare global {
96
- interface HTMLElementTagNameMap {
97
- 'item-print-variables': ItemPrintVariables;
98
- }
99
- }
100
-
101
- /**
102
- * `<qti-item>` is a custom element designed for rendering a single `qti-assessment-item`.
103
- * It can also host some functionalities to interact with the item like scoring, showing feedback, etc.
104
- * Placing a mandatory `<item-container>` inside '<qti-item>' will load or parse the item and render it.
105
- * See `<item-container>` for more details.
106
- *
107
- * ```html
108
- * <qti-item>
109
- * <item-container class="m-4 bg-white" item-url="./path/to/item.xml"></item-container>
110
- * </qti-item>
111
- * ```
112
- */
113
- declare class QtiItem extends LitElement {
114
- #private;
115
- computedContext: ComputedItemContext;
116
- configContext: ConfigContext;
117
- constructor();
118
- render(): lit.TemplateResult<1>;
119
- disconnectedCallback(): void;
120
- }
121
- declare global {
122
- interface HTMLElementTagNameMap {
123
- 'qti-item': QtiItem;
124
- }
125
- }
126
-
127
- export { ItemContainer, ItemCorrectResponseMode, ItemPrintVariables, ItemShowCandidateCorrection, ItemShowCorrectResponse, QtiItem };
1
+ export * from '@qti-components/item';
package/dist/item.js CHANGED
@@ -1,21 +1,16 @@
1
+ import "./chunk-MJVPNN7W.js";
1
2
  import {
2
3
  ItemContainer,
3
- ItemCorrectResponseMode,
4
4
  ItemPrintVariables,
5
- ItemShowCandidateCorrection,
6
- ItemShowCorrectResponse,
7
5
  QtiItem
8
- } from "./chunk-U2FLSHK7.js";
9
- import "./chunk-LQZCSHN5.js";
10
- import "./chunk-BPIDAS3T.js";
11
- import "./chunk-Z2SUBRH5.js";
12
- import "./chunk-QXBXORM3.js";
6
+ } from "./chunk-W4QZPCNC.js";
7
+ import "./chunk-WCQ26LV7.js";
8
+ import "./chunk-64XSIBGO.js";
9
+ import "./chunk-IJD53WY6.js";
10
+ import "./chunk-H3J7LFRO.js";
13
11
  export {
14
12
  ItemContainer,
15
- ItemCorrectResponseMode,
16
13
  ItemPrintVariables,
17
- ItemShowCandidateCorrection,
18
- ItemShowCorrectResponse,
19
14
  QtiItem
20
15
  };
21
16
  //# sourceMappingURL=item.js.map
package/dist/loader.d.ts CHANGED
@@ -1,22 +1 @@
1
- import { QtiAssessmentItem } from './elements.js';
2
- import 'lit';
3
- import './variables-CMYcDbyW.js';
4
- import './item.context-CkUeDcaO.js';
5
- import './qti-feedback-ChmXhZuf.js';
6
- import './qti-rule-base-ajOnfGXY.js';
7
-
8
- type ManifestInfo = {
9
- testIdentifier: string;
10
- testHTMLDoc: DocumentFragment;
11
- testURI: string;
12
- testURL: string;
13
- items: {
14
- identifier: string;
15
- href: string;
16
- category: string;
17
- }[];
18
- };
19
- declare const getManifestInfo: (manifestURL: string) => Promise<ManifestInfo>;
20
- declare const getItemByUri: (itemUri: string) => Promise<QtiAssessmentItem>;
21
-
22
- export { type ManifestInfo, getItemByUri, getManifestInfo };
1
+ export * from '@qti-components/loader';
package/dist/loader.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  getItemByUri,
3
3
  getManifestInfo
4
- } from "./chunk-F6WP6WEF.js";
5
- import "./chunk-BPIDAS3T.js";
6
- import "./chunk-QXBXORM3.js";
4
+ } from "./chunk-7V4HJFHW.js";
5
+ import "./chunk-IJD53WY6.js";
7
6
  export {
8
7
  getItemByUri,
9
8
  getManifestInfo