@vishu1301/script-writing 1.2.4 → 1.2.6
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 +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -91,7 +91,7 @@ declare const CATEGORIES: {
|
|
|
91
91
|
hex: string;
|
|
92
92
|
}[];
|
|
93
93
|
|
|
94
|
-
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, updateTag, removeTag, clearSelection, menuPlacement, menuRef, sceneBrief, setSceneBrief, onSummarize, isSummarizing, }: {
|
|
94
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, updateTag, removeTag, clearSelection, menuPlacement, menuRef, sceneBrief, setSceneBrief, onSummarize, isSummarizing, aiSummarized, }: {
|
|
95
95
|
blocks: Block[];
|
|
96
96
|
characters: string[];
|
|
97
97
|
isLoading: boolean;
|
|
@@ -116,6 +116,7 @@ declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, scene
|
|
|
116
116
|
setSceneBrief: (brief: string) => void;
|
|
117
117
|
onSummarize?: () => void;
|
|
118
118
|
isSummarizing?: boolean;
|
|
119
|
+
aiSummarized?: boolean;
|
|
119
120
|
}): react_jsx_runtime.JSX.Element;
|
|
120
121
|
|
|
121
122
|
interface UseScriptBreakdownSceneOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ declare const CATEGORIES: {
|
|
|
91
91
|
hex: string;
|
|
92
92
|
}[];
|
|
93
93
|
|
|
94
|
-
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, updateTag, removeTag, clearSelection, menuPlacement, menuRef, sceneBrief, setSceneBrief, onSummarize, isSummarizing, }: {
|
|
94
|
+
declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, sceneNumber, tags, selectionMenu, handleMouseUp, addTag, updateTag, removeTag, clearSelection, menuPlacement, menuRef, sceneBrief, setSceneBrief, onSummarize, isSummarizing, aiSummarized, }: {
|
|
95
95
|
blocks: Block[];
|
|
96
96
|
characters: string[];
|
|
97
97
|
isLoading: boolean;
|
|
@@ -116,6 +116,7 @@ declare function ScriptBreakdownSceneView({ blocks, characters, isLoading, scene
|
|
|
116
116
|
setSceneBrief: (brief: string) => void;
|
|
117
117
|
onSummarize?: () => void;
|
|
118
118
|
isSummarizing?: boolean;
|
|
119
|
+
aiSummarized?: boolean;
|
|
119
120
|
}): react_jsx_runtime.JSX.Element;
|
|
120
121
|
|
|
121
122
|
interface UseScriptBreakdownSceneOptions {
|
package/dist/index.js
CHANGED
|
@@ -1924,7 +1924,8 @@ function ScriptBreakdownSceneView({
|
|
|
1924
1924
|
sceneBrief,
|
|
1925
1925
|
setSceneBrief,
|
|
1926
1926
|
onSummarize,
|
|
1927
|
-
isSummarizing
|
|
1927
|
+
isSummarizing,
|
|
1928
|
+
aiSummarized = false
|
|
1928
1929
|
}) {
|
|
1929
1930
|
const COURIER_STACK = "'Courier Prime', 'Courier', monospace";
|
|
1930
1931
|
useEffect(() => {
|
|
@@ -2156,7 +2157,7 @@ function ScriptBreakdownSceneView({
|
|
|
2156
2157
|
] })
|
|
2157
2158
|
] }),
|
|
2158
2159
|
/* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col gap-6 sticky top-6", children: [
|
|
2159
|
-
/* @__PURE__ */ jsx(
|
|
2160
|
+
!aiSummarized && /* @__PURE__ */ jsx(
|
|
2160
2161
|
summarize_button_default,
|
|
2161
2162
|
{
|
|
2162
2163
|
isSummarizing,
|
|
@@ -2214,6 +2215,7 @@ function useScriptBreakdownScene(options) {
|
|
|
2214
2215
|
const [isLoading, setIsLoading] = useState(true);
|
|
2215
2216
|
const [error, setError] = useState(false);
|
|
2216
2217
|
const menuRef = useRef(null);
|
|
2218
|
+
const hasInitializedRef = useRef(false);
|
|
2217
2219
|
useEffect(() => {
|
|
2218
2220
|
setIsLoading(true);
|
|
2219
2221
|
const fetchScene = async () => {
|
|
@@ -2459,16 +2461,14 @@ function useScriptBreakdownScene(options) {
|
|
|
2459
2461
|
}, [options.preLoadedTags]);
|
|
2460
2462
|
useEffect(() => {
|
|
2461
2463
|
const doBulkCreate = async () => {
|
|
2462
|
-
if (blocks.length
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2464
|
+
if (blocks.length === 0 || hasInitializedRef.current) return;
|
|
2465
|
+
const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
|
|
2466
|
+
hasInitializedRef.current = true;
|
|
2467
|
+
if (hasPreloadedTags) return;
|
|
2468
|
+
await bulkCreateTags();
|
|
2469
2469
|
};
|
|
2470
2470
|
doBulkCreate();
|
|
2471
|
-
}, [blocks, options.scene_url, options.preLoadedTags
|
|
2471
|
+
}, [blocks, options.scene_url, options.preLoadedTags]);
|
|
2472
2472
|
const clearSelection = useCallback(() => {
|
|
2473
2473
|
var _a;
|
|
2474
2474
|
setSelectionMenu(null);
|