@citolab/qti-components 10.0.0-next.24 → 10.0.0-next.25

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 (43) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +182 -182
  3. package/dist/base.d.ts +2 -2
  4. package/dist/{chunk-ZRORBAHB.js → chunk-2GCQCSOR.js} +77 -7
  5. package/dist/chunk-2GCQCSOR.js.map +1 -0
  6. package/dist/{chunk-2NHZOI3W.js → chunk-3DBCO7ZD.js} +8 -6
  7. package/dist/{chunk-2NHZOI3W.js.map → chunk-3DBCO7ZD.js.map} +1 -1
  8. package/dist/{chunk-2A52V5TQ.js → chunk-4BWV6P7P.js} +2 -2
  9. package/dist/{chunk-HUM7ST4L.js → chunk-7ISPUOJG.js} +12 -2
  10. package/dist/chunk-7ISPUOJG.js.map +1 -0
  11. package/dist/{chunk-H6DO5UHC.js → chunk-GGFX2IUD.js} +2 -2
  12. package/dist/{chunk-XWRZP2RM.js → chunk-GMLW5X4H.js} +2 -2
  13. package/dist/{chunk-FP3KXADH.js → chunk-H6EDN5OK.js} +2 -2
  14. package/dist/{chunk-TSJGL6FI.js → chunk-IDHMEWR7.js} +2 -2
  15. package/dist/{chunk-DU6RX3TX.js → chunk-NUQLOK6X.js} +4 -4
  16. package/dist/{chunk-KQ2LED4X.js → chunk-WEJ4JRVR.js} +2 -2
  17. package/dist/{computed.types.d-6qQNFbu1.d.ts → computed.types.d-DcAfzw8v.d.ts} +7 -0
  18. package/dist/corrections.d.ts +3 -3
  19. package/dist/corrections.js +6 -6
  20. package/dist/elements.js +3 -3
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +13 -10
  23. package/dist/item.js +3 -3
  24. package/dist/loader.js +2 -2
  25. package/dist/{qti-test-state-C71K8UNC.d.ts → qti-test-state-D-edVvB3.d.ts} +11 -2
  26. package/dist/{qti-test.d-DADK63uc.d.ts → qti-test.d-BKYGTOLJ.d.ts} +2 -2
  27. package/dist/{qti-transform-test.d-Bb9vnLzP.d.ts → qti-transform-test.d-aWMjo4ZA.d.ts} +1 -0
  28. package/dist/test-plugin-api.d.ts +2 -2
  29. package/dist/test-plugin-api.js +3 -1
  30. package/dist/test.d.ts +6 -6
  31. package/dist/test.js +8 -5
  32. package/dist/transformers.d.ts +1 -1
  33. package/dist/transformers.js +1 -1
  34. package/package.json +4 -4
  35. package/dist/chunk-HUM7ST4L.js.map +0 -1
  36. package/dist/chunk-ZRORBAHB.js.map +0 -1
  37. /package/dist/{chunk-2A52V5TQ.js.map → chunk-4BWV6P7P.js.map} +0 -0
  38. /package/dist/{chunk-H6DO5UHC.js.map → chunk-GGFX2IUD.js.map} +0 -0
  39. /package/dist/{chunk-XWRZP2RM.js.map → chunk-GMLW5X4H.js.map} +0 -0
  40. /package/dist/{chunk-FP3KXADH.js.map → chunk-H6EDN5OK.js.map} +0 -0
  41. /package/dist/{chunk-TSJGL6FI.js.map → chunk-IDHMEWR7.js.map} +0 -0
  42. /package/dist/{chunk-DU6RX3TX.js.map → chunk-NUQLOK6X.js.map} +0 -0
  43. /package/dist/{chunk-KQ2LED4X.js.map → chunk-WEJ4JRVR.js.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4DB4SC5K.js";
7
7
  import {
8
8
  qtiTransformItem
9
- } from "./chunk-ZRORBAHB.js";
9
+ } from "./chunk-2GCQCSOR.js";
10
10
  import {
11
11
  computedItemContext,
12
12
  configContext,
@@ -349,4 +349,4 @@ export {
349
349
  QtiItem,
350
350
  qtiItemElements
351
351
  };
352
- //# sourceMappingURL=chunk-2A52V5TQ.js.map
352
+ //# sourceMappingURL=chunk-4BWV6P7P.js.map
@@ -187,6 +187,15 @@ var buttonPrimary = css`
187
187
  }
188
188
  `;
189
189
 
190
+ // ../qti-test/dist/items-in-order.js
191
+ var itemsInOrder = (testPart) => {
192
+ const items = testPart.sections.flatMap((section) => section.items);
193
+ if (!testPart.itemOrder)
194
+ return items;
195
+ const byIdentifier = new Map(items.map((item) => [item.identifier, item]));
196
+ return testPart.itemOrder.flatMap((identifier) => byIdentifier.get(identifier) ?? []);
197
+ };
198
+
190
199
  export {
191
200
  PUBLIC_EVENTS,
192
201
  dispatchPublic,
@@ -194,6 +203,7 @@ export {
194
203
  control,
195
204
  button,
196
205
  buttonPrimary,
197
- styles_exports
206
+ styles_exports,
207
+ itemsInOrder
198
208
  };
199
- //# sourceMappingURL=chunk-HUM7ST4L.js.map
209
+ //# sourceMappingURL=chunk-7ISPUOJG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../qti-test/src/public-events.ts","../../qti-test/src/components/styles.ts","../../qti-test/src/items-in-order.ts"],"sourcesContent":["import { dispatchDeclared, listenDeclared } from '@qti-components/elements/public-events';\n\nimport type { View } from '@qti-components/base';\nimport type { PublicEventDeclaration } from '@qti-components/elements/public-events';\nimport type { QtiTestState } from './types/qti-test-state';\n\n/**\n * The public events of the test. The name tells you it is public: everything here starts with\n * `qc-`; every other event is internal plumbing and may change in any release.\n *\n * Requests are verbs (a host or plugin dispatches them at the test), notifications are past tense\n * (the test dispatches them). All bubble and are composed.\n *\n * `deprecated` is the `cito-` name this event had in 9.x; an event new in 10.0 has none. One helper\n * (`dispatchPublic`, `listenPublic`) sends or handles both names until the next major, then the field\n * goes. The 7.x names (`qti-request-navigation`, `test-end-attempt`, `on-test-switch-view`, …) are no\n * longer sent or handled.\n */\nexport interface NavigationTarget {\n type: 'item' | 'section';\n id: string;\n}\n\nexport interface NavigationFailure {\n message: string;\n details?: unknown;\n itemId?: string;\n sectionId?: string;\n}\n\n/** The detail of `qc-test-state-refused`. */\nexport interface StateRefusal {\n /** Why the state was not read. */\n message: string;\n /** The value that was assigned to `state`, as given. */\n state: unknown;\n}\n\nexport interface PublicEventMap {\n 'qc-test-navigate': CustomEvent<NavigationTarget>;\n /**\n * Ends an attempt: processes the response of the item-ref `itemId`, or, without it, of the item on\n * screen. `<test-end-attempt>` sends the `itemId` of the item it is stamped into or names.\n */\n 'qc-test-end-attempt': CustomEvent<{ itemId?: string }>;\n /** Scores the test: resets its outcomes to their defaults, runs outcome processing, then `qc-test-submitted`. */\n 'qc-test-submit': CustomEvent<Record<string, never>>;\n 'qc-test-update-outcome': CustomEvent<{\n assessmentItemRefId: string;\n outcomeVariableId: string;\n value: number | string;\n }>;\n 'qc-test-switch-view': CustomEvent<View>;\n /** `value` is JSON; `null` or `undefined` removes the plugin's entry. */\n 'qc-test-update-plugin-state': CustomEvent<{ plugin: string; value: unknown }>;\n /** Outcome processing ran after a submit: read the test outcomes now. */\n 'qc-test-submitted': CustomEvent<Record<string, never>>;\n 'qc-test-navigated': CustomEvent<NavigationTarget>;\n 'qc-test-navigation-started': CustomEvent<NavigationTarget>;\n 'qc-test-navigation-failed': CustomEvent<NavigationFailure>;\n 'qc-test-rendered': CustomEvent<{ identifier: string; element: Element }[]>;\n // `qc-test-loaded` (detail: the `QtiAssessmentTest`) is added by qti-assessment-test.ts, so this\n // module imports no element: that import would be a cycle.\n 'qc-test-state-changed': CustomEvent<QtiTestState>;\n /** A value assigned to `state` could not be read and was ignored: the test goes on without it. */\n 'qc-test-state-refused': CustomEvent<StateRefusal>;\n 'qc-test-items-skipped': CustomEvent<{ ids: string[] }>;\n 'qc-test-end-reached': CustomEvent<Record<string, never>>;\n 'qc-item-ref-connected': CustomEvent<{ identifier: string; href: string; category: string }>;\n}\n\nexport type PublicEventName = keyof PublicEventMap;\n\nexport const PUBLIC_EVENTS: Record<PublicEventName, PublicEventDeclaration> = {\n 'qc-test-navigate': { kind: 'request', scope: 'test', deprecated: 'cito-test-navigate' },\n 'qc-test-end-attempt': { kind: 'request', scope: 'test', deprecated: 'cito-test-end-attempt' },\n 'qc-test-submit': { kind: 'request', scope: 'test', deprecated: 'cito-test-submit' },\n 'qc-test-update-outcome': { kind: 'request', scope: 'test', deprecated: 'cito-test-update-outcome' },\n 'qc-test-update-plugin-state': { kind: 'request', scope: 'test', deprecated: 'cito-test-update-plugin-state' },\n 'qc-test-switch-view': { kind: 'request', scope: 'test', deprecated: 'cito-test-switch-view' },\n 'qc-test-submitted': { kind: 'notification', scope: 'test', deprecated: 'cito-test-submitted' },\n 'qc-test-navigated': { kind: 'notification', scope: 'test', deprecated: 'cito-test-navigated' },\n 'qc-test-navigation-started': { kind: 'notification', scope: 'test', deprecated: 'cito-test-navigation-started' },\n 'qc-test-navigation-failed': { kind: 'notification', scope: 'test', deprecated: 'cito-test-navigation-failed' },\n 'qc-test-rendered': { kind: 'notification', scope: 'test', deprecated: 'cito-test-rendered' },\n 'qc-test-loaded': { kind: 'notification', scope: 'test', deprecated: 'cito-test-loaded' },\n 'qc-test-state-changed': { kind: 'notification', scope: 'test', deprecated: 'cito-test-state-changed' },\n // New in 10.0, so it has no cito- name.\n 'qc-test-state-refused': { kind: 'notification', scope: 'test' },\n 'qc-test-items-skipped': { kind: 'notification', scope: 'test', deprecated: 'cito-test-items-skipped' },\n 'qc-test-end-reached': { kind: 'notification', scope: 'test', deprecated: 'cito-test-end-reached' },\n 'qc-item-ref-connected': { kind: 'notification', scope: 'item', deprecated: 'cito-item-ref-connected' }\n};\n\ndeclare global {\n interface HTMLElementEventMap extends PublicEventMap {}\n}\n\n/**\n * Dispatch a public event, and its deprecated name with the same `detail` object. The detail is\n * always an object so `listenPublic` can tell the two apart from one dispatch.\n */\nexport function dispatchPublic<K extends PublicEventName>(\n target: EventTarget,\n name: K,\n detail: PublicEventMap[K] extends CustomEvent<infer D> ? D : never\n): void {\n dispatchDeclared(target, PUBLIC_EVENTS, name, detail);\n}\n\n/**\n * Listen for a public event and its deprecated name; the handler runs once for a sender that\n * dispatched both. See `listenDeclared`.\n */\nexport function listenPublic<K extends PublicEventName>(\n target: EventTarget,\n name: K,\n handler: (e: PublicEventMap[K]) => void\n): void {\n listenDeclared(target, PUBLIC_EVENTS, name, handler as (e: Event) => void);\n}\n","// /* eslint-disable lit-plugin(no-invalid-css) */\nimport { css, html } from 'lit';\n\n/*\n * The resting look of the test controls (next, prev, item/section links, TTS buttons).\n *\n * Two looks, both plain: a neutral one (the page's surface, the theme's border, the surrounding text\n * colour) and a filled one that `test-next` wears, in the theme's neutral colour with its content\n * colour on top. No shadow, no glow, no transition, so the controls read as unbranded until a host\n * repaints them.\n *\n * Every colour is the theme's tier 1 (CONTRACT.md §8 in qti-theme): `--qc-*` first, the older\n * `--cito-*` name as its fallback for this major, and a CSS system colour behind both for a page\n * that loads no theme: Canvas and CanvasText follow the page's color-scheme, so the controls stay\n * legible in dark mode without the theme too. Hover and press mix the content colour into the\n * fill, by --qti-hover-mix and --qti-active-mix.\n *\n * Paint comes from the `--button-*` slots, the one button slot set the theme's `@mixin paint button`\n * reads too, so a host that repaints its buttons repaints the test controls, the end-attempt and the\n * upload button alike. The older `--test-button-*` names are aliases: each slot is read as\n * `var(--button-X, var(--test-button-X, <default>))`. Never the shared `--qti-component-*` tokens:\n * those also paint the items' own borders, and a change to how a button looks must not move an\n * interaction.\n *\n * --button-size, --button-border-radius the box\n * --button-background-color, --button-color, --button-border-color,\n * --button-hover-background-color, --button-active-background-color\n * the neutral look, and the filled look's slots\n * --button-primary-background-color, --button-primary-color,\n * --button-primary-hover-background-color, --button-primary-active-background-color\n * the filled look only\n * --button-selected-background-color, --button-selected-color\n * a toggle that is on (the host carries :state(selected))\n *\n * --test-button-<same> aliases of the names above\n */\n\nconst surface = css`var(--qti-color-base-100, var(--qc-color-base-100, var(--cito-color-base-100, Canvas)))`;\nconst content = css`var(--qti-color-base-content, var(--qc-color-base-content, var(--cito-color-base-content, CanvasText)))`;\nconst neutral = css`var(--qti-color-neutral, var(--qc-color-neutral, var(--cito-color-neutral, CanvasText)))`;\nconst neutralContent = css`var(--qti-color-neutral-content, var(--qc-color-neutral-content, var(--cito-color-neutral-content, Canvas)))`;\nconst radius = css`var(--button-border-radius, var(--test-button-border-radius, var(--qti-radius-field, var(--qc-radius-field, var(--cito-radius-field, 0.2rem)))))`;\nconst borderWidth = css`var(--qti-border-width, var(--qc-border-width, var(--cito-border-width, 1px)))`;\n\n/*\n * A test control is drawn on an inner element (`.control`, part \"button\"), never on its host.\n *\n * A page's reset, Tailwind's preflight for one (`*, ::before, ::after { margin: 0; padding: 0; border: 0 solid }`),\n * is a rule of the page, and a page rule beats the `:host` rules of a shadow root whatever its layer or its\n * specificity. A control that paints its padding and border on the host loses them to such a reset. The\n * inner element lives in the shadow tree, where the page's `*` does not reach, so the control looks the same with\n * or without a reset. The host keeps only what a reset leaves alone: its display, the radius its focus ring\n * follows, and the cursor.\n */\nexport const hostBox = css`\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n border-radius: ${radius};\n`;\n\n/** The box of the control itself: the inner element. */\nexport const form = css`\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n justify-content: center;\n gap: 0.375em;\n box-sizing: border-box;\n min-block-size: var(--button-size, var(--test-button-size, 2.25rem));\n padding: 0 0.875rem;\n font: inherit;\n line-height: 1.25;\n cursor: pointer;\n user-select: none;\n border-radius: ${radius};\n`;\n\nexport const btn = css`\n ${form};\n background-color: var(--button-background-color, var(--test-button-background-color, ${surface}));\n color: var(--button-color, var(--test-button-color, inherit));\n border: ${borderWidth} solid\n var(\n --button-border-color,\n var(--test-button-border-color, var(--qti-border-color, color-mix(in oklab, ${content} 45%, ${surface})))\n );\n`;\n\n/** The filled look: the neutral colour, its content colour on top. Same box as `btn`, so the two sit level. */\nexport const btnPrimary = css`\n background-color: var(--button-primary-background-color, var(--test-button-primary-background-color, ${neutral}));\n color: var(--button-primary-color, var(--test-button-primary-color, ${neutralContent}));\n border-color: var(--button-primary-background-color, var(--test-button-primary-background-color, ${neutral}));\n`;\n\n/** Hover; paint only, so the box never moves. */\nexport const btnInteractive = css`\n background-color: var(\n --button-hover-background-color,\n var(--test-button-hover-background-color, color-mix(in oklab, ${surface}, ${content} var(--qti-hover-mix, 8%)))\n );\n`;\n\nexport const btnPrimaryInteractive = css`\n background-color: var(\n --button-primary-hover-background-color,\n var(\n --test-button-primary-hover-background-color,\n color-mix(in oklab, ${neutral}, ${neutralContent} var(--qti-hover-mix, 8%))\n )\n );\n`;\n\n/** Pressed: the same mix, twice as far. Paint only, so a click never moves the button. */\nexport const btnActive = css`\n background-color: var(\n --button-active-background-color,\n var(--test-button-active-background-color, color-mix(in oklab, ${surface}, ${content} var(--qti-active-mix, 16%)))\n );\n`;\n\nexport const btnPrimaryActive = css`\n background-color: var(\n --button-primary-active-background-color,\n var(\n --test-button-primary-active-background-color,\n color-mix(in oklab, ${neutral}, ${neutralContent} var(--qti-active-mix, 16%))\n )\n );\n`;\n\n/** The theme's one focus ring (qti-theme `@mixin foc`), so a page shows one kind of ring. */\nexport const focusRing = css`\n outline: var(--qti-focus-border-width, 2px) solid var(--qti-focus-color, Highlight);\n outline-offset: var(--qti-focus-offset, 2px);\n`;\n\nexport const dis = css`\n cursor: not-allowed;\n opacity: 0.45;\n`;\n\nexport const ind = css`\n ${form};\n border: ${borderWidth} solid var(--qti-border-color, GrayText);\n`;\n\n/** What a test control renders: the inner element that carries the look (see `hostBox`). */\nexport const control = html`<span class=\"control\" part=\"button\"><slot></slot></span>`;\n\n/**\n * The stylesheet of a neutral test control: the host box, the look on `.control`, and its hover, press,\n * focus and disabled states. A control with its own content (a bookmark's icon) adds to it.\n */\nexport const button = css`\n :host {\n ${hostBox};\n }\n .control {\n ${btn};\n }\n @media (hover: hover) and (pointer: fine) {\n :host(:hover:not([disabled])) .control {\n ${btnInteractive};\n }\n }\n :host(:active:not([disabled])) .control {\n ${btnActive};\n }\n /* The press the theme gives a choice (qti-motion.css), from the same knob: a touch smaller while\n the button is down, springing back on release; 0 motion means no press. */\n .control {\n transition:\n background-color calc(200ms * var(--qti-motion, 1)) cubic-bezier(0.2, 0, 0, 1),\n scale calc(200ms * var(--qti-motion, 1)) cubic-bezier(0.2, 0, 0, 1);\n }\n :host(:active:not([disabled])) .control {\n scale: calc(1 - 0.03 * var(--qti-motion, 1));\n }\n :host(:focus-visible) {\n ${focusRing};\n }\n :host([disabled]) {\n ${dis};\n }\n :host([disabled]) .control {\n cursor: not-allowed;\n }\n`;\n\n/** The filled look of `test-next`: add after `button`, so its rules win at equal specificity. */\nexport const buttonPrimary = css`\n .control {\n ${btnPrimary};\n }\n @media (hover: hover) and (pointer: fine) {\n :host(:hover:not([disabled])) .control {\n ${btnPrimaryInteractive};\n }\n }\n :host(:active:not([disabled])) .control {\n ${btnPrimaryActive};\n }\n`;\n","import type { ComputedContext, ComputedItem } from '@qti-components/base';\n\n/**\n * The items of a test part in the order the candidate takes them: the test's document order, info\n * items included. Flattening `testPart.sections` is not that order when a section's item-refs and\n * subsections interleave, since `sections` lists every section once, depth first.\n *\n * A part without `itemOrder` (a context built by hand) gives its sections' items as they are listed.\n */\nexport const itemsInOrder = (testPart: ComputedContext['testParts'][number]): ComputedItem[] => {\n const items = testPart.sections.flatMap(section => section.items);\n if (!testPart.itemOrder) return items;\n const byIdentifier = new Map(items.map(item => [item.identifier, item]));\n return testPart.itemOrder.flatMap(identifier => byIdentifier.get(identifier) ?? []);\n};\n"],"mappings":"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","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4DB4SC5K.js";
7
7
  import {
8
8
  qtiTransformItem
9
- } from "./chunk-ZRORBAHB.js";
9
+ } from "./chunk-2GCQCSOR.js";
10
10
  import {
11
11
  QtiExitResponseSignal,
12
12
  QtiFeedback,
@@ -1828,4 +1828,4 @@ export {
1828
1828
  QtiTemplateProcessing,
1829
1829
  qtiContentElements
1830
1830
  };
1831
- //# sourceMappingURL=chunk-H6DO5UHC.js.map
1831
+ //# sourceMappingURL=chunk-GGFX2IUD.js.map
@@ -2,7 +2,7 @@ import {
2
2
  qtiTransformItem,
3
3
  qtiTransformManifest,
4
4
  qtiTransformTest
5
- } from "./chunk-ZRORBAHB.js";
5
+ } from "./chunk-2GCQCSOR.js";
6
6
 
7
7
  // ../qti-loader/dist/qti-loader.js
8
8
  var getManifestInfo = async (manifestURL) => {
@@ -28,4 +28,4 @@ export {
28
28
  getManifestInfo,
29
29
  getItemByUri
30
30
  };
31
- //# sourceMappingURL=chunk-XWRZP2RM.js.map
31
+ //# sourceMappingURL=chunk-GMLW5X4H.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  qtiTestElements
3
- } from "./chunk-2NHZOI3W.js";
3
+ } from "./chunk-3DBCO7ZD.js";
4
4
 
