bpmn-elk-layout 1.0.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.
@@ -0,0 +1,82 @@
1
+ export { ARTIFACT_TYPES, ARTIFACT_TYPES_SET, Artifact, BPMN_ELEMENT_MAP, BPMN_NAMESPACES, BoundaryEvent, BpmnCallActivity, BpmnElkLayout, BpmnElkLayoutOptions, BpmnEvent, BpmnGateway, BpmnSubProcess, BpmnTask, Collaboration, ConditionalEventDefinition, DEFAULT_ELK_OPTIONS, DEFAULT_SIZES, EVENT_DEFINITION_MAP, EVENT_TYPES, EdgeSection, ElkBpmnGraph, ElkLayoutOptions, ErrorDefinition, EscalationDefinition, FLOW_TYPES, FlowNode, GATEWAY_TYPES, GROUP_TYPE, Lane, LayoutedCollaboration, LayoutedFlowNode, LayoutedGraph, LayoutedLane, LayoutedMessageFlow, LayoutedParticipant, LayoutedProcess, LayoutedSequenceFlow, LinkEventDefinition, LoopCharacteristics, MessageDefinition, MessageFlow, Participant, Point, Process, SUBPROCESS_TYPES, SequenceFlow, SignalDefinition, TASK_TYPES, TimerEventDefinition, isCallActivity, isCollaboration, isEvent, isFlowNode, isGateway, isLane, isProcess, isSubProcess, isTask } from './index.mjs';
2
+
3
+ /**
4
+ * Prompt Template Generator for ELK-BPMN JSON
5
+ *
6
+ * Dynamically analyzes test fixtures and schema to generate
7
+ * a comprehensive AI prompt template for ELK-BPMN JSON generation.
8
+ */
9
+ interface PromptGeneratorOptions {
10
+ /** Path to fixtures directory */
11
+ fixturesDir?: string;
12
+ /** Path to ELK-BPMN schema file */
13
+ schemaPath?: string;
14
+ }
15
+ interface FixtureAnalysis {
16
+ totalFixtures: number;
17
+ eventTypes: Set<string>;
18
+ eventDefinitionTypes: Set<string>;
19
+ taskTypes: Set<string>;
20
+ gatewayTypes: Set<string>;
21
+ subprocessTypes: Set<string>;
22
+ hasCollaborations: boolean;
23
+ hasLanes: boolean;
24
+ hasBoundaryEvents: boolean;
25
+ hasMessageFlows: boolean;
26
+ hasConditionExpressions: boolean;
27
+ hasTimerDefinitions: boolean;
28
+ hasLoopCharacteristics: boolean;
29
+ examples: {
30
+ simpleProcess?: unknown;
31
+ collaboration?: unknown;
32
+ };
33
+ }
34
+ interface SchemaInfo {
35
+ version: string;
36
+ title: string;
37
+ eventDefinitionTypes: string[];
38
+ taskTypes: string[];
39
+ gatewayTypes: string[];
40
+ subprocessTypes: string[];
41
+ }
42
+ declare class PromptTemplateGenerator {
43
+ private options;
44
+ constructor(options?: PromptGeneratorOptions);
45
+ /**
46
+ * Analyze all fixture files to extract patterns and examples
47
+ */
48
+ analyzeFixtures(): Promise<FixtureAnalysis>;
49
+ /**
50
+ * Recursively analyze a node and its children
51
+ */
52
+ private analyzeNode;
53
+ /**
54
+ * Load and parse the schema file
55
+ */
56
+ loadSchema(): Promise<SchemaInfo>;
57
+ /**
58
+ * Generate the complete prompt template
59
+ */
60
+ generate(): Promise<string>;
61
+ /**
62
+ * Build the final template string
63
+ * Output is a clean system prompt that can be directly copied to AI
64
+ */
65
+ private buildTemplate;
66
+ private generateSystemPrompt;
67
+ private generateOutputFormat;
68
+ private generateDimensions;
69
+ private generateStructure;
70
+ private generateEventGuide;
71
+ private generateTaskGuide;
72
+ private generateGatewayRules;
73
+ private generateNamingConventions;
74
+ private generateImportantRules;
75
+ private generateUserPromptTemplate;
76
+ private generateExample;
77
+ private generateSelfCheckList;
78
+ private generateCommonErrors;
79
+ }
80
+ declare function generatePromptTemplate(options?: PromptGeneratorOptions): Promise<string>;
81
+
82
+ export { type PromptGeneratorOptions, PromptTemplateGenerator, generatePromptTemplate };
@@ -0,0 +1,82 @@
1
+ export { ARTIFACT_TYPES, ARTIFACT_TYPES_SET, Artifact, BPMN_ELEMENT_MAP, BPMN_NAMESPACES, BoundaryEvent, BpmnCallActivity, BpmnElkLayout, BpmnElkLayoutOptions, BpmnEvent, BpmnGateway, BpmnSubProcess, BpmnTask, Collaboration, ConditionalEventDefinition, DEFAULT_ELK_OPTIONS, DEFAULT_SIZES, EVENT_DEFINITION_MAP, EVENT_TYPES, EdgeSection, ElkBpmnGraph, ElkLayoutOptions, ErrorDefinition, EscalationDefinition, FLOW_TYPES, FlowNode, GATEWAY_TYPES, GROUP_TYPE, Lane, LayoutedCollaboration, LayoutedFlowNode, LayoutedGraph, LayoutedLane, LayoutedMessageFlow, LayoutedParticipant, LayoutedProcess, LayoutedSequenceFlow, LinkEventDefinition, LoopCharacteristics, MessageDefinition, MessageFlow, Participant, Point, Process, SUBPROCESS_TYPES, SequenceFlow, SignalDefinition, TASK_TYPES, TimerEventDefinition, isCallActivity, isCollaboration, isEvent, isFlowNode, isGateway, isLane, isProcess, isSubProcess, isTask } from './index.js';
2
+
3
+ /**
4
+ * Prompt Template Generator for ELK-BPMN JSON
5
+ *
6
+ * Dynamically analyzes test fixtures and schema to generate
7
+ * a comprehensive AI prompt template for ELK-BPMN JSON generation.
8
+ */
9
+ interface PromptGeneratorOptions {
10
+ /** Path to fixtures directory */
11
+ fixturesDir?: string;
12
+ /** Path to ELK-BPMN schema file */
13
+ schemaPath?: string;
14
+ }
15
+ interface FixtureAnalysis {
16
+ totalFixtures: number;
17
+ eventTypes: Set<string>;
18
+ eventDefinitionTypes: Set<string>;
19
+ taskTypes: Set<string>;
20
+ gatewayTypes: Set<string>;
21
+ subprocessTypes: Set<string>;
22
+ hasCollaborations: boolean;
23
+ hasLanes: boolean;
24
+ hasBoundaryEvents: boolean;
25
+ hasMessageFlows: boolean;
26
+ hasConditionExpressions: boolean;
27
+ hasTimerDefinitions: boolean;
28
+ hasLoopCharacteristics: boolean;
29
+ examples: {
30
+ simpleProcess?: unknown;
31
+ collaboration?: unknown;
32
+ };
33
+ }
34
+ interface SchemaInfo {
35
+ version: string;
36
+ title: string;
37
+ eventDefinitionTypes: string[];
38
+ taskTypes: string[];
39
+ gatewayTypes: string[];
40
+ subprocessTypes: string[];
41
+ }
42
+ declare class PromptTemplateGenerator {
43
+ private options;
44
+ constructor(options?: PromptGeneratorOptions);
45
+ /**
46
+ * Analyze all fixture files to extract patterns and examples
47
+ */
48
+ analyzeFixtures(): Promise<FixtureAnalysis>;
49
+ /**
50
+ * Recursively analyze a node and its children
51
+ */
52
+ private analyzeNode;
53
+ /**
54
+ * Load and parse the schema file
55
+ */
56
+ loadSchema(): Promise<SchemaInfo>;
57
+ /**
58
+ * Generate the complete prompt template
59
+ */
60
+ generate(): Promise<string>;
61
+ /**
62
+ * Build the final template string
63
+ * Output is a clean system prompt that can be directly copied to AI
64
+ */
65
+ private buildTemplate;
66
+ private generateSystemPrompt;
67
+ private generateOutputFormat;
68
+ private generateDimensions;
69
+ private generateStructure;
70
+ private generateEventGuide;
71
+ private generateTaskGuide;
72
+ private generateGatewayRules;
73
+ private generateNamingConventions;
74
+ private generateImportantRules;
75
+ private generateUserPromptTemplate;
76
+ private generateExample;
77
+ private generateSelfCheckList;
78
+ private generateCommonErrors;
79
+ }
80
+ declare function generatePromptTemplate(options?: PromptGeneratorOptions): Promise<string>;
81
+
82
+ export { type PromptGeneratorOptions, PromptTemplateGenerator, generatePromptTemplate };