textmode.export.js 1.3.0 → 1.5.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 +1 -1
- package/dist/textmode.export.esm.js +5102 -1513
- package/dist/textmode.export.umd.js +68 -2
- package/dist/types/exporters/base/LayerTarget.d.ts +46 -0
- package/dist/types/exporters/base/LayerTarget.d.ts.map +1 -0
- package/dist/types/exporters/base/index.d.ts +2 -0
- package/dist/types/exporters/base/index.d.ts.map +1 -1
- package/dist/types/exporters/gif/GIFExporter.d.ts +1 -1
- package/dist/types/exporters/gif/GIFExporter.d.ts.map +1 -1
- package/dist/types/exporters/gif/GIFRecorder.d.ts +1 -1
- package/dist/types/exporters/gif/GIFRecorder.d.ts.map +1 -1
- package/dist/types/exporters/json/JSONDataExtractor.d.ts +3 -4
- package/dist/types/exporters/json/JSONDataExtractor.d.ts.map +1 -1
- package/dist/types/exporters/json/JSONExporter.d.ts +12 -7
- package/dist/types/exporters/json/JSONExporter.d.ts.map +1 -1
- package/dist/types/exporters/json/index.d.ts +1 -1
- package/dist/types/exporters/json/index.d.ts.map +1 -1
- package/dist/types/exporters/json/types.d.ts +78 -15
- package/dist/types/exporters/json/types.d.ts.map +1 -1
- package/dist/types/exporters/svg/SVGContentGenerator.d.ts +1 -1
- package/dist/types/exporters/svg/SVGContentGenerator.d.ts.map +1 -1
- package/dist/types/exporters/svg/SVGExporter.d.ts.map +1 -1
- package/dist/types/exporters/svg/SVGPathGenerator.d.ts +1 -1
- package/dist/types/exporters/svg/SVGPathGenerator.d.ts.map +1 -1
- package/dist/types/exporters/svg/types.d.ts +3 -1
- package/dist/types/exporters/svg/types.d.ts.map +1 -1
- package/dist/types/exporters/txt/TXTExporter.d.ts.map +1 -1
- package/dist/types/exporters/txt/TXTExporter.test.d.ts +2 -0
- package/dist/types/exporters/txt/TXTExporter.test.d.ts.map +1 -0
- package/dist/types/exporters/txt/types.d.ts +3 -1
- package/dist/types/exporters/txt/types.d.ts.map +1 -1
- package/dist/types/exporters/video/VideoExporter.d.ts +13 -17
- package/dist/types/exporters/video/VideoExporter.d.ts.map +1 -1
- package/dist/types/exporters/video/VideoExporter.test.d.ts +2 -0
- package/dist/types/exporters/video/VideoExporter.test.d.ts.map +1 -0
- package/dist/types/exporters/video/VideoFrameDriver.d.ts +32 -0
- package/dist/types/exporters/video/VideoFrameDriver.d.ts.map +1 -0
- package/dist/types/exporters/video/VideoFrameDriver.test.d.ts +2 -0
- package/dist/types/exporters/video/VideoFrameDriver.test.d.ts.map +1 -0
- package/dist/types/exporters/video/VideoRecorder.d.ts +10 -23
- package/dist/types/exporters/video/VideoRecorder.d.ts.map +1 -1
- package/dist/types/exporters/video/VideoRecorder.test.d.ts +2 -0
- package/dist/types/exporters/video/VideoRecorder.test.d.ts.map +1 -0
- package/dist/types/exporters/video/errors.d.ts +9 -0
- package/dist/types/exporters/video/errors.d.ts.map +1 -0
- package/dist/types/exporters/video/index.d.ts +3 -1
- package/dist/types/exporters/video/index.d.ts.map +1 -1
- package/dist/types/exporters/video/types.d.ts +147 -5
- package/dist/types/exporters/video/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -30
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/overlay/blades/Blade.d.ts +2 -0
- package/dist/types/overlay/blades/Blade.d.ts.map +1 -1
- package/dist/types/overlay/blades/JSONBlade.d.ts +5 -0
- package/dist/types/overlay/blades/JSONBlade.d.ts.map +1 -1
- package/dist/types/overlay/blades/SVGBlade.d.ts +2 -0
- package/dist/types/overlay/blades/SVGBlade.d.ts.map +1 -1
- package/dist/types/overlay/blades/TextBlade.d.ts +2 -0
- package/dist/types/overlay/blades/TextBlade.d.ts.map +1 -1
- package/dist/types/overlay/blades/VideoBlade.d.ts +10 -1
- package/dist/types/overlay/blades/VideoBlade.d.ts.map +1 -1
- package/dist/types/overlay/components/inputs/LayerTargetSelect.d.ts +20 -0
- package/dist/types/overlay/components/inputs/LayerTargetSelect.d.ts.map +1 -0
- package/dist/types/overlay/core/OverlayController.d.ts +1 -0
- package/dist/types/overlay/core/OverlayController.d.ts.map +1 -1
- package/dist/types/overlay/formatRegistry.d.ts +2 -1
- package/dist/types/overlay/formatRegistry.d.ts.map +1 -1
- package/dist/types/overlay/formatRegistry.test.d.ts +2 -0
- package/dist/types/overlay/formatRegistry.test.d.ts.map +1 -0
- package/dist/types/overlay/index.d.ts +3 -1
- package/dist/types/overlay/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +36 -21
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VideoExportErrorCode } from './types';
|
|
2
|
+
export declare class VideoExportError extends Error {
|
|
3
|
+
readonly code: VideoExportErrorCode;
|
|
4
|
+
readonly cause?: unknown;
|
|
5
|
+
constructor(code: VideoExportErrorCode, message: string, cause?: unknown);
|
|
6
|
+
}
|
|
7
|
+
export declare function createAbortError(): VideoExportError;
|
|
8
|
+
export declare function isAbortError(error: unknown): boolean;
|
|
9
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,SAAgB,IAAI,EAAE,oBAAoB,CAAC;IAC3C,SAAgB,KAAK,CAAC,EAAE,OAAO,CAAC;gBAEpB,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAMxE;AAED,wBAAgB,gBAAgB,IAAI,gBAAgB,CAEnD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKpD"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { VideoExporter } from './VideoExporter';
|
|
2
|
+
export { VideoFrameDriver } from './VideoFrameDriver';
|
|
2
3
|
export { VideoRecorder } from './VideoRecorder';
|
|
3
|
-
export
|
|
4
|
+
export { VideoExportError } from './errors';
|
|
5
|
+
export type { VideoBitrateMode, VideoBitratePreset, VideoEncodingPlan, VideoExportErrorCode, VideoExportFormat, VideoExportOptions, VideoExportPhase, VideoFrameDriverLike, VideoHardwareAcceleration, VideoLatencyMode, VideoExportProgress, VideoGenerationOptions, VideoRecordingState, VideoRenderFrameOptions, } from './types';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EACX,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle state reported while a video export is being prepared, recorded, encoded, or completed.
|
|
3
|
+
*/
|
|
1
4
|
export type VideoRecordingState = 'idle' | 'recording' | 'encoding' | 'completed' | 'error';
|
|
5
|
+
/**
|
|
6
|
+
* More granular phase information for progress UIs that need to distinguish setup, rendering, and finalization.
|
|
7
|
+
*/
|
|
8
|
+
export type VideoExportPhase = 'probing' | 'rendering' | 'encoding' | 'finalizing';
|
|
9
|
+
export type VideoCodec = 'vp8' | 'vp9' | 'avc' | (string & {});
|
|
10
|
+
/**
|
|
11
|
+
* Subjective bitrate preset used when an exact bits-per-second value is not supplied.
|
|
12
|
+
*
|
|
13
|
+
* Higher presets produce larger files with more detail. For exact control, pass a numeric
|
|
14
|
+
* `bitrate` value in bits per second instead.
|
|
15
|
+
*/
|
|
16
|
+
export type VideoBitratePreset = 'low' | 'medium' | 'high';
|
|
17
|
+
/**
|
|
18
|
+
* Video container format written by `saveVideo`.
|
|
19
|
+
*/
|
|
20
|
+
export type VideoExportFormat = 'webm' | 'mp4';
|
|
21
|
+
/**
|
|
22
|
+
* Bitrate allocation strategy for the native encoder.
|
|
23
|
+
*
|
|
24
|
+
* - `'variable'`: lets the encoder spend more bits on visually complex frames and fewer bits on simple frames.
|
|
25
|
+
* This is usually the best default for generative animations.
|
|
26
|
+
* - `'constant'`: asks the encoder to keep the bitrate steadier throughout the export. This can make file size
|
|
27
|
+
* more predictable, but may waste bits on simple frames or reduce detail on complex frames.
|
|
28
|
+
*/
|
|
29
|
+
export type VideoBitrateMode = 'variable' | 'constant';
|
|
30
|
+
/**
|
|
31
|
+
* Encoder scheduling mode.
|
|
32
|
+
*
|
|
33
|
+
* - `'quality'`: prioritizes complete, stable export output. Mediabunny notes that this mode prevents dropped frames.
|
|
34
|
+
* - `'realtime'`: prioritizes low-latency encoding. It is intended for live streams and may drop frames when overloaded,
|
|
35
|
+
* so it is usually not recommended for frame-perfect exports.
|
|
36
|
+
*/
|
|
37
|
+
export type VideoLatencyMode = 'quality' | 'realtime';
|
|
38
|
+
/**
|
|
39
|
+
* WebCodecs hardware acceleration preference.
|
|
40
|
+
*
|
|
41
|
+
* This is a browser hint rather than a guarantee:
|
|
42
|
+
* - `'no-preference'`: let the browser choose the best available encoder.
|
|
43
|
+
* - `'prefer-hardware'`: prefer GPU/ASIC encoding when available, often faster and more power-efficient, but codec
|
|
44
|
+
* availability and output characteristics vary by device.
|
|
45
|
+
* - `'prefer-software'`: prefer CPU encoding, often more consistent across machines, but usually slower.
|
|
46
|
+
*/
|
|
47
|
+
export type VideoHardwareAcceleration = 'no-preference' | 'prefer-hardware' | 'prefer-software';
|
|
48
|
+
export type VideoExportErrorCode = 'VIDEO_EXPORT_UNSUPPORTED' | 'VIDEO_CODEC_UNSUPPORTED' | 'VIDEO_EXPORT_ABORTED' | 'VIDEO_EXPORT_FAILED' | 'VIDEO_TRANSPARENCY_UNSUPPORTED';
|
|
2
49
|
/**
|
|
3
50
|
* Progress information emitted during the video export process.
|
|
4
51
|
*/
|
|
@@ -6,15 +53,27 @@ export type VideoExportProgress = {
|
|
|
6
53
|
/**
|
|
7
54
|
* Current state of the recording process.
|
|
8
55
|
*/
|
|
9
|
-
state:
|
|
56
|
+
state: VideoRecordingState;
|
|
57
|
+
/**
|
|
58
|
+
* Current export phase for newer progress UIs.
|
|
59
|
+
*/
|
|
60
|
+
phase?: VideoExportPhase;
|
|
10
61
|
/**
|
|
11
62
|
* Number of frames that have been recorded so far.
|
|
12
63
|
*/
|
|
13
64
|
frameIndex?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Alias for {@link frameIndex}. Prefer this field in new code.
|
|
67
|
+
*/
|
|
68
|
+
frame?: number;
|
|
14
69
|
/**
|
|
15
70
|
* Total number of frames planned for the recording.
|
|
16
71
|
*/
|
|
17
72
|
totalFrames?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Export completion ratio between `0` and `1`.
|
|
75
|
+
*/
|
|
76
|
+
progress?: number;
|
|
18
77
|
/**
|
|
19
78
|
* Optional status message for UI consumption.
|
|
20
79
|
*/
|
|
@@ -28,6 +87,10 @@ export type VideoExportOptions = {
|
|
|
28
87
|
* Target filename without extension. Defaults to an auto-generated value.
|
|
29
88
|
*/
|
|
30
89
|
filename?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Video container format. Defaults to `'mp4'`.
|
|
92
|
+
*/
|
|
93
|
+
format?: VideoExportFormat;
|
|
31
94
|
/**
|
|
32
95
|
* Desired total number of frames to capture. Defaults to `300`.
|
|
33
96
|
*/
|
|
@@ -37,11 +100,52 @@ export type VideoExportOptions = {
|
|
|
37
100
|
*/
|
|
38
101
|
frameRate?: number;
|
|
39
102
|
/**
|
|
40
|
-
*
|
|
103
|
+
* Target bitrate in bits per second or a bitrate preset. Defaults to `'medium'`.
|
|
104
|
+
*
|
|
105
|
+
* Bitrate controls how much encoded data is available per second of video. Higher values can preserve more detail
|
|
106
|
+
* in noisy or fast-changing sketches, but create larger files. Presets are resolved from the export dimensions and
|
|
107
|
+
* frame rate; numeric values are passed directly to the encoder.
|
|
108
|
+
*/
|
|
109
|
+
bitrate?: number | VideoBitratePreset;
|
|
110
|
+
/**
|
|
111
|
+
* Encoder bitrate allocation mode. Defaults to `'variable'`.
|
|
112
|
+
*
|
|
113
|
+
* Use `'variable'` for most exports so simple frames can compress efficiently and complex frames can receive more
|
|
114
|
+
* bits. Use `'constant'` only when a steadier data rate is more important than compression efficiency.
|
|
115
|
+
*/
|
|
116
|
+
bitrateMode?: VideoBitrateMode;
|
|
117
|
+
/**
|
|
118
|
+
* Encoder latency mode. Defaults to `'quality'`.
|
|
119
|
+
*
|
|
120
|
+
* Use `'quality'` for deterministic exports; it prioritizes completed output and avoids dropped frames. Use
|
|
121
|
+
* `'realtime'` only for low-latency use cases where dropped frames are acceptable.
|
|
122
|
+
*/
|
|
123
|
+
latencyMode?: VideoLatencyMode;
|
|
124
|
+
/**
|
|
125
|
+
* WebCodecs hardware acceleration hint. Defaults to `'no-preference'`.
|
|
126
|
+
*
|
|
127
|
+
* Browsers may ignore this hint. `'prefer-hardware'` can be faster on supported devices; `'prefer-software'` can be
|
|
128
|
+
* more predictable but slower. `'no-preference'` lets the browser choose.
|
|
129
|
+
*/
|
|
130
|
+
hardwareAcceleration?: VideoHardwareAcceleration;
|
|
131
|
+
/**
|
|
132
|
+
* Key frame interval in seconds. Defaults to `2`.
|
|
133
|
+
*
|
|
134
|
+
* Key frames are independently decodable frames used for seeking and recovery. Shorter intervals improve seeking
|
|
135
|
+
* responsiveness but increase file size. Longer intervals can shrink files but make seeking less precise.
|
|
136
|
+
* Use `0` to request every frame as a key frame.
|
|
137
|
+
*/
|
|
138
|
+
keyFrameInterval?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Pixel density used during export. Defaults to `1` so video dimensions match the live canvas.
|
|
41
141
|
*/
|
|
42
|
-
|
|
142
|
+
pixelDensity?: number;
|
|
43
143
|
/**
|
|
44
|
-
*
|
|
144
|
+
* Abort signal for cancelling an in-progress export.
|
|
145
|
+
*/
|
|
146
|
+
signal?: AbortSignal;
|
|
147
|
+
/**
|
|
148
|
+
* When true, attempts to preserve alpha data in WebM recordings. MP4 exports reject this option.
|
|
45
149
|
*/
|
|
46
150
|
transparent?: boolean;
|
|
47
151
|
/**
|
|
@@ -55,10 +159,48 @@ export type VideoExportOptions = {
|
|
|
55
159
|
};
|
|
56
160
|
export interface VideoGenerationOptions {
|
|
57
161
|
filename?: string;
|
|
162
|
+
format: VideoExportFormat;
|
|
58
163
|
frameRate: number;
|
|
59
164
|
frameCount: number;
|
|
60
|
-
|
|
165
|
+
bitrate: number | VideoBitratePreset;
|
|
166
|
+
bitrateMode: VideoBitrateMode;
|
|
167
|
+
latencyMode: VideoLatencyMode;
|
|
168
|
+
hardwareAcceleration: VideoHardwareAcceleration;
|
|
169
|
+
keyFrameInterval: number;
|
|
170
|
+
pixelDensity: number;
|
|
171
|
+
width: number;
|
|
172
|
+
height: number;
|
|
61
173
|
transparent: boolean;
|
|
62
174
|
debugLogging: boolean;
|
|
175
|
+
signal?: AbortSignal;
|
|
176
|
+
}
|
|
177
|
+
export interface VideoEncodingPlan {
|
|
178
|
+
format: VideoExportFormat;
|
|
179
|
+
extension: '.webm' | '.mp4';
|
|
180
|
+
mimeType: string;
|
|
181
|
+
codec: VideoCodec;
|
|
182
|
+
bitrate: number;
|
|
183
|
+
bitrateMode: VideoBitrateMode;
|
|
184
|
+
latencyMode: VideoLatencyMode;
|
|
185
|
+
hardwareAcceleration: VideoHardwareAcceleration;
|
|
186
|
+
keyFrameInterval: number;
|
|
187
|
+
frameRate: number;
|
|
188
|
+
frameCount: number;
|
|
189
|
+
width: number;
|
|
190
|
+
height: number;
|
|
191
|
+
transparent: boolean;
|
|
192
|
+
}
|
|
193
|
+
export interface VideoRenderFrameOptions {
|
|
194
|
+
frameCount: number;
|
|
195
|
+
frameRate: number;
|
|
196
|
+
signal?: AbortSignal;
|
|
197
|
+
onFrame(frame: {
|
|
198
|
+
frameIndex: number;
|
|
199
|
+
canvas: HTMLCanvasElement;
|
|
200
|
+
}): Promise<void> | void;
|
|
201
|
+
}
|
|
202
|
+
export interface VideoFrameDriverLike {
|
|
203
|
+
readonly canvas: HTMLCanvasElement;
|
|
204
|
+
$render(options: VideoRenderFrameOptions): Promise<void>;
|
|
63
205
|
}
|
|
64
206
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,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M,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,oBAAoB,EAAE,yBAAyB,CAAC;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACxF;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -17,23 +17,24 @@
|
|
|
17
17
|
*
|
|
18
18
|
* ### Text formats
|
|
19
19
|
* - {@link TXTExportOptions | TXT} - Save text content as plain text
|
|
20
|
-
* - {@link JSONExportOptions | JSON} - Save
|
|
20
|
+
* - {@link JSONExportOptions | JSON} - Save document data as structured JSON
|
|
21
21
|
*
|
|
22
22
|
* ### Animation formats
|
|
23
23
|
* - {@link GIFExportOptions | GIF} - Save as animated GIF
|
|
24
|
-
* - {@link VideoExportOptions |
|
|
24
|
+
* - {@link VideoExportOptions | Video} - Save as WebM or MP4 video
|
|
25
25
|
*
|
|
26
26
|
* @module textmode.export.js
|
|
27
27
|
*/
|
|
28
|
-
import type { TextmodePlugin } from 'textmode.js
|
|
28
|
+
import type { TextmodePlugin } from 'textmode.js';
|
|
29
29
|
import type { TextmodeExportPluginOptions } from './types';
|
|
30
30
|
export type { TextmodeExportAPI, TextmodeExportPluginOptions, ExportOverlayController } from './types';
|
|
31
31
|
export type { ImageExportOptions } from './exporters/image';
|
|
32
32
|
export type { SVGExportOptions } from './exporters/svg';
|
|
33
33
|
export type { TXTExportOptions } from './exporters/txt';
|
|
34
|
-
export type { JSONExportOptions,
|
|
34
|
+
export type { JSONCellCollection, JSONCellTransform, JSONColorValue, JSONDocumentFormat, JSONDocumentVersion, JSONExportColorMode, JSONExportMetadata, JSONExportOptions, JSONExportTarget, JSONLayerGrid, JSONObjectRowCell, JSONObjectRowsCellCollection, JSONRGBAColor, TextmodeAllDocumentJSON, TextmodeDocumentJSON, TextmodeDocumentLayer, TextmodeSelectedDocumentJSON, TextmodeSelectedDocumentLayer, } from './exporters/json';
|
|
35
35
|
export type { GIFExportOptions, GIFExportProgress } from './exporters/gif';
|
|
36
|
-
export type { VideoExportOptions, VideoExportProgress } from './exporters/video';
|
|
36
|
+
export type { VideoBitrateMode, VideoBitratePreset, VideoExportErrorCode, VideoExportFormat, VideoExportOptions, VideoExportPhase, VideoExportProgress, VideoHardwareAcceleration, VideoLatencyMode, VideoRecordingState, } from './exporters/video';
|
|
37
|
+
export type { LayerExportOptions } from './exporters/base';
|
|
37
38
|
/**
|
|
38
39
|
* Export plugin for textmode.js.
|
|
39
40
|
*
|
|
@@ -42,31 +43,7 @@ export type { VideoExportOptions, VideoExportProgress } from './exporters/video'
|
|
|
42
43
|
* access to all export options, which can be controlled at runtime.
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
|
-
*
|
|
46
|
-
* import { textmode } from 'textmode.js';
|
|
47
|
-
* import { ExportPlugin } from 'textmode.export.js';
|
|
48
|
-
*
|
|
49
|
-
* const t = textmode.create({
|
|
50
|
-
* plugins: [ExportPlugin]
|
|
51
|
-
* });
|
|
52
|
-
*
|
|
53
|
-
* t.draw(() => {
|
|
54
|
-
* t.background(0);
|
|
55
|
-
* t.char('A');
|
|
56
|
-
* t.rotateZ(t.frameCount);
|
|
57
|
-
* t.rect(16, 16);
|
|
58
|
-
* });
|
|
59
|
-
*
|
|
60
|
-
* // Export methods are now available
|
|
61
|
-
* t.saveCanvas({ format: 'png', scale: 2.0 });
|
|
62
|
-
* t.saveSVG({ filename: 'my-artwork' });
|
|
63
|
-
* t.saveGIF({ duration: 3, fps: 30 });
|
|
64
|
-
*
|
|
65
|
-
* // Control overlay visibility at runtime
|
|
66
|
-
* t.exportOverlay.hide(); // Hide the overlay
|
|
67
|
-
* t.exportOverlay.show(); // Show the overlay
|
|
68
|
-
* t.exportOverlay.toggle(); // Toggle visibility
|
|
69
|
-
* ```
|
|
46
|
+
* {@includeCode ../examples/ExportPlugin/init/sketch.js}
|
|
70
47
|
*/
|
|
71
48
|
export declare const ExportPlugin: TextmodePlugin;
|
|
72
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,aAAa,CAAC;AASzE,OAAO,KAAK,EAAqB,2BAA2B,EAA2B,MAAM,SAAS,CAAC;AAIvG,YAAY,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACvG,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EACX,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,6BAA6B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,YAAY,EACX,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAO3D;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,cAqL1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAS,2BAAgC,KAAG,cAkBtF,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,YAAY,CAAC,EAAE,cAAc,CAAC;QAC9B,0BAA0B,CAAC,EAAE,OAAO,0BAA0B,CAAC;KAC/D;CACD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExportFormat } from '../types';
|
|
2
2
|
import { Component } from '../components/base/Component';
|
|
3
|
+
import type { LayerTargetProvider } from '../../exporters/base';
|
|
3
4
|
interface ManagedComponent {
|
|
4
5
|
unmount(): void;
|
|
5
6
|
destroy(): void;
|
|
@@ -9,6 +10,7 @@ export interface BladeConfig<TOptions> {
|
|
|
9
10
|
supportsClipboard: boolean;
|
|
10
11
|
format: ExportFormat;
|
|
11
12
|
defaultOptions: TOptions;
|
|
13
|
+
layerTargetProvider?: LayerTargetProvider;
|
|
12
14
|
}
|
|
13
15
|
export declare abstract class Blade<TOptions> extends Component<void> {
|
|
14
16
|
protected readonly _config: BladeConfig<TOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/Blade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Blade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/Blade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,UAAU,gBAAgB;IACzB,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,IAAI,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,WAAW,CAAC,QAAQ;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,QAAQ,CAAC;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAED,8BAAsB,KAAK,CAAC,QAAQ,CAAE,SAAQ,SAAS,CAAC,IAAI,CAAC;IAC5D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA+B;gBAEtD,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC;IAKzC,QAAQ,CAAC,UAAU,IAAI,QAAQ;IAC/B,QAAQ,CAAC,KAAK,IAAI,IAAI;IACtB,QAAQ,CAAC,QAAQ,IAAI,OAAO;IAE5B,SAAS,CAAC,gBAAgB,CAAC,UAAU,SAAS,gBAAgB,EAAE,SAAS,EAAE,UAAU,GAAG,UAAU;IAKlG,SAAS,CAAC,UAAU,IAAI,IAAI;IAM5B,SAAS,CAAC,UAAU,IAAI,IAAI;CAM5B"}
|
|
@@ -2,6 +2,9 @@ import type { JSONExportOptions } from '../../exporters/json';
|
|
|
2
2
|
import type { BladeConfig } from './Blade';
|
|
3
3
|
import { Blade } from './Blade';
|
|
4
4
|
export declare class JSONBlade extends Blade<JSONExportOptions> {
|
|
5
|
+
private readonly layerTarget?;
|
|
6
|
+
private layerTargetContainer?;
|
|
7
|
+
private target;
|
|
5
8
|
private prettyPrint;
|
|
6
9
|
private includeMetadata;
|
|
7
10
|
private colorMode;
|
|
@@ -10,6 +13,8 @@ export declare class JSONBlade extends Blade<JSONExportOptions> {
|
|
|
10
13
|
getOptions(): JSONExportOptions;
|
|
11
14
|
reset(): void;
|
|
12
15
|
validate(): boolean;
|
|
16
|
+
refreshLayerTargets(): void;
|
|
13
17
|
private applyDefaults;
|
|
18
|
+
private updateLayerTargetVisibility;
|
|
14
19
|
}
|
|
15
20
|
//# sourceMappingURL=JSONBlade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/JSONBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"JSONBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/JSONBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAMrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,SAAU,SAAQ,KAAK,CAAC,iBAAiB,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAoB;IACjD,OAAO,CAAC,oBAAoB,CAAC,CAAc;IAE3C,OAAO,CAAC,MAAM,CASZ;IAEF,OAAO,CAAC,WAAW,CAMjB;IAEF,OAAO,CAAC,eAAe,CAMrB;IAEF,OAAO,CAAC,SAAS,CASf;gBAEU,MAAM,EAAE,WAAW,CAAC,iBAAiB,CAAC;IAYlD,MAAM,IAAI,WAAW;IAkCrB,UAAU,IAAI,iBAAiB;IAW/B,KAAK,IAAI,IAAI;IAIb,QAAQ,IAAI,OAAO;IAInB,mBAAmB,IAAI,IAAI;IAI3B,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,2BAA2B;CAOnC"}
|
|
@@ -2,6 +2,7 @@ import type { SVGExportOptions } from '../../exporters/svg';
|
|
|
2
2
|
import type { BladeConfig } from './Blade';
|
|
3
3
|
import { Blade } from './Blade';
|
|
4
4
|
export declare class SVGBlade extends Blade<SVGExportOptions> {
|
|
5
|
+
private readonly layerTarget?;
|
|
5
6
|
private includeBackground;
|
|
6
7
|
private drawMode;
|
|
7
8
|
private strokeWidth;
|
|
@@ -10,6 +11,7 @@ export declare class SVGBlade extends Blade<SVGExportOptions> {
|
|
|
10
11
|
getOptions(): SVGExportOptions;
|
|
11
12
|
reset(): void;
|
|
12
13
|
validate(): boolean;
|
|
14
|
+
refreshLayerTargets(): void;
|
|
13
15
|
private updateStrokeControls;
|
|
14
16
|
private applyDefaults;
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SVGBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/SVGBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SVGBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/SVGBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,QAAS,SAAQ,KAAK,CAAC,gBAAgB,CAAC;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAoB;IAEjD,OAAO,CAAC,iBAAiB,CAMvB;IAEF,OAAO,CAAC,QAAQ,CASd;IAEF,OAAO,CAAC,WAAW,CAKjB;gBAEU,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC;IAYjD,MAAM,IAAI,WAAW;IAiCrB,UAAU,IAAI,gBAAgB;IAS9B,KAAK,IAAI,IAAI;IAKb,QAAQ,IAAI,OAAO;IAQnB,mBAAmB,IAAI,IAAI;IAI3B,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,aAAa;CAQrB"}
|
|
@@ -2,6 +2,7 @@ import type { TXTExportOptions } from '../../exporters/txt';
|
|
|
2
2
|
import type { BladeConfig } from './Blade';
|
|
3
3
|
import { Blade } from './Blade';
|
|
4
4
|
export declare class TextBlade extends Blade<TXTExportOptions> {
|
|
5
|
+
private readonly layerTarget?;
|
|
5
6
|
private trailingSpaces;
|
|
6
7
|
private emptyCharacter;
|
|
7
8
|
constructor(config: BladeConfig<TXTExportOptions>);
|
|
@@ -9,6 +10,7 @@ export declare class TextBlade extends Blade<TXTExportOptions> {
|
|
|
9
10
|
getOptions(): TXTExportOptions;
|
|
10
11
|
reset(): void;
|
|
11
12
|
validate(): boolean;
|
|
13
|
+
refreshLayerTargets(): void;
|
|
12
14
|
private applyDefaults;
|
|
13
15
|
}
|
|
14
16
|
//# sourceMappingURL=TextBlade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/TextBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"TextBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/TextBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,SAAU,SAAQ,KAAK,CAAC,gBAAgB,CAAC;IACrD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAoB;IAEjD,OAAO,CAAC,cAAc,CAKpB;IAEF,OAAO,CAAC,cAAc,CAMpB;gBAEU,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC;IAYjD,MAAM,IAAI,WAAW;IAkBrB,UAAU,IAAI,gBAAgB;IAU9B,KAAK,IAAI,IAAI;IAIb,QAAQ,IAAI,OAAO;IAKnB,mBAAmB,IAAI,IAAI;IAI3B,OAAO,CAAC,aAAa;CAKrB"}
|
|
@@ -2,9 +2,15 @@ import type { VideoExportOptions, VideoExportProgress, VideoRecordingState } fro
|
|
|
2
2
|
import type { BladeConfig } from './Blade';
|
|
3
3
|
import { Blade } from './Blade';
|
|
4
4
|
export declare class VideoBlade extends Blade<VideoExportOptions> {
|
|
5
|
+
private formatSelect;
|
|
6
|
+
private bitrateSelect;
|
|
5
7
|
private frameRateInput;
|
|
6
8
|
private frameCountInput;
|
|
7
|
-
private
|
|
9
|
+
private bitrateModeSelect;
|
|
10
|
+
private latencyModeSelect;
|
|
11
|
+
private hardwareAccelerationSelect;
|
|
12
|
+
private keyFrameIntervalInput;
|
|
13
|
+
private transparencyInput;
|
|
8
14
|
private status;
|
|
9
15
|
private recordingState;
|
|
10
16
|
constructor(config: BladeConfig<VideoExportOptions>);
|
|
@@ -18,5 +24,8 @@ export declare class VideoBlade extends Blade<VideoExportOptions> {
|
|
|
18
24
|
private syncStatus;
|
|
19
25
|
private resolvePlannedFrameCount;
|
|
20
26
|
private applyDefaults;
|
|
27
|
+
private resolveBitratePreset;
|
|
28
|
+
private readonly handleFormatChange;
|
|
29
|
+
private syncTransparencyAvailability;
|
|
21
30
|
}
|
|
22
31
|
//# sourceMappingURL=VideoBlade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/VideoBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"VideoBlade.d.ts","sourceRoot":"","sources":["../../../../src/overlay/blades/VideoBlade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIX,kBAAkB,EAClB,mBAAmB,EAGnB,mBAAmB,EACnB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAehC,qBAAa,UAAW,SAAQ,KAAK,CAAC,kBAAkB,CAAC;IACxD,OAAO,CAAC,YAAY,CASlB;IAEF,OAAO,CAAC,aAAa,CAUnB;IAEF,OAAO,CAAC,cAAc,CAMpB;IAEF,OAAO,CAAC,eAAe,CAKrB;IAEF,OAAO,CAAC,iBAAiB,CASvB;IAEF,OAAO,CAAC,iBAAiB,CASvB;IAEF,OAAO,CAAC,0BAA0B,CAUhC;IAEF,OAAO,CAAC,qBAAqB,CAM3B;IAEF,OAAO,CAAC,iBAAiB,CAMvB;IAEF,OAAO,CAAC,MAAM,CAOZ;IAEF,OAAO,CAAC,cAAc,CAA+B;gBAEzC,MAAM,EAAE,WAAW,CAAC,kBAAkB,CAAC;IAInD,MAAM,IAAI,WAAW;IA4FrB,UAAU,IAAI,kBAAkB;IA2BhC,KAAK,IAAI,IAAI;IAMb,QAAQ,IAAI,OAAO;IAcnB,WAAW,IAAI,OAAO;IAItB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAgBnF,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAInD,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAEjC;IAEF,OAAO,CAAC,4BAA4B;CAYpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TextmodeLayer } from 'textmode.js';
|
|
2
|
+
import type { LayerTargetProvider } from '../../../exporters/base';
|
|
3
|
+
import { Component } from '../base/Component';
|
|
4
|
+
export interface LayerTargetSelectProps {
|
|
5
|
+
id: string;
|
|
6
|
+
provider: LayerTargetProvider;
|
|
7
|
+
}
|
|
8
|
+
export declare class LayerTargetSelect extends Component<void> {
|
|
9
|
+
private readonly provider;
|
|
10
|
+
private readonly field;
|
|
11
|
+
private readonly select;
|
|
12
|
+
constructor(props: LayerTargetSelectProps);
|
|
13
|
+
render(): HTMLElement;
|
|
14
|
+
get layer(): TextmodeLayer | undefined;
|
|
15
|
+
setDisabled(disabled: boolean): void;
|
|
16
|
+
refresh(): void;
|
|
17
|
+
protected _onUnmount(): void;
|
|
18
|
+
protected _onDestroy(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=LayerTargetSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayerTargetSelect.d.ts","sourceRoot":"","sources":["../../../../../src/overlay/components/inputs/LayerTargetSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,mBAAmB,CAAC;CAC9B;AAED,qBAAa,iBAAkB,SAAQ,SAAS,CAAC,IAAI,CAAC;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAEjC,KAAK,EAAE,sBAAsB;IAezC,MAAM,IAAI,WAAW;IAQrB,IAAI,KAAK,IAAI,aAAa,GAAG,SAAS,CASrC;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAIpC,OAAO,IAAI,IAAI;IAaf,SAAS,CAAC,UAAU,IAAI,IAAI;IAK5B,SAAS,CAAC,UAAU,IAAI,IAAI;CAI5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayController.d.ts","sourceRoot":"","sources":["../../../../src/overlay/core/OverlayController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"OverlayController.d.ts","sourceRoot":"","sources":["../../../../src/overlay/core/OverlayController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;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,CAIrC;IAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAInC;gBAGD,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,EACjC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,EAC/B,WAAW,EAAE,aAAa,CAAC,gBAAgB,CAAC;IAatC,MAAM,IAAI,IAAI;IAQd,IAAI,IAAI,IAAI;IAOZ,IAAI,IAAI,IAAI;IAMZ,MAAM,IAAI,IAAI;IAQd,SAAS,IAAI,OAAO;IAIpB,mBAAmB,IAAI,IAAI;IAM3B,QAAQ,IAAI,IAAI;IA0BvB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,sBAAsB;IA6C9B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,aAAa;IAyBrB,OAAO,CAAC,sBAAsB;YAMhB,kBAAkB;YAqElB,gBAAgB;IAwC9B,OAAO,CAAC,mBAAmB;CAgD3B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExportFormat } from './types';
|
|
2
2
|
import type { FormatDefinition } from './models/FormatDefinition';
|
|
3
|
-
|
|
3
|
+
import type { LayerTargetProvider } from '../exporters/base';
|
|
4
|
+
export declare function getExportFormatDefinitions(layerTargetProvider?: LayerTargetProvider): ReadonlyArray<FormatDefinition<ExportFormat>>;
|
|
4
5
|
//# sourceMappingURL=formatRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatRegistry.d.ts","sourceRoot":"","sources":["../../../src/overlay/formatRegistry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"formatRegistry.d.ts","sourceRoot":"","sources":["../../../src/overlay/formatRegistry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,wBAAgB,0BAA0B,CACzC,mBAAmB,CAAC,EAAE,mBAAmB,GACvC,aAAa,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAsG/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatRegistry.test.d.ts","sourceRoot":"","sources":["../../../src/overlay/formatRegistry.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Textmodifier } from 'textmode.js';
|
|
2
2
|
import type { TextmodeExportAPI } from '../types';
|
|
3
|
+
import type { LayerTargetProvider } from '../exporters/base';
|
|
3
4
|
import { OverlayController } from './core/OverlayController';
|
|
4
5
|
export type { ExportFormat } from './types';
|
|
5
6
|
/**
|
|
@@ -7,7 +8,8 @@ export type { ExportFormat } from './types';
|
|
|
7
8
|
*
|
|
8
9
|
* @param textmodifier - The text modifier instance.
|
|
9
10
|
* @param exportAPI - The export API instance.
|
|
11
|
+
* @param layerTargetProvider - Provider for dynamic layer export targets.
|
|
10
12
|
* @returns The overlay controller instance.
|
|
11
13
|
*/
|
|
12
|
-
export declare function createExportOverlay(textmodifier: Textmodifier, exportAPI: TextmodeExportAPI): OverlayController;
|
|
14
|
+
export declare function createExportOverlay(textmodifier: Textmodifier, exportAPI: TextmodeExportAPI, layerTargetProvider?: LayerTargetProvider): OverlayController;
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAO7D,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAO7D,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAClC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,mBAAmB,CAAC,EAAE,mBAAmB,GACvC,iBAAiB,CASnB"}
|