@hatiolab/things-scene 3.0.28 → 3.0.30
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/attachments/c0f53288-0c3c-4c51-ad3a-6a0788a4bdb1.png +0 -0
- package/db.sqlite +0 -0
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +3 -23
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +20 -20
- package/logs/application-2022-10-02-12.log +10 -0
- package/logs/connections-2022-09-20-10.log +35 -0
- package/logs/connections-2022-09-20-17.log +35 -0
- package/logs/connections-2022-09-27-15.log +35 -0
- package/logs/connections-2022-09-29-10.log +35 -0
- package/logs/connections-2022-10-02-12.log +35 -0
- package/package.json +1 -1
- package/things-scene-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.d.ts +33 -3
- package/things-scene.mjs +1 -1
- package/logs/application-2022-09-18-22.log +0 -6
- package/logs/application-2022-09-19-17.log +0 -12
- package/logs/application-2022-09-19-23.log +0 -6
- package/logs/application-2022-09-20-09.log +0 -6
- package/logs/application-2022-09-20-10.log +0 -6
- package/logs/connections-2022-09-15-15.log +0 -245
- package/logs/connections-2022-09-15-16.log +0 -35
- package/logs/connections-2022-09-17-16.log +0 -35
- package/logs/connections-2022-09-17-18.log +0 -35
package/things-scene.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { property } from 'lodash'
|
|
2
|
-
|
|
3
1
|
declare module '@hatiolab/things-scene' {
|
|
4
2
|
type Constructor<T = {}> = new (...args: any[]) => T
|
|
5
3
|
type Class = { new (...args: any[]): any }
|
|
@@ -160,7 +158,19 @@ declare module '@hatiolab/things-scene' {
|
|
|
160
158
|
class Anchor {
|
|
161
159
|
constructor({ component, anchor, position }: { component: Component; anchor: string; position: POSITION })
|
|
162
160
|
|
|
161
|
+
component?: Component
|
|
162
|
+
name: string
|
|
163
163
|
position: POSITION
|
|
164
|
+
bounds?: BOUNDS
|
|
165
|
+
type?: 'in' | 'out' | 'inout'
|
|
166
|
+
multiplicity?: boolean
|
|
167
|
+
draw?: (context: CanvasRenderingContext2D, component: Component) => void
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
class LinkEnd {
|
|
171
|
+
component: string /** end component refid */
|
|
172
|
+
anchor: string /** end anchor name of end component */
|
|
173
|
+
position: POSITION /** position of the link end */
|
|
164
174
|
}
|
|
165
175
|
|
|
166
176
|
class Model {
|
|
@@ -208,6 +218,17 @@ declare module '@hatiolab/things-scene' {
|
|
|
208
218
|
|
|
209
219
|
function MoveHandle<TBase extends Constructor>(Base: TBase): TBase
|
|
210
220
|
|
|
221
|
+
function Connectable<TBase extends Constructor>(
|
|
222
|
+
Base: TBase
|
|
223
|
+
): {
|
|
224
|
+
new (...args: any[]): {
|
|
225
|
+
findOutletLines(anchorName: string): Line[]
|
|
226
|
+
findOutletEnds(anchorName: string): Component[]
|
|
227
|
+
findInletLines(anchorName: string): Line[]
|
|
228
|
+
findInletEnds(anchorName: string): Component[]
|
|
229
|
+
}
|
|
230
|
+
} & TBase
|
|
231
|
+
|
|
211
232
|
function MixinHTMLElement<TBase extends Constructor>(
|
|
212
233
|
Base: TBase
|
|
213
234
|
): {
|
|
@@ -256,7 +277,6 @@ declare module '@hatiolab/things-scene' {
|
|
|
256
277
|
model: Model
|
|
257
278
|
hierarchy: Model
|
|
258
279
|
path: Array<DIMENSION>
|
|
259
|
-
anchors: Array<Anchor>
|
|
260
280
|
hidden: boolean
|
|
261
281
|
|
|
262
282
|
get nature(): ComponentNature
|
|
@@ -275,6 +295,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
275
295
|
get center(): POINT
|
|
276
296
|
set center(point: POINT)
|
|
277
297
|
|
|
298
|
+
get anchors(): Array<Anchor>
|
|
278
299
|
get controls(): Array<Control> | undefined
|
|
279
300
|
get hasTextProperty(): boolean
|
|
280
301
|
get textSubstitutor(): () => string
|
|
@@ -369,6 +390,13 @@ declare module '@hatiolab/things-scene' {
|
|
|
369
390
|
class Shape extends Component {}
|
|
370
391
|
class Ellipse extends Shape {}
|
|
371
392
|
class Polygon extends Shape {}
|
|
393
|
+
class Line extends Component {
|
|
394
|
+
get fromAnchor(): Anchor | undefined
|
|
395
|
+
get toAnchor(): Anchor | undefined
|
|
396
|
+
get from(): LinkEnd
|
|
397
|
+
get to(): LinkEnd
|
|
398
|
+
}
|
|
399
|
+
class OrthoLine extends Line {}
|
|
372
400
|
class Donut extends Ellipse {}
|
|
373
401
|
class Rect extends RectPath(Shape) {}
|
|
374
402
|
class HTMLOverlayElement extends MixinHTMLElement(RectPath(Component)) {}
|
|
@@ -552,6 +580,8 @@ declare module '@hatiolab/things-scene' {
|
|
|
552
580
|
|
|
553
581
|
data: object
|
|
554
582
|
|
|
583
|
+
anchorStarterTemplate: object
|
|
584
|
+
|
|
555
585
|
// @deprecated
|
|
556
586
|
variables: object
|
|
557
587
|
|