@ngroznykh/papirus 0.8.0 → 0.8.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.
- package/dist/core/ConnectionManager.d.ts.map +1 -1
- package/dist/core/DiagramRenderer.d.ts.map +1 -1
- package/dist/core/EdgeEndpointUpdater.d.ts +19 -0
- package/dist/core/EdgeEndpointUpdater.d.ts.map +1 -1
- package/dist/elements/Edge.d.ts.map +1 -1
- package/dist/elements/paths/PolylinePathStrategy.d.ts.map +1 -1
- package/dist/elements/paths/routeOrthogonalAround.d.ts +36 -0
- package/dist/elements/paths/routeOrthogonalAround.d.ts.map +1 -1
- package/dist/papirus.js +873 -102
- package/dist/papirus.js.map +1 -1
- package/dist/utils/direction.d.ts +11 -2
- package/dist/utils/direction.d.ts.map +1 -1
- package/dist/utils/routeDebug.d.ts +14 -0
- package/dist/utils/routeDebug.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export type Direction = 'top' | 'right' | 'bottom' | 'left' | undefined;
|
|
2
|
+
export type OutlineBounds = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
|
-
* Map outline param [0,1) to cardinal direction
|
|
7
|
+
* Map outline param [0,1) to cardinal direction.
|
|
8
|
+
*
|
|
9
|
+
* When `bounds` are provided, uses the same perimeter walk as
|
|
10
|
+
* `Node.getConnectionPointAtOutlineParam` (top → right → bottom → left).
|
|
11
|
+
* Equal-quarter mapping is only a fallback for square-ish shapes / legacy callers —
|
|
12
|
+
* on wide/short nodes it wrongly labels the left half of the bottom edge as `left`.
|
|
4
13
|
*/
|
|
5
|
-
export declare function getDirectionFromOutlineParam(param: number): Exclude<Direction, undefined>;
|
|
14
|
+
export declare function getDirectionFromOutlineParam(param: number, bounds?: OutlineBounds): Exclude<Direction, undefined>;
|
|
6
15
|
export declare function isHorizontal(dir?: string): boolean;
|
|
7
16
|
export declare function isVertical(dir?: string): boolean;
|
|
8
17
|
export declare function isOppositeDirections(fromDir?: string, toDir?: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../src/utils/direction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../src/utils/direction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAkB/B;AAED,wBAAgB,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAO9E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAaxE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporary routing diagnostics for wArchi / papirus debugging.
|
|
3
|
+
*
|
|
4
|
+
* Enable in browser console:
|
|
5
|
+
* localStorage.setItem('papirusRouteDebug', '1')
|
|
6
|
+
* location.reload()
|
|
7
|
+
*
|
|
8
|
+
* Disable:
|
|
9
|
+
* localStorage.removeItem('papirusRouteDebug')
|
|
10
|
+
*/
|
|
11
|
+
export type RouteDebugPayload = Record<string, unknown>;
|
|
12
|
+
export declare function isRouteDebugEnabled(): boolean;
|
|
13
|
+
export declare function routeDebug(tag: string, payload: RouteDebugPayload): void;
|
|
14
|
+
//# sourceMappingURL=routeDebug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeDebug.d.ts","sourceRoot":"","sources":["../../src/utils/routeDebug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,wBAAgB,mBAAmB,IAAI,OAAO,CAY7C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAIxE"}
|