@vishu1301/script-writing 1.0.8 → 1.1.0

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
@@ -1326,6 +1326,7 @@ function useScreenplayEditor(options) {
1326
1326
  );
1327
1327
  const handleScriptImport = useCallback(
1328
1328
  (title, content, preParsedBlocks) => {
1329
+ var _a;
1329
1330
  let parsedBlocks = [];
1330
1331
  if (preParsedBlocks && preParsedBlocks.length > 0) {
1331
1332
  parsedBlocks = preParsedBlocks.map((b) => ({
@@ -1380,19 +1381,19 @@ function useScreenplayEditor(options) {
1380
1381
  return `<div class="${divClass}" id="par${block.id}"${extraAttributes}>${text}</div>`;
1381
1382
  }).join("");
1382
1383
  const blob = new Blob([sbxData], { type: "text/plain" });
1383
- options.onSave(blob);
1384
+ (_a = options == null ? void 0 : options.onSave) == null ? void 0 : _a.call(options, blob);
1384
1385
  }
1385
1386
  setTimeout(() => {
1386
- var _a;
1387
+ var _a2;
1387
1388
  const firstId = parsedBlocks[0].id;
1388
1389
  if (firstId && refs.current[firstId]) {
1389
1390
  setFocusedBlockId(firstId);
1390
- (_a = refs.current[firstId]) == null ? void 0 : _a.focus();
1391
+ (_a2 = refs.current[firstId]) == null ? void 0 : _a2.focus();
1391
1392
  }
1392
1393
  }, 100);
1393
1394
  }
1394
1395
  },
1395
- [refs, options == null ? void 0 : options.onSave]
1396
+ [refs]
1396
1397
  );
1397
1398
  const handleFocus = useCallback(
1398
1399
  (id) => {