@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.cjs
CHANGED
|
@@ -1949,7 +1949,8 @@ function ScriptBreakdownSceneView({
|
|
|
1949
1949
|
sceneBrief,
|
|
1950
1950
|
setSceneBrief,
|
|
1951
1951
|
onSummarize,
|
|
1952
|
-
isSummarizing
|
|
1952
|
+
isSummarizing,
|
|
1953
|
+
aiSummarized = false
|
|
1953
1954
|
}) {
|
|
1954
1955
|
const COURIER_STACK = "'Courier Prime', 'Courier', monospace";
|
|
1955
1956
|
react.useEffect(() => {
|
|
@@ -2181,7 +2182,7 @@ function ScriptBreakdownSceneView({
|
|
|
2181
2182
|
] })
|
|
2182
2183
|
] }),
|
|
2183
2184
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-6 sticky top-6", children: [
|
|
2184
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2185
|
+
!aiSummarized && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2185
2186
|
summarize_button_default,
|
|
2186
2187
|
{
|
|
2187
2188
|
isSummarizing,
|
|
@@ -2239,6 +2240,7 @@ function useScriptBreakdownScene(options) {
|
|
|
2239
2240
|
const [isLoading, setIsLoading] = react.useState(true);
|
|
2240
2241
|
const [error, setError] = react.useState(false);
|
|
2241
2242
|
const menuRef = react.useRef(null);
|
|
2243
|
+
const hasInitializedRef = react.useRef(false);
|
|
2242
2244
|
react.useEffect(() => {
|
|
2243
2245
|
setIsLoading(true);
|
|
2244
2246
|
const fetchScene = async () => {
|
|
@@ -2484,16 +2486,14 @@ function useScriptBreakdownScene(options) {
|
|
|
2484
2486
|
}, [options.preLoadedTags]);
|
|
2485
2487
|
react.useEffect(() => {
|
|
2486
2488
|
const doBulkCreate = async () => {
|
|
2487
|
-
if (blocks.length
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
}
|
|
2493
|
-
}
|
|
2489
|
+
if (blocks.length === 0 || hasInitializedRef.current) return;
|
|
2490
|
+
const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
|
|
2491
|
+
hasInitializedRef.current = true;
|
|
2492
|
+
if (hasPreloadedTags) return;
|
|
2493
|
+
await bulkCreateTags();
|
|
2494
2494
|
};
|
|
2495
2495
|
doBulkCreate();
|
|
2496
|
-
}, [blocks, options.scene_url, options.preLoadedTags
|
|
2496
|
+
}, [blocks, options.scene_url, options.preLoadedTags]);
|
|
2497
2497
|
const clearSelection = react.useCallback(() => {
|
|
2498
2498
|
var _a;
|
|
2499
2499
|
setSelectionMenu(null);
|