@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.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -3
- 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,8 +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
|
-
|
|
344
|
-
|
|
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]);
|
|
345
358
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
346
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) => {
|
|
347
360
|
var _a;
|
|
@@ -384,7 +397,7 @@ function ScreenplayEditorView({
|
|
|
384
397
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
385
398
|
"div",
|
|
386
399
|
{
|
|
387
|
-
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 ",
|
|
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",
|
|
388
401
|
style: {
|
|
389
402
|
fontFamily: screenplayFont,
|
|
390
403
|
paddingLeft: "1.5in",
|