@citolab/qti-components 10.0.0-next.13 → 10.0.0-next.15

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 (72) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +522 -435
  3. package/dist/base.d.ts +4 -4
  4. package/dist/base.js +1 -1
  5. package/dist/{chunk-PHRHLDQB.js → chunk-32PI7KWX.js} +2 -2
  6. package/dist/{chunk-MDBNEEPH.js → chunk-5AJZGRWI.js} +8 -3
  7. package/dist/chunk-5AJZGRWI.js.map +1 -0
  8. package/dist/{chunk-LFVPS7KB.js → chunk-DAOLVUTR.js} +2 -2
  9. package/dist/{chunk-K4WLYVDT.js → chunk-F553IZPL.js} +2 -2
  10. package/dist/{chunk-HOGJ5ZNW.js → chunk-G2EIC7H2.js} +221 -107
  11. package/dist/chunk-G2EIC7H2.js.map +1 -0
  12. package/dist/{chunk-EIBGCCXH.js → chunk-HT3LSWXL.js} +2 -2
  13. package/dist/{chunk-WUIA4OOX.js → chunk-IM5AKPIJ.js} +34 -6
  14. package/dist/chunk-IM5AKPIJ.js.map +1 -0
  15. package/dist/{chunk-FLAD6SC6.js → chunk-IWNRQVNW.js} +2 -2
  16. package/dist/{chunk-TLAVOBEM.js → chunk-LORYM4U2.js} +120 -1
  17. package/dist/chunk-LORYM4U2.js.map +1 -0
  18. package/dist/{chunk-Y5DZTCDP.js → chunk-MIQZBDTB.js} +225 -258
  19. package/dist/chunk-MIQZBDTB.js.map +1 -0
  20. package/dist/{chunk-AKX4YMWU.js → chunk-QT7WQXCS.js} +237 -95
  21. package/dist/chunk-QT7WQXCS.js.map +1 -0
  22. package/dist/chunk-RNLSNH4N.js +7 -0
  23. package/dist/chunk-RNLSNH4N.js.map +1 -0
  24. package/dist/{chunk-H3GITIPE.js → chunk-URYYGVTA.js} +23 -7
  25. package/dist/chunk-URYYGVTA.js.map +1 -0
  26. package/dist/{chunk-G6LTYTJR.js → chunk-WIUPAUJV.js} +2 -2
  27. package/dist/{chunk-PYHKCIYN.js → chunk-XY5DHYIH.js} +4 -4
  28. package/dist/{config.context.d-BniMHSBB.d.ts → config.context.d-CCqlJXpE.d.ts} +2 -1
  29. package/dist/corrections.d.ts +8 -8
  30. package/dist/corrections.js +9 -9
  31. package/dist/elements.d.ts +84 -14
  32. package/dist/elements.js +4 -4
  33. package/dist/index.d.ts +9 -9
  34. package/dist/index.js +15 -15
  35. package/dist/interactions.d.ts +17 -5
  36. package/dist/interactions.js +3 -3
  37. package/dist/item.css +132 -18
  38. package/dist/item.d.ts +4 -4
  39. package/dist/item.js +5 -5
  40. package/dist/loader.d.ts +2 -2
  41. package/dist/loader.js +2 -2
  42. package/dist/processing.d.ts +8 -4
  43. package/dist/processing.js +3 -3
  44. package/dist/qti-components-jsx.d.ts +291 -115
  45. package/dist/{qti-feedback.d-DbzPSJuK.d.ts → qti-feedback.d-GAqMqAt6.d.ts} +7 -0
  46. package/dist/{qti-item.d-BqWYBdV2.d.ts → qti-item.d-pFcNk0th.d.ts} +1 -1
  47. package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
  48. package/dist/{qti-test.d-B6AGSQlk.d.ts → qti-test.d-BjhVQnQy.d.ts} +31 -5
  49. package/dist/{qti-text-entry-interaction.d-B44Z3qUG.d.ts → qti-text-entry-interaction.d-DECzpIzi.d.ts} +50 -14
  50. package/dist/{qti-transform-test.d-BL7GGFJj.d.ts → qti-transform-test.d-Bb9vnLzP.d.ts} +1 -0
  51. package/dist/{record.d-C6m0Y4xr.d.ts → record.d-CljDLwRz.d.ts} +1 -1
  52. package/dist/test.d.ts +6 -6
  53. package/dist/test.js +6 -6
  54. package/dist/transformers.d.ts +1 -1
  55. package/dist/transformers.js +1 -1
  56. package/package.json +11 -11
  57. package/dist/chunk-AKX4YMWU.js.map +0 -1
  58. package/dist/chunk-DVLSXMXD.js +0 -7
  59. package/dist/chunk-DVLSXMXD.js.map +0 -1
  60. package/dist/chunk-H3GITIPE.js.map +0 -1
  61. package/dist/chunk-HOGJ5ZNW.js.map +0 -1
  62. package/dist/chunk-MDBNEEPH.js.map +0 -1
  63. package/dist/chunk-TLAVOBEM.js.map +0 -1
  64. package/dist/chunk-WUIA4OOX.js.map +0 -1
  65. package/dist/chunk-Y5DZTCDP.js.map +0 -1
  66. /package/dist/{chunk-PHRHLDQB.js.map → chunk-32PI7KWX.js.map} +0 -0
  67. /package/dist/{chunk-LFVPS7KB.js.map → chunk-DAOLVUTR.js.map} +0 -0
  68. /package/dist/{chunk-K4WLYVDT.js.map → chunk-F553IZPL.js.map} +0 -0
  69. /package/dist/{chunk-EIBGCCXH.js.map → chunk-HT3LSWXL.js.map} +0 -0
  70. /package/dist/{chunk-FLAD6SC6.js.map → chunk-IWNRQVNW.js.map} +0 -0
  71. /package/dist/{chunk-G6LTYTJR.js.map → chunk-WIUPAUJV.js.map} +0 -0
  72. /package/dist/{chunk-PYHKCIYN.js.map → chunk-XY5DHYIH.js.map} +0 -0
