@vishu1301/script-writing 1.0.3 → 1.0.5
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/README.md +8 -4
- package/dist/index.cjs +580 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -5
- package/dist/index.d.ts +71 -5
- package/dist/index.js +579 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { KeyboardEvent } from 'react';
|
|
3
4
|
|
|
4
5
|
type BlockType = "SCENE_HEADING" | "ACTION" | "CHARACTER" | "PARENTHETICAL" | "DIALOGUE" | "TRANSITION";
|
|
5
6
|
type TimeOfDay = "DAY" | "NIGHT";
|
|
@@ -14,11 +15,11 @@ interface Block {
|
|
|
14
15
|
}
|
|
15
16
|
declare const blockTypes: BlockType[];
|
|
16
17
|
declare const uuid: () => string;
|
|
17
|
-
declare const icons: Record<BlockType,
|
|
18
|
+
declare const icons: Record<BlockType, React__default.ReactNode>;
|
|
18
19
|
declare const blockStyles: Record<BlockType, {
|
|
19
20
|
label: string;
|
|
20
21
|
className: string;
|
|
21
|
-
inputStyle:
|
|
22
|
+
inputStyle: React__default.CSSProperties;
|
|
22
23
|
}>;
|
|
23
24
|
|
|
24
25
|
interface UseScreenplayEditorOptions {
|
|
@@ -27,7 +28,7 @@ interface UseScreenplayEditorOptions {
|
|
|
27
28
|
}
|
|
28
29
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
29
30
|
blocks: Block[];
|
|
30
|
-
refs:
|
|
31
|
+
refs: React__default.RefObject<Record<string, HTMLDivElement | null>>;
|
|
31
32
|
focusedBlockId: string;
|
|
32
33
|
showSuggestions: boolean;
|
|
33
34
|
showExtensionSuggestions: boolean;
|
|
@@ -60,4 +61,69 @@ declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSugges
|
|
|
60
61
|
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>) => void;
|
|
61
62
|
declare const handleSaveAsSbx: (blocks: Block[], sceneNumbers: Record<string, string>, onSaveAsSbx?: (file: File) => void) => void;
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
interface ScriptBreakdown {
|
|
65
|
+
scene_number: string;
|
|
66
|
+
content: string;
|
|
67
|
+
}
|
|
68
|
+
type ElementCategory = "CAST" | "PROP" | "COSTUME" | "VEHICLE" | "SET_PROP" | "EXTRA" | "LOCATION";
|
|
69
|
+
interface Tag {
|
|
70
|
+
id: string;
|
|
71
|
+
blockId: string;
|
|
72
|
+
categoryId: ElementCategory;
|
|
73
|
+
text: string;
|
|
74
|
+
startIndex: number;
|
|
75
|
+
endIndex: number;
|
|
76
|
+
}
|
|
77
|
+
declare const CATEGORIES: {
|
|
78
|
+
id: ElementCategory;
|
|
79
|
+
label: string;
|
|
80
|
+
color: string;
|
|
81
|
+
hex: string;
|
|
82
|
+
}[];
|
|
83
|
+
|
|
84
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, }: {
|
|
85
|
+
blocks: Block[];
|
|
86
|
+
characters: string[];
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
sceneNumber: string;
|
|
89
|
+
tags: Tag[];
|
|
90
|
+
selectionMenu: {
|
|
91
|
+
blockId: string;
|
|
92
|
+
startIndex: number;
|
|
93
|
+
endIndex: number;
|
|
94
|
+
text: string;
|
|
95
|
+
top: number;
|
|
96
|
+
left: number;
|
|
97
|
+
} | null;
|
|
98
|
+
handleMouseUp: () => void;
|
|
99
|
+
addTag: (c: ElementCategory) => void;
|
|
100
|
+
removeTag: (e: React__default.MouseEvent, id: string) => void;
|
|
101
|
+
clearSelection: () => void;
|
|
102
|
+
menuPlacement: "top" | "bottom";
|
|
103
|
+
menuRef: React__default.RefObject<HTMLDivElement | null>;
|
|
104
|
+
}): react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
107
|
+
scene: ScriptBreakdown | undefined;
|
|
108
|
+
blocks: Block[];
|
|
109
|
+
characters: string[];
|
|
110
|
+
isLoading: boolean;
|
|
111
|
+
error: Error | null;
|
|
112
|
+
tags: Tag[];
|
|
113
|
+
selectionMenu: {
|
|
114
|
+
blockId: string;
|
|
115
|
+
startIndex: number;
|
|
116
|
+
endIndex: number;
|
|
117
|
+
text: string;
|
|
118
|
+
top: number;
|
|
119
|
+
left: number;
|
|
120
|
+
} | null;
|
|
121
|
+
handleMouseUp: () => void;
|
|
122
|
+
addTag: (categoryId: ElementCategory) => void;
|
|
123
|
+
removeTag: (e: React.MouseEvent, id: string) => void;
|
|
124
|
+
clearSelection: () => void;
|
|
125
|
+
menuPlacement: "top" | "bottom";
|
|
126
|
+
menuRef: React$1.RefObject<HTMLDivElement | null>;
|
|
127
|
+
};
|
|
128
|
+
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { KeyboardEvent } from 'react';
|
|
3
4
|
|
|
4
5
|
type BlockType = "SCENE_HEADING" | "ACTION" | "CHARACTER" | "PARENTHETICAL" | "DIALOGUE" | "TRANSITION";
|
|
5
6
|
type TimeOfDay = "DAY" | "NIGHT";
|
|
@@ -14,11 +15,11 @@ interface Block {
|
|
|
14
15
|
}
|
|
15
16
|
declare const blockTypes: BlockType[];
|
|
16
17
|
declare const uuid: () => string;
|
|
17
|
-
declare const icons: Record<BlockType,
|
|
18
|
+
declare const icons: Record<BlockType, React__default.ReactNode>;
|
|
18
19
|
declare const blockStyles: Record<BlockType, {
|
|
19
20
|
label: string;
|
|
20
21
|
className: string;
|
|
21
|
-
inputStyle:
|
|
22
|
+
inputStyle: React__default.CSSProperties;
|
|
22
23
|
}>;
|
|
23
24
|
|
|
24
25
|
interface UseScreenplayEditorOptions {
|
|
@@ -27,7 +28,7 @@ interface UseScreenplayEditorOptions {
|
|
|
27
28
|
}
|
|
28
29
|
declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
|
|
29
30
|
blocks: Block[];
|
|
30
|
-
refs:
|
|
31
|
+
refs: React__default.RefObject<Record<string, HTMLDivElement | null>>;
|
|
31
32
|
focusedBlockId: string;
|
|
32
33
|
showSuggestions: boolean;
|
|
33
34
|
showExtensionSuggestions: boolean;
|
|
@@ -60,4 +61,69 @@ declare function ScreenplayEditorView({ blocks, refs, focusedBlockId, showSugges
|
|
|
60
61
|
declare const handleSaveAsPdf: (blocks: Block[], sceneNumbers: Record<string, string>) => void;
|
|
61
62
|
declare const handleSaveAsSbx: (blocks: Block[], sceneNumbers: Record<string, string>, onSaveAsSbx?: (file: File) => void) => void;
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
interface ScriptBreakdown {
|
|
65
|
+
scene_number: string;
|
|
66
|
+
content: string;
|
|
67
|
+
}
|
|
68
|
+
type ElementCategory = "CAST" | "PROP" | "COSTUME" | "VEHICLE" | "SET_PROP" | "EXTRA" | "LOCATION";
|
|
69
|
+
interface Tag {
|
|
70
|
+
id: string;
|
|
71
|
+
blockId: string;
|
|
72
|
+
categoryId: ElementCategory;
|
|
73
|
+
text: string;
|
|
74
|
+
startIndex: number;
|
|
75
|
+
endIndex: number;
|
|
76
|
+
}
|
|
77
|
+
declare const CATEGORIES: {
|
|
78
|
+
id: ElementCategory;
|
|
79
|
+
label: string;
|
|
80
|
+
color: string;
|
|
81
|
+
hex: string;
|
|
82
|
+
}[];
|
|
83
|
+
|
|
84
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, removeTag, clearSelection, menuPlacement, menuRef, }: {
|
|
85
|
+
blocks: Block[];
|
|
86
|
+
characters: string[];
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
sceneNumber: string;
|
|
89
|
+
tags: Tag[];
|
|
90
|
+
selectionMenu: {
|
|
91
|
+
blockId: string;
|
|
92
|
+
startIndex: number;
|
|
93
|
+
endIndex: number;
|
|
94
|
+
text: string;
|
|
95
|
+
top: number;
|
|
96
|
+
left: number;
|
|
97
|
+
} | null;
|
|
98
|
+
handleMouseUp: () => void;
|
|
99
|
+
addTag: (c: ElementCategory) => void;
|
|
100
|
+
removeTag: (e: React__default.MouseEvent, id: string) => void;
|
|
101
|
+
clearSelection: () => void;
|
|
102
|
+
menuPlacement: "top" | "bottom";
|
|
103
|
+
menuRef: React__default.RefObject<HTMLDivElement | null>;
|
|
104
|
+
}): react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
declare function useScriptBreakdownScene(sceneNumber: string): {
|
|
107
|
+
scene: ScriptBreakdown | undefined;
|
|
108
|
+
blocks: Block[];
|
|
109
|
+
characters: string[];
|
|
110
|
+
isLoading: boolean;
|
|
111
|
+
error: Error | null;
|
|
112
|
+
tags: Tag[];
|
|
113
|
+
selectionMenu: {
|
|
114
|
+
blockId: string;
|
|
115
|
+
startIndex: number;
|
|
116
|
+
endIndex: number;
|
|
117
|
+
text: string;
|
|
118
|
+
top: number;
|
|
119
|
+
left: number;
|
|
120
|
+
} | null;
|
|
121
|
+
handleMouseUp: () => void;
|
|
122
|
+
addTag: (categoryId: ElementCategory) => void;
|
|
123
|
+
removeTag: (e: React.MouseEvent, id: string) => void;
|
|
124
|
+
clearSelection: () => void;
|
|
125
|
+
menuPlacement: "top" | "bottom";
|
|
126
|
+
menuRef: React$1.RefObject<HTMLDivElement | null>;
|
|
127
|
+
};
|
|
128
|
+
|
|
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 };
|