@pie-players/pie-section-player 1.0.0-beta.0 → 1.0.0-beta.2

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 (25) hide show
  1. package/README.md +16 -3
  2. package/dist/browser/assets/{evaluation-worker-0xRDVTJx.js → evaluation-worker-B336Lsun.js} +48398 -46681
  3. package/dist/browser/chunks/calculator-element-271c142f.js +4 -4
  4. package/dist/browser/chunks/dist-41b39e7f.js +1 -1
  5. package/dist/browser/chunks/dist-ca9b9622.js +1 -1
  6. package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
  7. package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
  8. package/dist/browser/chunks/{runtime-YFqnU6ic-d5c0cb49.js → runtime-BCz9m_IT-7b48a036.js} +305 -292
  9. package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
  10. package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +5 -5
  11. package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
  12. package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
  13. package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
  14. package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
  15. package/dist/browser/chunks/tool-periodic-table-43b133b8.js +4 -4
  16. package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
  17. package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
  18. package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
  19. package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +4 -4
  20. package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
  21. package/dist/browser/pie-section-player.js +57 -44
  22. package/dist/components/shared/card-title.d.ts +18 -0
  23. package/dist/contracts/card-title-formatters.d.ts +8 -1
  24. package/dist/pie-section-player.js +10123 -9887
  25. package/package.json +10 -10
package/README.md CHANGED
@@ -269,9 +269,22 @@ const hooks: SectionPlayerHostHooks = {
269
269
 
270
270
  An item context carries `item`, `itemIndex`, `itemCount`, `canonicalItemId` and
271
271
  `defaultTitle`, the localized "Question N" ("Question" for a one-item section);
272
- a passage context carries `passage` and `defaultTitle`. A formatter that returns
273
- anything but a non-empty string, or throws, gets `defaultTitle`. The formatter
274
- stays active across the splitpane's narrow and wide transitions.
272
+ a passage context carries `passage` and `defaultTitle`. The formatter stays
273
+ active across the splitpane's narrow and wide transitions.
274
+
275
+ A non-empty string becomes the title. `{ visible: false }` hides it: the header
276
+ and its toolbar stay, and the heading leaves the layout but stays in the
277
+ document, carrying `defaultTitle` as the card's accessible name and the level
278
+ the card's content nests under. Any other return, or a throw, gets
279
+ `defaultTitle`, so a formatter that lacks the data for a title shows the
280
+ default.
281
+
282
+ ```ts
283
+ const hooks: SectionPlayerHostHooks = {
284
+ cardTitleFormatter: (context) =>
285
+ context.kind === "item" ? { visible: false } : context.defaultTitle,
286
+ };
287
+ ```
275
288
 
276
289
  ### Debug logging
277
290