@uigraph/sdk 1.2.0 → 1.2.2

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,198 @@
1
+ import { t as ComponentInputType } from "./__component-type.CO8FgnQE.mjs";
2
+ import { Edge, Node } from "@xyflow/react";
3
+
4
+ //#region src/types/component.d.ts
5
+ type LinkOrFileValue = {
6
+ fileId?: string;
7
+ url?: string;
8
+ file?: File;
9
+ };
10
+ type ServerComponentField = {
11
+ componentFieldId?: string | null;
12
+ isReadonly?: boolean | null;
13
+ label?: string | null;
14
+ options?: (string | null)[] | null;
15
+ order?: number | null;
16
+ required?: boolean | null;
17
+ type?: string | null;
18
+ data?: any | null;
19
+ };
20
+ type ServerComponentFieldInput = {
21
+ componentFieldId: string;
22
+ type: string;
23
+ label: string;
24
+ order: number;
25
+ required: boolean;
26
+ isReadonly?: boolean | null;
27
+ options?: (string | null)[] | null;
28
+ data?: any | null;
29
+ };
30
+ //#endregion
31
+ //#region src/types/mermaid.d.ts
32
+ interface MermaidNode {
33
+ id: string;
34
+ label: string;
35
+ shape: string;
36
+ subgraph?: string;
37
+ parentSubgraph?: string;
38
+ }
39
+ interface MermaidEdge {
40
+ source: string;
41
+ target: string;
42
+ label?: string;
43
+ type: string;
44
+ isSourceSubgraph?: boolean;
45
+ isTargetSubgraph?: boolean;
46
+ }
47
+ interface SubgraphInfo {
48
+ id: string;
49
+ title: string;
50
+ nodes: string[];
51
+ parentId?: string;
52
+ childrenIds: string[];
53
+ direction?: string;
54
+ }
55
+ interface SubgraphLayout {
56
+ id: string;
57
+ title: string;
58
+ nodes: Map<string, {
59
+ x: number;
60
+ y: number;
61
+ width: number;
62
+ height: number;
63
+ }>;
64
+ width: number;
65
+ height: number;
66
+ position?: {
67
+ x: number;
68
+ y: number;
69
+ };
70
+ parentId?: string;
71
+ }
72
+ type SequenceParticipantType = 'participant' | 'actor' | 'boundary' | 'control' | 'entity' | 'database' | 'collections' | 'queue';
73
+ interface SequenceParticipantLink {
74
+ label: string;
75
+ url: string;
76
+ }
77
+ interface SequenceParticipant {
78
+ id: string;
79
+ name: string;
80
+ alias?: string;
81
+ index: number;
82
+ type: SequenceParticipantType;
83
+ boxId?: string;
84
+ links: SequenceParticipantLink[];
85
+ /** Row the `create participant X` directive introduced this one at. */
86
+ createdAtRow?: number;
87
+ /** Row the `destroy X` directive removed this one at. */
88
+ destroyedAtRow?: number;
89
+ }
90
+ /**
91
+ * Every arrow in https://mermaid.js.org/syntax/sequenceDiagram.html#messages.
92
+ * `head` is what the line ends in, `half`/`reversed` further qualify the
93
+ * half-arrow family (`-|\`, `-//`, `/|-`, …) which draws only one barb, and
94
+ * for the reverse forms draws it at the source end instead of the target end.
95
+ */
96
+ type SequenceArrowHead = 'none' | 'filled' | 'open' | 'cross' | 'bidirectional' | 'half' | 'stick';
97
+ interface SequenceMessage {
98
+ from: string;
99
+ to: string;
100
+ label: string;
101
+ lineStyle: 'solid' | 'dashed';
102
+ arrowType: SequenceArrowHead;
103
+ half?: 'top' | 'bottom';
104
+ reversed?: boolean;
105
+ /** `Alice()->>John` / `Alice->>()John` — connects to a central lifeline point. */
106
+ centralSource?: boolean;
107
+ centralTarget?: boolean;
108
+ /** `A->>+B` / `B-->>-A` activation shorthand. */
109
+ activates?: boolean;
110
+ deactivates?: boolean;
111
+ sequenceNumber?: number;
112
+ rowIndex: number;
113
+ }
114
+ interface SequenceNote {
115
+ placement: 'right of' | 'left of' | 'over';
116
+ participants: string[];
117
+ text: string;
118
+ rowIndex: number;
119
+ }
120
+ type SequenceBlockType = 'loop' | 'alt' | 'opt' | 'par' | 'critical' | 'break' | 'rect';
121
+ interface SequenceBlockSection {
122
+ /** `else`/`and`/`option` branch label; the first section carries the block label. */
123
+ label: string;
124
+ startRow: number;
125
+ endRow: number;
126
+ }
127
+ interface SequenceBlock {
128
+ id: string;
129
+ type: SequenceBlockType;
130
+ label: string;
131
+ /** `rect rgb(0, 255, 0)` background color. */
132
+ color?: string;
133
+ sections: SequenceBlockSection[];
134
+ startRow: number;
135
+ endRow: number;
136
+ depth: number;
137
+ parentId?: string;
138
+ }
139
+ interface SequenceBox {
140
+ id: string;
141
+ label: string;
142
+ color?: string;
143
+ participants: string[];
144
+ }
145
+ interface SequenceActivation {
146
+ participant: string;
147
+ startRow: number;
148
+ endRow: number;
149
+ }
150
+ interface SequenceAutonumber {
151
+ start: number;
152
+ step: number;
153
+ }
154
+ interface SequenceDiagramData {
155
+ participants: SequenceParticipant[];
156
+ messages: SequenceMessage[];
157
+ notes: SequenceNote[];
158
+ blocks: SequenceBlock[];
159
+ boxes: SequenceBox[];
160
+ activations: SequenceActivation[];
161
+ autonumber?: SequenceAutonumber;
162
+ title?: string;
163
+ accTitle?: string;
164
+ accDescr?: string;
165
+ }
166
+ //#endregion
167
+ //#region src/types/rf.d.ts
168
+ type CustomData = {
169
+ source?: 'mermaid';
170
+ componentId?: string;
171
+ src?: string;
172
+ iconSrc?: string;
173
+ childNodes?: string[];
174
+ autoLayout?: boolean;
175
+ componentFields?: RFComponentField[];
176
+ shape?: string;
177
+ serviceTable?: {
178
+ serviceName: string;
179
+ databaseName: string;
180
+ tableName: string;
181
+ };
182
+ title?: string;
183
+ columns?: string[];
184
+ rows?: string[][];
185
+ strokeAnimation?: 'dash';
186
+ };
187
+ interface ReactFlowData {
188
+ nodes: Node<CustomData>[];
189
+ edges: Edge<CustomData>[];
190
+ }
191
+ interface RFComponentField {
192
+ componentFieldId: string;
193
+ type: ComponentInputType;
194
+ label: string;
195
+ data: unknown;
196
+ }
197
+ //#endregion
198
+ export { ServerComponentFieldInput as C, ServerComponentField as S, SequenceParticipantLink as _, MermaidNode as a, SubgraphLayout as b, SequenceAutonumber as c, SequenceBlockType as d, SequenceBox as f, SequenceParticipant as g, SequenceNote as h, MermaidEdge as i, SequenceBlock as l, SequenceMessage as m, RFComponentField as n, SequenceActivation as o, SequenceDiagramData as p, ReactFlowData as r, SequenceArrowHead as s, CustomData as t, SequenceBlockSection as u, SequenceParticipantType as v, LinkOrFileValue as x, SubgraphInfo as y };
@@ -0,0 +1,198 @@
1
+ import { t as ComponentInputType } from "./__component-type.tW2Xh7Xk.cjs";
2
+ import { Edge, Node } from "@xyflow/react";
3
+
4
+ //#region src/types/component.d.ts
5
+ type LinkOrFileValue = {
6
+ fileId?: string;
7
+ url?: string;
8
+ file?: File;
9
+ };
10
+ type ServerComponentField = {
11
+ componentFieldId?: string | null;
12
+ isReadonly?: boolean | null;
13
+ label?: string | null;
14
+ options?: (string | null)[] | null;
15
+ order?: number | null;
16
+ required?: boolean | null;
17
+ type?: string | null;
18
+ data?: any | null;
19
+ };
20
+ type ServerComponentFieldInput = {
21
+ componentFieldId: string;
22
+ type: string;
23
+ label: string;
24
+ order: number;
25
+ required: boolean;
26
+ isReadonly?: boolean | null;
27
+ options?: (string | null)[] | null;
28
+ data?: any | null;
29
+ };
30
+ //#endregion
31
+ //#region src/types/mermaid.d.ts
32
+ interface MermaidNode {
33
+ id: string;
34
+ label: string;
35
+ shape: string;
36
+ subgraph?: string;
37
+ parentSubgraph?: string;
38
+ }
39
+ interface MermaidEdge {
40
+ source: string;
41
+ target: string;
42
+ label?: string;
43
+ type: string;
44
+ isSourceSubgraph?: boolean;
45
+ isTargetSubgraph?: boolean;
46
+ }
47
+ interface SubgraphInfo {
48
+ id: string;
49
+ title: string;
50
+ nodes: string[];
51
+ parentId?: string;
52
+ childrenIds: string[];
53
+ direction?: string;
54
+ }
55
+ interface SubgraphLayout {
56
+ id: string;
57
+ title: string;
58
+ nodes: Map<string, {
59
+ x: number;
60
+ y: number;
61
+ width: number;
62
+ height: number;
63
+ }>;
64
+ width: number;
65
+ height: number;
66
+ position?: {
67
+ x: number;
68
+ y: number;
69
+ };
70
+ parentId?: string;
71
+ }
72
+ type SequenceParticipantType = 'participant' | 'actor' | 'boundary' | 'control' | 'entity' | 'database' | 'collections' | 'queue';
73
+ interface SequenceParticipantLink {
74
+ label: string;
75
+ url: string;
76
+ }
77
+ interface SequenceParticipant {
78
+ id: string;
79
+ name: string;
80
+ alias?: string;
81
+ index: number;
82
+ type: SequenceParticipantType;
83
+ boxId?: string;
84
+ links: SequenceParticipantLink[];
85
+ /** Row the `create participant X` directive introduced this one at. */
86
+ createdAtRow?: number;
87
+ /** Row the `destroy X` directive removed this one at. */
88
+ destroyedAtRow?: number;
89
+ }
90
+ /**
91
+ * Every arrow in https://mermaid.js.org/syntax/sequenceDiagram.html#messages.
92
+ * `head` is what the line ends in, `half`/`reversed` further qualify the
93
+ * half-arrow family (`-|\`, `-//`, `/|-`, …) which draws only one barb, and
94
+ * for the reverse forms draws it at the source end instead of the target end.
95
+ */
96
+ type SequenceArrowHead = 'none' | 'filled' | 'open' | 'cross' | 'bidirectional' | 'half' | 'stick';
97
+ interface SequenceMessage {
98
+ from: string;
99
+ to: string;
100
+ label: string;
101
+ lineStyle: 'solid' | 'dashed';
102
+ arrowType: SequenceArrowHead;
103
+ half?: 'top' | 'bottom';
104
+ reversed?: boolean;
105
+ /** `Alice()->>John` / `Alice->>()John` — connects to a central lifeline point. */
106
+ centralSource?: boolean;
107
+ centralTarget?: boolean;
108
+ /** `A->>+B` / `B-->>-A` activation shorthand. */
109
+ activates?: boolean;
110
+ deactivates?: boolean;
111
+ sequenceNumber?: number;
112
+ rowIndex: number;
113
+ }
114
+ interface SequenceNote {
115
+ placement: 'right of' | 'left of' | 'over';
116
+ participants: string[];
117
+ text: string;
118
+ rowIndex: number;
119
+ }
120
+ type SequenceBlockType = 'loop' | 'alt' | 'opt' | 'par' | 'critical' | 'break' | 'rect';
121
+ interface SequenceBlockSection {
122
+ /** `else`/`and`/`option` branch label; the first section carries the block label. */
123
+ label: string;
124
+ startRow: number;
125
+ endRow: number;
126
+ }
127
+ interface SequenceBlock {
128
+ id: string;
129
+ type: SequenceBlockType;
130
+ label: string;
131
+ /** `rect rgb(0, 255, 0)` background color. */
132
+ color?: string;
133
+ sections: SequenceBlockSection[];
134
+ startRow: number;
135
+ endRow: number;
136
+ depth: number;
137
+ parentId?: string;
138
+ }
139
+ interface SequenceBox {
140
+ id: string;
141
+ label: string;
142
+ color?: string;
143
+ participants: string[];
144
+ }
145
+ interface SequenceActivation {
146
+ participant: string;
147
+ startRow: number;
148
+ endRow: number;
149
+ }
150
+ interface SequenceAutonumber {
151
+ start: number;
152
+ step: number;
153
+ }
154
+ interface SequenceDiagramData {
155
+ participants: SequenceParticipant[];
156
+ messages: SequenceMessage[];
157
+ notes: SequenceNote[];
158
+ blocks: SequenceBlock[];
159
+ boxes: SequenceBox[];
160
+ activations: SequenceActivation[];
161
+ autonumber?: SequenceAutonumber;
162
+ title?: string;
163
+ accTitle?: string;
164
+ accDescr?: string;
165
+ }
166
+ //#endregion
167
+ //#region src/types/rf.d.ts
168
+ type CustomData = {
169
+ source?: 'mermaid';
170
+ componentId?: string;
171
+ src?: string;
172
+ iconSrc?: string;
173
+ childNodes?: string[];
174
+ autoLayout?: boolean;
175
+ componentFields?: RFComponentField[];
176
+ shape?: string;
177
+ serviceTable?: {
178
+ serviceName: string;
179
+ databaseName: string;
180
+ tableName: string;
181
+ };
182
+ title?: string;
183
+ columns?: string[];
184
+ rows?: string[][];
185
+ strokeAnimation?: 'dash';
186
+ };
187
+ interface ReactFlowData {
188
+ nodes: Node<CustomData>[];
189
+ edges: Edge<CustomData>[];
190
+ }
191
+ interface RFComponentField {
192
+ componentFieldId: string;
193
+ type: ComponentInputType;
194
+ label: string;
195
+ data: unknown;
196
+ }
197
+ //#endregion
198
+ export { ServerComponentFieldInput as C, ServerComponentField as S, SequenceParticipantLink as _, MermaidNode as a, SubgraphLayout as b, SequenceAutonumber as c, SequenceBlockType as d, SequenceBox as f, SequenceParticipant as g, SequenceNote as h, MermaidEdge as i, SequenceBlock as l, SequenceMessage as m, RFComponentField as n, SequenceActivation as o, SequenceDiagramData as p, ReactFlowData as r, SequenceArrowHead as s, CustomData as t, SequenceBlockSection as u, SequenceParticipantType as v, LinkOrFileValue as x, SubgraphInfo as y };
@@ -1,4 +1,4 @@
1
- import { f as ServerComponentField } from "./__index.ClK6nImE.cjs";
1
+ import { S as ServerComponentField } from "./__index.YhKZQgFP.cjs";
2
2
  import "./__component-type.tW2Xh7Xk.cjs";
3
3
  import { z } from "zod";
4
4
 
@@ -1,4 +1,4 @@
1
- import { f as ServerComponentField } from "./__index.Bfg50WMf.mjs";
1
+ import { S as ServerComponentField } from "./__index.Bvdu5Kox.mjs";
2
2
  import "./__component-type.CO8FgnQE.mjs";
3
3
  import { z } from "zod";
4
4