5
5
  // ../qti-test/dist/register.js
6
6
  for (const { tag, ctor } of qtiTestElements) {
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiTestElements) {
8
8
  customElements.define(tag, ctor);
9
9
  }
10
10
  }
11
- //# sourceMappingURL=chunk-FP3KXADH.js.map
11
+ //# sourceMappingURL=chunk-H6EDN5OK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  qtiContentElements
3
- } from "./chunk-H6DO5UHC.js";
3
+ } from "./chunk-GGFX2IUD.js";
4
4
 
5
5
  // ../qti-elements/dist/register.js
6
6
  for (const { tag, ctor } of qtiContentElements) {
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiContentElements) {
8
8
  customElements.define(tag, ctor);
9
9
  }
10
10
  }
11
- //# sourceMappingURL=chunk-TSJGL6FI.js.map
11
+ //# sourceMappingURL=chunk-IDHMEWR7.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  QtiTest,
3
3
  TestNavigation
4
- } from "./chunk-2NHZOI3W.js";
4
+ } from "./chunk-3DBCO7ZD.js";
5
5
  import {
6
6
  QtiAssessmentItem
7
- } from "./chunk-H6DO5UHC.js";
7
+ } from "./chunk-GGFX2IUD.js";
8
8
  import {
9
9
  QtiAssociateInteraction,
10
10
  QtiChoiceInteraction,
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-TZCOXFPB.js";
31
31
  import {
32
32
  QtiItem
33
- } from "./chunk-2A52V5TQ.js";
33
+ } from "./chunk-4BWV6P7P.js";
34
34
  import {
35
35
  watch
36
36
  } from "./chunk-4DB4SC5K.js";
