@vishu1301/script-writing 1.4.2 → 1.4.4
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.cjs +335 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +336 -126
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -26,6 +26,8 @@ interface UseScreenplayEditorOptions {
|
|
|
26
26
|
initialUrl?: string;
|
|
27
27
|
fetchOptions?: RequestInit;
|
|
28
28
|
onSave?: (content?: Blob) => void;
|
|
29
|
+
onSyncWithCloud?: (blocks: Block[], sceneNumbers: Record<string, string>) => void;
|
|
30
|
+
enhanceContentUrl?: string | URL | Request;
|
|
29
31
|
}
|
|
30
32
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
31
33
|
blocks: Block[];
|
|
@@ -37,6 +39,7 @@ declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
|
37
39
|
locations: string[];
|
|
38
40
|
characters: string[];
|
|
39
41
|
sceneNumbers: Record<string, string>;
|
|
42
|
+
isLoading: boolean;
|
|
40
43
|
handleBlockTextChange: (id: string, text: string) => void;
|
|
41
44
|
handleSceneTypeChange: (id: string, sceneType: "INT." | "EXT." | "INT/EXT.") => void;
|
|
42
45
|
handleTimeOfDayChange: (id: string, time: TimeOfDay) => void;
|
|
@@ -47,6 +50,16 @@ declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
|
47
50
|
handleSceneNumberChange: (id: string, newNumber: string) => void;
|
|
48
51
|
handleFocus: (id: string) => void;
|
|
49
52
|
handleBlur: (id: string) => void;
|
|
53
|
+
handleEnhance: (block: Block) => Promise<void>;
|
|
54
|
+
handleApproveEnhance: () => void;
|
|
55
|
+
handleRejectEnhance: () => void;
|
|
56
|
+
enhancingBlockId: string | null;
|
|
57
|
+
enhancementSuggestion: string | null;
|
|
58
|
+
isEnhancing: boolean;
|
|
59
|
+
hasUnsavedChanges: boolean;
|
|
60
|
+
showUnsavedPopover: boolean;
|
|
61
|
+
syncScreenplay: () => void;
|
|
62
|
+
ignoreChanges: () => void;
|
|
50
63
|
loadFromUrl: (url: string, fetchOptions?: RequestInit, isInitialLoad?: boolean) => Promise<void>;
|
|
51
64
|
};
|
|
52
65
|
|
|
@@ -61,8 +74,14 @@ type ScreenplayEditorViewProps = ReturnType<typeof useScreenplayEditor> & {
|
|
|
61
74
|
onSaveAsSbx?: () => void;
|
|
62
75
|
onSyncWithCloud?: () => void;
|
|
63
76
|
handleSceneNumberChange: (blockId: string, value: string) => void;
|
|
77
|
+
handleEnhance: (block: Block) => void;
|
|
78
|
+
handleApproveEnhance: () => void;
|
|
79
|
+
handleRejectEnhance: () => void;
|
|
80
|
+
enhancingBlockId: string | null;
|
|
81
|
+
enhancementSuggestion: string | null;
|
|
82
|
+
isEnhancing: boolean;
|
|
64
83
|
};
|
|
65
|
-
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, showPdfImport, showSaveButton, showSyncButton, isLocked, onToggleLock, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf,
|
|
84
|
+
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, showPdfImport, showSaveButton, showSyncButton, isLocked, onToggleLock, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf, onSyncWithCloud, handleSceneNumberChange, handleEnhance, handleApproveEnhance, handleRejectEnhance, enhancingBlockId, enhancementSuggestion, isEnhancing, showUnsavedPopover, syncScreenplay, ignoreChanges, isLoading, }: ScreenplayEditorViewProps): react_jsx_runtime.JSX.Element;
|
|
66
85
|
|
|
67
86
|
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>, project_name?: string) => void;
|
|
68
87
|
declare const convertBlocksToSbx: (blocks: Block[], sceneNumbers: Record<string, string>) => string;
|
|
@@ -234,7 +253,7 @@ interface UseShotBreakdownOptions {
|
|
|
234
253
|
fetchOptions?: RequestInit;
|
|
235
254
|
onAISummarize?: (scene: any) => void;
|
|
236
255
|
onShotAdded?: (shot: Shot) => any;
|
|
237
|
-
onShotsBulkAdded?: (shots: Shot[],
|
|
256
|
+
onShotsBulkAdded?: (shots: Shot[], scene_type: string) => Promise<void>;
|
|
238
257
|
onShotRemoved?: (shotId: string) => any;
|
|
239
258
|
onShotUpdated?: (shotId: string, detail: Shot) => any;
|
|
240
259
|
onProductionInitialized?: (cameras: Camera[], type: string) => any;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ interface UseScreenplayEditorOptions {
|
|
|
26
26
|
initialUrl?: string;
|
|
27
27
|
fetchOptions?: RequestInit;
|
|
28
28
|
onSave?: (content?: Blob) => void;
|
|
29
|
+
onSyncWithCloud?: (blocks: Block[], sceneNumbers: Record<string, string>) => void;
|
|
30
|
+
enhanceContentUrl?: string | URL | Request;
|
|
29
31
|
}
|
|
30
32
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
31
33
|
blocks: Block[];
|
|
@@ -37,6 +39,7 @@ declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
|
37
39
|
locations: string[];
|
|
38
40
|
characters: string[];
|
|
39
41
|
sceneNumbers: Record<string, string>;
|
|
42
|
+
isLoading: boolean;
|
|
40
43
|
handleBlockTextChange: (id: string, text: string) => void;
|
|
41
44
|
handleSceneTypeChange: (id: string, sceneType: "INT." | "EXT." | "INT/EXT.") => void;
|
|
42
45
|
handleTimeOfDayChange: (id: string, time: TimeOfDay) => void;
|
|
@@ -47,6 +50,16 @@ declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
|
47
50
|
handleSceneNumberChange: (id: string, newNumber: string) => void;
|
|
48
51
|
handleFocus: (id: string) => void;
|
|
49
52
|
handleBlur: (id: string) => void;
|
|
53
|
+
handleEnhance: (block: Block) => Promise<void>;
|
|
54
|
+
handleApproveEnhance: () => void;
|
|
55
|
+
handleRejectEnhance: () => void;
|
|
56
|
+
enhancingBlockId: string | null;
|
|
57
|
+
enhancementSuggestion: string | null;
|
|
58
|
+
isEnhancing: boolean;
|
|
59
|
+
hasUnsavedChanges: boolean;
|
|
60
|
+
showUnsavedPopover: boolean;
|
|
61
|
+
syncScreenplay: () => void;
|
|
62
|
+
ignoreChanges: () => void;
|
|
50
63
|
loadFromUrl: (url: string, fetchOptions?: RequestInit, isInitialLoad?: boolean) => Promise<void>;
|
|
51
64
|
};
|
|
52
65
|
|
|
@@ -61,8 +74,14 @@ type ScreenplayEditorViewProps = ReturnType<typeof useScreenplayEditor> & {
|
|
|
61
74
|
onSaveAsSbx?: () => void;
|
|
62
75
|
onSyncWithCloud?: () => void;
|
|
63
76
|
handleSceneNumberChange: (blockId: string, value: string) => void;
|
|
77
|
+
handleEnhance: (block: Block) => void;
|
|
78
|
+
handleApproveEnhance: () => void;
|
|
79
|
+
handleRejectEnhance: () => void;
|
|
80
|
+
enhancingBlockId: string | null;
|
|
81
|
+
enhancementSuggestion: string | null;
|
|
82
|
+
isEnhancing: boolean;
|
|
64
83
|
};
|
|
65
|
-
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, showPdfImport, showSaveButton, showSyncButton, isLocked, onToggleLock, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf,
|
|
84
|
+
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, showPdfImport, showSaveButton, showSyncButton, isLocked, onToggleLock, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf, onSyncWithCloud, handleSceneNumberChange, handleEnhance, handleApproveEnhance, handleRejectEnhance, enhancingBlockId, enhancementSuggestion, isEnhancing, showUnsavedPopover, syncScreenplay, ignoreChanges, isLoading, }: ScreenplayEditorViewProps): react_jsx_runtime.JSX.Element;
|
|
66
85
|
|
|
67
86
|
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>, project_name?: string) => void;
|
|
68
87
|
declare const convertBlocksToSbx: (blocks: Block[], sceneNumbers: Record<string, string>) => string;
|
|
@@ -234,7 +253,7 @@ interface UseShotBreakdownOptions {
|
|
|
234
253
|
fetchOptions?: RequestInit;
|
|
235
254
|
onAISummarize?: (scene: any) => void;
|
|
236
255
|
onShotAdded?: (shot: Shot) => any;
|
|
237
|
-
onShotsBulkAdded?: (shots: Shot[],
|
|
256
|
+
onShotsBulkAdded?: (shots: Shot[], scene_type: string) => Promise<void>;
|
|
238
257
|
onShotRemoved?: (shotId: string) => any;
|
|
239
258
|
onShotUpdated?: (shotId: string, detail: Shot) => any;
|
|
240
259
|
onProductionInitialized?: (cameras: Camera[], type: string) => any;
|