starry-slides 0.1.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.
Files changed (160) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +131 -0
  3. package/dist/assets/index---ub3Dty.css +1 -0
  4. package/dist/assets/index-7Xs_Dyp0.js +354 -0
  5. package/dist/assets/index-8ul7coaw.js +451 -0
  6. package/dist/assets/index-B4_bJa9t.js +412 -0
  7. package/dist/assets/index-B9p6L9Wx.js +324 -0
  8. package/dist/assets/index-BF-Vi1Nh.js +413 -0
  9. package/dist/assets/index-BKvVbgXz.css +1 -0
  10. package/dist/assets/index-BNZJ_Wz-.js +417 -0
  11. package/dist/assets/index-BO2gtiKn.js +413 -0
  12. package/dist/assets/index-BYpD8kgo.js +456 -0
  13. package/dist/assets/index-BaZRfz_9.css +1 -0
  14. package/dist/assets/index-BlsWm4PI.js +412 -0
  15. package/dist/assets/index-BnUIBFtw.js +393 -0
  16. package/dist/assets/index-BvhCbfCi.js +412 -0
  17. package/dist/assets/index-BxEkxfy1.js +412 -0
  18. package/dist/assets/index-BzrA7O0L.js +422 -0
  19. package/dist/assets/index-C0xGkdRg.js +413 -0
  20. package/dist/assets/index-C1Rjncf1.js +456 -0
  21. package/dist/assets/index-CCgb2gqc.js +413 -0
  22. package/dist/assets/index-CDFJQRFx.js +413 -0
  23. package/dist/assets/index-CEOai0RW.js +456 -0
  24. package/dist/assets/index-CG2uWTey.css +1 -0
  25. package/dist/assets/index-CLe3_iTu.js +412 -0
  26. package/dist/assets/index-CS_optob.js +324 -0
  27. package/dist/assets/index-CXgwXOZH.css +1 -0
  28. package/dist/assets/index-CcBvAcE2.js +408 -0
  29. package/dist/assets/index-CllmR_MT.js +408 -0
  30. package/dist/assets/index-CnMy6wxq.js +412 -0
  31. package/dist/assets/index-CoWNjYgb.js +422 -0
  32. package/dist/assets/index-CtfA3BPy.css +1 -0
  33. package/dist/assets/index-D-JiuJIv.js +324 -0
  34. package/dist/assets/index-D2uEYXyQ.css +1 -0
  35. package/dist/assets/index-D70beOHW.js +456 -0
  36. package/dist/assets/index-D8xuxnF1.js +456 -0
  37. package/dist/assets/index-DKAtkRd8.css +1 -0
  38. package/dist/assets/index-DU3l9_k0.css +1 -0
  39. package/dist/assets/index-DaLY98jk.js +456 -0
  40. package/dist/assets/index-DkNHJHQl.js +412 -0
  41. package/dist/assets/index-DmFnifK8.js +456 -0
  42. package/dist/assets/index-DndZR7Ds.css +1 -0
  43. package/dist/assets/index-DuRa7Y6g.js +324 -0
  44. package/dist/assets/index-EnDjTeHF.js +451 -0
  45. package/dist/assets/index-J3nQgjqJ.js +451 -0
  46. package/dist/assets/index-wD_iWTBn.js +413 -0
  47. package/dist/chunk-AK5J4CXH.js +1671 -0
  48. package/dist/chunk-ARFDESSF.js +1583 -0
  49. package/dist/chunk-DHWTBXGS.js +985 -0
  50. package/dist/chunk-FCRRFL7N.js +1571 -0
  51. package/dist/chunk-J7W4Y7WJ.js +1620 -0
  52. package/dist/chunk-OCJULB7Z.js +1140 -0
  53. package/dist/chunk-WCJWV5SO.js +36 -0
  54. package/dist/cli/index.d.ts +2 -0
  55. package/dist/cli/index.js +1119 -0
  56. package/dist/cli/index.test.d.ts +1 -0
  57. package/dist/core/deck-slide-operations.d.ts +5 -0
  58. package/dist/core/generated-deck.d.ts +8 -0
  59. package/dist/core/generated-deck.test.d.ts +1 -0
  60. package/dist/core/group-operations.d.ts +24 -0
  61. package/dist/core/history.d.ts +20 -0
  62. package/dist/core/history.test.d.ts +1 -0
  63. package/dist/core/html-export.d.ts +20 -0
  64. package/dist/core/index.d.ts +11 -0
  65. package/dist/core/layout.d.ts +36 -0
  66. package/dist/core/layout.test.d.ts +1 -0
  67. package/dist/core/pdf-export.d.ts +20 -0
  68. package/dist/core/presentation.d.ts +7 -0
  69. package/dist/core/slide-contract.d.ts +41 -0
  70. package/dist/core/slide-document.d.ts +5 -0
  71. package/dist/core/slide-document.test.d.ts +1 -0
  72. package/dist/core/slide-html-document.d.ts +3 -0
  73. package/dist/core/slide-operation-reducer.d.ts +4 -0
  74. package/dist/core/slide-operation-reducer.test.d.ts +1 -0
  75. package/dist/core/slide-operation-types.d.ts +123 -0
  76. package/dist/core/slide-operations-helpers.d.ts +14 -0
  77. package/dist/core/slide-operations.d.ts +5 -0
  78. package/dist/core/slide-operations.test.d.ts +1 -0
  79. package/dist/core/verify-deck.d.ts +48 -0
  80. package/dist/core/verify-deck.test.d.ts +1 -0
  81. package/dist/editor/app/App.d.ts +2 -0
  82. package/dist/editor/app/main.d.ts +1 -0
  83. package/dist/editor/app/use-slides-data.d.ts +14 -0
  84. package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
  85. package/dist/editor/components/color-picker.d.ts +10 -0
  86. package/dist/editor/components/context-menu.d.ts +26 -0
  87. package/dist/editor/components/editor-header.d.ts +18 -0
  88. package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
  89. package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
  90. package/dist/editor/components/floating-toolbar.d.ts +27 -0
  91. package/dist/editor/components/presenter-view.d.ts +13 -0
  92. package/dist/editor/components/slide-sidebar.d.ts +18 -0
  93. package/dist/editor/components/stage-canvas.d.ts +77 -0
  94. package/dist/editor/components/ui/accordion.d.ts +7 -0
  95. package/dist/editor/components/ui/button.d.ts +10 -0
  96. package/dist/editor/components/ui/context-menu.d.ts +25 -0
  97. package/dist/editor/components/ui/dialog.d.ts +10 -0
  98. package/dist/editor/components/ui/input.d.ts +3 -0
  99. package/dist/editor/components/ui/popover.d.ts +10 -0
  100. package/dist/editor/components/ui/scroll-area.d.ts +5 -0
  101. package/dist/editor/components/ui/select.d.ts +15 -0
  102. package/dist/editor/components/ui/separator.d.ts +4 -0
  103. package/dist/editor/components/ui/tabs.d.ts +11 -0
  104. package/dist/editor/components/ui/textarea.d.ts +3 -0
  105. package/dist/editor/components/ui/toggle-group.d.ts +9 -0
  106. package/dist/editor/components/ui/toggle.d.ts +9 -0
  107. package/dist/editor/components/ui/tooltip.d.ts +7 -0
  108. package/dist/editor/editor-operations.d.ts +15 -0
  109. package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
  110. package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
  111. package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
  112. package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
  113. package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
  114. package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
  115. package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
  116. package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
  117. package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
  118. package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
  119. package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
  120. package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
  121. package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
  122. package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
  123. package/dist/editor/hooks/use-slide-history.d.ts +17 -0
  124. package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
  125. package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
  126. package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
  127. package/dist/editor/index.d.ts +13 -0
  128. package/dist/editor/index.js +8260 -0
  129. package/dist/editor/lib/block-snap-constants.d.ts +8 -0
  130. package/dist/editor/lib/block-snap-guides.d.ts +6 -0
  131. package/dist/editor/lib/block-snap-targets.d.ts +13 -0
  132. package/dist/editor/lib/block-snap-types.d.ts +30 -0
  133. package/dist/editor/lib/block-snapping.d.ts +17 -0
  134. package/dist/editor/lib/collect-css-properties.d.ts +5 -0
  135. package/dist/editor/lib/element-tool-commit.d.ts +18 -0
  136. package/dist/editor/lib/element-tool-model.d.ts +16 -0
  137. package/dist/editor/lib/element-tool-types.d.ts +35 -0
  138. package/dist/editor/lib/element-tool-values.d.ts +23 -0
  139. package/dist/editor/lib/motion.d.ts +8 -0
  140. package/dist/editor/lib/selection-overlay.d.ts +4 -0
  141. package/dist/editor/lib/style-controls.d.ts +17 -0
  142. package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
  143. package/dist/editor/lib/utils.d.ts +3 -0
  144. package/dist/index.html +13 -0
  145. package/dist/node/deck-runtime-middleware.d.ts +8 -0
  146. package/dist/node/deck-source.d.ts +1 -0
  147. package/dist/node/html-export.d.ts +16 -0
  148. package/dist/node/open-browser.d.ts +1 -0
  149. package/dist/node/pdf-export.d.ts +20 -0
  150. package/dist/node/ports.d.ts +1 -0
  151. package/dist/node/view-renderer.d.ts +31 -0
  152. package/dist/runtime/deck-source.d.ts +1 -0
  153. package/dist/runtime/html-export.d.ts +16 -0
  154. package/dist/runtime/open-browser.d.ts +1 -0
  155. package/dist/runtime/pdf-export.d.ts +20 -0
  156. package/dist/runtime/ports.d.ts +1 -0
  157. package/dist/runtime/view-renderer.d.ts +31 -0
  158. package/dist/runtime/view-renderer.test.d.ts +1 -0
  159. package/dist/test/deck-fixtures.d.ts +14 -0
  160. package/package.json +94 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { SlideModel } from "./slide-contract";
