textmode.export.js 1.5.0 → 1.5.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.
Files changed (35) hide show
  1. package/README.md +2 -2
  2. package/dist/textmode.export.esm.js +1235 -1164
  3. package/dist/textmode.export.umd.js +5 -5
  4. package/dist/types/augmentations/index.d.ts +5 -0
  5. package/dist/types/augmentations/index.d.ts.map +1 -0
  6. package/dist/types/augmentations/textmode.d.ts +9 -0
  7. package/dist/types/augmentations/textmode.d.ts.map +1 -0
  8. package/dist/types/augmentations/textmode.test.d.ts +2 -0
  9. package/dist/types/augmentations/textmode.test.d.ts.map +1 -0
  10. package/dist/types/exporters/base/LayerTarget.d.ts +4 -0
  11. package/dist/types/exporters/base/LayerTarget.d.ts.map +1 -1
  12. package/dist/types/exporters/gif/types.d.ts +24 -0
  13. package/dist/types/exporters/gif/types.d.ts.map +1 -1
  14. package/dist/types/exporters/image/types.d.ts +8 -0
  15. package/dist/types/exporters/image/types.d.ts.map +1 -1
  16. package/dist/types/exporters/json/types.d.ts +36 -0
  17. package/dist/types/exporters/json/types.d.ts.map +1 -1
  18. package/dist/types/exporters/svg/types.d.ts +2 -0
  19. package/dist/types/exporters/svg/types.d.ts.map +1 -1
  20. package/dist/types/exporters/txt/types.d.ts +2 -0
  21. package/dist/types/exporters/txt/types.d.ts.map +1 -1
  22. package/dist/types/exporters/video/VideoFrameDriver.d.ts.map +1 -1
  23. package/dist/types/exporters/video/VideoRecorder.d.ts +4 -0
  24. package/dist/types/exporters/video/VideoRecorder.d.ts.map +1 -1
  25. package/dist/types/exporters/video/errors.d.ts +1 -0
  26. package/dist/types/exporters/video/errors.d.ts.map +1 -1
  27. package/dist/types/exporters/video/types.d.ts +64 -2
  28. package/dist/types/exporters/video/types.d.ts.map +1 -1
  29. package/dist/types/exporters/video/withAbortableTimeout.d.ts +2 -0
  30. package/dist/types/exporters/video/withAbortableTimeout.d.ts.map +1 -0
  31. package/dist/types/index.d.ts +5 -0
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/types/types.d.ts +40 -0
  34. package/dist/types/types.d.ts.map +1 -1
  35. package/package.json +3 -1
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Augmentation barrel.
3
+ */
4
+ import './textmode';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/augmentations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,YAAY,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * TypeScript augmentation for `textmode.export.js`.
3
+ */
4
+ import type { TextmodeExportAPI } from '../types';
5
+ declare module 'textmode.js' {
6
+ interface Textmodifier extends TextmodeExportAPI {
7
+ }
8
+ }
9
+ //# sourceMappingURL=textmode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textmode.d.ts","sourceRoot":"","sources":["../../../src/augmentations/textmode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,QAAQ,aAAa,CAAC;IAC5B,UAAU,YAAa,SAAQ,iBAAiB;KAAG;CACnD"}
@@ -0,0 +1,2 @@
1
+ import './textmode';
2
+ //# sourceMappingURL=textmode.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textmode.test.d.ts","sourceRoot":"","sources":["../../../src/augmentations/textmode.test.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAC"}
@@ -3,12 +3,16 @@ import type { TextmodeFont, TextmodeTileset } from 'textmode.js';
3
3
  import type { TextmodeLayer } from 'textmode.js';
4
4
  /**
5
5
  * Shared option for exporters that read layer framebuffer data.
6
+ *
7
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/LayerExportOptions | LayerExportOptions API reference}
6
8
  */
