Initial commit

moved from private version control
This commit is contained in:
2025-10-19 21:12:41 +11:00
parent 5e84773bbe
commit e64f3e881e
187 changed files with 25372 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import { createNodeModule } from "../nodeTypes.js";
/**
* Defines a reusable custom event entry point.
* @type {import('../nodeTypes.js').NodeModule}
*/
export const customEventNode = createNodeModule(
{
id: "custom_event",
title: "Custom Event",
category: "Events",
description: "Defines a custom event that can be triggered elsewhere.",
searchTags: ["event", "custom", "broadcast", "trigger"],
inputs: [],
outputs: [
{ id: "exec_out", name: "Exec", direction: "output", kind: "exec" },
],
properties: [
{
key: "name",
label: "Event Name",
type: "string",
defaultValue: "CustomEvent",
placeholder: "Enter event name",
},
],
initializeProperties: (properties) => {
if (typeof properties.name !== "string" || !properties.name.trim()) {
properties.name = "CustomEvent";
}
if (!Array.isArray(properties.parameters)) {
properties.parameters = [];
}
const counter = Number.isFinite(properties.parameterCounter)
? Number(properties.parameterCounter)
: 0;
properties.parameterCounter = counter;
},
},
{
isEntryPoint: true,
emitExec: ({ emitNextExec }) => emitNextExec("exec_out"),
}
);