@vosjs/studio-core 0.48.0 → 0.49.0
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.d.ts +7 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -397,6 +397,13 @@ interface RecordingMeta {
|
|
|
397
397
|
* whole take, so Chrome letterboxes the resized content — surface a notice.
|
|
398
398
|
*/
|
|
399
399
|
resizedDuringTake?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* How round the footage's own corners are, in cursor-space units (a recorded
|
|
402
|
+
* window's points). Outside them the footage is opaque: a window recorded
|
|
403
|
+
* alone is black there. A card drawn around the footage is at least this
|
|
404
|
+
* round, or those corners show as notches. Absent or 0 = square footage.
|
|
405
|
+
*/
|
|
406
|
+
cornerRadius?: number;
|
|
400
407
|
/**
|
|
401
408
|
* Page URL/title at record start (seeds the browser-bar mock's address pill).
|
|
402
409
|
* Query/hash are stripped at capture for privacy.
|
package/dist/index.js
CHANGED
|
@@ -8567,6 +8567,11 @@ var ON_FRAME = `(ctx, content, dt) => {
|
|
|
8567
8567
|
cardX = dx; cardY = dy - barH; cardW = dw; cardH = dh + barH
|
|
8568
8568
|
}
|
|
8569
8569
|
var radius = (cfr.radius || 0) * s2
|
|
8570
|
+
// Footage of a window is round at its own corners and opaque outside them.
|
|
8571
|
+
// The card is at least as round, or those corners show as notches. Under
|
|
8572
|
+
// cover the card crops the footage and its corners are not the card's.
|
|
8573
|
+
var ftR = (actM ? actM.footageRadius : d.footageRadius) || 0
|
|
8574
|
+
if (ftR > 0 && !fitCover) radius = Math.max(radius, ftR * dw)
|
|
8570
8575
|
var shadow = cfr.shadow || 0
|
|
8571
8576
|
// The shadow's colour (a #rrggbb; the strengths are its alpha) and the
|
|
8572
8577
|
// optional tight CONTACT layer that makes a light card sit on a light
|
|
@@ -9564,6 +9569,7 @@ function lowerToComposition(input) {
|
|
|
9564
9569
|
})),
|
|
9565
9570
|
cursorStyle: doc.cursor,
|
|
9566
9571
|
cursorSpace: { w: doc.source.meta.width, h: doc.source.meta.height },
|
|
9572
|
+
...footageRadiusData(doc.source.meta, doc.source.crop),
|
|
9567
9573
|
// The other media (concat): each with its element's source, its crop
|
|
9568
9574
|
// and its own cursor in its own capture space; absent = one media.
|
|
9569
9575
|
...doc.media && doc.media.length ? {
|
|
@@ -9588,6 +9594,7 @@ function lowerToComposition(input) {
|
|
|
9588
9594
|
y: round9(p.y)
|
|
9589
9595
|
})),
|
|
9590
9596
|
cursorSpace: { w: m.meta.width, h: m.meta.height },
|
|
9597
|
+
...footageRadiusData(m.meta, m.crop),
|
|
9591
9598
|
// The card this media wears (its own placement, bar, corner,
|
|
9592
9599
|
// shadow, border, fit and focus over the take's), resolved
|
|
9593
9600
|
// here so ON_FRAME swaps one object and reads no document.
|
|
@@ -9862,6 +9869,11 @@ function pinsDataOf(doc, pins) {
|
|
|
9862
9869
|
function round42(v) {
|
|
9863
9870
|
return Math.round(v * 1e5) / 1e5;
|
|
9864
9871
|
}
|
|
9872
|
+
function footageRadiusData(meta, crop) {
|
|
9873
|
+
const r = meta.cornerRadius;
|
|
9874
|
+
if (!r || !(r > 0) || crop || !(meta.width > 0)) return {};
|
|
9875
|
+
return { footageRadius: round42(r / meta.width) };
|
|
9876
|
+
}
|
|
9865
9877
|
function clickFxData(doc, rated) {
|
|
9866
9878
|
const fx = doc.cursor.clickFx;
|
|
9867
9879
|
const on = fx.style !== "none" || fx.press;
|