ugcinc 4.5.84 → 4.5.86
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/automations/nodes/index.d.ts +8 -0
- package/dist/automations/nodes/index.js +2 -0
- package/dist/automations/nodes/media.d.ts +2 -0
- package/dist/automations/nodes/move-media.d.ts +20 -0
- package/dist/automations/nodes/move-media.js +45 -0
- package/dist/automations/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -244,6 +244,14 @@ export declare const nodeDefinitions: {
|
|
|
244
244
|
__TInputs: import("./media").MediaNodeInputs;
|
|
245
245
|
__TOutputs: import("./media").MediaNodeOutputs;
|
|
246
246
|
};
|
|
247
|
+
readonly 'move-media': NodeDefinition<"move-media", "generator", {
|
|
248
|
+
tag: string;
|
|
249
|
+
outputMode: import("./types").OutputMode;
|
|
250
|
+
selectionMode: import("./types").SelectionMode | null;
|
|
251
|
+
}, import("./move-media").MoveMediaNodeInputs, import("./move-media").MoveMediaNodeOutputs, false> & {
|
|
252
|
+
__TInputs: import("./move-media").MoveMediaNodeInputs;
|
|
253
|
+
__TOutputs: import("./move-media").MoveMediaNodeOutputs;
|
|
254
|
+
};
|
|
247
255
|
readonly not: NodeDefinition<"not", "generator", {
|
|
248
256
|
outputMode: import("./types").OutputMode;
|
|
249
257
|
selectionMode: import("./types").SelectionMode | null;
|
|
@@ -29,6 +29,7 @@ const if_1 = __importDefault(require("./if"));
|
|
|
29
29
|
const image_composer_1 = __importDefault(require("./image-composer"));
|
|
30
30
|
const llm_1 = __importDefault(require("./llm"));
|
|
31
31
|
const media_1 = __importDefault(require("./media"));
|
|
32
|
+
const move_media_1 = __importDefault(require("./move-media"));
|
|
32
33
|
const not_1 = __importDefault(require("./not"));
|
|
33
34
|
const output_1 = __importDefault(require("./output"));
|
|
34
35
|
const random_1 = __importDefault(require("./random"));
|
|
@@ -69,6 +70,7 @@ exports.nodeDefinitions = {
|
|
|
69
70
|
'image-composer': image_composer_1.default,
|
|
70
71
|
'llm': llm_1.default,
|
|
71
72
|
'media': media_1.default,
|
|
73
|
+
'move-media': move_media_1.default,
|
|
72
74
|
'not': not_1.default,
|
|
73
75
|
'passthrough': output_1.default,
|
|
74
76
|
'random': random_1.default,
|
|
@@ -8,6 +8,8 @@ export type MediaNodeOutputs = Record<string, PortValue | PortValue[]>;
|
|
|
8
8
|
export interface MediaNodeOutput extends NodePort {
|
|
9
9
|
type: MediaItemType;
|
|
10
10
|
selectedMediaIds: string[];
|
|
11
|
+
/** Tag group references for dynamic resolution at runtime */
|
|
12
|
+
selectedTags?: string[];
|
|
11
13
|
selectionConfig?: SelectionConfig;
|
|
12
14
|
}
|
|
13
15
|
declare const definition: import("./types").NodeDefinition<"media", "source", {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { VideoValue, ImageValue, AudioValue } from '../types';
|
|
2
|
+
import { type OutputMode, type SelectionMode } from './types';
|
|
3
|
+
export type MoveMediaInputValue = VideoValue | ImageValue | AudioValue;
|
|
4
|
+
export interface MoveMediaNodeInputs {
|
|
5
|
+
media: MoveMediaInputValue | MoveMediaInputValue[];
|
|
6
|
+
}
|
|
7
|
+
export interface MoveMediaNodeOutputs {
|
|
8
|
+
media: MoveMediaInputValue | MoveMediaInputValue[];
|
|
9
|
+
}
|
|
10
|
+
declare const definition: import("./types").NodeDefinition<"move-media", "generator", {
|
|
11
|
+
tag: string;
|
|
12
|
+
outputMode: OutputMode;
|
|
13
|
+
selectionMode: SelectionMode | null;
|
|
14
|
+
}, MoveMediaNodeInputs, MoveMediaNodeOutputs, false>;
|
|
15
|
+
declare const _default: typeof definition & {
|
|
16
|
+
__TInputs: MoveMediaNodeInputs;
|
|
17
|
+
__TOutputs: MoveMediaNodeOutputs;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
export type MoveMediaNodeConfig = typeof definition.defaults;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const types_1 = require("./types");
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// Node Definition
|
|
6
|
+
// =============================================================================
|
|
7
|
+
const definition = (0, types_1.defineNode)({
|
|
8
|
+
nodeId: 'move-media',
|
|
9
|
+
label: 'Move Media',
|
|
10
|
+
description: 'Move media items to a different tag group',
|
|
11
|
+
guide: 'Updates the tag (folder) of media items in the media library. Use after a Media node to move items from one group to another (e.g. "clips/new" to "clips/used"). Passes media through unchanged so downstream nodes still receive it. Only works with media items that have a mediaId (i.e. from a Media node). Use cases: marking media as used after posting, organizing processed media, archiving.',
|
|
12
|
+
type: 'generator',
|
|
13
|
+
category: 'Output',
|
|
14
|
+
outputModes: ['per-input', 'single'],
|
|
15
|
+
selectionModes: null,
|
|
16
|
+
defaults: {
|
|
17
|
+
tag: '',
|
|
18
|
+
outputMode: 'per-input',
|
|
19
|
+
selectionMode: null,
|
|
20
|
+
},
|
|
21
|
+
computePorts: () => ({
|
|
22
|
+
inputs: [
|
|
23
|
+
{
|
|
24
|
+
id: 'media',
|
|
25
|
+
type: ['image', 'video', 'audio'],
|
|
26
|
+
isArray: false,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
outputs: [
|
|
31
|
+
{
|
|
32
|
+
id: 'media',
|
|
33
|
+
type: ['image', 'video', 'audio'],
|
|
34
|
+
isArray: false,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
generatePreview: (_config, ctx, cachedOutputs) => {
|
|
40
|
+
return (0, types_1.preview)({
|
|
41
|
+
media: cachedOutputs?.media ?? null,
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
exports.default = definition;
|
|
@@ -81,6 +81,7 @@ export declare function isPortType(portType: BasePortType | BasePortType[], chec
|
|
|
81
81
|
*/
|
|
82
82
|
export interface ImageValue {
|
|
83
83
|
url: string;
|
|
84
|
+
mediaId?: string;
|
|
84
85
|
width?: number;
|
|
85
86
|
height?: number;
|
|
86
87
|
mimeType?: string;
|
|
@@ -91,6 +92,7 @@ export interface ImageValue {
|
|
|
91
92
|
*/
|
|
92
93
|
export interface VideoValue {
|
|
93
94
|
url: string;
|
|
95
|
+
mediaId?: string;
|
|
94
96
|
width?: number;
|
|
95
97
|
height?: number;
|
|
96
98
|
duration?: number;
|
|
@@ -103,6 +105,7 @@ export interface VideoValue {
|
|
|
103
105
|
*/
|
|
104
106
|
export interface AudioValue {
|
|
105
107
|
url: string;
|
|
108
|
+
mediaId?: string;
|
|
106
109
|
duration?: number;
|
|
107
110
|
mimeType?: string;
|
|
108
111
|
}
|