@ngroznykh/papirus 0.9.12 → 0.9.13

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,10 @@
1
+ /** Screen cell smaller than this is hard to use as an orientation cue. */
2
+ export declare const MIN_GRID_SCREEN_PX = 16;
3
+ /** Screen cell larger than this is a huge empty square — drop to the next finer step. */
4
+ export declare const MAX_GRID_SCREEN_PX = 32;
5
+ /**
6
+ * World step that keeps the visible grid cell in a Miro-like range.
7
+ * The base `gridSize` is doubled or halved so the screen size stays ~16–32 px.
8
+ */
9
+ export declare function adaptiveGridStep(gridSize: number, zoom: number): number;
10
+ //# sourceMappingURL=adaptiveGridStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adaptiveGridStep.d.ts","sourceRoot":"","sources":["../../src/utils/adaptiveGridStep.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBvE"}
@@ -0,0 +1,12 @@
1
+ import { Bounds, EdgePathType, Point } from '../types';
2
+ export interface EdgePathViewportInput {
3
+ path: readonly Point[];
4
+ type?: EdgePathType;
5
+ }
6
+ /**
7
+ * True when the drawn edge path meets the viewport.
8
+ * AABB-only cull keeps fat bezier control boxes on the walk even when the
9
+ * curve never enters the view. Empty path stays visible for the first layout.
10
+ */
11
+ export declare function edgePathIntersectsViewport(input: EdgePathViewportInput, viewport: Bounds): boolean;
12
+ //# sourceMappingURL=pathViewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathViewport.d.ts","sourceRoot":"","sources":["../../src/utils/pathViewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQ3D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,qBAAqB,EAC5B,QAAQ,EAAE,MAAM,GACf,OAAO,CAgBT"}
@@ -0,0 +1,4 @@
1
+ /** Skip fillText when the glyph would be smaller than this many device pixels. */
2
+ export declare const MIN_SCREEN_FONT_PX = 7;
3
+ export declare function isScreenFontReadable(ctx: CanvasRenderingContext2D, fontSize: number): boolean;
4
+ //# sourceMappingURL=screenText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenText.d.ts","sourceRoot":"","sources":["../../src/utils/screenText.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAkBpC,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM7F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngroznykh/papirus",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "TypeScript library for building interactive 2D diagrams and flowcharts on HTML Canvas",
5
5
  "type": "module",
6
6
  "engines": {