stickyflow 0.0.0-stage → 0.2.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.
- package/CHANGELOG.md +157 -0
- package/LICENSE +202 -0
- package/README.md +167 -2
- package/dist/chunk-34PK7HEU.cjs +842 -0
- package/dist/chunk-34PK7HEU.cjs.map +1 -0
- package/dist/chunk-6JKNT2YC.js +4685 -0
- package/dist/chunk-6JKNT2YC.js.map +1 -0
- package/dist/chunk-6LQJUAD4.js +801 -0
- package/dist/chunk-6LQJUAD4.js.map +1 -0
- package/dist/chunk-IIOJFR73.cjs +3671 -0
- package/dist/chunk-IIOJFR73.cjs.map +1 -0
- package/dist/chunk-KFJIFHXG.js +8559 -0
- package/dist/chunk-KFJIFHXG.js.map +1 -0
- package/dist/chunk-N6WVHOUQ.js +3665 -0
- package/dist/chunk-N6WVHOUQ.js.map +1 -0
- package/dist/chunk-S5BVAAEF.cjs +8568 -0
- package/dist/chunk-S5BVAAEF.cjs.map +1 -0
- package/dist/chunk-YM3XFBI4.cjs +4814 -0
- package/dist/chunk-YM3XFBI4.cjs.map +1 -0
- package/dist/index.cjs +1167 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +335 -0
- package/dist/index.d.ts +335 -0
- package/dist/index.js +1097 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/index.cjs +7358 -0
- package/dist/interaction/index.cjs.map +1 -0
- package/dist/interaction/index.d.cts +273 -0
- package/dist/interaction/index.d.ts +273 -0
- package/dist/interaction/index.js +7333 -0
- package/dist/interaction/index.js.map +1 -0
- package/dist/render-r1GYvjNm.d.cts +970 -0
- package/dist/render-r1GYvjNm.d.ts +970 -0
- package/dist/runtimeTypes-ByiafBwg.d.ts +239 -0
- package/dist/runtimeTypes-DwLeD-em.d.cts +239 -0
- package/dist/stickyflow-diagram.global.js +1442 -0
- package/dist/stickyflow-diagram.global.js.map +1 -0
- package/dist/types-T7W2yTQF.d.cts +116 -0
- package/dist/types-ndGA1kbl.d.ts +116 -0
- package/dist/viewer/index.cjs +31 -0
- package/dist/viewer/index.cjs.map +1 -0
- package/dist/viewer/index.d.cts +44 -0
- package/dist/viewer/index.d.ts +44 -0
- package/dist/viewer/index.js +6 -0
- package/dist/viewer/index.js.map +1 -0
- package/dist/web-component/index.cjs +144 -0
- package/dist/web-component/index.cjs.map +1 -0
- package/dist/web-component/index.d.cts +31 -0
- package/dist/web-component/index.d.ts +31 -0
- package/dist/web-component/index.js +141 -0
- package/dist/web-component/index.js.map +1 -0
- package/package.json +81 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { I as IsometricFace, D as Diagnostic, S as Shader, R as RenderInput, a as ShadowStyle, L as LinkStyle, b as Shape, c as Link, F as Frame, d as Swimlane, e as IsometricObject, f as FreeformPath, C as Chart, g as RenderOptions, h as RenderResult } from './render-r1GYvjNm.js';
|
|
2
|
+
export { B as Bounds, i as CHART_TYPES, j as ChartAxis, k as ChartRamp, l as ChartSeries, m as ChartType, M as MeasureTextFactory, P as PathPoint, n as Point, o as RenderDiagnostic, p as RenderNode, q as RenderScene, r as RollingNumberWidget, s as RollingNumberWidgetStyle, t as RulerWidget, u as SceneRole, v as ShaderParameter, w as ShapeType, T as TextMetrics, x as TickScaleWidget, W as Widget, y as WidgetType, z as render, A as renderCanvas } from './render-r1GYvjNm.js';
|
|
3
|
+
import { S as SflDocument, a as Side, R as Row, B as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-ByiafBwg.js';
|
|
4
|
+
export { c as BindingDiagnostic, d as BindingGraph, e as BindingTarget, f as BindingType, g as BindingValue, h as BoundAssignment, i as BoundHandler, j as BoundProperty, D as DataSource, k as DataSourceContract, E as ElementInfo, l as ElementState, I as InteractiveElements, M as MutableDataSource, m as buildBindingGraph, n as createDataSource, o as interactiveElements } from './runtimeTypes-ByiafBwg.js';
|
|
5
|
+
|
|
6
|
+
declare const AXIS_COS: number;
|
|
7
|
+
declare const AXIS_SIN: number;
|
|
8
|
+
|
|
9
|
+
declare const SHAPE_TYPES: readonly ["rectangle", "rounded_rectangle", "triangle", "diamond", "hexagon", "oval", "circle", "document", "parallelogram", "trapezoid", "cylinder", "note", "cloud", "predefined_process", "pill", "person", "symbol"];
|
|
10
|
+
|
|
11
|
+
declare function canonicalizeSource(sflText: string): string;
|
|
12
|
+
|
|
13
|
+
declare function parseSource(input: string): SflDocument;
|
|
14
|
+
|
|
15
|
+
interface SflConnectionOut {
|
|
16
|
+
id: string;
|
|
17
|
+
fromId?: string;
|
|
18
|
+
toId?: string;
|
|
19
|
+
fromFace: IsometricFace;
|
|
20
|
+
toFace: IsometricFace;
|
|
21
|
+
order?: number;
|
|
22
|
+
sourceIndex?: number;
|
|
23
|
+
props: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface SflLinkOut {
|
|
27
|
+
id: string;
|
|
28
|
+
fromId?: string;
|
|
29
|
+
toId?: string;
|
|
30
|
+
text?: string;
|
|
31
|
+
fromSide?: Side;
|
|
32
|
+
fromFraction?: number;
|
|
33
|
+
toSide?: Side;
|
|
34
|
+
toFraction?: number;
|
|
35
|
+
fromPort?: string;
|
|
36
|
+
toPort?: string;
|
|
37
|
+
order?: number;
|
|
38
|
+
sourceIndex?: number;
|
|
39
|
+
segments?: number[];
|
|
40
|
+
props: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface SflChartData {
|
|
44
|
+
chartType: 'bar' | 'line' | 'scatter' | 'radar' | 'radial' | 'field' | 'heatmap' | 'boxplot' | 'sankey' | 'treemap' | 'mekko' | 'hexbin' | 'pie' | 'radialBar' | 'polarArea' | 'custom';
|
|
45
|
+
categories?: string[];
|
|
46
|
+
areaOpacity?: number;
|
|
47
|
+
stacked?: 'none' | 'true' | 'percent' | 'waterfall';
|
|
48
|
+
scale?: string;
|
|
49
|
+
interpolate?: 'idw';
|
|
50
|
+
idwPower?: number;
|
|
51
|
+
isolines?: number[];
|
|
52
|
+
zones?: Array<{
|
|
53
|
+
label: string;
|
|
54
|
+
color?: string;
|
|
55
|
+
offsetX?: number;
|
|
56
|
+
offsetY?: number;
|
|
57
|
+
}>;
|
|
58
|
+
boxWidth?: number;
|
|
59
|
+
orientation?: 'horizontal' | 'vertical';
|
|
60
|
+
lineTension?: number;
|
|
61
|
+
highlightPoints?: number[];
|
|
62
|
+
barCornerRadius?: number;
|
|
63
|
+
showBoxplotPoints?: boolean;
|
|
64
|
+
barBorderColor?: string;
|
|
65
|
+
barBorderWidth?: number;
|
|
66
|
+
barGroupGap?: number;
|
|
67
|
+
barGlow?: number;
|
|
68
|
+
barGap?: number;
|
|
69
|
+
mekkoVaryHeight?: boolean;
|
|
70
|
+
hexRadius?: number;
|
|
71
|
+
innerRadius?: number;
|
|
72
|
+
pieCornerRadius?: number;
|
|
73
|
+
pieSliceGap?: number;
|
|
74
|
+
ringThickness?: number;
|
|
75
|
+
ringGap?: number;
|
|
76
|
+
cellGap?: number;
|
|
77
|
+
showValues?: boolean;
|
|
78
|
+
squareCells?: boolean;
|
|
79
|
+
headerColor?: string;
|
|
80
|
+
tileGradient?: boolean;
|
|
81
|
+
showColumnBackdrop?: boolean;
|
|
82
|
+
labelPosition?: 'outside' | 'inside';
|
|
83
|
+
labelOrientation?: 'horizontal' | 'vertical';
|
|
84
|
+
labelColor?: string;
|
|
85
|
+
linkGradient?: boolean;
|
|
86
|
+
connectPoints?: boolean;
|
|
87
|
+
reverseComparison?: boolean;
|
|
88
|
+
axisX: {
|
|
89
|
+
min: number;
|
|
90
|
+
max: number;
|
|
91
|
+
step: number;
|
|
92
|
+
label?: string;
|
|
93
|
+
unit?: string;
|
|
94
|
+
thresholds?: number[];
|
|
95
|
+
};
|
|
96
|
+
axisY: {
|
|
97
|
+
min: number;
|
|
98
|
+
max: number;
|
|
99
|
+
step: number;
|
|
100
|
+
label?: string;
|
|
101
|
+
unit?: string;
|
|
102
|
+
thresholds?: number[];
|
|
103
|
+
};
|
|
104
|
+
series: SflChartSeries[];
|
|
105
|
+
rules: Array<{
|
|
106
|
+
id: string;
|
|
107
|
+
at: number;
|
|
108
|
+
text?: string;
|
|
109
|
+
color?: string;
|
|
110
|
+
strokeWidth?: number;
|
|
111
|
+
dash?: number[];
|
|
112
|
+
}>;
|
|
113
|
+
}
|
|
114
|
+
interface SflChartSeries {
|
|
115
|
+
id: string;
|
|
116
|
+
label: string;
|
|
117
|
+
color?: string;
|
|
118
|
+
colors?: Array<string | null>;
|
|
119
|
+
opacity?: number;
|
|
120
|
+
group?: string;
|
|
121
|
+
values: number[] | [number, number][] | [number, number, number][] | [number, number, number, number][];
|
|
122
|
+
error?: Array<number | [number, number] | null>;
|
|
123
|
+
source?: string;
|
|
124
|
+
target?: string;
|
|
125
|
+
size?: number;
|
|
126
|
+
symbol?: {
|
|
127
|
+
points: Array<[number, number]>;
|
|
128
|
+
normalized?: boolean;
|
|
129
|
+
tension?: number;
|
|
130
|
+
};
|
|
131
|
+
stroke?: string;
|
|
132
|
+
strokeWidth?: number;
|
|
133
|
+
dash?: number[];
|
|
134
|
+
offset?: number;
|
|
135
|
+
labelOffsetX?: number;
|
|
136
|
+
labelOffsetY?: number;
|
|
137
|
+
}
|
|
138
|
+
type SflChartObject = SflCanvasObject & {
|
|
139
|
+
objectType: 'chart';
|
|
140
|
+
chart: SflChartData;
|
|
141
|
+
};
|
|
142
|
+
declare function isChartObject(canvasObject: SflCanvasObject): canvasObject is SflChartObject;
|
|
143
|
+
|
|
144
|
+
interface SflIsometricData {
|
|
145
|
+
depth: number;
|
|
146
|
+
icon?: string;
|
|
147
|
+
}
|
|
148
|
+
type SflIsometricObject = SflCanvasObject & {
|
|
149
|
+
objectType: 'isometric';
|
|
150
|
+
isometric: SflIsometricData;
|
|
151
|
+
};
|
|
152
|
+
declare function isIsometricObject(canvasObject: SflCanvasObject): canvasObject is SflIsometricObject;
|
|
153
|
+
|
|
154
|
+
interface SflPathData {
|
|
155
|
+
points: Array<{
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
}>;
|
|
159
|
+
tension?: number;
|
|
160
|
+
startMarker?: string;
|
|
161
|
+
endMarker?: string;
|
|
162
|
+
closed?: boolean;
|
|
163
|
+
value?: number;
|
|
164
|
+
}
|
|
165
|
+
type SflPathObject = SflCanvasObject & {
|
|
166
|
+
objectType: 'path';
|
|
167
|
+
path: SflPathData;
|
|
168
|
+
};
|
|
169
|
+
declare function isPathObject(canvasObject: SflCanvasObject): canvasObject is SflPathObject;
|
|
170
|
+
|
|
171
|
+
interface SflSwimlaneData {
|
|
172
|
+
orientation: 'horizontal' | 'vertical';
|
|
173
|
+
lanes: Array<{
|
|
174
|
+
id: string;
|
|
175
|
+
label: string;
|
|
176
|
+
size: number;
|
|
177
|
+
color?: string;
|
|
178
|
+
}>;
|
|
179
|
+
}
|
|
180
|
+
type SflSwimlaneObject = SflCanvasObject & {
|
|
181
|
+
objectType: 'swimlane';
|
|
182
|
+
swimlane: SflSwimlaneData;
|
|
183
|
+
};
|
|
184
|
+
declare function isSwimlaneObject(canvasObject: SflCanvasObject): canvasObject is SflSwimlaneObject;
|
|
185
|
+
|
|
186
|
+
type SflCanvasObjectType = 'shape' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric';
|
|
187
|
+
interface SflSymbolDefinition {
|
|
188
|
+
name: string;
|
|
189
|
+
points: Array<[number, number]>;
|
|
190
|
+
tension?: number;
|
|
191
|
+
ports?: Array<{
|
|
192
|
+
name: string;
|
|
193
|
+
at: [number, number];
|
|
194
|
+
}>;
|
|
195
|
+
}
|
|
196
|
+
interface SflCanvasObjectBase {
|
|
197
|
+
id: string;
|
|
198
|
+
kind: string;
|
|
199
|
+
text?: string;
|
|
200
|
+
x: number;
|
|
201
|
+
y: number;
|
|
202
|
+
width: number;
|
|
203
|
+
height: number;
|
|
204
|
+
rotation?: number;
|
|
205
|
+
order?: number;
|
|
206
|
+
sourceIndex?: number;
|
|
207
|
+
parentFrameId?: string;
|
|
208
|
+
props: Record<string, string>;
|
|
209
|
+
}
|
|
210
|
+
interface SflCanvasObject extends SflCanvasObjectBase {
|
|
211
|
+
objectType: SflCanvasObjectType;
|
|
212
|
+
shapeType?: string;
|
|
213
|
+
symbol?: SflSymbolDefinition;
|
|
214
|
+
swimlane?: SflSwimlaneData;
|
|
215
|
+
path?: SflPathData;
|
|
216
|
+
chart?: SflChartData;
|
|
217
|
+
widget?: SflWidgetData;
|
|
218
|
+
isometric?: SflIsometricData;
|
|
219
|
+
}
|
|
220
|
+
interface SflWidgetData {
|
|
221
|
+
type: string;
|
|
222
|
+
value: string;
|
|
223
|
+
digits?: number;
|
|
224
|
+
duration?: number;
|
|
225
|
+
min?: number;
|
|
226
|
+
max?: number;
|
|
227
|
+
label?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
interface SflGroupOut {
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
color?: string;
|
|
234
|
+
icon?: string;
|
|
235
|
+
canvasObjectIds: string[];
|
|
236
|
+
subGroups: SflGroupOut[];
|
|
237
|
+
parentFrameId?: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
type SflDiagnostic = Diagnostic;
|
|
241
|
+
interface SflCanvasState {
|
|
242
|
+
canvasObjects: SflCanvasObject[];
|
|
243
|
+
links: SflLinkOut[];
|
|
244
|
+
connections: SflConnectionOut[];
|
|
245
|
+
groups: SflGroupOut[];
|
|
246
|
+
diagnostics: SflDiagnostic[];
|
|
247
|
+
shaders?: Shader[];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare function sflToCanvasState(source: string): SflCanvasState;
|
|
251
|
+
|
|
252
|
+
declare function sflToRenderInput(sfl: string): RenderInput;
|
|
253
|
+
|
|
254
|
+
interface GradientStop {
|
|
255
|
+
position: number;
|
|
256
|
+
color: string;
|
|
257
|
+
}
|
|
258
|
+
interface GradientFill {
|
|
259
|
+
type: 'gradient';
|
|
260
|
+
angle: number;
|
|
261
|
+
stops: GradientStop[];
|
|
262
|
+
}
|
|
263
|
+
interface MeshPoint {
|
|
264
|
+
id: string;
|
|
265
|
+
x: number;
|
|
266
|
+
y: number;
|
|
267
|
+
color: string;
|
|
268
|
+
}
|
|
269
|
+
interface MeshFill {
|
|
270
|
+
type: 'mesh';
|
|
271
|
+
points: MeshPoint[];
|
|
272
|
+
}
|
|
273
|
+
type DecodedColor = string | GradientFill | MeshFill;
|
|
274
|
+
declare function decodeColor(source?: string): DecodedColor | undefined;
|
|
275
|
+
|
|
276
|
+
declare function decodeShadow(source?: string): ShadowStyle | undefined;
|
|
277
|
+
|
|
278
|
+
declare const DOM_CONTRACT_VERSION = 1;
|
|
279
|
+
|
|
280
|
+
interface Connection {
|
|
281
|
+
id: string;
|
|
282
|
+
fromId?: string;
|
|
283
|
+
toId?: string;
|
|
284
|
+
fromFace: IsometricFace;
|
|
285
|
+
toFace: IsometricFace;
|
|
286
|
+
style?: LinkStyle;
|
|
287
|
+
order?: number;
|
|
288
|
+
sourceIndex?: number;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
interface ImportBuckets {
|
|
292
|
+
notes: never[];
|
|
293
|
+
shapes: Shape[];
|
|
294
|
+
links: Link[];
|
|
295
|
+
}
|
|
296
|
+
interface ImportGroup {
|
|
297
|
+
id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
color: string | undefined;
|
|
300
|
+
icon: string | undefined;
|
|
301
|
+
parent_group_id: string | undefined;
|
|
302
|
+
parent_frame_id: string | undefined;
|
|
303
|
+
entities: ImportBuckets;
|
|
304
|
+
}
|
|
305
|
+
interface SflImportCanvasEntities extends ImportBuckets {
|
|
306
|
+
frames: Frame[];
|
|
307
|
+
swimlanes: Swimlane[];
|
|
308
|
+
isometricObjects: IsometricObject[];
|
|
309
|
+
paths: FreeformPath[];
|
|
310
|
+
charts: Chart[];
|
|
311
|
+
connections: Connection[];
|
|
312
|
+
}
|
|
313
|
+
interface SflImportJson {
|
|
314
|
+
project: {
|
|
315
|
+
export_type: 'stickyflow_canvas_v3';
|
|
316
|
+
name: string;
|
|
317
|
+
};
|
|
318
|
+
canvas: {
|
|
319
|
+
entities: SflImportCanvasEntities;
|
|
320
|
+
};
|
|
321
|
+
layers: {
|
|
322
|
+
groups: ImportGroup[];
|
|
323
|
+
};
|
|
324
|
+
diagnostics: SflDiagnostic[];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
declare function sflToImportJson(sfl: string): SflImportJson;
|
|
328
|
+
|
|
329
|
+
declare function createBindingRuntime(sfl: string, options?: BindingRuntimeOptions): BindingRuntime;
|
|
330
|
+
interface RenderBoundOptions extends RenderOptions {
|
|
331
|
+
data?: Record<string, Row | Row[]>;
|
|
332
|
+
}
|
|
333
|
+
declare function renderBound(sfl: string, options?: RenderBoundOptions): RenderResult;
|
|
334
|
+
|
|
335
|
+
export { AXIS_COS, AXIS_SIN, BindingRuntime, BindingRuntimeOptions, Chart, DOM_CONTRACT_VERSION, FreeformPath, IsometricFace, IsometricObject, type RenderBoundOptions, RenderInput, RenderOptions, RenderResult, SHAPE_TYPES, type SflCanvasObject, type SflCanvasState, type SflChartObject, type SflGroupOut, type SflImportJson, type SflIsometricObject, type SflLinkOut, type SflPathObject, type SflSwimlaneObject, Shader, canonicalizeSource as canonicalize, createBindingRuntime, decodeColor, decodeShadow, isChartObject, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, renderBound, sflToCanvasState, sflToImportJson, sflToRenderInput };
|