@@ -2,19 +2,9 @@ import { b as ItemContext, h as VariableValue, R as ResponseInteraction, g as Re
2
2
  import * as lit from 'lit';
3
3
  import { LitElement, PropertyValues, CSSResultGroup, PropertyValueMap } from 'lit';
4
4
  import { a as RegisteredInteraction } from './interaction.interface.d-CvjHM2bi.js';
5
- import { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-DbzPSJuK.js';
6
- import { b as QtiRuleBase } from './qti-rule-base.d-Bdzg8eGH.js';
5
+ import { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-GAqMqAt6.js';
6
+ import { b as QtiRuleBase } from './qti-rule-base.d-CeKP0Ooi.js';
7
7
 
8
- /**
9
- * @summary The qti-assessment-item element contains all the other QTI 3 item structures.
10
- * @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.dltnnj87l0yj
11
- *
12
- * @dependency qti-feedback
13
- * @dependency qti-responseprocessing
14
- *
15
- * @event qti-item-context-updated - Emitted when through a user action the itemContext is updated,
16
- * typically on interaction with the interactions, or calling response processing.
17
- */
18
8
  declare class QtiAssessmentItem extends LitElement {
19
9
  #private;
20
10
  identifier: string;
@@ -57,6 +47,16 @@ declare class QtiAssessmentItem extends LitElement {
57
47
  render(): lit.TemplateResult<1>;
58
48
  connectedCallback(): void;
59
49
  disconnectedCallback(): void;
50
+ /**
51
+ * Scores the attempt. The item does not score itself: its response processing does, like a
52
+ * backend, and sends the outcomes back in `cito-item-set-outcomes`, which the item applies in one
53
+ * update. The item keeps the attempt count (QTI info model §2.2.2: the delivery engine maintains
54
+ * numAttempts) and hands the new count to the run, whose rules may read it. Without response
55
+ * processing the item only counts the attempt. A run that throws still counts the attempt and applies
56
+ * no outcomes.
57
+ *
58
+ * @returns whether the item has response processing.
59
+ */
60
60
  processResponse(countNumAttempts?: boolean, reportValidityAfterScoring?: boolean): boolean;
61
61
  resetResponses(): void;
62
62
  protected getResponse(identifier: string): Readonly<ResponseVariable>;
@@ -253,6 +253,9 @@ declare global {
253
253
  declare class QtiFeedbackBlock extends QtiFeedback {
254
254
  static styles: lit.CSSResult;
255
255
  render(): lit.TemplateResult<1>;
256
+ /** `cito-feedback-show`: a listener that calls `preventDefault()` keeps this hidden and shows it itself. */
257
+ protected feedbackShowing(): boolean;
258
+ protected feedbackHiding(): boolean;
256
259
  connectedCallback(): void;
257
260
  }
258
261
  declare global {
@@ -264,6 +267,9 @@ declare global {
264
267
  declare class QtiFeedbackInline extends QtiFeedback {
265
268
  static styles: lit.CSSResult;
266
269
  render: () => lit.TemplateResult<1>;
270
+ /** `cito-feedback-show`: a listener that calls `preventDefault()` keeps this hidden and shows it itself. */
271
+ protected feedbackShowing(): boolean;
272
+ protected feedbackHiding(): boolean;
267
273
  connectedCallback(): void;
268
274
  }
269
275
  declare global {
@@ -297,6 +303,9 @@ declare class QtiModalFeedback extends QtiFeedback {
297
303
  render(): lit.TemplateResult<1>;
298
304
  openFeedback(): void;
299
305
  closeFeedback(): void;
306
+ /** `cito-feedback-show`: a listener that calls `preventDefault()` keeps this hidden and shows it itself. */
307
+ protected feedbackShowing(): boolean;
308
+ protected feedbackHiding(): boolean;
300
309
  connectedCallback(): void;
301
310
  protected updated(changedProperties: Map<string | number | symbol, unknown>): void;
302
311
  }
@@ -352,10 +361,26 @@ declare global {
352
361
  }
353
362
  }
354
363
 
364
+ /**
365
+ * Response processing as the item's own backend: it reads the item context, runs its rules once and
366
+ * sends the outcomes and the attempt count back in one `cito-item-set-outcomes`. The item applies
367
+ * them; a host that scores elsewhere sends the same event instead.
368
+ */
355
369
  declare class QtiResponseProcessing extends LitElement {
370
+ #private;
356
371
  static styles: lit.CSSResult[];
372
+ constructor();
357
373
  render(): lit.TemplateResult<1>;
358
- process(): void;
374
+ /**
375
+ * Scores the attempt on the copy: sets `numAttempts` to the count the item hands over, resets a
376
+ * non-adaptive item's outcomes to their defaults (QTI info model §2.5), runs the rules and sends
377
+ * every outcome and `numAttempts` in one `cito-item-set-outcomes`. The item applies them and publishes, which gives this element a
378
+ * fresh copy. A rule that throws ends the run and the error propagates; nothing is sent, and the
379
+ * run's writes stay in the copy until the item's next update.
380
+ */
381
+ processResponse({ numAttempts }: {
382
+ numAttempts: number;
383
+ }): void;
359
384
  firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
360
385
  }
361
386
  declare global {
@@ -467,11 +492,29 @@ declare global {
467
492
  }
468
493
  }
469
494
 
495
+ interface OutcomeEntry {
496
+ identifier: string;
497
+ value: Readonly<string | string[] | null | undefined>;
498
+ }
499
+ /** One outcome an update applied, with its final value. */
470
500
  interface OutcomeChangedDetails {
471
501
  item: string;
472
502
  outcomeIdentifier: string;
473
503
  value: Readonly<string | string[]>;
474
504
  }
505
+ /** The outcomes one update applied, sent after the item context is published. */
506
+ interface OutcomesChangedDetails {
507
+ item: string;
508
+ outcomes: OutcomeEntry[];
509
+ }
510
+ /**
511
+ * Outcomes for the item to apply in one update: the result of its own response processing, or what
512
+ * a backend returned. `responseProcessed` says an attempt ended, as it does after `processResponse`.
513
+ */
514
+ interface SetOutcomesDetails {
515
+ outcomes: OutcomeEntry[];
516
+ responseProcessed?: boolean;
517
+ }
475
518
  type InteractionChangedDetails = ResponseInteraction & {
476
519
  item: string;
477
520
  };
@@ -495,11 +538,38 @@ interface RubricPlacement {
495
538
  className: string;
496
539
  element: Element;
497
540
  }
541
+ /** The detail of `cito-feedback-show` and `cito-feedback-hide`. */
542
+ interface FeedbackEventDetail {
543
+ kind: 'block' | 'inline' | 'modal';
544
+ /** The feedback's `identifier`. */
545
+ identifier: string;
546
+ /** The outcome it follows (`outcome-identifier`). */
547
+ outcomeIdentifier: string;
548
+ /** The feedback element itself: read or clone its content (it stays in the DOM, hidden). */
549
+ element: Element;
550
+ /** The identifier of the item it is in, when it is in one. */
551
+ itemIdentifier?: string;
552
+ }
498
553
  interface PublicItemEventMap {
499
554
  'cito-item-response-changed': CustomEvent<InteractionChangedDetails>;
555
+ /**
556
+ * Request: the item applies these outcomes in one update. Response processing sends it; a host
557
+ * that scores on a backend sends it on the item with the outcomes the backend returned.
558
+ */
559
+ 'cito-item-set-outcomes': CustomEvent<SetOutcomesDetails>;
560
+ /** One per outcome an update applied, with its final value, after the item context is published. */
500
561
  'cito-item-outcome-changed': CustomEvent<OutcomeChangedDetails>;
562
+ /** All the outcomes one update applied, after the item context is published. */
563
+ 'cito-item-outcomes-changed': CustomEvent<OutcomesChangedDetails>;
501
564
  /** Cancelable: `preventDefault()` keeps the rubric block where it is. */
502
565
  'cito-item-rubric-placement': CustomEvent<RubricPlacement>;
566
+ /**
567
+ * Cancelable: the feedback element is about to show (its condition turned true). `preventDefault()`
568
+ * keeps it hidden, so the host can show the content itself. Sent once per showing.
569
+ */
570
+ 'cito-feedback-show': CustomEvent<FeedbackEventDetail>;
571
+ /** The condition of a feedback that was shown (or taken over by the host) turned false again. */
572
+ 'cito-feedback-hide': CustomEvent<FeedbackEventDetail>;
503
573
  }
504
574
  type PublicItemEventName = keyof PublicItemEventMap;
505
575
  declare const PUBLIC_ITEM_EVENTS: Record<PublicItemEventName, PublicEventDeclaration>;
@@ -523,4 +593,4 @@ declare function listenDeclared(target: EventTarget, declarations: Record<string
523
593
  declare function dispatchPublic<K extends PublicItemEventName>(target: EventTarget, name: K, detail: PublicItemEventMap[K] extends CustomEvent<infer D> ? D : never, cancelable?: boolean): boolean;
524
594
  declare function listenPublic<K extends PublicItemEventName>(target: EventTarget, name: K, handler: (e: PublicItemEventMap[K]) => void): void;
525
595
 
526
- export { PUBLIC_ITEM_EVENTS, type PublicEventDeclaration, type PublicItemEventMap, type PublicItemEventName, QtiAssessmentItem, QtiAssessmentStimulus, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiCompanionMaterialsInfo, QtiContentBody, QtiContextDeclaration, QtiCustomOperator, QtiFeedbackBlock, QtiFeedbackInline, QtiItemBody, QtiModalFeedback, QtiOutcomeDeclaration, QtiResponseDeclaration, QtiResponseProcessing, QtiRubricBlock, QtiStylesheet, QtiTemplateConstraint, QtiTemplateDeclaration, QtiTemplateProcessing, type RubricPlacement, dispatchDeclared, dispatchPublic, listenDeclared, listenPublic };
596
+ export { type FeedbackEventDetail, PUBLIC_ITEM_EVENTS, type PublicEventDeclaration, type PublicItemEventMap, type PublicItemEventName, QtiAssessmentItem, QtiAssessmentStimulus, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiCompanionMaterialsInfo, QtiContentBody, QtiContextDeclaration, QtiCustomOperator, QtiFeedbackBlock, QtiFeedbackInline, QtiItemBody, QtiModalFeedback, QtiOutcomeDeclaration, QtiResponseDeclaration, QtiResponseProcessing, QtiRubricBlock, QtiStylesheet, QtiTemplateConstraint, QtiTemplateDeclaration, QtiTemplateProcessing, type RubricPlacement, dispatchDeclared, dispatchPublic, listenDeclared, listenPublic };
package/dist/elements.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-FLAD6SC6.js";
1
+ import "./chunk-IWNRQVNW.js";
2
2
  import {
3
3
  PUBLIC_ITEM_EVENTS,
4
4
  QtiAssessmentItem,
@@ -25,10 +25,10 @@ import {
25
25
  dispatchPublic,
26
26
  listenDeclared,
27
27
  listenPublic
28
- } from "./chunk-AKX4YMWU.js";
28
+ } from "./chunk-QT7WQXCS.js";
29
29
  import "./chunk-4DB4SC5K.js";
30
- import "./chunk-TLAVOBEM.js";
31
- import "./chunk-WUIA4OOX.js";
30
+ import "./chunk-LORYM4U2.js";
31
+ import "./chunk-IM5AKPIJ.js";
32
32
  export {
33
33
  PUBLIC_ITEM_EVENTS,
34
34
  QtiAssessmentItem,
package/dist/index.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestBookmark, q as TestCheckItem, r as TestContainer, s as TestEndAttempt, t as TestItemLink, u as TestItemToSpeech, v as TestNavigation, w as TestNext, x as TestPrev, y as TestPrintContext, z as TestPrintState, A as TestPrintVariables, B as TestScoringButtons, C as TestScoringFeedback, D as TestSectionLink, E as TestStamp, F as TestSubmit, G as TestTtsNext, H as TestTtsPause, J as TestTtsPick, K as TestTtsPlay, L as TestTtsPrev, M as TestTtsResume, N as TestTtsStop, O as TestView, P as TestViewToggle, R as bookmarkedItems } from './qti-test.d-B6AGSQlk.js';
1
+ export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestBookmark, q as TestCheckItem, r as TestContainer, s as TestEndAttempt, t as TestItemLink, u as TestItemToSpeech, v as TestNavigation, w as TestNext, x as TestPrev, y as TestPrintContext, z as TestPrintState, A as TestPrintVariables, B as TestScoringButtons, C as TestScoringFeedback, D as TestSectionLink, E as TestStamp, F as TestSubmit, G as TestTtsNext, H as TestTtsPause, J as TestTtsPick, K as TestTtsPlay, L as TestTtsPrev, M as TestTtsResume, N as TestTtsStop, O as TestView, P as TestViewToggle, R as bookmarkedItems } from './qti-test.d-BjhVQnQy.js';
2
2
  export { IMyQtiTest, IQtiTest, ITestProcessingMixin, QTI_TEST_STATE_VERSION, QtiTestPluginState, QtiTestState, QtiTestStateItem, QtiTestStateSession, QtiTestStateValue, pluginElements, pluginState, ttsElements } from './test.js';
3
- export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-BqWYBdV2.js';
3
+ export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-pFcNk0th.js';
4
4
  export { ItemViewMixin } from './item.js';
5
- export { PUBLIC_ITEM_EVENTS, PublicEventDeclaration, PublicItemEventMap, PublicItemEventName, QtiAssessmentItem, QtiAssessmentStimulus, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiCompanionMaterialsInfo, QtiContentBody, QtiContextDeclaration, QtiCustomOperator, QtiFeedbackBlock, QtiFeedbackInline, QtiItemBody, QtiModalFeedback, QtiOutcomeDeclaration, QtiResponseDeclaration, QtiResponseProcessing, QtiRubricBlock, QtiStylesheet, QtiTemplateConstraint, QtiTemplateDeclaration, QtiTemplateProcessing, RubricPlacement, dispatchDeclared, dispatchPublic, listenDeclared, listenPublic } from './elements.js';
5
+ export { FeedbackEventDetail, PUBLIC_ITEM_EVENTS, PublicEventDeclaration, PublicItemEventMap, PublicItemEventName, QtiAssessmentItem, QtiAssessmentStimulus, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiCompanionMaterialsInfo, QtiContentBody, QtiContextDeclaration, QtiCustomOperator, QtiFeedbackBlock, QtiFeedbackInline, QtiItemBody, QtiModalFeedback, QtiOutcomeDeclaration, QtiResponseDeclaration, QtiResponseProcessing, QtiRubricBlock, QtiStylesheet, QtiTemplateConstraint, QtiTemplateDeclaration, QtiTemplateProcessing, RubricPlacement, dispatchDeclared, dispatchPublic, listenDeclared, listenPublic } from './elements.js';
6
6
  export { QtiCustomInteraction, QtiEndAttemptInteraction, QtiMediaInteraction, QtiPositionObjectInteraction, QtiPositionObjectStage, QtiUploadInteraction, qtiInteractionElements } from './interactions.js';
7
- export { O as Orientation, Q as QtiAssociableHotspot, a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, d as QtiGap, e as QtiGapImg, f as QtiGapMatchInteraction, g as QtiGapText, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, k as QtiHotspotChoice, l as QtiHotspotInteraction, m as QtiHottext, n as QtiHottextInteraction, o as QtiInlineChoice, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, t as QtiPrompt, u as QtiSelectPointInteraction, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice, x as QtiSliderInteraction, y as QtiTextEntryInteraction, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-B44Z3qUG.js';
8
- export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-BL7GGFJj.js';
7
+ export { O as Orientation, Q as QtiAssociableHotspot, a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, d as QtiGap, e as QtiGapImg, f as QtiGapMatchInteraction, g as QtiGapText, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, k as QtiHotspotChoice, l as QtiHotspotInteraction, m as QtiHottext, n as QtiHottextInteraction, o as QtiInlineChoice, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, t as QtiPrompt, u as QtiSelectPointInteraction, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice, x as QtiSliderInteraction, y as QtiTextEntryInteraction, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-DECzpIzi.js';
8
+ export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-Bb9vnLzP.js';
9
9
  export { qtiTransformManifest } from './transformers.js';
10
10
  export { ManifestInfo, getItemByUri, getManifestInfo } from './loader.js';
11
11
  export { CustomOperator, CustomOperatorValue, CustomStateSetShim, CustomStateSupport, IsNullOrUndefined, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, unregisterCustomOperator, validationMessage } from './base.js';
12
12
  export { C as ComputedItemContext, I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-DW09Lrie.js';
13
13
  export { C as ComputedContext, a as ComputedItem } from './computed.types.d-IXACuBr7.js';
14
- export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-BniMHSBB.js';
15
- export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, i as inferRecordFieldBaseType, c as interactionContext, d as isRecordValue, r as readRecordFieldValues } from './record.d-C6m0Y4xr.js';
14
+ export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-CCqlJXpE.js';
15
+ export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, i as inferRecordFieldBaseType, c as interactionContext, d as isRecordValue, r as readRecordFieldValues } from './record.d-CljDLwRz.js';
16
16
  export { B as BaseType, C as Calculate, a as Cardinality, I as InterpolationTableEntry, b as ItemContext, M as Multiple, O as Ordered, c as OutcomeVariable, Q as QtiAreaMapEntry, d as QtiAreaMapping, e as QtiMapEntry, f as QtiMapping, R as ResponseInteraction, g as ResponseVariable, T as TemplateVariable, V as VariableDeclaration, h as VariableValue, i as areaShape, j as directedPair, k as float, l as integer, m as itemContextVariables } from './item.types.d-DuVR0ZVK.js';
17
17
  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';
18
18
  export { I as INITIAL_TEST_CONTEXT, Q as QtiExpression, a as QtiExpressionBase, T as TestContext, t as testContext } from './qti-expression.d-B-Cfbqlb.js';
19
- export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-DbzPSJuK.js';
19
+ export { Q as QtiFeedback, a as QtiVariableDeclaration } from './qti-feedback.d-GAqMqAt6.js';
20
20
  export { Q as QtiConditionExpression } from './qti-condition-expression.d-B-T1NNl0.js';
21
21
  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';
22
22
  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';
23
- export { Q as QtiExitResponseSignal, a as QtiExitTestSignal, b as QtiRuleBase, c as QtiRuleElement } from './qti-rule-base.d-Bdzg8eGH.js';
23
+ export { Q as QtiExitResponseSignal, a as QtiExitTestSignal, b as QtiRuleBase, c as QtiRuleElement } from './qti-rule-base.d-CeKP0Ooi.js';
24
24
  export { QtiAnd, QtiAnyN, QtiBaseValue, QtiContainerSize, QtiContains, QtiCorrect, QtiDefault, QtiDelete, QtiDivide, QtiDurationGte, QtiDurationLt, QtiEqual, QtiEqualRounded, QtiExitResponse, QtiExitTest, QtiFieldValue, QtiGcd, QtiGt, QtiGte, QtiIndex, QtiInside, QtiIntegerDivide, QtiIntegerModulus, QtiIntegerToFloat, QtiIsNull, QtiLcm, QtiLookupOutcomeValue, QtiLt, QtiLte, QtiMapResponse, QtiMapResponsePoint, QtiMatch, QtiMathConstant, QtiMathOperator, QtiMax, QtiMember, QtiMin, QtiMultiple, QtiNot, QtiNull, QtiOr, QtiOrdered, QtiOutcomeCondition, QtiOutcomeElse, QtiOutcomeElseIf, QtiOutcomeIf, QtiPatternMatch, QtiPower, QtiPrintedVariable, QtiProduct, QtiRandom, QtiRandomInteger, QtiRepeat, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiResponseProcessingFragment, QtiRound, QtiRoundTo, QtiSetCorrectResponse, QtiSetCorrectResponseRule, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiSetTemplateValue, QtiSetTemplateValueRule, QtiStatsOperator, QtiStringMatch, QtiSubstring, QtiSubtract, QtiSum, QtiSumExpression, QtiTruncate, QtiVariable, qtiAndMixin, qtiSubtractMixin } from './processing.js';
25
25
  export { CandidateCorrectionMixin, ChoiceCorrectionMixin, CorrectResponseInterface, CorrectResponseMixin, CorrectResponseMode, CorrectionConfig, Correctness, ItemCorrectResponseMode, ItemShowCandidateCorrection, ItemShowCorrectResponse, QtiAssessmentItemCorrection, QtiAssociateInteractionCorrection, QtiChoiceInteractionCorrection, QtiExtendedTextInteractionCorrection, QtiGapMatchInteractionCorrection, QtiGapTextCorrection, QtiGraphicAssociateInteractionCorrection, QtiGraphicGapMatchInteractionCorrection, QtiGraphicOrderInteractionCorrection, QtiHotspotChoiceCorrection, QtiHotspotInteractionCorrection, QtiHottextCorrection, QtiHottextInteractionCorrection, QtiInlineChoiceInteractionCorrection, QtiItemCorrection, QtiMatchInteractionCorrection, QtiOrderInteractionCorrection, QtiPortableCustomInteractionCorrection, QtiSelectPointInteractionCorrection, QtiSimpleAssociableChoiceCorrection, QtiSimpleChoiceCorrection, QtiSliderInteractionCorrection, QtiTestCorrection, QtiTextEntryInteractionCorrection, TestCheckItemCorrection, TestNavigationCorrection, TestShowCorrectResponse, correctionPart } from './corrections.js';
26
26
  import 'lit';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-EIBGCCXH.js";
1
+ import "./chunk-HT3LSWXL.js";
2
2
  import {
3
3
  CandidateCorrectionMixin,
4
4
  ChoiceCorrectionMixin,
@@ -35,7 +35,7 @@ import {
35
35
  TestNavigationCorrection,
36
36
  TestShowCorrectResponse,
37
37
  correctionPart
38
- } from "./chunk-H3GITIPE.js";
38
+ } from "./chunk-URYYGVTA.js";
39
39
  import {
40
40
  QTI_TEST_STATE_VERSION,
41
41
  QtiAssessmentItemRef,
@@ -83,8 +83,8 @@ import {
83
83
  pluginElements,
84
84
  pluginState,
85
85
  ttsElements
86
- } from "./chunk-Y5DZTCDP.js";
87
- import "./chunk-FLAD6SC6.js";
86
+ } from "./chunk-MIQZBDTB.js";
87
+ import "./chunk-IWNRQVNW.js";
88
88
  import {
89
89
  PUBLIC_ITEM_EVENTS,
90
90
  QtiAssessmentItem,
@@ -111,8 +111,8 @@ import {
111
111
  dispatchPublic,
112
112
  listenDeclared,
113
113
  listenPublic
114
- } from "./chunk-AKX4YMWU.js";
115
- import "./chunk-K4WLYVDT.js";
114
+ } from "./chunk-QT7WQXCS.js";
115
+ import "./chunk-F553IZPL.js";
116
116
  import {
117
117
  QtiAssociableHotspot,
118
118
  QtiAssociateInteraction,
@@ -149,26 +149,26 @@ import {
149
149
  inlineScriptText,
150
150
  inlineStyleText,
151
151
  qtiInteractionElements
152
- } from "./chunk-HOGJ5ZNW.js";
153
- import "./chunk-G6LTYTJR.js";
152
+ } from "./chunk-G2EIC7H2.js";
153
+ import "./chunk-WIUPAUJV.js";
154
154
  import {
155
155
  ItemContainer,
156
156
  ItemPrintVariables,
157
157
  ItemViewMixin,
158
158
  QtiItem
159
- } from "./chunk-PYHKCIYN.js";
160
- import "./chunk-DVLSXMXD.js";
159
+ } from "./chunk-XY5DHYIH.js";
160
+ import "./chunk-RNLSNH4N.js";
161
161
  import "./chunk-4DB4SC5K.js";
162
162
  import {
163
163
  getItemByUri,
164
164
  getManifestInfo
165
- } from "./chunk-LFVPS7KB.js";
165
+ } from "./chunk-DAOLVUTR.js";
166
166
  import {
167
167
  qtiTransformItem,
168
168
  qtiTransformManifest,
169
169
  qtiTransformTest
170
- } from "./chunk-TLAVOBEM.js";
171
- import "./chunk-PHRHLDQB.js";
170
+ } from "./chunk-LORYM4U2.js";
171
+ import "./chunk-32PI7KWX.js";
172
172
  import {
173
173
  QtiAnd,
174
174
  QtiAnyN,
@@ -246,7 +246,7 @@ import {
246
246
  QtiVariable,
247
247
  qtiAndMixin,
248
248
  qtiSubtractMixin
249
- } from "./chunk-MDBNEEPH.js";
249
+ } from "./chunk-5AJZGRWI.js";
250
250
  import {
251
251
  CustomStateSetShim,
252
252
  INITIAL_SESSION_CONTEXT,
@@ -294,7 +294,7 @@ import {
294
294
  testContext,
295
295
  unregisterCustomOperator,
296
296
  validationMessage
297
- } from "./chunk-WUIA4OOX.js";
297
+ } from "./chunk-IM5AKPIJ.js";
298
298
  export {
299
299
  CandidateCorrectionMixin,
300
300
  ChoiceCorrectionMixin,
@@ -1,10 +1,10 @@
1
- import { a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, f as QtiGapMatchInteraction, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, l as QtiHotspotInteraction, n as QtiHottextInteraction, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, B as QtiPortableCustomInteractionTest, u as QtiSelectPointInteraction, x as QtiSliderInteraction, y as QtiTextEntryInteraction, Q as QtiAssociableHotspot, d as QtiGap, e as QtiGapImg, g as QtiGapText, k as QtiHotspotChoice, m as QtiHottext, o as QtiInlineChoice, t as QtiPrompt, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice } from './qti-text-entry-interaction.d-B44Z3qUG.js';
2
- export { O as Orientation, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-B44Z3qUG.js';
1
+ import { a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, f as QtiGapMatchInteraction, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, l as QtiHotspotInteraction, n as QtiHottextInteraction, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, B as QtiPortableCustomInteractionTest, u as QtiSelectPointInteraction, x as QtiSliderInteraction, y as QtiTextEntryInteraction, Q as QtiAssociableHotspot, d as QtiGap, e as QtiGapImg, g as QtiGapText, k as QtiHotspotChoice, m as QtiHottext, o as QtiInlineChoice, t as QtiPrompt, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice } from './qti-text-entry-interaction.d-DECzpIzi.js';
2
+ export { O as Orientation, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-DECzpIzi.js';
3
3
  import * as lit from 'lit';
4
4
  import { CSSResultGroup, LitElement, PropertyValueMap } from 'lit';
5
- import { I as Interaction } from './record.d-C6m0Y4xr.js';
5
+ import { I as Interaction } from './record.d-CljDLwRz.js';
6
6
  import './interaction.interface.d-CvjHM2bi.js';
7
- import './config.context.d-BniMHSBB.js';
7
+ import './config.context.d-CCqlJXpE.js';
8
8
  import './item.types.d-DuVR0ZVK.js';
9
9
  import './qti.context.d-CejJMlfZ.js';
10
10
  import 'lit/directives/ref.js';
@@ -94,13 +94,25 @@ declare global {
94
94
  /**
95
95
  * A button that ends the current attempt.
96
96
  *
97
+ * It follows its item: it cannot be pressed while the item is `disabled` or `readonly`, or once an
98
+ * adaptive item is done. An adaptive item that sets `completionStatus` to `completed` closes its
99
+ * session, so no further attempt can start (QTI info model §2.5).
100
+ *
97
101
  * @csspart button - The end-attempt button element.
98
102
  */
99
103
  declare class QtiEndAttemptInteraction extends LitElement {
104
+ #private;
100
105
  static styles: CSSResultGroup;
101
106
  responseIdentifier: string;
102
107
  disabled: boolean;
103
- /** Defines the number of attempts that a user can make using the 'endAttemptInteraction' mechanism (this can be used to limit the number of hints, etc.). [More information](https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#DataCharacteristic_EndAttemptInteraction.Attr_count-attempt) */
108
+ private _itemContext?;
109
+ /**
110
+ * Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
111
+ * uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
112
+ * should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
113
+ * as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
114
+ * [More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction)
115
+ */
104
116
  countAttempt: 'true' | 'false' | null;
105
117
  title: string;
106
118
  render(): lit.TemplateResult<1>;
@@ -1,4 +1,4 @@
1
- import "./chunk-K4WLYVDT.js";
1
+ import "./chunk-F553IZPL.js";
2
2
  import {
3
3
  QtiAssociableHotspot,
4
4
  QtiAssociateInteraction,
@@ -35,9 +35,9 @@ import {
35
35
  inlineScriptText,
36
36
  inlineStyleText,
37
37
  qtiInteractionElements
38
- } from "./chunk-HOGJ5ZNW.js";
38
+ } from "./chunk-G2EIC7H2.js";
39
39
  import "./chunk-4DB4SC5K.js";
40
- import "./chunk-WUIA4OOX.js";
40
+ import "./chunk-IM5AKPIJ.js";
41
41
  export {
42
42
  QtiAssociableHotspot,
43
43
  QtiAssociateInteraction,
package/dist/item.css CHANGED
@@ -2006,11 +2006,11 @@
2006
2006
  without the theme a well got its padding and nothing else. Filled from the theme's own
2007
2007
  tokens: a brand that restyles its borders restyles the well and the bordered box with them.
2008
2008
  A well is a tinted surface inside the theme's border (§1.1.6.2: border plus background, the
2009
- background chosen by the platform); base-200 is the theme's tint for that, and a brand that
2010
- puts its items on a coloured page sets --cito-color-well (Kennisnet: white, like its cards). */
2009
+ background chosen by the platform). The default is a white card, for items on a light-grey
2010
+ page; a brand sets --cito-color-well for another fill. */
2011
2011
  --table-border-color: var(--qti-border-color);
2012
2012
  --foreground: var(--qti-color-base-content);
2013
- --well-bg: var(--cito-color-well, var(--qti-color-base-200)); /* t1 input: --cito-color-well, optional */
2013
+ --well-bg: var(--cito-color-well, var(--qti-color-base-100)); /* t1 input: --cito-color-well, optional */
2014
2014
  --well-border: var(--qti-border);
2015
2015
  --well-box-shadow: none;
2016
2016
 
@@ -2087,8 +2087,8 @@
2087
2087
  --qti-active-mix: 16%; /* a press: the same mix, twice as far */
2088
2088
 
2089
2089
  /* Interaction icon masks. Kept in the QTI namespace so the theme has no FontAwesome runtime
2090
- dependency. One vocabulary, kept together even though --qti-times-mask is read only from
2091
- the corrections layer. */
2090
+ dependency. One vocabulary, kept together. --qti-times-mask is also the inline choice's clear
2091
+ glyph (qti-inline-choice-interaction.styles.ts). */
2092
2092
  --qti-check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E");
2093
2093
  --qti-times-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z'/%3E%3C/svg%3E");
2094
2094
  /* fa-minus. The third verdict glyph, beside the tick and the cross: neither right nor wrong.
@@ -2121,8 +2121,10 @@
2121
2121
  * The focus ring (`@mixin foc`): one outline on `:focus-visible`, for everything. The test
2122
2122
  * controls read the same two tokens, so a page has one ring.
2123
2123
  *
2124
- * Primary, not the answer key's info blue: a ring is the brand's "you are here", and it must not
2125
- * be mistaken for the answer key. 2px, a hairline, so a length in px. It sits that far outside
2124
+ * Not the answer key's info blue: it must not be mistaken for the answer key. The default theme is
2125
+ * black and white, and the ring is its one colour: a mid blue that keeps 3:1 against both
2126
+ * surfaces (WCAG 1.4.11). A brand that sets --cito-color-primary gets its primary as the ring, as
2127
+ * before; --cito-color-focus sets the ring on its own. 2px, a hairline, so a length in px. It sits that far outside
2126
2128
  * the box, or that far inside it for a row in a list that clips (`@mixin foc-inset`).
2127
2129
  *
2128
2130
  * The four --qti-light-* and --qti-dark-* tokens that used to sit here are now
@@ -2130,7 +2132,26 @@
2130
2132
  * and dark theme, which is what the old names suggested and why they were mistaken for dead.
2131
2133
  */
2132
2134
  --qti-focus-border-width: 2px;
2133
- --qti-focus-color: var(--qti-primary);
2135
+ --qti-color-focus: var(
2136
+ --cito-color-focus,
2137
+ var(--cito-color-primary, light-dark(oklch(60% 0.15 250), oklch(72% 0.13 250)))
2138
+ ); /* t1 input: --cito-color-focus, optional; a brand's primary when it sets one */
2139
+ --qti-focus-color: var(--qti-color-focus);
2140
+
2141
+ /*
2142
+ * Rubric and feedback, told apart by shape so it holds in black and white. A rubric block is a
2143
+ * document: light grey, a thick grey bar on its start side. Feedback is a reply: a light-grey bubble
2144
+ * with large rounded corners, no border and a hard darker shadow just below it. Inline feedback is a
2145
+ * pill, padded only at its sides so its line keeps its height.
2146
+ */
2147
+ --qti-callout-bg: var(--qti-color-base-300);
2148
+ --qti-callout-accent-width: calc(var(--qti-border-width) * 4);
2149
+ --qti-rubric-accent-color: color-mix(in oklab, var(--qti-color-base-content) 35%, var(--qti-color-base-100));
2150
+ --qti-feedback-radius: calc(var(--qti-spacing) * 2.5);
2151
+ --qti-feedback-radius-inline: calc(var(--qti-spacing) * 2);
2152
+ --qti-feedback-padding-inline: var(--qti-spacing);
2153
+ --qti-feedback-shadow-color: color-mix(in oklab, var(--qti-color-base-content) 22%, var(--qti-color-base-100));
2154
+ --qti-feedback-shadow: 0 calc(var(--qti-border-width) * 2) 0 var(--qti-feedback-shadow-color);
2134
2155
  --qti-focus-offset: var(--qti-focus-border-width);
2135
2156
  --qti-focus-offset-inset: calc(-1 * var(--qti-focus-border-width));
2136
2157
  --qti-focus-offset-past-border: calc(var(--qti-focus-offset) + var(--qti-border-width));
@@ -4606,6 +4627,16 @@
4606
4627
  * above it. Two spacing tokens for one box is the whole bug — the vocabulary says pick one and
4607
4628
  * spend it whole (see the CONTRACT note on --qti-padding-box / -inline / --qti-gap).
4608
4629
  */
4630
+ /*
4631
+ * The seam is ONE border. The menu anchors to the field's outer bottom edge, so its top border
4632
+ * used to stack under the field's bottom border: two borders read as one thick band. Pulled up by
4633
+ * the field's border width, the menu's top border lies on the field's bottom border instead.
4634
+ *
4635
+ * A negative margin rather than dropping the menu's top border: `position-try-fallbacks:
4636
+ * flip-block` flips margins with the menu, so a menu flipped above the field overlaps the
4637
+ * field's top border the same way and still has a border on its free edge. Not in a :state —
4638
+ * the menu is only painted while open anyway, so this never toggles.
4639
+ */
4609
4640
  qti-inline-choice-interaction::part(menu) {
4610
4641
  background-color: var(--menu-background-color, var(--qti-component-background-color));
4611
4642
  background-image: var(--menu-background-image, var(--qti-component-background-image));
@@ -4619,6 +4650,7 @@
4619
4650
  filter: var(--menu-filter, var(--qti-component-filter));
4620
4651
  border-radius: var(--menu-border-radius, var(--qti-radius-box));
4621
4652
  padding: 0;
4653
+ margin-block-start: calc(-1 * var(--field-border-width, var(--qti-component-border-width)));
4622
4654
  }
4623
4655
 
4624
4656
  /*
@@ -4646,18 +4678,18 @@
4646
4678
  border-end-end-radius: 0;
4647
4679
  }
4648
4680
 
4681
+ /* All four corners square: the top because it joins the field, the bottom by design — the open
4682
+ list is a straight-edged sheet under the field. */
4649
4683
  qti-inline-choice-interaction::part(menu):popover-open {
4650
- border-start-start-radius: 0;
4651
- border-start-end-radius: 0;
4684
+ border-radius: 0;
4652
4685
  }
4653
4686
 
4654
4687
  /* ── Option rows ─────────────────────────────────────────────────────────── */
4655
4688
  qti-inline-choice-interaction::part(option) {
4656
4689
  padding: var(--qti-padding-box);
4657
4690
  border: 0;
4658
- /* Square, because a row now spans the full width of the menu. The menu's own radius still
4659
- rounds the first and last row, since it clips them (overflow: auto). A radius here would
4660
- only show as a notch inside a straight edge. */
4691
+ /* Square, because a row spans the full width of the menu, and the open menu is square too.
4692
+ A radius here would only show as a notch inside a straight edge. */
4661
4693
  border-radius: 0;
4662
4694
  background: transparent;
4663
4695
  cursor: pointer;
@@ -6830,9 +6862,23 @@ qti-slider-interaction:focus::part(knob) {
6830
6862
  */
6831
6863
  --qti-select-point-marker-color: var(--cito-color-marker, var(--qti-primary));
6832
6864
 
6865
+ /*
6866
+ * The picture narrows with its column and never grows past its own size; its height follows
6867
+ * the aspect ratio. The component already sizes it so (::slotted(img) in
6868
+ * qti-select-point-interaction.styles.ts), but reset.css gives every picture inside an
6869
+ * interaction `max-width: none`, a light-DOM rule that outranks ::slotted(), so a 1024px
6870
+ * picture overflowed a narrower column. Restated here for the picture alone (a direct child).
6871
+ * A click is stored in the picture's own pixels and a marker is placed in percentages, so the
6872
+ * answer is the same at any displayed size.
6873
+ */
6874
+ }
6875
+ qti-select-point-interaction > img {
6876
+ max-width: 100%;
6877
+ height: auto;
6878
+ }
6879
+
6833
6880
  /* One selector, not nested under `&::part(point)`: that compiled to `:is(…::part(point))`,
6834
6881
  which no browser accepts, so the ring never matched. */
6835
- }
6836
6882
  qti-select-point-interaction::part(point):focus {
6837
6883
  outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
6838
6884
  outline-offset: var(--qti-focus-offset);
@@ -7141,27 +7187,87 @@ qti-upload-interaction::part(input):disabled::file-selector-button {
7141
7187
  }
7142
7188
 
7143
7189
  @layer qti-components.elements{
7144
- /* `display: block` is declared by the element itself, in qti-rubric-block.ts. */
7190
+ /*
7191
+ * A callout: light grey, a thick grey border on the start side, a little indentation. Information
7192
+ * for the candidate, so the border is grey; feedback has a full-strength one (qti-feedback-block.css).
7193
+ * `display: block` is declared by the element itself, in qti-rubric-block.ts.
7194
+ */
7145
7195
  qti-rubric-block {
7146
- border: var(--qti-border-thickness) solid var(--qti-info);
7147
- background-color: color-mix(in oklab, var(--qti-info) 5%, var(--qti-bg));
7148
- border-radius: var(--qti-radius-box);
7196
+ border-inline-start: var(--qti-callout-accent-width) solid var(--qti-rubric-accent-color);
7197
+ border-start-end-radius: var(--qti-radius-box);
7198
+ border-end-end-radius: var(--qti-radius-box);
7199
+ background-color: var(--qti-callout-bg);
7149
7200
  padding: var(--qti-padding-box);
7150
7201
  margin-top: var(--qti-gap);
7151
7202
  }
7203
+
7204
+ /* The callout's padding is its spacing: no extra margin above the first or below the last paragraph. */
7205
+ qti-rubric-block > :first-child {
7206
+ margin-top: 0;
7207
+ }
7208
+ qti-rubric-block > :last-child {
7209
+ margin-bottom: 0;
7210
+ }
7152
7211
  }
7153
7212
 
7154
7213
  @layer qti-components.elements{
7214
+ /*
7215
+ * The feedback bubble, small enough for a line of text: a light-grey pill with the bubble's hard
7216
+ * shadow. No border and no padding above or below, so the line it is on keeps the height of every
7217
+ * other line (a shadow takes no room either). Painted on the `feedback` part, which exists only while
7218
+ * the feedback shows.
7219
+ */
7155
7220
  qti-feedback-inline::part(feedback) {
7221
+ border-radius: var(--qti-feedback-radius-inline);
7222
+ background-color: var(--qti-callout-bg);
7223
+ box-shadow: var(--qti-feedback-shadow);
7224
+ padding: 0 var(--qti-feedback-padding-inline);
7156
7225
  }
7157
7226
  }
7158
7227
 
7159
7228
  @layer qti-components.elements{
7229
+ /*
7230
+ * A speech bubble: a reply to the candidate's answer. Light grey, no border, large rounded corners and
7231
+ * a hard darker shadow just below it. Painted on the `feedback` part: that box exists only while the
7232
+ * feedback shows, so a hidden feedback draws nothing.
7233
+ */
7160
7234
  qti-feedback-block::part(feedback) {
7235
+ border-radius: var(--qti-feedback-radius);
7236
+ background-color: var(--qti-callout-bg);
7237
+ box-shadow: var(--qti-feedback-shadow);
7238
+ padding: var(--qti-padding-box);
7239
+ margin-top: var(--qti-gap);
7240
+ }
7241
+
7242
+ /* The bubble's padding is its spacing: no extra margin above the first or below the last paragraph. */
7243
+ qti-feedback-block > :first-child {
7244
+ margin-top: 0;
7245
+ }
7246
+ qti-feedback-block > :last-child {
7247
+ margin-bottom: 0;
7161
7248
  }
7162
7249
  }
7163
7250
 
7164
7251
  @layer qti-components.elements{
7252
+ /*
7253
+ * The feedback bubble, the same as qti-feedback-block: light grey, no border, large rounded corners and
7254
+ * a hard darker shadow. Its box stays the dialog's own (qti-modal-feedback.ts); the theme paints it.
7255
+ */
7256
+ qti-modal-feedback::part(feedback) {
7257
+ border: 0;
7258
+ border-radius: var(--qti-feedback-radius);
7259
+ background-color: var(--qti-callout-bg);
7260
+ box-shadow: var(--qti-feedback-shadow);
7261
+ }
7262
+
7263
+ /* The dialog's padding is its spacing: no extra margin above the first or below the last paragraph. */
7264
+ qti-modal-feedback > :first-child {
7265
+ margin-top: 0;
7266
+ }
7267
+ qti-modal-feedback > :last-child {
7268
+ margin-bottom: 0;
7269
+ }
7270
+
7165
7271
  /*
7166
7272
  * Neither selector below matches anything this repo renders — `qti-modal-feedback-custom` is not a
7167
7273
  * registered element and nothing sets `.custom-modal-feedback`. They are kept as a downstream
@@ -7178,6 +7284,14 @@ qti-feedback-block::part(feedback) {
7178
7284
  padding: var(--qti-padding-box);
7179
7285
  margin-top: var(--qti-gap);
7180
7286
  }
7287
+
7288
+ /* The dialog's padding is its spacing, and the icon lines up with the first line: no extra margin above the first or below the last paragraph. */
7289
+ qti-modal-feedback > :first-child {
7290
+ margin-top: 0;
7291
+ }
7292
+ qti-modal-feedback > :last-child {
7293
+ margin-bottom: 0;
7294
+ }
7181
7295
  }
7182
7296
 
7183
7297
  @layer qti-components.elements{