@vishu1301/script-writing 1.2.4 → 1.2.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/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,
@@ -2461,10 +2462,12 @@ function useScriptBreakdownScene(options) {
2461
2462
  const doBulkCreate = async () => {
2462
2463
  if (blocks.length > 0 && !autoTaggedSceneRef.current) {
2463
2464
  const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
2464
- if (!hasPreloadedTags) {
2465
+ if (hasPreloadedTags) {
2465
2466
  autoTaggedSceneRef.current = options.scene_url;
2466
- await bulkCreateTags();
2467
+ return;
2467
2468
  }
2469
+ autoTaggedSceneRef.current = options.scene_url;
2470
+ await bulkCreateTags();
2468
2471
  }
2469
2472
  };
2470
2473
  doBulkCreate();