@vishu1301/script-writing 1.0.5 → 1.0.7
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 +449 -258
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +449 -260
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -25,6 +25,7 @@ declare const blockStyles: Record<BlockType, {
|
|
|
25
25
|
interface UseScreenplayEditorOptions {
|
|
26
26
|
initialUrl?: string;
|
|
27
27
|
fetchOptions?: RequestInit;
|
|
28
|
+
onSave?: (content?: string) => void;
|
|
28
29
|
}
|
|
29
30
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
30
31
|
blocks: Block[];
|
|
@@ -58,8 +59,10 @@ type ScreenplayEditorViewProps = ReturnType<typeof useScreenplayEditor> & {
|
|
|
58
59
|
};
|
|
59
60
|
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf, onSaveAsSbx, onSyncWithCloud, handleSceneNumberChange, }: ScreenplayEditorViewProps): react_jsx_runtime.JSX.Element;
|
|
60
61
|
|
|
61
|
-
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string
|
|
62
|
-
declare const
|
|
62
|
+
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>, project_name?: string) => void;
|
|
63
|
+
declare const convertBlocksToSbx: (blocks: Block[], sceneNumbers: Record<string, string>) => string;
|
|
64
|
+
declare const handleSaveAsSbx: (blocks: Block[], sceneNumbers: Record<string, string>, onSaveAsSbx?: (file: File) => void, project_name?: string) => void;
|
|
65
|
+
declare const handleSyncWithCloud: (blocks: Block[], sceneNumbers: Record<string, string>, onSyncWithCloud?: (sbxData: string) => void) => void;
|
|
63
66
|
|
|
64
67
|
interface ScriptBreakdown {
|
|
65
68
|
scene_number: string;
|
|
@@ -81,7 +84,7 @@ declare const CATEGORIES: {
|
|
|
81
84
|
hex: string;
|
|
82
85
|
}[];
|
|
83
86
|
|
|
84
|
-
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, }: {
|
|
87
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, subLocations, addSubLocation, removeSubLocation, sceneBrief, setSceneBrief, }: {
|
|
85
88
|
blocks: Block[];
|
|
86
89
|
characters: string[];
|
|
87
90
|
isLoading: boolean;
|
|
@@ -101,6 +104,11 @@ declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, scene
|
|
|
101
104
|
clearSelection: () => void;
|
|
102
105
|
menuPlacement: "top" | "bottom";
|
|
103
106
|
menuRef: React__default.RefObject<HTMLDivElement | null>;
|
|
107
|
+
subLocations: string[];
|
|
108
|
+
addSubLocation: (loc: string) => void;
|
|
109
|
+
removeSubLocation: (loc: string) => void;
|
|
110
|
+
sceneBrief: string;
|
|
111
|
+
setSceneBrief: (brief: string) => void;
|
|
104
112
|
}): react_jsx_runtime.JSX.Element;
|
|
105
113
|
|
|
106
114
|
declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
@@ -124,6 +132,11 @@ declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
|
124
132
|
clearSelection: () => void;
|
|
125
133
|
menuPlacement: "top" | "bottom";
|
|
126
134
|
menuRef: React$1.RefObject<HTMLDivElement | null>;
|
|
135
|
+
subLocations: string[];
|
|
136
|
+
addSubLocation: (subLocation: string) => void;
|
|
137
|
+
removeSubLocation: (subLocation: string) => void;
|
|
138
|
+
sceneBrief: string;
|
|
139
|
+
setSceneBrief: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
127
140
|
};
|
|
128
141
|
|
|
129
|
-
export { type Block, type BlockType, CATEGORIES, type ElementCategory, ScreenplayEditorView, type ScriptBreakdown, ScriptBreakdownSceneView, type Tag, type TimeOfDay, blockStyles, blockTypes, handleSaveAsPdf, handleSaveAsSbx, icons, timeOfDayOptions, useScreenplayEditor, useScriptBreakdownScene, uuid };
|
|
142
|
+
export { type Block, type BlockType, CATEGORIES, type ElementCategory, ScreenplayEditorView, type ScriptBreakdown, ScriptBreakdownSceneView, type Tag, type TimeOfDay, blockStyles, blockTypes, convertBlocksToSbx, handleSaveAsPdf, handleSaveAsSbx, handleSyncWithCloud, icons, timeOfDayOptions, useScreenplayEditor, useScriptBreakdownScene, uuid };
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare const blockStyles: Record<BlockType, {
|
|
|
25
25
|
interface UseScreenplayEditorOptions {
|
|
26
26
|
initialUrl?: string;
|
|
27
27
|
fetchOptions?: RequestInit;
|
|
28
|
+
onSave?: (content?: string) => void;
|
|
28
29
|
}
|
|
29
30
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
30
31
|
blocks: Block[];
|
|
@@ -58,8 +59,10 @@ type ScreenplayEditorViewProps = ReturnType<typeof useScreenplayEditor> & {
|
|
|
58
59
|
};
|
|
59
60
|
declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSuggestions, showExtensionSuggestions, characterExtensions, locations, characters, handleBlockTextChange, handleSceneTypeChange, handleTimeOfDayChange, handleBlockTypeChange, handleSelectCharacterExtension, handleKeyDown, handleFocus, handleBlur, handleScriptImport, onSave, onSaveAsPdf, onSaveAsSbx, onSyncWithCloud, handleSceneNumberChange, }: ScreenplayEditorViewProps): react_jsx_runtime.JSX.Element;
|
|
60
61
|
|
|
61
|
-
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string
|
|
62
|
-
declare const
|
|
62
|
+
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>, project_name?: string) => void;
|
|
63
|
+
declare const convertBlocksToSbx: (blocks: Block[], sceneNumbers: Record<string, string>) => string;
|
|
64
|
+
declare const handleSaveAsSbx: (blocks: Block[], sceneNumbers: Record<string, string>, onSaveAsSbx?: (file: File) => void, project_name?: string) => void;
|
|
65
|
+
declare const handleSyncWithCloud: (blocks: Block[], sceneNumbers: Record<string, string>, onSyncWithCloud?: (sbxData: string) => void) => void;
|
|
63
66
|
|
|
64
67
|
interface ScriptBreakdown {
|
|
65
68
|
scene_number: string;
|
|
@@ -81,7 +84,7 @@ declare const CATEGORIES: {
|
|
|
81
84
|
hex: string;
|
|
82
85
|
}[];
|
|
83
86
|
|
|
84
|
-
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, }: {
|
|
87
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, subLocations, addSubLocation, removeSubLocation, sceneBrief, setSceneBrief, }: {
|
|
85
88
|
blocks: Block[];
|
|
86
89
|
characters: string[];
|
|
87
90
|
isLoading: boolean;
|
|
@@ -101,6 +104,11 @@ declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, scene
|
|
|
101
104
|
clearSelection: () => void;
|
|
102
105
|
menuPlacement: "top" | "bottom";
|
|
103
106
|
menuRef: React__default.RefObject<HTMLDivElement | null>;
|
|
107
|
+
subLocations: string[];
|
|
108
|
+
addSubLocation: (loc: string) => void;
|
|
109
|
+
removeSubLocation: (loc: string) => void;
|
|
110
|
+
sceneBrief: string;
|
|
111
|
+
setSceneBrief: (brief: string) => void;
|
|
104
112
|
}): react_jsx_runtime.JSX.Element;
|
|
105
113
|
|
|
106
114
|
declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
@@ -124,6 +132,11 @@ declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
|
124
132
|
clearSelection: () => void;
|
|
125
133
|
menuPlacement: "top" | "bottom";
|
|
126
134
|
menuRef: React$1.RefObject<HTMLDivElement | null>;
|
|
135
|
+
subLocations: string[];
|
|
136
|
+
addSubLocation: (subLocation: string) => void;
|
|
137
|
+
removeSubLocation: (subLocation: string) => void;
|
|
138
|
+
sceneBrief: string;
|
|
139
|
+
setSceneBrief: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
127
140
|
};
|
|
128
141
|
|
|
129
|
-
export { type Block, type BlockType, CATEGORIES, type ElementCategory, ScreenplayEditorView, type ScriptBreakdown, ScriptBreakdownSceneView, type Tag, type TimeOfDay, blockStyles, blockTypes, handleSaveAsPdf, handleSaveAsSbx, icons, timeOfDayOptions, useScreenplayEditor, useScriptBreakdownScene, uuid };
|
|
142
|
+
export { type Block, type BlockType, CATEGORIES, type ElementCategory, ScreenplayEditorView, type ScriptBreakdown, ScriptBreakdownSceneView, type Tag, type TimeOfDay, blockStyles, blockTypes, convertBlocksToSbx, handleSaveAsPdf, handleSaveAsSbx, handleSyncWithCloud, icons, timeOfDayOptions, useScreenplayEditor, useScriptBreakdownScene, uuid };
|