@bendyline/squisq 2.13.9 → 2.13.11

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.
@@ -1,4 +1,4 @@
1
- import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack } from '../Doc-BCrrYAuK.js';
1
+ import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack } from '../Doc-DqYt_b2b.js';
2
2
  import '../types-Zk8qYuaT.js';
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { R as Doc, s as ColorScheme, k as Block, bt as TemplateBlock } from '../Doc-BCrrYAuK.js';
2
- import { i as PageTransformHints } from '../materializePageSection-FT1B5NOo.js';
1
+ import { R as Doc, s as ColorScheme, k as Block, bu as TemplateBlock } from '../Doc-DqYt_b2b.js';
2
+ import { i as PageTransformHints } from '../materializePageSection-S2hxZ_lO.js';
3
3
  import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
4
4
  import { f as BuildSpec, M as MarkdownBlockNode } from '../types-Zk8qYuaT.js';
5
5
 
@@ -321,23 +321,50 @@ declare function extractDocImages(blocks: Block[]): TransformImage[];
321
321
  */
322
322
  declare function analyzeBlocks(blocks: Block[], options?: ExtractionOptions): AnalyzedBlock[];
323
323
 
324
+ /** A prominent number found inside a short stat-like string. */
325
+ interface NumberHighlightMatch {
326
+ value: string;
327
+ index: number;
328
+ end: number;
329
+ }
330
+
324
331
  /** A bounded presentation is a visual overlay on the canonical spoken script.
325
332
  * It lives in frontmatter so undo, copy, DBK, and ordinary Markdown saves carry
326
333
  * it atomically. Layout choices never replace the source prose or store seconds.
327
334
  */
335
+
328
336
  declare const PRESENTATION_KEY = "squisq-presentation";
329
- declare const PRESENTATION_LAYOUTS: readonly ["title", "statement", "list", "comparison", "steps", "image"];
337
+ /** The layouts a summary (a headline and up to four points) can fill. */
338
+ declare const PRESENTATION_LAYOUTS: readonly ["title", "divider", "statement", "emphasis", "quote", "stat", "definition", "list", "comparison", "steps", "image"];
330
339
  type PresentationLayout = (typeof PRESENTATION_LAYOUTS)[number];
340
+ /** Shows a section's own block, with the template its author chose, instead of
341
+ * a summary. A section shown this way is one slide for its whole narration. */
342
+ declare const AUTHORED_PRESENTATION_LAYOUT = "authored";
343
+ type PresentationBeatLayout = PresentationLayout | typeof AUTHORED_PRESENTATION_LAYOUT;
344
+ /** The prominent number a key-number slide shows, and the line that states it. */
345
+ declare function presentationStat(headline: string, points: readonly string[]): {
346
+ match: NumberHighlightMatch;
347
+ line: string;
348
+ index: number;
349
+ } | null;
350
+ /** Whether a summary can fill a layout: enough points for a list, steps or a
351
+ * comparison; a prominent number for a key number; a short headline for a big
352
+ * statement; and, for a quote, a headline found word for word in
353
+ * `passage`, the source text the slide summarizes. An image slide also needs a
354
+ * picture, which callers check. */
355
+ declare function presentationLayoutFits(layout: PresentationLayout, headline: string, points: readonly string[], passage: string): boolean;
331
356
  interface PresentationBeat {
332
357
  id: string;
333
358
  sourceStart: number;
334
359
  sourceEnd: number;
335
- layout: PresentationLayout;
360
+ layout: PresentationBeatLayout;
336
361
  headline: string;
337
362
  points: string[];
338
363
  imageSrc?: string;
339
364
  /** The section's videos and diagrams shown beside this slide's text (`presentationMedia`). */
340
365
  media?: string[];
366
+ /** Left out of the deck; the slide shown before it stays on screen instead. */
367
+ hidden?: true;
341
368
  }
