@qti-components/choice-interaction 1.1.3 → 1.1.5
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.
- package/dist/elements.d.ts +6 -0
- package/dist/elements.js +4 -0
- package/dist/elements.js.map +1 -0
- package/dist/qti-choice-interaction.d.ts +22 -0
- package/dist/qti-choice-interaction.js +22 -0
- package/dist/qti-choice-interaction.js.map +1 -1
- package/dist/qti-choice-interaction.styles.d.ts +1 -1
- package/dist/qti-choice-interaction.styles.js +64 -105
- package/dist/qti-choice-interaction.styles.js.map +1 -1
- package/dist/register.js +6 -2
- package/dist/register.js.map +1 -1
- package/package.json +11 -5
package/dist/elements.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAU,CAAC;AAEjG,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { QtiChoiceInteraction } from './qti-choice-interaction';\n\nexport const elements = [{ tag: 'qti-choice-interaction', ctor: QtiChoiceInteraction }] as const;\n\nexport { QtiChoiceInteraction };\n"]}
|
|
@@ -3,6 +3,28 @@ import type { ChoicesInterface } from '@qti-components/interactions-core/mixins/
|
|
|
3
3
|
import type { CSSResultGroup } from 'lit';
|
|
4
4
|
export type Orientation = 'horizontal' | 'vertical' | undefined;
|
|
5
5
|
declare const QtiChoiceInteraction_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
6
|
+
/**
|
|
7
|
+
* A single-response or multiple-response choice interaction.
|
|
8
|
+
*
|
|
9
|
+
* @customElement qti-choice-interaction
|
|
10
|
+
*
|
|
11
|
+
* @attr {string} response-identifier - Required. Identifier of the bound response variable.
|
|
12
|
+
* @attr {number} [max-choices=1] - Maximum selectable choices. `1` is a single-response
|
|
13
|
+
* item; `0` means unlimited and makes it a multiple-response item.
|
|
14
|
+
* @attr {number} [min-choices=0] - Minimum selectable choices for a valid response.
|
|
15
|
+
* @attr {'horizontal'|'vertical'} [orientation=vertical] - Deprecated by QTI in favour of
|
|
16
|
+
* the `qti-orientation-*` class vocabulary.
|
|
17
|
+
* @attr {boolean} [shuffle=false] - Requests choice shuffling. Applied by the transform
|
|
18
|
+
* pipeline (`qti-transformers`), not by this element.
|
|
19
|
+
* @attr {'qti-orientation-horizontal'|'qti-orientation-vertical'|'qti-choices-stacking-1'|'qti-choices-stacking-2'|'qti-choices-stacking-3'|'qti-choices-stacking-4'|'qti-choices-stacking-5'|'qti-labels-none'|'qti-labels-decimal'|'qti-labels-lower-alpha'|'qti-labels-upper-alpha'|'qti-labels-suffix-none'|'qti-labels-suffix-period'|'qti-labels-suffix-parenthesis'|'qti-input-control-hidden'} class - QTI shared presentation vocabulary. Space-separated; takes precedence over `orientation`.
|
|
20
|
+
*
|
|
21
|
+
* @slot prompt - The prompt shown above the choices.
|
|
22
|
+
* @slot - Default slot for `qti-simple-choice` elements.
|
|
23
|
+
*
|
|
24
|
+
* @csspart prompt - Wrapper around the prompt slot.
|
|
25
|
+
* @csspart slot - Wrapper around the default slot containing the choices.
|
|
26
|
+
* @csspart message - Live validation message region (role="alert").
|
|
27
|
+
*/
|
|
6
28
|
export declare class QtiChoiceInteraction extends QtiChoiceInteraction_base implements ChoicesInterface {
|
|
7
29
|
#private;
|
|
8
30
|
static styles: CSSResultGroup;
|
|
@@ -10,6 +10,28 @@ import { Interaction } from '@qti-components/base';
|
|
|
10
10
|
import { ChoicesMixin } from '@qti-components/interactions-core/mixins/choices/choices.mixin';
|
|
11
11
|
import { VocabularyMixin } from '@qti-components/interactions-core/mixins/vocabulary/vocabulary-mixin';
|
|
12
12
|
import styles from './qti-choice-interaction.styles';
|
|
13
|
+
/**
|
|
14
|
+
* A single-response or multiple-response choice interaction.
|
|
15
|
+
*
|
|
16
|
+
* @customElement qti-choice-interaction
|
|
17
|
+
*
|
|
18
|
+
* @attr {string} response-identifier - Required. Identifier of the bound response variable.
|
|
19
|
+
* @attr {number} [max-choices=1] - Maximum selectable choices. `1` is a single-response
|
|
20
|
+
* item; `0` means unlimited and makes it a multiple-response item.
|
|
21
|
+
* @attr {number} [min-choices=0] - Minimum selectable choices for a valid response.
|
|
22
|
+
* @attr {'horizontal'|'vertical'} [orientation=vertical] - Deprecated by QTI in favour of
|
|
23
|
+
* the `qti-orientation-*` class vocabulary.
|
|
24
|
+
* @attr {boolean} [shuffle=false] - Requests choice shuffling. Applied by the transform
|
|
25
|
+
* pipeline (`qti-transformers`), not by this element.
|
|
26
|
+
* @attr {'qti-orientation-horizontal'|'qti-orientation-vertical'|'qti-choices-stacking-1'|'qti-choices-stacking-2'|'qti-choices-stacking-3'|'qti-choices-stacking-4'|'qti-choices-stacking-5'|'qti-labels-none'|'qti-labels-decimal'|'qti-labels-lower-alpha'|'qti-labels-upper-alpha'|'qti-labels-suffix-none'|'qti-labels-suffix-period'|'qti-labels-suffix-parenthesis'|'qti-input-control-hidden'} class - QTI shared presentation vocabulary. Space-separated; takes precedence over `orientation`.
|
|
27
|
+
*
|
|
28
|
+
* @slot prompt - The prompt shown above the choices.
|
|
29
|
+
* @slot - Default slot for `qti-simple-choice` elements.
|
|
30
|
+
*
|
|
31
|
+
* @csspart prompt - Wrapper around the prompt slot.
|
|
32
|
+
* @csspart slot - Wrapper around the default slot containing the choices.
|
|
33
|
+
* @csspart message - Live validation message region (role="alert").
|
|
34
|
+
*/
|
|
13
35
|
export class QtiChoiceInteraction extends VocabularyMixin(ChoicesMixin(Interaction, 'qti-simple-choice'), 'qti-simple-choice') {
|
|
14
36
|
constructor() {
|
|
15
37
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qti-choice-interaction.js","sourceRoot":"","sources":["../src/qti-choice-interaction.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,sEAAsE,CAAC;AAEvG,OAAO,MAAM,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"qti-choice-interaction.js","sourceRoot":"","sources":["../src/qti-choice-interaction.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,sEAAsE,CAAC;AAEvG,OAAO,MAAM,MAAM,iCAAiC,CAAC;AAOrD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,oBACX,SAAQ,eAAe,CAAC,YAAY,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAD9F;;QAME,0FAA0F;QAEnF,gBAAW,GAAgB,UAAU,CAAC;IAe/C,CAAC;aAnBiB,WAAM,GAAmB,MAAM,AAAzB,CAA0B;IAMhD,iBAAiB;QACf,4EAA4E;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;QAC3D,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpE,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;sCAEuB,IAAI,CAAC,iBAAiB;;KAEvD,CAAC;IACJ,CAAC;;AAdM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDACkB","sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { Interaction } from '@qti-components/base';\nimport { ChoicesMixin } from '@qti-components/interactions-core/mixins/choices/choices.mixin';\nimport { VocabularyMixin } from '@qti-components/interactions-core/mixins/vocabulary/vocabulary-mixin';\n\nimport styles from './qti-choice-interaction.styles';\n\nimport type { ChoicesInterface } from '@qti-components/interactions-core/mixins/choices/choices.mixin';\nimport type { CSSResultGroup } from 'lit';\n\nexport type Orientation = 'horizontal' | 'vertical' | undefined;\n\n/**\n * A single-response or multiple-response choice interaction.\n *\n * @customElement qti-choice-interaction\n *\n * @attr {string} response-identifier - Required. Identifier of the bound response variable.\n * @attr {number} [max-choices=1] - Maximum selectable choices. `1` is a single-response\n * item; `0` means unlimited and makes it a multiple-response item.\n * @attr {number} [min-choices=0] - Minimum selectable choices for a valid response.\n * @attr {'horizontal'|'vertical'} [orientation=vertical] - Deprecated by QTI in favour of\n * the `qti-orientation-*` class vocabulary.\n * @attr {boolean} [shuffle=false] - Requests choice shuffling. Applied by the transform\n * pipeline (`qti-transformers`), not by this element.\n * @attr {'qti-orientation-horizontal'|'qti-orientation-vertical'|'qti-choices-stacking-1'|'qti-choices-stacking-2'|'qti-choices-stacking-3'|'qti-choices-stacking-4'|'qti-choices-stacking-5'|'qti-labels-none'|'qti-labels-decimal'|'qti-labels-lower-alpha'|'qti-labels-upper-alpha'|'qti-labels-suffix-none'|'qti-labels-suffix-period'|'qti-labels-suffix-parenthesis'|'qti-input-control-hidden'} class - QTI shared presentation vocabulary. Space-separated; takes precedence over `orientation`.\n *\n * @slot prompt - The prompt shown above the choices.\n * @slot - Default slot for `qti-simple-choice` elements.\n *\n * @csspart prompt - Wrapper around the prompt slot.\n * @csspart slot - Wrapper around the default slot containing the choices.\n * @csspart message - Live validation message region (role=\"alert\").\n */\nexport class QtiChoiceInteraction\n extends VocabularyMixin(ChoicesMixin(Interaction, 'qti-simple-choice'), 'qti-simple-choice')\n implements ChoicesInterface\n{\n static override styles: CSSResultGroup = styles;\n\n /** @deprecated, use 'qti-orientation-horizontal' or 'qti-orientation-vertical' instead */\n @property({ type: String })\n public orientation: Orientation = 'vertical';\n\n #handleSlotChange() {\n // count the number of choices, set a css variable for the number of choices\n const choices = this.querySelectorAll('qti-simple-choice');\n this.style.setProperty('--item-count', choices.length.toString());\n }\n\n override render() {\n return html`\n <slot part=\"prompt\" name=\"prompt\"></slot>\n <slot part=\"slot\" @slotchange=${this.#handleSlotChange}></slot>\n <div part=\"message\" role=\"alert\" id=\"validation-message\"></div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-choice-interaction': QtiChoiceInteraction;\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("lit").CSSResult;
|
|
1
|
+
declare const _default: import("lit").CSSResult[];
|
|
2
2
|
export default _default;
|
|
@@ -1,116 +1,75 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { boxSizing, validationMessage } from '@qti-components/base';
|
|
3
|
+
export default [
|
|
4
|
+
boxSizing,
|
|
5
|
+
validationMessage,
|
|
6
|
+
css `
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
[part='slot'] {
|
|
12
|
+
display: grid;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
}
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/* Define the number of columns dynamically */
|
|
17
|
+
:host([class*='qti-choices-stacking-']) [part='slot'] {
|
|
18
|
+
grid-template-columns: repeat(var(--stacking-count, 1), 1fr);
|
|
19
|
+
}
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:host(.qti-choices-stacking-6) {
|
|
34
|
-
--stacking-count: 6;
|
|
35
|
-
}
|
|
21
|
+
/* Apply dynamic stacking count based on class */
|
|
22
|
+
:host(.qti-choices-stacking-1) {
|
|
23
|
+
--stacking-count: 1;
|
|
24
|
+
}
|
|
25
|
+
:host(.qti-choices-stacking-2) {
|
|
26
|
+
--stacking-count: 2;
|
|
27
|
+
}
|
|
28
|
+
:host(.qti-choices-stacking-3) {
|
|
29
|
+
--stacking-count: 3;
|
|
30
|
+
}
|
|
31
|
+
:host(.qti-choices-stacking-4) {
|
|
32
|
+
--stacking-count: 4;
|
|
33
|
+
}
|
|
34
|
+
:host(.qti-choices-stacking-5) {
|
|
35
|
+
--stacking-count: 5;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
/* Default slot item layout */
|
|
39
|
+
::slotted(qti-simple-choice) {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
white-space: normal;
|
|
43
|
+
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
/* Orientation styles */
|
|
46
|
+
:host(.qti-orientation-horizontal) [part='slot'] {
|
|
47
|
+
grid-auto-flow: dense column;
|
|
48
|
+
grid-auto-columns: 1fr;
|
|
49
|
+
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
:host(.qti-orientation-vertical) [part='slot'] {
|
|
52
|
+
grid-auto-flow: row;
|
|
53
|
+
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
/* Vertical and horizontal stacking logic */
|
|
56
|
+
:host(.qti-orientation-vertical[class*='qti-choices-stacking-']) [part='slot'] {
|
|
57
|
+
grid-auto-flow: dense column;
|
|
58
|
+
grid-auto-columns: 1fr;
|
|
59
|
+
grid-template-columns: repeat(var(--stacking-count), 1fr);
|
|
60
|
+
grid-template-rows: repeat(calc(var(--item-count) / var(--stacking-count)), 1fr);
|
|
61
|
+
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
:host(.qti-orientation-horizontal[class*='qti-choices-stacking-']) [part='slot'] {
|
|
64
|
+
grid-auto-flow: row;
|
|
65
|
+
grid-template-columns: repeat(var(--stacking-count), 1fr);
|
|
66
|
+
grid-template-rows: unset;
|
|
67
|
+
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// [part='slot'] {
|
|
75
|
-
// display: flex;
|
|
76
|
-
// flex-direction: column;
|
|
77
|
-
// gap: var(--qti-gap-size);
|
|
78
|
-
// flex-wrap: wrap;
|
|
79
|
-
// }
|
|
80
|
-
// ::slotted(qti-simple-choice) {
|
|
81
|
-
// flex: 0 0
|
|
82
|
-
// calc((100% - (var(--qti-gap-size) * var(--choice-interactions-stacking))) / var(--choice-interactions-stacking)) !important;
|
|
83
|
-
// box-sizing: border-box !important;
|
|
84
|
-
// }
|
|
85
|
-
// :host(.qti-choices-stacking-1) [part='slot'] {
|
|
86
|
-
// flex-direction: row;
|
|
87
|
-
// --choice-interactions-stacking: 1;
|
|
88
|
-
// }
|
|
89
|
-
// :host(.qti-choices-stacking-2) [part='slot'] {
|
|
90
|
-
// flex-direction: row;
|
|
91
|
-
// --choice-interactions-stacking: 2;
|
|
92
|
-
// }
|
|
93
|
-
// :host(.qti-choices-stacking-3) [part='slot'] {
|
|
94
|
-
// flex-direction: row;
|
|
95
|
-
// --choice-interactions-stacking: 3;
|
|
96
|
-
// }
|
|
97
|
-
// :host(.qti-choices-stacking-4) [part='slot'] {
|
|
98
|
-
// flex-direction: row;
|
|
99
|
-
// --choice-interactions-stacking: 4;
|
|
100
|
-
// }
|
|
101
|
-
// :host(.qti-choices-stacking-5) [part='slot'] {
|
|
102
|
-
// flex-direction: row;
|
|
103
|
-
// --choice-interactions-stacking: 5;
|
|
104
|
-
// }
|
|
105
|
-
// :host([orientation='horizontal']) [part='slot'] {
|
|
106
|
-
// flex-direction: row;
|
|
107
|
-
// }
|
|
108
|
-
// :host(.qti-orientation-horizontal) [part='slot'] {
|
|
109
|
-
// flex-direction: row;
|
|
110
|
-
// flex-wrap: nowrap;
|
|
111
|
-
// }
|
|
112
|
-
// :host(.qti-orientation-horizontal) ::slotted(qti-simple-choice) {
|
|
113
|
-
// flex: 1 1 auto !important;
|
|
114
|
-
// }
|
|
115
|
-
// `;
|
|
69
|
+
/* Ensure even distribution in vertical mode */
|
|
70
|
+
:host(.qti-orientation-vertical) ::slotted(qti-simple-choice:nth-child(even)) {
|
|
71
|
+
grid-row: auto;
|
|
72
|
+
}
|
|
73
|
+
`
|
|
74
|
+
];
|
|
116
75
|
//# sourceMappingURL=qti-choice-interaction.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qti-choice-interaction.styles.js","sourceRoot":"","sources":["../src/qti-choice-interaction.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,
|
|
1
|
+
{"version":3,"file":"qti-choice-interaction.styles.js","sourceRoot":"","sources":["../src/qti-choice-interaction.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,eAAe;IACb,SAAS;IACT,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEF;CACF,CAAC","sourcesContent":["import { css } from 'lit';\n\nimport { boxSizing, validationMessage } from '@qti-components/base';\n\nexport default [\n boxSizing,\n validationMessage,\n css`\n :host {\n display: block;\n }\n\n [part='slot'] {\n display: grid;\n gap: 10px;\n }\n\n /* Define the number of columns dynamically */\n :host([class*='qti-choices-stacking-']) [part='slot'] {\n grid-template-columns: repeat(var(--stacking-count, 1), 1fr);\n }\n\n /* Apply dynamic stacking count based on class */\n :host(.qti-choices-stacking-1) {\n --stacking-count: 1;\n }\n :host(.qti-choices-stacking-2) {\n --stacking-count: 2;\n }\n :host(.qti-choices-stacking-3) {\n --stacking-count: 3;\n }\n :host(.qti-choices-stacking-4) {\n --stacking-count: 4;\n }\n :host(.qti-choices-stacking-5) {\n --stacking-count: 5;\n }\n\n /* Default slot item layout */\n ::slotted(qti-simple-choice) {\n display: flex;\n align-items: center;\n white-space: normal;\n }\n\n /* Orientation styles */\n :host(.qti-orientation-horizontal) [part='slot'] {\n grid-auto-flow: dense column;\n grid-auto-columns: 1fr;\n }\n\n :host(.qti-orientation-vertical) [part='slot'] {\n grid-auto-flow: row;\n }\n\n /* Vertical and horizontal stacking logic */\n :host(.qti-orientation-vertical[class*='qti-choices-stacking-']) [part='slot'] {\n grid-auto-flow: dense column;\n grid-auto-columns: 1fr;\n grid-template-columns: repeat(var(--stacking-count), 1fr);\n grid-template-rows: repeat(calc(var(--item-count) / var(--stacking-count)), 1fr);\n }\n\n :host(.qti-orientation-horizontal[class*='qti-choices-stacking-']) [part='slot'] {\n grid-auto-flow: row;\n grid-template-columns: repeat(var(--stacking-count), 1fr);\n grid-template-rows: unset;\n }\n\n /* Ensure even distribution in vertical mode */\n :host(.qti-orientation-vertical) ::slotted(qti-simple-choice:nth-child(even)) {\n grid-row: auto;\n }\n `\n];\n"]}
|
package/dist/register.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { elements } from './elements';
|
|
2
|
+
for (const { tag, ctor } of elements) {
|
|
3
|
+
if (!customElements.get(tag)) {
|
|
4
|
+
customElements.define(tag, ctor);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
3
7
|
//# sourceMappingURL=register.js.map
|
package/dist/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,QAAQ,EAAE,CAAC;IACrC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;AACH,CAAC","sourcesContent":["import { elements } from './elements';\n\nfor (const { tag, ctor } of elements) {\n if (!customElements.get(tag)) {\n customElements.define(tag, ctor);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qti-components/choice-interaction",
|
|
3
3
|
"description": "QTI choice-interaction interaction",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.5",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@qti-components/base": "^
|
|
8
|
-
"@qti-components/interactions-core": "^
|
|
9
|
-
"@qti-components/utilities": "^1.3.
|
|
7
|
+
"@qti-components/base": "^2.0.0",
|
|
8
|
+
"@qti-components/interactions-core": "^2.0.0",
|
|
9
|
+
"@qti-components/utilities": "^1.3.3"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@lit/context": "^1.1.6",
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"./styles": {
|
|
46
46
|
"types": "./dist/qti-choice-interaction.styles.d.ts",
|
|
47
47
|
"import": "./dist/qti-choice-interaction.styles.js"
|
|
48
|
+
},
|
|
49
|
+
"./elements": {
|
|
50
|
+
"types": "./dist/elements.d.ts",
|
|
51
|
+
"import": "./dist/elements.js"
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"repository": {
|
|
@@ -55,6 +59,8 @@
|
|
|
55
59
|
"scripts": {
|
|
56
60
|
"attw": "attw --profile esm-only --pack",
|
|
57
61
|
"build": "tsc --paths null",
|
|
58
|
-
"clean": "rm -rf dist"
|
|
62
|
+
"clean": "rm -rf dist",
|
|
63
|
+
"yalc": "yalc publish",
|
|
64
|
+
"yalc:push": "yalc push"
|
|
59
65
|
}
|
|
60
66
|
}
|