@@ -1686,4 +1686,4 @@ export {
1686
1686
  TestNavigationCorrection,
1687
1687
  QtiTestCorrection
1688
1688
  };
1689
- //# sourceMappingURL=chunk-DU6RX3TX.js.map
1689
+ //# sourceMappingURL=chunk-NUQLOK6X.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  qtiItemElements
3
- } from "./chunk-2A52V5TQ.js";
3
+ } from "./chunk-4BWV6P7P.js";
4
4
 
5
5
  // ../qti-item/dist/register.js
6
6
  for (const { tag, ctor } of qtiItemElements) {
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiItemElements) {
8
8
  customElements.define(tag, ctor);
9
9
  }
10
10
  }
11
- //# sourceMappingURL=chunk-KQ2LED4X.js.map
11
+ //# sourceMappingURL=chunk-WEJ4JRVR.js.map
@@ -50,6 +50,13 @@ type ComputedContext = {
50
50
  navigationMode: 'linear' | 'nonlinear';
51
51
  submissionMode: 'individual' | 'simultaneous';
52
52
  allowSkipping?: boolean;
53
+ /**
54
+ * The item-ref identifiers of the part in the test's document order, info items included: the
55
+ * order a candidate takes them in. `sections` is depth first, so where a section's item-refs and
56
+ * subsections interleave, flattening `sections` gives another order; read the items in order with
57
+ * `itemsInOrder(testPart)` from `@qti-components/test`.
58
+ */
59
+ itemOrder?: string[];
53
60
  /**
54
61
  * Every section of the part once, nested ones included, depth first (a section before its
55
62
  * subsections), each with only its own item-refs, so every item is listed once. Where a
@@ -7,8 +7,8 @@ import { QtiAssessmentItem } from './elements.js';
7
7
  import { Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
8
8
  import './public-events.d-3dGip9pd.js';
9
9
  import { V as View, C as ComputedItemContext } from './session.context.d-9gRdGK4T.js';
10
- import { l as QtiTest, r as TestNavigation } from './qti-test.d-DADK63uc.js';
11
- import { a as ComputedItem, C as ComputedContext } from './computed.types.d-6qQNFbu1.js';
10
+ import { l as QtiTest, r as TestNavigation } from './qti-test.d-BKYGTOLJ.js';
11
+ import { a as ComputedItem, C as ComputedContext } from './computed.types.d-DcAfzw8v.js';
12
12
  import './config.context.d-Dm11aAuw.js';
13
13
  import './interaction.interface.d-CvjHM2bi.js';
14
14
  import './variables.d-DWHlTszN.js';
@@ -17,7 +17,7 @@ import './qti.context.d-CejJMlfZ.js';
17
17
  import 'lit/directives/ref.js';
18
18
  import './qti-feedback.d-CT0W-8Gm.js';
19
19
  import './qti-rule-base.d-CeKP0Ooi.js';
20
- import './qti-transform-test.d-Bb9vnLzP.js';
20
+ import './qti-transform-test.d-aWMjo4ZA.js';
21
21
  import './qti-expression.d-iH3w6mqf.js';
22
22
  import '@heximal/templates';
23
23
  import './qti-test-state.d-D8Q89RzZ.js';
@@ -33,24 +33,24 @@ import {
33
33
  TestNavigationCorrection,
34
34
  TestShowCorrectResponse,
35
35
  correctionPart
36
- } from "./chunk-DU6RX3TX.js";
36
+ } from "./chunk-NUQLOK6X.js";
37
37
  import {
38
38
  qtiTestElements
39
- } from "./chunk-2NHZOI3W.js";
40
- import "./chunk-HUM7ST4L.js";
39
+ } from "./chunk-3DBCO7ZD.js";
40
+ import "./chunk-7ISPUOJG.js";
41
41
  import {
42
42
  qtiContentElements
43
- } from "./chunk-H6DO5UHC.js";
43
+ } from "./chunk-GGFX2IUD.js";
44
44
  import "./chunk-UCXLDQYA.js";
45
45
  import {
46
46
  qtiInteractionElements
47
47
  } from "./chunk-TZCOXFPB.js";
48
48
  import {
49
49
  qtiItemElements
50
- } from "./chunk-2A52V5TQ.js";
50
+ } from "./chunk-4BWV6P7P.js";
51
51
  import "./chunk-WWY2H2YO.js";
52
52
  import "./chunk-4DB4SC5K.js";
53
- import "./chunk-ZRORBAHB.js";
53
+ import "./chunk-2GCQCSOR.js";
54
54
  import {
55
55
  qtiProcessingElements
56
56
  } from "./chunk-LPYZVKHX.js";
package/dist/elements.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-TSJGL6FI.js";
1
+ import "./chunk-IDHMEWR7.js";
2
2
  import {
3
3
  QtiAssessmentItem,
4
4
  QtiAssessmentStimulus,
@@ -20,7 +20,7 @@ import {
20
20
  QtiTemplateConstraint,
21
21
  QtiTemplateDeclaration,
22
22
  QtiTemplateProcessing
23
- } from "./chunk-H6DO5UHC.js";
23
+ } from "./chunk-GGFX2IUD.js";
24
24
  import {
25
25
  PUBLIC_ITEM_EVENTS,
26
26
  dispatchDeclared,
@@ -29,7 +29,7 @@ import {
29
29
  listenPublic
30
30
  } from "./chunk-UCXLDQYA.js";
31
31
  import "./chunk-4DB4SC5K.js";
32
- import "./chunk-ZRORBAHB.js";
32
+ import "./chunk-2GCQCSOR.js";
33
33
  import "./chunk-GPC53O7P.js";
34
34
  import "./chunk-PZ5AY32C.js";
35
35
  export {
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
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 TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-DADK63uc.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 TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-BKYGTOLJ.js';
2
2
  export { IMyQtiTest, IQtiTest, ITestProcessingMixin, StoredSessionContext, StoredTestContext, StoredVariable, pluginElements, stateFromContexts } from './test.js';
3
- export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-C71K8UNC.js';
3
+ export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-D-edVvB3.js';
4
4
  export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
5
5
  export { ItemViewMixin } from './item.js';
6
6
  export { F as FeedbackEventDetail, P as PUBLIC_ITEM_EVENTS, a as PublicEventDeclaration, b as PublicItemEventMap, c as PublicItemEventName, R as RubricPlacement, d as dispatchDeclared, e as dispatchPublic, l as listenDeclared, f as listenPublic } from './public-events.d-3dGip9pd.js';
7
7
  export { QtiAssessmentItem, QtiAssessmentStimulus, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiCompanionMaterialsInfo, QtiContentBody, QtiContextDeclaration, QtiCustomOperator, QtiFeedbackBlock, QtiFeedbackInline, QtiItemBody, QtiModalFeedback, QtiOutcomeDeclaration, QtiResponseDeclaration, QtiResponseProcessing, QtiRubricBlock, QtiStylesheet, QtiTemplateConstraint, QtiTemplateDeclaration, QtiTemplateProcessing } from './elements.js';
8
8
  export { QtiCustomInteraction, QtiEndAttemptInteraction, QtiMediaInteraction, QtiPositionObjectInteraction, QtiPositionObjectStage, QtiUploadInteraction, qtiInteractionElements } from './interactions.js';
9
9
  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-m0EFv9no.js';
10
- export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-Bb9vnLzP.js';
10
+ export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-aWMjo4ZA.js';
11
11
  export { qtiTransformManifest } from './transformers.js';
12
12
  export { ManifestInfo, getItemByUri, getManifestInfo } from './loader.js';
13
13
  export { CustomOperator, CustomOperatorValue, CustomStateSetShim, CustomStateSupport, IsNullOrUndefined, STATE_ALIASES, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, hasState, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, setState, unregisterCustomOperator, validationMessage } from './base.js';
14
14
  export { C as ComputedItemContext, I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-9gRdGK4T.js';
15
- export { C as ComputedContext, a as ComputedItem, S as SessionControl } from './computed.types.d-6qQNFbu1.js';
15
+ export { C as ComputedContext, a as ComputedItem, S as SessionControl } from './computed.types.d-DcAfzw8v.js';
16
16
  export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-Dm11aAuw.js';
17
17
  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-N1Bq7e1f.js';
18
18
  export { I as ItemContext, i as itemContextVariables } from './item.types.d-Zc6ZQDhu.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-FP3KXADH.js";
1
+ import "./chunk-H6EDN5OK.js";
2
2
  import {
3
3
  pluginState
4
4
  } from "./chunk-DJ7PB252.js";
@@ -37,7 +37,7 @@ import {
37
37
  TestNavigationCorrection,
38
38
  TestShowCorrectResponse,
39
39
  correctionPart
40
- } from "./chunk-DU6RX3TX.js";
40
+ } from "./chunk-NUQLOK6X.js";
41
41
  import {
42
42
  QTI_TEST_STATE_VERSION,
43
43
  QtiAssessmentItemRef,
@@ -63,9 +63,11 @@ import {
63
63
  TestSubmit,
64
64
  pluginElements,
65
65
  stateFromContexts
66
- } from "./chunk-2NHZOI3W.js";
67
- import "./chunk-HUM7ST4L.js";
68
- import "./chunk-TSJGL6FI.js";
66
+ } from "./chunk-3DBCO7ZD.js";
67
+ import {
68
+ itemsInOrder
69
+ } from "./chunk-7ISPUOJG.js";
70
+ import "./chunk-IDHMEWR7.js";
69
71
  import {
70
72
  QtiAssessmentItem,
71
73
  QtiAssessmentStimulus,
@@ -87,7 +89,7 @@ import {
87
89
  QtiTemplateConstraint,
88
90
  QtiTemplateDeclaration,
89
91
  QtiTemplateProcessing
90
- } from "./chunk-H6DO5UHC.js";
92
+ } from "./chunk-GGFX2IUD.js";
91
93
  import {
92
94
  PUBLIC_ITEM_EVENTS,
93
95
  dispatchDeclared,
@@ -133,24 +135,24 @@ import {
133
135
  inlineStyleText,
134
136
  qtiInteractionElements
135
137
  } from "./chunk-TZCOXFPB.js";
136
- import "./chunk-KQ2LED4X.js";
138
+ import "./chunk-WEJ4JRVR.js";
137
139
  import {
138
140
  ItemContainer,
139
141
  ItemPrintVariables,
140
142
  ItemViewMixin,
141
143
  QtiItem
142
- } from "./chunk-2A52V5TQ.js";
144
+ } from "./chunk-4BWV6P7P.js";
143
145
  import "./chunk-WWY2H2YO.js";
144
146
  import "./chunk-4DB4SC5K.js";
145
147
  import {
146
148
  getItemByUri,
147
149
  getManifestInfo
148
- } from "./chunk-XWRZP2RM.js";
150
+ } from "./chunk-GMLW5X4H.js";
149
151
  import {
150
152
  qtiTransformItem,
151
153
  qtiTransformManifest,
152
154
  qtiTransformTest
153
- } from "./chunk-ZRORBAHB.js";
155
+ } from "./chunk-2GCQCSOR.js";
154
156
  import "./chunk-5BP2A7BI.js";
155
157
  import {
156
158
  QtiAnd,
@@ -508,6 +510,7 @@ export {
508
510
  isSeed,
509
511
  itemContext,
510
512
  itemContextVariables,
513
+ itemsInOrder,
511
514
  iterResponseValues,
512
515
  listenDeclared,
513
516
  listenPublic,
package/dist/item.js CHANGED
@@ -1,13 +1,13 @@
1
- import "./chunk-KQ2LED4X.js";
1
+ import "./chunk-WEJ4JRVR.js";
2
2
  import {
3
3
  ItemContainer,
4
4
  ItemPrintVariables,
5
5
  ItemViewMixin,
6
6
  QtiItem
7
- } from "./chunk-2A52V5TQ.js";
7
+ } from "./chunk-4BWV6P7P.js";
8
8
  import "./chunk-WWY2H2YO.js";
9
9
  import "./chunk-4DB4SC5K.js";
10
- import "./chunk-ZRORBAHB.js";
10
+ import "./chunk-2GCQCSOR.js";
11
11
  import "./chunk-GPC53O7P.js";
12
12
  import "./chunk-PZ5AY32C.js";
13
13
  export {
package/dist/loader.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getItemByUri,
3
3
  getManifestInfo
4
- } from "./chunk-XWRZP2RM.js";
5
- import "./chunk-ZRORBAHB.js";
4
+ } from "./chunk-GMLW5X4H.js";
5
+ import "./chunk-2GCQCSOR.js";
6
6
  import "./chunk-PZ5AY32C.js";
7
7
  export {
8
8
  getItemByUri,
@@ -1,4 +1,4 @@
1
- import { C as ComputedContext } from './computed.types.d-6qQNFbu1.js';
1
+ import { C as ComputedContext, a as ComputedItem } from './computed.types.d-DcAfzw8v.js';
2
2
  import { a as QtiTestPluginState$1 } from './qti-test-state.d-D8Q89RzZ.js';
3
3
 
4
4
  /**
@@ -8,6 +8,15 @@ import { a as QtiTestPluginState$1 } from './qti-test-state.d-D8Q89RzZ.js';
8
8
  */
9
9
  declare const pluginState: <K extends keyof QtiTestPluginState$1 & string>(context: Pick<ComputedContext, "plugins"> | undefined, plugin: K) => QtiTestPluginState$1[K] | undefined;
10
10
 
11
+ /**
12
+ * The items of a test part in the order the candidate takes them: the test's document order, info
13
+ * items included. Flattening `testPart.sections` is not that order when a section's item-refs and
14
+ * subsections interleave, since `sections` lists every section once, depth first.
15
+ *
16
+ * A part without `itemOrder` (a context built by hand) gives its sections' items as they are listed.
17
+ */
18
+ declare const itemsInOrder: (testPart: ComputedContext["testParts"][number]) => ComputedItem[];
19
+
11
20
  /**
12
21
  * Everything a host needs to persist to resume a candidate's test session, and nothing else.
13
22
  *
@@ -65,4 +74,4 @@ interface QtiTestStateSession {
65
74
  }
66
75
  declare const QTI_TEST_STATE_VERSION = 1;
67
76
 
68
- export { QTI_TEST_STATE_VERSION as Q, type QtiTestPluginState as a, type QtiTestState as b, type QtiTestStateItem as c, type QtiTestStateSession as d, type QtiTestStateValue as e, pluginState as p };
77
+ export { QTI_TEST_STATE_VERSION as Q, type QtiTestPluginState as a, type QtiTestState as b, type QtiTestStateItem as c, type QtiTestStateSession as d, type QtiTestStateValue as e, itemsInOrder as i, pluginState as p };
@@ -1,7 +1,7 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
- import { b as transformTestApi, t as transformItemApi } from './qti-transform-test.d-Bb9vnLzP.js';
4
- import { C as ComputedContext, a as ComputedItem } from './computed.types.d-6qQNFbu1.js';
3
+ import { b as transformTestApi, t as transformItemApi } from './qti-transform-test.d-aWMjo4ZA.js';
4
+ import { C as ComputedContext, a as ComputedItem } from './computed.types.d-DcAfzw8v.js';
5
5
  import './public-events.d-3dGip9pd.js';
6
6
  import { QtiAssessmentItem, QtiModalFeedback } from './elements.js';
7
7
  import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
@@ -46,6 +46,7 @@ declare const qtiTransformItem: () => transformItemApi;
46
46
  * const xml = qtiTransformer.xml();
47
47
  */
48
48
  type transformTestApi = {
49
+ /** Fetches the test, includes every `qti-assessment-section-ref`'s section, and makes URLs absolute. */
49
50
  load: (uri: string, signal?: AbortSignal) => Promise<transformTestApi>;
50
51
  parse: (xmlString: string) => transformTestApi;
51
52
  path: (location: string) => transformTestApi;
@@ -1,10 +1,10 @@
1
1
  import { V as View } from './session.context.d-9gRdGK4T.js';
2
2
  import { a as PublicEventDeclaration } from './public-events.d-3dGip9pd.js';
3
3
  import { Q as QtiTestState } from './qti-test-state.d-D8Q89RzZ.js';
4
- export { a as QtiTestPluginState, b as QtiTestState, p as pluginState } from './qti-test-state-C71K8UNC.js';
4
+ export { a as QtiTestPluginState, b as QtiTestState, i as itemsInOrder, p as pluginState } from './qti-test-state-D-edVvB3.js';
5
5
  import * as lit from 'lit';
6
6
  import './variables.d-DWHlTszN.js';
7
- import './computed.types.d-6qQNFbu1.js';
7
+ import './computed.types.d-DcAfzw8v.js';
8
8
 
9
9
  /**
10
10
  * The public events of the test. The name tells you it is public: everything here starts with
@@ -4,15 +4,17 @@ import {
4
4
  import {
5
5
  PUBLIC_EVENTS,
6
6
  dispatchPublic,
7
+ itemsInOrder,
7
8
  listenPublic,
8
9
  styles_exports
9
- } from "./chunk-HUM7ST4L.js";
10
+ } from "./chunk-7ISPUOJG.js";
10
11
  import "./chunk-UCXLDQYA.js";
11
12
  import "./chunk-PZ5AY32C.js";
12
13
  export {
13
14
  PUBLIC_EVENTS,
14
15
  styles_exports as controlStyles,
15
16
  dispatchPublic,
17
+ itemsInOrder,
16
18
  listenPublic,
17
19
  pluginState
18
20
  };
package/dist/test.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-DADK63uc.js';
2
- 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, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-DADK63uc.js';
3
- import { b as QtiTestState } from './qti-test-state-C71K8UNC.js';
4
- export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-C71K8UNC.js';
1
+ import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-BKYGTOLJ.js';
2
+ 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, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-BKYGTOLJ.js';
3
+ import { b as QtiTestState } from './qti-test-state-D-edVvB3.js';
4
+ export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-D-edVvB3.js';
5
5
  import { LitElement } from 'lit';
6
6
  import { b as OutcomeVariable, V as VariableDeclaration } from './variables.d-DWHlTszN.js';
7
7
  import { S as SessionContext } from './session.context.d-9gRdGK4T.js';
8
8
  import { C as ConfigContext } from './config.context.d-Dm11aAuw.js';
9
9
  import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
10
10
  import { T as TestContext } from './qti-expression.d-iH3w6mqf.js';
11
- import './qti-transform-test.d-Bb9vnLzP.js';
12
- import './computed.types.d-6qQNFbu1.js';
11
+ import './qti-transform-test.d-aWMjo4ZA.js';
12
+ import './computed.types.d-DcAfzw8v.js';
13
13
  import './public-events.d-3dGip9pd.js';
14
14
  import './elements.js';
15
15
  import './interaction.interface.d-CvjHM2bi.js';
package/dist/test.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-FP3KXADH.js";
1
+ import "./chunk-H6EDN5OK.js";
2
2
  import {
3
3
  pluginState
4
4
  } from "./chunk-DJ7PB252.js";
@@ -27,13 +27,15 @@ import {
27
27
  TestSubmit,
28
28
  pluginElements,
29
29
  stateFromContexts
30
- } from "./chunk-2NHZOI3W.js";
31
- import "./chunk-HUM7ST4L.js";
32
- import "./chunk-H6DO5UHC.js";
30
+ } from "./chunk-3DBCO7ZD.js";
31
+ import {
32
+ itemsInOrder
33
+ } from "./chunk-7ISPUOJG.js";
34
+ import "./chunk-GGFX2IUD.js";
33
35
  import "./chunk-UCXLDQYA.js";
34
36
  import "./chunk-WWY2H2YO.js";
35
37
  import "./chunk-4DB4SC5K.js";
36
- import "./chunk-ZRORBAHB.js";
38
+ import "./chunk-2GCQCSOR.js";
37
39
  import "./chunk-GPC53O7P.js";
38
40
  import "./chunk-PZ5AY32C.js";
39
41
  export {
@@ -59,6 +61,7 @@ export {
59
61
  TestNext,
60
62
  TestPrev,
61
63
  TestSubmit,
64
+ itemsInOrder,
62
65
  pluginElements,
63
66
  pluginState,
64
67
  stateFromContexts
@@ -1,4 +1,4 @@
1
- export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-Bb9vnLzP.js';
1
+ export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-aWMjo4ZA.js';
2
2
 
3
3
  declare const qtiTransformManifest: () => {
4
4
  load: (uri: string, signal?: AbortSignal) => Promise<{
@@ -2,7 +2,7 @@ import {
2
2
  qtiTransformItem,
3
3
  qtiTransformManifest,
4
4
  qtiTransformTest
5
- } from "./chunk-ZRORBAHB.js";
5
+ } from "./chunk-2GCQCSOR.js";
6
6
  import "./chunk-PZ5AY32C.js";
7
7
  export {
8
8
  qtiTransformItem,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@citolab/qti-components",
3
3
  "description": "QTI component utilities",
4
- "version": "10.0.0-next.24",
4
+ "version": "10.0.0-next.25",
5
5
  "author": "",
6
6
  "dependencies": {
7
7
  "@heximal/templates": "^0.1.5",
@@ -10,7 +10,7 @@
10
10
  "lit-html": "^3.3.1"
11
11
  },
12
12
  "devDependencies": {
13
- "@qti-components/base": "^3.0.0-next.9",
13
+ "@qti-components/base": "^3.0.0-next.10",
14
14
  "@qti-components/corrections": "^1.0.0-next.11",
15
15
  "@qti-components/delivery": "^0.1.0-next.2",
16
16
  "@qti-components/elements": "^2.0.0-next.7",
@@ -18,9 +18,9 @@
18
18
  "@qti-components/item": "^1.5.1-next.7",
19
19
  "@qti-components/loader": "^1.3.4-next.2",
20
20
  "@qti-components/processing": "^1.6.1-next.5",
21
- "@qti-components/test": "^2.0.0-next.20",
21
+ "@qti-components/test": "^2.0.0-next.21",
22
22
  "@qti-components/theme": "^3.0.0-next.6",
23
- "@qti-components/transformers": "^1.8.0-next.1"
23
+ "@qti-components/transformers": "^1.8.0-next.2"
24
24
  },
25
25
  "exports": {
26
26
  ".": {