@classic-homes/slides 0.6.0 → 0.7.0

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.
@@ -4190,6 +4190,40 @@ ${source}${fields}<script>${RUNTIME_JS}</script>
4190
4190
  `;
4191
4191
  return { html, deck, slideCount: sections.length, slideMap, warnings: result.issues, brand };
4192
4192
  }
4193
+ var NO_ASSETS = {
4194
+ image: () => "",
4195
+ qr: () => "",
4196
+ chart: () => "",
4197
+ logo: () => ""
4198
+ };
4199
+ function speakerNotes(input, options = {}) {
4200
+ const result = validateDeck(input, { brands: options.brands });
4201
+ if (!result.ok || !result.deck) throw new DeckError(result.issues);
4202
+ const deck = result.deck;
4203
+ const ctx = {
4204
+ deck,
4205
+ ...NO_ASSETS,
4206
+ brandName: resolveBrand(deck.brand, options.brands).name
4207
+ };
4208
+ const out = [];
4209
+ deck.slides.forEach((slide, i) => {
4210
+ if (slide.hidden && !options.includeHidden) return;
4211
+ const rendered = getLayout(slide.layout).render(slide, ctx);
4212
+ const list = Array.isArray(rendered) ? rendered : [rendered];
4213
+ list.forEach((r, j) => {
4214
+ const notes = (r.notes ?? slide.notes)?.trim();
4215
+ out.push({
4216
+ number: out.length + 1,
4217
+ deckIndex: i,
4218
+ ...slide.id ? { slideId: slide.id } : {},
4219
+ ...list.length > 1 ? { part: { index: j + 1, count: list.length } } : {},
4220
+ ...r.time ?? slide.time ? { time: r.time ?? slide.time } : {},
4221
+ html: notes ? prose(notes) : ""
4222
+ });
4223
+ });
4224
+ });
4225
+ return out;
4226
+ }
4193
4227
  function escapedImageBytes(value) {
4194
4228
  let bytes = 0;
4195
4229
  for (let i = 0; i < value.length; i++) {
@@ -4511,6 +4545,7 @@ export {
4511
4545
  fieldMarkers,
4512
4546
  collectImageSources,
4513
4547
  renderDeck,
4548
+ speakerNotes,
4514
4549
  extractDeckSource,
4515
4550
  parseDeckSource,
4516
4551
  stringifyDeck,
@@ -4518,4 +4553,4 @@ export {
4518
4553
  inlineDeckImages,
4519
4554
  externalizeDeckImages
4520
4555
  };
4521
- //# sourceMappingURL=chunk-KQXT376T.js.map
4556
+ //# sourceMappingURL=chunk-HI5ZCAHO.js.map