@umituz/web-canvas 1.0.6 → 1.1.0
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/README.md +33 -0
- package/dist/CanvasConfig-HFgH7irb.d.mts +310 -0
- package/dist/CanvasConfig-HFgH7irb.d.ts +310 -0
- package/dist/application/index.d.mts +78 -0
- package/dist/application/index.d.ts +78 -0
- package/dist/application/index.js +1146 -0
- package/dist/application/index.mjs +11 -0
- package/dist/chunk-DNKRSL6D.mjs +358 -0
- package/dist/chunk-HJ24NSQA.mjs +777 -0
- package/dist/chunk-MC6PNV2F.mjs +34 -0
- package/dist/chunk-TZGTTYTZ.mjs +0 -0
- package/dist/chunk-UOGTEMIJ.mjs +712 -0
- package/dist/chunk-Z6IB4BQV.mjs +31 -0
- package/dist/domain/config/index.d.mts +87 -0
- package/dist/domain/config/index.d.ts +87 -0
- package/dist/domain/config/index.js +92 -0
- package/dist/domain/config/index.mjs +15 -0
- package/dist/domain/index.d.mts +45 -0
- package/dist/domain/index.d.ts +45 -0
- package/dist/domain/index.js +137 -0
- package/dist/domain/index.mjs +55 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1927 -0
- package/dist/index.mjs +40 -0
- package/dist/infrastructure/index.d.mts +198 -0
- package/dist/infrastructure/index.d.ts +198 -0
- package/dist/infrastructure/index.js +765 -0
- package/dist/infrastructure/index.mjs +13 -0
- package/dist/presentation/index.d.mts +145 -0
- package/dist/presentation/index.d.ts +145 -0
- package/dist/presentation/index.js +1911 -0
- package/dist/presentation/index.mjs +16 -0
- package/dist/report.types-DWDnprBx.d.mts +76 -0
- package/dist/report.types-DWDnprBx.d.ts +76 -0
- package/package.json +8 -2
- package/src/domain/types/freehand.types.ts +42 -0
- package/src/domain/types/index.ts +1 -0
- package/src/index.ts +10 -0
- package/src/presentation/hooks/useFreehandCanvas.ts +244 -0
- package/src/presentation/index.ts +1 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { q as ScreenshotGenerationOptions, r as ScreenshotMetadata, m as DeviceType, S as ScreenshotContent, o as ScreenshotDesign, s as ScreenshotProject } from '../CanvasConfig-HFgH7irb.mjs';
|
|
2
|
+
import { ScreenshotStudioConfig } from '../domain/config/index.mjs';
|
|
3
|
+
import { P as PDFExportOptions, R as ReportData, E as ExcelExportOptions } from '../report.types-DWDnprBx.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Screenshot Studio Service
|
|
7
|
+
* High-level screenshot generation service
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
declare class ScreenshotStudioService {
|
|
11
|
+
private renderer;
|
|
12
|
+
private config;
|
|
13
|
+
constructor(config?: Partial<ScreenshotStudioConfig>);
|
|
14
|
+
/**
|
|
15
|
+
* Generate screenshot
|
|
16
|
+
*/
|
|
17
|
+
generateScreenshot(options: ScreenshotGenerationOptions): Promise<ScreenshotMetadata>;
|
|
18
|
+
/**
|
|
19
|
+
* Generate batch screenshots
|
|
20
|
+
*/
|
|
21
|
+
generateBatchScreenshots(deviceTypes: DeviceType[]): Promise<ScreenshotMetadata[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Generate designed screenshot
|
|
24
|
+
*/
|
|
25
|
+
generateDesignedScreenshot(content: ScreenshotContent, design: ScreenshotDesign): Promise<ScreenshotMetadata>;
|
|
26
|
+
/**
|
|
27
|
+
* Export project as ZIP
|
|
28
|
+
*/
|
|
29
|
+
exportProjectAsZip(project: ScreenshotProject): Promise<Blob>;
|
|
30
|
+
/**
|
|
31
|
+
* Create project
|
|
32
|
+
*/
|
|
33
|
+
createProject(name: string): ScreenshotProject;
|
|
34
|
+
/**
|
|
35
|
+
* Get default design
|
|
36
|
+
*/
|
|
37
|
+
private getDefaultDesign;
|
|
38
|
+
/**
|
|
39
|
+
* Get default screen
|
|
40
|
+
*/
|
|
41
|
+
private getDefaultScreen;
|
|
42
|
+
/**
|
|
43
|
+
* Generate unique ID - optimized version
|
|
44
|
+
*/
|
|
45
|
+
private generateId;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Report Service
|
|
50
|
+
* PDF export and report generation service
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
declare class ReportService {
|
|
54
|
+
private static instance;
|
|
55
|
+
static getInstance(): ReportService;
|
|
56
|
+
/**
|
|
57
|
+
* Export DOM element to PDF
|
|
58
|
+
*/
|
|
59
|
+
exportToPDF(elementId: string, options?: PDFExportOptions): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Export canvas to PDF
|
|
62
|
+
*/
|
|
63
|
+
exportCanvasToPDF(canvas: HTMLCanvasElement, options?: PDFExportOptions): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Export data to Excel
|
|
66
|
+
*/
|
|
67
|
+
exportToExcel(data: ReportData, options?: ExcelExportOptions): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Export data to CSV
|
|
70
|
+
*/
|
|
71
|
+
exportToCSV(data: ReportData, filename?: string, delimiter?: ',' | ';'): void;
|
|
72
|
+
/**
|
|
73
|
+
* Export multiple elements to PDF
|
|
74
|
+
*/
|
|
75
|
+
exportMultipleToPDF(elementIds: string[], options?: PDFExportOptions): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { ReportService, ScreenshotStudioService };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { q as ScreenshotGenerationOptions, r as ScreenshotMetadata, m as DeviceType, S as ScreenshotContent, o as ScreenshotDesign, s as ScreenshotProject } from '../CanvasConfig-HFgH7irb.js';
|
|
2
|
+
import { ScreenshotStudioConfig } from '../domain/config/index.js';
|
|
3
|
+
import { P as PDFExportOptions, R as ReportData, E as ExcelExportOptions } from '../report.types-DWDnprBx.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Screenshot Studio Service
|
|
7
|
+
* High-level screenshot generation service
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
declare class ScreenshotStudioService {
|
|
11
|
+
private renderer;
|
|
12
|
+
private config;
|
|
13
|
+
constructor(config?: Partial<ScreenshotStudioConfig>);
|
|
14
|
+
/**
|
|
15
|
+
* Generate screenshot
|
|
16
|
+
*/
|
|
17
|
+
generateScreenshot(options: ScreenshotGenerationOptions): Promise<ScreenshotMetadata>;
|
|
18
|
+
/**
|
|
19
|
+
* Generate batch screenshots
|
|
20
|
+
*/
|
|
21
|
+
generateBatchScreenshots(deviceTypes: DeviceType[]): Promise<ScreenshotMetadata[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Generate designed screenshot
|
|
24
|
+
*/
|
|
25
|
+
generateDesignedScreenshot(content: ScreenshotContent, design: ScreenshotDesign): Promise<ScreenshotMetadata>;
|
|
26
|
+
/**
|
|
27
|
+
* Export project as ZIP
|
|
28
|
+
*/
|
|
29
|
+
exportProjectAsZip(project: ScreenshotProject): Promise<Blob>;
|
|
30
|
+
/**
|
|
31
|
+
* Create project
|
|
32
|
+
*/
|
|
33
|
+
createProject(name: string): ScreenshotProject;
|
|
34
|
+
/**
|
|
35
|
+
* Get default design
|
|
36
|
+
*/
|
|
37
|
+
private getDefaultDesign;
|
|
38
|
+
/**
|
|
39
|
+
* Get default screen
|
|
40
|
+
*/
|
|
41
|
+
private getDefaultScreen;
|
|
42
|
+
/**
|
|
43
|
+
* Generate unique ID - optimized version
|
|
44
|
+
*/
|
|
45
|
+
private generateId;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Report Service
|
|
50
|
+
* PDF export and report generation service
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
declare class ReportService {
|
|
54
|
+
private static instance;
|
|
55
|
+
static getInstance(): ReportService;
|
|
56
|
+
/**
|
|
57
|
+
* Export DOM element to PDF
|
|
58
|
+
*/
|
|
59
|
+
exportToPDF(elementId: string, options?: PDFExportOptions): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Export canvas to PDF
|
|
62
|
+
*/
|
|
63
|
+
exportCanvasToPDF(canvas: HTMLCanvasElement, options?: PDFExportOptions): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Export data to Excel
|
|
66
|
+
*/
|
|
67
|
+
exportToExcel(data: ReportData, options?: ExcelExportOptions): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Export data to CSV
|
|
70
|
+
*/
|
|
71
|
+
exportToCSV(data: ReportData, filename?: string, delimiter?: ',' | ';'): void;
|
|
72
|
+
/**
|
|
73
|
+
* Export multiple elements to PDF
|
|
74
|
+
*/
|
|
75
|
+
exportMultipleToPDF(elementIds: string[], options?: PDFExportOptions): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { ReportService, ScreenshotStudioService };
|