@turnix-co/konva-editor 2.0.44 → 2.0.45
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/index.d.ts +2 -27
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -846,12 +846,10 @@ type PreparedPhotoFrameElement = Omit<PhotoFrameElement, 'capturedImageUrl' | 'a
|
|
|
846
846
|
/**
|
|
847
847
|
* Prepared slide data ready for publishing with buffers
|
|
848
848
|
*/
|
|
849
|
-
type PreparedSlide = Omit<Slide, 'images' | 'videos' | 'photoFrames'
|
|
849
|
+
type PreparedSlide = Omit<Slide, 'images' | 'videos' | 'photoFrames'> & {
|
|
850
850
|
images: PreparedImageElement[];
|
|
851
851
|
videos: PreparedVideoElement[];
|
|
852
852
|
photoFrames: PreparedPhotoFrameElement[];
|
|
853
|
-
thumbnailBuffer?: ArrayBuffer;
|
|
854
|
-
thumbnailMimeType?: string;
|
|
855
853
|
};
|
|
856
854
|
/**
|
|
857
855
|
* Result of preparing slides for publishing
|
|
@@ -868,8 +866,6 @@ declare const prepareSlidesForPublishing: (slides: Slide[], options?: {
|
|
|
868
866
|
maxImageWidth?: number;
|
|
869
867
|
maxImageHeight?: number;
|
|
870
868
|
imageQuality?: number;
|
|
871
|
-
/** Map of slideId to full-size thumbnail data URL for publishing */
|
|
872
|
-
fullSizeThumbnails?: Map<string, string>;
|
|
873
869
|
}) => Promise<PublishPayload>;
|
|
874
870
|
/**
|
|
875
871
|
* Convert ArrayBuffer to Base64 string (for JSON transmission)
|
|
@@ -880,27 +876,6 @@ declare const arrayBufferToBase64: (buffer: ArrayBuffer) => string;
|
|
|
880
876
|
* This is more efficient than base64 encoding
|
|
881
877
|
*/
|
|
882
878
|
declare const prepareFormData: (payload: PublishPayload) => FormData;
|
|
883
|
-
/**
|
|
884
|
-
* Generate a full-size thumbnail from a Konva stage
|
|
885
|
-
* Use this to create thumbnails at full resolution for publishing
|
|
886
|
-
* @param stageRef Reference to the Konva stage
|
|
887
|
-
* @param options Options for thumbnail generation
|
|
888
|
-
* @returns Data URL of the full-size thumbnail
|
|
889
|
-
*/
|
|
890
|
-
declare const generateFullSizeThumbnail: (stageRef: React$1.RefObject<Konva.Stage | null>, options?: {
|
|
891
|
-
pixelRatio?: number;
|
|
892
|
-
mimeType?: "image/jpeg" | "image/png";
|
|
893
|
-
quality?: number;
|
|
894
|
-
}) => string | null;
|
|
895
|
-
/**
|
|
896
|
-
* Generate full-size thumbnails for all slides
|
|
897
|
-
* This should be called before publishing to create high-resolution thumbnails
|
|
898
|
-
* @param slides Array of slides
|
|
899
|
-
* @param stageRef Reference to the Konva stage
|
|
900
|
-
* @param switchToSlide Function to switch to a specific slide and wait for render
|
|
901
|
-
* @returns Map of slideId to full-size thumbnail data URL
|
|
902
|
-
*/
|
|
903
|
-
declare const generateAllFullSizeThumbnails: (slides: Slide[], stageRef: React$1.RefObject<Konva.Stage | null>, switchToSlide: (slideId: string) => Promise<void>) => Promise<Map<string, string>>;
|
|
904
879
|
|
|
905
880
|
declare const useDispatch: () => redux_thunk.ThunkDispatch<{
|
|
906
881
|
toolbar: ToolbarState;
|
|
@@ -919,4 +894,4 @@ declare const useSelector: <T>(selector: (state: RootState) => T) => T;
|
|
|
919
894
|
|
|
920
895
|
declare const useSlidesPersistence: () => void;
|
|
921
896
|
|
|
922
|
-
export { type ActionType, type ActivityType, type AppDispatch, BASIC_EDITOR_TOOLBAR_CONFIG, BottomToolbar, type BottomToolbarProps, Canvas, type CanvasProps, type ContextMenuConfig, DEFAULT_CONTEXT_MENU_CONFIG, DEFAULT_TOOLBAR_CONFIG, EditorRoot, type EditorRootProps, type ExportOptions, type FillInTheBlanks, type FlashcardElement, type ImageElement, type Line$1 as Line, type LongAnswer, type MediaType, type MultipleChoice, type PhotoFrameElement, type PreparedImageElement, type PreparedPhotoFrameElement, type PreparedSlide, type PreparedVideoElement, PublishButton, type PublishButtonProps, type PublishPayload, type PublishProgress, type PublishResponse, type RootState, ScreenRecorder, type Shape, type ShapeType, type ShortAnswer, type Slide, SlideNavigation, type TextElement, type ToolType, Toolbar, type ToolbarActionsConfig, type ToolbarConfig, type ToolbarProps, type ToolbarToolsConfig, TopNavBar, type TopNavBarProps, type TrueFalse, VIEWER_TOOLBAR_CONFIG, type VideoElement, addFillInTheBlanks, addFlashcard, addImage, addImageAnnotation, addLine, addLongAnswer, addMultipleChoice, addPhotoFrame, addPhotoFrameAnnotation, addShape, addShortAnswer, addSlide, addText, addTrueFalse, addVideo, arrayBufferToBase64, bringToFront, clearCanvas, clearImageAnnotations, clearPhotoFrameAnnotations, deleteFillInTheBlanks, deleteFlashcard, deleteImage, deleteLineById, deleteLongAnswer, deleteMultipleChoice, deletePhotoFrame, deleteShape, deleteShortAnswer, deleteSlide, deleteText, deleteTrueFalse, deleteVideo, duplicateFillInTheBlanks, duplicateFlashcard, duplicateImage, duplicateLine, duplicateLongAnswer, duplicateMultipleChoice, duplicatePhotoFrame, duplicateShape, duplicateShortAnswer, duplicateSlide, duplicateText, duplicateTrueFalse, duplicateVideo, editFlashcard, editMultipleChoice, exportSlideAsBlob, exportSlideAsImage, finalizeDrawing,
|
|
897
|
+
export { type ActionType, type ActivityType, type AppDispatch, BASIC_EDITOR_TOOLBAR_CONFIG, BottomToolbar, type BottomToolbarProps, Canvas, type CanvasProps, type ContextMenuConfig, DEFAULT_CONTEXT_MENU_CONFIG, DEFAULT_TOOLBAR_CONFIG, EditorRoot, type EditorRootProps, type ExportOptions, type FillInTheBlanks, type FlashcardElement, type ImageElement, type Line$1 as Line, type LongAnswer, type MediaType, type MultipleChoice, type PhotoFrameElement, type PreparedImageElement, type PreparedPhotoFrameElement, type PreparedSlide, type PreparedVideoElement, PublishButton, type PublishButtonProps, type PublishPayload, type PublishProgress, type PublishResponse, type RootState, ScreenRecorder, type Shape, type ShapeType, type ShortAnswer, type Slide, SlideNavigation, type TextElement, type ToolType, Toolbar, type ToolbarActionsConfig, type ToolbarConfig, type ToolbarProps, type ToolbarToolsConfig, TopNavBar, type TopNavBarProps, type TrueFalse, VIEWER_TOOLBAR_CONFIG, type VideoElement, addFillInTheBlanks, addFlashcard, addImage, addImageAnnotation, addLine, addLongAnswer, addMultipleChoice, addPhotoFrame, addPhotoFrameAnnotation, addShape, addShortAnswer, addSlide, addText, addTrueFalse, addVideo, arrayBufferToBase64, bringToFront, clearCanvas, clearImageAnnotations, clearPhotoFrameAnnotations, deleteFillInTheBlanks, deleteFlashcard, deleteImage, deleteLineById, deleteLongAnswer, deleteMultipleChoice, deletePhotoFrame, deleteShape, deleteShortAnswer, deleteSlide, deleteText, deleteTrueFalse, deleteVideo, duplicateFillInTheBlanks, duplicateFlashcard, duplicateImage, duplicateLine, duplicateLongAnswer, duplicateMultipleChoice, duplicatePhotoFrame, duplicateShape, duplicateShortAnswer, duplicateSlide, duplicateText, duplicateTrueFalse, duplicateVideo, editFlashcard, editMultipleChoice, exportSlideAsBlob, exportSlideAsImage, finalizeDrawing, getCompressionStats, getSlideDataURL, loadSlides, mergeToolbarConfig, nextFlashcard, prepareFormData, prepareSlidesForPublishing, previousFlashcard, redo, removeLine, reorderSlides, saveToHistory, selectAllSlides, selectCanAddSlide, selectCurrentSlide, selectCurrentSlideId, selectSlideById, sendToBack, setActivityType, setAltText, setAudioData, setBackgroundColor, setCurrentSlide, setEditingActivity, setEditingTextId, setLines, setLink, setPenColor, setShowFlashcardForm, setShowMcqForm, setSketchMode, setStrokeWidth, setTool, simplifyFlatPoints, simplifyLine, simplifyLines, store, toggleImageDrawingMode, toggleLock, togglePhotoFrameDrawingMode, toggleSketchMode, toggleVideoPlaying, undo, updateElementOrder, updateFillInTheBlanks, updateFlashcard, updateImage, updateImageAnnotation, updateLastLine, updateLinePosition, updateLineTransform, updateLongAnswer, updateMultipleChoice, updatePhotoFrame, updatePhotoFrameAnnotation, updateShape, updateShortAnswer, updateSlideThumbnail, updateText, updateTrueFalse, updateVideo, useDispatch, useSelector, useSlidesPersistence };
|