7
9
  export interface LayerExportOptions {
8
10
  /**
9
11
  * Layer to export.
10
12
  *
11
13
  * Defaults to `textmodifier.layers.base`.
14
+ *
15
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/LayerExportOptions#layer | LayerExportOptions.layer API reference}
12
16
  */
13
17
  layer?: TextmodeLayer;
14
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LayerTarget.d.ts","sourceRoot":"","sources":["../../../../src/exporters/base/LayerTarget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,GAAG,eAAe,CAAC;IACrC,eAAe,EAAE,mBAAmB,CAAC;CACrC;AAED,MAAM,WAAW,8BAA+B,SAAQ,yBAAyB;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IACnC,UAAU,IAAI,iBAAiB,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa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AAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IACnC,UAAU,IAAI,iBAAiB,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IACpD,YAAY,IAAI,MAAM,CAAC;CACvB;AAQD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,iBAAiB,EAAE,CAWrF;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,mBAAmB,CAMzF;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,CAWzF;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,yBAAyB,CAmBrH;AAED,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,YAAY,GAAG,8BAA8B,EAAE,CAwB3G"}
@@ -1,39 +1,57 @@
1
1
  export type GIFRecordingState = 'idle' | 'recording' | 'encoding' | 'completed' | 'error';
2
2
  /**
3
3
  * Progress information emitted during the GIF export process.
4
+ *
5
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportProgress | GIFExportProgress API reference}
4
6
  */
5
7
  export type GIFExportProgress = {
6
8
  /**
7
9
  * Current state of the recording process.
10
+ *
11
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportProgress#state | GIFExportProgress.state API reference}
8
12
  */
9
13
  state: 'idle' | 'recording' | 'encoding' | 'completed' | 'error';
10
14
  /**
11
15
  * Number of frames that have been recorded so far.
16
+ *
17
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportProgress#frameindex | GIFExportProgress.frameIndex API reference}
12
18
  */
13
19
  frameIndex?: number;
14
20
  /**
15
21
  * Total number of frames planned for the recording.
22
+ *
23
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportProgress#totalframes | GIFExportProgress.totalFrames API reference}
16
24
  */
17
25
  totalFrames?: number;
18
26
  /**
19
27
  * Optional status message for UI consumption.
28
+ *
29
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportProgress#message | GIFExportProgress.message API reference}
20
30
  */
21
31
  message?: string;
22
32
  };
23
33
  /**
24
34
  * Options for exporting the textmode content to GIF format.
35
+ *
36
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions | GIFExportOptions API reference}
25
37
  */
26
38
  export type GIFExportOptions = {
27
39
  /**
28
40
  * Target filename without extension. Defaults to an auto-generated value.
41
+ *
42
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#filename | GIFExportOptions.filename API reference}
29
43
  */
30
44
  filename?: string;
31
45
  /**
32
46
  * Desired total number of frames to capture. Defaults to `300`.
47
+ *
48
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#framecount | GIFExportOptions.frameCount API reference}
33
49
  */
34
50
  frameCount?: number;
35
51
  /**
36
52
  * Target frame rate for the export, in frames per second. Defaults to `60`.
53
+ *
54
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#framerate | GIFExportOptions.frameRate API reference}
37
55
  */
38
56
  frameRate?: number;
39
57
  /**
@@ -42,14 +60,20 @@ export type GIFExportOptions = {
42
60
  * `1.0` = original size, `2.0` = double size, `0.5` = half size.
43
61
  *
44
62
  * Defaults to `1.0`.
63
+ *
64
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#scale | GIFExportOptions.scale API reference}
45
65
  */
46
66
  scale?: number;
47
67
  /**
48
68
  * GIF loop count. 0 = loop forever. Defaults to `0`.
69
+ *
70
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#repeat | GIFExportOptions.repeat API reference}
49
71
  */
50
72
  repeat?: number;
51
73
  /**
52
74
  * Progress callback invoked throughout the recording lifecycle.
75
+ *
76
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/GIFExportOptions#onprogress | GIFExportOptions.onProgress API reference}
53
77
  */
54
78
  onProgress?: (progress: GIFExportProgress) => void;
55
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/gif/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE1F;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IACjE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IACl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AE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -7,14 +7,20 @@
7
7
  export type ImageFormat = 'png' | 'jpg' | 'webp';
8
8
  /**
9
9
  * Options for exporting the textmode content to image format.
10
+ *
11
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ImageExportOptions | ImageExportOptions API reference}
10
12
  */
11
13
  export type ImageExportOptions = {
12
14
  /**
13
15
  * Target filename without extension. Defaults to an auto-generated value.
16
+ *
17
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ImageExportOptions#filename | ImageExportOptions.filename API reference}
14
18
  */
15
19
  filename?: string;
16
20
  /**
17
21
  * The image format to export *(`'png'`, `'jpg'`, or `'webp'`)*. Defaults to `'png'`.
22
+ *
23
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ImageExportOptions#format | ImageExportOptions.format API reference}
18
24
  */
19
25
  format?: 'png' | 'jpg' | 'webp';
20
26
  /**
@@ -23,6 +29,8 @@ export type ImageExportOptions = {
23
29
  * `1.0` = original size, `2.0` = double size, `0.5` = half size.
24
30
  *
25
31
  * Defaults to `1.0`.
32
+ *
33
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/ImageExportOptions#scale | ImageExportOptions.scale API reference}
26
34
  */
27
35
  scale?: number;
28
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/image/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjD;;GAEG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AW,EAAE,MAAM,CAI/C,CAAC"}
@@ -1,22 +1,32 @@
1
1
  import type { LayerExportOptions } from '../base';
2
2
  /**
3
3
  * Target scope for JSON export.
4
+ *
5
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONExportTarget | JSONExportTarget API reference}
4
6
  */
5
7
  export type JSONExportTarget = 'selected' | 'all';
6
8
  /**
7
9
  * Canonical JSON document format identifier.
10
+ *
11
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONDocumentFormat | JSONDocumentFormat API reference}
8
12
  */
9
13
  export type JSONDocumentFormat = 'textmode.document';
10
14
  /**
11
15
  * Canonical JSON document format version.
16
+ *
17
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONDocumentVersion | JSONDocumentVersion API reference}
12
18
  */
13
19
  export type JSONDocumentVersion = '2.0.0';
14
20
  /**
15
21
  * Supported JSON color output modes.
22
+ *
23
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONExportColorMode | JSONExportColorMode API reference}
16
24
  */
17
25
  export type JSONExportColorMode = 'hex' | 'rgba';
18
26
  /**
19
27
  * RGBA color representation used in JSON exports.
28
+ *
29
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONRGBAColor | JSONRGBAColor API reference}
20
30
  */
21
31
  export interface JSONRGBAColor {
22
32
  r: number;
@@ -26,10 +36,14 @@ export interface JSONRGBAColor {
26
36
  }
27
37
  /**
28
38
  * Color value used in the exported JSON document.
39
+ *
40
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONColorValue | JSONColorValue API reference}
29
41
  */
30
42
  export type JSONColorValue = string | JSONRGBAColor;
31
43
  /**
32
44
  * Cell transform data for JSON exports.
45
+ *
46
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONCellTransform | JSONCellTransform API reference}
33
47
  */
34
48
  export interface JSONCellTransform {
35
49
  invert: boolean;
@@ -39,6 +53,8 @@ export interface JSONCellTransform {
39
53
  }
40
54
  /**
41
55
  * Rich per-cell representation for readable JSON exports.
56
+ *
57
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONObjectRowCell | JSONObjectRowCell API reference}
42
58
  */
43
59
  export interface JSONObjectRowCell {
44
60
  x: number;
@@ -50,6 +66,8 @@ export interface JSONObjectRowCell {
50
66
  }
51
67
  /**
52
68
  * Row-based cell encoding.
69
+ *
70
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONObjectRowsCellCollection | JSONObjectRowsCellCollection API reference}
53
71
  */
54
72
  export interface JSONObjectRowsCellCollection {
55
73
  encoding: 'object-rows-v1';
@@ -57,10 +75,14 @@ export interface JSONObjectRowsCellCollection {
57
75
  }
58
76
  /**
59
77
  * Supported JSON cell collection variants.
78
+ *
79
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONCellCollection | JSONCellCollection API reference}
60
80
  */
61
81
  export type JSONCellCollection = JSONObjectRowsCellCollection;
62
82
  /**
63
83
  * Grid dimensions exported for a layer.
84
+ *
85
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONLayerGrid | JSONLayerGrid API reference}
64
86
  */
65
87
  export interface JSONLayerGrid {
66
88
  cols: number;
@@ -70,6 +92,8 @@ export interface JSONLayerGrid {
70
92
  }
71
93
  /**
72
94
  * Optional export metadata.
95
+ *
96
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/JSONExportMetadata | JSONExportMetadata API reference}
73
97
  */
74
98
  export interface JSONExportMetadata {
75
99
  createdAt: string;
@@ -80,6 +104,8 @@ export interface JSONExportMetadata {
80
104
  }
81
105
  /**
82
106
  * Selected-layer entry in a JSON document export.
107
+ *
108
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeSelectedDocumentLayer | TextmodeSelectedDocumentLayer API reference}
83
109
  */
84
110
  export interface TextmodeSelectedDocumentLayer {
85
111
  id: string;
@@ -87,6 +113,8 @@ export interface TextmodeSelectedDocumentLayer {
87
113
  }
88
114
  /**
89
115
  * Selected-layer document exported by the JSON exporter.
116
+ *
117
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeSelectedDocumentJSON | TextmodeSelectedDocumentJSON API reference}
90
118
  */
91
119
  export interface TextmodeSelectedDocumentJSON {
92
120
  format: JSONDocumentFormat;
@@ -102,6 +130,8 @@ export interface TextmodeSelectedDocumentJSON {
102
130
  }
103
131
  /**
104
132
  * Single layer entry in an all-layers JSON export.
133
+ *
134
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeDocumentLayer | TextmodeDocumentLayer API reference}
105
135
  */
106
136
  export interface TextmodeDocumentLayer {
107
137
  id: string;
@@ -116,6 +146,8 @@ export interface TextmodeDocumentLayer {
116
146
  }
117
147
  /**
118
148
  * Layer stack document exported by the JSON exporter.
149
+ *
150
+ * @see {@link https://code.textmode.art/api/textmode.export.js/interfaces/TextmodeAllDocumentJSON | TextmodeAllDocumentJSON API reference}
119
151
  */
120
152
  export interface TextmodeAllDocumentJSON {
121
153
  format: JSONDocumentFormat;
@@ -130,10 +162,14 @@ export interface TextmodeAllDocumentJSON {
130
162
  }
131
163
  /**
132
164
  * JSON document exported by the JSON exporter.
165
+ *
166
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/TextmodeDocumentJSON | TextmodeDocumentJSON API reference}
133
167
  */
134
168
  export type TextmodeDocumentJSON = TextmodeSelectedDocumentJSON | TextmodeAllDocumentJSON;
135
169
  /**
136
170
  * Options for exporting the textmode content to JSON format.
171
+ *
172
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/JSONExportOptions | JSONExportOptions API reference}
137
173
  */
138
174
  export type JSONExportOptions = LayerExportOptions & {
139
175
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/json/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA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B,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEhC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,EAAE,iBAAiB,CAAC;CAC7B"}
@@ -53,6 +53,8 @@ export interface FramebufferData {
53
53
  }
54
54
  /**
55
55
  * Options for exporting the textmode content to SVG format.
56
+ *
57
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/SVGExportOptions | SVGExportOptions API reference}
56
58
  */
57
59
  export type SVGExportOptions = LayerExportOptions & {
58
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/svg/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,IAAI;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;I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vB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,eAAe,EAAE,UAAU,CAAC;IAC5B,kBAAkB,EAAE,UAAU,CAAC;IAC/B,oBAAoB,EAAE,UAAU,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG;IACnD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE7B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,cAAc,IAAI;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACrE,KAAK,IAAI,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,2BAA2B,EAAE,OAAO,CAAC;IACrC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACpC"}
@@ -1,6 +1,8 @@
1
1
  import type { LayerExportOptions } from '../base';
2
2
  /**
3
3
  * Options for exporting the textmode content to TXT format.
4
+ *
5
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/TXTExportOptions | TXTExportOptions API reference}
4
6
  */
5
7
  export type TXTExportOptions = LayerExportOptions & {
6
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/txt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG;IACnD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,sBAAsB,EAAE,OAAO,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/exporters/txt/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG;IACnD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,sBAAsB,EAAE,OAAO,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoFrameDriver.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/VideoFrameDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAoCvD;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC5B,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAE1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAgD;IACtF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,oBAAoB,CAAa;IACzC,OAAO,CAAC,gBAAgB,CAAa;gBAGpC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,EACnE,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;IAeF,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDrE,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,oBAAoB;IA2B5B,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,eAAe;CAKvB"}
1
+ {"version":3,"file":"VideoFrameDriver.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/VideoFrameDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAuCvD;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC5B,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAE1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAgD;IACtF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,oBAAoB,CAAa;IACzC,OAAO,CAAC,gBAAgB,CAAa;gBAGpC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,EACnE,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;IAeF,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDrE,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,oBAAoB;IA2B5B,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,eAAe;CAKvB"}
@@ -4,6 +4,10 @@ import type { VideoExportProgress, VideoFrameDriverLike, VideoGenerationOptions
4
4
  */
5
5
  export declare class VideoRecorder {
6
6
  $record(options: VideoGenerationOptions, frameDriver: VideoFrameDriverLike, onProgress?: (progress: VideoExportProgress) => void): Promise<Blob>;
7
+ private _drainIfNeeded;
8
+ private _drainEncodes;
9
+ private _shouldYieldAfterCaptureFrame;
10
+ private _yieldToBrowser;
7
11
  private _createEncodingPlan;
8
12
  private _assertWebCodecsAvailable;
9
13
  private _resolveBitrate;
@@ -1 +1 @@
1
- {"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/VideoRecorder.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAIX,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,MAAM,SAAS,CAAC;AAKjB;;GAEG;AACH,qBAAa,aAAa;IACZ,OAAO,CACnB,OAAO,EAAE,sBAAsB,EAC/B,WAAW,EAAE,oBAAoB,EACjC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,GAClD,OAAO,CAAC,IAAI,CAAC;YAsDF,mBAAmB;IAgDjC,OAAO,CAAC,yBAAyB;IAcjC,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,IAAI;CAKZ"}
1
+ {"version":3,"file":"VideoRecorder.d.ts","sourceRoot":"","sources":["../../../../src/exporters/video/VideoRecorder.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAIX,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,MAAM,SAAS,CAAC;AAqEjB;;GAEG;AACH,qBAAa,aAAa;IACZ,OAAO,CACnB,OAAO,EAAE,sBAAsB,EAC/B,WAAW,EAAE,oBAAoB,EACjC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,GAClD,OAAO,CAAC,IAAI,CAAC;YA4EF,cAAc;YAcd,aAAa;IAY3B,OAAO,CAAC,6BAA6B;IAKrC,OAAO,CAAC,eAAe;YA2CT,mBAAmB;IAgDjC,OAAO,CAAC,yBAAyB;IAcjC,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,IAAI;CAKZ"}
@@ -5,5 +5,6 @@ export declare class VideoExportError extends Error {
5
5
  constructor(code: VideoExportErrorCode, message: string, cause?: unknown);
6
6
  }
7
7
  export declare function createAbortError(): VideoExportError;
8
+ export declare function createTimeoutError(message: string, cause?: unknown): VideoExportError;
8
9
  export declare function isAbortError(error: unknown): boolean;
9
10
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +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
+ {"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,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAErF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKpD"}
@@ -1,21 +1,31 @@
1
1
  /**
2
2
  * Lifecycle state reported while a video export is being prepared, recorded, encoded, or completed.
3
+ *
4
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoRecordingState | VideoRecordingState API reference}
3
5
  */
4
6
  export type VideoRecordingState = 'idle' | 'recording' | 'encoding' | 'completed' | 'error';
5
7
  /**
6
8
  * More granular phase information for progress UIs that need to distinguish setup, rendering, and finalization.
9
+ *
10
+ * `rendering` is retained for 1.5.x compatibility. Current deterministic video capture emits `capturing`.
11
+ *
12
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportPhase | VideoExportPhase API reference}
7
13
  */
8
- export type VideoExportPhase = 'probing' | 'rendering' | 'encoding' | 'finalizing';
14
+ export type VideoExportPhase = 'probing' | 'rendering' | 'capturing' | 'encoding' | 'draining' | 'finalizing';
9
15
  export type VideoCodec = 'vp8' | 'vp9' | 'avc' | (string & {});
10
16
  /**
11
17
  * Subjective bitrate preset used when an exact bits-per-second value is not supplied.
12
18
  *
13
19
  * Higher presets produce larger files with more detail. For exact control, pass a numeric
14
20
  * `bitrate` value in bits per second instead.
21
+ *
22
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoBitratePreset | VideoBitratePreset API reference}
15
23
  */
16
24
  export type VideoBitratePreset = 'low' | 'medium' | 'high';
17
25
  /**
18
26
  * Video container format written by `saveVideo`.
27
+ *
28
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportFormat | VideoExportFormat API reference}
19
29
  */
20
30
  export type VideoExportFormat = 'webm' | 'mp4';
21
31
  /**
@@ -25,6 +35,8 @@ export type VideoExportFormat = 'webm' | 'mp4';
25
35
  * This is usually the best default for generative animations.
26
36
  * - `'constant'`: asks the encoder to keep the bitrate steadier throughout the export. This can make file size
27
37
  * more predictable, but may waste bits on simple frames or reduce detail on complex frames.
38
+ *
39
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoBitrateMode | VideoBitrateMode API reference}
28
40
  */
29
41
  export type VideoBitrateMode = 'variable' | 'constant';
30
42
  /**
@@ -33,6 +45,8 @@ export type VideoBitrateMode = 'variable' | 'constant';
33
45
  * - `'quality'`: prioritizes complete, stable export output. Mediabunny notes that this mode prevents dropped frames.
34
46
  * - `'realtime'`: prioritizes low-latency encoding. It is intended for live streams and may drop frames when overloaded,
35
47
  * so it is usually not recommended for frame-perfect exports.
48
+ *
49
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoLatencyMode | VideoLatencyMode API reference}
36
50
  */
37
51
  export type VideoLatencyMode = 'quality' | 'realtime';
38
52
  /**
@@ -43,60 +57,88 @@ export type VideoLatencyMode = 'quality' | 'realtime';
43
57
  * - `'prefer-hardware'`: prefer GPU/ASIC encoding when available, often faster and more power-efficient, but codec
44
58
  * availability and output characteristics vary by device.
45
59
  * - `'prefer-software'`: prefer CPU encoding, often more consistent across machines, but usually slower.
60
+ *
61
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoHardwareAcceleration | VideoHardwareAcceleration API reference}
46
62
  */
47
63
  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';
64
+ export type VideoExportErrorCode = 'VIDEO_EXPORT_UNSUPPORTED' | 'VIDEO_CODEC_UNSUPPORTED' | 'VIDEO_EXPORT_ABORTED' | 'VIDEO_EXPORT_TIMEOUT' | 'VIDEO_EXPORT_FAILED' | 'VIDEO_TRANSPARENCY_UNSUPPORTED';
49
65
  /**
50
66
  * Progress information emitted during the video export process.
67
+ *
68
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress | VideoExportProgress API reference}
51
69
  */
52
70
  export type VideoExportProgress = {
53
71
  /**
54
72
  * Current state of the recording process.
73
+ *
74
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#state | VideoExportProgress.state API reference}
55
75
  */
56
76
  state: VideoRecordingState;
57
77
  /**
58
78
  * Current export phase for newer progress UIs.
79
+ *
80
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#phase | VideoExportProgress.phase API reference}
59
81
  */
60
82
  phase?: VideoExportPhase;
61
83
  /**
62
84
  * Number of frames that have been recorded so far.
85
+ *
86
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#frameindex | VideoExportProgress.frameIndex API reference}
63
87
  */
64
88
  frameIndex?: number;
65
89
  /**
66
90
  * Alias for {@link frameIndex}. Prefer this field in new code.
91
+ *
92
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#frame | VideoExportProgress.frame API reference}
67
93
  */
68
94
  frame?: number;
69
95
  /**
70
96
  * Total number of frames planned for the recording.
97
+ *
98
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#totalframes | VideoExportProgress.totalFrames API reference}
71
99
  */
72
100
  totalFrames?: number;
73
101
  /**
74
102
  * Export completion ratio between `0` and `1`.
103
+ *
104
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#progress | VideoExportProgress.progress API reference}
75
105
  */
76
106
  progress?: number;
77
107
  /**
78
108
  * Optional status message for UI consumption.
109
+ *
110
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportProgress#message | VideoExportProgress.message API reference}
79
111
  */
80
112
  message?: string;
81
113
  };
82
114
  /**
83
115
  * Options for exporting the textmode content to video format.
116
+ *
117
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions | VideoExportOptions API reference}
84
118
  */
85
119
  export type VideoExportOptions = {
86
120
  /**
87
121
  * Target filename without extension. Defaults to an auto-generated value.
122
+ *
123
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#filename | VideoExportOptions.filename API reference}
88
124
  */
89
125
  filename?: string;
90
126
  /**
91
127
  * Video container format. Defaults to `'mp4'`.
128
+ *
129
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#format | VideoExportOptions.format API reference}
92
130
  */
93
131
  format?: VideoExportFormat;
94
132
  /**
95
133
  * Desired total number of frames to capture. Defaults to `300`.
134
+ *
135
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#framecount | VideoExportOptions.frameCount API reference}
96
136
  */
97
137
  frameCount?: number;
98
138
  /**
99
139
  * Target frame rate for the export, in frames per second. Defaults to `60`.
140
+ *
141
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#framerate | VideoExportOptions.frameRate API reference}
100
142
  */
101
143
  frameRate?: number;
102
144
  /**
@@ -105,6 +147,8 @@ export type VideoExportOptions = {
105
147
  * Bitrate controls how much encoded data is available per second of video. Higher values can preserve more detail
106
148
  * in noisy or fast-changing sketches, but create larger files. Presets are resolved from the export dimensions and
107
149
  * frame rate; numeric values are passed directly to the encoder.
150
+ *
151
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#bitrate | VideoExportOptions.bitrate API reference}
108
152
  */
109
153
  bitrate?: number | VideoBitratePreset;
110
154
  /**
@@ -112,6 +156,8 @@ export type VideoExportOptions = {
112
156
  *
113
157
  * Use `'variable'` for most exports so simple frames can compress efficiently and complex frames can receive more
114
158
  * bits. Use `'constant'` only when a steadier data rate is more important than compression efficiency.
159
+ *
160
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#bitratemode | VideoExportOptions.bitrateMode API reference}
115
161
  */
116
162
  bitrateMode?: VideoBitrateMode;
117
163
  /**
@@ -119,6 +165,8 @@ export type VideoExportOptions = {
119
165
  *
120
166
  * Use `'quality'` for deterministic exports; it prioritizes completed output and avoids dropped frames. Use
121
167
  * `'realtime'` only for low-latency use cases where dropped frames are acceptable.
168
+ *
169
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#latencymode | VideoExportOptions.latencyMode API reference}
122
170
  */
123
171
  latencyMode?: VideoLatencyMode;
124
172
  /**
@@ -126,6 +174,8 @@ export type VideoExportOptions = {
126
174
  *
127
175
  * Browsers may ignore this hint. `'prefer-hardware'` can be faster on supported devices; `'prefer-software'` can be
128
176
  * more predictable but slower. `'no-preference'` lets the browser choose.
177
+ *
178
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#hardwareacceleration | VideoExportOptions.hardwareAcceleration API reference}
129
179
  */
130
180
  hardwareAcceleration?: VideoHardwareAcceleration;
131
181
  /**
@@ -134,26 +184,38 @@ export type VideoExportOptions = {
134
184
  * Key frames are independently decodable frames used for seeking and recovery. Shorter intervals improve seeking
135
185
  * responsiveness but increase file size. Longer intervals can shrink files but make seeking less precise.
136
186
  * Use `0` to request every frame as a key frame.
187
+ *
188
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#keyframeinterval | VideoExportOptions.keyFrameInterval API reference}
137
189
  */
138
190
  keyFrameInterval?: number;
139
191
  /**
140
192
  * Pixel density used during export. Defaults to `1` so video dimensions match the live canvas.
193
+ *
194
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#pixeldensity | VideoExportOptions.pixelDensity API reference}
141
195
  */
142
196
  pixelDensity?: number;
143
197
  /**
144
198
  * Abort signal for cancelling an in-progress export.
199
+ *
200
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#signal | VideoExportOptions.signal API reference}
145
201
  */
146
202
  signal?: AbortSignal;
147
203
  /**
148
204
  * When true, attempts to preserve alpha data in WebM recordings. MP4 exports reject this option.
205
+ *
206
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#transparent | VideoExportOptions.transparent API reference}
149
207
  */
150
208
  transparent?: boolean;
151
209
  /**
152
210
  * Progress callback invoked throughout the recording lifecycle.
211
+ *
212
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#onprogress | VideoExportOptions.onProgress API reference}
153
213
  */
154
214
  onProgress?: (progress: VideoExportProgress) => void;
155
215
  /**
156
216
  * Enables verbose logging. Defaults to `false`.
217
+ *
218
+ * @see {@link https://code.textmode.art/api/textmode.export.js/type-aliases/VideoExportOptions#debuglogging | VideoExportOptions.debugLogging API reference}
157
219
  */
158
220
  debugLogging?: boolean;
159
221
  };