@segnavia/format 0.16.0 → 0.17.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.
- package/dist/deck-from-slides.d.ts +1 -1
- package/dist/deck.d.ts +10 -3
- package/dist/deck.js +8 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -119,7 +119,7 @@ export declare function deckFromSlides(rows: SlideRow[], options: DeckFromSlides
|
|
|
119
119
|
kind: "none" | "fade" | "slide";
|
|
120
120
|
duration: number;
|
|
121
121
|
} | undefined;
|
|
122
|
-
playback?: "continuous" | "
|
|
122
|
+
playback?: "continuous" | "segmented" | undefined;
|
|
123
123
|
captions?: "on" | "off" | "viewer" | undefined;
|
|
124
124
|
};
|
|
125
125
|
//#endregion
|
package/dist/deck.d.ts
CHANGED
|
@@ -385,6 +385,13 @@ export declare const DECK_SIZE: {
|
|
|
385
385
|
readonly width: 1280;
|
|
386
386
|
readonly height: 720;
|
|
387
387
|
};
|
|
388
|
+
export declare const PLAYBACK_MODES: readonly ["segmented", "continuous"];
|
|
389
|
+
export type PlaybackMode = (typeof PLAYBACK_MODES)[number];
|
|
390
|
+
export declare const Playback: z.ZodUnion<readonly [z.ZodEnum<{
|
|
391
|
+
continuous: "continuous";
|
|
392
|
+
segmented: "segmented";
|
|
393
|
+
}>, z.ZodPipe<z.ZodLiteral<"step">, z.ZodTransform<"continuous" | "segmented", "step">>]>;
|
|
394
|
+
export declare function parsePlayback(value: unknown): PlaybackMode | undefined;
|
|
388
395
|
export declare function annotationCueIssues(narration: Slide['narration'], annotations: number): string[];
|
|
389
396
|
export declare const Deck: z.ZodObject<{
|
|
390
397
|
title: z.ZodString;
|
|
@@ -421,10 +428,10 @@ export declare const Deck: z.ZodObject<{
|
|
|
421
428
|
}>;
|
|
422
429
|
duration: z.ZodDefault<z.ZodNumber>;
|
|
423
430
|
}, z.core.$strip>>;
|
|
424
|
-
playback: z.ZodOptional<z.ZodEnum<{
|
|
431
|
+
playback: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
425
432
|
continuous: "continuous";
|
|
426
|
-
|
|
427
|
-
}>>;
|
|
433
|
+
segmented: "segmented";
|
|
434
|
+
}>, z.ZodPipe<z.ZodLiteral<"step">, z.ZodTransform<"continuous" | "segmented", "step">>]>>;
|
|
428
435
|
captions: z.ZodOptional<z.ZodEnum<{
|
|
429
436
|
on: "on";
|
|
430
437
|
off: "off";
|
package/dist/deck.js
CHANGED
|
@@ -119,6 +119,12 @@ const DECK_SIZE = {
|
|
|
119
119
|
width: 1280,
|
|
120
120
|
height: 720
|
|
121
121
|
};
|
|
122
|
+
const PLAYBACK_MODES = ["segmented", "continuous"];
|
|
123
|
+
const Playback = z.union([z.enum(PLAYBACK_MODES), z.literal("step").transform(() => "segmented")]);
|
|
124
|
+
function parsePlayback(value) {
|
|
125
|
+
const parsed = Playback.safeParse(value);
|
|
126
|
+
return parsed.success ? parsed.data : void 0;
|
|
127
|
+
}
|
|
122
128
|
const DeckShape = z.object({
|
|
123
129
|
title: z.string(),
|
|
124
130
|
size: Size.default(DECK_SIZE),
|
|
@@ -129,7 +135,7 @@ const DeckShape = z.object({
|
|
|
129
135
|
dir: Direction.optional(),
|
|
130
136
|
lang: z.string().optional(),
|
|
131
137
|
transition: Transition.optional(),
|
|
132
|
-
playback:
|
|
138
|
+
playback: Playback.optional(),
|
|
133
139
|
captions: z.enum([
|
|
134
140
|
"on",
|
|
135
141
|
"off",
|
|
@@ -208,4 +214,4 @@ function exceedsLimits(deck, limits) {
|
|
|
208
214
|
return reasons;
|
|
209
215
|
}
|
|
210
216
|
//#endregion
|
|
211
|
-
export { Annotation, Box, Cue, DECK_SIZE, Deck, DeckShape, ImageFit, Manifest, Narration, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits };
|
|
217
|
+
export { Annotation, Box, Cue, DECK_SIZE, Deck, DeckShape, ImageFit, Manifest, Narration, PLAYBACK_MODES, Playback, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits, parsePlayback };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Board, BoardInput, BoardItem, BoardLabel, BoardSection, GridCell } from "./board.js";
|
|
2
|
-
import { Annotation, Box, Cue, DECK_SIZE, Deck, DeckInput, DeckLimits, ImageFit, Manifest, Narration, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits } from "./deck.js";
|
|
2
|
+
import { Annotation, Box, Cue, DECK_SIZE, Deck, DeckInput, DeckLimits, ImageFit, Manifest, Narration, PLAYBACK_MODES, Playback, PlaybackMode, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits, parsePlayback } from "./deck.js";
|
|
3
3
|
import { BoardItemAnchor, MIN_BOARD_ITEM_WIDTH, addItem, moveItems, moveSection, removeItems, resizeItem } from "./board-edit.js";
|
|
4
4
|
import { ArrangeOptions, BoardShapes, BoardView, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, ZoomBounds, arrange, boardBounds, boardToScreen, itemAt, itemHeight, revealView, screenToBoard, visibleItems, zoomAt, zoomToFit } from "./board-geometry.js";
|
|
5
5
|
import { BoardListingGroup, boardListing, boardListingIsEmpty, foldForSearch, nameMatches } from "./board-listing.js";
|
|
@@ -464,10 +464,10 @@ export declare function jsonSchemas(): {
|
|
|
464
464
|
}>;
|
|
465
465
|
duration: z.ZodDefault<z.ZodNumber>;
|
|
466
466
|
}, z.core.$strip>>;
|
|
467
|
-
playback: z.ZodOptional<z.ZodEnum<{
|
|
467
|
+
playback: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
468
468
|
continuous: "continuous";
|
|
469
|
-
|
|
470
|
-
}>>;
|
|
469
|
+
segmented: "segmented";
|
|
470
|
+
}>, z.ZodPipe<z.ZodLiteral<"step">, z.ZodTransform<"continuous" | "segmented", "step">>]>>;
|
|
471
471
|
captions: z.ZodOptional<z.ZodEnum<{
|
|
472
472
|
on: "on";
|
|
473
473
|
off: "off";
|
|
@@ -733,4 +733,4 @@ export declare function jsonSchemas(): {
|
|
|
733
733
|
}, z.core.$strip>>;
|
|
734
734
|
};
|
|
735
735
|
//#endregion
|
|
736
|
-
export { Annotation, type ArrangeOptions, Board, type BoardInput, BoardItem, type BoardItemAnchor, BoardLabel, type BoardListingGroup, BoardSection, type BoardShapes, type BoardView, Book, BookContents, BookFrontMatterEntry, type BookInput, BookMode, BookPage, BookSection, BookView, type BookViewInput, Box, Chapter, Cue, DECK_SIZE, DEFAULT_TRANSITION_DURATION_MS, Deck, type DeckFromSlidesOptions, type DeckInput, type DeckLimits, Direction, GridCell, type GridDropTarget, ImageFit, type Imposed, Lexicon, MAKE_ROOM_LIMIT, MARK_GAP_MM, MARK_LENGTH_MM, MAX_BOARD_ZOOM, MAX_SLIDE_TIMING_MS, MAX_TRANSITION_DURATION_MS, MIN_BOARD_ITEM_WIDTH, MIN_BOARD_ZOOM, MIN_TRANSITION_DURATION_MS, MM_PER_PT, Manifest, type MillimeterEdges, NAMED_PAPERS, Narration, NoteMarker, NumberSystem, PAPER_MM, PX_PER_MM, type PageFit, type PagePlacementKind, type PagePlacementLayout, Paper, type PaperBox, type Placement, Point, PronunciationEntry, PublishedShot, SECTION_GAP, SECTION_MIN_SIZE, SECTION_PADDING, SECTION_TITLE_ROOM, SHOT_KEY, Scripts, Shot, type ShotUse, Size, Slide, SlideContent, type SlideRow, TextDirection, Transition, TransitionInput, Word, type ZoomBounds, addItem, annotationCueIssues, arrange, assignMembership, boardBounds, boardListing, boardListingIsEmpty, boardToScreen, deckFromSlides, deriveSectionCells, exceedsLimits, firstStrongDirection, fitPage, fitSection, fitTouchedSections, foldForSearch, formatNumber, gridDropMarkerBox, gridDropTarget, impose, insertIntoGrid, isBookContents, isHebrew, itemAt, itemHeight, languageDirection, layoutSection, lexiconVersion, makeRoom, mirrorPlacement, moveItems, moveSection, nameMatches, noteMarker, noteMarkerIssues, pagePlacementLayout, printBoxes, printPadding, printProperties, removeFromGrid, removeItems, resizeItem, resolveDirection, revealView, roundMillimeters, screenToBoard, settleBoard, sheetMm, shotsUsed, toMillimeters, visibleItems, zoomAt, zoomToFit };
|
|
736
|
+
export { Annotation, type ArrangeOptions, Board, type BoardInput, BoardItem, type BoardItemAnchor, BoardLabel, type BoardListingGroup, BoardSection, type BoardShapes, type BoardView, Book, BookContents, BookFrontMatterEntry, type BookInput, BookMode, BookPage, BookSection, BookView, type BookViewInput, Box, Chapter, Cue, DECK_SIZE, DEFAULT_TRANSITION_DURATION_MS, Deck, type DeckFromSlidesOptions, type DeckInput, type DeckLimits, Direction, GridCell, type GridDropTarget, ImageFit, type Imposed, Lexicon, MAKE_ROOM_LIMIT, MARK_GAP_MM, MARK_LENGTH_MM, MAX_BOARD_ZOOM, MAX_SLIDE_TIMING_MS, MAX_TRANSITION_DURATION_MS, MIN_BOARD_ITEM_WIDTH, MIN_BOARD_ZOOM, MIN_TRANSITION_DURATION_MS, MM_PER_PT, Manifest, type MillimeterEdges, NAMED_PAPERS, Narration, NoteMarker, NumberSystem, PAPER_MM, PLAYBACK_MODES, PX_PER_MM, type PageFit, type PagePlacementKind, type PagePlacementLayout, Paper, type PaperBox, type Placement, Playback, type PlaybackMode, Point, PronunciationEntry, PublishedShot, SECTION_GAP, SECTION_MIN_SIZE, SECTION_PADDING, SECTION_TITLE_ROOM, SHOT_KEY, Scripts, Shot, type ShotUse, Size, Slide, SlideContent, type SlideRow, TextDirection, Transition, TransitionInput, Word, type ZoomBounds, addItem, annotationCueIssues, arrange, assignMembership, boardBounds, boardListing, boardListingIsEmpty, boardToScreen, deckFromSlides, deriveSectionCells, exceedsLimits, firstStrongDirection, fitPage, fitSection, fitTouchedSections, foldForSearch, formatNumber, gridDropMarkerBox, gridDropTarget, impose, insertIntoGrid, isBookContents, isHebrew, itemAt, itemHeight, languageDirection, layoutSection, lexiconVersion, makeRoom, mirrorPlacement, moveItems, moveSection, nameMatches, noteMarker, noteMarkerIssues, pagePlacementLayout, parsePlayback, printBoxes, printPadding, printProperties, removeFromGrid, removeItems, resizeItem, resolveDirection, revealView, roundMillimeters, screenToBoard, settleBoard, sheetMm, shotsUsed, toMillimeters, visibleItems, zoomAt, zoomToFit };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Direction, TextDirection, firstStrongDirection, languageDirection, reso
|
|
|
2
2
|
import { Scripts } from "./scripts.js";
|
|
3
3
|
import { MAX_SLIDE_TIMING_MS } from "./timing.js";
|
|
4
4
|
import { DEFAULT_TRANSITION_DURATION_MS, MAX_TRANSITION_DURATION_MS, MIN_TRANSITION_DURATION_MS, Transition } from "./transition.js";
|
|
5
|
-
import { Annotation, Box, Cue, DECK_SIZE, Deck, DeckShape, ImageFit, Manifest, Narration, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits } from "./deck.js";
|
|
5
|
+
import { Annotation, Box, Cue, DECK_SIZE, Deck, DeckShape, ImageFit, Manifest, Narration, PLAYBACK_MODES, Playback, Point, PublishedShot, SHOT_KEY, Shot, Size, Slide, SlideContent, Word, annotationCueIssues, exceedsLimits, parsePlayback } from "./deck.js";
|
|
6
6
|
import { Board, BoardItem, BoardLabel, BoardSection, GridCell } from "./board.js";
|
|
7
7
|
import { NoteMarker, NumberSystem, formatNumber, noteMarker } from "./numbering.js";
|
|
8
8
|
import { MARK_GAP_MM, MARK_LENGTH_MM, MM_PER_PT, NAMED_PAPERS, PAPER_MM, PX_PER_MM, Paper, printBoxes, printPadding, printProperties, roundMillimeters, sheetMm, toMillimeters } from "./paper.js";
|
|
@@ -159,4 +159,4 @@ function jsonSchemas() {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
|
-
export { Annotation, Board, BoardItem, BoardLabel, BoardSection, Book, BookContents, BookFrontMatterEntry, BookMode, BookPage, BookSection, BookView, Box, Chapter, Cue, DECK_SIZE, DEFAULT_TRANSITION_DURATION_MS, Deck, Direction, GridCell, ImageFit, Imposition, Lexicon, MAKE_ROOM_LIMIT, MARK_GAP_MM, MARK_LENGTH_MM, MAX_BOARD_ZOOM, MAX_IMPOSITION_CELLS, MAX_SLIDE_TIMING_MS, MAX_TRANSITION_DURATION_MS, MIN_BOARD_ITEM_WIDTH, MIN_BOARD_ZOOM, MIN_TRANSITION_DURATION_MS, MM_PER_PT, Manifest, Margin, NAMED_PAPERS, Narration, NoteMarker, NumberSystem, PAPER_MM, PX_PER_MM, Page, PageSize, Paper, Point, Print, PronunciationEntry, PublishedShot, SECTION_GAP, SECTION_MIN_SIZE, SECTION_PADDING, SECTION_TITLE_ROOM, SHOT_KEY, Scripts, Shot, Size, Slide, SlideContent, TextDirection, Transition, Word, addItem, annotationCueIssues, arrange, assignMembership, boardBounds, boardListing, boardListingIsEmpty, boardToScreen, deckFromSlides, deriveSectionCells, exceedsLimits, firstStrongDirection, fitPage, fitSection, fitTouchedSections, foldForSearch, formatNumber, gridDropMarkerBox, gridDropTarget, impose, insertIntoGrid, isBookContents, isHebrew, itemAt, itemHeight, jsonSchemas, languageDirection, layoutSection, lexiconVersion, makeRoom, mirrorPlacement, moveItems, moveSection, nameMatches, noteMarker, noteMarkerIssues, pagePlacementLayout, printBoxes, printPadding, printProperties, removeFromGrid, removeItems, resizeItem, resolveDirection, revealView, roundMillimeters, screenToBoard, settleBoard, sheetMm, shotsUsed, toMillimeters, visibleItems, zoomAt, zoomToFit };
|
|
162
|
+
export { Annotation, Board, BoardItem, BoardLabel, BoardSection, Book, BookContents, BookFrontMatterEntry, BookMode, BookPage, BookSection, BookView, Box, Chapter, Cue, DECK_SIZE, DEFAULT_TRANSITION_DURATION_MS, Deck, Direction, GridCell, ImageFit, Imposition, Lexicon, MAKE_ROOM_LIMIT, MARK_GAP_MM, MARK_LENGTH_MM, MAX_BOARD_ZOOM, MAX_IMPOSITION_CELLS, MAX_SLIDE_TIMING_MS, MAX_TRANSITION_DURATION_MS, MIN_BOARD_ITEM_WIDTH, MIN_BOARD_ZOOM, MIN_TRANSITION_DURATION_MS, MM_PER_PT, Manifest, Margin, NAMED_PAPERS, Narration, NoteMarker, NumberSystem, PAPER_MM, PLAYBACK_MODES, PX_PER_MM, Page, PageSize, Paper, Playback, Point, Print, PronunciationEntry, PublishedShot, SECTION_GAP, SECTION_MIN_SIZE, SECTION_PADDING, SECTION_TITLE_ROOM, SHOT_KEY, Scripts, Shot, Size, Slide, SlideContent, TextDirection, Transition, Word, addItem, annotationCueIssues, arrange, assignMembership, boardBounds, boardListing, boardListingIsEmpty, boardToScreen, deckFromSlides, deriveSectionCells, exceedsLimits, firstStrongDirection, fitPage, fitSection, fitTouchedSections, foldForSearch, formatNumber, gridDropMarkerBox, gridDropTarget, impose, insertIntoGrid, isBookContents, isHebrew, itemAt, itemHeight, jsonSchemas, languageDirection, layoutSection, lexiconVersion, makeRoom, mirrorPlacement, moveItems, moveSection, nameMatches, noteMarker, noteMarkerIssues, pagePlacementLayout, parsePlayback, printBoxes, printPadding, printProperties, removeFromGrid, removeItems, resizeItem, resolveDirection, revealView, roundMillimeters, screenToBoard, settleBoard, sheetMm, shotsUsed, toMillimeters, visibleItems, zoomAt, zoomToFit };
|