@vishu1301/script-writing 1.0.2 → 1.0.3
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 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -306,10 +306,10 @@ function ScreenplayEditorView({
|
|
|
306
306
|
handleSceneNumberChange
|
|
307
307
|
}) {
|
|
308
308
|
const [isRulesOpen, setIsRulesOpen] = useState(false);
|
|
309
|
-
const
|
|
309
|
+
const COURIER_STACK = "'Courier Prime', 'Courier', monospace";
|
|
310
310
|
useEffect(() => {
|
|
311
311
|
const fontId = "google-font-courier-prime";
|
|
312
|
-
const styleId = "screenplay-editor-force-
|
|
312
|
+
const styleId = "screenplay-editor-force-v4";
|
|
313
313
|
if (!document.getElementById(fontId)) {
|
|
314
314
|
const link = document.createElement("link");
|
|
315
315
|
link.id = fontId;
|
|
@@ -320,19 +320,19 @@ function ScreenplayEditorView({
|
|
|
320
320
|
if (!document.getElementById(styleId)) {
|
|
321
321
|
const style = document.createElement("style");
|
|
322
322
|
style.id = styleId;
|
|
323
|
-
style.textContent =
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
323
|
+
style.textContent = `
|
|
324
|
+
/* We target by the data-attribute to ensure the highest specificity possible */
|
|
325
|
+
[data-screenplay-editor] *,
|
|
326
|
+
[data-screenplay-editor] div,
|
|
327
|
+
[data-screenplay-editor] span,
|
|
328
|
+
[data-screenplay-editor] [contenteditable="true"] {
|
|
329
|
+
font-family: ${COURIER_STACK} !important;
|
|
330
|
+
-webkit-font-smoothing: antialiased;
|
|
331
|
+
}
|
|
332
|
+
`;
|
|
333
333
|
document.head.appendChild(style);
|
|
334
334
|
}
|
|
335
|
-
}, [
|
|
335
|
+
}, [COURIER_STACK]);
|
|
336
336
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
337
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) => {
|
|
338
338
|
var _a;
|
|
@@ -375,15 +375,16 @@ function ScreenplayEditorView({
|
|
|
375
375
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-12 w-full items-center pb-24", children: /* @__PURE__ */ jsx(
|
|
376
376
|
"div",
|
|
377
377
|
{
|
|
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
|
|
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",
|
|
379
379
|
style: {
|
|
380
|
-
fontFamily:
|
|
380
|
+
fontFamily: COURIER_STACK,
|
|
381
381
|
paddingLeft: "1.5in",
|
|
382
382
|
paddingRight: "1in",
|
|
383
383
|
paddingTop: "1in",
|
|
384
384
|
paddingBottom: "1in",
|
|
385
385
|
lineHeight: "1.2"
|
|
386
386
|
},
|
|
387
|
+
"data-screenplay-editor": "true",
|
|
387
388
|
children: blocks.map((block) => {
|
|
388
389
|
var _a, _b;
|
|
389
390
|
return /* @__PURE__ */ jsx(
|