@lalalic/markcut 3.2.65 → 3.2.66
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/package.json
CHANGED
|
@@ -105,7 +105,7 @@ function shotTypography(edit,src,sections,width,height){
|
|
|
105
105
|
for(let n=20;n>=9;n--){
|
|
106
106
|
const shrink=n/20*canvasScale;
|
|
107
107
|
const title=68*shrink,sourceFont=38*shrink,body=46*shrink,gap=23*shrink;
|
|
108
|
-
const needed=estimateLines(
|
|
108
|
+
const needed=estimateLines(edit.shot_id,title)*title*1.14+
|
|
109
109
|
estimateLines(source,sourceFont)*sourceFont*1.3+
|
|
110
110
|
desc.reduce((sum,text)=>sum+estimateLines(text,body)*body*1.28,0)+
|
|
111
111
|
(desc.length+1)*gap;
|
|
@@ -128,7 +128,7 @@ function overlay(edit,index,src,width,height){
|
|
|
128
128
|
['REVISION NOTE',edit.revision_note],
|
|
129
129
|
].filter(([,value])=>nonEmpty(value));
|
|
130
130
|
const size=shotTypography(edit,src,sections,width,height);
|
|
131
|
-
const heading=`<div style={{fontSize:${size.title},fontWeight:800,lineHeight:1.14,overflowWrap:'anywhere'}}
|
|
131
|
+
const heading=`<div style={{fontSize:${size.title},fontWeight:800,lineHeight:1.14,overflowWrap:'anywhere'}}>${html(edit.shot_id)}</div>`;
|
|
132
132
|
const source=`<div style={{fontSize:${size.source},fontWeight:600,lineHeight:1.3,opacity:.9,overflowWrap:'anywhere'}}>SOURCE: ${html(src)} [${edit.in_seconds.toFixed(2)}–${edit.out_seconds.toFixed(2)}s]</div>`;
|
|
133
133
|
const descriptions=sections.map(([label,value])=>`<div style={{fontSize:${size.body},lineHeight:1.28,overflowWrap:'anywhere',whiteSpace:'pre-wrap'}}><span style={{fontSize:${size.label},fontWeight:700,letterSpacing:1,color:'#a5d8ff'}}>${label}:</span> ${html(value)}</div>`).join('');
|
|
134
134
|
return `<div style={{boxSizing:'border-box',width:'100%',height:'100%',display:'flex',flexDirection:'column',justifyContent:'flex-start',alignItems:'stretch',gap:${size.gap},overflowY:'hidden',padding:'5%',color:'white',fontFamily:'Arial,sans-serif',textShadow:'0 2px 5px rgba(0,0,0,.85)',background:'linear-gradient(180deg,rgba(0,0,0,.94),rgba(0,0,0,.78) 62%,rgba(0,0,0,.34))'}}>${heading}${source}${descriptions}</div>`;
|
|
@@ -40,6 +40,9 @@ test('converts decisions into playable Markcut Markdown with original source and
|
|
|
40
40
|
assert.match(md,/## EditorialIntent/);
|
|
41
41
|
assert.match(md,/## Shot1/);
|
|
42
42
|
assert.match(md,/## Shot2/);
|
|
43
|
+
const overlay2=JSON.parse(md.match(/## Shot2[\s\S]*?- component duration:[^\n]*?jsx:([^\n]+)/)[1]);
|
|
44
|
+
assert.match(overlay2,/>reaction<\/div>/);
|
|
45
|
+
assert.doesNotMatch(overlay2,/SHOT 2/);
|
|
43
46
|
assert.match(md,/startFrom:1 endAt:2 duration:1.0000/);
|
|
44
47
|
assert.match(md,/Set geography/);
|
|
45
48
|
assert.match(md,/retain source sound/);
|
|
@@ -65,6 +68,8 @@ test('Editor Decisions shot overlay begins at top with larger type and never tru
|
|
|
65
68
|
const md=editorDecisionToMarkdown(f.video,decision,'# video\nwidth:1080 height:1920 fps:30 layout:series');
|
|
66
69
|
const component=md.split('- component duration:1.0000 jsx:')[1];
|
|
67
70
|
const jsx=JSON.parse(component.trim());
|
|
71
|
+
assert.match(jsx,/>wide<\/div>/);
|
|
72
|
+
assert.doesNotMatch(jsx,/SHOT 1/);
|
|
68
73
|
assert.match(jsx,/justifyContent:'flex-start'/);
|
|
69
74
|
assert.doesNotMatch(jsx,/justifyContent:'flex-end'/);
|
|
70
75
|
const title=Number(jsx.match(/fontSize:([\d.]+)/)[1]);
|