@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.cjs CHANGED
@@ -2445,40 +2445,6 @@ function useScriptBreakdownScene(scene_url, fetchOptions, onAISummarize, onTagAd
2445
2445
  setSceneBrief("");
2446
2446
  autoTaggedSceneRef.current = null;
2447
2447
  }, [scene_url]);
2448
- react.useEffect(() => {
2449
- if (blocks.length > 0 && characters.length > 0 && autoTaggedSceneRef.current !== scene) {
2450
- const autoTags = [];
2451
- const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2452
- const sortedChars = [...characters].sort((a, b) => b.length - a.length);
2453
- blocks.forEach((block) => {
2454
- sortedChars.forEach((char) => {
2455
- const escapedChar = escapeRegExp(char);
2456
- const regex = new RegExp(`\\b${escapedChar}\\b`, "gi");
2457
- let match;
2458
- while ((match = regex.exec(block.text)) !== null) {
2459
- const isOverlapping = autoTags.some(
2460
- (t) => t.block_id === block.id && match.index + char.length > t.start_index && match.index < t.end_index
2461
- );
2462
- if (!isOverlapping) {
2463
- autoTags.push({
2464
- id: uuid(),
2465
- block_id: block.id,
2466
- category_id: "CAST",
2467
- name: block.text.substring(
2468
- match.index,
2469
- match.index + char.length
2470
- ),
2471
- start_index: match.index,
2472
- end_index: match.index + char.length
2473
- });
2474
- }
2475
- }
2476
- });
2477
- });
2478
- setTags(autoTags);
2479
- autoTaggedSceneRef.current = scene;
2480
- }
2481
- }, [blocks, characters, scene]);
2482
2448
  const clearSelection = react.useCallback(() => {
2483
2449
  var _a;
2484
2450
  setSelectionMenu(null);