@vishu1301/script-writing 1.2.7 → 1.2.8
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 +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -128,6 +128,7 @@ interface UseScriptBreakdownSceneOptions {
|
|
|
128
128
|
onTagRemoved?: (tagId: string) => void;
|
|
129
129
|
onTagUpdated?: (tagId: string, categoryId: ElementCategory) => void;
|
|
130
130
|
preLoadedTags?: Tag[];
|
|
131
|
+
preLoadedTagsLoading?: boolean;
|
|
131
132
|
}
|
|
132
133
|
declare function useScriptBreakdownScene(options: UseScriptBreakdownSceneOptions): {
|
|
133
134
|
scene: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,7 @@ interface UseScriptBreakdownSceneOptions {
|
|
|
128
128
|
onTagRemoved?: (tagId: string) => void;
|
|
129
129
|
onTagUpdated?: (tagId: string, categoryId: ElementCategory) => void;
|
|
130
130
|
preLoadedTags?: Tag[];
|
|
131
|
+
preLoadedTagsLoading?: boolean;
|
|
131
132
|
}
|
|
132
133
|
declare function useScriptBreakdownScene(options: UseScriptBreakdownSceneOptions): {
|
|
133
134
|
scene: any;
|
package/dist/index.js
CHANGED
|
@@ -2461,6 +2461,7 @@ function useScriptBreakdownScene(options) {
|
|
|
2461
2461
|
useEffect(() => {
|
|
2462
2462
|
const doBulkCreate = async () => {
|
|
2463
2463
|
if (blocks.length === 0) return;
|
|
2464
|
+
if (options.preLoadedTagsLoading) return;
|
|
2464
2465
|
if (autoTaggedSceneRef.current === options.scene_url) return;
|
|
2465
2466
|
const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
|
|
2466
2467
|
autoTaggedSceneRef.current = options.scene_url;
|
|
@@ -2468,7 +2469,12 @@ function useScriptBreakdownScene(options) {
|
|
|
2468
2469
|
await bulkCreateTags();
|
|
2469
2470
|
};
|
|
2470
2471
|
doBulkCreate();
|
|
2471
|
-
}, [
|
|
2472
|
+
}, [
|
|
2473
|
+
blocks,
|
|
2474
|
+
options.scene_url,
|
|
2475
|
+
options.preLoadedTags,
|
|
2476
|
+
options.preLoadedTagsLoading
|
|
2477
|
+
]);
|
|
2472
2478
|
const clearSelection = useCallback(() => {
|
|
2473
2479
|
var _a;
|
|
2474
2480
|
setSelectionMenu(null);
|