presenter 0.7.0 → 0.7.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.
@@ -0,0 +1,3 @@
1
+ import { SVG } from '../../../objects/SVG';
2
+ import { BrowserCanvasObjectRenderer } from '../types/BrowserCanvasObjectRenderer';
3
+ export declare const renderSvg: BrowserCanvasObjectRenderer<SVG>;
@@ -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;
@@ -9,6 +9,7 @@ export declare const ObjectType: {
9
9
  readonly POLYGON: "Polygon";
10
10
  readonly RECTANGLE: "Rectangle";
11
11
  readonly SLIDE_OBJECT: "SlideObject";
12
+ readonly SVG: "SVG";
12
13
  readonly TEXT: "Text";
13
14
  };
14
15
  export type ObjectType = (typeof ObjectType)[keyof typeof ObjectType];
@@ -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;
@@ -0,0 +1,7 @@
1
+ import { Presentation } from '../../types/Presentation';
2
+ /**
3
+ * Extracts all SVG objects from slides and returns a mapping from image ID to URL.
4
+ * In the case of SVGs, the image URL and path are both the SVG string itself.
5
+ * SVG strings are transformed into data URLs in the image loading process.
6
+ */
7
+ export declare function getSvgImageUrlById(presentation: Presentation): Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presenter",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
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": "^29.7.0",
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",