presenter 0.7.0 → 0.7.1
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/export.js +21 -21
- package/dist/export.mjs +559 -523
- package/dist/presenter.js +2 -2
- package/dist/presenter.mjs +723 -687
- package/dist/renderer/browser-canvas/utils/clipToPath.d.ts +7 -0
- package/dist/utils/objects/circle/getCircleInsetFillPath.d.ts +7 -0
- package/dist/utils/objects/rectangle/getRectangleInsetFillPath.d.ts +7 -0
- package/package.json +3 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UnifiedCanvasContext } from '../types/UnifiedCanvasContext';
|
|
2
|
+
import { UnifiedPath2D } from '../types/UnifiedPath2D';
|
|
3
|
+
/**
|
|
4
|
+
* Clips the canvas context to the interior of the given path.
|
|
5
|
+
* Must be called between ctx.context.save() and ctx.context.restore().
|
|
6
|
+
*/
|
|
7
|
+
export declare function clipToPath(ctx: UnifiedCanvasContext, path: UnifiedPath2D): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Circle } from '../../../objects/Circle';
|
|
2
|
+
import { UnifiedPath2D } from '../../../renderer/browser-canvas/types/UnifiedPath2D';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a circle path that is smaller than the original by half the border width.
|
|
5
|
+
* This is used as a clip region when drawing semi-transparent shapes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCircleInsetFillPath(circle: Circle, createPath: () => UnifiedPath2D): UnifiedPath2D | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from '../../../objects/Rectangle';
|
|
2
|
+
import { UnifiedPath2D } from '../../../renderer/browser-canvas/types/UnifiedPath2D';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a rectangle path that is smaller than the original by half the border width
|
|
5
|
+
* on each side. This is used as a clip region when drawing semi-transparent shapes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getRectangleInsetFillPath(rectangle: Rectangle, createPath: () => UnifiedPath2D): UnifiedPath2D | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presenter",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A JavaScript presentation library",
|
|
5
5
|
"main": "dist/presenter.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "vite build && vite build --config vite.config.export.ts",
|
|
24
|
+
"bump-version": "sh scripts/bump-version.sh",
|
|
24
25
|
"watch": "vite build --watch",
|
|
25
26
|
"prettier": "prettier . --write --ignore-unknown",
|
|
26
27
|
"prepare": "husky",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"globals": "^16.3.0",
|
|
56
57
|
"husky": "^9.1.7",
|
|
57
58
|
"jest": "^29.7.0",
|
|
58
|
-
"jest-environment-jsdom": "^
|
|
59
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
59
60
|
"jiti": "^2.6.1",
|
|
60
61
|
"prettier": "^3.6.2",
|
|
61
62
|
"ts-jest": "^29.4.5",
|