@citolab/qti-components 10.0.0-next.15 → 10.0.0-next.17
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/cdn/index.global.js +1 -1
- package/cdn/index.js +1503 -2931
- package/dist/base.d.ts +37 -11
- package/dist/base.js +8 -1
- package/dist/{chunk-G2EIC7H2.js → chunk-7MYZHZWV.js} +955 -364
- package/dist/chunk-7MYZHZWV.js.map +1 -0
- package/dist/chunk-DJ7PB252.js +7 -0
- package/dist/chunk-DJ7PB252.js.map +1 -0
- package/dist/{chunk-F553IZPL.js → chunk-J3F3JSCW.js} +2 -2
- package/dist/chunk-J6VX4N7M.js +197 -0
- package/dist/chunk-J6VX4N7M.js.map +1 -0
- package/dist/{chunk-32PI7KWX.js → chunk-L3LBSAGZ.js} +2 -2
- package/dist/{chunk-WIUPAUJV.js → chunk-L7J2ZOJL.js} +2 -2
- package/dist/{chunk-IM5AKPIJ.js → chunk-NZ7ZC4SP.js} +96 -4
- package/dist/chunk-NZ7ZC4SP.js.map +1 -0
- package/dist/{chunk-XY5DHYIH.js → chunk-OG5HIRHE.js} +3 -3
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-HT3LSWXL.js → chunk-QLGUI5VG.js} +2 -2
- package/dist/chunk-UCXLDQYA.js +56 -0
- package/dist/chunk-UCXLDQYA.js.map +1 -0
- package/dist/{chunk-5AJZGRWI.js → chunk-UDJ7MHLF.js} +4 -4
- package/dist/chunk-UDJ7MHLF.js.map +1 -0
- package/dist/{chunk-MIQZBDTB.js → chunk-UURHLJVM.js} +107 -1809
- package/dist/chunk-UURHLJVM.js.map +1 -0
- package/dist/{chunk-IWNRQVNW.js → chunk-V5GL7PTC.js} +2 -2
- package/dist/{chunk-QT7WQXCS.js → chunk-WGUQCB2Z.js} +28 -82
- package/dist/chunk-WGUQCB2Z.js.map +1 -0
- package/dist/chunk-WWY2H2YO.js +7 -0
- package/dist/chunk-WWY2H2YO.js.map +1 -0
- package/dist/{chunk-URYYGVTA.js → chunk-ZAHZVBV7.js} +60 -75
- package/dist/chunk-ZAHZVBV7.js.map +1 -0
- package/dist/{computed.types.d-IXACuBr7.d.ts → computed.types.d-D4wskgi0.d.ts} +2 -2
- package/dist/corrections.d.ts +123 -20
- package/dist/corrections.js +11 -11
- package/dist/corrections.js.map +1 -1
- package/dist/elements.d.ts +35 -112
- package/dist/elements.js +8 -5
- package/dist/index.d.ts +18 -14
- package/dist/index.js +29 -63
- package/dist/interactions.d.ts +84 -17
- package/dist/interactions.js +4 -3
- package/dist/item.css +1057 -2383
- package/dist/item.d.ts +6 -4
- package/dist/item.js +5 -4
- package/dist/item.types.d-Zc6ZQDhu.d.ts +25 -0
- package/dist/loader.d.ts +4 -2
- package/dist/loader.js +1 -0
- package/dist/processing.d.ts +4 -3
- package/dist/processing.js +4 -3
- package/dist/public-events.d-3dGip9pd.d.ts +105 -0
- package/dist/qti-components-jsx.d.ts +4058 -4421
- package/dist/{qti-condition-expression.d-B-T1NNl0.d.ts → qti-condition-expression.d-7Kd4LBxn.d.ts} +1 -1
- package/dist/{qti-expression.d-B-Cfbqlb.d.ts → qti-expression.d-iH3w6mqf.d.ts} +2 -1
- package/dist/{qti-feedback.d-GAqMqAt6.d.ts → qti-feedback.d-CT0W-8Gm.d.ts} +2 -2
- package/dist/{qti-item.d-pFcNk0th.d.ts → qti-item.d-CLChmRvB.d.ts} +2 -1
- package/dist/qti-test-state-BAf5AmJ2.d.ts +68 -0
- package/dist/qti-test-state.d-D8Q89RzZ.d.ts +57 -0
- package/dist/{qti-test.d-BjhVQnQy.d.ts → qti-test.d-COzv7YZG.d.ts} +14 -548
- package/dist/{qti-text-entry-interaction.d-DECzpIzi.d.ts → qti-text-entry-interaction.d-DsUyecBC.d.ts} +144 -43
- package/dist/{record.d-CljDLwRz.d.ts → record.d-BfZhFr0L.d.ts} +34 -3
- package/dist/{session.context.d-DW09Lrie.d.ts → session.context.d-9gRdGK4T.d.ts} +2 -2
- package/dist/test-plugin-api.d.ts +134 -0
- package/dist/test-plugin-api.js +19 -0
- package/dist/test-plugin-api.js.map +1 -0
- package/dist/test.d.ts +16 -158
- package/dist/test.js +13 -52
- package/dist/transformers.js +1 -0
- package/dist/{item.types.d-DuVR0ZVK.d.ts → variables.d-DWHlTszN.d.ts} +1 -23
- package/package.json +13 -9
- package/dist/chunk-5AJZGRWI.js.map +0 -1
- package/dist/chunk-G2EIC7H2.js.map +0 -1
- package/dist/chunk-IM5AKPIJ.js.map +0 -1
- package/dist/chunk-MIQZBDTB.js.map +0 -1
- package/dist/chunk-QT7WQXCS.js.map +0 -1
- package/dist/chunk-RNLSNH4N.js +0 -7
- package/dist/chunk-RNLSNH4N.js.map +0 -1
- package/dist/chunk-URYYGVTA.js.map +0 -1
- /package/dist/{chunk-F553IZPL.js.map → chunk-J3F3JSCW.js.map} +0 -0
- /package/dist/{chunk-32PI7KWX.js.map → chunk-L3LBSAGZ.js.map} +0 -0
- /package/dist/{chunk-WIUPAUJV.js.map → chunk-L7J2ZOJL.js.map} +0 -0
- /package/dist/{chunk-XY5DHYIH.js.map → chunk-OG5HIRHE.js.map} +0 -0
- /package/dist/{chunk-HT3LSWXL.js.map → chunk-QLGUI5VG.js.map} +0 -0
- /package/dist/{chunk-IWNRQVNW.js.map → chunk-V5GL7PTC.js.map} +0 -0
package/dist/base.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { C as ComputedItemContext } from './session.context.d-
|
|
2
|
-
export { I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-
|
|
3
|
-
import { C as ComputedContext } from './computed.types.d-
|
|
4
|
-
export { a as ComputedItem } from './computed.types.d-
|
|
1
|
+
import { C as ComputedItemContext } from './session.context.d-9gRdGK4T.js';
|
|
2
|
+
export { I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-9gRdGK4T.js';
|
|
3
|
+
import { C as ComputedContext } from './computed.types.d-D4wskgi0.js';
|
|
4
|
+
export { a as ComputedItem } from './computed.types.d-D4wskgi0.js';
|
|
5
5
|
export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-CCqlJXpE.js';
|
|
6
|
-
export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, i as inferRecordFieldBaseType,
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
6
|
+
export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, V as ValidityKind, c as ValidityTrigger, i as inferRecordFieldBaseType, d as interactionContext, e as isRecordValue, r as readRecordFieldValues } from './record.d-BfZhFr0L.js';
|
|
7
|
+
import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
|
|
8
|
+
export { i as itemContextVariables } from './item.types.d-Zc6ZQDhu.js';
|
|
9
9
|
export { Q as QtiContext, a as QtiContextType, S as Seed, b as asSeed, i as isSeed, q as qtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
10
|
-
export { I as INITIAL_TEST_CONTEXT, Q as QtiExpression, a as QtiExpressionBase, T as TestContext, t as testContext } from './qti-expression.d-
|
|
10
|
+
export { I as INITIAL_TEST_CONTEXT, Q as QtiExpression, a as QtiExpressionBase, T as TestContext, t as testContext } from './qti-expression.d-iH3w6mqf.js';
|
|
11
11
|
import * as lit from 'lit';
|
|
12
|
-
export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-
|
|
13
|
-
export { Q as QtiConditionExpression } from './qti-condition-expression.d-
|
|
12
|
+
export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-CT0W-8Gm.js';
|
|
13
|
+
export { Q as QtiConditionExpression } from './qti-condition-expression.d-7Kd4LBxn.js';
|
|
14
14
|
export { D as DirectedPair, I as Identifier, P as Point, R as ResponseValue, i as iterResponseValues, p as parsePair, a as parsePoint, b as parseResponseAttribute, r as responseAttributeConverter, s as serializePair, c as serializePoint, d as serializeResponseAttribute } from './response.d-_8y4kjGP.js';
|
|
15
|
+
import { B as BaseType } from './variables.d-DWHlTszN.js';
|
|
16
|
+
export { C as Calculate, a as Cardinality, I as InterpolationTableEntry, M as Multiple, O as Ordered, b as OutcomeVariable, Q as QtiAreaMapEntry, c as QtiAreaMapping, d as QtiMapEntry, e as QtiMapping, R as ResponseInteraction, f as ResponseVariable, T as TemplateVariable, V as VariableDeclaration, g as VariableValue, h as areaShape, i as directedPair, j as float, k as integer } from './variables.d-DWHlTszN.js';
|
|
15
17
|
export { F as FormAssociatedInteraction, I as IInteraction, R as ReadonlyInteraction, a as RegisteredInteraction, b as ResettableInteraction, c as ResponseIdentifiedInteraction, d as ResponseInteractionElement, V as ValidatableInteraction } from './interaction.interface.d-CvjHM2bi.js';
|
|
16
18
|
export { Q as QtiExitResponseSignal, a as QtiExitTestSignal, b as QtiRuleBase, c as QtiRuleElement } from './qti-rule-base.d-CeKP0Ooi.js';
|
|
17
19
|
|
|
@@ -192,6 +194,30 @@ declare function classifyCustomStateSupport(attachInternals: (this: HTMLElement)
|
|
|
192
194
|
*/
|
|
193
195
|
declare function installCustomStateSetFallback(): CustomStateSupport | 'already-installed';
|
|
194
196
|
|
|
197
|
+
/**
|
|
198
|
+
* The vocabulary of custom states (CONTRACT.md §3 in qti-theme), with the names it replaced.
|
|
199
|
+
*
|
|
200
|
+
* A state is set under the name the contract uses. For one major the old name is set too, so a
|
|
201
|
+
* host that still reads `:state(drag)` keeps working while the theme reads `:state(chip)`. When the
|
|
202
|
+
* alias period ends, empty the table; every call site then sets only the new name.
|
|
203
|
+
*
|
|
204
|
+
* Not in the table, because the old name meant something else on another element:
|
|
205
|
+
* - a drop target's `drag-active` replaced `active` + `enabled`; the interaction host's `drag-active`
|
|
206
|
+
* replaced `dragzone-active` + `dragzone-enabled`. Each call site names its own old pair.
|
|
207
|
+
* - a drop target's `full` replaced the attribute `disabled`, which stays as an attribute.
|
|
208
|
+
* - `answer-key` replaced `show-correct-response` on an interaction host and `correct-response` on a
|
|
209
|
+
* choice; the corrections package passes the one that applies.
|
|
210
|
+
*/
|
|
211
|
+
declare const STATE_ALIASES: Readonly<Record<string, readonly string[]>>;
|
|
212
|
+
type StateSet = Pick<Set<string>, 'add' | 'delete' | 'has'>;
|
|
213
|
+
/**
|
|
214
|
+
* Set or clear a state and its aliases. `states` may be undefined on an element without internals;
|
|
215
|
+
* then nothing happens, as before.
|
|
216
|
+
*/
|
|
217
|
+
declare function setState(states: StateSet | undefined | null, name: string, on: boolean, oldNames?: readonly string[]): void;
|
|
218
|
+
/** Whether a state is set, under its contract name or an alias. */
|
|
219
|
+
declare function hasState(states: StateSet | undefined | null, name: string): boolean;
|
|
220
|
+
|
|
195
221
|
declare class ScoringHelper {
|
|
196
222
|
/**
|
|
197
223
|
* Checks if a given point is within a specified area.
|
|
@@ -232,4 +258,4 @@ declare const convertNumberToUniversalFormat: (number: number | string) => strin
|
|
|
232
258
|
declare function IsNullOrUndefined(value: unknown): boolean;
|
|
233
259
|
declare function removeDoubleSlashes(str: string): string;
|
|
234
260
|
|
|
235
|
-
export { BaseType, ComputedContext, ComputedItemContext, type CustomOperator, type CustomOperatorValue, CustomStateSetShim, type CustomStateSupport, IsNullOrUndefined, ItemContext, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, unregisterCustomOperator, validationMessage };
|
|
261
|
+
export { BaseType, ComputedContext, ComputedItemContext, type CustomOperator, type CustomOperatorValue, CustomStateSetShim, type CustomStateSupport, IsNullOrUndefined, ItemContext, STATE_ALIASES, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, hasState, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, setState, unregisterCustomOperator, validationMessage };
|
package/dist/base.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
QtiFeedback,
|
|
12
12
|
QtiRuleElement,
|
|
13
13
|
QtiVariableDeclaration,
|
|
14
|
+
STATE_ALIASES,
|
|
14
15
|
ScoringHelper,
|
|
15
16
|
asSeed,
|
|
16
17
|
boxSizing,
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
decimalSeparator,
|
|
23
24
|
dropRegion,
|
|
24
25
|
getCustomOperator,
|
|
26
|
+
hasState,
|
|
25
27
|
inferRecordFieldBaseType,
|
|
26
28
|
installCustomStateSetFallback,
|
|
27
29
|
interactionContext,
|
|
@@ -42,10 +44,12 @@ import {
|
|
|
42
44
|
serializePoint,
|
|
43
45
|
serializeResponseAttribute,
|
|
44
46
|
sessionContext,
|
|
47
|
+
setState,
|
|
45
48
|
testContext,
|
|
46
49
|
unregisterCustomOperator,
|
|
47
50
|
validationMessage
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-NZ7ZC4SP.js";
|
|
52
|
+
import "./chunk-PZ5AY32C.js";
|
|
49
53
|
export {
|
|
50
54
|
CustomStateSetShim,
|
|
51
55
|
INITIAL_SESSION_CONTEXT,
|
|
@@ -59,6 +63,7 @@ export {
|
|
|
59
63
|
QtiFeedback,
|
|
60
64
|
QtiRuleElement,
|
|
61
65
|
QtiVariableDeclaration,
|
|
66
|
+
STATE_ALIASES,
|
|
62
67
|
ScoringHelper,
|
|
63
68
|
asSeed,
|
|
64
69
|
boxSizing,
|
|
@@ -70,6 +75,7 @@ export {
|
|
|
70
75
|
decimalSeparator,
|
|
71
76
|
dropRegion,
|
|
72
77
|
getCustomOperator,
|
|
78
|
+
hasState,
|
|
73
79
|
inferRecordFieldBaseType,
|
|
74
80
|
installCustomStateSetFallback,
|
|
75
81
|
interactionContext,
|
|
@@ -90,6 +96,7 @@ export {
|
|
|
90
96
|
serializePoint,
|
|
91
97
|
serializeResponseAttribute,
|
|
92
98
|
sessionContext,
|
|
99
|
+
setState,
|
|
93
100
|
testContext,
|
|
94
101
|
unregisterCustomOperator,
|
|
95
102
|
validationMessage
|