ugcinc-render 1.8.64 → 1.8.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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -2
- package/dist/index.mjs +25 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -200,7 +200,7 @@ interface EditorConfig extends BaseEditorConfig {
|
|
|
200
200
|
* Supports all segment types including video and audio
|
|
201
201
|
*/
|
|
202
202
|
interface VideoEditorConfig extends BaseEditorConfig {
|
|
203
|
-
channels: Channel<VideoSegment | ImageSegment | TextSegment | AudioSegment>[];
|
|
203
|
+
channels: Channel<VideoSegment | ImageSegment | TextSegment | AudioSegment | SequenceSegment>[];
|
|
204
204
|
/** Dynamic crop configuration (optional) */
|
|
205
205
|
dynamicCrop?: DynamicCropConfig;
|
|
206
206
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ interface EditorConfig extends BaseEditorConfig {
|
|
|
200
200
|
* Supports all segment types including video and audio
|
|
201
201
|
*/
|
|
202
202
|
interface VideoEditorConfig extends BaseEditorConfig {
|
|
203
|
-
channels: Channel<VideoSegment | ImageSegment | TextSegment | AudioSegment>[];
|
|
203
|
+
channels: Channel<VideoSegment | ImageSegment | TextSegment | AudioSegment | SequenceSegment>[];
|
|
204
204
|
/** Dynamic crop configuration (optional) */
|
|
205
205
|
dynamicCrop?: DynamicCropConfig;
|
|
206
206
|
}
|
package/dist/index.js
CHANGED
|
@@ -1976,7 +1976,7 @@ function VideoEditorComposition({
|
|
|
1976
1976
|
);
|
|
1977
1977
|
const activeVisualSegments = (0, import_react5.useMemo)(() => {
|
|
1978
1978
|
return segmentTimings.filter(({ segment, startFrame, endFrame }) => {
|
|
1979
|
-
if (segment.type !== "video" && segment.type !== "image" && segment.type !== "text") {
|
|
1979
|
+
if (segment.type !== "video" && segment.type !== "image" && segment.type !== "text" && segment.type !== "sequence") {
|
|
1980
1980
|
return false;
|
|
1981
1981
|
}
|
|
1982
1982
|
return frame >= startFrame && frame < endFrame;
|
|
@@ -2777,6 +2777,8 @@ function DebugOverlay({
|
|
|
2777
2777
|
const [mousePos, setMousePos] = (0, import_react7.useState)(null);
|
|
2778
2778
|
const [viewportPos, setViewportPos] = (0, import_react7.useState)(null);
|
|
2779
2779
|
const [screenPosPercent, setScreenPosPercent] = (0, import_react7.useState)(null);
|
|
2780
|
+
const [isDragging, setIsDragging] = (0, import_react7.useState)(false);
|
|
2781
|
+
const [lastDragPos, setLastDragPos] = (0, import_react7.useState)(null);
|
|
2780
2782
|
const zoomScale = zoom / 100;
|
|
2781
2783
|
const handleMouseMove = (0, import_react7.useCallback)(
|
|
2782
2784
|
(e) => {
|
|
@@ -2795,13 +2797,32 @@ function DebugOverlay({
|
|
|
2795
2797
|
const canvasX = Math.round((vpX + scrollX) / zoomScale);
|
|
2796
2798
|
const canvasY = Math.round((vpY + scrollY) / zoomScale);
|
|
2797
2799
|
setMousePos({ x: canvasX, y: canvasY });
|
|
2800
|
+
if (isDragging && lastDragPos) {
|
|
2801
|
+
const deltaX = (e.clientX - lastDragPos.x) * remotionScaleX;
|
|
2802
|
+
const deltaY = (e.clientY - lastDragPos.y) * remotionScaleY;
|
|
2803
|
+
const newScrollX = Math.max(0, scrollX - deltaX);
|
|
2804
|
+
const newScrollY = Math.max(0, scrollY - deltaY);
|
|
2805
|
+
onZoomChange(zoom, newScrollX, newScrollY);
|
|
2806
|
+
setLastDragPos({ x: e.clientX, y: e.clientY });
|
|
2807
|
+
}
|
|
2798
2808
|
},
|
|
2799
|
-
[width, height, zoomScale, scrollX, scrollY]
|
|
2809
|
+
[width, height, zoomScale, scrollX, scrollY, isDragging, lastDragPos, zoom, onZoomChange]
|
|
2800
2810
|
);
|
|
2811
|
+
const handleMouseDown = (0, import_react7.useCallback)((e) => {
|
|
2812
|
+
if (e.target.tagName === "BUTTON") return;
|
|
2813
|
+
setIsDragging(true);
|
|
2814
|
+
setLastDragPos({ x: e.clientX, y: e.clientY });
|
|
2815
|
+
}, []);
|
|
2816
|
+
const handleMouseUp = (0, import_react7.useCallback)(() => {
|
|
2817
|
+
setIsDragging(false);
|
|
2818
|
+
setLastDragPos(null);
|
|
2819
|
+
}, []);
|
|
2801
2820
|
const handleMouseLeave = (0, import_react7.useCallback)(() => {
|
|
2802
2821
|
setMousePos(null);
|
|
2803
2822
|
setViewportPos(null);
|
|
2804
2823
|
setScreenPosPercent(null);
|
|
2824
|
+
setIsDragging(false);
|
|
2825
|
+
setLastDragPos(null);
|
|
2805
2826
|
}, []);
|
|
2806
2827
|
const handleWheel = (0, import_react7.useCallback)(
|
|
2807
2828
|
(e) => {
|
|
@@ -2833,6 +2854,8 @@ function DebugOverlay({
|
|
|
2833
2854
|
zIndex: 200
|
|
2834
2855
|
},
|
|
2835
2856
|
onMouseMove: handleMouseMove,
|
|
2857
|
+
onMouseDown: handleMouseDown,
|
|
2858
|
+
onMouseUp: handleMouseUp,
|
|
2836
2859
|
onMouseLeave: handleMouseLeave,
|
|
2837
2860
|
onWheel: handleWheel,
|
|
2838
2861
|
children: [
|
package/dist/index.mjs
CHANGED
|
@@ -1084,7 +1084,7 @@ function VideoEditorComposition({
|
|
|
1084
1084
|
);
|
|
1085
1085
|
const activeVisualSegments = useMemo5(() => {
|
|
1086
1086
|
return segmentTimings.filter(({ segment, startFrame, endFrame }) => {
|
|
1087
|
-
if (segment.type !== "video" && segment.type !== "image" && segment.type !== "text") {
|
|
1087
|
+
if (segment.type !== "video" && segment.type !== "image" && segment.type !== "text" && segment.type !== "sequence") {
|
|
1088
1088
|
return false;
|
|
1089
1089
|
}
|
|
1090
1090
|
return frame >= startFrame && frame < endFrame;
|
|
@@ -1885,6 +1885,8 @@ function DebugOverlay({
|
|
|
1885
1885
|
const [mousePos, setMousePos] = useState2(null);
|
|
1886
1886
|
const [viewportPos, setViewportPos] = useState2(null);
|
|
1887
1887
|
const [screenPosPercent, setScreenPosPercent] = useState2(null);
|
|
1888
|
+
const [isDragging, setIsDragging] = useState2(false);
|
|
1889
|
+
const [lastDragPos, setLastDragPos] = useState2(null);
|
|
1888
1890
|
const zoomScale = zoom / 100;
|
|
1889
1891
|
const handleMouseMove = useCallback(
|
|
1890
1892
|
(e) => {
|
|
@@ -1903,13 +1905,32 @@ function DebugOverlay({
|
|
|
1903
1905
|
const canvasX = Math.round((vpX + scrollX) / zoomScale);
|
|
1904
1906
|
const canvasY = Math.round((vpY + scrollY) / zoomScale);
|
|
1905
1907
|
setMousePos({ x: canvasX, y: canvasY });
|
|
1908
|
+
if (isDragging && lastDragPos) {
|
|
1909
|
+
const deltaX = (e.clientX - lastDragPos.x) * remotionScaleX;
|
|
1910
|
+
const deltaY = (e.clientY - lastDragPos.y) * remotionScaleY;
|
|
1911
|
+
const newScrollX = Math.max(0, scrollX - deltaX);
|
|
1912
|
+
const newScrollY = Math.max(0, scrollY - deltaY);
|
|
1913
|
+
onZoomChange(zoom, newScrollX, newScrollY);
|
|
1914
|
+
setLastDragPos({ x: e.clientX, y: e.clientY });
|
|
1915
|
+
}
|
|
1906
1916
|
},
|
|
1907
|
-
[width, height, zoomScale, scrollX, scrollY]
|
|
1917
|
+
[width, height, zoomScale, scrollX, scrollY, isDragging, lastDragPos, zoom, onZoomChange]
|
|
1908
1918
|
);
|
|
1919
|
+
const handleMouseDown = useCallback((e) => {
|
|
1920
|
+
if (e.target.tagName === "BUTTON") return;
|
|
1921
|
+
setIsDragging(true);
|
|
1922
|
+
setLastDragPos({ x: e.clientX, y: e.clientY });
|
|
1923
|
+
}, []);
|
|
1924
|
+
const handleMouseUp = useCallback(() => {
|
|
1925
|
+
setIsDragging(false);
|
|
1926
|
+
setLastDragPos(null);
|
|
1927
|
+
}, []);
|
|
1909
1928
|
const handleMouseLeave = useCallback(() => {
|
|
1910
1929
|
setMousePos(null);
|
|
1911
1930
|
setViewportPos(null);
|
|
1912
1931
|
setScreenPosPercent(null);
|
|
1932
|
+
setIsDragging(false);
|
|
1933
|
+
setLastDragPos(null);
|
|
1913
1934
|
}, []);
|
|
1914
1935
|
const handleWheel = useCallback(
|
|
1915
1936
|
(e) => {
|
|
@@ -1941,6 +1962,8 @@ function DebugOverlay({
|
|
|
1941
1962
|
zIndex: 200
|
|
1942
1963
|
},
|
|
1943
1964
|
onMouseMove: handleMouseMove,
|
|
1965
|
+
onMouseDown: handleMouseDown,
|
|
1966
|
+
onMouseUp: handleMouseUp,
|
|
1944
1967
|
onMouseLeave: handleMouseLeave,
|
|
1945
1968
|
onWheel: handleWheel,
|
|
1946
1969
|
children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.66",
|
|
4
4
|
"description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|