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,8 @@
1
+ export declare const SNAP_THRESHOLD_PX = 18;
2
+ export declare const SPACING_SNAP_DISTANCE_BONUS_PX = 6;
3
+ export declare const SNAP_GUIDE_EXTENSION_PX = 24;
4
+ export declare const SNAP_GUIDE_COLOR = "#ef4444";
5
+ export declare const SPACING_ALIGNMENT_TOLERANCE_PX = 40;
6
+ export declare const MIN_SPACING_TARGET_GAP_PX = 12;
7
+ export declare const MAX_SPACING_TARGET_GAP_PX = 360;
8
+ export declare function rangesOverlapOrNear(startA: number, endA: number, startB: number, endB: number, proximity: number): boolean;
@@ -0,0 +1,6 @@
1
+ import type { StageRect } from "../../core";
2
+ import type { SnapCandidate, SnapGuide } from "./block-snap-types";
3
+ export declare function buildSnapGuides(rect: StageRect, snap: {
4
+ vertical: SnapCandidate | null;
5
+ horizontal: SnapCandidate | null;
6
+ }): SnapGuide[];
@@ -0,0 +1,13 @@
1
+ import type { SlideModel, StageGeometry, StageRect } from "../../core";
2
+ import type { SnapTarget } from "./block-snap-types";
3
+ export declare function collectSnapTargets({ activeSlide, doc, rootRect, selectedElementId, slideStageRect, stageGeometry, }: {
4
+ activeSlide: SlideModel;
5
+ doc: Document;
6
+ rootRect: DOMRect;
7
+ selectedElementId: string;
8
+ slideStageRect: StageRect;
9
+ stageGeometry: StageGeometry;
10
+ }): {
11
+ vertical: SnapTarget[];
12
+ horizontal: SnapTarget[];
13
+ };
@@ -0,0 +1,30 @@
1
+ import type { StageRect } from "../../core";
2
+ export interface SnapGuide {
3
+ orientation: "vertical" | "horizontal";
4
+ start: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ end: {
9
+ x: number;
10
+ y: number;
11
+ };
12
+ variant: "alignment" | "spacing";
13
+ }
14
+ export interface SnapTarget {
15
+ position: number;
16
+ rect: StageRect;
17
+ kind: "slide" | "element" | "spacing";
18
+ role: "start" | "center" | "end";
19
+ anchor: SnapCandidate["anchor"] | null;
20
+ priority: number;
21
+ spacingPriority?: number;
22
+ elementId: string | null;
23
+ relatedRects: StageRect[];
24
+ }
25
+ export interface SnapCandidate {
26
+ anchor: "start" | "center" | "end";
27
+ delta: number;
28
+ target: SnapTarget;
29
+ }
30
+ export type ResizeHandleCorner = "top-left" | "top-right" | "bottom-right" | "bottom-left";
@@ -0,0 +1,17 @@
1
+ import type { StageRect } from "../../core";
2
+ export { collectSnapTargets } from "./block-snap-targets";
3
+ import type { ResizeHandleCorner, SnapGuide, SnapTarget } from "./block-snap-types";
4
+ export declare function snapStageRect(rect: StageRect, targets: {
5
+ vertical: SnapTarget[];
6
+ horizontal: SnapTarget[];
7
+ }): {
8
+ rect: StageRect;
9
+ guides: SnapGuide[];
10
+ };
11
+ export declare function snapResizeRect(rect: StageRect, resizeCorner: ResizeHandleCorner, targets: {
12
+ vertical: SnapTarget[];
13
+ horizontal: SnapTarget[];
14
+ }): {
15
+ rect: StageRect;
16
+ guides: SnapGuide[];
17
+ };
@@ -0,0 +1,5 @@
1
+ export interface CssPropertyRow {
2
+ name: string;
3
+ value: string;
4
+ }
5
+ export declare function collectCssProperties(element: HTMLElement): CssPropertyRow[];
@@ -0,0 +1,18 @@
1
+ import type { CssPropertyRow } from "./collect-css-properties";
2
+ import type { ElementToolFeature } from "./element-tool-model";
3
+ export interface ElementToolAttributeValues {
4
+ locked: string;
5
+ altText: string;
6
+ ariaLabel: string;
7
+ linkUrl: string;
8
+ }
9
+ export declare function commitElementToolFeature({ attributeValues, feature, inspectedStyles, nextValue, onAlignToSlide, onAttributeChange, onLayerOrder, onStyleChange, }: {
10
+ attributeValues: ElementToolAttributeValues;
11
+ feature: ElementToolFeature;
12
+ inspectedStyles: CssPropertyRow[];
13
+ nextValue: string;
14
+ onStyleChange: (propertyName: string, nextValue: string) => void;
15
+ onAttributeChange: (attributeName: string, nextValue: string) => void;
16
+ onAlignToSlide: (action: string) => void;
17
+ onLayerOrder: (action: string) => void;
18
+ }): void;
@@ -0,0 +1,16 @@
1
+ import type { ElementToolFeatureId, ElementToolGroup, ElementToolOption } from "./element-tool-types";
2
+ export type { ElementToolControlType, ElementToolFeature, ElementToolFeatureId, ElementToolGroup, ElementToolOption, ElementToolSubgroup, } from "./element-tool-types";
3
+ export declare const TEXT_ALIGN_OPTIONS: ElementToolOption[];
4
+ export declare const ALIGN_TO_SLIDE_OPTIONS: ElementToolOption[];
5
+ export declare const LAYER_ORDER_OPTIONS: ElementToolOption[];
6
+ export declare const DISTRIBUTE_OPTIONS: ElementToolOption[];
7
+ export declare const FONT_SIZE_TOOL_OPTIONS: ElementToolOption[];
8
+ export declare const LINE_HEIGHT_OPTIONS: ElementToolOption[];
9
+ export declare const SIZE_PRESET_OPTIONS: ElementToolOption[];
10
+ export declare const OPACITY_OPTIONS: ElementToolOption[];
11
+ export declare const ROTATION_OPTIONS: ElementToolOption[];
12
+ export declare const BORDER_STYLE_OPTIONS: ElementToolOption[];
13
+ export declare const BORDER_RADIUS_OPTIONS: ElementToolOption[];
14
+ export declare const SHADOW_OPTIONS: ElementToolOption[];
15
+ export declare const ELEMENT_TOOL_GROUPS: ElementToolGroup[];
16
+ export declare function getElementToolFeature(featureId: ElementToolFeatureId): import("./element-tool-types").ElementToolFeature | null;
@@ -0,0 +1,35 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ export type ElementToolFeatureId = "font-family" | "font-size" | "font-bold" | "font-italic" | "font-underline" | "font-strikethrough" | "line-height" | "text-align" | "text-color" | "background-color" | "border" | "border-radius" | "box-shadow" | "width" | "height" | "opacity" | "rotation" | "align-to-slide" | "distribute" | "layer-order" | "group" | "ungroup" | "locked" | "link-url" | "alt-text" | "aria-label" | "custom-css" | "other-tools" | "other-link" | "other-alt-text" | "other-aria-label";
3
+ export type ElementToolControlType = "select" | "number" | "toggle" | "color" | "text" | "slider" | "action-group" | "custom-css";
4
+ export interface ElementToolOption {
5
+ label: string;
6
+ value: string;
7
+ icon?: LucideIcon;
8
+ description?: string;
9
+ }
10
+ export interface ElementToolFeature {
11
+ id: ElementToolFeatureId;
12
+ label: string;
13
+ controlType: ElementToolControlType;
14
+ target: "style" | "attribute" | "operation";
15
+ propertyName?: string;
16
+ attributeName?: string;
17
+ options?: ElementToolOption[];
18
+ min?: number;
19
+ max?: number;
20
+ step?: number;
21
+ unit?: string;
22
+ placeholder?: string;
23
+ }
24
+ export interface ElementToolSubgroup {
25
+ id: string;
26
+ label: string;
27
+ icon: LucideIcon;
28
+ features: ElementToolFeature[];
29
+ }
30
+ export interface ElementToolGroup {
31
+ id: string;
32
+ label: string;
33
+ icon: LucideIcon;
34
+ subgroups: ElementToolSubgroup[];
35
+ }
@@ -0,0 +1,23 @@
1
+ import type { CssPropertyRow } from "./collect-css-properties";
2
+ import type { ElementToolFeature, ElementToolOption } from "./element-tool-model";
3
+ interface ElementToolValueOptions {
4
+ feature: ElementToolFeature;
5
+ inspectedStyles: CssPropertyRow[];
6
+ attributeValues: {
7
+ locked: string;
8
+ altText: string;
9
+ ariaLabel: string;
10
+ linkUrl: string;
11
+ };
12
+ }
13
+ export declare function getElementToolValue({ feature, inspectedStyles, attributeValues, }: ElementToolValueOptions): string;
14
+ export declare function normalizeFeatureCommitValue(feature: ElementToolFeature, nextValue: string): string;
15
+ export declare function getSteppedFeatureValue({ currentValue, feature, direction, }: {
16
+ currentValue: string;
17
+ feature: ElementToolFeature;
18
+ direction: "decrease" | "increase";
19
+ }): string;
20
+ export declare function getTextDecorationCommitValue(currentValue: string, line: "underline" | "line-through", active: boolean): string;
21
+ export declare function isFeatureActive(feature: ElementToolFeature, currentValue: string): boolean;
22
+ export declare function getFeatureOptions(feature: ElementToolFeature, currentValue: string): ElementToolOption[];
23
+ export {};
@@ -0,0 +1,8 @@
1
+ declare const EDITOR_MOTION_MS = 200;
2
+ declare const editorMotionClassName = "motion-safe:duration-200 motion-safe:ease-out";
3
+ declare const editorMotionFastClassName = "motion-safe:duration-150 motion-safe:ease-out";
4
+ declare const editorMotionTransitionClassName = "motion-safe:transition-[flex-basis,width,max-width,opacity] motion-safe:duration-200 motion-safe:ease-out motion-reduce:transition-none";
5
+ declare const editorMotionFastTransitionClassName = "motion-safe:transition-[background-color,border-color,color,box-shadow,gap,opacity,outline-color] motion-safe:duration-150 motion-safe:ease-out motion-reduce:transition-none";
6
+ declare const editorPanelEnterClassName = "motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none";
7
+ declare const editorPanelExitClassName = "motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";
8
+ export { EDITOR_MOTION_MS, editorMotionClassName, editorMotionFastClassName, editorMotionTransitionClassName, editorMotionFastTransitionClassName, editorPanelEnterClassName, editorPanelExitClassName, };
@@ -0,0 +1,4 @@
1
+ import type { StageRect } from "../../core";
2
+ export declare const SELECTION_OVERLAY_PADDING_X = 8;
3
+ export declare const SELECTION_OVERLAY_PADDING_Y = 14;
4
+ export declare function expandSelectionOverlay(stageRect: StageRect): StageRect;
@@ -0,0 +1,17 @@
1
+ import type { CssPropertyRow } from "./collect-css-properties";
2
+ export type TextAlign = "left" | "center" | "right";
3
+ export interface FontFamilyOption {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export declare const FONT_FAMILY_OPTIONS: FontFamilyOption[];
8
+ export declare const FONT_SIZE_OPTIONS: number[];
9
+ export declare function getStyleValue(styles: CssPropertyRow[], propertyName: string): string;
10
+ export declare function parsePixelValue(value: string, fallback: number): number;
11
+ export declare function roundCssPixel(value: number): string;
12
+ export declare function getFontFamilyLabel(value: string): string;
13
+ export declare function isFontFamilySelected(currentValue: string, optionValue: string): boolean;
14
+ export declare function isBoldFontWeight(value: string): boolean;
15
+ export declare function parseTextDecorationLines(value: string): Set<string>;
16
+ export declare function getColorInputValue(value: string): string;
17
+ export declare function isHexColor(value: string): boolean;
@@ -0,0 +1,2 @@
1
+ import type { SlideModel } from "../../core";
2
+ export declare function renderSlideThumbnail(slide: SlideModel): Promise<string>;
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from "clsx";
2
+ declare function cn(...inputs: ClassValue[]): string;
3
+ export { cn };
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Starry Slides</title>
7
+ <script type="module" crossorigin src="/assets/index-C1Rjncf1.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-CtfA3BPy.css">
9
+ </head>
10
+ <body>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
@@ -0,0 +1,8 @@
1
+ import type { Plugin } from "vite";
2
+ interface DeckRuntimeMiddlewareOptions {
3
+ runtimeDeckDir: string;
4
+ previewDeckDir: string;
5
+ saveTargetDirs: string[];
6
+ }
7
+ export declare function createDeckRuntimeMiddlewarePlugin({ runtimeDeckDir, previewDeckDir, saveTargetDirs, }: DeckRuntimeMiddlewareOptions): Plugin;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function resolveDeckPath(deckPath: string | undefined): string;
@@ -0,0 +1,16 @@
1
+ export interface HtmlExportResultSlide {
2
+ index: number;
3
+ slideFile: string;
4
+ title?: string;
5
+ }
6
+ export interface HtmlExportResult {
7
+ deck: string;
8
+ mode: "all";
9
+ outFile: string;
10
+ path: string;
11
+ slides: HtmlExportResultSlide[];
12
+ }
13
+ export declare function exportHtml({ deckPath, outFile, }: {
14
+ deckPath: string;
15
+ outFile: string;
16
+ }): Promise<HtmlExportResult>;
@@ -0,0 +1 @@
1
+ export declare function openBrowser(url: string): void;
@@ -0,0 +1,20 @@
1
+ import { type PdfExportSelection } from "../core";
2
+ export interface PdfExportSlide {
3
+ index: number;
4
+ slideFile: string;
5
+ title?: string;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface PdfExportResult {
10
+ deck: string;
11
+ mode: "all" | "single" | "slides";
12
+ outFile: string;
13
+ path: string;
14
+ slides: PdfExportSlide[];
15
+ }
16
+ export declare function exportPdf({ deckPath, outFile, selection, }: {
17
+ deckPath: string;
18
+ outFile: string;
19
+ selection?: PdfExportSelection;
20
+ }): Promise<PdfExportResult>;
@@ -0,0 +1 @@
1
+ export declare function findAvailablePort(preferredPort?: number): Promise<number>;
@@ -0,0 +1,31 @@
1
+ import { type VerifyIssue } from "../core/verify-deck";
2
+ export interface RenderedSlide {
3
+ index: number;
4
+ file: string;
5
+ title?: string;
6
+ hidden?: boolean;
7
+ filePath: string;
8
+ }
9
+ export interface PreviewRender {
10
+ index: number;
11
+ slideFile: string;
12
+ title?: string;
13
+ file: string;
14
+ path: string;
15
+ width: number;
16
+ height: number;
17
+ scale: 1;
18
+ }
19
+ export interface PreviewManifest {
20
+ deck: string;
21
+ mode: "single" | "all";
22
+ outputDir: string;
23
+ slides: PreviewRender[];
24
+ }
25
+ export declare function getManifestSlides(deckPath: string): RenderedSlide[];
26
+ export declare function verifyRenderedOverflow(deckPath: string): Promise<VerifyIssue[]>;
27
+ export declare function renderPreviewManifest({ deckPath, slideFile, outDir, }: {
28
+ deckPath: string;
29
+ slideFile?: string;
30
+ outDir?: string;
31
+ }): Promise<PreviewManifest>;
@@ -0,0 +1 @@
1
+ export declare function resolveDeckPath(deckPath: string | undefined): string;
@@ -0,0 +1,16 @@
1
+ export interface HtmlExportResultSlide {
2
+ index: number;
3
+ slideFile: string;
4
+ title?: string;
5
+ }
6
+ export interface HtmlExportResult {
7
+ deck: string;
8
+ mode: "all";
9
+ outFile: string;
10
+ path: string;
11
+ slides: HtmlExportResultSlide[];
12
+ }
13
+ export declare function exportHtml({ deckPath, outFile, }: {
14
+ deckPath: string;
15
+ outFile: string;
16
+ }): Promise<HtmlExportResult>;
@@ -0,0 +1 @@
1
+ export declare function openBrowser(url: string): void;
@@ -0,0 +1,20 @@
1
+ import { type PdfExportSelection } from "../core";
2
+ export interface PdfExportSlide {
3
+ index: number;
4
+ slideFile: string;
5
+ title?: string;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface PdfExportResult {
10
+ deck: string;
11
+ mode: "all" | "single" | "slides";
12
+ outFile: string;
13
+ path: string;
14
+ slides: PdfExportSlide[];
15
+ }
16
+ export declare function exportPdf({ deckPath, outFile, selection, }: {
17
+ deckPath: string;
18
+ outFile: string;
19
+ selection?: PdfExportSelection;
20
+ }): Promise<PdfExportResult>;
@@ -0,0 +1 @@
1
+ export declare function findAvailablePort(preferredPort?: number): Promise<number>;
@@ -0,0 +1,31 @@
1
+ import { type VerifyIssue } from "../core/verify-deck";
2
+ export interface RenderedSlide {
3
+ index: number;
4
+ file: string;
5
+ title?: string;
6
+ hidden?: boolean;
7
+ filePath: string;
8
+ }
9
+ export interface PreviewRender {
10
+ index: number;
11
+ slideFile: string;
12
+ title?: string;
13
+ file: string;
14
+ path: string;
15
+ width: number;
16
+ height: number;
17
+ scale: 1;
18
+ }
19
+ export interface PreviewManifest {
20
+ deck: string;
21
+ mode: "single" | "all";
22
+ outputDir: string;
23
+ slides: PreviewRender[];
24
+ }
25
+ export declare function getManifestSlides(deckPath: string): RenderedSlide[];
26
+ export declare function verifyRenderedOverflow(deckPath: string): Promise<VerifyIssue[]>;
27
+ export declare function renderPreviewManifest({ deckPath, slideFile, outDir, }: {
28
+ deckPath: string;
29
+ slideFile?: string;
30
+ outDir?: string;
31
+ }): Promise<PreviewManifest>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ export interface TestDeck {
2
+ root: string;
3
+ cleanup: () => void;
4
+ }
5
+ export declare function createTempDeck(prefix?: string): TestDeck;
6
+ export declare function writeDeck(deck: string, slides: Array<{
7
+ file: string;
8
+ title?: string;
9
+ html?: string;
10
+ }>): void;
11
+ export declare function slideHtml(content?: string, rootStyle?: string): string;
12
+ export declare function slideHtmlWithoutDimensions(content?: string): string;
13
+ export declare function textElement(id: string, text: string, style?: string): string;
14
+ export declare function blockElement(id: string, text: string, style?: string): string;
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "starry-slides",
3
+ "version": "0.1.0",
4
+ "description": "Local-first CLI and browser editor for HTML slide decks.",
5
+ "license": "AGPL-3.0-only",
6
+ "type": "module",
7
+ "packageManager": "pnpm@10.33.2",
8
+ "homepage": "https://github.com/StarryKit/starry-slides#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/StarryKit/starry-slides/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/StarryKit/starry-slides.git"
15
+ },
16
+ "keywords": [
17
+ "slides",
18
+ "presentation",
19
+ "html",
20
+ "cli",
21
+ "editor"
22
+ ],
23
+ "engines": {
24
+ "node": ">=20.11"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "bin": {
32
+ "starry-slides": "dist/cli/index.js"
33
+ },
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/editor/index.d.ts",
37
+ "import": "./dist/editor/index.js"
38
+ }
39
+ },
40
+ "scripts": {
41
+ "dev": "vite",
42
+ "starry-slides": "tsx src/cli/index.ts",
43
+ "build": "pnpm build:types && pnpm build:js && pnpm build:app",
44
+ "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
45
+ "build:js": "tsup src/editor/index.tsx src/cli/index.ts --format esm",
46
+ "build:app": "vite build",
47
+ "editor:e2e:generate-deck": "node e2e/tools/prepare-regression-deck.mjs --app-out-dir sample-slides",
48
+ "prepare:regression-deck": "node e2e/tools/prepare-regression-deck.mjs",
49
+ "starry:contract:create-style-pack": "node skills/starry-slides-skill/tools/contract-protocol/create-style-pack.mjs",
50
+ "starry:contract:validate": "pnpm starry-slides verify",
51
+ "starry:contract:annotate": "node skills/starry-slides-skill/tools/contract-protocol/annotate-slides.mjs",
52
+ "starry:contract:manifest": "node skills/starry-slides-skill/tools/contract-protocol/build-manifest.mjs",
53
+ "starry:open": "pnpm starry-slides open",
54
+ "test:e2e:prepare": "pnpm prepare:regression-deck",
55
+ "lint": "biome check .",
56
+ "lint:fix": "biome check --write .",
57
+ "format": "biome format --write .",
58
+ "test": "vitest run",
59
+ "test:packaged-cli": "vitest run --config vitest.packaged-cli.config.ts",
60
+ "test:e2e:serve": "pnpm test:e2e:prepare && pnpm build && STARRY_SLIDES_DECK_SOURCE=e2e pnpm exec vite preview --host 127.0.0.1 --port 4173 --strictPort",
61
+ "test:e2e": "playwright test",
62
+ "verify": "pnpm lint && pnpm test && pnpm build && pnpm test:packaged-cli && pnpm test:e2e"
63
+ },
64
+ "dependencies": {
65
+ "@playwright/test": "^1.54.2",
66
+ "class-variance-authority": "^0.7.1",
67
+ "clsx": "^2.1.1",
68
+ "html-to-image": "^1.11.11",
69
+ "jsdom": "^26.1.0",
70
+ "lucide-react": "^1.14.0",
71
+ "radix-ui": "^1.4.3",
72
+ "react": "^19.1.0",
73
+ "react-dom": "^19.1.0",
74
+ "sonner": "^2.0.7",
75
+ "tailwind-merge": "^3.5.0",
76
+ "tw-animate-css": "^1.4.0"
77
+ },
78
+ "devDependencies": {
79
+ "@biomejs/biome": "^1.9.4",
80
+ "@tailwindcss/cli": "^4.2.4",
81
+ "@tailwindcss/vite": "^4.2.4",
82
+ "@types/jsdom": "^21.1.7",
83
+ "@types/node": "^24.0.0",
84
+ "@types/react": "^19.1.2",
85
+ "@types/react-dom": "^19.1.2",
86
+ "@vitejs/plugin-react": "^4.4.1",
87
+ "tailwindcss": "^4.2.4",
88
+ "tsup": "^8.5.1",
89
+ "tsx": "^4.20.0",
90
+ "typescript": "^5.8.3",
91
+ "vite": "^6.3.5",
92
+ "vitest": "^3.2.4"
93
+ }
94
+ }