stickyflow 0.5.0 → 0.6.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 +16 -0
- package/dist/binding/index.cjs +9 -9
- package/dist/binding/index.d.cts +4 -4
- package/dist/binding/index.d.ts +4 -4
- package/dist/binding/index.js +3 -3
- package/dist/{chunk-IEHE6WVN.js → chunk-4G2R7PEL.js} +319 -45
- package/dist/chunk-4G2R7PEL.js.map +1 -0
- package/dist/{chunk-L3VJXZFD.cjs → chunk-4LENHH6C.cjs} +15 -15
- package/dist/{chunk-L3VJXZFD.cjs.map → chunk-4LENHH6C.cjs.map} +1 -1
- package/dist/{chunk-LTGF5OHP.js → chunk-FVHVOJS2.js} +395 -89
- package/dist/chunk-FVHVOJS2.js.map +1 -0
- package/dist/{chunk-TWDLOXRM.cjs → chunk-JIJMZMGY.cjs} +18 -18
- package/dist/{chunk-TWDLOXRM.cjs.map → chunk-JIJMZMGY.cjs.map} +1 -1
- package/dist/{chunk-VK3T6O5Z.cjs → chunk-KTNCDNDB.cjs} +33 -33
- package/dist/{chunk-VK3T6O5Z.cjs.map → chunk-KTNCDNDB.cjs.map} +1 -1
- package/dist/{chunk-BODZN3ZI.js → chunk-MFNUJA26.js} +4 -4
- package/dist/{chunk-BODZN3ZI.js.map → chunk-MFNUJA26.js.map} +1 -1
- package/dist/{chunk-7VW2XKVB.js → chunk-ULQZ6CZW.js} +3 -3
- package/dist/{chunk-7VW2XKVB.js.map → chunk-ULQZ6CZW.js.map} +1 -1
- package/dist/{chunk-ZMLQIMJK.cjs → chunk-WQRT5PVT.cjs} +993 -687
- package/dist/chunk-WQRT5PVT.cjs.map +1 -0
- package/dist/{chunk-G7NRK5AG.js → chunk-WRDVNMFS.js} +5 -5
- package/dist/{chunk-G7NRK5AG.js.map → chunk-WRDVNMFS.js.map} +1 -1
- package/dist/{chunk-XY2GZUHC.cjs → chunk-XJ4W6TW4.cjs} +326 -44
- package/dist/chunk-XJ4W6TW4.cjs.map +1 -0
- package/dist/index.cjs +49 -29
- package/dist/index.d.cts +52 -7
- package/dist/index.d.ts +52 -7
- package/dist/index.js +5 -5
- package/dist/interaction/index.cjs +245 -235
- package/dist/interaction/index.cjs.map +1 -1
- package/dist/interaction/index.d.cts +3 -2
- package/dist/interaction/index.d.ts +3 -2
- package/dist/interaction/index.js +17 -7
- package/dist/interaction/index.js.map +1 -1
- package/dist/{render-CgX_y15a.d.ts → render-Db0eSz_s.d.cts} +36 -15
- package/dist/{render-CgX_y15a.d.cts → render-Db0eSz_s.d.ts} +36 -15
- package/dist/{runtime-reWgr7MP.d.cts → runtime-BhivvBeL.d.cts} +2 -2
- package/dist/{runtime-DnUxca3Y.d.ts → runtime-n2yG-_j-.d.ts} +2 -2
- package/dist/{runtimeTypes-D60w6nyF.d.cts → runtimeTypes-CrkMHvVi.d.cts} +2 -2
- package/dist/{runtimeTypes-CEBGueYM.d.ts → runtimeTypes-DnI7mRF5.d.ts} +2 -2
- package/dist/stickyflow-diagram.global.js +35 -35
- package/dist/stickyflow-diagram.global.js.map +1 -1
- package/dist/{types-DvhMpqrL.d.cts → types-BHfUKT4s.d.cts} +1 -1
- package/dist/{types-DYLC_lsk.d.ts → types-D4cH4f1a.d.ts} +1 -1
- package/dist/viewer/index.cjs +9 -9
- package/dist/viewer/index.d.cts +4 -4
- package/dist/viewer/index.d.ts +4 -4
- package/dist/viewer/index.js +4 -4
- package/dist/web-component/index.cjs +6 -6
- package/dist/web-component/index.d.cts +2 -2
- package/dist/web-component/index.d.ts +2 -2
- package/dist/web-component/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-IEHE6WVN.js.map +0 -1
- package/dist/chunk-LTGF5OHP.js.map +0 -1
- package/dist/chunk-XY2GZUHC.cjs.map +0 -1
- package/dist/chunk-ZMLQIMJK.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkJIJMZMGY_cjs = require('./chunk-JIJMZMGY.cjs');
|
|
4
|
+
var chunkWQRT5PVT_cjs = require('./chunk-WQRT5PVT.cjs');
|
|
5
|
+
var chunkXJ4W6TW4_cjs = require('./chunk-XJ4W6TW4.cjs');
|
|
6
6
|
|
|
7
7
|
// src/model/shape/supportedTypes.ts
|
|
8
8
|
var SHAPE_TYPES = [
|
|
@@ -75,8 +75,8 @@ function flattenGroups(groups, buckets) {
|
|
|
75
75
|
|
|
76
76
|
// src/adapters/importJson/assembly.ts
|
|
77
77
|
function sflToImportJson(sfl) {
|
|
78
|
-
const state =
|
|
79
|
-
const collected =
|
|
78
|
+
const state = chunkXJ4W6TW4_cjs.sflToCanvasState(sfl);
|
|
79
|
+
const collected = chunkWQRT5PVT_cjs.collectCanvasObjects(state);
|
|
80
80
|
const canvas = emptyBuckets();
|
|
81
81
|
const { groupBuckets, bucketFor } = createBucketResolver(indexGroupMembership(state.groups), canvas);
|
|
82
82
|
for (const shape of collected.shapes) {
|
|
@@ -107,99 +107,119 @@ function sflToImportJson(sfl) {
|
|
|
107
107
|
|
|
108
108
|
Object.defineProperty(exports, "buildBindingGraph", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkJIJMZMGY_cjs.buildBindingGraph; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "createBindingRuntime", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkJIJMZMGY_cjs.createBindingRuntime; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "createDataSource", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkJIJMZMGY_cjs.createDataSource; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "interactiveElements", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkJIJMZMGY_cjs.interactiveElements; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "renderBound", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkJIJMZMGY_cjs.renderBound; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "decodeColor", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkWQRT5PVT_cjs.decodeColor; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "decodeShadow", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkWQRT5PVT_cjs.decodeShadow; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "defineComponent", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkWQRT5PVT_cjs.defineComponent; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "render", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkWQRT5PVT_cjs.render; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "renderCanvas", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkWQRT5PVT_cjs.renderCanvas; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "sflToRenderInput", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkWQRT5PVT_cjs.sflToRenderInput; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "AXIS_COS", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkXJ4W6TW4_cjs.AXIS_COS; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "AXIS_SIN", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkXJ4W6TW4_cjs.AXIS_SIN; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "CHART_TYPES", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkXJ4W6TW4_cjs.CHART_TYPES; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "DOM_CONTRACT_VERSION", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkXJ4W6TW4_cjs.DOM_CONTRACT_VERSION; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "canonicalize", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkXJ4W6TW4_cjs.canonicalizeSource; }
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "flattenPath", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () { return chunkXJ4W6TW4_cjs.flattenPath; }
|
|
171
175
|
});
|
|
172
176
|
Object.defineProperty(exports, "getComponentDescriptor", {
|
|
173
177
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkXJ4W6TW4_cjs.getComponentDescriptor; }
|
|
175
179
|
});
|
|
176
180
|
Object.defineProperty(exports, "isChartObject", {
|
|
177
181
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkXJ4W6TW4_cjs.isChartObject; }
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "isDimensionObject", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () { return chunkXJ4W6TW4_cjs.isDimensionObject; }
|
|
179
187
|
});
|
|
180
188
|
Object.defineProperty(exports, "isGenericComponent", {
|
|
181
189
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkXJ4W6TW4_cjs.isGenericComponent; }
|
|
183
191
|
});
|
|
184
192
|
Object.defineProperty(exports, "isIsometricObject", {
|
|
185
193
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkXJ4W6TW4_cjs.isIsometricObject; }
|
|
187
195
|
});
|
|
188
196
|
Object.defineProperty(exports, "isPathObject", {
|
|
189
197
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkXJ4W6TW4_cjs.isPathObject; }
|
|
191
199
|
});
|
|
192
200
|
Object.defineProperty(exports, "isSwimlaneObject", {
|
|
193
201
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkXJ4W6TW4_cjs.isSwimlaneObject; }
|
|
195
203
|
});
|
|
196
204
|
Object.defineProperty(exports, "parse", {
|
|
197
205
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkXJ4W6TW4_cjs.parseSource; }
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(exports, "pathBounds", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function () { return chunkXJ4W6TW4_cjs.pathBounds; }
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, "pathToSymbol", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () { return chunkXJ4W6TW4_cjs.pathToSymbol; }
|
|
199
215
|
});
|
|
200
216
|
Object.defineProperty(exports, "sflToCanvasState", {
|
|
201
217
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkXJ4W6TW4_cjs.sflToCanvasState; }
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(exports, "symbolToPath", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
get: function () { return chunkXJ4W6TW4_cjs.symbolToPath; }
|
|
203
223
|
});
|
|
204
224
|
exports.SHAPE_TYPES = SHAPE_TYPES;
|
|
205
225
|
exports.sflToImportJson = sflToImportJson;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Component, G as GenericComponent, a as ComponentDescriptor, R as RollingNumberComponent,
|
|
2
|
-
export { B as Bounds,
|
|
3
|
-
import { S as SflDocument, o as Side } from './runtimeTypes-
|
|
4
|
-
export { B as BindingDiagnostic, a as BindingGraph, b as BindingRuntime, c as BindingRuntimeOptions, d as BindingTarget, e as BindingType, f as BindingValue, g as BoundAssignment, h as BoundHandler, i as BoundProperty, j as DataSource, D as DataSourceContract, E as ElementInfo, k as ElementState, I as InteractiveElements, M as MutableDataSource, l as buildBindingGraph, m as createDataSource, n as interactiveElements } from './runtimeTypes-
|
|
5
|
-
export { R as RenderBoundOptions, c as createBindingRuntime, r as renderBound } from './runtime-
|
|
1
|
+
import { C as Component, G as GenericComponent, a as ComponentDescriptor, P as PathPoint, b as Point, R as RollingNumberComponent, c as RollingNumberComponentStyle, d as RulerComponent, T as TickScaleComponent, I as IsometricFace, D as Diagnostic, S as Shader, e as RenderInput, f as ShadowStyle, L as LinkStyle, g as Shape, h as Link, F as Frame, i as Swimlane, j as IsometricObject, k as FreeformPath, l as Chart } from './render-Db0eSz_s.cjs';
|
|
2
|
+
export { B as Bounds, m as CHART_TYPES, n as ChartAxis, o as ChartRamp, p as ChartSeries, q as ChartType, r as ComponentDefinition, s as ComponentGroup, t as ComponentInteraction, u as ComponentPropertyDescriptor, v as ComponentSceneContext, w as ComponentSize, x as ComponentValue, y as ComponentValueDescriptor, z as ComponentValueType, A as Dimension, M as MeasureTextFactory, E as RenderDiagnostic, H as RenderNode, J as RenderOptions, K as RenderResult, N as RenderScene, O as SceneRole, Q as ShaderParameter, U as ShapeType, V as TextMetrics, W as defineComponent, X as render, Y as renderCanvas } from './render-Db0eSz_s.cjs';
|
|
3
|
+
import { S as SflDocument, o as Side } from './runtimeTypes-CrkMHvVi.cjs';
|
|
4
|
+
export { B as BindingDiagnostic, a as BindingGraph, b as BindingRuntime, c as BindingRuntimeOptions, d as BindingTarget, e as BindingType, f as BindingValue, g as BoundAssignment, h as BoundHandler, i as BoundProperty, j as DataSource, D as DataSourceContract, E as ElementInfo, k as ElementState, I as InteractiveElements, M as MutableDataSource, l as buildBindingGraph, m as createDataSource, n as interactiveElements } from './runtimeTypes-CrkMHvVi.cjs';
|
|
5
|
+
export { R as RenderBoundOptions, c as createBindingRuntime, r as renderBound } from './runtime-BhivvBeL.cjs';
|
|
6
6
|
|
|
7
7
|
declare function isGenericComponent(component: Component): component is GenericComponent;
|
|
8
8
|
|
|
@@ -13,6 +13,28 @@ type ComponentType = string;
|
|
|
13
13
|
declare const AXIS_COS: number;
|
|
14
14
|
declare const AXIS_SIN: number;
|
|
15
15
|
|
|
16
|
+
interface PathCurve {
|
|
17
|
+
points: readonly PathPoint[];
|
|
18
|
+
tension: number;
|
|
19
|
+
closed: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function flattenPath(curve: PathCurve, samples?: number): Point[];
|
|
22
|
+
|
|
23
|
+
interface PathFrame {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}
|
|
29
|
+
interface PathSymbol {
|
|
30
|
+
points: Array<[number, number] | [number, number, number]>;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}
|
|
34
|
+
declare function pathBounds(points: readonly PathPoint[]): PathFrame;
|
|
35
|
+
declare function pathToSymbol(points: readonly PathPoint[]): PathSymbol;
|
|
36
|
+
declare function symbolToPath(points: ReadonlyArray<readonly [number, number] | readonly [number, number, number]>, frame: PathFrame): PathPoint[];
|
|
37
|
+
|
|
16
38
|
declare const SHAPE_TYPES: readonly ["rectangle", "rounded_rectangle", "triangle", "diamond", "hexagon", "oval", "circle", "document", "parallelogram", "trapezoid", "cylinder", "note", "cloud", "predefined_process", "pill", "person", "symbol"];
|
|
17
39
|
|
|
18
40
|
type Widget = Component;
|
|
@@ -155,9 +177,29 @@ type SflChartObject = SflCanvasObject & {
|
|
|
155
177
|
};
|
|
156
178
|
declare function isChartObject(canvasObject: SflCanvasObject): canvasObject is SflChartObject;
|
|
157
179
|
|
|
180
|
+
interface SflDimensionData {
|
|
181
|
+
start: {
|
|
182
|
+
x: number;
|
|
183
|
+
y: number;
|
|
184
|
+
};
|
|
185
|
+
end: {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
};
|
|
189
|
+
offset: number;
|
|
190
|
+
unit?: string;
|
|
191
|
+
}
|
|
192
|
+
type SflDimensionObject = SflCanvasObject & {
|
|
193
|
+
objectType: 'dimension';
|
|
194
|
+
dimension: SflDimensionData;
|
|
195
|
+
};
|
|
196
|
+
declare function isDimensionObject(canvasObject: SflCanvasObject): canvasObject is SflDimensionObject;
|
|
197
|
+
|
|
158
198
|
interface SflIsometricData {
|
|
159
199
|
depth: number;
|
|
160
200
|
icon?: string;
|
|
201
|
+
footprint?: Array<[number, number]>;
|
|
202
|
+
form: 'box' | 'sphere';
|
|
161
203
|
}
|
|
162
204
|
type SflIsometricObject = SflCanvasObject & {
|
|
163
205
|
objectType: 'isometric';
|
|
@@ -169,6 +211,7 @@ interface SflPathData {
|
|
|
169
211
|
points: Array<{
|
|
170
212
|
x: number;
|
|
171
213
|
y: number;
|
|
214
|
+
tension?: number;
|
|
172
215
|
}>;
|
|
173
216
|
tension?: number;
|
|
174
217
|
startMarker?: string;
|
|
@@ -197,10 +240,11 @@ type SflSwimlaneObject = SflCanvasObject & {
|
|
|
197
240
|
};
|
|
198
241
|
declare function isSwimlaneObject(canvasObject: SflCanvasObject): canvasObject is SflSwimlaneObject;
|
|
199
242
|
|
|
200
|
-
type SflCanvasObjectType = 'shape' | 'frame' | 'swimlane' | 'path' | 'chart' | 'component' | 'isometric';
|
|
243
|
+
type SflCanvasObjectType = 'shape' | 'frame' | 'swimlane' | 'path' | 'chart' | 'component' | 'isometric' | 'dimension';
|
|
201
244
|
interface SflSymbolDefinition {
|
|
202
245
|
name: string;
|
|
203
246
|
points: Array<[number, number]>;
|
|
247
|
+
pointTensions?: Array<number | undefined>;
|
|
204
248
|
tension?: number;
|
|
205
249
|
ports?: Array<{
|
|
206
250
|
name: string;
|
|
@@ -230,6 +274,7 @@ interface SflCanvasObject extends SflCanvasObjectBase {
|
|
|
230
274
|
chart?: SflChartData;
|
|
231
275
|
component?: SflComponentData;
|
|
232
276
|
isometric?: SflIsometricData;
|
|
277
|
+
dimension?: SflDimensionData;
|
|
233
278
|
}
|
|
234
279
|
interface SflComponentData {
|
|
235
280
|
type: string;
|
|
@@ -340,4 +385,4 @@ interface SflImportJson {
|
|
|
340
385
|
|
|
341
386
|
declare function sflToImportJson(sfl: string): SflImportJson;
|
|
342
387
|
|
|
343
|
-
export { AXIS_COS, AXIS_SIN, Chart, Component, ComponentDescriptor, type ComponentType, DOM_CONTRACT_VERSION, FreeformPath, GenericComponent, IsometricFace, IsometricObject, RenderInput, RollingNumberComponent, RollingNumberComponentStyle, type RollingNumberWidget, type RollingNumberWidgetStyle, RulerComponent, type RulerWidget, SHAPE_TYPES, type SflCanvasObject, type SflCanvasState, type SflChartObject, type SflGroupOut, type SflImportJson, type SflIsometricObject, type SflLinkOut, type SflPathObject, type SflSwimlaneObject, Shader, TickScaleComponent, type TickScaleWidget, type Widget, type WidgetType, canonicalizeSource as canonicalize, decodeColor, decodeShadow, getComponentDescriptor, isChartObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, sflToCanvasState, sflToImportJson, sflToRenderInput };
|
|
388
|
+
export { AXIS_COS, AXIS_SIN, Chart, Component, ComponentDescriptor, type ComponentType, DOM_CONTRACT_VERSION, FreeformPath, GenericComponent, IsometricFace, IsometricObject, type PathFrame, PathPoint, type PathSymbol, Point, RenderInput, RollingNumberComponent, RollingNumberComponentStyle, type RollingNumberWidget, type RollingNumberWidgetStyle, RulerComponent, type RulerWidget, SHAPE_TYPES, type SflCanvasObject, type SflCanvasState, type SflChartObject, type SflDimensionObject, type SflGroupOut, type SflImportJson, type SflIsometricObject, type SflLinkOut, type SflPathObject, type SflSwimlaneObject, Shader, TickScaleComponent, type TickScaleWidget, type Widget, type WidgetType, canonicalizeSource as canonicalize, decodeColor, decodeShadow, flattenPath, getComponentDescriptor, isChartObject, isDimensionObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, pathBounds, pathToSymbol, sflToCanvasState, sflToImportJson, sflToRenderInput, symbolToPath };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Component, G as GenericComponent, a as ComponentDescriptor, R as RollingNumberComponent,
|
|
2
|
-
export { B as Bounds,
|
|
3
|
-
import { S as SflDocument, o as Side } from './runtimeTypes-
|
|
4
|
-
export { B as BindingDiagnostic, a as BindingGraph, b as BindingRuntime, c as BindingRuntimeOptions, d as BindingTarget, e as BindingType, f as BindingValue, g as BoundAssignment, h as BoundHandler, i as BoundProperty, j as DataSource, D as DataSourceContract, E as ElementInfo, k as ElementState, I as InteractiveElements, M as MutableDataSource, l as buildBindingGraph, m as createDataSource, n as interactiveElements } from './runtimeTypes-
|
|
5
|
-
export { R as RenderBoundOptions, c as createBindingRuntime, r as renderBound } from './runtime-
|
|
1
|
+
import { C as Component, G as GenericComponent, a as ComponentDescriptor, P as PathPoint, b as Point, R as RollingNumberComponent, c as RollingNumberComponentStyle, d as RulerComponent, T as TickScaleComponent, I as IsometricFace, D as Diagnostic, S as Shader, e as RenderInput, f as ShadowStyle, L as LinkStyle, g as Shape, h as Link, F as Frame, i as Swimlane, j as IsometricObject, k as FreeformPath, l as Chart } from './render-Db0eSz_s.js';
|
|
2
|
+
export { B as Bounds, m as CHART_TYPES, n as ChartAxis, o as ChartRamp, p as ChartSeries, q as ChartType, r as ComponentDefinition, s as ComponentGroup, t as ComponentInteraction, u as ComponentPropertyDescriptor, v as ComponentSceneContext, w as ComponentSize, x as ComponentValue, y as ComponentValueDescriptor, z as ComponentValueType, A as Dimension, M as MeasureTextFactory, E as RenderDiagnostic, H as RenderNode, J as RenderOptions, K as RenderResult, N as RenderScene, O as SceneRole, Q as ShaderParameter, U as ShapeType, V as TextMetrics, W as defineComponent, X as render, Y as renderCanvas } from './render-Db0eSz_s.js';
|
|
3
|
+
import { S as SflDocument, o as Side } from './runtimeTypes-DnI7mRF5.js';
|
|
4
|
+
export { B as BindingDiagnostic, a as BindingGraph, b as BindingRuntime, c as BindingRuntimeOptions, d as BindingTarget, e as BindingType, f as BindingValue, g as BoundAssignment, h as BoundHandler, i as BoundProperty, j as DataSource, D as DataSourceContract, E as ElementInfo, k as ElementState, I as InteractiveElements, M as MutableDataSource, l as buildBindingGraph, m as createDataSource, n as interactiveElements } from './runtimeTypes-DnI7mRF5.js';
|
|
5
|
+
export { R as RenderBoundOptions, c as createBindingRuntime, r as renderBound } from './runtime-n2yG-_j-.js';
|
|
6
6
|
|
|
7
7
|
declare function isGenericComponent(component: Component): component is GenericComponent;
|
|
8
8
|
|
|
@@ -13,6 +13,28 @@ type ComponentType = string;
|
|
|
13
13
|
declare const AXIS_COS: number;
|
|
14
14
|
declare const AXIS_SIN: number;
|
|
15
15
|
|
|
16
|
+
interface PathCurve {
|
|
17
|
+
points: readonly PathPoint[];
|
|
18
|
+
tension: number;
|
|
19
|
+
closed: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function flattenPath(curve: PathCurve, samples?: number): Point[];
|
|
22
|
+
|
|
23
|
+
interface PathFrame {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}
|
|
29
|
+
interface PathSymbol {
|
|
30
|
+
points: Array<[number, number] | [number, number, number]>;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}
|
|
34
|
+
declare function pathBounds(points: readonly PathPoint[]): PathFrame;
|
|
35
|
+
declare function pathToSymbol(points: readonly PathPoint[]): PathSymbol;
|
|
36
|
+
declare function symbolToPath(points: ReadonlyArray<readonly [number, number] | readonly [number, number, number]>, frame: PathFrame): PathPoint[];
|
|
37
|
+
|
|
16
38
|
declare const SHAPE_TYPES: readonly ["rectangle", "rounded_rectangle", "triangle", "diamond", "hexagon", "oval", "circle", "document", "parallelogram", "trapezoid", "cylinder", "note", "cloud", "predefined_process", "pill", "person", "symbol"];
|
|
17
39
|
|
|
18
40
|
type Widget = Component;
|
|
@@ -155,9 +177,29 @@ type SflChartObject = SflCanvasObject & {
|
|
|
155
177
|
};
|
|
156
178
|
declare function isChartObject(canvasObject: SflCanvasObject): canvasObject is SflChartObject;
|
|
157
179
|
|
|
180
|
+
interface SflDimensionData {
|
|
181
|
+
start: {
|
|
182
|
+
x: number;
|
|
183
|
+
y: number;
|
|
184
|
+
};
|
|
185
|
+
end: {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
};
|
|
189
|
+
offset: number;
|
|
190
|
+
unit?: string;
|
|
191
|
+
}
|
|
192
|
+
type SflDimensionObject = SflCanvasObject & {
|
|
193
|
+
objectType: 'dimension';
|
|
194
|
+
dimension: SflDimensionData;
|
|
195
|
+
};
|
|
196
|
+
declare function isDimensionObject(canvasObject: SflCanvasObject): canvasObject is SflDimensionObject;
|
|
197
|
+
|
|
158
198
|
interface SflIsometricData {
|
|
159
199
|
depth: number;
|
|
160
200
|
icon?: string;
|
|
201
|
+
footprint?: Array<[number, number]>;
|
|
202
|
+
form: 'box' | 'sphere';
|
|
161
203
|
}
|
|
162
204
|
type SflIsometricObject = SflCanvasObject & {
|
|
163
205
|
objectType: 'isometric';
|
|
@@ -169,6 +211,7 @@ interface SflPathData {
|
|
|
169
211
|
points: Array<{
|
|
170
212
|
x: number;
|
|
171
213
|
y: number;
|
|
214
|
+
tension?: number;
|
|
172
215
|
}>;
|
|
173
216
|
tension?: number;
|
|
174
217
|
startMarker?: string;
|
|
@@ -197,10 +240,11 @@ type SflSwimlaneObject = SflCanvasObject & {
|
|
|
197
240
|
};
|
|
198
241
|
declare function isSwimlaneObject(canvasObject: SflCanvasObject): canvasObject is SflSwimlaneObject;
|
|
199
242
|
|
|
200
|
-
type SflCanvasObjectType = 'shape' | 'frame' | 'swimlane' | 'path' | 'chart' | 'component' | 'isometric';
|
|
243
|
+
type SflCanvasObjectType = 'shape' | 'frame' | 'swimlane' | 'path' | 'chart' | 'component' | 'isometric' | 'dimension';
|
|
201
244
|
interface SflSymbolDefinition {
|
|
202
245
|
name: string;
|
|
203
246
|
points: Array<[number, number]>;
|
|
247
|
+
pointTensions?: Array<number | undefined>;
|
|
204
248
|
tension?: number;
|
|
205
249
|
ports?: Array<{
|
|
206
250
|
name: string;
|
|
@@ -230,6 +274,7 @@ interface SflCanvasObject extends SflCanvasObjectBase {
|
|
|
230
274
|
chart?: SflChartData;
|
|
231
275
|
component?: SflComponentData;
|
|
232
276
|
isometric?: SflIsometricData;
|
|
277
|
+
dimension?: SflDimensionData;
|
|
233
278
|
}
|
|
234
279
|
interface SflComponentData {
|
|
235
280
|
type: string;
|
|
@@ -340,4 +385,4 @@ interface SflImportJson {
|
|
|
340
385
|
|
|
341
386
|
declare function sflToImportJson(sfl: string): SflImportJson;
|
|
342
387
|
|
|
343
|
-
export { AXIS_COS, AXIS_SIN, Chart, Component, ComponentDescriptor, type ComponentType, DOM_CONTRACT_VERSION, FreeformPath, GenericComponent, IsometricFace, IsometricObject, RenderInput, RollingNumberComponent, RollingNumberComponentStyle, type RollingNumberWidget, type RollingNumberWidgetStyle, RulerComponent, type RulerWidget, SHAPE_TYPES, type SflCanvasObject, type SflCanvasState, type SflChartObject, type SflGroupOut, type SflImportJson, type SflIsometricObject, type SflLinkOut, type SflPathObject, type SflSwimlaneObject, Shader, TickScaleComponent, type TickScaleWidget, type Widget, type WidgetType, canonicalizeSource as canonicalize, decodeColor, decodeShadow, getComponentDescriptor, isChartObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, sflToCanvasState, sflToImportJson, sflToRenderInput };
|
|
388
|
+
export { AXIS_COS, AXIS_SIN, Chart, Component, ComponentDescriptor, type ComponentType, DOM_CONTRACT_VERSION, FreeformPath, GenericComponent, IsometricFace, IsometricObject, type PathFrame, PathPoint, type PathSymbol, Point, RenderInput, RollingNumberComponent, RollingNumberComponentStyle, type RollingNumberWidget, type RollingNumberWidgetStyle, RulerComponent, type RulerWidget, SHAPE_TYPES, type SflCanvasObject, type SflCanvasState, type SflChartObject, type SflDimensionObject, type SflGroupOut, type SflImportJson, type SflIsometricObject, type SflLinkOut, type SflPathObject, type SflSwimlaneObject, Shader, TickScaleComponent, type TickScaleWidget, type Widget, type WidgetType, canonicalizeSource as canonicalize, decodeColor, decodeShadow, flattenPath, getComponentDescriptor, isChartObject, isDimensionObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, pathBounds, pathToSymbol, sflToCanvasState, sflToImportJson, sflToRenderInput, symbolToPath };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { buildBindingGraph, createBindingRuntime, createDataSource, interactiveElements, renderBound } from './chunk-
|
|
2
|
-
import { collectCanvasObjects } from './chunk-
|
|
3
|
-
export { decodeColor, decodeShadow, defineComponent, render, renderCanvas, sflToRenderInput } from './chunk-
|
|
4
|
-
import { sflToCanvasState } from './chunk-
|
|
5
|
-
export { AXIS_COS, AXIS_SIN, CHART_TYPES, DOM_CONTRACT_VERSION, canonicalizeSource as canonicalize, getComponentDescriptor, isChartObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, sflToCanvasState } from './chunk-
|
|
1
|
+
export { buildBindingGraph, createBindingRuntime, createDataSource, interactiveElements, renderBound } from './chunk-MFNUJA26.js';
|
|
2
|
+
import { collectCanvasObjects } from './chunk-FVHVOJS2.js';
|
|
3
|
+
export { decodeColor, decodeShadow, defineComponent, render, renderCanvas, sflToRenderInput } from './chunk-FVHVOJS2.js';
|
|
4
|
+
import { sflToCanvasState } from './chunk-4G2R7PEL.js';
|
|
5
|
+
export { AXIS_COS, AXIS_SIN, CHART_TYPES, DOM_CONTRACT_VERSION, canonicalizeSource as canonicalize, flattenPath, getComponentDescriptor, isChartObject, isDimensionObject, isGenericComponent, isIsometricObject, isPathObject, isSwimlaneObject, parseSource as parse, pathBounds, pathToSymbol, sflToCanvasState, symbolToPath } from './chunk-4G2R7PEL.js';
|
|
6
6
|
|
|
7
7
|
// src/model/shape/supportedTypes.ts
|
|
8
8
|
var SHAPE_TYPES = [
|