@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.
- package/README.md +16 -3
- package/dist/browser/assets/{evaluation-worker-0xRDVTJx.js → evaluation-worker-B336Lsun.js} +48398 -46681
- package/dist/browser/chunks/calculator-element-271c142f.js +4 -4
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
- package/dist/browser/chunks/{runtime-YFqnU6ic-d5c0cb49.js → runtime-BCz9m_IT-7b48a036.js} +305 -292
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +5 -5
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +4 -4
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +4 -4
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
- package/dist/browser/pie-section-player.js +57 -44
- package/dist/components/shared/card-title.d.ts +18 -0
- package/dist/contracts/card-title-formatters.d.ts +8 -1
- package/dist/pie-section-player.js +10123 -9887
- 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`.
|
|
273
|
-
|
|
274
|
-
|
|
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
|
|