@pie-players/pie-assessment-player 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -395,8 +395,8 @@ const hooks: AssessmentPlayerHooks = {
395
395
  ```
396
396
 
397
397
  The section player's [Card titles](../section-player/README.md#card-titles)
398
- lists the context fields; a return that is not a non-empty string keeps the
399
- default title.
398
+ lists the context fields. `{ visible: false }` hides a card's title; any other
399
+ return that is not a non-empty string keeps the default title.
400
400
 
401
401
  ## Debug logging
402
402
 
@@ -435,20 +435,11 @@ before the assessment player mounts:
435
435
  import { registerPreloadedElements } from "@pie-players/pie-item-player/preloaded";
436
436
  import * as delivery from "@pie-element/multiple-choice/browser/delivery";
437
437
  import * as controller from "@pie-element/multiple-choice/browser/controller";
438
- import manifest from "../package.json"; // pins "@pie-element/multiple-choice" exactly
439
-
440
- registerPreloadedElements(
441
- [
442
- {
443
- tag: "pie-element-multiple-choice",
444
- package: "@pie-element/multiple-choice",
445
- version: manifest.dependencies["@pie-element/multiple-choice"],
446
- element: delivery,
447
- controller,
448
- },
449
- ],
450
- { math: { assetRoot: "https://assets.example.com/npm" } },
451
- );
438
+
439
+ // The modules name their package and version; the tag defaults from the name.
440
+ registerPreloadedElements([{ element: delivery, controller }], {
441
+ math: { assetRoot: "https://assets.example.com/npm" },
442
+ });
452
443
  ```
453
444
 
454
445
  A tag missing at pre-warm leaves the section's items unmounted and raises a
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AssessmentSection, AssessmentSession, AssessmentSectionSessionState, AssessmentSessionNavigationState, AssessmentSessionRealization, Env, SectionControllerSessionState, TestPart } from '@pie-players/pie-players-shared/types';
2
2
  import { LoaderConfig } from '@pie-players/pie-players-shared/loader-config';
3
- import { SectionPlayerRuntimeConfig } from '@pie-players/pie-section-player';
3
+ import { SectionPlayerCardTitleFormatter, SectionPlayerRuntimeConfig } from '@pie-players/pie-section-player';
4
4
  /**
5
5
  * Re-exported so every existing import site keeps its specifier. These shapes are
6
6
  * canonical in `@pie-players/pie-players-shared/types`.
@@ -41,7 +41,7 @@ export interface AssessmentSessionPersistenceFactoryDefaults {
41
41
  createDefaultPersistence: () => AssessmentSessionPersistenceStrategy | Promise<AssessmentSessionPersistenceStrategy>;
42
42
  }
43
43
  export interface AssessmentPlayerHooks {
44
- cardTitleFormatter?: (context: Record<string, unknown>) => string | null | undefined;
44
+ cardTitleFormatter?: (context: Record<string, unknown>) => ReturnType<SectionPlayerCardTitleFormatter>;
45
45
  createAssessmentDeliveryPlan?: (context: AssessmentDeliveryPlanContext, defaults: AssessmentDeliveryPlanFactoryDefaults) => AssessmentDeliveryPlan | Promise<AssessmentDeliveryPlan>;
46
46
  createAssessmentSessionPersistence?: (context: AssessmentSessionPersistenceContext, defaults: AssessmentSessionPersistenceFactoryDefaults) => AssessmentSessionPersistenceStrategy | Promise<AssessmentSessionPersistenceStrategy>;
47
47
  onBeforeAssessmentHydrate?: (context: AssessmentSessionPersistenceContext) => void | Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-assessment-player",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "Assessment-level coordinator custom elements for orchestrating section-player instances",
6
6
  "license": "MIT",
@@ -40,14 +40,14 @@
40
40
  "lint": "biome lint ."
41
41
  },
42
42
  "dependencies": {
43
- "@pie-players/pie-assessment-toolkit": "1.0.0-beta.1",
44
- "@pie-players/pie-players-shared": "1.0.0-beta.1",
45
- "@pie-players/pie-section-player": "1.0.0-beta.1"
43
+ "@pie-players/pie-assessment-toolkit": "1.0.0-beta.3",
44
+ "@pie-players/pie-players-shared": "1.0.0-beta.3",
45
+ "@pie-players/pie-section-player": "1.0.0-beta.3"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@axe-core/playwright": "^4.13.0",
49
49
  "@happy-dom/global-registrator": "^20.14.5",
50
- "@playwright/test": "^1.63.0",
50
+ "@playwright/test": "^1.64.0",
51
51
  "@biomejs/biome": "^2.5.15",
52
52
  "typescript": "^5.9.3",
53
53
  "vite": "^8.3.3",