@vishu1301/script-writing 1.0.0 → 1.0.1

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
@@ -306,8 +306,10 @@ function ScreenplayEditorView({
306
306
  handleSceneNumberChange
307
307
  }) {
308
308
  const [isRulesOpen, setIsRulesOpen] = useState(false);
309
+ const screenplayFont = "'Courier Prime', Courier, monospace";
309
310
  useEffect(() => {
310
311
  const fontId = "google-font-courier-prime";
312
+ const styleId = "screenplay-editor-force-font";
311
313
  if (!document.getElementById(fontId)) {
312
314
  const link = document.createElement("link");
313
315
  link.id = fontId;
@@ -315,8 +317,19 @@ function ScreenplayEditorView({
315
317
  link.href = "https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap";
316
318
  document.head.appendChild(link);
317
319
  }
318
- }, []);
319
- const screenplayFont = "'Courier Prime', Courier, monospace";
320
+ if (!document.getElementById(styleId)) {
321
+ const style = document.createElement("style");
322
+ style.id = styleId;
323
+ style.textContent = `
324
+ .font-screenplay-container,
325
+ .font-screenplay-container *,
326
+ .font-screenplay-container [contenteditable] {
327
+ font-family: ${screenplayFont} !important;
328
+ }
329
+ `;
330
+ document.head.appendChild(style);
331
+ }
332
+ }, [screenplayFont]);
320
333
  return /* @__PURE__ */ jsxs(Fragment, { children: [
321
334
  /* @__PURE__ */ jsx("div", { className: "sticky top-6 z-50 bg-white backdrop-blur-xl border border-white/10 rounded-full shadow-2xl flex gap-1 max-w-fit p-1.5 mb-12 select-none overflow-x-auto custom-scrollbar", children: blockTypes.map((type) => {
322
335
  var _a;
@@ -359,7 +372,7 @@ function ScreenplayEditorView({
359
372
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsx(
360
373
  "div",
361
374
  {
362
- className: "relative bg-[#fdfdfc] shadow-2xl shadow-zinc-300/60 border border-zinc-100 rounded-sm md:rounded-md pl-[1.5in] py-[1in] pr-[1in] flex flex-col w-[210mm] min-h-[297mm] shrink-0 ",
375
+ className: "relative bg-[#fdfdfc] shadow-2xl shadow-zinc-300/60 border border-zinc-100 rounded-sm md:rounded-md pl-[1.5in] py-[1in] pr-[1in] flex flex-col w-[210mm] min-h-[297mm] shrink-0 font-screenplay-container",
363
376
  style: {
364
377
  fontFamily: screenplayFont,
365
378
  paddingLeft: "1.5in",