@vishu1301/script-writing 1.0.6 → 1.0.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.d.cts CHANGED
@@ -25,7 +25,7 @@ declare const blockStyles: Record<BlockType, {
25
25
  interface UseScreenplayEditorOptions {
26
26
  initialUrl?: string;
27
27
  fetchOptions?: RequestInit;
28
- onSave?: (content?: string) => void;
28
+ onSave?: (content?: Blob) => void;
29
29
  }
30
30
  declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
31
31
  blocks: Block[];
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ declare const blockStyles: Record<BlockType, {
25
25
  interface UseScreenplayEditorOptions {
26
26
  initialUrl?: string;
27
27
  fetchOptions?: RequestInit;
28
- onSave?: (content?: string) => void;
28
+ onSave?: (content?: Blob) => void;
29
29
  }
30
30
  declare function useScreenplayEditor(options?: UseScreenplayEditorOptions): {
31
31
  blocks: Block[];
package/dist/index.js CHANGED
@@ -337,7 +337,7 @@ function ScreenplayEditorView({
337
337
  /* @__PURE__ */ jsxs(
338
338
  "div",
339
339
  {
340
- className: "sticky top-6 z-50 mx-auto bg-white/70 backdrop-blur-2xl border border-white/60 shadow-[0_8px_30px_rgb(0,0,0,0.04)] ring-1 ring-zinc-900/5 rounded-[2rem] flex items-center justify-between p-2 mb-12 select-none transition-all",
340
+ className: "sticky top-6 z-50 mx-auto bg-white/70 backdrop-blur-2xl border border-white/60 shadow-[0_8px_30px_rgb(0,0,0,0.04)] rounded-[2rem] flex items-center justify-between p-2 mb-12 select-none transition-all",
341
341
  style: {
342
342
  maxWidth: "1240px"
343
343
  },
@@ -1356,7 +1356,6 @@ function useScreenplayEditor(options) {
1356
1356
  });
1357
1357
  setBlocks(finalizedBlocks);
1358
1358
  if (options == null ? void 0 : options.onSave) {
1359
- options.onSave(content);
1360
1359
  const typeToDivClass = {
1361
1360
  SCENE_HEADING: "divtype0",
1362
1361
  ACTION: "divtype2",
@@ -1380,7 +1379,8 @@ function useScreenplayEditor(options) {
1380
1379
  }
1381
1380
  return `<div class="${divClass}" id="par${block.id}"${extraAttributes}>${text}</div>`;
1382
1381
  }).join("");
1383
- options.onSave(sbxData);
1382
+ const blob = new Blob([sbxData], { type: "text/plain" });
1383
+ options.onSave(blob);
1384
1384
  }
1385
1385
  setTimeout(() => {
1386
1386
  var _a;