@citolab/qti-components 8.1.0 → 9.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.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +288 -182
- package/dist/base.d.ts +5 -5
- package/dist/base.js +1 -1
- package/dist/{chunk-TXIB3SKC.js → chunk-3MQNPN7A.js} +3 -3
- package/dist/{chunk-6V3A7NQP.js → chunk-3NPCS4IT.js} +2 -2
- package/dist/{chunk-MK2I3MQB.js → chunk-3VQSUWCK.js} +175 -15
- package/dist/chunk-3VQSUWCK.js.map +1 -0
- package/dist/{chunk-4XR2JHCP.js → chunk-5BXJRO5O.js} +1816 -551
- package/dist/chunk-5BXJRO5O.js.map +1 -0
- package/dist/{chunk-NZLW6EX7.js → chunk-DXEWBTJB.js} +2 -2
- package/dist/{chunk-Q52IJELT.js → chunk-GBDTBHUQ.js} +602 -263
- package/dist/chunk-GBDTBHUQ.js.map +1 -0
- package/dist/chunk-KCK27QBP.js +11 -0
- package/dist/chunk-KCK27QBP.js.map +1 -0
- package/dist/chunk-MKZ374OJ.js +179 -0
- package/dist/chunk-MKZ374OJ.js.map +1 -0
- package/dist/{chunk-3IACYIU2.js → chunk-RT6WZ3P7.js} +2 -2
- package/dist/chunk-TLTYXWW7.js +7 -0
- package/dist/chunk-TLTYXWW7.js.map +1 -0
- package/dist/{chunk-EKXZI26R.js → chunk-WCWJPIUQ.js} +58 -6
- package/dist/chunk-WCWJPIUQ.js.map +1 -0
- package/dist/{chunk-6XJUP55A.js → chunk-WKWCOV5P.js} +3 -3
- package/dist/chunk-WKWCOV5P.js.map +1 -0
- package/dist/{chunk-CF3DXJWM.js → chunk-WTV7NQHO.js} +731 -715
- package/dist/chunk-WTV7NQHO.js.map +1 -0
- package/dist/{computed.types.d-DpKIYO6e.d.ts → computed.types.d-CJarqC6s.d.ts} +12 -0
- package/dist/corrections.d.ts +14 -4
- package/dist/corrections.js +82 -7
- package/dist/corrections.js.map +1 -1
- package/dist/elements.d.ts +1 -1
- package/dist/elements.js +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +26 -24
- package/dist/interactions.js +14 -15
- package/dist/item.css +81 -0
- package/dist/item.d.ts +1 -1
- package/dist/item.js +4 -4
- package/dist/loader.d.ts +1 -1
- package/dist/processing.d.ts +29 -3
- package/dist/processing.js +3 -2
- package/dist/qti-components-jsx.d.ts +7883 -7250
- package/dist/{qti-condition-expression.d-aMvBvpc6.d.ts → qti-condition-expression.d-CYwXOUb1.d.ts} +1 -1
- package/dist/{qti-expression.d-BietT_8b.d.ts → qti-expression.d-B_-m9emA.d.ts} +11 -1
- package/dist/{qti-feedback.d-DZbad0RN.d.ts → qti-feedback.d-B1EIF-fU.d.ts} +1 -0
- package/dist/{qti-test.d-_YAlhDbt.d.ts → qti-test.d-C6lCEMRB.d.ts} +38 -3
- package/dist/test.d.ts +5 -5
- package/dist/test.js +7 -5
- package/package.json +9 -9
- package/dist/chunk-4XR2JHCP.js.map +0 -1
- package/dist/chunk-6XJUP55A.js.map +0 -1
- package/dist/chunk-CF3DXJWM.js.map +0 -1
- package/dist/chunk-EKXZI26R.js.map +0 -1
- package/dist/chunk-IXPDMYKH.js +0 -1420
- package/dist/chunk-IXPDMYKH.js.map +0 -1
- package/dist/chunk-IYC7LZV6.js +0 -7
- package/dist/chunk-IYC7LZV6.js.map +0 -1
- package/dist/chunk-MK2I3MQB.js.map +0 -1
- package/dist/chunk-Q52IJELT.js.map +0 -1
- /package/dist/{chunk-TXIB3SKC.js.map → chunk-3MQNPN7A.js.map} +0 -0
- /package/dist/{chunk-6V3A7NQP.js.map → chunk-3NPCS4IT.js.map} +0 -0
- /package/dist/{chunk-NZLW6EX7.js.map → chunk-DXEWBTJB.js.map} +0 -0
- /package/dist/{chunk-3IACYIU2.js.map → chunk-RT6WZ3P7.js.map} +0 -0
package/dist/item.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
@layer qti-base, qti-components, qti-extended;
|
|
3
|
+
|
|
3
4
|
@layer qti-components.reset, qti-components.global, qti-components.interactions.base,
|
|
4
5
|
qti-components.interactions.brand, qti-components.interactions.states,
|
|
5
6
|
qti-components.interactions.corrections, qti-components.elements, qti-components.overrides;
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
* Nothing is left unlayered: unlayered CSS outranks every layer, so a single stray rule here would
|
|
15
16
|
* sit above the whole theme AND above the `qti-extended` slot consumers are told to author in.
|
|
16
17
|
*/
|
|
18
|
+
|
|
17
19
|
@layer qti-base{
|
|
18
20
|
/* https://www.imsglobal.org/sites/default/files/spec/qti/v3/guide/img/qti3p0.css */
|
|
19
21
|
/* ============================
|
|
@@ -1446,6 +1448,7 @@
|
|
|
1446
1448
|
text-orientation: upright;
|
|
1447
1449
|
}
|
|
1448
1450
|
}
|
|
1451
|
+
|
|
1449
1452
|
@layer qti-base{
|
|
1450
1453
|
|
|
1451
1454
|
.qti-layout-row {
|
|
@@ -1577,6 +1580,7 @@
|
|
|
1577
1580
|
* block is appended after every declared layer, which would put brand paint above the state and
|
|
1578
1581
|
* correction paint it is meant to sit under. Deleting the two names moved 7 of the 17 VRT baselines.
|
|
1579
1582
|
*/
|
|
1583
|
+
|
|
1580
1584
|
@layer qti-components.reset{
|
|
1581
1585
|
@scope (qti-item-body, .ProseMirror) {
|
|
1582
1586
|
:scope,
|
|
@@ -1628,6 +1632,7 @@
|
|
|
1628
1632
|
}
|
|
1629
1633
|
}
|
|
1630
1634
|
}
|
|
1635
|
+
|
|
1631
1636
|
@layer qti-components.elements{
|
|
1632
1637
|
|
|
1633
1638
|
/**
|
|
@@ -1699,6 +1704,7 @@
|
|
|
1699
1704
|
* these blocks (--qti-correct reads --qti-success) is layer-independent. Nothing here renders
|
|
1700
1705
|
* differently for being grouped this way.
|
|
1701
1706
|
*/
|
|
1707
|
+
|
|
1702
1708
|
/* ============================================================================
|
|
1703
1709
|
* global — the foundation every layer reads.
|
|
1704
1710
|
* ========================================================================== */
|
|
@@ -1893,6 +1899,7 @@
|
|
|
1893
1899
|
}
|
|
1894
1900
|
}
|
|
1895
1901
|
}
|
|
1902
|
+
|
|
1896
1903
|
/* ============================================================================
|
|
1897
1904
|
* interactions.base — interaction-local geometry. Neutral, no judgement colour.
|
|
1898
1905
|
* ========================================================================== */
|
|
@@ -2064,6 +2071,7 @@
|
|
|
2064
2071
|
--qti-drag-padding: var(--qti-spacing) 0.8em;
|
|
2065
2072
|
}
|
|
2066
2073
|
}
|
|
2074
|
+
|
|
2067
2075
|
/* ============================================================================
|
|
2068
2076
|
* interactions.states — state paint. Selection, drag, and drop-target highlight.
|
|
2069
2077
|
* ========================================================================== */
|
|
@@ -2110,6 +2118,7 @@
|
|
|
2110
2118
|
--qti-drop-highlight-border-width: 2px;
|
|
2111
2119
|
}
|
|
2112
2120
|
}
|
|
2121
|
+
|
|
2113
2122
|
/* ============================================================================
|
|
2114
2123
|
* interactions.corrections — answer-key and judgement paint.
|
|
2115
2124
|
* ========================================================================== */
|
|
@@ -2134,15 +2143,18 @@
|
|
|
2134
2143
|
/* QTI base — shared theme utilities and semantic mixins. Only styles >=2 interactions share.
|
|
2135
2144
|
* They read the variables in qti-variables.css; a substrate re-colours by overriding those, not
|
|
2136
2145
|
* by editing these. Split from qti-base.css. */
|
|
2146
|
+
|
|
2137
2147
|
/* ============================================================================
|
|
2138
2148
|
* Shared semantic mixins. Only styles ≥2 interactions share belong here.
|
|
2139
2149
|
* A substrate expresses its look by overriding the --qti-* variables above
|
|
2140
2150
|
* (value first), not by editing these.
|
|
2141
2151
|
* ========================================================================== */
|
|
2152
|
+
|
|
2142
2153
|
/*
|
|
2143
2154
|
* Semantic PostCSS mixins. Interaction files wire these to their own parts and states; the mixins
|
|
2144
2155
|
* own the shared visual vocabulary.
|
|
2145
2156
|
*/
|
|
2157
|
+
|
|
2146
2158
|
/*
|
|
2147
2159
|
* A candidate correction, painted through the corrected element's own role.
|
|
2148
2160
|
*
|
|
@@ -2159,6 +2171,7 @@
|
|
|
2159
2171
|
*
|
|
2160
2172
|
* `candidate-tint` below survives for the one corrected element with no role: qti-hottext.
|
|
2161
2173
|
*/
|
|
2174
|
+
|
|
2162
2175
|
/*
|
|
2163
2176
|
* THE paint contract. Every visual component is, at rest, a bordered box on the theme's surface.
|
|
2164
2177
|
* This mixin binds each PAINT property to a variable exactly once, so a state — or a theme —
|
|
@@ -2189,6 +2202,7 @@
|
|
|
2189
2202
|
* rings) and a MULTI-SLOT box-shadow (so an element's resting lift, in-flight elevation and focus
|
|
2190
2203
|
* ring compose instead of the last one winning — the documented four-rule box-shadow contention).
|
|
2191
2204
|
*/
|
|
2205
|
+
|
|
2192
2206
|
/*
|
|
2193
2207
|
* A drag: the movable token a candidate drags into a gap, a drop target or an order slot.
|
|
2194
2208
|
*
|
|
@@ -2206,6 +2220,7 @@
|
|
|
2206
2220
|
* Under content-box the clone's padding would be added to the width the drag code measured off the
|
|
2207
2221
|
* bank drag, and it would jump the instant it was picked up.
|
|
2208
2222
|
*/
|
|
2223
|
+
|
|
2209
2224
|
/*
|
|
2210
2225
|
* The hole a drag leaves behind: lifted mid-drag, or spent because its copy is already placed.
|
|
2211
2226
|
*
|
|
@@ -2216,6 +2231,7 @@
|
|
|
2216
2231
|
* bank would reflow around a hole 20px narrower than the thing that left it. Measured in
|
|
2217
2232
|
* drag-drop.invariance.spec.ts, "a spent drag keeps its footprint".
|
|
2218
2233
|
*/
|
|
2234
|
+
|
|
2219
2235
|
/*
|
|
2220
2236
|
* The drag handle glyph.
|
|
2221
2237
|
*
|
|
@@ -2228,6 +2244,7 @@
|
|
|
2228
2244
|
* else. This one is in flow and takes real width, which is why it reserves an explicit width/height
|
|
2229
2245
|
* rather than leaning on the glyph's intrinsic size.
|
|
2230
2246
|
*/
|
|
2247
|
+
|
|
2231
2248
|
/*
|
|
2232
2249
|
* The radio and the checkbox: the other two things this theme draws as boxes, and so the other two
|
|
2233
2250
|
* paint roles. A control is a bordered box on the theme's surface exactly like a chip is, and now it
|
|
@@ -2248,6 +2265,7 @@
|
|
|
2248
2265
|
* not a paint slot. Centring the mark is the component's job — qti-simple-choice.styles.ts already
|
|
2249
2266
|
* flex-centres [part='control'].
|
|
2250
2267
|
*/
|
|
2268
|
+
|
|
2251
2269
|
/*
|
|
2252
2270
|
* The mark inside a control at rest — the box the tick or dot is drawn into. Structural.
|
|
2253
2271
|
*
|
|
@@ -2260,10 +2278,12 @@
|
|
|
2260
2278
|
* border — so it would silently shrink by the border width and change with it. Multiplying the token
|
|
2261
2279
|
* keeps the mark proportional to the control's outer size, which is the size anyone reasons about.
|
|
2262
2280
|
*/
|
|
2281
|
+
|
|
2263
2282
|
/* A choice with its native control shown (radio/checkbox visible) is the button component with its
|
|
2264
2283
|
border made TRANSPARENT — no visible box, but the 1px edge is still there, so it is the same box
|
|
2265
2284
|
as the `.qti-input-control-hidden` choice (which keeps the border visible because the whole choice
|
|
2266
2285
|
is the control). Only the border COLOUR differs between the two, never the geometry. */
|
|
2286
|
+
|
|
2267
2287
|
/*
|
|
2268
2288
|
* The mark a checked control shows: a dot for a radio, a tick for a checkbox.
|
|
2269
2289
|
*
|
|
@@ -2272,6 +2292,7 @@
|
|
|
2272
2292
|
* `control-selected`), so the two belong together: override --checkbox-background-color and you will
|
|
2273
2293
|
* usually want --checkbox-mark-color with it. `white` is the resting value, not a fixed one.
|
|
2274
2294
|
*/
|
|
2295
|
+
|
|
2275
2296
|
/*
|
|
2276
2297
|
* `act`, `readonly` and `dis` used to live here. They are written out at their call sites now, for
|
|
2277
2298
|
* two different reasons.
|
|
@@ -2293,16 +2314,20 @@
|
|
|
2293
2314
|
*
|
|
2294
2315
|
* `act-bor` was deleted outright: zero call sites anywhere in the repo.
|
|
2295
2316
|
*/
|
|
2317
|
+
|
|
2296
2318
|
/* `foc` stays a mixin, deliberately, and is the one state still painting a property directly.
|
|
2297
2319
|
* Twenty call sites read it, and it draws a `box-shadow` — the property the contract has NOT bound
|
|
2298
2320
|
* (see `paint` above). Routing it through --<role>-box-shadow would not fix anything: focus would
|
|
2299
2321
|
* then fight the resting lift and the in-flight elevation over one slot, last-declared winning,
|
|
2300
2322
|
* which is the four-rule contention already documented in qti-variables.css. The intended fix
|
|
2301
2323
|
* recorded there is a single `outline` on `:focus-visible`, and that is its own VRT-checked step. */
|
|
2324
|
+
|
|
2302
2325
|
/* A choice — the clickable box a candidate picks. Nothing but the resting paint box; its padding is
|
|
2303
2326
|
the interaction's (qti-choice-interaction.css), because a choice's box differs per interaction and
|
|
2304
2327
|
a chip's does not. */
|
|
2328
|
+
|
|
2305
2329
|
/* A text field: the paint box, plus the cursor that says you can type in it. */
|
|
2330
|
+
|
|
2306
2331
|
/*
|
|
2307
2332
|
* A drop target: the paint box with a DASHED edge, the one thing that distinguishes it from every
|
|
2308
2333
|
* other role.
|
|
@@ -2317,9 +2342,11 @@
|
|
|
2317
2342
|
* dashed edge onto any chip standing in the drop (it did — a chip in a drop went dashed). Now that
|
|
2318
2343
|
* the chip reads --drag-border-style, the drop's value inherits past it harmlessly.
|
|
2319
2344
|
*/
|
|
2345
|
+
|
|
2320
2346
|
/* The initial `display: none` moved to `validationMessage` in qti-base — the message is a shadow
|
|
2321
2347
|
node, and `Interaction.reportValidity` already owns showing and hiding it with an inline style.
|
|
2322
2348
|
What is left here is paint. */
|
|
2349
|
+
|
|
2323
2350
|
/*
|
|
2324
2351
|
* The three roles qti-inline-choice-interaction is built from. They are separate roles rather than
|
|
2325
2352
|
* one, because they nest: the menu and the message live in the field's shadow root, so under a
|
|
@@ -2330,12 +2357,14 @@
|
|
|
2330
2357
|
* `menu` the popover the options are listed in.
|
|
2331
2358
|
* `message` the validation box. Its warning colouring is the interaction's, not the role's.
|
|
2332
2359
|
*/
|
|
2360
|
+
|
|
2333
2361
|
/*
|
|
2334
2362
|
* A drag in flight. The other `drag` modifier — applied with `drag`, never instead of it.
|
|
2335
2363
|
*
|
|
2336
2364
|
* `rotate` is paint: a transform never reflows, which is what lets a drag tilt under the cursor
|
|
2337
2365
|
* without the bank shifting behind it.
|
|
2338
2366
|
*/
|
|
2367
|
+
|
|
2339
2368
|
/*
|
|
2340
2369
|
* A drag darkens a little under the pointer. The one hover affordance in the theme.
|
|
2341
2370
|
*
|
|
@@ -2413,6 +2442,7 @@
|
|
|
2413
2442
|
height: calc(var(--qti-control-size) * 0.625);
|
|
2414
2443
|
}
|
|
2415
2444
|
}
|
|
2445
|
+
|
|
2416
2446
|
@layer qti-components.interactions.states {
|
|
2417
2447
|
/* A selected choice, repainted through the button role's slots rather than by re-declaring the
|
|
2418
2448
|
properties — the choice is `@mixin button`, so switching a variable is all a state has to do.
|
|
@@ -2492,6 +2522,7 @@
|
|
|
2492
2522
|
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2493
2523
|
}
|
|
2494
2524
|
}
|
|
2525
|
+
|
|
2495
2526
|
@layer qti-components.interactions.corrections {
|
|
2496
2527
|
:is(:is(qti-choice-interaction qti-simple-choice):is(:state(correct-response), [data-state~='correct-response']),[data-correct-response='true']:is(qti-choice-interaction qti-simple-choice))::after {
|
|
2497
2528
|
content: '\02714';
|
|
@@ -2568,6 +2599,7 @@
|
|
|
2568
2599
|
border-color: var(--qti-answer-border);
|
|
2569
2600
|
}
|
|
2570
2601
|
}
|
|
2602
|
+
|
|
2571
2603
|
@layer qti-components.interactions.base {
|
|
2572
2604
|
qti-graphic-gap-match-interaction.qti-selections-light:is(:state(dragzone-active), [data-state~='dragzone-active'])::part(drags) {
|
|
2573
2605
|
background-color: var(--qti-selections-light-bg);
|
|
@@ -2684,6 +2716,7 @@
|
|
|
2684
2716
|
padding: 0;
|
|
2685
2717
|
}
|
|
2686
2718
|
}
|
|
2719
|
+
|
|
2687
2720
|
@layer qti-components.interactions.states {
|
|
2688
2721
|
qti-graphic-gap-match-interaction qti-gap-img:is(:state(placeholder), [data-state~='placeholder']),
|
|
2689
2722
|
qti-graphic-gap-match-interaction qti-gap-text:is(:state(placeholder), [data-state~='placeholder']) {
|
|
@@ -2735,6 +2768,7 @@
|
|
|
2735
2768
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
2736
2769
|
}
|
|
2737
2770
|
}
|
|
2771
|
+
|
|
2738
2772
|
@layer qti-components.interactions.corrections {
|
|
2739
2773
|
/*
|
|
2740
2774
|
* The one place this interaction joins the shared chip vocabulary: its chips take no card, but they
|
|
@@ -2765,6 +2799,7 @@
|
|
|
2765
2799
|
box-shadow: none;
|
|
2766
2800
|
}
|
|
2767
2801
|
}
|
|
2802
|
+
|
|
2768
2803
|
@layer qti-components.interactions.base {
|
|
2769
2804
|
qti-text-entry-interaction {
|
|
2770
2805
|
background-color: var(--text-background-color, var(--qti-component-background-color));
|
|
@@ -2792,6 +2827,7 @@
|
|
|
2792
2827
|
background-color: transparent;
|
|
2793
2828
|
}
|
|
2794
2829
|
}
|
|
2830
|
+
|
|
2795
2831
|
@layer qti-components.interactions.corrections {
|
|
2796
2832
|
qti-text-entry-interaction:is(:state(candidate-partially-correct), [data-state~='candidate-partially-correct']) {
|
|
2797
2833
|
--text-background-color: var(--qti-partially-correct-light);
|
|
@@ -2833,6 +2869,7 @@
|
|
|
2833
2869
|
-webkit-mask: var(--qti-check-mask) no-repeat center / contain;
|
|
2834
2870
|
}
|
|
2835
2871
|
}
|
|
2872
|
+
|
|
2836
2873
|
@layer qti-components.interactions.base {
|
|
2837
2874
|
/*
|
|
2838
2875
|
* One block, and the ORDER inside it matters.
|
|
@@ -2912,6 +2949,7 @@
|
|
|
2912
2949
|
tab-size: 2;
|
|
2913
2950
|
}
|
|
2914
2951
|
}
|
|
2952
|
+
|
|
2915
2953
|
/*
|
|
2916
2954
|
* Corrections for the one interaction that cannot judge itself.
|
|
2917
2955
|
*
|
|
@@ -3040,6 +3078,7 @@
|
|
|
3040
3078
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
3041
3079
|
}
|
|
3042
3080
|
}
|
|
3081
|
+
|
|
3043
3082
|
@layer qti-components.interactions.base {
|
|
3044
3083
|
/* No qti-selections-light / -dark here. Appendix B.1 of the QTI 3 implementation guide defines
|
|
3045
3084
|
that class pair for qti-hotspot-interaction and qti-graphic-gap-match-interaction only, and no
|
|
@@ -3312,6 +3351,7 @@
|
|
|
3312
3351
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3313
3352
|
}
|
|
3314
3353
|
}
|
|
3354
|
+
|
|
3315
3355
|
@layer qti-components.interactions.states {
|
|
3316
3356
|
/* One chip vocabulary across the bank and placed drags for gap-match only. */
|
|
3317
3357
|
qti-gap::part(drag) {
|
|
@@ -3404,6 +3444,7 @@
|
|
|
3404
3444
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
3405
3445
|
}
|
|
3406
3446
|
}
|
|
3447
|
+
|
|
3407
3448
|
@layer qti-components.interactions.corrections {
|
|
3408
3449
|
/* A corrected chip — in the bank, and where it landed. Moved here from the shared
|
|
3409
3450
|
qti-corrections.css, which claimed `:state(drag)` for EVERY interaction in one unscoped rule:
|
|
@@ -3435,6 +3476,7 @@
|
|
|
3435
3476
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
3436
3477
|
qti-gap-match-interaction.styles.ts. */
|
|
3437
3478
|
}
|
|
3479
|
+
|
|
3438
3480
|
/*
|
|
3439
3481
|
* A hotspot is indicated by a RING, not a fill — matching QTI 3's own figures (Impl-Guide Fig
|
|
3440
3482
|
* 54/55) and its shared-vocab wording ("selection lines and fills", the line being the ring).
|
|
@@ -3506,6 +3548,7 @@
|
|
|
3506
3548
|
outline-offset: 2px;
|
|
3507
3549
|
}
|
|
3508
3550
|
}
|
|
3551
|
+
|
|
3509
3552
|
@layer qti-components.interactions.states {
|
|
3510
3553
|
/*
|
|
3511
3554
|
* Selected: a bold, saturated ring — the Fig-54 weight jump. Same var, so poly and box shapes
|
|
@@ -3561,6 +3604,7 @@
|
|
|
3561
3604
|
pointer-events: none;
|
|
3562
3605
|
}
|
|
3563
3606
|
}
|
|
3607
|
+
|
|
3564
3608
|
@layer qti-components.interactions.corrections {
|
|
3565
3609
|
/*
|
|
3566
3610
|
* Correction and answer-key views recolour the same ring — one var, so circle and poly stay in
|
|
@@ -3604,6 +3648,7 @@
|
|
|
3604
3648
|
-webkit-mask-image: var(--qti-shape-outline-bold);
|
|
3605
3649
|
}
|
|
3606
3650
|
}
|
|
3651
|
+
|
|
3607
3652
|
@layer qti-components.interactions.base {
|
|
3608
3653
|
qti-hottext-interaction {
|
|
3609
3654
|
--qti-hottext-selected-padding: var(--qti-padding-inline);
|
|
@@ -3661,6 +3706,7 @@
|
|
|
3661
3706
|
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3662
3707
|
}
|
|
3663
3708
|
}
|
|
3709
|
+
|
|
3664
3710
|
@layer qti-components.interactions.states {
|
|
3665
3711
|
:is(qti-hottext-interaction.qti-input-control-hidden qti-hottext):is(:state(checked), [data-state~='checked']) {
|
|
3666
3712
|
border-color: var(--qti-border-active);
|
|
@@ -3688,6 +3734,7 @@
|
|
|
3688
3734
|
cursor: not-allowed;
|
|
3689
3735
|
}
|
|
3690
3736
|
}
|
|
3737
|
+
|
|
3691
3738
|
@layer qti-components.interactions.corrections {
|
|
3692
3739
|
:is(:is(qti-hottext-interaction qti-hottext):is(:state(correct-response), [data-state~='correct-response']),[data-correct-response='true']:is(qti-hottext-interaction qti-hottext))::after {
|
|
3693
3740
|
content: '\02714';
|
|
@@ -3753,6 +3800,7 @@
|
|
|
3753
3800
|
height: 1em;
|
|
3754
3801
|
}
|
|
3755
3802
|
}
|
|
3803
|
+
|
|
3756
3804
|
@layer qti-components.interactions.base {
|
|
3757
3805
|
qti-inline-choice-interaction {
|
|
3758
3806
|
/* ── Host: the closed combobox, painted through the paint contract so a brand can restyle the
|
|
@@ -3933,6 +3981,7 @@
|
|
|
3933
3981
|
padding: var(--qti-padding-box);
|
|
3934
3982
|
}
|
|
3935
3983
|
}
|
|
3984
|
+
|
|
3936
3985
|
@layer qti-components.interactions.corrections {
|
|
3937
3986
|
/* The answer key, moved here from the shared qti-corrections.css: it names this interaction, so
|
|
3938
3987
|
this file owns it. */
|
|
@@ -3967,6 +4016,7 @@
|
|
|
3967
4016
|
background: transparent;
|
|
3968
4017
|
}
|
|
3969
4018
|
}
|
|
4019
|
+
|
|
3970
4020
|
/* This interaction's chip vocabulary — the bank chip, the placed chip, and the floating clone. One
|
|
3971
4021
|
such block per drag-drop interaction, opt-in; graphic-gap-match deliberately declares none. See
|
|
3972
4022
|
qti-states.css. Kept in the `global` layer, where these rules used to live, so cascade position is
|
|
@@ -4049,6 +4099,7 @@
|
|
|
4049
4099
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4050
4100
|
}
|
|
4051
4101
|
}
|
|
4102
|
+
|
|
4052
4103
|
@layer qti-components.interactions.base {
|
|
4053
4104
|
/* Editor fake-drag projected into the target choice's `drop` shadow.
|
|
4054
4105
|
Reuses the same `drag` styling so the editor preview matches what students
|
|
@@ -4386,6 +4437,7 @@
|
|
|
4386
4437
|
background: none;
|
|
4387
4438
|
}
|
|
4388
4439
|
}
|
|
4440
|
+
|
|
4389
4441
|
@layer qti-components.interactions.states {
|
|
4390
4442
|
qti-match-interaction:not(.qti-match-tabular)
|
|
4391
4443
|
qti-simple-match-set:first-of-type
|
|
@@ -4454,6 +4506,7 @@
|
|
|
4454
4506
|
color-mix(in srgb, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
4455
4507
|
}
|
|
4456
4508
|
}
|
|
4509
|
+
|
|
4457
4510
|
@layer qti-components.interactions.corrections {
|
|
4458
4511
|
/* A corrected chip — in the bank, and where it landed. Moved here from the shared
|
|
4459
4512
|
qti-corrections.css, which claimed `:state(drag)` for EVERY interaction in one unscoped rule:
|
|
@@ -4484,6 +4537,7 @@
|
|
|
4484
4537
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
4485
4538
|
qti-match-interaction.styles.ts. */
|
|
4486
4539
|
}
|
|
4540
|
+
|
|
4487
4541
|
@layer qti-components.interactions.base {
|
|
4488
4542
|
qti-match-interaction.qti-match-tabular::part(corner) {
|
|
4489
4543
|
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
@@ -4620,6 +4674,7 @@
|
|
|
4620
4674
|
background-color: white;
|
|
4621
4675
|
}
|
|
4622
4676
|
}
|
|
4677
|
+
|
|
4623
4678
|
@layer qti-components.interactions.corrections {
|
|
4624
4679
|
/* Correct / incorrect overlays — border on the outer box, and a matching fill on the inner
|
|
4625
4680
|
indicator when checked. */
|
|
@@ -4649,6 +4704,7 @@
|
|
|
4649
4704
|
background-color: var(--qti-answer-fg);
|
|
4650
4705
|
}
|
|
4651
4706
|
}
|
|
4707
|
+
|
|
4652
4708
|
/* This interaction's chip vocabulary — the bank chip, the placed chip, and the floating clone. One
|
|
4653
4709
|
such block per drag-drop interaction, opt-in; graphic-gap-match deliberately declares none. See
|
|
4654
4710
|
qti-states.css. Kept in the `global` layer, where these rules used to live, so cascade position is
|
|
@@ -4731,6 +4787,7 @@
|
|
|
4731
4787
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4732
4788
|
}
|
|
4733
4789
|
}
|
|
4790
|
+
|
|
4734
4791
|
@layer qti-components.interactions.base {
|
|
4735
4792
|
qti-order-interaction:is(:state(dragzone-active), [data-state~='dragzone-active'])::part(drags) {
|
|
4736
4793
|
background-color: var(--qti-bg-active);
|
|
@@ -5036,6 +5093,7 @@
|
|
|
5036
5093
|
width: auto;
|
|
5037
5094
|
}
|
|
5038
5095
|
}
|
|
5096
|
+
|
|
5039
5097
|
@layer qti-components.interactions.states {
|
|
5040
5098
|
qti-order-interaction qti-simple-choice:is(:state(placeholder), [data-state~='placeholder']) {
|
|
5041
5099
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
@@ -5077,6 +5135,7 @@
|
|
|
5077
5135
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
5078
5136
|
}
|
|
5079
5137
|
}
|
|
5138
|
+
|
|
5080
5139
|
@layer qti-components.interactions.corrections {
|
|
5081
5140
|
/*
|
|
5082
5141
|
* Judgement paint, via the shared mixin — every other drag-drop interaction already uses it.
|
|
@@ -5119,6 +5178,7 @@
|
|
|
5119
5178
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
5120
5179
|
qti-order-interaction.styles.ts. */
|
|
5121
5180
|
}
|
|
5181
|
+
|
|
5122
5182
|
/* This interaction's chip vocabulary — the bank chip, the placed chip, and the floating clone. One
|
|
5123
5183
|
such block per drag-drop interaction, opt-in; graphic-gap-match deliberately declares none. See
|
|
5124
5184
|
qti-states.css. Kept in the `global` layer, where these rules used to live, so cascade position is
|
|
@@ -5206,6 +5266,7 @@
|
|
|
5206
5266
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
5207
5267
|
}
|
|
5208
5268
|
}
|
|
5269
|
+
|
|
5209
5270
|
@layer qti-components.interactions.base {
|
|
5210
5271
|
/*
|
|
5211
5272
|
* NO `--drag-border-color: transparent` here, and that absence is the rule.
|
|
@@ -5408,6 +5469,7 @@
|
|
|
5408
5469
|
background-color: var(--qti-bg-active);
|
|
5409
5470
|
}
|
|
5410
5471
|
}
|
|
5472
|
+
|
|
5411
5473
|
@layer qti-components.interactions.states {
|
|
5412
5474
|
qti-simple-associable-choice::part(drag),
|
|
5413
5475
|
qti-associate-interaction::part(drag) {
|
|
@@ -5511,6 +5573,7 @@
|
|
|
5511
5573
|
color-mix(in srgb, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
5512
5574
|
}
|
|
5513
5575
|
}
|
|
5576
|
+
|
|
5514
5577
|
@layer qti-components.interactions.corrections {
|
|
5515
5578
|
/* A corrected chip — in the bank, and where it landed. Moved here from the shared
|
|
5516
5579
|
qti-corrections.css, which claimed `:state(drag)` for EVERY interaction in one unscoped rule:
|
|
@@ -5539,6 +5602,7 @@
|
|
|
5539
5602
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
5540
5603
|
qti-associate-interaction.styles.ts. */
|
|
5541
5604
|
}
|
|
5605
|
+
|
|
5542
5606
|
@layer qti-components.interactions.base {
|
|
5543
5607
|
qti-graphic-order-interaction {
|
|
5544
5608
|
--qti-graphic-order-pin-size: calc(var(--qti-select-point-marker-size, 1.5rem) * 1.2);
|
|
@@ -5628,6 +5692,7 @@
|
|
|
5628
5692
|
padding-top: calc(var(--qti-select-point-marker-size, 1.5rem) * 0.14);
|
|
5629
5693
|
}
|
|
5630
5694
|
}
|
|
5695
|
+
|
|
5631
5696
|
@layer qti-components.interactions.states {
|
|
5632
5697
|
:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(readonly), [data-state~='readonly']) {
|
|
5633
5698
|
cursor: pointer;
|
|
@@ -5666,6 +5731,7 @@
|
|
|
5666
5731
|
background-color: var(--qti-bg-active);
|
|
5667
5732
|
}
|
|
5668
5733
|
}
|
|
5734
|
+
|
|
5669
5735
|
@layer qti-components.interactions.corrections {
|
|
5670
5736
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']),[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']),[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']) {
|
|
5671
5737
|
background-color: color-mix(in srgb, var(--qti-answer-bg) 75%, transparent);
|
|
@@ -5698,6 +5764,7 @@
|
|
|
5698
5764
|
border-color: transparent !important;
|
|
5699
5765
|
}
|
|
5700
5766
|
}
|
|
5767
|
+
|
|
5701
5768
|
@layer qti-components.interactions.base {
|
|
5702
5769
|
/*
|
|
5703
5770
|
* qti-associable-hotspot does not use ActiveElementMixin, so it carries no
|
|
@@ -5715,6 +5782,7 @@
|
|
|
5715
5782
|
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
5716
5783
|
}
|
|
5717
5784
|
}
|
|
5785
|
+
|
|
5718
5786
|
@layer qti-components.interactions.states {
|
|
5719
5787
|
|
|
5720
5788
|
|
|
@@ -5734,12 +5802,14 @@
|
|
|
5734
5802
|
background-color: var(--qti-bg-active);
|
|
5735
5803
|
}
|
|
5736
5804
|
}
|
|
5805
|
+
|
|
5737
5806
|
@layer qti-components.interactions.base{
|
|
5738
5807
|
qti-slider-interaction {
|
|
5739
5808
|
--qti-tick-color: rgb(229 231 235 / 100%);
|
|
5740
5809
|
--qti-tick-width: 1px;
|
|
5741
5810
|
}
|
|
5742
5811
|
}
|
|
5812
|
+
|
|
5743
5813
|
@layer qti-components.interactions.base {
|
|
5744
5814
|
qti-select-point-interaction {
|
|
5745
5815
|
/*
|
|
@@ -5761,6 +5831,7 @@ qti-slider-interaction {
|
|
|
5761
5831
|
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
5762
5832
|
}
|
|
5763
5833
|
}
|
|
5834
|
+
|
|
5764
5835
|
@layer qti-components.interactions.corrections {
|
|
5765
5836
|
/* Same knob as the resting colour above — these set `color` before, which stopped reaching the
|
|
5766
5837
|
marker once it was no longer painted with `currentColor`. */
|
|
@@ -5772,14 +5843,17 @@ qti-slider-interaction {
|
|
|
5772
5843
|
--qti-select-point-marker-color: var(--qti-incorrect);
|
|
5773
5844
|
}
|
|
5774
5845
|
}
|
|
5846
|
+
|
|
5775
5847
|
@layer qti-components.interactions.base{
|
|
5776
5848
|
qti-position-object-stage qti-position-object-interaction {
|
|
5777
5849
|
/* no styles necessary, only layout styles, defined in the component */
|
|
5778
5850
|
}
|
|
5779
5851
|
}
|
|
5852
|
+
|
|
5780
5853
|
@layer qti-components.interactions.base{
|
|
5781
5854
|
/* `display: block` lives in qti-prompt.styles.ts, which already declares it on :host. */
|
|
5782
5855
|
}
|
|
5856
|
+
|
|
5783
5857
|
@layer qti-components.interactions.corrections{
|
|
5784
5858
|
/*
|
|
5785
5859
|
* What is LEFT here is what the base class owns.
|
|
@@ -5851,6 +5925,7 @@ qti-slider-interaction {
|
|
|
5851
5925
|
-webkit-mask: var(--qti-check-mask) no-repeat center / contain;
|
|
5852
5926
|
}
|
|
5853
5927
|
}
|
|
5928
|
+
|
|
5854
5929
|
@layer qti-components.elements{
|
|
5855
5930
|
/* `display: block` is declared by the element itself, in qti-rubric-block.ts. */
|
|
5856
5931
|
qti-rubric-block {
|
|
@@ -5861,14 +5936,17 @@ qti-rubric-block {
|
|
|
5861
5936
|
margin-top: var(--qti-gap);
|
|
5862
5937
|
}
|
|
5863
5938
|
}
|
|
5939
|
+
|
|
5864
5940
|
@layer qti-components.elements{
|
|
5865
5941
|
qti-feedback-inline::part(feedback) {
|
|
5866
5942
|
}
|
|
5867
5943
|
}
|
|
5944
|
+
|
|
5868
5945
|
@layer qti-components.elements{
|
|
5869
5946
|
qti-feedback-block::part(feedback) {
|
|
5870
5947
|
}
|
|
5871
5948
|
}
|
|
5949
|
+
|
|
5872
5950
|
@layer qti-components.elements{
|
|
5873
5951
|
/*
|
|
5874
5952
|
* Neither selector below matches anything this repo renders — `qti-modal-feedback-custom` is not a
|
|
@@ -5887,6 +5965,7 @@ qti-feedback-block::part(feedback) {
|
|
|
5887
5965
|
margin-top: var(--qti-gap);
|
|
5888
5966
|
}
|
|
5889
5967
|
}
|
|
5968
|
+
|
|
5890
5969
|
@layer qti-components.global{
|
|
5891
5970
|
/*
|
|
5892
5971
|
* Cross-interaction custom states.
|
|
@@ -5941,8 +6020,10 @@ qti-feedback-block::part(feedback) {
|
|
|
5941
6020
|
outline-offset: 0.25rem;
|
|
5942
6021
|
}
|
|
5943
6022
|
}
|
|
6023
|
+
|
|
5944
6024
|
/* Item-shell structure (what is shown, what is hidden). Kept out of styles/qti-theme/ because it is
|
|
5945
6025
|
structure rather than paint — that directory is where the no-layout-in-theme lint rule applies. */
|
|
6026
|
+
|
|
5946
6027
|
@layer qti-components.global{
|
|
5947
6028
|
|
|
5948
6029
|
/**
|
package/dist/item.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { QtiAssessmentItem } from './elements.js';
|
|
|
6
6
|
import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
|
|
7
7
|
import './item.types.d-QU7LljEK.js';
|
|
8
8
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
9
|
-
import './qti-feedback.d-
|
|
9
|
+
import './qti-feedback.d-B1EIF-fU.js';
|
|
10
10
|
import './qti-rule-base.d-ajOnfGXY.js';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/item.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-3NPCS4IT.js";
|
|
2
2
|
import {
|
|
3
3
|
ItemContainer,
|
|
4
4
|
ItemPrintVariables,
|
|
5
5
|
QtiItem
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-3MQNPN7A.js";
|
|
7
|
+
import "./chunk-TLTYXWW7.js";
|
|
8
8
|
import "./chunk-4DB4SC5K.js";
|
|
9
9
|
import "./chunk-HDEG6BAZ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WCWJPIUQ.js";
|
|
11
11
|
export {
|
|
12
12
|
ItemContainer,
|
|
13
13
|
ItemPrintVariables,
|
package/dist/loader.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { QtiAssessmentItem } from './elements.js';
|
|
|
2
2
|
import 'lit';
|
|
3
3
|
import './item.types.d-QU7LljEK.js';
|
|
4
4
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
5
|
-
import './qti-feedback.d-
|
|
5
|
+
import './qti-feedback.d-B1EIF-fU.js';
|
|
6
6
|
import './qti-rule-base.d-ajOnfGXY.js';
|
|
7
7
|
|
|
8
8
|
type ManifestInfo = {
|
package/dist/processing.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement, nothing } from 'lit';
|
|
3
3
|
import { Q as QtiRuleBase } from './qti-rule-base.d-ajOnfGXY.js';
|
|
4
4
|
import { I as ItemContext, B as BaseType, f as ResponseVariable, V as VariableDeclaration } from './item.types.d-QU7LljEK.js';
|
|
5
|
-
import { Q as QtiExpression, a as QtiExpressionBase, T as TestContext } from './qti-expression.d-
|
|
6
|
-
import { Q as QtiConditionExpression } from './qti-condition-expression.d-
|
|
5
|
+
import { Q as QtiExpression, a as QtiExpressionBase, T as TestContext } from './qti-expression.d-B_-m9emA.js';
|
|
6
|
+
import { Q as QtiConditionExpression } from './qti-condition-expression.d-CYwXOUb1.js';
|
|
7
7
|
import './qti.context.d-CejJMlfZ.js';
|
|
8
8
|
|
|
9
9
|
declare class QtiRule extends LitElement implements QtiRuleBase {
|
|
@@ -551,8 +551,34 @@ declare class QtiPatternMatch extends QtiExpression<boolean | null> {
|
|
|
551
551
|
getResult(): boolean | null;
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
+
/**
|
|
555
|
+
* @summary Prints the value of an item variable into the item body.
|
|
556
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#printedVariable
|
|
557
|
+
*
|
|
558
|
+
* A container variable is printed as its values joined by `delimiter`; a record as
|
|
559
|
+
* `name<mapping-indicator>value` pairs joined by the same delimiter. A NULL variable — absent,
|
|
560
|
+
* null, or an empty container — prints nothing at all.
|
|
561
|
+
*
|
|
562
|
+
* @attr {string} identifier - Required. Identifier of the variable to print.
|
|
563
|
+
* @attr {string} [format] - printf-style conversion string, e.g. `%.2f` or `Score: %d`. Applies
|
|
564
|
+
* to each value printed. Takes precedence over `base` and `power-form`.
|
|
565
|
+
* @attr {number} [base=10] - Number base used when printing an integer variable.
|
|
566
|
+
* @attr {number} [index] - 1-based index selecting a single value of an ordered variable.
|
|
567
|
+
* @attr {boolean} [power-form=false] - Print numeric values in exponential form.
|
|
568
|
+
* @attr {string} [field] - Field of a record variable to print, instead of the whole record.
|
|
569
|
+
* @attr {string} [delimiter=;] - Separator between the values of an ordered/multiple/record variable.
|
|
570
|
+
* @attr {string} [mapping-indicator==] - Separator between a record field's name and its value.
|
|
571
|
+
*/
|
|
554
572
|
declare class QtiPrintedVariable extends LitElement {
|
|
573
|
+
#private;
|
|
555
574
|
identifier: string;
|
|
575
|
+
format?: string;
|
|
576
|
+
base: number;
|
|
577
|
+
index?: number;
|
|
578
|
+
powerForm: boolean;
|
|
579
|
+
field?: string;
|
|
580
|
+
delimiter: string;
|
|
581
|
+
mappingIndicator: string;
|
|
556
582
|
protected context?: ItemContext;
|
|
557
583
|
render(): lit.TemplateResult<1> | typeof nothing;
|
|
558
584
|
calculate(): VariableDeclaration<string | string[]>;
|
|
@@ -726,7 +752,7 @@ declare class QtiTruncate extends QtiExpression<number | null> {
|
|
|
726
752
|
}
|
|
727
753
|
|
|
728
754
|
declare class QtiVariable extends QtiExpression<string | string[]> {
|
|
729
|
-
getResult():
|
|
755
|
+
getResult(): string | string[];
|
|
730
756
|
}
|
|
731
757
|
|
|
732
758
|
/**
|
package/dist/processing.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./chunk-KCK27QBP.js";
|
|
1
2
|
import {
|
|
2
3
|
QtiAnd,
|
|
3
4
|
QtiAnyN,
|
|
@@ -71,8 +72,8 @@ import {
|
|
|
71
72
|
QtiVariable,
|
|
72
73
|
qtiAndMixin,
|
|
73
74
|
qtiSubtractMixin
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-3VQSUWCK.js";
|
|
76
|
+
import "./chunk-WCWJPIUQ.js";
|
|
76
77
|
export {
|
|
77
78
|
QtiAnd,
|
|
78
79
|
QtiAnyN,
|