@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.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,22 @@ 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 = style.textContent = `
|
|
349
|
+
[data-screenplay-editor],
|
|
350
|
+
[data-screenplay-editor] *,
|
|
351
|
+
[data-screenplay-editor] [contenteditable="true"],
|
|
352
|
+
.font-screenplay-container,
|
|
353
|
+
.font-screenplay-container div,
|
|
354
|
+
.font-screenplay-container span {
|
|
355
|
+
font-family: 'Courier Prime', Courier, monospace !important;
|
|
356
|
+
}
|
|
357
|
+
`;
|
|
358
|
+
document.head.appendChild(style);
|
|
359
|
+
}
|
|
360
|
+
}, [screenplayFont]);
|
|
345
361
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
346
362
|
/* @__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
363
|
var _a;
|
|
@@ -384,7 +400,7 @@ function ScreenplayEditorView({
|
|
|
384
400
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
385
401
|
"div",
|
|
386
402
|
{
|
|
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 ",
|
|
403
|
+
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
404
|
style: {
|
|
389
405
|
fontFamily: screenplayFont,
|
|
390
406
|
paddingLeft: "1.5in",
|