ugcinc 4.5.29 → 4.5.31
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.
|
@@ -266,6 +266,18 @@ export declare const nodeDefinitions: {
|
|
|
266
266
|
__TInputs: import("./random").RandomNodeInputs;
|
|
267
267
|
__TOutputs: import("./random").RandomNodeOutputs;
|
|
268
268
|
};
|
|
269
|
+
readonly regex: NodeDefinition<"regex", "generator", {
|
|
270
|
+
text: string;
|
|
271
|
+
textInputType: import("./types").InputType;
|
|
272
|
+
pattern: string;
|
|
273
|
+
patternInputType: import("./types").InputType;
|
|
274
|
+
flags: string;
|
|
275
|
+
outputMode: import("./types").OutputMode;
|
|
276
|
+
selectionMode: import("./types").SelectionMode | null;
|
|
277
|
+
}, import("./regex").RegexNodeInputs, import("./regex").RegexNodeOutputs, false> & {
|
|
278
|
+
__TInputs: import("./regex").RegexNodeInputs;
|
|
279
|
+
__TOutputs: import("./regex").RegexNodeOutputs;
|
|
280
|
+
};
|
|
269
281
|
readonly 'random-route': NodeDefinition<"random-route", "generator", {
|
|
270
282
|
branches: import("./random-route").RandomRouteBranch[];
|
|
271
283
|
passthroughInputs: import("./random-route").RandomRoutePassthroughInput[];
|
|
@@ -32,6 +32,7 @@ const media_1 = __importDefault(require("./media"));
|
|
|
32
32
|
const not_1 = __importDefault(require("./not"));
|
|
33
33
|
const output_1 = __importDefault(require("./output"));
|
|
34
34
|
const random_1 = __importDefault(require("./random"));
|
|
35
|
+
const regex_1 = __importDefault(require("./regex"));
|
|
35
36
|
const random_route_1 = __importDefault(require("./random-route"));
|
|
36
37
|
const recurrence_1 = __importDefault(require("./recurrence"));
|
|
37
38
|
const save_to_media_1 = __importDefault(require("./save-to-media"));
|
|
@@ -71,6 +72,7 @@ exports.nodeDefinitions = {
|
|
|
71
72
|
'not': not_1.default,
|
|
72
73
|
'passthrough': output_1.default,
|
|
73
74
|
'random': random_1.default,
|
|
75
|
+
'regex': regex_1.default,
|
|
74
76
|
'random-route': random_route_1.default,
|
|
75
77
|
'recurrence': recurrence_1.default,
|
|
76
78
|
'save-to-media': save_to_media_1.default,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TextValue, BooleanValue } from '../types';
|
|
2
|
+
import { type InputType, type OutputMode, type SelectionMode } from './types';
|
|
3
|
+
/** Regex node inputs - optional based on inputType settings */
|
|
4
|
+
export interface RegexNodeInputs {
|
|
5
|
+
text?: TextValue;
|
|
6
|
+
pattern?: TextValue;
|
|
7
|
+
}
|
|
8
|
+
export interface RegexNodeOutputs {
|
|
9
|
+
match: BooleanValue;
|
|
10
|
+
groups: TextValue[];
|
|
11
|
+
}
|
|
12
|
+
declare const definition: import("./types").NodeDefinition<"regex", "generator", {
|
|
13
|
+
text: string;
|
|
14
|
+
textInputType: InputType;
|
|
15
|
+
pattern: string;
|
|
16
|
+
patternInputType: InputType;
|
|
17
|
+
flags: string;
|
|
18
|
+
outputMode: OutputMode;
|
|
19
|
+
selectionMode: SelectionMode | null;
|
|
20
|
+
}, RegexNodeInputs, RegexNodeOutputs, false>;
|
|
21
|
+
declare const _default: typeof definition & {
|
|
22
|
+
__TInputs: RegexNodeInputs;
|
|
23
|
+
__TOutputs: RegexNodeOutputs;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export type RegexNodeConfig = typeof definition.defaults;
|
|
@@ -0,0 +1,47 @@
|
|
|
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: 'regex',
|
|
9
|
+
label: 'Regex',
|
|
10
|
+
description: 'Match text against a regular expression',
|
|
11
|
+
type: 'generator',
|
|
12
|
+
category: 'Generation',
|
|
13
|
+
outputModes: ['per-input', 'single'],
|
|
14
|
+
selectionModes: null,
|
|
15
|
+
defaults: {
|
|
16
|
+
text: '',
|
|
17
|
+
textInputType: 'static',
|
|
18
|
+
pattern: '',
|
|
19
|
+
patternInputType: 'static',
|
|
20
|
+
flags: '',
|
|
21
|
+
outputMode: 'per-input',
|
|
22
|
+
selectionMode: null,
|
|
23
|
+
},
|
|
24
|
+
computePorts: ({ config }) => {
|
|
25
|
+
const inputs = [];
|
|
26
|
+
if (config?.textInputType === 'variable') {
|
|
27
|
+
inputs.push({ id: 'text', type: 'text', isArray: false, required: true });
|
|
28
|
+
}
|
|
29
|
+
if (config?.patternInputType === 'variable') {
|
|
30
|
+
inputs.push({ id: 'pattern', type: 'text', isArray: false, required: true });
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
inputs,
|
|
34
|
+
outputs: [
|
|
35
|
+
{ id: 'match', type: 'boolean', isArray: false, required: true },
|
|
36
|
+
{ id: 'groups', type: 'text', isArray: true, required: true },
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
generatePreview: (_config, _ctx, cachedOutputs) => {
|
|
41
|
+
return (0, types_1.preview)({
|
|
42
|
+
match: cachedOutputs?.match ?? null,
|
|
43
|
+
groups: cachedOutputs?.groups ?? null,
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
exports.default = definition;
|
|
@@ -8,11 +8,10 @@ const selection_1 = require("../selection");
|
|
|
8
8
|
// =============================================================================
|
|
9
9
|
const definition = (0, types_1.defineNode)({
|
|
10
10
|
nodeId: 'text',
|
|
11
|
-
label: '
|
|
11
|
+
label: 'List',
|
|
12
12
|
description: 'Use text collections',
|
|
13
13
|
type: 'source',
|
|
14
14
|
category: 'Sources',
|
|
15
|
-
hidden: true,
|
|
16
15
|
canBeCaptured: true,
|
|
17
16
|
outputModes: ['per-input', 'single'],
|
|
18
17
|
selectionModes: ['random', 'sequential'],
|