import { V as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-ClQtDdgx.js'; export { 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, S as SpeechState, T as TestCheckItem, q as TestContainer, r as TestEndAttempt, s as TestItemLink, t as TestItemToSpeech, u as TestNavigation, v as TestNext, w as TestPagingButtonsStamp, x as TestPrev, y as TestPrintContext, z as TestPrintVariables, A as TestScoringButtons, B as TestScoringFeedback, C as TestSectionButtonsStamp, D as TestSectionLink, E as TestStamp, F as TestTtsNext, G as TestTtsPause, H as TestTtsPick, J as TestTtsPlay, K as TestTtsPrev, L as TestTtsResume, M as TestTtsStop, N as TestView, O as TestViewToggle, P as TtsContext, R as formatVariableValue, U as ttsContext } from './qti-test.d-ClQtDdgx.js'; import { LitElement } from 'lit'; import { b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-DuVR0ZVK.js'; import { S as SessionContext } from './session.context.d-Cw8GcziG.js'; import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js'; import { T as TestContext } from './qti-expression.d-B-Cfbqlb.js'; import './qti-transform-test.d-BL7GGFJj.js'; import './computed.types.d-SsTm3ieP.js'; import './elements.js'; import './interaction.interface.d-CvjHM2bi.js'; import './qti-feedback.d-DbzPSJuK.js'; import './qti-rule-base.d-Bdzg8eGH.js'; import './qti.context.d-CejJMlfZ.js'; import '@heximal/templates'; interface IQtiTest extends LitElement, ITestNavigationMixin, ITestProcessingMixin, ITestStateMixin, IMyQtiTest { } interface IMyQtiTest { testContext: Readonly; sessionContext: Readonly; configContext: ConfigContext; /** Sets values on one item, keyed by its `qti-assessment-item-ref` identifier. */ updateItemVariables(itemRefID: string, variables: readonly ItemVariableValue[], state?: ItemContext['state']): void; } interface ITestProcessingMixin { updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void; getOutcome(identifier: string): Readonly; getVariable(identifier: string): Readonly>; outcomeProcessing(): boolean; } /** * Everything a host needs to persist to resume a candidate's test session, and nothing else. * * Read it from `qtiTest.state` or the `qti-state-changed` event, store it wherever you like — * a database, `localStorage`, `sessionStorage` — and assign it back to `qtiTest.state` to resume. * * Deliberately not here: * - declaration metadata (`baseType`, `cardinality`, `correctResponse`, `mapping`, …): it comes * from the item XML on every load, and persisting the answer key with the candidate's data is * both bloat and a leak; * - `configContext` and `qtiContext`: inputs the host supplies on every load, not session state. * The shuffle `seed` in particular must be passed in again, or the restored order changes; * - `view`: a role the host decides, not something the candidate produced; * - anything computed — scores per section, `done`, `active` — which is rederived from this. */ interface QtiTestState { /** Bumped on any incompatible change to this shape. A state with another version is ignored. */ version: 1; test: { items: QtiTestStateItem[]; /** Test-level outcome values. Only outcomes the test declares are restored. */ outcomes: QtiTestStateValue[]; }; session: QtiTestStateSession; } interface QtiTestStateItem { /** The `qti-assessment-item-ref` identifier. */ identifier: string; variables: (QtiTestStateValue & { type?: 'response' | 'outcome' | 'template' | 'context'; })[]; /** Opaque per-interaction state keyed by response identifier, e.g. a PCI's `getState()`. */ state?: Record; } interface QtiTestStateValue { identifier: string; value: string | string[] | null; } /** Where the candidate is. */ interface QtiTestStateSession { navPartId?: string | null; navSectionId?: string | null; navItemRefId?: string | null; } declare const QTI_TEST_STATE_VERSION = 1; export { type IMyQtiTest, type IQtiTest, ITestNavigationMixin, type ITestProcessingMixin, ITestStateMixin, QTI_TEST_STATE_VERSION, type QtiTestState, type QtiTestStateItem, type QtiTestStateSession, type QtiTestStateValue };