342
369
  interface PresentationPlan {
343
370
  version: 1;
@@ -356,11 +383,18 @@ declare function serializePresentationPlan(plan: PresentationPlan): string;
356
383
 
357
384
  declare const PRESENTATION_HINTS_KEY = "squisq-presentation-hints";
358
385
  declare const DYNAMIC_PRESENTATION_STYLE = "dynamic-slides";
386
+ /** A short, stable name for one slide's exact source passage. Saving it rather
387
+ * than the passage keeps the document text out of the hints. */
388
+ declare function presentationPassageKey(passage: string): string;
359
389
  interface PresentationBlockHint {
360
390
  build?: BuildSpec;
361
391
  blockId: string;
362
- layout?: PresentationLayout;
392
+ /** A summary layout to prefer, or `authored` to show the section's own block. */
393
+ layout?: PresentationBeatLayout;
363
394
  inbetweens?: boolean;
395
+ /** Slides left out of the deck, by `presentationPassageKey` of their passage.
396
+ * Changing a passage, or how the section is split, shows its slide again. */
397
+ hidden?: string[];
364
398
  /** Optional AI-authored display text, keyed to the exact passage it summarizes. */
365
399
  ai?: Array<{
366
400
  source: string;
@@ -377,7 +411,9 @@ interface PresentationBlockHint {
377
411
  }
378
412
  interface PresentationHints {
379
413
  version: 1;
380
- density: 'concise' | 'balanced' | 'detailed';
414
+ /** How much of a section each slide covers; `section` is one slide per section,
415
+ * with no supporting slides. */
416
+ density: 'concise' | 'balanced' | 'detailed' | 'section';
381
417
  inbetweens: boolean;
382
418
  blocks: PresentationBlockHint[];
383
419
  }
@@ -421,4 +457,4 @@ interface PresentationMediaItem {
421
457
  * block's visuals belong to the nearest narrated section at or before it. */
422
458
  declare function collectPresentationMedia(doc: Doc, sectionIds: string[]): Map<string, PresentationMediaItem[]>;
423
459
 
424
- export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, DYNAMIC_PRESENTATION_STYLE, type NarratedSegmentInput, type NarratedSegmentResult, type NarratedSegmentTransformOptions, type NarratedSegmentVideo, PRESENTATION_HINTS_KEY, PRESENTATION_KEY, PRESENTATION_LAYOUTS, PRESENTATION_LIMITS, type PresentationBeat, type PresentationBlockHint, type PresentationHints, type PresentationLayout, type PresentationMediaItem, type PresentationPlan, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, allocateTiming, analyzeBlocks, applySavedPresentation, applyTransform, collectPresentationMedia, compilePresentationPlan, createPresentationPlan, createTransformStyleRegistry, defaultPresentationHints, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, parsePresentationHints, parsePresentationPlan, presentationSections, resolveTransformStyle, serializePresentationHints, serializePresentationPlan, transformNarratedSegment, usesDynamicPresentation };
460
+ export { AUTHORED_PRESENTATION_LAYOUT, type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, DYNAMIC_PRESENTATION_STYLE, type NarratedSegmentInput, type NarratedSegmentResult, type NarratedSegmentTransformOptions, type NarratedSegmentVideo, PRESENTATION_HINTS_KEY, PRESENTATION_KEY, PRESENTATION_LAYOUTS, PRESENTATION_LIMITS, type PresentationBeat, type PresentationBeatLayout, type PresentationBlockHint, type PresentationHints, type PresentationLayout, type PresentationMediaItem, type PresentationPlan, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, allocateTiming, analyzeBlocks, applySavedPresentation, applyTransform, collectPresentationMedia, compilePresentationPlan, createPresentationPlan, createTransformStyleRegistry, defaultPresentationHints, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, parsePresentationHints, parsePresentationPlan, presentationLayoutFits, presentationPassageKey, presentationSections, presentationStat, resolveTransformStyle, serializePresentationHints, serializePresentationPlan, transformNarratedSegment, usesDynamicPresentation };
@@ -1,4 +1,5 @@
1
1
  import {
2
+ AUTHORED_PRESENTATION_LAYOUT,
2
3
  DEFAULT_TRANSFORM_STYLE_ID,
3
4
  DYNAMIC_PRESENTATION_STYLE,
4
5
  PRESENTATION_HINTS_KEY,
@@ -19,15 +20,18 @@ import {
19
20
  getTransformStyleSummaries,
20
21
  parsePresentationHints,
21
22
  parsePresentationPlan,
23
+ presentationLayoutFits,
24
+ presentationPassageKey,
22
25
  presentationSections,
26
+ presentationStat,
23
27
  resolveTransformStyle,
24
28
  serializePresentationHints,
25
29
  serializePresentationPlan,
26
30
  transformNarratedSegment,
27
31
  usesDynamicPresentation
28
- } from "../chunk-VMKRN7TB.js";
29
- import "../chunk-L3VQQ3WT.js";
30
- import "../chunk-R2J7CQJZ.js";
32
+ } from "../chunk-N7I6JP6Q.js";
33
+ import "../chunk-SKGMNBQX.js";
34
+ import "../chunk-3WUI2N6C.js";
31
35
  import "../chunk-SVN7T6BK.js";
32
36
  import "../chunk-FUBMT6SJ.js";
33
37
  import "../chunk-WNEH3BZP.js";
@@ -40,6 +44,7 @@ import "../chunk-P53Z4RYC.js";
40
44
  import "../chunk-GHOPHGOK.js";
41
45
  import "../chunk-XRW6P7IF.js";
42
46
  export {
47
+ AUTHORED_PRESENTATION_LAYOUT,
43
48
  DEFAULT_TRANSFORM_STYLE_ID,
44
49
  DYNAMIC_PRESENTATION_STYLE,
45
50
  PRESENTATION_HINTS_KEY,
@@ -60,7 +65,10 @@ export {
60
65
  getTransformStyleSummaries,
61
66
  parsePresentationHints,
62
67
  parsePresentationPlan,
68
+ presentationLayoutFits,
69
+ presentationPassageKey,
63
70
  presentationSections,
71
+ presentationStat,
64
72
  resolveTransformStyle,
65
73
  serializePresentationHints,
66
74
  serializePresentationPlan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq",
3
- "version": "2.13.9",
3
+ "version": "2.13.11",
4
4
  "description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",