@vishu1301/script-writing 1.0.0 → 1.0.2
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 +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,22 @@ 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
|
-
|
|
320
|
+
if (!document.getElementById(styleId)) {
|
|
321
|
+
const style = document.createElement("style");
|
|
322
|
+
style.id = styleId;
|
|
323
|
+
style.textContent = style.textContent = `
|
|
324
|
+
[data-screenplay-editor],
|
|
325
|
+
[data-screenplay-editor] *,
|
|
326
|
+
[data-screenplay-editor] [contenteditable="true"],
|
|
327
|
+
.font-screenplay-container,
|
|
328
|
+
.font-screenplay-container div,
|
|
329
|
+
.font-screenplay-container span {
|
|
330
|
+
font-family: 'Courier Prime', Courier, monospace !important;
|
|
331
|
+
}
|
|
332
|
+
`;
|
|
333
|
+
document.head.appendChild(style);
|
|
334
|
+
}
|
|
335
|
+
}, [screenplayFont]);
|
|
320
336
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
321
337
|
/* @__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
338
|
var _a;
|
|
@@ -359,7 +375,7 @@ function ScreenplayEditorView({
|
|
|
359
375
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsx(
|
|
360
376
|
"div",
|
|
361
377
|
{
|
|
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 ",
|
|
378
|
+
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
379
|
style: {
|
|
364
380
|
fontFamily: screenplayFont,
|
|
365
381
|
paddingLeft: "1.5in",
|