@vishu1301/script-writing 1.1.8 → 1.1.9

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.js CHANGED
@@ -2420,40 +2420,6 @@ function useScriptBreakdownScene(scene_url, fetchOptions, onAISummarize, onTagAd
2420
2420
  setSceneBrief("");
2421
2421
  autoTaggedSceneRef.current = null;
2422
2422
  }, [scene_url]);
2423
- useEffect(() => {
2424
- if (blocks.length > 0 && characters.length > 0 && autoTaggedSceneRef.current !== scene) {
2425
- const autoTags = [];
2426
- const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2427
- const sortedChars = [...characters].sort((a, b) => b.length - a.length);
2428
- blocks.forEach((block) => {
2429
- sortedChars.forEach((char) => {
2430
- const escapedChar = escapeRegExp(char);
2431
- const regex = new RegExp(`\\b${escapedChar}\\b`, "gi");
2432
- let match;
2433
- while ((match = regex.exec(block.text)) !== null) {
2434
- const isOverlapping = autoTags.some(
2435
- (t) => t.block_id === block.id && match.index + char.length > t.start_index && match.index < t.end_index
2436
- );
2437
- if (!isOverlapping) {
2438
- autoTags.push({
2439
- id: uuid(),
2440
- block_id: block.id,
2441
- category_id: "CAST",
2442
- name: block.text.substring(
2443
- match.index,
2444
- match.index + char.length
2445
- ),
2446
- start_index: match.index,
2447
- end_index: match.index + char.length
2448
- });
2449
- }
2450
- }
2451
- });
2452
- });
2453
- setTags(autoTags);
2454
- autoTaggedSceneRef.current = scene;
2455
- }
2456
- }, [blocks, characters, scene]);
2457
2423
  const clearSelection = useCallback(() => {
2458
2424
  var _a;
2459
2425
  setSelectionMenu(null);