@vishu1301/script-writing 0.5.4 → 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.cjs +19 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -331,8 +331,10 @@ function ScreenplayEditorView({
|
|
|
331
331
|
handleSceneNumberChange
|
|
332
332
|
}) {
|
|
333
333
|
const [isRulesOpen, setIsRulesOpen] = react.useState(false);
|
|
334
|
+
const screenplayFont = "'Courier Prime', Courier, monospace";
|
|
334
335
|
react.useEffect(() => {
|
|
335
336
|
const fontId = "google-font-courier-prime";
|
|
337
|
+
const styleId = "screenplay-editor-force-font";
|
|
336
338
|
if (!document.getElementById(fontId)) {
|
|
337
339
|
const link = document.createElement("link");
|
|
338
340
|
link.id = fontId;
|
|
@@ -340,7 +342,19 @@ function ScreenplayEditorView({
|
|
|
340
342
|
link.href = "https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap";
|
|
341
343
|
document.head.appendChild(link);
|
|
342
344
|
}
|
|
343
|
-
|
|
345
|
+
if (!document.getElementById(styleId)) {
|
|
346
|
+
const style = document.createElement("style");
|
|
347
|
+
style.id = styleId;
|
|
348
|
+
style.textContent = `
|
|
349
|
+
.font-screenplay-container,
|
|
350
|
+
.font-screenplay-container *,
|
|
351
|
+
.font-screenplay-container [contenteditable] {
|
|
352
|
+
font-family: ${screenplayFont} !important;
|
|
353
|
+
}
|
|
354
|
+
`;
|
|
355
|
+
document.head.appendChild(style);
|
|
356
|
+
}
|
|
357
|
+
}, [screenplayFont]);
|
|
344
358
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
345
359
|
/* @__PURE__ */ jsxRuntime.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) => {
|
|
346
360
|
var _a;
|
|
@@ -383,14 +397,14 @@ function ScreenplayEditorView({
|
|
|
383
397
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
384
398
|
"div",
|
|
385
399
|
{
|
|
386
|
-
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
|
|
400
|
+
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",
|
|
387
401
|
style: {
|
|
388
|
-
|
|
389
|
-
// "var(--font-courier-prime, 'Courier Prime', 'Courier New', Courier, monospace) !important",
|
|
402
|
+
fontFamily: screenplayFont,
|
|
390
403
|
paddingLeft: "1.5in",
|
|
391
404
|
paddingRight: "1in",
|
|
392
405
|
paddingTop: "1in",
|
|
393
|
-
paddingBottom: "1in"
|
|
406
|
+
paddingBottom: "1in",
|
|
407
|
+
lineHeight: "1.2"
|
|
394
408
|
},
|
|
395
409
|
children: blocks.map((block) => {
|
|
396
410
|
var _a, _b;
|