2
+ export declare function createUniqueSlideId(slides: SlideModel[], preferredId: string): string;
3
+ export declare function createUniqueSlideSourceFile(slides: SlideModel[], preferredFile: string): string;
4
+ export declare function createBlankSlide(slides: SlideModel[], insertIndex: number): SlideModel;
5
+ export declare function createDuplicatedSlide(slides: SlideModel[], sourceSlide: SlideModel): SlideModel;
@@ -0,0 +1,8 @@
1
+ import type { ImportedSlideDeck } from "./slide-contract";
2
+ export interface LoadSlidesFromManifestOptions {
3
+ manifestUrl: string;
4
+ fetchImpl?: typeof fetch;
5
+ requestInit?: RequestInit;
6
+ slideIdPrefix?: string;
7
+ }
8
+ export declare function loadSlidesFromManifest({ manifestUrl, fetchImpl, requestInit, slideIdPrefix, }: LoadSlidesFromManifestOptions): Promise<ImportedSlideDeck | null>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { GroupCreateOperation, GroupUngroupOperation } from "./slide-operation-types";
2
+ export type GroupElementRectMap = Record<string, {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ }>;
8
+ export type ElementPresentationStyleMap = Record<string, Partial<Record<"color" | "fontSize" | "fontWeight" | "fontStyle" | "lineHeight" | "textAlign" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "listStylePosition" | "listStyleType", string>>>;
9
+ export declare function createGroupCreateOperation({ html, slideId, groupElementId, elementIds, elementRects, timestamp, }: {
10
+ html: string;
11
+ slideId: string;
12
+ groupElementId: string;
13
+ elementIds: string[];
14
+ elementRects?: GroupElementRectMap;
15
+ timestamp?: number;
16
+ }): GroupCreateOperation | null;
17
+ export declare function createGroupUngroupOperation({ html, slideId, groupElementId, elementRects, elementPresentationStyles, timestamp, }: {
18
+ html: string;
19
+ slideId: string;
20
+ groupElementId: string;
21
+ elementRects?: GroupElementRectMap;
22
+ elementPresentationStyles?: ElementPresentationStyleMap;
23
+ timestamp?: number;
24
+ }): GroupUngroupOperation | null;
@@ -0,0 +1,20 @@
1
+ import type { SlideModel } from "./slide-contract";
2
+ import { type SlideOperation } from "./slide-operations";
3
+ export interface HistoryState {
4
+ slides: SlideModel[];
5
+ undoStack: SlideOperation[];
6
+ redoStack: SlideOperation[];
7
+ }
8
+ export type HistoryAction = {
9
+ type: "history.reset";
10
+ slides: SlideModel[];
11
+ } | {
12
+ type: "history.commit";
13
+ operation: SlideOperation;
14
+ } | {
15
+ type: "history.undo";
16
+ } | {
17
+ type: "history.redo";
18
+ };
19
+ export declare function createHistoryState(slides: SlideModel[]): HistoryState;
20
+ export declare function reduceHistory(state: HistoryState, action: HistoryAction): HistoryState;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { type SlideDeckManifestEntry } from "./slide-contract";
2
+ export interface HtmlExportSlide extends SlideDeckManifestEntry {
3
+ htmlSource: string;
4
+ width?: number;
5
+ height?: number;
6
+ }
7
+ export interface ResolvedHtmlExportSlide {
8
+ file: string;
9
+ title?: string;
10
+ htmlSource: string;
11
+ width: number;
12
+ height: number;
13
+ }
14
+ export interface HtmlExportDocumentOptions {
15
+ title?: string;
16
+ slides: HtmlExportSlide[];
17
+ }
18
+ export declare function planHtmlExportSlides(slides: HtmlExportSlide[]): HtmlExportSlide[];
19
+ export declare function resolveHtmlExportSlides(slides: HtmlExportSlide[]): ResolvedHtmlExportSlide[];
20
+ export declare function createSingleHtmlExportDocument({ title, slides, }: HtmlExportDocumentOptions): string;
@@ -0,0 +1,11 @@
1
+ export * from "./slide-contract";
2
+ export * from "./slide-document";
3
+ export * from "./slide-html-document";
4
+ export * from "./layout";
5
+ export * from "./slide-operations";
6
+ export * from "./deck-slide-operations";
7
+ export * from "./history";
8
+ export * from "./generated-deck";
9
+ export * from "./pdf-export";
10
+ export * from "./html-export";
11
+ export * from "./presentation";
@@ -0,0 +1,36 @@
1
+ export interface RectLike {
2
+ left: number;
3
+ top: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export interface StageRect {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ }
13
+ export interface StageGeometry {
14
+ scale: number;
15
+ offsetX: number;
16
+ offsetY: number;
17
+ slideWidth: number;
18
+ slideHeight: number;
19
+ }
20
+ export declare const ELEMENT_LAYOUT_STYLE_KEYS: readonly ["position", "left", "top", "width", "height", "transform", "transformOrigin", "margin", "zIndex"];
21
+ export type ElementLayoutStyleKey = (typeof ELEMENT_LAYOUT_STYLE_KEYS)[number];
22
+ export type ElementLayoutStyleSnapshot = Record<ElementLayoutStyleKey, string | null>;
23
+ export declare function createEmptyElementLayoutStyleSnapshot(): ElementLayoutStyleSnapshot;
24
+ export declare function captureElementLayoutStyleSnapshot(node: HTMLElement): ElementLayoutStyleSnapshot;
25
+ export declare function normalizeElementLayoutStyleSnapshot(snapshot: Partial<ElementLayoutStyleSnapshot>): ElementLayoutStyleSnapshot;
26
+ export declare function parseTransformParts(transformValue: string | null | undefined): {
27
+ translateX: number;
28
+ translateY: number;
29
+ rotate: number;
30
+ };
31
+ export declare function composeTransform(translateX: number, translateY: number, rotate: number): string | null;
32
+ export declare function elementRectToStageRect(elementRect: RectLike, rootRect: RectLike, geometry: StageGeometry): StageRect;
33
+ export declare function stageDeltaToSlideDelta(deltaX: number, deltaY: number, geometry: StageGeometry): {
34
+ x: number;
35
+ y: number;
36
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { SlideDeckManifestEntry } from "./slide-contract";
2
+ export type PdfExportSelection = {
3
+ mode?: "all";
4
+ } | {
5
+ mode: "slide";
6
+ slideFile?: string;
7
+ } | {
8
+ mode: "slides";
9
+ slideFiles?: string[];
10
+ };
11
+ export type ResolvedPdfExportMode = "all" | "single" | "slides";
12
+ export interface ResolvedPdfExportSelection {
13
+ mode: ResolvedPdfExportMode;
14
+ slides: SlideDeckManifestEntry[];
15
+ }
16
+ export declare function planPdfExport({ slides, selection, }: {
17
+ slides: SlideDeckManifestEntry[];
18
+ selection?: PdfExportSelection;
19
+ }): ResolvedPdfExportSelection;
20
+ export declare function planPdfExportSlides(slides: SlideDeckManifestEntry[], selection?: PdfExportSelection): SlideDeckManifestEntry[];
@@ -0,0 +1,7 @@
1
+ export type PresentationTool = "none" | "laser" | "pen";
2
+ export declare const PRESENTATION_PEN_COLORS: string[];
3
+ export interface PresentableSlide {
4
+ hidden?: boolean;
5
+ }
6
+ export declare function planPresentationSlides<TSlide extends PresentableSlide>(slides: TSlide[]): TSlide[];
7
+ export declare function clampPresentationIndex(index: number, slideCount: number): number;
@@ -0,0 +1,41 @@
1
+ export type EditableType = "text" | "image" | "block" | "group";
2
+ export interface EditableElement {
3
+ id: string;
4
+ selector: string;
5
+ type: EditableType;
6
+ content: string;
7
+ tagName: string;
8
+ }
9
+ export interface SlideModel {
10
+ id: string;
11
+ title: string;
12
+ htmlSource: string;
13
+ rootSelector: string;
14
+ width: number;
15
+ height: number;
16
+ elements: EditableElement[];
17
+ sourceFile?: string;
18
+ hidden?: boolean;
19
+ }
20
+ export interface SlideDeckManifestEntry {
21
+ file: string;
22
+ title?: string;
23
+ hidden?: boolean;
24
+ }
25
+ export interface SlideDeckManifest {
26
+ topic?: string;
27
+ slides?: SlideDeckManifestEntry[];
28
+ }
29
+ export interface ImportedSlideDeck {
30
+ manifest: SlideDeckManifest;
31
+ slides: SlideModel[];
32
+ }
33
+ export declare const SELECTOR_ATTR = "data-editor-id";
34
+ export declare const SLIDE_ROOT_ATTR = "data-slide-root";
35
+ export declare const DEFAULT_SLIDE_WIDTH = 1920;
36
+ export declare const DEFAULT_SLIDE_HEIGHT = 1080;
37
+ export declare function getSlideElementSelector(elementId: string): string;
38
+ export declare function getSlideRootSelector(rootId: string): string;
39
+ export declare function createElementId(index: number, type: EditableType): string;
40
+ export declare function parseDimension(value: string | null, fallback: number): number;
41
+ export declare function normalizeSlideId(slideId: string): string;
@@ -0,0 +1,5 @@
1
+ import { type SlideModel } from "./slide-contract";
2
+ export declare function ensureEditableSelectors(html: string): string;
3
+ export declare function parseSlide(html: string, slideId?: string): SlideModel;
4
+ export declare function querySlideElement<T extends Element = HTMLElement>(doc: ParentNode, elementId: string): T | null;
5
+ export declare function getSlideInlineStyleValue(slide: SlideModel, elementId: string, propertyName: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function parseHtmlDocument(html: string): Document | null;
2
+ export declare function serializeHtmlDocument(doc: Document): string;
3
+ export declare function updateHtmlSource(html: string, updater: (doc: Document) => void): string;
@@ -0,0 +1,4 @@
1
+ import type { SlideModel } from "./slide-contract";
2
+ import type { SlideOperation } from "./slide-operation-types";
3
+ export declare function applySlideOperation(slide: SlideModel, operation: SlideOperation): SlideModel;
4
+ export declare function invertSlideOperation(operation: SlideOperation): SlideOperation;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,123 @@
1
+ import type { ElementLayoutStyleSnapshot } from "./layout";
2
+ import type { SlideModel } from "./slide-contract";
3
+ export interface TextUpdateOperation {
4
+ type: "text.update";
5
+ slideId: string;
6
+ elementId: string;
7
+ previousText: string;
8
+ nextText: string;
9
+ timestamp: number;
10
+ }
11
+ export interface StyleUpdateOperation {
12
+ type: "style.update";
13
+ slideId: string;
14
+ elementId: string;
15
+ propertyName: string;
16
+ previousValue: string;
17
+ nextValue: string;
18
+ timestamp: number;
19
+ }
20
+ export interface AttributeUpdateOperation {
21
+ type: "attribute.update";
22
+ slideId: string;
23
+ elementId: string;
24
+ attributeName: string;
25
+ previousValue: string;
26
+ nextValue: string;
27
+ timestamp: number;
28
+ }
29
+ export interface ElementLayoutUpdateOperation {
30
+ type: "element.layout.update";
31
+ slideId: string;
32
+ elementId: string;
33
+ previousStyle: ElementLayoutStyleSnapshot;
34
+ nextStyle: ElementLayoutStyleSnapshot;
35
+ timestamp: number;
36
+ }
37
+ export interface ElementInsertOperation {
38
+ type: "element.insert";
39
+ slideId: string;
40
+ elementId: string;
41
+ parentElementId: string | null;
42
+ previousSiblingElementId: string | null;
43
+ nextSiblingElementId: string | null;
44
+ html: string;
45
+ timestamp: number;
46
+ }
47
+ export interface ElementRemoveOperation {
48
+ type: "element.remove";
49
+ slideId: string;
50
+ elementId: string;
51
+ parentElementId: string | null;
52
+ previousSiblingElementId: string | null;
53
+ nextSiblingElementId: string | null;
54
+ html: string;
55
+ timestamp: number;
56
+ }
57
+ export interface GroupCreateOperation {
58
+ type: "group.create";
59
+ slideId: string;
60
+ groupElementId: string;
61
+ elementIds: string[];
62
+ previousHtmlSource: string;
63
+ nextHtmlSource: string;
64
+ timestamp: number;
65
+ }
66
+ export interface GroupUngroupOperation {
67
+ type: "group.ungroup";
68
+ slideId: string;
69
+ groupElementId: string;
70
+ childElementIds: string[];
71
+ previousHtmlSource: string;
72
+ nextHtmlSource: string;
73
+ timestamp: number;
74
+ }
75
+ export type AtomicSlideOperation = TextUpdateOperation | StyleUpdateOperation | AttributeUpdateOperation | ElementLayoutUpdateOperation | ElementInsertOperation | ElementRemoveOperation | GroupCreateOperation | GroupUngroupOperation;
76
+ export interface SlideBatchOperation {
77
+ type: "operation.batch";
78
+ slideId: string;
79
+ operations: AtomicSlideOperation[];
80
+ timestamp: number;
81
+ }
82
+ export interface SlideCreateOperation {
83
+ type: "slide.create";
84
+ slide: SlideModel;
85
+ index: number;
86
+ timestamp: number;
87
+ }
88
+ export interface SlideDeleteOperation {
89
+ type: "slide.delete";
90
+ slide: SlideModel;
91
+ index: number;
92
+ timestamp: number;
93
+ }
94
+ export interface SlideDuplicateOperation {
95
+ type: "slide.duplicate";
96
+ sourceSlideId: string;
97
+ slide: SlideModel;
98
+ index: number;
99
+ timestamp: number;
100
+ }
101
+ export interface SlideReorderOperation {
102
+ type: "slide.reorder";
103
+ slideId: string;
104
+ fromIndex: number;
105
+ toIndex: number;
106
+ timestamp: number;
107
+ }
108
+ export interface SlideVisibilityUpdateOperation {
109
+ type: "slide.visibility.update";
110
+ slideId: string;
111
+ previousHidden: boolean;
112
+ nextHidden: boolean;
113
+ timestamp: number;
114
+ }
115
+ export interface SlideTitleUpdateOperation {
116
+ type: "slide.title.update";
117
+ slideId: string;
118
+ previousTitle: string;
119
+ nextTitle: string;
120
+ timestamp: number;
121
+ }
122
+ export type DeckSlideOperation = SlideCreateOperation | SlideDeleteOperation | SlideDuplicateOperation | SlideReorderOperation | SlideVisibilityUpdateOperation | SlideTitleUpdateOperation;
123
+ export type SlideOperation = AtomicSlideOperation | SlideBatchOperation | DeckSlideOperation;
@@ -0,0 +1,14 @@
1
+ import { type ElementLayoutStyleSnapshot } from "./layout";
2
+ import type { ElementInsertOperation } from "./slide-operation-types";
3
+ export declare function updateSlideText(html: string, elementId: string, value: string): string;
4
+ export declare function updateSlideStyle(html: string, elementId: string, propertyName: string, value: string): string;
5
+ export declare function updateSlideAttribute(html: string, elementId: string, attributeName: string, value: string): string;
6
+ export declare function duplicateSlideElement(html: string, sourceElementId: string, nextElementId: string): string;
7
+ export declare function updateSlideElementLayout(html: string, elementId: string, snapshot: ElementLayoutStyleSnapshot): string;
8
+ export declare function createElementPlacement(html: string, elementId: string): Pick<ElementInsertOperation, "parentElementId" | "previousSiblingElementId" | "nextSiblingElementId"> | null;
9
+ export declare function getSlideElementHtml(html: string, elementId: string): string | null;
10
+ export declare function updateSlideElementHtmlIds(elementHtml: string, idMap: Record<string, string>): string;
11
+ export declare function createUniqueElementId(html: string, preferredId: string): string;
12
+ export declare function insertSlideElement(html: string, operation: Pick<ElementInsertOperation, "elementId" | "parentElementId" | "previousSiblingElementId" | "nextSiblingElementId" | "html">): string;
13
+ export declare function removeSlideElement(html: string, elementId: string): string;
14
+ export declare function updateSlideElementTransform(html: string, elementId: string, deltaX: number, deltaY: number): string;
@@ -0,0 +1,5 @@
1
+ export type { AtomicSlideOperation, AttributeUpdateOperation, ElementInsertOperation, ElementLayoutUpdateOperation, ElementRemoveOperation, GroupCreateOperation, GroupUngroupOperation, SlideBatchOperation, SlideTitleUpdateOperation, SlideOperation, StyleUpdateOperation, TextUpdateOperation, } from "./slide-operation-types";
2
+ export type { GroupElementRectMap, ElementPresentationStyleMap } from "./group-operations";
3
+ export { createGroupCreateOperation, createGroupUngroupOperation, } from "./group-operations";
4
+ export { createElementPlacement, createUniqueElementId, duplicateSlideElement, getSlideElementHtml, insertSlideElement, removeSlideElement, updateSlideAttribute, updateSlideElementHtmlIds, updateSlideElementLayout, updateSlideElementTransform, updateSlideStyle, updateSlideText, } from "./slide-operations-helpers";
5
+ export { applySlideOperation, invertSlideOperation } from "./slide-operation-reducer";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ export type VerifyMode = "static" | "complete";
2
+ export type VerifyCheck = "structure" | "static-overflow" | "rendered-overflow";
3
+ export interface VerifyIssue {
4
+ severity: "error" | "warning";
5
+ code: string;
6
+ message: string;
7
+ slideFile?: string;
8
+ selector?: string;
9
+ details?: Record<string, unknown>;
10
+ }
11
+ export interface VerifySummary {
12
+ errorCount: number;
13
+ warningCount: number;
14
+ }
15
+ export interface VerifyResult {
16
+ ok: boolean;
17
+ deck: string;
18
+ mode: VerifyMode;
19
+ checks: VerifyCheck[];
20
+ issues: VerifyIssue[];
21
+ summary: VerifySummary;
22
+ }
23
+ export interface VerifyDeckSourceResult {
24
+ deck: string;
25
+ manifestPath: string;
26
+ manifest: {
27
+ topic?: string;
28
+ slides?: Array<{
29
+ file?: unknown;
30
+ title?: unknown;
31
+ hidden?: unknown;
32
+ }>;
33
+ } | null;
34
+ slideFiles: string[];
35
+ issues: VerifyIssue[];
36
+ }
37
+ export declare function createVerifyIssue(severity: VerifyIssue["severity"], code: string, message: string, details?: VerifyIssue["details"]): VerifyIssue;
38
+ export declare function loadVerifyDeckSource(deckPath: string): VerifyDeckSourceResult;
39
+ export declare function createVerifyResult({ deck, mode, checks, issues, }: {
40
+ deck: string;
41
+ mode: VerifyMode;
42
+ checks: VerifyCheck[];
43
+ issues: VerifyIssue[];
44
+ }): VerifyResult;
45
+ export declare function verifyDeck(deckPath: string, options?: {
46
+ mode?: VerifyMode;
47
+ renderedIssues?: VerifyIssue[];
48
+ }): VerifyResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1 @@
1
+ import "../styles/index.css";
@@ -0,0 +1,14 @@
1
+ import { type PdfExportSelection, type SlideModel } from "../../core";
2
+ interface SlidesDataResult {
3
+ deckTitle: string;
4
+ slides: SlideModel[];
5
+ errorMessage: string | null;
6
+ isLoading: boolean;
7
+ isSaving: boolean;
8
+ saveSlides: (slides: SlideModel[]) => void;
9
+ saveDeckTitle: (title: string) => void;
10
+ exportPdf: (selection: PdfExportSelection) => Promise<void>;
11
+ exportHtml: () => Promise<void>;
12
+ }
13
+ export declare function useSlidesData(): SlidesDataResult;
14
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { MouseEvent as ReactMouseEvent } from "react";
2
+ interface Point {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ type ResizeHandleCorner = "top-left" | "top-right" | "bottom-right" | "bottom-left";
7
+ interface Rect {
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ }
13
+ interface SnapGuide {
14
+ orientation: "vertical" | "horizontal";
15
+ start: Point;
16
+ end: Point;
17
+ variant: "alignment" | "spacing";
18
+ }
19
+ interface BlockManipulationOverlayProps {
20
+ selectionBounds: Rect;
21
+ snapGuides: SnapGuide[];
22
+ resizeHandles: Array<{
23
+ corner: ResizeHandleCorner;
24
+ x: number;
25
+ y: number;
26
+ }>;
27
+ rotationHandle: Point;
28
+ onResizeHandleMouseDown: (corner: ResizeHandleCorner, event: ReactMouseEvent<HTMLButtonElement>) => void;
29
+ onRotateHandleMouseDown: (event: ReactMouseEvent<HTMLButtonElement>) => void;
30
+ }
31
+ declare function BlockManipulationOverlay({ selectionBounds: _selectionBounds, snapGuides, resizeHandles, rotationHandle, onResizeHandleMouseDown, onRotateHandleMouseDown, }: BlockManipulationOverlayProps): import("react/jsx-runtime").JSX.Element;
32
+ export { BlockManipulationOverlay };
@@ -0,0 +1,10 @@
1
+ interface ColorPickerProps {
2
+ ariaLabelPrefix?: string;
3
+ value: string;
4
+ includeGradients?: boolean;
5
+ includeOpacity?: boolean;
6
+ onChange: (value: string) => void;
7
+ onCommit?: () => void;
8
+ }
9
+ declare function ColorPicker({ ariaLabelPrefix, value, includeGradients, includeOpacity, onChange, onCommit, }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
10
+ export { ColorPicker };
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from "react";
2
+ import type { SelectionCommandAvailability } from "./floating-toolbar";
3
+ interface SelectionContextMenuProps {
4
+ children: ReactNode;
5
+ selectionCommandAvailability: SelectionCommandAvailability;
6
+ onAlignToSlide: (action: string) => void;
7
+ onDelete: () => void;
8
+ onDistribute: (action: string) => void;
9
+ onDuplicate: () => void;
10
+ onGroup: () => void;
11
+ onLayerOrder: (action: string) => void;
12
+ onUngroup: () => void;
13
+ }
14
+ interface SelectionContextMenuContentProps {
15
+ selectionCommandAvailability: SelectionCommandAvailability;
16
+ onAlignToSlide: (action: string) => void;
17
+ onDelete: () => void;
18
+ onDistribute: (action: string) => void;
19
+ onDuplicate: () => void;
20
+ onGroup: () => void;
21
+ onLayerOrder: (action: string) => void;
22
+ onUngroup: () => void;
23
+ }
24
+ declare function SelectionContextMenu({ children, selectionCommandAvailability, onAlignToSlide, onDelete, onDistribute, onDuplicate, onGroup, onLayerOrder, onUngroup, }: SelectionContextMenuProps): import("react/jsx-runtime").JSX.Element;
25
+ declare function SelectionContextMenuContent({ selectionCommandAvailability, onAlignToSlide, onDelete, onDistribute, onDuplicate, onGroup, onLayerOrder, onUngroup, }: SelectionContextMenuContentProps): import("react/jsx-runtime").JSX.Element;
26
+ export { SelectionContextMenu, SelectionContextMenuContent };
@@ -0,0 +1,18 @@
1
+ import type { PdfExportSelection } from "../../core";
2
+ export interface PdfExportSlideOption {
3
+ id: string;
4
+ title: string;
5
+ file?: string;
6
+ }
7
+ interface EditorHeaderProps {
8
+ title: string;
9
+ onTitleChange?: (t: string) => void;
10
+ onPresent?: () => void;
11
+ onExportPdf?: (selection: PdfExportSelection) => void;
12
+ onExportHtml?: () => void;
13
+ pdfSlides?: PdfExportSlideOption[];
14
+ pdfThumbnails?: Record<string, string>;
15
+ isSaving: boolean;
16
+ }
17
+ export declare function EditorHeader({ title, onTitleChange, onPresent, onExportPdf, onExportHtml, pdfSlides, pdfThumbnails, isSaving, }: EditorHeaderProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { ElementToolFeature } from "../lib/element-tool-model";
2
+ export declare function renderFloatingToolbarFeature({ currentValue, feature, onClosePanel, onCommitFeature, operationAvailability, }: {
3
+ currentValue: string;
4
+ feature: ElementToolFeature;
5
+ onClosePanel: () => void;
6
+ onCommitFeature: (feature: ElementToolFeature, nextValue: string) => void;
7
+ operationAvailability?: Partial<Record<ElementToolFeature["id"], boolean>>;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ import type { MouseEvent as ReactMouseEvent, ReactNode } from "react";
3
+ import type { ElementToolSubgroup } from "../lib/element-tool-model";
4
+ export declare function ToolbarTrigger({ children, active, className, label, onClick, }: {
5
+ children: ReactNode;
6
+ active?: boolean;
7
+ className?: string;
8
+ label: string;
9
+ onClick: (event: ReactMouseEvent<HTMLButtonElement>) => void;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function IconButton({ children, active, className, label, onClick, }: {
12
+ children: ReactNode;
13
+ active?: boolean;
14
+ className?: string;
15
+ label: string;
16
+ onClick?: () => void;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ToolbarPanel({ children, left, width, }: {
19
+ children: ReactNode;
20
+ left: number;
21
+ width?: "default" | "medium" | "wide";
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export declare function getPanelWidth(subgroup: ElementToolSubgroup): "default" | "medium" | "wide";
24
+ export declare function shouldUpdateOffset(current: number, next: number): boolean;
25
+ export declare function Divider(): import("react/jsx-runtime").JSX.Element;
26
+ export declare function PanelTitle({ children }: {
27
+ children: ReactNode;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ export declare function FieldLabel({ children, htmlFor }: {
30
+ children: ReactNode;
31
+ htmlFor?: string;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ export declare function ToolbarIcon({ icon: Icon }: {
34
+ icon: LucideIcon;
35
+ }): import("react/jsx-runtime").JSX.Element;
36
+ export declare function ToolbarValueButton({ children, label, onClick, }: {
37
+ children: ReactNode;
38
+ label: string;
39
+ onClick: (event: ReactMouseEvent<HTMLButtonElement>) => void;
40
+ }): import("react/jsx-runtime").JSX.Element;
41
+ export declare function ToolbarOption({ children, disabled, onClick, title, }: {
42
+ children: ReactNode;
43
+ disabled?: boolean;
44
+ onClick: () => void;
45
+ title?: string;
46
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { EditableType } from "../../core";
2
+ import type { CssPropertyRow } from "../lib/collect-css-properties";
3
+ interface FloatingToolbarProps {
4
+ inspectedStyles: CssPropertyRow[];
5
+ selectedElementType: EditableType | "multi";
6
+ selectionCommandAvailability: SelectionCommandAvailability;
7
+ attributeValues: AttributeValues;
8
+ onStyleChange: (propertyName: string, nextValue: string) => void;
9
+ onAttributeChange: (attributeName: string, nextValue: string) => void;
10
+ onAlignToSlide: (action: string) => void;
11
+ onDistribute: (action: string) => void;
12
+ onGroup: () => void;
13
+ onLayerOrder: (action: string) => void;
14
+ onUngroup: () => void;
15
+ }
16
+ interface AttributeValues {
17
+ locked: string;
18
+ altText: string;
19
+ ariaLabel: string;
20
+ linkUrl: string;
21
+ }
22
+ export interface SelectionCommandAvailability {
23
+ group: boolean;
24
+ ungroup: boolean;
25
+ }
26
+ declare function FloatingToolbar({ inspectedStyles, selectedElementType, selectionCommandAvailability, attributeValues, onStyleChange, onAttributeChange, onAlignToSlide, onDistribute, onGroup, onLayerOrder, onUngroup, }: FloatingToolbarProps): import("react/jsx-runtime").JSX.Element;
27
+ export { FloatingToolbar };