presenter 0.7.1 → 0.7.3

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>;
@@ -1,10 +1,5 @@
1
1
  import { ObjectType } from '../../../types/ObjectType';
2
- import { SlideObject } from '../../../types/SlideObject';
3
2
  import { BrowserCanvasObjectRenderer } from '../types/BrowserCanvasObjectRenderer';
4
- type ObjectRendererMap = {
5
- [T in ObjectType]: BrowserCanvasObjectRenderer<SlideObject & {
6
- objectType: T;
7
- }>;
8
- };
3
+ type ObjectRendererMap = Record<ObjectType, BrowserCanvasObjectRenderer<any>>;
9
4
  export declare const DEFAULT_OBJECT_RENDERERS: ObjectRendererMap;
10
5
  export {};
@@ -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];
@@ -1,2 +1,2 @@
1
1
  import { Interpolator } from '../../types/Interpolator';
2
- export declare const DEFAULT_INTERPOLATORS: Interpolator<unknown>[];
2
+ export declare const DEFAULT_INTERPOLATORS: Interpolator<any>[];
@@ -1,3 +1,3 @@
1
1
  import { Interpolator } from '../../types/Interpolator';
2
2
  import { SlideObject } from '../../types/SlideObject';
3
- export declare function interpolate<T extends SlideObject>(object: T, props: Partial<T>, proportion: number, customInterpolators?: Interpolator<unknown>[] | null): T;
3
+ export declare function interpolate<T extends SlideObject>(object: T, props: Partial<T>, proportion: number, customInterpolators?: Interpolator<any>[] | null): T;
@@ -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.1",
3
+ "version": "0.7.3",
4
4
  "description": "A JavaScript presentation library",
5
5
  "main": "dist/presenter.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,6 +50,7 @@
50
50
  "@types/d3-ease": "^3.0.2",
51
51
  "@types/flubber": "^0.4.0",
52
52
  "@types/jest": "^30.0.0",
53
+ "@types/node": "^25.5.2",
53
54
  "ajv": "^8.18.0",
54
55
  "eslint": "^9.35.0",
55
56
  "eslint-plugin-simple-import-sort": "^12.1.1",
@@ -59,9 +60,9 @@
59
60
  "jest-environment-jsdom": "^30.3.0",
60
61
  "jiti": "^2.6.1",
61
62
  "prettier": "^3.6.2",
62
- "ts-jest": "^29.4.5",
63
- "typescript": "^5.9.2",
64
- "typescript-eslint": "^8.43.0",
63
+ "ts-jest": "^29.4.9",
64
+ "typescript": "^6.0.2",
65
+ "typescript-eslint": "^8.58.0",
65
66
  "vite": "^6.1.0",
66
67
  "vite-plugin-dts": "^4.5.4"
67
68
  },